@validol4ik/uikit 0.7.0 → 0.7.1

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,6 +1,6 @@
1
1
  import { ref as d, onMounted as s, h as c, defineComponent as u, createBlock as p, openBlock as f, unref as m, withCtx as h, createVNode as y, mergeProps as v, withModifiers as C } from "vue";
2
2
  import { r as g, a as b, i as B } from "./focusout-DjvPXP_b.js";
3
- import { c as O, h as i, C as S, A as _ } from "./index-CheOtzui.js";
3
+ import { c as O, h as i, C as S, A as _ } from "./index-BV2qSN9C.js";
4
4
  function x(e) {
5
5
  const t = document.createElement("textarea");
6
6
  t.value = e, t.contentEditable = "true", t.style.position = "fixed";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),u=require("./focusout-DzWGke-4.cjs"),l=require("./index-d12F-Rqz.cjs");function d(e){const t=document.createElement("textarea");t.value=e,t.contentEditable="true",t.style.position="fixed";const n=()=>{};u.addFocusout(n),document.body.appendChild(t),t.focus(),t.select();const r=document.execCommand("copy");return t.remove(),u.removeFocusout(n),r}function s(e){return navigator.clipboard!==void 0?navigator.clipboard.writeText(e):new Promise((t,n)=>{const r=d(e);r?t(!0):n(r)})}function p(){const e=o.ref(!u.isRuntimeSsrPreHydration.value);return e.value===!1&&o.onMounted(()=>{e.value=!0}),{isHydrated:e}}const f=l.createComponent({name:"QNoSsr",props:{tag:{type:String,default:"div"},placeholder:String},setup(e,{slots:t}){const{isHydrated:n}=p();return()=>{if(n.value===!0){const a=l.hSlot(t.default);return a===void 0?a:a.length>1?o.h(e.tag,{},a):a[0]}const r={class:"q-no-ssr-placeholder"},c=l.hSlot(t.placeholder);if(c!==void 0)return c.length>1?o.h(e.tag,r,c):c[0];if(e.placeholder!==void 0)return o.h(e.tag,r,e.placeholder)}}}),i={COPY:"copy_o",COPIED:"copied_o"},h=o.defineComponent({__name:"AppButtonCopy",props:{text:{},size:{},transparent:{type:Boolean,default:!0},flat:{type:Boolean},rounded:{type:Boolean},color:{default:l.COLORS.INFO},iconLeft:{},iconRight:{},iconMiddle:{},disabled:{type:Boolean},loading:{type:Boolean},to:{},href:{},target:{},submit:{type:Boolean},ariaLabel:{},label:{},download:{}},setup(e){const t=e,n=o.ref(i.COPY),r=()=>{n.value=i.COPIED,setTimeout(()=>{n.value=i.COPY},2e3)},c=()=>{s(t.text).then(r).catch(a=>{console.log(a)})};return(a,m)=>(o.openBlock(),o.createBlock(o.unref(f),null,{default:o.withCtx(()=>[o.createVNode(l.AppButton,o.mergeProps(t,{"icon-middle":n.value,onClick:o.withModifiers(c,["prevent"])}),null,16,["icon-middle"])]),_:1}))}});exports.default=h;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),u=require("./focusout-DzWGke-4.cjs"),l=require("./index-DXwv6jwP.cjs");function d(e){const t=document.createElement("textarea");t.value=e,t.contentEditable="true",t.style.position="fixed";const n=()=>{};u.addFocusout(n),document.body.appendChild(t),t.focus(),t.select();const r=document.execCommand("copy");return t.remove(),u.removeFocusout(n),r}function s(e){return navigator.clipboard!==void 0?navigator.clipboard.writeText(e):new Promise((t,n)=>{const r=d(e);r?t(!0):n(r)})}function p(){const e=o.ref(!u.isRuntimeSsrPreHydration.value);return e.value===!1&&o.onMounted(()=>{e.value=!0}),{isHydrated:e}}const f=l.createComponent({name:"QNoSsr",props:{tag:{type:String,default:"div"},placeholder:String},setup(e,{slots:t}){const{isHydrated:n}=p();return()=>{if(n.value===!0){const a=l.hSlot(t.default);return a===void 0?a:a.length>1?o.h(e.tag,{},a):a[0]}const r={class:"q-no-ssr-placeholder"},c=l.hSlot(t.placeholder);if(c!==void 0)return c.length>1?o.h(e.tag,r,c):c[0];if(e.placeholder!==void 0)return o.h(e.tag,r,e.placeholder)}}}),i={COPY:"copy_o",COPIED:"copied_o"},h=o.defineComponent({__name:"AppButtonCopy",props:{text:{},size:{},transparent:{type:Boolean,default:!0},flat:{type:Boolean},rounded:{type:Boolean},color:{default:l.COLORS.INFO},iconLeft:{},iconRight:{},iconMiddle:{},disabled:{type:Boolean},loading:{type:Boolean},to:{},href:{},target:{},submit:{type:Boolean},ariaLabel:{},label:{},download:{}},setup(e){const t=e,n=o.ref(i.COPY),r=()=>{n.value=i.COPIED,setTimeout(()=>{n.value=i.COPY},2e3)},c=()=>{s(t.text).then(r).catch(a=>{console.log(a)})};return(a,m)=>(o.openBlock(),o.createBlock(o.unref(f),null,{default:o.withCtx(()=>[o.createVNode(l.AppButton,o.mergeProps(t,{"icon-middle":n.value,onClick:o.withModifiers(c,["prevent"])}),null,16,["icon-middle"])]),_:1}))}});exports.default=h;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),s=require("./index-DXwv6jwP.cjs"),Q=require("./QMenu-DNRkchme.cjs"),ie=require("./focusout-DzWGke-4.cjs");function Gt(e,o){const l=t.ref(null),u=t.computed(()=>e.disable===!0?null:t.h("span",{ref:l,class:"no-outline",tabindex:-1}));function c(i){const r=o.value;(i==null?void 0:i.qAvoidFocus)!==!0&&((i==null?void 0:i.type.indexOf("key"))===0?document.activeElement!==r&&(r==null?void 0:r.contains(document.activeElement))===!0&&r.focus():l.value!==null&&(i===void 0||(r==null?void 0:r.contains(i.target))===!0)&&l.value.focus())}return{refocusTargetEl:u,refocusTarget:c}}const At={name:String};function el(e={}){return(o,l,u)=>{o[l](t.h("input",{class:"hidden"+(u||""),...e.value}))}}function tl(e){return t.computed(()=>e.name||e.for)}const ll={xs:30,sm:35,md:40,lg:50,xl:60},ol={...s.useDarkProps,...s.useSizeProps,...At,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 ul(e,o){const{props:l,slots:u,emit:c,proxy:i}=t.getCurrentInstance(),{$q:r}=i,b=s.useDark(l,r),S=t.ref(null),{refocusTargetEl:_,refocusTarget:f}=Gt(l,S),w=s.useSize(l,ll),k=t.computed(()=>l.val!==void 0&&Array.isArray(l.modelValue)),C=t.computed(()=>{const q=t.toRaw(l.val);return k.value===!0?l.modelValue.findIndex(X=>t.toRaw(X)===q):-1}),x=t.computed(()=>k.value===!0?C.value!==-1:t.toRaw(l.modelValue)===t.toRaw(l.trueValue)),h=t.computed(()=>k.value===!0?C.value===-1:t.toRaw(l.modelValue)===t.toRaw(l.falseValue)),v=t.computed(()=>x.value===!1&&h.value===!1),V=t.computed(()=>l.disable===!0?-1:l.tabindex||0),H=t.computed(()=>`q-${e} cursor-pointer no-outline row inline no-wrap items-center`+(l.disable===!0?" disabled":"")+(b.value===!0?` q-${e}--dark`:"")+(l.dense===!0?` q-${e}--dense`:"")+(l.leftLabel===!0?" reverse":"")),B=t.computed(()=>{const q=x.value===!0?"truthy":h.value===!0?"falsy":"indet",X=l.color!==void 0&&(l.keepColor===!0||h.value!==!0)?` text-${l.color}`:"";return`q-${e}__inner relative-position non-selectable q-${e}__inner--${q}${X}`}),M=t.computed(()=>{const q={type:"checkbox"};return l.name!==void 0&&Object.assign(q,{".checked":x.value,"^checked":x.value===!0?"checked":void 0,name:l.name,value:k.value===!0?l.val:l.trueValue}),q}),Y=el(M),T=t.computed(()=>{const q={tabindex:V.value,role:"checkbox","aria-label":l.label,"aria-checked":v.value===!0?"mixed":x.value===!0?"true":"false"};return l.disable===!0&&(q["aria-disabled"]="true"),q});function L(q){q!==void 0&&(s.stopAndPrevent(q),f(q)),l.disable!==!0&&c("update:modelValue",P(),q)}function P(){if(k.value===!0){if(x.value===!0){const q=l.modelValue.slice();return q.splice(C.value,1),q}return l.modelValue.concat([l.val])}if(x.value===!0){if(l.toggleOrder!=="ft"||l.toggleIndeterminate===!1)return l.falseValue}else if(h.value===!0){if(l.toggleOrder==="ft"||l.toggleIndeterminate===!1)return l.trueValue}else return l.toggleOrder!=="ft"?l.trueValue:l.falseValue;return l.indeterminateValue}function te(q){(q.keyCode===13||q.keyCode===32)&&s.stopAndPrevent(q)}function W(q){(q.keyCode===13||q.keyCode===32)&&L(q)}const le=o(x,v);return Object.assign(i,{toggle:L}),()=>{const q=le();l.disable!==!0&&Y(q,"unshift",` q-${e}__native absolute q-ma-none q-pa-none`);const X=[t.h("div",{class:B.value,style:w.value,"aria-hidden":"true"},q)];_.value!==null&&X.push(_.value);const oe=l.label!==void 0?s.hMergeSlot(u.default,[l.label]):s.hSlot(u.default);return oe!==void 0&&X.push(t.h("div",{class:`q-${e}__label q-anchor--skip`},oe)),t.h("div",{ref:S,class:H.value,...T.value,onClick:L,onKeydown:te,onKeyup:W},X)}}const il=()=>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"})])]),al=s.createComponent({name:"QCheckbox",props:ol,emits:nl,setup(e){const o=il();function l(u,c){const i=t.computed(()=>(u.value===!0?e.checkedIcon:c.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(s.QIcon,{class:"q-checkbox__icon",name:i.value})])]:[o]}return ul("checkbox",l)}}),$e=s.createComponent({name:"QItemSection",props:{avatar:Boolean,thumbnail:Boolean,side:Boolean,top:Boolean,noWrap:Boolean},setup(e,{slots:o}){const l=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:l.value},s.hSlot(o.default))}}),Et=s.createComponent({name:"QItemLabel",props:{overline:Boolean,caption:Boolean,header:Boolean,lines:[Number,String]},setup(e,{slots:o}){const l=t.computed(()=>parseInt(e.lines,10)),u=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":"")+(l.value===1?" ellipsis":"")),c=t.computed(()=>e.lines!==void 0&&l.value>1?{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":l.value}:null);return()=>t.h("div",{style:c.value,class:u.value},s.hSlot(o.default))}}),It=s.createComponent({name:"QItem",props:{...s.useDarkProps,...s.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:o,emit:l}){const{proxy:{$q:u}}=t.getCurrentInstance(),c=s.useDark(e,u),{hasLink:i,linkAttrs:r,linkClass:b,linkTag:S,navigateOnClick:_}=s.useRouterLink(),f=t.ref(null),w=t.ref(null),k=t.computed(()=>e.clickable===!0||i.value===!0||e.tag==="label"),C=t.computed(()=>e.disable!==!0&&k.value===!0),x=t.computed(()=>"q-item q-item-type row no-wrap"+(e.dense===!0?" q-item--dense":"")+(c.value===!0?" q-item--dark":"")+(i.value===!0&&e.active===null?b.value:e.active===!0?` q-item--active${e.activeClass!==void 0?` ${e.activeClass}`:""}`:"")+(e.disable===!0?" disabled":"")+(C.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":""):"")),h=t.computed(()=>e.insetLevel===void 0?null:{["padding"+(u.lang.rtl===!0?"Right":"Left")]:16+e.insetLevel*56+"px"});function v(B){C.value===!0&&(w.value!==null&&B.qAvoidFocus!==!0&&(B.qKeyEvent!==!0&&document.activeElement===f.value?w.value.focus():document.activeElement===w.value&&f.value.focus()),_(B))}function V(B){if(C.value===!0&&s.isKeyCode(B,[13,32])===!0){s.stopAndPrevent(B),B.qKeyEvent=!0;const M=new MouseEvent("click",B);M.qKeyEvent=!0,f.value.dispatchEvent(M)}l("keyup",B)}function H(){const B=s.hUniqueSlot(o.default,[]);return C.value===!0&&B.unshift(t.h("div",{class:"q-focus-helper",tabindex:-1,ref:w})),B}return()=>{const B={ref:f,class:x.value,style:h.value,role:"listitem",onClick:v,onKeyup:V};return C.value===!0?(B.tabindex=e.tabindex||"0",Object.assign(B,r.value)):k.value===!0&&(B["aria-disabled"]="true"),t.h(S.value,B,H())}}}),mt=e=>e?!0:"Обовʼязкове поле",pt=/^on[A-Z]/;function rl(){const{attrs:e,vnode:o}=t.getCurrentInstance(),l={listeners:t.ref({}),attributes:t.ref({})};function u(){const c={},i={};for(const r in e)r!=="class"&&r!=="style"&&pt.test(r)===!1&&(c[r]=e[r]);for(const r in o.props)pt.test(r)===!0&&(i[r]=o.props[r]);l.attributes.value=c,l.listeners.value=i}return t.onBeforeUpdate(u),u(),l}const sl="_q_fo_";function cl({validate:e,resetValidation:o,requiresQForm:l}){const u=t.inject(sl,!1);if(u!==!1){const{props:c,proxy:i}=t.getCurrentInstance();Object.assign(i,{validate:e,resetValidation:o}),t.watch(()=>c.disable,r=>{r===!0?(typeof o=="function"&&o(),u.unbindComponent(i)):u.bindComponent(i)}),t.onMounted(()=>{c.disable!==!0&&u.bindComponent(i)}),t.onBeforeUnmount(()=>{c.disable!==!0&&u.unbindComponent(i)})}else l===!0&&console.error("Parent QForm not found on useFormChild()!")}const ht=/^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/,gt=/^#[0-9a-fA-F]{4}([0-9a-fA-F]{4})?$/,bt=/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,Oe=/^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])\)$/,Me=/^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)\)$/,Ue={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=>ht.test(e),hexaColor:e=>gt.test(e),hexOrHexaColor:e=>bt.test(e),rgbColor:e=>Oe.test(e),rgbaColor:e=>Me.test(e),rgbOrRgbaColor:e=>Oe.test(e)||Me.test(e),hexOrRgbColor:e=>ht.test(e)||Oe.test(e),hexaOrRgbaColor:e=>gt.test(e)||Me.test(e),anyColor:e=>bt.test(e)||Oe.test(e)||Me.test(e)};function zt(e,o=250,l){let u=null;function c(){const i=arguments,r=()=>{u=null,e.apply(this,i)};u!==null?clearTimeout(u):l===!0&&e.apply(this,i),u=setTimeout(r,o)}return c.cancel=()=>{u!==null&&clearTimeout(u)},c}const dl=[!0,!1,"ondemand"],fl={modelValue:{},error:{type:Boolean,default:null},errorMessage:String,noErrorIcon:Boolean,rules:Array,reactiveRules:Boolean,lazyRules:{type:[Boolean,String],default:!1,validator:e=>dl.includes(e)}};function vl(e,o){const{props:l,proxy:u}=t.getCurrentInstance(),c=t.ref(!1),i=t.ref(null),r=t.ref(!1);cl({validate:h,resetValidation:x});let b=0,S;const _=t.computed(()=>l.rules!==void 0&&l.rules!==null&&l.rules.length!==0),f=t.computed(()=>l.disable!==!0&&_.value===!0&&o.value===!1),w=t.computed(()=>l.error===!0||c.value===!0),k=t.computed(()=>typeof l.errorMessage=="string"&&l.errorMessage.length!==0?l.errorMessage:i.value);t.watch(()=>l.modelValue,()=>{r.value=!0,f.value===!0&&l.lazyRules===!1&&v()});function C(){l.lazyRules!=="ondemand"&&f.value===!0&&r.value===!0&&v()}t.watch(()=>l.reactiveRules,V=>{V===!0?S===void 0&&(S=t.watch(()=>l.rules,C,{immediate:!0,deep:!0})):S!==void 0&&(S(),S=void 0)},{immediate:!0}),t.watch(()=>l.lazyRules,C),t.watch(e,V=>{V===!0?r.value=!0:f.value===!0&&l.lazyRules!=="ondemand"&&v()});function x(){b++,o.value=!1,r.value=!1,c.value=!1,i.value=null,v.cancel()}function h(V=l.modelValue){if(l.disable===!0||_.value===!1)return!0;const H=++b,B=o.value!==!0?()=>{r.value=!0}:()=>{},M=(T,L)=>{T===!0&&B(),c.value=T,i.value=L||null,o.value=!1},Y=[];for(let T=0;T<l.rules.length;T++){const L=l.rules[T];let P;if(typeof L=="function"?P=L(V,Ue):typeof L=="string"&&Ue[L]!==void 0&&(P=Ue[L](V)),P===!1||typeof P=="string")return M(!0,P),!1;P!==!0&&P!==void 0&&Y.push(P)}return Y.length===0?(M(!1),!0):(o.value=!0,Promise.all(Y).then(T=>{if(T===void 0||Array.isArray(T)===!1||T.length===0)return H===b&&M(!1),!0;const L=T.find(P=>P===!1||typeof P=="string");return H===b&&M(L!==void 0,L),L===void 0},T=>(H===b&&(console.error(T),M(!0)),!1)))}const v=zt(h,0);return t.onBeforeUnmount(()=>{S==null||S(),v.cancel()}),Object.assign(u,{resetValidation:x,validate:h}),ie.injectProp(u,"hasError",()=>w.value),{isDirtyModel:r,hasRules:_,hasError:w,errorMessage:k,validate:h,resetValidation:x}}function Je(e){return e!=null&&(""+e).length!==0}const ml={...s.useDarkProps,...fl,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},Ge={...ml,maxlength:[Number,String]},Tt=["update:modelValue","clear","focus","blur"];function Ft({requiredForAttr:e=!0,tagProp:o,changeEvent:l=!1}={}){const{props:u,proxy:c}=t.getCurrentInstance(),i=s.useDark(u,c.$q),r=Q.useId({required:e,getValue:()=>u.for});return{requiredForAttr:e,changeEvent:l,tag:o===!0?t.computed(()=>u.tag):{value:"label"},isDark:i,editable:t.computed(()=>u.disable!==!0&&u.readonly!==!0),innerLoading:t.ref(!1),focused:t.ref(!1),hasPopupOpen:!1,splitAttrs:rl(),targetUid:r,rootRef:t.ref(null),targetRef:t.ref(null),controlRef:t.ref(null)}}function Rt(e){const{props:o,emit:l,slots:u,attrs:c,proxy:i}=t.getCurrentInstance(),{$q:r}=i;let b=null;e.hasValue===void 0&&(e.hasValue=t.computed(()=>Je(o.modelValue))),e.emitValue===void 0&&(e.emitValue=g=>{l("update:modelValue",g)}),e.controlEvents===void 0&&(e.controlEvents={onFocusin:te,onFocusout:W}),Object.assign(e,{clearValue:le,onControlFocusin:te,onControlFocusout:W,focus:L}),e.computedCounter===void 0&&(e.computedCounter=t.computed(()=>{if(o.counter!==!1){const g=typeof o.modelValue=="string"||typeof o.modelValue=="number"?(""+o.modelValue).length:Array.isArray(o.modelValue)===!0?o.modelValue.length:0,A=o.maxlength!==void 0?o.maxlength:o.maxValues;return g+(A!==void 0?" / "+A:"")}}));const{isDirtyModel:S,hasRules:_,hasError:f,errorMessage:w,resetValidation:k}=vl(e.focused,e.innerLoading),C=e.floatingLabel!==void 0?t.computed(()=>o.stackLabel===!0||e.focused.value===!0||e.floatingLabel.value===!0):t.computed(()=>o.stackLabel===!0||e.focused.value===!0||e.hasValue.value===!0),x=t.computed(()=>o.bottomSlots===!0||o.hint!==void 0||_.value===!0||o.counter===!0||o.error!==null),h=t.computed(()=>o.filled===!0?"filled":o.outlined===!0?"outlined":o.borderless===!0?"borderless":o.standout?"standout":"standard"),v=t.computed(()=>`q-field row no-wrap items-start q-field--${h.value}`+(e.fieldClass!==void 0?` ${e.fieldClass.value}`:"")+(o.rounded===!0?" q-field--rounded":"")+(o.square===!0?" q-field--square":"")+(C.value===!0?" q-field--float":"")+(H.value===!0?" q-field--labeled":"")+(o.dense===!0?" q-field--dense":"")+(o.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":"")+(f.value===!0?" q-field--error":"")+(f.value===!0||e.focused.value===!0?" q-field--highlighted":"")+(o.hideBottomSpace!==!0&&x.value===!0?" q-field--with-bottom":"")+(o.disable===!0?" q-field--disabled":o.readonly===!0?" q-field--readonly":"")),V=t.computed(()=>"q-field__control relative-position row no-wrap"+(o.bgColor!==void 0?` bg-${o.bgColor}`:"")+(f.value===!0?" text-negative":typeof o.standout=="string"&&o.standout.length!==0&&e.focused.value===!0?` ${o.standout}`:o.color!==void 0?` text-${o.color}`:"")),H=t.computed(()=>o.labelSlot===!0||o.label!==void 0),B=t.computed(()=>"q-field__label no-pointer-events absolute ellipsis"+(o.labelColor!==void 0&&f.value!==!0?` text-${o.labelColor}`:"")),M=t.computed(()=>({id:e.targetUid.value,editable:e.editable.value,focused:e.focused.value,floatingLabel:C.value,modelValue:o.modelValue,emitValue:e.emitValue})),Y=t.computed(()=>{const g={};return e.targetUid.value&&(g.for=e.targetUid.value),o.disable===!0&&(g["aria-disabled"]="true"),g});function T(){var Z;const g=document.activeElement;let A=(Z=e.targetRef)==null?void 0:Z.value;A&&(g===null||g.id!==e.targetUid.value)&&(A.hasAttribute("tabindex")===!0||(A=A.querySelector("[tabindex]")),A!==g&&(A==null||A.focus({preventScroll:!0})))}function L(){Q.addFocusFn(T)}function P(){Q.removeFocusFn(T);const g=document.activeElement;g!==null&&e.rootRef.value.contains(g)&&g.blur()}function te(g){b!==null&&(clearTimeout(b),b=null),e.editable.value===!0&&e.focused.value===!1&&(e.focused.value=!0,l("focus",g))}function W(g,A){b!==null&&clearTimeout(b),b=setTimeout(()=>{b=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,l("blur",g)),A==null||A())})}function le(g){var A;s.stopAndPrevent(g),r.platform.is.mobile!==!0?(((A=e.targetRef)==null?void 0:A.value)||e.rootRef.value).focus():e.rootRef.value.contains(document.activeElement)===!0&&document.activeElement.blur(),o.type==="file"&&(e.inputRef.value.value=null),l("update:modelValue",null),e.changeEvent===!0&&l("change",null),l("clear",o.modelValue),t.nextTick(()=>{const Z=S.value;k(),S.value=Z})}function q(g){[13,32].includes(g.keyCode)&&le(g)}function X(){const g=[];return u.prepend!==void 0&&g.push(t.h("div",{class:"q-field__prepend q-field__marginal row no-wrap items-center",key:"prepend",onClick:s.prevent},u.prepend())),g.push(t.h("div",{class:"q-field__control-container col relative-position row no-wrap q-anchor--skip"},oe())),f.value===!0&&o.noErrorIcon===!1&&g.push(U("error",[t.h(s.QIcon,{name:r.iconSet.field.error,color:"negative"})])),o.loading===!0||e.innerLoading.value===!0?g.push(U("inner-loading-append",u.loading!==void 0?u.loading():[t.h(s.QSpinner,{color:o.color})])):o.clearable===!0&&e.hasValue.value===!0&&e.editable.value===!0&&g.push(U("inner-clearable-append",[t.h(s.QIcon,{class:"q-field__focusable-action",name:o.clearIcon||r.iconSet.field.clear,tabindex:0,role:"button","aria-hidden":"false","aria-label":r.lang.label.clear,onKeyup:q,onClick:le})])),u.append!==void 0&&g.push(t.h("div",{class:"q-field__append q-field__marginal row no-wrap items-center",key:"append",onClick:s.prevent},u.append())),e.getInnerAppend!==void 0&&g.push(U("inner-append",e.getInnerAppend())),e.getControlChild!==void 0&&g.push(e.getControlChild()),g}function oe(){const g=[];return o.prefix!==void 0&&o.prefix!==null&&g.push(t.h("div",{class:"q-field__prefix no-pointer-events row items-center"},o.prefix)),e.getShadowControl!==void 0&&e.hasShadow.value===!0&&g.push(e.getShadowControl()),H.value===!0&&g.push(t.h("div",{class:B.value},s.hSlot(u.label,o.label))),e.getControl!==void 0?g.push(e.getControl()):u.rawControl!==void 0?g.push(u.rawControl()):u.control!==void 0&&g.push(t.h("div",{ref:e.targetRef,class:"q-field__native row",tabindex:-1,...e.splitAttrs.attributes.value,"data-autofocus":o.autofocus===!0||void 0},u.control(M.value))),o.suffix!==void 0&&o.suffix!==null&&g.push(t.h("div",{class:"q-field__suffix no-pointer-events row items-center"},o.suffix)),g.concat(s.hSlot(u.default))}function J(){let g,A;f.value===!0?w.value!==null?(g=[t.h("div",{role:"alert"},w.value)],A=`q--slot-error-${w.value}`):(g=s.hSlot(u.error),A="q--slot-error"):(o.hideHint!==!0||e.focused.value===!0)&&(o.hint!==void 0?(g=[t.h("div",o.hint)],A=`q--slot-hint-${o.hint}`):(g=s.hSlot(u.hint),A="q--slot-hint"));const Z=o.counter===!0||u.counter!==void 0;if(o.hideBottomSpace===!0&&Z===!1&&g===void 0)return;const a=t.h("div",{key:A,class:"q-field__messages col"},g);return t.h("div",{class:"q-field__bottom row items-start q-field__bottom--"+(o.hideBottomSpace!==!0?"animated":"stale"),onClick:s.prevent},[o.hideBottomSpace===!0?a:t.h(t.Transition,{name:"q-transition--field-message"},()=>a),Z===!0?t.h("div",{class:"q-field__counter"},u.counter!==void 0?u.counter():e.computedCounter.value):null])}function U(g,A){return A===null?null:t.h("div",{key:g,class:"q-field__append q-field__marginal row no-wrap items-center q-anchor--skip"},A)}let ae=!1;return t.onDeactivated(()=>{ae=!0}),t.onActivated(()=>{ae===!0&&o.autofocus===!0&&i.focus()}),o.autofocus===!0&&t.onMounted(()=>{i.focus()}),t.onBeforeUnmount(()=>{b!==null&&clearTimeout(b)}),Object.assign(i,{focus:L,blur:P}),function(){const A=e.getControl===void 0&&u.control===void 0?{...e.splitAttrs.attributes.value,"data-autofocus":o.autofocus===!0||void 0,...Y.value}:Y.value;return t.h(e.tag.value,{ref:e.rootRef,class:[v.value,c.class],style:c.style,...A},[u.before!==void 0?t.h("div",{class:"q-field__before q-field__marginal row no-wrap items-center",onClick:s.prevent},u.before()):null,t.h("div",{class:"q-field__inner relative-position col self-stretch"},[t.h("div",{ref:e.controlRef,class:V.value,tabindex:-1,...e.controlEvents},X()),x.value===!0?J():null]),u.after!==void 0?t.h("div",{class:"q-field__after q-field__marginal row no-wrap items-center",onClick:s.prevent},u.after()):null])}}const pl=s.createComponent({name:"QField",inheritAttrs:!1,props:{...Ge,tag:{type:String,default:"label"}},emits:Tt,setup(){return Rt(Ft({tagProp:!0}))}}),hl={xs:8,sm:10,md:14,lg:20,xl:24},gl=s.createComponent({name:"QChip",props:{...s.useDarkProps,...s.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:o,emit:l}){const{proxy:{$q:u}}=t.getCurrentInstance(),c=s.useDark(e,u),i=s.useSize(e,hl),r=t.computed(()=>e.selected===!0||e.icon!==void 0),b=t.computed(()=>e.selected===!0?e.iconSelected||u.iconSet.chip.selected:e.icon),S=t.computed(()=>e.iconRemove||u.iconSet.chip.remove),_=t.computed(()=>e.disable===!1&&(e.clickable===!0||e.selected!==null)),f=t.computed(()=>{const v=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}`:"")+(v?` text-${v} 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":"")+(_.value===!0?" q-chip--clickable cursor-pointer non-selectable q-hoverable":"")+(e.square===!0?" q-chip--square":"")+(c.value===!0?" q-chip--dark q-dark":"")}),w=t.computed(()=>{const v=e.disable===!0?{tabindex:-1,"aria-disabled":"true"}:{tabindex:e.tabindex||0},V={...v,role:"button","aria-hidden":"false","aria-label":e.removeAriaLabel||u.lang.label.remove};return{chip:v,remove:V}});function k(v){v.keyCode===13&&C(v)}function C(v){e.disable||(l("update:selected",!e.selected),l("click",v))}function x(v){(v.keyCode===void 0||v.keyCode===13)&&(s.stopAndPrevent(v),e.disable===!1&&(l("update:modelValue",!1),l("remove")))}function h(){const v=[];_.value===!0&&v.push(t.h("div",{class:"q-focus-helper"})),r.value===!0&&v.push(t.h(s.QIcon,{class:"q-chip__icon q-chip__icon--left",name:b.value}));const V=e.label!==void 0?[t.h("div",{class:"ellipsis"},[e.label])]:void 0;return v.push(t.h("div",{class:"q-chip__content col row no-wrap items-center q-anchor--skip"},s.hMergeSlotSafely(o.default,V))),e.iconRight&&v.push(t.h(s.QIcon,{class:"q-chip__icon q-chip__icon--right",name:e.iconRight})),e.removable===!0&&v.push(t.h(s.QIcon,{class:"q-chip__icon q-chip__icon--remove cursor-pointer",name:S.value,...w.value.remove,onClick:x,onKeyup:x})),v}return()=>{if(e.modelValue===!1)return;const v={class:f.value,style:i.value};return _.value===!0&&Object.assign(v,w.value.chip,{onClick:C,onKeyup:k}),s.hDir("div",v,h(),"ripple",e.ripple!==!1&&e.disable!==!0,()=>[[s.Ripple,e.ripple]])}}});function bl(e,o,l){function u(){}return t.onBeforeUnmount(()=>{e.value===!0&&void 0}),{removeFromHistory:u,addToHistory(){}}}let _e=0,Qe,We,Ae,Xe=!1,St,yt,wt,pe=null;function Sl(e){yl(e)&&s.stopAndPrevent(e)}function yl(e){if(e.target===document.body||e.target.classList.contains("q-layout__backdrop"))return!0;const o=s.getEventPath(e),l=e.shiftKey&&!e.deltaX,u=!l&&Math.abs(e.deltaX)<=Math.abs(e.deltaY),c=l||u?e.deltaY:e.deltaX;for(let i=0;i<o.length;i++){const r=o[i];if(Q.hasScrollbar(r,u))return u?c<0&&r.scrollTop===0?!0:c>0&&r.scrollTop+r.clientHeight===r.scrollHeight:c<0&&r.scrollLeft===0?!0:c>0&&r.scrollLeft+r.clientWidth===r.scrollWidth}return!0}function Ct(e){e.target===document&&(document.scrollingElement.scrollTop=document.scrollingElement.scrollTop)}function Le(e){Xe!==!0&&(Xe=!0,requestAnimationFrame(()=>{Xe=!1;const{height:o}=e.target,{clientHeight:l,scrollTop:u}=document.scrollingElement;(Ae===void 0||o!==window.innerHeight)&&(Ae=l-o,document.scrollingElement.scrollTop=u),u>Ae&&(document.scrollingElement.scrollTop-=Math.ceil((u-Ae)/8))}))}function kt(e){const o=document.body,l=window.visualViewport!==void 0;if(e==="add"){const{overflowY:u,overflowX:c}=window.getComputedStyle(o);Qe=Q.getHorizontalScrollPosition(window),We=Q.getVerticalScrollPosition(window),St=o.style.left,yt=o.style.top,wt=window.location.href,o.style.left=`-${Qe}px`,o.style.top=`-${We}px`,c!=="hidden"&&(c==="scroll"||o.scrollWidth>window.innerWidth)&&o.classList.add("q-body--force-scrollbar-x"),u!=="hidden"&&(u==="scroll"||o.scrollHeight>window.innerHeight)&&o.classList.add("q-body--force-scrollbar-y"),o.classList.add("q-body--prevent-scroll"),document.qScrollPrevented=!0,ie.client.is.ios===!0&&(l===!0?(window.scrollTo(0,0),window.visualViewport.addEventListener("resize",Le,s.listenOpts.passiveCapture),window.visualViewport.addEventListener("scroll",Le,s.listenOpts.passiveCapture),window.scrollTo(0,0)):window.addEventListener("scroll",Ct,s.listenOpts.passiveCapture))}ie.client.is.desktop===!0&&ie.client.is.mac===!0&&window[`${e}EventListener`]("wheel",Sl,s.listenOpts.notPassive),e==="remove"&&(ie.client.is.ios===!0&&(l===!0?(window.visualViewport.removeEventListener("resize",Le,s.listenOpts.passiveCapture),window.visualViewport.removeEventListener("scroll",Le,s.listenOpts.passiveCapture)):window.removeEventListener("scroll",Ct,s.listenOpts.passiveCapture)),o.classList.remove("q-body--prevent-scroll"),o.classList.remove("q-body--force-scrollbar-x"),o.classList.remove("q-body--force-scrollbar-y"),document.qScrollPrevented=!1,o.style.left=St,o.style.top=yt,window.location.href===wt&&window.scrollTo(Qe,We),Ae=void 0)}function wl(e){let o="add";if(e===!0){if(_e++,pe!==null){clearTimeout(pe),pe=null;return}if(_e>1)return}else{if(_e===0||(_e--,_e>0))return;if(o="remove",ie.client.is.ios===!0&&ie.client.is.nativeMobile===!0){pe!==null&&clearTimeout(pe),pe=setTimeout(()=>{kt(o),pe=null},100);return}}kt(o)}function Cl(){let e;return{preventBodyScroll(o){o!==e&&(e!==void 0||o===!0)&&(e=o,wl(o))}}}let Pe=0;const kl={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"},qt={standard:["scale","scale"],top:["slide-down","slide-up"],bottom:["slide-up","slide-down"],right:["slide-left","slide-right"],left:["slide-right","slide-left"]},ql=s.createComponent({name:"QDialog",inheritAttrs:!1,props:{...Q.useModelToggleProps,...Q.useTransitionProps,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:[...Q.useModelToggleEmits,"shake","click","escapeKey"],setup(e,{slots:o,emit:l,attrs:u}){const c=t.getCurrentInstance(),i=t.ref(null),r=t.ref(!1),b=t.ref(!1);let S=null,_=null,f,w;const k=t.computed(()=>e.persistent!==!0&&e.noRouteDismiss!==!0&&e.seamless!==!0),{preventBodyScroll:C}=Cl(),{registerTimeout:x}=Q.useTimeout(),{registerTick:h,removeTick:v}=Q.useTick(),{transitionProps:V,transitionStyle:H}=Q.useTransition(e,()=>qt[e.position][0],()=>qt[e.position][1]),B=t.computed(()=>H.value+(e.backdropFilter!==void 0?`;backdrop-filter:${e.backdropFilter};-webkit-backdrop-filter:${e.backdropFilter}`:"")),{showPortal:M,hidePortal:Y,portalIsAccessible:T,renderPortal:L}=Q.usePortal(c,i,z,"dialog"),{hide:P}=Q.useModelToggle({showing:r,hideOnRouteChange:k,handleShow:X,handleHide:oe,processOnMount:!0});bl(r);const te=t.computed(()=>`q-dialog__inner flex no-pointer-events q-dialog__inner--${e.maximized===!0?"maximized":"minimized"} q-dialog__inner--${e.position} ${kl[e.position]}`+(b.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":"")),W=t.computed(()=>r.value===!0&&e.seamless!==!0),le=t.computed(()=>e.autoClose===!0?{onClick:Z}:{}),q=t.computed(()=>[`q-dialog fullscreen no-pointer-events q-dialog--${W.value===!0?"modal":"seamless"}`,u.class]);t.watch(()=>e.maximized,y=>{r.value===!0&&A(y)}),t.watch(W,y=>{C(y),y===!0?(ie.addFocusout(m),Q.addEscapeKey(ae)):(ie.removeFocusout(m),Q.removeEscapeKey(ae))});function X(y){var F;_=e.noRefocus===!1&&document.activeElement!==null?document.activeElement:null,A(e.maximized),M(),b.value=!0,e.noFocus!==!0?((F=document.activeElement)==null||F.blur(),h(J)):v(),x(()=>{if(c.proxy.$q.platform.is.ios===!0){if(e.seamless!==!0&&document.activeElement){const{top:R,bottom:I}=document.activeElement.getBoundingClientRect(),{innerHeight:N}=window,E=window.visualViewport!==void 0?window.visualViewport.height:N;R>0&&I>E/2&&(document.scrollingElement.scrollTop=Math.min(document.scrollingElement.scrollHeight-E,I>=N?1/0:Math.ceil(document.scrollingElement.scrollTop+I-E/2))),document.activeElement.scrollIntoView()}w=!0,i.value.click(),w=!1}M(!0),b.value=!1,l("show",y)},e.transitionDuration)}function oe(y){v(),g(!0),b.value=!0,Y(),_!==null&&((((y==null?void 0:y.type.indexOf("key"))===0?_.closest('[tabindex]:not([tabindex^="-"])'):void 0)||_).focus(),_=null),x(()=>{Y(!0),b.value=!1,l("hide",y)},e.transitionDuration)}function J(y){Q.addFocusFn(()=>{let F=i.value;if(F!==null){if(y!==void 0){const R=F.querySelector(y);if(R!==null){R.focus({preventScroll:!0});return}}F.contains(document.activeElement)!==!0&&(F=F.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]")||F.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]")||F.querySelector("[autofocus], [data-autofocus]")||F,F.focus({preventScroll:!0}))}})}function U(y){y&&typeof y.focus=="function"?y.focus({preventScroll:!0}):J(),l("shake");const F=i.value;F!==null&&(F.classList.remove("q-animate--scale"),F.classList.add("q-animate--scale"),S!==null&&clearTimeout(S),S=setTimeout(()=>{S=null,i.value!==null&&(F.classList.remove("q-animate--scale"),J())},170))}function ae(){e.seamless!==!0&&(e.persistent===!0||e.noEscDismiss===!0?e.maximized!==!0&&e.noShake!==!0&&U():(l("escapeKey"),P()))}function g(y){S!==null&&(clearTimeout(S),S=null),(y===!0||r.value===!0)&&(A(!1),e.seamless!==!0&&(C(!1),ie.removeFocusout(m),Q.removeEscapeKey(ae))),y!==!0&&(_=null)}function A(y){y===!0?f!==!0&&(Pe<1&&document.body.classList.add("q-body--dialog"),Pe++,f=!0):f===!0&&(Pe<2&&document.body.classList.remove("q-body--dialog"),Pe--,f=!1)}function Z(y){w!==!0&&(P(y),l("click",y))}function a(y){e.persistent!==!0&&e.noBackdropDismiss!==!0?P(y):e.noShake!==!0&&U()}function m(y){e.allowFocusOutside!==!0&&T.value===!0&&s.childHasFocus(i.value,y.target)!==!0&&J('[tabindex]:not([tabindex="-1"])')}Object.assign(c.proxy,{focus:J,shake:U,__updateRefocusTarget(y){_=y||null}}),t.onBeforeUnmount(g);function z(){return t.h("div",{role:"dialog","aria-modal":W.value===!0?"true":"false",...u,class:q.value},[t.h(t.Transition,{name:"q-transition--fade",appear:!0},()=>W.value===!0?t.h("div",{class:"q-dialog__backdrop fixed-full",style:B.value,"aria-hidden":"true",tabindex:-1,onClick:a}):null),t.h(t.Transition,V.value,()=>r.value===!0?t.h("div",{ref:i,class:te.value,style:H.value,tabindex:-1,...le.value},s.hSlot(o.default)):null)])}return L}});let De=!1;{const e=document.createElement("div");e.setAttribute("dir","rtl"),Object.assign(e.style,{width:"1px",height:"1px",overflow:"auto"});const o=document.createElement("div");Object.assign(o.style,{width:"1000px",height:"1px"}),document.body.appendChild(e),e.appendChild(o),e.scrollLeft=-1e3,De=e.scrollLeft>=0,e.remove()}const ue=1e3,xl=["start","center","end","start-force","center-force","end-force"],Ot=Array.prototype.filter,Vl=window.getComputedStyle(document.body).overflowAnchor===void 0?s.noop:function(e,o){e!==null&&(e._qOverflowAnimationFrame!==void 0&&cancelAnimationFrame(e._qOverflowAnimationFrame),e._qOverflowAnimationFrame=requestAnimationFrame(()=>{if(e===null)return;e._qOverflowAnimationFrame=void 0;const l=e.children||[];Ot.call(l,c=>c.dataset&&c.dataset.qVsAnchor!==void 0).forEach(c=>{delete c.dataset.qVsAnchor});const u=l[o];u!=null&&u.dataset&&(u.dataset.qVsAnchor="")}))};function ke(e,o){return e+o}function Ye(e,o,l,u,c,i,r,b){const S=e===window?document.scrollingElement||document.documentElement:e,_=c===!0?"offsetWidth":"offsetHeight",f={scrollStart:0,scrollViewSize:-r-b,scrollMaxSize:0,offsetStart:-r,offsetEnd:-b};if(c===!0?(e===window?(f.scrollStart=window.pageXOffset||window.scrollX||document.body.scrollLeft||0,f.scrollViewSize+=document.documentElement.clientWidth):(f.scrollStart=S.scrollLeft,f.scrollViewSize+=S.clientWidth),f.scrollMaxSize=S.scrollWidth,i===!0&&(f.scrollStart=(De===!0?f.scrollMaxSize-f.scrollViewSize:0)-f.scrollStart)):(e===window?(f.scrollStart=window.pageYOffset||window.scrollY||document.body.scrollTop||0,f.scrollViewSize+=document.documentElement.clientHeight):(f.scrollStart=S.scrollTop,f.scrollViewSize+=S.clientHeight),f.scrollMaxSize=S.scrollHeight),l!==null)for(let w=l.previousElementSibling;w!==null;w=w.previousElementSibling)w.classList.contains("q-virtual-scroll--skip")===!1&&(f.offsetStart+=w[_]);if(u!==null)for(let w=u.nextElementSibling;w!==null;w=w.nextElementSibling)w.classList.contains("q-virtual-scroll--skip")===!1&&(f.offsetEnd+=w[_]);if(o!==e){const w=S.getBoundingClientRect(),k=o.getBoundingClientRect();c===!0?(f.offsetStart+=k.left-w.left,f.offsetEnd-=k.width):(f.offsetStart+=k.top-w.top,f.offsetEnd-=k.height),e!==window&&(f.offsetStart+=f.scrollStart),f.offsetEnd+=f.scrollMaxSize-f.offsetStart}return f}function xt(e,o,l,u){o==="end"&&(o=(e===window?document.body:e)[l===!0?"scrollWidth":"scrollHeight"]),e===window?l===!0?(u===!0&&(o=(De===!0?document.body.scrollWidth-document.documentElement.clientWidth:0)-o),window.scrollTo(o,window.pageYOffset||window.scrollY||document.body.scrollTop||0)):window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,o):l===!0?(u===!0&&(o=(De===!0?e.scrollWidth-e.offsetWidth:0)-o),e.scrollLeft=o):e.scrollTop=o}function Be(e,o,l,u){if(l>=u)return 0;const c=o.length,i=Math.floor(l/ue),r=Math.floor((u-1)/ue)+1;let b=e.slice(i,r).reduce(ke,0);return l%ue!==0&&(b-=o.slice(i*ue,l).reduce(ke,0)),u%ue!==0&&u!==c&&(b-=o.slice(u,r*ue).reduce(ke,0)),b}const _l={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]},Vt={virtualScrollHorizontal:Boolean,onVirtualScroll:Function,..._l};function Bl({virtualScrollLength:e,getVirtualScrollTarget:o,getVirtualScrollEl:l,virtualScrollItemSizeComputed:u}){const c=t.getCurrentInstance(),{props:i,emit:r,proxy:b}=c,{$q:S}=b;let _,f,w,k=[],C;const x=t.ref(0),h=t.ref(0),v=t.ref({}),V=t.ref(null),H=t.ref(null),B=t.ref(null),M=t.ref({from:0,to:0}),Y=t.computed(()=>i.tableColspan!==void 0?i.tableColspan:100);u===void 0&&(u=t.computed(()=>i.virtualScrollItemSize));const T=t.computed(()=>u.value+";"+i.virtualScrollHorizontal),L=t.computed(()=>T.value+";"+i.virtualScrollSliceRatioBefore+";"+i.virtualScrollSliceRatioAfter);t.watch(L,()=>{U()}),t.watch(T,P);function P(){J(f,!0)}function te(a){J(a===void 0?f:a)}function W(a,m){const z=o();if(z==null||z.nodeType===8)return;const y=Ye(z,l(),V.value,H.value,i.virtualScrollHorizontal,S.lang.rtl,i.virtualScrollStickySizeStart,i.virtualScrollStickySizeEnd);w!==y.scrollViewSize&&U(y.scrollViewSize),q(z,y,Math.min(e.value-1,Math.max(0,parseInt(a,10)||0)),0,xl.indexOf(m)!==-1?m:f!==-1&&a>f?"end":"start")}function le(){const a=o();if(a==null||a.nodeType===8)return;const m=Ye(a,l(),V.value,H.value,i.virtualScrollHorizontal,S.lang.rtl,i.virtualScrollStickySizeStart,i.virtualScrollStickySizeEnd),z=e.value-1,y=m.scrollMaxSize-m.offsetStart-m.offsetEnd-h.value;if(_===m.scrollStart)return;if(m.scrollMaxSize<=0){q(a,m,0,0);return}w!==m.scrollViewSize&&U(m.scrollViewSize),X(M.value.from);const F=Math.floor(m.scrollMaxSize-Math.max(m.scrollViewSize,m.offsetEnd)-Math.min(C[z],m.scrollViewSize/2));if(F>0&&Math.ceil(m.scrollStart)>=F){q(a,m,z,m.scrollMaxSize-m.offsetEnd-k.reduce(ke,0));return}let R=0,I=m.scrollStart-m.offsetStart,N=I;if(I<=y&&I+m.scrollViewSize>=x.value)I-=x.value,R=M.value.from,N=I;else for(let E=0;I>=k[E]&&R<z;E++)I-=k[E],R+=ue;for(;I>0&&R<z;)I-=C[R],I>-m.scrollViewSize?(R++,N=I):N=C[R]+I;q(a,m,R,N)}function q(a,m,z,y,F){const R=typeof F=="string"&&F.indexOf("-force")!==-1,I=R===!0?F.replace("-force",""):F,N=I!==void 0?I:"start";let E=Math.max(0,z-v.value[N]),G=E+v.value.total;G>e.value&&(G=e.value,E=Math.max(0,G-v.value.total)),_=m.scrollStart;const se=E!==M.value.from||G!==M.value.to;if(se===!1&&I===void 0){g(z);return}const{activeElement:Ee}=document,ne=B.value;se===!0&&ne!==null&&ne!==Ee&&ne.contains(Ee)===!0&&(ne.addEventListener("focusout",oe),setTimeout(()=>{ne==null||ne.removeEventListener("focusout",oe)})),Vl(ne,z-E);const Ie=I!==void 0?C.slice(E,z).reduce(ke,0):0;if(se===!0){const de=G>=M.value.from&&E<=M.value.to?M.value.to:G;M.value={from:E,to:de},x.value=Be(k,C,0,E),h.value=Be(k,C,G,e.value),requestAnimationFrame(()=>{M.value.to!==G&&_===m.scrollStart&&(M.value={from:M.value.from,to:G},h.value=Be(k,C,G,e.value))})}requestAnimationFrame(()=>{if(_!==m.scrollStart)return;se===!0&&X(E);const de=C.slice(E,z).reduce(ke,0),fe=de+m.offsetStart+x.value,ze=fe+C[z];let qe=fe+y;if(I!==void 0){const He=de-Ie,xe=m.scrollStart+He;qe=R!==!0&&xe<fe&&ze<xe+m.scrollViewSize?xe:I==="end"?ze-m.scrollViewSize:fe-(I==="start"?0:Math.round((m.scrollViewSize-C[z])/2))}_=qe,xt(a,qe,i.virtualScrollHorizontal,S.lang.rtl),g(z)})}function X(a){const m=B.value;if(m){const z=Ot.call(m.children,E=>E.classList&&E.classList.contains("q-virtual-scroll--skip")===!1),y=z.length,F=i.virtualScrollHorizontal===!0?E=>E.getBoundingClientRect().width:E=>E.offsetHeight;let R=a,I,N;for(let E=0;E<y;){for(I=F(z[E]),E++;E<y&&z[E].classList.contains("q-virtual-scroll--with-prev")===!0;)I+=F(z[E]),E++;N=I-C[R],N!==0&&(C[R]+=N,k[Math.floor(R/ue)]+=N),R++}}}function oe(){var a;(a=B.value)==null||a.focus()}function J(a,m){const z=1*u.value;(m===!0||Array.isArray(C)===!1)&&(C=[]);const y=C.length;C.length=e.value;for(let R=e.value-1;R>=y;R--)C[R]=z;const F=Math.floor((e.value-1)/ue);k=[];for(let R=0;R<=F;R++){let I=0;const N=Math.min((R+1)*ue,e.value);for(let E=R*ue;E<N;E++)I+=C[E];k.push(I)}f=-1,_=void 0,x.value=Be(k,C,0,M.value.from),h.value=Be(k,C,M.value.to,e.value),a>=0?(X(M.value.from),t.nextTick(()=>{W(a)})):A()}function U(a){if(a===void 0&&typeof window<"u"){const I=o();I!=null&&I.nodeType!==8&&(a=Ye(I,l(),V.value,H.value,i.virtualScrollHorizontal,S.lang.rtl,i.virtualScrollStickySizeStart,i.virtualScrollStickySizeEnd).scrollViewSize)}w=a;const m=parseFloat(i.virtualScrollSliceRatioBefore)||0,z=parseFloat(i.virtualScrollSliceRatioAfter)||0,y=1+m+z,F=a===void 0||a<=0?1:Math.ceil(a/u.value),R=Math.max(1,F,Math.ceil((i.virtualScrollSliceSize>0?i.virtualScrollSliceSize:10)/y));v.value={total:Math.ceil(R*y),start:Math.ceil(R*m),center:Math.ceil(R*(.5+m)),end:Math.ceil(R*(1+m)),view:F}}function ae(a,m){const z=i.virtualScrollHorizontal===!0?"width":"height",y={["--q-virtual-scroll-item-"+z]:u.value+"px"};return[a==="tbody"?t.h(a,{class:"q-virtual-scroll__padding",key:"before",ref:V},[t.h("tr",[t.h("td",{style:{[z]:`${x.value}px`,...y},colspan:Y.value})])]):t.h(a,{class:"q-virtual-scroll__padding",key:"before",ref:V,style:{[z]:`${x.value}px`,...y}}),t.h(a,{class:"q-virtual-scroll__content",key:"content",ref:B,tabindex:-1},m.flat()),a==="tbody"?t.h(a,{class:"q-virtual-scroll__padding",key:"after",ref:H},[t.h("tr",[t.h("td",{style:{[z]:`${h.value}px`,...y},colspan:Y.value})])]):t.h(a,{class:"q-virtual-scroll__padding",key:"after",ref:H,style:{[z]:`${h.value}px`,...y}})]}function g(a){f!==a&&(i.onVirtualScroll!==void 0&&r("virtualScroll",{index:a,from:M.value.from,to:M.value.to-1,direction:a<f?"decrease":"increase",ref:b}),f=a)}U();const A=zt(le,S.platform.is.ios===!0?120:35);t.onBeforeMount(()=>{U()});let Z=!1;return t.onDeactivated(()=>{Z=!0}),t.onActivated(()=>{if(Z!==!0)return;const a=o();_!==void 0&&a!==void 0&&a!==null&&a.nodeType!==8?xt(a,_,i.virtualScrollHorizontal,S.lang.rtl):W(f)}),t.onBeforeUnmount(()=>{A.cancel()}),Object.assign(b,{scrollTo:W,reset:P,refresh:te}),{virtualScrollSliceRange:M,virtualScrollSliceSizeComputed:v,setVirtualScrollSize:U,onVirtualScrollEvt:A,localResetVirtualScroll:J,padVirtualScroll:ae,scrollTo:W,reset:P,refresh:te}}const Al=/[\u3000-\u303f\u3040-\u309f\u30a0-\u30ff\uff00-\uff9f\u4e00-\u9faf\u3400-\u4dbf]/,El=/[\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,Il=/[\u3131-\u314e\u314f-\u3163\uac00-\ud7a3]/,zl=/[a-z0-9_ -]$/i;function Tl(e){return function(l){if(l.type==="compositionend"||l.type==="change"){if(l.target.qComposing!==!0)return;l.target.qComposing=!1,e(l)}else l.type==="compositionupdate"&&l.target.qComposing!==!0&&typeof l.data=="string"&&(ie.client.is.firefox===!0?zl.test(l.data)===!1:Al.test(l.data)===!0||El.test(l.data)===!0||Il.test(l.data)===!0)===!0&&(l.target.qComposing=!0)}}function ce(e,o){if(e===o)return!0;if(e!==null&&o!==null&&typeof e=="object"&&typeof o=="object"){if(e.constructor!==o.constructor)return!1;let l,u;if(e.constructor===Array){if(l=e.length,l!==o.length)return!1;for(u=l;u--!==0;)if(ce(e[u],o[u])!==!0)return!1;return!0}if(e.constructor===Map){if(e.size!==o.size)return!1;let i=e.entries();for(u=i.next();u.done!==!0;){if(o.has(u.value[0])!==!0)return!1;u=i.next()}for(i=e.entries(),u=i.next();u.done!==!0;){if(ce(u.value[1],o.get(u.value[0]))!==!0)return!1;u=i.next()}return!0}if(e.constructor===Set){if(e.size!==o.size)return!1;const i=e.entries();for(u=i.next();u.done!==!0;){if(o.has(u.value[0])!==!0)return!1;u=i.next()}return!0}if(e.buffer!=null&&e.buffer.constructor===ArrayBuffer){if(l=e.length,l!==o.length)return!1;for(u=l;u--!==0;)if(e[u]!==o[u])return!1;return!0}if(e.constructor===RegExp)return e.source===o.source&&e.flags===o.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===o.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===o.toString();const c=Object.keys(e).filter(i=>e[i]!==void 0);if(l=c.length,l!==Object.keys(o).filter(i=>o[i]!==void 0).length)return!1;for(u=l;u--!==0;){const i=c[u];if(ce(e[i],o[i])!==!0)return!1}return!0}return e!==e&&o!==o}function _t(e,o,l){if(l<=o)return o;const u=l-o+1;let c=o+(e-o)%u;return c<o&&(c=u+c),c===0?0:c}const Bt=e=>["add","add-unique","toggle"].includes(e),Fl=".*+?^${}()|[]\\",Rl=Object.keys(Ge);function Ze(e,o){if(typeof e=="function")return e;const l=e!==void 0?e:o;return u=>u!==null&&typeof u=="object"&&l in u?u[l]:u}const Ol=s.createComponent({name:"QSelect",inheritAttrs:!1,props:{...Vt,...At,...Ge,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:Bt},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:Vt.virtualScrollItemSize.type,onNewValue:Function,onFilter:Function},emits:[...Tt,"add","remove","inputValue","keyup","keypress","keydown","popupShow","popupHide","filterAbort"],setup(e,{slots:o,emit:l}){const{proxy:u}=t.getCurrentInstance(),{$q:c}=u,i=t.ref(!1),r=t.ref(!1),b=t.ref(-1),S=t.ref(""),_=t.ref(!1),f=t.ref(!1);let w=null,k=null,C,x,h,v=null,V,H,B,M;const Y=t.ref(null),T=t.ref(null),L=t.ref(null),P=t.ref(null),te=t.ref(null),W=tl(e),le=Tl(st),q=t.computed(()=>Array.isArray(e.options)?e.options.length:0),X=t.computed(()=>e.virtualScrollItemSize===void 0?e.optionsDense===!0?24:48:e.virtualScrollItemSize),{virtualScrollSliceRange:oe,virtualScrollSliceSizeComputed:J,localResetVirtualScroll:U,padVirtualScroll:ae,onVirtualScrollEvt:g,scrollTo:A,setVirtualScrollSize:Z}=Bl({virtualScrollLength:q,getVirtualScrollTarget:$t,getVirtualScrollEl:at,virtualScrollItemSizeComputed:X}),a=Ft(),m=t.computed(()=>{const n=e.mapOptions===!0&&e.multiple!==!0,d=e.modelValue!==void 0&&(e.modelValue!==null||n===!0)?e.multiple===!0&&Array.isArray(e.modelValue)?e.modelValue:[e.modelValue]:[];if(e.mapOptions===!0&&Array.isArray(e.options)===!0){const p=e.mapOptions===!0&&C!==void 0?C:[],O=d.map($=>Pt($,p));return e.modelValue===null&&n===!0?O.filter($=>$!==null):O}return d}),z=t.computed(()=>{const n={};return Rl.forEach(d=>{const p=e[d];p!==void 0&&(n[d]=p)}),n}),y=t.computed(()=>e.optionsDark===null?a.isDark.value:e.optionsDark),F=t.computed(()=>Je(m.value)),R=t.computed(()=>{let n="q-field__input q-placeholder col";return e.hideSelected===!0||m.value.length===0?[n,e.inputClass]:(n+=" q-field__input--padding",e.inputClass===void 0?n:[n,e.inputClass])}),I=t.computed(()=>(e.virtualScrollHorizontal===!0?"q-virtual-scroll--horizontal":"")+(e.popupContentClass?" "+e.popupContentClass:"")),N=t.computed(()=>q.value===0),E=t.computed(()=>m.value.map(n=>ee.value(n)).join(", ")),G=t.computed(()=>e.displayValue!==void 0?e.displayValue:E.value),se=t.computed(()=>e.optionsHtml===!0?()=>!0:n=>(n==null?void 0:n.html)===!0),Ee=t.computed(()=>e.displayValueHtml===!0||e.displayValue===void 0&&(e.optionsHtml===!0||m.value.some(se.value))),ne=t.computed(()=>a.focused.value===!0?e.tabindex:-1),Ie=t.computed(()=>{const n={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":`${a.targetUid.value}_lb`};return b.value>=0&&(n["aria-activedescendant"]=`${a.targetUid.value}_${b.value}`),n}),de=t.computed(()=>({id:`${a.targetUid.value}_lb`,role:"listbox","aria-multiselectable":e.multiple===!0?"true":"false"})),fe=t.computed(()=>m.value.map((n,d)=>({index:d,opt:n,html:se.value(n),selected:!0,removeAtIndex:Lt,toggleOption:ve,tabindex:ne.value}))),ze=t.computed(()=>{if(q.value===0)return[];const{from:n,to:d}=oe.value;return e.options.slice(n,d).map((p,O)=>{const $=he.value(p)===!0,j=je(p)===!0,D=n+O,K={clickable:!0,active:j,activeClass:xe.value,manualFocus:!0,focused:!1,disable:$,tabindex:-1,dense:e.optionsDense,dark:y.value,role:"option","aria-selected":j===!0?"true":"false",id:`${a.targetUid.value}_${D}`,onClick:()=>{ve(p)}};return $!==!0&&(b.value===D&&(K.focused=!0),c.platform.is.desktop===!0&&(K.onMousemove=()=>{i.value===!0&&ge(D)})),{index:D,opt:p,html:se.value(p),label:ee.value(p),selected:K.active,focused:K.focused,toggleOption:ve,setOptionIndex:ge,itemProps:K}})}),qe=t.computed(()=>e.dropdownIcon!==void 0?e.dropdownIcon:c.iconSet.arrow.dropdown),He=t.computed(()=>e.optionsCover===!1&&e.outlined!==!0&&e.standout!==!0&&e.borderless!==!0&&e.rounded!==!0),xe=t.computed(()=>e.optionsSelectedClass!==void 0?e.optionsSelectedClass:e.color!==void 0?`text-${e.color}`:""),re=t.computed(()=>Ze(e.optionValue,"value")),ee=t.computed(()=>Ze(e.optionLabel,"label")),he=t.computed(()=>Ze(e.optionDisable,"disable")),Te=t.computed(()=>m.value.map(re.value)),Mt=t.computed(()=>{const n={onInput:st,onChange:le,onKeydown:it,onKeyup:nt,onKeypress:ut,onFocus:lt,onClick(d){x===!0&&s.stop(d)}};return n.onCompositionstart=n.onCompositionupdate=n.onCompositionend=le,n});t.watch(m,n=>{C=n,e.useInput===!0&&e.fillInput===!0&&e.multiple!==!0&&a.innerLoading.value!==!0&&(r.value!==!0&&i.value!==!0||F.value!==!0)&&(h!==!0&&we(),(r.value===!0||i.value===!0)&&be(""))},{immediate:!0}),t.watch(()=>e.fillInput,we),t.watch(i,Ke),t.watch(q,Jt);function et(n){return e.emitValue===!0?re.value(n):n}function Ne(n){if(n!==-1&&n<m.value.length)if(e.multiple===!0){const d=e.modelValue.slice();l("remove",{index:n,value:d.splice(n,1)[0]}),l("update:modelValue",d)}else l("update:modelValue",null)}function Lt(n){Ne(n),a.focus()}function tt(n,d){const p=et(n);if(e.multiple!==!0){e.fillInput===!0&&Ve(ee.value(n),!0,!0),l("update:modelValue",p);return}if(m.value.length===0){l("add",{index:0,value:p}),l("update:modelValue",e.multiple===!0?[p]:p);return}if(d===!0&&je(n)===!0||e.maxValues!==void 0&&e.modelValue.length>=e.maxValues)return;const O=e.modelValue.slice();l("add",{index:O.length,value:p}),O.push(p),l("update:modelValue",O)}function ve(n,d){var j;if(a.editable.value!==!0||n===void 0||he.value(n)===!0)return;const p=re.value(n);if(e.multiple!==!0){d!==!0&&(Ve(e.fillInput===!0?ee.value(n):"",!0,!0),me()),(j=T.value)==null||j.focus(),(m.value.length===0||ce(re.value(m.value[0]),p)!==!0)&&l("update:modelValue",e.emitValue===!0?p:n);return}if((x!==!0||_.value===!0)&&a.focus(),lt(),m.value.length===0){const D=e.emitValue===!0?p:n;l("add",{index:0,value:D}),l("update:modelValue",e.multiple===!0?[D]:D);return}const O=e.modelValue.slice(),$=Te.value.findIndex(D=>ce(D,p));if($!==-1)l("remove",{index:$,value:O.splice($,1)[0]});else{if(e.maxValues!==void 0&&O.length>=e.maxValues)return;const D=e.emitValue===!0?p:n;l("add",{index:O.length,value:D}),O.push(D)}l("update:modelValue",O)}function ge(n){if(c.platform.is.desktop!==!0)return;const d=n!==-1&&n<q.value?n:-1;b.value!==d&&(b.value=d)}function Fe(n=1,d){if(i.value===!0){let p=b.value;do p=_t(p+n,-1,q.value-1);while(p!==-1&&p!==b.value&&he.value(e.options[p])===!0);b.value!==p&&(ge(p),A(p),d!==!0&&e.useInput===!0&&e.fillInput===!0&&Re(p>=0?ee.value(e.options[p]):V,!0))}}function Pt(n,d){const p=O=>ce(re.value(O),n);return e.options.find(p)||d.find(p)||n}function je(n){const d=re.value(n);return Te.value.find(p=>ce(p,d))!==void 0}function lt(n){e.useInput===!0&&T.value!==null&&(n===void 0||T.value===n.target&&n.target.value===E.value)&&T.value.select()}function ot(n){s.isKeyCode(n,27)===!0&&i.value===!0&&(s.stop(n),me(),we()),l("keyup",n)}function nt(n){const{value:d}=n.target;if(n.keyCode!==void 0){ot(n);return}if(n.target.value="",w!==null&&(clearTimeout(w),w=null),k!==null&&(clearTimeout(k),k=null),we(),typeof d=="string"&&d.length!==0){const p=d.toLocaleLowerCase(),O=j=>{const D=e.options.find(K=>String(j.value(K)).toLocaleLowerCase()===p);return D===void 0?!1:(m.value.indexOf(D)===-1?ve(D):me(),!0)},$=j=>{O(re)!==!0&&j!==!0&&O(ee)!==!0&&be(d,!0,()=>$(!0))};$()}else a.clearValue(n)}function ut(n){l("keypress",n)}function it(n){if(l("keydown",n),s.shouldIgnoreKey(n)===!0)return;const d=S.value.length!==0&&(e.newValueMode!==void 0||e.onNewValue!==void 0),p=n.shiftKey!==!0&&e.disableTabSelection!==!0&&e.multiple!==!0&&(b.value!==-1||d===!0);if(n.keyCode===27){s.prevent(n);return}if(n.keyCode===9&&p===!1){Se();return}if(n.target===void 0||n.target.id!==a.targetUid.value||a.editable.value!==!0)return;if(n.keyCode===40&&a.innerLoading.value!==!0&&i.value===!1){s.stopAndPrevent(n),ye();return}if(n.keyCode===8&&(e.useChips===!0||e.clearable===!0)&&e.hideSelected!==!0&&S.value.length===0){e.multiple===!0&&Array.isArray(e.modelValue)===!0?Ne(e.modelValue.length-1):e.multiple!==!0&&e.modelValue!==null&&l("update:modelValue",null);return}(n.keyCode===35||n.keyCode===36)&&(typeof S.value!="string"||S.value.length===0)&&(s.stopAndPrevent(n),b.value=-1,Fe(n.keyCode===36?1:-1,e.multiple)),(n.keyCode===33||n.keyCode===34)&&J.value!==void 0&&(s.stopAndPrevent(n),b.value=Math.max(-1,Math.min(q.value,b.value+(n.keyCode===33?-1:1)*J.value.view)),Fe(n.keyCode===33?1:-1,e.multiple)),(n.keyCode===38||n.keyCode===40)&&(s.stopAndPrevent(n),Fe(n.keyCode===38?-1:1,e.multiple));const O=q.value;if((B===void 0||M<Date.now())&&(B=""),O>0&&e.useInput!==!0&&n.key!==void 0&&n.key.length===1&&n.altKey===!1&&n.ctrlKey===!1&&n.metaKey===!1&&(n.keyCode!==32||B.length!==0)){i.value!==!0&&ye(n);const $=n.key.toLocaleLowerCase(),j=B.length===1&&B[0]===$;M=Date.now()+1500,j===!1&&(s.stopAndPrevent(n),B+=$);const D=new RegExp("^"+B.split("").map(Ce=>Fl.indexOf(Ce)!==-1?"\\"+Ce:Ce).join(".*"),"i");let K=b.value;if(j===!0||K<0||D.test(ee.value(e.options[K]))!==!0)do K=_t(K+1,-1,O-1);while(K!==b.value&&(he.value(e.options[K])===!0||D.test(ee.value(e.options[K]))!==!0));b.value!==K&&t.nextTick(()=>{ge(K),A(K),K>=0&&e.useInput===!0&&e.fillInput===!0&&Re(ee.value(e.options[K]),!0)});return}if(!(n.keyCode!==13&&(n.keyCode!==32||e.useInput===!0||B!=="")&&(n.keyCode!==9||p===!1))){if(n.keyCode!==9&&s.stopAndPrevent(n),b.value!==-1&&b.value<O){ve(e.options[b.value]);return}if(d===!0){const $=(j,D)=>{var Ce;if(D){if(Bt(D)!==!0)return}else D=e.newValueMode;if(Ve("",e.multiple!==!0,!0),j==null)return;(D==="toggle"?ve:tt)(j,D==="add-unique"),e.multiple!==!0&&((Ce=T.value)==null||Ce.focus(),me())};if(e.onNewValue!==void 0?l("newValue",S.value,$):$(S.value),e.multiple!==!0)return}i.value===!0?Se():a.innerLoading.value!==!0&&ye()}}function at(){return x===!0?te.value:L.value!==null&&L.value.contentEl!==null?L.value.contentEl:void 0}function $t(){return at()}function Dt(){return e.hideSelected===!0?[]:o["selected-item"]!==void 0?fe.value.map(n=>o["selected-item"](n)).slice():o.selected!==void 0?[].concat(o.selected()):e.useChips===!0?fe.value.map((n,d)=>t.h(gl,{key:"option-"+d,removable:a.editable.value===!0&&he.value(n.opt)!==!0,dense:!0,textColor:e.color,tabindex:ne.value,onRemove(){n.removeAtIndex(d)}},()=>t.h("span",{class:"ellipsis",[n.html===!0?"innerHTML":"textContent"]:ee.value(n.opt)}))):[t.h("span",{class:"ellipsis",[Ee.value===!0?"innerHTML":"textContent"]:G.value})]}function rt(){if(N.value===!0)return o["no-option"]!==void 0?o["no-option"]({inputValue:S.value}):void 0;const n=o.option!==void 0?o.option:p=>t.h(It,{key:p.index,...p.itemProps},()=>t.h($e,()=>t.h(Et,()=>t.h("span",{[p.html===!0?"innerHTML":"textContent"]:p.label}))));let d=ae("div",ze.value.map(n));return o["before-options"]!==void 0&&(d=o["before-options"]().concat(d)),s.hMergeSlot(o["after-options"],d)}function Ht(n,d){const p=d===!0?{...Ie.value,...a.splitAttrs.attributes.value}:void 0,O={ref:d===!0?T:void 0,key:"i_t",class:R.value,style:e.inputStyle,value:S.value!==void 0?S.value:"",type:"search",...p,id:d===!0?a.targetUid.value:void 0,maxlength:e.maxlength,autocomplete:e.autocomplete,"data-autofocus":n===!0||e.autofocus===!0||void 0,disabled:e.disable===!0,readonly:e.readonly===!0,...Mt.value};return n!==!0&&x===!0&&(Array.isArray(O.class)===!0?O.class=[...O.class,"no-pointer-events"]:O.class+=" no-pointer-events"),t.h("input",O)}function st(n){w!==null&&(clearTimeout(w),w=null),k!==null&&(clearTimeout(k),k=null),!(n&&n.target&&n.target.qComposing===!0)&&(Re(n.target.value||""),h=!0,V=S.value,a.focused.value!==!0&&(x!==!0||_.value===!0)&&a.focus(),e.onFilter!==void 0&&(w=setTimeout(()=>{w=null,be(S.value)},e.inputDebounce)))}function Re(n,d){S.value!==n&&(S.value=n,d===!0||e.inputDebounce===0||e.inputDebounce==="0"?l("inputValue",n):k=setTimeout(()=>{k=null,l("inputValue",n)},e.inputDebounce))}function Ve(n,d,p){h=p!==!0,e.useInput===!0&&(Re(n,!0),(d===!0||p!==!0)&&(V=n),d!==!0&&be(n))}function be(n,d,p){if(e.onFilter===void 0||d!==!0&&a.focused.value!==!0)return;a.innerLoading.value===!0?l("filterAbort"):(a.innerLoading.value=!0,f.value=!0),n!==""&&e.multiple!==!0&&m.value.length!==0&&h!==!0&&n===ee.value(m.value[0])&&(n="");const O=setTimeout(()=>{i.value===!0&&(i.value=!1)},10);v!==null&&clearTimeout(v),v=O,l("filter",n,($,j)=>{(d===!0||a.focused.value===!0)&&v===O&&(clearTimeout(v),typeof $=="function"&&$(),f.value=!1,t.nextTick(()=>{a.innerLoading.value=!1,a.editable.value===!0&&(d===!0?i.value===!0&&me():i.value===!0?Ke(!0):i.value=!0),typeof j=="function"&&t.nextTick(()=>{j(u)}),typeof p=="function"&&t.nextTick(()=>{p(u)})}))},()=>{a.focused.value===!0&&v===O&&(clearTimeout(v),a.innerLoading.value=!1,f.value=!1),i.value===!0&&(i.value=!1)})}function Nt(){return t.h(Q.QMenu,{ref:L,class:I.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:y.value,noParentEvent:!0,noRefocus:!0,noFocus:!0,noRouteDismiss:e.popupNoRouteDismiss,square:He.value,transitionShow:e.transitionShow,transitionHide:e.transitionHide,transitionDuration:e.transitionDuration,separateClosePopup:!0,...de.value,onScrollPassive:g,onBeforeShow:dt,onBeforeHide:jt,onShow:Kt},rt)}function jt(n){ft(n),Se()}function Kt(){Z()}function Ut(n){var d;s.stop(n),(d=T.value)==null||d.focus(),_.value=!0,window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,0)}function Qt(n){s.stop(n),t.nextTick(()=>{_.value=!1})}function Wt(){const n=[t.h(pl,{class:`col-auto ${a.fieldClass.value}`,...z.value,for:a.targetUid.value,dark:y.value,square:!0,loading:f.value,itemAligned:!1,filled:!0,stackLabel:S.value.length!==0,...a.splitAttrs.listeners.value,onFocus:Ut,onBlur:Qt},{...o,rawControl:()=>a.getControl(!0),before:void 0,after:void 0})];return i.value===!0&&n.push(t.h("div",{ref:te,class:I.value+" scroll",style:e.popupContentStyle,...de.value,onClick:s.prevent,onScrollPassive:g},rt())),t.h(ql,{ref:P,modelValue:r.value,position:e.useInput===!0?"top":void 0,transitionShow:H,transitionHide:e.transitionHide,transitionDuration:e.transitionDuration,noRouteDismiss:e.popupNoRouteDismiss,onBeforeShow:dt,onBeforeHide:Xt,onHide:Yt,onShow:Zt},()=>t.h("div",{class:"q-select__dialog"+(y.value===!0?" q-select__dialog--dark q-dark":"")+(_.value===!0?" q-select__dialog--focused":"")},n))}function Xt(n){ft(n),P.value!==null&&P.value.__updateRefocusTarget(a.rootRef.value.querySelector(".q-field__native > [tabindex]:last-child")),a.focused.value=!1}function Yt(n){me(),a.focused.value===!1&&l("blur",n),we()}function Zt(){const n=document.activeElement;(n===null||n.id!==a.targetUid.value)&&T.value!==null&&T.value!==n&&T.value.focus(),Z()}function Se(){r.value!==!0&&(b.value=-1,i.value===!0&&(i.value=!1),a.focused.value===!1&&(v!==null&&(clearTimeout(v),v=null),a.innerLoading.value===!0&&(l("filterAbort"),a.innerLoading.value=!1,f.value=!1)))}function ye(n){a.editable.value===!0&&(x===!0?(a.onControlFocusin(n),r.value=!0,t.nextTick(()=>{a.focus()})):a.focus(),e.onFilter!==void 0?be(S.value):(N.value!==!0||o["no-option"]!==void 0)&&(i.value=!0))}function me(){r.value=!1,Se()}function we(){e.useInput===!0&&Ve(e.multiple!==!0&&e.fillInput===!0&&m.value.length!==0&&ee.value(m.value[0])||"",!0,!0)}function Ke(n){let d=-1;if(n===!0){if(m.value.length!==0){const p=re.value(m.value[0]);d=e.options.findIndex(O=>ce(re.value(O),p))}U(d)}ge(d)}function Jt(n,d){i.value===!0&&a.innerLoading.value===!1&&(U(-1,!0),t.nextTick(()=>{i.value===!0&&a.innerLoading.value===!1&&(n>d?U():Ke(!0))}))}function ct(){r.value===!1&&L.value!==null&&L.value.updatePosition()}function dt(n){n!==void 0&&s.stop(n),l("popupShow",n),a.hasPopupOpen=!0,a.onControlFocusin(n)}function ft(n){n!==void 0&&s.stop(n),l("popupHide",n),a.hasPopupOpen=!1,a.onControlFocusout(n)}function vt(){x=c.platform.is.mobile!==!0&&e.behavior!=="dialog"?!1:e.behavior!=="menu"&&(e.useInput===!0?o["no-option"]!==void 0||e.onFilter!==void 0||N.value===!1:!0),H=c.platform.is.ios===!0&&x===!0&&e.useInput===!0?"fade":e.transitionShow}return t.onBeforeUpdate(vt),t.onUpdated(ct),vt(),t.onBeforeUnmount(()=>{w!==null&&clearTimeout(w),k!==null&&clearTimeout(k)}),Object.assign(u,{showPopup:ye,hidePopup:me,removeAtIndex:Ne,add:tt,toggleOption:ve,getOptionIndex:()=>b.value,setOptionIndex:ge,moveOptionSelection:Fe,filter:be,updateMenuPosition:ct,updateInputValue:Ve,isOptionSelected:je,getEmittingOptionValue:et,isOptionDisabled:(...n)=>he.value.apply(null,n)===!0,getOptionValue:(...n)=>re.value.apply(null,n),getOptionLabel:(...n)=>ee.value.apply(null,n)}),Object.assign(a,{innerValue:m,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:Y,targetRef:T,hasValue:F,showPopup:ye,floatingLabel:t.computed(()=>e.hideSelected!==!0&&F.value===!0||typeof S.value=="number"||S.value.length!==0||Je(e.displayValue)),getControlChild:()=>{if(a.editable.value!==!1&&(r.value===!0||N.value!==!0||o["no-option"]!==void 0))return x===!0?Wt():Nt();a.hasPopupOpen===!0&&(a.hasPopupOpen=!1)},controlEvents:{onFocusin(n){a.onControlFocusin(n)},onFocusout(n){a.onControlFocusout(n,()=>{we(),Se()})},onClick(n){var d;if(s.prevent(n),x!==!0&&i.value===!0){Se(),(d=T.value)==null||d.focus();return}ye(n)}},getControl:n=>{const d=Dt(),p=n===!0||r.value!==!0||x!==!0;if(e.useInput===!0)d.push(Ht(n,p));else if(a.editable.value===!0){const $=p===!0?Ie.value:void 0;d.push(t.h("input",{ref:p===!0?T:void 0,key:"d_t",class:"q-select__focus-target",id:p===!0?a.targetUid.value:void 0,value:G.value,readonly:!0,"data-autofocus":n===!0||e.autofocus===!0||void 0,...$,onKeydown:it,onKeyup:ot,onKeypress:ut})),p===!0&&typeof e.autocomplete=="string"&&e.autocomplete.length!==0&&d.push(t.h("input",{class:"q-select__autocomplete-input",autocomplete:e.autocomplete,tabindex:-1,onKeyup:nt}))}if(W.value!==void 0&&e.disable!==!0&&Te.value.length!==0){const $=Te.value.map(j=>t.h("option",{value:j,selected:!0}));d.push(t.h("select",{class:"hidden",name:W.value,multiple:e.multiple},$))}const O=e.useInput===!0||p!==!0?void 0:a.splitAttrs.attributes.value;return t.h("div",{class:"q-field__native row items-center",...O,...a.splitAttrs.listeners.value},d)},getInnerAppend:()=>e.loading!==!0&&f.value!==!0&&e.hideDropdownIcon!==!0?[t.h(s.QIcon,{class:"q-select__dropdown-icon"+(i.value===!0?" rotate-180":""),name:qe.value})]:null}),Rt(a)}}),Ml={class:"app-select__amount"},Ll=t.defineComponent({__name:"AppSelect",props:{modelValue:{},size:{default:s.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]},menuClass:{}},emits:["update:modelValue","popupShow","popupHide"],setup(e,{emit:o}){const l=e,u=o,c=t.ref(!1),i=t.ref(""),r=t.computed({get(){if(l.modelValue){if(l.multiple&&Array.isArray(l.modelValue))return l.options.filter(h=>l.modelValue.includes(h.value));if(!Array.isArray(l.modelValue))return l.options.find(h=>h.value===l.modelValue)}},set(h){if(!h){u("update:modelValue",void 0);return}if(l.multiple&&Array.isArray(h)){const v=h.map(V=>V.value);u("update:modelValue",v)}else Array.isArray(h)||u("update:modelValue",h.value)}}),b=t.computed(()=>{var h;if(Array.isArray(r.value)){if(l.multiple&&r.value.length==0)return l.placeholder}else return((h=r.value)==null?void 0:h.label)||l.placeholder||"";return""}),S=t.computed(()=>!(!l.clearable||!l.modelValue||l.modelValue&&Array.isArray(l.modelValue)&&!l.modelValue.length)),_=t.computed(()=>i.value?l.options.filter(h=>h.label.toLowerCase().includes(i.value.toLowerCase())):l.options),f=t.computed(()=>{if(l.rules)return l.required?[...l.rules,mt]:l.rules;if(l.required)return[mt]}),w=()=>{c.value=!0,u("popupShow")},k=()=>{c.value=!1,u("popupHide")},C=()=>{r.value=void 0},x=(h,v)=>{v(()=>{i.value=h})};return(h,v)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["app-select",[{"app-select_opened":c.value},`app-select_${h.size}`]])},[h.label?(t.openBlock(),t.createElementBlock("label",{key:0,class:t.normalizeClass(["app-select__label",{"app-select__label_bold":h.required}])},t.toDisplayString(h.required?`${h.label} *`:h.label),3)):t.createCommentVNode("",!0),t.createVNode(t.unref(Ol),{standout:"","hide-bottom-space":"","hide-dropdown-icon":"","no-error-icon":"",behavior:"menu","popup-no-route-dismiss":"","popup-content-class":`app-select-menu app-select-menu_${h.size} ${h.menuClass}`,placeholder:h.filtering&&"Почніть вводити","input-debounce":"50",modelValue:r.value,"onUpdate:modelValue":v[0]||(v[0]=V=>r.value=V),options:_.value,multiple:h.multiple,"use-input":h.filtering&&(Array.isArray(r.value)||!r.value),rules:f.value,"lazy-rules":h.lazyRules,autofocus:h.autofocus,disable:h.disabled,loading:h.loading,onFilter:x,onPopupShow:w,onPopupHide:k},{append:t.withCtx(()=>[S.value?(t.openBlock(),t.createElementBlock("i",{key:0,class:"icon-kl icon-kl-circle-close app-select__clear",onClick:t.withModifiers(C,["stop","prevent"])})):t.createCommentVNode("",!0),v[1]||(v[1]=t.createElementVNode("i",{class:"icon-kl icon-kl-arrow-down app-select__drop-icon"},null,-1))]),selected:t.withCtx(()=>{var V,H;return[Array.isArray(r.value)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[!h.filtering||r.value.length?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(["app-select__selected",{"app-select__placeholder":!((V=r.value)!=null&&V.length)&&h.placeholder}])},[(H=r.value)!=null&&H.length?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[v[2]||(v[2]=t.createTextVNode(" Вибрано ",-1)),t.createElementVNode("span",Ml,t.toDisplayString(r.value.length),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(l.placeholder),1)],64))],2)):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[!h.filtering||r.value?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(["app-select__selected",{"app-select__placeholder":!r.value&&h.placeholder}])},t.toDisplayString(b.value),3)):t.createCommentVNode("",!0)],64))]}),option:t.withCtx(V=>[t.createVNode(It,t.mergeProps({class:["app-select__option",{"app-select__option_selected":V.selected}]},V.itemProps),{default:t.withCtx(()=>[l.multiple?(t.openBlock(),t.createBlock($e,{key:0,class:"option-multiple",avatar:""},{default:t.withCtx(()=>[t.createVNode(al,{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($e,{key:1,class:"option-done",avatar:""},{default:t.withCtx(()=>[...v[3]||(v[3]=[t.createElementVNode("i",{class:"icon-kl icon-kl-check option-done__icon"},null,-1)])]),_:1})):t.createCommentVNode("",!0),t.createVNode($e,null,{default:t.withCtx(()=>[t.createVNode(Et,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))}}),Pl=s._export_sfc(Ll,[["__scopeId","data-v-9e880834"]]);exports.default=Pl;