@nutui/nutui-react 3.0.7 → 3.0.9-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 (167) hide show
  1. package/CHANGELOG.md +30 -14
  2. package/dist/cjs/hooks/index.d.ts +12 -0
  3. package/dist/cjs/hooks/index.js +17 -0
  4. package/dist/cjs/hooks/index.taro.js +19 -0
  5. package/dist/cjs/hooks/{use-custom-event.js → taro/use-custom-event.js} +1 -1
  6. package/dist/cjs/hooks/{use-lock-scoll-taro.js → taro/use-lock-scoll.js} +1 -1
  7. package/dist/cjs/hooks/use-memo.d.ts +1 -1
  8. package/dist/cjs/hooks/use-memo.js +1 -1
  9. package/dist/cjs/hooks/use-refs.d.ts +1 -1
  10. package/dist/cjs/hooks/use-refs.js +1 -1
  11. package/dist/cjs/hooks/use-uuid.d.ts +1 -1
  12. package/dist/cjs/hooks/use-uuid.js +1 -1
  13. package/dist/cjs/hooks/use-watch.d.ts +2 -2
  14. package/dist/cjs/hooks/use-watch.js +2 -3
  15. package/dist/cjs/packages/avatar/style/style.css +4 -0
  16. package/dist/cjs/packages/avatarcropper/avatarcropper.js +2 -2
  17. package/dist/cjs/packages/cascader/cascader.js +2 -1
  18. package/dist/cjs/packages/configprovider/configprovider.js +4 -4
  19. package/dist/cjs/packages/configprovider/types.d.ts +1 -1
  20. package/dist/cjs/packages/dialog/style/dialog.scss +1 -0
  21. package/dist/cjs/packages/dialog/style/style.css +1 -0
  22. package/dist/cjs/packages/image/style/image.scss +4 -1
  23. package/dist/cjs/packages/image/style/style.css +4 -0
  24. package/dist/cjs/packages/imagepreview/style/style.css +4 -0
  25. package/dist/cjs/packages/noticebar/noticebar.js +4 -4
  26. package/dist/cjs/packages/nutui.react.build.d.ts +2 -0
  27. package/dist/cjs/packages/nutui.react.build.js +2 -0
  28. package/dist/cjs/packages/nutui.react.d.ts +2 -0
  29. package/dist/cjs/packages/nutui.react.js +2 -0
  30. package/dist/cjs/packages/picker/picker.js +2 -2
  31. package/dist/cjs/packages/popover/popover.js +2 -2
  32. package/dist/cjs/packages/range/range.js +3 -3
  33. package/dist/cjs/packages/rate/rate.js +4 -4
  34. package/dist/cjs/packages/skeleton/skeleton.js +1 -2
  35. package/dist/cjs/packages/sticky/sticky.js +9 -9
  36. package/dist/cjs/packages/swipe/swipe.js +2 -2
  37. package/dist/cjs/packages/switch/switch.js +53 -8
  38. package/dist/cjs/packages/tour/tour.js +2 -2
  39. package/dist/cjs/utils/clamp.d.ts +1 -0
  40. package/dist/cjs/utils/clamp.js +13 -0
  41. package/dist/cjs/utils/index.d.ts +28 -6
  42. package/dist/cjs/utils/index.js +29 -54
  43. package/dist/cjs/utils/index.taro.js +39 -0
  44. package/dist/cjs/utils/interceptor.js +2 -2
  45. package/dist/cjs/utils/is-function.d.ts +1 -0
  46. package/dist/cjs/utils/is-function.js +14 -0
  47. package/dist/cjs/utils/is-object.d.ts +1 -0
  48. package/dist/cjs/utils/is-object.js +14 -0
  49. package/dist/cjs/utils/is-promise.d.ts +1 -0
  50. package/dist/cjs/utils/is-promise.js +15 -0
  51. package/dist/cjs/utils/lru.d.ts +1 -1
  52. package/dist/cjs/utils/lru.js +1 -1
  53. package/dist/cjs/utils/merge.d.ts +0 -1
  54. package/dist/cjs/utils/merge.js +0 -4
  55. package/dist/cjs/utils/prevent-default.d.ts +1 -0
  56. package/dist/cjs/utils/prevent-default.js +18 -0
  57. package/dist/cjs/utils/raf.d.ts +0 -1
  58. package/dist/cjs/utils/raf.js +3 -6
  59. package/dist/{es/utils → cjs/utils/taro}/add-color-for-harmony.d.ts +1 -2
  60. package/dist/cjs/utils/{add-color-for-harmony.js → taro/add-color-for-harmony.js} +5 -11
  61. package/dist/cjs/utils/taro/get-rect-by-id.d.ts +1 -0
  62. package/dist/cjs/{hooks/use-taro-rect.js → utils/taro/get-rect-by-id.js} +3 -3
  63. package/dist/cjs/utils/{get-rect-by-taro.d.ts → taro/get-rect.d.ts} +1 -1
  64. package/dist/cjs/utils/{get-rect-by-taro.js → taro/get-rect.js} +9 -10
  65. package/dist/cjs/utils/taro/px-transform.d.ts +1 -0
  66. package/dist/cjs/utils/{px-transform.js → taro/px-transform.js} +3 -3
  67. package/dist/cjs/utils/upper-case-first.d.ts +1 -0
  68. package/dist/cjs/utils/upper-case-first.js +17 -0
  69. package/dist/es/hooks/index.d.ts +12 -0
  70. package/dist/es/hooks/index.js +12 -0
  71. package/dist/es/hooks/index.taro.js +14 -0
  72. package/dist/es/hooks/{use-custom-event.js → taro/use-custom-event.js} +1 -1
  73. package/dist/es/hooks/{use-lock-scoll-taro.js → taro/use-lock-scoll.js} +1 -1
  74. package/dist/es/hooks/use-memo.d.ts +1 -1
  75. package/dist/es/hooks/use-memo.js +1 -1
  76. package/dist/es/hooks/use-refs.d.ts +1 -1
  77. package/dist/es/hooks/use-refs.js +1 -1
  78. package/dist/es/hooks/use-uuid.d.ts +1 -1
  79. package/dist/es/hooks/use-uuid.js +1 -1
  80. package/dist/es/hooks/use-watch.d.ts +2 -2
  81. package/dist/es/hooks/use-watch.js +1 -2
  82. package/dist/es/packages/avatar/style/style.css +4 -0
  83. package/dist/es/packages/avatarcropper/avatarcropper.js +1 -1
  84. package/dist/es/packages/cascader/cascader.js +2 -1
  85. package/dist/es/packages/configprovider/configprovider.js +2 -2
  86. package/dist/es/packages/configprovider/types.d.ts +1 -1
  87. package/dist/es/packages/dialog/style/dialog.scss +1 -0
  88. package/dist/es/packages/dialog/style/style.css +1 -0
  89. package/dist/es/packages/image/style/image.scss +4 -1
  90. package/dist/es/packages/image/style/style.css +4 -0
  91. package/dist/es/packages/imagepreview/style/style.css +4 -0
  92. package/dist/es/packages/noticebar/noticebar.js +1 -1
  93. package/dist/es/packages/nutui.react.build.d.ts +2 -0
  94. package/dist/es/packages/nutui.react.build.js +2 -0
  95. package/dist/es/packages/picker/picker.js +1 -1
  96. package/dist/es/packages/popover/popover.js +1 -1
  97. package/dist/es/packages/range/range.js +1 -1
  98. package/dist/es/packages/rate/rate.js +2 -2
  99. package/dist/es/packages/skeleton/skeleton.js +1 -2
  100. package/dist/es/packages/sticky/sticky.js +2 -2
  101. package/dist/es/packages/swipe/swipe.js +1 -1
  102. package/dist/es/packages/switch/switch.js +53 -8
  103. package/dist/es/packages/tour/tour.js +1 -1
  104. package/dist/es/utils/clamp.d.ts +1 -0
  105. package/dist/es/utils/clamp.js +3 -0
  106. package/dist/es/utils/index.d.ts +28 -6
  107. package/dist/es/utils/index.js +28 -29
  108. package/dist/es/utils/index.taro.js +34 -0
  109. package/dist/es/utils/interceptor.js +1 -1
  110. package/dist/es/utils/is-function.d.ts +1 -0
  111. package/dist/es/utils/is-function.js +4 -0
  112. package/dist/es/utils/is-object.d.ts +1 -0
  113. package/dist/es/utils/is-object.js +4 -0
  114. package/dist/es/utils/is-promise.d.ts +1 -0
  115. package/dist/es/utils/is-promise.js +5 -0
  116. package/dist/es/utils/lru.d.ts +1 -1
  117. package/dist/es/utils/lru.js +1 -2
  118. package/dist/es/utils/merge.d.ts +0 -1
  119. package/dist/es/utils/merge.js +0 -1
  120. package/dist/es/utils/prevent-default.d.ts +1 -0
  121. package/dist/es/utils/prevent-default.js +8 -0
  122. package/dist/es/utils/raf.d.ts +0 -1
  123. package/dist/es/utils/raf.js +1 -1
  124. package/dist/{cjs/utils → es/utils/taro}/add-color-for-harmony.d.ts +1 -2
  125. package/dist/es/utils/{add-color-for-harmony.js → taro/add-color-for-harmony.js} +2 -3
  126. package/dist/es/utils/taro/get-rect-by-id.d.ts +1 -0
  127. package/dist/es/{hooks/use-taro-rect.js → utils/taro/get-rect-by-id.js} +1 -1
  128. package/dist/es/utils/{get-rect-by-taro.d.ts → taro/get-rect.d.ts} +1 -1
  129. package/dist/es/utils/{get-rect-by-taro.js → taro/get-rect.js} +4 -4
  130. package/dist/es/utils/taro/px-transform.d.ts +1 -0
  131. package/dist/es/utils/{px-transform.js → taro/px-transform.js} +2 -2
  132. package/dist/es/utils/upper-case-first.d.ts +1 -0
  133. package/dist/es/utils/upper-case-first.js +7 -0
  134. package/dist/nutui.react.umd.js +1014 -735
  135. package/dist/style.css +1 -1
  136. package/dist/style.scss +39 -39
  137. package/dist/styles/themes/dark.css +1 -1
  138. package/dist/styles/themes/default.css +1 -1
  139. package/dist/styles/themes/jmapp.css +1 -1
  140. package/dist/styles/themes/jrkf.css +1 -1
  141. package/dist/styles/variables-jmapp.scss +1 -0
  142. package/dist/styles/variables.scss +4 -0
  143. package/package.json +1 -1
  144. package/dist/cjs/hooks/use-taro-rect.d.ts +0 -1
  145. package/dist/cjs/utils/px-transform.d.ts +0 -1
  146. package/dist/es/hooks/use-taro-rect.d.ts +0 -1
  147. package/dist/es/utils/px-transform.d.ts +0 -1
  148. /package/dist/cjs/hooks/{use-custom-event.d.ts → taro/use-custom-event.d.ts} +0 -0
  149. /package/dist/cjs/hooks/{use-lock-scoll-taro.d.ts → taro/use-lock-scoll.d.ts} +0 -0
  150. /package/dist/cjs/utils/{test/event.d.ts → event-mocker.d.ts} +0 -0
  151. /package/dist/cjs/utils/{test/event.js → event-mocker.js} +0 -0
  152. /package/dist/cjs/{hooks/use-client-rect.d.ts → utils/get-rect.d.ts} +0 -0
  153. /package/dist/cjs/{hooks/use-client-rect.js → utils/get-rect.js} +0 -0
  154. /package/dist/cjs/utils/{get-system-info.d.ts → taro/get-system-info.d.ts} +0 -0
  155. /package/dist/cjs/utils/{get-system-info.js → taro/get-system-info.js} +0 -0
  156. /package/dist/cjs/utils/{platform-taro.d.ts → taro/platform.d.ts} +0 -0
  157. /package/dist/cjs/utils/{platform-taro.js → taro/platform.js} +0 -0
  158. /package/dist/es/hooks/{use-custom-event.d.ts → taro/use-custom-event.d.ts} +0 -0
  159. /package/dist/es/hooks/{use-lock-scoll-taro.d.ts → taro/use-lock-scoll.d.ts} +0 -0
  160. /package/dist/es/utils/{test/event.d.ts → event-mocker.d.ts} +0 -0
  161. /package/dist/es/utils/{test/event.js → event-mocker.js} +0 -0
  162. /package/dist/es/{hooks/use-client-rect.d.ts → utils/get-rect.d.ts} +0 -0
  163. /package/dist/es/{hooks/use-client-rect.js → utils/get-rect.js} +0 -0
  164. /package/dist/es/utils/{get-system-info.d.ts → taro/get-system-info.d.ts} +0 -0
  165. /package/dist/es/utils/{get-system-info.js → taro/get-system-info.js} +0 -0
  166. /package/dist/es/utils/{platform-taro.d.ts → taro/platform.d.ts} +0 -0
  167. /package/dist/es/utils/{platform-taro.js → taro/platform.js} +0 -0
