index-358c6096.js 51 KB

12345
  1. import{bp as Le,bq as Mt,br as mn,r as W,bs as bn,bt as ot,bu as Vt,aJ as dt,bv as Dt,c as Q,n as q,q as ne,o as U,d as K,D as jt,Z as Oe,s as $,v as _t,e as Ve,bw as yn,x as H,h as De,j as d,I as Ye,G as xe,C as oe,t as G,i as te,aC as pn,u as zt,k as Nt,g as Pe,bx as Wt,by as wn,bz as Sn,F as je,bA as Ft,bB as qt,A as J,p as Xe,bC as Be,a as qe,m as et,bD as vt,J as Re,bE as xn,bF as Ht,bG as pt,z as Ge,l as Yt,bH as Cn,bI as On,bJ as kn,f as gt,bK as Xt,bo as ve,bL as Ut,bM as Kt,bN as Zt,bO as Tn,_ as Ie,bP as In,bQ as lt,bR as En,bS as Rn,bT as An,bU as wt,bV as Pn,bW as $n,X as st,bX as Bn,bn as Gt,L as Ln,bY as Mn,bZ as Vn,b_ as Jt,w as Dn,ah as jn,a9 as _n,U as Qt,b as zn,b$ as Nn,y as St,c0 as Wn,c1 as Fn,c2 as pe,c3 as qn,c4 as Hn,c5 as Yn,c6 as Xn,c7 as Un,ao as Kn,c8 as ke,aL as xt,c9 as Zn,N as Gn,Y as N,ca as re,cb as Jn,$ as Qn,bh as ea,aj as Ct}from"./index-13ca293b.js";function ta(e,t,n){let a=0;const r=e.scrollLeft,i=n===0?1:Math.round(n*1e3/16);function c(){e.scrollLeft+=(t-r)/i,++a<i&&Le(c)}c()}function na(e,t,n,a){let r=Mt(e);const i=r<t,c=n===0?1:Math.round(n*1e3/16),u=(t-r)/c;function l(){r+=u,(i&&r>t||!i&&r<t)&&(r=t),mn(e,r),i&&r<t||!i&&r>t?Le(l):a&&Le(a)}l()}function aa(){const e=W([]),t=[];return bn(()=>{e.value=[]}),[e,a=>(t[a]||(t[a]=r=>{e.value[a]=r}),t[a])]}function en(e,t){if(!ot||!window.IntersectionObserver)return;const n=new IntersectionObserver(i=>{t(i[0].intersectionRatio>0)},{root:document.body}),a=()=>{e.value&&n.observe(e.value)},r=()=>{e.value&&n.unobserve(e.value)};Vt(r),dt(r),Dt(a)}const[ra,ia]=Q("sticky"),oa={zIndex:q,position:ne("top"),container:Object,offsetTop:U(0),offsetBottom:U(0)};var la=K({name:ra,props:oa,emits:["scroll","change"],setup(e,{emit:t,slots:n}){const a=W(),r=jt(a),i=Oe({fixed:!1,width:0,height:0,transform:0}),c=$(()=>_t(e.position==="top"?e.offsetTop:e.offsetBottom)),u=$(()=>{const{fixed:f,height:b,width:y}=i;if(f)return{width:`${y}px`,height:`${b}px`}}),l=$(()=>{if(!i.fixed)return;const f=Ve(yn(e.zIndex),{width:`${i.width}px`,height:`${i.height}px`,[e.position]:`${c.value}px`});return i.transform&&(f.transform=`translate3d(0, ${i.transform}px, 0)`),f}),v=f=>t("scroll",{scrollTop:f,isFixed:i.fixed}),o=()=>{if(!a.value||Ye(a))return;const{container:f,position:b}=e,y=xe(a),p=Mt(window);if(i.width=y.width,i.height=y.height,b==="top")if(f){const w=xe(f),m=w.bottom-c.value-i.height;i.fixed=c.value>y.top&&w.bottom>0,i.transform=m<0?m:0}else i.fixed=c.value>y.top;else{const{clientHeight:w}=document.documentElement;if(f){const m=xe(f),A=w-m.top-c.value-i.height;i.fixed=w-c.value<y.bottom&&w>m.top,i.transform=A<0?-A:0}else i.fixed=w-c.value<y.bottom}v(p)};return H(()=>i.fixed,f=>t("change",f)),De("scroll",o,{target:r,passive:!0}),en(a,o),()=>{var f;return d("div",{ref:a,style:u.value},[d("div",{class:ia({fixed:i.fixed}),style:l.value},[(f=n.default)==null?void 0:f.call(n)])])}}});const sa=oe(la),[ca,Ot]=Q("tab");var ua=K({name:ca,props:{id:String,dot:Boolean,type:String,color:String,title:String,badge:q,shrink:Boolean,isActive:Boolean,disabled:Boolean,controls:String,scrollable:Boolean,activeColor:String,inactiveColor:String,showZeroBadge:G},setup(e,{slots:t}){const n=$(()=>{const r={},{type:i,color:c,disabled:u,isActive:l,activeColor:v,inactiveColor:o}=e;c&&i==="card"&&(r.borderColor=c,u||(l?r.backgroundColor=c:r.color=c));const b=l?v:o;return b&&(r.color=b),r}),a=()=>{const r=d("span",{class:Ot("text",{ellipsis:!e.scrollable})},[t.title?t.title():e.title]);return e.dot||te(e.badge)&&e.badge!==""?d(pn,{dot:e.dot,content:e.badge,showZero:e.showZeroBadge},{default:()=>[r]}):r};return()=>d("div",{id:e.id,role:"tab",class:[Ot([e.type,{grow:e.scrollable&&!e.shrink,shrink:e.shrink,active:e.isActive,disabled:e.disabled}])],style:n.value,tabindex:e.disabled?void 0:e.isActive?0:-1,"aria-selected":e.isActive,"aria-disabled":e.disabled||void 0,"aria-controls":e.controls},[a()])}});const[tn,ze]=Q("swipe"),fa={loop:G,width:q,height:q,vertical:Boolean,autoplay:U(0),duration:U(500),touchable:G,lazyRender:Boolean,initialSwipe:U(0),indicatorColor:String,showIndicators:G,stopPropagation:G},nn=Symbol(tn);var da=K({name:tn,props:fa,emits:["change","dragStart","dragEnd"],setup(e,{emit:t,slots:n}){const a=W(),r=W(),i=Oe({rect:null,width:0,height:0,offset:0,active:0,swiping:!1});let c=!1;const u=zt(),{children:l,linkChildren:v}=Nt(nn),o=$(()=>l.length),f=$(()=>i[e.vertical?"height":"width"]),b=$(()=>e.vertical?u.deltaY.value:u.deltaX.value),y=$(()=>i.rect?(e.vertical?i.rect.height:i.rect.width)-f.value*o.value:0),p=$(()=>f.value?Math.ceil(Math.abs(y.value)/f.value):o.value),w=$(()=>o.value*f.value),m=$(()=>(i.active+o.value)%o.value),A=$(()=>{const T=e.vertical?"vertical":"horizontal";return u.direction.value===T}),C=$(()=>{const T={transitionDuration:`${i.swiping?0:e.duration}ms`,transform:`translate${e.vertical?"Y":"X"}(${i.offset}px)`};if(f.value){const _=e.vertical?"height":"width",z=e.vertical?"width":"height";T[_]=`${w.value}px`,T[z]=e[z]?`${e[z]}px`:""}return T}),I=T=>{const{active:_}=i;return T?e.loop?qe(_+T,-1,o.value):qe(_+T,0,p.value):_},M=(T,_=0)=>{let z=T*f.value;e.loop||(z=Math.min(z,-y.value));let h=_-z;return e.loop||(h=qe(h,y.value,0)),h},E=({pace:T=0,offset:_=0,emitChange:z})=>{if(o.value<=1)return;const{active:h}=i,x=I(T),s=M(x,_);if(e.loop){if(l[0]&&s!==y.value){const O=s<y.value;l[0].setOffset(O?w.value:0)}if(l[o.value-1]&&s!==0){const O=s>0;l[o.value-1].setOffset(O?-w.value:0)}}i.active=x,i.offset=s,z&&x!==h&&t("change",m.value)},R=()=>{i.swiping=!0,i.active<=-1?E({pace:o.value}):i.active>=o.value&&E({pace:-o.value})},L=()=>{R(),u.reset(),Be(()=>{i.swiping=!1,E({pace:-1,emitChange:!0})})},j=()=>{R(),u.reset(),Be(()=>{i.swiping=!1,E({pace:1,emitChange:!0})})};let X;const g=()=>clearTimeout(X),S=()=>{g(),+e.autoplay>0&&o.value>1&&(X=setTimeout(()=>{j(),S()},+e.autoplay))},P=(T=+e.initialSwipe)=>{if(!a.value)return;const _=()=>{var z,h;if(!Ye(a)){const x={width:a.value.offsetWidth,height:a.value.offsetHeight};i.rect=x,i.width=+((z=e.width)!=null?z:x.width),i.height=+((h=e.height)!=null?h:x.height)}o.value&&(T=Math.min(o.value-1,T),T===-1&&(T=o.value-1)),i.active=T,i.swiping=!0,i.offset=M(T),l.forEach(x=>{x.setOffset(0)}),S()};Ye(a)?J().then(_):_()},D=()=>P(i.active);let F;const Z=T=>{!e.touchable||T.touches.length>1||(u.start(T),c=!1,F=Date.now(),g(),R())},ye=T=>{e.touchable&&i.swiping&&(u.move(T),A.value&&(!e.loop&&(i.active===0&&b.value>0||i.active===o.value-1&&b.value<0)||(Xe(T,e.stopPropagation),E({offset:b.value}),c||(t("dragStart",{index:m.value}),c=!0))))},ce=()=>{if(!e.touchable||!i.swiping)return;const T=Date.now()-F,_=b.value/T;if((Math.abs(_)>.25||Math.abs(b.value)>f.value/2)&&A.value){const h=e.vertical?u.offsetY.value:u.offsetX.value;let x=0;e.loop?x=h>0?b.value>0?-1:1:0:x=-Math[b.value>0?"ceil":"floor"](b.value/f.value),E({pace:x,emitChange:!0})}else b.value&&E({pace:0});c=!1,i.swiping=!1,t("dragEnd",{index:m.value}),S()},se=(T,_={})=>{R(),u.reset(),Be(()=>{let z;e.loop&&T===o.value?z=i.active===0?0:T:z=T%o.value,_.immediate?Be(()=>{i.swiping=!1}):i.swiping=!1,E({pace:z-i.active,emitChange:!0})})},me=(T,_)=>{const z=_===m.value,h=z?{backgroundColor:e.indicatorColor}:void 0;return d("i",{style:h,class:ze("indicator",{active:z})},null)},ue=()=>{if(n.indicator)return n.indicator({active:m.value,total:o.value});if(e.showIndicators&&o.value>1)return d("div",{class:ze("indicators",{vertical:e.vertical})},[Array(o.value).fill("").map(me)])};return Pe({prev:L,next:j,state:i,resize:D,swipeTo:se}),v({size:f,props:e,count:o,activeIndicator:m}),H(()=>e.initialSwipe,T=>P(+T)),H(o,()=>P(i.active)),H(()=>e.autoplay,S),H([Wt,wn],D),H(Sn(),T=>{T==="visible"?S():g()}),je(P),Ft(()=>P(i.active)),qt(()=>P(i.active)),Vt(g),dt(g),De("touchmove",ye,{target:r}),()=>{var T;return d("div",{ref:a,class:ze()},[d("div",{ref:r,style:C.value,class:ze("track",{vertical:e.vertical}),onTouchstartPassive:Z,onTouchend:ce,onTouchcancel:ce},[(T=n.default)==null?void 0:T.call(n)]),ue()])}}});const va=oe(da),[ga,kt]=Q("tabs");var ha=K({name:ga,props:{count:et(Number),inited:Boolean,animated:Boolean,duration:et(q),swipeable:Boolean,lazyRender:Boolean,currentIndex:et(Number)},emits:["change"],setup(e,{emit:t,slots:n}){const a=W(),r=u=>t("change",u),i=()=>{var u;const l=(u=n.default)==null?void 0:u.call(n);return e.animated||e.swipeable?d(va,{ref:a,loop:!1,class:kt("track"),duration:+e.duration*1e3,touchable:e.swipeable,lazyRender:e.lazyRender,showIndicators:!1,onChange:r},{default:()=>[l]}):l},c=u=>{const l=a.value;l&&l.state.active!==u&&l.swipeTo(u,{immediate:!e.inited})};return H(()=>e.currentIndex,c),je(()=>{c(e.currentIndex)}),Pe({swipeRef:a}),()=>d("div",{class:kt("content",{animated:e.animated||e.swipeable})},[i()])}});const[an,Ne]=Q("tabs"),ma={type:ne("line"),color:String,border:Boolean,sticky:Boolean,shrink:Boolean,active:U(0),duration:U(.3),animated:Boolean,ellipsis:G,swipeable:Boolean,scrollspy:Boolean,offsetTop:U(0),background:String,lazyRender:G,lineWidth:q,lineHeight:q,beforeChange:Function,swipeThreshold:U(5),titleActiveColor:String,titleInactiveColor:String},rn=Symbol(an);var ba=K({name:an,props:ma,emits:["change","scroll","rendered","clickTab","update:active"],setup(e,{emit:t,slots:n}){let a,r,i;const c=W(),u=W(),l=W(),v=W(),o=vt(),f=jt(c),[b,y]=aa(),{children:p,linkChildren:w}=Nt(rn),m=Oe({inited:!1,position:"",lineStyle:{},currentIndex:-1}),A=$(()=>p.length>+e.swipeThreshold||!e.ellipsis||e.shrink),C=$(()=>({borderColor:e.color,background:e.background})),I=(h,x)=>{var s;return(s=h.name)!=null?s:x},M=$(()=>{const h=p[m.currentIndex];if(h)return I(h,m.currentIndex)}),E=$(()=>_t(e.offsetTop)),R=$(()=>e.sticky?E.value+a:0),L=h=>{const x=u.value,s=b.value;if(!A.value||!x||!s||!s[m.currentIndex])return;const O=s[m.currentIndex].$el,k=O.offsetLeft-(x.offsetWidth-O.offsetWidth)/2;ta(x,k,h?0:+e.duration)},j=()=>{const h=m.inited;J(()=>{const x=b.value;if(!x||!x[m.currentIndex]||e.type!=="line"||Ye(c.value))return;const s=x[m.currentIndex].$el,{lineWidth:O,lineHeight:k}=e,B=s.offsetLeft+s.offsetWidth/2,V={width:Re(O),backgroundColor:e.color,transform:`translateX(${B}px) translateX(-50%)`};if(h&&(V.transitionDuration=`${e.duration}s`),te(k)){const Y=Re(k);V.height=Y,V.borderRadius=Y}m.lineStyle=V})},X=h=>{const x=h<m.currentIndex?-1:1;for(;h>=0&&h<p.length;){if(!p[h].disabled)return h;h+=x}},g=(h,x)=>{const s=X(h);if(!te(s))return;const O=p[s],k=I(O,s),B=m.currentIndex!==null;m.currentIndex!==s&&(m.currentIndex=s,x||L(),j()),k!==e.active&&(t("update:active",k),B&&t("change",k,O.title)),i&&!e.scrollspy&&Ht(Math.ceil(pt(c.value)-E.value))},S=(h,x)=>{const s=p.find((k,B)=>I(k,B)===h),O=s?p.indexOf(s):0;g(O,x)},P=(h=!1)=>{if(e.scrollspy){const x=p[m.currentIndex].$el;if(x&&f.value){const s=pt(x,f.value)-R.value;r=!0,na(f.value,s,h?0:+e.duration,()=>{r=!1})}}},D=(h,x,s)=>{const{title:O,disabled:k}=p[x],B=I(p[x],x);k||(Cn(e.beforeChange,{args:[B],done:()=>{g(x),P()}}),On(h)),t("clickTab",{name:B,title:O,event:s,disabled:k})},F=h=>{i=h.isFixed,t("scroll",h)},Z=h=>{J(()=>{S(h),P(!0)})},ye=()=>{for(let h=0;h<p.length;h++){const{top:x}=xe(p[h].$el);if(x>R.value)return h===0?0:h-1}return p.length-1},ce=()=>{if(e.scrollspy&&!r){const h=ye();g(h)}},se=()=>p.map((h,x)=>d(ua,Ge({key:h.id,id:`${o}-${x}`,ref:y(x),type:e.type,color:e.color,style:h.titleStyle,class:h.titleClass,shrink:e.shrink,isActive:x===m.currentIndex,controls:h.id,scrollable:A.value,activeColor:e.titleActiveColor,inactiveColor:e.titleInactiveColor,onClick:s=>D(h,x,s)},Yt(h,["dot","badge","title","disabled","showZeroBadge"])),{title:h.$slots.title})),me=()=>{if(e.type==="line"&&p.length)return d("div",{class:Ne("line"),style:m.lineStyle},null)},ue=()=>{var h,x,s;const{type:O,border:k,sticky:B}=e,V=[d("div",{ref:B?void 0:l,class:[Ne("wrap"),{[xn]:O==="line"&&k}]},[d("div",{ref:u,role:"tablist",class:Ne("nav",[O,{shrink:e.shrink,complete:A.value}]),style:C.value,"aria-orientation":"horizontal"},[(h=n["nav-left"])==null?void 0:h.call(n),se(),me(),(x=n["nav-right"])==null?void 0:x.call(n)])]),(s=n["nav-bottom"])==null?void 0:s.call(n)];return B?d("div",{ref:l},[V]):V};H([()=>e.color,Wt],j),H(()=>e.active,h=>{h!==M.value&&S(h)}),H(()=>p.length,()=>{m.inited&&(S(e.active),j(),J(()=>{L(!0)}))});const T=()=>{S(e.active,!0),J(()=>{m.inited=!0,l.value&&(a=xe(l.value).height),L(!0)})},_=(h,x)=>t("rendered",h,x);return Pe({resize:()=>{j(),J(()=>{var h,x;return(x=(h=v.value)==null?void 0:h.swipeRef.value)==null?void 0:x.resize()})},scrollTo:Z}),Ft(j),qt(j),Dt(T),en(c,j),De("scroll",ce,{target:f,passive:!0}),w({id:o,props:e,setLine:j,onRendered:_,currentName:M,scrollIntoView:L}),()=>d("div",{ref:c,class:Ne([e.type])},[e.sticky?d(sa,{container:c.value,offsetTop:E.value,onScroll:F},{default:()=>[ue()]}):ue(),d(ha,{ref:v,count:p.length,inited:m.inited,animated:e.animated,duration:e.duration,swipeable:e.swipeable,lazyRender:e.lazyRender,currentIndex:m.currentIndex,onChange:g},{default:()=>{var h;return[(h=n.default)==null?void 0:h.call(n)]}})])}});const on=Symbol(),Gr=()=>kn(on,null),[ya,pa]=Q("swipe-item");var wa=K({name:ya,setup(e,{slots:t}){let n;const a=Oe({offset:0,inited:!1,mounted:!1}),{parent:r,index:i}=gt(nn);if(!r)return;const c=$(()=>{const v={},{vertical:o}=r.props;return r.size.value&&(v[o?"height":"width"]=`${r.size.value}px`),a.offset&&(v.transform=`translate${o?"Y":"X"}(${a.offset}px)`),v}),u=$(()=>{const{loop:v,lazyRender:o}=r.props;if(!o||n)return!0;if(!a.mounted)return!1;const f=r.activeIndicator.value,b=r.count.value-1,y=f===0&&v?b:f-1,p=f===b&&v?0:f+1;return n=i.value===f||i.value===y||i.value===p,n}),l=v=>{a.offset=v};return je(()=>{J(()=>{a.mounted=!0})}),Pe({setOffset:l}),()=>{var v;return d("div",{class:pa(),style:c.value},[u.value?(v=t.default)==null?void 0:v.call(t):null])}}});const Sa=oe(wa),[xa,tt]=Q("tab"),Ca=Ve({},Xt,{dot:Boolean,name:q,badge:q,title:String,disabled:Boolean,titleClass:ve,titleStyle:[String,Object],showZeroBadge:G});var Oa=K({name:xa,props:Ca,setup(e,{slots:t}){const n=vt(),a=W(!1),{parent:r,index:i}=gt(rn);if(!r)return;const c=()=>{var o;return(o=e.name)!=null?o:i.value},u=()=>{a.value=!0,r.props.lazyRender&&J(()=>{r.onRendered(c(),e.title)})},l=$(()=>{const o=c()===r.currentName.value;return o&&!a.value&&u(),o}),v=W(!l.value);return H(l,o=>{o?v.value=!1:Be(()=>{v.value=!0})}),H(()=>e.title,()=>{r.setLine(),r.scrollIntoView()}),Ut(on,l),()=>{var o;const f=`${r.id}-${i.value}`,{animated:b,swipeable:y,scrollspy:p,lazyRender:w}=r.props;if(!t.default&&!b)return;const m=p||l.value;if(b||y)return d(Sa,{id:n,role:"tabpanel",class:tt("panel-wrapper",{inactive:v.value}),tabindex:l.value?0:-1,"aria-hidden":!l.value,"aria-labelledby":f},{default:()=>{var I;return[d("div",{class:tt("panel")},[(I=t.default)==null?void 0:I.call(t)])]}});const C=a.value||p||!w?(o=t.default)==null?void 0:o.call(t):null;return Pe({id:n}),Kt(d("div",{id:n,role:"tabpanel",class:tt("panel"),tabindex:m?0:-1,"aria-labelledby":f},[C]),[[Zt,m]])}}});const Jr=oe(Oa),Qr=oe(ba),[ka,Te]=Q("cell"),ln={tag:ne("div"),icon:String,size:String,title:q,value:q,label:q,center:Boolean,isLink:Boolean,border:G,required:Boolean,iconPrefix:String,valueClass:ve,labelClass:ve,titleClass:ve,titleStyle:null,arrowDirection:String,clickable:{type:Boolean,default:null}},Ta=Ve({},ln,Xt);var Ia=K({name:ka,props:Ta,setup(e,{slots:t}){const n=Tn(),a=()=>{if(t.label||te(e.label))return d("div",{class:[Te("label"),e.labelClass]},[t.label?t.label():e.label])},r=()=>{var l;if(t.title||te(e.title)){const v=(l=t.title)==null?void 0:l.call(t);return Array.isArray(v)&&v.length===0?void 0:d("div",{class:[Te("title"),e.titleClass],style:e.titleStyle},[v||d("span",null,[e.title]),a()])}},i=()=>{const l=t.value||t.default;if(l||te(e.value))return d("div",{class:[Te("value"),e.valueClass]},[l?l():d("span",null,[e.value])])},c=()=>{if(t.icon)return t.icon();if(e.icon)return d(Ie,{name:e.icon,class:Te("left-icon"),classPrefix:e.iconPrefix},null)},u=()=>{if(t["right-icon"])return t["right-icon"]();if(e.isLink){const l=e.arrowDirection&&e.arrowDirection!=="right"?`arrow-${e.arrowDirection}`:"arrow";return d(Ie,{name:l,class:Te("right-icon")},null)}};return()=>{var l;const{tag:v,size:o,center:f,border:b,isLink:y,required:p}=e,w=(l=e.clickable)!=null?l:y,m={center:f,required:p,clickable:w,borderless:!b};return o&&(m[o]=!!o),d(v,{class:Te(m),role:w?"button":void 0,tabindex:w?0:void 0,onClick:n},{default:()=>{var A;return[c(),r(),i(),u(),(A=t.extra)==null?void 0:A.call(t)]}})}}});const Ea=oe(Ia);function sn(e){return Array.isArray(e)?!e.length:e===0?!1:!e}function Ra(e,t){if(sn(e)){if(t.required)return!1;if(t.validateEmpty===!1)return!0}return!(t.pattern&&!t.pattern.test(String(e)))}function Aa(e,t){return new Promise(n=>{const a=t.validator(e,t);if(En(a)){a.then(n);return}n(a)})}function Tt(e,t){const{message:n}=t;return Rn(n)?n(e,t):n||""}function Pa({target:e}){e.composing=!0}function It({target:e}){e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}function $a(e,t){const n=In();e.style.height="auto";let a=e.scrollHeight;if(lt(t)){const{maxHeight:r,minHeight:i}=t;r!==void 0&&(a=Math.min(a,r)),i!==void 0&&(a=Math.max(a,i))}a&&(e.style.height=`${a}px`,Ht(n))}function Ba(e){return e==="number"?{type:"text",inputmode:"decimal"}:e==="digit"?{type:"tel",inputmode:"numeric"}:{type:e}}function fe(e){return[...e].length}function nt(e,t){return[...e].slice(0,t).join("")}const[La,ee]=Q("field"),Ma={id:String,name:String,leftIcon:String,rightIcon:String,autofocus:Boolean,clearable:Boolean,maxlength:q,formatter:Function,clearIcon:ne("clear"),modelValue:U(""),inputAlign:String,placeholder:String,autocomplete:String,errorMessage:String,enterkeyhint:String,clearTrigger:ne("focus"),formatTrigger:ne("onChange"),error:{type:Boolean,default:null},disabled:{type:Boolean,default:null},readonly:{type:Boolean,default:null}},Va=Ve({},ln,Ma,{rows:q,type:ne("text"),rules:Array,autosize:[Boolean,Object],labelWidth:q,labelClass:ve,labelAlign:String,showWordLimit:Boolean,errorMessageAlign:String,colon:{type:Boolean,default:null}});var Da=K({name:La,props:Va,emits:["blur","focus","clear","keypress","clickInput","endValidate","startValidate","clickLeftIcon","clickRightIcon","update:modelValue"],setup(e,{emit:t,slots:n}){const a=vt(),r=Oe({status:"unvalidated",focused:!1,validateMessage:""}),i=W(),c=W(),u=W(),{parent:l}=gt(An),v=()=>{var s;return String((s=e.modelValue)!=null?s:"")},o=s=>{if(te(e[s]))return e[s];if(l&&te(l.props[s]))return l.props[s]},f=$(()=>{const s=o("readonly");if(e.clearable&&!s){const O=v()!=="",k=e.clearTrigger==="always"||e.clearTrigger==="focus"&&r.focused;return O&&k}return!1}),b=$(()=>u.value&&n.input?u.value():e.modelValue),y=s=>s.reduce((O,k)=>O.then(()=>{if(r.status==="failed")return;let{value:B}=b;if(k.formatter&&(B=k.formatter(B,k)),!Ra(B,k)){r.status="failed",r.validateMessage=Tt(B,k);return}if(k.validator)return sn(B)&&k.validateEmpty===!1?void 0:Aa(B,k).then(V=>{V&&typeof V=="string"?(r.status="failed",r.validateMessage=V):V===!1&&(r.status="failed",r.validateMessage=Tt(B,k))})}),Promise.resolve()),p=()=>{r.status="unvalidated",r.validateMessage=""},w=()=>t("endValidate",{status:r.status,message:r.validateMessage}),m=(s=e.rules)=>new Promise(O=>{p(),s?(t("startValidate"),y(s).then(()=>{r.status==="failed"?(O({name:e.name,message:r.validateMessage}),w()):(r.status="passed",O(),w())})):O()}),A=s=>{if(l&&e.rules){const{validateTrigger:O}=l.props,k=wt(O).includes(s),B=e.rules.filter(V=>V.trigger?wt(V.trigger).includes(s):k);B.length&&m(B)}},C=s=>{var O;const{maxlength:k}=e;if(te(k)&&fe(s)>+k){const B=v();if(B&&fe(B)===+k)return B;const V=(O=i.value)==null?void 0:O.selectionEnd;if(r.focused&&V){const Y=[...s],ae=Y.length-+k;return Y.splice(V-ae,ae),Y.join("")}return nt(s,+k)}return s},I=(s,O="onChange")=>{const k=s;s=C(s);const B=fe(k)-fe(s);if(e.type==="number"||e.type==="digit"){const Y=e.type==="number";s=Pn(s,Y,Y)}let V=0;if(e.formatter&&O===e.formatTrigger){const{formatter:Y,maxlength:ae}=e;if(s=Y(s),te(ae)&&fe(s)>+ae&&(s=nt(s,+ae)),i.value&&r.focused){const{selectionEnd:_e}=i.value,yt=nt(k,_e);V=fe(Y(yt))-fe(yt)}}if(i.value&&i.value.value!==s)if(r.focused){let{selectionStart:Y,selectionEnd:ae}=i.value;if(i.value.value=s,te(Y)&&te(ae)){const _e=fe(s);B?(Y-=B,ae-=B):V&&(Y+=V,ae+=V),i.value.setSelectionRange(Math.min(Y,_e),Math.min(ae,_e))}}else i.value.value=s;s!==e.modelValue&&t("update:modelValue",s)},M=s=>{s.target.composing||I(s.target.value)},E=()=>{var s;return(s=i.value)==null?void 0:s.blur()},R=()=>{var s;return(s=i.value)==null?void 0:s.focus()},L=()=>{const s=i.value;e.type==="textarea"&&e.autosize&&s&&$a(s,e.autosize)},j=s=>{r.focused=!0,t("focus",s),J(L),o("readonly")&&E()},X=s=>{r.focused=!1,I(v(),"onBlur"),t("blur",s),!o("readonly")&&(A("onBlur"),J(L),Bn())},g=s=>t("clickInput",s),S=s=>t("clickLeftIcon",s),P=s=>t("clickRightIcon",s),D=s=>{Xe(s),t("update:modelValue",""),t("clear",s)},F=$(()=>{if(typeof e.error=="boolean")return e.error;if(l&&l.props.showError&&r.status==="failed")return!0}),Z=$(()=>{const s=o("labelWidth"),O=o("labelAlign");if(s&&O!=="top")return{width:Re(s)}}),ye=s=>{s.keyCode===13&&(!(l&&l.props.submitOnEnter)&&e.type!=="textarea"&&Xe(s),e.type==="search"&&E()),t("keypress",s)},ce=()=>e.id||`${a}-input`,se=()=>r.status,me=()=>{const s=ee("control",[o("inputAlign"),{error:F.value,custom:!!n.input,"min-height":e.type==="textarea"&&!e.autosize}]);if(n.input)return d("div",{class:s,onClick:g},[n.input()]);const O={id:ce(),ref:i,name:e.name,rows:e.rows!==void 0?+e.rows:void 0,class:s,disabled:o("disabled"),readonly:o("readonly"),autofocus:e.autofocus,placeholder:e.placeholder,autocomplete:e.autocomplete,enterkeyhint:e.enterkeyhint,"aria-labelledby":e.label?`${a}-label`:void 0,onBlur:X,onFocus:j,onInput:M,onClick:g,onChange:It,onKeypress:ye,onCompositionend:It,onCompositionstart:Pa};return e.type==="textarea"?d("textarea",O,null):d("input",Ge(Ba(e.type),O),null)},ue=()=>{const s=n["left-icon"];if(e.leftIcon||s)return d("div",{class:ee("left-icon"),onClick:S},[s?s():d(Ie,{name:e.leftIcon,classPrefix:e.iconPrefix},null)])},T=()=>{const s=n["right-icon"];if(e.rightIcon||s)return d("div",{class:ee("right-icon"),onClick:P},[s?s():d(Ie,{name:e.rightIcon,classPrefix:e.iconPrefix},null)])},_=()=>{if(e.showWordLimit&&e.maxlength){const s=fe(v());return d("div",{class:ee("word-limit")},[d("span",{class:ee("word-num")},[s]),st("/"),e.maxlength])}},z=()=>{if(l&&l.props.showErrorMessage===!1)return;const s=e.errorMessage||r.validateMessage;if(s){const O=n["error-message"],k=o("errorMessageAlign");return d("div",{class:ee("error-message",k)},[O?O({message:s}):s])}},h=()=>{const s=o("labelWidth"),O=o("labelAlign"),k=o("colon")?":":"";if(n.label)return[n.label(),k];if(e.label)return d("label",{id:`${a}-label`,for:ce(),style:O==="top"&&s?{width:Re(s)}:void 0},[e.label+k])},x=()=>[d("div",{class:ee("body")},[me(),f.value&&d(Ie,{ref:c,name:e.clearIcon,class:ee("clear")},null),T(),n.button&&d("div",{class:ee("button")},[n.button()])]),_(),z()];return Pe({blur:E,focus:R,validate:m,formValue:b,resetValidation:p,getValidationStatus:se}),Ut($n,{customValue:u,resetValidation:p,validateWithTrigger:A}),H(()=>e.modelValue,()=>{I(v()),p(),A("onChange"),J(L)}),je(()=>{I(v(),e.formatTrigger),J(L)}),De("touchstart",D,{target:$(()=>{var s;return(s=c.value)==null?void 0:s.$el})}),()=>{const s=o("disabled"),O=o("labelAlign"),k=ue(),B=()=>{const V=h();return O==="top"?[k,V].filter(Boolean):V||[]};return d(Ea,{size:e.size,class:ee({error:F.value,disabled:s,[`label-${O}`]:O}),center:e.center,border:e.border,isLink:e.isLink,clickable:e.clickable,titleStyle:Z.value,valueClass:ee("value"),titleClass:[ee("label",[O,{required:e.required}]),e.labelClass],arrowDirection:e.arrowDirection},{icon:k&&O!=="top"?()=>k:null,title:B,value:x,extra:n.extra})}}});const ei=oe(Da),[ja,at]=Q("switch"),_a={size:q,loading:Boolean,disabled:Boolean,modelValue:ve,activeColor:String,inactiveColor:String,activeValue:{type:ve,default:!0},inactiveValue:{type:ve,default:!1}};var za=K({name:ja,props:_a,emits:["change","update:modelValue"],setup(e,{emit:t,slots:n}){const a=()=>e.modelValue===e.activeValue,r=()=>{if(!e.disabled&&!e.loading){const c=a()?e.inactiveValue:e.activeValue;t("update:modelValue",c),t("change",c)}},i=()=>{if(e.loading){const c=a()?e.activeColor:e.inactiveColor;return d(Ln,{class:at("loading"),color:c},null)}if(n.node)return n.node()};return Gt(()=>e.modelValue),()=>{var c;const{size:u,loading:l,disabled:v,activeColor:o,inactiveColor:f}=e,b=a(),y={fontSize:Re(u),backgroundColor:b?o:f};return d("div",{role:"switch",class:at({on:b,loading:l,disabled:v}),style:y,tabindex:v?void 0:0,"aria-checked":b,onClick:r},[d("div",{class:at("node")},[i()]),(c=n.background)==null?void 0:c.call(n)])}}});const ti=oe(za),[Na,We]=Q("circle");let Wa=0;const Et=e=>Math.min(Math.max(+e,0),100);function Fa(e,t){const n=e?1:0;return`M ${t/2} ${t/2} m 0, -500 a 500, 500 0 1, ${n} 0, 1000 a 500, 500 0 1, ${n} 0, -1000`}const qa={text:String,size:q,fill:ne("none"),rate:U(100),speed:U(0),color:[String,Object],clockwise:G,layerColor:String,currentRate:Mn(0),strokeWidth:U(40),strokeLinecap:String,startPosition:ne("top")};var Ha=K({name:Na,props:qa,emits:["update:currentRate"],setup(e,{emit:t,slots:n}){const a=`van-circle-${Wa++}`,r=$(()=>+e.strokeWidth+1e3),i=$(()=>Fa(e.clockwise,r.value)),c=$(()=>{const b={top:0,right:90,bottom:180,left:270}[e.startPosition];if(b)return{transform:`rotate(${b}deg)`}});H(()=>e.rate,f=>{let b;const y=Date.now(),p=e.currentRate,w=Et(f),m=Math.abs((p-w)*1e3/+e.speed),A=()=>{const C=Date.now(),M=Math.min((C-y)/m,1)*(w-p)+p;t("update:currentRate",Et(parseFloat(M.toFixed(1)))),(w>p?M<w:M>w)&&(b=Le(A))};e.speed?(b&&Vn(b),b=Le(A)):t("update:currentRate",w)},{immediate:!0});const u=()=>{const{strokeWidth:b,currentRate:y,strokeLinecap:p}=e,w=3140*y/100,m=lt(e.color)?`url(#${a})`:e.color,A={stroke:m,strokeWidth:`${+b+1}px`,strokeLinecap:p,strokeDasharray:`${w}px 3140px`};return d("path",{d:i.value,style:A,class:We("hover"),stroke:m},null)},l=()=>{const f={fill:e.fill,stroke:e.layerColor,strokeWidth:`${e.strokeWidth}px`};return d("path",{class:We("layer"),style:f,d:i.value},null)},v=()=>{const{color:f}=e;if(!lt(f))return;const b=Object.keys(f).sort((y,p)=>parseFloat(y)-parseFloat(p)).map((y,p)=>d("stop",{key:p,offset:y,"stop-color":f[y]},null));return d("defs",null,[d("linearGradient",{id:a,x1:"100%",y1:"0%",x2:"0%",y2:"0%"},[b])])},o=()=>{if(n.default)return n.default();if(e.text)return d("div",{class:We("text")},[e.text])};return()=>d("div",{class:We(),style:Jt(e.size)},[d("svg",{viewBox:`0 0 ${r.value} ${r.value}`,style:c.value},[v(),l(),u()]),o()])}});const ni=oe(Ha);function le(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ht(e){var t=le(e).Element;return e instanceof t||e instanceof Element}function ie(e){var t=le(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function cn(e){if(typeof ShadowRoot>"u")return!1;var t=le(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var Ae=Math.round;function ct(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Ya(){return!/^((?!chrome|android).)*safari/i.test(ct())}function Ue(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var a=e.getBoundingClientRect(),r=1,i=1;t&&ie(e)&&(r=e.offsetWidth>0&&Ae(a.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Ae(a.height)/e.offsetHeight||1);var c=ht(e)?le(e):window,u=c.visualViewport,l=!Ya()&&n,v=(a.left+(l&&u?u.offsetLeft:0))/r,o=(a.top+(l&&u?u.offsetTop:0))/i,f=a.width/r,b=a.height/i;return{width:f,height:b,top:o,right:v+f,bottom:o+b,left:v,x:v,y:o}}function un(e){var t=le(e),n=t.pageXOffset,a=t.pageYOffset;return{scrollLeft:n,scrollTop:a}}function Xa(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Ua(e){return e===le(e)||!ie(e)?un(e):Xa(e)}function ge(e){return e?(e.nodeName||"").toLowerCase():null}function Je(e){return((ht(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ka(e){return Ue(Je(e)).left+un(e).scrollLeft}function he(e){return le(e).getComputedStyle(e)}function mt(e){var t=he(e),n=t.overflow,a=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+a)}function Za(e){var t=e.getBoundingClientRect(),n=Ae(t.width)/e.offsetWidth||1,a=Ae(t.height)/e.offsetHeight||1;return n!==1||a!==1}function Ga(e,t,n){n===void 0&&(n=!1);var a=ie(t),r=ie(t)&&Za(t),i=Je(t),c=Ue(e,r,n),u={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(a||!a&&!n)&&((ge(t)!=="body"||mt(i))&&(u=Ua(t)),ie(t)?(l=Ue(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=Ka(i))),{x:c.left+u.scrollLeft-l.x,y:c.top+u.scrollTop-l.y,width:c.width,height:c.height}}function Ja(e){var t=Ue(e),n=e.offsetWidth,a=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-a)<=1&&(a=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:a}}function bt(e){return ge(e)==="html"?e:e.assignedSlot||e.parentNode||(cn(e)?e.host:null)||Je(e)}function fn(e){return["html","body","#document"].indexOf(ge(e))>=0?e.ownerDocument.body:ie(e)&&mt(e)?e:fn(bt(e))}function He(e,t){var n;t===void 0&&(t=[]);var a=fn(e),r=a===((n=e.ownerDocument)==null?void 0:n.body),i=le(a),c=r?[i].concat(i.visualViewport||[],mt(a)?a:[]):a,u=t.concat(c);return r?u:u.concat(He(bt(c)))}function Qa(e){return["table","td","th"].indexOf(ge(e))>=0}function Rt(e){return!ie(e)||he(e).position==="fixed"?null:e.offsetParent}function er(e){var t=/firefox/i.test(ct()),n=/Trident/i.test(ct());if(n&&ie(e)){var a=he(e);if(a.position==="fixed")return null}var r=bt(e);for(cn(r)&&(r=r.host);ie(r)&&["html","body"].indexOf(ge(r))<0;){var i=he(r);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return r;r=r.parentNode}return null}function dn(e){for(var t=le(e),n=Rt(e);n&&Qa(n)&&he(n).position==="static";)n=Rt(n);return n&&(ge(n)==="html"||ge(n)==="body"&&he(n).position==="static")?t:n||er(e)||t}var Ee="top",Ke="bottom",Me="right",Ce="left",vn="auto",tr=[Ee,Ke,Me,Ce],gn="start",Ze="end",nr=[].concat(tr,[vn]).reduce(function(e,t){return e.concat([t,t+"-"+gn,t+"-"+Ze])},[]),ar="beforeRead",rr="read",ir="afterRead",or="beforeMain",lr="main",sr="afterMain",cr="beforeWrite",ur="write",fr="afterWrite",ut=[ar,rr,ir,or,lr,sr,cr,ur,fr];function dr(e){var t=new Map,n=new Set,a=[];e.forEach(function(i){t.set(i.name,i)});function r(i){n.add(i.name);var c=[].concat(i.requires||[],i.requiresIfExists||[]);c.forEach(function(u){if(!n.has(u)){var l=t.get(u);l&&r(l)}}),a.push(i)}return e.forEach(function(i){n.has(i.name)||r(i)}),a}function vr(e){var t=dr(e);return ut.reduce(function(n,a){return n.concat(t.filter(function(r){return r.phase===a}))},[])}function gr(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function be(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];return[].concat(n).reduce(function(r,i){return r.replace(/%s/,i)},e)}var we='Popper: modifier "%s" provided an invalid %s property, expected %s but got %s',hr='Popper: modifier "%s" requires "%s", but "%s" modifier is not available',At=["name","enabled","phase","fn","effect","requires","options"];function mr(e){e.forEach(function(t){[].concat(Object.keys(t),At).filter(function(n,a,r){return r.indexOf(n)===a}).forEach(function(n){switch(n){case"name":typeof t.name!="string"&&console.error(be(we,String(t.name),'"name"','"string"','"'+String(t.name)+'"'));break;case"enabled":typeof t.enabled!="boolean"&&console.error(be(we,t.name,'"enabled"','"boolean"','"'+String(t.enabled)+'"'));break;case"phase":ut.indexOf(t.phase)<0&&console.error(be(we,t.name,'"phase"',"either "+ut.join(", "),'"'+String(t.phase)+'"'));break;case"fn":typeof t.fn!="function"&&console.error(be(we,t.name,'"fn"','"function"','"'+String(t.fn)+'"'));break;case"effect":t.effect!=null&&typeof t.effect!="function"&&console.error(be(we,t.name,'"effect"','"function"','"'+String(t.fn)+'"'));break;case"requires":t.requires!=null&&!Array.isArray(t.requires)&&console.error(be(we,t.name,'"requires"','"array"','"'+String(t.requires)+'"'));break;case"requiresIfExists":Array.isArray(t.requiresIfExists)||console.error(be(we,t.name,'"requiresIfExists"','"array"','"'+String(t.requiresIfExists)+'"'));break;case"options":case"data":break;default:console.error('PopperJS: an invalid property has been provided to the "'+t.name+'" modifier, valid properties are '+At.map(function(a){return'"'+a+'"'}).join(", ")+'; but "'+n+'" was provided.')}t.requires&&t.requires.forEach(function(a){e.find(function(r){return r.name===a})==null&&console.error(be(hr,String(t.name),a,a))})})})}function br(e,t){var n=new Set;return e.filter(function(a){var r=t(a);if(!n.has(r))return n.add(r),!0})}function Qe(e){return e.split("-")[0]}function yr(e){var t=e.reduce(function(n,a){var r=n[a.name];return n[a.name]=r?Object.assign({},r,a,{options:Object.assign({},r.options,a.options),data:Object.assign({},r.data,a.data)}):a,n},{});return Object.keys(t).map(function(n){return t[n]})}function hn(e){return e.split("-")[1]}function pr(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function wr(e){var t=e.reference,n=e.element,a=e.placement,r=a?Qe(a):null,i=a?hn(a):null,c=t.x+t.width/2-n.width/2,u=t.y+t.height/2-n.height/2,l;switch(r){case Ee:l={x:c,y:t.y-n.height};break;case Ke:l={x:c,y:t.y+t.height};break;case Me:l={x:t.x+t.width,y:u};break;case Ce:l={x:t.x-n.width,y:u};break;default:l={x:t.x,y:t.y}}var v=r?pr(r):null;if(v!=null){var o=v==="y"?"height":"width";switch(i){case gn:l[v]=l[v]-(t[o]/2-n[o]/2);break;case Ze:l[v]=l[v]+(t[o]/2-n[o]/2);break}}return l}var Pt="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",Sr="Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.",$t={placement:"bottom",modifiers:[],strategy:"absolute"};function Bt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(a){return!(a&&typeof a.getBoundingClientRect=="function")})}function xr(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,a=n===void 0?[]:n,r=t.defaultOptions,i=r===void 0?$t:r;return function(u,l,v){v===void 0&&(v=i);var o={placement:"bottom",orderedModifiers:[],options:Object.assign({},$t,i),modifiersData:{},elements:{reference:u,popper:l},attributes:{},styles:{}},f=[],b=!1,y={state:o,setOptions:function(A){var C=typeof A=="function"?A(o.options):A;w(),o.options=Object.assign({},i,o.options,C),o.scrollParents={reference:ht(u)?He(u):u.contextElement?He(u.contextElement):[],popper:He(l)};var I=vr(yr([].concat(a,o.options.modifiers)));o.orderedModifiers=I.filter(function(S){return S.enabled});{var M=br([].concat(I,o.options.modifiers),function(S){var P=S.name;return P});if(mr(M),Qe(o.options.placement)===vn){var E=o.orderedModifiers.find(function(S){var P=S.name;return P==="flip"});E||console.error(['Popper: "auto" placements require the "flip" modifier be',"present and enabled to work."].join(" "))}var R=he(l),L=R.marginTop,j=R.marginRight,X=R.marginBottom,g=R.marginLeft;[L,j,X,g].some(function(S){return parseFloat(S)})&&console.warn(['Popper: CSS "margin" styles cannot be used to apply padding',"between the popper and its reference element or boundary.","To replicate margin, use the `offset` modifier, as well as","the `padding` option in the `preventOverflow` and `flip`","modifiers."].join(" "))}return p(),y.update()},forceUpdate:function(){if(!b){var A=o.elements,C=A.reference,I=A.popper;if(!Bt(C,I)){console.error(Pt);return}o.rects={reference:Ga(C,dn(I),o.options.strategy==="fixed"),popper:Ja(I)},o.reset=!1,o.placement=o.options.placement,o.orderedModifiers.forEach(function(S){return o.modifiersData[S.name]=Object.assign({},S.data)});for(var M=0,E=0;E<o.orderedModifiers.length;E++){if(M+=1,M>100){console.error(Sr);break}if(o.reset===!0){o.reset=!1,E=-1;continue}var R=o.orderedModifiers[E],L=R.fn,j=R.options,X=j===void 0?{}:j,g=R.name;typeof L=="function"&&(o=L({state:o,options:X,name:g,instance:y})||o)}}},update:gr(function(){return new Promise(function(m){y.forceUpdate(),m(o)})}),destroy:function(){w(),b=!0}};if(!Bt(u,l))return console.error(Pt),y;y.setOptions(v).then(function(m){!b&&v.onFirstUpdate&&v.onFirstUpdate(m)});function p(){o.orderedModifiers.forEach(function(m){var A=m.name,C=m.options,I=C===void 0?{}:C,M=m.effect;if(typeof M=="function"){var E=M({state:o,name:A,instance:y,options:I}),R=function(){};f.push(E||R)}})}function w(){f.forEach(function(m){return m()}),f=[]}return y}}var Fe={passive:!0};function Cr(e){var t=e.state,n=e.instance,a=e.options,r=a.scroll,i=r===void 0?!0:r,c=a.resize,u=c===void 0?!0:c,l=le(t.elements.popper),v=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&v.forEach(function(o){o.addEventListener("scroll",n.update,Fe)}),u&&l.addEventListener("resize",n.update,Fe),function(){i&&v.forEach(function(o){o.removeEventListener("scroll",n.update,Fe)}),u&&l.removeEventListener("resize",n.update,Fe)}}var Or={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Cr,data:{}};function kr(e){var t=e.state,n=e.name;t.modifiersData[n]=wr({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var Tr={name:"popperOffsets",enabled:!0,phase:"read",fn:kr,data:{}},Ir={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Er(e){var t=e.x,n=e.y,a=window,r=a.devicePixelRatio||1;return{x:Ae(t*r)/r||0,y:Ae(n*r)/r||0}}function Lt(e){var t,n=e.popper,a=e.popperRect,r=e.placement,i=e.variation,c=e.offsets,u=e.position,l=e.gpuAcceleration,v=e.adaptive,o=e.roundOffsets,f=e.isFixed,b=c.x,y=b===void 0?0:b,p=c.y,w=p===void 0?0:p,m=typeof o=="function"?o({x:y,y:w}):{x:y,y:w};y=m.x,w=m.y;var A=c.hasOwnProperty("x"),C=c.hasOwnProperty("y"),I=Ce,M=Ee,E=window;if(v){var R=dn(n),L="clientHeight",j="clientWidth";if(R===le(n)&&(R=Je(n),he(R).position!=="static"&&u==="absolute"&&(L="scrollHeight",j="scrollWidth")),R=R,r===Ee||(r===Ce||r===Me)&&i===Ze){M=Ke;var X=f&&R===E&&E.visualViewport?E.visualViewport.height:R[L];w-=X-a.height,w*=l?1:-1}if(r===Ce||(r===Ee||r===Ke)&&i===Ze){I=Me;var g=f&&R===E&&E.visualViewport?E.visualViewport.width:R[j];y-=g-a.width,y*=l?1:-1}}var S=Object.assign({position:u},v&&Ir),P=o===!0?Er({x:y,y:w}):{x:y,y:w};if(y=P.x,w=P.y,l){var D;return Object.assign({},S,(D={},D[M]=C?"0":"",D[I]=A?"0":"",D.transform=(E.devicePixelRatio||1)<=1?"translate("+y+"px, "+w+"px)":"translate3d("+y+"px, "+w+"px, 0)",D))}return Object.assign({},S,(t={},t[M]=C?w+"px":"",t[I]=A?y+"px":"",t.transform="",t))}function Rr(e){var t=e.state,n=e.options,a=n.gpuAcceleration,r=a===void 0?!0:a,i=n.adaptive,c=i===void 0?!0:i,u=n.roundOffsets,l=u===void 0?!0:u;{var v=he(t.elements.popper).transitionProperty||"";c&&["transform","top","right","bottom","left"].some(function(f){return v.indexOf(f)>=0})&&console.warn(["Popper: Detected CSS transitions on at least one of the following",'CSS properties: "transform", "top", "right", "bottom", "left".',`
  2. `,'Disable the "computeStyles" modifier\'s `adaptive` option to allow',"for smooth transitions, or remove these properties from the CSS","transition declaration on the popper element if only transitioning","opacity or background-color for example.",`
  3. `,"We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "))}var o={placement:Qe(t.placement),variation:hn(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Lt(Object.assign({},o,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:c,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Lt(Object.assign({},o,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var Ar={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Rr,data:{}};function Pr(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var a=t.styles[n]||{},r=t.attributes[n]||{},i=t.elements[n];!ie(i)||!ge(i)||(Object.assign(i.style,a),Object.keys(r).forEach(function(c){var u=r[c];u===!1?i.removeAttribute(c):i.setAttribute(c,u===!0?"":u)}))})}function $r(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(a){var r=t.elements[a],i=t.attributes[a]||{},c=Object.keys(t.styles.hasOwnProperty(a)?t.styles[a]:n[a]),u=c.reduce(function(l,v){return l[v]="",l},{});!ie(r)||!ge(r)||(Object.assign(r.style,u),Object.keys(i).forEach(function(l){r.removeAttribute(l)}))})}}var Br={name:"applyStyles",enabled:!0,phase:"write",fn:Pr,effect:$r,requires:["computeStyles"]},Lr=[Or,Tr,Ar,Br],Mr=xr({defaultModifiers:Lr});function Vr(e,t,n){var a=Qe(e),r=[Ce,Ee].indexOf(a)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,c=i[0],u=i[1];return c=c||0,u=(u||0)*r,[Ce,Me].indexOf(a)>=0?{x:u,y:c}:{x:c,y:u}}function Dr(e){var t=e.state,n=e.options,a=e.name,r=n.offset,i=r===void 0?[0,0]:r,c=nr.reduce(function(o,f){return o[f]=Vr(f,t.rects,i),o},{}),u=c[t.placement],l=u.x,v=u.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=v),t.modifiersData[a]=c}var jr={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Dr};const _r=(e,t)=>{const n=W(e());return H(e,a=>{a!==n.value&&(n.value=a)}),H(n,a=>{a!==e()&&t(a)}),n},[zr,Se]=Q("popover"),Nr=["overlay","duration","teleport","overlayStyle","overlayClass","closeOnClickOverlay"],Wr={show:Boolean,theme:ne("light"),overlay:Boolean,actions:zn(),trigger:ne("click"),duration:q,showArrow:G,placement:ne("bottom"),iconPrefix:String,overlayClass:ve,overlayStyle:Object,closeOnClickAction:G,closeOnClickOverlay:G,closeOnClickOutside:G,offset:{type:Array,default:()=>[0,8]},teleport:{type:[String,Object],default:"body"}};var Fr=K({name:zr,props:Wr,emits:["select","touchstart","update:show"],setup(e,{emit:t,slots:n,attrs:a}){let r;const i=W(),c=W(),u=W(),l=_r(()=>e.show,C=>t("update:show",C)),v=()=>({placement:e.placement,modifiers:[{name:"computeStyles",options:{adaptive:!1,gpuAcceleration:!1}},Ve({},jr,{options:{offset:e.offset}})]}),o=()=>c.value&&u.value?Mr(c.value,u.value.popupRef.value,v()):null,f=()=>{J(()=>{l.value&&(r?r.setOptions(v()):(r=o(),ot&&(window.addEventListener("animationend",f),window.addEventListener("transitionend",f))))})},b=C=>{l.value=C},y=()=>{e.trigger==="click"&&(l.value=!l.value)},p=(C,I)=>{C.disabled||(t("select",C,I),e.closeOnClickAction&&(l.value=!1))},w=()=>{l.value&&e.closeOnClickOutside&&(!e.overlay||e.closeOnClickOverlay)&&(l.value=!1)},m=(C,I)=>n.action?n.action({action:C,index:I}):[C.icon&&d(Ie,{name:C.icon,classPrefix:e.iconPrefix,class:Se("action-icon")},null),d("div",{class:[Se("action-text"),Nn]},[C.text])],A=(C,I)=>{const{icon:M,color:E,disabled:R,className:L}=C;return d("div",{role:"menuitem",class:[Se("action",{disabled:R,"with-icon":M}),L],style:{color:E},tabindex:R?void 0:0,"aria-disabled":R||void 0,onClick:()=>p(C,I)},[m(C,I)])};return je(()=>{f(),Dn(()=>{var C;i.value=(C=u.value)==null?void 0:C.popupRef.value})}),dt(()=>{r&&(ot&&(window.removeEventListener("animationend",f),window.removeEventListener("transitionend",f)),r.destroy(),r=null)}),H(()=>[l.value,e.offset,e.placement],f),jn([c,i],w,{eventName:"touchstart"}),()=>{var C;return d(Qt,null,[d("span",{ref:c,class:Se("wrapper"),onClick:y},[(C=n.reference)==null?void 0:C.call(n)]),d(_n,Ge({ref:u,show:l.value,class:Se([e.theme]),position:"",transition:"van-popover-zoom",lockScroll:!1,"onUpdate:show":b},a,Yt(e,Nr)),{default:()=>[e.showArrow&&d("div",{class:Se("arrow")},null),d("div",{role:"menu",class:Se("content")},[n.default?n.default():e.actions.map(A)])]})])}}});const ai=oe(Fr),[qr,$e]=Q("slider"),Hr={min:U(0),max:U(100),step:U(1),range:Boolean,reverse:Boolean,disabled:Boolean,readonly:Boolean,vertical:Boolean,barHeight:q,buttonSize:q,activeColor:String,inactiveColor:String,modelValue:{type:[Number,Array],default:0}};var Yr=K({name:qr,props:Hr,emits:["change","dragEnd","dragStart","update:modelValue"],setup(e,{emit:t,slots:n}){let a,r,i;const c=W(),u=[W(),W()],l=W(),v=zt(),o=$(()=>Number(e.max)-Number(e.min)),f=$(()=>{const g=e.vertical?"width":"height";return{background:e.inactiveColor,[g]:Re(e.barHeight)}}),b=g=>e.range&&Array.isArray(g),y=()=>{const{modelValue:g,min:S}=e;return b(g)?`${(g[1]-g[0])*100/o.value}%`:`${(g-Number(S))*100/o.value}%`},p=()=>{const{modelValue:g,min:S}=e;return b(g)?`${(g[0]-Number(S))*100/o.value}%`:"0%"},w=$(()=>{const S={[e.vertical?"height":"width"]:y(),background:e.activeColor};l.value&&(S.transition="none");const P=()=>e.vertical?e.reverse?"bottom":"top":e.reverse?"right":"left";return S[P()]=p(),S}),m=g=>{const S=+e.min,P=+e.max,D=+e.step;g=qe(g,S,P);const F=Math.round((g-S)/D)*D;return Fn(S,F)},A=g=>{var S,P;const D=(S=g[0])!=null?S:Number(e.min),F=(P=g[1])!=null?P:Number(e.max);return D>F?[F,D]:[D,F]},C=(g,S)=>{b(g)?g=A(g).map(m):g=m(g),St(g,e.modelValue)||t("update:modelValue",g),S&&!St(g,i)&&t("change",g)},I=g=>{if(g.stopPropagation(),e.disabled||e.readonly)return;const{min:S,reverse:P,vertical:D,modelValue:F}=e,Z=xe(c),ye=()=>D?P?Z.bottom-g.clientY:g.clientY-Z.top:P?Z.right-g.clientX:g.clientX-Z.left,ce=D?Z.height:Z.width,se=Number(S)+ye()/ce*o.value;if(b(F)){const[me,ue]=F,T=(me+ue)/2;se<=T?C([se,ue],!0):C([me,se],!0)}else C(se,!0)},M=g=>{e.disabled||e.readonly||(v.start(g),r=e.modelValue,b(r)?i=r.map(m):i=m(r),l.value="start")},E=g=>{if(e.disabled||e.readonly)return;l.value==="start"&&t("dragStart",g),Xe(g,!0),v.move(g),l.value="dragging";const S=xe(c),P=e.vertical?v.deltaY.value:v.deltaX.value,D=e.vertical?S.height:S.width;let F=P/D*o.value;if(e.reverse&&(F=-F),b(i)){const Z=e.reverse?1-a:a;r[Z]=i[Z]+F}else r=i+F;C(r)},R=g=>{e.disabled||e.readonly||(l.value==="dragging"&&(C(r,!0),t("dragEnd",g)),l.value="")},L=g=>typeof g=="number"?$e("button-wrapper",["left","right"][g]):$e("button-wrapper",e.reverse?"left":"right"),j=(g,S)=>{if(typeof S=="number"){const P=n[S===0?"left-button":"right-button"];if(P)return P({value:g})}return n.button?n.button({value:g}):d("div",{class:$e("button"),style:Jt(e.buttonSize)},null)},X=g=>{const S=typeof g=="number"?e.modelValue[g]:e.modelValue;return d("div",{ref:u[g!=null?g:0],role:"slider",class:L(g),tabindex:e.disabled?void 0:0,"aria-valuemin":e.min,"aria-valuenow":S,"aria-valuemax":e.max,"aria-disabled":e.disabled||void 0,"aria-readonly":e.readonly||void 0,"aria-orientation":e.vertical?"vertical":"horizontal",onTouchstartPassive:P=>{typeof g=="number"&&(a=g),M(P)},onTouchend:R,onTouchcancel:R,onClick:Wn},[j(S,g)])};return C(e.modelValue),Gt(()=>e.modelValue),u.forEach(g=>{De("touchmove",E,{target:g})}),()=>d("div",{ref:c,style:f.value,class:$e({vertical:e.vertical,disabled:e.disabled}),onClick:I},[d("div",{class:$e("bar"),style:w.value},[e.range?[X(0),X(1)]:X()])])}});const ri=oe(Yr);function Xr(e){return["top","bottom","right","left","center"].includes(e)}var Ur={show:{type:Boolean,default:!1},position:{type:String,default:"center",validator:Xr},transition:{type:String},overlay:{type:Boolean,default:!0},overlayClass:{type:String},overlayStyle:{type:Object},lockScroll:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0},defaultStyle:{type:Boolean,default:!0},teleport:{type:String},onOpen:pe(),onOpened:pe(),onClose:pe(),onClosed:pe(),onClickOverlay:pe(),"onUpdate:show":pe(),onRouteChange:pe()};function ft(){return ft=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},ft.apply(this,arguments)}function Kr(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Kn(e)}var{n:de,classes:rt}=Zn("popup");const it=K({name:"VarPopup",inheritAttrs:!1,props:Ur,setup(e,t){var{slots:n,attrs:a}=t,{zIndex:r}=qn(()=>e.show,3),{disabled:i}=Hn(),c=()=>{var{closeOnClickOverlay:o,onClickOverlay:f}=e;ke(f),o&&ke(e["onUpdate:show"],!1)};Yn(()=>e.show,()=>e.lockScroll),H(()=>e.show,o=>{o?ke(e.onOpen):ke(e.onClose)}),Xn(()=>ke(e.onRouteChange));var u=()=>{var{overlayClass:o="",overlayStyle:f}=e;return d("div",{class:rt(de("overlay"),o),style:ft({zIndex:r.value-1},f),onClick:c},null)},l=()=>d("div",Ge({class:rt(de("content"),de("--"+e.position),[e.defaultStyle,de("--content-background-color")],[e.defaultStyle,de("$-elevation--3")]),style:{zIndex:r.value}},a),[ke(n.default)]),v=()=>{var{onOpened:o,onClosed:f,show:b,overlay:y,transition:p,position:w}=e;return d(xt,{name:de("$-fade"),onAfterEnter:o,onAfterLeave:f},{default:()=>[Kt(d("div",{class:rt(de("$--box"),de()),style:{zIndex:r.value-2}},[y&&u(),d(xt,{name:p||de("$-pop-"+w)},{default:()=>[b&&l()]})]),[[Zt,b]])]})};return()=>{var{teleport:o}=e;if(o){var f;return d(Un,{to:o,disabled:i.value},Kr(f=v())?f:{default:()=>[f]})}return v()}}});it.install=function(e){e.component(it.name,it)};const ii=K({name:"fingering",emits:["open"],setup(e,{emit:t,expose:n}){const a=Oe({relationshipIndex:0,subject:null,delay:0}),r=async()=>{const l=N.fingeringInfo.name==="hulusi-flute"?"musicDetail":"";a.subject=await Jn(N.fingeringInfo.name,l),console.log("🚀 ~ fingerData.subject:",a.subject)};Gn(()=>{r()});const i=$(()=>{var l;return((l=N.times[N.activeNoteIndex])==null?void 0:l.realKey)||-1}),c=$(()=>["baroque-recorder","piccolo","ocarina","whistling"].includes(N.fingeringInfo.name)),u=()=>{if(N.modeType==="evaluating"&&Qn.startBegin||N.modeType==="follow"&&ea.start)return;const l=Date.now();if(l-a.delay<300){t("open");return}a.delay=l};return n({doubeClick:u}),()=>{var f,b,y,p,w,m,A,C;const l=((b=(f=a.subject)==null?void 0:f.relationship)==null?void 0:b[i.value])||[],v=Array.isArray(l[1])?l[a.relationshipIndex]:l,o=Array.isArray(l[1]);return d(Qt,null,[N.fingeringInfo.direction==="transverse"?d("div",{onClick:()=>u(),class:[re.fingeringContainer]},[d("div",{class:re.imgs},[d("img",{class:"driver-7",src:(p=(y=a.subject)==null?void 0:y.json)==null?void 0:p.full},null),v.map((I,M)=>{var R,L;const E=typeof I=="string"?I.replace("active-",""):String(I);return d("img",{"data-index":E,src:(L=(R=a.subject)==null?void 0:R.json)==null?void 0:L[E]},null)})]),N.fingeringInfo.hasTizhi&&d("div",{class:[re.tizhi,o&&re.canDisplay],onClick:()=>a.relationshipIndex=a.relationshipIndex===0?1:0},[st("替指")])]):d("div",{onClick:()=>u(),class:[re.fingeringContainer,re.vertical,N.fingeringInfo.name,N.fingeringInfo.name==="hulusi-flute"?re.hulusiTop:""]},[d("div",{class:re.imgs},[d("img",{class:"driver-7",src:c.value?(m=(w=a.subject)==null?void 0:w.json)==null?void 0:m.fullSpe:(C=(A=a.subject)==null?void 0:A.json)==null?void 0:C.full},null),v.map((I,M)=>{var R,L;const E=typeof I=="string"?I.replace("active-",""):String(I);return d("img",{"data-index":E,src:(L=(R=a.subject)==null?void 0:R.json)==null?void 0:L[E]},null)})]),N.fingeringInfo.hasTizhi&&d("div",{style:{display:N.fingeringInfo.disabledFinger?"none":""},class:re.rightContent},[d("div",{class:[re.tizhi,o&&re.canDisplay],onClick:()=>a.relationshipIndex=a.relationshipIndex===0?1:0},[st("替指")])])])])}}}),oi=K({name:"measureSpeed",setup(){const e=W(!1),t=Oe({speed:N.speed,originSpeed:N.originSpeed});return H(()=>N.section.length,()=>{if(N.modeType==="practise"){if(!e.value&&N.section.length===2){e.value=!0,t.speed=N.speed;const n=N.section[0].beatSpeed;N.originSpeed=n,Ct(n)}e.value&&N.section.length===0&&(e.value=!1,N.originSpeed=t.originSpeed,Ct(t.speed))}}),()=>d("div",null,null)}});export{Ea as C,ei as F,oi as M,ai as P,va as S,Qr as T,Jr as a,Sa as b,ri as c,ti as d,it as e,ni as f,ii as g,Gr as u};