@speckle/ui-components 2.16.0 → 2.16.1-alpha1
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/dist/components/form/Switch.vue.d.ts +6 -0
- package/dist/components/form/select/Badges.vue.d.ts +64 -0
- package/dist/components/form/select/Base.vue.d.ts +27 -0
- package/dist/components/layout/Table.vue.d.ts +68 -0
- package/dist/helpers/common/validation.d.ts +2 -0
- package/dist/lib.cjs +2 -1
- package/dist/lib.cjs.map +1 -0
- package/dist/lib.d.ts +4 -1
- package/dist/lib.js +1336 -1151
- package/dist/lib.js.map +1 -0
- package/package.json +2 -2
- package/vite.config.ts +6 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
modelValue: import("vue").PropType<boolean>;
|
|
3
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
4
|
+
modelValue: import("vue").PropType<boolean>;
|
|
5
|
+
}>>, {}, {}>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
items: {
|
|
3
|
+
type: import("vue").PropType<any[]>;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
label: {
|
|
7
|
+
type: import("vue").PropType<string>;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
name: {
|
|
11
|
+
type: import("vue").PropType<string>;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
help: {
|
|
15
|
+
type: import("vue").PropType<string>;
|
|
16
|
+
};
|
|
17
|
+
modelValue: {
|
|
18
|
+
type: import("vue").PropType<any>;
|
|
19
|
+
};
|
|
20
|
+
multiple: {
|
|
21
|
+
type: import("vue").PropType<boolean>;
|
|
22
|
+
};
|
|
23
|
+
rules: {
|
|
24
|
+
type: import("vue").PropType<any[]>;
|
|
25
|
+
};
|
|
26
|
+
by: {
|
|
27
|
+
type: import("vue").PropType<string>;
|
|
28
|
+
required: true;
|
|
29
|
+
};
|
|
30
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
31
|
+
"update:modelValue": (val: any[]) => void;
|
|
32
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
33
|
+
items: {
|
|
34
|
+
type: import("vue").PropType<any[]>;
|
|
35
|
+
required: true;
|
|
36
|
+
};
|
|
37
|
+
label: {
|
|
38
|
+
type: import("vue").PropType<string>;
|
|
39
|
+
required: true;
|
|
40
|
+
};
|
|
41
|
+
name: {
|
|
42
|
+
type: import("vue").PropType<string>;
|
|
43
|
+
required: true;
|
|
44
|
+
};
|
|
45
|
+
help: {
|
|
46
|
+
type: import("vue").PropType<string>;
|
|
47
|
+
};
|
|
48
|
+
modelValue: {
|
|
49
|
+
type: import("vue").PropType<any>;
|
|
50
|
+
};
|
|
51
|
+
multiple: {
|
|
52
|
+
type: import("vue").PropType<boolean>;
|
|
53
|
+
};
|
|
54
|
+
rules: {
|
|
55
|
+
type: import("vue").PropType<any[]>;
|
|
56
|
+
};
|
|
57
|
+
by: {
|
|
58
|
+
type: import("vue").PropType<string>;
|
|
59
|
+
required: true;
|
|
60
|
+
};
|
|
61
|
+
}>> & {
|
|
62
|
+
"onUpdate:modelValue"?: ((val: any[]) => any) | undefined;
|
|
63
|
+
}, {}, {}>;
|
|
64
|
+
export default _default;
|
|
@@ -59,6 +59,12 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
59
59
|
type: StringConstructor;
|
|
60
60
|
required: true;
|
|
61
61
|
};
|
|
62
|
+
/**
|
|
63
|
+
* Optional text that replaces the label as the placeholder when set.
|
|
64
|
+
*/
|
|
65
|
+
placeholder: {
|
|
66
|
+
type: StringConstructor;
|
|
67
|
+
};
|
|
62
68
|
/**
|
|
63
69
|
* Whether to show the label visually
|
|
64
70
|
*/
|
|
@@ -146,6 +152,13 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
146
152
|
type: BooleanConstructor;
|
|
147
153
|
default: boolean;
|
|
148
154
|
};
|
|
155
|
+
/**
|
|
156
|
+
* Whether to show the red "required" asterisk
|
|
157
|
+
*/
|
|
158
|
+
showRequired: {
|
|
159
|
+
type: BooleanConstructor;
|
|
160
|
+
default: boolean;
|
|
161
|
+
};
|
|
149
162
|
}, {
|
|
150
163
|
triggerSearch: () => Promise<void>;
|
|
151
164
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -207,6 +220,12 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
207
220
|
type: StringConstructor;
|
|
208
221
|
required: true;
|
|
209
222
|
};
|
|
223
|
+
/**
|
|
224
|
+
* Optional text that replaces the label as the placeholder when set.
|
|
225
|
+
*/
|
|
226
|
+
placeholder: {
|
|
227
|
+
type: StringConstructor;
|
|
228
|
+
};
|
|
210
229
|
/**
|
|
211
230
|
* Whether to show the label visually
|
|
212
231
|
*/
|
|
@@ -294,6 +313,13 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
294
313
|
type: BooleanConstructor;
|
|
295
314
|
default: boolean;
|
|
296
315
|
};
|
|
316
|
+
/**
|
|
317
|
+
* Whether to show the red "required" asterisk
|
|
318
|
+
*/
|
|
319
|
+
showRequired: {
|
|
320
|
+
type: BooleanConstructor;
|
|
321
|
+
default: boolean;
|
|
322
|
+
};
|
|
297
323
|
}>> & {
|
|
298
324
|
"onUpdate:modelValue"?: ((v: any) => any) | undefined;
|
|
299
325
|
}, {
|
|
@@ -302,6 +328,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
302
328
|
modelValue: any;
|
|
303
329
|
rules: RuleExpression<any>;
|
|
304
330
|
validateOnMount: boolean;
|
|
331
|
+
showRequired: boolean;
|
|
305
332
|
validateOnValueUpdate: boolean;
|
|
306
333
|
multiple: boolean;
|
|
307
334
|
help: Optional<string>;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { ConcreteComponent } from 'vue';
|
|
2
|
+
export type TableColumn<I> = {
|
|
3
|
+
id: I;
|
|
4
|
+
header: string;
|
|
5
|
+
classes: string;
|
|
6
|
+
};
|
|
7
|
+
export interface RowButton<T = unknown> {
|
|
8
|
+
icon: ConcreteComponent;
|
|
9
|
+
label: string;
|
|
10
|
+
action: (item: T) => void;
|
|
11
|
+
class: string;
|
|
12
|
+
}
|
|
13
|
+
declare const _default: <T extends {
|
|
14
|
+
id: string;
|
|
15
|
+
}, C extends string>(__VLS_props: {
|
|
16
|
+
items: T[];
|
|
17
|
+
buttons?: RowButton<T>[] | undefined;
|
|
18
|
+
columns: TableColumn<C>[];
|
|
19
|
+
overflowCells?: boolean | undefined;
|
|
20
|
+
onRowClick?: ((item: T) => void) | undefined;
|
|
21
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, __VLS_ctx?: Pick<{
|
|
22
|
+
props: {
|
|
23
|
+
items: T[];
|
|
24
|
+
buttons?: RowButton<T>[] | undefined;
|
|
25
|
+
columns: TableColumn<C>[];
|
|
26
|
+
overflowCells?: boolean | undefined;
|
|
27
|
+
onRowClick?: ((item: T) => void) | undefined;
|
|
28
|
+
};
|
|
29
|
+
expose(exposed: {}): void;
|
|
30
|
+
attrs: any;
|
|
31
|
+
slots: Partial<Record<NonNullable<C>, (_: {
|
|
32
|
+
item: T;
|
|
33
|
+
}) => any>>;
|
|
34
|
+
emit: any;
|
|
35
|
+
}, "attrs" | "slots" | "emit"> | undefined, __VLS_setup?: Promise<{
|
|
36
|
+
props: {
|
|
37
|
+
items: T[];
|
|
38
|
+
buttons?: RowButton<T>[] | undefined;
|
|
39
|
+
columns: TableColumn<C>[];
|
|
40
|
+
overflowCells?: boolean | undefined;
|
|
41
|
+
onRowClick?: ((item: T) => void) | undefined;
|
|
42
|
+
};
|
|
43
|
+
expose(exposed: {}): void;
|
|
44
|
+
attrs: any;
|
|
45
|
+
slots: Partial<Record<NonNullable<C>, (_: {
|
|
46
|
+
item: T;
|
|
47
|
+
}) => any>>;
|
|
48
|
+
emit: any;
|
|
49
|
+
}>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
50
|
+
[key: string]: any;
|
|
51
|
+
}> & {
|
|
52
|
+
__ctx?: {
|
|
53
|
+
props: {
|
|
54
|
+
items: T[];
|
|
55
|
+
buttons?: RowButton<T>[] | undefined;
|
|
56
|
+
columns: TableColumn<C>[];
|
|
57
|
+
overflowCells?: boolean | undefined;
|
|
58
|
+
onRowClick?: ((item: T) => void) | undefined;
|
|
59
|
+
};
|
|
60
|
+
expose(exposed: {}): void;
|
|
61
|
+
attrs: any;
|
|
62
|
+
slots: Partial<Record<NonNullable<C>, (_: {
|
|
63
|
+
item: T;
|
|
64
|
+
}) => any>>;
|
|
65
|
+
emit: any;
|
|
66
|
+
} | undefined;
|
|
67
|
+
};
|
|
68
|
+
export default _default;
|
|
@@ -21,3 +21,5 @@ export declare const stringContains: (params: {
|
|
|
21
21
|
match: string | RegExp;
|
|
22
22
|
message: string;
|
|
23
23
|
}) => GenericValidateFunction<string>;
|
|
24
|
+
export declare const isUrl: GenericValidateFunction<string>;
|
|
25
|
+
export declare const isItemSelected: GenericValidateFunction<unknown[]>;
|
package/dist/lib.cjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),C=require("lodash"),_=require("@heroicons/vue/24/solid"),O=require("@heroicons/vue/24/outline"),$=require("@heroicons/vue/20/solid"),X=require("vee-validate"),J=require("nanoid"),R=require("@speckle/shared"),T=require("@vueuse/core"),E=require("@headlessui/vue"),se=require("vue-tippy"),Ce=require("v3-infinite-loading");const Be={key:2,style:{margin:"0 !important",width:"0.01px"}},we=e.defineComponent({__name:"Button",props:{to:{type:String,required:!1,default:void 0},size:{type:String,default:"base"},fullWidth:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},text:{type:Boolean,default:!1},link:{type:Boolean,default:!1},color:{type:String,default:"default"},external:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:void 0},submit:{type:Boolean,default:!1},iconLeft:{type:[Object,Function],default:null},iconRight:{type:[Object,Function],default:null},hideText:{type:Boolean,default:!1},linkComponent:{type:[Object,Function],default:null},loading:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:l}){const n=t,o=e.resolveDynamicComponent("NuxtLink"),s=e.resolveDynamicComponent("RouterLink"),r=e.computed(()=>n.linkComponent?n.linkComponent:n.external?"a":C.isObjectLike(o)?o:C.isObjectLike(s)?s:"a"),i=e.computed(()=>{if(!n.to)return n.submit?"submit":"button"}),c=e.computed(()=>n.disabled||n.loading),g=e.computed(()=>n.loading?_.ArrowPathIcon:n.iconLeft),u=e.computed(()=>{const f=[];if(f.push("border-2"),c.value)f.push(n.outlined?"border-foreground-disabled":"bg-foundation-disabled border-transparent");else switch(n.color){case"invert":f.push(n.outlined?"border-foundation dark:border-foreground":"bg-foundation dark:bg-foreground border-transparent");break;case"card":f.push(n.outlined?"border-foundation-2 shadow":"bg-foundation-2 dark:bg-foundation-2 border-foundation shadow");break;case"danger":f.push(n.outlined?"border-danger":"bg-danger border-danger");break;case"secondary":f.push(n.outlined?"border-foundation":"bg-foundation border-foundation-2");break;case"warning":f.push(n.outlined?"border-warning":"bg-warning border-warning");break;case"info":f.push(n.outlined?"border-info":"bg-info border-info");break;case"success":f.push(n.outlined?"border-success":"bg-success border-success");break;case"default":default:f.push(n.outlined?"border-primary hover:border-primary-focus":"bg-primary hover:bg-primary-focus border-transparent");break}return f.join(" ")}),p=e.computed(()=>{const f=[];if(!n.text&&!n.link)if(c.value)f.push((n.outlined,"text-foreground-disabled"));else switch(n.color){case"invert":f.push(n.outlined?"text-foundation dark:text-foreground":"text-primary");break;case"card":f.push((n.outlined,"text-foreground"));break;case"danger":f.push(n.outlined?"text-danger":"text-foundation dark:text-foreground");break;case"warning":f.push(n.outlined?"text-warning":"text-foundation dark:text-foreground");break;case"info":f.push(n.outlined?"text-info":"text-foundation dark:text-foreground");break;case"success":f.push(n.outlined?"text-success":"text-foundation dark:text-foreground");break;case"secondary":f.push((n.outlined,"text-foreground hover:text-primary"));break;case"default":default:f.push(n.outlined?"text-primary hover:text-primary-focus":"text-foundation dark:text-foreground");break}else c.value?f.push("text-foreground-disabled"):n.color==="invert"?f.push("text-foundation hover:text-foundation-2 dark:text-foreground dark:hover:text-foreground"):n.color==="secondary"?f.push("text-foreground-2 hover:text-primary-focus"):n.color==="success"?f.push("text-success"):n.color==="warning"?f.push("text-warning"):n.color==="info"?f.push("text-info"):n.color==="danger"?f.push("text-danger"):f.push("text-primary hover:text-primary-focus");return f.join(" ")}),h=e.computed(()=>{const f=[];return f.push(n.rounded?"rounded-full":"rounded-md"),f.join(" ")}),d=e.computed(()=>{const f=[];if(!c.value)switch(n.color){case"invert":f.push("hover:ring-4 ring-white/50");break;case"danger":f.push("hover:ring-4 ring-danger-lighter dark:ring-danger-darker");break;case"warning":f.push("hover:ring-4 ring-warning-lighter dark:ring-warning-darker");break;case"info":f.push("hover:ring-4 ring-info-lighter dark:ring-info-darker");break;case"success":f.push("hover:ring-4 ring-success-lighter dark:ring-success-darker");break;case"default":default:f.push("hover:ring-2");break}return f.join(" ")}),v=e.computed(()=>{switch(n.size){case"xs":return"h-5 text-xs font-medium xxx-tracking-wide";case"sm":return"h-6 text-sm font-medium xxx-tracking-wide";case"lg":return"h-10 text-lg font-semibold xxx-tracking-wide";case"xl":return"h-14 text-xl font-bold xxx-tracking-wide";default:case"base":return"h-8 text-base font-medium xxx-tracking-wide"}}),a=e.computed(()=>{switch(n.size){case"xs":return"px-1";case"sm":return"px-2";case"lg":return"px-4";case"xl":return"px-5";default:case"base":return"px-3"}}),x=e.computed(()=>{const f=[];return n.fullWidth&&f.push("w-full"),c.value&&f.push("cursor-not-allowed"),f.join(" ")}),m=e.computed(()=>{const f=[];return!c.value&&!n.link&&!n.text&&f.push("active:scale-[0.97]"),!c.value&&n.link&&f.push("underline decoration-transparent decoration-2 underline-offset-4 hover:decoration-inherit"),f.join(" ")}),y=e.computed(()=>{const f=n.link||n.text;return["transition inline-flex justify-center items-center space-x-2 outline-none select-none",x.value,v.value,p.value,f?"":u.value,f?"":h.value,f?"":d.value,n.link?"":a.value,m.value].join(" ")}),b=e.computed(()=>{const f=[""];switch(n.loading&&f.push("animate-spin"),n.size){case"xs":f.push("h-3 w-3");break;case"sm":f.push("h-4 w-4");break;case"lg":f.push("h-6 w-6");break;case"xl":f.push("h-8 w-8");break;case"base":default:f.push("h-5 w-5");break}return f.join(" ")}),S=f=>{if(c.value){f.preventDefault(),f.stopPropagation(),f.stopImmediatePropagation();return}l("click",f)};return(f,V)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.to?r.value:"button"),{href:t.to,to:t.to,type:i.value,external:t.external,class:e.normalizeClass(y.value),disabled:c.value,role:"button",onClick:S},{default:e.withCtx(()=>[g.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g.value),{key:0,class:e.normalizeClass(`${b.value} ${t.hideText?"":"mr-2"}`)},null,8,["class"])):e.createCommentVNode("",!0),t.hideText?(e.openBlock(),e.createElementBlock("div",Be," ")):e.renderSlot(f.$slots,"default",{key:1},()=>[e.createTextVNode("Button")],!0),t.iconRight||!t.loading?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.iconRight),{key:3,class:e.normalizeClass(`${b.value} ${t.hideText?"":"ml-2"}`)},null,8,["class"])):e.createCommentVNode("",!0)]),_:3},8,["href","to","type","external","class","disabled"]))}});const ae=(t,l)=>{const n=t.__vccOpts||t;for(const[o,s]of l)n[o]=s;return n},U=ae(we,[["__scopeId","data-v-38aa371e"]]),re=e.defineComponent({__name:"Link",props:{to:{type:String,required:!1,default:void 0},external:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:void 0},size:{type:String,default:"base"},foregroundLink:{type:Boolean,default:!1},iconLeft:{type:[Object,Function],default:null},iconRight:{type:[Object,Function],default:null},hideText:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:l}){const n=t,o=s=>{if(n.disabled){s.preventDefault(),s.stopPropagation(),s.stopImmediatePropagation();return}l("click",s)};return(s,r)=>(e.openBlock(),e.createBlock(U,{link:"",to:t.to,external:t.external,disabled:t.disabled,size:t.size,"foreground-link":t.foregroundLink,"icon-left":t.iconLeft,"icon-right":t.iconRight,"hide-text":t.hideText,role:"link",onClickCapture:o},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default",{},()=>[e.createTextVNode("Link")])]),_:3},8,["to","external","disabled","size","foreground-link","icon-left","icon-right","hide-text"]))}});var A=(t=>(t[t.Success=0]="Success",t[t.Warning=1]="Warning",t[t.Danger=2]="Danger",t[t.Info=3]="Info",t))(A||{});const Ve={"aria-live":"assertive",class:"pointer-events-none fixed inset-0 flex items-end px-4 py-6 mt-10 sm:items-start sm:p-6 z-50"},Ee={class:"flex w-full flex-col items-center space-y-4 sm:items-end"},Se={key:0,class:"pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg bg-foundation text-foreground shadow-lg ring-1 ring-primary-muted ring-opacity-5"},Ne={class:"p-4"},$e={class:"flex items-start"},Ie={class:"flex-shrink-0"},ze={class:"ml-2 w-0 flex-1 flex flex-col"},_e={key:0,class:"text-foreground font-bold"},De={key:1,class:"label label--light text-foreground-2"},Le={key:2,class:"flex justify-start mt-2"},Pe=e.createElementVNode("span",{class:"sr-only"},"Close",-1),je=e.defineComponent({__name:"ToastRenderer",props:{notification:null},emits:["update:notification"],setup(t,{emit:l}){const n=t,o=e.computed(()=>{var i,c;return!((i=n.notification)!=null&&i.description)&&!((c=n.notification)!=null&&c.cta)}),s=()=>{l("update:notification",null)},r=i=>{var c,g,u;(u=(g=(c=n.notification)==null?void 0:c.cta)==null?void 0:g.onClick)==null||u.call(g,i),s()};return(i,c)=>(e.openBlock(),e.createElementBlock("div",Ve,[e.createElementVNode("div",Ee,[e.createVNode(e.Transition,{"enter-active-class":"transform ease-out duration-300 transition","enter-from-class":"translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2","enter-to-class":"translate-y-0 opacity-100 sm:translate-x-0","leave-active-class":"transition ease-in duration-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:e.withCtx(()=>[t.notification?(e.openBlock(),e.createElementBlock("div",Se,[e.createElementVNode("div",Ne,[e.createElementVNode("div",$e,[e.createElementVNode("div",Ie,[t.notification.type===e.unref(A).Success?(e.openBlock(),e.createBlock(e.unref(O.CheckCircleIcon),{key:0,class:"h-6 w-6 text-success","aria-hidden":"true"})):t.notification.type===e.unref(A).Danger?(e.openBlock(),e.createBlock(e.unref(O.XCircleIcon),{key:1,class:"h-6 w-6 text-danger","aria-hidden":"true"})):t.notification.type===e.unref(A).Warning?(e.openBlock(),e.createBlock(e.unref(O.ExclamationCircleIcon),{key:2,class:"h-6 w-6 text-warning","aria-hidden":"true"})):t.notification.type===e.unref(A).Info?(e.openBlock(),e.createBlock(e.unref(O.InformationCircleIcon),{key:3,class:"h-6 w-6 text-info","aria-hidden":"true"})):e.createCommentVNode("",!0)]),e.createElementVNode("div",ze,[t.notification.title?(e.openBlock(),e.createElementBlock("p",_e,e.toDisplayString(t.notification.title),1)):e.createCommentVNode("",!0),t.notification.description?(e.openBlock(),e.createElementBlock("p",De,e.toDisplayString(t.notification.description),1)):e.createCommentVNode("",!0),t.notification.cta?(e.openBlock(),e.createElementBlock("div",Le,[e.createVNode(re,{to:t.notification.cta.url,class:"label",primary:"",onClick:r},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.notification.cta.title),1)]),_:1},8,["to"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:e.normalizeClass(["ml-4 flex flex-shrink-0",{"self-center":o.value}])},[e.createElementVNode("button",{type:"button",class:"inline-flex rounded-md bg-foundation text-foreground-2 hover:text-foreground focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",onClick:s},[Pe,e.createVNode(e.unref($.XMarkIcon),{class:"h-6 w-6","aria-hidden":"true"})])],2)])])])):e.createCommentVNode("",!0)]),_:1})])]))}}),Oe=e.createElementVNode("circle",{cx:"4",cy:"4",r:"3"},null,-1),Te=[Oe],ie=e.defineComponent({__name:"Badge",props:{size:null,colorClasses:null,dot:{type:Boolean},dotIconColorClasses:null,iconLeft:null,rounded:{type:Boolean},clickableIcon:{type:Boolean}},emits:["click-icon"],setup(t,{emit:l}){const n=t,o=e.computed(()=>n.colorClasses||"bg-blue-100 text-blue-800"),s=e.computed(()=>n.dotIconColorClasses||"text-blue-400"),r=e.computed(()=>{const u=["inline-flex items-center",o.value,n.size==="lg"?"px-3 py-0.5 label":"px-2.5 py-0.5 caption font-medium"];return n.rounded?(u.push("rounded"),u.push(n.size==="lg"?"px-2 py-0.5 label":"px-2.5 py-0.5 caption font-medium")):(u.push("rounded-full"),u.push(n.size==="lg"?"px-2.5 py-0.5 label":"px-2.5 py-0.5 caption font-medium")),u.join(" ")}),i=e.computed(()=>{const u=["mt-0.5 ml-0.5 inline-flex h-4 w-4 flex-shrink-0 items-center justify-center rounded-full focus:outline-none"];return n.clickableIcon?u.push("cursor-pointer"):u.push("cursor-default"),u.join(" ")}),c=e.computed(()=>["-ml-0.5 mr-1.5 h-2 w-2",s.value].join(" ")),g=u=>{if(!n.clickableIcon){u.stopPropagation(),u.stopImmediatePropagation(),u.preventDefault();return}l("click-icon",u)};return(u,p)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(r.value)},[t.dot?(e.openBlock(),e.createElementBlock("svg",{key:0,class:e.normalizeClass(c.value),fill:"currentColor",viewBox:"0 0 8 8"},Te,2)):e.createCommentVNode("",!0),e.renderSlot(u.$slots,"default",{},()=>[e.createTextVNode("Badge")]),t.iconLeft?(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass(i.value),onClick:p[0]||(p[0]=h=>g(h))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.iconLeft),{class:e.normalizeClass(["h-4 w-4",s.value])},null,8,["class"]))],2)):e.createCommentVNode("",!0)],2))}});let le=[];function Ae(t){le=le?t:t.slice()}var M=(t=>(t[t.sm=640]="sm",t[t.md=746]="md",t[t.lg=1024]="lg",t[t.xl=1280]="xl",t[t["2xl"]=1536]="2xl",t))(M||{});function ce(t){const{props:{modelValue:l,steps:n,orientation:o,goVerticalBelow:s,nonInteractive:r,stepsPadding:i},emit:c}=t,g=e.computed(()=>(o==null?void 0:o.value)==="vertical"?"vertical":"horizontal"),u=e.computed({get:()=>C.clamp((l==null?void 0:l.value)||0,-1,n.value.length),set:m=>c("update:modelValue",C.clamp(m,0,n.value.length))}),p=m=>`${m+1}`,h=m=>m===u.value,d=m=>m<u.value,v=(m,y)=>{var S;if(r!=null&&r.value){y==null||y.preventDefault(),y==null||y.stopPropagation(),y==null||y.stopImmediatePropagation();return}u.value=m;const b=n.value[u.value];(S=b==null?void 0:b.onClick)==null||S.call(b)},a=e.computed(()=>{const m=["flex"];let y,b;return(i==null?void 0:i.value)==="xs"?(y="space-x-2",b="space-y-1"):(i==null?void 0:i.value)==="sm"?(y="space-x-4",b="space-y-1"):(y="space-x-8",b="space-y-4"),m.push("flex"),g.value==="vertical"||s!=null&&s.value?(m.push(`flex-col ${b} justify-center`),(s==null?void 0:s.value)===M.sm?m.push(`sm:flex-row sm:space-y-0 sm:justify-start sm:${y} sm:items-center`):(s==null?void 0:s.value)===M.md?m.push(`md:flex-row md:space-y-0 md:justify-start md:${y} md:items-center`):(s==null?void 0:s.value)===M.lg?m.push(`lg:flex-row lg:space-y-0 lg:justify-start lg:${y} lg:items-center`):(s==null?void 0:s.value)===M.xl&&m.push(`xl:flex-row xl:space-y-0 xl:justify-start xl:${y} xl:items-center`)):m.push(`flex-row ${y} items-center`),m.join(" ")}),x=e.computed(()=>{const m=["flex items-center"];return r!=null&&r.value||m.push("cursor-pointer"),m.join(" ")});return{value:u,isCurrentStep:h,isFinishedStep:d,switchStep:v,getStepDisplayValue:p,listClasses:a,linkClasses:x,orientation:g}}Ae(["sm:space-x-8","md:space-x-8","lg:space-x-8","xl:space-x-8","sm:space-x-2","md:space-x-2","lg:space-x-2","xl:space-x-2","sm:space-x-4","md:space-x-4","lg:space-x-4","xl:space-x-4"]);const Me=["aria-label"],Fe=["href","onClick"],Re={class:"flex space-x-3 items-center text-primary-focus normal font-medium leading-5"},Ue={class:"shrink-0 h-8 w-8 rounded-full bg-primary-focus text-foreground-on-primary inline-flex items-center justify-center"},qe={class:"flex flex-col"},We={key:0,class:"label label--light text-foreground"},He=["href","onClick"],Ge={class:"flex space-x-3 items-center text-primary-focus normal font-medium leading-5"},Ke={class:"shrink-0 h-8 w-8 rounded-full border-2 border-primary-focus inline-flex items-center justify-center"},Xe={class:"flex flex-col"},Je={key:0,class:"label label--light text-foreground"},Qe=["href","onClick"],Ye={class:"flex space-x-3 items-center text-foreground-disabled normal font-medium leading-5"},Ze={class:"shrink-0 h-8 w-8 rounded-full border-2 border-foreground-disabled inline-flex items-center justify-center"},et={class:"flex flex-col"},tt={key:0,class:"label label--light"},nt=e.defineComponent({__name:"Number",props:{ariaLabel:null,orientation:null,steps:null,modelValue:null,goVerticalBelow:null,nonInteractive:{type:Boolean},stepsPadding:null},emits:["update:modelValue"],setup(t,{emit:l}){const n=t,{isCurrentStep:o,isFinishedStep:s,switchStep:r,getStepDisplayValue:i,listClasses:c,linkClasses:g}=ce({props:e.toRefs(n),emit:l});return(u,p)=>(e.openBlock(),e.createElementBlock("nav",{class:"flex justify-center","aria-label":t.ariaLabel||"Progress steps"},[e.createElementVNode("ol",{class:e.normalizeClass(e.unref(c))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.steps,(h,d)=>(e.openBlock(),e.createElementBlock("li",{key:h.name},[e.unref(s)(d)?(e.openBlock(),e.createElementBlock("a",{key:0,href:h.href,class:e.normalizeClass(e.unref(g)),onClick:v=>e.unref(r)(d,v)},[e.createElementVNode("div",Re,[e.createElementVNode("div",Ue,[e.createVNode(e.unref($.CheckIcon),{class:"w-5 h-5"})]),e.createElementVNode("div",qe,[e.createElementVNode("div",null,e.toDisplayString(h.name),1),h.description?(e.openBlock(),e.createElementBlock("div",We,e.toDisplayString(h.description),1)):e.createCommentVNode("",!0)])])],10,Fe)):e.unref(o)(d)?(e.openBlock(),e.createElementBlock("a",{key:1,href:h.href,class:e.normalizeClass(e.unref(g)),"aria-current":"step",onClick:v=>e.unref(r)(d,v)},[e.createElementVNode("div",Ge,[e.createElementVNode("div",Ke,e.toDisplayString(e.unref(i)(d)),1),e.createElementVNode("div",Xe,[e.createElementVNode("div",null,e.toDisplayString(h.name),1),h.description?(e.openBlock(),e.createElementBlock("div",Je,e.toDisplayString(h.description),1)):e.createCommentVNode("",!0)])])],10,He)):(e.openBlock(),e.createElementBlock("a",{key:2,href:h.href,class:e.normalizeClass(e.unref(g)),onClick:v=>e.unref(r)(d,v)},[e.createElementVNode("div",Ye,[e.createElementVNode("div",Ze,e.toDisplayString(e.unref(i)(d)),1),e.createElementVNode("div",et,[e.createElementVNode("div",null,e.toDisplayString(h.name),1),h.description?(e.openBlock(),e.createElementBlock("div",tt,e.toDisplayString(h.description),1)):e.createCommentVNode("",!0)])])],10,Qe))]))),128))],2)],8,Me))}}),ot=["aria-label"],lt=["href","onClick"],st={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center"},at={key:0,class:"h-3 w-3 rounded-full bg-foreground-2"},rt=["href","onClick"],it={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center","aria-hidden":"true"},ct={key:0,class:"h-3 w-3 rounded-full bg-foreground"},ut=e.createElementVNode("span",{class:"absolute h-4 w-4 rounded-full bg-outline-2"},null,-1),dt=e.createElementVNode("span",{class:"relative block h-2 w-2 rounded-full bg-primary-focus"},null,-1),ft=["href","onClick"],mt={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center","aria-hidden":"true"},pt={key:0,class:"h-3 w-3 rounded-full bg-foreground-2"},ht={key:1,class:"h-4 w-4 rounded-full bg-foreground-disabled"},gt=e.defineComponent({__name:"Bullet",props:{ariaLabel:null,basic:{type:Boolean},orientation:null,steps:null,modelValue:null,goVerticalBelow:null,nonInteractive:{type:Boolean},stepsPadding:null},emits:["update:modelValue"],setup(t,{emit:l}){const n=t,{isCurrentStep:o,isFinishedStep:s,switchStep:r,listClasses:i,linkClasses:c}=ce({props:e.toRefs(n),emit:l}),g=e.computed(()=>{const p=["h6 font-medium leading-7"];let h;return n.stepsPadding==="xs"?h="ml-1":n.stepsPadding==="sm"?h="ml-2":h="ml-3",p.push(h),n.basic&&p.push("sr-only"),p.join(" ")}),u=e.computed(()=>{const p=[];return n.basic&&p.push("basic"),p.join(" ")});return(p,h)=>(e.openBlock(),e.createElementBlock("nav",{class:"flex justify-center","aria-label":t.ariaLabel||"Progress steps"},[e.createElementVNode("ol",{class:e.normalizeClass([e.unref(i),u.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.steps,(d,v)=>(e.openBlock(),e.createElementBlock("li",{key:d.name},[e.unref(s)(v)?(e.openBlock(),e.createElementBlock("a",{key:0,href:d.href,class:e.normalizeClass(e.unref(c)),onClick:a=>e.unref(r)(v,a)},[e.createElementVNode("span",st,[t.basic?(e.openBlock(),e.createElementBlock("span",at)):(e.openBlock(),e.createBlock(e.unref($.CheckCircleIcon),{key:1,class:"h-full w-full text-primary","aria-hidden":"true"}))]),e.createElementVNode("span",{class:e.normalizeClass(["text-foreground",g.value])},e.toDisplayString(d.name),3)],10,lt)):e.unref(o)(v)?(e.openBlock(),e.createElementBlock("a",{key:1,href:d.href,class:e.normalizeClass(e.unref(c)),"aria-current":"step",onClick:a=>e.unref(r)(v,a)},[e.createElementVNode("span",it,[t.basic?(e.openBlock(),e.createElementBlock("span",ct)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[ut,dt],64))]),e.createElementVNode("span",{class:e.normalizeClass(["text-primary-focus",g.value])},e.toDisplayString(d.name),3)],10,rt)):(e.openBlock(),e.createElementBlock("a",{key:2,href:d.href,class:e.normalizeClass(e.unref(c)),onClick:a=>e.unref(r)(v,a)},[e.createElementVNode("div",mt,[t.basic?(e.openBlock(),e.createElementBlock("span",pt)):(e.openBlock(),e.createElementBlock("div",ht))]),e.createElementVNode("p",{class:e.normalizeClass(["text-foreground-disabled",g.value])},e.toDisplayString(d.name),3)],10,ft))]))),128))],2)],8,ot))}}),vt=["disabled"],yt=e.defineComponent({__name:"CardButton",props:{disabled:{type:Boolean},modelValue:{type:Boolean}},emits:["update:modelValue","click"],setup(t,{emit:l}){const n=t,o=e.computed(()=>{const r=["h-20 bg-foundation-2 inline-flex justify-center items-center outline-none","normal px-16 py-5 shadow rounded transition active:scale-95"];return n.disabled?r.push("bg-foundation-disabled text-foreground-2 cursor-not-allowed"):(r.push(n.modelValue?"bg-primary-focus text-foreground-on-primary":"bg-foundation text-foreground"),r.push("ring-outline-2 hover:ring-4")),r.join(" ")}),s=r=>{if(n.disabled){r.preventDefault(),r.stopPropagation(),r.stopImmediatePropagation();return}l("update:modelValue",!n.modelValue),l("click",r)};return(r,i)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(o.value),disabled:t.disabled,onClick:s},[e.renderSlot(r.$slots,"default",{},()=>[e.createTextVNode("Text")])],10,vt))}}),kt={class:"relative flex items-start"},bt={class:"flex h-6 items-center"},xt=["id","checked","aria-describedby","name","disabled","value"],Ct={class:"ml-2 text-sm",style:{"padding-top":"2px"}},Bt=["for"],wt={key:0,class:"text-danger ml-1"},Vt=["id"],Et=e.defineComponent({inheritAttrs:!1,__name:"Checkbox",props:{name:{type:String,required:!0},disabled:{type:Boolean,default:!1},label:{type:String,default:void 0},description:{type:String,default:void 0},inlineDescription:{type:Boolean,default:!1},rules:{type:[String,Object,Function,Array],default:void 0},validateOnMount:{type:Boolean,default:!1},showRequired:{type:Boolean,default:!1},modelValue:{type:[String,Boolean],default:void 0},value:{type:[String,Boolean],default:!0},id:{type:String,default:void 0},hideLabel:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t){const l=t,n=m=>`${m}-${J.nanoid()}`,o=e.computed(()=>l.value||l.name),{checked:s,errorMessage:r,handleChange:i,value:c}=X.useField(l.name,l.rules,{validateOnMount:l.validateOnMount,type:"checkbox",checkedValue:o,initialValue:l.modelValue||void 0}),g=e.computed(()=>l.label||l.name),u=e.computed(()=>r.value?"border-danger-lighter":"border-foreground-4 "),p=e.computed(()=>l.description||r.value),h=e.computed(()=>`${l.name}-description`),d=e.computed(()=>{const m=[];return l.inlineDescription?m.push("inline ml-2"):m.push("block"),r.value?m.push("text-danger"):m.push("text-foreground-2"),m.join(" ")}),v=e.ref(n("checkbox")),a=e.computed(()=>l.id||v.value),x=m=>{l.disabled||i(m)};return e.onMounted(()=>{const m=l.modelValue,y=c.value,b=Array.isArray(m)?m.includes(l.value):m===l.value,S=Array.isArray(y)?y.includes(l.value):y===l.value;b!==S&&i(m)}),(m,y)=>(e.openBlock(),e.createElementBlock("div",kt,[e.createElementVNode("div",bt,[e.createElementVNode("input",e.mergeProps({id:a.value,checked:e.unref(s),"aria-describedby":h.value,name:t.name,disabled:t.disabled,value:o.value,type:"checkbox",class:["h-4 w-4 rounded text-primary focus:ring-primary bg-foundation disabled:cursor-not-allowed disabled:bg-disabled disabled:text-disabled-2",u.value]},m.$attrs,{onChange:x}),null,16,xt)]),e.createElementVNode("div",Ct,[e.createElementVNode("label",{for:a.value,class:e.normalizeClass(["font-medium text-foreground",{"sr-only":t.hideLabel}])},[e.createElementVNode("span",null,e.toDisplayString(g.value),1),t.showRequired?(e.openBlock(),e.createElementBlock("span",wt,"*")):e.createCommentVNode("",!0)],10,Bt),p.value?(e.openBlock(),e.createElementBlock("p",{key:0,id:h.value,class:e.normalizeClass(d.value)},e.toDisplayString(p.value),11,Vt)):e.createCommentVNode("",!0)])]))}});function ue(t){const{props:l,inputEl:n,emit:o}=t,{value:s,errorMessage:r}=X.useField(l.name,l.rules,{validateOnMount:e.unref(l.validateOnMount),validateOnValueUpdate:e.unref(l.validateOnValueUpdate),initialValue:e.unref(l.modelValue)||void 0}),i=e.computed(()=>{const b=["block label text-foreground-2 mb-2"];return e.unref(l.showLabel)||b.push("sr-only"),b.join(" ")}),c=e.computed(()=>{const b=["block w-full rounded focus:outline-none text-foreground transition-all","disabled:cursor-not-allowed disabled:bg-foundation-disabled disabled:text-disabled-muted","placeholder:text-foreground-2"];return r.value?b.push("border-2 border-danger text-danger-darker focus:border-danger focus:ring-danger"):b.push("border-0 focus:ring-2 focus:ring-outline-2"),e.unref(l.color)==="foundation"?b.push("bg-foundation shadow-sm hover:shadow"):b.push("bg-foundation-page"),b.join(" ")}),g=e.ref(J.nanoid()),u=e.computed(()=>e.unref(l.label)||e.unref(l.name)),p=e.computed(()=>{const b=r.value;return!b||!e.unref(l.useLabelInErrors)?b:b.replace("Value",u.value)}),h=e.computed(()=>p.value&&e.unref(l.hideErrorMessage)),d=e.computed(()=>p.value||e.unref(l.help)),v=e.computed(()=>!!d.value),a=e.computed(()=>v.value?`${e.unref(l.name)}-${g.value}`:void 0),x=e.computed(()=>{const b=["mt-2 text-sm"];return b.push(r.value?"text-danger":"text-foreground-2"),b.join(" ")}),m=()=>{var b;(b=n.value)==null||b.focus()},y=()=>{s.value="",o("change",{value:""}),o("clear")};return e.onMounted(()=>{e.unref(l.autoFocus)&&m()}),{coreClasses:c,title:u,value:s,helpTipId:a,helpTipClasses:x,helpTip:d,hideHelpTip:h,errorMessage:p,clear:y,focus:m,labelClasses:i}}const St=["for"],Nt={class:"relative"},$t=["id","name","placeholder","disabled","aria-invalid","aria-describedby"],It=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),zt={key:2,class:"pointer-events-none absolute inset-y-0 mt-3 text-4xl right-0 flex items-center pr-2 text-danger opacity-50"},_t=["id"],Dt=e.defineComponent({__name:"TextArea",props:{name:null,showLabel:{type:Boolean},help:null,placeholder:null,label:null,disabled:{type:Boolean},rules:null,validateOnMount:{type:Boolean},validateOnValueUpdate:{type:Boolean},useLabelInErrors:{type:Boolean,default:!0},autoFocus:{type:Boolean},modelValue:{default:""},showClear:{type:Boolean},fullWidth:{type:Boolean},showRequired:{type:Boolean},color:{default:"page"}},emits:["update:modelValue","change","input","clear"],setup(t,{expose:l,emit:n}){const o=t,s=e.ref(null),{coreClasses:r,title:i,value:c,helpTipId:g,helpTipClasses:u,helpTip:p,errorMessage:h,labelClasses:d,clear:v,focus:a}=ue({props:e.toRefs(o),emit:n,inputEl:s}),x=e.computed(()=>{const m=["pl-2"];return o.showClear&&h.value?m.push("pr-12"):(o.showClear||h.value)&&m.push("pr-8"),m.join(" ")});return l({focus:a}),(m,y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([t.fullWidth?"w-full":""])},[e.createElementVNode("label",{for:t.name,class:e.normalizeClass(e.unref(d))},[e.createElementVNode("span",null,e.toDisplayString(e.unref(i)),1)],10,St),e.createElementVNode("div",Nt,[e.withDirectives(e.createElementVNode("textarea",e.mergeProps({id:t.name,ref_key:"inputElement",ref:s,"onUpdate:modelValue":y[0]||(y[0]=b=>e.isRef(c)?c.value=b:null),name:t.name,class:[e.unref(r),x.value,"min-h-[4rem]"],placeholder:t.placeholder,disabled:t.disabled,"aria-invalid":e.unref(h)?"true":"false","aria-describedby":e.unref(g)},m.$attrs,{onChange:y[1]||(y[1]=b=>m.$emit("change",{event:b,value:e.unref(c)})),onInput:y[2]||(y[2]=b=>m.$emit("input",{event:b,value:e.unref(c)}))}),null,16,$t),[[e.vModelText,e.unref(c)]]),t.showClear?(e.openBlock(),e.createElementBlock("a",{key:0,title:"Clear input",class:"absolute top-2 right-0 flex items-center pr-2 cursor-pointer",onClick:y[3]||(y[3]=(...b)=>e.unref(v)&&e.unref(v)(...b)),onKeydown:y[4]||(y[4]=(...b)=>e.unref(v)&&e.unref(v)(...b))},[It,e.createVNode(e.unref($.XMarkIcon),{class:"h-5 w-5 text-foreground","aria-hidden":"true"})],32)):e.createCommentVNode("",!0),e.unref(h)?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["pointer-events-none absolute inset-y-0 right-0 flex items-center",t.showClear?"pr-8":"pr-2"])},[e.createVNode(e.unref($.ExclamationCircleIcon),{class:"h-4 w-4 text-danger","aria-hidden":"true"})],2)):e.createCommentVNode("",!0),t.showRequired&&!e.unref(h)?(e.openBlock(),e.createElementBlock("div",zt," * ")):e.createCommentVNode("",!0)]),e.unref(g)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(g),class:e.normalizeClass(e.unref(u))},e.toDisplayString(e.unref(p)),11,_t)):e.createCommentVNode("",!0)],2))}}),Lt=["for"],Pt={class:"relative"},jt={key:0,class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"},Ot=["id","type","name","placeholder","disabled","aria-invalid","aria-describedby"],Tt=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),At={key:2,class:"pointer-events-none absolute inset-y-0 mt-3 text-4xl right-0 flex items-center pr-2 text-danger opacity-50"},Mt=["id"],Ft=e.defineComponent({inheritAttrs:!1,__name:"TextInput",props:{type:{type:String,default:"text"},name:{type:String,required:!0},showLabel:{type:Boolean,required:!1},help:{type:String,default:void 0},placeholder:{type:String,default:void 0},label:{type:String,default:void 0},showRequired:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},rules:{type:[String,Object,Function,Array],default:void 0},validateOnMount:{type:Boolean,default:!1},validateOnValueUpdate:{type:Boolean,default:!1},useLabelInErrors:{type:Boolean,default:!0},customIcon:{type:[Object,Function],default:void 0},autoFocus:{type:Boolean,default:!1},modelValue:{type:String,default:""},size:{type:String,default:"base"},showClear:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},inputClasses:{type:String,default:null},hideErrorMessage:{type:Boolean,default:!1},wrapperClasses:{type:String,default:()=>""},color:{type:String,default:"page"}},emits:["update:modelValue","change","input","clear","focusin","focusout"],setup(t,{expose:l,emit:n}){const o=t,s=e.useSlots(),r=e.ref(null),{coreClasses:i,title:c,value:g,helpTipId:u,helpTipClasses:p,helpTip:h,hideHelpTip:d,errorMessage:v,clear:a,focus:x,labelClasses:m}=ue({props:e.toRefs(o),emit:n,inputEl:r}),y=e.computed(()=>{const V=["h-5 w-5"];return v.value?V.push("text-danger"):V.push("text-foreground-2"),V.join(" ")}),b=e.computed(()=>["email","password"].includes(o.type)||o.customIcon),S=e.computed(()=>{const V=[];return b.value?V.push("pl-8"):V.push("pl-2"),s["input-right"]||(v.value||o.showClear)&&(v.value&&o.showClear?V.push("pr-12"):V.push("pr-8")),V.join(" ")}),f=e.computed(()=>{switch(o.size){case"sm":return"h-6";case"lg":return"h-10";case"xl":return"h-14";case"base":default:return"h-8"}});return l({focus:x}),(V,I)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([t.fullWidth?"w-full":"",t.wrapperClasses])},[e.createElementVNode("label",{for:t.name,class:e.normalizeClass(e.unref(m))},[e.createElementVNode("span",null,e.toDisplayString(e.unref(c)),1)],10,Lt),e.createElementVNode("div",Pt,[b.value?(e.openBlock(),e.createElementBlock("div",jt,[t.customIcon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.customIcon),{key:0,class:e.normalizeClass(y.value),"aria-hidden":"true"},null,8,["class"])):t.type==="email"?(e.openBlock(),e.createBlock(e.unref($.EnvelopeIcon),{key:1,class:e.normalizeClass(y.value),"aria-hidden":"true"},null,8,["class"])):t.type==="password"?(e.openBlock(),e.createBlock(e.unref($.KeyIcon),{key:2,class:e.normalizeClass(y.value),"aria-hidden":"true"},null,8,["class"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",e.mergeProps({id:t.name,ref_key:"inputElement",ref:r,"onUpdate:modelValue":I[0]||(I[0]=N=>e.isRef(g)?g.value=N:null),type:t.type,name:t.name,class:[e.unref(i),S.value,f.value,t.inputClasses||""],placeholder:t.placeholder,disabled:t.disabled,"aria-invalid":e.unref(v)?"true":"false","aria-describedby":e.unref(u),role:"textbox"},V.$attrs,{onChange:I[1]||(I[1]=N=>V.$emit("change",{event:N,value:e.unref(g)})),onInput:I[2]||(I[2]=N=>V.$emit("input",{event:N,value:e.unref(g)}))}),null,16,Ot),[[e.vModelDynamic,e.unref(g)]]),e.renderSlot(V.$slots,"input-right",{},()=>[t.showClear?(e.openBlock(),e.createElementBlock("a",{key:0,title:"Clear input",class:"absolute inset-y-0 right-0 flex items-center pr-2 cursor-pointer",onClick:I[3]||(I[3]=(...N)=>e.unref(a)&&e.unref(a)(...N)),onKeydown:I[4]||(I[4]=(...N)=>e.unref(a)&&e.unref(a)(...N))},[Tt,e.createVNode(e.unref($.XMarkIcon),{class:"h-5 w-5 text-foreground","aria-hidden":"true"})],32)):e.createCommentVNode("",!0),e.unref(v)?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["pointer-events-none absolute inset-y-0 right-0 flex items-center",t.showClear?"pr-8":"pr-2"])},[e.createVNode(e.unref($.ExclamationCircleIcon),{class:"h-4 w-4 text-danger","aria-hidden":"true"})],2)):e.createCommentVNode("",!0),t.showRequired&&!e.unref(v)?(e.openBlock(),e.createElementBlock("div",At," * ")):e.createCommentVNode("",!0)])]),e.unref(u)&&!e.unref(d)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(u),class:e.normalizeClass(e.unref(p))},e.toDisplayString(e.unref(h)),11,Mt)):e.createCommentVNode("",!0)],2))}}),Rt=/^https?:\/\//,Q=/^[\w-_.+]+@[\w-_.+]+$/,Ut=t=>(t||"").match(Q)?!0:"Value should be a valid e-mail address",qt=t=>(t||"").split(",").map(o=>o.trim()).every(o=>o.match(Q))||"Value should be one or multiple comma-delimited e-mail addresses",Wt=t=>(C.isString(t)&&(t=t.trim()),t?!0:"Value is required"),Ht=(t,l)=>(n,o)=>n===o.form[t]?!0:`Value must be the same as in field '${l||t}'`,Gt=t=>l=>{const{minLength:n,maxLength:o}=t;return l=R.isNullOrUndefined(l)?"":l,C.isString(l)?!C.isUndefined(n)&&l.length<n?`Value needs to be at least ${n} characters long`:!C.isUndefined(o)&&l.length>o?`Value needs to be no more than ${o} characters long`:!0:"Value should be a text string"},Kt=t=>l=>{const{match:n,message:o}=t;return C.isString(l)?n?C.isString(n)?l.includes(n)?!0:o:n.test(l)?!0:o:!0:"Value should be a text string"},Xt=Object.freeze(Object.defineProperty({__proto__:null,VALID_EMAIL:Q,VALID_HTTP_URL:Rt,isEmail:Ut,isOneOrMultipleEmails:qt,isRequired:Wt,isSameAs:Ht,isStringOfLength:Gt,stringContains:Kt},Symbol.toStringTag,{value:"Module"}));function de(t){const{skipCalculation:l,elementToWatchForChanges:n,itemContainer:o,trackResize:s=!1,trackMutations:r=!0}=t||{},i=e.ref(0),c=()=>{const g=o.value;if(l!=null&&l.value||!g)return;const u=g.children;let p=0,h=0,d;for(const v of u){const a=v.offsetTop;C.isUndefined(d)?(d=a,p+=1):a===d&&(p+=1),h+=1}i.value=h-p};return s&&T.useResizeObserver(n,c),r&&T.useMutationObserver(n,c,{childList:!0,subtree:!0}),{hiddenItemCount:i}}function fe(t){const{props:l,emit:n,dynamicVisibility:o}=t;let s;if(o){const{elementToWatchForChanges:u,itemContainer:p}=o;s=de({skipCalculation:e.computed(()=>{var d;return!((d=l.multiple)!=null&&d.value)}),elementToWatchForChanges:u,itemContainer:p}).hiddenItemCount}else s=e.ref(0);const r=e.computed({get:()=>{var p,h;const u=(p=l.modelValue)==null?void 0:p.value;return(h=l.multiple)!=null&&h.value?C.isArray(u)?u:[]:C.isArray(u)?void 0:u},set:u=>{var p,h,d;if((p=l.multiple)!=null&&p.value&&!C.isArray(u)){console.warn("Attempting to set non-array value in selector w/ multiple=true");return}else if(!((h=l.multiple)!=null&&h.value)&&C.isArray(u)){console.warn("Attempting to set array value in selector w/ multiple=false");return}n("update:modelValue",(d=l.multiple)!=null&&d.value?u||[]:u)}}),i=u=>C.isArray(u);return{selectedValue:r,hiddenSelectedItemCount:s,isArrayValue:i,isMultiItemArrayValue:u=>C.isArray(u)&&u.length>1,firstItem:u=>i(u)?u[0]:u}}const Jt=t=>(e.pushScopeId("data-v-60cf597b"),t=t(),e.popScopeId(),t),Qt=Jt(()=>e.createElementVNode("div",{class:"swoosher relative top-0 bg-blue-500/50"},null,-1)),Yt=[Qt],Zt=e.defineComponent({__name:"Bar",props:{loading:{type:Boolean}},setup(t){return(l,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative w-full h-1 bg-blue-500/30 text-xs text-foreground-on-primary overflow-hidden rounded-xl",t.loading?"opacity-100":"opacity-0"])},Yt,2))}});const Y=ae(Zt,[["__scopeId","data-v-60cf597b"]]),en={class:"flex items-center justify-between w-full"},tn={class:"block truncate grow text-left"},nn={class:"pointer-events-none shrink-0 ml-1 flex items-center"},on=["disabled"],ln={key:0,class:"flex flex-col mx-1 mb-1"},sn=e.createElementVNode("span",{class:"sr-only label text-foreground"},"Search",-1),an={class:"relative"},rn={class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"},cn=["placeholder"],un={key:0,class:"px-1"},dn={key:1},fn=e.createElementVNode("div",{class:"text-foreground-2 text-center"},"Nothing found 🤷♂️",-1),mn={class:e.normalizeClass(["block truncate"])},pn=["id"],me=e.defineComponent({__name:"Base",props:{multiple:{type:Boolean,default:!1},items:{type:Array,default:()=>[]},modelValue:{type:[Object,Array,String],default:void 0},search:{type:Boolean,default:!1},filterPredicate:{type:Function,default:void 0},disabledItemPredicate:{type:Function,default:void 0},getSearchResults:{type:Function,default:void 0},searchPlaceholder:{type:String,default:"Search"},label:{type:String,required:!0},showLabel:{type:Boolean,default:!1},name:{type:String,required:!0},by:{type:String,required:!1},disabled:{type:Boolean,default:!1},buttonStyle:{type:String,default:"base"},hideCheckmarks:{type:Boolean,default:!1},allowUnset:{type:Boolean,default:!0},clearable:{type:Boolean,default:!1},rules:{type:[String,Object,Function,Array],default:void 0},validateOnMount:{type:Boolean,default:!1},validateOnValueUpdate:{type:Boolean,default:!1},useLabelInErrors:{type:Boolean,default:!0},help:{type:String,default:void 0},fixedHeight:{type:Boolean,default:!1},fullyControlValue:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{expose:l,emit:n}){const o=t,{value:s,errorMessage:r}=X.useField(o.name,o.rules,{validateOnMount:o.validateOnMount,validateOnValueUpdate:o.validateOnValueUpdate,initialValue:o.modelValue}),i=e.ref(null),c=e.ref(""),g=e.ref([]),u=e.ref(!1),p=e.ref(1),h=e.ref(J.nanoid()),d=e.computed(()=>e.unref(o.label)||e.unref(o.name)),v=e.computed(()=>{const k=r.value;return!k||!e.unref(o.useLabelInErrors)?k:k.replace("Value",d.value)}),a=e.computed(()=>v.value||e.unref(o.help)),x=e.computed(()=>!!a.value),m=e.computed(()=>x.value?`${e.unref(o.name)}-${h.value}`:void 0),y=e.computed(()=>r.value?"text-danger":"text-foreground-2"),b=e.computed(()=>o.buttonStyle!=="simple"&&o.clearable&&!o.disabled),S=e.computed(()=>{const k=["relative flex group"];return o.buttonStyle!=="simple"&&(k.push("hover:shadow rounded-md"),k.push("outline outline-2 outline-primary-muted")),o.fixedHeight&&k.push("h-8"),k.join(" ")}),f=e.computed(()=>{const k=[];return o.buttonStyle!=="simple"&&k.push(q.value?"bg-foundation-disabled text-foreground-disabled":""),q.value&&k.push("cursor-not-allowed"),k.join(" ")}),V=e.computed(()=>{const k=["relative z-[1]","flex items-center justify-center text-center shrink-0","rounded-r-md overflow-hidden transition-all","text-foreground",Z.value?`w-6 ${f.value}`:"w-0"];return q.value||(k.push("hover:bg-primary hover:text-foreground-on-primary dark:text-foreground-on-primary"),o.buttonStyle==="tinted"?k.push("bg-outline-3"):k.push("bg-primary-muted")),k.join(" ")}),I=e.computed(()=>{const k=["relative z-[2]","normal rounded-md cursor-pointer transition truncate flex-1","flex items-center",f.value];return o.buttonStyle!=="simple"&&(k.push("py-2 px-3"),q.value||(o.buttonStyle==="tinted"?k.push("bg-foundation-page text-foreground"):k.push("bg-foundation text-foreground"))),b.value&&Z.value&&k.push("rounded-r-none"),k.join(" ")}),N=e.computed(()=>!!(o.search&&(o.filterPredicate||o.getSearchResults))),L=e.computed(()=>N.value&&o.getSearchResults),q=e.computed(()=>o.disabled||!o.items.length&&!L.value),z=e.computed({get:()=>{const k=s.value;return o.multiple?C.isArray(k)?k:[]:C.isArray(k)?void 0:k},set:k=>{if(o.multiple&&!C.isArray(k)){console.warn("Attempting to set non-array value in selector w/ multiple=true");return}else if(!o.multiple&&C.isArray(k)){console.warn("Attempting to set array value in selector w/ multiple=false");return}let w;if(o.multiple)w=k||[];else{const B=s.value;w=o.allowUnset&&B&&k&&G(B)===G(k)?void 0:k}o.fullyControlValue?n("update:modelValue",w):s.value=w,p.value+=1}}),Z=e.computed(()=>o.multiple?z.value.length!==0:!!z.value),ye=()=>{o.multiple?z.value=[]:z.value=void 0},ke=e.computed(()=>{const k=c.value;return!N.value||!(k!=null&&k.length)?g.value:o.filterPredicate?g.value.filter(w=>{var B;return((B=o.filterPredicate)==null?void 0:B.call(o,w,k))||!1}):g.value}),ee=k=>JSON.stringify(k),G=k=>o.by?k[o.by]:k,K=async()=>{if(!(!L.value||!o.getSearchResults)){u.value=!0;try{g.value=await o.getSearchResults(c.value)}finally{u.value=!1}}},be=C.debounce(K,1e3),xe=k=>{const{active:w,disabled:B}=k||{},{hideCheckmarks:D}=o,P=["relative transition cursor-pointer select-none py-1.5 pl-3",D?"":"pr-9"];return B?P.push("opacity-50 cursor-not-allowed"):P.push(w?"text-primary":"text-foreground"),P.join(" ")};return e.watch(()=>o.items,k=>{g.value=k.slice()},{immediate:!0}),e.watch(c,()=>{L.value&&be()}),e.onMounted(()=>{L.value&&!o.items.length&&K()}),l({triggerSearch:K}),(k,w)=>(e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(),e.createBlock(e.unref(E.Listbox),{key:p.value,modelValue:z.value,"onUpdate:modelValue":w[4]||(w[4]=B=>z.value=B),name:t.name,multiple:t.multiple,by:t.by,disabled:q.value,as:"div"},{default:e.withCtx(()=>[e.createVNode(e.unref(E.ListboxLabel),{class:e.normalizeClass(["block label text-foreground-2 mb-2",{"sr-only":!t.showLabel}])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:1},8,["class"]),e.createElementVNode("div",{class:e.normalizeClass(S.value)},[e.createVNode(e.unref(E.ListboxButton),{class:e.normalizeClass(I.value)},{default:e.withCtx(({open:B})=>[e.createElementVNode("div",en,[e.createElementVNode("div",tn,[!z.value||e.unref(C.isArray)(z.value)&&!z.value.length?e.renderSlot(k.$slots,"nothing-selected",{key:0},()=>[e.createTextVNode(e.toDisplayString(t.label),1)]):e.renderSlot(k.$slots,"something-selected",{key:1,value:z.value},()=>[e.createTextVNode(e.toDisplayString(ee(z.value)),1)])]),e.createElementVNode("div",nn,[B?(e.openBlock(),e.createBlock(e.unref(_.ChevronUpIcon),{key:0,class:"h-4 w-4 text-foreground","aria-hidden":"true"})):(e.openBlock(),e.createBlock(e.unref(_.ChevronDownIcon),{key:1,class:"h-4 w-4 text-foreground","aria-hidden":"true"}))])])]),_:3},8,["class"]),b.value?e.withDirectives((e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(V.value),disabled:t.disabled,onClick:w[0]||(w[0]=B=>ye())},[e.createVNode(e.unref(_.XMarkIcon),{class:"w-3 h-3"})],10,on)),[[e.unref(se.directive),"Clear"]]):e.createCommentVNode("",!0),e.createVNode(e.Transition,{"leave-active-class":"transition ease-in duration-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:e.withCtx(()=>[e.createVNode(e.unref(E.ListboxOptions),{class:"absolute top-[100%] z-10 mt-1 w-full rounded-md bg-foundation-2 py-1 label label--light outline outline-2 outline-primary-muted focus:outline-none shadow",onFocus:w[3]||(w[3]=B=>{var D;return(D=i.value)==null?void 0:D.focus()})},{default:e.withCtx(()=>[N.value?(e.openBlock(),e.createElementBlock("label",ln,[sn,e.createElementVNode("div",an,[e.createElementVNode("div",rn,[e.createVNode(e.unref(_.MagnifyingGlassIcon),{class:"h-5 w-5 text-foreground"})]),e.withDirectives(e.createElementVNode("input",{ref_key:"searchInput",ref:i,"onUpdate:modelValue":w[1]||(w[1]=B=>c.value=B),type:"text",class:"pl-9 w-full border-0 bg-foundation-page rounded placeholder:font-normal normal placeholder:text-foreground-2 focus:outline-none focus:ring-1 focus:border-outline-1 focus:ring-outline-1",placeholder:t.searchPlaceholder,onKeydown:w[2]||(w[2]=e.withModifiers(()=>{},["stop"]))},null,40,cn),[[e.vModelText,c.value]])])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["overflow-auto simple-scrollbar",[N.value?"max-h-52":"max-h-60"]])},[L.value&&u.value?(e.openBlock(),e.createElementBlock("div",un,[e.createVNode(Y,{loading:!0})])):L.value&&!g.value.length?(e.openBlock(),e.createElementBlock("div",dn,[e.renderSlot(k.$slots,"nothing-found",{},()=>[fn])])):e.createCommentVNode("",!0),!L.value||!u.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(ke.value,B=>{var D;return e.openBlock(),e.createBlock(e.unref(E.ListboxOption),{key:G(B),value:B,disabled:((D=t.disabledItemPredicate)==null?void 0:D.call(t,B))||!1},{default:e.withCtx(({active:P,selected:te})=>{var ne,oe;return[e.createElementVNode("li",{class:e.normalizeClass(xe({active:P,disabled:((ne=t.disabledItemPredicate)==null?void 0:ne.call(t,B))||!1}))},[e.createElementVNode("span",mn,[e.renderSlot(k.$slots,"option",{item:B,active:P,selected:te,disabled:((oe=t.disabledItemPredicate)==null?void 0:oe.call(t,B))||!1},()=>[e.createTextVNode(e.toDisplayString(ee(B)),1)])]),!t.hideCheckmarks&&te?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([P?"text-primary":"text-foreground","absolute inset-y-0 right-0 flex items-center pr-4"])},[e.createVNode(e.unref(_.CheckIcon),{class:"h-5 w-5","aria-hidden":"true"})],2)):e.createCommentVNode("",!0)],2)]}),_:2},1032,["value","disabled"])}),128)):e.createCommentVNode("",!0)],2)]),_:3})]),_:3})],2)]),_:3},8,["modelValue","name","multiple","by","disabled"])),m.value?(e.openBlock(),e.createElementBlock("p",{key:0,id:m.value,class:e.normalizeClass(["mt-2 text-sm",y.value])},e.toDisplayString(a.value),11,pn)):e.createCommentVNode("",!0)]))}}),pe=e.defineComponent({__name:"SourceAppBadge",props:{sourceApp:null},setup(t){return(l,n)=>(e.openBlock(),e.createBlock(ie,{"color-classes":"text-foreground-on-primary",rounded:"",style:e.normalizeStyle({backgroundColor:t.sourceApp.bgColor})},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.sourceApp.short),1)]),_:1},8,["style"]))}}),hn={key:0,class:"text-foreground-2 normal"},gn={key:1,class:"flex items-center"},vn={class:"truncate"},yn={class:"flex items-center"},kn={class:"truncate"},bn=e.defineComponent({__name:"SourceApps",props:{multiple:{type:Boolean,default:!1},modelValue:{type:[Object,Array],default:void 0},search:{type:Boolean,default:!1},searchPlaceholder:{type:String,default:"Search apps"},selectorPlaceholder:{type:String,default:void 0},label:{type:String,required:!0},showLabel:{type:Boolean,default:!1},name:{type:String,default:void 0},items:{type:Array,default:void 0}},emits:["update:modelValue"],setup(t,{emit:l}){const n=t,o=e.ref(null),s=e.ref(null),{selectedValue:r,hiddenSelectedItemCount:i,isMultiItemArrayValue:c,firstItem:g}=fe({props:e.toRefs(n),emit:l,dynamicVisibility:{elementToWatchForChanges:o,itemContainer:s}}),u=(p,h)=>p.name.toLocaleLowerCase().includes(h.toLocaleLowerCase());return(p,h)=>(e.openBlock(),e.createBlock(me,{modelValue:e.unref(r),"onUpdate:modelValue":h[0]||(h[0]=d=>e.isRef(r)?r.value=d:null),multiple:t.multiple,items:t.items??e.unref(R.SourceApps),search:t.search,"search-placeholder":t.searchPlaceholder,label:t.label,"show-label":t.showLabel,name:t.name||"sourceApps","filter-predicate":u,by:"name"},{"nothing-selected":e.withCtx(()=>[t.selectorPlaceholder?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(t.selectorPlaceholder),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(t.multiple?"Select apps":"Select an app"),1)],64))]),"something-selected":e.withCtx(({value:d})=>[e.unref(c)(d)?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"elementToWatchForChanges",ref:o,class:"flex items-center space-x-0.5 h-5"},[e.createElementVNode("div",{ref_key:"itemContainer",ref:s,class:"flex flex-wrap overflow-hidden space-x-0.5 h-5"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d,v=>(e.openBlock(),e.createBlock(pe,{key:v.name,"source-app":v},null,8,["source-app"]))),128))],512),e.unref(i)>0?(e.openBlock(),e.createElementBlock("div",hn," +"+e.toDisplayString(e.unref(i)),1)):e.createCommentVNode("",!0)],512)):(e.openBlock(),e.createElementBlock("div",gn,[e.createElementVNode("div",{class:"h-2 w-2 rounded-full mr-2",style:e.normalizeStyle({backgroundColor:e.unref(g)(d).bgColor})},null,4),e.createElementVNode("span",vn,e.toDisplayString(e.unref(g)(d).name),1)]))]),option:e.withCtx(({item:d})=>[e.createElementVNode("div",yn,[e.createElementVNode("div",{class:"h-2 w-2 rounded-full mr-2",style:e.normalizeStyle({backgroundColor:d.bgColor})},null,4),e.createElementVNode("span",kn,e.toDisplayString(d.name),1)])]),_:1},8,["modelValue","multiple","items","search","search-placeholder","label","show-label","name"]))}});var F=(t=>(t.CtrlOrCmd="cmd-or-ctrl",t.AltOrOpt="alt-or-opt",t.Shift="shift",t))(F||{});const W=R.getClientOperatingSystem(),xn={["cmd-or-ctrl"]:W===R.OperatingSystem.Mac?"Cmd":"Ctrl",["alt-or-opt"]:W===R.OperatingSystem.Mac?"Opt":"Alt",shift:"Shift"};function Cn(t){const l=n=>Object.values(F).includes(n);return t.map(n=>l(n)?xn[n]:n).join("+")}function Bn(t,...l){T.onKeyDown(l[0],n=>{const o=n.getModifierState("Alt"),s=W===R.OperatingSystem.Mac?n.getModifierState("Meta"):n.getModifierState("Control"),r=n.getModifierState("Shift");for(const i of t)switch(i){case F.CtrlOrCmd:if(!s)return;break;case F.AltOrOpt:if(!o)return;break;case F.Shift:if(!r)return;break}l[1](n)},l[2])}function wn(t){const l=(t==null?void 0:t.model)||e.ref(),n=e.computed({get:()=>!!l.value,set:o=>l.value=o?!0:void 0});return{model:l,isChecked:n}}const Vn=e.createElementVNode("div",{class:"fixed inset-0 bg-neutral-100/70 dark:bg-neutral-900/70 transition-opacity"},null,-1),En={class:"fixed inset-0 z-10 overflow-y-auto"},Sn={class:"flex min-h-full justify-center p-4 text-center items-center sm:p-0"},Nn={key:0,class:"flex items-center justify-center shadow p-4 relative z-10 bg-foundation rounded-t-lg"},$n={class:"text-2xl font-bold"},In={class:"p-4 sm:p-6"},zn={key:2,class:"flex p-4 sm:px-6 sm:py-5 border-t gap-2 border-outline-3"},_n=e.defineComponent({__name:"Dialog",props:{open:{type:Boolean},maxWidth:null,hideCloser:{type:Boolean},preventCloseOnClickOutside:{type:Boolean},title:null,buttons:null,onSubmit:{type:Function}},emits:["update:open","fully-closed"],setup(t,{emit:l}){const n=t,o=e.useSlots(),s=e.computed(()=>!!n.onSubmit),r=e.computed(()=>n.buttons||o.buttons),i=e.computed({get:()=>n.open,set:p=>l("update:open",p)}),c=e.computed(()=>{switch(n.maxWidth){case"sm":return 0;case"md":return 1;case"lg":return 2;case"xl":return 3;default:return 1e4}}),g=e.computed(()=>{const p=["w-full","sm:my-8 sm:w-full sm:max-w-xl"];return!n.title&&!r.value&&p.push("px-4 pt-4 pb-4","sm:p-6"),c.value>=1&&p.push("md:max-w-2xl"),c.value>=2&&p.push("lg:max-w-4xl"),c.value>=3&&p.push("xl:max-w-6xl"),c.value>=4&&p.push("2xl:max-w-7xl"),p.join(" ")}),u=()=>{n.preventCloseOnClickOutside||(i.value=!1)};return(p,h)=>(e.openBlock(),e.createBlock(e.unref(E.TransitionRoot),{as:"template",show:i.value},{default:e.withCtx(()=>[e.createVNode(e.unref(E.Dialog),{as:"div",class:"relative z-40",onClose:u},{default:e.withCtx(()=>[e.createVNode(e.unref(E.TransitionChild),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in duration-200","leave-from":"opacity-100","leave-to":"opacity-0"},{default:e.withCtx(()=>[Vn]),_:1}),e.createElementVNode("div",En,[e.createElementVNode("div",Sn,[e.createVNode(e.unref(E.TransitionChild),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95","enter-to":"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200","leave-from":"opacity-100 translate-y-0 sm:scale-100","leave-to":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",onAfterLeave:h[1]||(h[1]=d=>p.$emit("fully-closed"))},{default:e.withCtx(()=>[e.createVNode(e.unref(E.DialogPanel),{class:e.normalizeClass(["transform rounded-lg bg-foundation text-left shadow-xl transition-all",g.value]),as:s.value?"form":"div",onSubmit:e.withModifiers(t.onSubmit,["prevent"])},{default:e.withCtx(()=>[t.title?(e.openBlock(),e.createElementBlock("div",Nn,[e.createElementVNode("h4",$n,e.toDisplayString(t.title),1)])):e.createCommentVNode("",!0),t.hideCloser?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:1,class:"absolute z-20 top-5 right-4 text-foreground",onClick:h[0]||(h[0]=d=>i.value=!1)},[e.createVNode(e.unref(O.XMarkIcon),{class:"h-6 w-6"})])),e.createElementVNode("div",In,[e.renderSlot(p.$slots,"default",{},()=>[e.createTextVNode("Put your content here!")])]),r.value?(e.openBlock(),e.createElementBlock("div",zn,[t.buttons?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.buttons,(d,v)=>(e.openBlock(),e.createBlock(e.unref(U),e.mergeProps({key:v},d.props,{onClick:d.onClick}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.text),1)]),_:2},1040,["onClick"]))),128)):e.renderSlot(p.$slots,"buttons",{key:1})])):e.createCommentVNode("",!0)]),_:3},8,["class","as","onSubmit"])]),_:3})])])]),_:3})]),_:3},8,["show"]))}}),Dn={class:"inline-flex items-center space-x-2"},Ln={class:"label-light"},Pn=e.defineComponent({__name:"Disclosure",props:{title:null,icon:null,color:{default:"default"}},setup(t){const l=t,n=e.computed(()=>{const s=["pr-3 h-10 w-full flex items-center justify-between border-l-2 px-2 rounded transition","ring-1 font-medium"];switch(l.color){case"warning":s.push("border-warning text-warning ring-warning-lighter hover:ring-warning");break;case"success":s.push("border-success text-success ring-success-lighter hover:ring-success");break;case"danger":s.push("border-danger text-danger ring-danger-lighter hover:ring-danger");break;case"default":default:s.push("border-primary text-primary ring-primary-muted hover:ring-primary");break}return s.join(" ")}),o=e.computed(()=>{const s=["mt-4 px-3 py-1 border-x "];switch(l.color){case"warning":s.push("border-warning-lighter");break;case"success":s.push("border-success-lighter");break;case"danger":s.push("border-danger-lighter");break;case"default":default:s.push("border-primary-muted");break}return s.join(" ")});return(s,r)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(E.Disclosure),null,{default:e.withCtx(({open:i})=>[e.createVNode(e.unref(E.DisclosureButton),{class:e.normalizeClass(n.value)},{default:e.withCtx(()=>[e.createElementVNode("div",Dn,[t.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon),{key:0,class:"h-4 w-4"})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(t.title),1)]),e.createVNode(e.unref(_.ChevronUpIcon),{class:e.normalizeClass([i?"":"rotate-180 transform","h-5 w-5"])},null,8,["class"])]),_:2},1032,["class"]),e.createVNode(e.unref(E.DisclosurePanel),{class:e.normalizeClass(o.value)},{default:e.withCtx(()=>[e.createElementVNode("div",Ln,[e.renderSlot(s.$slots,"default",{},()=>[e.createTextVNode("Panel contents")])])]),_:3},8,["class"])]),_:3})]))}});var j=(t=>(t.Grid="grid",t.List="list",t))(j||{});const jn=e.defineComponent({__name:"GridListToggle",props:{modelValue:null},emits:["click","update:modelValue"],setup(t,{emit:l}){const n=t,o=e.computed({get:()=>n.modelValue||j.Grid,set:i=>l("update:modelValue",i)}),s=e.computed(()=>o.value===j.Grid?_.Bars3Icon:_.Squares2X2Icon),r=i=>{l("click",i);const c=o.value===j.Grid?j.List:j.Grid;o.value=c};return(i,c)=>(e.openBlock(),e.createElementBlock("button",{class:"flex items-center justify-center rounded bg-foundation h-8 w-8 shadow cursor-pointer text-foreground",onClick:r},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value),{class:"h-6 w-6"}))]))}});var he=(t=>(t[t.Throttle=0]="Throttle",t[t.Debounce=1]="Debounce",t))(he||{}),H=(t=>(t[t.Left=0]="Left",t[t.Right=1]="Right",t))(H||{});function ge(t,l){if(!T.isClient)return;const{wait:n=100,throttleOrDebounce:o=0}=l||{},s=n?o===0?C.throttle(t,n):C.debounce(t,n):t;e.onMounted(()=>window.addEventListener("resize",s)),e.onBeforeUnmount(()=>window.removeEventListener("resize",s))}function On(t){e.onMounted(()=>{window.addEventListener("beforeunload",t)}),e.onBeforeUnmount(()=>{window.removeEventListener("beforeunload",t)})}function ve(t){const{el:l,defaultDirection:n}=t,o=e.ref(C.isUndefined(n)?1:n),s=e.computed(()=>{const i=e.unref(t.stopUpdatesBelowWidth);if(!C.isUndefined(i))return i;const c=e.unref(l);return c!=null&&c.offsetWidth?c.offsetWidth*2:void 0}),r=()=>{if(!T.isClient)return;const i=e.unref(l);if(!i)return;const c=i.getBoundingClientRect(),g=c.x+c.width>window.innerWidth,u=c.x<0;g&&u||!C.isUndefined(s.value)&&window.innerWidth<s.value||(g?o.value=0:u&&(o.value=1))};return ge(()=>r()),e.watch(()=>e.unref(l),i=>{i&&r()}),{direction:e.computed(()=>o.value),recalculateDirection:r}}const Tn=["disabled","onClick"],An=e.defineComponent({__name:"Menu",props:{open:{type:Boolean},items:null},emits:["update:open","chosen"],setup(t,{emit:l}){const n=t,o=e.ref(null),{direction:s}=ve({el:e.computed(()=>{var d;return((d=o.value)==null?void 0:d.el)||null}),defaultDirection:H.Left,stopUpdatesBelowWidth:300}),r=e.ref(null),i=e.ref(!1),c=e.computed({get:()=>n.open||!1,set:d=>l("update:open",d)}),g=d=>{const{active:v,disabled:a}=d,x=["group flex w-full items-center rounded-md px-2 py-2 text-sm"];return v?x.push("bg-primary text-foreground-on-primary"):a?x.push("text-foreground-disabled"):x.push("text-foreground"),x.join(" ")},u=(d,v)=>{l("chosen",{item:d,event:v})},p=()=>{var d;return(d=r.value)==null?void 0:d.el.click()},h=d=>{const v=!!d;return i.value=v,v};return e.watch(i,(d,v)=>{d!==v&&(c.value=d)}),e.watch(c,d=>{(d&&!i.value||!d&&i.value)&&p()}),(d,v)=>(e.openBlock(),e.createBlock(e.unref(E.Menu),{as:"div",class:"relative inline-block"},{default:e.withCtx(({open:a})=>[e.createElementVNode("div",null,[e.createVNode(e.unref(E.MenuButton),{ref_key:"menuButton",ref:r,class:"hidden",onClick:v[0]||(v[0]=e.withModifiers(()=>{},["stop","prevent"]))},null,512),e.createElementVNode("div",{class:e.normalizeClass(a?"pointer-events-none":"")},[e.renderSlot(d.$slots,"default",{toggle:p,open:h(a)})],2)]),e.createVNode(e.Transition,{"enter-active-class":"transition duration-100 ease-out","enter-from-class":"transform scale-95 opacity-0","enter-to-class":"transform scale-100 opacity-100","leave-active-class":"transition duration-75 ease-in","leave-from-class":"transform scale-100 opacity-100","leave-to-class":"transform scale-95 opacity-0"},{default:e.withCtx(()=>[e.createVNode(e.unref(E.MenuItems),{ref_key:"menuItems",ref:o,class:e.normalizeClass(["absolute mt-2 w-56 origin-top-right divide-y divide-outline-3 rounded-md bg-foundation shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none z-40",e.unref(s)===e.unref(H).Left?"right-0":""])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(x,m)=>(e.openBlock(),e.createElementBlock("div",{key:m,class:"px-1 py-1"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x,y=>(e.openBlock(),e.createBlock(e.unref(E.MenuItem),{key:y.id,disabled:y.disabled},{default:e.withCtx(({active:b,disabled:S})=>[e.withDirectives((e.openBlock(),e.createElementBlock("span",null,[e.createElementVNode("button",{class:e.normalizeClass(g({active:b,disabled:S})),disabled:S,onClick:f=>u(y,f)},[e.renderSlot(d.$slots,"item",{item:y},()=>[e.createTextVNode(e.toDisplayString(y.title),1)])],10,Tn)])),[[e.unref(se.directive),y.disabled&&y.disabledTooltip]])]),_:2},1032,["disabled"]))),128))]))),128))]),_:3},8,["class"])]),_:3})]),_:3}))}}),Mn={class:"flex flex-col space-y-4"},Fn={class:"flex space-x-6"},Rn=e.defineComponent({__name:"Tabs",props:{items:null},setup(t){const l=t,n=e.ref(null),o=e.computed(()=>n.value&&l.items.find(r=>r.id===n.value)||l.items[0]),s=r=>{n.value=r.id};return(r,i)=>(e.openBlock(),e.createElementBlock("div",Mn,[e.createElementVNode("div",Fn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,c=>(e.openBlock(),e.createBlock(U,{key:c.id,link:"",color:o.value.id===c.id?"default":"secondary",onClick:g=>s(c)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.title),1)]),_:2},1032,["color","onClick"]))),128))]),e.renderSlot(r.$slots,"default",{activeItem:o.value})]))}}),Un={class:"w-full flex flex-col items-center my-2 space-y-2 mt-4"},qn={class:"inline-flex items-center space-x-1"},Wn=e.createElementVNode("span",{class:"text-foreground-2"},"That's it, you've loaded everything!",-1),Hn={class:"w-full flex flex-col items-center my-2 space-y-2 mt-4"},Gn={class:"inline-flex items-center space-x-1"},Kn=e.createElementVNode("span",{class:"text-foreground-2"},"An error occurred while loading",-1),Xn=e.defineComponent({__name:"InfiniteLoading",props:{settings:null,allowRetry:{type:Boolean}},emits:["infinite"],setup(t){const l=e.ref(null),n=e.ref(!1);return T.isClient&&e.onMounted(()=>{const o=setInterval(()=>{var s;(s=l.value)!=null&&s.isConnected&&(n.value=!0,clearInterval(o))},200)}),(o,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:l},[n.value?(e.openBlock(),e.createBlock(e.unref(Ce),e.mergeProps({key:0},o.$props.settings||{},{onInfinite:s[0]||(s[0]=r=>o.$emit("infinite",r))}),{spinner:e.withCtx(()=>[e.createVNode(Y,{loading:!0,class:"my-2"})]),complete:e.withCtx(()=>[e.createElementVNode("div",Un,[e.createElementVNode("div",qn,[e.createVNode(e.unref(O.CheckIcon),{class:"w-5 h-5 text-success"}),Wn])])]),error:e.withCtx(({retry:r})=>[e.createElementVNode("div",Hn,[e.createElementVNode("div",Gn,[e.createVNode(e.unref(O.ExclamationTriangleIcon),{class:"w-5 h-5 text-danger"}),Kn]),t.allowRetry?(e.openBlock(),e.createBlock(U,{key:0,onClick:r},{default:e.withCtx(()=>[e.createTextVNode("Retry")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)])]),_:1},16)):e.createCommentVNode("",!0)],512))}}),Jn={class:"relative group"},Qn={key:0,class:"absolute -inset-1 bg-blue-300 dark:bg-blue-500 opacity-5 dark:opacity-0 rounded-md blur-sm group-hover:opacity-60 dark:group-hover:opacity-30 transition duration-500"},Yn=e.defineComponent({__name:"Panel",props:{form:{type:Boolean,default:!1},ring:{type:Boolean,default:!1},fancyGlow:{type:Boolean,default:!1},customPadding:{type:Boolean,default:!1},noShadow:{type:Boolean,default:!1},panelClasses:{type:String}},emits:["submit"],setup(t,{emit:l}){const n=t,o=e.computed(()=>n.customPadding?"":"px-4 py-4 sm:px-6"),s=e.computed(()=>n.customPadding?"":"px-4 py-4 sm:p-6"),r=e.computed(()=>{const i=["rounded-lg"];return n.noShadow||i.push("shadow"),n.ring&&i.push("ring-outline-2 hover:ring-2"),n.panelClasses&&i.push(n.panelClasses),i.join(" ")});return(i,c)=>(e.openBlock(),e.createElementBlock("div",Jn,[t.fancyGlow?(e.openBlock(),e.createElementBlock("div",Qn)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.form?"form":"div"),{class:e.normalizeClass(["relative divide-outline-3 bg-foundation text-foreground flex flex-col divide-y overflow-hidden",r.value]),onSubmit:c[0]||(c[0]=g=>l("submit",g))},{default:e.withCtx(()=>[i.$slots.header?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(o.value)},[e.renderSlot(i.$slots,"header")],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["grow",s.value])},[e.renderSlot(i.$slots,"default")],2),i.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(o.value)},[e.renderSlot(i.$slots,"footer")],2)):e.createCommentVNode("",!0)]),_:3},40,["class"]))]))}}),Zn={class:"flex-shrink-0"},eo=e.createElementVNode("span",{class:"sr-only"},"Dismiss",-1),to=e.defineComponent({__name:"Alert",props:{color:{default:"success"},withDismiss:{type:Boolean},actions:null,customIcon:null,size:{default:"default"}},emits:["dismiss"],setup(t){const l=t,n=e.useSlots(),o=e.computed(()=>!!n.description),s=e.computed(()=>{if(l.customIcon)return l.customIcon;switch(l.color){case"info":return $.InformationCircleIcon;case"warning":return $.ExclamationCircleIcon;case"danger":return $.XCircleIcon;case"success":default:return $.CheckCircleIcon}}),r=e.computed(()=>{const a=[];switch(l.size){case"xs":a.push("p-1");break;case"default":default:a.push(o.value?"p-4":"p-2");break}switch(l.color){case"success":a.push("bg-success-lighter border-l-4 border-success");break;case"info":a.push("bg-info-lighter border-l-4 border-info");break;case"danger":a.push("bg-danger-lighter border-l-4 border-danger");break;case"warning":a.push("bg-warning-lighter border-l-4 border-warning");break}return a.join(" ")}),i=e.computed(()=>{const a=[];if(o.value)a.push("");else switch(a.push("items-center"),l.size){case"xs":a.push("space-x-1");break;case"default":default:a.push("space-x-2");break}return a.join(" ")}),c=e.computed(()=>{const a=["grow"];switch(o.value||a.push("flex items-center space-x-2"),l.size){case"xs":a.push("ml-1");break;case"default":default:a.push("ml-3");break}return a.join(" ")}),g=e.computed(()=>{const a=[];switch(l.size){case"xs":a.push("text-xs");break;case"default":default:a.push("mt-2 text-sm");break}return a.join(" ")}),u=e.computed(()=>{var m;const a=["flex"];o.value||a.push("grow justify-end");const x=o.value&&((m=l.actions)==null?void 0:m.length);switch(l.size){case"xs":a.push("space-x-1"),x&&a.push("mt-1");break;case"default":default:a.push("space-x-2"),x&&a.push("mt-4");break}return a.join(" ")}),p=e.computed(()=>{const a=[];switch(l.color){case"success":a.push("text-success-darker");break;case"info":a.push("text-info-darker");break;case"danger":a.push("text-danger-darker");break;case"warning":a.push("text-warning-darker");break}return a.join(" ")}),h=e.computed(()=>{const a=[];switch(l.size){case"xs":a.push("h-4 w-4"),a.push(o.value?"mt-0.5":"");break;case"default":default:a.push("h-5 w-5");break}switch(l.color){case"success":a.push("text-success");break;case"info":a.push("text-info");break;case"danger":a.push("text-danger");break;case"warning":a.push("text-warning");break}return a.join(" ")}),d=e.computed(()=>{const a=[];switch(l.color){case"success":a.push("bg-success-lighter ring-success");break;case"info":a.push("bg-info-lighter ring-info");break;case"danger":a.push("bg-danger-lighter ring-danger");break;case"warning":a.push("bg-warning-lighter ring-warning");break}return a.join(" ")}),v=e.computed(()=>{switch(l.size){case"xs":return"xs";case"default":default:return"sm"}});return(a,x)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["rounded-md",[r.value,p.value]])},[e.createElementVNode("div",{class:e.normalizeClass(["flex",i.value])},[e.createElementVNode("div",Zn,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value),{class:e.normalizeClass(h.value),"aria-hidden":"true"},null,8,["class"]))]),e.createElementVNode("div",{class:e.normalizeClass(c.value)},[e.createElementVNode("h3",{class:e.normalizeClass(["text-sm",[o.value?"font-medium":""]])},[e.renderSlot(a.$slots,"title",{},()=>[e.createTextVNode("Title")])],2),o.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(g.value)},[e.renderSlot(a.$slots,"description",{},()=>[e.createTextVNode(" Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquid pariatur, ipsum similique veniam. ")])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(u.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.actions||[],(m,y)=>(e.openBlock(),e.createBlock(U,{key:y,color:t.color,size:v.value,to:m.url,external:m.externalUrl||!1,onClick:b=>m.onClick||e.unref(C.noop)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.title),1)]),_:2},1032,["color","size","to","external","onClick"]))),128))],2)],2),t.withDismiss?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["flex",[o.value?"items-start":"items-center"]])},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["inline-flex rounded-md focus:outline-none focus:ring-2",d.value]),onClick:x[0]||(x[0]=m=>a.$emit("dismiss"))},[eo,e.createVNode(e.unref($.XMarkIcon),{class:"h-5 w-5","aria-hidden":"true"})],2)],2)):e.createCommentVNode("",!0)],2)],2))}});function no(t){var a,x;const{get:l,initialState:n,readOptions:o,set:s,asyncRead:r=!0,debugging:i}=t,c=i==null?void 0:i.log,g=()=>(new Error("Trace:").stack||"").substring(7),u=((x=(a=t.debugging)==null?void 0:a.log)==null?void 0:x.logger)||console.debug,p=c&&!c.writesOnly?()=>{const m=l();return u(`debugging: '${c.name}' read`,m,g()),m}:l,h=c&&!c.readsOnly?m=>(u(`debugging: '${c.name}' written to`,m,g()),s(m)):s,d=r?T.computedAsync(p,n,o):e.computed(p),v=e.computed(()=>d.value);return v.update=h,v}exports.CommonAlert=to;exports.CommonBadge=ie;exports.CommonLoadingBar=Y;exports.CommonStepsBullet=gt;exports.CommonStepsNumber=nt;exports.CommonTextLink=re;exports.FormButton=U;exports.FormCardButton=yt;exports.FormCheckbox=Et;exports.FormSelectBase=me;exports.FormSelectSourceApps=bn;exports.FormTextArea=Dt;exports.FormTextInput=Ft;exports.GlobalToastRenderer=je;exports.GridListToggleValue=j;exports.HorizontalDirection=H;exports.InfiniteLoading=Xn;exports.LayoutDialog=_n;exports.LayoutDisclosure=Pn;exports.LayoutGridListToggle=jn;exports.LayoutMenu=An;exports.LayoutPanel=Yn;exports.LayoutTabs=Rn;exports.ModifierKeys=F;exports.SourceAppBadge=pe;exports.TailwindBreakpoints=M;exports.ThrottleOrDebounce=he;exports.ToastNotificationType=A;exports.ValidationHelpers=Xt;exports.clientOs=W;exports.getKeyboardShortcutTitle=Cn;exports.onKeyboardShortcut=Bn;exports.useFormCheckboxModel=wn;exports.useFormSelectChildInternals=fe;exports.useOnBeforeWindowUnload=On;exports.useResponsiveHorizontalDirectionCalculation=ve;exports.useWindowResizeHandler=ge;exports.useWrappingContainerHiddenCount=de;exports.writableAsyncComputed=no;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),C=require("lodash"),I=require("@heroicons/vue/24/solid"),T=require("@heroicons/vue/24/outline"),$=require("@heroicons/vue/20/solid"),X=require("vee-validate"),J=require("nanoid"),U=require("@speckle/shared"),O=require("@vueuse/core"),V=require("@headlessui/vue"),ie=require("vue-tippy"),Be=require("v3-infinite-loading");const we={key:2,style:{margin:"0 !important",width:"0.01px"}},Ve=e.defineComponent({__name:"Button",props:{to:{type:String,required:!1,default:void 0},size:{type:String,default:"base"},fullWidth:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},text:{type:Boolean,default:!1},link:{type:Boolean,default:!1},color:{type:String,default:"default"},external:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:void 0},submit:{type:Boolean,default:!1},iconLeft:{type:[Object,Function],default:null},iconRight:{type:[Object,Function],default:null},hideText:{type:Boolean,default:!1},linkComponent:{type:[Object,Function],default:null},loading:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:l}){const n=t,o=e.resolveDynamicComponent("NuxtLink"),s=e.resolveDynamicComponent("RouterLink"),c=e.computed(()=>n.linkComponent?n.linkComponent:n.external?"a":C.isObjectLike(o)?o:C.isObjectLike(s)?s:"a"),r=e.computed(()=>{if(!n.to)return n.submit?"submit":"button"}),a=e.computed(()=>n.disabled||n.loading),d=e.computed(()=>n.loading?I.ArrowPathIcon:n.iconLeft),i=e.computed(()=>{const f=[];if(f.push("border-2"),a.value)f.push(n.outlined?"border-foreground-disabled":"bg-foundation-disabled border-transparent");else switch(n.color){case"invert":f.push(n.outlined?"border-foundation dark:border-foreground":"bg-foundation dark:bg-foreground border-transparent");break;case"card":f.push(n.outlined?"border-foundation-2 shadow":"bg-foundation-2 dark:bg-foundation-2 border-foundation shadow");break;case"danger":f.push(n.outlined?"border-danger":"bg-danger border-danger");break;case"secondary":f.push(n.outlined?"border-foundation":"bg-foundation border-foundation-2");break;case"warning":f.push(n.outlined?"border-warning":"bg-warning border-warning");break;case"info":f.push(n.outlined?"border-info":"bg-info border-info");break;case"success":f.push(n.outlined?"border-success":"bg-success border-success");break;case"default":default:f.push(n.outlined?"border-primary hover:border-primary-focus":"bg-primary hover:bg-primary-focus border-transparent");break}return f.join(" ")}),h=e.computed(()=>{const f=[];if(!n.text&&!n.link)if(a.value)f.push((n.outlined,"text-foreground-disabled"));else switch(n.color){case"invert":f.push(n.outlined?"text-foundation dark:text-foreground":"text-primary");break;case"card":f.push((n.outlined,"text-foreground"));break;case"danger":f.push(n.outlined?"text-danger":"text-foundation dark:text-foreground");break;case"warning":f.push(n.outlined?"text-warning":"text-foundation dark:text-foreground");break;case"info":f.push(n.outlined?"text-info":"text-foundation dark:text-foreground");break;case"success":f.push(n.outlined?"text-success":"text-foundation dark:text-foreground");break;case"secondary":f.push((n.outlined,"text-foreground hover:text-primary"));break;case"default":default:f.push(n.outlined?"text-primary hover:text-primary-focus":"text-foundation dark:text-foreground");break}else a.value?f.push("text-foreground-disabled"):n.color==="invert"?f.push("text-foundation hover:text-foundation-2 dark:text-foreground dark:hover:text-foreground"):n.color==="secondary"?f.push("text-foreground-2 hover:text-primary-focus"):n.color==="success"?f.push("text-success"):n.color==="warning"?f.push("text-warning"):n.color==="info"?f.push("text-info"):n.color==="danger"?f.push("text-danger"):f.push("text-primary hover:text-primary-focus");return f.join(" ")}),g=e.computed(()=>{const f=[];return f.push(n.rounded?"rounded-full":"rounded-md"),f.join(" ")}),m=e.computed(()=>{const f=[];if(!a.value)switch(n.color){case"invert":f.push("hover:ring-4 ring-white/50");break;case"danger":f.push("hover:ring-4 ring-danger-lighter dark:ring-danger-darker");break;case"warning":f.push("hover:ring-4 ring-warning-lighter dark:ring-warning-darker");break;case"info":f.push("hover:ring-4 ring-info-lighter dark:ring-info-darker");break;case"success":f.push("hover:ring-4 ring-success-lighter dark:ring-success-darker");break;case"default":default:f.push("hover:ring-2");break}return f.join(" ")}),v=e.computed(()=>{switch(n.size){case"xs":return"h-5 text-xs font-medium xxx-tracking-wide";case"sm":return"h-6 text-sm font-medium xxx-tracking-wide";case"lg":return"h-10 text-lg font-semibold xxx-tracking-wide";case"xl":return"h-14 text-xl font-bold xxx-tracking-wide";default:case"base":return"h-8 text-base font-medium xxx-tracking-wide"}}),u=e.computed(()=>{switch(n.size){case"xs":return"px-1";case"sm":return"px-2";case"lg":return"px-4";case"xl":return"px-5";default:case"base":return"px-3"}}),x=e.computed(()=>{const f=[];return n.fullWidth&&f.push("w-full"),a.value&&f.push("cursor-not-allowed"),f.join(" ")}),p=e.computed(()=>{const f=[];return!a.value&&!n.link&&!n.text&&f.push("active:scale-[0.97]"),!a.value&&n.link&&f.push("underline decoration-transparent decoration-2 underline-offset-4 hover:decoration-inherit"),f.join(" ")}),y=e.computed(()=>{const f=n.link||n.text;return["transition inline-flex justify-center items-center space-x-2 outline-none select-none",x.value,v.value,h.value,f?"":i.value,f?"":g.value,f?"":m.value,n.link?"":u.value,p.value].join(" ")}),b=e.computed(()=>{const f=[""];switch(n.loading&&f.push("animate-spin"),n.size){case"xs":f.push("h-3 w-3");break;case"sm":f.push("h-4 w-4");break;case"lg":f.push("h-6 w-6");break;case"xl":f.push("h-8 w-8");break;case"base":default:f.push("h-5 w-5");break}return f.join(" ")}),S=f=>{if(a.value){f.preventDefault(),f.stopPropagation(),f.stopImmediatePropagation();return}l("click",f)};return(f,E)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.to?c.value:"button"),{href:t.to,to:t.to,type:r.value,external:t.external,class:e.normalizeClass(y.value),disabled:a.value,role:"button",onClick:S},{default:e.withCtx(()=>[d.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d.value),{key:0,class:e.normalizeClass(`${b.value} ${t.hideText?"":"mr-2"}`)},null,8,["class"])):e.createCommentVNode("",!0),t.hideText?(e.openBlock(),e.createElementBlock("div",we," ")):e.renderSlot(f.$slots,"default",{key:1},()=>[e.createTextVNode("Button")],!0),t.iconRight||!t.loading?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.iconRight),{key:3,class:e.normalizeClass(`${b.value} ${t.hideText?"":"ml-2"}`)},null,8,["class"])):e.createCommentVNode("",!0)]),_:3},8,["href","to","type","external","class","disabled"]))}});const ce=(t,l)=>{const n=t.__vccOpts||t;for(const[o,s]of l)n[o]=s;return n},M=ce(Ve,[["__scopeId","data-v-38aa371e"]]),ue=e.defineComponent({__name:"Link",props:{to:{type:String,required:!1,default:void 0},external:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:void 0},size:{type:String,default:"base"},foregroundLink:{type:Boolean,default:!1},iconLeft:{type:[Object,Function],default:null},iconRight:{type:[Object,Function],default:null},hideText:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:l}){const n=t,o=s=>{if(n.disabled){s.preventDefault(),s.stopPropagation(),s.stopImmediatePropagation();return}l("click",s)};return(s,c)=>(e.openBlock(),e.createBlock(M,{link:"",to:t.to,external:t.external,disabled:t.disabled,size:t.size,"foreground-link":t.foregroundLink,"icon-left":t.iconLeft,"icon-right":t.iconRight,"hide-text":t.hideText,role:"link",onClickCapture:o},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default",{},()=>[e.createTextVNode("Link")])]),_:3},8,["to","external","disabled","size","foreground-link","icon-left","icon-right","hide-text"]))}});var A=(t=>(t[t.Success=0]="Success",t[t.Warning=1]="Warning",t[t.Danger=2]="Danger",t[t.Info=3]="Info",t))(A||{});const Ee={"aria-live":"assertive",class:"pointer-events-none fixed inset-0 flex items-end px-4 py-6 mt-10 sm:items-start sm:p-6 z-50"},Se={class:"flex w-full flex-col items-center space-y-4 sm:items-end"},Ne={key:0,class:"pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg bg-foundation text-foreground shadow-lg ring-1 ring-primary-muted ring-opacity-5"},$e={class:"p-4"},Ie={class:"flex items-start"},ze={class:"flex-shrink-0"},Le={class:"ml-2 w-0 flex-1 flex flex-col"},De={key:0,class:"text-foreground font-bold"},_e={key:1,class:"label label--light text-foreground-2"},Pe={key:2,class:"flex justify-start mt-2"},je=e.createElementVNode("span",{class:"sr-only"},"Close",-1),Te=e.defineComponent({__name:"ToastRenderer",props:{notification:null},emits:["update:notification"],setup(t,{emit:l}){const n=t,o=e.computed(()=>{var r,a;return!((r=n.notification)!=null&&r.description)&&!((a=n.notification)!=null&&a.cta)}),s=()=>{l("update:notification",null)},c=r=>{var a,d,i;(i=(d=(a=n.notification)==null?void 0:a.cta)==null?void 0:d.onClick)==null||i.call(d,r),s()};return(r,a)=>(e.openBlock(),e.createElementBlock("div",Ee,[e.createElementVNode("div",Se,[e.createVNode(e.Transition,{"enter-active-class":"transform ease-out duration-300 transition","enter-from-class":"translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2","enter-to-class":"translate-y-0 opacity-100 sm:translate-x-0","leave-active-class":"transition ease-in duration-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:e.withCtx(()=>[t.notification?(e.openBlock(),e.createElementBlock("div",Ne,[e.createElementVNode("div",$e,[e.createElementVNode("div",Ie,[e.createElementVNode("div",ze,[t.notification.type===e.unref(A).Success?(e.openBlock(),e.createBlock(e.unref(T.CheckCircleIcon),{key:0,class:"h-6 w-6 text-success","aria-hidden":"true"})):t.notification.type===e.unref(A).Danger?(e.openBlock(),e.createBlock(e.unref(T.XCircleIcon),{key:1,class:"h-6 w-6 text-danger","aria-hidden":"true"})):t.notification.type===e.unref(A).Warning?(e.openBlock(),e.createBlock(e.unref(T.ExclamationCircleIcon),{key:2,class:"h-6 w-6 text-warning","aria-hidden":"true"})):t.notification.type===e.unref(A).Info?(e.openBlock(),e.createBlock(e.unref(T.InformationCircleIcon),{key:3,class:"h-6 w-6 text-info","aria-hidden":"true"})):e.createCommentVNode("",!0)]),e.createElementVNode("div",Le,[t.notification.title?(e.openBlock(),e.createElementBlock("p",De,e.toDisplayString(t.notification.title),1)):e.createCommentVNode("",!0),t.notification.description?(e.openBlock(),e.createElementBlock("p",_e,e.toDisplayString(t.notification.description),1)):e.createCommentVNode("",!0),t.notification.cta?(e.openBlock(),e.createElementBlock("div",Pe,[e.createVNode(ue,{to:t.notification.cta.url,class:"label",primary:"",onClick:c},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.notification.cta.title),1)]),_:1},8,["to"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:e.normalizeClass(["ml-4 flex flex-shrink-0",{"self-center":o.value}])},[e.createElementVNode("button",{type:"button",class:"inline-flex rounded-md bg-foundation text-foreground-2 hover:text-foreground focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",onClick:s},[je,e.createVNode(e.unref($.XMarkIcon),{class:"h-6 w-6","aria-hidden":"true"})])],2)])])])):e.createCommentVNode("",!0)]),_:1})])]))}}),Oe=e.createElementVNode("circle",{cx:"4",cy:"4",r:"3"},null,-1),Me=[Oe],Q=e.defineComponent({__name:"Badge",props:{size:null,colorClasses:null,dot:{type:Boolean},dotIconColorClasses:null,iconLeft:null,rounded:{type:Boolean},clickableIcon:{type:Boolean}},emits:["click-icon"],setup(t,{emit:l}){const n=t,o=e.computed(()=>n.colorClasses||"bg-blue-100 text-blue-800"),s=e.computed(()=>n.dotIconColorClasses||"text-blue-400"),c=e.computed(()=>{const i=["inline-flex items-center",o.value,n.size==="lg"?"px-3 py-0.5 label":"px-2.5 py-0.5 caption font-medium"];return n.rounded?(i.push("rounded"),i.push(n.size==="lg"?"px-2 py-0.5 label":"px-2.5 py-0.5 caption font-medium")):(i.push("rounded-full"),i.push(n.size==="lg"?"px-2.5 py-0.5 label":"px-2.5 py-0.5 caption font-medium")),i.join(" ")}),r=e.computed(()=>{const i=["mt-0.5 ml-0.5 inline-flex h-4 w-4 flex-shrink-0 items-center justify-center rounded-full focus:outline-none"];return n.clickableIcon?i.push("cursor-pointer"):i.push("cursor-default"),i.join(" ")}),a=e.computed(()=>["-ml-0.5 mr-1.5 h-2 w-2",s.value].join(" ")),d=i=>{if(!n.clickableIcon){i.stopPropagation(),i.stopImmediatePropagation(),i.preventDefault();return}l("click-icon",i)};return(i,h)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(c.value)},[t.dot?(e.openBlock(),e.createElementBlock("svg",{key:0,class:e.normalizeClass(a.value),fill:"currentColor",viewBox:"0 0 8 8"},Me,2)):e.createCommentVNode("",!0),e.renderSlot(i.$slots,"default",{},()=>[e.createTextVNode("Badge")]),t.iconLeft?(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass(r.value),onClick:h[0]||(h[0]=g=>d(g))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.iconLeft),{class:e.normalizeClass(["h-4 w-4",s.value])},null,8,["class"]))],2)):e.createCommentVNode("",!0)],2))}});let re=[];function Ae(t){re=re?t:t.slice()}var F=(t=>(t[t.sm=640]="sm",t[t.md=746]="md",t[t.lg=1024]="lg",t[t.xl=1280]="xl",t[t["2xl"]=1536]="2xl",t))(F||{});function de(t){const{props:{modelValue:l,steps:n,orientation:o,goVerticalBelow:s,nonInteractive:c,stepsPadding:r},emit:a}=t,d=e.computed(()=>(o==null?void 0:o.value)==="vertical"?"vertical":"horizontal"),i=e.computed({get:()=>C.clamp((l==null?void 0:l.value)||0,-1,n.value.length),set:p=>a("update:modelValue",C.clamp(p,0,n.value.length))}),h=p=>`${p+1}`,g=p=>p===i.value,m=p=>p<i.value,v=(p,y)=>{var S;if(c!=null&&c.value){y==null||y.preventDefault(),y==null||y.stopPropagation(),y==null||y.stopImmediatePropagation();return}i.value=p;const b=n.value[i.value];(S=b==null?void 0:b.onClick)==null||S.call(b)},u=e.computed(()=>{const p=["flex"];let y,b;return(r==null?void 0:r.value)==="xs"?(y="space-x-2",b="space-y-1"):(r==null?void 0:r.value)==="sm"?(y="space-x-4",b="space-y-1"):(y="space-x-8",b="space-y-4"),p.push("flex"),d.value==="vertical"||s!=null&&s.value?(p.push(`flex-col ${b} justify-center`),(s==null?void 0:s.value)===F.sm?p.push(`sm:flex-row sm:space-y-0 sm:justify-start sm:${y} sm:items-center`):(s==null?void 0:s.value)===F.md?p.push(`md:flex-row md:space-y-0 md:justify-start md:${y} md:items-center`):(s==null?void 0:s.value)===F.lg?p.push(`lg:flex-row lg:space-y-0 lg:justify-start lg:${y} lg:items-center`):(s==null?void 0:s.value)===F.xl&&p.push(`xl:flex-row xl:space-y-0 xl:justify-start xl:${y} xl:items-center`)):p.push(`flex-row ${y} items-center`),p.join(" ")}),x=e.computed(()=>{const p=["flex items-center"];return c!=null&&c.value||p.push("cursor-pointer"),p.join(" ")});return{value:i,isCurrentStep:g,isFinishedStep:m,switchStep:v,getStepDisplayValue:h,listClasses:u,linkClasses:x,orientation:d}}Ae(["sm:space-x-8","md:space-x-8","lg:space-x-8","xl:space-x-8","sm:space-x-2","md:space-x-2","lg:space-x-2","xl:space-x-2","sm:space-x-4","md:space-x-4","lg:space-x-4","xl:space-x-4"]);const Fe=["aria-label"],Re=["href","onClick"],Ue={class:"flex space-x-3 items-center text-primary-focus normal font-medium leading-5"},qe={class:"shrink-0 h-8 w-8 rounded-full bg-primary-focus text-foreground-on-primary inline-flex items-center justify-center"},We={class:"flex flex-col"},He={key:0,class:"label label--light text-foreground"},Ke=["href","onClick"],Ge={class:"flex space-x-3 items-center text-primary-focus normal font-medium leading-5"},Xe={class:"shrink-0 h-8 w-8 rounded-full border-2 border-primary-focus inline-flex items-center justify-center"},Je={class:"flex flex-col"},Qe={key:0,class:"label label--light text-foreground"},Ye=["href","onClick"],Ze={class:"flex space-x-3 items-center text-foreground-disabled normal font-medium leading-5"},et={class:"shrink-0 h-8 w-8 rounded-full border-2 border-foreground-disabled inline-flex items-center justify-center"},tt={class:"flex flex-col"},nt={key:0,class:"label label--light"},ot=e.defineComponent({__name:"Number",props:{ariaLabel:null,orientation:null,steps:null,modelValue:null,goVerticalBelow:null,nonInteractive:{type:Boolean},stepsPadding:null},emits:["update:modelValue"],setup(t,{emit:l}){const n=t,{isCurrentStep:o,isFinishedStep:s,switchStep:c,getStepDisplayValue:r,listClasses:a,linkClasses:d}=de({props:e.toRefs(n),emit:l});return(i,h)=>(e.openBlock(),e.createElementBlock("nav",{class:"flex justify-center","aria-label":t.ariaLabel||"Progress steps"},[e.createElementVNode("ol",{class:e.normalizeClass(e.unref(a))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.steps,(g,m)=>(e.openBlock(),e.createElementBlock("li",{key:g.name},[e.unref(s)(m)?(e.openBlock(),e.createElementBlock("a",{key:0,href:g.href,class:e.normalizeClass(e.unref(d)),onClick:v=>e.unref(c)(m,v)},[e.createElementVNode("div",Ue,[e.createElementVNode("div",qe,[e.createVNode(e.unref($.CheckIcon),{class:"w-5 h-5"})]),e.createElementVNode("div",We,[e.createElementVNode("div",null,e.toDisplayString(g.name),1),g.description?(e.openBlock(),e.createElementBlock("div",He,e.toDisplayString(g.description),1)):e.createCommentVNode("",!0)])])],10,Re)):e.unref(o)(m)?(e.openBlock(),e.createElementBlock("a",{key:1,href:g.href,class:e.normalizeClass(e.unref(d)),"aria-current":"step",onClick:v=>e.unref(c)(m,v)},[e.createElementVNode("div",Ge,[e.createElementVNode("div",Xe,e.toDisplayString(e.unref(r)(m)),1),e.createElementVNode("div",Je,[e.createElementVNode("div",null,e.toDisplayString(g.name),1),g.description?(e.openBlock(),e.createElementBlock("div",Qe,e.toDisplayString(g.description),1)):e.createCommentVNode("",!0)])])],10,Ke)):(e.openBlock(),e.createElementBlock("a",{key:2,href:g.href,class:e.normalizeClass(e.unref(d)),onClick:v=>e.unref(c)(m,v)},[e.createElementVNode("div",Ze,[e.createElementVNode("div",et,e.toDisplayString(e.unref(r)(m)),1),e.createElementVNode("div",tt,[e.createElementVNode("div",null,e.toDisplayString(g.name),1),g.description?(e.openBlock(),e.createElementBlock("div",nt,e.toDisplayString(g.description),1)):e.createCommentVNode("",!0)])])],10,Ye))]))),128))],2)],8,Fe))}}),lt=["aria-label"],st=["href","onClick"],at={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center"},rt={key:0,class:"h-3 w-3 rounded-full bg-foreground-2"},it=["href","onClick"],ct={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center","aria-hidden":"true"},ut={key:0,class:"h-3 w-3 rounded-full bg-foreground"},dt=e.createElementVNode("span",{class:"absolute h-4 w-4 rounded-full bg-outline-2"},null,-1),mt=e.createElementVNode("span",{class:"relative block h-2 w-2 rounded-full bg-primary-focus"},null,-1),ft=["href","onClick"],pt={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center","aria-hidden":"true"},ht={key:0,class:"h-3 w-3 rounded-full bg-foreground-2"},gt={key:1,class:"h-4 w-4 rounded-full bg-foreground-disabled"},vt=e.defineComponent({__name:"Bullet",props:{ariaLabel:null,basic:{type:Boolean},orientation:null,steps:null,modelValue:null,goVerticalBelow:null,nonInteractive:{type:Boolean},stepsPadding:null},emits:["update:modelValue"],setup(t,{emit:l}){const n=t,{isCurrentStep:o,isFinishedStep:s,switchStep:c,listClasses:r,linkClasses:a}=de({props:e.toRefs(n),emit:l}),d=e.computed(()=>{const h=["h6 font-medium leading-7"];let g;return n.stepsPadding==="xs"?g="ml-1":n.stepsPadding==="sm"?g="ml-2":g="ml-3",h.push(g),n.basic&&h.push("sr-only"),h.join(" ")}),i=e.computed(()=>{const h=[];return n.basic&&h.push("basic"),h.join(" ")});return(h,g)=>(e.openBlock(),e.createElementBlock("nav",{class:"flex justify-center","aria-label":t.ariaLabel||"Progress steps"},[e.createElementVNode("ol",{class:e.normalizeClass([e.unref(r),i.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.steps,(m,v)=>(e.openBlock(),e.createElementBlock("li",{key:m.name},[e.unref(s)(v)?(e.openBlock(),e.createElementBlock("a",{key:0,href:m.href,class:e.normalizeClass(e.unref(a)),onClick:u=>e.unref(c)(v,u)},[e.createElementVNode("span",at,[t.basic?(e.openBlock(),e.createElementBlock("span",rt)):(e.openBlock(),e.createBlock(e.unref($.CheckCircleIcon),{key:1,class:"h-full w-full text-primary","aria-hidden":"true"}))]),e.createElementVNode("span",{class:e.normalizeClass(["text-foreground",d.value])},e.toDisplayString(m.name),3)],10,st)):e.unref(o)(v)?(e.openBlock(),e.createElementBlock("a",{key:1,href:m.href,class:e.normalizeClass(e.unref(a)),"aria-current":"step",onClick:u=>e.unref(c)(v,u)},[e.createElementVNode("span",ct,[t.basic?(e.openBlock(),e.createElementBlock("span",ut)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[dt,mt],64))]),e.createElementVNode("span",{class:e.normalizeClass(["text-primary-focus",d.value])},e.toDisplayString(m.name),3)],10,it)):(e.openBlock(),e.createElementBlock("a",{key:2,href:m.href,class:e.normalizeClass(e.unref(a)),onClick:u=>e.unref(c)(v,u)},[e.createElementVNode("div",pt,[t.basic?(e.openBlock(),e.createElementBlock("span",ht)):(e.openBlock(),e.createElementBlock("div",gt))]),e.createElementVNode("p",{class:e.normalizeClass(["text-foreground-disabled",d.value])},e.toDisplayString(m.name),3)],10,ft))]))),128))],2)],8,lt))}}),kt=["disabled"],yt=e.defineComponent({__name:"CardButton",props:{disabled:{type:Boolean},modelValue:{type:Boolean}},emits:["update:modelValue","click"],setup(t,{emit:l}){const n=t,o=e.computed(()=>{const c=["h-20 bg-foundation-2 inline-flex justify-center items-center outline-none","normal px-16 py-5 shadow rounded transition active:scale-95"];return n.disabled?c.push("bg-foundation-disabled text-foreground-2 cursor-not-allowed"):(c.push(n.modelValue?"bg-primary-focus text-foreground-on-primary":"bg-foundation text-foreground"),c.push("ring-outline-2 hover:ring-4")),c.join(" ")}),s=c=>{if(n.disabled){c.preventDefault(),c.stopPropagation(),c.stopImmediatePropagation();return}l("update:modelValue",!n.modelValue),l("click",c)};return(c,r)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(o.value),disabled:t.disabled,onClick:s},[e.renderSlot(c.$slots,"default",{},()=>[e.createTextVNode("Text")])],10,kt))}}),bt={class:"relative flex items-start"},xt={class:"flex h-6 items-center"},Ct=["id","checked","aria-describedby","name","disabled","value"],Bt={class:"ml-2 text-sm",style:{"padding-top":"2px"}},wt=["for"],Vt={key:0,class:"text-danger ml-1"},Et=["id"],St=e.defineComponent({inheritAttrs:!1,__name:"Checkbox",props:{name:{type:String,required:!0},disabled:{type:Boolean,default:!1},label:{type:String,default:void 0},description:{type:String,default:void 0},inlineDescription:{type:Boolean,default:!1},rules:{type:[String,Object,Function,Array],default:void 0},validateOnMount:{type:Boolean,default:!1},showRequired:{type:Boolean,default:!1},modelValue:{type:[String,Boolean],default:void 0},value:{type:[String,Boolean],default:!0},id:{type:String,default:void 0},hideLabel:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t){const l=t,n=p=>`${p}-${J.nanoid()}`,o=e.computed(()=>l.value||l.name),{checked:s,errorMessage:c,handleChange:r,value:a}=X.useField(l.name,l.rules,{validateOnMount:l.validateOnMount,type:"checkbox",checkedValue:o,initialValue:l.modelValue||void 0}),d=e.computed(()=>l.label||l.name),i=e.computed(()=>c.value?"border-danger-lighter":"border-foreground-4 "),h=e.computed(()=>l.description||c.value),g=e.computed(()=>`${l.name}-description`),m=e.computed(()=>{const p=[];return l.inlineDescription?p.push("inline ml-2"):p.push("block"),c.value?p.push("text-danger"):p.push("text-foreground-2"),p.join(" ")}),v=e.ref(n("checkbox")),u=e.computed(()=>l.id||v.value),x=p=>{l.disabled||r(p)};return e.onMounted(()=>{const p=l.modelValue,y=a.value,b=Array.isArray(p)?p.includes(l.value):p===l.value,S=Array.isArray(y)?y.includes(l.value):y===l.value;b!==S&&r(p)}),(p,y)=>(e.openBlock(),e.createElementBlock("div",bt,[e.createElementVNode("div",xt,[e.createElementVNode("input",e.mergeProps({id:u.value,checked:e.unref(s),"aria-describedby":g.value,name:t.name,disabled:t.disabled,value:o.value,type:"checkbox",class:["h-4 w-4 rounded text-primary focus:ring-primary bg-foundation disabled:cursor-not-allowed disabled:bg-disabled disabled:text-disabled-2",i.value]},p.$attrs,{onChange:x}),null,16,Ct)]),e.createElementVNode("div",Bt,[e.createElementVNode("label",{for:u.value,class:e.normalizeClass(["font-medium text-foreground",{"sr-only":t.hideLabel}])},[e.createElementVNode("span",null,e.toDisplayString(d.value),1),t.showRequired?(e.openBlock(),e.createElementBlock("span",Vt,"*")):e.createCommentVNode("",!0)],10,wt),h.value?(e.openBlock(),e.createElementBlock("p",{key:0,id:g.value,class:e.normalizeClass(m.value)},e.toDisplayString(h.value),11,Et)):e.createCommentVNode("",!0)])]))}});function me(t){const{props:l,inputEl:n,emit:o}=t,{value:s,errorMessage:c}=X.useField(l.name,l.rules,{validateOnMount:e.unref(l.validateOnMount),validateOnValueUpdate:e.unref(l.validateOnValueUpdate),initialValue:e.unref(l.modelValue)||void 0}),r=e.computed(()=>{const b=["block label text-foreground-2 mb-2"];return e.unref(l.showLabel)||b.push("sr-only"),b.join(" ")}),a=e.computed(()=>{const b=["block w-full rounded focus:outline-none text-foreground transition-all","disabled:cursor-not-allowed disabled:bg-foundation-disabled disabled:text-disabled-muted","placeholder:text-foreground-2"];return c.value?b.push("border-2 border-danger text-danger-darker focus:border-danger focus:ring-danger"):b.push("border-0 focus:ring-2 focus:ring-outline-2"),e.unref(l.color)==="foundation"?b.push("bg-foundation shadow-sm hover:shadow"):b.push("bg-foundation-page"),b.join(" ")}),d=e.ref(J.nanoid()),i=e.computed(()=>e.unref(l.label)||e.unref(l.name)),h=e.computed(()=>{const b=c.value;return!b||!e.unref(l.useLabelInErrors)?b:b.replace("Value",i.value)}),g=e.computed(()=>h.value&&e.unref(l.hideErrorMessage)),m=e.computed(()=>h.value||e.unref(l.help)),v=e.computed(()=>!!m.value),u=e.computed(()=>v.value?`${e.unref(l.name)}-${d.value}`:void 0),x=e.computed(()=>{const b=["mt-2 text-sm"];return b.push(c.value?"text-danger":"text-foreground-2"),b.join(" ")}),p=()=>{var b;(b=n.value)==null||b.focus()},y=()=>{s.value="",o("change",{value:""}),o("clear")};return e.onMounted(()=>{e.unref(l.autoFocus)&&p()}),{coreClasses:a,title:i,value:s,helpTipId:u,helpTipClasses:x,helpTip:m,hideHelpTip:g,errorMessage:h,clear:y,focus:p,labelClasses:r}}const Nt=["for"],$t={class:"relative"},It=["id","name","placeholder","disabled","aria-invalid","aria-describedby"],zt=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),Lt={key:2,class:"pointer-events-none absolute inset-y-0 mt-0.5 text-4xl right-0 flex items-start pr-2 text-danger opacity-50"},Dt=["id"],_t=e.defineComponent({__name:"TextArea",props:{name:null,showLabel:{type:Boolean},help:null,placeholder:null,label:null,disabled:{type:Boolean},rules:null,validateOnMount:{type:Boolean},validateOnValueUpdate:{type:Boolean},useLabelInErrors:{type:Boolean,default:!0},autoFocus:{type:Boolean},modelValue:{default:""},showClear:{type:Boolean},fullWidth:{type:Boolean},showRequired:{type:Boolean},color:{default:"page"}},emits:["update:modelValue","change","input","clear"],setup(t,{expose:l,emit:n}){const o=t,s=e.ref(null),{coreClasses:c,title:r,value:a,helpTipId:d,helpTipClasses:i,helpTip:h,errorMessage:g,labelClasses:m,clear:v,focus:u}=me({props:e.toRefs(o),emit:n,inputEl:s}),x=e.computed(()=>{const p=["pl-2"];return o.showClear&&g.value?p.push("pr-12"):(o.showClear||g.value)&&p.push("pr-8"),p.join(" ")});return l({focus:u}),(p,y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([t.fullWidth?"w-full":""])},[e.createElementVNode("label",{for:t.name,class:e.normalizeClass(e.unref(m))},[e.createElementVNode("span",null,e.toDisplayString(e.unref(r)),1)],10,Nt),e.createElementVNode("div",$t,[e.withDirectives(e.createElementVNode("textarea",e.mergeProps({id:t.name,ref_key:"inputElement",ref:s,"onUpdate:modelValue":y[0]||(y[0]=b=>e.isRef(a)?a.value=b:null),name:t.name,class:[e.unref(c),x.value,"min-h-[4rem] simple-scrollbar"],placeholder:t.placeholder,disabled:t.disabled,"aria-invalid":e.unref(g)?"true":"false","aria-describedby":e.unref(d)},p.$attrs,{onChange:y[1]||(y[1]=b=>p.$emit("change",{event:b,value:e.unref(a)})),onInput:y[2]||(y[2]=b=>p.$emit("input",{event:b,value:e.unref(a)}))}),null,16,It),[[e.vModelText,e.unref(a)]]),t.showClear?(e.openBlock(),e.createElementBlock("a",{key:0,title:"Clear input",class:"absolute top-2 right-0 flex items-center pr-2 cursor-pointer",onClick:y[3]||(y[3]=(...b)=>e.unref(v)&&e.unref(v)(...b)),onKeydown:y[4]||(y[4]=(...b)=>e.unref(v)&&e.unref(v)(...b))},[zt,e.createVNode(e.unref($.XMarkIcon),{class:"h-5 w-5 text-foreground","aria-hidden":"true"})],32)):e.createCommentVNode("",!0),e.unref(g)?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["pointer-events-none absolute inset-y-0 right-0 flex items-start mt-2",t.showClear?"pr-8":"pr-2"])},[e.createVNode(e.unref($.ExclamationCircleIcon),{class:"h-4 w-4 text-danger","aria-hidden":"true"})],2)):e.createCommentVNode("",!0),t.showRequired&&!e.unref(g)?(e.openBlock(),e.createElementBlock("div",Lt," * ")):e.createCommentVNode("",!0)]),e.unref(d)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(d),class:e.normalizeClass(e.unref(i))},e.toDisplayString(e.unref(h)),11,Dt)):e.createCommentVNode("",!0)],2))}}),Pt=["for"],jt={class:"relative"},Tt={key:0,class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"},Ot=["id","type","name","placeholder","disabled","aria-invalid","aria-describedby"],Mt=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),At={key:2,class:"pointer-events-none absolute inset-y-0 mt-3 text-4xl right-0 flex items-center pr-2 text-danger opacity-50"},Ft=["id"],Rt=e.defineComponent({inheritAttrs:!1,__name:"TextInput",props:{type:{type:String,default:"text"},name:{type:String,required:!0},showLabel:{type:Boolean,required:!1},help:{type:String,default:void 0},placeholder:{type:String,default:void 0},label:{type:String,default:void 0},showRequired:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},rules:{type:[String,Object,Function,Array],default:void 0},validateOnMount:{type:Boolean,default:!1},validateOnValueUpdate:{type:Boolean,default:!1},useLabelInErrors:{type:Boolean,default:!0},customIcon:{type:[Object,Function],default:void 0},autoFocus:{type:Boolean,default:!1},modelValue:{type:String,default:""},size:{type:String,default:"base"},showClear:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},inputClasses:{type:String,default:null},hideErrorMessage:{type:Boolean,default:!1},wrapperClasses:{type:String,default:()=>""},color:{type:String,default:"page"}},emits:["update:modelValue","change","input","clear","focusin","focusout"],setup(t,{expose:l,emit:n}){const o=t,s=e.useSlots(),c=e.ref(null),{coreClasses:r,title:a,value:d,helpTipId:i,helpTipClasses:h,helpTip:g,hideHelpTip:m,errorMessage:v,clear:u,focus:x,labelClasses:p}=me({props:e.toRefs(o),emit:n,inputEl:c}),y=e.computed(()=>{const E=["h-5 w-5"];return v.value?E.push("text-danger"):E.push("text-foreground-2"),E.join(" ")}),b=e.computed(()=>["email","password"].includes(o.type)||o.customIcon),S=e.computed(()=>{const E=[];return b.value?E.push("pl-8"):E.push("pl-2"),s["input-right"]||(v.value||o.showClear)&&(v.value&&o.showClear?E.push("pr-12"):E.push("pr-8")),E.join(" ")}),f=e.computed(()=>{switch(o.size){case"sm":return"h-6";case"lg":return"h-10";case"xl":return"h-14";case"base":default:return"h-8"}});return l({focus:x}),(E,z)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([t.fullWidth?"w-full":"",t.wrapperClasses])},[e.createElementVNode("label",{for:t.name,class:e.normalizeClass(e.unref(p))},[e.createElementVNode("span",null,e.toDisplayString(e.unref(a)),1)],10,Pt),e.createElementVNode("div",jt,[b.value?(e.openBlock(),e.createElementBlock("div",Tt,[t.customIcon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.customIcon),{key:0,class:e.normalizeClass(y.value),"aria-hidden":"true"},null,8,["class"])):t.type==="email"?(e.openBlock(),e.createBlock(e.unref($.EnvelopeIcon),{key:1,class:e.normalizeClass(y.value),"aria-hidden":"true"},null,8,["class"])):t.type==="password"?(e.openBlock(),e.createBlock(e.unref($.KeyIcon),{key:2,class:e.normalizeClass(y.value),"aria-hidden":"true"},null,8,["class"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",e.mergeProps({id:t.name,ref_key:"inputElement",ref:c,"onUpdate:modelValue":z[0]||(z[0]=N=>e.isRef(d)?d.value=N:null),type:t.type,name:t.name,class:[e.unref(r),S.value,f.value,t.inputClasses||""],placeholder:t.placeholder,disabled:t.disabled,"aria-invalid":e.unref(v)?"true":"false","aria-describedby":e.unref(i),role:"textbox"},E.$attrs,{onChange:z[1]||(z[1]=N=>E.$emit("change",{event:N,value:e.unref(d)})),onInput:z[2]||(z[2]=N=>E.$emit("input",{event:N,value:e.unref(d)}))}),null,16,Ot),[[e.vModelDynamic,e.unref(d)]]),e.renderSlot(E.$slots,"input-right",{},()=>[t.showClear?(e.openBlock(),e.createElementBlock("a",{key:0,title:"Clear input",class:"absolute inset-y-0 right-0 flex items-center pr-2 cursor-pointer",onClick:z[3]||(z[3]=(...N)=>e.unref(u)&&e.unref(u)(...N)),onKeydown:z[4]||(z[4]=(...N)=>e.unref(u)&&e.unref(u)(...N))},[Mt,e.createVNode(e.unref($.XMarkIcon),{class:"h-5 w-5 text-foreground","aria-hidden":"true"})],32)):e.createCommentVNode("",!0),e.unref(v)?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["pointer-events-none absolute inset-y-0 right-0 flex items-center",t.showClear?"pr-8":"pr-2"])},[e.createVNode(e.unref($.ExclamationCircleIcon),{class:"h-4 w-4 text-danger","aria-hidden":"true"})],2)):e.createCommentVNode("",!0),t.showRequired&&!e.unref(v)?(e.openBlock(),e.createElementBlock("div",At," * ")):e.createCommentVNode("",!0)])]),e.unref(i)&&!e.unref(m)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(i),class:e.normalizeClass(e.unref(h))},e.toDisplayString(e.unref(g)),11,Ft)):e.createCommentVNode("",!0)],2))}}),fe=/^https?:\/\//,Y=/^[\w-_.+]+@[\w-_.+]+$/,Ut=t=>(t||"").match(Y)?!0:"Value should be a valid e-mail address",qt=t=>(t||"").split(",").map(o=>o.trim()).every(o=>o.match(Y))||"Value should be one or multiple comma-delimited e-mail addresses",Wt=t=>(C.isString(t)&&(t=t.trim()),t?!0:"Value is required"),Ht=(t,l)=>(n,o)=>n===o.form[t]?!0:`Value must be the same as in field '${l||t}'`,Kt=t=>l=>{const{minLength:n,maxLength:o}=t;return l=U.isNullOrUndefined(l)?"":l,C.isString(l)?!C.isUndefined(n)&&l.length<n?`Value needs to be at least ${n} characters long`:!C.isUndefined(o)&&l.length>o?`Value needs to be no more than ${o} characters long`:!0:"Value should be a text string"},Gt=t=>l=>{const{match:n,message:o}=t;return C.isString(l)?n?C.isString(n)?l.includes(n)?!0:o:n.test(l)?!0:o:!0:"Value should be a text string"},Xt=t=>fe.test(t)?!0:"Value is not a valid URL",Jt=t=>Array.isArray(t)&&t.length>0?!0:"Value should have at least a single item selected",Qt=Object.freeze(Object.defineProperty({__proto__:null,VALID_EMAIL:Y,VALID_HTTP_URL:fe,isEmail:Ut,isItemSelected:Jt,isOneOrMultipleEmails:qt,isRequired:Wt,isSameAs:Ht,isStringOfLength:Kt,isUrl:Xt,stringContains:Gt},Symbol.toStringTag,{value:"Module"}));function pe(t){const{skipCalculation:l,elementToWatchForChanges:n,itemContainer:o,trackResize:s=!1,trackMutations:c=!0}=t||{},r=e.ref(0),a=()=>{const d=o.value;if(l!=null&&l.value||!d)return;const i=d.children;let h=0,g=0,m;for(const v of i){const u=v.offsetTop;C.isUndefined(m)?(m=u,h+=1):u===m&&(h+=1),g+=1}r.value=g-h};return s&&O.useResizeObserver(n,a),c&&O.useMutationObserver(n,a,{childList:!0,subtree:!0}),{hiddenItemCount:r}}function Z(t){const{props:l,emit:n,dynamicVisibility:o}=t;let s;if(o){const{elementToWatchForChanges:i,itemContainer:h}=o;s=pe({skipCalculation:e.computed(()=>{var m;return!((m=l.multiple)!=null&&m.value)}),elementToWatchForChanges:i,itemContainer:h}).hiddenItemCount}else s=e.ref(0);const c=e.computed({get:()=>{var h,g;const i=(h=l.modelValue)==null?void 0:h.value;return(g=l.multiple)!=null&&g.value?C.isArray(i)?i:[]:C.isArray(i)?void 0:i},set:i=>{var h,g,m;if((h=l.multiple)!=null&&h.value&&!C.isArray(i)){console.warn("Attempting to set non-array value in selector w/ multiple=true");return}else if(!((g=l.multiple)!=null&&g.value)&&C.isArray(i)){console.warn("Attempting to set array value in selector w/ multiple=false");return}n("update:modelValue",(m=l.multiple)!=null&&m.value?i||[]:i)}}),r=i=>C.isArray(i);return{selectedValue:c,hiddenSelectedItemCount:s,isArrayValue:r,isMultiItemArrayValue:i=>C.isArray(i)&&i.length>1,firstItem:i=>r(i)?i[0]:i}}const Yt=t=>(e.pushScopeId("data-v-60cf597b"),t=t(),e.popScopeId(),t),Zt=Yt(()=>e.createElementVNode("div",{class:"swoosher relative top-0 bg-blue-500/50"},null,-1)),en=[Zt],tn=e.defineComponent({__name:"Bar",props:{loading:{type:Boolean}},setup(t){return(l,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative w-full h-1 bg-blue-500/30 text-xs text-foreground-on-primary overflow-hidden rounded-xl",t.loading?"opacity-100":"opacity-0"])},en,2))}});const ee=ce(tn,[["__scopeId","data-v-60cf597b"]]),nn={class:"flex items-center justify-between w-full"},on={class:"block truncate grow text-left"},ln={class:"pointer-events-none shrink-0 ml-1 flex items-center space-x-2"},sn={key:1,class:"text-4xl text-danger opacity-50 h-4 w-4 leading-6"},an=["disabled"],rn={key:0,class:"flex flex-col mx-1 mb-1"},cn=e.createElementVNode("span",{class:"sr-only label text-foreground"},"Search",-1),un={class:"relative"},dn={class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"},mn=["placeholder"],fn={key:0,class:"px-1"},pn={key:1},hn=e.createElementVNode("div",{class:"text-foreground-2 text-center"},"Nothing found 🤷♂️",-1),gn={class:e.normalizeClass(["block truncate"])},vn=["id"],te=e.defineComponent({__name:"Base",props:{multiple:{type:Boolean,default:!1},items:{type:Array,default:()=>[]},modelValue:{type:[Object,Array,String],default:void 0},search:{type:Boolean,default:!1},filterPredicate:{type:Function,default:void 0},disabledItemPredicate:{type:Function,default:void 0},getSearchResults:{type:Function,default:void 0},searchPlaceholder:{type:String,default:"Search"},label:{type:String,required:!0},placeholder:{type:String},showLabel:{type:Boolean,default:!1},name:{type:String,required:!0},by:{type:String,required:!1},disabled:{type:Boolean,default:!1},buttonStyle:{type:String,default:"base"},hideCheckmarks:{type:Boolean,default:!1},allowUnset:{type:Boolean,default:!0},clearable:{type:Boolean,default:!1},rules:{type:[String,Object,Function,Array],default:void 0},validateOnMount:{type:Boolean,default:!1},validateOnValueUpdate:{type:Boolean,default:!1},useLabelInErrors:{type:Boolean,default:!0},help:{type:String,default:void 0},fixedHeight:{type:Boolean,default:!1},fullyControlValue:{type:Boolean,default:!1},showRequired:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{expose:l,emit:n}){const o=t,{value:s,errorMessage:c}=X.useField(o.name,o.rules,{validateOnMount:o.validateOnMount,validateOnValueUpdate:o.validateOnValueUpdate,initialValue:o.modelValue}),r=e.ref(null),a=e.ref(""),d=e.ref([]),i=e.ref(!1),h=e.ref(1),g=e.ref(J.nanoid()),m=e.computed(()=>e.unref(o.label)||e.unref(o.name)),v=e.computed(()=>{const k=c.value;return!k||!e.unref(o.useLabelInErrors)?k:k.replace("Value",m.value)}),u=e.computed(()=>v.value||e.unref(o.help)),x=e.computed(()=>!!u.value),p=e.computed(()=>x.value?`${e.unref(o.name)}-${g.value}`:void 0),y=e.computed(()=>c.value?"text-danger":"text-foreground-2"),b=e.computed(()=>o.buttonStyle!=="simple"&&o.clearable&&!o.disabled),S=e.computed(()=>{const k=["relative flex group"];return c.value?(k.push("hover:shadow rounded-md"),k.push("text-danger-darker focus:border-danger focus:ring-danger"),o.buttonStyle!=="simple"&&k.push("outline outline-2 outline-danger")):o.buttonStyle!=="simple"&&(k.push("hover:shadow rounded-md"),k.push("outline outline-2 outline-primary-muted")),o.fixedHeight&&k.push("h-8"),k.join(" ")}),f=e.computed(()=>{const k=[];return o.buttonStyle!=="simple"&&k.push(q.value?"bg-foundation-disabled text-foreground-disabled":""),q.value&&k.push("cursor-not-allowed"),k.join(" ")}),E=e.computed(()=>{const k=["relative z-[1]","flex items-center justify-center text-center shrink-0","rounded-r-md overflow-hidden transition-all","text-foreground",ne.value?`w-6 ${f.value}`:"w-0"];return q.value||(k.push("hover:bg-primary hover:text-foreground-on-primary dark:text-foreground-on-primary"),o.buttonStyle==="tinted"?k.push("bg-outline-3"):k.push("bg-primary-muted")),k.join(" ")}),z=e.computed(()=>{const k=["relative z-[2]","normal rounded-md cursor-pointer transition truncate flex-1","flex items-center",f.value];return o.buttonStyle!=="simple"&&(k.push("py-2 px-3"),q.value||(o.buttonStyle==="tinted"?k.push("bg-foundation-page text-foreground"):k.push("bg-foundation text-foreground"))),b.value&&ne.value&&k.push("rounded-r-none"),k.join(" ")}),N=e.computed(()=>!!(o.search&&(o.filterPredicate||o.getSearchResults))),_=e.computed(()=>N.value&&o.getSearchResults),q=e.computed(()=>o.disabled||!o.items.length&&!_.value),L=e.computed({get:()=>{const k=s.value;return o.multiple?C.isArray(k)?k:[]:C.isArray(k)?void 0:k},set:k=>{if(o.multiple&&!C.isArray(k)){console.warn("Attempting to set non-array value in selector w/ multiple=true");return}else if(!o.multiple&&C.isArray(k)){console.warn("Attempting to set array value in selector w/ multiple=false");return}let w;if(o.multiple)w=k||[];else{const B=s.value;w=o.allowUnset&&B&&k&&K(B)===K(k)?void 0:k}o.fullyControlValue?n("update:modelValue",w):s.value=w,h.value+=1}}),ne=e.computed(()=>o.multiple?L.value.length!==0:!!L.value),ye=()=>{o.multiple?L.value=[]:L.value=void 0},be=e.computed(()=>{const k=a.value;return!N.value||!(k!=null&&k.length)?d.value:o.filterPredicate?d.value.filter(w=>{var B;return((B=o.filterPredicate)==null?void 0:B.call(o,w,k))||!1}):d.value}),oe=k=>JSON.stringify(k),K=k=>o.by?k[o.by]:k,G=async()=>{if(!(!_.value||!o.getSearchResults)){i.value=!0;try{d.value=await o.getSearchResults(a.value)}finally{i.value=!1}}},xe=C.debounce(G,1e3),Ce=k=>{const{active:w,disabled:B}=k||{},{hideCheckmarks:D}=o,P=["relative transition cursor-pointer select-none py-1.5 pl-3",D?"":"pr-9"];return B?P.push("opacity-50 cursor-not-allowed"):P.push(w?"text-primary":"text-foreground"),P.join(" ")};return e.watch(()=>o.items,k=>{d.value=k.slice()},{immediate:!0}),e.watch(a,()=>{_.value&&xe()}),e.onMounted(()=>{_.value&&!o.items.length&&G()}),l({triggerSearch:G}),(k,w)=>(e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(),e.createBlock(e.unref(V.Listbox),{key:h.value,modelValue:L.value,"onUpdate:modelValue":w[4]||(w[4]=B=>L.value=B),name:t.name,multiple:t.multiple,by:t.by,disabled:q.value,as:"div"},{default:e.withCtx(()=>[e.createVNode(e.unref(V.ListboxLabel),{class:e.normalizeClass(["block label text-foreground-2 mb-2",{"sr-only":!t.showLabel}])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:1},8,["class"]),e.createElementVNode("div",{class:e.normalizeClass(S.value)},[e.createVNode(e.unref(V.ListboxButton),{class:e.normalizeClass(z.value)},{default:e.withCtx(({open:B})=>[e.createElementVNode("div",nn,[e.createElementVNode("div",on,[!L.value||e.unref(C.isArray)(L.value)&&!L.value.length?e.renderSlot(k.$slots,"nothing-selected",{key:0},()=>[e.createTextVNode(e.toDisplayString(t.placeholder?t.placeholder:t.label),1)]):e.renderSlot(k.$slots,"something-selected",{key:1,value:L.value},()=>[e.createTextVNode(e.toDisplayString(oe(L.value)),1)])]),e.createElementVNode("div",ln,[v.value?(e.openBlock(),e.createBlock(e.unref(I.ExclamationCircleIcon),{key:0,class:"h-4 w-4 text-danger","aria-hidden":"true"})):t.showRequired?(e.openBlock(),e.createElementBlock("div",sn," * ")):e.createCommentVNode("",!0),B?(e.openBlock(),e.createBlock(e.unref(I.ChevronUpIcon),{key:2,class:"h-4 w-4 text-foreground","aria-hidden":"true"})):(e.openBlock(),e.createBlock(e.unref(I.ChevronDownIcon),{key:3,class:"h-4 w-4 text-foreground","aria-hidden":"true"}))])])]),_:3},8,["class"]),b.value?e.withDirectives((e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(E.value),disabled:t.disabled,onClick:w[0]||(w[0]=B=>ye())},[e.createVNode(e.unref(I.XMarkIcon),{class:"w-3 h-3"})],10,an)),[[e.unref(ie.directive),"Clear"]]):e.createCommentVNode("",!0),e.createVNode(e.Transition,{"leave-active-class":"transition ease-in duration-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:e.withCtx(()=>[e.createVNode(e.unref(V.ListboxOptions),{class:"absolute top-[100%] z-10 mt-1 w-full rounded-md bg-foundation-2 py-1 label label--light outline outline-2 outline-primary-muted focus:outline-none shadow",onFocus:w[3]||(w[3]=B=>{var D;return(D=r.value)==null?void 0:D.focus()})},{default:e.withCtx(()=>[N.value?(e.openBlock(),e.createElementBlock("label",rn,[cn,e.createElementVNode("div",un,[e.createElementVNode("div",dn,[e.createVNode(e.unref(I.MagnifyingGlassIcon),{class:"h-5 w-5 text-foreground"})]),e.withDirectives(e.createElementVNode("input",{ref_key:"searchInput",ref:r,"onUpdate:modelValue":w[1]||(w[1]=B=>a.value=B),type:"text",class:"pl-9 w-full border-0 bg-foundation-page rounded placeholder:font-normal normal placeholder:text-foreground-2 focus:outline-none focus:ring-1 focus:border-outline-1 focus:ring-outline-1",placeholder:t.searchPlaceholder,onKeydown:w[2]||(w[2]=e.withModifiers(()=>{},["stop"]))},null,40,mn),[[e.vModelText,a.value]])])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["overflow-auto simple-scrollbar",[N.value?"max-h-52":"max-h-60"]])},[_.value&&i.value?(e.openBlock(),e.createElementBlock("div",fn,[e.createVNode(ee,{loading:!0})])):_.value&&!d.value.length?(e.openBlock(),e.createElementBlock("div",pn,[e.renderSlot(k.$slots,"nothing-found",{},()=>[hn])])):e.createCommentVNode("",!0),!_.value||!i.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(be.value,B=>{var D;return e.openBlock(),e.createBlock(e.unref(V.ListboxOption),{key:K(B),value:B,disabled:((D=t.disabledItemPredicate)==null?void 0:D.call(t,B))||!1},{default:e.withCtx(({active:P,selected:le})=>{var se,ae;return[e.createElementVNode("li",{class:e.normalizeClass(Ce({active:P,disabled:((se=t.disabledItemPredicate)==null?void 0:se.call(t,B))||!1}))},[e.createElementVNode("span",gn,[e.renderSlot(k.$slots,"option",{item:B,active:P,selected:le,disabled:((ae=t.disabledItemPredicate)==null?void 0:ae.call(t,B))||!1},()=>[e.createTextVNode(e.toDisplayString(oe(B)),1)])]),!t.hideCheckmarks&&le?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([P?"text-primary":"text-foreground","absolute inset-y-0 right-0 flex items-center pr-4"])},[e.createVNode(e.unref(I.CheckIcon),{class:"h-5 w-5","aria-hidden":"true"})],2)):e.createCommentVNode("",!0)],2)]}),_:2},1032,["value","disabled"])}),128)):e.createCommentVNode("",!0)],2)]),_:3})]),_:3})],2)]),_:3},8,["modelValue","name","multiple","by","disabled"])),p.value?(e.openBlock(),e.createElementBlock("p",{key:0,id:p.value,class:e.normalizeClass(["mt-2 text-sm",y.value])},e.toDisplayString(u.value),11,vn)):e.createCommentVNode("",!0)]))}}),he=e.defineComponent({__name:"SourceAppBadge",props:{sourceApp:null},setup(t){return(l,n)=>(e.openBlock(),e.createBlock(Q,{"color-classes":"text-foreground-on-primary",rounded:"",style:e.normalizeStyle({backgroundColor:t.sourceApp.bgColor})},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.sourceApp.short),1)]),_:1},8,["style"]))}}),kn={key:0,class:"text-foreground-2 normal"},yn={key:1,class:"flex items-center"},bn={class:"truncate"},xn={class:"flex items-center"},Cn={class:"truncate"},Bn=e.defineComponent({__name:"SourceApps",props:{multiple:{type:Boolean,default:!1},modelValue:{type:[Object,Array],default:void 0},search:{type:Boolean,default:!1},searchPlaceholder:{type:String,default:"Search apps"},selectorPlaceholder:{type:String,default:void 0},label:{type:String,required:!0},showLabel:{type:Boolean,default:!1},name:{type:String,default:void 0},items:{type:Array,default:void 0}},emits:["update:modelValue"],setup(t,{emit:l}){const n=t,o=e.ref(null),s=e.ref(null),{selectedValue:c,hiddenSelectedItemCount:r,isMultiItemArrayValue:a,firstItem:d}=Z({props:e.toRefs(n),emit:l,dynamicVisibility:{elementToWatchForChanges:o,itemContainer:s}}),i=(h,g)=>h.name.toLocaleLowerCase().includes(g.toLocaleLowerCase());return(h,g)=>(e.openBlock(),e.createBlock(te,{modelValue:e.unref(c),"onUpdate:modelValue":g[0]||(g[0]=m=>e.isRef(c)?c.value=m:null),multiple:t.multiple,items:t.items??e.unref(U.SourceApps),search:t.search,"search-placeholder":t.searchPlaceholder,label:t.label,"show-label":t.showLabel,name:t.name||"sourceApps","filter-predicate":i,by:"name"},{"nothing-selected":e.withCtx(()=>[t.selectorPlaceholder?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(t.selectorPlaceholder),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(t.multiple?"Select apps":"Select an app"),1)],64))]),"something-selected":e.withCtx(({value:m})=>[e.unref(a)(m)?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"elementToWatchForChanges",ref:o,class:"flex items-center space-x-0.5 h-5"},[e.createElementVNode("div",{ref_key:"itemContainer",ref:s,class:"flex flex-wrap overflow-hidden space-x-0.5 h-5"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m,v=>(e.openBlock(),e.createBlock(he,{key:v.name,"source-app":v},null,8,["source-app"]))),128))],512),e.unref(r)>0?(e.openBlock(),e.createElementBlock("div",kn," +"+e.toDisplayString(e.unref(r)),1)):e.createCommentVNode("",!0)],512)):(e.openBlock(),e.createElementBlock("div",yn,[e.createElementVNode("div",{class:"h-2 w-2 rounded-full mr-2",style:e.normalizeStyle({backgroundColor:e.unref(d)(m).bgColor})},null,4),e.createElementVNode("span",bn,e.toDisplayString(e.unref(d)(m).name),1)]))]),option:e.withCtx(({item:m})=>[e.createElementVNode("div",xn,[e.createElementVNode("div",{class:"h-2 w-2 rounded-full mr-2",style:e.normalizeStyle({backgroundColor:m.bgColor})},null,4),e.createElementVNode("span",Cn,e.toDisplayString(m.name),1)])]),_:1},8,["modelValue","multiple","items","search","search-placeholder","label","show-label","name"]))}}),wn={class:"flex flex-wrap gap-1.5 text-xs"},Vn=e.defineComponent({__name:"Badges",props:{items:null,label:null,name:null,help:null,modelValue:null,multiple:{type:Boolean},rules:null,by:null},emits:["update:modelValue"],setup(t,{emit:l}){const n=t,{selectedValue:o,isArrayValue:s}=Z({props:e.toRefs(n),emit:l}),c=r=>{s(o.value)?o.value=o.value.filter(a=>a.id!==r.id):o.value=void 0};return(r,a)=>(e.openBlock(),e.createBlock(te,{modelValue:e.unref(o),"onUpdate:modelValue":a[0]||(a[0]=d=>e.isRef(o)?o.value=d:null),multiple:t.multiple,items:t.items,label:t.label,name:t.name,help:t.help,rules:t.rules,by:t.by},{"something-selected":e.withCtx(({value:d})=>[e.createElementVNode("ul",wn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s)(d)?d:[d],i=>(e.openBlock(),e.createElementBlock("li",{key:i[t.by]},[e.createVNode(Q,{size:"lg","clickable-icon":!0,"icon-left":e.unref(I.XMarkIcon),onClickIcon:e.withModifiers(h=>c(i),["stop"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.text),1)]),_:2},1032,["icon-left","onClickIcon"])]))),128))])]),option:e.withCtx(({item:d})=>[e.createTextVNode(e.toDisplayString(d.text),1)]),_:1},8,["modelValue","multiple","items","label","name","help","rules","by"]))}}),En={class:"flex items-center"},Sn={class:"absolute inset-0 flex items-center gap-2 px-1 text-white"},Nn=e.defineComponent({__name:"Switch",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(t){const l=e.useModel(t,"modelValue");return(n,o)=>(e.openBlock(),e.createElementBlock("div",En,[e.createVNode(e.unref(V.Switch),{modelValue:l.value,"onUpdate:modelValue":o[0]||(o[0]=s=>l.value=s),class:e.normalizeClass(["relative inline-flex flex-shrink-0 h-6 w-11 border-2 border-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary",{"bg-primary":l.value,"bg-primary-muted":!l.value}])},{default:e.withCtx(()=>[e.createElementVNode("div",Sn,[e.createVNode(e.unref(I.CheckIcon),{class:"h-5 w-5 drop-shadow-md"}),e.createVNode(e.unref(I.XMarkIcon),{class:"h-5 w-5 drop-shadow-md"})]),e.createElementVNode("span",{class:e.normalizeClass(["scale-95 pointer-events-none inline-block h-5 w-5 rounded-full bg-white shadow transform ring-0 transition ease-in-out duration-200",{"translate-x-5":l.value,"translate-x-0":!l.value}])},null,2)]),_:1},8,["modelValue","class"])]))}});var R=(t=>(t.CtrlOrCmd="cmd-or-ctrl",t.AltOrOpt="alt-or-opt",t.Shift="shift",t))(R||{});const W=U.getClientOperatingSystem(),$n={["cmd-or-ctrl"]:W===U.OperatingSystem.Mac?"Cmd":"Ctrl",["alt-or-opt"]:W===U.OperatingSystem.Mac?"Opt":"Alt",shift:"Shift"};function In(t){const l=n=>Object.values(R).includes(n);return t.map(n=>l(n)?$n[n]:n).join("+")}function zn(t,...l){O.onKeyDown(l[0],n=>{const o=n.getModifierState("Alt"),s=W===U.OperatingSystem.Mac?n.getModifierState("Meta"):n.getModifierState("Control"),c=n.getModifierState("Shift");for(const r of t)switch(r){case R.CtrlOrCmd:if(!s)return;break;case R.AltOrOpt:if(!o)return;break;case R.Shift:if(!c)return;break}l[1](n)},l[2])}function Ln(t){const l=(t==null?void 0:t.model)||e.ref(),n=e.computed({get:()=>!!l.value,set:o=>l.value=o?!0:void 0});return{model:l,isChecked:n}}const Dn=e.createElementVNode("div",{class:"fixed inset-0 bg-neutral-100/70 dark:bg-neutral-900/70 transition-opacity"},null,-1),_n={class:"fixed inset-0 z-10 overflow-y-auto"},Pn={class:"flex min-h-full justify-center p-4 text-center items-center sm:p-0"},jn={key:0,class:"flex items-center justify-center shadow p-4 relative z-10 bg-foundation rounded-t-lg"},Tn={class:"text-2xl font-bold"},On={class:"p-4 sm:p-6"},Mn={key:2,class:"flex p-4 sm:px-6 sm:py-5 border-t gap-2 border-outline-3"},An=e.defineComponent({__name:"Dialog",props:{open:{type:Boolean},maxWidth:null,hideCloser:{type:Boolean},preventCloseOnClickOutside:{type:Boolean},title:null,buttons:null,onSubmit:{type:Function}},emits:["update:open","fully-closed"],setup(t,{emit:l}){const n=t,o=e.useSlots(),s=e.computed(()=>!!n.onSubmit),c=e.computed(()=>n.buttons||o.buttons),r=e.computed({get:()=>n.open,set:h=>l("update:open",h)}),a=e.computed(()=>{switch(n.maxWidth){case"sm":return 0;case"md":return 1;case"lg":return 2;case"xl":return 3;default:return 1e4}}),d=e.computed(()=>{const h=["w-full","sm:my-8 sm:w-full sm:max-w-xl"];return!n.title&&!c.value&&h.push("px-4 pt-4 pb-4","sm:p-6"),a.value>=1&&h.push("md:max-w-2xl"),a.value>=2&&h.push("lg:max-w-4xl"),a.value>=3&&h.push("xl:max-w-6xl"),a.value>=4&&h.push("2xl:max-w-7xl"),h.join(" ")}),i=()=>{n.preventCloseOnClickOutside||(r.value=!1)};return(h,g)=>(e.openBlock(),e.createBlock(e.unref(V.TransitionRoot),{as:"template",show:r.value},{default:e.withCtx(()=>[e.createVNode(e.unref(V.Dialog),{as:"div",class:"relative z-40",onClose:i},{default:e.withCtx(()=>[e.createVNode(e.unref(V.TransitionChild),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in duration-200","leave-from":"opacity-100","leave-to":"opacity-0"},{default:e.withCtx(()=>[Dn]),_:1}),e.createElementVNode("div",_n,[e.createElementVNode("div",Pn,[e.createVNode(e.unref(V.TransitionChild),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95","enter-to":"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200","leave-from":"opacity-100 translate-y-0 sm:scale-100","leave-to":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",onAfterLeave:g[1]||(g[1]=m=>h.$emit("fully-closed"))},{default:e.withCtx(()=>[e.createVNode(e.unref(V.DialogPanel),{class:e.normalizeClass(["transform rounded-lg bg-foundation text-left shadow-xl transition-all",d.value]),as:s.value?"form":"div",onSubmit:e.withModifiers(t.onSubmit,["prevent"])},{default:e.withCtx(()=>[t.title?(e.openBlock(),e.createElementBlock("div",jn,[e.createElementVNode("h4",Tn,e.toDisplayString(t.title),1)])):e.createCommentVNode("",!0),t.hideCloser?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:1,class:"absolute z-20 top-5 right-4 text-foreground",onClick:g[0]||(g[0]=m=>r.value=!1)},[e.createVNode(e.unref(T.XMarkIcon),{class:"h-6 w-6"})])),e.createElementVNode("div",On,[e.renderSlot(h.$slots,"default",{},()=>[e.createTextVNode("Put your content here!")])]),c.value?(e.openBlock(),e.createElementBlock("div",Mn,[t.buttons?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.buttons,(m,v)=>(e.openBlock(),e.createBlock(e.unref(M),e.mergeProps({key:v},m.props,{onClick:m.onClick}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.text),1)]),_:2},1040,["onClick"]))),128)):e.renderSlot(h.$slots,"buttons",{key:1})])):e.createCommentVNode("",!0)]),_:3},8,["class","as","onSubmit"])]),_:3})])])]),_:3})]),_:3},8,["show"]))}}),Fn={class:"inline-flex items-center space-x-2"},Rn={class:"label-light"},Un=e.defineComponent({__name:"Disclosure",props:{title:null,icon:null,color:{default:"default"}},setup(t){const l=t,n=e.computed(()=>{const s=["pr-3 h-10 w-full flex items-center justify-between border-l-2 px-2 rounded transition","ring-1 font-medium"];switch(l.color){case"warning":s.push("border-warning text-warning ring-warning-lighter hover:ring-warning");break;case"success":s.push("border-success text-success ring-success-lighter hover:ring-success");break;case"danger":s.push("border-danger text-danger ring-danger-lighter hover:ring-danger");break;case"default":default:s.push("border-primary text-primary ring-primary-muted hover:ring-primary");break}return s.join(" ")}),o=e.computed(()=>{const s=["mt-4 px-3 py-1 border-x "];switch(l.color){case"warning":s.push("border-warning-lighter");break;case"success":s.push("border-success-lighter");break;case"danger":s.push("border-danger-lighter");break;case"default":default:s.push("border-primary-muted");break}return s.join(" ")});return(s,c)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(V.Disclosure),null,{default:e.withCtx(({open:r})=>[e.createVNode(e.unref(V.DisclosureButton),{class:e.normalizeClass(n.value)},{default:e.withCtx(()=>[e.createElementVNode("div",Fn,[t.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon),{key:0,class:"h-4 w-4"})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(t.title),1)]),e.createVNode(e.unref(I.ChevronUpIcon),{class:e.normalizeClass([r?"":"rotate-180 transform","h-5 w-5"])},null,8,["class"])]),_:2},1032,["class"]),e.createVNode(e.unref(V.DisclosurePanel),{class:e.normalizeClass(o.value)},{default:e.withCtx(()=>[e.createElementVNode("div",Rn,[e.renderSlot(s.$slots,"default",{},()=>[e.createTextVNode("Panel contents")])])]),_:3},8,["class"])]),_:3})]))}});var j=(t=>(t.Grid="grid",t.List="list",t))(j||{});const qn=e.defineComponent({__name:"GridListToggle",props:{modelValue:null},emits:["click","update:modelValue"],setup(t,{emit:l}){const n=t,o=e.computed({get:()=>n.modelValue||j.Grid,set:r=>l("update:modelValue",r)}),s=e.computed(()=>o.value===j.Grid?I.Bars3Icon:I.Squares2X2Icon),c=r=>{l("click",r);const a=o.value===j.Grid?j.List:j.Grid;o.value=a};return(r,a)=>(e.openBlock(),e.createElementBlock("button",{class:"flex items-center justify-center rounded bg-foundation h-8 w-8 shadow cursor-pointer text-foreground",onClick:c},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value),{class:"h-6 w-6"}))]))}});var ge=(t=>(t[t.Throttle=0]="Throttle",t[t.Debounce=1]="Debounce",t))(ge||{}),H=(t=>(t[t.Left=0]="Left",t[t.Right=1]="Right",t))(H||{});function ve(t,l){if(!O.isClient)return;const{wait:n=100,throttleOrDebounce:o=0}=l||{},s=n?o===0?C.throttle(t,n):C.debounce(t,n):t;e.onMounted(()=>window.addEventListener("resize",s)),e.onBeforeUnmount(()=>window.removeEventListener("resize",s))}function Wn(t){e.onMounted(()=>{window.addEventListener("beforeunload",t)}),e.onBeforeUnmount(()=>{window.removeEventListener("beforeunload",t)})}function ke(t){const{el:l,defaultDirection:n}=t,o=e.ref(C.isUndefined(n)?1:n),s=e.computed(()=>{const r=e.unref(t.stopUpdatesBelowWidth);if(!C.isUndefined(r))return r;const a=e.unref(l);return a!=null&&a.offsetWidth?a.offsetWidth*2:void 0}),c=()=>{if(!O.isClient)return;const r=e.unref(l);if(!r)return;const a=r.getBoundingClientRect(),d=a.x+a.width>window.innerWidth,i=a.x<0;d&&i||!C.isUndefined(s.value)&&window.innerWidth<s.value||(d?o.value=0:i&&(o.value=1))};return ve(()=>c()),e.watch(()=>e.unref(l),r=>{r&&c()}),{direction:e.computed(()=>o.value),recalculateDirection:c}}const Hn=["disabled","onClick"],Kn=e.defineComponent({__name:"Menu",props:{open:{type:Boolean},items:null},emits:["update:open","chosen"],setup(t,{emit:l}){const n=t,o=e.ref(null),{direction:s}=ke({el:e.computed(()=>{var m;return((m=o.value)==null?void 0:m.el)||null}),defaultDirection:H.Left,stopUpdatesBelowWidth:300}),c=e.ref(null),r=e.ref(!1),a=e.computed({get:()=>n.open||!1,set:m=>l("update:open",m)}),d=m=>{const{active:v,disabled:u}=m,x=["group flex w-full items-center rounded-md px-2 py-2 text-sm"];return v?x.push("bg-primary text-foreground-on-primary"):u?x.push("text-foreground-disabled"):x.push("text-foreground"),x.join(" ")},i=(m,v)=>{l("chosen",{item:m,event:v})},h=()=>{var m;return(m=c.value)==null?void 0:m.el.click()},g=m=>{const v=!!m;return r.value=v,v};return e.watch(r,(m,v)=>{m!==v&&(a.value=m)}),e.watch(a,m=>{(m&&!r.value||!m&&r.value)&&h()}),(m,v)=>(e.openBlock(),e.createBlock(e.unref(V.Menu),{as:"div",class:"relative inline-block"},{default:e.withCtx(({open:u})=>[e.createElementVNode("div",null,[e.createVNode(e.unref(V.MenuButton),{ref_key:"menuButton",ref:c,class:"hidden",onClick:v[0]||(v[0]=e.withModifiers(()=>{},["stop","prevent"]))},null,512),e.createElementVNode("div",{class:e.normalizeClass(u?"pointer-events-none":"")},[e.renderSlot(m.$slots,"default",{toggle:h,open:g(u)})],2)]),e.createVNode(e.Transition,{"enter-active-class":"transition duration-100 ease-out","enter-from-class":"transform scale-95 opacity-0","enter-to-class":"transform scale-100 opacity-100","leave-active-class":"transition duration-75 ease-in","leave-from-class":"transform scale-100 opacity-100","leave-to-class":"transform scale-95 opacity-0"},{default:e.withCtx(()=>[e.createVNode(e.unref(V.MenuItems),{ref_key:"menuItems",ref:o,class:e.normalizeClass(["absolute mt-2 w-56 origin-top-right divide-y divide-outline-3 rounded-md bg-foundation shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none z-40",e.unref(s)===e.unref(H).Left?"right-0":""])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(x,p)=>(e.openBlock(),e.createElementBlock("div",{key:p,class:"px-1 py-1"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x,y=>(e.openBlock(),e.createBlock(e.unref(V.MenuItem),{key:y.id,disabled:y.disabled},{default:e.withCtx(({active:b,disabled:S})=>[e.withDirectives((e.openBlock(),e.createElementBlock("span",null,[e.createElementVNode("button",{class:e.normalizeClass(d({active:b,disabled:S})),disabled:S,onClick:f=>i(y,f)},[e.renderSlot(m.$slots,"item",{item:y},()=>[e.createTextVNode(e.toDisplayString(y.title),1)])],10,Hn)])),[[e.unref(ie.directive),y.disabled&&y.disabledTooltip]])]),_:2},1032,["disabled"]))),128))]))),128))]),_:3},8,["class"])]),_:3})]),_:3}))}}),Gn={class:"flex flex-col space-y-4"},Xn={class:"flex space-x-6"},Jn=e.defineComponent({__name:"Tabs",props:{items:null},setup(t){const l=t,n=e.ref(null),o=e.computed(()=>n.value&&l.items.find(c=>c.id===n.value)||l.items[0]),s=c=>{n.value=c.id};return(c,r)=>(e.openBlock(),e.createElementBlock("div",Gn,[e.createElementVNode("div",Xn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,a=>(e.openBlock(),e.createBlock(M,{key:a.id,link:"",color:o.value.id===a.id?"default":"secondary",onClick:d=>s(a)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.title),1)]),_:2},1032,["color","onClick"]))),128))]),e.renderSlot(c.$slots,"default",{activeItem:o.value})]))}}),Qn={class:"text-foreground"},Yn={class:"w-full text-sm overflow-x-auto overflow-y-visible simple-scrollbar"},Zn=["onClick","onKeypress"],eo=e.createElementVNode("div",{class:"text-gray-900 font-medium order-1"},"Placeholder",-1),to={class:"absolute right-1.5 gap-1 flex items-center p-0"},no=e.defineComponent({__name:"Table",props:{items:null,buttons:null,columns:null,overflowCells:{type:Boolean},onRowClick:{type:Function}},setup(t){const l=t,n=e.computed(()=>{const r=(l.buttons||[]).length;let a=16;return r>0&&(a=48+(r-1)*42),`${a}px`}),o=r=>{var a;return((a=l.columns.find(d=>d.id===r))==null?void 0:a.classes)||""},s=(r,a)=>{const d=o(r);return a===0?`bg-transparent py-3 pr-5 px-1 ${d}`:`lg:p-0 px-1 ${d}`},c=r=>{var a;(a=l.onRowClick)==null||a.call(l,r)};return(r,a)=>(e.openBlock(),e.createElementBlock("div",Qn,[e.createElementVNode("div",Yn,[t.items.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:"grid z-10 grid-cols-12 items-center gap-6 font-semibold bg-foundation rounded-t-lg w-full border-b border-outline-3 pb-2 pt-4 px-4 min-w-[900px]",style:e.normalizeStyle({paddingRight:n.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,d=>(e.openBlock(),e.createElementBlock("div",{key:d.id,class:e.normalizeClass([o(d.id),"capitalize"])},e.toDisplayString(d.header),3))),128))],4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["divide-y divide-outline-3 h-full overflow-visible",{"pb-32":t.overflowCells}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,d=>(e.openBlock(),e.createElementBlock("div",{key:d.id,class:e.normalizeClass(["relative grid grid-cols-12 items-center gap-6 px-4 py-1 min-w-[900px] bg-foundation",{"cursor-pointer hover:bg-primary-muted":!!t.onRowClick}]),style:e.normalizeStyle({paddingRight:n.value}),tabindex:"0",onClick:i=>c(d),onKeypress:i=>c(d)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,(i,h)=>(e.openBlock(),e.createElementBlock("div",{key:i.id,class:e.normalizeClass(s(i.id,h)),tabindex:"0"},[e.renderSlot(r.$slots,i.id,{item:d},()=>[eo])],2))),128)),e.createElementVNode("div",to,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.buttons,i=>(e.openBlock(),e.createElementBlock("div",{key:i.label},[e.createVNode(e.unref(M),{"icon-left":i.icon,size:"sm",color:"secondary","hide-text":"",class:e.normalizeClass(i.class),onClick:e.withModifiers(h=>i.action(d),["stop"])},null,8,["icon-left","class","onClick"])]))),128))])],46,Zn))),128))],2)])]))}}),oo={class:"w-full flex flex-col items-center my-2 space-y-2 mt-4"},lo={class:"inline-flex items-center space-x-1"},so=e.createElementVNode("span",{class:"text-foreground-2"},"That's it, you've loaded everything!",-1),ao={class:"w-full flex flex-col items-center my-2 space-y-2 mt-4"},ro={class:"inline-flex items-center space-x-1"},io=e.createElementVNode("span",{class:"text-foreground-2"},"An error occurred while loading",-1),co=e.defineComponent({__name:"InfiniteLoading",props:{settings:null,allowRetry:{type:Boolean}},emits:["infinite"],setup(t){const l=e.ref(null),n=e.ref(!1);return O.isClient&&e.onMounted(()=>{const o=setInterval(()=>{var s;(s=l.value)!=null&&s.isConnected&&(n.value=!0,clearInterval(o))},200)}),(o,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:l},[n.value?(e.openBlock(),e.createBlock(e.unref(Be),e.mergeProps({key:0},o.$props.settings||{},{onInfinite:s[0]||(s[0]=c=>o.$emit("infinite",c))}),{spinner:e.withCtx(()=>[e.createVNode(ee,{loading:!0,class:"my-2"})]),complete:e.withCtx(()=>[e.createElementVNode("div",oo,[e.createElementVNode("div",lo,[e.createVNode(e.unref(T.CheckIcon),{class:"w-5 h-5 text-success"}),so])])]),error:e.withCtx(({retry:c})=>[e.createElementVNode("div",ao,[e.createElementVNode("div",ro,[e.createVNode(e.unref(T.ExclamationTriangleIcon),{class:"w-5 h-5 text-danger"}),io]),t.allowRetry?(e.openBlock(),e.createBlock(M,{key:0,onClick:c},{default:e.withCtx(()=>[e.createTextVNode("Retry")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)])]),_:1},16)):e.createCommentVNode("",!0)],512))}}),uo={class:"relative group"},mo={key:0,class:"absolute -inset-1 bg-blue-300 dark:bg-blue-500 opacity-5 dark:opacity-0 rounded-md blur-sm group-hover:opacity-60 dark:group-hover:opacity-30 transition duration-500"},fo=e.defineComponent({__name:"Panel",props:{form:{type:Boolean,default:!1},ring:{type:Boolean,default:!1},fancyGlow:{type:Boolean,default:!1},customPadding:{type:Boolean,default:!1},noShadow:{type:Boolean,default:!1},panelClasses:{type:String}},emits:["submit"],setup(t,{emit:l}){const n=t,o=e.computed(()=>n.customPadding?"":"px-4 py-4 sm:px-6"),s=e.computed(()=>n.customPadding?"":"px-4 py-4 sm:p-6"),c=e.computed(()=>{const r=["rounded-lg"];return n.noShadow||r.push("shadow"),n.ring&&r.push("ring-outline-2 hover:ring-2"),n.panelClasses&&r.push(n.panelClasses),r.join(" ")});return(r,a)=>(e.openBlock(),e.createElementBlock("div",uo,[t.fancyGlow?(e.openBlock(),e.createElementBlock("div",mo)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.form?"form":"div"),{class:e.normalizeClass(["relative divide-outline-3 bg-foundation text-foreground flex flex-col divide-y overflow-hidden",c.value]),onSubmit:a[0]||(a[0]=d=>l("submit",d))},{default:e.withCtx(()=>[r.$slots.header?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(o.value)},[e.renderSlot(r.$slots,"header")],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["grow",s.value])},[e.renderSlot(r.$slots,"default")],2),r.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(o.value)},[e.renderSlot(r.$slots,"footer")],2)):e.createCommentVNode("",!0)]),_:3},40,["class"]))]))}}),po={class:"flex-shrink-0"},ho=e.createElementVNode("span",{class:"sr-only"},"Dismiss",-1),go=e.defineComponent({__name:"Alert",props:{color:{default:"success"},withDismiss:{type:Boolean},actions:null,customIcon:null,size:{default:"default"}},emits:["dismiss"],setup(t){const l=t,n=e.useSlots(),o=e.computed(()=>!!n.description),s=e.computed(()=>{if(l.customIcon)return l.customIcon;switch(l.color){case"info":return $.InformationCircleIcon;case"warning":return $.ExclamationCircleIcon;case"danger":return $.XCircleIcon;case"success":default:return $.CheckCircleIcon}}),c=e.computed(()=>{const u=[];switch(l.size){case"xs":u.push("p-1");break;case"default":default:u.push(o.value?"p-4":"p-2");break}switch(l.color){case"success":u.push("bg-success-lighter border-l-4 border-success");break;case"info":u.push("bg-info-lighter border-l-4 border-info");break;case"danger":u.push("bg-danger-lighter border-l-4 border-danger");break;case"warning":u.push("bg-warning-lighter border-l-4 border-warning");break}return u.join(" ")}),r=e.computed(()=>{const u=[];if(o.value)u.push("");else switch(u.push("items-center"),l.size){case"xs":u.push("space-x-1");break;case"default":default:u.push("space-x-2");break}return u.join(" ")}),a=e.computed(()=>{const u=["grow"];switch(o.value||u.push("flex items-center space-x-2"),l.size){case"xs":u.push("ml-1");break;case"default":default:u.push("ml-3");break}return u.join(" ")}),d=e.computed(()=>{const u=[];switch(l.size){case"xs":u.push("text-xs");break;case"default":default:u.push("mt-2 text-sm");break}return u.join(" ")}),i=e.computed(()=>{var p;const u=["flex"];o.value||u.push("grow justify-end");const x=o.value&&((p=l.actions)==null?void 0:p.length);switch(l.size){case"xs":u.push("space-x-1"),x&&u.push("mt-1");break;case"default":default:u.push("space-x-2"),x&&u.push("mt-4");break}return u.join(" ")}),h=e.computed(()=>{const u=[];switch(l.color){case"success":u.push("text-success-darker");break;case"info":u.push("text-info-darker");break;case"danger":u.push("text-danger-darker");break;case"warning":u.push("text-warning-darker");break}return u.join(" ")}),g=e.computed(()=>{const u=[];switch(l.size){case"xs":u.push("h-4 w-4"),u.push(o.value?"mt-0.5":"");break;case"default":default:u.push("h-5 w-5");break}switch(l.color){case"success":u.push("text-success");break;case"info":u.push("text-info");break;case"danger":u.push("text-danger");break;case"warning":u.push("text-warning");break}return u.join(" ")}),m=e.computed(()=>{const u=[];switch(l.color){case"success":u.push("bg-success-lighter ring-success");break;case"info":u.push("bg-info-lighter ring-info");break;case"danger":u.push("bg-danger-lighter ring-danger");break;case"warning":u.push("bg-warning-lighter ring-warning");break}return u.join(" ")}),v=e.computed(()=>{switch(l.size){case"xs":return"xs";case"default":default:return"sm"}});return(u,x)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["rounded-md",[c.value,h.value]])},[e.createElementVNode("div",{class:e.normalizeClass(["flex",r.value])},[e.createElementVNode("div",po,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value),{class:e.normalizeClass(g.value),"aria-hidden":"true"},null,8,["class"]))]),e.createElementVNode("div",{class:e.normalizeClass(a.value)},[e.createElementVNode("h3",{class:e.normalizeClass(["text-sm",[o.value?"font-medium":""]])},[e.renderSlot(u.$slots,"title",{},()=>[e.createTextVNode("Title")])],2),o.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(d.value)},[e.renderSlot(u.$slots,"description",{},()=>[e.createTextVNode(" Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquid pariatur, ipsum similique veniam. ")])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(i.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.actions||[],(p,y)=>(e.openBlock(),e.createBlock(M,{key:y,color:t.color,size:v.value,to:p.url,external:p.externalUrl||!1,onClick:b=>p.onClick||e.unref(C.noop)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.title),1)]),_:2},1032,["color","size","to","external","onClick"]))),128))],2)],2),t.withDismiss?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["flex",[o.value?"items-start":"items-center"]])},[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["inline-flex rounded-md focus:outline-none focus:ring-2",m.value]),onClick:x[0]||(x[0]=p=>u.$emit("dismiss"))},[ho,e.createVNode(e.unref($.XMarkIcon),{class:"h-5 w-5","aria-hidden":"true"})],2)],2)):e.createCommentVNode("",!0)],2)],2))}});function vo(t){var u,x;const{get:l,initialState:n,readOptions:o,set:s,asyncRead:c=!0,debugging:r}=t,a=r==null?void 0:r.log,d=()=>(new Error("Trace:").stack||"").substring(7),i=((x=(u=t.debugging)==null?void 0:u.log)==null?void 0:x.logger)||console.debug,h=a&&!a.writesOnly?()=>{const p=l();return i(`debugging: '${a.name}' read`,p,d()),p}:l,g=a&&!a.readsOnly?p=>(i(`debugging: '${a.name}' written to`,p,d()),s(p)):s,m=c?O.computedAsync(h,n,o):e.computed(h),v=e.computed(()=>m.value);return v.update=g,v}exports.CommonAlert=go;exports.CommonBadge=Q;exports.CommonLoadingBar=ee;exports.CommonStepsBullet=vt;exports.CommonStepsNumber=ot;exports.CommonTextLink=ue;exports.FormButton=M;exports.FormCardButton=yt;exports.FormCheckbox=St;exports.FormSelectBadges=Vn;exports.FormSelectBase=te;exports.FormSelectSourceApps=Bn;exports.FormSwitch=Nn;exports.FormTextArea=_t;exports.FormTextInput=Rt;exports.GlobalToastRenderer=Te;exports.GridListToggleValue=j;exports.HorizontalDirection=H;exports.InfiniteLoading=co;exports.LayoutDialog=An;exports.LayoutDisclosure=Un;exports.LayoutGridListToggle=qn;exports.LayoutMenu=Kn;exports.LayoutPanel=fo;exports.LayoutTable=no;exports.LayoutTabs=Jn;exports.ModifierKeys=R;exports.SourceAppBadge=he;exports.TailwindBreakpoints=F;exports.ThrottleOrDebounce=ge;exports.ToastNotificationType=A;exports.ValidationHelpers=Qt;exports.clientOs=W;exports.getKeyboardShortcutTitle=In;exports.onKeyboardShortcut=zn;exports.useFormCheckboxModel=Ln;exports.useFormSelectChildInternals=Z;exports.useOnBeforeWindowUnload=Wn;exports.useResponsiveHorizontalDirectionCalculation=ke;exports.useWindowResizeHandler=ve;exports.useWrappingContainerHiddenCount=pe;exports.writableAsyncComputed=vo;
|
|
2
|
+
//# sourceMappingURL=lib.cjs.map
|