Files
qhmes/web-dist/js/index--p9d2PTL.js

13 lines
29 KiB
Java
Raw Normal View History

2026-06-16 18:19:57 +08:00
import{a as f,k as R,cm as $e,h as P,hq as ie,P as g,hr as G,aI as N,j as le,hs as q,fj as Ce,ht as Y,hu as Ve,hv as Be,T as Me,dF as Z,l as Te,m as we,n as Pe,cr as He,a5 as Oe,dn as z,fU as D,c5 as E,c4 as ke,fT as Fe,f as Le,c6 as Ne}from"./index-X7Y8jykP.js";import{f as B,e as I,s as ee,o as Ee,x as ue,c as ce,h as De,a as je,r as U}from"./vue-vendor-DNhG1Cve.js";import"./emoji-mart-vue-fast-R0uJEDq-.js";const J=(e,s)=>{let{attrs:t}=s;const{included:n,vertical:o,style:a,class:r}=t;let{length:i,offset:l,reverse:u}=t;i<0&&(u=!u,i=Math.abs(i),l=100-l);const c=o?{[u?"top":"bottom"]:`${l}%`,[u?"bottom":"top"]:"auto",height:`${i}%`}:{[u?"right":"left"]:`${l}%`,[u?"left":"right"]:"auto",width:`${i}%`},m=f(f({},a),c);return n?B("div",{class:r,style:m},null):null};J.inheritAttrs=!1;const Re=(e,s,t,n,o,a)=>{const r=Object.keys(s).map(parseFloat).sort((i,l)=>i-l);if(t&&n)for(let i=o;i<=a;i+=n)r.indexOf(i)===-1&&r.push(i);return r},de=(e,s)=>{let{attrs:t}=s;const{prefixCls:n,vertical:o,reverse:a,marks:r,dots:i,step:l,included:u,lowerBound:c,upperBound:m,max:b,min:C,dotStyle:y,activeDotStyle:M}=t,h=b-C,S=Re(o,r,i,l,C,b).map(d=>{const $=`${Math.abs(d-C)/h*100}%`,V=!u&&d===m||u&&d<=m&&d>=c;let x=o?f(f({},y),{[a?"top":"bottom"]:$}):f(f({},y),{[a?"right":"left"]:$});V&&(x=f(f({},x),M));const v=R({[`${n}-dot`]:!0,[`${n}-dot-active`]:V,[`${n}-dot-reverse`]:a});return B("span",{class:v,style:x,key:d},null)});return B("div",{class:`${n}-step`},[S])};de.inheritAttrs=!1;const he=(e,s)=>{let{attrs:t,slots:n}=s;const{class:o,vertical:a,reverse:r,marks:i,included:l,upperBound:u,lowerBound:c,max:m,min:b,onClickLabel:C}=t,y=Object.keys(i),M=n.mark,h=m-b,S=y.map(parseFloat).sort((d,$)=>d-$).map(d=>{const $=typeof i[d]=="function"?i[d]():i[d],V=typeof $=="object"&&!$e($);let x=V?$.label:$;if(!x&&x!==0)return null;M&&(x=M({point:d,label:x}));const v=!l&&d===u||l&&d<=u&&d>=c,p=R({[`${o}-text`]:!0,[`${o}-text-active`]:v}),T={marginBottom:"-50%",[r?"top":"bottom"]:`${(d-b)/h*100}%`},O={transform:`translateX(${r?"50%":"-50%"})`,msTransform:`translateX(${r?"50%":"-50%"})`,[r?"right":"left"]:`${(d-b)/h*100}%`},w=a?T:O,L=V?f(f({},w),$.style):w,H={[ie?"onTouchstartPassive":"onTouchstart"]:k=>C(k,d)};return B("span",P({class:p,style:L,key:d,onMousedown:k=>C(k,d)},H),[x])});return B("div",{class:o},[S])};he.inheritAttrs=!1;const fe=I({compatConfig:{MODE:3},name:"Handle",inheritAttrs:!1,props:{prefixCls:String,vertical:{type:Boolean,default:void 0},offset:Number,disabled:{type:Boolean,default:void 0},min:Number,max:Number,value:Number,tabindex:g.oneOfType([g.number,g.string]),reverse:{type:Boolean,default:void 0},ariaLabel:String,ariaLabelledBy:String,ariaValueTextFormatter:Function,onMouseenter:{type:Function},onMouseleave:{type:Function},onMousedown:{type:Function}},setup(e,s){let{attrs:t,emit:n,expose:o}=s;const a=ee(!1),r=ee(),i=()=>{document.activeElement===r.value&&(a.value=!0)},l=h=>{a.value=!1,n("blur",h)},u=()=>{a.value=!1},c=()=>{var h;(h=r.value)===null||h===void 0||h.focus()},m=()=>{var h;(h=r.value)===null||h===void 0||h.blur()},b=()=>{a.value=!0,c()},C=h=>{h.preventDefault(),c(),n("mousedown",h)};o({focus:c,blur:m,clickFocus:b,ref:r});let y=null;Ee(()=>{y=G(document,"mouseup",i)}),ue(()=>{y==null||y.remove()});const M=ce(()=>{const{vertical:h,offset:S,reverse:d}=e;return h?{[d?"top":"bottom"]:`${S}%`,[d?"bottom":"top"]:"auto",transform:d?null:"translateY(+50%)"}:{[d?"right":"left"]:`${S}%`,[d?"left":"right"]:"auto",transform:`translateX(${d?"+":"-"}50%)`}});return()=>{const{prefixCls:h,disabled:S,min:d,max:$,value:V,tabindex:x,ariaLabel:v,ariaLabelledBy:p,ariaValueTextFormatter:T,onMouseenter:O,onMouseleave:w}=e,L=R(t.class,{[`${h}-handle-click-focused`]:a.value}),H={"aria-valuemin":d,"aria-valuemax":$,"aria-valuenow":V,"aria-disabled":!!S},k=[t.style,M.value];let F=x||0;(S||x===null)&&(F=null);let W;T&&(W=T(V));const K=f(f(f(f({},t),{role:"slider",tabindex:F}),H),{class:L,onBlur:l,onKeydown:u,onMousedown:C,onMouseenter:O,onMouseleave:w,ref:r,style:k});return B("div",P(P({},K),{},{"aria-label":v,"aria-labelledby":p,"aria-valuetext":W}),null)}}
inset-inline-start ${e.motionDurationMid},
inset-block-start ${e.motionDurationMid},
width ${e.motionDurationMid},
height ${e.motionDurationMid},
box-shadow ${e.motionDurationMid}
`},"&:hover, &:active, &:focus":{"&::before":{insetInlineStart:-((e.handleSizeHover-e.handleSize)/2+e.handleLineWidthHover),insetBlockStart:-((e.handleSizeHover-e.handleSize)/2+e.handleLineWidthHover),width:e.handleSizeHover+e.handleLineWidthHover*2,height:e.handleSizeHover+e.handleLineWidthHover*2},"&::after":{boxShadow:`0 0 0 ${e.handleLineWidthHover}px ${e.colorPrimary}`,width:e.handleSizeHover,height:e.handleSizeHover,insetInlineStart:(e.handleSize-e.handleSizeHover)/2,insetBlockStart:(e.handleSize-e.handleSizeHover)/2}}},[`${s}-mark`]:{position:"absolute",fontSize:e.fontSize},[`${s}-mark-text`]:{position:"absolute",display:"inline-block",color:e.colorTextDescription,textAlign:"center",wordBreak:"keep-all",cursor:"pointer",userSelect:"none","&-active":{color:e.colorText}},[`${s}-step`]:{position:"absolute",background:"transparent",pointerEvents:"none"},[`${s}-dot`]:{position:"absolute",width:n,height:n,backgroundColor:e.colorBgElevated,border:`${e.handleLineWidth}px solid ${e.colorBorderSecondary}`,borderRadius:"50%",cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,"&-active":{borderColor:e.colorPrimaryBorder}},[`&${s}-disabled`]:{cursor:"not-allowed",[`${s}-rail`]:{backgroundColor:`${e.colorFillSecondary} !important`},[`${s}-track`]:{backgroundColor:`${e.colorTextDisabled} !important`},[`
${s}-dot
`]:{backgroundColor:e.colorBgElevated,borderColor:e.colorTextDisabled,boxShadow:"none",cursor:"not-allowed"},[`${s}-handle::after`]:{backgroundColor:e.colorBgElevated,cursor:"not-allowed",width:e.handleSize,height:e.handleSize,boxShadow:`0 0 0 ${e.handleLineWidth}px ${new He(e.colorTextDisabled).onBackground(e.colorBgContainer).toHexString()}`,insetInlineStart:0,insetBlockStart:0},[`
${s}-mark-text,
${s}-dot
`]:{cursor:"not-allowed !important"}}})}},ye=(e,s)=>{const{componentCls:t,railSize:n,handleSize:o,dotSize:a}=e,r=s?"paddingBlock":"paddingInline",i=s?"width":"height",l=s?"height":"width",u=s?"insetBlockStart":"insetInlineStart",c=s?"top":"insetInlineStart";return{[r]:n,[l]:n*3,[`${t}-rail`]:{[i]:"100%",[l]:n},[`${t}-track`]:{[l]:n},[`${t}-handle`]:{[u]:(n*3-o)/2},[`${t}-mark`]:{insetInlineStart:0,top:0,[c]:o,[i]:"100%"},[`${t}-step`]:{insetInlineStart:0,top:0,[c]:n,[i]:"100%",[l]:n},[`${t}-dot`]:{position:"absolute",[u]:(n-a)/2}}},Ye=e=>{const{componentCls:s,marginPartWithMark:t}=e;return{[`${s}-horizontal`]:f(f({},ye(e,!0)),{[`&${s}-with-marks`]:{marginBottom:t}})}},qe=e=>{const{componentCls:s}=e;return{[`${s}-vertical`]:f(f({},ye(e,!1)),{height:"100%"})}},Je=Te("Slider",e=>{const s=we(e,{marginPart:(e.controlHeight-e.controlSize)/2,marginFull:e.controlSize/2,marginPartWithMark:e.controlHeightLG-e.controlSize});return[Xe(s),Ye(s),qe(s)]},e=>{const t=e.controlHeightLG/4,n=e.controlHeightSM/2,o=e.lineWidth+1,a=e.lineWidth+3;return{controlSize:t,railSize:4,handleSize:t,handleSizeHover:n,dotSize:8,handleLineWidth:o,handleLineWidthHover:a}});var re=function(e,s){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&s.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)s.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]]);return t};const Qe=e=>typeof e=="number"?e.toString():"",Ze=()=>({id:String,prefixCls:String,tooltipPrefixCls:String,range:D([Boolean,Object]),reverse:E(),min:Number,max:Number,step:D([Object,Number]),marks:Fe(),dots:E(),value:D([Array,Number]),defaultValue:D([Array,Number]),included:E(),disabled:E(),vertical:E(),tipFormatter:D([Function,Object],()=>Qe),tooltipOpen:E(),tooltipVisible:E(),tooltipPlacement:ke(),getTooltipPopupContainer:z(),autofocus:E(),handleStyle:D([Array,Object]),trackStyle:D([Array,Object]),onChange:z(),onAfterChange:z(),onFocus:z(),onBlur:z(),"onUpdate:value":z()}),et=I({compatConfig:{MODE:3},name:"ASlider",inheritAttrs:!1,props:Ze(),slots:Object,setup(e,s){let{attrs:t,slots:n,emit:o,expose:a}=s;const{prefixCls:r,rootPrefixCls:i,direction:l,getPopupContainer:u,configProvider:c}=Le("slider",e),[m,b]=Je(r),C=Ne(),y=U(),M=U({}),h=(p,T)=>{M.value[p]=T},S=ce(()=>e.tooltipPlacement?e.tooltipPlacement:e.vertical?l.value==="rtl"?"left":"right":"top"),d=()=>{var p;(p=y.value)===null||p===void 0||p.focus()},$=()=>{var p;(p=y.value)===null||p===void 0||p.blur()},V=p=>{o("update:value",p),o("change",p),C.onFieldChange()},x=p=>{o("blur",p)};a({focus:d,blur:$});const v=p=>{var{tooltipPrefixCls:T}=p,O=p.info,{value:w,dragging:L,index:H}=O,k=re(O,["value","dragging","index"]);const{tipFormatter:F,tooltipOpen:W=e.tooltipVisible,getTooltipPopupContainer:K}=e,Se=F?M.value[H]||L:!1,xe=W||W===void 0&&Se;return B(Ke,{prefixCls:T,title:F?F(w):"",open:xe,placement:S.value,transitionName:`${i.value}-zoom-down`,key:H,overlayClassName:`${r.value}-tooltip`,getPopupContainer:K||(u==null?void 0:u.value)},{default:()=>[B(fe,P(P({},k),{},{value:w,onMouseenter:()=>h(H,!0),onMouseleave:()=>h(H,!1)}),null)]})};return()=>{const{tooltipPrefixCls:p,range:T,id:O=C.id.value}=e,w=re(e,["tooltipPrefixCls","range","id"]),L=c.getPrefixCls("tooltip",p),H=R(t.class,{[`${r.value}-rtl`]:l.value==="rtl"},b.value);l.value==="rtl"&&!w.vertical&&(w.reverse=!w.reverse);let k;return typeof T=="object"&&(k=T.draggableTrack),m(T?B(Ue,P(P(P({},t),w),{},{step:w.step,draggableTrack:k,class:H,ref:y,handle:F=>v({tooltipPrefixCls:L,prefixCls:r.value,info:F}),prefixCls:r.value,onChange:V,onBlur:x}),{mark:n.mark}):B(We,P(P(P({},t),w),{},{id:O,step:w.step,class:H,ref:y,handle:F=>v({tooltipPrefixCls:L,prefixCls:r.value,info:F}),prefixCls:r.value,onChange:V,onBlur:x}),{mark:n.mark}))}}}),ot=Oe(et);export{ot as default,Ze as sliderProps};