19 lines
31 KiB
JavaScript
19 lines
31 KiB
JavaScript
|
import{m as x,e as C,B as ee,x as te,af as at,v as rt,E as X,a as ye,r as _,H as A,n as Se,a3 as we,R as ce,X as P,c as K,O as Ee,Z as it,A as ie,Y as re,ae as We,P as Ve,D as R,_ as Ne,am as lt,a5 as st,aO as Ue,a4 as Ke,aP as Ye,ad as Xe,a0 as Te,z as ut,G as ct,a_ as ft,at as _e,F as vt}from"./index.ab0d47a4.js";import{R as dt}from"./index.9c196d1a.js";import{w as U}from"./default.76e08716.js";import{s as Y,P as ht,c as mt,K as Re,b as gt,a as pt}from"./KeyCode.99f746d5.js";import{w as bt,H as yt}from"./useFlexGapSupport.f5eec5c4.js";import{_ as Ct,a as St}from"./index.8c51b797.js";import{B as Pe,c as wt}from"./index.0857d90f.js";var Tt=`accept acceptcharset accesskey action allowfullscreen allowtransparency
|
||
|
alt async autocomplete autofocus autoplay capture cellpadding cellspacing challenge
|
||
|
charset checked classid classname colspan cols content contenteditable contextmenu
|
||
|
controls coords crossorigin data datetime default defer dir disabled download draggable
|
||
|
enctype form formaction formenctype formmethod formnovalidate formtarget frameborder
|
||
|
headers height hidden high href hreflang htmlfor for httpequiv icon id inputmode integrity
|
||
|
is keyparams keytype kind label lang list loop low manifest marginheight marginwidth max maxlength media
|
||
|
mediagroup method min minlength multiple muted name novalidate nonce open
|
||
|
optimum pattern placeholder poster preload radiogroup readonly rel required
|
||
|
reversed role rowspan rows sandbox scope scoped scrolling seamless selected
|
||
|
shape size sizes span spellcheck src srcdoc srclang srcset start step style
|
||
|
summary tabindex target title type usemap value width wmode wrap`,kt=`onCopy onCut onPaste onCompositionend onCompositionstart onCompositionupdate onKeydown
|
||
|
onKeypress onKeyup onFocus onBlur onChange onInput onSubmit onClick onContextmenu onDoubleclick onDblclick
|
||
|
onDrag onDragend onDragenter onDragexit onDragleave onDragover onDragstart onDrop onMousedown
|
||
|
onMouseenter onMouseleave onMousemove onMouseout onMouseover onMouseup onSelect onTouchcancel
|
||
|
onTouchend onTouchmove onTouchstart onTouchstartPassive onTouchmovePassive onScroll onWheel onAbort onCanplay onCanplaythrough
|
||
|
onDurationchange onEmptied onEncrypted onEnded onError onLoadeddata onLoadedmetadata
|
||
|
onLoadstart onPause onPlay onPlaying onProgress onRatechange onSeeked onSeeking onStalled onSuspend onTimeupdate onVolumechange onWaiting onLoad onError`,Oe="".concat(Tt," ").concat(kt).split(/[\s\n]+/),xt="aria-",Mt="data-";function He(a,e){return a.indexOf(e)===0}function Et(a){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,t;e===!1?t={aria:!0,data:!0,attr:!0}:e===!0?t={aria:!0}:t=x({},e);var o={};return Object.keys(a).forEach(function(n){(t.aria&&(n==="role"||He(n,xt))||t.data&&He(n,Mt)||t.attr&&(Oe.includes(n)||Oe.includes(n.toLowerCase())))&&(o[n]=a[n])}),o}function Le(){var a=function e(t){e.current=t};return a}var fe=function(e,t){var o=e.height,n=e.offset,r=e.prefixCls,i=e.onInnerResize,c=t.slots,l,s={},u={display:"flex",flexDirection:"column"};return n!==void 0&&(s={height:"".concat(o,"px"),position:"relative",overflow:"hidden"},u=x(x({},u),{transform:"translateY(".concat(n,"px)"),position:"absolute",left:0,right:0,top:0})),C("div",{style:s},[C(dt,{onResize:function(v){var g=v.offsetHeight;g&&i&&i()}},{default:function(){return[C("div",{style:u,class:ee(te({},"".concat(r,"-holder-inner"),r))},[(l=c.default)===null||l===void 0?void 0:l.call(c)])]}})])};fe.displayName="Filter";fe.inheritAttrs=!1;fe.props={prefixCls:String,height:Number,offset:Number,onInnerResize:Function};const Nt=fe;var qe=function(e,t){var o=e.setRef,n=t.slots,r,i=at((r=n.default)===null||r===void 0?void 0:r.call(n));return i&&i.length?rt(i[0],{ref:o}):i};qe.props={setRef:{type:Function,default:function(){}}};const _t=qe;var Rt=20;function De(a){return"touches"in a?a.touches[0].pageY:a.pageY}const Pt=X({name:"ScrollBar",inheritAttrs:!1,props:{prefixCls:String,scrollTop:Number,scrollHeight:Number,height:Number,count:Number,onScroll:{type:Function},onStartMove:{type:Function},onStopMove:{type:Function}},setup:function(){return{moveRaf:null,scrollbarRef:Le(),thumbRef:Le(),visibleTimeout:null,state:ye({dragging:!1,pageY:null,startTop:null,visible:!1})}},watch:{scrollTop:{handler:function(){this.delayHidden()},flush:"post"}},mounted:function(){var e,t;(e=this.scrollbarRef.current)===null||e===void 0||e.addEventListener("touchstart",this.onScrollbarTouchStart,Y?{passive:!1}:!1),(t=this.thumbRef.current)===null||t===void 0||t.addEventListener("touchstart",this.onMouseDown,Y?{passive:!1}:!1)},beforeUnmount:function(){this.removeEvents(),clearTimeout(this.visibleTimeout)},methods:{delayHidden:function(){var e=this;clearTimeout(this.visibleTimeout),this.state.visible=!0,this.visibleTimeout=setTimeout(function(){e.state.visible=!1},2e3)},onScrollbarTouchStart:function(e){e.preventDefault()},onContainerMouseDown:function(e){e.stopPropagation(),e.preventDefault()},patchEvents:function(){window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onMouseUp),this.thumbRef.current.addEventListener("touchmove",this.onMouseMove,Y?{passive:!1}:!1),this.thumbRef.current.addEventListener("touchend",this.onMouseUp)},removeEvents:function(){window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseup",this.onMouseUp),this.scrollbarRef.current.removeEventListener("touchstart",this.onScrollbarTouchStart,Y?{passive:!1}:!1),this.thumbRef.current.removeEventListener("touchstart",this.onMouseDown,Y?{passive:!1}:!1),this.thumbRef.current.removeEventListener("touchmove",this.onMouseMove,Y?{passive:!1}:!1),this.thumbRef.current.removeEventListener("touchend",this.onMouseUp),U.cancel(this.moveRaf)},onMouseDown:function(e){var t=this.$props.onStartMove;x(this.state,{dragging:!0,pageY:De(e),startTop:this.getTop()}),t(),this.patchEvents(),e.stopPropagation(),e.preventDefault()},onMouseMove:function(e){var t=this.state,o=t.dragging,n=t.pageY,r=t.startTop,i=this.$props.onScroll;if(U.cancel(this.moveRaf),o){var c=De(e)-n,l=r+c,s=this.getEnableScrollRange(),u=this.getEnableHeightRange(),m=u?l/u:0,v=Math.ceil(m*s);this.moveRaf=U(function(){i(v)})}},onMouseUp:function(){var e=this.$props.onStopMove;this.state.dragging=!1,e(),this.removeEvents()},getSpinHeight:function(){var e=this.$props,t=e.height,o
|