1
0
mirror of https://github.com/ZeroCatDev/Classworks.git synced 2025-12-07 21:13:11 +00:00
Classworks/assets/filter-YA6iAyBt.js

2 lines
22 KiB
JavaScript

import{$ as ae,c5 as Ze,g as he,p as ee,a3 as Pe,Z as Ie,b8 as Ge,bl as Je,X as Ne,a0 as X,aH as Te,c6 as Le,a5 as O,a$ as ve,ay as Q,c as ye,d as A,i as x,y as re,E as K,e as ne,n as ze,c7 as Ye,bh as qe,m as et,c8 as tt,bi as at,bm as lt,aJ as nt,h as _e,bE as it,aO as oe,c9 as Me,a7 as ge,a6 as le,F as ie,b5 as Se,aZ as ut,bw as He,a_ as pe,c3 as Ue,a8 as je,bT as rt,u as st,bv as ot,aj as ct,bQ as dt,aI as me,f as ft,aN as vt,c1 as Re,a1 as mt,a4 as xe,ag as Ve,v as Be,P as gt,Q as De,ca as ht,K as yt,aa as bt,L as pt,ab as Vt,ac as kt,t as wt,ad as Pt,bg as St,ae as xt,cb as It,af as Oe,ah as Ee,cc as Lt,am as se}from"./index-C8fpJ_Uz.js";import{u as _t,h as At,V as $e,m as Ct}from"./VTextField-BN4WF-Fo.js";import{V as Ft}from"./VMenu-bogFP1XJ.js";import{V as Tt}from"./VCheckboxBtn-DneCgXbP.js";import{V as Ke}from"./VChip-CluiA3AS.js";function Mt(){const e=ae([]);Ze(()=>e.value=[]);function n(t,u){e.value[u]=t}return{refs:e,updateRef:n}}const Rt=ee({activeColor:String,start:{type:[Number,String],default:1},modelValue:{type:Number,default:e=>e.start},disabled:Boolean,length:{type:[Number,String],default:1,validator:e=>e%1===0},totalVisible:[Number,String],firstIcon:{type:oe,default:"$first"},prevIcon:{type:oe,default:"$prev"},nextIcon:{type:oe,default:"$next"},lastIcon:{type:oe,default:"$last"},ariaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.root"},pageAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.page"},currentPageAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.currentPage"},firstAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.first"},previousAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.previous"},nextAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.next"},lastAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.last"},ellipsis:{type:String,default:"..."},showFirstLastPage:Boolean,...it(),..._e(),...nt(),...lt(),...at(),...tt(),...et({tag:"nav"}),...qe(),...Ye({variant:"text"})},"VPagination"),aa=he()({name:"VPagination",props:Rt(),emits:{"update:modelValue":e=>!0,first:e=>!0,prev:e=>!0,next:e=>!0,last:e=>!0},setup(e,n){let{slots:t,emit:u}=n;const a=Pe(e,"modelValue"),{t:c,n:m}=Ie(),{isRtl:i}=Ge(),{themeClasses:s}=Je(e),{width:P}=Ne(),r=X(-1);Te(void 0,{scoped:!0});const{resizeRef:$}=Le(o=>{if(!o.length)return;const{target:p,contentRect:k}=o[0],M=p.querySelector(".v-pagination__list > *");if(!M)return;const L=k.width,G=M.offsetWidth+parseFloat(getComputedStyle(M).marginRight)*2;r.value=w(L,G)}),g=O(()=>parseInt(e.length,10)),d=O(()=>parseInt(e.start,10)),V=O(()=>e.totalVisible!=null?parseInt(e.totalVisible,10):r.value>=0?r.value:w(P.value,58));function w(o,p){const k=e.showFirstLastPage?5:3;return Math.max(0,Math.floor(Number(((o-p*k)/p).toFixed(2))))}const y=O(()=>{if(g.value<=0||isNaN(g.value)||g.value>Number.MAX_SAFE_INTEGER)return[];if(V.value<=0)return[];if(V.value===1)return[a.value];if(g.value<=V.value)return ve(g.value,d.value);const o=V.value%2===0,p=o?V.value/2:Math.floor(V.value/2),k=o?p:p+1,M=g.value-p;if(k-a.value>=0)return[...ve(Math.max(1,V.value-1),d.value),e.ellipsis,g.value];if(a.value-M>=(o?1:0)){const L=V.value-1,G=g.value-L+d.value;return[d.value,e.ellipsis,...ve(L,G)]}else{const L=Math.max(1,V.value-2),G=L===1?a.value:a.value-Math.ceil(L/2)+d.value;return[d.value,e.ellipsis,...ve(L,G),e.ellipsis,g.value]}});function b(o,p,k){o.preventDefault(),a.value=p,k&&u(k,p)}const{refs:C,updateRef:F}=Mt();Te({VPaginationBtn:{color:Q(()=>e.color),border:Q(()=>e.border),density:Q(()=>e.density),size:Q(()=>e.size),variant:Q(()=>e.variant),rounded:Q(()=>e.rounded),elevation:Q(()=>e.elevation)}});const N=O(()=>y.value.map((o,p)=>{const k=M=>F(M,p);if(typeof o=="string")return{isActive:!1,key:`ellipsis-${p}`,page:o,props:{ref:k,ellipsis:!0,icon:!0,disabled:!0}};{const M=o===a.value;return{isActive:M,key:o,page:m(o),props:{ref:k,ellipsis:!1,icon:!0,disabled:!!e.disabled||Number(e.length)<2,color:M?e.activeColor:e.color,"aria-current":M,"aria-label":c(M?e.currentPageAriaLabel:e.pageAriaLabel,o),onClick:L=>b(L,o)}}}})),T=O(()=>{const o=!!e.disabled||a.value<=d.value,p=!!e.disabled||a.value>=d.value+g.value-1;return{first:e.showFirstLastPage?{icon:i.value?e.lastIcon:e.firstIcon,onClick:k=>b(k,d.value,"first"),disabled:o,"aria-label":c(e.firstAriaLabel),"aria-disabled":o}:void 0,prev:{icon:i.value?e.nextIcon:e.prevIcon,onClick:k=>b(k,a.value-1,"prev"),disabled:o,"aria-label":c(e.previousAriaLabel),"aria-disabled":o},next:{icon:i.value?e.prevIcon:e.nextIcon,onClick:k=>b(k,a.value+1,"next"),disabled:p,"aria-label":c(e.nextAriaLabel),"aria-disabled":p},last:e.showFirstLastPage?{icon:i.value?e.firstIcon:e.lastIcon,onClick:k=>b(k,d.value+g.value-1,"last"),disabled:p,"aria-label":c(e.lastAriaLabel),"aria-disabled":p}:void 0}});function I(){var p;const o=a.value-d.value;(p=C.value[o])==null||p.$el.focus()}function H(o){o.key===Me.left&&!e.disabled&&a.value>Number(e.start)?(a.value=a.value-1,ge(I)):o.key===Me.right&&!e.disabled&&a.value<d.value+g.value-1&&(a.value=a.value+1,ge(I))}return ye(()=>A(e.tag,{ref:$,class:ne(["v-pagination",s.value,e.class]),style:ze(e.style),role:"navigation","aria-label":c(e.ariaLabel),onKeydown:H,"data-test":"v-pagination-root"},{default:()=>[x("ul",{class:"v-pagination__list"},[e.showFirstLastPage&&x("li",{key:"first",class:"v-pagination__first","data-test":"v-pagination-first"},[t.first?t.first(T.value.first):A(re,K({_as:"VPaginationBtn"},T.value.first),null)]),x("li",{key:"prev",class:"v-pagination__prev","data-test":"v-pagination-prev"},[t.prev?t.prev(T.value.prev):A(re,K({_as:"VPaginationBtn"},T.value.prev),null)]),N.value.map((o,p)=>x("li",{key:o.key,class:ne(["v-pagination__item",{"v-pagination__item--is-active":o.isActive}]),"data-test":"v-pagination-item"},[t.item?t.item(o):A(re,K({_as:"VPaginationBtn"},o.props),{default:()=>[o.page]})])),x("li",{key:"next",class:"v-pagination__next","data-test":"v-pagination-next"},[t.next?t.next(T.value.next):A(re,K({_as:"VPaginationBtn"},T.value.next),null)]),e.showFirstLastPage&&x("li",{key:"last",class:"v-pagination__last","data-test":"v-pagination-last"},[t.last?t.last(T.value.last):A(re,K({_as:"VPaginationBtn"},T.value.last),null)])])]})),{}}}),Bt=ee({renderless:Boolean,..._e()},"VVirtualScrollItem"),Dt=he()({name:"VVirtualScrollItem",inheritAttrs:!1,props:Bt(),emits:{"update:height":e=>!0},setup(e,n){let{attrs:t,emit:u,slots:a}=n;const{resizeRef:c,contentRect:m}=Le(void 0,"border");le(()=>{var i;return(i=m.value)==null?void 0:i.height},i=>{i!=null&&u("update:height",i)}),ye(()=>{var i,s;return e.renderless?x(ie,null,[(i=a.default)==null?void 0:i.call(a,{itemRef:c})]):x("div",K({ref:c,class:["v-virtual-scroll__item",e.class],style:e.style},t),[(s=a.default)==null?void 0:s.call(a)])})}}),Ot=-1,Et=1,ke=100,$t=ee({itemHeight:{type:[Number,String],default:null},itemKey:{type:[String,Array,Function],default:null},height:[Number,String]},"virtual");function Kt(e,n){const t=Ne(),u=X(0);Se(()=>{u.value=parseFloat(e.itemHeight||0)});const a=X(0),c=X(Math.ceil((parseInt(e.height)||t.height.value)/(u.value||16))||1),m=X(0),i=X(0),s=ae(),P=ae();let r=0;const{resizeRef:$,contentRect:g}=Le();Se(()=>{$.value=s.value});const d=O(()=>{var f;return s.value===document.documentElement?t.height.value:((f=g.value)==null?void 0:f.height)||parseInt(e.height)||0}),V=O(()=>!!(s.value&&P.value&&d.value&&u.value));let w=Array.from({length:n.value.length}),y=Array.from({length:n.value.length});const b=X(0);let C=-1;function F(f){return w[f]||u.value}const N=ut(()=>{const f=performance.now();y[0]=0;const S=n.value.length;for(let B=1;B<=S;B++)y[B]=(y[B-1]||0)+F(B-1);b.value=Math.max(b.value,performance.now()-f)},b),T=le(V,f=>{f&&(T(),r=P.value.offsetTop,N.immediate(),J(),~C&&ge(()=>{je&&window.requestAnimationFrame(()=>{te(C),C=-1})}))});He(()=>{N.clear()});function I(f,S){const B=w[f],z=u.value;u.value=z?Math.min(u.value,S):S,(B!==S||z!==u.value)&&(w[f]=S,N())}function H(f){f=pe(f,0,n.value.length);const S=Math.floor(f),B=f%1,z=S+1,l=y[S]||0,v=y[z]||l;return l+(v-l)*B}function o(f){return Nt(y,f)}let p=0,k=0,M=0;le(d,(f,S)=>{S&&(J(),f<S&&requestAnimationFrame(()=>{k=0,J()}))});let L=-1;function G(){if(!s.value||!P.value)return;const f=s.value.scrollTop,S=performance.now();S-M>500?(k=Math.sign(f-p),r=P.value.offsetTop):k=f-p,p=f,M=S,window.clearTimeout(L),L=window.setTimeout(ce,500),J()}function ce(){!s.value||!P.value||(k=0,M=0,window.clearTimeout(L),J())}let de=-1;function J(){cancelAnimationFrame(de),de=requestAnimationFrame(fe)}function fe(){if(!s.value||!d.value||!u.value)return;const f=p-r,S=Math.sign(k),B=Math.max(0,f-ke),z=pe(o(B),0,n.value.length),l=f+d.value+ke,v=pe(o(l)+1,z+1,n.value.length);if((S!==Ot||z<a.value)&&(S!==Et||v>c.value)){const D=H(a.value)-H(z),Y=H(v)-H(c.value);Math.max(D,Y)>ke?(a.value=z,c.value=v):(z<=0&&(a.value=z),v>=n.value.length&&(c.value=v))}m.value=H(a.value),i.value=H(n.value.length)-H(c.value)}function te(f){const S=H(f);!s.value||f&&!S?C=f:s.value.scrollTop=S}const be=O(()=>n.value.slice(a.value,c.value).map((f,S)=>{const B=S+a.value;return{raw:f,index:B,key:Ue(f,e.itemKey,B)}}));return le(n,()=>{w=Array.from({length:n.value.length}),y=Array.from({length:n.value.length}),N.immediate(),J()},{deep:1}),{calculateVisibleItems:J,containerRef:s,markerRef:P,computedItems:be,paddingTop:m,paddingBottom:i,scrollToIndex:te,handleScroll:G,handleScrollend:ce,handleItemResize:I}}function Nt(e,n){let t=e.length-1,u=0,a=0,c=null,m=-1;if(e[t]<n)return t;for(;u<=t;)if(a=u+t>>1,c=e[a],c>n)t=a-1;else if(c<n)m=a,u=a+1;else return c===n?a:u;return m}const zt=ee({items:{type:Array,default:()=>[]},renderless:Boolean,...$t(),..._e(),...ft()},"VVirtualScroll"),Ht=he()({name:"VVirtualScroll",props:zt(),setup(e,n){let{slots:t}=n;const u=rt("VVirtualScroll"),{dimensionStyles:a}=st(e),{calculateVisibleItems:c,containerRef:m,markerRef:i,handleScroll:s,handleScrollend:P,handleItemResize:r,scrollToIndex:$,paddingTop:g,paddingBottom:d,computedItems:V}=Kt(e,Q(()=>e.items));return ot(()=>e.renderless,()=>{function w(){var C,F;const b=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)?"addEventListener":"removeEventListener";m.value===document.documentElement?(document[b]("scroll",s,{passive:!0}),document[b]("scrollend",P)):((C=m.value)==null||C[b]("scroll",s,{passive:!0}),(F=m.value)==null||F[b]("scrollend",P))}ct(()=>{m.value=dt(u.vnode.el,!0),w(!0)}),He(w)}),ye(()=>{const w=V.value.map(y=>A(Dt,{key:y.key,renderless:e.renderless,"onUpdate:height":b=>r(y.index,b)},{default:b=>{var C;return(C=t.default)==null?void 0:C.call(t,{item:y.raw,index:y.index,...b})}}));return e.renderless?x(ie,null,[x("div",{ref:i,class:"v-virtual-scroll__spacer",style:{paddingTop:me(g.value)}},null),w,x("div",{class:"v-virtual-scroll__spacer",style:{paddingBottom:me(d.value)}},null)]):x("div",{ref:m,class:ne(["v-virtual-scroll",e.class]),onScrollPassive:s,onScrollend:P,style:ze([a.value,e.style])},[x("div",{ref:i,class:"v-virtual-scroll__container",style:{paddingTop:me(g.value),paddingBottom:me(d.value)}},[w])])}),{calculateVisibleItems:c,scrollToIndex:$}}});function Ut(e,n){const t=X(!1);let u;function a(i){cancelAnimationFrame(u),t.value=!0,u=requestAnimationFrame(()=>{u=requestAnimationFrame(()=>{t.value=!1})})}async function c(){await new Promise(i=>requestAnimationFrame(i)),await new Promise(i=>requestAnimationFrame(i)),await new Promise(i=>requestAnimationFrame(i)),await new Promise(i=>{if(t.value){const s=le(t,()=>{s(),i()})}else i()})}async function m(i){var r,$;if(i.key==="Tab"&&((r=n.value)==null||r.focus()),!["PageDown","PageUp","Home","End"].includes(i.key))return;const s=($=e.value)==null?void 0:$.$el;if(!s)return;(i.key==="Home"||i.key==="End")&&s.scrollTo({top:i.key==="Home"?0:s.scrollHeight,behavior:"smooth"}),await c();const P=s.querySelectorAll(":scope > :not(.v-virtual-scroll__spacer)");if(i.key==="PageDown"||i.key==="Home"){const g=s.getBoundingClientRect().top;for(const d of P)if(d.getBoundingClientRect().top>=g){d.focus();break}}else{const g=s.getBoundingClientRect().bottom;for(const d of[...P].reverse())if(d.getBoundingClientRect().bottom<=g){d.focus();break}}}return{onScrollPassive:a,onKeydown:m}}const jt=ee({closeText:{type:String,default:"$vuetify.close"},openText:{type:String,default:"$vuetify.open"}},"autocomplete");function Wt(e,n){const{t}=Ie(),u=vt(),a=O(()=>`menu-${u}`),c=Q(()=>Re(n)),m=Q(()=>a.value),i=Q(()=>t(Re(n)?e.closeText:e.openText));return{menuId:a,ariaExpanded:c,ariaControls:m,ariaLabel:i}}const Qt=ee({chips:Boolean,closableChips:Boolean,eager:Boolean,hideNoData:Boolean,hideSelected:Boolean,listProps:{type:Object},menu:Boolean,menuIcon:{type:oe,default:"$dropdown"},menuProps:{type:Object},multiple:Boolean,noDataText:{type:String,default:"$vuetify.noDataText"},openOnClear:Boolean,itemColor:String,noAutoScroll:Boolean,...jt(),...Lt({itemChildren:!1})},"Select"),Xt=ee({...Qt(),...xt(Ct({modelValue:null,role:"combobox"}),["validationValue","dirty","appendInnerIcon"]),...St({transition:{component:It}})},"VSelect"),la=he()({name:"VSelect",props:Xt(),emits:{"update:focused":e=>!0,"update:modelValue":e=>!0,"update:menu":e=>!0},setup(e,n){let{slots:t}=n;const{t:u}=Ie(),a=ae(),c=ae(),m=ae(),{items:i,transformIn:s,transformOut:P}=mt(e),r=Pe(e,"modelValue",[],l=>s(l===null?[null]:xe(l)),l=>{const v=P(l);return e.multiple?v:v[0]??null}),$=O(()=>typeof e.counterValue=="function"?e.counterValue(r.value):typeof e.counterValue=="number"?e.counterValue:r.value.length),g=_t(e),d=At(e),V=O(()=>r.value.map(l=>l.value)),w=X(!1);let y="",b=-1,C;const F=O(()=>e.hideSelected?i.value.filter(l=>!r.value.some(v=>(e.valueComparator||Ve)(v,l))):i.value),N=O(()=>e.hideNoData&&!F.value.length||g.isReadonly.value||g.isDisabled.value),T=Pe(e,"menu"),I=O({get:()=>T.value,set:l=>{var v;T.value&&!l&&((v=c.value)!=null&&v.ΨopenChildren.size)||l&&N.value||(T.value=l)}}),{menuId:H,ariaExpanded:o,ariaControls:p,ariaLabel:k}=Wt(e,I),M=O(()=>{var l;return{...e.menuProps,activatorProps:{...((l=e.menuProps)==null?void 0:l.activatorProps)||{},"aria-haspopup":"listbox"}}}),L=ae(),G=Ut(L,a);function ce(l){e.openOnClear&&(I.value=!0)}function de(){N.value||(I.value=!I.value)}function J(l){Oe(l)&&fe(l)}function fe(l){var _,W,E;if(!l.key||g.isReadonly.value)return;["Enter"," ","ArrowDown","ArrowUp","Home","End"].includes(l.key)&&l.preventDefault(),["Enter","ArrowDown"," "].includes(l.key)&&(I.value=!0),["Escape","Tab"].includes(l.key)&&(I.value=!1),l.key==="Home"?(_=L.value)==null||_.focus("first"):l.key==="End"&&((W=L.value)==null||W.focus("last"));const v=1e3;if(!Oe(l))return;const D=performance.now();D-C>v&&(y="",b=-1),y+=l.key.toLowerCase(),C=D;const Y=F.value;function q(){let R=h();return R||y.at(-1)===y.at(-2)&&(y=y.slice(0,-1),R=h(),R)||(b=-1,R=h(),R)?R:(y=l.key.toLowerCase(),h())}function h(){for(let R=b+1;R<Y.length;R++){const ue=Y[R];if(ue.title.toLowerCase().startsWith(y))return[ue,R]}}const U=q();if(!U)return;const[j,Z]=U;b=Z,(E=L.value)==null||E.focus(Z),e.multiple||(r.value=[j])}function te(l){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!l.props.disabled)if(e.multiple){const D=r.value.findIndex(q=>(e.valueComparator||Ve)(q.value,l.value)),Y=v??!~D;if(~D){const q=Y?[...r.value,l]:[...r.value];q.splice(D,1),r.value=q}else Y&&(r.value=[...r.value,l])}else{const D=v!==!1;r.value=D?[l]:[],ge(()=>{I.value=!1})}}function be(l){var v;(v=L.value)!=null&&v.$el.contains(l.relatedTarget)||(I.value=!1)}function f(){var l;e.eager&&((l=m.value)==null||l.calculateVisibleItems())}function S(){var l;w.value&&((l=a.value)==null||l.focus())}function B(l){w.value=!0}function z(l){if(l==null)r.value=[];else if(Ee(a.value,":autofill")||Ee(a.value,":-webkit-autofill")){const v=i.value.find(D=>D.title===l);v&&te(v)}else a.value&&(a.value.value="")}return le(I,()=>{if(!e.hideSelected&&I.value&&r.value.length){const l=F.value.findIndex(v=>r.value.some(D=>(e.valueComparator||Ve)(D.value,v.value)));je&&!e.noAutoScroll&&window.requestAnimationFrame(()=>{var v;l>=0&&((v=m.value)==null||v.scrollToIndex(l))})}}),le(i,(l,v)=>{I.value||w.value&&e.hideNoData&&!v.length&&l.length&&(I.value=!0)}),ye(()=>{const l=!!(e.chips||t.chip),v=!!(!e.hideNoData||F.value.length||t["prepend-item"]||t["append-item"]||t["no-data"]),D=r.value.length>0,Y=$e.filterProps(e),q=D||!w.value&&e.label&&!e.persistentPlaceholder?void 0:e.placeholder;return A($e,K({ref:a},Y,{modelValue:r.value.map(h=>h.props.title).join(", "),name:void 0,"onUpdate:modelValue":z,focused:w.value,"onUpdate:focused":h=>w.value=h,validationValue:r.externalValue,counterValue:$.value,dirty:D,class:["v-select",{"v-select--active-menu":I.value,"v-select--chips":!!e.chips,[`v-select--${e.multiple?"multiple":"single"}`]:!0,"v-select--selected":r.value.length,"v-select--selection-slot":!!t.selection},e.class],style:e.style,inputmode:"none",placeholder:q,"onClick:clear":ce,"onMousedown:control":de,onBlur:be,onKeydown:fe,"aria-expanded":o.value,"aria-controls":p.value,"aria-label":k.value,title:k.value}),{...t,default:()=>x(ie,null,[x("select",{hidden:!0,multiple:e.multiple,name:d.fieldName.value},[i.value.map(h=>x("option",{key:h.value,value:h.value,selected:V.value.includes(h.value)},null))]),A(Ft,K({id:H.value,ref:c,modelValue:I.value,"onUpdate:modelValue":h=>I.value=h,activator:"parent",contentClass:"v-select__content",disabled:N.value,eager:e.eager,maxHeight:310,openOnClick:!1,closeOnContentClick:!1,transition:e.transition,onAfterEnter:f,onAfterLeave:S},M.value),{default:()=>[v&&A(gt,K({ref:L,selected:V.value,selectStrategy:e.multiple?"independent":"single-independent",onMousedown:h=>h.preventDefault(),onKeydown:J,onFocusin:B,tabindex:"-1",selectable:!0,"aria-live":"polite","aria-label":`${e.label}-list`,color:e.itemColor??e.color},G,e.listProps),{default:()=>{var h,U,j;return[(h=t["prepend-item"])==null?void 0:h.call(t),!F.value.length&&!e.hideNoData&&(((U=t["no-data"])==null?void 0:U.call(t))??A(De,{key:"no-data",title:u(e.noDataText)},null)),A(Ht,{ref:m,renderless:!0,items:F.value,itemKey:"value"},{default:Z=>{var Ae,Ce,Fe;let{item:_,index:W,itemRef:E}=Z;const R=ht(_.props),ue=K(_.props,{ref:E,key:_.value,onClick:()=>te(_,null)});return _.type==="divider"?((Ae=t.divider)==null?void 0:Ae.call(t,{props:_.raw,index:W}))??A(yt,K(_.props,{key:`divider-${W}`}),null):_.type==="subheader"?((Ce=t.subheader)==null?void 0:Ce.call(t,{props:_.raw,index:W}))??A(bt,K(_.props,{key:`subheader-${W}`}),null):((Fe=t.item)==null?void 0:Fe.call(t,{item:_,index:W,props:ue}))??A(De,K(ue,{role:"option"}),{prepend:We=>{let{isSelected:Qe}=We;return x(ie,null,[e.multiple&&!e.hideSelected?A(Tt,{key:_.value,modelValue:Qe,ripple:!1,tabindex:"-1",onClick:Xe=>Xe.preventDefault()},null):void 0,R.prependAvatar&&A(pt,{image:R.prependAvatar},null),R.prependIcon&&A(Be,{icon:R.prependIcon},null)])}})}}),(j=t["append-item"])==null?void 0:j.call(t)]}})]}),r.value.map((h,U)=>{function j(E){E.stopPropagation(),E.preventDefault(),te(h,!1)}const Z=K(Ke.filterProps(h.props),{"onClick:close":j,onKeydown(E){E.key!=="Enter"&&E.key!==" "||(E.preventDefault(),E.stopPropagation(),j(E))},onMousedown(E){E.preventDefault(),E.stopPropagation()},modelValue:!0,"onUpdate:modelValue":void 0}),_=l?!!t.chip:!!t.selection,W=_?Vt(l?t.chip({item:h,index:U,props:Z}):t.selection({item:h,index:U})):void 0;if(!(_&&!W))return x("div",{key:h.value,class:"v-select__selection"},[l?t.chip?A(kt,{key:"chip-defaults",defaults:{VChip:{closable:e.closableChips,size:"small",text:h.title}}},{default:()=>[W]}):A(Ke,K({key:"chip",closable:e.closableChips,size:"small",text:h.title,disabled:h.props.disabled},Z),null):W??x("span",{class:"v-select__selection-text"},[h.title,e.multiple&&U<r.value.length-1&&x("span",{class:"v-select__selection-comma"},[wt(",")])])])})]),"append-inner":function(){var Z,_;for(var h=arguments.length,U=new Array(h),j=0;j<h;j++)U[j]=arguments[j];return x(ie,null,[(Z=t["append-inner"])==null?void 0:Z.call(t,...U),e.menuIcon?A(Be,{class:"v-select__menu-icon",color:(_=a.value)==null?void 0:_.fieldIconColor,icon:e.menuIcon},null):void 0])}})}),Pt({isFocused:w,menu:I,select:te},a)}}),Zt=(e,n,t)=>{if(e==null||n==null)return-1;if(!n.length)return 0;e=e.toString().toLocaleLowerCase(),n=n.toString().toLocaleLowerCase();const u=[];let a=e.indexOf(n);for(;~a;)u.push([a,a+n.length]),a=e.indexOf(n,a+n.length);return u.length?u:-1};function we(e,n){if(!(e==null||typeof e=="boolean"||e===-1))return typeof e=="number"?[[e,e+n.length]]:Array.isArray(e[0])?e:[e]}const na=ee({customFilter:Function,customKeyFilter:Object,filterKeys:[Array,String],filterMode:{type:String,default:"intersection"},noFilter:Boolean},"filter");function Gt(e,n,t){var s;const u=[],a=(t==null?void 0:t.default)??Zt,c=t!=null&&t.filterKeys?xe(t.filterKeys):!1,m=Object.keys((t==null?void 0:t.customKeyFilter)??{}).length;if(!(e!=null&&e.length))return u;let i=null;e:for(let P=0;P<e.length;P++){const[r,$=r]=xe(e[P]),g={},d={};let V=-1;if((n||m>0)&&!(t!=null&&t.noFilter)){let w=!1;if(typeof r=="object"){if(r.type==="divider"||r.type==="subheader"){(i==null?void 0:i.type)==="divider"&&r.type==="subheader"&&u.push(i),i={index:P,matches:{},type:r.type};continue}const C=c||Object.keys($);w=C.length===m;for(const F of C){const N=Ue($,F),T=(s=t==null?void 0:t.customKeyFilter)==null?void 0:s[F];if(V=T?T(N,n,r):a(N,n,r),V!==-1&&V!==!1)T?g[F]=we(V,n):d[F]=we(V,n);else if((t==null?void 0:t.filterMode)==="every")continue e}}else V=a(r,n,r),V!==-1&&V!==!1&&(d.title=we(V,n));const y=Object.keys(d).length,b=Object.keys(g).length;if(!y&&!b||(t==null?void 0:t.filterMode)==="union"&&b!==m&&!y||(t==null?void 0:t.filterMode)==="intersection"&&(b!==m||!y&&m>0&&!w))continue}i&&(u.push(i),i=null),u.push({index:P,matches:{...d,...g}})}return u}function ia(e,n,t,u){const a=X([]),c=X(new Map),m=O(()=>u!=null&&u.transform?se(n).map(s=>[s,u.transform(s)]):se(n));Se(()=>{const s=typeof t=="function"?t():se(t),P=typeof s!="string"&&typeof s!="number"?"":String(s),r=Gt(m.value,P,{customKeyFilter:{...e.customKeyFilter,...se(u==null?void 0:u.customKeyFilter)},default:e.customFilter,filterKeys:e.filterKeys,filterMode:e.filterMode,noFilter:e.noFilter}),$=se(n),g=[],d=new Map;r.forEach(V=>{let{index:w,matches:y}=V;const b=$[w];g.push(b),d.set(b.value,y)}),a.value=g,c.value=d});function i(s){return c.value.get(s.value)}return{filteredItems:a,filteredMatches:c,getMatches:i}}function ua(e,n,t){return t==null||!t.length?n:t.map((u,a)=>{const c=a===0?0:t[a-1][1],m=[x("span",{class:ne(`${e}__unmask`)},[n.slice(c,u[0])]),x("span",{class:ne(`${e}__mask`)},[n.slice(u[0],u[1])])];return a===t.length-1&&m.push(x("span",{class:ne(`${e}__unmask`)},[n.slice(u[1])])),x(ie,null,[m])})}export{aa as V,Wt as a,Ut as b,Ht as c,na as d,la as e,ua as h,Qt as m,ia as u};