@arco-design/mobile-react 2.25.2 → 2.25.3
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.
- package/CHANGELOG.md +12 -0
- package/README.en-US.md +2 -2
- package/README.md +2 -2
- package/cjs/image-preview/index.js +6 -3
- package/cjs/nav-bar/index.d.ts +5 -0
- package/cjs/nav-bar/index.js +4 -2
- package/dist/index.js +11 -6
- package/dist/index.min.js +1 -1
- package/esm/image-preview/index.js +6 -3
- package/esm/nav-bar/index.d.ts +5 -0
- package/esm/nav-bar/index.js +4 -2
- package/package.json +3 -3
- package/umd/image-preview/index.js +6 -3
- package/umd/nav-bar/index.d.ts +5 -0
- package/umd/nav-bar/index.js +4 -2
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,18 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
## [2.25.3](https://github.com/arco-design/arco-design-mobile/compare/@arco-design/mobile-react@2.25.2...@arco-design/mobile-react@2.25.3) (2023-02-10)
|
7
|
+
|
8
|
+
|
9
|
+
### Bug Fixes
|
10
|
+
|
11
|
+
* `ImagePreview` fix display problems when passing fit layout ([#91](https://github.com/arco-design/arco-design-mobile/issues/91)) ([244107f](https://github.com/arco-design/arco-design-mobile/commit/244107fa4764141e8e57e871cad60f19f0592706))
|
12
|
+
* `NavBar` support the prop 'onScrollChange' ([46f2a5c](https://github.com/arco-design/arco-design-mobile/commit/46f2a5cf6afa5abec235d9d6311f40c19f8c1bc0))
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
|
6
18
|
## [2.25.2](https://github.com/arco-design/arco-design-mobile/compare/@arco-design/mobile-react@2.25.1...@arco-design/mobile-react@2.25.2) (2023-02-08)
|
7
19
|
|
8
20
|
|
package/README.en-US.md
CHANGED
@@ -59,8 +59,8 @@ React & ReactDOM: **<a href="https://reactjs.org/docs/cdn-links.html" target="_b
|
|
59
59
|
React Transition Group: **<a href="https://reactcommunity.org/react-transition-group/" target="_blank">Click here</a>**
|
60
60
|
|
61
61
|
```
|
62
|
-
<link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.25.
|
63
|
-
<script src="https://unpkg.com/@arco-design/mobile-react@2.25.
|
62
|
+
<link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.25.2/dist/style.min.css">
|
63
|
+
<script src="https://unpkg.com/@arco-design/mobile-react@2.25.2/dist/index.min.js"></script>
|
64
64
|
```
|
65
65
|
|
66
66
|
## Full import
|
package/README.md
CHANGED
@@ -59,8 +59,8 @@ React & ReactDOM: **<a href="https://reactjs.org/docs/cdn-links.html" target="
|
|
59
59
|
React Transition Group: **<a href="https://reactcommunity.org/react-transition-group/" target="_blank">戳这里获取</a>**
|
60
60
|
|
61
61
|
```
|
62
|
-
<link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.25.
|
63
|
-
<script src="https://unpkg.com/@arco-design/mobile-react@2.25.
|
62
|
+
<link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.25.2/dist/style.min.css">
|
63
|
+
<script src="https://unpkg.com/@arco-design/mobile-react@2.25.2/dist/index.min.js"></script>
|
64
64
|
```
|
65
65
|
|
66
66
|
## 引入全部
|
@@ -752,7 +752,7 @@ var ImagePreview = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
752
752
|
// @en In iOS when resetting the style, the image will disappear and cause flickering, so put a image at the bottom
|
753
753
|
// 优先过渡图,其次用原图
|
754
754
|
// @en Prioritize the transition image, followed by the original image
|
755
|
-
function renderImagePlaceholder(src, index) {
|
755
|
+
function renderImagePlaceholder(src, index, fitCss) {
|
756
756
|
var _ref2 = imagesStatus[index] || {},
|
757
757
|
originWidth = _ref2.originWidth,
|
758
758
|
originHeight = _ref2.originHeight,
|
@@ -762,6 +762,9 @@ var ImagePreview = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
762
762
|
var trans = hasOverflow ? {} : (0, _helpers.getStyleWithVendor)({
|
763
763
|
transform: 'translateY(-50%)'
|
764
764
|
});
|
765
|
+
var fitObj = fitCss ? {
|
766
|
+
objectFit: fitCss
|
767
|
+
} : {};
|
765
768
|
return system === 'ios' && showPlaceholders[index] && originWidth && originHeight ? /*#__PURE__*/_react.default.createElement("img", {
|
766
769
|
src: src,
|
767
770
|
style: (0, _extends5.default)({
|
@@ -770,7 +773,7 @@ var ImagePreview = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
770
773
|
height: originHeight,
|
771
774
|
left: originLeft,
|
772
775
|
top: originTop
|
773
|
-
}, trans)
|
776
|
+
}, fitObj, trans)
|
774
777
|
}) : null;
|
775
778
|
}
|
776
779
|
function renderLoadingArea(index) {
|
@@ -836,7 +839,7 @@ var ImagePreview = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
836
839
|
animateDuration: transImageInfo ? 0 : void 0,
|
837
840
|
style: getImageStyle(),
|
838
841
|
className: getImageClass(index),
|
839
|
-
bottomOverlap: renderImagePlaceholder(image.fallbackSrc || image.src, index),
|
842
|
+
bottomOverlap: renderImagePlaceholder(image.fallbackSrc || image.src, index, image.fit || fit),
|
840
843
|
onLoad: function onLoad(_, imageEle) {
|
841
844
|
imageDomsRef.current[index] = imageEle;
|
842
845
|
setImagesStatusByIndex(index, {
|
package/cjs/nav-bar/index.d.ts
CHANGED
@@ -105,6 +105,11 @@ export interface NavBarProps {
|
|
105
105
|
* @en Set a custom style according to the scroll offset value. After setting this property, the scroll event of the scroll container will be monitored.
|
106
106
|
*/
|
107
107
|
getComputedStyleByScroll?: (offset: number) => CSSProperties;
|
108
|
+
/**
|
109
|
+
* 滚动时回调,设置该属性后将监听滚动容器的滚动事件
|
110
|
+
* @en Callback when scrolling. After setting this property, the scroll event of the scroll container will be monitored.
|
111
|
+
*/
|
112
|
+
onScrollChange?: (offset: number) => void;
|
108
113
|
/**
|
109
114
|
* 无障碍aria-label属性
|
110
115
|
* @en Accessibility attribute aria-label
|
package/cjs/nav-bar/index.js
CHANGED
@@ -45,6 +45,7 @@ var NavBar = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
45
45
|
getScrollContainer = props.getScrollContainer,
|
46
46
|
_props$showOffset = props.showOffset,
|
47
47
|
showOffset = _props$showOffset === void 0 ? 0 : _props$showOffset,
|
48
|
+
onScrollChange = props.onScrollChange,
|
48
49
|
getComputedStyleByScroll = props.getComputedStyleByScroll,
|
49
50
|
_props$ariaLabel = props.ariaLabel,
|
50
51
|
ariaLabel = _props$ariaLabel === void 0 ? '' : _props$ariaLabel,
|
@@ -61,6 +62,7 @@ var NavBar = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
61
62
|
var system = (0, _helpers.useSystem)();
|
62
63
|
var onElementScroll = function onElementScroll(curOffset) {
|
63
64
|
setScrollToggleHide(curOffset < showOffset);
|
65
|
+
onScrollChange == null ? void 0 : onScrollChange(curOffset);
|
64
66
|
if (getComputedStyleByScroll) {
|
65
67
|
var cstyle = getComputedStyleByScroll(curOffset);
|
66
68
|
setCustomStyle(cstyle);
|
@@ -80,7 +82,7 @@ var NavBar = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
80
82
|
onElementScroll(top);
|
81
83
|
};
|
82
84
|
(0, _react.useEffect)(function () {
|
83
|
-
var needBind = showOffset || getComputedStyleByScroll;
|
85
|
+
var needBind = showOffset || getComputedStyleByScroll || onScrollChange;
|
84
86
|
var container = (0, _mobileUtils.getValidScrollContainer)(getScrollContainer);
|
85
87
|
handleEleScroll();
|
86
88
|
if (needBind && container) {
|
@@ -91,7 +93,7 @@ var NavBar = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
91
93
|
container.removeEventListener('scroll', handleEleScroll, false);
|
92
94
|
}
|
93
95
|
};
|
94
|
-
}, [showOffset, getComputedStyleByScroll, getScrollContainer]);
|
96
|
+
}, [showOffset, getComputedStyleByScroll, onScrollChange, getScrollContainer]);
|
95
97
|
function handleClickLeft(e) {
|
96
98
|
if (onClickLeft) {
|
97
99
|
onClickLeft(e);
|
package/dist/index.js
CHANGED
@@ -20308,7 +20308,7 @@
|
|
20308
20308
|
// @en In iOS when resetting the style, the image will disappear and cause flickering, so put a image at the bottom
|
20309
20309
|
// 优先过渡图,其次用原图
|
20310
20310
|
// @en Prioritize the transition image, followed by the original image
|
20311
|
-
function renderImagePlaceholder(src, index) {
|
20311
|
+
function renderImagePlaceholder(src, index, fitCss) {
|
20312
20312
|
var _a = imagesStatus[index] || {},
|
20313
20313
|
originWidth = _a.originWidth,
|
20314
20314
|
originHeight = _a.originHeight,
|
@@ -20318,15 +20318,18 @@
|
|
20318
20318
|
var trans = hasOverflow ? {} : getStyleWithVendor({
|
20319
20319
|
transform: 'translateY(-50%)'
|
20320
20320
|
});
|
20321
|
+
var fitObj = fitCss ? {
|
20322
|
+
objectFit: fitCss
|
20323
|
+
} : {};
|
20321
20324
|
return system === 'ios' && showPlaceholders[index] && originWidth && originHeight ? /*#__PURE__*/React__default["default"].createElement("img", {
|
20322
20325
|
src: src,
|
20323
|
-
style: __assign$2({
|
20326
|
+
style: __assign$2(__assign$2({
|
20324
20327
|
position: 'absolute',
|
20325
20328
|
width: originWidth,
|
20326
20329
|
height: originHeight,
|
20327
20330
|
left: originLeft,
|
20328
20331
|
top: originTop
|
20329
|
-
}, trans)
|
20332
|
+
}, fitObj), trans)
|
20330
20333
|
}) : null;
|
20331
20334
|
}
|
20332
20335
|
function renderLoadingArea(index) {
|
@@ -20392,7 +20395,7 @@
|
|
20392
20395
|
animateDuration: transImageInfo ? 0 : void 0,
|
20393
20396
|
style: getImageStyle(),
|
20394
20397
|
className: getImageClass(index),
|
20395
|
-
bottomOverlap: renderImagePlaceholder(image.fallbackSrc || image.src, index),
|
20398
|
+
bottomOverlap: renderImagePlaceholder(image.fallbackSrc || image.src, index, image.fit || fit),
|
20396
20399
|
onLoad: function onLoad(_, imageEle) {
|
20397
20400
|
imageDomsRef.current[index] = imageEle;
|
20398
20401
|
setImagesStatusByIndex(index, {
|
@@ -20676,6 +20679,7 @@
|
|
20676
20679
|
getScrollContainer = props.getScrollContainer,
|
20677
20680
|
_h = props.showOffset,
|
20678
20681
|
showOffset = _h === void 0 ? 0 : _h,
|
20682
|
+
onScrollChange = props.onScrollChange,
|
20679
20683
|
getComputedStyleByScroll = props.getComputedStyleByScroll,
|
20680
20684
|
_j = props.ariaLabel,
|
20681
20685
|
ariaLabel = _j === void 0 ? '' : _j,
|
@@ -20692,6 +20696,7 @@
|
|
20692
20696
|
var system = useSystem();
|
20693
20697
|
var onElementScroll = function onElementScroll(curOffset) {
|
20694
20698
|
setScrollToggleHide(curOffset < showOffset);
|
20699
|
+
onScrollChange === null || onScrollChange === void 0 ? void 0 : onScrollChange(curOffset);
|
20695
20700
|
if (getComputedStyleByScroll) {
|
20696
20701
|
var cstyle = getComputedStyleByScroll(curOffset);
|
20697
20702
|
setCustomStyle(cstyle);
|
@@ -20711,7 +20716,7 @@
|
|
20711
20716
|
onElementScroll(top);
|
20712
20717
|
};
|
20713
20718
|
React.useEffect(function () {
|
20714
|
-
var needBind = showOffset || getComputedStyleByScroll;
|
20719
|
+
var needBind = showOffset || getComputedStyleByScroll || onScrollChange;
|
20715
20720
|
var container = getValidScrollContainer(getScrollContainer);
|
20716
20721
|
handleEleScroll();
|
20717
20722
|
if (needBind && container) {
|
@@ -20722,7 +20727,7 @@
|
|
20722
20727
|
container.removeEventListener('scroll', handleEleScroll, false);
|
20723
20728
|
}
|
20724
20729
|
};
|
20725
|
-
}, [showOffset, getComputedStyleByScroll, getScrollContainer]);
|
20730
|
+
}, [showOffset, getComputedStyleByScroll, onScrollChange, getScrollContainer]);
|
20726
20731
|
function handleClickLeft(e) {
|
20727
20732
|
if (onClickLeft) {
|
20728
20733
|
onClickLeft(e);
|
package/dist/index.min.js
CHANGED
@@ -19,4 +19,4 @@ e.exports=function(){function e(e){var t=typeof e;return null!==e&&("object"===t
|
|
19
19
|
* @arco-design/transformable v1.0.1
|
20
20
|
* (c) 2022 ludan.kibbon
|
21
21
|
*/
|
22
|
-
function pi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gi(){return gi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gi.apply(this,arguments)}var bi=17,yi="always",Ei="hybrid",wi="animation",Ci="translate-first",xi="scale-first";function Ti(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function Ni(e){return e instanceof Number?[e]:[].concat(e instanceof Array?e:e.valueOf())}var ki=function(){function e(t){var n=this;pi(this,"operatorAdd",(function(t){var r=(t=Ni(t)).length>=n.x.length?[t,n.x]:[n.x,t];return new e(r[0].map((function(e,t){return e+(void 0!==r[1][t]?r[1][t]:r[1][0])})))})),pi(this,"operatorSub",(function(t){var r=(t=Ni(t)).length>n.x.length?[t,n.x]:[n.x,t];return new e(r[0].map((function(e,t){return e-(void 0!==r[1][t]?r[1][t]:r[1][0])})))})),pi(this,"operatorMul",(function(t){var r=(t=Ni(t)).length>n.x.length?[t,n.x]:[n.x,t];return new e(r[0].map((function(e,t){return e*(void 0!==r[1][t]?r[1][t]:r[1][0])})))})),pi(this,"operatorDiv",(function(t){var r=(t=Ni(t)).length>n.x.length?[t,n.x]:[n.x,t];return new e(r[0].map((function(e,t){return e/(void 0!==r[1][t]?r[1][t]:r[1][0])})))})),this.x=Ni(t)||[]}var t=e.prototype;return t.get=function(e){return this.x[e]},t.v=function(){return[].concat(this.x)},t.size=function(){return this.x.length},t.valueOf=function(){return this.x.valueOf()},t.toString=function(){return this.x.toString()},t.mul=function(e){if((e=this.convert(e)).length!==this.x.length)throw new Error("Can not process vector inner-product, input vector dim "+e.length+" don't match resource vector dim "+this.x.length);var t=0;return this.x.forEach((function(n,r){return t+=n+e[r]})),t},e}();function Si(e,t){return"number"==typeof e?{R:e,I:0}:e.isComplex?e:{R:t,I:0}}var Ri=function(){function e(t,n){var r=this;void 0===n&&(n=0),pi(this,"operatorAdd",(function(t){return t=Si(t,0),new e(r.R+t.R,r.I+t.I)})),pi(this,"operatorSub",(function(t){return t=Si(t,0),new e(r.R-t.R,r.I-t.I)})),pi(this,"operatorMul",(function(t){return t=Si(t,1),new e(r.R*t.R-r.I*t.I,r.I*t.R+r.R*t.I)})),pi(this,"operatorDiv",(function(t){t=Si(t,1);var n=Math.pow(t.R,2)+Math.pow(t.I,2);return new e((r.R*t.R+r.I*t.I)/n,(r.I*t.R-r.R*t.I)/n)})),pi(this,"operatorPow",(function(t){var n=r.z();if(0===n)return new e(0);var o=Math.acos(r.R/n)*t;return new e((n=Math.pow(n,t))*Math.cos(o),n*Math.sin(o))})),"number"==typeof t?(this.R=Number(t),this.I=Number(n)):t.isComplex&&(this.R=t.r(),this.I=t.i()),this.isComplex=!0}var t=e.prototype;return t.valueOf=function(){return this.R.valueOf()},t.toString=function(){return this.R.toFixed(3)+"+"+this.I.toFixed(3)+"i"},t.isNaN=function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){return isNaN(this.R)||isNaN(this.I)})),t.isReal=function(){return 0===this.I&&!this.isNaN()},t.inRangeR=function(e,t){return this.R<=t&&this.R>=e},t.inRangeI=function(e,t){return this.I<=t&&this.I>=e},t.setR=function(e){this.R=Number(e)},t.setI=function(e){this.I=Number(e)},t.r=function(){return this.R},t.i=function(){return this.I},t.z=function(){return Math.sqrt(Math.pow(this.R,2)+Math.pow(this.I,2))},t.theta=function(){var e=this.z();return Math.acos(this.R/e)},e}(),Mi={add:function(e,t){return e.operatorAdd?e.operatorAdd(t):e+t},sub:function(e,t){return e.operatorSub?e.operatorSub(t):e-t},mul:function(e,t){return e.operatorMul?e.operatorMul(t):e*t},div:function(e,t){return e.operatorDiv?e.operatorDiv(t):e/t},pow:function(e,t){return e.operatorPow?e.operatorPow(t):Math.pow(e,t)},binaryAnd:function(e,t){return e.operatorBinaryAnd?e.operatorBinaryAnd(t):e&t},binaryOr:function(e,t){return e.operatorBinaryOr?e.operatorBinaryOr(t):e|t},binaryXor:function(e,t){return e.operatorBinaryXor?e.operatorBinaryXor(t):e^t},binaryLShift:function(e,t){return e.operatorBinaryLShift?e.operatorBinaryLShift(t):e<<t},binaryRShift:function(e,t){return e.operatorBinaryRShift?e.operatorBinaryRShift(t):e>>t},less:function(e,t){return e.operatorLess?e.operatorLess(t):t.operatorGreater?t.operatorGreater(e):e.operatorGreaterEqual?!e.operatorGreaterEqual(t):e<t},greater:function(e,t){return e.operatorGreater?e.operatorGreater(t):t.operatorLess?t.operatorLess(e):e.operatorLessEqual?!e.operatorLessEqual(t):e>t},lessEqual:function(e,t){return e.operatorLessEqual?e.operatorLessEqual(t):t.operatorGreaterEqual?t.operatorGreaterEqual(e):e.operatorGreater?!e.operatorGreater(t):e<=t},greaterEqual:function(e,t){return e.operatorGreaterEqual?e.operatorGreaterEqual(t):t.operatorLessEqual?t.operatorLessEqual(e):e.operatorLess?!e.operatorLess(t):e>=t},equal:function(e,t){return e.operatorEqual?e.operatorEqual(t):e.operatorNotEqual?!e.operatorNotEqual(t):t.operatorEqual?t.operatorEqual(e):t.operatorNotEqual?!t.operatorNotEqual(e):e==t},notEqual:function(e,t){return e.operatorNotEqual?e.operatorNotEqual(t):e.operatorEqual?!e.operatorEqual(t):t.operatorNotEqual?t.operatorNotEqual(e):t.operatorEqual?!t.operatorEqual(e):e!=t}};function Li(e){return e>=0?Math.sqrt(e):new Ri(0,Math.sqrt(-e))}var Oi=Math.sqrt(3),_i=Math.pow(2,1/3),Ii=Li(-1),Bi=new Ri(0).operatorSub(Ii);function Ai(e,t,n,r){if(void 0===r&&(r=!0),t===n&&0===t)return Math.pow(e,Mi.div(1,3));var o=function(e,t,n){var r=-3*t+3*n-1,o=-(2*t-n)/r,i=-9*Math.pow(t,2)+9*n*t+9*t-9*Math.pow(n,2),a=3*r,l=_i*a,u=54*Math.pow(t,3)-243*e*Math.pow(t,2)-81*n*Math.pow(t,2)+162*Math.pow(t,2)-81*Math.pow(n,2)*t-162*e*t+486*e*n*t-81*n*t+54*Math.pow(n,3)-243*e*Math.pow(n,2)-27*e+162*e*n;return[4*Math.pow(i,3)+Math.pow(u,2),u,o,i,a,l]}(e,t,n),i=o[0],a=o[1],l=o[2],u=o[3],c=o[4],s=o[5],d=Mi.pow(new Ri(Mi.add(Li(i),a)),Mi.div(1,3)),f=Mi.add(Mi.sub(Mi.div(d,s),Mi.div(new Ri(Mi.mul(_i,u)),Mi.mul(d,c))),l),v=[];Mi.lessEqual(i,1e-12)?([f,Mi.add(Mi.add(Mi.div(Mi.mul(Mi.sub(Mi.mul(Ii,Oi),1),d),Mi.mul(2,s)),Mi.div(Mi.mul(Mi.add(Mi.mul(Ii,Oi),1),u),Mi.mul(Mi.mul(d,s),_i))),l),Mi.add(Mi.add(Mi.div(Mi.mul(Mi.sub(Mi.mul(Bi,Oi),1),d),Mi.mul(2,s)),Mi.div(Mi.mul(Mi.add(Mi.mul(Bi,Oi),1),u),Mi.mul(Mi.mul(d,s),_i))),l)].forEach((function(e){e.inRangeR(0,1)&&v.push(e.r())})),v.sort()):v.push(f.r());return r?v[0]:v}var Di={add:function(e,t){return e.operatorAdd?e.operatorAdd(t):e+t},sub:function(e,t){return e.operatorSub?e.operatorSub(t):e-t},mul:function(e,t){return e.operatorMul?e.operatorMul(t):e*t},div:function(e,t){return e.operatorDiv?e.operatorDiv(t):e/t},pow:function(e,t){return e.operatorPow?e.operatorPow(t):Math.pow(e,t)},binaryAnd:function(e,t){return e.operatorBinaryAnd?e.operatorBinaryAnd(t):e&t},binaryOr:function(e,t){return e.operatorBinaryOr?e.operatorBinaryOr(t):e|t},binaryXor:function(e,t){return e.operatorBinaryXor?e.operatorBinaryXor(t):e^t},binaryLShift:function(e,t){return e.operatorBinaryLShift?e.operatorBinaryLShift(t):e<<t},binaryRShift:function(e,t){return e.operatorBinaryRShift?e.operatorBinaryRShift(t):e>>t},less:function(e,t){return e.operatorLess?e.operatorLess(t):t.operatorGreater?t.operatorGreater(e):e.operatorGreaterEqual?!e.operatorGreaterEqual(t):e<t},greater:function(e,t){return e.operatorGreater?e.operatorGreater(t):t.operatorLess?t.operatorLess(e):e.operatorLessEqual?!e.operatorLessEqual(t):e>t},lessEqual:function(e,t){return e.operatorLessEqual?e.operatorLessEqual(t):t.operatorGreaterEqual?t.operatorGreaterEqual(e):e.operatorGreater?!e.operatorGreater(t):e<=t},greaterEqual:function(e,t){return e.operatorGreaterEqual?e.operatorGreaterEqual(t):t.operatorLessEqual?t.operatorLessEqual(e):e.operatorLess?!e.operatorLess(t):e>=t},equal:function(e,t){return e.operatorEqual?e.operatorEqual(t):e.operatorNotEqual?!e.operatorNotEqual(t):t.operatorEqual?t.operatorEqual(e):t.operatorNotEqual?!t.operatorNotEqual(e):e==t},notEqual:function(e,t){return e.operatorNotEqual?e.operatorNotEqual(t):e.operatorEqual?!e.operatorEqual(t):t.operatorNotEqual?t.operatorNotEqual(e):t.operatorEqual?!t.operatorEqual(e):e!=t}};function Pi(e,t,n){void 0===n&&(n="x");var r=e[0],o=e[1],i=e[2],a=e[3],l="x"===n?Ai(t,r,i):"y"===n?Ai(t,o,a):t,u=function(e,t){return Di.add(Di.mul(Di.sub(t,e),l),e)},c=new ki([0,0]),s=new ki([r,o]),d=new ki([i,a]),f=new ki([1,1]),v=u(c,s),m=u(s,d),h=u(d,f),p=u(v,m),g=u(m,h),b=u(p,g),y=[v,p].map((function(e){return Di.div(e,Di.add(b,1e-9))})),E=y[0],w=y[1],C=[g,h].map((function(e){return Di.div(Di.sub(e,b),Di.add(Di.sub(f,b),1e-9))})),x=C[0],T=C[1];return[[].concat(E.v(),w.v()),[].concat(x.v(),T.v())]}function Hi(e,t,n){return 3*e*n*Math.pow(1-n,2)+3*t*(1-n)*Math.pow(n,2)+Math.pow(n,3)}function Fi(e,t,n){void 0===n&&(n="x");var r=e[0],o=e[1],i=e[2],a=e[3],l=0===t?0:1===t?1:"x"===n?Ai(t,r,i):"y"===n?Ai(t,o,a):t;return["x"===n?t:Hi(r,i,l),"y"===n?t:Hi(o,a,l)]}function Vi(e){return window.requestAnimationFrame?window.requestAnimationFrame(e):setTimeout(e,bi)}function ji(e){return window.requestAnimationFrame?window.cancelAnimationFrame(e):clearTimeout(e,bi)}var zi=function(){function e(e){var t=this;void 0===e&&(e={}),pi(this,"setBounce",(function(e){!isNaN(e)&&(t.bouncing=Number(e))})),pi(this,"setDamp",(function(e){void 0===e&&(e=0),!isNaN(e)&&(t.damp=Number(e))})),pi(this,"setTransform",(function(e,n){if(void 0===e&&(e={}),void 0===n&&(n={}),t.fixedX&&e.translateX&&delete e.translateX,t.fixedY&&e.translateY&&delete e.translateY,n.merge){["translateX","translateY","scale"].forEach((function(n){void 0!==e[n]&&(t.transform[n]=parseFloat(e[n]))}));var r=e.transformOrigin;r instanceof Array&&2===r.length&&(t.transform.transformOrigin=r.map((function(e){return parseFloat(e)})))}else t.transform=gi({},e);return n.silent||t.update(),t})),pi(this,"on",(function(e,n){if(n&&"function"==typeof n){var r="on"+e[0].toUpperCase()+e.slice(1);t[r]?t[r]="onTransform"===r?function(){return n(gi({},t.transform),{complete:!t.busy(),dirty:t.dirty()})}:n:console.warn("[Transform]Unsupport event:",e)}return t})),pi(this,"restore",(function(e){if(!e){var n=t.transform;Vi((function(){t.onRestore(n)}))}t.dragMode===yi?t.zoomTo(1,{fitEdge:!0}):t.setTransform({},{merge:!1,silent:e})})),pi(this,"getTransform",(function(e){switch(e){case"css":return t.toCSS();case"style":return t.toStyle();default:return gi({},t.transform)}})),pi(this,"dirty",(function(){var e=t.transform,n=e.translateX,r=void 0===n?0:n,o=e.translateY,i=void 0===o?0:o,a=e.scale;return 0!==r||0!==i||1!==(void 0===a?1:a)})),pi(this,"busy",(function(){return!t.disableContentTouch||t.cancelSwipe||t.animating})),pi(this,"isTapStop",(function(){return t.isTapStopped})),pi(this,"apply",(function(){if(t.dom){var e=t.toCSS();t.dom.style.transform=e.transform||"",t.dom.style.webkitTransform=e.transform||"",t.dom.style.transformOrigin=e.transformOrigin||"center center",t.dom.style.webkitTransformOrigin=e.transformOrigin||"center center"}t.onTransform(),t.timer=0})),pi(this,"update",(function(){ji(t.timer),t.timer=Vi(t.apply),t.lastTransform=gi({},t.transform)})),pi(this,"cancel",(function(){ji(t.timer),t.transform=gi({},t.lastTransform)})),pi(this,"toTop",(function(){var e=t.transform.scale,n=void 0===e?1:e,r=t._remainToEdge(1,1)[1];return Math.round(Math.abs(r/n))})),pi(this,"toBottom",(function(){var e=t.transform.scale,n=void 0===e?1:e,r=t._remainToEdge(1,-1)[1];return Math.round(Math.abs(r/n))})),pi(this,"toLeft",(function(){var e=t.transform.scale,n=void 0===e?1:e,r=t._remainToEdge(1,1)[0];return Math.round(Math.abs(r/n))})),pi(this,"toRight",(function(){var e=t.transform.scale,n=void 0===e?1:e,r=t._remainToEdge(-1,1)[0];return Math.round(Math.abs(r/n))})),pi(this,"getOriginXY",(function(e){var n=e[0],r=e[1],o=t._getTransformedBounding(),i=o.left,a=o.top,l=t.transform.scale,u=void 0===l?1:l;return[(n-i)/u,(r-a)/u]})),pi(this,"setScreenCenter",(function(e,n,r){var o=t.getOriginXY([e,n]),i=o[0],a=o[1];return t.setCenter(i,a,r)})),pi(this,"setCenter",(function(e,n,r){var o=t.transform,i=t.fixedX,a=t.fixedY,l=t.boundingRect,u=t.viewport,c=o.translateX,s=void 0===c?0:c,d=o.translateY,f=void 0===d?0:d,v=o.scale,m=void 0===v?1:v,h=o.transformOrigin,p=l||u,g=p.top,b=p.bottom,y=p.left,E=p.right;if(h||(h=[(E-y)/2,(b-g)/2]),!i){var w=e-h[0];e=h[0]+w,o.translateX=s+w*(m-1)/m,h[0]=e}if(!a){var C=n-h[1];n=h[1]+C,o.translateY=f+C*(m-1)/m,h[1]=n}o.transformOrigin=h,r&&t.update()})),pi(this,"zoomToScreenCenter",(function(e,n,r){void 0===r&&(r={});var o=n[0],i=n[1];t.setScreenCenter(o,i,!0),Vi((function(){return Vi((function(){t.zoomTo(e,gi({fitEdge:!0},r))}))}))})),pi(this,"zoomToCenter",(function(e,n,r){void 0===r&&(r={});var o=n[0],i=n[1];t.setCenter(o,i,!0),Vi((function(){return Vi((function(){t.zoomTo(e,gi({fitEdge:!0},r))}))}))})),pi(this,"zoomTo",(function(e,n){void 0===n&&(n={});var r=n,o=r.transition,i=void 0===o?"all":o,a=r.easingFunc,l=void 0===a?"ease-out":a,u=r.duration,c=void 0===u?0:u,s=r.silent,d=void 0===s||s,f=r.fitEdge,v=void 0!==f&&f,m=r.callback,h=t.maxScale,p=void 0===h?1:h,g=t.minScale,b=void 0===g?1:g,y=t.transform,E=y.scale,w=void 0===E?1:E,C=y.translateX,x=void 0===C?0:C,T=y.translateY,N=void 0===T?0:T,k=Math.max(Math.min(e,p),b),S=k/w;t.transform.scale=k,t.transform.translateX=x/S,t.transform.translateY=N/S,v&&t.fit(!1),t.dom&&c?(t.dom.style.transition=i+" "+c+"ms "+l,t.animating=!0,setTimeout((function(){t.dom.style.transition="",t.animating=!1,!d&&t.onZoomEnd(null,k),"function"==typeof m&&m(k)}),c)):"function"==typeof m&&m(k),t.update()})),pi(this,"zoom",(function(e,n){void 0===e&&(e=1),void 0===n&&(n={});var r=t.transform.scale,o=void 0===r?1:r;t.zoomTo(o*e,n)})),pi(this,"drag",(function(e,n,r,o,i){var a=t.transform,l=t.interActBound,u=t.fixedX,c=t.fixedY,s=t.bounceRateX,d=t.bounceRateY,f=a.translateX,v=void 0===f?0:f,m=a.translateY,h=void 0===m?0:m,p=a.scale,g=void 0===p?1:p;u&&(e=0),c&&(n=0);var b=t._remainToEdge(e,n,l),y=b[0],E=b[1],w=(y+e)*e>0,C=(E+n)*n>0,x=0,T=0,N=Math.abs(e)>Math.abs(n),k=N&&w||!N&&C;e&&(x=o?e:t._getDragV(e,y,w,r?s:0),t.transform.translateX=v+x/g),n&&(T=i?n:t._getDragV(n,E,C,r?d:0),t.transform.translateY=h+T/g);var S=[u?0:-y,c?0:-E];if(t.update(),t.interActBound){var R=l.left,M=l.right,L=l.top,O=l.bottom;t.interActBound={left:R+x,right:M+x,top:L+T,bottom:O+T}}return{toEdge:k,remain:S}})),pi(this,"fit",(function(e,n,r){void 0===e&&(e=!0);var o=!1,i=t.transform,a=i.translateX,l=void 0===a?0:a,u=i.translateY,c=void 0===u?0:u,s=i.scale,d=void 0===s?1:s,f=t._outOfEdge(),v=f.outX,m=f.outY,h=f.outLeft,p=f.outRight,g=f.outTop,b=f.outBottom;return!n&&v&&(p&&(t.transform.translateX=l+p/d),h&&(t.transform.translateX=l+h/d),o=!0),!r&&m&&(b&&(t.transform.translateY=c+b/d),g&&(t.transform.translateY=c+g/d),o=!0),o&&e&&t.bounce(),t.update(),o})),pi(this,"fitX",(function(e){return void 0===e&&(e=!0),t.fit(e,!1,!0)})),pi(this,"fitY",(function(e){return void 0===e&&(e=!0),t.fit(e,!0,!1)})),pi(this,"swipe",(function(e){if(t.damp){var n=Ti(e);if(isNaN(n))return;t.cancelSwipe&&t.cancelSwipe();var r=0,o=Math.ceil(n/t.damp),i=t.transform,a=i.translateX,l=void 0===a?0:a,u=i.translateY,c=void 0===u?0:u,s=i.scale,d=void 0===s?1:s,f=[].concat(t.cubic.scroll),v=[].concat(t.cubic.bounce);if(t.dom){var m=850,h=[null,f],p=0,g=0,b=0,y=[[0,[l*d,c*d]]],E=function(){p=0,t.cancelSwipe()},w=e[0]*o/2,C=e[1]*o/2,x=t.bounceRateX,T=t.bounceRateY,N=t._outOfEdge(),k=N.outX,S=N.outY,R=t.drag(w,C,!1,x,T).remain,M=t._outOfEdge(),L=M.outX,O=M.outY;(L||O)&&(h[1]=v);var _=.33*window.innerWidth,I=.33*window.innerHeight;if(t.swipeMode===wi){t.cancel();var B=t._setSwipeBounceByAnimation(C,R[1],O,S,T,m,h[1],I),A=t._setSwipeBounceByAnimation(w,R[0],L,k,x,m,h[1],_),D=A.length>1,P=B.length>1;[A,B].forEach((function(e,t){return e.forEach((function(e){e[1]+=y[0][1][t];for(var n=0;n<y.length;n+=1){if(e[0]===y[n][0])return void(y[n][1][t]=e[1]);if(e[0]<y[n][0]){var r=[null,null];return r[t]=e[1],void y.splice(n,0,[e[0],r])}}var o=[null,null];o[t]=e[1],y.push([e[0],o])}))}));var H=y[y.length-1][0],F={};y.forEach((function(e,t){var n=e[0];e[1].map((function(r,o){if(null===r){for(var i=y[t-1][1][o],a=y[t-1][0],l=i,u=a,c=t+1;c<y.length;c+=1)if(null!==y[c][1][o]){l=y[c][1][o],u=y[c][0];break}if(a!==u){var s=[];[a,n,u].forEach((function(e,t){s[t]=F[e]?F[e]:Fi(h[1],e/H,"x")[1]})),e[1][o]=i+(l-i)*(s[1]-s[0])/(s[2]-s[0])}else e[1][o]=i}}))})),y.forEach((function(e){e[1]="transform: "+t.toCSS({translateX:e[1][0]/d,translateY:e[1][1]/d,scale:d}).transform})),t._appendAnimation(y,"cubic-bezier("+h[1].join(","),H),p=setTimeout(E,H+bi),t.cancelSwipe=function(){t._stopAnimation(),t._syncDom(),t.dom.style.animation="",p&&(clearTimeout(p),(D||P)&&t.fit(!1)),t.cancelSwipe=null,t.onSwipeEnd(t.transform)}}else t.dom.style.transition="transform "+m+"ms cubic-bezier("+h[1].join(",")+")",r=Vi((function(){p=setTimeout(E,m);var e=function(e){var t=e(m,h)||{};m=t.swipeSpan||m,h=t.cubicBezier||h,clearTimeout(p),p=setTimeout(E,m)};L&&(k&&w*R[0]>0?t.fitX(!1):(h[1]=[].concat(v),g=t._setSwipeBounce(w,R[0],x,e,"x",_))),O&&(S&&C*R[1]>0?t.fitY(!1):(h[1]=[].concat(v),b=t._setSwipeBounce(C,R[1],T,e,"y",I)))})),t.cancelSwipe=function(){r&&ji(r),p&&(g&&clearTimeout(g),b&&clearTimeout(b),clearTimeout(p),t._syncDom(),(g||b)&&t.fit(!1)),t.dom.style.transition="",t.cancelSwipe=null,t.onSwipeEnd(t.transform)}}else{var V=e[0]/o,j=e[1]/o;r=Vi((function e(){var n=(o-.5)*V,i=(o-.5)*j;t.drag(n,i),(o-=1)>0?(r=Vi(e),t.cancelSwipe=function(){r&&ji(r),t.cancelSwipe=null,t.onSwipeEnd(t.transform)}):(r=0,t.cancelSwipe())}))}}})),pi(this,"bounce",(function(){var e=t.bouncing;e&&t.dom&&(t.dom.style.transition="all "+e+"ms cubic-bezier(.14, 1, .34, 1)",t.animating=!0,setTimeout((function(){t.animating=!1,t.dom.style.transition=""}),e))})),pi(this,"touchStart",(function(e){if(t.disableContentTouch=!0,t.active&&!t.animating)if(t.scaling=!1,t.dragging=!1,t.cancelSwipe?(t.cancelSwipe(),t.isTapStopped=!0):t.dirty()||(t.useDomBoundary&&t.setBoundary(t.dom.getBoundingClientRect()),t.onSchedule()),e.touches.length>1){var n=t.transform.scale,r=void 0===n?1:n;t.disableContentTouch=!1;var o=t.getOriginXY([(e.touches[1].clientX+e.touches[0].clientX)/2,(e.touches[1].clientY+e.touches[0].clientY)/2]),i=o[0],a=o[1];t.pinchStartCenter=[i,a],t.setCenter(i,a),t.pinchStartLen=Ti([e.touches[1].clientX-e.touches[0].clientX,e.touches[1].clientY-e.touches[0].clientY]),t.scaling=!0,t.onZoomStart(e,r,t.pinchStartCenter)}else if(t.dragMode===yi||t.dragMode===Ei&&t.dirty()){t.disableContentTouch=!1,t.dragStartTime=+new Date,t.lastDragStartTime=0;var l=e.touches&&e.touches[0]?e.touches[0].clientX:0,u=e.touches&&e.touches[0]?e.touches[0].clientY:0;t.dragStartV=[l,u],t.lastDragStartV=[],t.dragX=l,t.dragY=u}})),pi(this,"touchMove",(function(e){if(!t.disableContentTouch){var n=e.changedTouches,r=void 0===n?[]:n;if(t.scaling){if(e.touches.length>1){var o=Ti([e.touches[1].clientX-e.touches[0].clientX,e.touches[1].clientY-e.touches[0].clientY]);t.zoom(o/t.pinchStartLen),t.pinchStartLen=o}}else{var i=r[0]?r[0].clientX:0,a=r[0]?r[0].clientY:0,l=i-t.dragX,u=a-t.dragY,c=t.drag(l,u,t.dragging).toEdge;t.dragX=i,t.dragY=a;var s=+new Date;s>t.dragStartTime+100&&(t.lastDragStartV=t.dragStartV,t.lastDragStartTime=t.dragStartTime,t.dragStartTime=s,t.dragStartV=[i,a]),t.dragging||(t.dragging=!0,c?t.disableContentTouch=!0:(t.onDragStart(e),t.interActBound=t._getTransformedBounding(!0)))}t.preventScroll&&e.preventDefault()}})),pi(this,"touchEnd",(function(e){if(!t.disableContentTouch&&0===e.touches.length){var n=t.transform.scale,r=void 0===n?1:n;if(t.scaling)t.onZoomEnd(e,r,t.pinchStartCenter),r<1?t.restore():t.fit();else if(t.dragging){var o=+new Date-t.dragStartTime,i=t.dragStartV;o<50&&t.lastDragStartTime&&(o=+new Date-t.lastDragStartTime,i=t.lastDragStartV);var a=[e.changedTouches&&e.changedTouches[0]?e.changedTouches[0].clientX:0,e.changedTouches&&e.changedTouches[0]?e.changedTouches[0].clientY:0],l=[bi*(a[0]-i[0])/o,bi*(a[1]-i[1])/o];t.onDragEnd(e),Ti(l)>t.motionThreshold?t.swipe(l):t.fit()}Vi((function(){t.disableContentTouch=!0,t.pinchStartLen=0,t.interActBound=null,t.isTapStopped=!1}))}})),pi(this,"_outOfEdge",(function(){var e=t._getTransformedBounding(),n=e.left,r=e.right,o=e.top,i=e.bottom,a=t.edges,l=a.left-n,u=a.right-r,c=a.top-o,s=a.bottom-i,d=l<0?l:0,f=u>0?u:0,v=c<0?c:0,m=s>0?s:0;return{outX:!(!d&&!f),outY:!(!v&&!m),outLeft:d,outRight:f,outTop:v,outBottom:m}})),pi(this,"_remainToEdge",(function(e,n,r){var o=[0,0],i=t.edges,a=r||t._getTransformedBounding(),l=a.left,u=a.right,c=a.top,s=a.bottom,d=e>0?i.left:i.right,f=n>0?i.top:i.bottom,v=e>0?l:u,m=n>0?c:s;return o[0]=v-d,o[1]=m-f,o})),pi(this,"_computeEdge",(function(){var e=t.viewport,n=e.left,r=e.right,o=e.top,i=e.bottom;if(t.boundingRect){var a=t.boundingRect,l=a.left,u=a.right,c=a.top,s=a.bottom;t.edges={left:Math.max(l,n),top:Math.max(c,o),right:Math.min(u,r),bottom:Math.min(s,i)}}else t.edges=gi({},t.viewport)})),this.dom=null,this.useDomBoundary=!1,this.viewport={left:0,right:window.innerWidth,top:0,bottom:window.innerHeight},this.maxScale=2,this.minScale=.5,this.fixedX=!1,this.fixedY=!1,this.active=!0,this.preventScroll=!0,this.dragMode=Ei,this.swipeMode=wi,this.transformMode=Ci,this.transform={},this.onZoomStart=function(){},this.onZoomEnd=function(){},this.onDragStart=function(){},this.onDragEnd=function(){},this.onSwipeEnd=function(){},this.onTransform=function(){},this.onRestore=function(){},this.onSchedule=function(){},this.cubic={scroll:[.33,1,.66,1],bounce:[.17,1,.17,1]},this.bouncing=300,this.bounceRateX=0,this.bounceRateY=0,this.damp=2,this.motionThreshold=10,this.config(e),this.boundingRect=null,this.disableContentTouch=!0,this.scaling=!1,this.pinchStartCenter=[],this.pinchStartLen=0,this.dragging=!1,this.dragX=0,this.dragY=0,this.dragStartTime=0,this.dragStartV=[0,0],this.edges={},this.timer=0,this.animating=!1,this.cancelSwipe=null,this.isTapStopped=!1,this.interActBound=null,this._computeEdge(),this.lastTransform={},this.animationStyleDom=null}var t=e.prototype;return t.enable=function(){return this.active=!0,this},t.disable=function(){return this.active=!1,this},t.config=function(e){void 0===e&&(e={});var t=e,n=t.viewport,r=t.dom,o=t.useDomBoundary,i=t.maxScale,a=t.minScale,l=t.fixedX,u=t.fixedY,c=t.bounceRateX,s=t.bounceRateY,d=t.active,f=t.preventScroll,v=t.transform,m=t.damp,h=t.dragMode,p=t.swipeMode,g=t.cubic,b=t.transformMode,y=t.motionThreshold,E=t.bounce,w=t.onZoomStart,C=t.onZoomEnd,x=t.onDragStart,T=t.onDragEnd,N=t.onSwipeEnd,k=t.onTransform,S=t.onRestore,R=t.onSchedule;return n&&this.setViewport(n),r&&this.setDom(r,o),i&&this.setMaxScale(i),a&&this.setMinScale(a),h&&this.setDragMode(h),p&&this.setSwipeMode(p),b&&this.setTransformMode(b),g&&this.setCubic(g),void 0!==y&&this.setMotionThreshold(y),void 0!==c&&this.setBounceRateX(c),void 0!==s&&this.setBounceRateY(s),void 0!==l&&this.setFixedX(l),void 0!==u&&this.setFixedY(u),void 0!==d&&(this.active=Boolean(d)),void 0!==f&&(this.preventScroll=Boolean(f)),v&&this.setTransform(v),void 0!==m&&this.setDamp(m),void 0!==E&&this.setBounce(E),this.on("transform",k).on("restore",S).on("schedule",R).on("zoomStart",w).on("zoomEnd",C).on("dragStart",x).on("dragEnd",T).on("swipeEnd",N),this},t.setDom=function(e,t){var n=this;return void 0===t&&(t=!0),e&&(this.useDomBoundary=t,this.dom!==e&&(this.removeDom(),this.dom=e,e.addEventListener("touchstart",this.touchStart),e.addEventListener("touchmove",this.touchMove),e.addEventListener("touchend",this.touchEnd),e.addEventListener("touchcancel",this.touchEnd),e.style.willChange="transform",e.style.transition="",e.style.transform="",e.style.webkitTransform="",e.style.transformOrigin="",e.style.webkitTransformOrigin="",this.transform={},this.lastTransform={},t&&Vi((function(){n.boundingRect||n.setBoundary(e.getBoundingClientRect())})))),this},t.setBoundary=function(e,t){void 0===t&&(t=!1);var n=t?this._getRawBounding(e):e,r=n.left,o=n.right,i=n.top,a=n.bottom;return this.boundingRect=gi({},this.boundingRect||this.viewport,{left:r,right:o,top:i,bottom:a}),this._computeEdge(),this},t.removeDom=function(){return this.dom&&(this.dom.removeEventListener("touchstart",this.touchStart),this.dom.removeEventListener("touchmove",this.touchMove),this.dom.removeEventListener("touchend",this.touchEnd),this.dom.removeEventListener("touchcancel",this.touchEnd)),this},t.setMaxScale=function(e){return isNaN(e)||(this.maxScale=Math.max(Number(e),1)),this},t.setMinScale=function(e){return isNaN(e)||(this.minScale=Math.min(Number(e),1)),this},t.setMotionThreshold=function(e){return isNaN(e)||(this.motionThreshold=e),this},t.setCubic=function(e){for(var t in void 0===e&&(e={}),e)e[t]instanceof Array&&4===e[t].length&&(this.cubic[t]=e[t].map((function(e){return isNaN(Number(e))?Number(e):0})));return this},t.setDragMode=function(e){this.dragMode=e},t.setSwipeMode=function(e){this.swipeMode=e},t.setTransformMode=function(e){this.transformMode=e},t.setBounceRateX=function(e){return isNaN(e)||(this.bounceRateX=Math.min(Number(e),1)),this},t.setBounceRateY=function(e){return isNaN(e)||(this.bounceRateY=Math.min(Number(e),1)),this},t.setViewport=function(e){var t=this;void 0===e&&(e={});var n=!1;return["left","right","top","bottom"].forEach((function(r){var o=Number(e[r]);isNaN(o)||(t.viewport[r]=o,n=!0)})),n&&this._computeEdge(),this},t.setFixedX=function(e){if(this.fixedX=!!e,e){var t=this.transform.transformOrigin;if(t){var n=this.boundingRect||this.viewport,r=n.left,o=n.right;t[0]=(o-r)/2}this.setTransform({translateX:0},{merge:!0})}return this},t.setFixedY=function(e){if(this.fixedY=!!e,e){var t=this.transform.transformOrigin;if(t){var n=this.boundingRect||this.viewport,r=n.top,o=n.bottom;t[1]=(o-r)/2}this.setTransform({translateY:0},{merge:!0})}return this},t.toStyle=function(){var e=this.toCSS(),t=e.transform,n=e.transformOrigin,r="";return t&&(r+="transform: "+t),n&&(r+="transform-origin: "+n),r},t.toCSS=function(e){var t="",n="center";if(e||this.dirty()){var r=e||this.transform;if(this.transformMode===Ci){var o=this.transform.scale,i=void 0===o?1:o;["translateX","translateY"].forEach((function(e){void 0!==r[e]&&(t+=e+"("+r[e]*i+"px)")})),t+="scale("+i+")"}else if(this.transformMode===xi)["scale","translateX","translateY"].forEach((function(e,n){var o=n?"px":"";void 0!==r[e]&&(t+=e+"("+r[e]+o+")")}));else{var a=r.scale,l=void 0===a?1:a,u=r.translateX,c=void 0===u?0:u,s=r.translateY;t="matrix("+l+", 0, 0, "+l+", "+c*l+", "+(void 0===s?0:s)*l+")"}}return this.transform.transformOrigin&&(n=this.transform.transformOrigin.map((function(e){return Math.round(e)+"px"})).join(" ")),{transform:t,transformOrigin:n}},t._getTransformedBounding=function(){var e=this.boundingRect,t=this.viewport,n=this.transform,r=e||t,o=r.left,i=r.top,a=r.right,l=r.bottom,u=n.scale,c=void 0===u?1:u,s=n.transformOrigin,d=void 0===s?[(a-o)/2,(l-i)/2]:s,f=n.translateX,v=void 0===f?0:f,m=n.translateY,h=void 0===m?0:m,p=d[0],g=d[1],b=(v-p)*c+p,y=(h-g)*c+g;return{left:o+b,right:o+b+(a-o)*c,top:i+y,bottom:i+y+(l-i)*c}},t._getRawBounding=function(e){var t=this.transform,n=e.left,r=e.top,o=e.right,i=e.bottom,a=t.scale,l=void 0===a?1:a,u=t.transformOrigin,c=void 0===u?[(o-n)/2,(i-r)/2]:u,s=t.translateX,d=void 0===s?0:s,f=t.translateY,v=void 0===f?0:f,m=c[0],h=c[1],p=(d-m)*l+m,g=(v-h)*l+h;return{left:n-p,right:n-p+(o-n)/l,top:r-g,bottom:r-g+(i-r)/l}},t._getDragV=function(e,t,n,r){var o=0,i=0;if(n)if(r){var a=t*e>0;o=a?e*r:(t+e)*r,i=a?o:-t+o}else i=-t;else i=e;return i},t._setSwipeBounceByAnimation=function(e,t,n,r,o,i,a,l){void 0===l&&(l=1/0);var u=[],c=e*t<0;if(n)if(r&&!c)u.push([i,t]);else{var s=(c?e*o:(e-t)*o)/2;Math.abs(s)>l&&(s*=Math.abs(l/s));var d=s+(c?0:t),f=2*Math.abs(s)+Math.abs(t),v=Fi(a,Math.abs(d)/f,"y")[0],m=Math.floor(i*v);v>.1||u.push([m,d]),u.push([i,t])}else e=Math.min(Math.abs(e),Math.abs(t))*Math.abs(e)/e,u.push([i,e]);return u},t._setSwipeBounce=function(e,t,n,r,o,i){var a=this;void 0===o&&(o="x"),void 0===i&&(i=1/0);var l=e*t<0,u=l?e*n:(e-t)*n;Math.abs(u)>i&&(u*=Math.abs(i/u));var c=(u+(l?0:t))/e,s=0;return r((function(e,t){var n=Fi(t[1],c,"y"),i=Math.max(Math.floor(n[0]*e/bi),2)*bi,l=e-i;s=setTimeout((function(){r((function(e,t){var n=1-l/e,r=0,i=function(){"x"===o?a.fitX(!1):"y"===o&&a.fitY(!1),a.dom&&(a.dom.style.transition="transform "+(l-r)+"ms cubic-bezier("+t[1].map((function(e){return e.toFixed(3)})).join(",")+")")};return n>0?(t=Pi(t[1],n,"x"),i()):(n=bi/e,r=bi,t=Pi(t[1],n,"x"),Vi(i)),{cubicBezier:t,swipeSpan:l}}))}),i)})),s},t._syncDom=function(){if(this.dom){var e=window.getComputedStyle(this.dom).getPropertyValue("transform").split(")")[0].split(", ").map((function(e){return parseFloat(e)})),t=e[3],n=void 0===t?1:t,r=e[4],o=void 0===r?0:r,i=e[5],a=void 0===i?0:i;this.setTransform({scale:n,translateX:Math.round(o)/n,translateY:Math.round(a)/n},{merge:!0})}},t._appendStyle=function(e){if(this.animationStyleDom){var t=this.animationStyleDom.firstChild;t&&this.animationStyleDom.removeChild(t)}else{var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");n.appendChild(r),r.type="text/css",this.animationStyleDom=r}this.animationStyleDom.styleSheet?this.animationStyleDom.styleSheet.cssText=e:this.animationStyleDom.appendChild(document.createTextNode(e))},t._appendAnimation=function(e,t,n){for(var r=this,o="__transformable_key_"+parseInt(1e16*(.5+.5*Math.random())).toString(16),i=[],a=0;a<e.length;a+=1){var l=e[a],u=l[0],c=l[1],s=Math.floor(u/n*100);i.push(s+"% { "+c+" }")}var d="@keyframes "+o+" {\n "+i.join("\n")+"\n }";this._appendStyle(d),this.dom&&Vi((function(){r.dom.style.animation=o+" "+n+"ms "+t,r.dom.style.animationFillMode="forwards"}))},t._stopAnimation=function(){this.dom&&(this.dom.style.animationPlayState="paused")},e}();var qi=t.forwardRef((function(e,n){var r,o,a=e.style,l=e.className,s=e.images,d=e.loop,f=void 0!==d&&d,v=e.openIndex,m=e.fit,h=e.noselect,p=void 0===h||h,g=e.displayDuration,b=void 0===g?350:g,y=e.spaceBetween,w=void 0===y?0:y,C=e.showLoading,x=void 0===C||C,T=e.loadingArea,N=e.errorArea,k=e.showError,S=void 0===k||k,R=e.retryTime,M=e.staticLabel,O=e.replaceFallbackWhenLoaded,_=e.scrollBezier,I=e.lazyloadCount,B=void 0===I?1:I,A=e.swipeToClose,D=void 0===A||A,P=e.getMinScale,H=e.getMaxScale,F=e.getDoubleClickScale,V=e.getContainer,j=e.getThumbBounds,z=e.renderIndicator,q=e.onChange,W=e.onAfterChange,X=e.onImageClick,Y=e.onImageDoubleClick,G=e.onImageLongTap,U=e.close,K=e.onClose,Z=e.onTouchStart,$=e.onTouchMove,J=e.onTouchEnd,Q=e.indicatorPos,ee=void 0===Q?"start":Q,te=c(e,["style","className","images","loop","openIndex","fit","noselect","displayDuration","spaceBetween","showLoading","loadingArea","errorArea","showError","retryTime","staticLabel","replaceFallbackWhenLoaded","scrollBezier","lazyloadCount","swipeToClose","getMinScale","getMaxScale","getDoubleClickScale","getContainer","getThumbBounds","renderIndicator","onChange","onAfterChange","onImageClick","onImageDoubleClick","onImageLongTap","close","onClose","onTouchStart","onTouchMove","onTouchEnd","indicatorPos"]),ne=et(),re=t.useRef(null),oe=t.useRef([]),ie=t.useRef(null),ae=t.useRef([]),le=t.useRef(null),ue=t.useRef(null),ce=t.useRef(null),se=t.useRef([]),de=t.useRef(0),fe=t.useRef(!1),ve=t.useRef(!1),me=t.useRef(!1),he=t.useRef(!1),pe=t.useRef(v),ge=t.useRef(0),be=t.useRef(0),ye=t.useRef(!1),Ee=t.useRef(!1),Ce=t.useState({}),xe=Ce[0],Te=Ce[1],Ne=$e([]),Se=Ne[0],Me=Ne[1],Le=Ne[2],Oe=t.useState(null),_e=Oe[0],Ie=Oe[1],Be=null===(r=Se[v])||void 0===r?void 0:r.loaded,Ae=null===(o=Se[v])||void 0===o?void 0:o.animated,De=v>=0&&v<s.length,Pe=tt(!0),He=Pe.windowWidth,Fe=Pe.windowHeight;function Ve(e){try{e&&document.body.removeChild(e)}catch(e){}}function je(e){var t,n=null===(t=oe.current[e])||void 0===t?void 0:t.dom,r=null==n?void 0:n.parentElement;n&&r&&(ae.current[e]?ae.current[e].setDom(r):ae.current[e]=new zi({dom:r,motionThreshold:0,dragMode:"always",transformMode:"matrix",useDomBoundary:!1,cubic:{scroll:_},onTransform:function(){var t,n,r,o,i=se.current[e],a=(null===(n=null===(t=ae.current[e])||void 0===t?void 0:t.getTransform)||void 0===n?void 0:n.call(t))||{},l=null===(r=Me.current[e])||void 0===r?void 0:r.originWidth,u=null===(o=Me.current[e])||void 0===o?void 0:o.originHeight,c=a.scale||1;if(i&&l&&u&&be.current!==c){be.current=c;var s=ze(i)?"":" translateY(-50%)";i.style.width=l*c+"px",i.style.height=u*c+"px";var d="scale("+1/c+") translateZ(0)"+s;i.style.transform=d,i.style.webkitTransform=d,i.style.transformOrigin="top left",i.style.webkitTransformOrigin="top left"}},onRestore:function(){be.current=0},onZoomEnd:function(t,n,r){Te((function(t){var n;return u(u({},t),((n={})[e]=!1,n))}));var o=se.current[e],i=ae.current[e];if(o&&i&&!(i.getTransform().scale<1)){var a=o.getBoundingClientRect();a.width>He&&a.height>Fe?(r&&r.length&&i.setCenter.apply(i,r),i.setFixedX(!1),i.setFixedY(!1)):a.height<=Fe?i.fixedY||(i.setFixedY(!0),i.bounce()):a.width<=He&&(i.fixedX||(i.setFixedX(!0),i.bounce()))}},minScale:qe(e),maxScale:We(e)}),function(e){var t=oe.current[e],n=null==t?void 0:t.dom;if((null==n?void 0:n.parentElement)&&(null==t?void 0:t.image)){var r=t.image.getBoundingClientRect(),o=n.parentElement.getBoundingClientRect();ae.current[e]&&ae.current[e].setBoundary({left:Math.min(r.left,o.left),right:Math.max(r.right,o.right),top:Math.min(r.top,o.top),bottom:Math.max(r.bottom,o.bottom)},!0)}}(e))}function ze(e){return Boolean(e&&!e.classList.contains("preview-fit-contain-y"))}function qe(e){var t=void 0===e?pe.current:e,n=se.current[t];return n?P?P(n,t):.7:1}function We(e){var t=void 0===e?pe.current:e,n=se.current[t];if(!n)return 1;if(H)return H(n,t);var r=n.naturalWidth;return r>n.naturalHeight?r/He*5:Math.max(5,r/He)}function Xe(e){var t,n,r=void 0===e?pe.current:e;return null===(n=null===(t=ae.current[r])||void 0===t?void 0:t.busy)||void 0===n?void 0:n.call(t)}function Ye(){var e,t,n=ae.current[pe.current],r=null===(e=null==n?void 0:n.toLeft)||void 0===e?void 0:e.call(n),o=null===(t=null==n?void 0:n.toRight)||void 0===t?void 0:t.call(n);return{side:!r||!o,left:!r,right:!o}}function Ge(e){if(Z&&Z(e,pe.current))return!0;var t=e.touches;return de.current=e.touches&&e.touches[0]?e.touches[0].clientX:0,ve.current=!1,me.current=!1,1===t.length?(ye.current||(he.current=!0),ue.current=window.setTimeout((function(){he.current&&(he.current=!1,ve.current=!0,G&&G(pe.current,se.current[pe.current],e))}),300)):he.current=!1,function(){var e,t;return null===(t=null===(e=ae.current[pe.current])||void 0===e?void 0:e.isTapStop)||void 0===t?void 0:t.call(e)}()&&(ve.current=!0),Xe()?(fe.current=Ye().side,!fe.current):void 0}function Ke(e){if(ve.current=!0,he.current=!1,ue.current&&clearTimeout(ue.current),$&&$(e,pe.current))return!0;var t=(e.changedTouches[0].clientX||0)-de.current;if(Xe()){var n=Ye();return!fe.current||!(n.left&&t>0||n.right&&t<0)}}function Ze(e){if(J&&J(e,pe.current))return!0;var t=D&&ge.current>=(function(){var e,t;return null===(t=null===(e=ae.current[pe.current])||void 0===e?void 0:e.dirty)||void 0===t?void 0:t.call(e)}()?6:3);return ge.current=0,he.current=!1,ue.current&&clearTimeout(ue.current),t?(rt(e),!0):!(!Xe()||Ye().side)||void 0}function Je(e){if(!me.current){me.current=!0,le.current&&(clearTimeout(le.current),le.current=null);var t=pe.current;Y&&Y(t,e);var n=ae.current[t];if(n){var r=function(e){var t=pe.current,n=se.current[t];if(!n)return 1;var r=We(t);if(F)return F(e,r,n,t);var o=n.naturalWidth,i=n.naturalHeight,a=o>i?o/He*Fe/i:1,l=2;a>=2&&(l=Math.min(r,a));var u=Number(e.toFixed(3)),c=Number(l.toFixed(3));return u>=1&&u<c?c:1}(n.getTransform().scale||1);if(1===r)ze(se.current[t])?n.zoomToScreenCenter(1,[He/2,Fe/2],{duration:200,callback:function(){return n.restore()}}):(n.bounce(),n.restore());else n.zoomToScreenCenter(r,[He/2,Fe/2],{duration:200,silent:!1})}}}t.useImperativeHandle(n,(function(){return{dom:re.current,imageDoms:se.current}})),nt(De,re.current,(function(){return[]}),"top",(function(e,t){Xe()||"y"!==t||(ge.current+=1)})),t.useEffect((function(){if(De)pe.current=v,ye.current=!1,ie.current&&ie.current.changeIndex(v,!0),Le(s.map((function(e,t){var n;return{firstLoaded:(null===(n=Me.current[t])||void 0===n?void 0:n.firstLoaded)||!1,animated:t!==v}}))),function(e){var t,n=null===(t=Me.current[e])||void 0===t?void 0:t.firstLoaded,r=O&&n?s[e].src:s[e].fallbackSrc;if(!j||!s[e]||!r)return void it(e);var o=j(e);if(!o||!o.width||!o.height)return void it(e);var i=new Image;ce.current=i,i.classList.add("image-preview-fake-trans-image"),at(i,o,o),i.src=r,i.style.objectPosition=s[e].thumbPosition||"top center",i.style.opacity="0",i.style.transitionDuration=b+"ms",i.style.webkitTransitionDuration=b+"ms",document.body.appendChild(i),function(e,t,n,r){if(!t)return void r(null);Ie({src:t,fit:s[e].fit,index:e,movingImage:n,onLoad:function(e,t){setTimeout((function(){r(t.getBoundingClientRect())}),20)},onError:function(){return r(null)}})}(e,r,i,(function(t){if(!t||!t.width||!t.height)return Ve(i),void it(e);we((function(){i.style.opacity="1",at(i,t,o),setTimeout((function(){Te((function(t){var n;return u(u({},t),((n={})[e]=!0,n))}))}),Math.max(0,b-80)),setTimeout((function(){it(e)}),b+30)}))}))}(v);else{ue.current&&clearTimeout(ue.current),he.current=!1,Le(Me.current.map((function(e){return u(u({},e),{animated:!1,loaded:!1})}))),ae.current=[],Ve(document.querySelector(".image-preview-fake-trans-image")),Ie(null),Te({});var e=Ee.current;setTimeout((function(){e&&K&&K()}),b)}Ee.current=!0}),[De]),t.useEffect((function(){De&&Be&&Ae&&setTimeout((function(){Ve(ce.current),ce.current=null}),100)}),[De,Be,Ae]),t.useEffect((function(){_e?function(e,t,n){void 0===e&&(e=function(){return document.body});var r=e();r&&(r.style.overflow="hidden",r.style.touchAction="none",(t?window:r).addEventListener("touchmove",n||L,{passive:!1,capture:!0}))}():we((function(){!function(e,t,n){void 0===e&&(e=function(){return document.body});var r=e();r&&(r.style.overflow="",r.style.touchAction="",(t?window:r).removeEventListener("touchmove",n||L,{capture:!0}))}()}))}),[_e]),t.useEffect((function(){(ae.current||[]).forEach((function(e,t){e&&e.setMinScale(qe(t))}))}),[P]),t.useEffect((function(){(ae.current||[]).forEach((function(e,t){e&&e.setMaxScale(We(t))}))}),[H]);var Qe=function(e,n,r){void 0===r&&(r=200);var o=t.useState(0),i=o[0],a=o[1],l=t.useRef();return t.useEffect((function(){var t=setTimeout((function(){1===i&&e(l.current),a(0)}),r);return 2===i&&n(l.current),function(){return clearTimeout(t)}}),[i]),function(e){l.current=e,a((function(e){return e+1}))}}((function(e){ve.current||(le.current=window.setTimeout((function(){me.current||X&&X(pe.current,e)||rt(e)}),300))}),Je);function rt(e){ye.current||(ye.current=!0,U(e))}function ot(e,t){var n=Me.current.slice();n[e]=u(u({},n[e]||{}),t),Le(n)}function it(e){ot(e,{animated:!0}),Ie(null)}function at(e,t,n){e.style.width=n.width+"px";var r="translate3d("+t.left+"px, "+t.top+"px, 0) scale("+t.width/n.width;e.style.transform=r,e.style.webkitTransform=r,e.style.transformOrigin="left top",e.style.webkitTransformOrigin="left top"}function lt(e,t,n){return i.default.createElement(Gt,u({autoPlay:!1,loop:f,lazyloadCount:B},e),(t||[]).map((function(e,t){var r=i.default.createElement("div",{key:t,className:"preview-image-wrap",style:{padding:"0 "+w+"px"}},i.default.createElement(Ht,u({className:"preview-image",fit:e.fit||m||"preview-y",boxWidth:He-2*w,boxHeight:Fe,bottomOverlap:null},n(e,t))));return e.extraNode?i.default.createElement("div",{className:"preview-image-wrap-container",key:"outer-"+t},r,e.extraNode):r})))}function ut(e){var t=Se[e]||{},n=t.loaded,r=t.animated;return E("preview-image",{"preview-hidden":!(e!==v||n&&r)})}function ct(e,t,n){return z?z(e,t,n):Be?i.default.createElement(Re,null,i.default.createElement("div",{className:"image-preview-indicator"},e+1,"/",t)):null}function st(e,t){var n=Se[t]||{},r=n.originWidth,o=n.originHeight,a=n.originLeft,l=n.originTop,c=n.hasOverflow?{}:yt({transform:"translateY(-50%)"});return"ios"===ne&&xe[t]&&r&&o?i.default.createElement("img",{src:e,style:u({position:"absolute",width:r,height:o,left:a,top:l},c)}):null}function dt(e){return e===v?i.default.createElement(Re,null,i.default.createElement("div",{className:"image-preview-loading-area"},T||i.default.createElement(Dt,{type:"circle",className:"loading-icon",radius:7}))):T}return i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return i.default.createElement(Re,{getContainer:V},i.default.createElement(Ue,{in:De,timeout:b,type:"fade",mountOnEnter:!0,unmountOnExit:!0},i.default.createElement("div",{className:E(t+"-image-preview","all-border-box",{noselect:p},l),style:a,ref:re,onClick:Qe,onDoubleClick:Je},lt(u({indicatorPos:ee,initialIndex:v,ref:ie,renderIndicator:ct,onChange:function(e){pe.current=e,q&&q(e)},onAfterChange:function(e,t){W&&W(e),function(e){var t=ae.current[e];t&&t.restore()}(t),we((function(){je(pe.current)}))},onTouchMove:Ke,onTouchStart:Ge,onTouchEnd:Ze},te),s,(function(e,t){return{src:e.src,ref:function(e){oe.current[t]=e},showLoading:x,loadingArea:dt(t),errorArea:N,showError:S,retryTime:R,staticLabel:M,animateDuration:_e?0:void 0,style:{overflow:"visible"},className:ut(t),bottomOverlap:st(e.fallbackSrc||e.src,t),onLoad:function(e,n){se.current[t]=n,ot(t,{loaded:!0,firstLoaded:!0,originWidth:n.offsetWidth,originHeight:n.offsetHeight,originTop:n.offsetTop,originLeft:n.offsetLeft,hasOverflow:ze(n)}),t===v?je(t):Te((function(e){var n;return u(u({},e),((n={})[t]=!0,n))}))},onError:function(){(se.current[t]=null,t===v)&&(Ve(null==_e?void 0:_e.movingImage),ot(t,{animated:!0,loaded:!0}),Ie(null))}}})),_e?i.default.createElement("div",{className:"image-preview-fake-rect"},lt({initialIndex:0},[{src:_e.src,fit:_e.fit}],(function(){return{staticLabel:M,src:_e.src,animateDuration:0,onLoad:_e.onLoad,onError:_e.onError}}))):null)),_e?i.default.createElement("div",{className:"image-preview-lock-modal",onClick:rt}):null)}))}));var Wi=G(qi,function(e){return{open:(t=e,function(e,n){var r=u(u({unmountOnExit:!0},e||{}),{close:function(){}}),o=u({},r),i=P("_ARCO_IMAGE_PREVIEW_DIV_"+(r.key||"")+"_",r.getContainer).child,a=!1,l=new wt(t,i,n).render;function c(){a=!0,o.openIndex=-1,l(o)}return o.close=c,o.onClose=function(){r.onClose&&r.onClose(),r.unmountOnExit&&H(i)},o.openIndex=-1,l(o),setTimeout((function(){a||(o.openIndex=r.openIndex,l(o))}),20),{close:c,update:function(e){o=u(u({},o),e||{}),l(o)}}})};var t}(Se(qi))),Xi=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,a=e.style,l=e.beforeReadyArea,u=e.loadingArea,c=e.noMoreArea,s=e.prepareArea,d=e.retryArea,f=e.defaultStatus,v=void 0===f?"prepare":f,m=e.status,h=e.getScrollContainer,p=e.trigger,g=void 0===p?"scroll":p,b=e.threshold,y=void 0===b?200:b,E=e.throttle,w=void 0===E?0:E,C=e.getDataAtFirst,x=void 0===C||C,T=e.getData,N=e.blockWhenLoading,k=void 0===N||N,S=e.onStatusChange,R=e.onClick,M=e.onEndReached,L=t.useRef(null),O="scroll"===g&&x,_=t.useState(v),I=_[0],B=_[1],A=t.useRef(!1),D=m||I,P=t.useRef(D),H=t.useCallback((function(e,t){B(e),S&&S(e,t)}),[S]),F=t.useCallback((function(e){k&&"loading"===P.current||(H("loading",e),null==T||T((function(e){A.current=!1,H(e,"manual")})))}),[k,H,T]);t.useEffect((function(){P.current=D}),[D]),Je((function(){"scroll"===g&&"prepare"===D&&q(0,y)&&F("pageEnd")}),[D]),t.useEffect((function(){O&&"prepare"===P.current&&F("requestAtFirst")}),[g]);var z=t.useCallback((function(){q(j("scrollTop",h),y+1)?A.current||(A.current=!0,M&&M(),["nomore","retry","before-ready"].includes(P.current)||F("scrollEnd")):A.current=!1}),[h,y,F,M]);function q(e,t){return j("scrollHeight",h)-e-j("clientHeight",h)<=t}function W(e){("click"===g&&"prepare"===P.current||"retry"===P.current)&&F("click"),R&&R(e)}return t.useEffect((function(){var e=null,t=w?zn(z,w):z;if("scroll"===g){var n=V(h);n&&(n.addEventListener("scroll",t),e=n)}return function(){e&&e.removeEventListener("scroll",t)}}),[g,h,z,w]),t.useImperativeHandle(n,(function(){return{dom:L.current,changeStatus:H}}),[H]),i.default.createElement(ke,null,(function(e){var t=e.prefixCls,n=e.locale,r=void 0===n?J:n;return i.default.createElement("div",{className:t+"-load-more status-"+D+" "+o,ref:L,style:a,onClick:W},function(e){switch(D){case"before-ready":return l;case"prepare":return void 0===s?i.default.createElement("div",{className:"load-more-text prepare"},"scroll"===g?e.LoadMore.prepareScrollText:e.LoadMore.prepareClickText,e.LoadMore.loadMoreText):s;case"loading":return void 0===u?i.default.createElement("div",{className:"load-more-text loading"},e.LoadMore.loadingText):u;case"nomore":return void 0===c?i.default.createElement("div",{className:"load-more-text nomore"},e.LoadMore.noDataText):c;case"retry":return void 0===d?i.default.createElement("div",{className:"load-more-text retry"},e.LoadMore.failLoadText):d;default:return null}}(r))}))}));function Yi(e){var t=e.color,n=void 0===t?"currentColor":t;return i.default.createElement("div",{className:"c-svg-arrow nav-bar-back"},i.default.createElement("svg",{height:"100%",viewBox:"0 0 16 16"},i.default.createElement("path",{id:"path-1_1_",d:"M2.1,8l5.4,5.4c0.1,0.1,0.1,0.3,0,0.5L7,14.4c-0.1,0.1-0.3,0.1-0.5,0L0.7,8.5c-0.3-0.3-0.3-0.7,0-0.9\n l5.9-5.9c0.1-0.1,0.3-0.1,0.5,0l0.5,0.5c0.1,0.1,0.1,0.3,0,0.5L2.1,8z",fill:n})))}var Gi=t.forwardRef((function(e,n){var r=e.children,o=e.title,a=void 0===o?"":o,l=e.onClickLeft,c=e.leftContent,s=void 0===c?i.default.createElement(Yi,null):c,d=e.onClickRight,f=e.rightContent,v=e.onShowChange,m=e.style,h=e.className,p=void 0===h?"":h,g=e.wrapClass,b=e.placeholder,y=void 0===b||b,w=e.fixed,C=void 0===w||w,x=e.hasBottomLine,T=void 0===x||x,N=e.statusBarHeight,k=void 0===N?0:N,S=e.extra,R=e.getScrollContainer,M=e.showOffset,L=void 0===M?0:M,O=e.getComputedStyleByScroll,_=e.ariaLabel,I=void 0===_?"":_,B=e.ariaRole,A=void 0===B?"banner":B,D=t.useRef(null),P=t.useState(L>0),H=P[0],F=P[1],z=H?"transparent":"",q=t.useState({}),W=q[0],X=q[1],Y=et();t.useImperativeHandle(n,(function(){return{navBar:D.current,dom:D.current}})),t.useEffect((function(){null==v||v(!H)}),[H]);var G=function(){!function(e){if(F(e<L),O){var t=O(e);X(t)}}(j("scrollTop",R)||0)};function U(e){l&&l(e)}function K(e){d&&d(e)}return t.useEffect((function(){var e=L||O,t=V(R);return G(),e&&t&&t.addEventListener("scroll",G,!1),function(){e&&t&&t.removeEventListener("scroll",G,!1)}}),[L,O,R]),i.default.createElement(ke,null,(function(e){var t,n,o=e.prefixCls;return i.default.createElement("div",{ref:D,className:E(g,o+"-nav-bar",(t={},t[o+"-nav-bar-fixed"]=C,t[o+"-nav-bar-float"]=!y,t[o+"-nav-bar-hide"]=H,t)),style:u(u({paddingTop:C&&k?k+"px":""},m||{}),z?{background:z}:{}),"aria-label":I,role:A},i.default.createElement("div",{className:E(p,Y,o+"-nav-bar-wrapper",(n={},n[o+"-nav-bar-wrapper-fixed"]=C,n[o+"-nav-bar-wrapper-border"]=T,n)),style:u({paddingTop:k?k+"px":""},W)},i.default.createElement("div",{className:o+"-nav-bar-inner all-border-box"},s?i.default.createElement("div",{className:o+"-nav-bar-left",onClick:U},s):null,r||i.default.createElement("div",{className:o+"-nav-bar-title"},i.default.createElement("div",{className:o+"-nav-bar-title-text"},a)),f?i.default.createElement("div",{className:o+"-nav-bar-right",onClick:K},f):null),S))}))})),Ui=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,a=e.style,l=e.children,u=e.leftContent,c=e.rightContent,s=e.marquee,d=void 0===s?"overflow":s,f=e.closeable,v=void 0===f||f,m=e.closeIcon,h=void 0===m?i.default.createElement(Wo,null):m,p=e.wrapable,g=void 0===p||p,b=e.speed,y=void 0===b?50:b,w=e.delay,C=void 0===w?1e3:w,x=e.autoSetGradientStyle,T=void 0===x||x,N=e.onClick,k=e.onClose,S=t.useRef(null),R=t.useRef(null),M=t.useRef(null),L=t.useRef(null),O=t.useState(!1),_=O[0],I=O[1],B=t.useMemo((function(){var e=[];return"none"===d&&g||e.push("no-wrap"),"none"===d&&e.push(g?"wrapable":"ellipsis"),e}),[d,g]),A=t.useMemo((function(){if(!T)return{};var e,t=(null==a?void 0:a.backgroundColor)||(null==a?void 0:a.background),n=(e=String(t)||"")?U[e]?U[e]+"00":/^#[A-Fa-f0-9]{6}$/.test(e)?e+"00":/^rgb\(.*?\)$/.test(e)?e.replace(/rgb\((.*?)\)/,"rgba($1, 0)"):"":"";return n?{background:"linear-gradient(to right, "+t+", "+n+")"}:{}}),[a]);function D(){S.current&&H(S.current)}function P(e){e.stopPropagation(),null==k||k(e),D()}function F(){we((function(){setTimeout((function(){!function(){if(!R.current||!M.current)return;var e=M.current,t="always"===d,n=R.current.offsetWidth,r=M.current.offsetWidth;"overflow"===d&&n<r&&(t=!0);if(I(t),function(){L.current&&(clearTimeout(L.current),L.current=null)}(),t){var o=r/y;e.style.animationDuration=o+"s",L.current=window.setTimeout((function(){I(!1),e.style.animationDuration=n/y+o+"s",e.style.animationIterationCount="infinite",e.style.paddingLeft=n+"px",we((function(){I(!0)}))}),1e3*o)}}()}),_?0:C)}))}return t.useImperativeHandle(n,(function(){return{dom:S.current,close:D,updateData:F}}),[F]),t.useEffect((function(){F()}),[]),i.default.createElement(ke,null,(function(e){var t,n=e.prefixCls;return t=n+"-notice-bar",i.default.createElement("div",{className:E(t,o,B),style:a,ref:S,onClick:N},u?i.default.createElement("div",{className:t+"-left-part"},u):null,i.default.createElement("div",{className:t+"-content",ref:R},_?i.default.createElement("i",{className:t+"-gradient left",style:A}):null,i.default.createElement("div",{className:E(t+"-content-inner",{animate:_}),ref:M},l),_?i.default.createElement("i",{className:t+"-gradient right",style:A}):null),c?i.default.createElement("div",{className:t+"-right-part"},c):null,v?i.default.createElement("div",{className:t+"-close",onClick:P},h):null)}))}));function Ki(e,t){return function(n,r){var o="string"==typeof n?{content:n,type:"info"}:n;void 0!==t&&(o.type=t);var i=document.createElement("div"),a=o.getContainer;a?a().appendChild(i):document.body.appendChild(i);var l=new wt(e,i,r),c=l.render,s=l.unmount;var d=u(u({},o),{close:v,onClose:function(){var e=o.onClose;e&&e(),s(),i.parentNode&&i.parentNode.removeChild(i)},getContainer:function(){return i},visible:!1}),f=!1;function v(){f=!0,d.visible=!1,c(d)}return c(d),we((function(){f||(d.visible=!0,c(d))})),{update:function(e){d=u(u({},d),e),c(d)},close:v}}}var Zi=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,l=e.style,c=e.visible,s=void 0!==c&&c,d=e.transitionDuration,f=void 0===d?300:d,v=e.content,m=e.duration,h=void 0===m?3e3:m,p=e.onClose,g=e.type,b=void 0===g?"info":g,y=e.close,E=e.getContainer,w=t.useRef(null),C=t.useRef(null),x=t.useRef(),T=t.useRef(),N=t.useState(!s),k=N[0],S=N[1],R=t.useState(0),M=R[0],L=R[1];function O(){if(C.current){var e=C.current.getBoundingClientRect().height;L(e)}}t.useImperativeHandle(n,(function(){return{dom:w.current,updateLayout:O}})),t.useEffect((function(){return s&&O(),s&&h&&(clearTimeout(x.current),x.current=window.setTimeout((function(){null==y||y()}),h)),function(){s&&clearTimeout(x.current)}}),[s,h]),Je((function(){s||(T.current=window.setTimeout((function(){p&&p()}),f))}),[s]),t.useEffect((function(){return we((function(){S(!0)})),function(){clearTimeout(T.current)}}),[]);var _=function(e){return i.default.createElement("div",{className:e+"-notify "+e+"-notify-"+b+" "+o,style:u(u(u({},l),k?yt({transitionDuration:f+"ms"}):{}),{height:s?M:0}),ref:w},(t=e+"-notify",v?i.default.createElement("div",{className:t+"-content "+(s?t+"-content-transition-Y0":t+"-content-transition-Y100"),ref:C,style:u({},k?yt({transitionDuration:f+"ms"}):{})},v):null));var t};return i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return E?a.default.createPortal(_(t),E()):_(t)}))}));var $i=G(Zi,function(e){return{info:Ki(e),success:Ki(e,"success"),error:Ki(e,"error"),warn:Ki(e,"warn")}}(Se(Zi)));function Ji(){return i.default.createElement("svg",{width:"8",height:"14",viewBox:"0 0 8 14",fill:"none"},i.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.40514 12.7583C7.6004 12.563 7.6004 12.2465 7.40514 12.0512L2.40095 7.04701L7.36396 2.084C7.55922 1.88874 7.55922 1.57216 7.36396 1.37689L7.01041 1.02334C6.81515 0.828077 6.49856 0.828077 6.3033 1.02334L0.646447 6.68019C0.470402 6.85624 0.453075 7.1309 0.594469 7.32636C0.617837 7.37275 0.64889 7.41626 0.687628 7.455L6.34448 13.1119C6.53974 13.3071 6.85633 13.3071 7.05159 13.1119L7.40514 12.7583Z",fill:"currentColor"}))}var Qi=t.forwardRef((function(e,n){var r,o=t.useContext(Te),a=o.prefixCls,l=o.locale,u=e.className,c=void 0===u?"":u,s=e.style,d=e.current,f=void 0===d?1:d,v=e.pageSize,m=void 0===v?10:v,h=e.total,p=void 0===h?5:h,g=e.icon,b=void 0!==g&&g,y=e.justify,w=void 0===y?"side":y,C=e.hideOnOnePage,x=void 0!==C&&C,T=e.nextFieldType,N=void 0===T?"default":T,k=e.renderPrevField,S=e.renderNextField,R=e.type,M=void 0===R?"default":R,L=e.prevFieldText,O=void 0===L?null==l?void 0:l.Pagination.previousPage:L,_=e.nextFieldText,I=void 0===_?null==l?void 0:l.Pagination.nextPage:_,B=e.onChange,A=et(),D=t.useMemo((function(){return Math.ceil(p/m)}),[p,m]),P=t.useRef(null);t.useImperativeHandle(n,(function(){return{dom:P.current}}));var H=function(e){return"prev"===e?Array.isArray(b)&&Boolean(b.length)?i.default.createElement("span",{className:"btn-icon"},b[0]):"[object Object]"===Object.prototype.toString.call(b)?i.default.createElement("span",{className:"btn-icon"},b):b?i.default.createElement("span",{className:"btn-icon"},i.default.createElement(Ji,null)):null:Array.isArray(b)&&Boolean(b.length)?i.default.createElement("span",{className:"btn-icon"},b.length>=2?b[1]:b[0]):"[object Object]"===Object.prototype.toString.call(b)?i.default.createElement("span",{className:"btn-icon next"},b):b?i.default.createElement("span",{className:"btn-icon next"},i.default.createElement(Ji,null)):null},F=a+"-pagination";return x&&1===D?i.default.createElement("div",{className:E(F,c)}):i.default.createElement("div",{ref:P,className:E(F,A,(r={},r[F+"-simple"]="none"===M,r),c),style:s},function(e){var t;if("none"===M)return null;var n=E(e+"-prev-field",((t={})["flex-"+w]=!0,t));return void 0===k?i.default.createElement("div",{className:n},i.default.createElement("div",{className:E(e+"-field","prev",{text:"text"===M,button:"text"!==M,disabled:1===f}),onClick:function(){f<=1||null==B||B({pageSize:m,pageNum:D,current:Math.max(1,f-1)})}},H("prev"),Boolean(O)&&i.default.createElement("span",{className:"btn-text"},O))):i.default.createElement("div",{className:n},k?k({current:f,pageSize:m,pageNum:D}):null)}(F),i.default.createElement("div",{className:F+"-item"},i.default.createElement("span",{className:F+"-item-active"},f)," / ",D),function(e){var t,n;if("none"===M)return null;var r=E(e+"-next-field",((t={})["flex-"+w]=!0,t));if(void 0===S)return i.default.createElement("div",{className:r},i.default.createElement("div",{className:E(e+"-field","next",(n={text:"text"===M,button:"text"!==M},n["default"===N?M:"primary"]=f<D,n.disabled=f>=D,n)),onClick:function(){f>=D||null==B||B({pageSize:m,pageNum:D,current:Math.min(f+1,D)})}},Boolean(I)&&i.default.createElement("span",{className:"btn-text"},I),H("next")));var o=S&&S({current:f,pageSize:m,pageNum:D});return i.default.createElement("div",{className:r},o)}(F))}));var ea=t.forwardRef((function(e,n){var r=t.useContext(Te).prefixCls,o=e.className,a=e.needShadow,l=e.content,u=e.direction,c=e.position,s=e.minWidth,d=e.maxWidth,f=e.arrowWidth,v=e.transformOrigin,m=e.mode,h=e.showCloseIcon,p=void 0!==h&&h,g=e.textSuffix,b=void 0===g?null:g,y=e.renderArrow,w=e.onClickCloseIcon,C=e.onClickTextSuffix,x=t.useRef(null),T=t.useRef(null),N=Ze(!1),k=N[0],S=N[1];t.useImperativeHandle(n,(function(){return{dom:x.current,content:T.current}})),t.useEffect((function(){var e=c.top,t=c.bottom,n=c.height,r=c.left,o=c.width;(r||o||e||n||t)&&(k||setTimeout((function(){S(!0)}),0))}),[c,k]);var R,M,L,O;return i.default.createElement("div",{ref:x,className:E(r+"-popover-inner","popover-inner","all-border-box",m+"-mode",o,{show:k,"with-shadow":a,"with-suffix":p||b,"custom-content":"string"!=typeof l}),style:(M=c.top,L=c.bottom,O={height:c.height+"px",left:c.left+"px",minWidth:s,maxWidth:d},M?O.top=M+"px":L&&(O.bottom=L+"px"),O.transformOrigin=v.x+" "+v.y,yt(O))},i.default.createElement("div",{className:"popover-bg"},y?y({arrowWidth:f,arrowLeft:c.arrowLeft,direction:u}):i.default.createElement("div",{className:"popover-arrow "+u,style:(R=c.arrowLeft,{width:f,height:f,marginLeft:R?R+"px":null,marginRight:R?R+"px":null})},i.default.createElement("div",{className:"popover-arrow-content"}))),i.default.createElement("div",{className:E("popover-content",u,{"show-close-icon":p}),ref:T},"string"==typeof l?i.default.createElement(i.default.Fragment,null,i.default.createElement("div",{className:"content-text"},l),p&&i.default.createElement(i.default.Fragment,null,i.default.createElement("div",{className:"icon-divider"}),i.default.createElement("div",{className:"text-close-icon",onClick:w},i.default.createElement(Wo,null))),b&&i.default.createElement("div",{className:"text-suffix",onClick:C},b)):l))})),ta={left:null,top:null,bottom:null,width:null,height:null,arrowLeft:0},na={top:14,right:14,bottom:14,left:14},ra=!0,oa=function(e,n,r,o){var i=e.direction,a=void 0===i?"topRight":i,l=e.verticalOffset,s=void 0===l?10:l,d=e.horizontalOffset,f=void 0===d?8:d,v=e.edgeOffset,m=void 0===v?14:v,p=e.arrowWidth,g=void 0===p?9:p,b=e.mode,y=void 0===b?"follow":b,E=e.useAutoDirection,w=void 0===E?ra:E,C=t.useState(ta),x=C[0],T=C[1],N=t.useMemo((function(){var e=x.top,t=x.bottom,n=x.height,r=x.left,o=x.width;return!(r||o||e||n||t)}),[x]),k=t.useState({x:"0",y:"0"}),S=k[0],R=k[1],M=$e(a),L=M[0],O=M[1],_=M[2],I=t.useCallback((function(e){return Et(h(m)?m[e]:m,na[e])}),[m]),B=t.useCallback((function(e){return Et(h(w)?w[e]:w,ra)}),[w]);function A(e){var t=e.childRect,n=e.config,r=u(u({},n),{adjustOffset:0});r.arrowLeft=function(e){var t=e.childRect,n=e.config;return-1!==L.indexOf("Left")||-1!==L.indexOf("Right")?(t.width-g)/2+f:(n.width-g)/2}({childRect:t,config:n});var i=screen.availWidth,a=[I("top"),I("right"),I("bottom"),I("left")],l=a[0],c=a[1],d=a[2],v=a[3],m=[B("vertical"),B("horizontal")],h=m[0];if(m[1])if(-1!==L.indexOf("Right")){if((C=Number(n.width)-t.left-t.width)>0){var p=C+v;r.left=Number(r.left)+p,r.arrowLeft+=p,r.adjustOffset=p}if(i-t.right<c){p=-((C=c)-(i-t.right));r.left=Number(r.left)+p,r.adjustOffset=p}}else if(-1!==L.indexOf("Center")){var b=(Number(n.width)-t.width)/2,E=b-(i-t.right),w=b-t.left;if(E>0){p=-(E+c);r.left=Number(r.left)+p,r.arrowLeft-=p,r.adjustOffset=p}if(w>0){p=w+v;r.left=Number(r.left)+p,r.arrowLeft-=p,r.adjustOffset=p}}else if(-1!==L.indexOf("Left")){var C;if((C=Number(n.width)-t.width-(i-t.right))>0){p=-(C+c);r.left=Number(r.left)+p,r.arrowLeft-=p,r.adjustOffset=p}t.left<v&&(C=v,r.left=Number(r.left)+C,r.adjustOffset=v)}if(h){var x=t.bottom-(r.bottom&&r.height?r.bottom+r.height:0),T=t.top+(r.top&&r.height?r.top+r.height:0);-1!==L.indexOf("top")&&x<l?(r.top=s+t.height,r.bottom=null,W("bottom")):-1!==L.indexOf("bottom")&&T+d>window.innerHeight&&(r.top=null,r.bottom=s+t.height,W("top"))}if("global"===y){var N=o.current;if(!N)return r;var k=N.getBoundingClientRect(),S=k.top,R=k.left,M=k.bottom;if(null!==r.left&&(r.left+=R),null!==r.top&&(r.top+=S),null!==r.bottom){var O=window.innerHeight||document.documentElement.clientHeight;r.bottom=O-(M-r.bottom)}}return r}function D(e,t){var n=A({childRect:e,config:t}),r=n.adjustOffset,o=c(n,["adjustOffset"]),i=function(e,t){var n=e.arrowLeft,r=e.width||0,o=e.height||0,i=g/2,a=O.current.indexOf("top")>-1?i+o+"px":"-"+i+"px";return{x:O.current.indexOf("Left")>-1?n+i+"px":O.current.indexOf("Right")>-1?r-(n+i)+"px":r/2-t+"px",y:a}}(o,r);R(i),T(o)}t.useEffect((function(){_(a)}),[a]);var P=function(e){var t=e.popoverWidth,n=e.popoverHeight,r=e.childRect;D(r,{left:-(t-r.width-f),width:t,top:null,height:n,bottom:s+r.height,arrowLeft:0})},H=function(e){var t=e.popoverWidth,n=e.popoverHeight,r=e.childRect;D(r,{left:-(t-r.width)/2,width:t,top:null,height:n,bottom:s+r.height,arrowLeft:0})},F=function(e){var t=e.popoverWidth,n=e.popoverHeight,r=e.childRect;D(r,{left:-f,width:t,top:null,height:n,bottom:s+r.height,arrowLeft:0})},V=function(e){var t=e.popoverWidth,n=e.popoverHeight,r=e.childRect;D(r,{left:-(t-r.width-f),width:t,bottom:null,height:n,top:s+r.height,arrowLeft:0})},j=function(e){var t=e.popoverWidth,n=e.popoverHeight,r=e.childRect;D(r,{left:-(t-r.width)/2,width:t,bottom:null,height:n,top:s+r.height,arrowLeft:0})},z=function(e){var t=e.popoverWidth,n=e.popoverHeight,r=e.childRect;D(r,{left:-f,width:t,bottom:null,height:n,arrowLeft:0,top:s+r.height})},q=t.useCallback((function(){var e,t=null===(e=n.current)||void 0===e?void 0:e.content;if(t){var o=t.offsetWidth,i=t.offsetHeight;if(0!==o&&0!==i){var a=r.current;if(a){var l={popoverWidth:o,popoverHeight:i,childRect:a.getBoundingClientRect()};switch(L){case"topRight":P(l);break;case"topCenter":H(l);break;case"topLeft":F(l);break;case"bottomRight":V(l);break;case"bottomCenter":j(l);break;case"bottomLeft":z(l)}}}}}),[r,L,n,P,H,F,V,j,z]),W=function(e){if(-1===L.indexOf(e)){var t=L.replace(/top|bottom/,e);_(t),O.current=t}},X=t.useCallback((function(){var e=n.current;if(e){var t=e.content;if(t){var r=t.getBoundingClientRect(),o=r.top,i=r.bottom;(-1!==L.indexOf("top")&&o<I("top")||-1!==L.indexOf("bottom")&&i+I("bottom")>window.innerHeight)&&q()}}}),[L,n,q,I]);return{direction:L,position:x,isCalcPosition:N,arrowWidth:g,transformOrigin:S,computedChildAndPopoverOffset:q,resetPosition:function(){T(ta),_(a)},onAdjustDirection:W,adjustVerticalDirection:X}},ia=0,aa=function(e,n,r,o,i,a){var l=e.clickOtherToClose,u=void 0===l||l,c=e.touchOtherToClose,s=void 0===c?void 0!==e.touchToClose&&e.touchToClose:c,d=e.duration,f=void 0===d?0:d,v=e.useAutoDirection,m=void 0===v||v,p=e.verticalScrollThrottle,g=void 0===p?100:p,b=e.preventBodyClick,y=void 0!==b&&b,E=e.getVerticalScrollContainer,w=void 0===E?function(){return document}:E,C=t.useRef(0),x=Et(h(m)?m.vertical:m,ra),T=function(){i(!1),window.clearTimeout(C.current),C.current=0,k()},N=t.useMemo((function(){return zn(a,g)}),[a,g]);t.useEffect((function(){var e=w();return o.current&&e&&x&&e.addEventListener("scroll",N),function(){e&&e.removeEventListener("scroll",N)}}),[N,w,x,o]);var k=t.useCallback((function(){document.body.removeEventListener("click",S,!0),document.body.removeEventListener("touchstart",R);var e=w();e&&(e.removeEventListener("scroll",N),e.removeEventListener("scroll",M))}),[N]),S=t.useCallback((function(e){var t;O(n.current,e.target)||O((null===(t=r.current)||void 0===t?void 0:t.dom)||null,e.target)||(y&&(e.stopPropagation(),e.preventDefault()),T())}),[y]),R=t.useCallback((function(e){var t,i,a,l;(null===(t=e.targetTouches[0])||void 0===t?void 0:t.target)&&n.current&&(null===(i=r.current)||void 0===i?void 0:i.dom)&&o.current&&(O(n.current,null===(a=e.targetTouches[0])||void 0===a?void 0:a.target)||O(r.current.dom,null===(l=e.targetTouches[0])||void 0===l?void 0:l.target)||(y&&function(){clearTimeout(ia);var e=function e(t){t.stopPropagation(),t.preventDefault(),document.body.removeEventListener("click",e,!0),clearTimeout(ia)};document.body.addEventListener("click",e,!0),ia=window.setTimeout((function(){document.body.removeEventListener("click",e,!0)}),500)}(),T()))}),[y]),M=t.useCallback((function(){o.current&&s&&T()}),[s]);t.useEffect((function(){var e=w();return e&&s&&o.current&&e.addEventListener("scroll",M),function(){e&&e.removeEventListener("scroll",M)}}),[M,s]);return{popoverDisappear:T,mayRemoveEventListenerOnBody:k,startCloseTimer:function(){0!==f&&(C.current=window.setTimeout((function(){i(!1),k()}),f))},mayAddEventOnBody:function(){if(s){document.body.addEventListener("touchstart",R);var e=w();e&&e.addEventListener("scroll",M)}else u&&document.body.addEventListener("click",S,!0)}}},la=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,a=e.innerPopoverClassName,l=void 0===a?"":a,u=e.style,c=void 0===u?{}:u,s=e.theme,d=void 0===s?"black":s,f=e.needShadow,v=void 0!==f&&f,m=e.content,h=void 0===m?"":m,p=e.transitionTimeout,g=void 0===p?300:p,b=e.minWidth,y=void 0===b?"10px":b,w=e.maxWidth,C=void 0===w?"90vw":w,x=e.transitionName,T=void 0===x?"fade":x,N=e.clickSelfToClose,k=void 0===N||N,S=e.touchSelfToClose,R=void 0===S?void 0!==e.touchToClose&&e.touchToClose:S,M=e.defaultVisible,L=void 0!==M&&M,O=e.visible,_=e.children,I=e.bordered,B=void 0===I?"white"===e.theme:I,A=e.showCloseIcon,D=void 0!==A&&A,P=e.textSuffix,H=void 0===P?null:P,F=e.mode,V=void 0===F?"follow":F,j=e.showMask,z=void 0!==j&&j,q=e.maskTransitionTimeout,W=void 0===q?{enter:450,exit:240}:q,X=e.renderArrow,Y=e.onChange,G=e.onClickCloseIcon,U=e.onClickTextSuffix,K=e.onClickMask,Z=t.useContext(Te).prefixCls,$=t.useState(!1),J=$[0],Q=$[1],ee=t.useRef(J),te=t.useRef(null),ne=t.useRef(null),re=t.useRef(null),oe=oa(e,re,ne,te),ie=oe.direction,ae=oe.position,le=oe.isCalcPosition,ue=oe.transformOrigin,ce=oe.computedChildAndPopoverOffset,se=oe.arrowWidth,de=oe.resetPosition,fe=oe.adjustVerticalDirection,ve=function(e){void 0===e&&(e=!0),e&&!le||(null==Y||Y(e),void 0===O&&Q(e))},me=aa(e,te,re,ee,ve,fe),he=me.popoverDisappear,pe=me.mayAddEventOnBody,ge=me.startCloseTimer,be=me.mayRemoveEventListenerOnBody;function ye(){J&&ce()}t.useImperativeHandle(n,(function(){var e;return{dom:te.current,child:ne.current,innerPopover:re.current,innerPopoverDom:(null===(e=re.current)||void 0===e?void 0:e.dom)||null,updatePosition:ye}})),t.useEffect((function(){return(L||O)&&Q(!0),function(){be()}}),[]),t.useEffect((function(){void 0!==O&&Q(Boolean(O))}),[O]),t.useEffect((function(){ee.current&&ce()}),[_,h,ie,V]),t.useEffect((function(){J&&function(){if(ge(),setTimeout(pe,0),!le)return;setTimeout((function(){ce()}),0)}(),ee.current=J,J||(be(),setTimeout((function(){!ee.current&&de()}),("object"==typeof g?g.exit:g)||300))}),[J]);var Ee=function(){return i.default.createElement(ea,{className:E(d+"-theme",l,{bordered:B}),ref:re,direction:ie,minWidth:y,maxWidth:C,position:ae,arrowWidth:se,transformOrigin:ue,needShadow:v,content:h,mode:V,showCloseIcon:D,textSuffix:H,renderArrow:X,onClickCloseIcon:G,onClickTextSuffix:U})};return i.default.createElement(i.default.Fragment,null,z&&i.default.createElement(Re,null,i.default.createElement(Ue,{in:J&&!le,timeout:W,type:"fade",mountOnEnter:!0,unmountOnExit:!0},i.default.createElement("div",{className:Z+"-popover-mask",onClick:K}))),i.default.createElement("div",{className:E(Z+"-popover",o,d+"-theme",V+"-mode",{bordered:B,"custom-content":"string"!=typeof h}),style:c,ref:te,onClick:function(){var e=ee.current;e?e&&k&&!R&&he():ve(!0)},onTouchStart:function(){R&&ee.current&&he()}},i.default.createElement(Re,{getContainer:function(){return"global"===V?document.body:te.current}},J&&le&&Ee(),i.default.createElement(Ue,{in:J&&!le,timeout:g,type:T,mountOnEnter:!0,unmountOnExit:!0},Ee())),i.default.createElement("div",{ref:ne,className:"popover-child-inner"},_)))})),ua=function(e){return t.forwardRef((function(n,r){var o=n.menu,a=n.menuLayout,l=void 0===a?"vertical":a,s=n.onSelect,d=n.onClickMenuItem,f=n.className,v=void 0===f?"":f,m=n.useClickStatus,h=void 0!==m&&m,p=n.clickStatusDuration,g=void 0===p?300:p,b=n.clickSelfToClose,y=void 0===b||b,w=n.touchSelfToClose,C=void 0===w?void 0!==n.touchToClose&&n.touchToClose:w,x=n.defaultVisible,T=void 0!==x&&x,N=n.visible,k=n.onChange,S=c(n,["menu","menuLayout","onSelect","onClickMenuItem","className","useClickStatus","clickStatusDuration","clickSelfToClose","touchSelfToClose","defaultVisible","visible","onChange"]),R=t.useContext(Te).prefixCls,M=t.useState(-1),L=M[0],O=M[1],_=t.useRef(0),I=t.useMemo((function(){return o.map((function(e){return"string"==typeof e?{text:e}:e}))}),[o]),B=t.useState(void 0===N?T:N),A=B[0],D=B[1];t.useEffect((function(){D(Boolean(N))}),[N]);var P=t.useRef(null);t.useImperativeHandle(r,(function(){return P.current}));var H=t.useMemo((function(){return i.default.createElement("div",{className:E(R+"-popover-menu-content",l+"-menu")},I.map((function(e,t){var n="string"==typeof e.text?e.text:"menu_item_"+t,r=e.text,a=e.value,l=void 0===a?n:a,u=e.disabled,c=void 0!==u&&u,f=e.icon;return i.default.createElement("div",{className:E(R+"-popover-menu-item",{disabled:c,active:L===t}),key:l,onTouchStart:function(){h&&!c&&(clearTimeout(_.current),O(t),_.current=window.setTimeout((function(){O(-1),_.current=0}),g))},onClick:function(){d&&d(l,o[t]),c||s&&s(l,o[t])}},f&&i.default.createElement("div",{className:E(R+"-popover-menu-icon")},f),i.default.createElement("div",{className:E(R+"-popover-menu-text")},r))})))}),[R,l,I,L,h,g,d,s]);return i.default.createElement(e,u({ref:P,visible:A,clickSelfToClose:y,touchSelfToClose:C,onChange:function(e){var t=function(){k&&"function"==typeof k&&k(e),void 0===N&&D(e)};!e&&h?window.setTimeout(t,Math.max(0,g-300)):t()}},S,{content:H,className:E(v,R+"-popover-menu")}))}))}(la),ca=G(la,{Menu:ua});var sa=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,a=e.visible,l=e.children,s=e.maskStyle,d=e.contentStyle,f=e.direction,v=void 0===f?"bottom":f,m=e.percentToClose,h=void 0===m?.3:m,p=e.distanceToClose,g=void 0===p?10:p,b=e.speedToClose,y=void 0===b?200:b,w=e.allowSwipeDirections,C=e.exitDirection,x=e.onTouchMove,T=e.onTouchStart,N=e.onTouchEnd,k=e.onOpen,S=e.onClose,R=e.close,M=c(e,["className","visible","children","maskStyle","contentStyle","direction","percentToClose","distanceToClose","speedToClose","allowSwipeDirections","exitDirection","onTouchMove","onTouchStart","onTouchEnd","onOpen","onClose","close"]),L=t.useState(a),O=L[0],_=L[1],I=$e({direction:"X",value:0}),B=I[0],A=I[1],D=I[2],P=t.useState(!1),H=P[0],F=P[1],V=t.useRef(null),j=t.useRef(0),z=t.useRef(0),q=t.useRef(0),W=t.useRef(!1),X=t.useCallback((function(e){var t,n=null===(t=V.current)||void 0===t?void 0:t.content,r=(null==n?void 0:n.offsetWidth)||0,o=(null==n?void 0:n.offsetHeight)||0;return"X"===e?r:o}),[]),Y=t.useCallback((function(e){var t=e.direction,n=e.value,r=X(t);return r?Math.max(0,Math.min(1,Math.abs(n)/r)):0}),[]),G=t.useMemo((function(){return Y(B)}),[B]),U=t.useMemo((function(){return void 0!==w?w:[v]}),[w,v]),K=t.useCallback((function(e){var t,n,r,o;T&&T(e)||(F(!1),W.current=!0,j.current=(null===(n=null===(t=e.touches)||void 0===t?void 0:t[0])||void 0===n?void 0:n.clientX)||0,z.current=(null===(o=null===(r=e.touches)||void 0===r?void 0:r[0])||void 0===o?void 0:o.clientY)||0,q.current=(new Date).getTime())}),[T]),Z=t.useCallback((function(e,t,n){return"X"===e?t>0?"right":"left":n>0?"bottom":"top"}),[]),$=t.useCallback((function(e,t,n){var r,o,i,a,l;if((!x||!x(e,t,n))&&(t||(W.current=!1),W.current&&e.target!==(null===(r=V.current)||void 0===r?void 0:r.mask))){var u=(null===(i=null===(o=e.changedTouches)||void 0===o?void 0:o[0])||void 0===i?void 0:i.clientX)||0,c=(null===(l=null===(a=e.changedTouches)||void 0===a?void 0:a[0])||void 0===l?void 0:l.clientY)||0,s=u<0?0:u-j.current,d=c-z.current,f=Z("x"===n?"X":"Y",s,d),v=U.includes(f)?f:"",m=C||v,h=["top","bottom"].includes(m)?"Y":"X",p=["bottom","right"].includes(m)?1:-1;switch(v){case"top":case"bottom":D({direction:h,value:Math.abs(d)*p});break;case"left":case"right":D({direction:h,value:Math.abs(s)*p})}}}),[x,U,C]),J=t.useCallback((function(e,t){var n=Z(e,t,t);return("left"===n||"top"===n?-1:1)*X(e)}),[]),Q=t.useCallback((function(e){if((!N||!N(e))&&W.current){W.current=!1;var t=(new Date).getTime(),n=A.current,r=n.direction,o=n.value,i=Y(A.current),a=o/(t-q.current)*1e3;i>0&&i>=h&&Math.abs(o)>g||Math.abs(a)>y?(F(!1),R(e),we((function(){D({direction:r,value:J(r,o)})}))):(F(!0),D({direction:"X",value:0})),q.current=0}}),[N,h,g,y,R]);return t.useImperativeHandle(n,(function(){return V.current})),t.useEffect((function(){var e,t=null===(e=V.current)||void 0===e?void 0:e.content;return O&&t&&(t.addEventListener("touchstart",K),t.addEventListener("touchend",Q),t.addEventListener("touchcancel",Q)),function(){var e,t=null===(e=V.current)||void 0===e?void 0:e.content;O&&t&&(t.removeEventListener("touchstart",K),t.removeEventListener("touchend",Q),t.removeEventListener("touchcancel",Q))}}),[O,K,Q]),i.default.createElement(ke,null,(function(e){var t,n=e.prefixCls;return i.default.createElement(Rt,u({ref:V,visible:a,close:R,className:E(n+"-popup-swiper",o,{"has-trans":H}),direction:v,onTouchMove:$,onOpen:function(){_(!0),null==k||k()},onClose:function(e){_(!1),D({direction:"X",value:0}),null==S||S(e)},maskStyle:u(u({},s||{}),{opacity:G?1-G:void 0}),contentStyle:(t=yt({transform:B.value?"translate"+B.direction+"("+B.value+"px) translateZ(2px)":void 0}),u(u({},d||{}),t))},M),l)}))}));var da,fa=G(sa,function(e){return{open:(t=e,xt(t,"ARCO_POPUP_SWIPER"))};var t}(Se(sa))),va=t.forwardRef((function(e,n){var r=e.mode,o=void 0===r?"base":r,a=Math.min(100,Math.max(e.percentage,0)),l=e.top,c=e.percentPosition,s=void 0===c?"right":c,d=e.className,f=void 0===d?"":d,v=e.style,m=e.showPercent,h=void 0===m?"base"===o:m,p=e.renderPercent,g=e.trackColor,b=e.progressColor,y=e.disabled,w=void 0!==y&&y,C=e.trackStroke,x=e.progressStroke,T=e.duration,N=void 0===T?300:T,k=e.step,S=void 0===k?1:k,R=e.filleted,M=void 0===R||R,L=e.mountedTransition,O=void 0===L||L,_=e.mountedBezier,I=void 0===_?[.34,.69,.1,1]:_,B=t.useRef(null),A=ut(O,a,N,I,S),D=A[0],P=A[1];function H(e){return h?"follow"===e?void 0!==p?p(D):i.default.createElement("div",{className:E("text-follow",{"inner-disabled inner-block-disabled":w}),style:{background:b}},D,"%"):e===s?i.default.createElement("div",{style:{color:b},className:E("text","text-"+s,{"text-disabled":w&&("left"===s||"right"===s)})},void 0!==p?p(D):D+"%"):null:null}function F(e){var t=e.prefixCls;return i.default.createElement("div",{role:"progressbar","aria-valuenow":a,"aria-valuemax":100,"aria-valuemin":0,className:E(t+"-progress",{"progress-fixed":"nav"===o},{"progress-disabled":w},f),style:u({top:l},v),ref:B},i.default.createElement("div",{className:"progress-wrapper"},H("left"),i.default.createElement("div",{style:{background:g,height:C},className:E("progress-track","position-"+s,{filleted:M},{"nav-mode":"nav"===o})},i.default.createElement("div",{style:yt({background:b,width:D+"%",height:x,transition:P?"width linear "+N/1e3+"s":""}),className:E("progress-bar",{"bar-disabled":w,filleted:M})},"follow"===s?i.default.createElement("div",{className:"wrapper"},H("follow")):null)),H("right"),H("innerLeft")))}return t.useImperativeHandle(n,(function(){return{dom:B.current}})),i.default.createElement(ke,null,F)}));!function(e){e[e.Static=0]="Static",e[e.Pulling=1]="Pulling",e[e.Loosing=2]="Loosing",e[e.Loading=3]="Loading",e[e.Finish=4]="Finish"}(da||(da={}));var ma=function(e){var n=e.onRefresh,r=e.loosingMinHeight,o=t.useState(da.Static),i=o[0],a=o[1],l=t.useRef(!1),u=t.useRef(null),c=t.useRef(null),s=t.useState(!1),d=s[0],f=s[1],v=t.useMemo((function(){var e,t;return null!==(t=null===(e=u.current)||void 0===e?void 0:e.getBoundingClientRect().height)&&void 0!==t?t:40}),[i]),m=t.useMemo((function(){return r||v}),[v,r]),h=t.useCallback((function(){return l.current=!0,Vo.Promise.all([null==n?void 0:n(),new Vo.Promise((function(e){setTimeout((function(){e()}),500)}))])}),[n]);return{status:i,setStatus:a,touching:d,setTouching:f,loadingRef:l,labelRef:u,domRef:c,loosingHeight:m,handleRefresh:h,tipsHeight:v}},ha=function(e){var n=e.domRef,r=e.handleTouchStart,o=e.handleTouchMove,i=e.handleTouchEnd;t.useEffect((function(){var e;return null===(e=n.current)||void 0===e||e.addEventListener("touchstart",r,{passive:!1}),function(){var e;null===(e=n.current)||void 0===e||e.removeEventListener("touchstart",r)}}),[o]),t.useEffect((function(){var e;return null===(e=n.current)||void 0===e||e.addEventListener("touchmove",o,{passive:!1}),function(){var e;null===(e=n.current)||void 0===e||e.removeEventListener("touchmove",o)}}),[o]),t.useEffect((function(){var e,t;return null===(e=n.current)||void 0===e||e.addEventListener("touchend",i),null===(t=n.current)||void 0===t||t.addEventListener("touchcancel",i),function(){var e,t;null===(e=n.current)||void 0===e||e.removeEventListener("touchend",i),null===(t=n.current)||void 0===t||t.removeEventListener("touchcancel",i)}}),[i])},pa=function(e){var n=e.allowPullWhenNotTop,r=e.domRef,o=t.useCallback((function(){var e,t,o,i=null!==(o=null===(t=null===(e=r.current)||void 0===e?void 0:e.getBoundingClientRect())||void 0===t?void 0:t.height)&&void 0!==o?o:0;return r.current&&!(!n&&(r.current.scrollTop<0||r.current.scrollTop>r.current.scrollHeight-i))}),[n]);return{ifShouldHandle:o}},ga=t.forwardRef((function(e,n){var r,o=t.useContext(Te),a=o.prefixCls,l=o.locale,c=void 0===l?J:l,s=t.useRef(0),d=e.className,f=e.style,v=e.children,m=e.loadingText,h=void 0===m?i.default.createElement("div",{className:E(a+"-pull-refresh-label-text")},i.default.createElement(Dt,{type:"circle",radius:4}),i.default.createElement("span",null,c.PullRefresh.loadingText)):m,p=e.pullingText,g=void 0===p?i.default.createElement("div",{className:E(a+"-pull-refresh-label-text")},i.default.createElement("span",null,c.PullRefresh.pullingText)):p,b=e.finishText,y=void 0===b?i.default.createElement("div",{className:E(a+"-pull-refresh-label-text")},i.default.createElement("span",null,c.PullRefresh.finishText)):b,w=e.initialText,C=e.finishDelay,x=void 0===C?300:C,T=e.disabled,N=void 0!==T&&T,k=e.loosingMinHeight,S=e.useHideAsNestedScroll,R=void 0===S||S,M=e.allowPullWhenNotTop,L=void 0!==M&&M,O=e.onRefresh,_=t.useRef(0),I=t.useRef(da.Static),B=t.useState({}),A=B[0],D=B[1],P=t.useState(0),H=P[0],F=P[1],V=ma({loosingMinHeight:k,onRefresh:O}),j=V.loadingRef,z=V.status,q=V.setStatus,W=V.labelRef,X=V.domRef,Y=V.touching,G=V.setTouching,U=V.loosingHeight,K=V.tipsHeight,Z=V.handleRefresh,$=pa({domRef:X,allowPullWhenNotTop:L}).ifShouldHandle,Q=t.useMemo((function(){var e,t;return R&&!Y&&z===da.Pulling&&(null!==(t=null===(e=null==X?void 0:X.current)||void 0===e?void 0:e.scrollTop)&&void 0!==t?t:0)>0||N?u(u({},A),{opacity:0}):A}),[A,R,Y,N]),ee=((r={})[da.Static]=void 0===w?g:w,r[da.Pulling]=g,r[da.Loading]=h,r[da.Finish]=y,r),te=t.useCallback((function(e,t){void 0===t&&(t=function(){}),s.current===e&&D({position:"relative",height:"0px",top:0,transition:"height .45s"}),setTimeout((function(){s.current===e&&(X.current&&(X.current.style.overflow="auto"),q(da.Pulling),D({position:"absolute",top:"-"+K+"px",height:K+"px",transition:"height 0s"}),I.current=da.Static,j.current=!1,t())}),450)}),[K]),ne=t.useCallback((function(){!N&&!j.current&&X.current&&$()&&(G(!0),X.current&&0===X.current.scrollTop&&(X.current.scrollTop=1))}),[N,$]),re=function(){return new Promise((function(e){if(X.current){X.current.style.overflow="hidden";var t=(new Date).getTime();q(da.Loading),D({position:"relative",top:0,height:K+"px",transition:"height 0s"}),s.current=t,Z().then((function(){ee[da.Finish]?(q(da.Finish),setTimeout((function(){te(t,e)}),x)):te(t,e)}))}}))},oe=t.useCallback((function(){N||j.current||!X.current||(G(!1),I.current===da.Loosing&&re())}),[N,K]),ie=t.useCallback((function(){N||j.current||!X.current||setTimeout((function(){var e,t,n,r,o=-(null!==(t=null===(e=X.current)||void 0===e?void 0:e.scrollTop)&&void 0!==t?t:0)>U;o&&(_.current=null!==(r=null===(n=X.current)||void 0===n?void 0:n.scrollTop)&&void 0!==r?r:0),I.current=o?da.Loosing:da.Pulling}))}),[N,U]),ae=t.useCallback((function(){if(X.current){var e=X.current.getBoundingClientRect().height;F(e)}}),[]);return Ke(ae),t.useImperativeHandle(n,(function(){return{dom:X.current,refresh:re,updateIOSHeight:ae}})),t.useEffect((function(){ae(),te(s.current)}),[]),ha({domRef:X,handleTouchStart:ne,handleTouchMove:ie,handleTouchEnd:oe}),i.default.createElement("div",{className:E(a+"-pull-refresh all-border-box is-ios",d,{"is-disabled":N||!Y&&R}),ref:X,style:H>0?u({height:H},f||{}):f},i.default.createElement("div",{className:E(a+"-pull-refresh-content-wrapper")},i.default.createElement("div",{className:E(a+"-pull-refresh-label-wrapper"),style:Q},i.default.createElement("div",{className:E(a+"-pull-refresh-label"),ref:W},ee[z])),i.default.createElement("div",{className:E(a+"-pull-refresh-content"),style:H>0?{minHeight:H+1+"px"}:{}},v)))})),ba=t.forwardRef((function(e,n){var r,o=t.useContext(Te),a=o.prefixCls,l=o.locale,u=void 0===l?J:l,c=e.className,s=e.style,d=e.children,f=e.loosingText,v=void 0===f?i.default.createElement("div",{className:E(a+"-pull-refresh-label-text")},i.default.createElement("span",null,u.PullRefresh.loosingText)):f,m=e.loadingText,h=void 0===m?i.default.createElement("div",{className:E(a+"-pull-refresh-label-text")},i.default.createElement(Dt,{type:"circle",radius:4}),i.default.createElement("span",null,u.PullRefresh.loadingText)):m,p=e.pullingText,g=void 0===p?i.default.createElement("div",{className:E(a+"-pull-refresh-label-text")},i.default.createElement("span",null,u.PullRefresh.pullingText)):p,b=e.finishText,y=void 0===b?i.default.createElement("div",{className:E(a+"-pull-refresh-label-text")},i.default.createElement("span",null,u.PullRefresh.finishText)):b,w=e.initialText,C=e.finishDelay,x=void 0===C?300:C,T=e.loosingMinHeight,N=e.dampRate,k=void 0===N?4:N,S=e.disabled,R=void 0!==S&&S,M=e.useHideAsNestedScroll,L=void 0===M||M,O=e.onRefresh,_=e.allowPullWhenNotTop,I=void 0!==_&&_,B=t.useState({}),A=B[0],D=B[1],P=t.useRef(null),H=t.useRef(0),F=t.useRef(!1),V=ma({loosingMinHeight:T,onRefresh:O}),j=V.loadingRef,z=V.status,q=V.setStatus,W=V.labelRef,X=V.domRef,Y=V.touching,G=V.setTouching,U=V.loosingHeight,K=V.handleRefresh,Z=V.tipsHeight,$=pa({domRef:X,allowPullWhenNotTop:I}).ifShouldHandle,Q=t.useMemo((function(){var e,t;return L&&!Y&&z===da.Pulling&&(null!==(t=null===(e=null==X?void 0:X.current)||void 0===e?void 0:e.scrollTop)&&void 0!==t?t:0)>0?{opacity:0}:{}}),[L,Y]),ee=((r={})[da.Static]=void 0===w?g:w,r[da.Pulling]=g,r[da.Loosing]=v||g,r[da.Loading]=h,r[da.Finish]=y,r),te=function(e,t,n){if(e<5){if(e<0)return void(H.current=0);if(0===t)return setTimeout((function(){D({transition:"all 0s"})})),void(H.current=0)}var r=function(e,t,n){return e>t?t+(e-t)/n:e}(e,U,k);H.current=r,D({transform:r?"translateY("+r+"px)":"",transition:"all "+t/1e3+"s"}),setTimeout((function(){null==n||n()}),t)},ne=function(e){void 0===e&&(e=function(){}),te(0,300,(function(){X.current&&X.current.scrollTop<0&&(X.current.scrollTop=0),j.current=!1,q(da.Static),e()}))},re=t.useCallback((function(e){var t;if(!(R||P.current||j.current)&&X.current&&$()){G(!0),0===X.current.scrollTop&&(X.current.scrollTop=1);var n=e.touches[0],r=n.pageX,o=n.pageY;r&&o&&(P.current={start:null===(t=X.current)||void 0===t?void 0:t.scrollTop,x:r,y:o}),q(da.Pulling)}}),[R,$]),oe=function(){return new Promise((function(e){q(da.Loading),we((function(){te(Z,300),K().then((function(){ee[da.Finish]?(q(da.Finish),setTimeout((function(){ne(e)}),x)):ne(e)}))}))}))},ie=t.useCallback((function(){(0!==H.current||$())&&(F.current=!1,G(!1),R||!P.current||j.current||(P.current=null,z===da.Loosing?oe():ne()))}),[R,z,Z,$]),ae=t.useCallback((function(e){if(F.current=!0,!R&&!j.current&&X.current&&P.current){var t=e.touches[0].pageY-P.current.y-P.current.start;0===H.current&&X.current.scrollTop>0||0===H.current&&t<0||(q((function(){return t>U?da.Loosing:da.Pulling})),te(t,0),e.stopPropagation(),e.cancelable&&e.preventDefault())}}),[R,U]);return t.useEffect((function(){var e,t=function(){F.current&&X.current&&(X.current.scrollTop<0||H.current)&&(X.current.scrollTop=0)};return null===(e=X.current)||void 0===e||e.addEventListener("scroll",t),function(){var e;null===(e=X.current)||void 0===e||e.removeEventListener("scroll",t)}}),[]),t.useImperativeHandle(n,(function(){return{dom:X.current,refresh:oe,updateIOSHeight:function(){console.warn('updateIOSHeight 仅在 type="ios" 时可用')}}})),ha({domRef:X,handleTouchStart:re,handleTouchMove:ae,handleTouchEnd:ie}),i.default.createElement("div",{className:E(a+"-pull-refresh all-border-box is-android",c,{"is-disabled":(R||!Y&&L)&&z!==da.Loading}),style:s,ref:X},i.default.createElement("div",{className:E(a+"-pull-refresh-place"),style:yt(A)},i.default.createElement("div",{className:E(a+"-pull-refresh-label"),ref:W,style:Q},ee[z]),i.default.createElement("div",{className:E(a+"-pull-refresh-content",{"is-loading":[da.Loading,da.Finish].includes(z)})},d)))})),ya=t.forwardRef((function(e,t){var n=e.type,r=e.useIosOptimize,o=e.children,a=c(e,["type","useIosOptimize","children"]),l=et(),s="ios"===n||r&&"ios"===(n||l)?ga:ba;return i.default.createElement(s,u({},u(u({},a),{ref:t})),o)}));function Ea(e,t){var n=e.keyword,r=e.highlightClassName,o=e.highlightStyle;return i.default.createElement("span",{className:r,style:o,key:t},n)}function wa(e){var t,n,r=e.prefixCls,o=e.associationItems,a=void 0===o?[]:o,l=e.highlightClassName,s=e.highlightMode,d=void 0===s?"none":s,f=e.highlightStyle,v=e.onAssociationClick,m=e.onAssociationItemClick,h=e.renderAssociation,p=e.renderAssociationItem,g=e.keyword,b=e.visible,y=r+"-association",w=y+"-item-highlight",C=function(e){if(!e||!g||"none"===d)return e;var t={keyword:g,content:e,highlightClassName:l||w,highlightStyle:f};return"contain"===d?function(e){var t=e.content,n=void 0===t?"":t,r=e.keyword,o=void 0===r?"":r,i=n.split(o),a=i.reduce((function(t,n,r){return t.push(n),r!==i.length-1&&t.push(Ea(e,r)),t}),[]);return a}(t):"prefix"===d?function(e){for(var t=e.content,n=void 0===t?"":t,r=e.keyword,o=void 0===r?"":r,i=c(e,["content","keyword"]),a=-1,l=0;l<o.length&&!(l>=n.length||n[l]!==o[l]);l++)a=l;return a>-1?[Ea(u(u({},i),{keyword:n.substring(0,a+1)}),0),n.substring(a+1)]:n}(t):"function"==typeof d?d(e,g,w):e},x=function(e,t){var n=e.content,r=n;return"string"==typeof n&&"none"!==d&&(r=C(n)),p&&(r=p(e,t,r)),i.default.createElement("div",{key:t,className:y+"-item",onClick:function(){return null==m?void 0:m(e,t)}},r)};return i.default.createElement("div",{className:E(y,(t={},t[y+"-visible"]=b,t)),onClick:v},(n=a.map(x),h?h(n):n))}function Ca(e){var n=e.className,r=e.onCancel,o=e.focusing,a=e.currentInputValue,l=e.text,u=t.useState(o||Boolean(a)),c=u[0],s=u[1];return t.useEffect((function(){s(o||Boolean(a))}),[o,a]),c?i.default.createElement("span",{className:n,onClick:function(){null==r||r(),we((function(){s(!1)}))}},l):null}var xa=t.forwardRef((function(e,n){var r=t.useContext(Te),o=r.prefixCls,a=r.locale,l=o+"-search-bar",s=e.inputClass,d=e.inputStyle,f=e.type,v=void 0===f?"search":f,m=e.nativeProps,h=e.id,p=e.name,g=e.maxLength,b=e.placeholder,y=void 0===b?null==a?void 0:a.SearchBar.placeholder:b,w=e.readOnly,C=e.onKeyUp,x=e.onKeyPress,T=e.disabled,N=e.pattern,k=e.prefix,S=void 0===k?i.default.createElement(qo,{className:l+"-search-icon"}):k,R=e.append,M=e.textAlign,L=void 0===M?"left":M,O=e.actionButton,_=e.clearable,I=void 0===_||_,B=e.clearShowType,A=void 0===B?"value":B,D=e.shape,P=void 0===D?"square":D,H=e.className,F=e.enableAssociation,V=void 0!==F&&F,j=e.associationVisible,z=e.associationShowType,q=void 0===z?"default":z,W=e.associationItems,X=e.highlightClassName,Y=e.highlightMode,G=e.highlightStyle,U=e.onCancel,K=e.onAssociationClick,Z=e.onAssociationItemClick,$=e.renderAssociation,J=e.renderAssociationItem,Q=c(e,["inputClass","inputStyle","type","nativeProps","id","name","maxLength","placeholder","readOnly","onKeyUp","onKeyPress","disabled","pattern","prefix","append","textAlign","actionButton","clearable","clearShowType","shape","className","enableAssociation","associationVisible","associationShowType","associationItems","highlightClassName","highlightMode","highlightStyle","onCancel","onAssociationClick","onAssociationItemClick","renderAssociation","renderAssociationItem"]),ee=t.useRef(null),te=Oo(u({className:E(H,l+"-"+P),prefix:S,clearable:I,append:function(e,t){var n=null;n="function"==typeof R?R(e,t):R;var r=void 0===O?i.default.createElement(Ca,{focusing:e,currentInputValue:t,className:l+"-cancel-btn",onCancel:U,text:null==a?void 0:a.SearchBar.cancelBtn}):O;return i.default.createElement(i.default.Fragment,null,n,r,V?i.default.createElement(wa,{prefixCls:l,keyword:t,visible:me,associationItems:W,highlightClassName:X,highlightMode:Y,highlightStyle:G,onAssociationClick:K,onAssociationItemClick:Z,renderAssociation:$,renderAssociationItem:J}):null)},clearShowType:A},Q),ee),ne=te.inputValue,re=te.handleChange,oe=te.handleInput,ie=te.handleKeyDown,ae=te.handleFocus,le=te.handleBlur,ue=te.handleClick,ce=te.renderWrapper,se=te.wrapRef,de=t.useState("always"===q||("value"===q||"default"===q)&&Boolean(ne)),fe=de[0],ve=de[1],me=null!=j?j:fe;t.useImperativeHandle(n,(function(){return{dom:se.current,input:ee.current,toggleAssociation:function(e){ve(null!=e?e:!fe)}}}));var he=function(e,t){"always"===q?ve(!0):"focus"===q?ve(e):"default"===q?ve(e&&Boolean(t)):"value"===q&&ve(Boolean(t))},pe=function(e){he(!0,e.target.value),ae(e)},ge=function(e){he(!1,e.target.value),le(e)},be=function(e){var t=e.target.value;he(Boolean(t),t),re(e)},ye=function(){return ce(l,v,i.default.createElement("input",u({},m,{id:h,name:p,maxLength:g,placeholder:y,readOnly:w,onFocus:pe,onBlur:ge,onKeyUp:C,onKeyPress:x,ref:ee,className:E(l+"-input",s,l+"-input-"+L),style:d,value:ne,type:v,disabled:T,pattern:N,onChange:be,onInput:oe,onKeyDown:ie,onClick:ue})))};return i.default.createElement(ke,null,ye)}));function Ta(e,t,n){var r=1e17,o=e*r,i=t*r;return"-"===n?(o-i)/r:(o+i)/r}var Na=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,a=e.style,l=e.inputStyle,u=e.inputClass,c=void 0===u?"":u,s=e.value,d=e.defaultValue,f=void 0===d?1:d,v=e.allowEmpty,m=void 0!==v&&v,h=e.digits,p=void 0===h?0:h,g=e.disabled,b=void 0!==g&&g,y=e.inputReadonly,w=void 0!==y&&y,C=e.max,x=void 0===C?1/0:C,T=e.min,N=void 0===T?1:T,k=e.equalLimitDisabled,S=void 0!==k&&k,R=e.step,M=void 0===R?1:R,L=e.theme,O=void 0===L?"default":L,_=e.formatter,I=e.addButton,B=e.minusButton,A=e.renderContent,D=e.onBlur,P=e.onChange,H=e.onFocus,F=e.onAddButtonClick,V=e.onMinusButtonClick,j=e.onClick,z=e.onInput,q=function(e){var n=e.defaultValue,r=e.formatter,o=e.max,i=e.min,a=e.value,l=e.digits,u=t.useState(n),c=u[0],s=u[1],d=void 0!==a?a:c;return{updateValue:function(e){var t="function"==typeof e?e(c):e;r?new Promise((function(e){e(r(Number(t)))})).then((function(e){var t=Math.max(i,Math.min(o,e));s(t)})):s(t)},actualInputValue:d,showValue:d===Number.MIN_VALUE?"":l>0?parseFloat(String(d)).toFixed(l):d}}({defaultValue:f,formatter:_,min:N,max:x,value:s,digits:p}),W=q.updateValue,X=q.actualInputValue,Y=q.showValue,G=function(e){var n=e.actualInputValue,r=e.min,o=e.max,i=e.step,a=e.disabled,l=e.equalLimitDisabled,u=e.updateValue,c=e.onAddButtonClick,s=e.onMinusButtonClick,d=t.useState((function(){return n===r||a})),f=d[0],v=d[1],m=t.useState((function(){return n===o||a})),h=m[0],p=m[1];return t.useEffect((function(){v(n<=r),p(n>=o)}),[n]),{minusButtonDisable:f,addButtonDisable:h,handleMinusButtonClick:function(e){f||(u((function(e){var t=Ta(e,i,"-");return t<r?l?e:r:t})),s&&s(e))},handleAddButtonClick:function(e){h||(u((function(e){var t=Ta(Number(e),i,"+");return t>o?l?e:o:t})),c&&c(e))}}}({actualInputValue:X,min:N,max:x,step:M,disabled:b,digits:p,equalLimitDisabled:S,updateValue:W,onAddButtonClick:F,onMinusButtonClick:V}),U=G.minusButtonDisable,K=G.addButtonDisable,Z=G.handleAddButtonClick,$=G.handleMinusButtonClick,J=function(e){var t=e.defaultValue,n=e.min,r=e.max,o=e.digits,i=e.actualInputValue,a=e.allowEmpty,l=e.updateValue,u=e.onBlur,c=e.onChange,s=e.onInput;return Je((function(){c&&c(i)}),[i]),{handleInput:function(e){var t=e.target.value,n=Number(t),r=t.indexOf(".");if(o>0&&-1!==r){var u=t.slice(r+1).length;l(u>o?i:n)}else l(a&&""===t?Number.MIN_VALUE:n);s&&s(e)},handleBlur:function(e){var o=e.target.value,i=Number(o);l(a&&""===o?Number.MIN_VALUE:a||""!==o?Math.max(n,Math.min(r,i)):t),u&&u(e)}}}({defaultValue:f,min:N,max:x,digits:p,actualInputValue:X,allowEmpty:m,updateValue:W,onBlur:D,onChange:P,onInput:z}),Q=J.handleInput,ee=J.handleBlur,te=t.useRef(null),ne=t.useRef(null);return t.useImperativeHandle(n,(function(){return{dom:te.current,input:ne.current,changeValue:function(e){var t=null!=e?e:f;t=Math.min(x,Math.max(t,N)),W(t)}}})),i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return i.default.createElement("div",{className:E(t+"-stepper",t+"-"+O,o),style:a,ref:te,onClick:j},i.default.createElement("div",{"aria-label":"decrease",onClick:$},B||i.default.createElement("div",{className:E(t+"-stepper-minus-button")},i.default.createElement(jo,{className:E(t+"-stepper-minus-button-icon",{disabled:U})}))),A?A(X):i.default.createElement("input",{style:l,className:E(t+"-stepper-input",c),onFocus:H,onInput:Q,onBlur:ee,disabled:b,value:Y,readOnly:w,ref:ne,type:"number",role:"spinbutton","aria-valuenow":Number(Y),"aria-valuemax":x,"aria-valuemin":N}),i.default.createElement("div",{"aria-label":"increase",onClick:Z},I||i.default.createElement("div",{className:E(t+"-stepper-add-button")},i.default.createElement(Xo,{className:E(t+"-stepper-add-button-icon",{disabled:K})}))))}))})),ka=G(Na,"Stepper"),Sa=t.forwardRef((function(e,n){var r=e.title,o=e.description,a=e.icon,l=t.useContext(Ra),u=l.iconType,c=l.current,s=l.direction,d=l.index,f=void 0===d?0:d,v=l.status,m=l.align,h=l.changeIndex,p=e.status||v,g=e.align||m,b=t.useRef(null);t.useImperativeHandle(n,(function(){return{dom:b.current}}));var y=t.useMemo((function(){return p||(c<f?"wait":c===f?"process":"finish")}),[p,f,c]);return i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return i.default.createElement("div",{ref:b,className:E(t+"-steps-item",t+"-steps-item-align-"+g,y,s,u),onClick:function(){return h(f)}},i.default.createElement("div",{className:E(t+"-steps-item-tail",t+"-steps-item-tail-status-"+y,t+"-steps-item-tail-align-"+g,y+"-tail-color-with-config")}),a?i.default.createElement("div",{className:E(t+"-steps-item-custom-icon",y+"-custom-icon-bg-color-with-config")},a):i.default.createElement("div",{className:E(t+"-steps-item-icon",y+"-bg-color-with-config")},"number"===u?function(e){var t;return"finish"===y?t=i.default.createElement(Yo,null):"error"===y&&(t=i.default.createElement(Go,null)),t||i.default.createElement("span",{className:E(e+"-steps-item-icon-num")},f+1)}(t):i.default.createElement("span",{className:E(t+"-steps-item-icon-dot")})),r||o?i.default.createElement("div",{className:E(t+"-steps-item-content",t+"-steps-item-content-align-"+g)},r?i.default.createElement("div",{className:E(t+"-steps-item-title",y+"-title-color-with-config")},r):null,o?i.default.createElement("div",{className:E(t+"-steps-item-description")},o):null):null)}))})),Ra=t.createContext({changeIndex:function(){}}),Ma=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,a=e.style,l=e.children,c=e.direction,s=void 0===c?"horizontal":c,d=e.align,f=e.iconType,v=void 0===f?"number":f,m=e.current,h=e.defaultIndex,p=void 0===h?0:h,g=e.status,b=void 0===g?"process":g,y=e.items,E=e.onClick,w=e.onChange,C=void 0!==d?d:"vertical"===s?"start":"center",x=t.useState(Number(p)),T=x[0],N=x[1],k=$e(void 0===m?T:m),S=k[0],R=k[1],M=k[2],L=t.useRef(null),O=et();function _(e){null==E||E(e),N(e),e!==R.current&&(null==w||w(e))}t.useImperativeHandle(n,(function(){return{dom:L.current}})),t.useEffect((function(){M(void 0===m?T:m)}),[m,T]);var I=t.useCallback((function(e,t){return i.default.createElement(Ra.Provider,{value:{iconType:v,current:S,direction:s,index:t,status:S===t?b:void 0,align:C,changeIndex:_},key:t},e)}),[v,S,s,C]);return i.default.createElement(ke,null,(function(e){var n=e.prefixCls;return i.default.createElement("div",{className:n+"-steps all-border-box "+o+" "+s+" "+O,style:a,ref:L},y?y.map((function(e,t){return I(i.default.createElement(Sa,u({},e,{key:t})),t)})):t.Children.toArray(l).map((function(e,t){return I(e,t)})))}))})),La=G(Ma,{Step:Sa}),Oa=t.forwardRef((function(e,n){var r=e.position,o=void 0===r?"top":r,a=e.topOffset,l=void 0===a?0:a,c=e.bottomOffset,s=void 0===c?0:c,d=e.followOffset,f=void 0===d?0:d,v=e.children,m=e.className,h=e.style,p=e.zIndex,g=void 0===p?100:p,b=e.portalWhenSticky,y=void 0!==b&&b,w=e.stickyStyle,C=void 0===w?"fixed":w,x=e.stickyCssStyle,T=e.getPortalContainer,N=e.getContainer,k=e.getScrollContainer,S=e.onStickyStateChange,R=e.onTopChange,M=$e(!1),L=M[0],O=M[1],I=M[2],B=$e(!1),A=B[0],D=B[1],P=B[2],H=t.useState({}),V=H[0],j=H[1],q=t.useRef(null),W=t.useRef(null),X=t.useRef(0),Y=t.useRef(null),G=t.useRef(null),U=t.useRef(!1),K=t.useCallback((function(e){var t=e.followTop,n=e.followBottom;if(q.current){var r="top"===o||"both"===o,i="bottom"===o||"both"===o,a=W.current.getBoundingClientRect(),c=q.current.getBoundingClientRect(),d=c.height;X.current=c.height;var v=z(G.current).containerRect,m=v.top,h=v.bottom,p=v.height,b=a.top-m,y=a.top+d-h,E=n-f-d-l-m,w=p-t-f-d-s;P(Boolean(O.current));var T=!!r&&(b<=l&&n>m+f),N=!!i&&(y>=-s&&t<h-f),k=T||N,M=("absolute"===C?0:m)+l,L=("absolute"===C?0:window.innerHeight-h)+s,_={};k&&(_=u(u(u(u({transform:"translateZ(0)",WebkitTransform:"translateZ(0)",position:"absolute"===C?"absolute":"fixed",zIndex:g},T?{top:E>0?M:M+E}:{}),N?{bottom:w>0?L:L+w}:{}),{left:a.left,width:a.width}),x||{})),null==R||R(Math.max(0,c.top-m-l)),I(k),j(_),k!==D.current&&S&&S({isTopSticky:T,isBottomSticky:N,isSticky:k,wasSticky:D.current})}}),[o,l,s,f,g,C,S,R,x]),Z=t.useCallback((function(){U.current||(_((function(){if(U.current=!1,Y.current){var e=Y.current.getBoundingClientRect(),t=e.top,n=e.bottom;K({followTop:t,followBottom:n})}})),U.current=!0)}),[K]);t.useEffect((function(){var e=F(N);Y.current=e||document.body;var t=k?F(k):window;if(t){G.current=t;return t.addEventListener("scroll",Z),Z(),function(){!function(e){e.removeEventListener("scroll",Z)}(t)}}}),[N,k,Z]),t.useEffect((function(){W.current&&(W.current.style.height=(O.current?X.current:0)+"px")}),[L,A]),t.useImperativeHandle(n,(function(){return{dom:q.current,recalculatePosition:Z}}),[Z]);var $=t.useMemo((function(){return u(u({},h||{}),V)}),[V,h]);function J(e){return i.default.createElement("div",{className:E(e+"-sticky",m),ref:q,style:$},v)}return i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return i.default.createElement("div",null,i.default.createElement("div",{ref:W}),y&&L?i.default.createElement(Re,{getContainer:T},J(t)):J(t))}))}));function _a(e){var t=e.action,n=e.prefixCls,r=e.index,o=e.type,a=e.close,l=t.text,c=t.style,s=t.className,d=t.onClick,f=t.icon,v=t.children;return i.default.createElement("div",{className:E(n+"-"+o+" "+n+"-info-container",s),style:u({zIndex:r},c),onClick:function(){var e=(null==d?void 0:d())||null;e&&"boolean"!=typeof e?e&&e.then&&e.then((function(e){return!e&&a()})):!e&&a()}},v||i.default.createElement("div",{className:n+"-info"},f?i.default.createElement("div",{className:n+"-info-icon"},f):null,l?i.default.createElement("div",{className:n+"-info-text"},l):null))}var Ia=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,a=e.style,l=e.children,c=e.leftActions,s=e.rightActions,d=e.disabled,f=void 0!==d&&d,v=e.threshold,m=void 0===v?.15:v,h=e.closeOnTouchOutside,p=e.transitionDuration,g=void 0===p?300:p,b=e.dampRate,y=void 0===b?15:b,w=e.openStyleType,C=void 0===w?"layer":w,x=e.onClose,T=e.onOpen,N=t.useRef(null),k=t.useRef(null),S=t.useRef(null),R=t.useRef(!1),M=t.useRef(0),L=t.useState([]),O=L[0],_=L[1],I=t.useRef(0),B=t.useState([]),A=B[0],D=B[1],P=Qe(y),H=t.useRef(!1),F=t.useRef(null),V=$e(!1),j=V[0],z=V[1],q=V[2],W=$e(0),X=W[0],Y=W[1],G=W[2],U=t.useContext(Te).prefixCls,K=t.useRef(0),Z=t.useRef(0),$=t.useRef(0),J=t.useRef(0),Q="layer"===C,ee=t.useMemo((function(){return yt({transitionDuration:j?"0ms":g+"ms"})}),[j,g]);function te(e){K.current=Y.current,Z.current=0,$.current=0,J.current=0,F.current=null,Z.current=e.touches[0].pageX,$.current=e.touches[0].pageY}function ne(e){var t,n,r,o,i=e.changedTouches[0].pageX-Z.current,a=e.changedTouches[0].pageY-$.current;if(null===F.current&&(F.current=Math.abs(i)<Math.abs(a)),F.current)return q(!1),void G(0);e.cancelable&&e.preventDefault(),J.current=i,H.current=!0,q(!0),G((t=J.current+K.current,n=-I.current,r=M.current,o=Math.abs(t)/P.current,Math.min(Math.max(t,n-o),r+o)))}function re(){if(z.current&&!F.current){var e=Y.current>0?"left":"right";t=e,n=R.current?1-m:m,(r="left"===t?M.current:I.current)&&Math.abs(Y.current)>r*n?ae(t):ie(t),q(!1),we((function(){H.current=!1}))}var t,n,r}function oe(e){if(!e.current)return{totalWidth:0,widthArr:[]};var t=0,n=[],r=e.current.getElementsByClassName(U+"-swipe-action-menu-action-info-container");return Array.prototype.forEach.call(r,(function(e){var r,o=null!==(r=e.getBoundingClientRect().width)&&void 0!==r?r:0;t+=o,n.push(o)})),{totalWidth:t,widthArr:n}}function ie(e){if(G(0),R.current){if(R.current=!1,!e&&0!==Y.current)return void le(Y.current>0?"left":"right");le(e)}}function ae(e){void 0===e&&(e="right"),R.current||(R.current=!0,function(e){setTimeout((function(){null==T||T(e)}),g)}(e)),G("left"===e?M.current:-I.current)}function le(e){setTimeout((function(){null==x||x(e)}),g)}function ue(e){return 100*(O.slice(e+1).reduce((function(e,t){return e+t}),0)/M.current||0)+"%"}function ce(e){return 100*(A.slice(0,e).reduce((function(e,t){return e+t}),0)/I.current||0)+"%"}return t.useEffect((function(){var e=N.current;return!f&&e&&(e.addEventListener("touchstart",te),e.addEventListener("touchmove",ne),e.addEventListener("touchend",re)),function(){!f&&e&&(e.removeEventListener("touchstart",te),e.removeEventListener("touchmove",ne),e.removeEventListener("touchend",re))}}),[f]),t.useEffect((function(){var e=oe(k),t=e.totalWidth,n=e.widthArr;M.current=t,_(n);var r=oe(S),o=r.totalWidth,i=r.widthArr;I.current=o,D(i)}),[c,s]),t.useEffect((function(){var e=function(e){var t;!(null===(t=N.current)||void 0===t?void 0:t.contains(e.target))&&R.current&&ie()};return h&&document.addEventListener("touchstart",e),function(){h&&document.removeEventListener("touchstart",e)}}),[h]),t.useImperativeHandle(n,(function(){return{dom:N.current,close:ie,open:ae}})),i.default.createElement("div",{className:E(U+"-swipe-action",o,0===X?"action-close":"action-open"),style:yt(u(u(u({},a||{}),ee),{transform:"translateX("+X+"px)"})),ref:N,onClick:function(e){var t,n;!R.current||H.current||(null===(t=k.current)||void 0===t?void 0:t.contains(e.target))||(null===(n=S.current)||void 0===n?void 0:n.contains(e.target))||ie()}},i.default.createElement("div",{className:E(U+"-swipe-action-menu-left",U+"-swipe-action-menu",X>0?"action-open":"action-close"),ref:k,style:Q&&X>=0?u({width:X},ee):{}},null==c?void 0:c.map((function(e,t){return i.default.createElement(_a,{action:u(u({},e||{}),{style:u(u({},Q?{right:ue(t)}:{}),e.style||{}),className:E(e.className,"open-style-"+C)}),prefixCls:U+"-swipe-action-menu-action",index:c.length-t,type:"left",close:ie,key:t})}))),i.default.createElement("div",{className:U+"-swipe-action-content"},l),i.default.createElement("div",{className:E(U+"-swipe-action-menu-right",U+"-swipe-action-menu",X<0?"action-open":"action-close"),ref:S,style:Q&&X<=0?u({width:-1*X},ee):{}},null==s?void 0:s.map((function(e,t){return i.default.createElement(_a,{action:u(u({},e||{}),{style:u(u({},Q?{left:ce(t)}:{}),e.style||{}),className:E(e.className,"open-style-"+C)}),prefixCls:U+"-swipe-action-menu-action",index:t+1,type:"right",close:ie,key:t})}))))})),Ba=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,a=e.maxElementOffset,l=void 0===a?56:a,u=e.maxLabelOffset,c=void 0===u?40:u,s=e.onConfirm,d=e.disabled,f=void 0!==d&&d,v=e.circleSize,m=void 0===v?80:v,h=e.minConfirmOffset,p=void 0===h?30:h,g=e.labelAnimationFunction,b=void 0===g?"cubic-bezier(0.14, 1, 0.34, 1)":g,y=e.labelAnimationDuration,w=void 0===y?250:y,C=e.children,x=e.normalText,T=void 0===x?"":x,N=e.activeText,k=void 0===N?"":N,S=e.initPos,R=void 0===S?0:S,M=t.useContext(Te).locale,L=void 0===M?J:M,O=t.useState(f),_=O[0],I=O[1],B=t.useState(0),A=B[0],D=B[1],P=t.useRef(null),H=t.useRef(null),F=t.useRef(null),V=t.useRef(!1),j=t.useRef(!1),z=t.useRef(0),q=t.useRef(null),W=q.current;return ot(W,"touchstart",e.onTouchStart),ot(W,"touchend",e.onTouchEnd),ot(W,"touchcancel",e.onTouchCancel),ot(W,"touchmove",e.onTouchMove),t.useEffect((function(){var t;if(!f&&P.current&&!_&&(0===P.current.childNodes.length?I(!0):1===P.current.childNodes.length?t=e.getScrollContainer?e.getScrollContainer():P.current.firstChild:((t=P.current).style.width="100%",t.style.overflowX="scroll",t.style.display="inline-flex",t.style.webkitOverflowScrolling="touch"),t)){var n=H.current,r=F.current;if(n){n.style.display="none";var o=0,i=0,a=function(e){o=e.touches[0].pageX},u=function(a){t.scrollLeft||(t.scrollLeft=1);var u=(i=a.touches[0].pageX)-o;z.current=u;var s=Ce(Math.abs(u),e.damping);if(u<0&&(t.scrollLeft+t.clientWidth>=t.scrollWidth-1||!t.scrollLeft)&&!j.current&&(V.current=!0,n.style.display="flex"),V.current&&u<0){a.stopPropagation(),a.cancelable&&a.preventDefault();var d=s>l?l:s,f=s>c?c:s;D(f),r&&(r.innerHTML=s>=p?k||L.SwipeLoad.activeText:T||L.SwipeLoad.normalText),n.style.transition="all 0.02s",n.style.webkitTransform="translateX(-"+f+"px)",n.style.transform="translateX(-"+f+"px)",t.style.transition="all 0.03s",t.style.webkitTransform="translateX(-"+d+"px)",t.style.transform="translateX(-"+d+"px)"}u>0&&t.scrollLeft+t.clientWidth<=t.scrollWidth-1&&(V.current=!1,n.style.display="none"),u<0&&t.scrollLeft+t.clientWidth<=t.scrollWidth-1?j.current=!1:j.current=!0},d=function(){var e=i-o;z.current=e;var r=Ce(Math.abs(e)),a=function(){t.style.transition="all "+w+"ms "+b,t.style.webkitTransform="translateX(0px)",t.style.transform="translateX(0px)",n.style.transition="all "+w+"ms "+b,n.style.webkitTransform="translateX(0px)",n.style.transform="translateX(0px)",V.current=!1,j.current=!1,setTimeout((function(){n.style.display="none"}),w)};if(r>=p&&(t.scrollLeft+t.clientWidth>=t.scrollWidth-1||!t.scrollLeft)&&V.current)return s(),void setTimeout((function(){a()}),250);a()};return t.addEventListener("touchstart",a),t.addEventListener("touchmove",u),t.addEventListener("touchend",d),function(){t.removeEventListener("touchstart",a),t.removeEventListener("touchmove",u),t.removeEventListener("touchend",d)}}}}),[f]),t.useImperativeHandle(n,(function(){return{dom:q.current}})),i.default.createElement(ke,null,(function(t){var n=t.prefixCls;return i.default.createElement("div",{className:n+"-swipe-load "+o,ref:q},i.default.createElement("div",{className:E(n+"-list-area"),ref:P},C),e.renderLabel?i.default.createElement("div",{className:E(n+"-custom-loading-area"),ref:H,style:{position:"absolute",right:R+"px"}},e.renderLabel.length?e.renderLabel(A):e.renderLabel()):i.default.createElement("div",{className:E(n+"-loading-area"),ref:H,style:{width:m+"px",height:m+"px",position:"absolute",right:"-"+m+"px"}},i.default.createElement("div",{className:E(n+"-loading-label"),ref:F})))}))})),Aa=t.createContext({changeIndex:function(){},active:!1,index:0,activeCustomStyle:{}});var Da=t.forwardRef((function(e,n){var r=t.useContext(Aa),o=r.active,a=r.changeIndex,l=r.index,c=r.activeCustomStyle,s=e.onClick,d=e.className,f=e.style,v=t.useRef(null);t.useImperativeHandle(n,(function(){return{dom:v.current}}));var m=function(e){null==s||s(e),a(l)};return i.default.createElement(ke,null,(function(t){var n,r=t.prefixCls;return i.default.createElement("div",{className:E(r+"-tab-bar-item",(n={},n[r+"-tab-bar-item-active"]=o,n),d),style:u(u({},f),o?c:{}),ref:v,onClick:function(e){return m(e)}},function(t){var n,r=e.icon?i.default.createElement("div",{className:E(t+"-tab-bar-item-icon")},"function"==typeof e.icon?e.icon(o):e.icon):null,a=e.title?i.default.createElement("div",{className:E(t+"-tab-bar-item-title",(n={},n[t+"-tab-bar-item-only-title"]=!r,n))},"function"==typeof e.title?e.title(o):e.title):null,l=e.extra&&"function"==typeof e.extra?e.extra(o):e.extra,u=e.child&&i.default.createElement("div",{className:E(t+"-tab-bar-item-children")},"function"==typeof e.child?e.child(o):e.child),c=r||l?i.default.createElement("div",{className:E(t+"-extra-wrap")},r,l):null;return u||i.default.createElement(i.default.Fragment,null,c,a)}(r))}))})),Pa=function(e){return t.forwardRef((function(n,r){var o=n.defaultActiveIndex,a=void 0===o?0:o,l=n.activeIndex,c=n.className,s=n.fixed,d=void 0===s||s,f=n.style,v=n.dataSource,m=n.children,h=n.onChange,p=n.activeCustomStyle,g=t.useState(a),b=g[0],y=g[1],w=$e(void 0===l?b:l),C=w[0],x=w[1],T=w[2];t.useEffect((function(){T(void 0===l?b:l)}),[l,b]);var N=t.useRef(null);t.useImperativeHandle(r,(function(){return{dom:N.current,changeIndex:S}}));var k=t.useCallback((function(e,t){return i.default.createElement(Aa.Provider,{value:{active:t===C,changeIndex:S,index:t,activeCustomStyle:p},key:t},e)}),[C]);function S(e){y(e),e!==x.current&&(null==h||h(e))}return i.default.createElement(ke,null,(function(n){var r,o=n.prefixCls;return i.default.createElement("div",{className:E(o+"-tab-bar",c,(r={},r[o+"-tab-bar-fixed"]=d,r)),style:f,ref:N},v?v.map((function(t,n){return k(i.default.createElement(e,u({key:n},t)),n)})):t.Children.toArray(m).map((function(e,t){return k(e,t)})))}))}))}(Da),Ha=G(Pa,{Item:Da}),Fa=t.forwardRef((function(e,n){var r=e.className,o=e.style,a=e.type,l=void 0===a?"primary":a,c=e.icon,s=e.children,d=e.size,f=void 0===d?"medium":d,v=e.color,m=e.bgColor,h=e.borderColor,p=e.borderStyle,g=void 0===p?"solid":p,b=e.halfBorder,y=void 0===b||b,w=e.closeable,C=e.closeIcon,x=e.closeColor,T=e.filleted,N=e.onClose,k=e.onClick,S=t.useRef(null),R=et();return t.useImperativeHandle(n,(function(){return{dom:S.current}})),i.default.createElement(ke,null,(function(e){var t=e.prefixCls+"-tag";return i.default.createElement("div",{className:E(t,"all-border-box",r,t+"-"+l,{"half-border":y},R,"size-"+f,{filleted:T}),style:u({color:v,background:m,borderColor:h,borderStyle:g},o||{}),ref:S,onClick:k},c,i.default.createElement("span",{className:"tag-text"},s),w?i.default.createElement("div",{onClick:function(e){e.stopPropagation(),N&&N(e)},className:"tag-close-wrap"},C||i.default.createElement(Wo,{className:"tag-close-icon",color:x})):null)}))}));var Va=function(e){return t.forwardRef((function(n,r){var o=n.className,a=n.style,l=n.list,c=n.type,s=n.showAddButton,d=void 0===s||s,f=n.addArea,v=n.horizontalPadding,m=n.verticalPadding,h=n.onAdd,p=n.onClose,g=t.useRef(null);function b(e,t){var n=e.style||{},r=t!==l.length-1||d?{marginRight:v}:{};return u(u(u({},n),r),{marginBottom:m})}return t.useImperativeHandle(r,(function(){return{dom:g.current}})),i.default.createElement(ke,null,(function(t){var n,r=t.prefixCls,s=t.locale,v=r+"-tag-list";return i.default.createElement("div",{className:E(v,o),style:(n={},m&&"string"==typeof m?n={marginBottom:"-"+m}:m&&"number"==typeof m&&(n={marginBottom:-1*m}),u(u({},a||{}),n)),ref:g},l.map((function(t,n){return i.default.createElement(e,u({key:n},t,{style:b(t,n),type:c,onClose:function(e){t.onClose&&t.onClose(e),p&&p(n,e)}}))})),d?i.default.createElement("div",{className:"tag-list-add-wrap",onClick:h},void 0!==f?f:i.default.createElement(Fa,{type:c,className:"tag-list-add",borderStyle:"dashed",icon:i.default.createElement(Xo,null),style:{marginBottom:m}},null==s?void 0:s.Tag.addTag)):null)}))}))}(Fa),ja=G(Fa,{List:Va});e.ActionSheet=Lt,e.Avatar=qt,e.Badge=Pt,e.Button=Yt,e.Carousel=Gt,e.Cell=At,e.Checkbox=hn,e.CircleProgress=pn,e.Collapse=xn,e.ContextProvider=Ne,e.CountDown=br,e.DatePicker=Ar,e.Dialog=$n,e.Dropdown=Fr,e.DropdownMenu=qr,e.Ellipsis=yo,e.Form=Mo,e.Grid=Ko,e.Image=Ht,e.ImagePicker=Qo,e.ImagePreview=Wi,e.Input=Io,e.LoadMore=Xi,e.Loading=Dt,e.Masking=kt,e.NavBar=Gi,e.NoticeBar=Ui,e.Notify=$i,e.Pagination=Qi,e.Picker=kr,e.PickerView=xr,e.Popover=ca,e.Popup=Rt,e.PopupSwiper=fa,e.Portal=Re,e.Progress=va,e.PullRefresh=ya,e.Radio=Fo,e.Rate=ti,e.SearchBar=xa,e.ShowMonitor=hi,e.Slider=si,e.Stepper=ka,e.Steps=La,e.Sticky=Oa,e.SwipeAction=Ia,e.SwipeLoad=Ba,e.Switch=nn,e.TabBar=Ha,e.Tabs=Wn,e.Tag=ja,e.Textarea=Ao,e.Toast=en,e.Transition=Ue,Object.defineProperty(e,"__esModule",{value:!0})}));
|
22
|
+
function pi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gi(){return gi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gi.apply(this,arguments)}var bi=17,yi="always",Ei="hybrid",wi="animation",Ci="translate-first",xi="scale-first";function Ti(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function Ni(e){return e instanceof Number?[e]:[].concat(e instanceof Array?e:e.valueOf())}var ki=function(){function e(t){var n=this;pi(this,"operatorAdd",(function(t){var r=(t=Ni(t)).length>=n.x.length?[t,n.x]:[n.x,t];return new e(r[0].map((function(e,t){return e+(void 0!==r[1][t]?r[1][t]:r[1][0])})))})),pi(this,"operatorSub",(function(t){var r=(t=Ni(t)).length>n.x.length?[t,n.x]:[n.x,t];return new e(r[0].map((function(e,t){return e-(void 0!==r[1][t]?r[1][t]:r[1][0])})))})),pi(this,"operatorMul",(function(t){var r=(t=Ni(t)).length>n.x.length?[t,n.x]:[n.x,t];return new e(r[0].map((function(e,t){return e*(void 0!==r[1][t]?r[1][t]:r[1][0])})))})),pi(this,"operatorDiv",(function(t){var r=(t=Ni(t)).length>n.x.length?[t,n.x]:[n.x,t];return new e(r[0].map((function(e,t){return e/(void 0!==r[1][t]?r[1][t]:r[1][0])})))})),this.x=Ni(t)||[]}var t=e.prototype;return t.get=function(e){return this.x[e]},t.v=function(){return[].concat(this.x)},t.size=function(){return this.x.length},t.valueOf=function(){return this.x.valueOf()},t.toString=function(){return this.x.toString()},t.mul=function(e){if((e=this.convert(e)).length!==this.x.length)throw new Error("Can not process vector inner-product, input vector dim "+e.length+" don't match resource vector dim "+this.x.length);var t=0;return this.x.forEach((function(n,r){return t+=n+e[r]})),t},e}();function Si(e,t){return"number"==typeof e?{R:e,I:0}:e.isComplex?e:{R:t,I:0}}var Ri=function(){function e(t,n){var r=this;void 0===n&&(n=0),pi(this,"operatorAdd",(function(t){return t=Si(t,0),new e(r.R+t.R,r.I+t.I)})),pi(this,"operatorSub",(function(t){return t=Si(t,0),new e(r.R-t.R,r.I-t.I)})),pi(this,"operatorMul",(function(t){return t=Si(t,1),new e(r.R*t.R-r.I*t.I,r.I*t.R+r.R*t.I)})),pi(this,"operatorDiv",(function(t){t=Si(t,1);var n=Math.pow(t.R,2)+Math.pow(t.I,2);return new e((r.R*t.R+r.I*t.I)/n,(r.I*t.R-r.R*t.I)/n)})),pi(this,"operatorPow",(function(t){var n=r.z();if(0===n)return new e(0);var o=Math.acos(r.R/n)*t;return new e((n=Math.pow(n,t))*Math.cos(o),n*Math.sin(o))})),"number"==typeof t?(this.R=Number(t),this.I=Number(n)):t.isComplex&&(this.R=t.r(),this.I=t.i()),this.isComplex=!0}var t=e.prototype;return t.valueOf=function(){return this.R.valueOf()},t.toString=function(){return this.R.toFixed(3)+"+"+this.I.toFixed(3)+"i"},t.isNaN=function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){return isNaN(this.R)||isNaN(this.I)})),t.isReal=function(){return 0===this.I&&!this.isNaN()},t.inRangeR=function(e,t){return this.R<=t&&this.R>=e},t.inRangeI=function(e,t){return this.I<=t&&this.I>=e},t.setR=function(e){this.R=Number(e)},t.setI=function(e){this.I=Number(e)},t.r=function(){return this.R},t.i=function(){return this.I},t.z=function(){return Math.sqrt(Math.pow(this.R,2)+Math.pow(this.I,2))},t.theta=function(){var e=this.z();return Math.acos(this.R/e)},e}(),Mi={add:function(e,t){return e.operatorAdd?e.operatorAdd(t):e+t},sub:function(e,t){return e.operatorSub?e.operatorSub(t):e-t},mul:function(e,t){return e.operatorMul?e.operatorMul(t):e*t},div:function(e,t){return e.operatorDiv?e.operatorDiv(t):e/t},pow:function(e,t){return e.operatorPow?e.operatorPow(t):Math.pow(e,t)},binaryAnd:function(e,t){return e.operatorBinaryAnd?e.operatorBinaryAnd(t):e&t},binaryOr:function(e,t){return e.operatorBinaryOr?e.operatorBinaryOr(t):e|t},binaryXor:function(e,t){return e.operatorBinaryXor?e.operatorBinaryXor(t):e^t},binaryLShift:function(e,t){return e.operatorBinaryLShift?e.operatorBinaryLShift(t):e<<t},binaryRShift:function(e,t){return e.operatorBinaryRShift?e.operatorBinaryRShift(t):e>>t},less:function(e,t){return e.operatorLess?e.operatorLess(t):t.operatorGreater?t.operatorGreater(e):e.operatorGreaterEqual?!e.operatorGreaterEqual(t):e<t},greater:function(e,t){return e.operatorGreater?e.operatorGreater(t):t.operatorLess?t.operatorLess(e):e.operatorLessEqual?!e.operatorLessEqual(t):e>t},lessEqual:function(e,t){return e.operatorLessEqual?e.operatorLessEqual(t):t.operatorGreaterEqual?t.operatorGreaterEqual(e):e.operatorGreater?!e.operatorGreater(t):e<=t},greaterEqual:function(e,t){return e.operatorGreaterEqual?e.operatorGreaterEqual(t):t.operatorLessEqual?t.operatorLessEqual(e):e.operatorLess?!e.operatorLess(t):e>=t},equal:function(e,t){return e.operatorEqual?e.operatorEqual(t):e.operatorNotEqual?!e.operatorNotEqual(t):t.operatorEqual?t.operatorEqual(e):t.operatorNotEqual?!t.operatorNotEqual(e):e==t},notEqual:function(e,t){return e.operatorNotEqual?e.operatorNotEqual(t):e.operatorEqual?!e.operatorEqual(t):t.operatorNotEqual?t.operatorNotEqual(e):t.operatorEqual?!t.operatorEqual(e):e!=t}};function Li(e){return e>=0?Math.sqrt(e):new Ri(0,Math.sqrt(-e))}var Oi=Math.sqrt(3),_i=Math.pow(2,1/3),Ii=Li(-1),Bi=new Ri(0).operatorSub(Ii);function Ai(e,t,n,r){if(void 0===r&&(r=!0),t===n&&0===t)return Math.pow(e,Mi.div(1,3));var o=function(e,t,n){var r=-3*t+3*n-1,o=-(2*t-n)/r,i=-9*Math.pow(t,2)+9*n*t+9*t-9*Math.pow(n,2),a=3*r,l=_i*a,u=54*Math.pow(t,3)-243*e*Math.pow(t,2)-81*n*Math.pow(t,2)+162*Math.pow(t,2)-81*Math.pow(n,2)*t-162*e*t+486*e*n*t-81*n*t+54*Math.pow(n,3)-243*e*Math.pow(n,2)-27*e+162*e*n;return[4*Math.pow(i,3)+Math.pow(u,2),u,o,i,a,l]}(e,t,n),i=o[0],a=o[1],l=o[2],u=o[3],c=o[4],s=o[5],d=Mi.pow(new Ri(Mi.add(Li(i),a)),Mi.div(1,3)),f=Mi.add(Mi.sub(Mi.div(d,s),Mi.div(new Ri(Mi.mul(_i,u)),Mi.mul(d,c))),l),v=[];Mi.lessEqual(i,1e-12)?([f,Mi.add(Mi.add(Mi.div(Mi.mul(Mi.sub(Mi.mul(Ii,Oi),1),d),Mi.mul(2,s)),Mi.div(Mi.mul(Mi.add(Mi.mul(Ii,Oi),1),u),Mi.mul(Mi.mul(d,s),_i))),l),Mi.add(Mi.add(Mi.div(Mi.mul(Mi.sub(Mi.mul(Bi,Oi),1),d),Mi.mul(2,s)),Mi.div(Mi.mul(Mi.add(Mi.mul(Bi,Oi),1),u),Mi.mul(Mi.mul(d,s),_i))),l)].forEach((function(e){e.inRangeR(0,1)&&v.push(e.r())})),v.sort()):v.push(f.r());return r?v[0]:v}var Di={add:function(e,t){return e.operatorAdd?e.operatorAdd(t):e+t},sub:function(e,t){return e.operatorSub?e.operatorSub(t):e-t},mul:function(e,t){return e.operatorMul?e.operatorMul(t):e*t},div:function(e,t){return e.operatorDiv?e.operatorDiv(t):e/t},pow:function(e,t){return e.operatorPow?e.operatorPow(t):Math.pow(e,t)},binaryAnd:function(e,t){return e.operatorBinaryAnd?e.operatorBinaryAnd(t):e&t},binaryOr:function(e,t){return e.operatorBinaryOr?e.operatorBinaryOr(t):e|t},binaryXor:function(e,t){return e.operatorBinaryXor?e.operatorBinaryXor(t):e^t},binaryLShift:function(e,t){return e.operatorBinaryLShift?e.operatorBinaryLShift(t):e<<t},binaryRShift:function(e,t){return e.operatorBinaryRShift?e.operatorBinaryRShift(t):e>>t},less:function(e,t){return e.operatorLess?e.operatorLess(t):t.operatorGreater?t.operatorGreater(e):e.operatorGreaterEqual?!e.operatorGreaterEqual(t):e<t},greater:function(e,t){return e.operatorGreater?e.operatorGreater(t):t.operatorLess?t.operatorLess(e):e.operatorLessEqual?!e.operatorLessEqual(t):e>t},lessEqual:function(e,t){return e.operatorLessEqual?e.operatorLessEqual(t):t.operatorGreaterEqual?t.operatorGreaterEqual(e):e.operatorGreater?!e.operatorGreater(t):e<=t},greaterEqual:function(e,t){return e.operatorGreaterEqual?e.operatorGreaterEqual(t):t.operatorLessEqual?t.operatorLessEqual(e):e.operatorLess?!e.operatorLess(t):e>=t},equal:function(e,t){return e.operatorEqual?e.operatorEqual(t):e.operatorNotEqual?!e.operatorNotEqual(t):t.operatorEqual?t.operatorEqual(e):t.operatorNotEqual?!t.operatorNotEqual(e):e==t},notEqual:function(e,t){return e.operatorNotEqual?e.operatorNotEqual(t):e.operatorEqual?!e.operatorEqual(t):t.operatorNotEqual?t.operatorNotEqual(e):t.operatorEqual?!t.operatorEqual(e):e!=t}};function Pi(e,t,n){void 0===n&&(n="x");var r=e[0],o=e[1],i=e[2],a=e[3],l="x"===n?Ai(t,r,i):"y"===n?Ai(t,o,a):t,u=function(e,t){return Di.add(Di.mul(Di.sub(t,e),l),e)},c=new ki([0,0]),s=new ki([r,o]),d=new ki([i,a]),f=new ki([1,1]),v=u(c,s),m=u(s,d),h=u(d,f),p=u(v,m),g=u(m,h),b=u(p,g),y=[v,p].map((function(e){return Di.div(e,Di.add(b,1e-9))})),E=y[0],w=y[1],C=[g,h].map((function(e){return Di.div(Di.sub(e,b),Di.add(Di.sub(f,b),1e-9))})),x=C[0],T=C[1];return[[].concat(E.v(),w.v()),[].concat(x.v(),T.v())]}function Hi(e,t,n){return 3*e*n*Math.pow(1-n,2)+3*t*(1-n)*Math.pow(n,2)+Math.pow(n,3)}function Fi(e,t,n){void 0===n&&(n="x");var r=e[0],o=e[1],i=e[2],a=e[3],l=0===t?0:1===t?1:"x"===n?Ai(t,r,i):"y"===n?Ai(t,o,a):t;return["x"===n?t:Hi(r,i,l),"y"===n?t:Hi(o,a,l)]}function Vi(e){return window.requestAnimationFrame?window.requestAnimationFrame(e):setTimeout(e,bi)}function ji(e){return window.requestAnimationFrame?window.cancelAnimationFrame(e):clearTimeout(e,bi)}var zi=function(){function e(e){var t=this;void 0===e&&(e={}),pi(this,"setBounce",(function(e){!isNaN(e)&&(t.bouncing=Number(e))})),pi(this,"setDamp",(function(e){void 0===e&&(e=0),!isNaN(e)&&(t.damp=Number(e))})),pi(this,"setTransform",(function(e,n){if(void 0===e&&(e={}),void 0===n&&(n={}),t.fixedX&&e.translateX&&delete e.translateX,t.fixedY&&e.translateY&&delete e.translateY,n.merge){["translateX","translateY","scale"].forEach((function(n){void 0!==e[n]&&(t.transform[n]=parseFloat(e[n]))}));var r=e.transformOrigin;r instanceof Array&&2===r.length&&(t.transform.transformOrigin=r.map((function(e){return parseFloat(e)})))}else t.transform=gi({},e);return n.silent||t.update(),t})),pi(this,"on",(function(e,n){if(n&&"function"==typeof n){var r="on"+e[0].toUpperCase()+e.slice(1);t[r]?t[r]="onTransform"===r?function(){return n(gi({},t.transform),{complete:!t.busy(),dirty:t.dirty()})}:n:console.warn("[Transform]Unsupport event:",e)}return t})),pi(this,"restore",(function(e){if(!e){var n=t.transform;Vi((function(){t.onRestore(n)}))}t.dragMode===yi?t.zoomTo(1,{fitEdge:!0}):t.setTransform({},{merge:!1,silent:e})})),pi(this,"getTransform",(function(e){switch(e){case"css":return t.toCSS();case"style":return t.toStyle();default:return gi({},t.transform)}})),pi(this,"dirty",(function(){var e=t.transform,n=e.translateX,r=void 0===n?0:n,o=e.translateY,i=void 0===o?0:o,a=e.scale;return 0!==r||0!==i||1!==(void 0===a?1:a)})),pi(this,"busy",(function(){return!t.disableContentTouch||t.cancelSwipe||t.animating})),pi(this,"isTapStop",(function(){return t.isTapStopped})),pi(this,"apply",(function(){if(t.dom){var e=t.toCSS();t.dom.style.transform=e.transform||"",t.dom.style.webkitTransform=e.transform||"",t.dom.style.transformOrigin=e.transformOrigin||"center center",t.dom.style.webkitTransformOrigin=e.transformOrigin||"center center"}t.onTransform(),t.timer=0})),pi(this,"update",(function(){ji(t.timer),t.timer=Vi(t.apply),t.lastTransform=gi({},t.transform)})),pi(this,"cancel",(function(){ji(t.timer),t.transform=gi({},t.lastTransform)})),pi(this,"toTop",(function(){var e=t.transform.scale,n=void 0===e?1:e,r=t._remainToEdge(1,1)[1];return Math.round(Math.abs(r/n))})),pi(this,"toBottom",(function(){var e=t.transform.scale,n=void 0===e?1:e,r=t._remainToEdge(1,-1)[1];return Math.round(Math.abs(r/n))})),pi(this,"toLeft",(function(){var e=t.transform.scale,n=void 0===e?1:e,r=t._remainToEdge(1,1)[0];return Math.round(Math.abs(r/n))})),pi(this,"toRight",(function(){var e=t.transform.scale,n=void 0===e?1:e,r=t._remainToEdge(-1,1)[0];return Math.round(Math.abs(r/n))})),pi(this,"getOriginXY",(function(e){var n=e[0],r=e[1],o=t._getTransformedBounding(),i=o.left,a=o.top,l=t.transform.scale,u=void 0===l?1:l;return[(n-i)/u,(r-a)/u]})),pi(this,"setScreenCenter",(function(e,n,r){var o=t.getOriginXY([e,n]),i=o[0],a=o[1];return t.setCenter(i,a,r)})),pi(this,"setCenter",(function(e,n,r){var o=t.transform,i=t.fixedX,a=t.fixedY,l=t.boundingRect,u=t.viewport,c=o.translateX,s=void 0===c?0:c,d=o.translateY,f=void 0===d?0:d,v=o.scale,m=void 0===v?1:v,h=o.transformOrigin,p=l||u,g=p.top,b=p.bottom,y=p.left,E=p.right;if(h||(h=[(E-y)/2,(b-g)/2]),!i){var w=e-h[0];e=h[0]+w,o.translateX=s+w*(m-1)/m,h[0]=e}if(!a){var C=n-h[1];n=h[1]+C,o.translateY=f+C*(m-1)/m,h[1]=n}o.transformOrigin=h,r&&t.update()})),pi(this,"zoomToScreenCenter",(function(e,n,r){void 0===r&&(r={});var o=n[0],i=n[1];t.setScreenCenter(o,i,!0),Vi((function(){return Vi((function(){t.zoomTo(e,gi({fitEdge:!0},r))}))}))})),pi(this,"zoomToCenter",(function(e,n,r){void 0===r&&(r={});var o=n[0],i=n[1];t.setCenter(o,i,!0),Vi((function(){return Vi((function(){t.zoomTo(e,gi({fitEdge:!0},r))}))}))})),pi(this,"zoomTo",(function(e,n){void 0===n&&(n={});var r=n,o=r.transition,i=void 0===o?"all":o,a=r.easingFunc,l=void 0===a?"ease-out":a,u=r.duration,c=void 0===u?0:u,s=r.silent,d=void 0===s||s,f=r.fitEdge,v=void 0!==f&&f,m=r.callback,h=t.maxScale,p=void 0===h?1:h,g=t.minScale,b=void 0===g?1:g,y=t.transform,E=y.scale,w=void 0===E?1:E,C=y.translateX,x=void 0===C?0:C,T=y.translateY,N=void 0===T?0:T,k=Math.max(Math.min(e,p),b),S=k/w;t.transform.scale=k,t.transform.translateX=x/S,t.transform.translateY=N/S,v&&t.fit(!1),t.dom&&c?(t.dom.style.transition=i+" "+c+"ms "+l,t.animating=!0,setTimeout((function(){t.dom.style.transition="",t.animating=!1,!d&&t.onZoomEnd(null,k),"function"==typeof m&&m(k)}),c)):"function"==typeof m&&m(k),t.update()})),pi(this,"zoom",(function(e,n){void 0===e&&(e=1),void 0===n&&(n={});var r=t.transform.scale,o=void 0===r?1:r;t.zoomTo(o*e,n)})),pi(this,"drag",(function(e,n,r,o,i){var a=t.transform,l=t.interActBound,u=t.fixedX,c=t.fixedY,s=t.bounceRateX,d=t.bounceRateY,f=a.translateX,v=void 0===f?0:f,m=a.translateY,h=void 0===m?0:m,p=a.scale,g=void 0===p?1:p;u&&(e=0),c&&(n=0);var b=t._remainToEdge(e,n,l),y=b[0],E=b[1],w=(y+e)*e>0,C=(E+n)*n>0,x=0,T=0,N=Math.abs(e)>Math.abs(n),k=N&&w||!N&&C;e&&(x=o?e:t._getDragV(e,y,w,r?s:0),t.transform.translateX=v+x/g),n&&(T=i?n:t._getDragV(n,E,C,r?d:0),t.transform.translateY=h+T/g);var S=[u?0:-y,c?0:-E];if(t.update(),t.interActBound){var R=l.left,M=l.right,L=l.top,O=l.bottom;t.interActBound={left:R+x,right:M+x,top:L+T,bottom:O+T}}return{toEdge:k,remain:S}})),pi(this,"fit",(function(e,n,r){void 0===e&&(e=!0);var o=!1,i=t.transform,a=i.translateX,l=void 0===a?0:a,u=i.translateY,c=void 0===u?0:u,s=i.scale,d=void 0===s?1:s,f=t._outOfEdge(),v=f.outX,m=f.outY,h=f.outLeft,p=f.outRight,g=f.outTop,b=f.outBottom;return!n&&v&&(p&&(t.transform.translateX=l+p/d),h&&(t.transform.translateX=l+h/d),o=!0),!r&&m&&(b&&(t.transform.translateY=c+b/d),g&&(t.transform.translateY=c+g/d),o=!0),o&&e&&t.bounce(),t.update(),o})),pi(this,"fitX",(function(e){return void 0===e&&(e=!0),t.fit(e,!1,!0)})),pi(this,"fitY",(function(e){return void 0===e&&(e=!0),t.fit(e,!0,!1)})),pi(this,"swipe",(function(e){if(t.damp){var n=Ti(e);if(isNaN(n))return;t.cancelSwipe&&t.cancelSwipe();var r=0,o=Math.ceil(n/t.damp),i=t.transform,a=i.translateX,l=void 0===a?0:a,u=i.translateY,c=void 0===u?0:u,s=i.scale,d=void 0===s?1:s,f=[].concat(t.cubic.scroll),v=[].concat(t.cubic.bounce);if(t.dom){var m=850,h=[null,f],p=0,g=0,b=0,y=[[0,[l*d,c*d]]],E=function(){p=0,t.cancelSwipe()},w=e[0]*o/2,C=e[1]*o/2,x=t.bounceRateX,T=t.bounceRateY,N=t._outOfEdge(),k=N.outX,S=N.outY,R=t.drag(w,C,!1,x,T).remain,M=t._outOfEdge(),L=M.outX,O=M.outY;(L||O)&&(h[1]=v);var _=.33*window.innerWidth,I=.33*window.innerHeight;if(t.swipeMode===wi){t.cancel();var B=t._setSwipeBounceByAnimation(C,R[1],O,S,T,m,h[1],I),A=t._setSwipeBounceByAnimation(w,R[0],L,k,x,m,h[1],_),D=A.length>1,P=B.length>1;[A,B].forEach((function(e,t){return e.forEach((function(e){e[1]+=y[0][1][t];for(var n=0;n<y.length;n+=1){if(e[0]===y[n][0])return void(y[n][1][t]=e[1]);if(e[0]<y[n][0]){var r=[null,null];return r[t]=e[1],void y.splice(n,0,[e[0],r])}}var o=[null,null];o[t]=e[1],y.push([e[0],o])}))}));var H=y[y.length-1][0],F={};y.forEach((function(e,t){var n=e[0];e[1].map((function(r,o){if(null===r){for(var i=y[t-1][1][o],a=y[t-1][0],l=i,u=a,c=t+1;c<y.length;c+=1)if(null!==y[c][1][o]){l=y[c][1][o],u=y[c][0];break}if(a!==u){var s=[];[a,n,u].forEach((function(e,t){s[t]=F[e]?F[e]:Fi(h[1],e/H,"x")[1]})),e[1][o]=i+(l-i)*(s[1]-s[0])/(s[2]-s[0])}else e[1][o]=i}}))})),y.forEach((function(e){e[1]="transform: "+t.toCSS({translateX:e[1][0]/d,translateY:e[1][1]/d,scale:d}).transform})),t._appendAnimation(y,"cubic-bezier("+h[1].join(","),H),p=setTimeout(E,H+bi),t.cancelSwipe=function(){t._stopAnimation(),t._syncDom(),t.dom.style.animation="",p&&(clearTimeout(p),(D||P)&&t.fit(!1)),t.cancelSwipe=null,t.onSwipeEnd(t.transform)}}else t.dom.style.transition="transform "+m+"ms cubic-bezier("+h[1].join(",")+")",r=Vi((function(){p=setTimeout(E,m);var e=function(e){var t=e(m,h)||{};m=t.swipeSpan||m,h=t.cubicBezier||h,clearTimeout(p),p=setTimeout(E,m)};L&&(k&&w*R[0]>0?t.fitX(!1):(h[1]=[].concat(v),g=t._setSwipeBounce(w,R[0],x,e,"x",_))),O&&(S&&C*R[1]>0?t.fitY(!1):(h[1]=[].concat(v),b=t._setSwipeBounce(C,R[1],T,e,"y",I)))})),t.cancelSwipe=function(){r&&ji(r),p&&(g&&clearTimeout(g),b&&clearTimeout(b),clearTimeout(p),t._syncDom(),(g||b)&&t.fit(!1)),t.dom.style.transition="",t.cancelSwipe=null,t.onSwipeEnd(t.transform)}}else{var V=e[0]/o,j=e[1]/o;r=Vi((function e(){var n=(o-.5)*V,i=(o-.5)*j;t.drag(n,i),(o-=1)>0?(r=Vi(e),t.cancelSwipe=function(){r&&ji(r),t.cancelSwipe=null,t.onSwipeEnd(t.transform)}):(r=0,t.cancelSwipe())}))}}})),pi(this,"bounce",(function(){var e=t.bouncing;e&&t.dom&&(t.dom.style.transition="all "+e+"ms cubic-bezier(.14, 1, .34, 1)",t.animating=!0,setTimeout((function(){t.animating=!1,t.dom.style.transition=""}),e))})),pi(this,"touchStart",(function(e){if(t.disableContentTouch=!0,t.active&&!t.animating)if(t.scaling=!1,t.dragging=!1,t.cancelSwipe?(t.cancelSwipe(),t.isTapStopped=!0):t.dirty()||(t.useDomBoundary&&t.setBoundary(t.dom.getBoundingClientRect()),t.onSchedule()),e.touches.length>1){var n=t.transform.scale,r=void 0===n?1:n;t.disableContentTouch=!1;var o=t.getOriginXY([(e.touches[1].clientX+e.touches[0].clientX)/2,(e.touches[1].clientY+e.touches[0].clientY)/2]),i=o[0],a=o[1];t.pinchStartCenter=[i,a],t.setCenter(i,a),t.pinchStartLen=Ti([e.touches[1].clientX-e.touches[0].clientX,e.touches[1].clientY-e.touches[0].clientY]),t.scaling=!0,t.onZoomStart(e,r,t.pinchStartCenter)}else if(t.dragMode===yi||t.dragMode===Ei&&t.dirty()){t.disableContentTouch=!1,t.dragStartTime=+new Date,t.lastDragStartTime=0;var l=e.touches&&e.touches[0]?e.touches[0].clientX:0,u=e.touches&&e.touches[0]?e.touches[0].clientY:0;t.dragStartV=[l,u],t.lastDragStartV=[],t.dragX=l,t.dragY=u}})),pi(this,"touchMove",(function(e){if(!t.disableContentTouch){var n=e.changedTouches,r=void 0===n?[]:n;if(t.scaling){if(e.touches.length>1){var o=Ti([e.touches[1].clientX-e.touches[0].clientX,e.touches[1].clientY-e.touches[0].clientY]);t.zoom(o/t.pinchStartLen),t.pinchStartLen=o}}else{var i=r[0]?r[0].clientX:0,a=r[0]?r[0].clientY:0,l=i-t.dragX,u=a-t.dragY,c=t.drag(l,u,t.dragging).toEdge;t.dragX=i,t.dragY=a;var s=+new Date;s>t.dragStartTime+100&&(t.lastDragStartV=t.dragStartV,t.lastDragStartTime=t.dragStartTime,t.dragStartTime=s,t.dragStartV=[i,a]),t.dragging||(t.dragging=!0,c?t.disableContentTouch=!0:(t.onDragStart(e),t.interActBound=t._getTransformedBounding(!0)))}t.preventScroll&&e.preventDefault()}})),pi(this,"touchEnd",(function(e){if(!t.disableContentTouch&&0===e.touches.length){var n=t.transform.scale,r=void 0===n?1:n;if(t.scaling)t.onZoomEnd(e,r,t.pinchStartCenter),r<1?t.restore():t.fit();else if(t.dragging){var o=+new Date-t.dragStartTime,i=t.dragStartV;o<50&&t.lastDragStartTime&&(o=+new Date-t.lastDragStartTime,i=t.lastDragStartV);var a=[e.changedTouches&&e.changedTouches[0]?e.changedTouches[0].clientX:0,e.changedTouches&&e.changedTouches[0]?e.changedTouches[0].clientY:0],l=[bi*(a[0]-i[0])/o,bi*(a[1]-i[1])/o];t.onDragEnd(e),Ti(l)>t.motionThreshold?t.swipe(l):t.fit()}Vi((function(){t.disableContentTouch=!0,t.pinchStartLen=0,t.interActBound=null,t.isTapStopped=!1}))}})),pi(this,"_outOfEdge",(function(){var e=t._getTransformedBounding(),n=e.left,r=e.right,o=e.top,i=e.bottom,a=t.edges,l=a.left-n,u=a.right-r,c=a.top-o,s=a.bottom-i,d=l<0?l:0,f=u>0?u:0,v=c<0?c:0,m=s>0?s:0;return{outX:!(!d&&!f),outY:!(!v&&!m),outLeft:d,outRight:f,outTop:v,outBottom:m}})),pi(this,"_remainToEdge",(function(e,n,r){var o=[0,0],i=t.edges,a=r||t._getTransformedBounding(),l=a.left,u=a.right,c=a.top,s=a.bottom,d=e>0?i.left:i.right,f=n>0?i.top:i.bottom,v=e>0?l:u,m=n>0?c:s;return o[0]=v-d,o[1]=m-f,o})),pi(this,"_computeEdge",(function(){var e=t.viewport,n=e.left,r=e.right,o=e.top,i=e.bottom;if(t.boundingRect){var a=t.boundingRect,l=a.left,u=a.right,c=a.top,s=a.bottom;t.edges={left:Math.max(l,n),top:Math.max(c,o),right:Math.min(u,r),bottom:Math.min(s,i)}}else t.edges=gi({},t.viewport)})),this.dom=null,this.useDomBoundary=!1,this.viewport={left:0,right:window.innerWidth,top:0,bottom:window.innerHeight},this.maxScale=2,this.minScale=.5,this.fixedX=!1,this.fixedY=!1,this.active=!0,this.preventScroll=!0,this.dragMode=Ei,this.swipeMode=wi,this.transformMode=Ci,this.transform={},this.onZoomStart=function(){},this.onZoomEnd=function(){},this.onDragStart=function(){},this.onDragEnd=function(){},this.onSwipeEnd=function(){},this.onTransform=function(){},this.onRestore=function(){},this.onSchedule=function(){},this.cubic={scroll:[.33,1,.66,1],bounce:[.17,1,.17,1]},this.bouncing=300,this.bounceRateX=0,this.bounceRateY=0,this.damp=2,this.motionThreshold=10,this.config(e),this.boundingRect=null,this.disableContentTouch=!0,this.scaling=!1,this.pinchStartCenter=[],this.pinchStartLen=0,this.dragging=!1,this.dragX=0,this.dragY=0,this.dragStartTime=0,this.dragStartV=[0,0],this.edges={},this.timer=0,this.animating=!1,this.cancelSwipe=null,this.isTapStopped=!1,this.interActBound=null,this._computeEdge(),this.lastTransform={},this.animationStyleDom=null}var t=e.prototype;return t.enable=function(){return this.active=!0,this},t.disable=function(){return this.active=!1,this},t.config=function(e){void 0===e&&(e={});var t=e,n=t.viewport,r=t.dom,o=t.useDomBoundary,i=t.maxScale,a=t.minScale,l=t.fixedX,u=t.fixedY,c=t.bounceRateX,s=t.bounceRateY,d=t.active,f=t.preventScroll,v=t.transform,m=t.damp,h=t.dragMode,p=t.swipeMode,g=t.cubic,b=t.transformMode,y=t.motionThreshold,E=t.bounce,w=t.onZoomStart,C=t.onZoomEnd,x=t.onDragStart,T=t.onDragEnd,N=t.onSwipeEnd,k=t.onTransform,S=t.onRestore,R=t.onSchedule;return n&&this.setViewport(n),r&&this.setDom(r,o),i&&this.setMaxScale(i),a&&this.setMinScale(a),h&&this.setDragMode(h),p&&this.setSwipeMode(p),b&&this.setTransformMode(b),g&&this.setCubic(g),void 0!==y&&this.setMotionThreshold(y),void 0!==c&&this.setBounceRateX(c),void 0!==s&&this.setBounceRateY(s),void 0!==l&&this.setFixedX(l),void 0!==u&&this.setFixedY(u),void 0!==d&&(this.active=Boolean(d)),void 0!==f&&(this.preventScroll=Boolean(f)),v&&this.setTransform(v),void 0!==m&&this.setDamp(m),void 0!==E&&this.setBounce(E),this.on("transform",k).on("restore",S).on("schedule",R).on("zoomStart",w).on("zoomEnd",C).on("dragStart",x).on("dragEnd",T).on("swipeEnd",N),this},t.setDom=function(e,t){var n=this;return void 0===t&&(t=!0),e&&(this.useDomBoundary=t,this.dom!==e&&(this.removeDom(),this.dom=e,e.addEventListener("touchstart",this.touchStart),e.addEventListener("touchmove",this.touchMove),e.addEventListener("touchend",this.touchEnd),e.addEventListener("touchcancel",this.touchEnd),e.style.willChange="transform",e.style.transition="",e.style.transform="",e.style.webkitTransform="",e.style.transformOrigin="",e.style.webkitTransformOrigin="",this.transform={},this.lastTransform={},t&&Vi((function(){n.boundingRect||n.setBoundary(e.getBoundingClientRect())})))),this},t.setBoundary=function(e,t){void 0===t&&(t=!1);var n=t?this._getRawBounding(e):e,r=n.left,o=n.right,i=n.top,a=n.bottom;return this.boundingRect=gi({},this.boundingRect||this.viewport,{left:r,right:o,top:i,bottom:a}),this._computeEdge(),this},t.removeDom=function(){return this.dom&&(this.dom.removeEventListener("touchstart",this.touchStart),this.dom.removeEventListener("touchmove",this.touchMove),this.dom.removeEventListener("touchend",this.touchEnd),this.dom.removeEventListener("touchcancel",this.touchEnd)),this},t.setMaxScale=function(e){return isNaN(e)||(this.maxScale=Math.max(Number(e),1)),this},t.setMinScale=function(e){return isNaN(e)||(this.minScale=Math.min(Number(e),1)),this},t.setMotionThreshold=function(e){return isNaN(e)||(this.motionThreshold=e),this},t.setCubic=function(e){for(var t in void 0===e&&(e={}),e)e[t]instanceof Array&&4===e[t].length&&(this.cubic[t]=e[t].map((function(e){return isNaN(Number(e))?Number(e):0})));return this},t.setDragMode=function(e){this.dragMode=e},t.setSwipeMode=function(e){this.swipeMode=e},t.setTransformMode=function(e){this.transformMode=e},t.setBounceRateX=function(e){return isNaN(e)||(this.bounceRateX=Math.min(Number(e),1)),this},t.setBounceRateY=function(e){return isNaN(e)||(this.bounceRateY=Math.min(Number(e),1)),this},t.setViewport=function(e){var t=this;void 0===e&&(e={});var n=!1;return["left","right","top","bottom"].forEach((function(r){var o=Number(e[r]);isNaN(o)||(t.viewport[r]=o,n=!0)})),n&&this._computeEdge(),this},t.setFixedX=function(e){if(this.fixedX=!!e,e){var t=this.transform.transformOrigin;if(t){var n=this.boundingRect||this.viewport,r=n.left,o=n.right;t[0]=(o-r)/2}this.setTransform({translateX:0},{merge:!0})}return this},t.setFixedY=function(e){if(this.fixedY=!!e,e){var t=this.transform.transformOrigin;if(t){var n=this.boundingRect||this.viewport,r=n.top,o=n.bottom;t[1]=(o-r)/2}this.setTransform({translateY:0},{merge:!0})}return this},t.toStyle=function(){var e=this.toCSS(),t=e.transform,n=e.transformOrigin,r="";return t&&(r+="transform: "+t),n&&(r+="transform-origin: "+n),r},t.toCSS=function(e){var t="",n="center";if(e||this.dirty()){var r=e||this.transform;if(this.transformMode===Ci){var o=this.transform.scale,i=void 0===o?1:o;["translateX","translateY"].forEach((function(e){void 0!==r[e]&&(t+=e+"("+r[e]*i+"px)")})),t+="scale("+i+")"}else if(this.transformMode===xi)["scale","translateX","translateY"].forEach((function(e,n){var o=n?"px":"";void 0!==r[e]&&(t+=e+"("+r[e]+o+")")}));else{var a=r.scale,l=void 0===a?1:a,u=r.translateX,c=void 0===u?0:u,s=r.translateY;t="matrix("+l+", 0, 0, "+l+", "+c*l+", "+(void 0===s?0:s)*l+")"}}return this.transform.transformOrigin&&(n=this.transform.transformOrigin.map((function(e){return Math.round(e)+"px"})).join(" ")),{transform:t,transformOrigin:n}},t._getTransformedBounding=function(){var e=this.boundingRect,t=this.viewport,n=this.transform,r=e||t,o=r.left,i=r.top,a=r.right,l=r.bottom,u=n.scale,c=void 0===u?1:u,s=n.transformOrigin,d=void 0===s?[(a-o)/2,(l-i)/2]:s,f=n.translateX,v=void 0===f?0:f,m=n.translateY,h=void 0===m?0:m,p=d[0],g=d[1],b=(v-p)*c+p,y=(h-g)*c+g;return{left:o+b,right:o+b+(a-o)*c,top:i+y,bottom:i+y+(l-i)*c}},t._getRawBounding=function(e){var t=this.transform,n=e.left,r=e.top,o=e.right,i=e.bottom,a=t.scale,l=void 0===a?1:a,u=t.transformOrigin,c=void 0===u?[(o-n)/2,(i-r)/2]:u,s=t.translateX,d=void 0===s?0:s,f=t.translateY,v=void 0===f?0:f,m=c[0],h=c[1],p=(d-m)*l+m,g=(v-h)*l+h;return{left:n-p,right:n-p+(o-n)/l,top:r-g,bottom:r-g+(i-r)/l}},t._getDragV=function(e,t,n,r){var o=0,i=0;if(n)if(r){var a=t*e>0;o=a?e*r:(t+e)*r,i=a?o:-t+o}else i=-t;else i=e;return i},t._setSwipeBounceByAnimation=function(e,t,n,r,o,i,a,l){void 0===l&&(l=1/0);var u=[],c=e*t<0;if(n)if(r&&!c)u.push([i,t]);else{var s=(c?e*o:(e-t)*o)/2;Math.abs(s)>l&&(s*=Math.abs(l/s));var d=s+(c?0:t),f=2*Math.abs(s)+Math.abs(t),v=Fi(a,Math.abs(d)/f,"y")[0],m=Math.floor(i*v);v>.1||u.push([m,d]),u.push([i,t])}else e=Math.min(Math.abs(e),Math.abs(t))*Math.abs(e)/e,u.push([i,e]);return u},t._setSwipeBounce=function(e,t,n,r,o,i){var a=this;void 0===o&&(o="x"),void 0===i&&(i=1/0);var l=e*t<0,u=l?e*n:(e-t)*n;Math.abs(u)>i&&(u*=Math.abs(i/u));var c=(u+(l?0:t))/e,s=0;return r((function(e,t){var n=Fi(t[1],c,"y"),i=Math.max(Math.floor(n[0]*e/bi),2)*bi,l=e-i;s=setTimeout((function(){r((function(e,t){var n=1-l/e,r=0,i=function(){"x"===o?a.fitX(!1):"y"===o&&a.fitY(!1),a.dom&&(a.dom.style.transition="transform "+(l-r)+"ms cubic-bezier("+t[1].map((function(e){return e.toFixed(3)})).join(",")+")")};return n>0?(t=Pi(t[1],n,"x"),i()):(n=bi/e,r=bi,t=Pi(t[1],n,"x"),Vi(i)),{cubicBezier:t,swipeSpan:l}}))}),i)})),s},t._syncDom=function(){if(this.dom){var e=window.getComputedStyle(this.dom).getPropertyValue("transform").split(")")[0].split(", ").map((function(e){return parseFloat(e)})),t=e[3],n=void 0===t?1:t,r=e[4],o=void 0===r?0:r,i=e[5],a=void 0===i?0:i;this.setTransform({scale:n,translateX:Math.round(o)/n,translateY:Math.round(a)/n},{merge:!0})}},t._appendStyle=function(e){if(this.animationStyleDom){var t=this.animationStyleDom.firstChild;t&&this.animationStyleDom.removeChild(t)}else{var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");n.appendChild(r),r.type="text/css",this.animationStyleDom=r}this.animationStyleDom.styleSheet?this.animationStyleDom.styleSheet.cssText=e:this.animationStyleDom.appendChild(document.createTextNode(e))},t._appendAnimation=function(e,t,n){for(var r=this,o="__transformable_key_"+parseInt(1e16*(.5+.5*Math.random())).toString(16),i=[],a=0;a<e.length;a+=1){var l=e[a],u=l[0],c=l[1],s=Math.floor(u/n*100);i.push(s+"% { "+c+" }")}var d="@keyframes "+o+" {\n "+i.join("\n")+"\n }";this._appendStyle(d),this.dom&&Vi((function(){r.dom.style.animation=o+" "+n+"ms "+t,r.dom.style.animationFillMode="forwards"}))},t._stopAnimation=function(){this.dom&&(this.dom.style.animationPlayState="paused")},e}();var qi=t.forwardRef((function(e,n){var r,o,a=e.style,l=e.className,s=e.images,d=e.loop,f=void 0!==d&&d,v=e.openIndex,m=e.fit,h=e.noselect,p=void 0===h||h,g=e.displayDuration,b=void 0===g?350:g,y=e.spaceBetween,w=void 0===y?0:y,C=e.showLoading,x=void 0===C||C,T=e.loadingArea,N=e.errorArea,k=e.showError,S=void 0===k||k,R=e.retryTime,M=e.staticLabel,O=e.replaceFallbackWhenLoaded,_=e.scrollBezier,I=e.lazyloadCount,B=void 0===I?1:I,A=e.swipeToClose,D=void 0===A||A,P=e.getMinScale,H=e.getMaxScale,F=e.getDoubleClickScale,V=e.getContainer,j=e.getThumbBounds,z=e.renderIndicator,q=e.onChange,W=e.onAfterChange,X=e.onImageClick,Y=e.onImageDoubleClick,G=e.onImageLongTap,U=e.close,K=e.onClose,Z=e.onTouchStart,$=e.onTouchMove,J=e.onTouchEnd,Q=e.indicatorPos,ee=void 0===Q?"start":Q,te=c(e,["style","className","images","loop","openIndex","fit","noselect","displayDuration","spaceBetween","showLoading","loadingArea","errorArea","showError","retryTime","staticLabel","replaceFallbackWhenLoaded","scrollBezier","lazyloadCount","swipeToClose","getMinScale","getMaxScale","getDoubleClickScale","getContainer","getThumbBounds","renderIndicator","onChange","onAfterChange","onImageClick","onImageDoubleClick","onImageLongTap","close","onClose","onTouchStart","onTouchMove","onTouchEnd","indicatorPos"]),ne=et(),re=t.useRef(null),oe=t.useRef([]),ie=t.useRef(null),ae=t.useRef([]),le=t.useRef(null),ue=t.useRef(null),ce=t.useRef(null),se=t.useRef([]),de=t.useRef(0),fe=t.useRef(!1),ve=t.useRef(!1),me=t.useRef(!1),he=t.useRef(!1),pe=t.useRef(v),ge=t.useRef(0),be=t.useRef(0),ye=t.useRef(!1),Ee=t.useRef(!1),Ce=t.useState({}),xe=Ce[0],Te=Ce[1],Ne=$e([]),Se=Ne[0],Me=Ne[1],Le=Ne[2],Oe=t.useState(null),_e=Oe[0],Ie=Oe[1],Be=null===(r=Se[v])||void 0===r?void 0:r.loaded,Ae=null===(o=Se[v])||void 0===o?void 0:o.animated,De=v>=0&&v<s.length,Pe=tt(!0),He=Pe.windowWidth,Fe=Pe.windowHeight;function Ve(e){try{e&&document.body.removeChild(e)}catch(e){}}function je(e){var t,n=null===(t=oe.current[e])||void 0===t?void 0:t.dom,r=null==n?void 0:n.parentElement;n&&r&&(ae.current[e]?ae.current[e].setDom(r):ae.current[e]=new zi({dom:r,motionThreshold:0,dragMode:"always",transformMode:"matrix",useDomBoundary:!1,cubic:{scroll:_},onTransform:function(){var t,n,r,o,i=se.current[e],a=(null===(n=null===(t=ae.current[e])||void 0===t?void 0:t.getTransform)||void 0===n?void 0:n.call(t))||{},l=null===(r=Me.current[e])||void 0===r?void 0:r.originWidth,u=null===(o=Me.current[e])||void 0===o?void 0:o.originHeight,c=a.scale||1;if(i&&l&&u&&be.current!==c){be.current=c;var s=ze(i)?"":" translateY(-50%)";i.style.width=l*c+"px",i.style.height=u*c+"px";var d="scale("+1/c+") translateZ(0)"+s;i.style.transform=d,i.style.webkitTransform=d,i.style.transformOrigin="top left",i.style.webkitTransformOrigin="top left"}},onRestore:function(){be.current=0},onZoomEnd:function(t,n,r){Te((function(t){var n;return u(u({},t),((n={})[e]=!1,n))}));var o=se.current[e],i=ae.current[e];if(o&&i&&!(i.getTransform().scale<1)){var a=o.getBoundingClientRect();a.width>He&&a.height>Fe?(r&&r.length&&i.setCenter.apply(i,r),i.setFixedX(!1),i.setFixedY(!1)):a.height<=Fe?i.fixedY||(i.setFixedY(!0),i.bounce()):a.width<=He&&(i.fixedX||(i.setFixedX(!0),i.bounce()))}},minScale:qe(e),maxScale:We(e)}),function(e){var t=oe.current[e],n=null==t?void 0:t.dom;if((null==n?void 0:n.parentElement)&&(null==t?void 0:t.image)){var r=t.image.getBoundingClientRect(),o=n.parentElement.getBoundingClientRect();ae.current[e]&&ae.current[e].setBoundary({left:Math.min(r.left,o.left),right:Math.max(r.right,o.right),top:Math.min(r.top,o.top),bottom:Math.max(r.bottom,o.bottom)},!0)}}(e))}function ze(e){return Boolean(e&&!e.classList.contains("preview-fit-contain-y"))}function qe(e){var t=void 0===e?pe.current:e,n=se.current[t];return n?P?P(n,t):.7:1}function We(e){var t=void 0===e?pe.current:e,n=se.current[t];if(!n)return 1;if(H)return H(n,t);var r=n.naturalWidth;return r>n.naturalHeight?r/He*5:Math.max(5,r/He)}function Xe(e){var t,n,r=void 0===e?pe.current:e;return null===(n=null===(t=ae.current[r])||void 0===t?void 0:t.busy)||void 0===n?void 0:n.call(t)}function Ye(){var e,t,n=ae.current[pe.current],r=null===(e=null==n?void 0:n.toLeft)||void 0===e?void 0:e.call(n),o=null===(t=null==n?void 0:n.toRight)||void 0===t?void 0:t.call(n);return{side:!r||!o,left:!r,right:!o}}function Ge(e){if(Z&&Z(e,pe.current))return!0;var t=e.touches;return de.current=e.touches&&e.touches[0]?e.touches[0].clientX:0,ve.current=!1,me.current=!1,1===t.length?(ye.current||(he.current=!0),ue.current=window.setTimeout((function(){he.current&&(he.current=!1,ve.current=!0,G&&G(pe.current,se.current[pe.current],e))}),300)):he.current=!1,function(){var e,t;return null===(t=null===(e=ae.current[pe.current])||void 0===e?void 0:e.isTapStop)||void 0===t?void 0:t.call(e)}()&&(ve.current=!0),Xe()?(fe.current=Ye().side,!fe.current):void 0}function Ke(e){if(ve.current=!0,he.current=!1,ue.current&&clearTimeout(ue.current),$&&$(e,pe.current))return!0;var t=(e.changedTouches[0].clientX||0)-de.current;if(Xe()){var n=Ye();return!fe.current||!(n.left&&t>0||n.right&&t<0)}}function Ze(e){if(J&&J(e,pe.current))return!0;var t=D&&ge.current>=(function(){var e,t;return null===(t=null===(e=ae.current[pe.current])||void 0===e?void 0:e.dirty)||void 0===t?void 0:t.call(e)}()?6:3);return ge.current=0,he.current=!1,ue.current&&clearTimeout(ue.current),t?(rt(e),!0):!(!Xe()||Ye().side)||void 0}function Je(e){if(!me.current){me.current=!0,le.current&&(clearTimeout(le.current),le.current=null);var t=pe.current;Y&&Y(t,e);var n=ae.current[t];if(n){var r=function(e){var t=pe.current,n=se.current[t];if(!n)return 1;var r=We(t);if(F)return F(e,r,n,t);var o=n.naturalWidth,i=n.naturalHeight,a=o>i?o/He*Fe/i:1,l=2;a>=2&&(l=Math.min(r,a));var u=Number(e.toFixed(3)),c=Number(l.toFixed(3));return u>=1&&u<c?c:1}(n.getTransform().scale||1);if(1===r)ze(se.current[t])?n.zoomToScreenCenter(1,[He/2,Fe/2],{duration:200,callback:function(){return n.restore()}}):(n.bounce(),n.restore());else n.zoomToScreenCenter(r,[He/2,Fe/2],{duration:200,silent:!1})}}}t.useImperativeHandle(n,(function(){return{dom:re.current,imageDoms:se.current}})),nt(De,re.current,(function(){return[]}),"top",(function(e,t){Xe()||"y"!==t||(ge.current+=1)})),t.useEffect((function(){if(De)pe.current=v,ye.current=!1,ie.current&&ie.current.changeIndex(v,!0),Le(s.map((function(e,t){var n;return{firstLoaded:(null===(n=Me.current[t])||void 0===n?void 0:n.firstLoaded)||!1,animated:t!==v}}))),function(e){var t,n=null===(t=Me.current[e])||void 0===t?void 0:t.firstLoaded,r=O&&n?s[e].src:s[e].fallbackSrc;if(!j||!s[e]||!r)return void it(e);var o=j(e);if(!o||!o.width||!o.height)return void it(e);var i=new Image;ce.current=i,i.classList.add("image-preview-fake-trans-image"),at(i,o,o),i.src=r,i.style.objectPosition=s[e].thumbPosition||"top center",i.style.opacity="0",i.style.transitionDuration=b+"ms",i.style.webkitTransitionDuration=b+"ms",document.body.appendChild(i),function(e,t,n,r){if(!t)return void r(null);Ie({src:t,fit:s[e].fit,index:e,movingImage:n,onLoad:function(e,t){setTimeout((function(){r(t.getBoundingClientRect())}),20)},onError:function(){return r(null)}})}(e,r,i,(function(t){if(!t||!t.width||!t.height)return Ve(i),void it(e);we((function(){i.style.opacity="1",at(i,t,o),setTimeout((function(){Te((function(t){var n;return u(u({},t),((n={})[e]=!0,n))}))}),Math.max(0,b-80)),setTimeout((function(){it(e)}),b+30)}))}))}(v);else{ue.current&&clearTimeout(ue.current),he.current=!1,Le(Me.current.map((function(e){return u(u({},e),{animated:!1,loaded:!1})}))),ae.current=[],Ve(document.querySelector(".image-preview-fake-trans-image")),Ie(null),Te({});var e=Ee.current;setTimeout((function(){e&&K&&K()}),b)}Ee.current=!0}),[De]),t.useEffect((function(){De&&Be&&Ae&&setTimeout((function(){Ve(ce.current),ce.current=null}),100)}),[De,Be,Ae]),t.useEffect((function(){_e?function(e,t,n){void 0===e&&(e=function(){return document.body});var r=e();r&&(r.style.overflow="hidden",r.style.touchAction="none",(t?window:r).addEventListener("touchmove",n||L,{passive:!1,capture:!0}))}():we((function(){!function(e,t,n){void 0===e&&(e=function(){return document.body});var r=e();r&&(r.style.overflow="",r.style.touchAction="",(t?window:r).removeEventListener("touchmove",n||L,{capture:!0}))}()}))}),[_e]),t.useEffect((function(){(ae.current||[]).forEach((function(e,t){e&&e.setMinScale(qe(t))}))}),[P]),t.useEffect((function(){(ae.current||[]).forEach((function(e,t){e&&e.setMaxScale(We(t))}))}),[H]);var Qe=function(e,n,r){void 0===r&&(r=200);var o=t.useState(0),i=o[0],a=o[1],l=t.useRef();return t.useEffect((function(){var t=setTimeout((function(){1===i&&e(l.current),a(0)}),r);return 2===i&&n(l.current),function(){return clearTimeout(t)}}),[i]),function(e){l.current=e,a((function(e){return e+1}))}}((function(e){ve.current||(le.current=window.setTimeout((function(){me.current||X&&X(pe.current,e)||rt(e)}),300))}),Je);function rt(e){ye.current||(ye.current=!0,U(e))}function ot(e,t){var n=Me.current.slice();n[e]=u(u({},n[e]||{}),t),Le(n)}function it(e){ot(e,{animated:!0}),Ie(null)}function at(e,t,n){e.style.width=n.width+"px";var r="translate3d("+t.left+"px, "+t.top+"px, 0) scale("+t.width/n.width;e.style.transform=r,e.style.webkitTransform=r,e.style.transformOrigin="left top",e.style.webkitTransformOrigin="left top"}function lt(e,t,n){return i.default.createElement(Gt,u({autoPlay:!1,loop:f,lazyloadCount:B},e),(t||[]).map((function(e,t){var r=i.default.createElement("div",{key:t,className:"preview-image-wrap",style:{padding:"0 "+w+"px"}},i.default.createElement(Ht,u({className:"preview-image",fit:e.fit||m||"preview-y",boxWidth:He-2*w,boxHeight:Fe,bottomOverlap:null},n(e,t))));return e.extraNode?i.default.createElement("div",{className:"preview-image-wrap-container",key:"outer-"+t},r,e.extraNode):r})))}function ut(e){var t=Se[e]||{},n=t.loaded,r=t.animated;return E("preview-image",{"preview-hidden":!(e!==v||n&&r)})}function ct(e,t,n){return z?z(e,t,n):Be?i.default.createElement(Re,null,i.default.createElement("div",{className:"image-preview-indicator"},e+1,"/",t)):null}function st(e,t,n){var r=Se[t]||{},o=r.originWidth,a=r.originHeight,l=r.originLeft,c=r.originTop,s=r.hasOverflow?{}:yt({transform:"translateY(-50%)"}),d=n?{objectFit:n}:{};return"ios"===ne&&xe[t]&&o&&a?i.default.createElement("img",{src:e,style:u(u({position:"absolute",width:o,height:a,left:l,top:c},d),s)}):null}function dt(e){return e===v?i.default.createElement(Re,null,i.default.createElement("div",{className:"image-preview-loading-area"},T||i.default.createElement(Dt,{type:"circle",className:"loading-icon",radius:7}))):T}return i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return i.default.createElement(Re,{getContainer:V},i.default.createElement(Ue,{in:De,timeout:b,type:"fade",mountOnEnter:!0,unmountOnExit:!0},i.default.createElement("div",{className:E(t+"-image-preview","all-border-box",{noselect:p},l),style:a,ref:re,onClick:Qe,onDoubleClick:Je},lt(u({indicatorPos:ee,initialIndex:v,ref:ie,renderIndicator:ct,onChange:function(e){pe.current=e,q&&q(e)},onAfterChange:function(e,t){W&&W(e),function(e){var t=ae.current[e];t&&t.restore()}(t),we((function(){je(pe.current)}))},onTouchMove:Ke,onTouchStart:Ge,onTouchEnd:Ze},te),s,(function(e,t){return{src:e.src,ref:function(e){oe.current[t]=e},showLoading:x,loadingArea:dt(t),errorArea:N,showError:S,retryTime:R,staticLabel:M,animateDuration:_e?0:void 0,style:{overflow:"visible"},className:ut(t),bottomOverlap:st(e.fallbackSrc||e.src,t,e.fit||m),onLoad:function(e,n){se.current[t]=n,ot(t,{loaded:!0,firstLoaded:!0,originWidth:n.offsetWidth,originHeight:n.offsetHeight,originTop:n.offsetTop,originLeft:n.offsetLeft,hasOverflow:ze(n)}),t===v?je(t):Te((function(e){var n;return u(u({},e),((n={})[t]=!0,n))}))},onError:function(){(se.current[t]=null,t===v)&&(Ve(null==_e?void 0:_e.movingImage),ot(t,{animated:!0,loaded:!0}),Ie(null))}}})),_e?i.default.createElement("div",{className:"image-preview-fake-rect"},lt({initialIndex:0},[{src:_e.src,fit:_e.fit}],(function(){return{staticLabel:M,src:_e.src,animateDuration:0,onLoad:_e.onLoad,onError:_e.onError}}))):null)),_e?i.default.createElement("div",{className:"image-preview-lock-modal",onClick:rt}):null)}))}));var Wi=G(qi,function(e){return{open:(t=e,function(e,n){var r=u(u({unmountOnExit:!0},e||{}),{close:function(){}}),o=u({},r),i=P("_ARCO_IMAGE_PREVIEW_DIV_"+(r.key||"")+"_",r.getContainer).child,a=!1,l=new wt(t,i,n).render;function c(){a=!0,o.openIndex=-1,l(o)}return o.close=c,o.onClose=function(){r.onClose&&r.onClose(),r.unmountOnExit&&H(i)},o.openIndex=-1,l(o),setTimeout((function(){a||(o.openIndex=r.openIndex,l(o))}),20),{close:c,update:function(e){o=u(u({},o),e||{}),l(o)}}})};var t}(Se(qi))),Xi=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,a=e.style,l=e.beforeReadyArea,u=e.loadingArea,c=e.noMoreArea,s=e.prepareArea,d=e.retryArea,f=e.defaultStatus,v=void 0===f?"prepare":f,m=e.status,h=e.getScrollContainer,p=e.trigger,g=void 0===p?"scroll":p,b=e.threshold,y=void 0===b?200:b,E=e.throttle,w=void 0===E?0:E,C=e.getDataAtFirst,x=void 0===C||C,T=e.getData,N=e.blockWhenLoading,k=void 0===N||N,S=e.onStatusChange,R=e.onClick,M=e.onEndReached,L=t.useRef(null),O="scroll"===g&&x,_=t.useState(v),I=_[0],B=_[1],A=t.useRef(!1),D=m||I,P=t.useRef(D),H=t.useCallback((function(e,t){B(e),S&&S(e,t)}),[S]),F=t.useCallback((function(e){k&&"loading"===P.current||(H("loading",e),null==T||T((function(e){A.current=!1,H(e,"manual")})))}),[k,H,T]);t.useEffect((function(){P.current=D}),[D]),Je((function(){"scroll"===g&&"prepare"===D&&q(0,y)&&F("pageEnd")}),[D]),t.useEffect((function(){O&&"prepare"===P.current&&F("requestAtFirst")}),[g]);var z=t.useCallback((function(){q(j("scrollTop",h),y+1)?A.current||(A.current=!0,M&&M(),["nomore","retry","before-ready"].includes(P.current)||F("scrollEnd")):A.current=!1}),[h,y,F,M]);function q(e,t){return j("scrollHeight",h)-e-j("clientHeight",h)<=t}function W(e){("click"===g&&"prepare"===P.current||"retry"===P.current)&&F("click"),R&&R(e)}return t.useEffect((function(){var e=null,t=w?zn(z,w):z;if("scroll"===g){var n=V(h);n&&(n.addEventListener("scroll",t),e=n)}return function(){e&&e.removeEventListener("scroll",t)}}),[g,h,z,w]),t.useImperativeHandle(n,(function(){return{dom:L.current,changeStatus:H}}),[H]),i.default.createElement(ke,null,(function(e){var t=e.prefixCls,n=e.locale,r=void 0===n?J:n;return i.default.createElement("div",{className:t+"-load-more status-"+D+" "+o,ref:L,style:a,onClick:W},function(e){switch(D){case"before-ready":return l;case"prepare":return void 0===s?i.default.createElement("div",{className:"load-more-text prepare"},"scroll"===g?e.LoadMore.prepareScrollText:e.LoadMore.prepareClickText,e.LoadMore.loadMoreText):s;case"loading":return void 0===u?i.default.createElement("div",{className:"load-more-text loading"},e.LoadMore.loadingText):u;case"nomore":return void 0===c?i.default.createElement("div",{className:"load-more-text nomore"},e.LoadMore.noDataText):c;case"retry":return void 0===d?i.default.createElement("div",{className:"load-more-text retry"},e.LoadMore.failLoadText):d;default:return null}}(r))}))}));function Yi(e){var t=e.color,n=void 0===t?"currentColor":t;return i.default.createElement("div",{className:"c-svg-arrow nav-bar-back"},i.default.createElement("svg",{height:"100%",viewBox:"0 0 16 16"},i.default.createElement("path",{id:"path-1_1_",d:"M2.1,8l5.4,5.4c0.1,0.1,0.1,0.3,0,0.5L7,14.4c-0.1,0.1-0.3,0.1-0.5,0L0.7,8.5c-0.3-0.3-0.3-0.7,0-0.9\n l5.9-5.9c0.1-0.1,0.3-0.1,0.5,0l0.5,0.5c0.1,0.1,0.1,0.3,0,0.5L2.1,8z",fill:n})))}var Gi=t.forwardRef((function(e,n){var r=e.children,o=e.title,a=void 0===o?"":o,l=e.onClickLeft,c=e.leftContent,s=void 0===c?i.default.createElement(Yi,null):c,d=e.onClickRight,f=e.rightContent,v=e.onShowChange,m=e.style,h=e.className,p=void 0===h?"":h,g=e.wrapClass,b=e.placeholder,y=void 0===b||b,w=e.fixed,C=void 0===w||w,x=e.hasBottomLine,T=void 0===x||x,N=e.statusBarHeight,k=void 0===N?0:N,S=e.extra,R=e.getScrollContainer,M=e.showOffset,L=void 0===M?0:M,O=e.onScrollChange,_=e.getComputedStyleByScroll,I=e.ariaLabel,B=void 0===I?"":I,A=e.ariaRole,D=void 0===A?"banner":A,P=t.useRef(null),H=t.useState(L>0),F=H[0],z=H[1],q=F?"transparent":"",W=t.useState({}),X=W[0],Y=W[1],G=et();t.useImperativeHandle(n,(function(){return{navBar:P.current,dom:P.current}})),t.useEffect((function(){null==v||v(!F)}),[F]);var U=function(){!function(e){if(z(e<L),null==O||O(e),_){var t=_(e);Y(t)}}(j("scrollTop",R)||0)};function K(e){l&&l(e)}function Z(e){d&&d(e)}return t.useEffect((function(){var e=L||_||O,t=V(R);return U(),e&&t&&t.addEventListener("scroll",U,!1),function(){e&&t&&t.removeEventListener("scroll",U,!1)}}),[L,_,O,R]),i.default.createElement(ke,null,(function(e){var t,n,o=e.prefixCls;return i.default.createElement("div",{ref:P,className:E(g,o+"-nav-bar",(t={},t[o+"-nav-bar-fixed"]=C,t[o+"-nav-bar-float"]=!y,t[o+"-nav-bar-hide"]=F,t)),style:u(u({paddingTop:C&&k?k+"px":""},m||{}),q?{background:q}:{}),"aria-label":B,role:D},i.default.createElement("div",{className:E(p,G,o+"-nav-bar-wrapper",(n={},n[o+"-nav-bar-wrapper-fixed"]=C,n[o+"-nav-bar-wrapper-border"]=T,n)),style:u({paddingTop:k?k+"px":""},X)},i.default.createElement("div",{className:o+"-nav-bar-inner all-border-box"},s?i.default.createElement("div",{className:o+"-nav-bar-left",onClick:K},s):null,r||i.default.createElement("div",{className:o+"-nav-bar-title"},i.default.createElement("div",{className:o+"-nav-bar-title-text"},a)),f?i.default.createElement("div",{className:o+"-nav-bar-right",onClick:Z},f):null),S))}))})),Ui=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,a=e.style,l=e.children,u=e.leftContent,c=e.rightContent,s=e.marquee,d=void 0===s?"overflow":s,f=e.closeable,v=void 0===f||f,m=e.closeIcon,h=void 0===m?i.default.createElement(Wo,null):m,p=e.wrapable,g=void 0===p||p,b=e.speed,y=void 0===b?50:b,w=e.delay,C=void 0===w?1e3:w,x=e.autoSetGradientStyle,T=void 0===x||x,N=e.onClick,k=e.onClose,S=t.useRef(null),R=t.useRef(null),M=t.useRef(null),L=t.useRef(null),O=t.useState(!1),_=O[0],I=O[1],B=t.useMemo((function(){var e=[];return"none"===d&&g||e.push("no-wrap"),"none"===d&&e.push(g?"wrapable":"ellipsis"),e}),[d,g]),A=t.useMemo((function(){if(!T)return{};var e,t=(null==a?void 0:a.backgroundColor)||(null==a?void 0:a.background),n=(e=String(t)||"")?U[e]?U[e]+"00":/^#[A-Fa-f0-9]{6}$/.test(e)?e+"00":/^rgb\(.*?\)$/.test(e)?e.replace(/rgb\((.*?)\)/,"rgba($1, 0)"):"":"";return n?{background:"linear-gradient(to right, "+t+", "+n+")"}:{}}),[a]);function D(){S.current&&H(S.current)}function P(e){e.stopPropagation(),null==k||k(e),D()}function F(){we((function(){setTimeout((function(){!function(){if(!R.current||!M.current)return;var e=M.current,t="always"===d,n=R.current.offsetWidth,r=M.current.offsetWidth;"overflow"===d&&n<r&&(t=!0);if(I(t),function(){L.current&&(clearTimeout(L.current),L.current=null)}(),t){var o=r/y;e.style.animationDuration=o+"s",L.current=window.setTimeout((function(){I(!1),e.style.animationDuration=n/y+o+"s",e.style.animationIterationCount="infinite",e.style.paddingLeft=n+"px",we((function(){I(!0)}))}),1e3*o)}}()}),_?0:C)}))}return t.useImperativeHandle(n,(function(){return{dom:S.current,close:D,updateData:F}}),[F]),t.useEffect((function(){F()}),[]),i.default.createElement(ke,null,(function(e){var t,n=e.prefixCls;return t=n+"-notice-bar",i.default.createElement("div",{className:E(t,o,B),style:a,ref:S,onClick:N},u?i.default.createElement("div",{className:t+"-left-part"},u):null,i.default.createElement("div",{className:t+"-content",ref:R},_?i.default.createElement("i",{className:t+"-gradient left",style:A}):null,i.default.createElement("div",{className:E(t+"-content-inner",{animate:_}),ref:M},l),_?i.default.createElement("i",{className:t+"-gradient right",style:A}):null),c?i.default.createElement("div",{className:t+"-right-part"},c):null,v?i.default.createElement("div",{className:t+"-close",onClick:P},h):null)}))}));function Ki(e,t){return function(n,r){var o="string"==typeof n?{content:n,type:"info"}:n;void 0!==t&&(o.type=t);var i=document.createElement("div"),a=o.getContainer;a?a().appendChild(i):document.body.appendChild(i);var l=new wt(e,i,r),c=l.render,s=l.unmount;var d=u(u({},o),{close:v,onClose:function(){var e=o.onClose;e&&e(),s(),i.parentNode&&i.parentNode.removeChild(i)},getContainer:function(){return i},visible:!1}),f=!1;function v(){f=!0,d.visible=!1,c(d)}return c(d),we((function(){f||(d.visible=!0,c(d))})),{update:function(e){d=u(u({},d),e),c(d)},close:v}}}var Zi=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,l=e.style,c=e.visible,s=void 0!==c&&c,d=e.transitionDuration,f=void 0===d?300:d,v=e.content,m=e.duration,h=void 0===m?3e3:m,p=e.onClose,g=e.type,b=void 0===g?"info":g,y=e.close,E=e.getContainer,w=t.useRef(null),C=t.useRef(null),x=t.useRef(),T=t.useRef(),N=t.useState(!s),k=N[0],S=N[1],R=t.useState(0),M=R[0],L=R[1];function O(){if(C.current){var e=C.current.getBoundingClientRect().height;L(e)}}t.useImperativeHandle(n,(function(){return{dom:w.current,updateLayout:O}})),t.useEffect((function(){return s&&O(),s&&h&&(clearTimeout(x.current),x.current=window.setTimeout((function(){null==y||y()}),h)),function(){s&&clearTimeout(x.current)}}),[s,h]),Je((function(){s||(T.current=window.setTimeout((function(){p&&p()}),f))}),[s]),t.useEffect((function(){return we((function(){S(!0)})),function(){clearTimeout(T.current)}}),[]);var _=function(e){return i.default.createElement("div",{className:e+"-notify "+e+"-notify-"+b+" "+o,style:u(u(u({},l),k?yt({transitionDuration:f+"ms"}):{}),{height:s?M:0}),ref:w},(t=e+"-notify",v?i.default.createElement("div",{className:t+"-content "+(s?t+"-content-transition-Y0":t+"-content-transition-Y100"),ref:C,style:u({},k?yt({transitionDuration:f+"ms"}):{})},v):null));var t};return i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return E?a.default.createPortal(_(t),E()):_(t)}))}));var $i=G(Zi,function(e){return{info:Ki(e),success:Ki(e,"success"),error:Ki(e,"error"),warn:Ki(e,"warn")}}(Se(Zi)));function Ji(){return i.default.createElement("svg",{width:"8",height:"14",viewBox:"0 0 8 14",fill:"none"},i.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.40514 12.7583C7.6004 12.563 7.6004 12.2465 7.40514 12.0512L2.40095 7.04701L7.36396 2.084C7.55922 1.88874 7.55922 1.57216 7.36396 1.37689L7.01041 1.02334C6.81515 0.828077 6.49856 0.828077 6.3033 1.02334L0.646447 6.68019C0.470402 6.85624 0.453075 7.1309 0.594469 7.32636C0.617837 7.37275 0.64889 7.41626 0.687628 7.455L6.34448 13.1119C6.53974 13.3071 6.85633 13.3071 7.05159 13.1119L7.40514 12.7583Z",fill:"currentColor"}))}var Qi=t.forwardRef((function(e,n){var r,o=t.useContext(Te),a=o.prefixCls,l=o.locale,u=e.className,c=void 0===u?"":u,s=e.style,d=e.current,f=void 0===d?1:d,v=e.pageSize,m=void 0===v?10:v,h=e.total,p=void 0===h?5:h,g=e.icon,b=void 0!==g&&g,y=e.justify,w=void 0===y?"side":y,C=e.hideOnOnePage,x=void 0!==C&&C,T=e.nextFieldType,N=void 0===T?"default":T,k=e.renderPrevField,S=e.renderNextField,R=e.type,M=void 0===R?"default":R,L=e.prevFieldText,O=void 0===L?null==l?void 0:l.Pagination.previousPage:L,_=e.nextFieldText,I=void 0===_?null==l?void 0:l.Pagination.nextPage:_,B=e.onChange,A=et(),D=t.useMemo((function(){return Math.ceil(p/m)}),[p,m]),P=t.useRef(null);t.useImperativeHandle(n,(function(){return{dom:P.current}}));var H=function(e){return"prev"===e?Array.isArray(b)&&Boolean(b.length)?i.default.createElement("span",{className:"btn-icon"},b[0]):"[object Object]"===Object.prototype.toString.call(b)?i.default.createElement("span",{className:"btn-icon"},b):b?i.default.createElement("span",{className:"btn-icon"},i.default.createElement(Ji,null)):null:Array.isArray(b)&&Boolean(b.length)?i.default.createElement("span",{className:"btn-icon"},b.length>=2?b[1]:b[0]):"[object Object]"===Object.prototype.toString.call(b)?i.default.createElement("span",{className:"btn-icon next"},b):b?i.default.createElement("span",{className:"btn-icon next"},i.default.createElement(Ji,null)):null},F=a+"-pagination";return x&&1===D?i.default.createElement("div",{className:E(F,c)}):i.default.createElement("div",{ref:P,className:E(F,A,(r={},r[F+"-simple"]="none"===M,r),c),style:s},function(e){var t;if("none"===M)return null;var n=E(e+"-prev-field",((t={})["flex-"+w]=!0,t));return void 0===k?i.default.createElement("div",{className:n},i.default.createElement("div",{className:E(e+"-field","prev",{text:"text"===M,button:"text"!==M,disabled:1===f}),onClick:function(){f<=1||null==B||B({pageSize:m,pageNum:D,current:Math.max(1,f-1)})}},H("prev"),Boolean(O)&&i.default.createElement("span",{className:"btn-text"},O))):i.default.createElement("div",{className:n},k?k({current:f,pageSize:m,pageNum:D}):null)}(F),i.default.createElement("div",{className:F+"-item"},i.default.createElement("span",{className:F+"-item-active"},f)," / ",D),function(e){var t,n;if("none"===M)return null;var r=E(e+"-next-field",((t={})["flex-"+w]=!0,t));if(void 0===S)return i.default.createElement("div",{className:r},i.default.createElement("div",{className:E(e+"-field","next",(n={text:"text"===M,button:"text"!==M},n["default"===N?M:"primary"]=f<D,n.disabled=f>=D,n)),onClick:function(){f>=D||null==B||B({pageSize:m,pageNum:D,current:Math.min(f+1,D)})}},Boolean(I)&&i.default.createElement("span",{className:"btn-text"},I),H("next")));var o=S&&S({current:f,pageSize:m,pageNum:D});return i.default.createElement("div",{className:r},o)}(F))}));var ea=t.forwardRef((function(e,n){var r=t.useContext(Te).prefixCls,o=e.className,a=e.needShadow,l=e.content,u=e.direction,c=e.position,s=e.minWidth,d=e.maxWidth,f=e.arrowWidth,v=e.transformOrigin,m=e.mode,h=e.showCloseIcon,p=void 0!==h&&h,g=e.textSuffix,b=void 0===g?null:g,y=e.renderArrow,w=e.onClickCloseIcon,C=e.onClickTextSuffix,x=t.useRef(null),T=t.useRef(null),N=Ze(!1),k=N[0],S=N[1];t.useImperativeHandle(n,(function(){return{dom:x.current,content:T.current}})),t.useEffect((function(){var e=c.top,t=c.bottom,n=c.height,r=c.left,o=c.width;(r||o||e||n||t)&&(k||setTimeout((function(){S(!0)}),0))}),[c,k]);var R,M,L,O;return i.default.createElement("div",{ref:x,className:E(r+"-popover-inner","popover-inner","all-border-box",m+"-mode",o,{show:k,"with-shadow":a,"with-suffix":p||b,"custom-content":"string"!=typeof l}),style:(M=c.top,L=c.bottom,O={height:c.height+"px",left:c.left+"px",minWidth:s,maxWidth:d},M?O.top=M+"px":L&&(O.bottom=L+"px"),O.transformOrigin=v.x+" "+v.y,yt(O))},i.default.createElement("div",{className:"popover-bg"},y?y({arrowWidth:f,arrowLeft:c.arrowLeft,direction:u}):i.default.createElement("div",{className:"popover-arrow "+u,style:(R=c.arrowLeft,{width:f,height:f,marginLeft:R?R+"px":null,marginRight:R?R+"px":null})},i.default.createElement("div",{className:"popover-arrow-content"}))),i.default.createElement("div",{className:E("popover-content",u,{"show-close-icon":p}),ref:T},"string"==typeof l?i.default.createElement(i.default.Fragment,null,i.default.createElement("div",{className:"content-text"},l),p&&i.default.createElement(i.default.Fragment,null,i.default.createElement("div",{className:"icon-divider"}),i.default.createElement("div",{className:"text-close-icon",onClick:w},i.default.createElement(Wo,null))),b&&i.default.createElement("div",{className:"text-suffix",onClick:C},b)):l))})),ta={left:null,top:null,bottom:null,width:null,height:null,arrowLeft:0},na={top:14,right:14,bottom:14,left:14},ra=!0,oa=function(e,n,r,o){var i=e.direction,a=void 0===i?"topRight":i,l=e.verticalOffset,s=void 0===l?10:l,d=e.horizontalOffset,f=void 0===d?8:d,v=e.edgeOffset,m=void 0===v?14:v,p=e.arrowWidth,g=void 0===p?9:p,b=e.mode,y=void 0===b?"follow":b,E=e.useAutoDirection,w=void 0===E?ra:E,C=t.useState(ta),x=C[0],T=C[1],N=t.useMemo((function(){var e=x.top,t=x.bottom,n=x.height,r=x.left,o=x.width;return!(r||o||e||n||t)}),[x]),k=t.useState({x:"0",y:"0"}),S=k[0],R=k[1],M=$e(a),L=M[0],O=M[1],_=M[2],I=t.useCallback((function(e){return Et(h(m)?m[e]:m,na[e])}),[m]),B=t.useCallback((function(e){return Et(h(w)?w[e]:w,ra)}),[w]);function A(e){var t=e.childRect,n=e.config,r=u(u({},n),{adjustOffset:0});r.arrowLeft=function(e){var t=e.childRect,n=e.config;return-1!==L.indexOf("Left")||-1!==L.indexOf("Right")?(t.width-g)/2+f:(n.width-g)/2}({childRect:t,config:n});var i=screen.availWidth,a=[I("top"),I("right"),I("bottom"),I("left")],l=a[0],c=a[1],d=a[2],v=a[3],m=[B("vertical"),B("horizontal")],h=m[0];if(m[1])if(-1!==L.indexOf("Right")){if((C=Number(n.width)-t.left-t.width)>0){var p=C+v;r.left=Number(r.left)+p,r.arrowLeft+=p,r.adjustOffset=p}if(i-t.right<c){p=-((C=c)-(i-t.right));r.left=Number(r.left)+p,r.adjustOffset=p}}else if(-1!==L.indexOf("Center")){var b=(Number(n.width)-t.width)/2,E=b-(i-t.right),w=b-t.left;if(E>0){p=-(E+c);r.left=Number(r.left)+p,r.arrowLeft-=p,r.adjustOffset=p}if(w>0){p=w+v;r.left=Number(r.left)+p,r.arrowLeft-=p,r.adjustOffset=p}}else if(-1!==L.indexOf("Left")){var C;if((C=Number(n.width)-t.width-(i-t.right))>0){p=-(C+c);r.left=Number(r.left)+p,r.arrowLeft-=p,r.adjustOffset=p}t.left<v&&(C=v,r.left=Number(r.left)+C,r.adjustOffset=v)}if(h){var x=t.bottom-(r.bottom&&r.height?r.bottom+r.height:0),T=t.top+(r.top&&r.height?r.top+r.height:0);-1!==L.indexOf("top")&&x<l?(r.top=s+t.height,r.bottom=null,W("bottom")):-1!==L.indexOf("bottom")&&T+d>window.innerHeight&&(r.top=null,r.bottom=s+t.height,W("top"))}if("global"===y){var N=o.current;if(!N)return r;var k=N.getBoundingClientRect(),S=k.top,R=k.left,M=k.bottom;if(null!==r.left&&(r.left+=R),null!==r.top&&(r.top+=S),null!==r.bottom){var O=window.innerHeight||document.documentElement.clientHeight;r.bottom=O-(M-r.bottom)}}return r}function D(e,t){var n=A({childRect:e,config:t}),r=n.adjustOffset,o=c(n,["adjustOffset"]),i=function(e,t){var n=e.arrowLeft,r=e.width||0,o=e.height||0,i=g/2,a=O.current.indexOf("top")>-1?i+o+"px":"-"+i+"px";return{x:O.current.indexOf("Left")>-1?n+i+"px":O.current.indexOf("Right")>-1?r-(n+i)+"px":r/2-t+"px",y:a}}(o,r);R(i),T(o)}t.useEffect((function(){_(a)}),[a]);var P=function(e){var t=e.popoverWidth,n=e.popoverHeight,r=e.childRect;D(r,{left:-(t-r.width-f),width:t,top:null,height:n,bottom:s+r.height,arrowLeft:0})},H=function(e){var t=e.popoverWidth,n=e.popoverHeight,r=e.childRect;D(r,{left:-(t-r.width)/2,width:t,top:null,height:n,bottom:s+r.height,arrowLeft:0})},F=function(e){var t=e.popoverWidth,n=e.popoverHeight,r=e.childRect;D(r,{left:-f,width:t,top:null,height:n,bottom:s+r.height,arrowLeft:0})},V=function(e){var t=e.popoverWidth,n=e.popoverHeight,r=e.childRect;D(r,{left:-(t-r.width-f),width:t,bottom:null,height:n,top:s+r.height,arrowLeft:0})},j=function(e){var t=e.popoverWidth,n=e.popoverHeight,r=e.childRect;D(r,{left:-(t-r.width)/2,width:t,bottom:null,height:n,top:s+r.height,arrowLeft:0})},z=function(e){var t=e.popoverWidth,n=e.popoverHeight,r=e.childRect;D(r,{left:-f,width:t,bottom:null,height:n,arrowLeft:0,top:s+r.height})},q=t.useCallback((function(){var e,t=null===(e=n.current)||void 0===e?void 0:e.content;if(t){var o=t.offsetWidth,i=t.offsetHeight;if(0!==o&&0!==i){var a=r.current;if(a){var l={popoverWidth:o,popoverHeight:i,childRect:a.getBoundingClientRect()};switch(L){case"topRight":P(l);break;case"topCenter":H(l);break;case"topLeft":F(l);break;case"bottomRight":V(l);break;case"bottomCenter":j(l);break;case"bottomLeft":z(l)}}}}}),[r,L,n,P,H,F,V,j,z]),W=function(e){if(-1===L.indexOf(e)){var t=L.replace(/top|bottom/,e);_(t),O.current=t}},X=t.useCallback((function(){var e=n.current;if(e){var t=e.content;if(t){var r=t.getBoundingClientRect(),o=r.top,i=r.bottom;(-1!==L.indexOf("top")&&o<I("top")||-1!==L.indexOf("bottom")&&i+I("bottom")>window.innerHeight)&&q()}}}),[L,n,q,I]);return{direction:L,position:x,isCalcPosition:N,arrowWidth:g,transformOrigin:S,computedChildAndPopoverOffset:q,resetPosition:function(){T(ta),_(a)},onAdjustDirection:W,adjustVerticalDirection:X}},ia=0,aa=function(e,n,r,o,i,a){var l=e.clickOtherToClose,u=void 0===l||l,c=e.touchOtherToClose,s=void 0===c?void 0!==e.touchToClose&&e.touchToClose:c,d=e.duration,f=void 0===d?0:d,v=e.useAutoDirection,m=void 0===v||v,p=e.verticalScrollThrottle,g=void 0===p?100:p,b=e.preventBodyClick,y=void 0!==b&&b,E=e.getVerticalScrollContainer,w=void 0===E?function(){return document}:E,C=t.useRef(0),x=Et(h(m)?m.vertical:m,ra),T=function(){i(!1),window.clearTimeout(C.current),C.current=0,k()},N=t.useMemo((function(){return zn(a,g)}),[a,g]);t.useEffect((function(){var e=w();return o.current&&e&&x&&e.addEventListener("scroll",N),function(){e&&e.removeEventListener("scroll",N)}}),[N,w,x,o]);var k=t.useCallback((function(){document.body.removeEventListener("click",S,!0),document.body.removeEventListener("touchstart",R);var e=w();e&&(e.removeEventListener("scroll",N),e.removeEventListener("scroll",M))}),[N]),S=t.useCallback((function(e){var t;O(n.current,e.target)||O((null===(t=r.current)||void 0===t?void 0:t.dom)||null,e.target)||(y&&(e.stopPropagation(),e.preventDefault()),T())}),[y]),R=t.useCallback((function(e){var t,i,a,l;(null===(t=e.targetTouches[0])||void 0===t?void 0:t.target)&&n.current&&(null===(i=r.current)||void 0===i?void 0:i.dom)&&o.current&&(O(n.current,null===(a=e.targetTouches[0])||void 0===a?void 0:a.target)||O(r.current.dom,null===(l=e.targetTouches[0])||void 0===l?void 0:l.target)||(y&&function(){clearTimeout(ia);var e=function e(t){t.stopPropagation(),t.preventDefault(),document.body.removeEventListener("click",e,!0),clearTimeout(ia)};document.body.addEventListener("click",e,!0),ia=window.setTimeout((function(){document.body.removeEventListener("click",e,!0)}),500)}(),T()))}),[y]),M=t.useCallback((function(){o.current&&s&&T()}),[s]);t.useEffect((function(){var e=w();return e&&s&&o.current&&e.addEventListener("scroll",M),function(){e&&e.removeEventListener("scroll",M)}}),[M,s]);return{popoverDisappear:T,mayRemoveEventListenerOnBody:k,startCloseTimer:function(){0!==f&&(C.current=window.setTimeout((function(){i(!1),k()}),f))},mayAddEventOnBody:function(){if(s){document.body.addEventListener("touchstart",R);var e=w();e&&e.addEventListener("scroll",M)}else u&&document.body.addEventListener("click",S,!0)}}},la=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,a=e.innerPopoverClassName,l=void 0===a?"":a,u=e.style,c=void 0===u?{}:u,s=e.theme,d=void 0===s?"black":s,f=e.needShadow,v=void 0!==f&&f,m=e.content,h=void 0===m?"":m,p=e.transitionTimeout,g=void 0===p?300:p,b=e.minWidth,y=void 0===b?"10px":b,w=e.maxWidth,C=void 0===w?"90vw":w,x=e.transitionName,T=void 0===x?"fade":x,N=e.clickSelfToClose,k=void 0===N||N,S=e.touchSelfToClose,R=void 0===S?void 0!==e.touchToClose&&e.touchToClose:S,M=e.defaultVisible,L=void 0!==M&&M,O=e.visible,_=e.children,I=e.bordered,B=void 0===I?"white"===e.theme:I,A=e.showCloseIcon,D=void 0!==A&&A,P=e.textSuffix,H=void 0===P?null:P,F=e.mode,V=void 0===F?"follow":F,j=e.showMask,z=void 0!==j&&j,q=e.maskTransitionTimeout,W=void 0===q?{enter:450,exit:240}:q,X=e.renderArrow,Y=e.onChange,G=e.onClickCloseIcon,U=e.onClickTextSuffix,K=e.onClickMask,Z=t.useContext(Te).prefixCls,$=t.useState(!1),J=$[0],Q=$[1],ee=t.useRef(J),te=t.useRef(null),ne=t.useRef(null),re=t.useRef(null),oe=oa(e,re,ne,te),ie=oe.direction,ae=oe.position,le=oe.isCalcPosition,ue=oe.transformOrigin,ce=oe.computedChildAndPopoverOffset,se=oe.arrowWidth,de=oe.resetPosition,fe=oe.adjustVerticalDirection,ve=function(e){void 0===e&&(e=!0),e&&!le||(null==Y||Y(e),void 0===O&&Q(e))},me=aa(e,te,re,ee,ve,fe),he=me.popoverDisappear,pe=me.mayAddEventOnBody,ge=me.startCloseTimer,be=me.mayRemoveEventListenerOnBody;function ye(){J&&ce()}t.useImperativeHandle(n,(function(){var e;return{dom:te.current,child:ne.current,innerPopover:re.current,innerPopoverDom:(null===(e=re.current)||void 0===e?void 0:e.dom)||null,updatePosition:ye}})),t.useEffect((function(){return(L||O)&&Q(!0),function(){be()}}),[]),t.useEffect((function(){void 0!==O&&Q(Boolean(O))}),[O]),t.useEffect((function(){ee.current&&ce()}),[_,h,ie,V]),t.useEffect((function(){J&&function(){if(ge(),setTimeout(pe,0),!le)return;setTimeout((function(){ce()}),0)}(),ee.current=J,J||(be(),setTimeout((function(){!ee.current&&de()}),("object"==typeof g?g.exit:g)||300))}),[J]);var Ee=function(){return i.default.createElement(ea,{className:E(d+"-theme",l,{bordered:B}),ref:re,direction:ie,minWidth:y,maxWidth:C,position:ae,arrowWidth:se,transformOrigin:ue,needShadow:v,content:h,mode:V,showCloseIcon:D,textSuffix:H,renderArrow:X,onClickCloseIcon:G,onClickTextSuffix:U})};return i.default.createElement(i.default.Fragment,null,z&&i.default.createElement(Re,null,i.default.createElement(Ue,{in:J&&!le,timeout:W,type:"fade",mountOnEnter:!0,unmountOnExit:!0},i.default.createElement("div",{className:Z+"-popover-mask",onClick:K}))),i.default.createElement("div",{className:E(Z+"-popover",o,d+"-theme",V+"-mode",{bordered:B,"custom-content":"string"!=typeof h}),style:c,ref:te,onClick:function(){var e=ee.current;e?e&&k&&!R&&he():ve(!0)},onTouchStart:function(){R&&ee.current&&he()}},i.default.createElement(Re,{getContainer:function(){return"global"===V?document.body:te.current}},J&&le&&Ee(),i.default.createElement(Ue,{in:J&&!le,timeout:g,type:T,mountOnEnter:!0,unmountOnExit:!0},Ee())),i.default.createElement("div",{ref:ne,className:"popover-child-inner"},_)))})),ua=function(e){return t.forwardRef((function(n,r){var o=n.menu,a=n.menuLayout,l=void 0===a?"vertical":a,s=n.onSelect,d=n.onClickMenuItem,f=n.className,v=void 0===f?"":f,m=n.useClickStatus,h=void 0!==m&&m,p=n.clickStatusDuration,g=void 0===p?300:p,b=n.clickSelfToClose,y=void 0===b||b,w=n.touchSelfToClose,C=void 0===w?void 0!==n.touchToClose&&n.touchToClose:w,x=n.defaultVisible,T=void 0!==x&&x,N=n.visible,k=n.onChange,S=c(n,["menu","menuLayout","onSelect","onClickMenuItem","className","useClickStatus","clickStatusDuration","clickSelfToClose","touchSelfToClose","defaultVisible","visible","onChange"]),R=t.useContext(Te).prefixCls,M=t.useState(-1),L=M[0],O=M[1],_=t.useRef(0),I=t.useMemo((function(){return o.map((function(e){return"string"==typeof e?{text:e}:e}))}),[o]),B=t.useState(void 0===N?T:N),A=B[0],D=B[1];t.useEffect((function(){D(Boolean(N))}),[N]);var P=t.useRef(null);t.useImperativeHandle(r,(function(){return P.current}));var H=t.useMemo((function(){return i.default.createElement("div",{className:E(R+"-popover-menu-content",l+"-menu")},I.map((function(e,t){var n="string"==typeof e.text?e.text:"menu_item_"+t,r=e.text,a=e.value,l=void 0===a?n:a,u=e.disabled,c=void 0!==u&&u,f=e.icon;return i.default.createElement("div",{className:E(R+"-popover-menu-item",{disabled:c,active:L===t}),key:l,onTouchStart:function(){h&&!c&&(clearTimeout(_.current),O(t),_.current=window.setTimeout((function(){O(-1),_.current=0}),g))},onClick:function(){d&&d(l,o[t]),c||s&&s(l,o[t])}},f&&i.default.createElement("div",{className:E(R+"-popover-menu-icon")},f),i.default.createElement("div",{className:E(R+"-popover-menu-text")},r))})))}),[R,l,I,L,h,g,d,s]);return i.default.createElement(e,u({ref:P,visible:A,clickSelfToClose:y,touchSelfToClose:C,onChange:function(e){var t=function(){k&&"function"==typeof k&&k(e),void 0===N&&D(e)};!e&&h?window.setTimeout(t,Math.max(0,g-300)):t()}},S,{content:H,className:E(v,R+"-popover-menu")}))}))}(la),ca=G(la,{Menu:ua});var sa=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,a=e.visible,l=e.children,s=e.maskStyle,d=e.contentStyle,f=e.direction,v=void 0===f?"bottom":f,m=e.percentToClose,h=void 0===m?.3:m,p=e.distanceToClose,g=void 0===p?10:p,b=e.speedToClose,y=void 0===b?200:b,w=e.allowSwipeDirections,C=e.exitDirection,x=e.onTouchMove,T=e.onTouchStart,N=e.onTouchEnd,k=e.onOpen,S=e.onClose,R=e.close,M=c(e,["className","visible","children","maskStyle","contentStyle","direction","percentToClose","distanceToClose","speedToClose","allowSwipeDirections","exitDirection","onTouchMove","onTouchStart","onTouchEnd","onOpen","onClose","close"]),L=t.useState(a),O=L[0],_=L[1],I=$e({direction:"X",value:0}),B=I[0],A=I[1],D=I[2],P=t.useState(!1),H=P[0],F=P[1],V=t.useRef(null),j=t.useRef(0),z=t.useRef(0),q=t.useRef(0),W=t.useRef(!1),X=t.useCallback((function(e){var t,n=null===(t=V.current)||void 0===t?void 0:t.content,r=(null==n?void 0:n.offsetWidth)||0,o=(null==n?void 0:n.offsetHeight)||0;return"X"===e?r:o}),[]),Y=t.useCallback((function(e){var t=e.direction,n=e.value,r=X(t);return r?Math.max(0,Math.min(1,Math.abs(n)/r)):0}),[]),G=t.useMemo((function(){return Y(B)}),[B]),U=t.useMemo((function(){return void 0!==w?w:[v]}),[w,v]),K=t.useCallback((function(e){var t,n,r,o;T&&T(e)||(F(!1),W.current=!0,j.current=(null===(n=null===(t=e.touches)||void 0===t?void 0:t[0])||void 0===n?void 0:n.clientX)||0,z.current=(null===(o=null===(r=e.touches)||void 0===r?void 0:r[0])||void 0===o?void 0:o.clientY)||0,q.current=(new Date).getTime())}),[T]),Z=t.useCallback((function(e,t,n){return"X"===e?t>0?"right":"left":n>0?"bottom":"top"}),[]),$=t.useCallback((function(e,t,n){var r,o,i,a,l;if((!x||!x(e,t,n))&&(t||(W.current=!1),W.current&&e.target!==(null===(r=V.current)||void 0===r?void 0:r.mask))){var u=(null===(i=null===(o=e.changedTouches)||void 0===o?void 0:o[0])||void 0===i?void 0:i.clientX)||0,c=(null===(l=null===(a=e.changedTouches)||void 0===a?void 0:a[0])||void 0===l?void 0:l.clientY)||0,s=u<0?0:u-j.current,d=c-z.current,f=Z("x"===n?"X":"Y",s,d),v=U.includes(f)?f:"",m=C||v,h=["top","bottom"].includes(m)?"Y":"X",p=["bottom","right"].includes(m)?1:-1;switch(v){case"top":case"bottom":D({direction:h,value:Math.abs(d)*p});break;case"left":case"right":D({direction:h,value:Math.abs(s)*p})}}}),[x,U,C]),J=t.useCallback((function(e,t){var n=Z(e,t,t);return("left"===n||"top"===n?-1:1)*X(e)}),[]),Q=t.useCallback((function(e){if((!N||!N(e))&&W.current){W.current=!1;var t=(new Date).getTime(),n=A.current,r=n.direction,o=n.value,i=Y(A.current),a=o/(t-q.current)*1e3;i>0&&i>=h&&Math.abs(o)>g||Math.abs(a)>y?(F(!1),R(e),we((function(){D({direction:r,value:J(r,o)})}))):(F(!0),D({direction:"X",value:0})),q.current=0}}),[N,h,g,y,R]);return t.useImperativeHandle(n,(function(){return V.current})),t.useEffect((function(){var e,t=null===(e=V.current)||void 0===e?void 0:e.content;return O&&t&&(t.addEventListener("touchstart",K),t.addEventListener("touchend",Q),t.addEventListener("touchcancel",Q)),function(){var e,t=null===(e=V.current)||void 0===e?void 0:e.content;O&&t&&(t.removeEventListener("touchstart",K),t.removeEventListener("touchend",Q),t.removeEventListener("touchcancel",Q))}}),[O,K,Q]),i.default.createElement(ke,null,(function(e){var t,n=e.prefixCls;return i.default.createElement(Rt,u({ref:V,visible:a,close:R,className:E(n+"-popup-swiper",o,{"has-trans":H}),direction:v,onTouchMove:$,onOpen:function(){_(!0),null==k||k()},onClose:function(e){_(!1),D({direction:"X",value:0}),null==S||S(e)},maskStyle:u(u({},s||{}),{opacity:G?1-G:void 0}),contentStyle:(t=yt({transform:B.value?"translate"+B.direction+"("+B.value+"px) translateZ(2px)":void 0}),u(u({},d||{}),t))},M),l)}))}));var da,fa=G(sa,function(e){return{open:(t=e,xt(t,"ARCO_POPUP_SWIPER"))};var t}(Se(sa))),va=t.forwardRef((function(e,n){var r=e.mode,o=void 0===r?"base":r,a=Math.min(100,Math.max(e.percentage,0)),l=e.top,c=e.percentPosition,s=void 0===c?"right":c,d=e.className,f=void 0===d?"":d,v=e.style,m=e.showPercent,h=void 0===m?"base"===o:m,p=e.renderPercent,g=e.trackColor,b=e.progressColor,y=e.disabled,w=void 0!==y&&y,C=e.trackStroke,x=e.progressStroke,T=e.duration,N=void 0===T?300:T,k=e.step,S=void 0===k?1:k,R=e.filleted,M=void 0===R||R,L=e.mountedTransition,O=void 0===L||L,_=e.mountedBezier,I=void 0===_?[.34,.69,.1,1]:_,B=t.useRef(null),A=ut(O,a,N,I,S),D=A[0],P=A[1];function H(e){return h?"follow"===e?void 0!==p?p(D):i.default.createElement("div",{className:E("text-follow",{"inner-disabled inner-block-disabled":w}),style:{background:b}},D,"%"):e===s?i.default.createElement("div",{style:{color:b},className:E("text","text-"+s,{"text-disabled":w&&("left"===s||"right"===s)})},void 0!==p?p(D):D+"%"):null:null}function F(e){var t=e.prefixCls;return i.default.createElement("div",{role:"progressbar","aria-valuenow":a,"aria-valuemax":100,"aria-valuemin":0,className:E(t+"-progress",{"progress-fixed":"nav"===o},{"progress-disabled":w},f),style:u({top:l},v),ref:B},i.default.createElement("div",{className:"progress-wrapper"},H("left"),i.default.createElement("div",{style:{background:g,height:C},className:E("progress-track","position-"+s,{filleted:M},{"nav-mode":"nav"===o})},i.default.createElement("div",{style:yt({background:b,width:D+"%",height:x,transition:P?"width linear "+N/1e3+"s":""}),className:E("progress-bar",{"bar-disabled":w,filleted:M})},"follow"===s?i.default.createElement("div",{className:"wrapper"},H("follow")):null)),H("right"),H("innerLeft")))}return t.useImperativeHandle(n,(function(){return{dom:B.current}})),i.default.createElement(ke,null,F)}));!function(e){e[e.Static=0]="Static",e[e.Pulling=1]="Pulling",e[e.Loosing=2]="Loosing",e[e.Loading=3]="Loading",e[e.Finish=4]="Finish"}(da||(da={}));var ma=function(e){var n=e.onRefresh,r=e.loosingMinHeight,o=t.useState(da.Static),i=o[0],a=o[1],l=t.useRef(!1),u=t.useRef(null),c=t.useRef(null),s=t.useState(!1),d=s[0],f=s[1],v=t.useMemo((function(){var e,t;return null!==(t=null===(e=u.current)||void 0===e?void 0:e.getBoundingClientRect().height)&&void 0!==t?t:40}),[i]),m=t.useMemo((function(){return r||v}),[v,r]),h=t.useCallback((function(){return l.current=!0,Vo.Promise.all([null==n?void 0:n(),new Vo.Promise((function(e){setTimeout((function(){e()}),500)}))])}),[n]);return{status:i,setStatus:a,touching:d,setTouching:f,loadingRef:l,labelRef:u,domRef:c,loosingHeight:m,handleRefresh:h,tipsHeight:v}},ha=function(e){var n=e.domRef,r=e.handleTouchStart,o=e.handleTouchMove,i=e.handleTouchEnd;t.useEffect((function(){var e;return null===(e=n.current)||void 0===e||e.addEventListener("touchstart",r,{passive:!1}),function(){var e;null===(e=n.current)||void 0===e||e.removeEventListener("touchstart",r)}}),[o]),t.useEffect((function(){var e;return null===(e=n.current)||void 0===e||e.addEventListener("touchmove",o,{passive:!1}),function(){var e;null===(e=n.current)||void 0===e||e.removeEventListener("touchmove",o)}}),[o]),t.useEffect((function(){var e,t;return null===(e=n.current)||void 0===e||e.addEventListener("touchend",i),null===(t=n.current)||void 0===t||t.addEventListener("touchcancel",i),function(){var e,t;null===(e=n.current)||void 0===e||e.removeEventListener("touchend",i),null===(t=n.current)||void 0===t||t.removeEventListener("touchcancel",i)}}),[i])},pa=function(e){var n=e.allowPullWhenNotTop,r=e.domRef,o=t.useCallback((function(){var e,t,o,i=null!==(o=null===(t=null===(e=r.current)||void 0===e?void 0:e.getBoundingClientRect())||void 0===t?void 0:t.height)&&void 0!==o?o:0;return r.current&&!(!n&&(r.current.scrollTop<0||r.current.scrollTop>r.current.scrollHeight-i))}),[n]);return{ifShouldHandle:o}},ga=t.forwardRef((function(e,n){var r,o=t.useContext(Te),a=o.prefixCls,l=o.locale,c=void 0===l?J:l,s=t.useRef(0),d=e.className,f=e.style,v=e.children,m=e.loadingText,h=void 0===m?i.default.createElement("div",{className:E(a+"-pull-refresh-label-text")},i.default.createElement(Dt,{type:"circle",radius:4}),i.default.createElement("span",null,c.PullRefresh.loadingText)):m,p=e.pullingText,g=void 0===p?i.default.createElement("div",{className:E(a+"-pull-refresh-label-text")},i.default.createElement("span",null,c.PullRefresh.pullingText)):p,b=e.finishText,y=void 0===b?i.default.createElement("div",{className:E(a+"-pull-refresh-label-text")},i.default.createElement("span",null,c.PullRefresh.finishText)):b,w=e.initialText,C=e.finishDelay,x=void 0===C?300:C,T=e.disabled,N=void 0!==T&&T,k=e.loosingMinHeight,S=e.useHideAsNestedScroll,R=void 0===S||S,M=e.allowPullWhenNotTop,L=void 0!==M&&M,O=e.onRefresh,_=t.useRef(0),I=t.useRef(da.Static),B=t.useState({}),A=B[0],D=B[1],P=t.useState(0),H=P[0],F=P[1],V=ma({loosingMinHeight:k,onRefresh:O}),j=V.loadingRef,z=V.status,q=V.setStatus,W=V.labelRef,X=V.domRef,Y=V.touching,G=V.setTouching,U=V.loosingHeight,K=V.tipsHeight,Z=V.handleRefresh,$=pa({domRef:X,allowPullWhenNotTop:L}).ifShouldHandle,Q=t.useMemo((function(){var e,t;return R&&!Y&&z===da.Pulling&&(null!==(t=null===(e=null==X?void 0:X.current)||void 0===e?void 0:e.scrollTop)&&void 0!==t?t:0)>0||N?u(u({},A),{opacity:0}):A}),[A,R,Y,N]),ee=((r={})[da.Static]=void 0===w?g:w,r[da.Pulling]=g,r[da.Loading]=h,r[da.Finish]=y,r),te=t.useCallback((function(e,t){void 0===t&&(t=function(){}),s.current===e&&D({position:"relative",height:"0px",top:0,transition:"height .45s"}),setTimeout((function(){s.current===e&&(X.current&&(X.current.style.overflow="auto"),q(da.Pulling),D({position:"absolute",top:"-"+K+"px",height:K+"px",transition:"height 0s"}),I.current=da.Static,j.current=!1,t())}),450)}),[K]),ne=t.useCallback((function(){!N&&!j.current&&X.current&&$()&&(G(!0),X.current&&0===X.current.scrollTop&&(X.current.scrollTop=1))}),[N,$]),re=function(){return new Promise((function(e){if(X.current){X.current.style.overflow="hidden";var t=(new Date).getTime();q(da.Loading),D({position:"relative",top:0,height:K+"px",transition:"height 0s"}),s.current=t,Z().then((function(){ee[da.Finish]?(q(da.Finish),setTimeout((function(){te(t,e)}),x)):te(t,e)}))}}))},oe=t.useCallback((function(){N||j.current||!X.current||(G(!1),I.current===da.Loosing&&re())}),[N,K]),ie=t.useCallback((function(){N||j.current||!X.current||setTimeout((function(){var e,t,n,r,o=-(null!==(t=null===(e=X.current)||void 0===e?void 0:e.scrollTop)&&void 0!==t?t:0)>U;o&&(_.current=null!==(r=null===(n=X.current)||void 0===n?void 0:n.scrollTop)&&void 0!==r?r:0),I.current=o?da.Loosing:da.Pulling}))}),[N,U]),ae=t.useCallback((function(){if(X.current){var e=X.current.getBoundingClientRect().height;F(e)}}),[]);return Ke(ae),t.useImperativeHandle(n,(function(){return{dom:X.current,refresh:re,updateIOSHeight:ae}})),t.useEffect((function(){ae(),te(s.current)}),[]),ha({domRef:X,handleTouchStart:ne,handleTouchMove:ie,handleTouchEnd:oe}),i.default.createElement("div",{className:E(a+"-pull-refresh all-border-box is-ios",d,{"is-disabled":N||!Y&&R}),ref:X,style:H>0?u({height:H},f||{}):f},i.default.createElement("div",{className:E(a+"-pull-refresh-content-wrapper")},i.default.createElement("div",{className:E(a+"-pull-refresh-label-wrapper"),style:Q},i.default.createElement("div",{className:E(a+"-pull-refresh-label"),ref:W},ee[z])),i.default.createElement("div",{className:E(a+"-pull-refresh-content"),style:H>0?{minHeight:H+1+"px"}:{}},v)))})),ba=t.forwardRef((function(e,n){var r,o=t.useContext(Te),a=o.prefixCls,l=o.locale,u=void 0===l?J:l,c=e.className,s=e.style,d=e.children,f=e.loosingText,v=void 0===f?i.default.createElement("div",{className:E(a+"-pull-refresh-label-text")},i.default.createElement("span",null,u.PullRefresh.loosingText)):f,m=e.loadingText,h=void 0===m?i.default.createElement("div",{className:E(a+"-pull-refresh-label-text")},i.default.createElement(Dt,{type:"circle",radius:4}),i.default.createElement("span",null,u.PullRefresh.loadingText)):m,p=e.pullingText,g=void 0===p?i.default.createElement("div",{className:E(a+"-pull-refresh-label-text")},i.default.createElement("span",null,u.PullRefresh.pullingText)):p,b=e.finishText,y=void 0===b?i.default.createElement("div",{className:E(a+"-pull-refresh-label-text")},i.default.createElement("span",null,u.PullRefresh.finishText)):b,w=e.initialText,C=e.finishDelay,x=void 0===C?300:C,T=e.loosingMinHeight,N=e.dampRate,k=void 0===N?4:N,S=e.disabled,R=void 0!==S&&S,M=e.useHideAsNestedScroll,L=void 0===M||M,O=e.onRefresh,_=e.allowPullWhenNotTop,I=void 0!==_&&_,B=t.useState({}),A=B[0],D=B[1],P=t.useRef(null),H=t.useRef(0),F=t.useRef(!1),V=ma({loosingMinHeight:T,onRefresh:O}),j=V.loadingRef,z=V.status,q=V.setStatus,W=V.labelRef,X=V.domRef,Y=V.touching,G=V.setTouching,U=V.loosingHeight,K=V.handleRefresh,Z=V.tipsHeight,$=pa({domRef:X,allowPullWhenNotTop:I}).ifShouldHandle,Q=t.useMemo((function(){var e,t;return L&&!Y&&z===da.Pulling&&(null!==(t=null===(e=null==X?void 0:X.current)||void 0===e?void 0:e.scrollTop)&&void 0!==t?t:0)>0?{opacity:0}:{}}),[L,Y]),ee=((r={})[da.Static]=void 0===w?g:w,r[da.Pulling]=g,r[da.Loosing]=v||g,r[da.Loading]=h,r[da.Finish]=y,r),te=function(e,t,n){if(e<5){if(e<0)return void(H.current=0);if(0===t)return setTimeout((function(){D({transition:"all 0s"})})),void(H.current=0)}var r=function(e,t,n){return e>t?t+(e-t)/n:e}(e,U,k);H.current=r,D({transform:r?"translateY("+r+"px)":"",transition:"all "+t/1e3+"s"}),setTimeout((function(){null==n||n()}),t)},ne=function(e){void 0===e&&(e=function(){}),te(0,300,(function(){X.current&&X.current.scrollTop<0&&(X.current.scrollTop=0),j.current=!1,q(da.Static),e()}))},re=t.useCallback((function(e){var t;if(!(R||P.current||j.current)&&X.current&&$()){G(!0),0===X.current.scrollTop&&(X.current.scrollTop=1);var n=e.touches[0],r=n.pageX,o=n.pageY;r&&o&&(P.current={start:null===(t=X.current)||void 0===t?void 0:t.scrollTop,x:r,y:o}),q(da.Pulling)}}),[R,$]),oe=function(){return new Promise((function(e){q(da.Loading),we((function(){te(Z,300),K().then((function(){ee[da.Finish]?(q(da.Finish),setTimeout((function(){ne(e)}),x)):ne(e)}))}))}))},ie=t.useCallback((function(){(0!==H.current||$())&&(F.current=!1,G(!1),R||!P.current||j.current||(P.current=null,z===da.Loosing?oe():ne()))}),[R,z,Z,$]),ae=t.useCallback((function(e){if(F.current=!0,!R&&!j.current&&X.current&&P.current){var t=e.touches[0].pageY-P.current.y-P.current.start;0===H.current&&X.current.scrollTop>0||0===H.current&&t<0||(q((function(){return t>U?da.Loosing:da.Pulling})),te(t,0),e.stopPropagation(),e.cancelable&&e.preventDefault())}}),[R,U]);return t.useEffect((function(){var e,t=function(){F.current&&X.current&&(X.current.scrollTop<0||H.current)&&(X.current.scrollTop=0)};return null===(e=X.current)||void 0===e||e.addEventListener("scroll",t),function(){var e;null===(e=X.current)||void 0===e||e.removeEventListener("scroll",t)}}),[]),t.useImperativeHandle(n,(function(){return{dom:X.current,refresh:oe,updateIOSHeight:function(){console.warn('updateIOSHeight 仅在 type="ios" 时可用')}}})),ha({domRef:X,handleTouchStart:re,handleTouchMove:ae,handleTouchEnd:ie}),i.default.createElement("div",{className:E(a+"-pull-refresh all-border-box is-android",c,{"is-disabled":(R||!Y&&L)&&z!==da.Loading}),style:s,ref:X},i.default.createElement("div",{className:E(a+"-pull-refresh-place"),style:yt(A)},i.default.createElement("div",{className:E(a+"-pull-refresh-label"),ref:W,style:Q},ee[z]),i.default.createElement("div",{className:E(a+"-pull-refresh-content",{"is-loading":[da.Loading,da.Finish].includes(z)})},d)))})),ya=t.forwardRef((function(e,t){var n=e.type,r=e.useIosOptimize,o=e.children,a=c(e,["type","useIosOptimize","children"]),l=et(),s="ios"===n||r&&"ios"===(n||l)?ga:ba;return i.default.createElement(s,u({},u(u({},a),{ref:t})),o)}));function Ea(e,t){var n=e.keyword,r=e.highlightClassName,o=e.highlightStyle;return i.default.createElement("span",{className:r,style:o,key:t},n)}function wa(e){var t,n,r=e.prefixCls,o=e.associationItems,a=void 0===o?[]:o,l=e.highlightClassName,s=e.highlightMode,d=void 0===s?"none":s,f=e.highlightStyle,v=e.onAssociationClick,m=e.onAssociationItemClick,h=e.renderAssociation,p=e.renderAssociationItem,g=e.keyword,b=e.visible,y=r+"-association",w=y+"-item-highlight",C=function(e){if(!e||!g||"none"===d)return e;var t={keyword:g,content:e,highlightClassName:l||w,highlightStyle:f};return"contain"===d?function(e){var t=e.content,n=void 0===t?"":t,r=e.keyword,o=void 0===r?"":r,i=n.split(o),a=i.reduce((function(t,n,r){return t.push(n),r!==i.length-1&&t.push(Ea(e,r)),t}),[]);return a}(t):"prefix"===d?function(e){for(var t=e.content,n=void 0===t?"":t,r=e.keyword,o=void 0===r?"":r,i=c(e,["content","keyword"]),a=-1,l=0;l<o.length&&!(l>=n.length||n[l]!==o[l]);l++)a=l;return a>-1?[Ea(u(u({},i),{keyword:n.substring(0,a+1)}),0),n.substring(a+1)]:n}(t):"function"==typeof d?d(e,g,w):e},x=function(e,t){var n=e.content,r=n;return"string"==typeof n&&"none"!==d&&(r=C(n)),p&&(r=p(e,t,r)),i.default.createElement("div",{key:t,className:y+"-item",onClick:function(){return null==m?void 0:m(e,t)}},r)};return i.default.createElement("div",{className:E(y,(t={},t[y+"-visible"]=b,t)),onClick:v},(n=a.map(x),h?h(n):n))}function Ca(e){var n=e.className,r=e.onCancel,o=e.focusing,a=e.currentInputValue,l=e.text,u=t.useState(o||Boolean(a)),c=u[0],s=u[1];return t.useEffect((function(){s(o||Boolean(a))}),[o,a]),c?i.default.createElement("span",{className:n,onClick:function(){null==r||r(),we((function(){s(!1)}))}},l):null}var xa=t.forwardRef((function(e,n){var r=t.useContext(Te),o=r.prefixCls,a=r.locale,l=o+"-search-bar",s=e.inputClass,d=e.inputStyle,f=e.type,v=void 0===f?"search":f,m=e.nativeProps,h=e.id,p=e.name,g=e.maxLength,b=e.placeholder,y=void 0===b?null==a?void 0:a.SearchBar.placeholder:b,w=e.readOnly,C=e.onKeyUp,x=e.onKeyPress,T=e.disabled,N=e.pattern,k=e.prefix,S=void 0===k?i.default.createElement(qo,{className:l+"-search-icon"}):k,R=e.append,M=e.textAlign,L=void 0===M?"left":M,O=e.actionButton,_=e.clearable,I=void 0===_||_,B=e.clearShowType,A=void 0===B?"value":B,D=e.shape,P=void 0===D?"square":D,H=e.className,F=e.enableAssociation,V=void 0!==F&&F,j=e.associationVisible,z=e.associationShowType,q=void 0===z?"default":z,W=e.associationItems,X=e.highlightClassName,Y=e.highlightMode,G=e.highlightStyle,U=e.onCancel,K=e.onAssociationClick,Z=e.onAssociationItemClick,$=e.renderAssociation,J=e.renderAssociationItem,Q=c(e,["inputClass","inputStyle","type","nativeProps","id","name","maxLength","placeholder","readOnly","onKeyUp","onKeyPress","disabled","pattern","prefix","append","textAlign","actionButton","clearable","clearShowType","shape","className","enableAssociation","associationVisible","associationShowType","associationItems","highlightClassName","highlightMode","highlightStyle","onCancel","onAssociationClick","onAssociationItemClick","renderAssociation","renderAssociationItem"]),ee=t.useRef(null),te=Oo(u({className:E(H,l+"-"+P),prefix:S,clearable:I,append:function(e,t){var n=null;n="function"==typeof R?R(e,t):R;var r=void 0===O?i.default.createElement(Ca,{focusing:e,currentInputValue:t,className:l+"-cancel-btn",onCancel:U,text:null==a?void 0:a.SearchBar.cancelBtn}):O;return i.default.createElement(i.default.Fragment,null,n,r,V?i.default.createElement(wa,{prefixCls:l,keyword:t,visible:me,associationItems:W,highlightClassName:X,highlightMode:Y,highlightStyle:G,onAssociationClick:K,onAssociationItemClick:Z,renderAssociation:$,renderAssociationItem:J}):null)},clearShowType:A},Q),ee),ne=te.inputValue,re=te.handleChange,oe=te.handleInput,ie=te.handleKeyDown,ae=te.handleFocus,le=te.handleBlur,ue=te.handleClick,ce=te.renderWrapper,se=te.wrapRef,de=t.useState("always"===q||("value"===q||"default"===q)&&Boolean(ne)),fe=de[0],ve=de[1],me=null!=j?j:fe;t.useImperativeHandle(n,(function(){return{dom:se.current,input:ee.current,toggleAssociation:function(e){ve(null!=e?e:!fe)}}}));var he=function(e,t){"always"===q?ve(!0):"focus"===q?ve(e):"default"===q?ve(e&&Boolean(t)):"value"===q&&ve(Boolean(t))},pe=function(e){he(!0,e.target.value),ae(e)},ge=function(e){he(!1,e.target.value),le(e)},be=function(e){var t=e.target.value;he(Boolean(t),t),re(e)},ye=function(){return ce(l,v,i.default.createElement("input",u({},m,{id:h,name:p,maxLength:g,placeholder:y,readOnly:w,onFocus:pe,onBlur:ge,onKeyUp:C,onKeyPress:x,ref:ee,className:E(l+"-input",s,l+"-input-"+L),style:d,value:ne,type:v,disabled:T,pattern:N,onChange:be,onInput:oe,onKeyDown:ie,onClick:ue})))};return i.default.createElement(ke,null,ye)}));function Ta(e,t,n){var r=1e17,o=e*r,i=t*r;return"-"===n?(o-i)/r:(o+i)/r}var Na=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,a=e.style,l=e.inputStyle,u=e.inputClass,c=void 0===u?"":u,s=e.value,d=e.defaultValue,f=void 0===d?1:d,v=e.allowEmpty,m=void 0!==v&&v,h=e.digits,p=void 0===h?0:h,g=e.disabled,b=void 0!==g&&g,y=e.inputReadonly,w=void 0!==y&&y,C=e.max,x=void 0===C?1/0:C,T=e.min,N=void 0===T?1:T,k=e.equalLimitDisabled,S=void 0!==k&&k,R=e.step,M=void 0===R?1:R,L=e.theme,O=void 0===L?"default":L,_=e.formatter,I=e.addButton,B=e.minusButton,A=e.renderContent,D=e.onBlur,P=e.onChange,H=e.onFocus,F=e.onAddButtonClick,V=e.onMinusButtonClick,j=e.onClick,z=e.onInput,q=function(e){var n=e.defaultValue,r=e.formatter,o=e.max,i=e.min,a=e.value,l=e.digits,u=t.useState(n),c=u[0],s=u[1],d=void 0!==a?a:c;return{updateValue:function(e){var t="function"==typeof e?e(c):e;r?new Promise((function(e){e(r(Number(t)))})).then((function(e){var t=Math.max(i,Math.min(o,e));s(t)})):s(t)},actualInputValue:d,showValue:d===Number.MIN_VALUE?"":l>0?parseFloat(String(d)).toFixed(l):d}}({defaultValue:f,formatter:_,min:N,max:x,value:s,digits:p}),W=q.updateValue,X=q.actualInputValue,Y=q.showValue,G=function(e){var n=e.actualInputValue,r=e.min,o=e.max,i=e.step,a=e.disabled,l=e.equalLimitDisabled,u=e.updateValue,c=e.onAddButtonClick,s=e.onMinusButtonClick,d=t.useState((function(){return n===r||a})),f=d[0],v=d[1],m=t.useState((function(){return n===o||a})),h=m[0],p=m[1];return t.useEffect((function(){v(n<=r),p(n>=o)}),[n]),{minusButtonDisable:f,addButtonDisable:h,handleMinusButtonClick:function(e){f||(u((function(e){var t=Ta(e,i,"-");return t<r?l?e:r:t})),s&&s(e))},handleAddButtonClick:function(e){h||(u((function(e){var t=Ta(Number(e),i,"+");return t>o?l?e:o:t})),c&&c(e))}}}({actualInputValue:X,min:N,max:x,step:M,disabled:b,digits:p,equalLimitDisabled:S,updateValue:W,onAddButtonClick:F,onMinusButtonClick:V}),U=G.minusButtonDisable,K=G.addButtonDisable,Z=G.handleAddButtonClick,$=G.handleMinusButtonClick,J=function(e){var t=e.defaultValue,n=e.min,r=e.max,o=e.digits,i=e.actualInputValue,a=e.allowEmpty,l=e.updateValue,u=e.onBlur,c=e.onChange,s=e.onInput;return Je((function(){c&&c(i)}),[i]),{handleInput:function(e){var t=e.target.value,n=Number(t),r=t.indexOf(".");if(o>0&&-1!==r){var u=t.slice(r+1).length;l(u>o?i:n)}else l(a&&""===t?Number.MIN_VALUE:n);s&&s(e)},handleBlur:function(e){var o=e.target.value,i=Number(o);l(a&&""===o?Number.MIN_VALUE:a||""!==o?Math.max(n,Math.min(r,i)):t),u&&u(e)}}}({defaultValue:f,min:N,max:x,digits:p,actualInputValue:X,allowEmpty:m,updateValue:W,onBlur:D,onChange:P,onInput:z}),Q=J.handleInput,ee=J.handleBlur,te=t.useRef(null),ne=t.useRef(null);return t.useImperativeHandle(n,(function(){return{dom:te.current,input:ne.current,changeValue:function(e){var t=null!=e?e:f;t=Math.min(x,Math.max(t,N)),W(t)}}})),i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return i.default.createElement("div",{className:E(t+"-stepper",t+"-"+O,o),style:a,ref:te,onClick:j},i.default.createElement("div",{"aria-label":"decrease",onClick:$},B||i.default.createElement("div",{className:E(t+"-stepper-minus-button")},i.default.createElement(jo,{className:E(t+"-stepper-minus-button-icon",{disabled:U})}))),A?A(X):i.default.createElement("input",{style:l,className:E(t+"-stepper-input",c),onFocus:H,onInput:Q,onBlur:ee,disabled:b,value:Y,readOnly:w,ref:ne,type:"number",role:"spinbutton","aria-valuenow":Number(Y),"aria-valuemax":x,"aria-valuemin":N}),i.default.createElement("div",{"aria-label":"increase",onClick:Z},I||i.default.createElement("div",{className:E(t+"-stepper-add-button")},i.default.createElement(Xo,{className:E(t+"-stepper-add-button-icon",{disabled:K})}))))}))})),ka=G(Na,"Stepper"),Sa=t.forwardRef((function(e,n){var r=e.title,o=e.description,a=e.icon,l=t.useContext(Ra),u=l.iconType,c=l.current,s=l.direction,d=l.index,f=void 0===d?0:d,v=l.status,m=l.align,h=l.changeIndex,p=e.status||v,g=e.align||m,b=t.useRef(null);t.useImperativeHandle(n,(function(){return{dom:b.current}}));var y=t.useMemo((function(){return p||(c<f?"wait":c===f?"process":"finish")}),[p,f,c]);return i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return i.default.createElement("div",{ref:b,className:E(t+"-steps-item",t+"-steps-item-align-"+g,y,s,u),onClick:function(){return h(f)}},i.default.createElement("div",{className:E(t+"-steps-item-tail",t+"-steps-item-tail-status-"+y,t+"-steps-item-tail-align-"+g,y+"-tail-color-with-config")}),a?i.default.createElement("div",{className:E(t+"-steps-item-custom-icon",y+"-custom-icon-bg-color-with-config")},a):i.default.createElement("div",{className:E(t+"-steps-item-icon",y+"-bg-color-with-config")},"number"===u?function(e){var t;return"finish"===y?t=i.default.createElement(Yo,null):"error"===y&&(t=i.default.createElement(Go,null)),t||i.default.createElement("span",{className:E(e+"-steps-item-icon-num")},f+1)}(t):i.default.createElement("span",{className:E(t+"-steps-item-icon-dot")})),r||o?i.default.createElement("div",{className:E(t+"-steps-item-content",t+"-steps-item-content-align-"+g)},r?i.default.createElement("div",{className:E(t+"-steps-item-title",y+"-title-color-with-config")},r):null,o?i.default.createElement("div",{className:E(t+"-steps-item-description")},o):null):null)}))})),Ra=t.createContext({changeIndex:function(){}}),Ma=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,a=e.style,l=e.children,c=e.direction,s=void 0===c?"horizontal":c,d=e.align,f=e.iconType,v=void 0===f?"number":f,m=e.current,h=e.defaultIndex,p=void 0===h?0:h,g=e.status,b=void 0===g?"process":g,y=e.items,E=e.onClick,w=e.onChange,C=void 0!==d?d:"vertical"===s?"start":"center",x=t.useState(Number(p)),T=x[0],N=x[1],k=$e(void 0===m?T:m),S=k[0],R=k[1],M=k[2],L=t.useRef(null),O=et();function _(e){null==E||E(e),N(e),e!==R.current&&(null==w||w(e))}t.useImperativeHandle(n,(function(){return{dom:L.current}})),t.useEffect((function(){M(void 0===m?T:m)}),[m,T]);var I=t.useCallback((function(e,t){return i.default.createElement(Ra.Provider,{value:{iconType:v,current:S,direction:s,index:t,status:S===t?b:void 0,align:C,changeIndex:_},key:t},e)}),[v,S,s,C]);return i.default.createElement(ke,null,(function(e){var n=e.prefixCls;return i.default.createElement("div",{className:n+"-steps all-border-box "+o+" "+s+" "+O,style:a,ref:L},y?y.map((function(e,t){return I(i.default.createElement(Sa,u({},e,{key:t})),t)})):t.Children.toArray(l).map((function(e,t){return I(e,t)})))}))})),La=G(Ma,{Step:Sa}),Oa=t.forwardRef((function(e,n){var r=e.position,o=void 0===r?"top":r,a=e.topOffset,l=void 0===a?0:a,c=e.bottomOffset,s=void 0===c?0:c,d=e.followOffset,f=void 0===d?0:d,v=e.children,m=e.className,h=e.style,p=e.zIndex,g=void 0===p?100:p,b=e.portalWhenSticky,y=void 0!==b&&b,w=e.stickyStyle,C=void 0===w?"fixed":w,x=e.stickyCssStyle,T=e.getPortalContainer,N=e.getContainer,k=e.getScrollContainer,S=e.onStickyStateChange,R=e.onTopChange,M=$e(!1),L=M[0],O=M[1],I=M[2],B=$e(!1),A=B[0],D=B[1],P=B[2],H=t.useState({}),V=H[0],j=H[1],q=t.useRef(null),W=t.useRef(null),X=t.useRef(0),Y=t.useRef(null),G=t.useRef(null),U=t.useRef(!1),K=t.useCallback((function(e){var t=e.followTop,n=e.followBottom;if(q.current){var r="top"===o||"both"===o,i="bottom"===o||"both"===o,a=W.current.getBoundingClientRect(),c=q.current.getBoundingClientRect(),d=c.height;X.current=c.height;var v=z(G.current).containerRect,m=v.top,h=v.bottom,p=v.height,b=a.top-m,y=a.top+d-h,E=n-f-d-l-m,w=p-t-f-d-s;P(Boolean(O.current));var T=!!r&&(b<=l&&n>m+f),N=!!i&&(y>=-s&&t<h-f),k=T||N,M=("absolute"===C?0:m)+l,L=("absolute"===C?0:window.innerHeight-h)+s,_={};k&&(_=u(u(u(u({transform:"translateZ(0)",WebkitTransform:"translateZ(0)",position:"absolute"===C?"absolute":"fixed",zIndex:g},T?{top:E>0?M:M+E}:{}),N?{bottom:w>0?L:L+w}:{}),{left:a.left,width:a.width}),x||{})),null==R||R(Math.max(0,c.top-m-l)),I(k),j(_),k!==D.current&&S&&S({isTopSticky:T,isBottomSticky:N,isSticky:k,wasSticky:D.current})}}),[o,l,s,f,g,C,S,R,x]),Z=t.useCallback((function(){U.current||(_((function(){if(U.current=!1,Y.current){var e=Y.current.getBoundingClientRect(),t=e.top,n=e.bottom;K({followTop:t,followBottom:n})}})),U.current=!0)}),[K]);t.useEffect((function(){var e=F(N);Y.current=e||document.body;var t=k?F(k):window;if(t){G.current=t;return t.addEventListener("scroll",Z),Z(),function(){!function(e){e.removeEventListener("scroll",Z)}(t)}}}),[N,k,Z]),t.useEffect((function(){W.current&&(W.current.style.height=(O.current?X.current:0)+"px")}),[L,A]),t.useImperativeHandle(n,(function(){return{dom:q.current,recalculatePosition:Z}}),[Z]);var $=t.useMemo((function(){return u(u({},h||{}),V)}),[V,h]);function J(e){return i.default.createElement("div",{className:E(e+"-sticky",m),ref:q,style:$},v)}return i.default.createElement(ke,null,(function(e){var t=e.prefixCls;return i.default.createElement("div",null,i.default.createElement("div",{ref:W}),y&&L?i.default.createElement(Re,{getContainer:T},J(t)):J(t))}))}));function _a(e){var t=e.action,n=e.prefixCls,r=e.index,o=e.type,a=e.close,l=t.text,c=t.style,s=t.className,d=t.onClick,f=t.icon,v=t.children;return i.default.createElement("div",{className:E(n+"-"+o+" "+n+"-info-container",s),style:u({zIndex:r},c),onClick:function(){var e=(null==d?void 0:d())||null;e&&"boolean"!=typeof e?e&&e.then&&e.then((function(e){return!e&&a()})):!e&&a()}},v||i.default.createElement("div",{className:n+"-info"},f?i.default.createElement("div",{className:n+"-info-icon"},f):null,l?i.default.createElement("div",{className:n+"-info-text"},l):null))}var Ia=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,a=e.style,l=e.children,c=e.leftActions,s=e.rightActions,d=e.disabled,f=void 0!==d&&d,v=e.threshold,m=void 0===v?.15:v,h=e.closeOnTouchOutside,p=e.transitionDuration,g=void 0===p?300:p,b=e.dampRate,y=void 0===b?15:b,w=e.openStyleType,C=void 0===w?"layer":w,x=e.onClose,T=e.onOpen,N=t.useRef(null),k=t.useRef(null),S=t.useRef(null),R=t.useRef(!1),M=t.useRef(0),L=t.useState([]),O=L[0],_=L[1],I=t.useRef(0),B=t.useState([]),A=B[0],D=B[1],P=Qe(y),H=t.useRef(!1),F=t.useRef(null),V=$e(!1),j=V[0],z=V[1],q=V[2],W=$e(0),X=W[0],Y=W[1],G=W[2],U=t.useContext(Te).prefixCls,K=t.useRef(0),Z=t.useRef(0),$=t.useRef(0),J=t.useRef(0),Q="layer"===C,ee=t.useMemo((function(){return yt({transitionDuration:j?"0ms":g+"ms"})}),[j,g]);function te(e){K.current=Y.current,Z.current=0,$.current=0,J.current=0,F.current=null,Z.current=e.touches[0].pageX,$.current=e.touches[0].pageY}function ne(e){var t,n,r,o,i=e.changedTouches[0].pageX-Z.current,a=e.changedTouches[0].pageY-$.current;if(null===F.current&&(F.current=Math.abs(i)<Math.abs(a)),F.current)return q(!1),void G(0);e.cancelable&&e.preventDefault(),J.current=i,H.current=!0,q(!0),G((t=J.current+K.current,n=-I.current,r=M.current,o=Math.abs(t)/P.current,Math.min(Math.max(t,n-o),r+o)))}function re(){if(z.current&&!F.current){var e=Y.current>0?"left":"right";t=e,n=R.current?1-m:m,(r="left"===t?M.current:I.current)&&Math.abs(Y.current)>r*n?ae(t):ie(t),q(!1),we((function(){H.current=!1}))}var t,n,r}function oe(e){if(!e.current)return{totalWidth:0,widthArr:[]};var t=0,n=[],r=e.current.getElementsByClassName(U+"-swipe-action-menu-action-info-container");return Array.prototype.forEach.call(r,(function(e){var r,o=null!==(r=e.getBoundingClientRect().width)&&void 0!==r?r:0;t+=o,n.push(o)})),{totalWidth:t,widthArr:n}}function ie(e){if(G(0),R.current){if(R.current=!1,!e&&0!==Y.current)return void le(Y.current>0?"left":"right");le(e)}}function ae(e){void 0===e&&(e="right"),R.current||(R.current=!0,function(e){setTimeout((function(){null==T||T(e)}),g)}(e)),G("left"===e?M.current:-I.current)}function le(e){setTimeout((function(){null==x||x(e)}),g)}function ue(e){return 100*(O.slice(e+1).reduce((function(e,t){return e+t}),0)/M.current||0)+"%"}function ce(e){return 100*(A.slice(0,e).reduce((function(e,t){return e+t}),0)/I.current||0)+"%"}return t.useEffect((function(){var e=N.current;return!f&&e&&(e.addEventListener("touchstart",te),e.addEventListener("touchmove",ne),e.addEventListener("touchend",re)),function(){!f&&e&&(e.removeEventListener("touchstart",te),e.removeEventListener("touchmove",ne),e.removeEventListener("touchend",re))}}),[f]),t.useEffect((function(){var e=oe(k),t=e.totalWidth,n=e.widthArr;M.current=t,_(n);var r=oe(S),o=r.totalWidth,i=r.widthArr;I.current=o,D(i)}),[c,s]),t.useEffect((function(){var e=function(e){var t;!(null===(t=N.current)||void 0===t?void 0:t.contains(e.target))&&R.current&&ie()};return h&&document.addEventListener("touchstart",e),function(){h&&document.removeEventListener("touchstart",e)}}),[h]),t.useImperativeHandle(n,(function(){return{dom:N.current,close:ie,open:ae}})),i.default.createElement("div",{className:E(U+"-swipe-action",o,0===X?"action-close":"action-open"),style:yt(u(u(u({},a||{}),ee),{transform:"translateX("+X+"px)"})),ref:N,onClick:function(e){var t,n;!R.current||H.current||(null===(t=k.current)||void 0===t?void 0:t.contains(e.target))||(null===(n=S.current)||void 0===n?void 0:n.contains(e.target))||ie()}},i.default.createElement("div",{className:E(U+"-swipe-action-menu-left",U+"-swipe-action-menu",X>0?"action-open":"action-close"),ref:k,style:Q&&X>=0?u({width:X},ee):{}},null==c?void 0:c.map((function(e,t){return i.default.createElement(_a,{action:u(u({},e||{}),{style:u(u({},Q?{right:ue(t)}:{}),e.style||{}),className:E(e.className,"open-style-"+C)}),prefixCls:U+"-swipe-action-menu-action",index:c.length-t,type:"left",close:ie,key:t})}))),i.default.createElement("div",{className:U+"-swipe-action-content"},l),i.default.createElement("div",{className:E(U+"-swipe-action-menu-right",U+"-swipe-action-menu",X<0?"action-open":"action-close"),ref:S,style:Q&&X<=0?u({width:-1*X},ee):{}},null==s?void 0:s.map((function(e,t){return i.default.createElement(_a,{action:u(u({},e||{}),{style:u(u({},Q?{left:ce(t)}:{}),e.style||{}),className:E(e.className,"open-style-"+C)}),prefixCls:U+"-swipe-action-menu-action",index:t+1,type:"right",close:ie,key:t})}))))})),Ba=t.forwardRef((function(e,n){var r=e.className,o=void 0===r?"":r,a=e.maxElementOffset,l=void 0===a?56:a,u=e.maxLabelOffset,c=void 0===u?40:u,s=e.onConfirm,d=e.disabled,f=void 0!==d&&d,v=e.circleSize,m=void 0===v?80:v,h=e.minConfirmOffset,p=void 0===h?30:h,g=e.labelAnimationFunction,b=void 0===g?"cubic-bezier(0.14, 1, 0.34, 1)":g,y=e.labelAnimationDuration,w=void 0===y?250:y,C=e.children,x=e.normalText,T=void 0===x?"":x,N=e.activeText,k=void 0===N?"":N,S=e.initPos,R=void 0===S?0:S,M=t.useContext(Te).locale,L=void 0===M?J:M,O=t.useState(f),_=O[0],I=O[1],B=t.useState(0),A=B[0],D=B[1],P=t.useRef(null),H=t.useRef(null),F=t.useRef(null),V=t.useRef(!1),j=t.useRef(!1),z=t.useRef(0),q=t.useRef(null),W=q.current;return ot(W,"touchstart",e.onTouchStart),ot(W,"touchend",e.onTouchEnd),ot(W,"touchcancel",e.onTouchCancel),ot(W,"touchmove",e.onTouchMove),t.useEffect((function(){var t;if(!f&&P.current&&!_&&(0===P.current.childNodes.length?I(!0):1===P.current.childNodes.length?t=e.getScrollContainer?e.getScrollContainer():P.current.firstChild:((t=P.current).style.width="100%",t.style.overflowX="scroll",t.style.display="inline-flex",t.style.webkitOverflowScrolling="touch"),t)){var n=H.current,r=F.current;if(n){n.style.display="none";var o=0,i=0,a=function(e){o=e.touches[0].pageX},u=function(a){t.scrollLeft||(t.scrollLeft=1);var u=(i=a.touches[0].pageX)-o;z.current=u;var s=Ce(Math.abs(u),e.damping);if(u<0&&(t.scrollLeft+t.clientWidth>=t.scrollWidth-1||!t.scrollLeft)&&!j.current&&(V.current=!0,n.style.display="flex"),V.current&&u<0){a.stopPropagation(),a.cancelable&&a.preventDefault();var d=s>l?l:s,f=s>c?c:s;D(f),r&&(r.innerHTML=s>=p?k||L.SwipeLoad.activeText:T||L.SwipeLoad.normalText),n.style.transition="all 0.02s",n.style.webkitTransform="translateX(-"+f+"px)",n.style.transform="translateX(-"+f+"px)",t.style.transition="all 0.03s",t.style.webkitTransform="translateX(-"+d+"px)",t.style.transform="translateX(-"+d+"px)"}u>0&&t.scrollLeft+t.clientWidth<=t.scrollWidth-1&&(V.current=!1,n.style.display="none"),u<0&&t.scrollLeft+t.clientWidth<=t.scrollWidth-1?j.current=!1:j.current=!0},d=function(){var e=i-o;z.current=e;var r=Ce(Math.abs(e)),a=function(){t.style.transition="all "+w+"ms "+b,t.style.webkitTransform="translateX(0px)",t.style.transform="translateX(0px)",n.style.transition="all "+w+"ms "+b,n.style.webkitTransform="translateX(0px)",n.style.transform="translateX(0px)",V.current=!1,j.current=!1,setTimeout((function(){n.style.display="none"}),w)};if(r>=p&&(t.scrollLeft+t.clientWidth>=t.scrollWidth-1||!t.scrollLeft)&&V.current)return s(),void setTimeout((function(){a()}),250);a()};return t.addEventListener("touchstart",a),t.addEventListener("touchmove",u),t.addEventListener("touchend",d),function(){t.removeEventListener("touchstart",a),t.removeEventListener("touchmove",u),t.removeEventListener("touchend",d)}}}}),[f]),t.useImperativeHandle(n,(function(){return{dom:q.current}})),i.default.createElement(ke,null,(function(t){var n=t.prefixCls;return i.default.createElement("div",{className:n+"-swipe-load "+o,ref:q},i.default.createElement("div",{className:E(n+"-list-area"),ref:P},C),e.renderLabel?i.default.createElement("div",{className:E(n+"-custom-loading-area"),ref:H,style:{position:"absolute",right:R+"px"}},e.renderLabel.length?e.renderLabel(A):e.renderLabel()):i.default.createElement("div",{className:E(n+"-loading-area"),ref:H,style:{width:m+"px",height:m+"px",position:"absolute",right:"-"+m+"px"}},i.default.createElement("div",{className:E(n+"-loading-label"),ref:F})))}))})),Aa=t.createContext({changeIndex:function(){},active:!1,index:0,activeCustomStyle:{}});var Da=t.forwardRef((function(e,n){var r=t.useContext(Aa),o=r.active,a=r.changeIndex,l=r.index,c=r.activeCustomStyle,s=e.onClick,d=e.className,f=e.style,v=t.useRef(null);t.useImperativeHandle(n,(function(){return{dom:v.current}}));var m=function(e){null==s||s(e),a(l)};return i.default.createElement(ke,null,(function(t){var n,r=t.prefixCls;return i.default.createElement("div",{className:E(r+"-tab-bar-item",(n={},n[r+"-tab-bar-item-active"]=o,n),d),style:u(u({},f),o?c:{}),ref:v,onClick:function(e){return m(e)}},function(t){var n,r=e.icon?i.default.createElement("div",{className:E(t+"-tab-bar-item-icon")},"function"==typeof e.icon?e.icon(o):e.icon):null,a=e.title?i.default.createElement("div",{className:E(t+"-tab-bar-item-title",(n={},n[t+"-tab-bar-item-only-title"]=!r,n))},"function"==typeof e.title?e.title(o):e.title):null,l=e.extra&&"function"==typeof e.extra?e.extra(o):e.extra,u=e.child&&i.default.createElement("div",{className:E(t+"-tab-bar-item-children")},"function"==typeof e.child?e.child(o):e.child),c=r||l?i.default.createElement("div",{className:E(t+"-extra-wrap")},r,l):null;return u||i.default.createElement(i.default.Fragment,null,c,a)}(r))}))})),Pa=function(e){return t.forwardRef((function(n,r){var o=n.defaultActiveIndex,a=void 0===o?0:o,l=n.activeIndex,c=n.className,s=n.fixed,d=void 0===s||s,f=n.style,v=n.dataSource,m=n.children,h=n.onChange,p=n.activeCustomStyle,g=t.useState(a),b=g[0],y=g[1],w=$e(void 0===l?b:l),C=w[0],x=w[1],T=w[2];t.useEffect((function(){T(void 0===l?b:l)}),[l,b]);var N=t.useRef(null);t.useImperativeHandle(r,(function(){return{dom:N.current,changeIndex:S}}));var k=t.useCallback((function(e,t){return i.default.createElement(Aa.Provider,{value:{active:t===C,changeIndex:S,index:t,activeCustomStyle:p},key:t},e)}),[C]);function S(e){y(e),e!==x.current&&(null==h||h(e))}return i.default.createElement(ke,null,(function(n){var r,o=n.prefixCls;return i.default.createElement("div",{className:E(o+"-tab-bar",c,(r={},r[o+"-tab-bar-fixed"]=d,r)),style:f,ref:N},v?v.map((function(t,n){return k(i.default.createElement(e,u({key:n},t)),n)})):t.Children.toArray(m).map((function(e,t){return k(e,t)})))}))}))}(Da),Ha=G(Pa,{Item:Da}),Fa=t.forwardRef((function(e,n){var r=e.className,o=e.style,a=e.type,l=void 0===a?"primary":a,c=e.icon,s=e.children,d=e.size,f=void 0===d?"medium":d,v=e.color,m=e.bgColor,h=e.borderColor,p=e.borderStyle,g=void 0===p?"solid":p,b=e.halfBorder,y=void 0===b||b,w=e.closeable,C=e.closeIcon,x=e.closeColor,T=e.filleted,N=e.onClose,k=e.onClick,S=t.useRef(null),R=et();return t.useImperativeHandle(n,(function(){return{dom:S.current}})),i.default.createElement(ke,null,(function(e){var t=e.prefixCls+"-tag";return i.default.createElement("div",{className:E(t,"all-border-box",r,t+"-"+l,{"half-border":y},R,"size-"+f,{filleted:T}),style:u({color:v,background:m,borderColor:h,borderStyle:g},o||{}),ref:S,onClick:k},c,i.default.createElement("span",{className:"tag-text"},s),w?i.default.createElement("div",{onClick:function(e){e.stopPropagation(),N&&N(e)},className:"tag-close-wrap"},C||i.default.createElement(Wo,{className:"tag-close-icon",color:x})):null)}))}));var Va=function(e){return t.forwardRef((function(n,r){var o=n.className,a=n.style,l=n.list,c=n.type,s=n.showAddButton,d=void 0===s||s,f=n.addArea,v=n.horizontalPadding,m=n.verticalPadding,h=n.onAdd,p=n.onClose,g=t.useRef(null);function b(e,t){var n=e.style||{},r=t!==l.length-1||d?{marginRight:v}:{};return u(u(u({},n),r),{marginBottom:m})}return t.useImperativeHandle(r,(function(){return{dom:g.current}})),i.default.createElement(ke,null,(function(t){var n,r=t.prefixCls,s=t.locale,v=r+"-tag-list";return i.default.createElement("div",{className:E(v,o),style:(n={},m&&"string"==typeof m?n={marginBottom:"-"+m}:m&&"number"==typeof m&&(n={marginBottom:-1*m}),u(u({},a||{}),n)),ref:g},l.map((function(t,n){return i.default.createElement(e,u({key:n},t,{style:b(t,n),type:c,onClose:function(e){t.onClose&&t.onClose(e),p&&p(n,e)}}))})),d?i.default.createElement("div",{className:"tag-list-add-wrap",onClick:h},void 0!==f?f:i.default.createElement(Fa,{type:c,className:"tag-list-add",borderStyle:"dashed",icon:i.default.createElement(Xo,null),style:{marginBottom:m}},null==s?void 0:s.Tag.addTag)):null)}))}))}(Fa),ja=G(Fa,{List:Va});e.ActionSheet=Lt,e.Avatar=qt,e.Badge=Pt,e.Button=Yt,e.Carousel=Gt,e.Cell=At,e.Checkbox=hn,e.CircleProgress=pn,e.Collapse=xn,e.ContextProvider=Ne,e.CountDown=br,e.DatePicker=Ar,e.Dialog=$n,e.Dropdown=Fr,e.DropdownMenu=qr,e.Ellipsis=yo,e.Form=Mo,e.Grid=Ko,e.Image=Ht,e.ImagePicker=Qo,e.ImagePreview=Wi,e.Input=Io,e.LoadMore=Xi,e.Loading=Dt,e.Masking=kt,e.NavBar=Gi,e.NoticeBar=Ui,e.Notify=$i,e.Pagination=Qi,e.Picker=kr,e.PickerView=xr,e.Popover=ca,e.Popup=Rt,e.PopupSwiper=fa,e.Portal=Re,e.Progress=va,e.PullRefresh=ya,e.Radio=Fo,e.Rate=ti,e.SearchBar=xa,e.ShowMonitor=hi,e.Slider=si,e.Stepper=ka,e.Steps=La,e.Sticky=Oa,e.SwipeAction=Ia,e.SwipeLoad=Ba,e.Switch=nn,e.TabBar=Ha,e.Tabs=Wn,e.Tag=ja,e.Textarea=Ao,e.Toast=en,e.Transition=Ue,Object.defineProperty(e,"__esModule",{value:!0})}));
|
@@ -736,7 +736,7 @@ var ImagePreview = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
736
736
|
// @en In iOS when resetting the style, the image will disappear and cause flickering, so put a image at the bottom
|
737
737
|
// 优先过渡图,其次用原图
|
738
738
|
// @en Prioritize the transition image, followed by the original image
|
739
|
-
function renderImagePlaceholder(src, index) {
|
739
|
+
function renderImagePlaceholder(src, index, fitCss) {
|
740
740
|
var _ref2 = imagesStatus[index] || {},
|
741
741
|
originWidth = _ref2.originWidth,
|
742
742
|
originHeight = _ref2.originHeight,
|
@@ -746,6 +746,9 @@ var ImagePreview = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
746
746
|
var trans = hasOverflow ? {} : getStyleWithVendor({
|
747
747
|
transform: 'translateY(-50%)'
|
748
748
|
});
|
749
|
+
var fitObj = fitCss ? {
|
750
|
+
objectFit: fitCss
|
751
|
+
} : {};
|
749
752
|
return system === 'ios' && showPlaceholders[index] && originWidth && originHeight ? /*#__PURE__*/React.createElement("img", {
|
750
753
|
src: src,
|
751
754
|
style: _extends({
|
@@ -754,7 +757,7 @@ var ImagePreview = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
754
757
|
height: originHeight,
|
755
758
|
left: originLeft,
|
756
759
|
top: originTop
|
757
|
-
}, trans)
|
760
|
+
}, fitObj, trans)
|
758
761
|
}) : null;
|
759
762
|
}
|
760
763
|
function renderLoadingArea(index) {
|
@@ -820,7 +823,7 @@ var ImagePreview = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
820
823
|
animateDuration: transImageInfo ? 0 : void 0,
|
821
824
|
style: getImageStyle(),
|
822
825
|
className: getImageClass(index),
|
823
|
-
bottomOverlap: renderImagePlaceholder(image.fallbackSrc || image.src, index),
|
826
|
+
bottomOverlap: renderImagePlaceholder(image.fallbackSrc || image.src, index, image.fit || fit),
|
824
827
|
onLoad: function onLoad(_, imageEle) {
|
825
828
|
imageDomsRef.current[index] = imageEle;
|
826
829
|
setImagesStatusByIndex(index, {
|
package/esm/nav-bar/index.d.ts
CHANGED
@@ -105,6 +105,11 @@ export interface NavBarProps {
|
|
105
105
|
* @en Set a custom style according to the scroll offset value. After setting this property, the scroll event of the scroll container will be monitored.
|
106
106
|
*/
|
107
107
|
getComputedStyleByScroll?: (offset: number) => CSSProperties;
|
108
|
+
/**
|
109
|
+
* 滚动时回调,设置该属性后将监听滚动容器的滚动事件
|
110
|
+
* @en Callback when scrolling. After setting this property, the scroll event of the scroll container will be monitored.
|
111
|
+
*/
|
112
|
+
onScrollChange?: (offset: number) => void;
|
108
113
|
/**
|
109
114
|
* 无障碍aria-label属性
|
110
115
|
* @en Accessibility attribute aria-label
|
package/esm/nav-bar/index.js
CHANGED
@@ -38,6 +38,7 @@ var NavBar = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
38
38
|
getScrollContainer = props.getScrollContainer,
|
39
39
|
_props$showOffset = props.showOffset,
|
40
40
|
showOffset = _props$showOffset === void 0 ? 0 : _props$showOffset,
|
41
|
+
onScrollChange = props.onScrollChange,
|
41
42
|
getComputedStyleByScroll = props.getComputedStyleByScroll,
|
42
43
|
_props$ariaLabel = props.ariaLabel,
|
43
44
|
ariaLabel = _props$ariaLabel === void 0 ? '' : _props$ariaLabel,
|
@@ -54,6 +55,7 @@ var NavBar = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
54
55
|
var system = useSystem();
|
55
56
|
var onElementScroll = function onElementScroll(curOffset) {
|
56
57
|
setScrollToggleHide(curOffset < showOffset);
|
58
|
+
onScrollChange == null ? void 0 : onScrollChange(curOffset);
|
57
59
|
if (getComputedStyleByScroll) {
|
58
60
|
var cstyle = getComputedStyleByScroll(curOffset);
|
59
61
|
setCustomStyle(cstyle);
|
@@ -73,7 +75,7 @@ var NavBar = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
73
75
|
onElementScroll(top);
|
74
76
|
};
|
75
77
|
useEffect(function () {
|
76
|
-
var needBind = showOffset || getComputedStyleByScroll;
|
78
|
+
var needBind = showOffset || getComputedStyleByScroll || onScrollChange;
|
77
79
|
var container = getValidScrollContainer(getScrollContainer);
|
78
80
|
handleEleScroll();
|
79
81
|
if (needBind && container) {
|
@@ -84,7 +86,7 @@ var NavBar = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
84
86
|
container.removeEventListener('scroll', handleEleScroll, false);
|
85
87
|
}
|
86
88
|
};
|
87
|
-
}, [showOffset, getComputedStyleByScroll, getScrollContainer]);
|
89
|
+
}, [showOffset, getComputedStyleByScroll, onScrollChange, getScrollContainer]);
|
88
90
|
function handleClickLeft(e) {
|
89
91
|
if (onClickLeft) {
|
90
92
|
onClickLeft(e);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@arco-design/mobile-react",
|
3
|
-
"version": "2.25.
|
3
|
+
"version": "2.25.3",
|
4
4
|
"description": "",
|
5
5
|
"main": "cjs/index.js",
|
6
6
|
"module": "esm/index.js",
|
@@ -15,7 +15,7 @@
|
|
15
15
|
"author": "taoyiyue@bytedance.com",
|
16
16
|
"license": "ISC",
|
17
17
|
"dependencies": {
|
18
|
-
"@arco-design/mobile-utils": "2.13.
|
18
|
+
"@arco-design/mobile-utils": "2.13.3",
|
19
19
|
"@arco-design/transformable": "^1.0.0",
|
20
20
|
"lodash.throttle": "^4.1.1",
|
21
21
|
"resize-observer-polyfill": "^1.5.1"
|
@@ -35,5 +35,5 @@
|
|
35
35
|
"publishConfig": {
|
36
36
|
"access": "public"
|
37
37
|
},
|
38
|
-
"gitHead": "
|
38
|
+
"gitHead": "1d91bb305bdd20aae3448ba7c928b34935bff71c"
|
39
39
|
}
|
@@ -761,7 +761,7 @@
|
|
761
761
|
// @en In iOS when resetting the style, the image will disappear and cause flickering, so put a image at the bottom
|
762
762
|
// 优先过渡图,其次用原图
|
763
763
|
// @en Prioritize the transition image, followed by the original image
|
764
|
-
function renderImagePlaceholder(src, index) {
|
764
|
+
function renderImagePlaceholder(src, index, fitCss) {
|
765
765
|
var _ref2 = imagesStatus[index] || {},
|
766
766
|
originWidth = _ref2.originWidth,
|
767
767
|
originHeight = _ref2.originHeight,
|
@@ -771,6 +771,9 @@
|
|
771
771
|
var trans = hasOverflow ? {} : (0, _helpers.getStyleWithVendor)({
|
772
772
|
transform: 'translateY(-50%)'
|
773
773
|
});
|
774
|
+
var fitObj = fitCss ? {
|
775
|
+
objectFit: fitCss
|
776
|
+
} : {};
|
774
777
|
return system === 'ios' && showPlaceholders[index] && originWidth && originHeight ? /*#__PURE__*/_react.default.createElement("img", {
|
775
778
|
src: src,
|
776
779
|
style: (0, _extends5.default)({
|
@@ -779,7 +782,7 @@
|
|
779
782
|
height: originHeight,
|
780
783
|
left: originLeft,
|
781
784
|
top: originTop
|
782
|
-
}, trans)
|
785
|
+
}, fitObj, trans)
|
783
786
|
}) : null;
|
784
787
|
}
|
785
788
|
function renderLoadingArea(index) {
|
@@ -845,7 +848,7 @@
|
|
845
848
|
animateDuration: transImageInfo ? 0 : void 0,
|
846
849
|
style: getImageStyle(),
|
847
850
|
className: getImageClass(index),
|
848
|
-
bottomOverlap: renderImagePlaceholder(image.fallbackSrc || image.src, index),
|
851
|
+
bottomOverlap: renderImagePlaceholder(image.fallbackSrc || image.src, index, image.fit || fit),
|
849
852
|
onLoad: function onLoad(_, imageEle) {
|
850
853
|
imageDomsRef.current[index] = imageEle;
|
851
854
|
setImagesStatusByIndex(index, {
|
package/umd/nav-bar/index.d.ts
CHANGED
@@ -105,6 +105,11 @@ export interface NavBarProps {
|
|
105
105
|
* @en Set a custom style according to the scroll offset value. After setting this property, the scroll event of the scroll container will be monitored.
|
106
106
|
*/
|
107
107
|
getComputedStyleByScroll?: (offset: number) => CSSProperties;
|
108
|
+
/**
|
109
|
+
* 滚动时回调,设置该属性后将监听滚动容器的滚动事件
|
110
|
+
* @en Callback when scrolling. After setting this property, the scroll event of the scroll container will be monitored.
|
111
|
+
*/
|
112
|
+
onScrollChange?: (offset: number) => void;
|
108
113
|
/**
|
109
114
|
* 无障碍aria-label属性
|
110
115
|
* @en Accessibility attribute aria-label
|
package/umd/nav-bar/index.js
CHANGED
@@ -55,6 +55,7 @@
|
|
55
55
|
getScrollContainer = props.getScrollContainer,
|
56
56
|
_props$showOffset = props.showOffset,
|
57
57
|
showOffset = _props$showOffset === void 0 ? 0 : _props$showOffset,
|
58
|
+
onScrollChange = props.onScrollChange,
|
58
59
|
getComputedStyleByScroll = props.getComputedStyleByScroll,
|
59
60
|
_props$ariaLabel = props.ariaLabel,
|
60
61
|
ariaLabel = _props$ariaLabel === void 0 ? '' : _props$ariaLabel,
|
@@ -71,6 +72,7 @@
|
|
71
72
|
var system = (0, _helpers.useSystem)();
|
72
73
|
var onElementScroll = function onElementScroll(curOffset) {
|
73
74
|
setScrollToggleHide(curOffset < showOffset);
|
75
|
+
onScrollChange == null ? void 0 : onScrollChange(curOffset);
|
74
76
|
if (getComputedStyleByScroll) {
|
75
77
|
var cstyle = getComputedStyleByScroll(curOffset);
|
76
78
|
setCustomStyle(cstyle);
|
@@ -90,7 +92,7 @@
|
|
90
92
|
onElementScroll(top);
|
91
93
|
};
|
92
94
|
(0, _react.useEffect)(function () {
|
93
|
-
var needBind = showOffset || getComputedStyleByScroll;
|
95
|
+
var needBind = showOffset || getComputedStyleByScroll || onScrollChange;
|
94
96
|
var container = (0, _mobileUtils.getValidScrollContainer)(getScrollContainer);
|
95
97
|
handleEleScroll();
|
96
98
|
if (needBind && container) {
|
@@ -101,7 +103,7 @@
|
|
101
103
|
container.removeEventListener('scroll', handleEleScroll, false);
|
102
104
|
}
|
103
105
|
};
|
104
|
-
}, [showOffset, getComputedStyleByScroll, getScrollContainer]);
|
106
|
+
}, [showOffset, getComputedStyleByScroll, onScrollChange, getScrollContainer]);
|
105
107
|
function handleClickLeft(e) {
|
106
108
|
if (onClickLeft) {
|
107
109
|
onClickLeft(e);
|