@nutui/nutui-react 1.1.0 → 1.1.2-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/esm/Address.js +11 -11
  3. package/dist/esm/AnimatingNumbers.js +1 -1
  4. package/dist/esm/Avatar.js +2 -2
  5. package/dist/esm/BackTop.js +7 -7
  6. package/dist/esm/Barrage.js +2 -2
  7. package/dist/esm/Calendar.js +1 -1
  8. package/dist/esm/CalendarItem.js +33 -35
  9. package/dist/esm/Card/style/css.js +1 -0
  10. package/dist/esm/Card/style/index.js +1 -0
  11. package/dist/esm/Card.js +68 -0
  12. package/dist/esm/Cell.js +4 -4
  13. package/dist/esm/CircleProgress.js +2 -2
  14. package/dist/esm/Col.js +4 -3
  15. package/dist/esm/Collapse.js +3 -3
  16. package/dist/esm/CollapseItem.js +4 -4
  17. package/dist/esm/DatePicker/style/css.js +1 -0
  18. package/dist/esm/DatePicker/style/index.js +1 -0
  19. package/dist/esm/DatePicker.js +322 -0
  20. package/dist/esm/Divider.js +1 -1
  21. package/dist/esm/Drag.js +1 -1
  22. package/dist/esm/Elevator.js +2 -2
  23. package/dist/esm/FixedNav.js +3 -3
  24. package/dist/esm/Infiniteloading.js +5 -5
  25. package/dist/esm/Input.js +1 -1
  26. package/dist/esm/InputNumber.js +1 -1
  27. package/dist/esm/NoticeBar.js +12 -12
  28. package/dist/esm/Notify.js +7 -7
  29. package/dist/esm/Overlay.js +3 -3
  30. package/dist/esm/Pagination.js +10 -10
  31. package/dist/esm/Picker.js +13 -6
  32. package/dist/esm/Popover.js +8 -8
  33. package/dist/esm/Popup.js +7 -5
  34. package/dist/esm/Price.js +3 -3
  35. package/dist/esm/Range.js +3 -3
  36. package/dist/esm/ShortPassword.js +2 -2
  37. package/dist/esm/Skeleton/style/css.js +1 -0
  38. package/dist/esm/Skeleton/style/index.js +1 -0
  39. package/dist/esm/Skeleton.js +102 -0
  40. package/dist/esm/Step.js +1 -1
  41. package/dist/esm/Steps.js +1 -1
  42. package/dist/esm/Swiper.js +2 -2
  43. package/dist/esm/SwiperItem.js +2 -2
  44. package/dist/esm/Switch.js +2 -1
  45. package/dist/esm/TabPane/style/css.js +1 -0
  46. package/dist/esm/TabPane/style/index.js +1 -0
  47. package/dist/esm/TabPane.js +33 -0
  48. package/dist/esm/Tabs/style/css.js +1 -0
  49. package/dist/esm/Tabs/style/index.js +1 -0
  50. package/dist/esm/Tabs.js +187 -0
  51. package/dist/esm/Tag.js +4 -8
  52. package/dist/esm/TextArea.js +1 -1
  53. package/dist/esm/Toast.js +11 -7
  54. package/dist/esm/Uploader.js +3 -3
  55. package/dist/esm/{date-649fe493.js → date-b4847376.js} +2 -2
  56. package/dist/esm/nutui-react.es.js +5 -0
  57. package/dist/esm/{overlay-418bcf84.js → overlay-ed3eb37d.js} +1 -1
  58. package/dist/nutui.react.es.js +1250 -567
  59. package/dist/nutui.react.umd.js +19 -19
  60. package/dist/packages/card/card.scss +75 -0
  61. package/dist/packages/datepicker/datepicker.scss +2 -0
  62. package/dist/packages/skeleton/skeleton.scss +65 -0
  63. package/dist/packages/tabpane/tabpane.scss +12 -0
  64. package/dist/packages/tabs/tabs.scss +192 -0
  65. package/dist/style.css +1 -1
  66. package/dist/style.es.js +1 -1
  67. package/dist/styles/themes/default.scss +5 -0
  68. package/dist/styles/variables.scss +25 -0
  69. package/dist/types/address/address.d.ts +1 -1
  70. package/dist/types/address/existRender.d.ts +1 -1
  71. package/dist/types/badge/badge.d.ts +1 -1
  72. package/dist/types/card/card.d.ts +17 -0
  73. package/dist/types/card/index.d.ts +2 -0
  74. package/dist/types/datepicker/datepicker.d.ts +16 -0
  75. package/dist/types/datepicker/index.d.ts +2 -0
  76. package/dist/types/nutui.react.d.ts +6 -1
  77. package/dist/types/signature/signature.d.ts +4 -4
  78. package/dist/types/skeleton/index.d.ts +2 -0
  79. package/dist/types/skeleton/skeleton.d.ts +18 -0
  80. package/dist/types/tabpane/index.d.ts +2 -0
  81. package/dist/types/tabpane/tabpane.d.ts +8 -0
  82. package/dist/types/tabs/index.d.ts +2 -0
  83. package/dist/types/tabs/tabs.d.ts +28 -0
  84. package/package.json +6 -1
@@ -34,7 +34,7 @@ var __publicField = (obj, key, value) => {
34
34
  return value;
35
35
  };
36
36
  /*!
37
- * @nutui/nutui-react v1.1.0 Fri Feb 25 2022 16:51:18 GMT+0800 (China Standard Time)
37
+ * @nutui/nutui-react v1.1.2-beta.0 Tue Mar 29 2022 14:06:09 GMT+0800 (China Standard Time)
38
38
  * (c) 2021 @jdf2e.
39
39
  * Released under the MIT License.
40
40
  */
@@ -42,6 +42,54 @@ import * as React from "react";
42
42
  import React__default, { useState, useEffect, Component, useRef, createContext, useContext as useContext$1, forwardRef, useImperativeHandle, memo, useCallback, useMemo } from "react";
43
43
  import * as ReactDOM from "react-dom";
44
44
  import ReactDOM__default, { unstable_batchedUpdates } from "react-dom";
45
+ var classnames = { exports: {} };
46
+ /*!
47
+ Copyright (c) 2018 Jed Watson.
48
+ Licensed under the MIT License (MIT), see
49
+ http://jedwatson.github.io/classnames
50
+ */
51
+ (function(module) {
52
+ (function() {
53
+ var hasOwn = {}.hasOwnProperty;
54
+ function classNames2() {
55
+ var classes = [];
56
+ for (var i = 0; i < arguments.length; i++) {
57
+ var arg = arguments[i];
58
+ if (!arg)
59
+ continue;
60
+ var argType = typeof arg;
61
+ if (argType === "string" || argType === "number") {
62
+ classes.push(arg);
63
+ } else if (Array.isArray(arg)) {
64
+ if (arg.length) {
65
+ var inner = classNames2.apply(null, arg);
66
+ if (inner) {
67
+ classes.push(inner);
68
+ }
69
+ }
70
+ } else if (argType === "object") {
71
+ if (arg.toString === Object.prototype.toString) {
72
+ for (var key in arg) {
73
+ if (hasOwn.call(arg, key) && arg[key]) {
74
+ classes.push(key);
75
+ }
76
+ }
77
+ } else {
78
+ classes.push(arg.toString());
79
+ }
80
+ }
81
+ }
82
+ return classes.join(" ");
83
+ }
84
+ if (module.exports) {
85
+ classNames2.default = classNames2;
86
+ module.exports = classNames2;
87
+ } else {
88
+ window.classNames = classNames2;
89
+ }
90
+ })();
91
+ })(classnames);
92
+ var classNames = classnames.exports;
45
93
  var classname = { exports: {} };
46
94
  var classname_production_min = {};
47
95
  function r$1(r2) {
@@ -56,8 +104,8 @@ function r$1(r2) {
56
104
  }
57
105
  }
58
106
  if (o !== void 0)
59
- for (var c2 = 0, l2 = o.length; c2 < l2; c2++) {
60
- var y2 = o[c2];
107
+ for (var c6 = 0, l2 = o.length; c6 < l2; c6++) {
108
+ var y2 = o[c6];
61
109
  if (y2 && typeof y2.valueOf() == "string")
62
110
  for (var g2 = y2.valueOf().split(" "), d2 = 0; d2 < g2.length; d2++) {
63
111
  var h2 = g2[d2];
@@ -80,7 +128,7 @@ classname_production_min.cn = e$1, classname_production_min.withNaming = r$1;
80
128
  classname.exports = classname_production_min;
81
129
  }
82
130
  const cn = classname.exports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
83
- const defaultProps$R = {
131
+ const defaultProps$W = {
84
132
  name: "",
85
133
  size: "",
86
134
  classPrefix: "nutui-iconfont",
@@ -90,11 +138,11 @@ const defaultProps$R = {
90
138
  },
91
139
  className: ""
92
140
  };
93
- function pxCheck$1(value) {
141
+ function pxCheck$2(value) {
94
142
  return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
95
143
  }
96
144
  const Icon = (props) => {
97
- const _a = __spreadValues(__spreadValues({}, defaultProps$R), props), { name, size, classPrefix, color, tag, children, className, style, click } = _a, rest = __objRest(_a, ["name", "size", "classPrefix", "color", "tag", "children", "className", "style", "click"]);
145
+ const _a = __spreadValues(__spreadValues({}, defaultProps$W), props), { name, size, classPrefix, color, tag, children, className, style, click } = _a, rest = __objRest(_a, ["name", "size", "classPrefix", "color", "tag", "children", "className", "style", "click"]);
98
146
  const isImage = name ? name.indexOf("/") !== -1 : false;
99
147
  const type = isImage ? "img" : tag;
100
148
  const b2 = cn("icon");
@@ -112,65 +160,17 @@ const Icon = (props) => {
112
160
  className: isImage ? `${className || ""} ${b2("img")}` : `${className || ""} ${b2(null, [classPrefix])} nut-icon-${name} `,
113
161
  style: __spreadValues({
114
162
  color,
115
- fontSize: pxCheck$1(size),
116
- width: pxCheck$1(size),
117
- height: pxCheck$1(size)
163
+ fontSize: pxCheck$2(size),
164
+ width: pxCheck$2(size),
165
+ height: pxCheck$2(size)
118
166
  }, style)
119
167
  }, rest), {
120
168
  onClick: handleClick
121
169
  }), hasSrc()), children);
122
170
  };
123
- Icon.defaultProps = defaultProps$R;
171
+ Icon.defaultProps = defaultProps$W;
124
172
  Icon.displayName = "NutIcon";