@@ -1812,7 +1812,663 @@ Check the top-level render call using <` + t + ">.");
1812
1812
  errorCanvasTips: "当前环境不支持Canvas"
1813
1813
  }
1814
1814
  };
1815
- var inBrowser = typeof window !== "undefined";
1815
+ function bound(position2, min, max) {
1816
+ var ret = position2;
1817
+ if (min !== void 0) {
1818
+ ret = Math.max(position2, min);
1819
+ }
1820
+ if (max !== void 0) {
1821
+ ret = Math.min(ret, max);
1822
+ }
1823
+ return ret;
1824
+ }
1825
+ var UPPERCASE = RegExp("[\\p{Lu}]", "u");
1826
+ var LOWERCASE = RegExp("[\\p{Ll}]", "u");
1827
+ var LEADING_CAPITAL = RegExp("^[\\p{Lu}](?![\\p{Lu}])", "gu");
1828
+ var IDENTIFIER = RegExp("([\\p{Alpha}\\p{N}_]|$)", "u");
1829
+ var SEPARATORS = /[_.\- ]+/;
1830
+ var LEADING_SEPARATORS = new RegExp("^".concat(SEPARATORS.source));
1831
+ var SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, "gu");
1832
+ var NUMBERS_AND_IDENTIFIER = new RegExp("\\d+".concat(IDENTIFIER.source), "gu");
1833
+ var preserveCamelCase = function(string2, toLowerCase, toUpperCase) {
1834
+ var isLastCharLower = false;
1835
+ var isLastCharUpper = false;
1836
+ var isLastLastCharUpper = false;
1837
+ for (var index2 = 0; index2 < string2.length; index2++) {
1838
+ var character = string2[index2];
1839
+ if (isLastCharLower && UPPERCASE.test(character)) {
1840
+ string2 = "".concat(string2.slice(0, index2), "-").concat(string2.slice(index2));
1841
+ isLastCharLower = false;
1842
+ isLastLastCharUpper = isLastCharUpper;
1843
+ isLastCharUpper = true;
1844
+ index2++;
1845
+ } else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character)) {
1846
+ string2 = "".concat(string2.slice(0, index2 - 1), "-").concat(string2.slice(index2 - 1));
1847
+ isLastLastCharUpper = isLastCharUpper;
1848
+ isLastCharUpper = false;
1849
+ isLastCharLower = true;
1850
+ } else {
1851
+ isLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character;
1852
+ isLastLastCharUpper = isLastCharUpper;
1853
+ isLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character;
1854
+ }
1855
+ }
1856
+ return string2;
1857
+ };
1858
+ var preserveConsecutiveUppercase = function(input, toLowerCase) {
1859
+ LEADING_CAPITAL.lastIndex = 0;
1860
+ return input.replace(LEADING_CAPITAL, function(m1) {
1861
+ return toLowerCase(m1);
1862
+ });
1863
+ };
1864
+ var postProcess = function(input, toUpperCase) {
1865
+ SEPARATORS_AND_IDENTIFIER.lastIndex = 0;
1866
+ NUMBERS_AND_IDENTIFIER.lastIndex = 0;
1867
+ return input.replace(SEPARATORS_AND_IDENTIFIER, function(_, identifier) {
1868
+ return toUpperCase(identifier);
1869
+ }).replace(NUMBERS_AND_IDENTIFIER, function(m2) {
1870
+ return toUpperCase(m2);
1871
+ });
1872
+ };
1873
+ var camelCase = function(input, options2) {
1874
+ if (!(typeof input === "string" || Array.isArray(input))) {
1875
+ throw new TypeError("Expected the input to be `string | string[]`");
1876
+ }
1877
+ options2 = _object_spread({
1878
+ pascalCase: false,
1879
+ preserveConsecutiveUppercase: false
1880
+ }, options2);
1881
+ if (Array.isArray(input)) {
1882
+ input = input.map(function(x) {
1883
+ return x.trim();
1884
+ }).filter(function(x) {
1885
+ return x.length;
1886
+ }).join("-");
1887
+ } else {
1888
+ input = input.trim();
1889
+ }
1890
+ if (input.length === 0) {
1891
+ return "";
1892
+ }
1893
+ var toLowerCase = options2.locale === false ? function(string2) {
1894
+ return string2.toLowerCase();
1895
+ } : function(string2) {
1896
+ return string2.toLocaleLowerCase(options2.locale);
1897
+ };
1898
+ var toUpperCase = options2.locale === false ? function(string2) {
1899
+ return string2.toUpperCase();
1900
+ } : function(string2) {
1901
+ return string2.toLocaleUpperCase(options2.locale);
1902
+ };
1903
+ if (input.length === 1) {
1904
+ if (SEPARATORS.test(input)) {
1905
+ return "";
1906
+ }
1907
+ return options2.pascalCase ? toUpperCase(input) : toLowerCase(input);
1908
+ }
1909
+ var hasUpperCase = input !== toLowerCase(input);
1910
+ if (hasUpperCase) {
1911
+ input = preserveCamelCase(input, toLowerCase, toUpperCase);
1912
+ }
1913
+ input = input.replace(LEADING_SEPARATORS, "");
1914
+ input = options2.preserveConsecutiveUppercase ? preserveConsecutiveUppercase(input, toLowerCase) : toLowerCase(input);
1915
+ if (options2.pascalCase) {
1916
+ input = toUpperCase(input.charAt(0)) + input.slice(1);
1917
+ }
1918
+ return postProcess(input, toUpperCase);
1919
+ };
1920
+ var canUseDom = !!(typeof window !== "undefined" && typeof document !== "undefined" && window.document && window.document.createElement);
1921
+ var clamp$2 = function(num, min, max) {
1922
+ return Math.min(Math.max(num, min), max);
1923
+ };
1924
+ function _array_like_to_array(arr, len) {
1925
+ if (len == null || len > arr.length) len = arr.length;
1926
+ for (var i2 = 0, arr2 = new Array(len); i2 < len; i2++) arr2[i2] = arr[i2];
1927
+ return arr2;
1928
+ }
1929
+ function _array_without_holes(arr) {
1930
+ if (Array.isArray(arr)) return _array_like_to_array(arr);
1931
+ }
1932
+ function _iterable_to_array(iter) {
1933
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
1934
+ return Array.from(iter);
1935
+ }
1936
+ }
1937
+ function _non_iterable_spread() {
1938
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1939
+ }
1940
+ function _unsupported_iterable_to_array(o, minLen) {
1941
+ if (!o) return;
1942
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
1943
+ var n2 = Object.prototype.toString.call(o).slice(8, -1);
1944
+ if (n2 === "Object" && o.constructor) n2 = o.constructor.name;
1945
+ if (n2 === "Map" || n2 === "Set") return Array.from(n2);
1946
+ if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2)) return _array_like_to_array(o, minLen);
1947
+ }
1948
+ function _to_consumable_array(arr) {
1949
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
1950
+ }
1951
+ var Utils = {
1952
+ /**
1953
+ * 是否为闫年
1954
+ * @return {Boolse} true|false
1955
+ */
1956
+ isLeapYear: function isLeapYear(y) {
1957
+ return y % 4 === 0 && y % 100 !== 0 || y % 400 === 0;
1958
+ },
1959
+ /**
1960
+ * 返回星期数
1961
+ * @return {String}
1962
+ */
1963
+ getWhatDay: function getWhatDay(year, month, day) {
1964
+ var date2 = new Date("".concat(year, "/").concat(month, "/").concat(day));
1965
+ var index2 = date2.getDay();
1966
+ var dayNames = [
1967
+ "星期日",
1968
+ "星期一",
1969
+ "星期二",
1970
+ "星期三",
1971
+ "星期四",
1972
+ "星期五",
1973
+ "星期六"
1974
+ ];
1975
+ return dayNames[index2];
1976
+ },
1977
+ /**
1978
+ * 返回上一个月在当前面板中的天数
1979
+ * @return {Number}
1980
+ */
1981
+ getMonthPreDay: function getMonthPreDay(year, month) {
1982
+ var date2 = new Date("".concat(year, "/").concat(month, "/01"));
1983
+ var day = date2.getDay();
1984
+ if (day === 0) {
1985
+ day = 7;
1986
+ }
1987
+ return day;
1988
+ },
1989
+ /**
1990
+ * 返回月份天数
1991
+ * @return {Number}
1992
+ */
1993
+ getMonthDays: function getMonthDays(year, month) {
1994
+ if (/^0/.test(month)) {
1995
+ month = month.split("")[1];
1996
+ }
1997
+ return [
1998
+ 0,
1999
+ 31,
2000
+ this.isLeapYear(Number(year)) ? 29 : 28,
2001
+ 31,
2002
+ 30,
2003
+ 31,
2004
+ 30,
2005
+ 31,
2006
+ 31,
2007
+ 30,
2008
+ 31,
2009
+ 30,
2010
+ 31
2011
+ ][month];
2012
+ },
2013
+ /**
2014
+ * 补齐数字位数
2015
+ * @return {string}
2016
+ */
2017
+ getNumTwoBit: function getNumTwoBit(n2) {
2018
+ n2 = Number(n2);
2019
+ return (n2 > 9 ? "" : "0") + n2;
2020
+ },
2021
+ /**
2022
+ * 日期对象转成字符串
2023
+ * @return {string}
2024
+ */
2025
+ date2Str: function date2Str(date2, split) {
2026
+ split = split || "-";
2027
+ var y = date2.getFullYear();
2028
+ var m2 = this.getNumTwoBit(date2.getMonth() + 1);
2029
+ var d2 = this.getNumTwoBit(date2.getDate());
2030
+ return [
2031
+ y,
2032
+ m2,
2033
+ d2
2034
+ ].join(split);
2035
+ },
2036
+ /**
2037
+ * 返回日期格式字符串
2038
+ * @param {Number} 0返回今天的日期、1返回明天的日期,2返回后天得日期,依次类推
2039
+ * @return {string} '2014-12-31'
2040
+ */
2041
+ getDay: function getDay(i2) {
2042
+ i2 = i2 || 0;
2043
+ var date2 = /* @__PURE__ */ new Date();
2044
+ var diff = i2 * (1e3 * 60 * 60 * 24);
2045
+ date2 = new Date(date2.getTime() + diff);
2046
+ return this.date2Str(date2);
2047
+ },
2048
+ /**
2049
+ * 时间比较
2050
+ * @return {Boolean}
2051
+ */
2052
+ compareDate: function compareDate(date1, date2) {
2053
+ var startTime = new Date(date1.replace("-", "/").replace("-", "/"));
2054
+ var endTime = new Date(date2.replace("-", "/").replace("-", "/"));
2055
+ if (startTime >= endTime) {
2056
+ return false;
2057
+ }
2058
+ return true;
2059
+ },
2060
+ /**
2061
+ * 时间是否相等
2062
+ * @return {Boolean}
2063
+ */
2064
+ isEqual: function isEqual2(date1, date2) {
2065
+ var startTime = new Date((date1 || "").replace(/-/g, "/")).getTime();
2066
+ var endTime = new Date(date2.replace(/-/g, "/")).getTime();
2067
+ if (startTime === endTime) {
2068
+ return true;
2069
+ }
2070
+ return false;
2071
+ },
2072
+ getMonthWeek: function getMonthWeek(year, month, date2) {
2073
+ var firstDayOfWeek = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0;
2074
+ var dateNow = new Date(Number(year), parseInt(month) - 1, Number(date2));
2075
+ var w = dateNow.getDay();
2076
+ var d2 = dateNow.getDate();
2077
+ var remainder = 6 - w;
2078
+ if (firstDayOfWeek !== 0) {
2079
+ w = w === 0 ? 7 : w;
2080
+ remainder = 7 - w;
2081
+ }
2082
+ return Math.ceil((d2 + remainder) / 7);
2083
+ },
2084
+ getYearWeek: function getYearWeek(year, month, date2) {
2085
+ var dateNow = new Date(Number(year), parseInt(month) - 1, Number(date2));
2086
+ var dateFirst = new Date(Number(year), 0, 1);
2087
+ var dataNumber = Math.round((dateNow.valueOf() - dateFirst.valueOf()) / 864e5);
2088
+ return Math.ceil((dataNumber + (dateFirst.getDay() + 1 - 1)) / 7);
2089
+ },
2090
+ getWeekDate: function getWeekDate(year, month, date2) {
2091
+ var firstDayOfWeek = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0;
2092
+ var dateNow = new Date(Number(year), parseInt(month) - 1, Number(date2));
2093
+ var nowTime = dateNow.getTime();
2094
+ var day = dateNow.getDay();
2095
+ if (firstDayOfWeek === 0) {
2096
+ var oneDayTime = 24 * 60 * 60 * 1e3;
2097
+ var SundayTime = nowTime - day * oneDayTime;
2098
+ var SaturdayTime = nowTime + (6 - day) * oneDayTime;
2099
+ var sunday = this.date2Str(new Date(SundayTime));
2100
+ var saturday = this.date2Str(new Date(SaturdayTime));
2101
+ return [
2102
+ sunday,
2103
+ saturday
2104
+ ];
2105
+ }
2106
+ day = day === 0 ? 7 : day;
2107
+ var oneDayTime1 = 24 * 60 * 60 * 1e3;
2108
+ var MondayTime = nowTime - (day - 1) * oneDayTime1;
2109
+ var SundayTime1 = nowTime + (7 - day) * oneDayTime1;
2110
+ var monday = this.date2Str(new Date(MondayTime));
2111
+ var sunday1 = this.date2Str(new Date(SundayTime1));
2112
+ return [
2113
+ monday,
2114
+ sunday1
2115
+ ];
2116
+ },
2117
+ formatResultDate: function formatResultDate(date2) {
2118
+ var days = _to_consumable_array(date2.split("-"));
2119
+ days[2] = Utils.getNumTwoBit(Number(days[2]));
2120
+ days[3] = "".concat(days[0], "-").concat(days[1], "-").concat(days[2]);
2121
+ days[4] = Utils.getWhatDay(+days[0], +days[1], +days[2]);
2122
+ return days;
2123
+ }
2124
+ };
2125
+ var getCurrMonthData = function(type2, year, month) {
2126
+ switch (type2) {
2127
+ case "prev":
2128
+ month === 1 && (year -= 1);
2129
+ month = month === 1 ? 12 : --month;
2130
+ break;
2131
+ case "next":
2132
+ month === 12 && (year += 1);
2133
+ month = month === 12 ? 1 : ++month;
2134
+ break;
2135
+ }
2136
+ return [
2137
+ year,
2138
+ Utils.getNumTwoBit(month),
2139
+ Utils.getMonthDays(String(year), String(month))
2140
+ ];
2141
+ };
2142
+ var getDaysStatus = function(type2, year, month) {
2143
+ var days = Utils.getMonthDays("".concat(year), "".concat(month));
2144
+ if (type2 === "prev" && days >= 7) {
2145
+ days -= 7;
2146
+ }
2147
+ return Array.from(Array(days), function(v, k) {
2148
+ return {
2149
+ day: k + 1,
2150
+ type: type2,
2151
+ year,
2152
+ month
2153
+ };
2154
+ });
2155
+ };
2156
+ var getPreMonthDates = function(type2, year, month, firstDayOfWeek) {
2157
+ var preMonth = +month - 1;
2158
+ var preYear = year;
2159
+ if (preMonth <= 0) {
2160
+ preMonth = 12;
2161
+ preYear += 1;
2162
+ }
2163
+ var days = Utils.getMonthPreDay(+year, +month);
2164
+ days -= firstDayOfWeek;
2165
+ if (type2 === "prev" && days >= 7) {
2166
+ days -= 7;
2167
+ }
2168
+ var preDates = Utils.getMonthDays("".concat(preYear), "".concat(preMonth));
2169
+ var months = Array.from(Array(preDates), function(v, k) {
2170
+ return {
2171
+ day: k + 1,
2172
+ type: type2,
2173
+ preYear,
2174
+ preMonth
2175
+ };
2176
+ });
2177
+ return months.slice(preDates - days);
2178
+ };
2179
+ var inBrowser = typeof document !== "undefined" && !!document.scripts;
2180
+ function isWindow(val2) {
2181
+ return val2 === window;
2182
+ }
2183
+ var getRect = function(elementRef) {
2184
+ var element = elementRef;
2185
+ if (isWindow(element)) {
2186
+ var width2 = element.innerWidth;
2187
+ var height2 = element.innerHeight;
2188
+ return {
2189
+ top: 0,
2190
+ left: 0,
2191
+ right: width2,
2192
+ bottom: height2,
2193
+ width: width2,
2194
+ height: height2
2195
+ };
2196
+ }
2197
+ if (element && element.getBoundingClientRect) {
2198
+ console.log(element, element.getBoundingClientRect());
2199
+ return element.getBoundingClientRect();
2200
+ }
2201
+ return {
2202
+ top: 0,
2203
+ left: 0,
2204
+ right: 0,
2205
+ bottom: 0,
2206
+ width: 0,
2207
+ height: 0
2208
+ };
2209
+ };
2210
+ var defaultRoot = canUseDom ? window : void 0;
2211
+ var overflowStylePatterns = [
2212
+ "scroll",
2213
+ "auto",
2214
+ "overlay"
2215
+ ];
2216
+ function isElement(node) {
2217
+ var ELEMENT_NODE_TYPE = 1;
2218
+ return node.nodeType === ELEMENT_NODE_TYPE;
2219
+ }
2220
+ function getScrollParent(el) {
2221
+ var root2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : defaultRoot;
2222
+ var node = el;
2223
+ while (node && node !== root2 && isElement(node)) {
2224
+ if (node === document.body) {
2225
+ return root2;
2226
+ }
2227
+ var overflowY = window.getComputedStyle(node).overflowY;
2228
+ if (overflowStylePatterns.includes(overflowY) && node.scrollHeight > node.clientHeight) {
2229
+ return node;
2230
+ }
2231
+ node = node.parentNode;
2232
+ }
2233
+ return root2;
2234
+ }
2235
+ function getAllScrollableParents(element) {
2236
+ var scrollableParents = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
2237
+ if (!element) {
2238
+ return scrollableParents;
2239
+ }
2240
+ var isScrollable = element.scrollHeight > element.clientHeight || element.scrollWidth > element.clientWidth;
2241
+ if (isScrollable) {
2242
+ if (element.nodeName === "HTML") {
2243
+ scrollableParents.push(document);
2244
+ } else {
2245
+ scrollableParents.push(element);
2246
+ }
2247
+ }
2248
+ return getAllScrollableParents(element.parentElement, scrollableParents);
2249
+ }
2250
+ function _type_of(obj) {
2251
+ "@swc/helpers - typeof";
2252
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
2253
+ }
2254
+ var isObject = function(val2) {
2255
+ return val2 !== null && (typeof val2 === "undefined" ? "undefined" : _type_of(val2)) === "object";
2256
+ };
2257
+ var isFunction = function(val2) {
2258
+ return typeof val2 === "function";
2259
+ };
2260
+ var isPromise = function(val2) {
2261
+ return isObject(val2) && isFunction(val2.then) && isFunction(val2.catch);
2262
+ };
2263
+ var funcInterceptor = function(interceptor, param) {
2264
+ var _param_args = param.args, args = _param_args === void 0 ? [] : _param_args, done = param.done, canceled = param.canceled;
2265
+ if (interceptor) {
2266
+ var returnVal = interceptor.apply(null, args);
2267
+ if (isPromise(returnVal)) {
2268
+ returnVal.then(function(value2) {
2269
+ if (value2) {
2270
+ done(value2);
2271
+ } else if (canceled) {
2272
+ canceled();
2273
+ }
2274
+ }).catch(function() {
2275
+ });
2276
+ } else if (returnVal) {
2277
+ done();
2278
+ } else if (canceled) {
2279
+ canceled();
2280
+ }
2281
+ } else {
2282
+ done();
2283
+ }
2284
+ };
2285
+ var isDate = function(val2) {
2286
+ return Object.prototype.toString.call(val2) === "[object Date]" && !Number.isNaN(val2.getTime());
2287
+ };
2288
+ var isEmpty = function(p2) {
2289
+ if (p2 === null || p2 === void 0) return true;
2290
+ if ((typeof p2 === "undefined" ? "undefined" : _type_of(p2)) === "object" && Object.keys(p2).length === 0) return true;
2291
+ if (Array.isArray(p2) && p2.length === 0) return true;
2292
+ return false;
2293
+ };
2294
+ function isForwardRefComponent(component) {
2295
+ return component.type && component.type.$$typeof && // eslint-disable-next-line react/display-name
2296
+ React.forwardRef(
2297
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
2298
+ // @ts-ignore
2299
+ function() {
2300
+ }
2301
+ ).$$typeof === component.type.$$typeof;
2302
+ }
2303
+ function _class_call_check(instance, Constructor) {
2304
+ if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
2305
+ }
2306
+ function _defineProperties(target, props) {
2307
+ for (var i2 = 0; i2 < props.length; i2++) {
2308
+ var descriptor = props[i2];
2309
+ descriptor.enumerable = descriptor.enumerable || false;
2310
+ descriptor.configurable = true;
2311
+ if ("value" in descriptor) descriptor.writable = true;
2312
+ Object.defineProperty(target, descriptor.key, descriptor);
2313
+ }
2314
+ }
2315
+ function _create_class(Constructor, protoProps, staticProps) {
2316
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
2317
+ return Constructor;
2318
+ }
2319
+ var MiniLru = /* @__PURE__ */ function() {
2320
+ function MiniLru2(capacity) {
2321
+ _class_call_check(this, MiniLru2);
2322
+ _define_property(this, "cache", void 0);
2323
+ _define_property(this, "capacity", void 0);
2324
+ if (capacity <= 0) {
2325
+ throw new Error("Cache capacity must be a positive number");
2326
+ }
2327
+ this.cache = /* @__PURE__ */ new Map();
2328
+ this.capacity = capacity;
2329
+ }
2330
+ _create_class(MiniLru2, [
2331
+ {
2332
+ key: "get",
2333
+ value: function get(key2) {
2334
+ if (this.cache.has(key2)) {
2335
+ var value2 = this.cache.get(key2);
2336
+ this.cache.delete(key2);
2337
+ this.cache.set(key2, value2);
2338
+ return value2;
2339
+ }
2340
+ return null;
2341
+ }
2342
+ },
2343
+ {
2344
+ key: "set",
2345
+ value: function set(key2, value2) {
2346
+ if (this.cache.has(key2)) {
2347
+ this.cache.delete(key2);
2348
+ } else if (this.cache.size >= this.capacity) {
2349
+ this.cache.delete(this.cache.keys().next().value);
2350
+ }
2351
+ this.cache.set(key2, value2);
2352
+ }
2353
+ },
2354
+ {
2355
+ key: "has",
2356
+ value: function has2(key2) {
2357
+ return this.cache.has(key2);
2358
+ }
2359
+ }
2360
+ ]);
2361
+ return MiniLru2;
2362
+ }();
2363
+ function main() {
2364
+ for (var _len = arguments.length, items = new Array(_len), _key = 0; _key < _len; _key++) {
2365
+ items[_key] = arguments[_key];
2366
+ }
2367
+ return merge.apply(void 0, _to_consumable_array(items));
2368
+ }
2369
+ main.clone = clone;
2370
+ main.isPlainObject = isPlainObject;
2371
+ main.recursive = recursive;
2372
+ function merge() {
2373
+ for (var _len = arguments.length, items = new Array(_len), _key = 0; _key < _len; _key++) {
2374
+ items[_key] = arguments[_key];
2375
+ }
2376
+ return _merge(items[0] === true, false, items);
2377
+ }
2378
+ function recursive() {
2379
+ for (var _len = arguments.length, items = new Array(_len), _key = 0; _key < _len; _key++) {
2380
+ items[_key] = arguments[_key];
2381
+ }
2382
+ return _merge(items[0] === true, true, items);
2383
+ }
2384
+ function clone(input) {
2385
+ if (Array.isArray(input)) {
2386
+ var output = [];
2387
+ for (var index2 = 0; index2 < input.length; ++index2) output.push(clone(input[index2]));
2388
+ return output;
2389
+ }
2390
+ if (isPlainObject(input)) {
2391
+ var output1 = {};
2392
+ for (var index1 in input) output1[index1] = clone(input[index1]);
2393
+ return output1;
2394
+ }
2395
+ return input;
2396
+ }
2397
+ function isPlainObject(input) {
2398
+ if (input === null || (typeof input === "undefined" ? "undefined" : _type_of(input)) !== "object") return false;
2399
+ if (Object.getPrototypeOf(input) === null) return true;
2400
+ var ref = input;
2401
+ while (Object.getPrototypeOf(ref) !== null) ref = Object.getPrototypeOf(ref);
2402
+ return Object.getPrototypeOf(input) === ref;
2403
+ }
2404
+ function _recursiveMerge(base, extend) {
2405
+ if (!isPlainObject(base) || !isPlainObject(extend)) return extend;
2406
+ for (var key2 in extend) {
2407
+ if (key2 === "__proto__" || key2 === "constructor" || key2 === "prototype") continue;
2408
+ base[key2] = isPlainObject(base[key2]) && isPlainObject(extend[key2]) ? _recursiveMerge(base[key2], extend[key2]) : extend[key2];
2409
+ }
2410
+ return base;
2411
+ }
2412
+ function _merge(isClone, isRecursive, items) {
2413
+ var result;
2414
+ if (isClone || !isPlainObject(result = items.shift())) result = {};
2415
+ for (var index2 = 0; index2 < items.length; ++index2) {
2416
+ var item = items[index2];
2417
+ if (!isPlainObject(item)) continue;
2418
+ for (var key2 in item) {
2419
+ if (key2 === "__proto__" || key2 === "constructor" || key2 === "prototype") continue;
2420
+ var value2 = isClone ? clone(item[key2]) : item[key2];
2421
+ result[key2] = isRecursive ? _recursiveMerge(result[key2], value2) : value2;
2422
+ }
2423
+ }
2424
+ return result;
2425
+ }
2426
+ function mergeProps() {
2427
+ for (var _len = arguments.length, items = new Array(_len), _key = 0; _key < _len; _key++) {
2428
+ items[_key] = arguments[_key];
2429
+ }
2430
+ var ret = {};
2431
+ items.forEach(function(item) {
2432
+ if (item) {
2433
+ Object.keys(item).forEach(function(key2) {
2434
+ if (item[key2] !== void 0) {
2435
+ ret[key2] = item[key2];
2436
+ }
2437
+ });
2438
+ }
2439
+ });
2440
+ return ret;
2441
+ }
2442
+ function mergeProp(defaultProp) {
2443
+ for (var _len = arguments.length, propList = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
2444
+ propList[_key - 1] = arguments[_key];
2445
+ }
2446
+ for (var i2 = propList.length - 1; i2 >= 0; i2 -= 1) {
2447
+ if (propList[i2] !== void 0) {
2448
+ return propList[i2];
2449
+ }
2450
+ }
2451
+ return defaultProp;
2452
+ }
2453
+ var padZero = function(num) {
2454
+ var targetLength = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 2;
2455
+ var str = "".concat(num);
2456
+ while (str.length < targetLength) {
2457
+ str = "0".concat(str);
2458
+ }
2459
+ return str;
2460
+ };
2461
+ function preventDefault$1(event, isStopPropagation) {
2462
+ if (typeof event.cancelable !== "boolean" || event.cancelable) {
2463
+ event.preventDefault();
2464
+ }
2465
+ if (isStopPropagation) {
2466
+ event.stopPropagation();
2467
+ }
2468
+ }
2469
+ var pxCheck = function(value2) {
2470
+ return parseFloat(value2.toString());
2471
+ };
1816
2472
  function requestAniFrame() {
1817
2473
  if (inBrowser) {
1818
2474
  var _window = window;
@@ -1833,6 +2489,209 @@ Check the top-level render call using <` + t + ">.");
1833
2489
  }
