import{r as O,b as Ia,R as le,j,c as Ra,a as Bt,s as za,o as Na}from"./index.bd3517ca.js";import{e as Es,f as Ca,t as La,v as Ma,x as Oa,y as Gl,z as kr,m as Xi,q as Aa,j as Zi,w as ws,l as gr,S as Da,n as Ua,A as Ss,o as Ze,p as xs,C as _e,I as Ba,s as Ha,B as ql}from"./index.c5d86e93.js";function ja(l){var r=O.exports.useRef(0),i=Es(O.exports.useState(l),2),a=i[0],f=i[1],v=O.exports.useCallback(function(_){cancelAnimationFrame(r.current),r.current=requestAnimationFrame(function(){f(_)})},[]);return Ca(function(){cancelAnimationFrame(r.current)}),[a,v]}var Wa=function(){var l=O.exports.useRef(!1);return O.exports.useEffect(function(){return l.current=!1,function(){l.current=!0}},[]),l},Fa=Wa,ks=function(){if(typeof Map!="undefined")return Map;function l(r,i){var a=-1;return r.some(function(f,v){return f[0]===i?(a=v,!0):!1}),a}return function(){function r(){this.__entries__=[]}return Object.defineProperty(r.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),r.prototype.get=function(i){var a=l(this.__entries__,i),f=this.__entries__[a];return f&&f[1]},r.prototype.set=function(i,a){var f=l(this.__entries__,i);~f?this.__entries__[f][1]=a:this.__entries__.push([i,a])},r.prototype.delete=function(i){var a=this.__entries__,f=l(a,i);~f&&a.splice(f,1)},r.prototype.has=function(i){return!!~l(this.__entries__,i)},r.prototype.clear=function(){this.__entries__.splice(0)},r.prototype.forEach=function(i,a){a===void 0&&(a=null);for(var f=0,v=this.__entries__;f0},l.prototype.connect_=function(){!Gi||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Ka?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},l.prototype.disconnect_=function(){!Gi||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},l.prototype.onTransitionEnd_=function(r){var i=r.propertyName,a=i===void 0?"":i,f=qa.some(function(v){return!!~a.indexOf(v)});f&&this.refresh()},l.getInstance=function(){return this.instance_||(this.instance_=new l),this.instance_},l.instance_=null,l}(),Ps=function(l,r){for(var i=0,a=Object.keys(r);i0},l}(),Is=typeof WeakMap!="undefined"?new WeakMap:new ks,Rs=function(){function l(r){if(!(this instanceof l))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var i=Xa.getInstance(),a=new oc(r,i,this);Is.set(this,a)}return l}();["observe","unobserve","disconnect"].forEach(function(l){Rs.prototype[l]=function(){var r;return(r=Is.get(this))[l].apply(r,arguments)}});var lc=function(){return typeof yr.ResizeObserver!="undefined"?yr.ResizeObserver:Rs}(),sc=La(O.exports.useLayoutEffect),uc=sc,ac=Ma?uc:Oa,cc=ac;function Xl(l){var r=Es(ja(function(){var f=Gl(l);return f?{width:f.clientWidth,height:f.clientHeight}:void 0}),2),i=r[0],a=r[1];return cc(function(){var f=Gl(l);if(!!f){var v=new lc(function(_){_.forEach(function(h){var k=h.target,w=k.clientWidth,E=k.clientHeight;a({width:w,height:E})})});return v.observe(f),function(){v.disconnect()}}},[],l),i}const Zl=10;function fc(l,r){return l>r&&l>Zl?"horizontal":r>l&&r>Zl?"vertical":""}function dc(){const l=O.exports.useRef(0),r=O.exports.useRef(0),i=O.exports.useRef(0),a=O.exports.useRef(0),f=O.exports.useRef(0),v=O.exports.useRef(0),_=O.exports.useRef(""),h=()=>_.current==="vertical",k=()=>_.current==="horizontal",w=()=>{i.current=0,a.current=0,f.current=0,v.current=0,_.current=""};return{move:R=>{const A=R.touches[0];i.current=A.clientX<0?0:A.clientX-l.current,a.current=A.clientY-r.current,f.current=Math.abs(i.current),v.current=Math.abs(a.current),_.current||(_.current=fc(f.current,v.current))},start:R=>{w(),l.current=R.touches[0].clientX,r.current=R.touches[0].clientY},reset:w,startX:l,startY:r,deltaX:i,deltaY:a,offsetX:f,offsetY:v,direction:_,isVertical:h,isHorizontal:k}}const pc=kr?window:void 0,hc=["scroll","auto","overlay"];function mc(l){return l.nodeType===1}function vc(l,r=pc){let i=l;for(;i&&i!==r&&mc(i);){if(i===document.body)return r;const{overflowY:a}=window.getComputedStyle(i);if(hc.includes(a)&&i.scrollHeight>i.clientHeight)return i;i=i.parentNode}return r}let zs=!1;if(kr)try{const l={};Object.defineProperty(l,"passive",{get(){zs=!0}}),window.addEventListener("test-passive",null,l)}catch{}let vn=0;const Jl="adm-overflow-hidden";function gc(l){let r=l==null?void 0:l.parentElement;for(;r;){if(r.clientHeight{i.move(_);const h=i.deltaY.current>0?"10":"01",k=vc(_.target,l.current);if(!k)return;if(r==="strict"){const A=gc(_.target);if(A===document.body||A===document.documentElement){_.preventDefault();return}}const{scrollHeight:w,offsetHeight:E,scrollTop:S}=k;let R="11";S===0?R=E>=w?"00":"01":S+E>=w&&(R="10"),R!=="11"&&i.isVertical()&&!(parseInt(R,2)&parseInt(h,2))&&_.cancelable&&_.preventDefault()},f=()=>{document.addEventListener("touchstart",i.start),document.addEventListener("touchmove",a,zs?{passive:!1}:!1),vn||document.body.classList.add(Jl),vn++},v=()=>{vn&&(document.removeEventListener("touchstart",i.start),document.removeEventListener("touchmove",a),vn--,vn||document.body.classList.remove(Jl))};O.exports.useEffect(()=>{if(r)return f(),()=>{v()}},[r])}function _c(l){return(typeof l=="function"?l():l)||document.body}function Ji(l,r){if(kr&&l){const i=_c(l);return Ia.exports.createPortal(r,i)}return r}const Ec={click:"onClick"};function wc(l,r){const i=Object.assign({},r.props);for(const a of l){const f=Ec[a];i[f]=function(v){var _,h;v.stopPropagation(),(h=(_=r.props)[f])===null||h===void 0||h.call(_,v)}}return le.cloneElement(r,i)}const ji="adm-mask",Sc={default:.55,thin:.35,thick:.75},xc={black:"0, 0, 0",white:"255, 255, 255"},kc={visible:!0,destroyOnClose:!1,forceRender:!1,color:"black",opacity:"default",disableBodyScroll:!0,getContainer:null,stopPropagation:["click"]},Pc=l=>{const r=Xi(kc,l),{locale:i}=Aa(),a=O.exports.useRef(null);yc(a,r.visible&&r.disableBodyScroll);const f=O.exports.useMemo(()=>{var E;const S=(E=Sc[r.opacity])!==null&&E!==void 0?E:r.opacity,R=xc[r.color];return R?`rgba(${R}, ${S})`:r.color},[r.color,r.opacity]),[v,_]=O.exports.useState(r.visible),h=Fa(),{opacity:k}=Zi({opacity:r.visible?1:0,config:{precision:.01,mass:1,tension:250,friction:30,clamp:!0},onStart:()=>{_(!0)},onRest:()=>{var E,S;h.current||(_(r.visible),r.visible?(E=r.afterShow)===null||E===void 0||E.call(r):(S=r.afterClose)===null||S===void 0||S.call(r))}}),w=wc(r.stopPropagation,ws(r,le.createElement(gr.div,{className:ji,ref:a,style:Object.assign(Object.assign({},r.style),{background:f,opacity:k,display:v?void 0:"none"}),onClick:E=>{var S;E.target===E.currentTarget&&((S=r.onMaskClick)===null||S===void 0||S.call(r,E))}},r.onMaskClick&&j("div",{className:`${ji}-aria-button`,role:"button","aria-label":i.Mask.name,onClick:r.onMaskClick}),j("div",{className:`${ji}-content`,children:r.children}))));return j(Da,{active:v,forceRender:r.forceRender,destroyOnClose:r.destroyOnClose,children:Ji(r.getContainer,w)})};var Ns=Pc;const $l="adm-safe-area",Tc=l=>ws(l,le.createElement("div",{className:Ua($l,`${$l}-position-${l.position}`)}));var Cs=Tc;const Er=Object.assign({},Ra),{version:Ic,render:Rc,unmountComponentAtNode:zc}=Er;let Tr;try{Number((Ic||"").split(".")[0])>=18&&Er.createRoot&&(Tr=Er.createRoot)}catch{}function bl(l){const{__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:r}=Er;r&&typeof r=="object"&&(r.usingClientEntryPoint=l)}const wr="__antd_mobile_root__";function Nc(l,r){Rc(l,r)}function Cc(l,r){bl(!0);const i=r[wr]||Tr(r);bl(!1),i.render(l),r[wr]=i}function Lc(l,r){if(Tr){Cc(l,r);return}Nc(l,r)}function Mc(l){return zc(l)}function Oc(l){return Ss(this,void 0,void 0,function*(){return Promise.resolve().then(()=>{var r;(r=l[wr])===null||r===void 0||r.unmount(),delete l[wr]})})}function Ac(l){return Tr?Oc(l):Mc(l)}function Dc(l){const r=document.createElement("div");document.body.appendChild(r);function i(){Ac(r)&&r.parentNode&&r.parentNode.removeChild(r)}return Lc(l,r),i}function Ls(l){const r=le.forwardRef((f,v)=>{const[_,h]=O.exports.useState(!1),k=O.exports.useRef(!1),[w,E]=O.exports.useState(l),S=O.exports.useRef(0);O.exports.useEffect(()=>{k.current?A():h(!0)},[]);function R(){var D,B;k.current=!0,h(!1),(B=(D=w.props).onClose)===null||B===void 0||B.call(D)}function A(){var D,B;a(),(B=(D=w.props).afterClose)===null||B===void 0||B.call(D)}return O.exports.useImperativeHandle(v,()=>({close:R,replace:D=>{var B,ee;S.current++,(ee=(B=w.props).afterClose)===null||ee===void 0||ee.call(B),E(D)}})),le.cloneElement(w,Object.assign(Object.assign({},w.props),{key:S.current,visible:_,onClose:R,afterClose:A}))}),i=le.createRef(),a=Dc(j(r,{ref:i}));return{close:()=>Ss(this,void 0,void 0,function*(){var f;i.current?(f=i.current)===null||f===void 0||f.close():a()}),replace:f=>{var v;(v=i.current)===null||v===void 0||v.replace(f)}}}function Uc(l,r,i){return Math.max(r,Math.min(l,i))}const b={toVector(l,r){return l===void 0&&(l=r),Array.isArray(l)?l:[l,l]},add(l,r){return[l[0]+r[0],l[1]+r[1]]},sub(l,r){return[l[0]-r[0],l[1]-r[1]]},addTo(l,r){l[0]+=r[0],l[1]+=r[1]},subTo(l,r){l[0]-=r[0],l[1]-=r[1]}};function es(l,r,i){return r===0||Math.abs(r)===1/0?Math.pow(l,i*5):l*r*i/(r+i*l)}function ts(l,r,i,a=.15){return a===0?Uc(l,r,i):li?+es(l-i,i-r,a)+i:l}function Bc(l,[r,i],[a,f]){const[[v,_],[h,k]]=l;return[ts(r,v,_,a),ts(i,h,k,f)]}function fe(l,r,i){return r in l?Object.defineProperty(l,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):l[r]=i,l}function ns(l,r){var i=Object.keys(l);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(l);r&&(a=a.filter(function(f){return Object.getOwnPropertyDescriptor(l,f).enumerable})),i.push.apply(i,a)}return i}function q(l){for(var r=1;r{var i,a;return r.target===l.currentTarget||((i=l.currentTarget)===null||i===void 0||(a=i.contains)===null||a===void 0?void 0:a.call(i,r.target))})}function Gc(l){return l.type==="touchend"||l.type==="touchcancel"?l.changedTouches:l.targetTouches}function As(l){return Ir(l)?Gc(l)[0]:l}function qi(l,r){const i=r.clientX-l.clientX,a=r.clientY-l.clientY,f=(r.clientX+l.clientX)/2,v=(r.clientY+l.clientY)/2,_=Math.hypot(i,a);return{angle:-(Math.atan2(i,a)*180)/Math.PI,distance:_,origin:[f,v]}}function qc(l){return Yc(l).map(r=>r.identifier)}function is(l,r){const[i,a]=Array.from(l.touches).filter(f=>r.includes(f.identifier));return qi(i,a)}function Wi(l){const r=As(l);return Ir(l)?r.identifier:r.pointerId}function os(l){const r=As(l);return[r.clientX,r.clientY]}const ls=40,ss=800;function Kc(l){let{deltaX:r,deltaY:i,deltaMode:a}=l;return a===1?(r*=ls,i*=ls):a===2&&(r*=ss,i*=ss),[r,i]}function Xc(l){const r={};if("buttons"in l&&(r.buttons=l.buttons),"shiftKey"in l){const{shiftKey:i,altKey:a,metaKey:f,ctrlKey:v}=l;Object.assign(r,{shiftKey:i,altKey:a,metaKey:f,ctrlKey:v})}return r}function Sr(l,...r){return typeof l=="function"?l(...r):l}function Zc(){}function Jc(...l){return l.length===0?Zc:l.length===1?l[0]:function(){let r;for(const i of l)r=i.apply(this,arguments)||r;return r}}function us(l,r){return Object.assign({},r,l||{})}const $c=32;class Ds{constructor(r,i,a){this.ctrl=r,this.args=i,this.key=a,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(r){this.ctrl.state[this.key]=r}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:r,shared:i,ingKey:a,args:f}=this;i[a]=r._active=r.active=r._blocked=r._force=!1,r._step=[!1,!1],r.intentional=!1,r._movement=[0,0],r._distance=[0,0],r._direction=[0,0],r._delta=[0,0],r._bounds=[[-1/0,1/0],[-1/0,1/0]],r.args=f,r.axis=void 0,r.memo=void 0,r.elapsedTime=0,r.direction=[0,0],r.distance=[0,0],r.overflow=[0,0],r._movementBound=[!1,!1],r.velocity=[0,0],r.movement=[0,0],r.delta=[0,0],r.timeStamp=0}start(r){const i=this.state,a=this.config;i._active||(this.reset(),this.computeInitial(),i._active=!0,i.target=r.target,i.currentTarget=r.currentTarget,i.lastOffset=a.from?Sr(a.from,i):i.offset,i.offset=i.lastOffset),i.startTime=i.timeStamp=r.timeStamp}computeValues(r){const i=this.state;i._values=r,i.values=this.config.transform(r)}computeInitial(){const r=this.state;r._initial=r._values,r.initial=r.values}compute(r){const{state:i,config:a,shared:f}=this;i.args=this.args;let v=0;if(r&&(i.event=r,a.preventDefault&&r.cancelable&&i.event.preventDefault(),i.type=r.type,f.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,f.locked=!!document.pointerLockElement,Object.assign(f,Xc(r)),f.down=f.pressed=f.buttons%2===1||f.touches>0,v=r.timeStamp-i.timeStamp,i.timeStamp=r.timeStamp,i.elapsedTime=i.timeStamp-i.startTime),i._active){const ne=i._delta.map(Math.abs);b.addTo(i._distance,ne)}this.axisIntent&&this.axisIntent(r);const[_,h]=i._movement,[k,w]=a.threshold,{_step:E,values:S}=i;if(a.hasCustomTransform?(E[0]===!1&&(E[0]=Math.abs(_)>=k&&S[0]),E[1]===!1&&(E[1]=Math.abs(h)>=w&&S[1])):(E[0]===!1&&(E[0]=Math.abs(_)>=k&&Math.sign(_)*k),E[1]===!1&&(E[1]=Math.abs(h)>=w&&Math.sign(h)*w)),i.intentional=E[0]!==!1||E[1]!==!1,!i.intentional)return;const R=[0,0];if(a.hasCustomTransform){const[ne,Ce]=S;R[0]=E[0]!==!1?ne-E[0]:0,R[1]=E[1]!==!1?Ce-E[1]:0}else R[0]=E[0]!==!1?_-E[0]:0,R[1]=E[1]!==!1?h-E[1]:0;this.restrictToAxis&&!i._blocked&&this.restrictToAxis(R);const A=i.offset,D=i._active&&!i._blocked||i.active;D&&(i.first=i._active&&!i.active,i.last=!i._active&&i.active,i.active=f[this.ingKey]=i._active,r&&(i.first&&("bounds"in a&&(i._bounds=Sr(a.bounds,i)),this.setup&&this.setup()),i.movement=R,this.computeOffset()));const[B,ee]=i.offset,[[Ee,pe],[se,te]]=i._bounds;i.overflow=[Bpe?1:0,eete?1:0],i._movementBound[0]=i.overflow[0]?i._movementBound[0]===!1?i._movement[0]:i._movementBound[0]:!1,i._movementBound[1]=i.overflow[1]?i._movementBound[1]===!1?i._movement[1]:i._movementBound[1]:!1;const Se=i._active?a.rubberband||[0,0]:[0,0];if(i.offset=Bc(i._bounds,i.offset,Se),i.delta=b.sub(i.offset,A),this.computeMovement(),D&&(!i.last||v>$c)){i.delta=b.sub(i.offset,A);const ne=i.delta.map(Math.abs);b.addTo(i.distance,ne),i.direction=i.delta.map(Math.sign),i._direction=i._delta.map(Math.sign),!i.first&&v>0&&(i.velocity=[ne[0]/v,ne[1]/v])}}emit(){const r=this.state,i=this.shared,a=this.config;if(r._active||this.clean(),(r._blocked||!r.intentional)&&!r._force&&!a.triggerAllEvents)return;const f=this.handler(q(q(q({},i),r),{},{[this.aliasKey]:r.values}));f!==void 0&&(r.memo=f)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}function bc([l,r],i){const a=Math.abs(l),f=Math.abs(r);if(a>f&&a>i)return"x";if(f>a&&f>i)return"y"}class ef extends Ds{constructor(...r){super(...r),fe(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=b.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=b.sub(this.state.offset,this.state.lastOffset)}axisIntent(r){const i=this.state,a=this.config;if(!i.axis&&r){const f=typeof a.axisThreshold=="object"?a.axisThreshold[Os(r)]:a.axisThreshold;i.axis=bc(i._movement,f)}i._blocked=(a.lockDirection||!!a.axis)&&!i.axis||!!a.axis&&a.axis!==i.axis}restrictToAxis(r){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":r[1]=0;break;case"y":r[0]=0;break}}}const tf=l=>l,as=.15,Us={enabled(l=!0){return l},eventOptions(l,r,i){return q(q({},i.shared.eventOptions),l)},preventDefault(l=!1){return l},triggerAllEvents(l=!1){return l},rubberband(l=0){switch(l){case!0:return[as,as];case!1:return[0,0];default:return b.toVector(l)}},from(l){if(typeof l=="function")return l;if(l!=null)return b.toVector(l)},transform(l,r,i){const a=l||i.shared.transform;return this.hasCustomTransform=!!a,a||tf},threshold(l){return b.toVector(l,0)}},nf=0,wn=q(q({},Us),{},{axis(l,r,{axis:i}){if(this.lockDirection=i==="lock",!this.lockDirection)return i},axisThreshold(l=nf){return l},bounds(l={}){if(typeof l=="function")return v=>wn.bounds(l(v));if("current"in l)return()=>l.current;if(typeof HTMLElement=="function"&&l instanceof HTMLElement)return l;const{left:r=-1/0,right:i=1/0,top:a=-1/0,bottom:f=1/0}=l;return[[r,i],[a,f]]}}),mr=10,cs={ArrowRight:(l=1)=>[mr*l,0],ArrowLeft:(l=1)=>[-mr*l,0],ArrowUp:(l=1)=>[0,-mr*l],ArrowDown:(l=1)=>[0,mr*l]};class rf extends ef{constructor(...r){super(...r),fe(this,"ingKey","dragging")}reset(){super.reset();const r=this.state;r._pointerId=void 0,r._pointerActive=!1,r._keyboardActive=!1,r._preventScroll=!1,r._delayed=!1,r.swipe=[0,0],r.tap=!1,r.canceled=!1,r.cancel=this.cancel.bind(this)}setup(){const r=this.state;if(r._bounds instanceof HTMLElement){const i=r._bounds.getBoundingClientRect(),a=r.currentTarget.getBoundingClientRect(),f={left:i.left-a.left+r.offset[0],right:i.right-a.right+r.offset[0],top:i.top-a.top+r.offset[1],bottom:i.bottom-a.bottom+r.offset[1]};r._bounds=wn.bounds(f)}}cancel(){const r=this.state;r.canceled||(r.canceled=!0,r._active=!1,setTimeout(()=>{this.compute(),this.emit()},0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(r){const i=this.config,a=this.state;if(r.buttons!=null&&(Array.isArray(i.pointerButtons)?!i.pointerButtons.includes(r.buttons):i.pointerButtons!==-1&&i.pointerButtons!==r.buttons))return;const f=this.ctrl.setEventIds(r);i.pointerCapture&&r.target.setPointerCapture(r.pointerId),!(f&&f.size>1&&a._pointerActive)&&(this.start(r),this.setupPointer(r),a._pointerId=Wi(r),a._pointerActive=!0,this.computeValues(os(r)),this.computeInitial(),i.preventScrollAxis&&Os(r)!=="mouse"?(a._active=!1,this.setupScrollPrevention(r)):i.delay>0?(this.setupDelayTrigger(r),i.triggerAllEvents&&(this.compute(r),this.emit())):this.startPointerDrag(r))}startPointerDrag(r){const i=this.state;i._active=!0,i._preventScroll=!0,i._delayed=!1,this.compute(r),this.emit()}pointerMove(r){const i=this.state,a=this.config;if(!i._pointerActive||i.type===r.type&&r.timeStamp===i.timeStamp)return;const f=Wi(r);if(i._pointerId!==void 0&&f!==i._pointerId)return;const v=os(r);if(document.pointerLockElement===r.target?i._delta=[r.movementX,r.movementY]:(i._delta=b.sub(v,i._values),this.computeValues(v)),b.addTo(i._movement,i._delta),this.compute(r),i._delayed&&i.intentional){this.timeoutStore.remove("dragDelay"),i.active=!1,this.startPointerDrag(r);return}if(a.preventScrollAxis&&!i._preventScroll)if(i.axis)if(i.axis===a.preventScrollAxis||a.preventScrollAxis==="xy"){i._active=!1,this.clean();return}else{this.timeoutStore.remove("startPointerDrag"),this.startPointerDrag(r);return}else return;this.emit()}pointerUp(r){this.ctrl.setEventIds(r);try{this.config.pointerCapture&&r.target.hasPointerCapture(r.pointerId)&&r.target.releasePointerCapture(r.pointerId)}catch{}const i=this.state,a=this.config;if(!i._active||!i._pointerActive)return;const f=Wi(r);if(i._pointerId!==void 0&&f!==i._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(r);const[v,_]=i._distance;if(i.tap=v<=a.tapsThreshold&&_<=a.tapsThreshold,i.tap&&a.filterTaps)i._force=!0;else{const[h,k]=i.direction,[w,E]=i.velocity,[S,R]=i.movement,[A,D]=a.swipe.velocity,[B,ee]=a.swipe.distance,Ee=a.swipe.duration;i.elapsedTimeA&&Math.abs(S)>B&&(i.swipe[0]=h),Math.abs(E)>D&&Math.abs(R)>ee&&(i.swipe[1]=k))}this.emit()}pointerClick(r){!this.state.tap&&r.detail>0&&(r.preventDefault(),r.stopPropagation())}setupPointer(r){const i=this.config,a=i.device;i.pointerLock&&r.currentTarget.requestPointerLock(),i.pointerCapture||(this.eventStore.add(this.sharedConfig.window,a,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,a,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,a,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(r){this.state._preventScroll&&r.cancelable&&r.preventDefault()}setupScrollPrevention(r){this.state._preventScroll=!1,of(r);const i=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",i),this.eventStore.add(this.sharedConfig.window,"touch","cancel",i),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,r)}setupDelayTrigger(r){this.state._delayed=!0,this.timeoutStore.add("dragDelay",()=>{this.state._step=[0,0],this.startPointerDrag(r)},this.config.delay)}keyDown(r){const i=cs[r.key];if(i){const a=this.state,f=r.shiftKey?10:r.altKey?.1:1;this.start(r),a._delta=i(f),a._keyboardActive=!0,b.addTo(a._movement,a._delta),this.compute(r),this.emit()}}keyUp(r){r.key in cs&&(this.state._keyboardActive=!1,this.setActive(),this.compute(r),this.emit())}bind(r){const i=this.config.device;r(i,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(r(i,"change",this.pointerMove.bind(this)),r(i,"end",this.pointerUp.bind(this)),r(i,"cancel",this.pointerUp.bind(this)),r("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(r("key","down",this.keyDown.bind(this)),r("key","up",this.keyUp.bind(this))),this.config.filterTaps&&r("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}}function of(l){"persist"in l&&typeof l.persist=="function"&&l.persist()}const Sn=typeof window!="undefined"&&window.document&&window.document.createElement;function lf(){return Sn&&"ontouchstart"in window}function fs(){return lf()||Sn&&window.navigator.maxTouchPoints>1}function sf(){return Sn&&"onpointerdown"in window}function uf(){return Sn&&"exitPointerLock"in window.document}function af(){try{return"constructor"in GestureEvent}catch{return!1}}const Ne={isBrowser:Sn,gesture:af(),touch:fs(),touchscreen:fs(),pointer:sf(),pointerLock:uf()},cf=250,ff=180,df=.5,pf=50,hf=250,ds={mouse:0,touch:0,pen:8},mf=q(q({},wn),{},{device(l,r,{pointer:{touch:i=!1,lock:a=!1,mouse:f=!1}={}}){return this.pointerLock=a&&Ne.pointerLock,Ne.touch&&i?"touch":this.pointerLock?"mouse":Ne.pointer&&!f?"pointer":Ne.touch?"touch":"mouse"},preventScrollAxis(l,r,{preventScroll:i}){if(this.preventScrollDelay=typeof i=="number"?i:i||i===void 0&&l?cf:void 0,!(!Ne.touchscreen||i===!1))return l||(i!==void 0?"y":void 0)},pointerCapture(l,r,{pointer:{capture:i=!0,buttons:a=1}={}}){return this.pointerButtons=a,!this.pointerLock&&this.device==="pointer"&&i},keys(l=!0){return l},threshold(l,r,{filterTaps:i=!1,tapsThreshold:a=3,axis:f=void 0}){const v=b.toVector(l,i?a:f?1:0);return this.filterTaps=i,this.tapsThreshold=a,v},swipe({velocity:l=df,distance:r=pf,duration:i=hf}={}){return{velocity:this.transform(b.toVector(l)),distance:this.transform(b.toVector(r)),duration:i}},delay(l=0){switch(l){case!0:return ff;case!1:return 0;default:return l}},axisThreshold(l){return l?q(q({},ds),l):ds}}),vf=30,gf=100;class yf extends Ds{constructor(...r){super(...r),fe(this,"ingKey","pinching"),fe(this,"aliasKey","da")}init(){this.state.offset=[1,0],this.state.lastOffset=[1,0],this.state._pointerEvents=new Map}reset(){super.reset();const r=this.state;r._touchIds=[],r.canceled=!1,r.cancel=this.cancel.bind(this),r.turns=0}computeOffset(){const{type:r,movement:i,lastOffset:a}=this.state;r==="wheel"?this.state.offset=b.add(i,a):this.state.offset=[(1+i[0])*a[0],i[1]+a[1]]}computeMovement(){const{offset:r,lastOffset:i}=this.state;this.state.movement=[r[0]/i[0],r[1]-i[1]]}axisIntent(){const r=this.state,[i,a]=r._movement;if(!r.axis){const f=Math.abs(i)*vf-Math.abs(a);f<0?r.axis="angle":f>0&&(r.axis="scale")}}restrictToAxis(r){this.config.lockDirection&&(this.state.axis==="scale"?r[1]=0:this.state.axis==="angle"&&(r[0]=0))}cancel(){const r=this.state;r.canceled||setTimeout(()=>{r.canceled=!0,r._active=!1,this.compute(),this.emit()},0)}touchStart(r){this.ctrl.setEventIds(r);const i=this.state,a=this.ctrl.touchIds;if(i._active&&i._touchIds.every(v=>a.has(v))||a.size<2)return;this.start(r),i._touchIds=Array.from(a).slice(0,2);const f=is(r,i._touchIds);this.pinchStart(r,f)}pointerStart(r){if(r.buttons!=null&&r.buttons%2!==1)return;this.ctrl.setEventIds(r),r.target.setPointerCapture(r.pointerId);const i=this.state,a=i._pointerEvents,f=this.ctrl.pointerIds;if(i._active&&Array.from(a.keys()).every(_=>f.has(_))||(a.size<2&&a.set(r.pointerId,r),i._pointerEvents.size<2))return;this.start(r);const v=qi(...Array.from(a.values()));this.pinchStart(r,v)}pinchStart(r,i){const a=this.state;a.origin=i.origin,this.computeValues([i.distance,i.angle]),this.computeInitial(),this.compute(r),this.emit()}touchMove(r){if(!this.state._active)return;const i=is(r,this.state._touchIds);this.pinchMove(r,i)}pointerMove(r){const i=this.state._pointerEvents;if(i.has(r.pointerId)&&i.set(r.pointerId,r),!this.state._active)return;const a=qi(...Array.from(i.values()));this.pinchMove(r,a)}pinchMove(r,i){const a=this.state,f=a._values[1],v=i.angle-f;let _=0;Math.abs(v)>270&&(_+=Math.sign(v)),this.computeValues([i.distance,i.angle-360*_]),a.origin=i.origin,a.turns=_,a._movement=[a._values[0]/a._initial[0]-1,a._values[1]-a._initial[1]],this.compute(r),this.emit()}touchEnd(r){this.ctrl.setEventIds(r),!!this.state._active&&this.state._touchIds.some(i=>!this.ctrl.touchIds.has(i))&&(this.state._active=!1,this.compute(r),this.emit())}pointerEnd(r){const i=this.state;this.ctrl.setEventIds(r);try{r.target.releasePointerCapture(r.pointerId)}catch{}i._pointerEvents.has(r.pointerId)&&i._pointerEvents.delete(r.pointerId),!!i._active&&i._pointerEvents.size<2&&(i._active=!1,this.compute(r),this.emit())}gestureStart(r){r.cancelable&&r.preventDefault();const i=this.state;i._active||(this.start(r),this.computeValues([r.scale,r.rotation]),i.origin=[r.clientX,r.clientY],this.compute(r),this.emit())}gestureMove(r){if(r.cancelable&&r.preventDefault(),!this.state._active)return;const i=this.state;this.computeValues([r.scale,r.rotation]),i.origin=[r.clientX,r.clientY];const a=i._movement;i._movement=[r.scale-1,r.rotation],i._delta=b.sub(i._movement,a),this.compute(r),this.emit()}gestureEnd(r){!this.state._active||(this.state._active=!1,this.compute(r),this.emit())}wheel(r){const i=this.config.modifierKey;i&&!r[i]||(this.state._active?this.wheelChange(r):this.wheelStart(r),this.timeoutStore.add("wheelEnd",this.wheelEnd.bind(this)))}wheelStart(r){this.start(r),this.wheelChange(r)}wheelChange(r){"uv"in r||r.cancelable&&r.preventDefault();const a=this.state;a._delta=[-Kc(r)[1]/gf*a.offset[0],0],b.addTo(a._movement,a._delta),this.state.origin=[r.clientX,r.clientY],this.compute(r),this.emit()}wheelEnd(){!this.state._active||(this.state._active=!1,this.compute(),this.emit())}bind(r){const i=this.config.device;i&&(r(i,"start",this[i+"Start"].bind(this)),r(i,"change",this[i+"Move"].bind(this)),r(i,"end",this[i+"End"].bind(this)),r(i,"cancel",this[i+"End"].bind(this))),r("wheel","",this.wheel.bind(this),{passive:!1})}}const _f=q(q({},Us),{},{device(l,r,{shared:i,pointer:{touch:a=!1}={}}){if(i.target&&!Ne.touch&&Ne.gesture)return"gesture";if(Ne.touch&&a)return"touch";if(Ne.touchscreen){if(Ne.pointer)return"pointer";if(Ne.touch)return"touch"}},bounds(l,r,{scaleBounds:i={},angleBounds:a={}}){const f=_=>{const h=us(Sr(i,_),{min:-1/0,max:1/0});return[h.min,h.max]},v=_=>{const h=us(Sr(a,_),{min:-1/0,max:1/0});return[h.min,h.max]};return typeof i!="function"&&typeof a!="function"?[f(),v()]:_=>[f(_),v(_)]},threshold(l,r,i){return this.lockDirection=i.axis==="lock",b.toVector(l,this.lockDirection?[.1,3]:0)},modifierKey(l){return l===void 0?"ctrlKey":l}});q(q({},wn),{},{mouseOnly:(l=!0)=>l});q(q({},wn),{},{mouseOnly:(l=!0)=>l});const $i=new Map,Ki=new Map;function Bs(l){$i.set(l.key,l.engine),Ki.set(l.key,l.resolver)}const Hs={key:"drag",engine:rf,resolver:mf},Ef={key:"pinch",engine:yf,resolver:_f};function wf(l,r){if(l==null)return{};var i={},a=Object.keys(l),f,v;for(v=0;v=0)&&(i[f]=l[f]);return i}function Sf(l,r){if(l==null)return{};var i=wf(l,r),a,f;if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(l);for(f=0;f=0)&&(!Object.prototype.propertyIsEnumerable.call(l,a)||(i[a]=l[a]))}return i}const xf={target(l){if(l)return()=>"current"in l?l.current:l},enabled(l=!0){return l},window(l=Ne.isBrowser?window:void 0){return l},eventOptions({passive:l=!0,capture:r=!1}={}){return{passive:l,capture:r}},transform(l){return l}},kf=["target","eventOptions","window","enabled","transform"];function vr(l={},r){const i={};for(const[a,f]of Object.entries(r))switch(typeof f){case"function":i[a]=f.call(i,l[a],a,l);break;case"object":i[a]=vr(l[a],f);break;case"boolean":f&&(i[a]=l[a]);break}return i}function Pf(l,r,i={}){const a=l,{target:f,eventOptions:v,window:_,enabled:h,transform:k}=a,w=Sf(a,kf);if(i.shared=vr({target:f,eventOptions:v,window:_,enabled:h,transform:k},xf),r){const E=Ki.get(r);i[r]=vr(q({shared:i.shared},w),E)}else for(const E in w){const S=Ki.get(E);S&&(i[E]=vr(q({shared:i.shared},w[E]),S))}return i}class js{constructor(r,i){fe(this,"_listeners",new Set),this._ctrl=r,this._gestureKey=i}add(r,i,a,f,v){const _=this._listeners,h=Qc(i,a),k=this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{},w=q(q({},k),v);r.addEventListener(h,f,w);const E=()=>{r.removeEventListener(h,f,w),_.delete(E)};return _.add(E),E}clean(){this._listeners.forEach(r=>r()),this._listeners.clear()}}class Tf{constructor(){fe(this,"_timeouts",new Map)}add(r,i,a=140,...f){this.remove(r),this._timeouts.set(r,window.setTimeout(i,a,...f))}remove(r){const i=this._timeouts.get(r);i&&window.clearTimeout(i)}clean(){this._timeouts.forEach(r=>void window.clearTimeout(r)),this._timeouts.clear()}}class If{constructor(r){fe(this,"gestures",new Set),fe(this,"_targetEventStore",new js(this)),fe(this,"gestureEventStores",{}),fe(this,"gestureTimeoutStores",{}),fe(this,"handlers",{}),fe(this,"config",{}),fe(this,"pointerIds",new Set),fe(this,"touchIds",new Set),fe(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),Rf(this,r)}setEventIds(r){if(Ir(r))return this.touchIds=new Set(qc(r)),this.touchIds;if("pointerId"in r)return r.type==="pointerup"||r.type==="pointercancel"?this.pointerIds.delete(r.pointerId):r.type==="pointerdown"&&this.pointerIds.add(r.pointerId),this.pointerIds}applyHandlers(r,i){this.handlers=r,this.nativeHandlers=i}applyConfig(r,i){this.config=Pf(r,i,this.config)}clean(){this._targetEventStore.clean();for(const r of this.gestures)this.gestureEventStores[r].clean(),this.gestureTimeoutStores[r].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...r){const i=this.config.shared,a={};let f;if(!(i.target&&(f=i.target(),!f))){if(i.enabled){for(const _ of this.gestures){const h=this.config[_],k=ps(a,h.eventOptions,!!f);if(h.enabled){const w=$i.get(_);new w(this,r,_).bind(k)}}const v=ps(a,i.eventOptions,!!f);for(const _ in this.nativeHandlers)v(_,"",h=>this.nativeHandlers[_](q(q({},this.state.shared),{},{event:h,args:r})),void 0,!0)}for(const v in a)a[v]=Jc(...a[v]);if(!f)return a;for(const v in a){const{device:_,capture:h,passive:k}=Vc(v);this._targetEventStore.add(f,_,"",a[v],{capture:h,passive:k})}}}}function At(l,r){l.gestures.add(r),l.gestureEventStores[r]=new js(l,r),l.gestureTimeoutStores[r]=new Tf}function Rf(l,r){r.drag&&At(l,"drag"),r.wheel&&At(l,"wheel"),r.scroll&&At(l,"scroll"),r.move&&At(l,"move"),r.pinch&&At(l,"pinch"),r.hover&&At(l,"hover")}const ps=(l,r,i)=>(a,f,v,_={},h=!1)=>{var k,w;const E=(k=_.capture)!==null&&k!==void 0?k:r.capture,S=(w=_.passive)!==null&&w!==void 0?w:r.passive;let R=h?a:Wc(a,f,E);i&&S&&(R+="Passive"),l[R]=l[R]||[],l[R].push(v)},zf=/^on(Drag|Wheel|Scroll|Move|Pinch|Hover)/;function Nf(l){const r={},i={},a=new Set;for(let f in l)zf.test(f)?(a.add(RegExp.lastMatch),i[f]=l[f]):r[f]=l[f];return[i,r,a]}function Dt(l,r,i,a,f,v){if(!l.has(i)||!$i.has(a))return;const _=i+"Start",h=i+"End",k=w=>{let E;return w.first&&_ in r&&r[_](w),i in r&&(E=r[i](w)),w.last&&h in r&&r[h](w),E};f[a]=k,v[a]=v[a]||{}}function Cf(l,r){const[i,a,f]=Nf(l),v={};return Dt(f,i,"onDrag","drag",v,r),Dt(f,i,"onWheel","wheel",v,r),Dt(f,i,"onScroll","scroll",v,r),Dt(f,i,"onPinch","pinch",v,r),Dt(f,i,"onMove","move",v,r),Dt(f,i,"onHover","hover",v,r),{handlers:v,config:r,nativeHandlers:a}}function Ws(l,r={},i,a){const f=le.useMemo(()=>new If(l),[]);if(f.applyHandlers(l,a),f.applyConfig(r,i),le.useEffect(f.effect.bind(f)),le.useEffect(()=>f.clean.bind(f),[]),r.target===void 0)return f.bind.bind(f)}function Lf(l,r){return Bs(Hs),Ws({drag:l},r||{},"drag")}function Mf(l){return l.forEach(Bs),function(i,a){const{handlers:f,nativeHandlers:v,config:_}=Cf(i,a||{});return Ws(f,_,void 0,v)}}function hs(l,r,i){return l*r*i/(r+i*l)}function ms(l,r,i,a,f=.15){return f===0?Ze(l,r,i):li?+hs(l-i,a,f)+i:l}const Fs=!1;function Of(l,r){Fs&&console.error(`[antd-mobile: ${l}] ${r}`)}let Ut=null,Et=null;kr&&(Ut=document.createElement("div"),Ut.className="adm-px-tester",Ut.style.setProperty("--size","10"),document.body.appendChild(Ut),Et=document.createElement("div"),Et.className="adm-px-tester",document.body.appendChild(Et),Fs&&window.getComputedStyle(Et).position!=="fixed"&&Of("Global","The px tester is not rendering properly. Please make sure you have imported `antd-mobile/es/global`."));function Af(l){return Ut===null||Et===null||Ut.getBoundingClientRect().height===10?l:(Et.style.setProperty("--size",l.toString()),Et.getBoundingClientRect().height)}const Df=Mf([Hs,Ef]),Fi=()=>[1,0,0,1,0,0],vs=l=>l[4],gs=l=>l[5],gn=l=>l[0],yn=(l,r,i)=>Vs([1,0,0,1,r,i],l),Uf=(l,r,i=r)=>Vs([r,0,0,i,0,0],l),Bf=(l,[r,i])=>[l[0]*r+l[2]*i+l[4],l[1]*r+l[3]*i+l[5]],Vs=(l,r)=>[l[0]*r[0]+l[2]*r[1],l[1]*r[0]+l[3]*r[1],l[0]*r[2]+l[2]*r[3],l[1]*r[2]+l[3]*r[3],l[0]*r[4]+l[2]*r[5]+l[4],l[1]*r[4]+l[3]*r[5]+l[5]],Vi="adm-image-viewer",Qs=l=>{const{dragLockRef:r,maxZoom:i}=l,a=O.exports.useRef(null),f=O.exports.useRef(null),[{matrix:v},_]=Zi(()=>({matrix:Fi(),config:{tension:200}})),h=Xl(a),k=Xl(f),w=O.exports.useRef(!1),E=(S,R,A=!1)=>{if(!h||!k)return S;const D=-h.width/2,B=-h.height/2,ee=-k.width/2,Ee=-k.height/2,pe=gn(S),se=pe*k.width,te=pe*k.height,[Se,ne]=Bf(S,[ee,Ee]);if(R==="translate"){let Ce=Se,We=ne;if(se>h.width){const G=D-(se-h.width),Je=D;Ce=A?Ze(Se,G,Je):ms(Se,G,Je,pe*50)}else Ce=-se/2;if(te>h.height){const G=B-(te-h.height),Je=B;We=A?Ze(ne,G,Je):ms(ne,G,Je,pe*50)}else We=-te/2;return yn(S,Ce-Se,We-ne)}if(R==="scale"&&A){const[Ce,We]=[se>h.width?Ze(Se,D-(se-h.width),D):-se/2,te>h.height?Ze(ne,B-(te-h.height),B):-te/2];return yn(S,Ce-Se,We-ne)}return S};return Df({onDrag:S=>{if(S.first)return;if(S.pinching)return S.cancel();if(S.tap&&S.elapsedTime>0&&S.elapsedTime<1e3){l.onTap();return}const R=gn(v.get());if(r&&(r.current=R!==1),!w.current&&R<=1)_.start({matrix:Fi()});else{const A=v.get(),D=[S.offset[0]-vs(A),S.offset[1]-gs(A)],B=yn(A,...S.last?[D[0]+S.velocity[0]*S.direction[0]*200,D[1]+S.velocity[1]*S.direction[1]*200]:D);_.start({matrix:E(B,"translate",S.last),immediate:!S.last})}},onPinch:S=>{var R;w.current=!S.last;const[A]=S.offset;if(A<0)return;let D;i==="auto"?D=h&&k?Math.max(h.height/k.height,h.width/k.width):1:D=i;const B=S.last?Ze(A,1,D):A;if((R=l.onZoomChange)===null||R===void 0||R.call(l,B),S.last&&B<=1)_.start({matrix:Fi()}),r&&(r.current=!1);else{if(!h)return;const ee=v.get(),Ee=gn(ee),pe=S.origin[0]-h.width/2,se=S.origin[1]-h.height/2;let te=yn(ee,-pe,-se);te=Uf(te,B/Ee),te=yn(te,pe,se),_.start({matrix:E(te,"scale",S.last),immediate:!S.last}),r&&(r.current=!0)}}},{target:a,drag:{from:()=>[vs(v.get()),gs(v.get())],pointer:{touch:!0}},pinch:{from:()=>[gn(v.get()),0],pointer:{touch:!0}}}),le.createElement("div",{className:`${Vi}-slide`,onPointerMove:S=>{gn(v.get())!==1&&S.stopPropagation()}},le.createElement("div",{className:`${Vi}-control`,ref:a},le.createElement(gr.div,{className:`${Vi}-image-wrapper`,style:{matrix:v}},j("img",{ref:f,src:l.image,draggable:!1,alt:l.image}))))},Qi="adm-image-viewer",Hf=O.exports.forwardRef((l,r)=>{const i=window.innerWidth+Af(16),[{x:a},f]=Zi(()=>({x:l.defaultIndex*i,config:{tension:250,clamp:!0}})),v=l.images.length;function _(w,E=!1){var S;const R=Ze(w,0,v-1);(S=l.onIndexChange)===null||S===void 0||S.call(l,R),f.start({x:R*i,immediate:E})}O.exports.useImperativeHandle(r,()=>({swipeTo:_}));const h=O.exports.useRef(!1),k=Lf(w=>{if(h.current)return;const[E]=w.offset;if(w.last){const S=Math.floor(E/i),R=S+1,A=Math.min(w.velocity[0]*2e3,i)*w.direction[0];_(Ze(Math.round((E+A)/i),S,R))}else f.start({x:E,immediate:!0})},{transform:([w,E])=>[-w,E],from:()=>[a.get(),0],bounds:()=>({left:0,right:(v-1)*i}),rubberband:!0,axis:"x",pointer:{touch:!0}});return le.createElement("div",Object.assign({className:`${Qi}-slides`},k()),le.createElement(gr.div,{className:`${Qi}-indicator`},a.to(w=>`${Ze(Math.round(w/i),0,v-1)+1} / ${v}`)),le.createElement(gr.div,{className:`${Qi}-slides-inner`,style:{x:a.to(w=>-w)}},l.images.map((w,E)=>j(Qs,{image:w,onTap:l.onTap,maxZoom:l.maxZoom,onZoomChange:S=>{if(S!==1){const R=Math.round(a.get()/i);f.start({x:R*i})}},dragLockRef:h},E))))}),xr="adm-image-viewer",Ys={maxZoom:3,getContainer:null,visible:!1},Gs=l=>{var r;const i=Xi(Ys,l),a=Bt(Ns,{visible:i.visible,disableBodyScroll:!1,opacity:"thick",afterClose:i.afterClose,destroyOnClose:!0,children:[j("div",{className:`${xr}-content`,children:i.image&&j(Qs,{image:i.image,onTap:()=>{var f;(f=i.onClose)===null||f===void 0||f.call(i)},maxZoom:i.maxZoom})}),i.image&&Bt("div",{className:`${xr}-footer`,children:[(r=i.renderFooter)===null||r===void 0?void 0:r.call(i,i.image),j(Cs,{position:"bottom"})]})]});return Ji(i.getContainer,a)},jf=Object.assign(Object.assign({},Ys),{defaultIndex:0}),qs=O.exports.forwardRef((l,r)=>{var i;const a=Xi(jf,l),[f,v]=O.exports.useState(a.defaultIndex),_=O.exports.useRef(null);O.exports.useImperativeHandle(r,()=>({swipeTo:(w,E)=>{var S;v(w),(S=_.current)===null||S===void 0||S.swipeTo(w,E)}}));const h=O.exports.useCallback(w=>{var E;v(w),(E=a.onIndexChange)===null||E===void 0||E.call(a,w)},[a.onIndexChange]),k=Bt(Ns,{visible:a.visible,disableBodyScroll:!1,opacity:"thick",afterClose:a.afterClose,destroyOnClose:!0,children:[j("div",{className:`${xr}-content`,children:a.images&&j(Hf,{ref:_,defaultIndex:f,onIndexChange:h,images:a.images,onTap:()=>{var w;(w=a.onClose)===null||w===void 0||w.call(a)},maxZoom:a.maxZoom})}),a.images&&Bt("div",{className:`${xr}-footer`,children:[(i=a.renderFooter)===null||i===void 0?void 0:i.call(a,a.images[f],f),j(Cs,{position:"bottom"})]})]});return Ji(a.getContainer,k)}),jt=new Set;function Wf(l){bi();const r=Ls(le.createElement(Gs,Object.assign({},l,{afterClose:()=>{var i;jt.delete(r),(i=l.afterClose)===null||i===void 0||i.call(l)}})));return jt.add(r),r}function Ff(l){bi();const r=Ls(le.createElement(qs,Object.assign({},l,{afterClose:()=>{var i;jt.delete(r),(i=l.afterClose)===null||i===void 0||i.call(l)}})));return jt.add(r),r}function bi(){jt.forEach(l=>{l.close()}),jt.clear()}const Vf=xs(qs,{show:Ff});var Qf=xs(Gs,{Multi:Vf,show:Wf,clear:bi});const Yf="_about_1iioc_8",Gf="_text_1iioc_11",qf="_button_1iioc_15";var Yi={about:Yf,text:Gf,button:qf},Rr={},zr={},eo={},Kf=_e&&_e.__values||function(l){var r=typeof Symbol=="function"&&Symbol.iterator,i=r&&l[r],a=0;if(i)return i.call(l);if(l&&typeof l.length=="number")return{next:function(){return l&&a>=l.length&&(l=void 0),{value:l&&l[a++],done:!l}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(eo,"__esModule",{value:!0});var Xf=function(){function l(r){this.hook=r,this.subscribers=new Set}return l.prototype.notify=function(){var r,i;try{for(var a=Kf(this.subscribers),f=a.next();!f.done;f=a.next()){var v=f.value;v(this.data)}}catch(_){r={error:_}}finally{try{f&&!f.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}},l}();eo.Container=Xf;var to={};Object.defineProperty(to,"__esModule",{value:!0});var ys=O.exports;function Zf(l){var r=l.hook(),i=ys.useRef(!1);return i.current||l.onMount(r),ys.useLayoutEffect(function(){if(!i.current){i.current=!0;return}l.onUpdate(r)}),null}to.Executor=Zf;var no={},Ks={exports:{}},Xs={exports:{}};/** @license React v0.26.2 * react-reconciler.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */(function(l){l.exports=function(i){var a={},f=Na,v=O.exports,_=za.exports;function h(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;nd||s[c]!==u[d])return` `+s[c].replace(" at new "," at ");while(1<=c&&0<=d);break}}}finally{Br=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Yt(e):""}var Hr=[],wt=-1;function $e(e){return{current:e}}function Q(e){0>wt||(e.current=Hr[wt],Hr[wt]=null,wt--)}function K(e,t){wt++,Hr[wt]=e.current,e.current=t}var be={},ue=$e(be),he=$e(!1),dt=be;function St(e,t){var n=e.type.contextTypes;if(!n)return be;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var s={},u;for(u in n)s[u]=t[u];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function me(e){return e=e.childContextTypes,e!=null}function Pn(){Q(he),Q(ue)}function So(e,t,n){if(ue.current!==be)throw Error(h(168));K(ue,t),K(he,n)}function xo(e,t,n){var o=e.stateNode;if(e=t.childContextTypes,typeof o.getChildContext!="function")return n;o=o.getChildContext();for(var s in o)if(!(s in e))throw Error(h(108,ct(t)||"Unknown",s));return f({},n,o)}function Tn(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||be,dt=ue.current,K(ue,e),K(he,he.current),!0}function ko(e,t,n){var o=e.stateNode;if(!o)throw Error(h(169));n?(e=xo(e,t,dt),o.__reactInternalMemoizedMergedChildContext=e,Q(he),Q(ue),K(ue,e)):Q(he),K(he,n)}var jr=null,pt=null,Bu=_.unstable_now;Bu();var In=0,F=8;function ht(e){if((1&e)!==0)return F=15,1;if((2&e)!==0)return F=14,2;if((4&e)!==0)return F=13,4;var t=24&e;return t!==0?(F=12,t):(e&32)!==0?(F=11,32):(t=192&e,t!==0?(F=10,t):(e&256)!==0?(F=9,256):(t=3584&e,t!==0?(F=8,t):(e&4096)!==0?(F=7,4096):(t=4186112&e,t!==0?(F=6,t):(t=62914560&e,t!==0?(F=5,t):e&67108864?(F=4,67108864):(e&134217728)!==0?(F=3,134217728):(t=805306368&e,t!==0?(F=2,t):(1073741824&e)!==0?(F=1,1073741824):(F=8,e))))))}function Hu(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function ju(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(h(358,e))}}function Gt(e,t){var n=e.pendingLanes;if(n===0)return F=0;var o=0,s=0,u=e.expiredLanes,c=e.suspendedLanes,d=e.pingedLanes;if(u!==0)o=u,s=F=15;else if(u=n&134217727,u!==0){var g=u&~c;g!==0?(o=ht(g),s=F):(d&=u,d!==0&&(o=ht(d),s=F))}else u=n&~c,u!==0?(o=ht(u),s=F):d!==0&&(o=ht(d),s=F);if(o===0)return 0;if(o=31-et(o),o=n&((0>o?0:1<n;n++)t.push(e);return t}function zn(e,t,n){e.pendingLanes|=t;var o=t-1;e.suspendedLanes&=o,e.pingedLanes&=o,e=e.eventTimes,t=31-et(t),e[t]=n}var et=Math.clz32?Math.clz32:Vu,Wu=Math.log,Fu=Math.LN2;function Vu(e){return e===0?32:31-(Wu(e)/Fu|0)|0}var Qu=_.unstable_runWithPriority,Fr=_.unstable_scheduleCallback,Vr=_.unstable_cancelCallback,Yu=_.unstable_shouldYield,To=_.unstable_requestPaint,Qr=_.unstable_now,Gu=_.unstable_getCurrentPriorityLevel,Nn=_.unstable_ImmediatePriority,Io=_.unstable_UserBlockingPriority,Ro=_.unstable_NormalPriority,zo=_.unstable_LowPriority,No=_.unstable_IdlePriority,Yr={},qu=To!==void 0?To:function(){},Fe=null,Cn=null,Gr=!1,Co=Qr(),re=1e4>Co?Qr:function(){return Qr()-Co};function kt(){switch(Gu()){case Nn:return 99;case Io:return 98;case Ro:return 97;case zo:return 96;case No:return 95;default:throw Error(h(332))}}function Lo(e){switch(e){case 99:return Nn;case 98:return Io;case 97:return Ro;case 96:return zo;case 95:return No;default:throw Error(h(332))}}function Ve(e,t){return e=Lo(e),Qu(e,t)}function qt(e,t,n){return e=Lo(e),Fr(e,t,n)}function xe(){if(Cn!==null){var e=Cn;Cn=null,Vr(e)}Mo()}function Mo(){if(!Gr&&Fe!==null){Gr=!0;var e=0;try{var t=Fe;Ve(99,function(){for(;eH?(J=M,M=null):J=M.sibling;var U=T(m,M,y[H],P);if(U===null){M===null&&(M=J);break}e&&M&&U.alternate===null&&t(m,M),p=u(U,p,H),V===null?N=U:V.sibling=U,V=U,M=J}if(H===y.length)return n(m,M),N;if(M===null){for(;HH?(J=M,M=null):J=M.sibling;var at=T(m,M,U.value,P);if(at===null){M===null&&(M=J);break}e&&M&&at.alternate===null&&t(m,M),p=u(at,p,H),V===null?N=at:V.sibling=at,V=at,M=J}if(U.done)return n(m,M),N;if(M===null){for(;!U.done;H++,U=y.next())U=L(m,U.value,P),U!==null&&(p=u(U,p,H),V===null?N=U:V.sibling=U,V=U);return N}for(M=o(m,M);!U.done;H++,U=y.next())U=W(M,m,H,U.value,P),U!==null&&(e&&U.alternate!==null&&M.delete(U.key===null?H:U.key),p=u(U,p,H),V===null?N=U:V.sibling=U,V=U);return e&&M.forEach(function(Ta){return t(m,Ta)}),N}return function(m,p,y,P){var N=typeof y=="object"&&y!==null&&y.type===S&&y.key===null;N&&(y=y.props.children);var V=typeof y=="object"&&y!==null;if(V)switch(y.$$typeof){case w:e:{for(V=y.key,N=p;N!==null;){if(N.key===V){switch(N.tag){case 7:if(y.type===S){n(m,N.sibling),p=s(N,y.props.children),p.return=m,m=p;break e}break;default:if(N.elementType===y.type){n(m,N.sibling),p=s(N,y.props),p.ref=Xt(m,N,y),p.return=m,m=p;break e}}n(m,N);break}else t(m,N);N=N.sibling}y.type===S?(p=Ot(y.props.children,m.mode,P,y.key),p.return=m,m=p):(P=pr(y.type,y.key,y.props,null,m.mode,P),P.ref=Xt(m,p,y),P.return=m,m=P)}return c(m);case E:e:{for(N=y.key;p!==null;){if(p.key===N)if(p.tag===4&&p.stateNode.containerInfo===y.containerInfo&&p.stateNode.implementation===y.implementation){n(m,p.sibling),p=s(p,y.children||[]),p.return=m,m=p;break e}else{n(m,p);break}else t(m,p);p=p.sibling}p=Hi(y,m.mode,P),p.return=m,m=p}return c(m)}if(typeof y=="string"||typeof y=="number")return y=""+y,p!==null&&p.tag===6?(n(m,p.sibling),p=s(p,y),p.return=m,m=p):(n(m,p),p=Bi(y,m.mode,P),p.return=m,m=p),c(m);if(Bn(y))return Y(m,p,y,P);if(Wt(y))return ze(m,p,y,P);if(V&&Hn(m,y),typeof y=="undefined"&&!N)switch(m.tag){case 1:case 22:case 0:case 11:case 15:throw Error(h(152,ct(m.type)||"Component"))}return n(m,p)}}var jn=Vo(!0),Qo=Vo(!1),Zt={},Te=$e(Zt),Jt=$e(Zt),It=$e(Zt);function De(e){if(e===Zt)throw Error(h(174));return e}function Jr(e,t){K(It,t),K(Jt,e),K(Te,Zt),e=bs(t),Q(Te),K(Te,e)}function Rt(){Q(Te),Q(Jt),Q(It)}function Yo(e){var t=De(It.current),n=De(Te.current);t=eu(n,e.type,t),n!==t&&(K(Jt,e),K(Te,t))}function $r(e){Jt.current===e&&(Q(Te),Q(Jt))}var X=$e(0);function Wn(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Lu(n)||Mu(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&64)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Qe=null,mt=null,Ue=!1;function Go(e,t){var n=Re(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,e.lastEffect!==null?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function qo(e,t){switch(e.tag){case 5:return t=Nu(t,e.type,e.pendingProps),t!==null?(e.stateNode=t,!0):!1;case 6:return t=Cu(t,e.pendingProps),t!==null?(e.stateNode=t,!0):!1;case 13:return!1;default:return!1}}function br(e){if(Ue){var t=mt;if(t){var n=t;if(!qo(e,t)){if(t=Dr(n),!t||!qo(e,t)){e.flags=e.flags&-1025|2,Ue=!1,Qe=e;return}Go(Qe,n)}Qe=e,mt=Eo(t)}else e.flags=e.flags&-1025|2,Ue=!1,Qe=e}}function Ko(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Qe=e}function Fn(e){if(!Me||e!==Qe)return!1;if(!Ue)return Ko(e),Ue=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!Lr(t,e.memoizedProps))for(t=mt;t;)Go(e,t),t=Dr(t);if(Ko(e),e.tag===13){if(!Me)throw Error(h(316));if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(h(317));mt=Du(e)}else mt=Qe?Dr(e.stateNode):null;return!0}function ei(){Me&&(mt=Qe=null,Ue=!1)}var zt=[];function ti(){for(var e=0;eu))throw Error(h(301));u+=1,ie=ae=null,t.updateQueue=null,$t.current=ta,e=n(o,s)}while(en)}if($t.current=qn,t=ae!==null&&ae.next!==null,bt=0,ie=ae=Z=null,Vn=!1,t)throw Error(h(300));return e}function vt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ie===null?Z.memoizedState=ie=e:ie=ie.next=e,ie}function gt(){if(ae===null){var e=Z.alternate;e=e!==null?e.memoizedState:null}else e=ae.next;var t=ie===null?Z.memoizedState:ie.next;if(t!==null)ie=t,ae=e;else{if(e===null)throw Error(h(310));ae=e,e={memoizedState:ae.memoizedState,baseState:ae.baseState,baseQueue:ae.baseQueue,queue:ae.queue,next:null},ie===null?Z.memoizedState=ie=e:ie=ie.next=e}return ie}function Be(e,t){return typeof t=="function"?t(e):t}function tn(e){var t=gt(),n=t.queue;if(n===null)throw Error(h(311));n.lastRenderedReducer=e;var o=ae,s=o.baseQueue,u=n.pending;if(u!==null){if(s!==null){var c=s.next;s.next=u.next,u.next=c}o.baseQueue=s=u,n.pending=null}if(s!==null){s=s.next,o=o.baseState;var d=c=u=null,g=s;do{var x=g.lane;if((bt&x)===x)d!==null&&(d=d.next={lane:0,action:g.action,eagerReducer:g.eagerReducer,eagerState:g.eagerState,next:null}),o=g.eagerReducer===e?g.eagerState:e(o,g.action);else{var z={lane:x,action:g.action,eagerReducer:g.eagerReducer,eagerState:g.eagerState,next:null};d===null?(c=d=z,u=o):d=d.next=z,Z.lanes|=x,an|=x}g=g.next}while(g!==null&&g!==s);d===null?u=o:d.next=c,ke(o,t.memoizedState)||(Ae=!0),t.memoizedState=o,t.baseState=u,t.baseQueue=d,n.lastRenderedState=o}return[t.memoizedState,n.dispatch]}function nn(e){var t=gt(),n=t.queue;if(n===null)throw Error(h(311));n.lastRenderedReducer=e;var o=n.dispatch,s=n.pending,u=t.memoizedState;if(s!==null){n.pending=null;var c=s=s.next;do u=e(u,c.action),c=c.next;while(c!==s);ke(u,t.memoizedState)||(Ae=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),n.lastRenderedState=u}return[u,o]}function Xo(e,t,n){var o=t._getVersion;o=o(t._source);var s=ft?t._workInProgressVersionPrimary:t._workInProgressVersionSecondary;if(s!==null?e=s===o:(e=e.mutableReadLanes,(e=(bt&e)===e)&&(ft?t._workInProgressVersionPrimary=o:t._workInProgressVersionSecondary=o,zt.push(t))),e)return n(t._source);throw zt.push(t),Error(h(350))}function Zo(e,t,n,o){var s=de;if(s===null)throw Error(h(349));var u=t._getVersion,c=u(t._source),d=$t.current,g=d.useState(function(){return Xo(s,t,n)}),x=g[1],z=g[0];g=ie;var L=e.memoizedState,T=L.refs,W=T.getSnapshot,Y=L.source;L=L.subscribe;var ze=Z;return e.memoizedState={refs:T,source:t,subscribe:o},d.useEffect(function(){T.getSnapshot=n,T.setSnapshot=x;var m=u(t._source);if(!ke(c,m)){m=n(t._source),ke(z,m)||(x(m),m=lt(ze),s.mutableReadLanes|=m&s.pendingLanes),m=s.mutableReadLanes,s.entangledLanes|=m;for(var p=s.entanglements,y=m;0n?98:n,function(){e(!0)}),Ve(97Ii&&(t.flags|=64,s=!0,sn(o,!1),t.lanes=33554432)}else{if(!s)if(e=Wn(u),e!==null){if(t.flags|=64,s=!0,e=e.updateQueue,e!==null&&(t.updateQueue=e,t.flags|=4),sn(o,!0),o.tail===null&&o.tailMode==="hidden"&&!u.alternate&&!Ue)return t=t.lastEffect=o.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*re()-o.renderingStartTime>Ii&&n!==1073741824&&(t.flags|=64,s=!0,sn(o,!1),t.lanes=33554432);o.isBackwards?(u.sibling=t.child,t.child=u):(e=o.last,e!==null?e.sibling=u:t.child=u,o.last=u)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.lastEffect=t.lastEffect,o.renderingStartTime=re(),e.sibling=null,t=X.current,K(X,s?t&1|2:t&1),e):null;case 23:case 24:return Mi(),e!==null&&e.memoizedState!==null!=(t.memoizedState!==null)&&o.mode!=="unstable-defer-without-hiding"&&(t.flags|=4),null}throw Error(h(156,t.tag))}function ia(e){switch(e.tag){case 1:me(e.type)&&Pn();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if(Rt(),Q(he),Q(ue),ti(),t=e.flags,(t&64)!==0)throw Error(h(285));return e.flags=t&-4097|64,e;case 5:return $r(e),null;case 13:return Q(X),t=e.flags,t&4096?(e.flags=t&-4097|64,e):null;case 19:return Q(X),null;case 4:return Rt(),null;case 10:return Kr(e),null;case 23:case 24:return Mi(),null;default:return null}}function di(e,t){try{var n="",o=t;do n+=Ju(o),o=o.return;while(o);var s=n}catch(u){s=` Error generating stack: `+u.message+` `+u.stack}return{value:e,source:t,stack:s}}function pi(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var oa=typeof WeakMap=="function"?WeakMap:Map;function yl(e,t,n){n=nt(-1,n),n.tag=3,n.payload={element:null};var o=t.value;return n.callback=function(){lr||(lr=!0,Ri=o),pi(e,t)},n}function _l(e,t,n){n=nt(-1,n),n.tag=3;var o=e.type.getDerivedStateFromError;if(typeof o=="function"){var s=t.value;n.payload=function(){return pi(e,t),o(s)}}var u=e.stateNode;return u!==null&&typeof u.componentDidCatch=="function"&&(n.callback=function(){typeof o!="function"&&(je===null?je=new Set([this]):je.add(this),pi(e,t));var c=t.stack;this.componentDidCatch(t.value,{componentStack:c!==null?c:""})}),n}var la=typeof WeakSet=="function"?WeakSet:Set;function El(e){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){st(e,n)}else t.current=null}function sa(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(t.flags&256&&e!==null){var n=e.memoizedProps,o=e.memoizedState;e=t.stateNode,t=e.getSnapshotBeforeUpdate(t.elementType===t.type?n:Oe(t.type,n),o),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:Le&&t.flags&256&&Ar(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(h(163))}function wl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var o=n.destroy;n.destroy=void 0,o!==void 0&&o()}n=n.next}while(n!==t)}}function ua(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(t=n.updateQueue,t=t!==null?t.lastEffect:null,t!==null){e=t=t.next;do{if((e.tag&3)===3){var o=e.create;e.destroy=o()}e=e.next}while(e!==t)}if(t=n.updateQueue,t=t!==null?t.lastEffect:null,t!==null){e=t=t.next;do{var s=e;o=s.next,s=s.tag,(s&4)!==0&&(s&1)!==0&&(Bl(n,e),ga(n,e)),e=o}while(e!==t)}return;case 1:e=n.stateNode,n.flags&4&&(t===null?e.componentDidMount():(o=n.elementType===n.type?t.memoizedProps:Oe(n.type,t.memoizedProps),e.componentDidUpdate(o,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=n.updateQueue,t!==null&&Bo(n,t,e);return;case 3:if(t=n.updateQueue,t!==null){if(e=null,n.child!==null)switch(n.child.tag){case 5:e=Nr(n.child.stateNode);break;case 1:e=n.child.stateNode}Bo(n,t,e)}return;case 5:e=n.stateNode,t===null&&n.flags&4&&yu(e,n.type,n.memoizedProps,n);return;case 6:return;case 4:return;case 12:return;case 13:Me&&n.memoizedState===null&&(n=n.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&Uu(n))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(h(163))}function Sl(e,t){if(Le)for(var n=e;;){if(n.tag===5){var o=n.stateNode;t?ku(o):Tu(n.stateNode,n.memoizedProps)}else if(n.tag===6)o=n.stateNode,t?Pu(o):Iu(o,n.memoizedProps);else if((n.tag!==23&&n.tag!==24||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function xl(e,t){if(pt&&typeof pt.onCommitFiberUnmount=="function")try{pt.onCommitFiberUnmount(jr,t)}catch{}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(e=t.updateQueue,e!==null&&(e=e.lastEffect,e!==null)){var n=e=e.next;do{var o=n,s=o.destroy;if(o=o.tag,s!==void 0)if((o&4)!==0)Bl(t,n);else{o=t;try{s()}catch(u){st(o,u)}}n=n.next}while(n!==e)}break;case 1:if(El(t),e=t.stateNode,typeof e.componentWillUnmount=="function")try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(u){st(t,u)}break;case 5:El(t);break;case 4:Le?Rl(e,t):Ft&&Ft&&(t=t.stateNode.containerInfo,e=mo(t),go(t,e))}}function kl(e,t){for(var n=t;;)if(xl(e,n),n.child===null||Le&&n.tag===4){if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}else n.child.return=n,n=n.child}function Pl(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function Tl(e){return e.tag===5||e.tag===3||e.tag===4}function Il(e){if(Le){e:{for(var t=e.return;t!==null;){if(Tl(t))break e;t=t.return}throw Error(h(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var o=!1;break;case 3:t=t.containerInfo,o=!0;break;case 4:t=t.containerInfo,o=!0;break;default:throw Error(h(161))}n.flags&16&&(ho(t),n.flags&=-17);e:t:for(n=e;;){for(;n.sibling===null;){if(n.return===null||Tl(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue t;n.child.return=n,n=n.child}if(!(n.flags&2)){n=n.stateNode;break e}}o?hi(e,n,t):mi(e,n,t)}}function hi(e,t,n){var o=e.tag,s=o===5||o===6;if(s)e=s?e.stateNode:e.stateNode.instance,t?wu(n,e,t):vu(n,e);else if(o!==4&&(e=e.child,e!==null))for(hi(e,t,n),e=e.sibling;e!==null;)hi(e,t,n),e=e.sibling}function mi(e,t,n){var o=e.tag,s=o===5||o===6;if(s)e=s?e.stateNode:e.stateNode.instance,t?Eu(n,e,t):mu(n,e);else if(o!==4&&(e=e.child,e!==null))for(mi(e,t,n),e=e.sibling;e!==null;)mi(e,t,n),e=e.sibling}function Rl(e,t){for(var n=t,o=!1,s,u;;){if(!o){o=n.return;e:for(;;){if(o===null)throw Error(h(160));switch(s=o.stateNode,o.tag){case 5:u=!1;break e;case 3:s=s.containerInfo,u=!0;break e;case 4:s=s.containerInfo,u=!0;break e}o=o.return}o=!0}if(n.tag===5||n.tag===6)kl(e,n),u?xu(s,n.stateNode):Su(s,n.stateNode);else if(n.tag===4){if(n.child!==null){s=n.stateNode.containerInfo,u=!0,n.child.return=n,n=n.child;continue}}else if(xl(e,n),n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return,n.tag===4&&(o=!1)}n.sibling.return=n.return,n=n.sibling}}function vi(e,t){if(Le){switch(t.tag){case 0:case 11:case 14:case 15:case 22:wl(3,t);return;case 1:return;case 5:var n=t.stateNode;if(n!=null){var o=t.memoizedProps;e=e!==null?e.memoizedProps:o;var s=t.type,u=t.updateQueue;t.updateQueue=null,u!==null&&_u(n,u,s,e,o,t)}return;case 6:if(t.stateNode===null)throw Error(h(162));n=t.memoizedProps,gu(t.stateNode,e!==null?e.memoizedProps:n,n);return;case 3:Me&&(t=t.stateNode,t.hydrate&&(t.hydrate=!1,wo(t.containerInfo)));return;case 12:return;case 13:zl(t),Jn(t);return;case 19:Jn(t);return;case 17:return;case 23:case 24:Sl(t,t.memoizedState!==null);return}throw Error(h(163))}switch(t.tag){case 0:case 11:case 14:case 15:case 22:wl(3,t);return;case 12:return;case 13:zl(t),Jn(t);return;case 19:Jn(t);return;case 3:Me&&(n=t.stateNode,n.hydrate&&(n.hydrate=!1,wo(n.containerInfo)));break;case 23:case 24:return}e:if(Ft){switch(t.tag){case 1:case 5:case 6:case 20:break e;case 3:case 4:t=t.stateNode,go(t.containerInfo,t.pendingChildren);break e}throw Error(h(163))}}function zl(e){e.memoizedState!==null&&(Ti=re(),Le&&Sl(e.child,!0))}function Jn(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new la),t.forEach(function(o){var s=Ea.bind(null,e,o);n.has(o)||(n.add(o),o.then(s,s))})}}function aa(e,t){return e!==null&&(e=e.memoizedState,e===null||e.dehydrated!==null)?(t=t.memoizedState,t!==null&&t.dehydrated===null):!1}var $n=0,bn=1,er=2,tr=3,nr=4;if(typeof Symbol=="function"&&Symbol.for){var un=Symbol.for;$n=un("selector.component"),bn=un("selector.has_pseudo_class"),er=un("selector.role"),tr=un("selector.test_id"),nr=un("selector.text")}function gi(e){var t=ou(e);if(t!=null){if(typeof t.memoizedProps["data-testname"]!="string")throw Error(h(364));return t}if(e=au(e),e===null)throw Error(h(362));return e.stateNode.current}function yi(e,t){switch(t.$$typeof){case $n:if(e.type===t.value)return!0;break;case bn:e:{t=t.value,e=[e,0];for(var n=0;n";case bn:return":has("+(_i(e)||"")+")";case er:return'[role="'+e.value+'"]';case nr:return'"'+e.value+'"';case tr:return'[data-testname="'+e.value+'"]';default:throw Error(h(365,e))}}function Nl(e,t){var n=[];e=[e,0];for(var o=0;os&&(s=c),n&=~u}if(n=s,n=re()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*fa(n/1960))-n,10 component higher in the tree to provide a loading indicator or placeholder to display.`)}oe!==5&&(oe=2),g=di(g,d),T=c;do{switch(T.tag){case 3:u=g,T.flags|=4096,t&=-t,T.lanes|=t;var V=yl(T,u,t);Uo(T,V);break e;case 1:u=g;var M=T.type,H=T.stateNode;if((T.flags&64)===0&&(typeof M.getDerivedStateFromError=="function"||H!==null&&typeof H.componentDidCatch=="function"&&(je===null||!je.has(H)))){T.flags|=4096,t&=-t,T.lanes|=t;var J=_l(T,u,t);Uo(T,J);break e}}T=T.return}while(T!==null)}Ul(n)}catch(U){t=U,$===n&&n!==null&&($=n=n.return);continue}break}while(1)}function Al(){var e=ir.current;return ir.current=qn,e===null?qn:e}function mn(e,t){var n=C;C|=16;var o=Al();de===e&&ce===t||Mt(e,t);do try{pa();break}catch(s){Ol(e,s)}while(1);if(qr(),C=n,ir.current=o,$!==null)throw Error(h(261));return de=null,ce=0,oe}function pa(){for(;$!==null;)Dl($)}function ha(){for(;$!==null&&!Yu();)Dl($)}function Dl(e){var t=jl(e.alternate,e,yt);e.memoizedProps=e.pendingProps,t===null?Ul(e):$=t,wi.current=null}function Ul(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&2048)===0){if(n=ra(n,t,yt),n!==null){$=n;return}if(n=t,n.tag!==24&&n.tag!==23||n.memoizedState===null||(yt&1073741824)!==0||(n.mode&4)===0){for(var o=0,s=n.child;s!==null;)o|=s.lanes|s.childLanes,s=s.sibling;n.childLanes=o}e!==null&&(e.flags&2048)===0&&(e.firstEffect===null&&(e.firstEffect=t.firstEffect),t.lastEffect!==null&&(e.lastEffect!==null&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1re()-Ti?Mt(e,0):ki|=n),we(e,t)}function Ea(e,t){var n=e.stateNode;n!==null&&n.delete(t),t=0,t===0&&(t=e.mode,(t&2)===0?t=1:(t&4)===0?t=kt()===99?1:2:(qe===0&&(qe=Nt),t=xt(62914560&~qe),t===0&&(t=4194304))),n=ye(),e=ar(e,t),e!==null&&(zn(e,t,n),we(e,n))}var jl;jl=function(e,t,n){var o=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||he.current)Ae=!0;else if((n&o)!==0)Ae=(e.flags&16384)!==0;else{switch(Ae=!1,t.tag){case 3:cl(t),ei();break;case 5:Yo(t);break;case 1:me(t.type)&&Tn(t);break;case 4:Jr(t,t.stateNode.containerInfo);break;case 10:Oo(t,t.memoizedProps.value);break;case 13:if(t.memoizedState!==null)return(n&t.child.childLanes)!==0?fl(e,t,n):(K(X,X.current&1),t=Ye(e,t,n),t!==null?t.sibling:null);K(X,X.current&1);break;case 19:if(o=(n&t.childLanes)!==0,(e.flags&64)!==0){if(o)return vl(e,t,n);t.flags|=64}var s=t.memoizedState;if(s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),K(X,X.current),o)break;return null;case 23:case 24:return t.lanes=0,ui(e,t,n)}return Ye(e,t,n)}else Ae=!1;switch(t.lanes=0,t.tag){case 2:if(o=t.type,e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,s=St(t,ue.current),Tt(t,n),s=ri(null,t,o,e,s,n),t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,me(o)){var u=!0;Tn(t)}else u=!1;t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Xr(t);var c=o.getDerivedStateFromProps;typeof c=="function"&&Dn(t,o,c,e),s.updater=Un,t.stateNode=s,s._reactInternals=t,Zr(t,o,e,n),t=ci(null,t,o,!0,u,n)}else t.tag=0,ge(null,t,s,n),t=t.child;return t;case 16:s=t.elementType;e:{switch(e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,u=s._init,s=u(s._payload),t.type=s,u=t.tag=Sa(s),e=Oe(s,e),u){case 0:t=ai(null,t,s,e,n);break e;case 1:t=al(null,t,s,e,n);break e;case 11:t=ol(null,t,s,e,n);break e;case 14:t=ll(null,t,s,Oe(s.type,e),o,n);break e}throw Error(h(306,s,""))}return t;case 0:return o=t.type,s=t.pendingProps,s=t.elementType===o?s:Oe(o,s),ai(e,t,o,s,n);case 1:return o=t.type,s=t.pendingProps,s=t.elementType===o?s:Oe(o,s),al(e,t,o,s,n);case 3:if(cl(t),o=t.updateQueue,e===null||o===null)throw Error(h(282));if(o=t.pendingProps,s=t.memoizedState,s=s!==null?s.element:null,Do(e,t),Kt(t,o,null,n),o=t.memoizedState.element,o===s)ei(),t=Ye(e,t,n);else{if(s=t.stateNode,(u=s.hydrate)&&(Me?(mt=Eo(t.stateNode.containerInfo),Qe=t,u=Ue=!0):u=!1),u){if(Me&&(e=s.mutableSourceEagerHydrationData,e!=null))for(s=0;s=x&&u>=L&&s<=z&&c<=T){e.splice(t,1);break}else if(o!==x||n.width!==g.width||Tc){if(!(u!==L||n.height!==g.height||zs)){x>o&&(g.width+=x-o,g.x=o),zu&&(g.height+=L-u,g.y=u),Tn&&(n=c)),c ")+` No matching component was found for: `)+e.join(" > ")}return null},a.getPublicRootInstance=function(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return Nr(e.child.stateNode);default:return e.child.stateNode}},a.injectIntoDevTools=function(e){if(e={bundleType:e.bundleType,version:e.version,rendererPackageName:e.rendererPackageName,rendererConfig:e.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:k.ReactCurrentDispatcher,findHostInstanceByFiber:ka,findFiberByHostInstance:e.findFiberByHostInstance||Pa,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined")e=!1;else{var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!t.isDisabled&&t.supportsFiber)try{jr=t.inject(e),pt=t}catch{}e=!0}return e},a.observeVisibleRects=function(e,t,n,o){if(!Vt)throw Error(h(363));e=Ei(e,t);var s=hu(e,n,o).disconnect;return{disconnect:function(){s()}}},a.registerMutableSourceForHydration=function(e,t){var n=t._getVersion;n=n(t._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[t,n]:e.mutableSourceEagerHydrationData.push(t,n)},a.runWithPriority=function(e,t){var n=In;try{return In=e,t()}finally{In=n}},a.shouldSuspend=function(){return!1},a.unbatchedUpdates=function(e,t){var n=C;C&=-2,C|=8;try{return e(t)}finally{C=n,C===0&&(it(),xe())}},a.updateContainer=function(e,t,n,o){var s=t.current,u=ye(),c=lt(s);e:if(n){n=n._reactInternals;t:{if(xn(n)!==n||n.tag!==1)throw Error(h(170));var d=n;do{switch(d.tag){case 3:d=d.stateNode.context;break t;case 1:if(me(d.type)){d=d.stateNode.__reactInternalMemoizedMergedChildContext;break t}}d=d.return}while(d!==null);throw Error(h(171))}if(n.tag===1){var g=n.type;if(me(g)){n=xo(n,g,d);break e}}n=d}else n=be;return t.context===null?t.context=n:t.pendingContext=n,t=nt(u,c),t.payload={element:e},o=o===void 0?null:o,o!==null&&(t.callback=o),rt(s,t),Ke(s,c,u),c},a}})(Xs);Ks.exports=Xs.exports;var Jf=_e&&_e.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(no,"__esModule",{value:!0});var $f=Jf(Ks.exports),_s=$f.default({now:Date.now,getRootHostContext:function(){return{}},prepareForCommit:function(){return{}},resetAfterCommit:function(){},getChildHostContext:function(){return{}},shouldSetTextContent:function(){return!0},createInstance:function(){},createTextInstance:function(){},appendInitialChild:function(){},appendChild:function(){},finalizeInitialChildren:function(){return!1},supportsMutation:!0,appendChildToContainer:function(){},prepareUpdate:function(){return!0},commitUpdate:function(){},commitTextUpdate:function(){},removeChild:function(){},clearContainer:function(){},supportsPersistence:!1,getPublicInstance:function(l){return l},preparePortalMount:function(){},isPrimaryRenderer:!1,supportsHydration:!1,scheduleTimeout:setTimeout,cancelTimeout:function(l){return clearTimeout(l)},noTimeout:-1});function bf(l){var r=_s.createContainer(null,0,!1,null);return _s.updateContainer(l,r)}no.render=bf;var ed=_e&&_e.__read||function(l,r){var i=typeof Symbol=="function"&&l[Symbol.iterator];if(!i)return l;var a=i.call(l),f,v=[],_;try{for(;(r===void 0||r-- >0)&&!(f=a.next()).done;)v.push(f.value)}catch(h){_={error:h}}finally{try{f&&!f.done&&(i=a.return)&&i.call(a)}finally{if(_)throw _.error}}return v},td=_e&&_e.__importStar||function(l){if(l&&l.__esModule)return l;var r={};if(l!=null)for(var i in l)Object.hasOwnProperty.call(l,i)&&(r[i]=l[i]);return r.default=l,r};Object.defineProperty(zr,"__esModule",{value:!0});var nd=eo,rd=to,_n=td(O.exports),id=no;function Zs(l,r){var i=new nd.Container(l);id.render(_n.default.createElement(rd.Executor,{onMount:function(f){i.data=f},onUpdate:function(f){i.data=f,i.notify()},hook:function(){return l(r)}}));var a=function(f){var v,_=ed(_n.useState(function(){return i?i.data:void 0}),2),h=_[0],k=_[1],w=_n.useRef(f);w.current=f;var E=_n.useRef(((v=w.current)===null||v===void 0?void 0:v.call(w,i.data))||[]);return _n.useEffect(function(){if(!i)return;function S(R){if(!w.current)k(R);else{var A=E.current,D=w.current(R);ld(A,D)&&k(R),E.current=D}}return i.subscribers.add(S),i.data!==h&&k(i.data),function(){i.subscribers.delete(S)}},[i]),h};return Object.defineProperty(a,"data",{get:function(){return i.data}}),a}zr.createModel=Zs;function od(l,r){var i,a=function(f){return i||(i=Zs(l,r)),i(f)};return Object.defineProperty(a,"data",{get:function(){return i==null?void 0:i.data}}),a}zr.createLazyModel=od;function ld(l,r){if(l.length!==r.length)return!0;for(var i in r)if(l[i]!==r[i])return!0;return!1}var ro={},En=_e&&_e.__assign||function(){return En=Object.assign||function(l){for(var r,i=1,a=arguments.length;i=l.length&&(l=void 0),{value:l&&l[a++],done:!l}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")},ud=_e&&_e.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(ro,"__esModule",{value:!0});var ad=ud(O.exports);function cd(l,r){return function(i){var a=function(f){var v,_,h;if(Array.isArray(l)){var k=[];try{for(var w=sd(l),E=w.next();!E.done;E=w.next()){var S=E.value;k.push(S())}}catch(D){v={error:D}}finally{try{E&&!E.done&&(_=w.return)&&_.call(w)}finally{if(v)throw v.error}}h=r(k,f)}else{var R=l();h=r(R,f)}var A=En(En({},f),h);return ad.default.createElement(i,En({},A))};return a.displayName=i.displayName+"Wrapper",a}}ro.withModel=cd;Object.defineProperty(Rr,"__esModule",{value:!0});var Js=zr,fd=Rr.createModel=Js.createModel;Rr.createLazyModel=Js.createLazyModel;var dd=ro;Rr.withModel=dd.withModel;function pd(){const[l,r]=O.exports.useState(0);return{count:l,decrement:f=>r(typeof f!="number"?l-1:l-f),increment:f=>r(typeof f!="number"?l+1:l+f)}}var hd=fd(pd);const md=(l,r)=>{let i=JSON.parse(JSON.stringify(l));if(r.type==="add")return i.list.push(r.value),{...i};if(r.type==="change")return i.list[r.value.index].data=r.value.data,{...i};throw new Error};function yd(){const l=hd(),r=["https://images.unsplash.com/photo-1620476214170-1d8080f65cdb?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=3150&q=80","https://images.unsplash.com/photo-1601128533718-374ffcca299b?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=3128&q=80","https://images.unsplash.com/photo-1567945716310-4745a6b7844b?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=3113&q=80","https://images.unsplash.com/photo-1624993590528-4ee743c9896e?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=200&h=1000&q=80"],[i,a]=O.exports.useState(!1),[f,v]=O.exports.useReducer(md,{list:[]}),_=()=>{v({type:"add",value:{data:2}})},h=()=>{v({type:"change",value:{index:0,data:new Date().getSeconds()}})};return Bt("div",{className:Yi.about,children:[j("p",{className:Yi.text,children:"about"}),j("h3",{children:"hox\u5168\u5C40\u72B6\u6001\u7BA1\u7406\uFF1A"}),j("p",{className:Yi.text,children:l.count}),j("h3",{children:"\u56FE\u7247\u9884\u89C8\u6A21\u5F0F\uFF1A"}),j("br",{}),j(Ba,{src:r[0],width:100,height:100,fit:"fill",onClick:()=>{a(!0)}}),j(Qf.Multi,{images:r,visible:i,onClose:()=>{a(!1)}}),j("br",{}),j("br",{}),j("h3",{children:"useReducer\u4F7F\u7528\uFF1A"}),j("br",{}),j("p",{children:JSON.stringify(f)}),j("br",{}),j("br",{}),Bt(Ha,{children:[j(ql,{color:"primary",onClick:_,children:"\u6DFB\u52A0"}),j(ql,{color:"warning",onClick:h,children:"\u4FEE\u6539"})]})]})}export{yd as default};