125
- var classnames = { exports: {} };
126
- /*!
127
- Copyright (c) 2018 Jed Watson.
128
- Licensed under the MIT License (MIT), see
129
- http://jedwatson.github.io/classnames
130
- */
131
- (function(module) {
132
- (function() {
133
- var hasOwn = {}.hasOwnProperty;
134
- function classNames2() {
135
- var classes = [];
136
- for (var i = 0; i < arguments.length; i++) {
137
- var arg = arguments[i];
138
- if (!arg)
139
- continue;
140
- var argType = typeof arg;
141
- if (argType === "string" || argType === "number") {
142
- classes.push(arg);
143
- } else if (Array.isArray(arg)) {
144
- if (arg.length) {
145
- var inner = classNames2.apply(null, arg);
146
- if (inner) {
147
- classes.push(inner);
148
- }
149
- }
150
- } else if (argType === "object") {
151
- if (arg.toString === Object.prototype.toString) {
152
- for (var key in arg) {
153
- if (hasOwn.call(arg, key) && arg[key]) {
154
- classes.push(key);
155
- }
156
- }
157
- } else {
158
- classes.push(arg.toString());
159
- }
160
- }
161
- }
162
- return classes.join(" ");
163
- }
164
- if (module.exports) {
165
- classNames2.default = classNames2;
166
- module.exports = classNames2;
167
- } else {
168
- window.classNames = classNames2;
169
- }
170
- })();
171
- })(classnames);
172
- var classNames = classnames.exports;
173
- const defaultProps$Q = {
173
+ const defaultProps$V = {
174
174
  size: "normal",
175
175
  icon: "",
176
176
  shape: "round",
@@ -179,12 +179,12 @@ const defaultProps$Q = {
179
179
  src: ""
180
180
  };
181
181
  const Avatar = (props) => {
182
- const _a = __spreadValues(__spreadValues({}, defaultProps$Q), props), { children, prefixCls, size, shape, bgColor, src, icon, className, style } = _a, rest = __objRest(_a, ["children", "prefixCls", "size", "shape", "bgColor", "src", "icon", "className", "style"]);
182
+ const _a = __spreadValues(__spreadValues({}, defaultProps$V), props), { children, prefixCls, size, shape, bgColor, src, icon, className, style } = _a, rest = __objRest(_a, ["children", "prefixCls", "size", "shape", "bgColor", "src", "icon", "className", "style"]);
183
183
  const sizeValue = ["large", "normal", "small"];
184
184
  const classes = classNames({
185
185
  [`${prefixCls}`]: true,
186
- ["avatar-" + size]: true,
187
- ["avatar-" + shape]: true
186
+ [`avatar-${size}`]: true,
187
+ [`avatar-${shape}`]: true
188
188
  });
189
189
  const cls = classNames(classes, className);
190
190
  const styles = __spreadValues({
@@ -211,9 +211,9 @@ const Avatar = (props) => {
211
211
  className: "text"
212
212
  }, children));
213
213
  };
214
- Avatar.defaultProps = defaultProps$Q;
214
+ Avatar.defaultProps = defaultProps$V;
215
215
  Avatar.displayName = "NutAvatar";
216
- const defaultProps$P = {
216
+ const defaultProps$U = {
217
217
  className: "",
218
218
  color: "",
219
219
  shape: "round",
@@ -230,7 +230,7 @@ const defaultProps$P = {
230
230
  }
231
231
  };
232
232
  const Button = (props) => {
233
- const _a = __spreadValues(__spreadValues({}, defaultProps$P), props), {
233
+ const _a = __spreadValues(__spreadValues({}, defaultProps$U), props), {
234
234
  color,
235
235
  shape,
236
236
  plain,
@@ -324,7 +324,7 @@ const Button = (props) => {
324
324
  name: icon
325
325
  }) : "", children));
326
326
  };
327
- Button.defaultProps = defaultProps$P;
327
+ Button.defaultProps = defaultProps$U;
328
328
  Button.displayName = "NutButton";
329
329
  function _setPrototypeOf(o, p2) {
330
330
  _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf2(o2, p3) {
@@ -914,13 +914,13 @@ function compile(str, options2) {
914
914
  return tokensToFunction(parse$1(str, options2), options2);
915
915
  }
916
916
  function encodeURIComponentPretty(str) {
917
- return encodeURI(str).replace(/[\/?#]/g, function(c2) {
918
- return "%" + c2.charCodeAt(0).toString(16).toUpperCase();
917
+ return encodeURI(str).replace(/[\/?#]/g, function(c6) {
918
+ return "%" + c6.charCodeAt(0).toString(16).toUpperCase();
919
919
  });
920
920
  }
921
921
  function encodeAsterisk(str) {
922
- return encodeURI(str).replace(/[?#]/g, function(c2) {
923
- return "%" + c2.charCodeAt(0).toString(16).toUpperCase();
922
+ return encodeURI(str).replace(/[?#]/g, function(c6) {
923
+ return "%" + c6.charCodeAt(0).toString(16).toUpperCase();
924
924
  });
925
925
  }
926
926
  function tokensToFunction(tokens, options2) {
@@ -1533,7 +1533,7 @@ var useContext = React__default.useContext;
1533
1533
  function useHistory() {
1534
1534
  return useContext(historyContext);
1535
1535
  }
1536
- const defaultProps$O = {
1536
+ const defaultProps$T = {
1537
1537
  title: "",
1538
1538
  subTitle: "",
1539
1539
  desc: "",
@@ -1549,7 +1549,7 @@ const defaultProps$O = {
1549
1549
  }
1550
1550
  };
1551
1551
  const Cell = (props) => {
1552
- const _a = __spreadValues(__spreadValues({}, defaultProps$O), props), {
1552
+ const _a = __spreadValues(__spreadValues({}, defaultProps$T), props), {
1553
1553
  children,
1554
1554
  click,
1555
1555
  isLink,
@@ -1579,7 +1579,7 @@ const Cell = (props) => {
1579
1579
  "extra"
1580
1580
  ]);
1581
1581
  const b2 = cn("cell");
1582
- let history = useHistory();
1582
+ const history = useHistory();
1583
1583
  const handleClick = (event) => {
1584
1584
  click(event);
1585
1585
  if (to2 && history) {
@@ -1593,10 +1593,10 @@ const Cell = (props) => {
1593
1593
  flex: 1
1594
1594
  };
1595
1595
  return /* @__PURE__ */ React__default.createElement("div", __spreadValues({
1596
- className: `${b2({ clickable: isLink || to2 ? true : false }, [className])} `,
1596
+ className: `${b2({ clickable: !!(isLink || to2) }, [className])} `,
1597
1597
  onClick: (event) => handleClick(event)
1598
- }, rest), children ? children : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, title || subTitle || icon ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("div", {
1599
- className: `${b2("title", { icon: icon ? true : false })}`
1598
+ }, rest), children || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, title || subTitle || icon ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("div", {
1599
+ className: `${b2("title", { icon: !!icon })}`
1600
1600
  }, icon ? /* @__PURE__ */ React__default.createElement(Icon, {
1601
1601
  name: icon,
1602
1602
  className: `${b2("icon")}`
@@ -1607,16 +1607,16 @@ const Cell = (props) => {
1607
1607
  }, subTitle)) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, title))) : null, desc ? /* @__PURE__ */ React__default.createElement("div", {
1608
1608
  className: b2("desc"),
1609
1609
  style: styles
1610
- }, desc) : null), extra ? extra : null, !extra && (isLink || to2) ? /* @__PURE__ */ React__default.createElement(Icon, {
1610
+ }, desc) : null), extra || null, !extra && (isLink || to2) ? /* @__PURE__ */ React__default.createElement(Icon, {
1611
1611
  name: "right",
1612
1612
  className: b2("link")
1613
1613
  }) : null);
1614
1614
  };
1615
- Cell.defaultProps = defaultProps$O;
1615
+ Cell.defaultProps = defaultProps$T;
1616
1616
  Cell.displayName = "NutCell";
1617
- const defaultProps$N = { title: "", classPrefix: "nutui-cell-group" };
1617
+ const defaultProps$S = { title: "", classPrefix: "nutui-cell-group" };
1618
1618
  const CellGroup = (props) => {
1619
- const { children, classPrefix, title } = __spreadValues(__spreadValues({}, defaultProps$N), props);
1619
+ const { children, classPrefix, title } = __spreadValues(__spreadValues({}, defaultProps$S), props);
1620
1620
  const b2 = cn("cell-group");
1621
1621
  return /* @__PURE__ */ React__default.createElement("div", {
1622
1622
  className: b2(null, [classPrefix])
@@ -1626,9 +1626,9 @@ const CellGroup = (props) => {
1626
1626
  className: b2("wrap")
1627
1627
  }, children));
1628
1628
  };
1629
- CellGroup.defaultProps = defaultProps$N;
1629
+ CellGroup.defaultProps = defaultProps$S;
1630
1630
  CellGroup.displayName = "NutCellGroup";
1631
- const defaultProps$M = {
1631
+ const defaultProps$R = {
1632
1632
  price: 0,
1633
1633
  needSymbol: true,
1634
1634
  symbol: "&yen;",
@@ -1637,7 +1637,7 @@ const defaultProps$M = {
1637
1637
  className: ""
1638
1638
  };
1639
1639
  const Price = (props) => {
1640
- const _a = __spreadValues(__spreadValues({}, defaultProps$M), props), { price, needSymbol, symbol, decimalDigits, thousands, className } = _a, rest = __objRest(_a, ["price", "needSymbol", "symbol", "decimalDigits", "thousands", "className"]);
1640
+ const _a = __spreadValues(__spreadValues({}, defaultProps$R), props), { price, needSymbol, symbol, decimalDigits, thousands, className } = _a, rest = __objRest(_a, ["price", "needSymbol", "symbol", "decimalDigits", "thousands", "className"]);
1641
1641
  const b2 = cn("price");
1642
1642
  const showSymbol = () => {
1643
1643
  return { __html: (needSymbol ? symbol : "") || "" };
@@ -1657,9 +1657,8 @@ const Price = (props) => {
1657
1657
  }
1658
1658
  if (thousands) {
1659
1659
  return (num || 0).toString().replace(/(\d)(?=(?:\d{3})+$)/g, "$1,");
1660
- } else {
1661
- return num;
1662
1660
  }
1661
+ return num;
1663
1662
  };
1664
1663
  const formatDecimal = (decimalNum) => {
1665
1664
  if (Number(decimalNum) == 0) {
@@ -1671,7 +1670,7 @@ const Price = (props) => {
1671
1670
  } else {
1672
1671
  decimalNum = 0;
1673
1672
  }
1674
- const result = "0." + decimalNum;
1673
+ const result = `0.${decimalNum}`;
1675
1674
  const resultFixed = Number(result).toFixed(decimalDigits);
1676
1675
  return String(resultFixed).substring(2, resultFixed.length);
1677
1676
  };
@@ -1688,7 +1687,7 @@ const Price = (props) => {
1688
1687
  className: `${b2("small")}`
1689
1688
  }, formatDecimal(price)));
1690
1689
  };
1691
- Price.defaultProps = defaultProps$M;
1690
+ Price.defaultProps = defaultProps$R;
1692
1691
  Price.displayName = "NutPrice";
1693
1692
  const defaultOverlayProps = {
1694
1693
  zIndex: 2e3,
@@ -1754,7 +1753,7 @@ const Overlay = (props) => {
1754
1753
  if (closeOnClickOverlay) {
1755
1754
  props.onClick && props.onClick(e2);
1756
1755
  renderRef.current = false;
1757
- let id = setTimeout(() => {
1756
+ const id = setTimeout(() => {
1758
1757
  setShow(!visible);
1759
1758
  }, duration * 1e3 * 0.8);
1760
1759
  intervalRef.current = id;
@@ -1769,13 +1768,13 @@ const Overlay = (props) => {
1769
1768
  };
1770
1769
  Overlay.defaultProps = defaultOverlayProps;
1771
1770
  Overlay.displayName = "NutOverlay";
1772
- const defaultProps$L = {
1771
+ const defaultProps$Q = {
1773
1772
  contentPosition: "center",
1774
1773
  dashed: false,
1775
1774
  hairline: true
1776
1775
  };
1777
1776
  const Divider = (props) => {
1778
- const { children, contentPosition, dashed, hairline, styles, className } = __spreadValues(__spreadValues({}, defaultProps$L), props);
1777
+ const { children, contentPosition, dashed, hairline, styles, className } = __spreadValues(__spreadValues({}, defaultProps$Q), props);
1779
1778
  const dividerBem = cn("divider");
1780
1779
  const classes = classNames({
1781
1780
  [dividerBem()]: true,
@@ -1790,19 +1789,19 @@ const Divider = (props) => {
1790
1789
  style: styles
1791
1790
  }, children);
1792
1791
  };
1793
- Divider.defaultProps = defaultProps$L;
1792
+ Divider.defaultProps = defaultProps$Q;
1794
1793
  Divider.displayName = "NutDivider";
1795
- const defaultProps$K = {};
1794
+ const defaultProps$P = {};
1796
1795
  const Layout = (props) => {
1797
- __spreadValues(__spreadValues({}, defaultProps$K), props);
1796
+ __spreadValues(__spreadValues({}, defaultProps$P), props);
1798
1797
  return /* @__PURE__ */ React__default.createElement("div", {
1799
1798
  className: "nut-layout"
1800
1799
  }, "Layout");
1801
1800
  };
1802
- Layout.defaultProps = defaultProps$K;
1801
+ Layout.defaultProps = defaultProps$P;
1803
1802
  Layout.displayName = "NutLayout";
1804
1803
  const DataContext$2 = createContext({});
1805
- const defaultProps$J = {
1804
+ const defaultProps$O = {
1806
1805
  type: "",
1807
1806
  justify: "start",
1808
1807
  align: "flex-start",
@@ -1810,7 +1809,7 @@ const defaultProps$J = {
1810
1809
  gutter: "0"
1811
1810
  };
1812
1811
  const Row = (props) => {
1813
- const { children, type, justify, align, wrap, gutter } = __spreadValues(__spreadValues({}, defaultProps$J), props);
1812
+ const { children, type, justify, align, wrap, gutter } = __spreadValues(__spreadValues({}, defaultProps$O), props);
1814
1813
  const prefixCls = "nut-row";
1815
1814
  const getClass = (prefix2, type2) => {
1816
1815
  return prefix2 ? type2 ? `nut-row-${prefix2}-${type2}` : "" : `nut-row-${type2}`;
@@ -1833,18 +1832,18 @@ const Row = (props) => {
1833
1832
  className: getClasses()
1834
1833
  }, children));
1835
1834
  };
1836
- Row.defaultProps = defaultProps$J;
1835
+ Row.defaultProps = defaultProps$O;
1837
1836
  Row.displayName = "NutRow";
1838
- const defaultProps$I = {
1837
+ const defaultProps$N = {
1839
1838
  span: "24",
1840
1839
  offset: "0",
1841
1840
  gutter: "0"
1842
1841
  };
1843
1842
  const Col = (props) => {
1844
- const { span, offset, children } = __spreadValues(__spreadValues({}, defaultProps$I), props);
1843
+ const { span, offset, children } = __spreadValues(__spreadValues({}, defaultProps$N), props);
1845
1844
  const [colName, setColName] = useState("");
1846
1845
  const [colStyle, setColStyle] = useState({});
1847
- const gutter = useContext$1(DataContext$2).gutter;
1846
+ const { gutter } = useContext$1(DataContext$2);
1848
1847
  const classs = () => {
1849
1848
  const prefixCls = "nut-col";
1850
1849
  return `${prefixCls} ${prefixCls}-${span} ${gutter ? `${prefixCls}-gutter` : ""} ${prefixCls}-${offset}`;
@@ -1864,7 +1863,7 @@ const Col = (props) => {
1864
1863
  style: __spreadValues({}, colStyle)
1865
1864
  }, children);
1866
1865
  };
1867
- Col.defaultProps = defaultProps$I;
1866
+ Col.defaultProps = defaultProps$N;
1868
1867
  Col.displayName = "NutCol";
1869
1868
  class Notification$1 extends React.PureComponent {
1870
1869
  constructor(props) {
@@ -1930,17 +1929,17 @@ class Notification$1 extends React.PureComponent {
1930
1929
  this.state;
1931
1930
  const toastBem = cn("toast");
1932
1931
  const classes = classNames({
1933
- ["nut-toast-center"]: center,
1934
- ["nut-toast-has-icon"]: icon,
1935
- ["nut-toast-cover"]: cover,
1936
- ["nut-toast-loading"]: type === "loading",
1932
+ "nut-toast-center": center,
1933
+ "nut-toast-has-icon": icon,
1934
+ "nut-toast-cover": cover,
1935
+ "nut-toast-loading": type === "loading",
1937
1936
  customClass,
1938
- ["nut-toast-" + size]: true
1937
+ [`nut-toast-${size}`]: true
1939
1938
  });
1940
1939
  return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", {
1941
1940
  className: `${toastBem()} ${classes}`,
1942
1941
  style: {
1943
- bottom: center ? "auto" : bottom + "px",
1942
+ bottom: center ? "auto" : `${bottom}px`,
1944
1943
  backgroundColor: cover ? coverColor : ""
1945
1944
  },
1946
1945
  onClick: () => {
@@ -1952,7 +1951,7 @@ class Notification$1 extends React.PureComponent {
1952
1951
  }, icon ? /* @__PURE__ */ React.createElement("p", {
1953
1952
  className: toastBem("icon-wrapper")
1954
1953
  }, /* @__PURE__ */ React.createElement(Icon, {
1955
- name: icon ? icon : "",
1954
+ name: icon || "",
1956
1955
  size: "20"
1957
1956
  })) : null, /* @__PURE__ */ React.createElement("span", {
1958
1957
  className: toastBem("text")
@@ -2028,7 +2027,6 @@ function notice$1(opts) {
2028
2027
  const errorMsg$1 = (msg) => {
2029
2028
  if (!msg) {
2030
2029
  console.warn("[NutUI Toast]: msg\u4E0D\u80FD\u4E3A\u7A7A");
2031
- return;
2032
2030
  }
2033
2031
  };
2034
2032
  var Toast = {
@@ -2063,36 +2061,6 @@ var Toast = {
2063
2061
  }
2064
2062
  }
2065
2063
  };
2066
- const Content = (props) => {
2067
- const { visible, title, footer, textAlign, footerDirection, children } = props;
2068
- let headerNode;
2069
- if (title) {
2070
- headerNode = /* @__PURE__ */ React__default.createElement("div", {
2071
- className: "nut-dialog__header"
2072
- }, title);
2073
- }
2074
- let footerNode;
2075
- if (footer) {
2076
- footerNode = /* @__PURE__ */ React__default.createElement("div", {
2077
- className: classNames("nut-dialog__footer", { [footerDirection]: footerDirection })
2078
- }, footer);
2079
- }
2080
- return /* @__PURE__ */ React__default.createElement("div", {
2081
- className: "nut-dialog__outer"
2082
- }, /* @__PURE__ */ React__default.createElement("div", {
2083
- className: "nut-dialog",
2084
- style: { display: visible ? "flex" : "none" }
2085
- }, headerNode, /* @__PURE__ */ React__default.createElement("div", {
2086
- className: "nut-dialog__content",
2087
- style: { textAlign }
2088
- }, /* @__PURE__ */ React__default.createElement("div", null, children)), footerNode));
2089
- };
2090
- Content.displayName = "NutContent";
2091
- function Mask(props) {
2092
- return /* @__PURE__ */ React.createElement("div", {
2093
- className: "nut-dialog__mask"
2094
- });
2095
- }
2096
2064
  function hasClass(element, className) {
2097
2065
  if (element.classList)
2098
2066
  return !!className && element.classList.contains(className);
@@ -2371,13 +2339,13 @@ Transition.ENTERED = ENTERED;
2371
2339
  Transition.EXITING = EXITING;
2372
2340
  var Transition$1 = Transition;
2373
2341
  var _addClass = function addClass$1(node, classes) {
2374
- return node && classes && classes.split(" ").forEach(function(c2) {
2375
- return addClass(node, c2);
2342
+ return node && classes && classes.split(" ").forEach(function(c6) {
2343
+ return addClass(node, c6);
2376
2344
  });
2377
2345
  };
2378
2346
  var removeClass = function removeClass2(node, classes) {
2379
- return node && classes && classes.split(" ").forEach(function(c2) {
2380
- return removeClass$1(node, c2);
2347
+ return node && classes && classes.split(" ").forEach(function(c6) {
2348
+ return removeClass$1(node, c6);
2381
2349
  });
2382
2350
  };
2383
2351
  var CSSTransition = /* @__PURE__ */ function(_React$Component) {
@@ -2508,6 +2476,36 @@ CSSTransition.defaultProps = {
2508
2476
  };
2509
2477
  CSSTransition.propTypes = {};
2510
2478
  var CSSTransition$1 = CSSTransition;
2479
+ const Content = (props) => {
2480
+ const { visible, title, footer, textAlign, footerDirection, children } = props;
2481
+ let headerNode;
2482
+ if (title) {
2483
+ headerNode = /* @__PURE__ */ React__default.createElement("div", {
2484
+ className: "nut-dialog__header"
2485
+ }, title);
2486
+ }
2487
+ let footerNode;
2488
+ if (footer) {
2489
+ footerNode = /* @__PURE__ */ React__default.createElement("div", {
2490
+ className: classNames("nut-dialog__footer", { [footerDirection]: footerDirection })
2491
+ }, footer);
2492
+ }
2493
+ return /* @__PURE__ */ React__default.createElement("div", {
2494
+ className: "nut-dialog__outer"
2495
+ }, /* @__PURE__ */ React__default.createElement("div", {
2496
+ className: "nut-dialog",
2497
+ style: { display: visible ? "flex" : "none" }
2498
+ }, headerNode, /* @__PURE__ */ React__default.createElement("div", {
2499
+ className: "nut-dialog__content",
2500
+ style: { textAlign }
2501
+ }, /* @__PURE__ */ React__default.createElement("div", null, children)), footerNode));
2502
+ };
2503
+ Content.displayName = "NutContent";
2504
+ function Mask(props) {
2505
+ return /* @__PURE__ */ React.createElement("div", {
2506
+ className: "nut-dialog__mask"
2507
+ });
2508
+ }
2511
2509
  const DialogWrap = (props) => {
2512
2510
  const { className, style, visible, mask, closeOnClickOverlay, lockScroll, onClosed, onCancel } = props;
2513
2511
  const handleClick = (e2) => {
@@ -2550,7 +2548,7 @@ function ConfirmDialog(props) {
2550
2548
  }
2551
2549
  const normalizeConfig = (_config) => {
2552
2550
  if (_config.isNotice) {
2553
- let icon = _config.icon;
2551
+ let { icon } = _config;
2554
2552
  if (!icon && icon !== null) {
2555
2553
  switch (_config.noticeType) {
2556
2554
  case "alert":
@@ -2632,7 +2630,7 @@ function confirm(config2, renderFunc) {
2632
2630
  update: update2
2633
2631
  };
2634
2632
  }
2635
- const defaultProps$H = {
2633
+ const defaultProps$M = {
2636
2634
  okText: "\u786E\u5B9A",
2637
2635
  cancelText: "\u53D6\u6D88",
2638
2636
  mask: true,
@@ -2700,9 +2698,9 @@ Dialog.confirm = (props) => {
2700
2698
  }));
2701
2699
  };
2702
2700
  });
2703
- Dialog.defaultProps = defaultProps$H;
2701
+ Dialog.defaultProps = defaultProps$M;
2704
2702
  Dialog.displayName = "NutDialog";
2705
- const defaultProps$G = __spreadValues({
2703
+ const defaultProps$L = __spreadValues({
2706
2704
  position: "center",
2707
2705
  transition: "",
2708
2706
  style: {},
@@ -2756,7 +2754,7 @@ const Popup = (props) => {
2756
2754
  onClosed,
2757
2755
  onClick
2758
2756
  } = props;
2759
- const [index2, setIndex] = useState(zIndex ? zIndex : _zIndex);
2757
+ const [index2, setIndex] = useState(zIndex || _zIndex);
2760
2758
  const [innerVisible, setInnerVisible] = useState(visible);
2761
2759
  const [showChildren, setShowChildren] = useState(true);
2762
2760
  const [transitionName, setTransitionName] = useState("");
@@ -2768,7 +2766,7 @@ const Popup = (props) => {
2768
2766
  const overlayStyles = __spreadValues(__spreadValues({}, overlayStyle), baseStyle);
2769
2767
  const popStyles = __spreadValues(__spreadValues({}, style), baseStyle);
2770
2768
  const classes = classNames({
2771
- ["round"]: round,
2769
+ round,
2772
2770
  [`popup-${position}`]: true,
2773
2771
  [`${popClass}`]: true,
2774
2772
  [`${className}`]: true
@@ -2822,7 +2820,7 @@ const Popup = (props) => {
2822
2820
  !visible && close();
2823
2821
  }, [visible]);
2824
2822
  useEffect(() => {
2825
- setTransitionName(transition ? transition : `popup-slide-${position}`);
2823
+ setTransitionName(transition || `popup-slide-${position}`);
2826
2824
  }, [position]);
2827
2825
  return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Overlay, {
2828
2826
  style: overlayStyles,
@@ -2851,9 +2849,9 @@ const Popup = (props) => {
2851
2849
  size: "12px"
2852
2850
  })) : "")));
2853
2851
  };
2854
- Popup.defaultProps = defaultProps$G;
2852
+ Popup.defaultProps = defaultProps$L;
2855
2853
  Popup.displayName = "NutPopup";
2856
- const defaultProps$F = {
2854
+ const defaultProps$K = {
2857
2855
  cancelTxt: "",
2858
2856
  optionTag: "name",
2859
2857
  optionSubTag: "subname",
@@ -2871,7 +2869,7 @@ const defaultProps$F = {
2871
2869
  style: {}
2872
2870
  };
2873
2871
  const ActionSheet = (props) => {
2874
- const _a = __spreadValues(__spreadValues({}, defaultProps$F), props), {
2872
+ const _a = __spreadValues(__spreadValues({}, defaultProps$K), props), {
2875
2873
  cancelTxt,
2876
2874
  optionTag,
2877
2875
  optionSubTag,
@@ -2942,7 +2940,7 @@ const ActionSheet = (props) => {
2942
2940
  onClick: () => cancelActionSheet()
2943
2941
  }, cancelTxt)));
2944
2942
  };
2945
- ActionSheet.defaultProps = defaultProps$F;
2943
+ ActionSheet.defaultProps = defaultProps$K;
2946
2944
  ActionSheet.displayName = "NutActionSheet";
2947
2945
  const InternalPickerSlot = (props, ref) => {
2948
2946
  const { isUpdate, keyIndex = 0, defaultValue, listData = [], chooseItem } = props;
@@ -2981,9 +2979,8 @@ const InternalPickerSlot = (props, ref) => {
2981
2979
  const isHidden = (index2) => {
2982
2980
  if (index2 >= currIndex + 8 || index2 <= currIndex - 8) {
2983
2981
  return true;
2984
- } else {
2985
- return false;
2986
2982
  }
2983
+ return false;
2987
2984
  };
2988
2985
  const setTransform = (translateY = 0, type, time = 1e3, deg) => {
2989
2986
  if (type === "end") {
@@ -3048,8 +3045,8 @@ const InternalPickerSlot = (props, ref) => {
3048
3045
  let move = changedTouches.pageY - touchParams.startY;
3049
3046
  let moveTime = lastTime - touchParams.startTime;
3050
3047
  if (moveTime <= 300) {
3051
- move = move * 2;
3052
- moveTime = moveTime + 1e3;
3048
+ move *= 2;
3049
+ moveTime += 1e3;
3053
3050
  setMove(move, "end", moveTime);
3054
3051
  } else {
3055
3052
  setMove(move, "end", moveTime);
@@ -3065,6 +3062,13 @@ const InternalPickerSlot = (props, ref) => {
3065
3062
  return true;
3066
3063
  }
3067
3064
  });
3065
+ } else if (value && !value.value) {
3066
+ listData.some((item, idx) => {
3067
+ if (item == value) {
3068
+ index2 = idx;
3069
+ return true;
3070
+ }
3071
+ });
3068
3072
  } else {
3069
3073
  index2 = listData.indexOf(defaultValue);
3070
3074
  }
@@ -3168,7 +3172,7 @@ const InternalPicker = (props, ref) => {
3168
3172
  if (!value)
3169
3173
  return;
3170
3174
  setcacheValueData((data) => {
3171
- let cache = [...cacheValueData2];
3175
+ const cache = [...cacheValueData2];
3172
3176
  cache.splice(index2, 1, value);
3173
3177
  return cache;
3174
3178
  });
@@ -3191,7 +3195,7 @@ const InternalPicker = (props, ref) => {
3191
3195
  };
3192
3196
  const chooseItem = (value, index2) => {
3193
3197
  setcacheValueData((data) => {
3194
- let cacheData = [...data];
3198
+ const cacheData = [...data];
3195
3199
  if (cacheData[index2] != value) {
3196
3200
  cacheData[index2] = value;
3197
3201
  onChoose && onChoose(index2, value, cacheData, pickerRef);
@@ -3221,7 +3225,7 @@ const InternalPicker = (props, ref) => {
3221
3225
  onClose && onClose();
3222
3226
  }
3223
3227
  }, /* @__PURE__ */ React__default.createElement("div", __spreadValues({
3224
- className: `${b2()} ${className ? className : ""}`,
3228
+ className: `${b2()} ${className || ""}`,
3225
3229
  style
3226
3230
  }, rest), /* @__PURE__ */ React__default.createElement("div", {
3227
3231
  className: b2("control")
@@ -3230,7 +3234,7 @@ const InternalPicker = (props, ref) => {
3230
3234
  onClick: () => closeActionSheet()
3231
3235
  }, "\u53D6\u6D88"), /* @__PURE__ */ React__default.createElement("div", {
3232
3236
  className: b2("title")
3233
- }, title ? title : ""), /* @__PURE__ */ React__default.createElement("span", {
3237
+ }, title || ""), /* @__PURE__ */ React__default.createElement("span", {
3234
3238
  className: b2("confirm-btn"),
3235
3239
  onClick: () => confirm2()
3236
3240
  }, "\u786E\u5B9A")), /* @__PURE__ */ React__default.createElement("div", {
@@ -3249,7 +3253,7 @@ const InternalPicker = (props, ref) => {
3249
3253
  }))));
3250
3254
  };
3251
3255
  const Picker = React__default.forwardRef(InternalPicker);
3252
- const defaultProps$E = {
3256
+ const defaultProps$J = {
3253
3257
  hasMore: true,
3254
3258
  threshold: 200,
3255
3259
  containerId: "",
@@ -3263,7 +3267,7 @@ const defaultProps$E = {
3263
3267
  loadMoreTxt: "\u54CE\u5440\uFF0C\u8FD9\u91CC\u662F\u5E95\u90E8\u4E86\u5566"
3264
3268
  };
3265
3269
  const Infiniteloading = (props) => {
3266
- const _a = __spreadValues(__spreadValues({}, defaultProps$E), props), {
3270
+ const _a = __spreadValues(__spreadValues({}, defaultProps$J), props), {
3267
3271
  children,
3268
3272
  hasMore,
3269
3273
  threshold,
@@ -3333,16 +3337,15 @@ const Infiniteloading = (props) => {
3333
3337
  };
3334
3338
  };
3335
3339
  const getParentElement = (el) => {
3336
- return !!containerId ? document.querySelector(`#${containerId}`) : el && el.parentNode;
3340
+ return containerId ? document.querySelector(`#${containerId}`) : el && el.parentNode;
3337
3341
  };
3338
3342
  const handleScroll = () => {
3339
3343
  requestAniFrame2()(() => {
3340
3344
  if (!isScrollAtBottom() || !hasMore || isInfiniting) {
3341
3345
  return false;
3342
- } else {
3343
- setIsInfiniting(true);
3344
- loadMore && loadMore(infiniteDone);
3345
3346
  }
3347
+ setIsInfiniting(true);
3348
+ loadMore && loadMore(infiniteDone);
3346
3349
  });
3347
3350
  };
3348
3351
  const infiniteDone = () => {
@@ -3452,7 +3455,7 @@ const Infiniteloading = (props) => {
3452
3455
  className: "tips"
3453
3456
  }, loadMoreTxt)));
3454
3457
  };
3455
- Infiniteloading.defaultProps = defaultProps$E;
3458
+ Infiniteloading.defaultProps = defaultProps$J;
3456
3459
  Infiniteloading.displayName = "NutInfiniteloading";
3457
3460
  function fillRef(ref, node) {
3458
3461
  if (typeof ref === "function") {
@@ -3509,7 +3512,7 @@ const getEleAttr = (ele) => {
3509
3512
  }
3510
3513
  return null;
3511
3514
  };
3512
- const defaultProps$D = {
3515
+ const defaultProps$I = {
3513
3516
  list: [],
3514
3517
  theme: "light",
3515
3518
  location: "bottom",
@@ -3519,9 +3522,9 @@ const defaultProps$D = {
3519
3522
  }
3520
3523
  };
3521
3524
  const Popover = (props) => {
3522
- const _a = __spreadValues(__spreadValues({}, defaultProps$D), props), { children, list, theme, location: location2, visible, className, style, onClick } = _a, reset = __objRest(_a, ["children", "list", "theme", "location", "visible", "className", "style", "onClick"]);
3525
+ const _a = __spreadValues(__spreadValues({}, defaultProps$I), props), { children, list, theme, location: location2, visible, className, style, onClick } = _a, reset = __objRest(_a, ["children", "list", "theme", "location", "visible", "className", "style", "onClick"]);
3523
3526
  const goodItem = useRef(null);
3524
- let aa = goodItem.current && findDOMNode(goodItem.current);
3527
+ const aa = goodItem.current && findDOMNode(goodItem.current);
3525
3528
  setTimeout(() => {
3526
3529
  if (aa) {
3527
3530
  setElWidth(getEleAttr(aa).width);
@@ -3553,10 +3556,10 @@ const Popover = (props) => {
3553
3556
  style2.top = elHeight + 20;
3554
3557
  style2.left = 0;
3555
3558
  }
3556
- style2.top = style2.top + "px";
3557
- style2.left = style2.left + "px";
3558
- style2.bottom = style2.bottom + "px";
3559
- style2.right = style2.right + "px";
3559
+ style2.top += "px";
3560
+ style2.left += "px";
3561
+ style2.bottom += "px";
3562
+ style2.right += "px";
3560
3563
  return style2;
3561
3564
  };
3562
3565
  const getArrowStyle = () => {
@@ -3574,10 +3577,10 @@ const Popover = (props) => {
3574
3577
  style2.left = elWidth / 2;
3575
3578
  style2.top = -20;
3576
3579
  }
3577
- style2.top = style2.top + "px";
3578
- style2.left = style2.left + "px";
3579
- style2.bottom = style2.bottom + "px";
3580
- style2.right = style2.right + "px";
3580
+ style2.top += "px";
3581
+ style2.left += "px";
3582
+ style2.bottom += "px";
3583
+ style2.right += "px";
3581
3584
  return style2;
3582
3585
  };
3583
3586
  const classes_self = () => {
@@ -3625,9 +3628,9 @@ const Popover = (props) => {
3625
3628
  }, item.name));
3626
3629
  })) : null)));
3627
3630
  };
3628
- Popover.defaultProps = defaultProps$D;
3631
+ Popover.defaultProps = defaultProps$I;
3629
3632
  Popover.displayName = "NutPopover";
3630
- const defaultProps$C = {
3633
+ const defaultProps$H = {
3631
3634
  activeName: ["0"],
3632
3635
  accordion: false,
3633
3636
  icon: "",
@@ -3639,7 +3642,7 @@ function areEqual(prevProps, nextProps) {
3639
3642
  return JSON.stringify(prevProps.activeName) == JSON.stringify(nextProps.activeName);
3640
3643
  }
3641
3644
  const Collapse = memo((props) => {
3642
- const { children, activeName, accordion, icon, rotate, iconSize, iconColor, change } = __spreadValues(__spreadValues({}, defaultProps$C), props);
3645
+ const { children, activeName, accordion, icon, rotate, iconSize, iconColor, change } = __spreadValues(__spreadValues({}, defaultProps$H), props);
3643
3646
  const childrenDom = React__default.Children.toArray(children);
3644
3647
  const [defaultOpenIndex, setDefaultOpenIndex] = useState([]);
3645
3648
  const handleActiveName = () => {
@@ -3692,9 +3695,9 @@ const Collapse = memo((props) => {
3692
3695
  });
3693
3696
  }));
3694
3697
  }, areEqual);
3695
- Collapse.defaultProps = defaultProps$C;
3698
+ Collapse.defaultProps = defaultProps$H;
3696
3699
  Collapse.displayName = "NutCollapse";
3697
- const defaultProps$B = {
3700
+ const defaultProps$G = {
3698
3701
  title: "",
3699
3702
  name: "",
3700
3703
  isOpen: false,
@@ -3726,7 +3729,7 @@ const CollapseItem = (props) => {
3726
3729
  titleIconSize,
3727
3730
  iconSize,
3728
3731
  iconColor
3729
- } = __spreadValues(__spreadValues({}, defaultProps$B), props);
3732
+ } = __spreadValues(__spreadValues({}, defaultProps$G), props);
3730
3733
  const [domHeight, setDomHeight] = useState(-1);
3731
3734
  const [currHeight, setCurrHeight] = useState("auto");
3732
3735
  const [update2, setUpdate] = useState(false);
@@ -3745,9 +3748,9 @@ const CollapseItem = (props) => {
3745
3748
  }, [children, update2]);
3746
3749
  useEffect(() => {
3747
3750
  if (domHeight !== -1) {
3748
- isOpen ? setCurrHeight(domHeight + "px") : setCurrHeight("0px");
3751
+ isOpen ? setCurrHeight(`${domHeight}px`) : setCurrHeight("0px");
3749
3752
  }
3750
- let newIconStyle = isOpen ? { transform: `translateY(-50%) rotate(${rotate}deg)` } : { transform: "translateY(-50%)" };
3753
+ const newIconStyle = isOpen ? { transform: `translateY(-50%) rotate(${rotate}deg)` } : { transform: "translateY(-50%)" };
3751
3754
  setIconStyle(newIconStyle);
3752
3755
  }, [isOpen, domHeight]);
3753
3756
  return /* @__PURE__ */ React__default.createElement("div", {
@@ -3792,7 +3795,7 @@ const CollapseItem = (props) => {
3792
3795
  className: colBem("content-text")
3793
3796
  }, children)));
3794
3797
  };
3795
- CollapseItem.defaultProps = defaultProps$B;
3798
+ CollapseItem.defaultProps = defaultProps$G;
3796
3799
  CollapseItem.displayName = "NutCollapseItem";
3797
3800
  const MIN_DISTANCE = 10;
3798
3801
  function getDirection(x2, y2) {
@@ -3828,8 +3831,8 @@ function useTouch() {
3828
3831
  };
3829
3832
  const move = (event) => {
3830
3833
  const touch = event.touches[0];
3831
- let dX = touch.clientX - startX;
3832
- let dY = touch.clientY - startY;
3834
+ const dX = touch.clientX - startX;
3835
+ const dY = touch.clientY - startY;
3833
3836
  SetDeltaX(dX);
3834
3837
  SetDeltaY(dY);
3835
3838
  SetOffsetX(Math.abs(dX));
@@ -3882,7 +3885,7 @@ const useRect = (elementRef) => {
3882
3885
  height: 0
3883
3886
  };
3884
3887
  };
3885
- const defaultProps$A = {
3888
+ const defaultProps$F = {
3886
3889
  range: false,
3887
3890
  hiddenRange: false,
3888
3891
  hiddenTag: false,
@@ -3911,7 +3914,7 @@ const Range = (props) => {
3911
3914
  change,
3912
3915
  dragStart,
3913
3916
  dragEnd
3914
- } = __spreadValues(__spreadValues({}, defaultProps$A), props);
3917
+ } = __spreadValues(__spreadValues({}, defaultProps$F), props);
3915
3918
  const [buttonIndex, SetButtonIndex] = useState(0);
3916
3919
  const [initValue, SetInitValue] = useState();
3917
3920
  const [dragStatus, SetDragStatus] = useState("start");
@@ -3945,14 +3948,14 @@ const Range = (props) => {
3945
3948
  return !!range && Array.isArray(val);
3946
3949
  };
3947
3950
  const calcMainAxis = () => {
3948
- let modelVal = initValue || initValue === 0 ? initValue : modelValue;
3951
+ const modelVal = initValue || initValue === 0 ? initValue : modelValue;
3949
3952
  if (isRange(modelVal)) {
3950
3953
  return `${(modelVal[1] - modelVal[0]) * 100 / scope()}%`;
3951
3954
  }
3952
3955
  return `${(modelVal - Number(min)) * 100 / scope()}%`;
3953
3956
  };
3954
3957
  const calcOffset = () => {
3955
- let modelVal = initValue || initValue === 0 ? initValue : modelValue;
3958
+ const modelVal = initValue || initValue === 0 ? initValue : modelValue;
3956
3959
  if (isRange(modelVal)) {
3957
3960
  return `${(modelVal[0] - Number(min)) * 100 / scope()}%`;
3958
3961
  }
@@ -3985,7 +3988,7 @@ const Range = (props) => {
3985
3988
  } else {
3986
3989
  value = format(value);
3987
3990
  }
3988
- let modelVal = initValue || initValue === 0 ? initValue : modelValue;
3991
+ const modelVal = initValue || initValue === 0 ? initValue : modelValue;
3989
3992
  if (!isSameValue(value, modelVal)) {
3990
3993
  SetInitValue(value);
3991
3994
  }
@@ -4037,12 +4040,12 @@ const Range = (props) => {
4037
4040
  SetDragStatus("");
4038
4041
  };
4039
4042
  const curValue = (idx) => {
4040
- let modelVal = initValue || initValue === 0 ? initValue : modelValue;
4043
+ const modelVal = initValue || initValue === 0 ? initValue : modelValue;
4041
4044
  const value = typeof idx === "number" ? modelVal[idx] : modelVal;
4042
4045
  return value;
4043
4046
  };
4044
4047
  return /* @__PURE__ */ React__default.createElement("div", {
4045
- className: `nut-range-container ${className ? className : ""}`
4048
+ className: `nut-range-container ${className || ""}`
4046
4049
  }, !hiddenRange ? /* @__PURE__ */ React__default.createElement("div", {
4047
4050
  className: "min"
4048
4051
  }, +min) : null, /* @__PURE__ */ React__default.createElement("div", {
@@ -4082,7 +4085,7 @@ const Range = (props) => {
4082
4085
  onClick: (e2) => {
4083
4086
  e2.stopPropagation();
4084
4087
  }
4085
- }, button ? button : /* @__PURE__ */ React__default.createElement("div", {
4088
+ }, button || /* @__PURE__ */ React__default.createElement("div", {
4086
4089
  className: "nut-range-button",
4087
4090
  style: buttonStyle()
4088
4091
  }, !hiddenTag ? /* @__PURE__ */ React__default.createElement("div", {
@@ -4111,7 +4114,7 @@ const Range = (props) => {
4111
4114
  onClick: (e2) => {
4112
4115
  e2.stopPropagation();
4113
4116
  }
4114
- }, button ? button : /* @__PURE__ */ React__default.createElement("div", {
4117
+ }, button || /* @__PURE__ */ React__default.createElement("div", {
4115
4118
  className: "nut-range-button",
4116
4119
  style: buttonStyle()
4117
4120
  }, !hiddenTag ? /* @__PURE__ */ React__default.createElement("div", {
@@ -4120,16 +4123,16 @@ const Range = (props) => {
4120
4123
  className: "max"
4121
4124
  }, +max) : null);
4122
4125
  };
4123
- Range.defaultProps = defaultProps$A;
4126
+ Range.defaultProps = defaultProps$F;
4124
4127
  Range.displayName = "NutRange";
4125
- const defaultProps$z = {
4128
+ const defaultProps$E = {
4126
4129
  strokeInnerWidth: 10,
4127
4130
  progress: 10,
4128
4131
  isAuto: false,
4129
4132
  progressOption: {}
4130
4133
  };
4131
4134
  const CircleProgress = (props) => {
4132
- const _a = __spreadValues(__spreadValues({}, defaultProps$z), props), {
4135
+ const _a = __spreadValues(__spreadValues({}, defaultProps$E), props), {
4133
4136
  children,
4134
4137
  strokeInnerWidth,
4135
4138
  progress,
@@ -4149,7 +4152,7 @@ const CircleProgress = (props) => {
4149
4152
  const b2 = cn("circleprogress");
4150
4153
  const classes = classNames(className, b2(""));
4151
4154
  const option = () => {
4152
- let baseOption = {
4155
+ const baseOption = {
4153
4156
  radius: 50,
4154
4157
  strokeOutWidth: 10,
4155
4158
  backColor: "#d9d9d9",
@@ -4162,7 +4165,7 @@ const CircleProgress = (props) => {
4162
4165
  Object.assign(baseOption, progressOption);
4163
4166
  baseOption.cy = baseOption.cx = baseOption.radius + baseOption.strokeOutWidth;
4164
4167
  baseOption.size = (baseOption.radius + baseOption.strokeOutWidth) * 2;
4165
- baseOption.startPosition = "rotate(-90," + baseOption.cx + "," + baseOption.cy + ")";
4168
+ baseOption.startPosition = `rotate(-90,${baseOption.cx},${baseOption.cy})`;
4166
4169
  return baseOption;
4167
4170
  };
4168
4171
  const styles = __spreadValues({
@@ -4170,8 +4173,8 @@ const CircleProgress = (props) => {
4170
4173
  width: `${option().size}px`
4171
4174
  }, style);
4172
4175
  const arcLength = () => {
4173
- let circleLength = Math.floor(2 * Math.PI * option().radius);
4174
- let progressLength = progress / 100 * circleLength;
4176
+ const circleLength = Math.floor(2 * Math.PI * option().radius);
4177
+ const progressLength = progress / 100 * circleLength;
4175
4178
  return `${progressLength},${circleLength}`;
4176
4179
  };
4177
4180
  return /* @__PURE__ */ React__default.createElement("div", __spreadValues({
@@ -4203,9 +4206,9 @@ const CircleProgress = (props) => {
4203
4206
  className: "nut-circleprogress-content"
4204
4207
  }, !isAuto ? `${progress}%` : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children)));
4205
4208
  };
4206
- CircleProgress.defaultProps = defaultProps$z;
4209
+ CircleProgress.defaultProps = defaultProps$E;
4207
4210
  CircleProgress.displayName = "NutCircleProgress";
4208
- const defaultProps$y = {
4211
+ const defaultProps$D = {
4209
4212
  direction: "across",
4210
4213
  list: [],
4211
4214
  standTime: 1e3,
@@ -4243,11 +4246,11 @@ const NoticeBar = (props) => {
4243
4246
  rightIcon,
4244
4247
  close,
4245
4248
  click
4246
- } = __spreadValues(__spreadValues({}, defaultProps$y), props);
4249
+ } = __spreadValues(__spreadValues({}, defaultProps$D), props);
4247
4250
  const wrap = useRef(null);
4248
4251
  const content = useRef(null);
4249
4252
  const [showNoticeBar, SetShowNoticeBar] = useState(true);
4250
- let scrollList = useRef([]);
4253
+ const scrollList = useRef([]);
4251
4254
  const [wrapWidth, SetWrapWidth] = useState(0);
4252
4255
  const [firstRound, SetFirstRound] = useState(true);
4253
4256
  const [duration, SetDuration] = useState(0);
@@ -4260,7 +4263,7 @@ const NoticeBar = (props) => {
4260
4263
  useEffect(() => {
4261
4264
  if (direction === "vertical") {
4262
4265
  if (children) {
4263
- let arr = [];
4266
+ const arr = [];
4264
4267
  React__default.Children.map(children, (child) => {
4265
4268
  arr.push(child.props.children);
4266
4269
  });
@@ -4335,7 +4338,7 @@ const NoticeBar = (props) => {
4335
4338
  };
4336
4339
  const startRollEasy = () => {
4337
4340
  showhorseLamp();
4338
- let timerCurr = window.setInterval(showhorseLamp, ~~(height / speed / 4) * 1e3 + Number(standTime));
4341
+ const timerCurr = window.setInterval(showhorseLamp, ~~(height / speed / 4) * 1e3 + Number(standTime));
4339
4342
  SetTimer(timerCurr);
4340
4343
  };
4341
4344
  const showhorseLamp = () => {
@@ -4347,10 +4350,10 @@ const NoticeBar = (props) => {
4347
4350
  }, ~~(height / speed / 4) * 1e3);
4348
4351
  };
4349
4352
  const startRoll = () => {
4350
- let timerCurr = setInterval(() => {
4351
- let chunk = 100;
4353
+ const timerCurr = setInterval(() => {
4354
+ const chunk = 100;
4352
4355
  for (let i = 0; i < chunk; i++) {
4353
- scroll(i, i < chunk - 1 ? false : true);
4356
+ scroll(i, !(i < chunk - 1));
4354
4357
  }
4355
4358
  }, Number(standTime) + 100 * speed);
4356
4359
  SetTimer(timerCurr);
@@ -4376,9 +4379,9 @@ const NoticeBar = (props) => {
4376
4379
  close && close(scrollList[0]);
4377
4380
  };
4378
4381
  const contentStyle = {
4379
- paddingLeft: firstRound ? 0 : wrapWidth + "px",
4380
- animationDelay: (firstRound ? props.delay : 0) + "s",
4381
- animationDuration: duration + "s"
4382
+ paddingLeft: firstRound ? 0 : `${wrapWidth}px`,
4383
+ animationDelay: `${firstRound ? props.delay : 0}s`,
4384
+ animationDuration: `${duration}s`
4382
4385
  };
4383
4386
  const barStyle = {
4384
4387
  color,
@@ -4398,7 +4401,7 @@ const NoticeBar = (props) => {
4398
4401
  wrapable
4399
4402
  });
4400
4403
  return /* @__PURE__ */ React__default.createElement("div", {
4401
- className: `${b2()} ${className ? className : ""}`,
4404
+ className: `${b2()} ${className || ""}`,
4402
4405
  style
4403
4406
  }, showNoticeBar && direction == "across" ? /* @__PURE__ */ React__default.createElement("div", {
4404
4407
  className: noticebarClass,
@@ -4406,7 +4409,7 @@ const NoticeBar = (props) => {
4406
4409
  onClick: handleClick
4407
4410
  }, /* @__PURE__ */ React__default.createElement("div", {
4408
4411
  className: "left-icon",
4409
- style: { backgroundImage: `url(${leftIcon ? leftIcon : ""})` }
4412
+ style: { backgroundImage: `url(${leftIcon || ""})` }
4410
4413
  }, !leftIcon ? /* @__PURE__ */ React__default.createElement(Icon, {
4411
4414
  name: "notice",
4412
4415
  size: "16",
@@ -4450,13 +4453,13 @@ const NoticeBar = (props) => {
4450
4453
  onClick: () => {
4451
4454
  handleClickIcon();
4452
4455
  }
4453
- }, rightIcon ? rightIcon : closeMode ? /* @__PURE__ */ React__default.createElement(Icon, {
4456
+ }, rightIcon || (closeMode ? /* @__PURE__ */ React__default.createElement(Icon, {
4454
4457
  name: "cross",
4455
4458
  color,
4456
4459
  size: "11px"
4457
- }) : null)) : null);
4460
+ }) : null))) : null);
4458
4461
  };
4459
- NoticeBar.defaultProps = defaultProps$y;
4462
+ NoticeBar.defaultProps = defaultProps$D;
4460
4463
  NoticeBar.displayName = "NutNoticeBar";
4461
4464
  class Notification extends React.PureComponent {
4462
4465
  constructor(props) {
@@ -4509,8 +4512,8 @@ class Notification extends React.PureComponent {
4509
4512
  this.state;
4510
4513
  cn("notify");
4511
4514
  const classes = classNames({
4512
- ["popup-top"]: true,
4513
- ["nut-notify"]: true,
4515
+ "popup-top": true,
4516
+ "nut-notify": true,
4514
4517
  [`nut-notify--${type}`]: true
4515
4518
  });
4516
4519
  return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(CSSTransition$1, {
@@ -4523,13 +4526,13 @@ class Notification extends React.PureComponent {
4523
4526
  className: `${classes} ${className}`,
4524
4527
  style: { color: `${color || ""}`, background: `${background || ""}` },
4525
4528
  onClick: this.clickCover
4526
- }, children ? children : msg)));
4529
+ }, children || msg)));
4527
4530
  }
4528
4531
  }
4529
4532
  __publicField(Notification, "newInstance");
4530
4533
  Notification.newInstance = (properties, callback) => {
4531
4534
  const element = document.createElement("div");
4532
- let id = properties.id ? properties.id : new Date().getTime() + "";
4535
+ const id = properties.id ? properties.id : `${new Date().getTime()}`;
4533
4536
  element.id = id;
4534
4537
  properties.id = id;
4535
4538
  document.body.appendChild(element);
@@ -4583,7 +4586,6 @@ function notice(opts) {
4583
4586
  const errorMsg = (msg) => {
4584
4587
  if (!msg) {
4585
4588
  console.warn("[NutUI Notify]: msg\u4E0D\u80FD\u4E3A\u7A7A");
4586
- return;
4587
4589
  }
4588
4590
  };
4589
4591
  var Notify = {
@@ -4614,7 +4616,7 @@ var Notify = {
4614
4616
  }
4615
4617
  }
4616
4618
  };
4617
- const defaultProps$x = {
4619
+ const defaultProps$C = {
4618
4620
  isAsync: false,
4619
4621
  checked: false,
4620
4622
  disable: false,
@@ -4636,7 +4638,7 @@ const Switch = (props) => {
4636
4638
  change,
4637
4639
  className,
4638
4640
  style
4639
- } = __spreadValues(__spreadValues({}, defaultProps$x), props);
4641
+ } = __spreadValues(__spreadValues({}, defaultProps$C), props);
4640
4642
  const [value, setValue] = useState(false);
4641
4643
  const b2 = cn("switch");
4642
4644
  useEffect(() => {
@@ -4646,7 +4648,9 @@ const Switch = (props) => {
4646
4648
  return `${b2()} ${value ? "switch-open" : "switch-close"} ${disable ? `${b2()}-disable` : ""} ${`${b2()}-base`} ${className}`;
4647
4649
  };
4648
4650
  const styles = () => {
4649
- const myStyle = Object.assign({}, { backgroundColor: value ? activeColor : inactiveColor }, style || {});
4651
+ const myStyle = __spreadValues({
4652
+ backgroundColor: value ? activeColor : inactiveColor
4653
+ }, style || {});
4650
4654
  return myStyle;
4651
4655
  };
4652
4656
  const onClick = (event) => {
@@ -4671,9 +4675,9 @@ const Switch = (props) => {
4671
4675
  className: `${b2("label")} close`
4672
4676
  }, inactiveText))));
4673
4677
  };
4674
- Switch.defaultProps = defaultProps$x;
4678
+ Switch.defaultProps = defaultProps$C;
4675
4679
  Switch.displayName = "NutSwitch";
4676
- const defaultProps$w = {
4680
+ const defaultProps$B = {
4677
4681
  title: "",
4678
4682
  desc: "",
4679
4683
  leftShow: false,
@@ -4694,7 +4698,7 @@ const NavBar = (props) => {
4694
4698
  onClickIcon,
4695
4699
  onClickBack,
4696
4700
  onClickClear
4697
- } = __spreadValues(__spreadValues({}, defaultProps$w), props);
4701
+ } = __spreadValues(__spreadValues({}, defaultProps$B), props);
4698
4702
  const b2 = cn("navbar");
4699
4703
  return /* @__PURE__ */ React__default.createElement("div", {
4700
4704
  className: `nut-navbar ${className}`,
@@ -4717,9 +4721,9 @@ const NavBar = (props) => {
4717
4721
  name: icon
4718
4722
  })));
4719
4723
  };
4720
- NavBar.defaultProps = defaultProps$w;
4724
+ NavBar.defaultProps = defaultProps$B;
4721
4725
  NavBar.displayName = "NutNavBar";
4722
- const defaultProps$v = {
4726
+ const defaultProps$A = {
4723
4727
  visible: 0,
4724
4728
  bottom: false,
4725
4729
  type: "",
@@ -4732,7 +4736,7 @@ const defaultProps$v = {
4732
4736
  }
4733
4737
  };
4734
4738
  const Tabbar = (props) => {
4735
- const { children, visible, bottom, activeColor, unactiveColor, className, style, tabSwitch } = __spreadValues(__spreadValues({}, defaultProps$v), props);
4739
+ const { children, visible, bottom, activeColor, unactiveColor, className, style, tabSwitch } = __spreadValues(__spreadValues({}, defaultProps$A), props);
4736
4740
  const b2 = cn("tabbar");
4737
4741
  const [selectIndex, setSelectIndex] = useState(visible);
4738
4742
  const handleClick = (idx) => {
@@ -4758,9 +4762,9 @@ const Tabbar = (props) => {
4758
4762
  return React__default.cloneElement(child, childProps);
4759
4763
  }));
4760
4764
  };
4761
- Tabbar.defaultProps = defaultProps$v;
4765
+ Tabbar.defaultProps = defaultProps$A;
4762
4766
  Tabbar.displayName = "NutTabbar";
4763
- const defaultProps$u = {
4767
+ const defaultProps$z = {
4764
4768
  tabTitle: "",
4765
4769
  icon: "",
4766
4770
  href: "",
@@ -4773,7 +4777,7 @@ const defaultProps$u = {
4773
4777
  }
4774
4778
  };
4775
4779
  const TabbarItem = (props) => {
4776
- const { tabTitle, icon, href, num, active, activeColor, unactiveColor, index: index2, handleClick } = __spreadValues(__spreadValues({}, defaultProps$u), props);
4780
+ const { tabTitle, icon, href, num, active, activeColor, unactiveColor, index: index2, handleClick } = __spreadValues(__spreadValues({}, defaultProps$z), props);
4777
4781
  const b2 = cn("tabbar-item");
4778
4782
  const bIcon = cn("tabbar-item__icon-box");
4779
4783
  useEffect(() => {
@@ -4802,14 +4806,14 @@ const TabbarItem = (props) => {
4802
4806
  className: bIcon({ "nav-word": true }, [bIcon({ "big-word": !icon })])
4803
4807
  }, tabTitle)));
4804
4808
  };
4805
- const defaultProps$t = {
4809
+ const defaultProps$y = {
4806
4810
  height: "200px",
4807
4811
  acceptKey: "title",
4808
4812
  indexList: [],
4809
4813
  className: ""
4810
4814
  };
4811
4815
  const Elevator = (props) => {
4812
- const _a = __spreadValues(__spreadValues({}, defaultProps$t), props), { height, acceptKey, indexList, className, clickItem, clickIndex } = _a, rest = __objRest(_a, ["height", "acceptKey", "indexList", "className", "clickItem", "clickIndex"]);
4816
+ const _a = __spreadValues(__spreadValues({}, defaultProps$y), props), { height, acceptKey, indexList, className, clickItem, clickIndex } = _a, rest = __objRest(_a, ["height", "acceptKey", "indexList", "className", "clickItem", "clickIndex"]);
4813
4817
  const b2 = cn("elevator");
4814
4818
  const spaceHeight = 23;
4815
4819
  const listview = useRef(null);
@@ -4842,7 +4846,7 @@ const Elevator = (props) => {
4842
4846
  let height2 = 0;
4843
4847
  state.current.listHeight.push(height2);
4844
4848
  for (let i = 0; i < state.current.listGroup.length; i++) {
4845
- let item = state.current.listGroup[i];
4849
+ const item = state.current.listGroup[i];
4846
4850
  height2 += item.clientHeight;
4847
4851
  state.current.listHeight.push(height2);
4848
4852
  }
@@ -4864,9 +4868,9 @@ const Elevator = (props) => {
4864
4868
  }
4865
4869
  };
4866
4870
  const touchMove = (e2) => {
4867
- let firstTouch = e2.touches[0];
4871
+ const firstTouch = e2.touches[0];
4868
4872
  touchState.current.y2 = firstTouch.pageY;
4869
- let delta = (touchState.current.y2 - touchState.current.y1) / spaceHeight | 0;
4873
+ const delta = (touchState.current.y2 - touchState.current.y1) / spaceHeight | 0;
4870
4874
  const cacheIndex = state.current.anchorIndex + delta;
4871
4875
  setCurrentIndex(cacheIndex);
4872
4876
  scrollTo(cacheIndex);
@@ -4876,8 +4880,8 @@ const Elevator = (props) => {
4876
4880
  };
4877
4881
  const touchStart = (e2) => {
4878
4882
  setScrollStart(true);
4879
- let index2 = Number(getData(e2.target, "index"));
4880
- let firstTouch = e2.touches[0];
4883
+ const index2 = Number(getData(e2.target, "index"));
4884
+ const firstTouch = e2.touches[0];
4881
4885
  touchState.current.y1 = firstTouch.pageY;
4882
4886
  state.current.anchorIndex = +index2;
4883
4887
  setCurrentIndex((currentIndex2) => currentIndex2 + index2);
@@ -4922,7 +4926,7 @@ const Elevator = (props) => {
4922
4926
  }, item[acceptKey]), /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, item.list.map((subitem) => {
4923
4927
  return /* @__PURE__ */ React__default.createElement("div", {
4924
4928
  className: b2("list__item__name"),
4925
- key: subitem["id"],
4929
+ key: subitem.id,
4926
4930
  onClick: () => handleClickItem(item[acceptKey], subitem)
4927
4931
  }, subitem.name);
4928
4932
  })));
@@ -4943,9 +4947,9 @@ const Elevator = (props) => {
4943
4947
  }, item[acceptKey]);
4944
4948
  }))));
4945
4949
  };
4946
- Elevator.defaultProps = defaultProps$t;
4950
+ Elevator.defaultProps = defaultProps$y;
4947
4951
  Elevator.displayName = "NutElevator";
4948
- const defaultProps$s = {
4952
+ const defaultProps$x = {
4949
4953
  fixednavClass: "nut-fixednav",
4950
4954
  activeText: "\u6536\u8D77\u5BFC\u822A",
4951
4955
  unActiveText: "\u5FEB\u901F\u5BFC\u822A",
@@ -4956,7 +4960,7 @@ const defaultProps$s = {
4956
4960
  }
4957
4961
  };
4958
4962
  const FixedNav = (props) => {
4959
- const _a = __spreadValues(__spreadValues({}, defaultProps$s), props), {
4963
+ const _a = __spreadValues(__spreadValues({}, defaultProps$x), props), {
4960
4964
  fixednavClass,
4961
4965
  overlay,
4962
4966
  visible,
@@ -5002,7 +5006,7 @@ const FixedNav = (props) => {
5002
5006
  onClick: () => onUpdateValue(false)
5003
5007
  }), /* @__PURE__ */ React__default.createElement("div", {
5004
5008
  className: "list"
5005
- }, slotList ? slotList : /* @__PURE__ */ React__default.createElement("div", {
5009
+ }, slotList || /* @__PURE__ */ React__default.createElement("div", {
5006
5010
  className: "nut-fixednav__list"
5007
5011
  }, navList.map((item, index2) => {
5008
5012
  return /* @__PURE__ */ React__default.createElement("div", {
@@ -5019,16 +5023,16 @@ const FixedNav = (props) => {
5019
5023
  }))), /* @__PURE__ */ React__default.createElement("div", {
5020
5024
  className: "nut-fixednav__btn",
5021
5025
  onClick: () => onUpdateValue()
5022
- }, slotBtn ? slotBtn : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Icon, {
5026
+ }, slotBtn || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Icon, {
5023
5027
  name: "left",
5024
5028
  color: "#fff"
5025
5029
  }), /* @__PURE__ */ React__default.createElement("div", {
5026
5030
  className: "text"
5027
5031
  }, visible ? activeText : unActiveText))));
5028
5032
  };
5029
- FixedNav.defaultProps = defaultProps$s;
5033
+ FixedNav.defaultProps = defaultProps$x;
5030
5034
  FixedNav.displayName = "NutFixedNav";
5031
- const defaultProps$r = {
5035
+ const defaultProps$w = {
5032
5036
  defaultValue: 1,
5033
5037
  mode: "multi",
5034
5038
  prevText: "\u4E0A\u4E00\u9875",
@@ -5044,7 +5048,7 @@ const defaultProps$r = {
5044
5048
  }
5045
5049
  };
5046
5050
  const Pagination = (props) => {
5047
- __spreadValues(__spreadValues({}, defaultProps$r), props);
5051
+ __spreadValues(__spreadValues({}, defaultProps$w), props);
5048
5052
  const _a = props, {
5049
5053
  modelValue,
5050
5054
  mode,
@@ -5087,7 +5091,7 @@ const Pagination = (props) => {
5087
5091
  const computedPages = (_currentPage, _countRef) => {
5088
5092
  if (mode == "simple")
5089
5093
  return [];
5090
- let items = [];
5094
+ const items = [];
5091
5095
  const pageCount2 = _countRef || countRef;
5092
5096
  const pageSize = Number(showPageSize);
5093
5097
  const _current = _currentPage || Number(currentPage);
@@ -5102,7 +5106,7 @@ const Pagination = (props) => {
5102
5106
  startPage = endPage - pageSize + 1;
5103
5107
  }
5104
5108
  }
5105
- for (var i = startPage; i <= endPage; i++) {
5109
+ for (let i = startPage; i <= endPage; i++) {
5106
5110
  const page = setPage(i, i, _current == i);
5107
5111
  items.push(page);
5108
5112
  }
@@ -5141,7 +5145,7 @@ const Pagination = (props) => {
5141
5145
  if ("modelValue" in props) {
5142
5146
  currentValue2 = Number(props.modelValue);
5143
5147
  }
5144
- let pageCount2 = computedCountRef();
5148
+ const pageCount2 = computedCountRef();
5145
5149
  setCountRef(pageCount2);
5146
5150
  setPages(computedPages(currentValue2, pageCount2));
5147
5151
  }, []);
@@ -5161,7 +5165,7 @@ const Pagination = (props) => {
5161
5165
  className: `${paginationBem("contain")}`
5162
5166
  }, pages.map((item, index2) => {
5163
5167
  return /* @__PURE__ */ React__default.createElement("div", {
5164
- key: index2 + "pagination",
5168
+ key: `${index2}pagination`,
5165
5169
  className: `${paginationBem("item")} ${item.active ? "active" : ""}`,
5166
5170
  onClick: (e2) => !item.active ? selectPage(item.number, true) : ""
5167
5171
  }, pageNodeRender ? pageNodeRender(item) : item.text);
@@ -5174,16 +5178,16 @@ const Pagination = (props) => {
5174
5178
  onClick: (e2) => selectPage(Number(currentPage) + 1, true)
5175
5179
  }, nextText));
5176
5180
  };
5177
- Pagination.defaultProps = defaultProps$r;
5181
+ Pagination.defaultProps = defaultProps$w;
5178
5182
  Pagination.displayName = "NutPagination";
5179
5183
  const DataContext$1 = createContext({});
5180
- const defaultProps$q = {
5184
+ const defaultProps$v = {
5181
5185
  current: 0,
5182
5186
  direction: "horizontal",
5183
5187
  progressDot: false
5184
5188
  };
5185
5189
  const Steps = (props) => {
5186
- const propSteps = __spreadValues(__spreadValues({}, defaultProps$q), props);
5190
+ const propSteps = __spreadValues(__spreadValues({}, defaultProps$v), props);
5187
5191
  const _a = propSteps, { children, direction, className } = _a, restProps = __objRest(_a, ["children", "direction", "className"]);
5188
5192
  const parentSteps = {
5189
5193
  propSteps
@@ -5199,9 +5203,9 @@ const Steps = (props) => {
5199
5203
  className: classes
5200
5204
  }, restProps), children));
5201
5205
  };
5202
- Steps.defaultProps = defaultProps$q;
5206
+ Steps.defaultProps = defaultProps$v;
5203
5207
  Steps.displayName = "NutSteps";
5204
- const defaultProps$p = {
5208
+ const defaultProps$u = {
5205
5209
  title: "",
5206
5210
  content: "",
5207
5211
  activeIndex: 0,
@@ -5209,7 +5213,7 @@ const defaultProps$p = {
5209
5213
  size: "12px"
5210
5214
  };
5211
5215
  const Step = (props) => {
5212
- const _a = __spreadValues(__spreadValues({}, defaultProps$p), props), {
5216
+ const _a = __spreadValues(__spreadValues({}, defaultProps$u), props), {
5213
5217
  children,
5214
5218
  title,
5215
5219
  content,
@@ -5264,10 +5268,10 @@ const Step = (props) => {
5264
5268
  className: "nut-step-content"
5265
5269
  }, renderContent())));
5266
5270
  };
5267
- Step.defaultProps = defaultProps$p;
5271
+ Step.defaultProps = defaultProps$u;
5268
5272
  Step.displayName = "NutStep";
5269
5273
  const DataContext = createContext({});
5270
- const defaultProps$o = {
5274
+ const defaultProps$t = {
5271
5275
  width: window.innerWidth,
5272
5276
  height: 0,
5273
5277
  duration: 500,
@@ -5284,7 +5288,7 @@ const defaultProps$o = {
5284
5288
  };
5285
5289
  const DISTANCE = 5;
5286
5290
  const Swiper = React__default.forwardRef((props, ref) => {
5287
- const propSwiper = __spreadValues(__spreadValues({}, defaultProps$o), props);
5291
+ const propSwiper = __spreadValues(__spreadValues({}, defaultProps$t), props);
5288
5292
  const _a = propSwiper, {
5289
5293
  children,
5290
5294
  direction,
@@ -5324,14 +5328,14 @@ const Swiper = React__default.forwardRef((props, ref) => {
5324
5328
  });
5325
5329
  const childsRefs = [];
5326
5330
  const isVertical = direction === "vertical";
5327
- let [rect, setRect] = useState(null);
5331
+ const [rect, setRect] = useState(null);
5328
5332
  let [active, setActive] = useState(0);
5329
- let [width, setWidth] = useState(0);
5330
- let [height, setHeight] = useState(0);
5331
- let [offset, setOffset] = useState(0);
5332
- let [ready, setReady] = useState(false);
5333
+ const [width, setWidth] = useState(0);
5334
+ const [height, setHeight] = useState(0);
5335
+ const [offset, setOffset] = useState(0);
5336
+ const [ready, setReady] = useState(false);
5333
5337
  let size = isVertical ? height : width;
5334
- let [touch, setTouch] = useState({
5338
+ const [touch, setTouch] = useState({
5335
5339
  startX: 0,
5336
5340
  startY: 0,
5337
5341
  deltaX: 0,
@@ -5344,7 +5348,7 @@ const Swiper = React__default.forwardRef((props, ref) => {
5344
5348
  });
5345
5349
  const [childs, setChilds] = useState([]);
5346
5350
  useState("");
5347
- let childCount = children.length;
5351
+ const childCount = children.length;
5348
5352
  for (let i = 0; i < childCount; i++) {
5349
5353
  childsRefs.push(useRef(null));
5350
5354
  }
@@ -5353,7 +5357,7 @@ const Swiper = React__default.forwardRef((props, ref) => {
5353
5357
  const childs2 = [];
5354
5358
  React__default.Children.toArray(children).forEach((child, index2) => {
5355
5359
  if (child.type && child.type.displayName === "NutSwiperItem") {
5356
- childs2.push(React__default.cloneElement(child, { ref: childsRefs[index2], key: "item_" + index2 }));
5360
+ childs2.push(React__default.cloneElement(child, { ref: childsRefs[index2], key: `item_${index2}` }));
5357
5361
  }
5358
5362
  });
5359
5363
  return childs2;
@@ -5462,7 +5466,7 @@ const Swiper = React__default.forwardRef((props, ref) => {
5462
5466
  };
5463
5467
  const getActive = (pace) => {
5464
5468
  if (pace) {
5465
- let _active = active + pace;
5469
+ const _active = active + pace;
5466
5470
  if (props.loop) {
5467
5471
  return range(_active, -1, childCount);
5468
5472
  }
@@ -5527,7 +5531,7 @@ const Swiper = React__default.forwardRef((props, ref) => {
5527
5531
  [`${b2("vertical")}`]: isVertical
5528
5532
  });
5529
5533
  const getStyle = (moveOffset = offset) => {
5530
- let target = innerRef.current;
5534
+ const target = innerRef.current;
5531
5535
  target.style.transform = `translate3D${!isVertical ? `(${moveOffset}px,0,0)` : `(0,${moveOffset}px,0)`}`;
5532
5536
  target.style.transitionDuration = `${_swiper.current.moving ? 0 : props.duration}ms`;
5533
5537
  target.style[isVertical ? "height" : "width"] = `${Number(size) * childCount}px`;
@@ -5584,13 +5588,13 @@ const Swiper = React__default.forwardRef((props, ref) => {
5584
5588
  _swiper.current.activePagination = (active + childCount) % childCount;
5585
5589
  }, [active]);
5586
5590
  const init = (active2 = +propSwiper.initPage) => {
5587
- let rect2 = container.current.getBoundingClientRect();
5588
- let _active = Math.max(Math.min(childCount - 1, active2), 0);
5589
- let _width = propSwiper.width ? +propSwiper.width : rect2.width;
5590
- let _height = propSwiper.height ? +propSwiper.height : rect2.height;
5591
+ const rect2 = container.current.getBoundingClientRect();
5592
+ const _active = Math.max(Math.min(childCount - 1, active2), 0);
5593
+ const _width = propSwiper.width ? +propSwiper.width : rect2.width;
5594
+ const _height = propSwiper.height ? +propSwiper.height : rect2.height;
5591
5595
  size = isVertical ? _height : _width;
5592
5596
  trackSize = childCount * Number(size);
5593
- let targetOffset = getOffset(_active);
5597
+ const targetOffset = getOffset(_active);
5594
5598
  _swiper.current.moving = true;
5595
5599
  if (ready) {
5596
5600
  _swiper.current.moving = false;
@@ -5623,7 +5627,7 @@ const Swiper = React__default.forwardRef((props, ref) => {
5623
5627
  init();
5624
5628
  }, [propSwiper.initPage]);
5625
5629
  useEffect(() => {
5626
- let target = container.current;
5630
+ const target = container.current;
5627
5631
  target.addEventListener("touchstart", onTouchStart, false);
5628
5632
  target.addEventListener("touchmove", onTouchMove, false);
5629
5633
  target.addEventListener("touchend", onTouchEnd, false);
@@ -5660,13 +5664,13 @@ const Swiper = React__default.forwardRef((props, ref) => {
5660
5664
  });
5661
5665
  })) : /* @__PURE__ */ React__default.createElement("div", null, pageContent)));
5662
5666
  });
5663
- Swiper.defaultProps = defaultProps$o;
5667
+ Swiper.defaultProps = defaultProps$t;
5664
5668
  Swiper.displayName = "NutSwiper";
5665
- const defaultProps$n = {
5669
+ const defaultProps$s = {
5666
5670
  direction: "horizontal"
5667
5671
  };
5668
5672
  const SwiperItem = React__default.forwardRef((props, ref) => {
5669
- const _props = __spreadValues(__spreadValues({}, defaultProps$n), props);
5673
+ const _props = __spreadValues(__spreadValues({}, defaultProps$s), props);
5670
5674
  const { children, direction, size } = _props;
5671
5675
  const parent = useContext$1(DataContext);
5672
5676
  const [offset, setOffset] = useState(0);
@@ -5685,7 +5689,7 @@ const SwiperItem = React__default.forwardRef((props, ref) => {
5685
5689
  style2[_direction === "horizontal" ? "width" : "height"] = `${_size}px`;
5686
5690
  }
5687
5691
  if (offset) {
5688
- style2["transform"] = `translate3D${_direction === "horizontal" ? `(${offset}px,0,0)` : `(0,${offset}px,0)`}`;
5692
+ style2.transform = `translate3D${_direction === "horizontal" ? `(${offset}px,0,0)` : `(0,${offset}px,0)`}`;
5689
5693
  }
5690
5694
  return style2;
5691
5695
  };
@@ -5694,9 +5698,9 @@ const SwiperItem = React__default.forwardRef((props, ref) => {
5694
5698
  style: style()
5695
5699
  }, children);
5696
5700
  });
5697
- SwiperItem.defaultProps = defaultProps$n;
5701
+ SwiperItem.defaultProps = defaultProps$s;
5698
5702
  SwiperItem.displayName = "NutSwiperItem";
5699
- const defaultProps$m = {
5703
+ const defaultProps$r = {
5700
5704
  bottom: 20,
5701
5705
  right: 10,
5702
5706
  elId: "",
@@ -5718,7 +5722,7 @@ const BackTop = (props) => {
5718
5722
  duration,
5719
5723
  style,
5720
5724
  backTopClick
5721
- } = __spreadValues(__spreadValues({}, defaultProps$m), props);
5725
+ } = __spreadValues(__spreadValues({}, defaultProps$r), props);
5722
5726
  const [backTop, SetBackTop] = useState(false);
5723
5727
  const [scrollTop, SetScrollTop] = useState(0);
5724
5728
  let startTime = 0;
@@ -5743,7 +5747,7 @@ const BackTop = (props) => {
5743
5747
  top = scrollEl.scrollTop;
5744
5748
  SetScrollTop(top);
5745
5749
  }
5746
- let showBtn = top >= distance;
5750
+ const showBtn = top >= distance;
5747
5751
  SetBackTop(showBtn);
5748
5752
  };
5749
5753
  const scroll = (y2 = 0) => {
@@ -5755,8 +5759,8 @@ const BackTop = (props) => {
5755
5759
  };
5756
5760
  const scrollAnimation = () => {
5757
5761
  let cid = requestAniFrame2()(function fn() {
5758
- var t2 = duration - Math.max(0, startTime - +new Date() + duration);
5759
- var y2 = t2 * -scrollTop / duration + scrollTop;
5762
+ const t2 = duration - Math.max(0, startTime - +new Date() + duration);
5763
+ const y2 = t2 * -scrollTop / duration + scrollTop;
5760
5764
  scroll(y2);
5761
5765
  cid = requestAniFrame2()(fn);
5762
5766
  if (t2 == duration || y2 == 0) {
@@ -5782,7 +5786,7 @@ const BackTop = (props) => {
5782
5786
  }
5783
5787
  const goTop = (e2) => {
5784
5788
  backTopClick(e2);
5785
- let otime = +new Date();
5789
+ const otime = +new Date();
5786
5790
  startTime = otime;
5787
5791
  isAnimation && duration > 0 ? scrollAnimation() : scroll();
5788
5792
  };
@@ -5792,18 +5796,181 @@ const BackTop = (props) => {
5792
5796
  zIndex
5793
5797
  };
5794
5798
  return /* @__PURE__ */ React__default.createElement("div", {
5795
- className: `nut-backtop ${backTop ? "show" : ""} ${className ? className : ""}`,
5796
- style: __spreadValues(__spreadValues({}, backTopClass), style),
5797
- onClick: goTop
5798
- }, children ? children : /* @__PURE__ */ React__default.createElement(Icon, {
5799
- size: "19px",
5800
- className: "nut-backtop-main",
5801
- name: "top"
5802
- }));
5799
+ className: `nut-backtop ${backTop ? "show" : ""} ${className || ""}`,
5800
+ style: __spreadValues(__spreadValues({}, backTopClass), style),
5801
+ onClick: goTop
5802
+ }, children || /* @__PURE__ */ React__default.createElement(Icon, {
5803
+ size: "19px",
5804
+ className: "nut-backtop-main",
5805
+ name: "top"
5806
+ }));
5807
+ };
5808
+ BackTop.defaultProps = defaultProps$r;
5809
+ BackTop.displayName = "NutBackTop";
5810
+ class Title {
5811
+ constructor() {
5812
+ __publicField(this, "title", "");
5813
+ __publicField(this, "paneKey", "");
5814
+ __publicField(this, "disabled", false);
5815
+ __publicField(this, "index", 0);
5816
+ }
5817
+ }
5818
+ const defaultProps$q = {
5819
+ value: 0,
5820
+ color: "",
5821
+ background: "",
5822
+ direction: "horizontal",
5823
+ type: "line",
5824
+ titleScroll: false,
5825
+ ellipsis: true,
5826
+ animatedTime: 300,
5827
+ titleGutter: 0,
5828
+ size: "normal"
5829
+ };
5830
+ const pxCheck$1 = (value) => {
5831
+ return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
5832
+ };
5833
+ const Tabs = (props) => {
5834
+ const _a = __spreadValues(__spreadValues({}, defaultProps$q), props), {
5835
+ value,
5836
+ color,
5837
+ background,
5838
+ direction,
5839
+ type,
5840
+ titleScroll,
5841
+ ellipsis,
5842
+ animatedTime,
5843
+ titleGutter,
5844
+ size,
5845
+ titleNode,
5846
+ children,
5847
+ onClick,
5848
+ onChange,
5849
+ className
5850
+ } = _a, rest = __objRest(_a, [
5851
+ "value",
5852
+ "color",
5853
+ "background",
5854
+ "direction",
5855
+ "type",
5856
+ "titleScroll",
5857
+ "ellipsis",
5858
+ "animatedTime",
5859
+ "titleGutter",
5860
+ "size",
5861
+ "titleNode",
5862
+ "children",
5863
+ "onClick",
5864
+ "onChange",
5865
+ "className"
5866
+ ]);
5867
+ const [currentItem, setCurrentItem] = useState({ index: 0 });
5868
+ const titles = useRef([]);
5869
+ useEffect(() => {
5870
+ let currentIndex = 0;
5871
+ titles.current = [];
5872
+ React__default.Children.forEach(children, (child, idx) => {
5873
+ var _a2, _b, _c, _d, _e;
5874
+ if (!React__default.isValidElement(child)) {
5875
+ return null;
5876
+ }
5877
+ const title = new Title();
5878
+ if (((_a2 = child.props) == null ? void 0 : _a2.title) || ((_b = child.props) == null ? void 0 : _b.paneKey)) {
5879
+ title.title = (_c = child.props) == null ? void 0 : _c.title;
5880
+ title.paneKey = ((_d = child.props) == null ? void 0 : _d.paneKey) || idx;
5881
+ title.disabled = (_e = child.props) == null ? void 0 : _e.disabled;
5882
+ title.index = idx;
5883
+ if (title.paneKey === value) {
5884
+ currentIndex = idx;
5885
+ }
5886
+ }
5887
+ titles.current.push(title);
5888
+ });
5889
+ setCurrentItem(titles.current[currentIndex]);
5890
+ }, [children]);
5891
+ const b2 = cn("tabs");
5892
+ const classes = classNames(direction, b2(""), className);
5893
+ const classesTitle = classNames({
5894
+ [type]: type,
5895
+ scrollable: titleScroll,
5896
+ [size]: size
5897
+ }, `${b2("")}__titles`);
5898
+ const titleStyle = {
5899
+ marginLeft: pxCheck$1(titleGutter),
5900
+ marginRight: pxCheck$1(titleGutter)
5901
+ };
5902
+ const tabsActiveStyle = {
5903
+ color: type === "smile" ? color : "",
5904
+ background: type === "line" ? color : ""
5905
+ };
5906
+ const index2 = titles.current.findIndex((t2) => t2.paneKey === value);
5907
+ const contentStyle = {
5908
+ transform: direction === "horizontal" ? `translate3d(-${index2 * 100}%, 0, 0)` : `translate3d( 0,-${index2 * 100}%, 0)`,
5909
+ transitionDuration: `${animatedTime}ms`
5910
+ };
5911
+ const tabChange = (item, index22) => {
5912
+ onClick && onClick(item);
5913
+ if (item.disabled) {
5914
+ return;
5915
+ }
5916
+ setCurrentItem(item);
5917
+ onChange && onChange(item);
5918
+ };
5919
+ return /* @__PURE__ */ React__default.createElement("div", __spreadValues({
5920
+ className: classes
5921
+ }, rest), /* @__PURE__ */ React__default.createElement("div", {
5922
+ className: classesTitle,
5923
+ style: { background }
5924
+ }, !!titleNode && typeof titleNode === "function" ? titleNode() : titles.current.map((item, index22) => {
5925
+ return /* @__PURE__ */ React__default.createElement("div", {
5926
+ style: titleStyle,
5927
+ onClick: (e2) => tabChange(item),
5928
+ className: classNames({ active: item.paneKey === value, disabled: item.disabled }, `${b2("")}__titles-item`),
5929
+ key: item.paneKey
5930
+ }, type === "line" && /* @__PURE__ */ React__default.createElement("div", {
5931
+ className: `${b2("")}__titles-item__line`,
5932
+ style: tabsActiveStyle
5933
+ }), type === "smile" && /* @__PURE__ */ React__default.createElement("div", {
5934
+ className: `${b2("")}__titles-item__smile`,
5935
+ style: tabsActiveStyle
5936
+ }, /* @__PURE__ */ React__default.createElement(Icon, {
5937
+ color,
5938
+ name: "joy-smile"
5939
+ })), /* @__PURE__ */ React__default.createElement("div", {
5940
+ className: classNames({ ellipsis: ellipsis && !titleScroll && direction === "horizontal" }, `${b2("")}__titles-item__text`)
5941
+ }, item.title));
5942
+ })), /* @__PURE__ */ React__default.createElement("div", {
5943
+ className: `${b2("")}__content`,
5944
+ style: contentStyle
5945
+ }, React__default.Children.map(children, (child, idx) => {
5946
+ if (!React__default.isValidElement(child)) {
5947
+ return null;
5948
+ }
5949
+ const childProps = __spreadProps(__spreadValues({}, child.props), {
5950
+ activeKey: value
5951
+ });
5952
+ return React__default.cloneElement(child, childProps);
5953
+ })));
5954
+ };
5955
+ Tabs.defaultProps = defaultProps$q;
5956
+ Tabs.displayName = "NutTabs";
5957
+ const defaultProps$p = {
5958
+ title: "",
5959
+ paneKey: "",
5960
+ activeKey: "",
5961
+ disabled: false
5962
+ };
5963
+ const TabPane = (props) => {
5964
+ const { children, paneKey, activeKey } = __spreadValues(__spreadValues({}, defaultProps$p), props);
5965
+ const b2 = cn("tabpane");
5966
+ const classes = classNames({
5967
+ active: paneKey === activeKey
5968
+ }, b2(""));
5969
+ return /* @__PURE__ */ React__default.createElement("div", {
5970
+ className: classes
5971
+ }, children);
5803
5972
  };
5804
- BackTop.defaultProps = defaultProps$m;
5805
- BackTop.displayName = "NutBackTop";
5806
- const defaultProps$l = {
5973
+ const defaultProps$o = {
5807
5974
  count: 5,
5808
5975
  modelValue: 0,
5809
5976
  iconSize: 18,
@@ -5830,7 +5997,7 @@ const Rate = (props) => {
5830
5997
  allowHalf,
5831
5998
  spacing,
5832
5999
  change
5833
- } = __spreadValues(__spreadValues({}, defaultProps$l), props);
6000
+ } = __spreadValues(__spreadValues({}, defaultProps$o), props);
5834
6001
  const b2 = cn("rate");
5835
6002
  const bi = cn("rate-item");
5836
6003
  const [countArray, setCountArray] = useState([1, 2, 3, 4, 5]);
@@ -5893,7 +6060,7 @@ const Rate = (props) => {
5893
6060
  }));
5894
6061
  }));
5895
6062
  };
5896
- Rate.defaultProps = defaultProps$l;
6063
+ Rate.defaultProps = defaultProps$o;
5897
6064
  Rate.displayName = "NutRate";
5898
6065
  function trimExtraChar(value, char, regExp) {
5899
6066
  const index2 = value.indexOf(char);
@@ -5919,7 +6086,7 @@ function formatNumber(value, allowDot = true, allowMinus = true) {
5919
6086
  const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
5920
6087
  return value.replace(regExp, "");
5921
6088
  }
5922
- const defaultProps$k = {
6089
+ const defaultProps$n = {
5923
6090
  type: "text",
5924
6091
  defaultValue: "",
5925
6092
  placeholder: "\u8BF7\u8F93\u5165\u4FE1\u606F",
@@ -5949,7 +6116,7 @@ const Input = (props) => {
5949
6116
  blur,
5950
6117
  focus,
5951
6118
  clear
5952
- } = __spreadValues(__spreadValues({}, defaultProps$k), props);
6119
+ } = __spreadValues(__spreadValues({}, defaultProps$n), props);
5953
6120
  const inputBem = cn("input");
5954
6121
  const [inputValue, SetInputValue] = useState("");
5955
6122
  const [active, SetActive] = useState(false);
@@ -5973,7 +6140,7 @@ const Input = (props) => {
5973
6140
  SetInputValue(val);
5974
6141
  };
5975
6142
  const valueFocus = (event) => {
5976
- let val = event.target.value;
6143
+ const val = event.target.value;
5977
6144
  SetActive(true);
5978
6145
  if (focus) {
5979
6146
  focus(val, event);
@@ -5983,7 +6150,7 @@ const Input = (props) => {
5983
6150
  setTimeout(() => {
5984
6151
  SetActive(false);
5985
6152
  }, 0);
5986
- let val = event.target.value;
6153
+ const val = event.target.value;
5987
6154
  if (blur) {
5988
6155
  blur(val, event);
5989
6156
  }
@@ -5998,7 +6165,7 @@ const Input = (props) => {
5998
6165
  textAlign
5999
6166
  };
6000
6167
  return /* @__PURE__ */ React__default.createElement("div", {
6001
- className: `${inputBem()} ${disabled ? inputBem("disabled") : ""} ${className ? className : ""}`
6168
+ className: `${inputBem()} ${disabled ? inputBem("disabled") : ""} ${className || ""}`
6002
6169
  }, /* @__PURE__ */ React__default.createElement("div", {
6003
6170
  className: inputBem("label")
6004
6171
  }, requireShow ? /* @__PURE__ */ React__default.createElement("div", {
@@ -6033,9 +6200,9 @@ const Input = (props) => {
6033
6200
  size: "12px"
6034
6201
  }) : null) : null);
6035
6202
  };
6036
- Input.defaultProps = defaultProps$k;
6203
+ Input.defaultProps = defaultProps$n;
6037
6204
  Input.displayName = "NutInput";
6038
- const defaultProps$j = {
6205
+ const defaultProps$m = {
6039
6206
  defaultValue: "",
6040
6207
  textAlign: "left",
6041
6208
  limitshow: false,
@@ -6062,7 +6229,7 @@ const TextArea = (props) => {
6062
6229
  change,
6063
6230
  blur,
6064
6231
  focus
6065
- } = __spreadValues(__spreadValues({}, defaultProps$j), props);
6232
+ } = __spreadValues(__spreadValues({}, defaultProps$m), props);
6066
6233
  const textareaBem = cn("textarea");
6067
6234
  const [inputValue, SetInputValue] = useState("");
6068
6235
  useEffect(() => {
@@ -6107,7 +6274,7 @@ const TextArea = (props) => {
6107
6274
  }
6108
6275
  };
6109
6276
  return /* @__PURE__ */ React__default.createElement("div", {
6110
- className: `${textareaBem()} ${disabled ? textareaBem("disabled") : ""} ${className ? className : ""}`
6277
+ className: `${textareaBem()} ${disabled ? textareaBem("disabled") : ""} ${className || ""}`
6111
6278
  }, /* @__PURE__ */ React__default.createElement("textarea", {
6112
6279
  className: textareaBem("textarea"),
6113
6280
  style: __spreadValues({
@@ -6133,9 +6300,9 @@ const TextArea = (props) => {
6133
6300
  className: textareaBem("limit")
6134
6301
  }, inputValue.length, "/", maxlength < 0 ? 0 : maxlength) : null);
6135
6302
  };
6136
- TextArea.defaultProps = defaultProps$j;
6303
+ TextArea.defaultProps = defaultProps$m;
6137
6304
  TextArea.displayName = "NutTextArea";
6138
- const defaultProps$i = {
6305
+ const defaultProps$l = {
6139
6306
  disabled: false,
6140
6307
  buttonSize: "",
6141
6308
  min: 1,
@@ -6151,7 +6318,7 @@ function pxCheck(value) {
6151
6318
  return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
6152
6319
  }
6153
6320
  const InputNumber = (props) => {
6154
- const _a = __spreadValues(__spreadValues({}, defaultProps$i), props), {
6321
+ const _a = __spreadValues(__spreadValues({}, defaultProps$l), props), {
6155
6322
  children,
6156
6323
  disabled,
6157
6324
  buttonSize,
@@ -6234,7 +6401,7 @@ const InputNumber = (props) => {
6234
6401
  const reduceNumber = (e2) => {
6235
6402
  reduce && reduce(e2);
6236
6403
  if (reduceAllow()) {
6237
- let output_value = Number(inputValue) - Number(step);
6404
+ const output_value = Number(inputValue) - Number(step);
6238
6405
  emitChange(output_value, e2);
6239
6406
  } else {
6240
6407
  overlimit && overlimit(e2);
@@ -6308,9 +6475,9 @@ const InputNumber = (props) => {
6308
6475
  click: addNumber
6309
6476
  }));
6310
6477
  };
6311
- InputNumber.defaultProps = defaultProps$i;
6478
+ InputNumber.defaultProps = defaultProps$l;
6312
6479
  InputNumber.displayName = "NutInputNumber";
6313
- const defaultProps$h = {
6480
+ const defaultProps$k = {
6314
6481
  title: "\u8BF7\u8F93\u5165\u5BC6\u7801",
6315
6482
  desc: "\u60A8\u4F7F\u7528\u4E86\u865A\u62DF\u8D44\u4EA7\uFF0C\u8BF7\u8FDB\u884C\u9A8C\u8BC1",
6316
6483
  tips: "\u5FD8\u8BB0\u5BC6\u7801",
@@ -6400,9 +6567,9 @@ const ShortPassword = (props) => {
6400
6567
  change && change(inputValue2);
6401
6568
  };
6402
6569
  const systemStyle = () => {
6403
- let u = navigator.userAgent;
6404
- let isAndroid = u.indexOf("Android") > -1 || u.indexOf("Linux") > -1;
6405
- let isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
6570
+ const u = navigator.userAgent;
6571
+ const isAndroid = u.indexOf("Android") > -1 || u.indexOf("Linux") > -1;
6572
+ const isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
6406
6573
  if (isIOS) {
6407
6574
  return {
6408
6575
  paddingRight: "1200px"
@@ -6485,14 +6652,14 @@ const ShortPassword = (props) => {
6485
6652
  onClick: () => sure()
6486
6653
  }, "\u786E\u8BA4")) : null)));
6487
6654
  };
6488
- ShortPassword.defaultProps = defaultProps$h;
6655
+ ShortPassword.defaultProps = defaultProps$k;
6489
6656
  ShortPassword.displayName = "NutShortPassword";
6490
6657
  const radioContext = {
6491
6658
  onChange: (val) => {
6492
6659
  }
6493
6660
  };
6494
6661
  var RadioContext = React__default.createContext(radioContext);
6495
- const defaultProps$g = {
6662
+ const defaultProps$j = {
6496
6663
  value: null,
6497
6664
  textPosition: "right",
6498
6665
  onChange: (value) => {
@@ -6500,7 +6667,7 @@ const defaultProps$g = {
6500
6667
  direction: "vertical"
6501
6668
  };
6502
6669
  const RadioGroup = React__default.forwardRef((props, ref) => {
6503
- const { children } = __spreadValues(__spreadValues({}, defaultProps$g), props);
6670
+ const { children } = __spreadValues(__spreadValues({}, defaultProps$j), props);
6504
6671
  cn("RadioGroup");
6505
6672
  const _a = props, { className, value, onChange, textPosition, direction } = _a, rest = __objRest(_a, ["className", "value", "onChange", "textPosition", "direction"]);
6506
6673
  const [val2State, setVal2State] = useState(value);
@@ -6535,9 +6702,9 @@ const RadioGroup = React__default.forwardRef((props, ref) => {
6535
6702
  className: `nut-radiogroup nut-radiogroup--${props.direction}`
6536
6703
  }, rest), cloneChildren()));
6537
6704
  });
6538
- RadioGroup.defaultProps = defaultProps$g;
6705
+ RadioGroup.defaultProps = defaultProps$j;
6539
6706
  RadioGroup.displayName = "NutRadioGroup";
6540
- const defaultProps$f = {
6707
+ const defaultProps$i = {
6541
6708
  disabled: false,
6542
6709
  checked: false,
6543
6710
  shape: "round",
@@ -6550,7 +6717,7 @@ const defaultProps$f = {
6550
6717
  }
6551
6718
  };
6552
6719
  const Radio = (props) => {
6553
- const { children } = __spreadValues(__spreadValues({}, defaultProps$f), props);
6720
+ const { children } = __spreadValues(__spreadValues({}, defaultProps$i), props);
6554
6721
  const _a = props, {
6555
6722
  className,
6556
6723
  disabled,
@@ -6612,23 +6779,23 @@ const Radio = (props) => {
6612
6779
  props.onChange && props.onChange(e2);
6613
6780
  context2 && context2.onChange(valueStatement);
6614
6781
  };
6615
- let reverseState = textPosition === "left";
6782
+ const reverseState = textPosition === "left";
6616
6783
  return /* @__PURE__ */ React__default.createElement("div", __spreadValues({
6617
6784
  className: `nut-radio ${className}`,
6618
6785
  onClick: handleClick
6619
6786
  }, rest), props.shape == "button" ? renderButton() : reverseState ? [renderLabel(), renderIcon()] : [renderIcon(), renderLabel()]);
6620
6787
  };
6621
- Radio.defaultProps = defaultProps$f;
6788
+ Radio.defaultProps = defaultProps$i;
6622
6789
  Radio.displayName = "NutRadio";
6623
6790
  Radio.RadioGroup = RadioGroup;
6624
- const defaultProps$e = {
6791
+ const defaultProps$h = {
6625
6792
  disabled: false,
6626
6793
  checkedValue: [],
6627
6794
  onChange: (value) => {
6628
6795
  }
6629
6796
  };
6630
6797
  const CheckboxGroup = React__default.forwardRef((props, ref) => {
6631
- const { children } = __spreadValues(__spreadValues({}, defaultProps$e), props);
6798
+ const { children } = __spreadValues(__spreadValues({}, defaultProps$h), props);
6632
6799
  const b2 = cn("checkboxgroup");
6633
6800
  const _a = props, { className, disabled, onChange, checkedValue } = _a, rest = __objRest(_a, ["className", "disabled", "onChange", "checkedValue"]);
6634
6801
  const [innerDisabled, setInnerDisabled] = useState(disabled);
@@ -6687,9 +6854,9 @@ const CheckboxGroup = React__default.forwardRef((props, ref) => {
6687
6854
  className: `${b2()} ${className || ""}`
6688
6855
  }, rest), cloneChildren());
6689
6856
  });
6690
- CheckboxGroup.defaultProps = defaultProps$e;
6857
+ CheckboxGroup.defaultProps = defaultProps$h;
6691
6858
  CheckboxGroup.displayName = "NutCheckboxGroup";
6692
- const defaultProps$d = {
6859
+ const defaultProps$g = {
6693
6860
  checked: false,
6694
6861
  disabled: false,
6695
6862
  textPosition: "right",
@@ -6700,7 +6867,7 @@ const defaultProps$d = {
6700
6867
  }
6701
6868
  };
6702
6869
  const Checkbox = (props) => {
6703
- const { children } = __spreadValues(__spreadValues({}, defaultProps$d), props);
6870
+ const { children } = __spreadValues(__spreadValues({}, defaultProps$g), props);
6704
6871
  const b2 = cn("checkbox");
6705
6872
  const _a = props, {
6706
6873
  iconName,
@@ -6756,10 +6923,10 @@ const Checkbox = (props) => {
6756
6923
  onClick: handleClick
6757
6924
  }), renderIcon(), renderLabel());
6758
6925
  };
6759
- Checkbox.defaultProps = defaultProps$d;
6926
+ Checkbox.defaultProps = defaultProps$g;
6760
6927
  Checkbox.displayName = "NutCheckBox";
6761
6928
  Checkbox.Group = CheckboxGroup;
6762
- const defaultProps$c = {
6929
+ const defaultProps$f = {
6763
6930
  type: "default",
6764
6931
  color: "",
6765
6932
  textColor: "",
@@ -6785,7 +6952,7 @@ const Tag = (props) => {
6785
6952
  textColor,
6786
6953
  isShow,
6787
6954
  onClick
6788
- } = __spreadValues(__spreadValues({}, defaultProps$c), props);
6955
+ } = __spreadValues(__spreadValues({}, defaultProps$f), props);
6789
6956
  const [btnName, setBtnName] = useState("");
6790
6957
  useEffect(() => {
6791
6958
  setBtnName(classes());
@@ -6810,16 +6977,12 @@ const Tag = (props) => {
6810
6977
  style.color = textColor;
6811
6978
  if (plain) {
6812
6979
  style.background = "#fff";
6813
- } else {
6814
- if (color) {
6815
- style.background = color;
6816
- }
6817
- }
6818
- } else {
6819
- if (color) {
6820
- style.color = "#fff";
6980
+ } else if (color) {
6821
6981
  style.background = color;
6822
6982
  }
6983
+ } else if (color) {
6984
+ style.color = "#fff";
6985
+ style.background = color;
6823
6986
  }
6824
6987
  return style;
6825
6988
  };
@@ -6842,9 +7005,9 @@ const Tag = (props) => {
6842
7005
  className: "text"
6843
7006
  }, children)));
6844
7007
  };
6845
- Tag.defaultProps = defaultProps$c;
7008
+ Tag.defaultProps = defaultProps$f;
6846
7009
  Tag.displayName = "NutTag";
6847
- const defaultProps$b = {
7010
+ const defaultProps$e = {
6848
7011
  value: "",
6849
7012
  dot: false,
6850
7013
  max: 1e4,
@@ -6855,12 +7018,12 @@ const defaultProps$b = {
6855
7018
  icons: ""
6856
7019
  };
6857
7020
  const Badge = (props) => {
6858
- const { value, children, dot, max, top, right, zIndex, color, icons } = __spreadValues(__spreadValues({}, defaultProps$b), props);
7021
+ const { value, children, dot, max, top, right, zIndex, color, icons } = __spreadValues(__spreadValues({}, defaultProps$e), props);
6859
7022
  const content = () => {
6860
7023
  if (dot)
6861
7024
  return;
6862
- const value2 = props.value;
6863
- const max2 = props.max;
7025
+ const { value: value2 } = props;
7026
+ const { max: max2 } = props;
6864
7027
  if (typeof value2 === "number" && typeof max2 === "number") {
6865
7028
  return max2 < value2 ? `${max2}+` : value2;
6866
7029
  }
@@ -6888,7 +7051,7 @@ const Badge = (props) => {
6888
7051
  style: getStyle()
6889
7052
  }, content()));
6890
7053
  };
6891
- Badge.defaultProps = defaultProps$b;
7054
+ Badge.defaultProps = defaultProps$e;
6892
7055
  Badge.displayName = "NutBadge";
6893
7056
  class UploadOptions {
6894
7057
  constructor() {
@@ -6914,7 +7077,7 @@ class Upload {
6914
7077
  }
6915
7078
  upload() {
6916
7079
  var _a;
6917
- const options2 = this.options;
7080
+ const { options: options2 } = this;
6918
7081
  const xhr = new XMLHttpRequest();
6919
7082
  xhr.timeout = options2.timeout;
6920
7083
  if (xhr.upload) {
@@ -6944,7 +7107,7 @@ class Upload {
6944
7107
  }
6945
7108
  }
6946
7109
  }
6947
- const defaultProps$a = {
7110
+ const defaultProps$d = {
6948
7111
  url: "",
6949
7112
  maximum: 1,
6950
7113
  uploadIcon: "photograph",
@@ -6979,7 +7142,7 @@ class FileItem {
6979
7142
  }
6980
7143
  }
6981
7144
  const InternalUploader = (props, ref) => {
6982
- const _a = __spreadValues(__spreadValues({}, defaultProps$a), props), {
7145
+ const _a = __spreadValues(__spreadValues({}, defaultProps$d), props), {
6983
7146
  children,
6984
7147
  uploadIcon,
6985
7148
  name,
@@ -7128,7 +7291,7 @@ const InternalUploader = (props, ref) => {
7128
7291
  option
7129
7292
  });
7130
7293
  };
7131
- let task = new Upload(uploadOption);
7294
+ const task = new Upload(uploadOption);
7132
7295
  if (props.autoUpload) {
7133
7296
  task.upload();
7134
7297
  } else {
@@ -7170,9 +7333,8 @@ const InternalUploader = (props, ref) => {
7170
7333
  if (file.size > maximize) {
7171
7334
  oversizes.push(file);
7172
7335
  return false;
7173
- } else {
7174
- return true;
7175
7336
  }
7337
+ return true;
7176
7338
  });
7177
7339
  if (oversizes.length) {
7178
7340
  oversize && oversize(files);
@@ -7201,7 +7363,7 @@ const InternalUploader = (props, ref) => {
7201
7363
  return;
7202
7364
  }
7203
7365
  const $el = event.target;
7204
- let { files } = $el;
7366
+ const { files } = $el;
7205
7367
  if (beforeUpload) {
7206
7368
  beforeUpload(new Array().slice.call(files)).then((f2) => {
7207
7369
  const _files = filterFiles(new Array().slice.call(f2));
@@ -7280,27 +7442,27 @@ const InternalUploader = (props, ref) => {
7280
7442
  }))));
7281
7443
  };
7282
7444
  const Uploader = React__default.forwardRef(InternalUploader);
7283
- Uploader.defaultProps = defaultProps$a;
7445
+ Uploader.defaultProps = defaultProps$d;
7284
7446
  Uploader.displayName = "NutUploader";
7285
7447
  const Utils = {
7286
- isLeapYear: function(y2) {
7448
+ isLeapYear(y2) {
7287
7449
  return y2 % 4 == 0 && y2 % 100 != 0 || y2 % 400 == 0;
7288
7450
  },
7289
- getWhatDay: function(year, month, day) {
7290
- const date = new Date(year + "/" + month + "/" + day);
7451
+ getWhatDay(year, month, day) {
7452
+ const date = new Date(`${year}/${month}/${day}`);
7291
7453
  const index2 = date.getDay();
7292
7454
  const dayNames = ["\u661F\u671F\u65E5", "\u661F\u671F\u4E00", "\u661F\u671F\u4E8C", "\u661F\u671F\u4E09", "\u661F\u671F\u56DB", "\u661F\u671F\u4E94", "\u661F\u671F\u516D"];
7293
7455
  return dayNames[index2];
7294
7456
  },
7295
- getMonthPreDay: function(year, month) {
7296
- const date = new Date(year + "/" + month + "/01");
7457
+ getMonthPreDay(year, month) {
7458
+ const date = new Date(`${year}/${month}/01`);
7297
7459
  let day = date.getDay();
7298
7460
  if (day == 0) {
7299
7461
  day = 7;
7300
7462
  }
7301
7463
  return day;
7302
7464
  },
7303
- getMonthDays: function(year, month) {
7465
+ getMonthDays(year, month) {
7304
7466
  if (/^0/.test(month)) {
7305
7467
  month = month.split("")[1];
7306
7468
  }
@@ -7320,25 +7482,25 @@ const Utils = {
7320
7482
  31
7321
7483
  ][month];
7322
7484
  },
7323
- getNumTwoBit: function(n2) {
7485
+ getNumTwoBit(n2) {
7324
7486
  n2 = Number(n2);
7325
7487
  return (n2 > 9 ? "" : "0") + n2;
7326
7488
  },
7327
- date2Str: function(date, split) {
7489
+ date2Str(date, split) {
7328
7490
  split = split || "-";
7329
7491
  const y2 = date.getFullYear();
7330
7492
  const m2 = this.getNumTwoBit(date.getMonth() + 1);
7331
7493
  const d2 = this.getNumTwoBit(date.getDate());
7332
7494
  return [y2, m2, d2].join(split);
7333
7495
  },
7334
- getDay: function(i) {
7496
+ getDay(i) {
7335
7497
  i = i || 0;
7336
7498
  let date = new Date();
7337
7499
  const diff = i * (1e3 * 60 * 60 * 24);
7338
7500
  date = new Date(date.getTime() + diff);
7339
7501
  return this.date2Str(date);
7340
7502
  },
7341
- compareDate: function(date1, date2) {
7503
+ compareDate(date1, date2) {
7342
7504
  const startTime = new Date(date1.replace("-", "/").replace("-", "/"));
7343
7505
  const endTime = new Date(date2.replace("-", "/").replace("-", "/"));
7344
7506
  if (startTime >= endTime) {
@@ -7346,7 +7508,7 @@ const Utils = {
7346
7508
  }
7347
7509
  return true;
7348
7510
  },
7349
- isEqual: function(date1, date2) {
7511
+ isEqual(date1, date2) {
7350
7512
  const startTime = new Date(date1).getTime();
7351
7513
  const endTime = new Date(date2).getTime();
7352
7514
  if (startTime == endTime) {
@@ -7360,14 +7522,13 @@ function requestAniFrame() {
7360
7522
  return window.requestAnimationFrame || function(callback) {
7361
7523
  window.setTimeout(callback, 1e3 / 60);
7362
7524
  };
7363
- } else {
7364
- return function(callback) {
7365
- setTimeout(callback, 1e3 / 60);
7366
- };
7367
7525
  }
7526
+ return function(callback) {
7527
+ setTimeout(callback, 1e3 / 60);
7528
+ };
7368
7529
  }
7369
7530
  var requestAniFrame$1 = requestAniFrame();
7370
- const defaultProps$9 = {
7531
+ const defaultProps$c = {
7371
7532
  type: "one",
7372
7533
  isAutoBackFill: false,
7373
7534
  poppable: true,
@@ -7397,7 +7558,7 @@ const CalendarItem = (props) => {
7397
7558
  onChoose,
7398
7559
  onUpdate,
7399
7560
  onClose
7400
- } = __spreadValues(__spreadValues({}, defaultProps$9), props);
7561
+ } = __spreadValues(__spreadValues({}, defaultProps$c), props);
7401
7562
  const weeks = ["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D"];
7402
7563
  const [yearMonthTitle, setYearMonthTitle] = useState("");
7403
7564
  const [unLoadPrev, setUnLoadPrev] = useState(false);
@@ -7450,23 +7611,23 @@ const CalendarItem = (props) => {
7450
7611
  return Utils.isEqual(state.currDate[1], currDate);
7451
7612
  };
7452
7613
  const getCurrDate = (day, month, isRange) => {
7453
- return isRange ? month.curData[3] + "-" + month.curData[4] + "-" + Utils.getNumTwoBit(+day.day) : month.curData[0] + "-" + month.curData[1] + "-" + Utils.getNumTwoBit(+day.day);
7614
+ return isRange ? `${month.curData[3]}-${month.curData[4]}-${Utils.getNumTwoBit(+day.day)}` : `${month.curData[0]}-${month.curData[1]}-${Utils.getNumTwoBit(+day.day)}`;
7454
7615
  };
7455
7616
  const getClass = (day, month, isRange) => {
7456
7617
  const currDate = getCurrDate(day, month, isRange);
7457
7618
  if (day.type === "curr") {
7458
7619
  if (!state.isRange && Utils.isEqual(state.currDate, currDate) || state.isRange && (isStart(currDate) || isEnd(currDate))) {
7459
7620
  return `${state.dayPrefix}-active`;
7460
- } else if (startDate && Utils.compareDate(currDate, startDate) || endDate && Utils.compareDate(endDate, currDate)) {
7621
+ }
7622
+ if (startDate && Utils.compareDate(currDate, startDate) || endDate && Utils.compareDate(endDate, currDate)) {
7461
7623
  return `${state.dayPrefix}-disabled`;
7462
- } else if (state.isRange && Array.isArray(state.currDate) && Object.values(state.currDate).length == 2 && Utils.compareDate(state.currDate[0], currDate) && Utils.compareDate(currDate, state.currDate[1])) {
7624
+ }
7625
+ if (state.isRange && Array.isArray(state.currDate) && Object.values(state.currDate).length == 2 && Utils.compareDate(state.currDate[0], currDate) && Utils.compareDate(currDate, state.currDate[1])) {
7463
7626
  return `${state.dayPrefix}-choose`;
7464
- } else {
7465
- return null;
7466
7627
  }
7467
- } else {
7468
- return `${state.dayPrefix}-disabled`;
7628
+ return null;
7469
7629
  }
7630
+ return `${state.dayPrefix}-disabled`;
7470
7631
  };
7471
7632
  const isActive = (day, month) => {
7472
7633
  return state.isRange && day.type == "curr" && getClass(day, month) == "calendar-month-day-active";
@@ -7496,21 +7657,17 @@ const CalendarItem = (props) => {
7496
7657
  } else {
7497
7658
  if (Object.values(state.currDate).length === 2) {
7498
7659
  state.currDate = [days[3]];
7660
+ } else if (Utils.compareDate(state.currDate[0], days[3])) {
7661
+ Array.isArray(state.currDate) && state.currDate.push(days[3]);
7499
7662
  } else {
7500
- if (Utils.compareDate(state.currDate[0], days[3])) {
7501
- Array.isArray(state.currDate) && state.currDate.push(days[3]);
7502
- } else {
7503
- Array.isArray(state.currDate) && state.currDate.unshift(days[3]);
7504
- }
7663
+ Array.isArray(state.currDate) && state.currDate.unshift(days[3]);
7505
7664
  }
7506
7665
  if (state.chooseData.length == 2 || !state.chooseData.length) {
7507
7666
  state.chooseData = [...days];
7667
+ } else if (Utils.compareDate(state.chooseData[3], days[3])) {
7668
+ state.chooseData = [[...state.chooseData], [...days]];
7508
7669
  } else {
7509
- if (Utils.compareDate(state.chooseData[3], days[3])) {
7510
- state.chooseData = [[...state.chooseData], [...days]];
7511
- } else {
7512
- state.chooseData = [[...days], [...state.chooseData]];
7513
- }
7670
+ state.chooseData = [[...days], [...state.chooseData]];
7514
7671
  }
7515
7672
  }
7516
7673
  if (isAutoBackFill && !isFirst) {
@@ -7522,9 +7679,8 @@ const CalendarItem = (props) => {
7522
7679
  const isStartTip = (day, month) => {
7523
7680
  if (isActive(day, month)) {
7524
7681
  return isStart(getCurrDate(day, month));
7525
- } else {
7526
- return false;
7527
7682
  }
7683
+ return false;
7528
7684
  };
7529
7685
  const isEndTip = (day, month) => {
7530
7686
  return isActive(day, month);
@@ -7575,12 +7731,10 @@ const CalendarItem = (props) => {
7575
7731
  if (!state.endData || !Utils.compareDate(`${state.endData[0]}-${state.endData[1]}-${Utils.getMonthDays(state.endData[0], state.endData[1])}`, `${curData[0]}-${curData[1]}-${curData[2]}`)) {
7576
7732
  state.monthsData.push(monthInfo);
7577
7733
  }
7734
+ } else if (!state.startData || !Utils.compareDate(`${curData[0]}-${curData[1]}-${curData[2]}`, `${state.startData[0]}-${state.startData[1]}-01`)) {
7735
+ state.monthsData.unshift(monthInfo);
7578
7736
  } else {
7579
- if (!state.startData || !Utils.compareDate(`${curData[0]}-${curData[1]}-${curData[2]}`, `${state.startData[0]}-${state.startData[1]}-01`)) {
7580
- state.monthsData.unshift(monthInfo);
7581
- } else {
7582
- setUnLoadPrev(true);
7583
- }
7737
+ setUnLoadPrev(true);
7584
7738
  }
7585
7739
  setMonthsData(state.monthsData);
7586
7740
  };
@@ -7688,8 +7842,8 @@ const CalendarItem = (props) => {
7688
7842
  }
7689
7843
  let moveTime = state.touchParams.lastTime - state.touchParams.startTime;
7690
7844
  if (moveTime <= 300) {
7691
- move = move * 2;
7692
- moveTime = moveTime + 1e3;
7845
+ move *= 2;
7846
+ moveTime += 1e3;
7693
7847
  setMove(move, "end", moveTime);
7694
7848
  } else {
7695
7849
  setMove(move, "end");
@@ -7790,9 +7944,9 @@ const CalendarItem = (props) => {
7790
7944
  onClick: confirm2
7791
7945
  }, "\u786E\u5B9A")) : ""));
7792
7946
  };
7793
- CalendarItem.defaultProps = defaultProps$9;
7947
+ CalendarItem.defaultProps = defaultProps$c;
7794
7948
  CalendarItem.displayName = "NutCalendarItem";
7795
- const defaultProps$8 = {
7949
+ const defaultProps$b = {
7796
7950
  type: "one",
7797
7951
  isAutoBackFill: false,
7798
7952
  poppable: true,
@@ -7819,7 +7973,7 @@ const Calendar = (props) => {
7819
7973
  endDate,
7820
7974
  onClose,
7821
7975
  onChoose
7822
- } = __spreadValues(__spreadValues({}, defaultProps$8), props);
7976
+ } = __spreadValues(__spreadValues({}, defaultProps$b), props);
7823
7977
  const close = () => {
7824
7978
  onClose && onClose();
7825
7979
  };
@@ -7862,9 +8016,364 @@ const Calendar = (props) => {
7862
8016
  onChoose: choose
7863
8017
  }));
7864
8018
  };
7865
- Calendar.defaultProps = defaultProps$8;
8019
+ Calendar.defaultProps = defaultProps$b;
7866
8020
  Calendar.displayName = "NutCalendar";
7867
- const defaultProps$7 = {
8021
+ const currentYear = new Date().getFullYear();
8022
+ const defaultProps$a = {
8023
+ modelValue: new Date(),
8024
+ visible: false,
8025
+ title: "",
8026
+ type: "date",
8027
+ isShowChinese: true,
8028
+ minuteStep: 1,
8029
+ minDate: new Date(currentYear - 10, 0, 1),
8030
+ maxDate: new Date(currentYear + 10, 11, 31),
8031
+ onCloseDatePicker: () => void 0
8032
+ };
8033
+ const DatePicker = (props) => {
8034
+ const _a = __spreadValues(__spreadValues({}, defaultProps$a), props), {
8035
+ minDate,
8036
+ maxDate,
8037
+ type,
8038
+ isShowChinese,
8039
+ minuteStep,
8040
+ modelValue,
8041
+ visible,
8042
+ title,
8043
+ onCloseDatePicker,
8044
+ onConfirmDatePicker,
8045
+ className,
8046
+ style
8047
+ } = _a, rest = __objRest(_a, [
8048
+ "minDate",
8049
+ "maxDate",
8050
+ "type",
8051
+ "isShowChinese",
8052
+ "minuteStep",
8053
+ "modelValue",
8054
+ "visible",
8055
+ "title",
8056
+ "onCloseDatePicker",
8057
+ "onConfirmDatePicker",
8058
+ "className",
8059
+ "style"
8060
+ ]);
8061
+ const [show, setShow] = useState(false);
8062
+ const [currentDate, setCurrentDate] = useState(new Date());
8063
+ const [defaultValue, setDefaultValue] = useState([]);
8064
+ const [listData, setListData] = useState([]);
8065
+ const pickerRef = useRef(null);
8066
+ const zhCNType = {
8067
+ day: "\u65E5",
8068
+ year: "\u5E74",
8069
+ month: "\u6708",
8070
+ hour: "\u65F6",
8071
+ minute: "\u5206",
8072
+ seconds: "\u79D2"
8073
+ };
8074
+ function getMonthEndDay(year, month) {
8075
+ return new Date(year, month, 0).getDate();
8076
+ }
8077
+ const getBoundary = (type2, value) => {
8078
+ const boundary = type2 === "min" ? minDate : maxDate;
8079
+ const year = boundary.getFullYear();
8080
+ let month = 1;
8081
+ let date = 1;
8082
+ let hour = 0;
8083
+ let minute = 0;
8084
+ if (type2 === "max") {
8085
+ month = 12;
8086
+ date = getMonthEndDay(value.getFullYear(), value.getMonth() + 1);
8087
+ hour = 23;
8088
+ minute = 59;
8089
+ }
8090
+ const seconds = minute;
8091
+ if (value.getFullYear() === year) {
8092
+ month = boundary.getMonth() + 1;
8093
+ if (value.getMonth() + 1 === month) {
8094
+ date = boundary.getDate();
8095
+ if (value.getDate() === date) {
8096
+ hour = boundary.getHours();
8097
+ if (value.getHours() === hour) {
8098
+ minute = boundary.getMinutes();
8099
+ }
8100
+ }
8101
+ }
8102
+ }
8103
+ return {
8104
+ [`${type2}Year`]: year,
8105
+ [`${type2}Month`]: month,
8106
+ [`${type2}Date`]: date,
8107
+ [`${type2}Hour`]: hour,
8108
+ [`${type2}Minute`]: minute,
8109
+ [`${type2}Seconds`]: seconds
8110
+ };
8111
+ };
8112
+ const ranges = (date) => {
8113
+ const curDate = date || currentDate;
8114
+ const { maxYear, maxDate: maxDate2, maxMonth, maxHour, maxMinute, maxSeconds } = getBoundary("max", curDate);
8115
+ const { minYear, minDate: minDate2, minMonth, minHour, minMinute, minSeconds } = getBoundary("min", curDate);
8116
+ const result = [
8117
+ {
8118
+ type: "year",
8119
+ range: [minYear, maxYear]
8120
+ },
8121
+ {
8122
+ type: "month",
8123
+ range: [minMonth, maxMonth]
8124
+ },
8125
+ {
8126
+ type: "day",
8127
+ range: [minDate2, maxDate2]
8128
+ },
8129
+ {
8130
+ type: "hour",
8131
+ range: [minHour, maxHour]
8132
+ },
8133
+ {
8134
+ type: "minute",
8135
+ range: [minMinute, maxMinute]
8136
+ },
8137
+ {
8138
+ type: "seconds",
8139
+ range: [minSeconds, maxSeconds]
8140
+ }
8141
+ ];
8142
+ let start2 = 0;
8143
+ let end = 0;
8144
+ switch (type) {
8145
+ case "date":
8146
+ start2 = 0;
8147
+ end = 3;
8148
+ break;
8149
+ case "datetime":
8150
+ start2 = 0;
8151
+ end = 5;
8152
+ break;
8153
+ case "time":
8154
+ start2 = 3;
8155
+ end = 6;
8156
+ break;
8157
+ case "month-day":
8158
+ start2 = 1;
8159
+ end = 3;
8160
+ break;
8161
+ case "datehour":
8162
+ start2 = 0;
8163
+ end = 4;
8164
+ break;
8165
+ }
8166
+ return result.slice(start2, end);
8167
+ };
8168
+ const initDefault = () => {
8169
+ if (["date", "datetime", "time"].includes(type)) {
8170
+ const formatDate = [
8171
+ modelValue.getFullYear(),
8172
+ modelValue.getMonth() + 1,
8173
+ modelValue.getDate(),
8174
+ modelValue.getHours(),
8175
+ modelValue.getMinutes(),
8176
+ modelValue.getSeconds()
8177
+ ];
8178
+ let [year, month, day, hour, minute, seconds] = formatDate;
8179
+ day = Math.min(day, getMonthEndDay(year, month));
8180
+ let val = formatDate;
8181
+ if (isShowChinese) {
8182
+ val = [
8183
+ year + zhCNType.year,
8184
+ month + zhCNType.month,
8185
+ day + zhCNType.day,
8186
+ hour + zhCNType.hour,
8187
+ minute + zhCNType.minute,
8188
+ seconds + zhCNType.seconds
8189
+ ];
8190
+ }
8191
+ if (type === "date") {
8192
+ setDefaultValue(val.splice(0, 3));
8193
+ } else if (type === "datetime") {
8194
+ setDefaultValue(val.splice(0, 5));
8195
+ } else if (type === "time") {
8196
+ setDefaultValue(val.splice(3, 3));
8197
+ }
8198
+ }
8199
+ };
8200
+ const updateChooseValueCustmer = (index2, resValue, cacheValueData) => {
8201
+ if (index2 === 1 && (type === "date" || type === "datetime")) {
8202
+ const modelValue2 = new Date(cacheValueData.slice(0, 3).join("-").replace(/[^0-9\-]/g, ""));
8203
+ setTimeout(() => {
8204
+ const data = columns(modelValue2);
8205
+ let val = [];
8206
+ if (isShowChinese) {
8207
+ val = [
8208
+ modelValue2.getFullYear() + zhCNType.year,
8209
+ resValue,
8210
+ modelValue2.getDate() + zhCNType.day
8211
+ ];
8212
+ } else {
8213
+ val = [modelValue2.getFullYear(), resValue, modelValue2.getDate()];
8214
+ }
8215
+ setDefaultValue(val);
8216
+ setListData(data);
8217
+ setTimeout(() => {
8218
+ var _a2;
8219
+ (_a2 = pickerRef.current) == null ? void 0 : _a2.updateChooseValue(index2 + 1, data[1] ? data[1][0].toString() : "0", cacheValueData);
8220
+ }, 200);
8221
+ }, 100);
8222
+ }
8223
+ };
8224
+ const generateValue = (min, max, val, type2) => {
8225
+ if (!(max > min))
8226
+ return;
8227
+ const arr = [];
8228
+ while (min <= max) {
8229
+ if (isShowChinese) {
8230
+ arr.push(min + zhCNType[type2]);
8231
+ } else {
8232
+ arr.push(min);
8233
+ }
8234
+ if (type2 === "minute") {
8235
+ min += minuteStep;
8236
+ } else {
8237
+ min++;
8238
+ }
8239
+ }
8240
+ return arr;
8241
+ };
8242
+ const getDateIndex = (type2, date) => {
8243
+ const curDate = date || currentDate;
8244
+ switch (type2) {
8245
+ case "year":
8246
+ return curDate.getFullYear();
8247
+ case "month":
8248
+ return curDate.getMonth();
8249
+ case "day":
8250
+ return curDate.getDate();
8251
+ case "hour":
8252
+ return curDate.getHours();
8253
+ case "minute":
8254
+ return curDate.getMinutes();
8255
+ case "seconds":
8256
+ return curDate.getSeconds();
8257
+ default:
8258
+ return 0;
8259
+ }
8260
+ };
8261
+ const columns = (date) => {
8262
+ const val = ranges(date).map((res) => {
8263
+ return generateValue(res.range[0], res.range[1], getDateIndex(res.type, date), res.type);
8264
+ });
8265
+ return val || [];
8266
+ };
8267
+ useEffect(() => {
8268
+ setCurrentDate(modelValue);
8269
+ setListData(columns());
8270
+ initDefault();
8271
+ }, []);
8272
+ useEffect(() => {
8273
+ setShow(visible);
8274
+ }, [visible]);
8275
+ return /* @__PURE__ */ React__default.createElement("div", __spreadValues({
8276
+ className: `nut-datepicker ${className || ""}`,
8277
+ style
8278
+ }, rest), /* @__PURE__ */ React__default.createElement(Picker, {
8279
+ isVisible: show,
8280
+ listData,
8281
+ onClose: onCloseDatePicker,
8282
+ defaultValueData: defaultValue,
8283
+ onConfirm: (list) => onConfirmDatePicker && onConfirmDatePicker(list),
8284
+ onChoose: (index2, value, list) => updateChooseValueCustmer(index2, value, list),
8285
+ ref: pickerRef
8286
+ }));
8287
+ };
8288
+ DatePicker.defaultProps = defaultProps$a;
8289
+ DatePicker.displayName = "NutDatePicker";
8290
+ const defaultProps$9 = {
8291
+ width: 100,
8292
+ height: 100,
8293
+ row: 1,
8294
+ animated: false,
8295
+ title: false,
8296
+ avatar: false,
8297
+ round: false,
8298
+ avatarSize: "50px",
8299
+ loading: false,
8300
+ avatarShape: "round"
8301
+ };
8302
+ const Skeleton = (props) => {
8303
+ const _a = __spreadValues(__spreadValues({}, defaultProps$9), props), {
8304
+ className,
8305
+ width,
8306
+ height,
8307
+ animated: animated2,
8308
+ row,
8309
+ title,
8310
+ avatar,
8311
+ avatarSize,
8312
+ round,
8313
+ loading,
8314
+ children,
8315
+ avatarShape
8316
+ } = _a, restProps = __objRest(_a, [
8317
+ "className",
8318
+ "width",
8319
+ "height",
8320
+ "animated",
8321
+ "row",
8322
+ "title",
8323
+ "avatar",
8324
+ "avatarSize",
8325
+ "round",
8326
+ "loading",
8327
+ "children",
8328
+ "avatarShape"
8329
+ ]);
8330
+ const b2 = cn("skeleton");
8331
+ const classes = classNames(className, b2());
8332
+ const blockClass = classNames({
8333
+ blockClass: true,
8334
+ "blockClass--round": round
8335
+ });
8336
+ const avatarClass = classNames({
8337
+ avatarClass: true,
8338
+ [`avatarClass--${avatarShape}`]: avatarShape
8339
+ });
8340
+ const repeatLines = (num) => {
8341
+ return Array.from({ length: num }, (v2, i) => i);
8342
+ };
8343
+ const getStyle = () => {
8344
+ return {
8345
+ width: avatarSize,
8346
+ height: avatarSize
8347
+ };
8348
+ };
8349
+ return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, loading ? /* @__PURE__ */ React__default.createElement("div", null, children) : /* @__PURE__ */ React__default.createElement("div", __spreadValues({
8350
+ className: classes
8351
+ }, restProps), /* @__PURE__ */ React__default.createElement("div", {
8352
+ className: "skeleton-animation"
8353
+ }), /* @__PURE__ */ React__default.createElement("div", {
8354
+ className: "nut-skeleton-content"
8355
+ }, avatar && /* @__PURE__ */ React__default.createElement(Avatar, {
8356
+ className: avatarClass,
8357
+ bgColor: "rgb(239, 239, 239)",
8358
+ style: getStyle()
8359
+ }), row === 1 ? /* @__PURE__ */ React__default.createElement("div", {
8360
+ className: blockClass,
8361
+ style: { width: `${width}px`, height: `${height}px` }
8362
+ }) : /* @__PURE__ */ React__default.createElement("div", {
8363
+ className: "skeleton-content-line"
8364
+ }, title && /* @__PURE__ */ React__default.createElement("div", {
8365
+ className: "skeleton-title"
8366
+ }), repeatLines(row).map((item, index2) => {
8367
+ return /* @__PURE__ */ React__default.createElement("div", {
8368
+ className: `${blockClass} skeleton-lines`,
8369
+ key: index2,
8370
+ style: { width: `${width}px`, height: `${height}px` }
8371
+ });
8372
+ })))));
8373
+ };
8374
+ Skeleton.defaultProps = defaultProps$9;
8375
+ Skeleton.displayName = "NutSkeleton";
8376
+ const defaultProps$8 = {
7868
8377
  type: "custom",
7869
8378
  existAddress: [],
7870
8379
  defaultIcon: "location2",
@@ -7873,7 +8382,7 @@ const defaultProps$7 = {
7873
8382
  customAndExistTitle: "\u9009\u62E9\u5176\u4ED6\u5730\u5740"
7874
8383
  };
7875
8384
  const ExistRender = (props) => {
7876
- const _a = __spreadValues(__spreadValues({}, defaultProps$7), props), {
8385
+ const _a = __spreadValues(__spreadValues({}, defaultProps$8), props), {
7877
8386
  children,
7878
8387
  type,
7879
8388
  existAddress,
@@ -7955,7 +8464,7 @@ const ExistRender = (props) => {
7955
8464
  className: b2("choose-other-btn")
7956
8465
  }, customAndExistTitle)));
7957
8466
  };
7958
- const defaultProps$6 = {
8467
+ const defaultProps$7 = {
7959
8468
  type: "custom",
7960
8469
  province: [],
7961
8470
  city: [],
@@ -7964,7 +8473,7 @@ const defaultProps$6 = {
7964
8473
  height: "200px"
7965
8474
  };
7966
8475
  const CustomRender = (props) => {
7967
- const _a = __spreadValues(__spreadValues({}, defaultProps$6), props), { children, type, height, province, city, country, town, onNextArea, onClose } = _a, rest = __objRest(_a, ["children", "type", "height", "province", "city", "country", "town", "onNextArea", "onClose"]);
8476
+ const _a = __spreadValues(__spreadValues({}, defaultProps$7), props), { children, type, height, province, city, country, town, onNextArea, onClose } = _a, rest = __objRest(_a, ["children", "type", "height", "province", "city", "country", "town", "onNextArea", "onClose"]);
7968
8477
  const b2 = cn("address");
7969
8478
  const [privateType, setPrivateType] = useState(type);
7970
8479
  const [tabIndex, setTabIndex] = useState(0);
@@ -7985,7 +8494,6 @@ const CustomRender = (props) => {
7985
8494
  data.forEach((item) => {
7986
8495
  if (!item.title) {
7987
8496
  console.error("[NutUI] <Address> \u8BF7\u68C0\u67E5\u6570\u7EC4\u9009\u9879\u7684 title \u503C\u662F\u5426\u6709\u8BBE\u7F6E ,title \u4E3A\u5FC5\u586B\u9879 .");
7988
- return;
7989
8497
  }
7990
8498
  });
7991
8499
  const newData = [];
@@ -8028,9 +8536,8 @@ const CustomRender = (props) => {
8028
8536
  return item.name;
8029
8537
  if (tabIndex < index2) {
8030
8538
  return item.name;
8031
- } else {
8032
- return "\u8BF7\u9009\u62E9";
8033
8539
  }
8540
+ return "\u8BF7\u9009\u62E9";
8034
8541
  };
8035
8542
  const mapRef = {
8036
8543
  province: provinceRef,
@@ -8044,7 +8551,7 @@ const CustomRender = (props) => {
8044
8551
  const refD = mapRef;
8045
8552
  if (name && refD[name] && refD[name].current) {
8046
8553
  const distance = refD[name].current.offsetLeft;
8047
- setLineDistance(distance ? distance : 20);
8554
+ setLineDistance(distance || 20);
8048
8555
  }
8049
8556
  }, 0);
8050
8557
  };
@@ -8089,25 +8596,25 @@ const CustomRender = (props) => {
8089
8596
  nextAreaList(item);
8090
8597
  };
8091
8598
  useEffect(() => {
8092
- const { province: province2 } = __spreadValues(__spreadValues({}, defaultProps$6), props);
8599
+ const { province: province2 } = __spreadValues(__spreadValues({}, defaultProps$7), props);
8093
8600
  setRegionList(__spreadProps(__spreadValues({}, regionList), {
8094
8601
  province: isCustom2() ? transformData(province2) : province2
8095
8602
  }));
8096
8603
  }, [province]);
8097
8604
  useEffect(() => {
8098
- const { city: city2 } = __spreadValues(__spreadValues({}, defaultProps$6), props);
8605
+ const { city: city2 } = __spreadValues(__spreadValues({}, defaultProps$7), props);
8099
8606
  setRegionList(__spreadProps(__spreadValues({}, regionList), {
8100
8607
  city: isCustom2() ? transformData(city2) : city2
8101
8608
  }));
8102
8609
  }, [city]);
8103
8610
  useEffect(() => {
8104
- const { country: country2 } = __spreadValues(__spreadValues({}, defaultProps$6), props);
8611
+ const { country: country2 } = __spreadValues(__spreadValues({}, defaultProps$7), props);
8105
8612
  setRegionList(__spreadProps(__spreadValues({}, regionList), {
8106
8613
  country: isCustom2() ? transformData(country2) : country2
8107
8614
  }));
8108
8615
  }, [country]);
8109
8616
  useEffect(() => {
8110
- const { town: town2 } = __spreadValues(__spreadValues({}, defaultProps$6), props);
8617
+ const { town: town2 } = __spreadValues(__spreadValues({}, defaultProps$7), props);
8111
8618
  setRegionList(__spreadProps(__spreadValues({}, regionList), {
8112
8619
  town: isCustom2() ? transformData(town2) : town2
8113
8620
  }));
@@ -8126,7 +8633,7 @@ const CustomRender = (props) => {
8126
8633
  }), /* @__PURE__ */ React__default.createElement("div", {
8127
8634
  className: b2("tab-line"),
8128
8635
  ref: regionLine,
8129
- style: { left: lineDistance + "px" }
8636
+ style: { left: `${lineDistance}px` }
8130
8637
  })), privateType === "custom" && /* @__PURE__ */ React__default.createElement("div", {
8131
8638
  className: b2("region-con")
8132
8639
  }, /* @__PURE__ */ React__default.createElement("ul", {
@@ -8150,7 +8657,7 @@ const CustomRender = (props) => {
8150
8657
  clickItem: handleElevatorItem
8151
8658
  })));
8152
8659
  };
8153
- const defaultProps$5 = {
8660
+ const defaultProps$6 = {
8154
8661
  modelValue: false,
8155
8662
  type: "custom",
8156
8663
  customAddressTitle: "\u8BF7\u9009\u62E9\u6240\u5728\u5730\u533A",
@@ -8169,7 +8676,7 @@ const defaultProps$5 = {
8169
8676
  backBtnIcon: "left"
8170
8677
  };
8171
8678
  const Address = (props) => {
8172
- const _a = __spreadValues(__spreadValues({}, defaultProps$5), props), {
8679
+ const _a = __spreadValues(__spreadValues({}, defaultProps$6), props), {
8173
8680
  modelValue,
8174
8681
  children,
8175
8682
  type,
@@ -8230,7 +8737,7 @@ const Address = (props) => {
8230
8737
  country: { name: "" },
8231
8738
  town: { name: "" }
8232
8739
  });
8233
- let [selectedExistAddress, setSelectedExistAddress] = useState({});
8740
+ const [selectedExistAddress, setSelectedExistAddress] = useState({});
8234
8741
  const [closeWay, setCloseWay] = useState("self");
8235
8742
  const handClose = (type2 = "self") => {
8236
8743
  setCloseWay(() => type2 === "cross" ? "cross" : "self");
@@ -8265,7 +8772,7 @@ const Address = (props) => {
8265
8772
  console.log(selectedRegion);
8266
8773
  };
8267
8774
  const closeFun = () => {
8268
- const resCopy = Object.assign({
8775
+ const resCopy = __spreadValues({
8269
8776
  addressIdStr: "",
8270
8777
  addressStr: ""
8271
8778
  }, selectedRegion);
@@ -8341,7 +8848,7 @@ const Address = (props) => {
8341
8848
  closeFun();
8342
8849
  }
8343
8850
  }, /* @__PURE__ */ React__default.createElement("div", __spreadValues({
8344
- className: `${b2()} ${className ? className : ""}`,
8851
+ className: `${b2()} ${className || ""}`,
8345
8852
  style: __spreadValues({}, style)
8346
8853
  }, rest), headerRender(), (privateType === "custom" || privateType === "custom2") && /* @__PURE__ */ React__default.createElement(CustomRender, {
8347
8854
  type: privateType,
@@ -8365,9 +8872,9 @@ const Address = (props) => {
8365
8872
  onSwitchModule
8366
8873
  }))));
8367
8874
  };
8368
- Address.defaultProps = defaultProps$5;
8875
+ Address.defaultProps = defaultProps$6;
8369
8876
  Address.displayName = "NutAddress";
8370
- const defaultProps$4 = {
8877
+ const defaultProps$5 = {
8371
8878
  barrageList: [],
8372
8879
  frequency: 500,
8373
8880
  loop: true,
@@ -8376,7 +8883,7 @@ const defaultProps$4 = {
8376
8883
  top: 10
8377
8884
  };
8378
8885
  const InternalBarrage = (props, ref) => {
8379
- const _a = __spreadValues(__spreadValues({}, defaultProps$4), props), { className, frequency, loop: loop2, barrageList, speeds, rows, top } = _a, restProps = __objRest(_a, ["className", "frequency", "loop", "barrageList", "speeds", "rows", "top"]);
8886
+ const _a = __spreadValues(__spreadValues({}, defaultProps$5), props), { className, frequency, loop: loop2, barrageList, speeds, rows, top } = _a, restProps = __objRest(_a, ["className", "frequency", "loop", "barrageList", "speeds", "rows", "top"]);
8380
8887
  const barrageBody = useRef(null);
8381
8888
  const barrageContainer = useRef(null);
8382
8889
  const barrageCWidth = useRef(0);
@@ -8408,7 +8915,7 @@ const InternalBarrage = (props, ref) => {
8408
8915
  };
8409
8916
  const play = () => {
8410
8917
  const _index = loop2 ? index2.current % barrageList.length : index2.current;
8411
- let el = document.createElement(`div`);
8918
+ const el = document.createElement(`div`);
8412
8919
  el.innerHTML = barrageList[_index];
8413
8920
  el.classList.add("barrage-item");
8414
8921
  barrageContainer.current.appendChild(el);
@@ -8417,8 +8924,8 @@ const InternalBarrage = (props, ref) => {
8417
8924
  console.log(el.offsetWidth, el.offsetHeight);
8418
8925
  el.classList.add("move");
8419
8926
  el.style.animationDuration = `${speeds}ms`;
8420
- el.style.top = _index % rows * (height + top) + 20 + "px";
8421
- el.style.width = width + 20 + "px";
8927
+ el.style.top = `${_index % rows * (height + top) + 20}px`;
8928
+ el.style.width = `${width + 20}px`;
8422
8929
  el.style.setProperty("--move-distance", `-${barrageCWidth.current}px`);
8423
8930
  el.dataset.index = `${_index}`;
8424
8931
  el.addEventListener("animationend", () => {
@@ -8435,9 +8942,9 @@ const InternalBarrage = (props, ref) => {
8435
8942
  }));
8436
8943
  };
8437
8944
  const Barrage = React__default.forwardRef(InternalBarrage);
8438
- Barrage.defaultProps = defaultProps$4;
8945
+ Barrage.defaultProps = defaultProps$5;
8439
8946
  Barrage.displayName = "NutBarrage";
8440
- const defaultProps$3 = {
8947
+ const defaultProps$4 = {
8441
8948
  type: "png",
8442
8949
  lineWidth: 2,
8443
8950
  strokeStyle: "#000",
@@ -8445,7 +8952,7 @@ const defaultProps$3 = {
8445
8952
  className: ""
8446
8953
  };
8447
8954
  const Signature = (props) => {
8448
- const _a = __spreadValues(__spreadValues({}, defaultProps$3), props), { type, lineWidth, strokeStyle, unSupportTpl, className } = _a, rest = __objRest(_a, ["type", "lineWidth", "strokeStyle", "unSupportTpl", "className"]);
8955
+ const _a = __spreadValues(__spreadValues({}, defaultProps$4), props), { type, lineWidth, strokeStyle, unSupportTpl, className } = _a, rest = __objRest(_a, ["type", "lineWidth", "strokeStyle", "unSupportTpl", "className"]);
8449
8956
  const b2 = cn("signature");
8450
8957
  const canvasRef = useRef(null);
8451
8958
  const wrapRef = useRef(null);
@@ -8453,7 +8960,7 @@ const Signature = (props) => {
8453
8960
  const [canvasWidth, setCanvasWidth] = useState(0);
8454
8961
  const ctx2 = useRef(null);
8455
8962
  const isCanvasSupported = () => {
8456
- let elem = document.createElement("canvas");
8963
+ const elem = document.createElement("canvas");
8457
8964
  return !!(elem.getContext && elem.getContext("2d"));
8458
8965
  };
8459
8966
  const isSupportTouch = "ontouchstart" in window;
@@ -8484,11 +8991,11 @@ const Signature = (props) => {
8484
8991
  };
8485
8992
  const moveEventHandler = (event) => {
8486
8993
  event.preventDefault();
8487
- let evt = isSupportTouch ? event.touches[0] : event;
8994
+ const evt = isSupportTouch ? event.touches[0] : event;
8488
8995
  if (canvasRef.current && ctx2.current) {
8489
- let coverPos = canvasRef.current.getBoundingClientRect();
8490
- let mouseX = evt.clientX - coverPos.left;
8491
- let mouseY = evt.clientY - coverPos.top;
8996
+ const coverPos = canvasRef.current.getBoundingClientRect();
8997
+ const mouseX = evt.clientX - coverPos.left;
8998
+ const mouseY = evt.clientY - coverPos.top;
8492
8999
  ctx2.current.lineTo(mouseX, mouseY);
8493
9000
  ctx2.current.stroke();
8494
9001
  }
@@ -8552,7 +9059,7 @@ const Signature = (props) => {
8552
9059
  onClick: () => confirm2()
8553
9060
  }, "\u786E\u8BA4"));
8554
9061
  };
8555
- Signature.defaultProps = defaultProps$3;
9062
+ Signature.defaultProps = defaultProps$4;
8556
9063
  Signature.displayName = "NutSignature";
8557
9064
  function clamp(v2, min, max) {
8558
9065
  return Math.max(min, Math.min(v2, max));
@@ -8613,29 +9120,20 @@ function ownKeys(object, enumerableOnly) {
8613
9120
  var keys = Object.keys(object);
8614
9121
  if (Object.getOwnPropertySymbols) {
8615
9122
  var symbols = Object.getOwnPropertySymbols(object);
8616
- if (enumerableOnly) {
8617
- symbols = symbols.filter(function(sym) {
8618
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
8619
- });
8620
- }
8621
- keys.push.apply(keys, symbols);
9123
+ enumerableOnly && (symbols = symbols.filter(function(sym) {
9124
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
9125
+ })), keys.push.apply(keys, symbols);
8622
9126
  }
8623
9127
  return keys;
8624
9128
  }
8625
9129
  function _objectSpread2(target) {
8626
9130
  for (var i = 1; i < arguments.length; i++) {
8627
9131
  var source = arguments[i] != null ? arguments[i] : {};
8628
- if (i % 2) {
8629
- ownKeys(Object(source), true).forEach(function(key) {
8630
- _defineProperty(target, key, source[key]);
8631
- });
8632
- } else if (Object.getOwnPropertyDescriptors) {
8633
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
8634
- } else {
8635
- ownKeys(Object(source)).forEach(function(key) {
8636
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
8637
- });
8638
- }
9132
+ i % 2 ? ownKeys(Object(source), true).forEach(function(key) {
9133
+ _defineProperty(target, key, source[key]);
9134
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
9135
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
9136
+ });
8639
9137
  }
8640
9138
  return target;
8641
9139
  }
@@ -8671,6 +9169,22 @@ function toHandlerProp(device, action = "", capture = false) {
8671
9169
  const actionKey = deviceProps ? deviceProps[action] || action : action;
8672
9170
  return "on" + capitalize(device) + capitalize(actionKey) + (capture ? "Capture" : "");
8673
9171
  }
9172
+ const pointerCaptureEvents = ["gotpointercapture", "lostpointercapture"];
9173
+ function parseProp(prop) {
9174
+ let eventKey = prop.substring(2).toLowerCase();
9175
+ const passive = !!~eventKey.indexOf("passive");
9176
+ if (passive)
9177
+ eventKey = eventKey.replace("passive", "");
9178
+ const captureKey = pointerCaptureEvents.includes(eventKey) ? "capturecapture" : "capture";
9179
+ const capture = !!~eventKey.indexOf(captureKey);
9180
+ if (capture)
9181
+ eventKey = eventKey.replace("capture", "");
9182
+ return {
9183
+ device: eventKey,
9184
+ capture,
9185
+ passive
9186
+ };
9187
+ }
8674
9188
  function toDomEventType(device, action = "") {
8675
9189
  const deviceProps = EVENT_TYPE_MAP[device];
8676
9190
  const actionKey = deviceProps ? deviceProps[action] || action : action;
@@ -8686,7 +9200,7 @@ function getCurrentTargetTouchList(event) {
8686
9200
  });
8687
9201
  }
8688
9202
  function getTouchList(event) {
8689
- return event.type === "touchend" ? event.changedTouches : event.targetTouches;
9203
+ return event.type === "touchend" || event.type === "touchcancel" ? event.changedTouches : event.targetTouches;
8690
9204
  }
8691
9205
  function getValueEvent(event) {
8692
9206
  return isTouch(event) ? getTouchList(event)[0] : event;
@@ -8798,6 +9312,7 @@ class Engine {
8798
9312
  state.intentional = false;
8799
9313
  state._movement = [0, 0];
8800
9314
  state._distance = [0, 0];
9315
+ state._direction = [0, 0];
8801
9316
  state._delta = [0, 0];
8802
9317
  state._bounds = [[-Infinity, Infinity], [-Infinity, Infinity]];
8803
9318
  state.args = args;
@@ -8806,6 +9321,8 @@ class Engine {
8806
9321
  state.elapsedTime = 0;
8807
9322
  state.direction = [0, 0];
8808
9323
  state.distance = [0, 0];
9324
+ state.overflow = [0, 0];
9325
+ state._movementBound = [false, false];
8809
9326
  state.velocity = [0, 0];
8810
9327
  state.movement = [0, 0];
8811
9328
  state.delta = [0, 0];
@@ -8891,7 +9408,9 @@ class Engine {
8891
9408
  }
8892
9409
  if (this.intent)
8893
9410
  this.intent(movement);
8894
- if (state._active && !state._blocked || state.active) {
9411
+ const previousOffset = state.offset;
9412
+ const gestureIsActive = state._active && !state._blocked || state.active;
9413
+ if (gestureIsActive) {
8895
9414
  state.first = state._active && !state.active;
8896
9415
  state.last = !state._active && state.active;
8897
9416
  state.active = shared[this.ingKey] = state._active;
@@ -8903,22 +9422,28 @@ class Engine {
8903
9422
  this.setup();
8904
9423
  }
8905
9424
  state.movement = movement;
8906
- const previousOffset = state.offset;
8907
9425
  this.computeOffset();
8908
- if (!state.last || dt > BEFORE_LAST_KINEMATICS_DELAY) {
8909
- state.delta = V.sub(state.offset, previousOffset);
8910
- const absoluteDelta = state.delta.map(Math.abs);
8911
- V.addTo(state.distance, absoluteDelta);
8912
- state.direction = state.delta.map(Math.sign);
8913
- if (!state.first && dt > 0) {
8914
- state.velocity = [absoluteDelta[0] / dt, absoluteDelta[1] / dt];
8915
- }
8916
- }
8917
9426
  }
8918
9427
  }
9428
+ const [ox, oy] = state.offset;
9429
+ const [[x0, x1], [y0, y1]] = state._bounds;
9430
+ state.overflow = [ox < x0 ? -1 : ox > x1 ? 1 : 0, oy < y0 ? -1 : oy > y1 ? 1 : 0];
9431
+ state._movementBound[0] = state.overflow[0] ? state._movementBound[0] === false ? state._movement[0] : state._movementBound[0] : false;
9432
+ state._movementBound[1] = state.overflow[1] ? state._movementBound[1] === false ? state._movement[1] : state._movementBound[1] : false;
8919
9433
  const rubberband2 = state._active ? config2.rubberband || [0, 0] : [0, 0];
8920
9434
  state.offset = computeRubberband(state._bounds, state.offset, rubberband2);
9435
+ state.delta = V.sub(state.offset, previousOffset);
8921
9436
  this.computeMovement();
9437
+ if (gestureIsActive && (!state.last || dt > BEFORE_LAST_KINEMATICS_DELAY)) {
9438
+ state.delta = V.sub(state.offset, previousOffset);
9439
+ const absoluteDelta = state.delta.map(Math.abs);
9440
+ V.addTo(state.distance, absoluteDelta);
9441
+ state.direction = state.delta.map(Math.sign);
9442
+ state._direction = state._delta.map(Math.sign);
9443
+ if (!state.first && dt > 0) {
9444
+ state.velocity = [absoluteDelta[0] / dt, absoluteDelta[1] / dt];
9445
+ }
9446
+ }
8922
9447
  }
8923
9448
  emit() {
8924
9449
  const state = this.state;
@@ -9150,7 +9675,7 @@ class DragEngine extends CoordinatesEngine {
9150
9675
  if (state.type === event.type && event.timeStamp === state.timeStamp)
9151
9676
  return;
9152
9677
  const id = pointerId(event);
9153
- if (state._pointerId && id !== state._pointerId)
9678
+ if (state._pointerId !== void 0 && id !== state._pointerId)
9154
9679
  return;
9155
9680
  const _values = pointerValues(event);
9156
9681
  if (document.pointerLockElement === event.target) {
@@ -9198,13 +9723,13 @@ class DragEngine extends CoordinatesEngine {
9198
9723
  if (!state._pointerActive)
9199
9724
  return;
9200
9725
  const id = pointerId(event);
9201
- if (state._pointerId && id !== state._pointerId)
9726
+ if (state._pointerId !== void 0 && id !== state._pointerId)
9202
9727
  return;
9203
9728
  this.state._pointerActive = false;
9204
9729
  this.setActive();
9205
9730
  this.compute(event);
9206
9731
  const [dx, dy] = state._distance;
9207
- state.tap = dx <= 3 && dy <= 3;
9732
+ state.tap = dx <= config2.tapsThreshold && dy <= config2.tapsThreshold;
9208
9733
  if (state.tap && config2.filterTaps) {
9209
9734
  state._force = true;
9210
9735
  } else {
@@ -9238,6 +9763,7 @@ class DragEngine extends CoordinatesEngine {
9238
9763
  if (!config2.pointerCapture) {
9239
9764
  this.eventStore.add(this.sharedConfig.window, device, "change", this.pointerMove.bind(this));
9240
9765
  this.eventStore.add(this.sharedConfig.window, device, "end", this.pointerUp.bind(this));
9766
+ this.eventStore.add(this.sharedConfig.window, device, "cancel", this.pointerUp.bind(this));
9241
9767
  }
9242
9768
  }
9243
9769
  pointerClean() {
@@ -9295,12 +9821,14 @@ class DragEngine extends CoordinatesEngine {
9295
9821
  bindFunction(device, "change", this.pointerMove.bind(this));
9296
9822
  bindFunction(device, "end", this.pointerUp.bind(this));
9297
9823
  bindFunction(device, "cancel", this.pointerUp.bind(this));
9824
+ bindFunction("lostPointerCapture", "", this.pointerUp.bind(this));
9298
9825
  }
9299
9826
  bindFunction("key", "down", this.keyDown.bind(this));
9300
9827
  bindFunction("key", "up", this.keyUp.bind(this));
9301
9828
  if (this.config.filterTaps) {
9302
9829
  bindFunction("click", "", this.pointerClick.bind(this), {
9303
- capture: true
9830
+ capture: true,
9831
+ passive: false
9304
9832
  });
9305
9833
  }
9306
9834
  }
@@ -9331,7 +9859,7 @@ function supportsGestureEvents() {
9331
9859
  const SUPPORT = {
9332
9860
  isBrowser,
9333
9861
  gesture: supportsGestureEvents(),
9334
- touch: supportsTouchEvents(),
9862
+ touch: isTouchScreen(),
9335
9863
  touchscreen: isTouchScreen(),
9336
9864
  pointer: supportsPointerEvents(),
9337
9865
  pointerLock: supportsPointerLock()
@@ -9342,21 +9870,19 @@ const DEFAULT_SWIPE_VELOCITY = 0.5;
9342
9870
  const DEFAULT_SWIPE_DISTANCE = 50;
9343
9871
  const DEFAULT_SWIPE_DURATION = 250;
9344
9872
  const dragConfigResolver = _objectSpread2(_objectSpread2({}, coordinatesConfigResolver), {}, {
9345
- pointerLock(_v, _k, {
9873
+ device(_v, _k, {
9346
9874
  pointer: {
9875
+ touch = false,
9347
9876
  lock = false,
9348
- touch = false
9877
+ mouse = false
9349
9878
  } = {}
9350
9879
  }) {
9351
- this.useTouch = SUPPORT.touch && touch;
9352
- return SUPPORT.pointerLock && lock;
9353
- },
9354
- device(_v, _k) {
9355
- if (this.useTouch)
9880
+ this.pointerLock = lock && SUPPORT.pointerLock;
9881
+ if (SUPPORT.touch && touch)
9356
9882
  return "touch";
9357
9883
  if (this.pointerLock)
9358
9884
  return "mouse";
9359
- if (SUPPORT.pointer)
9885
+ if (SUPPORT.pointer && !mouse)
9360
9886
  return "pointer";
9361
9887
  if (SUPPORT.touch)
9362
9888
  return "touch";
@@ -9365,8 +9891,7 @@ const dragConfigResolver = _objectSpread2(_objectSpread2({}, coordinatesConfigRe
9365
9891
  preventScroll(value = false, _k, {
9366
9892
  preventScrollAxis = "y"
9367
9893
  }) {
9368
- if (preventScrollAxis)
9369
- this.preventScrollAxis = preventScrollAxis;
9894
+ this.preventScrollAxis = preventScrollAxis;
9370
9895
  if (!SUPPORT.touchscreen)
9371
9896
  return false;
9372
9897
  if (typeof value === "number")
@@ -9384,10 +9909,12 @@ const dragConfigResolver = _objectSpread2(_objectSpread2({}, coordinatesConfigRe
9384
9909
  },
9385
9910
  threshold(value, _k, {
9386
9911
  filterTaps = false,
9912
+ tapsThreshold = 3,
9387
9913
  axis = void 0
9388
9914
  }) {
9389
- const threshold = V.toVector(value, filterTaps ? 3 : axis ? 1 : 0);
9915
+ const threshold = V.toVector(value, filterTaps ? tapsThreshold : axis ? 1 : 0);
9390
9916
  this.filterTaps = filterTaps;
9917
+ this.tapsThreshold = tapsThreshold;
9391
9918
  return threshold;
9392
9919
  },
9393
9920
  swipe({
@@ -9413,18 +9940,16 @@ const dragConfigResolver = _objectSpread2(_objectSpread2({}, coordinatesConfigRe
9413
9940
  }
9414
9941
  });
9415
9942
  _objectSpread2(_objectSpread2({}, commonConfigResolver), {}, {
9416
- useTouch(_v, _k, {
9943
+ device(_v, _k, {
9944
+ shared,
9417
9945
  pointer: {
9418
9946
  touch = false
9419
9947
  } = {}
9420
9948
  }) {
9421
- return SUPPORT.touch && touch;
9422
- },
9423
- device(_v, _k, config2) {
9424
- const sharedConfig = config2.shared;
9949
+ const sharedConfig = shared;
9425
9950
  if (sharedConfig.target && !SUPPORT.touch && SUPPORT.gesture)
9426
9951
  return "gesture";
9427
- if (this.useTouch)
9952
+ if (SUPPORT.touch && touch)
9428
9953
  return "touch";
9429
9954
  if (SUPPORT.touchscreen) {
9430
9955
  if (SUPPORT.pointer)
@@ -9467,8 +9992,8 @@ _objectSpread2(_objectSpread2({}, coordinatesConfigResolver), {}, {
9467
9992
  _objectSpread2(_objectSpread2({}, coordinatesConfigResolver), {}, {
9468
9993
  mouseOnly: (value = true) => value
9469
9994
  });
9470
- const EngineMap = new Map();
9471
- const ConfigResolverMap = new Map();
9995
+ const EngineMap = /* @__PURE__ */ new Map();
9996
+ const ConfigResolverMap = /* @__PURE__ */ new Map();
9472
9997
  function registerAction(action) {
9473
9998
  EngineMap.set(action.key, action.engine);
9474
9999
  ConfigResolverMap.set(action.key, action.resolver);
@@ -9609,7 +10134,7 @@ class EventStore {
9609
10134
  }
9610
10135
  class TimeoutStore {
9611
10136
  constructor() {
9612
- _defineProperty(this, "_timeouts", new Map());
10137
+ _defineProperty(this, "_timeouts", /* @__PURE__ */ new Map());
9613
10138
  }
9614
10139
  add(key, callback, ms = 140, ...args) {
9615
10140
  this.remove(key);
@@ -9627,14 +10152,14 @@ class TimeoutStore {
9627
10152
  }
9628
10153
  class Controller$1 {
9629
10154
  constructor(handlers) {
9630
- _defineProperty(this, "gestures", new Set());
10155
+ _defineProperty(this, "gestures", /* @__PURE__ */ new Set());
9631
10156
  _defineProperty(this, "_targetEventStore", new EventStore(this));
9632
10157
  _defineProperty(this, "gestureEventStores", {});
9633
10158
  _defineProperty(this, "gestureTimeoutStores", {});
9634
10159
  _defineProperty(this, "handlers", {});
9635
10160
  _defineProperty(this, "config", {});
9636
- _defineProperty(this, "pointerIds", new Set());
9637
- _defineProperty(this, "touchIds", new Set());
10161
+ _defineProperty(this, "pointerIds", /* @__PURE__ */ new Set());
10162
+ _defineProperty(this, "touchIds", /* @__PURE__ */ new Set());
9638
10163
  _defineProperty(this, "state", {
9639
10164
  shared: {
9640
10165
  shiftKey: false,
@@ -9705,12 +10230,12 @@ class Controller$1 {
9705
10230
  if (!target)
9706
10231
  return props;
9707
10232
  for (const handlerProp in props) {
9708
- let eventKey = handlerProp.substr(2).toLowerCase();
9709
- const capture = !!~eventKey.indexOf("capture");
9710
- const passive = !!~eventKey.indexOf("passive");
9711
- if (capture || passive)
9712
- eventKey = eventKey.replace(/capture|passive/g, "");
9713
- this._targetEventStore.add(target, eventKey, "", props[handlerProp], {
10233
+ const {
10234
+ device,
10235
+ capture,
10236
+ passive
10237
+ } = parseProp(handlerProp);
10238
+ this._targetEventStore.add(target, device, "", props[handlerProp], {
9714
10239
  capture,
9715
10240
  passive
9716
10241
  });
@@ -9782,7 +10307,7 @@ raf.setTimeout = (handler, ms) => {
9782
10307
  let i = timeouts.findIndex((t2) => t2.cancel == cancel);
9783
10308
  if (~i)
9784
10309
  timeouts.splice(i, 1);
9785
- __raf.count -= ~i ? 1 : 0;
10310
+ pendingCount -= ~i ? 1 : 0;
9786
10311
  };
9787
10312
  let timeout = {
9788
10313
  time,
@@ -9790,14 +10315,17 @@ raf.setTimeout = (handler, ms) => {
9790
10315
  cancel
9791
10316
  };
9792
10317
  timeouts.splice(findTimeout(time), 0, timeout);
9793
- __raf.count += 1;
10318
+ pendingCount += 1;
9794
10319
  start();
9795
10320
  return timeout;
9796
10321
  };
9797
10322
  let findTimeout = (time) => ~(~timeouts.findIndex((t2) => t2.time > time) || ~timeouts.length);
9798
10323
  raf.cancel = (fn) => {
10324
+ onStartQueue.delete(fn);
10325
+ onFrameQueue.delete(fn);
9799
10326
  updateQueue.delete(fn);
9800
10327
  writeQueue.delete(fn);
10328
+ onFinishQueue.delete(fn);
9801
10329
  };
9802
10330
  raf.sync = (fn) => {
9803
10331
  sync = true;
@@ -9839,6 +10367,7 @@ raf.advance = () => {
9839
10367
  }
9840
10368
  };
9841
10369
  let ts = -1;
10370
+ let pendingCount = 0;
9842
10371
  let sync = false;
9843
10372
  function schedule(fn, queue) {
9844
10373
  if (sync) {
@@ -9857,6 +10386,9 @@ function start() {
9857
10386
  }
9858
10387
  }
9859
10388
  }
10389
+ function stop() {
10390
+ ts = -1;
10391
+ }
9860
10392
  function loop() {
9861
10393
  if (~ts) {
9862
10394
  nativeRaf(loop);
@@ -9869,32 +10401,35 @@ function update() {
9869
10401
  let count = findTimeout(ts);
9870
10402
  if (count) {
9871
10403
  eachSafely(timeouts.splice(0, count), (t2) => t2.handler());
9872
- __raf.count -= count;
10404
+ pendingCount -= count;
9873
10405
  }
9874
10406
  onStartQueue.flush();
9875
10407
  updateQueue.flush(prevTs ? Math.min(64, ts - prevTs) : 16.667);
9876
10408
  onFrameQueue.flush();
9877
10409
  writeQueue.flush();
9878
10410
  onFinishQueue.flush();
10411
+ if (!pendingCount) {
10412
+ stop();
10413
+ }
9879
10414
  }
9880
10415
  function makeQueue() {
9881
- let next = new Set();
10416
+ let next = /* @__PURE__ */ new Set();
9882
10417
  let current = next;
9883
10418
  return {
9884
10419
  add(fn) {
9885
- __raf.count += current == next && !next.has(fn) ? 1 : 0;
10420
+ pendingCount += current == next && !next.has(fn) ? 1 : 0;
9886
10421
  next.add(fn);
9887
10422
  },
9888
10423
  delete(fn) {
9889
- __raf.count -= current == next && next.has(fn) ? 1 : 0;
10424
+ pendingCount -= current == next && next.has(fn) ? 1 : 0;
9890
10425
  return next.delete(fn);
9891
10426
  },
9892
10427
  flush(arg) {
9893
10428
  if (current.size) {
9894
- next = new Set();
9895
- __raf.count -= current.size;
10429
+ next = /* @__PURE__ */ new Set();
10430
+ pendingCount -= current.size;
9896
10431
  eachSafely(current, (fn) => fn(arg) && next.add(fn));
9897
- __raf.count += next.size;
10432
+ pendingCount += next.size;
9898
10433
  current = next;
9899
10434
  }
9900
10435
  }
@@ -9909,19 +10444,6 @@ function eachSafely(values, each2) {
9909
10444
  }
9910
10445
  });
9911
10446
  }
9912
- const __raf = {
9913
- count: 0,
9914
- clear() {
9915
- ts = -1;
9916
- timeouts = [];
9917
- onStartQueue = makeQueue();
9918
- updateQueue = makeQueue();
9919
- onFrameQueue = makeQueue();
9920
- writeQueue = makeQueue();
9921
- onFinishQueue = makeQueue();
9922
- __raf.count = 0;
9923
- }
9924
- };
9925
10447
  function noop() {
9926
10448
  }
9927
10449
  const defineHidden = (obj, key, value) => Object.defineProperty(obj, key, {
@@ -9972,6 +10494,7 @@ function flush(queue, iterator) {
9972
10494
  }
9973
10495
  }
9974
10496
  const flushCalls = (queue, ...args) => flush(queue, (fn) => fn(...args));
10497
+ const isSSR = () => typeof window === "undefined" || !window.navigator || /ServerSideRendering|^Deno\//.test(window.navigator.userAgent);
9975
10498
  let createStringInterpolator$1;
9976
10499
  let to;
9977
10500
  let colors$1 = null;
@@ -10016,7 +10539,7 @@ var globals = /* @__PURE__ */ Object.freeze({
10016
10539
  },
10017
10540
  assign
10018
10541
  });
10019
- const startQueue = new Set();
10542
+ const startQueue = /* @__PURE__ */ new Set();
10020
10543
  let currentFrame = [];
10021
10544
  let prevFrame = [];
10022
10545
  let priority = 0;
@@ -10455,7 +10978,7 @@ function addFluidObserver(target, observer) {
10455
10978
  if (target[$get]) {
10456
10979
  let observers = target[$observers];
10457
10980
  if (!observers) {
10458
- setHidden(target, $observers, observers = new Set());
10981
+ setHidden(target, $observers, observers = /* @__PURE__ */ new Set());
10459
10982
  }
10460
10983
  if (!observers.has(observer)) {
10461
10984
  observers.add(observer);
@@ -10488,13 +11011,45 @@ const setHidden = (target, key, value) => Object.defineProperty(target, key, {
10488
11011
  const numberRegex = /[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g;
10489
11012
  const colorRegex = /(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi;
10490
11013
  const unitRegex = new RegExp(`(${numberRegex.source})(%|[a-z]+)`, "i");
10491
- let namedColorRegex;
10492
11014
  const rgbaRegex = /rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi;
11015
+ const cssVariableRegex = /var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;
11016
+ const variableToRgba = (input) => {
11017
+ const [token, fallback] = parseCSSVariable(input);
11018
+ if (!token || isSSR()) {
11019
+ return input;
11020
+ }
11021
+ const value = window.getComputedStyle(document.documentElement).getPropertyValue(token);
11022
+ if (value) {
11023
+ return value.trim();
11024
+ } else if (fallback && fallback.startsWith("--")) {
11025
+ const _value = window.getComputedStyle(document.documentElement).getPropertyValue(fallback);
11026
+ if (_value) {
11027
+ return _value;
11028
+ } else {
11029
+ return input;
11030
+ }
11031
+ } else if (fallback && cssVariableRegex.test(fallback)) {
11032
+ return variableToRgba(fallback);
11033
+ } else if (fallback) {
11034
+ return fallback;
11035
+ }
11036
+ return input;
11037
+ };
11038
+ const parseCSSVariable = (current) => {
11039
+ const match = cssVariableRegex.exec(current);
11040
+ if (!match)
11041
+ return [,];
11042
+ const [, token, fallback] = match;
11043
+ return [token, fallback];
11044
+ };
11045
+ let namedColorRegex;
10493
11046
  const rgbaRound = (_, p1, p2, p3, p4) => `rgba(${Math.round(p1)}, ${Math.round(p2)}, ${Math.round(p3)}, ${p4})`;
10494
11047
  const createStringInterpolator = (config2) => {
10495
11048
  if (!namedColorRegex)
10496
11049
  namedColorRegex = colors$1 ? new RegExp(`(${Object.keys(colors$1).join("|")})(?!\\w)`, "g") : /^\b$/;
10497
- const output = config2.output.map((value) => getFluidValue(value).replace(colorRegex, colorToRgba).replace(namedColorRegex, colorToRgba));
11050
+ const output = config2.output.map((value) => {
11051
+ return getFluidValue(value).replace(cssVariableRegex, variableToRgba).replace(colorRegex, colorToRgba).replace(namedColorRegex, colorToRgba);
11052
+ });
10498
11053
  const keyframes = output.map((value) => value.match(numberRegex).map(Number));
10499
11054
  const outputRanges = keyframes[0].map((_, i) => keyframes.map((values) => {
10500
11055
  if (!(i in values)) {
@@ -10535,7 +11090,7 @@ function deprecateDirectCall() {
10535
11090
  warnDirectCall(`${prefix}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`);
10536
11091
  }
10537
11092
  function isAnimatedString(value) {
10538
- return is.str(value) && (value[0] == "#" || /\d/.test(value) || value in (colors$1 || {}));
11093
+ return is.str(value) && (value[0] == "#" || /\d/.test(value) || !isSSR() && cssVariableRegex.test(value) || value in (colors$1 || {}));
10539
11094
  }
10540
11095
  const useOnce = (effect) => useEffect(effect, emptyDeps);
10541
11096
  const emptyDeps = [];
@@ -10745,7 +11300,7 @@ class AnimatedObject extends Animated {
10745
11300
  }
10746
11301
  _makePayload(source) {
10747
11302
  if (source) {
10748
- const payload = new Set();
11303
+ const payload = /* @__PURE__ */ new Set();
10749
11304
  eachProp(source, this._addToPayload, payload);
10750
11305
  return Array.from(payload);
10751
11306
  }
@@ -10854,7 +11409,7 @@ class PropsObserver {
10854
11409
  }
10855
11410
  }
10856
11411
  function getAnimatedState(props, host2) {
10857
- const dependencies = new Set();
11412
+ const dependencies = /* @__PURE__ */ new Set();
10858
11413
  TreeContext.dependencies = dependencies;
10859
11414
  if (props.style)
10860
11415
  props = _extends$1({}, props, {
@@ -11054,11 +11609,61 @@ const config = {
11054
11609
  friction: 120
11055
11610
  }
11056
11611
  };
11057
- const linear = (t2) => t2;
11612
+ const c1 = 1.70158;
11613
+ const c2 = c1 * 1.525;
11614
+ const c3 = c1 + 1;
11615
+ const c4 = 2 * Math.PI / 3;
11616
+ const c5 = 2 * Math.PI / 4.5;
11617
+ const bounceOut = (x2) => {
11618
+ const n1 = 7.5625;
11619
+ const d1 = 2.75;
11620
+ if (x2 < 1 / d1) {
11621
+ return n1 * x2 * x2;
11622
+ } else if (x2 < 2 / d1) {
11623
+ return n1 * (x2 -= 1.5 / d1) * x2 + 0.75;
11624
+ } else if (x2 < 2.5 / d1) {
11625
+ return n1 * (x2 -= 2.25 / d1) * x2 + 0.9375;
11626
+ } else {
11627
+ return n1 * (x2 -= 2.625 / d1) * x2 + 0.984375;
11628
+ }
11629
+ };
11630
+ const easings = {
11631
+ linear: (x2) => x2,
11632
+ easeInQuad: (x2) => x2 * x2,
11633
+ easeOutQuad: (x2) => 1 - (1 - x2) * (1 - x2),
11634
+ easeInOutQuad: (x2) => x2 < 0.5 ? 2 * x2 * x2 : 1 - Math.pow(-2 * x2 + 2, 2) / 2,
11635
+ easeInCubic: (x2) => x2 * x2 * x2,
11636
+ easeOutCubic: (x2) => 1 - Math.pow(1 - x2, 3),
11637
+ easeInOutCubic: (x2) => x2 < 0.5 ? 4 * x2 * x2 * x2 : 1 - Math.pow(-2 * x2 + 2, 3) / 2,
11638
+ easeInQuart: (x2) => x2 * x2 * x2 * x2,
11639
+ easeOutQuart: (x2) => 1 - Math.pow(1 - x2, 4),
11640
+ easeInOutQuart: (x2) => x2 < 0.5 ? 8 * x2 * x2 * x2 * x2 : 1 - Math.pow(-2 * x2 + 2, 4) / 2,
11641
+ easeInQuint: (x2) => x2 * x2 * x2 * x2 * x2,
11642
+ easeOutQuint: (x2) => 1 - Math.pow(1 - x2, 5),
11643
+ easeInOutQuint: (x2) => x2 < 0.5 ? 16 * x2 * x2 * x2 * x2 * x2 : 1 - Math.pow(-2 * x2 + 2, 5) / 2,
11644
+ easeInSine: (x2) => 1 - Math.cos(x2 * Math.PI / 2),
11645
+ easeOutSine: (x2) => Math.sin(x2 * Math.PI / 2),
11646
+ easeInOutSine: (x2) => -(Math.cos(Math.PI * x2) - 1) / 2,
11647
+ easeInExpo: (x2) => x2 === 0 ? 0 : Math.pow(2, 10 * x2 - 10),
11648
+ easeOutExpo: (x2) => x2 === 1 ? 1 : 1 - Math.pow(2, -10 * x2),
11649
+ easeInOutExpo: (x2) => x2 === 0 ? 0 : x2 === 1 ? 1 : x2 < 0.5 ? Math.pow(2, 20 * x2 - 10) / 2 : (2 - Math.pow(2, -20 * x2 + 10)) / 2,
11650
+ easeInCirc: (x2) => 1 - Math.sqrt(1 - Math.pow(x2, 2)),
11651
+ easeOutCirc: (x2) => Math.sqrt(1 - Math.pow(x2 - 1, 2)),
11652
+ easeInOutCirc: (x2) => x2 < 0.5 ? (1 - Math.sqrt(1 - Math.pow(2 * x2, 2))) / 2 : (Math.sqrt(1 - Math.pow(-2 * x2 + 2, 2)) + 1) / 2,
11653
+ easeInBack: (x2) => c3 * x2 * x2 * x2 - c1 * x2 * x2,
11654
+ easeOutBack: (x2) => 1 + c3 * Math.pow(x2 - 1, 3) + c1 * Math.pow(x2 - 1, 2),
11655
+ easeInOutBack: (x2) => x2 < 0.5 ? Math.pow(2 * x2, 2) * ((c2 + 1) * 2 * x2 - c2) / 2 : (Math.pow(2 * x2 - 2, 2) * ((c2 + 1) * (x2 * 2 - 2) + c2) + 2) / 2,
11656
+ easeInElastic: (x2) => x2 === 0 ? 0 : x2 === 1 ? 1 : -Math.pow(2, 10 * x2 - 10) * Math.sin((x2 * 10 - 10.75) * c4),
11657
+ easeOutElastic: (x2) => x2 === 0 ? 0 : x2 === 1 ? 1 : Math.pow(2, -10 * x2) * Math.sin((x2 * 10 - 0.75) * c4) + 1,
11658
+ easeInOutElastic: (x2) => x2 === 0 ? 0 : x2 === 1 ? 1 : x2 < 0.5 ? -(Math.pow(2, 20 * x2 - 10) * Math.sin((20 * x2 - 11.125) * c5)) / 2 : Math.pow(2, -20 * x2 + 10) * Math.sin((20 * x2 - 11.125) * c5) / 2 + 1,
11659
+ easeInBounce: (x2) => 1 - bounceOut(1 - x2),
11660
+ easeOutBounce: bounceOut,
11661
+ easeInOutBounce: (x2) => x2 < 0.5 ? (1 - bounceOut(1 - 2 * x2)) / 2 : (1 + bounceOut(2 * x2 - 1)) / 2
11662
+ };
11058
11663
  const defaults = _extends({}, config.default, {
11059
11664
  mass: 1,
11060
11665
  damping: 1,
11061
- easing: linear,
11666
+ easing: easings.linear,
11062
11667
  clamp: false
11063
11668
  });
11064
11669
  class AnimationConfig {
@@ -11175,6 +11780,7 @@ function scheduleProps(callId, {
11175
11780
  }
11176
11781
  function onResume() {
11177
11782
  if (delay > 0 && !globals.skipAnimation) {
11783
+ state.delayed = true;
11178
11784
  timeout = raf.setTimeout(onStart, delay);
11179
11785
  state.pauseQueue.add(onPause);
11180
11786
  state.timeouts.add(timeout);
@@ -11183,6 +11789,9 @@ function scheduleProps(callId, {
11183
11789
  }
11184
11790
  }
11185
11791
  function onStart() {
11792
+ if (state.delayed) {
11793
+ state.delayed = false;
11794
+ }
11186
11795
  state.pauseQueue.delete(onPause);
11187
11796
  state.timeouts.delete(timeout);
11188
11797
  if (callId <= (state.cancelId || 0)) {
@@ -11416,11 +12025,12 @@ class SpringValue extends FrameValue {
11416
12025
  this.defaultProps = {};
11417
12026
  this._state = {
11418
12027
  paused: false,
11419
- pauseQueue: new Set(),
11420
- resumeQueue: new Set(),
11421
- timeouts: new Set()
12028
+ delayed: false,
12029
+ pauseQueue: /* @__PURE__ */ new Set(),
12030
+ resumeQueue: /* @__PURE__ */ new Set(),
12031
+ timeouts: /* @__PURE__ */ new Set()
11422
12032
  };
11423
- this._pendingCalls = new Set();
12033
+ this._pendingCalls = /* @__PURE__ */ new Set();
11424
12034
  this._lastCallId = 0;
11425
12035
  this._lastToId = 0;
11426
12036
  this._memoizedDuration = 0;
@@ -11453,6 +12063,9 @@ class SpringValue extends FrameValue {
11453
12063
  get isPaused() {
11454
12064
  return isPaused(this);
11455
12065
  }
12066
+ get isDelayed() {
12067
+ return this._state.delayed;
12068
+ }
11456
12069
  advance(dt) {
11457
12070
  let idle = true;
11458
12071
  let changed = false;
@@ -11619,7 +12232,10 @@ class SpringValue extends FrameValue {
11619
12232
  queue = this.queue || [];
11620
12233
  this.queue = [];
11621
12234
  }
11622
- return Promise.all(queue.map((props) => this._update(props))).then((results) => getCombinedResult(this, results));
12235
+ return Promise.all(queue.map((props) => {
12236
+ const up = this._update(props);
12237
+ return up;
12238
+ })).then((results) => getCombinedResult(this, results));
11623
12239
  }
11624
12240
  stop(cancel) {
11625
12241
  const {
@@ -11996,7 +12612,7 @@ function createUpdate(props) {
11996
12612
  to: to2,
11997
12613
  from
11998
12614
  } = props = inferTo(props);
11999
- const keys = new Set();
12615
+ const keys = /* @__PURE__ */ new Set();
12000
12616
  if (is.obj(to2))
12001
12617
  findDefined(to2, keys);
12002
12618
  if (is.obj(from))
@@ -12034,20 +12650,20 @@ class Controller {
12034
12650
  this._flush = void 0;
12035
12651
  this._initialProps = void 0;
12036
12652
  this._lastAsyncId = 0;
12037
- this._active = new Set();
12038
- this._changed = new Set();
12653
+ this._active = /* @__PURE__ */ new Set();
12654
+ this._changed = /* @__PURE__ */ new Set();
12039
12655
  this._started = false;
12040
12656
  this._item = void 0;
12041
12657
  this._state = {
12042
12658
  paused: false,
12043
- pauseQueue: new Set(),
12044
- resumeQueue: new Set(),
12045
- timeouts: new Set()
12659
+ pauseQueue: /* @__PURE__ */ new Set(),
12660
+ resumeQueue: /* @__PURE__ */ new Set(),
12661
+ timeouts: /* @__PURE__ */ new Set()
12046
12662
  };
12047
12663
  this._events = {
12048
- onStart: new Map(),
12049
- onChange: new Map(),
12050
- onRest: new Map()
12664
+ onStart: /* @__PURE__ */ new Map(),
12665
+ onChange: /* @__PURE__ */ new Map(),
12666
+ onRest: /* @__PURE__ */ new Map()
12051
12667
  };
12052
12668
  this._onFrame = this._onFrame.bind(this);
12053
12669
  if (flush2) {
@@ -12060,7 +12676,9 @@ class Controller {
12060
12676
  }
12061
12677
  }
12062
12678
  get idle() {
12063
- return !this._state.asyncTo && Object.values(this.springs).every((spring) => spring.idle);
12679
+ return !this._state.asyncTo && Object.values(this.springs).every((spring) => {
12680
+ return spring.idle && !spring.isDelayed && !spring.isPaused;
12681
+ });
12064
12682
  }
12065
12683
  get item() {
12066
12684
  return this._item;
@@ -12546,7 +13164,7 @@ class Interpolation extends FrameValue {
12546
13164
  this.key = void 0;
12547
13165
  this.idle = true;
12548
13166
  this.calc = void 0;
12549
- this._active = new Set();
13167
+ this._active = /* @__PURE__ */ new Set();
12550
13168
  this.source = source;
12551
13169
  this.calc = createInterpolator(...args);
12552
13170
  const value = this._get();
@@ -12843,7 +13461,7 @@ const host = createHost(primitives, {
12843
13461
  }
12844
13462
  });
12845
13463
  const animated = host.animated;
12846
- const defaultProps$2 = {
13464
+ const defaultProps$3 = {
12847
13465
  attract: false,
12848
13466
  direction: void 0,
12849
13467
  boundary: {
@@ -12855,7 +13473,7 @@ const defaultProps$2 = {
12855
13473
  className: ""
12856
13474
  };
12857
13475
  const Drag = (props) => {
12858
- const _a = __spreadValues(__spreadValues({}, defaultProps$2), props), { attract, direction, boundary, children, className, style } = _a, reset = __objRest(_a, ["attract", "direction", "boundary", "children", "className", "style"]);
13476
+ const _a = __spreadValues(__spreadValues({}, defaultProps$3), props), { attract, direction, boundary, children, className, style } = _a, reset = __objRest(_a, ["attract", "direction", "boundary", "children", "className", "style"]);
12859
13477
  const b2 = cn("drag");
12860
13478
  const [boundaryState, setBoundaryState] = useState(boundary);
12861
13479
  const myDrag = useRef(null);
@@ -12911,9 +13529,9 @@ const Drag = (props) => {
12911
13529
  style: currstyle
12912
13530
  }, bind()), children));
12913
13531
  };
12914
- Drag.defaultProps = defaultProps$2;
13532
+ Drag.defaultProps = defaultProps$3;
12915
13533
  Drag.displayName = "NutDrag";
12916
- const defaultProps$1 = {
13534
+ const defaultProps$2 = {
12917
13535
  maxLen: 0,
12918
13536
  endNumber: "",
12919
13537
  delaySpeed: 300,
@@ -12922,7 +13540,7 @@ const defaultProps$1 = {
12922
13540
  className: ""
12923
13541
  };
12924
13542
  const CountUp = (props) => {
12925
- const _a = __spreadValues(__spreadValues({}, defaultProps$1), props), { maxLen, endNumber, delaySpeed, easeSpeed, className, thousands } = _a, reset = __objRest(_a, ["maxLen", "endNumber", "delaySpeed", "easeSpeed", "className", "thousands"]);
13543
+ const _a = __spreadValues(__spreadValues({}, defaultProps$2), props), { maxLen, endNumber, delaySpeed, easeSpeed, className, thousands } = _a, reset = __objRest(_a, ["maxLen", "endNumber", "delaySpeed", "easeSpeed", "className", "thousands"]);
12926
13544
  const b2 = cn("countup");
12927
13545
  const countupRef = useRef(null);
12928
13546
  const timerRef = useRef(0);
@@ -12938,7 +13556,7 @@ const CountUp = (props) => {
12938
13556
  if (countupRef.current) {
12939
13557
  const numberItems = countupRef.current.querySelectorAll(".nut-countup__number");
12940
13558
  const numberFilterArr = numerArr.filter((item) => !isNaN(item));
12941
- for (let index2 in numberItems) {
13559
+ for (const index2 in numberItems) {
12942
13560
  if (!Object.prototype.hasOwnProperty.call(numberItems, index2))
12943
13561
  continue;
12944
13562
  const elem = numberItems[Number(index2)];
@@ -12972,7 +13590,7 @@ const CountUp = (props) => {
12972
13590
  className: b2("list")
12973
13591
  }, numerArr.map((item, idx) => {
12974
13592
  return /* @__PURE__ */ React__default.createElement("li", {
12975
- className: `${b2("listitem", { number: !isNaN(item) ? true : false })}`,
13593
+ className: `${b2("listitem", { number: !isNaN(item) })}`,
12976
13594
  key: idx
12977
13595
  }, !isNaN(item) ? /* @__PURE__ */ React__default.createElement("span", {
12978
13596
  className: b2("number"),
@@ -12986,9 +13604,9 @@ const CountUp = (props) => {
12986
13604
  }, item));
12987
13605
  })));
12988
13606
  };
12989
- CountUp.defaultProps = defaultProps$1;
13607
+ CountUp.defaultProps = defaultProps$2;
12990
13608
  CountUp.displayName = "NutCountUp";
12991
- const defaultProps = {};
13609
+ const defaultProps$1 = {};
12992
13610
  class AnimatingNumbers extends Component {
12993
13611
  constructor(props) {
12994
13612
  super(props);
@@ -13000,8 +13618,73 @@ class AnimatingNumbers extends Component {
13000
13618
  });
13001
13619
  }
13002
13620
  }
13003
- __publicField(AnimatingNumbers, "defaultProps", defaultProps);
13621
+ __publicField(AnimatingNumbers, "defaultProps", defaultProps$1);
13004
13622
  __publicField(AnimatingNumbers, "displayName", "NutAnimatingNumbers");
13005
13623
  __publicField(AnimatingNumbers, "CountUp", CountUp);
13006
13624
  AnimatingNumbers.CountUp = CountUp;
13007
- export { ActionSheet, Address, AnimatingNumbers, Avatar, BackTop, Badge, Barrage, Button, Calendar, CalendarItem, Cell, CellGroup, Checkbox, CheckboxGroup, CircleProgress, Col, Collapse, CollapseItem, Dialog, Divider, Drag, Elevator, FixedNav, Icon, Infiniteloading, Input, InputNumber, Layout, NavBar, NoticeBar, Notify, Overlay, Pagination, Picker, Popover, Popup, Price, Radio, RadioGroup, Range, Rate, Row, ShortPassword, Signature, Step, Steps, Swiper, SwiperItem, Switch, Tabbar, TabbarItem, Tag, TextArea, Toast, Uploader };
13625
+ const defaultProps = {};
13626
+ const Card = (props) => {
13627
+ const _a = __spreadValues(__spreadValues({}, defaultProps), props), {
13628
+ className,
13629
+ style,
13630
+ imgUrl,
13631
+ title,
13632
+ price,
13633
+ vipPrice,
13634
+ shopDesc,
13635
+ delivery,
13636
+ shopName,
13637
+ shopTagTpl,
13638
+ originTpl,
13639
+ prolistTpl,
13640
+ footerTpl
13641
+ } = _a, rest = __objRest(_a, [
13642
+ "className",
13643
+ "style",
13644
+ "imgUrl",
13645
+ "title",
13646
+ "price",
13647
+ "vipPrice",
13648
+ "shopDesc",
13649
+ "delivery",
13650
+ "shopName",
13651
+ "shopTagTpl",
13652
+ "originTpl",
13653
+ "prolistTpl",
13654
+ "footerTpl"
13655
+ ]);
13656
+ const b2 = cn("card");
13657
+ return /* @__PURE__ */ React__default.createElement("div", __spreadValues({
13658
+ className: `${b2()} ${className}`,
13659
+ style
13660
+ }, rest), /* @__PURE__ */ React__default.createElement("div", {
13661
+ className: b2("left")
13662
+ }, /* @__PURE__ */ React__default.createElement("img", {
13663
+ src: imgUrl,
13664
+ alt: ""
13665
+ })), /* @__PURE__ */ React__default.createElement("div", {
13666
+ className: b2("right")
13667
+ }, /* @__PURE__ */ React__default.createElement("div", {
13668
+ className: b2("right__title")
13669
+ }, title), prolistTpl, /* @__PURE__ */ React__default.createElement("div", {
13670
+ className: b2("right__price")
13671
+ }, /* @__PURE__ */ React__default.createElement(Price, {
13672
+ price
13673
+ }), originTpl || /* @__PURE__ */ React__default.createElement(Price, {
13674
+ className: b2("right__price__origin"),
13675
+ price: vipPrice
13676
+ })), /* @__PURE__ */ React__default.createElement("div", {
13677
+ className: b2("right__other")
13678
+ }, shopTagTpl || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Tag, {
13679
+ type: "danger"
13680
+ }, shopDesc), /* @__PURE__ */ React__default.createElement(Tag, {
13681
+ plain: true
13682
+ }, delivery))), /* @__PURE__ */ React__default.createElement("div", {
13683
+ className: b2("right__shop")
13684
+ }, /* @__PURE__ */ React__default.createElement("div", {
13685
+ className: b2("right__shop__name")
13686
+ }, shopName), footerTpl)));
13687
+ };
13688
+ Card.defaultProps = defaultProps;
13689
+ Card.displayName = "NutCard";
13690
+ export { ActionSheet, Address, AnimatingNumbers, Avatar, BackTop, Badge, Barrage, Button, Calendar, CalendarItem, Card, Cell, CellGroup, Checkbox, CheckboxGroup, CircleProgress, Col, Collapse, CollapseItem, DatePicker, Dialog, Divider, Drag, Elevator, FixedNav, Icon, Infiniteloading, Input, InputNumber, Layout, NavBar, NoticeBar, Notify, Overlay, Pagination, Picker, Popover, Popup, Price, Radio, RadioGroup, Range, Rate, Row, ShortPassword, Signature, Skeleton, Step, Steps, Swiper, SwiperItem, Switch, TabPane, Tabbar, TabbarItem, Tabs, Tag, TextArea, Toast, Uploader };