@validol4ik/uikit 0.3.6 → 0.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),f=require("./index-DTcaHgxl.cjs"),Y=require("./focusout-DzWGke-4.cjs"),Fe={dark:{type:Boolean,default:null}};function Oe(e,l){return t.computed(()=>e.dark===null?l.dark.isActive:e.dark)}function jl(e,l){const o=t.ref(null),n=t.computed(()=>e.disable===!0?null:t.h("span",{ref:o,class:"no-outline",tabindex:-1}));function r(i){const a=l.value;i!==void 0&&i.type.indexOf("key")===0?a!==null&&document.activeElement!==a&&a.contains(document.activeElement)===!0&&a.focus():o.value!==null&&(i===void 0||a!==null&&a.contains(i.target)===!0)&&o.value.focus()}return{refocusTargetEl:n,refocusTarget:r}}const ol={name:String};function Ll(e={}){return(l,o,n)=>{l[o](t.h("input",{class:"hidden"+(n||""),...e.value}))}}function Hl(e){return t.computed(()=>e.name||e.for)}const $l={xs:30,sm:35,md:40,lg:50,xl:60},Dl={...Fe,...f.useSizeProps,...ol,modelValue:{required:!0,default:null},val:{},trueValue:{default:!0},falseValue:{default:!1},indeterminateValue:{default:null},checkedIcon:String,uncheckedIcon:String,indeterminateIcon:String,toggleOrder:{type:String,validator:e=>e==="tf"||e==="ft"},toggleIndeterminate:Boolean,label:String,leftLabel:Boolean,color:String,keepColor:Boolean,dense:Boolean,disable:Boolean,tabindex:[String,Number]},Nl=["update:modelValue"];function Wl(e,l){const{props:o,slots:n,emit:r,proxy:i}=t.getCurrentInstance(),{$q:a}=i,v=Oe(o,a),m=t.ref(null),{refocusTargetEl:p,refocusTarget:d}=jl(o,m),y=f.useSize(o,$l),C=t.computed(()=>o.val!==void 0&&Array.isArray(o.modelValue)),s=t.computed(()=>{const A=t.toRaw(o.val);return C.value===!0?o.modelValue.findIndex(K=>t.toRaw(K)===A):-1}),h=t.computed(()=>C.value===!0?s.value!==-1:t.toRaw(o.modelValue)===t.toRaw(o.trueValue)),V=t.computed(()=>C.value===!0?s.value===-1:t.toRaw(o.modelValue)===t.toRaw(o.falseValue)),S=t.computed(()=>h.value===!1&&V.value===!1),L=t.computed(()=>o.disable===!0?-1:o.tabindex||0),B=t.computed(()=>`q-${e} cursor-pointer no-outline row inline no-wrap items-center`+(o.disable===!0?" disabled":"")+(v.value===!0?` q-${e}--dark`:"")+(o.dense===!0?` q-${e}--dense`:"")+(o.leftLabel===!0?" reverse":"")),k=t.computed(()=>{const A=h.value===!0?"truthy":V.value===!0?"falsy":"indet",K=o.color!==void 0&&(o.keepColor===!0||V.value!==!0)?` text-${o.color}`:"";return`q-${e}__inner relative-position non-selectable q-${e}__inner--${A}${K}`}),T=t.computed(()=>{const A={type:"checkbox"};return o.name!==void 0&&Object.assign(A,{".checked":h.value,"^checked":h.value===!0?"checked":void 0,name:o.name,value:C.value===!0?o.val:o.trueValue}),A}),H=Ll(T),E=t.computed(()=>{const A={tabindex:L.value,role:"checkbox","aria-label":o.label,"aria-checked":S.value===!0?"mixed":h.value===!0?"true":"false"};return o.disable===!0&&(A["aria-disabled"]="true"),A});function z(A){A!==void 0&&(f.stopAndPrevent(A),d(A)),o.disable!==!0&&r("update:modelValue",P(),A)}function P(){if(C.value===!0){if(h.value===!0){const A=o.modelValue.slice();return A.splice(s.value,1),A}return o.modelValue.concat([o.val])}if(h.value===!0){if(o.toggleOrder!=="ft"||o.toggleIndeterminate===!1)return o.falseValue}else if(V.value===!0){if(o.toggleOrder==="ft"||o.toggleIndeterminate===!1)return o.trueValue}else return o.toggleOrder!=="ft"?o.trueValue:o.falseValue;return o.indeterminateValue}function W(A){(A.keyCode===13||A.keyCode===32)&&f.stopAndPrevent(A)}function X(A){(A.keyCode===13||A.keyCode===32)&&z(A)}const te=l(h,S);return Object.assign(i,{toggle:z}),()=>{const A=te();o.disable!==!0&&H(A,"unshift",` q-${e}__native absolute q-ma-none q-pa-none`);const K=[t.h("div",{class:k.value,style:y.value,"aria-hidden":"true"},A)];p.value!==null&&K.push(p.value);const le=o.label!==void 0?f.hMergeSlot(n.default,[o.label]):f.hSlot(n.default);return le!==void 0&&K.push(t.h("div",{class:`q-${e}__label q-anchor--skip`},le)),t.h("div",{ref:m,class:B.value,...E.value,onClick:z,onKeydown:W,onKeyup:X},K)}}const Kl=()=>t.h("div",{key:"svg",class:"q-checkbox__bg absolute"},[t.h("svg",{class:"q-checkbox__svg fit absolute-full",viewBox:"0 0 24 24"},[t.h("path",{class:"q-checkbox__truthy",fill:"none",d:"M1.73,12.91 8.1,19.28 22.79,4.59"}),t.h("path",{class:"q-checkbox__indet",d:"M4,14H20V10H4"})])]),Ul=f.createComponent({name:"QCheckbox",props:Dl,emits:Nl,setup(e){const l=Kl();function o(n,r){const i=t.computed(()=>(n.value===!0?e.checkedIcon:r.value===!0?e.indeterminateIcon:e.uncheckedIcon)||null);return()=>i.value!==null?[t.h("div",{key:"icon",class:"q-checkbox__icon-container absolute-full flex flex-center no-wrap"},[t.h(f.QIcon,{class:"q-checkbox__icon",name:i.value})])]:[l]}return Wl("checkbox",o)}}),Xe=f.createComponent({name:"QItemSection",props:{avatar:Boolean,thumbnail:Boolean,side:Boolean,top:Boolean,noWrap:Boolean},setup(e,{slots:l}){const o=t.computed(()=>`q-item__section column q-item__section--${e.avatar===!0||e.side===!0||e.thumbnail===!0?"side":"main"}`+(e.top===!0?" q-item__section--top justify-start":" justify-center")+(e.avatar===!0?" q-item__section--avatar":"")+(e.thumbnail===!0?" q-item__section--thumbnail":"")+(e.noWrap===!0?" q-item__section--nowrap":""));return()=>t.h("div",{class:o.value},f.hSlot(l.default))}}),nl=f.createComponent({name:"QItemLabel",props:{overline:Boolean,caption:Boolean,header:Boolean,lines:[Number,String]},setup(e,{slots:l}){const o=t.computed(()=>parseInt(e.lines,10)),n=t.computed(()=>"q-item__label"+(e.overline===!0?" q-item__label--overline text-overline":"")+(e.caption===!0?" q-item__label--caption text-caption":"")+(e.header===!0?" q-item__label--header":"")+(o.value===1?" ellipsis":"")),r=t.computed(()=>e.lines!==void 0&&o.value>1?{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":o.value}:null);return()=>t.h("div",{style:r.value,class:n.value},f.hSlot(l.default))}}),ul=f.createComponent({name:"QItem",props:{...Fe,...f.useRouterLinkProps,tag:{type:String,default:"div"},active:{type:Boolean,default:null},clickable:Boolean,dense:Boolean,insetLevel:Number,tabindex:[String,Number],focused:Boolean,manualFocus:Boolean},emits:["click","keyup"],setup(e,{slots:l,emit:o}){const{proxy:{$q:n}}=t.getCurrentInstance(),r=Oe(e,n),{hasLink:i,linkAttrs:a,linkClass:v,linkTag:m,navigateOnClick:p}=f.useRouterLink(),d=t.ref(null),y=t.ref(null),C=t.computed(()=>e.clickable===!0||i.value===!0||e.tag==="label"),s=t.computed(()=>e.disable!==!0&&C.value===!0),h=t.computed(()=>"q-item q-item-type row no-wrap"+(e.dense===!0?" q-item--dense":"")+(r.value===!0?" q-item--dark":"")+(i.value===!0&&e.active===null?v.value:e.active===!0?` q-item--active${e.activeClass!==void 0?` ${e.activeClass}`:""}`:"")+(e.disable===!0?" disabled":"")+(s.value===!0?" q-item--clickable q-link cursor-pointer "+(e.manualFocus===!0?"q-manual-focusable":"q-focusable q-hoverable")+(e.focused===!0?" q-manual-focusable--focused":""):"")),V=t.computed(()=>e.insetLevel===void 0?null:{["padding"+(n.lang.rtl===!0?"Right":"Left")]:16+e.insetLevel*56+"px"});function S(k){s.value===!0&&(y.value!==null&&(k.qKeyEvent!==!0&&document.activeElement===d.value?y.value.focus():document.activeElement===y.value&&d.value.focus()),p(k))}function L(k){if(s.value===!0&&f.isKeyCode(k,[13,32])===!0){f.stopAndPrevent(k),k.qKeyEvent=!0;const T=new MouseEvent("click",k);T.qKeyEvent=!0,d.value.dispatchEvent(T)}o("keyup",k)}function B(){const k=f.hUniqueSlot(l.default,[]);return s.value===!0&&k.unshift(t.h("div",{class:"q-focus-helper",tabindex:-1,ref:y})),k}return()=>{const k={ref:d,class:h.value,style:V.value,role:"listitem",onClick:S,onKeyup:L};return s.value===!0?(k.tabindex=e.tabindex||"0",Object.assign(k,a.value)):C.value===!0&&(k["aria-disabled"]="true"),t.h(m.value,k,B())}}}),Rt=e=>e?!0:"Обовʼязкове поле";let ut,De=0;const J=new Array(256);for(let e=0;e<256;e++)J[e]=(e+256).toString(16).substring(1);const Ql=(()=>{const e=typeof crypto<"u"?crypto:typeof window<"u"?window.crypto||window.msCrypto:void 0;if(e!==void 0){if(e.randomBytes!==void 0)return e.randomBytes;if(e.getRandomValues!==void 0)return l=>{const o=new Uint8Array(l);return e.getRandomValues(o),o}}return l=>{const o=[];for(let n=l;n>0;n--)o.push(Math.floor(Math.random()*256));return o}})(),It=4096;function vt(){(ut===void 0||De+16>It)&&(De=0,ut=Ql(It));const e=Array.prototype.slice.call(ut,De,De+=16);return e[6]=e[6]&15|64,e[8]=e[8]&63|128,J[e[0]]+J[e[1]]+J[e[2]]+J[e[3]]+"-"+J[e[4]]+J[e[5]]+"-"+J[e[6]]+J[e[7]]+"-"+J[e[8]]+J[e[9]]+"-"+J[e[10]]+J[e[11]]+J[e[12]]+J[e[13]]+J[e[14]]+J[e[15]]}function Xl(e){return e??null}function Mt(e,l){return e??(l===!0?`f_${vt()}`:null)}function Yl({getValue:e,required:l=!0}={}){if(Y.isRuntimeSsrPreHydration.value===!0){const o=e!==void 0?t.ref(Xl(e())):t.ref(null);return l===!0&&o.value===null&&t.onMounted(()=>{o.value=`f_${vt()}`}),e!==void 0&&t.watch(e,n=>{o.value=Mt(n,l)}),o}return e!==void 0?t.computed(()=>Mt(e(),l)):t.ref(`f_${vt()}`)}const zt=/^on[A-Z]/;function Gl(){const{attrs:e,vnode:l}=t.getCurrentInstance(),o={listeners:t.ref({}),attributes:t.ref({})};function n(){const r={},i={};for(const a in e)a!=="class"&&a!=="style"&&zt.test(a)===!1&&(r[a]=e[a]);for(const a in l.props)zt.test(a)===!0&&(i[a]=l.props[a]);o.attributes.value=r,o.listeners.value=i}return t.onBeforeUpdate(n),n(),o}const Zl="_q_fo_";function Jl({validate:e,resetValidation:l,requiresQForm:o}){const n=t.inject(Zl,!1);if(n!==!1){const{props:r,proxy:i}=t.getCurrentInstance();Object.assign(i,{validate:e,resetValidation:l}),t.watch(()=>r.disable,a=>{a===!0?(typeof l=="function"&&l(),n.unbindComponent(i)):n.bindComponent(i)}),t.onMounted(()=>{r.disable!==!0&&n.bindComponent(i)}),t.onBeforeUnmount(()=>{r.disable!==!0&&n.unbindComponent(i)})}else o===!0&&console.error("Parent QForm not found on useFormChild()!")}const Ft=/^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/,Ot=/^#[0-9a-fA-F]{4}([0-9a-fA-F]{4})?$/,Pt=/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,Ne=/^rgb\(((0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),){2}(0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5])\)$/,We=/^rgba\(((0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),){2}(0|[1-9][\d]?|1[\d]{0,2}|2[\d]?|2[0-4][\d]|25[0-5]),(0|0\.[0-9]+[1-9]|0\.[1-9]+|1)\)$/,it={date:e=>/^-?[\d]+\/[0-1]\d\/[0-3]\d$/.test(e),time:e=>/^([0-1]?\d|2[0-3]):[0-5]\d$/.test(e),fulltime:e=>/^([0-1]?\d|2[0-3]):[0-5]\d:[0-5]\d$/.test(e),timeOrFulltime:e=>/^([0-1]?\d|2[0-3]):[0-5]\d(:[0-5]\d)?$/.test(e),email:e=>/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e),hexColor:e=>Ft.test(e),hexaColor:e=>Ot.test(e),hexOrHexaColor:e=>Pt.test(e),rgbColor:e=>Ne.test(e),rgbaColor:e=>We.test(e),rgbOrRgbaColor:e=>Ne.test(e)||We.test(e),hexOrRgbColor:e=>Ft.test(e)||Ne.test(e),hexaOrRgbaColor:e=>Ot.test(e)||We.test(e),anyColor:e=>Pt.test(e)||Ne.test(e)||We.test(e)};function il(e,l=250,o){let n=null;function r(){const i=arguments,a=()=>{n=null,o!==!0&&e.apply(this,i)};n!==null?clearTimeout(n):o===!0&&e.apply(this,i),n=setTimeout(a,l)}return r.cancel=()=>{n!==null&&clearTimeout(n)},r}const eo=[!0,!1,"ondemand"],to={modelValue:{},error:{type:Boolean,default:null},errorMessage:String,noErrorIcon:Boolean,rules:Array,reactiveRules:Boolean,lazyRules:{type:[Boolean,String],default:!1,validator:e=>eo.includes(e)}};function lo(e,l){const{props:o,proxy:n}=t.getCurrentInstance(),r=t.ref(!1),i=t.ref(null),a=t.ref(!1);Jl({validate:V,resetValidation:h});let v=0,m;const p=t.computed(()=>o.rules!==void 0&&o.rules!==null&&o.rules.length!==0),d=t.computed(()=>o.disable!==!0&&p.value===!0&&l.value===!1),y=t.computed(()=>o.error===!0||r.value===!0),C=t.computed(()=>typeof o.errorMessage=="string"&&o.errorMessage.length!==0?o.errorMessage:i.value);t.watch(()=>o.modelValue,()=>{a.value=!0,d.value===!0&&o.lazyRules===!1&&S()});function s(){o.lazyRules!=="ondemand"&&d.value===!0&&a.value===!0&&S()}t.watch(()=>o.reactiveRules,L=>{L===!0?m===void 0&&(m=t.watch(()=>o.rules,s,{immediate:!0,deep:!0})):m!==void 0&&(m(),m=void 0)},{immediate:!0}),t.watch(()=>o.lazyRules,s),t.watch(e,L=>{L===!0?a.value=!0:d.value===!0&&o.lazyRules!=="ondemand"&&S()});function h(){v++,l.value=!1,a.value=!1,r.value=!1,i.value=null,S.cancel()}function V(L=o.modelValue){if(o.disable===!0||p.value===!1)return!0;const B=++v,k=l.value!==!0?()=>{a.value=!0}:()=>{},T=(E,z)=>{E===!0&&k(),r.value=E,i.value=z||null,l.value=!1},H=[];for(let E=0;E<o.rules.length;E++){const z=o.rules[E];let P;if(typeof z=="function"?P=z(L,it):typeof z=="string"&&it[z]!==void 0&&(P=it[z](L)),P===!1||typeof P=="string")return T(!0,P),!1;P!==!0&&P!==void 0&&H.push(P)}return H.length===0?(T(!1),!0):(l.value=!0,Promise.all(H).then(E=>{if(E===void 0||Array.isArray(E)===!1||E.length===0)return B===v&&T(!1),!0;const z=E.find(P=>P===!1||typeof P=="string");return B===v&&T(z!==void 0,z),z===void 0},E=>(B===v&&(console.error(E),T(!0)),!1)))}const S=il(V,0);return t.onBeforeUnmount(()=>{m!==void 0&&m(),S.cancel()}),Object.assign(n,{resetValidation:h,validate:V}),Y.injectProp(n,"hasError",()=>y.value),{isDirtyModel:a,hasRules:p,hasError:y,errorMessage:C,validate:V,resetValidation:h}}let pe=[],ze=[];function al(e){ze=ze.filter(l=>l!==e)}function oo(e){al(e),ze.push(e)}function jt(e){al(e),ze.length===0&&pe.length!==0&&(pe[pe.length-1](),pe=[])}function pt(e){ze.length===0?e():pe.push(e)}function no(e){pe=pe.filter(l=>l!==e)}function mt(e){return e!=null&&(""+e).length!==0}const uo={...Fe,...to,label:String,stackLabel:Boolean,hint:String,hideHint:Boolean,prefix:String,suffix:String,labelColor:String,color:String,bgColor:String,filled:Boolean,outlined:Boolean,borderless:Boolean,standout:[Boolean,String],square:Boolean,loading:Boolean,labelSlot:Boolean,bottomSlots:Boolean,hideBottomSpace:Boolean,rounded:Boolean,dense:Boolean,itemAligned:Boolean,counter:Boolean,clearable:Boolean,clearIcon:String,disable:Boolean,readonly:Boolean,autofocus:Boolean,for:String},gt={...uo,maxlength:[Number,String]},rl=["update:modelValue","clear","focus","blur"];function sl({requiredForAttr:e=!0,tagProp:l,changeEvent:o=!1}={}){const{props:n,proxy:r}=t.getCurrentInstance(),i=Oe(n,r.$q),a=Yl({required:e,getValue:()=>n.for});return{requiredForAttr:e,changeEvent:o,tag:l===!0?t.computed(()=>n.tag):{value:"label"},isDark:i,editable:t.computed(()=>n.disable!==!0&&n.readonly!==!0),innerLoading:t.ref(!1),focused:t.ref(!1),hasPopupOpen:!1,splitAttrs:Gl(),targetUid:a,rootRef:t.ref(null),targetRef:t.ref(null),controlRef:t.ref(null)}}function cl(e){const{props:l,emit:o,slots:n,attrs:r,proxy:i}=t.getCurrentInstance(),{$q:a}=i;let v=null;e.hasValue===void 0&&(e.hasValue=t.computed(()=>mt(l.modelValue))),e.emitValue===void 0&&(e.emitValue=x=>{o("update:modelValue",x)}),e.controlEvents===void 0&&(e.controlEvents={onFocusin:W,onFocusout:X}),Object.assign(e,{clearValue:te,onControlFocusin:W,onControlFocusout:X,focus:z}),e.computedCounter===void 0&&(e.computedCounter=t.computed(()=>{if(l.counter!==!1){const x=typeof l.modelValue=="string"||typeof l.modelValue=="number"?(""+l.modelValue).length:Array.isArray(l.modelValue)===!0?l.modelValue.length:0,M=l.maxlength!==void 0?l.maxlength:l.maxValues;return x+(M!==void 0?" / "+M:"")}}));const{isDirtyModel:m,hasRules:p,hasError:d,errorMessage:y,resetValidation:C}=lo(e.focused,e.innerLoading),s=e.floatingLabel!==void 0?t.computed(()=>l.stackLabel===!0||e.focused.value===!0||e.floatingLabel.value===!0):t.computed(()=>l.stackLabel===!0||e.focused.value===!0||e.hasValue.value===!0),h=t.computed(()=>l.bottomSlots===!0||l.hint!==void 0||p.value===!0||l.counter===!0||l.error!==null),V=t.computed(()=>l.filled===!0?"filled":l.outlined===!0?"outlined":l.borderless===!0?"borderless":l.standout?"standout":"standard"),S=t.computed(()=>`q-field row no-wrap items-start q-field--${V.value}`+(e.fieldClass!==void 0?` ${e.fieldClass.value}`:"")+(l.rounded===!0?" q-field--rounded":"")+(l.square===!0?" q-field--square":"")+(s.value===!0?" q-field--float":"")+(B.value===!0?" q-field--labeled":"")+(l.dense===!0?" q-field--dense":"")+(l.itemAligned===!0?" q-field--item-aligned q-item-type":"")+(e.isDark.value===!0?" q-field--dark":"")+(e.getControl===void 0?" q-field--auto-height":"")+(e.focused.value===!0?" q-field--focused":"")+(d.value===!0?" q-field--error":"")+(d.value===!0||e.focused.value===!0?" q-field--highlighted":"")+(l.hideBottomSpace!==!0&&h.value===!0?" q-field--with-bottom":"")+(l.disable===!0?" q-field--disabled":l.readonly===!0?" q-field--readonly":"")),L=t.computed(()=>"q-field__control relative-position row no-wrap"+(l.bgColor!==void 0?` bg-${l.bgColor}`:"")+(d.value===!0?" text-negative":typeof l.standout=="string"&&l.standout.length!==0&&e.focused.value===!0?` ${l.standout}`:l.color!==void 0?` text-${l.color}`:"")),B=t.computed(()=>l.labelSlot===!0||l.label!==void 0),k=t.computed(()=>"q-field__label no-pointer-events absolute ellipsis"+(l.labelColor!==void 0&&d.value!==!0?` text-${l.labelColor}`:"")),T=t.computed(()=>({id:e.targetUid.value,editable:e.editable.value,focused:e.focused.value,floatingLabel:s.value,modelValue:l.modelValue,emitValue:e.emitValue})),H=t.computed(()=>{const x={};return e.targetUid.value&&(x.for=e.targetUid.value),l.disable===!0&&(x["aria-disabled"]="true"),x});function E(){const x=document.activeElement;let M=e.targetRef!==void 0&&e.targetRef.value;M&&(x===null||x.id!==e.targetUid.value)&&(M.hasAttribute("tabindex")===!0||(M=M.querySelector("[tabindex]")),M&&M!==x&&M.focus({preventScroll:!0}))}function z(){pt(E)}function P(){no(E);const x=document.activeElement;x!==null&&e.rootRef.value.contains(x)&&x.blur()}function W(x){v!==null&&(clearTimeout(v),v=null),e.editable.value===!0&&e.focused.value===!1&&(e.focused.value=!0,o("focus",x))}function X(x,M){v!==null&&clearTimeout(v),v=setTimeout(()=>{v=null,!(document.hasFocus()===!0&&(e.hasPopupOpen===!0||e.controlRef===void 0||e.controlRef.value===null||e.controlRef.value.contains(document.activeElement)!==!1))&&(e.focused.value===!0&&(e.focused.value=!1,o("blur",x)),M!==void 0&&M())})}function te(x){f.stopAndPrevent(x),a.platform.is.mobile!==!0?(e.targetRef!==void 0&&e.targetRef.value||e.rootRef.value).focus():e.rootRef.value.contains(document.activeElement)===!0&&document.activeElement.blur(),l.type==="file"&&(e.inputRef.value.value=null),o("update:modelValue",null),e.changeEvent===!0&&o("change",null),o("clear",l.modelValue),t.nextTick(()=>{const M=m.value;C(),m.value=M})}function A(x){[13,32].includes(x.keyCode)&&te(x)}function K(){const x=[];return n.prepend!==void 0&&x.push(t.h("div",{class:"q-field__prepend q-field__marginal row no-wrap items-center",key:"prepend",onClick:f.prevent},n.prepend())),x.push(t.h("div",{class:"q-field__control-container col relative-position row no-wrap q-anchor--skip"},le())),d.value===!0&&l.noErrorIcon===!1&&x.push(U("error",[t.h(f.QIcon,{name:a.iconSet.field.error,color:"negative"})])),l.loading===!0||e.innerLoading.value===!0?x.push(U("inner-loading-append",n.loading!==void 0?n.loading():[t.h(f.QSpinner,{color:l.color})])):l.clearable===!0&&e.hasValue.value===!0&&e.editable.value===!0&&x.push(U("inner-clearable-append",[t.h(f.QIcon,{class:"q-field__focusable-action",name:l.clearIcon||a.iconSet.field.clear,tabindex:0,role:"button","aria-hidden":"false","aria-label":a.lang.label.clear,onKeyup:A,onClick:te})])),n.append!==void 0&&x.push(t.h("div",{class:"q-field__append q-field__marginal row no-wrap items-center",key:"append",onClick:f.prevent},n.append())),e.getInnerAppend!==void 0&&x.push(U("inner-append",e.getInnerAppend())),e.getControlChild!==void 0&&x.push(e.getControlChild()),x}function le(){const x=[];return l.prefix!==void 0&&l.prefix!==null&&x.push(t.h("div",{class:"q-field__prefix no-pointer-events row items-center"},l.prefix)),e.getShadowControl!==void 0&&e.hasShadow.value===!0&&x.push(e.getShadowControl()),e.getControl!==void 0?x.push(e.getControl()):n.rawControl!==void 0?x.push(n.rawControl()):n.control!==void 0&&x.push(t.h("div",{ref:e.targetRef,class:"q-field__native row",tabindex:-1,...e.splitAttrs.attributes.value,"data-autofocus":l.autofocus===!0||void 0},n.control(T.value))),B.value===!0&&x.push(t.h("div",{class:k.value},f.hSlot(n.label,l.label))),l.suffix!==void 0&&l.suffix!==null&&x.push(t.h("div",{class:"q-field__suffix no-pointer-events row items-center"},l.suffix)),x.concat(f.hSlot(n.default))}function ee(){let x,M;d.value===!0?y.value!==null?(x=[t.h("div",{role:"alert"},y.value)],M=`q--slot-error-${y.value}`):(x=f.hSlot(n.error),M="q--slot-error"):(l.hideHint!==!0||e.focused.value===!0)&&(l.hint!==void 0?(x=[t.h("div",l.hint)],M=`q--slot-hint-${l.hint}`):(x=f.hSlot(n.hint),M="q--slot-hint"));const ue=l.counter===!0||n.counter!==void 0;if(l.hideBottomSpace===!0&&ue===!1&&x===void 0)return;const c=t.h("div",{key:M,class:"q-field__messages col"},x);return t.h("div",{class:"q-field__bottom row items-start q-field__bottom--"+(l.hideBottomSpace!==!0?"animated":"stale"),onClick:f.prevent},[l.hideBottomSpace===!0?c:t.h(t.Transition,{name:"q-transition--field-message"},()=>c),ue===!0?t.h("div",{class:"q-field__counter"},n.counter!==void 0?n.counter():e.computedCounter.value):null])}function U(x,M){return M===null?null:t.h("div",{key:x,class:"q-field__append q-field__marginal row no-wrap items-center q-anchor--skip"},M)}let ne=!1;return t.onDeactivated(()=>{ne=!0}),t.onActivated(()=>{ne===!0&&l.autofocus===!0&&i.focus()}),l.autofocus===!0&&t.onMounted(()=>{i.focus()}),t.onBeforeUnmount(()=>{v!==null&&clearTimeout(v)}),Object.assign(i,{focus:z,blur:P}),function(){const M=e.getControl===void 0&&n.control===void 0?{...e.splitAttrs.attributes.value,"data-autofocus":l.autofocus===!0||void 0,...H.value}:H.value;return t.h(e.tag.value,{ref:e.rootRef,class:[S.value,r.class],style:r.style,...M},[n.before!==void 0?t.h("div",{class:"q-field__before q-field__marginal row no-wrap items-center",onClick:f.prevent},n.before()):null,t.h("div",{class:"q-field__inner relative-position col self-stretch"},[t.h("div",{ref:e.controlRef,class:L.value,tabindex:-1,...e.controlEvents},K()),h.value===!0?ee():null]),n.after!==void 0?t.h("div",{class:"q-field__after q-field__marginal row no-wrap items-center",onClick:f.prevent},n.after()):null])}}const io=f.createComponent({name:"QField",inheritAttrs:!1,props:{...gt,tag:{type:String,default:"label"}},emits:rl,setup(){return cl(sl({tagProp:!0}))}}),ao={xs:8,sm:10,md:14,lg:20,xl:24},ro=f.createComponent({name:"QChip",props:{...Fe,...f.useSizeProps,dense:Boolean,icon:String,iconRight:String,iconRemove:String,iconSelected:String,label:[String,Number],color:String,textColor:String,modelValue:{type:Boolean,default:!0},selected:{type:Boolean,default:null},square:Boolean,outline:Boolean,clickable:Boolean,removable:Boolean,removeAriaLabel:String,tabindex:[String,Number],disable:Boolean,ripple:{type:[Boolean,Object],default:!0}},emits:["update:modelValue","update:selected","remove","click"],setup(e,{slots:l,emit:o}){const{proxy:{$q:n}}=t.getCurrentInstance(),r=Oe(e,n),i=f.useSize(e,ao),a=t.computed(()=>e.selected===!0||e.icon!==void 0),v=t.computed(()=>e.selected===!0?e.iconSelected||n.iconSet.chip.selected:e.icon),m=t.computed(()=>e.iconRemove||n.iconSet.chip.remove),p=t.computed(()=>e.disable===!1&&(e.clickable===!0||e.selected!==null)),d=t.computed(()=>{const S=e.outline===!0&&e.color||e.textColor;return"q-chip row inline no-wrap items-center"+(e.outline===!1&&e.color!==void 0?` bg-${e.color}`:"")+(S?` text-${S} q-chip--colored`:"")+(e.disable===!0?" disabled":"")+(e.dense===!0?" q-chip--dense":"")+(e.outline===!0?" q-chip--outline":"")+(e.selected===!0?" q-chip--selected":"")+(p.value===!0?" q-chip--clickable cursor-pointer non-selectable q-hoverable":"")+(e.square===!0?" q-chip--square":"")+(r.value===!0?" q-chip--dark q-dark":"")}),y=t.computed(()=>{const S=e.disable===!0?{tabindex:-1,"aria-disabled":"true"}:{tabindex:e.tabindex||0},L={...S,role:"button","aria-hidden":"false","aria-label":e.removeAriaLabel||n.lang.label.remove};return{chip:S,remove:L}});function C(S){S.keyCode===13&&s(S)}function s(S){e.disable||(o("update:selected",!e.selected),o("click",S))}function h(S){(S.keyCode===void 0||S.keyCode===13)&&(f.stopAndPrevent(S),e.disable===!1&&(o("update:modelValue",!1),o("remove")))}function V(){const S=[];p.value===!0&&S.push(t.h("div",{class:"q-focus-helper"})),a.value===!0&&S.push(t.h(f.QIcon,{class:"q-chip__icon q-chip__icon--left",name:v.value}));const L=e.label!==void 0?[t.h("div",{class:"ellipsis"},[e.label])]:void 0;return S.push(t.h("div",{class:"q-chip__content col row no-wrap items-center q-anchor--skip"},f.hMergeSlotSafely(l.default,L))),e.iconRight&&S.push(t.h(f.QIcon,{class:"q-chip__icon q-chip__icon--right",name:e.iconRight})),e.removable===!0&&S.push(t.h(f.QIcon,{class:"q-chip__icon q-chip__icon--remove cursor-pointer",name:m.value,...y.value.remove,onClick:h,onKeyup:h})),S}return()=>{if(e.modelValue===!1)return;const S={class:d.value,style:i.value};return p.value===!0&&Object.assign(S,y.value.chip,{onClick:s,onKeyup:C}),f.hDir("div",S,V(),"ripple",e.ripple!==!1&&e.disable!==!0,()=>[[f.Ripple,e.ripple]])}}});function so(){if(window.getSelection!==void 0){const e=window.getSelection();e.empty!==void 0?e.empty():e.removeAllRanges!==void 0&&(e.removeAllRanges(),Y.Platform.is.mobile!==!0&&e.addRange(document.createRange()))}else document.selection!==void 0&&document.selection.empty()}const co={target:{type:[Boolean,String,Element],default:!0},noParentEvent:Boolean},fo={...co,contextMenu:Boolean};function vo({showing:e,avoidEmit:l,configureAnchorEl:o}){const{props:n,proxy:r,emit:i}=t.getCurrentInstance(),a=t.ref(null);let v=null;function m(s){return a.value===null?!1:s===void 0||s.touches===void 0||s.touches.length<=1}const p={};o===void 0&&(Object.assign(p,{hide(s){r.hide(s)},toggle(s){r.toggle(s),s.qAnchorHandled=!0},toggleKey(s){f.isKeyCode(s,13)===!0&&p.toggle(s)},contextClick(s){r.hide(s),f.prevent(s),t.nextTick(()=>{r.show(s),s.qAnchorHandled=!0})},prevent:f.prevent,mobileTouch(s){if(p.mobileCleanup(s),m(s)!==!0)return;r.hide(s),a.value.classList.add("non-selectable");const h=s.target;f.addEvt(p,"anchor",[[h,"touchmove","mobileCleanup","passive"],[h,"touchend","mobileCleanup","passive"],[h,"touchcancel","mobileCleanup","passive"],[a.value,"contextmenu","prevent","notPassive"]]),v=setTimeout(()=>{v=null,r.show(s),s.qAnchorHandled=!0},300)},mobileCleanup(s){a.value.classList.remove("non-selectable"),v!==null&&(clearTimeout(v),v=null),e.value===!0&&s!==void 0&&so()}}),o=function(s=n.contextMenu){if(n.noParentEvent===!0||a.value===null)return;let h;s===!0?r.$q.platform.is.mobile===!0?h=[[a.value,"touchstart","mobileTouch","passive"]]:h=[[a.value,"mousedown","hide","passive"],[a.value,"contextmenu","contextClick","notPassive"]]:h=[[a.value,"click","toggle","passive"],[a.value,"keyup","toggleKey","passive"]],f.addEvt(p,"anchor",h)});function d(){f.cleanEvt(p,"anchor")}function y(s){for(a.value=s;a.value.classList.contains("q-anchor--skip");)a.value=a.value.parentNode;o()}function C(){if(n.target===!1||n.target===""||r.$el.parentNode===null)a.value=null;else if(n.target===!0)y(r.$el.parentNode);else{let s=n.target;if(typeof n.target=="string")try{s=document.querySelector(n.target)}catch{s=void 0}s!=null?(a.value=s.$el||s,o()):(a.value=null,console.error(`Anchor: target "${n.target}" not found`))}}return t.watch(()=>n.contextMenu,s=>{a.value!==null&&(d(),o(s))}),t.watch(()=>n.target,()=>{a.value!==null&&d(),C()}),t.watch(()=>n.noParentEvent,s=>{a.value!==null&&(s===!0?d():o())}),t.onMounted(()=>{C(),l!==!0&&n.modelValue===!0&&a.value===null&&i("update:modelValue",!1)}),t.onBeforeUnmount(()=>{v!==null&&clearTimeout(v),d()}),{anchorEl:a,canShow:m,anchorEvents:p}}function mo(e,l){const o=t.ref(null);let n;function r(v,m){const p=`${m!==void 0?"add":"remove"}EventListener`,d=m!==void 0?m:n;v!==window&&v[p]("scroll",d,f.listenOpts.passive),window[p]("scroll",d,f.listenOpts.passive),n=m}function i(){o.value!==null&&(r(o.value),o.value=null)}const a=t.watch(()=>e.noParentEvent,()=>{o.value!==null&&(i(),l())});return t.onBeforeUnmount(a),{localScrollTarget:o,unconfigureScrollTarget:i,changeScrollEvent:r}}const dl={modelValue:{type:Boolean,default:null},"onUpdate:modelValue":[Function,Array]},fl=["beforeShow","show","beforeHide","hide"];function vl({showing:e,canShow:l,hideOnRouteChange:o,handleShow:n,handleHide:r,processOnMount:i}){const a=t.getCurrentInstance(),{props:v,emit:m,proxy:p}=a;let d;function y(B){e.value===!0?h(B):C(B)}function C(B){if(v.disable===!0||B!==void 0&&B.qAnchorHandled===!0||l!==void 0&&l(B)!==!0)return;const k=v["onUpdate:modelValue"]!==void 0;k===!0&&(m("update:modelValue",!0),d=B,t.nextTick(()=>{d===B&&(d=void 0)})),(v.modelValue===null||k===!1)&&s(B)}function s(B){e.value!==!0&&(e.value=!0,m("beforeShow",B),n!==void 0?n(B):m("show",B))}function h(B){if(v.disable===!0)return;const k=v["onUpdate:modelValue"]!==void 0;k===!0&&(m("update:modelValue",!1),d=B,t.nextTick(()=>{d===B&&(d=void 0)})),(v.modelValue===null||k===!1)&&V(B)}function V(B){e.value!==!1&&(e.value=!1,m("beforeHide",B),r!==void 0?r(B):m("hide",B))}function S(B){v.disable===!0&&B===!0?v["onUpdate:modelValue"]!==void 0&&m("update:modelValue",!1):B===!0!==e.value&&(B===!0?s:V)(d)}t.watch(()=>v.modelValue,S),o!==void 0&&f.vmHasRouter(a)===!0&&t.watch(()=>p.$route.fullPath,()=>{o.value===!0&&e.value===!0&&h()}),t.onMounted(()=>{S(v.modelValue)});const L={show:C,hide:h,toggle:y};return Object.assign(p,L),L}const Lt={};let ho=1,po=document.body;function go(e,l){const o=document.createElement("div");if(o.id=l!==void 0?`q-portal--${l}--${ho++}`:e,Lt.globalNodes!==void 0){const n=Lt.globalNodes.class;n!==void 0&&(o.className=n)}return po.appendChild(o),o}function bo(e){e.remove()}const Me=[];function yo(e,l){do{if(e.$options.name==="QMenu"){if(e.hide(l),e.$props.separateClosePopup===!0)return f.getParentProxy(e)}else if(e.__qPortal===!0){const o=f.getParentProxy(e);return o!==void 0&&o.$options.name==="QPopupProxy"?(e.hide(l),o):e}e=f.getParentProxy(e)}while(e!=null)}const So=f.createComponent({name:"QPortal",setup(e,{slots:l}){return()=>l.default()}});function _o(e){for(e=e.parent;e!=null;){if(e.type.name==="QGlobalDialog")return!0;if(e.type.name==="QDialog"||e.type.name==="QMenu")return!1;e=e.parent}return!1}function ml(e,l,o,n){const r=t.ref(!1),i=t.ref(!1);let a=null;const v={},m=n==="dialog"&&_o(e);function p(y){if(y===!0){jt(v),i.value=!0;return}i.value=!1,r.value===!1&&(m===!1&&a===null&&(a=go(!1,n)),r.value=!0,Me.push(e.proxy),oo(v))}function d(y){if(i.value=!1,y!==!0)return;jt(v),r.value=!1;const C=Me.indexOf(e.proxy);C!==-1&&Me.splice(C,1),a!==null&&(bo(a),a=null)}return t.onUnmounted(()=>{d(!0)}),e.proxy.__qPortal=!0,Y.injectProp(e.proxy,"contentEl",()=>l.value),{showPortal:p,hidePortal:d,portalIsActive:r,portalIsAccessible:i,renderPortal:()=>m===!0?o():r.value===!0?[t.h(t.Teleport,{to:a},t.h(So,o))]:void 0}}const hl={transitionShow:{type:String,default:"fade"},transitionHide:{type:String,default:"fade"},transitionDuration:{type:[String,Number],default:300}};function pl(e,l=()=>{},o=()=>{}){return{transitionProps:t.computed(()=>{const n=`q-transition--${e.transitionShow||l()}`,r=`q-transition--${e.transitionHide||o()}`;return{appear:!0,enterFromClass:`${n}-enter-from`,enterActiveClass:`${n}-enter-active`,enterToClass:`${n}-enter-to`,leaveFromClass:`${r}-leave-from`,leaveActiveClass:`${r}-leave-active`,leaveToClass:`${r}-leave-to`}}),transitionStyle:t.computed(()=>`--q-transition-duration: ${e.transitionDuration}ms`)}}function gl(){let e;const l=t.getCurrentInstance();function o(){e=void 0}return t.onDeactivated(o),t.onBeforeUnmount(o),{removeTick:o,registerTick(n){e=n,t.nextTick(()=>{e===n&&(f.vmIsDestroyed(l)===!1&&e(),e=void 0)})}}}function bl(){let e=null;const l=t.getCurrentInstance();function o(){e!==null&&(clearTimeout(e),e=null)}return t.onDeactivated(o),t.onBeforeUnmount(o),{removeTimeout:o,registerTimeout(n,r){o(),f.vmIsDestroyed(l)===!1&&(e=setTimeout(()=>{e=null,n()},r))}}}const wo=[Element,String],Co=[null,document,document.body,document.scrollingElement,document.documentElement];function xo(e,l){let o=f.getElement(l);if(o===void 0){if(e==null)return window;o=e.closest(".scroll,.scroll-y,.overflow-auto")}return Co.includes(o)?window:o}function ko(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function qo(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}let Ke;function Vo(){if(Ke!==void 0)return Ke;const e=document.createElement("p"),l=document.createElement("div");f.css(e,{width:"100%",height:"200px"}),f.css(l,{position:"absolute",top:"0px",left:"0px",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),l.appendChild(e),document.body.appendChild(l);const o=e.offsetWidth;l.style.overflow="scroll";let n=e.offsetWidth;return o===n&&(n=l.clientWidth),l.remove(),Ke=o-n,Ke}function Bo(e,l=!0){return!e||e.nodeType!==Node.ELEMENT_NODE?!1:l?e.scrollHeight>e.clientHeight&&(e.classList.contains("scroll")||e.classList.contains("overflow-auto")||["auto","scroll"].includes(window.getComputedStyle(e)["overflow-y"])):e.scrollWidth>e.clientWidth&&(e.classList.contains("scroll")||e.classList.contains("overflow-auto")||["auto","scroll"].includes(window.getComputedStyle(e)["overflow-x"]))}const ge=[];let Ve;function Eo(e){Ve=e.keyCode===27}function Ao(){Ve===!0&&(Ve=!1)}function To(e){Ve===!0&&(Ve=!1,f.isKeyCode(e,27)===!0&&ge[ge.length-1](e))}function yl(e){window[e]("keydown",Eo),window[e]("blur",Ao),window[e]("keyup",To),Ve=!1}function Sl(e){Y.client.is.desktop===!0&&(ge.push(e),ge.length===1&&yl("addEventListener"))}function Ye(e){const l=ge.indexOf(e);l!==-1&&(ge.splice(l,1),ge.length===0&&yl("removeEventListener"))}const{notPassiveCapture:Ge}=f.listenOpts,be=[];function Ze(e){const l=e.target;if(l===void 0||l.nodeType===8||l.classList.contains("no-pointer-events")===!0)return;let o=Me.length-1;for(;o>=0;){const n=Me[o].$;if(n.type.name==="QTooltip"){o--;continue}if(n.type.name!=="QDialog")break;if(n.props.seamless!==!0)return;o--}for(let n=be.length-1;n>=0;n--){const r=be[n];if((r.anchorEl.value===null||r.anchorEl.value.contains(l)===!1)&&(l===document.body||r.innerRef.value!==null&&r.innerRef.value.contains(l)===!1))e.qClickOutside=!0,r.onClickOutside(e);else return}}function Ro(e){be.push(e),be.length===1&&(document.addEventListener("mousedown",Ze,Ge),document.addEventListener("touchstart",Ze,Ge))}function Ht(e){const l=be.findIndex(o=>o===e);l!==-1&&(be.splice(l,1),be.length===0&&(document.removeEventListener("mousedown",Ze,Ge),document.removeEventListener("touchstart",Ze,Ge)))}let $t,Dt;function Nt(e){const l=e.split(" ");return l.length!==2?!1:["top","center","bottom"].includes(l[0])!==!0?(console.error("Anchor/Self position must start with one of top/center/bottom"),!1):["left","middle","right","start","end"].includes(l[1])!==!0?(console.error("Anchor/Self position must end with one of left/middle/right/start/end"),!1):!0}function Io(e){return e?!(e.length!==2||typeof e[0]!="number"||typeof e[1]!="number"):!0}const ht={"start#ltr":"left","start#rtl":"right","end#ltr":"right","end#rtl":"left"};["left","middle","right"].forEach(e=>{ht[`${e}#ltr`]=e,ht[`${e}#rtl`]=e});function Wt(e,l){const o=e.split(" ");return{vertical:o[0],horizontal:ht[`${o[1]}#${l===!0?"rtl":"ltr"}`]}}function Mo(e,l){let{top:o,left:n,right:r,bottom:i,width:a,height:v}=e.getBoundingClientRect();return l!==void 0&&(o-=l[1],n-=l[0],i+=l[1],r+=l[0],a+=l[0],v+=l[1]),{top:o,bottom:i,height:v,left:n,right:r,width:a,middle:n+(r-n)/2,center:o+(i-o)/2}}function zo(e,l,o){let{top:n,left:r}=e.getBoundingClientRect();return n+=l.top,r+=l.left,o!==void 0&&(n+=o[1],r+=o[0]),{top:n,bottom:n+1,height:1,left:r,right:r+1,width:1,middle:r,center:n}}function Fo(e,l){return{top:0,center:l/2,bottom:l,left:0,middle:e/2,right:e}}function Kt(e,l,o,n){return{top:e[o.vertical]-l[n.vertical],left:e[o.horizontal]-l[n.horizontal]}}function _l(e,l=0){if(e.targetEl===null||e.anchorEl===null||l>5)return;if(e.targetEl.offsetHeight===0||e.targetEl.offsetWidth===0){setTimeout(()=>{_l(e,l+1)},10);return}const{targetEl:o,offset:n,anchorEl:r,anchorOrigin:i,selfOrigin:a,absoluteOffset:v,fit:m,cover:p,maxHeight:d,maxWidth:y}=e;if(Y.client.is.ios===!0&&window.visualViewport!==void 0){const E=document.body.style,{offsetLeft:z,offsetTop:P}=window.visualViewport;z!==$t&&(E.setProperty("--q-pe-left",z+"px"),$t=z),P!==Dt&&(E.setProperty("--q-pe-top",P+"px"),Dt=P)}const{scrollLeft:C,scrollTop:s}=o,h=v===void 0?Mo(r,p===!0?[0,0]:n):zo(r,v,n);Object.assign(o.style,{top:0,left:0,minWidth:null,minHeight:null,maxWidth:y,maxHeight:d,visibility:"visible"});const{offsetWidth:V,offsetHeight:S}=o,{elWidth:L,elHeight:B}=m===!0||p===!0?{elWidth:Math.max(h.width,V),elHeight:p===!0?Math.max(h.height,S):S}:{elWidth:V,elHeight:S};let k={maxWidth:y,maxHeight:d};(m===!0||p===!0)&&(k.minWidth=h.width+"px",p===!0&&(k.minHeight=h.height+"px")),Object.assign(o.style,k);const T=Fo(L,B);let H=Kt(h,T,i,a);if(v===void 0||n===void 0)at(H,h,T,i,a);else{const{top:E,left:z}=H;at(H,h,T,i,a);let P=!1;if(H.top!==E){P=!0;const W=2*n[1];h.center=h.top-=W,h.bottom-=W+2}if(H.left!==z){P=!0;const W=2*n[0];h.middle=h.left-=W,h.right-=W+2}P===!0&&(H=Kt(h,T,i,a),at(H,h,T,i,a))}k={top:H.top+"px",left:H.left+"px"},H.maxHeight!==void 0&&(k.maxHeight=H.maxHeight+"px",h.height>H.maxHeight&&(k.minHeight=k.maxHeight)),H.maxWidth!==void 0&&(k.maxWidth=H.maxWidth+"px",h.width>H.maxWidth&&(k.minWidth=k.maxWidth)),Object.assign(o.style,k),o.scrollTop!==s&&(o.scrollTop=s),o.scrollLeft!==C&&(o.scrollLeft=C)}function at(e,l,o,n,r){const i=o.bottom,a=o.right,v=Vo(),m=window.innerHeight-v,p=document.body.clientWidth;if(e.top<0||e.top+i>m)if(r.vertical==="center")e.top=l[n.vertical]>m/2?Math.max(0,m-i):0,e.maxHeight=Math.min(i,m);else if(l[n.vertical]>m/2){const d=Math.min(m,n.vertical==="center"?l.center:n.vertical===r.vertical?l.bottom:l.top);e.maxHeight=Math.min(i,d),e.top=Math.max(0,d-i)}else e.top=Math.max(0,n.vertical==="center"?l.center:n.vertical===r.vertical?l.top:l.bottom),e.maxHeight=Math.min(i,m-e.top);if(e.left<0||e.left+a>p)if(e.maxWidth=Math.min(a,p),r.horizontal==="middle")e.left=l[n.horizontal]>p/2?Math.max(0,p-a):0;else if(l[n.horizontal]>p/2){const d=Math.min(p,n.horizontal==="middle"?l.middle:n.horizontal===r.horizontal?l.right:l.left);e.maxWidth=Math.min(a,d),e.left=Math.max(0,d-e.maxWidth)}else e.left=Math.max(0,n.horizontal==="middle"?l.middle:n.horizontal===r.horizontal?l.left:l.right),e.maxWidth=Math.min(a,p-e.left)}const Oo=f.createComponent({name:"QMenu",inheritAttrs:!1,props:{...fo,...dl,...Fe,...hl,persistent:Boolean,autoClose:Boolean,separateClosePopup:Boolean,noRouteDismiss:Boolean,noRefocus:Boolean,noFocus:Boolean,fit:Boolean,cover:Boolean,square:Boolean,anchor:{type:String,validator:Nt},self:{type:String,validator:Nt},offset:{type:Array,validator:Io},scrollTarget:wo,touchPosition:Boolean,maxHeight:{type:String,default:null},maxWidth:{type:String,default:null}},emits:[...fl,"click","escapeKey"],setup(e,{slots:l,emit:o,attrs:n}){let r=null,i,a,v;const m=t.getCurrentInstance(),{proxy:p}=m,{$q:d}=p,y=t.ref(null),C=t.ref(!1),s=t.computed(()=>e.persistent!==!0&&e.noRouteDismiss!==!0),h=Oe(e,d),{registerTick:V,removeTick:S}=gl(),{registerTimeout:L}=bl(),{transitionProps:B,transitionStyle:k}=pl(e),{localScrollTarget:T,changeScrollEvent:H,unconfigureScrollTarget:E}=mo(e,F),{anchorEl:z,canShow:P}=vo({showing:C}),{hide:W}=vl({showing:C,canShow:P,handleShow:ue,handleHide:c,hideOnRouteChange:s,processOnMount:!0}),{showPortal:X,hidePortal:te,renderPortal:A}=ml(m,y,N,"menu"),K={anchorEl:z,innerRef:y,onClickOutside(b){if(e.persistent!==!0&&C.value===!0)return W(b),(b.type==="touchstart"||b.target.classList.contains("q-dialog__backdrop"))&&f.stopAndPrevent(b),!0}},le=t.computed(()=>Wt(e.anchor||(e.cover===!0?"center middle":"bottom start"),d.lang.rtl)),ee=t.computed(()=>e.cover===!0?le.value:Wt(e.self||"top start",d.lang.rtl)),U=t.computed(()=>(e.square===!0?" q-menu--square":"")+(h.value===!0?" q-menu--dark q-dark":"")),ne=t.computed(()=>e.autoClose===!0?{onClick:q}:{}),x=t.computed(()=>C.value===!0&&e.persistent!==!0);t.watch(x,b=>{b===!0?(Sl(I),Ro(K)):(Ye(I),Ht(K))});function M(){pt(()=>{let b=y.value;b&&b.contains(document.activeElement)!==!0&&(b=b.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]")||b.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]")||b.querySelector("[autofocus], [data-autofocus]")||b,b.focus({preventScroll:!0}))})}function ue(b){if(r=e.noRefocus===!1?document.activeElement:null,Y.addFocusout(O),X(),F(),i=void 0,b!==void 0&&(e.touchPosition||e.contextMenu)){const G=f.position(b);if(G.left!==void 0){const{top:ae,left:ye}=z.value.getBoundingClientRect();i={left:G.left-ye,top:G.top-ae}}}a===void 0&&(a=t.watch(()=>d.screen.width+"|"+d.screen.height+"|"+e.self+"|"+e.anchor+"|"+d.lang.rtl,R)),e.noFocus!==!0&&document.activeElement.blur(),V(()=>{R(),e.noFocus!==!0&&M()}),L(()=>{d.platform.is.ios===!0&&(v=e.autoClose,y.value.click()),R(),X(!0),o("show",b)},e.transitionDuration)}function c(b){S(),te(),g(!0),r!==null&&(b===void 0||b.qClickOutside!==!0)&&(((b&&b.type.indexOf("key")===0?r.closest('[tabindex]:not([tabindex^="-"])'):void 0)||r).focus(),r=null),L(()=>{te(!0),o("hide",b)},e.transitionDuration)}function g(b){i=void 0,a!==void 0&&(a(),a=void 0),(b===!0||C.value===!0)&&(Y.removeFocusout(O),E(),Ht(K),Ye(I)),b!==!0&&(r=null)}function F(){(z.value!==null||e.scrollTarget!==void 0)&&(T.value=xo(z.value,e.scrollTarget),H(T.value,R))}function q(b){v!==!0?(yo(p,b),o("click",b)):v=!1}function O(b){x.value===!0&&e.noFocus!==!0&&f.childHasFocus(y.value,b.target)!==!0&&M()}function I(b){o("escapeKey"),W(b)}function R(){_l({targetEl:y.value,offset:e.offset,anchorEl:z.value,anchorOrigin:le.value,selfOrigin:ee.value,absoluteOffset:i,fit:e.fit,cover:e.cover,maxHeight:e.maxHeight,maxWidth:e.maxWidth})}function N(){return t.h(t.Transition,B.value,()=>C.value===!0?t.h("div",{role:"menu",...n,ref:y,tabindex:-1,class:["q-menu q-position-engine scroll"+U.value,n.class],style:[n.style,k.value],...ne.value},f.hSlot(l.default)):null)}return t.onBeforeUnmount(g),Object.assign(p,{focus:M,updatePosition:R}),A}});function Po(e,l,o){function n(){}return t.onBeforeUnmount(()=>{e.value===!0&&void 0}),{removeFromHistory:n,addToHistory(){}}}let Te=0,rt,st,Ie,ct=!1,Ut,Qt,Xt,he=null;function jo(e){Lo(e)&&f.stopAndPrevent(e)}function Lo(e){if(e.target===document.body||e.target.classList.contains("q-layout__backdrop"))return!0;const l=f.getEventPath(e),o=e.shiftKey&&!e.deltaX,n=!o&&Math.abs(e.deltaX)<=Math.abs(e.deltaY),r=o||n?e.deltaY:e.deltaX;for(let i=0;i<l.length;i++){const a=l[i];if(Bo(a,n))return n?r<0&&a.scrollTop===0?!0:r>0&&a.scrollTop+a.clientHeight===a.scrollHeight:r<0&&a.scrollLeft===0?!0:r>0&&a.scrollLeft+a.clientWidth===a.scrollWidth}return!0}function Yt(e){e.target===document&&(document.scrollingElement.scrollTop=document.scrollingElement.scrollTop)}function Ue(e){ct!==!0&&(ct=!0,requestAnimationFrame(()=>{ct=!1;const{height:l}=e.target,{clientHeight:o,scrollTop:n}=document.scrollingElement;(Ie===void 0||l!==window.innerHeight)&&(Ie=o-l,document.scrollingElement.scrollTop=n),n>Ie&&(document.scrollingElement.scrollTop-=Math.ceil((n-Ie)/8))}))}function Gt(e){const l=document.body,o=window.visualViewport!==void 0;if(e==="add"){const{overflowY:n,overflowX:r}=window.getComputedStyle(l);rt=qo(window),st=ko(window),Ut=l.style.left,Qt=l.style.top,Xt=window.location.href,l.style.left=`-${rt}px`,l.style.top=`-${st}px`,r!=="hidden"&&(r==="scroll"||l.scrollWidth>window.innerWidth)&&l.classList.add("q-body--force-scrollbar-x"),n!=="hidden"&&(n==="scroll"||l.scrollHeight>window.innerHeight)&&l.classList.add("q-body--force-scrollbar-y"),l.classList.add("q-body--prevent-scroll"),document.qScrollPrevented=!0,Y.client.is.ios===!0&&(o===!0?(window.scrollTo(0,0),window.visualViewport.addEventListener("resize",Ue,f.listenOpts.passiveCapture),window.visualViewport.addEventListener("scroll",Ue,f.listenOpts.passiveCapture),window.scrollTo(0,0)):window.addEventListener("scroll",Yt,f.listenOpts.passiveCapture))}Y.client.is.desktop===!0&&Y.client.is.mac===!0&&window[`${e}EventListener`]("wheel",jo,f.listenOpts.notPassive),e==="remove"&&(Y.client.is.ios===!0&&(o===!0?(window.visualViewport.removeEventListener("resize",Ue,f.listenOpts.passiveCapture),window.visualViewport.removeEventListener("scroll",Ue,f.listenOpts.passiveCapture)):window.removeEventListener("scroll",Yt,f.listenOpts.passiveCapture)),l.classList.remove("q-body--prevent-scroll"),l.classList.remove("q-body--force-scrollbar-x"),l.classList.remove("q-body--force-scrollbar-y"),document.qScrollPrevented=!1,l.style.left=Ut,l.style.top=Qt,window.location.href===Xt&&window.scrollTo(rt,st),Ie=void 0)}function Ho(e){let l="add";if(e===!0){if(Te++,he!==null){clearTimeout(he),he=null;return}if(Te>1)return}else{if(Te===0||(Te--,Te>0))return;if(l="remove",Y.client.is.ios===!0&&Y.client.is.nativeMobile===!0){he!==null&&clearTimeout(he),he=setTimeout(()=>{Gt(l),he=null},100);return}}Gt(l)}function $o(){let e;return{preventBodyScroll(l){l!==e&&(e!==void 0||l===!0)&&(e=l,Ho(l))}}}let Qe=0;const Do={standard:"fixed-full flex-center",top:"fixed-top justify-center",bottom:"fixed-bottom justify-center",right:"fixed-right items-center",left:"fixed-left items-center"},Zt={standard:["scale","scale"],top:["slide-down","slide-up"],bottom:["slide-up","slide-down"],right:["slide-left","slide-right"],left:["slide-right","slide-left"]},No=f.createComponent({name:"QDialog",inheritAttrs:!1,props:{...dl,...hl,transitionShow:String,transitionHide:String,persistent:Boolean,autoClose:Boolean,allowFocusOutside:Boolean,noEscDismiss:Boolean,noBackdropDismiss:Boolean,noRouteDismiss:Boolean,noRefocus:Boolean,noFocus:Boolean,noShake:Boolean,seamless:Boolean,maximized:Boolean,fullWidth:Boolean,fullHeight:Boolean,square:Boolean,backdropFilter:String,position:{type:String,default:"standard",validator:e=>["standard","top","bottom","left","right"].includes(e)}},emits:[...fl,"shake","click","escapeKey"],setup(e,{slots:l,emit:o,attrs:n}){const r=t.getCurrentInstance(),i=t.ref(null),a=t.ref(!1),v=t.ref(!1);let m=null,p=null,d,y;const C=t.computed(()=>e.persistent!==!0&&e.noRouteDismiss!==!0&&e.seamless!==!0),{preventBodyScroll:s}=$o(),{registerTimeout:h}=bl(),{registerTick:V,removeTick:S}=gl(),{transitionProps:L,transitionStyle:B}=pl(e,()=>Zt[e.position][0],()=>Zt[e.position][1]),k=t.computed(()=>B.value+(e.backdropFilter!==void 0?`;backdrop-filter:${e.backdropFilter};-webkit-backdrop-filter:${e.backdropFilter}`:"")),{showPortal:T,hidePortal:H,portalIsAccessible:E,renderPortal:z}=ml(r,i,F,"dialog"),{hide:P}=vl({showing:a,hideOnRouteChange:C,handleShow:K,handleHide:le,processOnMount:!0});Po(a);const W=t.computed(()=>`q-dialog__inner flex no-pointer-events q-dialog__inner--${e.maximized===!0?"maximized":"minimized"} q-dialog__inner--${e.position} ${Do[e.position]}`+(v.value===!0?" q-dialog__inner--animating":"")+(e.fullWidth===!0?" q-dialog__inner--fullwidth":"")+(e.fullHeight===!0?" q-dialog__inner--fullheight":"")+(e.square===!0?" q-dialog__inner--square":"")),X=t.computed(()=>a.value===!0&&e.seamless!==!0),te=t.computed(()=>e.autoClose===!0?{onClick:ue}:{}),A=t.computed(()=>[`q-dialog fullscreen no-pointer-events q-dialog--${X.value===!0?"modal":"seamless"}`,n.class]);t.watch(()=>e.maximized,q=>{a.value===!0&&M(q)}),t.watch(X,q=>{s(q),q===!0?(Y.addFocusout(g),Sl(ne)):(Y.removeFocusout(g),Ye(ne))});function K(q){p=e.noRefocus===!1&&document.activeElement!==null?document.activeElement:null,M(e.maximized),T(),v.value=!0,e.noFocus!==!0?(document.activeElement!==null&&document.activeElement.blur(),V(ee)):S(),h(()=>{if(r.proxy.$q.platform.is.ios===!0){if(e.seamless!==!0&&document.activeElement){const{top:O,bottom:I}=document.activeElement.getBoundingClientRect(),{innerHeight:R}=window,N=window.visualViewport!==void 0?window.visualViewport.height:R;O>0&&I>N/2&&(document.scrollingElement.scrollTop=Math.min(document.scrollingElement.scrollHeight-N,I>=R?1/0:Math.ceil(document.scrollingElement.scrollTop+I-N/2))),document.activeElement.scrollIntoView()}y=!0,i.value.click(),y=!1}T(!0),v.value=!1,o("show",q)},e.transitionDuration)}function le(q){S(),x(!0),v.value=!0,H(),p!==null&&(((q&&q.type.indexOf("key")===0?p.closest('[tabindex]:not([tabindex^="-"])'):void 0)||p).focus(),p=null),h(()=>{H(!0),v.value=!1,o("hide",q)},e.transitionDuration)}function ee(q){pt(()=>{let O=i.value;if(O!==null){if(q!==void 0){const I=O.querySelector(q);if(I!==null){I.focus({preventScroll:!0});return}}O.contains(document.activeElement)!==!0&&(O=O.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]")||O.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]")||O.querySelector("[autofocus], [data-autofocus]")||O,O.focus({preventScroll:!0}))}})}function U(q){q&&typeof q.focus=="function"?q.focus({preventScroll:!0}):ee(),o("shake");const O=i.value;O!==null&&(O.classList.remove("q-animate--scale"),O.classList.add("q-animate--scale"),m!==null&&clearTimeout(m),m=setTimeout(()=>{m=null,i.value!==null&&(O.classList.remove("q-animate--scale"),ee())},170))}function ne(){e.seamless!==!0&&(e.persistent===!0||e.noEscDismiss===!0?e.maximized!==!0&&e.noShake!==!0&&U():(o("escapeKey"),P()))}function x(q){m!==null&&(clearTimeout(m),m=null),(q===!0||a.value===!0)&&(M(!1),e.seamless!==!0&&(s(!1),Y.removeFocusout(g),Ye(ne))),q!==!0&&(p=null)}function M(q){q===!0?d!==!0&&(Qe<1&&document.body.classList.add("q-body--dialog"),Qe++,d=!0):d===!0&&(Qe<2&&document.body.classList.remove("q-body--dialog"),Qe--,d=!1)}function ue(q){y!==!0&&(P(q),o("click",q))}function c(q){e.persistent!==!0&&e.noBackdropDismiss!==!0?P(q):e.noShake!==!0&&U()}function g(q){e.allowFocusOutside!==!0&&E.value===!0&&f.childHasFocus(i.value,q.target)!==!0&&ee('[tabindex]:not([tabindex="-1"])')}Object.assign(r.proxy,{focus:ee,shake:U,__updateRefocusTarget(q){p=q||null}}),t.onBeforeUnmount(x);function F(){return t.h("div",{role:"dialog","aria-modal":X.value===!0?"true":"false",...n,class:A.value},[t.h(t.Transition,{name:"q-transition--fade",appear:!0},()=>X.value===!0?t.h("div",{class:"q-dialog__backdrop fixed-full",style:k.value,"aria-hidden":"true",tabindex:-1,onClick:c}):null),t.h(t.Transition,L.value,()=>a.value===!0?t.h("div",{ref:i,class:W.value,style:B.value,tabindex:-1,...te.value},f.hSlot(l.default)):null)])}return z}});let Je=!1;{const e=document.createElement("div");e.setAttribute("dir","rtl"),Object.assign(e.style,{width:"1px",height:"1px",overflow:"auto"});const l=document.createElement("div");Object.assign(l.style,{width:"1000px",height:"1px"}),document.body.appendChild(e),e.appendChild(l),e.scrollLeft=-1e3,Je=e.scrollLeft>=0,e.remove()}const ie=1e3,Wo=["start","center","end","start-force","center-force","end-force"],wl=Array.prototype.filter,Ko=window.getComputedStyle(document.body).overflowAnchor===void 0?f.noop:function(e,l){e!==null&&(e._qOverflowAnimationFrame!==void 0&&cancelAnimationFrame(e._qOverflowAnimationFrame),e._qOverflowAnimationFrame=requestAnimationFrame(()=>{if(e===null)return;e._qOverflowAnimationFrame=void 0;const o=e.children||[];wl.call(o,r=>r.dataset&&r.dataset.qVsAnchor!==void 0).forEach(r=>{delete r.dataset.qVsAnchor});const n=o[l];n&&n.dataset&&(n.dataset.qVsAnchor="")}))};function qe(e,l){return e+l}function dt(e,l,o,n,r,i,a,v){const m=e===window?document.scrollingElement||document.documentElement:e,p=r===!0?"offsetWidth":"offsetHeight",d={scrollStart:0,scrollViewSize:-a-v,scrollMaxSize:0,offsetStart:-a,offsetEnd:-v};if(r===!0?(e===window?(d.scrollStart=window.pageXOffset||window.scrollX||document.body.scrollLeft||0,d.scrollViewSize+=document.documentElement.clientWidth):(d.scrollStart=m.scrollLeft,d.scrollViewSize+=m.clientWidth),d.scrollMaxSize=m.scrollWidth,i===!0&&(d.scrollStart=(Je===!0?d.scrollMaxSize-d.scrollViewSize:0)-d.scrollStart)):(e===window?(d.scrollStart=window.pageYOffset||window.scrollY||document.body.scrollTop||0,d.scrollViewSize+=document.documentElement.clientHeight):(d.scrollStart=m.scrollTop,d.scrollViewSize+=m.clientHeight),d.scrollMaxSize=m.scrollHeight),o!==null)for(let y=o.previousElementSibling;y!==null;y=y.previousElementSibling)y.classList.contains("q-virtual-scroll--skip")===!1&&(d.offsetStart+=y[p]);if(n!==null)for(let y=n.nextElementSibling;y!==null;y=y.nextElementSibling)y.classList.contains("q-virtual-scroll--skip")===!1&&(d.offsetEnd+=y[p]);if(l!==e){const y=m.getBoundingClientRect(),C=l.getBoundingClientRect();r===!0?(d.offsetStart+=C.left-y.left,d.offsetEnd-=C.width):(d.offsetStart+=C.top-y.top,d.offsetEnd-=C.height),e!==window&&(d.offsetStart+=d.scrollStart),d.offsetEnd+=d.scrollMaxSize-d.offsetStart}return d}function Jt(e,l,o,n){l==="end"&&(l=(e===window?document.body:e)[o===!0?"scrollWidth":"scrollHeight"]),e===window?o===!0?(n===!0&&(l=(Je===!0?document.body.scrollWidth-document.documentElement.clientWidth:0)-l),window.scrollTo(l,window.pageYOffset||window.scrollY||document.body.scrollTop||0)):window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,l):o===!0?(n===!0&&(l=(Je===!0?e.scrollWidth-e.offsetWidth:0)-l),e.scrollLeft=l):e.scrollTop=l}function Re(e,l,o,n){if(o>=n)return 0;const r=l.length,i=Math.floor(o/ie),a=Math.floor((n-1)/ie)+1;let v=e.slice(i,a).reduce(qe,0);return o%ie!==0&&(v-=l.slice(i*ie,o).reduce(qe,0)),n%ie!==0&&n!==r&&(v-=l.slice(n,a*ie).reduce(qe,0)),v}const Uo={virtualScrollSliceSize:{type:[Number,String],default:10},virtualScrollSliceRatioBefore:{type:[Number,String],default:1},virtualScrollSliceRatioAfter:{type:[Number,String],default:1},virtualScrollItemSize:{type:[Number,String],default:24},virtualScrollStickySizeStart:{type:[Number,String],default:0},virtualScrollStickySizeEnd:{type:[Number,String],default:0},tableColspan:[Number,String]},el={virtualScrollHorizontal:Boolean,onVirtualScroll:Function,...Uo};function Qo({virtualScrollLength:e,getVirtualScrollTarget:l,getVirtualScrollEl:o,virtualScrollItemSizeComputed:n}){const r=t.getCurrentInstance(),{props:i,emit:a,proxy:v}=r,{$q:m}=v;let p,d,y,C=[],s;const h=t.ref(0),V=t.ref(0),S=t.ref({}),L=t.ref(null),B=t.ref(null),k=t.ref(null),T=t.ref({from:0,to:0}),H=t.computed(()=>i.tableColspan!==void 0?i.tableColspan:100);n===void 0&&(n=t.computed(()=>i.virtualScrollItemSize));const E=t.computed(()=>n.value+";"+i.virtualScrollHorizontal),z=t.computed(()=>E.value+";"+i.virtualScrollSliceRatioBefore+";"+i.virtualScrollSliceRatioAfter);t.watch(z,()=>{U()}),t.watch(E,P);function P(){ee(d,!0)}function W(c){ee(c===void 0?d:c)}function X(c,g){const F=l();if(F==null||F.nodeType===8)return;const q=dt(F,o(),L.value,B.value,i.virtualScrollHorizontal,m.lang.rtl,i.virtualScrollStickySizeStart,i.virtualScrollStickySizeEnd);y!==q.scrollViewSize&&U(q.scrollViewSize),A(F,q,Math.min(e.value-1,Math.max(0,parseInt(c,10)||0)),0,Wo.indexOf(g)!==-1?g:d!==-1&&c>d?"end":"start")}function te(){const c=l();if(c==null||c.nodeType===8)return;const g=dt(c,o(),L.value,B.value,i.virtualScrollHorizontal,m.lang.rtl,i.virtualScrollStickySizeStart,i.virtualScrollStickySizeEnd),F=e.value-1,q=g.scrollMaxSize-g.offsetStart-g.offsetEnd-V.value;if(p===g.scrollStart)return;if(g.scrollMaxSize<=0){A(c,g,0,0);return}y!==g.scrollViewSize&&U(g.scrollViewSize),K(T.value.from);const O=Math.floor(g.scrollMaxSize-Math.max(g.scrollViewSize,g.offsetEnd)-Math.min(s[F],g.scrollViewSize/2));if(O>0&&Math.ceil(g.scrollStart)>=O){A(c,g,F,g.scrollMaxSize-g.offsetEnd-C.reduce(qe,0));return}let I=0,R=g.scrollStart-g.offsetStart,N=R;if(R<=q&&R+g.scrollViewSize>=h.value)R-=h.value,I=T.value.from,N=R;else for(let b=0;R>=C[b]&&I<F;b++)R-=C[b],I+=ie;for(;R>0&&I<F;)R-=s[I],R>-g.scrollViewSize?(I++,N=R):N=s[I]+R;A(c,g,I,N)}function A(c,g,F,q,O){const I=typeof O=="string"&&O.indexOf("-force")!==-1,R=I===!0?O.replace("-force",""):O,N=R!==void 0?R:"start";let b=Math.max(0,F-S.value[N]),G=b+S.value.total;G>e.value&&(G=e.value,b=Math.max(0,G-S.value.total)),p=g.scrollStart;const ae=b!==T.value.from||G!==T.value.to;if(ae===!1&&R===void 0){x(F);return}const{activeElement:ye}=document,re=k.value;ae===!0&&re!==null&&re!==ye&&re.contains(ye)===!0&&(re.addEventListener("focusout",le),setTimeout(()=>{re!==null&&re.removeEventListener("focusout",le)})),Ko(re,F-b);const Pe=R!==void 0?s.slice(b,F).reduce(qe,0):0;if(ae===!0){const de=G>=T.value.from&&b<=T.value.to?T.value.to:G;T.value={from:b,to:de},h.value=Re(C,s,0,b),V.value=Re(C,s,G,e.value),requestAnimationFrame(()=>{T.value.to!==G&&p===g.scrollStart&&(T.value={from:T.value.from,to:G},V.value=Re(C,s,G,e.value))})}requestAnimationFrame(()=>{if(p!==g.scrollStart)return;ae===!0&&K(b);const de=s.slice(b,F).reduce(qe,0),fe=de+g.offsetStart+h.value,je=fe+s[F];let Be=fe+q;if(R!==void 0){const et=de-Pe,Ee=g.scrollStart+et;Be=I!==!0&&Ee<fe&&je<Ee+g.scrollViewSize?Ee:R==="end"?je-g.scrollViewSize:fe-(R==="start"?0:Math.round((g.scrollViewSize-s[F])/2))}p=Be,Jt(c,Be,i.virtualScrollHorizontal,m.lang.rtl),x(F)})}function K(c){const g=k.value;if(g){const F=wl.call(g.children,b=>b.classList&&b.classList.contains("q-virtual-scroll--skip")===!1),q=F.length,O=i.virtualScrollHorizontal===!0?b=>b.getBoundingClientRect().width:b=>b.offsetHeight;let I=c,R,N;for(let b=0;b<q;){for(R=O(F[b]),b++;b<q&&F[b].classList.contains("q-virtual-scroll--with-prev")===!0;)R+=O(F[b]),b++;N=R-s[I],N!==0&&(s[I]+=N,C[Math.floor(I/ie)]+=N),I++}}}function le(){k.value!==null&&k.value!==void 0&&k.value.focus()}function ee(c,g){const F=1*n.value;(g===!0||Array.isArray(s)===!1)&&(s=[]);const q=s.length;s.length=e.value;for(let I=e.value-1;I>=q;I--)s[I]=F;const O=Math.floor((e.value-1)/ie);C=[];for(let I=0;I<=O;I++){let R=0;const N=Math.min((I+1)*ie,e.value);for(let b=I*ie;b<N;b++)R+=s[b];C.push(R)}d=-1,p=void 0,h.value=Re(C,s,0,T.value.from),V.value=Re(C,s,T.value.to,e.value),c>=0?(K(T.value.from),t.nextTick(()=>{X(c)})):M()}function U(c){if(c===void 0&&typeof window<"u"){const R=l();R!=null&&R.nodeType!==8&&(c=dt(R,o(),L.value,B.value,i.virtualScrollHorizontal,m.lang.rtl,i.virtualScrollStickySizeStart,i.virtualScrollStickySizeEnd).scrollViewSize)}y=c;const g=parseFloat(i.virtualScrollSliceRatioBefore)||0,F=parseFloat(i.virtualScrollSliceRatioAfter)||0,q=1+g+F,O=c===void 0||c<=0?1:Math.ceil(c/n.value),I=Math.max(1,O,Math.ceil((i.virtualScrollSliceSize>0?i.virtualScrollSliceSize:10)/q));S.value={total:Math.ceil(I*q),start:Math.ceil(I*g),center:Math.ceil(I*(.5+g)),end:Math.ceil(I*(1+g)),view:O}}function ne(c,g){const F=i.virtualScrollHorizontal===!0?"width":"height",q={["--q-virtual-scroll-item-"+F]:n.value+"px"};return[c==="tbody"?t.h(c,{class:"q-virtual-scroll__padding",key:"before",ref:L},[t.h("tr",[t.h("td",{style:{[F]:`${h.value}px`,...q},colspan:H.value})])]):t.h(c,{class:"q-virtual-scroll__padding",key:"before",ref:L,style:{[F]:`${h.value}px`,...q}}),t.h(c,{class:"q-virtual-scroll__content",key:"content",ref:k,tabindex:-1},g.flat()),c==="tbody"?t.h(c,{class:"q-virtual-scroll__padding",key:"after",ref:B},[t.h("tr",[t.h("td",{style:{[F]:`${V.value}px`,...q},colspan:H.value})])]):t.h(c,{class:"q-virtual-scroll__padding",key:"after",ref:B,style:{[F]:`${V.value}px`,...q}})]}function x(c){d!==c&&(i.onVirtualScroll!==void 0&&a("virtualScroll",{index:c,from:T.value.from,to:T.value.to-1,direction:c<d?"decrease":"increase",ref:v}),d=c)}U();const M=il(te,m.platform.is.ios===!0?120:35);t.onBeforeMount(()=>{U()});let ue=!1;return t.onDeactivated(()=>{ue=!0}),t.onActivated(()=>{if(ue!==!0)return;const c=l();p!==void 0&&c!==void 0&&c!==null&&c.nodeType!==8?Jt(c,p,i.virtualScrollHorizontal,m.lang.rtl):X(d)}),t.onBeforeUnmount(()=>{M.cancel()}),Object.assign(v,{scrollTo:X,reset:P,refresh:W}),{virtualScrollSliceRange:T,virtualScrollSliceSizeComputed:S,setVirtualScrollSize:U,onVirtualScrollEvt:M,localResetVirtualScroll:ee,padVirtualScroll:ne,scrollTo:X,reset:P,refresh:W}}const Xo=/[\u3000-\u303f\u3040-\u309f\u30a0-\u30ff\uff00-\uff9f\u4e00-\u9faf\u3400-\u4dbf]/,Yo=/[\u4e00-\u9fff\u3400-\u4dbf\u{20000}-\u{2a6df}\u{2a700}-\u{2b73f}\u{2b740}-\u{2b81f}\u{2b820}-\u{2ceaf}\uf900-\ufaff\u3300-\u33ff\ufe30-\ufe4f\uf900-\ufaff\u{2f800}-\u{2fa1f}]/u,Go=/[\u3131-\u314e\u314f-\u3163\uac00-\ud7a3]/,Zo=/[a-z0-9_ -]$/i;function Jo(e){return function(o){if(o.type==="compositionend"||o.type==="change"){if(o.target.qComposing!==!0)return;o.target.qComposing=!1,e(o)}else o.type==="compositionupdate"&&o.target.qComposing!==!0&&typeof o.data=="string"&&(Y.client.is.firefox===!0?Zo.test(o.data)===!1:Xo.test(o.data)===!0||Yo.test(o.data)===!0||Go.test(o.data)===!0)===!0&&(o.target.qComposing=!0)}}function ce(e,l){if(e===l)return!0;if(e!==null&&l!==null&&typeof e=="object"&&typeof l=="object"){if(e.constructor!==l.constructor)return!1;let o,n;if(e.constructor===Array){if(o=e.length,o!==l.length)return!1;for(n=o;n--!==0;)if(ce(e[n],l[n])!==!0)return!1;return!0}if(e.constructor===Map){if(e.size!==l.size)return!1;let i=e.entries();for(n=i.next();n.done!==!0;){if(l.has(n.value[0])!==!0)return!1;n=i.next()}for(i=e.entries(),n=i.next();n.done!==!0;){if(ce(n.value[1],l.get(n.value[0]))!==!0)return!1;n=i.next()}return!0}if(e.constructor===Set){if(e.size!==l.size)return!1;const i=e.entries();for(n=i.next();n.done!==!0;){if(l.has(n.value[0])!==!0)return!1;n=i.next()}return!0}if(e.buffer!=null&&e.buffer.constructor===ArrayBuffer){if(o=e.length,o!==l.length)return!1;for(n=o;n--!==0;)if(e[n]!==l[n])return!1;return!0}if(e.constructor===RegExp)return e.source===l.source&&e.flags===l.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===l.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===l.toString();const r=Object.keys(e).filter(i=>e[i]!==void 0);if(o=r.length,o!==Object.keys(l).filter(i=>l[i]!==void 0).length)return!1;for(n=o;n--!==0;){const i=r[n];if(ce(e[i],l[i])!==!0)return!1}return!0}return e!==e&&l!==l}function tl(e,l,o){if(o<=l)return l;const n=o-l+1;let r=l+(e-l)%n;return r<l&&(r=n+r),r===0?0:r}const ll=e=>["add","add-unique","toggle"].includes(e),en=".*+?^${}()|[]\\",tn=Object.keys(gt);function ft(e,l){if(typeof e=="function")return e;const o=e!==void 0?e:l;return n=>n!==null&&typeof n=="object"&&o in n?n[o]:n}const ln=f.createComponent({name:"QSelect",inheritAttrs:!1,props:{...el,...ol,...gt,modelValue:{required:!0},multiple:Boolean,displayValue:[String,Number],displayValueHtml:Boolean,dropdownIcon:String,options:{type:Array,default:()=>[]},optionValue:[Function,String],optionLabel:[Function,String],optionDisable:[Function,String],hideSelected:Boolean,hideDropdownIcon:Boolean,fillInput:Boolean,maxValues:[Number,String],optionsDense:Boolean,optionsDark:{type:Boolean,default:null},optionsSelectedClass:String,optionsHtml:Boolean,optionsCover:Boolean,menuShrink:Boolean,menuAnchor:String,menuSelf:String,menuOffset:Array,popupContentClass:String,popupContentStyle:[String,Array,Object],popupNoRouteDismiss:Boolean,useInput:Boolean,useChips:Boolean,newValueMode:{type:String,validator:ll},mapOptions:Boolean,emitValue:Boolean,disableTabSelection:Boolean,inputDebounce:{type:[Number,String],default:500},inputClass:[Array,String,Object],inputStyle:[Array,String,Object],tabindex:{type:[String,Number],default:0},autocomplete:String,transitionShow:{},transitionHide:{},transitionDuration:{},behavior:{type:String,validator:e=>["default","menu","dialog"].includes(e),default:"default"},virtualScrollItemSize:el.virtualScrollItemSize.type,onNewValue:Function,onFilter:Function},emits:[...rl,"add","remove","inputValue","keyup","keypress","keydown","popupShow","popupHide","filterAbort"],setup(e,{slots:l,emit:o}){const{proxy:n}=t.getCurrentInstance(),{$q:r}=n,i=t.ref(!1),a=t.ref(!1),v=t.ref(-1),m=t.ref(""),p=t.ref(!1),d=t.ref(!1);let y=null,C=null,s,h,V,S=null,L,B,k,T;const H=t.ref(null),E=t.ref(null),z=t.ref(null),P=t.ref(null),W=t.ref(null),X=Hl(e),te=Jo(Vt),A=t.computed(()=>Array.isArray(e.options)?e.options.length:0),K=t.computed(()=>e.virtualScrollItemSize===void 0?e.optionsDense===!0?24:48:e.virtualScrollItemSize),{virtualScrollSliceRange:le,virtualScrollSliceSizeComputed:ee,localResetVirtualScroll:U,padVirtualScroll:ne,onVirtualScrollEvt:x,scrollTo:M,setVirtualScrollSize:ue}=Qo({virtualScrollLength:A,getVirtualScrollTarget:ql,getVirtualScrollEl:kt,virtualScrollItemSizeComputed:K}),c=sl(),g=t.computed(()=>{const u=e.mapOptions===!0&&e.multiple!==!0,_=e.modelValue!==void 0&&(e.modelValue!==null||u===!0)?e.multiple===!0&&Array.isArray(e.modelValue)?e.modelValue:[e.modelValue]:[];if(e.mapOptions===!0&&Array.isArray(e.options)===!0){const w=e.mapOptions===!0&&s!==void 0?s:[],j=_.map(D=>kl(D,w));return e.modelValue===null&&u===!0?j.filter(D=>D!==null):j}return _}),F=t.computed(()=>{const u={};return tn.forEach(_=>{const w=e[_];w!==void 0&&(u[_]=w)}),u}),q=t.computed(()=>e.optionsDark===null?c.isDark.value:e.optionsDark),O=t.computed(()=>mt(g.value)),I=t.computed(()=>{let u="q-field__input q-placeholder col";return e.hideSelected===!0||g.value.length===0?[u,e.inputClass]:(u+=" q-field__input--padding",e.inputClass===void 0?u:[u,e.inputClass])}),R=t.computed(()=>(e.virtualScrollHorizontal===!0?"q-virtual-scroll--horizontal":"")+(e.popupContentClass?" "+e.popupContentClass:"")),N=t.computed(()=>A.value===0),b=t.computed(()=>g.value.map(u=>oe.value(u)).join(", ")),G=t.computed(()=>e.displayValue!==void 0?e.displayValue:b.value),ae=t.computed(()=>e.optionsHtml===!0?()=>!0:u=>u!=null&&u.html===!0),ye=t.computed(()=>e.displayValueHtml===!0||e.displayValue===void 0&&(e.optionsHtml===!0||g.value.some(ae.value))),re=t.computed(()=>c.focused.value===!0?e.tabindex:-1),Pe=t.computed(()=>{const u={tabindex:e.tabindex,role:"combobox","aria-label":e.label,"aria-readonly":e.readonly===!0?"true":"false","aria-autocomplete":e.useInput===!0?"list":"none","aria-expanded":i.value===!0?"true":"false","aria-controls":`${c.targetUid.value}_lb`};return v.value>=0&&(u["aria-activedescendant"]=`${c.targetUid.value}_${v.value}`),u}),de=t.computed(()=>({id:`${c.targetUid.value}_lb`,role:"listbox","aria-multiselectable":e.multiple===!0?"true":"false"})),fe=t.computed(()=>g.value.map((u,_)=>({index:_,opt:u,html:ae.value(u),selected:!0,removeAtIndex:xl,toggleOption:ve,tabindex:re.value}))),je=t.computed(()=>{if(A.value===0)return[];const{from:u,to:_}=le.value;return e.options.slice(u,_).map((w,j)=>{const D=Se.value(w)===!0,$=lt(w)===!0,Z=u+j,Q={clickable:!0,active:$,activeClass:Ee.value,manualFocus:!0,focused:!1,disable:D,tabindex:-1,dense:e.optionsDense,dark:q.value,role:"option","aria-selected":$===!0?"true":"false",id:`${c.targetUid.value}_${Z}`,onClick:()=>{ve(w)}};return D!==!0&&(v.value===Z&&(Q.focused=!0),r.platform.is.desktop===!0&&(Q.onMousemove=()=>{i.value===!0&&_e(Z)})),{index:Z,opt:w,html:ae.value(w),label:oe.value(w),selected:Q.active,focused:Q.focused,toggleOption:ve,setOptionIndex:_e,itemProps:Q}})}),Be=t.computed(()=>e.dropdownIcon!==void 0?e.dropdownIcon:r.iconSet.arrow.dropdown),et=t.computed(()=>e.optionsCover===!1&&e.outlined!==!0&&e.standout!==!0&&e.borderless!==!0&&e.rounded!==!0),Ee=t.computed(()=>e.optionsSelectedClass!==void 0?e.optionsSelectedClass:e.color!==void 0?`text-${e.color}`:""),se=t.computed(()=>ft(e.optionValue,"value")),oe=t.computed(()=>ft(e.optionLabel,"label")),Se=t.computed(()=>ft(e.optionDisable,"disable")),Le=t.computed(()=>g.value.map(se.value)),Cl=t.computed(()=>{const u={onInput:Vt,onChange:te,onKeydown:xt,onKeyup:wt,onKeypress:Ct,onFocus:St,onClick(_){h===!0&&f.stop(_)}};return u.onCompositionstart=u.onCompositionupdate=u.onCompositionend=te,u});t.watch(g,u=>{s=u,e.useInput===!0&&e.fillInput===!0&&e.multiple!==!0&&c.innerLoading.value!==!0&&(a.value!==!0&&i.value!==!0||O.value!==!0)&&(V!==!0&&ke(),(a.value===!0||i.value===!0)&&we(""))},{immediate:!0}),t.watch(()=>e.fillInput,ke),t.watch(i,ot),t.watch(A,Pl);function bt(u){return e.emitValue===!0?se.value(u):u}function tt(u){if(u!==-1&&u<g.value.length)if(e.multiple===!0){const _=e.modelValue.slice();o("remove",{index:u,value:_.splice(u,1)[0]}),o("update:modelValue",_)}else o("update:modelValue",null)}function xl(u){tt(u),c.focus()}function yt(u,_){const w=bt(u);if(e.multiple!==!0){e.fillInput===!0&&Ae(oe.value(u),!0,!0),o("update:modelValue",w);return}if(g.value.length===0){o("add",{index:0,value:w}),o("update:modelValue",e.multiple===!0?[w]:w);return}if(_===!0&&lt(u)===!0||e.maxValues!==void 0&&e.modelValue.length>=e.maxValues)return;const j=e.modelValue.slice();o("add",{index:j.length,value:w}),j.push(w),o("update:modelValue",j)}function ve(u,_){if(c.editable.value!==!0||u===void 0||Se.value(u)===!0)return;const w=se.value(u);if(e.multiple!==!0){_!==!0&&(Ae(e.fillInput===!0?oe.value(u):"",!0,!0),me()),E.value!==null&&E.value.focus(),(g.value.length===0||ce(se.value(g.value[0]),w)!==!0)&&o("update:modelValue",e.emitValue===!0?w:u);return}if((h!==!0||p.value===!0)&&c.focus(),St(),g.value.length===0){const $=e.emitValue===!0?w:u;o("add",{index:0,value:$}),o("update:modelValue",e.multiple===!0?[$]:$);return}const j=e.modelValue.slice(),D=Le.value.findIndex($=>ce($,w));if(D!==-1)o("remove",{index:D,value:j.splice(D,1)[0]});else{if(e.maxValues!==void 0&&j.length>=e.maxValues)return;const $=e.emitValue===!0?w:u;o("add",{index:j.length,value:$}),j.push($)}o("update:modelValue",j)}function _e(u){if(r.platform.is.desktop!==!0)return;const _=u!==-1&&u<A.value?u:-1;v.value!==_&&(v.value=_)}function He(u=1,_){if(i.value===!0){let w=v.value;do w=tl(w+u,-1,A.value-1);while(w!==-1&&w!==v.value&&Se.value(e.options[w])===!0);v.value!==w&&(_e(w),M(w),_!==!0&&e.useInput===!0&&e.fillInput===!0&&$e(w>=0?oe.value(e.options[w]):L,!0))}}function kl(u,_){const w=j=>ce(se.value(j),u);return e.options.find(w)||_.find(w)||u}function lt(u){const _=se.value(u);return Le.value.find(w=>ce(w,_))!==void 0}function St(u){e.useInput===!0&&E.value!==null&&(u===void 0||E.value===u.target&&u.target.value===b.value)&&E.value.select()}function _t(u){f.isKeyCode(u,27)===!0&&i.value===!0&&(f.stop(u),me(),ke()),o("keyup",u)}function wt(u){const{value:_}=u.target;if(u.keyCode!==void 0){_t(u);return}if(u.target.value="",y!==null&&(clearTimeout(y),y=null),C!==null&&(clearTimeout(C),C=null),ke(),typeof _=="string"&&_.length!==0){const w=_.toLocaleLowerCase(),j=$=>{const Z=e.options.find(Q=>String($.value(Q)).toLocaleLowerCase()===w);return Z===void 0?!1:(g.value.indexOf(Z)===-1?ve(Z):me(),!0)},D=$=>{j(se)!==!0&&$!==!0&&j(oe)!==!0&&we(_,!0,()=>D(!0))};D()}else c.clearValue(u)}function Ct(u){o("keypress",u)}function xt(u){if(o("keydown",u),f.shouldIgnoreKey(u)===!0)return;const _=m.value.length!==0&&(e.newValueMode!==void 0||e.onNewValue!==void 0),w=u.shiftKey!==!0&&e.disableTabSelection!==!0&&e.multiple!==!0&&(v.value!==-1||_===!0);if(u.keyCode===27){f.prevent(u);return}if(u.keyCode===9&&w===!1){Ce();return}if(u.target===void 0||u.target.id!==c.targetUid.value||c.editable.value!==!0)return;if(u.keyCode===40&&c.innerLoading.value!==!0&&i.value===!1){f.stopAndPrevent(u),xe();return}if(u.keyCode===8&&(e.useChips===!0||e.clearable===!0)&&e.hideSelected!==!0&&m.value.length===0){e.multiple===!0&&Array.isArray(e.modelValue)===!0?tt(e.modelValue.length-1):e.multiple!==!0&&e.modelValue!==null&&o("update:modelValue",null);return}(u.keyCode===35||u.keyCode===36)&&(typeof m.value!="string"||m.value.length===0)&&(f.stopAndPrevent(u),v.value=-1,He(u.keyCode===36?1:-1,e.multiple)),(u.keyCode===33||u.keyCode===34)&&ee.value!==void 0&&(f.stopAndPrevent(u),v.value=Math.max(-1,Math.min(A.value,v.value+(u.keyCode===33?-1:1)*ee.value.view)),He(u.keyCode===33?1:-1,e.multiple)),(u.keyCode===38||u.keyCode===40)&&(f.stopAndPrevent(u),He(u.keyCode===38?-1:1,e.multiple));const j=A.value;if((k===void 0||T<Date.now())&&(k=""),j>0&&e.useInput!==!0&&u.key!==void 0&&u.key.length===1&&u.altKey===!1&&u.ctrlKey===!1&&u.metaKey===!1&&(u.keyCode!==32||k.length!==0)){i.value!==!0&&xe(u);const D=u.key.toLocaleLowerCase(),$=k.length===1&&k[0]===D;T=Date.now()+1500,$===!1&&(f.stopAndPrevent(u),k+=D);const Z=new RegExp("^"+k.split("").map(nt=>en.indexOf(nt)!==-1?"\\"+nt:nt).join(".*"),"i");let Q=v.value;if($===!0||Q<0||Z.test(oe.value(e.options[Q]))!==!0)do Q=tl(Q+1,-1,j-1);while(Q!==v.value&&(Se.value(e.options[Q])===!0||Z.test(oe.value(e.options[Q]))!==!0));v.value!==Q&&t.nextTick(()=>{_e(Q),M(Q),Q>=0&&e.useInput===!0&&e.fillInput===!0&&$e(oe.value(e.options[Q]),!0)});return}if(!(u.keyCode!==13&&(u.keyCode!==32||e.useInput===!0||k!=="")&&(u.keyCode!==9||w===!1))){if(u.keyCode!==9&&f.stopAndPrevent(u),v.value!==-1&&v.value<j){ve(e.options[v.value]);return}if(_===!0){const D=($,Z)=>{if(Z){if(ll(Z)!==!0)return}else Z=e.newValueMode;if(Ae("",e.multiple!==!0,!0),$==null)return;(Z==="toggle"?ve:yt)($,Z==="add-unique"),e.multiple!==!0&&(E.value!==null&&E.value.focus(),me())};if(e.onNewValue!==void 0?o("newValue",m.value,D):D(m.value),e.multiple!==!0)return}i.value===!0?Ce():c.innerLoading.value!==!0&&xe()}}function kt(){return h===!0?W.value:z.value!==null&&z.value.contentEl!==null?z.value.contentEl:void 0}function ql(){return kt()}function Vl(){return e.hideSelected===!0?[]:l["selected-item"]!==void 0?fe.value.map(u=>l["selected-item"](u)).slice():l.selected!==void 0?[].concat(l.selected()):e.useChips===!0?fe.value.map((u,_)=>t.h(ro,{key:"option-"+_,removable:c.editable.value===!0&&Se.value(u.opt)!==!0,dense:!0,textColor:e.color,tabindex:re.value,onRemove(){u.removeAtIndex(_)}},()=>t.h("span",{class:"ellipsis",[u.html===!0?"innerHTML":"textContent"]:oe.value(u.opt)}))):[t.h("span",{[ye.value===!0?"innerHTML":"textContent"]:G.value})]}function qt(){if(N.value===!0)return l["no-option"]!==void 0?l["no-option"]({inputValue:m.value}):void 0;const u=l.option!==void 0?l.option:w=>t.h(ul,{key:w.index,...w.itemProps},()=>t.h(Xe,()=>t.h(nl,()=>t.h("span",{[w.html===!0?"innerHTML":"textContent"]:w.label}))));let _=ne("div",je.value.map(u));return l["before-options"]!==void 0&&(_=l["before-options"]().concat(_)),f.hMergeSlot(l["after-options"],_)}function Bl(u,_){const w=_===!0?{...Pe.value,...c.splitAttrs.attributes.value}:void 0,j={ref:_===!0?E:void 0,key:"i_t",class:I.value,style:e.inputStyle,value:m.value!==void 0?m.value:"",type:"search",...w,id:_===!0?c.targetUid.value:void 0,maxlength:e.maxlength,autocomplete:e.autocomplete,"data-autofocus":u===!0||e.autofocus===!0||void 0,disabled:e.disable===!0,readonly:e.readonly===!0,...Cl.value};return u!==!0&&h===!0&&(Array.isArray(j.class)===!0?j.class=[...j.class,"no-pointer-events"]:j.class+=" no-pointer-events"),t.h("input",j)}function Vt(u){y!==null&&(clearTimeout(y),y=null),C!==null&&(clearTimeout(C),C=null),!(u&&u.target&&u.target.qComposing===!0)&&($e(u.target.value||""),V=!0,L=m.value,c.focused.value!==!0&&(h!==!0||p.value===!0)&&c.focus(),e.onFilter!==void 0&&(y=setTimeout(()=>{y=null,we(m.value)},e.inputDebounce)))}function $e(u,_){m.value!==u&&(m.value=u,_===!0||e.inputDebounce===0||e.inputDebounce==="0"?o("inputValue",u):C=setTimeout(()=>{C=null,o("inputValue",u)},e.inputDebounce))}function Ae(u,_,w){V=w!==!0,e.useInput===!0&&($e(u,!0),(_===!0||w!==!0)&&(L=u),_!==!0&&we(u))}function we(u,_,w){if(e.onFilter===void 0||_!==!0&&c.focused.value!==!0)return;c.innerLoading.value===!0?o("filterAbort"):(c.innerLoading.value=!0,d.value=!0),u!==""&&e.multiple!==!0&&g.value.length!==0&&V!==!0&&u===oe.value(g.value[0])&&(u="");const j=setTimeout(()=>{i.value===!0&&(i.value=!1)},10);S!==null&&clearTimeout(S),S=j,o("filter",u,(D,$)=>{(_===!0||c.focused.value===!0)&&S===j&&(clearTimeout(S),typeof D=="function"&&D(),d.value=!1,t.nextTick(()=>{c.innerLoading.value=!1,c.editable.value===!0&&(_===!0?i.value===!0&&me():i.value===!0?ot(!0):i.value=!0),typeof $=="function"&&t.nextTick(()=>{$(n)}),typeof w=="function"&&t.nextTick(()=>{w(n)})}))},()=>{c.focused.value===!0&&S===j&&(clearTimeout(S),c.innerLoading.value=!1,d.value=!1),i.value===!0&&(i.value=!1)})}function El(){return t.h(Oo,{ref:z,class:R.value,style:e.popupContentStyle,modelValue:i.value,fit:e.menuShrink!==!0,cover:e.optionsCover===!0&&N.value!==!0&&e.useInput!==!0,anchor:e.menuAnchor,self:e.menuSelf,offset:e.menuOffset,dark:q.value,noParentEvent:!0,noRefocus:!0,noFocus:!0,noRouteDismiss:e.popupNoRouteDismiss,square:et.value,transitionShow:e.transitionShow,transitionHide:e.transitionHide,transitionDuration:e.transitionDuration,separateClosePopup:!0,...de.value,onScrollPassive:x,onBeforeShow:Et,onBeforeHide:Al,onShow:Tl},qt)}function Al(u){At(u),Ce()}function Tl(){ue()}function Rl(u){f.stop(u),E.value!==null&&E.value.focus(),p.value=!0,window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,0)}function Il(u){f.stop(u),t.nextTick(()=>{p.value=!1})}function Ml(){const u=[t.h(io,{class:`col-auto ${c.fieldClass.value}`,...F.value,for:c.targetUid.value,dark:q.value,square:!0,loading:d.value,itemAligned:!1,filled:!0,stackLabel:m.value.length!==0,...c.splitAttrs.listeners.value,onFocus:Rl,onBlur:Il},{...l,rawControl:()=>c.getControl(!0),before:void 0,after:void 0})];return i.value===!0&&u.push(t.h("div",{ref:W,class:R.value+" scroll",style:e.popupContentStyle,...de.value,onClick:f.prevent,onScrollPassive:x},qt())),t.h(No,{ref:P,modelValue:a.value,position:e.useInput===!0?"top":void 0,transitionShow:B,transitionHide:e.transitionHide,transitionDuration:e.transitionDuration,noRouteDismiss:e.popupNoRouteDismiss,onBeforeShow:Et,onBeforeHide:zl,onHide:Fl,onShow:Ol},()=>t.h("div",{class:"q-select__dialog"+(q.value===!0?" q-select__dialog--dark q-dark":"")+(p.value===!0?" q-select__dialog--focused":"")},u))}function zl(u){At(u),P.value!==null&&P.value.__updateRefocusTarget(c.rootRef.value.querySelector(".q-field__native > [tabindex]:last-child")),c.focused.value=!1}function Fl(u){me(),c.focused.value===!1&&o("blur",u),ke()}function Ol(){const u=document.activeElement;(u===null||u.id!==c.targetUid.value)&&E.value!==null&&E.value!==u&&E.value.focus(),ue()}function Ce(){a.value!==!0&&(v.value=-1,i.value===!0&&(i.value=!1),c.focused.value===!1&&(S!==null&&(clearTimeout(S),S=null),c.innerLoading.value===!0&&(o("filterAbort"),c.innerLoading.value=!1,d.value=!1)))}function xe(u){c.editable.value===!0&&(h===!0?(c.onControlFocusin(u),a.value=!0,t.nextTick(()=>{c.focus()})):c.focus(),e.onFilter!==void 0?we(m.value):(N.value!==!0||l["no-option"]!==void 0)&&(i.value=!0))}function me(){a.value=!1,Ce()}function ke(){e.useInput===!0&&Ae(e.multiple!==!0&&e.fillInput===!0&&g.value.length!==0&&oe.value(g.value[0])||"",!0,!0)}function ot(u){let _=-1;if(u===!0){if(g.value.length!==0){const w=se.value(g.value[0]);_=e.options.findIndex(j=>ce(se.value(j),w))}U(_)}_e(_)}function Pl(u,_){i.value===!0&&c.innerLoading.value===!1&&(U(-1,!0),t.nextTick(()=>{i.value===!0&&c.innerLoading.value===!1&&(u>_?U():ot(!0))}))}function Bt(){a.value===!1&&z.value!==null&&z.value.updatePosition()}function Et(u){u!==void 0&&f.stop(u),o("popupShow",u),c.hasPopupOpen=!0,c.onControlFocusin(u)}function At(u){u!==void 0&&f.stop(u),o("popupHide",u),c.hasPopupOpen=!1,c.onControlFocusout(u)}function Tt(){h=r.platform.is.mobile!==!0&&e.behavior!=="dialog"?!1:e.behavior!=="menu"&&(e.useInput===!0?l["no-option"]!==void 0||e.onFilter!==void 0||N.value===!1:!0),B=r.platform.is.ios===!0&&h===!0&&e.useInput===!0?"fade":e.transitionShow}return t.onBeforeUpdate(Tt),t.onUpdated(Bt),Tt(),t.onBeforeUnmount(()=>{y!==null&&clearTimeout(y),C!==null&&clearTimeout(C)}),Object.assign(n,{showPopup:xe,hidePopup:me,removeAtIndex:tt,add:yt,toggleOption:ve,getOptionIndex:()=>v.value,setOptionIndex:_e,moveOptionSelection:He,filter:we,updateMenuPosition:Bt,updateInputValue:Ae,isOptionSelected:lt,getEmittingOptionValue:bt,isOptionDisabled:(...u)=>Se.value.apply(null,u)===!0,getOptionValue:(...u)=>se.value.apply(null,u),getOptionLabel:(...u)=>oe.value.apply(null,u)}),Object.assign(c,{innerValue:g,fieldClass:t.computed(()=>`q-select q-field--auto-height q-select--with${e.useInput!==!0?"out":""}-input q-select--with${e.useChips!==!0?"out":""}-chips q-select--${e.multiple===!0?"multiple":"single"}`),inputRef:H,targetRef:E,hasValue:O,showPopup:xe,floatingLabel:t.computed(()=>e.hideSelected!==!0&&O.value===!0||typeof m.value=="number"||m.value.length!==0||mt(e.displayValue)),getControlChild:()=>{if(c.editable.value!==!1&&(a.value===!0||N.value!==!0||l["no-option"]!==void 0))return h===!0?Ml():El();c.hasPopupOpen===!0&&(c.hasPopupOpen=!1)},controlEvents:{onFocusin(u){c.onControlFocusin(u)},onFocusout(u){c.onControlFocusout(u,()=>{ke(),Ce()})},onClick(u){if(f.prevent(u),h!==!0&&i.value===!0){Ce(),E.value!==null&&E.value.focus();return}xe(u)}},getControl:u=>{const _=Vl(),w=u===!0||a.value!==!0||h!==!0;if(e.useInput===!0)_.push(Bl(u,w));else if(c.editable.value===!0){const D=w===!0?Pe.value:void 0;_.push(t.h("input",{ref:w===!0?E:void 0,key:"d_t",class:"q-select__focus-target",id:w===!0?c.targetUid.value:void 0,value:G.value,readonly:!0,"data-autofocus":u===!0||e.autofocus===!0||void 0,...D,onKeydown:xt,onKeyup:_t,onKeypress:Ct})),w===!0&&typeof e.autocomplete=="string"&&e.autocomplete.length!==0&&_.push(t.h("input",{class:"q-select__autocomplete-input",autocomplete:e.autocomplete,tabindex:-1,onKeyup:wt}))}if(X.value!==void 0&&e.disable!==!0&&Le.value.length!==0){const D=Le.value.map($=>t.h("option",{value:$,selected:!0}));_.push(t.h("select",{class:"hidden",name:X.value,multiple:e.multiple},D))}const j=e.useInput===!0||w!==!0?void 0:c.splitAttrs.attributes.value;return t.h("div",{class:"q-field__native row items-center",...j,...c.splitAttrs.listeners.value},_)},getInnerAppend:()=>e.loading!==!0&&d.value!==!0&&e.hideDropdownIcon!==!0?[t.h(f.QIcon,{class:"q-select__dropdown-icon"+(i.value===!0?" rotate-180":""),name:Be.value})]:null}),cl(c)}}),on={class:"app-select__amount"},nn=t.defineComponent({__name:"index",props:{modelValue:{},size:{default:f.SIZES.MD},options:{},multiple:{type:Boolean},label:{},placeholder:{},required:{type:Boolean},clearable:{type:Boolean},disabled:{type:Boolean},loading:{type:Boolean},filtering:{type:Boolean},autofocus:{type:Boolean},rules:{},lazyRules:{type:[Boolean,String]}},emits:["update:modelValue"],setup(e,{emit:l}){const o=e,n=l,r=t.ref(!1),i=t.ref(""),a=t.computed({get(){return o.modelValue},set(s){n("update:modelValue",s)}}),v=t.computed(()=>{var s;if(Array.isArray(a.value)){if(o.multiple&&a.value.length==0)return o.placeholder}else return((s=a.value)==null?void 0:s.label)||o.placeholder||"";return""}),m=t.computed(()=>!(!o.clearable||!o.modelValue||o.modelValue&&Array.isArray(o.modelValue)&&!o.modelValue.length)),p=t.computed(()=>i.value?o.options.filter(s=>s.label.toLowerCase().includes(i.value.toLowerCase())):o.options),d=t.computed(()=>{if(o.rules)return o.required?[...o.rules,Rt]:o.rules;if(o.required)return[Rt]}),y=()=>{a.value=void 0},C=(s,h)=>{h(()=>{i.value=s})};return(s,h)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["app-select",[{"app-select_opened":r.value},`app-select_${s.size}`]])},[s.label?(t.openBlock(),t.createElementBlock("label",{key:0,class:t.normalizeClass(["app-select__label",{"app-select__label_bold":s.required}])},t.toDisplayString(s.required?`${s.label} *`:s.label),3)):t.createCommentVNode("",!0),t.createVNode(t.unref(ln),{standout:"","hide-bottom-space":"","hide-dropdown-icon":"","no-error-icon":"",behavior:"menu","popup-content-class":`app-select-menu app-select-menu_${s.size}`,placeholder:s.filtering&&"Почніть вводити","input-debounce":"50",modelValue:a.value,"onUpdate:modelValue":h[0]||(h[0]=V=>a.value=V),options:p.value,multiple:s.multiple,"use-input":s.filtering&&(Array.isArray(a.value)||!a.value),rules:d.value,"lazy-rules":s.lazyRules,autofocus:s.autofocus,disable:s.disabled,loading:s.loading,onFilter:C,onPopupShow:h[1]||(h[1]=V=>r.value=!0),onPopupHide:h[2]||(h[2]=V=>r.value=!1)},{append:t.withCtx(()=>[m.value?(t.openBlock(),t.createElementBlock("i",{key:0,class:"icon-kl icon-kl-close app-select__clear",onClick:t.withModifiers(y,["stop","prevent"])})):t.createCommentVNode("",!0),h[3]||(h[3]=t.createElementVNode("i",{class:"icon-kl icon-kl-arrow-down app-select__drop-icon"},null,-1))]),selected:t.withCtx(()=>{var V,S;return[Array.isArray(a.value)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[!s.filtering||a.value.length?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(["app-select__selected",{"app-select__placeholder":!((V=a.value)!=null&&V.length)&&s.placeholder}])},[(S=a.value)!=null&&S.length?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[h[4]||(h[4]=t.createTextVNode(" Вибрано ")),t.createElementVNode("span",on,t.toDisplayString(a.value.length),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(o.placeholder),1)],64))],2)):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[!s.filtering||a.value?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(["app-select__selected",{"app-select__placeholder":!a.value&&s.placeholder}])},t.toDisplayString(v.value),3)):t.createCommentVNode("",!0)],64))]}),option:t.withCtx(V=>[t.createVNode(ul,t.mergeProps({class:["app-select__option",{"app-select__option_selected":V.selected}]},V.itemProps),{default:t.withCtx(()=>[o.multiple?(t.openBlock(),t.createBlock(Xe,{key:0,class:"option-multiple",avatar:""},{default:t.withCtx(()=>[t.createVNode(Ul,{size:"30px","model-value":V.selected,"onUpdate:modelValue":()=>V.toggleOption(V.opt)},null,8,["model-value","onUpdate:modelValue"])]),_:2},1024)):t.createCommentVNode("",!0),V.opt.done?(t.openBlock(),t.createBlock(Xe,{key:1,class:"option-done",avatar:""},{default:t.withCtx(()=>h[5]||(h[5]=[t.createElementVNode("i",{class:"icon-kl icon-kl-check option-done__icon"},null,-1)])),_:1})):t.createCommentVNode("",!0),t.createVNode(Xe,null,{default:t.withCtx(()=>[t.createVNode(nl,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(V.opt.label),1)]),_:2},1024)]),_:2},1024)]),_:2},1040,["class"])]),_:1},8,["popup-content-class","placeholder","modelValue","options","multiple","use-input","rules","lazy-rules","autofocus","disable","loading"])],2))}}),un={"app-select":"_app-select_1ji8j_2","app-select__label":"_app-select__label_1ji8j_5","app-select__label_bold":"_app-select__label_bold_1ji8j_8","app-select__drop-icon":"_app-select__drop-icon_1ji8j_11","app-select__clear":"_app-select__clear_1ji8j_16","app-select__selected":"_app-select__selected_1ji8j_25","app-select__amount":"_app-select__amount_1ji8j_28","app-select__placeholder":"_app-select__placeholder_1ji8j_37","app-select__option":"_app-select__option_1ji8j_40","app-select__option_selected":"_app-select__option_selected_1ji8j_43","q-item__label":"_q-item__label_1ji8j_43","q-item__section--avatar":"_q-item__section--avatar_1ji8j_46","q-field":"_q-field_1ji8j_51","q-field__control":"_q-field__control_1ji8j_51","q-placeholder":"_q-placeholder_1ji8j_58","q-spinner":"_q-spinner_1ji8j_61","app-select_opened":"_app-select_opened_1ji8j_64","app-select_sm":"_app-select_sm_1ji8j_67","q-field__native":"_q-field__native_1ji8j_87","q-field__append":"_q-field__append_1ji8j_92","q-field__prepend":"_q-field__prepend_1ji8j_93","q-field__before":"_q-field__before_1ji8j_94","q-field__after":"_q-field__after_1ji8j_95","q-field__input":"_q-field__input_1ji8j_99","q-field__bottom":"_q-field__bottom_1ji8j_104","app-select_md":"_app-select_md_1ji8j_108","app-select_lg":"_app-select_lg_1ji8j_146","option-multiple":"_option-multiple_1ji8j_172","option-done":"_option-done_1ji8j_176","option-done__icon":"_option-done__icon_1ji8j_179","app-select-menu_sm":"_app-select-menu_sm_1ji8j_184","q-item":"_q-item_1ji8j_43","app-select-menu_md":"_app-select-menu_md_1ji8j_191"},an={$style:un},rn=f._export_sfc(nn,[["__cssModules",an],["__scopeId","data-v-df2ac657"]]);exports.default=rn;