@validol4ik/uikit 0.10.1 → 0.10.2

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 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),d=require("./focusout-DzWGke-4.cjs"),l=require("./index-D2z9gMNY.cjs");function u(e){const o=document.createElement("textarea");o.value=e,o.contentEditable="true",o.style.position="fixed";const n=()=>{};d.addFocusout(n),document.body.appendChild(o),o.focus(),o.select();const r=document.execCommand("copy");return o.remove(),d.removeFocusout(n),r}function s(e){return navigator.clipboard!==void 0?navigator.clipboard.writeText(e):new Promise((o,n)=>{const r=u(e);r?o(!0):n(r)})}function p(){const e=t.ref(!d.isRuntimeSsrPreHydration.value);return e.value===!1&&t.onMounted(()=>{e.value=!0}),{isHydrated:e}}const f=l.createComponent({name:"QNoSsr",props:{tag:{type:String,default:"div"},placeholder:String},setup(e,{slots:o}){const{isHydrated:n}=p();return()=>{if(n.value===!0){const a=l.hSlot(o.default);return a===void 0?a:a.length>1?t.h(e.tag,{},a):a[0]}const r={class:"q-no-ssr-placeholder"},c=l.hSlot(o.placeholder);if(c!==void 0)return c.length>1?t.h(e.tag,r,c):c[0];if(e.placeholder!==void 0)return t.h(e.tag,r,e.placeholder)}}}),i={COPY:"copy_o",COPIED:"copied_o"},h=t.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 o=e,n=t.ref(i.COPY),r=()=>{n.value=i.COPIED,setTimeout(()=>{n.value=i.COPY},2e3)},c=()=>{s(o.text).then(r).catch(a=>{console.log(a)})};return(a,m)=>(t.openBlock(),t.createBlock(t.unref(f),null,{default:t.withCtx(()=>[t.createVNode(l.AppButton,t.mergeProps(o,{"icon-middle":n.value,onClick:t.withModifiers(c,["prevent"])}),{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default")]),_:3},16,["icon-middle"])]),_:3}))}});exports.default=h;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),d=require("./focusout-DzWGke-4.cjs"),l=require("./index-BB31xQaa.cjs");function u(e){const o=document.createElement("textarea");o.value=e,o.contentEditable="true",o.style.position="fixed";const n=()=>{};d.addFocusout(n),document.body.appendChild(o),o.focus(),o.select();const r=document.execCommand("copy");return o.remove(),d.removeFocusout(n),r}function s(e){return navigator.clipboard!==void 0?navigator.clipboard.writeText(e):new Promise((o,n)=>{const r=u(e);r?o(!0):n(r)})}function p(){const e=t.ref(!d.isRuntimeSsrPreHydration.value);return e.value===!1&&t.onMounted(()=>{e.value=!0}),{isHydrated:e}}const f=l.createComponent({name:"QNoSsr",props:{tag:{type:String,default:"div"},placeholder:String},setup(e,{slots:o}){const{isHydrated:n}=p();return()=>{if(n.value===!0){const a=l.hSlot(o.default);return a===void 0?a:a.length>1?t.h(e.tag,{},a):a[0]}const r={class:"q-no-ssr-placeholder"},c=l.hSlot(o.placeholder);if(c!==void 0)return c.length>1?t.h(e.tag,r,c):c[0];if(e.placeholder!==void 0)return t.h(e.tag,r,e.placeholder)}}}),i={COPY:"copy_o",COPIED:"copied_o"},h=t.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 o=e,n=t.ref(i.COPY),r=()=>{n.value=i.COPIED,setTimeout(()=>{n.value=i.COPY},2e3)},c=()=>{s(o.text).then(r).catch(a=>{console.log(a)})};return(a,m)=>(t.openBlock(),t.createBlock(t.unref(f),null,{default:t.withCtx(()=>[t.createVNode(l.AppButton,t.mergeProps(o,{"icon-middle":n.value,onClick:t.withModifiers(c,["prevent"])}),{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default")]),_:3},16,["icon-middle"])]),_:3}))}});exports.default=h;
@@ -1,6 +1,6 @@
1
1
  import { ref as s, onMounted as u, h as l, defineComponent as p, openBlock as f, createBlock as m, unref as h, withCtx as d, createVNode as y, mergeProps as v, withModifiers as C, renderSlot as g } from "vue";
2
2
  import { r as S, a as b, i as B } from "./focusout-DjvPXP_b.js";
3
- import { c as O, h as i, C as _, A as P } from "./index-W3hJ-aLX.js";
3
+ import { c as O, h as i, C as _, A as P } from "./index-DFNWQp-Z.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,9 +1,9 @@
1
1
  import { getCurrentInstance as ve, ref as F, onBeforeUpdate as Ot, inject as il, watch as Z, onMounted as It, onBeforeUnmount as Ee, computed as c, nextTick as ne, onDeactivated as Mt, onActivated as Et, h as p, Transition as al, onBeforeMount as rl, onUpdated as sl, defineComponent as cl, openBlock as oe, createElementBlock as ue, normalizeClass as Ne, toDisplayString as Ke, createCommentVNode as Qe, createVNode as Ct, unref as dl, withCtx as tt, mergeProps as fl, Fragment as Ue, createTextVNode as wt, createElementVNode as Vt, withModifiers as vl } from "vue";
2
- import { u as Tt, s as ce, p as de, a as Lt, Q as ze, b as ml, h as Be, c as Te, d as gl, e as pl, f as hl, g as Sl, R as bl, n as yl, i as Cl, j as wl, k as Vl, l as Ae, m as ql, o as kl, q as _l, S as xl, P as Al, _ as Bl } from "./index-W3hJ-aLX.js";
3
- import { u as zl, Q as Rl } from "./QMenu-ByZ-VL_d.js";
2
+ import { u as Tt, s as ce, p as de, a as Lt, Q as ze, b as ml, h as Be, c as Te, d as gl, e as pl, f as hl, g as Sl, R as bl, n as yl, i as Cl, j as wl, k as Vl, l as Ae, m as ql, o as kl, q as _l, S as xl, P as Al, _ as Bl } from "./index-DFNWQp-Z.js";
3
+ import { u as zl, Q as Rl } from "./QMenu-k3AStoLY.js";
4
4
  import { b as Fl, c as Ol } from "./focusout-DjvPXP_b.js";
5
- import { a as Il, r as Ml } from "./escape-key-BNqVqiWj.js";
6
- import { Q as El } from "./QDialog-BajIjVX3.js";
5
+ import { a as Il, r as Ml } from "./escape-key-BlsDwJUQ.js";
6
+ import { Q as El } from "./QDialog-Cy2w4ntF.js";
7
7
  const qt = (e) => e ? !0 : "Обовʼязкове поле", kt = /^on[A-Z]/;
