vue-quest-ui 0.0.36 → 0.0.37
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.
- package/README.md +103 -95
- package/dist/vue-quest-ui.js +1 -1
- package/dist/vue-quest-ui.umd.cjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,98 +1,106 @@
|
|
|
1
|
-
# Vue Quest UI
|
|
2
|
-
|
|
3
|
-
Vue Quest UI is a collection of reusable Vue components that are designed to help you quickly build modern and responsive user interfaces for your Vue.js projects.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
You can easily install Vue Quest UI via npm:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npm i vue-quest-ui
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Usage
|
|
14
|
-
To use Vue Quest UI in your Vue.js project, you can register the components globally as an entire library or individually, or locally.
|
|
15
|
-
|
|
16
|
-
### 1. Global Registration:
|
|
17
|
-
In your main.js (or main.ts) file, use the <b>install</b> function to register all components globally. All the components in the library will be installed in your project. They can then be used as custom components in any part of your project.
|
|
18
|
-
|
|
19
|
-
```javascript
|
|
20
|
-
import { createApp } from 'vue';
|
|
21
|
-
import App from './App.vue';
|
|
22
|
-
import { install } from 'vue-quest-ui'; // Import the install function
|
|
23
|
-
|
|
24
|
-
const app = createApp(App);
|
|
25
|
-
|
|
26
|
-
app.use(install); // Register all components globally
|
|
27
|
-
|
|
28
|
-
app.mount('#app');
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
### 2. Selective Registration:
|
|
32
|
-
If you only want to import specific components instead of the entire library, you can use the <b>installGlobalComponents</b> function. Pass a string array of the component names you'd like to import, these components will then be globally imported.
|
|
33
|
-
|
|
34
|
-
```javascript
|
|
35
|
-
import { createApp } from 'vue';
|
|
36
|
-
import App from './App.vue';
|
|
37
|
-
import { installGlobalComponents } from 'vue-quest-ui';
|
|
38
|
-
|
|
39
|
-
const app = createApp(App);
|
|
40
|
-
|
|
41
|
-
installGlobalComponents(app, ['QstIcon']); // Register only the QstIcon component globally
|
|
42
|
-
|
|
43
|
-
app.mount('#app');
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
### 3. Manual Registration:
|
|
47
|
-
You can also import and register individual components manually globally, or locally in each file that they'll be used in.
|
|
48
|
-
|
|
49
|
-
```javascript
|
|
50
|
-
// main.js/main.ts
|
|
51
|
-
import { createApp } from 'vue';
|
|
52
|
-
import App from './App.vue';
|
|
53
|
-
import { QstIcon } from 'vue-quest-ui';
|
|
54
|
-
|
|
55
|
-
const app = createApp(App);
|
|
56
|
-
|
|
57
|
-
// Manually register the QstIcon component
|
|
58
|
-
app.component('QstIcon', QstIcon);
|
|
59
|
-
|
|
60
|
-
app.mount('#app');
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
```javascript
|
|
64
|
-
// file for a component or page where the component will be used
|
|
65
|
-
import { QstIcon } from 'vue-quest-ui';
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
```html
|
|
69
|
-
<div>
|
|
70
|
-
<qst-icon icon="clarity:email-solid" />
|
|
71
|
-
</div>
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
##
|
|
75
|
-
Vue Quest UI
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
1
|
+
# Vue Quest UI
|
|
2
|
+
|
|
3
|
+
Vue Quest UI is a collection of reusable Vue components that are designed to help you quickly build modern and responsive user interfaces for your Vue.js projects.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
You can easily install Vue Quest UI via npm:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm i vue-quest-ui
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
To use Vue Quest UI in your Vue.js project, you can register the components globally as an entire library or individually, or locally.
|
|
15
|
+
|
|
16
|
+
### 1. Global Registration:
|
|
17
|
+
In your main.js (or main.ts) file, use the <b>install</b> function to register all components globally. All the components in the library will be installed in your project. They can then be used as custom components in any part of your project.
|
|
18
|
+
|
|
19
|
+
```javascript
|
|
20
|
+
import { createApp } from 'vue';
|
|
21
|
+
import App from './App.vue';
|
|
22
|
+
import { install } from 'vue-quest-ui'; // Import the install function
|
|
23
|
+
|
|
24
|
+
const app = createApp(App);
|
|
25
|
+
|
|
26
|
+
app.use(install); // Register all components globally
|
|
27
|
+
|
|
28
|
+
app.mount('#app');
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### 2. Selective Registration:
|
|
32
|
+
If you only want to import specific components instead of the entire library, you can use the <b>installGlobalComponents</b> function. Pass a string array of the component names you'd like to import, these components will then be globally imported.
|
|
33
|
+
|
|
34
|
+
```javascript
|
|
35
|
+
import { createApp } from 'vue';
|
|
36
|
+
import App from './App.vue';
|
|
37
|
+
import { installGlobalComponents } from 'vue-quest-ui';
|
|
38
|
+
|
|
39
|
+
const app = createApp(App);
|
|
40
|
+
|
|
41
|
+
installGlobalComponents(app, ['QstIcon']); // Register only the QstIcon component globally
|
|
42
|
+
|
|
43
|
+
app.mount('#app');
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### 3. Manual Registration:
|
|
47
|
+
You can also import and register individual components manually globally, or locally in each file that they'll be used in.
|
|
48
|
+
|
|
49
|
+
```javascript
|
|
50
|
+
// main.js/main.ts
|
|
51
|
+
import { createApp } from 'vue';
|
|
52
|
+
import App from './App.vue';
|
|
53
|
+
import { QstIcon } from 'vue-quest-ui';
|
|
54
|
+
|
|
55
|
+
const app = createApp(App);
|
|
56
|
+
|
|
57
|
+
// Manually register the QstIcon component
|
|
58
|
+
app.component('QstIcon', QstIcon);
|
|
59
|
+
|
|
60
|
+
app.mount('#app');
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
```javascript
|
|
64
|
+
// file for a component or page where the component will be used
|
|
65
|
+
import { QstIcon } from 'vue-quest-ui';
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
```html
|
|
69
|
+
<div>
|
|
70
|
+
<qst-icon icon="clarity:email-solid" />
|
|
71
|
+
</div>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Styles
|
|
75
|
+
All the necessary styles for Vue Quest UI can be imported in your main.js file. Some components also include a color prop, which allows you to choose an accent color. By default, this uses the primary-color CSS variable. If you define the primary-color variable in your project, it will automatically apply to all components that use the color prop, so you won’t need to set it individually for each one.
|
|
76
|
+
|
|
77
|
+
```javascript
|
|
78
|
+
import 'vue-quest-ui/dist/vue-quest-ui.css';
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Configuration
|
|
82
|
+
Vue Quest UI requires iconify for the icons throughout the project. If it's not already installed, it will be installed alongside vue-quest-ui as a dependency.
|
|
83
|
+
|
|
84
|
+
All components can be customized based on your needs by passing props to them. Review the props available for each component below.
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
96
104
|
|
|
97
105
|
|
|
98
106
|
## Components
|
package/dist/vue-quest-ui.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(R,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(R=typeof globalThis<"u"?globalThis:R||self,e(R.QuestUI={},R.Vue))})(this,function(R,e){"use strict";const st=/^[a-z0-9]+(-[a-z0-9]+)*$/,xe=(t,i,l,o="")=>{const n=t.split(":");if(t.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;o=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const c=n.pop(),a=n.pop(),d={provider:n.length>0?n[0]:o,prefix:a,name:c};return i&&!Be(d)?null:d}const r=n[0],s=r.split("-");if(s.length>1){const c={provider:o,prefix:s.shift(),name:s.join("-")};return i&&!Be(c)?null:c}if(l&&o===""){const c={provider:o,prefix:"",name:r};return i&&!Be(c,l)?null:c}return null},Be=(t,i)=>t?!!((i&&t.prefix===""||t.prefix)&&t.name):!1,at=Object.freeze({left:0,top:0,width:16,height:16}),ve=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Ce=Object.freeze({...at,...ve}),Re=Object.freeze({...Ce,body:"",hidden:!1});function Zt(t,i){const l={};!t.hFlip!=!i.hFlip&&(l.hFlip=!0),!t.vFlip!=!i.vFlip&&(l.vFlip=!0);const o=((t.rotate||0)+(i.rotate||0))%4;return o&&(l.rotate=o),l}function dt(t,i){const l=Zt(t,i);for(const o in Re)o in ve?o in t&&!(o in l)&&(l[o]=ve[o]):o in i?l[o]=i[o]:o in t&&(l[o]=t[o]);return l}function _t(t,i){const l=t.icons,o=t.aliases||Object.create(null),n=Object.create(null);function r(s){if(l[s])return n[s]=[];if(!(s in n)){n[s]=null;const c=o[s]&&o[s].parent,a=c&&r(c);a&&(n[s]=[c].concat(a))}return n[s]}return Object.keys(l).concat(Object.keys(o)).forEach(r),n}function eo(t,i,l){const o=t.icons,n=t.aliases||Object.create(null);let r={};function s(c){r=dt(o[c]||n[c],r)}return s(i),l.forEach(s),dt(t,r)}function ct(t,i){const l=[];if(typeof t!="object"||typeof t.icons!="object")return l;t.not_found instanceof Array&&t.not_found.forEach(n=>{i(n,null),l.push(n)});const o=_t(t);for(const n in o){const r=o[n];r&&(i(n,eo(t,n,r)),l.push(n))}return l}const to={provider:"",aliases:{},not_found:{},...at};function Fe(t,i){for(const l in i)if(l in t&&typeof t[l]!=typeof i[l])return!1;return!0}function ut(t){if(typeof t!="object"||t===null)return null;const i=t;if(typeof i.prefix!="string"||!t.icons||typeof t.icons!="object"||!Fe(t,to))return null;const l=i.icons;for(const n in l){const r=l[n];if(!n||typeof r.body!="string"||!Fe(r,Re))return null}const o=i.aliases||Object.create(null);for(const n in o){const r=o[n],s=r.parent;if(!n||typeof s!="string"||!l[s]&&!o[s]||!Fe(r,Re))return null}return i}const ft=Object.create(null);function oo(t,i){return{provider:t,prefix:i,icons:Object.create(null),missing:new Set}}function ae(t,i){const l=ft[t]||(ft[t]=Object.create(null));return l[i]||(l[i]=oo(t,i))}function pt(t,i){return ut(i)?ct(i,(l,o)=>{o?t.icons[l]=o:t.missing.add(l)}):[]}function lo(t,i,l){try{if(typeof l.body=="string")return t.icons[i]={...l},!0}catch{}return!1}let ue=!1;function ht(t){return typeof t=="boolean"&&(ue=t),ue}function no(t){const i=typeof t=="string"?xe(t,!0,ue):t;if(i){const l=ae(i.provider,i.prefix),o=i.name;return l.icons[o]||(l.missing.has(o)?null:void 0)}}function io(t,i){const l=xe(t,!0,ue);if(!l)return!1;const o=ae(l.provider,l.prefix);return i?lo(o,l.name,i):(o.missing.add(l.name),!0)}function ro(t,i){if(typeof t!="object")return!1;if(typeof i!="string"&&(i=t.provider||""),ue&&!i&&!t.prefix){let n=!1;return ut(t)&&(t.prefix="",ct(t,(r,s)=>{io(r,s)&&(n=!0)})),n}const l=t.prefix;if(!Be({prefix:l,name:"a"}))return!1;const o=ae(i,l);return!!pt(o,t)}const mt=Object.freeze({width:null,height:null}),gt=Object.freeze({...mt,...ve}),so=/(-?[0-9.]*[0-9]+[0-9.]*)/g,ao=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function yt(t,i,l){if(i===1)return t;if(l=l||100,typeof t=="number")return Math.ceil(t*i*l)/l;if(typeof t!="string")return t;const o=t.split(so);if(o===null||!o.length)return t;const n=[];let r=o.shift(),s=ao.test(r);for(;;){if(s){const c=parseFloat(r);isNaN(c)?n.push(r):n.push(Math.ceil(c*i*l)/l)}else n.push(r);if(r=o.shift(),r===void 0)return n.join("");s=!s}}function co(t,i="defs"){let l="";const o=t.indexOf("<"+i);for(;o>=0;){const n=t.indexOf(">",o),r=t.indexOf("</"+i);if(n===-1||r===-1)break;const s=t.indexOf(">",r);if(s===-1)break;l+=t.slice(n+1,r).trim(),t=t.slice(0,o).trim()+t.slice(s+1)}return{defs:l,content:t}}function uo(t,i){return t?"<defs>"+t+"</defs>"+i:i}function fo(t,i,l){const o=co(t);return uo(o.defs,i+o.content+l)}const po=t=>t==="unset"||t==="undefined"||t==="none";function ho(t,i){const l={...Ce,...t},o={...gt,...i},n={left:l.left,top:l.top,width:l.width,height:l.height};let r=l.body;[l,o].forEach(y=>{const m=[],b=y.hFlip,B=y.vFlip;let x=y.rotate;b?B?x+=2:(m.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),m.push("scale(-1 1)"),n.top=n.left=0):B&&(m.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),m.push("scale(1 -1)"),n.top=n.left=0);let k;switch(x<0&&(x-=Math.floor(x/4)*4),x=x%4,x){case 1:k=n.height/2+n.top,m.unshift("rotate(90 "+k.toString()+" "+k.toString()+")");break;case 2:m.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:k=n.width/2+n.left,m.unshift("rotate(-90 "+k.toString()+" "+k.toString()+")");break}x%2===1&&(n.left!==n.top&&(k=n.left,n.left=n.top,n.top=k),n.width!==n.height&&(k=n.width,n.width=n.height,n.height=k)),m.length&&(r=fo(r,'<g transform="'+m.join(" ")+'">',"</g>"))});const s=o.width,c=o.height,a=n.width,d=n.height;let f,u;s===null?(u=c===null?"1em":c==="auto"?d:c,f=yt(u,a/d)):(f=s==="auto"?a:s,u=c===null?yt(f,d/a):c==="auto"?d:c);const g={},T=(y,m)=>{po(m)||(g[y]=m.toString())};T("width",f),T("height",u);const h=[n.left,n.top,a,d];return g.viewBox=h.join(" "),{attributes:g,viewBox:h,body:r}}const mo=/\sid="(\S+)"/g,go="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let yo=0;function bo(t,i=go){const l=[];let o;for(;o=mo.exec(t);)l.push(o[1]);if(!l.length)return t;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return l.forEach(r=>{const s=typeof i=="function"?i(r):i+(yo++).toString(),c=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+s+n+"$3")}),t=t.replace(new RegExp(n,"g"),""),t}const He=Object.create(null);function wo(t,i){He[t]=i}function Qe(t){return He[t]||He[""]}function We(t){let i;if(typeof t.resources=="string")i=[t.resources];else if(i=t.resources,!(i instanceof Array)||!i.length)return null;return{resources:i,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}const Ue=Object.create(null),fe=["https://api.simplesvg.com","https://api.unisvg.com"],qe=[];for(;fe.length>0;)fe.length===1||Math.random()>.5?qe.push(fe.shift()):qe.push(fe.pop());Ue[""]=We({resources:["https://api.iconify.design"].concat(qe)});function ko(t,i){const l=We(i);return l===null?!1:(Ue[t]=l,!0)}function Je(t){return Ue[t]}let bt=(()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}})();function So(t,i){const l=Je(t);if(!l)return 0;let o;if(!l.maxURL)o=0;else{let n=0;l.resources.forEach(s=>{n=Math.max(n,s.length)});const r=i+".json?icons=";o=l.maxURL-n-l.path.length-r.length}return o}function To(t){return t===404}const Vo=(t,i,l)=>{const o=[],n=So(t,i),r="icons";let s={type:r,provider:t,prefix:i,icons:[]},c=0;return l.forEach((a,d)=>{c+=a.length+1,c>=n&&d>0&&(o.push(s),s={type:r,provider:t,prefix:i,icons:[]},c=a.length),s.icons.push(a)}),o.push(s),o};function xo(t){if(typeof t=="string"){const i=Je(t);if(i)return i.path}return"/"}const Bo={prepare:Vo,send:(t,i,l)=>{if(!bt){l("abort",424);return}let o=xo(i.provider);switch(i.type){case"icons":{const r=i.prefix,c=i.icons.join(","),a=new URLSearchParams({icons:c});o+=r+".json?"+a.toString();break}case"custom":{const r=i.uri;o+=r.slice(0,1)==="/"?r.slice(1):r;break}default:l("abort",400);return}let n=503;bt(t+o).then(r=>{const s=r.status;if(s!==200){setTimeout(()=>{l(To(s)?"abort":"next",s)});return}return n=501,r.json()}).then(r=>{if(typeof r!="object"||r===null){setTimeout(()=>{r===404?l("abort",r):l("next",n)});return}setTimeout(()=>{l("success",r)})}).catch(()=>{l("next",n)})}};function vo(t){const i={loaded:[],missing:[],pending:[]},l=Object.create(null);t.sort((n,r)=>n.provider!==r.provider?n.provider.localeCompare(r.provider):n.prefix!==r.prefix?n.prefix.localeCompare(r.prefix):n.name.localeCompare(r.name));let o={provider:"",prefix:"",name:""};return t.forEach(n=>{if(o.name===n.name&&o.prefix===n.prefix&&o.provider===n.provider)return;o=n;const r=n.provider,s=n.prefix,c=n.name,a=l[r]||(l[r]=Object.create(null)),d=a[s]||(a[s]=ae(r,s));let f;c in d.icons?f=i.loaded:s===""||d.missing.has(c)?f=i.missing:f=i.pending;const u={provider:r,prefix:s,name:c};f.push(u)}),i}function wt(t,i){t.forEach(l=>{const o=l.loaderCallbacks;o&&(l.loaderCallbacks=o.filter(n=>n.id!==i))})}function Co(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const i=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!i.length)return;let l=!1;const o=t.provider,n=t.prefix;i.forEach(r=>{const s=r.icons,c=s.pending.length;s.pending=s.pending.filter(a=>{if(a.prefix!==n)return!0;const d=a.name;if(t.icons[d])s.loaded.push({provider:o,prefix:n,name:d});else if(t.missing.has(d))s.missing.push({provider:o,prefix:n,name:d});else return l=!0,!0;return!1}),s.pending.length!==c&&(l||wt([t],r.id),r.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),r.abort))})}))}let qo=0;function Eo(t,i,l){const o=qo++,n=wt.bind(null,l,o);if(!i.pending.length)return n;const r={id:o,icons:i,callback:t,abort:n};return l.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(r)}),n}function Io(t,i=!0,l=!1){const o=[];return t.forEach(n=>{const r=typeof n=="string"?xe(n,i,l):n;r&&o.push(r)}),o}var Ao={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function zo(t,i,l,o){const n=t.resources.length,r=t.random?Math.floor(Math.random()*n):t.index;let s;if(t.random){let q=t.resources.slice(0);for(s=[];q.length>1;){const M=Math.floor(Math.random()*q.length);s.push(q[M]),q=q.slice(0,M).concat(q.slice(M+1))}s=s.concat(q)}else s=t.resources.slice(r).concat(t.resources.slice(0,r));const c=Date.now();let a="pending",d=0,f,u=null,g=[],T=[];typeof o=="function"&&T.push(o);function h(){u&&(clearTimeout(u),u=null)}function y(){a==="pending"&&(a="aborted"),h(),g.forEach(q=>{q.status==="pending"&&(q.status="aborted")}),g=[]}function m(q,M){M&&(T=[]),typeof q=="function"&&T.push(q)}function b(){return{startTime:c,payload:i,status:a,queriesSent:d,queriesPending:g.length,subscribe:m,abort:y}}function B(){a="failed",T.forEach(q=>{q(void 0,f)})}function x(){g.forEach(q=>{q.status==="pending"&&(q.status="aborted")}),g=[]}function k(q,M,P){const L=M!=="success";switch(g=g.filter(E=>E!==q),a){case"pending":break;case"failed":if(L||!t.dataAfterTimeout)return;break;default:return}if(M==="abort"){f=P,B();return}if(L){f=P,g.length||(s.length?v():B());return}if(h(),x(),!t.random){const E=t.resources.indexOf(q.resource);E!==-1&&E!==t.index&&(t.index=E)}a="completed",T.forEach(E=>{E(P)})}function v(){if(a!=="pending")return;h();const q=s.shift();if(q===void 0){if(g.length){u=setTimeout(()=>{h(),a==="pending"&&(x(),B())},t.timeout);return}B();return}const M={status:"pending",resource:q,callback:(P,L)=>{k(M,P,L)}};g.push(M),d++,u=setTimeout(v,t.rotate),l(q,i,M.callback)}return setTimeout(v),b}function kt(t){const i={...Ao,...t};let l=[];function o(){l=l.filter(c=>c().status==="pending")}function n(c,a,d){const f=zo(i,c,a,(u,g)=>{o(),d&&d(u,g)});return l.push(f),f}function r(c){return l.find(a=>c(a))||null}return{query:n,find:r,setIndex:c=>{i.index=c},getIndex:()=>i.index,cleanup:o}}function St(){}const Ke=Object.create(null);function No(t){if(!Ke[t]){const i=Je(t);if(!i)return;const l=kt(i),o={config:i,redundancy:l};Ke[t]=o}return Ke[t]}function Mo(t,i,l){let o,n;if(typeof t=="string"){const r=Qe(t);if(!r)return l(void 0,424),St;n=r.send;const s=No(t);s&&(o=s.redundancy)}else{const r=We(t);if(r){o=kt(r);const s=t.resources?t.resources[0]:"",c=Qe(s);c&&(n=c.send)}}return!o||!n?(l(void 0,424),St):o.query(i,n,l)().abort}function Tt(){}function Oo(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,Co(t)}))}function $o(t){const i=[],l=[];return t.forEach(o=>{(o.match(st)?i:l).push(o)}),{valid:i,invalid:l}}function pe(t,i,l){function o(){const n=t.pendingIcons;i.forEach(r=>{n&&n.delete(r),t.icons[r]||t.missing.add(r)})}if(l&&typeof l=="object")try{if(!pt(t,l).length){o();return}}catch(n){console.error(n)}o(),Oo(t)}function Vt(t,i){t instanceof Promise?t.then(l=>{i(l)}).catch(()=>{i(null)}):i(t)}function Do(t,i){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(i).sort():t.iconsToLoad=i,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:l,prefix:o}=t,n=t.iconsToLoad;if(delete t.iconsToLoad,!n||!n.length)return;const r=t.loadIcon;if(t.loadIcons&&(n.length>1||!r)){Vt(t.loadIcons(n,o,l),f=>{pe(t,n,f)});return}if(r){n.forEach(f=>{const u=r(f,o,l);Vt(u,g=>{const T=g?{prefix:o,icons:{[f]:g}}:null;pe(t,[f],T)})});return}const{valid:s,invalid:c}=$o(n);if(c.length&&pe(t,c,null),!s.length)return;const a=o.match(st)?Qe(l):null;if(!a){pe(t,s,null);return}a.prepare(l,o,s).forEach(f=>{Mo(l,f,u=>{pe(t,f.icons,u)})})}))}const Po=(t,i)=>{const l=Io(t,!0,ht()),o=vo(l);if(!o.pending.length){let a=!0;return i&&setTimeout(()=>{a&&i(o.loaded,o.missing,o.pending,Tt)}),()=>{a=!1}}const n=Object.create(null),r=[];let s,c;return o.pending.forEach(a=>{const{provider:d,prefix:f}=a;if(f===c&&d===s)return;s=d,c=f,r.push(ae(d,f));const u=n[d]||(n[d]=Object.create(null));u[f]||(u[f]=[])}),o.pending.forEach(a=>{const{provider:d,prefix:f,name:u}=a,g=ae(d,f),T=g.pendingIcons||(g.pendingIcons=new Set);T.has(u)||(T.add(u),n[d][f].push(u))}),r.forEach(a=>{const d=n[a.provider][a.prefix];d.length&&Do(a,d)}),i?Eo(i,o,r):Tt};function Lo(t,i){const l={...t};for(const o in i){const n=i[o],r=typeof n;o in mt?(n===null||n&&(r==="string"||r==="number"))&&(l[o]=n):r===typeof l[o]&&(l[o]=o==="rotate"?n%4:n)}return l}const jo=/[\s,]+/;function Ro(t,i){i.split(jo).forEach(l=>{switch(l.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0;break}})}function Fo(t,i=0){const l=t.replace(/^-?[0-9.]*/,"");function o(n){for(;n<0;)n+=4;return n%4}if(l===""){const n=parseInt(t);return isNaN(n)?0:o(n)}else if(l!==t){let n=0;switch(l){case"%":n=25;break;case"deg":n=90}if(n){let r=parseFloat(t.slice(0,t.length-l.length));return isNaN(r)?0:(r=r/n,r%1===0?o(r):0)}}return i}function Ho(t,i){let l=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const o in i)l+=" "+o+'="'+i[o]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+l+">"+t+"</svg>"}function Qo(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Wo(t){return"data:image/svg+xml,"+Qo(t)}function Uo(t){return'url("'+Wo(t)+'")'}const xt={...gt,inline:!1},Jo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Ko={display:"inline-block"},Ye={backgroundColor:"currentColor"},Bt={backgroundColor:"transparent"},vt={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Ct={webkitMask:Ye,mask:Ye,background:Bt};for(const t in Ct){const i=Ct[t];for(const l in vt)i[t+l]=vt[l]}const Ee={};["horizontal","vertical"].forEach(t=>{const i=t.slice(0,1)+"Flip";Ee[t+"-flip"]=i,Ee[t.slice(0,1)+"-flip"]=i,Ee[t+"Flip"]=i});function qt(t){return t+(t.match(/^[-0-9.]+$/)?"px":"")}const Et=(t,i)=>{const l=Lo(xt,i),o={...Jo},n=i.mode||"svg",r={},s=i.style,c=typeof s=="object"&&!(s instanceof Array)?s:{};for(let y in i){const m=i[y];if(m!==void 0)switch(y){case"icon":case"style":case"onLoad":case"mode":case"ssr":break;case"inline":case"hFlip":case"vFlip":l[y]=m===!0||m==="true"||m===1;break;case"flip":typeof m=="string"&&Ro(l,m);break;case"color":r.color=m;break;case"rotate":typeof m=="string"?l[y]=Fo(m):typeof m=="number"&&(l[y]=m);break;case"ariaHidden":case"aria-hidden":m!==!0&&m!=="true"&&delete o["aria-hidden"];break;default:{const b=Ee[y];b?(m===!0||m==="true"||m===1)&&(l[b]=!0):xt[y]===void 0&&(o[y]=m)}}}const a=ho(t,l),d=a.attributes;if(l.inline&&(r.verticalAlign="-0.125em"),n==="svg"){o.style={...r,...c},Object.assign(o,d);let y=0,m=i.id;return typeof m=="string"&&(m=m.replace(/-/g,"_")),o.innerHTML=bo(a.body,m?()=>m+"ID"+y++:"iconifyVue"),e.h("svg",o)}const{body:f,width:u,height:g}=t,T=n==="mask"||(n==="bg"?!1:f.indexOf("currentColor")!==-1),h=Ho(f,{...d,width:u+"",height:g+""});return o.style={...r,"--svg":Uo(h),width:qt(d.width),height:qt(d.height),...Ko,...T?Ye:Bt,...c},e.h("span",o)};if(ht(!0),wo("",Bo),typeof document<"u"&&typeof window<"u"){const t=window;if(t.IconifyPreload!==void 0){const i=t.IconifyPreload,l="Invalid IconifyPreload syntax.";typeof i=="object"&&i!==null&&(i instanceof Array?i:[i]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!ro(o))&&console.error(l)}catch{console.error(l)}})}if(t.IconifyProviders!==void 0){const i=t.IconifyProviders;if(typeof i=="object"&&i!==null)for(let l in i){const o="IconifyProviders["+l+"] is invalid.";try{const n=i[l];if(typeof n!="object"||!n||n.resources===void 0)continue;ko(l,n)||console.error(o)}catch{console.error(o)}}}}const Yo={...Ce,body:""},Go=e.defineComponent({inheritAttrs:!1,data(){return{_name:"",_loadingIcon:null,iconMounted:!1,counter:0}},mounted(){this.iconMounted=!0},unmounted(){this.abortLoading()},methods:{abortLoading(){this._loadingIcon&&(this._loadingIcon.abort(),this._loadingIcon=null)},getIcon(t,i,l){if(typeof t=="object"&&t!==null&&typeof t.body=="string")return this._name="",this.abortLoading(),{data:t};let o;if(typeof t!="string"||(o=xe(t,!1,!0))===null)return this.abortLoading(),null;let n=no(o);if(!n)return(!this._loadingIcon||this._loadingIcon.name!==t)&&(this.abortLoading(),this._name="",n!==null&&(this._loadingIcon={name:t,abort:Po([o],()=>{this.counter++})})),null;if(this.abortLoading(),this._name!==t&&(this._name=t,i&&i(t)),l){n=Object.assign({},n);const s=l(n.body,o.name,o.prefix,o.provider);typeof s=="string"&&(n.body=s)}const r=["iconify"];return o.prefix!==""&&r.push("iconify--"+o.prefix),o.provider!==""&&r.push("iconify--"+o.provider),{data:n,classes:r}}},render(){this.counter;const t=this.$attrs,i=this.iconMounted||t.ssr?this.getIcon(t.icon,t.onLoad,t.customise):null;if(!i)return Et(Yo,t);let l=t;return i.classes&&(l={...t,class:(typeof t.class=="string"?t.class+" ":"")+i.classes.join(" ")}),Et({...Ce,...i.data},l)}}),F=(t,i)=>{const l=t.__vccOpts||t;for(const[o,n]of i)l[o]=n;return l},Xo=["src"],W=F({__name:"QstIcon",props:{icon:{type:String,required:!0,tsType:"string",description:"Iconify value for the icon."},color:{type:String,required:!1,default:null,tsType:"string",description:"The color of the icon."},circle:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Shows the icon in a circle. The background color of the circle will be the color prop and the icon will show as white."},size:{type:String,required:!1,default:"16px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},alignText:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Aligns the icon and text vertically."}},setup(t){const i=t,l=e.computed(()=>i.circle?{backgroundColor:i.color,color:"white",borderRadius:"50%",padding:"3px"}:i.color?{color:i.color}:null);return(o,n)=>{var r;return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({fontSize:t.size}),class:e.normalizeClass([{"icon--align":t.alignText},"qst-icon__wrapper"])},[(r=t.icon)!=null&&r.startsWith("https")?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.icon,class:"image-icon"},null,8,Xo)):(e.openBlock(),e.createBlock(e.unref(Go),{key:1,icon:t.icon,style:e.normalizeStyle(l.value)},null,8,["icon","style"]))],6)}}},[["__scopeId","data-v-cd030e7c"]]),Zo={class:"tooltip-wrapper__outer"},_o={class:"tooltip-wrapper"},el=["innerHTML"],te=F({__name:"QstTooltip",props:{offset:{type:Object,required:!1,default:()=>({x:0,y:0}),tsType:"{x: number, y: number}",description:"Moves the tooltip from its default position. *(+X moves right, -X moves left, +Y moves down, -Y moves up)*"},offsetTriangle:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"When offset is set, the triangle will remain anchored to the trigger by default. If true, the triangle will move with the rest of the offset."},scrollableY:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"The tooltip dropdown will scroll vertically when content exceeds the tooltip size."},icon:{type:String,required:!1,default:"ant-design:info-circle-filled",tsType:"string",description:"Hovering over the icon will trigger the tooltip dropdown to be visible, can be set to any iconify value."},color:{type:String,required:!1,default:"#616161",tsType:"string",description:"The color of the icon."},size:{type:String,required:!1,default:"14px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},useHoverIcon:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Whether the icon should be used as the tooltip trigger."},width:{type:Number,required:!1,default:260,tsType:"number",description:"Width of the tooltip. *(number value only, will be set to pixel unit)*"},position:{type:String,required:!1,default:"bottom",tsType:"string",description:"Pass in top/left/right/bottom to control where the tooltip dropdown appears in relation to the trigger."},solid:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"The background of the tooltip dropdown will be completely solid."},disabled:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Prevents the tooltip from being triggered by hover/click."},useHoverBuffer:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Adds a transparent element between the tooltip trigger and dropdown. Allows the user to move the mouse from trigger to content without closing the tooltip."},helpMode:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Tooltip will only be visible when true, tooltip icon and styles are updated to a help theme."},content:{type:String,required:!1,default:null,tsType:"string",description:"The content shown in the tooltip dropdown. *(can also be set by using the default slot)*"},overrideStyles:{type:Object,required:!1,default:null,tsType:"object",description:"Set to a style object, will override default tooltip dropdown styles. *(teleported tooltip dropdowns can't be targeted by parents)*"},preventClickOverride:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Prevents the tooltip from staying open when clicking on the trigger."}},setup(t,{expose:i}){const l=t,o=e.ref(),n=e.ref(),r=e.ref(0),s=e.computed(()=>({"--offset-x":l.offset.x+"px","--offset-y":l.offset.y+"px","--offset-top":(l.width/2-13)*-1+l.offset.x+"px","--offset-left":r.value/2*-1+10+l.offset.y+"px",width:l.width+"px",top:T.value.top,left:T.value.left,...l.overrideStyles})),c=e.computed(()=>({style:l.helpMode?"background-color: black; border-radius: 50%;":"",icon:l.helpMode?"material-symbols:help-rounded":l.icon,color:l.helpMode?"#28C76F":l.color})),a=e.ref(!1),d=e.ref(!1);e.watch(a,()=>{a.value&&n.value&&e.nextTick(()=>{r.value=n.value.offsetHeight})});const f=B=>{(B||!d.value)&&(a.value=!1,d.value=!1)},u=e.useSlots(),g=e.computed(()=>{var B,x;if(!a.value||l.disabled||!u.default&&!l.content)return!1;if(u.default){const k=(B=u.default())==null?void 0:B[0];if(k)return Array.isArray(k.children)?!!k.children.length:!!k.children||k.__v_isVNode||!!((x=Object.values(k==null?void 0:k.props))!=null&&x.some(v=>!!v))}return!!l.content});i({isShowing:a});const T=e.ref({top:"",left:"-1000px"}),h=e.ref(),y=()=>{if(!o.value||!a.value)return;const B=new IntersectionObserver(x=>{var U;const k=x[0].boundingClientRect;let v=0,q=0;h.value=(U=n.value)==null?void 0:U.offsetHeight;const{top:M,left:P,height:L,width:E}=k,{offset:O,position:Q}=l;Q==="top"||Q==="bottom"?(v=P+E/2-l.width/2+O.x,q=Q==="bottom"?M+document.documentElement.scrollTop+L+15+O.y:M+document.documentElement.scrollTop-(h.value+L)+O.y):(q=M+document.documentElement.scrollTop-h.value/2+O.y+L/2,v=Q==="right"?P+(E+15)+O.x:P-(l.width+15)+O.x),T.value.left=Math.trunc(v)+"px",T.value.top=Math.trunc(q)+"px",b(k),B.disconnect()},{threshold:1});B.observe(o.value)};e.onMounted(()=>{e.nextTick(()=>y()),window.addEventListener("resize",y)}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",y)}),e.watch(a,()=>{a.value&&y()});const m=e.ref(),b=B=>{if(!l.useHoverBuffer||!a.value)return;const x=Math.trunc(B.width),k=Math.trunc(B.height),v=Math.trunc(h.value);l.position==="left"||l.position==="right"?m.value={height:v+"px",width:Math.trunc(x*.5+8)+"px",top:v*-.5+k/2+(l.offset.y||0),left:(l.position==="right"?x:-x)+(l.offset.x||0)}:m.value={height:k+"px",width:l.width+"px",top:(l.position==="bottom"?k-8:-k)+(l.offset.y||0),left:l.width*-.5+x/2+(l.offset.x||0)},m.value.top=m.value.top+B.top+"px",m.value.left=m.value.left+B.left+"px"};return(B,x)=>(e.openBlock(),e.createElementBlock("div",Zo,[e.createElementVNode("div",_o,[e.createElementVNode("div",{class:e.normalizeClass(["tooltip-container",{scrollable:t.scrollableY,"content--hidden":!g.value,disabled:t.disabled}])},[e.createElementVNode("div",{ref_key:"triggerEl",ref:o,onMouseenter:x[0]||(x[0]=k=>a.value=!t.disabled),onMouseleave:x[1]||(x[1]=k=>f(!1)),onClick:x[2]||(x[2]=e.withModifiers(k=>d.value=!t.disabled&&!t.preventClickOverride,["stop"])),class:"tooltip-trigger"},[e.renderSlot(B.$slots,"trigger",{},()=>[t.useHoverIcon?(e.openBlock(),e.createBlock(W,{key:0,icon:c.value.icon,color:c.value.color,size:t.size,style:e.normalizeStyle(c.value.style),class:e.normalizeClass([{"icon--help":t.helpMode},"tooltip-icon"])},null,8,["icon","color","size","style","class"])):e.createCommentVNode("",!0)],!0),a.value&&t.useHoverBuffer?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(m.value),class:"hover-buffer"},null,4)):e.createCommentVNode("",!0)],544),(e.openBlock(),e.createBlock(e.Teleport,{to:"#app"},[e.withDirectives(e.createElementVNode("div",{ref_key:"dropdownEl",ref:n,onMouseenter:x[4]||(x[4]=k=>a.value=t.useHoverBuffer||d.value),onMouseleave:x[5]||(x[5]=k=>f(!d.value)),style:e.normalizeStyle(s.value),class:e.normalizeClass([[t.position,{solid:t.solid,"offset-triangle":t.offsetTriangle}],"tooltip-content"])},[e.renderSlot(B.$slots,"default",{},()=>[e.createElementVNode("span",{innerHTML:t.content},null,8,el)],!0),d.value?(e.openBlock(),e.createBlock(W,{key:0,onClick:x[3]||(x[3]=e.withModifiers(k=>f(!0),["stop"])),icon:"emojione-monotone:heavy-multiplication-x",size:"8px",class:"tooltip-close__icon"})):e.createCommentVNode("",!0)],38),[[e.vShow,g.value]])]))],2)]),g.value?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:x[6]||(x[6]=e.withModifiers(k=>f(!0),["stop"])),class:"backdrop-overlay"})):e.createCommentVNode("",!0)]))}},[["__scopeId","data-v-8352fd20"]]);function tl(t,i){const l=e.ref(),o=e.ref(),n=e.ref(!1),r=e.computed(()=>["phone","tel"].includes(i));if(!r.value)return{formattedNumber:null,cleanedNumber:null,isValidPhone:null,isValidPhoneAndFormat:null,enforceValidChars:null,isPhoneInput:r};e.watch(t,()=>{r.value&&(l.value=t.value)},{immediate:!0}),e.watch(l,()=>{var g;if(o.value=(g=l.value)==null?void 0:g.replace(/\D/g,""),l.value)if(n.value)n.value=!1;else{const T=o.value.match(/^(1|)?(\d{1,3})?(\d{1,3})?(\d{1,4})?$/);T&&(l.value=["1 (",T[2],") ",T[3],"-",T[4]].join(""))}},{immediate:!0});const s=g=>g.match(/^(1)(\d{3})(\d{3})(\d{4})$/)!=null,c=g=>g.match(/^(1) (\(\d{3}\)) (\d{3})\-(\d{4})$/)!=null,a=e.computed(()=>s(o.value)),d=e.computed(()=>c(o.value)),f=g=>{const T=Number.isInteger(Number.parseInt(g)),h=g==" ",y=g=="("||g==")",m=g=="-";return T&&!h&&!y&&!m};return{formattedNumber:l,cleanedNumber:o,isValidPhone:a,isValidPhoneAndFormat:d,enforceValidChars:g=>{var h,y;const T=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Shift","Delete","Tab"].includes(g.key);if(isNaN(Number(g.key))&&!T||g.key===null||g.key===" "||g.which===229)return g.preventDefault(),g.stopPropagation(),!1;if(T){((y=(h=g==null?void 0:g.target)==null?void 0:h.value)==null?void 0:y.length)>0&&(n.value=!0);return}f(g.key)||g.preventDefault()},isPhoneInput:r}}const ol={key:0},Ie={__name:"InputEditMode",props:{useEditMode:{type:Boolean,required:!0,tsType:"boolean",description:"Shows slot based on edit mode."},value:{type:null,required:!0,tsType:"any",description:"Input value."},label:{type:String,required:!0,tsType:"string",description:"Label to be shown in edit mode."},showLabelOnEditMode:{type:Boolean,required:!0,tsType:"boolean",description:"Shows a label when in edit mode."}},setup(t){const i=t,l=e.computed(()=>typeof i.value=="boolean"?i.value?"Enabled":"Disabled":i.value);return(o,n)=>t.useEditMode?e.renderSlot(o.$slots,"default",{key:0}):e.renderSlot(o.$slots,"view-mode",{key:1},()=>[t.showLabelOnEditMode?(e.openBlock(),e.createElementBlock("span",ol,e.toDisplayString(t.label)+": ",1)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(l.value),1)])}},ll={class:"qst-img__wrapper"},nl=["src","alt"],il=["src","width","alt"],he=F({__name:"QstImg",props:{src:{type:String,required:!0,tsType:"string",description:"The source of image that will be displayed."},alt:{type:String,required:!1,default:null,tsType:"string",description:"Alt text for the image."},width:{type:String,required:!1,default:"100px",tsType:"string",description:"The width of the image set in px."},height:{type:String,required:!1,default:"auto",tsType:"string",description:"The height of the image set in px."},lazyLoad:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Utilizes Intersection Observer to lazy load images, only when the image is in the viewport."},hoverImage:{type:String,required:!1,default:null,tsType:"string",description:"The source of the image that will be showed when hovering over the image src."},circle:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Shows the image in a circle."},useZoom:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"When the user clicks the image, a modal will open with a zoomed image."},zoomWidth:{type:Number,required:!1,default:null,tsType:"number",description:"The width of the zoomed image."}},setup(t){const i=t,l=e.computed(()=>({width:i.width,height:i.height,borderRadius:i.circle?"50%":""})),o=e.ref(!1),n=u=>{o.value=!!i.hoverImage&&u},r=e.computed(()=>{const g=d.value?i.src:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";return o.value?i.hoverImage:g}),s=e.ref(),c=e.ref(!1);e.watch(c,()=>{document.body.style.overflow=c.value?"hidden":"auto"});const a=e.ref(),d=e.ref(!0),f=new IntersectionObserver(u=>{d.value=u[0].isIntersecting},{threshold:1});return e.onMounted(()=>{i.lazyLoad&&a.value&&f.observe(a.value)}),e.watch(d,()=>{d.value&&f.disconnect()}),(u,g)=>(e.openBlock(),e.createElementBlock("div",ll,[e.createElementVNode("picture",e.mergeProps(u.$attrs,{ref_key:"pictureEl",ref:a,onMouseenter:g[0]||(g[0]=T=>n(!0)),onMouseleave:g[1]||(g[1]=T=>n(!1)),onClick:g[2]||(g[2]=T=>c.value=t.useZoom),class:{"cursor-pointer":t.useZoom}}),[e.createElementVNode("img",{src:r.value,alt:t.alt,style:e.normalizeStyle(l.value)},null,12,nl)],16),t.useZoom?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[e.withDirectives(e.createElementVNode("div",{onClick:g[3]||(g[3]=T=>c.value=!1),class:"backdrop-overlay overlay-bg"},[e.createElementVNode("img",{ref_key:"zoomImageEl",ref:s,src:r.value,width:t.zoomWidth,alt:t.alt,class:"zoom-image"},null,8,il)],512),[[e.vShow,c.value]])])):e.createCommentVNode("",!0)]))}},[["__scopeId","data-v-6f9eda84"]]),rl=["type","min","max"],sl=F({__name:"QstDatepicker",props:{modelValue:{type:[String,Object],required:!1,default:null,tsType:"string",description:"Used for datepicker v-model, do not pass anything in. Any format can be passed in, the emitted value will be a Date object."},type:{type:String,required:!1,default:"datepicker",tsType:"string",description:"The type of datepicker: datepicker, datetimepicker, or timepicker."},minDate:{type:[String,Object],required:!1,default:"",tsType:"string | Date object",description:"The minimum date that can be selected, all prior dates will be disabled for datepicker."},maxDate:{type:[String,Object],required:!1,default:"",tsType:"string | Date object",description:"The maximum date that can be selected, all dates after will be disabled for datepicker."},defaultTime:{type:String,required:!1,default:"",tsType:"string",description:"Default time value when using datetimepicker or timepicker (HH:mm, use 24 hour format)."}},emits:["update:modelValue"],setup(t,{emit:i}){const l=t,o=i,n=e.ref(),r=e.computed(()=>{switch(l.type){case"datepicker":return"date";case"datetimepicker":return"datetime-local";case"timepicker":return"time"}}),s=(f=null)=>{const u=f||l.defaultTime||`${new Date().getHours()}:${new Date().getMinutes()}`,[g,T]=u.split(":");return String(g).padStart(2,"0")+":"+String(T).padStart(2,"0")},c=f=>{if(!f||f.toString()==="Invalid Date")return;const u={year:"numeric",month:"2-digit",day:"2-digit"},h=new Intl.DateTimeFormat("en-US",{...u,timeZone:"America/New_York"}).formatToParts(f).reduce((y,m)=>(y[m.type]||(y[m.type]=m.value),y),{year:null,month:null,day:null});return`${h.year}-${h.month}-${h.day}`},a=f=>{if(!f)return;if(l.type==="timepicker")return s(f);const u=new Date(f);if(l.type==="datepicker")return c(u);if(l.type==="datetimepicker")return`${c(u)}T${s(`${u.getHours()}:${u.getMinutes()}`)}`},d=()=>{if(!l.modelValue)if(l.type==="timepicker")n.value=s();else{const f=a(new Date);if(l.minDate&&f<a(l.minDate))n.value=a(l.minDate);else if(l.maxDate&&f>a(l.maxDate)){const u=new Date(l.maxDate);n.value=a(u==null?void 0:u.setDate(u.getDate()-1))}else n.value=f}};return e.watch(n,()=>{const f=l.type==="datepicker"?`${n.value}T00:00:00`:n.value;o("update:modelValue",l.type==="timepicker"?f:new Date(f))}),e.watch(()=>l.modelValue,()=>{n.value!==l.modelValue&&(n.value=a(l.modelValue))},{immediate:!0}),(f,u)=>e.withDirectives((e.openBlock(),e.createElementBlock("input",{"onUpdate:modelValue":u[0]||(u[0]=g=>n.value=g),onFocus:d,type:r.value,min:a(t.minDate),max:a(t.maxDate),class:e.normalizeClass([{"datepicker--val":!!n.value},"qst-input"])},null,42,rl)),[[e.vModelDynamic,n.value]])}},[["__scopeId","data-v-23586e76"]]),It=t=>{const i=/(<([^>]+)>)| /gi;return t.replace(i,"")},re=t=>JSON.parse(JSON.stringify(t)),me=()=>crypto.randomUUID(),At=(t,i)=>Array.isArray(t)?t.length-i.length:typeof t=="number"?t-i:typeof t=="string"?t.localeCompare(i):t-i,Ge=t=>{const i=t.toString(16);return i.length==1?"0"+i:i},al=(t,i,l,o="00")=>{let n="#"+Ge(t)+Ge(i)+Ge(l);return o!=="00"&&(n+=o),n},dl=(t,i,l="00")=>{if(!t)return;t[0]=="#"&&(t=t.slice(1));const o=parseInt(t,16);let n=(o>>16)+i;n=n>255?255:n<0?0:n;let r=(o>>8&255)+i;r=r>255?255:r<0?0:r;let s=(o&255)+i;return s=s>255?255:s<0?0:s,al(n,r,s,l)},cl=["id"],ul=["id"],fl=["id","min","max","step"],pl=["id","type","step"],hl={class:"input-icon__container"},ml={class:"qst-input--count"},gl=["innerHTML"],yl=["innerHTML"],ne=F({__name:"QstInput",props:{modelValue:{type:[String,Number,Object],default:"",tsType:"string | number | Date",description:"Used for v-model, will be set to the input value."},type:{type:String,required:!1,default:"text",tsType:"text | password | email | number | phone | tel | textarea | datepicker | datetimepicker | timepicker | decimal | number-string | money",description:'Sets the input type that is going to be used. *(type="number" will be a number data type. to use number characters with a string data type (ex/ to start a number with 0) use type="number-string")*'},width:{type:String,required:!1,default:null,tsType:"string",description:"The width of the input."},size:{type:String,required:!1,default:"14px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},color:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The accent color, used for details within the component."},placeholder:{type:[String,Number],required:!1,default:"",tsType:"string | number",description:"Placeholder for the input. The placeholder text will be shown as a label, in order to show an animation when focusing the input."},labelPosition:{type:String,required:!1,default:"mid",tsType:"mid | outside",description:"The position of the label relative to the input when it has a value."},icon:{type:String,required:!1,default:"",tsType:"string",description:'Any Iconify value, the icon will be shown on the right side of the input. Input types such as "phone", "email", and "password" will show an icon by default.'},useClearIcon:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Adds X icon to the right of the input, clicking it clears the v-model value. Overrides any other previously set icons."},disabled:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Disables the input."},disabledReason:{type:String,required:!1,default:"",tsType:"string",description:"When the input is disabled, the disabledReason will show in a tooltip when hovering over the input."},disabledTooltipPosition:{type:String,required:!1,default:"right",tsType:"string",description:"Tooltip dropdown position when the disabled reason is visible."},tooltip:{type:[String,Object],required:!1,default:null,tsType:"string | {content: string, isHelpMode?: boolean, offset?: object, width?: number}",description:"A tooltip icon will show on the inner right side of the input, the tooltip dropdown will default to match input dimensions. *(if width and offset are not set)* Set to a string or object, based on if tooltip props are needed. *(ex/ offset, width, position, etc)*"},useEditMode:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Whether the input should be editable or not."},showLabelOnEditMode:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"If the label will be displayed when the input is in edit mode."},error:{type:String,required:!1,default:null,tsType:"string",description:"Shows an error message, displayed on the top right of the input border by default."},useErrorIcon:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"An error icon will be displayed on the right of the input, hovering over will show a tooltip with the error message."},showErrorInline:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"The error message will show inside the input."},showErrorBelow:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"The error message will show on the bottom right border of the input."},blockedChars:{type:Array,required:!1,default:()=>[],tsType:"string[]",description:"Characters that will users will be prevented from entering into the input."},maxChars:{type:Number,required:!1,default:-1,tsType:"number",description:"The maximum number of characters that the input can have."},showMaxChars:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Shows a counter on the right side of the input for the maxChars."},minNum:{type:Number,required:!1,default:-1/0,tsType:"number",description:"The minimum number that can be entered, when using a number or decimal input type."},maxNum:{type:Number,required:!1,default:1/0,tsType:"number",description:"The maximum number that can be entered, when using a number or decimal input type."},maxDecimals:{type:Number,required:!1,default:-1,tsType:"number",description:"The maximum amount of decimal places, when using a decimal input type."},step:{type:Number,required:!1,default:1,tsType:"number",description:"The amount the value will be incremented/decremented, when using a number or decimal input type."},hideArrowButtons:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Hides the default arrow buttons used to increment/decrement value, when using a number or decimal input type."},minDate:{type:[String,Object],required:!1,default:"",tsType:"string | date object",description:"The minimum date that can be selected when using a datepicker input type. All prior dates will be disabled. *(format: MM/DD/YYYY)*"},maxDate:{type:[String,Object],required:!1,default:"",tsType:"string | date object",description:"The maximum date that can be selected when using a datepicker input type. All future dates will be disabled. *(format: MM/DD/YYYY)*"},useDatepickerRange:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"When using the datepicker, select a range of dates instead of a single date."},defaultTime:{type:String,required:!1,default:"",tsType:"string",description:"Default time when using datetimepicker or timepicker. *(format: HH:mm)*"},image:{type:String,required:!1,default:"",tsType:"string",description:"Image to be displayed in the input from the selected option. (Select/Autocomplete only)"},hideImage:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Hides the Select/Autocomplete image. *(ex/ when user is searching in a Select/Autocomplete)*"},useSlackDropdown:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"When user types @ symbol, a dropdown for all slack users will appear."},darkMode:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Changes the styles to a dark theme."}},emits:["update:modelValue","blur","on-enter","on-input-clear","on-icon-click"],setup(t,{expose:i,emit:l}){e.useCssVars(S=>({"5dba2c88":t.color,"8d4db08c":o.size}));const o=t,n=l,r=e.ref(),s=e.ref(me()),c=e.computed(()=>!!o.image&&!o.hideImage),a=e.computed(()=>o.useErrorIcon&&!!o.error),d=e.computed(()=>!o.hideArrowButtons&&["number","decimal"].includes(o.type)),f=e.computed(()=>{var S;return{"width--override":!!o.width,"mobile-transform--disable":parseInt(o.size)>16,"input--datepicker":U.value,"input--textarea":o.type==="textarea","input--filled":B.value,disabled:o.disabled,"edit-mode--disabled":!o.useEditMode,"error--visible":!!o.error,"image--visible":c.value,"icon--visible":x.value&&!!L.value&&!o.useClearIcon,"arrows--visible":d.value,"arrows--hidden":o.hideArrowButtons||a.value,"input--slack":o.useSlackDropdown,[`label--${o.labelPosition}`]:!!o.labelPosition,[`max-chars-${o.maxChars.toString().length}`]:o.showMaxChars&&o.maxChars>0&&((S=o.maxChars)==null?void 0:S.toString().length)>1,dark:o.darkMode}}),u=e.ref(),g=(S,A=!1)=>{var Y;const z=((Y=S==null?void 0:S.toString())==null?void 0:Y.length)||0;return o.maxChars>-1&&(A?z>=o.maxChars:z>o.maxChars)},T=S=>{!["Backspace","Tab","Enter","ArrowLeft","ArrowRight","Shift"].includes(S.key)&&!(["c","v"].includes(S.key)&&S.ctrlKey)&&(g(b.value,!0)&&S.preventDefault(),o.type==="decimal"&&V(b.value)&&S.preventDefault(),["decimal","number"].includes(o.type)&&isNaN(+S.key)&&![".","-"].includes(S.key)&&S.preventDefault(),["number-string","money"].includes(o.type)&&isNaN(+S.key)&&S.preventDefault()),o.blockedChars.includes(S.key)&&S.preventDefault(),o.type!=="textarea"&&S.key==="Enter"&&n("on-enter")},h=(S=!1)=>{var A;(A=m.value)==null||A.focus({preventScroll:S})},y=()=>{m.value&&(m.value.disabled=o.disabled)};e.watch(()=>o.disabled,()=>{y()}),e.watch(()=>o.useEditMode,()=>{o.useEditMode&&o.disabled&&e.nextTick(()=>y())}),e.onMounted(()=>{y(),b.value!==o.modelValue&&(b.value=o.modelValue)}),i({focusInput:h,id:s});const m=e.ref(),b=e.ref(),B=e.computed(()=>{var S;return!!b.value||b.value===0||((S=m.value)==null?void 0:S.matches(":-webkit-autofill"))});e.watch(()=>o.modelValue,()=>{b.value!==o.modelValue&&(b.value=o.modelValue)},{immediate:!0}),e.watch(b,(S,A)=>{if(u.value&&(!b.value||b.value.length!==o.maxChars)&&(u.value=""),B.value){if(["decimal","number"].includes(o.type)&&(b.value<o.minNum||b.value>o.maxNum)&&(b.value=A),o.type==="decimal"&&V(b.value)){const z=b.value.toString().match(/^-?\d+(?:\.\d{0,2})?/)[0];b.value=parseFloat(z)}if(o.type==="money"){let z=b.value.toString().split("").filter(le=>!isNaN(+le));z.length<3&&(z=z.length===2?["0",...z]:["0","0",...z]),z.splice([z.length-2],0,".");const Y=z.slice(0,z.indexOf("."));Y.length>1&&Y[0]==="0"&&z.shift(),b.value=`$${z.join("")}`}o.type==="number-string"&&b.value.split("").some(z=>isNaN(parseInt(z)))&&(b.value=""),g(b.value)&&(b.value=b.value.slice(0,o.maxChars),u.value=`<b>Max Characters: ${o.maxChars}</b>`)}b.value===S&&n("update:modelValue",S)});const x=e.computed(()=>!!q.value&&(!o.showErrorInline||!o.error)),k=e.ref(!1),v=()=>{if(!o.disabled){if(o.useClearIcon)J.value?H.value="":(b.value="",n("on-input-clear"));else if(o.type==="password"){k.value=!k.value;return}else n("on-icon-click");h()}},q=e.computed(()=>{if(o.useClearIcon)return"ic:round-clear";if(o.icon)return o.icon;switch(o.type){case"password":return k.value?"bi:eye-slash":"bi:eye";case"email":return"fontisto:email";case"phone":case"tel":return"clarity:phone-handset-solid";case"datepicker":case"datetimepicker":case"timepicker":return"meteor-icons:calendar"}});e.watch(k,()=>{m.value.type=k.value?"text":"password",e.nextTick(()=>h())});const M=e.useSlots(),P=e.ref(),L=e.computed(()=>{if(!o.tooltip)return;const{tooltip:S}=o,A=!!M["input-icon"],z=(S==null?void 0:S.width)||P.value,Y=(d.value||A?-1.25:-.4)*parseInt(o.size);return{...typeof S=="string"?{content:S}:{...S,helpMode:S.isHelpMode},width:z,offset:(S==null?void 0:S.offset)||{x:-(Y+z/2-8),y:0}}}),E=e.ref(),O=e.computed(()=>{var S;return((S=E.value)==null?void 0:S.isShowing)===!0}),Q=e.ref(!1);e.watch(O,()=>{var S;O.value&&!Q.value&&(P.value=parseInt((S=getComputedStyle(r.value))==null?void 0:S.width),Q.value=!0)});const U=e.computed(()=>["datepicker","datetimepicker","timepicker"].includes(o.type)),{isPhoneInput:J,formattedNumber:H,enforceValidChars:K}=tl(b,o.type);H!==null&&e.watch(H,()=>b.value=H.value);const V=S=>{var z;return o.maxDecimals<0||Math.floor(S)===S?!1:(((z=S==null?void 0:S.toString().split(".")[1])==null?void 0:z.length)||0)>=o.maxDecimals},C=S=>{!o.hideArrowButtons&&S.target.value&&parseInt(S.target.value)!==b.value&&(b.value=S.target.value)},$=e.ref(),j=e.ref(!1),ee=e.computed(()=>{if(!o.useSlackDropdown)return;const S=document.activeElement;return!!S&&["INPUT","TEXTAREA"].includes(S.tagName)&&s.value===(activeElement==null?void 0:activeElement.id)});return e.watch(ee,()=>{var S;j.value=!!((S=$.value)!=null&&S.slackInputValue)&&!ee.value&&!j.value}),(S,A)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"inputWrapperEl",ref:r,style:e.normalizeStyle({width:t.width,fontSize:t.size}),class:e.normalizeClass([f.value,"qst-input__wrapper"])},[t.disabled&&t.disabledReason?(e.openBlock(),e.createBlock(te,{key:0,content:t.disabledReason,position:t.disabledTooltipPosition,class:"input-tooltip--disabled"},{trigger:e.withCtx(()=>A[13]||(A[13]=[e.createElementVNode("div",null,null,-1)])),_:1},8,["content","position"])):e.createCommentVNode("",!0),e.createVNode(Ie,{"use-edit-mode":t.useEditMode,value:t.modelValue,label:t.placeholder,"show-label-on-edit-mode":t.showLabelOnEditMode},{"view-mode":e.withCtx(()=>[e.renderSlot(S.$slots,"view-mode",{},void 0,!0)]),default:e.withCtx(()=>[c.value?(e.openBlock(),e.createBlock(he,{key:0,src:t.image,width:"1.5em",height:"1.5em",circle:"",class:"input-image"},null,8,["src"])):e.createCommentVNode("",!0),e.createElementVNode("label",{onClick:A[0]||(A[0]=z=>h()),class:"label"},e.toDisplayString(t.placeholder),1),t.type==="textarea"?e.withDirectives((e.openBlock(),e.createElementBlock("textarea",e.mergeProps({key:1,ref_key:"input",ref:m,id:s.value,"onUpdate:modelValue":A[1]||(A[1]=z=>b.value=z)},S.$attrs,{placeholder:"",onClick:A[2]||(A[2]=z=>h()),onKeydown:T,class:"qst-input"}),null,16,cl)),[[e.vModelText,b.value,void 0,{trim:!0}]]):e.unref(J)?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:2,ref_key:"input",ref:m,id:s.value,"onUpdate:modelValue":A[3]||(A[3]=z=>e.isRef(H)?H.value=z:null),type:"tel",maxlength:"16",onKeydown:A[4]||(A[4]=(...z)=>e.unref(K)&&e.unref(K)(...z)),onBlur:A[5]||(A[5]=z=>n("blur",b.value)),class:"qst-input"},null,40,ul)),[[e.vModelText,e.unref(H)]]):U.value?(e.openBlock(),e.createBlock(sl,e.mergeProps({key:3,modelValue:b.value,"onUpdate:modelValue":A[6]||(A[6]=z=>b.value=z)},S.$attrs,{id:s.value,disabled:t.disabled,type:t.type,"min-date":t.minDate,"max-date":t.maxDate,"use-range":t.useDatepickerRange,"default-time":t.defaultTime,placeholder:""}),null,16,["modelValue","id","disabled","type","min-date","max-date","use-range","default-time"])):t.type==="number"||t.type==="decimal"?e.withDirectives((e.openBlock(),e.createElementBlock("input",e.mergeProps({key:4,ref_key:"input",ref:m,id:s.value,"onUpdate:modelValue":A[7]||(A[7]=z=>b.value=z)},S.$attrs,{placeholder:"",type:"number",min:t.minNum,max:t.maxNum,step:t.type==="decimal"?".01":t.step,onClick:A[8]||(A[8]=z=>h()),onBlur:A[9]||(A[9]=z=>n("blur",b.value)),onChange:C,onKeydown:T,class:"qst-input"}),null,16,fl)),[[e.vModelText,b.value,void 0,{number:!0}]]):e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:5,ref_key:"input",ref:m,id:s.value,"onUpdate:modelValue":A[10]||(A[10]=z=>b.value=z),placeholder:"",type:t.type,step:t.step,autocomplete:"off",onClick:A[11]||(A[11]=z=>h()),onBlur:A[12]||(A[12]=z=>n("blur",b.value)),onKeydown:T,class:"qst-input"},null,40,pl)),[[e.vModelDynamic,b.value,void 0,{trim:!0}]]),e.createElementVNode("div",hl,[a.value?(e.openBlock(),e.createBlock(te,{key:0,solid:"",class:"error-icon__tooltip"},{trigger:e.withCtx(()=>[e.createVNode(W,{icon:"bi:exclamation-circle-fill",color:"#CA0F11",size:t.size},null,8,["size"])]),default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(t.error),1)]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[x.value?(e.openBlock(),e.createBlock(W,{key:0,icon:q.value,size:t.size,onClick:e.withModifiers(v,["stop"]),color:"#949494",class:"icon"},null,8,["icon","size"])):e.createCommentVNode("",!0),t.showMaxChars&&t.maxChars>-1?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle({fontSize:t.size}),class:"max-chars__container"},[e.createElementVNode("span",ml,e.toDisplayString(b.value.toString().length)+" / "+e.toDisplayString(t.maxChars),1)],4)):e.createCommentVNode("",!0),L.value&&!t.useClearIcon?(e.openBlock(),e.createBlock(te,e.mergeProps({key:2,ref_key:"infoTooltipEl",ref:E},L.value,{size:t.size,class:"info-tooltip"}),null,16,["size"])):e.createCommentVNode("",!0),e.renderSlot(S.$slots,"input-icon",{},void 0,!0)],64))])]),_:3},8,["use-edit-mode","value","label","show-label-on-edit-mode"]),t.error&&!t.useErrorIcon?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass([{"input-error--bottom":t.showErrorBelow,"input-error--inline":t.showErrorInline},"input-error"])},[e.createElementVNode("span",null,[A[14]||(A[14]=e.createTextVNode(" *")),e.renderSlot(S.$slots,"error",{},()=>[e.createElementVNode("span",{innerHTML:t.error},null,8,gl)],!0),A[15]||(A[15]=e.createTextVNode("*"))])],2)):u.value?(e.openBlock(),e.createElementBlock("span",{key:2,innerHTML:u.value,class:"input-error input-error--bottom"},null,8,yl)):e.createCommentVNode("",!0)],6))}},[["__scopeId","data-v-986b71ee"]]),bl=["disabled"],wl=["disabled"],ge=F({__name:"QstButton",props:{color:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The background color of the button."},fontColor:{type:String,required:!1,default:"#fff",tsType:"string",description:"The color of the button text or icon."},size:{type:String,required:!1,default:"",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},icon:{type:String,required:!1,default:null,tsType:"string",description:"Iconify value for the icon."},useIconBtn:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Creates a button element to appear as only an icon."},circle:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Creates a circular button. *(primarily used with icons)*"},tooltip:{type:[String,Object],required:!1,default:null,tsType:"string | {content: string, isHelpMode?: boolean, offset?: object, width?: number}",description:"Shows a tooltip dropdown when hovering over the button. Set to a string or object, based on if tooltip props are needed. *(ex/ offset, width, position, etc)*"},disabled:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Disables the button, shows grayed out and unclickable."}},setup(t){e.useCssVars(n=>({"04f7a376":t.fontColor}));const i=t,l=e.computed(()=>({circle:i.circle,"side-icon":!i.circle&&!!i.icon&&!i.useIconBtn,"btn--clear":!i.color||i.color==="transparent"||i.useIconBtn})),o=e.computed(()=>{if(!i.tooltip)return;const{tooltip:n}=i;return typeof n=="string"?{content:n}:{...n,helpMode:n.isHelpMode}});return(n,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({fontSize:t.size,"--btn-color":t.color}),class:e.normalizeClass([l.value,"qst-btn__wrapper"])},[o.value?(e.openBlock(),e.createBlock(te,e.mergeProps({key:0},o.value,{"use-hover-icon":!1,"prevent-click-override":""}),{trigger:e.withCtx(()=>[e.createElementVNode("button",e.mergeProps(n.$attrs,{disabled:t.disabled,class:"qst-btn"}),[t.icon?(e.openBlock(),e.createBlock(W,{key:0,icon:t.icon,color:t.fontColor,size:t.size,class:"qst-btn__icon"},null,8,["icon","color","size"])):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"default",{},void 0,!0)],16,bl)]),default:e.withCtx(()=>[e.renderSlot(n.$slots,"tooltip-content",{},()=>[e.createTextVNode(e.toDisplayString(o.value.content),1)],!0)]),_:3},16)):(e.openBlock(),e.createElementBlock("button",{key:1,disabled:t.disabled,class:"qst-btn"},[t.icon?(e.openBlock(),e.createBlock(W,{key:0,icon:t.icon,color:t.fontColor,size:t.size,class:"qst-btn__icon"},null,8,["icon","color","size"])):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"default",{},void 0,!0)],8,wl))],6))}},[["__scopeId","data-v-a92fa59a"]]),kl={class:"loader-container"},Sl=["src"],Tl=["innerHTML"],Ae=F({__name:"QstLoader",props:{loaderSrc:{type:String,required:!1,default:null,tsType:"string",description:"The image/gif that will be used for the loader."},color:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The color when using the default loader icon."},subtext:{type:String,required:!1,default:null,tsType:"string",description:"Optional text to show below the loader."},size:{type:String,required:!1,default:"14px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},center:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Aligns the loader to be centered relative to its parent container."},absolute:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Creates a loader with a backdrop using position absolute to fill the nearest parent container with position relative."},fullPage:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Creates a full page fixed loader with backdrop."},useBackdrop:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Shows a backdrop for full page and absolute loaders."},useClearBackdrop:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"When showing a backdrop, uses a transparent backdrop instead of a colored one."}},setup(t){const i=t,l=e.computed(()=>({center:i.center,absolute:i.absolute,"full-page":i.fullPage,"backdrop--visible":i.useBackdrop,"subtext--visible":!!i.subtext,"clear-backdrop":i.useClearBackdrop}));return(o,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({fontSize:t.size}),class:e.normalizeClass([l.value,"loader-wrapper"])},[e.createElementVNode("div",kl,[t.loaderSrc?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.loaderSrc,class:"loader-img"},null,8,Sl)):(e.openBlock(),e.createBlock(W,{key:1,icon:"eos-icons:three-dots-loading",size:t.size,color:t.color,class:"loader-icon"},null,8,["size","color"])),t.subtext?(e.openBlock(),e.createElementBlock("p",{key:2,innerHTML:t.subtext,class:"loader-subtext"},null,8,Tl)):e.createCommentVNode("",!0)])],6))}},[["__scopeId","data-v-fe18eb42"]]),Vl={key:0,class:"qst-modal__inner"},xl={class:"qst-modal__header"},Bl={key:1,class:"qst-modal__content"},vl={class:"qst-modal__action"},Cl={key:0},zt=F({__name:"QstModal",props:{modelValue:{type:Boolean,required:!0,tsType:"boolean",description:"Used for v-model, will be set to whether the modal is showing."},width:{type:String,required:!1,default:"550px",tsType:"string",description:"The width of the modal, set in px."},height:{type:String,required:!1,default:"650px",tsType:"string",description:"The height of the modal, set in px."},size:{type:String,required:!1,default:"14px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},color:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The accent color, used for details within the component."},useLoader:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"When true, shows a loader in the modal."},hideTitle:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Hides the modal title."},hideFooter:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Hides the modal footer row."},showSubmitBtn:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Shows submit button in the modal footer."},showCancelBtn:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Shows cancel button in the modal footer."},submitBtnText:{type:String,required:!1,default:"Submit",tsType:"string",description:"The text to be shown on the submit/save/confirmation button."},cancelBtnText:{type:String,required:!1,default:"Cancel",tsType:"string",description:"The text to be shown on the cancel button."},closeOnSubmit:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"The modal will be closed when the submit button is clicked."},hideScroll:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"If the modal has overflow, the scrollbar will be hidden."},darkMode:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Changes the styles to a dark theme."}},emits:["update:modelValue","on-confirm","on-cancel"],setup(t,{emit:i}){e.useCssVars(f=>({c026cc82:l.width,"43d7a44e":l.height}));const l=t,o=i,n=e.ref(),r=e.ref(!1),s=e.ref();e.watch(r,()=>{var f,u;r.value?(s.value=document.documentElement.scrollTop||0,(f=n.value)==null||f.show(),document.body.style.overflow="hidden"):((u=n.value)==null||u.close(),document.body.style.overflow="",s.value&&(document.documentElement.scrollTop=s.value)),r.value!==l.modelValue&&o("update:modelValue",r.value)}),e.watch(()=>l.modelValue,()=>{l.modelValue!==r.value&&(r.value=l.modelValue)});const c=()=>{l.closeOnSubmit&&(r.value=!1),o("on-confirm")},a=()=>{o("on-cancel"),r.value=!1},d=f=>{const u=n.value.getBoundingClientRect(),{top:g,left:T,height:h,width:y}=u,{clientX:m,clientY:b}=f;!(g<=b&&b<=g+h&&T<=m&&m<=T+y)&&a()};return(f,u)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"#app"},[e.createElementVNode("dialog",{ref_key:"modalEl",ref:n,onClick:d,style:e.normalizeStyle({fontSize:t.size}),class:e.normalizeClass([{"scroll--hidden":t.hideScroll,dark:t.darkMode},"qst-modal"])},[r.value?(e.openBlock(),e.createElementBlock("div",Vl,[e.createElementVNode("div",xl,[e.createElementVNode("div",null,[e.withDirectives(e.createElementVNode("span",null,[e.renderSlot(f.$slots,"title",{},void 0,!0)],512),[[e.vShow,!t.hideTitle]])]),e.createVNode(ge,{onClick:a,icon:"emojione-monotone:heavy-multiplication-x",size:t.size,"font-color":t.darkMode?"#fff":"#333","use-icon-btn":""},null,8,["size","font-color"])]),t.useLoader?(e.openBlock(),e.createBlock(Ae,{key:0})):(e.openBlock(),e.createElementBlock("div",Bl,[e.renderSlot(f.$slots,"default",{},void 0,!0)])),e.withDirectives(e.createElementVNode("div",vl,[e.createElementVNode("div",null,[e.renderSlot(f.$slots,"footer-left",{},void 0,!0)]),e.createElementVNode("div",null,[e.renderSlot(f.$slots,"footer",{},()=>[t.useLoader?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Cl,[t.showSubmitBtn?(e.openBlock(),e.createBlock(ge,{key:0,onClick:c,size:t.size,color:t.color},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.submitBtnText),1)]),_:1},8,["size","color"])):e.createCommentVNode("",!0),t.showCancelBtn?(e.openBlock(),e.createBlock(ge,{key:1,onClick:a,size:t.size,color:"#b8b8b8",class:"cancel-btn"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.cancelBtnText),1)]),_:1},8,["size"])):e.createCommentVNode("",!0)]))],!0)])],512),[[e.vShow,!t.hideFooter]])])):e.createCommentVNode("",!0)],6),r.value?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:u[0]||(u[0]=g=>r.value=!1),class:"backdrop-overlay overlay-bg"})):e.createCommentVNode("",!0)]))}},[["__scopeId","data-v-6c12b87f"]]),Nt=F({__name:"QstDropdown",props:{width:{type:String,required:!1,default:"500px",tsType:"string",description:"The width of the dropdown menu, set in px."},openOnHover:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"The dropdown will open when hovering over the trigger, instead of clicking it."},closeOnSelfClick:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Closes the dropdown menu when clicking inside of it."},closeOnOutsideClick:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Closes the dropdown menu when clicking outside of it."},position:{type:String,required:!1,default:"bottom",tsType:"string",description:"The position that the dropdown will open relative to the trigger."},offset:{type:Object,required:!1,default:()=>({x:0,y:0}),tsType:"{x: number, y: number}",description:"Moves the dropdown from its default position. *(+X moves right, -X moves left, +Y moves down, -Y moves up)*"},centerDropdown:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Centers the dropdown based on the trigger. Offset can be used to adjust it from the center position, the triangle will stay centered."},maxHeight:{type:String,required:!1,default:null,tsType:"string",description:"Max height for the dropdown, if exceeded the dropdown will start scrolling."},useTriangle:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Shows a triangle relative to the position of the trigger."},offsetTriangle:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"When the offset is set, the triangle will remain anchored to the trigger by default. If true, the triangle will move with the rest of the offset."}},setup(t,{expose:i}){e.useCssVars(T=>({"42b1a3d3":t.maxHeight}));const l=t,o=e.computed(()=>{var T,h;return{"--offsetPropX":l.offset.x+"px","--offsetPropY":l.offset.y+"px","--triggerHeight":Math.round(((T=c.value)==null?void 0:T.offsetHeight)/2-10)+"px","--triggerWidth":Math.round(((h=c.value)==null?void 0:h.offsetWidth)/2)-10+"px",width:l.width,top:d.value.top,left:d.value.left}}),n=e.computed(()=>({[l.position]:l.position,triangle:l.useTriangle,"offset-triangle":l.offsetTriangle,"center-triangle":l.centerDropdown})),r=e.ref(!1),s=(T,h=!1)=>{(!h||l.openOnHover)&&(r.value=T)},c=e.ref(),a=e.ref(),d=e.ref({}),f=()=>{if(!c.value||!r.value)return;const T=new IntersectionObserver(h=>{var E;const y=h[0].boundingClientRect;let m=0,b=0;const B=(E=a.value)==null?void 0:E.offsetHeight,{top:x,left:k,height:v,width:q}=y,{offset:M,position:P,width:L}=l;P==="top"||P==="bottom"?(m=k+M.x,l.centerDropdown&&(m+=Math.round(-(parseInt(L)/2)+q/2)),b=P==="bottom"?x+document.documentElement.scrollTop+v+15+M.y:x+document.documentElement.scrollTop-(B+v)+M.y):(b=x+document.documentElement.scrollTop-M.y+v/2,l.centerDropdown&&(b-=B/2),m=P==="right"?k+(q+15)+M.x:k-(parseInt(L)+15)+M.x),d.value.left=Math.trunc(m)+"px",d.value.top=Math.trunc(b)+"px",g(y,B),T.disconnect()},{threshold:1});T.observe(c.value)};e.onMounted(()=>{e.nextTick(()=>f()),window.addEventListener("resize",f)}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",f)}),e.watch(r,()=>{r.value&&f()});const u=e.ref(),g=(T,h)=>{if(!l.openOnHover||!r.value)return;const y=Math.trunc(T.width),m=Math.trunc(T.height),b=Math.trunc(h);l.position==="left"||l.position==="right"?u.value={height:b+"px",width:Math.trunc(y*.5+8)+"px",top:l.centerDropdown?b*-.5+m/2:0,left:y*(l.position==="right"?1:-1)}:u.value={height:m+"px",width:l.width,top:m*(l.position==="bottom"?1:-1),left:l.centerDropdown?parseInt(l.width)*-.5+y/2:0},u.value.top=u.value.top+T.top+l.offset.y+"px",u.value.left=u.value.left+T.left+l.offset.x+"px"};return i({isShowing:r}),(T,h)=>(e.openBlock(),e.createElementBlock("div",{onMouseenter:h[5]||(h[5]=y=>s(!0,!0)),onMouseleave:h[6]||(h[6]=y=>s(!1,!0)),onKeydown:h[7]||(h[7]=e.withKeys(y=>s(!1),["esc"])),class:"dropdown-wrapper"},[e.createElementVNode("div",null,[e.createElementVNode("div",{ref_key:"triggerEl",ref:c,onClick:h[0]||(h[0]=e.withModifiers(y=>s(!0),["stop"])),class:"dropdown-heading"},[e.renderSlot(T.$slots,"heading",{isShowing:r.value},()=>[h[8]||(h[8]=e.createTextVNode("Dropdown"))],!0),t.openOnHover&&r.value?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(u.value),class:"hover-buffer"},null,4)):e.createCommentVNode("",!0)],512),(e.openBlock(),e.createBlock(e.Teleport,{to:"#app"},[e.withDirectives(e.createElementVNode("div",{ref_key:"dropdownEl",ref:a,onMouseenter:h[1]||(h[1]=y=>s(!0,!0)),onMouseleave:h[2]||(h[2]=y=>s(!1,!0)),onClick:h[3]||(h[3]=y=>s(!t.closeOnSelfClick)),style:e.normalizeStyle(o.value),class:e.normalizeClass([n.value,"dropdown-content"])},[e.createElementVNode("div",{class:e.normalizeClass({"content--scroll":!!t.maxHeight})},[e.renderSlot(T.$slots,"content",{},()=>[h[9]||(h[9]=e.createTextVNode("Dropdown Content"))],!0)],2)],38),[[e.vShow,r.value]])]))]),r.value&&!t.openOnHover&&t.closeOnOutsideClick?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:h[4]||(h[4]=e.withModifiers(y=>s(!1),["stop"])),class:"backdrop-overlay"})):e.createCommentVNode("",!0)],32))}},[["__scopeId","data-v-dd5d2a37"]]),ql={class:"switch-input"},El=["checked","disabled"],Il={key:1,class:"label-text"},Mt=F({__name:"QstSwitch",props:{modelValue:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Used for v-model, will be set to whether the switch is active."},label:{type:String,required:!1,default:"",tsType:"string",description:"Label displayed to the right of the switch, clicking on the label will toggle the switch."},icon:{type:String,required:!1,default:"",tsType:"string",description:"Any Iconify value, the icon will be displayed to the right of the switch."},color:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The color of the switch when active."},size:{type:String,required:!1,default:"12px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},useEditMode:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Whether the input should be editable or not."},showLabelOnEditMode:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Shows the label when the input is in edit mode."},tooltip:{type:[String,Object],required:!1,default:null,tsType:"string | {content: string, isHelpMode?: boolean, offset?: object, width?: number}",description:"Shows a tooltip icon next to the switch. Set to a string or object, based on if tooltip props are needed. *(ex/ offset, width, position, etc)*"},disabled:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Disables the switch, shows grayed out and unclickable."}},emits:["update:modelValue","change"],setup(t,{emit:i}){const l=t,o=i,n=e.ref();e.watch(n,()=>{l.modelValue!==n.value&&(o("update:modelValue",n.value),o("change",n.value))}),e.watch(()=>l.modelValue,()=>{n.value!==l.modelValue&&(n.value=l.modelValue)},{immediate:!0});const r=()=>{l.disabled||(n.value=!n.value)},s=e.computed(()=>{if(!l.tooltip)return;const{tooltip:c}=l;return typeof c=="string"?{content:c}:{...c,helpMode:c.isHelpMode}});return(c,a)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({fontSize:t.size}),class:e.normalizeClass([{disabled:t.disabled,active:n.value},"qst-switch__wrapper"])},[e.createVNode(Ie,{"use-edit-mode":t.useEditMode,value:t.modelValue,label:t.label,"show-label-on-edit-mode":t.showLabelOnEditMode},{"view-mode":e.withCtx(()=>[e.renderSlot(c.$slots,"view-mode",{},void 0,!0)]),default:e.withCtx(()=>[e.createElementVNode("label",ql,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":a[0]||(a[0]=d=>n.value=d),type:"checkbox",checked:n.value,disabled:t.disabled},null,8,El),[[e.vModelCheckbox,n.value]]),e.createElementVNode("span",{style:e.normalizeStyle({backgroundColor:n.value?t.color:"gray"}),class:"switch-slider"},null,4)]),e.createElementVNode("div",{onClick:r,class:"switch-label"},[t.icon?(e.openBlock(),e.createBlock(W,{key:0,icon:t.icon,class:"label-icon"},null,8,["icon"])):e.createCommentVNode("",!0),t.label?(e.openBlock(),e.createElementBlock("span",Il,e.toDisplayString(t.label),1)):e.createCommentVNode("",!0),s.value?(e.openBlock(),e.createBlock(te,e.mergeProps({key:2},s.value,{size:t.size}),null,16,["size"])):e.createCommentVNode("",!0)])]),_:3},8,["use-edit-mode","value","label","show-label-on-edit-mode"])],6))}},[["__scopeId","data-v-e01bf080"]]),Al={key:0,class:"progress-bar__wrapper"},zl={key:2,class:"horizontal-slider__dots"},Nl={class:"slider-dots"},Ml=["onClick"],Ot=F({__name:"QstScrollContainer",props:{useArrows:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"If the container has overflow, shows arrows on the ends of the container."},useDots:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"If the container has overflow, shows dots per the number of slides."},useProgressBar:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"If the container has overflow, shows a progress bar that fills as the user scrolls towards the end of the container."},width:{type:String,required:!1,default:"",tsType:"string",description:"Width of the entire scroll container."},color:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The accent color, used for details within the component."},size:{type:String,required:!1,default:"20px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated. *(arrows, dots, icons)*"},hideScroll:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"The scrollbar will be hidden."},slideWidth:{type:String,required:!1,default:"",tsType:"string",description:"The width of each slide, defaults to fill entire slide."}},setup(t){e.useCssVars(E=>({"3629f130":i.slideWidth,"028596b0":i.color}));const i=t,l=e.ref(),o=e.ref(),n=e.useSlots(),r=e.computed(()=>{var E,O;return n.default?((O=(E=n.default()[0])==null?void 0:E.children)==null?void 0:O.length)??0:0});e.watch(r,()=>{e.nextTick(()=>q())});const s=e.computed(()=>({"arrows--visible":i.useArrows&&k.value,"progress--visible":i.useProgressBar&&k.value,"scroll--hidden":i.hideScroll,"slide-width":!!i.slideWidth})),c=e.computed(()=>{if(!(!i.useDots||!l.value))return Math.ceil(l.value.scrollWidth/l.value.clientWidth)}),a=E=>{v(l.value.clientWidth*(E-1))},d=E=>{const O=E==="left"?-l.value.offsetWidth:l.value.offsetWidth,Q=o.value.scrollLeft;v(O+Q)},f=e.ref(),u=()=>{if(!l.value)return;const E=l.value.scrollWidth-l.value.clientWidth,O=o.value.scrollLeft*100;f.value=Math.min(Math.round(O/E),100)+"%"},g=e.ref(!1),T=e.ref(0),h=E=>{g.value=!0,T.value=E.pageX-l.value.offsetLeft},y=()=>g.value=!1,m=E=>{var U;if(!g.value)return;const Q=(E.pageX-l.value.offsetLeft-T.value)*2;v(((U=o.value)==null?void 0:U.scrollLeft)-Q)},b=e.ref(1),B=e.ref(!0),x=e.ref(!0),k=e.computed(()=>!!l.value&&l.value.scrollWidth>l.value.clientWidth),v=E=>{var O;(O=o.value)==null||O.scrollTo({left:E,behavior:"smooth"})},q=()=>{if(!l.value)return;const E=Math.round(o.value.scrollLeft);(i.useArrows||i.useProgressBar)&&(B.value=E>0,x.value=E<l.value.scrollWidth-l.value.clientWidth-5,i.useProgressBar&&u()),i.useDots&&(b.value=Math.ceil(E/l.value.clientWidth)+1)},M=e.ref(!1),P=e.ref(!0),L=new IntersectionObserver(E=>{M.value=E[0].isIntersecting},{threshold:1});return e.watch(P,()=>{P.value||L.disconnect()}),e.watch(M,()=>{M.value&&!k.value&&q()}),e.onMounted(()=>{var E,O;(E=o.value)==null||E.addEventListener("scroll",q),q(),P.value=((O=l.value)==null?void 0:O.clientWidth)===0,P.value&&L.observe(l.value)}),e.onBeforeUnmount(()=>{var E;(E=o.value)==null||E.removeEventListener("scroll",q),P.value&&L.disconnect()}),(E,O)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({width:t.width}),class:e.normalizeClass([s.value,"scroll-container__wrapper"])},[e.createElementVNode("div",{ref_key:"sliderWrapperEl",ref:o,onMousedown:h,onMouseup:y,onMousemove:e.withModifiers(m,["prevent"]),class:"scroll-slider"},[e.createElementVNode("div",{ref_key:"sliderEl",ref:l,class:"slider-content"},[e.renderSlot(E.$slots,"default",{},void 0,!0)],512)],544),k.value?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({fontSize:t.size})},[t.useProgressBar?(e.openBlock(),e.createElementBlock("div",Al,[e.createElementVNode("div",{style:e.normalizeStyle({width:f.value}),class:"progress-bar--active"},null,4)])):e.createCommentVNode("",!0),t.useArrows?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[B.value?(e.openBlock(),e.createBlock(W,{key:0,onClick:O[0]||(O[0]=Q=>d("left")),icon:"ep:arrow-left-bold",size:t.size,class:"slide-left"},null,8,["size"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createBlock(W,{key:1,onClick:O[1]||(O[1]=Q=>d("right")),icon:"ep:arrow-right-bold",size:t.size,class:"slide-right"},null,8,["size"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.useDots?(e.openBlock(),e.createElementBlock("div",zl,[e.createElementVNode("div",Nl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,Q=>(e.openBlock(),e.createElementBlock("button",{key:Q,onClick:U=>a(Q),class:e.normalizeClass({"dot--active":b.value===Q})},null,10,Ml))),128))])])):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0)],6))}},[["__scopeId","data-v-09e90f8d"]]),Ol={class:"qst-tag"},Xe=F({__name:"QstTag",props:{size:{type:String,required:!1,default:"14px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},bgColor:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The background color of the tag."},color:{type:String,required:!1,default:"#fff",tsType:"string",description:"The font color of the tag."},useFade:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Changes the style of the tag to use a faded color scheme."},bold:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Bolds the text of the tag."},disabled:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Disables the tag, the tag will show grayed out and unclickable."},link:{type:String,required:!1,default:null,tsType:"string",description:"Clicking the link will bring the user to the provided link. The link can be internal or external, using either a router-link or anchor element."},useRouterLink:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Tags with links will be rendered as a router-link instead of an anchor element."},openInNewTab:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Opens the link in a new tab."},useCloseIcon:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Shows an 'x' icon in the tag, emits 'on-close' when clicked."},iconLeft:{type:String,required:!1,default:null,tsType:"string",description:"Any iconify value, will show on the left side of the tag."},iconRight:{type:String,required:!1,default:null,tsType:"string",description:"Any iconify value, will show on the right side of the tag."},tooltip:{type:[String,Object],required:!1,default:null,tsType:"string | {content: string, isHelpMode?: boolean, offset?: object, width?: number}",description:"Shows a tooltip dropdown when hovering over the tag. Set to a string or object, based on if tooltip props are needed. *(ex/ offset, width, position, etc)*"}},emits:["on-close"],setup(t,{emit:i}){e.useCssVars(d=>({aba66956:t.size}));const l=t,o=i,n=e.computed(()=>l.link?l.useRouterLink?"router-link":"a":"div"),r=e.computed(()=>{if(l.link)return!l.useRouterLink||l.link.includes("/")?l.link:l.link.includes("#")?{hash:l.link}:{name:l.link}}),s=e.computed(()=>({backgroundColor:l.useFade?dl(l.bgColor,90,"55"):l.bgColor,color:l.useFade?l.bgColor:l.color,fontSize:l.size,fontWeight:l.bold?"700":"normal"})),c=()=>{l.disabled||o("on-close")},a=e.computed(()=>{if(!l.tooltip)return;const{tooltip:d}=l;return typeof d=="string"?{content:d}:{...d,helpMode:d.isHelpMode}});return(d,f)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.value),{href:r.value,to:r.value,target:t.link&&t.openInNewTab?"_blank":"",style:e.normalizeStyle(s.value),class:e.normalizeClass([{disabled:t.disabled},"tag-wrapper"])},{default:e.withCtx(()=>[e.createElementVNode("div",null,[a.value?(e.openBlock(),e.createBlock(te,e.mergeProps({key:0},a.value,{width:200,"use-hover-icon":!1,"prevent-click-override":"",class:"tag-tooltip"}),{trigger:e.withCtx(()=>f[0]||(f[0]=[e.createElementVNode("div",null,null,-1)])),default:e.withCtx(()=>[e.renderSlot(d.$slots,"tooltip-content",{},()=>[e.createTextVNode(e.toDisplayString(a.value.content),1)],!0)]),_:3},16)):e.createCommentVNode("",!0),e.createElementVNode("div",Ol,[t.iconLeft?(e.openBlock(),e.createBlock(W,{key:0,icon:t.iconLeft,size:t.size,color:s.value.color,"align-text":"",class:"icon-left"},null,8,["icon","size","color"])):e.createCommentVNode("",!0),e.renderSlot(d.$slots,"default",{},void 0,!0),t.iconRight?(e.openBlock(),e.createBlock(W,{key:1,icon:t.iconRight,size:t.size,color:s.value.color,"align-text":"",class:"icon-right"},null,8,["icon","size","color"])):e.createCommentVNode("",!0),t.useCloseIcon?(e.openBlock(),e.createBlock(W,{key:2,onClick:c,icon:"emojione-monotone:heavy-multiplication-x",color:s.value.color,class:"icon-close"},null,8,["color"])):e.createCommentVNode("",!0)])])]),_:3},8,["href","to","target","style","class"]))}},[["__scopeId","data-v-e5c5ff84"]]),$l=F({__name:"TransitionCollapseHeight",setup(t){const i=c=>{requestAnimationFrame(()=>{c.style.height||(c.style.height="0px"),c.style.display=""})},l=(c,a)=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{c.style.height=`${c.scrollHeight}px`})}),a()},o=c=>{c.style.height=""},n=c=>{requestAnimationFrame(()=>{c.style.height||(c.style.height=`${c.offsetHeight}px`)})},r=(c,a)=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{c.style.height="0px"})}),a()},s=c=>{c.style.height=""};return(c,a)=>(e.openBlock(),e.createBlock(e.Transition,{"enter-active-class":"enter-active","leave-active-class":"leave-active",onBeforeEnter:i,onEnter:l,onAfterEnter:o,onBeforeLeave:n,onLeave:r,onAfterLeave:s},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{},void 0,!0)]),_:3}))}},[["__scopeId","data-v-e53787a9"]]),$t=F({__name:"QstExpandableRow",props:{useDiv:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"The trigger and content slot elements will have a div parent element."},defaultOpen:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"The row will be intitially expanded by default."},useIcon:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Shows an icon at the end of the trigger row."},rowIndex:{type:Number,required:!1,default:null,tsType:"number",description:"Index of the expanded row, used for dynamically selecting a row. *(ex/ when used in a table)*"},useOpenBorder:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Shows a border on the left of the row that expands with the container as it opens."},color:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The accent color, used for details within the component."},icon:{type:String,required:!1,default:"ep:arrow-down-bold",tsType:"string",description:"Any iconify value, the icon will show at the end of the trigger row."}},emits:["on-toggle"],setup(t,{emit:i}){e.useCssVars(c=>({"51a0169d":t.color}));const l=t,o=i,n=e.computed(()=>l.rowIndex||l.rowIndex===0?`expandable-row-${l.rowIndex}`:""),r=e.ref(!0),s=()=>{r.value=!r.value,o("on-toggle",r.value)};return e.onMounted(()=>{r.value=l.defaultOpen}),(c,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.useDiv?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:e.withModifiers(s,["stop"]),class:"row-trigger"},[e.renderSlot(c.$slots,"default",{},void 0,!0),t.useIcon?(e.openBlock(),e.createBlock(W,{key:0,icon:t.icon,class:e.normalizeClass([{rotate:r.value},"trigger-icon"])},null,8,["icon","class"])):e.createCommentVNode("",!0)])):e.renderSlot(c.$slots,"default",{key:1,toggleContainer:s},void 0,!0),e.createVNode($l,{class:e.normalizeClass(n.value)},{default:e.withCtx(()=>[r.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.useDiv?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([{"border--visible":t.useOpenBorder},"expanded-content"])},[e.renderSlot(c.$slots,"content",{},void 0,!0)],2)):e.renderSlot(c.$slots,"content",{key:1},void 0,!0)],64)):e.createCommentVNode("",!0)]),_:3},8,["class"])],64))}},[["__scopeId","data-v-ed708f8b"]]),Dl={key:0,class:"panel-header"},Dt=F({__name:"QstPanel",props:{noPad:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"The default padding styles will be removed from the panel."},padLight:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"The padding styles will be reduced from the default amount."},scroll:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"The panel will be scrollable when it has a height set or its parent has a height set."},height:{type:String,required:!1,default:"",tsType:"string",description:"The height of the panel."},hideScroll:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Hides the scrollbar for scrollable panels."},fullWidth:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Allows the panel to take up the full width of its parent container."},bgColor:{type:String,required:!1,default:"#fff",tsType:"string",description:"The background color of the panel."}},setup(t){e.useCssVars(n=>({"6a037790":t.bgColor}));const i=t,l=e.useSlots(),o=e.computed(()=>({"panel-padded":!i.noPad&&!i.padLight,"panel-padded--light":!i.noPad&&i.padLight,"panel--scroll":i.scroll,"scroll--hidden":i.hideScroll,"panel--full":i.fullWidth}));return(n,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({height:t.height}),class:e.normalizeClass([o.value,"qst-panel"])},[e.unref(l).heading?(e.openBlock(),e.createElementBlock("span",Dl,[e.renderSlot(n.$slots,"heading",{},void 0,!0)])):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"default",{},void 0,!0)],6))}},[["__scopeId","data-v-ac9da80d"]]),Pl=["for"],Ll=["id","disabled"],jl={class:"custom-checkbox"},Rl={key:0,class:"checkbox-label"},Ze=F({__name:"QstCheckbox",props:{modelValue:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Used for v-model, will be set to whether the checkbox is checked."},checkbox:{type:Object,required:!1,default:null,tsType:"{id?: string, value: string, label: string}[]",description:"This prop is used internally, do not pass anything in."},disabled:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Disables the checkbox."},label:{type:String,required:!1,default:"",tsType:"string",description:"Label displayed to the right of the checkbox, clicking on the label will toggle the checkbox."},useLeftLabel:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"The label will be displayed on the left side of the checkbox."},size:{type:String,required:!1,default:"14px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},color:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The accent color, used for details within the component."}},emits:["update:modelValue","on-change"],setup(t,{emit:i}){e.useCssVars(a=>({"5049954b":t.color}));const l=t,o=i,n=e.ref(!1),r=e.computed(()=>{var a;return((a=l.checkbox)==null?void 0:a.id)||me()}),s=e.computed(()=>{var a;return((a=l.checkbox)==null?void 0:a.label)||l.label}),c=()=>{l.checkbox&&o("on-change",l.checkbox)};return e.watch(()=>l.modelValue,()=>{l.modelValue!==n.value&&(n.value=l.modelValue)},{immediate:!0}),e.watch(n,()=>{n.value!==l.modelValue&&o("update:modelValue",n.value)}),(a,d)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({fontSize:t.size}),class:"qst-checkbox__wrapper"},[e.createElementVNode("label",{for:r.value,class:e.normalizeClass([{"label--left":t.useLeftLabel,disabled:t.disabled},"qst-checkbox"])},[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":d[0]||(d[0]=f=>n.value=f),onChange:c,id:r.value,disabled:t.disabled,type:"checkbox"},null,40,Ll),[[e.vModelCheckbox,n.value]]),e.createElementVNode("span",jl,[e.createVNode(W,{size:t.size,icon:"fluent:checkmark-12-filled",color:"white",class:"checkbox-icon"},null,8,["size"])]),s.value?(e.openBlock(),e.createElementBlock("span",Rl,e.toDisplayString(s.value),1)):e.createCommentVNode("",!0)],10,Pl)],4))}},[["__scopeId","data-v-a910855c"]]),Fl={key:0,class:"group-label"},Hl={key:1,class:"checkbox-error"},Pt=F({__name:"QstCheckboxGroup",props:{modelValue:{type:[Number,String,Boolean,Array],required:!1,default:null,tsType:"number | string | boolean | array",description:"Used for v-model of the selected checkbox, will be set to the checkbox's *value* property. If using multiSelect, set to an array. "},options:{type:Array,required:!0,tsType:"{id?: string, value: string, label: string}[]",description:"An array of options for the group of checkboxes. Id is optional, v-model will be set to the value property. *({id?: string, value: string, label: string})*"},multiSelect:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Whether multiple checkboxes can be checked."},useRow:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"The checkboxes will be displayed in a row, instead of a column."},error:{type:String,required:!1,default:"",tsType:"string",description:"Error to show for whole checkbox group."},disabled:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Disables all checkboxes."},groupLabel:{type:String,required:!1,default:"",tsType:"string",description:"The label for the entire checkbox group. Displays above or next to the inputs if displayed in a row."},size:{type:String,required:!1,default:"14px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},color:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The accent color, used for details within the component."}},emits:["update:modelValue"],setup(t,{emit:i}){const l=t,o=i,n=e.ref(),r=d=>{l.multiSelect||n.value.forEach(f=>f.isActive=f.id===d.id)},s=d=>{n.value.find(f=>f.value===d).isActive=!0};e.onMounted(()=>{l.options&&(n.value=re(l.options).map(d=>({...d,id:d.id||me()})))});const c=e.computed(()=>{var f,u;const d=(u=(f=n.value)==null?void 0:f.filter(g=>g.isActive))==null?void 0:u.map(g=>g.value);return l.multiSelect?d:d==null?void 0:d.join()}),a=e.computed(()=>JSON.parse(JSON.stringify(c.value))===JSON.parse(JSON.stringify(l.modelValue)));return e.watch(c,()=>{a.value||o("update:modelValue",c.value)}),e.watch(()=>l.modelValue,()=>{a.value||(l.multiSelect?l.modelValue.forEach(d=>s(d)):s(l.modelValue))}),(d,f)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({fontSize:t.size}),class:e.normalizeClass([{"checkbox-row":t.useRow,"error--visible":!!t.error},"checkbox-group"])},[t.groupLabel?(e.openBlock(),e.createElementBlock("p",Fl,e.toDisplayString(t.groupLabel),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,u=>(e.openBlock(),e.createBlock(Ze,{key:u.id,modelValue:u.isActive,"onUpdate:modelValue":g=>u.isActive=g,onOnChange:f[0]||(f[0]=g=>r(g)),checkbox:u,disabled:t.disabled},null,8,["modelValue","onUpdate:modelValue","checkbox","disabled"]))),128)),t.error?(e.openBlock(),e.createElementBlock("span",Hl,"*"+e.toDisplayString(t.error)+"*",1)):e.createCommentVNode("",!0)],6))}},[["__scopeId","data-v-06246ddf"]]),Ql=["for"],Wl=["id","value","disabled"],_e=F({__name:"QstRadio",props:{modelValue:{type:[Number,String,Boolean],required:!1,default:null,tsType:"number | string | boolean",description:"Used for v-model of the selected radio option, will be set to the input's *value* property."},radio:{type:Object,required:!0,tsType:"{id?: string, value: string, label: string}[]",description:"The details for the radio input. Id is optional, v-model will be set to the value property. *({id?: string, value: string, label: string})*"},disabled:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Disables the radio input."},size:{type:String,required:!1,default:"12px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},color:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The accent color, used for details within the component."}},emits:["update:modelValue"],setup(t,{emit:i}){e.useCssVars(s=>({"52a0f694":t.color}));const l=t,o=i,n=e.computed(()=>{var s;return((s=l.radio)==null?void 0:s.id)||me()}),r=e.ref();return e.watch(r,()=>{r.value!==l.modelValue&&o("update:modelValue",r.value)}),e.watch(()=>l.modelValue,()=>{l.modelValue!==r.value&&(r.value=l.modelValue)},{immediate:!0}),(s,c)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({fontSize:t.size}),class:e.normalizeClass([{disabled:t.disabled},"qst-radio"])},[e.createElementVNode("label",{for:n.value,class:"radio-label"},[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":c[0]||(c[0]=a=>r.value=a),id:n.value,value:t.radio.value,disabled:t.disabled,type:"radio"},null,8,Wl),[[e.vModelRadio,r.value]]),c[1]||(c[1]=e.createElementVNode("span",{class:"radio-input"},null,-1)),e.createTextVNode(" "+e.toDisplayString(t.radio.label),1)],8,Ql)],6))}},[["__scopeId","data-v-aecdfc1f"]]),Ul={key:0,class:"group-label"},Jl={key:1,class:"radio-error"},Lt=F({__name:"QstRadioGroup",props:{modelValue:{type:[Number,String,Boolean],required:!1,default:null,tsType:"number | string | boolean",description:"Used for v-model of the selected radio option, will be set to the input's *value* property."},options:{type:Array,required:!0,tsType:"{id?: string, value: string, label: string}[]",description:"An array of options for the group of radio inputs. Id is optional, v-model will be set to the value property. *({id?: string, value: string, label: string})*"},error:{type:String,required:!1,default:"",tsType:"string",description:"Error to show for whole radio group."},disabled:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Disables all radio inputs."},useRow:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"The inputs will be displayed in a row, instead of a column."},groupLabel:{type:String,required:!1,default:"",tsType:"string",description:"The label for the entire radio group. Displays above or next to the inputs if displayed in a row."},size:{type:String,required:!1,default:"12px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},color:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The accent color, used for details within the component."}},emits:["update:modelValue"],setup(t,{emit:i}){const l=t,o=i,n=e.ref(),r=e.computed(()=>{var s;return(s=l.options)==null?void 0:s.map(c=>({...c,id:c.id||me()}))});return e.watch(n,()=>{n.value!==l.modelValue&&o("update:modelValue",n.value)}),e.watch(()=>l.modelValue,()=>{l.modelValue!==n.value&&(n.value=l.modelValue)},{immediate:!0}),(s,c)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({fontSize:t.size}),class:e.normalizeClass([{"radio-row":t.useRow,"error--visible":!!t.error},"qst-radio__wrapper"])},[t.groupLabel?(e.openBlock(),e.createElementBlock("p",Ul,e.toDisplayString(t.groupLabel),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,a=>(e.openBlock(),e.createBlock(_e,{key:a.id,modelValue:n.value,"onUpdate:modelValue":c[0]||(c[0]=d=>n.value=d),radio:a,disabled:t.disabled,color:t.color},null,8,["modelValue","radio","disabled","color"]))),128)),t.error?(e.openBlock(),e.createElementBlock("span",Jl,"*"+e.toDisplayString(t.error)+"*",1)):e.createCommentVNode("",!0)],6))}},[["__scopeId","data-v-d198a081"]]),jt={__name:"QstTeleport",props:{teleportTo:{type:String,required:!1,default:null,tsType:"string",description:'A selector used to teleport the content, otherwise use the to="" attribute.'}},setup(t){return(i,l)=>(e.openBlock(),e.createBlock(e.Teleport,{to:t.teleportTo??i.$attrs.to},[e.renderSlot(i.$slots,"default")],8,["to"]))}},Kl=["onClick"],Yl={class:"select-label"},Gl={key:2,class:"placeholder-label"},Xl={class:"multiselect__icon-container"},Zl={key:3,class:"input-error"},_l=["innerHTML"],Rt=F({__name:"MultiSelectDisplay",props:{activeValues:{type:[Object,Array,String,Number],required:!1,default:null,tsType:"SelectModelValue",description:"The active values that have been selected."},placeholder:{type:[String,Number],required:!1,default:"Select",tsType:"string | number",description:"Placeholder for the input."},size:{type:String,required:!1,default:"14px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},color:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The accent color, used for details within the component."},icon:{type:String,required:!1,default:"",tsType:"string",description:"Any Iconify value, the icon will be displayed to the right."},tooltip:{type:Object,required:!1,default:null,tsType:"{content: string, helpMode?: boolean, offset?: object, width?: number}",description:"Shows a tooltip dropdown when hovering over the input. Set to a string or object, based on if tooltip props are needed. *(ex/ offset, width, position, etc)* Tooltip is displayed inside the input, width and offset will default to match input dimensions."},showActiveValues:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Whether the active values should be displayed."},numExpandedOptions:{type:Number,required:!1,default:3,tsType:"number",description:"The number of options to be displayed before showing '+X options' selected."},disabledConfig:{type:Object,required:!0,tsType:"{disabled: boolean, disabledReason: string, disabledTooltipPosition: string}",description:"Whether the input is disabled, the disabled reason and the disabled tooltip position."},error:{type:String,required:!1,default:null,tsType:"string",description:"Sets the error message."},useErrorIcon:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"An error icon will be displayed on the right of the input, with a tooltip to show the error message."},useSelect:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Whether the component is being used in QstSelect."}},emits:["on-toggle-active"],setup(t,{emit:i}){e.useCssVars(a=>({"6b1c83d9":t.color}));const l=t,o=i,n=e.computed(()=>{var a;return((a=l.activeValues)==null?void 0:a.length)-l.numExpandedOptions}),r=e.computed(()=>n.value>1),s=e.computed(()=>l.activeValues.slice(l.numExpandedOptions).map(a=>a.text).join(", ")),c=e.computed(()=>{var a;return((a=l.disabledConfig)==null?void 0:a.disabled)&&!!l.disabledConfig.disabledReason});return(a,d)=>{var f;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([{empty:!t.showActiveValues,disabled:(f=t.disabledConfig)==null?void 0:f.disabled},"multiselect-display"])},[c.value?(e.openBlock(),e.createBlock(te,{key:0,content:t.disabledConfig.disabledReason,position:t.disabledConfig.disabledTooltipPosition,class:"input-tooltip--disabled"},{trigger:e.withCtx(()=>d[0]||(d[0]=[e.createElementVNode("div",null,null,-1)])),_:1},8,["content","position"])):e.createCommentVNode("",!0),t.showActiveValues?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.activeValues,(u,g)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[g<t.numExpandedOptions||!r.value?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:e.withModifiers(T=>o("on-toggle-active",u),["stop"]),class:"selected-option"},[e.renderSlot(a.$slots,"selection",{selection:u},()=>[u!=null&&u.leftImage?(e.openBlock(),e.createBlock(he,{key:0,src:u.leftImage,width:"1.25em",height:"1.25em"},null,8,["src"])):e.createCommentVNode("",!0),e.createElementVNode("p",null,e.toDisplayString((u==null?void 0:u.text)??u),1),e.createVNode(W,{icon:"eva:close-fill",size:t.size},null,8,["size"])],!0)],8,Kl)):e.createCommentVNode("",!0)],64))),256)),r.value?(e.openBlock(),e.createBlock(te,{key:0,class:"selected-option"},{trigger:e.withCtx(()=>[e.createElementVNode("p",null,"+"+e.toDisplayString(n.value)+" options",1)]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(s.value),1)]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("label",Yl,e.toDisplayString(t.placeholder),1)],64)):(e.openBlock(),e.createElementBlock("span",Gl,e.toDisplayString(t.placeholder),1)),e.createElementVNode("div",Xl,[t.useErrorIcon?(e.openBlock(),e.createBlock(te,{key:0,solid:"",class:"error-icon__tooltip"},{trigger:e.withCtx(()=>[e.createVNode(W,{icon:"bi:exclamation-circle-fill",size:t.size,color:"#CA0F11"},null,8,["size"])]),default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(t.error),1)]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.icon?(e.openBlock(),e.createBlock(W,{key:0,icon:t.icon,size:t.size,class:"icon"},null,8,["icon","size"])):e.createCommentVNode("",!0),t.tooltip?(e.openBlock(),e.createBlock(te,e.mergeProps({key:1},t.tooltip,{size:t.size,class:"info-tooltip"}),null,16,["size"])):e.createCommentVNode("",!0),t.useSelect?(e.openBlock(),e.createBlock(W,{key:2,icon:"ep:arrow-down-bold",class:"dropdown-arrow"})):e.createCommentVNode("",!0)],64))]),t.error&&!t.useErrorIcon?(e.openBlock(),e.createElementBlock("span",Zl,[d[1]||(d[1]=e.createTextVNode(" *")),e.createElementVNode("span",{innerHTML:t.error},null,8,_l),d[2]||(d[2]=e.createTextVNode("* "))])):e.createCommentVNode("",!0)],2)}}},[["__scopeId","data-v-2ca1e844"]]),en=["onKeydown"],tn=F({__name:"VirtualScroller",props:{items:{type:Array,required:!1,default:null,tsType:"array",description:"The array of items to be displayed in the dropdown scroller."},numBufferItems:{type:Number,required:!1,default:5,tsType:"number",description:"The number of items to additionally render for smoother scrolling."},isShowing:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Whether the scroller is currently visible in its parent."},height:{type:String,required:!0,tsType:"string",description:"The height of the dropdown."},heightPerEntry:{type:Number,required:!1,default:null,tsType:"number",description:"The height of each line item. *(if not set, item height will be calculated based on entriesPerScroll)*"},entriesPerScroll:{type:Number,required:!1,default:8,tsType:"number",description:"The number of entries to render per scroll that will be visible in the dropdown at one time. *(heightPerEntry takes priority if both are set)*"}},emits:["on-escape","on-enter"],setup(t,{expose:i,emit:l}){e.useCssVars(b=>({"421e29ac":f.value,"20ecfc0e":d.value,"054a7745":a.value}));const o=t,n=l,r=e.ref(),s=e.ref(),c=e.computed(()=>{var b;return((b=o.items)==null?void 0:b.length)||0}),a=e.computed(()=>o.heightPerEntry?o.heightPerEntry:o.entriesPerScroll?parseInt(o.height)/o.entriesPerScroll:34),d=e.computed(()=>c.value*a.value+"px"),f=e.computed(()=>Math.min(parseInt(d.value),parseInt(o.height))+"px"),u=e.ref(),g=e.ref(),T=()=>{e.nextTick(()=>{var k,v;const b=Math.ceil(((k=r.value)==null?void 0:k.clientHeight)/a.value),B=b+o.numBufferItems,x=c.value>B?B:b;u.value=Math.floor(((v=r.value)==null?void 0:v.scrollTop)/a.value)||0,g.value=Math.min(u.value+x,c.value)||0})},h=b=>{const B=y.value[b];B&&B.scrollIntoView({behavior:"smooth"})};e.watch(()=>o.isShowing,()=>{o.isShowing&&T()},{immediate:!0}),e.watch(c,()=>T()),e.onMounted(()=>{r.value.addEventListener("scroll",T)}),e.onBeforeUnmount(()=>{r.value.removeEventListener("scroll",T)}),i({scrollToItem:h});const y=e.ref([]),m=(b,B,x)=>{var P;const{key:k}=b;if(!["ArrowDown","ArrowUp","Tab","Enter","Escape"].includes(k))return;if(k==="Escape"){n("on-escape");return}if(k==="Enter"){(x||x===0)&&n("on-enter",x);return}const v=k==="ArrowDown"||k==="Tab"&&!b.shiftKey,q=k==="ArrowUp"||k==="Tab"&&b.shiftKey,M=B+(v?1:-1);!v&&!q||(v&&M>=y.value.length?(r.value.scrollTop=0,setTimeout(()=>{var L;return(L=y.value[0])==null?void 0:L.focus()},100)):q&&M<0?(r.value.scrollTop=r.value.scrollHeight,setTimeout(()=>{var L;return(L=y.value[c.value-1])==null?void 0:L.focus()},100)):(P=y.value[M])==null||P.focus(),b.preventDefault())};return(b,B)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"scrollerEl",ref:r,class:"scroll-container"},[e.createElementVNode("ul",{ref_key:"listEl",ref:s,class:"virtual-list"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(x,k)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[k>=u.value&&k<=g.value?(e.openBlock(),e.createElementBlock("li",{key:0,onKeydown:v=>m(v,k,x),ref_for:!0,ref:v=>y.value[k]=v,style:e.normalizeStyle({top:`${k*a.value}px`}),tabindex:"0",class:"virtual-list__item"},[e.renderSlot(b.$slots,"default",{item:x,index:k},()=>[e.createTextVNode(e.toDisplayString(x),1)],!0)],44,en)):e.createCommentVNode("",!0)],64))),256))],512)],512))}},[["__scopeId","data-v-7594afb9"]]),on={key:0},ln={class:"text-subtext__wrapper"},nn={class:"text-subtext__container"},rn=["innerHTML"],sn=["innerHTML"],an={class:"matching-search__tag"},dn={class:"search-label"},cn=["innerHTML"],un=F({__name:"AutocompleteMenuLineItem",props:{item:{type:[String,Number,Object],required:!0,tsType:"string, number, {id?: (number | string), text: string, result?: any, subtext?: string, leftImage?: string, searchData?: {label: string, value: string | number}[], disabled?: boolean, disabledReason?: string}",description:"The line item to be displayed."},searchValue:{type:[String,Number],required:!0,tsType:"string | number",description:"The search value that will be used to filter the dropdown items."},boldMatchingSearchValues:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Shows the matching portion of each option bolded based on search. (QstAutocomplete only)"},activeValue:{type:[Object,Array,String,Number],required:!1,default:null,tsType:"string | AutocompleteProp | number | string[] | AutocompleteProp[] | number[]",description:"The active value from the parent. *(required when using showActiveIcon)*"},showActiveIcon:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"An icon will show at the end of the active dropdown item."},size:{type:String,required:!1,default:"14px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},color:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The accent color, used for details within the component."},showImages:{type:Boolean,required:!0,tsType:"boolean",description:"Whether an image is being shown in the dropdown item. *(If at least one item has an image, any without will show a default image)*"}},setup(t){e.useCssVars(c=>({"7128b178":t.size,"99e2e668":t.color}));const i=t,l=e.computed(()=>i.item.leftImage||"https://snowjoeecm.blob.core.windows.net/assets/no-image.png"),o=e.computed(()=>!i.activeValue||Array.isArray(i.activeValue)&&!i.activeValue.length||!i.item?!1:Array.isArray(i.activeValue)?typeof i.activeValue[0]=="object"?i.activeValue.some(c=>c.text===i.item.text):i.activeValue.includes(i.item.text||i.item):JSON.stringify(i.activeValue)===JSON.stringify(i.item)||i.activeValue===i.item.text),n=e.computed(()=>({text:r(typeof i.item=="object"?i.item.text:i.item),...i.item.subtext?{subtext:r(i.item.subtext)}:{}})),r=c=>{if(!i.searchValue||!i.boldMatchingSearchValues)return c;const a=It(c.toString()).split(" ").filter(u=>!!u.trim()).join(" "),d=i.searchValue.toString().trim().replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&"),f=new RegExp(d,"i");return a.replace(f,"<b>$&</b>")},s=e.computed(()=>{var c;if(!(!i.boldMatchingSearchValues||!i.searchValue||!((c=i.item.searchData)!=null&&c.length)))return i.item.searchData.map(a=>({label:a.label,value:r(a.value)})).filter(a=>!!a.value&&a.value.includes("<b>"))});return(c,a)=>{var d;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([{"option--active":o.value},"autocomplete-menu__line-item"])},[t.showImages?(e.openBlock(),e.createElementBlock("div",on,[e.createVNode(he,{src:l.value,class:"autocomplete__wrapper--image"},null,8,["src"])])):e.createCommentVNode("",!0),e.createElementVNode("div",ln,[e.createElementVNode("div",nn,[e.createElementVNode("p",{innerHTML:n.value.text,class:"autocomplete__item-value"},null,8,rn),n.value.subtext?(e.openBlock(),e.createElementBlock("p",{key:0,innerHTML:n.value.subtext,class:"autocomplete__item-subtext"},null,8,sn)):e.createCommentVNode("",!0)]),(d=s.value)!=null&&d.length?(e.openBlock(),e.createBlock(Xe,{key:0,class:"autocomplete__search-tag"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,f=>(e.openBlock(),e.createElementBlock("span",an,[e.createElementVNode("span",dn,e.toDisplayString(f.label),1),a[0]||(a[0]=e.createTextVNode(": ")),e.createElementVNode("span",{class:"search-val",innerHTML:f.value},null,8,cn)]))),256))]),_:1})):e.createCommentVNode("",!0)]),o.value&&t.showActiveIcon?(e.openBlock(),e.createBlock(W,{key:1,icon:"akar-icons:circle-fill",class:"active-icon"})):e.createCommentVNode("",!0)],2)}}},[["__scopeId","data-v-38efd18f"]]),fn={class:"w-full"},pn=F({__name:"LineItemWrapper",props:{item:{type:[String,Number,Object],required:!0,tsType:"string, number, {id?: (number | string), text: string, result?: any, subtext?: string, leftImage?: string, searchData?: {label: string, value: string | number}[], disabled?: boolean, disabledReason?: string}",description:"The line item to be displayed."},multiSelect:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Whether multiSelect is set in QstSelect/QstAutocomplete."},defaultVal:{type:String,required:!1,default:"",tsType:"string",description:"A default value that will be added as the first option in the dropdown. (QstSelect only)"},searchValue:{type:[String,Number],required:!1,default:"",tsType:"string | number",description:"The search value that will be used to filter the dropdown items."},boldMatchingSearchValues:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Shows the matching portion of each option bolded based on search. (QstAutocomplete only)"},activeValue:{type:[Object,Array,String,Number],required:!1,default:null,tsType:"string | AutocompleteProp | number | string[] | AutocompleteProp[] | number[]",description:"The active value from the parent. *(required when using showActiveIcon)*"},showActiveIcon:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"An icon will show at the end of the active dropdown item."},isAllActive:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Whether all options are active."},disabledTooltipPosition:{type:String,required:!1,default:"right",tsType:"string",description:"Tooltip position for showing an option's disabled reason."},size:{type:String,required:!1,default:"14px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},color:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The accent color, used for details within the component."},showImages:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Whether an image is being shown in the dropdown item. *(If at least one item has an image, any without will show a default image)*"}},emits:["on-toggle"],setup(t,{emit:i}){e.useCssVars(d=>({"31357c4f":t.color}));const l=t,o=i,n=()=>{o("on-toggle",l.item)},r=e.computed(()=>l.item.text||l.item),s=e.computed(()=>l.item.disabled),c=e.computed(()=>{if(!l.multiSelect||!(Array.isArray(l.activeValue)&&l.activeValue.length))return;const d=l.activeValue[0].text||l.activeValue[0];return l.defaultVal&&l.defaultVal===d?"":d}),a=e.computed(()=>({"last-active-val":!l.isAllActive&&c.value===r.value,"multiselect--option":l.multiSelect&&l.defaultVal!==r.value,"option--disabled":s.value,"disabled-tt--visible":s.value&&!!l.item.disabledReason}));return(d,f)=>(e.openBlock(),e.createElementBlock("div",{onClick:n,tabindex:"0",class:e.normalizeClass([a.value,"dropdown-item"])},[e.createElementVNode("div",fn,[s.value&&t.item.disabledReason?(e.openBlock(),e.createBlock(te,{key:0,content:t.item.disabledReason,position:t.disabledTooltipPosition,offset:{x:t.disabledTooltipPosition==="right"?20:-20,y:0},class:"disabled-item__tt"},{trigger:e.withCtx(()=>f[0]||(f[0]=[e.createElementVNode("div",null,null,-1)])),_:1},8,["content","position","offset"])):e.createCommentVNode("",!0),e.createVNode(un,{item:t.item,"active-value":t.activeValue,"show-active-icon":t.showActiveIcon,"search-value":t.searchValue,"bold-matching-search-values":t.boldMatchingSearchValues,"show-images":t.showImages,size:t.size,color:t.color},null,8,["item","active-value","show-active-icon","search-value","bold-matching-search-values","show-images","size","color"])])],2))}},[["__scopeId","data-v-553273be"]]),hn={key:0,class:"dropdown-input"},Ft=F({__name:"QstAutocompleteMenu",props:{modelValue:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Used for v-model, will be set to whether the dropdown is showing."},inputId:{type:String,required:!1,tsType:"string",description:"GUID from QstInput, used for opening dropdown when associated input is the active element."},src:{type:Array,required:!1,tsType:"string[], number[], {id?: (number | string), text: string, result?: any, subtext?: string, leftImage?: string, searchData?: {label: string, value: string | number}[], disabled?: boolean, disabledReason?: string}[]",description:"The array of items that will be displayed in the dropdown. *(string[], number[], {id?: (number | string), text: string, result?: any, subtext?: string, leftImage?: string, searchData?: {label: string, value: string | number}[], disabled?: boolean, disabledReason?: string}[])*"},autocompleteEndpoint:{type:String,required:!1,tsType:"string",description:"Endpoint URL to fetch data for the dropdown items, instead of through src prop."},searchTerm:{type:[String,Number],required:!1,default:"",tsType:"string | number",description:"The search value that will be used to filter the dropdown items."},minChars:{type:Number,required:!1,default:0,tsType:"number",description:"The minimum number of characters required before the autocomplete items will be filtered by search. (QstAutocomplete only)"},showActiveIcon:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"An icon will show at the end of the active dropdown item."},activeValue:{type:[Object,Array,String,Number],required:!1,default:null,tsType:"string | AutocompleteProp | number | string[] | AutocompleteProp[] | number[]",description:"The active value from the parent. *(required when using showActiveIcon)*"},isLoadingOptions:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Shows a loader in the dropdown, set when loading options from an endpoint in parent."},isInputFocused:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Whether the top input is focused from QstSelect/QstAutocomplete. *(Used to prevent on-enter event with QstAutocomplete and for focusing option when opening dropdown.)*"},sortAlphabetically:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Sorts the dropdown items alphabetically."},multiSelect:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Whether multiSelect is set in QstSelect/QstAutocomplete."},disableDropdownInput:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Disables the input inside the dropdown. (multiSelect only)"},useAutocomplete:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Whether the dropdown is being used for QstAutocomplete."},hideSelectedOptions:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Hides the currently selected options from dropdown. (QstAutocomplete only)"},boldMatchingSearchValues:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Shows the matching portion of each option bolded based on search. (QstAutocomplete only)"},showExtendedResults:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Shows a link at the bottom of dropdown to view all results in a modal. (QstAutocomplete only)"},defaultVal:{type:String,required:!1,default:"",tsType:"string",description:"A default value that will be added as the first option in the dropdown. (QstSelect only)"},disabledTooltipPosition:{type:String,required:!1,default:"right",tsType:"string",description:"Tooltip position for showing an option's disabled reason. (QstSelect only)"},useSelectAll:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Adds an option in the dropdown to select all options (QstSelect multiSelect only)"},size:{type:String,required:!1,default:"14px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},color:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The accent color, used for details within the component."},width:{type:String,required:!1,default:"100%",tsType:"string",description:"The width of the dropdown."},height:{type:String,required:!1,default:"350px",tsType:"string",description:"The height of the dropdown."},position:{type:Object,required:!1,default:null,tsType:"{top: string, left: string}",description:"The teleported position for the dropdown."},heightPerEntry:{type:Number,required:!1,default:null,tsType:"number",description:"The height of each line item. *(if not set, item height will be calculated based on entriesPerScroll)*"},entriesPerScroll:{type:Number,required:!1,default:null,tsType:"number",description:"The number of entries to render per scroll that will be visible in the dropdown at one time. *(heightPerEntry takes priority if both are set)*"},numBufferItems:{type:Number,required:!1,default:5,tsType:"number",description:"The number of items to additionally render for smoother scrolling."},darkMode:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Changes the styles to a dark theme."}},emits:["update:item","on-select","update:modelValue","on-enter","on-dropdown-focus","blur","on-select-all"],setup(t,{expose:i,emit:l}){e.useCssVars(V=>({b702cd94:t.color}));const o=t,n=l,r=e.ref(),s=e.ref(),c=e.ref(),a=e.computed(()=>{var V,C;return{width:o.width,fontSize:o.size,top:(V=o.position)==null?void 0:V.top,left:(C=o.position)==null?void 0:C.left}}),d=e.computed(()=>{if(o.heightPerEntry)return o.heightPerEntry;if(o.entriesPerScroll)return null;if(!o.size)return 34;const V=typeof O.value[1]=="object"&&O.value.some(C=>!!C.subtext||!!C.leftImage);return Math.round(parseInt(o.size)*(V?2.8:2.4))}),f=e.computed(()=>{var C;const V=(C=J.value)!=null&&C.length?J.value:O.value;return V==null?void 0:V.some($=>!!$.leftImage)}),u=()=>{e.nextTick(()=>{var V,C;return(C=(V=s.value)==null?void 0:V.querySelector("li"))==null?void 0:C.focus()})},g=()=>{var V;o.multiSelect&&m.value&&((V=c.value)==null||V.focusInput(!0))},T=V=>{var C,$;V.key==="Escape"?q(!0):V.key==="ArrowDown"&&m.value&&((C=document.activeElement)==null?void 0:C.id)===(($=c.value)==null?void 0:$.id)&&(u(),V.preventDefault())},h=V=>{V.disabled||(n("update:item",V),n("on-select"),g())},y=V=>{o.useAutocomplete&&o.isInputFocused||h(V)},m=e.ref(o.modelValue);e.watch(m,()=>{m.value!==o.modelValue&&n("update:modelValue",m.value),e.nextTick(()=>g())}),e.watch(()=>o.modelValue,()=>{m.value!==o.modelValue&&(m.value=o.modelValue,m.value&&o.position&&e.nextTick(()=>{var V;return(V=r.value)==null?void 0:V.scrollToItem(0)}))});const b=e.ref([]),B=e.ref(!1),x=async()=>{var V;try{if(B.value=!0,(V=o.src)!=null&&V.length)b.value=re(o.src);else if(o.autocompleteEndpoint){const C=await $axios.get(o.autocompleteEndpoint);b.value=C.data}o.sortAlphabetically&&Q(b.value),!o.multiSelect&&o.defaultVal&&!b.value.includes(o.defaultVal)&&b.value.unshift(o.defaultVal)}catch(C){console.log(C)}finally{B.value=!1}},k=e.computed(()=>{var V;return(V=o.src)==null?void 0:V.length});e.watch(k,()=>{x()}),e.watch(()=>o.src,()=>{x()}),e.watch(()=>o.autocompleteEndpoint,()=>{x()}),e.onMounted(()=>{x()}),e.watch(()=>o.isLoadingOptions,()=>{B.value=o.isLoadingOptions},{immediate:!0});const v=e.ref();e.watch(v,()=>{O.value.length&&e.nextTick(()=>r.value.scrollToItem(0))}),e.watch(()=>o.searchTerm,()=>{v.value=o.searchTerm},{immediate:!0});const q=(V=!1)=>{v.value="",m.value=!V},M=()=>{n("on-enter",v.value),q()},P=V=>{const C=re(b.value);return!V&&V!==0?C:C.filter($=>{const j=V.toString().toLowerCase(),ee=["string","number"].includes(typeof $)?$.toString():`${$.text} ${$.subtext??""}`,S=It(ee).toLowerCase().includes(j),z=($.searchData?$.searchData.map(Y=>{var le;return((le=Y.value)==null?void 0:le.toString().toLowerCase())||""}):[]).some(Y=>Y.includes(j));return S||z}).sort(($,j)=>{var A,z;const ee=typeof $=="string"||typeof $=="number"?$.toString().toLowerCase():(A=$.text)==null?void 0:A.toString().toLowerCase(),S=typeof j=="string"||typeof $=="number"?j.toString().toLowerCase():(z=j.text)==null?void 0:z.toString().toLowerCase();return(S==null?void 0:S.startsWith(V.toString().toLowerCase()))-ee.startsWith(V.toString().toLowerCase())})},L=V=>{var j,ee;const C=[];o.activeValue.forEach(S=>{const A=V.find(z=>JSON.stringify(z)===JSON.stringify(S));A&&(V.splice(V.indexOf(A),1),o.hideSelectedOptions||C.push(A))}),C.forEach(S=>V.unshift(S));const $=(ee=o.defaultVal)==null?void 0:ee.toLowerCase().includes((j=v.value)==null?void 0:j.toString().toLowerCase());o.defaultVal&&!V.includes(o.defaultVal)&&(!v.value||$)&&V.unshift(o.defaultVal)},E=V=>{const C=V.reduce(($,j)=>($[j.disabled?"disabled":"active"].push(j),$),{active:[],disabled:[]});return[...C.active,...C.disabled]},O=e.computed(()=>{if(o.minChars>0&&v.value.length<o.minChars)return[];let V=P(v.value);return o.multiSelect&&Array.isArray(o.activeValue)&&o.activeValue.length&&L(V),!o.useAutocomplete&&(V!=null&&V.some(C=>typeof C=="object"&&C.disabled))&&(V=E(V)),V}),Q=V=>{if(V)return typeof V[0]=="string"||typeof V[0]=="number"?V.sort((C,$)=>At(C,$)):V.sort((C,$)=>At(C.text,$.text))},U=e.ref();e.computed(()=>{var V,C;return o.showExtendedResults&&!o.multiSelect&&(!!((V=J.value)!=null&&V.length)||((C=O.value)==null?void 0:C.length)>1)});const J=e.computed(()=>{var C,$;return!o.showExtendedResults||o.multiSelect||!((C=O.value)!=null&&C.length)||!(($=U.value)!=null&&$.prevSearch)||!o.activeValue?void 0:O.value.length===1&&JSON.stringify(O.value[0])===JSON.stringify(o.activeValue)?P(U.value.prevSearch):[]}),H=e.ref(!1),K=e.computed(()=>{var V,C;if(o.useSelectAll)return((V=o.activeValue)==null?void 0:V.length)===((C=b.value)==null?void 0:C.length)});return e.watch(H,()=>{H.value?n("on-select-all",!0):K.value&&n("on-select-all",!1)}),e.watch(K,()=>{H.value=K.value}),i({autocompleteData:b,autocompleteResults:O,dropdownSearchValue:v,clearDropdownInput:q,focusMultiSelectInput:g,focusFirstOption:u}),(V,C)=>{var $;return e.withDirectives((e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(a.value),class:e.normalizeClass([{dark:t.darkMode},"autocomplete__wrapper"])},[B.value?(e.openBlock(),e.createBlock(Ae,{key:0,size:t.size,class:"dropdown-loader"},null,8,["size"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.multiSelect?(e.openBlock(),e.createElementBlock("div",hn,[e.createVNode(ne,{ref_key:"multiSelectInputEl",ref:c,modelValue:v.value,"onUpdate:modelValue":C[0]||(C[0]=j=>v.value=j),onKeydown:T,onFocus:C[1]||(C[1]=j=>n("on-dropdown-focus")),onBlur:C[2]||(C[2]=j=>n("blur")),onOnEnter:M,onOnInputClear:C[3]||(C[3]=j=>m.value=!0),size:t.size,color:t.color,disabled:t.disableDropdownInput,"use-clear-icon":"","dark-mode":t.darkMode,placeholder:"Search",autocomplete:"off"},null,8,["modelValue","size","color","disabled","dark-mode"])])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"listContainerEl",ref:s},[($=O.value)!=null&&$.length?(e.openBlock(),e.createBlock(tn,{key:0,ref_key:"scrollerEl",ref:r,onOnEscape:C[4]||(C[4]=j=>m.value=!1),onOnEnter:y,items:O.value,"is-showing":m.value,height:t.height,"height-per-entry":d.value,"entries-per-scroll":t.entriesPerScroll},{default:e.withCtx(({item:j})=>[e.createVNode(pn,{onOnToggle:h,item:j,"multi-select":t.multiSelect,"default-val":t.defaultVal,"search-value":v.value,"bold-matching-search-values":t.boldMatchingSearchValues,"active-value":t.activeValue,"show-active-icon":t.showActiveIcon,"is-all-active":K.value,"disabled-tooltip-position":t.disabledTooltipPosition,size:t.size,color:t.color,"show-images":f.value},null,8,["item","multi-select","default-val","search-value","bold-matching-search-values","active-value","show-active-icon","is-all-active","disabled-tooltip-position","size","color","show-images"])]),_:1},8,["items","is-showing","height","height-per-entry","entries-per-scroll"])):e.renderSlot(V.$slots,"no-results-msg",{key:1},()=>[C[5]||(C[5]=e.createElementVNode("p",{class:"autocomplete__no-results"},"No Results",-1))],!0)],512)],64))],6)),[[e.vShow,m.value]])}}},[["__scopeId","data-v-bb14d019"]]);function Ht(t,i,l){const o=e.ref([]),n=d=>{d.length&&(o.value=re(d).map((f,u)=>({text:f.text??f,id:f.id??u,leftImage:f.leftImage??"",result:f.result??""})),a())},r=d=>{if(Array.isArray(i.value)){if(i.value.length===1)return t("update:result",[d]);const u=i.value.at(-1)===d?[d]:i.value.filter(g=>g!==d);t("update:modelValue",u),t("change",u),t("update:result",u)}},s=e.ref([]),c=e.computed(()=>!l.value&&i.value?Object.values(i.value):o.value.filter(d=>s.value.includes(d.id))),a=()=>{o.value.length&&Array.isArray(i.value)&&i.value.forEach(d=>{const f=o.value.find(u=>u.text===(d.text||d));f&&!s.value.includes(f.id)&&s.value.push(f.id)})};return{multiSelectOptions:o,multiSelectActiveIds:s,multiSelectActiveValues:c,setActiveMultiSelectIds:a,assignMultiSelectValuesAndIds:n,assignMultiSelectDefaultVal:r}}function et(t,i,l,o){const n=e.ref(!1),r=e.ref(!1);e.watch(n,()=>{var a;i.value||(a=l.value)==null||a.focusInput(!0)}),e.watch(r,()=>{var a;r.value&&(t.value=!0),i.value?(a=o.value)==null||a.focusMultiSelectInput():s()});const s=()=>n.value=!0;return{isFocused:n,isTabFocused:r,focusSelectInput:s,handleBlur:(a=!1)=>{n.value=!1,a&&(r.value=!1)}}}function Qt(t,i,l,o,n,r,s,c){const a=e.ref(!1),d=()=>{i.value||(a.value=!a.value)},f=e.computed(()=>({"input-container":!0,"multiselect-input":t.value,focused:t.value&&a.value,"multiselect--disabled":t.value&&i.value,disabled:i.value,"error--visible":!!l.value,dark:r.value})),u=e.computed(()=>{let h;if(c.value){const y=[{screen:"sm",min:0,max:767},{screen:"md",min:768,max:991},{screen:"lg",min:992,max:1350},{screen:"xl",min:1351,max:1549},{screen:"xxl",min:1550,max:1/0}],{width:m}=window.screen,b=y.findIndex(B=>m>=B.min&&m<=B.max);y.forEach((B,x)=>{!h&&x>=b&&(h=c.value[B.screen])})}return h||s.value}),g=e.computed(()=>o.value&&!!l.value);return{isOpen:a,displayInputClasses:f,inputSize:u,isShowingErrorIcon:g,clearTextSelection:(h=!1)=>{n.value="",h&&(a.value=!1)},toggleOpen:d}}function Wt(t,i,l,o){const n=e.computed(()=>{var a;return!i.value&&(!!l.value||l.value===0)||i.value&&!!((a=l.value)!=null&&a.length)}),r=e.computed(()=>{var a;return!i.value&&(!!o.value||o.value===0)||i.value&&!!((a=o.value)!=null&&a.length)}),s=()=>{var d,f;if(!n.value)return;const a=i.value?(d=l.value)==null?void 0:d.map(u=>u.result):(f=l.value)==null?void 0:f.result;return JSON.stringify(o.value)===JSON.stringify(a)};return{hasActiveModelValue:n,hasActiveResultValue:r,isSameResultValues:s,updateResultFromValues:()=>{var a,d;s()||t("update:result",i.value?(a=l.value)==null?void 0:a.map(f=>f.result).filter(f=>!!f):(d=l.value)==null?void 0:d.result)}}}function Ut(t,i){const l=e.ref(),o=d=>!d&&d!==0,n=d=>typeof d=="object",r=d=>n(d)?d==null?void 0:d.text:d,s=d=>typeof d=="object"?d.result:d;return{isInvalidVal:o,emitModelValues:d=>{let f=d;Array.isArray(d)&&n(d[0])?f=d.map(u=>s(u)):!Array.isArray(d)&&n(d)&&(f=s(d)),t("update:result",f),t("update:modelValue",d),l.value=d,i?d&&t("on-selected",d):t("change",d)},checkIsValidOption:(d,f)=>{if(!o(d))return f.some(u=>JSON.stringify(u)===JSON.stringify(d))},getCurrOptionValue:r,activeOption:l}}function Jt(t,i,l){const{handleBlur:o}=et(),n=e.ref({top:"",left:"-10000px"}),r=e.ref(""),s=e.ref(!1),c=()=>{if(!l.value)return;const d=new IntersectionObserver(f=>{const u=f[0].boundingClientRect;r.value=Math.trunc(u.width)+"px",n.value.top=Math.trunc(u.top+document.documentElement.scrollTop+u.height)+"px",n.value.left=Math.trunc(u.left)+"px",e.nextTick(()=>{var y;const{top:g,bottom:T}=(y=t.value.closest("dialog"))==null?void 0:y.getBoundingClientRect();u.top>=g&&u.top<=T||u.bottom>=g&&u.bottom<=T||(l.value&&(l.value=!1),e.nextTick(()=>o()))}),d.disconnect()},{threshold:1});d.observe(i.value)},a=()=>{var d,f;if(s.value=!!((d=t.value)!=null&&d.closest("dialog")),s.value){const u=(f=t.value)==null?void 0:f.closest(".qst-modal__content");u&&u.addEventListener("scroll",c)}};return e.onMounted(()=>e.nextTick(()=>a())),e.onBeforeUnmount(()=>{var f;const d=(f=t.value)==null?void 0:f.closest(".qst-modal__content");d&&d.removeEventListener("scroll",c)}),{position:n,dropdownWidth:r,isTeleporting:s,calculateDropdownPosition:c}}const mn={class:"autocomplete-inner__container"},gn={key:1,class:"autocomplete-input__wrapper"},Kt=F({__name:"QstAutocomplete",props:{multiSelect:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Whether only a single or multiple options can be selected."},src:{type:Array,required:!1,tsType:"string[], number[], AutocompleteProp[]",description:"The source of the autocomplete options to be displayed. Types can be string[], number[], AutocompleteProp[] (AutocompleteProp: {id?: (number, string, boolean), text: string, result?: any, subtext?: string, leftImage?: string, searchData?: {label: string, value: (string, number)}[], disabled?: boolean, disabledReason?: string}). *When using AutocompleteProp[], the text field is required.*"},autocompleteEndpoint:{type:String,required:!1,tsType:"string",description:"Endpoint URL for the autocomplete. If the src prop is not set, the autocomplete will use the endpoint to fetch the data."},modelValue:{type:[Object,Array,String,Number],required:!1,default:null,tsType:"Array, String, Number, AutocompleteProp",description:"Used for v-model, will be set to the active autocomplete value. *(For multiselect, v-model must be set to an array)*"},result:{type:[Object,Array,String,Number],required:!1,default:null,tsType:"Array, String, Number, AutocompleteProp",description:"Used for v-model:result, value will be the *result* property of AutocompleteProp."},query:{type:[String,Number],required:!1,default:null,description:"Used for v-model:query, value will be the searched text in the input."},size:{type:String,required:!1,default:"14px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},dynamicSizes:{type:Object,required:!1,default:null,tsType:"object as {[screenSize]: [size: string]}",description:"Any screen size defined will target that screen size and below (ex/ {xl: '10px'} will change to 10px on max-width: 1549px). Screen sizes larger than what is defined will use the normal props.size. Use dynamicSizes when the dropdown is being teleported to update the dropdown's size as well."},color:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The accent color, used for details within the component."},width:{type:String,required:!1,default:"100%",tsType:"string",description:"The width of the autocomplete."},useEditMode:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Whether the input should be editable or not."},showLabelOnEditMode:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Shows a label when in edit mode."},placeholder:{type:[String,Number],required:!1,default:"Search",tsType:"string | number",description:"Placeholder for input."},disabled:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Disables the autocomplete, will show grayed out and unusable."},disabledReason:{type:String,required:!1,default:"",tsType:"string",description:"When the input is disabled, hovering over the input will show a tooltip with the disabled reason. *(This is only for the top autocomplete input. To set on an individual dropdown option, set disabledReason property on the option. (AutocompleteProp))*"},disabledTooltipPosition:{type:String,required:!1,default:"right",tsType:"string",description:"Tooltip position for showing an option's disabled reason. Applies to both top level input and/or the dropdown option's disabled tooltips."},numExpandedOptions:{type:Number,required:!1,default:3,tsType:"number",description:"Number of options to show before showing '+X options selected' tooltip."},hideSelectedOptions:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Hides the currently selected options from dropdown. (multiselect only)"},minChars:{type:Number,required:!1,default:0,tsType:"number",description:"Number of characters required in the input for the dropdown to show the filtered search results. (single select only)"},error:{type:String,required:!1,default:null,tsType:"string",description:"Sets the error message."},clearAfterSelecting:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"After selecting a dropdown option, the value will be cleared from the top input."},isLoadingOptions:{type:Boolean,required:!1,default:null,tsType:"boolean",description:"Set to loading value when loading options from an endpoint. *(Overrides loader in dropdown)*"},dropdownHeight:{type:String,required:!1,default:"350px",tsType:"string",description:"The height for the autocomplete menu dropdown."},closeMultiSelectAfterSelecting:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"After selecting an option, closes the autocomplete menu dropdown. *(multiselect only)*"},zoomedOut:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Zooms out autocomplete dropdown to 80% for laptop devices."},showErrorBelow:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Shows the error message at the bottom of the input."},allowOpenInput:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Allows the user to search for any value, regardless of the dropdown options. Emits the value using 'autocomplete-search-query'."},boldMatchingSearchValues:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"The matching portion of each option will be bolded based on the search value."},showExtendedResults:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Shows a link at the bottom of the dropdown to view all results in a modal."},useMagnifyIcon:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Adds a magnifying glass icon to the right of the autocomplete, clicking will submit the search value."},useErrorIcon:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"An error icon will be displayed on the right of the autocomplete, hovering over will show a tooltip with the error message."},useClearIcon:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Adds X icon to the right of the autocomplete, clicking it clears the v-model value. Overrides any other previously set icons."},icon:{type:String,required:!1,default:"",tsType:"string",description:"Any Iconify value, will be displayed on the right of the autocomplete."},tooltip:{type:[String,Object],required:!1,default:null,tsType:"string | {content: string, isHelpMode?: boolean, offset?: object, width?: number}",description:"Shows a tooltip dropdown when hovering over the input. Set to a string or object, based on if tooltip props are needed. *(ex/ offset, width, position, etc)* Tooltip is displayed inside the autocomplete, width and offset will default to match input dimensions."},darkMode:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Changes the styles to a dark theme."}},emits:["update:modelValue","update:result","update:query","on-selected","autocomplete-search-query"],setup(t,{expose:i,emit:l}){e.useCssVars(p=>({"4318c48e":t.color,"8e8a82d4":e.unref(q)}));const o=t,n=l,{modelValue:r,result:s,multiSelect:c,disabled:a,error:d,useErrorIcon:f,darkMode:u,size:g,dynamicSizes:T}=e.toRefs(o),h=e.ref(),y=e.ref(),m=e.ref(),b=e.ref(),B=e.ref(),x=e.computed(()=>{var p,w;return!!((p=oe.value)!=null&&p.length)||o.multiSelect&&!!((w=ze.value)!=null&&w.length)}),{isOpen:k,displayInputClasses:v,inputSize:q,isShowingErrorIcon:M,clearTextSelection:P,toggleOpen:L}=Qt(c,a,d,f,h,u,g,T),{isFocused:E,isTabFocused:O,focusSelectInput:Q,handleBlur:U}=et(k,c,b,B),{isInvalidVal:J,emitModelValues:H,checkIsValidOption:K,getCurrOptionValue:V,activeOption:C}=Ut(n,!0),{hasActiveModelValue:$,hasActiveResultValue:j,isSameResultValues:ee,updateResultFromValues:S}=Wt(n,c,r,s),{position:A,dropdownWidth:z,isTeleporting:Y,calculateDropdownPosition:le}=Jt(m,y,k),{multiSelectOptions:ze,multiSelectActiveIds:Ne,multiSelectActiveValues:ye,setActiveMultiSelectIds:be,assignMultiSelectValuesAndIds:Me}=Ht(n,r,x),se=()=>{var w;const p=!J(V(o.modelValue));!o.clearAfterSelecting&&!o.multiSelect&&p&&(h.value=((w=o.modelValue)==null?void 0:w.text)||o.modelValue)},Oe=e.ref(),we=()=>{o.multiSelect||H(""),Y.value||(k.value=!0),Q()};e.watch(k,()=>{k.value&&Y.value&&le(),!(!o.multiSelect&&!o.clearAfterSelecting&&!k.value)&&Q()});const $e=()=>{o.useMagnifyIcon&&(E.value=!0,ce())},De=p=>{var w;p.key==="Escape"&&P(!0),(p.key==="Tab"||p.key==="ArrowDown")&&(p.key==="ArrowDown"&&(k.value=!0),k.value&&((w=B.value)==null||w.focusFirstOption()),p.preventDefault())},ke=p=>{ot(p),lt(p)},ot=p=>{!y.value.contains(p.target)&&k.value&&(k.value=o.multiSelect?!o.closeMultiSelectAfterSelecting:!1)},lt=p=>{var D;const w=Oe.value.contains(p.target),N=B.value.$el.contains(p.target);!w&&!N&&(k.value&&(k.value=!1),!o.clearAfterSelecting&&!o.allowOpenInput&&(h.value=((D=o.modelValue)==null?void 0:D.searchVal)??""),se(),e.nextTick(()=>U()))},Pe=e.computed(()=>{var G;if(!o.multiSelect||!o.tooltip)return;const{tooltip:p}=o,w=p.width||(m.value?parseInt((G=getComputedStyle(m.value))==null?void 0:G.width):null),N=-.4*parseInt(o.size);return{...typeof p=="string"?{content:p}:{...p,helpMode:p.isHelpMode},width:w,offset:p.offset||{x:-(N+w/2-10),y:0}}});i({focusSelectInput:Q});const oe=e.ref([]),Z=e.computed(()=>{var p;return o.multiSelect||(((p=h.value)==null?void 0:p.toString().length)||0)>=o.minChars}),ie=p=>oe.value.find(w=>w.id&&(p.id||p.id===0)?w.id===p.id:p!=null&&p.text?(w.text||w)===p.text:p!=null&&p.result||(p==null?void 0:p.result)===0?w.result===p.result:w===p),nt=(p,w)=>{B.value.clearDropdownInput(o.closeMultiSelectAfterSelecting);let N=Array.isArray(o.modelValue)?[...o.modelValue]:[];const D=N.find(G=>JSON.stringify(G)===JSON.stringify(w));D?N.splice(N.indexOf(D),1):J(w)?N.splice(N.indexOf(p),1):N.push(w),B.value.focusMultiSelectInput(),H(N)},de=p=>{if(o.disabled)return;h.value="";const w=ie(p);k.value=o.multiSelect&&!o.closeMultiSelectAfterSelecting,o.multiSelect?nt(p,w):(o.clearAfterSelecting||(h.value=V(w)),H(w))},ce=(p="")=>{var D;if(!((D=o.modelValue)!=null&&D.searchVal)&&(!E.value||J(h.value)&&!p))return;const w=h.value||p,N=B.value.autocompleteResults[0];if(o.allowOpenInput||J(N))return Se(w);o.multiSelect?de(N):H(N),P(!o.multiSelect||o.multiSelect&&o.closeMultiSelectAfterSelecting),o.multiSelect||U()},Se=p=>{(!x.value||o.allowOpenInput)&&p&&(n("autocomplete-search-query",p),o.multiSelect||(n("on-selected",{searchVal:p}),n("update:modelValue",{searchVal:p}),n("update:result","")),k.value=!1,o.clearAfterSelecting&&P(!o.multiSelect||o.multiSelect&&o.closeMultiSelectAfterSelecting))},Te=e.ref(!1);e.watch(x,()=>{x.value&&(Te.value=!0,je())});const Le=()=>{K(o.modelValue,oe.value)||!x.value?(C.value=o.modelValue,se()):(C.value="",h.value="",H(ie(o.modelValue)))};e.watch(()=>o.modelValue,()=>{var p,w,N;if(!((p=o.modelValue)!=null&&p.searchVal)){if(o.multiSelect){if(!x.value)return;if(Ne.value=[],!(Array.isArray(o.modelValue)&&((w=o.modelValue)==null?void 0:w.every(G=>K(G,oe.value))))){const G=(N=o.modelValue)==null?void 0:N.map(X=>ie(X)).filter(X=>!!X);return H(G)}be()}else{if(!!C.value&&o.modelValue===C.value&&h.value||J(o.modelValue)){J(o.modelValue)&&(h.value&&(h.value=""),o.result&&n("update:result",""));return}Le()}S()}});const je=()=>{if(x.value)if($.value){const p=o.multiSelect?o.modelValue.map(w=>ie(w)).filter(w=>!!w):ie(o.modelValue);H(p),se()}else j.value&&Ve();else o.multiSelect||se()},it=()=>{var p;(p=o.src)!=null&&p.length&&(oe.value=re(o.src)),o.multiSelect&&oe.value.length&&Me(oe.value)},Ve=()=>{if(!j.value||ee())return;let p;if(o.multiSelect?p=o.result.map(w=>ze.value.find(N=>{if(N.result)return JSON.stringify(N.result)===JSON.stringify(w)})).filter(w=>!!w):p=oe.value.find(w=>JSON.stringify(w.result)===JSON.stringify(o.result)),!p||Array.isArray(p)&&!p.length){const w=o.multiSelect?[]:"";$.value?(!o.multiSelect||o.multiSelect&&o.result.length===1&&!o.modelValue.map(N=>N.result).includes(o.result[0]))&&n("update:modelValue",w):n("update:result",w);return}n("update:modelValue",p),n("on-selected",p)};e.watch(()=>o.result,()=>Ve()),e.watch(h,()=>{h.value!==o.query&&n("update:query",h.value)}),e.watch(()=>o.query,()=>{!o.multiSelect&&o.query!==h.value&&(h.value=o.query)});const I=e.computed(()=>{if(!(!o.multiSelect||!B.value))return B.value.dropdownSearchValue});return e.watch(I,()=>{I.value!==o.query&&n("update:query",I.value)}),e.onMounted(()=>{it(),je(),document.addEventListener("click",ke)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",ke)}),e.watchEffect(()=>{var p,w;oe.value=((p=B.value)==null?void 0:p.autocompleteData)??[],!(!oe.value.length||!Te.value)&&((w=o.modelValue)!=null&&w.searchVal&&ce(),o.multiSelect&&Me(oe.value),Te.value=!1)}),(p,w)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({fontSize:e.unref(q),width:t.width}),ref_key:"wrapperEl",ref:m,class:e.normalizeClass([{"width--override":!!t.width},"inline-block"])},[e.createElementVNode("div",{ref_key:"autocompleteContainerEl",ref:Oe,tabindex:"0",onFocus:w[8]||(w[8]=N=>O.value=!0),onBlur:w[9]||(w[9]=N=>e.unref(U)(!0)),class:e.normalizeClass([{"single-select":!e.unref(c)},"autocomplete-container"])},[e.createVNode(Ie,{"use-edit-mode":t.useEditMode,value:e.unref(r),label:t.placeholder,"show-label-on-edit-mode":t.showLabelOnEditMode},{"view-mode":e.withCtx(()=>[e.renderSlot(p.$slots,"view-mode",{},void 0,!0)]),default:e.withCtx(()=>{var N,D,G,X;return[e.createElementVNode("div",mn,[e.createElementVNode("div",{ref_key:"displayInputEl",ref:y,onClick:w[4]||(w[4]=(..._)=>e.unref(L)&&e.unref(L)(..._)),tabindex:"-1",style:e.normalizeStyle({fontSize:e.unref(q)}),class:e.normalizeClass([e.unref(v),{focused:e.unref(E)}])},[e.unref(c)?(e.openBlock(),e.createBlock(Rt,{key:0,onOnToggleActive:de,size:e.unref(q),color:t.color,icon:t.icon,placeholder:t.placeholder,tooltip:Pe.value,"active-values":e.unref(ye),"show-active-values":!!((N=e.unref(ye))!=null&&N.length),"num-expanded-options":t.numExpandedOptions,"disabled-config":{disabled:e.unref(a),disabledReason:t.disabledReason,disabledTooltipPosition:t.disabledTooltipPosition},error:e.unref(d),"use-error-icon":e.unref(M),class:e.normalizeClass({"input-error--bottom":t.showErrorBelow})},null,8,["size","color","icon","placeholder","tooltip","active-values","show-active-values","num-expanded-options","disabled-config","error","use-error-icon","class"])):(e.openBlock(),e.createElementBlock("div",gn,[e.createVNode(ne,{ref_key:"qstInputEl",ref:b,modelValue:h.value,"onUpdate:modelValue":w[0]||(w[0]=_=>h.value=_),placeholder:t.placeholder,color:t.color,"hide-image":h.value!==((D=e.unref(r))==null?void 0:D.text),image:(G=e.unref(r))!=null&&G.leftImage&&!t.clearAfterSelecting?(X=e.unref(r))==null?void 0:X.leftImage:"",autocomplete:"off",size:e.unref(q),disabled:e.unref(a),"disabled-reason":t.disabledReason,"disabled-tooltip-position":t.disabledTooltipPosition,error:e.unref(d),"use-error-icon":e.unref(f),"show-error-below":t.showErrorBelow,icon:t.useMagnifyIcon?"akar-icons:search":t.icon,tooltip:t.tooltip,"dark-mode":e.unref(u),"use-clear-icon":t.useClearIcon&&!t.useMagnifyIcon&&!e.unref(J)(h.value)&&!e.unref(M),onOnInputClear:we,onKeydown:De,onOnEnter:w[1]||(w[1]=_=>ce()),onOnIconClick:$e,onBlur:w[2]||(w[2]=_=>e.unref(U)()),onInput:w[3]||(w[3]=_=>k.value=!0)},null,8,["modelValue","placeholder","color","hide-image","image","size","disabled","disabled-reason","disabled-tooltip-position","error","use-error-icon","show-error-below","icon","tooltip","dark-mode","use-clear-icon"])]))],6),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Y)?jt:"div"),{to:e.unref(Y)?"#app":""},{default:e.withCtx(()=>{var _;return[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass({"zoom-out":t.zoomedOut})},[e.createVNode(Ft,{ref_key:"autocompleteMenuEl",ref:B,modelValue:e.unref(k),"onUpdate:modelValue":w[5]||(w[5]=rt=>e.isRef(k)?k.value=rt:null),"use-autocomplete":"",src:t.src,width:e.unref(z)||"100%",position:e.unref(Y)?e.unref(A):null,"multi-select":e.unref(c),"disable-dropdown-input":e.unref(a),"hide-selected-options":t.hideSelectedOptions,"autocomplete-endpoint":t.autocompleteEndpoint,"search-term":h.value,height:t.dropdownHeight,size:e.unref(q),color:t.color,"dark-mode":e.unref(u),"active-value":e.unref(r),"is-input-focused":e.unref(E),"show-active-icon":!t.clearAfterSelecting,"min-chars":e.unref(c)?0:t.minChars,"is-loading-options":t.isLoadingOptions,"input-id":((_=b.value)==null?void 0:_.id)??"","disabled-tooltip-position":t.disabledTooltipPosition,"bold-matching-search-values":t.boldMatchingSearchValues,"show-extended-results":t.showExtendedResults,"onUpdate:item":de,onOnEnter:ce,onOnDropdownFocus:w[6]||(w[6]=rt=>E.value=!0),onBlur:w[7]||(w[7]=rt=>e.unref(U)())},{"no-results-msg":e.withCtx(()=>[e.renderSlot(p.$slots,"no-results-msg",{},void 0,!0)]),_:3},8,["modelValue","src","width","position","multi-select","disable-dropdown-input","hide-selected-options","autocomplete-endpoint","search-term","height","size","color","dark-mode","active-value","is-input-focused","show-active-icon","min-chars","is-loading-options","input-id","disabled-tooltip-position","bold-matching-search-values","show-extended-results"])],2),[[e.vShow,Z.value]])]}),_:3},8,["to"]))])]}),_:3},8,["use-edit-mode","value","label","show-label-on-edit-mode"])],34)],6))}},[["__scopeId","data-v-94830ba8"]]),yn={class:"input-row"},bn={class:"input-row"},wn={class:"input-row"},Yt=F({__name:"QstAddressAutocomplete",props:{modelValue:{type:Object,default:null,tsType:"object",description:"The selected address. The object will be set with the following properties: {AddressLine1: string, AddressLine2: string, City: string, State: string, ZipCode: string, Country: string}."},apiKey:{type:String,required:!0,tsType:"string",description:"The API key to use for the google maps API."},useColumn:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"The address form will use a column layout instead of the default row."},required:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Whether the inputs are required for the user."},useEditMode:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Whether the input should be editable or not."},errors:{type:Object,required:!1,default:()=>({contact:"",address1:"",city:"",state:"",zip:"",country:""}),tsType:"object",description:"The errors for each of the address inputs."},size:{type:String,required:!1,default:"14px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},color:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The accent color, used for details within the component."},darkMode:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Changes the styles to a dark theme."}},emits:["update:modelValue"],setup(t,{emit:i}){const l=t,o=i,n=e.ref(),r=e.ref(),s=e.computed(()=>`https://maps.googleapis.com/maps/api/js?key=${l.apiKey}&libraries=places`),c=()=>{let h=document.querySelector("#google-maps-script");h||(h=document.createElement("script"),h.setAttribute("src",s.value),h.setAttribute("id","google-maps-script"),document.head.appendChild(h)),h.addEventListener("load",()=>a())},a=()=>{const h=n.value.querySelector("input");r.value=new google.maps.places.Autocomplete(h,{types:["geocode"]}),r.value.setFields(["address_component","formatted_address"]),r.value.addListener("place_changed",f)},d=()=>{navigator.geolocation&&navigator.geolocation.getCurrentPosition(h=>{const{latitude:y,longitude:m,accuracy:b}=h.coords;let B={lat:y,lng:m},x=new google.maps.Circle({...B,radius:b});r.value.setBounds(x.getBounds())})};e.onMounted(()=>{window.google?a():c()});const f=()=>{const h=r.value.getPlace();let y="",m="",b="";const B=[];u.value=h.address_components.reduce((x,k)=>{const v=k.types[0],q=k.long_name;return v==="street_number"?B[0]=q:v==="route"&&(B[1]=q),v==="neighborhood"?b=q:v==="sublocality_level_1"?m=q:v==="locality"&&(y=q),x[v]=q,x},{}),u.value.street_name=B.join(" "),u.value.city=b||m||y,u.value.formatted_address=h.formatted_address},u=e.ref({}),g=e.computed(()=>{if(u.value)return{AddressLine1:(u.value.street_name||u.value.premise)??"",AddressLine2:u.value.apartment??"",City:u.value.city??"",State:u.value.administrative_area_level_1??"",ZipCode:u.value.postal_code??"",Country:u.value.country??""}}),T=()=>{if(!l.modelValue)return{};const h=re(l.modelValue);return{street_name:h.AddressLine1??"",city:h.City??"",administrative_area_level_1:h.State??"",country:h.Country??"",postal_code:h.ZipCode??"",apartment:h.AddressLine2??""}};return e.watch(g,()=>{JSON.stringify(l.modelValue)!==JSON.stringify(g.value)&&o("update:modelValue",g.value)},{deep:!0}),e.watch(()=>l.modelValue,()=>{JSON.stringify(g.value)!==JSON.stringify(l.modelValue)&&(u.value=T())},{immediate:!0,deep:!0}),(h,y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([{"layout--col":t.useColumn},"address-form"])},[e.createElementVNode("div",{ref_key:"autocompleteEl",ref:n,class:"input-row"},[e.createVNode(ne,{modelValue:u.value.street_name,"onUpdate:modelValue":y[0]||(y[0]=m=>u.value.street_name=m),onFocus:y[1]||(y[1]=m=>d()),required:t.required,error:t.errors.address1,"use-edit-mode":t.useEditMode,size:t.size,color:t.color,"dark-mode":t.darkMode,placeholder:"Address",width:"100%"},null,8,["modelValue","required","error","use-edit-mode","size","color","dark-mode"])],512),e.createElementVNode("div",yn,[e.createVNode(ne,{modelValue:u.value.apartment,"onUpdate:modelValue":y[2]||(y[2]=m=>u.value.apartment=m),required:!1,"use-edit-mode":t.useEditMode,size:t.size,color:t.color,"dark-mode":t.darkMode,placeholder:"Apartment, suite, etc. (optional)",width:"100%"},null,8,["modelValue","use-edit-mode","size","color","dark-mode"]),e.createVNode(ne,{modelValue:u.value.city,"onUpdate:modelValue":y[3]||(y[3]=m=>u.value.city=m),required:t.required,error:t.errors.city,"use-edit-mode":t.useEditMode,size:t.size,color:t.color,"dark-mode":t.darkMode,placeholder:"City",width:"100%"},null,8,["modelValue","required","error","use-edit-mode","size","color","dark-mode"])]),e.createElementVNode("div",bn,[e.createVNode(ne,{modelValue:u.value.administrative_area_level_1,"onUpdate:modelValue":y[4]||(y[4]=m=>u.value.administrative_area_level_1=m),required:t.required,error:t.errors.state,"use-edit-mode":t.useEditMode,size:t.size,color:t.color,"dark-mode":t.darkMode,placeholder:"State",width:"100%"},null,8,["modelValue","required","error","use-edit-mode","size","color","dark-mode"]),e.createVNode(ne,{modelValue:u.value.postal_code,"onUpdate:modelValue":y[5]||(y[5]=m=>u.value.postal_code=m),required:t.required,error:t.errors.zip,"use-edit-mode":t.useEditMode,size:t.size,color:t.color,"dark-mode":t.darkMode,placeholder:"Zip code",width:"100%"},null,8,["modelValue","required","error","use-edit-mode","size","color","dark-mode"])]),e.createElementVNode("div",wn,[e.createVNode(ne,{modelValue:u.value.country,"onUpdate:modelValue":y[6]||(y[6]=m=>u.value.country=m),required:t.required,error:t.errors.country,"use-edit-mode":t.useEditMode,size:t.size,color:t.color,"dark-mode":t.darkMode,placeholder:"Country",width:"100%"},null,8,["modelValue","required","error","use-edit-mode","size","color","dark-mode"])])],2))}},[["__scopeId","data-v-29125fcb"]]),kn={class:"select-inner__container"},Sn={key:0,class:"select-label dark-fonts"},Gt=F({__name:"QstSelect",props:{multiSelect:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Whether only a single or multiple options can be selected."},options:{type:Array,required:!1,default:()=>[],tsType:"string[], number[], AutocompleteProp[]",description:"The dropdown options to be displayed. Types can be string[], number[], AutocompleteProp[]. (AutocompleteProp: {id?: (number, string, boolean), text: string, result?: any, subtext?: string, leftImage?: string, searchData?: {label: string, value: (string, number)}[], disabled?: boolean, disabledReason?: string}). *When using AutocompleteProp[], the text field is required.*"},modelValue:{type:[Object,Array,String,Number],required:!1,default:null,tsType:"Array, String, Number, AutocompleteProp",description:"Used for v-model, will be set to the active select value. *(For multiselect, v-model must be set to an array)*"},result:{type:[Object,Array,String,Number],required:!1,default:null,tsType:"Array, String, Number, AutocompleteProp",description:"Used for v-model:result, value will be the *result* property of AutocompleteProp."},size:{type:String,required:!1,default:"14px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},dynamicSizes:{type:Object,required:!1,default:null,tsType:"object as {[screenSize]: [size: string]}",description:"Any screen size defined will target that screen size and below (ex/ {xl: '10px'} will change to 10px on max-width: 1549px). Screen sizes larger than what is defined will use the normal props.size. Use dynamicSizes when the dropdown is being teleported to update dropdown's size as well."},color:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The accent color, used for details within the component."},width:{type:String,required:!1,default:"",tsType:"string",description:"The width of the select and dropdown. If unset, the sizing will adjust to the size prop for single select or 100% for multiselect."},fullWidth:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Sets the select to be full-width and take up 100% of its parent container."},useEditMode:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Whether the input should be editable or not."},showLabelOnEditMode:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Shows a label when in edit mode."},placeholder:{type:[String,Number],required:!1,default:"Select",tsType:"string | number",description:"Placeholder for select input."},disabled:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Disables the select, will show grayed out and unusable."},disabledReason:{type:String,required:!1,default:"",tsType:"string",description:"When the input is disabled, hovering over the input will show a tooltip with the disabled reason. *(This is only for the top select input. To set on an individual dropdown option, set disabledReason property on the option. (AutocompleteProp))*"},disabledTooltipPosition:{type:String,required:!1,default:"right",tsType:"string",description:"Tooltip position for showing an option's disabled reason. Applies to both top level input and/or the dropdown option's disabled tooltips."},numExpandedOptions:{type:Number,required:!1,default:3,tsType:"number",description:"Number of options to show before showing '+X options selected' tooltip."},error:{type:String,required:!1,default:null,tsType:"string",description:"Sets the error message."},useErrorIcon:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"An error icon will be displayed on the right of the select, hovering over will show a tooltip with the error message."},showErrorBelow:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Shows error message at the bottom of the input."},sortAlphabetically:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Whether or not to alphabetically sort the list of options in the dropdown."},isLoadingOptions:{type:Boolean,required:!1,default:null,tsType:"boolean",description:"Set to loading value when loading options from an endpoint. *(Overrides loader in dropdown)*"},defaultVal:{type:String,required:!1,default:"",tsType:"string",description:"A default value that will be added to the dropdown options as the first selected value. Selecting the default value will replace any active values."},dropdownHeight:{type:String,required:!1,default:"350px",tsType:"string",description:"The height for the dropdown."},closeMultiSelectAfterSelecting:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"After selecting an option, closes the dropdown. *(multiselect only)*"},icon:{type:String,required:!1,default:"",tsType:"string",description:"Any Iconify value, will be displayed to the right of the dropdown arrow."},tooltip:{type:[String,Object],required:!1,default:null,tsType:"string | {content: string, isHelpMode?: boolean, offset?: object, width?: number}",description:"Shows a tooltip dropdown when hovering over the input. Set to a string or object, based on if tooltip props are needed. *(ex/ offset, width, position, etc)* Tooltip is displayed inside the select, width and offset will default to match input dimensions."},useSelectAll:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Adds an option in the dropdown to select all options (multiselect only)"},darkMode:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Changes the styles to a dark theme."}},emits:["update:modelValue","update:result","change"],setup(t,{expose:i,emit:l}){e.useCssVars(I=>({"2e334459":t.color,e0ab3e3e:e.unref(M)}));const o=t,n=l,{modelValue:r,result:s,defaultVal:c,multiSelect:a,disabled:d,error:f,useErrorIcon:u,darkMode:g,size:T,dynamicSizes:h}=e.toRefs(o),y=e.ref(),m=e.ref(),b=e.ref(),B=e.ref(),x=e.ref(),k=e.computed(()=>{var p,w;const I=o.defaultVal?1:0;return((p=Z.value)==null?void 0:p.length)>I||o.multiSelect&&((w=Ne.value)==null?void 0:w.length)>I}),{isOpen:v,displayInputClasses:q,inputSize:M,isShowingErrorIcon:P,clearTextSelection:L,toggleOpen:E}=Qt(a,d,f,u,y,g,T,h),{isFocused:O,isTabFocused:Q,focusSelectInput:U,handleBlur:J}=et(v,a,b,B),{isInvalidVal:H,emitModelValues:K,checkIsValidOption:V,getCurrOptionValue:C,activeOption:$}=Ut(n,!1),{hasActiveModelValue:j,hasActiveResultValue:ee,isSameResultValues:S,updateResultFromValues:A}=Wt(n,a,r,s),{position:z,dropdownWidth:Y,isTeleporting:le,calculateDropdownPosition:ze}=Jt(x,m,v),{multiSelectOptions:Ne,multiSelectActiveIds:ye,multiSelectActiveValues:be,setActiveMultiSelectIds:Me,assignMultiSelectValuesAndIds:se,assignMultiSelectDefaultVal:Oe}=Ht(n,r,k),we=e.ref(!1),$e=e.computed(()=>!H(C(o.modelValue))),De=e.computed(()=>{var I;if(o.multiSelect){if(!ye.value.length&&o.defaultVal&&((I=o.modelValue)!=null&&I.includes(o.defaultVal)))return o.defaultVal}else if($e.value&&!y.value){const p=C(o.modelValue);return we.value=!o.defaultVal||!!o.defaultVal&&p!==o.defaultVal,p}return we.value=!1,o.placeholder}),ke=e.ref(),ot=e.computed(()=>({fontSize:M.value,width:o.width?o.width:o.multiSelect||o.fullWidth?"100%":""}));e.watch(v,()=>{v.value&&le.value&&ze(),U()});const lt=I=>{var p;I.key==="Escape"?L(!0):(I.key==="ArrowDown"||I.key==="Tab")&&(I.key==="ArrowDown"&&(v.value=!0),v.value&&((p=B.value)==null||p.focusFirstOption()),I.preventDefault())},Pe=I=>{const p=ke.value.contains(I.target),w=B.value.$el.contains(I.target);!p&&!w&&(v.value&&(v.value=!1),y.value="",e.nextTick(()=>J()))},oe=e.computed(()=>{var D;if(!o.multiSelect||!o.tooltip)return;const{tooltip:I}=o,p=I.width||(x.value?parseInt((D=getComputedStyle(x.value))==null?void 0:D.width):null),w=-1.25*parseInt(o.size);return{...typeof I=="string"?{content:I}:{...I,helpMode:I.isHelpMode},width:p,offset:I.offset||{x:-(w+p/2-10),y:0}}}),Z=e.ref([]),ie=I=>{if(o.defaultVal&&I===o.defaultVal)return o.defaultVal;const p=!!o.defaultVal&&Z.value.length===1,N=(Z.value.length&&!p?Z.value:o.options).find(D=>D.id&&(I.id||I.id===0)?D.id===I.id:I.text?(D.text||D)===I.text:I.result||I.result===0?D.result===I.result:D===I);return H(N)&&!o.multiSelect&&o.defaultVal?o.defaultVal:N},nt=(I,p)=>{B.value.clearDropdownInput(o.closeMultiSelectAfterSelecting);let w=Array.isArray(o.modelValue)?[...o.modelValue]:[];o.defaultVal&&w.includes(o.defaultVal)&&(w=w.filter(D=>D!==o.defaultVal));const N=w.find(D=>JSON.stringify(D)===JSON.stringify(p));if(N)w.splice(w.indexOf(N),1);else if(H(p))w.splice(w.indexOf(I),1);else{if(o.defaultVal&&p===o.defaultVal)return K([o.defaultVal]);w.push(p)}B.value.focusMultiSelectInput(),!w.length&&o.defaultVal&&w.push(o.defaultVal),K(w)},de=I=>{if(o.disabled)return;y.value="";const p=ie(I);v.value=o.multiSelect&&!o.closeMultiSelectAfterSelecting,o.multiSelect?nt(I,p):(U(),K(p))},ce=I=>{K(I?Z.value:[])},Se=e.ref(!1);e.watch(k,()=>{k.value&&(Se.value=!0,Le())});const Te=()=>{V(o.modelValue,Z.value)||!k.value?$.value=o.modelValue:K(ie(o.modelValue))};e.watch(()=>o.modelValue,()=>{var I,p,w;if(o.multiSelect){if(!k.value)return;if(ye.value=[],o.defaultVal&&((I=o.modelValue)!=null&&I.includes(o.defaultVal)))return Oe(o.defaultVal);if(!(Array.isArray(o.modelValue)&&((p=o.modelValue)==null?void 0:p.every(D=>V(D,Z.value))))){const D=(w=o.modelValue)==null?void 0:w.map(G=>ie(G)).filter(G=>!!G);return!D.length&&o.defaultVal&&D.push(o.defaultVal),K(D)}Me()}else{if(!!$.value&&o.modelValue===$.value&&y.value||H(o.modelValue)){H(o.modelValue)&&o.result&&n("update:result","");return}if(o.defaultVal&&o.modelValue===o.defaultVal){$.value=o.defaultVal,o.result!==o.defaultVal&&n("update:result",o.defaultVal);return}Te()}A()});const Le=()=>{if(k.value)if(j.value){const I=o.multiSelect?o.modelValue.map(p=>ie(p)).filter(p=>!!p):ie(o.modelValue);K(I)}else ee.value&&Ve()},je=()=>{o.defaultVal&&!ee.value&&!j.value&&K(o.multiSelect?[o.defaultVal]:o.defaultVal)},it=()=>{o.options.length&&(Z.value=re(o.options)),o.multiSelect&&Z.value.length&&se(Z.value)},Ve=()=>{var w;const I=o.result===o.defaultVal||Array.isArray(o.result)&&((w=o.result)==null?void 0:w.includes(o.defaultVal));if(!ee.value||I){!j.value&&I&&n("update:modelValue",o.result);return}if(S())return;let p;if(o.multiSelect?p=o.result.map(N=>Ne.value.find(D=>{if(D.result)return JSON.stringify(D.result)===JSON.stringify(N)})).filter(N=>!!N):p=Z.value.find(N=>JSON.stringify(N.result)===JSON.stringify(o.result)),!p||Array.isArray(p)&&!p.length){let N;o.multiSelect?N=o.defaultVal?[o.defaultVal]:[]:N=o.defaultVal?o.defaultVal:"",!j.value||o.defaultVal&&o.modelValue===o.defaultVal?n("update:result",N):(!o.multiSelect||o.multiSelect&&o.result.length===1&&!o.modelValue.map(D=>D.result).includes(o.result[0]))&&n("update:modelValue",N);return}n("update:modelValue",p),n("change",p)};return e.watch(()=>o.result,()=>Ve()),e.onMounted(()=>{it(),Le(),je(),document.addEventListener("click",Pe)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",Pe)}),e.watchEffect(()=>{var p;Z.value=((p=B.value)==null?void 0:p.autocompleteData)??[];const I=o.multiSelect&&!!o.defaultVal&&Z.value.length===1;!Z.value.length||!Se.value||I||(o.multiSelect&&se(Z.value),Se.value=!1)}),i({toggleOpen:E}),(I,p)=>{var w;return e.openBlock(),e.createElementBlock("div",{ref_key:"wrapperEl",ref:x,style:e.normalizeStyle(ot.value),class:e.normalizeClass([{"width--override":e.unref(a)||t.fullWidth||!!t.width},"inline-block"])},[e.createElementVNode("div",{ref_key:"selectContainerEl",ref:ke,tabindex:"0",onFocus:p[11]||(p[11]=N=>Q.value=!0),onBlur:p[12]||(p[12]=N=>e.unref(J)(!0)),class:e.normalizeClass([{"single-select":!e.unref(a)},"select-container"])},[e.createVNode(Ie,{"use-edit-mode":t.useEditMode,value:((w=e.unref(r))==null?void 0:w.text)??e.unref(r),label:t.placeholder,"show-label-on-edit-mode":t.showLabelOnEditMode},{"view-mode":e.withCtx(()=>[e.renderSlot(I.$slots,"view-mode",{},void 0,!0)]),default:e.withCtx(()=>{var N,D,G;return[e.createElementVNode("div",kn,[e.createElementVNode("div",{ref_key:"displayInputEl",ref:m,onClick:p[5]||(p[5]=(...X)=>e.unref(E)&&e.unref(E)(...X)),tabindex:"-1",style:e.normalizeStyle({fontSize:e.unref(M)}),class:e.normalizeClass([e.unref(q),{focused:e.unref(O),"info-tooltip--visible":!!t.tooltip&&!e.unref(P)}])},[$e.value?(e.openBlock(),e.createElementBlock("label",Sn,e.toDisplayString(t.placeholder),1)):e.createCommentVNode("",!0),e.unref(a)?(e.openBlock(),e.createBlock(Rt,{key:1,"use-select":"",size:e.unref(M),"active-values":e.unref(be),placeholder:De.value,"show-active-values":!!((N=e.unref(be))!=null&&N.length)&&!((D=e.unref(be))!=null&&D.includes(e.unref(c))),"disabled-config":{disabled:e.unref(d),disabledReason:t.disabledReason,disabledTooltipPosition:t.disabledTooltipPosition},"num-expanded-options":t.numExpandedOptions,error:e.unref(f),"show-error-icon":e.unref(P),icon:t.icon,tooltip:oe.value,onOnToggleActive:p[0]||(p[0]=X=>de(X)),class:e.normalizeClass({rotate:e.unref(v),"input-error--bottom":t.showErrorBelow})},null,8,["size","active-values","placeholder","show-active-values","disabled-config","num-expanded-options","error","show-error-icon","icon","tooltip","class"])):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass([{"active-placeholder":we.value},"select-input__wrapper"])},[e.createVNode(ne,{ref_key:"qstInputEl",ref:b,modelValue:y.value,"onUpdate:modelValue":p[1]||(p[1]=X=>y.value=X),placeholder:De.value,"hide-image":!!y.value,image:((G=e.unref(r))==null?void 0:G.leftImage)??"",autocomplete:"off",size:e.unref(M),color:t.color,"dark-mode":e.unref(g),disabled:e.unref(d),"disabled-reason":t.disabledReason,"disabled-tooltip-position":t.disabledTooltipPosition,"use-clear-icon":!e.unref(H)(y.value)&&!e.unref(P),icon:t.icon,tooltip:t.tooltip,error:e.unref(f),"use-error-icon":e.unref(u),"show-error-below":t.showErrorBelow,onOnInputClear:p[2]||(p[2]=X=>v.value=!1),onKeydown:lt,onBlur:p[3]||(p[3]=X=>e.unref(J)()),onInput:p[4]||(p[4]=X=>v.value=!0)},{"input-icon":e.withCtx(()=>[e.unref(H)(y.value)?(e.openBlock(),e.createBlock(W,{key:0,icon:"ep:arrow-down-bold",size:e.unref(M),class:e.normalizeClass([{rotate:e.unref(v)},"dropdown-arrow"])},null,8,["size","class"])):e.createCommentVNode("",!0)]),_:1},8,["modelValue","placeholder","hide-image","image","size","color","dark-mode","disabled","disabled-reason","disabled-tooltip-position","use-clear-icon","icon","tooltip","error","use-error-icon","show-error-below"])],2))],6),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(le)?jt:"div"),{to:e.unref(le)?"#app":""},{default:e.withCtx(()=>{var X;return[e.createVNode(Ft,{ref_key:"autocompleteMenuEl",ref:B,modelValue:e.unref(v),"onUpdate:modelValue":p[6]||(p[6]=_=>e.isRef(v)?v.value=_:null),src:t.options,"default-val":e.unref(c),width:e.unref(Y)||"100%",position:e.unref(le)?e.unref(z):null,"multi-select":e.unref(a),"disable-dropdown-input":e.unref(d),"search-term":y.value,"max-height":t.dropdownHeight,size:e.unref(M),color:t.color,"dark-mode":e.unref(g),"active-value":e.unref(r),"is-input-focused":e.unref(O),"show-active-icon":"","sort-alphabetically":t.sortAlphabetically,"is-loading-options":t.isLoadingOptions,"input-id":((X=b.value)==null?void 0:X.id)??"","disabled-tooltip-position":t.disabledTooltipPosition,"use-select-all":t.useSelectAll,"onUpdate:item":p[7]||(p[7]=_=>de(_)),onOnSelectAll:p[8]||(p[8]=_=>ce(_)),onOnDropdownFocus:p[9]||(p[9]=_=>O.value=!0),onBlur:p[10]||(p[10]=_=>e.unref(J)())},{"no-results-msg":e.withCtx(()=>[e.renderSlot(I.$slots,"no-results-msg",{},void 0,!0)]),_:3},8,["modelValue","src","default-val","width","position","multi-select","disable-dropdown-input","search-term","max-height","size","color","dark-mode","active-value","is-input-focused","sort-alphabetically","is-loading-options","input-id","disabled-tooltip-position","use-select-all"])]}),_:3},8,["to"]))])]}),_:3},8,["use-edit-mode","value","label","show-label-on-edit-mode"])],34)],6)}}},[["__scopeId","data-v-ed836bf4"]]),tt={QstIcon:W,QstTooltip:te,QstInput:ne,QstButton:ge,QstModal:zt,QstLoader:Ae,QstDropdown:Nt,QstSwitch:Mt,QstScrollContainer:Ot,QstImg:he,QstTag:Xe,QstExpandableRow:$t,QstPanel:Dt,QstCheckbox:Ze,QstCheckboxGroup:Pt,QstRadio:_e,QstRadioGroup:Lt,QstAutocomplete:Kt,QstAddressAutocomplete:Yt,QstSelect:Gt};function Xt(t,i){i.forEach(l=>{tt[l]?t.component(l,tt[l]):console.warn(`Component ${l} not found.`)})}function Tn(t){Xt(t,Object.keys(tt))}R.QstAddressAutocomplete=Yt,R.QstAutocomplete=Kt,R.QstButton=ge,R.QstCheckbox=Ze,R.QstCheckboxGroup=Pt,R.QstDropdown=Nt,R.QstExpandableRow=$t,R.QstIcon=W,R.QstImg=he,R.QstInput=ne,R.QstLoader=Ae,R.QstModal=zt,R.QstPanel=Dt,R.QstRadio=_e,R.QstRadioGroup=Lt,R.QstScrollContainer=Ot,R.QstSelect=Gt,R.QstSwitch=Mt,R.QstTag=Xe,R.QstTooltip=te,R.install=Tn,R.installComponentsByName=Xt,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(R,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(R=typeof globalThis<"u"?globalThis:R||self,e(R.QuestUI={},R.Vue))})(this,function(R,e){"use strict";const st=/^[a-z0-9]+(-[a-z0-9]+)*$/,xe=(t,i,l,o="")=>{const n=t.split(":");if(t.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;o=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const c=n.pop(),a=n.pop(),d={provider:n.length>0?n[0]:o,prefix:a,name:c};return i&&!Be(d)?null:d}const r=n[0],s=r.split("-");if(s.length>1){const c={provider:o,prefix:s.shift(),name:s.join("-")};return i&&!Be(c)?null:c}if(l&&o===""){const c={provider:o,prefix:"",name:r};return i&&!Be(c,l)?null:c}return null},Be=(t,i)=>t?!!((i&&t.prefix===""||t.prefix)&&t.name):!1,at=Object.freeze({left:0,top:0,width:16,height:16}),ve=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Ce=Object.freeze({...at,...ve}),Re=Object.freeze({...Ce,body:"",hidden:!1});function Zt(t,i){const l={};!t.hFlip!=!i.hFlip&&(l.hFlip=!0),!t.vFlip!=!i.vFlip&&(l.vFlip=!0);const o=((t.rotate||0)+(i.rotate||0))%4;return o&&(l.rotate=o),l}function dt(t,i){const l=Zt(t,i);for(const o in Re)o in ve?o in t&&!(o in l)&&(l[o]=ve[o]):o in i?l[o]=i[o]:o in t&&(l[o]=t[o]);return l}function _t(t,i){const l=t.icons,o=t.aliases||Object.create(null),n=Object.create(null);function r(s){if(l[s])return n[s]=[];if(!(s in n)){n[s]=null;const c=o[s]&&o[s].parent,a=c&&r(c);a&&(n[s]=[c].concat(a))}return n[s]}return Object.keys(l).concat(Object.keys(o)).forEach(r),n}function eo(t,i,l){const o=t.icons,n=t.aliases||Object.create(null);let r={};function s(c){r=dt(o[c]||n[c],r)}return s(i),l.forEach(s),dt(t,r)}function ct(t,i){const l=[];if(typeof t!="object"||typeof t.icons!="object")return l;t.not_found instanceof Array&&t.not_found.forEach(n=>{i(n,null),l.push(n)});const o=_t(t);for(const n in o){const r=o[n];r&&(i(n,eo(t,n,r)),l.push(n))}return l}const to={provider:"",aliases:{},not_found:{},...at};function Fe(t,i){for(const l in i)if(l in t&&typeof t[l]!=typeof i[l])return!1;return!0}function ut(t){if(typeof t!="object"||t===null)return null;const i=t;if(typeof i.prefix!="string"||!t.icons||typeof t.icons!="object"||!Fe(t,to))return null;const l=i.icons;for(const n in l){const r=l[n];if(!n||typeof r.body!="string"||!Fe(r,Re))return null}const o=i.aliases||Object.create(null);for(const n in o){const r=o[n],s=r.parent;if(!n||typeof s!="string"||!l[s]&&!o[s]||!Fe(r,Re))return null}return i}const ft=Object.create(null);function oo(t,i){return{provider:t,prefix:i,icons:Object.create(null),missing:new Set}}function ae(t,i){const l=ft[t]||(ft[t]=Object.create(null));return l[i]||(l[i]=oo(t,i))}function pt(t,i){return ut(i)?ct(i,(l,o)=>{o?t.icons[l]=o:t.missing.add(l)}):[]}function lo(t,i,l){try{if(typeof l.body=="string")return t.icons[i]={...l},!0}catch{}return!1}let ue=!1;function ht(t){return typeof t=="boolean"&&(ue=t),ue}function no(t){const i=typeof t=="string"?xe(t,!0,ue):t;if(i){const l=ae(i.provider,i.prefix),o=i.name;return l.icons[o]||(l.missing.has(o)?null:void 0)}}function io(t,i){const l=xe(t,!0,ue);if(!l)return!1;const o=ae(l.provider,l.prefix);return i?lo(o,l.name,i):(o.missing.add(l.name),!0)}function ro(t,i){if(typeof t!="object")return!1;if(typeof i!="string"&&(i=t.provider||""),ue&&!i&&!t.prefix){let n=!1;return ut(t)&&(t.prefix="",ct(t,(r,s)=>{io(r,s)&&(n=!0)})),n}const l=t.prefix;if(!Be({prefix:l,name:"a"}))return!1;const o=ae(i,l);return!!pt(o,t)}const mt=Object.freeze({width:null,height:null}),gt=Object.freeze({...mt,...ve}),so=/(-?[0-9.]*[0-9]+[0-9.]*)/g,ao=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function yt(t,i,l){if(i===1)return t;if(l=l||100,typeof t=="number")return Math.ceil(t*i*l)/l;if(typeof t!="string")return t;const o=t.split(so);if(o===null||!o.length)return t;const n=[];let r=o.shift(),s=ao.test(r);for(;;){if(s){const c=parseFloat(r);isNaN(c)?n.push(r):n.push(Math.ceil(c*i*l)/l)}else n.push(r);if(r=o.shift(),r===void 0)return n.join("");s=!s}}function co(t,i="defs"){let l="";const o=t.indexOf("<"+i);for(;o>=0;){const n=t.indexOf(">",o),r=t.indexOf("</"+i);if(n===-1||r===-1)break;const s=t.indexOf(">",r);if(s===-1)break;l+=t.slice(n+1,r).trim(),t=t.slice(0,o).trim()+t.slice(s+1)}return{defs:l,content:t}}function uo(t,i){return t?"<defs>"+t+"</defs>"+i:i}function fo(t,i,l){const o=co(t);return uo(o.defs,i+o.content+l)}const po=t=>t==="unset"||t==="undefined"||t==="none";function ho(t,i){const l={...Ce,...t},o={...gt,...i},n={left:l.left,top:l.top,width:l.width,height:l.height};let r=l.body;[l,o].forEach(y=>{const m=[],b=y.hFlip,B=y.vFlip;let x=y.rotate;b?B?x+=2:(m.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),m.push("scale(-1 1)"),n.top=n.left=0):B&&(m.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),m.push("scale(1 -1)"),n.top=n.left=0);let k;switch(x<0&&(x-=Math.floor(x/4)*4),x=x%4,x){case 1:k=n.height/2+n.top,m.unshift("rotate(90 "+k.toString()+" "+k.toString()+")");break;case 2:m.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:k=n.width/2+n.left,m.unshift("rotate(-90 "+k.toString()+" "+k.toString()+")");break}x%2===1&&(n.left!==n.top&&(k=n.left,n.left=n.top,n.top=k),n.width!==n.height&&(k=n.width,n.width=n.height,n.height=k)),m.length&&(r=fo(r,'<g transform="'+m.join(" ")+'">',"</g>"))});const s=o.width,c=o.height,a=n.width,d=n.height;let f,u;s===null?(u=c===null?"1em":c==="auto"?d:c,f=yt(u,a/d)):(f=s==="auto"?a:s,u=c===null?yt(f,d/a):c==="auto"?d:c);const g={},T=(y,m)=>{po(m)||(g[y]=m.toString())};T("width",f),T("height",u);const h=[n.left,n.top,a,d];return g.viewBox=h.join(" "),{attributes:g,viewBox:h,body:r}}const mo=/\sid="(\S+)"/g,go="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let yo=0;function bo(t,i=go){const l=[];let o;for(;o=mo.exec(t);)l.push(o[1]);if(!l.length)return t;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return l.forEach(r=>{const s=typeof i=="function"?i(r):i+(yo++).toString(),c=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+s+n+"$3")}),t=t.replace(new RegExp(n,"g"),""),t}const He=Object.create(null);function wo(t,i){He[t]=i}function Qe(t){return He[t]||He[""]}function We(t){let i;if(typeof t.resources=="string")i=[t.resources];else if(i=t.resources,!(i instanceof Array)||!i.length)return null;return{resources:i,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}const Ue=Object.create(null),fe=["https://api.simplesvg.com","https://api.unisvg.com"],qe=[];for(;fe.length>0;)fe.length===1||Math.random()>.5?qe.push(fe.shift()):qe.push(fe.pop());Ue[""]=We({resources:["https://api.iconify.design"].concat(qe)});function ko(t,i){const l=We(i);return l===null?!1:(Ue[t]=l,!0)}function Je(t){return Ue[t]}let bt=(()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}})();function So(t,i){const l=Je(t);if(!l)return 0;let o;if(!l.maxURL)o=0;else{let n=0;l.resources.forEach(s=>{n=Math.max(n,s.length)});const r=i+".json?icons=";o=l.maxURL-n-l.path.length-r.length}return o}function To(t){return t===404}const Vo=(t,i,l)=>{const o=[],n=So(t,i),r="icons";let s={type:r,provider:t,prefix:i,icons:[]},c=0;return l.forEach((a,d)=>{c+=a.length+1,c>=n&&d>0&&(o.push(s),s={type:r,provider:t,prefix:i,icons:[]},c=a.length),s.icons.push(a)}),o.push(s),o};function xo(t){if(typeof t=="string"){const i=Je(t);if(i)return i.path}return"/"}const Bo={prepare:Vo,send:(t,i,l)=>{if(!bt){l("abort",424);return}let o=xo(i.provider);switch(i.type){case"icons":{const r=i.prefix,c=i.icons.join(","),a=new URLSearchParams({icons:c});o+=r+".json?"+a.toString();break}case"custom":{const r=i.uri;o+=r.slice(0,1)==="/"?r.slice(1):r;break}default:l("abort",400);return}let n=503;bt(t+o).then(r=>{const s=r.status;if(s!==200){setTimeout(()=>{l(To(s)?"abort":"next",s)});return}return n=501,r.json()}).then(r=>{if(typeof r!="object"||r===null){setTimeout(()=>{r===404?l("abort",r):l("next",n)});return}setTimeout(()=>{l("success",r)})}).catch(()=>{l("next",n)})}};function vo(t){const i={loaded:[],missing:[],pending:[]},l=Object.create(null);t.sort((n,r)=>n.provider!==r.provider?n.provider.localeCompare(r.provider):n.prefix!==r.prefix?n.prefix.localeCompare(r.prefix):n.name.localeCompare(r.name));let o={provider:"",prefix:"",name:""};return t.forEach(n=>{if(o.name===n.name&&o.prefix===n.prefix&&o.provider===n.provider)return;o=n;const r=n.provider,s=n.prefix,c=n.name,a=l[r]||(l[r]=Object.create(null)),d=a[s]||(a[s]=ae(r,s));let f;c in d.icons?f=i.loaded:s===""||d.missing.has(c)?f=i.missing:f=i.pending;const u={provider:r,prefix:s,name:c};f.push(u)}),i}function wt(t,i){t.forEach(l=>{const o=l.loaderCallbacks;o&&(l.loaderCallbacks=o.filter(n=>n.id!==i))})}function Co(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const i=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!i.length)return;let l=!1;const o=t.provider,n=t.prefix;i.forEach(r=>{const s=r.icons,c=s.pending.length;s.pending=s.pending.filter(a=>{if(a.prefix!==n)return!0;const d=a.name;if(t.icons[d])s.loaded.push({provider:o,prefix:n,name:d});else if(t.missing.has(d))s.missing.push({provider:o,prefix:n,name:d});else return l=!0,!0;return!1}),s.pending.length!==c&&(l||wt([t],r.id),r.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),r.abort))})}))}let qo=0;function Eo(t,i,l){const o=qo++,n=wt.bind(null,l,o);if(!i.pending.length)return n;const r={id:o,icons:i,callback:t,abort:n};return l.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(r)}),n}function Io(t,i=!0,l=!1){const o=[];return t.forEach(n=>{const r=typeof n=="string"?xe(n,i,l):n;r&&o.push(r)}),o}var Ao={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function zo(t,i,l,o){const n=t.resources.length,r=t.random?Math.floor(Math.random()*n):t.index;let s;if(t.random){let q=t.resources.slice(0);for(s=[];q.length>1;){const M=Math.floor(Math.random()*q.length);s.push(q[M]),q=q.slice(0,M).concat(q.slice(M+1))}s=s.concat(q)}else s=t.resources.slice(r).concat(t.resources.slice(0,r));const c=Date.now();let a="pending",d=0,f,u=null,g=[],T=[];typeof o=="function"&&T.push(o);function h(){u&&(clearTimeout(u),u=null)}function y(){a==="pending"&&(a="aborted"),h(),g.forEach(q=>{q.status==="pending"&&(q.status="aborted")}),g=[]}function m(q,M){M&&(T=[]),typeof q=="function"&&T.push(q)}function b(){return{startTime:c,payload:i,status:a,queriesSent:d,queriesPending:g.length,subscribe:m,abort:y}}function B(){a="failed",T.forEach(q=>{q(void 0,f)})}function x(){g.forEach(q=>{q.status==="pending"&&(q.status="aborted")}),g=[]}function k(q,M,P){const L=M!=="success";switch(g=g.filter(E=>E!==q),a){case"pending":break;case"failed":if(L||!t.dataAfterTimeout)return;break;default:return}if(M==="abort"){f=P,B();return}if(L){f=P,g.length||(s.length?v():B());return}if(h(),x(),!t.random){const E=t.resources.indexOf(q.resource);E!==-1&&E!==t.index&&(t.index=E)}a="completed",T.forEach(E=>{E(P)})}function v(){if(a!=="pending")return;h();const q=s.shift();if(q===void 0){if(g.length){u=setTimeout(()=>{h(),a==="pending"&&(x(),B())},t.timeout);return}B();return}const M={status:"pending",resource:q,callback:(P,L)=>{k(M,P,L)}};g.push(M),d++,u=setTimeout(v,t.rotate),l(q,i,M.callback)}return setTimeout(v),b}function kt(t){const i={...Ao,...t};let l=[];function o(){l=l.filter(c=>c().status==="pending")}function n(c,a,d){const f=zo(i,c,a,(u,g)=>{o(),d&&d(u,g)});return l.push(f),f}function r(c){return l.find(a=>c(a))||null}return{query:n,find:r,setIndex:c=>{i.index=c},getIndex:()=>i.index,cleanup:o}}function St(){}const Ke=Object.create(null);function No(t){if(!Ke[t]){const i=Je(t);if(!i)return;const l=kt(i),o={config:i,redundancy:l};Ke[t]=o}return Ke[t]}function Mo(t,i,l){let o,n;if(typeof t=="string"){const r=Qe(t);if(!r)return l(void 0,424),St;n=r.send;const s=No(t);s&&(o=s.redundancy)}else{const r=We(t);if(r){o=kt(r);const s=t.resources?t.resources[0]:"",c=Qe(s);c&&(n=c.send)}}return!o||!n?(l(void 0,424),St):o.query(i,n,l)().abort}function Tt(){}function Oo(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,Co(t)}))}function $o(t){const i=[],l=[];return t.forEach(o=>{(o.match(st)?i:l).push(o)}),{valid:i,invalid:l}}function pe(t,i,l){function o(){const n=t.pendingIcons;i.forEach(r=>{n&&n.delete(r),t.icons[r]||t.missing.add(r)})}if(l&&typeof l=="object")try{if(!pt(t,l).length){o();return}}catch(n){console.error(n)}o(),Oo(t)}function Vt(t,i){t instanceof Promise?t.then(l=>{i(l)}).catch(()=>{i(null)}):i(t)}function Do(t,i){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(i).sort():t.iconsToLoad=i,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:l,prefix:o}=t,n=t.iconsToLoad;if(delete t.iconsToLoad,!n||!n.length)return;const r=t.loadIcon;if(t.loadIcons&&(n.length>1||!r)){Vt(t.loadIcons(n,o,l),f=>{pe(t,n,f)});return}if(r){n.forEach(f=>{const u=r(f,o,l);Vt(u,g=>{const T=g?{prefix:o,icons:{[f]:g}}:null;pe(t,[f],T)})});return}const{valid:s,invalid:c}=$o(n);if(c.length&&pe(t,c,null),!s.length)return;const a=o.match(st)?Qe(l):null;if(!a){pe(t,s,null);return}a.prepare(l,o,s).forEach(f=>{Mo(l,f,u=>{pe(t,f.icons,u)})})}))}const Po=(t,i)=>{const l=Io(t,!0,ht()),o=vo(l);if(!o.pending.length){let a=!0;return i&&setTimeout(()=>{a&&i(o.loaded,o.missing,o.pending,Tt)}),()=>{a=!1}}const n=Object.create(null),r=[];let s,c;return o.pending.forEach(a=>{const{provider:d,prefix:f}=a;if(f===c&&d===s)return;s=d,c=f,r.push(ae(d,f));const u=n[d]||(n[d]=Object.create(null));u[f]||(u[f]=[])}),o.pending.forEach(a=>{const{provider:d,prefix:f,name:u}=a,g=ae(d,f),T=g.pendingIcons||(g.pendingIcons=new Set);T.has(u)||(T.add(u),n[d][f].push(u))}),r.forEach(a=>{const d=n[a.provider][a.prefix];d.length&&Do(a,d)}),i?Eo(i,o,r):Tt};function Lo(t,i){const l={...t};for(const o in i){const n=i[o],r=typeof n;o in mt?(n===null||n&&(r==="string"||r==="number"))&&(l[o]=n):r===typeof l[o]&&(l[o]=o==="rotate"?n%4:n)}return l}const jo=/[\s,]+/;function Ro(t,i){i.split(jo).forEach(l=>{switch(l.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0;break}})}function Fo(t,i=0){const l=t.replace(/^-?[0-9.]*/,"");function o(n){for(;n<0;)n+=4;return n%4}if(l===""){const n=parseInt(t);return isNaN(n)?0:o(n)}else if(l!==t){let n=0;switch(l){case"%":n=25;break;case"deg":n=90}if(n){let r=parseFloat(t.slice(0,t.length-l.length));return isNaN(r)?0:(r=r/n,r%1===0?o(r):0)}}return i}function Ho(t,i){let l=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const o in i)l+=" "+o+'="'+i[o]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+l+">"+t+"</svg>"}function Qo(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Wo(t){return"data:image/svg+xml,"+Qo(t)}function Uo(t){return'url("'+Wo(t)+'")'}const xt={...gt,inline:!1},Jo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Ko={display:"inline-block"},Ge={backgroundColor:"currentColor"},Bt={backgroundColor:"transparent"},vt={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Ct={webkitMask:Ge,mask:Ge,background:Bt};for(const t in Ct){const i=Ct[t];for(const l in vt)i[t+l]=vt[l]}const Ee={};["horizontal","vertical"].forEach(t=>{const i=t.slice(0,1)+"Flip";Ee[t+"-flip"]=i,Ee[t.slice(0,1)+"-flip"]=i,Ee[t+"Flip"]=i});function qt(t){return t+(t.match(/^[-0-9.]+$/)?"px":"")}const Et=(t,i)=>{const l=Lo(xt,i),o={...Jo},n=i.mode||"svg",r={},s=i.style,c=typeof s=="object"&&!(s instanceof Array)?s:{};for(let y in i){const m=i[y];if(m!==void 0)switch(y){case"icon":case"style":case"onLoad":case"mode":case"ssr":break;case"inline":case"hFlip":case"vFlip":l[y]=m===!0||m==="true"||m===1;break;case"flip":typeof m=="string"&&Ro(l,m);break;case"color":r.color=m;break;case"rotate":typeof m=="string"?l[y]=Fo(m):typeof m=="number"&&(l[y]=m);break;case"ariaHidden":case"aria-hidden":m!==!0&&m!=="true"&&delete o["aria-hidden"];break;default:{const b=Ee[y];b?(m===!0||m==="true"||m===1)&&(l[b]=!0):xt[y]===void 0&&(o[y]=m)}}}const a=ho(t,l),d=a.attributes;if(l.inline&&(r.verticalAlign="-0.125em"),n==="svg"){o.style={...r,...c},Object.assign(o,d);let y=0,m=i.id;return typeof m=="string"&&(m=m.replace(/-/g,"_")),o.innerHTML=bo(a.body,m?()=>m+"ID"+y++:"iconifyVue"),e.h("svg",o)}const{body:f,width:u,height:g}=t,T=n==="mask"||(n==="bg"?!1:f.indexOf("currentColor")!==-1),h=Ho(f,{...d,width:u+"",height:g+""});return o.style={...r,"--svg":Uo(h),width:qt(d.width),height:qt(d.height),...Ko,...T?Ge:Bt,...c},e.h("span",o)};if(ht(!0),wo("",Bo),typeof document<"u"&&typeof window<"u"){const t=window;if(t.IconifyPreload!==void 0){const i=t.IconifyPreload,l="Invalid IconifyPreload syntax.";typeof i=="object"&&i!==null&&(i instanceof Array?i:[i]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!ro(o))&&console.error(l)}catch{console.error(l)}})}if(t.IconifyProviders!==void 0){const i=t.IconifyProviders;if(typeof i=="object"&&i!==null)for(let l in i){const o="IconifyProviders["+l+"] is invalid.";try{const n=i[l];if(typeof n!="object"||!n||n.resources===void 0)continue;ko(l,n)||console.error(o)}catch{console.error(o)}}}}const Go={...Ce,body:""},Yo=e.defineComponent({inheritAttrs:!1,data(){return{_name:"",_loadingIcon:null,iconMounted:!1,counter:0}},mounted(){this.iconMounted=!0},unmounted(){this.abortLoading()},methods:{abortLoading(){this._loadingIcon&&(this._loadingIcon.abort(),this._loadingIcon=null)},getIcon(t,i,l){if(typeof t=="object"&&t!==null&&typeof t.body=="string")return this._name="",this.abortLoading(),{data:t};let o;if(typeof t!="string"||(o=xe(t,!1,!0))===null)return this.abortLoading(),null;let n=no(o);if(!n)return(!this._loadingIcon||this._loadingIcon.name!==t)&&(this.abortLoading(),this._name="",n!==null&&(this._loadingIcon={name:t,abort:Po([o],()=>{this.counter++})})),null;if(this.abortLoading(),this._name!==t&&(this._name=t,i&&i(t)),l){n=Object.assign({},n);const s=l(n.body,o.name,o.prefix,o.provider);typeof s=="string"&&(n.body=s)}const r=["iconify"];return o.prefix!==""&&r.push("iconify--"+o.prefix),o.provider!==""&&r.push("iconify--"+o.provider),{data:n,classes:r}}},render(){this.counter;const t=this.$attrs,i=this.iconMounted||t.ssr?this.getIcon(t.icon,t.onLoad,t.customise):null;if(!i)return Et(Go,t);let l=t;return i.classes&&(l={...t,class:(typeof t.class=="string"?t.class+" ":"")+i.classes.join(" ")}),Et({...Ce,...i.data},l)}}),F=(t,i)=>{const l=t.__vccOpts||t;for(const[o,n]of i)l[o]=n;return l},Xo=["src"],W=F({__name:"QstIcon",props:{icon:{type:String,required:!0,tsType:"string",description:"Iconify value for the icon."},color:{type:String,required:!1,default:null,tsType:"string",description:"The color of the icon."},circle:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Shows the icon in a circle. The background color of the circle will be the color prop and the icon will show as white."},size:{type:String,required:!1,default:"16px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},alignText:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Aligns the icon and text vertically."}},setup(t){const i=t,l=e.computed(()=>i.circle?{backgroundColor:i.color,color:"white",borderRadius:"50%",padding:"3px"}:i.color?{color:i.color}:null);return(o,n)=>{var r;return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({fontSize:t.size}),class:e.normalizeClass([{"icon--align":t.alignText},"qst-icon__wrapper"])},[(r=t.icon)!=null&&r.startsWith("https")?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.icon,class:"image-icon"},null,8,Xo)):(e.openBlock(),e.createBlock(e.unref(Yo),{key:1,icon:t.icon,style:e.normalizeStyle(l.value)},null,8,["icon","style"]))],6)}}},[["__scopeId","data-v-cd030e7c"]]),Zo={class:"tooltip-wrapper__outer"},_o={class:"tooltip-wrapper"},el=["innerHTML"],te=F({__name:"QstTooltip",props:{offset:{type:Object,required:!1,default:()=>({x:0,y:0}),tsType:"{x: number, y: number}",description:"Moves the tooltip from its default position. *(+X moves right, -X moves left, +Y moves down, -Y moves up)*"},offsetTriangle:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"When offset is set, the triangle will remain anchored to the trigger by default. If true, the triangle will move with the rest of the offset."},scrollableY:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"The tooltip dropdown will scroll vertically when content exceeds the tooltip size."},icon:{type:String,required:!1,default:"ant-design:info-circle-filled",tsType:"string",description:"Hovering over the icon will trigger the tooltip dropdown to be visible, can be set to any iconify value."},color:{type:String,required:!1,default:"#616161",tsType:"string",description:"The color of the icon."},size:{type:String,required:!1,default:"14px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},useHoverIcon:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Whether the icon should be used as the tooltip trigger."},width:{type:Number,required:!1,default:260,tsType:"number",description:"Width of the tooltip. *(number value only, will be set to pixel unit)*"},position:{type:String,required:!1,default:"bottom",tsType:"string",description:"Pass in top/left/right/bottom to control where the tooltip dropdown appears in relation to the trigger."},solid:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"The background of the tooltip dropdown will be completely solid."},disabled:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Prevents the tooltip from being triggered by hover/click."},useHoverBuffer:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Adds a transparent element between the tooltip trigger and dropdown. Allows the user to move the mouse from trigger to content without closing the tooltip."},helpMode:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Tooltip will only be visible when true, tooltip icon and styles are updated to a help theme."},content:{type:String,required:!1,default:null,tsType:"string",description:"The content shown in the tooltip dropdown. *(can also be set by using the default slot)*"},overrideStyles:{type:Object,required:!1,default:null,tsType:"object",description:"Set to a style object, will override default tooltip dropdown styles. *(teleported tooltip dropdowns can't be targeted by parents)*"},preventClickOverride:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Prevents the tooltip from staying open when clicking on the trigger."}},setup(t,{expose:i}){const l=t,o=e.ref(),n=e.ref(),r=e.ref(0),s=e.computed(()=>({"--offset-x":l.offset.x+"px","--offset-y":l.offset.y+"px","--offset-top":(l.width/2-13)*-1+l.offset.x+"px","--offset-left":r.value/2*-1+10+l.offset.y+"px",width:l.width+"px",top:T.value.top,left:T.value.left,...l.overrideStyles})),c=e.computed(()=>({style:l.helpMode?"background-color: black; border-radius: 50%;":"",icon:l.helpMode?"material-symbols:help-rounded":l.icon,color:l.helpMode?"#28C76F":l.color})),a=e.ref(!1),d=e.ref(!1);e.watch(a,()=>{a.value&&n.value&&e.nextTick(()=>{r.value=n.value.offsetHeight})});const f=B=>{(B||!d.value)&&(a.value=!1,d.value=!1)},u=e.useSlots(),g=e.computed(()=>{var B,x;if(!a.value||l.disabled||!u.default&&!l.content)return!1;if(u.default){const k=(B=u.default())==null?void 0:B[0];if(k)return Array.isArray(k.children)?!!k.children.length:!!k.children||k.__v_isVNode||!!((x=Object.values(k==null?void 0:k.props))!=null&&x.some(v=>!!v))}return!!l.content});i({isShowing:a});const T=e.ref({top:"",left:"-1000px"}),h=e.ref(),y=()=>{if(!o.value||!a.value)return;const B=new IntersectionObserver(x=>{var U;const k=x[0].boundingClientRect;let v=0,q=0;h.value=(U=n.value)==null?void 0:U.offsetHeight;const{top:M,left:P,height:L,width:E}=k,{offset:O,position:Q}=l;Q==="top"||Q==="bottom"?(v=P+E/2-l.width/2+O.x,q=Q==="bottom"?M+document.documentElement.scrollTop+L+15+O.y:M+document.documentElement.scrollTop-(h.value+L)+O.y):(q=M+document.documentElement.scrollTop-h.value/2+O.y+L/2,v=Q==="right"?P+(E+15)+O.x:P-(l.width+15)+O.x),T.value.left=Math.trunc(v)+"px",T.value.top=Math.trunc(q)+"px",b(k),B.disconnect()},{threshold:1});B.observe(o.value)};e.onMounted(()=>{e.nextTick(()=>y()),window.addEventListener("resize",y)}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",y)}),e.watch(a,()=>{a.value&&y()});const m=e.ref(),b=B=>{if(!l.useHoverBuffer||!a.value)return;const x=Math.trunc(B.width),k=Math.trunc(B.height),v=Math.trunc(h.value);l.position==="left"||l.position==="right"?m.value={height:v+"px",width:Math.trunc(x*.5+8)+"px",top:v*-.5+k/2+(l.offset.y||0),left:(l.position==="right"?x:-x)+(l.offset.x||0)}:m.value={height:k+"px",width:l.width+"px",top:(l.position==="bottom"?k-8:-k)+(l.offset.y||0),left:l.width*-.5+x/2+(l.offset.x||0)},m.value.top=m.value.top+B.top+"px",m.value.left=m.value.left+B.left+"px"};return(B,x)=>(e.openBlock(),e.createElementBlock("div",Zo,[e.createElementVNode("div",_o,[e.createElementVNode("div",{class:e.normalizeClass(["tooltip-container",{scrollable:t.scrollableY,"content--hidden":!g.value,disabled:t.disabled}])},[e.createElementVNode("div",{ref_key:"triggerEl",ref:o,onMouseenter:x[0]||(x[0]=k=>a.value=!t.disabled),onMouseleave:x[1]||(x[1]=k=>f(!1)),onClick:x[2]||(x[2]=e.withModifiers(k=>d.value=!t.disabled&&!t.preventClickOverride,["stop"])),class:"tooltip-trigger"},[e.renderSlot(B.$slots,"trigger",{},()=>[t.useHoverIcon?(e.openBlock(),e.createBlock(W,{key:0,icon:c.value.icon,color:c.value.color,size:t.size,style:e.normalizeStyle(c.value.style),class:e.normalizeClass([{"icon--help":t.helpMode},"tooltip-icon"])},null,8,["icon","color","size","style","class"])):e.createCommentVNode("",!0)],!0),a.value&&t.useHoverBuffer?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(m.value),class:"hover-buffer"},null,4)):e.createCommentVNode("",!0)],544),(e.openBlock(),e.createBlock(e.Teleport,{to:"#app"},[e.withDirectives(e.createElementVNode("div",{ref_key:"dropdownEl",ref:n,onMouseenter:x[4]||(x[4]=k=>a.value=t.useHoverBuffer||d.value),onMouseleave:x[5]||(x[5]=k=>f(!d.value)),style:e.normalizeStyle(s.value),class:e.normalizeClass([[t.position,{solid:t.solid,"offset-triangle":t.offsetTriangle}],"tooltip-content"])},[e.renderSlot(B.$slots,"default",{},()=>[e.createElementVNode("span",{innerHTML:t.content},null,8,el)],!0),d.value?(e.openBlock(),e.createBlock(W,{key:0,onClick:x[3]||(x[3]=e.withModifiers(k=>f(!0),["stop"])),icon:"emojione-monotone:heavy-multiplication-x",size:"8px",class:"tooltip-close__icon"})):e.createCommentVNode("",!0)],38),[[e.vShow,g.value]])]))],2)]),g.value?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:x[6]||(x[6]=e.withModifiers(k=>f(!0),["stop"])),class:"backdrop-overlay"})):e.createCommentVNode("",!0)]))}},[["__scopeId","data-v-8352fd20"]]);function tl(t,i){const l=e.ref(),o=e.ref(),n=e.ref(!1),r=e.computed(()=>["phone","tel"].includes(i));if(!r.value)return{formattedNumber:null,cleanedNumber:null,isValidPhone:null,isValidPhoneAndFormat:null,enforceValidChars:null,isPhoneInput:r};e.watch(t,()=>{r.value&&(l.value=t.value)},{immediate:!0}),e.watch(l,()=>{var g;if(o.value=(g=l.value)==null?void 0:g.replace(/\D/g,""),l.value)if(n.value)n.value=!1;else{const T=o.value.match(/^(1|)?(\d{1,3})?(\d{1,3})?(\d{1,4})?$/);T&&(l.value=["1 (",T[2],") ",T[3],"-",T[4]].join(""))}},{immediate:!0});const s=g=>g.match(/^(1)(\d{3})(\d{3})(\d{4})$/)!=null,c=g=>g.match(/^(1) (\(\d{3}\)) (\d{3})\-(\d{4})$/)!=null,a=e.computed(()=>s(o.value)),d=e.computed(()=>c(o.value)),f=g=>{const T=Number.isInteger(Number.parseInt(g)),h=g==" ",y=g=="("||g==")",m=g=="-";return T&&!h&&!y&&!m};return{formattedNumber:l,cleanedNumber:o,isValidPhone:a,isValidPhoneAndFormat:d,enforceValidChars:g=>{var h,y;const T=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Shift","Delete","Tab"].includes(g.key);if(isNaN(Number(g.key))&&!T||g.key===null||g.key===" "||g.which===229)return g.preventDefault(),g.stopPropagation(),!1;if(T){((y=(h=g==null?void 0:g.target)==null?void 0:h.value)==null?void 0:y.length)>0&&(n.value=!0);return}f(g.key)||g.preventDefault()},isPhoneInput:r}}const ol={key:0},Ie={__name:"InputEditMode",props:{useEditMode:{type:Boolean,required:!0,tsType:"boolean",description:"Shows slot based on edit mode."},value:{type:null,required:!0,tsType:"any",description:"Input value."},label:{type:String,required:!0,tsType:"string",description:"Label to be shown in edit mode."},showLabelOnEditMode:{type:Boolean,required:!0,tsType:"boolean",description:"Shows a label when in edit mode."}},setup(t){const i=t,l=e.computed(()=>typeof i.value=="boolean"?i.value?"Enabled":"Disabled":i.value);return(o,n)=>t.useEditMode?e.renderSlot(o.$slots,"default",{key:0}):e.renderSlot(o.$slots,"view-mode",{key:1},()=>[t.showLabelOnEditMode?(e.openBlock(),e.createElementBlock("span",ol,e.toDisplayString(t.label)+": ",1)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(l.value),1)])}},ll={class:"qst-img__wrapper"},nl=["src","alt"],il=["src","width","alt"],he=F({__name:"QstImg",props:{src:{type:String,required:!0,tsType:"string",description:"The source of image that will be displayed."},alt:{type:String,required:!1,default:null,tsType:"string",description:"Alt text for the image."},width:{type:String,required:!1,default:"100px",tsType:"string",description:"The width of the image set in px."},height:{type:String,required:!1,default:"auto",tsType:"string",description:"The height of the image set in px."},lazyLoad:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Utilizes Intersection Observer to lazy load images, only when the image is in the viewport."},hoverImage:{type:String,required:!1,default:null,tsType:"string",description:"The source of the image that will be showed when hovering over the image src."},circle:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Shows the image in a circle."},useZoom:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"When the user clicks the image, a modal will open with a zoomed image."},zoomWidth:{type:Number,required:!1,default:null,tsType:"number",description:"The width of the zoomed image."}},setup(t){const i=t,l=e.computed(()=>({width:i.width,height:i.height,borderRadius:i.circle?"50%":""})),o=e.ref(!1),n=u=>{o.value=!!i.hoverImage&&u},r=e.computed(()=>{const g=d.value?i.src:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";return o.value?i.hoverImage:g}),s=e.ref(),c=e.ref(!1);e.watch(c,()=>{document.body.style.overflow=c.value?"hidden":"auto"});const a=e.ref(),d=e.ref(!0),f=new IntersectionObserver(u=>{d.value=u[0].isIntersecting},{threshold:1});return e.onMounted(()=>{i.lazyLoad&&a.value&&f.observe(a.value)}),e.watch(d,()=>{d.value&&f.disconnect()}),(u,g)=>(e.openBlock(),e.createElementBlock("div",ll,[e.createElementVNode("picture",e.mergeProps(u.$attrs,{ref_key:"pictureEl",ref:a,onMouseenter:g[0]||(g[0]=T=>n(!0)),onMouseleave:g[1]||(g[1]=T=>n(!1)),onClick:g[2]||(g[2]=T=>c.value=t.useZoom),class:{"cursor-pointer":t.useZoom}}),[e.createElementVNode("img",{src:r.value,alt:t.alt,style:e.normalizeStyle(l.value)},null,12,nl)],16),t.useZoom?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[e.withDirectives(e.createElementVNode("div",{onClick:g[3]||(g[3]=T=>c.value=!1),class:"backdrop-overlay overlay-bg"},[e.createElementVNode("img",{ref_key:"zoomImageEl",ref:s,src:r.value,width:t.zoomWidth,alt:t.alt,class:"zoom-image"},null,8,il)],512),[[e.vShow,c.value]])])):e.createCommentVNode("",!0)]))}},[["__scopeId","data-v-6f9eda84"]]),rl=["type","min","max"],sl=F({__name:"QstDatepicker",props:{modelValue:{type:[String,Object],required:!1,default:null,tsType:"string",description:"Used for datepicker v-model, do not pass anything in. Any format can be passed in, the emitted value will be a Date object."},type:{type:String,required:!1,default:"datepicker",tsType:"string",description:"The type of datepicker: datepicker, datetimepicker, or timepicker."},minDate:{type:[String,Object],required:!1,default:"",tsType:"string | Date object",description:"The minimum date that can be selected, all prior dates will be disabled for datepicker."},maxDate:{type:[String,Object],required:!1,default:"",tsType:"string | Date object",description:"The maximum date that can be selected, all dates after will be disabled for datepicker."},defaultTime:{type:String,required:!1,default:"",tsType:"string",description:"Default time value when using datetimepicker or timepicker (HH:mm, use 24 hour format)."}},emits:["update:modelValue"],setup(t,{emit:i}){const l=t,o=i,n=e.ref(),r=e.computed(()=>{switch(l.type){case"datepicker":return"date";case"datetimepicker":return"datetime-local";case"timepicker":return"time"}}),s=(f=null)=>{const u=f||l.defaultTime||`${new Date().getHours()}:${new Date().getMinutes()}`,[g,T]=u.split(":");return String(g).padStart(2,"0")+":"+String(T).padStart(2,"0")},c=f=>{if(!f||f.toString()==="Invalid Date")return;const u={year:"numeric",month:"2-digit",day:"2-digit"},h=new Intl.DateTimeFormat("en-US",{...u,timeZone:"America/New_York"}).formatToParts(f).reduce((y,m)=>(y[m.type]||(y[m.type]=m.value),y),{year:null,month:null,day:null});return`${h.year}-${h.month}-${h.day}`},a=f=>{if(!f)return;if(l.type==="timepicker")return s(f);const u=new Date(f);if(l.type==="datepicker")return c(u);if(l.type==="datetimepicker")return`${c(u)}T${s(`${u.getHours()}:${u.getMinutes()}`)}`},d=()=>{if(!l.modelValue)if(l.type==="timepicker")n.value=s();else{const f=a(new Date);if(l.minDate&&f<a(l.minDate))n.value=a(l.minDate);else if(l.maxDate&&f>a(l.maxDate)){const u=new Date(l.maxDate);n.value=a(u==null?void 0:u.setDate(u.getDate()-1))}else n.value=f}};return e.watch(n,()=>{const f=l.type==="datepicker"?`${n.value}T00:00:00`:n.value;o("update:modelValue",l.type==="timepicker"?f:new Date(f))}),e.watch(()=>l.modelValue,()=>{n.value!==l.modelValue&&(n.value=a(l.modelValue))},{immediate:!0}),(f,u)=>e.withDirectives((e.openBlock(),e.createElementBlock("input",{"onUpdate:modelValue":u[0]||(u[0]=g=>n.value=g),onFocus:d,type:r.value,min:a(t.minDate),max:a(t.maxDate),class:e.normalizeClass([{"datepicker--val":!!n.value},"qst-input"])},null,42,rl)),[[e.vModelDynamic,n.value]])}},[["__scopeId","data-v-23586e76"]]),It=t=>{const i=/(<([^>]+)>)| /gi;return t.replace(i,"")},re=t=>JSON.parse(JSON.stringify(t)),me=()=>crypto.randomUUID(),At=(t,i)=>Array.isArray(t)?t.length-i.length:typeof t=="number"?t-i:typeof t=="string"?t.localeCompare(i):t-i,Ye=t=>{const i=t.toString(16);return i.length==1?"0"+i:i},al=(t,i,l,o="00")=>{let n="#"+Ye(t)+Ye(i)+Ye(l);return o!=="00"&&(n+=o),n},dl=(t,i,l="00")=>{if(!t)return;t[0]=="#"&&(t=t.slice(1));const o=parseInt(t,16);let n=(o>>16)+i;n=n>255?255:n<0?0:n;let r=(o>>8&255)+i;r=r>255?255:r<0?0:r;let s=(o&255)+i;return s=s>255?255:s<0?0:s,al(n,r,s,l)},cl=["id"],ul=["id"],fl=["id","min","max","step"],pl=["id","type","step"],hl={class:"input-icon__container"},ml={class:"qst-input--count"},gl=["innerHTML"],yl=["innerHTML"],ne=F({__name:"QstInput",props:{modelValue:{type:[String,Number,Object],default:"",tsType:"string | number | Date",description:"Used for v-model, will be set to the input value."},type:{type:String,required:!1,default:"text",tsType:"text | password | email | number | phone | tel | textarea | datepicker | datetimepicker | timepicker | decimal | number-string | money",description:'Sets the input type that is going to be used. *(type="number" will be a number data type. to use number characters with a string data type (ex/ to start a number with 0) use type="number-string")*'},width:{type:String,required:!1,default:null,tsType:"string",description:"The width of the input."},size:{type:String,required:!1,default:"14px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},color:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The accent color, used for details within the component."},placeholder:{type:[String,Number],required:!1,default:"",tsType:"string | number",description:"Placeholder for the input. The placeholder text will be shown as a label, in order to show an animation when focusing the input."},labelPosition:{type:String,required:!1,default:"mid",tsType:"mid | outside",description:"The position of the label relative to the input when it has a value."},icon:{type:String,required:!1,default:"",tsType:"string",description:'Any Iconify value, the icon will be shown on the right side of the input. Input types such as "phone", "email", and "password" will show an icon by default.'},useClearIcon:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Adds X icon to the right of the input, clicking it clears the v-model value. Overrides any other previously set icons."},disabled:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Disables the input."},disabledReason:{type:String,required:!1,default:"",tsType:"string",description:"When the input is disabled, the disabledReason will show in a tooltip when hovering over the input."},disabledTooltipPosition:{type:String,required:!1,default:"right",tsType:"string",description:"Tooltip dropdown position when the disabled reason is visible."},tooltip:{type:[String,Object],required:!1,default:null,tsType:"string | {content: string, isHelpMode?: boolean, offset?: object, width?: number}",description:"A tooltip icon will show on the inner right side of the input, the tooltip dropdown will default to match input dimensions. *(if width and offset are not set)* Set to a string or object, based on if tooltip props are needed. *(ex/ offset, width, position, etc)*"},useEditMode:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Whether the input should be editable or not."},showLabelOnEditMode:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"If the label will be displayed when the input is in edit mode."},error:{type:String,required:!1,default:null,tsType:"string",description:"Shows an error message, displayed on the top right of the input border by default."},useErrorIcon:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"An error icon will be displayed on the right of the input, hovering over will show a tooltip with the error message."},showErrorInline:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"The error message will show inside the input."},showErrorBelow:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"The error message will show on the bottom right border of the input."},blockedChars:{type:Array,required:!1,default:()=>[],tsType:"string[]",description:"Characters that will users will be prevented from entering into the input."},maxChars:{type:Number,required:!1,default:-1,tsType:"number",description:"The maximum number of characters that the input can have."},showMaxChars:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Shows a counter on the right side of the input for the maxChars."},minNum:{type:Number,required:!1,default:-1/0,tsType:"number",description:"The minimum number that can be entered, when using a number or decimal input type."},maxNum:{type:Number,required:!1,default:1/0,tsType:"number",description:"The maximum number that can be entered, when using a number or decimal input type."},maxDecimals:{type:Number,required:!1,default:-1,tsType:"number",description:"The maximum amount of decimal places, when using a decimal input type."},step:{type:Number,required:!1,default:1,tsType:"number",description:"The amount the value will be incremented/decremented, when using a number or decimal input type."},hideArrowButtons:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Hides the default arrow buttons used to increment/decrement value, when using a number or decimal input type."},minDate:{type:[String,Object],required:!1,default:"",tsType:"string | date object",description:"The minimum date that can be selected when using a datepicker input type. All prior dates will be disabled. *(format: MM/DD/YYYY)*"},maxDate:{type:[String,Object],required:!1,default:"",tsType:"string | date object",description:"The maximum date that can be selected when using a datepicker input type. All future dates will be disabled. *(format: MM/DD/YYYY)*"},useDatepickerRange:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"When using the datepicker, select a range of dates instead of a single date."},defaultTime:{type:String,required:!1,default:"",tsType:"string",description:"Default time when using datetimepicker or timepicker. *(format: HH:mm)*"},image:{type:String,required:!1,default:"",tsType:"string",description:"Image to be displayed in the input from the selected option. (Select/Autocomplete only)"},hideImage:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Hides the Select/Autocomplete image. *(ex/ when user is searching in a Select/Autocomplete)*"},useSlackDropdown:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"When user types @ symbol, a dropdown for all slack users will appear."},darkMode:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Changes the styles to a dark theme."}},emits:["update:modelValue","blur","on-enter","on-input-clear","on-icon-click"],setup(t,{expose:i,emit:l}){e.useCssVars(S=>({"5dba2c88":t.color,"8d4db08c":o.size}));const o=t,n=l,r=e.ref(),s=e.ref(me()),c=e.computed(()=>!!o.image&&!o.hideImage),a=e.computed(()=>o.useErrorIcon&&!!o.error),d=e.computed(()=>!o.hideArrowButtons&&["number","decimal"].includes(o.type)),f=e.computed(()=>{var S;return{"width--override":!!o.width,"mobile-transform--disable":parseInt(o.size)>16,"input--datepicker":U.value,"input--textarea":o.type==="textarea","input--filled":B.value,disabled:o.disabled,"edit-mode--disabled":!o.useEditMode,"error--visible":!!o.error,"image--visible":c.value,"icon--visible":x.value&&!!L.value&&!o.useClearIcon,"arrows--visible":d.value,"arrows--hidden":o.hideArrowButtons||a.value,"input--slack":o.useSlackDropdown,[`label--${o.labelPosition}`]:!!o.labelPosition,[`max-chars-${o.maxChars.toString().length}`]:o.showMaxChars&&o.maxChars>0&&((S=o.maxChars)==null?void 0:S.toString().length)>1,dark:o.darkMode}}),u=e.ref(),g=(S,A=!1)=>{var G;const z=((G=S==null?void 0:S.toString())==null?void 0:G.length)||0;return o.maxChars>-1&&(A?z>=o.maxChars:z>o.maxChars)},T=S=>{!["Backspace","Tab","Enter","ArrowLeft","ArrowRight","Shift"].includes(S.key)&&!(["c","v"].includes(S.key)&&S.ctrlKey)&&(g(b.value,!0)&&S.preventDefault(),o.type==="decimal"&&V(b.value)&&S.preventDefault(),["decimal","number"].includes(o.type)&&isNaN(+S.key)&&![".","-"].includes(S.key)&&S.preventDefault(),["number-string","money"].includes(o.type)&&isNaN(+S.key)&&S.preventDefault()),o.blockedChars.includes(S.key)&&S.preventDefault(),o.type!=="textarea"&&S.key==="Enter"&&n("on-enter")},h=(S=!1)=>{var A;(A=m.value)==null||A.focus({preventScroll:S})},y=()=>{m.value&&(m.value.disabled=o.disabled)};e.watch(()=>o.disabled,()=>{y()}),e.watch(()=>o.useEditMode,()=>{o.useEditMode&&o.disabled&&e.nextTick(()=>y())}),e.onMounted(()=>{y(),b.value!==o.modelValue&&(b.value=o.modelValue)}),i({focusInput:h,id:s});const m=e.ref(),b=e.ref(),B=e.computed(()=>{var S;return!!b.value||b.value===0||((S=m.value)==null?void 0:S.matches(":-webkit-autofill"))});e.watch(()=>o.modelValue,()=>{b.value!==o.modelValue&&(b.value=o.modelValue)},{immediate:!0}),e.watch(b,(S,A)=>{if(u.value&&(!b.value||b.value.length!==o.maxChars)&&(u.value=""),B.value){if(["decimal","number"].includes(o.type)&&(b.value<o.minNum||b.value>o.maxNum)&&(b.value=A),o.type==="decimal"&&V(b.value)){const z=b.value.toString().match(/^-?\d+(?:\.\d{0,2})?/)[0];b.value=parseFloat(z)}if(o.type==="money"){let z=b.value.toString().split("").filter(le=>!isNaN(+le));z.length<3&&(z=z.length===2?["0",...z]:["0","0",...z]),z.splice([z.length-2],0,".");const G=z.slice(0,z.indexOf("."));G.length>1&&G[0]==="0"&&z.shift(),b.value=`$${z.join("")}`}o.type==="number-string"&&b.value.split("").some(z=>isNaN(parseInt(z)))&&(b.value=""),g(b.value)&&(b.value=b.value.slice(0,o.maxChars),u.value=`<b>Max Characters: ${o.maxChars}</b>`)}b.value===S&&n("update:modelValue",S)});const x=e.computed(()=>!!q.value&&(!o.showErrorInline||!o.error)),k=e.ref(!1),v=()=>{if(!o.disabled){if(o.useClearIcon)J.value?H.value="":(b.value="",n("on-input-clear"));else if(o.type==="password"){k.value=!k.value;return}else n("on-icon-click");h()}},q=e.computed(()=>{if(o.useClearIcon)return"ic:round-clear";if(o.icon)return o.icon;switch(o.type){case"password":return k.value?"bi:eye-slash":"bi:eye";case"email":return"fontisto:email";case"phone":case"tel":return"clarity:phone-handset-solid";case"datepicker":case"datetimepicker":case"timepicker":return"meteor-icons:calendar"}});e.watch(k,()=>{m.value.type=k.value?"text":"password",e.nextTick(()=>h())});const M=e.useSlots(),P=e.ref(),L=e.computed(()=>{if(!o.tooltip)return;const{tooltip:S}=o,A=!!M["input-icon"],z=(S==null?void 0:S.width)||P.value,G=(d.value||A?-1.25:-.4)*parseInt(o.size);return{...typeof S=="string"?{content:S}:{...S,helpMode:S.isHelpMode},width:z,offset:(S==null?void 0:S.offset)||{x:-(G+z/2-8),y:0}}}),E=e.ref(),O=e.computed(()=>{var S;return((S=E.value)==null?void 0:S.isShowing)===!0}),Q=e.ref(!1);e.watch(O,()=>{var S;O.value&&!Q.value&&(P.value=parseInt((S=getComputedStyle(r.value))==null?void 0:S.width),Q.value=!0)});const U=e.computed(()=>["datepicker","datetimepicker","timepicker"].includes(o.type)),{isPhoneInput:J,formattedNumber:H,enforceValidChars:K}=tl(b,o.type);H!==null&&e.watch(H,()=>b.value=H.value);const V=S=>{var z;return o.maxDecimals<0||Math.floor(S)===S?!1:(((z=S==null?void 0:S.toString().split(".")[1])==null?void 0:z.length)||0)>=o.maxDecimals},C=S=>{!o.hideArrowButtons&&S.target.value&&parseInt(S.target.value)!==b.value&&(b.value=S.target.value)},$=e.ref(),j=e.ref(!1),ee=e.computed(()=>{if(!o.useSlackDropdown)return;const S=document.activeElement;return!!S&&["INPUT","TEXTAREA"].includes(S.tagName)&&s.value===(activeElement==null?void 0:activeElement.id)});return e.watch(ee,()=>{var S;j.value=!!((S=$.value)!=null&&S.slackInputValue)&&!ee.value&&!j.value}),(S,A)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"inputWrapperEl",ref:r,style:e.normalizeStyle({width:t.width,fontSize:t.size}),class:e.normalizeClass([f.value,"qst-input__wrapper"])},[t.disabled&&t.disabledReason?(e.openBlock(),e.createBlock(te,{key:0,content:t.disabledReason,position:t.disabledTooltipPosition,class:"input-tooltip--disabled"},{trigger:e.withCtx(()=>A[13]||(A[13]=[e.createElementVNode("div",null,null,-1)])),_:1},8,["content","position"])):e.createCommentVNode("",!0),e.createVNode(Ie,{"use-edit-mode":t.useEditMode,value:t.modelValue,label:t.placeholder,"show-label-on-edit-mode":t.showLabelOnEditMode},{"view-mode":e.withCtx(()=>[e.renderSlot(S.$slots,"view-mode",{},void 0,!0)]),default:e.withCtx(()=>[c.value?(e.openBlock(),e.createBlock(he,{key:0,src:t.image,width:"1.5em",height:"1.5em",circle:"",class:"input-image"},null,8,["src"])):e.createCommentVNode("",!0),e.createElementVNode("label",{onClick:A[0]||(A[0]=z=>h()),class:"label"},e.toDisplayString(t.placeholder),1),t.type==="textarea"?e.withDirectives((e.openBlock(),e.createElementBlock("textarea",e.mergeProps({key:1,ref_key:"input",ref:m,id:s.value,"onUpdate:modelValue":A[1]||(A[1]=z=>b.value=z)},S.$attrs,{placeholder:"",onClick:A[2]||(A[2]=z=>h()),onKeydown:T,class:"qst-input"}),null,16,cl)),[[e.vModelText,b.value,void 0,{trim:!0}]]):e.unref(J)?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:2,ref_key:"input",ref:m,id:s.value,"onUpdate:modelValue":A[3]||(A[3]=z=>e.isRef(H)?H.value=z:null),type:"tel",maxlength:"16",onKeydown:A[4]||(A[4]=(...z)=>e.unref(K)&&e.unref(K)(...z)),onBlur:A[5]||(A[5]=z=>n("blur",b.value)),class:"qst-input"},null,40,ul)),[[e.vModelText,e.unref(H)]]):U.value?(e.openBlock(),e.createBlock(sl,e.mergeProps({key:3,modelValue:b.value,"onUpdate:modelValue":A[6]||(A[6]=z=>b.value=z)},S.$attrs,{id:s.value,disabled:t.disabled,type:t.type,"min-date":t.minDate,"max-date":t.maxDate,"use-range":t.useDatepickerRange,"default-time":t.defaultTime,placeholder:""}),null,16,["modelValue","id","disabled","type","min-date","max-date","use-range","default-time"])):t.type==="number"||t.type==="decimal"?e.withDirectives((e.openBlock(),e.createElementBlock("input",e.mergeProps({key:4,ref_key:"input",ref:m,id:s.value,"onUpdate:modelValue":A[7]||(A[7]=z=>b.value=z)},S.$attrs,{placeholder:"",type:"number",min:t.minNum,max:t.maxNum,step:t.type==="decimal"?".01":t.step,onClick:A[8]||(A[8]=z=>h()),onBlur:A[9]||(A[9]=z=>n("blur",b.value)),onChange:C,onKeydown:T,class:"qst-input"}),null,16,fl)),[[e.vModelText,b.value,void 0,{number:!0}]]):e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:5,ref_key:"input",ref:m,id:s.value,"onUpdate:modelValue":A[10]||(A[10]=z=>b.value=z),placeholder:"",type:t.type,step:t.step,autocomplete:"off",onClick:A[11]||(A[11]=z=>h()),onBlur:A[12]||(A[12]=z=>n("blur",b.value)),onKeydown:T,class:"qst-input"},null,40,pl)),[[e.vModelDynamic,b.value,void 0,{trim:!0}]]),e.createElementVNode("div",hl,[a.value?(e.openBlock(),e.createBlock(te,{key:0,solid:"",class:"error-icon__tooltip"},{trigger:e.withCtx(()=>[e.createVNode(W,{icon:"bi:exclamation-circle-fill",color:"#CA0F11",size:t.size},null,8,["size"])]),default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(t.error),1)]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[x.value?(e.openBlock(),e.createBlock(W,{key:0,icon:q.value,size:t.size,onClick:e.withModifiers(v,["stop"]),color:"#949494",class:"icon"},null,8,["icon","size"])):e.createCommentVNode("",!0),t.showMaxChars&&t.maxChars>-1?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle({fontSize:t.size}),class:"max-chars__container"},[e.createElementVNode("span",ml,e.toDisplayString(b.value.toString().length)+" / "+e.toDisplayString(t.maxChars),1)],4)):e.createCommentVNode("",!0),L.value&&!t.useClearIcon?(e.openBlock(),e.createBlock(te,e.mergeProps({key:2,ref_key:"infoTooltipEl",ref:E},L.value,{size:t.size,class:"info-tooltip"}),null,16,["size"])):e.createCommentVNode("",!0),e.renderSlot(S.$slots,"input-icon",{},void 0,!0)],64))])]),_:3},8,["use-edit-mode","value","label","show-label-on-edit-mode"]),t.error&&!t.useErrorIcon?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass([{"input-error--bottom":t.showErrorBelow,"input-error--inline":t.showErrorInline},"input-error"])},[e.createElementVNode("span",null,[A[14]||(A[14]=e.createTextVNode(" *")),e.renderSlot(S.$slots,"error",{},()=>[e.createElementVNode("span",{innerHTML:t.error},null,8,gl)],!0),A[15]||(A[15]=e.createTextVNode("*"))])],2)):u.value?(e.openBlock(),e.createElementBlock("span",{key:2,innerHTML:u.value,class:"input-error input-error--bottom"},null,8,yl)):e.createCommentVNode("",!0)],6))}},[["__scopeId","data-v-986b71ee"]]),bl=["disabled"],wl=["disabled"],ge=F({__name:"QstButton",props:{color:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The background color of the button."},fontColor:{type:String,required:!1,default:"#fff",tsType:"string",description:"The color of the button text or icon."},size:{type:String,required:!1,default:"",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},icon:{type:String,required:!1,default:null,tsType:"string",description:"Iconify value for the icon."},useIconBtn:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Creates a button element to appear as only an icon."},circle:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Creates a circular button. *(primarily used with icons)*"},tooltip:{type:[String,Object],required:!1,default:null,tsType:"string | {content: string, isHelpMode?: boolean, offset?: object, width?: number}",description:"Shows a tooltip dropdown when hovering over the button. Set to a string or object, based on if tooltip props are needed. *(ex/ offset, width, position, etc)*"},disabled:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Disables the button, shows grayed out and unclickable."}},setup(t){e.useCssVars(n=>({"04f7a376":t.fontColor}));const i=t,l=e.computed(()=>({circle:i.circle,"side-icon":!i.circle&&!!i.icon&&!i.useIconBtn,"btn--clear":!i.color||i.color==="transparent"||i.useIconBtn})),o=e.computed(()=>{if(!i.tooltip)return;const{tooltip:n}=i;return typeof n=="string"?{content:n}:{...n,helpMode:n.isHelpMode}});return(n,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({fontSize:t.size,"--btn-color":t.color}),class:e.normalizeClass([l.value,"qst-btn__wrapper"])},[o.value?(e.openBlock(),e.createBlock(te,e.mergeProps({key:0},o.value,{"use-hover-icon":!1,"prevent-click-override":""}),{trigger:e.withCtx(()=>[e.createElementVNode("button",e.mergeProps(n.$attrs,{disabled:t.disabled,class:"qst-btn"}),[t.icon?(e.openBlock(),e.createBlock(W,{key:0,icon:t.icon,color:t.fontColor,size:t.size,class:"qst-btn__icon"},null,8,["icon","color","size"])):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"default",{},void 0,!0)],16,bl)]),default:e.withCtx(()=>[e.renderSlot(n.$slots,"tooltip-content",{},()=>[e.createTextVNode(e.toDisplayString(o.value.content),1)],!0)]),_:3},16)):(e.openBlock(),e.createElementBlock("button",{key:1,disabled:t.disabled,class:"qst-btn"},[t.icon?(e.openBlock(),e.createBlock(W,{key:0,icon:t.icon,color:t.fontColor,size:t.size,class:"qst-btn__icon"},null,8,["icon","color","size"])):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"default",{},void 0,!0)],8,wl))],6))}},[["__scopeId","data-v-a92fa59a"]]),kl={class:"loader-container"},Sl=["src"],Tl=["innerHTML"],Ae=F({__name:"QstLoader",props:{loaderSrc:{type:String,required:!1,default:null,tsType:"string",description:"The image/gif that will be used for the loader."},color:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The color when using the default loader icon."},subtext:{type:String,required:!1,default:null,tsType:"string",description:"Optional text to show below the loader."},size:{type:String,required:!1,default:"14px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},center:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Aligns the loader to be centered relative to its parent container."},absolute:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Creates a loader with a backdrop using position absolute to fill the nearest parent container with position relative."},fullPage:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Creates a full page fixed loader with backdrop."},useBackdrop:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Shows a backdrop for full page and absolute loaders."},useClearBackdrop:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"When showing a backdrop, uses a transparent backdrop instead of a colored one."}},setup(t){const i=t,l=e.computed(()=>({center:i.center,absolute:i.absolute,"full-page":i.fullPage,"backdrop--visible":i.useBackdrop,"subtext--visible":!!i.subtext,"clear-backdrop":i.useClearBackdrop}));return(o,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({fontSize:t.size}),class:e.normalizeClass([l.value,"loader-wrapper"])},[e.createElementVNode("div",kl,[t.loaderSrc?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.loaderSrc,class:"loader-img"},null,8,Sl)):(e.openBlock(),e.createBlock(W,{key:1,icon:"eos-icons:three-dots-loading",size:t.size,color:t.color,class:"loader-icon"},null,8,["size","color"])),t.subtext?(e.openBlock(),e.createElementBlock("p",{key:2,innerHTML:t.subtext,class:"loader-subtext"},null,8,Tl)):e.createCommentVNode("",!0)])],6))}},[["__scopeId","data-v-fe18eb42"]]),Vl={key:0,class:"qst-modal__inner"},xl={class:"qst-modal__header"},Bl={key:1,class:"qst-modal__content"},vl={class:"qst-modal__action"},Cl={key:0},zt=F({__name:"QstModal",props:{modelValue:{type:Boolean,required:!0,tsType:"boolean",description:"Used for v-model, will be set to whether the modal is showing."},width:{type:String,required:!1,default:"550px",tsType:"string",description:"The width of the modal, set in px."},height:{type:String,required:!1,default:"650px",tsType:"string",description:"The height of the modal, set in px."},size:{type:String,required:!1,default:"14px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},color:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The accent color, used for details within the component."},useLoader:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"When true, shows a loader in the modal."},hideTitle:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Hides the modal title."},hideFooter:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Hides the modal footer row."},showSubmitBtn:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Shows submit button in the modal footer."},showCancelBtn:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Shows cancel button in the modal footer."},submitBtnText:{type:String,required:!1,default:"Submit",tsType:"string",description:"The text to be shown on the submit/save/confirmation button."},cancelBtnText:{type:String,required:!1,default:"Cancel",tsType:"string",description:"The text to be shown on the cancel button."},closeOnSubmit:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"The modal will be closed when the submit button is clicked."},hideScroll:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"If the modal has overflow, the scrollbar will be hidden."},darkMode:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Changes the styles to a dark theme."}},emits:["update:modelValue","on-confirm","on-cancel"],setup(t,{emit:i}){e.useCssVars(f=>({c026cc82:l.width,"43d7a44e":l.height}));const l=t,o=i,n=e.ref(),r=e.ref(!1),s=e.ref();e.watch(r,()=>{var f,u;r.value?(s.value=document.documentElement.scrollTop||0,(f=n.value)==null||f.show(),document.body.style.overflow="hidden"):((u=n.value)==null||u.close(),document.body.style.overflow="",s.value&&(document.documentElement.scrollTop=s.value)),r.value!==l.modelValue&&o("update:modelValue",r.value)}),e.watch(()=>l.modelValue,()=>{l.modelValue!==r.value&&(r.value=l.modelValue)});const c=()=>{l.closeOnSubmit&&(r.value=!1),o("on-confirm")},a=()=>{o("on-cancel"),r.value=!1},d=f=>{const u=n.value.getBoundingClientRect(),{top:g,left:T,height:h,width:y}=u,{clientX:m,clientY:b}=f;!(g<=b&&b<=g+h&&T<=m&&m<=T+y)&&a()};return(f,u)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"#app"},[e.createElementVNode("dialog",{ref_key:"modalEl",ref:n,onClick:d,style:e.normalizeStyle({fontSize:t.size}),class:e.normalizeClass([{"scroll--hidden":t.hideScroll,dark:t.darkMode},"qst-modal"])},[r.value?(e.openBlock(),e.createElementBlock("div",Vl,[e.createElementVNode("div",xl,[e.createElementVNode("div",null,[e.withDirectives(e.createElementVNode("span",null,[e.renderSlot(f.$slots,"title",{},void 0,!0)],512),[[e.vShow,!t.hideTitle]])]),e.createVNode(ge,{onClick:a,icon:"emojione-monotone:heavy-multiplication-x",size:t.size,"font-color":t.darkMode?"#fff":"#333","use-icon-btn":""},null,8,["size","font-color"])]),t.useLoader?(e.openBlock(),e.createBlock(Ae,{key:0})):(e.openBlock(),e.createElementBlock("div",Bl,[e.renderSlot(f.$slots,"default",{},void 0,!0)])),e.withDirectives(e.createElementVNode("div",vl,[e.createElementVNode("div",null,[e.renderSlot(f.$slots,"footer-left",{},void 0,!0)]),e.createElementVNode("div",null,[e.renderSlot(f.$slots,"footer",{},()=>[t.useLoader?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Cl,[t.showSubmitBtn?(e.openBlock(),e.createBlock(ge,{key:0,onClick:c,size:t.size,color:t.color},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.submitBtnText),1)]),_:1},8,["size","color"])):e.createCommentVNode("",!0),t.showCancelBtn?(e.openBlock(),e.createBlock(ge,{key:1,onClick:a,size:t.size,color:"#b8b8b8",class:"cancel-btn"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.cancelBtnText),1)]),_:1},8,["size"])):e.createCommentVNode("",!0)]))],!0)])],512),[[e.vShow,!t.hideFooter]])])):e.createCommentVNode("",!0)],6),r.value?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:u[0]||(u[0]=g=>r.value=!1),class:"backdrop-overlay overlay-bg"})):e.createCommentVNode("",!0)]))}},[["__scopeId","data-v-6c12b87f"]]),Nt=F({__name:"QstDropdown",props:{width:{type:String,required:!1,default:"500px",tsType:"string",description:"The width of the dropdown menu, set in px."},openOnHover:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"The dropdown will open when hovering over the trigger, instead of clicking it."},closeOnSelfClick:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Closes the dropdown menu when clicking inside of it."},closeOnOutsideClick:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Closes the dropdown menu when clicking outside of it."},position:{type:String,required:!1,default:"bottom",tsType:"string",description:"The position that the dropdown will open relative to the trigger."},offset:{type:Object,required:!1,default:()=>({x:0,y:0}),tsType:"{x: number, y: number}",description:"Moves the dropdown from its default position. *(+X moves right, -X moves left, +Y moves down, -Y moves up)*"},centerDropdown:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Centers the dropdown based on the trigger. Offset can be used to adjust it from the center position, the triangle will stay centered."},maxHeight:{type:String,required:!1,default:null,tsType:"string",description:"Max height for the dropdown, if exceeded the dropdown will start scrolling."},useTriangle:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Shows a triangle relative to the position of the trigger."},offsetTriangle:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"When the offset is set, the triangle will remain anchored to the trigger by default. If true, the triangle will move with the rest of the offset."}},setup(t,{expose:i}){e.useCssVars(T=>({"42b1a3d3":t.maxHeight}));const l=t,o=e.computed(()=>{var T,h;return{"--offsetPropX":l.offset.x+"px","--offsetPropY":l.offset.y+"px","--triggerHeight":Math.round(((T=c.value)==null?void 0:T.offsetHeight)/2-10)+"px","--triggerWidth":Math.round(((h=c.value)==null?void 0:h.offsetWidth)/2)-10+"px",width:l.width,top:d.value.top,left:d.value.left}}),n=e.computed(()=>({[l.position]:l.position,triangle:l.useTriangle,"offset-triangle":l.offsetTriangle,"center-triangle":l.centerDropdown})),r=e.ref(!1),s=(T,h=!1)=>{(!h||l.openOnHover)&&(r.value=T)},c=e.ref(),a=e.ref(),d=e.ref({}),f=()=>{if(!c.value||!r.value)return;const T=new IntersectionObserver(h=>{var E;const y=h[0].boundingClientRect;let m=0,b=0;const B=(E=a.value)==null?void 0:E.offsetHeight,{top:x,left:k,height:v,width:q}=y,{offset:M,position:P,width:L}=l;P==="top"||P==="bottom"?(m=k+M.x,l.centerDropdown&&(m+=Math.round(-(parseInt(L)/2)+q/2)),b=P==="bottom"?x+document.documentElement.scrollTop+v+15+M.y:x+document.documentElement.scrollTop-(B+v)+M.y):(b=x+document.documentElement.scrollTop-M.y+v/2,l.centerDropdown&&(b-=B/2),m=P==="right"?k+(q+15)+M.x:k-(parseInt(L)+15)+M.x),d.value.left=Math.trunc(m)+"px",d.value.top=Math.trunc(b)+"px",g(y,B),T.disconnect()},{threshold:1});T.observe(c.value)};e.onMounted(()=>{e.nextTick(()=>f()),window.addEventListener("resize",f)}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",f)}),e.watch(r,()=>{r.value&&f()});const u=e.ref(),g=(T,h)=>{if(!l.openOnHover||!r.value)return;const y=Math.trunc(T.width),m=Math.trunc(T.height),b=Math.trunc(h);l.position==="left"||l.position==="right"?u.value={height:b+"px",width:Math.trunc(y*.5+8)+"px",top:l.centerDropdown?b*-.5+m/2:0,left:y*(l.position==="right"?1:-1)}:u.value={height:m+"px",width:l.width,top:m*(l.position==="bottom"?1:-1),left:l.centerDropdown?parseInt(l.width)*-.5+y/2:0},u.value.top=u.value.top+T.top+l.offset.y+"px",u.value.left=u.value.left+T.left+l.offset.x+"px"};return i({isShowing:r}),(T,h)=>(e.openBlock(),e.createElementBlock("div",{onMouseenter:h[5]||(h[5]=y=>s(!0,!0)),onMouseleave:h[6]||(h[6]=y=>s(!1,!0)),onKeydown:h[7]||(h[7]=e.withKeys(y=>s(!1),["esc"])),class:"dropdown-wrapper"},[e.createElementVNode("div",null,[e.createElementVNode("div",{ref_key:"triggerEl",ref:c,onClick:h[0]||(h[0]=e.withModifiers(y=>s(!0),["stop"])),class:"dropdown-heading"},[e.renderSlot(T.$slots,"heading",{isShowing:r.value},()=>[h[8]||(h[8]=e.createTextVNode("Dropdown"))],!0),t.openOnHover&&r.value?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(u.value),class:"hover-buffer"},null,4)):e.createCommentVNode("",!0)],512),(e.openBlock(),e.createBlock(e.Teleport,{to:"#app"},[e.withDirectives(e.createElementVNode("div",{ref_key:"dropdownEl",ref:a,onMouseenter:h[1]||(h[1]=y=>s(!0,!0)),onMouseleave:h[2]||(h[2]=y=>s(!1,!0)),onClick:h[3]||(h[3]=y=>s(!t.closeOnSelfClick)),style:e.normalizeStyle(o.value),class:e.normalizeClass([n.value,"dropdown-content"])},[e.createElementVNode("div",{class:e.normalizeClass({"content--scroll":!!t.maxHeight})},[e.renderSlot(T.$slots,"content",{},()=>[h[9]||(h[9]=e.createTextVNode("Dropdown Content"))],!0)],2)],38),[[e.vShow,r.value]])]))]),r.value&&!t.openOnHover&&t.closeOnOutsideClick?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:h[4]||(h[4]=e.withModifiers(y=>s(!1),["stop"])),class:"backdrop-overlay"})):e.createCommentVNode("",!0)],32))}},[["__scopeId","data-v-dd5d2a37"]]),ql={class:"switch-input"},El=["checked","disabled"],Il={key:1,class:"label-text"},Mt=F({__name:"QstSwitch",props:{modelValue:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Used for v-model, will be set to whether the switch is active."},label:{type:String,required:!1,default:"",tsType:"string",description:"Label displayed to the right of the switch, clicking on the label will toggle the switch."},icon:{type:String,required:!1,default:"",tsType:"string",description:"Any Iconify value, the icon will be displayed to the right of the switch."},color:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The color of the switch when active."},size:{type:String,required:!1,default:"12px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},useEditMode:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Whether the input should be editable or not."},showLabelOnEditMode:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Shows the label when the input is in edit mode."},tooltip:{type:[String,Object],required:!1,default:null,tsType:"string | {content: string, isHelpMode?: boolean, offset?: object, width?: number}",description:"Shows a tooltip icon next to the switch. Set to a string or object, based on if tooltip props are needed. *(ex/ offset, width, position, etc)*"},disabled:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Disables the switch, shows grayed out and unclickable."}},emits:["update:modelValue","change"],setup(t,{emit:i}){const l=t,o=i,n=e.ref();e.watch(n,()=>{l.modelValue!==n.value&&(o("update:modelValue",n.value),o("change",n.value))}),e.watch(()=>l.modelValue,()=>{n.value!==l.modelValue&&(n.value=l.modelValue)},{immediate:!0});const r=()=>{l.disabled||(n.value=!n.value)},s=e.computed(()=>{if(!l.tooltip)return;const{tooltip:c}=l;return typeof c=="string"?{content:c}:{...c,helpMode:c.isHelpMode}});return(c,a)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({fontSize:t.size}),class:e.normalizeClass([{disabled:t.disabled,active:n.value},"qst-switch__wrapper"])},[e.createVNode(Ie,{"use-edit-mode":t.useEditMode,value:t.modelValue,label:t.label,"show-label-on-edit-mode":t.showLabelOnEditMode},{"view-mode":e.withCtx(()=>[e.renderSlot(c.$slots,"view-mode",{},void 0,!0)]),default:e.withCtx(()=>[e.createElementVNode("label",ql,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":a[0]||(a[0]=d=>n.value=d),type:"checkbox",checked:n.value,disabled:t.disabled},null,8,El),[[e.vModelCheckbox,n.value]]),e.createElementVNode("span",{style:e.normalizeStyle({backgroundColor:n.value?t.color:"gray"}),class:"switch-slider"},null,4)]),e.createElementVNode("div",{onClick:r,class:"switch-label"},[t.icon?(e.openBlock(),e.createBlock(W,{key:0,icon:t.icon,class:"label-icon"},null,8,["icon"])):e.createCommentVNode("",!0),t.label?(e.openBlock(),e.createElementBlock("span",Il,e.toDisplayString(t.label),1)):e.createCommentVNode("",!0),s.value?(e.openBlock(),e.createBlock(te,e.mergeProps({key:2},s.value,{size:t.size}),null,16,["size"])):e.createCommentVNode("",!0)])]),_:3},8,["use-edit-mode","value","label","show-label-on-edit-mode"])],6))}},[["__scopeId","data-v-e01bf080"]]),Al={key:0,class:"progress-bar__wrapper"},zl={key:2,class:"horizontal-slider__dots"},Nl={class:"slider-dots"},Ml=["onClick"],Ot=F({__name:"QstScrollContainer",props:{useArrows:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"If the container has overflow, shows arrows on the ends of the container."},useDots:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"If the container has overflow, shows dots per the number of slides."},useProgressBar:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"If the container has overflow, shows a progress bar that fills as the user scrolls towards the end of the container."},width:{type:String,required:!1,default:"",tsType:"string",description:"Width of the entire scroll container."},color:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The accent color, used for details within the component."},size:{type:String,required:!1,default:"20px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated. *(arrows, dots, icons)*"},hideScroll:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"The scrollbar will be hidden."},slideWidth:{type:String,required:!1,default:"",tsType:"string",description:"The width of each slide, defaults to fill entire slide."}},setup(t){e.useCssVars(E=>({"3629f130":i.slideWidth,"028596b0":i.color}));const i=t,l=e.ref(),o=e.ref(),n=e.useSlots(),r=e.computed(()=>{var E,O;return n.default?((O=(E=n.default()[0])==null?void 0:E.children)==null?void 0:O.length)??0:0});e.watch(r,()=>{e.nextTick(()=>q())});const s=e.computed(()=>({"arrows--visible":i.useArrows&&k.value,"progress--visible":i.useProgressBar&&k.value,"scroll--hidden":i.hideScroll,"slide-width":!!i.slideWidth})),c=e.computed(()=>{if(!(!i.useDots||!l.value))return Math.ceil(l.value.scrollWidth/l.value.clientWidth)}),a=E=>{v(l.value.clientWidth*(E-1))},d=E=>{const O=E==="left"?-l.value.offsetWidth:l.value.offsetWidth,Q=o.value.scrollLeft;v(O+Q)},f=e.ref(),u=()=>{if(!l.value)return;const E=l.value.scrollWidth-l.value.clientWidth,O=o.value.scrollLeft*100;f.value=Math.min(Math.round(O/E),100)+"%"},g=e.ref(!1),T=e.ref(0),h=E=>{g.value=!0,T.value=E.pageX-l.value.offsetLeft},y=()=>g.value=!1,m=E=>{var U;if(!g.value)return;const Q=(E.pageX-l.value.offsetLeft-T.value)*2;v(((U=o.value)==null?void 0:U.scrollLeft)-Q)},b=e.ref(1),B=e.ref(!0),x=e.ref(!0),k=e.computed(()=>!!l.value&&l.value.scrollWidth>l.value.clientWidth),v=E=>{var O;(O=o.value)==null||O.scrollTo({left:E,behavior:"smooth"})},q=()=>{if(!l.value)return;const E=Math.round(o.value.scrollLeft);(i.useArrows||i.useProgressBar)&&(B.value=E>0,x.value=E<l.value.scrollWidth-l.value.clientWidth-5,i.useProgressBar&&u()),i.useDots&&(b.value=Math.ceil(E/l.value.clientWidth)+1)},M=e.ref(!1),P=e.ref(!0),L=new IntersectionObserver(E=>{M.value=E[0].isIntersecting},{threshold:1});return e.watch(P,()=>{P.value||L.disconnect()}),e.watch(M,()=>{M.value&&!k.value&&q()}),e.onMounted(()=>{var E,O;(E=o.value)==null||E.addEventListener("scroll",q),q(),P.value=((O=l.value)==null?void 0:O.clientWidth)===0,P.value&&L.observe(l.value)}),e.onBeforeUnmount(()=>{var E;(E=o.value)==null||E.removeEventListener("scroll",q),P.value&&L.disconnect()}),(E,O)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({width:t.width}),class:e.normalizeClass([s.value,"scroll-container__wrapper"])},[e.createElementVNode("div",{ref_key:"sliderWrapperEl",ref:o,onMousedown:h,onMouseup:y,onMousemove:e.withModifiers(m,["prevent"]),class:"scroll-slider"},[e.createElementVNode("div",{ref_key:"sliderEl",ref:l,class:"slider-content"},[e.renderSlot(E.$slots,"default",{},void 0,!0)],512)],544),k.value?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({fontSize:t.size})},[t.useProgressBar?(e.openBlock(),e.createElementBlock("div",Al,[e.createElementVNode("div",{style:e.normalizeStyle({width:f.value}),class:"progress-bar--active"},null,4)])):e.createCommentVNode("",!0),t.useArrows?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[B.value?(e.openBlock(),e.createBlock(W,{key:0,onClick:O[0]||(O[0]=Q=>d("left")),icon:"ep:arrow-left-bold",size:t.size,class:"slide-left"},null,8,["size"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createBlock(W,{key:1,onClick:O[1]||(O[1]=Q=>d("right")),icon:"ep:arrow-right-bold",size:t.size,class:"slide-right"},null,8,["size"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.useDots?(e.openBlock(),e.createElementBlock("div",zl,[e.createElementVNode("div",Nl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,Q=>(e.openBlock(),e.createElementBlock("button",{key:Q,onClick:U=>a(Q),class:e.normalizeClass({"dot--active":b.value===Q})},null,10,Ml))),128))])])):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0)],6))}},[["__scopeId","data-v-09e90f8d"]]),Ol={class:"qst-tag"},Xe=F({__name:"QstTag",props:{size:{type:String,required:!1,default:"14px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},bgColor:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The background color of the tag."},color:{type:String,required:!1,default:"#fff",tsType:"string",description:"The font color of the tag."},useFade:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Changes the style of the tag to use a faded color scheme."},bold:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Bolds the text of the tag."},disabled:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Disables the tag, the tag will show grayed out and unclickable."},link:{type:String,required:!1,default:null,tsType:"string",description:"Clicking the link will bring the user to the provided link. The link can be internal or external, using either a router-link or anchor element."},useRouterLink:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Tags with links will be rendered as a router-link instead of an anchor element."},openInNewTab:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Opens the link in a new tab."},useCloseIcon:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Shows an 'x' icon in the tag, emits 'on-close' when clicked."},iconLeft:{type:String,required:!1,default:null,tsType:"string",description:"Any iconify value, will show on the left side of the tag."},iconRight:{type:String,required:!1,default:null,tsType:"string",description:"Any iconify value, will show on the right side of the tag."},tooltip:{type:[String,Object],required:!1,default:null,tsType:"string | {content: string, isHelpMode?: boolean, offset?: object, width?: number}",description:"Shows a tooltip dropdown when hovering over the tag. Set to a string or object, based on if tooltip props are needed. *(ex/ offset, width, position, etc)*"}},emits:["on-close"],setup(t,{emit:i}){e.useCssVars(d=>({aba66956:t.size}));const l=t,o=i,n=e.computed(()=>l.link?l.useRouterLink?"router-link":"a":"div"),r=e.computed(()=>{if(l.link)return!l.useRouterLink||l.link.includes("/")?l.link:l.link.includes("#")?{hash:l.link}:{name:l.link}}),s=e.computed(()=>({backgroundColor:l.useFade?dl(l.bgColor,90,"55"):l.bgColor,color:l.useFade?l.bgColor:l.color,fontSize:l.size,fontWeight:l.bold?"700":"normal"})),c=()=>{l.disabled||o("on-close")},a=e.computed(()=>{if(!l.tooltip)return;const{tooltip:d}=l;return typeof d=="string"?{content:d}:{...d,helpMode:d.isHelpMode}});return(d,f)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.value),{href:r.value,to:r.value,target:t.link&&t.openInNewTab?"_blank":"",style:e.normalizeStyle(s.value),class:e.normalizeClass([{disabled:t.disabled},"tag-wrapper"])},{default:e.withCtx(()=>[e.createElementVNode("div",null,[a.value?(e.openBlock(),e.createBlock(te,e.mergeProps({key:0},a.value,{width:200,"use-hover-icon":!1,"prevent-click-override":"",class:"tag-tooltip"}),{trigger:e.withCtx(()=>f[0]||(f[0]=[e.createElementVNode("div",null,null,-1)])),default:e.withCtx(()=>[e.renderSlot(d.$slots,"tooltip-content",{},()=>[e.createTextVNode(e.toDisplayString(a.value.content),1)],!0)]),_:3},16)):e.createCommentVNode("",!0),e.createElementVNode("div",Ol,[t.iconLeft?(e.openBlock(),e.createBlock(W,{key:0,icon:t.iconLeft,size:t.size,color:s.value.color,"align-text":"",class:"icon-left"},null,8,["icon","size","color"])):e.createCommentVNode("",!0),e.renderSlot(d.$slots,"default",{},void 0,!0),t.iconRight?(e.openBlock(),e.createBlock(W,{key:1,icon:t.iconRight,size:t.size,color:s.value.color,"align-text":"",class:"icon-right"},null,8,["icon","size","color"])):e.createCommentVNode("",!0),t.useCloseIcon?(e.openBlock(),e.createBlock(W,{key:2,onClick:c,icon:"emojione-monotone:heavy-multiplication-x",color:s.value.color,class:"icon-close"},null,8,["color"])):e.createCommentVNode("",!0)])])]),_:3},8,["href","to","target","style","class"]))}},[["__scopeId","data-v-e5c5ff84"]]),$l=F({__name:"TransitionCollapseHeight",setup(t){const i=c=>{requestAnimationFrame(()=>{c.style.height||(c.style.height="0px"),c.style.display=""})},l=(c,a)=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{c.style.height=`${c.scrollHeight}px`})}),a()},o=c=>{c.style.height=""},n=c=>{requestAnimationFrame(()=>{c.style.height||(c.style.height=`${c.offsetHeight}px`)})},r=(c,a)=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{c.style.height="0px"})}),a()},s=c=>{c.style.height=""};return(c,a)=>(e.openBlock(),e.createBlock(e.Transition,{"enter-active-class":"enter-active","leave-active-class":"leave-active",onBeforeEnter:i,onEnter:l,onAfterEnter:o,onBeforeLeave:n,onLeave:r,onAfterLeave:s},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{},void 0,!0)]),_:3}))}},[["__scopeId","data-v-e53787a9"]]),$t=F({__name:"QstExpandableRow",props:{useDiv:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"The trigger and content slot elements will have a div parent element."},defaultOpen:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"The row will be intitially expanded by default."},useIcon:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Shows an icon at the end of the trigger row."},rowIndex:{type:Number,required:!1,default:null,tsType:"number",description:"Index of the expanded row, used for dynamically selecting a row. *(ex/ when used in a table)*"},useOpenBorder:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Shows a border on the left of the row that expands with the container as it opens."},color:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The accent color, used for details within the component."},icon:{type:String,required:!1,default:"ep:arrow-down-bold",tsType:"string",description:"Any iconify value, the icon will show at the end of the trigger row."}},emits:["on-toggle"],setup(t,{emit:i}){e.useCssVars(c=>({"51a0169d":t.color}));const l=t,o=i,n=e.computed(()=>l.rowIndex||l.rowIndex===0?`expandable-row-${l.rowIndex}`:""),r=e.ref(!0),s=()=>{r.value=!r.value,o("on-toggle",r.value)};return e.onMounted(()=>{r.value=l.defaultOpen}),(c,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.useDiv?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:e.withModifiers(s,["stop"]),class:"row-trigger"},[e.renderSlot(c.$slots,"default",{},void 0,!0),t.useIcon?(e.openBlock(),e.createBlock(W,{key:0,icon:t.icon,class:e.normalizeClass([{rotate:r.value},"trigger-icon"])},null,8,["icon","class"])):e.createCommentVNode("",!0)])):e.renderSlot(c.$slots,"default",{key:1,toggleContainer:s},void 0,!0),e.createVNode($l,{class:e.normalizeClass(n.value)},{default:e.withCtx(()=>[r.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.useDiv?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([{"border--visible":t.useOpenBorder},"expanded-content"])},[e.renderSlot(c.$slots,"content",{},void 0,!0)],2)):e.renderSlot(c.$slots,"content",{key:1},void 0,!0)],64)):e.createCommentVNode("",!0)]),_:3},8,["class"])],64))}},[["__scopeId","data-v-ed708f8b"]]),Dl={key:0,class:"panel-header"},Dt=F({__name:"QstPanel",props:{noPad:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"The default padding styles will be removed from the panel."},padLight:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"The padding styles will be reduced from the default amount."},scroll:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"The panel will be scrollable when it has a height set or its parent has a height set."},height:{type:String,required:!1,default:"",tsType:"string",description:"The height of the panel."},hideScroll:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Hides the scrollbar for scrollable panels."},fullWidth:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Allows the panel to take up the full width of its parent container."},bgColor:{type:String,required:!1,default:"#fff",tsType:"string",description:"The background color of the panel."}},setup(t){e.useCssVars(n=>({"6a037790":t.bgColor}));const i=t,l=e.useSlots(),o=e.computed(()=>({"panel-padded":!i.noPad&&!i.padLight,"panel-padded--light":!i.noPad&&i.padLight,"panel--scroll":i.scroll,"scroll--hidden":i.hideScroll,"panel--full":i.fullWidth}));return(n,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({height:t.height}),class:e.normalizeClass([o.value,"qst-panel"])},[e.unref(l).heading?(e.openBlock(),e.createElementBlock("span",Dl,[e.renderSlot(n.$slots,"heading",{},void 0,!0)])):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"default",{},void 0,!0)],6))}},[["__scopeId","data-v-ac9da80d"]]),Pl=["for"],Ll=["id","disabled"],jl={class:"custom-checkbox"},Rl={key:0,class:"checkbox-label"},Ze=F({__name:"QstCheckbox",props:{modelValue:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Used for v-model, will be set to whether the checkbox is checked."},checkbox:{type:Object,required:!1,default:null,tsType:"{id?: string, value: string, label: string}[]",description:"This prop is used internally, do not pass anything in."},disabled:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Disables the checkbox."},label:{type:String,required:!1,default:"",tsType:"string",description:"Label displayed to the right of the checkbox, clicking on the label will toggle the checkbox."},useLeftLabel:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"The label will be displayed on the left side of the checkbox."},size:{type:String,required:!1,default:"14px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},color:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The accent color, used for details within the component."}},emits:["update:modelValue","on-change"],setup(t,{emit:i}){e.useCssVars(a=>({"5049954b":t.color}));const l=t,o=i,n=e.ref(!1),r=e.computed(()=>{var a;return((a=l.checkbox)==null?void 0:a.id)||me()}),s=e.computed(()=>{var a;return((a=l.checkbox)==null?void 0:a.label)||l.label}),c=()=>{l.checkbox&&o("on-change",l.checkbox)};return e.watch(()=>l.modelValue,()=>{l.modelValue!==n.value&&(n.value=l.modelValue)},{immediate:!0}),e.watch(n,()=>{n.value!==l.modelValue&&o("update:modelValue",n.value)}),(a,d)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({fontSize:t.size}),class:"qst-checkbox__wrapper"},[e.createElementVNode("label",{for:r.value,class:e.normalizeClass([{"label--left":t.useLeftLabel,disabled:t.disabled},"qst-checkbox"])},[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":d[0]||(d[0]=f=>n.value=f),onChange:c,id:r.value,disabled:t.disabled,type:"checkbox"},null,40,Ll),[[e.vModelCheckbox,n.value]]),e.createElementVNode("span",jl,[e.createVNode(W,{size:t.size,icon:"fluent:checkmark-12-filled",color:"white",class:"checkbox-icon"},null,8,["size"])]),s.value?(e.openBlock(),e.createElementBlock("span",Rl,e.toDisplayString(s.value),1)):e.createCommentVNode("",!0)],10,Pl)],4))}},[["__scopeId","data-v-a910855c"]]),Fl={key:0,class:"group-label"},Hl={key:1,class:"checkbox-error"},Pt=F({__name:"QstCheckboxGroup",props:{modelValue:{type:[Number,String,Boolean,Array],required:!1,default:null,tsType:"number | string | boolean | array",description:"Used for v-model of the selected checkbox, will be set to the checkbox's *value* property. If using multiSelect, set to an array. "},options:{type:Array,required:!0,tsType:"{id?: string, value: string, label: string}[]",description:"An array of options for the group of checkboxes. Id is optional, v-model will be set to the value property. *({id?: string, value: string, label: string})*"},multiSelect:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Whether multiple checkboxes can be checked."},useRow:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"The checkboxes will be displayed in a row, instead of a column."},error:{type:String,required:!1,default:"",tsType:"string",description:"Error to show for whole checkbox group."},disabled:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Disables all checkboxes."},groupLabel:{type:String,required:!1,default:"",tsType:"string",description:"The label for the entire checkbox group. Displays above or next to the inputs if displayed in a row."},size:{type:String,required:!1,default:"14px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},color:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The accent color, used for details within the component."}},emits:["update:modelValue"],setup(t,{emit:i}){const l=t,o=i,n=e.ref(),r=d=>{l.multiSelect||n.value.forEach(f=>f.isActive=f.id===d.id)},s=d=>{n.value.find(f=>f.value===d).isActive=!0};e.onMounted(()=>{l.options&&(n.value=re(l.options).map(d=>({...d,id:d.id||me()})))});const c=e.computed(()=>{var f,u;const d=(u=(f=n.value)==null?void 0:f.filter(g=>g.isActive))==null?void 0:u.map(g=>g.value);return l.multiSelect?d:d==null?void 0:d.join()}),a=e.computed(()=>JSON.parse(JSON.stringify(c.value))===JSON.parse(JSON.stringify(l.modelValue)));return e.watch(c,()=>{a.value||o("update:modelValue",c.value)}),e.watch(()=>l.modelValue,()=>{a.value||(l.multiSelect?l.modelValue.forEach(d=>s(d)):s(l.modelValue))}),(d,f)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({fontSize:t.size}),class:e.normalizeClass([{"checkbox-row":t.useRow,"error--visible":!!t.error},"checkbox-group"])},[t.groupLabel?(e.openBlock(),e.createElementBlock("p",Fl,e.toDisplayString(t.groupLabel),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,u=>(e.openBlock(),e.createBlock(Ze,{key:u.id,modelValue:u.isActive,"onUpdate:modelValue":g=>u.isActive=g,onOnChange:f[0]||(f[0]=g=>r(g)),checkbox:u,disabled:t.disabled},null,8,["modelValue","onUpdate:modelValue","checkbox","disabled"]))),128)),t.error?(e.openBlock(),e.createElementBlock("span",Hl,"*"+e.toDisplayString(t.error)+"*",1)):e.createCommentVNode("",!0)],6))}},[["__scopeId","data-v-06246ddf"]]),Ql=["for"],Wl=["id","value","disabled"],_e=F({__name:"QstRadio",props:{modelValue:{type:[Number,String,Boolean],required:!1,default:null,tsType:"number | string | boolean",description:"Used for v-model of the selected radio option, will be set to the input's *value* property."},radio:{type:Object,required:!0,tsType:"{id?: string, value: string, label: string}[]",description:"The details for the radio input. Id is optional, v-model will be set to the value property. *({id?: string, value: string, label: string})*"},disabled:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Disables the radio input."},size:{type:String,required:!1,default:"12px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},color:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The accent color, used for details within the component."}},emits:["update:modelValue"],setup(t,{emit:i}){e.useCssVars(s=>({"52a0f694":t.color}));const l=t,o=i,n=e.computed(()=>{var s;return((s=l.radio)==null?void 0:s.id)||me()}),r=e.ref();return e.watch(r,()=>{r.value!==l.modelValue&&o("update:modelValue",r.value)}),e.watch(()=>l.modelValue,()=>{l.modelValue!==r.value&&(r.value=l.modelValue)},{immediate:!0}),(s,c)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({fontSize:t.size}),class:e.normalizeClass([{disabled:t.disabled},"qst-radio"])},[e.createElementVNode("label",{for:n.value,class:"radio-label"},[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":c[0]||(c[0]=a=>r.value=a),id:n.value,value:t.radio.value,disabled:t.disabled,type:"radio"},null,8,Wl),[[e.vModelRadio,r.value]]),c[1]||(c[1]=e.createElementVNode("span",{class:"radio-input"},null,-1)),e.createTextVNode(" "+e.toDisplayString(t.radio.label),1)],8,Ql)],6))}},[["__scopeId","data-v-aecdfc1f"]]),Ul={key:0,class:"group-label"},Jl={key:1,class:"radio-error"},Lt=F({__name:"QstRadioGroup",props:{modelValue:{type:[Number,String,Boolean],required:!1,default:null,tsType:"number | string | boolean",description:"Used for v-model of the selected radio option, will be set to the input's *value* property."},options:{type:Array,required:!0,tsType:"{id?: string, value: string, label: string}[]",description:"An array of options for the group of radio inputs. Id is optional, v-model will be set to the value property. *({id?: string, value: string, label: string})*"},error:{type:String,required:!1,default:"",tsType:"string",description:"Error to show for whole radio group."},disabled:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Disables all radio inputs."},useRow:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"The inputs will be displayed in a row, instead of a column."},groupLabel:{type:String,required:!1,default:"",tsType:"string",description:"The label for the entire radio group. Displays above or next to the inputs if displayed in a row."},size:{type:String,required:!1,default:"12px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},color:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The accent color, used for details within the component."}},emits:["update:modelValue"],setup(t,{emit:i}){const l=t,o=i,n=e.ref(),r=e.computed(()=>{var s;return(s=l.options)==null?void 0:s.map(c=>({...c,id:c.id||me()}))});return e.watch(n,()=>{n.value!==l.modelValue&&o("update:modelValue",n.value)}),e.watch(()=>l.modelValue,()=>{l.modelValue!==n.value&&(n.value=l.modelValue)},{immediate:!0}),(s,c)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({fontSize:t.size}),class:e.normalizeClass([{"radio-row":t.useRow,"error--visible":!!t.error},"qst-radio__wrapper"])},[t.groupLabel?(e.openBlock(),e.createElementBlock("p",Ul,e.toDisplayString(t.groupLabel),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,a=>(e.openBlock(),e.createBlock(_e,{key:a.id,modelValue:n.value,"onUpdate:modelValue":c[0]||(c[0]=d=>n.value=d),radio:a,disabled:t.disabled,color:t.color},null,8,["modelValue","radio","disabled","color"]))),128)),t.error?(e.openBlock(),e.createElementBlock("span",Jl,"*"+e.toDisplayString(t.error)+"*",1)):e.createCommentVNode("",!0)],6))}},[["__scopeId","data-v-d198a081"]]),jt={__name:"QstTeleport",props:{teleportTo:{type:String,required:!1,default:null,tsType:"string",description:'A selector used to teleport the content, otherwise use the to="" attribute.'}},setup(t){return(i,l)=>(e.openBlock(),e.createBlock(e.Teleport,{to:t.teleportTo??i.$attrs.to},[e.renderSlot(i.$slots,"default")],8,["to"]))}},Kl=["onClick"],Gl={class:"select-label"},Yl={key:2,class:"placeholder-label"},Xl={class:"multiselect__icon-container"},Zl={key:3,class:"input-error"},_l=["innerHTML"],Rt=F({__name:"MultiSelectDisplay",props:{activeValues:{type:[Object,Array,String,Number],required:!1,default:null,tsType:"SelectModelValue",description:"The active values that have been selected."},placeholder:{type:[String,Number],required:!1,default:"Select",tsType:"string | number",description:"Placeholder for the input."},size:{type:String,required:!1,default:"14px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},color:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The accent color, used for details within the component."},icon:{type:String,required:!1,default:"",tsType:"string",description:"Any Iconify value, the icon will be displayed to the right."},tooltip:{type:Object,required:!1,default:null,tsType:"{content: string, helpMode?: boolean, offset?: object, width?: number}",description:"Shows a tooltip dropdown when hovering over the input. Set to a string or object, based on if tooltip props are needed. *(ex/ offset, width, position, etc)* Tooltip is displayed inside the input, width and offset will default to match input dimensions."},showActiveValues:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Whether the active values should be displayed."},numExpandedOptions:{type:Number,required:!1,default:3,tsType:"number",description:"The number of options to be displayed before showing '+X options' selected."},disabledConfig:{type:Object,required:!0,tsType:"{disabled: boolean, disabledReason: string, disabledTooltipPosition: string}",description:"Whether the input is disabled, the disabled reason and the disabled tooltip position."},error:{type:String,required:!1,default:null,tsType:"string",description:"Sets the error message."},useErrorIcon:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"An error icon will be displayed on the right of the input, with a tooltip to show the error message."},useSelect:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Whether the component is being used in QstSelect."}},emits:["on-toggle-active"],setup(t,{emit:i}){e.useCssVars(a=>({"6b1c83d9":t.color}));const l=t,o=i,n=e.computed(()=>{var a;return((a=l.activeValues)==null?void 0:a.length)-l.numExpandedOptions}),r=e.computed(()=>n.value>1),s=e.computed(()=>l.activeValues.slice(l.numExpandedOptions).map(a=>a.text).join(", ")),c=e.computed(()=>{var a;return((a=l.disabledConfig)==null?void 0:a.disabled)&&!!l.disabledConfig.disabledReason});return(a,d)=>{var f;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([{empty:!t.showActiveValues,disabled:(f=t.disabledConfig)==null?void 0:f.disabled},"multiselect-display"])},[c.value?(e.openBlock(),e.createBlock(te,{key:0,content:t.disabledConfig.disabledReason,position:t.disabledConfig.disabledTooltipPosition,class:"input-tooltip--disabled"},{trigger:e.withCtx(()=>d[0]||(d[0]=[e.createElementVNode("div",null,null,-1)])),_:1},8,["content","position"])):e.createCommentVNode("",!0),t.showActiveValues?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.activeValues,(u,g)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[g<t.numExpandedOptions||!r.value?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:e.withModifiers(T=>o("on-toggle-active",u),["stop"]),class:"selected-option"},[e.renderSlot(a.$slots,"selection",{selection:u},()=>[u!=null&&u.leftImage?(e.openBlock(),e.createBlock(he,{key:0,src:u.leftImage,width:"1.25em",height:"1.25em"},null,8,["src"])):e.createCommentVNode("",!0),e.createElementVNode("p",null,e.toDisplayString((u==null?void 0:u.text)??u),1),e.createVNode(W,{icon:"eva:close-fill",size:t.size},null,8,["size"])],!0)],8,Kl)):e.createCommentVNode("",!0)],64))),256)),r.value?(e.openBlock(),e.createBlock(te,{key:0,class:"selected-option"},{trigger:e.withCtx(()=>[e.createElementVNode("p",null,"+"+e.toDisplayString(n.value)+" options",1)]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(s.value),1)]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("label",Gl,e.toDisplayString(t.placeholder),1)],64)):(e.openBlock(),e.createElementBlock("span",Yl,e.toDisplayString(t.placeholder),1)),e.createElementVNode("div",Xl,[t.useErrorIcon?(e.openBlock(),e.createBlock(te,{key:0,solid:"",class:"error-icon__tooltip"},{trigger:e.withCtx(()=>[e.createVNode(W,{icon:"bi:exclamation-circle-fill",size:t.size,color:"#CA0F11"},null,8,["size"])]),default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(t.error),1)]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.icon?(e.openBlock(),e.createBlock(W,{key:0,icon:t.icon,size:t.size,class:"icon"},null,8,["icon","size"])):e.createCommentVNode("",!0),t.tooltip?(e.openBlock(),e.createBlock(te,e.mergeProps({key:1},t.tooltip,{size:t.size,class:"info-tooltip"}),null,16,["size"])):e.createCommentVNode("",!0),t.useSelect?(e.openBlock(),e.createBlock(W,{key:2,icon:"ep:arrow-down-bold",class:"dropdown-arrow"})):e.createCommentVNode("",!0)],64))]),t.error&&!t.useErrorIcon?(e.openBlock(),e.createElementBlock("span",Zl,[d[1]||(d[1]=e.createTextVNode(" *")),e.createElementVNode("span",{innerHTML:t.error},null,8,_l),d[2]||(d[2]=e.createTextVNode("* "))])):e.createCommentVNode("",!0)],2)}}},[["__scopeId","data-v-2ca1e844"]]),en=["onKeydown"],tn=F({__name:"VirtualScroller",props:{items:{type:Array,required:!1,default:null,tsType:"array",description:"The array of items to be displayed in the dropdown scroller."},numBufferItems:{type:Number,required:!1,default:5,tsType:"number",description:"The number of items to additionally render for smoother scrolling."},isShowing:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Whether the scroller is currently visible in its parent."},height:{type:String,required:!0,tsType:"string",description:"The height of the dropdown."},heightPerEntry:{type:Number,required:!1,default:null,tsType:"number",description:"The height of each line item. *(if not set, item height will be calculated based on entriesPerScroll)*"},entriesPerScroll:{type:Number,required:!1,default:8,tsType:"number",description:"The number of entries to render per scroll that will be visible in the dropdown at one time. *(heightPerEntry takes priority if both are set)*"}},emits:["on-escape","on-enter"],setup(t,{expose:i,emit:l}){e.useCssVars(b=>({"421e29ac":f.value,"20ecfc0e":d.value,"054a7745":a.value}));const o=t,n=l,r=e.ref(),s=e.ref(),c=e.computed(()=>{var b;return((b=o.items)==null?void 0:b.length)||0}),a=e.computed(()=>o.heightPerEntry?o.heightPerEntry:o.entriesPerScroll?parseInt(o.height)/o.entriesPerScroll:34),d=e.computed(()=>c.value*a.value+"px"),f=e.computed(()=>Math.min(parseInt(d.value),parseInt(o.height))+"px"),u=e.ref(),g=e.ref(),T=()=>{e.nextTick(()=>{var k,v;const b=Math.ceil(((k=r.value)==null?void 0:k.clientHeight)/a.value),B=b+o.numBufferItems,x=c.value>B?B:b;u.value=Math.floor(((v=r.value)==null?void 0:v.scrollTop)/a.value)||0,g.value=Math.min(u.value+x,c.value)||0})},h=b=>{const B=y.value[b];B&&B.scrollIntoView({behavior:"smooth"})};e.watch(()=>o.isShowing,()=>{o.isShowing&&T()},{immediate:!0}),e.watch(c,()=>T()),e.onMounted(()=>{r.value.addEventListener("scroll",T)}),e.onBeforeUnmount(()=>{r.value.removeEventListener("scroll",T)}),i({scrollToItem:h});const y=e.ref([]),m=(b,B,x)=>{var P;const{key:k}=b;if(!["ArrowDown","ArrowUp","Tab","Enter","Escape"].includes(k))return;if(k==="Escape"){n("on-escape");return}if(k==="Enter"){(x||x===0)&&n("on-enter",x);return}const v=k==="ArrowDown"||k==="Tab"&&!b.shiftKey,q=k==="ArrowUp"||k==="Tab"&&b.shiftKey,M=B+(v?1:-1);!v&&!q||(v&&M>=y.value.length?(r.value.scrollTop=0,setTimeout(()=>{var L;return(L=y.value[0])==null?void 0:L.focus()},100)):q&&M<0?(r.value.scrollTop=r.value.scrollHeight,setTimeout(()=>{var L;return(L=y.value[c.value-1])==null?void 0:L.focus()},100)):(P=y.value[M])==null||P.focus(),b.preventDefault())};return(b,B)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"scrollerEl",ref:r,class:"scroll-container"},[e.createElementVNode("ul",{ref_key:"listEl",ref:s,class:"virtual-list"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(x,k)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[k>=u.value&&k<=g.value?(e.openBlock(),e.createElementBlock("li",{key:0,onKeydown:v=>m(v,k,x),ref_for:!0,ref:v=>y.value[k]=v,style:e.normalizeStyle({top:`${k*a.value}px`}),tabindex:"0",class:"virtual-list__item"},[e.renderSlot(b.$slots,"default",{item:x,index:k},()=>[e.createTextVNode(e.toDisplayString(x),1)],!0)],44,en)):e.createCommentVNode("",!0)],64))),256))],512)],512))}},[["__scopeId","data-v-7594afb9"]]),on={key:0},ln={class:"text-subtext__wrapper"},nn={class:"text-subtext__container"},rn=["innerHTML"],sn=["innerHTML"],an={class:"matching-search__tag"},dn={class:"search-label"},cn=["innerHTML"],un=F({__name:"AutocompleteMenuLineItem",props:{item:{type:[String,Number,Object],required:!0,tsType:"string, number, {id?: (number | string), text: string, result?: any, subtext?: string, leftImage?: string, searchData?: {label: string, value: string | number}[], disabled?: boolean, disabledReason?: string}",description:"The line item to be displayed."},searchValue:{type:[String,Number],required:!0,tsType:"string | number",description:"The search value that will be used to filter the dropdown items."},boldMatchingSearchValues:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Shows the matching portion of each option bolded based on search. (QstAutocomplete only)"},activeValue:{type:[Object,Array,String,Number],required:!1,default:null,tsType:"string | AutocompleteProp | number | string[] | AutocompleteProp[] | number[]",description:"The active value from the parent. *(required when using showActiveIcon)*"},showActiveIcon:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"An icon will show at the end of the active dropdown item."},size:{type:String,required:!1,default:"14px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},color:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The accent color, used for details within the component."},showImages:{type:Boolean,required:!0,tsType:"boolean",description:"Whether an image is being shown in the dropdown item. *(If at least one item has an image, any without will show a default image)*"}},setup(t){e.useCssVars(c=>({"7128b178":t.size,"99e2e668":t.color}));const i=t,l=e.computed(()=>i.item.leftImage||"https://snowjoeecm.blob.core.windows.net/assets/no-image.png"),o=e.computed(()=>!i.activeValue||Array.isArray(i.activeValue)&&!i.activeValue.length||!i.item?!1:Array.isArray(i.activeValue)?typeof i.activeValue[0]=="object"?i.activeValue.some(c=>c.text===i.item.text):i.activeValue.includes(i.item.text||i.item):JSON.stringify(i.activeValue)===JSON.stringify(i.item)||i.activeValue===i.item.text),n=e.computed(()=>({text:r(typeof i.item=="object"?i.item.text:i.item),...i.item.subtext?{subtext:r(i.item.subtext)}:{}})),r=c=>{if(!i.searchValue||!i.boldMatchingSearchValues)return c;const a=It(c.toString()).split(" ").filter(u=>!!u.trim()).join(" "),d=i.searchValue.toString().trim().replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&"),f=new RegExp(d,"i");return a.replace(f,"<b>$&</b>")},s=e.computed(()=>{var c;if(!(!i.boldMatchingSearchValues||!i.searchValue||!((c=i.item.searchData)!=null&&c.length)))return i.item.searchData.map(a=>({label:a.label,value:r(a.value)})).filter(a=>!!a.value&&a.value.includes("<b>"))});return(c,a)=>{var d;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([{"option--active":o.value},"autocomplete-menu__line-item"])},[t.showImages?(e.openBlock(),e.createElementBlock("div",on,[e.createVNode(he,{src:l.value,class:"autocomplete__wrapper--image"},null,8,["src"])])):e.createCommentVNode("",!0),e.createElementVNode("div",ln,[e.createElementVNode("div",nn,[e.createElementVNode("p",{innerHTML:n.value.text,class:"autocomplete__item-value"},null,8,rn),n.value.subtext?(e.openBlock(),e.createElementBlock("p",{key:0,innerHTML:n.value.subtext,class:"autocomplete__item-subtext"},null,8,sn)):e.createCommentVNode("",!0)]),(d=s.value)!=null&&d.length?(e.openBlock(),e.createBlock(Xe,{key:0,class:"autocomplete__search-tag"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,f=>(e.openBlock(),e.createElementBlock("span",an,[e.createElementVNode("span",dn,e.toDisplayString(f.label),1),a[0]||(a[0]=e.createTextVNode(": ")),e.createElementVNode("span",{class:"search-val",innerHTML:f.value},null,8,cn)]))),256))]),_:1})):e.createCommentVNode("",!0)]),o.value&&t.showActiveIcon?(e.openBlock(),e.createBlock(W,{key:1,icon:"akar-icons:circle-fill",class:"active-icon"})):e.createCommentVNode("",!0)],2)}}},[["__scopeId","data-v-38efd18f"]]),fn={class:"w-full"},pn=F({__name:"LineItemWrapper",props:{item:{type:[String,Number,Object],required:!0,tsType:"string, number, {id?: (number | string), text: string, result?: any, subtext?: string, leftImage?: string, searchData?: {label: string, value: string | number}[], disabled?: boolean, disabledReason?: string}",description:"The line item to be displayed."},multiSelect:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Whether multiSelect is set in QstSelect/QstAutocomplete."},defaultVal:{type:String,required:!1,default:"",tsType:"string",description:"A default value that will be added as the first option in the dropdown. (QstSelect only)"},searchValue:{type:[String,Number],required:!1,default:"",tsType:"string | number",description:"The search value that will be used to filter the dropdown items."},boldMatchingSearchValues:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Shows the matching portion of each option bolded based on search. (QstAutocomplete only)"},activeValue:{type:[Object,Array,String,Number],required:!1,default:null,tsType:"string | AutocompleteProp | number | string[] | AutocompleteProp[] | number[]",description:"The active value from the parent. *(required when using showActiveIcon)*"},showActiveIcon:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"An icon will show at the end of the active dropdown item."},isAllActive:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Whether all options are active."},disabledTooltipPosition:{type:String,required:!1,default:"right",tsType:"string",description:"Tooltip position for showing an option's disabled reason."},size:{type:String,required:!1,default:"14px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},color:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The accent color, used for details within the component."},showImages:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Whether an image is being shown in the dropdown item. *(If at least one item has an image, any without will show a default image)*"}},emits:["on-toggle"],setup(t,{emit:i}){e.useCssVars(d=>({"31357c4f":t.color}));const l=t,o=i,n=()=>{o("on-toggle",l.item)},r=e.computed(()=>l.item.text||l.item),s=e.computed(()=>l.item.disabled),c=e.computed(()=>{if(!l.multiSelect||!(Array.isArray(l.activeValue)&&l.activeValue.length))return;const d=l.activeValue[0].text||l.activeValue[0];return l.defaultVal&&l.defaultVal===d?"":d}),a=e.computed(()=>({"last-active-val":!l.isAllActive&&c.value===r.value,"multiselect--option":l.multiSelect&&l.defaultVal!==r.value,"option--disabled":s.value,"disabled-tt--visible":s.value&&!!l.item.disabledReason}));return(d,f)=>(e.openBlock(),e.createElementBlock("div",{onClick:n,tabindex:"0",class:e.normalizeClass([a.value,"dropdown-item"])},[e.createElementVNode("div",fn,[s.value&&t.item.disabledReason?(e.openBlock(),e.createBlock(te,{key:0,content:t.item.disabledReason,position:t.disabledTooltipPosition,offset:{x:t.disabledTooltipPosition==="right"?20:-20,y:0},class:"disabled-item__tt"},{trigger:e.withCtx(()=>f[0]||(f[0]=[e.createElementVNode("div",null,null,-1)])),_:1},8,["content","position","offset"])):e.createCommentVNode("",!0),e.createVNode(un,{item:t.item,"active-value":t.activeValue,"show-active-icon":t.showActiveIcon,"search-value":t.searchValue,"bold-matching-search-values":t.boldMatchingSearchValues,"show-images":t.showImages,size:t.size,color:t.color},null,8,["item","active-value","show-active-icon","search-value","bold-matching-search-values","show-images","size","color"])])],2))}},[["__scopeId","data-v-553273be"]]),hn={key:0,class:"dropdown-input"},Ft=F({__name:"QstAutocompleteMenu",props:{modelValue:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Used for v-model, will be set to whether the dropdown is showing."},inputId:{type:String,required:!1,tsType:"string",description:"GUID from QstInput, used for opening dropdown when associated input is the active element."},src:{type:Array,required:!1,tsType:"string[], number[], {id?: (number | string), text: string, result?: any, subtext?: string, leftImage?: string, searchData?: {label: string, value: string | number}[], disabled?: boolean, disabledReason?: string}[]",description:"The array of items that will be displayed in the dropdown. *(string[], number[], {id?: (number | string), text: string, result?: any, subtext?: string, leftImage?: string, searchData?: {label: string, value: string | number}[], disabled?: boolean, disabledReason?: string}[])*"},autocompleteEndpoint:{type:String,required:!1,tsType:"string",description:"Endpoint URL to fetch data for the dropdown items, instead of through src prop."},searchTerm:{type:[String,Number],required:!1,default:"",tsType:"string | number",description:"The search value that will be used to filter the dropdown items."},minChars:{type:Number,required:!1,default:0,tsType:"number",description:"The minimum number of characters required before the autocomplete items will be filtered by search. (QstAutocomplete only)"},showActiveIcon:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"An icon will show at the end of the active dropdown item."},activeValue:{type:[Object,Array,String,Number],required:!1,default:null,tsType:"string | AutocompleteProp | number | string[] | AutocompleteProp[] | number[]",description:"The active value from the parent. *(required when using showActiveIcon)*"},isLoadingOptions:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Shows a loader in the dropdown, set when loading options from an endpoint in parent."},isInputFocused:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Whether the top input is focused from QstSelect/QstAutocomplete. *(Used to prevent on-enter event with QstAutocomplete and for focusing option when opening dropdown.)*"},sortAlphabetically:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Sorts the dropdown items alphabetically."},multiSelect:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Whether multiSelect is set in QstSelect/QstAutocomplete."},disableDropdownInput:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Disables the input inside the dropdown. (multiSelect only)"},useAutocomplete:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Whether the dropdown is being used for QstAutocomplete."},hideSelectedOptions:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Hides the currently selected options from dropdown. (QstAutocomplete only)"},boldMatchingSearchValues:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Shows the matching portion of each option bolded based on search. (QstAutocomplete only)"},showExtendedResults:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Shows a link at the bottom of dropdown to view all results in a modal. (QstAutocomplete only)"},defaultVal:{type:String,required:!1,default:"",tsType:"string",description:"A default value that will be added as the first option in the dropdown. (QstSelect only)"},disabledTooltipPosition:{type:String,required:!1,default:"right",tsType:"string",description:"Tooltip position for showing an option's disabled reason. (QstSelect only)"},useSelectAll:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Adds an option in the dropdown to select all options (QstSelect multiSelect only)"},size:{type:String,required:!1,default:"14px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},color:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The accent color, used for details within the component."},width:{type:String,required:!1,default:"100%",tsType:"string",description:"The width of the dropdown."},height:{type:String,required:!1,default:"350px",tsType:"string",description:"The height of the dropdown."},position:{type:Object,required:!1,default:null,tsType:"{top: string, left: string}",description:"The teleported position for the dropdown."},heightPerEntry:{type:Number,required:!1,default:null,tsType:"number",description:"The height of each line item. *(if not set, item height will be calculated based on entriesPerScroll)*"},entriesPerScroll:{type:Number,required:!1,default:null,tsType:"number",description:"The number of entries to render per scroll that will be visible in the dropdown at one time. *(heightPerEntry takes priority if both are set)*"},numBufferItems:{type:Number,required:!1,default:5,tsType:"number",description:"The number of items to additionally render for smoother scrolling."},darkMode:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Changes the styles to a dark theme."}},emits:["update:item","on-select","update:modelValue","on-enter","on-dropdown-focus","blur","on-select-all"],setup(t,{expose:i,emit:l}){e.useCssVars(V=>({b702cd94:t.color}));const o=t,n=l,r=e.ref(),s=e.ref(),c=e.ref(),a=e.computed(()=>{var V,C;return{width:o.width,fontSize:o.size,top:(V=o.position)==null?void 0:V.top,left:(C=o.position)==null?void 0:C.left}}),d=e.computed(()=>{if(o.heightPerEntry)return o.heightPerEntry;if(o.entriesPerScroll)return null;if(!o.size)return 34;const V=typeof O.value[1]=="object"&&O.value.some(C=>!!C.subtext||!!C.leftImage);return Math.round(parseInt(o.size)*(V?2.8:2.4))}),f=e.computed(()=>{var C;const V=(C=J.value)!=null&&C.length?J.value:O.value;return V==null?void 0:V.some($=>!!$.leftImage)}),u=()=>{e.nextTick(()=>{var V,C;return(C=(V=s.value)==null?void 0:V.querySelector("li"))==null?void 0:C.focus()})},g=()=>{var V;o.multiSelect&&m.value&&((V=c.value)==null||V.focusInput(!0))},T=V=>{var C,$;V.key==="Escape"?q(!0):V.key==="ArrowDown"&&m.value&&((C=document.activeElement)==null?void 0:C.id)===(($=c.value)==null?void 0:$.id)&&(u(),V.preventDefault())},h=V=>{V.disabled||(n("update:item",V),n("on-select"),g())},y=V=>{o.useAutocomplete&&o.isInputFocused||h(V)},m=e.ref(o.modelValue);e.watch(m,()=>{m.value!==o.modelValue&&n("update:modelValue",m.value),e.nextTick(()=>g())}),e.watch(()=>o.modelValue,()=>{m.value!==o.modelValue&&(m.value=o.modelValue,m.value&&o.position&&e.nextTick(()=>{var V;return(V=r.value)==null?void 0:V.scrollToItem(0)}))});const b=e.ref([]),B=e.ref(!1),x=async()=>{var V;try{if(B.value=!0,(V=o.src)!=null&&V.length)b.value=re(o.src);else if(o.autocompleteEndpoint){const C=await $axios.get(o.autocompleteEndpoint);b.value=C.data}o.sortAlphabetically&&Q(b.value),!o.multiSelect&&o.defaultVal&&!b.value.includes(o.defaultVal)&&b.value.unshift(o.defaultVal)}catch(C){console.log(C)}finally{B.value=!1}},k=e.computed(()=>{var V;return(V=o.src)==null?void 0:V.length});e.watch(k,()=>{x()}),e.watch(()=>o.src,()=>{x()}),e.watch(()=>o.autocompleteEndpoint,()=>{x()}),e.onMounted(()=>{x()}),e.watch(()=>o.isLoadingOptions,()=>{B.value=o.isLoadingOptions},{immediate:!0});const v=e.ref();e.watch(v,()=>{O.value.length&&e.nextTick(()=>r.value.scrollToItem(0))}),e.watch(()=>o.searchTerm,()=>{v.value=o.searchTerm},{immediate:!0});const q=(V=!1)=>{v.value="",m.value=!V},M=()=>{n("on-enter",v.value),q()},P=V=>{const C=re(b.value);return!V&&V!==0?C:C.filter($=>{const j=V.toString().toLowerCase(),ee=["string","number"].includes(typeof $)?$.toString():`${$.text} ${$.subtext??""}`,S=It(ee).toLowerCase().includes(j),z=($.searchData?$.searchData.map(G=>{var le;return((le=G.value)==null?void 0:le.toString().toLowerCase())||""}):[]).some(G=>G.includes(j));return S||z}).sort(($,j)=>{var A,z;const ee=typeof $=="string"||typeof $=="number"?$.toString().toLowerCase():(A=$.text)==null?void 0:A.toString().toLowerCase(),S=typeof j=="string"||typeof $=="number"?j.toString().toLowerCase():(z=j.text)==null?void 0:z.toString().toLowerCase();return(S==null?void 0:S.startsWith(V.toString().toLowerCase()))-ee.startsWith(V.toString().toLowerCase())})},L=V=>{var j,ee;const C=[];o.activeValue.forEach(S=>{const A=V.find(z=>JSON.stringify(z)===JSON.stringify(S));A&&(V.splice(V.indexOf(A),1),o.hideSelectedOptions||C.push(A))}),C.forEach(S=>V.unshift(S));const $=(ee=o.defaultVal)==null?void 0:ee.toLowerCase().includes((j=v.value)==null?void 0:j.toString().toLowerCase());o.defaultVal&&!V.includes(o.defaultVal)&&(!v.value||$)&&V.unshift(o.defaultVal)},E=V=>{const C=V.reduce(($,j)=>($[j.disabled?"disabled":"active"].push(j),$),{active:[],disabled:[]});return[...C.active,...C.disabled]},O=e.computed(()=>{if(o.minChars>0&&v.value.length<o.minChars)return[];let V=P(v.value);return o.multiSelect&&Array.isArray(o.activeValue)&&o.activeValue.length&&L(V),!o.useAutocomplete&&(V!=null&&V.some(C=>typeof C=="object"&&C.disabled))&&(V=E(V)),V}),Q=V=>{if(V)return typeof V[0]=="string"||typeof V[0]=="number"?V.sort((C,$)=>At(C,$)):V.sort((C,$)=>At(C.text,$.text))},U=e.ref();e.computed(()=>{var V,C;return o.showExtendedResults&&!o.multiSelect&&(!!((V=J.value)!=null&&V.length)||((C=O.value)==null?void 0:C.length)>1)});const J=e.computed(()=>{var C,$;return!o.showExtendedResults||o.multiSelect||!((C=O.value)!=null&&C.length)||!(($=U.value)!=null&&$.prevSearch)||!o.activeValue?void 0:O.value.length===1&&JSON.stringify(O.value[0])===JSON.stringify(o.activeValue)?P(U.value.prevSearch):[]}),H=e.ref(!1),K=e.computed(()=>{var V,C;if(o.useSelectAll)return((V=o.activeValue)==null?void 0:V.length)===((C=b.value)==null?void 0:C.length)});return e.watch(H,()=>{H.value?n("on-select-all",!0):K.value&&n("on-select-all",!1)}),e.watch(K,()=>{H.value=K.value}),i({autocompleteData:b,autocompleteResults:O,dropdownSearchValue:v,clearDropdownInput:q,focusMultiSelectInput:g,focusFirstOption:u}),(V,C)=>{var $;return e.withDirectives((e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(a.value),class:e.normalizeClass([{dark:t.darkMode},"autocomplete__wrapper"])},[B.value?(e.openBlock(),e.createBlock(Ae,{key:0,size:t.size,class:"dropdown-loader"},null,8,["size"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.multiSelect?(e.openBlock(),e.createElementBlock("div",hn,[e.createVNode(ne,{ref_key:"multiSelectInputEl",ref:c,modelValue:v.value,"onUpdate:modelValue":C[0]||(C[0]=j=>v.value=j),onKeydown:T,onFocus:C[1]||(C[1]=j=>n("on-dropdown-focus")),onBlur:C[2]||(C[2]=j=>n("blur")),onOnEnter:M,onOnInputClear:C[3]||(C[3]=j=>m.value=!0),size:t.size,color:t.color,disabled:t.disableDropdownInput,"use-clear-icon":"","dark-mode":t.darkMode,placeholder:"Search",autocomplete:"off"},null,8,["modelValue","size","color","disabled","dark-mode"])])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"listContainerEl",ref:s},[($=O.value)!=null&&$.length?(e.openBlock(),e.createBlock(tn,{key:0,ref_key:"scrollerEl",ref:r,onOnEscape:C[4]||(C[4]=j=>m.value=!1),onOnEnter:y,items:O.value,"is-showing":m.value,height:t.height,"height-per-entry":d.value,"entries-per-scroll":t.entriesPerScroll},{default:e.withCtx(({item:j})=>[e.createVNode(pn,{onOnToggle:h,item:j,"multi-select":t.multiSelect,"default-val":t.defaultVal,"search-value":v.value,"bold-matching-search-values":t.boldMatchingSearchValues,"active-value":t.activeValue,"show-active-icon":t.showActiveIcon,"is-all-active":K.value,"disabled-tooltip-position":t.disabledTooltipPosition,size:t.size,color:t.color,"show-images":f.value},null,8,["item","multi-select","default-val","search-value","bold-matching-search-values","active-value","show-active-icon","is-all-active","disabled-tooltip-position","size","color","show-images"])]),_:1},8,["items","is-showing","height","height-per-entry","entries-per-scroll"])):e.renderSlot(V.$slots,"no-results-msg",{key:1},()=>[C[5]||(C[5]=e.createElementVNode("p",{class:"autocomplete__no-results"},"No Results",-1))],!0)],512)],64))],6)),[[e.vShow,m.value]])}}},[["__scopeId","data-v-bb14d019"]]);function Ht(t,i,l){const o=e.ref([]),n=d=>{d.length&&(o.value=re(d).map((f,u)=>({text:f.text??f,id:f.id??u,leftImage:f.leftImage??"",result:f.result??""})),a())},r=d=>{if(Array.isArray(i.value)){if(i.value.length===1)return t("update:result",[d]);const u=i.value.at(-1)===d?[d]:i.value.filter(g=>g!==d);t("update:modelValue",u),t("change",u),t("update:result",u)}},s=e.ref([]),c=e.computed(()=>!l.value&&i.value?Object.values(i.value):o.value.filter(d=>s.value.includes(d.id))),a=()=>{o.value.length&&Array.isArray(i.value)&&i.value.forEach(d=>{const f=o.value.find(u=>u.text===(d.text||d));f&&!s.value.includes(f.id)&&s.value.push(f.id)})};return{multiSelectOptions:o,multiSelectActiveIds:s,multiSelectActiveValues:c,setActiveMultiSelectIds:a,assignMultiSelectValuesAndIds:n,assignMultiSelectDefaultVal:r}}function et(t,i,l,o){const n=e.ref(!1),r=e.ref(!1);e.watch(n,()=>{var a;i.value||(a=l.value)==null||a.focusInput(!0)}),e.watch(r,()=>{var a;r.value&&(t.value=!0),i.value?(a=o.value)==null||a.focusMultiSelectInput():s()});const s=()=>n.value=!0;return{isFocused:n,isTabFocused:r,focusSelectInput:s,handleBlur:(a=!1)=>{n.value=!1,a&&(r.value=!1)}}}function Qt(t,i,l,o,n,r,s,c){const a=e.ref(!1),d=()=>{i.value||(a.value=!a.value)},f=e.computed(()=>({"input-container":!0,"multiselect-input":t.value,focused:t.value&&a.value,"multiselect--disabled":t.value&&i.value,disabled:i.value,"error--visible":!!l.value,dark:r.value})),u=e.computed(()=>{let h;if(c.value){const y=[{screen:"sm",min:0,max:767},{screen:"md",min:768,max:991},{screen:"lg",min:992,max:1350},{screen:"xl",min:1351,max:1549},{screen:"xxl",min:1550,max:1/0}],{width:m}=window.screen,b=y.findIndex(B=>m>=B.min&&m<=B.max);y.forEach((B,x)=>{!h&&x>=b&&(h=c.value[B.screen])})}return h||s.value}),g=e.computed(()=>o.value&&!!l.value);return{isOpen:a,displayInputClasses:f,inputSize:u,isShowingErrorIcon:g,clearTextSelection:(h=!1)=>{n.value="",h&&(a.value=!1)},toggleOpen:d}}function Wt(t,i,l,o){const n=e.computed(()=>{var a;return!i.value&&(!!l.value||l.value===0)||i.value&&!!((a=l.value)!=null&&a.length)}),r=e.computed(()=>{var a;return!i.value&&(!!o.value||o.value===0)||i.value&&!!((a=o.value)!=null&&a.length)}),s=()=>{var d,f;if(!n.value)return;const a=i.value?(d=l.value)==null?void 0:d.map(u=>u.result):(f=l.value)==null?void 0:f.result;return JSON.stringify(o.value)===JSON.stringify(a)};return{hasActiveModelValue:n,hasActiveResultValue:r,isSameResultValues:s,updateResultFromValues:()=>{var a,d;s()||t("update:result",i.value?(a=l.value)==null?void 0:a.map(f=>f.result).filter(f=>!!f):(d=l.value)==null?void 0:d.result)}}}function Ut(t,i){const l=e.ref(),o=d=>!d&&d!==0,n=d=>typeof d=="object",r=d=>n(d)?d==null?void 0:d.text:d,s=d=>typeof d=="object"?d.result:d;return{isInvalidVal:o,emitModelValues:d=>{let f=d;Array.isArray(d)&&n(d[0])?f=d.map(u=>s(u)):!Array.isArray(d)&&n(d)&&(f=s(d)),t("update:result",f),t("update:modelValue",d),l.value=d,i?d&&t("on-selected",d):t("change",d)},checkIsValidOption:(d,f)=>{if(!o(d))return f.some(u=>JSON.stringify(u)===JSON.stringify(d))},getCurrOptionValue:r,activeOption:l}}function Jt(t,i,l){const{handleBlur:o}=et(),n=e.ref({top:"",left:"-10000px"}),r=e.ref(""),s=e.ref(!1),c=()=>{if(!l.value)return;const d=new IntersectionObserver(f=>{const u=f[0].boundingClientRect;r.value=Math.trunc(u.width)+"px",n.value.top=Math.trunc(u.top+document.documentElement.scrollTop+u.height)+"px",n.value.left=Math.trunc(u.left)+"px",e.nextTick(()=>{var y;const{top:g,bottom:T}=(y=t.value.closest("dialog"))==null?void 0:y.getBoundingClientRect();u.top>=g&&u.top<=T||u.bottom>=g&&u.bottom<=T||(l.value&&(l.value=!1),e.nextTick(()=>o()))}),d.disconnect()},{threshold:1});d.observe(i.value)},a=()=>{var d,f;if(s.value=!!((d=t.value)!=null&&d.closest("dialog")),s.value){const u=(f=t.value)==null?void 0:f.closest(".qst-modal__content");u&&u.addEventListener("scroll",c)}};return e.onMounted(()=>e.nextTick(()=>a())),e.onBeforeUnmount(()=>{var f;const d=(f=t.value)==null?void 0:f.closest(".qst-modal__content");d&&d.removeEventListener("scroll",c)}),{position:n,dropdownWidth:r,isTeleporting:s,calculateDropdownPosition:c}}const mn={class:"autocomplete-inner__container"},gn={key:1,class:"autocomplete-input__wrapper"},Kt=F({__name:"QstAutocomplete",props:{multiSelect:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Whether only a single or multiple options can be selected."},src:{type:Array,required:!1,tsType:"string[], number[], AutocompleteProp[]",description:"The source of the autocomplete options to be displayed. Types can be string[], number[], AutocompleteProp[] (AutocompleteProp: {id?: (number, string, boolean), text: string, result?: any, subtext?: string, leftImage?: string, searchData?: {label: string, value: (string, number)}[], disabled?: boolean, disabledReason?: string}). *When using AutocompleteProp[], the text field is required.*"},autocompleteEndpoint:{type:String,required:!1,tsType:"string",description:"Endpoint URL for the autocomplete. If the src prop is not set, the autocomplete will use the endpoint to fetch the data."},modelValue:{type:[Object,Array,String,Number],required:!1,default:null,tsType:"Array, String, Number, AutocompleteProp",description:"Used for v-model, will be set to the active autocomplete value. *(For multiselect, v-model must be set to an array)*"},result:{type:[Object,Array,String,Number],required:!1,default:null,tsType:"Array, String, Number, AutocompleteProp",description:"Used for v-model:result, value will be the *result* property of AutocompleteProp."},query:{type:[String,Number],required:!1,default:null,description:"Used for v-model:query, value will be the searched text in the input."},size:{type:String,required:!1,default:"14px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},dynamicSizes:{type:Object,required:!1,default:null,tsType:"object as {[screenSize]: [size: string]}",description:"Any screen size defined will target that screen size and below (ex/ {xl: '10px'} will change to 10px on max-width: 1549px). Screen sizes larger than what is defined will use the normal props.size. Use dynamicSizes when the dropdown is being teleported to update the dropdown's size as well."},color:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The accent color, used for details within the component."},width:{type:String,required:!1,default:"100%",tsType:"string",description:"The width of the autocomplete."},useEditMode:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Whether the input should be editable or not."},showLabelOnEditMode:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Shows a label when in edit mode."},placeholder:{type:[String,Number],required:!1,default:"Search",tsType:"string | number",description:"Placeholder for input."},disabled:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Disables the autocomplete, will show grayed out and unusable."},disabledReason:{type:String,required:!1,default:"",tsType:"string",description:"When the input is disabled, hovering over the input will show a tooltip with the disabled reason. *(This is only for the top autocomplete input. To set on an individual dropdown option, set disabledReason property on the option. (AutocompleteProp))*"},disabledTooltipPosition:{type:String,required:!1,default:"right",tsType:"string",description:"Tooltip position for showing an option's disabled reason. Applies to both top level input and/or the dropdown option's disabled tooltips."},numExpandedOptions:{type:Number,required:!1,default:3,tsType:"number",description:"Number of options to show before showing '+X options selected' tooltip."},hideSelectedOptions:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Hides the currently selected options from dropdown. (multiselect only)"},minChars:{type:Number,required:!1,default:0,tsType:"number",description:"Number of characters required in the input for the dropdown to show the filtered search results. (single select only)"},error:{type:String,required:!1,default:null,tsType:"string",description:"Sets the error message."},clearAfterSelecting:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"After selecting a dropdown option, the value will be cleared from the top input."},isLoadingOptions:{type:Boolean,required:!1,default:null,tsType:"boolean",description:"Set to loading value when loading options from an endpoint. *(Overrides loader in dropdown)*"},dropdownHeight:{type:String,required:!1,default:"350px",tsType:"string",description:"The height for the autocomplete menu dropdown."},closeMultiSelectAfterSelecting:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"After selecting an option, closes the autocomplete menu dropdown. *(multiselect only)*"},zoomedOut:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Zooms out autocomplete dropdown to 80% for laptop devices."},showErrorBelow:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Shows the error message at the bottom of the input."},allowOpenInput:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Allows the user to search for any value, regardless of the dropdown options. Emits the value using 'autocomplete-search-query'."},boldMatchingSearchValues:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"The matching portion of each option will be bolded based on the search value."},showExtendedResults:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Shows a link at the bottom of the dropdown to view all results in a modal."},useMagnifyIcon:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Adds a magnifying glass icon to the right of the autocomplete, clicking will submit the search value."},useErrorIcon:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"An error icon will be displayed on the right of the autocomplete, hovering over will show a tooltip with the error message."},useClearIcon:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Adds X icon to the right of the autocomplete, clicking it clears the v-model value. Overrides any other previously set icons."},icon:{type:String,required:!1,default:"",tsType:"string",description:"Any Iconify value, will be displayed on the right of the autocomplete."},tooltip:{type:[String,Object],required:!1,default:null,tsType:"string | {content: string, isHelpMode?: boolean, offset?: object, width?: number}",description:"Shows a tooltip dropdown when hovering over the input. Set to a string or object, based on if tooltip props are needed. *(ex/ offset, width, position, etc)* Tooltip is displayed inside the autocomplete, width and offset will default to match input dimensions."},darkMode:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Changes the styles to a dark theme."}},emits:["update:modelValue","update:result","update:query","on-selected","autocomplete-search-query"],setup(t,{expose:i,emit:l}){e.useCssVars(p=>({"4318c48e":t.color,"8e8a82d4":e.unref(q)}));const o=t,n=l,{modelValue:r,result:s,multiSelect:c,disabled:a,error:d,useErrorIcon:f,darkMode:u,size:g,dynamicSizes:T}=e.toRefs(o),h=e.ref(),y=e.ref(),m=e.ref(),b=e.ref(),B=e.ref(),x=e.computed(()=>{var p,w;return!!((p=oe.value)!=null&&p.length)||o.multiSelect&&!!((w=ze.value)!=null&&w.length)}),{isOpen:k,displayInputClasses:v,inputSize:q,isShowingErrorIcon:M,clearTextSelection:P,toggleOpen:L}=Qt(c,a,d,f,h,u,g,T),{isFocused:E,isTabFocused:O,focusSelectInput:Q,handleBlur:U}=et(k,c,b,B),{isInvalidVal:J,emitModelValues:H,checkIsValidOption:K,getCurrOptionValue:V,activeOption:C}=Ut(n,!0),{hasActiveModelValue:$,hasActiveResultValue:j,isSameResultValues:ee,updateResultFromValues:S}=Wt(n,c,r,s),{position:A,dropdownWidth:z,isTeleporting:G,calculateDropdownPosition:le}=Jt(m,y,k),{multiSelectOptions:ze,multiSelectActiveIds:Ne,multiSelectActiveValues:ye,setActiveMultiSelectIds:be,assignMultiSelectValuesAndIds:Me}=Ht(n,r,x),se=()=>{var w;const p=!J(V(o.modelValue));!o.clearAfterSelecting&&!o.multiSelect&&p&&(h.value=((w=o.modelValue)==null?void 0:w.text)||o.modelValue)},Oe=e.ref(),we=()=>{o.multiSelect||H(""),G.value||(k.value=!0),Q()};e.watch(k,()=>{k.value&&G.value&&le(),!(!o.multiSelect&&!o.clearAfterSelecting&&!k.value)&&Q()});const $e=()=>{o.useMagnifyIcon&&(E.value=!0,ce())},De=p=>{var w;p.key==="Escape"&&P(!0),(p.key==="Tab"||p.key==="ArrowDown")&&(p.key==="ArrowDown"&&(k.value=!0),k.value&&((w=B.value)==null||w.focusFirstOption()),p.preventDefault())},ke=p=>{ot(p),lt(p)},ot=p=>{!y.value.contains(p.target)&&k.value&&(k.value=o.multiSelect?!o.closeMultiSelectAfterSelecting:!1)},lt=p=>{var D;const w=Oe.value.contains(p.target),N=B.value.$el.contains(p.target);!w&&!N&&(k.value&&(k.value=!1),!o.clearAfterSelecting&&!o.allowOpenInput&&(h.value=((D=o.modelValue)==null?void 0:D.searchVal)??""),se(),e.nextTick(()=>U()))},Pe=e.computed(()=>{var Y;if(!o.multiSelect||!o.tooltip)return;const{tooltip:p}=o,w=p.width||(m.value?parseInt((Y=getComputedStyle(m.value))==null?void 0:Y.width):null),N=-.4*parseInt(o.size);return{...typeof p=="string"?{content:p}:{...p,helpMode:p.isHelpMode},width:w,offset:p.offset||{x:-(N+w/2-10),y:0}}});i({focusSelectInput:Q});const oe=e.ref([]),Z=e.computed(()=>{var p;return o.multiSelect||(((p=h.value)==null?void 0:p.toString().length)||0)>=o.minChars}),ie=p=>oe.value.find(w=>w.id&&(p.id||p.id===0)?w.id===p.id:p!=null&&p.text?(w.text||w)===p.text:p!=null&&p.result||(p==null?void 0:p.result)===0?w.result===p.result:w===p),nt=(p,w)=>{B.value.clearDropdownInput(o.closeMultiSelectAfterSelecting);let N=Array.isArray(o.modelValue)?[...o.modelValue]:[];const D=N.find(Y=>JSON.stringify(Y)===JSON.stringify(w));D?N.splice(N.indexOf(D),1):J(w)?N.splice(N.indexOf(p),1):N.push(w),B.value.focusMultiSelectInput(),H(N)},de=p=>{if(o.disabled)return;h.value="";const w=ie(p);k.value=o.multiSelect&&!o.closeMultiSelectAfterSelecting,o.multiSelect?nt(p,w):(o.clearAfterSelecting||(h.value=V(w)),H(w))},ce=(p="")=>{var D;if(!((D=o.modelValue)!=null&&D.searchVal)&&(!E.value||J(h.value)&&!p))return;const w=h.value||p,N=B.value.autocompleteResults[0];if(o.allowOpenInput||J(N))return Se(w);o.multiSelect?de(N):H(N),P(!o.multiSelect||o.multiSelect&&o.closeMultiSelectAfterSelecting),o.multiSelect||U()},Se=p=>{(!x.value||o.allowOpenInput)&&p&&(n("autocomplete-search-query",p),o.multiSelect||(n("on-selected",{searchVal:p}),n("update:modelValue",{searchVal:p}),n("update:result","")),k.value=!1,o.clearAfterSelecting&&P(!o.multiSelect||o.multiSelect&&o.closeMultiSelectAfterSelecting))},Te=e.ref(!1);e.watch(x,()=>{x.value&&(Te.value=!0,je())});const Le=()=>{K(o.modelValue,oe.value)||!x.value?(C.value=o.modelValue,se()):(C.value="",h.value="",H(ie(o.modelValue)))};e.watch(()=>o.modelValue,()=>{var p,w,N;if(!((p=o.modelValue)!=null&&p.searchVal)){if(o.multiSelect){if(!x.value)return;if(Ne.value=[],!(Array.isArray(o.modelValue)&&((w=o.modelValue)==null?void 0:w.every(Y=>K(Y,oe.value))))){const Y=(N=o.modelValue)==null?void 0:N.map(X=>ie(X)).filter(X=>!!X);return H(Y)}be()}else{if(!!C.value&&o.modelValue===C.value&&h.value||J(o.modelValue)){J(o.modelValue)&&(h.value&&(h.value=""),o.result&&n("update:result",""));return}Le()}S()}});const je=()=>{if(x.value)if($.value){const p=o.multiSelect?o.modelValue.map(w=>ie(w)).filter(w=>!!w):ie(o.modelValue);H(p),se()}else j.value&&Ve();else o.multiSelect||se()},it=()=>{var p;(p=o.src)!=null&&p.length&&(oe.value=re(o.src)),o.multiSelect&&oe.value.length&&Me(oe.value)},Ve=()=>{if(!j.value||ee())return;let p;if(o.multiSelect?p=o.result.map(w=>ze.value.find(N=>{if(N.result)return JSON.stringify(N.result)===JSON.stringify(w)})).filter(w=>!!w):p=oe.value.find(w=>JSON.stringify(w.result)===JSON.stringify(o.result)),!p||Array.isArray(p)&&!p.length){const w=o.multiSelect?[]:"";$.value?(!o.multiSelect||o.multiSelect&&o.result.length===1&&!o.modelValue.map(N=>N.result).includes(o.result[0]))&&n("update:modelValue",w):n("update:result",w);return}n("update:modelValue",p),n("on-selected",p)};e.watch(()=>o.result,()=>Ve()),e.watch(h,()=>{h.value!==o.query&&n("update:query",h.value)}),e.watch(()=>o.query,()=>{!o.multiSelect&&o.query!==h.value&&(h.value=o.query)});const I=e.computed(()=>{if(!(!o.multiSelect||!B.value))return B.value.dropdownSearchValue});return e.watch(I,()=>{I.value!==o.query&&n("update:query",I.value)}),e.onMounted(()=>{it(),je(),document.addEventListener("click",ke)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",ke)}),e.watchEffect(()=>{var p,w;oe.value=((p=B.value)==null?void 0:p.autocompleteData)??[],!(!oe.value.length||!Te.value)&&((w=o.modelValue)!=null&&w.searchVal&&ce(),o.multiSelect&&Me(oe.value),Te.value=!1)}),(p,w)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({fontSize:e.unref(q),width:t.width}),ref_key:"wrapperEl",ref:m,class:e.normalizeClass([{"width--override":!!t.width},"inline-block"])},[e.createElementVNode("div",{ref_key:"autocompleteContainerEl",ref:Oe,tabindex:"0",onFocus:w[8]||(w[8]=N=>O.value=!0),onBlur:w[9]||(w[9]=N=>e.unref(U)(!0)),class:e.normalizeClass([{"single-select":!e.unref(c)},"autocomplete-container"])},[e.createVNode(Ie,{"use-edit-mode":t.useEditMode,value:e.unref(r),label:t.placeholder,"show-label-on-edit-mode":t.showLabelOnEditMode},{"view-mode":e.withCtx(()=>[e.renderSlot(p.$slots,"view-mode",{},void 0,!0)]),default:e.withCtx(()=>{var N,D,Y,X;return[e.createElementVNode("div",mn,[e.createElementVNode("div",{ref_key:"displayInputEl",ref:y,onClick:w[4]||(w[4]=(..._)=>e.unref(L)&&e.unref(L)(..._)),tabindex:"-1",style:e.normalizeStyle({fontSize:e.unref(q)}),class:e.normalizeClass([e.unref(v),{focused:e.unref(E)}])},[e.unref(c)?(e.openBlock(),e.createBlock(Rt,{key:0,onOnToggleActive:de,size:e.unref(q),color:t.color,icon:t.icon,placeholder:t.placeholder,tooltip:Pe.value,"active-values":e.unref(ye),"show-active-values":!!((N=e.unref(ye))!=null&&N.length),"num-expanded-options":t.numExpandedOptions,"disabled-config":{disabled:e.unref(a),disabledReason:t.disabledReason,disabledTooltipPosition:t.disabledTooltipPosition},error:e.unref(d),"use-error-icon":e.unref(M),class:e.normalizeClass({"input-error--bottom":t.showErrorBelow})},null,8,["size","color","icon","placeholder","tooltip","active-values","show-active-values","num-expanded-options","disabled-config","error","use-error-icon","class"])):(e.openBlock(),e.createElementBlock("div",gn,[e.createVNode(ne,{ref_key:"qstInputEl",ref:b,modelValue:h.value,"onUpdate:modelValue":w[0]||(w[0]=_=>h.value=_),placeholder:t.placeholder,color:t.color,"hide-image":h.value!==((D=e.unref(r))==null?void 0:D.text),image:(Y=e.unref(r))!=null&&Y.leftImage&&!t.clearAfterSelecting?(X=e.unref(r))==null?void 0:X.leftImage:"",autocomplete:"off",size:e.unref(q),disabled:e.unref(a),"disabled-reason":t.disabledReason,"disabled-tooltip-position":t.disabledTooltipPosition,error:e.unref(d),"use-error-icon":e.unref(f),"show-error-below":t.showErrorBelow,icon:t.useMagnifyIcon?"akar-icons:search":t.icon,tooltip:t.tooltip,"dark-mode":e.unref(u),"use-clear-icon":t.useClearIcon&&!t.useMagnifyIcon&&!e.unref(J)(h.value)&&!e.unref(M),onOnInputClear:we,onKeydown:De,onOnEnter:w[1]||(w[1]=_=>ce()),onOnIconClick:$e,onBlur:w[2]||(w[2]=_=>e.unref(U)()),onInput:w[3]||(w[3]=_=>k.value=!0)},null,8,["modelValue","placeholder","color","hide-image","image","size","disabled","disabled-reason","disabled-tooltip-position","error","use-error-icon","show-error-below","icon","tooltip","dark-mode","use-clear-icon"])]))],6),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(G)?jt:"div"),{to:e.unref(G)?"#app":""},{default:e.withCtx(()=>{var _;return[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass({"zoom-out":t.zoomedOut})},[e.createVNode(Ft,{ref_key:"autocompleteMenuEl",ref:B,modelValue:e.unref(k),"onUpdate:modelValue":w[5]||(w[5]=rt=>e.isRef(k)?k.value=rt:null),"use-autocomplete":"",src:t.src,width:e.unref(z)||"100%",position:e.unref(G)?e.unref(A):null,"multi-select":e.unref(c),"disable-dropdown-input":e.unref(a),"hide-selected-options":t.hideSelectedOptions,"autocomplete-endpoint":t.autocompleteEndpoint,"search-term":h.value,height:t.dropdownHeight,size:e.unref(q),color:t.color,"dark-mode":e.unref(u),"active-value":e.unref(r),"is-input-focused":e.unref(E),"show-active-icon":!t.clearAfterSelecting,"min-chars":e.unref(c)?0:t.minChars,"is-loading-options":t.isLoadingOptions,"input-id":((_=b.value)==null?void 0:_.id)??"","disabled-tooltip-position":t.disabledTooltipPosition,"bold-matching-search-values":t.boldMatchingSearchValues,"show-extended-results":t.showExtendedResults,"onUpdate:item":de,onOnEnter:ce,onOnDropdownFocus:w[6]||(w[6]=rt=>E.value=!0),onBlur:w[7]||(w[7]=rt=>e.unref(U)())},{"no-results-msg":e.withCtx(()=>[e.renderSlot(p.$slots,"no-results-msg",{},void 0,!0)]),_:3},8,["modelValue","src","width","position","multi-select","disable-dropdown-input","hide-selected-options","autocomplete-endpoint","search-term","height","size","color","dark-mode","active-value","is-input-focused","show-active-icon","min-chars","is-loading-options","input-id","disabled-tooltip-position","bold-matching-search-values","show-extended-results"])],2),[[e.vShow,Z.value]])]}),_:3},8,["to"]))])]}),_:3},8,["use-edit-mode","value","label","show-label-on-edit-mode"])],34)],6))}},[["__scopeId","data-v-94830ba8"]]),yn={class:"input-row"},bn={class:"input-row"},wn={class:"input-row"},Gt=F({__name:"QstAddressAutocomplete",props:{modelValue:{type:Object,default:null,tsType:"object",description:"The selected address. The object will be set with the following properties: {AddressLine1: string, AddressLine2: string, City: string, State: string, ZipCode: string, Country: string}."},apiKey:{type:String,required:!0,tsType:"string",description:"The API key to use for the google maps API."},useColumn:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"The address form will use a column layout instead of the default row."},required:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Whether the inputs are required for the user."},useEditMode:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Whether the input should be editable or not."},errors:{type:Object,required:!1,default:()=>({contact:"",address1:"",city:"",state:"",zip:"",country:""}),tsType:"object",description:"The errors for each of the address inputs."},size:{type:String,required:!1,default:"14px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},color:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The accent color, used for details within the component."},darkMode:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Changes the styles to a dark theme."}},emits:["update:modelValue"],setup(t,{emit:i}){const l=t,o=i,n=e.ref(),r=e.ref(),s=e.computed(()=>`https://maps.googleapis.com/maps/api/js?key=${l.apiKey}&libraries=places`),c=()=>{let h=document.querySelector("#google-maps-script");h||(h=document.createElement("script"),h.setAttribute("src",s.value),h.setAttribute("id","google-maps-script"),document.head.appendChild(h)),h.addEventListener("load",()=>a())},a=()=>{const h=n.value.querySelector("input");r.value=new google.maps.places.Autocomplete(h,{types:["geocode"]}),r.value.setFields(["address_component","formatted_address"]),r.value.addListener("place_changed",f)},d=()=>{navigator.geolocation&&navigator.geolocation.getCurrentPosition(h=>{const{latitude:y,longitude:m,accuracy:b}=h.coords;let B={lat:y,lng:m},x=new google.maps.Circle({...B,radius:b});r.value.setBounds(x.getBounds())})};e.onMounted(()=>{window.google?a():c()});const f=()=>{const h=r.value.getPlace();let y="",m="",b="";const B=[];u.value=h.address_components.reduce((x,k)=>{const v=k.types[0],q=k.long_name;return v==="street_number"?B[0]=q:v==="route"&&(B[1]=q),v==="neighborhood"?b=q:v==="sublocality_level_1"?m=q:v==="locality"&&(y=q),x[v]=q,x},{}),u.value.street_name=B.join(" "),u.value.city=b||m||y,u.value.formatted_address=h.formatted_address},u=e.ref({}),g=e.computed(()=>{if(u.value)return{AddressLine1:(u.value.street_name||u.value.premise)??"",AddressLine2:u.value.apartment??"",City:u.value.city??"",State:u.value.administrative_area_level_1??"",ZipCode:u.value.postal_code??"",Country:u.value.country??""}}),T=()=>{if(!l.modelValue)return{};const h=re(l.modelValue);return{street_name:h.AddressLine1??"",city:h.City??"",administrative_area_level_1:h.State??"",country:h.Country??"",postal_code:h.ZipCode??"",apartment:h.AddressLine2??""}};return e.watch(g,()=>{JSON.stringify(l.modelValue)!==JSON.stringify(g.value)&&o("update:modelValue",g.value)},{deep:!0}),e.watch(()=>l.modelValue,()=>{JSON.stringify(g.value)!==JSON.stringify(l.modelValue)&&(u.value=T())},{immediate:!0,deep:!0}),(h,y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([{"layout--col":t.useColumn},"address-form"])},[e.createElementVNode("div",{ref_key:"autocompleteEl",ref:n,class:"input-row"},[e.createVNode(ne,{modelValue:u.value.street_name,"onUpdate:modelValue":y[0]||(y[0]=m=>u.value.street_name=m),onFocus:y[1]||(y[1]=m=>d()),required:t.required,error:t.errors.address1,"use-edit-mode":t.useEditMode,size:t.size,color:t.color,"dark-mode":t.darkMode,placeholder:"Address",width:"100%"},null,8,["modelValue","required","error","use-edit-mode","size","color","dark-mode"])],512),e.createElementVNode("div",yn,[e.createVNode(ne,{modelValue:u.value.apartment,"onUpdate:modelValue":y[2]||(y[2]=m=>u.value.apartment=m),required:!1,"use-edit-mode":t.useEditMode,size:t.size,color:t.color,"dark-mode":t.darkMode,placeholder:"Apartment, suite, etc. (optional)",width:"100%"},null,8,["modelValue","use-edit-mode","size","color","dark-mode"]),e.createVNode(ne,{modelValue:u.value.city,"onUpdate:modelValue":y[3]||(y[3]=m=>u.value.city=m),required:t.required,error:t.errors.city,"use-edit-mode":t.useEditMode,size:t.size,color:t.color,"dark-mode":t.darkMode,placeholder:"City",width:"100%"},null,8,["modelValue","required","error","use-edit-mode","size","color","dark-mode"])]),e.createElementVNode("div",bn,[e.createVNode(ne,{modelValue:u.value.administrative_area_level_1,"onUpdate:modelValue":y[4]||(y[4]=m=>u.value.administrative_area_level_1=m),required:t.required,error:t.errors.state,"use-edit-mode":t.useEditMode,size:t.size,color:t.color,"dark-mode":t.darkMode,placeholder:"State",width:"100%"},null,8,["modelValue","required","error","use-edit-mode","size","color","dark-mode"]),e.createVNode(ne,{modelValue:u.value.postal_code,"onUpdate:modelValue":y[5]||(y[5]=m=>u.value.postal_code=m),required:t.required,error:t.errors.zip,"use-edit-mode":t.useEditMode,size:t.size,color:t.color,"dark-mode":t.darkMode,placeholder:"Zip code",width:"100%"},null,8,["modelValue","required","error","use-edit-mode","size","color","dark-mode"])]),e.createElementVNode("div",wn,[e.createVNode(ne,{modelValue:u.value.country,"onUpdate:modelValue":y[6]||(y[6]=m=>u.value.country=m),required:t.required,error:t.errors.country,"use-edit-mode":t.useEditMode,size:t.size,color:t.color,"dark-mode":t.darkMode,placeholder:"Country",width:"100%"},null,8,["modelValue","required","error","use-edit-mode","size","color","dark-mode"])])],2))}},[["__scopeId","data-v-29125fcb"]]),kn={class:"select-inner__container"},Sn={key:0,class:"select-label dark-fonts"},Yt=F({__name:"QstSelect",props:{multiSelect:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Whether only a single or multiple options can be selected."},options:{type:Array,required:!1,default:()=>[],tsType:"string[], number[], AutocompleteProp[]",description:"The dropdown options to be displayed. Types can be string[], number[], AutocompleteProp[]. (AutocompleteProp: {id?: (number, string, boolean), text: string, result?: any, subtext?: string, leftImage?: string, searchData?: {label: string, value: (string, number)}[], disabled?: boolean, disabledReason?: string}). *When using AutocompleteProp[], the text field is required.*"},modelValue:{type:[Object,Array,String,Number],required:!1,default:null,tsType:"Array, String, Number, AutocompleteProp",description:"Used for v-model, will be set to the active select value. *(For multiselect, v-model must be set to an array)*"},result:{type:[Object,Array,String,Number],required:!1,default:null,tsType:"Array, String, Number, AutocompleteProp",description:"Used for v-model:result, value will be the *result* property of AutocompleteProp."},size:{type:String,required:!1,default:"14px",tsType:"string",description:"Pixel value to resize the component, styles are adjusted when the size is updated."},dynamicSizes:{type:Object,required:!1,default:null,tsType:"object as {[screenSize]: [size: string]}",description:"Any screen size defined will target that screen size and below (ex/ {xl: '10px'} will change to 10px on max-width: 1549px). Screen sizes larger than what is defined will use the normal props.size. Use dynamicSizes when the dropdown is being teleported to update dropdown's size as well."},color:{type:String,required:!1,default:"var(--primary-color)",tsType:"string",description:"The accent color, used for details within the component."},width:{type:String,required:!1,default:"",tsType:"string",description:"The width of the select and dropdown. If unset, the sizing will adjust to the size prop for single select or 100% for multiselect."},fullWidth:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Sets the select to be full-width and take up 100% of its parent container."},useEditMode:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Whether the input should be editable or not."},showLabelOnEditMode:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Shows a label when in edit mode."},placeholder:{type:[String,Number],required:!1,default:"Select",tsType:"string | number",description:"Placeholder for select input."},disabled:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Disables the select, will show grayed out and unusable."},disabledReason:{type:String,required:!1,default:"",tsType:"string",description:"When the input is disabled, hovering over the input will show a tooltip with the disabled reason. *(This is only for the top select input. To set on an individual dropdown option, set disabledReason property on the option. (AutocompleteProp))*"},disabledTooltipPosition:{type:String,required:!1,default:"right",tsType:"string",description:"Tooltip position for showing an option's disabled reason. Applies to both top level input and/or the dropdown option's disabled tooltips."},numExpandedOptions:{type:Number,required:!1,default:3,tsType:"number",description:"Number of options to show before showing '+X options selected' tooltip."},error:{type:String,required:!1,default:null,tsType:"string",description:"Sets the error message."},useErrorIcon:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"An error icon will be displayed on the right of the select, hovering over will show a tooltip with the error message."},showErrorBelow:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Shows error message at the bottom of the input."},sortAlphabetically:{type:Boolean,required:!1,default:!0,tsType:"boolean",description:"Whether or not to alphabetically sort the list of options in the dropdown."},isLoadingOptions:{type:Boolean,required:!1,default:null,tsType:"boolean",description:"Set to loading value when loading options from an endpoint. *(Overrides loader in dropdown)*"},defaultVal:{type:String,required:!1,default:"",tsType:"string",description:"A default value that will be added to the dropdown options as the first selected value. Selecting the default value will replace any active values."},dropdownHeight:{type:String,required:!1,default:"350px",tsType:"string",description:"The height for the dropdown."},closeMultiSelectAfterSelecting:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"After selecting an option, closes the dropdown. *(multiselect only)*"},icon:{type:String,required:!1,default:"",tsType:"string",description:"Any Iconify value, will be displayed to the right of the dropdown arrow."},tooltip:{type:[String,Object],required:!1,default:null,tsType:"string | {content: string, isHelpMode?: boolean, offset?: object, width?: number}",description:"Shows a tooltip dropdown when hovering over the input. Set to a string or object, based on if tooltip props are needed. *(ex/ offset, width, position, etc)* Tooltip is displayed inside the select, width and offset will default to match input dimensions."},useSelectAll:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Adds an option in the dropdown to select all options (multiselect only)"},darkMode:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Changes the styles to a dark theme."}},emits:["update:modelValue","update:result","change"],setup(t,{expose:i,emit:l}){e.useCssVars(I=>({"2e334459":t.color,e0ab3e3e:e.unref(M)}));const o=t,n=l,{modelValue:r,result:s,defaultVal:c,multiSelect:a,disabled:d,error:f,useErrorIcon:u,darkMode:g,size:T,dynamicSizes:h}=e.toRefs(o),y=e.ref(),m=e.ref(),b=e.ref(),B=e.ref(),x=e.ref(),k=e.computed(()=>{var p,w;const I=o.defaultVal?1:0;return((p=Z.value)==null?void 0:p.length)>I||o.multiSelect&&((w=Ne.value)==null?void 0:w.length)>I}),{isOpen:v,displayInputClasses:q,inputSize:M,isShowingErrorIcon:P,clearTextSelection:L,toggleOpen:E}=Qt(a,d,f,u,y,g,T,h),{isFocused:O,isTabFocused:Q,focusSelectInput:U,handleBlur:J}=et(v,a,b,B),{isInvalidVal:H,emitModelValues:K,checkIsValidOption:V,getCurrOptionValue:C,activeOption:$}=Ut(n,!1),{hasActiveModelValue:j,hasActiveResultValue:ee,isSameResultValues:S,updateResultFromValues:A}=Wt(n,a,r,s),{position:z,dropdownWidth:G,isTeleporting:le,calculateDropdownPosition:ze}=Jt(x,m,v),{multiSelectOptions:Ne,multiSelectActiveIds:ye,multiSelectActiveValues:be,setActiveMultiSelectIds:Me,assignMultiSelectValuesAndIds:se,assignMultiSelectDefaultVal:Oe}=Ht(n,r,k),we=e.ref(!1),$e=e.computed(()=>!H(C(o.modelValue))),De=e.computed(()=>{var I;if(o.multiSelect){if(!ye.value.length&&o.defaultVal&&((I=o.modelValue)!=null&&I.includes(o.defaultVal)))return o.defaultVal}else if($e.value&&!y.value){const p=C(o.modelValue);return we.value=!o.defaultVal||!!o.defaultVal&&p!==o.defaultVal,p}return we.value=!1,o.placeholder}),ke=e.ref(),ot=e.computed(()=>({fontSize:M.value,width:o.width?o.width:o.multiSelect||o.fullWidth?"100%":""}));e.watch(v,()=>{v.value&&le.value&&ze(),U()});const lt=I=>{var p;I.key==="Escape"?L(!0):(I.key==="ArrowDown"||I.key==="Tab")&&(I.key==="ArrowDown"&&(v.value=!0),v.value&&((p=B.value)==null||p.focusFirstOption()),I.preventDefault())},Pe=I=>{const p=ke.value.contains(I.target),w=B.value.$el.contains(I.target);!p&&!w&&(v.value&&(v.value=!1),y.value="",e.nextTick(()=>J()))},oe=e.computed(()=>{var D;if(!o.multiSelect||!o.tooltip)return;const{tooltip:I}=o,p=I.width||(x.value?parseInt((D=getComputedStyle(x.value))==null?void 0:D.width):null),w=-1.25*parseInt(o.size);return{...typeof I=="string"?{content:I}:{...I,helpMode:I.isHelpMode},width:p,offset:I.offset||{x:-(w+p/2-10),y:0}}}),Z=e.ref([]),ie=I=>{if(o.defaultVal&&I===o.defaultVal)return o.defaultVal;const p=!!o.defaultVal&&Z.value.length===1,N=(Z.value.length&&!p?Z.value:o.options).find(D=>D.id&&(I.id||I.id===0)?D.id===I.id:I.text?(D.text||D)===I.text:I.result||I.result===0?D.result===I.result:D===I);return H(N)&&!o.multiSelect&&o.defaultVal?o.defaultVal:N},nt=(I,p)=>{B.value.clearDropdownInput(o.closeMultiSelectAfterSelecting);let w=Array.isArray(o.modelValue)?[...o.modelValue]:[];o.defaultVal&&w.includes(o.defaultVal)&&(w=w.filter(D=>D!==o.defaultVal));const N=w.find(D=>JSON.stringify(D)===JSON.stringify(p));if(N)w.splice(w.indexOf(N),1);else if(H(p))w.splice(w.indexOf(I),1);else{if(o.defaultVal&&p===o.defaultVal)return K([o.defaultVal]);w.push(p)}B.value.focusMultiSelectInput(),!w.length&&o.defaultVal&&w.push(o.defaultVal),K(w)},de=I=>{if(o.disabled)return;y.value="";const p=ie(I);v.value=o.multiSelect&&!o.closeMultiSelectAfterSelecting,o.multiSelect?nt(I,p):(U(),K(p))},ce=I=>{K(I?Z.value:[])},Se=e.ref(!1);e.watch(k,()=>{k.value&&(Se.value=!0,Le())});const Te=()=>{V(o.modelValue,Z.value)||!k.value?$.value=o.modelValue:K(ie(o.modelValue))};e.watch(()=>o.modelValue,()=>{var I,p,w;if(o.multiSelect){if(!k.value)return;if(ye.value=[],o.defaultVal&&((I=o.modelValue)!=null&&I.includes(o.defaultVal)))return Oe(o.defaultVal);if(!(Array.isArray(o.modelValue)&&((p=o.modelValue)==null?void 0:p.every(D=>V(D,Z.value))))){const D=(w=o.modelValue)==null?void 0:w.map(Y=>ie(Y)).filter(Y=>!!Y);return!D.length&&o.defaultVal&&D.push(o.defaultVal),K(D)}Me()}else{if(!!$.value&&o.modelValue===$.value&&y.value||H(o.modelValue)){H(o.modelValue)&&o.result&&n("update:result","");return}if(o.defaultVal&&o.modelValue===o.defaultVal){$.value=o.defaultVal,o.result!==o.defaultVal&&n("update:result",o.defaultVal);return}Te()}A()});const Le=()=>{if(k.value)if(j.value){const I=o.multiSelect?o.modelValue.map(p=>ie(p)).filter(p=>!!p):ie(o.modelValue);K(I)}else ee.value&&Ve()},je=()=>{o.defaultVal&&!ee.value&&!j.value&&K(o.multiSelect?[o.defaultVal]:o.defaultVal)},it=()=>{o.options.length&&(Z.value=re(o.options)),o.multiSelect&&Z.value.length&&se(Z.value)},Ve=()=>{var w;const I=o.result===o.defaultVal||Array.isArray(o.result)&&((w=o.result)==null?void 0:w.includes(o.defaultVal));if(!ee.value||I){!j.value&&I&&n("update:modelValue",o.result);return}if(S())return;let p;if(o.multiSelect?p=o.result.map(N=>Ne.value.find(D=>{if(D.result)return JSON.stringify(D.result)===JSON.stringify(N)})).filter(N=>!!N):p=Z.value.find(N=>JSON.stringify(N.result)===JSON.stringify(o.result)),!p||Array.isArray(p)&&!p.length){let N;o.multiSelect?N=o.defaultVal?[o.defaultVal]:[]:N=o.defaultVal?o.defaultVal:"",!j.value||o.defaultVal&&o.modelValue===o.defaultVal?n("update:result",N):(!o.multiSelect||o.multiSelect&&o.result.length===1&&!o.modelValue.map(D=>D.result).includes(o.result[0]))&&n("update:modelValue",N);return}n("update:modelValue",p),n("change",p)};return e.watch(()=>o.result,()=>Ve()),e.onMounted(()=>{it(),Le(),je(),document.addEventListener("click",Pe)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",Pe)}),e.watchEffect(()=>{var p;Z.value=((p=B.value)==null?void 0:p.autocompleteData)??[];const I=o.multiSelect&&!!o.defaultVal&&Z.value.length===1;!Z.value.length||!Se.value||I||(o.multiSelect&&se(Z.value),Se.value=!1)}),i({toggleOpen:E}),(I,p)=>{var w;return e.openBlock(),e.createElementBlock("div",{ref_key:"wrapperEl",ref:x,style:e.normalizeStyle(ot.value),class:e.normalizeClass([{"width--override":e.unref(a)||t.fullWidth||!!t.width},"inline-block"])},[e.createElementVNode("div",{ref_key:"selectContainerEl",ref:ke,tabindex:"0",onFocus:p[11]||(p[11]=N=>Q.value=!0),onBlur:p[12]||(p[12]=N=>e.unref(J)(!0)),class:e.normalizeClass([{"single-select":!e.unref(a)},"select-container"])},[e.createVNode(Ie,{"use-edit-mode":t.useEditMode,value:((w=e.unref(r))==null?void 0:w.text)??e.unref(r),label:t.placeholder,"show-label-on-edit-mode":t.showLabelOnEditMode},{"view-mode":e.withCtx(()=>[e.renderSlot(I.$slots,"view-mode",{},void 0,!0)]),default:e.withCtx(()=>{var N,D,Y;return[e.createElementVNode("div",kn,[e.createElementVNode("div",{ref_key:"displayInputEl",ref:m,onClick:p[5]||(p[5]=(...X)=>e.unref(E)&&e.unref(E)(...X)),tabindex:"-1",style:e.normalizeStyle({fontSize:e.unref(M)}),class:e.normalizeClass([e.unref(q),{focused:e.unref(O),"info-tooltip--visible":!!t.tooltip&&!e.unref(P)}])},[$e.value?(e.openBlock(),e.createElementBlock("label",Sn,e.toDisplayString(t.placeholder),1)):e.createCommentVNode("",!0),e.unref(a)?(e.openBlock(),e.createBlock(Rt,{key:1,"use-select":"",size:e.unref(M),"active-values":e.unref(be),placeholder:De.value,"show-active-values":!!((N=e.unref(be))!=null&&N.length)&&!((D=e.unref(be))!=null&&D.includes(e.unref(c))),"disabled-config":{disabled:e.unref(d),disabledReason:t.disabledReason,disabledTooltipPosition:t.disabledTooltipPosition},"num-expanded-options":t.numExpandedOptions,error:e.unref(f),"show-error-icon":e.unref(P),icon:t.icon,tooltip:oe.value,onOnToggleActive:p[0]||(p[0]=X=>de(X)),class:e.normalizeClass({rotate:e.unref(v),"input-error--bottom":t.showErrorBelow})},null,8,["size","active-values","placeholder","show-active-values","disabled-config","num-expanded-options","error","show-error-icon","icon","tooltip","class"])):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass([{"active-placeholder":we.value},"select-input__wrapper"])},[e.createVNode(ne,{ref_key:"qstInputEl",ref:b,modelValue:y.value,"onUpdate:modelValue":p[1]||(p[1]=X=>y.value=X),placeholder:De.value,"hide-image":!!y.value,image:((Y=e.unref(r))==null?void 0:Y.leftImage)??"",autocomplete:"off",size:e.unref(M),color:t.color,"dark-mode":e.unref(g),disabled:e.unref(d),"disabled-reason":t.disabledReason,"disabled-tooltip-position":t.disabledTooltipPosition,"use-clear-icon":!e.unref(H)(y.value)&&!e.unref(P),icon:t.icon,tooltip:t.tooltip,error:e.unref(f),"use-error-icon":e.unref(u),"show-error-below":t.showErrorBelow,onOnInputClear:p[2]||(p[2]=X=>v.value=!1),onKeydown:lt,onBlur:p[3]||(p[3]=X=>e.unref(J)()),onInput:p[4]||(p[4]=X=>v.value=!0)},{"input-icon":e.withCtx(()=>[e.unref(H)(y.value)?(e.openBlock(),e.createBlock(W,{key:0,icon:"ep:arrow-down-bold",size:e.unref(M),class:e.normalizeClass([{rotate:e.unref(v)},"dropdown-arrow"])},null,8,["size","class"])):e.createCommentVNode("",!0)]),_:1},8,["modelValue","placeholder","hide-image","image","size","color","dark-mode","disabled","disabled-reason","disabled-tooltip-position","use-clear-icon","icon","tooltip","error","use-error-icon","show-error-below"])],2))],6),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(le)?jt:"div"),{to:e.unref(le)?"#app":""},{default:e.withCtx(()=>{var X;return[e.createVNode(Ft,{ref_key:"autocompleteMenuEl",ref:B,modelValue:e.unref(v),"onUpdate:modelValue":p[6]||(p[6]=_=>e.isRef(v)?v.value=_:null),src:t.options,"default-val":e.unref(c),width:e.unref(G)||"100%",position:e.unref(le)?e.unref(z):null,"multi-select":e.unref(a),"disable-dropdown-input":e.unref(d),"search-term":y.value,"max-height":t.dropdownHeight,size:e.unref(M),color:t.color,"dark-mode":e.unref(g),"active-value":e.unref(r),"is-input-focused":e.unref(O),"show-active-icon":"","sort-alphabetically":t.sortAlphabetically,"is-loading-options":t.isLoadingOptions,"input-id":((X=b.value)==null?void 0:X.id)??"","disabled-tooltip-position":t.disabledTooltipPosition,"use-select-all":t.useSelectAll,"onUpdate:item":p[7]||(p[7]=_=>de(_)),onOnSelectAll:p[8]||(p[8]=_=>ce(_)),onOnDropdownFocus:p[9]||(p[9]=_=>O.value=!0),onBlur:p[10]||(p[10]=_=>e.unref(J)())},{"no-results-msg":e.withCtx(()=>[e.renderSlot(I.$slots,"no-results-msg",{},void 0,!0)]),_:3},8,["modelValue","src","default-val","width","position","multi-select","disable-dropdown-input","search-term","max-height","size","color","dark-mode","active-value","is-input-focused","sort-alphabetically","is-loading-options","input-id","disabled-tooltip-position","use-select-all"])]}),_:3},8,["to"]))])]}),_:3},8,["use-edit-mode","value","label","show-label-on-edit-mode"])],34)],6)}}},[["__scopeId","data-v-ed836bf4"]]),tt={QstIcon:W,QstTooltip:te,QstInput:ne,QstButton:ge,QstModal:zt,QstLoader:Ae,QstDropdown:Nt,QstSwitch:Mt,QstScrollContainer:Ot,QstImg:he,QstTag:Xe,QstExpandableRow:$t,QstPanel:Dt,QstCheckbox:Ze,QstCheckboxGroup:Pt,QstRadio:_e,QstRadioGroup:Lt,QstAutocomplete:Kt,QstAddressAutocomplete:Gt,QstSelect:Yt};function Xt(t,i){i.forEach(l=>{tt[l]?t.component(l,tt[l]):console.warn(`Component ${l} not found.`)})}function Tn(t){Xt(t,Object.keys(tt))}R.QstAddressAutocomplete=Gt,R.QstAutocomplete=Kt,R.QstButton=ge,R.QstCheckbox=Ze,R.QstCheckboxGroup=Pt,R.QstDropdown=Nt,R.QstExpandableRow=$t,R.QstIcon=W,R.QstImg=he,R.QstInput=ne,R.QstLoader=Ae,R.QstModal=zt,R.QstPanel=Dt,R.QstRadio=_e,R.QstRadioGroup=Lt,R.QstScrollContainer=Ot,R.QstSelect=Yt,R.QstSwitch=Mt,R.QstTag=Xe,R.QstTooltip=te,R.install=Tn,R.installGlobalComponents=Xt,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
|