1834
2490
  }
1835
2491
  const requestAniFrame$1 = requestAniFrame();
2492
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key2, arg) {
2493
+ try {
2494
+ var info = gen[key2](arg);
2495
+ var value2 = info.value;
2496
+ } catch (error) {
2497
+ reject(error);
2498
+ return;
2499
+ }
2500
+ if (info.done) resolve(value2);
2501
+ else Promise.resolve(value2).then(_next, _throw);
2502
+ }
2503
+ function _async_to_generator(fn) {
2504
+ return function() {
2505
+ var self2 = this, args = arguments;
2506
+ return new Promise(function(resolve, reject) {
2507
+ var gen = fn.apply(self2, args);
2508
+ function _next(value2) {
2509
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value2);
2510
+ }
2511
+ function _throw(err) {
2512
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
2513
+ }
2514
+ _next(void 0);
2515
+ });
2516
+ };
2517
+ }
2518
+ function __generator(thisArg, body) {
2519
+ var _ = { label: 0, sent: function() {
2520
+ if (t[0] & 1) throw t[1];
2521
+ return t[1];
2522
+ }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
2523
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
2524
+ return this;
2525
+ }), g;
2526
+ function verb(n2) {
2527
+ return function(v) {
2528
+ return step([n2, v]);
2529
+ };
2530
+ }
2531
+ function step(op) {
2532
+ if (f) throw new TypeError("Generator is already executing.");
2533
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
2534
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
2535
+ if (y = 0, t) op = [op[0] & 2, t.value];
2536
+ switch (op[0]) {
2537
+ case 0:
2538
+ case 1:
2539
+ t = op;
2540
+ break;
2541
+ case 4:
2542
+ _.label++;
2543
+ return { value: op[1], done: false };
2544
+ case 5:
2545
+ _.label++;
2546
+ y = op[1];
2547
+ op = [0];
2548
+ continue;
2549
+ case 7:
2550
+ op = _.ops.pop();
2551
+ _.trys.pop();
2552
+ continue;
2553
+ default:
2554
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
2555
+ _ = 0;
2556
+ continue;
2557
+ }
2558
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
2559
+ _.label = op[1];
2560
+ break;
2561
+ }
2562
+ if (op[0] === 6 && _.label < t[1]) {
2563
+ _.label = t[1];
2564
+ t = op;
2565
+ break;
2566
+ }
2567
+ if (t && _.label < t[2]) {
2568
+ _.label = t[2];
2569
+ _.ops.push(op);
2570
+ break;
2571
+ }
2572
+ if (t[2]) _.ops.pop();
2573
+ _.trys.pop();
2574
+ continue;
2575
+ }
2576
+ op = body.call(thisArg, _);
2577
+ } catch (e2) {
2578
+ op = [6, e2];
2579
+ y = 0;
2580
+ } finally {
2581
+ f = t = 0;
2582
+ }
2583
+ if (op[0] & 5) throw op[1];
2584
+ return { value: op[0] ? op[1] : void 0, done: true };
2585
+ }
2586
+ }
2587
+ typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
2588
+ var e2 = new Error(message);
2589
+ return e2.name = "SuppressedError", e2.error = error, e2.suppressed = suppressed, e2;
2590
+ };
2591
+ var fullClone = _object_spread({}, ReactDOM__namespace);
2592
+ var version = fullClone.version, reactRender = fullClone.render, unmountComponentAtNode = fullClone.unmountComponentAtNode;
2593
+ var createRoot;
2594
+ try {
2595
+ var mainVersion = Number((version || "").split(".")[0]);
2596
+ if (mainVersion >= 18 && fullClone.createRoot) {
2597
+ createRoot = fullClone.createRoot;
2598
+ }
2599
+ } catch (e2) {
2600
+ }
2601
+ function toggleWarning(skip) {
2602
+ var __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = fullClone.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
2603
+ if (__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED && (typeof __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED === "undefined" ? "undefined" : _type_of(__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)) === "object") {
2604
+ __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.usingClientEntryPoint = skip;
2605
+ }
2606
+ }
2607
+ var MARK = "__nutui_react_root__";
2608
+ function legacyRender(node, container) {
2609
+ reactRender(node, container);
2610
+ }
2611
+ function concurrentRender(node, container) {
2612
+ toggleWarning(true);
2613
+ var root2 = container[MARK] || createRoot(container);
2614
+ toggleWarning(false);
2615
+ root2.render(node);
2616
+ container[MARK] = root2;
2617
+ }
2618
+ function render(node, container) {
2619
+ if (createRoot) {
2620
+ concurrentRender(node, container);
2621
+ return;
2622
+ }
2623
+ legacyRender(node, container);
2624
+ }
2625
+ function legacyUnmount(container) {
2626
+ return unmountComponentAtNode(container);
2627
+ }
2628
+ function concurrentUnmount(container) {
2629
+ return _concurrentUnmount.apply(this, arguments);
2630
+ }
2631
+ function _concurrentUnmount() {
2632
+ _concurrentUnmount = _async_to_generator(function(container) {
2633
+ return __generator(this, function(_state) {
2634
+ return [
2635
+ 2,
2636
+ Promise.resolve().then(function() {
2637
+ var _container_MARK;
2638
+ (_container_MARK = container[MARK]) === null || _container_MARK === void 0 ? void 0 : _container_MARK.unmount();
2639
+ delete container[MARK];
2640
+ })
2641
+ ];
2642
+ });
2643
+ });
2644
+ return _concurrentUnmount.apply(this, arguments);
2645
+ }
2646
+ function unmount(container) {
2647
+ if (createRoot) {
2648
+ return concurrentUnmount(container);
2649
+ }
2650
+ return legacyUnmount(container);
2651
+ }
2652
+ function rubberband$1(distance, dimension, constant) {
2653
+ return distance * dimension * constant / (dimension + constant * distance);
2654
+ }
2655
+ function rubberbandIfOutOfBounds$1(position2, min, max, dimension) {
2656
+ var constant = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0.15;
2657
+ if (constant === 0) return bound(position2, min, max);
2658
+ if (position2 < min) return -rubberband$1(min - position2, dimension, constant) + min;
2659
+ if (position2 > max) return +rubberband$1(position2 - max, dimension, constant) + max;
2660
+ return position2;
2661
+ }
2662
+ var sleep = function(time2) {
2663
+ return new Promise(function(resolve) {
2664
+ return setTimeout(resolve, time2);
2665
+ });
2666
+ };
2667
+ exports.passiveSupported = false;
2668
+ if (canUseDom) {
2669
+ try {
2670
+ var opts = Object.defineProperty({}, "passive", {
2671
+ get: function get() {
2672
+ exports.passiveSupported = true;
2673
+ }
2674
+ });
2675
+ window.addEventListener("test-passive-supported", null, opts);
2676
+ } catch (e2) {
2677
+ console.log(e2);
2678
+ }
2679
+ }
2680
+ function toArray$1(value2) {
2681
+ if (value2 === void 0 || value2 === null) {
2682
+ return [];
2683
+ }
2684
+ return Array.isArray(value2) ? value2 : [
2685
+ value2
2686
+ ];
2687
+ }
2688
+ var upperCaseFirst = function(str) {
2689
+ str = str.toLowerCase();
2690
+ str = str.replace(/\b\w+\b/g, function(word) {
2691
+ return word.substring(0, 1).toUpperCase() + word.substring(1);
2692
+ });
2693
+ return str;
2694
+ };
1836
2695
  var classPrefix$u = "nut-configprovider";
