sd-webui-infinite-image-bro.../vue/dist/assets/shortcut-7567da19.js

3 lines
32 KiB
JavaScript

import{dx as $e,a as m,P as M,d as R,dy as ae,u as ne,b9 as _e,c5 as He,bV as re,v as me,w as ie,r as E,f as Oe,_ as Y,cT as D,h as k,c as w,dz as Ne,s as Z,aj as z,be as Le,i as A,b as pe,c_ as Ee,dA as ge,dB as X,dC as j,dD as se,cS as be,dE as Ae,dF as ee,dG as De,dH as Re,dI as je,at as Ie,dJ as le,bJ as Ge,dK as Ue,dL as Ke,o as We,j as Xe,bj as ue,bT as ze,n as Je}from"./index-ac2041d9.js";function Ye(o,e){var a=typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(!a){if(Array.isArray(o)||(a=$e(o))||e&&o&&typeof o.length=="number"){a&&(o=a);var t=0,n=function(){};return{s:n,n:function(){return t>=o.length?{done:!0}:{done:!1,value:o[t++]}},e:function(u){throw u},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var r=!0,i=!1,s;return{s:function(){a=a.call(o)},n:function(){var u=a.next();return r=u.done,u},e:function(u){i=!0,s=u},f:function(){try{!r&&a.return!=null&&a.return()}finally{if(i)throw s}}}}var qe=function(){return{name:String,prefixCls:String,options:{type:Array,default:function(){return[]}},disabled:Boolean,id:String}},Qe=function(){return m(m({},qe()),{},{defaultValue:{type:Array},value:{type:Array},onChange:{type:Function},"onUpdate:value":{type:Function}})},Ze=function(){return{prefixCls:String,defaultChecked:{type:Boolean,default:void 0},checked:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},isGroup:{type:Boolean,default:void 0},value:M.any,name:String,id:String,indeterminate:{type:Boolean,default:void 0},type:{type:String,default:"checkbox"},autofocus:{type:Boolean,default:void 0},onChange:Function,"onUpdate:checked":Function,onClick:Function,skipGroup:{type:Boolean,default:!1}}},et=function(){return m(m({},Ze()),{},{indeterminate:{type:Boolean,default:!1}})},ye=Symbol("CheckboxGroupContext"),tt=["indeterminate","skipGroup","id"],at=["onMouseenter","onMouseleave","onInput","class","style"];const J=R({compatConfig:{MODE:3},name:"ACheckbox",inheritAttrs:!1,__ANT_CHECKBOX:!0,props:et(),setup:function(e,a){var t=a.emit,n=a.attrs,r=a.slots,i=a.expose,s=ae(),l=ne("checkbox",e),u=l.prefixCls,c=l.direction,v=_e(ye,void 0),g=Symbol("checkboxUniId");He(function(){!e.skipGroup&&v&&v.registerValue(g,e.value)}),re(function(){v&&v.cancelValue(g)}),me(function(){ie(e.checked!==void 0||v||e.value===void 0,"Checkbox","`value` is not validate prop, do you mean `checked`?")});var C=function(d){var f=d.target.checked;t("update:checked",f),t("change",d)},S=E(),T=function(){var d;(d=S.value)===null||d===void 0||d.focus()},F=function(){var d;(d=S.value)===null||d===void 0||d.blur()};return i({focus:T,blur:F}),function(){var b,d,f=Oe((b=r.default)===null||b===void 0?void 0:b.call(r)),y=e.indeterminate,x=e.skipGroup,V=e.id,p=V===void 0?s.id.value:V,h=Y(e,tt),P=n.onMouseenter,$=n.onMouseleave;n.onInput;var B=n.class,L=n.style,H=Y(n,at),_=m(m({},h),{},{id:p,prefixCls:u.value},H);v&&!x?(_.onChange=function(){for(var G=arguments.length,q=new Array(G),U=0;U<G;U++)q[U]=arguments[U];t.apply(void 0,["change"].concat(q)),v.toggleOption({label:f,value:e.value})},_.name=v.name.value,_.checked=v.mergedValue.value.indexOf(e.value)!==-1,_.disabled=e.disabled||v.disabled.value,_.indeterminate=y):_.onChange=C;var O=D((d={},k(d,"".concat(u.value,"-wrapper"),!0),k(d,"".concat(u.value,"-rtl"),c.value==="rtl"),k(d,"".concat(u.value,"-wrapper-checked"),_.checked),k(d,"".concat(u.value,"-wrapper-disabled"),_.disabled),d),B),N=D(k({},"".concat(u.value,"-indeterminate"),y));return w("label",{class:O,style:L,onMouseenter:P,onMouseleave:$},[w(Ne,m(m({},_),{},{class:N,ref:S}),null),f.length?w("span",null,[f]):null])}}}),te=R({compatConfig:{MODE:3},name:"ACheckboxGroup",props:Qe(),setup:function(e,a){var t=a.slots,n=a.emit,r=a.expose,i=ae(),s=ne("checkbox",e),l=s.prefixCls,u=s.direction,c=E((e.value===void 0?e.defaultValue:e.value)||[]);Z(function(){return e.value},function(){c.value=e.value||[]});var v=z(function(){return e.options.map(function(d){return typeof d=="string"||typeof d=="number"?{label:d,value:d}:d})}),g=E(Symbol()),C=E(new Map),S=function(f){C.value.delete(f),g.value=Symbol()},T=function(f,y){C.value.set(f,y),g.value=Symbol()},F=E(new Map);Z(g,function(){var d=new Map,f=Ye(C.value.values()),y;try{for(f.s();!(y=f.n()).done;){var x=y.value;d.set(x,!0)}}catch(V){f.e(V)}finally{f.f()}F.value=d});var b=function(f){var y=c.value.indexOf(f.value),x=A(c.value);y===-1?x.push(f.value):x.splice(y,1),e.value===void 0&&(c.value=x);var V=x.filter(function(p){return F.value.has(p)}).sort(function(p,h){var P=v.value.findIndex(function(B){return B.value===p}),$=v.value.findIndex(function(B){return B.value===h});return P-$});n("update:value",V),n("change",V),i.onFieldChange()};return Le(ye,{cancelValue:S,registerValue:T,toggleOption:b,mergedValue:c,name:z(function(){return e.name}),disabled:z(function(){return e.disabled})}),r({mergedValue:c}),function(){var d,f=e.id,y=f===void 0?i.id.value:f,x=null,V="".concat(l.value,"-group");return v.value&&v.value.length>0&&(x=v.value.map(function(p){var h;return w(J,{prefixCls:l.value,key:p.value.toString(),disabled:"disabled"in p?p.disabled:e.disabled,indeterminate:p.indeterminate,value:p.value,checked:c.value.indexOf(p.value)!==-1,onChange:p.onChange,class:"".concat(V,"-item")},{default:function(){return[p.label===void 0?(h=t.label)===null||h===void 0?void 0:h.call(t,p):p.label]}})})),w("div",{class:[V,k({},"".concat(V,"-rtl"),u.value==="rtl")],id:y},[x||((d=t.default)===null||d===void 0?void 0:d.call(t))])}}});J.Group=te;J.install=function(o){return o.component(J.name,J),o.component(te.name,te),o};var xe=function(e,a){var t,n,r=a.attrs,i=r.included,s=r.vertical,l=r.style,u=r.class,c=r.length,v=r.offset,g=r.reverse;c<0&&(g=!g,c=Math.abs(c),v=100-v);var C=s?(t={},k(t,g?"top":"bottom","".concat(v,"%")),k(t,g?"bottom":"top","auto"),k(t,"height","".concat(c,"%")),t):(n={},k(n,g?"right":"left","".concat(v,"%")),k(n,g?"left":"right","auto"),k(n,"width","".concat(c,"%")),n),S=m(m({},l),C);return i?w("div",{class:u,style:S},null):null};xe.inheritAttrs=!1;const ke=xe;var nt=function(e,a,t,n,r,i){ie(t?n>0:!0,"Slider","`Slider[step]` should be a positive number in order to make Slider[dots] work.");var s=Object.keys(a).map(parseFloat).sort(function(u,c){return u-c});if(t&&n)for(var l=r;l<=i;l+=n)s.indexOf(l)===-1&&s.push(l);return s},Ce=function(e,a){var t=a.attrs,n=t.prefixCls,r=t.vertical,i=t.reverse,s=t.marks,l=t.dots,u=t.step,c=t.included,v=t.lowerBound,g=t.upperBound,C=t.max,S=t.min,T=t.dotStyle,F=t.activeDotStyle,b=C-S,d=nt(r,s,l,u,S,C).map(function(f){var y,x="".concat(Math.abs(f-S)/b*100,"%"),V=!c&&f===g||c&&f<=g&&f>=v,p=r?m(m({},T),{},k({},i?"top":"bottom",x)):m(m({},T),{},k({},i?"right":"left",x));V&&(p=m(m({},p),F));var h=D((y={},k(y,"".concat(n,"-dot"),!0),k(y,"".concat(n,"-dot-active"),V),k(y,"".concat(n,"-dot-reverse"),i),y));return w("span",{class:h,style:p,key:f},null)});return w("div",{class:"".concat(n,"-step")},[d])};Ce.inheritAttrs=!1;const rt=Ce;var Se=function(e,a){var t=a.attrs,n=a.slots,r=t.class,i=t.vertical,s=t.reverse,l=t.marks,u=t.included,c=t.upperBound,v=t.lowerBound,g=t.max,C=t.min,S=t.onClickLabel,T=Object.keys(l),F=n.mark,b=g-C,d=T.map(parseFloat).sort(function(f,y){return f-y}).map(function(f){var y,x=typeof l[f]=="function"?l[f]():l[f],V=pe(x)==="object"&&!Ee(x),p=V?x.label:x;if(!p&&p!==0)return null;F&&(p=F({point:f,label:p}));var h=!u&&f===c||u&&f<=c&&f>=v,P=D((y={},k(y,"".concat(r,"-text"),!0),k(y,"".concat(r,"-text-active"),h),y)),$=k({marginBottom:"-50%"},s?"top":"bottom","".concat((f-C)/b*100,"%")),B=k({transform:"translateX(".concat(s?"50%":"-50%",")"),msTransform:"translateX(".concat(s?"50%":"-50%",")")},s?"right":"left","".concat((f-C)/b*100,"%")),L=i?$:B,H=V?m(m({},L),x.style):L,_=k({},ge?"onTouchstartPassive":"onTouchstart",function(O){return S(O,f)});return w("span",m({class:P,style:H,key:f,onMousedown:function(N){return S(N,f)}},_),[p])});return w("div",{class:r},[d])};Se.inheritAttrs=!1;const it=Se,Ve=R({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:M.oneOfType([M.number,M.string]),reverse:{type:Boolean,default:void 0},ariaLabel:String,ariaLabelledBy:String,ariaValueTextFormatter:Function,onMouseenter:{type:Function},onMouseleave:{type:Function},onMousedown:{type:Function}},setup:function(e,a){var t=a.attrs,n=a.emit,r=a.expose,i=E(!1),s=E(),l=function(){document.activeElement===s.value&&(i.value=!0)},u=function(d){i.value=!1,n("blur",d)},c=function(){i.value=!1},v=function(){var d;(d=s.value)===null||d===void 0||d.focus()},g=function(){var d;(d=s.value)===null||d===void 0||d.blur()},C=function(){i.value=!0,v()},S=function(d){d.preventDefault(),v(),n("mousedown",d)};r({focus:v,blur:g,clickFocus:C,ref:s});var T=null;me(function(){T=X(document,"mouseup",l)}),re(function(){var b;(b=T)===null||b===void 0||b.remove()});var F=z(function(){var b,d,f=e.vertical,y=e.offset,x=e.reverse;return f?(b={},k(b,x?"top":"bottom","".concat(y,"%")),k(b,x?"bottom":"top","auto"),k(b,"transform",x?null:"translateY(+50%)"),b):(d={},k(d,x?"right":"left","".concat(y,"%")),k(d,x?"left":"right","auto"),k(d,"transform","translateX(".concat(x?"+":"-","50%)")),d)});return function(){var b=e.prefixCls,d=e.disabled,f=e.min,y=e.max,x=e.value,V=e.tabindex,p=e.ariaLabel,h=e.ariaLabelledBy,P=e.ariaValueTextFormatter,$=e.onMouseenter,B=e.onMouseleave,L=D(t.class,k({},"".concat(b,"-handle-click-focused"),i.value)),H={"aria-valuemin":f,"aria-valuemax":y,"aria-valuenow":x,"aria-disabled":!!d},_=[t.style,F.value],O=V||0;(d||V===null)&&(O=null);var N;P&&(N=P(x));var G=m(m(m({},t),{},{role:"slider",tabindex:O},H),{},{class:L,onBlur:u,onKeydown:c,onMousedown:S,onMouseenter:$,onMouseleave:B,ref:s,style:_});return w("div",m(m({},G),{},{"aria-label":p,"aria-labelledby":h,"aria-valuetext":N}),null)}}});function Q(o,e){try{return Object.keys(e).some(function(a){return o.target===e[a].ref})}catch{return!1}}function Me(o,e){var a=e.min,t=e.max;return o<a||o>t}function de(o){return o.touches.length>1||o.type.toLowerCase()==="touchend"&&o.touches.length>0}function ce(o,e){var a=e.marks,t=e.step,n=e.min,r=e.max,i=Object.keys(a).map(parseFloat);if(t!==null){var s=Math.pow(10,Be(t)),l=Math.floor((r*s-n*s)/(t*s)),u=Math.min((o-n)/t,l),c=Math.round(u)*t+n;i.push(c)}var v=i.map(function(g){return Math.abs(o-g)});return i[v.indexOf(Math.min.apply(Math,A(v)))]}function Be(o){var e=o.toString(),a=0;return e.indexOf(".")>=0&&(a=e.length-e.indexOf(".")-1),a}function ve(o,e){var a=1;return window.visualViewport&&(a=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(o?e.clientY:e.pageX)/a}function fe(o,e){var a=1;return window.visualViewport&&(a=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(o?e.touches[0].clientY:e.touches[0].pageX)/a}function he(o,e){var a=e.getBoundingClientRect();return o?a.top+a.height*.5:window.pageXOffset+a.left+a.width*.5}function oe(o,e){var a=e.max,t=e.min;return o<=t?t:o>=a?a:o}function Te(o,e){var a=e.step,t=isFinite(ce(o,e))?ce(o,e):0;return a===null?t:parseFloat(t.toFixed(Be(a)))}function K(o){o.stopPropagation(),o.preventDefault()}function st(o,e,a){var t={increase:function(s,l){return s+l},decrease:function(s,l){return s-l}},n=t[o](Object.keys(a.marks).indexOf(JSON.stringify(e)),1),r=Object.keys(a.marks)[n];return a.step?t[o](e,a.step):Object.keys(a.marks).length&&a.marks[r]?a.marks[r]:e}function Pe(o,e,a){var t="increase",n="decrease",r=t;switch(o.keyCode){case j.UP:r=e&&a?n:t;break;case j.RIGHT:r=!e&&a?n:t;break;case j.DOWN:r=e&&a?t:n;break;case j.LEFT:r=!e&&a?t:n;break;case j.END:return function(i,s){return s.max};case j.HOME:return function(i,s){return s.min};case j.PAGE_UP:return function(i,s){return i+s.step*2};case j.PAGE_DOWN:return function(i,s){return i-s.step*2};default:return}return function(i,s){return st(r,i,s)}}var ot=["index","directives","className","style"];function I(){}function we(o){var e={id:String,min:Number,max:Number,step:Number,marks:M.object,included:{type:Boolean,default:void 0},prefixCls:String,disabled:{type:Boolean,default:void 0},handle:Function,dots:{type:Boolean,default:void 0},vertical:{type:Boolean,default:void 0},reverse:{type:Boolean,default:void 0},minimumTrackStyle:M.object,maximumTrackStyle:M.object,handleStyle:M.oneOfType([M.object,M.arrayOf(M.object)]),trackStyle:M.oneOfType([M.object,M.arrayOf(M.object)]),railStyle:M.object,dotStyle:M.object,activeDotStyle:M.object,autofocus:{type:Boolean,default:void 0},draggableTrack:{type:Boolean,default:void 0}};return R({compatConfig:{MODE:3},name:"CreateSlider",mixins:[se,o],inheritAttrs:!1,slots:["mark"],props:be(e,{prefixCls:"rc-slider",min:0,max:100,step:1,marks:{},included:!0,disabled:!1,dots:!1,vertical:!1,reverse:!1,trackStyle:[{}],handleStyle:[{}],railStyle:{},dotStyle:{},activeDotStyle:{}}),emits:["change","blur","focus"],data:function(){var t=this.step,n=this.max,r=this.min,i=isFinite(n-r)?(n-r)%t===0:!0;return ie(t&&Math.floor(t)===t?i:!0,"Slider[max] - Slider[min] (".concat(n-r,") should be a multiple of Slider[step] (").concat(t,")")),this.handlesRefs={},{}},mounted:function(){var t=this;this.$nextTick(function(){t.document=t.sliderRef&&t.sliderRef.ownerDocument;var n=t.autofocus,r=t.disabled;n&&!r&&t.focus()})},beforeUnmount:function(){var t=this;this.$nextTick(function(){t.removeDocumentEvents()})},methods:{defaultHandle:function(t){var n=t.index;t.directives;var r=t.className,i=t.style,s=Y(t,ot);if(delete s.dragging,s.value===null)return null;var l=m(m({},s),{},{class:r,style:i,key:n});return w(Ve,l,null)},onDown:function(t,n){var r=n,i=this.$props,s=i.draggableTrack,l=i.vertical,u=this.$data.bounds,c=s&&this.positionGetValue?this.positionGetValue(r)||[]:[],v=Q(t,this.handlesRefs);if(this.dragTrack=s&&u.length>=2&&!v&&!c.map(function(C,S){var T=S?!0:C>=u[S];return S===c.length-1?C<=u[S]:T}).some(function(C){return!C}),this.dragTrack)this.dragOffset=r,this.startBounds=A(u);else{if(!v)this.dragOffset=0;else{var g=he(l,t.target);this.dragOffset=r-g,r=g}this.onStart(r)}},onMouseDown:function(t){if(t.button===0){this.removeDocumentEvents();var n=this.$props.vertical,r=ve(n,t);this.onDown(t,r),this.addDocumentMouseEvents()}},onTouchStart:function(t){if(!de(t)){var n=this.vertical,r=fe(n,t);this.onDown(t,r),this.addDocumentTouchEvents(),K(t)}},onFocus:function(t){var n=this.vertical;if(Q(t,this.handlesRefs)&&!this.dragTrack){var r=he(n,t.target);this.dragOffset=0,this.onStart(r),K(t),this.$emit("focus",t)}},onBlur:function(t){this.dragTrack||this.onEnd(),this.$emit("blur",t)},onMouseUp:function(){this.handlesRefs[this.prevMovedHandleIndex]&&this.handlesRefs[this.prevMovedHandleIndex].clickFocus()},onMouseMove:function(t){if(!this.sliderRef){this.onEnd();return}var n=ve(this.vertical,t);this.onMove(t,n-this.dragOffset,this.dragTrack,this.startBounds)},onTouchMove:function(t){if(de(t)||!this.sliderRef){this.onEnd();return}var n=fe(this.vertical,t);this.onMove(t,n-this.dragOffset,this.dragTrack,this.startBounds)},onKeyDown:function(t){this.sliderRef&&Q(t,this.handlesRefs)&&this.onKeyboard(t)},onClickMarkLabel:function(t,n){var r=this;t.stopPropagation(),this.onChange({sValue:n}),this.setState({sValue:n},function(){return r.onEnd(!0)})},getSliderStart:function(){var t=this.sliderRef,n=this.vertical,r=this.reverse,i=t.getBoundingClientRect();return n?r?i.bottom:i.top:window.pageXOffset+(r?i.right:i.left)},getSliderLength:function(){var t=this.sliderRef;if(!t)return 0;var n=t.getBoundingClientRect();return this.vertical?n.height:n.width},addDocumentTouchEvents:function(){this.onTouchMoveListener=X(this.document,"touchmove",this.onTouchMove),this.onTouchUpListener=X(this.document,"touchend",this.onEnd)},addDocumentMouseEvents:function(){this.onMouseMoveListener=X(this.document,"mousemove",this.onMouseMove),this.onMouseUpListener=X(this.document,"mouseup",this.onEnd)},removeDocumentEvents:function(){this.onTouchMoveListener&&this.onTouchMoveListener.remove(),this.onTouchUpListener&&this.onTouchUpListener.remove(),this.onMouseMoveListener&&this.onMouseMoveListener.remove(),this.onMouseUpListener&&this.onMouseUpListener.remove()},focus:function(){var t;this.$props.disabled||(t=this.handlesRefs[0])===null||t===void 0||t.focus()},blur:function(){var t=this;this.$props.disabled||Object.keys(this.handlesRefs).forEach(function(n){var r,i;(r=t.handlesRefs[n])===null||r===void 0||(i=r.blur)===null||i===void 0||i.call(r)})},calcValue:function(t){var n=this.vertical,r=this.min,i=this.max,s=Math.abs(Math.max(t,0)/this.getSliderLength()),l=n?(1-s)*(i-r)+r:s*(i-r)+r;return l},calcValueByPos:function(t){var n=this.reverse?-1:1,r=n*(t-this.getSliderStart()),i=this.trimAlignValue(this.calcValue(r));return i},calcOffset:function(t){var n=this.min,r=this.max,i=(t-n)/(r-n);return Math.max(0,i*100)},saveSlider:function(t){this.sliderRef=t},saveHandle:function(t,n){this.handlesRefs[t]=n}},render:function(){var t,n=this.prefixCls,r=this.marks,i=this.dots,s=this.step,l=this.included,u=this.disabled,c=this.vertical,v=this.reverse,g=this.min,C=this.max,S=this.maximumTrackStyle,T=this.railStyle,F=this.dotStyle,b=this.activeDotStyle,d=this.id,f=this.$attrs,y=f.class,x=f.style,V=this.renderSlider(),p=V.tracks,h=V.handles,P=D(n,y,(t={},k(t,"".concat(n,"-with-marks"),Object.keys(r).length),k(t,"".concat(n,"-disabled"),u),k(t,"".concat(n,"-vertical"),c),t)),$={vertical:c,marks:r,included:l,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:C,min:g,reverse:v,class:"".concat(n,"-mark"),onClickLabel:u?I:this.onClickMarkLabel},B=k({},ge?"onTouchstartPassive":"onTouchstart",u?I:this.onTouchStart);return w("div",m(m({id:d,ref:this.saveSlider,tabindex:"-1",class:P},B),{},{onMousedown:u?I:this.onMouseDown,onMouseup:u?I:this.onMouseUp,onKeydown:u?I:this.onKeyDown,onFocus:u?I:this.onFocus,onBlur:u?I:this.onBlur,style:x}),[w("div",{class:"".concat(n,"-rail"),style:m(m({},S),T)},null),p,w(rt,{prefixCls:n,vertical:c,reverse:v,marks:r,dots:i,step:s,included:l,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:C,min:g,dotStyle:F,activeDotStyle:b},null),h,w(it,$,{mark:this.$slots.mark}),Ae(this)])}})}var lt=R({compatConfig:{MODE:3},name:"Slider",mixins:[se],inheritAttrs:!1,props:{defaultValue:Number,value:Number,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},tabindex:M.oneOfType([M.number,M.string]),reverse:{type:Boolean,default:void 0},min:Number,max:Number,ariaLabelForHandle:String,ariaLabelledByForHandle:String,ariaValueTextFormatterForHandle:String,startPoint:Number},emits:["beforeChange","afterChange","change"],data:function(){var e=this.defaultValue!==void 0?this.defaultValue:this.min,a=this.value!==void 0?this.value:e;return{sValue:this.trimAlignValue(a),dragging:!1}},watch:{value:{handler:function(e){this.setChangeValue(e)},deep:!0},min:function(){var e=this.sValue;this.setChangeValue(e)},max:function(){var e=this.sValue;this.setChangeValue(e)}},methods:{setChangeValue:function(e){var a=e!==void 0?e:this.sValue,t=this.trimAlignValue(a,this.$props);t!==this.sValue&&(this.setState({sValue:t}),Me(a,this.$props)&&this.$emit("change",t))},onChange:function(e){var a=!ee(this,"value"),t=e.sValue>this.max?m(m({},e),{},{sValue:this.max}):e;a&&this.setState(t);var n=t.sValue;this.$emit("change",n)},onStart:function(e){this.setState({dragging:!0});var a=this.sValue;this.$emit("beforeChange",a);var t=this.calcValueByPos(e);this.startValue=t,this.startPosition=e,t!==a&&(this.prevMovedHandleIndex=0,this.onChange({sValue:t}))},onEnd:function(e){var a=this.dragging;this.removeDocumentEvents(),(a||e)&&this.$emit("afterChange",this.sValue),this.setState({dragging:!1})},onMove:function(e,a){K(e);var t=this.sValue,n=this.calcValueByPos(a);n!==t&&this.onChange({sValue:n})},onKeyboard:function(e){var a=this.$props,t=a.reverse,n=a.vertical,r=Pe(e,n,t);if(r){K(e);var i=this.sValue,s=r(i,this.$props),l=this.trimAlignValue(s);if(l===i)return;this.onChange({sValue:l}),this.$emit("afterChange",l),this.onEnd()}},getLowerBound:function(){var e=this.$props.startPoint||this.$props.min;return this.$data.sValue>e?e:this.$data.sValue},getUpperBound:function(){return this.$data.sValue<this.$props.startPoint?this.$props.startPoint:this.$data.sValue},trimAlignValue:function(e){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e===null)return null;var t=m(m({},this.$props),a),n=oe(e,t);return Te(n,t)},getTrack:function(e){var a=e.prefixCls,t=e.reverse,n=e.vertical,r=e.included,i=e.minimumTrackStyle,s=e.mergedTrackStyle,l=e.length,u=e.offset;return w(ke,{class:"".concat(a,"-track"),vertical:n,included:r,offset:u,reverse:t,length:l,style:m(m({},i),s)},null)},renderSlider:function(){var e=this,a=this.prefixCls,t=this.vertical,n=this.included,r=this.disabled,i=this.minimumTrackStyle,s=this.trackStyle,l=this.handleStyle,u=this.tabindex,c=this.ariaLabelForHandle,v=this.ariaLabelledByForHandle,g=this.ariaValueTextFormatterForHandle,C=this.min,S=this.max,T=this.startPoint,F=this.reverse,b=this.handle,d=this.defaultHandle,f=b||d,y=this.sValue,x=this.dragging,V=this.calcOffset(y),p=f({class:"".concat(a,"-handle"),prefixCls:a,vertical:t,offset:V,value:y,dragging:x,disabled:r,min:C,max:S,reverse:F,index:0,tabindex:u,ariaLabel:c,ariaLabelledBy:v,ariaValueTextFormatter:g,style:l[0]||l,ref:function(B){return e.saveHandle(0,B)},onFocus:this.onFocus,onBlur:this.onBlur}),h=T!==void 0?this.calcOffset(T):0,P=s[0]||s;return{tracks:this.getTrack({prefixCls:a,reverse:F,vertical:t,included:n,offset:h,minimumTrackStyle:i,mergedTrackStyle:P,length:V-h}),handles:p}}}});const ut=we(lt);var W=function(e){var a=e.value,t=e.handle,n=e.bounds,r=e.props,i=r.allowCross,s=r.pushable,l=Number(s),u=oe(a,r),c=u;return!i&&t!=null&&n!==void 0&&(t>0&&u<=n[t-1]+l&&(c=n[t-1]+l),t<n.length-1&&u>=n[t+1]-l&&(c=n[t+1]-l)),Te(c,r)},dt={defaultValue:M.arrayOf(M.number),value:M.arrayOf(M.number),count:Number,pushable:De(M.oneOfType([M.looseBool,M.number])),allowCross:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},reverse:{type:Boolean,default:void 0},tabindex:M.arrayOf(M.number),prefixCls:String,min:Number,max:Number,autofocus:{type:Boolean,default:void 0},ariaLabelGroupForHandles:Array,ariaLabelledByGroupForHandles:Array,ariaValueTextFormatterGroupForHandles:Array,draggableTrack:{type:Boolean,default:void 0}},ct=R({compatConfig:{MODE:3},name:"Range",mixins:[se],inheritAttrs:!1,props:be(dt,{count:1,allowCross:!0,pushable:!1,tabindex:[],draggableTrack:!1,ariaLabelGroupForHandles:[],ariaLabelledByGroupForHandles:[],ariaValueTextFormatterGroupForHandles:[]}),emits:["beforeChange","afterChange","change"],displayName:"Range",data:function(){var e=this,a=this.count,t=this.min,n=this.max,r=Array.apply(void 0,A(Array(a+1))).map(function(){return t}),i=ee(this,"defaultValue")?this.defaultValue:r,s=this.value;s===void 0&&(s=i);var l=s.map(function(c,v){return W({value:c,handle:v,props:e.$props})}),u=l[0]===n?0:l.length-1;return{sHandle:null,recent:u,bounds:l}},watch:{value:{handler:function(e){var a=this.bounds;this.setChangeValue(e||a)},deep:!0},min:function(){var e=this.value;this.setChangeValue(e||this.bounds)},max:function(){var e=this.value;this.setChangeValue(e||this.bounds)}},methods:{setChangeValue:function(e){var a=this,t=this.bounds,n=e.map(function(i,s){return W({value:i,handle:s,bounds:t,props:a.$props})});if(t.length===n.length){if(n.every(function(i,s){return i===t[s]}))return null}else n=e.map(function(i,s){return W({value:i,handle:s,props:a.$props})});if(this.setState({bounds:n}),e.some(function(i){return Me(i,a.$props)})){var r=e.map(function(i){return oe(i,a.$props)});this.$emit("change",r)}},onChange:function(e){var a=!ee(this,"value");if(a)this.setState(e);else{var t={};["sHandle","recent"].forEach(function(i){e[i]!==void 0&&(t[i]=e[i])}),Object.keys(t).length&&this.setState(t)}var n=m(m({},this.$data),e),r=n.bounds;this.$emit("change",r)},positionGetValue:function(e){var a=this.getValue(),t=this.calcValueByPos(e),n=this.getClosestBound(t),r=this.getBoundNeedMoving(t,n),i=a[r];if(t===i)return null;var s=A(a);return s[r]=t,s},onStart:function(e){var a=this.bounds;this.$emit("beforeChange",a);var t=this.calcValueByPos(e);this.startValue=t,this.startPosition=e;var n=this.getClosestBound(t);this.prevMovedHandleIndex=this.getBoundNeedMoving(t,n),this.setState({sHandle:this.prevMovedHandleIndex,recent:this.prevMovedHandleIndex});var r=a[this.prevMovedHandleIndex];if(t!==r){var i=A(a);i[this.prevMovedHandleIndex]=t,this.onChange({bounds:i})}},onEnd:function(e){var a=this.sHandle;this.removeDocumentEvents(),a||(this.dragTrack=!1),(a!==null||e)&&this.$emit("afterChange",this.bounds),this.setState({sHandle:null})},onMove:function(e,a,t,n){K(e);var r=this.$data,i=this.$props,s=i.max||100,l=i.min||0;if(t){var u=i.vertical?-a:a;u=i.reverse?-u:u;var c=s-Math.max.apply(Math,A(n)),v=l-Math.min.apply(Math,A(n)),g=Math.min(Math.max(u/(this.getSliderLength()/100),v),c),C=n.map(function(d){return Math.floor(Math.max(Math.min(d+g,s),l))});r.bounds.map(function(d,f){return d===C[f]}).some(function(d){return!d})&&this.onChange({bounds:C});return}var S=this.bounds,T=this.sHandle,F=this.calcValueByPos(a),b=S[T];F!==b&&this.moveTo(F)},onKeyboard:function(e){var a=this.$props,t=a.reverse,n=a.vertical,r=Pe(e,n,t);if(r){K(e);var i=this.bounds,s=this.sHandle,l=i[s===null?this.recent:s],u=r(l,this.$props),c=W({value:u,handle:s,bounds:i,props:this.$props});if(c===l)return;var v=!0;this.moveTo(c,v)}},getClosestBound:function(e){for(var a=this.bounds,t=0,n=1;n<a.length-1;n+=1)e>=a[n]&&(t=n);return Math.abs(a[t+1]-e)<Math.abs(a[t]-e)&&(t+=1),t},getBoundNeedMoving:function(e,a){var t=this.bounds,n=this.recent,r=a,i=t[a+1]===t[a];return i&&t[n]===t[a]&&(r=n),i&&e!==t[a+1]&&(r=e<t[a+1]?a:a+1),r},getLowerBound:function(){return this.bounds[0]},getUpperBound:function(){var e=this.bounds;return e[e.length-1]},getPoints:function(){var e=this.marks,a=this.step,t=this.min,n=this.max,r=this.internalPointsCache;if(!r||r.marks!==e||r.step!==a){var i=m({},e);if(a!==null)for(var s=t;s<=n;s+=a)i[s]=s;var l=Object.keys(i).map(parseFloat);l.sort(function(u,c){return u-c}),this.internalPointsCache={marks:e,step:a,points:l}}return this.internalPointsCache.points},moveTo:function(e,a){var t=this,n=A(this.bounds),r=this.sHandle,i=this.recent,s=r===null?i:r;n[s]=e;var l=s;this.$props.pushable!==!1?this.pushSurroundingHandles(n,l):this.$props.allowCross&&(n.sort(function(u,c){return u-c}),l=n.indexOf(e)),this.onChange({recent:l,sHandle:l,bounds:n}),a&&(this.$emit("afterChange",n),this.setState({},function(){t.handlesRefs[l].focus()}),this.onEnd())},pushSurroundingHandles:function(e,a){var t=e[a],n=this.pushable,r=Number(n),i=0;if(e[a+1]-t<r&&(i=1),t-e[a-1]<r&&(i=-1),i!==0){var s=a+i,l=i*(e[s]-t);this.pushHandle(e,s,i,r-l)||(e[a]=e[s]-i*r)}},pushHandle:function(e,a,t,n){for(var r=e[a],i=e[a];t*(i-r)<n;){if(!this.pushHandleOnePoint(e,a,t))return e[a]=r,!1;i=e[a]}return!0},pushHandleOnePoint:function(e,a,t){var n=this.getPoints(),r=n.indexOf(e[a]),i=r+t;if(i>=n.length||i<0)return!1;var s=a+t,l=n[i],u=this.pushable,c=Number(u),v=t*(e[s]-l);return this.pushHandle(e,s,t,c-v)?(e[a]=l,!0):!1},trimAlignValue:function(e){var a=this.sHandle,t=this.bounds;return W({value:e,handle:a,bounds:t,props:this.$props})},ensureValueNotConflict:function(e,a,t){var n=t.allowCross,r=t.pushable,i=this.$data||{},s=i.bounds;if(e=e===void 0?i.sHandle:e,r=Number(r),!n&&e!=null&&s!==void 0){if(e>0&&a<=s[e-1]+r)return s[e-1]+r;if(e<s.length-1&&a>=s[e+1]-r)return s[e+1]-r}return a},getTrack:function(e){var a=e.bounds,t=e.prefixCls,n=e.reverse,r=e.vertical,i=e.included,s=e.offsets,l=e.trackStyle;return a.slice(0,-1).map(function(u,c){var v,g=c+1,C=D((v={},k(v,"".concat(t,"-track"),!0),k(v,"".concat(t,"-track-").concat(g),!0),v));return w(ke,{class:C,vertical:r,reverse:n,included:i,offset:s[g-1],length:s[g]-s[g-1],style:l[c],key:g},null)})},renderSlider:function(){var e=this,a=this.sHandle,t=this.bounds,n=this.prefixCls,r=this.vertical,i=this.included,s=this.disabled,l=this.min,u=this.max,c=this.reverse,v=this.handle,g=this.defaultHandle,C=this.trackStyle,S=this.handleStyle,T=this.tabindex,F=this.ariaLabelGroupForHandles,b=this.ariaLabelledByGroupForHandles,d=this.ariaValueTextFormatterGroupForHandles,f=v||g,y=t.map(function(p){return e.calcOffset(p)}),x="".concat(n,"-handle"),V=t.map(function(p,h){var P,$=T[h]||0;(s||T[h]===null)&&($=null);var B=a===h;return f({class:D((P={},k(P,x,!0),k(P,"".concat(x,"-").concat(h+1),!0),k(P,"".concat(x,"-dragging"),B),P)),prefixCls:n,vertical:r,dragging:B,offset:y[h],value:p,index:h,tabindex:$,min:l,max:u,reverse:c,disabled:s,style:S[h],ref:function(H){return e.saveHandle(h,H)},onFocus:e.onFocus,onBlur:e.onBlur,ariaLabel:F[h],ariaLabelledBy:b[h],ariaValueTextFormatter:d[h]})});return{tracks:this.getTrack({bounds:t,prefixCls:n,reverse:c,vertical:r,included:i,offsets:y,trackStyle:C}),handles:V}}}});const vt=we(ct),ft=R({compatConfig:{MODE:3},name:"SliderTooltip",inheritAttrs:!1,props:Re(),setup:function(e,a){var t=a.attrs,n=a.slots,r=E(null),i=E(null);function s(){le.cancel(i.value),i.value=null}function l(){i.value=le(function(){var c;(c=r.value)===null||c===void 0||c.forcePopupAlign(),i.value=null})}var u=function(){s(),e.visible&&l()};return Z([function(){return e.visible},function(){return e.title}],function(){u()},{flush:"post",immediate:!0}),je(function(){u()}),re(function(){s()}),function(){return w(Ie,m(m({ref:r},e),t),n)}}});var ht=["value","dragging","index"],mt=["tooltipPrefixCls","range","id"],pt=function(e){return typeof e=="number"?e.toString():""},gt=function(){return{id:String,prefixCls:String,tooltipPrefixCls:String,range:{type:[Boolean,Object],default:void 0},reverse:{type:Boolean,default:void 0},min:Number,max:Number,step:{type:[Number,Object]},marks:{type:Object},dots:{type:Boolean,default:void 0},value:{type:[Number,Array]},defaultValue:{type:[Number,Array]},included:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},vertical:{type:Boolean,default:void 0},tipFormatter:{type:[Function,Object],default:function(){return pt}},tooltipVisible:{type:Boolean,default:void 0},tooltipPlacement:{type:String},getTooltipPopupContainer:{type:Function},autofocus:{type:Boolean,default:void 0},handleStyle:{type:[Object,Array]},trackStyle:{type:[Object,Array]},onChange:{type:Function},onAfterChange:{type:Function},onFocus:{type:Function},onBlur:{type:Function},"onUpdate:value":{type:Function}}},bt=R({compatConfig:{MODE:3},name:"ASlider",inheritAttrs:!1,props:gt(),slots:["mark"],setup:function(e,a){var t=a.attrs,n=a.slots,r=a.emit,i=a.expose,s=ne("slider",e),l=s.prefixCls,u=s.rootPrefixCls,c=s.direction,v=s.getPopupContainer,g=s.configProvider,C=ae(),S=E(),T=E({}),F=function(h,P){T.value[h]=P},b=z(function(){return e.tooltipPlacement?e.tooltipPlacement:e.vertical?c.value==="rtl"?"left":"right":"top"}),d=function(){var h;(h=S.value)===null||h===void 0||h.focus()},f=function(){var h;(h=S.value)===null||h===void 0||h.blur()},y=function(h){r("update:value",h),r("change",h),C.onFieldChange()},x=function(h){r("blur",h)};i({focus:d,blur:f});var V=function(h){var P=h.tooltipPrefixCls,$=h.info,B=$.value,L=$.dragging,H=$.index,_=Y($,ht),O=e.tipFormatter,N=e.tooltipVisible,G=e.getTooltipPopupContainer,q=O?T.value[H]||L:!1,U=N||N===void 0&&q;return w(ft,{prefixCls:P,title:O?O(B):"",visible:U,placement:b.value,transitionName:"".concat(u.value,"-zoom-down"),key:H,overlayClassName:"".concat(l.value,"-tooltip"),getPopupContainer:G||v.value},{default:function(){return[w(Ve,m(m({},_),{},{value:B,onMouseenter:function(){return F(H,!0)},onMouseleave:function(){return F(H,!1)}}),null)]}})};return function(){var p=e.tooltipPrefixCls,h=e.range,P=e.id,$=P===void 0?C.id.value:P,B=Y(e,mt),L=g.getPrefixCls("tooltip",p),H=D(t.class,k({},"".concat(l.value,"-rtl"),c.value==="rtl"));c.value==="rtl"&&!B.vertical&&(B.reverse=!B.reverse);var _;return pe(h)==="object"&&(_=h.draggableTrack),h?w(vt,m(m({},B),{},{step:B.step,draggableTrack:_,class:H,ref:S,handle:function(N){return V({tooltipPrefixCls:L,prefixCls:l.value,info:N})},prefixCls:l.value,onChange:y,onBlur:x}),{mark:n.mark}):w(ut,m(m({},B),{},{id:$,step:B.step,class:H,ref:S,handle:function(N){return V({tooltipPrefixCls:L,prefixCls:l.value,info:N})},prefixCls:l.value,onChange:y,onBlur:x}),{mark:n.mark})}}});const yt=Ge(bt);const xt={class:"num-input"},kt=R({__name:"numInput",props:Ue({min:{},max:{},step:{}},{modelValue:{}}),emits:["update:modelValue"],setup(o){const e=o,a=Ke(o,"modelValue");return(t,n)=>{const r=ze,i=yt;return We(),Xe("div",xt,[w(r,ue({value:a.value,"onUpdate:value":n[0]||(n[0]=s=>a.value=s)},e),null,16,["value"]),w(i,ue({value:a.value,"onUpdate:value":n[1]||(n[1]=s=>a.value=s)},e,{class:"slide"}),null,16,["value"])])}}});const Vt=Je(kt,[["__scopeId","data-v-55978858"]]),Mt=o=>{const e=[];return o.shiftKey&&e.push("Shift"),o.ctrlKey&&e.push("Ctrl"),o.metaKey&&e.push("Cmd"),(o.code.startsWith("Key")||o.code.startsWith("Digit"))&&e.push(o.code),o.key==="Escape"&&e.push("Esc"),e.join(" + ")};export{J as C,Vt as _,te as a,Mt as g};