PageSourceSearch

https://7zz.cn/assets/slider-yxlR6mzh.js

js 7zz.cn collected 2026-10-07 19:56:37 UTC 10,224 bytes, 13 lines download raw bytes

1import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{n as t}from"./jsx-runtime-Ciaf_P-h.js";import{F as n,N as r,P as i,R as a,X as o,_ as s,g as c}from"./pickAttrs-DIkXfajW.js";import{d as l,f as u,h as d,j as f}from"./es-DrXbpWFj.js";import{b as p,m,s as h}from"./reactNode-D3jpDsOK.js";import{H as g}from"./ContextIsolator-lxc5PI6T.js";import{t as _}from"./tooltip-ChOBGQLQ.js";import{r as v,t as ee}from"./es-B3m5JXr4.js";var y=e(o());r(),v();var b=e(t()),x=(0,b.createContext)({});a();var S=b.forwardRef((e,t)=>{let{open:r,draggingDelete:a,value:o}=e,s=(0,b.useRef)(null),c=r&&!a,l=(0,b.useRef)(null);function u(){i.cancel(l.current),l.current=null}function d(){l.current=i(()=>{var e;(e=s.current)==null||e.forceAlign(),l.current=null})}return b.useEffect(()=>(c?d():u(),u),[c,e.title,o]),b.createElement(_,Object.assign({ref:n(s,t)},e,{open:c}))});d(),l(),c();var C=e=>{let{componentCls:t,antCls:n,controlSize:r,dotSize:i,marginFull:a,marginPart:o,colorFillContentHover:s,handleColorDisabled:c,calc:l,handleSize:u,handleSizeHover:d,handleActiveColor:p,handleActiveOutlineColor:h,handleLineWidth:g,handleLineWidthHover:_,motionDurationMid:v}=e;return{[t]:Object.assign(Object.assign({},m(e)),{position:`relative`,height:r,margin:`${f(o)} ${f(a)}`,padding:0,cursor:`pointer`,touchAction:`none`,"&-vertical":{margin:`${f(a)} ${f(o)}`},[`${t}-rail`]:{position:`absolute`,backgroundColor:e.railBg,borderRadius:e.borderRadiusXS,transition:`background-color ${v}`},[`${t}-track,${t}-tracks`]:{position:`absolute`,transition:`background-color ${v}`},[`${t}-track`]:{backgroundColor:e.trackBg,borderRadius:e.borderRadiusXS},[`${t}-track-draggable`]:{boxSizing:`content-box`,backgroundClip:`content-box`,border:`solid rgba(0,0,0,0)`},"&:hover":{[`${t}-rail`]:{backgroundColor:e.railHoverBg},[`${t}-track`]:{backgroundColor:e.trackHoverBg},[`${t}-dot`]:{borderColor:s},[`${t}-handle::after`]:{boxShadow:`0 0 0 ${f(g)} ${e.colorPrimaryBorderHover}`},[`${t}-dot-active`]:{borderColor:e.dotActiveBorderColor}},[`${t}-handle`]:{position:`absolute`,width:u,height:u,outline:`none`,userSelect:`none`,"&-dragging-delete":{opacity:0}
1,"&::before":{content:`""`,position:`absolute`,insetInlineStart:l(g).mul(-1).equal(),insetBlockStart:l(g).mul(-1).equal(),width:l(u).add(l(g).mul(2)).equal(),height:l(u).add(l(g).mul(2)).equal(),backgroundColor:`transparent`},"&::after":{content:`""`,position:`absolute`,insetBlockStart:0,insetInlineStart:0,width:u,height:u,backgroundColor:e.colorBgElevated,boxShadow:`0 0 0 ${f(g)} ${e.handleColor}`,outline:`0px solid transparent`,borderRadius:`50%`,cursor:`pointer`,transition:`
2            inset-inline-start ${v},
3            inset-block-start ${v},
4            width ${v},
5            height ${v},
6            box-shadow ${v},
7            outline ${v}
8          `},"&:hover, &:active, &:focus":{"&::before":{insetInlineStart:l(d).sub(u).div(2).add(_).mul(-1).equal(),insetBlockStart:l(d).sub(u).div(2).add(_).mul(-1).equal(),width:l(d).add(l(_).mul(2)).equal(),height:l(d).add(l(_).mul(2)).equal()},"&::after":{boxShadow:`0 0 0 ${f(_)} ${p}`,outline:`6px solid ${h}`,width:d,height:d,insetInlineStart:e.calc(u).sub(d).div(2).equal(),insetBlockStart:e.calc(u).sub(d).div(2).equal()}}},[`&-lock ${t}-handle`]:{"&::before, &::after":{transition:`none`}},[`${t}-mark`]:{position:`absolute`,fontSize:e.fontSize},[`${t}-mark-text`]:{position:`absolute`,display:`inline-block`,color:e.colorTextDescription,textAlign:`center`,wordBreak:`keep-all`,cursor:`pointer`,userSelect:`none`,"&-active":{color:e.colorText}},[`${t}-step`]:{position:`absolute`,background:`transparent`,pointerEvents:`none`},[`${t}-dot`]:{position:`absolute`,width:i,height:i,backgroundColor:e.colorBgElevated,border:`${f(g)} solid ${e.dotBorderColor}`,borderRadius:`50%`,cursor:`pointer`,transition:`border-color ${e.motionDurationSlow}`,pointerEvents:`auto`,"&-active":{borderColor:e.dotActiveBorderColor}},[`&${t}-disabled`]:{cursor:`not-allowed`,[`${t}-rail`]:{backgroundColor:`${e.railBg} !important`},[`${t}-track`]:{backgroundColor:`${e.trackBgDisabled} !important`},[`
9          ${t}-dot
10        `]:{backgroundColor:e.colorBgElevated,borderColor:e.trackBgDisabled,boxShadow:`none`,cursor:`not-allowed`},[`${t}-handle::after`]:{backgroundColor:e.colorBgElevated,cursor:`not-allowed`,width:u,height:u,boxShadow:`0 0 0 ${f(g)} ${c}`,insetInlineStart:0,insetBlockStart:0},[`
11          ${t}-mark-text,
12          ${t}-dot
13        `]:{cursor:`not-allowed !important`}},[`&-tooltip ${n}-tooltip-inner`]:{minWidth:`unset`}})}},w=(e,t)=>{let{componentCls:n,railSize:r,handleSize:i,dotSize:a,marginFull:o,calc:s}=e,c=t?`paddingBlock`:`paddingInline`,l=t?`width`:`height`,u=t?`height`:`width`,d=t?`insetBlockStart`:`insetInlineStart`,p=t?`top`:`insetInlineStart`,m=s(r).mul(3).sub(i).div(2).equal(),h=s(i).sub(r).div(2).equal(),g=t?{borderWidth:`${f(h)} 0`,transform:`translateY(${f(s(h).mul(-1).equal())})`}:{borderWidth:`0 ${f(h)}`,transform:`translateX(${f(e.calc(h).mul(-1).equal())})`};return{[c]:r,[u]:s(r).mul(3).equal(),[`${n}-rail`]:{[l]:`100%`,[u]:r},[`${n}-track,${n}-tracks`]:{[u]:r},[`${n}-track-draggable`]:Object.assign({},g),[`${n}-handle`]:{[d]:m},[`${n}-mark`]:{insetInlineStart:0,top:0,[p]:s(r).mul(3).add(t?0:o).equal(),[l]:`100%`},[`${n}-step`]:{insetInlineStart:0,top:0,[p]:r,[l]:`100%`,[u]:r},[`${n}-dot`]:{position:`absolute`,[d]:s(r).sub(a).div(2).equal()}}},T=e=>{let{componentCls:t,marginPartWithMark:n}=e;return{[`${t}-horizontal`]:Object.assign(Object.assign({},w(e,!0)),{[`&${t}-with-marks`]:{marginBottom:n}})}},E=e=>{let{componentCls:t}=e;return{[`${t}-vertical`]:Object.assign(Object.assign({},w(e,!1)),{height:`100%`})}},D=h(`Slider`,e=>{let t=s(e,{marginPart:e.calc(e.controlHeight).sub(e.controlSize).div(2).equal(),marginFull:e.calc(e.controlSize).div(2).equal(),marginPartWithMark:e.calc(e.controlHeightLG).sub(e.controlSize).equal()});return[C(t),T(t),E(t)]},e=>{let t=e.controlHeightLG/4,n=e.controlHeightSM/2,r=e.lineWidth+1,i=e.lineWidth+1.5,a=e.colorPrimary,o=new u(a).setA(.2).toRgbString();return{controlSize:t,railSize:4,handleSize:t,handleSizeHover:n,dotSize:8,handleLineWidth:r,handleLineWidthHover:i,railBg:e.colorFillTertiary,railHoverBg:e.colorFillSecondary,trackBg:e.colorPrimaryBorder,trackHoverBg:e.colorPrimaryBorderHover,handleColor:e.colorPrimaryBorder,handleActiveColor:a,handleActiveOutlineColor:o,handleColorDisabled:new u(e.colorTextDisabled).onBackgroun
13d(e.colorBgContainer).toHexString(),dotBorderColor:e.colorBorderSecondary,dotActiveBorderColor:e.colorPrimaryBorder,trackBgDisabled:e.colorBgContainerDisabled}});r();function O(){let[e,t]=b.useState(!1),n=b.useRef(null),r=()=>{i.cancel(n.current)};return b.useEffect(()=>r,[]),[e,e=>{r(),e?t(e):n.current=i(()=>{t(e)})}]}r();var te=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function ne(e,t){return e||e===null?e:t||t===null?t:e=>typeof e==`number`?e.toString():``}var k=b.forwardRef((e,t)=>{let{prefixCls:n,range:r,className:a,rootClassName:o,style:s,disabled:c,tooltipPrefixCls:l,tipFormatter:u,tooltipVisible:d,getTooltipPopupContainer:f,tooltipPlacement:m,tooltip:h={},onChangeComplete:_,classNames:v,styles:C}=e,w=te(e,[`prefixCls`,`range`,`className`,`rootClassName`,`style`,`disabled`,`tooltipPrefixCls`,`tipFormatter`,`tooltipVisible`,`getTooltipPopupContainer`,`tooltipPlacement`,`tooltip`,`onChangeComplete`,`classNames`,`styles`]),{vertical:T}=e,{getPrefixCls:E,direction:k,className:re,style:ie,classNames:A,styles:j,getPopupContainer:M}=p(`slider`),N=b.useContext(g),ae=c??N,{handleRender:oe,direction:P}=b.useContext(x),F=(P||k)===`rtl`,[I,L]=O(),[se,R]=O(),z=Object.assign({},h),{open:ce,placement:B,getPopupContainer:V,prefixCls:H,formatter:U}=z,W=ce??d,G=(I||se)&&W!==!1,K=ne(U,u),[le,q]=O(),ue=e=>{_?.(e),q(!1)},J=(e,t)=>e||(t?F?`left`:`right`:`top`),Y=E(`slider`,n),[de,fe,X]=D(Y),pe=(0,y.default)(a,re,A.root,v?.root,o,{[`${Y}-rtl`]:F,[`${Y}-lock`]:le},fe,X);F&&!w.vertical&&(w.reverse=!w.reverse),b.useEffect(()=>{let e=()=>{i(()=>{R(!1)},1)};return document.addEventListener(`mouseup`,e),()=>{document.removeEventListener(`mouseup`,e)}},[]);let Z=r&&!W,me=oe||((e,t)=>{let{index:n}=t,r=e.props;function i(e,t,n){var i,a,o,s;n&&((a=(i=w)[e])==null||a.call(i,t)),(s=(o=r)[e])==null||s.call(o,t)}let a=Object.assign(Object.assign({},r),{onMouseEnter:e=>{L(!0),i(`onMouseEnter`,e)},onMouseLeave:e=>{L(!1),i(`onMouseLeave`,e)},onMouseDown:e=>{R(!0),q(!0),i(`onMouseDown`,e)},onFocus:e=>{var t;R(!0),(t=w.onFocus)==null||t.call(w,e),i(`onFocus`,e,!0)},onBlur:e=>{var t;R(!1),(t=w.onBlur)==null||t.call(w,e),i(`onBlur`,e,!0)}}),o=b.cloneElement(e,a),s=(!!W||G)&&K!==null;return Z?o:b.createElement(S,Object.assign({},z,{prefixCls:E(`tooltip`,H??l),title:K?K(t.value):``,value:t.value,open:s,placement:J(B??m,T),key:n,classNames:{root:`${Y}-tooltip`},getPopupContainer:V||f||M}),o)}),he=Z?(e,t)=>{let n=b.cloneElement(e,{style:Object.assign(Object.assign({},e.props.style),{visibility:`hidden`})});return b.createElement(S,Object.assign({},z,{prefixCls:E(`tooltip`,H??l),title:K?K(t.value):``,open:K!==null&&G,placement:J(B??m,T),key:`tooltip`,classNames:{root:`${Y}-tooltip`},getPopupContainer:V||f||M,draggingDelete:t.draggingDelete}),n)}:void 0,ge=Object.assign(Object.assign(Object.assign(Object.assign({},j.root),ie),C?.root),s),Q=Object.assign(Object.assign({},j.tracks),C?.tracks),$=(0,y.default)(A.tracks,v?.tracks);return de(b.createElement(ee,Object.assign({},w,{classNames:Object.assign({handle:(0,y.default)(A.handle,v?.handle),rail:(0,y.default)(A.rail,v?.rail),track:(0,y.default)(A.track,v?.track)},$?{tracks:$}:{}),styles:Object.assign({handle:Object.assign(Object.assign({},j.handle),C?.handle),rail:Object.assign(Object.assign({},j.rail),C?.rail),track:Object.assign(Object.assign({},j.track),C?.track)},Object.keys(Q).length?{tracks:Q}:{}),step:w.step,range:r,className:pe,style:ge,disabled:ae,ref:t,prefixCls:Y,handleRender:me,activeHandleRender:he,onChangeComplete:ue})))});export{x as n,k as t};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.