1837
2696
  var defaultConfigRef = {
1838
2697
  current: {
@@ -1994,19 +2853,6 @@ Check the top-level render call using <` + t + ">.");
1994
2853
  function _non_iterable_rest() {
1995
2854
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1996
2855
  }
1997
- function _array_like_to_array(arr, len) {
1998
- if (len == null || len > arr.length) len = arr.length;
1999
- for (var i2 = 0, arr2 = new Array(len); i2 < len; i2++) arr2[i2] = arr[i2];
2000
- return arr2;
2001
- }
2002
- function _unsupported_iterable_to_array(o, minLen) {
2003
- if (!o) return;
2004
- if (typeof o === "string") return _array_like_to_array(o, minLen);
2005
- var n2 = Object.prototype.toString.call(o).slice(8, -1);
2006
- if (n2 === "Object" && o.constructor) n2 = o.constructor.name;
2007
- if (n2 === "Map" || n2 === "Set") return Array.from(n2);
2008
- if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2)) return _array_like_to_array(o, minLen);
2009
- }
2010
2856
  function _sliced_to_array(arr, i2) {
2011
2857
  return _array_with_holes(arr) || _iterable_to_array_limit(arr, i2) || _unsupported_iterable_to_array(arr, i2) || _non_iterable_rest();
2012
2858
  }
@@ -3960,60 +4806,6 @@ Check the top-level render call using <` + t + ">.");
3960
4806
  last
3961
4807
  };
3962
4808
  }
3963
- var canUseDom = !!(typeof window !== "undefined" && typeof document !== "undefined" && window.document && window.document.createElement);
3964
- var defaultRoot = canUseDom ? window : void 0;
3965
- var overflowStylePatterns = [
3966
- "scroll",
3967
- "auto",
3968
- "overlay"
3969
- ];
3970
- function isElement(node) {
3971
- var ELEMENT_NODE_TYPE = 1;
3972
- return node.nodeType === ELEMENT_NODE_TYPE;
3973
- }
3974
- function getScrollParent(el) {
3975
- var root2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : defaultRoot;
3976
- var node = el;
3977
- while (node && node !== root2 && isElement(node)) {
3978
- if (node === document.body) {
3979
- return root2;
3980
- }
3981
- var overflowY = window.getComputedStyle(node).overflowY;
3982
- if (overflowStylePatterns.includes(overflowY) && node.scrollHeight > node.clientHeight) {
3983
- return node;
3984
- }
3985
- node = node.parentNode;
3986
- }
3987
- return root2;
3988
- }
3989
- function getAllScrollableParents(element) {
3990
- var scrollableParents = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
3991
- if (!element) {
3992
- return scrollableParents;
3993
- }
3994
- var isScrollable = element.scrollHeight > element.clientHeight || element.scrollWidth > element.clientWidth;
3995
- if (isScrollable) {
3996
- if (element.nodeName === "HTML") {
3997
- scrollableParents.push(document);
3998
- } else {
3999
- scrollableParents.push(element);
4000
- }
4001
- }
4002
- return getAllScrollableParents(element.parentElement, scrollableParents);
4003
- }
4004
- var passiveSupported = false;
4005
- if (canUseDom) {
4006
- try {
4007
- var opts = Object.defineProperty({}, "passive", {
4008
- get: function get() {
4009
- passiveSupported = true;
4010
- }
4011
- });
4012
- window.addEventListener("test-passive-supported", null, opts);
4013
- } catch (e2) {
4014
- console.log(e2);
4015
- }
4016
- }
4017
4809
  var totalLockCount = 0;
4018
4810
  var BODY_LOCK_CLASS = "nut-overflow-hidden";
4019
4811
  function getScrollableElement(el) {
@@ -4055,7 +4847,7 @@ Check the top-level render call using <` + t + ">.");
4055
4847
  };
4056
4848
  var lock = function() {
4057
4849
  document.addEventListener("touchstart", touch.start);
4058
- document.addEventListener("touchmove", onTouchMove, passiveSupported ? {
4850
+ document.addEventListener("touchmove", onTouchMove, exports.passiveSupported ? {
4059
4851
  passive: false
4060
4852
  } : false);
4061
4853
  if (!totalLockCount) {
@@ -4188,9 +4980,6 @@ Check the top-level render call using <` + t + ">.");
4188
4980
  }
4189
4981
  };
4190
4982
  const GridContext = React.createContext(context);
