You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
18 KiB

import{c as U,f as le,e as W,X as he,n as z,Y as X,Z as oe,T as ot,D as ye,u as ee,O as ie,j as Ne,H as Ie,ae as Me,aa as be,ab as De,af as it,i as ct,ag as Ae,m as xe,A as p,a8 as pe,ah as we,y as st,W as ge,x as q,s as ze,v as rt,w as ce,t as J,k as Ce,r as ut,h as Oe,o as dt,K as ft,ai as Be,a4 as vt,G as mt,d as ht,V as bt,p as Q,a7 as de,aj as gt}from"./index-f3701452.js";import{L as Tt}from"./index-1e934f0e.js";import{d as F,r as O,f as B,G as Ve,b as m,O as _,aG as yt,ej as xt,b3 as wt,q as Le,J as V,P as Ct,aH as St,D as kt,x as It,gr as Ot,a9 as Bt,p as Rt,s as $t,v as _t,aP as Ue,bb as Pt}from"./index-f4658ae7.js";import{u as Fe}from"./index-9d7cf9bc.js";import{a as Ht,r as Et}from"./use-route-96578f25.js";import{a as Nt,S as Mt}from"./index-60cfaf0c.js";const[Dt,L,Re]=U("picker"),Ke=e=>e.find(n=>!n.disabled)||e[0];function At(e,n){const t=e[0];if(t){if(Array.isArray(t))return"multiple";if(n.children in t)return"cascade"}return"default"}function ae(e,n){n=he(n,0,e.length);for(let t=n;t<e.length;t++)if(!e[t].disabled)return t;for(let t=n-1;t>=0;t--)if(!e[t].disabled)return t;return 0}const $e=(e,n,t)=>n!==void 0&&!!e.find(l=>l[t.value]===n);function Te(e,n,t){const l=e.findIndex(a=>a[t.value]===n),i=ae(e,l);return e[i]}function pt(e,n,t){const l=[];let i={[n.children]:e},a=0;for(;i&&i[n.children];){const s=i[n.children],d=t.value[a];if(i=le(d)?Te(s,d,n):void 0,!i&&s.length){const u=Ke(s)[n.value];i=Te(s,u,n)}a++,l.push(s)}return l}function zt(e){const{transform:n}=window.getComputedStyle(e),t=n.slice(7,n.length-1).split(", ")[5];return Number(t)}function Vt(e){return W({text:"text",value:"value",children:"children"},e)}const _e=200,Pe=300,Lt=15,[Ye,fe]=U("picker-column"),je=Symbol(Ye);var Ut=F({name:Ye,props:{value:z,fields:X(Object),options:oe(),readonly:Boolean,allowHtml:Boolean,optionHeight:X(Number),swipeDuration:X(z),visibleOptionNum:X(z)},emits:["change","clickOption","scrollInto"],setup(e,{emit:n,slots:t}){let l,i,a,s,d;const u=O(),x=O(),T=O(0),C=O(0),h=ot(),S=()=>e.options.length,g=()=>e.optionHeight*(+e.visibleOptionNum-1)/2,I=b=>{let o=ae(e.options,b);const r=-o*e.optionHeight,f=()=>{o>S()-1&&(o=ae(e.options,b));const N=e.options[o][e.fields.value];N!==e.value&&n("change",N)};l&&r!==T.value?d=f:f(),T.value=r},v=()=>e.readonly||!e.options.length,P=b=>{l||v()||(d=null,C.value=_e,I(b),n("clickOption",e.options[b]))},w=b=>he(Math.round(-b/e.optionHeight),0,S()-1),D=B(()=>w(T.value)),K=(b,o)=>{const r=Math.abs(b/o);b=T.value+r/.003*(b<0?-1:1);const f=w(b);C.value=+e.swipeDuration,I(f)},E=()=>{l=!1,C.value=0,d&&(d(),d=null)},Y=b=>{if(!v()){if(h.start(b),l){const o=zt(x.value);T.value=Math.min(0,o-g())}C.value=0,i=T.value,a=Date.now(),s=i,d=null}},A=b=>{if(v())return;h.move(b),h.isVertical()&&(l=!0,Ne(b,!0));const o=he(i+h.deltaY.value,-(S()*e.optionHeight),e.optionHeight),r=w(o);r!==D.value&&n("scrollInto",e.options[r]),T.value=o;const f=Date.now();f-a>Pe&&(a=f,s=o)},j=()=>{if(v())return;const b=T.value-s,o=Date.now()-a;if(o<Pe&&Math.abs(b)>Lt){K(b,o);return}const f=w(T.value);C.value=_e,I(f),setTimeout(()=>{l=!1},0)},H=()=>{const b={height:`${e.optionHeight}px`};return e.options.map((o,r)=>{const f=o[e.fields.text],{disabled:N}=o,Z=o[e.fields.value],re={role:"button",style:b,tabindex:N?-1:0,class:[fe("item",{disabled:N,selected:Z===e.value}),o.className],onClick:()=>P(r)},ue={class:"van-ellipsis",[e.allowHtml?"innerHTML":"textContent"]:f};return m("li",re,[t.option?t.option(o,r):m("div",ue,null)])})};return ye(je),ee({stopMomentum:E}),Ve(()=>{const b=l?Math.floor(-T.value/e.optionHeight):e.options.findIndex(f=>f[e.fields.value]===e.value),o=ae(e.options,b),r=-o*e.optionHeight;l&&o<b&&E(),T.value=r}),ie("touchmove",A,{target:u}),()=>m("div",{ref:u,class:fe(),onTouchstartPassive:Y,onTouchend:j,onTouchcancel:j},[m("ul",{ref:x,style:{transform:`translate3d(0, ${T.value+g()}px, 0)`,transitionDuration:`${C.value}ms`,transitionProperty:C.value?"all":"none"},class:fe("wrapper"),onTransitionend:E},[H()])])}});const[Ft]=U("picker-toolbar"),se={title:String,cancelButtonText:String,confirmButtonText:String},We=["cancel","confirm","title","toolbar"],Kt=Object.keys(se);var Ze=F({name:Ft,props:se,emits:["confirm","cancel"],setup(e,{emit:n,slots:t}){const l=()=>{if(t.title)return t.title();if(e.title)return m("div",{class:[L("title"),"van-ellipsis"]},[e.title])},i=()=>n("cancel"),a=()=>n("confirm"),s=()=>{const u=e.cancelButtonText||Re("cancel");return m("button",{type:"button",class:[L("cancel"),Ie],onClick:i},[t.cancel?t.cancel():u])},d=()=>{const u=e.confirmButtonText||Re("confirm");return m("button",{type:"button",class:[L("confirm"),Ie],onClick:a},[t.confirm?t.confirm():u])};return()=>m("div",{class:L("toolbar")},[t.toolbar?t.toolbar():[s(),l(),d()]])}});const Yt=(e,n)=>{const t=O(e());return _(e,l=>{l!==t.value&&(t.value=l)}),_(t,l=>{l!==e()&&n(l)}),t};function jt(e,n,t){let l,i=0;const a=e.scrollLeft,s=t===0?1:Math.round(t*1e3/16);function d(){Me(l)}function u(){e.scrollLeft+=(n-a)/s,++i<s&&(l=be(u))}return u(),d}function Wt(e,n,t,l){let i,a=De(e);const s=a<n,d=t===0?1:Math.round(t*1e3/16),u=(n-a)/d;function x(){Me(i)}function T(){a+=u,(s&&a>n||!s&&a<n)&&(a=n),it(e,a),s&&a<n||!s&&a>n?i=be(T):l&&(i=be(l))}return T(),x}function Zt(){const e=O([]),n=[];return yt(()=>{e.value=[]}),[e,l=>(n[l]||(n[l]=i=>{e.value[l]=i}),n[l])]}function Ge(e,n){if(!ct||!window.IntersectionObserver)return;const t=new IntersectionObserver(a=>{n(a[0].intersectionRatio>0)},{root:document.body}),l=()=>{e.value&&t.observe(e.value)},i=()=>{e.value&&t.unobserve(e.value)};xt(i),wt(i),Ae(l)}const[Gt,Xt]=U("sticky"),qt={zIndex:z,position:xe("top"),container:Object,offsetTop:p(0),offsetBottom:p(0)};var Jt=F({name:Gt,props:qt,emits:["scroll","change"],setup(e,{emit:n,slots:t}){const l=O(),i=pe(l),a=Le({fixed:!1,width:0,height:0,transform:0}),s=O(!1),d=B(()=>we(e.position==="top"?e.offsetTop:e.offsetBottom)),u=B(()=>{if(s.value)return;const{fixed:h,height:S,width:g}=a;if(h)return{width:`${g}px`,height:`${S}px`}}),x=B(()=>{if(!a.fixed||s.value)return;const h=W(st(e.zIndex),{width:`${a.width}px`,height:`${a.height}px`,[e.position]:`${d.value}px`});return a.transform&&(h.transform=`translate3d(0, ${a.transform}px, 0)`),h}),T=h=>n("scroll",{scrollTop:h,isFixed:a.fixed}),C=()=>{if(!l.value||ge(l))return;const{container:h,position:S}=e,g=q(l),I=De(window);if(a.width=g.width,a.height=g.height,S==="top")if(h){const v=q(h),P=v.bottom-d.value-a.height;a.fixed=d.value>g.top&&v.bottom>0,a.transform=P<0?P:0}else a.fixed=d.value>g.top;else{const{clientHeight:v}=document.documentElement;if(h){const P=q(h),w=v-P.top-d.value-a.height;a.fixed=v-d.value<g.bottom&&v>P.top,a.transform=w<0?-w:0}else a.fixed=v-d.value<g.bottom}T(I)};return _(()=>a.fixed,h=>n("change",h)),ie("scroll",C,{target:i,passive:!0}),Ge(l,C),_([ze,rt],()=>{!l.value||ge(l)||!a.fixed||(s.value=!0,V(()=>{const h=q(l);a.width=h.width,a.height=h.height,s.value=!1}))}),()=>{var h;return m("div",{ref:l,style:u.value},[m("div",{class:Xt({fixed:a.fixed&&!s.value}),style:x.value},[(h=t.default)==null?void 0:h.call(t)])])}}});const Qt=ce(Jt),[en,He]=U("tabs");var tn=F({name:en,props:{count:X(Number),inited:Boolean,animated:Boolean,duration:X(z),swipeable:Boolean,lazyRender:Boolean,currentIndex:X(Number)},emits:["change"],setup(e,{emit:n,slots:t}){const l=O(),i=d=>n("change",d),a=()=>{var d;const u=(d=t.default)==null?void 0:d.call(t);return e.animated||e.swipeable?m(Nt,{ref:l,loop:!1,class:He("track"),duration:+e.duration*1e3,touchable:e.swipeable,lazyRender:e.lazyRender,showIndicators:!1,onChange:i},{default:()=>[u]}):u},s=d=>{const u=l.value;u&&u.state.active!==d&&u.swipeTo(d,{immediate:!e.inited})};return _(()=>e.currentIndex,s),Ct(()=>{s(e.currentIndex)}),ee({swipeRef:l}),()=>m("div",{class:He("content",{animated:e.animated||e.swipeable})},[a()])}});const[Xe,ne]=U("tabs"),nn={type:xe("line"),color:String,border:Boolean,sticky:Boolean,shrink:Boolean,active:p(0),duration:p(.3),animated:Boolean,ellipsis:J,swipeable:Boolean,scrollspy:Boolean,offsetTop:p(0),background:String,lazyRender:J,showHeader:J,lineWidth:z,lineHeight:z,beforeChange:Function,swipeThreshold:p(5),titleActiveColor:String,titleInactiveColor:String},qe=Symbol(Xe);var an=F({name:Xe,props:nn,emits:["change","scroll","rendered","clickTab","update:active"],setup(e,{emit:n,slots:t}){let l,i,a,s,d;const u=O(),x=O(),T=O(),C=O(),h=Fe(),S=pe(u),[g,I]=Zt(),{children:v,linkChildren:P}=Ce(qe),w=Le({inited:!1,position:"",lineStyle:{},currentIndex:-1}),D=B(()=>v.length>+e.swipeThreshold||!e.ellipsis||e.shrink),K=B(()=>({borderColor:e.color,background:e.background})),E=(c,y)=>{var k;return(k=c.name)!=null?k:y},Y=B(()=>{const c=v[w.currentIndex];if(c)return E(c,w.currentIndex)}),A=B(()=>we(e.offsetTop)),j=B(()=>e.sticky?A.value+l:0),H=c=>{const y=x.value,k=g.value;if(!D.value||!y||!k||!k[w.currentIndex])return;const $=k[w.currentIndex].$el,R=$.offsetLeft-(y.offsetWidth-$.offsetWidth)/2;s&&s(),s=jt(y,R,c?0:+e.duration)},b=()=>{const c=w.inited;V(()=>{const y=g.value;if(!y||!y[w.currentIndex]||e.type!=="line"||ge(u.value))return;const k=y[w.currentIndex].$el,{lineWidth:$,lineHeight:R}=e,M=k.offsetLeft+k.offsetWidth/2,G={width:Oe($),backgroundColor:e.color,transform:`translateX(${M}px) translateX(-50%)`};if(c&&(G.transitionDuration=`${e.duration}s`),le(R)){const te=Oe(R);G.height=te,G.borderRadius=te}w.lineStyle=G})},o=c=>{const y=c<w.currentIndex?-1:1;for(;c>=0&&c<v.length;){if(!v[c].disabled)return c;c+=y}},r=(c,y)=>{const k=o(c);if(!le(k))return;const $=v[k],R=E($,k),M=w.currentIndex!==null;w.currentIndex!==k&&(w.currentIndex=k,y||H(),b()),R!==e.active&&(n("update:active",R),M&&n("change",R,$.title)),a&&!e.scrollspy&&ft(Math.ceil(Be(u.value)-A.value))},f=(c,y)=>{const k=v.find((R,M)=>E(R,M)===c),$=k?v.indexOf(k):0;r($,y)},N=(c=!1)=>{if(e.scrollspy){const y=v[w.currentIndex].$el;if(y&&S.value){const k=Be(y,S.value)-j.value;i=!0,d&&d(),d=Wt(S.value,k,c?0:+e.duration,()=>{i=!1})}}},Z=(c,y,k)=>{const{title:$,disabled:R}=v[y],M=E(v[y],y);R||(vt(e.beforeChange,{args:[M],done:()=>{r(y),N()}}),Ht(c)),n("clickTab",{name:M,title:$,event:k,disabled:R})},re=c=>{a=c.isFixed,n("scroll",c)},ue=c=>{V(()=>{f(c),N(!0)})},et=()=>{for(let c=0;c<v.length;c++){const{top:y}=q(v[c].$el);if(y>j.value)return c===0?0:c-1}return v.length-1},tt=()=>{if(e.scrollspy&&!i){const c=et();r(c)}},nt=()=>{if(e.type==="line"&&v.length)return m("div",{class:ne("line"),style:w.lineStyle},null)},Se=()=>{var c,y,k;const{type:$,border:R,sticky:M}=e,G=[m("div",{ref:M?void 0:T,class:[ne("wrap"),{[dt]:$==="line"&&R}]},[m("div",{ref:x,role:"tablist",class:ne("nav",[$,{shrink:e.shrink,complete:D.value}]),style:K.value,"aria-orientation":"horizontal"},[(c=t["nav-left"])==null?void 0:c.call(t),v.map(te=>te.renderTitle(Z)),nt(),(y=t["nav-right"])==null?void 0:y.call(t)])]),(k=t["nav-bottom"])==null?void 0:k.call(t)];return M?m("div",{ref:T},[G]):G},ke=()=>{b(),V(()=>{var c,y;H(!0),(y=(c=C.value)==null?void 0:c.swipeRef.value)==null||y.resize()})};_(()=>[e.color,e.duration,e.lineWidth,e.lineHeight],b),_(ze,ke),_(()=>e.active,c=>{c!==Y.value&&f(c)}),_(()=>v.length,()=>{w.inited&&(f(e.active),b(),V(()=>{H(!0)}))});const at=()=>{f(e.active,!0),V(()=>{w.inited=!0,T.value&&(l=q(T.value).height),H(!0)})},lt=(c,y)=>n("rendered",c,y);return ee({resize:ke,scrollTo:ue}),St(b),ut(b),Ae(at),Ge(u,b),ie("scroll",tt,{target:S,passive:!0}),P({id:h,props:e,setLine:b,scrollable:D,onRendered:lt,currentName:Y,setTitleRefs:I,scrollIntoView:H}),()=>m("div",{ref:u,class:ne([e.type])},[e.showHeader?e.sticky?m(Qt,{container:u.value,offsetTop:A.value,onScroll:re},{default:()=>[Se()]}):Se():null,m(tn,{ref:C,count:v.length,inited:w.inited,animated:e.animated,duration:e.duration,swipeable:e.swipeable,lazyRender:e.lazyRender,currentIndex:w.currentIndex,onChange:r},{default:()=>{var c;return[(c=t.default)==null?void 0:c.call(t)]}})])}});const ln=Symbol(),[on,Ee]=U("tab"),cn=F({name:on,props:{id:String,dot:Boolean,type:String,color:String,title:String,badge:z,shrink:Boolean,isActive:Boolean,disabled:Boolean,controls:String,scrollable:Boolean,activeColor:String,inactiveColor:String,showZeroBadge:J},setup(e,{slots:n}){const t=B(()=>{const i={},{type:a,color:s,disabled:d,isActive:u,activeColor:x,inactiveColor:T}=e;s&&a==="card"&&(i.borderColor=s,d||(u?i.backgroundColor=s:i.color=s));const h=u?x:T;return h&&(i.color=h),i}),l=()=>{const i=m("span",{class:Ee("text",{ellipsis:!e.scrollable})},[n.title?n.title():e.title]);return e.dot||le(e.badge)&&e.badge!==""?m(mt,{dot:e.dot,content:e.badge,showZero:e.showZeroBadge},{default:()=>[i]}):i};return()=>m("div",{id:e.id,role:"tab",class:[Ee([e.type,{grow:e.scrollable&&!e.shrink,shrink:e.shrink,active:e.isActive,disabled:e.disabled}])],style:t.value,tabindex:e.disabled?void 0:e.isActive?0:-1,"aria-selected":e.isActive,"aria-disabled":e.disabled||void 0,"aria-controls":e.controls},[l()])}}),[sn,ve]=U("tab"),rn=W({},Et,{dot:Boolean,name:z,badge:z,title:String,disabled:Boolean,titleClass:ht,titleStyle:[String,Object],showZeroBadge:J});var un=F({name:sn,props:rn,setup(e,{slots:n}){const t=Fe(),l=O(!1),i=kt(),{parent:a,index:s}=ye(qe);if(!a)return;const d=()=>{var g;return(g=e.name)!=null?g:s.value},u=()=>{l.value=!0,a.props.lazyRender&&V(()=>{a.onRendered(d(),e.title)})},x=B(()=>{const g=d()===a.currentName.value;return g&&!l.value&&u(),g}),T=O(""),C=O("");Ve(()=>{const{titleClass:g,titleStyle:I}=e;T.value=g?It(g):"",C.value=I&&typeof I!="string"?Ot(Bt(I)):I});const h=g=>m(cn,Ue({key:t,id:`${a.id}-${s.value}`,ref:a.setTitleRefs(s.value),style:C.value,class:T.value,isActive:x.value,controls:t,scrollable:a.scrollable.value,activeColor:a.props.titleActiveColor,inactiveColor:a.props.titleInactiveColor,onClick:I=>g(i.proxy,s.value,I)},Q(a.props,["type","color","shrink"]),Q(e,["dot","badge","title","disabled","showZeroBadge"])),{title:n.title}),S=O(!x.value);return _(x,g=>{g?S.value=!1:bt(()=>{S.value=!0})}),_(()=>e.title,()=>{a.setLine(),a.scrollIntoView()}),Rt(ln,x),ee({id:t,renderTitle:h}),()=>{var g;const I=`${a.id}-${s.value}`,{animated:v,swipeable:P,scrollspy:w,lazyRender:D}=a.props;if(!n.default&&!v)return;const K=w||x.value;if(v||P)return m(Mt,{id:t,role:"tabpanel",class:ve("panel-wrapper",{inactive:S.value}),tabindex:x.value?0:-1,"aria-hidden":!x.value,"aria-labelledby":I},{default:()=>{var A;return[m("div",{class:ve("panel")},[(A=n.default)==null?void 0:A.call(n)])]}});const Y=l.value||w||!D?(g=n.default)==null?void 0:g.call(n):null;return $t(m("div",{id:t,role:"tabpanel",class:ve("panel"),tabindex:K?0:-1,"aria-labelledby":I},[Y]),[[_t,K]])}}});const dn=ce(un),fn=ce(an),[Je,me]=U("picker-group"),Qe=Symbol(Je),vn=W({tabs:oe(),activeTab:p(0),nextStepText:String},se);var Sn=F({name:Je,props:vn,emits:["confirm","cancel","update:activeTab"],setup(e,{emit:n,slots:t}){const l=Yt(()=>e.activeTab,x=>n("update:activeTab",x)),{children:i,linkChildren:a}=Ce(Qe);a();const s=()=>+l.value<e.tabs.length-1&&e.nextStepText,d=()=>{s()?l.value=+l.value+1:n("confirm",i.map(x=>x.confirm()))},u=()=>n("cancel");return()=>{var x,T;const C=(T=(x=t.default)==null?void 0:x.call(t))==null?void 0:T.filter(S=>S.type!==Pt),h=s()?e.nextStepText:e.confirmButtonText;return m("div",{class:me()},[m(Ze,{title:e.title,cancelButtonText:e.cancelButtonText,confirmButtonText:h,onConfirm:d,onCancel:u},Q(t,We)),m(fn,{active:l.value,"onUpdate:active":S=>l.value=S,class:me("tabs"),shrink:!0,animated:!0,lazyRender:!1},{default:()=>[e.tabs.map((S,g)=>m(dn,{title:S,titleClass:me("tab-title")},{default:()=>[C==null?void 0:C[g]]}))]})])}}});const mn=W({loading:Boolean,readonly:Boolean,allowHtml:Boolean,optionHeight:p(44),showToolbar:J,swipeDuration:p(1e3),visibleOptionNum:p(6)},se),hn=W({},mn,{columns:oe(),modelValue:oe(),toolbarPosition:xe("top"),columnsFieldNames:Object});var bn=F({name:Dt,props:hn,emits:["confirm","cancel","change","scrollInto","clickOption","update:modelValue"],setup(e,{emit:n,slots:t}){const l=O(),i=O(e.modelValue.slice(0)),{parent:a}=ye(Qe),{children:s,linkChildren:d}=Ce(je);d();const u=B(()=>Vt(e.columnsFieldNames)),x=B(()=>we(e.optionHeight)),T=B(()=>At(e.columns,u.value)),C=B(()=>{const{columns:o}=e;switch(T.value){case"multiple":return o;case"cascade":return pt(o,u.value,i);default:return[o]}}),h=B(()=>C.value.some(o=>o.length)),S=B(()=>C.value.map((o,r)=>Te(o,i.value[r],u.value))),g=B(()=>C.value.map((o,r)=>o.findIndex(f=>f[u.value.value]===i.value[r]))),I=(o,r)=>{if(i.value[o]!==r){const f=i.value.slice(0);f[o]=r,i.value=f}},v=()=>({selectedValues:i.value.slice(0),selectedOptions:S.value,selectedIndexes:g.value}),P=(o,r)=>{I(r,o),T.value==="cascade"&&i.value.forEach((f,N)=>{const Z=C.value[N];$e(Z,f,u.value)||I(N,Z.length?Z[0][u.value.value]:void 0)}),V(()=>{n("change",W({columnIndex:r},v()))})},w=(o,r)=>{const f={columnIndex:r,currentOption:o};n("clickOption",W(v(),f)),n("scrollInto",f)},D=()=>{s.forEach(r=>r.stopMomentum());const o=v();return V(()=>{n("confirm",o)}),o},K=()=>n("cancel",v()),E=()=>C.value.map((o,r)=>m(Ut,{value:i.value[r],fields:u.value,options:o,readonly:e.readonly,allowHtml:e.allowHtml,optionHeight:x.value,swipeDuration:e.swipeDuration,visibleOptionNum:e.visibleOptionNum,onChange:f=>P(f,r),onClickOption:f=>w(f,r),onScrollInto:f=>{n("scrollInto",{currentOption:f,columnIndex:r})}},{option:t.option})),Y=o=>{if(h.value){const r={height:`${x.value}px`},f={backgroundSize:`100% ${(o-x.value)/2}px`};return[m("div",{class:L("mask"),style:f},null),m("div",{class:[gt,L("frame")],style:r},null)]}},A=()=>{const o=x.value*+e.visibleOptionNum,r={height:`${o}px`};return m("div",{ref:l,class:L("columns"),style:r},[E(),Y(o)])},j=()=>{if(e.showToolbar&&!a)return m(Ze,Ue(Q(e,Kt),{onConfirm:D,onCancel:K}),Q(t,We))};_(C,o=>{o.forEach((r,f)=>{r.length&&!$e(r,i.value[f],u.value)&&I(f,Ke(r)[u.value.value])})},{immediate:!0});let H;return _(()=>e.modelValue,o=>{!de(o,i.value)&&!de(o,H)&&(i.value=o.slice(0),H=o.slice(0))},{deep:!0}),_(i,o=>{de(o,e.modelValue)||(H=o.slice(0),n("update:modelValue",H))},{immediate:!0}),ie("touchmove",Ne,{target:l}),ee({confirm:D,getSelectedOptions:()=>S.value}),()=>{var o,r;return m("div",{class:L()},[e.toolbarPosition==="top"?j():null,e.loading?m(Tt,{class:L("loading")},null):null,(o=t["columns-top"])==null?void 0:o.call(t),A(),(r=t["columns-bottom"])==null?void 0:r.call(t),e.toolbarPosition==="bottom"?j():null])}}});const kn=ce(bn);export{kn as P,dn as T,Zt as a,fn as b,mn as p,Sn as s,Yt as u};