"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("../../style/index.js");require("../../theme/internal.js");const S=require("../../theme/util/genComponentStyleHook.js"),g=require("../../theme/util/statistic.js"),$=require("../../node_modules/.pnpm/@ctrl_tinycolor@3.6.1/node_modules/@ctrl/tinycolor/dist/module/index.js"),b=r=>{const{componentCls:i,controlSize:o,dotSize:e,marginFull:t,marginPart:n,colorFillContentHover:l}=r;return{[i]:{...u.resetComponent(r),position:"relative",height:o,margin:`${n}px ${t}px`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${t}px ${n}px`},[`${i}-rail`]:{position:"absolute",backgroundColor:r.colorFillTertiary,borderRadius:r.borderRadiusXS,transition:`background-color ${r.motionDurationMid}`},[`${i}-track`]:{position:"absolute",backgroundColor:r.colorPrimaryBorder,borderRadius:r.borderRadiusXS,transition:`background-color ${r.motionDurationMid}`},"&:hover":{[`${i}-rail`]:{backgroundColor:r.colorFillSecondary},[`${i}-track`]:{backgroundColor:r.colorPrimaryBorderHover},[`${i}-dot`]:{borderColor:l},[`${i}-handle::after`]:{boxShadow:`0 0 0 ${r.handleLineWidth}px ${r.colorPrimaryBorderHover}`},[`${i}-dot-active`]:{borderColor:r.colorPrimary}},[`${i}-handle`]:{position:"absolute",width:r.handleSize,height:r.handleSize,outline:"none",[`${i}-dragging`]:{zIndex:1},"&::before":{content:'""',position:"absolute",insetInlineStart:-r.handleLineWidth,insetBlockStart:-r.handleLineWidth,width:r.handleSize+r.handleLineWidth*2,height:r.handleSize+r.handleLineWidth*2,backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:r.handleSize,height:r.handleSize,backgroundColor:r.colorBgElevated,boxShadow:`0 0 0 ${r.handleLineWidth}px ${r.colorPrimaryBorder}`,borderRadius:"50%",cursor:"pointer",transition:`
            inset-inline-start ${r.motionDurationMid},
            inset-block-start ${r.motionDurationMid},
            width ${r.motionDurationMid},
            height ${r.motionDurationMid},
            box-shadow ${r.motionDurationMid}
          `},"&:hover, &:active, &:focus":{"&::before":{insetInlineStart:-((r.handleSizeHover-r.handleSize)/2+r.handleLineWidthHover),insetBlockStart:-((r.handleSizeHover-r.handleSize)/2+r.handleLineWidthHover),width:r.handleSizeHover+r.handleLineWidthHover*2,height:r.handleSizeHover+r.handleLineWidthHover*2},"&::after":{boxShadow:`0 0 0 ${r.handleLineWidthHover}px ${r.colorPrimary}`,width:r.handleSizeHover,height:r.handleSizeHover,insetInlineStart:(r.handleSize-r.handleSizeHover)/2,insetBlockStart:(r.handleSize-r.handleSizeHover)/2}}},[`${i}-mark`]:{position:"absolute",fontSize:r.fontSize},[`${i}-mark-text`]:{position:"absolute",display:"inline-block",color:r.colorTextDescription,textAlign:"center",wordBreak:"keep-all",cursor:"pointer",userSelect:"none","&-active":{color:r.colorText}},[`${i}-step`]:{position:"absolute",background:"transparent",pointerEvents:"none"},[`${i}-dot`]:{position:"absolute",width:e,height:e,backgroundColor:r.colorBgElevated,border:`${r.handleLineWidth}px solid ${r.colorBorderSecondary}`,borderRadius:"50%",cursor:"pointer",transition:`border-color ${r.motionDurationSlow}`,pointerEvents:"auto","&-active":{borderColor:r.colorPrimaryBorder}},[`&${i}-disabled`]:{cursor:"not-allowed",[`${i}-rail`]:{backgroundColor:`${r.colorFillSecondary} !important`},[`${i}-track`]:{backgroundColor:`${r.colorTextDisabled} !important`},[`
          ${i}-dot
        `]:{backgroundColor:r.colorBgElevated,borderColor:r.colorTextDisabled,boxShadow:"none",cursor:"not-allowed"},[`${i}-handle::after`]:{backgroundColor:r.colorBgElevated,cursor:"not-allowed",width:r.handleSize,height:r.handleSize,boxShadow:`0 0 0 ${r.handleLineWidth}px ${new $.TinyColor(r.colorTextDisabled).onBackground(r.colorBgContainer).toHexString()}`,insetInlineStart:0,insetBlockStart:0},[`
          ${i}-mark-text,
          ${i}-dot
        `]:{cursor:"not-allowed !important"}}}}},h=(r,i)=>{const{componentCls:o,railSize:e,handleSize:t,dotSize:n}=r,l=i?"paddingBlock":"paddingInline",d=i?"width":"height",a=i?"height":"width",c=i?"insetBlockStart":"insetInlineStart",s=i?"top":"insetInlineStart";return{[l]:e,[a]:e*3,[`${o}-rail`]:{[d]:"100%",[a]:e},[`${o}-track`]:{[a]:e},[`${o}-handle`]:{[c]:(e*3-t)/2},[`${o}-mark`]:{insetInlineStart:0,top:0,[s]:t,[d]:"100%"},[`${o}-step`]:{insetInlineStart:0,top:0,[s]:e,[d]:"100%",[a]:e},[`${o}-dot`]:{position:"absolute",[c]:(e-n)/2}}},p=r=>{const{componentCls:i,marginPartWithMark:o}=r;return{[`${i}-horizontal`]:{...h(r,!0),[`&${i}-with-marks`]:{marginBottom:o}}}},m=r=>{const{componentCls:i}=r;return{[`${i}-vertical`]:{...h(r,!1),height:"100%"}}},v=S.default("Slider",r=>{const i=g.merge(r,{marginPart:(r.controlHeight-r.controlSize)/2,marginFull:r.controlSize/2,marginPartWithMark:r.controlHeightLG-r.controlSize});return[b(i),p(i),m(i)]},r=>{const o=r.controlHeightLG/4,e=r.controlHeightSM/2,t=r.lineWidth+1,n=r.lineWidth+3;return{controlSize:o,railSize:4,handleSize:o,handleSizeHover:e,dotSize:8,handleLineWidth:t,handleLineWidthHover:n}});exports.default=v;