4191
- var pxCheck = function(value2) {
4192
- return parseFloat(value2.toString());
4193
- };
4194
4983
  var defaultProps$1v = {
4195
4984
  text: "",
4196
4985
  columns: 4,
@@ -4443,36 +5232,6 @@ Check the top-level render call using <` + t + ">.");
4443
5232
  }));
4444
5233
  };
4445
5234
  Space.displayName = "NutSpace";
4446
- function isWindow(val2) {
4447
- return val2 === window;
4448
- }
4449
- var getRect = function(elementRef) {
4450
- var element = elementRef;
4451
- if (isWindow(element)) {
4452
- var width2 = element.innerWidth;
4453
- var height2 = element.innerHeight;
4454
- return {
4455
- top: 0,
4456
- left: 0,
4457
- right: width2,
4458
- bottom: height2,
4459
- width: width2,
4460
- height: height2
4461
- };
4462
- }
4463
- if (element && element.getBoundingClientRect) {
4464
- console.log(element, element.getBoundingClientRect());
4465
- return element.getBoundingClientRect();
4466
- }
4467
- return {
4468
- top: 0,
4469
- left: 0,
4470
- right: 0,
4471
- bottom: 0,
4472
- width: 0,
4473
- height: 0
4474
- };
4475
- };
4476
5235
  function useWatch$1(dep, callback) {
4477
5236
  var config2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
4478
5237
  immediate: false
@@ -4825,7 +5584,7 @@ Check the top-level render call using <` + t + ">.");
4825
5584
  }, children));
4826
5585
  };
4827
5586
  BackTop.displayName = "NutBackTop";
4828
- function clamp$2(v, min, max) {
5587
+ function clamp$1(v, min, max) {
4829
5588
  return Math.max(min, Math.min(v, max));
4830
5589
  }
4831
5590
  const V = {
@@ -4848,19 +5607,19 @@ Check the top-level render call using <` + t + ">.");
4848
5607
  v1[1] -= v2[1];
4849
5608
  }
4850
5609
  };
4851
- function rubberband$1(distance, dimension, constant) {
5610
+ function rubberband(distance, dimension, constant) {
4852
5611
  if (dimension === 0 || Math.abs(dimension) === Infinity) return Math.pow(distance, constant * 5);
4853
5612
  return distance * dimension * constant / (dimension + constant * distance);
4854
5613
  }
4855
- function rubberbandIfOutOfBounds$1(position2, min, max, constant = 0.15) {
4856
- if (constant === 0) return clamp$2(position2, min, max);
4857
- if (position2 < min) return -rubberband$1(min - position2, max - min, constant) + min;
4858
- if (position2 > max) return +rubberband$1(position2 - max, max - min, constant) + max;
5614
+ function rubberbandIfOutOfBounds(position2, min, max, constant = 0.15) {
5615
+ if (constant === 0) return clamp$1(position2, min, max);
5616
+ if (position2 < min) return -rubberband(min - position2, max - min, constant) + min;
5617
+ if (position2 > max) return +rubberband(position2 - max, max - min, constant) + max;
4859
5618
  return position2;
4860
5619
  }
4861
5620
  function computeRubberband(bounds, [Vx, Vy], [Rx, Ry]) {
4862
5621
  const [[X0, X1], [Y0, Y1]] = bounds;
4863
- return [rubberbandIfOutOfBounds$1(Vx, X0, X1, Rx), rubberbandIfOutOfBounds$1(Vy, Y0, Y1, Ry)];
5622
+ return [rubberbandIfOutOfBounds(Vx, X0, X1, Rx), rubberbandIfOutOfBounds(Vy, Y0, Y1, Ry)];
4864
5623
  }
4865
5624
  function _defineProperty$1(obj, key2, value2) {
4866
5625
  if (key2 in obj) {
@@ -6834,7 +7593,7 @@ Please add \`${key2}Action\` when creating your handler.`);
6834
7593
  }
6835
7594
  }
6836
7595
  }
6837
- const toArray$1 = (a) => is.und(a) ? [] : is.arr(a) ? a : [a];
7596
+ const toArray = (a) => is.und(a) ? [] : is.arr(a) ? a : [a];
6838
7597
  function flush(queue, iterator) {
6839
7598
  if (queue.size) {
6840
7599
  const items = Array.from(queue);
@@ -6947,7 +7706,7 @@ Please add \`${key2}Action\` when creating your handler.`);
6947
7706
  const index2 = arr.findIndex(test);
6948
7707
  return index2 < 0 ? arr.length : index2;
6949
7708
  }
6950
- const clamp$1 = (min, max, v) => Math.min(Math.max(v, min), max);
7709
+ const clamp = (min, max, v) => Math.min(Math.max(v, min), max);
6951
7710
  const colors = {
6952
7711
  transparent: 0,
6953
7712
  aliceblue: 4042850303,
@@ -7245,7 +8004,7 @@ Please add \`${key2}Action\` when creating your handler.`);
7245
8004
  progress = direction === "end" ? Math.min(progress, 0.999) : Math.max(progress, 1e-3);
7246
8005
  const expanded = progress * steps2;
7247
8006
  const rounded = direction === "end" ? Math.floor(expanded) : Math.ceil(expanded);
7248
- return clamp$1(0, 1, rounded / steps2);
8007
+ return clamp(0, 1, rounded / steps2);
7249
8008
  };
7250
8009
  const c1 = 1.70158;
7251
8010
  const c2 = c1 * 1.525;
@@ -7842,7 +8601,7 @@ Please add \`${key2}Action\` when creating your handler.`);
7842
8601
  function callProp(value2, ...args) {
7843
8602
  return is.fun(value2) ? value2(...args) : value2;
7844
8603
  }
7845
- const matchProp = (value2, key2) => value2 === true || !!(key2 && value2 && (is.fun(value2) ? value2(key2) : toArray$1(value2).includes(key2)));
8604
+ const matchProp = (value2, key2) => value2 === true || !!(key2 && value2 && (is.fun(value2) ? value2(key2) : toArray(value2).includes(key2)));
7846
8605
  const resolveProp = (prop, key2) => is.obj(prop) ? key2 && prop[key2] : prop;
7847
8606
  const getDefaultProp = (props, key2) => props.default === true ? props[key2] : props.default ? props.default[key2] : void 0;
7848
8607
  const noopTransform = (value2) => value2;
@@ -8384,7 +9143,7 @@ Please add \`${key2}Action\` when creating your handler.`);
8384
9143
  } = anim;
8385
9144
  const payload = getPayload(anim.to);
8386
9145
  if (!payload && hasFluidValue(anim.to)) {
8387
- toValues = toArray$1(getFluidValue(anim.to));
9146
+ toValues = toArray(getFluidValue(anim.to));
8388
9147
  }
8389
9148
  anim.values.forEach((node2, i2) => {
8390
9149
  if (node2.done) return;
@@ -8737,7 +9496,7 @@ Please add \`${key2}Action\` when creating your handler.`);
8737
9496
  if (!hasAsyncTo) {
8738
9497
  if (started || hasFluidValue(prevTo)) {
8739
9498
  anim.values = node.getPayload();
8740
- anim.toValues = hasFluidValue(to2) ? null : goalType == AnimatedString ? [1] : toArray$1(goal);
9499
+ anim.toValues = hasFluidValue(to2) ? null : goalType == AnimatedString ? [1] : toArray(goal);
8741
9500
  }
8742
9501
  if (anim.immediate != immediate) {
8743
9502
  anim.immediate = immediate;
@@ -9010,7 +9769,7 @@ Please add \`${key2}Action\` when creating your handler.`);
9010
9769
  queue
9011
9770
  } = this;
9012
9771
  if (props) {
9013
- queue = toArray$1(props).map(createUpdate);
9772
+ queue = toArray(props).map(createUpdate);
9014
9773
  } else {
9015
9774
  this.queue = [];
9016
9775
  }
@@ -9026,7 +9785,7 @@ Please add \`${key2}Action\` when creating your handler.`);
9026
9785
  }
9027
9786
  if (keys) {
9028
9787
  const springs = this.springs;
9029
- each(toArray$1(keys), (key2) => springs[key2].stop(!!arg));
9788
+ each(toArray(keys), (key2) => springs[key2].stop(!!arg));
9030
9789
  } else {
9031
9790
  stopAsync(this._state, this._lastAsyncId);
9032
9791
  this.each((spring) => spring.stop(!!arg));
@@ -9040,7 +9799,7 @@ Please add \`${key2}Action\` when creating your handler.`);
9040
9799
  });
9041
9800
  } else {
9042
9801
  const springs = this.springs;
9043
- each(toArray$1(keys), (key2) => springs[key2].pause());
9802
+ each(toArray(keys), (key2) => springs[key2].pause());
9044
9803
  }
9045
9804
  return this;
9046
9805
  }
@@ -9051,7 +9810,7 @@ Please add \`${key2}Action\` when creating your handler.`);
9051
9810
  });
9052
9811
  } else {
9053
9812
  const springs = this.springs;
9054
- each(toArray$1(keys), (key2) => springs[key2].resume());
9813
+ each(toArray(keys), (key2) => springs[key2].resume());
9055
9814
  }
9056
9815
  return this;
9057
9816
  }
@@ -9202,7 +9961,7 @@ Please add \`${key2}Action\` when creating your handler.`);
9202
9961
  function getSprings(ctrl, props) {
9203
9962
  const springs = _extends$1({}, ctrl.springs);
9204
9963
  if (props) {
9205
- each(toArray$1(props), (props2) => {
9964
+ each(toArray(props), (props2) => {
9206
9965
  if (is.und(props2.keys)) {
9207
9966
  props2 = createUpdate(props2);
9208
9967
  }
@@ -9474,7 +10233,7 @@ Please add \`${key2}Action\` when creating your handler.`);
9474
10233
  }
9475
10234
  }
9476
10235
  _get() {
9477
- const inputs = is.arr(this.source) ? this.source.map(getFluidValue) : toArray$1(getFluidValue(this.source));
10236
+ const inputs = is.arr(this.source) ? this.source.map(getFluidValue) : toArray(getFluidValue(this.source));
9478
10237
  return this.calc(...inputs);
9479
10238
  }
9480
10239
  _start() {
@@ -9493,7 +10252,7 @@ Please add \`${key2}Action\` when creating your handler.`);
9493
10252
  }
9494
10253
  _attach() {
9495
10254
  let priority2 = 1;
9496
- each(toArray$1(this.source), (source) => {
10255
+ each(toArray(this.source), (source) => {
9497
10256
  if (hasFluidValue(source)) {
9498
10257
  addFluidObserver(source, this);
9499
10258
  }
@@ -9508,7 +10267,7 @@ Please add \`${key2}Action\` when creating your handler.`);
9508
10267
  this._start();
9509
10268
  }
9510
10269
  _detach() {
9511
- each(toArray$1(this.source), (source) => {
10270
+ each(toArray(this.source), (source) => {
9512
10271
  if (hasFluidValue(source)) {
9513
10272
  removeFluidObserver(source, this);
9514
10273
  }
@@ -9527,7 +10286,7 @@ Please add \`${key2}Action\` when creating your handler.`);
9527
10286
  } else if (event.type == "idle") {
9528
10287
  this._active.delete(event.parent);
9529
10288
  } else if (event.type == "priority") {
9530
- this.priority = toArray$1(this.source).reduce((highest, parent2) => Math.max(highest, (isFrameValue(parent2) ? parent2.priority : 0) + 1), 0);
10289
+ this.priority = toArray(this.source).reduce((highest, parent2) => Math.max(highest, (isFrameValue(parent2) ? parent2.priority : 0) + 1), 0);
9531
10290
  }
9532
10291
  }
9533
10292
  }
@@ -9689,7 +10448,7 @@ Please add \`${key2}Action\` when creating your handler.`);
9689
10448
  delete style[key2];
9690
10449
  if (is.und(value2)) return;
9691
10450
  const unit = pxTransforms.test(key2) ? "px" : degTransforms.test(key2) ? "deg" : "";
9692
- inputs.push(toArray$1(value2));
10451
+ inputs.push(toArray(value2));
9693
10452
  transforms.push(key2 === "rotate3d" ? ([x2, y2, z2, deg]) => [`rotate3d(${x2},${y2},${z2},${addUnit(deg, unit)})`, isValueIdentity(deg, 0)] : (input) => [`${key2}(${input.map((v) => addUnit(v, unit)).join(",")})`, isValueIdentity(input, key2.startsWith("scale") ? 1 : 0)]);
9694
10453
  }
9695
10454
  });
@@ -9956,10 +10715,6 @@ Please add \`${key2}Action\` when creating your handler.`);
9956
10715
  };
9957
10716
  Elevator.displayName = "NutElevator";
9958
10717
  Elevator.Context = elevatorContext;
9959
- function _type_of(obj) {
9960
- "@swc/helpers - typeof";
9961
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
9962
- }
9963
10718
  var defaultProps$1l = _object_spread_props(_object_spread({}, ComponentDefaults), {
9964
10719
  value: "",
9965
10720
  dot: false,
@@ -10156,22 +10911,6 @@ Please add \`${key2}Action\` when creating your handler.`);
10156
10911
  }, renderWrapper()) : renderWrapper());
10157
10912
  };
10158
10913
  NavBar.displayName = "NutNavBar";