8
8
  function Tl() {
9
9
  const { attrs: e, vnode: l } = ve(), o = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),p=require("./index-D2z9gMNY.cjs"),vt=require("./QMenu-2jfaPSJc.cjs"),mt=require("./focusout-DzWGke-4.cjs"),ot=require("./escape-key-DG0KKsWF.cjs"),Et=require("./QDialog-DUkV6dWi.cjs"),ut=e=>e?!0:"Обовʼязкове поле",nt=/^on[A-Z]/;function Tt(){const{attrs:e,vnode:o}=t.getCurrentInstance(),u={listeners:t.ref({}),attributes:t.ref({})};function n(){const g={},a={};for(const d in e)d!=="class"&&d!=="style"&&nt.test(d)===!1&&(g[d]=e[d]);for(const d in o.props)nt.test(d)===!0&&(a[d]=o.props[d]);u.attributes.value=g,u.listeners.value=a}return t.onBeforeUpdate(n),n(),u}const Dt="_q_fo_";function Pt({validate:e,resetValidation:o,requiresQForm:u}){const n=t.inject(Dt,!1);if(n!==!1){const{props:g,proxy:a}=t.getCurrentInstance();Object.assign(a,{validate:e,resetValidation:o}),t.watch(()=>g.disable,d=>{d===!0?(typeof o=="function"&&o(),n.unbindComponent(a)):n.bindComponent(a)}),t.onMounted(()=>{g.disable!==!0&&n.bindComponent(a)}),t.onBeforeUnmount(()=>{g.disable!==!0&&n.unbindComponent(a)})}else u===!0&&console.error("Parent QForm not found on useFormChild()!")}const it=/^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/,at=/^#[0-9a-fA-F]{4}([0-9a-fA-F]{4})?$/,rt=/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,Ie=/^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])\)$/,Fe=/^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)\)$/,De={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=>it.test(e),hexaColor:e=>at.test(e),hexOrHexaColor:e=>rt.test(e),rgbColor:e=>Ie.test(e),rgbaColor:e=>Fe.test(e),rgbOrRgbaColor:e=>Ie.test(e)||Fe.test(e),hexOrRgbColor:e=>it.test(e)||Ie.test(e),hexaOrRgbaColor:e=>at.test(e)||Fe.test(e),anyColor:e=>rt.test(e)||Ie.test(e)||Fe.test(e)};function pt(e,o=250,u){let n=null;function g(){const a=arguments,d=()=>{n=null,e.apply(this,a)};n!==null?clearTimeout(n):u===!0&&e.apply(this,a),n=setTimeout(d,o)}return g.cancel=()=>{n!==null&&clearTimeout(n)},g}const Lt=[!0,!1,"ondemand"],Ht={modelValue:{},error:{type:Boolean,default:null},errorMessage:String,noErrorIcon:Boolean,rules:Array,reactiveRules:Boolean,lazyRules:{type:[Boolean,String],default:!1,validator:e=>Lt.includes(e)}};function $t(e,o){const{props:u,proxy:n}=t.getCurrentInstance(),g=t.ref(!1),a=t.ref(null),d=t.ref(!1);Pt({validate:v,resetValidation:I});let S=0,b;const F=t.computed(()=>u.rules!==void 0&&u.rules!==null&&u.rules.length!==0),h=t.computed(()=>u.disable!==!0&&F.value===!0&&o.value===!1),y=t.computed(()=>u.error===!0||g.value===!0),x=t.computed(()=>typeof u.errorMessage=="string"&&u.errorMessage.length!==0?u.errorMessage:a.value);t.watch(()=>u.modelValue,()=>{d.value=!0,h.value===!0&&u.lazyRules===!1&&f()});function _(){u.lazyRules!=="ondemand"&&h.value===!0&&d.value===!0&&f()}t.watch(()=>u.reactiveRules,C=>{C===!0?b===void 0&&(b=t.watch(()=>u.rules,_,{immediate:!0,deep:!0})):b!==void 0&&(b(),b=void 0)},{immediate:!0}),t.watch(()=>u.lazyRules,_),t.watch(e,C=>{C===!0?d.value=!0:h.value===!0&&u.lazyRules!=="ondemand"&&f()});function I(){S++,o.value=!1,d.value=!1,g.value=!1,a.value=null,f.cancel()}function v(C=u.modelValue){if(u.disable===!0||F.value===!1)return!0;const N=++S,j=o.value!==!0?()=>{d.value=!0}:()=>{},R=(B,T)=>{B===!0&&j(),g.value=B,a.value=T||null,o.value=!1},Y=[];for(let B=0;B<u.rules.length;B++){const T=u.rules[B];let D;if(typeof T=="function"?D=T(C,De):typeof T=="string"&&De[T]!==void 0&&(D=De[T](C)),D===!1||typeof D=="string")return R(!0,D),!1;D!==!0&&D!==void 0&&Y.push(D)}return Y.length===0?(R(!1),!0):(o.value=!0,Promise.all(Y).then(B=>{if(B===void 0||Array.isArray(B)===!1||B.length===0)return N===S&&R(!1),!0;const T=B.find(D=>D===!1||typeof D=="string");return N===S&&R(T!==void 0,T),T===void 0},B=>(N===S&&(console.error(B),R(!0)),!1)))}const f=pt(v,0);return t.onBeforeUnmount(()=>{b==null||b(),f.cancel()}),Object.assign(n,{resetValidation:I,validate:v}),mt.injectProp(n,"hasError",()=>y.value),{isDirtyModel:d,hasRules:F,hasError:y,errorMessage:x,validate:v,resetValidation:I}}function He(e){return e!=null&&(""+e).length!==0}const Nt={...p.useDarkProps,...Ht,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},$e={...Nt,maxlength:[Number,String]},ht=["update:modelValue","clear","focus","blur"];function gt({requiredForAttr:e=!0,tagProp:o,changeEvent:u=!1}={}){const{props:n,proxy:g}=t.getCurrentInstance(),a=p.useDark(n,g.$q),d=vt.useId({required:e,getValue:()=>n.for});return{requiredForAttr:e,changeEvent:u,tag:o===!0?t.computed(()=>n.tag):{value:"label"},isDark:a,editable:t.computed(()=>n.disable!==!0&&n.readonly!==!0),innerLoading:t.ref(!1),focused:t.ref(!1),hasPopupOpen:!1,splitAttrs:Tt(),targetUid:d,rootRef:t.ref(null),targetRef:t.ref(null),controlRef:t.ref(null)}}function St(e){const{props:o,emit:u,slots:n,attrs:g,proxy:a}=t.getCurrentInstance(),{$q:d}=a;let S=null;e.hasValue===void 0&&(e.hasValue=t.computed(()=>He(o.modelValue))),e.emitValue===void 0&&(e.emitValue=m=>{u("update:modelValue",m)}),e.controlEvents===void 0&&(e.controlEvents={onFocusin:te,onFocusout:G}),Object.assign(e,{clearValue:le,onControlFocusin:te,onControlFocusout:G,focus:T}),e.computedCounter===void 0&&(e.computedCounter=t.computed(()=>{if(o.counter!==!1){const m=typeof o.modelValue=="string"||typeof o.modelValue=="number"?(""+o.modelValue).length:Array.isArray(o.modelValue)===!0?o.modelValue.length:0,V=o.maxlength!==void 0?o.maxlength:o.maxValues;return m+(V!==void 0?" / "+V:"")}}));const{isDirtyModel:b,hasRules:F,hasError:h,errorMessage:y,resetValidation:x}=$t(e.focused,e.innerLoading),_=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),I=t.computed(()=>o.bottomSlots===!0||o.hint!==void 0||F.value===!0||o.counter===!0||o.error!==null),v=t.computed(()=>o.filled===!0?"filled":o.outlined===!0?"outlined":o.borderless===!0?"borderless":o.standout?"standout":"standard"),f=t.computed(()=>`q-field row no-wrap items-start q-field--${v.value}`+(e.fieldClass!==void 0?` ${e.fieldClass.value}`:"")+(o.rounded===!0?" q-field--rounded":"")+(o.square===!0?" q-field--square":"")+(_.value===!0?" q-field--float":"")+(N.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":"")+(h.value===!0?" q-field--error":"")+(h.value===!0||e.focused.value===!0?" q-field--highlighted":"")+(o.hideBottomSpace!==!0&&I.value===!0?" q-field--with-bottom":"")+(o.disable===!0?" q-field--disabled":o.readonly===!0?" q-field--readonly":"")),C=t.computed(()=>"q-field__control relative-position row no-wrap"+(o.bgColor!==void 0?` bg-${o.bgColor}`:"")+(h.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}`:"")),N=t.computed(()=>o.labelSlot===!0||o.label!==void 0),j=t.computed(()=>"q-field__label no-pointer-events absolute ellipsis"+(o.labelColor!==void 0&&h.value!==!0?` text-${o.labelColor}`:"")),R=t.computed(()=>({id:e.targetUid.value,editable:e.editable.value,focused:e.focused.value,floatingLabel:_.value,modelValue:o.modelValue,emitValue:e.emitValue})),Y=t.computed(()=>{const m={};return e.targetUid.value&&(m.for=e.targetUid.value),o.disable===!0&&(m["aria-disabled"]="true"),m});function B(){var Q;const m=document.activeElement;let V=(Q=e.targetRef)==null?void 0:Q.value;V&&(m===null||m.id!==e.targetUid.value)&&(V.hasAttribute("tabindex")===!0||(V=V.querySelector("[tabindex]")),V!==m&&(V==null||V.focus({preventScroll:!0})))}function T(){ot.addFocusFn(B)}function D(){ot.removeFocusFn(B);const m=document.activeElement;m!==null&&e.rootRef.value.contains(m)&&m.blur()}function te(m){S!==null&&(clearTimeout(S),S=null),e.editable.value===!0&&e.focused.value===!1&&(e.focused.value=!0,u("focus",m))}function G(m,V){S!==null&&clearTimeout(S),S=setTimeout(()=>{S=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,u("blur",m)),V==null||V())})}function le(m){var V;p.stopAndPrevent(m),d.platform.is.mobile!==!0?(((V=e.targetRef)==null?void 0:V.value)||e.rootRef.value).focus():e.rootRef.value.contains(document.activeElement)===!0&&document.activeElement.blur(),o.type==="file"&&(e.inputRef.value.value=null),u("update:modelValue",null),e.changeEvent===!0&&u("change",null),u("clear",o.modelValue),t.nextTick(()=>{const Q=b.value;x(),b.value=Q})}function K(m){[13,32].includes(m.keyCode)&&le(m)}function ie(){const m=[];return n.prepend!==void 0&&m.push(t.h("div",{class:"q-field__prepend q-field__marginal row no-wrap items-center",key:"prepend",onClick:p.prevent},n.prepend())),m.push(t.h("div",{class:"q-field__control-container col relative-position row no-wrap q-anchor--skip"},de())),h.value===!0&&o.noErrorIcon===!1&&m.push(U("error",[t.h(p.QIcon,{name:d.iconSet.field.error,color:"negative"})])),o.loading===!0||e.innerLoading.value===!0?m.push(U("inner-loading-append",n.loading!==void 0?n.loading():[t.h(p.QSpinner,{color:o.color})])):o.clearable===!0&&e.hasValue.value===!0&&e.editable.value===!0&&m.push(U("inner-clearable-append",[t.h(p.QIcon,{class:"q-field__focusable-action",name:o.clearIcon||d.iconSet.field.clear,tabindex:0,role:"button","aria-hidden":"false","aria-label":d.lang.label.clear,onKeyup:K,onClick:le})])),n.append!==void 0&&m.push(t.h("div",{class:"q-field__append q-field__marginal row no-wrap items-center",key:"append",onClick:p.prevent},n.append())),e.getInnerAppend!==void 0&&m.push(U("inner-append",e.getInnerAppend())),e.getControlChild!==void 0&&m.push(e.getControlChild()),m}function de(){const m=[];return o.prefix!==void 0&&o.prefix!==null&&m.push(t.h("div",{class:"q-field__prefix no-pointer-events row items-center"},o.prefix)),e.getShadowControl!==void 0&&e.hasShadow.value===!0&&m.push(e.getShadowControl()),N.value===!0&&m.push(t.h("div",{class:j.value},p.hSlot(n.label,o.label))),e.getControl!==void 0?m.push(e.getControl()):n.rawControl!==void 0?m.push(n.rawControl()):n.control!==void 0&&m.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},n.control(R.value))),o.suffix!==void 0&&o.suffix!==null&&m.push(t.h("div",{class:"q-field__suffix no-pointer-events row items-center"},o.suffix)),m.concat(p.hSlot(n.default))}function oe(){let m,V;h.value===!0?y.value!==null?(m=[t.h("div",{role:"alert"},y.value)],V=`q--slot-error-${y.value}`):(m=p.hSlot(n.error),V="q--slot-error"):(o.hideHint!==!0||e.focused.value===!0)&&(o.hint!==void 0?(m=[t.h("div",o.hint)],V=`q--slot-hint-${o.hint}`):(m=p.hSlot(n.hint),V="q--slot-hint"));const Q=o.counter===!0||n.counter!==void 0;if(o.hideBottomSpace===!0&&Q===!1&&m===void 0)return;const i=t.h("div",{key:V,class:"q-field__messages col"},m);return t.h("div",{class:"q-field__bottom row items-start q-field__bottom--"+(o.hideBottomSpace!==!0?"animated":"stale"),onClick:p.prevent},[o.hideBottomSpace===!0?i:t.h(t.Transition,{name:"q-transition--field-message"},()=>i),Q===!0?t.h("div",{class:"q-field__counter"},n.counter!==void 0?n.counter():e.computedCounter.value):null])}function U(m,V){return V===null?null:t.h("div",{key:m,class:"q-field__append q-field__marginal row no-wrap items-center q-anchor--skip"},V)}let fe=!1;return t.onDeactivated(()=>{fe=!0}),t.onActivated(()=>{fe===!0&&o.autofocus===!0&&a.focus()}),o.autofocus===!0&&t.onMounted(()=>{a.focus()}),t.onBeforeUnmount(()=>{S!==null&&clearTimeout(S)}),Object.assign(a,{focus:T,blur:D}),function(){const V=e.getControl===void 0&&n.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:[f.value,g.class],style:g.style,...V},[n.before!==void 0?t.h("div",{class:"q-field__before q-field__marginal row no-wrap items-center",onClick:p.prevent},n.before()):null,t.h("div",{class:"q-field__inner relative-position col self-stretch"},[t.h("div",{ref:e.controlRef,class:C.value,tabindex:-1,...e.controlEvents},ie()),I.value===!0?oe():null]),n.after!==void 0?t.h("div",{class:"q-field__after q-field__marginal row no-wrap items-center",onClick:p.prevent},n.after()):null])}}const jt=p.createComponent({name:"QField",inheritAttrs:!1,props:{...$e,tag:{type:String,default:"label"}},emits:ht,setup(){return St(gt({tagProp:!0}))}}),Kt={xs:8,sm:10,md:14,lg:20,xl:24},Ut=p.createComponent({name:"QChip",props:{...p.useDarkProps,...p.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:u}){const{proxy:{$q:n}}=t.getCurrentInstance(),g=p.useDark(e,n),a=p.useSize(e,Kt),d=t.computed(()=>e.selected===!0||e.icon!==void 0),S=t.computed(()=>e.selected===!0?e.iconSelected||n.iconSet.chip.selected:e.icon),b=t.computed(()=>e.iconRemove||n.iconSet.chip.remove),F=t.computed(()=>e.disable===!1&&(e.clickable===!0||e.selected!==null)),h=t.computed(()=>{const f=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}`:"")+(f?` text-${f} 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":"")+(F.value===!0?" q-chip--clickable cursor-pointer non-selectable q-hoverable":"")+(e.square===!0?" q-chip--square":"")+(g.value===!0?" q-chip--dark q-dark":"")}),y=t.computed(()=>{const f=e.disable===!0?{tabindex:-1,"aria-disabled":"true"}:{tabindex:e.tabindex||0},C={...f,role:"button","aria-hidden":"false","aria-label":e.removeAriaLabel||n.lang.label.remove};return{chip:f,remove:C}});function x(f){f.keyCode===13&&_(f)}function _(f){e.disable||(u("update:selected",!e.selected),u("click",f))}function I(f){(f.keyCode===void 0||f.keyCode===13)&&(p.stopAndPrevent(f),e.disable===!1&&(u("update:modelValue",!1),u("remove")))}function v(){const f=[];F.value===!0&&f.push(t.h("div",{class:"q-focus-helper"})),d.value===!0&&f.push(t.h(p.QIcon,{class:"q-chip__icon q-chip__icon--left",name:S.value}));const C=e.label!==void 0?[t.h("div",{class:"ellipsis"},[e.label])]:void 0;return f.push(t.h("div",{class:"q-chip__content col row no-wrap items-center q-anchor--skip"},p.hMergeSlotSafely(o.default,C))),e.iconRight&&f.push(t.h(p.QIcon,{class:"q-chip__icon q-chip__icon--right",name:e.iconRight})),e.removable===!0&&f.push(t.h(p.QIcon,{class:"q-chip__icon q-chip__icon--remove cursor-pointer",name:b.value,...y.value.remove,onClick:I,onKeyup:I})),f}return()=>{if(e.modelValue===!1)return;const f={class:h.value,style:a.value};return F.value===!0&&Object.assign(f,y.value.chip,{onClick:_,onKeyup:x}),p.hDir("div",f,v(),"ripple",e.ripple!==!1&&e.disable!==!0,()=>[[p.Ripple,e.ripple]])}}}),Qt=p.createComponent({name:"QItemSection",props:{avatar:Boolean,thumbnail:Boolean,side:Boolean,top:Boolean,noWrap:Boolean},setup(e,{slots:o}){const u=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:u.value},p.hSlot(o.default))}}),Wt=p.createComponent({name:"QItemLabel",props:{overline:Boolean,caption:Boolean,header:Boolean,lines:[Number,String]},setup(e,{slots:o}){const u=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":"")+(u.value===1?" ellipsis":"")),g=t.computed(()=>e.lines!==void 0&&u.value>1?{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":u.value}:null);return()=>t.h("div",{style:g.value,class:n.value},p.hSlot(o.default))}});let Re=!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,Re=e.scrollLeft>=0,e.remove()}const J=1e3,Xt=["start","center","end","start-force","center-force","end-force"],bt=Array.prototype.filter,Yt=window.getComputedStyle(document.body).overflowAnchor===void 0?p.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 u=e.children||[];bt.call(u,g=>g.dataset&&g.dataset.qVsAnchor!==void 0).forEach(g=>{delete g.dataset.qVsAnchor});const n=u[o];n!=null&&n.dataset&&(n.dataset.qVsAnchor="")}))};function ye(e,o){return e+o}function Pe(e,o,u,n,g,a,d,S){const b=e===window?document.scrollingElement||document.documentElement:e,F=g===!0?"offsetWidth":"offsetHeight",h={scrollStart:0,scrollViewSize:-d-S,scrollMaxSize:0,offsetStart:-d,offsetEnd:-S};if(g===!0?(e===window?(h.scrollStart=window.pageXOffset||window.scrollX||document.body.scrollLeft||0,h.scrollViewSize+=document.documentElement.clientWidth):(h.scrollStart=b.scrollLeft,h.scrollViewSize+=b.clientWidth),h.scrollMaxSize=b.scrollWidth,a===!0&&(h.scrollStart=(Re===!0?h.scrollMaxSize-h.scrollViewSize:0)-h.scrollStart)):(e===window?(h.scrollStart=window.pageYOffset||window.scrollY||document.body.scrollTop||0,h.scrollViewSize+=document.documentElement.clientHeight):(h.scrollStart=b.scrollTop,h.scrollViewSize+=b.clientHeight),h.scrollMaxSize=b.scrollHeight),u!==null)for(let y=u.previousElementSibling;y!==null;y=y.previousElementSibling)y.classList.contains("q-virtual-scroll--skip")===!1&&(h.offsetStart+=y[F]);if(n!==null)for(let y=n.nextElementSibling;y!==null;y=y.nextElementSibling)y.classList.contains("q-virtual-scroll--skip")===!1&&(h.offsetEnd+=y[F]);if(o!==e){const y=b.getBoundingClientRect(),x=o.getBoundingClientRect();g===!0?(h.offsetStart+=x.left-y.left,h.offsetEnd-=x.width):(h.offsetStart+=x.top-y.top,h.offsetEnd-=x.height),e!==window&&(h.offsetStart+=h.scrollStart),h.offsetEnd+=h.scrollMaxSize-h.offsetStart}return h}function st(e,o,u,n){o==="end"&&(o=(e===window?document.body:e)[u===!0?"scrollWidth":"scrollHeight"]),e===window?u===!0?(n===!0&&(o=(Re===!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):u===!0?(n===!0&&(o=(Re===!0?e.scrollWidth-e.offsetWidth:0)-o),e.scrollLeft=o):e.scrollTop=o}function ke(e,o,u,n){if(u>=n)return 0;const g=o.length,a=Math.floor(u/J),d=Math.floor((n-1)/J)+1;let S=e.slice(a,d).reduce(ye,0);return u%J!==0&&(S-=o.slice(a*J,u).reduce(ye,0)),n%J!==0&&n!==g&&(S-=o.slice(n,d*J).reduce(ye,0)),S}const Zt={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]},ct={virtualScrollHorizontal:Boolean,onVirtualScroll:Function,...Zt};function Jt({virtualScrollLength:e,getVirtualScrollTarget:o,getVirtualScrollEl:u,virtualScrollItemSizeComputed:n}){const g=t.getCurrentInstance(),{props:a,emit:d,proxy:S}=g,{$q:b}=S;let F,h,y,x=[],_;const I=t.ref(0),v=t.ref(0),f=t.ref({}),C=t.ref(null),N=t.ref(null),j=t.ref(null),R=t.ref({from:0,to:0}),Y=t.computed(()=>a.tableColspan!==void 0?a.tableColspan:100);n===void 0&&(n=t.computed(()=>a.virtualScrollItemSize));const B=t.computed(()=>n.value+";"+a.virtualScrollHorizontal),T=t.computed(()=>B.value+";"+a.virtualScrollSliceRatioBefore+";"+a.virtualScrollSliceRatioAfter);t.watch(T,()=>{U()}),t.watch(B,D);function D(){oe(h,!0)}function te(i){oe(i===void 0?h:i)}function G(i,c){const k=o();if(k==null||k.nodeType===8)return;const E=Pe(k,u(),C.value,N.value,a.virtualScrollHorizontal,b.lang.rtl,a.virtualScrollStickySizeStart,a.virtualScrollStickySizeEnd);y!==E.scrollViewSize&&U(E.scrollViewSize),K(k,E,Math.min(e.value-1,Math.max(0,parseInt(i,10)||0)),0,Xt.indexOf(c)!==-1?c:h!==-1&&i>h?"end":"start")}function le(){const i=o();if(i==null||i.nodeType===8)return;const c=Pe(i,u(),C.value,N.value,a.virtualScrollHorizontal,b.lang.rtl,a.virtualScrollStickySizeStart,a.virtualScrollStickySizeEnd),k=e.value-1,E=c.scrollMaxSize-c.offsetStart-c.offsetEnd-v.value;if(F===c.scrollStart)return;if(c.scrollMaxSize<=0){K(i,c,0,0);return}y!==c.scrollViewSize&&U(c.scrollViewSize),ie(R.value.from);const H=Math.floor(c.scrollMaxSize-Math.max(c.scrollViewSize,c.offsetEnd)-Math.min(_[k],c.scrollViewSize/2));if(H>0&&Math.ceil(c.scrollStart)>=H){K(i,c,k,c.scrollMaxSize-c.offsetEnd-x.reduce(ye,0));return}let z=0,A=c.scrollStart-c.offsetStart,$=A;if(A<=E&&A+c.scrollViewSize>=I.value)A-=I.value,z=R.value.from,$=A;else for(let q=0;A>=x[q]&&z<k;q++)A-=x[q],z+=J;for(;A>0&&z<k;)A-=_[z],A>-c.scrollViewSize?(z++,$=A):$=_[z]+A;K(i,c,z,$)}function K(i,c,k,E,H){const z=typeof H=="string"&&H.indexOf("-force")!==-1,A=z===!0?H.replace("-force",""):H,$=A!==void 0?A:"start";let q=Math.max(0,k-f.value[$]),W=q+f.value.total;W>e.value&&(W=e.value,q=Math.max(0,W-f.value.total)),F=c.scrollStart;const ue=q!==R.value.from||W!==R.value.to;if(ue===!1&&A===void 0){m(k);return}const{activeElement:qe}=document,Z=j.value;ue===!0&&Z!==null&&Z!==qe&&Z.contains(qe)===!0&&(Z.addEventListener("focusout",de),setTimeout(()=>{Z==null||Z.removeEventListener("focusout",de)})),Yt(Z,k-q);const xe=A!==void 0?_.slice(q,k).reduce(ye,0):0;if(ue===!0){const ae=W>=R.value.from&&q<=R.value.to?R.value.to:W;R.value={from:q,to:ae},I.value=ke(x,_,0,q),v.value=ke(x,_,W,e.value),requestAnimationFrame(()=>{R.value.to!==W&&F===c.scrollStart&&(R.value={from:R.value.from,to:W},v.value=ke(x,_,W,e.value))})}requestAnimationFrame(()=>{if(F!==c.scrollStart)return;ue===!0&&ie(q);const ae=_.slice(q,k).reduce(ye,0),re=ae+c.offsetStart+I.value,_e=re+_[k];let Ce=re+E;if(A!==void 0){const Oe=ae-xe,we=c.scrollStart+Oe;Ce=z!==!0&&we<re&&_e<we+c.scrollViewSize?we:A==="end"?_e-c.scrollViewSize:re-(A==="start"?0:Math.round((c.scrollViewSize-_[k])/2))}F=Ce,st(i,Ce,a.virtualScrollHorizontal,b.lang.rtl),m(k)})}function ie(i){const c=j.value;if(c){const k=bt.call(c.children,q=>q.classList&&q.classList.contains("q-virtual-scroll--skip")===!1),E=k.length,H=a.virtualScrollHorizontal===!0?q=>q.getBoundingClientRect().width:q=>q.offsetHeight;let z=i,A,$;for(let q=0;q<E;){for(A=H(k[q]),q++;q<E&&k[q].classList.contains("q-virtual-scroll--with-prev")===!0;)A+=H(k[q]),q++;$=A-_[z],$!==0&&(_[z]+=$,x[Math.floor(z/J)]+=$),z++}}}function de(){var i;(i=j.value)==null||i.focus()}function oe(i,c){const k=1*n.value;(c===!0||Array.isArray(_)===!1)&&(_=[]);const E=_.length;_.length=e.value;for(let z=e.value-1;z>=E;z--)_[z]=k;const H=Math.floor((e.value-1)/J);x=[];for(let z=0;z<=H;z++){let A=0;const $=Math.min((z+1)*J,e.value);for(let q=z*J;q<$;q++)A+=_[q];x.push(A)}h=-1,F=void 0,I.value=ke(x,_,0,R.value.from),v.value=ke(x,_,R.value.to,e.value),i>=0?(ie(R.value.from),t.nextTick(()=>{G(i)})):V()}function U(i){if(i===void 0&&typeof window<"u"){const A=o();A!=null&&A.nodeType!==8&&(i=Pe(A,u(),C.value,N.value,a.virtualScrollHorizontal,b.lang.rtl,a.virtualScrollStickySizeStart,a.virtualScrollStickySizeEnd).scrollViewSize)}y=i;const c=parseFloat(a.virtualScrollSliceRatioBefore)||0,k=parseFloat(a.virtualScrollSliceRatioAfter)||0,E=1+c+k,H=i===void 0||i<=0?1:Math.ceil(i/n.value),z=Math.max(1,H,Math.ceil((a.virtualScrollSliceSize>0?a.virtualScrollSliceSize:10)/E));f.value={total:Math.ceil(z*E),start:Math.ceil(z*c),center:Math.ceil(z*(.5+c)),end:Math.ceil(z*(1+c)),view:H}}function fe(i,c){const k=a.virtualScrollHorizontal===!0?"width":"height",E={["--q-virtual-scroll-item-"+k]:n.value+"px"};return[i==="tbody"?t.h(i,{class:"q-virtual-scroll__padding",key:"before",ref:C},[t.h("tr",[t.h("td",{style:{[k]:`${I.value}px`,...E},colspan:Y.value})])]):t.h(i,{class:"q-virtual-scroll__padding",key:"before",ref:C,style:{[k]:`${I.value}px`,...E}}),t.h(i,{class:"q-virtual-scroll__content",key:"content",ref:j,tabindex:-1},c.flat()),i==="tbody"?t.h(i,{class:"q-virtual-scroll__padding",key:"after",ref:N},[t.h("tr",[t.h("td",{style:{[k]:`${v.value}px`,...E},colspan:Y.value})])]):t.h(i,{class:"q-virtual-scroll__padding",key:"after",ref:N,style:{[k]:`${v.value}px`,...E}})]}function m(i){h!==i&&(a.onVirtualScroll!==void 0&&d("virtualScroll",{index:i,from:R.value.from,to:R.value.to-1,direction:i<h?"decrease":"increase",ref:S}),h=i)}U();const V=pt(le,b.platform.is.ios===!0?120:35);t.onBeforeMount(()=>{U()});let Q=!1;return t.onDeactivated(()=>{Q=!0}),t.onActivated(()=>{if(Q!==!0)return;const i=o();F!==void 0&&i!==void 0&&i!==null&&i.nodeType!==8?st(i,F,a.virtualScrollHorizontal,b.lang.rtl):G(h)}),t.onBeforeUnmount(()=>{V.cancel()}),Object.assign(S,{scrollTo:G,reset:D,refresh:te}),{virtualScrollSliceRange:R,virtualScrollSliceSizeComputed:f,setVirtualScrollSize:U,onVirtualScrollEvt:V,localResetVirtualScroll:oe,padVirtualScroll:fe,scrollTo:G,reset:D,refresh:te}}const Gt=/[\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,tl=/[\u3131-\u314e\u314f-\u3163\uac00-\ud7a3]/,ll=/[a-z0-9_ -]$/i;function ol(e){return function(u){if(u.type==="compositionend"||u.type==="change"){if(u.target.qComposing!==!0)return;u.target.qComposing=!1,e(u)}else u.type==="compositionupdate"&&u.target.qComposing!==!0&&typeof u.data=="string"&&(mt.client.is.firefox===!0?ll.test(u.data)===!1:Gt.test(u.data)===!0||el.test(u.data)===!0||tl.test(u.data)===!0)===!0&&(u.target.qComposing=!0)}}function ne(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 u,n;if(e.constructor===Array){if(u=e.length,u!==o.length)return!1;for(n=u;n--!==0;)if(ne(e[n],o[n])!==!0)return!1;return!0}if(e.constructor===Map){if(e.size!==o.size)return!1;let a=e.entries();for(n=a.next();n.done!==!0;){if(o.has(n.value[0])!==!0)return!1;n=a.next()}for(a=e.entries(),n=a.next();n.done!==!0;){if(ne(n.value[1],o.get(n.value[0]))!==!0)return!1;n=a.next()}return!0}if(e.constructor===Set){if(e.size!==o.size)return!1;const a=e.entries();for(n=a.next();n.done!==!0;){if(o.has(n.value[0])!==!0)return!1;n=a.next()}return!0}if(e.buffer!=null&&e.buffer.constructor===ArrayBuffer){if(u=e.length,u!==o.length)return!1;for(n=u;n--!==0;)if(e[n]!==o[n])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 g=Object.keys(e).filter(a=>e[a]!==void 0);if(u=g.length,u!==Object.keys(o).filter(a=>o[a]!==void 0).length)return!1;for(n=u;n--!==0;){const a=g[n];if(ne(e[a],o[a])!==!0)return!1}return!0}return e!==e&&o!==o}function dt(e,o,u){if(u<=o)return o;const n=u-o+1;let g=o+(e-o)%n;return g<o&&(g=n+g),g===0?0:g}const ft=e=>["add","add-unique","toggle"].includes(e),ul=".*+?^${}()|[]\\",nl=Object.keys($e);function Le(e,o){if(typeof e=="function")return e;const u=e!==void 0?e:o;return n=>n!==null&&typeof n=="object"&&u in n?n[u]:n}const il=p.createComponent({name:"QSelect",inheritAttrs:!1,props:{...ct,...p.useFormProps,...$e,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:ft},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:ct.virtualScrollItemSize.type,onNewValue:Function,onFilter:Function},emits:[...ht,"add","remove","inputValue","keyup","keypress","keydown","popupShow","popupHide","filterAbort"],setup(e,{slots:o,emit:u}){const{proxy:n}=t.getCurrentInstance(),{$q:g}=n,a=t.ref(!1),d=t.ref(!1),S=t.ref(-1),b=t.ref(""),F=t.ref(!1),h=t.ref(!1);let y=null,x=null,_,I,v,f=null,C,N,j,R;const Y=t.ref(null),B=t.ref(null),T=t.ref(null),D=t.ref(null),te=t.ref(null),G=p.useFormInputNameAttr(e),le=ol(Je),K=t.computed(()=>Array.isArray(e.options)?e.options.length:0),ie=t.computed(()=>e.virtualScrollItemSize===void 0?e.optionsDense===!0?24:48:e.virtualScrollItemSize),{virtualScrollSliceRange:de,virtualScrollSliceSizeComputed:oe,localResetVirtualScroll:U,padVirtualScroll:fe,onVirtualScrollEvt:m,scrollTo:V,setVirtualScrollSize:Q}=Jt({virtualScrollLength:K,getVirtualScrollTarget:Vt,getVirtualScrollEl:Ye,virtualScrollItemSizeComputed:ie}),i=gt(),c=t.computed(()=>{const l=e.mapOptions===!0&&e.multiple!==!0,r=e.modelValue!==void 0&&(e.modelValue!==null||l===!0)?e.multiple===!0&&Array.isArray(e.modelValue)?e.modelValue:[e.modelValue]:[];if(e.mapOptions===!0&&Array.isArray(e.options)===!0){const s=e.mapOptions===!0&&_!==void 0?_:[],w=r.map(O=>wt(O,s));return e.modelValue===null&&l===!0?w.filter(O=>O!==null):w}return r}),k=t.computed(()=>{const l={};return nl.forEach(r=>{const s=e[r];s!==void 0&&(l[r]=s)}),l}),E=t.computed(()=>e.optionsDark===null?i.isDark.value:e.optionsDark),H=t.computed(()=>He(c.value)),z=t.computed(()=>{let l="q-field__input q-placeholder col";return e.hideSelected===!0||c.value.length===0?[l,e.inputClass]:(l+=" q-field__input--padding",e.inputClass===void 0?l:[l,e.inputClass])}),A=t.computed(()=>(e.virtualScrollHorizontal===!0?"q-virtual-scroll--horizontal":"")+(e.popupContentClass?" "+e.popupContentClass:"")),$=t.computed(()=>K.value===0),q=t.computed(()=>c.value.map(l=>X.value(l)).join(", ")),W=t.computed(()=>e.displayValue!==void 0?e.displayValue:q.value),ue=t.computed(()=>e.optionsHtml===!0?()=>!0:l=>(l==null?void 0:l.html)===!0),qe=t.computed(()=>e.displayValueHtml===!0||e.displayValue===void 0&&(e.optionsHtml===!0||c.value.some(ue.value))),Z=t.computed(()=>i.focused.value===!0?e.tabindex:-1),xe=t.computed(()=>{const l={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":a.value===!0?"true":"false","aria-controls":`${i.targetUid.value}_lb`};return S.value>=0&&(l["aria-activedescendant"]=`${i.targetUid.value}_${S.value}`),l}),ae=t.computed(()=>({id:`${i.targetUid.value}_lb`,role:"listbox","aria-multiselectable":e.multiple===!0?"true":"false"})),re=t.computed(()=>c.value.map((l,r)=>({index:r,opt:l,html:ue.value(l),selected:!0,removeAtIndex:Ct,toggleOption:se,tabindex:Z.value}))),_e=t.computed(()=>{if(K.value===0)return[];const{from:l,to:r}=de.value;return e.options.slice(l,r).map((s,w)=>{const O=ve.value(s)===!0,P=Ee(s)===!0,M=l+w,L={clickable:!0,active:P,activeClass:we.value,manualFocus:!0,focused:!1,disable:O,tabindex:-1,dense:e.optionsDense,dark:E.value,role:"option","aria-selected":P===!0?"true":"false",id:`${i.targetUid.value}_${M}`,onClick:()=>{se(s)}};return O!==!0&&(S.value===M&&(L.focused=!0),g.platform.is.desktop===!0&&(L.onMousemove=()=>{a.value===!0&&me(M)})),{index:M,opt:s,html:ue.value(s),label:X.value(s),selected:L.active,focused:L.focused,toggleOption:se,setOptionIndex:me,itemProps:L}})}),Ce=t.computed(()=>e.dropdownIcon!==void 0?e.dropdownIcon:g.iconSet.arrow.dropdown),Oe=t.computed(()=>e.optionsCover===!1&&e.outlined!==!0&&e.standout!==!0&&e.borderless!==!0&&e.rounded!==!0),we=t.computed(()=>e.optionsSelectedClass!==void 0?e.optionsSelectedClass:e.color!==void 0?`text-${e.color}`:""),ee=t.computed(()=>Le(e.optionValue,"value")),X=t.computed(()=>Le(e.optionLabel,"label")),ve=t.computed(()=>Le(e.optionDisable,"disable")),Ae=t.computed(()=>c.value.map(ee.value)),yt=t.computed(()=>{const l={onInput:Je,onChange:le,onKeydown:Xe,onKeyup:Qe,onKeypress:We,onFocus:Ke,onClick(r){I===!0&&p.stop(r)}};return l.onCompositionstart=l.onCompositionupdate=l.onCompositionend=le,l});t.watch(c,l=>{_=l,e.useInput===!0&&e.fillInput===!0&&e.multiple!==!0&&i.innerLoading.value!==!0&&(d.value!==!0&&a.value!==!0||H.value!==!0)&&(v!==!0&&Se(),(d.value===!0||a.value===!0)&&pe(""))},{immediate:!0}),t.watch(()=>e.fillInput,Se),t.watch(a,Te),t.watch(K,Mt);function Ne(l){return e.emitValue===!0?ee.value(l):l}function Me(l){if(l!==-1&&l<c.value.length)if(e.multiple===!0){const r=e.modelValue.slice();u("remove",{index:l,value:r.splice(l,1)[0]}),u("update:modelValue",r)}else u("update:modelValue",null)}function Ct(l){Me(l),i.focus()}function je(l,r){const s=Ne(l);if(e.multiple!==!0){e.fillInput===!0&&Ve(X.value(l),!0,!0),u("update:modelValue",s);return}if(c.value.length===0){u("add",{index:0,value:s}),u("update:modelValue",e.multiple===!0?[s]:s);return}if(r===!0&&Ee(l)===!0||e.maxValues!==void 0&&e.modelValue.length>=e.maxValues)return;const w=e.modelValue.slice();u("add",{index:w.length,value:s}),w.push(s),u("update:modelValue",w)}function se(l,r){var P;if(i.editable.value!==!0||l===void 0||ve.value(l)===!0)return;const s=ee.value(l);if(e.multiple!==!0){r!==!0&&(Ve(e.fillInput===!0?X.value(l):"",!0,!0),ce()),(P=B.value)==null||P.focus(),(c.value.length===0||ne(ee.value(c.value[0]),s)!==!0)&&u("update:modelValue",e.emitValue===!0?s:l);return}if((I!==!0||F.value===!0)&&i.focus(),Ke(),c.value.length===0){const M=e.emitValue===!0?s:l;u("add",{index:0,value:M}),u("update:modelValue",e.multiple===!0?[M]:M);return}const w=e.modelValue.slice(),O=Ae.value.findIndex(M=>ne(M,s));if(O!==-1)u("remove",{index:O,value:w.splice(O,1)[0]});else{if(e.maxValues!==void 0&&w.length>=e.maxValues)return;const M=e.emitValue===!0?s:l;u("add",{index:w.length,value:M}),w.push(M)}u("update:modelValue",w)}function me(l){if(g.platform.is.desktop!==!0)return;const r=l!==-1&&l<K.value?l:-1;S.value!==r&&(S.value=r)}function Be(l=1,r){if(a.value===!0){let s=S.value;do s=dt(s+l,-1,K.value-1);while(s!==-1&&s!==S.value&&ve.value(e.options[s])===!0);S.value!==s&&(me(s),V(s),r!==!0&&e.useInput===!0&&e.fillInput===!0&&ze(s>=0?X.value(e.options[s]):C,!0))}}function wt(l,r){const s=w=>ne(ee.value(w),l);return e.options.find(s)||r.find(s)||l}function Ee(l){const r=ee.value(l);return Ae.value.find(s=>ne(s,r))!==void 0}function Ke(l){e.useInput===!0&&B.value!==null&&(l===void 0||B.value===l.target&&l.target.value===q.value)&&B.value.select()}function Ue(l){p.isKeyCode(l,27)===!0&&a.value===!0&&(p.stop(l),ce(),Se()),u("keyup",l)}function Qe(l){const{value:r}=l.target;if(l.keyCode!==void 0){Ue(l);return}if(l.target.value="",y!==null&&(clearTimeout(y),y=null),x!==null&&(clearTimeout(x),x=null),Se(),typeof r=="string"&&r.length!==0){const s=r.toLocaleLowerCase(),w=P=>{const M=e.options.find(L=>String(P.value(L)).toLocaleLowerCase()===s);return M===void 0?!1:(c.value.indexOf(M)===-1?se(M):ce(),!0)},O=P=>{w(ee)!==!0&&P!==!0&&w(X)!==!0&&pe(r,!0,()=>O(!0))};O()}else i.clearValue(l)}function We(l){u("keypress",l)}function Xe(l){if(u("keydown",l),p.shouldIgnoreKey(l)===!0)return;const r=b.value.length!==0&&(e.newValueMode!==void 0||e.onNewValue!==void 0),s=l.shiftKey!==!0&&e.disableTabSelection!==!0&&e.multiple!==!0&&(S.value!==-1||r===!0);if(l.keyCode===27){p.prevent(l);return}if(l.keyCode===9&&s===!1){he();return}if(l.target===void 0||l.target.id!==i.targetUid.value||i.editable.value!==!0)return;if(l.keyCode===40&&i.innerLoading.value!==!0&&a.value===!1){p.stopAndPrevent(l),ge();return}if(l.keyCode===8&&(e.useChips===!0||e.clearable===!0)&&e.hideSelected!==!0&&b.value.length===0){e.multiple===!0&&Array.isArray(e.modelValue)===!0?Me(e.modelValue.length-1):e.multiple!==!0&&e.modelValue!==null&&u("update:modelValue",null);return}(l.keyCode===35||l.keyCode===36)&&(typeof b.value!="string"||b.value.length===0)&&(p.stopAndPrevent(l),S.value=-1,Be(l.keyCode===36?1:-1,e.multiple)),(l.keyCode===33||l.keyCode===34)&&oe.value!==void 0&&(p.stopAndPrevent(l),S.value=Math.max(-1,Math.min(K.value,S.value+(l.keyCode===33?-1:1)*oe.value.view)),Be(l.keyCode===33?1:-1,e.multiple)),(l.keyCode===38||l.keyCode===40)&&(p.stopAndPrevent(l),Be(l.keyCode===38?-1:1,e.multiple));const w=K.value;if((j===void 0||R<Date.now())&&(j=""),w>0&&e.useInput!==!0&&l.key!==void 0&&l.key.length===1&&l.altKey===!1&&l.ctrlKey===!1&&l.metaKey===!1&&(l.keyCode!==32||j.length!==0)){a.value!==!0&&ge(l);const O=l.key.toLocaleLowerCase(),P=j.length===1&&j[0]===O;R=Date.now()+1500,P===!1&&(p.stopAndPrevent(l),j+=O);const M=new RegExp("^"+j.split("").map(be=>ul.indexOf(be)!==-1?"\\"+be:be).join(".*"),"i");let L=S.value;if(P===!0||L<0||M.test(X.value(e.options[L]))!==!0)do L=dt(L+1,-1,w-1);while(L!==S.value&&(ve.value(e.options[L])===!0||M.test(X.value(e.options[L]))!==!0));S.value!==L&&t.nextTick(()=>{me(L),V(L),L>=0&&e.useInput===!0&&e.fillInput===!0&&ze(X.value(e.options[L]),!0)});return}if(!(l.keyCode!==13&&(l.keyCode!==32||e.useInput===!0||j!=="")&&(l.keyCode!==9||s===!1))){if(l.keyCode!==9&&p.stopAndPrevent(l),S.value!==-1&&S.value<w){se(e.options[S.value]);return}if(r===!0){const O=(P,M)=>{var be;if(M){if(ft(M)!==!0)return}else M=e.newValueMode;if(Ve("",e.multiple!==!0,!0),P==null)return;(M==="toggle"?se:je)(P,M==="add-unique"),e.multiple!==!0&&((be=B.value)==null||be.focus(),ce())};if(e.onNewValue!==void 0?u("newValue",b.value,O):O(b.value),e.multiple!==!0)return}a.value===!0?he():i.innerLoading.value!==!0&&ge()}}function Ye(){return I===!0?te.value:T.value!==null&&T.value.contentEl!==null?T.value.contentEl:void 0}function Vt(){return Ye()}function kt(){return e.hideSelected===!0?[]:o["selected-item"]!==void 0?re.value.map(l=>o["selected-item"](l)).slice():o.selected!==void 0?[].concat(o.selected()):e.useChips===!0?re.value.map((l,r)=>t.h(Ut,{key:"option-"+r,removable:i.editable.value===!0&&ve.value(l.opt)!==!0,dense:!0,textColor:e.color,tabindex:Z.value,onRemove(){l.removeAtIndex(r)}},()=>t.h("span",{class:"ellipsis",[l.html===!0?"innerHTML":"textContent"]:X.value(l.opt)}))):[t.h("span",{class:"ellipsis",[qe.value===!0?"innerHTML":"textContent"]:W.value})]}function Ze(){if($.value===!0)return o["no-option"]!==void 0?o["no-option"]({inputValue:b.value}):void 0;const l=o.option!==void 0?o.option:s=>t.h(p.QItem,{key:s.index,...s.itemProps},()=>t.h(Qt,()=>t.h(Wt,()=>t.h("span",{[s.html===!0?"innerHTML":"textContent"]:s.label}))));let r=fe("div",_e.value.map(l));return o["before-options"]!==void 0&&(r=o["before-options"]().concat(r)),p.hMergeSlot(o["after-options"],r)}function qt(l,r){const s=r===!0?{...xe.value,...i.splitAttrs.attributes.value}:void 0,w={ref:r===!0?B:void 0,key:"i_t",class:z.value,style:e.inputStyle,value:b.value!==void 0?b.value:"",type:"search",...s,id:r===!0?i.targetUid.value:void 0,maxlength:e.maxlength,autocomplete:e.autocomplete,"data-autofocus":l===!0||e.autofocus===!0||void 0,disabled:e.disable===!0,readonly:e.readonly===!0,...yt.value};return l!==!0&&I===!0&&(Array.isArray(w.class)===!0?w.class=[...w.class,"no-pointer-events"]:w.class+=" no-pointer-events"),t.h("input",w)}function Je(l){y!==null&&(clearTimeout(y),y=null),x!==null&&(clearTimeout(x),x=null),!(l&&l.target&&l.target.qComposing===!0)&&(ze(l.target.value||""),v=!0,C=b.value,i.focused.value!==!0&&(I!==!0||F.value===!0)&&i.focus(),e.onFilter!==void 0&&(y=setTimeout(()=>{y=null,pe(b.value)},e.inputDebounce)))}function ze(l,r){b.value!==l&&(b.value=l,r===!0||e.inputDebounce===0||e.inputDebounce==="0"?u("inputValue",l):x=setTimeout(()=>{x=null,u("inputValue",l)},e.inputDebounce))}function Ve(l,r,s){v=s!==!0,e.useInput===!0&&(ze(l,!0),(r===!0||s!==!0)&&(C=l),r!==!0&&pe(l))}function pe(l,r,s){if(e.onFilter===void 0||r!==!0&&i.focused.value!==!0)return;i.innerLoading.value===!0?u("filterAbort"):(i.innerLoading.value=!0,h.value=!0),l!==""&&e.multiple!==!0&&c.value.length!==0&&v!==!0&&l===X.value(c.value[0])&&(l="");const w=setTimeout(()=>{a.value===!0&&(a.value=!1)},10);f!==null&&clearTimeout(f),f=w,u("filter",l,(O,P)=>{(r===!0||i.focused.value===!0)&&f===w&&(clearTimeout(f),typeof O=="function"&&O(),h.value=!1,t.nextTick(()=>{i.innerLoading.value=!1,i.editable.value===!0&&(r===!0?a.value===!0&&ce():a.value===!0?Te(!0):a.value=!0),typeof P=="function"&&t.nextTick(()=>{P(n)}),typeof s=="function"&&t.nextTick(()=>{s(n)})}))},()=>{i.focused.value===!0&&f===w&&(clearTimeout(f),i.innerLoading.value=!1,h.value=!1),a.value===!0&&(a.value=!1)})}function xt(){return t.h(vt.QMenu,{ref:T,class:A.value,style:e.popupContentStyle,modelValue:a.value,fit:e.menuShrink!==!0,cover:e.optionsCover===!0&&$.value!==!0&&e.useInput!==!0,anchor:e.menuAnchor,self:e.menuSelf,offset:e.menuOffset,dark:E.value,noParentEvent:!0,noRefocus:!0,noFocus:!0,noRouteDismiss:e.popupNoRouteDismiss,square:Oe.value,transitionShow:e.transitionShow,transitionHide:e.transitionHide,transitionDuration:e.transitionDuration,separateClosePopup:!0,...ae.value,onScrollPassive:m,onBeforeShow:et,onBeforeHide:_t,onShow:At},Ze)}function _t(l){tt(l),he()}function At(){Q()}function Bt(l){var r;p.stop(l),(r=B.value)==null||r.focus(),F.value=!0,window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,0)}function zt(l){p.stop(l),t.nextTick(()=>{F.value=!1})}function It(){const l=[t.h(jt,{class:`col-auto ${i.fieldClass.value}`,...k.value,for:i.targetUid.value,dark:E.value,square:!0,loading:h.value,itemAligned:!1,filled:!0,stackLabel:b.value.length!==0,...i.splitAttrs.listeners.value,onFocus:Bt,onBlur:zt},{...o,rawControl:()=>i.getControl(!0),before:void 0,after:void 0})];return a.value===!0&&l.push(t.h("div",{ref:te,class:A.value+" scroll",style:e.popupContentStyle,...ae.value,onClick:p.prevent,onScrollPassive:m},Ze())),t.h(Et.QDialog,{ref:D,modelValue:d.value,position:e.useInput===!0?"top":void 0,transitionShow:N,transitionHide:e.transitionHide,transitionDuration:e.transitionDuration,noRouteDismiss:e.popupNoRouteDismiss,onBeforeShow:et,onBeforeHide:Ft,onHide:Rt,onShow:Ot},()=>t.h("div",{class:"q-select__dialog"+(E.value===!0?" q-select__dialog--dark q-dark":"")+(F.value===!0?" q-select__dialog--focused":"")},l))}function Ft(l){tt(l),D.value!==null&&D.value.__updateRefocusTarget(i.rootRef.value.querySelector(".q-field__native > [tabindex]:last-child")),i.focused.value=!1}function Rt(l){ce(),i.focused.value===!1&&u("blur",l),Se()}function Ot(){const l=document.activeElement;(l===null||l.id!==i.targetUid.value)&&B.value!==null&&B.value!==l&&B.value.focus(),Q()}function he(){d.value!==!0&&(S.value=-1,a.value===!0&&(a.value=!1),i.focused.value===!1&&(f!==null&&(clearTimeout(f),f=null),i.innerLoading.value===!0&&(u("filterAbort"),i.innerLoading.value=!1,h.value=!1)))}function ge(l){i.editable.value===!0&&(I===!0?(i.onControlFocusin(l),d.value=!0,t.nextTick(()=>{i.focus()})):i.focus(),e.onFilter!==void 0?pe(b.value):($.value!==!0||o["no-option"]!==void 0)&&(a.value=!0))}function ce(){d.value=!1,he()}function Se(){e.useInput===!0&&Ve(e.multiple!==!0&&e.fillInput===!0&&c.value.length!==0&&X.value(c.value[0])||"",!0,!0)}function Te(l){let r=-1;if(l===!0){if(c.value.length!==0){const s=ee.value(c.value[0]);r=e.options.findIndex(w=>ne(ee.value(w),s))}U(r)}me(r)}function Mt(l,r){a.value===!0&&i.innerLoading.value===!1&&(U(-1,!0),t.nextTick(()=>{a.value===!0&&i.innerLoading.value===!1&&(l>r?U():Te(!0))}))}function Ge(){d.value===!1&&T.value!==null&&T.value.updatePosition()}function et(l){l!==void 0&&p.stop(l),u("popupShow",l),i.hasPopupOpen=!0,i.onControlFocusin(l)}function tt(l){l!==void 0&&p.stop(l),u("popupHide",l),i.hasPopupOpen=!1,i.onControlFocusout(l)}function lt(){I=g.platform.is.mobile!==!0&&e.behavior!=="dialog"?!1:e.behavior!=="menu"&&(e.useInput===!0?o["no-option"]!==void 0||e.onFilter!==void 0||$.value===!1:!0),N=g.platform.is.ios===!0&&I===!0&&e.useInput===!0?"fade":e.transitionShow}return t.onBeforeUpdate(lt),t.onUpdated(Ge),lt(),t.onBeforeUnmount(()=>{y!==null&&clearTimeout(y),x!==null&&clearTimeout(x)}),Object.assign(n,{showPopup:ge,hidePopup:ce,removeAtIndex:Me,add:je,toggleOption:se,getOptionIndex:()=>S.value,setOptionIndex:me,moveOptionSelection:Be,filter:pe,updateMenuPosition:Ge,updateInputValue:Ve,isOptionSelected:Ee,getEmittingOptionValue:Ne,isOptionDisabled:(...l)=>ve.value.apply(null,l)===!0,getOptionValue:(...l)=>ee.value.apply(null,l),getOptionLabel:(...l)=>X.value.apply(null,l)}),Object.assign(i,{innerValue:c,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:B,hasValue:H,showPopup:ge,floatingLabel:t.computed(()=>e.hideSelected!==!0&&H.value===!0||typeof b.value=="number"||b.value.length!==0||He(e.displayValue)),getControlChild:()=>{if(i.editable.value!==!1&&(d.value===!0||$.value!==!0||o["no-option"]!==void 0))return I===!0?It():xt();i.hasPopupOpen===!0&&(i.hasPopupOpen=!1)},controlEvents:{onFocusin(l){i.onControlFocusin(l)},onFocusout(l){i.onControlFocusout(l,()=>{Se(),he()})},onClick(l){var r;if(p.prevent(l),I!==!0&&a.value===!0){he(),(r=B.value)==null||r.focus();return}ge(l)}},getControl:l=>{const r=kt(),s=l===!0||d.value!==!0||I!==!0;if(e.useInput===!0)r.push(qt(l,s));else if(i.editable.value===!0){const O=s===!0?xe.value:void 0;r.push(t.h("input",{ref:s===!0?B:void 0,key:"d_t",class:"q-select__focus-target",id:s===!0?i.targetUid.value:void 0,value:W.value,readonly:!0,"data-autofocus":l===!0||e.autofocus===!0||void 0,...O,onKeydown:Xe,onKeyup:Ue,onKeypress:We})),s===!0&&typeof e.autocomplete=="string"&&e.autocomplete.length!==0&&r.push(t.h("input",{class:"q-select__autocomplete-input",autocomplete:e.autocomplete,tabindex:-1,onKeyup:Qe}))}if(G.value!==void 0&&e.disable!==!0&&Ae.value.length!==0){const O=Ae.value.map(P=>t.h("option",{value:P,selected:!0}));r.push(t.h("select",{class:"hidden",name:G.value,multiple:e.multiple},O))}const w=e.useInput===!0||s!==!0?void 0:i.splitAttrs.attributes.value;return t.h("div",{class:"q-field__native row items-center",...w,...i.splitAttrs.listeners.value},r)},getInnerAppend:()=>e.loading!==!0&&h.value!==!0&&e.hideDropdownIcon!==!0?[t.h(p.QIcon,{class:"q-select__dropdown-icon"+(a.value===!0?" rotate-180":""),name:Ce.value})]:null}),St(i)}}),al={class:"app-select__amount"},rl=t.defineComponent({__name:"AppSelect",props:{modelValue:{},size:{default:p.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:{},glass:{type:Boolean},isMobile:{type:Boolean}},emits:["update:modelValue","popupShow","popupHide"],setup(e,{emit:o}){const u=e,n=o,g=t.ref(!1),a=t.ref(""),d=t.computed({get(){if(u.modelValue){if(u.multiple&&Array.isArray(u.modelValue))return u.options.filter(v=>u.modelValue.includes(v.value));if(!Array.isArray(u.modelValue))return u.options.find(v=>v.value===u.modelValue)}},set(v){if(!v){n("update:modelValue",void 0);return}if(u.multiple&&Array.isArray(v)){const f=v.map(C=>C.value);n("update:modelValue",f)}else Array.isArray(v)||n("update:modelValue",v.value)}}),S=t.computed(()=>{var v;if(Array.isArray(d.value)){if(u.multiple&&d.value.length==0)return u.placeholder}else return((v=d.value)==null?void 0:v.label)||u.placeholder||"";return""}),b=t.computed(()=>!(!u.clearable||!u.modelValue||u.modelValue&&Array.isArray(u.modelValue)&&!u.modelValue.length)),F=t.computed(()=>a.value?u.options.filter(v=>v.label.toLowerCase().includes(a.value.toLowerCase())):u.options),h=t.computed(()=>{if(u.rules)return u.required?[...u.rules,ut]:u.rules;if(u.required)return[ut]}),y=()=>{g.value=!0,n("popupShow")},x=()=>{g.value=!1,n("popupHide")},_=()=>{d.value=void 0},I=(v,f)=>{f(()=>{a.value=v})};return(v,f)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["app-select",[{"app-select_opened":g.value},`app-select_${v.size}`]])},[v.label?(t.openBlock(),t.createElementBlock("label",{key:0,class:t.normalizeClass(["app-select__label",{"app-select__label_bold":v.required}])},t.toDisplayString(v.required?`${v.label} *`:v.label),3)):t.createCommentVNode("",!0),t.createVNode(t.unref(il),{standout:"","hide-bottom-space":"","hide-dropdown-icon":"","no-error-icon":"",behavior:"menu","popup-no-route-dismiss":"","popup-content-class":`kl-menu ${v.glass?"glass-menu":""} app-select-menu app-select-menu_${v.size} ${v.menuClass}`,placeholder:v.filtering&&"Почніть вводити","input-debounce":"50",modelValue:d.value,"onUpdate:modelValue":f[0]||(f[0]=C=>d.value=C),options:F.value,multiple:v.multiple,"use-input":v.filtering&&(Array.isArray(d.value)||!d.value),rules:h.value,"lazy-rules":v.lazyRules,autofocus:v.autofocus,disable:v.disabled,loading:v.loading,"menu-offset":[0,2],onFilter:I,onPopupShow:y,onPopupHide:x},{append:t.withCtx(()=>[b.value?(t.openBlock(),t.createElementBlock("i",{key:0,class:"icon-kl icon-kl-circle-close app-select__clear",onClick:t.withModifiers(_,["stop","prevent"])})):t.createCommentVNode("",!0),f[1]||(f[1]=t.createElementVNode("i",{class:"icon-kl icon-kl-arrow-down app-select__drop-icon"},null,-1))]),selected:t.withCtx(()=>{var C,N;return[Array.isArray(d.value)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[!v.filtering||d.value.length?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(["app-select__selected",{"app-select__placeholder":!((C=d.value)!=null&&C.length)&&v.placeholder}])},[(N=d.value)!=null&&N.length?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[f[2]||(f[2]=t.createTextVNode(" Вибрано ",-1)),t.createElementVNode("span",al,t.toDisplayString(d.value.length),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(u.placeholder),1)],64))],2)):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[!v.filtering||d.value?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(["app-select__selected",{"app-select__placeholder":!d.value&&v.placeholder}])},t.toDisplayString(S.value),3)):t.createCommentVNode("",!0)],64))]}),option:t.withCtx(C=>[t.createVNode(p.PopupItem,t.mergeProps({"no-arrow":"",label:C.opt.label,checked:C.opt.done,active:C.selected,"is-mobile":v.isMobile,checkbox:u.multiple,"model-value":C.selected},u.multiple?{...C.itemProps,onClick:void 0}:C.itemProps,{"onUpdate:modelValue":()=>C.toggleOption(C.opt)}),null,16,["label","checked","active","is-mobile","checkbox","model-value","onUpdate:modelValue"])]),_:1},8,["popup-content-class","placeholder","modelValue","options","multiple","use-input","rules","lazy-rules","autofocus","disable","loading"])],2))}}),sl=p._export_sfc(rl,[["__scopeId","data-v-21482233"]]);exports.default=sl;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),p=require("./index-BB31xQaa.cjs"),vt=require("./QMenu-lZpXWLnn.cjs"),mt=require("./focusout-DzWGke-4.cjs"),ot=require("./escape-key-CRpXNCKN.cjs"),Et=require("./QDialog-tGGvOIPj.cjs"),ut=e=>e?!0:"Обовʼязкове поле",nt=/^on[A-Z]/;function Tt(){const{attrs:e,vnode:o}=t.getCurrentInstance(),u={listeners:t.ref({}),attributes:t.ref({})};function n(){const g={},a={};for(const d in e)d!=="class"&&d!=="style"&&nt.test(d)===!1&&(g[d]=e[d]);for(const d in o.props)nt.test(d)===!0&&(a[d]=o.props[d]);u.attributes.value=g,u.listeners.value=a}return t.onBeforeUpdate(n),n(),u}const Dt="_q_fo_";function Pt({validate:e,resetValidation:o,requiresQForm:u}){const n=t.inject(Dt,!1);if(n!==!1){const{props:g,proxy:a}=t.getCurrentInstance();Object.assign(a,{validate:e,resetValidation:o}),t.watch(()=>g.disable,d=>{d===!0?(typeof o=="function"&&o(),n.unbindComponent(a)):n.bindComponent(a)}),t.onMounted(()=>{g.disable!==!0&&n.bindComponent(a)}),t.onBeforeUnmount(()=>{g.disable!==!0&&n.unbindComponent(a)})}else u===!0&&console.error("Parent QForm not found on useFormChild()!")}const it=/^#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?$/,at=/^#[0-9a-fA-F]{4}([0-9a-fA-F]{4})?$/,rt=/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,Ie=/^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])\)$/,Fe=/^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)\)$/,De={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=>it.test(e),hexaColor:e=>at.test(e),hexOrHexaColor:e=>rt.test(e),rgbColor:e=>Ie.test(e),rgbaColor:e=>Fe.test(e),rgbOrRgbaColor:e=>Ie.test(e)||Fe.test(e),hexOrRgbColor:e=>it.test(e)||Ie.test(e),hexaOrRgbaColor:e=>at.test(e)||Fe.test(e),anyColor:e=>rt.test(e)||Ie.test(e)||Fe.test(e)};function pt(e,o=250,u){let n=null;function g(){const a=arguments,d=()=>{n=null,e.apply(this,a)};n!==null?clearTimeout(n):u===!0&&e.apply(this,a),n=setTimeout(d,o)}return g.cancel=()=>{n!==null&&clearTimeout(n)},g}const Lt=[!0,!1,"ondemand"],Ht={modelValue:{},error:{type:Boolean,default:null},errorMessage:String,noErrorIcon:Boolean,rules:Array,reactiveRules:Boolean,lazyRules:{type:[Boolean,String],default:!1,validator:e=>Lt.includes(e)}};function $t(e,o){const{props:u,proxy:n}=t.getCurrentInstance(),g=t.ref(!1),a=t.ref(null),d=t.ref(!1);Pt({validate:v,resetValidation:I});let S=0,b;const F=t.computed(()=>u.rules!==void 0&&u.rules!==null&&u.rules.length!==0),h=t.computed(()=>u.disable!==!0&&F.value===!0&&o.value===!1),y=t.computed(()=>u.error===!0||g.value===!0),x=t.computed(()=>typeof u.errorMessage=="string"&&u.errorMessage.length!==0?u.errorMessage:a.value);t.watch(()=>u.modelValue,()=>{d.value=!0,h.value===!0&&u.lazyRules===!1&&f()});function _(){u.lazyRules!=="ondemand"&&h.value===!0&&d.value===!0&&f()}t.watch(()=>u.reactiveRules,C=>{C===!0?b===void 0&&(b=t.watch(()=>u.rules,_,{immediate:!0,deep:!0})):b!==void 0&&(b(),b=void 0)},{immediate:!0}),t.watch(()=>u.lazyRules,_),t.watch(e,C=>{C===!0?d.value=!0:h.value===!0&&u.lazyRules!=="ondemand"&&f()});function I(){S++,o.value=!1,d.value=!1,g.value=!1,a.value=null,f.cancel()}function v(C=u.modelValue){if(u.disable===!0||F.value===!1)return!0;const N=++S,j=o.value!==!0?()=>{d.value=!0}:()=>{},R=(B,T)=>{B===!0&&j(),g.value=B,a.value=T||null,o.value=!1},Y=[];for(let B=0;B<u.rules.length;B++){const T=u.rules[B];let D;if(typeof T=="function"?D=T(C,De):typeof T=="string"&&De[T]!==void 0&&(D=De[T](C)),D===!1||typeof D=="string")return R(!0,D),!1;D!==!0&&D!==void 0&&Y.push(D)}return Y.length===0?(R(!1),!0):(o.value=!0,Promise.all(Y).then(B=>{if(B===void 0||Array.isArray(B)===!1||B.length===0)return N===S&&R(!1),!0;const T=B.find(D=>D===!1||typeof D=="string");return N===S&&R(T!==void 0,T),T===void 0},B=>(N===S&&(console.error(B),R(!0)),!1)))}const f=pt(v,0);return t.onBeforeUnmount(()=>{b==null||b(),f.cancel()}),Object.assign(n,{resetValidation:I,validate:v}),mt.injectProp(n,"hasError",()=>y.value),{isDirtyModel:d,hasRules:F,hasError:y,errorMessage:x,validate:v,resetValidation:I}}function He(e){return e!=null&&(""+e).length!==0}const Nt={...p.useDarkProps,...Ht,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},$e={...Nt,maxlength:[Number,String]},ht=["update:modelValue","clear","focus","blur"];function gt({requiredForAttr:e=!0,tagProp:o,changeEvent:u=!1}={}){const{props:n,proxy:g}=t.getCurrentInstance(),a=p.useDark(n,g.$q),d=vt.useId({required:e,getValue:()=>n.for});return{requiredForAttr:e,changeEvent:u,tag:o===!0?t.computed(()=>n.tag):{value:"label"},isDark:a,editable:t.computed(()=>n.disable!==!0&&n.readonly!==!0),innerLoading:t.ref(!1),focused:t.ref(!1),hasPopupOpen:!1,splitAttrs:Tt(),targetUid:d,rootRef:t.ref(null),targetRef:t.ref(null),controlRef:t.ref(null)}}function St(e){const{props:o,emit:u,slots:n,attrs:g,proxy:a}=t.getCurrentInstance(),{$q:d}=a;let S=null;e.hasValue===void 0&&(e.hasValue=t.computed(()=>He(o.modelValue))),e.emitValue===void 0&&(e.emitValue=m=>{u("update:modelValue",m)}),e.controlEvents===void 0&&(e.controlEvents={onFocusin:te,onFocusout:G}),Object.assign(e,{clearValue:le,onControlFocusin:te,onControlFocusout:G,focus:T}),e.computedCounter===void 0&&(e.computedCounter=t.computed(()=>{if(o.counter!==!1){const m=typeof o.modelValue=="string"||typeof o.modelValue=="number"?(""+o.modelValue).length:Array.isArray(o.modelValue)===!0?o.modelValue.length:0,V=o.maxlength!==void 0?o.maxlength:o.maxValues;return m+(V!==void 0?" / "+V:"")}}));const{isDirtyModel:b,hasRules:F,hasError:h,errorMessage:y,resetValidation:x}=$t(e.focused,e.innerLoading),_=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),I=t.computed(()=>o.bottomSlots===!0||o.hint!==void 0||F.value===!0||o.counter===!0||o.error!==null),v=t.computed(()=>o.filled===!0?"filled":o.outlined===!0?"outlined":o.borderless===!0?"borderless":o.standout?"standout":"standard"),f=t.computed(()=>`q-field row no-wrap items-start q-field--${v.value}`+(e.fieldClass!==void 0?` ${e.fieldClass.value}`:"")+(o.rounded===!0?" q-field--rounded":"")+(o.square===!0?" q-field--square":"")+(_.value===!0?" q-field--float":"")+(N.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":"")+(h.value===!0?" q-field--error":"")+(h.value===!0||e.focused.value===!0?" q-field--highlighted":"")+(o.hideBottomSpace!==!0&&I.value===!0?" q-field--with-bottom":"")+(o.disable===!0?" q-field--disabled":o.readonly===!0?" q-field--readonly":"")),C=t.computed(()=>"q-field__control relative-position row no-wrap"+(o.bgColor!==void 0?` bg-${o.bgColor}`:"")+(h.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}`:"")),N=t.computed(()=>o.labelSlot===!0||o.label!==void 0),j=t.computed(()=>"q-field__label no-pointer-events absolute ellipsis"+(o.labelColor!==void 0&&h.value!==!0?` text-${o.labelColor}`:"")),R=t.computed(()=>({id:e.targetUid.value,editable:e.editable.value,focused:e.focused.value,floatingLabel:_.value,modelValue:o.modelValue,emitValue:e.emitValue})),Y=t.computed(()=>{const m={};return e.targetUid.value&&(m.for=e.targetUid.value),o.disable===!0&&(m["aria-disabled"]="true"),m});function B(){var Q;const m=document.activeElement;let V=(Q=e.targetRef)==null?void 0:Q.value;V&&(m===null||m.id!==e.targetUid.value)&&(V.hasAttribute("tabindex")===!0||(V=V.querySelector("[tabindex]")),V!==m&&(V==null||V.focus({preventScroll:!0})))}function T(){ot.addFocusFn(B)}function D(){ot.removeFocusFn(B);const m=document.activeElement;m!==null&&e.rootRef.value.contains(m)&&m.blur()}function te(m){S!==null&&(clearTimeout(S),S=null),e.editable.value===!0&&e.focused.value===!1&&(e.focused.value=!0,u("focus",m))}function G(m,V){S!==null&&clearTimeout(S),S=setTimeout(()=>{S=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,u("blur",m)),V==null||V())})}function le(m){var V;p.stopAndPrevent(m),d.platform.is.mobile!==!0?(((V=e.targetRef)==null?void 0:V.value)||e.rootRef.value).focus():e.rootRef.value.contains(document.activeElement)===!0&&document.activeElement.blur(),o.type==="file"&&(e.inputRef.value.value=null),u("update:modelValue",null),e.changeEvent===!0&&u("change",null),u("clear",o.modelValue),t.nextTick(()=>{const Q=b.value;x(),b.value=Q})}function K(m){[13,32].includes(m.keyCode)&&le(m)}function ie(){const m=[];return n.prepend!==void 0&&m.push(t.h("div",{class:"q-field__prepend q-field__marginal row no-wrap items-center",key:"prepend",onClick:p.prevent},n.prepend())),m.push(t.h("div",{class:"q-field__control-container col relative-position row no-wrap q-anchor--skip"},de())),h.value===!0&&o.noErrorIcon===!1&&m.push(U("error",[t.h(p.QIcon,{name:d.iconSet.field.error,color:"negative"})])),o.loading===!0||e.innerLoading.value===!0?m.push(U("inner-loading-append",n.loading!==void 0?n.loading():[t.h(p.QSpinner,{color:o.color})])):o.clearable===!0&&e.hasValue.value===!0&&e.editable.value===!0&&m.push(U("inner-clearable-append",[t.h(p.QIcon,{class:"q-field__focusable-action",name:o.clearIcon||d.iconSet.field.clear,tabindex:0,role:"button","aria-hidden":"false","aria-label":d.lang.label.clear,onKeyup:K,onClick:le})])),n.append!==void 0&&m.push(t.h("div",{class:"q-field__append q-field__marginal row no-wrap items-center",key:"append",onClick:p.prevent},n.append())),e.getInnerAppend!==void 0&&m.push(U("inner-append",e.getInnerAppend())),e.getControlChild!==void 0&&m.push(e.getControlChild()),m}function de(){const m=[];return o.prefix!==void 0&&o.prefix!==null&&m.push(t.h("div",{class:"q-field__prefix no-pointer-events row items-center"},o.prefix)),e.getShadowControl!==void 0&&e.hasShadow.value===!0&&m.push(e.getShadowControl()),N.value===!0&&m.push(t.h("div",{class:j.value},p.hSlot(n.label,o.label))),e.getControl!==void 0?m.push(e.getControl()):n.rawControl!==void 0?m.push(n.rawControl()):n.control!==void 0&&m.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},n.control(R.value))),o.suffix!==void 0&&o.suffix!==null&&m.push(t.h("div",{class:"q-field__suffix no-pointer-events row items-center"},o.suffix)),m.concat(p.hSlot(n.default))}function oe(){let m,V;h.value===!0?y.value!==null?(m=[t.h("div",{role:"alert"},y.value)],V=`q--slot-error-${y.value}`):(m=p.hSlot(n.error),V="q--slot-error"):(o.hideHint!==!0||e.focused.value===!0)&&(o.hint!==void 0?(m=[t.h("div",o.hint)],V=`q--slot-hint-${o.hint}`):(m=p.hSlot(n.hint),V="q--slot-hint"));const Q=o.counter===!0||n.counter!==void 0;if(o.hideBottomSpace===!0&&Q===!1&&m===void 0)return;const i=t.h("div",{key:V,class:"q-field__messages col"},m);return t.h("div",{class:"q-field__bottom row items-start q-field__bottom--"+(o.hideBottomSpace!==!0?"animated":"stale"),onClick:p.prevent},[o.hideBottomSpace===!0?i:t.h(t.Transition,{name:"q-transition--field-message"},()=>i),Q===!0?t.h("div",{class:"q-field__counter"},n.counter!==void 0?n.counter():e.computedCounter.value):null])}function U(m,V){return V===null?null:t.h("div",{key:m,class:"q-field__append q-field__marginal row no-wrap items-center q-anchor--skip"},V)}let fe=!1;return t.onDeactivated(()=>{fe=!0}),t.onActivated(()=>{fe===!0&&o.autofocus===!0&&a.focus()}),o.autofocus===!0&&t.onMounted(()=>{a.focus()}),t.onBeforeUnmount(()=>{S!==null&&clearTimeout(S)}),Object.assign(a,{focus:T,blur:D}),function(){const V=e.getControl===void 0&&n.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:[f.value,g.class],style:g.style,...V},[n.before!==void 0?t.h("div",{class:"q-field__before q-field__marginal row no-wrap items-center",onClick:p.prevent},n.before()):null,t.h("div",{class:"q-field__inner relative-position col self-stretch"},[t.h("div",{ref:e.controlRef,class:C.value,tabindex:-1,...e.controlEvents},ie()),I.value===!0?oe():null]),n.after!==void 0?t.h("div",{class:"q-field__after q-field__marginal row no-wrap items-center",onClick:p.prevent},n.after()):null])}}const jt=p.createComponent({name:"QField",inheritAttrs:!1,props:{...$e,tag:{type:String,default:"label"}},emits:ht,setup(){return St(gt({tagProp:!0}))}}),Kt={xs:8,sm:10,md:14,lg:20,xl:24},Ut=p.createComponent({name:"QChip",props:{...p.useDarkProps,...p.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:u}){const{proxy:{$q:n}}=t.getCurrentInstance(),g=p.useDark(e,n),a=p.useSize(e,Kt),d=t.computed(()=>e.selected===!0||e.icon!==void 0),S=t.computed(()=>e.selected===!0?e.iconSelected||n.iconSet.chip.selected:e.icon),b=t.computed(()=>e.iconRemove||n.iconSet.chip.remove),F=t.computed(()=>e.disable===!1&&(e.clickable===!0||e.selected!==null)),h=t.computed(()=>{const f=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}`:"")+(f?` text-${f} 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":"")+(F.value===!0?" q-chip--clickable cursor-pointer non-selectable q-hoverable":"")+(e.square===!0?" q-chip--square":"")+(g.value===!0?" q-chip--dark q-dark":"")}),y=t.computed(()=>{const f=e.disable===!0?{tabindex:-1,"aria-disabled":"true"}:{tabindex:e.tabindex||0},C={...f,role:"button","aria-hidden":"false","aria-label":e.removeAriaLabel||n.lang.label.remove};return{chip:f,remove:C}});function x(f){f.keyCode===13&&_(f)}function _(f){e.disable||(u("update:selected",!e.selected),u("click",f))}function I(f){(f.keyCode===void 0||f.keyCode===13)&&(p.stopAndPrevent(f),e.disable===!1&&(u("update:modelValue",!1),u("remove")))}function v(){const f=[];F.value===!0&&f.push(t.h("div",{class:"q-focus-helper"})),d.value===!0&&f.push(t.h(p.QIcon,{class:"q-chip__icon q-chip__icon--left",name:S.value}));const C=e.label!==void 0?[t.h("div",{class:"ellipsis"},[e.label])]:void 0;return f.push(t.h("div",{class:"q-chip__content col row no-wrap items-center q-anchor--skip"},p.hMergeSlotSafely(o.default,C))),e.iconRight&&f.push(t.h(p.QIcon,{class:"q-chip__icon q-chip__icon--right",name:e.iconRight})),e.removable===!0&&f.push(t.h(p.QIcon,{class:"q-chip__icon q-chip__icon--remove cursor-pointer",name:b.value,...y.value.remove,onClick:I,onKeyup:I})),f}return()=>{if(e.modelValue===!1)return;const f={class:h.value,style:a.value};return F.value===!0&&Object.assign(f,y.value.chip,{onClick:_,onKeyup:x}),p.hDir("div",f,v(),"ripple",e.ripple!==!1&&e.disable!==!0,()=>[[p.Ripple,e.ripple]])}}}),Qt=p.createComponent({name:"QItemSection",props:{avatar:Boolean,thumbnail:Boolean,side:Boolean,top:Boolean,noWrap:Boolean},setup(e,{slots:o}){const u=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:u.value},p.hSlot(o.default))}}),Wt=p.createComponent({name:"QItemLabel",props:{overline:Boolean,caption:Boolean,header:Boolean,lines:[Number,String]},setup(e,{slots:o}){const u=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":"")+(u.value===1?" ellipsis":"")),g=t.computed(()=>e.lines!==void 0&&u.value>1?{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":u.value}:null);return()=>t.h("div",{style:g.value,class:n.value},p.hSlot(o.default))}});let Re=!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,Re=e.scrollLeft>=0,e.remove()}const J=1e3,Xt=["start","center","end","start-force","center-force","end-force"],bt=Array.prototype.filter,Yt=window.getComputedStyle(document.body).overflowAnchor===void 0?p.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 u=e.children||[];bt.call(u,g=>g.dataset&&g.dataset.qVsAnchor!==void 0).forEach(g=>{delete g.dataset.qVsAnchor});const n=u[o];n!=null&&n.dataset&&(n.dataset.qVsAnchor="")}))};function ye(e,o){return e+o}function Pe(e,o,u,n,g,a,d,S){const b=e===window?document.scrollingElement||document.documentElement:e,F=g===!0?"offsetWidth":"offsetHeight",h={scrollStart:0,scrollViewSize:-d-S,scrollMaxSize:0,offsetStart:-d,offsetEnd:-S};if(g===!0?(e===window?(h.scrollStart=window.pageXOffset||window.scrollX||document.body.scrollLeft||0,h.scrollViewSize+=document.documentElement.clientWidth):(h.scrollStart=b.scrollLeft,h.scrollViewSize+=b.clientWidth),h.scrollMaxSize=b.scrollWidth,a===!0&&(h.scrollStart=(Re===!0?h.scrollMaxSize-h.scrollViewSize:0)-h.scrollStart)):(e===window?(h.scrollStart=window.pageYOffset||window.scrollY||document.body.scrollTop||0,h.scrollViewSize+=document.documentElement.clientHeight):(h.scrollStart=b.scrollTop,h.scrollViewSize+=b.clientHeight),h.scrollMaxSize=b.scrollHeight),u!==null)for(let y=u.previousElementSibling;y!==null;y=y.previousElementSibling)y.classList.contains("q-virtual-scroll--skip")===!1&&(h.offsetStart+=y[F]);if(n!==null)for(let y=n.nextElementSibling;y!==null;y=y.nextElementSibling)y.classList.contains("q-virtual-scroll--skip")===!1&&(h.offsetEnd+=y[F]);if(o!==e){const y=b.getBoundingClientRect(),x=o.getBoundingClientRect();g===!0?(h.offsetStart+=x.left-y.left,h.offsetEnd-=x.width):(h.offsetStart+=x.top-y.top,h.offsetEnd-=x.height),e!==window&&(h.offsetStart+=h.scrollStart),h.offsetEnd+=h.scrollMaxSize-h.offsetStart}return h}function st(e,o,u,n){o==="end"&&(o=(e===window?document.body:e)[u===!0?"scrollWidth":"scrollHeight"]),e===window?u===!0?(n===!0&&(o=(Re===!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):u===!0?(n===!0&&(o=(Re===!0?e.scrollWidth-e.offsetWidth:0)-o),e.scrollLeft=o):e.scrollTop=o}function ke(e,o,u,n){if(u>=n)return 0;const g=o.length,a=Math.floor(u/J),d=Math.floor((n-1)/J)+1;let S=e.slice(a,d).reduce(ye,0);return u%J!==0&&(S-=o.slice(a*J,u).reduce(ye,0)),n%J!==0&&n!==g&&(S-=o.slice(n,d*J).reduce(ye,0)),S}const Zt={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]},ct={virtualScrollHorizontal:Boolean,onVirtualScroll:Function,...Zt};function Jt({virtualScrollLength:e,getVirtualScrollTarget:o,getVirtualScrollEl:u,virtualScrollItemSizeComputed:n}){const g=t.getCurrentInstance(),{props:a,emit:d,proxy:S}=g,{$q:b}=S;let F,h,y,x=[],_;const I=t.ref(0),v=t.ref(0),f=t.ref({}),C=t.ref(null),N=t.ref(null),j=t.ref(null),R=t.ref({from:0,to:0}),Y=t.computed(()=>a.tableColspan!==void 0?a.tableColspan:100);n===void 0&&(n=t.computed(()=>a.virtualScrollItemSize));const B=t.computed(()=>n.value+";"+a.virtualScrollHorizontal),T=t.computed(()=>B.value+";"+a.virtualScrollSliceRatioBefore+";"+a.virtualScrollSliceRatioAfter);t.watch(T,()=>{U()}),t.watch(B,D);function D(){oe(h,!0)}function te(i){oe(i===void 0?h:i)}function G(i,c){const k=o();if(k==null||k.nodeType===8)return;const E=Pe(k,u(),C.value,N.value,a.virtualScrollHorizontal,b.lang.rtl,a.virtualScrollStickySizeStart,a.virtualScrollStickySizeEnd);y!==E.scrollViewSize&&U(E.scrollViewSize),K(k,E,Math.min(e.value-1,Math.max(0,parseInt(i,10)||0)),0,Xt.indexOf(c)!==-1?c:h!==-1&&i>h?"end":"start")}function le(){const i=o();if(i==null||i.nodeType===8)return;const c=Pe(i,u(),C.value,N.value,a.virtualScrollHorizontal,b.lang.rtl,a.virtualScrollStickySizeStart,a.virtualScrollStickySizeEnd),k=e.value-1,E=c.scrollMaxSize-c.offsetStart-c.offsetEnd-v.value;if(F===c.scrollStart)return;if(c.scrollMaxSize<=0){K(i,c,0,0);return}y!==c.scrollViewSize&&U(c.scrollViewSize),ie(R.value.from);const H=Math.floor(c.scrollMaxSize-Math.max(c.scrollViewSize,c.offsetEnd)-Math.min(_[k],c.scrollViewSize/2));if(H>0&&Math.ceil(c.scrollStart)>=H){K(i,c,k,c.scrollMaxSize-c.offsetEnd-x.reduce(ye,0));return}let z=0,A=c.scrollStart-c.offsetStart,$=A;if(A<=E&&A+c.scrollViewSize>=I.value)A-=I.value,z=R.value.from,$=A;else for(let q=0;A>=x[q]&&z<k;q++)A-=x[q],z+=J;for(;A>0&&z<k;)A-=_[z],A>-c.scrollViewSize?(z++,$=A):$=_[z]+A;K(i,c,z,$)}function K(i,c,k,E,H){const z=typeof H=="string"&&H.indexOf("-force")!==-1,A=z===!0?H.replace("-force",""):H,$=A!==void 0?A:"start";let q=Math.max(0,k-f.value[$]),W=q+f.value.total;W>e.value&&(W=e.value,q=Math.max(0,W-f.value.total)),F=c.scrollStart;const ue=q!==R.value.from||W!==R.value.to;if(ue===!1&&A===void 0){m(k);return}const{activeElement:qe}=document,Z=j.value;ue===!0&&Z!==null&&Z!==qe&&Z.contains(qe)===!0&&(Z.addEventListener("focusout",de),setTimeout(()=>{Z==null||Z.removeEventListener("focusout",de)})),Yt(Z,k-q);const xe=A!==void 0?_.slice(q,k).reduce(ye,0):0;if(ue===!0){const ae=W>=R.value.from&&q<=R.value.to?R.value.to:W;R.value={from:q,to:ae},I.value=ke(x,_,0,q),v.value=ke(x,_,W,e.value),requestAnimationFrame(()=>{R.value.to!==W&&F===c.scrollStart&&(R.value={from:R.value.from,to:W},v.value=ke(x,_,W,e.value))})}requestAnimationFrame(()=>{if(F!==c.scrollStart)return;ue===!0&&ie(q);const ae=_.slice(q,k).reduce(ye,0),re=ae+c.offsetStart+I.value,_e=re+_[k];let Ce=re+E;if(A!==void 0){const Oe=ae-xe,we=c.scrollStart+Oe;Ce=z!==!0&&we<re&&_e<we+c.scrollViewSize?we:A==="end"?_e-c.scrollViewSize:re-(A==="start"?0:Math.round((c.scrollViewSize-_[k])/2))}F=Ce,st(i,Ce,a.virtualScrollHorizontal,b.lang.rtl),m(k)})}function ie(i){const c=j.value;if(c){const k=bt.call(c.children,q=>q.classList&&q.classList.contains("q-virtual-scroll--skip")===!1),E=k.length,H=a.virtualScrollHorizontal===!0?q=>q.getBoundingClientRect().width:q=>q.offsetHeight;let z=i,A,$;for(let q=0;q<E;){for(A=H(k[q]),q++;q<E&&k[q].classList.contains("q-virtual-scroll--with-prev")===!0;)A+=H(k[q]),q++;$=A-_[z],$!==0&&(_[z]+=$,x[Math.floor(z/J)]+=$),z++}}}function de(){var i;(i=j.value)==null||i.focus()}function oe(i,c){const k=1*n.value;(c===!0||Array.isArray(_)===!1)&&(_=[]);const E=_.length;_.length=e.value;for(let z=e.value-1;z>=E;z--)_[z]=k;const H=Math.floor((e.value-1)/J);x=[];for(let z=0;z<=H;z++){let A=0;const $=Math.min((z+1)*J,e.value);for(let q=z*J;q<$;q++)A+=_[q];x.push(A)}h=-1,F=void 0,I.value=ke(x,_,0,R.value.from),v.value=ke(x,_,R.value.to,e.value),i>=0?(ie(R.value.from),t.nextTick(()=>{G(i)})):V()}function U(i){if(i===void 0&&typeof window<"u"){const A=o();A!=null&&A.nodeType!==8&&(i=Pe(A,u(),C.value,N.value,a.virtualScrollHorizontal,b.lang.rtl,a.virtualScrollStickySizeStart,a.virtualScrollStickySizeEnd).scrollViewSize)}y=i;const c=parseFloat(a.virtualScrollSliceRatioBefore)||0,k=parseFloat(a.virtualScrollSliceRatioAfter)||0,E=1+c+k,H=i===void 0||i<=0?1:Math.ceil(i/n.value),z=Math.max(1,H,Math.ceil((a.virtualScrollSliceSize>0?a.virtualScrollSliceSize:10)/E));f.value={total:Math.ceil(z*E),start:Math.ceil(z*c),center:Math.ceil(z*(.5+c)),end:Math.ceil(z*(1+c)),view:H}}function fe(i,c){const k=a.virtualScrollHorizontal===!0?"width":"height",E={["--q-virtual-scroll-item-"+k]:n.value+"px"};return[i==="tbody"?t.h(i,{class:"q-virtual-scroll__padding",key:"before",ref:C},[t.h("tr",[t.h("td",{style:{[k]:`${I.value}px`,...E},colspan:Y.value})])]):t.h(i,{class:"q-virtual-scroll__padding",key:"before",ref:C,style:{[k]:`${I.value}px`,...E}}),t.h(i,{class:"q-virtual-scroll__content",key:"content",ref:j,tabindex:-1},c.flat()),i==="tbody"?t.h(i,{class:"q-virtual-scroll__padding",key:"after",ref:N},[t.h("tr",[t.h("td",{style:{[k]:`${v.value}px`,...E},colspan:Y.value})])]):t.h(i,{class:"q-virtual-scroll__padding",key:"after",ref:N,style:{[k]:`${v.value}px`,...E}})]}function m(i){h!==i&&(a.onVirtualScroll!==void 0&&d("virtualScroll",{index:i,from:R.value.from,to:R.value.to-1,direction:i<h?"decrease":"increase",ref:S}),h=i)}U();const V=pt(le,b.platform.is.ios===!0?120:35);t.onBeforeMount(()=>{U()});let Q=!1;return t.onDeactivated(()=>{Q=!0}),t.onActivated(()=>{if(Q!==!0)return;const i=o();F!==void 0&&i!==void 0&&i!==null&&i.nodeType!==8?st(i,F,a.virtualScrollHorizontal,b.lang.rtl):G(h)}),t.onBeforeUnmount(()=>{V.cancel()}),Object.assign(S,{scrollTo:G,reset:D,refresh:te}),{virtualScrollSliceRange:R,virtualScrollSliceSizeComputed:f,setVirtualScrollSize:U,onVirtualScrollEvt:V,localResetVirtualScroll:oe,padVirtualScroll:fe,scrollTo:G,reset:D,refresh:te}}const Gt=/[\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,tl=/[\u3131-\u314e\u314f-\u3163\uac00-\ud7a3]/,ll=/[a-z0-9_ -]$/i;function ol(e){return function(u){if(u.type==="compositionend"||u.type==="change"){if(u.target.qComposing!==!0)return;u.target.qComposing=!1,e(u)}else u.type==="compositionupdate"&&u.target.qComposing!==!0&&typeof u.data=="string"&&(mt.client.is.firefox===!0?ll.test(u.data)===!1:Gt.test(u.data)===!0||el.test(u.data)===!0||tl.test(u.data)===!0)===!0&&(u.target.qComposing=!0)}}function ne(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 u,n;if(e.constructor===Array){if(u=e.length,u!==o.length)return!1;for(n=u;n--!==0;)if(ne(e[n],o[n])!==!0)return!1;return!0}if(e.constructor===Map){if(e.size!==o.size)return!1;let a=e.entries();for(n=a.next();n.done!==!0;){if(o.has(n.value[0])!==!0)return!1;n=a.next()}for(a=e.entries(),n=a.next();n.done!==!0;){if(ne(n.value[1],o.get(n.value[0]))!==!0)return!1;n=a.next()}return!0}if(e.constructor===Set){if(e.size!==o.size)return!1;const a=e.entries();for(n=a.next();n.done!==!0;){if(o.has(n.value[0])!==!0)return!1;n=a.next()}return!0}if(e.buffer!=null&&e.buffer.constructor===ArrayBuffer){if(u=e.length,u!==o.length)return!1;for(n=u;n--!==0;)if(e[n]!==o[n])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 g=Object.keys(e).filter(a=>e[a]!==void 0);if(u=g.length,u!==Object.keys(o).filter(a=>o[a]!==void 0).length)return!1;for(n=u;n--!==0;){const a=g[n];if(ne(e[a],o[a])!==!0)return!1}return!0}return e!==e&&o!==o}function dt(e,o,u){if(u<=o)return o;const n=u-o+1;let g=o+(e-o)%n;return g<o&&(g=n+g),g===0?0:g}const ft=e=>["add","add-unique","toggle"].includes(e),ul=".*+?^${}()|[]\\",nl=Object.keys($e);function Le(e,o){if(typeof e=="function")return e;const u=e!==void 0?e:o;return n=>n!==null&&typeof n=="object"&&u in n?n[u]:n}const il=p.createComponent({name:"QSelect",inheritAttrs:!1,props:{...ct,...p.useFormProps,...$e,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:ft},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:ct.virtualScrollItemSize.type,onNewValue:Function,onFilter:Function},emits:[...ht,"add","remove","inputValue","keyup","keypress","keydown","popupShow","popupHide","filterAbort"],setup(e,{slots:o,emit:u}){const{proxy:n}=t.getCurrentInstance(),{$q:g}=n,a=t.ref(!1),d=t.ref(!1),S=t.ref(-1),b=t.ref(""),F=t.ref(!1),h=t.ref(!1);let y=null,x=null,_,I,v,f=null,C,N,j,R;const Y=t.ref(null),B=t.ref(null),T=t.ref(null),D=t.ref(null),te=t.ref(null),G=p.useFormInputNameAttr(e),le=ol(Je),K=t.computed(()=>Array.isArray(e.options)?e.options.length:0),ie=t.computed(()=>e.virtualScrollItemSize===void 0?e.optionsDense===!0?24:48:e.virtualScrollItemSize),{virtualScrollSliceRange:de,virtualScrollSliceSizeComputed:oe,localResetVirtualScroll:U,padVirtualScroll:fe,onVirtualScrollEvt:m,scrollTo:V,setVirtualScrollSize:Q}=Jt({virtualScrollLength:K,getVirtualScrollTarget:Vt,getVirtualScrollEl:Ye,virtualScrollItemSizeComputed:ie}),i=gt(),c=t.computed(()=>{const l=e.mapOptions===!0&&e.multiple!==!0,r=e.modelValue!==void 0&&(e.modelValue!==null||l===!0)?e.multiple===!0&&Array.isArray(e.modelValue)?e.modelValue:[e.modelValue]:[];if(e.mapOptions===!0&&Array.isArray(e.options)===!0){const s=e.mapOptions===!0&&_!==void 0?_:[],w=r.map(O=>wt(O,s));return e.modelValue===null&&l===!0?w.filter(O=>O!==null):w}return r}),k=t.computed(()=>{const l={};return nl.forEach(r=>{const s=e[r];s!==void 0&&(l[r]=s)}),l}),E=t.computed(()=>e.optionsDark===null?i.isDark.value:e.optionsDark),H=t.computed(()=>He(c.value)),z=t.computed(()=>{let l="q-field__input q-placeholder col";return e.hideSelected===!0||c.value.length===0?[l,e.inputClass]:(l+=" q-field__input--padding",e.inputClass===void 0?l:[l,e.inputClass])}),A=t.computed(()=>(e.virtualScrollHorizontal===!0?"q-virtual-scroll--horizontal":"")+(e.popupContentClass?" "+e.popupContentClass:"")),$=t.computed(()=>K.value===0),q=t.computed(()=>c.value.map(l=>X.value(l)).join(", ")),W=t.computed(()=>e.displayValue!==void 0?e.displayValue:q.value),ue=t.computed(()=>e.optionsHtml===!0?()=>!0:l=>(l==null?void 0:l.html)===!0),qe=t.computed(()=>e.displayValueHtml===!0||e.displayValue===void 0&&(e.optionsHtml===!0||c.value.some(ue.value))),Z=t.computed(()=>i.focused.value===!0?e.tabindex:-1),xe=t.computed(()=>{const l={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":a.value===!0?"true":"false","aria-controls":`${i.targetUid.value}_lb`};return S.value>=0&&(l["aria-activedescendant"]=`${i.targetUid.value}_${S.value}`),l}),ae=t.computed(()=>({id:`${i.targetUid.value}_lb`,role:"listbox","aria-multiselectable":e.multiple===!0?"true":"false"})),re=t.computed(()=>c.value.map((l,r)=>({index:r,opt:l,html:ue.value(l),selected:!0,removeAtIndex:Ct,toggleOption:se,tabindex:Z.value}))),_e=t.computed(()=>{if(K.value===0)return[];const{from:l,to:r}=de.value;return e.options.slice(l,r).map((s,w)=>{const O=ve.value(s)===!0,P=Ee(s)===!0,M=l+w,L={clickable:!0,active:P,activeClass:we.value,manualFocus:!0,focused:!1,disable:O,tabindex:-1,dense:e.optionsDense,dark:E.value,role:"option","aria-selected":P===!0?"true":"false",id:`${i.targetUid.value}_${M}`,onClick:()=>{se(s)}};return O!==!0&&(S.value===M&&(L.focused=!0),g.platform.is.desktop===!0&&(L.onMousemove=()=>{a.value===!0&&me(M)})),{index:M,opt:s,html:ue.value(s),label:X.value(s),selected:L.active,focused:L.focused,toggleOption:se,setOptionIndex:me,itemProps:L}})}),Ce=t.computed(()=>e.dropdownIcon!==void 0?e.dropdownIcon:g.iconSet.arrow.dropdown),Oe=t.computed(()=>e.optionsCover===!1&&e.outlined!==!0&&e.standout!==!0&&e.borderless!==!0&&e.rounded!==!0),we=t.computed(()=>e.optionsSelectedClass!==void 0?e.optionsSelectedClass:e.color!==void 0?`text-${e.color}`:""),ee=t.computed(()=>Le(e.optionValue,"value")),X=t.computed(()=>Le(e.optionLabel,"label")),ve=t.computed(()=>Le(e.optionDisable,"disable")),Ae=t.computed(()=>c.value.map(ee.value)),yt=t.computed(()=>{const l={onInput:Je,onChange:le,onKeydown:Xe,onKeyup:Qe,onKeypress:We,onFocus:Ke,onClick(r){I===!0&&p.stop(r)}};return l.onCompositionstart=l.onCompositionupdate=l.onCompositionend=le,l});t.watch(c,l=>{_=l,e.useInput===!0&&e.fillInput===!0&&e.multiple!==!0&&i.innerLoading.value!==!0&&(d.value!==!0&&a.value!==!0||H.value!==!0)&&(v!==!0&&Se(),(d.value===!0||a.value===!0)&&pe(""))},{immediate:!0}),t.watch(()=>e.fillInput,Se),t.watch(a,Te),t.watch(K,Mt);function Ne(l){return e.emitValue===!0?ee.value(l):l}function Me(l){if(l!==-1&&l<c.value.length)if(e.multiple===!0){const r=e.modelValue.slice();u("remove",{index:l,value:r.splice(l,1)[0]}),u("update:modelValue",r)}else u("update:modelValue",null)}function Ct(l){Me(l),i.focus()}function je(l,r){const s=Ne(l);if(e.multiple!==!0){e.fillInput===!0&&Ve(X.value(l),!0,!0),u("update:modelValue",s);return}if(c.value.length===0){u("add",{index:0,value:s}),u("update:modelValue",e.multiple===!0?[s]:s);return}if(r===!0&&Ee(l)===!0||e.maxValues!==void 0&&e.modelValue.length>=e.maxValues)return;const w=e.modelValue.slice();u("add",{index:w.length,value:s}),w.push(s),u("update:modelValue",w)}function se(l,r){var P;if(i.editable.value!==!0||l===void 0||ve.value(l)===!0)return;const s=ee.value(l);if(e.multiple!==!0){r!==!0&&(Ve(e.fillInput===!0?X.value(l):"",!0,!0),ce()),(P=B.value)==null||P.focus(),(c.value.length===0||ne(ee.value(c.value[0]),s)!==!0)&&u("update:modelValue",e.emitValue===!0?s:l);return}if((I!==!0||F.value===!0)&&i.focus(),Ke(),c.value.length===0){const M=e.emitValue===!0?s:l;u("add",{index:0,value:M}),u("update:modelValue",e.multiple===!0?[M]:M);return}const w=e.modelValue.slice(),O=Ae.value.findIndex(M=>ne(M,s));if(O!==-1)u("remove",{index:O,value:w.splice(O,1)[0]});else{if(e.maxValues!==void 0&&w.length>=e.maxValues)return;const M=e.emitValue===!0?s:l;u("add",{index:w.length,value:M}),w.push(M)}u("update:modelValue",w)}function me(l){if(g.platform.is.desktop!==!0)return;const r=l!==-1&&l<K.value?l:-1;S.value!==r&&(S.value=r)}function Be(l=1,r){if(a.value===!0){let s=S.value;do s=dt(s+l,-1,K.value-1);while(s!==-1&&s!==S.value&&ve.value(e.options[s])===!0);S.value!==s&&(me(s),V(s),r!==!0&&e.useInput===!0&&e.fillInput===!0&&ze(s>=0?X.value(e.options[s]):C,!0))}}function wt(l,r){const s=w=>ne(ee.value(w),l);return e.options.find(s)||r.find(s)||l}function Ee(l){const r=ee.value(l);return Ae.value.find(s=>ne(s,r))!==void 0}function Ke(l){e.useInput===!0&&B.value!==null&&(l===void 0||B.value===l.target&&l.target.value===q.value)&&B.value.select()}function Ue(l){p.isKeyCode(l,27)===!0&&a.value===!0&&(p.stop(l),ce(),Se()),u("keyup",l)}function Qe(l){const{value:r}=l.target;if(l.keyCode!==void 0){Ue(l);return}if(l.target.value="",y!==null&&(clearTimeout(y),y=null),x!==null&&(clearTimeout(x),x=null),Se(),typeof r=="string"&&r.length!==0){const s=r.toLocaleLowerCase(),w=P=>{const M=e.options.find(L=>String(P.value(L)).toLocaleLowerCase()===s);return M===void 0?!1:(c.value.indexOf(M)===-1?se(M):ce(),!0)},O=P=>{w(ee)!==!0&&P!==!0&&w(X)!==!0&&pe(r,!0,()=>O(!0))};O()}else i.clearValue(l)}function We(l){u("keypress",l)}function Xe(l){if(u("keydown",l),p.shouldIgnoreKey(l)===!0)return;const r=b.value.length!==0&&(e.newValueMode!==void 0||e.onNewValue!==void 0),s=l.shiftKey!==!0&&e.disableTabSelection!==!0&&e.multiple!==!0&&(S.value!==-1||r===!0);if(l.keyCode===27){p.prevent(l);return}if(l.keyCode===9&&s===!1){he();return}if(l.target===void 0||l.target.id!==i.targetUid.value||i.editable.value!==!0)return;if(l.keyCode===40&&i.innerLoading.value!==!0&&a.value===!1){p.stopAndPrevent(l),ge();return}if(l.keyCode===8&&(e.useChips===!0||e.clearable===!0)&&e.hideSelected!==!0&&b.value.length===0){e.multiple===!0&&Array.isArray(e.modelValue)===!0?Me(e.modelValue.length-1):e.multiple!==!0&&e.modelValue!==null&&u("update:modelValue",null);return}(l.keyCode===35||l.keyCode===36)&&(typeof b.value!="string"||b.value.length===0)&&(p.stopAndPrevent(l),S.value=-1,Be(l.keyCode===36?1:-1,e.multiple)),(l.keyCode===33||l.keyCode===34)&&oe.value!==void 0&&(p.stopAndPrevent(l),S.value=Math.max(-1,Math.min(K.value,S.value+(l.keyCode===33?-1:1)*oe.value.view)),Be(l.keyCode===33?1:-1,e.multiple)),(l.keyCode===38||l.keyCode===40)&&(p.stopAndPrevent(l),Be(l.keyCode===38?-1:1,e.multiple));const w=K.value;if((j===void 0||R<Date.now())&&(j=""),w>0&&e.useInput!==!0&&l.key!==void 0&&l.key.length===1&&l.altKey===!1&&l.ctrlKey===!1&&l.metaKey===!1&&(l.keyCode!==32||j.length!==0)){a.value!==!0&&ge(l);const O=l.key.toLocaleLowerCase(),P=j.length===1&&j[0]===O;R=Date.now()+1500,P===!1&&(p.stopAndPrevent(l),j+=O);const M=new RegExp("^"+j.split("").map(be=>ul.indexOf(be)!==-1?"\\"+be:be).join(".*"),"i");let L=S.value;if(P===!0||L<0||M.test(X.value(e.options[L]))!==!0)do L=dt(L+1,-1,w-1);while(L!==S.value&&(ve.value(e.options[L])===!0||M.test(X.value(e.options[L]))!==!0));S.value!==L&&t.nextTick(()=>{me(L),V(L),L>=0&&e.useInput===!0&&e.fillInput===!0&&ze(X.value(e.options[L]),!0)});return}if(!(l.keyCode!==13&&(l.keyCode!==32||e.useInput===!0||j!=="")&&(l.keyCode!==9||s===!1))){if(l.keyCode!==9&&p.stopAndPrevent(l),S.value!==-1&&S.value<w){se(e.options[S.value]);return}if(r===!0){const O=(P,M)=>{var be;if(M){if(ft(M)!==!0)return}else M=e.newValueMode;if(Ve("",e.multiple!==!0,!0),P==null)return;(M==="toggle"?se:je)(P,M==="add-unique"),e.multiple!==!0&&((be=B.value)==null||be.focus(),ce())};if(e.onNewValue!==void 0?u("newValue",b.value,O):O(b.value),e.multiple!==!0)return}a.value===!0?he():i.innerLoading.value!==!0&&ge()}}function Ye(){return I===!0?te.value:T.value!==null&&T.value.contentEl!==null?T.value.contentEl:void 0}function Vt(){return Ye()}function kt(){return e.hideSelected===!0?[]:o["selected-item"]!==void 0?re.value.map(l=>o["selected-item"](l)).slice():o.selected!==void 0?[].concat(o.selected()):e.useChips===!0?re.value.map((l,r)=>t.h(Ut,{key:"option-"+r,removable:i.editable.value===!0&&ve.value(l.opt)!==!0,dense:!0,textColor:e.color,tabindex:Z.value,onRemove(){l.removeAtIndex(r)}},()=>t.h("span",{class:"ellipsis",[l.html===!0?"innerHTML":"textContent"]:X.value(l.opt)}))):[t.h("span",{class:"ellipsis",[qe.value===!0?"innerHTML":"textContent"]:W.value})]}function Ze(){if($.value===!0)return o["no-option"]!==void 0?o["no-option"]({inputValue:b.value}):void 0;const l=o.option!==void 0?o.option:s=>t.h(p.QItem,{key:s.index,...s.itemProps},()=>t.h(Qt,()=>t.h(Wt,()=>t.h("span",{[s.html===!0?"innerHTML":"textContent"]:s.label}))));let r=fe("div",_e.value.map(l));return o["before-options"]!==void 0&&(r=o["before-options"]().concat(r)),p.hMergeSlot(o["after-options"],r)}function qt(l,r){const s=r===!0?{...xe.value,...i.splitAttrs.attributes.value}:void 0,w={ref:r===!0?B:void 0,key:"i_t",class:z.value,style:e.inputStyle,value:b.value!==void 0?b.value:"",type:"search",...s,id:r===!0?i.targetUid.value:void 0,maxlength:e.maxlength,autocomplete:e.autocomplete,"data-autofocus":l===!0||e.autofocus===!0||void 0,disabled:e.disable===!0,readonly:e.readonly===!0,...yt.value};return l!==!0&&I===!0&&(Array.isArray(w.class)===!0?w.class=[...w.class,"no-pointer-events"]:w.class+=" no-pointer-events"),t.h("input",w)}function Je(l){y!==null&&(clearTimeout(y),y=null),x!==null&&(clearTimeout(x),x=null),!(l&&l.target&&l.target.qComposing===!0)&&(ze(l.target.value||""),v=!0,C=b.value,i.focused.value!==!0&&(I!==!0||F.value===!0)&&i.focus(),e.onFilter!==void 0&&(y=setTimeout(()=>{y=null,pe(b.value)},e.inputDebounce)))}function ze(l,r){b.value!==l&&(b.value=l,r===!0||e.inputDebounce===0||e.inputDebounce==="0"?u("inputValue",l):x=setTimeout(()=>{x=null,u("inputValue",l)},e.inputDebounce))}function Ve(l,r,s){v=s!==!0,e.useInput===!0&&(ze(l,!0),(r===!0||s!==!0)&&(C=l),r!==!0&&pe(l))}function pe(l,r,s){if(e.onFilter===void 0||r!==!0&&i.focused.value!==!0)return;i.innerLoading.value===!0?u("filterAbort"):(i.innerLoading.value=!0,h.value=!0),l!==""&&e.multiple!==!0&&c.value.length!==0&&v!==!0&&l===X.value(c.value[0])&&(l="");const w=setTimeout(()=>{a.value===!0&&(a.value=!1)},10);f!==null&&clearTimeout(f),f=w,u("filter",l,(O,P)=>{(r===!0||i.focused.value===!0)&&f===w&&(clearTimeout(f),typeof O=="function"&&O(),h.value=!1,t.nextTick(()=>{i.innerLoading.value=!1,i.editable.value===!0&&(r===!0?a.value===!0&&ce():a.value===!0?Te(!0):a.value=!0),typeof P=="function"&&t.nextTick(()=>{P(n)}),typeof s=="function"&&t.nextTick(()=>{s(n)})}))},()=>{i.focused.value===!0&&f===w&&(clearTimeout(f),i.innerLoading.value=!1,h.value=!1),a.value===!0&&(a.value=!1)})}function xt(){return t.h(vt.QMenu,{ref:T,class:A.value,style:e.popupContentStyle,modelValue:a.value,fit:e.menuShrink!==!0,cover:e.optionsCover===!0&&$.value!==!0&&e.useInput!==!0,anchor:e.menuAnchor,self:e.menuSelf,offset:e.menuOffset,dark:E.value,noParentEvent:!0,noRefocus:!0,noFocus:!0,noRouteDismiss:e.popupNoRouteDismiss,square:Oe.value,transitionShow:e.transitionShow,transitionHide:e.transitionHide,transitionDuration:e.transitionDuration,separateClosePopup:!0,...ae.value,onScrollPassive:m,onBeforeShow:et,onBeforeHide:_t,onShow:At},Ze)}function _t(l){tt(l),he()}function At(){Q()}function Bt(l){var r;p.stop(l),(r=B.value)==null||r.focus(),F.value=!0,window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,0)}function zt(l){p.stop(l),t.nextTick(()=>{F.value=!1})}function It(){const l=[t.h(jt,{class:`col-auto ${i.fieldClass.value}`,...k.value,for:i.targetUid.value,dark:E.value,square:!0,loading:h.value,itemAligned:!1,filled:!0,stackLabel:b.value.length!==0,...i.splitAttrs.listeners.value,onFocus:Bt,onBlur:zt},{...o,rawControl:()=>i.getControl(!0),before:void 0,after:void 0})];return a.value===!0&&l.push(t.h("div",{ref:te,class:A.value+" scroll",style:e.popupContentStyle,...ae.value,onClick:p.prevent,onScrollPassive:m},Ze())),t.h(Et.QDialog,{ref:D,modelValue:d.value,position:e.useInput===!0?"top":void 0,transitionShow:N,transitionHide:e.transitionHide,transitionDuration:e.transitionDuration,noRouteDismiss:e.popupNoRouteDismiss,onBeforeShow:et,onBeforeHide:Ft,onHide:Rt,onShow:Ot},()=>t.h("div",{class:"q-select__dialog"+(E.value===!0?" q-select__dialog--dark q-dark":"")+(F.value===!0?" q-select__dialog--focused":"")},l))}function Ft(l){tt(l),D.value!==null&&D.value.__updateRefocusTarget(i.rootRef.value.querySelector(".q-field__native > [tabindex]:last-child")),i.focused.value=!1}function Rt(l){ce(),i.focused.value===!1&&u("blur",l),Se()}function Ot(){const l=document.activeElement;(l===null||l.id!==i.targetUid.value)&&B.value!==null&&B.value!==l&&B.value.focus(),Q()}function he(){d.value!==!0&&(S.value=-1,a.value===!0&&(a.value=!1),i.focused.value===!1&&(f!==null&&(clearTimeout(f),f=null),i.innerLoading.value===!0&&(u("filterAbort"),i.innerLoading.value=!1,h.value=!1)))}function ge(l){i.editable.value===!0&&(I===!0?(i.onControlFocusin(l),d.value=!0,t.nextTick(()=>{i.focus()})):i.focus(),e.onFilter!==void 0?pe(b.value):($.value!==!0||o["no-option"]!==void 0)&&(a.value=!0))}function ce(){d.value=!1,he()}function Se(){e.useInput===!0&&Ve(e.multiple!==!0&&e.fillInput===!0&&c.value.length!==0&&X.value(c.value[0])||"",!0,!0)}function Te(l){let r=-1;if(l===!0){if(c.value.length!==0){const s=ee.value(c.value[0]);r=e.options.findIndex(w=>ne(ee.value(w),s))}U(r)}me(r)}function Mt(l,r){a.value===!0&&i.innerLoading.value===!1&&(U(-1,!0),t.nextTick(()=>{a.value===!0&&i.innerLoading.value===!1&&(l>r?U():Te(!0))}))}function Ge(){d.value===!1&&T.value!==null&&T.value.updatePosition()}function et(l){l!==void 0&&p.stop(l),u("popupShow",l),i.hasPopupOpen=!0,i.onControlFocusin(l)}function tt(l){l!==void 0&&p.stop(l),u("popupHide",l),i.hasPopupOpen=!1,i.onControlFocusout(l)}function lt(){I=g.platform.is.mobile!==!0&&e.behavior!=="dialog"?!1:e.behavior!=="menu"&&(e.useInput===!0?o["no-option"]!==void 0||e.onFilter!==void 0||$.value===!1:!0),N=g.platform.is.ios===!0&&I===!0&&e.useInput===!0?"fade":e.transitionShow}return t.onBeforeUpdate(lt),t.onUpdated(Ge),lt(),t.onBeforeUnmount(()=>{y!==null&&clearTimeout(y),x!==null&&clearTimeout(x)}),Object.assign(n,{showPopup:ge,hidePopup:ce,removeAtIndex:Me,add:je,toggleOption:se,getOptionIndex:()=>S.value,setOptionIndex:me,moveOptionSelection:Be,filter:pe,updateMenuPosition:Ge,updateInputValue:Ve,isOptionSelected:Ee,getEmittingOptionValue:Ne,isOptionDisabled:(...l)=>ve.value.apply(null,l)===!0,getOptionValue:(...l)=>ee.value.apply(null,l),getOptionLabel:(...l)=>X.value.apply(null,l)}),Object.assign(i,{innerValue:c,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:B,hasValue:H,showPopup:ge,floatingLabel:t.computed(()=>e.hideSelected!==!0&&H.value===!0||typeof b.value=="number"||b.value.length!==0||He(e.displayValue)),getControlChild:()=>{if(i.editable.value!==!1&&(d.value===!0||$.value!==!0||o["no-option"]!==void 0))return I===!0?It():xt();i.hasPopupOpen===!0&&(i.hasPopupOpen=!1)},controlEvents:{onFocusin(l){i.onControlFocusin(l)},onFocusout(l){i.onControlFocusout(l,()=>{Se(),he()})},onClick(l){var r;if(p.prevent(l),I!==!0&&a.value===!0){he(),(r=B.value)==null||r.focus();return}ge(l)}},getControl:l=>{const r=kt(),s=l===!0||d.value!==!0||I!==!0;if(e.useInput===!0)r.push(qt(l,s));else if(i.editable.value===!0){const O=s===!0?xe.value:void 0;r.push(t.h("input",{ref:s===!0?B:void 0,key:"d_t",class:"q-select__focus-target",id:s===!0?i.targetUid.value:void 0,value:W.value,readonly:!0,"data-autofocus":l===!0||e.autofocus===!0||void 0,...O,onKeydown:Xe,onKeyup:Ue,onKeypress:We})),s===!0&&typeof e.autocomplete=="string"&&e.autocomplete.length!==0&&r.push(t.h("input",{class:"q-select__autocomplete-input",autocomplete:e.autocomplete,tabindex:-1,onKeyup:Qe}))}if(G.value!==void 0&&e.disable!==!0&&Ae.value.length!==0){const O=Ae.value.map(P=>t.h("option",{value:P,selected:!0}));r.push(t.h("select",{class:"hidden",name:G.value,multiple:e.multiple},O))}const w=e.useInput===!0||s!==!0?void 0:i.splitAttrs.attributes.value;return t.h("div",{class:"q-field__native row items-center",...w,...i.splitAttrs.listeners.value},r)},getInnerAppend:()=>e.loading!==!0&&h.value!==!0&&e.hideDropdownIcon!==!0?[t.h(p.QIcon,{class:"q-select__dropdown-icon"+(a.value===!0?" rotate-180":""),name:Ce.value})]:null}),St(i)}}),al={class:"app-select__amount"},rl=t.defineComponent({__name:"AppSelect",props:{modelValue:{},size:{default:p.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:{},glass:{type:Boolean},isMobile:{type:Boolean}},emits:["update:modelValue","popupShow","popupHide"],setup(e,{emit:o}){const u=e,n=o,g=t.ref(!1),a=t.ref(""),d=t.computed({get(){if(u.modelValue){if(u.multiple&&Array.isArray(u.modelValue))return u.options.filter(v=>u.modelValue.includes(v.value));if(!Array.isArray(u.modelValue))return u.options.find(v=>v.value===u.modelValue)}},set(v){if(!v){n("update:modelValue",void 0);return}if(u.multiple&&Array.isArray(v)){const f=v.map(C=>C.value);n("update:modelValue",f)}else Array.isArray(v)||n("update:modelValue",v.value)}}),S=t.computed(()=>{var v;if(Array.isArray(d.value)){if(u.multiple&&d.value.length==0)return u.placeholder}else return((v=d.value)==null?void 0:v.label)||u.placeholder||"";return""}),b=t.computed(()=>!(!u.clearable||!u.modelValue||u.modelValue&&Array.isArray(u.modelValue)&&!u.modelValue.length)),F=t.computed(()=>a.value?u.options.filter(v=>v.label.toLowerCase().includes(a.value.toLowerCase())):u.options),h=t.computed(()=>{if(u.rules)return u.required?[...u.rules,ut]:u.rules;if(u.required)return[ut]}),y=()=>{g.value=!0,n("popupShow")},x=()=>{g.value=!1,n("popupHide")},_=()=>{d.value=void 0},I=(v,f)=>{f(()=>{a.value=v})};return(v,f)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["app-select",[{"app-select_opened":g.value},`app-select_${v.size}`]])},[v.label?(t.openBlock(),t.createElementBlock("label",{key:0,class:t.normalizeClass(["app-select__label",{"app-select__label_bold":v.required}])},t.toDisplayString(v.required?`${v.label} *`:v.label),3)):t.createCommentVNode("",!0),t.createVNode(t.unref(il),{standout:"","hide-bottom-space":"","hide-dropdown-icon":"","no-error-icon":"",behavior:"menu","popup-no-route-dismiss":"","popup-content-class":`kl-menu ${v.glass?"glass-menu":""} app-select-menu app-select-menu_${v.size} ${v.menuClass}`,placeholder:v.filtering&&"Почніть вводити","input-debounce":"50",modelValue:d.value,"onUpdate:modelValue":f[0]||(f[0]=C=>d.value=C),options:F.value,multiple:v.multiple,"use-input":v.filtering&&(Array.isArray(d.value)||!d.value),rules:h.value,"lazy-rules":v.lazyRules,autofocus:v.autofocus,disable:v.disabled,loading:v.loading,"menu-offset":[0,2],onFilter:I,onPopupShow:y,onPopupHide:x},{append:t.withCtx(()=>[b.value?(t.openBlock(),t.createElementBlock("i",{key:0,class:"icon-kl icon-kl-circle-close app-select__clear",onClick:t.withModifiers(_,["stop","prevent"])})):t.createCommentVNode("",!0),f[1]||(f[1]=t.createElementVNode("i",{class:"icon-kl icon-kl-arrow-down app-select__drop-icon"},null,-1))]),selected:t.withCtx(()=>{var C,N;return[Array.isArray(d.value)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[!v.filtering||d.value.length?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(["app-select__selected",{"app-select__placeholder":!((C=d.value)!=null&&C.length)&&v.placeholder}])},[(N=d.value)!=null&&N.length?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[f[2]||(f[2]=t.createTextVNode(" Вибрано ",-1)),t.createElementVNode("span",al,t.toDisplayString(d.value.length),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(u.placeholder),1)],64))],2)):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[!v.filtering||d.value?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(["app-select__selected",{"app-select__placeholder":!d.value&&v.placeholder}])},t.toDisplayString(S.value),3)):t.createCommentVNode("",!0)],64))]}),option:t.withCtx(C=>[t.createVNode(p.PopupItem,t.mergeProps({"no-arrow":"",label:C.opt.label,checked:C.opt.done,active:C.selected,"is-mobile":v.isMobile,checkbox:u.multiple,"model-value":C.selected},u.multiple?{...C.itemProps,onClick:void 0}:C.itemProps,{"onUpdate:modelValue":()=>C.toggleOption(C.opt)}),null,16,["label","checked","active","is-mobile","checkbox","model-value","onUpdate:modelValue"])]),_:1},8,["popup-content-class","placeholder","modelValue","options","multiple","use-input","rules","lazy-rules","autofocus","disable","loading"])],2))}}),sl=p._export_sfc(rl,[["__scopeId","data-v-21482233"]]);exports.default=sl;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),H=require("./QDialog-DUkV6dWi.cjs"),c=require("./index-D2z9gMNY.cjs"),N={class:"bottom-sheet__header"},w={key:0,class:"bottom-sheet__title"},$={class:"bottom-sheet__body"},z={key:0,class:"bottom-sheet__loading"},y=6,D=12,T=e.defineComponent({__name:"BottomSheet",props:e.mergeModels({modelValue:{type:Boolean},title:{},loading:{type:Boolean},persistent:{type:Boolean},maxHeight:{default:"95vh"},glass:{type:Boolean},noBlur:{type:Boolean},splitContent:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["hide","beforeShow"],["update:modelValue"]),setup(m,{emit:_}){const p=m,d=e.useModel(m,"modelValue"),f=_,r=e.ref(null),n=e.ref(!1),s=e.ref(0);let h=0,v=0,a=null,i=null;const B=e.computed(()=>({maxHeight:`${p.maxHeight} !important`,transform:s.value?`translateY(${s.value}px)`:void 0})),S=e.computed(()=>{var o;const t=((o=r.value)==null?void 0:o.offsetHeight)??0;return t?Math.min(1,s.value/t):0}),V=e.computed(()=>p.noBlur?{}:{"--bs-backdrop-blur":`${D*(1-S.value)}px`,"--bs-backdrop-blur-dur":n.value?"0s":"0.32s"}),g=()=>d.value=!1,M=t=>{let o=t instanceof HTMLElement?t:null;for(;o&&o!==r.value;){const{overflowY:l}=getComputedStyle(o);if((l==="auto"||l==="scroll")&&o.scrollHeight>o.clientHeight)return o;o=o.parentElement}return null},k=t=>{if(t.button>0)return;const o=t.target;o.closest(".bottom-sheet__close, input, textarea, [contenteditable]")||(a=t.pointerId,h=t.clientX,v=t.clientY,i=M(o),n.value=!1)},P=t=>{var l;if(t.pointerId!==a)return;const o=t.clientY-v;if(!n.value){const u=t.clientX-h;if(Math.abs(o)<y&&Math.abs(u)<y)return;if(o<=0||Math.abs(u)>Math.abs(o)||((i==null?void 0:i.scrollTop)??0)>0){a=null;return}n.value=!0,typeof((l=r.value)==null?void 0:l.setPointerCapture)=="function"&&r.value.setPointerCapture(t.pointerId)}s.value=Math.max(0,o)},C=t=>{n.value&&t.cancelable&&t.preventDefault()},b=t=>{var u;if(t.pointerId!==a||(a=null,!n.value))return;n.value=!1;const o=((u=r.value)==null?void 0:u.offsetHeight)??0,l=Math.min(120,o*.25||120);if(s.value>l){g();return}s.value=0},E=()=>{n.value=!1,a=null,i=null,s.value=0,f("hide")};return(t,o)=>(e.openBlock(),e.createBlock(e.unref(H.QDialog),{modelValue:d.value,"onUpdate:modelValue":o[0]||(o[0]=l=>d.value=l),position:"bottom",persistent:t.persistent,class:e.normalizeClass(["bottom-sheet-dialog",{"bottom-sheet-dialog_blur":!t.noBlur}]),style:e.normalizeStyle(V.value),onHide:E,onBeforeShow:o[1]||(o[1]=l=>f("beforeShow"))},{default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"sheetRef",ref:r,class:e.normalizeClass(["bottom-sheet",{"bottom-sheet_dragging":n.value,"bottom-sheet_glass":t.glass,"bottom-sheet_splited":t.splitContent}]),style:e.normalizeStyle(B.value),onPointerdown:k,onPointermove:P,onPointerup:b,onPointercancel:b,onTouchmove:C},[e.createElementVNode("div",N,[o[2]||(o[2]=e.createElementVNode("div",{class:"bottom-sheet__grabber"},null,-1)),e.createElementVNode("div",null,[e.renderSlot(t.$slots,"header",{},void 0,!0)]),t.title?(e.openBlock(),e.createElementBlock("div",w,[e.createTextVNode(e.toDisplayString(t.title),1),e.renderSlot(t.$slots,"title",{},void 0,!0)])):e.createCommentVNode("",!0),e.createVNode(c.CloseButton,{class:"bottom-sheet__close",size:"xl",onClick:g})]),e.createElementVNode("div",$,[t.loading?(e.openBlock(),e.createElementBlock("div",z,[e.createVNode(e.unref(c.QSpinner),{size:"55px",thickness:3,color:"grey-5"})])):e.renderSlot(t.$slots,"default",{key:1},void 0,!0)])],38)]),_:3},8,["modelValue","persistent","class","style"]))}}),Y=c._export_sfc(T,[["__scopeId","data-v-e565b67f"]]);exports.default=Y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),H=require("./QDialog-tGGvOIPj.cjs"),c=require("./index-BB31xQaa.cjs"),N={class:"bottom-sheet__header"},w={key:0,class:"bottom-sheet__title"},$={class:"bottom-sheet__body"},z={key:0,class:"bottom-sheet__loading"},y=6,D=12,T=e.defineComponent({__name:"BottomSheet",props:e.mergeModels({modelValue:{type:Boolean},title:{},loading:{type:Boolean},persistent:{type:Boolean},maxHeight:{default:"95vh"},glass:{type:Boolean},noBlur:{type:Boolean},splitContent:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["hide","beforeShow"],["update:modelValue"]),setup(m,{emit:_}){const p=m,d=e.useModel(m,"modelValue"),f=_,r=e.ref(null),n=e.ref(!1),s=e.ref(0);let h=0,v=0,a=null,i=null;const B=e.computed(()=>({maxHeight:`${p.maxHeight} !important`,transform:s.value?`translateY(${s.value}px)`:void 0})),S=e.computed(()=>{var o;const t=((o=r.value)==null?void 0:o.offsetHeight)??0;return t?Math.min(1,s.value/t):0}),V=e.computed(()=>p.noBlur?{}:{"--bs-backdrop-blur":`${D*(1-S.value)}px`,"--bs-backdrop-blur-dur":n.value?"0s":"0.32s"}),g=()=>d.value=!1,M=t=>{let o=t instanceof HTMLElement?t:null;for(;o&&o!==r.value;){const{overflowY:l}=getComputedStyle(o);if((l==="auto"||l==="scroll")&&o.scrollHeight>o.clientHeight)return o;o=o.parentElement}return null},k=t=>{if(t.button>0)return;const o=t.target;o.closest(".bottom-sheet__close, input, textarea, [contenteditable]")||(a=t.pointerId,h=t.clientX,v=t.clientY,i=M(o),n.value=!1)},P=t=>{var l;if(t.pointerId!==a)return;const o=t.clientY-v;if(!n.value){const u=t.clientX-h;if(Math.abs(o)<y&&Math.abs(u)<y)return;if(o<=0||Math.abs(u)>Math.abs(o)||((i==null?void 0:i.scrollTop)??0)>0){a=null;return}n.value=!0,typeof((l=r.value)==null?void 0:l.setPointerCapture)=="function"&&r.value.setPointerCapture(t.pointerId)}s.value=Math.max(0,o)},C=t=>{n.value&&t.cancelable&&t.preventDefault()},b=t=>{var u;if(t.pointerId!==a||(a=null,!n.value))return;n.value=!1;const o=((u=r.value)==null?void 0:u.offsetHeight)??0,l=Math.min(120,o*.25||120);if(s.value>l){g();return}s.value=0},E=()=>{n.value=!1,a=null,i=null,s.value=0,f("hide")};return(t,o)=>(e.openBlock(),e.createBlock(e.unref(H.QDialog),{modelValue:d.value,"onUpdate:modelValue":o[0]||(o[0]=l=>d.value=l),position:"bottom",persistent:t.persistent,class:e.normalizeClass(["bottom-sheet-dialog",{"bottom-sheet-dialog_blur":!t.noBlur}]),style:e.normalizeStyle(V.value),onHide:E,onBeforeShow:o[1]||(o[1]=l=>f("beforeShow"))},{default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"sheetRef",ref:r,class:e.normalizeClass(["bottom-sheet",{"bottom-sheet_dragging":n.value,"bottom-sheet_glass":t.glass,"bottom-sheet_splited":t.splitContent}]),style:e.normalizeStyle(B.value),onPointerdown:k,onPointermove:P,onPointerup:b,onPointercancel:b,onTouchmove:C},[e.createElementVNode("div",N,[o[2]||(o[2]=e.createElementVNode("div",{class:"bottom-sheet__grabber"},null,-1)),e.createElementVNode("div",null,[e.renderSlot(t.$slots,"header",{},void 0,!0)]),t.title?(e.openBlock(),e.createElementBlock("div",w,[e.createTextVNode(e.toDisplayString(t.title),1),e.renderSlot(t.$slots,"title",{},void 0,!0)])):e.createCommentVNode("",!0),e.createVNode(c.CloseButton,{class:"bottom-sheet__close",size:"xl",onClick:g})]),e.createElementVNode("div",$,[t.loading?(e.openBlock(),e.createElementBlock("div",z,[e.createVNode(e.unref(c.QSpinner),{size:"55px",thickness:3,color:"grey-5"})])):e.renderSlot(t.$slots,"default",{key:1},void 0,!0)])],38)]),_:3},8,["modelValue","persistent","class","style"]))}}),Y=c._export_sfc(T,[["__scopeId","data-v-e565b67f"]]);exports.default=Y;
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as N, useModel as R, ref as c, computed as m, openBlock as p, createBlock as X, unref as M, normalizeStyle as S, normalizeClass as P, withCtx as L, createElementVNode as u, renderSlot as f, createElementBlock as V, createTextVNode as Q, toDisplayString as U, createCommentVNode as A, createVNode as k, mergeModels as C } from "vue";
2
- import { Q as F } from "./QDialog-BajIjVX3.js";
3
- import { F as G, b as O, _ as j } from "./index-W3hJ-aLX.js";
2
+ import { Q as F } from "./QDialog-Cy2w4ntF.js";
3
+ import { F as G, b as O, _ as j } from "./index-DFNWQp-Z.js";
4
4
  const q = { class: "bottom-sheet__header" }, J = {
5
5
  key: 0,
6
6
  class: "bottom-sheet__title"
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),l=require("./index-D2z9gMNY.cjs"),h=require("./QMenu-2jfaPSJc.cjs"),q=require("./escape-key-DG0KKsWF.cjs"),k={[l.SIZES.SM]:"3px 9px",[l.SIZES.MD]:"5px 12px",[l.SIZES.LG]:"6px 15px",[l.SIZES.XL]:"9px 20px"},M=l.createComponent({name:"QBtnGroup",props:{unelevated:Boolean,outline:Boolean,flat:Boolean,rounded:Boolean,square:Boolean,push:Boolean,stretch:Boolean,glossy:Boolean,spread:Boolean},setup(e,{slots:r}){const t=n.computed(()=>{const u=["unelevated","outline","flat","rounded","square","push","stretch","glossy"].filter(d=>e[d]===!0).map(d=>`q-btn-group--${d}`).join(" ");return`q-btn-group row no-wrap${u.length!==0?" "+u:""}`+(e.spread===!0?" q-btn-group--spread":" inline")});return()=>n.h("div",{class:t.value},l.hSlot(r.default))}}),I=Object.keys(l.nonRoundBtnProps);function A(e){return I.reduce((r,t)=>{const u=e[t];return u!==void 0&&(r[t]=u),r},{})}const L=l.createComponent({name:"QBtnDropdown",props:{...l.nonRoundBtnProps,...q.useTransitionProps,modelValue:Boolean,split:Boolean,dropdownIcon:String,contentClass:[Array,String,Object],contentStyle:[Array,String,Object],cover:Boolean,persistent:Boolean,noEscDismiss:Boolean,noRouteDismiss:Boolean,autoClose:Boolean,noRefocus:Boolean,noFocus:Boolean,menuAnchor:{type:String,default:"bottom end"},menuSelf:{type:String,default:"top end"},menuOffset:Array,disableMainBtn:Boolean,disableDropdown:Boolean,noIconAnimation:Boolean,toggleAriaLabel:String},emits:["update:modelValue","click","beforeShow","show","beforeHide","hide"],setup(e,{slots:r,emit:t}){const{proxy:u}=n.getCurrentInstance(),d=n.ref(e.modelValue),i=n.ref(null),c=h.useId(),f=n.computed(()=>{const o={"aria-expanded":d.value===!0?"true":"false","aria-haspopup":"true","aria-controls":c.value,"aria-label":e.toggleAriaLabel||u.$q.lang.label[d.value===!0?"collapse":"expand"](e.label)};return(e.disable===!0||e.split===!1&&e.disableMainBtn===!0||e.disableDropdown===!0)&&(o["aria-disabled"]="true"),o}),a=n.computed(()=>"q-btn-dropdown__arrow"+(d.value===!0&&e.noIconAnimation===!1?" rotate-180":"")+(e.split===!1?" q-btn-dropdown__arrow-container":"")),b=n.computed(()=>l.getBtnDesignAttr(e)),m=n.computed(()=>A(e));n.watch(()=>e.modelValue,o=>{var s;(s=i.value)==null||s[o?"show":"hide"]()}),n.watch(()=>e.split,w);function g(o){d.value=!0,t("beforeShow",o)}function p(o){t("show",o),t("update:modelValue",!0)}function S(o){d.value=!1,t("beforeHide",o)}function v(o){t("hide",o),t("update:modelValue",!1)}function y(o){t("click",o)}function C(o){l.stop(o),w(),t("click",o)}function D(o){var s;(s=i.value)==null||s.toggle(o)}function B(o){var s;(s=i.value)==null||s.show(o)}function w(o){var s;(s=i.value)==null||s.hide(o)}return Object.assign(u,{show:B,hide:w,toggle:D}),n.onMounted(()=>{e.modelValue===!0&&B()}),()=>{const o=[n.h(l.QIcon,{class:a.value,name:e.dropdownIcon||u.$q.iconSet.arrow.dropdown})];return e.disableDropdown!==!0&&o.push(n.h(h.QMenu,{ref:i,id:c.value,class:e.contentClass,style:e.contentStyle,cover:e.cover,fit:!0,persistent:e.persistent,noEscDismiss:e.noEscDismiss,noRouteDismiss:e.noRouteDismiss,autoClose:e.autoClose,noFocus:e.noFocus,noRefocus:e.noRefocus,anchor:e.menuAnchor,self:e.menuSelf,offset:e.menuOffset,separateClosePopup:!0,transitionShow:e.transitionShow,transitionHide:e.transitionHide,transitionDuration:e.transitionDuration,onBeforeShow:g,onShow:p,onBeforeHide:S,onHide:v},r.default)),e.split===!1?n.h(l.QBtn,{class:"q-btn-dropdown q-btn-dropdown--simple",...m.value,...f.value,disable:e.disable===!0||e.disableMainBtn===!0,noWrap:!0,round:!1,onClick:y},{default:()=>l.hSlot(r.label,[]).concat(o),loading:r.loading}):n.h(M,{class:"q-btn-dropdown q-btn-dropdown--split no-wrap q-btn-item",rounded:e.rounded,square:e.square,...b.value,glossy:e.glossy,stretch:e.stretch},()=>[n.h(l.QBtn,{class:"q-btn-dropdown--current",...m.value,disable:e.disable===!0||e.disableMainBtn===!0,noWrap:!0,round:!1,onClick:C},{default:r.label,loading:r.loading}),n.h(l.QBtn,{class:"q-btn-dropdown__arrow-container q-anchor--skip",...f.value,...b.value,disable:e.disable===!0||e.disableDropdown===!0,rounded:e.rounded,color:e.color,textColor:e.textColor,dense:e.dense,size:e.size,padding:e.padding,ripple:e.ripple},()=>o)])}}}),R={key:1,class:"dropdown-btn__label"},V=n.defineComponent({__name:"DropdownButton",props:{size:{default:l.SIZES.MD},transparent:{type:Boolean},flat:{type:Boolean},rounded:{type:Boolean},color:{default:l.COLORS.PRIMARY},iconLeft:{},iconMiddle:{},hideDropIcon:{type:Boolean},disabled:{type:Boolean},loading:{type:Boolean},ariaLabel:{},label:{},menuOffset:{},menuAnchor:{},menuSelf:{},menuClass:{},glass:{type:Boolean}},emits:["menuShown","menuHidden"],setup(e,{emit:r}){const t=e,u=r,d=n.ref(!1),i=n.computed(()=>["dropdown-btn",{"dropdown-btn_default":!t.transparent&&!t.flat,"dropdown-btn_trans":t.transparent,"dropdown-btn_flat":t.flat,"dropdown-btn_rounded":t.rounded,"dropdown-btn_icon-left":t.iconLeft,"dropdown-btn_icon-middle":t.iconMiddle,"dropdown-btn_no-drop":t.hideDropIcon},`dropdown-btn_${t.size}`,`dropdown-btn_${t.color}`]),c=()=>{d.value=!0,u("menuShown")},f=()=>{d.value=!1,u("menuHidden")};return(a,b)=>(n.openBlock(),n.createBlock(n.unref(L),{"no-caps":"",unelevated:"",modelValue:d.value,"onUpdate:modelValue":b[0]||(b[0]=m=>d.value=m),class:n.normalizeClass(i.value),padding:n.unref(k)[a.size||n.unref(l.SIZES).MD],loading:a.loading,disable:a.disabled||void 0,"aria-label":a.ariaLabel,"menu-offset":a.menuOffset,"menu-anchor":a.menuAnchor,"menu-self":a.menuSelf,"content-class":["kl-menu dropdown-menu",{"glass-menu":a.glass},a.menuClass],"dropdown-icon":"icon-kl icon-kl-arrow-down",onBeforeShow:c,onBeforeHide:f},{label:n.withCtx(()=>[a.iconLeft||a.iconMiddle?(n.openBlock(),n.createElementBlock("i",{key:0,class:n.normalizeClass(["icon-kl",a.iconLeft?"icon-kl_left":"icon-kl_middle",`icon-kl-${a.iconLeft||a.iconMiddle}`,a.transparent||a.flat?`text-${a.color}`:"text-secondary"])},null,2)):n.createCommentVNode("",!0),a.label?(n.openBlock(),n.createElementBlock("span",R,n.toDisplayString(a.label),1)):n.createCommentVNode("",!0),n.renderSlot(a.$slots,"label",{},void 0,!0)]),default:n.withCtx(()=>[n.renderSlot(a.$slots,"default",{},void 0,!0),n.renderSlot(a.$slots,"options",{hideMenu:f,showMenu:c},void 0,!0)]),_:3},8,["modelValue","class","padding","loading","disable","aria-label","menu-offset","menu-anchor","menu-self","content-class"]))}}),E=l._export_sfc(V,[["__scopeId","data-v-9ad6865d"]]);exports.default=E;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),l=require("./index-BB31xQaa.cjs"),h=require("./QMenu-lZpXWLnn.cjs"),q=require("./escape-key-CRpXNCKN.cjs"),k={[l.SIZES.SM]:"3px 9px",[l.SIZES.MD]:"5px 12px",[l.SIZES.LG]:"6px 15px",[l.SIZES.XL]:"9px 20px"},M=l.createComponent({name:"QBtnGroup",props:{unelevated:Boolean,outline:Boolean,flat:Boolean,rounded:Boolean,square:Boolean,push:Boolean,stretch:Boolean,glossy:Boolean,spread:Boolean},setup(e,{slots:r}){const t=n.computed(()=>{const u=["unelevated","outline","flat","rounded","square","push","stretch","glossy"].filter(d=>e[d]===!0).map(d=>`q-btn-group--${d}`).join(" ");return`q-btn-group row no-wrap${u.length!==0?" "+u:""}`+(e.spread===!0?" q-btn-group--spread":" inline")});return()=>n.h("div",{class:t.value},l.hSlot(r.default))}}),I=Object.keys(l.nonRoundBtnProps);function A(e){return I.reduce((r,t)=>{const u=e[t];return u!==void 0&&(r[t]=u),r},{})}const L=l.createComponent({name:"QBtnDropdown",props:{...l.nonRoundBtnProps,...q.useTransitionProps,modelValue:Boolean,split:Boolean,dropdownIcon:String,contentClass:[Array,String,Object],contentStyle:[Array,String,Object],cover:Boolean,persistent:Boolean,noEscDismiss:Boolean,noRouteDismiss:Boolean,autoClose:Boolean,noRefocus:Boolean,noFocus:Boolean,menuAnchor:{type:String,default:"bottom end"},menuSelf:{type:String,default:"top end"},menuOffset:Array,disableMainBtn:Boolean,disableDropdown:Boolean,noIconAnimation:Boolean,toggleAriaLabel:String},emits:["update:modelValue","click","beforeShow","show","beforeHide","hide"],setup(e,{slots:r,emit:t}){const{proxy:u}=n.getCurrentInstance(),d=n.ref(e.modelValue),i=n.ref(null),c=h.useId(),f=n.computed(()=>{const o={"aria-expanded":d.value===!0?"true":"false","aria-haspopup":"true","aria-controls":c.value,"aria-label":e.toggleAriaLabel||u.$q.lang.label[d.value===!0?"collapse":"expand"](e.label)};return(e.disable===!0||e.split===!1&&e.disableMainBtn===!0||e.disableDropdown===!0)&&(o["aria-disabled"]="true"),o}),a=n.computed(()=>"q-btn-dropdown__arrow"+(d.value===!0&&e.noIconAnimation===!1?" rotate-180":"")+(e.split===!1?" q-btn-dropdown__arrow-container":"")),b=n.computed(()=>l.getBtnDesignAttr(e)),m=n.computed(()=>A(e));n.watch(()=>e.modelValue,o=>{var s;(s=i.value)==null||s[o?"show":"hide"]()}),n.watch(()=>e.split,w);function g(o){d.value=!0,t("beforeShow",o)}function p(o){t("show",o),t("update:modelValue",!0)}function S(o){d.value=!1,t("beforeHide",o)}function v(o){t("hide",o),t("update:modelValue",!1)}function y(o){t("click",o)}function C(o){l.stop(o),w(),t("click",o)}function D(o){var s;(s=i.value)==null||s.toggle(o)}function B(o){var s;(s=i.value)==null||s.show(o)}function w(o){var s;(s=i.value)==null||s.hide(o)}return Object.assign(u,{show:B,hide:w,toggle:D}),n.onMounted(()=>{e.modelValue===!0&&B()}),()=>{const o=[n.h(l.QIcon,{class:a.value,name:e.dropdownIcon||u.$q.iconSet.arrow.dropdown})];return e.disableDropdown!==!0&&o.push(n.h(h.QMenu,{ref:i,id:c.value,class:e.contentClass,style:e.contentStyle,cover:e.cover,fit:!0,persistent:e.persistent,noEscDismiss:e.noEscDismiss,noRouteDismiss:e.noRouteDismiss,autoClose:e.autoClose,noFocus:e.noFocus,noRefocus:e.noRefocus,anchor:e.menuAnchor,self:e.menuSelf,offset:e.menuOffset,separateClosePopup:!0,transitionShow:e.transitionShow,transitionHide:e.transitionHide,transitionDuration:e.transitionDuration,onBeforeShow:g,onShow:p,onBeforeHide:S,onHide:v},r.default)),e.split===!1?n.h(l.QBtn,{class:"q-btn-dropdown q-btn-dropdown--simple",...m.value,...f.value,disable:e.disable===!0||e.disableMainBtn===!0,noWrap:!0,round:!1,onClick:y},{default:()=>l.hSlot(r.label,[]).concat(o),loading:r.loading}):n.h(M,{class:"q-btn-dropdown q-btn-dropdown--split no-wrap q-btn-item",rounded:e.rounded,square:e.square,...b.value,glossy:e.glossy,stretch:e.stretch},()=>[n.h(l.QBtn,{class:"q-btn-dropdown--current",...m.value,disable:e.disable===!0||e.disableMainBtn===!0,noWrap:!0,round:!1,onClick:C},{default:r.label,loading:r.loading}),n.h(l.QBtn,{class:"q-btn-dropdown__arrow-container q-anchor--skip",...f.value,...b.value,disable:e.disable===!0||e.disableDropdown===!0,rounded:e.rounded,color:e.color,textColor:e.textColor,dense:e.dense,size:e.size,padding:e.padding,ripple:e.ripple},()=>o)])}}}),R={key:1,class:"dropdown-btn__label"},V=n.defineComponent({__name:"DropdownButton",props:{size:{default:l.SIZES.MD},transparent:{type:Boolean},flat:{type:Boolean},rounded:{type:Boolean},color:{default:l.COLORS.PRIMARY},iconLeft:{},iconMiddle:{},hideDropIcon:{type:Boolean},disabled:{type:Boolean},loading:{type:Boolean},ariaLabel:{},label:{},menuOffset:{},menuAnchor:{},menuSelf:{},menuClass:{},glass:{type:Boolean}},emits:["menuShown","menuHidden"],setup(e,{emit:r}){const t=e,u=r,d=n.ref(!1),i=n.computed(()=>["dropdown-btn",{"dropdown-btn_default":!t.transparent&&!t.flat,"dropdown-btn_trans":t.transparent,"dropdown-btn_flat":t.flat,"dropdown-btn_rounded":t.rounded,"dropdown-btn_icon-left":t.iconLeft,"dropdown-btn_icon-middle":t.iconMiddle,"dropdown-btn_no-drop":t.hideDropIcon},`dropdown-btn_${t.size}`,`dropdown-btn_${t.color}`]),c=()=>{d.value=!0,u("menuShown")},f=()=>{d.value=!1,u("menuHidden")};return(a,b)=>(n.openBlock(),n.createBlock(n.unref(L),{"no-caps":"",unelevated:"",modelValue:d.value,"onUpdate:modelValue":b[0]||(b[0]=m=>d.value=m),class:n.normalizeClass(i.value),padding:n.unref(k)[a.size||n.unref(l.SIZES).MD],loading:a.loading,disable:a.disabled||void 0,"aria-label":a.ariaLabel,"menu-offset":a.menuOffset,"menu-anchor":a.menuAnchor,"menu-self":a.menuSelf,"content-class":["kl-menu dropdown-menu",{"glass-menu":a.glass},a.menuClass],"dropdown-icon":"icon-kl icon-kl-arrow-down",onBeforeShow:c,onBeforeHide:f},{label:n.withCtx(()=>[a.iconLeft||a.iconMiddle?(n.openBlock(),n.createElementBlock("i",{key:0,class:n.normalizeClass(["icon-kl",a.iconLeft?"icon-kl_left":"icon-kl_middle",`icon-kl-${a.iconLeft||a.iconMiddle}`,a.transparent||a.flat?`text-${a.color}`:"text-secondary"])},null,2)):n.createCommentVNode("",!0),a.label?(n.openBlock(),n.createElementBlock("span",R,n.toDisplayString(a.label),1)):n.createCommentVNode("",!0),n.renderSlot(a.$slots,"label",{},void 0,!0)]),default:n.withCtx(()=>[n.renderSlot(a.$slots,"default",{},void 0,!0),n.renderSlot(a.$slots,"options",{hideMenu:f,showMenu:c},void 0,!0)]),_:3},8,["modelValue","class","padding","loading","disable","aria-label","menu-offset","menu-anchor","menu-self","content-class"]))}}),E=l._export_sfc(V,[["__scopeId","data-v-9ad6865d"]]);exports.default=E;
@@ -1,7 +1,7 @@
1
1
  import { computed as u, h as i, getCurrentInstance as P, ref as S, watch as D, onMounted as z, defineComponent as j, openBlock as g, createBlock as E, unref as h, normalizeClass as C, withCtx as k, renderSlot as p, createElementBlock as q, createCommentVNode as M, toDisplayString as F } from "vue";
