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

4192 lines
160 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 = 466);
  86. /******/ })
  87. /************************************************************************/
  88. /******/ ({
  89. /***/ 0:
  90. /***/ (function(module, exports, __webpack_require__) {
  91. "use strict";
  92. var _interopRequireDefault = __webpack_require__(1);
  93. exports.__esModule = true;
  94. exports.noop = noop;
  95. exports.isDef = isDef;
  96. exports.isFunction = isFunction;
  97. exports.isObject = isObject;
  98. exports.isPromise = isPromise;
  99. exports.get = get;
  100. exports.isServer = exports.inBrowser = exports.addUnit = exports.createNamespace = void 0;
  101. var _vue = _interopRequireDefault(__webpack_require__(4));
  102. var _create = __webpack_require__(24);
  103. exports.createNamespace = _create.createNamespace;
  104. var _unit = __webpack_require__(20);
  105. exports.addUnit = _unit.addUnit;
  106. var inBrowser = typeof window !== 'undefined';
  107. exports.inBrowser = inBrowser;
  108. var isServer = _vue.default.prototype.$isServer; // eslint-disable-next-line @typescript-eslint/no-empty-function
  109. exports.isServer = isServer;
  110. function noop() {}
  111. function isDef(val) {
  112. return val !== undefined && val !== null;
  113. }
  114. function isFunction(val) {
  115. return typeof val === 'function';
  116. }
  117. function isObject(val) {
  118. return val !== null && typeof val === 'object';
  119. }
  120. function isPromise(val) {
  121. return isObject(val) && isFunction(val.then) && isFunction(val.catch);
  122. }
  123. function get(object, path) {
  124. var keys = path.split('.');
  125. var result = object;
  126. keys.forEach(function (key) {
  127. var _result$key;
  128. result = (_result$key = result[key]) != null ? _result$key : '';
  129. });
  130. return result;
  131. }
  132. /***/ }),
  133. /***/ 1:
  134. /***/ (function(module, exports) {
  135. function _interopRequireDefault(obj) {
  136. return obj && obj.__esModule ? obj : {
  137. "default": obj
  138. };
  139. }
  140. module.exports = _interopRequireDefault;
  141. /***/ }),
  142. /***/ 11:
  143. /***/ (function(module, exports, __webpack_require__) {
  144. "use strict";
  145. var _interopRequireDefault = __webpack_require__(1);
  146. exports.__esModule = true;
  147. exports.default = void 0;
  148. var _vue = _interopRequireDefault(__webpack_require__(4));
  149. var _deepAssign = __webpack_require__(21);
  150. var _zhCN = _interopRequireDefault(__webpack_require__(27));
  151. var proto = _vue.default.prototype;
  152. var defineReactive = _vue.default.util.defineReactive;
  153. defineReactive(proto, '$vantLang', 'zh-CN');
  154. defineReactive(proto, '$vantMessages', {
  155. 'zh-CN': _zhCN.default
  156. });
  157. var _default = {
  158. messages: function messages() {
  159. return proto.$vantMessages[proto.$vantLang];
  160. },
  161. use: function use(lang, messages) {
  162. var _this$add;
  163. proto.$vantLang = lang;
  164. this.add((_this$add = {}, _this$add[lang] = messages, _this$add));
  165. },
  166. add: function add(messages) {
  167. if (messages === void 0) {
  168. messages = {};
  169. }
  170. (0, _deepAssign.deepAssign)(proto.$vantMessages, messages);
  171. }
  172. };
  173. exports.default = _default;
  174. /***/ }),
  175. /***/ 12:
  176. /***/ (function(module, exports) {
  177. /**
  178. * When source maps are enabled, `style-loader` uses a link element with a data-uri to
  179. * embed the css on the page. This breaks all relative urls because now they are relative to a
  180. * bundle instead of the current page.
  181. *
  182. * One solution is to only use full urls, but that may be impossible.
  183. *
  184. * Instead, this function "fixes" the relative urls to be absolute according to the current page location.
  185. *
  186. * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command.
  187. *
  188. */
  189. module.exports = function (css) {
  190. // get current location
  191. var location = typeof window !== "undefined" && window.location;
  192. if (!location) {
  193. throw new Error("fixUrls requires window.location");
  194. }
  195. // blank or null?
  196. if (!css || typeof css !== "string") {
  197. return css;
  198. }
  199. var baseUrl = location.protocol + "//" + location.host;
  200. var currentDir = baseUrl + location.pathname.replace(/\/[^\/]*$/, "/");
  201. // convert each url(...)
  202. /*
  203. This regular expression is just a way to recursively match brackets within
  204. a string.
  205. /url\s*\( = Match on the word "url" with any whitespace after it and then a parens
  206. ( = Start a capturing group
  207. (?: = Start a non-capturing group
  208. [^)(] = Match anything that isn't a parentheses
  209. | = OR
  210. \( = Match a start parentheses
  211. (?: = Start another non-capturing groups
  212. [^)(]+ = Match anything that isn't a parentheses
  213. | = OR
  214. \( = Match a start parentheses
  215. [^)(]* = Match anything that isn't a parentheses
  216. \) = Match a end parentheses
  217. ) = End Group
  218. *\) = Match anything and then a close parens
  219. ) = Close non-capturing group
  220. * = Match anything
  221. ) = Close capturing group
  222. \) = Match a close parens
  223. /gi = Get all matches, not the first. Be case insensitive.
  224. */
  225. var fixedCss = css.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function(fullMatch, origUrl) {
  226. // strip quotes (if they exist)
  227. var unquotedOrigUrl = origUrl
  228. .trim()
  229. .replace(/^"(.*)"$/, function(o, $1){ return $1; })
  230. .replace(/^'(.*)'$/, function(o, $1){ return $1; });
  231. // already a full url? no change
  232. if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(unquotedOrigUrl)) {
  233. return fullMatch;
  234. }
  235. // convert the url to a full url
  236. var newUrl;
  237. if (unquotedOrigUrl.indexOf("//") === 0) {
  238. //TODO: should we add protocol?
  239. newUrl = unquotedOrigUrl;
  240. } else if (unquotedOrigUrl.indexOf("/") === 0) {
  241. // path should be relative to the base url
  242. newUrl = baseUrl + unquotedOrigUrl; // already starts with '/'
  243. } else {
  244. // path should be relative to current directory
  245. newUrl = currentDir + unquotedOrigUrl.replace(/^\.\//, ""); // Strip leading './'
  246. }
  247. // send back the fixed url(...)
  248. return "url(" + JSON.stringify(newUrl) + ")";
  249. });
  250. // send back the fixed css
  251. return fixedCss;
  252. };
  253. /***/ }),
  254. /***/ 132:
  255. /***/ (function(module, exports, __webpack_require__) {
  256. "use strict";
  257. exports.__esModule = true;
  258. exports.ClickOutsideMixin = void 0;
  259. var _event = __webpack_require__(30);
  260. /**
  261. * Listen to click outside event
  262. */
  263. var ClickOutsideMixin = function ClickOutsideMixin(config) {
  264. return {
  265. props: {
  266. closeOnClickOutside: {
  267. type: Boolean,
  268. default: true
  269. }
  270. },
  271. data: function data() {
  272. var _this = this;
  273. var clickOutsideHandler = function clickOutsideHandler(event) {
  274. if (_this.closeOnClickOutside && !_this.$el.contains(event.target)) {
  275. _this[config.method]();
  276. }
  277. };
  278. return {
  279. clickOutsideHandler: clickOutsideHandler
  280. };
  281. },
  282. mounted: function mounted() {
  283. (0, _event.on)(document, config.event, this.clickOutsideHandler);
  284. },
  285. beforeDestroy: function beforeDestroy() {
  286. (0, _event.off)(document, config.event, this.clickOutsideHandler);
  287. }
  288. };
  289. };
  290. exports.ClickOutsideMixin = ClickOutsideMixin;
  291. /***/ }),
  292. /***/ 14:
  293. /***/ (function(module, exports, __webpack_require__) {
  294. "use strict";
  295. var _interopRequireDefault = __webpack_require__(1);
  296. exports.__esModule = true;
  297. exports.inherit = inherit;
  298. exports.emit = emit;
  299. exports.mount = mount;
  300. var _extends2 = _interopRequireDefault(__webpack_require__(18));
  301. var _vue = _interopRequireDefault(__webpack_require__(4));
  302. var inheritKey = ['ref', 'style', 'class', 'attrs', 'refInFor', 'nativeOn', 'directives', 'staticClass', 'staticStyle'];
  303. var mapInheritKey = {
  304. nativeOn: 'on'
  305. }; // inherit partial context, map nativeOn to on
  306. function inherit(context, inheritListeners) {
  307. var result = inheritKey.reduce(function (obj, key) {
  308. if (context.data[key]) {
  309. obj[mapInheritKey[key] || key] = context.data[key];
  310. }
  311. return obj;
  312. }, {});
  313. if (inheritListeners) {
  314. result.on = result.on || {};
  315. (0, _extends2.default)(result.on, context.data.on);
  316. }
  317. return result;
  318. } // emit event
  319. function emit(context, eventName) {
  320. for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
  321. args[_key - 2] = arguments[_key];
  322. }
  323. var listeners = context.listeners[eventName];
  324. if (listeners) {
  325. if (Array.isArray(listeners)) {
  326. listeners.forEach(function (listener) {
  327. listener.apply(void 0, args);
  328. });
  329. } else {
  330. listeners.apply(void 0, args);
  331. }
  332. }
  333. } // mount functional component
  334. function mount(Component, data) {
  335. var instance = new _vue.default({
  336. el: document.createElement('div'),
  337. props: Component.props,
  338. render: function render(h) {
  339. return h(Component, (0, _extends2.default)({
  340. props: this.$props
  341. }, data));
  342. }
  343. });
  344. document.body.appendChild(instance.$el);
  345. return instance;
  346. }
  347. /***/ }),
  348. /***/ 16:
  349. /***/ (function(module, exports, __webpack_require__) {
  350. "use strict";
  351. 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;
  352. /***/ }),
  353. /***/ 18:
  354. /***/ (function(module, exports) {
  355. function _extends() {
  356. module.exports = _extends = Object.assign || function (target) {
  357. for (var i = 1; i < arguments.length; i++) {
  358. var source = arguments[i];
  359. for (var key in source) {
  360. if (Object.prototype.hasOwnProperty.call(source, key)) {
  361. target[key] = source[key];
  362. }
  363. }
  364. }
  365. return target;
  366. };
  367. return _extends.apply(this, arguments);
  368. }
  369. module.exports = _extends;
  370. /***/ }),
  371. /***/ 19:
  372. /***/ (function(module, exports, __webpack_require__) {
  373. "use strict";
  374. exports.__esModule = true;
  375. exports.isNumeric = isNumeric;
  376. exports.isNaN = isNaN;
  377. function isNumeric(val) {
  378. return /^\d+(\.\d+)?$/.test(val);
  379. }
  380. function isNaN(val) {
  381. if (Number.isNaN) {
  382. return Number.isNaN(val);
  383. } // eslint-disable-next-line no-self-compare
  384. return val !== val;
  385. }
  386. /***/ }),
  387. /***/ 20:
  388. /***/ (function(module, exports, __webpack_require__) {
  389. "use strict";
  390. exports.__esModule = true;
  391. exports.addUnit = addUnit;
  392. exports.unitToPx = unitToPx;
  393. var _ = __webpack_require__(0);
  394. var _number = __webpack_require__(19);
  395. function addUnit(value) {
  396. if (!(0, _.isDef)(value)) {
  397. return undefined;
  398. }
  399. value = String(value);
  400. return (0, _number.isNumeric)(value) ? value + "px" : value;
  401. } // cache
  402. var rootFontSize;
  403. function getRootFontSize() {
  404. if (!rootFontSize) {
  405. var doc = document.documentElement;
  406. var fontSize = doc.style.fontSize || window.getComputedStyle(doc).fontSize;
  407. rootFontSize = parseFloat(fontSize);
  408. }
  409. return rootFontSize;
  410. }
  411. function convertRem(value) {
  412. value = value.replace(/rem/g, '');
  413. return +value * getRootFontSize();
  414. }
  415. function convertVw(value) {
  416. value = value.replace(/vw/g, '');
  417. return +value * window.innerWidth / 100;
  418. }
  419. function convertVh(value) {
  420. value = value.replace(/vh/g, '');
  421. return +value * window.innerHeight / 100;
  422. }
  423. function unitToPx(value) {
  424. if (typeof value === 'number') {
  425. return value;
  426. }
  427. if (_.inBrowser) {
  428. if (value.indexOf('rem') !== -1) {
  429. return convertRem(value);
  430. }
  431. if (value.indexOf('vw') !== -1) {
  432. return convertVw(value);
  433. }
  434. if (value.indexOf('vh') !== -1) {
  435. return convertVh(value);
  436. }
  437. }
  438. return parseFloat(value);
  439. }
  440. /***/ }),
  441. /***/ 21:
  442. /***/ (function(module, exports, __webpack_require__) {
  443. "use strict";
  444. exports.__esModule = true;
  445. exports.deepAssign = deepAssign;
  446. var _ = __webpack_require__(0);
  447. var hasOwnProperty = Object.prototype.hasOwnProperty;
  448. function assignKey(to, from, key) {
  449. var val = from[key];
  450. if (!(0, _.isDef)(val)) {
  451. return;
  452. }
  453. if (!hasOwnProperty.call(to, key) || !(0, _.isObject)(val)) {
  454. to[key] = val;
  455. } else {
  456. // eslint-disable-next-line @typescript-eslint/no-use-before-define
  457. to[key] = deepAssign(Object(to[key]), from[key]);
  458. }
  459. }
  460. function deepAssign(to, from) {
  461. Object.keys(from).forEach(function (key) {
  462. assignKey(to, from, key);
  463. });
  464. return to;
  465. }
  466. /***/ }),
  467. /***/ 22:
  468. /***/ (function(module, exports, __webpack_require__) {
  469. var content = __webpack_require__(23);
  470. if(typeof content === 'string') content = [[module.i, content, '']];
  471. var transform;
  472. var insertInto;
  473. var options = {"hmr":true}
  474. options.transform = transform
  475. options.insertInto = undefined;
  476. var update = __webpack_require__(6)(content, options);
  477. if(content.locals) module.exports = content.locals;
  478. if(false) {}
  479. /***/ }),
  480. /***/ 23:
  481. /***/ (function(module, exports, __webpack_require__) {
  482. exports = module.exports = __webpack_require__(5)(false);
  483. // Module
  484. 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
  485. /***/ }),
  486. /***/ 234:
  487. /***/ (function(module, exports, __webpack_require__) {
  488. "use strict";
  489. var _interopRequireDefault = __webpack_require__(1);
  490. exports.__esModule = true;
  491. exports.default = void 0;
  492. var _extends2 = _interopRequireDefault(__webpack_require__(18));
  493. var _popperjs = __webpack_require__(470);
  494. var _utils = __webpack_require__(0);
  495. var _constant = __webpack_require__(63);
  496. var _clickOutside = __webpack_require__(132);
  497. var _icon = _interopRequireDefault(__webpack_require__(35));
  498. var _popup = _interopRequireDefault(__webpack_require__(93));
  499. // Mixins
  500. // Components
  501. var _createNamespace = (0, _utils.createNamespace)('popover'),
  502. createComponent = _createNamespace[0],
  503. bem = _createNamespace[1];
  504. var _default2 = createComponent({
  505. mixins: [(0, _clickOutside.ClickOutsideMixin)({
  506. event: 'touchstart',
  507. method: 'onClickOutside'
  508. })],
  509. props: {
  510. value: Boolean,
  511. trigger: String,
  512. overlay: Boolean,
  513. offset: {
  514. type: Array,
  515. default: function _default() {
  516. return [0, 8];
  517. }
  518. },
  519. theme: {
  520. type: String,
  521. default: 'light'
  522. },
  523. actions: {
  524. type: Array,
  525. default: function _default() {
  526. return [];
  527. }
  528. },
  529. placement: {
  530. type: String,
  531. default: 'bottom'
  532. },
  533. getContainer: {
  534. type: [String, Function],
  535. default: 'body'
  536. },
  537. closeOnClickAction: {
  538. type: Boolean,
  539. default: true
  540. }
  541. },
  542. watch: {
  543. value: 'updateLocation',
  544. placement: 'updateLocation'
  545. },
  546. mounted: function mounted() {
  547. this.updateLocation();
  548. },
  549. beforeDestroy: function beforeDestroy() {
  550. if (this.popper) {
  551. this.popper.destroy();
  552. this.popper = null;
  553. }
  554. },
  555. methods: {
  556. createPopper: function createPopper() {
  557. return (0, _popperjs.createPopper)(this.$refs.wrapper, this.$refs.popover.$el, {
  558. placement: this.placement,
  559. modifiers: [{
  560. name: 'computeStyles',
  561. options: {
  562. adaptive: false,
  563. gpuAcceleration: false
  564. }
  565. }, (0, _extends2.default)({}, _popperjs.offsetModifier, {
  566. options: {
  567. offset: this.offset
  568. }
  569. })]
  570. });
  571. },
  572. updateLocation: function updateLocation() {
  573. var _this = this;
  574. this.$nextTick(function () {
  575. if (!_this.value) {
  576. return;
  577. }
  578. if (!_this.popper) {
  579. _this.popper = _this.createPopper();
  580. } else {
  581. _this.popper.setOptions({
  582. placement: _this.placement
  583. });
  584. }
  585. });
  586. },
  587. renderAction: function renderAction(action, index) {
  588. var _this2 = this;
  589. var h = this.$createElement;
  590. var icon = action.icon,
  591. text = action.text,
  592. disabled = action.disabled,
  593. className = action.className;
  594. return h("div", {
  595. "attrs": {
  596. "role": "menuitem"
  597. },
  598. "class": [bem('action', {
  599. disabled: disabled,
  600. 'with-icon': icon
  601. }), className],
  602. "on": {
  603. "click": function click() {
  604. return _this2.onClickAction(action, index);
  605. }
  606. }
  607. }, [icon && h(_icon.default, {
  608. "attrs": {
  609. "name": icon
  610. },
  611. "class": bem('action-icon')
  612. }), h("div", {
  613. "class": [bem('action-text'), _constant.BORDER_BOTTOM]
  614. }, [text])]);
  615. },
  616. onToggle: function onToggle(value) {
  617. this.$emit('input', value);
  618. },
  619. onClickWrapper: function onClickWrapper() {
  620. if (this.trigger === 'click') {
  621. this.onToggle(!this.value);
  622. }
  623. },
  624. onTouchstart: function onTouchstart(event) {
  625. event.stopPropagation();
  626. this.$emit('touchstart', event);
  627. },
  628. onClickAction: function onClickAction(action, index) {
  629. if (action.disabled) {
  630. return;
  631. }
  632. this.$emit('select', action, index);
  633. if (this.closeOnClickAction) {
  634. this.$emit('input', false);
  635. }
  636. },
  637. onClickOutside: function onClickOutside() {
  638. this.$emit('input', false);
  639. },
  640. onOpen: function onOpen() {
  641. this.$emit('open');
  642. },
  643. /* istanbul ignore next */
  644. onOpened: function onOpened() {
  645. this.$emit('opened');
  646. },
  647. onClose: function onClose() {
  648. this.$emit('close');
  649. },
  650. /* istanbul ignore next */
  651. onClosed: function onClosed() {
  652. this.$emit('closed');
  653. }
  654. },
  655. render: function render() {
  656. var h = arguments[0];
  657. return h("span", {
  658. "ref": "wrapper",
  659. "class": bem('wrapper'),
  660. "on": {
  661. "click": this.onClickWrapper
  662. }
  663. }, [h(_popup.default, {
  664. "ref": "popover",
  665. "attrs": {
  666. "value": this.value,
  667. "overlay": this.overlay,
  668. "position": null,
  669. "transition": "van-popover-zoom",
  670. "lockScroll": false,
  671. "getContainer": this.getContainer
  672. },
  673. "class": bem([this.theme]),
  674. "on": {
  675. "open": this.onOpen,
  676. "close": this.onClose,
  677. "input": this.onToggle,
  678. "opened": this.onOpened,
  679. "closed": this.onClosed
  680. },
  681. "nativeOn": {
  682. "touchstart": this.onTouchstart
  683. }
  684. }, [h("div", {
  685. "class": bem('arrow')
  686. }), h("div", {
  687. "class": bem('content'),
  688. "attrs": {
  689. "role": "menu"
  690. }
  691. }, [this.slots('default') || this.actions.map(this.renderAction)])]), this.slots('reference')]);
  692. }
  693. });
  694. exports.default = _default2;
  695. /***/ }),
  696. /***/ 24:
  697. /***/ (function(module, exports, __webpack_require__) {
  698. "use strict";
  699. exports.__esModule = true;
  700. exports.createNamespace = createNamespace;
  701. var _bem = __webpack_require__(25);
  702. var _component = __webpack_require__(26);
  703. var _i18n = __webpack_require__(29);
  704. function createNamespace(name) {
  705. name = 'van-' + name;
  706. return [(0, _component.createComponent)(name), (0, _bem.createBEM)(name), (0, _i18n.createI18N)(name)];
  707. }
  708. /***/ }),
  709. /***/ 25:
  710. /***/ (function(module, exports, __webpack_require__) {
  711. "use strict";
  712. exports.__esModule = true;
  713. exports.createBEM = createBEM;
  714. /**
  715. * bem helper
  716. * b() // 'button'
  717. * b('text') // 'button__text'
  718. * b({ disabled }) // 'button button--disabled'
  719. * b('text', { disabled }) // 'button__text button__text--disabled'
  720. * b(['disabled', 'primary']) // 'button button--disabled button--primary'
  721. */
  722. function gen(name, mods) {
  723. if (!mods) {
  724. return '';
  725. }
  726. if (typeof mods === 'string') {
  727. return " " + name + "--" + mods;
  728. }
  729. if (Array.isArray(mods)) {
  730. return mods.reduce(function (ret, item) {
  731. return ret + gen(name, item);
  732. }, '');
  733. }
  734. return Object.keys(mods).reduce(function (ret, key) {
  735. return ret + (mods[key] ? gen(name, key) : '');
  736. }, '');
  737. }
  738. function createBEM(name) {
  739. return function (el, mods) {
  740. if (el && typeof el !== 'string') {
  741. mods = el;
  742. el = '';
  743. }
  744. el = el ? name + "__" + el : name;
  745. return "" + el + gen(el, mods);
  746. };
  747. }
  748. /***/ }),
  749. /***/ 26:
  750. /***/ (function(module, exports, __webpack_require__) {
  751. "use strict";
  752. var _interopRequireDefault = __webpack_require__(1);
  753. exports.__esModule = true;
  754. exports.unifySlots = unifySlots;
  755. exports.createComponent = createComponent;
  756. __webpack_require__(11);
  757. var _ = __webpack_require__(0);
  758. var _string = __webpack_require__(9);
  759. var _slots = __webpack_require__(28);
  760. var _vue = _interopRequireDefault(__webpack_require__(4));
  761. /**
  762. * Create a basic component with common options
  763. */
  764. function install(Vue) {
  765. var name = this.name;
  766. Vue.component(name, this);
  767. Vue.component((0, _string.camelize)("-" + name), this);
  768. } // unify slots & scopedSlots
  769. function unifySlots(context) {
  770. // use data.scopedSlots in lower Vue version
  771. var scopedSlots = context.scopedSlots || context.data.scopedSlots || {};
  772. var slots = context.slots();
  773. Object.keys(slots).forEach(function (key) {
  774. if (!scopedSlots[key]) {
  775. scopedSlots[key] = function () {
  776. return slots[key];
  777. };
  778. }
  779. });
  780. return scopedSlots;
  781. } // should be removed after Vue 3
  782. function transformFunctionComponent(pure) {
  783. return {
  784. functional: true,
  785. props: pure.props,
  786. model: pure.model,
  787. render: function render(h, context) {
  788. return pure(h, context.props, unifySlots(context), context);
  789. }
  790. };
  791. }
  792. function createComponent(name) {
  793. return function (sfc) {
  794. if ((0, _.isFunction)(sfc)) {
  795. sfc = transformFunctionComponent(sfc);
  796. }
  797. if (!sfc.functional) {
  798. sfc.mixins = sfc.mixins || [];
  799. sfc.mixins.push(_slots.SlotsMixin);
  800. }
  801. sfc.name = name;
  802. sfc.install = install;
  803. return sfc;
  804. };
  805. }
  806. /***/ }),
  807. /***/ 27:
  808. /***/ (function(module, exports, __webpack_require__) {
  809. "use strict";
  810. exports.__esModule = true;
  811. exports.default = void 0;
  812. var _default = {
  813. name: '姓名',
  814. tel: '电话',
  815. save: '保存',
  816. confirm: '确认',
  817. cancel: '取消',
  818. delete: '删除',
  819. complete: '完成',
  820. loading: '加载中...',
  821. telEmpty: '请填写电话',
  822. nameEmpty: '请填写姓名',
  823. nameInvalid: '请输入正确的姓名',
  824. confirmDelete: '确定要删除吗',
  825. telInvalid: '请输入正确的手机号',
  826. vanCalendar: {
  827. end: '结束',
  828. start: '开始',
  829. title: '日期选择',
  830. confirm: '确定',
  831. startEnd: '开始/结束',
  832. weekdays: ['日', '一', '二', '三', '四', '五', '六'],
  833. monthTitle: function monthTitle(year, month) {
  834. return year + "\u5E74" + month + "\u6708";
  835. },
  836. rangePrompt: function rangePrompt(maxRange) {
  837. return "\u9009\u62E9\u5929\u6570\u4E0D\u80FD\u8D85\u8FC7 " + maxRange + " \u5929";
  838. }
  839. },
  840. vanCascader: {
  841. select: '请选择'
  842. },
  843. vanContactCard: {
  844. addText: '添加联系人'
  845. },
  846. vanContactList: {
  847. addText: '新建联系人'
  848. },
  849. vanPagination: {
  850. prev: '上一页',
  851. next: '下一页'
  852. },
  853. vanPullRefresh: {
  854. pulling: '下拉即可刷新...',
  855. loosing: '释放即可刷新...'
  856. },
  857. vanSubmitBar: {
  858. label: '合计:'
  859. },
  860. vanCoupon: {
  861. unlimited: '无使用门槛',
  862. discount: function discount(_discount) {
  863. return _discount + "\u6298";
  864. },
  865. condition: function condition(_condition) {
  866. return "\u6EE1" + _condition + "\u5143\u53EF\u7528";
  867. }
  868. },
  869. vanCouponCell: {
  870. title: '优惠券',
  871. tips: '暂无可用',
  872. count: function count(_count) {
  873. return _count + "\u5F20\u53EF\u7528";
  874. }
  875. },
  876. vanCouponList: {
  877. empty: '暂无优惠券',
  878. exchange: '兑换',
  879. close: '不使用优惠券',
  880. enable: '可用',
  881. disabled: '不可用',
  882. placeholder: '请输入优惠码'
  883. },
  884. vanAddressEdit: {
  885. area: '地区',
  886. postal: '邮政编码',
  887. areaEmpty: '请选择地区',
  888. addressEmpty: '请填写详细地址',
  889. postalEmpty: '邮政编码格式不正确',
  890. defaultAddress: '设为默认收货地址',
  891. telPlaceholder: '收货人手机号',
  892. namePlaceholder: '收货人姓名',
  893. areaPlaceholder: '选择省 / 市 / 区'
  894. },
  895. vanAddressEditDetail: {
  896. label: '详细地址',
  897. placeholder: '街道门牌、楼层房间号等信息'
  898. },
  899. vanAddressList: {
  900. add: '新增地址'
  901. }
  902. };
  903. exports.default = _default;
  904. /***/ }),
  905. /***/ 28:
  906. /***/ (function(module, exports, __webpack_require__) {
  907. "use strict";
  908. exports.__esModule = true;
  909. exports.SlotsMixin = void 0;
  910. /**
  911. * Use scopedSlots in Vue 2.6+
  912. * downgrade to slots in lower version
  913. */
  914. var SlotsMixin = {
  915. methods: {
  916. slots: function slots(name, props) {
  917. if (name === void 0) {
  918. name = 'default';
  919. }
  920. var $slots = this.$slots,
  921. $scopedSlots = this.$scopedSlots;
  922. var scopedSlot = $scopedSlots[name];
  923. if (scopedSlot) {
  924. return scopedSlot(props);
  925. }
  926. return $slots[name];
  927. }
  928. }
  929. };
  930. exports.SlotsMixin = SlotsMixin;
  931. /***/ }),
  932. /***/ 29:
  933. /***/ (function(module, exports, __webpack_require__) {
  934. "use strict";
  935. var _interopRequireDefault = __webpack_require__(1);
  936. exports.__esModule = true;
  937. exports.createI18N = createI18N;
  938. var _ = __webpack_require__(0);
  939. var _string = __webpack_require__(9);
  940. var _locale = _interopRequireDefault(__webpack_require__(11));
  941. function createI18N(name) {
  942. var prefix = (0, _string.camelize)(name) + '.';
  943. return function (path) {
  944. var messages = _locale.default.messages();
  945. var message = (0, _.get)(messages, prefix + path) || (0, _.get)(messages, path);
  946. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  947. args[_key - 1] = arguments[_key];
  948. }
  949. return (0, _.isFunction)(message) ? message.apply(void 0, args) : message;
  950. };
  951. }
  952. /***/ }),
  953. /***/ 30:
  954. /***/ (function(module, exports, __webpack_require__) {
  955. "use strict";
  956. exports.__esModule = true;
  957. exports.on = on;
  958. exports.off = off;
  959. exports.stopPropagation = stopPropagation;
  960. exports.preventDefault = preventDefault;
  961. exports.supportsPassive = void 0;
  962. var _ = __webpack_require__(0);
  963. // eslint-disable-next-line import/no-mutable-exports
  964. var supportsPassive = false;
  965. exports.supportsPassive = supportsPassive;
  966. if (!_.isServer) {
  967. try {
  968. var opts = {};
  969. Object.defineProperty(opts, 'passive', {
  970. // eslint-disable-next-line getter-return
  971. get: function get() {
  972. /* istanbul ignore next */
  973. exports.supportsPassive = supportsPassive = true;
  974. }
  975. });
  976. window.addEventListener('test-passive', null, opts); // eslint-disable-next-line no-empty
  977. } catch (e) {}
  978. }
  979. function on(target, event, handler, passive) {
  980. if (passive === void 0) {
  981. passive = false;
  982. }
  983. if (!_.isServer) {
  984. target.addEventListener(event, handler, supportsPassive ? {
  985. capture: false,
  986. passive: passive
  987. } : false);
  988. }
  989. }
  990. function off(target, event, handler) {
  991. if (!_.isServer) {
  992. target.removeEventListener(event, handler);
  993. }
  994. }
  995. function stopPropagation(event) {
  996. event.stopPropagation();
  997. }
  998. function preventDefault(event, isStopPropagation) {
  999. /* istanbul ignore else */
  1000. if (typeof event.cancelable !== 'boolean' || event.cancelable) {
  1001. event.preventDefault();
  1002. }
  1003. if (isStopPropagation) {
  1004. stopPropagation(event);
  1005. }
  1006. }
  1007. /***/ }),
  1008. /***/ 35:
  1009. /***/ (function(module, exports, __webpack_require__) {
  1010. "use strict";
  1011. var _interopRequireDefault = __webpack_require__(1);
  1012. exports.__esModule = true;
  1013. exports.default = void 0;
  1014. var _babelHelperVueJsxMergeProps = _interopRequireDefault(__webpack_require__(16));
  1015. var _utils = __webpack_require__(0);
  1016. var _functional = __webpack_require__(14);
  1017. var _info = _interopRequireDefault(__webpack_require__(37));
  1018. // Utils
  1019. // Components
  1020. var _createNamespace = (0, _utils.createNamespace)('icon'),
  1021. createComponent = _createNamespace[0],
  1022. bem = _createNamespace[1];
  1023. function isImage(name) {
  1024. return name ? name.indexOf('/') !== -1 : false;
  1025. } // compatible with legacy usage, should be removed in next major version
  1026. var LEGACY_MAP = {
  1027. medel: 'medal',
  1028. 'medel-o': 'medal-o',
  1029. 'calender-o': 'calendar-o'
  1030. };
  1031. function correctName(name) {
  1032. return name && LEGACY_MAP[name] || name;
  1033. }
  1034. function Icon(h, props, slots, ctx) {
  1035. var _props$badge;
  1036. var name = correctName(props.name);
  1037. var imageIcon = isImage(name);
  1038. if (false) {}
  1039. return h(props.tag, (0, _babelHelperVueJsxMergeProps.default)([{
  1040. "class": [props.classPrefix, imageIcon ? '' : props.classPrefix + "-" + name],
  1041. "style": {
  1042. color: props.color,
  1043. fontSize: (0, _utils.addUnit)(props.size)
  1044. }
  1045. }, (0, _functional.inherit)(ctx, true)]), [slots.default && slots.default(), imageIcon && h("img", {
  1046. "class": bem('image'),
  1047. "attrs": {
  1048. "src": name
  1049. }
  1050. }), h(_info.default, {
  1051. "attrs": {
  1052. "dot": props.dot,
  1053. "info": (_props$badge = props.badge) != null ? _props$badge : props.info
  1054. }
  1055. })]);
  1056. }
  1057. Icon.props = {
  1058. dot: Boolean,
  1059. name: String,
  1060. size: [Number, String],
  1061. // @deprecated
  1062. // should be removed in next major version
  1063. info: [Number, String],
  1064. badge: [Number, String],
  1065. color: String,
  1066. tag: {
  1067. type: String,
  1068. default: 'i'
  1069. },
  1070. classPrefix: {
  1071. type: String,
  1072. default: bem()
  1073. }
  1074. };
  1075. var _default = createComponent(Icon);
  1076. exports.default = _default;
  1077. /***/ }),
  1078. /***/ 37:
  1079. /***/ (function(module, exports, __webpack_require__) {
  1080. "use strict";
  1081. var _interopRequireDefault = __webpack_require__(1);
  1082. exports.__esModule = true;
  1083. exports.default = void 0;
  1084. var _babelHelperVueJsxMergeProps = _interopRequireDefault(__webpack_require__(16));
  1085. var _utils = __webpack_require__(0);
  1086. var _functional = __webpack_require__(14);
  1087. // Utils
  1088. var _createNamespace = (0, _utils.createNamespace)('info'),
  1089. createComponent = _createNamespace[0],
  1090. bem = _createNamespace[1];
  1091. function Info(h, props, slots, ctx) {
  1092. var dot = props.dot,
  1093. info = props.info;
  1094. var showInfo = (0, _utils.isDef)(info) && info !== '';
  1095. if (!dot && !showInfo) {
  1096. return;
  1097. }
  1098. return h("div", (0, _babelHelperVueJsxMergeProps.default)([{
  1099. "class": bem({
  1100. dot: dot
  1101. })
  1102. }, (0, _functional.inherit)(ctx, true)]), [dot ? '' : props.info]);
  1103. }
  1104. Info.props = {
  1105. dot: Boolean,
  1106. info: [Number, String]
  1107. };
  1108. var _default = createComponent(Info);
  1109. exports.default = _default;
  1110. /***/ }),
  1111. /***/ 4:
  1112. /***/ (function(module, exports) {
  1113. module.exports = require("vue");
  1114. /***/ }),
  1115. /***/ 41:
  1116. /***/ (function(module, exports, __webpack_require__) {
  1117. var content = __webpack_require__(42);
  1118. if(typeof content === 'string') content = [[module.i, content, '']];
  1119. var transform;
  1120. var insertInto;
  1121. var options = {"hmr":true}
  1122. options.transform = transform
  1123. options.insertInto = undefined;
  1124. var update = __webpack_require__(6)(content, options);
  1125. if(content.locals) module.exports = content.locals;
  1126. if(false) {}
  1127. /***/ }),
  1128. /***/ 42:
  1129. /***/ (function(module, exports, __webpack_require__) {
  1130. exports = module.exports = __webpack_require__(5)(false);
  1131. // Module
  1132. 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%}", ""]);
  1133. /***/ }),
  1134. /***/ 45:
  1135. /***/ (function(module, exports, __webpack_require__) {
  1136. var content = __webpack_require__(46);
  1137. if(typeof content === 'string') content = [[module.i, content, '']];
  1138. var transform;
  1139. var insertInto;
  1140. var options = {"hmr":true}
  1141. options.transform = transform
  1142. options.insertInto = undefined;
  1143. var update = __webpack_require__(6)(content, options);
  1144. if(content.locals) module.exports = content.locals;
  1145. if(false) {}
  1146. /***/ }),
  1147. /***/ 46:
  1148. /***/ (function(module, exports, __webpack_require__) {
  1149. exports = module.exports = __webpack_require__(5)(false);
  1150. // Module
  1151. 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
  1152. /***/ }),
  1153. /***/ 466:
  1154. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1155. "use strict";
  1156. __webpack_require__.r(__webpack_exports__);
  1157. /* harmony import */ var _tisdesign_m_lib_popover__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(234);
  1158. /* harmony import */ var _tisdesign_m_lib_popover__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tisdesign_m_lib_popover__WEBPACK_IMPORTED_MODULE_0__);
  1159. /* harmony import */ var _tisdesign_m_lib_popover_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(467);
  1160. /* harmony import */ var _tisdesign_m_lib_popover_style__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_tisdesign_m_lib_popover_style__WEBPACK_IMPORTED_MODULE_1__);
  1161. _tisdesign_m_lib_popover__WEBPACK_IMPORTED_MODULE_0___default.a.name = 'm-popover';
  1162. /* harmony default export */ __webpack_exports__["default"] = (_tisdesign_m_lib_popover__WEBPACK_IMPORTED_MODULE_0___default.a);
  1163. /***/ }),
  1164. /***/ 467:
  1165. /***/ (function(module, exports, __webpack_require__) {
  1166. __webpack_require__(22);
  1167. __webpack_require__(79);
  1168. __webpack_require__(41);
  1169. __webpack_require__(45);
  1170. __webpack_require__(82);
  1171. __webpack_require__(468);
  1172. /***/ }),
  1173. /***/ 468:
  1174. /***/ (function(module, exports, __webpack_require__) {
  1175. var content = __webpack_require__(469);
  1176. if(typeof content === 'string') content = [[module.i, content, '']];
  1177. var transform;
  1178. var insertInto;
  1179. var options = {"hmr":true}
  1180. options.transform = transform
  1181. options.insertInto = undefined;
  1182. var update = __webpack_require__(6)(content, options);
  1183. if(content.locals) module.exports = content.locals;
  1184. if(false) {}
  1185. /***/ }),
  1186. /***/ 469:
  1187. /***/ (function(module, exports, __webpack_require__) {
  1188. exports = module.exports = __webpack_require__(5)(false);
  1189. // Module
  1190. exports.push([module.i, ".van-popover{position:absolute;overflow:visible;background-color:transparent;-webkit-transition:opacity .15s,-webkit-transform .15s;transition:opacity .15s,-webkit-transform .15s;transition:opacity .15s,transform .15s;transition:opacity .15s,transform .15s,-webkit-transform .15s}.van-popover__wrapper{display:inline-block}.van-popover__arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid;border-width:6px}.van-popover__content{overflow:hidden;border-radius:8px}.van-popover__action{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;box-sizing:border-box;width:128px;height:44px;padding:0 16px;font-size:14px;line-height:20px;cursor:pointer}.van-popover__action:last-child .van-popover__action-text::after{display:none}.van-popover__action-text{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-flex:1;-webkit-flex:1;flex:1;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;height:100%}.van-popover__action-icon{margin-right:8px;font-size:20px}.van-popover__action--with-icon .van-popover__action-text{-webkit-box-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start}.van-popover[data-popper-placement^=top] .van-popover__arrow{bottom:0;border-top-color:currentColor;border-bottom-width:0;-webkit-transform:translate(-50%,100%);transform:translate(-50%,100%)}.van-popover[data-popper-placement=top]{-webkit-transform-origin:50% 100%;transform-origin:50% 100%}.van-popover[data-popper-placement=top] .van-popover__arrow{left:50%}.van-popover[data-popper-placement=top-start]{-webkit-transform-origin:0 100%;transform-origin:0 100%}.van-popover[data-popper-placement=top-start] .van-popover__arrow{left:16px}.van-popover[data-popper-placement=top-end]{-webkit-transform-origin:100% 100%;transform-origin:100% 100%}.van-popover[data-popper-placement=top-end] .van-popover__arrow{right:16px}.van-popover[data-popper-placement^=left] .van-popover__arrow{right:0;border-right-width:0;border-left-color:currentColor;-webkit-transform:translate(100%,-50%);transform:translate(100%,-50%)}.van-popover[data-popper-placement=left]{-webkit-transform-origin:100% 50%;transform-origin:100% 50%}.van-popover[data-popper-placement=left] .van-popover__arrow{top:50%}.van-popover[data-popper-placement=left-start]{-webkit-transform-origin:100% 0;transform-origin:100% 0}.van-popover[data-popper-placement=left-start] .van-popover__arrow{top:16px}.van-popover[data-popper-placement=left-end]{-webkit-transform-origin:100% 100%;transform-origin:100% 100%}.van-popover[data-popper-placement=left-end] .van-popover__arrow{bottom:16px}.van-popover[data-popper-placement^=right] .van-popover__arrow{left:0;border-right-color:currentColor;border-left-width:0;-webkit-transform:translate(-100%,-50%);transform:translate(-100%,-50%)}.van-popover[data-popper-placement=right]{-webkit-transform-origin:0 50%;transform-origin:0 50%}.van-popover[data-popper-placement=right] .van-popover__arrow{top:50%}.van-popover[data-popper-placement=right-start]{-webkit-transform-origin:0 0;transform-origin:0 0}.van-popover[data-popper-placement=right-start] .van-popover__arrow{top:16px}.van-popover[data-popper-placement=right-end]{-webkit-transform-origin:0 100%;transform-origin:0 100%}.van-popover[data-popper-placement=right-end] .van-popover__arrow{bottom:16px}.van-popover[data-popper-placement^=bottom] .van-popover__arrow{top:0;border-top-width:0;border-bottom-color:currentColor;-webkit-transform:translate(-50%,-100%);transform:translate(-50%,-100%)}.van-popover[data-popper-placement=bottom]{-webkit-transform-origin:50% 0;transform-origin:50% 0}.van-popover[data-popper-placement=bottom] .van-popover__arrow{left:50%}.van-popover[data-popper-placement=bottom-start]{-webkit-transform-origin:0 0;transform-origin:0 0}.van-popover[data-popper-placement=bottom-start] .van-popover__arrow{left:16px}.van-popover[data-popper-placement=bottom
  1191. /***/ }),
  1192. /***/ 470:
  1193. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1194. "use strict";
  1195. __webpack_require__.r(__webpack_exports__);
  1196. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createPopper", function() { return createPopper; });
  1197. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "offsetModifier", function() { return offset$1; });
  1198. function _extends() {
  1199. _extends = Object.assign || function (target) {
  1200. for (var i = 1; i < arguments.length; i++) {
  1201. var source = arguments[i];
  1202. for (var key in source) {
  1203. if (Object.prototype.hasOwnProperty.call(source, key)) {
  1204. target[key] = source[key];
  1205. }
  1206. }
  1207. }
  1208. return target;
  1209. };
  1210. return _extends.apply(this, arguments);
  1211. }
  1212. function getBoundingClientRect(element) {
  1213. var rect = element.getBoundingClientRect();
  1214. return {
  1215. width: rect.width,
  1216. height: rect.height,
  1217. top: rect.top,
  1218. right: rect.right,
  1219. bottom: rect.bottom,
  1220. left: rect.left,
  1221. x: rect.left,
  1222. y: rect.top
  1223. };
  1224. }
  1225. /*:: import type { Window } from '../types'; */
  1226. /*:: declare function getWindow(node: Node | Window): Window; */
  1227. function getWindow(node) {
  1228. if (node.toString() !== '[object Window]') {
  1229. var ownerDocument = node.ownerDocument;
  1230. return ownerDocument ? ownerDocument.defaultView || window : window;
  1231. }
  1232. return node;
  1233. }
  1234. function getWindowScroll(node) {
  1235. var win = getWindow(node);
  1236. var scrollLeft = win.pageXOffset;
  1237. var scrollTop = win.pageYOffset;
  1238. return {
  1239. scrollLeft: scrollLeft,
  1240. scrollTop: scrollTop
  1241. };
  1242. }
  1243. /*:: declare function isElement(node: mixed): boolean %checks(node instanceof
  1244. Element); */
  1245. function isElement(node) {
  1246. var OwnElement = getWindow(node).Element;
  1247. return node instanceof OwnElement || node instanceof Element;
  1248. }
  1249. /*:: declare function isHTMLElement(node: mixed): boolean %checks(node instanceof
  1250. HTMLElement); */
  1251. function isHTMLElement(node) {
  1252. var OwnElement = getWindow(node).HTMLElement;
  1253. return node instanceof OwnElement || node instanceof HTMLElement;
  1254. }
  1255. function getHTMLElementScroll(element) {
  1256. return {
  1257. scrollLeft: element.scrollLeft,
  1258. scrollTop: element.scrollTop
  1259. };
  1260. }
  1261. function getNodeScroll(node) {
  1262. if (node === getWindow(node) || !isHTMLElement(node)) {
  1263. return getWindowScroll(node);
  1264. } else {
  1265. return getHTMLElementScroll(node);
  1266. }
  1267. }
  1268. function getNodeName(element) {
  1269. return element ? (element.nodeName || '').toLowerCase() : null;
  1270. }
  1271. function getDocumentElement(element) {
  1272. // $FlowFixMe: assume body is always available
  1273. return ((isElement(element) ? element.ownerDocument : element.document) || window.document).documentElement;
  1274. }
  1275. function getWindowScrollBarX(element) {
  1276. // If <html> has a CSS width greater than the viewport, then this will be
  1277. // incorrect for RTL.
  1278. // Popper 1 is broken in this case and never had a bug report so let's assume
  1279. // it's not an issue. I don't think anyone ever specifies width on <html>
  1280. // anyway.
  1281. // Browsers where the left scrollbar doesn't cause an issue report `0` for
  1282. // this (e.g. Edge 2019, IE11, Safari)
  1283. return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;
  1284. }
  1285. function getComputedStyle(element) {
  1286. return getWindow(element).getComputedStyle(element);
  1287. }
  1288. function isScrollParent(element) {
  1289. // Firefox wants us to check `-x` and `-y` variations as well
  1290. var _getComputedStyle = getComputedStyle(element),
  1291. overflow = _getComputedStyle.overflow,
  1292. overflowX = _getComputedStyle.overflowX,
  1293. overflowY = _getComputedStyle.overflowY;
  1294. return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
  1295. }
  1296. // Composite means it takes into account transforms as well as layout.
  1297. function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
  1298. if (isFixed === void 0) {
  1299. isFixed = false;
  1300. }
  1301. var documentElement = getDocumentElement(offsetParent);
  1302. var rect = getBoundingClientRect(elementOrVirtualElement);
  1303. var isOffsetParentAnElement = isHTMLElement(offsetParent);
  1304. var scroll = {
  1305. scrollLeft: 0,
  1306. scrollTop: 0
  1307. };
  1308. var offsets = {
  1309. x: 0,
  1310. y: 0
  1311. };
  1312. if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
  1313. if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078
  1314. isScrollParent(documentElement)) {
  1315. scroll = getNodeScroll(offsetParent);
  1316. }
  1317. if (isHTMLElement(offsetParent)) {
  1318. offsets = getBoundingClientRect(offsetParent);
  1319. offsets.x += offsetParent.clientLeft;
  1320. offsets.y += offsetParent.clientTop;
  1321. } else if (documentElement) {
  1322. offsets.x = getWindowScrollBarX(documentElement);
  1323. }
  1324. }
  1325. return {
  1326. x: rect.left + scroll.scrollLeft - offsets.x,
  1327. y: rect.top + scroll.scrollTop - offsets.y,
  1328. width: rect.width,
  1329. height: rect.height
  1330. };
  1331. }
  1332. // Returns the layout rect of an element relative to its offsetParent. Layout
  1333. // means it doesn't take into account transforms.
  1334. function getLayoutRect(element) {
  1335. return {
  1336. x: element.offsetLeft,
  1337. y: element.offsetTop,
  1338. width: element.offsetWidth,
  1339. height: element.offsetHeight
  1340. };
  1341. }
  1342. function getParentNode(element) {
  1343. if (getNodeName(element) === 'html') {
  1344. return element;
  1345. }
  1346. return (// $FlowFixMe: this is a quicker (but less type safe) way to save quite some bytes from the bundle
  1347. element.assignedSlot || // step into the shadow DOM of the parent of a slotted node
  1348. element.parentNode || // DOM Element detected
  1349. // $FlowFixMe: need a better way to handle this...
  1350. element.host || // ShadowRoot detected
  1351. // $FlowFixMe: HTMLElement is a Node
  1352. getDocumentElement(element) // fallback
  1353. );
  1354. }
  1355. function getScrollParent(node) {
  1356. if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {
  1357. // $FlowFixMe: assume body is always available
  1358. return node.ownerDocument.body;
  1359. }
  1360. if (isHTMLElement(node) && isScrollParent(node)) {
  1361. return node;
  1362. }
  1363. return getScrollParent(getParentNode(node));
  1364. }
  1365. /*
  1366. given a DOM element, return the list of all scroll parents, up the list of ancesors
  1367. until we get to the top window object. This list is what we attach scroll listeners
  1368. to, because if any of these parent elements scroll, we'll need to re-calculate the
  1369. reference element's position.
  1370. */
  1371. function listScrollParents(element, list) {
  1372. if (list === void 0) {
  1373. list = [];
  1374. }
  1375. var scrollParent = getScrollParent(element);
  1376. var isBody = getNodeName(scrollParent) === 'body';
  1377. var win = getWindow(scrollParent);
  1378. var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;
  1379. var updatedList = list.concat(target);
  1380. return isBody ? updatedList : // $FlowFixMe: isBody tells us target will be an HTMLElement here
  1381. updatedList.concat(listScrollParents(getParentNode(target)));
  1382. }
  1383. function isTableElement(element) {
  1384. return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;
  1385. }
  1386. function getTrueOffsetParent(element) {
  1387. if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837
  1388. getComputedStyle(element).position === 'fixed') {
  1389. return null;
  1390. }
  1391. var offsetParent = element.offsetParent;
  1392. if (offsetParent) {
  1393. var html = getDocumentElement(offsetParent);
  1394. if (getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static' && getComputedStyle(html).position !== 'static') {
  1395. return html;
  1396. }
  1397. }
  1398. return offsetParent;
  1399. } // `.offsetParent` reports `null` for fixed elements, while absolute elements
  1400. // return the containing block
  1401. function getContainingBlock(element) {
  1402. var currentNode = getParentNode(element);
  1403. while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {
  1404. var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that
  1405. // create a containing block.
  1406. if (css.transform !== 'none' || css.perspective !== 'none' || css.willChange && css.willChange !== 'auto') {
  1407. return currentNode;
  1408. } else {
  1409. currentNode = currentNode.parentNode;
  1410. }
  1411. }
  1412. return null;
  1413. } // Gets the closest ancestor positioned element. Handles some edge cases,
  1414. // such as table ancestors and cross browser bugs.
  1415. function getOffsetParent(element) {
  1416. var window = getWindow(element);
  1417. var offsetParent = getTrueOffsetParent(element);
  1418. while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {
  1419. offsetParent = getTrueOffsetParent(offsetParent);
  1420. }
  1421. if (offsetParent && getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static') {
  1422. return window;
  1423. }
  1424. return offsetParent || getContainingBlock(element) || window;
  1425. }
  1426. var top = 'top';
  1427. var bottom = 'bottom';
  1428. var right = 'right';
  1429. var left = 'left';
  1430. var auto = 'auto';
  1431. var basePlacements = [top, bottom, right, left];
  1432. var start = 'start';
  1433. var end = 'end';
  1434. var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {
  1435. return acc.concat([placement, placement + "-" + start, placement + "-" + end]);
  1436. }, []); // modifiers that need to read the DOM
  1437. var beforeRead = 'beforeRead';
  1438. var read = 'read';
  1439. var afterRead = 'afterRead'; // pure-logic modifiers
  1440. var beforeMain = 'beforeMain';
  1441. var main = 'main';
  1442. var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)
  1443. var beforeWrite = 'beforeWrite';
  1444. var write = 'write';
  1445. var afterWrite = 'afterWrite';
  1446. var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];
  1447. function order(modifiers) {
  1448. var map = new Map();
  1449. var visited = new Set();
  1450. var result = [];
  1451. modifiers.forEach(function (modifier) {
  1452. map.set(modifier.name, modifier);
  1453. }); // On visiting object, check for its dependencies and visit them recursively
  1454. function sort(modifier) {
  1455. visited.add(modifier.name);
  1456. var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);
  1457. requires.forEach(function (dep) {
  1458. if (!visited.has(dep)) {
  1459. var depModifier = map.get(dep);
  1460. if (depModifier) {
  1461. sort(depModifier);
  1462. }
  1463. }
  1464. });
  1465. result.push(modifier);
  1466. }
  1467. modifiers.forEach(function (modifier) {
  1468. if (!visited.has(modifier.name)) {
  1469. // check for visited object
  1470. sort(modifier);
  1471. }
  1472. });
  1473. return result;
  1474. }
  1475. function orderModifiers(modifiers) {
  1476. // order based on dependencies
  1477. var orderedModifiers = order(modifiers); // order based on phase
  1478. return modifierPhases.reduce(function (acc, phase) {
  1479. return acc.concat(orderedModifiers.filter(function (modifier) {
  1480. return modifier.phase === phase;
  1481. }));
  1482. }, []);
  1483. }
  1484. function debounce(fn) {
  1485. var pending;
  1486. return function () {
  1487. if (!pending) {
  1488. pending = new Promise(function (resolve) {
  1489. Promise.resolve().then(function () {
  1490. pending = undefined;
  1491. resolve(fn());
  1492. });
  1493. });
  1494. }
  1495. return pending;
  1496. };
  1497. }
  1498. function format(str) {
  1499. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  1500. args[_key - 1] = arguments[_key];
  1501. }
  1502. return [].concat(args).reduce(function (p, c) {
  1503. return p.replace(/%s/, c);
  1504. }, str);
  1505. }
  1506. var INVALID_MODIFIER_ERROR = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s';
  1507. var MISSING_DEPENDENCY_ERROR = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available';
  1508. var VALID_PROPERTIES = ['name', 'enabled', 'phase', 'fn', 'effect', 'requires', 'options'];
  1509. function validateModifiers(modifiers) {
  1510. modifiers.forEach(function (modifier) {
  1511. Object.keys(modifier).forEach(function (key) {
  1512. switch (key) {
  1513. case 'name':
  1514. if (typeof modifier.name !== 'string') {
  1515. console.error(format(INVALID_MODIFIER_ERROR, String(modifier.name), '"name"', '"string"', "\"" + String(modifier.name) + "\""));
  1516. }
  1517. break;
  1518. case 'enabled':
  1519. if (typeof modifier.enabled !== 'boolean') {
  1520. console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"enabled"', '"boolean"', "\"" + String(modifier.enabled) + "\""));
  1521. }
  1522. case 'phase':
  1523. if (modifierPhases.indexOf(modifier.phase) < 0) {
  1524. console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"phase"', "either " + modifierPhases.join(', '), "\"" + String(modifier.phase) + "\""));
  1525. }
  1526. break;
  1527. case 'fn':
  1528. if (typeof modifier.fn !== 'function') {
  1529. console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"fn"', '"function"', "\"" + String(modifier.fn) + "\""));
  1530. }
  1531. break;
  1532. case 'effect':
  1533. if (typeof modifier.effect !== 'function') {
  1534. console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"effect"', '"function"', "\"" + String(modifier.fn) + "\""));
  1535. }
  1536. break;
  1537. case 'requires':
  1538. if (!Array.isArray(modifier.requires)) {
  1539. console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requires"', '"array"', "\"" + String(modifier.requires) + "\""));
  1540. }
  1541. break;
  1542. case 'requiresIfExists':
  1543. if (!Array.isArray(modifier.requiresIfExists)) {
  1544. console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requiresIfExists"', '"array"', "\"" + String(modifier.requiresIfExists) + "\""));
  1545. }
  1546. break;
  1547. case 'options':
  1548. case 'data':
  1549. break;
  1550. default:
  1551. console.error("PopperJS: an invalid property has been provided to the \"" + modifier.name + "\" modifier, valid properties are " + VALID_PROPERTIES.map(function (s) {
  1552. return "\"" + s + "\"";
  1553. }).join(', ') + "; but \"" + key + "\" was provided.");
  1554. }
  1555. modifier.requires && modifier.requires.forEach(function (requirement) {
  1556. if (modifiers.find(function (mod) {
  1557. return mod.name === requirement;
  1558. }) == null) {
  1559. console.error(format(MISSING_DEPENDENCY_ERROR, String(modifier.name), requirement, requirement));
  1560. }
  1561. });
  1562. });
  1563. });
  1564. }
  1565. function uniqueBy(arr, fn) {
  1566. var identifiers = new Set();
  1567. return arr.filter(function (item) {
  1568. var identifier = fn(item);
  1569. if (!identifiers.has(identifier)) {
  1570. identifiers.add(identifier);
  1571. return true;
  1572. }
  1573. });
  1574. }
  1575. function getBasePlacement(placement) {
  1576. return placement.split('-')[0];
  1577. }
  1578. function mergeByName(modifiers) {
  1579. var merged = modifiers.reduce(function (merged, current) {
  1580. var existing = merged[current.name];
  1581. merged[current.name] = existing ? _extends(_extends(_extends({}, existing), current), {}, {
  1582. options: _extends(_extends({}, existing.options), current.options),
  1583. data: _extends(_extends({}, existing.data), current.data)
  1584. }) : current;
  1585. return merged;
  1586. }, {}); // IE11 does not support Object.values
  1587. return Object.keys(merged).map(function (key) {
  1588. return merged[key];
  1589. });
  1590. }
  1591. function getVariation(placement) {
  1592. return placement.split('-')[1];
  1593. }
  1594. function getMainAxisFromPlacement(placement) {
  1595. return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
  1596. }
  1597. function computeOffsets(_ref) {
  1598. var reference = _ref.reference,
  1599. element = _ref.element,
  1600. placement = _ref.placement;
  1601. var basePlacement = placement ? getBasePlacement(placement) : null;
  1602. var variation = placement ? getVariation(placement) : null;
  1603. var commonX = reference.x + reference.width / 2 - element.width / 2;
  1604. var commonY = reference.y + reference.height / 2 - element.height / 2;
  1605. var offsets;
  1606. switch (basePlacement) {
  1607. case top:
  1608. offsets = {
  1609. x: commonX,
  1610. y: reference.y - element.height
  1611. };
  1612. break;
  1613. case bottom:
  1614. offsets = {
  1615. x: commonX,
  1616. y: reference.y + reference.height
  1617. };
  1618. break;
  1619. case right:
  1620. offsets = {
  1621. x: reference.x + reference.width,
  1622. y: commonY
  1623. };
  1624. break;
  1625. case left:
  1626. offsets = {
  1627. x: reference.x - element.width,
  1628. y: commonY
  1629. };
  1630. break;
  1631. default:
  1632. offsets = {
  1633. x: reference.x,
  1634. y: reference.y
  1635. };
  1636. }
  1637. var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;
  1638. if (mainAxis != null) {
  1639. var len = mainAxis === 'y' ? 'height' : 'width';
  1640. switch (variation) {
  1641. case start:
  1642. offsets[mainAxis] = Math.floor(offsets[mainAxis]) - Math.floor(reference[len] / 2 - element[len] / 2);
  1643. break;
  1644. case end:
  1645. offsets[mainAxis] = Math.floor(offsets[mainAxis]) + Math.ceil(reference[len] / 2 - element[len] / 2);
  1646. break;
  1647. }
  1648. }
  1649. return offsets;
  1650. }
  1651. var INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';
  1652. var INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';
  1653. var DEFAULT_OPTIONS = {
  1654. placement: 'bottom',
  1655. modifiers: [],
  1656. strategy: 'absolute'
  1657. };
  1658. function areValidElements() {
  1659. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  1660. args[_key] = arguments[_key];
  1661. }
  1662. return !args.some(function (element) {
  1663. return !(element && typeof element.getBoundingClientRect === 'function');
  1664. });
  1665. }
  1666. function popperGenerator(generatorOptions) {
  1667. if (generatorOptions === void 0) {
  1668. generatorOptions = {};
  1669. }
  1670. var _generatorOptions = generatorOptions,
  1671. _generatorOptions$def = _generatorOptions.defaultModifiers,
  1672. defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,
  1673. _generatorOptions$def2 = _generatorOptions.defaultOptions,
  1674. defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;
  1675. return function createPopper(reference, popper, options) {
  1676. if (options === void 0) {
  1677. options = defaultOptions;
  1678. }
  1679. var state = {
  1680. placement: 'bottom',
  1681. orderedModifiers: [],
  1682. options: _extends(_extends({}, DEFAULT_OPTIONS), defaultOptions),
  1683. modifiersData: {},
  1684. elements: {
  1685. reference: reference,
  1686. popper: popper
  1687. },
  1688. attributes: {},
  1689. styles: {}
  1690. };
  1691. var effectCleanupFns = [];
  1692. var isDestroyed = false;
  1693. var instance = {
  1694. state: state,
  1695. setOptions: function setOptions(options) {
  1696. cleanupModifierEffects();
  1697. state.options = _extends(_extends(_extends({}, defaultOptions), state.options), options);
  1698. state.scrollParents = {
  1699. reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],
  1700. popper: listScrollParents(popper)
  1701. }; // Orders the modifiers based on their dependencies and `phase`
  1702. // properties
  1703. var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers
  1704. state.orderedModifiers = orderedModifiers.filter(function (m) {
  1705. return m.enabled;
  1706. }); // Validate the provided modifiers so that the consumer will get warned
  1707. // if one of the modifiers is invalid for any reason
  1708. if (false) { var _getComputedStyle, marginTop, marginRight, marginBottom, marginLeft, flipModifier, modifiers; }
  1709. runModifierEffects();
  1710. return instance.update();
  1711. },
  1712. // Sync update – it will always be executed, even if not necessary. This
  1713. // is useful for low frequency updates where sync behavior simplifies the
  1714. // logic.
  1715. // For high frequency updates (e.g. `resize` and `scroll` events), always
  1716. // prefer the async Popper#update method
  1717. forceUpdate: function forceUpdate() {
  1718. if (isDestroyed) {
  1719. return;
  1720. }
  1721. var _state$elements = state.elements,
  1722. reference = _state$elements.reference,
  1723. popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements
  1724. // anymore
  1725. if (!areValidElements(reference, popper)) {
  1726. if (false) {}
  1727. return;
  1728. } // Store the reference and popper rects to be read by modifiers
  1729. state.rects = {
  1730. reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),
  1731. popper: getLayoutRect(popper)
  1732. }; // Modifiers have the ability to reset the current update cycle. The
  1733. // most common use case for this is the `flip` modifier changing the
  1734. // placement, which then needs to re-run all the modifiers, because the
  1735. // logic was previously ran for the previous placement and is therefore
  1736. // stale/incorrect
  1737. state.reset = false;
  1738. state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier
  1739. // is filled with the initial data specified by the modifier. This means
  1740. // it doesn't persist and is fresh on each update.
  1741. // To ensure persistent data, use `${name}#persistent`
  1742. state.orderedModifiers.forEach(function (modifier) {
  1743. return state.modifiersData[modifier.name] = _extends({}, modifier.data);
  1744. });
  1745. var __debug_loops__ = 0;
  1746. for (var index = 0; index < state.orderedModifiers.length; index++) {
  1747. if (false) {}
  1748. if (state.reset === true) {
  1749. state.reset = false;
  1750. index = -1;
  1751. continue;
  1752. }
  1753. var _state$orderedModifie = state.orderedModifiers[index],
  1754. fn = _state$orderedModifie.fn,
  1755. _state$orderedModifie2 = _state$orderedModifie.options,
  1756. _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,
  1757. name = _state$orderedModifie.name;
  1758. if (typeof fn === 'function') {
  1759. state = fn({
  1760. state: state,
  1761. options: _options,
  1762. name: name,
  1763. instance: instance
  1764. }) || state;
  1765. }
  1766. }
  1767. },
  1768. // Async and optimistically optimized update – it will not be executed if
  1769. // not necessary (debounced to run at most once-per-tick)
  1770. update: debounce(function () {
  1771. return new Promise(function (resolve) {
  1772. instance.forceUpdate();
  1773. resolve(state);
  1774. });
  1775. }),
  1776. destroy: function destroy() {
  1777. cleanupModifierEffects();
  1778. isDestroyed = true;
  1779. }
  1780. };
  1781. if (!areValidElements(reference, popper)) {
  1782. if (false) {}
  1783. return instance;
  1784. }
  1785. instance.setOptions(options).then(function (state) {
  1786. if (!isDestroyed && options.onFirstUpdate) {
  1787. options.onFirstUpdate(state);
  1788. }
  1789. }); // Modifiers have the ability to execute arbitrary code before the first
  1790. // update cycle runs. They will be executed in the same order as the update
  1791. // cycle. This is useful when a modifier adds some persistent data that
  1792. // other modifiers need to use, but the modifier is run after the dependent
  1793. // one.
  1794. function runModifierEffects() {
  1795. state.orderedModifiers.forEach(function (_ref3) {
  1796. var name = _ref3.name,
  1797. _ref3$options = _ref3.options,
  1798. options = _ref3$options === void 0 ? {} : _ref3$options,
  1799. effect = _ref3.effect;
  1800. if (typeof effect === 'function') {
  1801. var cleanupFn = effect({
  1802. state: state,
  1803. name: name,
  1804. instance: instance,
  1805. options: options
  1806. });
  1807. var noopFn = function noopFn() {};
  1808. effectCleanupFns.push(cleanupFn || noopFn);
  1809. }
  1810. });
  1811. }
  1812. function cleanupModifierEffects() {
  1813. effectCleanupFns.forEach(function (fn) {
  1814. return fn();
  1815. });
  1816. effectCleanupFns = [];
  1817. }
  1818. return instance;
  1819. };
  1820. }
  1821. var passive = {
  1822. passive: true
  1823. };
  1824. function effect(_ref) {
  1825. var state = _ref.state,
  1826. instance = _ref.instance,
  1827. options = _ref.options;
  1828. var _options$scroll = options.scroll,
  1829. scroll = _options$scroll === void 0 ? true : _options$scroll,
  1830. _options$resize = options.resize,
  1831. resize = _options$resize === void 0 ? true : _options$resize;
  1832. var window = getWindow(state.elements.popper);
  1833. var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);
  1834. if (scroll) {
  1835. scrollParents.forEach(function (scrollParent) {
  1836. scrollParent.addEventListener('scroll', instance.update, passive);
  1837. });
  1838. }
  1839. if (resize) {
  1840. window.addEventListener('resize', instance.update, passive);
  1841. }
  1842. return function () {
  1843. if (scroll) {
  1844. scrollParents.forEach(function (scrollParent) {
  1845. scrollParent.removeEventListener('scroll', instance.update, passive);
  1846. });
  1847. }
  1848. if (resize) {
  1849. window.removeEventListener('resize', instance.update, passive);
  1850. }
  1851. };
  1852. } // eslint-disable-next-line import/no-unused-modules
  1853. var eventListeners = {
  1854. name: 'eventListeners',
  1855. enabled: true,
  1856. phase: 'write',
  1857. fn: function fn() {},
  1858. effect: effect,
  1859. data: {}
  1860. };
  1861. function popperOffsets(_ref) {
  1862. var state = _ref.state,
  1863. name = _ref.name; // Offsets are the actual position the popper needs to have to be
  1864. // properly positioned near its reference element
  1865. // This is the most basic placement, and will be adjusted by
  1866. // the modifiers in the next step
  1867. state.modifiersData[name] = computeOffsets({
  1868. reference: state.rects.reference,
  1869. element: state.rects.popper,
  1870. strategy: 'absolute',
  1871. placement: state.placement
  1872. });
  1873. } // eslint-disable-next-line import/no-unused-modules
  1874. var popperOffsets$1 = {
  1875. name: 'popperOffsets',
  1876. enabled: true,
  1877. phase: 'read',
  1878. fn: popperOffsets,
  1879. data: {}
  1880. };
  1881. var unsetSides = {
  1882. top: 'auto',
  1883. right: 'auto',
  1884. bottom: 'auto',
  1885. left: 'auto'
  1886. }; // Round the offsets to the nearest suitable subpixel based on the DPR.
  1887. // Zooming can change the DPR, but it seems to report a value that will
  1888. // cleanly divide the values into the appropriate subpixels.
  1889. function roundOffsets(_ref) {
  1890. var x = _ref.x,
  1891. y = _ref.y;
  1892. var win = window;
  1893. var dpr = win.devicePixelRatio || 1;
  1894. return {
  1895. x: Math.round(x * dpr) / dpr || 0,
  1896. y: Math.round(y * dpr) / dpr || 0
  1897. };
  1898. }
  1899. function mapToStyles(_ref2) {
  1900. var _Object$assign2;
  1901. var popper = _ref2.popper,
  1902. popperRect = _ref2.popperRect,
  1903. placement = _ref2.placement,
  1904. offsets = _ref2.offsets,
  1905. position = _ref2.position,
  1906. gpuAcceleration = _ref2.gpuAcceleration,
  1907. adaptive = _ref2.adaptive;
  1908. var _roundOffsets = roundOffsets(offsets),
  1909. x = _roundOffsets.x,
  1910. y = _roundOffsets.y;
  1911. var hasX = offsets.hasOwnProperty('x');
  1912. var hasY = offsets.hasOwnProperty('y');
  1913. var sideX = left;
  1914. var sideY = top;
  1915. var win = window;
  1916. if (adaptive) {
  1917. var offsetParent = getOffsetParent(popper);
  1918. if (offsetParent === getWindow(popper)) {
  1919. offsetParent = getDocumentElement(popper);
  1920. } // $FlowFixMe: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it
  1921. /*:: offsetParent = (offsetParent: Element); */
  1922. if (placement === top) {
  1923. sideY = bottom;
  1924. y -= offsetParent.clientHeight - popperRect.height;
  1925. y *= gpuAcceleration ? 1 : -1;
  1926. }
  1927. if (placement === left) {
  1928. sideX = right;
  1929. x -= offsetParent.clientWidth - popperRect.width;
  1930. x *= gpuAcceleration ? 1 : -1;
  1931. }
  1932. }
  1933. var commonStyles = _extends({
  1934. position: position
  1935. }, adaptive && unsetSides);
  1936. if (gpuAcceleration) {
  1937. var _Object$assign;
  1938. return _extends(_extends({}, commonStyles), {}, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) < 2 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign));
  1939. }
  1940. return _extends(_extends({}, commonStyles), {}, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
  1941. }
  1942. function computeStyles(_ref3) {
  1943. var state = _ref3.state,
  1944. options = _ref3.options;
  1945. var _options$gpuAccelerat = options.gpuAcceleration,
  1946. gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,
  1947. _options$adaptive = options.adaptive,
  1948. adaptive = _options$adaptive === void 0 ? true : _options$adaptive;
  1949. if (false) { var transitionProperty; }
  1950. var commonStyles = {
  1951. placement: getBasePlacement(state.placement),
  1952. popper: state.elements.popper,
  1953. popperRect: state.rects.popper,
  1954. gpuAcceleration: gpuAcceleration
  1955. };
  1956. if (state.modifiersData.popperOffsets != null) {
  1957. state.styles.popper = _extends(_extends({}, state.styles.popper), mapToStyles(_extends(_extends({}, commonStyles), {}, {
  1958. offsets: state.modifiersData.popperOffsets,
  1959. position: state.options.strategy,
  1960. adaptive: adaptive
  1961. })));
  1962. }
  1963. if (state.modifiersData.arrow != null) {
  1964. state.styles.arrow = _extends(_extends({}, state.styles.arrow), mapToStyles(_extends(_extends({}, commonStyles), {}, {
  1965. offsets: state.modifiersData.arrow,
  1966. position: 'absolute',
  1967. adaptive: false
  1968. })));
  1969. }
  1970. state.attributes.popper = _extends(_extends({}, state.attributes.popper), {}, {
  1971. 'data-popper-placement': state.placement
  1972. });
  1973. } // eslint-disable-next-line import/no-unused-modules
  1974. var computeStyles$1 = {
  1975. name: 'computeStyles',
  1976. enabled: true,
  1977. phase: 'beforeWrite',
  1978. fn: computeStyles,
  1979. data: {}
  1980. };
  1981. // and applies them to the HTMLElements such as popper and arrow
  1982. function applyStyles(_ref) {
  1983. var state = _ref.state;
  1984. Object.keys(state.elements).forEach(function (name) {
  1985. var style = state.styles[name] || {};
  1986. var attributes = state.attributes[name] || {};
  1987. var element = state.elements[name]; // arrow is optional + virtual elements
  1988. if (!isHTMLElement(element) || !getNodeName(element)) {
  1989. return;
  1990. } // Flow doesn't support to extend this property, but it's the most
  1991. // effective way to apply styles to an HTMLElement
  1992. // $FlowFixMe
  1993. _extends(element.style, style);
  1994. Object.keys(attributes).forEach(function (name) {
  1995. var value = attributes[name];
  1996. if (value === false) {
  1997. element.removeAttribute(name);
  1998. } else {
  1999. element.setAttribute(name, value === true ? '' : value);
  2000. }
  2001. });
  2002. });
  2003. }
  2004. function effect$1(_ref2) {
  2005. var state = _ref2.state;
  2006. var initialStyles = {
  2007. popper: {
  2008. position: state.options.strategy,
  2009. left: '0',
  2010. top: '0',
  2011. margin: '0'
  2012. },
  2013. arrow: {
  2014. position: 'absolute'
  2015. },
  2016. reference: {}
  2017. };
  2018. _extends(state.elements.popper.style, initialStyles.popper);
  2019. if (state.elements.arrow) {
  2020. _extends(state.elements.arrow.style, initialStyles.arrow);
  2021. }
  2022. return function () {
  2023. Object.keys(state.elements).forEach(function (name) {
  2024. var element = state.elements[name];
  2025. var attributes = state.attributes[name] || {};
  2026. var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them
  2027. var style = styleProperties.reduce(function (style, property) {
  2028. style[property] = '';
  2029. return style;
  2030. }, {}); // arrow is optional + virtual elements
  2031. if (!isHTMLElement(element) || !getNodeName(element)) {
  2032. return;
  2033. } // Flow doesn't support to extend this property, but it's the most
  2034. // effective way to apply styles to an HTMLElement
  2035. // $FlowFixMe
  2036. _extends(element.style, style);
  2037. Object.keys(attributes).forEach(function (attribute) {
  2038. element.removeAttribute(attribute);
  2039. });
  2040. });
  2041. };
  2042. } // eslint-disable-next-line import/no-unused-modules
  2043. var applyStyles$1 = {
  2044. name: 'applyStyles',
  2045. enabled: true,
  2046. phase: 'write',
  2047. fn: applyStyles,
  2048. effect: effect$1,
  2049. requires: ['computeStyles']
  2050. };
  2051. var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1];
  2052. var createPopper = /*#__PURE__*/popperGenerator({
  2053. defaultModifiers: defaultModifiers
  2054. }); // eslint-disable-next-line import/no-unused-modules
  2055. function distanceAndSkiddingToXY(placement, rects, offset) {
  2056. var basePlacement = getBasePlacement(placement);
  2057. var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;
  2058. var _ref = typeof offset === 'function' ? offset(_extends(_extends({}, rects), {}, {
  2059. placement: placement
  2060. })) : offset,
  2061. skidding = _ref[0],
  2062. distance = _ref[1];
  2063. skidding = skidding || 0;
  2064. distance = (distance || 0) * invertDistance;
  2065. return [left, right].indexOf(basePlacement) >= 0 ? {
  2066. x: distance,
  2067. y: skidding
  2068. } : {
  2069. x: skidding,
  2070. y: distance
  2071. };
  2072. }
  2073. function offset(_ref2) {
  2074. var state = _ref2.state,
  2075. options = _ref2.options,
  2076. name = _ref2.name;
  2077. var _options$offset = options.offset,
  2078. offset = _options$offset === void 0 ? [0, 0] : _options$offset;
  2079. var data = placements.reduce(function (acc, placement) {
  2080. acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);
  2081. return acc;
  2082. }, {});
  2083. var _data$state$placement = data[state.placement],
  2084. x = _data$state$placement.x,
  2085. y = _data$state$placement.y;
  2086. if (state.modifiersData.popperOffsets != null) {
  2087. state.modifiersData.popperOffsets.x += x;
  2088. state.modifiersData.popperOffsets.y += y;
  2089. }
  2090. state.modifiersData[name] = data;
  2091. } // eslint-disable-next-line import/no-unused-modules
  2092. var offset$1 = {
  2093. name: 'offset',
  2094. enabled: true,
  2095. phase: 'main',
  2096. requires: ['popperOffsets'],
  2097. fn: offset
  2098. };
  2099. /***/ }),
  2100. /***/ 5:
  2101. /***/ (function(module, exports, __webpack_require__) {
  2102. "use strict";
  2103. /*
  2104. MIT License http://www.opensource.org/licenses/mit-license.php
  2105. Author Tobias Koppers @sokra
  2106. */
  2107. // css base code, injected by the css-loader
  2108. module.exports = function (useSourceMap) {
  2109. var list = []; // return the list of modules as css string
  2110. list.toString = function toString() {
  2111. return this.map(function (item) {
  2112. var content = cssWithMappingToString(item, useSourceMap);
  2113. if (item[2]) {
  2114. return '@media ' + item[2] + '{' + content + '}';
  2115. } else {
  2116. return content;
  2117. }
  2118. }).join('');
  2119. }; // import a list of modules into the list
  2120. list.i = function (modules, mediaQuery) {
  2121. if (typeof modules === 'string') {
  2122. modules = [[null, modules, '']];
  2123. }
  2124. var alreadyImportedModules = {};
  2125. for (var i = 0; i < this.length; i++) {
  2126. var id = this[i][0];
  2127. if (id != null) {
  2128. alreadyImportedModules[id] = true;
  2129. }
  2130. }
  2131. for (i = 0; i < modules.length; i++) {
  2132. var item = modules[i]; // skip already imported module
  2133. // this implementation is not 100% perfect for weird media query combinations
  2134. // when a module is imported multiple times with different media queries.
  2135. // I hope this will never occur (Hey this way we have smaller bundles)
  2136. if (item[0] == null || !alreadyImportedModules[item[0]]) {
  2137. if (mediaQuery && !item[2]) {
  2138. item[2] = mediaQuery;
  2139. } else if (mediaQuery) {
  2140. item[2] = '(' + item[2] + ') and (' + mediaQuery + ')';
  2141. }
  2142. list.push(item);
  2143. }
  2144. }
  2145. };
  2146. return list;
  2147. };
  2148. function cssWithMappingToString(item, useSourceMap) {
  2149. var content = item[1] || '';
  2150. var cssMapping = item[3];
  2151. if (!cssMapping) {
  2152. return content;
  2153. }
  2154. if (useSourceMap && typeof btoa === 'function') {
  2155. var sourceMapping = toComment(cssMapping);
  2156. var sourceURLs = cssMapping.sources.map(function (source) {
  2157. return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */';
  2158. });
  2159. return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
  2160. }
  2161. return [content].join('\n');
  2162. } // Adapted from convert-source-map (MIT)
  2163. function toComment(sourceMap) {
  2164. // eslint-disable-next-line no-undef
  2165. var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
  2166. var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
  2167. return '/*# ' + data + ' */';
  2168. }
  2169. /***/ }),
  2170. /***/ 51:
  2171. /***/ (function(module, exports, __webpack_require__) {
  2172. "use strict";
  2173. exports.__esModule = true;
  2174. exports.TouchMixin = void 0;
  2175. var _event = __webpack_require__(30);
  2176. var MIN_DISTANCE = 10;
  2177. function getDirection(x, y) {
  2178. if (x > y && x > MIN_DISTANCE) {
  2179. return 'horizontal';
  2180. }
  2181. if (y > x && y > MIN_DISTANCE) {
  2182. return 'vertical';
  2183. }
  2184. return '';
  2185. }
  2186. var TouchMixin = {
  2187. data: function data() {
  2188. return {
  2189. direction: ''
  2190. };
  2191. },
  2192. methods: {
  2193. touchStart: function touchStart(event) {
  2194. this.resetTouchStatus();
  2195. this.startX = event.touches[0].clientX;
  2196. this.startY = event.touches[0].clientY;
  2197. },
  2198. touchMove: function touchMove(event) {
  2199. var touch = event.touches[0];
  2200. this.deltaX = touch.clientX - this.startX;
  2201. this.deltaY = touch.clientY - this.startY;
  2202. this.offsetX = Math.abs(this.deltaX);
  2203. this.offsetY = Math.abs(this.deltaY);
  2204. this.direction = this.direction || getDirection(this.offsetX, this.offsetY);
  2205. },
  2206. resetTouchStatus: function resetTouchStatus() {
  2207. this.direction = '';
  2208. this.deltaX = 0;
  2209. this.deltaY = 0;
  2210. this.offsetX = 0;
  2211. this.offsetY = 0;
  2212. },
  2213. // avoid Vue 2.6 event bubble issues by manually binding events
  2214. // https://github.com/youzan/vant/issues/3015
  2215. bindTouchEvent: function bindTouchEvent(el) {
  2216. var onTouchStart = this.onTouchStart,
  2217. onTouchMove = this.onTouchMove,
  2218. onTouchEnd = this.onTouchEnd;
  2219. (0, _event.on)(el, 'touchstart', onTouchStart);
  2220. (0, _event.on)(el, 'touchmove', onTouchMove);
  2221. if (onTouchEnd) {
  2222. (0, _event.on)(el, 'touchend', onTouchEnd);
  2223. (0, _event.on)(el, 'touchcancel', onTouchEnd);
  2224. }
  2225. }
  2226. }
  2227. };
  2228. exports.TouchMixin = TouchMixin;
  2229. /***/ }),
  2230. /***/ 53:
  2231. /***/ (function(module, exports, __webpack_require__) {
  2232. "use strict";
  2233. exports.__esModule = true;
  2234. exports.getScroller = getScroller;
  2235. exports.getScrollTop = getScrollTop;
  2236. exports.setScrollTop = setScrollTop;
  2237. exports.getRootScrollTop = getRootScrollTop;
  2238. exports.setRootScrollTop = setRootScrollTop;
  2239. exports.getElementTop = getElementTop;
  2240. exports.getVisibleHeight = getVisibleHeight;
  2241. exports.getVisibleTop = getVisibleTop;
  2242. function isWindow(val) {
  2243. return val === window;
  2244. } // get nearest scroll element
  2245. // https://github.com/youzan/vant/issues/3823
  2246. var overflowScrollReg = /scroll|auto/i;
  2247. function getScroller(el, root) {
  2248. if (root === void 0) {
  2249. root = window;
  2250. }
  2251. var node = el;
  2252. while (node && node.tagName !== 'HTML' && node.tagName !== 'BODY' && node.nodeType === 1 && node !== root) {
  2253. var _window$getComputedSt = window.getComputedStyle(node),
  2254. overflowY = _window$getComputedSt.overflowY;
  2255. if (overflowScrollReg.test(overflowY)) {
  2256. return node;
  2257. }
  2258. node = node.parentNode;
  2259. }
  2260. return root;
  2261. }
  2262. function getScrollTop(el) {
  2263. var top = 'scrollTop' in el ? el.scrollTop : el.pageYOffset; // iOS scroll bounce cause minus scrollTop
  2264. return Math.max(top, 0);
  2265. }
  2266. function setScrollTop(el, value) {
  2267. if ('scrollTop' in el) {
  2268. el.scrollTop = value;
  2269. } else {
  2270. el.scrollTo(el.scrollX, value);
  2271. }
  2272. }
  2273. function getRootScrollTop() {
  2274. return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
  2275. }
  2276. function setRootScrollTop(value) {
  2277. setScrollTop(window, value);
  2278. setScrollTop(document.body, value);
  2279. } // get distance from element top to page top or scroller top
  2280. function getElementTop(el, scroller) {
  2281. if (isWindow(el)) {
  2282. return 0;
  2283. }
  2284. var scrollTop = scroller ? getScrollTop(scroller) : getRootScrollTop();
  2285. return el.getBoundingClientRect().top + scrollTop;
  2286. }
  2287. function getVisibleHeight(el) {
  2288. if (isWindow(el)) {
  2289. return el.innerHeight;
  2290. }
  2291. return el.getBoundingClientRect().height;
  2292. }
  2293. function getVisibleTop(el) {
  2294. if (isWindow(el)) {
  2295. return 0;
  2296. }
  2297. return el.getBoundingClientRect().top;
  2298. }
  2299. /***/ }),
  2300. /***/ 6:
  2301. /***/ (function(module, exports, __webpack_require__) {
  2302. /*
  2303. MIT License http://www.opensource.org/licenses/mit-license.php
  2304. Author Tobias Koppers @sokra
  2305. */
  2306. var stylesInDom = {};
  2307. var memoize = function (fn) {
  2308. var memo;
  2309. return function () {
  2310. if (typeof memo === "undefined") memo = fn.apply(this, arguments);
  2311. return memo;
  2312. };
  2313. };
  2314. var isOldIE = memoize(function () {
  2315. // Test for IE <= 9 as proposed by Browserhacks
  2316. // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
  2317. // Tests for existence of standard globals is to allow style-loader
  2318. // to operate correctly into non-standard environments
  2319. // @see https://github.com/webpack-contrib/style-loader/issues/177
  2320. return window && document && document.all && !window.atob;
  2321. });
  2322. var getTarget = function (target, parent) {
  2323. if (parent){
  2324. return parent.querySelector(target);
  2325. }
  2326. return document.querySelector(target);
  2327. };
  2328. var getElement = (function (fn) {
  2329. var memo = {};
  2330. return function(target, parent) {
  2331. // If passing function in options, then use it for resolve "head" element.
  2332. // Useful for Shadow Root style i.e
  2333. // {
  2334. // insertInto: function () { return document.querySelector("#foo").shadowRoot }
  2335. // }
  2336. if (typeof target === 'function') {
  2337. return target();
  2338. }
  2339. if (typeof memo[target] === "undefined") {
  2340. var styleTarget = getTarget.call(this, target, parent);
  2341. // Special case to return head of iframe instead of iframe itself
  2342. if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
  2343. try {
  2344. // This will throw an exception if access to iframe is blocked
  2345. // due to cross-origin restrictions
  2346. styleTarget = styleTarget.contentDocument.head;
  2347. } catch(e) {
  2348. styleTarget = null;
  2349. }
  2350. }
  2351. memo[target] = styleTarget;
  2352. }
  2353. return memo[target]
  2354. };
  2355. })();
  2356. var singleton = null;
  2357. var singletonCounter = 0;
  2358. var stylesInsertedAtTop = [];
  2359. var fixUrls = __webpack_require__(12);
  2360. module.exports = function(list, options) {
  2361. if (typeof DEBUG !== "undefined" && DEBUG) {
  2362. if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
  2363. }
  2364. options = options || {};
  2365. options.attrs = typeof options.attrs === "object" ? options.attrs : {};
  2366. // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
  2367. // tags it will allow on a page
  2368. if (!options.singleton && typeof options.singleton !== "boolean") options.singleton = isOldIE();
  2369. // By default, add <style> tags to the <head> element
  2370. if (!options.insertInto) options.insertInto = "head";
  2371. // By default, add <style> tags to the bottom of the target
  2372. if (!options.insertAt) options.insertAt = "bottom";
  2373. var styles = listToStyles(list, options);
  2374. addStylesToDom(styles, options);
  2375. return function update (newList) {
  2376. var mayRemove = [];
  2377. for (var i = 0; i < styles.length; i++) {
  2378. var item = styles[i];
  2379. var domStyle = stylesInDom[item.id];
  2380. domStyle.refs--;
  2381. mayRemove.push(domStyle);
  2382. }
  2383. if(newList) {
  2384. var newStyles = listToStyles(newList, options);
  2385. addStylesToDom(newStyles, options);
  2386. }
  2387. for (var i = 0; i < mayRemove.length; i++) {
  2388. var domStyle = mayRemove[i];
  2389. if(domStyle.refs === 0) {
  2390. for (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();
  2391. delete stylesInDom[domStyle.id];
  2392. }
  2393. }
  2394. };
  2395. };
  2396. function addStylesToDom (styles, options) {
  2397. for (var i = 0; i < styles.length; i++) {
  2398. var item = styles[i];
  2399. var domStyle = stylesInDom[item.id];
  2400. if(domStyle) {
  2401. domStyle.refs++;
  2402. for(var j = 0; j < domStyle.parts.length; j++) {
  2403. domStyle.parts[j](item.parts[j]);
  2404. }
  2405. for(; j < item.parts.length; j++) {
  2406. domStyle.parts.push(addStyle(item.parts[j], options));
  2407. }
  2408. } else {
  2409. var parts = [];
  2410. for(var j = 0; j < item.parts.length; j++) {
  2411. parts.push(addStyle(item.parts[j], options));
  2412. }
  2413. stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
  2414. }
  2415. }
  2416. }
  2417. function listToStyles (list, options) {
  2418. var styles = [];
  2419. var newStyles = {};
  2420. for (var i = 0; i < list.length; i++) {
  2421. var item = list[i];
  2422. var id = options.base ? item[0] + options.base : item[0];
  2423. var css = item[1];
  2424. var media = item[2];
  2425. var sourceMap = item[3];
  2426. var part = {css: css, media: media, sourceMap: sourceMap};
  2427. if(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]});
  2428. else newStyles[id].parts.push(part);
  2429. }
  2430. return styles;
  2431. }
  2432. function insertStyleElement (options, style) {
  2433. var target = getElement(options.insertInto)
  2434. if (!target) {
  2435. throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");
  2436. }
  2437. var lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];
  2438. if (options.insertAt === "top") {
  2439. if (!lastStyleElementInsertedAtTop) {
  2440. target.insertBefore(style, target.firstChild);
  2441. } else if (lastStyleElementInsertedAtTop.nextSibling) {
  2442. target.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling);
  2443. } else {
  2444. target.appendChild(style);
  2445. }
  2446. stylesInsertedAtTop.push(style);
  2447. } else if (options.insertAt === "bottom") {
  2448. target.appendChild(style);
  2449. } else if (typeof options.insertAt === "object" && options.insertAt.before) {
  2450. var nextSibling = getElement(options.insertAt.before, target);
  2451. target.insertBefore(style, nextSibling);
  2452. } else {
  2453. 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");
  2454. }
  2455. }
  2456. function removeStyleElement (style) {
  2457. if (style.parentNode === null) return false;
  2458. style.parentNode.removeChild(style);
  2459. var idx = stylesInsertedAtTop.indexOf(style);
  2460. if(idx >= 0) {
  2461. stylesInsertedAtTop.splice(idx, 1);
  2462. }
  2463. }
  2464. function createStyleElement (options) {
  2465. var style = document.createElement("style");
  2466. if(options.attrs.type === undefined) {
  2467. options.attrs.type = "text/css";
  2468. }
  2469. if(options.attrs.nonce === undefined) {
  2470. var nonce = getNonce();
  2471. if (nonce) {
  2472. options.attrs.nonce = nonce;
  2473. }
  2474. }
  2475. addAttrs(style, options.attrs);
  2476. insertStyleElement(options, style);
  2477. return style;
  2478. }
  2479. function createLinkElement (options) {
  2480. var link = document.createElement("link");
  2481. if(options.attrs.type === undefined) {
  2482. options.attrs.type = "text/css";
  2483. }
  2484. options.attrs.rel = "stylesheet";
  2485. addAttrs(link, options.attrs);
  2486. insertStyleElement(options, link);
  2487. return link;
  2488. }
  2489. function addAttrs (el, attrs) {
  2490. Object.keys(attrs).forEach(function (key) {
  2491. el.setAttribute(key, attrs[key]);
  2492. });
  2493. }
  2494. function getNonce() {
  2495. if (false) {}
  2496. return __webpack_require__.nc;
  2497. }
  2498. function addStyle (obj, options) {
  2499. var style, update, remove, result;
  2500. // If a transform function was defined, run it on the css
  2501. if (options.transform && obj.css) {
  2502. result = typeof options.transform === 'function'
  2503. ? options.transform(obj.css)
  2504. : options.transform.default(obj.css);
  2505. if (result) {
  2506. // If transform returns a value, use that instead of the original css.
  2507. // This allows running runtime transformations on the css.
  2508. obj.css = result;
  2509. } else {
  2510. // If the transform function returns a falsy value, don't add this css.
  2511. // This allows conditional loading of css
  2512. return function() {
  2513. // noop
  2514. };
  2515. }
  2516. }
  2517. if (options.singleton) {
  2518. var styleIndex = singletonCounter++;
  2519. style = singleton || (singleton = createStyleElement(options));
  2520. update = applyToSingletonTag.bind(null, style, styleIndex, false);
  2521. remove = applyToSingletonTag.bind(null, style, styleIndex, true);
  2522. } else if (
  2523. obj.sourceMap &&
  2524. typeof URL === "function" &&
  2525. typeof URL.createObjectURL === "function" &&
  2526. typeof URL.revokeObjectURL === "function" &&
  2527. typeof Blob === "function" &&
  2528. typeof btoa === "function"
  2529. ) {
  2530. style = createLinkElement(options);
  2531. update = updateLink.bind(null, style, options);
  2532. remove = function () {
  2533. removeStyleElement(style);
  2534. if(style.href) URL.revokeObjectURL(style.href);
  2535. };
  2536. } else {
  2537. style = createStyleElement(options);
  2538. update = applyToTag.bind(null, style);
  2539. remove = function () {
  2540. removeStyleElement(style);
  2541. };
  2542. }
  2543. update(obj);
  2544. return function updateStyle (newObj) {
  2545. if (newObj) {
  2546. if (
  2547. newObj.css === obj.css &&
  2548. newObj.media === obj.media &&
  2549. newObj.sourceMap === obj.sourceMap
  2550. ) {
  2551. return;
  2552. }
  2553. update(obj = newObj);
  2554. } else {
  2555. remove();
  2556. }
  2557. };
  2558. }
  2559. var replaceText = (function () {
  2560. var textStore = [];
  2561. return function (index, replacement) {
  2562. textStore[index] = replacement;
  2563. return textStore.filter(Boolean).join('\n');
  2564. };
  2565. })();
  2566. function applyToSingletonTag (style, index, remove, obj) {
  2567. var css = remove ? "" : obj.css;
  2568. if (style.styleSheet) {
  2569. style.styleSheet.cssText = replaceText(index, css);
  2570. } else {
  2571. var cssNode = document.createTextNode(css);
  2572. var childNodes = style.childNodes;
  2573. if (childNodes[index]) style.removeChild(childNodes[index]);
  2574. if (childNodes.length) {
  2575. style.insertBefore(cssNode, childNodes[index]);
  2576. } else {
  2577. style.appendChild(cssNode);
  2578. }
  2579. }
  2580. }
  2581. function applyToTag (style, obj) {
  2582. var css = obj.css;
  2583. var media = obj.media;
  2584. if(media) {
  2585. style.setAttribute("media", media)
  2586. }
  2587. if(style.styleSheet) {
  2588. style.styleSheet.cssText = css;
  2589. } else {
  2590. while(style.firstChild) {
  2591. style.removeChild(style.firstChild);
  2592. }
  2593. style.appendChild(document.createTextNode(css));
  2594. }
  2595. }
  2596. function updateLink (link, options, obj) {
  2597. var css = obj.css;
  2598. var sourceMap = obj.sourceMap;
  2599. /*
  2600. If convertToAbsoluteUrls isn't defined, but sourcemaps are enabled
  2601. and there is no publicPath defined then lets turn convertToAbsoluteUrls
  2602. on by default. Otherwise default to the convertToAbsoluteUrls option
  2603. directly
  2604. */
  2605. var autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;
  2606. if (options.convertToAbsoluteUrls || autoFixUrls) {
  2607. css = fixUrls(css);
  2608. }
  2609. if (sourceMap) {
  2610. // http://stackoverflow.com/a/26603875
  2611. css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
  2612. }
  2613. var blob = new Blob([css], { type: "text/css" });
  2614. var oldSrc = link.href;
  2615. link.href = URL.createObjectURL(blob);
  2616. if(oldSrc) URL.revokeObjectURL(oldSrc);
  2617. }
  2618. /***/ }),
  2619. /***/ 60:
  2620. /***/ (function(module, exports, __webpack_require__) {
  2621. "use strict";
  2622. exports.__esModule = true;
  2623. exports.BindEventMixin = BindEventMixin;
  2624. var _event = __webpack_require__(30);
  2625. /**
  2626. * Bind event when mounted or activated
  2627. */
  2628. var uid = 0;
  2629. function BindEventMixin(handler) {
  2630. var key = "binded_" + uid++;
  2631. function bind() {
  2632. if (!this[key]) {
  2633. handler.call(this, _event.on, true);
  2634. this[key] = true;
  2635. }
  2636. }
  2637. function unbind() {
  2638. if (this[key]) {
  2639. handler.call(this, _event.off, false);
  2640. this[key] = false;
  2641. }
  2642. }
  2643. return {
  2644. mounted: bind,
  2645. activated: bind,
  2646. deactivated: unbind,
  2647. beforeDestroy: unbind
  2648. };
  2649. }
  2650. /***/ }),
  2651. /***/ 63:
  2652. /***/ (function(module, exports, __webpack_require__) {
  2653. "use strict";
  2654. exports.__esModule = true;
  2655. exports.BORDER_UNSET_TOP_BOTTOM = exports.BORDER_TOP_BOTTOM = exports.BORDER_SURROUND = exports.BORDER_BOTTOM = exports.BORDER_LEFT = exports.BORDER_TOP = exports.BORDER = exports.RED = void 0;
  2656. // color
  2657. var RED = '#ee0a24'; // border
  2658. exports.RED = RED;
  2659. var BORDER = 'van-hairline';
  2660. exports.BORDER = BORDER;
  2661. var BORDER_TOP = BORDER + "--top";
  2662. exports.BORDER_TOP = BORDER_TOP;
  2663. var BORDER_LEFT = BORDER + "--left";
  2664. exports.BORDER_LEFT = BORDER_LEFT;
  2665. var BORDER_BOTTOM = BORDER + "--bottom";
  2666. exports.BORDER_BOTTOM = BORDER_BOTTOM;
  2667. var BORDER_SURROUND = BORDER + "--surround";
  2668. exports.BORDER_SURROUND = BORDER_SURROUND;
  2669. var BORDER_TOP_BOTTOM = BORDER + "--top-bottom";
  2670. exports.BORDER_TOP_BOTTOM = BORDER_TOP_BOTTOM;
  2671. var BORDER_UNSET_TOP_BOTTOM = BORDER + "-unset--top-bottom";
  2672. exports.BORDER_UNSET_TOP_BOTTOM = BORDER_UNSET_TOP_BOTTOM;
  2673. /***/ }),
  2674. /***/ 64:
  2675. /***/ (function(module, exports, __webpack_require__) {
  2676. "use strict";
  2677. exports.__esModule = true;
  2678. exports.removeNode = removeNode;
  2679. function removeNode(el) {
  2680. var parent = el.parentNode;
  2681. if (parent) {
  2682. parent.removeChild(el);
  2683. }
  2684. }
  2685. /***/ }),
  2686. /***/ 67:
  2687. /***/ (function(module, exports, __webpack_require__) {
  2688. "use strict";
  2689. exports.__esModule = true;
  2690. exports.context = void 0;
  2691. var context = {
  2692. zIndex: 2000,
  2693. lockCount: 0,
  2694. stack: [],
  2695. find: function find(vm) {
  2696. return this.stack.filter(function (item) {
  2697. return item.vm === vm;
  2698. })[0];
  2699. }
  2700. };
  2701. exports.context = context;
  2702. /***/ }),
  2703. /***/ 75:
  2704. /***/ (function(module, exports, __webpack_require__) {
  2705. "use strict";
  2706. exports.__esModule = true;
  2707. exports.PopupMixin = PopupMixin;
  2708. exports.popupMixinProps = void 0;
  2709. var _context = __webpack_require__(67);
  2710. var _overlay = __webpack_require__(84);
  2711. var _event = __webpack_require__(30);
  2712. var _node = __webpack_require__(64);
  2713. var _scroll = __webpack_require__(53);
  2714. var _touch = __webpack_require__(51);
  2715. var _portal = __webpack_require__(78);
  2716. var _closeOnPopstate = __webpack_require__(85);
  2717. // Context
  2718. // Utils
  2719. // Mixins
  2720. var popupMixinProps = {
  2721. // Initial rendering animation
  2722. transitionAppear: Boolean,
  2723. // whether to show popup
  2724. value: Boolean,
  2725. // whether to show overlay
  2726. overlay: Boolean,
  2727. // overlay custom style
  2728. overlayStyle: Object,
  2729. // overlay custom class name
  2730. overlayClass: String,
  2731. // whether to close popup when overlay is clicked
  2732. closeOnClickOverlay: Boolean,
  2733. // z-index
  2734. zIndex: [Number, String],
  2735. // prevent body scroll
  2736. lockScroll: {
  2737. type: Boolean,
  2738. default: true
  2739. },
  2740. // whether to lazy render
  2741. lazyRender: {
  2742. type: Boolean,
  2743. default: true
  2744. }
  2745. };
  2746. exports.popupMixinProps = popupMixinProps;
  2747. function PopupMixin(options) {
  2748. if (options === void 0) {
  2749. options = {};
  2750. }
  2751. return {
  2752. mixins: [_touch.TouchMixin, _closeOnPopstate.CloseOnPopstateMixin, (0, _portal.PortalMixin)({
  2753. afterPortal: function afterPortal() {
  2754. if (this.overlay) {
  2755. (0, _overlay.updateOverlay)();
  2756. }
  2757. }
  2758. })],
  2759. props: popupMixinProps,
  2760. data: function data() {
  2761. return {
  2762. inited: this.value
  2763. };
  2764. },
  2765. computed: {
  2766. shouldRender: function shouldRender() {
  2767. return this.inited || !this.lazyRender;
  2768. }
  2769. },
  2770. watch: {
  2771. value: function value(val) {
  2772. var type = val ? 'open' : 'close';
  2773. this.inited = this.inited || this.value;
  2774. this[type]();
  2775. if (!options.skipToggleEvent) {
  2776. this.$emit(type);
  2777. }
  2778. },
  2779. overlay: 'renderOverlay'
  2780. },
  2781. mounted: function mounted() {
  2782. if (this.value) {
  2783. this.open();
  2784. }
  2785. },
  2786. /* istanbul ignore next */
  2787. activated: function activated() {
  2788. if (this.shouldReopen) {
  2789. this.$emit('input', true);
  2790. this.shouldReopen = false;
  2791. }
  2792. },
  2793. beforeDestroy: function beforeDestroy() {
  2794. (0, _overlay.removeOverlay)(this);
  2795. if (this.opened) {
  2796. this.removeLock();
  2797. }
  2798. if (this.getContainer) {
  2799. (0, _node.removeNode)(this.$el);
  2800. }
  2801. },
  2802. /* istanbul ignore next */
  2803. deactivated: function deactivated() {
  2804. if (this.value) {
  2805. this.close();
  2806. this.shouldReopen = true;
  2807. }
  2808. },
  2809. methods: {
  2810. open: function open() {
  2811. /* istanbul ignore next */
  2812. if (this.$isServer || this.opened) {
  2813. return;
  2814. } // cover default zIndex
  2815. if (this.zIndex !== undefined) {
  2816. _context.context.zIndex = this.zIndex;
  2817. }
  2818. this.opened = true;
  2819. this.renderOverlay();
  2820. this.addLock();
  2821. },
  2822. addLock: function addLock() {
  2823. if (this.lockScroll) {
  2824. (0, _event.on)(document, 'touchstart', this.touchStart);
  2825. (0, _event.on)(document, 'touchmove', this.onTouchMove);
  2826. if (!_context.context.lockCount) {
  2827. document.body.classList.add('van-overflow-hidden');
  2828. }
  2829. _context.context.lockCount++;
  2830. }
  2831. },
  2832. removeLock: function removeLock() {
  2833. if (this.lockScroll && _context.context.lockCount) {
  2834. _context.context.lockCount--;
  2835. (0, _event.off)(document, 'touchstart', this.touchStart);
  2836. (0, _event.off)(document, 'touchmove', this.onTouchMove);
  2837. if (!_context.context.lockCount) {
  2838. document.body.classList.remove('van-overflow-hidden');
  2839. }
  2840. }
  2841. },
  2842. close: function close() {
  2843. if (!this.opened) {
  2844. return;
  2845. }
  2846. (0, _overlay.closeOverlay)(this);
  2847. this.opened = false;
  2848. this.removeLock();
  2849. this.$emit('input', false);
  2850. },
  2851. onTouchMove: function onTouchMove(event) {
  2852. this.touchMove(event);
  2853. var direction = this.deltaY > 0 ? '10' : '01';
  2854. var el = (0, _scroll.getScroller)(event.target, this.$el);
  2855. var scrollHeight = el.scrollHeight,
  2856. offsetHeight = el.offsetHeight,
  2857. scrollTop = el.scrollTop;
  2858. var status = '11';
  2859. /* istanbul ignore next */
  2860. if (scrollTop === 0) {
  2861. status = offsetHeight >= scrollHeight ? '00' : '01';
  2862. } else if (scrollTop + offsetHeight >= scrollHeight) {
  2863. status = '10';
  2864. }
  2865. /* istanbul ignore next */
  2866. if (status !== '11' && this.direction === 'vertical' && !(parseInt(status, 2) & parseInt(direction, 2))) {
  2867. (0, _event.preventDefault)(event, true);
  2868. }
  2869. },
  2870. renderOverlay: function renderOverlay() {
  2871. var _this = this;
  2872. if (this.$isServer || !this.value) {
  2873. return;
  2874. }
  2875. this.$nextTick(function () {
  2876. _this.updateZIndex(_this.overlay ? 1 : 0);
  2877. if (_this.overlay) {
  2878. (0, _overlay.openOverlay)(_this, {
  2879. zIndex: _context.context.zIndex++,
  2880. duration: _this.duration,
  2881. className: _this.overlayClass,
  2882. customStyle: _this.overlayStyle
  2883. });
  2884. } else {
  2885. (0, _overlay.closeOverlay)(_this);
  2886. }
  2887. });
  2888. },
  2889. updateZIndex: function updateZIndex(value) {
  2890. if (value === void 0) {
  2891. value = 0;
  2892. }
  2893. this.$el.style.zIndex = ++_context.context.zIndex + value;
  2894. }
  2895. }
  2896. };
  2897. }
  2898. /***/ }),
  2899. /***/ 76:
  2900. /***/ (function(module, exports, __webpack_require__) {
  2901. "use strict";
  2902. var _interopRequireDefault = __webpack_require__(1);
  2903. exports.__esModule = true;
  2904. exports.default = void 0;
  2905. var _babelHelperVueJsxMergeProps = _interopRequireDefault(__webpack_require__(16));
  2906. var _extends2 = _interopRequireDefault(__webpack_require__(18));
  2907. var _utils = __webpack_require__(0);
  2908. var _functional = __webpack_require__(14);
  2909. var _event = __webpack_require__(30);
  2910. // Utils
  2911. var _createNamespace = (0, _utils.createNamespace)('overlay'),
  2912. createComponent = _createNamespace[0],
  2913. bem = _createNamespace[1];
  2914. function preventTouchMove(event) {
  2915. (0, _event.preventDefault)(event, true);
  2916. }
  2917. function Overlay(h, props, slots, ctx) {
  2918. var style = (0, _extends2.default)({
  2919. zIndex: props.zIndex
  2920. }, props.customStyle);
  2921. if ((0, _utils.isDef)(props.duration)) {
  2922. style.animationDuration = props.duration + "s";
  2923. }
  2924. return h("transition", {
  2925. "attrs": {
  2926. "name": "van-fade"
  2927. }
  2928. }, [h("div", (0, _babelHelperVueJsxMergeProps.default)([{
  2929. "directives": [{
  2930. name: "show",
  2931. value: props.show
  2932. }],
  2933. "style": style,
  2934. "class": [bem(), props.className],
  2935. "on": {
  2936. "touchmove": props.lockScroll ? preventTouchMove : _utils.noop
  2937. }
  2938. }, (0, _functional.inherit)(ctx, true)]), [slots.default == null ? void 0 : slots.default()])]);
  2939. }
  2940. Overlay.props = {
  2941. show: Boolean,
  2942. zIndex: [Number, String],
  2943. duration: [Number, String],
  2944. className: null,
  2945. customStyle: Object,
  2946. lockScroll: {
  2947. type: Boolean,
  2948. default: true
  2949. }
  2950. };
  2951. var _default = createComponent(Overlay);
  2952. exports.default = _default;
  2953. /***/ }),
  2954. /***/ 78:
  2955. /***/ (function(module, exports, __webpack_require__) {
  2956. "use strict";
  2957. exports.__esModule = true;
  2958. exports.PortalMixin = PortalMixin;
  2959. function getElement(selector) {
  2960. if (typeof selector === 'string') {
  2961. return document.querySelector(selector);
  2962. }
  2963. return selector();
  2964. }
  2965. function PortalMixin(_temp) {
  2966. var _ref = _temp === void 0 ? {} : _temp,
  2967. ref = _ref.ref,
  2968. afterPortal = _ref.afterPortal;
  2969. return {
  2970. props: {
  2971. getContainer: [String, Function]
  2972. },
  2973. watch: {
  2974. getContainer: 'portal'
  2975. },
  2976. mounted: function mounted() {
  2977. if (this.getContainer) {
  2978. this.portal();
  2979. }
  2980. },
  2981. methods: {
  2982. portal: function portal() {
  2983. var getContainer = this.getContainer;
  2984. var el = ref ? this.$refs[ref] : this.$el;
  2985. var container;
  2986. if (getContainer) {
  2987. container = getElement(getContainer);
  2988. } else if (this.$parent) {
  2989. container = this.$parent.$el;
  2990. }
  2991. if (container && container !== el.parentNode) {
  2992. container.appendChild(el);
  2993. }
  2994. if (afterPortal) {
  2995. afterPortal.call(this);
  2996. }
  2997. }
  2998. }
  2999. };
  3000. }
  3001. /***/ }),
  3002. /***/ 79:
  3003. /***/ (function(module, exports, __webpack_require__) {
  3004. var content = __webpack_require__(80);
  3005. if(typeof content === 'string') content = [[module.i, content, '']];
  3006. var transform;
  3007. var insertInto;
  3008. var options = {"hmr":true}
  3009. options.transform = transform
  3010. options.insertInto = undefined;
  3011. var update = __webpack_require__(6)(content, options);
  3012. if(content.locals) module.exports = content.locals;
  3013. if(false) {}
  3014. /***/ }),
  3015. /***/ 80:
  3016. /***/ (function(module, exports, __webpack_require__) {
  3017. exports = module.exports = __webpack_require__(5)(false);
  3018. // Module
  3019. 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)}", ""]);
  3020. /***/ }),
  3021. /***/ 82:
  3022. /***/ (function(module, exports, __webpack_require__) {
  3023. var content = __webpack_require__(83);
  3024. if(typeof content === 'string') content = [[module.i, content, '']];
  3025. var transform;
  3026. var insertInto;
  3027. var options = {"hmr":true}
  3028. options.transform = transform
  3029. options.insertInto = undefined;
  3030. var update = __webpack_require__(6)(content, options);
  3031. if(content.locals) module.exports = content.locals;
  3032. if(false) {}
  3033. /***/ }),
  3034. /***/ 83:
  3035. /***/ (function(module, exports, __webpack_require__) {
  3036. exports = module.exports = __webpack_require__(5)(false);
  3037. // Module
  3038. 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}", ""]);
  3039. /***/ }),
  3040. /***/ 84:
  3041. /***/ (function(module, exports, __webpack_require__) {
  3042. "use strict";
  3043. var _interopRequireDefault = __webpack_require__(1);
  3044. exports.__esModule = true;
  3045. exports.updateOverlay = updateOverlay;
  3046. exports.openOverlay = openOverlay;
  3047. exports.closeOverlay = closeOverlay;
  3048. exports.removeOverlay = removeOverlay;
  3049. var _extends2 = _interopRequireDefault(__webpack_require__(18));
  3050. var _overlay = _interopRequireDefault(__webpack_require__(76));
  3051. var _context = __webpack_require__(67);
  3052. var _functional = __webpack_require__(14);
  3053. var _node = __webpack_require__(64);
  3054. var defaultConfig = {
  3055. className: '',
  3056. customStyle: {}
  3057. };
  3058. function mountOverlay(vm) {
  3059. return (0, _functional.mount)(_overlay.default, {
  3060. on: {
  3061. // close popup when overlay clicked & closeOnClickOverlay is true
  3062. click: function click() {
  3063. vm.$emit('click-overlay');
  3064. if (vm.closeOnClickOverlay) {
  3065. if (vm.onClickOverlay) {
  3066. vm.onClickOverlay();
  3067. } else {
  3068. vm.close();
  3069. }
  3070. }
  3071. }
  3072. }
  3073. });
  3074. }
  3075. function updateOverlay(vm) {
  3076. var item = _context.context.find(vm);
  3077. if (item) {
  3078. var el = vm.$el;
  3079. var config = item.config,
  3080. overlay = item.overlay;
  3081. if (el && el.parentNode) {
  3082. el.parentNode.insertBefore(overlay.$el, el);
  3083. }
  3084. (0, _extends2.default)(overlay, defaultConfig, config, {
  3085. show: true
  3086. });
  3087. }
  3088. }
  3089. function openOverlay(vm, config) {
  3090. var item = _context.context.find(vm);
  3091. if (item) {
  3092. item.config = config;
  3093. } else {
  3094. var overlay = mountOverlay(vm);
  3095. _context.context.stack.push({
  3096. vm: vm,
  3097. config: config,
  3098. overlay: overlay
  3099. });
  3100. }
  3101. updateOverlay(vm);
  3102. }
  3103. function closeOverlay(vm) {
  3104. var item = _context.context.find(vm);
  3105. if (item) {
  3106. item.overlay.show = false;
  3107. }
  3108. }
  3109. function removeOverlay(vm) {
  3110. var item = _context.context.find(vm);
  3111. if (item) {
  3112. (0, _node.removeNode)(item.overlay.$el);
  3113. }
  3114. }
  3115. /***/ }),
  3116. /***/ 85:
  3117. /***/ (function(module, exports, __webpack_require__) {
  3118. "use strict";
  3119. exports.__esModule = true;
  3120. exports.CloseOnPopstateMixin = void 0;
  3121. var _event = __webpack_require__(30);
  3122. var _bindEvent = __webpack_require__(60);
  3123. var CloseOnPopstateMixin = {
  3124. mixins: [(0, _bindEvent.BindEventMixin)(function (bind, isBind) {
  3125. this.handlePopstate(isBind && this.closeOnPopstate);
  3126. })],
  3127. props: {
  3128. closeOnPopstate: Boolean
  3129. },
  3130. data: function data() {
  3131. return {
  3132. bindStatus: false
  3133. };
  3134. },
  3135. watch: {
  3136. closeOnPopstate: function closeOnPopstate(val) {
  3137. this.handlePopstate(val);
  3138. }
  3139. },
  3140. methods: {
  3141. onPopstate: function onPopstate() {
  3142. this.close();
  3143. this.shouldReopen = false;
  3144. },
  3145. handlePopstate: function handlePopstate(bind) {
  3146. /* istanbul ignore if */
  3147. if (this.$isServer) {
  3148. return;
  3149. }
  3150. if (this.bindStatus !== bind) {
  3151. this.bindStatus = bind;
  3152. var action = bind ? _event.on : _event.off;
  3153. action(window, 'popstate', this.onPopstate);
  3154. }
  3155. }
  3156. }
  3157. };
  3158. exports.CloseOnPopstateMixin = CloseOnPopstateMixin;
  3159. /***/ }),
  3160. /***/ 9:
  3161. /***/ (function(module, exports, __webpack_require__) {
  3162. "use strict";
  3163. exports.__esModule = true;
  3164. exports.camelize = camelize;
  3165. exports.padZero = padZero;
  3166. var camelizeRE = /-(\w)/g;
  3167. function camelize(str) {
  3168. return str.replace(camelizeRE, function (_, c) {
  3169. return c.toUpperCase();
  3170. });
  3171. }
  3172. function padZero(num, targetLength) {
  3173. if (targetLength === void 0) {
  3174. targetLength = 2;
  3175. }
  3176. var str = num + '';
  3177. while (str.length < targetLength) {
  3178. str = '0' + str;
  3179. }
  3180. return str;
  3181. }
  3182. /***/ }),
  3183. /***/ 93:
  3184. /***/ (function(module, exports, __webpack_require__) {
  3185. "use strict";
  3186. var _interopRequireDefault = __webpack_require__(1);
  3187. exports.__esModule = true;
  3188. exports.default = void 0;
  3189. var _utils = __webpack_require__(0);
  3190. var _popup = __webpack_require__(75);
  3191. var _icon = _interopRequireDefault(__webpack_require__(35));
  3192. var _createNamespace = (0, _utils.createNamespace)('popup'),
  3193. createComponent = _createNamespace[0],
  3194. bem = _createNamespace[1];
  3195. var _default = createComponent({
  3196. mixins: [(0, _popup.PopupMixin)()],
  3197. props: {
  3198. round: Boolean,
  3199. duration: [Number, String],
  3200. closeable: Boolean,
  3201. transition: String,
  3202. safeAreaInsetBottom: Boolean,
  3203. closeIcon: {
  3204. type: String,
  3205. default: 'cross'
  3206. },
  3207. closeIconPosition: {
  3208. type: String,
  3209. default: 'top-right'
  3210. },
  3211. position: {
  3212. type: String,
  3213. default: 'center'
  3214. },
  3215. overlay: {
  3216. type: Boolean,
  3217. default: true
  3218. },
  3219. closeOnClickOverlay: {
  3220. type: Boolean,
  3221. default: true
  3222. }
  3223. },
  3224. beforeCreate: function beforeCreate() {
  3225. var _this = this;
  3226. var createEmitter = function createEmitter(eventName) {
  3227. return function (event) {
  3228. return _this.$emit(eventName, event);
  3229. };
  3230. };
  3231. this.onClick = createEmitter('click');
  3232. this.onOpened = createEmitter('opened');
  3233. this.onClosed = createEmitter('closed');
  3234. },
  3235. methods: {
  3236. onClickCloseIcon: function onClickCloseIcon(event) {
  3237. this.$emit('click-close-icon', event);
  3238. this.close();
  3239. }
  3240. },
  3241. render: function render() {
  3242. var _bem;
  3243. var h = arguments[0];
  3244. if (!this.shouldRender) {
  3245. return;
  3246. }
  3247. var round = this.round,
  3248. position = this.position,
  3249. duration = this.duration;
  3250. var isCenter = position === 'center';
  3251. var transitionName = this.transition || (isCenter ? 'van-fade' : "van-popup-slide-" + position);
  3252. var style = {};
  3253. if ((0, _utils.isDef)(duration)) {
  3254. var key = isCenter ? 'animationDuration' : 'transitionDuration';
  3255. style[key] = duration + "s";
  3256. }
  3257. return h("transition", {
  3258. "attrs": {
  3259. "appear": this.transitionAppear,
  3260. "name": transitionName
  3261. },
  3262. "on": {
  3263. "afterEnter": this.onOpened,
  3264. "afterLeave": this.onClosed
  3265. }
  3266. }, [h("div", {
  3267. "directives": [{
  3268. name: "show",
  3269. value: this.value
  3270. }],
  3271. "style": style,
  3272. "class": bem((_bem = {
  3273. round: round
  3274. }, _bem[position] = position, _bem['safe-area-inset-bottom'] = this.safeAreaInsetBottom, _bem)),
  3275. "on": {
  3276. "click": this.onClick
  3277. }
  3278. }, [this.slots(), this.closeable && h(_icon.default, {
  3279. "attrs": {
  3280. "role": "button",
  3281. "tabindex": "0",
  3282. "name": this.closeIcon
  3283. },
  3284. "class": bem('close-icon', this.closeIconPosition),
  3285. "on": {
  3286. "click": this.onClickCloseIcon
  3287. }
  3288. })])]);
  3289. }
  3290. });
  3291. exports.default = _default;
  3292. /***/ })
  3293. /******/ });