10159
- function mergeProps() {
10160
- for (var _len = arguments.length, items = new Array(_len), _key = 0; _key < _len; _key++) {
10161
- items[_key] = arguments[_key];
10162
- }
10163
- var ret = {};
10164
- items.forEach(function(item) {
10165
- if (item) {
10166
- Object.keys(item).forEach(function(key2) {
10167
- if (item[key2] !== void 0) {
10168
- ret[key2] = item[key2];
10169
- }
10170
- });
10171
- }
10172
- });
10173
- return ret;
10174
- }
10175
10914
  var defaultProps$1i = {
10176
10915
  title: "",
10177
10916
  value: "",
@@ -10835,105 +11574,6 @@ Please add \`${key2}Action\` when creating your handler.`);
10835
11574
  return /* @__PURE__ */ React.createElement(React.Fragment, null, renderToContainer(portal, renderNode()));
10836
11575
  };
10837
11576
  Popup.displayName = "NutPopup";
10838
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key2, arg) {
10839
- try {
10840
- var info = gen[key2](arg);
10841
- var value2 = info.value;
10842
- } catch (error) {
10843
- reject(error);
10844
- return;
10845
- }
10846
- if (info.done) resolve(value2);
10847
- else Promise.resolve(value2).then(_next, _throw);
10848
- }
10849
- function _async_to_generator(fn) {
10850
- return function() {
10851
- var self2 = this, args = arguments;
10852
- return new Promise(function(resolve, reject) {
10853
- var gen = fn.apply(self2, args);
10854
- function _next(value2) {
10855
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value2);
10856
- }
10857
- function _throw(err) {
10858
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
10859
- }
10860
- _next(void 0);
10861
- });
10862
- };
10863
- }
10864
- function __generator(thisArg, body) {
10865
- var _ = { label: 0, sent: function() {
10866
- if (t[0] & 1) throw t[1];
10867
- return t[1];
10868
- }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
10869
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
10870
- return this;
10871
- }), g;
10872
- function verb(n2) {
10873
- return function(v) {
10874
- return step([n2, v]);
10875
- };
10876
- }
10877
- function step(op) {
10878
- if (f) throw new TypeError("Generator is already executing.");
10879
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
10880
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
10881
- if (y = 0, t) op = [op[0] & 2, t.value];
10882
- switch (op[0]) {
10883
- case 0:
10884
- case 1:
10885
- t = op;
10886
- break;
10887
- case 4:
10888
- _.label++;
10889
- return { value: op[1], done: false };
10890
- case 5:
10891
- _.label++;
10892
- y = op[1];
10893
- op = [0];
10894
- continue;
10895
- case 7:
10896
- op = _.ops.pop();
10897
- _.trys.pop();
10898
- continue;
10899
- default:
10900
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
10901
- _ = 0;
10902
- continue;
10903
- }
10904
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
10905
- _.label = op[1];
10906
- break;
10907
- }
10908
- if (op[0] === 6 && _.label < t[1]) {
10909
- _.label = t[1];
10910
- t = op;
10911
- break;
10912
- }
10913
- if (t && _.label < t[2]) {
10914
- _.label = t[2];
10915
- _.ops.push(op);
10916
- break;
10917
- }
10918
- if (t[2]) _.ops.pop();
10919
- _.trys.pop();
10920
- continue;
10921
- }
10922
- op = body.call(thisArg, _);
10923
- } catch (e2) {
10924
- op = [6, e2];
10925
- y = 0;
10926
- } finally {
10927
- f = t = 0;
10928
- }
10929
- if (op[0] & 5) throw op[1];
10930
- return { value: op[0] ? op[1] : void 0, done: true };
10931
- }
10932
- }
10933
- typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
10934
- var e2 = new Error(message);
10935
- return e2.name = "SuppressedError", e2.error = error, e2.suppressed = suppressed, e2;
10936
- };
10937
11577
  function _to_primitive(input, hint) {
10938
11578
  if (_type_of(input) !== "object" || input === null) return input;
10939
11579
  var prim = input[Symbol.toPrimitive];
@@ -11003,12 +11643,6 @@ Please add \`${key2}Action\` when creating your handler.`);
11003
11643
  }
11004
11644
  return map[topId];
11005
11645
  };
11006
- var isEmpty = function(p2) {
11007
- if (p2 === null || p2 === void 0) return true;
11008
- if ((typeof p2 === "undefined" ? "undefined" : _type_of(p2)) === "object" && Object.keys(p2).length === 0) return true;
11009
- if (Array.isArray(p2) && p2.length === 0) return true;
11010
- return false;
11011
- };
11012
11646
  var getRefValue = function(ref) {
11013
11647
  return ref.current;
11014
11648
  };
@@ -11090,6 +11724,7 @@ Please add \`${key2}Action\` when creating your handler.`);
11090
11724
  });
11091
11725
  next.push({
11092
11726
  selected: val2,
11727
+ selectedText: opt === null || opt === void 0 ? void 0 : opt.text,
11093
11728
  pane: currentOptions
11094
11729
  });
11095
11730
  pathNodes.current[index2] = opt;
@@ -11377,7 +12012,7 @@ Please add \`${key2}Action\` when creating your handler.`);
11377
12012
  }
11378
12013
  }, levels.map(function(pane, index2) {
11379
12014
  return /* @__PURE__ */ React.createElement(Tabs.TabPane, {
11380
- title: pane.selected || locale.select,
12015
+ title: pane.selectedText || locale.select,
11381
12016
  key: index2
11382
12017
  }, /* @__PURE__ */ React.createElement("div", {
11383
12018
  className: classPane
@@ -11648,245 +12283,6 @@ Please add \`${key2}Action\` when creating your handler.`);
11648
12283
  };
11649
12284
  var Address = /* @__PURE__ */ React.forwardRef(InternalAddress);
11650
12285
  Address.displayName = "NutAddress";
11651
- function _array_without_holes(arr) {
11652
- if (Array.isArray(arr)) return _array_like_to_array(arr);
11653
- }
11654
- function _iterable_to_array(iter) {
11655
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
11656
- return Array.from(iter);
11657
- }
11658
- }
11659
- function _non_iterable_spread() {
11660
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
11661
- }
11662
- function _to_consumable_array(arr) {
11663
- return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
11664
- }
11665
- var Utils = {
11666
- /**
11667
- * 是否为闫年
11668
- * @return {Boolse} true|false
11669
- */
11670
- isLeapYear: function isLeapYear(y) {
11671
- return y % 4 === 0 && y % 100 !== 0 || y % 400 === 0;
11672
- },
11673
- /**
11674
- * 返回星期数
11675
- * @return {String}
11676
- */
11677
- getWhatDay: function getWhatDay(year, month, day) {
11678
- var date2 = new Date("".concat(year, "/").concat(month, "/").concat(day));
11679
- var index2 = date2.getDay();
11680
- var dayNames = [
11681
- "星期日",
11682
- "星期一",
11683
- "星期二",
11684
- "星期三",
11685
- "星期四",
11686
- "星期五",
11687
- "星期六"
11688
- ];
11689
- return dayNames[index2];
11690
- },
11691
- /**
11692
- * 返回上一个月在当前面板中的天数
11693
- * @return {Number}
11694
- */
11695
- getMonthPreDay: function getMonthPreDay(year, month) {
11696
- var date2 = new Date("".concat(year, "/").concat(month, "/01"));
11697
- var day = date2.getDay();
11698
- if (day === 0) {
11699
- day = 7;
11700
- }
11701
- return day;
11702
- },
11703
- /**
11704
- * 返回月份天数
11705
- * @return {Number}
11706
- */
11707
- getMonthDays: function getMonthDays(year, month) {
11708
- if (/^0/.test(month)) {
11709
- month = month.split("")[1];
11710
- }
11711
- return [
11712
- 0,
11713
- 31,
11714
- this.isLeapYear(Number(year)) ? 29 : 28,
11715
- 31,
11716
- 30,
11717
- 31,
11718
- 30,
11719
- 31,
11720
- 31,
11721
- 30,
11722
- 31,
11723
- 30,
11724
- 31
11725
- ][month];
11726
- },
11727
- /**
11728
- * 补齐数字位数
11729
- * @return {string}
11730
- */
11731
- getNumTwoBit: function getNumTwoBit(n2) {
11732
- n2 = Number(n2);
11733
- return (n2 > 9 ? "" : "0") + n2;
11734
- },
11735
- /**
11736
- * 日期对象转成字符串
11737
- * @return {string}
11738
- */
11739
- date2Str: function date2Str(date2, split) {
11740
- split = split || "-";
11741
- var y = date2.getFullYear();
11742
- var m2 = this.getNumTwoBit(date2.getMonth() + 1);
11743
- var d2 = this.getNumTwoBit(date2.getDate());
11744
- return [
11745
- y,
11746
- m2,
11747
- d2
11748
- ].join(split);
11749
- },
11750
- /**
11751
- * 返回日期格式字符串
11752
- * @param {Number} 0返回今天的日期、1返回明天的日期,2返回后天得日期,依次类推
11753
- * @return {string} '2014-12-31'
11754
- */
11755
- getDay: function getDay(i2) {
11756
- i2 = i2 || 0;
11757
- var date2 = /* @__PURE__ */ new Date();
11758
- var diff = i2 * (1e3 * 60 * 60 * 24);
11759
- date2 = new Date(date2.getTime() + diff);
11760
- return this.date2Str(date2);
11761
- },
11762
- /**
11763
- * 时间比较
11764
- * @return {Boolean}
11765
- */
11766
- compareDate: function compareDate(date1, date2) {
11767
- var startTime = new Date(date1.replace("-", "/").replace("-", "/"));
11768
- var endTime = new Date(date2.replace("-", "/").replace("-", "/"));
11769
- if (startTime >= endTime) {
11770
- return false;
11771
- }
11772
- return true;
11773
- },
11774
- /**
11775
- * 时间是否相等
11776
- * @return {Boolean}
11777
- */
11778
- isEqual: function isEqual2(date1, date2) {
11779
- var startTime = new Date((date1 || "").replace(/-/g, "/")).getTime();
11780
- var endTime = new Date(date2.replace(/-/g, "/")).getTime();
11781
- if (startTime === endTime) {
11782
- return true;
11783
- }
11784
- return false;
11785
- },
11786
- getMonthWeek: function getMonthWeek(year, month, date2) {
11787
- var firstDayOfWeek = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0;
11788
- var dateNow = new Date(Number(year), parseInt(month) - 1, Number(date2));
11789
- var w = dateNow.getDay();
11790
- var d2 = dateNow.getDate();
11791
- var remainder = 6 - w;
11792
- if (firstDayOfWeek !== 0) {
11793
- w = w === 0 ? 7 : w;
11794
- remainder = 7 - w;
11795
- }
11796
- return Math.ceil((d2 + remainder) / 7);
11797
- },
11798
- getYearWeek: function getYearWeek(year, month, date2) {
11799
- var dateNow = new Date(Number(year), parseInt(month) - 1, Number(date2));
11800
- var dateFirst = new Date(Number(year), 0, 1);
11801
- var dataNumber = Math.round((dateNow.valueOf() - dateFirst.valueOf()) / 864e5);
11802
- return Math.ceil((dataNumber + (dateFirst.getDay() + 1 - 1)) / 7);
11803
- },
11804
- getWeekDate: function getWeekDate(year, month, date2) {
11805
- var firstDayOfWeek = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0;
11806
- var dateNow = new Date(Number(year), parseInt(month) - 1, Number(date2));
11807
- var nowTime = dateNow.getTime();
11808
- var day = dateNow.getDay();
11809
- if (firstDayOfWeek === 0) {
11810
- var oneDayTime = 24 * 60 * 60 * 1e3;
11811
- var SundayTime = nowTime - day * oneDayTime;
11812
- var SaturdayTime = nowTime + (6 - day) * oneDayTime;
11813
- var sunday = this.date2Str(new Date(SundayTime));
11814
- var saturday = this.date2Str(new Date(SaturdayTime));
11815
- return [
11816
- sunday,
11817
- saturday
11818
- ];
11819
- }
11820
- day = day === 0 ? 7 : day;
11821
- var oneDayTime1 = 24 * 60 * 60 * 1e3;
11822
- var MondayTime = nowTime - (day - 1) * oneDayTime1;
11823
- var SundayTime1 = nowTime + (7 - day) * oneDayTime1;
11824
- var monday = this.date2Str(new Date(MondayTime));
11825
- var sunday1 = this.date2Str(new Date(SundayTime1));
11826
- return [
11827
- monday,
11828
- sunday1
11829
- ];
11830
- },
11831
- formatResultDate: function formatResultDate(date2) {
11832
- var days = _to_consumable_array(date2.split("-"));
11833
- days[2] = Utils.getNumTwoBit(Number(days[2]));
11834
- days[3] = "".concat(days[0], "-").concat(days[1], "-").concat(days[2]);
11835
- days[4] = Utils.getWhatDay(+days[0], +days[1], +days[2]);
11836
- return days;
11837
- }
11838
- };
11839
- var getCurrMonthData = function(type2, year, month) {
11840
- switch (type2) {
11841
- case "prev":
11842
- month === 1 && (year -= 1);
11843
- month = month === 1 ? 12 : --month;
11844
- break;
11845
- case "next":
11846
- month === 12 && (year += 1);
11847
- month = month === 12 ? 1 : ++month;
11848
- break;
11849
- }
11850
- return [
11851
- year,
11852
- Utils.getNumTwoBit(month),
11853
- Utils.getMonthDays(String(year), String(month))
11854
- ];
11855
- };
11856
- var getDaysStatus = function(type2, year, month) {
11857
- var days = Utils.getMonthDays("".concat(year), "".concat(month));
11858
- return Array.from(Array(days), function(v, k) {
11859
- return {
11860
- day: k + 1,
11861
- type: type2,
11862
- year,
11863
- month
11864
- };
11865
- });
11866
- };
11867
- var getPreMonthDates = function(type2, year, month, firstDayOfWeek) {
11868
- var preMonth = +month - 1;
11869
- var preYear = year;
11870
- if (preMonth <= 0) {
11871
- preMonth = 12;
11872
- preYear += 1;
11873
- }
11874
- var days = Utils.getMonthPreDay(+year, +month);
11875
- days -= firstDayOfWeek;
11876
- if (days >= 7) {
11877
- days -= 7;
11878
- }
11879
- var preDates = Utils.getMonthDays("".concat(preYear), "".concat(preMonth));
11880
- var months = Array.from(Array(preDates), function(v, k) {
11881
- return {
11882
- day: k + 1,
11883
- type: type2,
11884
- preYear,
11885
- preMonth
11886
- };
11887
- });
11888
- return months.slice(preDates - days);
11889
- };
11890
12286
  var splitDate = function(date2) {
11891
12287
  var split = date2.indexOf("-") !== -1 ? "-" : "/";
11892
12288
  return date2.split(split);
@@ -13368,26 +13764,6 @@ Please add \`${key2}Action\` when creating your handler.`);
13368
13764
  CheckboxGroup.displayName = "NutCheckboxGroup";
13369
13765
  var InnerCheckbox = Checkbox;
13370
13766
  InnerCheckbox.Group = CheckboxGroup;
13371
- var isObject = function(val2) {
13372
- return val2 !== null && (typeof val2 === "undefined" ? "undefined" : _type_of(val2)) === "object";
13373
- };
13374
- var isFunction = function(val2) {
13375
- return typeof val2 === "function";
13376
- };
13377
- var isPromise = function(val2) {
13378
- return isObject(val2) && isFunction(val2.then) && isFunction(val2.catch);
13379
- };
13380
- var clamp = function(num, min, max) {
13381
- return Math.min(Math.max(num, min), max);
13382
- };
13383
- function preventDefault$1(event, isStopPropagation) {
13384
- if (typeof event.cancelable !== "boolean" || event.cancelable) {
13385
- event.preventDefault();
13386
- }
13387
- if (isStopPropagation) {
13388
- event.stopPropagation();
13389
- }
13390
- }
13391
13767
  var momentum = function(distance, duration) {
13392
13768
  var speed = Math.abs(distance / duration);
13393
13769
  return speed / 3e-3 * (distance < 0 ? -1 : 1);
@@ -13537,7 +13913,7 @@ Please add \`${key2}Action\` when creating your handler.`);
13537
13913
  });