2
- import { S as c, c as A, h as L, r as I, t as G, Q as U, v, l as W, C as N, _ as T } from "./index-W3hJ-aLX.js";
3
- import { u as X, Q as Y } from "./QMenu-ByZ-VL_d.js";
4
- import { u as Z } from "./escape-key-BNqVqiWj.js";
2
+ import { S as c, c as A, h as L, r as I, t as G, Q as U, v, l as W, C as N, _ as T } from "./index-DFNWQp-Z.js";
3
+ import { u as X, Q as Y } from "./QMenu-k3AStoLY.js";
4
+ import { u as Z } from "./escape-key-BlsDwJUQ.js";
5
5
  const J = {
6
6
  [c.SM]: "3px 9px",
7
7
  [c.MD]: "5px 12px",
@@ -1,7 +1,7 @@
1
1
  import { onBeforeUnmount as te, getCurrentInstance as ge, ref as F, computed as m, watch as Y, h as w, Transition as j } from "vue";
2
2
  import { c as v, r as I, a as we } from "./focusout-DjvPXP_b.js";
3
- import { y as d, s as ye, G as pe, c as be, h as xe, E as Te } from "./index-W3hJ-aLX.js";
4
- import { m as qe, n as Se, o as ke, b as Ee, u as Ce, c as Be, e as Le, d as Pe, f as _e, i as He, h as Fe, j as Q, a as ze, l as Me } from "./escape-key-BNqVqiWj.js";
3
+ import { y as d, s as ye, G as pe, c as be, h as xe, E as Te } from "./index-DFNWQp-Z.js";
4
+ import { m as qe, n as Se, o as ke, b as Ee, u as Ce, c as Be, e as Le, d as Pe, f as _e, i as He, h as Fe, j as Q, a as ze, l as Me } from "./escape-key-BlsDwJUQ.js";
5
5
  function De(e, t, s) {
6
6
  function n() {
7
7
  }
@@ -1 +1 @@
1
- "use strict";const i=require("vue"),f=require("./focusout-DzWGke-4.cjs"),u=require("./index-D2z9gMNY.cjs"),r=require("./escape-key-DG0KKsWF.cjs");function ce(e,t,a){function s(){}return i.onBeforeUnmount(()=>{e.value===!0&&void 0}),{removeFromHistory:s,addToHistory(){}}}let p=0,H,z,y,O=!1,X,Y,I,h=null;function de(e){fe(e)&&u.stopAndPrevent(e)}function fe(e){if(e.target===document.body||e.target.classList.contains("q-layout__backdrop"))return!0;const t=u.getEventPath(e),a=e.shiftKey&&!e.deltaX,s=!a&&Math.abs(e.deltaX)<=Math.abs(e.deltaY),c=a||s?e.deltaY:e.deltaX;for(let d=0;d<t.length;d++){const n=t[d];if(r.hasScrollbar(n,s))return s?c<0&&n.scrollTop===0?!0:c>0&&n.scrollTop+n.clientHeight===n.scrollHeight:c<0&&n.scrollLeft===0?!0:c>0&&n.scrollLeft+n.clientWidth===n.scrollWidth}return!0}function j(e){e.target===document&&(document.scrollingElement.scrollTop=document.scrollingElement.scrollTop)}function T(e){O!==!0&&(O=!0,requestAnimationFrame(()=>{O=!1;const{height:t}=e.target,{clientHeight:a,scrollTop:s}=document.scrollingElement;(y===void 0||t!==window.innerHeight)&&(y=a-t,document.scrollingElement.scrollTop=s),s>y&&(document.scrollingElement.scrollTop-=Math.ceil((s-y)/8))}))}function Q(e){const t=document.body,a=window.visualViewport!==void 0;if(e==="add"){const{overflowY:s,overflowX:c}=window.getComputedStyle(t);H=r.getHorizontalScrollPosition(window),z=r.getVerticalScrollPosition(window),X=t.style.left,Y=t.style.top,I=window.location.href,t.style.left=`-${H}px`,t.style.top=`-${z}px`,c!=="hidden"&&(c==="scroll"||t.scrollWidth>window.innerWidth)&&t.classList.add("q-body--force-scrollbar-x"),s!=="hidden"&&(s==="scroll"||t.scrollHeight>window.innerHeight)&&t.classList.add("q-body--force-scrollbar-y"),t.classList.add("q-body--prevent-scroll"),document.qScrollPrevented=!0,f.client.is.ios===!0&&(a===!0?(window.scrollTo(0,0),window.visualViewport.addEventListener("resize",T,u.listenOpts.passiveCapture),window.visualViewport.addEventListener("scroll",T,u.listenOpts.passiveCapture),window.scrollTo(0,0)):window.addEventListener("scroll",j,u.listenOpts.passiveCapture))}f.client.is.desktop===!0&&f.client.is.mac===!0&&window[`${e}EventListener`]("wheel",de,u.listenOpts.notPassive),e==="remove"&&(f.client.is.ios===!0&&(a===!0?(window.visualViewport.removeEventListener("resize",T,u.listenOpts.passiveCapture),window.visualViewport.removeEventListener("scroll",T,u.listenOpts.passiveCapture)):window.removeEventListener("scroll",j,u.listenOpts.passiveCapture)),t.classList.remove("q-body--prevent-scroll"),t.classList.remove("q-body--force-scrollbar-x"),t.classList.remove("q-body--force-scrollbar-y"),document.qScrollPrevented=!1,t.style.left=X,t.style.top=Y,window.location.href===I&&window.scrollTo(H,z),y=void 0)}function me(e){let t="add";if(e===!0){if(p++,h!==null){clearTimeout(h),h=null;return}if(p>1)return}else{if(p===0||(p--,p>0))return;if(t="remove",f.client.is.ios===!0&&f.client.is.nativeMobile===!0){h!==null&&clearTimeout(h),h=setTimeout(()=>{Q(t),h=null},100);return}}Q(t)}function ve(){let e;return{preventBodyScroll(t){t!==e&&(e!==void 0||t===!0)&&(e=t,me(t))}}}let S=0;const he={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"},U={standard:["scale","scale"],top:["slide-down","slide-up"],bottom:["slide-up","slide-down"],right:["slide-left","slide-right"],left:["slide-right","slide-left"]},ge=u.createComponent({name:"QDialog",inheritAttrs:!1,props:{...r.useModelToggleProps,...r.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:[...r.useModelToggleEmits,"shake","click","escapeKey"],setup(e,{slots:t,emit:a,attrs:s}){const c=i.getCurrentInstance(),d=i.ref(null),n=i.ref(!1),g=i.ref(!1);let m=null,v=null,b,k;const G=i.computed(()=>e.persistent!==!0&&e.noRouteDismiss!==!0&&e.seamless!==!0),{preventBodyScroll:M}=ve(),{registerTimeout:D}=r.useTimeout(),{registerTick:J,removeTick:R}=r.useTick(),{transitionProps:N,transitionStyle:V}=r.useTransition(e,()=>U[e.position][0],()=>U[e.position][1]),Z=i.computed(()=>V.value+(e.backdropFilter!==void 0?`;backdrop-filter:${e.backdropFilter};-webkit-backdrop-filter:${e.backdropFilter}`:"")),{showPortal:$,hidePortal:A,portalIsAccessible:ee,renderPortal:te}=r.usePortal(c,d,ue,"dialog"),{hide:E}=r.useModelToggle({showing:n,hideOnRouteChange:G,handleShow:ne,handleHide:se,processOnMount:!0});ce(n);const oe=i.computed(()=>`q-dialog__inner flex no-pointer-events q-dialog__inner--${e.maximized===!0?"maximized":"minimized"} q-dialog__inner--${e.position} ${he[e.position]}`+(g.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":"")),q=i.computed(()=>n.value===!0&&e.seamless!==!0),ie=i.computed(()=>e.autoClose===!0?{onClick:re}:{}),le=i.computed(()=>[`q-dialog fullscreen no-pointer-events q-dialog--${q.value===!0?"modal":"seamless"}`,s.class]);i.watch(()=>e.maximized,o=>{n.value===!0&&L(o)}),i.watch(q,o=>{M(o),o===!0?(f.addFocusout(P),r.addEscapeKey(C)):(f.removeFocusout(P),r.removeEscapeKey(C))});function ne(o){var l;v=e.noRefocus===!1&&document.activeElement!==null?document.activeElement:null,L(e.maximized),$(),g.value=!0,e.noFocus!==!0?((l=document.activeElement)==null||l.blur(),J(w)):R(),D(()=>{if(c.proxy.$q.platform.is.ios===!0){if(e.seamless!==!0&&document.activeElement){const{top:x,bottom:_}=document.activeElement.getBoundingClientRect(),{innerHeight:W}=window,F=window.visualViewport!==void 0?window.visualViewport.height:W;x>0&&_>F/2&&(document.scrollingElement.scrollTop=Math.min(document.scrollingElement.scrollHeight-F,_>=W?1/0:Math.ceil(document.scrollingElement.scrollTop+_-F/2))),document.activeElement.scrollIntoView()}k=!0,d.value.click(),k=!1}$(!0),g.value=!1,a("show",o)},e.transitionDuration)}function se(o){R(),K(!0),g.value=!0,A(),v!==null&&((((o==null?void 0:o.type.indexOf("key"))===0?v.closest('[tabindex]:not([tabindex^="-"])'):void 0)||v).focus(),v=null),D(()=>{A(!0),g.value=!1,a("hide",o)},e.transitionDuration)}function w(o){r.addFocusFn(()=>{let l=d.value;if(l!==null){if(o!==void 0){const x=l.querySelector(o);if(x!==null){x.focus({preventScroll:!0});return}}l.contains(document.activeElement)!==!0&&(l=l.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]")||l.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]")||l.querySelector("[autofocus], [data-autofocus]")||l,l.focus({preventScroll:!0}))}})}function B(o){o&&typeof o.focus=="function"?o.focus({preventScroll:!0}):w(),a("shake");const l=d.value;l!==null&&(l.classList.remove("q-animate--scale"),l.classList.add("q-animate--scale"),m!==null&&clearTimeout(m),m=setTimeout(()=>{m=null,d.value!==null&&(l.classList.remove("q-animate--scale"),w())},170))}function C(){e.seamless!==!0&&(e.persistent===!0||e.noEscDismiss===!0?e.maximized!==!0&&e.noShake!==!0&&B():(a("escapeKey"),E()))}function K(o){m!==null&&(clearTimeout(m),m=null),(o===!0||n.value===!0)&&(L(!1),e.seamless!==!0&&(M(!1),f.removeFocusout(P),r.removeEscapeKey(C))),o!==!0&&(v=null)}function L(o){o===!0?b!==!0&&(S<1&&document.body.classList.add("q-body--dialog"),S++,b=!0):b===!0&&(S<2&&document.body.classList.remove("q-body--dialog"),S--,b=!1)}function re(o){k!==!0&&(E(o),a("click",o))}function ae(o){e.persistent!==!0&&e.noBackdropDismiss!==!0?E(o):e.noShake!==!0&&B()}function P(o){e.allowFocusOutside!==!0&&ee.value===!0&&u.childHasFocus(d.value,o.target)!==!0&&w('[tabindex]:not([tabindex="-1"])')}Object.assign(c.proxy,{focus:w,shake:B,__updateRefocusTarget(o){v=o||null}}),i.onBeforeUnmount(K);function ue(){return i.h("div",{role:"dialog","aria-modal":q.value===!0?"true":"false",...s,class:le.value},[i.h(i.Transition,{name:"q-transition--fade",appear:!0},()=>q.value===!0?i.h("div",{class:"q-dialog__backdrop fixed-full",style:Z.value,"aria-hidden":"true",tabindex:-1,onClick:ae}):null),i.h(i.Transition,N.value,()=>n.value===!0?i.h("div",{ref:d,class:oe.value,style:V.value,tabindex:-1,...ie.value},u.hSlot(t.default)):null)])}return te}});exports.QDialog=ge;
1
+ "use strict";const i=require("vue"),f=require("./focusout-DzWGke-4.cjs"),u=require("./index-BB31xQaa.cjs"),r=require("./escape-key-CRpXNCKN.cjs");function ce(e,t,a){function s(){}return i.onBeforeUnmount(()=>{e.value===!0&&void 0}),{removeFromHistory:s,addToHistory(){}}}let p=0,H,z,y,O=!1,X,Y,I,h=null;function de(e){fe(e)&&u.stopAndPrevent(e)}function fe(e){if(e.target===document.body||e.target.classList.contains("q-layout__backdrop"))return!0;const t=u.getEventPath(e),a=e.shiftKey&&!e.deltaX,s=!a&&Math.abs(e.deltaX)<=Math.abs(e.deltaY),c=a||s?e.deltaY:e.deltaX;for(let d=0;d<t.length;d++){const n=t[d];if(r.hasScrollbar(n,s))return s?c<0&&n.scrollTop===0?!0:c>0&&n.scrollTop+n.clientHeight===n.scrollHeight:c<0&&n.scrollLeft===0?!0:c>0&&n.scrollLeft+n.clientWidth===n.scrollWidth}return!0}function j(e){e.target===document&&(document.scrollingElement.scrollTop=document.scrollingElement.scrollTop)}function T(e){O!==!0&&(O=!0,requestAnimationFrame(()=>{O=!1;const{height:t}=e.target,{clientHeight:a,scrollTop:s}=document.scrollingElement;(y===void 0||t!==window.innerHeight)&&(y=a-t,document.scrollingElement.scrollTop=s),s>y&&(document.scrollingElement.scrollTop-=Math.ceil((s-y)/8))}))}function Q(e){const t=document.body,a=window.visualViewport!==void 0;if(e==="add"){const{overflowY:s,overflowX:c}=window.getComputedStyle(t);H=r.getHorizontalScrollPosition(window),z=r.getVerticalScrollPosition(window),X=t.style.left,Y=t.style.top,I=window.location.href,t.style.left=`-${H}px`,t.style.top=`-${z}px`,c!=="hidden"&&(c==="scroll"||t.scrollWidth>window.innerWidth)&&t.classList.add("q-body--force-scrollbar-x"),s!=="hidden"&&(s==="scroll"||t.scrollHeight>window.innerHeight)&&t.classList.add("q-body--force-scrollbar-y"),t.classList.add("q-body--prevent-scroll"),document.qScrollPrevented=!0,f.client.is.ios===!0&&(a===!0?(window.scrollTo(0,0),window.visualViewport.addEventListener("resize",T,u.listenOpts.passiveCapture),window.visualViewport.addEventListener("scroll",T,u.listenOpts.passiveCapture),window.scrollTo(0,0)):window.addEventListener("scroll",j,u.listenOpts.passiveCapture))}f.client.is.desktop===!0&&f.client.is.mac===!0&&window[`${e}EventListener`]("wheel",de,u.listenOpts.notPassive),e==="remove"&&(f.client.is.ios===!0&&(a===!0?(window.visualViewport.removeEventListener("resize",T,u.listenOpts.passiveCapture),window.visualViewport.removeEventListener("scroll",T,u.listenOpts.passiveCapture)):window.removeEventListener("scroll",j,u.listenOpts.passiveCapture)),t.classList.remove("q-body--prevent-scroll"),t.classList.remove("q-body--force-scrollbar-x"),t.classList.remove("q-body--force-scrollbar-y"),document.qScrollPrevented=!1,t.style.left=X,t.style.top=Y,window.location.href===I&&window.scrollTo(H,z),y=void 0)}function me(e){let t="add";if(e===!0){if(p++,h!==null){clearTimeout(h),h=null;return}if(p>1)return}else{if(p===0||(p--,p>0))return;if(t="remove",f.client.is.ios===!0&&f.client.is.nativeMobile===!0){h!==null&&clearTimeout(h),h=setTimeout(()=>{Q(t),h=null},100);return}}Q(t)}function ve(){let e;return{preventBodyScroll(t){t!==e&&(e!==void 0||t===!0)&&(e=t,me(t))}}}let S=0;const he={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"},U={standard:["scale","scale"],top:["slide-down","slide-up"],bottom:["slide-up","slide-down"],right:["slide-left","slide-right"],left:["slide-right","slide-left"]},ge=u.createComponent({name:"QDialog",inheritAttrs:!1,props:{...r.useModelToggleProps,...r.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:[...r.useModelToggleEmits,"shake","click","escapeKey"],setup(e,{slots:t,emit:a,attrs:s}){const c=i.getCurrentInstance(),d=i.ref(null),n=i.ref(!1),g=i.ref(!1);let m=null,v=null,b,k;const G=i.computed(()=>e.persistent!==!0&&e.noRouteDismiss!==!0&&e.seamless!==!0),{preventBodyScroll:M}=ve(),{registerTimeout:D}=r.useTimeout(),{registerTick:J,removeTick:R}=r.useTick(),{transitionProps:N,transitionStyle:V}=r.useTransition(e,()=>U[e.position][0],()=>U[e.position][1]),Z=i.computed(()=>V.value+(e.backdropFilter!==void 0?`;backdrop-filter:${e.backdropFilter};-webkit-backdrop-filter:${e.backdropFilter}`:"")),{showPortal:$,hidePortal:A,portalIsAccessible:ee,renderPortal:te}=r.usePortal(c,d,ue,"dialog"),{hide:E}=r.useModelToggle({showing:n,hideOnRouteChange:G,handleShow:ne,handleHide:se,processOnMount:!0});ce(n);const oe=i.computed(()=>`q-dialog__inner flex no-pointer-events q-dialog__inner--${e.maximized===!0?"maximized":"minimized"} q-dialog__inner--${e.position} ${he[e.position]}`+(g.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":"")),q=i.computed(()=>n.value===!0&&e.seamless!==!0),ie=i.computed(()=>e.autoClose===!0?{onClick:re}:{}),le=i.computed(()=>[`q-dialog fullscreen no-pointer-events q-dialog--${q.value===!0?"modal":"seamless"}`,s.class]);i.watch(()=>e.maximized,o=>{n.value===!0&&L(o)}),i.watch(q,o=>{M(o),o===!0?(f.addFocusout(P),r.addEscapeKey(C)):(f.removeFocusout(P),r.removeEscapeKey(C))});function ne(o){var l;v=e.noRefocus===!1&&document.activeElement!==null?document.activeElement:null,L(e.maximized),$(),g.value=!0,e.noFocus!==!0?((l=document.activeElement)==null||l.blur(),J(w)):R(),D(()=>{if(c.proxy.$q.platform.is.ios===!0){if(e.seamless!==!0&&document.activeElement){const{top:x,bottom:_}=document.activeElement.getBoundingClientRect(),{innerHeight:W}=window,F=window.visualViewport!==void 0?window.visualViewport.height:W;x>0&&_>F/2&&(document.scrollingElement.scrollTop=Math.min(document.scrollingElement.scrollHeight-F,_>=W?1/0:Math.ceil(document.scrollingElement.scrollTop+_-F/2))),document.activeElement.scrollIntoView()}k=!0,d.value.click(),k=!1}$(!0),g.value=!1,a("show",o)},e.transitionDuration)}function se(o){R(),K(!0),g.value=!0,A(),v!==null&&((((o==null?void 0:o.type.indexOf("key"))===0?v.closest('[tabindex]:not([tabindex^="-"])'):void 0)||v).focus(),v=null),D(()=>{A(!0),g.value=!1,a("hide",o)},e.transitionDuration)}function w(o){r.addFocusFn(()=>{let l=d.value;if(l!==null){if(o!==void 0){const x=l.querySelector(o);if(x!==null){x.focus({preventScroll:!0});return}}l.contains(document.activeElement)!==!0&&(l=l.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]")||l.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]")||l.querySelector("[autofocus], [data-autofocus]")||l,l.focus({preventScroll:!0}))}})}function B(o){o&&typeof o.focus=="function"?o.focus({preventScroll:!0}):w(),a("shake");const l=d.value;l!==null&&(l.classList.remove("q-animate--scale"),l.classList.add("q-animate--scale"),m!==null&&clearTimeout(m),m=setTimeout(()=>{m=null,d.value!==null&&(l.classList.remove("q-animate--scale"),w())},170))}function C(){e.seamless!==!0&&(e.persistent===!0||e.noEscDismiss===!0?e.maximized!==!0&&e.noShake!==!0&&B():(a("escapeKey"),E()))}function K(o){m!==null&&(clearTimeout(m),m=null),(o===!0||n.value===!0)&&(L(!1),e.seamless!==!0&&(M(!1),f.removeFocusout(P),r.removeEscapeKey(C))),o!==!0&&(v=null)}function L(o){o===!0?b!==!0&&(S<1&&document.body.classList.add("q-body--dialog"),S++,b=!0):b===!0&&(S<2&&document.body.classList.remove("q-body--dialog"),S--,b=!1)}function re(o){k!==!0&&(E(o),a("click",o))}function ae(o){e.persistent!==!0&&e.noBackdropDismiss!==!0?E(o):e.noShake!==!0&&B()}function P(o){e.allowFocusOutside!==!0&&ee.value===!0&&u.childHasFocus(d.value,o.target)!==!0&&w('[tabindex]:not([tabindex="-1"])')}Object.assign(c.proxy,{focus:w,shake:B,__updateRefocusTarget(o){v=o||null}}),i.onBeforeUnmount(K);function ue(){return i.h("div",{role:"dialog","aria-modal":q.value===!0?"true":"false",...s,class:le.value},[i.h(i.Transition,{name:"q-transition--fade",appear:!0},()=>q.value===!0?i.h("div",{class:"q-dialog__backdrop fixed-full",style:Z.value,"aria-hidden":"true",tabindex:-1,onClick:ae}):null),i.h(i.Transition,N.value,()=>n.value===!0?i.h("div",{ref:d,class:oe.value,style:V.value,tabindex:-1,...ie.value},u.hSlot(t.default)):null)])}return te}});exports.QDialog=ge;
@@ -1,7 +1,7 @@
1
1
  import { ref as S, onMounted as fe, watch as C, computed as T, getCurrentInstance as he, nextTick as Ce, onBeforeUnmount as Q, h as J, Transition as He } from "vue";
