@speckle/ui-components 2.18.1 → 2.18.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/lib.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var Ge=Object.defineProperty;var Xe=(t,n,a)=>n in t?Ge(t,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[n]=a;var W=(t,n,a)=>(Xe(t,typeof n!="symbol"?n+"":n,a),a);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),B=require("lodash"),T=require("@heroicons/vue/24/solid"),j=require("@heroicons/vue/24/outline"),D=require("@heroicons/vue/20/solid"),X=require("@speckle/shared"),le=require("vee-validate"),ie=require("nanoid"),P=require("@vueuse/core"),M=require("@headlessui/vue"),Se=require("vue-tippy"),Ze=require("v3-infinite-loading");const Qe=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:n}){const a=n,o=t,s=e.resolveDynamicComponent("NuxtLink"),l=e.resolveDynamicComponent("RouterLink"),c=e.computed(()=>o.linkComponent?o.linkComponent:o.external?"a":B.isObjectLike(s)?s:B.isObjectLike(l)?l:"a"),d=e.computed(()=>{if(!o.to)return o.submit?"submit":"button"}),r=e.computed(()=>o.disabled||o.loading),u=e.computed(()=>o.loading?T.ArrowPathIcon:o.iconLeft),h=e.computed(()=>{const g=[];if(g.push("border-2"),r.value)g.push(o.outlined?"border-foreground-disabled":"bg-foundation-disabled border-transparent");else switch(o.color){case"invert":g.push(o.outlined?"border-foundation dark:border-foreground":"bg-foundation dark:bg-foreground border-transparent");break;case"card":g.push(o.outlined?"border-foundation-2 shadow":"bg-foundation-2 dark:bg-foundation-2 border-foundation shadow");break;case"danger":g.push(o.outlined?"border-danger":"bg-danger border-danger");break;case"secondary":g.push(o.outlined?"border-foundation":"bg-foundation border-foundation-2");break;case"warning":g.push(o.outlined?"border-warning":"bg-warning border-warning");break;case"info":g.push(o.outlined?"border-info":"bg-info border-info");break;case"success":g.push(o.outlined?"border-success":"bg-success border-success");break;case"default":default:g.push(o.outlined?"border-primary hover:border-primary-focus":"bg-primary hover:bg-primary-focus border-transparent");break}return g.join(" ")}),p=e.computed(()=>{const g=[];if(!o.text&&!o.link)if(r.value)g.push((o.outlined,"text-foreground-disabled"));else switch(o.color){case"invert":g.push(o.outlined?"text-foundation dark:text-foreground":"text-primary");break;case"card":g.push((o.outlined,"text-foreground"));break;case"danger":g.push(o.outlined?"text-danger":"text-foundation dark:text-foreground");break;case"warning":g.push(o.outlined?"text-warning":"text-foundation dark:text-foreground");break;case"info":g.push(o.outlined?"text-info":"text-foundation dark:text-foreground");break;case"success":g.push(o.outlined?"text-success":"text-foundation dark:text-foreground");break;case"secondary":g.push((o.outlined,"text-foreground hover:text-primary"));break;case"default":default:g.push(o.outlined?"text-primary hover:text-primary-focus":"text-foundation dark:text-foreground");break}else r.value?g.push("text-foreground-disabled"):o.color==="invert"?g.push("text-foundation hover:text-foundation-2 dark:text-foreground dark:hover:text-foreground"):o.color==="secondary"?g.push("text-foreground-2 hover:text-primary-focus"):o.color==="success"?g.push("text-success"):o.color==="warning"?g.push("text-warning"):o.color==="info"?g.push("text-info"):o.color==="danger"?g.push("text-danger"):g.push("text-primary hover:text-primary-focus");return g.join(" ")}),m=e.computed(()=>{const g=[];return g.push(o.rounded?"rounded-full":"rounded-md"),g.join(" ")}),f=e.computed(()=>{const g=[];if(!r.value)switch(o.color){case"invert":g.push("hover:ring-4 ring-white/50");break;case"danger":g.push("hover:ring-4 ring-danger-lighter dark:ring-danger-darker");break;case"warning":g.push("hover:ring-4 ring-warning-lighter dark:ring-warning-darker");break;case"info":g.push("hover:ring-4 ring-info-lighter dark:ring-info-darker");break;case"success":g.push("hover:ring-4 ring-success-lighter dark:ring-success-darker");break;case"default":default:g.push("hover:ring-2");break}return g.join(" ")}),i=e.computed(()=>{switch(o.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-sm sm:text-base font-medium xxx-tracking-wide"}}),b=e.computed(()=>{switch(o.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"}}),v=e.computed(()=>{const g=[];return o.fullWidth&&g.push("w-full"),r.value&&g.push("cursor-not-allowed"),g.join(" ")}),k=e.computed(()=>{const g=[];return!r.value&&!o.link&&!o.text&&g.push("active:scale-[0.97]"),!r.value&&o.link&&g.push("underline decoration-transparent decoration-2 underline-offset-4 hover:decoration-inherit"),g.join(" ")}),x=e.computed(()=>{const g=o.link||o.text;return["transition inline-flex justify-center text-center items-center outline-none select-none leading-[0.9rem]",v.value,i.value,p.value,g?"":h.value,g?"":m.value,g?"":f.value,o.link?"":b.value,k.value].join(" ")}),E=e.computed(()=>{const g=[""];switch(o.loading&&g.push("animate-spin"),o.size){case"xs":g.push("h-3 w-3");break;case"sm":g.push("h-4 w-4");break;case"lg":g.push("h-6 w-6");break;case"xl":g.push("h-8 w-8");break;case"base":default:g.push("h-5 w-5");break}return g.join(" ")}),C=g=>{if(r.value){g.preventDefault(),g.stopPropagation(),g.stopImmediatePropagation();return}a("click",g)};return(g,S)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.to?c.value:"button"),{href:t.to,to:t.to,type:d.value,external:t.external,class:e.normalizeClass(x.value),disabled:r.value,role:"button",onClick:C},{default:e.withCtx(()=>[u.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.value),{key:0,class:e.normalizeClass(`${E.value} ${t.hideText?"":"mr-2"}`)},null,8,["class"])):e.createCommentVNode("",!0),t.hideText?e.createCommentVNode("",!0):e.renderSlot(g.$slots,"default",{key:1},()=>[e.createTextVNode("Button")],!0),t.iconRight||!t.loading?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.iconRight),{key:2,class:e.normalizeClass(`${E.value} ${t.hideText?"":"ml-2"}`)},null,8,["class"])):e.createCommentVNode("",!0)]),_:3},8,["href","to","type","external","class","disabled"]))}});const ce=(t,n)=>{const a=t.__vccOpts||t;for(const[o,s]of n)a[o]=s;return a},F=ce(Qe,[["__scopeId","data-v-8c1638d3"]]),ze=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:n}){const a=n,o=t,s=l=>{if(o.disabled){l.preventDefault(),l.stopPropagation(),l.stopImmediatePropagation();return}a("click",l)};return(l,c)=>(e.openBlock(),e.createBlock(F,{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:s},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default",{},()=>[e.createTextVNode("Link")])]),_:3},8,["to","external","disabled","size","foreground-link","icon-left","icon-right","hide-text"]))}});var Y=(t=>(t[t.Success=0]="Success",t[t.Warning=1]="Warning",t[t.Danger=2]="Danger",t[t.Info=3]="Info",t))(Y||{});const Je={"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"},Ye={class:"flex w-full flex-col items-center space-y-4 sm:items-end"},et={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"},tt={class:"p-4"},nt={class:"flex items-start"},ot={class:"flex-shrink-0"},lt={class:"ml-2 w-0 flex-1 flex flex-col"},st={key:0,class:"text-foreground font-bold"},at={key:1,class:"label label--light text-foreground-2"},rt={key:2,class:"flex justify-start mt-2"},it=e.createElementVNode("span",{class:"sr-only"},"Close",-1),ct=e.defineComponent({__name:"ToastRenderer",props:{notification:null},emits:["update:notification"],setup(t,{emit:n}){const a=n,o=t,s=e.computed(()=>{var d,r;return!((d=o.notification)!=null&&d.description)&&!((r=o.notification)!=null&&r.cta)}),l=()=>{a("update:notification",null)},c=d=>{var r,u,h;(h=(u=(r=o.notification)==null?void 0:r.cta)==null?void 0:u.onClick)==null||h.call(u,d),l()};return(d,r)=>(e.openBlock(),e.createElementBlock("div",Je,[e.createElementVNode("div",Ye,[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",et,[e.createElementVNode("div",tt,[e.createElementVNode("div",nt,[e.createElementVNode("div",ot,[t.notification.type===e.unref(Y).Success?(e.openBlock(),e.createBlock(e.unref(j.CheckCircleIcon),{key:0,class:"h-6 w-6 text-success","aria-hidden":"true"})):t.notification.type===e.unref(Y).Danger?(e.openBlock(),e.createBlock(e.unref(j.XCircleIcon),{key:1,class:"h-6 w-6 text-danger","aria-hidden":"true"})):t.notification.type===e.unref(Y).Warning?(e.openBlock(),e.createBlock(e.unref(j.ExclamationCircleIcon),{key:2,class:"h-6 w-6 text-warning","aria-hidden":"true"})):t.notification.type===e.unref(Y).Info?(e.openBlock(),e.createBlock(e.unref(j.InformationCircleIcon),{key:3,class:"h-6 w-6 text-info","aria-hidden":"true"})):e.createCommentVNode("",!0)]),e.createElementVNode("div",lt,[t.notification.title?(e.openBlock(),e.createElementBlock("p",st,e.toDisplayString(t.notification.title),1)):e.createCommentVNode("",!0),t.notification.description?(e.openBlock(),e.createElementBlock("p",at,e.toDisplayString(t.notification.description),1)):e.createCommentVNode("",!0),t.notification.cta?(e.openBlock(),e.createElementBlock("div",rt,[e.createVNode(ze,{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":s.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:l},[it,e.createVNode(e.unref(D.XMarkIcon),{class:"h-6 w-6","aria-hidden":"true"})])],2)])])])):e.createCommentVNode("",!0)]),_:1})])]))}}),ut="Enter";function ke(t){return n=>{n.code===ut&&t(n)}}const dt=e.createElementVNode("circle",{cx:"4",cy:"4",r:"3"},null,-1),mt=[dt],ue=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:n}){const a=n,o=t,s=e.computed(()=>o.colorClasses||"bg-blue-100 text-blue-800"),l=e.computed(()=>o.dotIconColorClasses||"text-blue-400"),c=e.computed(()=>{const h=["inline-flex items-center",s.value,o.size==="lg"?"px-3 py-0.5 label":"px-2.5 py-0.5 caption font-medium"];return o.rounded?(h.push("rounded"),h.push(o.size==="lg"?"px-2 py-0.5 label":"px-2.5 py-0.5 caption font-medium")):(h.push("rounded-full"),h.push(o.size==="lg"?"px-2.5 py-0.5 label":"px-2.5 py-0.5 caption font-medium")),h.join(" ")}),d=e.computed(()=>{const h=["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 o.clickableIcon?h.push("cursor-pointer"):h.push("cursor-default"),h.join(" ")}),r=e.computed(()=>["-ml-0.5 mr-1.5 h-2 w-2",l.value].join(" ")),u=h=>{if(!o.clickableIcon){h.stopPropagation(),h.stopImmediatePropagation(),h.preventDefault();return}a("click-icon",h)};return(h,p)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(c.value)},[t.dot?(e.openBlock(),e.createElementBlock("svg",{key:0,class:e.normalizeClass(r.value),fill:"currentColor",viewBox:"0 0 8 8"},mt,2)):e.createCommentVNode("",!0),e.renderSlot(h.$slots,"default",{},()=>[e.createTextVNode("Badge")]),t.iconLeft?(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass(d.value),onClick:p[0]||(p[0]=m=>u(m))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.iconLeft),{class:e.normalizeClass(["h-4 w-4",l.value])},null,8,["class"]))],2)):e.createCommentVNode("",!0)],2))}});let Ne=[];function ft(t){Ne=Ne?t:t.slice()}var ee=(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))(ee||{});function Ie(t){const{props:{modelValue:n,steps:a,orientation:o,goVerticalBelow:s,nonInteractive:l,stepsPadding:c},emit:d}=t,r=e.computed(()=>(o==null?void 0:o.value)==="vertical"?"vertical":"horizontal"),u=e.computed({get:()=>B.clamp((n==null?void 0:n.value)||0,-1,a.value.length),set:v=>d("update:modelValue",B.clamp(v,0,a.value.length))}),h=v=>`${v+1}`,p=v=>v===u.value,m=v=>v<u.value,f=(v,k)=>{var E;if(l!=null&&l.value){k==null||k.preventDefault(),k==null||k.stopPropagation(),k==null||k.stopImmediatePropagation();return}u.value=v;const x=a.value[u.value];(E=x==null?void 0:x.onClick)==null||E.call(x)},i=e.computed(()=>{const v=["flex"];let k,x;return(c==null?void 0:c.value)==="xs"?(k="space-x-2",x="space-y-1"):(c==null?void 0:c.value)==="sm"?(k="space-x-4",x="space-y-1"):(k="space-x-8",x="space-y-4"),v.push("flex"),r.value==="vertical"||s!=null&&s.value?(v.push(`flex-col ${x} justify-center`),(s==null?void 0:s.value)===ee.sm?v.push(`sm:flex-row sm:space-y-0 sm:justify-start sm:${k} sm:items-center`):(s==null?void 0:s.value)===ee.md?v.push(`md:flex-row md:space-y-0 md:justify-start md:${k} md:items-center`):(s==null?void 0:s.value)===ee.lg?v.push(`lg:flex-row lg:space-y-0 lg:justify-start lg:${k} lg:items-center`):(s==null?void 0:s.value)===ee.xl&&v.push(`xl:flex-row xl:space-y-0 xl:justify-start xl:${k} xl:items-center`)):v.push(`flex-row ${k} items-center`),v.join(" ")}),b=e.computed(()=>{const v=["flex items-center"];return l!=null&&l.value||v.push("cursor-pointer"),v.join(" ")});return{value:u,isCurrentStep:p,isFinishedStep:m,switchStep:f,getStepDisplayValue:h,listClasses:i,linkClasses:b,orientation:r}}ft(["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 pt=["aria-label"],ht=["href","onClick"],vt={class:"flex space-x-3 items-center text-primary-focus normal font-medium leading-5"},gt={class:"shrink-0 h-8 w-8 rounded-full bg-primary-focus text-foreground-on-primary inline-flex items-center justify-center"},yt={class:"flex flex-col"},kt={key:0,class:"label label--light text-foreground"},bt=["href","onClick"],xt={class:"flex space-x-3 items-center text-primary-focus normal font-medium leading-5"},Ct={class:"shrink-0 h-8 w-8 rounded-full border-2 border-primary-focus inline-flex items-center justify-center"},Bt={class:"flex flex-col"},wt={key:0,class:"label label--light text-foreground"},Vt=["href","onClick"],Et={class:"flex space-x-3 items-center text-foreground-disabled normal font-medium leading-5"},$t={class:"shrink-0 h-8 w-8 rounded-full border-2 border-foreground-disabled inline-flex items-center justify-center"},Nt={class:"flex flex-col"},St={key:0,class:"label label--light"},zt=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:n}){const a=n,o=t,{isCurrentStep:s,isFinishedStep:l,switchStep:c,getStepDisplayValue:d,listClasses:r,linkClasses:u}=Ie({props:e.toRefs(o),emit:a});return(h,p)=>(e.openBlock(),e.createElementBlock("nav",{class:"flex justify-center","aria-label":t.ariaLabel||"Progress steps"},[e.createElementVNode("ol",{class:e.normalizeClass(e.unref(r))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.steps,(m,f)=>(e.openBlock(),e.createElementBlock("li",{key:m.name},[e.unref(l)(f)?(e.openBlock(),e.createElementBlock("a",{key:0,href:m.href,class:e.normalizeClass(e.unref(u)),onClick:i=>e.unref(c)(f,i)},[e.createElementVNode("div",vt,[e.createElementVNode("div",gt,[e.createVNode(e.unref(D.CheckIcon),{class:"w-5 h-5"})]),e.createElementVNode("div",yt,[e.createElementVNode("div",null,e.toDisplayString(m.name),1),m.description?(e.openBlock(),e.createElementBlock("div",kt,e.toDisplayString(m.description),1)):e.createCommentVNode("",!0)])])],10,ht)):e.unref(s)(f)?(e.openBlock(),e.createElementBlock("a",{key:1,href:m.href,class:e.normalizeClass(e.unref(u)),"aria-current":"step",onClick:i=>e.unref(c)(f,i)},[e.createElementVNode("div",xt,[e.createElementVNode("div",Ct,e.toDisplayString(e.unref(d)(f)),1),e.createElementVNode("div",Bt,[e.createElementVNode("div",null,e.toDisplayString(m.name),1),m.description?(e.openBlock(),e.createElementBlock("div",wt,e.toDisplayString(m.description),1)):e.createCommentVNode("",!0)])])],10,bt)):(e.openBlock(),e.createElementBlock("a",{key:2,href:m.href,class:e.normalizeClass(e.unref(u)),onClick:i=>e.unref(c)(f,i)},[e.createElementVNode("div",Et,[e.createElementVNode("div",$t,e.toDisplayString(e.unref(d)(f)),1),e.createElementVNode("div",Nt,[e.createElementVNode("div",null,e.toDisplayString(m.name),1),m.description?(e.openBlock(),e.createElementBlock("div",St,e.toDisplayString(m.description),1)):e.createCommentVNode("",!0)])])],10,Vt))]))),128))],2)],8,pt))}}),It=["aria-label"],Lt=["href","onClick"],Mt={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center"},Dt={key:0,class:"h-3 w-3 rounded-full bg-foreground-2"},Tt=["href","onClick"],Ot={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center","aria-hidden":"true"},At={key:0,class:"h-3 w-3 rounded-full bg-foreground"},Pt=e.createElementVNode("span",{class:"absolute h-4 w-4 rounded-full bg-outline-2"},null,-1),_t=e.createElementVNode("span",{class:"relative block h-2 w-2 rounded-full bg-primary-focus"},null,-1),jt=["href","onClick"],Ft={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center","aria-hidden":"true"},Rt={key:0,class:"h-3 w-3 rounded-full bg-foreground-2"},Ut={key:1,class:"h-4 w-4 rounded-full bg-foreground-disabled"},qt=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:n}){const a=n,o=t,{isCurrentStep:s,isFinishedStep:l,switchStep:c,listClasses:d,linkClasses:r}=Ie({props:e.toRefs(o),emit:a}),u=e.computed(()=>{const p=["h6 font-medium leading-7"];let m;return o.stepsPadding==="xs"?m="ml-1":o.stepsPadding==="sm"?m="ml-2":m="ml-3",p.push(m),o.basic&&p.push("sr-only"),p.join(" ")}),h=e.computed(()=>{const p=[];return o.basic&&p.push("basic"),p.join(" ")});return(p,m)=>(e.openBlock(),e.createElementBlock("nav",{class:"flex justify-center","aria-label":t.ariaLabel||"Progress steps"},[e.createElementVNode("ol",{class:e.normalizeClass([e.unref(d),h.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.steps,(f,i)=>(e.openBlock(),e.createElementBlock("li",{key:f.name},[e.unref(l)(i)?(e.openBlock(),e.createElementBlock("a",{key:0,href:f.href,class:e.normalizeClass(e.unref(r)),onClick:b=>e.unref(c)(i,b)},[e.createElementVNode("span",Mt,[t.basic?(e.openBlock(),e.createElementBlock("span",Dt)):(e.openBlock(),e.createBlock(e.unref(D.CheckCircleIcon),{key:1,class:"h-full w-full text-primary","aria-hidden":"true"}))]),e.createElementVNode("span",{class:e.normalizeClass(["text-foreground",u.value])},e.toDisplayString(f.name),3)],10,Lt)):e.unref(s)(i)?(e.openBlock(),e.createElementBlock("a",{key:1,href:f.href,class:e.normalizeClass(e.unref(r)),"aria-current":"step",onClick:b=>e.unref(c)(i,b)},[e.createElementVNode("span",Ot,[t.basic?(e.openBlock(),e.createElementBlock("span",At)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[Pt,_t],64))]),e.createElementVNode("span",{class:e.normalizeClass(["text-primary-focus",u.value])},e.toDisplayString(f.name),3)],10,Tt)):(e.openBlock(),e.createElementBlock("a",{key:2,href:f.href,class:e.normalizeClass(e.unref(r)),onClick:b=>e.unref(c)(i,b)},[e.createElementVNode("div",Ft,[t.basic?(e.openBlock(),e.createElementBlock("span",Rt)):(e.openBlock(),e.createElementBlock("div",Ut))]),e.createElementVNode("p",{class:e.normalizeClass(["text-foreground-disabled",u.value])},e.toDisplayString(f.name),3)],10,jt))]))),128))],2)],8,It))}}),Wt={},Ht={xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-pointer",width:"44",height:"44",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"rgba(255,255,255,0.8)","stroke-linecap":"round","stroke-linejoin":"round"},Kt=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),Gt=e.createElementVNode("path",{d:"M7.904 17.563a1.2 1.2 0 0 0 2.228 .308l2.09 -3.093l4.907 4.907a1.067 1.067 0 0 0 1.509 0l1.047 -1.047a1.067 1.067 0 0 0 0 -1.509l-4.907 -4.907l3.113 -2.09a1.2 1.2 0 0 0 -.309 -2.228l-13.582 -3.904l3.904 13.563z"},null,-1),Xt=[Kt,Gt];function Zt(t,n){return e.openBlock(),e.createElementBlock("svg",Ht,Xt)}const Qt=ce(Wt,[["render",Zt]]),Jt={},Yt={viewBox:"0 0 18 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},en=e.createElementVNode("path",{d:"M9 1.25V3.5M14.834 3.666L13.243 5.257M17.25 9.5H15M4.757 13.743L3.167 15.333M3 9.5H0.75M4.757 5.257L3.167 3.667",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),tn=[en];function nn(t,n){return e.openBlock(),e.createElementBlock("svg",Yt,tn)}const on=ce(Jt,[["render",nn]]),ln={class:"relative aspect-square w-full h-full max-w-[250px] mx-auto mb-8 border-t border-r border-outline-3 select-none"},sn={class:"w-full h-full overflow-hidden"},an=e.defineComponent({__name:"Instructional",props:{actions:Array,initialPosition:{type:Object},slotsConfig:Array},setup(t){const n=t,a=e.ref(!0),o=e.ref({...n.initialPosition}),s=e.ref(!1),l=e.ref(500),c=e.ref(!0),d=e.ref(n.slotsConfig||[]);async function r(p){await X.wait(p.duration)}function u(p){const m=d.value.find(f=>f.name===p.slot);m&&(m.visible=!m.visible)}function h(p){switch(p.type){case"animation":o.value={top:p.top,left:p.left},l.value=p.duration;break;case"click":s.value=!0,setTimeout(()=>s.value=!1,500);break;case"delay":return r(p);case"slot":u(p);break}}return e.onMounted(()=>{(async()=>{for(;a.value;){await r({type:"delay",duration:800}),c.value=!0;for(const m of n.actions||[])await h(m);c.value=!1,o.value={...n.initialPosition},await r({type:"delay",duration:200})}})()}),e.onBeforeUnmount(()=>{a.value=!1}),(p,m)=>(e.openBlock(),e.createElementBlock("div",ln,[e.createElementVNode("div",{class:"absolute z-50 text-foreground dark:text-foundation",style:e.normalizeStyle({transitionProperty:"all",top:o.value.top+"%",left:o.value.left+"%",transitionDuration:l.value+"ms"})},[e.createVNode(on,{class:e.normalizeClass(["absolute -top-5 -left-4 h-12 w-12 -rotate-12 text-foreground",[{hidden:!s.value}]])},null,8,["class"]),e.createVNode(Qt,{class:"absolute inset-0 h-11 w-11"})],4),e.createElementVNode("div",sn,[e.renderSlot(p.$slots,"background"),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,f=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:f.name},[f.visible?e.renderSlot(p.$slots,f.name,{key:0}):e.createCommentVNode("",!0)],64))),128))])]))}}),rn=["disabled"],cn=e.defineComponent({__name:"CardButton",props:{disabled:{type:Boolean},modelValue:{type:Boolean}},emits:["update:modelValue","click"],setup(t,{emit:n}){const a=n,o=t,s=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 o.disabled?c.push("bg-foundation-disabled text-foreground-2 cursor-not-allowed"):(c.push(o.modelValue?"bg-primary-focus text-foreground-on-primary":"bg-foundation text-foreground"),c.push("ring-outline-2 hover:ring-4")),c.join(" ")}),l=c=>{if(o.disabled){c.preventDefault(),c.stopPropagation(),c.stopImmediatePropagation();return}a("update:modelValue",!o.modelValue),a("click",c)};return(c,d)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(s.value),disabled:t.disabled,onClick:l},[e.renderSlot(c.$slots,"default",{},()=>[e.createTextVNode("Text")])],10,rn))}}),un={class:"relative flex items-start"},dn={class:"flex h-6 items-center"},mn=["id","checked","aria-describedby","name","disabled","value"],fn={class:"ml-2 text-sm",style:{"padding-top":"2px"}},pn=["for"],hn={key:0,class:"text-danger ml-1"},vn=["id"],gn=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 n=t,a=v=>`${v}-${ie.nanoid()}`,o=e.computed(()=>n.value||n.name),{checked:s,errorMessage:l,handleChange:c,value:d}=le.useField(n.name,n.rules,{validateOnMount:n.validateOnMount,type:"checkbox",checkedValue:o,initialValue:n.modelValue||void 0}),r=e.computed(()=>n.label||n.name),u=e.computed(()=>l.value?"border-danger-lighter":"border-foreground-4 "),h=e.computed(()=>n.description||l.value),p=e.computed(()=>`${n.name}-description`),m=e.computed(()=>{const v=[];return n.inlineDescription?v.push("inline ml-2"):v.push("block"),l.value?v.push("text-danger"):v.push("text-foreground-2"),v.join(" ")}),f=e.ref(a("checkbox")),i=e.computed(()=>n.id||f.value),b=v=>{n.disabled||c(v)};return e.onMounted(()=>{const v=n.modelValue,k=d.value,x=Array.isArray(v)?v.includes(n.value):v===n.value,E=Array.isArray(k)?k.includes(n.value):k===n.value;x!==E&&c(v)}),(v,k)=>(e.openBlock(),e.createElementBlock("div",un,[e.createElementVNode("div",dn,[e.createElementVNode("input",e.mergeProps({id:i.value,checked:e.unref(s),"aria-describedby":p.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]},v.$attrs,{onChange:b}),null,16,mn)]),e.createElementVNode("div",fn,[e.createElementVNode("label",{for:i.value,class:e.normalizeClass(["font-medium text-foreground",{"sr-only":t.hideLabel}])},[e.createElementVNode("span",null,e.toDisplayString(r.value),1),t.showRequired?(e.openBlock(),e.createElementBlock("span",hn,"*")):e.createCommentVNode("",!0)],10,pn),h.value?(e.openBlock(),e.createElementBlock("p",{key:0,id:p.value,class:e.normalizeClass(m.value)},e.toDisplayString(h.value),11,vn)):e.createCommentVNode("",!0)])]))}}),yn={class:"flex h-6 items-center"},kn=["id","checked","aria-describedby","name","disabled","value"],bn=["for"],xn={key:0,class:"text-sm"},Cn={key:1,class:"text-danger ml-1"},Bn=["id"],wn=e.defineComponent({inheritAttrs:!1,__name:"Radio",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},icon:{type:Object,default:void 0},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 n=t,a=v=>`${v}-${ie.nanoid()}`,o=e.computed(()=>n.value||n.name),{checked:s,errorMessage:l,handleChange:c,value:d}=le.useField(n.name,n.rules,{validateOnMount:n.validateOnMount,type:"radio",checkedValue:o,initialValue:n.modelValue||void 0}),r=e.computed(()=>n.label||n.name),u=e.computed(()=>l.value?"border-danger-lighter":"border-foreground-4 "),h=e.computed(()=>n.description||l.value),p=e.computed(()=>`${n.name}-description`),m=e.computed(()=>{const v=[];return l.value?v.push("text-danger"):v.push("text-foreground-2"),v.join(" ")}),f=e.ref(a("radio")),i=e.computed(()=>n.id||f.value),b=v=>{n.disabled||c(v)};return e.onMounted(()=>{const v=n.modelValue,k=d.value,x=Array.isArray(v)?v.includes(n.value):v===n.value,E=Array.isArray(k)?k.includes(n.value):k===n.value;x!==E&&c(v)}),(v,k)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative flex gap-2 mb-2 last:mb-0",t.description?"items-start":"items-center"])},[e.createElementVNode("div",yn,[e.createElementVNode("input",e.mergeProps({id:i.value,checked:e.unref(s),"aria-describedby":p.value,name:t.name,disabled:t.disabled,value:o.value,type:"radio",class:["h-4 w-4 rounded-full text-primary focus:ring-primary bg-foundation disabled:cursor-not-allowed disabled:bg-disabled disabled:text-disabled-2",u.value]},v.$attrs,{onChange:b}),null,16,kn)]),e.createElementVNode("div",{class:e.normalizeClass(["text-xs sm:text-sm",t.inlineDescription?"flex gap-2 items-center":""])},[e.createElementVNode("label",{for:i.value,class:e.normalizeClass(["text-foreground flex gap-2 items-center",{"sr-only":t.hideLabel}])},[t.icon?(e.openBlock(),e.createElementBlock("div",xn,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon),{class:"h-8 sm:h-10 w-8 sm:w-10"}))])):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(r.value),1),t.showRequired?(e.openBlock(),e.createElementBlock("span",Cn,"*")):e.createCommentVNode("",!0)],10,bn),h.value?(e.openBlock(),e.createElementBlock("p",{key:0,id:p.value,class:e.normalizeClass(m.value)},e.toDisplayString(h.value),11,Bn)):e.createCommentVNode("",!0)],2)],2))}});function be(t){const{props:n,inputEl:a,emit:o,options:s}=t,{value:l,errorMessage:c}=le.useField(n.name,n.rules,{validateOnMount:e.unref(n.validateOnMount),validateOnValueUpdate:e.unref(n.validateOnValueUpdate),initialValue:e.unref(n.modelValue)||void 0}),d=e.computed(()=>{const C=["block label text-foreground-2 mb-2"];return e.unref(n.showLabel)||C.push("sr-only"),C.join(" ")}),r=e.computed(()=>["focus:outline-none disabled:cursor-not-allowed disabled:bg-foundation-disabled","disabled:text-disabled-muted placeholder:text-foreground-2","rounded"].join(" ")),u=e.computed(()=>{const C=["block w-full text-foreground transition-all",r.value];c.value?C.push("focus:border-danger focus:ring-danger border-2 border-danger text-danger-darker"):C.push("border-0 focus:ring-2 focus:ring-outline-2");const g=e.unref(n.color);return g==="foundation"?C.push("bg-foundation shadow-sm hover:shadow"):g==="transparent"?C.push("bg-transparent"):C.push("bg-foundation-page"),C.join(" ")}),h=e.ref(ie.nanoid()),p=e.computed(()=>e.unref(n.label)||e.unref(n.name)),m=e.computed(()=>{const C=c.value;return!C||!e.unref(n.useLabelInErrors)?C:C.replace("Value",p.value)}),f=e.computed(()=>m.value&&e.unref(n.hideErrorMessage)),i=e.computed(()=>m.value||e.unref(n.help)),b=e.computed(()=>!!i.value),v=e.computed(()=>b.value?`${e.unref(n.name)}-${h.value}`:void 0),k=e.computed(()=>{const C=["mt-2 text-xs sm:text-sm"];return C.push(c.value?"text-danger":"text-foreground-2"),C.join(" ")}),x=()=>{var C;(C=a.value)==null||C.focus()},E=()=>{var C;l.value=B.isArray(l.value)?[]:"",(C=s==null?void 0:s.customClear)==null||C.call(s),o("change",{value:l.value}),o("clear")};return e.onMounted(()=>{e.unref(n.autoFocus)&&x()}),{coreInputClasses:r,coreClasses:u,title:p,value:l,helpTipId:v,helpTipClasses:k,helpTip:i,hideHelpTip:f,errorMessage:m,clear:E,focus:x,labelClasses:d}}const Vn=["for"],En={class:"relative"},$n=["id","name","placeholder","disabled","aria-invalid","aria-describedby"],Nn=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),Sn=["id"],zn=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"},textareaClasses:null},emits:["update:modelValue","change","input","clear"],setup(t,{expose:n,emit:a}){const o=a,s=t,l=e.ref(null),{coreClasses:c,title:d,value:r,helpTipId:u,helpTipClasses:h,helpTip:p,errorMessage:m,labelClasses:f,clear:i,focus:b}=be({props:e.toRefs(s),emit:o,inputEl:l}),v=e.computed(()=>{const k=["pl-2"];return s.showClear&&m.value?k.push("pr-12"):(s.showClear||m.value)&&k.push("pr-8"),k.join(" ")});return n({focus:b}),(k,x)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([t.fullWidth?"w-full":""])},[e.createElementVNode("label",{for:t.name,class:e.normalizeClass(e.unref(f))},[e.createElementVNode("span",null,e.toDisplayString(e.unref(d)),1)],10,Vn),e.createElementVNode("div",En,[e.withDirectives(e.createElementVNode("textarea",e.mergeProps({id:t.name,ref_key:"inputElement",ref:l,"onUpdate:modelValue":x[0]||(x[0]=E=>e.isRef(r)?r.value=E:null),name:t.name,class:[e.unref(c),v.value,t.textareaClasses||"","min-h-[3rem] simple-scrollbar text-sm"],placeholder:t.placeholder,disabled:t.disabled,"aria-invalid":e.unref(m)?"true":"false","aria-describedby":e.unref(u)},k.$attrs,{onChange:x[1]||(x[1]=E=>k.$emit("change",{event:E,value:e.unref(r)})),onInput:x[2]||(x[2]=E=>k.$emit("input",{event:E,value:e.unref(r)}))}),null,16,$n),[[e.vModelText,e.unref(r)]]),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:x[3]||(x[3]=(...E)=>e.unref(i)&&e.unref(i)(...E)),onKeydown:x[4]||(x[4]=(...E)=>e.unref(i)&&e.unref(i)(...E))},[Nn,e.createVNode(e.unref(D.XMarkIcon),{class:"h-5 w-5 text-foreground","aria-hidden":"true"})],32)):e.createCommentVNode("",!0),e.unref(m)?(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(D.ExclamationCircleIcon),{class:"h-4 w-4 text-danger","aria-hidden":"true"})],2)):e.createCommentVNode("",!0),t.showRequired&&!e.unref(m)?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["pointer-events-none absolute inset-y-0 mt-0.5 text-4xl right-0 flex items-start text-danger opacity-50",[t.showClear?"pr-8":"pr-2"]])}," * ",2)):e.createCommentVNode("",!0)]),e.unref(u)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(u),class:e.normalizeClass(e.unref(h))},e.toDisplayString(e.unref(p)),11,Sn)):e.createCommentVNode("",!0)],2))}}),In=["for"],Ln={class:"relative"},Mn={key:0,class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"},Dn=["id","type","name","placeholder","disabled","aria-invalid","aria-describedby"],Tn=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),On=["id"],Le=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","focus","blur"],setup(t,{expose:n,emit:a}){const o=t,s=a,l=e.useSlots(),c=e.ref(null),{coreClasses:d,title:r,value:u,helpTipId:h,helpTipClasses:p,helpTip:m,hideHelpTip:f,errorMessage:i,clear:b,focus:v,labelClasses:k}=be({props:e.toRefs(o),emit:s,inputEl:c}),x=e.computed(()=>{const S=["h-5 w-5"];return i.value?S.push("text-danger"):S.push("text-foreground-2"),S.join(" ")}),E=e.computed(()=>["email","password"].includes(o.type)||o.customIcon),C=e.computed(()=>{const S=[];return E.value?S.push("pl-8"):S.push("pl-2"),l["input-right"]||(i.value||o.showClear)&&(i.value&&o.showClear?S.push("pr-12"):S.push("pr-8")),S.join(" ")}),g=e.computed(()=>{switch(o.size){case"sm":return"h-6 text-sm";case"lg":return"h-10";case"xl":return"h-14";case"base":default:return"h-8 text-sm"}});return n({focus:v}),(S,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(k))},[e.createElementVNode("span",null,e.toDisplayString(e.unref(r)),1)],10,In),e.createElementVNode("div",Ln,[E.value?(e.openBlock(),e.createElementBlock("div",Mn,[t.customIcon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.customIcon),{key:0,class:e.normalizeClass(x.value),"aria-hidden":"true"},null,8,["class"])):t.type==="email"?(e.openBlock(),e.createBlock(e.unref(D.EnvelopeIcon),{key:1,class:e.normalizeClass(x.value),"aria-hidden":"true"},null,8,["class"])):t.type==="password"?(e.openBlock(),e.createBlock(e.unref(D.KeyIcon),{key:2,class:e.normalizeClass(x.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(u)?u.value=N:null),type:t.type,name:t.name,class:[e.unref(d),C.value,g.value,t.inputClasses||""],placeholder:t.placeholder,disabled:t.disabled,"aria-invalid":e.unref(i)?"true":"false","aria-describedby":e.unref(h),role:"textbox"},S.$attrs,{onChange:z[1]||(z[1]=N=>S.$emit("change",{event:N,value:e.unref(u)})),onInput:z[2]||(z[2]=N=>S.$emit("input",{event:N,value:e.unref(u)})),onFocus:z[3]||(z[3]=N=>S.$emit("focus")),onBlur:z[4]||(z[4]=N=>S.$emit("blur"))}),null,16,Dn),[[e.vModelDynamic,e.unref(u)]]),e.renderSlot(S.$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[5]||(z[5]=(...N)=>e.unref(b)&&e.unref(b)(...N)),onKeydown:z[6]||(z[6]=(...N)=>e.unref(b)&&e.unref(b)(...N))},[Tn,e.createVNode(e.unref(D.XMarkIcon),{class:"h-5 w-5 text-foreground","aria-hidden":"true"})],32)):e.createCommentVNode("",!0),e.unref(i)?(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(D.ExclamationCircleIcon),{class:"h-4 w-4 text-danger","aria-hidden":"true"})],2)):e.createCommentVNode("",!0),t.showRequired&&!e.unref(i)?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["pointer-events-none absolute inset-y-0 mt-3 text-4xl right-0 flex items-center text-danger opacity-50",[t.showClear?"pr-8":"pr-2"]])}," * ",2)):e.createCommentVNode("",!0)])]),e.unref(h)&&!e.unref(f)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(h),class:e.normalizeClass(e.unref(p))},e.toDisplayString(e.unref(m)),11,On)):e.createCommentVNode("",!0)],2))}}),Me=/^https?:\/\//,xe=/^[\w-_.+]+@[\w-_.+]+$/,An=t=>(t||"").match(xe)?!0:"Value should be a valid e-mail address",Pn=t=>(t||"").split(",").map(o=>o.trim()).every(o=>o.match(xe))||"Value should be one or multiple comma-delimited e-mail addresses",_n=t=>(B.isString(t)&&(t=t.trim()),t?!0:"Value is required"),jn=(t,n)=>(a,o)=>a===o.form[t]?!0:`Value must be the same as in field '${n||t}'`,Fn=t=>n=>{const{minLength:a,maxLength:o}=t;return n=X.isNullOrUndefined(n)?"":n,B.isString(n)?!B.isUndefined(a)&&n.length<a?`Value needs to be at least ${a} characters long`:!B.isUndefined(o)&&n.length>o?`Value needs to be no more than ${o} characters long`:!0:"Value should be a text string"},Rn=t=>n=>{const{match:a,message:o}=t;return B.isString(n)?a?B.isString(a)?n.includes(a)?!0:o:a.test(n)?!0:o:!0:"Value should be a text string"},Un=t=>Me.test(t)?!0:"Value is not a valid URL",qn=t=>Array.isArray(t)&&t.length>0?!0:"Value should have at least a single item selected",Wn=Object.freeze(Object.defineProperty({__proto__:null,VALID_EMAIL:xe,VALID_HTTP_URL:Me,isEmail:An,isItemSelected:qn,isOneOrMultipleEmails:Pn,isRequired:_n,isSameAs:jn,isStringOfLength:Fn,isUrl:Un,stringContains:Rn},Symbol.toStringTag,{value:"Module"}));function Ce(t){const{skipCalculation:n,elementToWatchForChanges:a,itemContainer:o,trackResize:s=!1,trackMutations:l=!0}=t||{},c=e.ref(0),d=()=>{const r=o.value;if(n!=null&&n.value||!r)return;const u=r.children;let h=0,p=0,m;for(const f of u){const i=f.offsetTop;B.isUndefined(m)?(m=i,h+=1):i===m&&(h+=1),p+=1}c.value=p-h};return s&&P.useResizeObserver(a,d),l&&P.useMutationObserver(a,d,{childList:!0,subtree:!0}),{hiddenItemCount:c}}function Be(t){const{props:n,emit:a,dynamicVisibility:o}=t;let s;if(o){const{elementToWatchForChanges:u,itemContainer:h}=o;s=Ce({skipCalculation:e.computed(()=>{var m;return!((m=n.multiple)!=null&&m.value)}),elementToWatchForChanges:u,itemContainer:h}).hiddenItemCount}else s=e.ref(0);const l=e.computed({get:()=>{var h,p;const u=(h=n.modelValue)==null?void 0:h.value;return(p=n.multiple)!=null&&p.value?B.isArray(u)?u:[]:B.isArray(u)?void 0:u},set:u=>{var h,p,m;if((h=n.multiple)!=null&&h.value&&!B.isArray(u)){console.warn("Attempting to set non-array value in selector w/ multiple=true");return}else if(!((p=n.multiple)!=null&&p.value)&&B.isArray(u)){console.warn("Attempting to set array value in selector w/ multiple=false");return}a("update:modelValue",(m=n.multiple)!=null&&m.value?u||[]:u)}}),c=u=>B.isArray(u);return{selectedValue:l,hiddenSelectedItemCount:s,isArrayValue:c,isMultiItemArrayValue:u=>B.isArray(u)&&u.length>1,firstItem:u=>c(u)?u[0]:u}}const Hn=t=>(e.pushScopeId("data-v-89e77cae"),t=t(),e.popScopeId(),t),Kn=Hn(()=>e.createElementVNode("div",{class:"swoosher relative top-0 bg-blue-500/50"},null,-1)),Gn=[Kn],Xn=e.defineComponent({__name:"Bar",props:{loading:{type:Boolean}},setup(t){return(n,a)=>(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"])},Gn,2))}});const de=ce(Xn,[["__scopeId","data-v-89e77cae"]]),Zn={class:"flex items-center justify-between w-full"},Qn={class:"block truncate grow text-left text-xs sm:text-sm"},Jn={class:"pointer-events-none shrink-0 ml-1 flex items-center space-x-2"},Yn={key:1,class:"text-4xl text-danger opacity-50 h-4 w-4 leading-6"},eo=["disabled"],to={key:0,class:"flex flex-col mx-1 mb-1"},no=e.createElementVNode("span",{class:"sr-only label text-foreground"},"Search",-1),oo={class:"relative"},lo={class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"},so=["placeholder"],ao={key:0,class:"px-1"},ro={key:1},io=e.createElementVNode("div",{class:"text-foreground-2 text-center"},"Nothing found 🤷‍♂️",-1),co={class:e.normalizeClass(["block truncate"])},uo=["id"],we=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},mountMenuOnBody:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{expose:n,emit:a}){const o=y=>B.isObjectLike(y),s=a,l=t,{value:c,errorMessage:d}=le.useField(l.name,l.rules,{validateOnMount:l.validateOnMount,validateOnValueUpdate:l.validateOnValueUpdate,initialValue:l.modelValue}),r=P.useMounted(),u=e.ref(null),h=e.ref(null),p=e.ref(null),m=e.ref(""),f=e.ref([]),i=e.ref(!1),b=e.ref(1),v=e.ref(ie.nanoid()),k=P.useElementBounding(e.computed(()=>{var y;return(y=p.value)==null?void 0:y.el}),{windowResize:!0,windowScroll:!0,immediate:!0});P.useIntersectionObserver(e.computed(()=>{var y;return(y=h.value)==null?void 0:y.el}),([{isIntersecting:y}])=>{y&&l.mountMenuOnBody&&k.update()});const x=e.computed(()=>e.unref(l.label)||e.unref(l.name)),E=e.computed(()=>{const y=d.value;return!y||!e.unref(l.useLabelInErrors)?y:y.replace("Value",x.value)}),C=e.computed(()=>E.value||e.unref(l.help)),g=e.computed(()=>!!C.value),S=e.computed(()=>g.value?`${e.unref(l.name)}-${v.value}`:void 0),z=e.computed(()=>d.value?"text-danger":"text-foreground-2"),N=e.computed(()=>l.buttonStyle!=="simple"&&l.clearable&&!l.disabled),fe=e.computed(()=>{const y=["relative flex group"];return d.value?(y.push("hover:shadow rounded-md"),y.push("text-danger-darker focus:border-danger focus:ring-danger"),l.buttonStyle!=="simple"&&y.push("outline outline-2 outline-danger")):l.buttonStyle!=="simple"&&(y.push("hover:shadow rounded-md"),y.push("outline outline-2 outline-primary-muted")),l.fixedHeight&&y.push("h-8"),y.join(" ")}),K=e.computed(()=>{const y=[];return l.buttonStyle!=="simple"&&y.push(Z.value?"bg-foundation-disabled text-foreground-disabled":""),Z.value&&y.push("cursor-not-allowed"),y.join(" ")}),pe=e.computed(()=>{const y=["relative z-[1]","flex items-center justify-center text-center shrink-0","rounded-r-md overflow-hidden transition-all","text-foreground",J.value?`w-6 ${K.value}`:"w-0"];return Z.value||(y.push("hover:bg-primary hover:text-foreground-on-primary dark:text-foreground-on-primary"),l.buttonStyle==="tinted"?y.push("bg-outline-3"):y.push("bg-primary-muted")),y.join(" ")}),he=e.computed(()=>{const y=["relative z-[2]","normal rounded-md cursor-pointer transition truncate flex-1","flex items-center",K.value];return l.buttonStyle!=="simple"&&(y.push("py-2 px-3"),Z.value||(l.buttonStyle==="tinted"?y.push("bg-foundation-page text-foreground"):y.push("bg-foundation text-foreground"))),N.value&&J.value&&y.push("rounded-r-none"),y.join(" ")}),Q=e.computed(()=>!!(l.search&&(l.filterPredicate||l.getSearchResults))),R=e.computed(()=>Q.value&&l.getSearchResults),Z=e.computed(()=>l.disabled||!l.items.length&&!R.value),O=e.computed({get:()=>{const y=c.value;return l.multiple?B.isArray(y)?y:[]:B.isArray(y)?void 0:y},set:y=>{if(l.multiple&&!B.isArray(y)){console.warn("Attempting to set non-array value in selector w/ multiple=true");return}else if(!l.multiple&&B.isArray(y)){console.warn("Attempting to set array value in selector w/ multiple=false");return}let L;if(l.multiple)L=y||[];else{const I=c.value;L=l.allowUnset&&I&&y&&V(I)===V(y)?void 0:y}l.fullyControlValue?s("update:modelValue",L):c.value=L,b.value+=1}}),J=e.computed(()=>l.multiple&&B.isArray(O.value)?O.value.length!==0:!!O.value),ve=()=>{l.multiple?O.value=[]:O.value=void 0},ge=e.computed(()=>{const y=m.value;return!Q.value||!(y!=null&&y.length)?f.value:l.filterPredicate?f.value.filter(L=>{var I;return((I=l.filterPredicate)==null?void 0:I.call(l,L,y))||!1}):f.value}),ne=e.computed(()=>{const y=["rounded-md bg-foundation-2 py-1 label label--light outline outline-2 outline-primary-muted focus:outline-none shadow mt-1 "];return l.mountMenuOnBody?y.push("fixed z-50"):y.push("absolute top-[100%] w-full z-10"),y.join(" ")}),w=e.computed(()=>{const y={};if(l.mountMenuOnBody){const L=k.top.value,I=k.left.value,_=k.width.value,q=k.height.value;y.top=`${L+q}px`,y.left=`${I}px`,y.width=`${_}px`}return y}),$=y=>JSON.stringify(y),V=y=>o(y)?y[l.by||"id"]:y,A=async()=>{if(!(!R.value||!l.getSearchResults)){i.value=!0;try{f.value=await l.getSearchResults(m.value)}finally{i.value=!1}}},U=B.debounce(A,1e3),oe=y=>{const{active:L,disabled:I}=y||{},{hideCheckmarks:_}=l,q=["relative transition cursor-pointer select-none py-1.5 pl-3",_?"":"pr-9"];return I?q.push("opacity-50 cursor-not-allowed"):q.push(L?"text-primary":"text-foreground"),q.join(" ")};return e.watch(()=>l.items,y=>{f.value=y.slice()},{immediate:!0}),e.watch(m,()=>{R.value&&U()}),e.onMounted(()=>{R.value&&!l.items.length&&A()}),n({triggerSearch:A}),(y,L)=>(e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(),e.createBlock(e.unref(M.Listbox),{key:b.value,modelValue:O.value,"onUpdate:modelValue":L[4]||(L[4]=I=>O.value=I),name:t.name,multiple:t.multiple,by:t.by,disabled:Z.value,as:"div"},{default:e.withCtx(()=>[e.createVNode(e.unref(M.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(fe.value)},[e.createVNode(e.unref(M.ListboxButton),{ref_key:"listboxButton",ref:p,class:e.normalizeClass(he.value)},{default:e.withCtx(({open:I})=>[e.createElementVNode("div",Zn,[e.createElementVNode("div",Qn,[!O.value||e.unref(B.isArray)(O.value)&&!O.value.length?e.renderSlot(y.$slots,"nothing-selected",{key:0},()=>[e.createTextVNode(e.toDisplayString(t.placeholder?t.placeholder:t.label),1)]):e.renderSlot(y.$slots,"something-selected",{key:1,value:O.value},()=>[e.createTextVNode(e.toDisplayString($(O.value)),1)])]),e.createElementVNode("div",Jn,[E.value?(e.openBlock(),e.createBlock(e.unref(T.ExclamationCircleIcon),{key:0,class:"h-4 w-4 text-danger","aria-hidden":"true"})):t.showRequired?(e.openBlock(),e.createElementBlock("div",Yn," * ")):e.createCommentVNode("",!0),I?(e.openBlock(),e.createBlock(e.unref(T.ChevronUpIcon),{key:2,class:"h-4 w-4 text-foreground","aria-hidden":"true"})):(e.openBlock(),e.createBlock(e.unref(T.ChevronDownIcon),{key:3,class:"h-4 w-4 text-foreground","aria-hidden":"true"}))])])]),_:3},8,["class"]),N.value?e.withDirectives((e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(pe.value),disabled:t.disabled,onClick:L[0]||(L[0]=I=>ve())},[e.createVNode(e.unref(T.XMarkIcon),{class:"w-3 h-3"})],10,eo)),[[e.unref(Se.directive),"Clear"]]):e.createCommentVNode("",!0),e.unref(r)?(e.openBlock(),e.createBlock(e.Transition,{key:1,"leave-active-class":"transition ease-in duration-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{to:"body",disabled:!t.mountMenuOnBody},[e.createVNode(e.unref(M.ListboxOptions),{ref_key:"menuEl",ref:h,class:e.normalizeClass(ne.value),style:e.normalizeStyle(w.value),onFocus:L[3]||(L[3]=I=>{var _;return(_=u.value)==null?void 0:_.focus()})},{default:e.withCtx(()=>[Q.value?(e.openBlock(),e.createElementBlock("label",to,[no,e.createElementVNode("div",oo,[e.createElementVNode("div",lo,[e.createVNode(e.unref(T.MagnifyingGlassIcon),{class:"h-5 w-5 text-foreground"})]),e.withDirectives(e.createElementVNode("input",{ref_key:"searchInput",ref:u,"onUpdate:modelValue":L[1]||(L[1]=I=>m.value=I),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:L[2]||(L[2]=e.withModifiers(()=>{},["stop"]))},null,40,so),[[e.vModelText,m.value]])])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["overflow-auto simple-scrollbar",[Q.value?"max-h-52":"max-h-40"]])},[R.value&&i.value?(e.openBlock(),e.createElementBlock("div",ao,[e.createVNode(de,{loading:!0})])):R.value&&!f.value.length?(e.openBlock(),e.createElementBlock("div",ro,[e.renderSlot(y.$slots,"nothing-found",{},()=>[io])])):e.createCommentVNode("",!0),!R.value||!i.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(ge.value,I=>{var _;return e.openBlock(),e.createBlock(e.unref(M.ListboxOption),{key:V(I),value:I,disabled:((_=t.disabledItemPredicate)==null?void 0:_.call(t,I))||!1},{default:e.withCtx(({active:q,selected:Ve})=>{var Ee,$e;return[e.createElementVNode("li",{class:e.normalizeClass(oe({active:q,disabled:((Ee=t.disabledItemPredicate)==null?void 0:Ee.call(t,I))||!1}))},[e.createElementVNode("span",co,[e.renderSlot(y.$slots,"option",{item:I,active:q,selected:Ve,disabled:(($e=t.disabledItemPredicate)==null?void 0:$e.call(t,I))||!1},()=>[e.createTextVNode(e.toDisplayString($(I)),1)])]),!t.hideCheckmarks&&Ve?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([q?"text-primary":"text-foreground","absolute inset-y-0 right-0 flex items-center pr-4"])},[e.createVNode(e.unref(T.CheckIcon),{class:"h-5 w-5","aria-hidden":"true"})],2)):e.createCommentVNode("",!0)],2)]}),_:2},1032,["value","disabled"])}),128)):e.createCommentVNode("",!0)],2)]),_:3},8,["class","style"])],8,["disabled"]))]),_:3})):e.createCommentVNode("",!0)],2)]),_:3},8,["modelValue","name","multiple","by","disabled"])),S.value?(e.openBlock(),e.createElementBlock("p",{key:0,id:S.value,class:e.normalizeClass(["mt-2 text-xs sm:text-sm",z.value])},e.toDisplayString(C.value),11,uo)):e.createCommentVNode("",!0)]))}}),De=e.defineComponent({__name:"SourceAppBadge",props:{sourceApp:null},setup(t){return(n,a)=>(e.openBlock(),e.createBlock(ue,{"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"]))}}),mo={key:0,class:"text-foreground-2 normal"},fo={key:1,class:"flex items-center"},po={class:"truncate"},ho={class:"flex items-center"},vo={class:"truncate"},go=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},clearable:{type:Boolean},help:{type:String}},emits:["update:modelValue"],setup(t,{emit:n}){const a=n,o=t,s=e.ref(null),l=e.ref(null),{selectedValue:c,hiddenSelectedItemCount:d,isMultiItemArrayValue:r,firstItem:u}=Be({props:e.toRefs(o),emit:a,dynamicVisibility:{elementToWatchForChanges:s,itemContainer:l}}),h=(p,m)=>p.name.toLocaleLowerCase().includes(m.toLocaleLowerCase());return(p,m)=>(e.openBlock(),e.createBlock(we,{modelValue:e.unref(c),"onUpdate:modelValue":m[0]||(m[0]=f=>e.isRef(c)?c.value=f:null),multiple:t.multiple,items:t.items??e.unref(X.SourceApps),search:t.search,"search-placeholder":t.searchPlaceholder,label:t.label,"show-label":t.showLabel,name:t.name||"sourceApps","filter-predicate":h,clearable:t.clearable,help:t.help,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:f})=>[e.unref(r)(f)?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"elementToWatchForChanges",ref:s,class:"flex items-center space-x-0.5 h-5"},[e.createElementVNode("div",{ref_key:"itemContainer",ref:l,class:"flex flex-wrap overflow-hidden space-x-0.5 h-5"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f,i=>(e.openBlock(),e.createBlock(De,{key:i.name,"source-app":i},null,8,["source-app"]))),128))],512),e.unref(d)>0?(e.openBlock(),e.createElementBlock("div",mo," +"+e.toDisplayString(e.unref(d)),1)):e.createCommentVNode("",!0)],512)):(e.openBlock(),e.createElementBlock("div",fo,[e.createElementVNode("div",{class:"h-2 w-2 rounded-full mr-2",style:e.normalizeStyle({backgroundColor:e.unref(u)(f).bgColor})},null,4),e.createElementVNode("span",po,e.toDisplayString(e.unref(u)(f).name),1)]))]),option:e.withCtx(({item:f})=>[e.createElementVNode("div",ho,[e.createElementVNode("div",{class:"h-2 w-2 rounded-full mr-2",style:e.normalizeStyle({backgroundColor:f.bgColor})},null,4),e.createElementVNode("span",vo,e.toDisplayString(f.name),1)])]),_:1},8,["modelValue","multiple","items","search","search-placeholder","label","show-label","name","clearable","help"]))}}),yo={class:"flex flex-wrap gap-1.5 text-xs"},ko=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:n}){const a=n,o=t,{selectedValue:s,isArrayValue:l}=Be({props:e.toRefs(o),emit:a}),c=d=>{l(s.value)?s.value=s.value.filter(r=>r.id!==d.id):s.value=void 0};return(d,r)=>(e.openBlock(),e.createBlock(we,{modelValue:e.unref(s),"onUpdate:modelValue":r[0]||(r[0]=u=>e.isRef(s)?s.value=u: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:u})=>[e.createElementVNode("ul",yo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l)(u)?u:[u],h=>(e.openBlock(),e.createElementBlock("li",{key:h[t.by]},[e.createVNode(ue,{size:"lg","clickable-icon":!0,"icon-left":e.unref(T.XMarkIcon),onClickIcon:e.withModifiers(p=>c(h),["stop"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.text),1)]),_:2},1032,["icon-left","onClickIcon"])]))),128))])]),option:e.withCtx(({item:u})=>[e.createTextVNode(e.toDisplayString(u.text),1)]),_:1},8,["modelValue","multiple","items","label","name","help","rules","by"]))}}),bo={class:"flex items-center"},xo={class:"absolute inset-0 flex items-center gap-2 px-1 text-white"},Co=e.defineComponent({__name:"Switch",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(t){const n=e.useModel(t,"modelValue");return(a,o)=>(e.openBlock(),e.createElementBlock("div",bo,[e.createVNode(e.unref(M.Switch),{modelValue:n.value,"onUpdate:modelValue":o[0]||(o[0]=s=>n.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":n.value,"bg-primary-muted":!n.value}])},{default:e.withCtx(()=>[e.createElementVNode("div",xo,[e.createVNode(e.unref(T.CheckIcon),{class:"h-5 w-5 drop-shadow-md"}),e.createVNode(e.unref(T.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":n.value,"translate-x-0":!n.value}])},null,2)]),_:1},8,["modelValue","class"])]))}}),Bo={class:"relative group bg-foundation-page p-2 rounded-lg pr-12"},wo={class:"absolute inset-0 right-2 flex justify-end items-center"},Vo=e.defineComponent({__name:"ClipboardInput",props:{value:null,isMultiline:{type:Boolean,default:!1},rows:null},emits:["copy"],setup(t,{emit:n}){const a=t,o=n,{copy:s}=P.useClipboard({legacy:!0}),l=e.ref(!1),c=async()=>{a.value&&(await s(a.value),l.value=!0,o("copy",a.value),setTimeout(()=>{l.value=!1},2e3))},d=r=>{const u=r.target,h=window.getSelection();if(h){const p=document.createRange();p.selectNodeContents(u),h.removeAllRanges(),h.addRange(p)}};return(r,u)=>(e.openBlock(),e.createElementBlock("div",Bo,[t.isMultiline?(e.openBlock(),e.createElementBlock("div",{key:0,class:"relative z-10 text-xs sm:text-sm text-foreground font-mono break-all p-2 pl-3 max-h-[4.8rem] simple-scrollbar overflow-y-auto",onKeypress:u[0]||(u[0]=h=>e.unref(ke)(d))},e.toDisplayString(t.value),33)):(e.openBlock(),e.createBlock(e.unref(Le),{key:1,color:"transparent",name:"contentInput",readonly:"","model-value":t.value,class:"relative z-10 text-sm text-foreground font-mono"},null,8,["model-value"])),e.createElementVNode("div",wo,[e.createVNode(e.unref(F),{color:"invert",size:"sm","icon-left":l.value?e.unref(j.ClipboardDocumentCheckIcon):e.unref(j.ClipboardDocumentIcon),"hide-text":"",onClick:c},null,8,["icon-left"])])]))}});var te=(t=>(t.CtrlOrCmd="cmd-or-ctrl",t.AltOrOpt="alt-or-opt",t.Shift="shift",t))(te||{});const se=X.getClientOperatingSystem(),Eo={"cmd-or-ctrl":se===X.OperatingSystem.Mac?"Cmd":"Ctrl","alt-or-opt":se===X.OperatingSystem.Mac?"Opt":"Alt",shift:"Shift"};function $o(t){const n=a=>Object.values(te).includes(a);return t.map(a=>n(a)?Eo[a]:a).join("+")}function No(t,...n){P.onKeyDown(n[0],a=>{const o=a.getModifierState("Alt"),s=se===X.OperatingSystem.Mac?a.getModifierState("Meta"):a.getModifierState("Control"),l=a.getModifierState("Shift");for(const c of t)switch(c){case te.CtrlOrCmd:if(!s)return;break;case te.AltOrOpt:if(!o)return;break;case te.Shift:if(!l)return;break}n[1](a)},n[2])}function So(t){const n=(t==null?void 0:t.model)||e.ref(),a=e.computed({get:()=>!!n.value,set:o=>n.value=o?!0:void 0});return{model:n,isChecked:a}}const zo=e.createElementVNode("div",{class:"fixed inset-0 bg-neutral-100/70 dark:bg-neutral-900/70 transition-opacity backdrop-blur-xs"},null,-1),Io={class:"fixed inset-0 z-10 h-[100dvh] w-screen"},Lo={class:"flex justify-center items-center h-full w-full p-4 sm:p-0"},Mo={key:0,class:"flex items-center justify-start rounded-t-lg shrink-0 min-h-[2rem] sm:min-h-[4rem] py-2 px-4 sm:px-8 truncate text-lg sm:text-2xl font-bold"},Do={class:"w-full truncate pr-12"},To=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:n}){const a=n,o=t,s=e.useSlots(),l=e.ref(!1),c=e.ref(!0),d=e.computed(()=>!!o.onSubmit),r=e.computed(()=>o.buttons||s.buttons),u=e.computed(()=>o.title||s.header),h=e.computed({get:()=>o.open,set:b=>a("update:open",b)}),p=e.computed(()=>{switch(o.maxWidth){case"sm":return 0;case"md":return 1;case"lg":return 2;case"xl":return 3;default:return 1e4}}),m=e.computed(()=>{const b=["w-full","sm:w-full sm:max-w-2xl"];return p.value>=1&&b.push("md:max-w-2xl"),p.value>=2&&b.push("lg:max-w-4xl"),p.value>=3&&b.push("xl:max-w-6xl"),p.value>=4&&b.push("2xl:max-w-7xl"),b.join(" ")}),f=()=>{o.preventCloseOnClickOutside||(h.value=!1)},i=B.throttle(b=>{const v=b.target,{scrollTop:k,offsetHeight:x,scrollHeight:E}=v;l.value=k>0,c.value=k+x>=E},60);return(b,v)=>(e.openBlock(),e.createBlock(e.unref(M.TransitionRoot),{as:"template",show:h.value},{default:e.withCtx(()=>[e.createVNode(e.unref(M.Dialog),{as:"div",class:"relative z-40",onClose:f},{default:e.withCtx(()=>[e.createVNode(e.unref(M.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(()=>[zo]),_:1}),e.createElementVNode("div",Io,[e.createElementVNode("div",Lo,[e.createVNode(e.unref(M.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:v[2]||(v[2]=k=>b.$emit("fully-closed"))},{default:e.withCtx(()=>[e.createVNode(e.unref(M.DialogPanel),{class:e.normalizeClass(["transform rounded-lg text-foreground overflow-hidden bg-foundation text-left shadow-xl transition-all flex flex-col max-h-[90dvh]",m.value]),as:d.value?"form":"div",onSubmit:e.withModifiers(t.onSubmit,["prevent"])},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(l.value&&"relative z-20 shadow-lg")},[u.value?(e.openBlock(),e.createElementBlock("div",Mo,[e.createElementVNode("div",Do,[e.createTextVNode(e.toDisplayString(t.title)+" ",1),e.renderSlot(b.$slots,"header")])])):e.createCommentVNode("",!0)],2),t.hideCloser?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["absolute z-20 bg-foundation rounded-full p-1",u.value?"top-2 right-3 sm:top-4":"right-4 top-3"]),onClick:v[0]||(v[0]=k=>h.value=!1)},[e.createVNode(e.unref(j.XMarkIcon),{class:"h-5 sm:h-6 w-5 sm:w-6"})],2)),e.createElementVNode("div",{class:e.normalizeClass(["flex-1 simple-scrollbar overflow-y-auto",u.value?"p-3 sm:py-6 sm:px-8":"p-10"]),onScroll:v[1]||(v[1]=(...k)=>e.unref(i)&&e.unref(i)(...k))},[e.renderSlot(b.$slots,"default",{},()=>[e.createTextVNode("Put your content here!")])],34),r.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["relative z-50 flex px-4 py-2 sm:py-4 sm:px-6 gap-2 shrink-0 bg-foundation",!c.value&&"shadow-t"])},[t.buttons?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.buttons,(k,x)=>(e.openBlock(),e.createBlock(e.unref(F),e.mergeProps({key:x},k.props,{disabled:k.disabled,type:k.submit&&"submit",onClick:k.onClick}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.text),1)]),_:2},1040,["disabled","type","onClick"]))),128)):e.renderSlot(b.$slots,"buttons",{key:1})],2)):e.createCommentVNode("",!0)]),_:3},8,["class","as","onSubmit"])]),_:3})])])]),_:3})]),_:3},8,["show"]))}}),Oo={class:"h-4 sm:h-5 h-4 sm:w-5 empty:h-0 empty:w-0"},Ao=e.defineComponent({__name:"DialogSection",props:{title:String,borderT:Boolean,borderB:Boolean,allowOverflow:Boolean,titleColor:{type:String,default:"default"},button:Object,alwaysOpen:Boolean,lazyLoad:{type:Boolean,default:!1}},setup(t){const n=t,a=e.ref(null),o=e.ref(0),s=e.ref(!1),l=e.computed(()=>{const r=[];return!n.button&&!n.alwaysOpen&&r.push("cursor-pointer","hover:bg-foundation"),s.value&&r.push("bg-foundation"),r}),c=e.computed(()=>{switch(n.titleColor){case"danger":return"text-danger";case"warning":return"text-warning";case"success":return"text-success";case"secondary":return"text-secondary";case"info":return"text-info";default:return"text-foreground"}}),d=async()=>{var r;s.value=!s.value,s.value&&(await e.nextTick(),o.value=(((r=e.unref(a))==null?void 0:r.scrollHeight)||0)+64)};return(r,u)=>{var h,p;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col border-primary-muted",{"border-t":t.borderT,"border-b":t.borderB,"relative z-10":s.value}])},[e.createElementVNode("div",e.mergeProps({class:["flex justify-between items-center gap-4 sm:gap-8 py-3 sm:py-4 px-2",l.value],tabindex:"0"},e.toHandlers(!t.button&&!t.alwaysOpen?{click:d,keypress:e.unref(ke)(d)}:{},!0)),[e.createElementVNode("div",{class:e.normalizeClass(["text-sm sm:text-base font-bold flex items-center gap-1 sm:gap-2 select-none",c.value])},[e.createElementVNode("div",Oo,[e.renderSlot(r.$slots,"icon")]),e.createElementVNode("span",null,e.toDisplayString(t.title),1)],2),e.createElementVNode("div",null,[!t.button&&!t.alwaysOpen?(e.openBlock(),e.createBlock(e.unref(j.ChevronDownIcon),{key:0,class:e.normalizeClass(["w-4 h-4 sm:w-5 sm:h-5 transition-all duration-400",s.value&&"rotate-180"])},null,8,["class"])):e.createCommentVNode("",!0),t.button?(e.openBlock(),e.createBlock(e.unref(F),e.mergeProps({key:1,size:"sm",to:t.button.expandContent?void 0:t.button.to,color:t.button.expandContent&&s.value?"invert":t.button.color,"icon-right":t.button.expandContent&&s.value?void 0:t.button.iconRight,onClick:(h=t.button)==null?void 0:h.onClick},e.toHandlers((p=t.button)!=null&&p.expandContent?{click:d}:{})),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.button.expandContent&&s.value?"Cancel":t.button.text),1)]),_:1},16,["to","color","icon-right","onClick"])):e.createCommentVNode("",!0)])],16),e.createElementVNode("div",{class:e.normalizeClass(["transition-all duration-700 overflow-hidden",[t.allowOverflow&&s.value?"!overflow-visible":"",s.value?"mb-3 mt-1":"",!t.button&&!t.alwaysOpen?"cursor-pointer hover:bg-foundation":""]]),style:e.normalizeStyle(t.alwaysOpen?"max-height: none;":`max-height: ${s.value?o.value+"px":"0px"}`)},[n.lazyLoad?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[s.value||n.alwaysOpen?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"content",ref:a,class:"rounded-md text-sm pb-3 px-2 mt-1"},[e.renderSlot(r.$slots,"default",{},()=>[e.createTextVNode("Panel contents")])],512)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"content",ref:a,class:"rounded-md text-sm pb-3 px-2 mt-1"},[e.renderSlot(r.$slots,"default",{},()=>[e.createTextVNode("Panel contents")])],512))],6)],2)}}}),Po={class:"inline-flex items-center space-x-2"},_o={class:"label-light"},jo=e.defineComponent({__name:"Disclosure",props:{title:null,icon:null,color:{default:"default"}},setup(t){const n=t,a=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(n.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=["p-3 border-x border-b rounded-b-md"];switch(n.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,l)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(M.Disclosure),null,{default:e.withCtx(({open:c})=>[e.createVNode(e.unref(M.DisclosureButton),{class:e.normalizeClass(a.value)},{default:e.withCtx(()=>[e.createElementVNode("div",Po,[t.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon),{key:0,class:"h-5 w-5"})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(t.title),1)]),e.createVNode(e.unref(T.ChevronUpIcon),{class:e.normalizeClass([c?"":"rotate-180 transform","h-5 w-5"])},null,8,["class"])]),_:2},1032,["class"]),e.createVNode(e.unref(M.DisclosurePanel),{class:e.normalizeClass(o.value)},{default:e.withCtx(()=>[e.createElementVNode("div",_o,[e.renderSlot(s.$slots,"default",{},()=>[e.createTextVNode("Panel contents")])])]),_:3},8,["class"])]),_:3})]))}});var G=(t=>(t.Grid="grid",t.List="list",t))(G||{});const Fo={class:"relative flex bg-foundation rounded-md"},Ro={class:"relative z-10 flex gap-1 items-center p-1 rounded-l"},Uo={class:"relative z-10 flex gap-1 items-center p-1 rounded-r"},qo=e.defineComponent({__name:"GridListToggle",props:{modelValue:null},emits:["click","update:modelValue"],setup(t,{emit:n}){const a=n,o=t,s=e.computed({get:()=>o.modelValue||G.Grid,set:c=>a("update:modelValue",c)}),l=c=>{a("click",c);const d=s.value===G.Grid?G.List:G.Grid;s.value=d};return(c,d)=>(e.openBlock(),e.createElementBlock("button",{class:"max-w-max transition flex justify-center items-center gap-2 outline-none select-none h-8 text-foreground border-2 bg-foundation border-foundation-2 rounded-md hover:ring-2 active:scale-[0.97] grow",onClick:l},[e.createElementVNode("div",Fo,[e.createElementVNode("div",{class:e.normalizeClass(["absolute -top-[2px] -left-[2px] transition",{"translate-x-7":s.value!==e.unref(G).Grid}])},[e.createElementVNode("div",{class:e.normalizeClass([s.value!==e.unref(G).Grid?"rounded-r-md":"rounded-l-md","w-8 h-8 bg-primary-muted shadow-inner transition"])},null,2)],2),e.createElementVNode("div",Ro,[e.createVNode(e.unref(T.Squares2X2Icon),{class:"h-5 w-5"})]),e.createElementVNode("div",Uo,[e.createVNode(e.unref(T.Bars3Icon),{class:"h-5 w-5"})])])]))}});var Te=(t=>(t[t.Throttle=0]="Throttle",t[t.Debounce=1]="Debounce",t))(Te||{}),ae=(t=>(t[t.Left=0]="Left",t[t.Right=1]="Right",t))(ae||{});function Oe(t,n){if(!P.isClient)return;const{wait:a=100,throttleOrDebounce:o=0}=n||{},s=a?o===0?B.throttle(t,a):B.debounce(t,a):t;e.onMounted(()=>window.addEventListener("resize",s)),e.onBeforeUnmount(()=>window.removeEventListener("resize",s))}function Wo(t){e.onMounted(()=>{window.addEventListener("beforeunload",t)}),e.onBeforeUnmount(()=>{window.removeEventListener("beforeunload",t)})}function Ae(t){const{el:n,defaultDirection:a}=t,o=e.ref(B.isUndefined(a)?1:a),s=e.computed(()=>{const c=e.unref(t.stopUpdatesBelowWidth);if(!B.isUndefined(c))return c;const d=e.unref(n);return d!=null&&d.offsetWidth?d.offsetWidth*2:void 0}),l=()=>{if(!P.isClient)return;const c=e.unref(n);if(!c)return;const d=c.getBoundingClientRect(),r=d.x+d.width>window.innerWidth,u=d.x<0;r&&u||!B.isUndefined(s.value)&&window.innerWidth<s.value||(r?o.value=0:u&&(o.value=1))};return Oe(()=>l()),e.watch(()=>e.unref(n),c=>{c&&l()}),{direction:e.computed(()=>o.value),recalculateDirection:l}}const Ho=["disabled","onClick"],Ko=e.defineComponent({__name:"Menu",props:{open:{type:Boolean},items:null},emits:["update:open","chosen"],setup(t,{emit:n}){const a=n,o=t,s=e.ref(null),{direction:l}=Ae({el:e.computed(()=>{var f;return((f=s.value)==null?void 0:f.el)||null}),defaultDirection:ae.Left,stopUpdatesBelowWidth:300}),c=e.ref(null),d=e.ref(!1),r=e.computed({get:()=>o.open||!1,set:f=>a("update:open",f)}),u=f=>{const{active:i,disabled:b,color:v}=f,k=["group flex gap-3 w-full items-center rounded-md px-2 py-1.5 text-sm"];return i&&!v?k.push("bg-foundation-focus text-foreground"):b?k.push("text-foreground-disabled"):v==="danger"&&i?k.push("text-foreground-on-primary bg-danger"):v==="danger"&&!i?k.push("text-danger"):v==="info"&&i?k.push("text-foreground-on-primary bg-info"):v==="info"&&!i?k.push("text-info"):k.push("text-foreground"),k.join(" ")},h=(f,i)=>{a("chosen",{item:f,event:i})},p=()=>{var f;return(f=c.value)==null?void 0:f.el.click()},m=f=>{const i=!!f;return d.value=i,i};return e.watch(d,(f,i)=>{f!==i&&(r.value=f)}),e.watch(r,f=>{(f&&!d.value||!f&&d.value)&&p()}),(f,i)=>(e.openBlock(),e.createBlock(e.unref(M.Menu),{as:"div",class:"relative inline-block"},{default:e.withCtx(({open:b})=>[e.createElementVNode("div",null,[e.createVNode(e.unref(M.MenuButton),{ref_key:"menuButton",ref:c,class:"hidden",onClick:i[0]||(i[0]=e.withModifiers(()=>{},["stop","prevent"]))},null,512),e.createElementVNode("div",{class:e.normalizeClass(b?"pointer-events-none":"")},[e.renderSlot(f.$slots,"default",{toggle:p,open:m(b)})],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(M.MenuItems),{ref_key:"menuItems",ref:s,class:e.normalizeClass(["absolute mt-2 w-48 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(l)===e.unref(ae).Left?"right-0":""])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(v,k)=>(e.openBlock(),e.createElementBlock("div",{key:k,class:"p-1"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v,x=>(e.openBlock(),e.createBlock(e.unref(M.MenuItem),{key:x.id,disabled:x.disabled,color:x.color},{default:e.withCtx(({active:E,disabled:C})=>[e.withDirectives((e.openBlock(),e.createElementBlock("span",null,[e.createElementVNode("button",{class:e.normalizeClass(u({active:E,disabled:C,color:x.color})),disabled:C,onClick:g=>h(x,g)},[x.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(x.icon),{key:0,class:"h-5 w-5"})):e.createCommentVNode("",!0),e.renderSlot(f.$slots,"item",{item:x},()=>[e.createTextVNode(e.toDisplayString(x.title),1)])],10,Ho)])),[[e.unref(Se.directive),x.disabled&&x.disabledTooltip]])]),_:2},1032,["disabled","color"]))),128))]))),128))]),_:3},8,["class"])]),_:3})]),_:3}))}}),Go={class:"flex flex-col gap-y-0 sm:gap-y-4"},Xo={class:"flex gap-x-6"},Zo=e.defineComponent({__name:"Tabs",props:{items:null},setup(t){const n=t,a=e.ref(null),o=e.computed(()=>a.value&&n.items.find(l=>l.id===a.value)||n.items[0]),s=l=>{a.value=l.id};return(l,c)=>(e.openBlock(),e.createElementBlock("div",Go,[e.createElementVNode("div",Xo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,d=>(e.openBlock(),e.createBlock(F,{key:d.id,link:"",color:o.value.id===d.id?"default":"secondary",onClick:r=>s(d)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.title),1)]),_:2},1032,["color","onClick"]))),128))]),e.renderSlot(l.$slots,"default",{activeItem:o.value})]))}}),Qo={class:"text-foreground"},Jo={class:"w-full text-sm overflow-x-auto overflow-y-visible simple-scrollbar"},Yo=["onClick","onKeypress"],el=e.createElementVNode("div",{class:"text-gray-900 font-medium order-1"},"Placeholder",-1),tl={class:"absolute right-1.5 gap-1 flex items-center p-0"},nl=e.defineComponent({__name:"Table",props:{items:null,buttons:null,columns:null,overflowCells:{type:Boolean},onRowClick:{type:Function}},setup(t){const n=t,a=e.computed(()=>{const c=(n.buttons||[]).length;let d=16;return c>0&&(d=48+(c-1)*42),`${d}px`}),o=c=>{var d;return((d=n.columns.find(r=>r.id===c))==null?void 0:d.classes)||""},s=(c,d)=>{const r=o(c);return d===0?`bg-transparent py-3 pr-5 px-1 ${r}`:`lg:p-0 px-1 my-2 ${r}`},l=c=>{var d;(d=n.onRowClick)==null||d.call(n,c)};return(c,d)=>(e.openBlock(),e.createElementBlock("div",Qo,[e.createElementVNode("div",Jo,[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:a.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,r=>(e.openBlock(),e.createElementBlock("div",{key:r.id,class:e.normalizeClass([o(r.id),"capitalize"])},e.toDisplayString(r.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,r=>(e.openBlock(),e.createElementBlock("div",{key:r.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:a.value}),tabindex:"0",onClick:u=>l(r),onKeypress:u=>l(r)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,(u,h)=>(e.openBlock(),e.createElementBlock("div",{key:u.id,class:e.normalizeClass(s(u.id,h)),tabindex:"0"},[e.renderSlot(c.$slots,u.id,{item:r},()=>[el])],2))),128)),e.createElementVNode("div",tl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.buttons,u=>(e.openBlock(),e.createElementBlock("div",{key:u.label},[e.createVNode(e.unref(F),{"icon-left":u.icon,size:"sm",color:"secondary","hide-text":"",class:e.normalizeClass(u.class),onClick:e.withModifiers(h=>u.action(r),["stop"])},null,8,["icon-left","class","onClick"])]))),128))])],46,Yo))),128))],2)])]))}}),ol={class:"w-full flex flex-col items-center my-2 space-y-2 mt-4"},ll={class:"inline-flex items-center space-x-1"},sl=e.createElementVNode("span",{class:"text-foreground-2"},"That's it, you've loaded everything!",-1),al={class:"w-full flex flex-col items-center my-2 space-y-2 mt-4"},rl={class:"inline-flex items-center space-x-1"},il=e.createElementVNode("span",{class:"text-foreground-2"},"An error occurred while loading",-1),cl=e.defineComponent({__name:"InfiniteLoading",props:{settings:null,allowRetry:{type:Boolean}},emits:["infinite"],setup(t){const n=e.ref(null),a=e.ref(!1);return P.isClient&&e.onMounted(()=>{const o=setInterval(()=>{var s;(s=n.value)!=null&&s.isConnected&&(a.value=!0,clearInterval(o))},200)}),(o,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:n},[a.value?(e.openBlock(),e.createBlock(e.unref(Ze),e.mergeProps({key:0},o.$props.settings||{},{onInfinite:s[0]||(s[0]=l=>o.$emit("infinite",l))}),{spinner:e.withCtx(()=>[e.createVNode(de,{loading:!0,class:"my-2"})]),complete:e.withCtx(()=>[e.createElementVNode("div",ol,[e.createElementVNode("div",ll,[e.createVNode(e.unref(j.CheckIcon),{class:"w-5 h-5 text-success"}),sl])])]),error:e.withCtx(({retry:l})=>[e.createElementVNode("div",al,[e.createElementVNode("div",rl,[e.createVNode(e.unref(j.ExclamationTriangleIcon),{class:"w-5 h-5 text-danger"}),il]),t.allowRetry?(e.openBlock(),e.createBlock(F,{key:0,onClick:l},{default:e.withCtx(()=>[e.createTextVNode("Retry")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)])]),_:1},16)):e.createCommentVNode("",!0)],512))}}),ul={class:"relative group"},dl={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"},ml=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:n}){const a=n,o=t,s=e.computed(()=>o.customPadding?"":"px-4 py-4 sm:px-6"),l=e.computed(()=>o.customPadding?"":"px-4 py-4 sm:p-6"),c=e.computed(()=>{const d=["rounded-lg"];return o.noShadow||d.push("shadow"),o.ring&&d.push("ring-outline-2 hover:ring-2"),o.panelClasses&&d.push(o.panelClasses),d.join(" ")});return(d,r)=>(e.openBlock(),e.createElementBlock("div",ul,[t.fancyGlow?(e.openBlock(),e.createElementBlock("div",dl)):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:r[0]||(r[0]=u=>a("submit",u))},{default:e.withCtx(()=>[d.$slots.header?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(s.value)},[e.renderSlot(d.$slots,"header")],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["grow",l.value])},[e.renderSlot(d.$slots,"default")],2),d.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(s.value)},[e.renderSlot(d.$slots,"footer")],2)):e.createCommentVNode("",!0)]),_:3},40,["class"]))]))}}),fl={class:"flex-shrink-0"},pl=e.createElementVNode("span",{class:"sr-only"},"Dismiss",-1),hl=e.defineComponent({__name:"Alert",props:{color:{default:"success"},withDismiss:{type:Boolean},actions:null,customIcon:null,size:{default:"default"}},emits:["dismiss"],setup(t){const n=t,a=e.useSlots(),o=e.computed(()=>!!a.description),s=e.computed(()=>{if(n.customIcon)return n.customIcon;switch(n.color){case"info":return D.InformationCircleIcon;case"warning":return D.ExclamationCircleIcon;case"danger":return D.XCircleIcon;case"success":default:return D.CheckCircleIcon}}),l=e.computed(()=>{const i=[];switch(n.size){case"xs":i.push("p-1");break;case"default":default:i.push(o.value?"p-3 sm:p-4":"p-2");break}switch(n.color){case"success":i.push("bg-success-lighter border-l-4 border-success");break;case"info":i.push("bg-info-lighter border-l-4 border-info");break;case"danger":i.push("bg-danger-lighter border-l-4 border-danger");break;case"warning":i.push("bg-warning-lighter border-l-4 border-warning");break}return i.join(" ")}),c=e.computed(()=>{const i=[];if(o.value)i.push("");else switch(i.push("items-center"),n.size){case"xs":i.push("space-x-1");break;case"default":default:i.push("space-x-2");break}return i.join(" ")}),d=e.computed(()=>{const i=["grow"];switch(o.value||i.push("flex items-center space-x-2"),n.size){case"xs":i.push("ml-1");break;case"default":default:i.push("ml-3");break}return i.join(" ")}),r=e.computed(()=>{const i=[];switch(n.size){case"xs":i.push("text-xs");break;case"default":default:i.push("mt-1 sm:mt-2 text-xs sm:text-sm");break}return i.join(" ")}),u=e.computed(()=>{var v;const i=["flex"];o.value||i.push("grow justify-end");const b=o.value&&((v=n.actions)==null?void 0:v.length);switch(n.size){case"xs":i.push("space-x-1"),b&&i.push("mt-1");break;case"default":default:i.push("space-x-2"),b&&i.push("mt-4");break}return i.join(" ")}),h=e.computed(()=>{const i=[];switch(n.color){case"success":i.push("text-success-darker");break;case"info":i.push("text-info-darker");break;case"danger":i.push("text-danger-darker");break;case"warning":i.push("text-warning-darker");break}return i.join(" ")}),p=e.computed(()=>{const i=[];switch(n.size){case"xs":i.push("h-4 w-4"),i.push(o.value?"mt-0.5":"");break;case"default":default:i.push("h-5 w-5");break}switch(n.color){case"success":i.push("text-success");break;case"info":i.push("text-info");break;case"danger":i.push("text-danger");break;case"warning":i.push("text-warning");break}return i.join(" ")}),m=e.computed(()=>{const i=[];switch(n.color){case"success":i.push("bg-success-lighter ring-success");break;case"info":i.push("bg-info-lighter ring-info");break;case"danger":i.push("bg-danger-lighter ring-danger");break;case"warning":i.push("bg-warning-lighter ring-warning");break}return i.join(" ")}),f=e.computed(()=>{switch(n.size){case"xs":return"xs";case"default":default:return"sm"}});return(i,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["rounded-md",[l.value,h.value]])},[e.createElementVNode("div",{class:e.normalizeClass(["flex",c.value])},[e.createElementVNode("div",fl,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value),{class:e.normalizeClass(p.value),"aria-hidden":"true"},null,8,["class"]))]),e.createElementVNode("div",{class:e.normalizeClass(d.value)},[e.createElementVNode("h3",{class:e.normalizeClass(["text-sm",[o.value?"font-medium":""]])},[e.renderSlot(i.$slots,"title",{},()=>[e.createTextVNode("Title")])],2),o.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(r.value)},[e.renderSlot(i.$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||[],(v,k)=>(e.openBlock(),e.createBlock(F,{key:k,color:t.color,size:f.value,to:v.url,external:v.externalUrl||!1,onClick:x=>v.onClick||e.unref(B.noop)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(v.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:b[0]||(b[0]=v=>i.$emit("dismiss"))},[pl,e.createVNode(e.unref(D.XMarkIcon),{class:"h-5 w-5","aria-hidden":"true"})],2)],2)):e.createCommentVNode("",!0)],2)],2))}});function vl(t){var i,b;const{get:n,initialState:a,readOptions:o,set:s,asyncRead:l=!0,debugging:c}=t,d=c==null?void 0:c.log,r=()=>(new Error("Trace:").stack||"").substring(7),u=((b=(i=t.debugging)==null?void 0:i.log)==null?void 0:b.logger)||console.debug,h=d&&!d.writesOnly?()=>{const v=n();return u(`debugging: '${d.name}' read`,v,r()),v}:n,p=d&&!d.readsOnly?v=>(u(`debugging: '${d.name}' written to`,v,r()),s(v)):s,m=l?P.computedAsync(h,a,o):e.computed(h),f=e.computed(()=>m.value);return f.update=p,f}const gl=e.defineComponent({__name:"ContextManager",setup(t,{expose:n}){const o=e.getCurrentInstance().provides,s=Object.getOwnPropertySymbols(o).find(m=>m.description==="ComboboxContext");s||console.error("FormTagsContextManager ctx key not found!");const l=e.inject(s||"__undefined");return l||console.error("FormTagsContextManager ctx not found!"),n({goUp:()=>{l==null||l.goToOption(1)},goDown:()=>{l==null||l.goToOption(2)},open:()=>{l&&l.openCombobox()},close:()=>{l==null||l.closeCombobox()},selectActive:()=>{l==null||l.selectActiveOption()},isOpen:()=>(l==null?void 0:l.comboboxState.value)===0}),(m,f)=>e.renderSlot(m.$slots,"default")}}),yl=["for"],kl=["disabled","placeholder","onKeydown"],bl=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),xl={key:1},Cl=e.createElementVNode("div",{class:"text-foreground-2 text-center"},[e.createTextVNode(" Press "),e.createElementVNode("strong",null,"Enter"),e.createTextVNode(" to create tag ⚡ ")],-1),Bl=[Cl],wl=["id"],Vl=e.defineComponent({__name:"Tags",props:{name:null,help:null,label:null,showLabel:{type:Boolean},rules:null,validateOnMount:{type:Boolean},validateOnValueUpdate:{type:Boolean},autoFocus:{type:Boolean},showClear:{type:Boolean},showRequired:{type:Boolean},color:{default:"page"},wrapperClasses:null,size:{default:"base"},placeholder:null,disabled:{type:Boolean},useLabelInErrors:{type:Boolean,default:!0},getAutocompleteItems:{type:Function},modelValue:null},emits:["update:modelValue","change","clear"],setup(t,{expose:n,emit:a}){const o=w=>w.type==="input",s=a,l=t,c=e.ref(null),{focused:d}=P.useFocus(c),r=e.ref(null),{coreInputClasses:u,coreClasses:h,labelClasses:p,title:m,helpTip:f,helpTipId:i,hideHelpTip:b,helpTipClasses:v,errorMessage:k,clear:x,value:E}=be({props:e.toRefs(l),emit:s,inputEl:c}),C=e.ref([]),g=e.ref(!1),S=e.ref(!1),z=e.ref(""),N=e.computed({get:()=>E.value||[],set:w=>{E.value=B.uniq(w).filter($=>!!$.length)}}),fe=e.computed(()=>{switch(l.size){case"sm":return"h-6";case"lg":return"h-10";case"xl":return"h-14";case"base":default:return"h-8"}}),K=e.computed(()=>l.showClear&&!!N.value.length),pe=e.computed(()=>{const w=[h.value,l.disabled?"cursor-not-allowed !bg-foundation-disabled !text-disabled-muted":""];return K.value&&(k.value||l.showRequired)?w.push("pr-14"):(K.value||k.value||l.showRequired)&&w.push("pr-8"),k.value?(w.push("border-2 border-danger text-danger-darker"),d.value&&w.push("ring-1 ring-danger")):(w.push("border-2 border-transparent"),d.value&&w.push("ring-2 ring-outline-2")),w.join(" ")}),he=w=>{if(l.disabled)return;const $=N.value.indexOf(w);if($!==-1){const V=N.value.slice();V.splice($,1),N.value=V}},Q=()=>{var w;(w=c.value)==null||w.blur(),S.value=!1},R=w=>{if(w.key!=="Backspace"||z.value.length)return;const $=N.value.slice();$.pop(),N.value=$,S.value=!1},Z=()=>{var w,$,V;(w=r.value)!=null&&w.isOpen()?($=r.value)==null||$.goUp():(V=r.value)==null||V.open()},O=()=>{var w,$,V;(w=r.value)!=null&&w.isOpen()?($=r.value)==null||$.goDown():(V=r.value)==null||V.open()},J=async()=>{l.getAutocompleteItems&&(g.value=!0,C.value=await Promise.resolve(l.getAutocompleteItems(z.value)),g.value=!1)},ve=B.debounce(J,1e3),ge=()=>{g.value=!0,ve()},ne=(w,$)=>{var A,U;if(o(w)?w.data===" "||w.data===","||w.data===";":!0){let oe=!1;if((A=r.value)!=null&&A.isOpen()&&C.value.length&&!$)(U=r.value)==null||U.selectActive(),oe=!0;else{const y=z.value.trim().substring(0,z.value.length-(o(w)?1:0)),L=N.value.includes(y);y.length>0&&!L&&(N.value=[...N.value,y],oe=!0)}oe&&(z.value="",S.value=!1)}else S.value=!!z.value.length};return e.watch(S,(w,$)=>{var V,A;w&&!$?l.getAutocompleteItems&&((V=r.value)==null||V.open()):!w&&$&&((A=r.value)==null||A.close())}),e.watch(z,()=>{ge()}),e.onMounted(()=>{J()}),n({resolveAutocompleteItems:J}),(w,$)=>(e.openBlock(),e.createBlock(e.unref(M.Combobox),{modelValue:N.value,"onUpdate:modelValue":$[5]||($[5]=V=>N.value=V),as:"div",multiple:"",clearable:"",class:e.normalizeClass([t.wrapperClasses])},{default:e.withCtx(()=>[e.createVNode(gl,{ref_key:"ctxManager",ref:r},{default:e.withCtx(()=>[e.createElementVNode("label",{for:t.name,class:e.normalizeClass(e.unref(p))},[e.createElementVNode("span",null,e.toDisplayString(e.unref(m)),1)],10,yl),e.createElementVNode("div",{class:e.normalizeClass(["relative flex flex-wrap items-center space-x-1 px-2 py-1",pe.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,V=>(e.openBlock(),e.createBlock(ue,{key:V,"icon-left":t.disabled?void 0:e.unref(D.XMarkIcon),"clickable-icon":"",size:"lg",onClickIcon:()=>he(V)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V),1)]),_:2},1032,["icon-left","onClickIcon"]))),128)),e.withDirectives(e.createElementVNode("input",{ref_key:"inputEl",ref:c,"onUpdate:modelValue":$[0]||($[0]=V=>z.value=V),disabled:t.disabled,class:e.normalizeClass(["bg-transparent grow shrink border-0 focus:ring-0 p-0",[e.unref(u),fe.value]]),style:{"flex-basis":"70px","min-width":"70px"},placeholder:N.value.length?void 0:t.placeholder,onInput:ne,onKeydown:[e.withKeys(Q,["escape"]),$[1]||($[1]=e.withKeys(e.withModifiers(V=>ne(V,!0),["stop","prevent"]),["enter"])),e.withKeys(ne,["tab"]),e.withKeys(R,["backspace"]),e.withKeys(Z,["arrow-up"]),e.withKeys(O,["arrow-down"])],onBlur:$[2]||($[2]=V=>S.value=!1)},null,42,kl),[[e.vModelText,z.value]]),K.value?(e.openBlock(),e.createElementBlock("a",{key:0,title:"Clear input",class:"absolute top-2 right-0 flex items-center pr-2 cursor-pointer",onClick:$[3]||($[3]=(...V)=>e.unref(x)&&e.unref(x)(...V)),onKeydown:$[4]||($[4]=(...V)=>e.unref(x)&&e.unref(x)(...V))},[bl,e.createVNode(e.unref(D.XMarkIcon),{class:"h-5 w-5 text-foreground","aria-hidden":"true"})],32)):e.createCommentVNode("",!0),e.unref(k)?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["pointer-events-none absolute top-[10px] right-0 flex items-center",K.value?"pr-8":"pr-2"])},[e.createVNode(e.unref(D.ExclamationCircleIcon),{class:"h-4 w-4 text-danger","aria-hidden":"true"})],2)):e.createCommentVNode("",!0),t.showRequired&&!e.unref(k)?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["pointer-events-none absolute top-[2px] text-4xl right-0 flex items-center text-danger opacity-50",K.value?"pr-8":"pr-2"])}," * ",2)):e.createCommentVNode("",!0)],2),e.createVNode(e.unref(M.TransitionRoot),{leave:"transition ease-in duration-100","leave-from":"opacity-100","leave-to":"opacity-0",class:"relative px-0.5"},{default:e.withCtx(()=>[e.createVNode(e.unref(M.ComboboxOptions),{class:"absolute top-1 max-h-60 w-full overflow-auto simple-scrollbar rounded-md bg-foundation-2 py-1 shadow label label--light outline outline-2 outline-primary-muted focus:outline-none"},{default:e.withCtx(()=>[g.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["px-1",C.value.length?"mb-1":""])},[e.createVNode(de,{loading:!0})],2)):e.createCommentVNode("",!0),!C.value.length&&!g.value?(e.openBlock(),e.createElementBlock("div",xl,Bl)):e.createCommentVNode("",!0),C.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(C.value,V=>(e.openBlock(),e.createBlock(e.unref(M.ComboboxOption),{key:V,as:"template",value:V},{default:e.withCtx(({selected:A,active:U})=>[e.createElementVNode("li",{class:e.normalizeClass(["relative cursor-pointer select-none py-1.5 pl-3",{"text-primary":U,"text-foreground":!U}])},[e.createElementVNode("span",{class:e.normalizeClass(["block truncate",{"font-medium":A,"font-normal":!A}])},e.toDisplayString(V),3),A?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["absolute inset-y-0 right-0 flex items-center pr-4",{"text-primary":U,"text-foreground":!U}])},[e.createVNode(e.unref(D.CheckIcon),{class:"h-5 w-5","aria-hidden":"true"})],2)):e.createCommentVNode("",!0)],2)]),_:2},1032,["value"]))),128)):e.createCommentVNode("",!0)]),_:1})]),_:1}),e.unref(i)&&!e.unref(b)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(i),class:e.normalizeClass(e.unref(v))},e.toDisplayString(e.unref(f)),11,wl)):e.createCommentVNode("",!0)]),_:1},512)]),_:1},8,["modelValue","class"]))}});function Pe(t){const{props:n}=t,a=e.computed(()=>{var r;switch((r=n.size)==null?void 0:r.value){case"xs":return"h-5";case"sm":return"h-6";case"lg":return"h-10";case"xl":return"h-14";case"xxl":return"h-32";case"editable":return"h-60";case"base":default:return"h-8"}}),o=e.computed(()=>{var r;switch((r=n.size)==null?void 0:r.value){case"xs":return"w-5";case"sm":return"w-6";case"lg":return"w-10";case"xl":return"w-14";case"xxl":return"w-32";case"editable":return"w-60";case"base":default:return"w-8"}}),s=e.computed(()=>{var r;switch((r=n.size)==null?void 0:r.value){case"xs":return"text-tiny";case"sm":return"text-xs";case"lg":return"text-md";case"xl":return"text-2xl";case"xxl":return"text-3xl";case"editable":return"h1";case"base":default:return"text-sm"}}),l=e.computed(()=>{var r;switch((r=n.size)==null?void 0:r.value){case"xs":return"w-3 h-3";case"sm":return"w-3 h-3";case"lg":return"w-5 h-5";case"xl":return"w-8 h-8";case"xxl":return"w-10 h-10";case"editable":return"w-20 h-20";case"base":default:return"w-4 h-4"}}),c=e.computed(()=>`${o.value} ${a.value} ${s.value}`);return{heightClasses:a,widthClasses:o,sizeClasses:c,iconClasses:l}}const El={key:1,class:"flex h-full w-full select-none items-center justify-center"},$l={key:2},re=e.defineComponent({__name:"Avatar",props:{user:{default:null},size:{default:"base"},hoverEffect:{type:Boolean,default:!1},active:{type:Boolean},noBorder:{type:Boolean},noBg:{type:Boolean}},setup(t){const n=t,{sizeClasses:a,iconClasses:o}=Pe({props:e.toRefs(n)}),s=e.computed(()=>{var m,f,i;if(!((m=n.user)!=null&&m.name.length))return;const u=n.user.name.split(" "),h=((f=u[0])==null?void 0:f[0])||"",p=((i=u[1])==null?void 0:i[0])||"";return n.size==="sm"||n.size==="xs"?h:h+p}),l=e.computed(()=>n.noBorder?"":"border-2 border-foundation"),c=e.computed(()=>n.noBg?"":"bg-primary"),d=e.computed(()=>n.hoverEffect?"hover:border-primary focus:border-primary active:scale-95":""),r=e.computed(()=>n.active?"border-primary":"");return(u,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["text-foreground-on-primary flex shrink-0 items-center justify-center overflow-hidden rounded-full font-semibold uppercase transition",e.unref(a),c.value,l.value,d.value,r.value])},[e.renderSlot(u.$slots,"default",{},()=>{var p;return[(p=t.user)!=null&&p.avatar?(e.openBlock(),e.createElementBlock("div",{key:0,class:"h-full w-full bg-cover bg-center bg-no-repeat",style:e.normalizeStyle({backgroundImage:`url('${t.user.avatar}')`})},null,4)):s.value?(e.openBlock(),e.createElementBlock("div",El,e.toDisplayString(s.value),1)):(e.openBlock(),e.createElementBlock("div",$l,[e.createVNode(e.unref(T.UserCircleIcon),{class:e.normalizeClass(e.unref(o))},null,8,["class"])]))]}),e.renderSlot(u.$slots,"absolute-anchor")],2))}}),Nl=e.defineComponent({__name:"AvatarGroup",props:{users:{default:()=>[]},overlap:{type:Boolean,default:!0},size:{default:"base"},maxCount:{default:void 0}},setup(t){const n=t,a=e.ref(null),o=e.ref(null),{hiddenItemCount:s}=Ce({elementToWatchForChanges:a,itemContainer:o,trackResize:!0,trackMutations:!0}),{heightClasses:l}=Pe({props:e.toRefs(n)}),c=e.computed(()=>n.maxCount?Math.max(n.users.length-n.maxCount,0):0),d=e.computed(()=>s.value+c.value),r=e.computed(()=>n.maxCount?n.users.slice(0,n.maxCount):n.users);return(u,h)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"elementToWatchForChanges",ref:a,class:e.normalizeClass(`flex ${t.overlap?"-space-x-2":""}`)},[e.createElementVNode("div",{ref_key:"itemContainer",ref:o,class:e.normalizeClass(`flex flex-wrap overflow-hidden ${t.overlap?"-space-x-2 ":""} ${e.unref(l)}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(p,m)=>(e.openBlock(),e.createBlock(re,{key:p.id||m,user:p,size:t.size},null,8,["user","size"]))),128))],2),d.value?(e.openBlock(),e.createBlock(re,{key:0,size:t.size},{default:e.withCtx(()=>[e.createTextVNode(" +"+e.toDisplayString(d.value),1)]),_:1},8,["size"])):e.createCommentVNode("",!0)],2))}}),_e=e.defineComponent({__name:"Icon",props:{loading:{type:Boolean,default:!0},size:{default:"base"}},setup(t){const n=t,a=e.computed(()=>{const o=["text-primary transition-all animate-spin"];switch(o.push(n.loading?"opacity-100":"opacity-0"),n.size){case"base":o.push("h-8 w-8");break;case"sm":o.push("h-5 w-5");break;case"lg":o.push("h-12 w-12");break}return o.join(" ")});return(o,s)=>(e.openBlock(),e.createBlock(e.unref(T.ArrowPathIcon),{class:e.normalizeClass(a.value)},null,8,["class"]))}}),Sl={class:"flex flex-col items-center space-y-2"},zl={key:1,class:"relative group"},Il={class:"opacity-0 transition-all absolute group-hover:opacity-100 inset-0 flex items-end justify-center bottom-4"},Ll={key:2,class:"w-full text-center text-danger text-sm"},Ml=e.defineComponent({__name:"AvatarEditable",props:e.mergeModels({modelValue:null,placeholder:null,name:null,rules:null,validateOnMount:{type:Boolean},validateOnValueUpdate:{type:Boolean},disabled:{type:Boolean},size:null},{editMode:{type:Boolean,local:!0}}),emits:e.mergeModels(["save","update:modelValue"],["update:editMode"]),setup(t,{expose:n,emit:a}){const o=e.defineAsyncComponent({loader:()=>Promise.resolve().then(()=>require("./AvatarEditor-25bff065.cjs")),loadingComponent:_e,delay:100}),s=a,l=t,{value:c,errorMessage:d}=le.useField(l.name,l.rules,{validateOnMount:l.validateOnMount,validateOnValueUpdate:l.validateOnValueUpdate,initialValue:l.modelValue||void 0}),r=e.useModel(t,"editMode",{local:!0}),u=e.computed(()=>({avatar:c.value,name:l.placeholder})),h=f=>{c.value=f,s("save",f)};return n({open:()=>r.value=!0,close:()=>r.value=!1}),(f,i)=>(e.openBlock(),e.createElementBlock("div",Sl,[r.value?(e.openBlock(),e.createBlock(e.unref(o),{key:0,user:u.value,disabled:t.disabled,size:t.size,onCancel:i[0]||(i[0]=b=>r.value=!1),onSave:h},null,8,["user","disabled","size"])):(e.openBlock(),e.createElementBlock("div",zl,[e.createVNode(re,{user:u.value,size:t.size},null,8,["user","size"]),e.createElementVNode("div",Il,[e.createVNode(F,{disabled:t.disabled,color:"secondary",onClick:i[1]||(i[1]=b=>r.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(" Change ")]),_:1},8,["disabled"])])])),e.unref(d)?(e.openBlock(),e.createElementBlock("div",Ll,e.toDisplayString(e.unref(d)),1)):e.createCommentVNode("",!0)]))}});class H extends Error{constructor(n,a){n||(n=new.target.defaultMessage),super(n,a)}}W(H,"defaultMessage","Unexpected error occurred");class je extends H{}W(je,"defaultMessage","An unexpected logic error occurred!");class Fe extends H{}W(Fe,"defaultMessage","Attempting to access an uninitialized resource");class Re extends H{}W(Re,"defaultMessage","getCurrentInstance() returned null. Method must be called at the top of a setup function");class Ue extends H{}W(Ue,"defaultMessage","Operation not supported in current (server or client) environment");var me=(t=>(t.AnyAudio="audio/*",t.AnyVideo="video/*",t.AnyImage="image/*",t))(me||{});function Dl(t,n){const a=B.intersection(Object.values(me),n);for(const l of a)switch(l){case"audio/*":if(t.type.startsWith("audio"))return!0;break;case"image/*":if(t.type.startsWith("image"))return!0;break;case"video/*":if(t.type.startsWith("video"))return!0;break}const o=B.difference(n,a),s=Tl(t.name);if(!s)return new qe;for(const l of o)if(l.toLowerCase()===s.toLowerCase())return!0;return new We}function Tl(t){const n=t.split(".").pop()||null;return n?`.${n}`:null}function Ol(t){return t.startsWith(".")||Object.values(me).includes(t)}function ye(t){const n=l=>parseFloat(l.toFixed(2)).toString();if(t<1024)return`${t}bytes`;const a=t/1024;if(a<1024)return`${n(a)}KB`;const o=a/1024;if(o<1024)return`${n(o)}MB`;const s=o/1024;return`${n(s)}GB`}function Al(t){const n={name:t.name,lastModified:t.lastModified,size:t.size,type:t.type};return X.md5(JSON.stringify(n))}class qe extends H{}W(qe,"defaultMessage","The selected file has a missing extension");class We extends H{}W(We,"defaultMessage","The selected file type is forbidden");var He=(t=>(t[t.Success=1]="Success",t[t.Failure=2]="Failure",t))(He||{});function Pl(t){if(!t)return;const n=t.split(",").map(a=>Ol(a)?a:null).filter(a=>a!==null);return n.length?n:void 0}function _l(t){const{disabled:n,accept:a,multiple:o,sizeLimit:s,countLimit:l}=t,c=e.computed(()=>Pl(e.unref(a))),d=r=>{const u=[],h=c.value;for(const p of r){const m=Al(p),f=e.unref(o)?e.unref(l):1;if(!u.find(i=>i.id===m)){if(f&&u.length>=f)break;if(h){const i=Dl(p,h);if(i instanceof Error){u.push({file:p,id:m,error:i});continue}}if(p.size>e.unref(s)){u.push({file:p,id:m,error:new Ke(`The selected file's size (${ye(p.size)}) is too big (over ${ye(e.unref(s))})`)});continue}u.push({file:p,id:m,error:null})}}return u};return{buildUploadableFiles:r=>{if(!e.unref(n||!1))return d(r)}}}class Ke extends H{}W(Ke,"defaultMessage","The selected file's size is too large");const jl=["accept","multiple"],Fl=e.defineComponent({__name:"Zone",props:{accept:null,multiple:{type:Boolean},sizeLimit:{default:1024*1024*100},countLimit:null,disabled:{type:Boolean}},emits:["files-selected"],setup(t,{expose:n,emit:a}){const o=a,s=t,l=e.ref(null),c=e.ref(null),{buildUploadableFiles:d}=_l({sizeLimit:e.computed(()=>s.sizeLimit),countLimit:e.computed(()=>s.countLimit),accept:e.computed(()=>s.accept),multiple:e.computed(()=>s.multiple),disabled:e.computed(()=>s.disabled)}),r=m=>{const f=d(m);f!=null&&f.length&&o("files-selected",{files:f})},{isOverDropZone:u}=P.useDropZone(l,m=>{m!=null&&m.length&&r(m)}),h=()=>{const m=c.value;if(!m)return;const f=[...m.files||[]];m.value="",f.length&&r(f)},p=()=>{var m;(m=c.value)==null||m.click()};return n({triggerPicker:p}),(m,f)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"fileUploadZone",ref:l,class:"file-upload-zone"},[e.renderSlot(m.$slots,"default",{isDraggingFiles:e.unref(u),openFilePicker:p,activatorOn:{click:p}}),e.createElementVNode("input",{ref_key:"fileInput",ref:c,type:"file",class:"hidden",accept:t.accept,multiple:t.multiple,onClick:f[0]||(f[0]=e.withModifiers(()=>{},["stop"])),onChange:h},null,40,jl)],512))}});exports.BaseError=H;exports.BlobUploadStatus=He;exports.CommonAlert=hl;exports.CommonAnimationInstructional=an;exports.CommonBadge=ue;exports.CommonLoadingBar=de;exports.CommonLoadingIcon=_e;exports.CommonStepsBullet=qt;exports.CommonStepsNumber=zt;exports.CommonTextLink=ze;exports.ComposableInvokedOutOfScopeError=Re;exports.FormButton=F;exports.FormCardButton=cn;exports.FormCheckbox=gn;exports.FormClipboardInput=Vo;exports.FormFileUploadZone=Fl;exports.FormRadio=wn;exports.FormSelectBadges=ko;exports.FormSelectBase=we;exports.FormSelectSourceApps=go;exports.FormSwitch=Co;exports.FormTags=Vl;exports.FormTextArea=zn;exports.FormTextInput=Le;exports.GlobalToastRenderer=ct;exports.GridListToggleValue=G;exports.HorizontalDirection=ae;exports.InfiniteLoading=cl;exports.LayoutDialog=To;exports.LayoutDialogSection=Ao;exports.LayoutDisclosure=jo;exports.LayoutGridListToggle=qo;exports.LayoutMenu=Ko;exports.LayoutPanel=ml;exports.LayoutTable=nl;exports.LayoutTabs=Zo;exports.LogicError=je;exports.ModifierKeys=te;exports.SourceAppBadge=De;exports.TailwindBreakpoints=ee;exports.ThrottleOrDebounce=Te;exports.ToastNotificationType=Y;exports.UninitializedResourceAccessError=Fe;exports.UniqueFileTypeSpecifier=me;exports.UnsupportedEnvironmentError=Ue;exports.UserAvatar=re;exports.UserAvatarEditable=Ml;exports.UserAvatarGroup=Nl;exports.ValidationHelpers=Wn;exports.clientOs=se;exports.getKeyboardShortcutTitle=$o;exports.keyboardClick=ke;exports.onKeyboardShortcut=No;exports.prettyFileSize=ye;exports.useFormCheckboxModel=So;exports.useFormSelectChildInternals=Be;exports.useOnBeforeWindowUnload=Wo;exports.useResponsiveHorizontalDirectionCalculation=Ae;exports.useWindowResizeHandler=Oe;exports.useWrappingContainerHiddenCount=Ce;exports.writableAsyncComputed=vl;
1
+ "use strict";var Ge=Object.defineProperty;var Xe=(t,n,a)=>n in t?Ge(t,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[n]=a;var W=(t,n,a)=>(Xe(t,typeof n!="symbol"?n+"":n,a),a);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),B=require("lodash"),T=require("@heroicons/vue/24/solid"),j=require("@heroicons/vue/24/outline"),D=require("@heroicons/vue/20/solid"),X=require("@speckle/shared"),le=require("vee-validate"),ie=require("nanoid"),P=require("@vueuse/core"),M=require("@headlessui/vue"),Se=require("vue-tippy"),Ze=require("v3-infinite-loading");const Qe=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:n}){const a=n,o=t,s=e.resolveDynamicComponent("NuxtLink"),l=e.resolveDynamicComponent("RouterLink"),c=e.computed(()=>o.linkComponent?o.linkComponent:o.external?"a":B.isObjectLike(s)?s:B.isObjectLike(l)?l:"a"),d=e.computed(()=>{if(!o.to)return o.submit?"submit":"button"}),r=e.computed(()=>o.disabled||o.loading),u=e.computed(()=>o.loading?T.ArrowPathIcon:o.iconLeft),h=e.computed(()=>{const g=[];if(g.push("border-2"),r.value)g.push(o.outlined?"border-foreground-disabled":"bg-foundation-disabled border-transparent");else switch(o.color){case"invert":g.push(o.outlined?"border-foundation dark:border-foreground":"bg-foundation dark:bg-foreground border-transparent");break;case"card":g.push(o.outlined?"border-foundation-2 shadow":"bg-foundation-2 dark:bg-foundation-2 border-foundation shadow");break;case"danger":g.push(o.outlined?"border-danger":"bg-danger border-danger");break;case"secondary":g.push(o.outlined?"border-foundation":"bg-foundation border-foundation-2");break;case"warning":g.push(o.outlined?"border-warning":"bg-warning border-warning");break;case"info":g.push(o.outlined?"border-info":"bg-info border-info");break;case"success":g.push(o.outlined?"border-success":"bg-success border-success");break;case"default":default:g.push(o.outlined?"border-primary hover:border-primary-focus":"bg-primary hover:bg-primary-focus border-transparent");break}return g.join(" ")}),p=e.computed(()=>{const g=[];if(!o.text&&!o.link)if(r.value)g.push((o.outlined,"text-foreground-disabled"));else switch(o.color){case"invert":g.push(o.outlined?"text-foundation dark:text-foreground":"text-primary");break;case"card":g.push((o.outlined,"text-foreground"));break;case"danger":g.push(o.outlined?"text-danger":"text-foundation dark:text-foreground");break;case"warning":g.push(o.outlined?"text-warning":"text-foundation dark:text-foreground");break;case"info":g.push(o.outlined?"text-info":"text-foundation dark:text-foreground");break;case"success":g.push(o.outlined?"text-success":"text-foundation dark:text-foreground");break;case"secondary":g.push((o.outlined,"text-foreground hover:text-primary"));break;case"default":default:g.push(o.outlined?"text-primary hover:text-primary-focus":"text-foundation dark:text-foreground");break}else r.value?g.push("text-foreground-disabled"):o.color==="invert"?g.push("text-foundation hover:text-foundation-2 dark:text-foreground dark:hover:text-foreground"):o.color==="secondary"?g.push("text-foreground-2 hover:text-primary-focus"):o.color==="success"?g.push("text-success"):o.color==="warning"?g.push("text-warning"):o.color==="info"?g.push("text-info"):o.color==="danger"?g.push("text-danger"):g.push("text-primary hover:text-primary-focus");return g.join(" ")}),m=e.computed(()=>{const g=[];return g.push(o.rounded?"rounded-full":"rounded-md"),g.join(" ")}),f=e.computed(()=>{const g=[];if(!r.value)switch(o.color){case"invert":g.push("hover:ring-4 ring-white/50");break;case"danger":g.push("hover:ring-4 ring-danger-lighter dark:ring-danger-darker");break;case"warning":g.push("hover:ring-4 ring-warning-lighter dark:ring-warning-darker");break;case"info":g.push("hover:ring-4 ring-info-lighter dark:ring-info-darker");break;case"success":g.push("hover:ring-4 ring-success-lighter dark:ring-success-darker");break;case"default":default:g.push("hover:ring-2");break}return g.join(" ")}),i=e.computed(()=>{switch(o.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-sm sm:text-base font-medium xxx-tracking-wide"}}),b=e.computed(()=>{switch(o.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"}}),v=e.computed(()=>{const g=[];return o.fullWidth&&g.push("w-full"),r.value&&g.push("cursor-not-allowed"),g.join(" ")}),k=e.computed(()=>{const g=[];return!r.value&&!o.link&&!o.text&&g.push("active:scale-[0.97]"),!r.value&&o.link&&g.push("underline decoration-transparent decoration-2 underline-offset-4 hover:decoration-inherit"),g.join(" ")}),x=e.computed(()=>{const g=o.link||o.text;return["transition inline-flex justify-center text-center items-center outline-none select-none leading-[0.9rem]",v.value,i.value,p.value,g?"":h.value,g?"":m.value,g?"":f.value,o.link?"":b.value,k.value].join(" ")}),E=e.computed(()=>{const g=[""];switch(o.loading&&g.push("animate-spin"),o.size){case"xs":g.push("h-3 w-3");break;case"sm":g.push("h-4 w-4");break;case"lg":g.push("h-6 w-6");break;case"xl":g.push("h-8 w-8");break;case"base":default:g.push("h-5 w-5");break}return g.join(" ")}),C=g=>{if(r.value){g.preventDefault(),g.stopPropagation(),g.stopImmediatePropagation();return}a("click",g)};return(g,S)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.to?c.value:"button"),{href:t.to,to:t.to,type:d.value,external:t.external,class:e.normalizeClass(x.value),disabled:r.value,role:"button",onClick:C},{default:e.withCtx(()=>[u.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.value),{key:0,class:e.normalizeClass(`${E.value} ${t.hideText?"":"mr-2"}`)},null,8,["class"])):e.createCommentVNode("",!0),t.hideText?e.createCommentVNode("",!0):e.renderSlot(g.$slots,"default",{key:1},()=>[e.createTextVNode("Button")],!0),t.iconRight||!t.loading?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.iconRight),{key:2,class:e.normalizeClass(`${E.value} ${t.hideText?"":"ml-2"}`)},null,8,["class"])):e.createCommentVNode("",!0)]),_:3},8,["href","to","type","external","class","disabled"]))}});const ce=(t,n)=>{const a=t.__vccOpts||t;for(const[o,s]of n)a[o]=s;return a},F=ce(Qe,[["__scopeId","data-v-8c1638d3"]]),ze=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:n}){const a=n,o=t,s=l=>{if(o.disabled){l.preventDefault(),l.stopPropagation(),l.stopImmediatePropagation();return}a("click",l)};return(l,c)=>(e.openBlock(),e.createBlock(F,{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:s},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default",{},()=>[e.createTextVNode("Link")])]),_:3},8,["to","external","disabled","size","foreground-link","icon-left","icon-right","hide-text"]))}});var Y=(t=>(t[t.Success=0]="Success",t[t.Warning=1]="Warning",t[t.Danger=2]="Danger",t[t.Info=3]="Info",t))(Y||{});const Je={"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"},Ye={class:"flex w-full flex-col items-center space-y-4 sm:items-end"},et={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"},tt={class:"p-4"},nt={class:"flex items-start"},ot={class:"flex-shrink-0"},lt={class:"ml-2 w-0 flex-1 flex flex-col"},st={key:0,class:"text-foreground font-bold"},at={key:1,class:"label label--light text-foreground-2"},rt={key:2,class:"flex justify-start mt-2"},it=e.createElementVNode("span",{class:"sr-only"},"Close",-1),ct=e.defineComponent({__name:"ToastRenderer",props:{notification:null},emits:["update:notification"],setup(t,{emit:n}){const a=n,o=t,s=e.computed(()=>{var d,r;return!((d=o.notification)!=null&&d.description)&&!((r=o.notification)!=null&&r.cta)}),l=()=>{a("update:notification",null)},c=d=>{var r,u,h;(h=(u=(r=o.notification)==null?void 0:r.cta)==null?void 0:u.onClick)==null||h.call(u,d),l()};return(d,r)=>(e.openBlock(),e.createElementBlock("div",Je,[e.createElementVNode("div",Ye,[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",et,[e.createElementVNode("div",tt,[e.createElementVNode("div",nt,[e.createElementVNode("div",ot,[t.notification.type===e.unref(Y).Success?(e.openBlock(),e.createBlock(e.unref(j.CheckCircleIcon),{key:0,class:"h-6 w-6 text-success","aria-hidden":"true"})):t.notification.type===e.unref(Y).Danger?(e.openBlock(),e.createBlock(e.unref(j.XCircleIcon),{key:1,class:"h-6 w-6 text-danger","aria-hidden":"true"})):t.notification.type===e.unref(Y).Warning?(e.openBlock(),e.createBlock(e.unref(j.ExclamationCircleIcon),{key:2,class:"h-6 w-6 text-warning","aria-hidden":"true"})):t.notification.type===e.unref(Y).Info?(e.openBlock(),e.createBlock(e.unref(j.InformationCircleIcon),{key:3,class:"h-6 w-6 text-info","aria-hidden":"true"})):e.createCommentVNode("",!0)]),e.createElementVNode("div",lt,[t.notification.title?(e.openBlock(),e.createElementBlock("p",st,e.toDisplayString(t.notification.title),1)):e.createCommentVNode("",!0),t.notification.description?(e.openBlock(),e.createElementBlock("p",at,e.toDisplayString(t.notification.description),1)):e.createCommentVNode("",!0),t.notification.cta?(e.openBlock(),e.createElementBlock("div",rt,[e.createVNode(ze,{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":s.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:l},[it,e.createVNode(e.unref(D.XMarkIcon),{class:"h-6 w-6","aria-hidden":"true"})])],2)])])])):e.createCommentVNode("",!0)]),_:1})])]))}}),ut="Enter";function ke(t){return n=>{n.code===ut&&t(n)}}const dt=e.createElementVNode("circle",{cx:"4",cy:"4",r:"3"},null,-1),mt=[dt],ue=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:n}){const a=n,o=t,s=e.computed(()=>o.colorClasses||"bg-blue-100 text-blue-800"),l=e.computed(()=>o.dotIconColorClasses||"text-blue-400"),c=e.computed(()=>{const h=["inline-flex items-center",s.value,o.size==="lg"?"px-3 py-0.5 label":"px-2.5 py-0.5 caption font-medium"];return o.rounded?(h.push("rounded"),h.push(o.size==="lg"?"px-2 py-0.5 label":"px-2.5 py-0.5 caption font-medium")):(h.push("rounded-full"),h.push(o.size==="lg"?"px-2.5 py-0.5 label":"px-2.5 py-0.5 caption font-medium")),h.join(" ")}),d=e.computed(()=>{const h=["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 o.clickableIcon?h.push("cursor-pointer"):h.push("cursor-default"),h.join(" ")}),r=e.computed(()=>["-ml-0.5 mr-1.5 h-2 w-2",l.value].join(" ")),u=h=>{if(!o.clickableIcon){h.stopPropagation(),h.stopImmediatePropagation(),h.preventDefault();return}a("click-icon",h)};return(h,p)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(c.value)},[t.dot?(e.openBlock(),e.createElementBlock("svg",{key:0,class:e.normalizeClass(r.value),fill:"currentColor",viewBox:"0 0 8 8"},mt,2)):e.createCommentVNode("",!0),e.renderSlot(h.$slots,"default",{},()=>[e.createTextVNode("Badge")]),t.iconLeft?(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass(d.value),onClick:p[0]||(p[0]=m=>u(m))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.iconLeft),{class:e.normalizeClass(["h-4 w-4",l.value])},null,8,["class"]))],2)):e.createCommentVNode("",!0)],2))}});let Ne=[];function ft(t){Ne=Ne?t:t.slice()}var ee=(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))(ee||{});function Ie(t){const{props:{modelValue:n,steps:a,orientation:o,goVerticalBelow:s,nonInteractive:l,stepsPadding:c},emit:d}=t,r=e.computed(()=>(o==null?void 0:o.value)==="vertical"?"vertical":"horizontal"),u=e.computed({get:()=>B.clamp((n==null?void 0:n.value)||0,-1,a.value.length),set:v=>d("update:modelValue",B.clamp(v,0,a.value.length))}),h=v=>`${v+1}`,p=v=>v===u.value,m=v=>v<u.value,f=(v,k)=>{var E;if(l!=null&&l.value){k==null||k.preventDefault(),k==null||k.stopPropagation(),k==null||k.stopImmediatePropagation();return}u.value=v;const x=a.value[u.value];(E=x==null?void 0:x.onClick)==null||E.call(x)},i=e.computed(()=>{const v=["flex"];let k,x;return(c==null?void 0:c.value)==="xs"?(k="space-x-2",x="space-y-1"):(c==null?void 0:c.value)==="sm"?(k="space-x-4",x="space-y-1"):(k="space-x-8",x="space-y-4"),v.push("flex"),r.value==="vertical"||s!=null&&s.value?(v.push(`flex-col ${x} justify-center`),(s==null?void 0:s.value)===ee.sm?v.push(`sm:flex-row sm:space-y-0 sm:justify-start sm:${k} sm:items-center`):(s==null?void 0:s.value)===ee.md?v.push(`md:flex-row md:space-y-0 md:justify-start md:${k} md:items-center`):(s==null?void 0:s.value)===ee.lg?v.push(`lg:flex-row lg:space-y-0 lg:justify-start lg:${k} lg:items-center`):(s==null?void 0:s.value)===ee.xl&&v.push(`xl:flex-row xl:space-y-0 xl:justify-start xl:${k} xl:items-center`)):v.push(`flex-row ${k} items-center`),v.join(" ")}),b=e.computed(()=>{const v=["flex items-center"];return l!=null&&l.value||v.push("cursor-pointer"),v.join(" ")});return{value:u,isCurrentStep:p,isFinishedStep:m,switchStep:f,getStepDisplayValue:h,listClasses:i,linkClasses:b,orientation:r}}ft(["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 pt=["aria-label"],ht=["href","onClick"],vt={class:"flex space-x-3 items-center text-primary-focus normal font-medium leading-5"},gt={class:"shrink-0 h-8 w-8 rounded-full bg-primary-focus text-foreground-on-primary inline-flex items-center justify-center"},yt={class:"flex flex-col"},kt={key:0,class:"label label--light text-foreground"},bt=["href","onClick"],xt={class:"flex space-x-3 items-center text-primary-focus normal font-medium leading-5"},Ct={class:"shrink-0 h-8 w-8 rounded-full border-2 border-primary-focus inline-flex items-center justify-center"},Bt={class:"flex flex-col"},wt={key:0,class:"label label--light text-foreground"},Vt=["href","onClick"],Et={class:"flex space-x-3 items-center text-foreground-disabled normal font-medium leading-5"},$t={class:"shrink-0 h-8 w-8 rounded-full border-2 border-foreground-disabled inline-flex items-center justify-center"},Nt={class:"flex flex-col"},St={key:0,class:"label label--light"},zt=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:n}){const a=n,o=t,{isCurrentStep:s,isFinishedStep:l,switchStep:c,getStepDisplayValue:d,listClasses:r,linkClasses:u}=Ie({props:e.toRefs(o),emit:a});return(h,p)=>(e.openBlock(),e.createElementBlock("nav",{class:"flex justify-center","aria-label":t.ariaLabel||"Progress steps"},[e.createElementVNode("ol",{class:e.normalizeClass(e.unref(r))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.steps,(m,f)=>(e.openBlock(),e.createElementBlock("li",{key:m.name},[e.unref(l)(f)?(e.openBlock(),e.createElementBlock("a",{key:0,href:m.href,class:e.normalizeClass(e.unref(u)),onClick:i=>e.unref(c)(f,i)},[e.createElementVNode("div",vt,[e.createElementVNode("div",gt,[e.createVNode(e.unref(D.CheckIcon),{class:"w-5 h-5"})]),e.createElementVNode("div",yt,[e.createElementVNode("div",null,e.toDisplayString(m.name),1),m.description?(e.openBlock(),e.createElementBlock("div",kt,e.toDisplayString(m.description),1)):e.createCommentVNode("",!0)])])],10,ht)):e.unref(s)(f)?(e.openBlock(),e.createElementBlock("a",{key:1,href:m.href,class:e.normalizeClass(e.unref(u)),"aria-current":"step",onClick:i=>e.unref(c)(f,i)},[e.createElementVNode("div",xt,[e.createElementVNode("div",Ct,e.toDisplayString(e.unref(d)(f)),1),e.createElementVNode("div",Bt,[e.createElementVNode("div",null,e.toDisplayString(m.name),1),m.description?(e.openBlock(),e.createElementBlock("div",wt,e.toDisplayString(m.description),1)):e.createCommentVNode("",!0)])])],10,bt)):(e.openBlock(),e.createElementBlock("a",{key:2,href:m.href,class:e.normalizeClass(e.unref(u)),onClick:i=>e.unref(c)(f,i)},[e.createElementVNode("div",Et,[e.createElementVNode("div",$t,e.toDisplayString(e.unref(d)(f)),1),e.createElementVNode("div",Nt,[e.createElementVNode("div",null,e.toDisplayString(m.name),1),m.description?(e.openBlock(),e.createElementBlock("div",St,e.toDisplayString(m.description),1)):e.createCommentVNode("",!0)])])],10,Vt))]))),128))],2)],8,pt))}}),It=["aria-label"],Lt=["href","onClick"],Mt={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center"},Dt={key:0,class:"h-3 w-3 rounded-full bg-foreground-2"},Tt=["href","onClick"],Ot={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center","aria-hidden":"true"},At={key:0,class:"h-3 w-3 rounded-full bg-foreground"},Pt=e.createElementVNode("span",{class:"absolute h-4 w-4 rounded-full bg-outline-2"},null,-1),_t=e.createElementVNode("span",{class:"relative block h-2 w-2 rounded-full bg-primary-focus"},null,-1),jt=["href","onClick"],Ft={class:"relative flex h-5 w-5 flex-shrink-0 items-center justify-center","aria-hidden":"true"},Rt={key:0,class:"h-3 w-3 rounded-full bg-foreground-2"},Ut={key:1,class:"h-4 w-4 rounded-full bg-foreground-disabled"},qt=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:n}){const a=n,o=t,{isCurrentStep:s,isFinishedStep:l,switchStep:c,listClasses:d,linkClasses:r}=Ie({props:e.toRefs(o),emit:a}),u=e.computed(()=>{const p=["h6 font-medium leading-7"];let m;return o.stepsPadding==="xs"?m="ml-1":o.stepsPadding==="sm"?m="ml-2":m="ml-3",p.push(m),o.basic&&p.push("sr-only"),p.join(" ")}),h=e.computed(()=>{const p=[];return o.basic&&p.push("basic"),p.join(" ")});return(p,m)=>(e.openBlock(),e.createElementBlock("nav",{class:"flex justify-center","aria-label":t.ariaLabel||"Progress steps"},[e.createElementVNode("ol",{class:e.normalizeClass([e.unref(d),h.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.steps,(f,i)=>(e.openBlock(),e.createElementBlock("li",{key:f.name},[e.unref(l)(i)?(e.openBlock(),e.createElementBlock("a",{key:0,href:f.href,class:e.normalizeClass(e.unref(r)),onClick:b=>e.unref(c)(i,b)},[e.createElementVNode("span",Mt,[t.basic?(e.openBlock(),e.createElementBlock("span",Dt)):(e.openBlock(),e.createBlock(e.unref(D.CheckCircleIcon),{key:1,class:"h-full w-full text-primary","aria-hidden":"true"}))]),e.createElementVNode("span",{class:e.normalizeClass(["text-foreground",u.value])},e.toDisplayString(f.name),3)],10,Lt)):e.unref(s)(i)?(e.openBlock(),e.createElementBlock("a",{key:1,href:f.href,class:e.normalizeClass(e.unref(r)),"aria-current":"step",onClick:b=>e.unref(c)(i,b)},[e.createElementVNode("span",Ot,[t.basic?(e.openBlock(),e.createElementBlock("span",At)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[Pt,_t],64))]),e.createElementVNode("span",{class:e.normalizeClass(["text-primary-focus",u.value])},e.toDisplayString(f.name),3)],10,Tt)):(e.openBlock(),e.createElementBlock("a",{key:2,href:f.href,class:e.normalizeClass(e.unref(r)),onClick:b=>e.unref(c)(i,b)},[e.createElementVNode("div",Ft,[t.basic?(e.openBlock(),e.createElementBlock("span",Rt)):(e.openBlock(),e.createElementBlock("div",Ut))]),e.createElementVNode("p",{class:e.normalizeClass(["text-foreground-disabled",u.value])},e.toDisplayString(f.name),3)],10,jt))]))),128))],2)],8,It))}}),Wt={},Ht={xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-pointer",width:"44",height:"44",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"rgba(255,255,255,0.8)","stroke-linecap":"round","stroke-linejoin":"round"},Kt=e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),Gt=e.createElementVNode("path",{d:"M7.904 17.563a1.2 1.2 0 0 0 2.228 .308l2.09 -3.093l4.907 4.907a1.067 1.067 0 0 0 1.509 0l1.047 -1.047a1.067 1.067 0 0 0 0 -1.509l-4.907 -4.907l3.113 -2.09a1.2 1.2 0 0 0 -.309 -2.228l-13.582 -3.904l3.904 13.563z"},null,-1),Xt=[Kt,Gt];function Zt(t,n){return e.openBlock(),e.createElementBlock("svg",Ht,Xt)}const Qt=ce(Wt,[["render",Zt]]),Jt={},Yt={viewBox:"0 0 18 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},en=e.createElementVNode("path",{d:"M9 1.25V3.5M14.834 3.666L13.243 5.257M17.25 9.5H15M4.757 13.743L3.167 15.333M3 9.5H0.75M4.757 5.257L3.167 3.667",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),tn=[en];function nn(t,n){return e.openBlock(),e.createElementBlock("svg",Yt,tn)}const on=ce(Jt,[["render",nn]]),ln={class:"relative aspect-square w-full h-full max-w-[250px] mx-auto mb-8 border-t border-r border-outline-3 select-none"},sn={class:"w-full h-full overflow-hidden"},an=e.defineComponent({__name:"Instructional",props:{actions:Array,initialPosition:{type:Object},slotsConfig:Array},setup(t){const n=t,a=e.ref(!0),o=e.ref({...n.initialPosition}),s=e.ref(!1),l=e.ref(500),c=e.ref(!0),d=e.ref(n.slotsConfig||[]);async function r(p){await X.wait(p.duration)}function u(p){const m=d.value.find(f=>f.name===p.slot);m&&(m.visible=!m.visible)}function h(p){switch(p.type){case"animation":o.value={top:p.top,left:p.left},l.value=p.duration;break;case"click":s.value=!0,setTimeout(()=>s.value=!1,500);break;case"delay":return r(p);case"slot":u(p);break}}return e.onMounted(()=>{(async()=>{for(;a.value;){await r({type:"delay",duration:800}),c.value=!0;for(const m of n.actions||[])await h(m);c.value=!1,o.value={...n.initialPosition},await r({type:"delay",duration:200})}})()}),e.onBeforeUnmount(()=>{a.value=!1}),(p,m)=>(e.openBlock(),e.createElementBlock("div",ln,[e.createElementVNode("div",{class:"absolute z-50 text-foreground dark:text-foundation",style:e.normalizeStyle({transitionProperty:"all",top:o.value.top+"%",left:o.value.left+"%",transitionDuration:l.value+"ms"})},[e.createVNode(on,{class:e.normalizeClass(["absolute -top-5 -left-4 h-12 w-12 -rotate-12 text-foreground",[{hidden:!s.value}]])},null,8,["class"]),e.createVNode(Qt,{class:"absolute inset-0 h-11 w-11"})],4),e.createElementVNode("div",sn,[e.renderSlot(p.$slots,"background"),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,f=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:f.name},[f.visible?e.renderSlot(p.$slots,f.name,{key:0}):e.createCommentVNode("",!0)],64))),128))])]))}}),rn=["disabled"],cn=e.defineComponent({__name:"CardButton",props:{disabled:{type:Boolean},modelValue:{type:Boolean}},emits:["update:modelValue","click"],setup(t,{emit:n}){const a=n,o=t,s=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 o.disabled?c.push("bg-foundation-disabled text-foreground-2 cursor-not-allowed"):(c.push(o.modelValue?"bg-primary-focus text-foreground-on-primary":"bg-foundation text-foreground"),c.push("ring-outline-2 hover:ring-4")),c.join(" ")}),l=c=>{if(o.disabled){c.preventDefault(),c.stopPropagation(),c.stopImmediatePropagation();return}a("update:modelValue",!o.modelValue),a("click",c)};return(c,d)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(s.value),disabled:t.disabled,onClick:l},[e.renderSlot(c.$slots,"default",{},()=>[e.createTextVNode("Text")])],10,rn))}}),un={class:"relative flex items-start"},dn={class:"flex h-6 items-center"},mn=["id","checked","aria-describedby","name","disabled","value"],fn={class:"ml-2 text-sm",style:{"padding-top":"2px"}},pn=["for"],hn={key:0,class:"text-danger ml-1"},vn=["id"],gn=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 n=t,a=v=>`${v}-${ie.nanoid()}`,o=e.computed(()=>n.value||n.name),{checked:s,errorMessage:l,handleChange:c,value:d}=le.useField(n.name,n.rules,{validateOnMount:n.validateOnMount,type:"checkbox",checkedValue:o,initialValue:n.modelValue||void 0}),r=e.computed(()=>n.label||n.name),u=e.computed(()=>l.value?"border-danger-lighter":"border-foreground-4 "),h=e.computed(()=>n.description||l.value),p=e.computed(()=>`${n.name}-description`),m=e.computed(()=>{const v=[];return n.inlineDescription?v.push("inline ml-2"):v.push("block"),l.value?v.push("text-danger"):v.push("text-foreground-2"),v.join(" ")}),f=e.ref(a("checkbox")),i=e.computed(()=>n.id||f.value),b=v=>{n.disabled||c(v)};return e.onMounted(()=>{const v=n.modelValue,k=d.value,x=Array.isArray(v)?v.includes(n.value):v===n.value,E=Array.isArray(k)?k.includes(n.value):k===n.value;x!==E&&c(v)}),(v,k)=>(e.openBlock(),e.createElementBlock("div",un,[e.createElementVNode("div",dn,[e.createElementVNode("input",e.mergeProps({id:i.value,checked:e.unref(s),"aria-describedby":p.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]},v.$attrs,{onChange:b}),null,16,mn)]),e.createElementVNode("div",fn,[e.createElementVNode("label",{for:i.value,class:e.normalizeClass(["font-medium text-foreground",{"sr-only":t.hideLabel}])},[e.createElementVNode("span",null,e.toDisplayString(r.value),1),t.showRequired?(e.openBlock(),e.createElementBlock("span",hn,"*")):e.createCommentVNode("",!0)],10,pn),h.value?(e.openBlock(),e.createElementBlock("p",{key:0,id:p.value,class:e.normalizeClass(m.value)},e.toDisplayString(h.value),11,vn)):e.createCommentVNode("",!0)])]))}}),yn={class:"flex h-6 items-center"},kn=["id","checked","aria-describedby","name","disabled","value"],bn=["for"],xn={key:0,class:"text-sm"},Cn={class:"flex flex-col"},Bn=["id"],wn={key:1,class:"text-danger ml-1"},Vn=["id"],En=e.defineComponent({inheritAttrs:!1,__name:"Radio",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},icon:{type:Object,default:void 0},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 n=t,a=v=>`${v}-${ie.nanoid()}`,o=e.computed(()=>n.value||n.name),{checked:s,errorMessage:l,handleChange:c,value:d}=le.useField(n.name,n.rules,{validateOnMount:n.validateOnMount,type:"radio",checkedValue:o,initialValue:n.modelValue||void 0}),r=e.computed(()=>n.label||n.name),u=e.computed(()=>l.value?"border-danger-lighter":"border-foreground-4 "),h=e.computed(()=>n.description||l.value),p=e.computed(()=>`${n.name}-description`),m=e.computed(()=>{const v=["text-xs"];return l.value?v.push("text-danger"):v.push("text-foreground-2"),v.join(" ")}),f=e.ref(a("radio")),i=e.computed(()=>n.id||f.value),b=v=>{n.disabled||c(v)};return e.onMounted(()=>{const v=n.modelValue,k=d.value,x=Array.isArray(v)?v.includes(n.value):v===n.value,E=Array.isArray(k)?k.includes(n.value):k===n.value;x!==E&&c(v)}),(v,k)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative flex gap-2 mb-2 last:mb-0",t.description&&t.inlineDescription?"items-start":"items-center"])},[e.createElementVNode("div",yn,[e.createElementVNode("input",e.mergeProps({id:i.value,checked:e.unref(s),"aria-describedby":p.value,name:t.name,disabled:t.disabled,value:o.value,type:"radio",class:["h-4 w-4 rounded-full text-primary focus:ring-primary bg-foundation disabled:cursor-not-allowed disabled:bg-disabled disabled:text-disabled-2",u.value]},v.$attrs,{onChange:b}),null,16,kn)]),e.createElementVNode("div",{class:e.normalizeClass(["text-xs sm:text-sm",t.inlineDescription?"flex gap-2 items-center":""])},[e.createElementVNode("label",{for:i.value,class:e.normalizeClass(["text-foreground flex gap-2 items-center",{"sr-only":t.hideLabel}])},[t.icon?(e.openBlock(),e.createElementBlock("div",xn,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon),{class:"h-8 sm:h-10 w-8 sm:w-10"}))])):e.createCommentVNode("",!0),e.createElementVNode("div",Cn,[e.createElementVNode("span",null,e.toDisplayString(r.value),1),h.value&&!t.inlineDescription?(e.openBlock(),e.createElementBlock("p",{key:0,id:p.value,class:e.normalizeClass(m.value)},e.toDisplayString(h.value),11,Bn)):e.createCommentVNode("",!0)]),t.showRequired?(e.openBlock(),e.createElementBlock("span",wn,"*")):e.createCommentVNode("",!0)],10,bn),h.value&&t.inlineDescription?(e.openBlock(),e.createElementBlock("p",{key:0,id:p.value,class:e.normalizeClass(m.value)},e.toDisplayString(h.value),11,Vn)):e.createCommentVNode("",!0)],2)],2))}});function be(t){const{props:n,inputEl:a,emit:o,options:s}=t,{value:l,errorMessage:c}=le.useField(n.name,n.rules,{validateOnMount:e.unref(n.validateOnMount),validateOnValueUpdate:e.unref(n.validateOnValueUpdate),initialValue:e.unref(n.modelValue)||void 0}),d=e.computed(()=>{const C=["block label text-foreground-2 mb-2"];return e.unref(n.showLabel)||C.push("sr-only"),C.join(" ")}),r=e.computed(()=>["focus:outline-none disabled:cursor-not-allowed disabled:bg-foundation-disabled","disabled:text-disabled-muted placeholder:text-foreground-2","rounded"].join(" ")),u=e.computed(()=>{const C=["block w-full text-foreground transition-all",r.value];c.value?C.push("focus:border-danger focus:ring-danger border-2 border-danger text-danger-darker"):C.push("border-0 focus:ring-2 focus:ring-outline-2");const g=e.unref(n.color);return g==="foundation"?C.push("bg-foundation shadow-sm hover:shadow"):g==="transparent"?C.push("bg-transparent"):C.push("bg-foundation-page"),C.join(" ")}),h=e.ref(ie.nanoid()),p=e.computed(()=>e.unref(n.label)||e.unref(n.name)),m=e.computed(()=>{const C=c.value;return!C||!e.unref(n.useLabelInErrors)?C:C.replace("Value",p.value)}),f=e.computed(()=>m.value&&e.unref(n.hideErrorMessage)),i=e.computed(()=>m.value||e.unref(n.help)),b=e.computed(()=>!!i.value),v=e.computed(()=>b.value?`${e.unref(n.name)}-${h.value}`:void 0),k=e.computed(()=>{const C=["mt-2 text-xs sm:text-sm"];return C.push(c.value?"text-danger":"text-foreground-2"),C.join(" ")}),x=()=>{var C;(C=a.value)==null||C.focus()},E=()=>{var C;l.value=B.isArray(l.value)?[]:"",(C=s==null?void 0:s.customClear)==null||C.call(s),o("change",{value:l.value}),o("clear")};return e.onMounted(()=>{e.unref(n.autoFocus)&&x()}),{coreInputClasses:r,coreClasses:u,title:p,value:l,helpTipId:v,helpTipClasses:k,helpTip:i,hideHelpTip:f,errorMessage:m,clear:E,focus:x,labelClasses:d}}const $n=["for"],Nn={class:"relative"},Sn=["id","name","placeholder","disabled","aria-invalid","aria-describedby"],zn=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),In=["id"],Ln=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"},textareaClasses:null},emits:["update:modelValue","change","input","clear"],setup(t,{expose:n,emit:a}){const o=a,s=t,l=e.ref(null),{coreClasses:c,title:d,value:r,helpTipId:u,helpTipClasses:h,helpTip:p,errorMessage:m,labelClasses:f,clear:i,focus:b}=be({props:e.toRefs(s),emit:o,inputEl:l}),v=e.computed(()=>{const k=["pl-2"];return s.showClear&&m.value?k.push("pr-12"):(s.showClear||m.value)&&k.push("pr-8"),k.join(" ")});return n({focus:b}),(k,x)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([t.fullWidth?"w-full":""])},[e.createElementVNode("label",{for:t.name,class:e.normalizeClass(e.unref(f))},[e.createElementVNode("span",null,e.toDisplayString(e.unref(d)),1)],10,$n),e.createElementVNode("div",Nn,[e.withDirectives(e.createElementVNode("textarea",e.mergeProps({id:t.name,ref_key:"inputElement",ref:l,"onUpdate:modelValue":x[0]||(x[0]=E=>e.isRef(r)?r.value=E:null),name:t.name,class:[e.unref(c),v.value,t.textareaClasses||"","min-h-[3rem] simple-scrollbar text-sm"],placeholder:t.placeholder,disabled:t.disabled,"aria-invalid":e.unref(m)?"true":"false","aria-describedby":e.unref(u)},k.$attrs,{onChange:x[1]||(x[1]=E=>k.$emit("change",{event:E,value:e.unref(r)})),onInput:x[2]||(x[2]=E=>k.$emit("input",{event:E,value:e.unref(r)}))}),null,16,Sn),[[e.vModelText,e.unref(r)]]),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:x[3]||(x[3]=(...E)=>e.unref(i)&&e.unref(i)(...E)),onKeydown:x[4]||(x[4]=(...E)=>e.unref(i)&&e.unref(i)(...E))},[zn,e.createVNode(e.unref(D.XMarkIcon),{class:"h-5 w-5 text-foreground","aria-hidden":"true"})],32)):e.createCommentVNode("",!0),e.unref(m)?(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(D.ExclamationCircleIcon),{class:"h-4 w-4 text-danger","aria-hidden":"true"})],2)):e.createCommentVNode("",!0),t.showRequired&&!e.unref(m)?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["pointer-events-none absolute inset-y-0 mt-0.5 text-4xl right-0 flex items-start text-danger opacity-50",[t.showClear?"pr-8":"pr-2"]])}," * ",2)):e.createCommentVNode("",!0)]),e.unref(u)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(u),class:e.normalizeClass(e.unref(h))},e.toDisplayString(e.unref(p)),11,In)):e.createCommentVNode("",!0)],2))}}),Mn=["for"],Dn={class:"relative"},Tn={key:0,class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"},On=["id","type","name","placeholder","disabled","aria-invalid","aria-describedby"],An=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),Pn=["id"],Le=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","focus","blur"],setup(t,{expose:n,emit:a}){const o=t,s=a,l=e.useSlots(),c=e.ref(null),{coreClasses:d,title:r,value:u,helpTipId:h,helpTipClasses:p,helpTip:m,hideHelpTip:f,errorMessage:i,clear:b,focus:v,labelClasses:k}=be({props:e.toRefs(o),emit:s,inputEl:c}),x=e.computed(()=>{const S=["h-5 w-5"];return i.value?S.push("text-danger"):S.push("text-foreground-2"),S.join(" ")}),E=e.computed(()=>["email","password"].includes(o.type)||o.customIcon),C=e.computed(()=>{const S=[];return E.value?S.push("pl-8"):S.push("pl-2"),l["input-right"]||(i.value||o.showClear)&&(i.value&&o.showClear?S.push("pr-12"):S.push("pr-8")),S.join(" ")}),g=e.computed(()=>{switch(o.size){case"sm":return"h-6 text-sm";case"lg":return"h-10";case"xl":return"h-14";case"base":default:return"h-8 text-sm"}});return n({focus:v}),(S,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(k))},[e.createElementVNode("span",null,e.toDisplayString(e.unref(r)),1)],10,Mn),e.createElementVNode("div",Dn,[E.value?(e.openBlock(),e.createElementBlock("div",Tn,[t.customIcon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.customIcon),{key:0,class:e.normalizeClass(x.value),"aria-hidden":"true"},null,8,["class"])):t.type==="email"?(e.openBlock(),e.createBlock(e.unref(D.EnvelopeIcon),{key:1,class:e.normalizeClass(x.value),"aria-hidden":"true"},null,8,["class"])):t.type==="password"?(e.openBlock(),e.createBlock(e.unref(D.KeyIcon),{key:2,class:e.normalizeClass(x.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(u)?u.value=N:null),type:t.type,name:t.name,class:[e.unref(d),C.value,g.value,t.inputClasses||""],placeholder:t.placeholder,disabled:t.disabled,"aria-invalid":e.unref(i)?"true":"false","aria-describedby":e.unref(h),role:"textbox"},S.$attrs,{onChange:z[1]||(z[1]=N=>S.$emit("change",{event:N,value:e.unref(u)})),onInput:z[2]||(z[2]=N=>S.$emit("input",{event:N,value:e.unref(u)})),onFocus:z[3]||(z[3]=N=>S.$emit("focus")),onBlur:z[4]||(z[4]=N=>S.$emit("blur"))}),null,16,On),[[e.vModelDynamic,e.unref(u)]]),e.renderSlot(S.$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[5]||(z[5]=(...N)=>e.unref(b)&&e.unref(b)(...N)),onKeydown:z[6]||(z[6]=(...N)=>e.unref(b)&&e.unref(b)(...N))},[An,e.createVNode(e.unref(D.XMarkIcon),{class:"h-5 w-5 text-foreground","aria-hidden":"true"})],32)):e.createCommentVNode("",!0),e.unref(i)?(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(D.ExclamationCircleIcon),{class:"h-4 w-4 text-danger","aria-hidden":"true"})],2)):e.createCommentVNode("",!0),t.showRequired&&!e.unref(i)?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["pointer-events-none absolute inset-y-0 mt-3 text-4xl right-0 flex items-center text-danger opacity-50",[t.showClear?"pr-8":"pr-2"]])}," * ",2)):e.createCommentVNode("",!0)])]),e.unref(h)&&!e.unref(f)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(h),class:e.normalizeClass(e.unref(p))},e.toDisplayString(e.unref(m)),11,Pn)):e.createCommentVNode("",!0)],2))}}),Me=/^https?:\/\//,xe=/^[\w-_.+]+@[\w-_.+]+$/,_n=t=>(t||"").match(xe)?!0:"Value should be a valid e-mail address",jn=t=>(t||"").split(",").map(o=>o.trim()).every(o=>o.match(xe))||"Value should be one or multiple comma-delimited e-mail addresses",Fn=t=>(B.isString(t)&&(t=t.trim()),t?!0:"Value is required"),Rn=(t,n)=>(a,o)=>a===o.form[t]?!0:`Value must be the same as in field '${n||t}'`,Un=t=>n=>{const{minLength:a,maxLength:o}=t;return n=X.isNullOrUndefined(n)?"":n,B.isString(n)?!B.isUndefined(a)&&n.length<a?`Value needs to be at least ${a} characters long`:!B.isUndefined(o)&&n.length>o?`Value needs to be no more than ${o} characters long`:!0:"Value should be a text string"},qn=t=>n=>{const{match:a,message:o}=t;return B.isString(n)?a?B.isString(a)?n.includes(a)?!0:o:a.test(n)?!0:o:!0:"Value should be a text string"},Wn=t=>Me.test(t)?!0:"Value is not a valid URL",Hn=t=>Array.isArray(t)&&t.length>0?!0:"Value should have at least a single item selected",Kn=Object.freeze(Object.defineProperty({__proto__:null,VALID_EMAIL:xe,VALID_HTTP_URL:Me,isEmail:_n,isItemSelected:Hn,isOneOrMultipleEmails:jn,isRequired:Fn,isSameAs:Rn,isStringOfLength:Un,isUrl:Wn,stringContains:qn},Symbol.toStringTag,{value:"Module"}));function Ce(t){const{skipCalculation:n,elementToWatchForChanges:a,itemContainer:o,trackResize:s=!1,trackMutations:l=!0}=t||{},c=e.ref(0),d=()=>{const r=o.value;if(n!=null&&n.value||!r)return;const u=r.children;let h=0,p=0,m;for(const f of u){const i=f.offsetTop;B.isUndefined(m)?(m=i,h+=1):i===m&&(h+=1),p+=1}c.value=p-h};return s&&P.useResizeObserver(a,d),l&&P.useMutationObserver(a,d,{childList:!0,subtree:!0}),{hiddenItemCount:c}}function Be(t){const{props:n,emit:a,dynamicVisibility:o}=t;let s;if(o){const{elementToWatchForChanges:u,itemContainer:h}=o;s=Ce({skipCalculation:e.computed(()=>{var m;return!((m=n.multiple)!=null&&m.value)}),elementToWatchForChanges:u,itemContainer:h}).hiddenItemCount}else s=e.ref(0);const l=e.computed({get:()=>{var h,p;const u=(h=n.modelValue)==null?void 0:h.value;return(p=n.multiple)!=null&&p.value?B.isArray(u)?u:[]:B.isArray(u)?void 0:u},set:u=>{var h,p,m;if((h=n.multiple)!=null&&h.value&&!B.isArray(u)){console.warn("Attempting to set non-array value in selector w/ multiple=true");return}else if(!((p=n.multiple)!=null&&p.value)&&B.isArray(u)){console.warn("Attempting to set array value in selector w/ multiple=false");return}a("update:modelValue",(m=n.multiple)!=null&&m.value?u||[]:u)}}),c=u=>B.isArray(u);return{selectedValue:l,hiddenSelectedItemCount:s,isArrayValue:c,isMultiItemArrayValue:u=>B.isArray(u)&&u.length>1,firstItem:u=>c(u)?u[0]:u}}const Gn=t=>(e.pushScopeId("data-v-89e77cae"),t=t(),e.popScopeId(),t),Xn=Gn(()=>e.createElementVNode("div",{class:"swoosher relative top-0 bg-blue-500/50"},null,-1)),Zn=[Xn],Qn=e.defineComponent({__name:"Bar",props:{loading:{type:Boolean}},setup(t){return(n,a)=>(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"])},Zn,2))}});const de=ce(Qn,[["__scopeId","data-v-89e77cae"]]),Jn={class:"flex items-center justify-between w-full"},Yn={class:"block truncate grow text-left text-xs sm:text-sm"},eo={class:"pointer-events-none shrink-0 ml-1 flex items-center space-x-2"},to={key:1,class:"text-4xl text-danger opacity-50 h-4 w-4 leading-6"},no=["disabled"],oo={key:0,class:"flex flex-col mx-1 mb-1"},lo=e.createElementVNode("span",{class:"sr-only label text-foreground"},"Search",-1),so={class:"relative"},ao={class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"},ro=["placeholder"],io={key:0,class:"px-1"},co={key:1},uo=e.createElementVNode("div",{class:"text-foreground-2 text-center"},"Nothing found 🤷‍♂️",-1),mo={class:e.normalizeClass(["block truncate"])},fo=["id"],we=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},mountMenuOnBody:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{expose:n,emit:a}){const o=y=>B.isObjectLike(y),s=a,l=t,{value:c,errorMessage:d}=le.useField(l.name,l.rules,{validateOnMount:l.validateOnMount,validateOnValueUpdate:l.validateOnValueUpdate,initialValue:l.modelValue}),r=P.useMounted(),u=e.ref(null),h=e.ref(null),p=e.ref(null),m=e.ref(""),f=e.ref([]),i=e.ref(!1),b=e.ref(1),v=e.ref(ie.nanoid()),k=P.useElementBounding(e.computed(()=>{var y;return(y=p.value)==null?void 0:y.el}),{windowResize:!0,windowScroll:!0,immediate:!0});P.useIntersectionObserver(e.computed(()=>{var y;return(y=h.value)==null?void 0:y.el}),([{isIntersecting:y}])=>{y&&l.mountMenuOnBody&&k.update()});const x=e.computed(()=>e.unref(l.label)||e.unref(l.name)),E=e.computed(()=>{const y=d.value;return!y||!e.unref(l.useLabelInErrors)?y:y.replace("Value",x.value)}),C=e.computed(()=>E.value||e.unref(l.help)),g=e.computed(()=>!!C.value),S=e.computed(()=>g.value?`${e.unref(l.name)}-${v.value}`:void 0),z=e.computed(()=>d.value?"text-danger":"text-foreground-2"),N=e.computed(()=>l.buttonStyle!=="simple"&&l.clearable&&!l.disabled),fe=e.computed(()=>{const y=["relative flex group"];return d.value?(y.push("hover:shadow rounded-md"),y.push("text-danger-darker focus:border-danger focus:ring-danger"),l.buttonStyle!=="simple"&&y.push("outline outline-2 outline-danger")):l.buttonStyle!=="simple"&&(y.push("hover:shadow rounded-md"),y.push("outline outline-2 outline-primary-muted")),l.fixedHeight&&y.push("h-8"),y.join(" ")}),K=e.computed(()=>{const y=[];return l.buttonStyle!=="simple"&&y.push(Z.value?"bg-foundation-disabled text-foreground-disabled":""),Z.value&&y.push("cursor-not-allowed"),y.join(" ")}),pe=e.computed(()=>{const y=["relative z-[1]","flex items-center justify-center text-center shrink-0","rounded-r-md overflow-hidden transition-all","text-foreground",J.value?`w-6 ${K.value}`:"w-0"];return Z.value||(y.push("hover:bg-primary hover:text-foreground-on-primary dark:text-foreground-on-primary"),l.buttonStyle==="tinted"?y.push("bg-outline-3"):y.push("bg-primary-muted")),y.join(" ")}),he=e.computed(()=>{const y=["relative z-[2]","normal rounded-md cursor-pointer transition truncate flex-1","flex items-center",K.value];return l.buttonStyle!=="simple"&&(y.push("py-2 px-3"),Z.value||(l.buttonStyle==="tinted"?y.push("bg-foundation-page text-foreground"):y.push("bg-foundation text-foreground"))),N.value&&J.value&&y.push("rounded-r-none"),y.join(" ")}),Q=e.computed(()=>!!(l.search&&(l.filterPredicate||l.getSearchResults))),R=e.computed(()=>Q.value&&l.getSearchResults),Z=e.computed(()=>l.disabled||!l.items.length&&!R.value),O=e.computed({get:()=>{const y=c.value;return l.multiple?B.isArray(y)?y:[]:B.isArray(y)?void 0:y},set:y=>{if(l.multiple&&!B.isArray(y)){console.warn("Attempting to set non-array value in selector w/ multiple=true");return}else if(!l.multiple&&B.isArray(y)){console.warn("Attempting to set array value in selector w/ multiple=false");return}let L;if(l.multiple)L=y||[];else{const I=c.value;L=l.allowUnset&&I&&y&&V(I)===V(y)?void 0:y}l.fullyControlValue?s("update:modelValue",L):c.value=L,b.value+=1}}),J=e.computed(()=>l.multiple&&B.isArray(O.value)?O.value.length!==0:!!O.value),ve=()=>{l.multiple?O.value=[]:O.value=void 0},ge=e.computed(()=>{const y=m.value;return!Q.value||!(y!=null&&y.length)?f.value:l.filterPredicate?f.value.filter(L=>{var I;return((I=l.filterPredicate)==null?void 0:I.call(l,L,y))||!1}):f.value}),ne=e.computed(()=>{const y=["rounded-md bg-foundation-2 py-1 label label--light outline outline-2 outline-primary-muted focus:outline-none shadow mt-1 "];return l.mountMenuOnBody?y.push("fixed z-50"):y.push("absolute top-[100%] w-full z-10"),y.join(" ")}),w=e.computed(()=>{const y={};if(l.mountMenuOnBody){const L=k.top.value,I=k.left.value,_=k.width.value,q=k.height.value;y.top=`${L+q}px`,y.left=`${I}px`,y.width=`${_}px`}return y}),$=y=>JSON.stringify(y),V=y=>o(y)?y[l.by||"id"]:y,A=async()=>{if(!(!R.value||!l.getSearchResults)){i.value=!0;try{f.value=await l.getSearchResults(m.value)}finally{i.value=!1}}},U=B.debounce(A,1e3),oe=y=>{const{active:L,disabled:I}=y||{},{hideCheckmarks:_}=l,q=["relative transition cursor-pointer select-none py-1.5 pl-3",_?"":"pr-9"];return I?q.push("opacity-50 cursor-not-allowed"):q.push(L?"text-primary":"text-foreground"),q.join(" ")};return e.watch(()=>l.items,y=>{f.value=y.slice()},{immediate:!0}),e.watch(m,()=>{R.value&&U()}),e.onMounted(()=>{R.value&&!l.items.length&&A()}),n({triggerSearch:A}),(y,L)=>(e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(),e.createBlock(e.unref(M.Listbox),{key:b.value,modelValue:O.value,"onUpdate:modelValue":L[4]||(L[4]=I=>O.value=I),name:t.name,multiple:t.multiple,by:t.by,disabled:Z.value,as:"div"},{default:e.withCtx(()=>[e.createVNode(e.unref(M.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(fe.value)},[e.createVNode(e.unref(M.ListboxButton),{ref_key:"listboxButton",ref:p,class:e.normalizeClass(he.value)},{default:e.withCtx(({open:I})=>[e.createElementVNode("div",Jn,[e.createElementVNode("div",Yn,[!O.value||e.unref(B.isArray)(O.value)&&!O.value.length?e.renderSlot(y.$slots,"nothing-selected",{key:0},()=>[e.createTextVNode(e.toDisplayString(t.placeholder?t.placeholder:t.label),1)]):e.renderSlot(y.$slots,"something-selected",{key:1,value:O.value},()=>[e.createTextVNode(e.toDisplayString($(O.value)),1)])]),e.createElementVNode("div",eo,[E.value?(e.openBlock(),e.createBlock(e.unref(T.ExclamationCircleIcon),{key:0,class:"h-4 w-4 text-danger","aria-hidden":"true"})):t.showRequired?(e.openBlock(),e.createElementBlock("div",to," * ")):e.createCommentVNode("",!0),I?(e.openBlock(),e.createBlock(e.unref(T.ChevronUpIcon),{key:2,class:"h-4 w-4 text-foreground","aria-hidden":"true"})):(e.openBlock(),e.createBlock(e.unref(T.ChevronDownIcon),{key:3,class:"h-4 w-4 text-foreground","aria-hidden":"true"}))])])]),_:3},8,["class"]),N.value?e.withDirectives((e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(pe.value),disabled:t.disabled,onClick:L[0]||(L[0]=I=>ve())},[e.createVNode(e.unref(T.XMarkIcon),{class:"w-3 h-3"})],10,no)),[[e.unref(Se.directive),"Clear"]]):e.createCommentVNode("",!0),e.unref(r)?(e.openBlock(),e.createBlock(e.Transition,{key:1,"leave-active-class":"transition ease-in duration-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{to:"body",disabled:!t.mountMenuOnBody},[e.createVNode(e.unref(M.ListboxOptions),{ref_key:"menuEl",ref:h,class:e.normalizeClass(ne.value),style:e.normalizeStyle(w.value),onFocus:L[3]||(L[3]=I=>{var _;return(_=u.value)==null?void 0:_.focus()})},{default:e.withCtx(()=>[Q.value?(e.openBlock(),e.createElementBlock("label",oo,[lo,e.createElementVNode("div",so,[e.createElementVNode("div",ao,[e.createVNode(e.unref(T.MagnifyingGlassIcon),{class:"h-5 w-5 text-foreground"})]),e.withDirectives(e.createElementVNode("input",{ref_key:"searchInput",ref:u,"onUpdate:modelValue":L[1]||(L[1]=I=>m.value=I),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:L[2]||(L[2]=e.withModifiers(()=>{},["stop"]))},null,40,ro),[[e.vModelText,m.value]])])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["overflow-auto simple-scrollbar",[Q.value?"max-h-52":"max-h-40"]])},[R.value&&i.value?(e.openBlock(),e.createElementBlock("div",io,[e.createVNode(de,{loading:!0})])):R.value&&!f.value.length?(e.openBlock(),e.createElementBlock("div",co,[e.renderSlot(y.$slots,"nothing-found",{},()=>[uo])])):e.createCommentVNode("",!0),!R.value||!i.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(ge.value,I=>{var _;return e.openBlock(),e.createBlock(e.unref(M.ListboxOption),{key:V(I),value:I,disabled:((_=t.disabledItemPredicate)==null?void 0:_.call(t,I))||!1},{default:e.withCtx(({active:q,selected:Ve})=>{var Ee,$e;return[e.createElementVNode("li",{class:e.normalizeClass(oe({active:q,disabled:((Ee=t.disabledItemPredicate)==null?void 0:Ee.call(t,I))||!1}))},[e.createElementVNode("span",mo,[e.renderSlot(y.$slots,"option",{item:I,active:q,selected:Ve,disabled:(($e=t.disabledItemPredicate)==null?void 0:$e.call(t,I))||!1},()=>[e.createTextVNode(e.toDisplayString($(I)),1)])]),!t.hideCheckmarks&&Ve?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([q?"text-primary":"text-foreground","absolute inset-y-0 right-0 flex items-center pr-4"])},[e.createVNode(e.unref(T.CheckIcon),{class:"h-5 w-5","aria-hidden":"true"})],2)):e.createCommentVNode("",!0)],2)]}),_:2},1032,["value","disabled"])}),128)):e.createCommentVNode("",!0)],2)]),_:3},8,["class","style"])],8,["disabled"]))]),_:3})):e.createCommentVNode("",!0)],2)]),_:3},8,["modelValue","name","multiple","by","disabled"])),S.value?(e.openBlock(),e.createElementBlock("p",{key:0,id:S.value,class:e.normalizeClass(["mt-2 text-xs sm:text-sm",z.value])},e.toDisplayString(C.value),11,fo)):e.createCommentVNode("",!0)]))}}),De=e.defineComponent({__name:"SourceAppBadge",props:{sourceApp:null},setup(t){return(n,a)=>(e.openBlock(),e.createBlock(ue,{"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"]))}}),po={key:0,class:"text-foreground-2 normal"},ho={key:1,class:"flex items-center"},vo={class:"truncate"},go={class:"flex items-center"},yo={class:"truncate"},ko=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},clearable:{type:Boolean},help:{type:String}},emits:["update:modelValue"],setup(t,{emit:n}){const a=n,o=t,s=e.ref(null),l=e.ref(null),{selectedValue:c,hiddenSelectedItemCount:d,isMultiItemArrayValue:r,firstItem:u}=Be({props:e.toRefs(o),emit:a,dynamicVisibility:{elementToWatchForChanges:s,itemContainer:l}}),h=(p,m)=>p.name.toLocaleLowerCase().includes(m.toLocaleLowerCase());return(p,m)=>(e.openBlock(),e.createBlock(we,{modelValue:e.unref(c),"onUpdate:modelValue":m[0]||(m[0]=f=>e.isRef(c)?c.value=f:null),multiple:t.multiple,items:t.items??e.unref(X.SourceApps),search:t.search,"search-placeholder":t.searchPlaceholder,label:t.label,"show-label":t.showLabel,name:t.name||"sourceApps","filter-predicate":h,clearable:t.clearable,help:t.help,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:f})=>[e.unref(r)(f)?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"elementToWatchForChanges",ref:s,class:"flex items-center space-x-0.5 h-5"},[e.createElementVNode("div",{ref_key:"itemContainer",ref:l,class:"flex flex-wrap overflow-hidden space-x-0.5 h-5"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f,i=>(e.openBlock(),e.createBlock(De,{key:i.name,"source-app":i},null,8,["source-app"]))),128))],512),e.unref(d)>0?(e.openBlock(),e.createElementBlock("div",po," +"+e.toDisplayString(e.unref(d)),1)):e.createCommentVNode("",!0)],512)):(e.openBlock(),e.createElementBlock("div",ho,[e.createElementVNode("div",{class:"h-2 w-2 rounded-full mr-2",style:e.normalizeStyle({backgroundColor:e.unref(u)(f).bgColor})},null,4),e.createElementVNode("span",vo,e.toDisplayString(e.unref(u)(f).name),1)]))]),option:e.withCtx(({item:f})=>[e.createElementVNode("div",go,[e.createElementVNode("div",{class:"h-2 w-2 rounded-full mr-2",style:e.normalizeStyle({backgroundColor:f.bgColor})},null,4),e.createElementVNode("span",yo,e.toDisplayString(f.name),1)])]),_:1},8,["modelValue","multiple","items","search","search-placeholder","label","show-label","name","clearable","help"]))}}),bo={class:"flex flex-wrap gap-1.5 text-xs"},xo=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:n}){const a=n,o=t,{selectedValue:s,isArrayValue:l}=Be({props:e.toRefs(o),emit:a}),c=d=>{l(s.value)?s.value=s.value.filter(r=>r.id!==d.id):s.value=void 0};return(d,r)=>(e.openBlock(),e.createBlock(we,{modelValue:e.unref(s),"onUpdate:modelValue":r[0]||(r[0]=u=>e.isRef(s)?s.value=u: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:u})=>[e.createElementVNode("ul",bo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l)(u)?u:[u],h=>(e.openBlock(),e.createElementBlock("li",{key:h[t.by]},[e.createVNode(ue,{size:"lg","clickable-icon":!0,"icon-left":e.unref(T.XMarkIcon),onClickIcon:e.withModifiers(p=>c(h),["stop"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.text),1)]),_:2},1032,["icon-left","onClickIcon"])]))),128))])]),option:e.withCtx(({item:u})=>[e.createTextVNode(e.toDisplayString(u.text),1)]),_:1},8,["modelValue","multiple","items","label","name","help","rules","by"]))}}),Co={class:"flex items-center"},Bo={class:"absolute inset-0 flex items-center gap-2 px-1 text-white"},wo=e.defineComponent({__name:"Switch",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(t){const n=e.useModel(t,"modelValue");return(a,o)=>(e.openBlock(),e.createElementBlock("div",Co,[e.createVNode(e.unref(M.Switch),{modelValue:n.value,"onUpdate:modelValue":o[0]||(o[0]=s=>n.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":n.value,"bg-primary-muted":!n.value}])},{default:e.withCtx(()=>[e.createElementVNode("div",Bo,[e.createVNode(e.unref(T.CheckIcon),{class:"h-5 w-5 drop-shadow-md"}),e.createVNode(e.unref(T.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":n.value,"translate-x-0":!n.value}])},null,2)]),_:1},8,["modelValue","class"])]))}}),Vo={class:"relative group bg-foundation-page p-2 rounded-lg pr-12"},Eo={class:"absolute inset-0 right-2 flex justify-end items-center"},$o=e.defineComponent({__name:"ClipboardInput",props:{value:null,isMultiline:{type:Boolean,default:!1},rows:null},emits:["copy"],setup(t,{emit:n}){const a=t,o=n,{copy:s}=P.useClipboard({legacy:!0}),l=e.ref(!1),c=async()=>{a.value&&(await s(a.value),l.value=!0,o("copy",a.value),setTimeout(()=>{l.value=!1},2e3))},d=r=>{const u=r.target,h=window.getSelection();if(h){const p=document.createRange();p.selectNodeContents(u),h.removeAllRanges(),h.addRange(p)}};return(r,u)=>(e.openBlock(),e.createElementBlock("div",Vo,[t.isMultiline?(e.openBlock(),e.createElementBlock("div",{key:0,class:"relative z-10 text-xs sm:text-sm text-foreground font-mono break-all p-2 pl-3 max-h-[4.8rem] simple-scrollbar overflow-y-auto",onKeypress:u[0]||(u[0]=h=>e.unref(ke)(d))},e.toDisplayString(t.value),33)):(e.openBlock(),e.createBlock(e.unref(Le),{key:1,color:"transparent",name:"contentInput",readonly:"","model-value":t.value,class:"relative z-10 text-sm text-foreground font-mono"},null,8,["model-value"])),e.createElementVNode("div",Eo,[e.createVNode(e.unref(F),{color:"invert",size:"sm","icon-left":l.value?e.unref(j.ClipboardDocumentCheckIcon):e.unref(j.ClipboardDocumentIcon),"hide-text":"",onClick:c},null,8,["icon-left"])])]))}});var te=(t=>(t.CtrlOrCmd="cmd-or-ctrl",t.AltOrOpt="alt-or-opt",t.Shift="shift",t))(te||{});const se=X.getClientOperatingSystem(),No={"cmd-or-ctrl":se===X.OperatingSystem.Mac?"Cmd":"Ctrl","alt-or-opt":se===X.OperatingSystem.Mac?"Opt":"Alt",shift:"Shift"};function So(t){const n=a=>Object.values(te).includes(a);return t.map(a=>n(a)?No[a]:a).join("+")}function zo(t,...n){P.onKeyDown(n[0],a=>{const o=a.getModifierState("Alt"),s=se===X.OperatingSystem.Mac?a.getModifierState("Meta"):a.getModifierState("Control"),l=a.getModifierState("Shift");for(const c of t)switch(c){case te.CtrlOrCmd:if(!s)return;break;case te.AltOrOpt:if(!o)return;break;case te.Shift:if(!l)return;break}n[1](a)},n[2])}function Io(t){const n=(t==null?void 0:t.model)||e.ref(),a=e.computed({get:()=>!!n.value,set:o=>n.value=o?!0:void 0});return{model:n,isChecked:a}}const Lo=e.createElementVNode("div",{class:"fixed inset-0 bg-neutral-100/70 dark:bg-neutral-900/70 transition-opacity backdrop-blur-xs"},null,-1),Mo={class:"fixed inset-0 z-10 h-[100dvh] w-screen"},Do={class:"flex justify-center items-center h-full w-full p-4 sm:p-0"},To={key:0,class:"flex items-center justify-start rounded-t-lg shrink-0 min-h-[2rem] sm:min-h-[4rem] py-2 px-4 sm:px-8 truncate text-lg sm:text-2xl font-bold"},Oo={class:"w-full truncate pr-12"},Ao=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:n}){const a=n,o=t,s=e.useSlots(),l=e.ref(!1),c=e.ref(!0),d=e.computed(()=>!!o.onSubmit),r=e.computed(()=>o.buttons||s.buttons),u=e.computed(()=>o.title||s.header),h=e.computed({get:()=>o.open,set:b=>a("update:open",b)}),p=e.computed(()=>{switch(o.maxWidth){case"sm":return 0;case"md":return 1;case"lg":return 2;case"xl":return 3;default:return 1e4}}),m=e.computed(()=>{const b=["w-full","sm:w-full sm:max-w-2xl"];return p.value>=1&&b.push("md:max-w-2xl"),p.value>=2&&b.push("lg:max-w-4xl"),p.value>=3&&b.push("xl:max-w-6xl"),p.value>=4&&b.push("2xl:max-w-7xl"),b.join(" ")}),f=()=>{o.preventCloseOnClickOutside||(h.value=!1)},i=B.throttle(b=>{const v=b.target,{scrollTop:k,offsetHeight:x,scrollHeight:E}=v;l.value=k>0,c.value=k+x>=E},60);return(b,v)=>(e.openBlock(),e.createBlock(e.unref(M.TransitionRoot),{as:"template",show:h.value},{default:e.withCtx(()=>[e.createVNode(e.unref(M.Dialog),{as:"div",class:"relative z-40",onClose:f},{default:e.withCtx(()=>[e.createVNode(e.unref(M.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(()=>[Lo]),_:1}),e.createElementVNode("div",Mo,[e.createElementVNode("div",Do,[e.createVNode(e.unref(M.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:v[2]||(v[2]=k=>b.$emit("fully-closed"))},{default:e.withCtx(()=>[e.createVNode(e.unref(M.DialogPanel),{class:e.normalizeClass(["transform rounded-lg text-foreground overflow-hidden bg-foundation text-left shadow-xl transition-all flex flex-col max-h-[90dvh]",m.value]),as:d.value?"form":"div",onSubmit:e.withModifiers(t.onSubmit,["prevent"])},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(l.value&&"relative z-20 shadow-lg")},[u.value?(e.openBlock(),e.createElementBlock("div",To,[e.createElementVNode("div",Oo,[e.createTextVNode(e.toDisplayString(t.title)+" ",1),e.renderSlot(b.$slots,"header")])])):e.createCommentVNode("",!0)],2),t.hideCloser?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["absolute z-20 bg-foundation rounded-full p-1",u.value?"top-2 right-3 sm:top-4":"right-4 top-3"]),onClick:v[0]||(v[0]=k=>h.value=!1)},[e.createVNode(e.unref(j.XMarkIcon),{class:"h-5 sm:h-6 w-5 sm:w-6"})],2)),e.createElementVNode("div",{class:e.normalizeClass(["flex-1 simple-scrollbar overflow-y-auto",u.value?"p-3 sm:py-6 sm:px-8":"p-10"]),onScroll:v[1]||(v[1]=(...k)=>e.unref(i)&&e.unref(i)(...k))},[e.renderSlot(b.$slots,"default",{},()=>[e.createTextVNode("Put your content here!")])],34),r.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["relative z-50 flex px-4 py-2 sm:py-4 sm:px-6 gap-2 shrink-0 bg-foundation",!c.value&&"shadow-t"])},[t.buttons?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.buttons,(k,x)=>(e.openBlock(),e.createBlock(e.unref(F),e.mergeProps({key:x},k.props,{disabled:k.disabled,type:k.submit&&"submit",onClick:k.onClick}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.text),1)]),_:2},1040,["disabled","type","onClick"]))),128)):e.renderSlot(b.$slots,"buttons",{key:1})],2)):e.createCommentVNode("",!0)]),_:3},8,["class","as","onSubmit"])]),_:3})])])]),_:3})]),_:3},8,["show"]))}}),Po={class:"h-4 sm:h-5 h-4 sm:w-5 empty:h-0 empty:w-0"},_o=e.defineComponent({__name:"DialogSection",props:{title:String,borderT:Boolean,borderB:Boolean,allowOverflow:Boolean,titleColor:{type:String,default:"default"},button:Object,alwaysOpen:Boolean,lazyLoad:{type:Boolean,default:!1}},setup(t){const n=t,a=e.ref(null),o=e.ref(0),s=e.ref(!1),l=e.computed(()=>{const r=[];return!n.button&&!n.alwaysOpen&&r.push("cursor-pointer","hover:bg-foundation"),s.value&&r.push("bg-foundation"),r}),c=e.computed(()=>{switch(n.titleColor){case"danger":return"text-danger";case"warning":return"text-warning";case"success":return"text-success";case"secondary":return"text-secondary";case"info":return"text-info";default:return"text-foreground"}}),d=async()=>{var r;s.value=!s.value,s.value&&(await e.nextTick(),o.value=(((r=e.unref(a))==null?void 0:r.scrollHeight)||0)+64)};return(r,u)=>{var h,p;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col border-primary-muted",{"border-t":t.borderT,"border-b":t.borderB,"relative z-10":s.value}])},[e.createElementVNode("div",e.mergeProps({class:["flex justify-between items-center gap-4 sm:gap-8 py-3 sm:py-4 px-2",l.value],tabindex:"0"},e.toHandlers(!t.button&&!t.alwaysOpen?{click:d,keypress:e.unref(ke)(d)}:{},!0)),[e.createElementVNode("div",{class:e.normalizeClass(["text-sm sm:text-base font-bold flex items-center gap-1 sm:gap-2 select-none",c.value])},[e.createElementVNode("div",Po,[e.renderSlot(r.$slots,"icon")]),e.createElementVNode("span",null,e.toDisplayString(t.title),1)],2),e.createElementVNode("div",null,[!t.button&&!t.alwaysOpen?(e.openBlock(),e.createBlock(e.unref(j.ChevronDownIcon),{key:0,class:e.normalizeClass(["w-4 h-4 sm:w-5 sm:h-5 transition-all duration-400",s.value&&"rotate-180"])},null,8,["class"])):e.createCommentVNode("",!0),t.button?(e.openBlock(),e.createBlock(e.unref(F),e.mergeProps({key:1,size:"sm",to:t.button.expandContent?void 0:t.button.to,color:t.button.expandContent&&s.value?"invert":t.button.color,"icon-right":t.button.expandContent&&s.value?void 0:t.button.iconRight,onClick:(h=t.button)==null?void 0:h.onClick},e.toHandlers((p=t.button)!=null&&p.expandContent?{click:d}:{})),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.button.expandContent&&s.value?"Cancel":t.button.text),1)]),_:1},16,["to","color","icon-right","onClick"])):e.createCommentVNode("",!0)])],16),e.createElementVNode("div",{class:e.normalizeClass(["transition-all duration-700 overflow-hidden",[t.allowOverflow&&s.value?"!overflow-visible":"",s.value?"mb-3 mt-1":"",!t.button&&!t.alwaysOpen?"cursor-pointer hover:bg-foundation":""]]),style:e.normalizeStyle(t.alwaysOpen?"max-height: none;":`max-height: ${s.value?o.value+"px":"0px"}`)},[n.lazyLoad?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[s.value||n.alwaysOpen?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"content",ref:a,class:"rounded-md text-sm pb-3 px-2 mt-1"},[e.renderSlot(r.$slots,"default",{},()=>[e.createTextVNode("Panel contents")])],512)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"content",ref:a,class:"rounded-md text-sm pb-3 px-2 mt-1"},[e.renderSlot(r.$slots,"default",{},()=>[e.createTextVNode("Panel contents")])],512))],6)],2)}}}),jo={class:"inline-flex items-center space-x-2"},Fo={class:"label-light"},Ro=e.defineComponent({__name:"Disclosure",props:{title:null,icon:null,color:{default:"default"}},setup(t){const n=t,a=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(n.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=["p-3 border-x border-b rounded-b-md"];switch(n.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,l)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(M.Disclosure),null,{default:e.withCtx(({open:c})=>[e.createVNode(e.unref(M.DisclosureButton),{class:e.normalizeClass(a.value)},{default:e.withCtx(()=>[e.createElementVNode("div",jo,[t.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon),{key:0,class:"h-5 w-5"})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(t.title),1)]),e.createVNode(e.unref(T.ChevronUpIcon),{class:e.normalizeClass([c?"":"rotate-180 transform","h-5 w-5"])},null,8,["class"])]),_:2},1032,["class"]),e.createVNode(e.unref(M.DisclosurePanel),{class:e.normalizeClass(o.value)},{default:e.withCtx(()=>[e.createElementVNode("div",Fo,[e.renderSlot(s.$slots,"default",{},()=>[e.createTextVNode("Panel contents")])])]),_:3},8,["class"])]),_:3})]))}});var G=(t=>(t.Grid="grid",t.List="list",t))(G||{});const Uo={class:"relative flex bg-foundation rounded-md"},qo={class:"relative z-10 flex gap-1 items-center p-1 rounded-l"},Wo={class:"relative z-10 flex gap-1 items-center p-1 rounded-r"},Ho=e.defineComponent({__name:"GridListToggle",props:{modelValue:null},emits:["click","update:modelValue"],setup(t,{emit:n}){const a=n,o=t,s=e.computed({get:()=>o.modelValue||G.Grid,set:c=>a("update:modelValue",c)}),l=c=>{a("click",c);const d=s.value===G.Grid?G.List:G.Grid;s.value=d};return(c,d)=>(e.openBlock(),e.createElementBlock("button",{class:"max-w-max transition flex justify-center items-center gap-2 outline-none select-none h-8 text-foreground border-2 bg-foundation border-foundation-2 rounded-md hover:ring-2 active:scale-[0.97] grow",onClick:l},[e.createElementVNode("div",Uo,[e.createElementVNode("div",{class:e.normalizeClass(["absolute -top-[2px] -left-[2px] transition",{"translate-x-7":s.value!==e.unref(G).Grid}])},[e.createElementVNode("div",{class:e.normalizeClass([s.value!==e.unref(G).Grid?"rounded-r-md":"rounded-l-md","w-8 h-8 bg-primary-muted shadow-inner transition"])},null,2)],2),e.createElementVNode("div",qo,[e.createVNode(e.unref(T.Squares2X2Icon),{class:"h-5 w-5"})]),e.createElementVNode("div",Wo,[e.createVNode(e.unref(T.Bars3Icon),{class:"h-5 w-5"})])])]))}});var Te=(t=>(t[t.Throttle=0]="Throttle",t[t.Debounce=1]="Debounce",t))(Te||{}),ae=(t=>(t[t.Left=0]="Left",t[t.Right=1]="Right",t))(ae||{});function Oe(t,n){if(!P.isClient)return;const{wait:a=100,throttleOrDebounce:o=0}=n||{},s=a?o===0?B.throttle(t,a):B.debounce(t,a):t;e.onMounted(()=>window.addEventListener("resize",s)),e.onBeforeUnmount(()=>window.removeEventListener("resize",s))}function Ko(t){e.onMounted(()=>{window.addEventListener("beforeunload",t)}),e.onBeforeUnmount(()=>{window.removeEventListener("beforeunload",t)})}function Ae(t){const{el:n,defaultDirection:a}=t,o=e.ref(B.isUndefined(a)?1:a),s=e.computed(()=>{const c=e.unref(t.stopUpdatesBelowWidth);if(!B.isUndefined(c))return c;const d=e.unref(n);return d!=null&&d.offsetWidth?d.offsetWidth*2:void 0}),l=()=>{if(!P.isClient)return;const c=e.unref(n);if(!c)return;const d=c.getBoundingClientRect(),r=d.x+d.width>window.innerWidth,u=d.x<0;r&&u||!B.isUndefined(s.value)&&window.innerWidth<s.value||(r?o.value=0:u&&(o.value=1))};return Oe(()=>l()),e.watch(()=>e.unref(n),c=>{c&&l()}),{direction:e.computed(()=>o.value),recalculateDirection:l}}const Go=["disabled","onClick"],Xo=e.defineComponent({__name:"Menu",props:{open:{type:Boolean},items:null},emits:["update:open","chosen"],setup(t,{emit:n}){const a=n,o=t,s=e.ref(null),{direction:l}=Ae({el:e.computed(()=>{var f;return((f=s.value)==null?void 0:f.el)||null}),defaultDirection:ae.Left,stopUpdatesBelowWidth:300}),c=e.ref(null),d=e.ref(!1),r=e.computed({get:()=>o.open||!1,set:f=>a("update:open",f)}),u=f=>{const{active:i,disabled:b,color:v}=f,k=["group flex gap-3 w-full items-center rounded-md px-2 py-1.5 text-sm"];return i&&!v?k.push("bg-foundation-focus text-foreground"):b?k.push("text-foreground-disabled"):v==="danger"&&i?k.push("text-foreground-on-primary bg-danger"):v==="danger"&&!i?k.push("text-danger"):v==="info"&&i?k.push("text-foreground-on-primary bg-info"):v==="info"&&!i?k.push("text-info"):k.push("text-foreground"),k.join(" ")},h=(f,i)=>{a("chosen",{item:f,event:i})},p=()=>{var f;return(f=c.value)==null?void 0:f.el.click()},m=f=>{const i=!!f;return d.value=i,i};return e.watch(d,(f,i)=>{f!==i&&(r.value=f)}),e.watch(r,f=>{(f&&!d.value||!f&&d.value)&&p()}),(f,i)=>(e.openBlock(),e.createBlock(e.unref(M.Menu),{as:"div",class:"relative inline-block"},{default:e.withCtx(({open:b})=>[e.createElementVNode("div",null,[e.createVNode(e.unref(M.MenuButton),{ref_key:"menuButton",ref:c,class:"hidden",onClick:i[0]||(i[0]=e.withModifiers(()=>{},["stop","prevent"]))},null,512),e.createElementVNode("div",{class:e.normalizeClass(b?"pointer-events-none":"")},[e.renderSlot(f.$slots,"default",{toggle:p,open:m(b)})],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(M.MenuItems),{ref_key:"menuItems",ref:s,class:e.normalizeClass(["absolute mt-2 w-48 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(l)===e.unref(ae).Left?"right-0":""])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(v,k)=>(e.openBlock(),e.createElementBlock("div",{key:k,class:"p-1"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v,x=>(e.openBlock(),e.createBlock(e.unref(M.MenuItem),{key:x.id,disabled:x.disabled,color:x.color},{default:e.withCtx(({active:E,disabled:C})=>[e.withDirectives((e.openBlock(),e.createElementBlock("span",null,[e.createElementVNode("button",{class:e.normalizeClass(u({active:E,disabled:C,color:x.color})),disabled:C,onClick:g=>h(x,g)},[x.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(x.icon),{key:0,class:"h-5 w-5"})):e.createCommentVNode("",!0),e.renderSlot(f.$slots,"item",{item:x},()=>[e.createTextVNode(e.toDisplayString(x.title),1)])],10,Go)])),[[e.unref(Se.directive),x.disabled&&x.disabledTooltip]])]),_:2},1032,["disabled","color"]))),128))]))),128))]),_:3},8,["class"])]),_:3})]),_:3}))}}),Zo={class:"flex flex-col gap-y-0 sm:gap-y-4"},Qo={class:"flex gap-x-6"},Jo=e.defineComponent({__name:"Tabs",props:{items:null},setup(t){const n=t,a=e.ref(null),o=e.computed(()=>a.value&&n.items.find(l=>l.id===a.value)||n.items[0]),s=l=>{a.value=l.id};return(l,c)=>(e.openBlock(),e.createElementBlock("div",Zo,[e.createElementVNode("div",Qo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,d=>(e.openBlock(),e.createBlock(F,{key:d.id,link:"",color:o.value.id===d.id?"default":"secondary",onClick:r=>s(d)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.title),1)]),_:2},1032,["color","onClick"]))),128))]),e.renderSlot(l.$slots,"default",{activeItem:o.value})]))}}),Yo={class:"text-foreground"},el={class:"w-full text-sm overflow-x-auto overflow-y-visible simple-scrollbar"},tl=["onClick","onKeypress"],nl=e.createElementVNode("div",{class:"text-gray-900 font-medium order-1"},"Placeholder",-1),ol={class:"absolute right-1.5 gap-1 flex items-center p-0"},ll=e.defineComponent({__name:"Table",props:{items:null,buttons:null,columns:null,overflowCells:{type:Boolean},onRowClick:{type:Function}},setup(t){const n=t,a=e.computed(()=>{const c=(n.buttons||[]).length;let d=16;return c>0&&(d=48+(c-1)*42),`${d}px`}),o=c=>{var d;return((d=n.columns.find(r=>r.id===c))==null?void 0:d.classes)||""},s=(c,d)=>{const r=o(c);return d===0?`bg-transparent py-3 pr-5 px-1 ${r}`:`lg:p-0 px-1 my-2 ${r}`},l=c=>{var d;(d=n.onRowClick)==null||d.call(n,c)};return(c,d)=>(e.openBlock(),e.createElementBlock("div",Yo,[e.createElementVNode("div",el,[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:a.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,r=>(e.openBlock(),e.createElementBlock("div",{key:r.id,class:e.normalizeClass([o(r.id),"capitalize"])},e.toDisplayString(r.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,r=>(e.openBlock(),e.createElementBlock("div",{key:r.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:a.value}),tabindex:"0",onClick:u=>l(r),onKeypress:u=>l(r)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,(u,h)=>(e.openBlock(),e.createElementBlock("div",{key:u.id,class:e.normalizeClass(s(u.id,h)),tabindex:"0"},[e.renderSlot(c.$slots,u.id,{item:r},()=>[nl])],2))),128)),e.createElementVNode("div",ol,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.buttons,u=>(e.openBlock(),e.createElementBlock("div",{key:u.label},[e.createVNode(e.unref(F),{"icon-left":u.icon,size:"sm",color:"secondary","hide-text":"",class:e.normalizeClass(u.class),onClick:e.withModifiers(h=>u.action(r),["stop"])},null,8,["icon-left","class","onClick"])]))),128))])],46,tl))),128))],2)])]))}}),sl={class:"w-full flex flex-col items-center my-2 space-y-2 mt-4"},al={class:"inline-flex items-center space-x-1"},rl=e.createElementVNode("span",{class:"text-foreground-2"},"That's it, you've loaded everything!",-1),il={class:"w-full flex flex-col items-center my-2 space-y-2 mt-4"},cl={class:"inline-flex items-center space-x-1"},ul=e.createElementVNode("span",{class:"text-foreground-2"},"An error occurred while loading",-1),dl=e.defineComponent({__name:"InfiniteLoading",props:{settings:null,allowRetry:{type:Boolean}},emits:["infinite"],setup(t){const n=e.ref(null),a=e.ref(!1);return P.isClient&&e.onMounted(()=>{const o=setInterval(()=>{var s;(s=n.value)!=null&&s.isConnected&&(a.value=!0,clearInterval(o))},200)}),(o,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:n},[a.value?(e.openBlock(),e.createBlock(e.unref(Ze),e.mergeProps({key:0},o.$props.settings||{},{onInfinite:s[0]||(s[0]=l=>o.$emit("infinite",l))}),{spinner:e.withCtx(()=>[e.createVNode(de,{loading:!0,class:"my-2"})]),complete:e.withCtx(()=>[e.createElementVNode("div",sl,[e.createElementVNode("div",al,[e.createVNode(e.unref(j.CheckIcon),{class:"w-5 h-5 text-success"}),rl])])]),error:e.withCtx(({retry:l})=>[e.createElementVNode("div",il,[e.createElementVNode("div",cl,[e.createVNode(e.unref(j.ExclamationTriangleIcon),{class:"w-5 h-5 text-danger"}),ul]),t.allowRetry?(e.openBlock(),e.createBlock(F,{key:0,onClick:l},{default:e.withCtx(()=>[e.createTextVNode("Retry")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)])]),_:1},16)):e.createCommentVNode("",!0)],512))}}),ml={class:"relative group"},fl={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"},pl=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:n}){const a=n,o=t,s=e.computed(()=>o.customPadding?"":"px-4 py-4 sm:px-6"),l=e.computed(()=>o.customPadding?"":"px-4 py-4 sm:p-6"),c=e.computed(()=>{const d=["rounded-lg"];return o.noShadow||d.push("shadow"),o.ring&&d.push("ring-outline-2 hover:ring-2"),o.panelClasses&&d.push(o.panelClasses),d.join(" ")});return(d,r)=>(e.openBlock(),e.createElementBlock("div",ml,[t.fancyGlow?(e.openBlock(),e.createElementBlock("div",fl)):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:r[0]||(r[0]=u=>a("submit",u))},{default:e.withCtx(()=>[d.$slots.header?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(s.value)},[e.renderSlot(d.$slots,"header")],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["grow",l.value])},[e.renderSlot(d.$slots,"default")],2),d.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(s.value)},[e.renderSlot(d.$slots,"footer")],2)):e.createCommentVNode("",!0)]),_:3},40,["class"]))]))}}),hl={class:"flex-shrink-0"},vl=e.createElementVNode("span",{class:"sr-only"},"Dismiss",-1),gl=e.defineComponent({__name:"Alert",props:{color:{default:"success"},withDismiss:{type:Boolean},actions:null,customIcon:null,size:{default:"default"}},emits:["dismiss"],setup(t){const n=t,a=e.useSlots(),o=e.computed(()=>!!a.description),s=e.computed(()=>{if(n.customIcon)return n.customIcon;switch(n.color){case"info":return D.InformationCircleIcon;case"warning":return D.ExclamationCircleIcon;case"danger":return D.XCircleIcon;case"success":default:return D.CheckCircleIcon}}),l=e.computed(()=>{const i=[];switch(n.size){case"xs":i.push("p-1");break;case"default":default:i.push(o.value?"p-3 sm:p-4":"p-2");break}switch(n.color){case"success":i.push("bg-success-lighter border-l-4 border-success");break;case"info":i.push("bg-info-lighter border-l-4 border-info");break;case"danger":i.push("bg-danger-lighter border-l-4 border-danger");break;case"warning":i.push("bg-warning-lighter border-l-4 border-warning");break}return i.join(" ")}),c=e.computed(()=>{const i=[];if(o.value)i.push("");else switch(i.push("items-center"),n.size){case"xs":i.push("space-x-1");break;case"default":default:i.push("space-x-2");break}return i.join(" ")}),d=e.computed(()=>{const i=["grow"];switch(o.value||i.push("flex items-center space-x-2"),n.size){case"xs":i.push("ml-1");break;case"default":default:i.push("ml-3");break}return i.join(" ")}),r=e.computed(()=>{const i=[];switch(n.size){case"xs":i.push("text-xs");break;case"default":default:i.push("mt-1 sm:mt-2 text-xs sm:text-sm");break}return i.join(" ")}),u=e.computed(()=>{var v;const i=["flex"];o.value||i.push("grow justify-end");const b=o.value&&((v=n.actions)==null?void 0:v.length);switch(n.size){case"xs":i.push("space-x-1"),b&&i.push("mt-1");break;case"default":default:i.push("space-x-2"),b&&i.push("mt-4");break}return i.join(" ")}),h=e.computed(()=>{const i=[];switch(n.color){case"success":i.push("text-success-darker");break;case"info":i.push("text-info-darker");break;case"danger":i.push("text-danger-darker");break;case"warning":i.push("text-warning-darker");break}return i.join(" ")}),p=e.computed(()=>{const i=[];switch(n.size){case"xs":i.push("h-4 w-4"),i.push(o.value?"mt-0.5":"");break;case"default":default:i.push("h-5 w-5");break}switch(n.color){case"success":i.push("text-success");break;case"info":i.push("text-info");break;case"danger":i.push("text-danger");break;case"warning":i.push("text-warning");break}return i.join(" ")}),m=e.computed(()=>{const i=[];switch(n.color){case"success":i.push("bg-success-lighter ring-success");break;case"info":i.push("bg-info-lighter ring-info");break;case"danger":i.push("bg-danger-lighter ring-danger");break;case"warning":i.push("bg-warning-lighter ring-warning");break}return i.join(" ")}),f=e.computed(()=>{switch(n.size){case"xs":return"xs";case"default":default:return"sm"}});return(i,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["rounded-md",[l.value,h.value]])},[e.createElementVNode("div",{class:e.normalizeClass(["flex",c.value])},[e.createElementVNode("div",hl,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value),{class:e.normalizeClass(p.value),"aria-hidden":"true"},null,8,["class"]))]),e.createElementVNode("div",{class:e.normalizeClass(d.value)},[e.createElementVNode("h3",{class:e.normalizeClass(["text-sm",[o.value?"font-medium":""]])},[e.renderSlot(i.$slots,"title",{},()=>[e.createTextVNode("Title")])],2),o.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(r.value)},[e.renderSlot(i.$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||[],(v,k)=>(e.openBlock(),e.createBlock(F,{key:k,color:t.color,size:f.value,to:v.url,external:v.externalUrl||!1,onClick:x=>v.onClick||e.unref(B.noop)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(v.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:b[0]||(b[0]=v=>i.$emit("dismiss"))},[vl,e.createVNode(e.unref(D.XMarkIcon),{class:"h-5 w-5","aria-hidden":"true"})],2)],2)):e.createCommentVNode("",!0)],2)],2))}});function yl(t){var i,b;const{get:n,initialState:a,readOptions:o,set:s,asyncRead:l=!0,debugging:c}=t,d=c==null?void 0:c.log,r=()=>(new Error("Trace:").stack||"").substring(7),u=((b=(i=t.debugging)==null?void 0:i.log)==null?void 0:b.logger)||console.debug,h=d&&!d.writesOnly?()=>{const v=n();return u(`debugging: '${d.name}' read`,v,r()),v}:n,p=d&&!d.readsOnly?v=>(u(`debugging: '${d.name}' written to`,v,r()),s(v)):s,m=l?P.computedAsync(h,a,o):e.computed(h),f=e.computed(()=>m.value);return f.update=p,f}const kl=e.defineComponent({__name:"ContextManager",setup(t,{expose:n}){const o=e.getCurrentInstance().provides,s=Object.getOwnPropertySymbols(o).find(m=>m.description==="ComboboxContext");s||console.error("FormTagsContextManager ctx key not found!");const l=e.inject(s||"__undefined");return l||console.error("FormTagsContextManager ctx not found!"),n({goUp:()=>{l==null||l.goToOption(1)},goDown:()=>{l==null||l.goToOption(2)},open:()=>{l&&l.openCombobox()},close:()=>{l==null||l.closeCombobox()},selectActive:()=>{l==null||l.selectActiveOption()},isOpen:()=>(l==null?void 0:l.comboboxState.value)===0}),(m,f)=>e.renderSlot(m.$slots,"default")}}),bl=["for"],xl=["disabled","placeholder","onKeydown"],Cl=e.createElementVNode("span",{class:"text-xs sr-only"},"Clear input",-1),Bl={key:1},wl=e.createElementVNode("div",{class:"text-foreground-2 text-center"},[e.createTextVNode(" Press "),e.createElementVNode("strong",null,"Enter"),e.createTextVNode(" to create tag ⚡ ")],-1),Vl=[wl],El=["id"],$l=e.defineComponent({__name:"Tags",props:{name:null,help:null,label:null,showLabel:{type:Boolean},rules:null,validateOnMount:{type:Boolean},validateOnValueUpdate:{type:Boolean},autoFocus:{type:Boolean},showClear:{type:Boolean},showRequired:{type:Boolean},color:{default:"page"},wrapperClasses:null,size:{default:"base"},placeholder:null,disabled:{type:Boolean},useLabelInErrors:{type:Boolean,default:!0},getAutocompleteItems:{type:Function},modelValue:null},emits:["update:modelValue","change","clear"],setup(t,{expose:n,emit:a}){const o=w=>w.type==="input",s=a,l=t,c=e.ref(null),{focused:d}=P.useFocus(c),r=e.ref(null),{coreInputClasses:u,coreClasses:h,labelClasses:p,title:m,helpTip:f,helpTipId:i,hideHelpTip:b,helpTipClasses:v,errorMessage:k,clear:x,value:E}=be({props:e.toRefs(l),emit:s,inputEl:c}),C=e.ref([]),g=e.ref(!1),S=e.ref(!1),z=e.ref(""),N=e.computed({get:()=>E.value||[],set:w=>{E.value=B.uniq(w).filter($=>!!$.length)}}),fe=e.computed(()=>{switch(l.size){case"sm":return"h-6";case"lg":return"h-10";case"xl":return"h-14";case"base":default:return"h-8"}}),K=e.computed(()=>l.showClear&&!!N.value.length),pe=e.computed(()=>{const w=[h.value,l.disabled?"cursor-not-allowed !bg-foundation-disabled !text-disabled-muted":""];return K.value&&(k.value||l.showRequired)?w.push("pr-14"):(K.value||k.value||l.showRequired)&&w.push("pr-8"),k.value?(w.push("border-2 border-danger text-danger-darker"),d.value&&w.push("ring-1 ring-danger")):(w.push("border-2 border-transparent"),d.value&&w.push("ring-2 ring-outline-2")),w.join(" ")}),he=w=>{if(l.disabled)return;const $=N.value.indexOf(w);if($!==-1){const V=N.value.slice();V.splice($,1),N.value=V}},Q=()=>{var w;(w=c.value)==null||w.blur(),S.value=!1},R=w=>{if(w.key!=="Backspace"||z.value.length)return;const $=N.value.slice();$.pop(),N.value=$,S.value=!1},Z=()=>{var w,$,V;(w=r.value)!=null&&w.isOpen()?($=r.value)==null||$.goUp():(V=r.value)==null||V.open()},O=()=>{var w,$,V;(w=r.value)!=null&&w.isOpen()?($=r.value)==null||$.goDown():(V=r.value)==null||V.open()},J=async()=>{l.getAutocompleteItems&&(g.value=!0,C.value=await Promise.resolve(l.getAutocompleteItems(z.value)),g.value=!1)},ve=B.debounce(J,1e3),ge=()=>{g.value=!0,ve()},ne=(w,$)=>{var A,U;if(o(w)?w.data===" "||w.data===","||w.data===";":!0){let oe=!1;if((A=r.value)!=null&&A.isOpen()&&C.value.length&&!$)(U=r.value)==null||U.selectActive(),oe=!0;else{const y=z.value.trim().substring(0,z.value.length-(o(w)?1:0)),L=N.value.includes(y);y.length>0&&!L&&(N.value=[...N.value,y],oe=!0)}oe&&(z.value="",S.value=!1)}else S.value=!!z.value.length};return e.watch(S,(w,$)=>{var V,A;w&&!$?l.getAutocompleteItems&&((V=r.value)==null||V.open()):!w&&$&&((A=r.value)==null||A.close())}),e.watch(z,()=>{ge()}),e.onMounted(()=>{J()}),n({resolveAutocompleteItems:J}),(w,$)=>(e.openBlock(),e.createBlock(e.unref(M.Combobox),{modelValue:N.value,"onUpdate:modelValue":$[5]||($[5]=V=>N.value=V),as:"div",multiple:"",clearable:"",class:e.normalizeClass([t.wrapperClasses])},{default:e.withCtx(()=>[e.createVNode(kl,{ref_key:"ctxManager",ref:r},{default:e.withCtx(()=>[e.createElementVNode("label",{for:t.name,class:e.normalizeClass(e.unref(p))},[e.createElementVNode("span",null,e.toDisplayString(e.unref(m)),1)],10,bl),e.createElementVNode("div",{class:e.normalizeClass(["relative flex flex-wrap items-center space-x-1 px-2 py-1",pe.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,V=>(e.openBlock(),e.createBlock(ue,{key:V,"icon-left":t.disabled?void 0:e.unref(D.XMarkIcon),"clickable-icon":"",size:"lg",onClickIcon:()=>he(V)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V),1)]),_:2},1032,["icon-left","onClickIcon"]))),128)),e.withDirectives(e.createElementVNode("input",{ref_key:"inputEl",ref:c,"onUpdate:modelValue":$[0]||($[0]=V=>z.value=V),disabled:t.disabled,class:e.normalizeClass(["bg-transparent grow shrink border-0 focus:ring-0 p-0",[e.unref(u),fe.value]]),style:{"flex-basis":"70px","min-width":"70px"},placeholder:N.value.length?void 0:t.placeholder,onInput:ne,onKeydown:[e.withKeys(Q,["escape"]),$[1]||($[1]=e.withKeys(e.withModifiers(V=>ne(V,!0),["stop","prevent"]),["enter"])),e.withKeys(ne,["tab"]),e.withKeys(R,["backspace"]),e.withKeys(Z,["arrow-up"]),e.withKeys(O,["arrow-down"])],onBlur:$[2]||($[2]=V=>S.value=!1)},null,42,xl),[[e.vModelText,z.value]]),K.value?(e.openBlock(),e.createElementBlock("a",{key:0,title:"Clear input",class:"absolute top-2 right-0 flex items-center pr-2 cursor-pointer",onClick:$[3]||($[3]=(...V)=>e.unref(x)&&e.unref(x)(...V)),onKeydown:$[4]||($[4]=(...V)=>e.unref(x)&&e.unref(x)(...V))},[Cl,e.createVNode(e.unref(D.XMarkIcon),{class:"h-5 w-5 text-foreground","aria-hidden":"true"})],32)):e.createCommentVNode("",!0),e.unref(k)?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["pointer-events-none absolute top-[10px] right-0 flex items-center",K.value?"pr-8":"pr-2"])},[e.createVNode(e.unref(D.ExclamationCircleIcon),{class:"h-4 w-4 text-danger","aria-hidden":"true"})],2)):e.createCommentVNode("",!0),t.showRequired&&!e.unref(k)?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["pointer-events-none absolute top-[2px] text-4xl right-0 flex items-center text-danger opacity-50",K.value?"pr-8":"pr-2"])}," * ",2)):e.createCommentVNode("",!0)],2),e.createVNode(e.unref(M.TransitionRoot),{leave:"transition ease-in duration-100","leave-from":"opacity-100","leave-to":"opacity-0",class:"relative px-0.5"},{default:e.withCtx(()=>[e.createVNode(e.unref(M.ComboboxOptions),{class:"absolute top-1 max-h-60 w-full overflow-auto simple-scrollbar rounded-md bg-foundation-2 py-1 shadow label label--light outline outline-2 outline-primary-muted focus:outline-none"},{default:e.withCtx(()=>[g.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["px-1",C.value.length?"mb-1":""])},[e.createVNode(de,{loading:!0})],2)):e.createCommentVNode("",!0),!C.value.length&&!g.value?(e.openBlock(),e.createElementBlock("div",Bl,Vl)):e.createCommentVNode("",!0),C.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(C.value,V=>(e.openBlock(),e.createBlock(e.unref(M.ComboboxOption),{key:V,as:"template",value:V},{default:e.withCtx(({selected:A,active:U})=>[e.createElementVNode("li",{class:e.normalizeClass(["relative cursor-pointer select-none py-1.5 pl-3",{"text-primary":U,"text-foreground":!U}])},[e.createElementVNode("span",{class:e.normalizeClass(["block truncate",{"font-medium":A,"font-normal":!A}])},e.toDisplayString(V),3),A?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["absolute inset-y-0 right-0 flex items-center pr-4",{"text-primary":U,"text-foreground":!U}])},[e.createVNode(e.unref(D.CheckIcon),{class:"h-5 w-5","aria-hidden":"true"})],2)):e.createCommentVNode("",!0)],2)]),_:2},1032,["value"]))),128)):e.createCommentVNode("",!0)]),_:1})]),_:1}),e.unref(i)&&!e.unref(b)?(e.openBlock(),e.createElementBlock("p",{key:0,id:e.unref(i),class:e.normalizeClass(e.unref(v))},e.toDisplayString(e.unref(f)),11,El)):e.createCommentVNode("",!0)]),_:1},512)]),_:1},8,["modelValue","class"]))}});function Pe(t){const{props:n}=t,a=e.computed(()=>{var r;switch((r=n.size)==null?void 0:r.value){case"xs":return"h-5";case"sm":return"h-6";case"lg":return"h-10";case"xl":return"h-14";case"xxl":return"h-32";case"editable":return"h-60";case"base":default:return"h-8"}}),o=e.computed(()=>{var r;switch((r=n.size)==null?void 0:r.value){case"xs":return"w-5";case"sm":return"w-6";case"lg":return"w-10";case"xl":return"w-14";case"xxl":return"w-32";case"editable":return"w-60";case"base":default:return"w-8"}}),s=e.computed(()=>{var r;switch((r=n.size)==null?void 0:r.value){case"xs":return"text-tiny";case"sm":return"text-xs";case"lg":return"text-md";case"xl":return"text-2xl";case"xxl":return"text-3xl";case"editable":return"h1";case"base":default:return"text-sm"}}),l=e.computed(()=>{var r;switch((r=n.size)==null?void 0:r.value){case"xs":return"w-3 h-3";case"sm":return"w-3 h-3";case"lg":return"w-5 h-5";case"xl":return"w-8 h-8";case"xxl":return"w-10 h-10";case"editable":return"w-20 h-20";case"base":default:return"w-4 h-4"}}),c=e.computed(()=>`${o.value} ${a.value} ${s.value}`);return{heightClasses:a,widthClasses:o,sizeClasses:c,iconClasses:l}}const Nl={key:1,class:"flex h-full w-full select-none items-center justify-center"},Sl={key:2},re=e.defineComponent({__name:"Avatar",props:{user:{default:null},size:{default:"base"},hoverEffect:{type:Boolean,default:!1},active:{type:Boolean},noBorder:{type:Boolean},noBg:{type:Boolean}},setup(t){const n=t,{sizeClasses:a,iconClasses:o}=Pe({props:e.toRefs(n)}),s=e.computed(()=>{var m,f,i;if(!((m=n.user)!=null&&m.name.length))return;const u=n.user.name.split(" "),h=((f=u[0])==null?void 0:f[0])||"",p=((i=u[1])==null?void 0:i[0])||"";return n.size==="sm"||n.size==="xs"?h:h+p}),l=e.computed(()=>n.noBorder?"":"border-2 border-foundation"),c=e.computed(()=>n.noBg?"":"bg-primary"),d=e.computed(()=>n.hoverEffect?"hover:border-primary focus:border-primary active:scale-95":""),r=e.computed(()=>n.active?"border-primary":"");return(u,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["text-foreground-on-primary flex shrink-0 items-center justify-center overflow-hidden rounded-full font-semibold uppercase transition",e.unref(a),c.value,l.value,d.value,r.value])},[e.renderSlot(u.$slots,"default",{},()=>{var p;return[(p=t.user)!=null&&p.avatar?(e.openBlock(),e.createElementBlock("div",{key:0,class:"h-full w-full bg-cover bg-center bg-no-repeat",style:e.normalizeStyle({backgroundImage:`url('${t.user.avatar}')`})},null,4)):s.value?(e.openBlock(),e.createElementBlock("div",Nl,e.toDisplayString(s.value),1)):(e.openBlock(),e.createElementBlock("div",Sl,[e.createVNode(e.unref(T.UserCircleIcon),{class:e.normalizeClass(e.unref(o))},null,8,["class"])]))]}),e.renderSlot(u.$slots,"absolute-anchor")],2))}}),zl=e.defineComponent({__name:"AvatarGroup",props:{users:{default:()=>[]},overlap:{type:Boolean,default:!0},size:{default:"base"},maxCount:{default:void 0}},setup(t){const n=t,a=e.ref(null),o=e.ref(null),{hiddenItemCount:s}=Ce({elementToWatchForChanges:a,itemContainer:o,trackResize:!0,trackMutations:!0}),{heightClasses:l}=Pe({props:e.toRefs(n)}),c=e.computed(()=>n.maxCount?Math.max(n.users.length-n.maxCount,0):0),d=e.computed(()=>s.value+c.value),r=e.computed(()=>n.maxCount?n.users.slice(0,n.maxCount):n.users);return(u,h)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"elementToWatchForChanges",ref:a,class:e.normalizeClass(`flex ${t.overlap?"-space-x-2":""}`)},[e.createElementVNode("div",{ref_key:"itemContainer",ref:o,class:e.normalizeClass(`flex flex-wrap overflow-hidden ${t.overlap?"-space-x-2 ":""} ${e.unref(l)}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(p,m)=>(e.openBlock(),e.createBlock(re,{key:p.id||m,user:p,size:t.size},null,8,["user","size"]))),128))],2),d.value?(e.openBlock(),e.createBlock(re,{key:0,size:t.size},{default:e.withCtx(()=>[e.createTextVNode(" +"+e.toDisplayString(d.value),1)]),_:1},8,["size"])):e.createCommentVNode("",!0)],2))}}),_e=e.defineComponent({__name:"Icon",props:{loading:{type:Boolean,default:!0},size:{default:"base"}},setup(t){const n=t,a=e.computed(()=>{const o=["text-primary transition-all animate-spin"];switch(o.push(n.loading?"opacity-100":"opacity-0"),n.size){case"base":o.push("h-8 w-8");break;case"sm":o.push("h-5 w-5");break;case"lg":o.push("h-12 w-12");break}return o.join(" ")});return(o,s)=>(e.openBlock(),e.createBlock(e.unref(T.ArrowPathIcon),{class:e.normalizeClass(a.value)},null,8,["class"]))}}),Il={class:"flex flex-col items-center space-y-2"},Ll={key:1,class:"relative group"},Ml={class:"opacity-0 transition-all absolute group-hover:opacity-100 inset-0 flex items-end justify-center bottom-4"},Dl={key:2,class:"w-full text-center text-danger text-sm"},Tl=e.defineComponent({__name:"AvatarEditable",props:e.mergeModels({modelValue:null,placeholder:null,name:null,rules:null,validateOnMount:{type:Boolean},validateOnValueUpdate:{type:Boolean},disabled:{type:Boolean},size:null},{editMode:{type:Boolean,local:!0}}),emits:e.mergeModels(["save","update:modelValue"],["update:editMode"]),setup(t,{expose:n,emit:a}){const o=e.defineAsyncComponent({loader:()=>Promise.resolve().then(()=>require("./AvatarEditor-25bff065.cjs")),loadingComponent:_e,delay:100}),s=a,l=t,{value:c,errorMessage:d}=le.useField(l.name,l.rules,{validateOnMount:l.validateOnMount,validateOnValueUpdate:l.validateOnValueUpdate,initialValue:l.modelValue||void 0}),r=e.useModel(t,"editMode",{local:!0}),u=e.computed(()=>({avatar:c.value,name:l.placeholder})),h=f=>{c.value=f,s("save",f)};return n({open:()=>r.value=!0,close:()=>r.value=!1}),(f,i)=>(e.openBlock(),e.createElementBlock("div",Il,[r.value?(e.openBlock(),e.createBlock(e.unref(o),{key:0,user:u.value,disabled:t.disabled,size:t.size,onCancel:i[0]||(i[0]=b=>r.value=!1),onSave:h},null,8,["user","disabled","size"])):(e.openBlock(),e.createElementBlock("div",Ll,[e.createVNode(re,{user:u.value,size:t.size},null,8,["user","size"]),e.createElementVNode("div",Ml,[e.createVNode(F,{disabled:t.disabled,color:"secondary",onClick:i[1]||(i[1]=b=>r.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(" Change ")]),_:1},8,["disabled"])])])),e.unref(d)?(e.openBlock(),e.createElementBlock("div",Dl,e.toDisplayString(e.unref(d)),1)):e.createCommentVNode("",!0)]))}});class H extends Error{constructor(n,a){n||(n=new.target.defaultMessage),super(n,a)}}W(H,"defaultMessage","Unexpected error occurred");class je extends H{}W(je,"defaultMessage","An unexpected logic error occurred!");class Fe extends H{}W(Fe,"defaultMessage","Attempting to access an uninitialized resource");class Re extends H{}W(Re,"defaultMessage","getCurrentInstance() returned null. Method must be called at the top of a setup function");class Ue extends H{}W(Ue,"defaultMessage","Operation not supported in current (server or client) environment");var me=(t=>(t.AnyAudio="audio/*",t.AnyVideo="video/*",t.AnyImage="image/*",t))(me||{});function Ol(t,n){const a=B.intersection(Object.values(me),n);for(const l of a)switch(l){case"audio/*":if(t.type.startsWith("audio"))return!0;break;case"image/*":if(t.type.startsWith("image"))return!0;break;case"video/*":if(t.type.startsWith("video"))return!0;break}const o=B.difference(n,a),s=Al(t.name);if(!s)return new qe;for(const l of o)if(l.toLowerCase()===s.toLowerCase())return!0;return new We}function Al(t){const n=t.split(".").pop()||null;return n?`.${n}`:null}function Pl(t){return t.startsWith(".")||Object.values(me).includes(t)}function ye(t){const n=l=>parseFloat(l.toFixed(2)).toString();if(t<1024)return`${t}bytes`;const a=t/1024;if(a<1024)return`${n(a)}KB`;const o=a/1024;if(o<1024)return`${n(o)}MB`;const s=o/1024;return`${n(s)}GB`}function _l(t){const n={name:t.name,lastModified:t.lastModified,size:t.size,type:t.type};return X.md5(JSON.stringify(n))}class qe extends H{}W(qe,"defaultMessage","The selected file has a missing extension");class We extends H{}W(We,"defaultMessage","The selected file type is forbidden");var He=(t=>(t[t.Success=1]="Success",t[t.Failure=2]="Failure",t))(He||{});function jl(t){if(!t)return;const n=t.split(",").map(a=>Pl(a)?a:null).filter(a=>a!==null);return n.length?n:void 0}function Fl(t){const{disabled:n,accept:a,multiple:o,sizeLimit:s,countLimit:l}=t,c=e.computed(()=>jl(e.unref(a))),d=r=>{const u=[],h=c.value;for(const p of r){const m=_l(p),f=e.unref(o)?e.unref(l):1;if(!u.find(i=>i.id===m)){if(f&&u.length>=f)break;if(h){const i=Ol(p,h);if(i instanceof Error){u.push({file:p,id:m,error:i});continue}}if(p.size>e.unref(s)){u.push({file:p,id:m,error:new Ke(`The selected file's size (${ye(p.size)}) is too big (over ${ye(e.unref(s))})`)});continue}u.push({file:p,id:m,error:null})}}return u};return{buildUploadableFiles:r=>{if(!e.unref(n||!1))return d(r)}}}class Ke extends H{}W(Ke,"defaultMessage","The selected file's size is too large");const Rl=["accept","multiple"],Ul=e.defineComponent({__name:"Zone",props:{accept:null,multiple:{type:Boolean},sizeLimit:{default:1024*1024*100},countLimit:null,disabled:{type:Boolean}},emits:["files-selected"],setup(t,{expose:n,emit:a}){const o=a,s=t,l=e.ref(null),c=e.ref(null),{buildUploadableFiles:d}=Fl({sizeLimit:e.computed(()=>s.sizeLimit),countLimit:e.computed(()=>s.countLimit),accept:e.computed(()=>s.accept),multiple:e.computed(()=>s.multiple),disabled:e.computed(()=>s.disabled)}),r=m=>{const f=d(m);f!=null&&f.length&&o("files-selected",{files:f})},{isOverDropZone:u}=P.useDropZone(l,m=>{m!=null&&m.length&&r(m)}),h=()=>{const m=c.value;if(!m)return;const f=[...m.files||[]];m.value="",f.length&&r(f)},p=()=>{var m;(m=c.value)==null||m.click()};return n({triggerPicker:p}),(m,f)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"fileUploadZone",ref:l,class:"file-upload-zone"},[e.renderSlot(m.$slots,"default",{isDraggingFiles:e.unref(u),openFilePicker:p,activatorOn:{click:p}}),e.createElementVNode("input",{ref_key:"fileInput",ref:c,type:"file",class:"hidden",accept:t.accept,multiple:t.multiple,onClick:f[0]||(f[0]=e.withModifiers(()=>{},["stop"])),onChange:h},null,40,Rl)],512))}});exports.BaseError=H;exports.BlobUploadStatus=He;exports.CommonAlert=gl;exports.CommonAnimationInstructional=an;exports.CommonBadge=ue;exports.CommonLoadingBar=de;exports.CommonLoadingIcon=_e;exports.CommonStepsBullet=qt;exports.CommonStepsNumber=zt;exports.CommonTextLink=ze;exports.ComposableInvokedOutOfScopeError=Re;exports.FormButton=F;exports.FormCardButton=cn;exports.FormCheckbox=gn;exports.FormClipboardInput=$o;exports.FormFileUploadZone=Ul;exports.FormRadio=En;exports.FormSelectBadges=xo;exports.FormSelectBase=we;exports.FormSelectSourceApps=ko;exports.FormSwitch=wo;exports.FormTags=$l;exports.FormTextArea=Ln;exports.FormTextInput=Le;exports.GlobalToastRenderer=ct;exports.GridListToggleValue=G;exports.HorizontalDirection=ae;exports.InfiniteLoading=dl;exports.LayoutDialog=Ao;exports.LayoutDialogSection=_o;exports.LayoutDisclosure=Ro;exports.LayoutGridListToggle=Ho;exports.LayoutMenu=Xo;exports.LayoutPanel=pl;exports.LayoutTable=ll;exports.LayoutTabs=Jo;exports.LogicError=je;exports.ModifierKeys=te;exports.SourceAppBadge=De;exports.TailwindBreakpoints=ee;exports.ThrottleOrDebounce=Te;exports.ToastNotificationType=Y;exports.UninitializedResourceAccessError=Fe;exports.UniqueFileTypeSpecifier=me;exports.UnsupportedEnvironmentError=Ue;exports.UserAvatar=re;exports.UserAvatarEditable=Tl;exports.UserAvatarGroup=zl;exports.ValidationHelpers=Kn;exports.clientOs=se;exports.getKeyboardShortcutTitle=So;exports.keyboardClick=ke;exports.onKeyboardShortcut=zo;exports.prettyFileSize=ye;exports.useFormCheckboxModel=Io;exports.useFormSelectChildInternals=Be;exports.useOnBeforeWindowUnload=Ko;exports.useResponsiveHorizontalDirectionCalculation=Ae;exports.useWindowResizeHandler=Oe;exports.useWrappingContainerHiddenCount=Ce;exports.writableAsyncComputed=yl;
2
2
  //# sourceMappingURL=lib.cjs.map