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