13538
13914
  React.useEffect(function() {
13539
13915
  var _pickerRollerRef_current, _pickerRollerRef_current1, _pickerRollerRef_current2;
13540
- var options3 = passiveSupported ? {
13916
+ var options3 = exports.passiveSupported ? {
13541
13917
  passive: false
13542
13918
  } : false;
13543
13919
  (_pickerRollerRef_current = pickerRollerRef.current) === null || _pickerRollerRef_current === void 0 ? void 0 : _pickerRollerRef_current.addEventListener("touchstart", handleTouchStart, options3);
@@ -13927,17 +14303,6 @@ Please add \`${key2}Action\` when creating your handler.`);
13927
14303
  })));
13928
14304
  };
13929
14305
  var Picker = /* @__PURE__ */ React.forwardRef(InternalPicker$1);
13930
- var isDate = function(val2) {
13931
- return Object.prototype.toString.call(val2) === "[object Date]" && !Number.isNaN(val2.getTime());
13932
- };
13933
- var padZero = function(num) {
13934
- var targetLength = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 2;
13935
- var str = "".concat(num);
13936
- while (str.length < targetLength) {
13937
- str = "0".concat(str);
13938
- }
13939
- return str;
13940
- };
13941
14306
  function getLastDayOfMonth(year, month) {
13942
14307
  return new Date(year, month, 0).getDate();
13943
14308
  }
@@ -14379,22 +14744,6 @@ Please add \`${key2}Action\` when creating your handler.`);
14379
14744
  };
14380
14745
  DatePickerView.displayName = "NutDatePickerView";
14381
14746
  var Context = React.createContext({});
14382
- function _class_call_check(instance, Constructor) {
14383
- if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
14384
- }
14385
- function _defineProperties(target, props) {
14386
- for (var i2 = 0; i2 < props.length; i2++) {
14387
- var descriptor = props[i2];
14388
- descriptor.enumerable = descriptor.enumerable || false;
14389
- descriptor.configurable = true;
14390
- if ("value" in descriptor) descriptor.writable = true;
14391
- Object.defineProperty(target, descriptor.key, descriptor);
14392
- }
14393
- }
14394
- function _create_class(Constructor, protoProps, staticProps) {
14395
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
14396
- return Constructor;
14397
- }
14398
14747
  function _extends() {
14399
14748
  _extends = Object.assign ? Object.assign.bind() : function(target) {
14400
14749
  for (var i2 = 1; i2 < arguments.length; i2++) {
@@ -15441,60 +15790,6 @@ Please add \`${key2}Action\` when creating your handler.`);
15441
15790
  Schema.warning = warning;
15442
15791
  Schema.messages = messages;
15443
15792
  Schema.validators = validators;
15444
- function merge() {
15445
- for (var _len = arguments.length, items = new Array(_len), _key = 0; _key < _len; _key++) {
15446
- items[_key] = arguments[_key];
15447
- }
15448
- return _merge(items[0] === true, false, items);
15449
- }
15450
- function recursive() {
15451
- for (var _len = arguments.length, items = new Array(_len), _key = 0; _key < _len; _key++) {
15452
- items[_key] = arguments[_key];
15453
- }
15454
- return _merge(items[0] === true, true, items);
15455
- }
15456
- function clone(input) {
15457
- if (Array.isArray(input)) {
15458
- var output = [];
15459
- for (var index2 = 0; index2 < input.length; ++index2) output.push(clone(input[index2]));
15460
- return output;
15461
- }
15462
- if (isPlainObject(input)) {
15463
- var output1 = {};
15464
- for (var index1 in input) output1[index1] = clone(input[index1]);
15465
- return output1;
15466
- }
15467
- return input;
15468
- }
15469
- function isPlainObject(input) {
15470
- if (input === null || (typeof input === "undefined" ? "undefined" : _type_of(input)) !== "object") return false;
15471
- if (Object.getPrototypeOf(input) === null) return true;
15472
- var ref = input;
15473
- while (Object.getPrototypeOf(ref) !== null) ref = Object.getPrototypeOf(ref);
15474
- return Object.getPrototypeOf(input) === ref;
15475
- }
15476
- function _recursiveMerge(base, extend) {
15477
- if (!isPlainObject(base) || !isPlainObject(extend)) return extend;
15478
- for (var key2 in extend) {
15479
- if (key2 === "__proto__" || key2 === "constructor" || key2 === "prototype") continue;
15480
- base[key2] = isPlainObject(base[key2]) && isPlainObject(extend[key2]) ? _recursiveMerge(base[key2], extend[key2]) : extend[key2];
15481
- }
15482
- return base;
15483
- }
15484
- function _merge(isClone, isRecursive, items) {
15485
- var result;
15486
- if (isClone || !isPlainObject(result = items.shift())) result = {};
15487
- for (var index2 = 0; index2 < items.length; ++index2) {
15488
- var item = items[index2];
15489
- if (!isPlainObject(item)) continue;
15490
- for (var key2 in item) {
15491
- if (key2 === "__proto__" || key2 === "constructor" || key2 === "prototype") continue;
15492
- var value2 = isClone ? clone(item[key2]) : item[key2];
15493
- result[key2] = isRecursive ? _recursiveMerge(result[key2], value2) : value2;
15494
- }
15495
- }
15496
- return result;
15497
- }
15498
15793
  var SECRET = "NUT_FORM_INTERNAL";
15499
15794
  var FormStore = /* @__PURE__ */ function() {
15500
15795
  function FormStore2() {
@@ -15973,23 +16268,6 @@ Please add \`${key2}Action\` when creating your handler.`);
15973
16268
  subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
15974
16269
  if (superClass) _set_prototype_of(subClass, superClass);
15975
16270
  }
15976
- function isForwardRefComponent(component) {
15977
- return component.type && component.type.$$typeof && // eslint-disable-next-line react/display-name
15978
- React.forwardRef(
15979
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
15980
- // @ts-ignore
15981
- function() {
15982
- }
15983
- ).$$typeof === component.type.$$typeof;
15984
- }
15985
- function toArray(value2) {
15986
- if (value2 === void 0 || value2 === null) {
15987
- return [];
15988
- }
15989
- return Array.isArray(value2) ? value2 : [
15990
- value2
15991
- ];
15992
- }
15993
16271
  var defaultProps$Z = _object_spread_props(_object_spread({}, ComponentDefaults), {
15994
16272
  required: false,
15995
16273
  name: "",
@@ -16043,7 +16321,7 @@ Please add \`${key2}Action\` when creating your handler.`);
16043
16321
  }), _obj));
16044
16322
  var validateTrigger = _this.props.validateTrigger;
16045
16323
  var mergedValidateTrigger = validateTrigger || _this.context.validateTrigger;
16046
- var validateTriggers = toArray(mergedValidateTrigger);
16324
+ var validateTriggers = toArray$1(mergedValidateTrigger);
16047
16325
  validateTriggers.forEach(function(trigger) {
16048
16326
  var originTrigger = controlled[trigger];
16049
16327
  controlled[trigger] = function() {
@@ -16381,16 +16659,6 @@ Please add \`${key2}Action\` when creating your handler.`);
16381
16659
  })));
16382
16660
  });
16383
16661
  Input.displayName = "NutInput";
16384
- function bound(position2, min, max) {
16385
- var ret = position2;
16386
- if (min !== void 0) {
16387
- ret = Math.max(position2, min);
16388
- }
16389
- if (max !== void 0) {
16390
- ret = Math.min(ret, max);
16391
- }
16392
- return ret;
16393
- }
16394
16662
  var defaultProps$X = _object_spread_props(_object_spread({}, ComponentDefaults), {
16395
16663
  disabled: false,
16396
16664
  readOnly: false,
@@ -18507,14 +18775,56 @@ Please add \`${key2}Action\` when creating your handler.`);
18507
18775
  (_obj2 = {}, _define_property(_obj2, "".concat(classPrefix2, "-close"), !value2), _define_property(_obj2, "".concat(classPrefix2, "-disabled"), disabled), _define_property(_obj2, "".concat(classPrefix2, "-disabled-close"), disabled && !value2), _obj2)
18508
18776
  ]);
18509
18777
  };
18510
- var onClick = function() {
18511
- if (disabled || changing) return;
18512
- if (onChange) {
18513
- setChanging(true);
18514
- onChange(!value2);
18515
- }
18516
- setValue(!value2);
18517
- };
18778
+ var onClick = /* @__PURE__ */ function() {
18779
+ var _ref2 = _async_to_generator(function() {
18780
+ return __generator(this, function(_state) {
18781
+ switch (_state.label) {
18782
+ case 0:
18783
+ if (disabled || changing) return [
18784
+ 2
18785
+ ];
18786
+ if (!onChange) return [
18787
+ 3,
18788
+ 4
18789
+ ];
18790
+ setChanging(true);
18791
+ _state.label = 1;
18792
+ case 1:
18793
+ _state.trys.push([
18794
+ 1,
18795
+ 3,
18796
+ ,
18797
+ 4
18798
+ ]);
18799
+ return [
18800
+ 4,
18801
+ onChange(!value2)
18802
+ ];
18803
+ case 2:
18804
+ _state.sent();
18805
+ return [
18806
+ 3,
18807
+ 4
18808
+ ];
18809
+ case 3:
18810
+ _state.sent();
18811
+ setChanging(false);
18812
+ return [
18813
+ 3,
18814
+ 4
18815
+ ];
18816
+ case 4:
18817
+ setValue(!value2);
18818
+ return [
18819
+ 2
18820
+ ];
18821
+ }
18822
+ });
18823
+ });
18824
+ return function onClick2() {
18825
+ return _ref2.apply(this, arguments);
18826
+ };
18827
+ }();
18518
18828
  var _obj, _obj1;
18519
18829
  return /* @__PURE__ */ React.createElement("div", _object_spread({
18520
18830
  className: classes(),
@@ -18645,28 +18955,6 @@ Please add \`${key2}Action\` when creating your handler.`);
18645
18955
  }, inputValue.length, "/", maxLength < 0 ? 0 : maxLength)));
18646
18956
  };
18647
18957
  TextArea.displayName = "NutTextArea";
