import{b as g,dc as J,d as I,f as Q,di as j,V as R,M as Y,N as Z,da as ee,de as ae,r as ne,e_ as te,q as le,O as re,P as oe,R as ue,T as ie,U as p,be as B,bL as ce,fH as fe}from"./index-f4658ae7.js";import{u as de}from"./useRefs-2f4603d7.js";var se={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z"}}]},name:"star",theme:"filled"};const ve=se;function M(r){for(var e=1;e=C&&iF?"true":"false","aria-posinset":F+1,"aria-setsize":y,tabindex:o?-1:0},[g("div",{class:"".concat(f,"-first")},[h]),g("div",{class:"".concat(f,"-second")},[h])])]);return i&&(a=i(a,e)),a}}});var xe=function(){return{prefixCls:String,count:Number,value:Number,allowHalf:{type:Boolean,default:void 0},allowClear:{type:Boolean,default:void 0},tooltips:Array,disabled:{type:Boolean,default:void 0},character:R.any,autofocus:{type:Boolean,default:void 0},tabindex:R.oneOfType([R.number,R.string]),direction:String,id:String,onChange:Function,onHoverChange:Function,"onUpdate:value":Function,onFocus:Function,onBlur:Function,onKeydown:Function}},Fe=I({name:"ARate",inheritAttrs:!1,props:Z(xe(),{value:0,count:5,allowHalf:!1,allowClear:!0,tabindex:0,direction:"ltr"}),setup:function(e,t){var u=t.slots,s=t.attrs,m=t.emit,w=t.expose,V=ee("rate",e),x=V.prefixCls,o=V.direction,f=ae(),i=ne(),F=de(),y=te(F,2),C=y[0],h=y[1],a=le({value:e.value,focused:!1,cleanedValue:null,hoverValue:void 0});re(function(){return e.value},function(){a.value=e.value});var A=function(n){return fe(h.value.get(n))},P=function(n,l){var v=o.value==="rtl",c=n+1;if(e.allowHalf){var b=A(n),O=ye(b),k=b.clientWidth;(v&&l-O>k/2||!v&&l-O0&&!b||l===B.RIGHT&&a.value>0&&b?(c?a.value-=.5:a.value-=1,S(a.value),n.preventDefault()):l===B.LEFT&&a.value