2
2
  import { i as ke, P as Me, c as Pe, r as We, a as Be } from "./focusout-DjvPXP_b.js";
3
- import { p as ee, w as te, m as qe, x as Ae, y as j, z as ne, c as Re, u as Le, a as $e, B as ze, D as Fe, h as De, E as Ke, s as Ie } from "./index-W3hJ-aLX.js";
4
- import { g as je, b as Oe, s as _e, u as Qe, c as Ue, d as Ne, e as Ve, f as Xe, h as Ye, i as Ze, j as oe, k as Ge, a as Je, l as et } from "./escape-key-BNqVqiWj.js";
3
+ import { p as ee, w as te, m as qe, x as Ae, y as j, z as ne, c as Re, u as Le, a as $e, B as ze, D as Fe, h as De, E as Ke, s as Ie } from "./index-DFNWQp-Z.js";
4
+ import { g as je, b as Oe, s as _e, u as Qe, c as Ue, d as Ne, e as Ve, f as Xe, h as Ye, i as Ze, j as oe, k as Ge, a as Je, l as et } from "./escape-key-BlsDwJUQ.js";
5
5
  let K, q = 0;
6
6
  const v = new Array(256);
7
7
  for (let e = 0; e < 256; e++)
@@ -1 +1 @@
1
- "use strict";const a=require("vue"),W=require("./focusout-DzWGke-4.cjs"),v=require("./index-D2z9gMNY.cjs"),y=require("./escape-key-DG0KKsWF.cjs");let I,A=0;const x=new Array(256);for(let e=0;e<256;e++)x[e]=(e+256).toString(16).substring(1);const xe=(()=>{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 t=>{const o=new Uint8Array(t);return e.getRandomValues(o),o}}return t=>{const o=[];for(let n=t;n>0;n--)o.push(Math.floor(Math.random()*256));return o}})(),G=4096;function _(){(I===void 0||A+16>G)&&(A=0,I=xe(G));const e=Array.prototype.slice.call(I,A,A+=16);return e[6]=e[6]&15|64,e[8]=e[8]&63|128,x[e[0]]+x[e[1]]+x[e[2]]+x[e[3]]+"-"+x[e[4]]+x[e[5]]+"-"+x[e[6]]+x[e[7]]+"-"+x[e[8]]+x[e[9]]+"-"+x[e[10]]+x[e[11]]+x[e[12]]+x[e[13]]+x[e[14]]+x[e[15]]}function ye(e){return e??null}function J(e,t){return e??(t===!0?`f_${_()}`:null)}function pe({getValue:e,required:t=!0}={}){if(W.isRuntimeSsrPreHydration.value===!0){const o=e!==void 0?a.ref(ye(e())):a.ref(null);return t===!0&&o.value===null&&a.onMounted(()=>{o.value=`f_${_()}`}),e!==void 0&&a.watch(e,n=>{o.value=J(n,t)}),o}return e!==void 0?a.computed(()=>J(e(),t)):a.ref(`f_${_()}`)}function be(){if(window.getSelection!==void 0){const e=window.getSelection();e.empty!==void 0?e.empty():e.removeAllRanges!==void 0&&(e.removeAllRanges(),W.Platform.is.mobile!==!0&&e.addRange(document.createRange()))}else document.selection!==void 0&&document.selection.empty()}const we={target:{type:[Boolean,String,Element],default:!0},noParentEvent:Boolean},Ee={...we,contextMenu:Boolean};function Te({showing:e,avoidEmit:t,configureAnchorEl:o}){const{props:n,proxy:i,emit:d}=a.getCurrentInstance(),l=a.ref(null);let h=null;function m(u){return l.value===null?!1:u===void 0||u.touches===void 0||u.touches.length<=1}const c={};o===void 0&&(Object.assign(c,{hide(u){i.hide(u)},toggle(u){i.toggle(u),u.qAnchorHandled=!0},toggleKey(u){v.isKeyCode(u,13)===!0&&c.toggle(u)},contextClick(u){i.hide(u),v.prevent(u),a.nextTick(()=>{i.show(u),u.qAnchorHandled=!0})},prevent:v.prevent,mobileTouch(u){if(c.mobileCleanup(u),m(u)!==!0)return;i.hide(u),l.value.classList.add("non-selectable");const s=u.target;v.addEvt(c,"anchor",[[s,"touchmove","mobileCleanup","passive"],[s,"touchend","mobileCleanup","passive"],[s,"touchcancel","mobileCleanup","passive"],[l.value,"contextmenu","prevent","notPassive"]]),h=setTimeout(()=>{h=null,i.show(u),u.qAnchorHandled=!0},300)},mobileCleanup(u){l.value.classList.remove("non-selectable"),h!==null&&(clearTimeout(h),h=null),e.value===!0&&u!==void 0&&be()}}),o=function(u=n.contextMenu){if(n.noParentEvent===!0||l.value===null)return;let s;u===!0?i.$q.platform.is.mobile===!0?s=[[l.value,"touchstart","mobileTouch","passive"]]:s=[[l.value,"mousedown","hide","passive"],[l.value,"contextmenu","contextClick","notPassive"]]:s=[[l.value,"click","toggle","passive"],[l.value,"keyup","toggleKey","passive"]],v.addEvt(c,"anchor",s)});function f(){v.cleanEvt(c,"anchor")}function b(u){for(l.value=u;l.value.classList.contains("q-anchor--skip");)l.value=l.value.parentNode;o()}function w(){if(n.target===!1||n.target===""||i.$el.parentNode===null)l.value=null;else if(n.target===!0)b(i.$el.parentNode);else{let u=n.target;if(typeof n.target=="string")try{u=document.querySelector(n.target)}catch{u=void 0}u!=null?(l.value=u.$el||u,o()):(l.value=null,console.error(`Anchor: target "${n.target}" not found`))}}return a.watch(()=>n.contextMenu,u=>{l.value!==null&&(f(),o(u))}),a.watch(()=>n.target,()=>{l.value!==null&&f(),w()}),a.watch(()=>n.noParentEvent,u=>{l.value!==null&&(u===!0?f():o())}),a.onMounted(()=>{w(),t!==!0&&n.modelValue===!0&&l.value===null&&d("update:modelValue",!1)}),a.onBeforeUnmount(()=>{h!==null&&clearTimeout(h),f()}),{anchorEl:l,canShow:m,anchorEvents:c}}function Se(e,t){const o=a.ref(null);let n;function i(h,m){const c=`${m!==void 0?"add":"remove"}EventListener`,f=m!==void 0?m:n;h!==window&&h[c]("scroll",f,v.listenOpts.passive),window[c]("scroll",f,v.listenOpts.passive),n=m}function d(){o.value!==null&&(i(o.value),o.value=null)}const l=a.watch(()=>e.noParentEvent,()=>{o.value!==null&&(d(),t())});return a.onBeforeUnmount(l),{localScrollTarget:o,unconfigureScrollTarget:d,changeScrollEvent:i}}const{notPassiveCapture:L}=v.listenOpts,H=[];function R(e){const t=e.target;if(t===void 0||t.nodeType===8||t.classList.contains("no-pointer-events")===!0)return;let o=v.portalProxyList.length-1;for(;o>=0;){const n=v.portalProxyList[o].$;if(n.type.name==="QTooltip"){o--;continue}if(n.type.name!=="QDialog")break;if(n.props.seamless!==!0)return;o--}for(let n=H.length-1;n>=0;n--){const i=H[n];if((i.anchorEl.value===null||i.anchorEl.value.contains(t)===!1)&&(t===document.body||i.innerRef.value!==null&&i.innerRef.value.contains(t)===!1))e.qClickOutside=!0,i.onClickOutside(e);else return}}function Ce(e){H.push(e),H.length===1&&(document.addEventListener("mousedown",R,L),document.addEventListener("touchstart",R,L))}function ee(e){const t=H.findIndex(o=>o===e);t!==-1&&(H.splice(t,1),H.length===0&&(document.removeEventListener("mousedown",R,L),document.removeEventListener("touchstart",R,L)))}let te,ne;function oe(e){const t=e.split(" ");return t.length!==2?!1:["top","center","bottom"].includes(t[0])!==!0?(console.error("Anchor/Self position must start with one of top/center/bottom"),!1):["left","middle","right","start","end"].includes(t[1])!==!0?(console.error("Anchor/Self position must end with one of left/middle/right/start/end"),!1):!0}function He(e){return e?!(e.length!==2||typeof e[0]!="number"||typeof e[1]!="number"):!0}const j={"start#ltr":"left","start#rtl":"right","end#ltr":"right","end#rtl":"left"};["left","middle","right"].forEach(e=>{j[`${e}#ltr`]=e,j[`${e}#rtl`]=e});function ie(e,t){const o=e.split(" ");return{vertical:o[0],horizontal:j[`${o[1]}#${t===!0?"rtl":"ltr"}`]}}function Me(e,t){let{top:o,left:n,right:i,bottom:d,width:l,height:h}=e.getBoundingClientRect();return t!==void 0&&(o-=t[1],n-=t[0],d+=t[1],i+=t[0],l+=t[0],h+=t[1]),{top:o,bottom:d,height:h,left:n,right:i,width:l,middle:n+(i-n)/2,center:o+(d-o)/2}}function ke(e,t,o){let{top:n,left:i}=e.getBoundingClientRect();return n+=t.top,i+=t.left,o!==void 0&&(n+=o[1],i+=o[0]),{top:n,bottom:n+1,height:1,left:i,right:i+1,width:1,middle:i,center:n}}function Pe(e,t){return{top:0,center:t/2,bottom:t,left:0,middle:e/2,right:e}}function le(e,t,o,n){return{top:e[o.vertical]-t[n.vertical],left:e[o.horizontal]-t[n.horizontal]}}function ue(e,t=0){if(e.targetEl===null||e.anchorEl===null||t>5)return;if(e.targetEl.offsetHeight===0||e.targetEl.offsetWidth===0){setTimeout(()=>{ue(e,t+1)},10);return}const{targetEl:o,offset:n,anchorEl:i,anchorOrigin:d,selfOrigin:l,absoluteOffset:h,fit:m,cover:c,maxHeight:f,maxWidth:b}=e;if(W.client.is.ios===!0&&window.visualViewport!==void 0){const M=document.body.style,{offsetLeft:E,offsetTop:T}=window.visualViewport;E!==te&&(M.setProperty("--q-pe-left",E+"px"),te=E),T!==ne&&(M.setProperty("--q-pe-top",T+"px"),ne=T)}const{scrollLeft:w,scrollTop:u}=o,s=h===void 0?Me(i,c===!0?[0,0]:n):ke(i,h,n);Object.assign(o.style,{top:0,left:0,minWidth:null,minHeight:null,maxWidth:b,maxHeight:f,visibility:"visible"});const{offsetWidth:B,offsetHeight:k}=o,{elWidth:q,elHeight:$}=m===!0||c===!0?{elWidth:Math.max(s.width,B),elHeight:c===!0?Math.max(s.height,k):k}:{elWidth:B,elHeight:k};let p={maxWidth:b,maxHeight:f};(m===!0||c===!0)&&(p.minWidth=s.width+"px",c===!0&&(p.minHeight=s.height+"px")),Object.assign(o.style,p);const S=Pe(q,$);let g=le(s,S,d,l);if(h===void 0||n===void 0)O(g,s,S,d,l);else{const{top:M,left:E}=g;O(g,s,S,d,l);let T=!1;if(g.top!==M){T=!0;const C=2*n[1];s.center=s.top-=C,s.bottom-=C+2}if(g.left!==E){T=!0;const C=2*n[0];s.middle=s.left-=C,s.right-=C+2}T===!0&&(g=le(s,S,d,l),O(g,s,S,d,l))}p={top:g.top+"px",left:g.left+"px"},g.maxHeight!==void 0&&(p.maxHeight=g.maxHeight+"px",s.height>g.maxHeight&&(p.minHeight=p.maxHeight)),g.maxWidth!==void 0&&(p.maxWidth=g.maxWidth+"px",s.width>g.maxWidth&&(p.minWidth=p.maxWidth)),Object.assign(o.style,p),o.scrollTop!==u&&(o.scrollTop=u),o.scrollLeft!==w&&(o.scrollLeft=w)}function O(e,t,o,n,i){const d=o.bottom,l=o.right,h=y.getScrollbarWidth(),m=window.innerHeight-h,c=document.body.clientWidth;if(e.top<0||e.top+d>m)if(i.vertical==="center")e.top=t[n.vertical]>m/2?Math.max(0,m-d):0,e.maxHeight=Math.min(d,m);else if(t[n.vertical]>m/2){const f=Math.min(m,n.vertical==="center"?t.center:n.vertical===i.vertical?t.bottom:t.top);e.maxHeight=Math.min(d,f),e.top=Math.max(0,f-d)}else e.top=Math.max(0,n.vertical==="center"?t.center:n.vertical===i.vertical?t.top:t.bottom),e.maxHeight=Math.min(d,m-e.top);if(e.left<0||e.left+l>c)if(e.maxWidth=Math.min(l,c),i.horizontal==="middle")e.left=t[n.horizontal]>c/2?Math.max(0,c-l):0;else if(t[n.horizontal]>c/2){const f=Math.min(c,n.horizontal==="middle"?t.middle:n.horizontal===i.horizontal?t.right:t.left);e.maxWidth=Math.min(l,f),e.left=Math.max(0,f-e.maxWidth)}else e.left=Math.max(0,n.horizontal==="middle"?t.middle:n.horizontal===i.horizontal?t.left:t.right),e.maxWidth=Math.min(l,c-e.left)}const We=v.createComponent({name:"QMenu",inheritAttrs:!1,props:{...Ee,...y.useModelToggleProps,...v.useDarkProps,...y.useTransitionProps,persistent:Boolean,autoClose:Boolean,separateClosePopup:Boolean,noEscDismiss:Boolean,noRouteDismiss:Boolean,noRefocus:Boolean,noFocus:Boolean,fit:Boolean,cover:Boolean,square:Boolean,anchor:{type:String,validator:oe},self:{type:String,validator:oe},offset:{type:Array,validator:He},scrollTarget:y.scrollTargetProp,touchPosition:Boolean,maxHeight:{type:String,default:null},maxWidth:{type:String,default:null}},emits:[...y.useModelToggleEmits,"click","escapeKey"],setup(e,{slots:t,emit:o,attrs:n}){let i=null,d,l,h;const m=a.getCurrentInstance(),{proxy:c}=m,{$q:f}=c,b=a.ref(null),w=a.ref(!1),u=a.computed(()=>e.persistent!==!0&&e.noRouteDismiss!==!0),s=v.useDark(e,f),{registerTick:B,removeTick:k}=y.useTick(),{registerTimeout:q}=y.useTimeout(),{transitionProps:$,transitionStyle:p}=y.useTransition(e),{localScrollTarget:S,changeScrollEvent:g,unconfigureScrollTarget:M}=Se(e,Y),{anchorEl:E,canShow:T}=Te({showing:w}),{hide:C}=y.useModelToggle({showing:w,canShow:T,handleShow:de,handleHide:fe,hideOnRouteChange:u,processOnMount:!0}),{showPortal:Q,hidePortal:U,renderPortal:re}=y.usePortal(m,b,me,"menu"),F={anchorEl:E,innerRef:b,onClickOutside(r){if(e.persistent!==!0&&w.value===!0)return C(r),(r.type==="touchstart"||r.target.classList.contains("q-dialog__backdrop"))&&v.stopAndPrevent(r),!0}},N=a.computed(()=>ie(e.anchor||(e.cover===!0?"center middle":"bottom start"),f.lang.rtl)),ae=a.computed(()=>e.cover===!0?N.value:ie(e.self||"top start",f.lang.rtl)),se=a.computed(()=>(e.square===!0?" q-menu--square":"")+(s.value===!0?" q-menu--dark q-dark":"")),ce=a.computed(()=>e.autoClose===!0?{onClick:he}:{}),V=a.computed(()=>w.value===!0&&e.persistent!==!0);a.watch(V,r=>{r===!0?(y.addEscapeKey(D),Ce(F)):(y.removeEscapeKey(D),ee(F))});function z(){y.addFocusFn(()=>{let r=b.value;r&&r.contains(document.activeElement)!==!0&&(r=r.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]")||r.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]")||r.querySelector("[autofocus], [data-autofocus]")||r,r.focus({preventScroll:!0}))})}function de(r){if(i=e.noRefocus===!1?document.activeElement:null,W.addFocusout(Z),Q(),Y(),d=void 0,r!==void 0&&(e.touchPosition||e.contextMenu)){const K=v.position(r);if(K.left!==void 0){const{top:ve,left:ge}=E.value.getBoundingClientRect();d={left:K.left-ge,top:K.top-ve}}}l===void 0&&(l=a.watch(()=>f.screen.width+"|"+f.screen.height+"|"+e.self+"|"+e.anchor+"|"+f.lang.rtl,P)),e.noFocus!==!0&&document.activeElement.blur(),B(()=>{P(),e.noFocus!==!0&&z()}),q(()=>{f.platform.is.ios===!0&&(h=e.autoClose,b.value.click()),P(),Q(!0),o("show",r)},e.transitionDuration)}function fe(r){k(),U(),X(!0),i!==null&&(r===void 0||r.qClickOutside!==!0)&&((((r==null?void 0:r.type.indexOf("key"))===0?i.closest('[tabindex]:not([tabindex^="-"])'):void 0)||i).focus(),i=null),q(()=>{U(!0),o("hide",r)},e.transitionDuration)}function X(r){d=void 0,l!==void 0&&(l(),l=void 0),(r===!0||w.value===!0)&&(W.removeFocusout(Z),M(),ee(F),y.removeEscapeKey(D)),r!==!0&&(i=null)}function Y(){(E.value!==null||e.scrollTarget!==void 0)&&(S.value=y.getScrollTarget(E.value,e.scrollTarget),g(S.value,P))}function he(r){h!==!0?(v.closePortalMenus(c,r),o("click",r)):h=!1}function Z(r){V.value===!0&&e.noFocus!==!0&&v.childHasFocus(b.value,r.target)!==!0&&z()}function D(r){e.noEscDismiss!==!0&&(o("escapeKey"),C(r))}function P(){ue({targetEl:b.value,offset:e.offset,anchorEl:E.value,anchorOrigin:N.value,selfOrigin:ae.value,absoluteOffset:d,fit:e.fit,cover:e.cover,maxHeight:e.maxHeight,maxWidth:e.maxWidth})}function me(){return a.h(a.Transition,$.value,()=>w.value===!0?a.h("div",{role:"menu",...n,ref:b,tabindex:-1,class:["q-menu q-position-engine scroll"+se.value,n.class],style:[n.style,p.value],...ce.value},v.hSlot(t.default)):null)}return a.onBeforeUnmount(X),Object.assign(c,{focus:z,updatePosition:P}),re}});exports.QMenu=We;exports.useId=pe;
1
+ "use strict";const a=require("vue"),W=require("./focusout-DzWGke-4.cjs"),v=require("./index-BB31xQaa.cjs"),y=require("./escape-key-CRpXNCKN.cjs");let I,A=0;const x=new Array(256);for(let e=0;e<256;e++)x[e]=(e+256).toString(16).substring(1);const xe=(()=>{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 t=>{const o=new Uint8Array(t);return e.getRandomValues(o),o}}return t=>{const o=[];for(let n=t;n>0;n--)o.push(Math.floor(Math.random()*256));return o}})(),G=4096;function _(){(I===void 0||A+16>G)&&(A=0,I=xe(G));const e=Array.prototype.slice.call(I,A,A+=16);return e[6]=e[6]&15|64,e[8]=e[8]&63|128,x[e[0]]+x[e[1]]+x[e[2]]+x[e[3]]+"-"+x[e[4]]+x[e[5]]+"-"+x[e[6]]+x[e[7]]+"-"+x[e[8]]+x[e[9]]+"-"+x[e[10]]+x[e[11]]+x[e[12]]+x[e[13]]+x[e[14]]+x[e[15]]}function ye(e){return e??null}function J(e,t){return e??(t===!0?`f_${_()}`:null)}function pe({getValue:e,required:t=!0}={}){if(W.isRuntimeSsrPreHydration.value===!0){const o=e!==void 0?a.ref(ye(e())):a.ref(null);return t===!0&&o.value===null&&a.onMounted(()=>{o.value=`f_${_()}`}),e!==void 0&&a.watch(e,n=>{o.value=J(n,t)}),o}return e!==void 0?a.computed(()=>J(e(),t)):a.ref(`f_${_()}`)}function be(){if(window.getSelection!==void 0){const e=window.getSelection();e.empty!==void 0?e.empty():e.removeAllRanges!==void 0&&(e.removeAllRanges(),W.Platform.is.mobile!==!0&&e.addRange(document.createRange()))}else document.selection!==void 0&&document.selection.empty()}const we={target:{type:[Boolean,String,Element],default:!0},noParentEvent:Boolean},Ee={...we,contextMenu:Boolean};function Te({showing:e,avoidEmit:t,configureAnchorEl:o}){const{props:n,proxy:i,emit:d}=a.getCurrentInstance(),l=a.ref(null);let h=null;function m(u){return l.value===null?!1:u===void 0||u.touches===void 0||u.touches.length<=1}const c={};o===void 0&&(Object.assign(c,{hide(u){i.hide(u)},toggle(u){i.toggle(u),u.qAnchorHandled=!0},toggleKey(u){v.isKeyCode(u,13)===!0&&c.toggle(u)},contextClick(u){i.hide(u),v.prevent(u),a.nextTick(()=>{i.show(u),u.qAnchorHandled=!0})},prevent:v.prevent,mobileTouch(u){if(c.mobileCleanup(u),m(u)!==!0)return;i.hide(u),l.value.classList.add("non-selectable");const s=u.target;v.addEvt(c,"anchor",[[s,"touchmove","mobileCleanup","passive"],[s,"touchend","mobileCleanup","passive"],[s,"touchcancel","mobileCleanup","passive"],[l.value,"contextmenu","prevent","notPassive"]]),h=setTimeout(()=>{h=null,i.show(u),u.qAnchorHandled=!0},300)},mobileCleanup(u){l.value.classList.remove("non-selectable"),h!==null&&(clearTimeout(h),h=null),e.value===!0&&u!==void 0&&be()}}),o=function(u=n.contextMenu){if(n.noParentEvent===!0||l.value===null)return;let s;u===!0?i.$q.platform.is.mobile===!0?s=[[l.value,"touchstart","mobileTouch","passive"]]:s=[[l.value,"mousedown","hide","passive"],[l.value,"contextmenu","contextClick","notPassive"]]:s=[[l.value,"click","toggle","passive"],[l.value,"keyup","toggleKey","passive"]],v.addEvt(c,"anchor",s)});function f(){v.cleanEvt(c,"anchor")}function b(u){for(l.value=u;l.value.classList.contains("q-anchor--skip");)l.value=l.value.parentNode;o()}function w(){if(n.target===!1||n.target===""||i.$el.parentNode===null)l.value=null;else if(n.target===!0)b(i.$el.parentNode);else{let u=n.target;if(typeof n.target=="string")try{u=document.querySelector(n.target)}catch{u=void 0}u!=null?(l.value=u.$el||u,o()):(l.value=null,console.error(`Anchor: target "${n.target}" not found`))}}return a.watch(()=>n.contextMenu,u=>{l.value!==null&&(f(),o(u))}),a.watch(()=>n.target,()=>{l.value!==null&&f(),w()}),a.watch(()=>n.noParentEvent,u=>{l.value!==null&&(u===!0?f():o())}),a.onMounted(()=>{w(),t!==!0&&n.modelValue===!0&&l.value===null&&d("update:modelValue",!1)}),a.onBeforeUnmount(()=>{h!==null&&clearTimeout(h),f()}),{anchorEl:l,canShow:m,anchorEvents:c}}function Se(e,t){const o=a.ref(null);let n;function i(h,m){const c=`${m!==void 0?"add":"remove"}EventListener`,f=m!==void 0?m:n;h!==window&&h[c]("scroll",f,v.listenOpts.passive),window[c]("scroll",f,v.listenOpts.passive),n=m}function d(){o.value!==null&&(i(o.value),o.value=null)}const l=a.watch(()=>e.noParentEvent,()=>{o.value!==null&&(d(),t())});return a.onBeforeUnmount(l),{localScrollTarget:o,unconfigureScrollTarget:d,changeScrollEvent:i}}const{notPassiveCapture:L}=v.listenOpts,H=[];function R(e){const t=e.target;if(t===void 0||t.nodeType===8||t.classList.contains("no-pointer-events")===!0)return;let o=v.portalProxyList.length-1;for(;o>=0;){const n=v.portalProxyList[o].$;if(n.type.name==="QTooltip"){o--;continue}if(n.type.name!=="QDialog")break;if(n.props.seamless!==!0)return;o--}for(let n=H.length-1;n>=0;n--){const i=H[n];if((i.anchorEl.value===null||i.anchorEl.value.contains(t)===!1)&&(t===document.body||i.innerRef.value!==null&&i.innerRef.value.contains(t)===!1))e.qClickOutside=!0,i.onClickOutside(e);else return}}function Ce(e){H.push(e),H.length===1&&(document.addEventListener("mousedown",R,L),document.addEventListener("touchstart",R,L))}function ee(e){const t=H.findIndex(o=>o===e);t!==-1&&(H.splice(t,1),H.length===0&&(document.removeEventListener("mousedown",R,L),document.removeEventListener("touchstart",R,L)))}let te,ne;function oe(e){const t=e.split(" ");return t.length!==2?!1:["top","center","bottom"].includes(t[0])!==!0?(console.error("Anchor/Self position must start with one of top/center/bottom"),!1):["left","middle","right","start","end"].includes(t[1])!==!0?(console.error("Anchor/Self position must end with one of left/middle/right/start/end"),!1):!0}function He(e){return e?!(e.length!==2||typeof e[0]!="number"||typeof e[1]!="number"):!0}const j={"start#ltr":"left","start#rtl":"right","end#ltr":"right","end#rtl":"left"};["left","middle","right"].forEach(e=>{j[`${e}#ltr`]=e,j[`${e}#rtl`]=e});function ie(e,t){const o=e.split(" ");return{vertical:o[0],horizontal:j[`${o[1]}#${t===!0?"rtl":"ltr"}`]}}function Me(e,t){let{top:o,left:n,right:i,bottom:d,width:l,height:h}=e.getBoundingClientRect();return t!==void 0&&(o-=t[1],n-=t[0],d+=t[1],i+=t[0],l+=t[0],h+=t[1]),{top:o,bottom:d,height:h,left:n,right:i,width:l,middle:n+(i-n)/2,center:o+(d-o)/2}}function ke(e,t,o){let{top:n,left:i}=e.getBoundingClientRect();return n+=t.top,i+=t.left,o!==void 0&&(n+=o[1],i+=o[0]),{top:n,bottom:n+1,height:1,left:i,right:i+1,width:1,middle:i,center:n}}function Pe(e,t){return{top:0,center:t/2,bottom:t,left:0,middle:e/2,right:e}}function le(e,t,o,n){return{top:e[o.vertical]-t[n.vertical],left:e[o.horizontal]-t[n.horizontal]}}function ue(e,t=0){if(e.targetEl===null||e.anchorEl===null||t>5)return;if(e.targetEl.offsetHeight===0||e.targetEl.offsetWidth===0){setTimeout(()=>{ue(e,t+1)},10);return}const{targetEl:o,offset:n,anchorEl:i,anchorOrigin:d,selfOrigin:l,absoluteOffset:h,fit:m,cover:c,maxHeight:f,maxWidth:b}=e;if(W.client.is.ios===!0&&window.visualViewport!==void 0){const M=document.body.style,{offsetLeft:E,offsetTop:T}=window.visualViewport;E!==te&&(M.setProperty("--q-pe-left",E+"px"),te=E),T!==ne&&(M.setProperty("--q-pe-top",T+"px"),ne=T)}const{scrollLeft:w,scrollTop:u}=o,s=h===void 0?Me(i,c===!0?[0,0]:n):ke(i,h,n);Object.assign(o.style,{top:0,left:0,minWidth:null,minHeight:null,maxWidth:b,maxHeight:f,visibility:"visible"});const{offsetWidth:B,offsetHeight:k}=o,{elWidth:q,elHeight:$}=m===!0||c===!0?{elWidth:Math.max(s.width,B),elHeight:c===!0?Math.max(s.height,k):k}:{elWidth:B,elHeight:k};let p={maxWidth:b,maxHeight:f};(m===!0||c===!0)&&(p.minWidth=s.width+"px",c===!0&&(p.minHeight=s.height+"px")),Object.assign(o.style,p);const S=Pe(q,$);let g=le(s,S,d,l);if(h===void 0||n===void 0)O(g,s,S,d,l);else{const{top:M,left:E}=g;O(g,s,S,d,l);let T=!1;if(g.top!==M){T=!0;const C=2*n[1];s.center=s.top-=C,s.bottom-=C+2}if(g.left!==E){T=!0;const C=2*n[0];s.middle=s.left-=C,s.right-=C+2}T===!0&&(g=le(s,S,d,l),O(g,s,S,d,l))}p={top:g.top+"px",left:g.left+"px"},g.maxHeight!==void 0&&(p.maxHeight=g.maxHeight+"px",s.height>g.maxHeight&&(p.minHeight=p.maxHeight)),g.maxWidth!==void 0&&(p.maxWidth=g.maxWidth+"px",s.width>g.maxWidth&&(p.minWidth=p.maxWidth)),Object.assign(o.style,p),o.scrollTop!==u&&(o.scrollTop=u),o.scrollLeft!==w&&(o.scrollLeft=w)}function O(e,t,o,n,i){const d=o.bottom,l=o.right,h=y.getScrollbarWidth(),m=window.innerHeight-h,c=document.body.clientWidth;if(e.top<0||e.top+d>m)if(i.vertical==="center")e.top=t[n.vertical]>m/2?Math.max(0,m-d):0,e.maxHeight=Math.min(d,m);else if(t[n.vertical]>m/2){const f=Math.min(m,n.vertical==="center"?t.center:n.vertical===i.vertical?t.bottom:t.top);e.maxHeight=Math.min(d,f),e.top=Math.max(0,f-d)}else e.top=Math.max(0,n.vertical==="center"?t.center:n.vertical===i.vertical?t.top:t.bottom),e.maxHeight=Math.min(d,m-e.top);if(e.left<0||e.left+l>c)if(e.maxWidth=Math.min(l,c),i.horizontal==="middle")e.left=t[n.horizontal]>c/2?Math.max(0,c-l):0;else if(t[n.horizontal]>c/2){const f=Math.min(c,n.horizontal==="middle"?t.middle:n.horizontal===i.horizontal?t.right:t.left);e.maxWidth=Math.min(l,f),e.left=Math.max(0,f-e.maxWidth)}else e.left=Math.max(0,n.horizontal==="middle"?t.middle:n.horizontal===i.horizontal?t.left:t.right),e.maxWidth=Math.min(l,c-e.left)}const We=v.createComponent({name:"QMenu",inheritAttrs:!1,props:{...Ee,...y.useModelToggleProps,...v.useDarkProps,...y.useTransitionProps,persistent:Boolean,autoClose:Boolean,separateClosePopup:Boolean,noEscDismiss:Boolean,noRouteDismiss:Boolean,noRefocus:Boolean,noFocus:Boolean,fit:Boolean,cover:Boolean,square:Boolean,anchor:{type:String,validator:oe},self:{type:String,validator:oe},offset:{type:Array,validator:He},scrollTarget:y.scrollTargetProp,touchPosition:Boolean,maxHeight:{type:String,default:null},maxWidth:{type:String,default:null}},emits:[...y.useModelToggleEmits,"click","escapeKey"],setup(e,{slots:t,emit:o,attrs:n}){let i=null,d,l,h;const m=a.getCurrentInstance(),{proxy:c}=m,{$q:f}=c,b=a.ref(null),w=a.ref(!1),u=a.computed(()=>e.persistent!==!0&&e.noRouteDismiss!==!0),s=v.useDark(e,f),{registerTick:B,removeTick:k}=y.useTick(),{registerTimeout:q}=y.useTimeout(),{transitionProps:$,transitionStyle:p}=y.useTransition(e),{localScrollTarget:S,changeScrollEvent:g,unconfigureScrollTarget:M}=Se(e,Y),{anchorEl:E,canShow:T}=Te({showing:w}),{hide:C}=y.useModelToggle({showing:w,canShow:T,handleShow:de,handleHide:fe,hideOnRouteChange:u,processOnMount:!0}),{showPortal:Q,hidePortal:U,renderPortal:re}=y.usePortal(m,b,me,"menu"),F={anchorEl:E,innerRef:b,onClickOutside(r){if(e.persistent!==!0&&w.value===!0)return C(r),(r.type==="touchstart"||r.target.classList.contains("q-dialog__backdrop"))&&v.stopAndPrevent(r),!0}},N=a.computed(()=>ie(e.anchor||(e.cover===!0?"center middle":"bottom start"),f.lang.rtl)),ae=a.computed(()=>e.cover===!0?N.value:ie(e.self||"top start",f.lang.rtl)),se=a.computed(()=>(e.square===!0?" q-menu--square":"")+(s.value===!0?" q-menu--dark q-dark":"")),ce=a.computed(()=>e.autoClose===!0?{onClick:he}:{}),V=a.computed(()=>w.value===!0&&e.persistent!==!0);a.watch(V,r=>{r===!0?(y.addEscapeKey(D),Ce(F)):(y.removeEscapeKey(D),ee(F))});function z(){y.addFocusFn(()=>{let r=b.value;r&&r.contains(document.activeElement)!==!0&&(r=r.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]")||r.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]")||r.querySelector("[autofocus], [data-autofocus]")||r,r.focus({preventScroll:!0}))})}function de(r){if(i=e.noRefocus===!1?document.activeElement:null,W.addFocusout(Z),Q(),Y(),d=void 0,r!==void 0&&(e.touchPosition||e.contextMenu)){const K=v.position(r);if(K.left!==void 0){const{top:ve,left:ge}=E.value.getBoundingClientRect();d={left:K.left-ge,top:K.top-ve}}}l===void 0&&(l=a.watch(()=>f.screen.width+"|"+f.screen.height+"|"+e.self+"|"+e.anchor+"|"+f.lang.rtl,P)),e.noFocus!==!0&&document.activeElement.blur(),B(()=>{P(),e.noFocus!==!0&&z()}),q(()=>{f.platform.is.ios===!0&&(h=e.autoClose,b.value.click()),P(),Q(!0),o("show",r)},e.transitionDuration)}function fe(r){k(),U(),X(!0),i!==null&&(r===void 0||r.qClickOutside!==!0)&&((((r==null?void 0:r.type.indexOf("key"))===0?i.closest('[tabindex]:not([tabindex^="-"])'):void 0)||i).focus(),i=null),q(()=>{U(!0),o("hide",r)},e.transitionDuration)}function X(r){d=void 0,l!==void 0&&(l(),l=void 0),(r===!0||w.value===!0)&&(W.removeFocusout(Z),M(),ee(F),y.removeEscapeKey(D)),r!==!0&&(i=null)}function Y(){(E.value!==null||e.scrollTarget!==void 0)&&(S.value=y.getScrollTarget(E.value,e.scrollTarget),g(S.value,P))}function he(r){h!==!0?(v.closePortalMenus(c,r),o("click",r)):h=!1}function Z(r){V.value===!0&&e.noFocus!==!0&&v.childHasFocus(b.value,r.target)!==!0&&z()}function D(r){e.noEscDismiss!==!0&&(o("escapeKey"),C(r))}function P(){ue({targetEl:b.value,offset:e.offset,anchorEl:E.value,anchorOrigin:N.value,selfOrigin:ae.value,absoluteOffset:d,fit:e.fit,cover:e.cover,maxHeight:e.maxHeight,maxWidth:e.maxWidth})}function me(){return a.h(a.Transition,$.value,()=>w.value===!0?a.h("div",{role:"menu",...n,ref:b,tabindex:-1,class:["q-menu q-position-engine scroll"+se.value,n.class],style:[n.style,p.value],...ce.value},v.hSlot(t.default)):null)}return a.onBeforeUnmount(X),Object.assign(c,{focus:z,updatePosition:P}),re}});exports.QMenu=We;exports.useId=pe;
@@ -1,5 +1,5 @@
1
1
  import { getCurrentInstance as E, watch as V, onMounted as I, nextTick as x, ref as $, onUnmounted as K, h as k, Teleport as U, computed as D, onDeactivated as N, onBeforeUnmount as O } from "vue";
2
- import { H as G, z as T, c as Q, I as W, J as j, K as H, m as _ } from "./index-W3hJ-aLX.js";
2
+ import { H as G, z as T, c as Q, I as W, J as j, K as H, m as _ } from "./index-DFNWQp-Z.js";
3
3
  import { b as z, c as B } from "./focusout-DjvPXP_b.js";
4
4
  let c = [], h = [];
5
5
  function q(e) {