@wisemen/vue-core-design-system 1.14.0 → 1.14.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/index.cjs CHANGED
@@ -269,7 +269,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
269
269
  border-transparent
270
270
  focus-visible:outline-fg-brand-primary
271
271
  data-interactive:hover:bg-fg-primary/5
272
- `}}}}),av=(0,f.defineComponent)({__name:`IconButtonIcon`,props:{icon:{}},setup(e){let t=e,{iconButtonStyle:n}=rv();return(e,r)=>t.icon===null?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(t.icon),{key:0,class:(0,f.normalizeClass)((0,f.unref)(n).icon())},null,8,[`class`]))}}),ov=[`type`,`form`,`aria-disabled`,`disabled`,`aria-busy`,`aria-label`,`data-interactive`],X=(0,f.defineComponent)({inheritAttrs:!1,__name:`IconButton`,props:{isLoading:{type:Boolean,default:!1},isTooltipDisabled:{type:Boolean,default:!1},form:{default:null},icon:{},label:{},size:{default:`md`},tooltipLabel:{default:null},type:{default:`button`},variant:{default:`primary`},isDisabled:{type:Boolean,default:!1},disabledReason:{default:null},keyboardShortcut:{default:null}},emits:[`click`],setup(e,{emit:t}){let n=e,r=t,i=(0,f.useAttrs)(),a=(0,f.computed)(()=>iv({isLoading:n.isLoading,class:i.class,size:n.size,variant:n.variant}));function o(e){if(n.isLoading){e.preventDefault();return}r(`click`,e)}let s=(0,f.computed)(()=>n.isDisabled&&n.disabledReason!==null?!1:n.isTooltipDisabled),c=(0,f.computed)(()=>n.isDisabled&&n.disabledReason!==null?n.disabledReason:n.tooltipLabel??n.label);return nv({iconButtonStyle:a}),(e,t)=>((0,f.openBlock)(),(0,f.createBlock)(W,{"is-disabled":s.value,label:c.value,"keyboard-shortcut":n.keyboardShortcut},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`button`,(0,f.mergeProps)((0,f.unref)(i),{type:n.type,form:n.form??void 0,"aria-disabled":n.isLoading,disabled:n.isDisabled,"aria-busy":n.isLoading,"aria-label":n.label,"data-interactive":!n.isDisabled&&!n.isLoading||void 0,class:a.value.root(),onClick:o}),[(0,f.createElementVNode)(`div`,{class:(0,f.normalizeClass)(a.value.container())},[(0,f.createVNode)(To,{class:(0,f.normalizeClass)(a.value.loader())},null,8,[`class`]),(0,f.createVNode)((0,f.unref)(I),{class:(0,f.normalizeClass)(a.value.rowLayout()),gap:`sm`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(av,{icon:n.icon},null,8,[`icon`])]),_:1},8,[`class`])],2)],16,ov)]),_:1},8,[`is-disabled`,`label`,`keyboard-shortcut`]))}}),sv=(0,f.defineComponent)({__name:`FormFieldGrid`,props:{lg:{},md:{},sm:{},variant:{default:`ghost`}},setup(e){let t=e,n=(0,f.computed)(()=>t.md??t.lg);return(e,r)=>((0,f.openBlock)(),(0,f.createElementBlock)(`div`,{class:(0,f.normalizeClass)([{"rounded-2xl bg-secondary p-2xl":t.variant===`card`},`@container/form-field-grid w-full`])},[(0,f.createElementVNode)(`div`,{class:(0,f.normalizeClass)([{"grid-cols-1":t.sm===1,"grid-cols-2":t.sm===2,"grid-cols-3":t.sm===3,"@md/form-field-grid:grid-cols-1":n.value===1,"@md/form-field-grid:grid-cols-2":n.value===2,"@md/form-field-grid:grid-cols-3":n.value===3,"@lg/form-field-grid:grid-cols-1":t.lg===1,"@lg/form-field-grid:grid-cols-2":t.lg===2,"@lg/form-field-grid:grid-cols-3":t.lg===3},`grid gap-lg`]),role:`group`},[(0,f.renderSlot)(e.$slots,`default`)],2)],2))}}),cv=(0,f.defineComponent)({__name:`FormFieldGroup`,setup(e){return(e,t)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(G),{class:`w-full`,gap:`xl`},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`)]),_:3}))}}),lv=(0,f.defineComponent)({__name:`FormFieldSeperator`,setup(e){return(e,t)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)($o),{class:`mx-auto w-full max-w-3xl`}))}}),uv={class:`text-sm font-medium text-primary`},dv={key:0,class:`mt-sm text-xs text-tertiary`},fv=(0,f.defineComponent)({__name:`FormFieldSet`,props:{title:{},isStacked:{type:Boolean,default:!1},description:{default:null},horizontalAlignment:{default:`start`},variant:{default:`ghost`}},setup(e){let t=e;return(e,n)=>((0,f.openBlock)(),(0,f.createElementBlock)(`div`,{class:(0,f.normalizeClass)([{"rounded-2xl bg-secondary p-2xl":t.variant===`card`},`@container/fieldset mx-auto w-full max-w-3xl`])},[(0,f.createElementVNode)(`section`,{class:(0,f.normalizeClass)([{"@xl/fieldset:grid-cols-[20rem_auto]":!t.isStacked},`grid gap-x-8xl gap-y-2xl`])},[(0,f.createElementVNode)(`header`,null,[(0,f.createVNode)((0,f.unref)(I),null,{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`h2`,uv,(0,f.toDisplayString)(t.title),1),t.isStacked?((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)($o),{key:0,class:`flex-1`})):(0,f.createCommentVNode)(``,!0)]),_:1}),t.description===null?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createElementBlock)(`p`,dv,(0,f.toDisplayString)(t.description),1))]),(0,f.createElementVNode)(`div`,{class:(0,f.normalizeClass)([{"items-start":t.horizontalAlignment===`start`,"items-end":t.horizontalAlignment===`end`},`ml-auto flex w-full flex-col overflow-hidden p-xxs`])},[(0,f.renderSlot)(e.$slots,`default`)],2)],2)],2))}}),pv=(0,f.defineComponent)({__name:`FormLayout`,setup(e){return(e,t)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(G),{gap:`2xl`,align:`stretch`},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`)]),_:3}))}}),[mv,hv]=F(`formContext`),[gv,_v]=F(`dialogContext`),vv=V({slots:{body:`
272
+ `}}}}),av=(0,f.defineComponent)({__name:`IconButtonIcon`,props:{icon:{}},setup(e){let t=e,{iconButtonStyle:n}=rv();return(e,r)=>t.icon===null?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(t.icon),{key:0,class:(0,f.normalizeClass)((0,f.unref)(n).icon())},null,8,[`class`]))}}),ov=[`type`,`form`,`aria-disabled`,`disabled`,`aria-busy`,`aria-label`,`data-interactive`],X=(0,f.defineComponent)({inheritAttrs:!1,__name:`IconButton`,props:{isLoading:{type:Boolean,default:!1},isTooltipDisabled:{type:Boolean,default:!1},form:{default:null},icon:{},label:{},size:{default:`md`},tooltipLabel:{default:null},type:{default:`button`},variant:{default:`primary`},isDisabled:{type:Boolean,default:!1},disabledReason:{default:null},keyboardShortcut:{default:null}},emits:[`click`],setup(e,{emit:t}){let n=e,r=t,i=(0,f.useAttrs)(),a=(0,f.computed)(()=>iv({isLoading:n.isLoading,class:i.class,size:n.size,variant:n.variant}));function o(e){if(n.isLoading){e.preventDefault();return}r(`click`,e)}let s=(0,f.computed)(()=>n.isDisabled&&n.disabledReason!==null?!1:n.isTooltipDisabled),c=(0,f.computed)(()=>n.isDisabled&&n.disabledReason!==null?n.disabledReason:n.tooltipLabel??n.label);return nv({iconButtonStyle:a}),(e,t)=>((0,f.openBlock)(),(0,f.createBlock)(W,{"is-disabled":s.value,label:c.value,"keyboard-shortcut":n.keyboardShortcut},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`button`,(0,f.mergeProps)((0,f.unref)(i),{type:n.type,form:n.form??void 0,"aria-disabled":n.isLoading,disabled:n.isDisabled,"aria-busy":n.isLoading,"aria-label":n.label,"data-interactive":!n.isDisabled&&!n.isLoading||void 0,class:a.value.root(),onClick:o}),[(0,f.createElementVNode)(`div`,{class:(0,f.normalizeClass)(a.value.container())},[(0,f.createVNode)(To,{class:(0,f.normalizeClass)(a.value.loader())},null,8,[`class`]),(0,f.createVNode)((0,f.unref)(I),{class:(0,f.normalizeClass)(a.value.rowLayout()),gap:`sm`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(av,{icon:n.icon},null,8,[`icon`])]),_:1},8,[`class`])],2)],16,ov)]),_:1},8,[`is-disabled`,`label`,`keyboard-shortcut`]))}}),sv=(0,f.defineComponent)({__name:`FormFieldGrid`,props:{lg:{},md:{},sm:{},variant:{default:`ghost`}},setup(e){let t=e,n=(0,f.computed)(()=>t.md??t.lg);return(e,r)=>((0,f.openBlock)(),(0,f.createElementBlock)(`div`,{class:(0,f.normalizeClass)([{"rounded-2xl bg-secondary p-2xl":t.variant===`card`},`@container/form-field-grid w-full`])},[(0,f.createElementVNode)(`div`,{class:(0,f.normalizeClass)([{"grid-cols-1":t.sm===1,"grid-cols-2":t.sm===2,"grid-cols-3":t.sm===3,"@md/form-field-grid:grid-cols-1":n.value===1,"@md/form-field-grid:grid-cols-2":n.value===2,"@md/form-field-grid:grid-cols-3":n.value===3,"@lg/form-field-grid:grid-cols-1":t.lg===1,"@lg/form-field-grid:grid-cols-2":t.lg===2,"@lg/form-field-grid:grid-cols-3":t.lg===3},`grid gap-lg`]),role:`group`},[(0,f.renderSlot)(e.$slots,`default`)],2)],2))}}),cv=(0,f.defineComponent)({__name:`FormFieldGroup`,setup(e){return(e,t)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(G),{class:`w-full`,gap:`xl`,align:`stretch`},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`)]),_:3}))}}),lv=(0,f.defineComponent)({__name:`FormFieldSeperator`,setup(e){return(e,t)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)($o),{class:`mx-auto w-full max-w-3xl`}))}}),uv={class:`text-sm font-medium text-primary`},dv={key:0,class:`mt-sm text-xs text-tertiary`},fv=(0,f.defineComponent)({__name:`FormFieldSet`,props:{title:{},isStacked:{type:Boolean,default:!1},description:{default:null},horizontalAlignment:{default:`start`},variant:{default:`ghost`}},setup(e){let t=e;return(e,n)=>((0,f.openBlock)(),(0,f.createElementBlock)(`div`,{class:(0,f.normalizeClass)([{"rounded-2xl bg-secondary p-2xl":t.variant===`card`},`@container/fieldset mx-auto w-full max-w-3xl`])},[(0,f.createElementVNode)(`section`,{class:(0,f.normalizeClass)([{"@xl/fieldset:grid-cols-[20rem_auto]":!t.isStacked},`grid gap-x-8xl gap-y-2xl`])},[(0,f.createElementVNode)(`header`,null,[(0,f.createVNode)((0,f.unref)(I),null,{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`h2`,uv,(0,f.toDisplayString)(t.title),1),t.isStacked?((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)($o),{key:0,class:`flex-1`})):(0,f.createCommentVNode)(``,!0)]),_:1}),t.description===null?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createElementBlock)(`p`,dv,(0,f.toDisplayString)(t.description),1))]),(0,f.createElementVNode)(`div`,{class:(0,f.normalizeClass)([{"items-start":t.horizontalAlignment===`start`,"items-end":t.horizontalAlignment===`end`},`ml-auto flex w-full flex-col overflow-hidden p-xxs`])},[(0,f.renderSlot)(e.$slots,`default`)],2)],2)],2))}}),pv=(0,f.defineComponent)({__name:`FormLayout`,setup(e){return(e,t)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(G),{gap:`2xl`,align:`stretch`},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`)]),_:3}))}}),[mv,hv]=F(`formContext`),[gv,_v]=F(`dialogContext`),vv=V({slots:{body:`
273
273
  flex-1 overflow-y-auto px-xl pt-xs pb-xl
274
274
  group-has-data-dialog-footer/dialog:pb-xs
275
275
  `,chin:`
@@ -522,7 +522,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
522
522
  Example: <ConfigProvider :address-autocomplete-adapter="myAdapter"><AddressAutocomplete ... /></ConfigProvider>`);let o=a.value,s=(0,f.ref)(!1),c=(0,f.ref)([]),l=(0,f.ref)(null),u=(0,f.computed)(()=>i.value===null?null:Os(i.value)),d=(0,f.computed)(()=>l.value??u.value),p=(0,f.computed)(()=>i.value===null?l.value===null?null:{placeId:l.value.placeId,bus:``,city:``,coordinates:{lat:null,lng:null},country:``,postalCode:l.value.secondaryText,street:l.value.mainText,streetNumber:``}:i.value),m=(0,f.computed)(()=>Cb(c.value));async function h(e){s.value=!0;try{c.value=await o.searchAddresses(e)}catch(e){r(`error`,e)}finally{s.value=!1}}async function g(e){if(e===null){i.value=null;return}try{l.value=e,i.value=await o.getAddressByPlaceId(e.placeId)}catch(e){r(`error`,e)}finally{l.value=null}}return(e,t)=>((0,f.openBlock)(),(0,f.createBlock)(Sb,{class:`max-w-full`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(_.AnimatePresence),{mode:`wait`},{default:(0,f.withCtx)(()=>[((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(_.Motion),{key:p.value===null?`autocomplete`:`card`,class:(0,f.normalizeClass)([n.class,`max-w-full`]),initial:{filter:`blur(4px)`,opacity:0},animate:{filter:`blur(0px)`,opacity:1},exit:{filter:`blur(4px)`,opacity:0},transition:{duration:.2}},{default:(0,f.withCtx)(()=>[p.value===null?((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(Nb),(0,f.mergeProps)({key:1},n,{"model-value":d.value,items:m.value,"is-loading":s.value,"display-fn":e=>(0,f.unref)(ks)(e),"search-mode":`remote`,onBlur:t[3]||=e=>r(`blur`),"onUpdate:search":h,"onUpdate:modelValue":g}),{"label-left":(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`label-left`)]),"label-right":(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`label-right`)]),left:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`left`)]),_:3},16,[`model-value`,`items`,`is-loading`,`display-fn`])):((0,f.openBlock)(),(0,f.createBlock)(xb,{key:0,address:p.value,"is-disabled":n.isDisabled,"is-loading":l.value!==null,"is-readonly":n.isReadonly,"onUpdate:modelValue":t[0]||=e=>i.value=e,onClear:t[1]||=e=>i.value=null,onError:t[2]||=e=>r(`error`,e)},null,8,[`address`,`is-disabled`,`is-loading`,`is-readonly`]))]),_:3},8,[`class`]))]),_:3})]),_:3}))}}),Fb={},Ib={class:`rounded-lg border border-secondary`};function Lb(e,t){return(0,f.openBlock)(),(0,f.createElementBlock)(`div`,Ib,[(0,f.renderSlot)(e.$slots,`default`)])}var Rb=H(Fb,[[`render`,Lb]]),zb={};function Bb(e,t){return(0,f.openBlock)(),(0,f.createBlock)(f.Transition,{mode:`out-in`,"enter-active-class":`transition-opacity duration-150 ease-in`,"enter-from-class":`opacity-0`,"enter-to-class":`opacity-100`,"leave-active-class":`transition-opacity duration-100 ease-out`,"leave-from-class":`opacity-100`,"leave-to-class":`opacity-0`,"appear-active-class":`transition-opacity duration-150 ease-in`,"appear-from-class":`opacity-0`,"appear-to-class":`opacity-100`},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`)]),_:3})}var Vb=H(zb,[[`render`,Bb]]),Hb=`14rem`,Ub=`3rem`,Wb=`0.5625rem`,Gb=`1rem`,Kb=`1.875rem`,qb=`1.875rem`,Jb=`0.1875rem`,Yb=`0.1875rem`,Xb=`1.875rem`,Zb=(0,f.ref)(!1),Qb=(0,f.ref)(Hb),$b=(0,f.ref)(`hidden`);function Q(){let e=(0,m.useBreakpoints)({xl:960}),t=(0,m.useLocalStorage)(`dashboard-sidebar-is-open`,!0),n=e.smaller(`xl`),r=(0,f.computed)({get:()=>n.value?Zb.value:t.value,set:e=>{n.value?Zb.value=e:($b.value===`minified`&&(Qb.value=e?Hb:Ub),t.value=e)}}),i=Wb,a=Gb,o=Kb,s=qb,c=Jb,l=Yb,u=Xb;function d(){n.value&&(Zb.value=!1)}function p(e){if($b.value=e,e===`minified`){Qb.value=r.value?Hb:Ub;return}Qb.value=Hb}return{isFloatingSidebar:n,isSidebarOpen:r,closeIfFloatingSidebar:d,collapsedVariant:$b,minifiedSidebarWidth:Ub,setCollapsedVariant:p,sidebarAvatarPadding:l,sidebarContainerPadding:i,sidebarIconCellSize:o,sidebarIconSize:a,sidebarLinkHeight:s,sidebarLogoHeight:u,sidebarLogoPadding:c,sidebarWidth:Qb}}var ex={class:`flex h-12 items-center justify-center`,type:`button`},tx={class:`flex w-full flex-col overflow-hidden`},nx=(0,f.defineComponent)({__name:`MainSidebarFooterAccountCard`,props:{name:{},actions:{},avatarUrl:{},email:{}},setup(e){let t=e,{isSidebarOpen:n,collapsedVariant:r,sidebarIconCellSize:i}=Q(),a=`${i} 1fr`;return(e,i)=>((0,f.openBlock)(),(0,f.createBlock)(xs,{actions:t.actions,"is-current-context-only":!0,"popover-side":`right`,"popover-align":`end`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(Z,null,{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`button`,ex,[(0,f.createVNode)((0,f.unref)(Rb),{class:(0,f.normalizeClass)([(0,f.unref)(r)===`minified`&&!(0,f.unref)(n)?`border-transparent`:`
523
523
  border-fg-primary/10 bg-fg-primary/3 p-md py-sm pl-xs
524
524
  hover:bg-fg-primary/4
525
- `,`grid w-full gap-xs overflow-hidden text-left duration-100`]),style:(0,f.normalizeStyle)({gridTemplateColumns:a})},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(I),{align:`center`,justify:`center`,class:`h-full`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(_o,{name:t.name??t.email,src:t.avatarUrl,"is-static-color":!0,size:`xs`},null,8,[`name`,`src`])]),_:1}),(0,f.createVNode)(Vb,null,{default:(0,f.withCtx)(()=>[(0,f.unref)(r)!==`minified`||(0,f.unref)(n)?((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(I),{key:0,justify:`between`,align:`center`,gap:`xxs`,class:`overflow-hidden`},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`div`,tx,[(0,f.createVNode)((0,f.unref)(U),{text:t.name??`-`,"is-tooltip-disabled":!0,class:`w-full text-xs font-semibold text-primary`},null,8,[`text`]),(0,f.createVNode)((0,f.unref)(U),{text:t.email,"is-tooltip-disabled":!0,class:`w-full text-xs text-tertiary`},null,8,[`text`])]),(0,f.createVNode)(G,{align:`start`,class:`h-full`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(an),{class:`mt-xxs size-4 shrink-0 text-quaternary`})]),_:1})]),_:1})):(0,f.createCommentVNode)(``,!0)]),_:1})]),_:1},8,[`class`,`style`])])]),_:1})]),_:1},8,[`actions`]))}}),rx={};function ix(e,t){return(0,f.openBlock)(),(0,f.createElementBlock)(`div`)}var ax=H(rx,[[`render`,ix]]),ox=(0,f.defineComponent)({__name:`MainSidebarGlobalSearch`,emits:[`click`],setup(e,{emit:t}){let n=t,r=(0,g.useI18n)();function i(){n(`click`)}return(e,t)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(X),{icon:(0,f.unref)(hr),label:(0,f.unref)(r).t(`components.sidebar.global_search.label`),variant:`tertiary`,onClick:i},null,8,[`icon`,`label`]))}}),sx=(0,f.defineComponent)({__name:`MainSidebarHeaderContainer`,setup(e){let{sidebarLogoHeight:t}=Q();return(e,n)=>((0,f.openBlock)(),(0,f.createElementBlock)(`div`,{style:(0,f.normalizeStyle)({height:(0,f.unref)(t)})},[(0,f.renderSlot)(e.$slots,`default`)],4))}}),cx=[`src`,`alt`],lx=(0,f.defineComponent)({__name:`Logo`,props:{alt:{},size:{},src:{}},setup(e){let t=e,n=(0,f.ref)(!1);return(e,r)=>n.value?((0,f.openBlock)(),(0,f.createElementBlock)(`div`,{key:0,class:(0,f.normalizeClass)([{"size-12 rounded-2xl":t.size===`lg`,"size-10 rounded-xl":t.size===`md`,"size-8 rounded-lg":t.size===`sm`,"size-6 rounded-md":t.size===`xs`,"size-5 rounded-sm":t.size===`xxs`,"size-3.5 rounded-xs":t.size===`3xs`},`shrink-0 bg-quaternary`])},null,2)):((0,f.openBlock)(),(0,f.createElementBlock)(`img`,{key:1,src:t.src,alt:t.alt,class:(0,f.normalizeClass)([{"size-12 rounded-2xl":t.size===`lg`,"size-10 rounded-xl":t.size===`md`,"size-8 rounded-lg":t.size===`sm`,"size-6 rounded-md":t.size===`xs`,"size-5 rounded-sm":t.size===`xxs`,"size-3.5 rounded-xs":t.size===`3xs`},`shrink-0 overflow-hidden from-black/20 to-white/10 object-contain dark:bg-primary-solid dark:bg-linear-to-b`]),onError:r[0]||=e=>n.value=!0},null,42,cx))}}),ux={key:0,class:`text-sm font-semibold text-secondary`},dx={key:0},fx=(0,f.defineComponent)({__name:`MainSidebarHeaderLogoWithText`,props:{name:{},url:{}},setup(e){let t=e,{isSidebarOpen:n,collapsedVariant:r,sidebarLogoPadding:i}=Q();return(e,a)=>((0,f.openBlock)(),(0,f.createBlock)(sx,null,{default:(0,f.withCtx)(()=>[(0,f.createVNode)(I,{justify:`between`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(I,{style:(0,f.normalizeStyle)({padding:(0,f.unref)(i)})},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(lx,{src:t.url,alt:`Logo`,size:`xs`},null,8,[`src`]),(0,f.createVNode)(Vb,null,{default:(0,f.withCtx)(()=>[(0,f.unref)(r)!==`minified`||(0,f.unref)(n)?((0,f.openBlock)(),(0,f.createElementBlock)(`span`,ux,(0,f.toDisplayString)(t.name),1)):(0,f.createCommentVNode)(``,!0)]),_:1})]),_:1},8,[`style`]),(0,f.createVNode)(Vb,null,{default:(0,f.withCtx)(()=>[(0,f.unref)(r)!==`minified`||(0,f.unref)(n)?((0,f.openBlock)(),(0,f.createElementBlock)(`div`,dx,[(0,f.renderSlot)(e.$slots,`right`)])):(0,f.createCommentVNode)(``,!0)]),_:3})]),_:3})]),_:3}))}}),px={class:`truncate text-xs text-secondary`},mx=(0,f.defineComponent)({__name:`MainSidebarHeaderReturnToApp`,props:{to:{}},setup(e){let t=e,n=(0,g.useI18n)(),{isSidebarOpen:r,closeIfFloatingSidebar:i,collapsedVariant:a,sidebarIconCellSize:o,sidebarIconSize:s}=Q(),c=`${o} 1fr`;return(e,l)=>((0,f.openBlock)(),(0,f.createBlock)(sx,null,{default:(0,f.withCtx)(()=>[(0,f.createVNode)(I,{class:`w-fit`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(W,{"keyboard-shortcut":{key:`Backspace`,mod:!0},label:(0,f.unref)(n).t(`components.sidebar.return_to_app`)},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(Z,null,{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(y.RouterLink),{to:t.to,style:(0,f.normalizeStyle)({height:(0,f.unref)(o),gridTemplateColumns:c}),"aria-label":(0,f.unref)(n).t(`components.sidebar.return_to_app`),class:`grid w-full rounded-md duration-100 hover:bg-secondary-hover`,onClick:l[0]||=e=>(0,f.unref)(i)()},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(I,{style:(0,f.normalizeStyle)({width:(0,f.unref)(o),height:(0,f.unref)(o)}),align:`center`,justify:`center`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(ln),{style:(0,f.normalizeStyle)({width:(0,f.unref)(s),height:(0,f.unref)(s)}),class:`shrink-0 text-secondary`},null,8,[`style`])]),_:1},8,[`style`]),(0,f.createVNode)(Vb,null,{default:(0,f.withCtx)(()=>[(0,f.unref)(a)!==`minified`||(0,f.unref)(r)?((0,f.openBlock)(),(0,f.createBlock)(I,{key:0,align:`center`,class:`overflow-hidden pr-md`},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`span`,px,(0,f.toDisplayString)((0,f.unref)(n).t(`components.sidebar.return_to_app`)),1)]),_:1})):(0,f.createCommentVNode)(``,!0)]),_:1})]),_:1},8,[`to`,`style`,`aria-label`])]),_:1})]),_:1},8,[`label`])]),_:1})]),_:1}))}}),hx={class:`w-full`},gx=(0,f.defineComponent)({__name:`MainSidebarNavigationGroup`,props:{label:{default:null}},setup(e){let t=e,{isSidebarOpen:n,collapsedVariant:r}=Q();return(e,i)=>((0,f.openBlock)(),(0,f.createElementBlock)(`div`,hx,[t.label===null?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createElementBlock)(`span`,{key:0,class:(0,f.normalizeClass)([{"opacity-0":(0,f.unref)(r)===`minified`&&!(0,f.unref)(n)},`block px-sm pb-sm text-xs font-medium whitespace-nowrap text-quaternary transition-opacity duration-150 ease-in-out`])},(0,f.toDisplayString)(t.label),3)),(0,f.createVNode)((0,f.unref)(G),{align:`start`,gap:`xs`},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`)]),_:3})]))}}),_x=(0,f.defineComponent)({__name:`MainSidebarNavigationGroups`,setup(e){return(e,t)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(G),{gap:`2xl`},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`)]),_:3}))}}),[vx,yx]=F(`MainSidebarNavigationLinkContextKey`),bx=(0,f.defineComponent)({__name:`MainSidebarNavigationLinkProvider`,props:{isActive:{type:Boolean}},setup(e){let t=e;return vx({isActive:(0,f.computed)(()=>t.isActive)}),(e,t)=>(0,f.renderSlot)(e.$slots,`default`)}}),xx=[`data-active`],Sx={class:`truncate text-xs font-medium whitespace-nowrap text-secondary duration-100 group-hover:text-primary group-data-active:text-brand-secondary`},Cx=(0,f.defineComponent)({__name:`MainSidebarNavigationLinkButton`,props:{isActive:{type:Function,default:()=>!1},isTooltipDisabled:{type:Boolean},icon:{},keyboardShortcut:{default:null},label:{},to:{}},emits:[`click`],setup(e,{emit:t}){let n=e,r=t,i=(0,y.useRoute)(),{isSidebarOpen:a,collapsedVariant:o,sidebarIconCellSize:s,sidebarIconSize:c,sidebarLinkHeight:l}=Q(),u=`${s} 1fr`;function d(){r(`click`)}return(t,r)=>((0,f.openBlock)(),(0,f.createBlock)(W,{"is-disabled":e.isTooltipDisabled,"keyboard-shortcut":n.keyboardShortcut,label:n.label,"popover-side":`right`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(Z,null,{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(y.RouterLink),{to:n.to,class:`w-full`,onClick:d},{default:(0,f.withCtx)(({isActive:e})=>[(0,f.createVNode)(bx,{"is-active":e},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`div`,{"data-active":e||n.isActive((0,f.unref)(i))||void 0,style:(0,f.normalizeStyle)({height:(0,f.unref)(l),gridTemplateColumns:u}),class:`group grid rounded-md duration-100 hover:bg-fg-primary/4 data-active:bg-fg-primary/4`},[(0,f.createVNode)(I,{style:(0,f.normalizeStyle)({width:(0,f.unref)(s),height:(0,f.unref)(s)}),align:`center`,justify:`center`},{default:(0,f.withCtx)(()=>[((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(n.icon),{style:(0,f.normalizeStyle)({width:(0,f.unref)(c),height:(0,f.unref)(c)}),class:`shrink-0 text-fg-quaternary duration-100 group-data-active:text-fg-brand-primary dark:group-data-active:text-fg-primary`},null,8,[`style`]))]),_:1},8,[`style`]),(0,f.createVNode)(Vb,null,{default:(0,f.withCtx)(()=>[(0,f.unref)(o)!==`minified`||(0,f.unref)(a)?((0,f.openBlock)(),(0,f.createBlock)(I,{key:0,align:`center`,justify:`between`,gap:`md`,class:`overflow-hidden pr-md`},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`span`,Sx,(0,f.toDisplayString)(n.label),1),(0,f.createVNode)(I,{gap:`lg`,align:`center`,class:`shrink-0`},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(t.$slots,`right`)]),_:3})]),_:3})):(0,f.createCommentVNode)(``,!0)]),_:3})],12,xx)]),_:2},1032,[`is-active`])]),_:3},8,[`to`])]),_:3})]),_:3},8,[`is-disabled`,`keyboard-shortcut`,`label`]))}}),wx=[`data-active`],Tx={class:`truncate text-xs whitespace-nowrap text-tertiary duration-100 group-hover:text-primary group-data-active:text-brand-secondary`},Ex=`1px`,Dx=`0.25rem`,Ox=(0,f.defineComponent)({__name:`MainSidebarNavigationSubItem`,props:{isIndented:{type:Boolean,default:!0},label:{},noIndent:{type:Boolean},to:{}},emits:[`click`],setup(e,{emit:t}){let n=e,r=t,i=(0,f.computed)(()=>n.noIndent===!0?!1:n.isIndented),{closeIfFloatingSidebar:a,sidebarIconCellSize:o}=Q(),s=`calc(${o} / 2 - ${Dx} - ${Ex})`;function c(){a(),r(`click`)}return(e,t)=>((0,f.openBlock)(),(0,f.createBlock)(Z,null,{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(y.RouterLink),{to:n.to,class:`w-full`,onClick:c},{default:(0,f.withCtx)(({isActive:e})=>[(0,f.createElementVNode)(`div`,{"data-active":e||void 0,style:(0,f.normalizeStyle)({paddingLeft:i.value?s:void 0,height:`1.5rem`}),class:(0,f.normalizeClass)([i.value?`pr-md`:`px-sm`,`group flex items-center rounded-md duration-100 hover:bg-fg-primary/4 data-active:bg-fg-primary/4`])},[(0,f.createElementVNode)(`span`,Tx,(0,f.toDisplayString)(n.label),1)],14,wx)]),_:1},8,[`to`])]),_:1}))}}),kx={class:`truncate text-xs font-medium whitespace-nowrap text-secondary duration-100 group-hover:text-primary`},Ax=(0,f.defineComponent)({__name:`MainSidebarNavigationLinkCollapsible`,props:{isSubItemsActive:{type:Boolean},isTooltipDisabled:{type:Boolean},icon:{},keyboardShortcut:{},label:{},subItems:{}},setup(e){let t=e,n=(0,f.ref)(!0),{isSidebarOpen:r,collapsedVariant:i,sidebarIconCellSize:a,sidebarIconSize:o,sidebarLinkHeight:s}=Q();(0,f.watch)(()=>t.isSubItemsActive,e=>{e&&(n.value=!0)});let c=`${a} 1fr`;return(l,u)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.CollapsibleRoot),{open:n.value,"onUpdate:open":u[1]||=e=>n.value=e,class:`w-full`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(W,{"is-disabled":e.isTooltipDisabled,"keyboard-shortcut":t.keyboardShortcut,label:t.label,"popover-side":`right`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(Z,null,{default:(0,f.withCtx)(()=>[(0,f.createVNode)(bx,{"is-active":e.isSubItemsActive},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`button`,{style:(0,f.normalizeStyle)({height:(0,f.unref)(s),gridTemplateColumns:c}),type:`button`,class:`group grid w-full rounded-md duration-100 hover:bg-fg-primary/4`,onClick:u[0]||=e=>n.value=!n.value},[(0,f.createVNode)(I,{style:(0,f.normalizeStyle)({width:(0,f.unref)(a),height:(0,f.unref)(a)}),align:`center`,justify:`center`},{default:(0,f.withCtx)(()=>[((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(t.icon),{style:(0,f.normalizeStyle)({width:(0,f.unref)(o),height:(0,f.unref)(o)}),class:`shrink-0 text-fg-quaternary duration-100`},null,8,[`style`]))]),_:1},8,[`style`]),(0,f.createVNode)(Vb,null,{default:(0,f.withCtx)(()=>[(0,f.unref)(i)!==`minified`||(0,f.unref)(r)?((0,f.openBlock)(),(0,f.createBlock)(I,{key:0,align:`center`,justify:`between`,gap:`md`,class:`overflow-hidden pr-md`},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`span`,kx,(0,f.toDisplayString)(t.label),1),(0,f.createVNode)((0,f.unref)(an),{class:(0,f.normalizeClass)([{"rotate-180":n.value},`size-3.5 shrink-0 text-fg-quaternary duration-150`])},null,8,[`class`])]),_:1})):(0,f.createCommentVNode)(``,!0)]),_:1})],4)]),_:1},8,[`is-active`])]),_:1})]),_:1},8,[`is-disabled`,`keyboard-shortcut`,`label`]),(0,f.createVNode)((0,f.unref)(h.CollapsibleContent),{class:`overflow-hidden data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down`},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`div`,{style:(0,f.normalizeStyle)({marginLeft:`calc(${(0,f.unref)(a)} / 2)`}),class:`mt-xs flex flex-col gap-xs border-l border-secondary pl-xs`},[((0,f.openBlock)(!0),(0,f.createElementBlock)(f.Fragment,null,(0,f.renderList)(t.subItems,e=>((0,f.openBlock)(),(0,f.createBlock)(Ox,{key:e.label,label:e.label,to:e.to},null,8,[`label`,`to`]))),128))],4)]),_:1})]),_:1},8,[`open`]))}}),jx=[`data-active`],Mx={class:`truncate text-xs font-medium whitespace-nowrap text-secondary duration-100 group-hover:text-primary group-data-active:text-brand-secondary`},Nx={class:`relative overflow-hidden rounded-md border border-secondary bg-primary shadow-lg`},Px={class:`flex min-w-36 flex-col gap-xs p-xs`},Fx=(0,f.defineComponent)({__name:`MainSidebarNavigationLinkPopover`,props:(0,f.mergeModels)({isSubItemsActive:{type:Boolean},icon:{},label:{},subItems:{}},{isPopoverOpen:{type:Boolean,default:!1},isPopoverOpenModifiers:{}}),emits:[`update:isPopoverOpen`],setup(e){let t=e,n=(0,f.useModel)(e,`isPopoverOpen`),{isSidebarOpen:r,collapsedVariant:i,sidebarIconCellSize:a,sidebarIconSize:o,sidebarLinkHeight:s}=Q(),c=`${a} 1fr`;function l(){n.value=!n.value}return(u,d)=>((0,f.openBlock)(),(0,f.createBlock)(bx,{"is-active":e.isSubItemsActive},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(h.HoverCardRoot),{open:n.value,"onUpdate:open":d[4]||=e=>n.value=e,"open-delay":150,"close-delay":150},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(h.HoverCardTrigger),{"as-child":!0},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(Z,null,{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`button`,{"data-active":e.isSubItemsActive||void 0,style:(0,f.normalizeStyle)({height:(0,f.unref)(s),gridTemplateColumns:c}),type:`button`,class:`group grid w-full rounded-md duration-100 hover:bg-fg-primary/4 data-active:bg-fg-primary/4`,onClick:d[0]||=e=>l(),onKeydown:[d[1]||=(0,f.withKeys)((0,f.withModifiers)(e=>l(),[`prevent`]),[`enter`]),d[2]||=(0,f.withKeys)((0,f.withModifiers)(e=>l(),[`prevent`]),[`space`])]},[(0,f.createVNode)(I,{style:(0,f.normalizeStyle)({width:(0,f.unref)(a),height:(0,f.unref)(a)}),align:`center`,justify:`center`},{default:(0,f.withCtx)(()=>[((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(t.icon),{style:(0,f.normalizeStyle)({width:(0,f.unref)(o),height:(0,f.unref)(o)}),class:`shrink-0 text-fg-quaternary duration-100 group-data-active:text-fg-brand-primary dark:group-data-active:text-fg-primary`},null,8,[`style`]))]),_:1},8,[`style`]),(0,f.createVNode)(Vb,null,{default:(0,f.withCtx)(()=>[(0,f.unref)(i)!==`minified`||(0,f.unref)(r)?((0,f.openBlock)(),(0,f.createBlock)(I,{key:0,align:`center`,justify:`between`,gap:`md`,class:`overflow-hidden pr-md`},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`span`,Mx,(0,f.toDisplayString)(t.label),1)]),_:1})):(0,f.createCommentVNode)(``,!0)]),_:1})],44,jx)]),_:1})]),_:1}),(0,f.createVNode)((0,f.unref)(h.HoverCardPortal),{to:`body`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(ei,{"as-child":!0},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(h.HoverCardContent),{"side-offset":4,align:`start`,"data-animation":`sidebar-hover-card`,side:`right`,"position-strategy":`absolute`,sticky:`always`,class:`z-50 origin-(--reka-hover-card-content-transform-origin) will-change-[transform,opacity]`},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`div`,Nx,[(0,f.createElementVNode)(`div`,Px,[((0,f.openBlock)(!0),(0,f.createElementBlock)(f.Fragment,null,(0,f.renderList)(t.subItems,e=>((0,f.openBlock)(),(0,f.createBlock)(Ox,{key:e.label,label:e.label,to:e.to,"is-indented":!1,onClick:d[3]||=e=>n.value=!1},null,8,[`label`,`to`]))),128))])])]),_:1})]),_:1})]),_:1})]),_:1},8,[`open`])]),_:1},8,[`is-active`]))}}),Ix=(0,f.defineComponent)({__name:`MainSidebarNavigationLink`,props:(0,f.mergeModels)({to:{},type:{default:`link`},isActive:{type:Function,default:()=>!1},icon:{},label:{},onClick:{},keyboardShortcut:{default:null},subItems:{}},{isPopoverOpen:{type:Boolean,default:!1},isPopoverOpenModifiers:{}}),emits:(0,f.mergeModels)([`click`],[`update:isPopoverOpen`]),setup(e,{emit:t}){let n=e,r=t,{isSidebarOpen:i,closeIfFloatingSidebar:a,collapsedVariant:o}=Q(),s=(0,y.useRoute)(),c=(0,y.useRouter)(),l=(0,f.computed)(()=>n.type===`sub-items`),u=(0,f.computed)(()=>v(n)?n:null),d=(0,f.computed)(()=>v(n)?null:n),p=(0,f.computed)(()=>l.value&&!i.value),m=(0,f.computed)(()=>n.isActive?.(s)?!0:u.value?.subItems.some(e=>{let t=c.resolve(e.to);return t.name!=null&&t.name===s.name?!0:t.path!==`/`&&s.path.startsWith(t.path)})??!1),h=(0,f.useModel)(e,`isPopoverOpen`),g=(0,f.computed)(()=>!!(p.value||o.value===`hidden`&&n.keyboardShortcut===null||o.value===`minified`&&i.value&&n.keyboardShortcut===null));function _(){a(),r(`click`)}function v(e){return e.type===`sub-items`}return(0,f.onMounted)(()=>{v(n)&&n.subItems!=null&&console.warn("[MainSidebarNavigationLink] Received `subItems` but `type` is missing or set to 'link'. Set `type: 'sub-items'` to render this item as an expandable group.")}),(e,t)=>p.value&&u.value!==null?((0,f.openBlock)(),(0,f.createBlock)(Fx,{key:0,"is-popover-open":h.value,"onUpdate:isPopoverOpen":t[0]||=e=>h.value=e,icon:n.icon,"is-sub-items-active":m.value,label:n.label,"sub-items":u.value.subItems},null,8,[`is-popover-open`,`icon`,`is-sub-items-active`,`label`,`sub-items`])):l.value&&u.value!==null?((0,f.openBlock)(),(0,f.createBlock)(Ax,{key:1,icon:n.icon,"is-sub-items-active":m.value,"is-tooltip-disabled":g.value,"keyboard-shortcut":n.keyboardShortcut,label:n.label,"sub-items":u.value.subItems},null,8,[`icon`,`is-sub-items-active`,`is-tooltip-disabled`,`keyboard-shortcut`,`label`,`sub-items`])):d.value===null?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createBlock)(Cx,{key:2,icon:n.icon,"is-active":n.isActive,"is-tooltip-disabled":g.value,"keyboard-shortcut":n.keyboardShortcut,label:n.label,to:d.value.to,onClick:_},{right:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`right`)]),_:3},8,[`icon`,`is-active`,`is-tooltip-disabled`,`keyboard-shortcut`,`label`,`to`]))}}),Lx=(0,f.defineComponent)({__name:`BadgeSeparator`,setup(e){let{variants:t}=ly();return(e,n)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)($o),{class:(0,f.normalizeClass)((0,f.unref)(t).separator()),orientation:`vertical`},null,8,[`class`]))}}),Rx=(0,f.defineComponent)({__name:`MainSidebarNavigationLinkBadge`,props:{label:{}},setup(e){let t=e,{isActive:n}=yx();return(e,r)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(gy),{label:t.label,color:(0,f.unref)(n)?`brand`:`gray`,size:`sm`},null,8,[`label`,`color`]))}}),zx={},Bx={class:`size-2 rounded-full bg-success-500`};function Vx(e,t){return(0,f.openBlock)(),(0,f.createElementBlock)(`div`,Bx)}var Hx=H(zx,[[`render`,Vx]]),[Ux,Wx]=F(`mainLayoutContext`);function Gx(){return Wx(null)??{isBrandedActive:(0,f.computed)(()=>!1),variant:(0,f.computed)(()=>`default`)}}var Kx={class:`flex h-full flex-col justify-between overflow-hidden text-primary`},qx=(0,f.defineComponent)({__name:`MainSidebarContent`,setup(e){let{sidebarContainerPadding:t}=Q();return(e,n)=>((0,f.openBlock)(),(0,f.createElementBlock)(`div`,Kx,[(0,f.createElementVNode)(`div`,{style:(0,f.normalizeStyle)({paddingLeft:(0,f.unref)(t),paddingRight:(0,f.unref)(t),paddingBottom:(0,f.unref)(t)})},[(0,f.renderSlot)(e.$slots,`header`)],4),(0,f.createElementVNode)(`nav`,{style:(0,f.normalizeStyle)({padding:(0,f.unref)(t)}),class:`flex h-full flex-col justify-between gap-2xl overflow-y-auto`},[(0,f.renderSlot)(e.$slots,`navigation`),(0,f.renderSlot)(e.$slots,`bottom-navigation`)],4),(0,f.createElementVNode)(`div`,{style:(0,f.normalizeStyle)({padding:(0,f.unref)(t)}),class:`flex flex-col gap-sm`},[(0,f.renderSlot)(e.$slots,`footer`)],4)]))}}),Jx=(0,f.defineComponent)({__name:`MainSidebarTransition`,setup(e){let t=np();return(e,n)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(_.Motion),{initial:{transform:`translateX(-100%)`},animate:{transform:`translateX(0%)`},exit:{transform:`translateX(-100%)`},transition:{duration:(0,f.unref)(t)?0:.3,type:`spring`,bounce:0}},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`)]),_:3},8,[`transition`]))}}),Yx=(0,f.defineComponent)({__name:`MainSidebar`,props:{collapsedVariant:{default:`hidden`}},setup(e){let t=e,{isFloatingSidebar:n,isSidebarOpen:r,setCollapsedVariant:i,sidebarWidth:a}=Q(),o=(0,g.useI18n)(),s=np(),{isBrandedActive:c}=Gx(),l=(0,f.computed)(()=>c.value?[`default`,`branded`]:null);return i(t.collapsedVariant),(t,i)=>(0,f.unref)(n)?((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.DialogRoot),{key:0,open:(0,f.unref)(r),"onUpdate:open":i[0]||=e=>(0,f.isRef)(r)?r.value=e:null},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(_.AnimatePresence),{initial:!1},{default:(0,f.withCtx)(()=>[(0,f.unref)(r)?((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.DialogContent),{key:0,"as-child":!0,"force-mount":!0},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(Jx,{class:`absolute z-6 h-full w-64 p-md outline-none`},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`div`,{class:(0,f.normalizeClass)([l.value,`size-full rounded-xl border border-secondary bg-secondary py-md shadow-lg/5`])},[(0,f.createVNode)((0,f.unref)(h.DialogTitle),{as:`h1`,class:`sr-only`},{default:(0,f.withCtx)(()=>[(0,f.createTextVNode)((0,f.toDisplayString)((0,f.unref)(o).t(`components.sidebar.title`)),1)]),_:1}),(0,f.createVNode)((0,f.unref)(h.DialogDescription),{class:`sr-only`,as:`p`},{default:(0,f.withCtx)(()=>[(0,f.createTextVNode)((0,f.toDisplayString)((0,f.unref)(o).t(`components.sidebar.description`)),1)]),_:1}),(0,f.createVNode)(qx,null,{header:(0,f.withCtx)(()=>[(0,f.renderSlot)(t.$slots,`header`)]),navigation:(0,f.withCtx)(()=>[(0,f.renderSlot)(t.$slots,`navigation`)]),"bottom-navigation":(0,f.withCtx)(()=>[(0,f.renderSlot)(t.$slots,`bottom-navigation`)]),footer:(0,f.withCtx)(()=>[(0,f.renderSlot)(t.$slots,`footer`)]),_:3})],2)]),_:3})]),_:3})):(0,f.createCommentVNode)(``,!0),(0,f.unref)(r)?((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.DialogOverlay),{key:1,"as-child":!0},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(_.Motion),{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:(0,f.unref)(s)?0:.3},class:`absolute inset-0 z-5 bg-black/10`},null,8,[`transition`])]),_:1})):(0,f.createCommentVNode)(``,!0)]),_:3})]),_:3},8,[`open`])):e.collapsedVariant===`hidden`?((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(_.AnimatePresence),{key:1,initial:!1},{default:(0,f.withCtx)(()=>[(0,f.unref)(r)?((0,f.openBlock)(),(0,f.createBlock)(Jx,{key:0,style:(0,f.normalizeStyle)({width:(0,f.unref)(a)}),class:`absolute h-full pt-md`},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`div`,{class:(0,f.normalizeClass)([l.value,`size-full`])},[(0,f.createVNode)(qx,null,{header:(0,f.withCtx)(()=>[(0,f.renderSlot)(t.$slots,`header`)]),navigation:(0,f.withCtx)(()=>[(0,f.renderSlot)(t.$slots,`navigation`)]),"bottom-navigation":(0,f.withCtx)(()=>[(0,f.renderSlot)(t.$slots,`bottom-navigation`)]),footer:(0,f.withCtx)(()=>[(0,f.renderSlot)(t.$slots,`footer`)]),_:3})],2)]),_:3},8,[`style`])):(0,f.createCommentVNode)(``,!0)]),_:3})):((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(_.Motion),{key:2,initial:!1,animate:{width:(0,f.unref)(a)},transition:{duration:(0,f.unref)(s)?0:.3,type:`spring`,bounce:0},style:(0,f.normalizeStyle)({width:(0,f.unref)(a)}),class:`absolute z-1 h-full overflow-hidden pt-[0.475rem]`},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`div`,{class:(0,f.normalizeClass)([l.value,`size-full`])},[(0,f.createVNode)(qx,null,{header:(0,f.withCtx)(()=>[(0,f.renderSlot)(t.$slots,`header`)]),navigation:(0,f.withCtx)(()=>[(0,f.renderSlot)(t.$slots,`navigation`)]),"bottom-navigation":(0,f.withCtx)(()=>[(0,f.renderSlot)(t.$slots,`bottom-navigation`)]),footer:(0,f.withCtx)(()=>[(0,f.renderSlot)(t.$slots,`footer`)]),_:3})],2)]),_:3},8,[`animate`,`transition`,`style`]))}}),Xx=(0,f.defineComponent)({__name:`TextShimmer`,setup(e){return(e,t)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.Primitive),{"as-child":!0,class:`animate-shimmer bg-[linear-gradient(110deg,var(--text-disabled)_40%,var(--text-primary)_50%,var(--text-disabled)_60%)] bg-size-[300%_100%] bg-clip-text! text-transparent dark:bg-[linear-gradient(110deg,var(--text-disabled)_40%,var(--text-primary)_50%,var(--text-disabled)_60%)]`},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`)]),_:3}))}}),Zx={class:`size-full p-md pl-none`},Qx={class:`size-full rounded-2xl border border-secondary bg-primary shadow-sm/5`},$x={class:`text-sm font-medium`},eS=(0,f.defineComponent)({__name:`ApplicationLoadingView`,props:{isFetchingAuthUser:{type:Boolean}},setup(e){let t=e,n=(0,g.useI18n)(),r=(0,y.useRouter)(),{isFloatingSidebar:i,isSidebarOpen:a,sidebarWidth:o}=Q(),s=(0,f.ref)(!0),c=(0,f.ref)(!1),l=np();r.isReady().then(()=>{s.value=!1});let u=(0,f.computed)(()=>t.isFetchingAuthUser||s.value);return setTimeout(()=>{c.value=!0},500),(e,t)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(_.AnimatePresence),null,{default:(0,f.withCtx)(()=>[u.value?((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(_.Motion),{key:0,exit:{opacity:0},transition:{duration:(0,f.unref)(l)?0:.2},style:(0,f.normalizeStyle)({paddingLeft:(0,f.unref)(a)&&!(0,f.unref)(i)?(0,f.unref)(o):`0.5rem`}),class:`absolute inset-0 z-99 size-full bg-secondary`},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`div`,Zx,[(0,f.createElementVNode)(`div`,Qx,[c.value?((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(G),{key:0,class:`size-full`,align:`center`,justify:`center`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(Xx),null,{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`h1`,$x,(0,f.toDisplayString)((0,f.unref)(n).t(`component.dashboard_page_loading_state.loading`)),1)]),_:1})]),_:1})):(0,f.createCommentVNode)(``,!0)])])]),_:1},8,[`transition`,`style`])):(0,f.createCommentVNode)(``,!0)]),_:1}))}}),tS={class:`rounded-2xl border border-secondary bg-secondary px-lg py-sm shadow-lg duration-200 ease-in-out group-hover:translate-y-0.5 group-hover:scale-102`},nS={class:`grid grid-cols-[auto_auto] items-center gap-x-md gap-y-none`},rS={class:`flex`},iS=(0,f.defineComponent)({__name:`ApplicationOfflineWarning`,setup(e){let t=(0,g.useI18n)(),{isOnline:n}=(0,m.useNetwork)(),r=(0,f.ref)(!1),i=(0,f.computed)(()=>!n.value);function a(){r.value=!0}(0,f.watch)(i,e=>{e&&(r.value=!1)});let o=np();return(e,n)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(_.AnimatePresence),null,{default:(0,f.withCtx)(()=>[i.value&&!r.value?((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(_.Motion),{key:0,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},exit:{opacity:0,y:-40},"as-child":!0,transition:{type:`spring`,bounce:0,duration:(0,f.unref)(o)?0:.3},"while-hover":`hovered`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(Z),null,{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`button`,{class:`group absolute top-4 left-1/2 z-10 -translate-x-1/2`,onClick:a},[(0,f.createElementVNode)(`div`,tS,[(0,f.createElementVNode)(`div`,nS,[(0,f.createVNode)((0,f.unref)(Fr),{class:`size-3 text-tertiary`}),(0,f.createVNode)((0,f.unref)(U),{text:(0,f.unref)(t).t(`component.offline_warning.title`),class:`text-xs text-primary`},null,8,[`text`]),n[0]||=(0,f.createElementVNode)(`span`,null,null,-1),(0,f.createVNode)((0,f.unref)(_.Motion),{variants:{hovered:{height:`auto`,opacity:1,y:0}},initial:{height:`0px`,y:-8,opacity:0},transition:{type:`spring`,bounce:0,duration:.3},class:`will-change-transform`},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`div`,rS,[(0,f.createVNode)((0,f.unref)(U),{text:(0,f.unref)(t).t(`component.offline_warning.dismiss`),class:`text-xs text-disabled`},null,8,[`text`])])]),_:1})])])])]),_:1})]),_:1},8,[`transition`])):(0,f.createCommentVNode)(``,!0)]),_:1}))}}),aS={href:`#main-content`,class:`absolute top-2 left-2 z-99 rounded-sm bg-primary p-xs text-sm text-primary not-focus-visible:sr-only`},oS=(0,f.defineComponent)({__name:`ApplicationSkipToMainContent`,setup(e){let t=(0,g.useI18n)();return(e,n)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(Z),null,{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`a`,aS,(0,f.toDisplayString)((0,f.unref)(t).t(`component.skip_to_main_content_link.label`)),1)]),_:1}))}}),sS={class:`flex items-center gap-x-xs`},cS={key:0,class:`flex items-center gap-x-xs text-disabled`},lS={class:`text-secondary`},uS={key:2,class:`text-disabled`},dS=(0,f.defineComponent)({__name:`CommandMenuActionItem`,props:{action:{},ctx:{}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,i=(0,f.computed)(()=>(0,p.resolveActionBreadcrumbs)(n.action,n.ctx)),a=(0,f.computed)(()=>i.value.length===0?null:n.action.icon===void 0?i.value[0]?.icon??null:n.action.icon(n.ctx));return(t,n)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.ListboxItem),{value:e.action.id,"data-id":e.action.id,class:`flex cursor-default items-center justify-between rounded-md px-lg py-md text-xs`,"data-item":``,onSelect:n[0]||=e=>r(`select`)},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`div`,sS,[i.value.length>0?((0,f.openBlock)(),(0,f.createElementBlock)(`span`,cS,[((0,f.openBlock)(!0),(0,f.createElementBlock)(f.Fragment,null,(0,f.renderList)(i.value,(e,t)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(I),{key:t,gap:`xs`},{default:(0,f.withCtx)(()=>[a.value!==null&&t===0?((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(a.value),{key:0,class:`size-3.5 text-tertiary`})):(0,f.createCommentVNode)(``,!0),(0,f.createElementVNode)(`span`,null,(0,f.toDisplayString)(e.label),1),(0,f.createVNode)((0,f.unref)(pn),{class:`size-3 text-tertiary`})]),_:2},1024))),128))])):(0,f.createCommentVNode)(``,!0),(0,f.createVNode)((0,f.unref)(I),{gap:`sm`},{default:(0,f.withCtx)(()=>[(0,f.unref)(p.resolveActionAvatar)(e.action,e.ctx)===null?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(_o),(0,f.mergeProps)({key:0},(0,f.unref)(p.resolveActionAvatar)(e.action,e.ctx),{size:`xxs`}),null,16)),e.action.icon!==void 0&&i.value.length===0?((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(e.action.icon(e.ctx)),{key:1,class:`size-3.5 text-secondary`})):(0,f.createCommentVNode)(``,!0),(0,f.createElementVNode)(`span`,lS,(0,f.toDisplayString)((0,f.unref)(p.resolveActionName)(e.action,e.ctx)),1),(0,f.unref)(p.resolveActionHint)(e.action,e.ctx)?((0,f.openBlock)(),(0,f.createElementBlock)(`span`,uS,(0,f.toDisplayString)((0,f.unref)(p.resolveActionHint)(e.action,e.ctx)),1)):(0,f.createCommentVNode)(``,!0)]),_:1})]),(0,f.unref)(p.resolveActionSelected)(e.action,e.ctx)?((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(en),{key:0,class:`size-3 text-primary`})):(0,f.createCommentVNode)(``,!0),e.action.keyboardShortcut===void 0?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(di),{key:1,"keyboard-shortcut":e.action.keyboardShortcut},null,8,[`keyboard-shortcut`]))]),_:1},8,[`value`,`data-id`]))}}),fS={class:`p-lg`,role:`status`,"aria-live":`polite`},pS={class:`sr-only`},mS=(0,f.defineComponent)({__name:`CommandMenuLoadingSkeleton`,setup(e){let t=(0,g.useI18n)();return(e,n)=>((0,f.openBlock)(),(0,f.createElementBlock)(`div`,fS,[(0,f.createElementVNode)(`span`,pS,(0,f.toDisplayString)((0,f.unref)(t).t(`component.command_menu.loading_actions`)),1),(0,f.createVNode)((0,f.unref)(G),{gap:`4xl`},{default:(0,f.withCtx)(()=>[((0,f.openBlock)(),(0,f.createElementBlock)(f.Fragment,null,(0,f.renderList)(2,e=>(0,f.createElementVNode)(`div`,{key:e},[(0,f.createVNode)((0,f.unref)(K),{class:`h-2 w-20`}),(0,f.createVNode)((0,f.unref)(G),{class:`mt-xl`,gap:`lg`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(K),{class:`h-3 w-40`}),(0,f.createVNode)((0,f.unref)(K),{class:`h-3 w-24`}),(0,f.createVNode)((0,f.unref)(K),{class:`h-3 w-48`}),(0,f.createVNode)((0,f.unref)(K),{class:`h-3 w-40`})]),_:1})])),64))]),_:1})]))}}),hS={class:`relative flex items-center border-b border-secondary`},gS={class:`text-xxs text-tertiary`},_S={class:`text-xxs text-disabled`},vS={key:0,class:`h-full border-l border-secondary p-xl`},yS=H((0,f.defineComponent)({__name:`CommandMenu`,props:(0,f.mergeModels)({action:{}},{isOpen:{type:Boolean,default:!1},isOpenModifiers:{}}),emits:(0,f.mergeModels)([`afterLeave`,`close`],[`update:isOpen`]),setup(e,{emit:t}){let n=e,r=t,i=(0,f.useModel)(e,`isOpen`),a=(0,p.useActionManagerStore)(),o=(0,p.useActionRegistryStore)().allActions(),s=a.focusedModels,c=(0,g.useI18n)(),l=(0,f.useTemplateRef)(`listboxRoot`),u=(0,f.useTemplateRef)(`listboxContent`),d=vt(`Shift`),m=(0,f.ref)([]),_=(0,f.ref)(``),{isLoadingActions:v,buildContext:y,refreshActions:b,resolvedActions:x,subActionsMetaMap:S}=(0,p.useCommandMenuActions)({actionsSnapshot:o,focusedModelsSnapshot:s,listboxContentRef:u,listboxRootRef:l,manager:a,navStack:m,searchInput:_}),{highlightedActionId:C,activateAction:w,breadcrumbs:T,currentParent:E,placeholder:ee,preview:D,onKeyDown:te}=(0,p.useCommandMenuNavigation)({isShiftKeyHeld:d,buildContext:y,emit:r,listboxRootRef:l,manager:a,navStack:m,refreshActions:b,resolvedActions:x,scrollToTopOfGroup:re,searchInput:_,subActionsMetaMap:S}),{hasNavigated:O,isBouncing:ne}=(0,p.useCommandMenuAnimation)(i,()=>m.value.length),k=(0,f.computed)(()=>(0,p.buildCommandMenuGroups)(x.value,y()));n.action!==void 0&&w(n.action),b();function re(){let e=l.value?.highlightedElement?.getAttribute(`data-id`)??null;if(e===null)return;let t=u.value?.$el;if(t===void 0)return;let n=t.querySelector(`[data-id="${CSS.escape(e)}"]`);if(n===null)return;let r=t.getBoundingClientRect(),i=n.closest(`[role="group"]`);if(i===null||i.querySelector(`[data-id]`)!==n)return;let a=i.getBoundingClientRect().top-r.top+t.scrollTop;a<t.scrollTop&&t.scrollTo({behavior:`instant`,top:a})}function A(e){e||r(`close`)}return(e,t)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.DialogRoot),{open:i.value,"onUpdate:open":[t[3]||=e=>i.value=e,A]},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(h.DialogContent),{class:(0,f.normalizeClass)([{bouncing:(0,f.unref)(ne),navigated:(0,f.unref)(O)},`absolute top-28 left-1/2 z-99 w-full max-w-180 -translate-x-1/2 rounded-xl border border-transparent bg-primary shadow-lg duration-200 outline-none dark:border-secondary`]),"data-command-menu":``,onAfterLeave:t[2]||=e=>r(`afterLeave`)},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(h.DialogTitle),{class:`sr-only`},{default:(0,f.withCtx)(()=>[(0,f.createTextVNode)((0,f.toDisplayString)((0,f.unref)(c).t(`component.command_menu.title`)),1)]),_:1}),(0,f.createVNode)((0,f.unref)(h.DialogDescription),{class:`sr-only`},{default:(0,f.withCtx)(()=>[(0,f.createTextVNode)((0,f.toDisplayString)((0,f.unref)(c).t(`component.command_menu.title`)),1)]),_:1}),(0,f.createVNode)((0,f.unref)(h.ListboxRoot),{ref:`listboxRoot`,"highlight-on-hover":!0,class:`flex flex-col overflow-hidden`,onHighlight:t[1]||=e=>C.value=e?.value??null},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`div`,hS,[(0,f.unref)(T).length>0&&(0,f.unref)(E)?.forceAsRootMenu!==!0?((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(I),{key:0,as:`ul`,gap:`xs`,class:`-mr-sm pl-lg`},{default:(0,f.withCtx)(()=>[((0,f.openBlock)(!0),(0,f.createElementBlock)(f.Fragment,null,(0,f.renderList)((0,f.unref)(T),(e,t)=>((0,f.openBlock)(),(0,f.createElementBlock)(f.Fragment,{key:t},[(0,f.createVNode)((0,f.unref)(gy),{label:e,size:`sm`},null,8,[`label`]),t===(0,f.unref)(T).length-1?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(pn),{key:0,class:`size-3 text-tertiary`}))],64))),128))]),_:1})):(0,f.createCommentVNode)(``,!0),(0,f.createVNode)((0,f.unref)(h.ListboxFilter),{modelValue:_.value,"onUpdate:modelValue":t[0]||=e=>_.value=e,placeholder:(0,f.unref)(ee),class:`block w-full p-lg text-xs text-secondary outline-none`,onKeydown:(0,f.unref)(te)},null,8,[`modelValue`,`placeholder`,`onKeydown`])]),(0,f.createElementVNode)(`div`,{class:(0,f.normalizeClass)([{"grid-cols-2":(0,f.unref)(D)!==null},`grid`])},[((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.ListboxContent),{key:(0,f.unref)(x).map(e=>e.id).join(``),ref:`listboxContent`,class:`max-h-96 scroll-p-1 overflow-y-auto outline-none select-none`,"data-content":``},{default:(0,f.withCtx)(()=>[(0,f.unref)(x).length>0?((0,f.openBlock)(!0),(0,f.createElementBlock)(f.Fragment,{key:0},(0,f.renderList)(k.value,e=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.ListboxGroup),{key:e.key,class:`p-xs`},{default:(0,f.withCtx)(()=>[e.label!==null&&(e.showIfOnlyGroup||(0,f.unref)(E)===null||k.value.length>1)?((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.ListboxGroupLabel),{key:0,class:`px-md py-xs`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(I),{gap:`xs`},{default:(0,f.withCtx)(()=>[e.icon===null?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(e.icon),{key:0,class:`size-3 text-disabled`})),e.category===null?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createElementBlock)(f.Fragment,{key:1},[(0,f.createElementVNode)(`span`,gS,(0,f.toDisplayString)(e.category),1),t[4]||=(0,f.createElementVNode)(`span`,{class:`text-xxs text-tertiary`},`•`,-1)],64)),(0,f.createElementVNode)(`span`,_S,(0,f.toDisplayString)(e.label),1)]),_:2},1024)]),_:2},1024)):(0,f.createCommentVNode)(``,!0),((0,f.openBlock)(!0),(0,f.createElementBlock)(f.Fragment,null,(0,f.renderList)(e.items,e=>((0,f.openBlock)(),(0,f.createBlock)(dS,{key:e.id,action:e,ctx:(0,f.unref)(y)(),onSelect:t=>(0,f.unref)(w)(e)},null,8,[`action`,`ctx`,`onSelect`]))),128))]),_:2},1024))),128)):(0,f.unref)(v)?((0,f.openBlock)(),(0,f.createBlock)(mS,{key:1})):((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(U),{key:2,text:(0,f.unref)(c).t(`component.command_menu.no_results`,{query:_.value}),class:`flex p-lg text-xs text-tertiary`},null,8,[`text`]))]),_:1})),(0,f.unref)(D)===null?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createElementBlock)(`div`,vS,[((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)((0,f.unref)(D))))]))],2)]),_:1},512)]),_:1},8,[`class`]),(0,f.createVNode)((0,f.unref)(h.DialogOverlay),{class:`absolute inset-0 z-39 bg-black/5 dark:bg-black/20`,"data-overlay":``})]),_:1},8,[`open`]))}}),[[`__scopeId`,`data-v-d2f841e7`]]);function bS(){let e=(0,g.useI18n)(),t=Cv(),n=t.create(yS);return(0,p.createAction)({id:`command-menu`,isApplicable:e=>e.menuType===void 0,name:()=>e.t(`action.global.open_command_menu.name`),availableWhenUnauthenticated:!0,execute:()=>{t.isOpen(n.id)?n.close():n.open()},keyboardShortcut:{key:`K`,mod:!0,runWithInputFocus:!0}})}var xS=(0,f.defineComponent)({__name:`DialogBody`,setup(e){let{bodyRef:t,style:n}=_v();function r(e){t.value=e??null}return(0,f.onBeforeUnmount)(()=>{t.value=null}),(e,t)=>((0,f.openBlock)(),(0,f.createElementBlock)(`div`,{ref:r,class:(0,f.normalizeClass)((0,f.unref)(n).body()),"data-dialog-body":``},[(0,f.renderSlot)(e.$slots,`default`)],2))}});function SS(){let e=(0,f.shallowRef)(null);function t(t){e.value=t}function n(){e.value=null}return{chin:e,close:n,open:t}}var CS=(0,f.defineComponent)({__name:`DialogContainer`,setup(e){let{close:t,overlays:n,unmount:r}=Cv();function i(e,n){t(e,n)}function a(e){r(e)}return(e,t)=>((0,f.openBlock)(!0),(0,f.createElementBlock)(f.Fragment,null,(0,f.renderList)((0,f.unref)(n),e=>((0,f.openBlock)(),(0,f.createElementBlock)(f.Fragment,{key:e.id},[e.isMounted?((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(e.component),(0,f.mergeProps)({key:0,ref_for:!0},e.props,{"is-open":e.isOpen,"onUpdate:isOpen":t=>e.isOpen=t,onClose:t=>i(e.id,t),onAfterLeave:t=>a(e.id)}),null,16,[`is-open`,`onUpdate:isOpen`,`onClose`,`onAfterLeave`])):(0,f.createCommentVNode)(``,!0)],64))),128))}}),wS=(0,f.defineComponent)({__name:`DialogFooterSecondary`,props:{isAutoFocusDisabled:{type:Boolean},isDestructive:{type:Boolean},disableAutoFocus:{type:Boolean},disabledReason:{default:null},form:{default:null},iconLeft:{default:null},iconRight:{default:null},isDisabled:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1},label:{},type:{default:`button`}},emits:[`click`],setup(e,{emit:t}){let n=e,r=t;return(e,t)=>((0,f.openBlock)(),(0,f.createBlock)(Y,(0,f.mergeProps)(n,{variant:`secondary`,onClick:t[0]||=e=>r(`click`)}),null,16))}}),TS=(0,f.defineComponent)({__name:`DialogFooterSubmit`,props:{isDestructive:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},label:{}},setup(e){let t=e,{form:n}=hv();return ut(`Mod+Enter`,()=>{n.submit()}),(e,r)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(Y),{label:t.label,"is-loading":(0,f.unref)(n).isSubmitting.value,"is-disabled":t.isDisabled,"keyboard-shortcut":{key:`Enter`,mod:!0},variant:t.isDestructive?`destructive-primary`:`primary`,onClick:(0,f.unref)(n).submit},null,8,[`label`,`is-loading`,`is-disabled`,`variant`,`onClick`]))}});function ES(e){let t=Cv();return{triggerProps:(0,f.computed)(()=>{let n=t.overlays.find(t=>t.id===e)?.isOpen??!1;return{"aria-expanded":n,"aria-haspopup":`dialog`,"data-state":n?`open`:`closed`}})}}var[DS,OS]=F(`formDialogContext`),kS=(0,f.defineComponent)({__name:`FormDialog`,props:(0,f.mergeModels)({hasOwnFormComponent:{type:Boolean,default:!1},isUnsavedChangesPromptEnabled:{type:Boolean,default:!0},form:{},promptOnUnsavedChanges:{type:Boolean,default:!0},renderOwnFormComponent:{type:Boolean,default:!1},unsavedChangesText:{default:null},hasCloseButton:{type:Boolean,default:!0},isClickOutsideDisabled:{type:Boolean,default:!1},isEscDisabled:{type:Boolean,default:!1},chin:{},preventClickOutside:{type:Boolean},preventEsc:{type:Boolean},showCloseButton:{type:Boolean},size:{default:`md`}},{isOpen:{type:Boolean,default:!1},isOpenModifiers:{}}),emits:(0,f.mergeModels)([`close`],[`update:isOpen`]),setup(e,{emit:t}){let n=e,r=t,i=(0,g.useI18n)(),a=(0,f.useModel)(e,`isOpen`),o=(0,f.useId)(),s=SS(),c=0;DS({formId:o,form:n.form});let l=(0,f.computed)(()=>s.chin.value??n.chin??null),u=(0,f.computed)(()=>n.promptOnUnsavedChanges===!0?n.isUnsavedChangesPromptEnabled:!1),d=(0,f.computed)(()=>n.hasOwnFormComponent||n.renderOwnFormComponent),p=(0,f.computed)({get:()=>a.value,set:e=>{if(e){a.value=!0;return}if(u.value&&n.form.isDirty.value){v();return}m(),a.value=!1,r(`close`)}});function m(){s.close()}function h(){return c+=1,c}function _(e){return{icon:Et,primaryAction:{action:()=>{m(),a.value=!1,r(`close`)},label:i.t(`component.unsaved_changes_dialog.confirm`),type:`button`,variant:`destructive`},pulseKey:e,secondaryAction:{action:m,label:i.t(`component.unsaved_changes_dialog.cancel`),type:`button`,variant:`default`},text:n.unsavedChangesText??i.t(`component.form_dialog.unsaved_changes`),variant:`error`}}function v(){if(s.chin.value!==null){s.open(_(h()));return}s.open(_())}function y(e){if(!(n.isEscDisabled||!u.value||!n.form.isDirty.value)){if(e.preventDefault(),s.chin.value!==null){m(),a.value=!1,r(`close`);return}v()}}return(0,f.watch)(()=>n.form.state.value,()=>{s.chin.value!==null&&m()},{deep:!0}),(0,f.watch)(()=>a.value,e=>{e||m()}),(e,t)=>((0,f.openBlock)(),(0,f.createBlock)(Tv,{"is-open":p.value,"onUpdate:isOpen":t[0]||=e=>p.value=e,chin:l.value,"has-close-button":n.hasCloseButton,size:n.size,"is-click-outside-disabled":n.isClickOutsideDisabled,"is-esc-disabled":n.isEscDisabled,onEscapeKeyDown:y},{default:(0,f.withCtx)(()=>[d.value?(0,f.renderSlot)(e.$slots,`default`,{key:0,formId:(0,f.unref)(o)}):((0,f.openBlock)(),(0,f.createBlock)(Pv,{key:1,form:n.form,"is-unsaved-changes-prompt-enabled":!1,class:`flex size-full flex-col overflow-hidden`},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`,{formId:(0,f.unref)(o)})]),_:3},8,[`form`]))]),_:3},8,[`is-open`,`chin`,`has-close-button`,`size`,`is-click-outside-disabled`,`is-esc-disabled`]))}}),AS=(0,f.defineComponent)({__name:`FormDialogForm`,setup(e){let t=OS();return(e,n)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(Pv),{id:(0,f.unref)(t).formId,form:(0,f.unref)(t).form,"is-unsaved-changes-prompt-enabled":!1},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`,{formId:(0,f.unref)(t).formId})]),_:3},8,[`id`,`form`]))}}),jS={withStackTrace:!1},MS=(e,t,n=jS)=>({data:t.isOk()?{type:`Ok`,value:t.value}:{type:`Err`,value:t.error},message:e,stack:n.withStackTrace?Error().stack:void 0});function NS(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function PS(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function FS(e){return this instanceof FS?(this.v=e,this):new FS(e)}function IS(e,t,n){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var r=n.apply(e,t||[]),i,a=[];return i=Object.create((typeof AsyncIterator==`function`?AsyncIterator:Object).prototype),s(`next`),s(`throw`),s(`return`,o),i[Symbol.asyncIterator]=function(){return this},i;function o(e){return function(t){return Promise.resolve(t).then(e,d)}}function s(e,t){r[e]&&(i[e]=function(t){return new Promise(function(n,r){a.push([e,t,n,r])>1||c(e,t)})},t&&(i[e]=t(i[e])))}function c(e,t){try{l(r[e](t))}catch(e){f(a[0][3],e)}}function l(e){e.value instanceof FS?Promise.resolve(e.value.v).then(u,d):f(a[0][2],e)}function u(e){c(`next`,e)}function d(e){c(`throw`,e)}function f(e,t){e(t),a.shift(),a.length&&c(a[0][0],a[0][1])}}function LS(e){var t,n;return t={},r(`next`),r(`throw`,function(e){throw e}),r(`return`),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:FS(e[r](t)),done:!1}:i?i(t):t}:i}}function RS(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof PS==`function`?PS(e):e[Symbol.iterator](),n={},r(`next`),r(`throw`),r(`return`),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise(function(r,a){n=e[t](n),i(r,a,n.done,n.value)})}}function i(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}}var zS=class e{constructor(e){this._promise=e}static fromSafePromise(t){return new e(t.then(e=>new JS(e)))}static fromPromise(t,n){return new e(t.then(e=>new JS(e)).catch(e=>new YS(n(e))))}static fromThrowable(t,n){return(...r)=>new e(NS(this,void 0,void 0,function*(){try{return new JS(yield t(...r))}catch(e){return new YS(n?n(e):e)}}))}static combine(e){return HS(e)}static combineWithAllErrors(e){return WS(e)}map(t){return new e(this._promise.then(e=>NS(this,void 0,void 0,function*(){return e.isErr()?new YS(e.error):new JS(yield t(e.value))})))}andThrough(t){return new e(this._promise.then(e=>NS(this,void 0,void 0,function*(){if(e.isErr())return new YS(e.error);let n=yield t(e.value);return n.isErr()?new YS(n.error):new JS(e.value)})))}andTee(t){return new e(this._promise.then(e=>NS(this,void 0,void 0,function*(){if(e.isErr())return new YS(e.error);try{yield t(e.value)}catch{}return new JS(e.value)})))}orTee(t){return new e(this._promise.then(e=>NS(this,void 0,void 0,function*(){if(e.isOk())return new JS(e.value);try{yield t(e.error)}catch{}return new YS(e.error)})))}mapErr(t){return new e(this._promise.then(e=>NS(this,void 0,void 0,function*(){return e.isOk()?new JS(e.value):new YS(yield t(e.error))})))}andThen(t){return new e(this._promise.then(n=>{if(n.isErr())return new YS(n.error);let r=t(n.value);return r instanceof e?r._promise:r}))}orElse(t){return new e(this._promise.then(e=>NS(this,void 0,void 0,function*(){return e.isErr()?t(e.error):new JS(e.value)})))}match(e,t){return this._promise.then(n=>n.match(e,t))}unwrapOr(e){return this._promise.then(t=>t.unwrapOr(e))}safeUnwrap(){return IS(this,arguments,function*(){return yield FS(yield FS(yield*LS(RS(yield FS(this._promise.then(e=>e.safeUnwrap()))))))})}then(e,t){return this._promise.then(e,t)}[Symbol.asyncIterator](){return IS(this,arguments,function*(){let e=yield FS(this._promise);return e.isErr()&&(yield yield FS(BS(e.error))),yield FS(e.value)})}};function BS(e){return new zS(Promise.resolve(new YS(e)))}zS.fromPromise,zS.fromSafePromise,zS.fromThrowable;var VS=e=>{let t=KS([]);for(let n of e)if(n.isErr()){t=qS(n.error);break}else t.map(e=>e.push(n.value));return t},HS=e=>zS.fromSafePromise(Promise.all(e)).andThen(VS),US=e=>{let t=KS([]);for(let n of e)n.isErr()&&t.isErr()?t.error.push(n.error):n.isErr()&&t.isOk()?t=qS([n.error]):n.isOk()&&t.isOk()&&t.value.push(n.value);return t},WS=e=>zS.fromSafePromise(Promise.all(e)).andThen(US),GS;(function(e){function t(e,t){return(...n)=>{try{return KS(e(...n))}catch(e){return qS(t?t(e):e)}}}e.fromThrowable=t;function n(e){return VS(e)}e.combine=n;function r(e){return US(e)}e.combineWithAllErrors=r})(GS||={});function KS(e){return new JS(e)}function qS(e){return new YS(e)}var JS=class{constructor(e){this.value=e}isOk(){return!0}isErr(){return!this.isOk()}map(e){return KS(e(this.value))}mapErr(e){return KS(this.value)}andThen(e){return e(this.value)}andThrough(e){return e(this.value).map(e=>this.value)}andTee(e){try{e(this.value)}catch{}return KS(this.value)}orTee(e){return KS(this.value)}orElse(e){return KS(this.value)}asyncAndThen(e){return e(this.value)}asyncAndThrough(e){return e(this.value).map(()=>this.value)}asyncMap(e){return zS.fromSafePromise(e(this.value))}unwrapOr(e){return this.value}match(e,t){return e(this.value)}safeUnwrap(){let e=this.value;return(function*(){return e})()}_unsafeUnwrap(e){return this.value}_unsafeUnwrapErr(e){throw MS("Called `_unsafeUnwrapErr` on an Ok",this,e)}*[Symbol.iterator](){return this.value}},YS=class{constructor(e){this.error=e}isOk(){return!1}isErr(){return!this.isOk()}map(e){return qS(this.error)}mapErr(e){return qS(e(this.error))}andThrough(e){return qS(this.error)}andTee(e){return qS(this.error)}orTee(e){try{e(this.error)}catch{}return qS(this.error)}andThen(e){return qS(this.error)}orElse(e){return e(this.error)}asyncAndThen(e){return BS(this.error)}asyncAndThrough(e){return BS(this.error)}asyncMap(e){return BS(this.error)}unwrapOr(e){return e}match(e,t){return t(this.error)}safeUnwrap(){let e=this.error;return(function*(){throw yield qS(e),Error("Do not use this generator out of `safeTry`")})()}_unsafeUnwrap(e){throw MS("Called `_unsafeUnwrap` on an Err",this,e)}_unsafeUnwrapErr(e){return this.error}*[Symbol.iterator](){let e=this;return yield e,e}};GS.fromThrowable;var XS={prefetchStaleTime:60,limit:20};XS.limit,XS.limit;var ZS=class e{static getApiErrorCode(e){return e.errors?.[0]?.code??null}static getApiErrorMessage(e){return e.errors?.[0]?.detail??null}static getMessage(e){return e.errors?.[0]?.detail??null}static handleApiError({error:t,message:n}){return e.isExpectedApiError(t)||(console.error(`Unexpected API error: ${t}`),t instanceof Error)?t:Error(n??`An unknown error occurred`)}static isExpectedApiError(e){return e?.errors!==void 0}static isZodError(e){return e instanceof d.default.ZodError}},QS=1,$S=new class{subscribers;toasts;dismissedToasts;constructor(){this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)});publish=e=>{this.subscribers.forEach(t=>t(e))};addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]};create=e=>{let{message:t,...n}=e,r=typeof e.id==`number`||e.id&&e.id?.length>0?e.id:QS++,i=this.toasts.find(e=>e.id===r),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r};dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e);message=(e,t)=>this.create({...t,message:e,type:`default`});error=(e,t)=>this.create({...t,type:`error`,message:e});success=(e,t)=>this.create({...t,type:`success`,message:e});info=(e,t)=>this.create({...t,type:`info`,message:e});warning=(e,t)=>this.create({...t,type:`warning`,message:e});loading=(e,t)=>this.create({...t,type:`loading`,message:e});promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],(0,f.isVNode)(e))i=!1,this.create({id:n,type:`default`,message:e});else if(tC(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!(0,f.isVNode)(r)?r:{message:r||``,id:n||``};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!(0,f.isVNode)(r)?r:{message:r||``,id:n||``};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!(0,f.isVNode)(r)?r:{message:r||``,id:n||``};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!(0,f.isVNode)(r)?r:{message:r||``,id:n||``};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally?.()}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})};custom=(e,t)=>{let n=t?.id||QS++,r=this.toasts.find(e=>e.id===n),i=t?.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(n)&&this.dismissedToasts.delete(n),r?this.toasts=this.toasts.map(r=>r.id===n?(this.publish({...r,component:e,dismissible:i,id:n,...t}),{...r,component:e,dismissible:i,id:n,...t}):r):this.addToast({component:e,dismissible:i,id:n,...t}),n};getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id))};function eC(e,t){let n=t?.id||QS++;return $S.create({message:e,id:n,type:`default`,...t}),n}var tC=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,nC=Object.assign(eC,{success:$S.success,info:$S.info,warning:$S.warning,error:$S.error,custom:$S.custom,message:$S.message,promise:$S.promise,dismiss:$S.dismiss,loading:$S.loading},{getHistory:()=>$S.toasts,getToasts:()=>$S.getActiveToasts()});function rC(e){return e.label!==void 0}var iC=3,aC=`24px`,oC=`16px`,sC=4e3,cC=356,lC=14,uC=45,dC=200;function fC(){let e=(0,f.ref)(!1);return(0,f.watchEffect)(()=>{let t=()=>{e.value=document.hidden};return document.addEventListener(`visibilitychange`,t),()=>window.removeEventListener(`visibilitychange`,t)}),{isDocumentHidden:e}}function pC(...e){return e.filter(Boolean).join(` `)}function mC(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}function hC(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?oC:aC;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var gC=[`data-rich-colors`,`data-styled`,`data-mounted`,`data-promise`,`data-swiped`,`data-removed`,`data-visible`,`data-y-position`,`data-x-position`,`data-index`,`data-front`,`data-swiping`,`data-dismissible`,`data-type`,`data-invert`,`data-swipe-out`,`data-swipe-direction`,`data-expanded`,`data-testid`],_C=[`aria-label`,`data-disabled`,`data-close-button-position`],vC=(0,f.defineComponent)({__name:`Toast`,props:{toast:{},toasts:{},index:{},swipeDirections:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},gap:{},position:{},closeButtonPosition:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},style:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},class:{},unstyled:{type:Boolean},descriptionClass:{},loadingIcon:{},classes:{},icons:{},closeButtonAriaLabel:{},defaultRichColors:{type:Boolean}},emits:[`update:heights`,`update:height`,`removeToast`],setup(e,{emit:t}){let n=e,r=t,i=(0,f.ref)(null),a=(0,f.ref)(null),o=(0,f.ref)(!1),s=(0,f.ref)(!1),c=(0,f.ref)(!1),l=(0,f.ref)(!1),u=(0,f.ref)(!1),d=(0,f.ref)(0),p=(0,f.ref)(0),m=(0,f.ref)(n.toast.duration||n.duration||sC),h=(0,f.ref)(null),g=(0,f.ref)(null),_=(0,f.computed)(()=>n.index===0),v=(0,f.computed)(()=>n.index+1<=n.visibleToasts),y=(0,f.computed)(()=>n.toast.type),b=(0,f.computed)(()=>n.toast.dismissible!==!1),x=(0,f.computed)(()=>n.toast.class||``),S=(0,f.computed)(()=>n.descriptionClass||``),C=(0,f.computed)(()=>{let e=n.toast.position||n.position,t=n.heights.filter(t=>t.position===e).findIndex(e=>e.toastId===n.toast.id);return t>=0?t:0}),w=(0,f.computed)(()=>{let e=n.toast.position||n.position;return n.heights.filter(t=>t.position===e).reduce((e,t,n)=>n>=C.value?e:e+t.height,0)}),T=(0,f.computed)(()=>C.value*n.gap+w.value||0),E=(0,f.computed)(()=>n.toast.closeButton??n.closeButton),ee=(0,f.computed)(()=>n.toast.duration||n.duration||sC),D=(0,f.ref)(0),te=(0,f.ref)(0),O=(0,f.ref)(null),ne=(0,f.computed)(()=>n.position.split(`-`)),k=(0,f.computed)(()=>ne.value[0]),re=(0,f.computed)(()=>ne.value[1]),A=(0,f.computed)(()=>typeof n.toast.title!=`string`),ie=(0,f.computed)(()=>typeof n.toast.description!=`string`),{isDocumentHidden:ae}=fC(),oe=(0,f.computed)(()=>y.value&&y.value===`loading`);(0,f.onMounted)(()=>{o.value=!0,m.value=ee.value}),(0,f.watchEffect)(async()=>{if(!o.value||!g.value)return;await(0,f.nextTick)();let e=g.value,t=e.style.height;e.style.height=`auto`;let i=e.getBoundingClientRect().height;e.style.height=t,p.value=i,r(`update:height`,{toastId:n.toast.id,height:i,position:n.toast.position||n.position})});function se(){s.value=!0,d.value=T.value,setTimeout(()=>{r(`removeToast`,n.toast)},dC)}function j(){if(oe.value||!b.value)return{};se(),n.toast.onDismiss?.(n.toast)}function ce(e){e.button!==2&&(oe.value||!b.value||(h.value=new Date,d.value=T.value,e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(c.value=!0,O.value={x:e.clientX,y:e.clientY})))}function le(){if(l.value||!b.value)return;O.value=null;let e=Number(g.value?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(g.value?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-(h.value?.getTime()||0),o=i.value===`x`?e:t,s=Math.abs(o)/r;if(Math.abs(o)>=uC||s>.11){d.value=T.value,n.toast.onDismiss?.(n.toast),i.value===`x`?a.value=e>0?`right`:`left`:a.value=t>0?`down`:`up`,se(),l.value=!0;return}else g.value?.style.setProperty(`--swipe-amount-x`,`0px`),g.value?.style.setProperty(`--swipe-amount-y`,`0px`);u.value=!1,c.value=!1,i.value=null}function ue(e){if(!O.value||!b.value||(window?.getSelection()?.toString()?.length??!1))return;let t=e.clientY-O.value.y,r=e.clientX-O.value.x,a=n.swipeDirections??mC(n.position);!i.value&&(Math.abs(r)>1||Math.abs(t)>1)&&(i.value=Math.abs(r)>Math.abs(t)?`x`:`y`);let o={x:0,y:0},s=e=>1/(1.5+Math.abs(e)/20);if(i.value===`y`){if(a.includes(`top`)||a.includes(`bottom`))if(a.includes(`top`)&&t<0||a.includes(`bottom`)&&t>0)o.y=t;else{let e=t*s(t);o.y=Math.abs(e)<Math.abs(t)?e:t}}else if(i.value===`x`&&(a.includes(`left`)||a.includes(`right`)))if(a.includes(`left`)&&r<0||a.includes(`right`)&&r>0)o.x=r;else{let e=r*s(r);o.x=Math.abs(e)<Math.abs(r)?e:r}(Math.abs(o.x)>0||Math.abs(o.y)>0)&&(u.value=!0),g.value?.style.setProperty(`--swipe-amount-x`,`${o.x}px`),g.value?.style.setProperty(`--swipe-amount-y`,`${o.y}px`)}(0,f.onMounted)(()=>{if(o.value=!0,!g.value)return;let e=g.value.getBoundingClientRect().height;p.value=e,r(`update:heights`,[{toastId:n.toast.id,height:e,position:n.toast.position},...n.heights])}),(0,f.onBeforeUnmount)(()=>{g.value&&r(`removeToast`,n.toast)}),(0,f.watchEffect)(e=>{if(n.toast.promise&&y.value===`loading`||n.toast.duration===1/0||n.toast.type===`loading`)return;let t;n.expanded||n.interacting||ae.value?(()=>{if(te.value<D.value){let e=new Date().getTime()-D.value;m.value-=e}te.value=new Date().getTime()})():m.value!==1/0&&(D.value=new Date().getTime(),t=setTimeout(()=>{n.toast.onAutoClose?.(n.toast),se()},m.value)),e(()=>{clearTimeout(t)})}),(0,f.watch)(()=>n.toast.delete,e=>{e!==void 0&&e&&(se(),n.toast.onDismiss?.(n.toast))},{deep:!0});function M(){c.value=!1,i.value=null,O.value=null}return(e,t)=>((0,f.openBlock)(),(0,f.createElementBlock)(`li`,{tabindex:`0`,ref_key:`toastRef`,ref:g,class:(0,f.normalizeClass)((0,f.unref)(pC)(n.class,x.value,e.classes?.toast,e.toast.classes?.toast,e.classes?.[y.value],e.toast?.classes?.[y.value])),"data-sonner-toast":``,"data-rich-colors":e.toast.richColors??e.defaultRichColors,"data-styled":!(e.toast.component||e.toast?.unstyled||e.unstyled),"data-mounted":o.value,"data-promise":!!e.toast.promise,"data-swiped":u.value,"data-removed":s.value,"data-visible":v.value,"data-y-position":k.value,"data-x-position":re.value,"data-index":e.index,"data-front":_.value,"data-swiping":c.value,"data-dismissible":b.value,"data-type":y.value,"data-invert":e.toast.invert||e.invert,"data-swipe-out":l.value,"data-swipe-direction":a.value,"data-expanded":!!(e.expanded||e.expandByDefault&&o.value),"data-testid":e.toast.testId,style:(0,f.normalizeStyle)({"--index":e.index,"--toasts-before":e.index,"--z-index":e.toasts.length-e.index,"--offset":`${s.value?d.value:T.value}px`,"--initial-height":e.expandByDefault?`auto`:`${p.value}px`,...e.style,...n.toast.style}),onDragend:M,onPointerdown:ce,onPointerup:le,onPointermove:ue},[E.value&&!e.toast.component&&y.value!==`loading`?((0,f.openBlock)(),(0,f.createElementBlock)(`button`,{key:0,"aria-label":e.closeButtonAriaLabel||`Close toast`,"data-disabled":oe.value,"data-close-button":`true`,"data-close-button-position":e.closeButtonPosition,class:(0,f.normalizeClass)((0,f.unref)(pC)(e.classes?.closeButton,e.toast?.classes?.closeButton)),onClick:j},[e.icons?.close?((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(e.icons?.close),{key:0})):(0,f.renderSlot)(e.$slots,`close-icon`,{key:1})],10,_C)):(0,f.createCommentVNode)(`v-if`,!0),e.toast.component?((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(e.toast.component),(0,f.mergeProps)({key:1},e.toast.componentProps,{onCloseToast:j,isPaused:e.$props.expanded||e.$props.interacting||(0,f.unref)(ae)}),null,16,[`isPaused`])):((0,f.openBlock)(),(0,f.createElementBlock)(f.Fragment,{key:2},[y.value!=="default"||e.toast.icon||e.toast.promise?((0,f.openBlock)(),(0,f.createElementBlock)(`div`,{key:0,"data-icon":``,class:(0,f.normalizeClass)((0,f.unref)(pC)(e.classes?.icon,e.toast?.classes?.icon))},[e.toast.icon?((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(e.toast.icon),{key:0})):((0,f.openBlock)(),(0,f.createElementBlock)(f.Fragment,{key:1},[y.value===`loading`?(0,f.renderSlot)(e.$slots,`loading-icon`,{key:0}):y.value===`success`?(0,f.renderSlot)(e.$slots,`success-icon`,{key:1}):y.value===`error`?(0,f.renderSlot)(e.$slots,`error-icon`,{key:2}):y.value===`warning`?(0,f.renderSlot)(e.$slots,`warning-icon`,{key:3}):y.value===`info`?(0,f.renderSlot)(e.$slots,`info-icon`,{key:4}):(0,f.createCommentVNode)(`v-if`,!0)],64))],2)):(0,f.createCommentVNode)(`v-if`,!0),(0,f.createElementVNode)(`div`,{"data-content":``,class:(0,f.normalizeClass)((0,f.unref)(pC)(e.classes?.content,e.toast?.classes?.content))},[(0,f.createElementVNode)(`div`,{"data-title":``,class:(0,f.normalizeClass)((0,f.unref)(pC)(e.classes?.title,e.toast.classes?.title))},[A.value?((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(e.toast.title),(0,f.normalizeProps)((0,f.mergeProps)({key:0},e.toast.componentProps)),null,16)):((0,f.openBlock)(),(0,f.createElementBlock)(f.Fragment,{key:1},[(0,f.createTextVNode)((0,f.toDisplayString)(e.toast.title),1)],64))],2),e.toast.description?((0,f.openBlock)(),(0,f.createElementBlock)(`div`,{key:0,"data-description":``,class:(0,f.normalizeClass)((0,f.unref)(pC)(e.descriptionClass,S.value,e.classes?.description,e.toast.classes?.description))},[ie.value?((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(e.toast.description),(0,f.normalizeProps)((0,f.mergeProps)({key:0},e.toast.componentProps)),null,16)):((0,f.openBlock)(),(0,f.createElementBlock)(f.Fragment,{key:1},[(0,f.createTextVNode)((0,f.toDisplayString)(e.toast.description),1)],64))],2)):(0,f.createCommentVNode)(`v-if`,!0)],2),e.toast.cancel?((0,f.openBlock)(),(0,f.createElementBlock)(`button`,{key:1,style:(0,f.normalizeStyle)(e.toast.cancelButtonStyle||e.cancelButtonStyle),class:(0,f.normalizeClass)((0,f.unref)(pC)(e.classes?.cancelButton,e.toast.classes?.cancelButton)),"data-button":``,"data-cancel":``,onClick:t[0]||=t=>{(0,f.unref)(rC)(e.toast.cancel)&&b.value&&(e.toast.cancel.onClick?.(t),se())}},(0,f.toDisplayString)((0,f.unref)(rC)(e.toast.cancel)?e.toast.cancel?.label:e.toast.cancel),7)):(0,f.createCommentVNode)(`v-if`,!0),e.toast.action?((0,f.openBlock)(),(0,f.createElementBlock)(`button`,{key:2,style:(0,f.normalizeStyle)(e.toast.actionButtonStyle||e.actionButtonStyle),class:(0,f.normalizeClass)((0,f.unref)(pC)(e.classes?.actionButton,e.toast.classes?.actionButton)),"data-button":``,"data-action":``,onClick:t[1]||=t=>{(0,f.unref)(rC)(e.toast.action)&&(e.toast.action.onClick?.(t),!t.defaultPrevented&&se())}},(0,f.toDisplayString)((0,f.unref)(rC)(e.toast.action)?e.toast.action?.label:e.toast.action),7)):(0,f.createCommentVNode)(`v-if`,!0)],64))],46,gC))}}),yC=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},bC={},xC={xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stoke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`};function SC(e,t){return(0,f.openBlock)(),(0,f.createElementBlock)(`svg`,xC,t[0]||=[(0,f.createElementVNode)(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`},null,-1),(0,f.createElementVNode)(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`},null,-1)])}var CC=yC(bC,[[`render`,SC]]),wC=[`data-visible`],TC={class:`sonner-spinner`},EC=(0,f.defineComponent)({__name:`Loader`,props:{visible:{type:Boolean}},setup(e){let t=Array(12).fill(0);return(e,n)=>((0,f.openBlock)(),(0,f.createElementBlock)(`div`,{class:`sonner-loading-wrapper`,"data-visible":e.visible},[(0,f.createElementVNode)(`div`,TC,[((0,f.openBlock)(!0),(0,f.createElementBlock)(f.Fragment,null,(0,f.renderList)((0,f.unref)(t),e=>((0,f.openBlock)(),(0,f.createElementBlock)(`div`,{key:`spinner-bar-${e}`,class:`sonner-loading-bar`}))),128))])],8,wC))}}),DC={},OC={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`};function kC(e,t){return(0,f.openBlock)(),(0,f.createElementBlock)(`svg`,OC,t[0]||=[(0,f.createElementVNode)(`path`,{"fill-rule":`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,"clip-rule":`evenodd`},null,-1)])}var AC=yC(DC,[[`render`,kC]]),jC={},MC={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`};function NC(e,t){return(0,f.openBlock)(),(0,f.createElementBlock)(`svg`,MC,t[0]||=[(0,f.createElementVNode)(`path`,{"fill-rule":`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,"clip-rule":`evenodd`},null,-1)])}var PC=yC(jC,[[`render`,NC]]),FC={},IC={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`};function LC(e,t){return(0,f.openBlock)(),(0,f.createElementBlock)(`svg`,IC,t[0]||=[(0,f.createElementVNode)(`path`,{"fill-rule":`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,"clip-rule":`evenodd`},null,-1)])}var RC=yC(FC,[[`render`,LC]]),zC={},BC={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`};function VC(e,t){return(0,f.openBlock)(),(0,f.createElementBlock)(`svg`,BC,t[0]||=[(0,f.createElementVNode)(`path`,{"fill-rule":`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,"clip-rule":`evenodd`},null,-1)])}var HC=yC(zC,[[`render`,VC]]),UC=[`aria-label`],WC=[`data-sonner-theme`,`dir`,`data-theme`,`data-rich-colors`,`data-y-position`,`data-x-position`],GC=typeof window<`u`&&typeof document<`u`;function KC(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}var qC=(0,f.defineComponent)({name:`Toaster`,inheritAttrs:!1,__name:`Toaster`,props:{id:{},invert:{type:Boolean,default:!1},theme:{default:`light`},position:{default:`bottom-right`},closeButtonPosition:{default:`top-left`},hotkey:{default:()=>[`altKey`,`KeyT`]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{},gap:{default:lC},visibleToasts:{default:iC},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},class:{default:``},style:{},offset:{default:aC},mobileOffset:{default:oC},dir:{default:`auto`},swipeDirections:{},icons:{},containerAriaLabel:{default:`Notifications`}},setup(e){let t=e,n=(0,f.useAttrs)(),r=(0,f.ref)([]),i=(0,f.computed)(()=>t.id?r.value.filter(e=>e.toasterId===t.id):r.value.filter(e=>!e.toasterId));function a(e,t){return i.value.filter(n=>!n.position&&t===0||n.position===e)}let o=(0,f.computed)(()=>{let e=i.value.filter(e=>e.position).map(e=>e.position);return e.length>0?Array.from(new Set([t.position].concat(e))):[t.position]}),s=(0,f.computed)(()=>{let e={};return o.value.forEach(t=>{e[t]=r.value.filter(e=>e.position===t)}),e}),c=(0,f.ref)([]),l=(0,f.ref)({}),u=(0,f.ref)(!1);(0,f.watchEffect)(()=>{o.value.forEach(e=>{e in l.value||(l.value[e]=!1)})});let d=(0,f.ref)(t.theme===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:t.theme),p=(0,f.ref)(null),m=(0,f.ref)(null),h=(0,f.ref)(!1),g=t.hotkey.join(`+`).replace(/Key/g,``).replace(/Digit/g,``);function _(e){r.value.find(t=>t.id===e.id)?.delete||$S.dismiss(e.id),r.value=r.value.filter(({id:t})=>t!==e.id),setTimeout(()=>{r.value.find(t=>t.id===e.id)||(c.value=c.value.filter(t=>t.toastId!==e.id))},250)}function v(e){h.value&&!e.currentTarget?.contains?.(e.relatedTarget)&&(h.value=!1,m.value&&=(m.value.focus({preventScroll:!0}),null))}function y(e){e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||h.value||(h.value=!0,m.value=e.relatedTarget)}function b(e){e.target&&e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||(u.value=!0)}(0,f.watchEffect)(e=>{e($S.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{r.value=r.value.map(t=>t.id===e.id?{...t,delete:!0}:t)});return}(0,f.nextTick)(()=>{let t=r.value.findIndex(t=>t.id===e.id);t===-1?r.value=[e,...r.value]:r.value=[...r.value.slice(0,t),{...r.value[t],...e},...r.value.slice(t+1)]})}))}),(0,f.watchEffect)(e=>{if(typeof window>`u`)return;if(t.theme!==`system`){d.value=t.theme;return}let n=window.matchMedia(`(prefers-color-scheme: dark)`),r=e=>{d.value=e?`dark`:`light`};r(n.matches);let i=e=>{r(e.matches)};try{n.addEventListener(`change`,i)}catch{n.addListener(i)}e(()=>{try{n.removeEventListener(`change`,i)}catch{n.removeListener(i)}})}),(0,f.watchEffect)(()=>{p.value&&m.value&&(m.value.focus({preventScroll:!0}),m.value=null,h.value=!1)}),(0,f.watchEffect)(()=>{r.value.length<=1&&Object.keys(l.value).forEach(e=>{l.value[e]=!1})}),(0,f.watchEffect)(e=>{function n(e){let n=t.hotkey.every(t=>e[t]||e.code===t),r=Array.isArray(p.value)?p.value[0]:p.value;n&&(o.value.forEach(e=>{l.value[e]=!0}),r?.focus());let i=document.activeElement===p.value||r?.contains(document.activeElement);e.code===`Escape`&&i&&o.value.forEach(e=>{l.value[e]=!1})}GC&&(document.addEventListener(`keydown`,n),e(()=>{document.removeEventListener(`keydown`,n)}))});function x(e){let t=e.currentTarget,n=t.getAttribute(`data-y-position`)+`-`+t.getAttribute(`data-x-position`);l.value[n]=!0}function S(e){if(!u.value){let t=e.currentTarget,n=t.getAttribute(`data-y-position`)+`-`+t.getAttribute(`data-x-position`);l.value[n]=!1}}function C(){Object.keys(l.value).forEach(e=>{l.value[e]=!1})}function w(){u.value=!1}function T(e){c.value=e}function E(e){let t=c.value.findIndex(t=>t.toastId===e.toastId);if(t!==-1)c.value[t]=e;else{let t=c.value.findIndex(t=>t.position===e.position);t===-1?c.value.unshift(e):c.value.splice(t,0,e)}}return(e,r)=>((0,f.openBlock)(),(0,f.createElementBlock)(f.Fragment,null,[(0,f.createCommentVNode)(` Remove item from normal navigation flow, only available via hotkey `),(0,f.createElementVNode)(`section`,{"aria-label":`${e.containerAriaLabel} ${(0,f.unref)(g)}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`},[((0,f.openBlock)(!0),(0,f.createElementBlock)(f.Fragment,null,(0,f.renderList)(o.value,(r,i)=>((0,f.openBlock)(),(0,f.createElementBlock)(`ol`,(0,f.mergeProps)({key:r,ref_for:!0,ref_key:`listRef`,ref:p,"data-sonner-toaster":``,"data-sonner-theme":d.value,class:t.class,dir:e.dir===`auto`?KC():e.dir,tabIndex:-1,"data-theme":e.theme,"data-rich-colors":e.richColors,"data-y-position":r.split(`-`)[0],"data-x-position":r.split(`-`)[1],style:{"--front-toast-height":`${c.value[0]?.height||0}px`,"--width":`${(0,f.unref)(cC)}px`,"--gap":`${e.gap}px`,...e.style,...(0,f.unref)(n).style,...(0,f.unref)(hC)(e.offset,e.mobileOffset)}},{ref_for:!0},e.$attrs,{onBlur:v,onFocus:y,onMouseenter:x,onMousemove:x,onMouseleave:S,onDragend:C,onPointerdown:b,onPointerup:w}),[((0,f.openBlock)(!0),(0,f.createElementBlock)(f.Fragment,null,(0,f.renderList)(a(r,i),(n,i)=>((0,f.openBlock)(),(0,f.createBlock)(vC,{key:n.id,heights:c.value,icons:e.icons,index:i,toast:n,defaultRichColors:e.richColors,duration:e.toastOptions?.duration??e.duration,class:(0,f.normalizeClass)(e.toastOptions?.class??``),descriptionClass:e.toastOptions?.descriptionClass,invert:e.invert,visibleToasts:e.visibleToasts,closeButton:e.toastOptions?.closeButton??e.closeButton,interacting:u.value,position:r,closeButtonPosition:e.toastOptions?.closeButtonPosition??e.closeButtonPosition,style:(0,f.normalizeStyle)(e.toastOptions?.style),unstyled:e.toastOptions?.unstyled,classes:e.toastOptions?.classes,cancelButtonStyle:e.toastOptions?.cancelButtonStyle,actionButtonStyle:e.toastOptions?.actionButtonStyle,"close-button-aria-label":e.toastOptions?.closeButtonAriaLabel,toasts:s.value[r],expandByDefault:e.expand,gap:e.gap,expanded:l.value[r]||!1,swipeDirections:t.swipeDirections,"onUpdate:heights":T,"onUpdate:height":E,onRemoveToast:_},{"close-icon":(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`close-icon`,{},()=>[(0,f.createVNode)(CC)])]),"loading-icon":(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`loading-icon`,{},()=>[(0,f.createVNode)(EC,{visible:n.type===`loading`},null,8,[`visible`])])]),"success-icon":(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`success-icon`,{},()=>[(0,f.createVNode)(AC)])]),"error-icon":(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`error-icon`,{},()=>[(0,f.createVNode)(HC)])]),"warning-icon":(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`warning-icon`,{},()=>[(0,f.createVNode)(RC)])]),"info-icon":(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`info-icon`,{},()=>[(0,f.createVNode)(PC)])]),_:2},1032,[`heights`,`icons`,`index`,`toast`,`defaultRichColors`,`duration`,`class`,`descriptionClass`,`invert`,`visibleToasts`,`closeButton`,`interacting`,`position`,`closeButtonPosition`,`style`,`unstyled`,`classes`,`cancelButtonStyle`,`actionButtonStyle`,`close-button-aria-label`,`toasts`,`expandByDefault`,`gap`,`expanded`,`swipeDirections`]))),128))],16,WC))),128))],8,UC)],2112))}}),JC=V({slots:{title:`mb-xs text-sm font-medium`},variants:{variant:{error:{title:`text-error-primary`},info:{title:`text-primary`},warning:{title:`text-warning-primary`}}}}),YC=(0,f.defineComponent)({__name:`ToastActions`,props:{button:{},link:{}},emits:[`close`],setup(e,{emit:t}){let n=t;function r(e){e.onClick(),n(`close`)}function i(){n(`close`)}return(t,n)=>e.button!==void 0||e.link!==void 0?((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(I),{key:0},{default:(0,f.withCtx)(()=>[e.button===void 0?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(Y),(0,f.mergeProps)({key:0,variant:`secondary`},e.button,{onClick:n[0]||=t=>r(e.button)}),null,16)),e.link===void 0?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(tv),(0,f.mergeProps)({key:1,variant:`secondary`},e.link,{onClick:n[1]||=e=>i()}),null,16))]),_:1})):(0,f.createCommentVNode)(``,!0)}}),XC={class:`absolute top-0 right-0 mt-md mr-sm flex h-text-sm items-center justify-center`},ZC=(0,f.defineComponent)({__name:`ToastCloseButton`,emits:[`close`],setup(e,{emit:t}){let n=t,r=(0,g.useI18n)();return(e,t)=>((0,f.openBlock)(),(0,f.createElementBlock)(`div`,XC,[(0,f.createVNode)((0,f.unref)(X),{icon:(0,f.unref)(zr),"is-tooltip-disabled":!0,label:(0,f.unref)(r).t(`component.toast.close.label`),size:`sm`,variant:`tertiary`,onClick:t[0]||=e=>n(`close`)},null,8,[`icon`,`label`])]))}}),QC={class:`flex h-text-sm items-center`},$C=(0,f.defineComponent)({__name:`ToastIcon`,props:{icon:{},variant:{}},setup(e){let t=e;return(e,n)=>((0,f.openBlock)(),(0,f.createElementBlock)(`div`,QC,[((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(t.icon),{class:(0,f.normalizeClass)([{"text-error-primary":t.variant===`error`,"text-warning-primary":t.variant===`warning`,"text-tertiary":t.variant===`info`||t.variant===`loading`||t.variant===void 0},`size-4`])},null,8,[`class`]))]))}}),ew={},tw={class:`pointer-events-auto relative w-full rounded-xl border border-secondary bg-primary p-md pl-lg shadow-lg/5`};function nw(e,t){return(0,f.openBlock)(),(0,f.createElementBlock)(`div`,tw,[(0,f.renderSlot)(e.$slots,`default`)])}var rw=H(ew,[[`render`,nw]]),iw={class:`flex h-text-sm items-center`},aw=(0,f.defineComponent)({__name:`ToastLoader`,setup(e){return(e,t)=>((0,f.openBlock)(),(0,f.createElementBlock)(`div`,iw,[(0,f.createVNode)((0,f.unref)(To),{class:`size-3.5 text-tertiary`})]))}}),ow=[`src`,`alt`],sw={class:`font-medium text-primary`},cw=(0,f.defineComponent)({__name:`ToastInteractablePart`,props:{icon:{},imageSrc:{},label:{},to:{}},emits:[`click`],setup(e,{emit:t}){let n=e,r=t;function i(){n.to!==null&&r(`click`)}return(e,t)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(n.to===null?`span`:(0,f.unref)(y.RouterLink)),{to:n.to,class:(0,f.normalizeClass)({"hover:underline":n.to!==null}),onClick:i},{default:(0,f.withCtx)(()=>[n.imageSrc===null?n.icon===null?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(n.icon),{key:1,class:`mr-xs inline size-3.5 -translate-y-px align-sub text-secondary`})):((0,f.openBlock)(),(0,f.createElementBlock)(`img`,{key:0,src:n.imageSrc,alt:n.label,class:`mr-xs inline size-3.5 -translate-y-px rounded-xs align-middle`},null,8,ow)),(0,f.createElementVNode)(`span`,sw,(0,f.toDisplayString)(n.label),1)]),_:1},8,[`to`,`class`]))}}),lw={class:`text-sm text-secondary`},uw=(0,f.defineComponent)({__name:`ToastMessage`,props:{message:{},models:{}},emits:[`closeToast`],setup(e,{emit:t}){let n=e,r=t,i=/(\{.*?\})/g,a=/^\{(.*?)\}$/,o=(0,f.computed)(()=>n.message.split(i).map(e=>{let t=e.match(a);if(t===null)return{label:e,type:`text`};let r=t[1],i=n.models[r]??null;return i===null?(console.warn(`No model found for key "${r}" in toast message "${n.message}"`),{label:e,type:`text`}):{icon:i.icon??null,imageSrc:i.imageSrc??null,key:r,label:i.label,to:i.to,type:`interactable`}}));return(e,t)=>((0,f.openBlock)(),(0,f.createElementBlock)(`span`,lw,[((0,f.openBlock)(!0),(0,f.createElementBlock)(f.Fragment,null,(0,f.renderList)(o.value,(e,n)=>((0,f.openBlock)(),(0,f.createElementBlock)(f.Fragment,{key:n},[e.type===`text`?((0,f.openBlock)(),(0,f.createElementBlock)(f.Fragment,{key:0},[(0,f.createTextVNode)((0,f.toDisplayString)(e.label),1)],64)):e.type===`interactable`?((0,f.openBlock)(),(0,f.createBlock)(cw,{key:1,icon:e.icon,"image-src":e.imageSrc,label:e.label,to:e.to??null,onClick:t[0]||=e=>r(`closeToast`)},null,8,[`icon`,`image-src`,`label`,`to`])):(0,f.createCommentVNode)(``,!0)],64))),128))]))}}),dw=H((0,f.defineComponent)({__name:`Toast`,props:{toast:{}},emits:[`closeToast`],setup(e,{emit:t}){let n=e,r=t,i=(0,f.computed)(()=>n.toast.variant===`error`?`error`:n.toast.variant===`warning`?`warning`:`info`),a=(0,f.computed)(()=>JC({variant:i.value}));return(e,t)=>((0,f.openBlock)(),(0,f.createBlock)(rw,{"data-toast-id":n.toast.id},{default:(0,f.withCtx)(()=>[(n.toast.isDismissible??!0)&&n.toast.variant!==`loading`?((0,f.openBlock)(),(0,f.createBlock)(ZC,{key:0,onClose:t[0]||=e=>r(`closeToast`)})):(0,f.createCommentVNode)(``,!0),(0,f.createVNode)((0,f.unref)(I),{align:`start`,class:`pr-3xl`},{default:(0,f.withCtx)(()=>[n.toast.variant===`loading`?((0,f.openBlock)(),(0,f.createBlock)(aw,{key:0})):n.toast.icon===void 0?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createBlock)($C,{key:1,icon:n.toast.icon,variant:n.toast.variant},null,8,[`icon`,`variant`])),(0,f.createVNode)((0,f.unref)(G),{gap:`none`},{default:(0,f.withCtx)(()=>[n.toast.title===void 0?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(U),{key:0,text:n.toast.title,class:(0,f.normalizeClass)([a.value.title(),`mb-xs text-sm font-medium`])},null,8,[`text`,`class`])),(0,f.createVNode)(uw,{models:n.toast.interactableModels??{},message:n.toast.message,onCloseToast:t[1]||=e=>r(`closeToast`)},null,8,[`models`,`message`]),(0,f.createVNode)(YC,{button:n.toast.button,link:n.toast.link,class:`mt-lg`,onClose:t[2]||=e=>r(`closeToast`)},null,8,[`button`,`link`])]),_:1})]),_:1})]),_:1},8,[`data-toast-id`]))}}),[[`__scopeId`,`data-v-0289243a`]]),fw=600,pw=`animate-toast-highlight`,mw=new Map;function hw(e){let t=document.querySelector(`[data-toast-id="${e}"]`);if(!t)return;let n=mw.get(e);n&&clearTimeout(n),t.classList.remove(pw),t.scrollTop,t.classList.add(pw);let r=setTimeout(()=>{t.classList.remove(pw),mw.delete(e)},fw);mw.set(e,r)}var gw=1/0,_w=5e3,vw=7e3;function yw(e,t){switch(e){case`always`:return t===`error`?vw:_w;case`all-except-errors`:return t===`error`?gw:_w;case`never`:return gw}}function bw(e){nC.dismiss(e)}function xw(){let e=(0,g.useI18n)(),t=J();function n(e){(e.id===void 0?null:nC.getToasts().find(t=>t.id===e.id)??null)!==null&&hw(e.id),nC.custom((0,f.markRaw)((0,f.defineComponent)({render:()=>(0,f.h)(dw,{toast:e})})),{id:e.id??crypto.randomUUID(),class:`w-full sm:w-96`,dismissible:e.isDismissible??e.dismissible,duration:e.duration??yw(t.autoCloseToast.value,e.variant===`error`?`error`:`info`),position:e.position??`bottom-right`,onAutoClose:e.onAutoClose,onDismiss:e.onDismiss})}function r(e){let r=e.id??crypto.randomUUID();n({id:r,isDismissible:!1,duration:gw,icon:e.icon,interactableModels:e.interactableModels,message:e.loading,variant:`loading`,onAutoClose:e.onAutoClose,onDismiss:e.onDismiss});function i(n,i){let a=nC.custom((0,f.markRaw)((0,f.defineComponent)({render:()=>(0,f.h)(dw,{toast:{id:r,icon:e.icon,interactableModels:e.interactableModels,message:n,variant:i}})})),{id:r,class:`w-full sm:w-96`,dismissible:!0,position:e.position??`bottom-right`,onAutoClose:e.onAutoClose,onDismiss:e.onDismiss});setTimeout(()=>{nC.dismiss(a)},e.duration??yw(t.autoCloseToast.value,i===`error`?`error`:`info`))}e.promise.then(()=>i(e.success,`info`)).catch(()=>i(e.error,`error`))}function i(){n({id:`unable-to-save`,icon:St,message:e.t(`component.toast.unable_to_save_changes.message`),variant:`error`})}function a(t){if(!ZS.isExpectedApiError(t)){n({icon:St,message:e.t(`component.toast.unexpected_error.message`),variant:`error`}),console.error(`Unknown error occurred:`,t);return}let[r]=t.errors;r!==void 0&&n({icon:St,message:r.detail,variant:`error`})}return{apiError:a,dismiss:bw,promise:r,show:n,unableToSave:i}}var Sw=(0,f.defineComponent)({__name:`ToastContainer`,setup(e){return(e,t)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(qC),{style:{zIndex:75},expand:!1}))}}),Cw=(0,f.defineComponent)({__name:`TooltipProvider`,setup(e){return(e,t)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.TooltipProvider),null,{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`)]),_:3}))}}),ww=(0,f.defineComponent)({__name:`ApplicationProvider`,props:{isFetchingAuthUser:{type:Boolean}},setup(e){let t=e;return(0,p.useActionRegistryStore)().registerActions(bS()),(e,n)=>((0,f.openBlock)(),(0,f.createBlock)(Cw,null,{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(oS)),(0,f.createVNode)((0,f.unref)(iS)),(0,f.createVNode)((0,f.unref)(eS),{"is-fetching-auth-user":t.isFetchingAuthUser},null,8,[`is-fetching-auth-user`]),(0,f.createVNode)((0,f.unref)(Sw)),(0,f.createVNode)((0,f.unref)(CS)),(0,f.renderSlot)(e.$slots,`default`)]),_:3}))}}),Tw=function(e){return e.CONFIRM_UPLOAD_FAILED=`CONFIRM_UPLOAD_FAILED`,e.GET_FILE_INFO_FAILED=`GET_FILE_INFO_FAILED`,e.INVALID_MIME_TYPE=`INVALID_MIME_TYPE`,e.PREPROCESSING_FAILED=`PREPROCESSING_FAILED`,e.UPLOAD_FAILED=`UPLOAD_FAILED`,e}({}),$=function(e){return e.ERROR=`ERROR`,e.PENDING=`PENDING`,e.SUCCESS=`SUCCESS`,e.UPLOADING=`UPLOADING`,e}({}),[Ew,Dw]=F(`baseFileUploadContext`),Ow=/[/\\]/;function kw(e,t,n=$.PENDING){return{uuid:``,isSyncedWithModelValue:!1,name:e.name,file:e,key:crypto.randomUUID(),mimeType:e.type,order:t,status:n,url:URL.createObjectURL(e)}}function Aw(e,t){return{...e,isSyncedWithModelValue:!0,status:t}}function jw(e,t){return t.some(t=>{if(t===`*/*`)return!0;if(t.endsWith(`/*`)){let[n]=t.split(`/`);return e.type.startsWith(`${n}/`)}return e.type===t})}function Mw(e){return e.split(`/`)[1]??`bin`}async function Nw(e){let t=await e.arrayBuffer(),n=await crypto.subtle.digest(`SHA-256`,t);return Array.from(new Uint8Array(n)).map(e=>e.toString(16).padStart(2,`0`)).join(``)}async function Pw(e,t){if(e.types.includes(`text/plain`))try{let t=(await(await e.getType(`text/plain`)).text()).trim().split(Ow).pop();if(t!==void 0&&t.includes(`.`))return t}catch{}return`clipboard.${Mw(t)}`}var[Fw,Iw]=F(`baseFileUploadClipboardContext`),Lw=`file-upload-clipboard-ignored-fingerprints`,Rw=(0,f.defineComponent)({__name:`BaseFileUploadClipboard`,setup(e){let{isDisabled:t,isValidFile:n,accept:r,onFilesSelected:i}=Dw(),a=(0,f.ref)([]);function o(){let e=sessionStorage.getItem(Lw);return e===null?new Set:new Set(JSON.parse(e))}function s(e){sessionStorage.setItem(Lw,JSON.stringify([...e]))}function c(e){let t=o();t.add(e),s(t)}function l(){for(let e of a.value)c(e.fingerprint);a.value=[]}function u(){i(a.value.map(e=>e.file)),l()}async function d(){if(t.value||!navigator.clipboard?.read)return;let e;try{e=await navigator.clipboard.read()}catch{return}let i=[];for(let t of e)for(let e of t.types){if(!e.startsWith(`image/`)||!jw({type:e},r.value))continue;let n=await t.getType(e),a=await Nw(n);i.push({blob:n,clipboardItem:t,fingerprint:a,mimeType:e})}let c=o(),l=i.some(e=>!c.has(e.fingerprint));l&&s(new Set);let u=l?new Set:c,d=[];for(let{blob:e,clipboardItem:t,fingerprint:r,mimeType:a}of i){if(u.has(r))continue;let i=await Pw(t,a),o=new File([e],i,{type:a});n.value!==null&&n.value(o)!==!0||d.push({file:o,fingerprint:r})}a.value=d}let p=(0,f.computed)(()=>a.value.map(e=>e.file));Fw({clear:l,files:p,upload:u});async function h(e){if(t.value)return;let i=e.clipboardData?.files;if(!i||i.length===0)return;let o=[];for(let e of Array.from(i)){if(!jw({type:e.type},r.value)||n.value!==null&&n.value(e)!==!0)continue;let t=await Nw(e);o.push({file:e,fingerprint:t})}o.length>0&&(a.value=o)}return(0,m.useEventListener)(window,`focus`,d),(0,m.useEventListener)(window,`paste`,h),d(),(e,t)=>(0,f.renderSlot)(e.$slots,`default`,{files:p.value})}}),zw=(0,f.defineComponent)({__name:`BaseFileUploadClipboardRemove`,setup(e){let{clear:t}=Iw();return(e,n)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.Primitive),{"as-child":!0,onClick:(0,f.unref)(t)},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`)]),_:3},8,[`onClick`]))}}),Bw=(0,f.defineComponent)({__name:`BaseFileUploadClipboardUpload`,setup(e){let{upload:t}=Iw();return(e,n)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.Primitive),{"as-child":!0,onClick:(0,f.unref)(t)},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`)]),_:3},8,[`onClick`]))}}),Vw=(0,f.defineComponent)({__name:`BaseFileUploadDropzone`,setup(e){let t=(0,f.ref)(!1),{isDisabled:n,isMultiple:r,onFilesSelected:i}=Dw(),a=(0,f.ref)(null),{isOverDropZone:o}=(0,m.useDropZone)((0,f.computed)(()=>a.value?.$el??null),{multiple:r.value,onDrop:e=>{n.value||e!==null&&e.length>0&&i(e)}}),s=0;function c(e,r){if(n.value){s=0,t.value=!1;return}switch(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`copy`),r){case`enter`:s+=1,t.value=!0;break;case`leave`:--s,s===0&&(t.value=!1);break;case`drop`:s=0,t.value=!1;break}}return(0,m.useEventListener)(document.body,`dragenter`,e=>c(e,`enter`)),(0,m.useEventListener)(document.body,`dragover`,e=>c(e,`over`)),(0,m.useEventListener)(document.body,`dragleave`,e=>c(e,`leave`)),(0,m.useEventListener)(document.body,`drop`,e=>c(e,`drop`)),(e,r)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.Primitive),{ref_key:`dropzoneRef`,ref:a,"as-child":!0},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`,{isHoveringOverDropzone:(0,f.unref)(n)?!1:(0,f.unref)(o),isHoveringOverPage:t.value})]),_:3},512))}}),[Hw,Uw]=F(`baseFileUploadItemContext`),Ww=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~`.split(``),Gw=e=>{let t=0;for(let n=0;n<e.length;n++){let r=e[n],i=Ww.indexOf(r);t=t*83+i}return t},Kw=(e,t)=>{var n=``;for(let r=1;r<=t;r++){let i=Math.floor(e)/83**(t-r)%83;n+=Ww[Math.floor(i)]}return n},qw=e=>{let t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4},Jw=e=>{let t=Math.max(0,Math.min(1,e));return Math.trunc(t<=.0031308?t*12.92*255+.5:(1.055*t**.4166666666666667-.055)*255+.5)},Yw=e=>e<0?-1:1,Xw=(e,t)=>Yw(e)*Math.abs(e)**+t,Zw=class extends Error{constructor(e){super(e),this.name=`ValidationError`,this.message=e}},Qw=e=>{if(!e||e.length<6)throw new Zw(`The blurhash string must be at least 6 characters`);let t=Gw(e[0]),n=Math.floor(t/9)+1,r=t%9+1;if(e.length!==4+2*r*n)throw new Zw(`blurhash length mismatch: length is ${e.length} but it should be ${4+2*r*n}`)},$w=e=>{let t=e>>16,n=e>>8&255,r=e&255;return[qw(t),qw(n),qw(r)]},eT=(e,t)=>{let n=Math.floor(e/361),r=Math.floor(e/19)%19,i=e%19;return[Xw((n-9)/9,2)*t,Xw((r-9)/9,2)*t,Xw((i-9)/9,2)*t]},tT=(e,t,n,r)=>{Qw(e),r|=1;let i=Gw(e[0]),a=Math.floor(i/9)+1,o=i%9+1,s=(Gw(e[1])+1)/166,c=Array(o*a);for(let t=0;t<c.length;t++)t===0?c[t]=$w(Gw(e.substring(2,6))):c[t]=eT(Gw(e.substring(4+t*2,6+t*2)),s*r);let l=t*4,u=new Uint8ClampedArray(l*n);for(let e=0;e<n;e++)for(let r=0;r<t;r++){let i=0,s=0,d=0;for(let l=0;l<a;l++)for(let a=0;a<o;a++){let u=Math.cos(Math.PI*r*a/t)*Math.cos(Math.PI*e*l/n),f=c[a+l*o];i+=f[0]*u,s+=f[1]*u,d+=f[2]*u}let f=Jw(i),p=Jw(s),m=Jw(d);u[4*r+0+e*l]=f,u[4*r+1+e*l]=p,u[4*r+2+e*l]=m,u[4*r+3+e*l]=255}return u},nT=4,rT=(e,t,n,r)=>{let i=0,a=0,o=0,s=t*nT;for(let c=0;c<t;c++){let t=nT*c;for(let l=0;l<n;l++){let n=t+l*s,u=r(c,l);i+=u*qw(e[n]),a+=u*qw(e[n+1]),o+=u*qw(e[n+2])}}let c=1/(t*n);return[i*c,a*c,o*c]},iT=e=>{let t=Jw(e[0]),n=Jw(e[1]),r=Jw(e[2]);return(t<<16)+(n<<8)+r},aT=(e,t)=>{let n=Math.floor(Math.max(0,Math.min(18,Math.floor(Xw(e[0]/t,.5)*9+9.5)))),r=Math.floor(Math.max(0,Math.min(18,Math.floor(Xw(e[1]/t,.5)*9+9.5)))),i=Math.floor(Math.max(0,Math.min(18,Math.floor(Xw(e[2]/t,.5)*9+9.5))));return n*19*19+r*19+i},oT=(e,t,n,r,i)=>{if(r<1||r>9||i<1||i>9)throw new Zw(`BlurHash must have between 1 and 9 components`);if(t*n*4!==e.length)throw new Zw(`Width and height must match the pixels array`);let a=[];for(let o=0;o<i;o++)for(let i=0;i<r;i++){let r=i==0&&o==0?1:2,s=rT(e,t,n,(e,a)=>r*Math.cos(Math.PI*i*e/t)*Math.cos(Math.PI*o*a/n));a.push(s)}let o=a[0],s=a.slice(1),c=``,l=r-1+(i-1)*9;c+=Kw(l,1);let u;if(s.length>0){let e=Math.max(...s.map(e=>Math.max(...e))),t=Math.floor(Math.max(0,Math.min(82,Math.floor(e*166-.5))));u=(t+1)/166,c+=Kw(t,1)}else u=1,c+=Kw(0,1);return c+=Kw(iT(o),4),s.forEach(e=>{c+=Kw(aT(e,u),2)}),c},sT=class{static async encode(e){if(!e.type.startsWith(`image/`))return null;let t=URL.createObjectURL(e),n;try{n=await this.loadImage(t)}catch{return URL.revokeObjectURL(t),null}URL.revokeObjectURL(t);let r=this.getClampedSize(n.width,n.height,32),i=this.getImageData(n,r.width,r.height);try{return oT(i.data,i.width,i.height,4,4)}catch{return null}}static getClampedSize(e,t,n){return e>=t&&e>n?{height:Math.round(t/e*n),width:n}:t>e&&t>n?{height:n,width:Math.round(e/t*n)}:{height:t,width:e}}static getImageData(e,t,n){let r=document.createElement(`canvas`);r.width=t,r.height=n;let i=r.getContext(`2d`);return i.drawImage(e,0,0,t,n),i.getImageData(0,0,t,n)}static loadImage(e){return new Promise((t,n)=>{let r=new Image;r.addEventListener(`load`,()=>t(r)),r.addEventListener(`error`,(...e)=>n(e)),r.src=e})}},cT=(0,f.defineComponent)({__name:`BaseFileUploadItem`,props:{item:{}},setup(e){let t=e,{isPublic:n,preprocess:r,onError:i,onRemoveFileUploadItem:a,onReplaceFileUploadItem:o,onStartUpload:s,onSuccess:c,onUpdateProgress:l}=Dw(),{fileUploadAdapter:u}=J();if(u.value===null)throw Error(`[BaseFileUpload] No adapter provided. Add an adapter to the ConfigProvider.
525
+ `,`grid w-full gap-xs overflow-hidden text-left duration-100`]),style:(0,f.normalizeStyle)({gridTemplateColumns:a})},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(I),{align:`center`,justify:`center`,class:`h-full`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(_o,{name:t.name??t.email,src:t.avatarUrl,"is-static-color":!0,size:`xs`},null,8,[`name`,`src`])]),_:1}),(0,f.createVNode)(Vb,null,{default:(0,f.withCtx)(()=>[(0,f.unref)(r)!==`minified`||(0,f.unref)(n)?((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(I),{key:0,justify:`between`,align:`center`,gap:`xxs`,class:`overflow-hidden`},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`div`,tx,[(0,f.createVNode)((0,f.unref)(U),{text:t.name??`-`,"is-tooltip-disabled":!0,class:`w-full text-xs font-semibold text-primary`},null,8,[`text`]),(0,f.createVNode)((0,f.unref)(U),{text:t.email,"is-tooltip-disabled":!0,class:`w-full text-xs text-tertiary`},null,8,[`text`])]),(0,f.createVNode)(G,{align:`start`,class:`h-full`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(an),{class:`mt-xxs size-4 shrink-0 text-quaternary`})]),_:1})]),_:1})):(0,f.createCommentVNode)(``,!0)]),_:1})]),_:1},8,[`class`,`style`])])]),_:1})]),_:1},8,[`actions`]))}}),rx={};function ix(e,t){return(0,f.openBlock)(),(0,f.createElementBlock)(`div`)}var ax=H(rx,[[`render`,ix]]),ox=(0,f.defineComponent)({__name:`MainSidebarGlobalSearch`,emits:[`click`],setup(e,{emit:t}){let n=t,r=(0,g.useI18n)();function i(){n(`click`)}return(e,t)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(X),{icon:(0,f.unref)(hr),label:(0,f.unref)(r).t(`components.sidebar.global_search.label`),variant:`tertiary`,onClick:i},null,8,[`icon`,`label`]))}}),sx=(0,f.defineComponent)({__name:`MainSidebarHeaderContainer`,setup(e){let{sidebarLogoHeight:t}=Q();return(e,n)=>((0,f.openBlock)(),(0,f.createElementBlock)(`div`,{style:(0,f.normalizeStyle)({height:(0,f.unref)(t)})},[(0,f.renderSlot)(e.$slots,`default`)],4))}}),cx=[`src`,`alt`],lx=(0,f.defineComponent)({__name:`Logo`,props:{alt:{},size:{},src:{}},setup(e){let t=e,n=(0,f.ref)(!1);return(e,r)=>n.value?((0,f.openBlock)(),(0,f.createElementBlock)(`div`,{key:0,class:(0,f.normalizeClass)([{"size-12 rounded-2xl":t.size===`lg`,"size-10 rounded-xl":t.size===`md`,"size-8 rounded-lg":t.size===`sm`,"size-6 rounded-md":t.size===`xs`,"size-5 rounded-sm":t.size===`xxs`,"size-3.5 rounded-xs":t.size===`3xs`},`shrink-0 bg-quaternary`])},null,2)):((0,f.openBlock)(),(0,f.createElementBlock)(`img`,{key:1,src:t.src,alt:t.alt,class:(0,f.normalizeClass)([{"size-12 rounded-2xl":t.size===`lg`,"size-10 rounded-xl":t.size===`md`,"size-8 rounded-lg":t.size===`sm`,"size-6 rounded-md":t.size===`xs`,"size-5 rounded-sm":t.size===`xxs`,"size-3.5 rounded-xs":t.size===`3xs`},`shrink-0 overflow-hidden from-black/20 to-white/10 object-contain dark:bg-primary-solid dark:bg-linear-to-b`]),onError:r[0]||=e=>n.value=!0},null,42,cx))}}),ux={key:0,class:`text-sm font-semibold text-secondary`},dx={key:0},fx=(0,f.defineComponent)({__name:`MainSidebarHeaderLogoWithText`,props:{name:{},url:{}},setup(e){let t=e,{isSidebarOpen:n,collapsedVariant:r,sidebarLogoPadding:i}=Q();return(e,a)=>((0,f.openBlock)(),(0,f.createBlock)(sx,null,{default:(0,f.withCtx)(()=>[(0,f.createVNode)(I,{justify:`between`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(I,{style:(0,f.normalizeStyle)({padding:(0,f.unref)(i)})},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(lx,{src:t.url,alt:`Logo`,size:`xs`},null,8,[`src`]),(0,f.createVNode)(Vb,null,{default:(0,f.withCtx)(()=>[(0,f.unref)(r)!==`minified`||(0,f.unref)(n)?((0,f.openBlock)(),(0,f.createElementBlock)(`span`,ux,(0,f.toDisplayString)(t.name),1)):(0,f.createCommentVNode)(``,!0)]),_:1})]),_:1},8,[`style`]),(0,f.createVNode)(Vb,null,{default:(0,f.withCtx)(()=>[(0,f.unref)(r)!==`minified`||(0,f.unref)(n)?((0,f.openBlock)(),(0,f.createElementBlock)(`div`,dx,[(0,f.renderSlot)(e.$slots,`right`)])):(0,f.createCommentVNode)(``,!0)]),_:3})]),_:3})]),_:3}))}}),px={class:`truncate text-xs text-secondary`},mx=(0,f.defineComponent)({__name:`MainSidebarHeaderReturnToApp`,props:{to:{}},setup(e){let t=e,n=(0,g.useI18n)(),{isSidebarOpen:r,closeIfFloatingSidebar:i,collapsedVariant:a,sidebarIconCellSize:o,sidebarIconSize:s}=Q(),c=`${o} 1fr`;return(e,l)=>((0,f.openBlock)(),(0,f.createBlock)(sx,null,{default:(0,f.withCtx)(()=>[(0,f.createVNode)(I,{class:`w-fit`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(W,{"keyboard-shortcut":{key:`Backspace`,mod:!0},label:(0,f.unref)(n).t(`components.sidebar.return_to_app`)},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(Z,null,{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(y.RouterLink),{to:t.to,style:(0,f.normalizeStyle)({height:(0,f.unref)(o),gridTemplateColumns:c}),"aria-label":(0,f.unref)(n).t(`components.sidebar.return_to_app`),class:`grid w-full rounded-md duration-100 hover:bg-secondary-hover`,onClick:l[0]||=e=>(0,f.unref)(i)()},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(I,{style:(0,f.normalizeStyle)({width:(0,f.unref)(o),height:(0,f.unref)(o)}),align:`center`,justify:`center`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(ln),{style:(0,f.normalizeStyle)({width:(0,f.unref)(s),height:(0,f.unref)(s)}),class:`shrink-0 text-secondary`},null,8,[`style`])]),_:1},8,[`style`]),(0,f.createVNode)(Vb,null,{default:(0,f.withCtx)(()=>[(0,f.unref)(a)!==`minified`||(0,f.unref)(r)?((0,f.openBlock)(),(0,f.createBlock)(I,{key:0,align:`center`,class:`overflow-hidden pr-md`},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`span`,px,(0,f.toDisplayString)((0,f.unref)(n).t(`components.sidebar.return_to_app`)),1)]),_:1})):(0,f.createCommentVNode)(``,!0)]),_:1})]),_:1},8,[`to`,`style`,`aria-label`])]),_:1})]),_:1},8,[`label`])]),_:1})]),_:1}))}}),hx={class:`w-full`},gx=(0,f.defineComponent)({__name:`MainSidebarNavigationGroup`,props:{label:{default:null}},setup(e){let t=e,{isSidebarOpen:n,collapsedVariant:r}=Q();return(e,i)=>((0,f.openBlock)(),(0,f.createElementBlock)(`div`,hx,[t.label===null?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createElementBlock)(`span`,{key:0,class:(0,f.normalizeClass)([{"opacity-0":(0,f.unref)(r)===`minified`&&!(0,f.unref)(n)},`block px-sm pb-sm text-xs font-medium whitespace-nowrap text-quaternary transition-opacity duration-150 ease-in-out`])},(0,f.toDisplayString)(t.label),3)),(0,f.createVNode)((0,f.unref)(G),{align:`start`,gap:`xs`},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`)]),_:3})]))}}),_x=(0,f.defineComponent)({__name:`MainSidebarNavigationGroups`,setup(e){return(e,t)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(G),{gap:`2xl`},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`)]),_:3}))}}),[vx,yx]=F(`MainSidebarNavigationLinkContextKey`),bx=(0,f.defineComponent)({__name:`MainSidebarNavigationLinkProvider`,props:{isActive:{type:Boolean}},setup(e){let t=e;return vx({isActive:(0,f.computed)(()=>t.isActive)}),(e,t)=>(0,f.renderSlot)(e.$slots,`default`)}}),xx=[`data-active`],Sx={class:`truncate text-xs font-medium whitespace-nowrap text-secondary duration-100 group-hover:text-primary group-data-active:text-brand-secondary`},Cx=(0,f.defineComponent)({__name:`MainSidebarNavigationLinkButton`,props:{isActive:{type:Function,default:()=>!1},isTooltipDisabled:{type:Boolean},icon:{},keyboardShortcut:{default:null},label:{},to:{}},emits:[`click`],setup(e,{emit:t}){let n=e,r=t,i=(0,y.useRoute)(),{isSidebarOpen:a,collapsedVariant:o,sidebarIconCellSize:s,sidebarIconSize:c,sidebarLinkHeight:l}=Q(),u=`${s} 1fr`;function d(){r(`click`)}return(t,r)=>((0,f.openBlock)(),(0,f.createBlock)(W,{"is-disabled":e.isTooltipDisabled,"keyboard-shortcut":n.keyboardShortcut,label:n.label,"popover-side":`right`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(Z,null,{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(y.RouterLink),{to:n.to,class:`w-full`,onClick:d},{default:(0,f.withCtx)(({isActive:e})=>[(0,f.createVNode)(bx,{"is-active":e},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`div`,{"data-active":e||n.isActive((0,f.unref)(i))||void 0,style:(0,f.normalizeStyle)({height:(0,f.unref)(l),gridTemplateColumns:u}),class:`group grid rounded-md duration-100 hover:bg-fg-primary/4 data-active:bg-fg-primary/4`},[(0,f.createVNode)(I,{style:(0,f.normalizeStyle)({width:(0,f.unref)(s),height:(0,f.unref)(s)}),align:`center`,justify:`center`},{default:(0,f.withCtx)(()=>[((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(n.icon),{style:(0,f.normalizeStyle)({width:(0,f.unref)(c),height:(0,f.unref)(c)}),class:`shrink-0 text-fg-quaternary duration-100 group-data-active:text-fg-brand-primary dark:group-data-active:text-fg-primary`},null,8,[`style`]))]),_:1},8,[`style`]),(0,f.createVNode)(Vb,null,{default:(0,f.withCtx)(()=>[(0,f.unref)(o)!==`minified`||(0,f.unref)(a)?((0,f.openBlock)(),(0,f.createBlock)(I,{key:0,align:`center`,justify:`between`,gap:`md`,class:`overflow-hidden pr-md`},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`span`,Sx,(0,f.toDisplayString)(n.label),1),(0,f.createVNode)(I,{gap:`lg`,align:`center`,class:`shrink-0`},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(t.$slots,`right`)]),_:3})]),_:3})):(0,f.createCommentVNode)(``,!0)]),_:3})],12,xx)]),_:2},1032,[`is-active`])]),_:3},8,[`to`])]),_:3})]),_:3},8,[`is-disabled`,`keyboard-shortcut`,`label`]))}}),wx=[`data-active`],Tx={class:`truncate text-xs whitespace-nowrap text-tertiary duration-100 group-hover:text-primary group-data-active:text-brand-secondary`},Ex=`1px`,Dx=`0.25rem`,Ox=(0,f.defineComponent)({__name:`MainSidebarNavigationSubItem`,props:{isIndented:{type:Boolean,default:!0},label:{},noIndent:{type:Boolean},to:{}},emits:[`click`],setup(e,{emit:t}){let n=e,r=t,i=(0,f.computed)(()=>n.noIndent===!0?!1:n.isIndented),{closeIfFloatingSidebar:a,sidebarIconCellSize:o}=Q(),s=`calc(${o} / 2 - ${Dx} - ${Ex})`;function c(){a(),r(`click`)}return(e,t)=>((0,f.openBlock)(),(0,f.createBlock)(Z,null,{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(y.RouterLink),{to:n.to,class:`w-full`,onClick:c},{default:(0,f.withCtx)(({isActive:e})=>[(0,f.createElementVNode)(`div`,{"data-active":e||void 0,style:(0,f.normalizeStyle)({paddingLeft:i.value?s:void 0,height:`1.5rem`}),class:(0,f.normalizeClass)([i.value?`pr-md`:`px-sm`,`group flex items-center rounded-md duration-100 hover:bg-fg-primary/4 data-active:bg-fg-primary/4`])},[(0,f.createElementVNode)(`span`,Tx,(0,f.toDisplayString)(n.label),1)],14,wx)]),_:1},8,[`to`])]),_:1}))}}),kx={class:`truncate text-xs font-medium whitespace-nowrap text-secondary duration-100 group-hover:text-primary`},Ax=(0,f.defineComponent)({__name:`MainSidebarNavigationLinkCollapsible`,props:{isSubItemsActive:{type:Boolean},isTooltipDisabled:{type:Boolean},icon:{},keyboardShortcut:{},label:{},subItems:{}},setup(e){let t=e,n=(0,f.ref)(!0),{isSidebarOpen:r,collapsedVariant:i,sidebarIconCellSize:a,sidebarIconSize:o,sidebarLinkHeight:s}=Q();(0,f.watch)(()=>t.isSubItemsActive,e=>{e&&(n.value=!0)});let c=`${a} 1fr`;return(l,u)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.CollapsibleRoot),{open:n.value,"onUpdate:open":u[1]||=e=>n.value=e,class:`w-full`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(W,{"is-disabled":e.isTooltipDisabled,"keyboard-shortcut":t.keyboardShortcut,label:t.label,"popover-side":`right`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(Z,null,{default:(0,f.withCtx)(()=>[(0,f.createVNode)(bx,{"is-active":e.isSubItemsActive},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`button`,{style:(0,f.normalizeStyle)({height:(0,f.unref)(s),gridTemplateColumns:c}),type:`button`,class:`group grid w-full rounded-md duration-100 hover:bg-fg-primary/4`,onClick:u[0]||=e=>n.value=!n.value},[(0,f.createVNode)(I,{style:(0,f.normalizeStyle)({width:(0,f.unref)(a),height:(0,f.unref)(a)}),align:`center`,justify:`center`},{default:(0,f.withCtx)(()=>[((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(t.icon),{style:(0,f.normalizeStyle)({width:(0,f.unref)(o),height:(0,f.unref)(o)}),class:`shrink-0 text-fg-quaternary duration-100`},null,8,[`style`]))]),_:1},8,[`style`]),(0,f.createVNode)(Vb,null,{default:(0,f.withCtx)(()=>[(0,f.unref)(i)!==`minified`||(0,f.unref)(r)?((0,f.openBlock)(),(0,f.createBlock)(I,{key:0,align:`center`,justify:`between`,gap:`md`,class:`overflow-hidden pr-md`},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`span`,kx,(0,f.toDisplayString)(t.label),1),(0,f.createVNode)((0,f.unref)(an),{class:(0,f.normalizeClass)([{"rotate-180":n.value},`size-3.5 shrink-0 text-fg-quaternary duration-150`])},null,8,[`class`])]),_:1})):(0,f.createCommentVNode)(``,!0)]),_:1})],4)]),_:1},8,[`is-active`])]),_:1})]),_:1},8,[`is-disabled`,`keyboard-shortcut`,`label`]),(0,f.createVNode)((0,f.unref)(h.CollapsibleContent),{class:`overflow-hidden data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down`},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`div`,{style:(0,f.normalizeStyle)({marginLeft:`calc(${(0,f.unref)(a)} / 2)`}),class:`mt-xs flex flex-col gap-xs border-l border-secondary pl-xs`},[((0,f.openBlock)(!0),(0,f.createElementBlock)(f.Fragment,null,(0,f.renderList)(t.subItems,e=>((0,f.openBlock)(),(0,f.createBlock)(Ox,{key:e.label,label:e.label,to:e.to},null,8,[`label`,`to`]))),128))],4)]),_:1})]),_:1},8,[`open`]))}}),jx=[`data-active`],Mx={class:`truncate text-xs font-medium whitespace-nowrap text-secondary duration-100 group-hover:text-primary group-data-active:text-brand-secondary`},Nx={class:`relative overflow-hidden rounded-md border border-secondary bg-primary shadow-lg`},Px={class:`flex min-w-36 flex-col gap-xs p-xs`},Fx=(0,f.defineComponent)({__name:`MainSidebarNavigationLinkPopover`,props:(0,f.mergeModels)({isSubItemsActive:{type:Boolean},icon:{},label:{},subItems:{}},{isPopoverOpen:{type:Boolean,default:!1},isPopoverOpenModifiers:{}}),emits:[`update:isPopoverOpen`],setup(e){let t=e,n=(0,f.useModel)(e,`isPopoverOpen`),{isSidebarOpen:r,collapsedVariant:i,sidebarIconCellSize:a,sidebarIconSize:o,sidebarLinkHeight:s}=Q(),c=`${a} 1fr`;function l(){n.value=!n.value}return(u,d)=>((0,f.openBlock)(),(0,f.createBlock)(bx,{"is-active":e.isSubItemsActive},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(h.HoverCardRoot),{open:n.value,"onUpdate:open":d[4]||=e=>n.value=e,"open-delay":150,"close-delay":150},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(h.HoverCardTrigger),{"as-child":!0},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(Z,null,{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`button`,{"data-active":e.isSubItemsActive||void 0,style:(0,f.normalizeStyle)({height:(0,f.unref)(s),gridTemplateColumns:c}),type:`button`,class:`group grid w-full rounded-md duration-100 hover:bg-fg-primary/4 data-active:bg-fg-primary/4`,onClick:d[0]||=e=>l(),onKeydown:[d[1]||=(0,f.withKeys)((0,f.withModifiers)(e=>l(),[`prevent`]),[`enter`]),d[2]||=(0,f.withKeys)((0,f.withModifiers)(e=>l(),[`prevent`]),[`space`])]},[(0,f.createVNode)(I,{style:(0,f.normalizeStyle)({width:(0,f.unref)(a),height:(0,f.unref)(a)}),align:`center`,justify:`center`},{default:(0,f.withCtx)(()=>[((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(t.icon),{style:(0,f.normalizeStyle)({width:(0,f.unref)(o),height:(0,f.unref)(o)}),class:`shrink-0 text-fg-quaternary duration-100 group-data-active:text-fg-brand-primary dark:group-data-active:text-fg-primary`},null,8,[`style`]))]),_:1},8,[`style`]),(0,f.createVNode)(Vb,null,{default:(0,f.withCtx)(()=>[(0,f.unref)(i)!==`minified`||(0,f.unref)(r)?((0,f.openBlock)(),(0,f.createBlock)(I,{key:0,align:`center`,justify:`between`,gap:`md`,class:`overflow-hidden pr-md`},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`span`,Mx,(0,f.toDisplayString)(t.label),1)]),_:1})):(0,f.createCommentVNode)(``,!0)]),_:1})],44,jx)]),_:1})]),_:1}),(0,f.createVNode)((0,f.unref)(h.HoverCardPortal),{to:`body`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(ei,{"as-child":!0},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(h.HoverCardContent),{"side-offset":4,align:`start`,"data-animation":`sidebar-hover-card`,side:`right`,"position-strategy":`absolute`,sticky:`always`,class:`z-50 origin-(--reka-hover-card-content-transform-origin) will-change-[transform,opacity]`},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`div`,Nx,[(0,f.createElementVNode)(`div`,Px,[((0,f.openBlock)(!0),(0,f.createElementBlock)(f.Fragment,null,(0,f.renderList)(t.subItems,e=>((0,f.openBlock)(),(0,f.createBlock)(Ox,{key:e.label,label:e.label,to:e.to,"is-indented":!1,onClick:d[3]||=e=>n.value=!1},null,8,[`label`,`to`]))),128))])])]),_:1})]),_:1})]),_:1})]),_:1},8,[`open`])]),_:1},8,[`is-active`]))}}),Ix=(0,f.defineComponent)({__name:`MainSidebarNavigationLink`,props:(0,f.mergeModels)({to:{},type:{default:`link`},isActive:{type:Function,default:()=>!1},icon:{},label:{},onClick:{},keyboardShortcut:{default:null},subItems:{}},{isPopoverOpen:{type:Boolean,default:!1},isPopoverOpenModifiers:{}}),emits:(0,f.mergeModels)([`click`],[`update:isPopoverOpen`]),setup(e,{emit:t}){let n=e,r=t,{isSidebarOpen:i,closeIfFloatingSidebar:a,collapsedVariant:o}=Q(),s=(0,y.useRoute)(),c=(0,y.useRouter)(),l=(0,f.computed)(()=>n.type===`sub-items`),u=(0,f.computed)(()=>v(n)?n:null),d=(0,f.computed)(()=>v(n)?null:n),p=(0,f.computed)(()=>l.value&&!i.value),m=(0,f.computed)(()=>n.isActive?.(s)?!0:u.value?.subItems.some(e=>{let t=c.resolve(e.to);return t.name!=null&&t.name===s.name?!0:t.path!==`/`&&s.path.startsWith(t.path)})??!1),h=(0,f.useModel)(e,`isPopoverOpen`),g=(0,f.computed)(()=>!!(p.value||o.value===`hidden`&&n.keyboardShortcut===null||o.value===`minified`&&i.value&&n.keyboardShortcut===null));function _(){a(),r(`click`)}function v(e){return e.type===`sub-items`}return(0,f.onMounted)(()=>{!v(n)&&`subItems`in n&&n.subItems!=null&&console.warn("[MainSidebarNavigationLink] Received `subItems` but `type` is missing or set to 'link'. Set `type: 'sub-items'` to render this item as an expandable group.")}),(e,t)=>p.value&&u.value!==null?((0,f.openBlock)(),(0,f.createBlock)(Fx,{key:0,"is-popover-open":h.value,"onUpdate:isPopoverOpen":t[0]||=e=>h.value=e,icon:n.icon,"is-sub-items-active":m.value,label:n.label,"sub-items":u.value.subItems},null,8,[`is-popover-open`,`icon`,`is-sub-items-active`,`label`,`sub-items`])):l.value&&u.value!==null?((0,f.openBlock)(),(0,f.createBlock)(Ax,{key:1,icon:n.icon,"is-sub-items-active":m.value,"is-tooltip-disabled":g.value,"keyboard-shortcut":n.keyboardShortcut,label:n.label,"sub-items":u.value.subItems},null,8,[`icon`,`is-sub-items-active`,`is-tooltip-disabled`,`keyboard-shortcut`,`label`,`sub-items`])):d.value===null?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createBlock)(Cx,{key:2,icon:n.icon,"is-active":n.isActive,"is-tooltip-disabled":g.value,"keyboard-shortcut":n.keyboardShortcut,label:n.label,to:d.value.to,onClick:_},{right:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`right`)]),_:3},8,[`icon`,`is-active`,`is-tooltip-disabled`,`keyboard-shortcut`,`label`,`to`]))}}),Lx=(0,f.defineComponent)({__name:`BadgeSeparator`,setup(e){let{variants:t}=ly();return(e,n)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)($o),{class:(0,f.normalizeClass)((0,f.unref)(t).separator()),orientation:`vertical`},null,8,[`class`]))}}),Rx=(0,f.defineComponent)({__name:`MainSidebarNavigationLinkBadge`,props:{label:{}},setup(e){let t=e,{isActive:n}=yx();return(e,r)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(gy),{label:t.label,color:(0,f.unref)(n)?`brand`:`gray`,size:`sm`},null,8,[`label`,`color`]))}}),zx={},Bx={class:`size-2 rounded-full bg-success-500`};function Vx(e,t){return(0,f.openBlock)(),(0,f.createElementBlock)(`div`,Bx)}var Hx=H(zx,[[`render`,Vx]]),[Ux,Wx]=F(`mainLayoutContext`);function Gx(){return Wx(null)??{isBrandedActive:(0,f.computed)(()=>!1),variant:(0,f.computed)(()=>`default`)}}var Kx={class:`flex h-full flex-col justify-between overflow-hidden text-primary`},qx=(0,f.defineComponent)({__name:`MainSidebarContent`,setup(e){let{sidebarContainerPadding:t}=Q();return(e,n)=>((0,f.openBlock)(),(0,f.createElementBlock)(`div`,Kx,[(0,f.createElementVNode)(`div`,{style:(0,f.normalizeStyle)({paddingLeft:(0,f.unref)(t),paddingRight:(0,f.unref)(t),paddingBottom:(0,f.unref)(t)})},[(0,f.renderSlot)(e.$slots,`header`)],4),(0,f.createElementVNode)(`nav`,{style:(0,f.normalizeStyle)({padding:(0,f.unref)(t)}),class:`flex h-full flex-col justify-between gap-2xl overflow-x-hidden overflow-y-auto`},[(0,f.renderSlot)(e.$slots,`navigation`),(0,f.renderSlot)(e.$slots,`bottom-navigation`)],4),(0,f.createElementVNode)(`div`,{style:(0,f.normalizeStyle)({padding:(0,f.unref)(t)}),class:`flex flex-col gap-sm`},[(0,f.renderSlot)(e.$slots,`footer`)],4)]))}}),Jx=(0,f.defineComponent)({__name:`MainSidebarTransition`,setup(e){let t=np();return(e,n)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(_.Motion),{initial:{transform:`translateX(-100%)`},animate:{transform:`translateX(0%)`},exit:{transform:`translateX(-100%)`},transition:{duration:(0,f.unref)(t)?0:.3,type:`spring`,bounce:0}},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`)]),_:3},8,[`transition`]))}}),Yx=(0,f.defineComponent)({__name:`MainSidebar`,props:{collapsedVariant:{default:`hidden`}},setup(e){let t=e,{isFloatingSidebar:n,isSidebarOpen:r,setCollapsedVariant:i,sidebarWidth:a}=Q(),o=(0,g.useI18n)(),s=np(),{isBrandedActive:c}=Gx(),l=(0,f.computed)(()=>c.value?[`default`,`branded`]:null);return i(t.collapsedVariant),(t,i)=>(0,f.unref)(n)?((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.DialogRoot),{key:0,open:(0,f.unref)(r),"onUpdate:open":i[0]||=e=>(0,f.isRef)(r)?r.value=e:null},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(_.AnimatePresence),{initial:!1},{default:(0,f.withCtx)(()=>[(0,f.unref)(r)?((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.DialogContent),{key:0,"as-child":!0,"force-mount":!0},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(Jx,{class:`absolute z-6 h-full w-64 p-md outline-none`},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`div`,{class:(0,f.normalizeClass)([l.value,`size-full rounded-xl border border-secondary bg-secondary py-md shadow-lg/5`])},[(0,f.createVNode)((0,f.unref)(h.DialogTitle),{as:`h1`,class:`sr-only`},{default:(0,f.withCtx)(()=>[(0,f.createTextVNode)((0,f.toDisplayString)((0,f.unref)(o).t(`components.sidebar.title`)),1)]),_:1}),(0,f.createVNode)((0,f.unref)(h.DialogDescription),{class:`sr-only`,as:`p`},{default:(0,f.withCtx)(()=>[(0,f.createTextVNode)((0,f.toDisplayString)((0,f.unref)(o).t(`components.sidebar.description`)),1)]),_:1}),(0,f.createVNode)(qx,null,{header:(0,f.withCtx)(()=>[(0,f.renderSlot)(t.$slots,`header`)]),navigation:(0,f.withCtx)(()=>[(0,f.renderSlot)(t.$slots,`navigation`)]),"bottom-navigation":(0,f.withCtx)(()=>[(0,f.renderSlot)(t.$slots,`bottom-navigation`)]),footer:(0,f.withCtx)(()=>[(0,f.renderSlot)(t.$slots,`footer`)]),_:3})],2)]),_:3})]),_:3})):(0,f.createCommentVNode)(``,!0),(0,f.unref)(r)?((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.DialogOverlay),{key:1,"as-child":!0},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(_.Motion),{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:(0,f.unref)(s)?0:.3},class:`absolute inset-0 z-5 bg-black/10`},null,8,[`transition`])]),_:1})):(0,f.createCommentVNode)(``,!0)]),_:3})]),_:3},8,[`open`])):e.collapsedVariant===`hidden`?((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(_.AnimatePresence),{key:1,initial:!1},{default:(0,f.withCtx)(()=>[(0,f.unref)(r)?((0,f.openBlock)(),(0,f.createBlock)(Jx,{key:0,style:(0,f.normalizeStyle)({width:(0,f.unref)(a)}),class:`absolute h-full pt-md`},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`div`,{class:(0,f.normalizeClass)([l.value,`size-full`])},[(0,f.createVNode)(qx,null,{header:(0,f.withCtx)(()=>[(0,f.renderSlot)(t.$slots,`header`)]),navigation:(0,f.withCtx)(()=>[(0,f.renderSlot)(t.$slots,`navigation`)]),"bottom-navigation":(0,f.withCtx)(()=>[(0,f.renderSlot)(t.$slots,`bottom-navigation`)]),footer:(0,f.withCtx)(()=>[(0,f.renderSlot)(t.$slots,`footer`)]),_:3})],2)]),_:3},8,[`style`])):(0,f.createCommentVNode)(``,!0)]),_:3})):((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(_.Motion),{key:2,initial:!1,animate:{width:(0,f.unref)(a)},transition:{duration:(0,f.unref)(s)?0:.3,type:`spring`,bounce:0},style:(0,f.normalizeStyle)({width:(0,f.unref)(a)}),class:`absolute z-1 h-full overflow-hidden pt-[0.475rem]`},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`div`,{class:(0,f.normalizeClass)([l.value,`size-full`])},[(0,f.createVNode)(qx,null,{header:(0,f.withCtx)(()=>[(0,f.renderSlot)(t.$slots,`header`)]),navigation:(0,f.withCtx)(()=>[(0,f.renderSlot)(t.$slots,`navigation`)]),"bottom-navigation":(0,f.withCtx)(()=>[(0,f.renderSlot)(t.$slots,`bottom-navigation`)]),footer:(0,f.withCtx)(()=>[(0,f.renderSlot)(t.$slots,`footer`)]),_:3})],2)]),_:3},8,[`animate`,`transition`,`style`]))}}),Xx=(0,f.defineComponent)({__name:`TextShimmer`,setup(e){return(e,t)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.Primitive),{"as-child":!0,class:`animate-shimmer bg-[linear-gradient(110deg,var(--text-disabled)_40%,var(--text-primary)_50%,var(--text-disabled)_60%)] bg-size-[300%_100%] bg-clip-text! text-transparent dark:bg-[linear-gradient(110deg,var(--text-disabled)_40%,var(--text-primary)_50%,var(--text-disabled)_60%)]`},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`)]),_:3}))}}),Zx={class:`size-full p-md pl-none`},Qx={class:`size-full rounded-2xl border border-secondary bg-primary shadow-sm/5`},$x={class:`text-sm font-medium`},eS=(0,f.defineComponent)({__name:`ApplicationLoadingView`,props:{isFetchingAuthUser:{type:Boolean}},setup(e){let t=e,n=(0,g.useI18n)(),r=(0,y.useRouter)(),{isFloatingSidebar:i,isSidebarOpen:a,sidebarWidth:o}=Q(),s=(0,f.ref)(!0),c=(0,f.ref)(!1),l=np();r.isReady().then(()=>{s.value=!1});let u=(0,f.computed)(()=>t.isFetchingAuthUser||s.value);return setTimeout(()=>{c.value=!0},500),(e,t)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(_.AnimatePresence),null,{default:(0,f.withCtx)(()=>[u.value?((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(_.Motion),{key:0,exit:{opacity:0},transition:{duration:(0,f.unref)(l)?0:.2},style:(0,f.normalizeStyle)({paddingLeft:(0,f.unref)(a)&&!(0,f.unref)(i)?(0,f.unref)(o):`0.5rem`}),class:`absolute inset-0 z-99 size-full bg-secondary`},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`div`,Zx,[(0,f.createElementVNode)(`div`,Qx,[c.value?((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(G),{key:0,class:`size-full`,align:`center`,justify:`center`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(Xx),null,{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`h1`,$x,(0,f.toDisplayString)((0,f.unref)(n).t(`component.dashboard_page_loading_state.loading`)),1)]),_:1})]),_:1})):(0,f.createCommentVNode)(``,!0)])])]),_:1},8,[`transition`,`style`])):(0,f.createCommentVNode)(``,!0)]),_:1}))}}),tS={class:`rounded-2xl border border-secondary bg-secondary px-lg py-sm shadow-lg duration-200 ease-in-out group-hover:translate-y-0.5 group-hover:scale-102`},nS={class:`grid grid-cols-[auto_auto] items-center gap-x-md gap-y-none`},rS={class:`flex`},iS=(0,f.defineComponent)({__name:`ApplicationOfflineWarning`,setup(e){let t=(0,g.useI18n)(),{isOnline:n}=(0,m.useNetwork)(),r=(0,f.ref)(!1),i=(0,f.computed)(()=>!n.value);function a(){r.value=!0}(0,f.watch)(i,e=>{e&&(r.value=!1)});let o=np();return(e,n)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(_.AnimatePresence),null,{default:(0,f.withCtx)(()=>[i.value&&!r.value?((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(_.Motion),{key:0,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},exit:{opacity:0,y:-40},"as-child":!0,transition:{type:`spring`,bounce:0,duration:(0,f.unref)(o)?0:.3},"while-hover":`hovered`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(Z),null,{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`button`,{class:`group absolute top-4 left-1/2 z-10 -translate-x-1/2`,onClick:a},[(0,f.createElementVNode)(`div`,tS,[(0,f.createElementVNode)(`div`,nS,[(0,f.createVNode)((0,f.unref)(Fr),{class:`size-3 text-tertiary`}),(0,f.createVNode)((0,f.unref)(U),{text:(0,f.unref)(t).t(`component.offline_warning.title`),class:`text-xs text-primary`},null,8,[`text`]),n[0]||=(0,f.createElementVNode)(`span`,null,null,-1),(0,f.createVNode)((0,f.unref)(_.Motion),{variants:{hovered:{height:`auto`,opacity:1,y:0}},initial:{height:`0px`,y:-8,opacity:0},transition:{type:`spring`,bounce:0,duration:.3},class:`will-change-transform`},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`div`,rS,[(0,f.createVNode)((0,f.unref)(U),{text:(0,f.unref)(t).t(`component.offline_warning.dismiss`),class:`text-xs text-disabled`},null,8,[`text`])])]),_:1})])])])]),_:1})]),_:1},8,[`transition`])):(0,f.createCommentVNode)(``,!0)]),_:1}))}}),aS={href:`#main-content`,class:`absolute top-2 left-2 z-99 rounded-sm bg-primary p-xs text-sm text-primary not-focus-visible:sr-only`},oS=(0,f.defineComponent)({__name:`ApplicationSkipToMainContent`,setup(e){let t=(0,g.useI18n)();return(e,n)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(Z),null,{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`a`,aS,(0,f.toDisplayString)((0,f.unref)(t).t(`component.skip_to_main_content_link.label`)),1)]),_:1}))}}),sS={class:`flex items-center gap-x-xs`},cS={key:0,class:`flex items-center gap-x-xs text-disabled`},lS={class:`text-secondary`},uS={key:2,class:`text-disabled`},dS=(0,f.defineComponent)({__name:`CommandMenuActionItem`,props:{action:{},ctx:{}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,i=(0,f.computed)(()=>(0,p.resolveActionBreadcrumbs)(n.action,n.ctx)),a=(0,f.computed)(()=>i.value.length===0?null:n.action.icon===void 0?i.value[0]?.icon??null:n.action.icon(n.ctx));return(t,n)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.ListboxItem),{value:e.action.id,"data-id":e.action.id,class:`flex cursor-default items-center justify-between rounded-md px-lg py-md text-xs`,"data-item":``,onSelect:n[0]||=e=>r(`select`)},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`div`,sS,[i.value.length>0?((0,f.openBlock)(),(0,f.createElementBlock)(`span`,cS,[((0,f.openBlock)(!0),(0,f.createElementBlock)(f.Fragment,null,(0,f.renderList)(i.value,(e,t)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(I),{key:t,gap:`xs`},{default:(0,f.withCtx)(()=>[a.value!==null&&t===0?((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(a.value),{key:0,class:`size-3.5 text-tertiary`})):(0,f.createCommentVNode)(``,!0),(0,f.createElementVNode)(`span`,null,(0,f.toDisplayString)(e.label),1),(0,f.createVNode)((0,f.unref)(pn),{class:`size-3 text-tertiary`})]),_:2},1024))),128))])):(0,f.createCommentVNode)(``,!0),(0,f.createVNode)((0,f.unref)(I),{gap:`sm`},{default:(0,f.withCtx)(()=>[(0,f.unref)(p.resolveActionAvatar)(e.action,e.ctx)===null?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(_o),(0,f.mergeProps)({key:0},(0,f.unref)(p.resolveActionAvatar)(e.action,e.ctx),{size:`xxs`}),null,16)),e.action.icon!==void 0&&i.value.length===0?((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(e.action.icon(e.ctx)),{key:1,class:`size-3.5 text-secondary`})):(0,f.createCommentVNode)(``,!0),(0,f.createElementVNode)(`span`,lS,(0,f.toDisplayString)((0,f.unref)(p.resolveActionName)(e.action,e.ctx)),1),(0,f.unref)(p.resolveActionHint)(e.action,e.ctx)?((0,f.openBlock)(),(0,f.createElementBlock)(`span`,uS,(0,f.toDisplayString)((0,f.unref)(p.resolveActionHint)(e.action,e.ctx)),1)):(0,f.createCommentVNode)(``,!0)]),_:1})]),(0,f.unref)(p.resolveActionSelected)(e.action,e.ctx)?((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(en),{key:0,class:`size-3 text-primary`})):(0,f.createCommentVNode)(``,!0),e.action.keyboardShortcut===void 0?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(di),{key:1,"keyboard-shortcut":e.action.keyboardShortcut},null,8,[`keyboard-shortcut`]))]),_:1},8,[`value`,`data-id`]))}}),fS={class:`p-lg`,role:`status`,"aria-live":`polite`},pS={class:`sr-only`},mS=(0,f.defineComponent)({__name:`CommandMenuLoadingSkeleton`,setup(e){let t=(0,g.useI18n)();return(e,n)=>((0,f.openBlock)(),(0,f.createElementBlock)(`div`,fS,[(0,f.createElementVNode)(`span`,pS,(0,f.toDisplayString)((0,f.unref)(t).t(`component.command_menu.loading_actions`)),1),(0,f.createVNode)((0,f.unref)(G),{gap:`4xl`},{default:(0,f.withCtx)(()=>[((0,f.openBlock)(),(0,f.createElementBlock)(f.Fragment,null,(0,f.renderList)(2,e=>(0,f.createElementVNode)(`div`,{key:e},[(0,f.createVNode)((0,f.unref)(K),{class:`h-2 w-20`}),(0,f.createVNode)((0,f.unref)(G),{class:`mt-xl`,gap:`lg`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(K),{class:`h-3 w-40`}),(0,f.createVNode)((0,f.unref)(K),{class:`h-3 w-24`}),(0,f.createVNode)((0,f.unref)(K),{class:`h-3 w-48`}),(0,f.createVNode)((0,f.unref)(K),{class:`h-3 w-40`})]),_:1})])),64))]),_:1})]))}}),hS={class:`relative flex items-center border-b border-secondary`},gS={class:`text-xxs text-tertiary`},_S={class:`text-xxs text-disabled`},vS={key:0,class:`h-full border-l border-secondary p-xl`},yS=H((0,f.defineComponent)({__name:`CommandMenu`,props:(0,f.mergeModels)({action:{}},{isOpen:{type:Boolean,default:!1},isOpenModifiers:{}}),emits:(0,f.mergeModels)([`afterLeave`,`close`],[`update:isOpen`]),setup(e,{emit:t}){let n=e,r=t,i=(0,f.useModel)(e,`isOpen`),a=(0,p.useActionManagerStore)(),o=(0,p.useActionRegistryStore)().allActions(),s=a.focusedModels,c=(0,g.useI18n)(),l=(0,f.useTemplateRef)(`listboxRoot`),u=(0,f.useTemplateRef)(`listboxContent`),d=vt(`Shift`),m=(0,f.ref)([]),_=(0,f.ref)(``),{isLoadingActions:v,buildContext:y,refreshActions:b,resolvedActions:x,subActionsMetaMap:S}=(0,p.useCommandMenuActions)({actionsSnapshot:o,focusedModelsSnapshot:s,listboxContentRef:u,listboxRootRef:l,manager:a,navStack:m,searchInput:_}),{highlightedActionId:C,activateAction:w,breadcrumbs:T,currentParent:E,placeholder:ee,preview:D,onKeyDown:te}=(0,p.useCommandMenuNavigation)({isShiftKeyHeld:d,buildContext:y,emit:r,listboxRootRef:l,manager:a,navStack:m,refreshActions:b,resolvedActions:x,scrollToTopOfGroup:re,searchInput:_,subActionsMetaMap:S}),{hasNavigated:O,isBouncing:ne}=(0,p.useCommandMenuAnimation)(i,()=>m.value.length),k=(0,f.computed)(()=>(0,p.buildCommandMenuGroups)(x.value,y()));n.action!==void 0&&w(n.action),b();function re(){let e=l.value?.highlightedElement?.getAttribute(`data-id`)??null;if(e===null)return;let t=u.value?.$el;if(t===void 0)return;let n=t.querySelector(`[data-id="${CSS.escape(e)}"]`);if(n===null)return;let r=t.getBoundingClientRect(),i=n.closest(`[role="group"]`);if(i===null||i.querySelector(`[data-id]`)!==n)return;let a=i.getBoundingClientRect().top-r.top+t.scrollTop;a<t.scrollTop&&t.scrollTo({behavior:`instant`,top:a})}function A(e){e||r(`close`)}return(e,t)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.DialogRoot),{open:i.value,"onUpdate:open":[t[3]||=e=>i.value=e,A]},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(h.DialogContent),{class:(0,f.normalizeClass)([{bouncing:(0,f.unref)(ne),navigated:(0,f.unref)(O)},`absolute top-28 left-1/2 z-99 w-full max-w-180 -translate-x-1/2 rounded-xl border border-transparent bg-primary shadow-lg duration-200 outline-none dark:border-secondary`]),"data-command-menu":``,onAfterLeave:t[2]||=e=>r(`afterLeave`)},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(h.DialogTitle),{class:`sr-only`},{default:(0,f.withCtx)(()=>[(0,f.createTextVNode)((0,f.toDisplayString)((0,f.unref)(c).t(`component.command_menu.title`)),1)]),_:1}),(0,f.createVNode)((0,f.unref)(h.DialogDescription),{class:`sr-only`},{default:(0,f.withCtx)(()=>[(0,f.createTextVNode)((0,f.toDisplayString)((0,f.unref)(c).t(`component.command_menu.title`)),1)]),_:1}),(0,f.createVNode)((0,f.unref)(h.ListboxRoot),{ref:`listboxRoot`,"highlight-on-hover":!0,class:`flex flex-col overflow-hidden`,onHighlight:t[1]||=e=>C.value=e?.value??null},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`div`,hS,[(0,f.unref)(T).length>0&&(0,f.unref)(E)?.forceAsRootMenu!==!0?((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(I),{key:0,as:`ul`,gap:`xs`,class:`-mr-sm pl-lg`},{default:(0,f.withCtx)(()=>[((0,f.openBlock)(!0),(0,f.createElementBlock)(f.Fragment,null,(0,f.renderList)((0,f.unref)(T),(e,t)=>((0,f.openBlock)(),(0,f.createElementBlock)(f.Fragment,{key:t},[(0,f.createVNode)((0,f.unref)(gy),{label:e,size:`sm`},null,8,[`label`]),t===(0,f.unref)(T).length-1?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(pn),{key:0,class:`size-3 text-tertiary`}))],64))),128))]),_:1})):(0,f.createCommentVNode)(``,!0),(0,f.createVNode)((0,f.unref)(h.ListboxFilter),{modelValue:_.value,"onUpdate:modelValue":t[0]||=e=>_.value=e,placeholder:(0,f.unref)(ee),class:`block w-full p-lg text-xs text-secondary outline-none`,onKeydown:(0,f.unref)(te)},null,8,[`modelValue`,`placeholder`,`onKeydown`])]),(0,f.createElementVNode)(`div`,{class:(0,f.normalizeClass)([{"grid-cols-2":(0,f.unref)(D)!==null},`grid`])},[((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.ListboxContent),{key:(0,f.unref)(x).map(e=>e.id).join(``),ref:`listboxContent`,class:`max-h-96 scroll-p-1 overflow-y-auto outline-none select-none`,"data-content":``},{default:(0,f.withCtx)(()=>[(0,f.unref)(x).length>0?((0,f.openBlock)(!0),(0,f.createElementBlock)(f.Fragment,{key:0},(0,f.renderList)(k.value,e=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.ListboxGroup),{key:e.key,class:`p-xs`},{default:(0,f.withCtx)(()=>[e.label!==null&&(e.showIfOnlyGroup||(0,f.unref)(E)===null||k.value.length>1)?((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.ListboxGroupLabel),{key:0,class:`px-md py-xs`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(I),{gap:`xs`},{default:(0,f.withCtx)(()=>[e.icon===null?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(e.icon),{key:0,class:`size-3 text-disabled`})),e.category===null?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createElementBlock)(f.Fragment,{key:1},[(0,f.createElementVNode)(`span`,gS,(0,f.toDisplayString)(e.category),1),t[4]||=(0,f.createElementVNode)(`span`,{class:`text-xxs text-tertiary`},`•`,-1)],64)),(0,f.createElementVNode)(`span`,_S,(0,f.toDisplayString)(e.label),1)]),_:2},1024)]),_:2},1024)):(0,f.createCommentVNode)(``,!0),((0,f.openBlock)(!0),(0,f.createElementBlock)(f.Fragment,null,(0,f.renderList)(e.items,e=>((0,f.openBlock)(),(0,f.createBlock)(dS,{key:e.id,action:e,ctx:(0,f.unref)(y)(),onSelect:t=>(0,f.unref)(w)(e)},null,8,[`action`,`ctx`,`onSelect`]))),128))]),_:2},1024))),128)):(0,f.unref)(v)?((0,f.openBlock)(),(0,f.createBlock)(mS,{key:1})):((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(U),{key:2,text:(0,f.unref)(c).t(`component.command_menu.no_results`,{query:_.value}),class:`flex p-lg text-xs text-tertiary`},null,8,[`text`]))]),_:1})),(0,f.unref)(D)===null?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createElementBlock)(`div`,vS,[((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)((0,f.unref)(D))))]))],2)]),_:1},512)]),_:1},8,[`class`]),(0,f.createVNode)((0,f.unref)(h.DialogOverlay),{class:`absolute inset-0 z-39 bg-black/5 dark:bg-black/20`,"data-overlay":``})]),_:1},8,[`open`]))}}),[[`__scopeId`,`data-v-d2f841e7`]]);function bS(){let e=(0,g.useI18n)(),t=Cv(),n=t.create(yS);return(0,p.createAction)({id:`command-menu`,isApplicable:e=>e.menuType===void 0,name:()=>e.t(`action.global.open_command_menu.name`),availableWhenUnauthenticated:!0,execute:()=>{t.isOpen(n.id)?n.close():n.open()},keyboardShortcut:{key:`K`,mod:!0,runWithInputFocus:!0}})}var xS=(0,f.defineComponent)({__name:`DialogBody`,setup(e){let{bodyRef:t,style:n}=_v();function r(e){t.value=e??null}return(0,f.onBeforeUnmount)(()=>{t.value=null}),(e,t)=>((0,f.openBlock)(),(0,f.createElementBlock)(`div`,{ref:r,class:(0,f.normalizeClass)((0,f.unref)(n).body()),"data-dialog-body":``},[(0,f.renderSlot)(e.$slots,`default`)],2))}});function SS(){let e=(0,f.shallowRef)(null);function t(t){e.value=t}function n(){e.value=null}return{chin:e,close:n,open:t}}var CS=(0,f.defineComponent)({__name:`DialogContainer`,setup(e){let{close:t,overlays:n,unmount:r}=Cv();function i(e,n){t(e,n)}function a(e){r(e)}return(e,t)=>((0,f.openBlock)(!0),(0,f.createElementBlock)(f.Fragment,null,(0,f.renderList)((0,f.unref)(n),e=>((0,f.openBlock)(),(0,f.createElementBlock)(f.Fragment,{key:e.id},[e.isMounted?((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(e.component),(0,f.mergeProps)({key:0,ref_for:!0},e.props,{"is-open":e.isOpen,"onUpdate:isOpen":t=>e.isOpen=t,onClose:t=>i(e.id,t),onAfterLeave:t=>a(e.id)}),null,16,[`is-open`,`onUpdate:isOpen`,`onClose`,`onAfterLeave`])):(0,f.createCommentVNode)(``,!0)],64))),128))}}),wS=(0,f.defineComponent)({__name:`DialogFooterSecondary`,props:{isAutoFocusDisabled:{type:Boolean},isDestructive:{type:Boolean},disableAutoFocus:{type:Boolean},disabledReason:{default:null},form:{default:null},iconLeft:{default:null},iconRight:{default:null},isDisabled:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1},label:{},type:{default:`button`}},emits:[`click`],setup(e,{emit:t}){let n=e,r=t;return(e,t)=>((0,f.openBlock)(),(0,f.createBlock)(Y,(0,f.mergeProps)(n,{variant:`secondary`,onClick:t[0]||=e=>r(`click`)}),null,16))}}),TS=(0,f.defineComponent)({__name:`DialogFooterSubmit`,props:{isDestructive:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},label:{}},setup(e){let t=e,{form:n}=hv();return ut(`Mod+Enter`,()=>{n.submit()}),(e,r)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(Y),{label:t.label,"is-loading":(0,f.unref)(n).isSubmitting.value,"is-disabled":t.isDisabled,"keyboard-shortcut":{key:`Enter`,mod:!0},variant:t.isDestructive?`destructive-primary`:`primary`,onClick:(0,f.unref)(n).submit},null,8,[`label`,`is-loading`,`is-disabled`,`variant`,`onClick`]))}});function ES(e){let t=Cv();return{triggerProps:(0,f.computed)(()=>{let n=t.overlays.find(t=>t.id===e)?.isOpen??!1;return{"aria-expanded":n,"aria-haspopup":`dialog`,"data-state":n?`open`:`closed`}})}}var[DS,OS]=F(`formDialogContext`),kS=(0,f.defineComponent)({__name:`FormDialog`,props:(0,f.mergeModels)({hasOwnFormComponent:{type:Boolean,default:!1},isUnsavedChangesPromptEnabled:{type:Boolean,default:!0},form:{},promptOnUnsavedChanges:{type:Boolean,default:!0},renderOwnFormComponent:{type:Boolean,default:!1},unsavedChangesText:{default:null},hasCloseButton:{type:Boolean,default:!0},isClickOutsideDisabled:{type:Boolean,default:!1},isEscDisabled:{type:Boolean,default:!1},chin:{},preventClickOutside:{type:Boolean},preventEsc:{type:Boolean},showCloseButton:{type:Boolean},size:{default:`md`}},{isOpen:{type:Boolean,default:!1},isOpenModifiers:{}}),emits:(0,f.mergeModels)([`close`],[`update:isOpen`]),setup(e,{emit:t}){let n=e,r=t,i=(0,g.useI18n)(),a=(0,f.useModel)(e,`isOpen`),o=(0,f.useId)(),s=SS(),c=0;DS({formId:o,form:n.form});let l=(0,f.computed)(()=>s.chin.value??n.chin??null),u=(0,f.computed)(()=>n.promptOnUnsavedChanges===!0?n.isUnsavedChangesPromptEnabled:!1),d=(0,f.computed)(()=>n.hasOwnFormComponent||n.renderOwnFormComponent),p=(0,f.computed)({get:()=>a.value,set:e=>{if(e){a.value=!0;return}if(u.value&&n.form.isDirty.value){v();return}m(),a.value=!1,r(`close`)}});function m(){s.close()}function h(){return c+=1,c}function _(e){return{icon:Et,primaryAction:{action:()=>{m(),a.value=!1,r(`close`)},label:i.t(`component.unsaved_changes_dialog.confirm`),type:`button`,variant:`destructive`},pulseKey:e,secondaryAction:{action:m,label:i.t(`component.unsaved_changes_dialog.cancel`),type:`button`,variant:`default`},text:n.unsavedChangesText??i.t(`component.form_dialog.unsaved_changes`),variant:`error`}}function v(){if(s.chin.value!==null){s.open(_(h()));return}s.open(_())}function y(e){if(!(n.isEscDisabled||!u.value||!n.form.isDirty.value)){if(e.preventDefault(),s.chin.value!==null){m(),a.value=!1,r(`close`);return}v()}}return(0,f.watch)(()=>n.form.state.value,()=>{s.chin.value!==null&&m()},{deep:!0}),(0,f.watch)(()=>a.value,e=>{e||m()}),(e,t)=>((0,f.openBlock)(),(0,f.createBlock)(Tv,{"is-open":p.value,"onUpdate:isOpen":t[0]||=e=>p.value=e,chin:l.value,"has-close-button":n.hasCloseButton,size:n.size,"is-click-outside-disabled":n.isClickOutsideDisabled,"is-esc-disabled":n.isEscDisabled,onEscapeKeyDown:y},{default:(0,f.withCtx)(()=>[d.value?(0,f.renderSlot)(e.$slots,`default`,{key:0,formId:(0,f.unref)(o)}):((0,f.openBlock)(),(0,f.createBlock)(Pv,{key:1,form:n.form,"is-unsaved-changes-prompt-enabled":!1,class:`flex size-full flex-col overflow-hidden`},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`,{formId:(0,f.unref)(o)})]),_:3},8,[`form`]))]),_:3},8,[`is-open`,`chin`,`has-close-button`,`size`,`is-click-outside-disabled`,`is-esc-disabled`]))}}),AS=(0,f.defineComponent)({__name:`FormDialogForm`,setup(e){let t=OS();return(e,n)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(Pv),{id:(0,f.unref)(t).formId,form:(0,f.unref)(t).form,"is-unsaved-changes-prompt-enabled":!1},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`,{formId:(0,f.unref)(t).formId})]),_:3},8,[`id`,`form`]))}}),jS={withStackTrace:!1},MS=(e,t,n=jS)=>({data:t.isOk()?{type:`Ok`,value:t.value}:{type:`Err`,value:t.error},message:e,stack:n.withStackTrace?Error().stack:void 0});function NS(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function PS(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function FS(e){return this instanceof FS?(this.v=e,this):new FS(e)}function IS(e,t,n){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var r=n.apply(e,t||[]),i,a=[];return i=Object.create((typeof AsyncIterator==`function`?AsyncIterator:Object).prototype),s(`next`),s(`throw`),s(`return`,o),i[Symbol.asyncIterator]=function(){return this},i;function o(e){return function(t){return Promise.resolve(t).then(e,d)}}function s(e,t){r[e]&&(i[e]=function(t){return new Promise(function(n,r){a.push([e,t,n,r])>1||c(e,t)})},t&&(i[e]=t(i[e])))}function c(e,t){try{l(r[e](t))}catch(e){f(a[0][3],e)}}function l(e){e.value instanceof FS?Promise.resolve(e.value.v).then(u,d):f(a[0][2],e)}function u(e){c(`next`,e)}function d(e){c(`throw`,e)}function f(e,t){e(t),a.shift(),a.length&&c(a[0][0],a[0][1])}}function LS(e){var t,n;return t={},r(`next`),r(`throw`,function(e){throw e}),r(`return`),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:FS(e[r](t)),done:!1}:i?i(t):t}:i}}function RS(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof PS==`function`?PS(e):e[Symbol.iterator](),n={},r(`next`),r(`throw`),r(`return`),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise(function(r,a){n=e[t](n),i(r,a,n.done,n.value)})}}function i(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}}var zS=class e{constructor(e){this._promise=e}static fromSafePromise(t){return new e(t.then(e=>new JS(e)))}static fromPromise(t,n){return new e(t.then(e=>new JS(e)).catch(e=>new YS(n(e))))}static fromThrowable(t,n){return(...r)=>new e(NS(this,void 0,void 0,function*(){try{return new JS(yield t(...r))}catch(e){return new YS(n?n(e):e)}}))}static combine(e){return HS(e)}static combineWithAllErrors(e){return WS(e)}map(t){return new e(this._promise.then(e=>NS(this,void 0,void 0,function*(){return e.isErr()?new YS(e.error):new JS(yield t(e.value))})))}andThrough(t){return new e(this._promise.then(e=>NS(this,void 0,void 0,function*(){if(e.isErr())return new YS(e.error);let n=yield t(e.value);return n.isErr()?new YS(n.error):new JS(e.value)})))}andTee(t){return new e(this._promise.then(e=>NS(this,void 0,void 0,function*(){if(e.isErr())return new YS(e.error);try{yield t(e.value)}catch{}return new JS(e.value)})))}orTee(t){return new e(this._promise.then(e=>NS(this,void 0,void 0,function*(){if(e.isOk())return new JS(e.value);try{yield t(e.error)}catch{}return new YS(e.error)})))}mapErr(t){return new e(this._promise.then(e=>NS(this,void 0,void 0,function*(){return e.isOk()?new JS(e.value):new YS(yield t(e.error))})))}andThen(t){return new e(this._promise.then(n=>{if(n.isErr())return new YS(n.error);let r=t(n.value);return r instanceof e?r._promise:r}))}orElse(t){return new e(this._promise.then(e=>NS(this,void 0,void 0,function*(){return e.isErr()?t(e.error):new JS(e.value)})))}match(e,t){return this._promise.then(n=>n.match(e,t))}unwrapOr(e){return this._promise.then(t=>t.unwrapOr(e))}safeUnwrap(){return IS(this,arguments,function*(){return yield FS(yield FS(yield*LS(RS(yield FS(this._promise.then(e=>e.safeUnwrap()))))))})}then(e,t){return this._promise.then(e,t)}[Symbol.asyncIterator](){return IS(this,arguments,function*(){let e=yield FS(this._promise);return e.isErr()&&(yield yield FS(BS(e.error))),yield FS(e.value)})}};function BS(e){return new zS(Promise.resolve(new YS(e)))}zS.fromPromise,zS.fromSafePromise,zS.fromThrowable;var VS=e=>{let t=KS([]);for(let n of e)if(n.isErr()){t=qS(n.error);break}else t.map(e=>e.push(n.value));return t},HS=e=>zS.fromSafePromise(Promise.all(e)).andThen(VS),US=e=>{let t=KS([]);for(let n of e)n.isErr()&&t.isErr()?t.error.push(n.error):n.isErr()&&t.isOk()?t=qS([n.error]):n.isOk()&&t.isOk()&&t.value.push(n.value);return t},WS=e=>zS.fromSafePromise(Promise.all(e)).andThen(US),GS;(function(e){function t(e,t){return(...n)=>{try{return KS(e(...n))}catch(e){return qS(t?t(e):e)}}}e.fromThrowable=t;function n(e){return VS(e)}e.combine=n;function r(e){return US(e)}e.combineWithAllErrors=r})(GS||={});function KS(e){return new JS(e)}function qS(e){return new YS(e)}var JS=class{constructor(e){this.value=e}isOk(){return!0}isErr(){return!this.isOk()}map(e){return KS(e(this.value))}mapErr(e){return KS(this.value)}andThen(e){return e(this.value)}andThrough(e){return e(this.value).map(e=>this.value)}andTee(e){try{e(this.value)}catch{}return KS(this.value)}orTee(e){return KS(this.value)}orElse(e){return KS(this.value)}asyncAndThen(e){return e(this.value)}asyncAndThrough(e){return e(this.value).map(()=>this.value)}asyncMap(e){return zS.fromSafePromise(e(this.value))}unwrapOr(e){return this.value}match(e,t){return e(this.value)}safeUnwrap(){let e=this.value;return(function*(){return e})()}_unsafeUnwrap(e){return this.value}_unsafeUnwrapErr(e){throw MS("Called `_unsafeUnwrapErr` on an Ok",this,e)}*[Symbol.iterator](){return this.value}},YS=class{constructor(e){this.error=e}isOk(){return!1}isErr(){return!this.isOk()}map(e){return qS(this.error)}mapErr(e){return qS(e(this.error))}andThrough(e){return qS(this.error)}andTee(e){return qS(this.error)}orTee(e){try{e(this.error)}catch{}return qS(this.error)}andThen(e){return qS(this.error)}orElse(e){return e(this.error)}asyncAndThen(e){return BS(this.error)}asyncAndThrough(e){return BS(this.error)}asyncMap(e){return BS(this.error)}unwrapOr(e){return e}match(e,t){return t(this.error)}safeUnwrap(){let e=this.error;return(function*(){throw yield qS(e),Error("Do not use this generator out of `safeTry`")})()}_unsafeUnwrap(e){throw MS("Called `_unsafeUnwrap` on an Err",this,e)}_unsafeUnwrapErr(e){return this.error}*[Symbol.iterator](){let e=this;return yield e,e}};GS.fromThrowable;var XS={prefetchStaleTime:60,limit:20};XS.limit,XS.limit;var ZS=class e{static getApiErrorCode(e){return e.errors?.[0]?.code??null}static getApiErrorMessage(e){return e.errors?.[0]?.detail??null}static getMessage(e){return e.errors?.[0]?.detail??null}static handleApiError({error:t,message:n}){return e.isExpectedApiError(t)||(console.error(`Unexpected API error: ${t}`),t instanceof Error)?t:Error(n??`An unknown error occurred`)}static isExpectedApiError(e){return e?.errors!==void 0}static isZodError(e){return e instanceof d.default.ZodError}},QS=1,$S=new class{subscribers;toasts;dismissedToasts;constructor(){this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)});publish=e=>{this.subscribers.forEach(t=>t(e))};addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]};create=e=>{let{message:t,...n}=e,r=typeof e.id==`number`||e.id&&e.id?.length>0?e.id:QS++,i=this.toasts.find(e=>e.id===r),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r};dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e);message=(e,t)=>this.create({...t,message:e,type:`default`});error=(e,t)=>this.create({...t,type:`error`,message:e});success=(e,t)=>this.create({...t,type:`success`,message:e});info=(e,t)=>this.create({...t,type:`info`,message:e});warning=(e,t)=>this.create({...t,type:`warning`,message:e});loading=(e,t)=>this.create({...t,type:`loading`,message:e});promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],(0,f.isVNode)(e))i=!1,this.create({id:n,type:`default`,message:e});else if(tC(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!(0,f.isVNode)(r)?r:{message:r||``,id:n||``};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!(0,f.isVNode)(r)?r:{message:r||``,id:n||``};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!(0,f.isVNode)(r)?r:{message:r||``,id:n||``};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!(0,f.isVNode)(r)?r:{message:r||``,id:n||``};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally?.()}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})};custom=(e,t)=>{let n=t?.id||QS++,r=this.toasts.find(e=>e.id===n),i=t?.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(n)&&this.dismissedToasts.delete(n),r?this.toasts=this.toasts.map(r=>r.id===n?(this.publish({...r,component:e,dismissible:i,id:n,...t}),{...r,component:e,dismissible:i,id:n,...t}):r):this.addToast({component:e,dismissible:i,id:n,...t}),n};getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id))};function eC(e,t){let n=t?.id||QS++;return $S.create({message:e,id:n,type:`default`,...t}),n}var tC=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,nC=Object.assign(eC,{success:$S.success,info:$S.info,warning:$S.warning,error:$S.error,custom:$S.custom,message:$S.message,promise:$S.promise,dismiss:$S.dismiss,loading:$S.loading},{getHistory:()=>$S.toasts,getToasts:()=>$S.getActiveToasts()});function rC(e){return e.label!==void 0}var iC=3,aC=`24px`,oC=`16px`,sC=4e3,cC=356,lC=14,uC=45,dC=200;function fC(){let e=(0,f.ref)(!1);return(0,f.watchEffect)(()=>{let t=()=>{e.value=document.hidden};return document.addEventListener(`visibilitychange`,t),()=>window.removeEventListener(`visibilitychange`,t)}),{isDocumentHidden:e}}function pC(...e){return e.filter(Boolean).join(` `)}function mC(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}function hC(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?oC:aC;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var gC=[`data-rich-colors`,`data-styled`,`data-mounted`,`data-promise`,`data-swiped`,`data-removed`,`data-visible`,`data-y-position`,`data-x-position`,`data-index`,`data-front`,`data-swiping`,`data-dismissible`,`data-type`,`data-invert`,`data-swipe-out`,`data-swipe-direction`,`data-expanded`,`data-testid`],_C=[`aria-label`,`data-disabled`,`data-close-button-position`],vC=(0,f.defineComponent)({__name:`Toast`,props:{toast:{},toasts:{},index:{},swipeDirections:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},gap:{},position:{},closeButtonPosition:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},style:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},class:{},unstyled:{type:Boolean},descriptionClass:{},loadingIcon:{},classes:{},icons:{},closeButtonAriaLabel:{},defaultRichColors:{type:Boolean}},emits:[`update:heights`,`update:height`,`removeToast`],setup(e,{emit:t}){let n=e,r=t,i=(0,f.ref)(null),a=(0,f.ref)(null),o=(0,f.ref)(!1),s=(0,f.ref)(!1),c=(0,f.ref)(!1),l=(0,f.ref)(!1),u=(0,f.ref)(!1),d=(0,f.ref)(0),p=(0,f.ref)(0),m=(0,f.ref)(n.toast.duration||n.duration||sC),h=(0,f.ref)(null),g=(0,f.ref)(null),_=(0,f.computed)(()=>n.index===0),v=(0,f.computed)(()=>n.index+1<=n.visibleToasts),y=(0,f.computed)(()=>n.toast.type),b=(0,f.computed)(()=>n.toast.dismissible!==!1),x=(0,f.computed)(()=>n.toast.class||``),S=(0,f.computed)(()=>n.descriptionClass||``),C=(0,f.computed)(()=>{let e=n.toast.position||n.position,t=n.heights.filter(t=>t.position===e).findIndex(e=>e.toastId===n.toast.id);return t>=0?t:0}),w=(0,f.computed)(()=>{let e=n.toast.position||n.position;return n.heights.filter(t=>t.position===e).reduce((e,t,n)=>n>=C.value?e:e+t.height,0)}),T=(0,f.computed)(()=>C.value*n.gap+w.value||0),E=(0,f.computed)(()=>n.toast.closeButton??n.closeButton),ee=(0,f.computed)(()=>n.toast.duration||n.duration||sC),D=(0,f.ref)(0),te=(0,f.ref)(0),O=(0,f.ref)(null),ne=(0,f.computed)(()=>n.position.split(`-`)),k=(0,f.computed)(()=>ne.value[0]),re=(0,f.computed)(()=>ne.value[1]),A=(0,f.computed)(()=>typeof n.toast.title!=`string`),ie=(0,f.computed)(()=>typeof n.toast.description!=`string`),{isDocumentHidden:ae}=fC(),oe=(0,f.computed)(()=>y.value&&y.value===`loading`);(0,f.onMounted)(()=>{o.value=!0,m.value=ee.value}),(0,f.watchEffect)(async()=>{if(!o.value||!g.value)return;await(0,f.nextTick)();let e=g.value,t=e.style.height;e.style.height=`auto`;let i=e.getBoundingClientRect().height;e.style.height=t,p.value=i,r(`update:height`,{toastId:n.toast.id,height:i,position:n.toast.position||n.position})});function se(){s.value=!0,d.value=T.value,setTimeout(()=>{r(`removeToast`,n.toast)},dC)}function j(){if(oe.value||!b.value)return{};se(),n.toast.onDismiss?.(n.toast)}function ce(e){e.button!==2&&(oe.value||!b.value||(h.value=new Date,d.value=T.value,e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(c.value=!0,O.value={x:e.clientX,y:e.clientY})))}function le(){if(l.value||!b.value)return;O.value=null;let e=Number(g.value?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(g.value?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-(h.value?.getTime()||0),o=i.value===`x`?e:t,s=Math.abs(o)/r;if(Math.abs(o)>=uC||s>.11){d.value=T.value,n.toast.onDismiss?.(n.toast),i.value===`x`?a.value=e>0?`right`:`left`:a.value=t>0?`down`:`up`,se(),l.value=!0;return}else g.value?.style.setProperty(`--swipe-amount-x`,`0px`),g.value?.style.setProperty(`--swipe-amount-y`,`0px`);u.value=!1,c.value=!1,i.value=null}function ue(e){if(!O.value||!b.value||(window?.getSelection()?.toString()?.length??!1))return;let t=e.clientY-O.value.y,r=e.clientX-O.value.x,a=n.swipeDirections??mC(n.position);!i.value&&(Math.abs(r)>1||Math.abs(t)>1)&&(i.value=Math.abs(r)>Math.abs(t)?`x`:`y`);let o={x:0,y:0},s=e=>1/(1.5+Math.abs(e)/20);if(i.value===`y`){if(a.includes(`top`)||a.includes(`bottom`))if(a.includes(`top`)&&t<0||a.includes(`bottom`)&&t>0)o.y=t;else{let e=t*s(t);o.y=Math.abs(e)<Math.abs(t)?e:t}}else if(i.value===`x`&&(a.includes(`left`)||a.includes(`right`)))if(a.includes(`left`)&&r<0||a.includes(`right`)&&r>0)o.x=r;else{let e=r*s(r);o.x=Math.abs(e)<Math.abs(r)?e:r}(Math.abs(o.x)>0||Math.abs(o.y)>0)&&(u.value=!0),g.value?.style.setProperty(`--swipe-amount-x`,`${o.x}px`),g.value?.style.setProperty(`--swipe-amount-y`,`${o.y}px`)}(0,f.onMounted)(()=>{if(o.value=!0,!g.value)return;let e=g.value.getBoundingClientRect().height;p.value=e,r(`update:heights`,[{toastId:n.toast.id,height:e,position:n.toast.position},...n.heights])}),(0,f.onBeforeUnmount)(()=>{g.value&&r(`removeToast`,n.toast)}),(0,f.watchEffect)(e=>{if(n.toast.promise&&y.value===`loading`||n.toast.duration===1/0||n.toast.type===`loading`)return;let t;n.expanded||n.interacting||ae.value?(()=>{if(te.value<D.value){let e=new Date().getTime()-D.value;m.value-=e}te.value=new Date().getTime()})():m.value!==1/0&&(D.value=new Date().getTime(),t=setTimeout(()=>{n.toast.onAutoClose?.(n.toast),se()},m.value)),e(()=>{clearTimeout(t)})}),(0,f.watch)(()=>n.toast.delete,e=>{e!==void 0&&e&&(se(),n.toast.onDismiss?.(n.toast))},{deep:!0});function M(){c.value=!1,i.value=null,O.value=null}return(e,t)=>((0,f.openBlock)(),(0,f.createElementBlock)(`li`,{tabindex:`0`,ref_key:`toastRef`,ref:g,class:(0,f.normalizeClass)((0,f.unref)(pC)(n.class,x.value,e.classes?.toast,e.toast.classes?.toast,e.classes?.[y.value],e.toast?.classes?.[y.value])),"data-sonner-toast":``,"data-rich-colors":e.toast.richColors??e.defaultRichColors,"data-styled":!(e.toast.component||e.toast?.unstyled||e.unstyled),"data-mounted":o.value,"data-promise":!!e.toast.promise,"data-swiped":u.value,"data-removed":s.value,"data-visible":v.value,"data-y-position":k.value,"data-x-position":re.value,"data-index":e.index,"data-front":_.value,"data-swiping":c.value,"data-dismissible":b.value,"data-type":y.value,"data-invert":e.toast.invert||e.invert,"data-swipe-out":l.value,"data-swipe-direction":a.value,"data-expanded":!!(e.expanded||e.expandByDefault&&o.value),"data-testid":e.toast.testId,style:(0,f.normalizeStyle)({"--index":e.index,"--toasts-before":e.index,"--z-index":e.toasts.length-e.index,"--offset":`${s.value?d.value:T.value}px`,"--initial-height":e.expandByDefault?`auto`:`${p.value}px`,...e.style,...n.toast.style}),onDragend:M,onPointerdown:ce,onPointerup:le,onPointermove:ue},[E.value&&!e.toast.component&&y.value!==`loading`?((0,f.openBlock)(),(0,f.createElementBlock)(`button`,{key:0,"aria-label":e.closeButtonAriaLabel||`Close toast`,"data-disabled":oe.value,"data-close-button":`true`,"data-close-button-position":e.closeButtonPosition,class:(0,f.normalizeClass)((0,f.unref)(pC)(e.classes?.closeButton,e.toast?.classes?.closeButton)),onClick:j},[e.icons?.close?((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(e.icons?.close),{key:0})):(0,f.renderSlot)(e.$slots,`close-icon`,{key:1})],10,_C)):(0,f.createCommentVNode)(`v-if`,!0),e.toast.component?((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(e.toast.component),(0,f.mergeProps)({key:1},e.toast.componentProps,{onCloseToast:j,isPaused:e.$props.expanded||e.$props.interacting||(0,f.unref)(ae)}),null,16,[`isPaused`])):((0,f.openBlock)(),(0,f.createElementBlock)(f.Fragment,{key:2},[y.value!=="default"||e.toast.icon||e.toast.promise?((0,f.openBlock)(),(0,f.createElementBlock)(`div`,{key:0,"data-icon":``,class:(0,f.normalizeClass)((0,f.unref)(pC)(e.classes?.icon,e.toast?.classes?.icon))},[e.toast.icon?((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(e.toast.icon),{key:0})):((0,f.openBlock)(),(0,f.createElementBlock)(f.Fragment,{key:1},[y.value===`loading`?(0,f.renderSlot)(e.$slots,`loading-icon`,{key:0}):y.value===`success`?(0,f.renderSlot)(e.$slots,`success-icon`,{key:1}):y.value===`error`?(0,f.renderSlot)(e.$slots,`error-icon`,{key:2}):y.value===`warning`?(0,f.renderSlot)(e.$slots,`warning-icon`,{key:3}):y.value===`info`?(0,f.renderSlot)(e.$slots,`info-icon`,{key:4}):(0,f.createCommentVNode)(`v-if`,!0)],64))],2)):(0,f.createCommentVNode)(`v-if`,!0),(0,f.createElementVNode)(`div`,{"data-content":``,class:(0,f.normalizeClass)((0,f.unref)(pC)(e.classes?.content,e.toast?.classes?.content))},[(0,f.createElementVNode)(`div`,{"data-title":``,class:(0,f.normalizeClass)((0,f.unref)(pC)(e.classes?.title,e.toast.classes?.title))},[A.value?((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(e.toast.title),(0,f.normalizeProps)((0,f.mergeProps)({key:0},e.toast.componentProps)),null,16)):((0,f.openBlock)(),(0,f.createElementBlock)(f.Fragment,{key:1},[(0,f.createTextVNode)((0,f.toDisplayString)(e.toast.title),1)],64))],2),e.toast.description?((0,f.openBlock)(),(0,f.createElementBlock)(`div`,{key:0,"data-description":``,class:(0,f.normalizeClass)((0,f.unref)(pC)(e.descriptionClass,S.value,e.classes?.description,e.toast.classes?.description))},[ie.value?((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(e.toast.description),(0,f.normalizeProps)((0,f.mergeProps)({key:0},e.toast.componentProps)),null,16)):((0,f.openBlock)(),(0,f.createElementBlock)(f.Fragment,{key:1},[(0,f.createTextVNode)((0,f.toDisplayString)(e.toast.description),1)],64))],2)):(0,f.createCommentVNode)(`v-if`,!0)],2),e.toast.cancel?((0,f.openBlock)(),(0,f.createElementBlock)(`button`,{key:1,style:(0,f.normalizeStyle)(e.toast.cancelButtonStyle||e.cancelButtonStyle),class:(0,f.normalizeClass)((0,f.unref)(pC)(e.classes?.cancelButton,e.toast.classes?.cancelButton)),"data-button":``,"data-cancel":``,onClick:t[0]||=t=>{(0,f.unref)(rC)(e.toast.cancel)&&b.value&&(e.toast.cancel.onClick?.(t),se())}},(0,f.toDisplayString)((0,f.unref)(rC)(e.toast.cancel)?e.toast.cancel?.label:e.toast.cancel),7)):(0,f.createCommentVNode)(`v-if`,!0),e.toast.action?((0,f.openBlock)(),(0,f.createElementBlock)(`button`,{key:2,style:(0,f.normalizeStyle)(e.toast.actionButtonStyle||e.actionButtonStyle),class:(0,f.normalizeClass)((0,f.unref)(pC)(e.classes?.actionButton,e.toast.classes?.actionButton)),"data-button":``,"data-action":``,onClick:t[1]||=t=>{(0,f.unref)(rC)(e.toast.action)&&(e.toast.action.onClick?.(t),!t.defaultPrevented&&se())}},(0,f.toDisplayString)((0,f.unref)(rC)(e.toast.action)?e.toast.action?.label:e.toast.action),7)):(0,f.createCommentVNode)(`v-if`,!0)],64))],46,gC))}}),yC=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},bC={},xC={xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stoke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`};function SC(e,t){return(0,f.openBlock)(),(0,f.createElementBlock)(`svg`,xC,t[0]||=[(0,f.createElementVNode)(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`},null,-1),(0,f.createElementVNode)(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`},null,-1)])}var CC=yC(bC,[[`render`,SC]]),wC=[`data-visible`],TC={class:`sonner-spinner`},EC=(0,f.defineComponent)({__name:`Loader`,props:{visible:{type:Boolean}},setup(e){let t=Array(12).fill(0);return(e,n)=>((0,f.openBlock)(),(0,f.createElementBlock)(`div`,{class:`sonner-loading-wrapper`,"data-visible":e.visible},[(0,f.createElementVNode)(`div`,TC,[((0,f.openBlock)(!0),(0,f.createElementBlock)(f.Fragment,null,(0,f.renderList)((0,f.unref)(t),e=>((0,f.openBlock)(),(0,f.createElementBlock)(`div`,{key:`spinner-bar-${e}`,class:`sonner-loading-bar`}))),128))])],8,wC))}}),DC={},OC={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`};function kC(e,t){return(0,f.openBlock)(),(0,f.createElementBlock)(`svg`,OC,t[0]||=[(0,f.createElementVNode)(`path`,{"fill-rule":`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,"clip-rule":`evenodd`},null,-1)])}var AC=yC(DC,[[`render`,kC]]),jC={},MC={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`};function NC(e,t){return(0,f.openBlock)(),(0,f.createElementBlock)(`svg`,MC,t[0]||=[(0,f.createElementVNode)(`path`,{"fill-rule":`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,"clip-rule":`evenodd`},null,-1)])}var PC=yC(jC,[[`render`,NC]]),FC={},IC={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`};function LC(e,t){return(0,f.openBlock)(),(0,f.createElementBlock)(`svg`,IC,t[0]||=[(0,f.createElementVNode)(`path`,{"fill-rule":`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,"clip-rule":`evenodd`},null,-1)])}var RC=yC(FC,[[`render`,LC]]),zC={},BC={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`};function VC(e,t){return(0,f.openBlock)(),(0,f.createElementBlock)(`svg`,BC,t[0]||=[(0,f.createElementVNode)(`path`,{"fill-rule":`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,"clip-rule":`evenodd`},null,-1)])}var HC=yC(zC,[[`render`,VC]]),UC=[`aria-label`],WC=[`data-sonner-theme`,`dir`,`data-theme`,`data-rich-colors`,`data-y-position`,`data-x-position`],GC=typeof window<`u`&&typeof document<`u`;function KC(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}var qC=(0,f.defineComponent)({name:`Toaster`,inheritAttrs:!1,__name:`Toaster`,props:{id:{},invert:{type:Boolean,default:!1},theme:{default:`light`},position:{default:`bottom-right`},closeButtonPosition:{default:`top-left`},hotkey:{default:()=>[`altKey`,`KeyT`]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{},gap:{default:lC},visibleToasts:{default:iC},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},class:{default:``},style:{},offset:{default:aC},mobileOffset:{default:oC},dir:{default:`auto`},swipeDirections:{},icons:{},containerAriaLabel:{default:`Notifications`}},setup(e){let t=e,n=(0,f.useAttrs)(),r=(0,f.ref)([]),i=(0,f.computed)(()=>t.id?r.value.filter(e=>e.toasterId===t.id):r.value.filter(e=>!e.toasterId));function a(e,t){return i.value.filter(n=>!n.position&&t===0||n.position===e)}let o=(0,f.computed)(()=>{let e=i.value.filter(e=>e.position).map(e=>e.position);return e.length>0?Array.from(new Set([t.position].concat(e))):[t.position]}),s=(0,f.computed)(()=>{let e={};return o.value.forEach(t=>{e[t]=r.value.filter(e=>e.position===t)}),e}),c=(0,f.ref)([]),l=(0,f.ref)({}),u=(0,f.ref)(!1);(0,f.watchEffect)(()=>{o.value.forEach(e=>{e in l.value||(l.value[e]=!1)})});let d=(0,f.ref)(t.theme===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:t.theme),p=(0,f.ref)(null),m=(0,f.ref)(null),h=(0,f.ref)(!1),g=t.hotkey.join(`+`).replace(/Key/g,``).replace(/Digit/g,``);function _(e){r.value.find(t=>t.id===e.id)?.delete||$S.dismiss(e.id),r.value=r.value.filter(({id:t})=>t!==e.id),setTimeout(()=>{r.value.find(t=>t.id===e.id)||(c.value=c.value.filter(t=>t.toastId!==e.id))},250)}function v(e){h.value&&!e.currentTarget?.contains?.(e.relatedTarget)&&(h.value=!1,m.value&&=(m.value.focus({preventScroll:!0}),null))}function y(e){e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||h.value||(h.value=!0,m.value=e.relatedTarget)}function b(e){e.target&&e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||(u.value=!0)}(0,f.watchEffect)(e=>{e($S.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{r.value=r.value.map(t=>t.id===e.id?{...t,delete:!0}:t)});return}(0,f.nextTick)(()=>{let t=r.value.findIndex(t=>t.id===e.id);t===-1?r.value=[e,...r.value]:r.value=[...r.value.slice(0,t),{...r.value[t],...e},...r.value.slice(t+1)]})}))}),(0,f.watchEffect)(e=>{if(typeof window>`u`)return;if(t.theme!==`system`){d.value=t.theme;return}let n=window.matchMedia(`(prefers-color-scheme: dark)`),r=e=>{d.value=e?`dark`:`light`};r(n.matches);let i=e=>{r(e.matches)};try{n.addEventListener(`change`,i)}catch{n.addListener(i)}e(()=>{try{n.removeEventListener(`change`,i)}catch{n.removeListener(i)}})}),(0,f.watchEffect)(()=>{p.value&&m.value&&(m.value.focus({preventScroll:!0}),m.value=null,h.value=!1)}),(0,f.watchEffect)(()=>{r.value.length<=1&&Object.keys(l.value).forEach(e=>{l.value[e]=!1})}),(0,f.watchEffect)(e=>{function n(e){let n=t.hotkey.every(t=>e[t]||e.code===t),r=Array.isArray(p.value)?p.value[0]:p.value;n&&(o.value.forEach(e=>{l.value[e]=!0}),r?.focus());let i=document.activeElement===p.value||r?.contains(document.activeElement);e.code===`Escape`&&i&&o.value.forEach(e=>{l.value[e]=!1})}GC&&(document.addEventListener(`keydown`,n),e(()=>{document.removeEventListener(`keydown`,n)}))});function x(e){let t=e.currentTarget,n=t.getAttribute(`data-y-position`)+`-`+t.getAttribute(`data-x-position`);l.value[n]=!0}function S(e){if(!u.value){let t=e.currentTarget,n=t.getAttribute(`data-y-position`)+`-`+t.getAttribute(`data-x-position`);l.value[n]=!1}}function C(){Object.keys(l.value).forEach(e=>{l.value[e]=!1})}function w(){u.value=!1}function T(e){c.value=e}function E(e){let t=c.value.findIndex(t=>t.toastId===e.toastId);if(t!==-1)c.value[t]=e;else{let t=c.value.findIndex(t=>t.position===e.position);t===-1?c.value.unshift(e):c.value.splice(t,0,e)}}return(e,r)=>((0,f.openBlock)(),(0,f.createElementBlock)(f.Fragment,null,[(0,f.createCommentVNode)(` Remove item from normal navigation flow, only available via hotkey `),(0,f.createElementVNode)(`section`,{"aria-label":`${e.containerAriaLabel} ${(0,f.unref)(g)}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`},[((0,f.openBlock)(!0),(0,f.createElementBlock)(f.Fragment,null,(0,f.renderList)(o.value,(r,i)=>((0,f.openBlock)(),(0,f.createElementBlock)(`ol`,(0,f.mergeProps)({key:r,ref_for:!0,ref_key:`listRef`,ref:p,"data-sonner-toaster":``,"data-sonner-theme":d.value,class:t.class,dir:e.dir===`auto`?KC():e.dir,tabIndex:-1,"data-theme":e.theme,"data-rich-colors":e.richColors,"data-y-position":r.split(`-`)[0],"data-x-position":r.split(`-`)[1],style:{"--front-toast-height":`${c.value[0]?.height||0}px`,"--width":`${(0,f.unref)(cC)}px`,"--gap":`${e.gap}px`,...e.style,...(0,f.unref)(n).style,...(0,f.unref)(hC)(e.offset,e.mobileOffset)}},{ref_for:!0},e.$attrs,{onBlur:v,onFocus:y,onMouseenter:x,onMousemove:x,onMouseleave:S,onDragend:C,onPointerdown:b,onPointerup:w}),[((0,f.openBlock)(!0),(0,f.createElementBlock)(f.Fragment,null,(0,f.renderList)(a(r,i),(n,i)=>((0,f.openBlock)(),(0,f.createBlock)(vC,{key:n.id,heights:c.value,icons:e.icons,index:i,toast:n,defaultRichColors:e.richColors,duration:e.toastOptions?.duration??e.duration,class:(0,f.normalizeClass)(e.toastOptions?.class??``),descriptionClass:e.toastOptions?.descriptionClass,invert:e.invert,visibleToasts:e.visibleToasts,closeButton:e.toastOptions?.closeButton??e.closeButton,interacting:u.value,position:r,closeButtonPosition:e.toastOptions?.closeButtonPosition??e.closeButtonPosition,style:(0,f.normalizeStyle)(e.toastOptions?.style),unstyled:e.toastOptions?.unstyled,classes:e.toastOptions?.classes,cancelButtonStyle:e.toastOptions?.cancelButtonStyle,actionButtonStyle:e.toastOptions?.actionButtonStyle,"close-button-aria-label":e.toastOptions?.closeButtonAriaLabel,toasts:s.value[r],expandByDefault:e.expand,gap:e.gap,expanded:l.value[r]||!1,swipeDirections:t.swipeDirections,"onUpdate:heights":T,"onUpdate:height":E,onRemoveToast:_},{"close-icon":(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`close-icon`,{},()=>[(0,f.createVNode)(CC)])]),"loading-icon":(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`loading-icon`,{},()=>[(0,f.createVNode)(EC,{visible:n.type===`loading`},null,8,[`visible`])])]),"success-icon":(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`success-icon`,{},()=>[(0,f.createVNode)(AC)])]),"error-icon":(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`error-icon`,{},()=>[(0,f.createVNode)(HC)])]),"warning-icon":(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`warning-icon`,{},()=>[(0,f.createVNode)(RC)])]),"info-icon":(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`info-icon`,{},()=>[(0,f.createVNode)(PC)])]),_:2},1032,[`heights`,`icons`,`index`,`toast`,`defaultRichColors`,`duration`,`class`,`descriptionClass`,`invert`,`visibleToasts`,`closeButton`,`interacting`,`position`,`closeButtonPosition`,`style`,`unstyled`,`classes`,`cancelButtonStyle`,`actionButtonStyle`,`close-button-aria-label`,`toasts`,`expandByDefault`,`gap`,`expanded`,`swipeDirections`]))),128))],16,WC))),128))],8,UC)],2112))}}),JC=V({slots:{title:`mb-xs text-sm font-medium`},variants:{variant:{error:{title:`text-error-primary`},info:{title:`text-primary`},warning:{title:`text-warning-primary`}}}}),YC=(0,f.defineComponent)({__name:`ToastActions`,props:{button:{},link:{}},emits:[`close`],setup(e,{emit:t}){let n=t;function r(e){e.onClick(),n(`close`)}function i(){n(`close`)}return(t,n)=>e.button!==void 0||e.link!==void 0?((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(I),{key:0},{default:(0,f.withCtx)(()=>[e.button===void 0?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(Y),(0,f.mergeProps)({key:0,variant:`secondary`},e.button,{onClick:n[0]||=t=>r(e.button)}),null,16)),e.link===void 0?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(tv),(0,f.mergeProps)({key:1,variant:`secondary`},e.link,{onClick:n[1]||=e=>i()}),null,16))]),_:1})):(0,f.createCommentVNode)(``,!0)}}),XC={class:`absolute top-0 right-0 mt-md mr-sm flex h-text-sm items-center justify-center`},ZC=(0,f.defineComponent)({__name:`ToastCloseButton`,emits:[`close`],setup(e,{emit:t}){let n=t,r=(0,g.useI18n)();return(e,t)=>((0,f.openBlock)(),(0,f.createElementBlock)(`div`,XC,[(0,f.createVNode)((0,f.unref)(X),{icon:(0,f.unref)(zr),"is-tooltip-disabled":!0,label:(0,f.unref)(r).t(`component.toast.close.label`),size:`sm`,variant:`tertiary`,onClick:t[0]||=e=>n(`close`)},null,8,[`icon`,`label`])]))}}),QC={class:`flex h-text-sm items-center`},$C=(0,f.defineComponent)({__name:`ToastIcon`,props:{icon:{},variant:{}},setup(e){let t=e;return(e,n)=>((0,f.openBlock)(),(0,f.createElementBlock)(`div`,QC,[((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(t.icon),{class:(0,f.normalizeClass)([{"text-error-primary":t.variant===`error`,"text-warning-primary":t.variant===`warning`,"text-tertiary":t.variant===`info`||t.variant===`loading`||t.variant===void 0},`size-4`])},null,8,[`class`]))]))}}),ew={},tw={class:`pointer-events-auto relative w-full rounded-xl border border-secondary bg-primary p-md pl-lg shadow-lg/5`};function nw(e,t){return(0,f.openBlock)(),(0,f.createElementBlock)(`div`,tw,[(0,f.renderSlot)(e.$slots,`default`)])}var rw=H(ew,[[`render`,nw]]),iw={class:`flex h-text-sm items-center`},aw=(0,f.defineComponent)({__name:`ToastLoader`,setup(e){return(e,t)=>((0,f.openBlock)(),(0,f.createElementBlock)(`div`,iw,[(0,f.createVNode)((0,f.unref)(To),{class:`size-3.5 text-tertiary`})]))}}),ow=[`src`,`alt`],sw={class:`font-medium text-primary`},cw=(0,f.defineComponent)({__name:`ToastInteractablePart`,props:{icon:{},imageSrc:{},label:{},to:{}},emits:[`click`],setup(e,{emit:t}){let n=e,r=t;function i(){n.to!==null&&r(`click`)}return(e,t)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(n.to===null?`span`:(0,f.unref)(y.RouterLink)),{to:n.to,class:(0,f.normalizeClass)({"hover:underline":n.to!==null}),onClick:i},{default:(0,f.withCtx)(()=>[n.imageSrc===null?n.icon===null?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(n.icon),{key:1,class:`mr-xs inline size-3.5 -translate-y-px align-sub text-secondary`})):((0,f.openBlock)(),(0,f.createElementBlock)(`img`,{key:0,src:n.imageSrc,alt:n.label,class:`mr-xs inline size-3.5 -translate-y-px rounded-xs align-middle`},null,8,ow)),(0,f.createElementVNode)(`span`,sw,(0,f.toDisplayString)(n.label),1)]),_:1},8,[`to`,`class`]))}}),lw={class:`text-sm text-secondary`},uw=(0,f.defineComponent)({__name:`ToastMessage`,props:{message:{},models:{}},emits:[`closeToast`],setup(e,{emit:t}){let n=e,r=t,i=/(\{.*?\})/g,a=/^\{(.*?)\}$/,o=(0,f.computed)(()=>n.message.split(i).map(e=>{let t=e.match(a);if(t===null)return{label:e,type:`text`};let r=t[1],i=n.models[r]??null;return i===null?(console.warn(`No model found for key "${r}" in toast message "${n.message}"`),{label:e,type:`text`}):{icon:i.icon??null,imageSrc:i.imageSrc??null,key:r,label:i.label,to:i.to,type:`interactable`}}));return(e,t)=>((0,f.openBlock)(),(0,f.createElementBlock)(`span`,lw,[((0,f.openBlock)(!0),(0,f.createElementBlock)(f.Fragment,null,(0,f.renderList)(o.value,(e,n)=>((0,f.openBlock)(),(0,f.createElementBlock)(f.Fragment,{key:n},[e.type===`text`?((0,f.openBlock)(),(0,f.createElementBlock)(f.Fragment,{key:0},[(0,f.createTextVNode)((0,f.toDisplayString)(e.label),1)],64)):e.type===`interactable`?((0,f.openBlock)(),(0,f.createBlock)(cw,{key:1,icon:e.icon,"image-src":e.imageSrc,label:e.label,to:e.to??null,onClick:t[0]||=e=>r(`closeToast`)},null,8,[`icon`,`image-src`,`label`,`to`])):(0,f.createCommentVNode)(``,!0)],64))),128))]))}}),dw=H((0,f.defineComponent)({__name:`Toast`,props:{toast:{}},emits:[`closeToast`],setup(e,{emit:t}){let n=e,r=t,i=(0,f.computed)(()=>n.toast.variant===`error`?`error`:n.toast.variant===`warning`?`warning`:`info`),a=(0,f.computed)(()=>JC({variant:i.value}));return(e,t)=>((0,f.openBlock)(),(0,f.createBlock)(rw,{"data-toast-id":n.toast.id},{default:(0,f.withCtx)(()=>[(n.toast.isDismissible??!0)&&n.toast.variant!==`loading`?((0,f.openBlock)(),(0,f.createBlock)(ZC,{key:0,onClose:t[0]||=e=>r(`closeToast`)})):(0,f.createCommentVNode)(``,!0),(0,f.createVNode)((0,f.unref)(I),{align:`start`,class:`pr-3xl`},{default:(0,f.withCtx)(()=>[n.toast.variant===`loading`?((0,f.openBlock)(),(0,f.createBlock)(aw,{key:0})):n.toast.icon===void 0?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createBlock)($C,{key:1,icon:n.toast.icon,variant:n.toast.variant},null,8,[`icon`,`variant`])),(0,f.createVNode)((0,f.unref)(G),{gap:`none`},{default:(0,f.withCtx)(()=>[n.toast.title===void 0?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(U),{key:0,text:n.toast.title,class:(0,f.normalizeClass)([a.value.title(),`mb-xs text-sm font-medium`])},null,8,[`text`,`class`])),(0,f.createVNode)(uw,{models:n.toast.interactableModels??{},message:n.toast.message,onCloseToast:t[1]||=e=>r(`closeToast`)},null,8,[`models`,`message`]),(0,f.createVNode)(YC,{button:n.toast.button,link:n.toast.link,class:`mt-lg`,onClose:t[2]||=e=>r(`closeToast`)},null,8,[`button`,`link`])]),_:1})]),_:1})]),_:1},8,[`data-toast-id`]))}}),[[`__scopeId`,`data-v-0289243a`]]),fw=600,pw=`animate-toast-highlight`,mw=new Map;function hw(e){let t=document.querySelector(`[data-toast-id="${e}"]`);if(!t)return;let n=mw.get(e);n&&clearTimeout(n),t.classList.remove(pw),t.scrollTop,t.classList.add(pw);let r=setTimeout(()=>{t.classList.remove(pw),mw.delete(e)},fw);mw.set(e,r)}var gw=1/0,_w=5e3,vw=7e3;function yw(e,t){switch(e){case`always`:return t===`error`?vw:_w;case`all-except-errors`:return t===`error`?gw:_w;case`never`:return gw}}function bw(e){nC.dismiss(e)}function xw(){let e=(0,g.useI18n)(),t=J();function n(e){(e.id===void 0?null:nC.getToasts().find(t=>t.id===e.id)??null)!==null&&hw(e.id),nC.custom((0,f.markRaw)((0,f.defineComponent)({render:()=>(0,f.h)(dw,{toast:e})})),{id:e.id??crypto.randomUUID(),class:`w-full sm:w-96`,dismissible:e.isDismissible??e.dismissible,duration:e.duration??yw(t.autoCloseToast.value,e.variant===`error`?`error`:`info`),position:e.position??`bottom-right`,onAutoClose:e.onAutoClose,onDismiss:e.onDismiss})}function r(e){let r=e.id??crypto.randomUUID();n({id:r,isDismissible:!1,duration:gw,icon:e.icon,interactableModels:e.interactableModels,message:e.loading,variant:`loading`,onAutoClose:e.onAutoClose,onDismiss:e.onDismiss});function i(n,i){let a=nC.custom((0,f.markRaw)((0,f.defineComponent)({render:()=>(0,f.h)(dw,{toast:{id:r,icon:e.icon,interactableModels:e.interactableModels,message:n,variant:i}})})),{id:r,class:`w-full sm:w-96`,dismissible:!0,position:e.position??`bottom-right`,onAutoClose:e.onAutoClose,onDismiss:e.onDismiss});setTimeout(()=>{nC.dismiss(a)},e.duration??yw(t.autoCloseToast.value,i===`error`?`error`:`info`))}e.promise.then(()=>i(e.success,`info`)).catch(()=>i(e.error,`error`))}function i(){n({id:`unable-to-save`,icon:St,message:e.t(`component.toast.unable_to_save_changes.message`),variant:`error`})}function a(t){if(!ZS.isExpectedApiError(t)){n({icon:St,message:e.t(`component.toast.unexpected_error.message`),variant:`error`}),console.error(`Unknown error occurred:`,t);return}let[r]=t.errors;r!==void 0&&n({icon:St,message:r.detail,variant:`error`})}return{apiError:a,dismiss:bw,promise:r,show:n,unableToSave:i}}var Sw=(0,f.defineComponent)({__name:`ToastContainer`,setup(e){return(e,t)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(qC),{style:{zIndex:75},expand:!1}))}}),Cw=(0,f.defineComponent)({__name:`TooltipProvider`,setup(e){return(e,t)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.TooltipProvider),null,{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`)]),_:3}))}}),ww=(0,f.defineComponent)({__name:`ApplicationProvider`,props:{isFetchingAuthUser:{type:Boolean}},setup(e){let t=e;return(0,p.useActionRegistryStore)().registerActions(bS()),(e,n)=>((0,f.openBlock)(),(0,f.createBlock)(Cw,null,{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(oS)),(0,f.createVNode)((0,f.unref)(iS)),(0,f.createVNode)((0,f.unref)(eS),{"is-fetching-auth-user":t.isFetchingAuthUser},null,8,[`is-fetching-auth-user`]),(0,f.createVNode)((0,f.unref)(Sw)),(0,f.createVNode)((0,f.unref)(CS)),(0,f.renderSlot)(e.$slots,`default`)]),_:3}))}}),Tw=function(e){return e.CONFIRM_UPLOAD_FAILED=`CONFIRM_UPLOAD_FAILED`,e.GET_FILE_INFO_FAILED=`GET_FILE_INFO_FAILED`,e.INVALID_MIME_TYPE=`INVALID_MIME_TYPE`,e.PREPROCESSING_FAILED=`PREPROCESSING_FAILED`,e.UPLOAD_FAILED=`UPLOAD_FAILED`,e}({}),$=function(e){return e.ERROR=`ERROR`,e.PENDING=`PENDING`,e.SUCCESS=`SUCCESS`,e.UPLOADING=`UPLOADING`,e}({}),[Ew,Dw]=F(`baseFileUploadContext`),Ow=/[/\\]/;function kw(e,t,n=$.PENDING){return{uuid:``,isSyncedWithModelValue:!1,name:e.name,file:e,key:crypto.randomUUID(),mimeType:e.type,order:t,status:n,url:URL.createObjectURL(e)}}function Aw(e,t){return{...e,isSyncedWithModelValue:!0,status:t}}function jw(e,t){return t.some(t=>{if(t===`*/*`)return!0;if(t.endsWith(`/*`)){let[n]=t.split(`/`);return e.type.startsWith(`${n}/`)}return e.type===t})}function Mw(e){return e.split(`/`)[1]??`bin`}async function Nw(e){let t=await e.arrayBuffer(),n=await crypto.subtle.digest(`SHA-256`,t);return Array.from(new Uint8Array(n)).map(e=>e.toString(16).padStart(2,`0`)).join(``)}async function Pw(e,t){if(e.types.includes(`text/plain`))try{let t=(await(await e.getType(`text/plain`)).text()).trim().split(Ow).pop();if(t!==void 0&&t.includes(`.`))return t}catch{}return`clipboard.${Mw(t)}`}var[Fw,Iw]=F(`baseFileUploadClipboardContext`),Lw=`file-upload-clipboard-ignored-fingerprints`,Rw=(0,f.defineComponent)({__name:`BaseFileUploadClipboard`,setup(e){let{isDisabled:t,isValidFile:n,accept:r,onFilesSelected:i}=Dw(),a=(0,f.ref)([]);function o(){let e=sessionStorage.getItem(Lw);return e===null?new Set:new Set(JSON.parse(e))}function s(e){sessionStorage.setItem(Lw,JSON.stringify([...e]))}function c(e){let t=o();t.add(e),s(t)}function l(){for(let e of a.value)c(e.fingerprint);a.value=[]}function u(){i(a.value.map(e=>e.file)),l()}async function d(){if(t.value||!navigator.clipboard?.read)return;let e;try{e=await navigator.clipboard.read()}catch{return}let i=[];for(let t of e)for(let e of t.types){if(!e.startsWith(`image/`)||!jw({type:e},r.value))continue;let n=await t.getType(e),a=await Nw(n);i.push({blob:n,clipboardItem:t,fingerprint:a,mimeType:e})}let c=o(),l=i.some(e=>!c.has(e.fingerprint));l&&s(new Set);let u=l?new Set:c,d=[];for(let{blob:e,clipboardItem:t,fingerprint:r,mimeType:a}of i){if(u.has(r))continue;let i=await Pw(t,a),o=new File([e],i,{type:a});n.value!==null&&n.value(o)!==!0||d.push({file:o,fingerprint:r})}a.value=d}let p=(0,f.computed)(()=>a.value.map(e=>e.file));Fw({clear:l,files:p,upload:u});async function h(e){if(t.value)return;let i=e.clipboardData?.files;if(!i||i.length===0)return;let o=[];for(let e of Array.from(i)){if(!jw({type:e.type},r.value)||n.value!==null&&n.value(e)!==!0)continue;let t=await Nw(e);o.push({file:e,fingerprint:t})}o.length>0&&(a.value=o)}return(0,m.useEventListener)(window,`focus`,d),(0,m.useEventListener)(window,`paste`,h),d(),(e,t)=>(0,f.renderSlot)(e.$slots,`default`,{files:p.value})}}),zw=(0,f.defineComponent)({__name:`BaseFileUploadClipboardRemove`,setup(e){let{clear:t}=Iw();return(e,n)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.Primitive),{"as-child":!0,onClick:(0,f.unref)(t)},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`)]),_:3},8,[`onClick`]))}}),Bw=(0,f.defineComponent)({__name:`BaseFileUploadClipboardUpload`,setup(e){let{upload:t}=Iw();return(e,n)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.Primitive),{"as-child":!0,onClick:(0,f.unref)(t)},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`)]),_:3},8,[`onClick`]))}}),Vw=(0,f.defineComponent)({__name:`BaseFileUploadDropzone`,setup(e){let t=(0,f.ref)(!1),{isDisabled:n,isMultiple:r,onFilesSelected:i}=Dw(),a=(0,f.ref)(null),{isOverDropZone:o}=(0,m.useDropZone)((0,f.computed)(()=>a.value?.$el??null),{multiple:r.value,onDrop:e=>{n.value||e!==null&&e.length>0&&i(e)}}),s=0;function c(e,r){if(n.value){s=0,t.value=!1;return}switch(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`copy`),r){case`enter`:s+=1,t.value=!0;break;case`leave`:--s,s===0&&(t.value=!1);break;case`drop`:s=0,t.value=!1;break}}return(0,m.useEventListener)(document.body,`dragenter`,e=>c(e,`enter`)),(0,m.useEventListener)(document.body,`dragover`,e=>c(e,`over`)),(0,m.useEventListener)(document.body,`dragleave`,e=>c(e,`leave`)),(0,m.useEventListener)(document.body,`drop`,e=>c(e,`drop`)),(e,r)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.Primitive),{ref_key:`dropzoneRef`,ref:a,"as-child":!0},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`,{isHoveringOverDropzone:(0,f.unref)(n)?!1:(0,f.unref)(o),isHoveringOverPage:t.value})]),_:3},512))}}),[Hw,Uw]=F(`baseFileUploadItemContext`),Ww=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~`.split(``),Gw=e=>{let t=0;for(let n=0;n<e.length;n++){let r=e[n],i=Ww.indexOf(r);t=t*83+i}return t},Kw=(e,t)=>{var n=``;for(let r=1;r<=t;r++){let i=Math.floor(e)/83**(t-r)%83;n+=Ww[Math.floor(i)]}return n},qw=e=>{let t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4},Jw=e=>{let t=Math.max(0,Math.min(1,e));return Math.trunc(t<=.0031308?t*12.92*255+.5:(1.055*t**.4166666666666667-.055)*255+.5)},Yw=e=>e<0?-1:1,Xw=(e,t)=>Yw(e)*Math.abs(e)**+t,Zw=class extends Error{constructor(e){super(e),this.name=`ValidationError`,this.message=e}},Qw=e=>{if(!e||e.length<6)throw new Zw(`The blurhash string must be at least 6 characters`);let t=Gw(e[0]),n=Math.floor(t/9)+1,r=t%9+1;if(e.length!==4+2*r*n)throw new Zw(`blurhash length mismatch: length is ${e.length} but it should be ${4+2*r*n}`)},$w=e=>{let t=e>>16,n=e>>8&255,r=e&255;return[qw(t),qw(n),qw(r)]},eT=(e,t)=>{let n=Math.floor(e/361),r=Math.floor(e/19)%19,i=e%19;return[Xw((n-9)/9,2)*t,Xw((r-9)/9,2)*t,Xw((i-9)/9,2)*t]},tT=(e,t,n,r)=>{Qw(e),r|=1;let i=Gw(e[0]),a=Math.floor(i/9)+1,o=i%9+1,s=(Gw(e[1])+1)/166,c=Array(o*a);for(let t=0;t<c.length;t++)t===0?c[t]=$w(Gw(e.substring(2,6))):c[t]=eT(Gw(e.substring(4+t*2,6+t*2)),s*r);let l=t*4,u=new Uint8ClampedArray(l*n);for(let e=0;e<n;e++)for(let r=0;r<t;r++){let i=0,s=0,d=0;for(let l=0;l<a;l++)for(let a=0;a<o;a++){let u=Math.cos(Math.PI*r*a/t)*Math.cos(Math.PI*e*l/n),f=c[a+l*o];i+=f[0]*u,s+=f[1]*u,d+=f[2]*u}let f=Jw(i),p=Jw(s),m=Jw(d);u[4*r+0+e*l]=f,u[4*r+1+e*l]=p,u[4*r+2+e*l]=m,u[4*r+3+e*l]=255}return u},nT=4,rT=(e,t,n,r)=>{let i=0,a=0,o=0,s=t*nT;for(let c=0;c<t;c++){let t=nT*c;for(let l=0;l<n;l++){let n=t+l*s,u=r(c,l);i+=u*qw(e[n]),a+=u*qw(e[n+1]),o+=u*qw(e[n+2])}}let c=1/(t*n);return[i*c,a*c,o*c]},iT=e=>{let t=Jw(e[0]),n=Jw(e[1]),r=Jw(e[2]);return(t<<16)+(n<<8)+r},aT=(e,t)=>{let n=Math.floor(Math.max(0,Math.min(18,Math.floor(Xw(e[0]/t,.5)*9+9.5)))),r=Math.floor(Math.max(0,Math.min(18,Math.floor(Xw(e[1]/t,.5)*9+9.5)))),i=Math.floor(Math.max(0,Math.min(18,Math.floor(Xw(e[2]/t,.5)*9+9.5))));return n*19*19+r*19+i},oT=(e,t,n,r,i)=>{if(r<1||r>9||i<1||i>9)throw new Zw(`BlurHash must have between 1 and 9 components`);if(t*n*4!==e.length)throw new Zw(`Width and height must match the pixels array`);let a=[];for(let o=0;o<i;o++)for(let i=0;i<r;i++){let r=i==0&&o==0?1:2,s=rT(e,t,n,(e,a)=>r*Math.cos(Math.PI*i*e/t)*Math.cos(Math.PI*o*a/n));a.push(s)}let o=a[0],s=a.slice(1),c=``,l=r-1+(i-1)*9;c+=Kw(l,1);let u;if(s.length>0){let e=Math.max(...s.map(e=>Math.max(...e))),t=Math.floor(Math.max(0,Math.min(82,Math.floor(e*166-.5))));u=(t+1)/166,c+=Kw(t,1)}else u=1,c+=Kw(0,1);return c+=Kw(iT(o),4),s.forEach(e=>{c+=Kw(aT(e,u),2)}),c},sT=class{static async encode(e){if(!e.type.startsWith(`image/`))return null;let t=URL.createObjectURL(e),n;try{n=await this.loadImage(t)}catch{return URL.revokeObjectURL(t),null}URL.revokeObjectURL(t);let r=this.getClampedSize(n.width,n.height,32),i=this.getImageData(n,r.width,r.height);try{return oT(i.data,i.width,i.height,4,4)}catch{return null}}static getClampedSize(e,t,n){return e>=t&&e>n?{height:Math.round(t/e*n),width:n}:t>e&&t>n?{height:n,width:Math.round(e/t*n)}:{height:t,width:e}}static getImageData(e,t,n){let r=document.createElement(`canvas`);r.width=t,r.height=n;let i=r.getContext(`2d`);return i.drawImage(e,0,0,t,n),i.getImageData(0,0,t,n)}static loadImage(e){return new Promise((t,n)=>{let r=new Image;r.addEventListener(`load`,()=>t(r)),r.addEventListener(`error`,(...e)=>n(e)),r.src=e})}},cT=(0,f.defineComponent)({__name:`BaseFileUploadItem`,props:{item:{}},setup(e){let t=e,{isPublic:n,preprocess:r,onError:i,onRemoveFileUploadItem:a,onReplaceFileUploadItem:o,onStartUpload:s,onSuccess:c,onUpdateProgress:l}=Dw(),{fileUploadAdapter:u}=J();if(u.value===null)throw Error(`[BaseFileUpload] No adapter provided. Add an adapter to the ConfigProvider.
526
526
  Example: <UIConfigProvider :file-upload-adapter="myAdapter"><UIBaseFileUploadRoot ... /></UIConfigProvider>`);let d=u.value;async function p(){let{name:e,mimeType:n}=t.item;try{return await d.getFileInfo(e,n)}catch{i(t.item,Tw.GET_FILE_INFO_FAILED)}return null}let m=null;function h(e,r){return new Promise((i,a)=>{let o=new XMLHttpRequest;m=o;let s=new Blob([r]);o.upload.addEventListener(`progress`,e=>{if(e.lengthComputable){let n=Math.round(e.loaded/e.total*100);l(t.item,n)}}),o.onload=()=>{o.status>=200&&o.status<300?i():a(Error(`Upload failed with status ${o.status}`))},o.onerror=()=>{a(Error(`Upload failed due to a network error`))},o.open(`PUT`,e,!0),o.setRequestHeader(`Content-Type`,r.type),n.value?o.setRequestHeader(`x-amz-acl`,`public-read`):o.setRequestHeader(`x-amz-acl`,`private`),o.setRequestHeader(`x-ms-blob-type`,`BlockBlob`),o.send(s)})}async function g(e,r,i){let a={isPublic:n.value,onProgress:e=>l(t.item,e)};if(s(t.item,e),d.uploadFile!==void 0){await d.uploadFile(r,i,a);return}await h(r,i)}async function _(){let e=await p();if(e===null)return;let{uuid:n,uploadUrl:a}=e,{file:o}=t.item,s=o;if(r!==null)try{s=await r(o)}catch(e){let n=e instanceof Error&&e.message?e.message:Tw.PREPROCESSING_FAILED;i(t.item,n);return}let l=await sT.encode(s);try{await g(n,a,s)}catch{i(t.item,Tw.UPLOAD_FAILED);return}try{await d.confirmUpload(n,l),c(t.item)}catch{i(t.item,Tw.CONFIRM_UPLOAD_FAILED)}}function v(){m?.abort(),m=null,a(t.item)}return t.item.status===$.PENDING&&_(),Hw({item:(0,f.computed)(()=>t.item),onCancel:v,onRemove:()=>a(t.item),onReplace:e=>o(t.item,e)}),(e,n)=>(0,f.renderSlot)(e.$slots,`default`,{onRemove:()=>(0,f.unref)(a)(t.item),onReplace:e=>(0,f.unref)(o)(t.item,e)})}}),lT=(0,f.defineComponent)({__name:`BaseFileUploadItemCancel`,setup(e){let{isDisabled:t}=Dw(),{onCancel:n}=Uw();function r(){t.value||n()}return(e,n)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.Primitive),{"as-child":!0,disabled:(0,f.unref)(t),onClick:r},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`)]),_:3},8,[`disabled`]))}}),uT=(0,f.defineComponent)({__name:`BaseFileUploadItemRemove`,setup(e){let{isDisabled:t}=Dw(),{onRemove:n}=Uw();function r(){t.value||n()}return(e,n)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.Primitive),{"as-child":!0,disabled:(0,f.unref)(t),onClick:r},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`)]),_:3},8,[`disabled`]))}}),dT=(0,f.defineComponent)({__name:`BaseFileUploadItemReplace`,setup(e){let{isDisabled:t,accept:n}=Dw(),{onReplace:r}=Uw(),i=(0,m.useFileDialog)();i.onChange(e=>{if(e===null)return;let[t]=Array.from(e);t!==void 0&&r(t)});function a(){t.value||i.open({accept:n.value.join(`, `),multiple:!1})}return(e,n)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.Primitive),{"as-child":!0,disabled:(0,f.unref)(t),onClick:a},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`)]),_:3},8,[`disabled`]))}}),fT=(0,f.defineComponent)({__name:`BaseFileUploadRoot`,props:(0,f.mergeModels)({isPublic:{type:Boolean,default:!1},isValidFile:{type:[Function,null],default:null},accept:{},preprocess:{type:[Function,null],default:null},isDisabled:{type:Boolean,default:!1},disabledReason:{default:null}},{modelValue:{required:!0},modelModifiers:{}}),emits:(0,f.mergeModels)([`filesRejected`],[`update:modelValue`]),setup(e,{emit:t}){let n=e,r=t,i=(0,f.useModel)(e,`modelValue`),a=(0,f.computed)(()=>Array.isArray(i.value)),o=(0,f.computed)({get:()=>Array.isArray(i.value)?i.value.map(e=>Aw(e,$.SUCCESS)):i.value===null?[]:[Aw(i.value,$.SUCCESS)],set:e=>{if(a.value)i.value=e.map(e=>({uuid:e.uuid,name:e.name,blurHash:e.blurHash,mimeType:e.mimeType,order:e.order,url:e.url}));else{let t=e[0]??null;if(t===null){i.value=null;return}i.value={uuid:t.uuid,name:t.name,blurHash:t.blurHash,mimeType:t.mimeType,order:t.order,url:t.url}}}}),s=(0,f.ref)([]),c=(0,f.computed)(()=>[...o.value.filter(e=>s.value.some(t=>t.uuid===e.uuid)?!e.isSyncedWithModelValue:!0),...s.value].toSorted((e,t)=>e.order-t.order).slice(a.value?void 0:-1));function l(e){let t=[],i=[];for(let r of e){if(!jw(r,n.accept)){t.push({error:Tw.INVALID_MIME_TYPE,file:r});continue}if(n.isValidFile!==null){let e=n.isValidFile(r);if(e!==!0){t.push({error:e,file:r});continue}}i.push(r)}if(t.length>0&&r(`filesRejected`,t),a.value)s.value.push(...i.map((e,t)=>kw(e,t+o.value.length)));else{let[e]=i;if(e===void 0)return;s.value=[kw(e,0)]}}function u(e,t){s.value=s.value.map(n=>n.key===e?{...n,...t}:n)}function d(e,t){u(e.key,{uuid:t,progress:0,status:$.UPLOADING})}function p(e,t){u(e.key,{progress:t,status:$.UPLOADING})}function m(e){let t={...e,isSyncedWithModelValue:!0,blurHash:null,status:$.SUCCESS};u(e.key,t),a.value?o.value=[...o.value.filter(t=>t.uuid!==e.uuid),t]:o.value=[t]}function h(e,t){u(e.key,{error:t,status:$.ERROR})}function g(e){e?.startsWith(`blob:`)&&URL.revokeObjectURL(e)}function _(e){g(e.url),s.value=s.value.filter(t=>t.key!==e.key),o.value=o.value.filter(t=>t.uuid!==e.uuid)}function v(e,t){o.value=o.value.filter(t=>t.uuid!==e.uuid),s.value.some(t=>t.key===e.key)?(g(e.url),u(e.key,kw(t,e.order))):s.value=[...s.value,kw(t,e.order)]}return Ew({...Xr(n),isMultiple:a,preprocess:n.preprocess,onError:h,onFilesSelected:l,onRemoveFileUploadItem:_,onReplaceFileUploadItem:v,onStartUpload:d,onSuccess:m,onUpdateProgress:p}),(e,t)=>(0,f.renderSlot)(e.$slots,`default`,{items:c.value})}}),pT=(0,f.defineComponent)({__name:`BaseFileUploadTrigger`,setup(e){let{isDisabled:t,isMultiple:n,accept:r,onFilesSelected:i}=Dw(),a=(0,m.useFileDialog)();a.onChange(e=>{e!==null&&i(Array.from(e))});function o(){t.value||a.open({accept:r.value.join(`, `),multiple:n.value})}return(e,n)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(h.Primitive),{"as-child":!0,disabled:(0,f.unref)(t),onClick:o},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`,{isDisabled:(0,f.unref)(t)})]),_:3},8,[`disabled`]))}}),mT=(0,f.defineComponent)({__name:`BreadcrumbItem`,props:{isLabelHidden:{type:Boolean},icon:{},label:{},to:{}},setup(e){let t=e,n=(0,f.computed)(()=>t.isLabelHidden?`sr-only`:``),r=(0,f.computed)(()=>t.to===void 0?``:`group-hover:text-primary group-hover:underline`);return(e,i)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(t.to===void 0?`span`:Z),{class:`min-w-0 overflow-hidden`},{default:(0,f.withCtx)(()=>[((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(t.to===void 0?`span`:(0,f.unref)(y.RouterLink)),{to:t.to,class:`group min-w-0`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(I,{class:`min-w-0`,gap:`sm`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(W,{"is-disabled":!t.isLabelHidden,label:t.label},{default:(0,f.withCtx)(()=>[t.icon?((0,f.openBlock)(),(0,f.createBlock)((0,f.resolveDynamicComponent)(t.icon),{key:0,class:(0,f.normalizeClass)([{"group-hover:text-primary":t.to!==void 0},`size-4 shrink-0 text-tertiary`])},null,8,[`class`])):(0,f.createCommentVNode)(``,!0)]),_:1},8,[`is-disabled`,`label`]),t.label?((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(U),{key:0,text:t.label,class:(0,f.normalizeClass)((0,f.unref)(Ty)(`text-xs text-tertiary`,n.value,r.value))},null,8,[`text`,`class`])):(0,f.createCommentVNode)(``,!0)]),_:1})]),_:1},8,[`to`]))]),_:1}))}}),hT={class:`min-w-0`},gT=(0,f.defineComponent)({__name:`BreadcrumbItems`,setup(e){return(e,t)=>((0,f.openBlock)(),(0,f.createElementBlock)(`nav`,hT,[(0,f.createVNode)(I,{align:`center`,gap:`sm`},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`)]),_:3})]))}}),_T=(0,f.defineComponent)({__name:`BreadcrumbSeparator`,setup(e){return(e,t)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(pn),{class:`size-3.5 shrink-0 text-disabled`}))}}),[vT,yT]=F(`checkboxContext`),bT=V({slots:{control:`
527
527
  relative flex size-4 items-center justify-center overflow-hidden
528
528
  rounded-xs border border-solid border-secondary bg-primary outline-2
@@ -937,7 +937,9 @@ Example: <UIConfigProvider :file-upload-adapter="myAdapter"><UIBaseFileUploadRoo
937
937
  rounded-sm outline-fg-brand-primary
938
938
  focus-visible:outline-2
939
939
  disabled:cursor-not-allowed
940
- `,t.class))},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`)]),_:3},8,[`class`]))}});function Lk(){let e=(0,f.ref)(!1),t=(0,f.shallowRef)(null),n=(0,f.computed)(()=>t.value?.isOpen.value??!1);function r(){t.value?.toggle()}function i(n,r,i){t.value={isOpen:n,isToggleHidden:i,toggle:r},e.value=!0}function a(){t.value=null,e.value=!1}fE({hasDetailPane:e,isOpen:n,isToggleHidden:(0,f.computed)(()=>t.value?.isToggleHidden??!1),registerDetailPane:i,toggle:r,unregisterDetailPane:a})}var Rk=(0,f.defineComponent)({__name:`DashboardPageHeaderBreadcrumbs`,props:{breadcrumbs:{}},setup(e){let t=e;return(e,n)=>t.breadcrumbs.length>0?((0,f.openBlock)(),(0,f.createBlock)(gT,{key:0},{default:(0,f.withCtx)(()=>[((0,f.openBlock)(!0),(0,f.createElementBlock)(f.Fragment,null,(0,f.renderList)(t.breadcrumbs,(e,n)=>((0,f.openBlock)(),(0,f.createElementBlock)(f.Fragment,{key:`${e.label}-${n}`},[(0,f.createVNode)(mT,{icon:e.icon,to:e.to,label:e.label},null,8,[`icon`,`to`,`label`]),n<t.breadcrumbs.length-1?((0,f.openBlock)(),(0,f.createBlock)(_T,{key:0})):(0,f.createCommentVNode)(``,!0)],64))),128))]),_:1})):(0,f.createCommentVNode)(``,!0)}}),zk=(0,f.defineComponent)({__name:`DashboardPageHeaderSidebarToggle`,setup(e){let{isSidebarOpen:t}=Q(),n=(0,g.useI18n)(),r=(0,p.createAction)({id:`toggle-main-sidebar`,name:()=>n.t(`action.global.toggle_main_sidebar.name`),execute:()=>{a()},group:(0,p.useActionGroup)().navigation,icon:()=>t.value?Yn:Ln,keyboardShortcut:{key:`B`,mod:!0},keywords:n.t(`action.global.toggle_main_sidebar.keywords`).split(` `)}),i=(0,f.computed)(()=>t.value?n.t(`component.dashboard_page_header_sidebar_toggle.collapse`):n.t(`component.dashboard_page_header_sidebar_toggle.expand`));function a(){t.value=!t.value}return(e,n)=>((0,f.openBlock)(),(0,f.createBlock)(W,{label:i.value,"keyboard-shortcut":{key:`B`,mod:!0}},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(Cs,{action:(0,f.unref)(r),"is-current-context-only":!1},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(Z),null,{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(h.Toggle),{"model-value":(0,f.unref)(t),"data-state":(0,f.unref)(t)?`open`:`closed`,class:`group/toggle -ml-xxs flex size-6 items-center justify-center rounded-sm duration-150 hover:bg-secondary-hover`},{default:(0,f.withCtx)(()=>[...n[0]||=[(0,f.createElementVNode)(`div`,{class:`flex h-3 w-3.5 justify-start rounded-[0.1875rem] border border-fg-tertiary p-[0.09375rem] duration-150 group-data-[state=open]/toggle:border-fg-tertiary dark:group-data-[state=open]/toggle:border-fg-secondary`},[(0,f.createElementVNode)(`div`,{class:`h-full w-0.5 rounded-[1px] bg-fg-tertiary duration-150 group-data-[state=open]/toggle:w-1 group-data-[state=open]/toggle:bg-fg-tertiary dark:group-data-[state=open]/toggle:bg-fg-secondary`})],-1)]]),_:1},8,[`model-value`,`data-state`])]),_:1})]),_:1},8,[`action`])]),_:1},8,[`label`]))}}),Bk={type:`button`,class:`flex h-7 w-full max-w-60 items-center gap-sm rounded-md! bg-fg-primary/4 pr-sm pl-md duration-100 hover:bg-fg-primary/7 hover:brightness-98 dark:bg-primary/90 dark:hover:bg-primary/90 dark:hover:brightness-110`},Vk={class:`flex-1 truncate text-left text-xxs text-placeholder`},Hk=(0,f.defineComponent)({__name:`TopBarCommandMenuSearch`,setup(e){let t=(0,g.useI18n)(),n=bS();return(e,r)=>((0,f.openBlock)(),(0,f.createBlock)(Cs,{action:(0,f.unref)(n),"is-current-context-only":!0},{default:(0,f.withCtx)(({keyboardShortcut:e})=>[(0,f.createVNode)(Z,null,{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`button`,Bk,[(0,f.createVNode)((0,f.unref)(hr),{class:`size-3.5 shrink-0 text-quaternary`}),(0,f.createElementVNode)(`span`,Vk,(0,f.toDisplayString)((0,f.unref)(t).t(`component.top_bar.search`)),1),e===null?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createBlock)(di,{key:0,"keyboard-shortcut":e,"is-key-hold-visualization-enabled":!0},null,8,[`keyboard-shortcut`]))])]),_:2},1024)]),_:1},8,[`action`]))}});function Uk(){let e=(0,y.useRouter)(),t=(0,f.ref)(e.options.history.state),n=(0,f.computed)(()=>t.value.back!==null),r=(0,f.computed)(()=>t.value.forward!==null);e.afterEach(()=>{t.value=e.options.history.state});function i(){n.value&&e.back()}function a(){r.value&&e.forward()}return{canGoBack:n,canGoForward:r,goBack:i,goForward:a}}var Wk=(0,f.defineComponent)({__name:`TopBarNavigationArrows`,setup(e){let t=(0,g.useI18n)(),{canGoBack:n,canGoForward:r,goBack:i,goForward:a}=Uk();return(e,o)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(I),{gap:`xxs`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(X),{icon:(0,f.unref)(Pt),"is-disabled":!(0,f.unref)(n),label:(0,f.unref)(t).t(`component.top_bar.navigation.back`),"keyboard-shortcut":{key:`ArrowLeft`,mod:!0},variant:`tertiary`,size:`sm`,onClick:(0,f.unref)(i)},null,8,[`icon`,`is-disabled`,`label`,`onClick`]),(0,f.createVNode)((0,f.unref)(X),{icon:(0,f.unref)(Rt),"is-disabled":!(0,f.unref)(r),label:(0,f.unref)(t).t(`component.top_bar.navigation.forward`),"keyboard-shortcut":{key:`ArrowRight`,mod:!0},variant:`tertiary`,size:`sm`,onClick:(0,f.unref)(a)},null,8,[`icon`,`is-disabled`,`label`,`onClick`])]),_:1}))}}),Gk={class:`flex shrink-0 items-center px-xl pb-md`},Kk={class:`flex flex-1 items-center`},qk={class:`sr-only`},Jk={key:3,class:`ml-lg text-xs text-primary`},Yk={class:`flex flex-1 items-center justify-center`},Xk={class:`flex h-full flex-1 items-center justify-end`},Zk=(0,f.defineComponent)({__name:`TopBar`,setup(e){let{showNavigationArrowsInTopBar:t}=J(),{title:n,breadcrumbs:r}=gE(),{hasDetailPane:i,isToggleHidden:a}=pE();return(e,o)=>((0,f.openBlock)(),(0,f.createElementBlock)(`div`,Gk,[(0,f.createElementVNode)(`div`,Kk,[(0,f.createVNode)(zk),(0,f.unref)(r).length>0||(0,f.unref)(n)!==null?((0,f.openBlock)(),(0,f.createBlock)($o,{key:0,class:`ml-sm h-4`,orientation:`vertical`})):(0,f.createCommentVNode)(``,!0),(0,f.unref)(t)?((0,f.openBlock)(),(0,f.createElementBlock)(f.Fragment,{key:1},[(0,f.createVNode)(Wk,{class:`ml-sm`}),(0,f.unref)(r).length>0||(0,f.unref)(n)!==null?((0,f.openBlock)(),(0,f.createBlock)($o,{key:0,class:`ml-sm h-4`,orientation:`vertical`})):(0,f.createCommentVNode)(``,!0)],64)):(0,f.createCommentVNode)(``,!0),(0,f.unref)(r).length>0?((0,f.openBlock)(),(0,f.createElementBlock)(f.Fragment,{key:2},[(0,f.createElementVNode)(`h1`,qk,(0,f.toDisplayString)((0,f.unref)(n)),1),(0,f.createVNode)(Rk,{breadcrumbs:(0,f.unref)(r),class:`ml-lg`},null,8,[`breadcrumbs`])],64)):(0,f.unref)(n)===null?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createElementBlock)(`h1`,Jk,(0,f.toDisplayString)((0,f.unref)(n)),1))]),(0,f.createElementVNode)(`div`,Yk,[(0,f.createVNode)(Hk)]),(0,f.createElementVNode)(`div`,Xk,[(0,f.renderSlot)(e.$slots,`actions`),(0,f.unref)(i)&&!(0,f.unref)(a)?((0,f.openBlock)(),(0,f.createBlock)(QE,{key:0})):(0,f.createCommentVNode)(``,!0)])]))}}),Qk=(0,f.defineComponent)({__name:`MainContent`,setup(e){let{isFloatingSidebar:t,isSidebarOpen:n,collapsedVariant:r,sidebarWidth:i}=Q(),a=np();Lk();let{isBrandedActive:o}=Gx(),s=(0,f.computed)(()=>t.value?`0.5rem`:r.value===`minified`||n.value?i.value:`0.5rem`);return(e,t)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(_.Motion),{initial:{paddingLeft:s.value},animate:{paddingLeft:s.value},transition:{duration:(0,f.unref)(a)?0:.3,type:`spring`,bounce:0},class:(0,f.normalizeClass)([(0,f.unref)(o)?null:`bg-secondary`,`flex size-full flex-col overflow-hidden p-md`])},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`div`,{class:(0,f.normalizeClass)((0,f.unref)(o)?[`default`,`branded`]:null)},[(0,f.createVNode)(Zk,null,{actions:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`top-bar-actions`)]),_:3})],2),(0,f.renderSlot)(e.$slots,`default`)]),_:3},8,[`initial`,`animate`,`transition`,`class`]))}}),$k={},eA={width:`360`,height:`585`,viewBox:`0 0 360 585`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,class:`pointer-events-none absolute bottom-0 left-0`};function tA(e,t){return(0,f.openBlock)(),(0,f.createElementBlock)(`svg`,eA,[...t[0]||=[(0,f.createStaticVNode)(`<g opacity="0.4" filter="url(#filter0_f_5410_8853)"><path d="M-39 642L13.5 84L74.5 525L276 577.5L-39 642Z" class="fill-corner-highlight"></path></g><defs><filter id="filter0_f_5410_8853" x="-123" y="0" width="483" height="726" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="42" result="effect1_foregroundBlur_5410_8853"></feGaussianBlur></filter></defs>`,2)]])}var nA=H($k,[[`render`,tA]]),rA=(0,f.defineComponent)({__name:`MainLayout`,props:{variant:{default:`default`}},setup(e){let t=e,{appearance:n}=$r(),r=(0,f.computed)(()=>t.variant===`branded`&&n.value!==`dark`);return Ux({isBrandedActive:r,variant:(0,f.computed)(()=>t.variant)}),(e,t)=>((0,f.openBlock)(),(0,f.createElementBlock)(`div`,{class:(0,f.normalizeClass)([r.value?`bg-linear-to-tr from-brand-950 to-brand-800`:null,`relative flex h-dvh w-full overflow-hidden`])},[(0,f.renderSlot)(e.$slots,`default`),r.value?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createBlock)(nA,{key:0}))],2))}}),iA=V({slots:{input:`
940
+ `,t.class))},{default:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`default`)]),_:3},8,[`class`]))}});function Lk(){let e=(0,f.ref)(!1),t=(0,f.shallowRef)(null),n=(0,f.computed)(()=>t.value?.isOpen.value??!1);function r(){t.value?.toggle()}function i(n,r,i){t.value={isOpen:n,isToggleHidden:i,toggle:r},e.value=!0}function a(){t.value=null,e.value=!1}fE({hasDetailPane:e,isOpen:n,isToggleHidden:(0,f.computed)(()=>t.value?.isToggleHidden??!1),registerDetailPane:i,toggle:r,unregisterDetailPane:a})}var Rk=(0,f.defineComponent)({__name:`DashboardPageHeaderBreadcrumbs`,props:{breadcrumbs:{}},setup(e){let t=e;return(e,n)=>t.breadcrumbs.length>0?((0,f.openBlock)(),(0,f.createBlock)(gT,{key:0},{default:(0,f.withCtx)(()=>[((0,f.openBlock)(!0),(0,f.createElementBlock)(f.Fragment,null,(0,f.renderList)(t.breadcrumbs,(e,n)=>((0,f.openBlock)(),(0,f.createElementBlock)(f.Fragment,{key:`${e.label}-${n}`},[(0,f.createVNode)(mT,{icon:e.icon,to:e.to,label:e.label},null,8,[`icon`,`to`,`label`]),n<t.breadcrumbs.length-1?((0,f.openBlock)(),(0,f.createBlock)(_T,{key:0})):(0,f.createCommentVNode)(``,!0)],64))),128))]),_:1})):(0,f.createCommentVNode)(``,!0)}}),zk=(0,f.defineComponent)({__name:`DashboardPageHeaderSidebarToggle`,setup(e){let{isSidebarOpen:t}=Q(),n=(0,g.useI18n)(),r=(0,p.createAction)({id:`toggle-main-sidebar`,name:()=>n.t(`action.global.toggle_main_sidebar.name`),execute:()=>{a()},group:(0,p.useActionGroup)().navigation,icon:()=>t.value?Yn:Ln,keyboardShortcut:{key:`B`,mod:!0},keywords:n.t(`action.global.toggle_main_sidebar.keywords`).split(` `)}),i=(0,f.computed)(()=>t.value?n.t(`component.dashboard_page_header_sidebar_toggle.collapse`):n.t(`component.dashboard_page_header_sidebar_toggle.expand`));function a(){t.value=!t.value}return(e,n)=>((0,f.openBlock)(),(0,f.createBlock)(W,{label:i.value,"keyboard-shortcut":{key:`B`,mod:!0}},{default:(0,f.withCtx)(()=>[(0,f.createVNode)(Cs,{action:(0,f.unref)(r),"is-current-context-only":!1},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(Z),null,{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(h.Toggle),{"model-value":(0,f.unref)(t),"data-state":(0,f.unref)(t)?`open`:`closed`,class:`group/toggle -ml-xxs flex size-6 items-center justify-center rounded-sm duration-150 hover:bg-secondary-hover`},{default:(0,f.withCtx)(()=>[...n[0]||=[(0,f.createElementVNode)(`div`,{class:`flex h-3 w-3.5 justify-start rounded-[0.1875rem] border border-fg-tertiary p-[0.09375rem] duration-150 group-data-[state=open]/toggle:border-fg-tertiary dark:group-data-[state=open]/toggle:border-fg-secondary`},[(0,f.createElementVNode)(`div`,{class:`h-full w-0.5 rounded-[1px] bg-fg-tertiary duration-150 group-data-[state=open]/toggle:w-1 group-data-[state=open]/toggle:bg-fg-tertiary dark:group-data-[state=open]/toggle:bg-fg-secondary`})],-1)]]),_:1},8,[`model-value`,`data-state`])]),_:1})]),_:1},8,[`action`])]),_:1},8,[`label`]))}}),Bk={type:`button`,class:`flex h-7 w-full max-w-60 items-center gap-sm rounded-md! bg-fg-primary/4 pr-sm pl-md duration-100 hover:bg-fg-primary/7 hover:brightness-98 dark:bg-primary/90 dark:hover:bg-primary/90 dark:hover:brightness-110`},Vk={class:`flex-1 truncate text-left text-xxs text-placeholder`},Hk=(0,f.defineComponent)({__name:`TopBarCommandMenuSearch`,setup(e){let t=(0,g.useI18n)(),n=bS();return(e,r)=>((0,f.openBlock)(),(0,f.createBlock)(Cs,{action:(0,f.unref)(n),"is-current-context-only":!0},{default:(0,f.withCtx)(({keyboardShortcut:e})=>[(0,f.createVNode)(Z,null,{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`button`,Bk,[(0,f.createVNode)((0,f.unref)(hr),{class:`size-3.5 shrink-0 text-quaternary`}),(0,f.createElementVNode)(`span`,Vk,(0,f.toDisplayString)((0,f.unref)(t).t(`component.top_bar.search`)),1),e===null?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createBlock)(di,{key:0,"keyboard-shortcut":e,"is-key-hold-visualization-enabled":!0},null,8,[`keyboard-shortcut`]))])]),_:2},1024)]),_:1},8,[`action`]))}});function Uk(){let e=(0,y.useRouter)(),t=(0,f.ref)(e.options.history.state),n=(0,f.computed)(()=>t.value.back!==null),r=(0,f.computed)(()=>t.value.forward!==null);e.afterEach(()=>{t.value=e.options.history.state});function i(){n.value&&e.back()}function a(){r.value&&e.forward()}return{canGoBack:n,canGoForward:r,goBack:i,goForward:a}}var Wk=(0,f.defineComponent)({__name:`TopBarNavigationArrows`,setup(e){let t=(0,g.useI18n)(),{canGoBack:n,canGoForward:r,goBack:i,goForward:a}=Uk();return(e,o)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(I),{gap:`xxs`},{default:(0,f.withCtx)(()=>[(0,f.createVNode)((0,f.unref)(X),{icon:(0,f.unref)(Pt),"is-disabled":!(0,f.unref)(n),label:(0,f.unref)(t).t(`component.top_bar.navigation.back`),"keyboard-shortcut":{key:`ArrowLeft`,mod:!0},variant:`tertiary`,size:`sm`,onClick:(0,f.unref)(i)},null,8,[`icon`,`is-disabled`,`label`,`onClick`]),(0,f.createVNode)((0,f.unref)(X),{icon:(0,f.unref)(Rt),"is-disabled":!(0,f.unref)(r),label:(0,f.unref)(t).t(`component.top_bar.navigation.forward`),"keyboard-shortcut":{key:`ArrowRight`,mod:!0},variant:`tertiary`,size:`sm`,onClick:(0,f.unref)(a)},null,8,[`icon`,`is-disabled`,`label`,`onClick`])]),_:1}))}}),Gk={class:`flex shrink-0 items-center px-xl pb-md`},Kk={class:`flex flex-1 items-center`},qk={class:`sr-only`},Jk={key:3,class:`ml-lg text-xs text-primary`},Yk={class:`flex flex-1 items-center justify-center`},Xk={class:`flex h-full flex-1 items-center justify-end`},Zk=(0,f.defineComponent)({__name:`TopBar`,setup(e){let{showNavigationArrowsInTopBar:t}=J(),{title:n,breadcrumbs:r}=gE(),{hasDetailPane:i,isToggleHidden:a}=pE();return(e,o)=>((0,f.openBlock)(),(0,f.createElementBlock)(`div`,Gk,[(0,f.createElementVNode)(`div`,Kk,[(0,f.createVNode)(zk),(0,f.unref)(r).length>0||(0,f.unref)(n)!==null?((0,f.openBlock)(),(0,f.createBlock)($o,{key:0,class:`ml-sm h-4`,orientation:`vertical`})):(0,f.createCommentVNode)(``,!0),(0,f.unref)(t)?((0,f.openBlock)(),(0,f.createElementBlock)(f.Fragment,{key:1},[(0,f.createVNode)(Wk,{class:`ml-sm`}),(0,f.unref)(r).length>0||(0,f.unref)(n)!==null?((0,f.openBlock)(),(0,f.createBlock)($o,{key:0,class:`ml-sm h-4`,orientation:`vertical`})):(0,f.createCommentVNode)(``,!0)],64)):(0,f.createCommentVNode)(``,!0),(0,f.unref)(r).length>0?((0,f.openBlock)(),(0,f.createElementBlock)(f.Fragment,{key:2},[(0,f.createElementVNode)(`h1`,qk,(0,f.toDisplayString)((0,f.unref)(n)),1),(0,f.createVNode)(Rk,{breadcrumbs:(0,f.unref)(r),class:`ml-lg`},null,8,[`breadcrumbs`])],64)):(0,f.unref)(n)===null?(0,f.createCommentVNode)(``,!0):((0,f.openBlock)(),(0,f.createElementBlock)(`h1`,Jk,(0,f.toDisplayString)((0,f.unref)(n)),1))]),(0,f.createElementVNode)(`div`,Yk,[(0,f.createVNode)(Hk)]),(0,f.createElementVNode)(`div`,Xk,[(0,f.renderSlot)(e.$slots,`actions`),(0,f.unref)(i)&&!(0,f.unref)(a)?((0,f.openBlock)(),(0,f.createBlock)(QE,{key:0})):(0,f.createCommentVNode)(``,!0)])]))}}),Qk=(0,f.defineComponent)({__name:`MainContent`,setup(e){let{isFloatingSidebar:t,isSidebarOpen:n,collapsedVariant:r,sidebarWidth:i}=Q(),a=np();Lk();let{isBrandedActive:o}=Gx(),s=(0,f.computed)(()=>t.value?`0.5rem`:r.value===`minified`||n.value?i.value:`0.5rem`);return(e,t)=>((0,f.openBlock)(),(0,f.createBlock)((0,f.unref)(_.Motion),{initial:{paddingLeft:s.value},animate:{paddingLeft:s.value},transition:{duration:(0,f.unref)(a)?0:.3,type:`spring`,bounce:0},class:(0,f.normalizeClass)([(0,f.unref)(o)?null:`bg-secondary`,`flex size-full flex-col overflow-hidden p-md`])},{default:(0,f.withCtx)(()=>[(0,f.createElementVNode)(`div`,{class:(0,f.normalizeClass)((0,f.unref)(o)?[`default`,`branded`]:null)},[(0,f.createVNode)(Zk,null,{actions:(0,f.withCtx)(()=>[(0,f.renderSlot)(e.$slots,`top-bar-actions`)]),_:3})],2),(0,f.renderSlot)(e.$slots,`default`)]),_:3},8,[`initial`,`animate`,`transition`,`class`]))}}),$k={},eA={width:`360`,height:`585`,viewBox:`0 0 360 585`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,class:`pointer-events-none absolute bottom-0 left-0`};function tA(e,t){return(0,f.openBlock)(),(0,f.createElementBlock)(`svg`,eA,[...t[0]||=[(0,f.createStaticVNode)(`<g opacity="0.4" filter="url(#filter0_f_5410_8853)"><path d="M-39 642L13.5 84L74.5 525L276 577.5L-39 642Z" class="fill-corner-highlight"></path></g><defs><filter id="filter0_f_5410_8853" x="-123" y="0" width="483" height="726" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="42" result="effect1_foregroundBlur_5410_8853"></feGaussianBlur></filter></defs>`,2)]])}var nA=H($k,[[`render`,tA]]),rA=(0,f.defineComponent)({__name:`MainLayout`,props:{variant:{default:`default`}},setup(e){let t=e,n=(0,f.computed)(()=>t.variant===`branded`);return Ux({isBrandedActive:n,variant:(0,f.computed)(()=>t.variant)}),(e,t)=>((0,f.openBlock)(),(0,f.createElementBlock)(`div`,{class:(0,f.normalizeClass)([n.value?`
941
+ light:bg-linear-to-tr light:from-brand-950 light:to-brand-800
942
+ `:null,`relative flex h-dvh w-full overflow-hidden`])},[(0,f.renderSlot)(e.$slots,`default`),(0,f.createVNode)(nA,{class:(0,f.normalizeClass)(n.value?`light:hidden`:null)},null,8,[`class`])],2))}}),iA=V({slots:{input:`
941
943
  size-full truncate bg-transparent px-md text-xs text-primary outline-none
942
944
  placeholder:text-placeholder
943
945
  read-only:cursor-default
package/dist/index.js CHANGED
@@ -20430,7 +20430,8 @@ var [lS, uS] = K("buttonContext"), dS = Z({
20430
20430
  setup(e) {
20431
20431
  return (e, t) => (A(), s(R($), {
20432
20432
  class: "w-full",
20433
- gap: "xl"
20433
+ gap: "xl",
20434
+ align: "stretch"
20434
20435
  }, {
20435
20436
  default: H(() => [P(e.$slots, "default")]),
20436
20437
  _: 3
@@ -25071,7 +25072,7 @@ var ET = /*#__PURE__*/ _u(wT, [["render", TT]]), DT = /* @__PURE__ */ h({
25071
25072
  return e.type === "sub-items";
25072
25073
  }
25073
25074
  return k(() => {
25074
- b(n) && n.subItems != null && console.warn("[MainSidebarNavigationLink] Received `subItems` but `type` is missing or set to 'link'. Set `type: 'sub-items'` to render this item as an expandable group.");
25075
+ !b(n) && "subItems" in n && n.subItems != null && console.warn("[MainSidebarNavigationLink] Received `subItems` but `type` is missing or set to 'link'. Set `type: 'sub-items'` to render this item as an expandable group.");
25075
25076
  }), (e, t) => h.value && p.value !== null ? (A(), s(nE, {
25076
25077
  key: 0,
25077
25078
  "is-popover-open": _.value,
@@ -25167,7 +25168,7 @@ var pE = { class: "flex h-full flex-col justify-between overflow-hidden text-pri
25167
25168
  }) }, [P(e.$slots, "header")], 4),
25168
25169
  u("nav", {
25169
25170
  style: D({ padding: R(t) }),
25170
- class: "flex h-full flex-col justify-between gap-2xl overflow-y-auto"
25171
+ class: "flex h-full flex-col justify-between gap-2xl overflow-x-hidden overflow-y-auto"
25171
25172
  }, [P(e.$slots, "navigation"), P(e.$slots, "bottom-navigation")], 4),
25172
25173
  u("div", {
25173
25174
  style: D({ padding: R(t) }),
@@ -33570,11 +33571,11 @@ var wP = /*#__PURE__*/ _u(xP, [["render", CP]]), TP = /* @__PURE__ */ h({
33570
33571
  __name: "MainLayout",
33571
33572
  props: { variant: { default: "default" } },
33572
33573
  setup(e) {
33573
- let t = e, { appearance: n } = dc(), r = o(() => t.variant === "branded" && n.value !== "dark");
33574
+ let t = e, n = o(() => t.variant === "branded");
33574
33575
  return uE({
33575
- isBrandedActive: r,
33576
+ isBrandedActive: n,
33576
33577
  variant: o(() => t.variant)
33577
- }), (e, t) => (A(), l("div", { class: E([r.value ? "bg-linear-to-tr from-brand-950 to-brand-800" : null, "relative flex h-dvh w-full overflow-hidden"]) }, [P(e.$slots, "default"), r.value ? c("", !0) : (A(), s(wP, { key: 0 }))], 2));
33578
+ }), (e, t) => (A(), l("div", { class: E([n.value ? "\n light:bg-linear-to-tr light:from-brand-950 light:to-brand-800\n " : null, "relative flex h-dvh w-full overflow-hidden"]) }, [P(e.$slots, "default"), m(wP, { class: E(n.value ? "light:hidden" : null) }, null, 8, ["class"])], 2));
33578
33579
  }
33579
33580
  }), EP = Z({
33580
33581
  slots: {
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "type": "module",
7
- "version": "1.14.0",
7
+ "version": "1.14.2",
8
8
  "license": "SEE LICENSE IN LICENSE.md",
9
9
  "repository": {
10
10
  "type": "git",
@@ -49,8 +49,8 @@
49
49
  "vue-sonner": "2.0.9",
50
50
  "zod": "4.3.5",
51
51
  "@wisemen/vue-core-actions": "^0.2.2",
52
- "@wisemen/vue-core-dates": "^1.1.0",
53
- "formango": "^3.2.5"
52
+ "formango": "^3.2.5",
53
+ "@wisemen/vue-core-dates": "^1.1.0"
54
54
  },
55
55
  "dependencies": {
56
56
  "@tailwindcss/vite": "4.1.18",
@@ -66,9 +66,9 @@
66
66
  "vue-component-type-helpers": "3.3.0",
67
67
  "vue-sonner": "2.0.9",
68
68
  "@wisemen/vue-core-api-utils": "2.0.5",
69
+ "@wisemen/vue-core-utils": "0.1.1",
69
70
  "@wisemen/vue-core-icons": "0.0.3",
70
- "@wisemen/vue-core-dates": "1.1.0",
71
- "@wisemen/vue-core-utils": "0.1.1"
71
+ "@wisemen/vue-core-dates": "1.1.0"
72
72
  },
73
73
  "devDependencies": {
74
74
  "@chromatic-com/storybook": "5.0.2",
@@ -105,8 +105,8 @@
105
105
  "@wisemen/eslint-config-vue": "2.1.4",
106
106
  "@wisemen/vue-core-actions": "0.2.2",
107
107
  "@wisemen/vue-core-dates": "1.1.0",
108
- "@wisemen/vue-core-tailwind-config": "0.1.0",
109
- "formango": "3.2.5"
108
+ "formango": "3.2.5",
109
+ "@wisemen/vue-core-tailwind-config": "0.1.1"
110
110
  },
111
111
  "scripts": {
112
112
  "build": "vite build",