18648
- var funcInterceptor = function(interceptor, param) {
18649
- var _param_args = param.args, args = _param_args === void 0 ? [] : _param_args, done = param.done, canceled = param.canceled;
18650
- if (interceptor) {
18651
- var returnVal = interceptor.apply(null, args);
18652
- if (isPromise(returnVal)) {
18653
- returnVal.then(function(value2) {
18654
- if (value2) {
18655
- done(value2);
18656
- } else if (canceled) {
18657
- canceled();
18658
- }
18659
- }).catch(function() {
18660
- });
18661
- } else if (returnVal) {
18662
- done();
18663
- } else if (canceled) {
18664
- canceled();
18665
- }
18666
- } else {
18667
- done();
18668
- }
18669
- };
18670
18958
  var defaultProps$K = _object_spread_props(_object_spread({}, ComponentDefaults), {
18671
18959
  percent: 0,
18672
18960
  showText: false,
@@ -19318,67 +19606,6 @@ Please add \`${key2}Action\` when creating your handler.`);
19318
19606
  };
19319
19607
  ActionSheet.displayName = "NutActionSheet";
19320
19608
  var destroyList = [];
19321
- var fullClone = _object_spread({}, ReactDOM__namespace);
19322
- var version = fullClone.version, reactRender = fullClone.render, unmountComponentAtNode = fullClone.unmountComponentAtNode;
19323
- var createRoot;
19324
- try {
19325
- var mainVersion = Number((version || "").split(".")[0]);
19326
- if (mainVersion >= 18 && fullClone.createRoot) {
19327
- createRoot = fullClone.createRoot;
19328
- }
19329
- } catch (e2) {
19330
- }
19331
- function toggleWarning(skip) {
19332
- var __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = fullClone.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
19333
- if (__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED && (typeof __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED === "undefined" ? "undefined" : _type_of(__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)) === "object") {
19334
- __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.usingClientEntryPoint = skip;
19335
- }
19336
- }
19337
- var MARK = "__nutui_react_root__";
19338
- function legacyRender(node, container) {
19339
- reactRender(node, container);
19340
- }
19341
- function concurrentRender(node, container) {
19342
- toggleWarning(true);
19343
- var root2 = container[MARK] || createRoot(container);
19344
- toggleWarning(false);
19345
- root2.render(node);
19346
- container[MARK] = root2;
19347
- }
19348
- function render(node, container) {
19349
- if (createRoot) {
19350
- concurrentRender(node, container);
19351
- return;
19352
- }
19353
- legacyRender(node, container);
19354
- }
19355
- function legacyUnmount(container) {
19356
- return unmountComponentAtNode(container);
19357
- }
19358
- function concurrentUnmount(container) {
19359
- return _concurrentUnmount.apply(this, arguments);
19360
- }
19361
- function _concurrentUnmount() {
19362
- _concurrentUnmount = _async_to_generator(function(container) {
19363
- return __generator(this, function(_state) {
19364
- return [
19365
- 2,
19366
- Promise.resolve().then(function() {
19367
- var _container_MARK;
19368
- (_container_MARK = container[MARK]) === null || _container_MARK === void 0 ? void 0 : _container_MARK.unmount();
19369
- delete container[MARK];
19370
- })
19371
- ];
19372
- });
19373
- });
19374
- return _concurrentUnmount.apply(this, arguments);
19375
- }
19376
- function unmount(container) {
19377
- if (createRoot) {
19378
- return concurrentUnmount(container);
19379
- }
19380
- return legacyUnmount(container);
19381
- }
19382
19609
  function ConfirmDialog(props) {
19383
19610
  return /* @__PURE__ */ React.createElement(Dialog, props, props.content);
19384
19611
  }
@@ -37839,21 +38066,6 @@ Please add \`${key2}Action\` when creating your handler.`);
37839
38066
  })))), document.body));
37840
38067
  };
37841
38068
  Popover.displayName = "NutPopover";
37842
- function rubberband(distance, dimension, constant) {
37843
- return distance * dimension * constant / (dimension + constant * distance);
37844
- }
37845
- function rubberbandIfOutOfBounds(position2, min, max, dimension) {
37846
- var constant = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0.15;
37847
- if (constant === 0) return bound(position2, min, max);
37848
- if (position2 < min) return -rubberband(min - position2, dimension, constant) + min;
37849
- if (position2 > max) return +rubberband(position2 - max, dimension, constant) + max;
37850
- return position2;
37851
- }
37852
- var sleep = function(time2) {
37853
- return new Promise(function(resolve) {
37854
- return setTimeout(resolve, time2);
37855
- });
37856
- };
37857
38069
  var defaultProps$A = _object_spread_props(_object_spread({}, ComponentDefaults), {
37858
38070
  type: "default",
37859
38071
  pullingText: "",
@@ -38047,7 +38259,7 @@ Please add \`${key2}Action\` when creating your handler.`);
38047
38259
  event.preventDefault();
38048
38260
  }
38049
38261
  event.stopPropagation();
38050
- var height2 = Math.max(rubberbandIfOutOfBounds(y, 0, 0, headHeight * 5, 0.5), 0);
38262
+ var height2 = Math.max(rubberbandIfOutOfBounds$1(y, 0, 0, headHeight * 5, 0.5), 0);
38051
38263
  api.start({
38052
38264
  height: height2
38053
38265
  });
@@ -38059,7 +38271,7 @@ Please add \`${key2}Action\` when creating your handler.`);
38059
38271
  axis: "y",
38060
38272
  target: elementRef,
38061
38273
  enabled: !props.disabled,
38062
- eventOptions: passiveSupported ? {
38274
+ eventOptions: exports.passiveSupported ? {
38063
38275
  passive: false
38064
38276
  } : false
38065
38277
  });
@@ -38167,8 +38379,7 @@ Please add \`${key2}Action\` when creating your handler.`);
38167
38379
  visible: false,
38168
38380
  size: "normal",
38169
38381
  shape: "round",
38170
- duration: 0.6,
38171
- inline: false
38382
+ duration: 0.6
38172
38383
  });
38173
38384
  var Skeleton = function(props) {
38174
38385
  var shapeStyle = function shapeStyle2() {
@@ -42041,7 +42252,7 @@ Please add \`${key2}Action\` when creating your handler.`);
42041
42252
  }));
42042
42253
  };
42043
42254
  var setScale = function(scale2) {
42044
- scale2 = clamp(scale2, 0.3, +maxZoom + 1);
42255
+ scale2 = clamp$2(scale2, 0.3, +maxZoom + 1);
42045
42256
  if (scale2 !== state.scale) {
42046
42257
  setState(_object_spread_props(_object_spread({}, state), {
42047
42258
  scale: scale2
@@ -42087,8 +42298,8 @@ Please add \`${key2}Action\` when creating your handler.`);
42087
42298
  var moveX = deltaX.current * state.scale + startMoveX;
42088
42299
  var moveY = deltaY.current * state.scale + startMoveY;
42089
42300
  setState(_object_spread_props(_object_spread({}, state), {
42090
- moveX: clamp(moveX, -maxMoveX, maxMoveX),
42091
- moveY: clamp(moveY, -maxMoveY, maxMoveY)
42301
+ moveX: clamp$2(moveX, -maxMoveX, maxMoveX),
42302
+ moveY: clamp$2(moveY, -maxMoveY, maxMoveY)
42092
42303
  }));
42093
42304
  }
42094
42305
  if (zooming && touches.length === 2) {
@@ -42104,8 +42315,8 @@ Please add \`${key2}Action\` when creating your handler.`);
42104
42315
  if (!event.touches.length) {
42105
42316
  if (zooming) {
42106
42317
  setState(_object_spread_props(_object_spread({}, state), {
42107
- moveX: clamp(state.moveX, -maxMoveX, maxMoveX),
42108
- moveY: clamp(state.moveY, -maxMoveY, maxMoveY)
42318
+ moveX: clamp$2(state.moveX, -maxMoveX, maxMoveX),
42319
+ moveY: clamp$2(state.moveY, -maxMoveY, maxMoveY)
42109
42320
  }));
42110
42321
  setZooming(false);
42111
42322
  }
@@ -42736,6 +42947,22 @@ Please add \`${key2}Action\` when creating your handler.`);
42736
42947
  });
42737
42948
  };
42738
42949
  WaterMark.displayName = "NutWaterMark";
42950
+ var idCounter = {};
42951
+ function uniqueId() {
42952
+ var prefix2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "$nut$";
42953
+ if (!idCounter[prefix2]) {
42954
+ idCounter[prefix2] = 0;
42955
+ }
42956
+ var id = ++idCounter[prefix2];
42957
+ if (prefix2 === "$nut$") {
42958
+ return "".concat(id);
42959
+ }
42960
+ return "".concat(prefix2).concat(id);
42961
+ }
42962
+ function useUuid() {
42963
+ var idRef = React.useRef(uniqueId());
42964
+ return idRef.current;
42965
+ }
42739
42966
  exports.ActionSheet = ActionSheet;
42740
42967
  exports.Address = Address;
42741
42968
  exports.Animate = Animate;
@@ -42761,6 +42988,7 @@ Please add \`${key2}Action\` when creating your handler.`);
42761
42988
  exports.Col = Col;
42762
42989
  exports.Collapse = Collapse;
42763
42990
  exports.CollapseItem = CollapseItem;
42991
+ exports.ComponentDefaults = ComponentDefaults;
42764
42992
  exports.ConfigProvider = ConfigProvider;
42765
42993
  exports.CountDown = CountDown;
42766
42994
  exports.DatePicker = DatePicker;
@@ -42789,6 +43017,7 @@ Please add \`${key2}Action\` when creating your handler.`);
42789
43017
  exports.Lottie = Lottie;
42790
43018
  exports.Menu = Menu;
42791
43019
  exports.MenuItem = MenuItem;
43020
+ exports.MiniLru = MiniLru;
42792
43021
  exports.NavBar = NavBar;
42793
43022
  exports.NoticeBar = NoticeBar;
42794
43023
  exports.Notify = Notify;
@@ -42837,13 +43066,63 @@ Please add \`${key2}Action\` when creating your handler.`);
42837
43066
  exports.Tour = Tour;
42838
43067
  exports.TrendArrow = TrendArrow;
42839
43068
  exports.Uploader = Uploader;
43069
+ exports.Utils = Utils;
42840
43070
  exports.Video = Video;
42841
43071
  exports.VirtualList = VirtualList;
42842
43072
  exports.WaterMark = WaterMark;
43073
+ exports.bound = bound;
43074
+ exports.camelCase = camelCase;
43075
+ exports.canUseDom = canUseDom;
43076
+ exports.cancelRaf = cancelRaf;
43077
+ exports.clamp = clamp$2;
43078
+ exports.clone = clone;
42843
43079
  exports.destroyList = destroyList;
43080
+ exports.funcInterceptor = funcInterceptor;
43081
+ exports.getAllScrollableParents = getAllScrollableParents;
43082
+ exports.getCurrMonthData = getCurrMonthData;
43083
+ exports.getDaysStatus = getDaysStatus;
42844
43084
  exports.getDefaultConfig = getDefaultConfig;
43085
+ exports.getPreMonthDates = getPreMonthDates;
43086
+ exports.getRect = getRect;
43087
+ exports.getRefValue = getRefValue;
43088
+ exports.getScrollParent = getScrollParent;
43089
+ exports.inBrowser = inBrowser;
43090
+ exports.isDate = isDate;
43091
+ exports.isEmpty = isEmpty;
43092
+ exports.isForwardRefComponent = isForwardRefComponent;
43093
+ exports.isFunction = isFunction;
43094
+ exports.isObject = isObject;
43095
+ exports.isPlainObject = isPlainObject;
43096
+ exports.isPromise = isPromise;
43097
+ exports.isWindow = isWindow;
43098
+ exports.main = main;
43099
+ exports.merge = merge;
43100
+ exports.mergeProp = mergeProp;
43101
+ exports.mergeProps = mergeProps;
43102
+ exports.padZero = padZero;
43103
+ exports.preventDefault = preventDefault$1;
43104
+ exports.pxCheck = pxCheck;
43105
+ exports.recursive = recursive;
43106
+ exports.render = render;
43107
+ exports.rubberband = rubberband$1;
43108
+ exports.rubberbandIfOutOfBounds = rubberbandIfOutOfBounds$1;
42845
43109
  exports.setDefaultConfig = setDefaultConfig;
43110
+ exports.sleep = sleep;
43111
+ exports.toArray = toArray$1;
43112
+ exports.unmount = unmount;
43113
+ exports.upperCaseFirst = upperCaseFirst;
42846
43114
  exports.useConfig = useConfig;
43115
+ exports.useForceUpdate = useForceUpdate;
43116
+ exports.useIsomorphicLayoutEffect = useIsomorphicLayoutEffect;
43117
+ exports.useLockScroll = useLockScroll;
43118
+ exports.useMemo = useMemo;
43119
+ exports.usePagination = usePagination;
43120
+ exports.usePropsValue = usePropsValue;
43121
+ exports.useRefState = useRefState;
43122
+ exports.useRefs = useRefs;
42847
43123
  exports.useRtl = useRtl;
43124
+ exports.useTouch = useTouch;
43125
+ exports.useUuid = useUuid;
43126
+ exports.useWatch = useWatch$1;
42848
43127
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
42849
43128
  });