diff --git a/admin/src/app/pageTitle.ts b/admin/src/app/pageTitle.ts index 11334490..15b039c0 100644 --- a/admin/src/app/pageTitle.ts +++ b/admin/src/app/pageTitle.ts @@ -21,6 +21,9 @@ export function pageIndicator(route: RouteLocationNormalizedLoaded): string { if (route.name === 'plugins') { return t('backend::lang.plugins.title') } + if (route.name === 'media') { + return t('backend::lang.media.title') + } if (route.name === 'connect') { return t('backend::lang.mcp_connect.page_title') } diff --git a/admin/src/app/router.ts b/admin/src/app/router.ts index 8b3ab243..79d94f8e 100644 --- a/admin/src/app/router.ts +++ b/admin/src/app/router.ts @@ -13,6 +13,7 @@ import SettingsFormView from '../views/SettingsFormView.vue' import SettingsIndexView from '../views/SettingsIndexView.vue' import AccountView from '../views/AccountView.vue' import ConnectView from '../views/ConnectView.vue' +import MediaView from '../views/MediaView.vue' import PluginsView from '../views/PluginsView.vue' import NotFoundView from '../views/NotFoundView.vue' @@ -71,6 +72,8 @@ export function createAdminRouter(history: RouterHistory = createWebHistory(runt }, { path: '/settings', name: 'settings', component: SettingsIndexView, meta: { shell: true } }, { path: '/settings/:code', name: 'settings-form', component: SettingsFormView, meta: { shell: true } }, + // First-class Media Library screen (media.view_media / media.manage_media). + { path: '/media', name: 'media', component: MediaView, meta: { shell: true } }, // My account: the signed-in admin's own profile and password. { path: '/account', name: 'account', component: AccountView, meta: { shell: true } }, // The read-only Plugins screen (Settings → System, backend.view_plugins). diff --git a/admin/src/components/form/fields/MediaFinderField.vue b/admin/src/components/form/fields/MediaFinderField.vue new file mode 100644 index 00000000..ee683472 --- /dev/null +++ b/admin/src/components/form/fields/MediaFinderField.vue @@ -0,0 +1,179 @@ + + + diff --git a/admin/src/components/form/registry.ts b/admin/src/components/form/registry.ts index 15d8480d..ad5d03ce 100644 --- a/admin/src/components/form/registry.ts +++ b/admin/src/components/form/registry.ts @@ -60,6 +60,7 @@ import MailPreviewField from './fields/MailPreviewField.vue' import CodeEditorField from './fields/CodeEditorField.vue' import ColorPickerField from './fields/ColorPickerField.vue' import MailImageField from './fields/MailImageField.vue' +import MediaFinderField from './fields/MediaFinderField.vue' import MoneyField from './fields/MoneyField.vue' import TaglistField from './fields/TaglistField.vue' import MLTextField from './fields/MLTextField.vue' @@ -109,6 +110,7 @@ const renderers = new Map([ ['codeeditor', CodeEditorField], ['colorpicker', ColorPickerField], ['mailimage', MailImageField], + ['mediafinder', MediaFinderField], ]) /** Types whose control shows the label itself (toggle cards, relation manager). */ @@ -139,6 +141,7 @@ const groupLabelledTypes = new Set([ 'repeater', 'mailpreview', 'mailimage', + 'mediafinder', ]) export function rendererFor(type: string): Component { diff --git a/admin/src/components/mail/MailImagePicker.vue b/admin/src/components/mail/MailImagePicker.vue index 80676f2b..197fae4d 100644 --- a/admin/src/components/mail/MailImagePicker.vue +++ b/admin/src/components/mail/MailImagePicker.vue @@ -1,357 +1,63 @@ diff --git a/admin/src/components/media/MediaPickerModal.vue b/admin/src/components/media/MediaPickerModal.vue new file mode 100644 index 00000000..d6a83606 --- /dev/null +++ b/admin/src/components/media/MediaPickerModal.vue @@ -0,0 +1,201 @@ + + + diff --git a/admin/src/components/shell/Breadcrumbs.vue b/admin/src/components/shell/Breadcrumbs.vue index 7bf8f292..683b4e31 100644 --- a/admin/src/components/shell/Breadcrumbs.vue +++ b/admin/src/components/shell/Breadcrumbs.vue @@ -25,6 +25,9 @@ const crumbs = computed(() => { if (route.name === 'account') { return [{ label: t('backend::lang.myaccount.menu_label') }] } + if (route.name === 'media') { + return [{ label: t('backend::lang.media.title') }] + } if (route.name === 'plugins') { return [{ label: t('backend::lang.nav.settings'), to: '/settings' }, { label: t('backend::lang.plugins.title') }] } diff --git a/admin/src/components/shell/PluginRail.vue b/admin/src/components/shell/PluginRail.vue index 5f36d94f..82f92fc2 100644 --- a/admin/src/components/shell/PluginRail.vue +++ b/admin/src/components/shell/PluginRail.vue @@ -1,10 +1,11 @@ + + diff --git a/admin/tests/helpers.ts b/admin/tests/helpers.ts index 0f513ff5..39729d10 100644 --- a/admin/tests/helpers.ts +++ b/admin/tests/helpers.ts @@ -11,6 +11,7 @@ import { clearUser, me } from '../src/state/useAuth' import { applyProfilePreferences } from '../src/state/usePreferences' import { clearRecordCrumb } from '../src/state/useBreadcrumbs' import { loadNavigation, setNavigation } from '../src/state/useNavigation' +import { setMediaAccess } from '../src/state/useMediaAccess' import { setSettings } from '../src/state/useSettings' import { watchViewport } from '../src/state/useSidebar' import { clearToasts } from '../src/state/useToasts' @@ -176,6 +177,7 @@ export function resetState(): void { clearUser() setNavigation([]) setSettings([]) + setMediaAccess({ canView: false, canManage: false }) clearToasts() clearRecordCrumb() setBundle(langFixture.data, 'pl') diff --git a/modules/boardwalk/dist/assets/editor-CF0xxeFK.js b/modules/boardwalk/dist/assets/editor-BqmHPx94.js similarity index 99% rename from modules/boardwalk/dist/assets/editor-CF0xxeFK.js rename to modules/boardwalk/dist/assets/editor-BqmHPx94.js index 632cd8b6..862af86f 100644 --- a/modules/boardwalk/dist/assets/editor-CF0xxeFK.js +++ b/modules/boardwalk/dist/assets/editor-BqmHPx94.js @@ -1,4 +1,4 @@ -import{k as du,b as fu}from"./index-Vcq4gwWv.js";import{L as hu,i as pu}from"./index-DOmtaA_-.js";var Bs=Object.defineProperty,mu=(n,e)=>{let t={};for(var r in n)Bs(t,r,{get:n[r],enumerable:!0});return Bs(t,Symbol.toStringTag,{value:"Module"}),t};function Q(n){this.content=n}Q.prototype={constructor:Q,find:function(n){for(var e=0;e>1}};Q.from=function(n){if(n instanceof Q)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new Q(e)};function bl(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let i=n.child(r),s=e.child(r);if(i==s){t+=i.nodeSize;continue}if(!i.sameMarkup(s))return t;if(i.isText&&i.text!=s.text){let o=i.text,l=s.text,a=0;for(;o[a]==l[a];a++)t++;return a&&a0&&f>0&&c[d-1]==u[f-1];)d--,f--,t--,r--;return d&&f&&d=56320&&n<57344}function wl(n){return n>=55296&&n<56320}class k{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;re&&r(a,i+l,s||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,i+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,i){let s="",o=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?i?typeof i=="function"?i(l):i:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:s+=r),s+=c},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,i=this.content.slice(),s=0;for(t.isText&&t.sameMarkup(r)&&(i[i.length-1]=t.withText(t.text+r.text),s=1);se)for(let s=0,o=0;oe&&((ot)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),r.push(l),i+=l.nodeSize),o=a}return new k(r,i)}cutByIndex(e,t){return e==t?k.empty:e==0&&t==this.content.length?this:new k(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let i=this.content.slice(),s=this.size+t.nodeSize-r.nodeSize;return i[e]=t,new k(i,s)}addToStart(e){return new k([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new k(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;tthis.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let i=this.child(t),s=r+i.nodeSize;if(s>=e)return s==e?Dn(t+1,s):Dn(t,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return k.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return k.fromArray(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return k.empty;let t,r=0;for(let i=0;ithis.type.rank&&(t||(t=e.slice(0,i)),t.push(this),r=!0),t&&t.push(s)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;tr.type.rank-i.type.rank),t}};B.none=[];class pn extends Error{}class w{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=Ml(this.content,e+this.openStart,t,this.openStart+1,this.openEnd+1);return r&&new w(r,this.openStart,this.openEnd)}removeBetween(e,t){return new w(Cl(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return w.empty;let r=t.openStart||0,i=t.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new w(k.fromJSON(e,t.content),r,i)}static maxOpen(e,t=!0){let r=0,i=0;for(let s=e.firstChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.lastChild)i++;return new w(e,r,i)}}w.empty=new w(k.empty,0,0);function Cl(n,e,t){let{index:r,offset:i}=n.findIndex(e),s=n.maybeChild(r),{index:o,offset:l}=n.findIndex(t);if(i==e||s.isText){if(l!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,s.copy(Cl(s.content,e-i-1,t-i-1)))}function Ml(n,e,t,r,i,s){let{index:o,offset:l}=n.findIndex(e),a=n.maybeChild(o);if(l==e||a.isText)return s&&r<=0&&i<=0&&!s.canReplace(o,o,t)?null:n.cut(0,e).append(t).append(n.cut(e));let c=Ml(a.content,e-l-1,t,o==0?r-1:0,o==n.childCount-1?i-1:0,a);return c&&n.replaceChild(o,a.copy(c))}function gu(n,e,t){if(t.openStart>n.depth)throw new pn("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new pn("Inconsistent open depths");return Tl(n,e,t,0)}function Tl(n,e,t,r){let i=n.index(r),s=n.node(r);if(i==e.index(r)&&r=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function en(n,e,t,r){let i=(e||n).node(t),s=0,o=e?e.index(t):i.childCount;n&&(s=n.index(t),n.depth>t?s++:n.textOffset&&(ht(n.nodeAfter,r),s++));for(let l=s;li&&Mi(n,e,i+1),o=r.depth>i&&Mi(t,r,i+1),l=[];return en(null,n,i,l),s&&o&&e.index(i)==t.index(i)?(El(s,o),ht(pt(s,vl(n,e,t,r,i+1)),l)):(s&&ht(pt(s,Yn(n,e,i+1)),l),en(e,t,i,l),o&&ht(pt(o,Yn(t,r,i+1)),l)),en(r,null,i,l),new k(l)}function Yn(n,e,t){let r=[];if(en(null,n,t,r),n.depth>t){let i=Mi(n,e,t+1);ht(pt(i,Yn(n,e,t+1)),r)}return en(e,null,t,r),new k(r)}function yu(n,e){let t=e.depth-n.openStart,i=e.node(t).copy(n.content);for(let s=t-1;s>=0;s--)i=e.node(s).copy(k.from(i));return{start:i.resolveNoCache(n.openStart+t),end:i.resolveNoCache(i.content.size-n.openEnd-t)}}class mn{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(t);return r?e.child(t).cut(r):i}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],i=t==0?0:this.path[t*3-1]+1;for(let s=0;s0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Xn(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],i=0,s=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(s),c=s-a;if(r.push(o,l,i+a),!c||(o=o.child(l),o.isText))break;s=c-1,i+=a+1}return new mn(t,r,s)}static resolveCached(e,t){let r=zs.get(e);if(r)for(let s=0;se&&this.nodesBetween(e,t,s=>(r.isInSet(s.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Al(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=k.empty,i=0,s=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,i,s),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=i;at.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let i=k.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,i,r)}};mt.prototype.text=void 0;class Qn extends mt{constructor(e,t,r,i){if(super(e,t,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Al(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Qn(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Qn(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function Al(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}function $s(n,e,t,r){for(let i in e)if(!(i in n))throw new RangeError(`Unsupported attribute ${i} for ${t} of type ${r}`);for(let i in n)n[i].validate&&n[i].validate(e[i])}class kt{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new Su(e,t);if(r.next==null)return kt.empty;let i=Ol(r);r.next&&r.err("Unexpected trailing text");let s=Au(vu(i));return Ou(s,r),s}matchType(e){for(let t=0;tc.createAndFill()));for(let c=0;c=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let i=0;i{let s=i+(r.validEnd?"*":" ")+" ";for(let o=0;o"+e.indexOf(r.next[o].next);return s}).join(` +import{k as du,b as fu}from"./index-Vcq4gwWv.js";import{L as hu,i as pu}from"./index-BFpmmD32.js";var Bs=Object.defineProperty,mu=(n,e)=>{let t={};for(var r in n)Bs(t,r,{get:n[r],enumerable:!0});return Bs(t,Symbol.toStringTag,{value:"Module"}),t};function Q(n){this.content=n}Q.prototype={constructor:Q,find:function(n){for(var e=0;e>1}};Q.from=function(n){if(n instanceof Q)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new Q(e)};function bl(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let i=n.child(r),s=e.child(r);if(i==s){t+=i.nodeSize;continue}if(!i.sameMarkup(s))return t;if(i.isText&&i.text!=s.text){let o=i.text,l=s.text,a=0;for(;o[a]==l[a];a++)t++;return a&&a0&&f>0&&c[d-1]==u[f-1];)d--,f--,t--,r--;return d&&f&&d=56320&&n<57344}function wl(n){return n>=55296&&n<56320}class k{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;re&&r(a,i+l,s||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,i+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,i){let s="",o=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?i?typeof i=="function"?i(l):i:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:s+=r),s+=c},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,i=this.content.slice(),s=0;for(t.isText&&t.sameMarkup(r)&&(i[i.length-1]=t.withText(t.text+r.text),s=1);se)for(let s=0,o=0;oe&&((ot)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),r.push(l),i+=l.nodeSize),o=a}return new k(r,i)}cutByIndex(e,t){return e==t?k.empty:e==0&&t==this.content.length?this:new k(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let i=this.content.slice(),s=this.size+t.nodeSize-r.nodeSize;return i[e]=t,new k(i,s)}addToStart(e){return new k([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new k(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;tthis.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let i=this.child(t),s=r+i.nodeSize;if(s>=e)return s==e?Dn(t+1,s):Dn(t,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return k.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return k.fromArray(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return k.empty;let t,r=0;for(let i=0;ithis.type.rank&&(t||(t=e.slice(0,i)),t.push(this),r=!0),t&&t.push(s)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;tr.type.rank-i.type.rank),t}};B.none=[];class pn extends Error{}class w{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=Ml(this.content,e+this.openStart,t,this.openStart+1,this.openEnd+1);return r&&new w(r,this.openStart,this.openEnd)}removeBetween(e,t){return new w(Cl(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return w.empty;let r=t.openStart||0,i=t.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new w(k.fromJSON(e,t.content),r,i)}static maxOpen(e,t=!0){let r=0,i=0;for(let s=e.firstChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.lastChild)i++;return new w(e,r,i)}}w.empty=new w(k.empty,0,0);function Cl(n,e,t){let{index:r,offset:i}=n.findIndex(e),s=n.maybeChild(r),{index:o,offset:l}=n.findIndex(t);if(i==e||s.isText){if(l!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,s.copy(Cl(s.content,e-i-1,t-i-1)))}function Ml(n,e,t,r,i,s){let{index:o,offset:l}=n.findIndex(e),a=n.maybeChild(o);if(l==e||a.isText)return s&&r<=0&&i<=0&&!s.canReplace(o,o,t)?null:n.cut(0,e).append(t).append(n.cut(e));let c=Ml(a.content,e-l-1,t,o==0?r-1:0,o==n.childCount-1?i-1:0,a);return c&&n.replaceChild(o,a.copy(c))}function gu(n,e,t){if(t.openStart>n.depth)throw new pn("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new pn("Inconsistent open depths");return Tl(n,e,t,0)}function Tl(n,e,t,r){let i=n.index(r),s=n.node(r);if(i==e.index(r)&&r=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function en(n,e,t,r){let i=(e||n).node(t),s=0,o=e?e.index(t):i.childCount;n&&(s=n.index(t),n.depth>t?s++:n.textOffset&&(ht(n.nodeAfter,r),s++));for(let l=s;li&&Mi(n,e,i+1),o=r.depth>i&&Mi(t,r,i+1),l=[];return en(null,n,i,l),s&&o&&e.index(i)==t.index(i)?(El(s,o),ht(pt(s,vl(n,e,t,r,i+1)),l)):(s&&ht(pt(s,Yn(n,e,i+1)),l),en(e,t,i,l),o&&ht(pt(o,Yn(t,r,i+1)),l)),en(r,null,i,l),new k(l)}function Yn(n,e,t){let r=[];if(en(null,n,t,r),n.depth>t){let i=Mi(n,e,t+1);ht(pt(i,Yn(n,e,t+1)),r)}return en(e,null,t,r),new k(r)}function yu(n,e){let t=e.depth-n.openStart,i=e.node(t).copy(n.content);for(let s=t-1;s>=0;s--)i=e.node(s).copy(k.from(i));return{start:i.resolveNoCache(n.openStart+t),end:i.resolveNoCache(i.content.size-n.openEnd-t)}}class mn{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(t);return r?e.child(t).cut(r):i}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],i=t==0?0:this.path[t*3-1]+1;for(let s=0;s0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Xn(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],i=0,s=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(s),c=s-a;if(r.push(o,l,i+a),!c||(o=o.child(l),o.isText))break;s=c-1,i+=a+1}return new mn(t,r,s)}static resolveCached(e,t){let r=zs.get(e);if(r)for(let s=0;se&&this.nodesBetween(e,t,s=>(r.isInSet(s.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Al(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=k.empty,i=0,s=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,i,s),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=i;at.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let i=k.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,i,r)}};mt.prototype.text=void 0;class Qn extends mt{constructor(e,t,r,i){if(super(e,t,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Al(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Qn(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Qn(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function Al(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}function $s(n,e,t,r){for(let i in e)if(!(i in n))throw new RangeError(`Unsupported attribute ${i} for ${t} of type ${r}`);for(let i in n)n[i].validate&&n[i].validate(e[i])}class kt{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new Su(e,t);if(r.next==null)return kt.empty;let i=Ol(r);r.next&&r.err("Unexpected trailing text");let s=Au(vu(i));return Ou(s,r),s}matchType(e){for(let t=0;tc.createAndFill()));for(let c=0;c=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let i=0;i{let s=i+(r.validEnd?"*":" ")+" ";for(let o=0;o"+e.indexOf(r.next[o].next);return s}).join(` `)}}kt.empty=new kt(!0);class Su{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function Ol(n){let e=[];do e.push(wu(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function wu(n){let e=[];do e.push(Cu(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function Cu(n){let e=Eu(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=Mu(n,e);else break;return e}function Fs(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function Mu(n,e){let t=Fs(n),r=t;return n.eat(",")&&(n.next!="}"?r=Fs(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function Tu(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let i=[];for(let s in t){let o=t[s];o.isInGroup(e)&&i.push(o)}return i.length==0&&n.err("No node type or group '"+e+"' found"),i}function Eu(n){if(n.eat("(")){let e=Ol(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=Tu(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function vu(n){let e=[[]];return i(s(n,0),t()),e;function t(){return e.push([])-1}function r(o,l,a){let c={term:a,to:l};return e[o].push(c),c}function i(o,l){o.forEach(a=>a.to=l)}function s(o,l){if(o.type=="choice")return o.exprs.reduce((a,c)=>a.concat(s(c,l)),[]);if(o.type=="seq")for(let a=0;;a++){let c=s(o.exprs[a],l);if(a==o.exprs.length-1)return c;i(c,l=t())}else if(o.type=="star"){let a=t();return r(l,a),i(s(o.expr,a),a),[r(a)]}else if(o.type=="plus"){let a=t();return i(s(o.expr,l),a),i(s(o.expr,a),a),[r(a)]}else{if(o.type=="opt")return[r(l)].concat(s(o.expr,l));if(o.type=="range"){let a=l;for(let c=0;c{n[o].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let u=0;u{c||i.push([l,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let s=e[r.join(",")]=new kt(r.indexOf(n.length-1)>-1);for(let o=0;o-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:Il(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new mt(this,this.computeAttrs(e),k.from(t),B.setFrom(r))}createChecked(e=null,t,r){return t=k.from(t),this.checkContent(t),new mt(this,this.computeAttrs(e),t,B.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=k.from(t),t.size){let o=this.contentMatch.fillBefore(t);if(!o)return null;t=o.append(t)}let i=this.contentMatch.matchFragment(t),s=i&&i.fillBefore(k.empty,!0);return s?new mt(this,e,t.append(s),B.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let r=0;r-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;tr[s]=new Ll(s,t,o));let i=t.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let s in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function Nu(n,e,t){let r=t.split("|");return i=>{let s=i===null?"null":typeof i;if(r.indexOf(s)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${n}, got ${s}`)}}class Du{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?Nu(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Br{constructor(e,t,r,i){this.name=e,this.rank=t,this.schema=r,this.spec=i,this.attrs=Rl(e,i.attrs),this.excluded=null;let s=Dl(this.attrs);this.instance=s?new B(this,s):null}create(e=null){return!e&&this.instance?this.instance:new B(this,Il(this.attrs,e))}static compile(e,t){let r=Object.create(null),i=0;return e.forEach((s,o)=>r[s]=new Br(s,i++,t,o)),r}removeFromSet(e){for(var t=0;t-1}}class Pl{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let i in e)t[i]=e[i];t.nodes=Q.from(e.nodes),t.marks=Q.from(e.marks||{}),this.nodes=Hs.compile(this.spec.nodes,this),this.marks=Br.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let s=this.nodes[i],o=s.spec.content||"",l=s.spec.marks;if(s.contentMatch=r[o]||(r[o]=kt.parse(o,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!s.isInline||!s.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=s}s.markSet=l=="_"?null:l?js(this,l.split(" ")):l==""||!s.inlineContent?[]:null}for(let i in this.marks){let s=this.marks[i],o=s.spec.excludes;s.excluded=o==null?[s]:o==""?[]:js(this,o.split(" "))}this.nodeFromJSON=i=>mt.fromJSON(this,i),this.markFromJSON=i=>B.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Hs){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,r,i)}text(e,t){let r=this.nodes.text;return new Qn(r,r.defaultAttrs,e,B.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function js(n,e){let t=[];for(let r=0;r-1)&&t.push(o=a)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}function Iu(n){return n.tag!=null}function Ru(n){return n.style!=null}class Ye{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(i=>{if(Iu(i))this.tags.push(i);else if(Ru(i)){let s=/[^=]*/.exec(i.style)[0];r.indexOf(s)<0&&r.push(s),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let s=e.nodes[i.node];return s.contentMatch.matchType(s)})}parse(e,t={}){let r=new Ks(this,t,!1);return r.addAll(e,B.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new Ks(this,t,!0);return r.addAll(e,B.none,t.from,t.to),w.maxOpen(r.finish())}matchTag(e,t,r){for(let i=r?this.tags.indexOf(r)+1:0;ie.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=t))){if(o.getAttrs){let a=o.getAttrs(t);if(a===!1)continue;o.attrs=a||void 0}return o}}}static schemaRules(e){let t=[];function r(i){let s=i.priority==null?50:i.priority,o=0;for(;o{r(o=_s(o)),o.mark||o.ignore||o.clearMark||(o.mark=i)})}for(let i in e.nodes){let s=e.nodes[i].spec.parseDOM;s&&s.forEach(o=>{r(o=_s(o)),o.node||o.ignore||o.mark||(o.node=i)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Ye(e,Ye.schemaRules(e)))}}const Bl={address:!0,article:!0,aside:!0,blockquote:!0,body:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Lu={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},zl={ol:!0,ul:!0},gn=1,Ei=2,tn=4;function Ws(n,e,t){return e!=null?(e?gn:0)|(e==="full"?Ei:0):n&&n.whitespace=="pre"?gn|Ei:t&~tn}class In{constructor(e,t,r,i,s,o){this.type=e,this.attrs=t,this.marks=r,this.solid=i,this.options=o,this.content=[],this.activeMarks=B.none,this.match=s||(o&tn?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(k.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(e.type))?(this.match=r,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&gn)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let s=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-i[0].length))}}let t=k.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(k.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Bl.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Ks{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=t.topNode,s,o=Ws(null,t.preserveWhitespace,0)|(r?tn:0);i?s=new In(i.type,i.attrs,B.none,!0,t.topMatch||i.type.contentMatch,o):r?s=new In(null,null,B.none,!0,null,o):s=new In(e.schema.topNodeType,null,B.none,!0,null,o),this.nodes=[s],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let r=e.nodeValue,i=this.top,s=i.options&Ei?"full":this.localPreserveWS||(i.options&gn)>0,{schema:o}=this.parser;if(s==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(s)if(s==="full")r=r.replace(/\r\n?/g,` `);else if(o.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(o.linebreakReplacement.create())){let l=r.split(/\r?\n|\r/);for(let a=0;a!a.clearMark(c)):t=t.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return t}addElementByRule(e,t,r,i){let s,o;if(t.node)if(o=this.parser.schema.nodes[t.node],o.isLeaf)this.insertNode(o.create(t.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let a=this.enter(o,t.attrs||null,r,t.preserveWhitespace);a&&(s=!0,r=a)}else{let a=this.parser.schema.marks[t.mark];r=r.concat(a.create(t.attrs))}let l=this.top;if(o&&o.isLeaf)this.findInside(e);else if(i)this.addElement(e,r,i);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,r,!1));else{let a=e;typeof t.contentElement=="string"?a=e.querySelector(t.contentElement):typeof t.contentElement=="function"?a=t.contentElement(e):t.contentElement&&(a=t.contentElement),this.findAround(e,a,!0),this.addAll(a,r),this.findAround(e,a,!1)}s&&this.sync(l)&&this.open--}addAll(e,t,r,i){let s=r||0;for(let o=r?e.childNodes[r]:e.firstChild,l=i==null?null:e.childNodes[i];o!=l;o=o.nextSibling,++s)this.findAtPoint(e,s),this.addDOM(o,t);this.findAtPoint(e,s)}findPlace(e,t,r){let i,s;for(let o=this.open,l=0;o>=0;o--){let a=this.nodes[o],c=a.findWrapping(e);if(c&&(!i||i.length>c.length+l)&&(i=c,s=a,!c.length))break;if(a.solid){if(r)break;l+=2}}if(!i)return null;this.sync(s);for(let o=0;o(o.type?o.type.allowsMarkType(c.type):Us(c.type,e))?(a=c.addToSet(a),!1):!0),this.nodes.push(new In(e,t,a,i,null,l)),this.open++,r}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=gn)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),s=-(r?r.depth+1:0)+(i?0:1),o=(l,a)=>{for(;l>=0;l--){let c=t[l];if(c==""){if(l==t.length-1||l==0)continue;for(;a>=s;a--)if(o(l-1,a))return!0;return!1}else{let u=a>0||a==0&&i?this.nodes[a].type:r&&a>=s?r.node(a-s).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;a--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}}function Pu(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&zl.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function Bu(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function _s(n){let e={};for(let t in n)e[t]=n[t];return e}function Us(n,e){let t=e.schema.nodes;for(let r in t){let i=t[r];if(!i.allowsMarkType(n))continue;let s=[],o=l=>{s.push(l);for(let a=0;a{if(s.length||o.marks.length){let l=0,a=0;for(;l=0;i--){let s=this.serializeMark(e.marks[i],e.isInline,t);s&&((s.contentDOM||s.dom).appendChild(r),r=s.dom)}return r}serializeMark(e,t,r={}){let i=this.marks[e.type.name];return i&&Kn(Rn(r),i(e,t),null,e.attrs)}static renderSpec(e,t,r=null,i){return typeof t=="string"?{dom:e.createTextNode(t)}:Kn(e,t,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Ct(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=qs(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return qs(e.marks)}}function qs(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function Rn(n){return n.document||window.document}const Js=new WeakMap;function zu(n){let e=Js.get(n);return e===void 0&&Js.set(n,e=$u(n)),e}function $u(n){let e=null;function t(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let i=0;i-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=i.indexOf(" ");o>0&&(t=i.slice(0,o),i=i.slice(o+1));let l,a=t?n.createElementNS(t,i):n.createElement(i),c=e[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let d in c)if(c[d]!=null){let f=d.indexOf(" ");f>0?a.setAttributeNS(d.slice(0,f),d.slice(f+1),c[d]):d=="style"&&a.style?a.style.cssText=c[d]:a.setAttribute(d,c[d])}}for(let d=u;du)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else if(typeof f=="string")a.appendChild(n.createTextNode(f));else{let{dom:h,contentDOM:p}=Kn(n,f,t,r);if(a.appendChild(h),p){if(l)throw new RangeError("Multiple content holes");l=p}}}return{dom:a,contentDOM:l}}const $l=65535,Fl=Math.pow(2,16);function Fu(n,e){return n+e*Fl}function Gs(n){return n&$l}function Vu(n){return(n-(n&$l))/Fl}const Vl=1,Hl=2,_n=4,jl=8;class vi{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&jl)>0}get deletedBefore(){return(this.delInfo&(Vl|_n))>0}get deletedAfter(){return(this.delInfo&(Hl|_n))>0}get deletedAcross(){return(this.delInfo&_n)>0}}class ue{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&ue.empty)return ue.empty}recover(e){let t=0,r=Gs(e);if(!this.inverted)for(let i=0;ie)break;let c=this.ranges[l+s],u=this.ranges[l+o],d=a+c;if(e<=d){let f=c?e==a?-1:e==d?1:t:t,h=a+i+(f<0?0:u);if(r)return h;let p=e==(t<0?a:d)?null:Fu(l/3,e-a),m=0;return c&&(m|=e==a?Hl:e==d?Vl:_n,(t<0?e!=a:e!=d)&&(m|=jl)),new vi(h,m,p)}i+=u-c}return r?e+i:new vi(e+i,0,null)}touches(e,t){let r=0,i=Gs(t),s=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;le)break;let c=this.ranges[l+s],u=a+c;if(e<=u&&l==i*3)return!0;r+=this.ranges[l+o]-c}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,s=0;i=0;t--){let i=e.getMirror(t);this.appendMap(e._maps[t].invert(),i!=null&&i>t?r-i-1:void 0)}}invert(){let e=new yn;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;rs&&a!o.isAtom||!l.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),i),t.openStart,t.openEnd);return K.fromReplace(e,this.from,this.to,s)}invert(){return new we(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Je(t.pos,r.pos,this.mark)}merge(e){return e instanceof Je&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Je(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Je(t.from,t.to,e.markFromJSON(t.mark))}}ie.jsonID("addMark",Je);class we extends ie{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new w(ts(t.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),t.openStart,t.openEnd);return K.fromReplace(e,this.from,this.to,r)}invert(){return new Je(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new we(t.pos,r.pos,this.mark)}merge(e){return e instanceof we&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new we(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new we(t.from,t.to,e.markFromJSON(t.mark))}}ie.jsonID("removeMark",we);class Ge extends ie{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return K.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return K.fromReplace(e,this.pos,this.pos+1,new w(k.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let i=0;ir.pos?null:new G(t.pos,r.pos,i,s,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new G(t.from,t.to,t.gapFrom,t.gapTo,w.fromJSON(e,t.slice),t.insert,!!t.structure)}}ie.jsonID("replaceAround",G);function Ai(n,e,t){let r=n.resolve(e),i=t-e,s=r.depth;for(;i>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,i--;if(i>0){let o=r.node(s).maybeChild(r.indexAfter(s));for(;i>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,i--}}return!1}function Hu(n,e,t,r){let i=[],s=[],o,l;n.doc.nodesBetween(e,t,(a,c,u)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let f=Math.max(c,e),h=Math.min(c+a.nodeSize,t),p=r.addToSet(d);for(let m=0;mn.step(a)),s.forEach(a=>n.step(a))}function ju(n,e,t,r){let i=[],s=0;n.doc.nodesBetween(e,t,(o,l)=>{if(!o.isInline)return;s++;let a=null;if(r instanceof Br){let c=o.marks,u;for(;u=r.isInSet(c);)(a||(a=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(o.marks)&&(a=[r]):a=o.marks;if(a&&a.length){let c=Math.min(l+o.nodeSize,t);for(let u=0;un.step(new we(o.from,o.to,o.style)))}function ns(n,e,t,r=t.contentMatch,i=!0){let s=n.doc.nodeAt(e),o=[],l=e+1;for(let a=0;a=0;a--)n.step(o[a])}function Wu(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function Kt(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth,i=0,s=0;;--r){let o=n.$from.node(r),l=n.$from.index(r)+i,a=n.$to.indexAfter(r)-s;if(rt;p--)m||r.index(p)>0?(m=!0,u=k.from(r.node(p).copy(u)),d++):a--;let f=k.empty,h=0;for(let p=s,m=!1;p>t;p--)m||i.after(p+1)=0;o--){if(r.size){let l=t[o].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=k.from(t[o].type.create(t[o].attrs,r))}let i=e.start,s=e.end;n.step(new G(i,s,i,s,new w(r,0,0),t.length,!0))}function Ju(n,e,t,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=n.steps.length;n.doc.nodesBetween(e,t,(o,l)=>{let a=typeof i=="function"?i(o):i;if(o.isTextblock&&!o.hasMarkup(r,a)&&Gu(n.doc,n.mapping.slice(s).map(l),r)){let c=null;if(r.schema.linebreakReplacement){let h=r.whitespace=="pre",p=!!r.contentMatch.matchType(r.schema.linebreakReplacement);h&&!p?c=!1:!h&&p&&(c=!0)}c===!1&&Kl(n,o,l,s),ns(n,n.mapping.slice(s).map(l,1),r,void 0,c===null);let u=n.mapping.slice(s),d=u.map(l,1),f=u.map(l+o.nodeSize,1);return n.step(new G(d,f,d+1,f-1,new w(k.from(r.create(a,null,o.marks)),0,0),1,!0)),c===!0&&Wl(n,o,l,s),!1}})}function Wl(n,e,t,r){e.forEach((i,s)=>{if(i.isText){let o,l=/\r?\n|\r/g;for(;o=l.exec(i.text);){let a=n.mapping.slice(r).map(t+1+s+o.index);n.replaceWith(a,a+1,e.type.schema.linebreakReplacement.create())}}})}function Kl(n,e,t,r){e.forEach((i,s)=>{if(i.type==i.type.schema.linebreakReplacement){let o=n.mapping.slice(r).map(t+1+s);n.replaceWith(o,o+1,e.type.schema.text(` diff --git a/modules/boardwalk/dist/assets/index-BFpmmD32.js b/modules/boardwalk/dist/assets/index-BFpmmD32.js new file mode 100644 index 00000000..8c45d952 --- /dev/null +++ b/modules/boardwalk/dist/assets/index-BFpmmD32.js @@ -0,0 +1,12 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./editor-BqmHPx94.js","./index-Vcq4gwWv.js"])))=>i.map(i=>d[i]); +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))n(l);new MutationObserver(l=>{for(const r of l)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function a(l){const r={};return l.integrity&&(r.integrity=l.integrity),l.referrerPolicy&&(r.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?r.credentials="include":l.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function n(l){if(l.ep)return;l.ep=!0;const r=a(l);fetch(l.href,r)}})();function uf(e){const t=Object.create(null);for(const a of e.split(","))t[a]=1;return a=>a in t}const Et={},zr=[],vn=()=>{},vg=()=>!1,uu=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),du=e=>e.startsWith("onUpdate:"),zt=Object.assign,df=(e,t)=>{const a=e.indexOf(t);a>-1&&e.splice(a,1)},Q_=Object.prototype.hasOwnProperty,kt=(e,t)=>Q_.call(e,t),Qe=Array.isArray,jr=e=>Ts(e)==="[object Map]",co=e=>Ts(e)==="[object Set]",nm=e=>Ts(e)==="[object Date]",ot=e=>typeof e=="function",Mt=e=>typeof e=="string",Ea=e=>typeof e=="symbol",_t=e=>e!==null&&typeof e=="object",hg=e=>(_t(e)||ot(e))&&ot(e.then)&&ot(e.catch),gg=Object.prototype.toString,Ts=e=>gg.call(e),ex=e=>Ts(e).slice(8,-1),yg=e=>Ts(e)==="[object Object]",cu=e=>Mt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Yo=uf(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),fu=e=>{const t=Object.create(null);return(a=>t[a]||(t[a]=e(a)))},tx=/-\w/g,Qt=fu(e=>e.replace(tx,t=>t.slice(1).toUpperCase())),ax=/\B([A-Z])/g,Fl=fu(e=>e.replace(ax,"-$1").toLowerCase()),pu=fu(e=>e.charAt(0).toUpperCase()+e.slice(1)),Jo=fu(e=>e?`on${pu(e)}`:""),dn=(e,t)=>!Object.is(e,t),bi=(e,...t)=>{for(let a=0;a{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:a})},mu=e=>{const t=parseFloat(e);return isNaN(t)?e:t},nx=e=>{const t=Mt(e)?Number(e):NaN;return isNaN(t)?e:t};let lm;const vu=()=>lm||(lm=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ra(e){if(Qe(e)){const t={};for(let a=0;a{if(a){const n=a.split(rx);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function me(e){let t="";if(Mt(e))t=e;else if(Qe(e))for(let a=0;afo(a,t))}const xg=e=>!!(e&&e.__v_isRef===!0),_=e=>Mt(e)?e:e==null?"":Qe(e)||_t(e)&&(e.toString===gg||!ot(e.toString))?xg(e)?_(e.value):JSON.stringify(e,kg,2):String(e),kg=(e,t)=>xg(t)?kg(e,t.value):jr(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((a,[n,l],r)=>(a[sd(n,r)+" =>"]=l,a),{})}:co(t)?{[`Set(${t.size})`]:[...t.values()].map(a=>sd(a))}:Ea(t)?sd(t):_t(t)&&!Qe(t)&&!yg(t)?String(t):t,sd=(e,t="")=>{var a;return Ea(e)?`Symbol(${(a=e.description)!=null?a:t})`:e};let Ut;class wg{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Ut&&(Ut.active?(this.parent=Ut,this.index=(Ut.scopes||(Ut.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,a;if(this.scopes)for(t=0,a=this.scopes.length;t0&&--this._on===0){if(Ut===this)Ut=this.prevScope;else{let t=Ut;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let a,n;for(a=0,n=this.effects.length;a0)return;if(Xo){let t=Xo;for(Xo=void 0;t;){const a=t.next;t.next=void 0,t.flags&=-9,t=a}}let e;for(;Zo;){let t=Zo;for(Zo=void 0;t;){const a=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=a}}if(e)throw e}function Tg(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Mg(e){let t,a=e.depsTail,n=a;for(;n;){const l=n.prevDep;n.version===-1?(n===a&&(a=l),vf(n),cx(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=l}e.deps=t,e.depsTail=a}function dc(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Dg(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Dg(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===is)||(e.globalVersion=is,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!dc(e))))return;e.flags|=2;const t=e.dep,a=Tt,n=ja;Tt=e,ja=!0;try{Tg(e);const l=e.fn(e._value);(t.version===0||dn(l,e._value))&&(e.flags|=128,e._value=l,t.version++)}catch(l){throw t.version++,l}finally{Tt=a,ja=n,Mg(e),e.flags&=-3}}function vf(e,t=!1){const{dep:a,prevSub:n,nextSub:l}=e;if(n&&(n.nextSub=l,e.prevSub=void 0),l&&(l.prevSub=n,e.nextSub=void 0),a.subs===e&&(a.subs=n,!n&&a.computed)){a.computed.flags&=-5;for(let r=a.computed.deps;r;r=r.nextDep)vf(r,!0)}!t&&!--a.sc&&a.map&&a.map.delete(a.key)}function cx(e){const{prevDep:t,nextDep:a}=e;t&&(t.nextDep=a,e.prevDep=void 0),a&&(a.prevDep=t,e.nextDep=void 0)}let ja=!0;const Og=[];function Hn(){Og.push(ja),ja=!1}function Kn(){const e=Og.pop();ja=e===void 0?!0:e}function rm(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const a=Tt;Tt=void 0;try{t()}finally{Tt=a}}}let is=0,fx=class{constructor(t,a){this.sub=t,this.dep=a,this.version=a.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}};class hu{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Tt||!ja||Tt===this.computed)return;let a=this.activeLink;if(a===void 0||a.sub!==Tt)a=this.activeLink=new fx(Tt,this),Tt.deps?(a.prevDep=Tt.depsTail,Tt.depsTail.nextDep=a,Tt.depsTail=a):Tt.deps=Tt.depsTail=a,Pg(a);else if(a.version===-1&&(a.version=this.version,a.nextDep)){const n=a.nextDep;n.prevDep=a.prevDep,a.prevDep&&(a.prevDep.nextDep=n),a.prevDep=Tt.depsTail,a.nextDep=void 0,Tt.depsTail.nextDep=a,Tt.depsTail=a,Tt.deps===a&&(Tt.deps=n)}return a}trigger(t){this.version++,is++,this.notify(t)}notify(t){pf();try{for(let a=this.subs;a;a=a.prevSub)a.sub.notify()&&a.sub.dep.notify()}finally{mf()}}}function Pg(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)Pg(n)}const a=e.dep.subs;a!==e&&(e.prevSub=a,a&&(a.nextSub=e)),e.dep.subs=e}}const Ai=new WeakMap,sr=Symbol(""),cc=Symbol(""),us=Symbol("");function na(e,t,a){if(ja&&Tt){let n=Ai.get(e);n||Ai.set(e,n=new Map);let l=n.get(a);l||(n.set(a,l=new hu),l.map=n,l.key=a),l.track()}}function In(e,t,a,n,l,r){const o=Ai.get(e);if(!o){is++;return}const i=u=>{u&&u.trigger()};if(pf(),t==="clear")o.forEach(i);else{const u=Qe(e),c=u&&cu(a);if(u&&a==="length"){const d=Number(n);o.forEach((p,v)=>{(v==="length"||v===us||!Ea(v)&&v>=d)&&i(p)})}else switch((a!==void 0||o.has(void 0))&&i(o.get(a)),c&&i(o.get(us)),t){case"add":u?c&&i(o.get("length")):(i(o.get(sr)),jr(e)&&i(o.get(cc)));break;case"delete":u||(i(o.get(sr)),jr(e)&&i(o.get(cc)));break;case"set":jr(e)&&i(o.get(sr));break}}mf()}function px(e,t){const a=Ai.get(e);return a&&a.get(t)}function Sr(e){const t=gt(e);return t===e?t:(na(t,"iterate",us),Ca(e)?t:t.map(Wa))}function gu(e){return na(e=gt(e),"iterate",us),e}function sn(e,t){return Wn(e)?eo(ir(e)?Wa(t):t):Wa(t)}const mx={__proto__:null,[Symbol.iterator](){return ud(this,Symbol.iterator,e=>sn(this,e))},concat(...e){return Sr(this).concat(...e.map(t=>Qe(t)?Sr(t):t))},entries(){return ud(this,"entries",e=>(e[1]=sn(this,e[1]),e))},every(e,t){return Tn(this,"every",e,t,void 0,arguments)},filter(e,t){return Tn(this,"filter",e,t,a=>a.map(n=>sn(this,n)),arguments)},find(e,t){return Tn(this,"find",e,t,a=>sn(this,a),arguments)},findIndex(e,t){return Tn(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Tn(this,"findLast",e,t,a=>sn(this,a),arguments)},findLastIndex(e,t){return Tn(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Tn(this,"forEach",e,t,void 0,arguments)},includes(...e){return dd(this,"includes",e)},indexOf(...e){return dd(this,"indexOf",e)},join(e){return Sr(this).join(e)},lastIndexOf(...e){return dd(this,"lastIndexOf",e)},map(e,t){return Tn(this,"map",e,t,void 0,arguments)},pop(){return Eo(this,"pop")},push(...e){return Eo(this,"push",e)},reduce(e,...t){return om(this,"reduce",e,t)},reduceRight(e,...t){return om(this,"reduceRight",e,t)},shift(){return Eo(this,"shift")},some(e,t){return Tn(this,"some",e,t,void 0,arguments)},splice(...e){return Eo(this,"splice",e)},toReversed(){return Sr(this).toReversed()},toSorted(e){return Sr(this).toSorted(e)},toSpliced(...e){return Sr(this).toSpliced(...e)},unshift(...e){return Eo(this,"unshift",e)},values(){return ud(this,"values",e=>sn(this,e))}};function ud(e,t,a){const n=gu(e),l=n[t]();return n!==e&&!Ca(e)&&(l._next=l.next,l.next=()=>{const r=l._next();return r.done||(r.value=a(r.value)),r}),l}const vx=Array.prototype;function Tn(e,t,a,n,l,r){const o=gu(e),i=o!==e&&!Ca(e),u=o[t];if(u!==vx[t]){const p=u.apply(e,r);return i?Wa(p):p}let c=a;o!==e&&(i?c=function(p,v){return a.call(this,sn(e,p),v,e)}:a.length>2&&(c=function(p,v){return a.call(this,p,v,e)}));const d=u.call(o,c,n);return i&&l?l(d):d}function om(e,t,a,n){const l=gu(e),r=l!==e&&!Ca(e);let o=a,i=!1;l!==e&&(r?(i=n.length===0,o=function(c,d,p){return i&&(i=!1,c=sn(e,c)),a.call(this,c,sn(e,d),p,e)}):a.length>3&&(o=function(c,d,p){return a.call(this,c,d,p,e)}));const u=l[t](o,...n);return i?sn(e,u):u}function dd(e,t,a){const n=gt(e);na(n,"iterate",us);const l=n[t](...a);return(l===-1||l===!1)&&_u(a[0])?(a[0]=gt(a[0]),n[t](...a)):l}function Eo(e,t,a=[]){Hn(),pf();const n=gt(e)[t].apply(e,a);return mf(),Kn(),n}const hx=uf("__proto__,__v_isRef,__isVue"),Ig=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Ea));function gx(e){Ea(e)||(e=String(e));const t=gt(this);return na(t,"has",e),t.hasOwnProperty(e)}class Rg{constructor(t=!1,a=!1){this._isReadonly=t,this._isShallow=a}get(t,a,n){if(a==="__v_skip")return t.__v_skip;const l=this._isReadonly,r=this._isShallow;if(a==="__v_isReactive")return!l;if(a==="__v_isReadonly")return l;if(a==="__v_isShallow")return r;if(a==="__v_raw")return n===(l?r?Vg:Fg:r?Bg:Ng).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const o=Qe(t);if(!l){let u;if(o&&(u=mx[a]))return u;if(a==="hasOwnProperty")return gx}const i=Reflect.get(t,a,Ct(t)?t:n);if((Ea(a)?Ig.has(a):hx(a))||(l||na(t,"get",a),r))return i;if(Ct(i)){const u=o&&cu(a)?i:i.value;return l&&_t(u)?At(u):u}return _t(i)?l?At(i):Ka(i):i}}class qg extends Rg{constructor(t=!1){super(!1,t)}set(t,a,n,l){let r=t[a];const o=Qe(t)&&cu(a);if(!this._isShallow){const c=Wn(r);if(!Ca(n)&&!Wn(n)&&(r=gt(r),n=gt(n)),!o&&Ct(r)&&!Ct(n))return c||(r.value=n),!0}const i=o?Number(a)e,Gs=e=>Reflect.getPrototypeOf(e);function kx(e,t,a){return function(...n){const l=this.__v_raw,r=gt(l),o=jr(r),i=e==="entries"||e===Symbol.iterator&&o,u=e==="keys"&&o,c=l[e](...n),d=a?fc:t?eo:Wa;return!t&&na(r,"iterate",u?cc:sr),zt(Object.create(c),{next(){const{value:p,done:v}=c.next();return v?{value:p,done:v}:{value:i?[d(p[0]),d(p[1])]:d(p),done:v}}})}}function Ys(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function wx(e,t){const a={get(l){const r=this.__v_raw,o=gt(r),i=gt(l);e||(dn(l,i)&&na(o,"get",l),na(o,"get",i));const{has:u}=Gs(o),c=t?fc:e?eo:Wa;if(u.call(o,l))return c(r.get(l));if(u.call(o,i))return c(r.get(i));r!==o&&r.get(l)},get size(){const l=this.__v_raw;return!e&&na(gt(l),"iterate",sr),l.size},has(l){const r=this.__v_raw,o=gt(r),i=gt(l);return e||(dn(l,i)&&na(o,"has",l),na(o,"has",i)),l===i?r.has(l):r.has(l)||r.has(i)},forEach(l,r){const o=this,i=o.__v_raw,u=gt(i),c=t?fc:e?eo:Wa;return!e&&na(u,"iterate",sr),i.forEach((d,p)=>l.call(r,c(d),c(p),o))}};return zt(a,e?{add:Ys("add"),set:Ys("set"),delete:Ys("delete"),clear:Ys("clear")}:{add(l){const r=gt(this),o=Gs(r),i=gt(l),u=!t&&!Ca(l)&&!Wn(l)?i:l;return o.has.call(r,u)||dn(l,u)&&o.has.call(r,l)||dn(i,u)&&o.has.call(r,i)||(r.add(u),In(r,"add",u,u)),this},set(l,r){!t&&!Ca(r)&&!Wn(r)&&(r=gt(r));const o=gt(this),{has:i,get:u}=Gs(o);let c=i.call(o,l);c||(l=gt(l),c=i.call(o,l));const d=u.call(o,l);return o.set(l,r),c?dn(r,d)&&In(o,"set",l,r):In(o,"add",l,r),this},delete(l){const r=gt(this),{has:o,get:i}=Gs(r);let u=o.call(r,l);u||(l=gt(l),u=o.call(r,l)),i&&i.call(r,l);const c=r.delete(l);return u&&In(r,"delete",l,void 0),c},clear(){const l=gt(this),r=l.size!==0,o=l.clear();return r&&In(l,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(l=>{a[l]=kx(l,e,t)}),a}function yu(e,t){const a=wx(e,t);return(n,l,r)=>l==="__v_isReactive"?!e:l==="__v_isReadonly"?e:l==="__v_raw"?n:Reflect.get(kt(a,l)&&l in n?a:n,l,r)}const $x={get:yu(!1,!1)},Cx={get:yu(!1,!0)},Sx={get:yu(!0,!1)},Ex={get:yu(!0,!0)},Ng=new WeakMap,Bg=new WeakMap,Fg=new WeakMap,Vg=new WeakMap;function Ax(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ka(e){return Wn(e)?e:bu(e,!1,yx,$x,Ng)}function zg(e){return bu(e,!1,_x,Cx,Bg)}function At(e){return bu(e,!0,bx,Sx,Fg)}function Er(e){return bu(e,!0,xx,Ex,Vg)}function bu(e,t,a,n,l){if(!_t(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const r=l.get(e);if(r)return r;const o=Ax(ex(e));if(o===0)return e;const i=new Proxy(e,o===2?n:a);return l.set(e,i),i}function ir(e){return Wn(e)?ir(e.__v_raw):!!(e&&e.__v_isReactive)}function Wn(e){return!!(e&&e.__v_isReadonly)}function Ca(e){return!!(e&&e.__v_isShallow)}function _u(e){return e?!!e.__v_raw:!1}function gt(e){const t=e&&e.__v_raw;return t?gt(t):e}function Ti(e){return!kt(e,"__v_skip")&&Object.isExtensible(e)&&bg(e,"__v_skip",!0),e}const Wa=e=>_t(e)?Ka(e):e,eo=e=>_t(e)?At(e):e;function Ct(e){return e?e.__v_isRef===!0:!1}function E(e){return jg(e,!1)}function pr(e){return jg(e,!0)}function jg(e,t){return Ct(e)?e:new Tx(e,t)}class Tx{constructor(t,a){this.dep=new hu,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=a?t:gt(t),this._value=a?t:Wa(t),this.__v_isShallow=a}get value(){return this.dep.track(),this._value}set value(t){const a=this._rawValue,n=this.__v_isShallow||Ca(t)||Wn(t);t=n?t:gt(t),dn(t,a)&&(this._rawValue=t,this._value=n?t:Wa(t),this.dep.trigger())}}function Mx(e){e.dep&&e.dep.trigger()}function s(e){return Ct(e)?e.value:e}function ca(e){return ot(e)?e():s(e)}const Dx={get:(e,t,a)=>t==="__v_raw"?e:s(Reflect.get(e,t,a)),set:(e,t,a,n)=>{const l=e[t];return Ct(l)&&!Ct(a)?(l.value=a,!0):Reflect.set(e,t,a,n)}};function Ug(e){return ir(e)?e:new Proxy(e,Dx)}class Ox{constructor(t){this.__v_isRef=!0,this._value=void 0;const a=this.dep=new hu,{get:n,set:l}=t(a.track.bind(a),a.trigger.bind(a));this._get=n,this._set=l}get value(){return this._value=this._get()}set value(t){this._set(t)}}function Px(e){return new Ox(e)}function Kt(e){const t=Qe(e)?new Array(e.length):{};for(const a in e)t[a]=Hg(e,a);return t}class Ix{constructor(t,a,n){this._object=t,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0,this._key=Ea(a)?a:String(a),this._raw=gt(t);let l=!0,r=t;if(!Qe(t)||Ea(this._key)||!cu(this._key))do l=!_u(r)||Ca(r);while(l&&(r=r.__v_raw));this._shallow=l}get value(){let t=this._object[this._key];return this._shallow&&(t=s(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&Ct(this._raw[this._key])){const a=this._object[this._key];if(Ct(a)){a.value=t;return}}this._object[this._key]=t}get dep(){return px(this._raw,this._key)}}class Rx{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function qx(e,t,a){return Ct(e)?e:ot(e)?new Rx(e):_t(e)&&arguments.length>1?Hg(e,t,a):E(e)}function Hg(e,t,a){return new Ix(e,t,a)}class Lx{constructor(t,a,n){this.fn=t,this.setter=a,this._value=void 0,this.dep=new hu(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=is-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!a,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&Tt!==this)return Ag(this,!0),!0}get value(){const t=this.dep.track();return Dg(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Nx(e,t,a=!1){let n,l;return ot(e)?n=e:(n=e.get,l=e.set),new Lx(n,l,a)}const Js={},Mi=new WeakMap;let er;function Bx(e,t=!1,a=er){if(a){let n=Mi.get(a);n||Mi.set(a,n=[]),n.push(e)}}function Fx(e,t,a=Et){const{immediate:n,deep:l,once:r,scheduler:o,augmentJob:i,call:u}=a,c=O=>l?O:Ca(O)||l===!1||l===0?Rn(O,1):Rn(O);let d,p,v,m,y=!1,x=!1;if(Ct(e)?(p=()=>e.value,y=Ca(e)):ir(e)?(p=()=>c(e),y=!0):Qe(e)?(x=!0,y=e.some(O=>ir(O)||Ca(O)),p=()=>e.map(O=>{if(Ct(O))return O.value;if(ir(O))return c(O);if(ot(O))return u?u(O,2):O()})):ot(e)?t?p=u?()=>u(e,2):e:p=()=>{if(v){Hn();try{v()}finally{Kn()}}const O=er;er=d;try{return u?u(e,3,[m]):e(m)}finally{er=O}}:p=vn,t&&l){const O=p,M=l===!0?1/0:l;p=()=>Rn(O(),M)}const C=ff(),w=()=>{d.stop(),C&&C.active&&df(C.effects,d)};if(r&&t){const O=t;t=(...M)=>{O(...M),w()}}let S=x?new Array(e.length).fill(Js):Js;const L=O=>{if(!(!(d.flags&1)||!d.dirty&&!O))if(t){const M=d.run();if(l||y||(x?M.some((R,q)=>dn(R,S[q])):dn(M,S))){v&&v();const R=er;er=d;try{const q=[M,S===Js?void 0:x&&S[0]===Js?[]:S,m];S=M,u?u(t,3,q):t(...q)}finally{er=R}}}else d.run()};return i&&i(L),d=new Sg(p),d.scheduler=o?()=>o(L,!1):L,m=O=>Bx(O,!1,d),v=d.onStop=()=>{const O=Mi.get(d);if(O){if(u)u(O,4);else for(const M of O)M();Mi.delete(d)}},t?n?L(!0):S=d.run():o?o(L.bind(null,!0),!0):d.run(),w.pause=d.pause.bind(d),w.resume=d.resume.bind(d),w.stop=w,w}function Rn(e,t=1/0,a){if(t<=0||!_t(e)||e.__v_skip||(a=a||new Map,(a.get(e)||0)>=t))return e;if(a.set(e,t),t--,Ct(e))Rn(e.value,t,a);else if(Qe(e))for(let n=0;n{Rn(n,t,a)});else if(yg(e)){for(const n in e)Rn(e[n],t,a);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&Rn(e[n],t,a)}return e}function Ms(e,t,a,n){try{return n?e(...n):e()}catch(l){xu(l,t,a)}}function La(e,t,a,n){if(ot(e)){const l=Ms(e,t,a,n);return l&&hg(l)&&l.catch(r=>{xu(r,t,a)}),l}if(Qe(e)){const l=[];for(let r=0;r>>1,l=da[n],r=ds(l);r=ds(a)?da.push(e):da.splice(zx(t),0,e),e.flags|=1,Wg()}}function Wg(){Di||(Di=Kg.then(Yg))}function jx(e){Qe(e)?Ur.push(...e):_l&&e.id===-1?_l.splice(Ir+1,0,e):e.flags&1||(Ur.push(e),e.flags|=1),Wg()}function sm(e,t,a=rn+1){for(;ads(a)-ds(n));if(Ur.length=0,_l){_l.push(...t);return}for(_l=t,Ir=0;Ir<_l.length;Ir++){const a=_l[Ir];a.flags&4&&(a.flags&=-2),a.flags&8||a(),a.flags&=-2}_l=null,Ir=0}}const ds=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Yg(e){try{for(rn=0;rn{n._d&&Ri(-1);const r=Oi(t);let o;try{o=e(...l)}finally{Oi(r),n._d&&Ri(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function Yt(e,t){if(Xt===null)return e;const a=Su(Xt),n=e.dirs||(e.dirs=[]);for(let l=0;l1)return a&&ot(t)?t.call(n&&n.proxy):t}}const Ux=Symbol.for("v-scx"),Hx=()=>ct(Ux);function Aa(e,t){return ku(e,null,t)}function Zg(e,t){return ku(e,null,{flush:"post"})}function Ve(e,t,a){return ku(e,t,a)}function ku(e,t,a=Et){const{immediate:n,deep:l,flush:r,once:o}=a,i=zt({},a),u=t&&n||!t&&r!=="post";let c;if(ms){if(r==="sync"){const m=Hx();c=m.__watcherHandles||(m.__watcherHandles=[])}else if(!u){const m=()=>{};return m.stop=vn,m.resume=vn,m.pause=vn,m}}const d=la;i.call=(m,y,x)=>La(m,d,y,x);let p=!1;r==="post"?i.scheduler=m=>{ua(m,d&&d.suspense)}:r!=="sync"&&(p=!0,i.scheduler=(m,y)=>{y?m():hf(m)}),i.augmentJob=m=>{t&&(m.flags|=4),p&&(m.flags|=2,d&&(m.id=d.uid,m.i=d))};const v=Fx(e,t,i);return ms&&(c?c.push(v):u&&v()),v}function Kx(e,t,a){const n=this.proxy,l=Mt(e)?e.includes(".")?Xg(n,e):()=>n[e]:e.bind(n,n);let r;ot(t)?r=t:(r=t.handler,a=t);const o=Ds(this),i=ku(l,r.bind(n),a);return o(),i}function Xg(e,t){const a=t.split(".");return()=>{let n=e;for(let l=0;le.__isTeleport,nr=e=>e&&(e.disabled||e.disabled===""),Gx=e=>e&&(e.defer||e.defer===""),im=e=>typeof SVGElement<"u"&&e instanceof SVGElement,um=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,pc=(e,t)=>{const a=e&&e.to;return Mt(a)?t?t(a):null:a},Yx={name:"Teleport",__isTeleport:!0,process(e,t,a,n,l,r,o,i,u,c){const{mc:d,pc:p,pbc:v,o:{insert:m,querySelector:y,createText:x,createComment:C,parentNode:w}}=c,S=nr(t.props);let{dynamicChildren:L}=t;const O=(q,K,T)=>{q.shapeFlag&16&&d(q.children,K,T,l,r,o,i,u)},M=(q=t)=>{const K=nr(q.props),T=q.target=pc(q.props,y),I=mc(T,q,x,m);T&&(o!=="svg"&&im(T)?o="svg":o!=="mathml"&&um(T)&&(o="mathml"),l&&l.isCE&&(l.ce._teleportTargets||(l.ce._teleportTargets=new Set)).add(T),K||(O(q,T,I),jo(q,!1)))},R=q=>{const K=()=>{if(gl.get(q)===K){if(gl.delete(q),nr(q.props)){const T=w(q.el)||a;O(q,T,q.anchor),jo(q,!0)}M(q)}};gl.set(q,K),ua(K,r)};if(e==null){const q=t.el=x(""),K=t.anchor=x("");if(m(q,a,n),m(K,a,n),Gx(t.props)||r&&r.pendingBranch){R(t);return}S&&(O(t,a,K),jo(t,!0)),M()}else{t.el=e.el;const q=t.anchor=e.anchor,K=gl.get(e);if(K){K.flags|=8,gl.delete(e),R(t);return}t.targetStart=e.targetStart;const T=t.target=e.target,I=t.targetAnchor=e.targetAnchor,W=nr(e.props),A=W?a:T,B=W?q:I;if(o==="svg"||im(T)?o="svg":(o==="mathml"||um(T))&&(o="mathml"),L?(v(e.dynamicChildren,L,A,l,r,o,i),xf(e,t,!0)):u||p(e,t,A,B,l,r,o,i,!1),S)W?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Zs(t,a,q,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const Y=t.target=pc(t.props,y);Y&&Zs(t,Y,null,c,0)}else W&&Zs(t,T,I,c,1);jo(t,S)}},remove(e,t,a,{um:n,o:{remove:l}},r){const{shapeFlag:o,children:i,anchor:u,targetStart:c,targetAnchor:d,target:p,props:v}=e,m=r||!nr(v),y=gl.get(e);if(y&&(y.flags|=8,gl.delete(e)),p&&(l(c),l(d)),r&&l(u),!y&&o&16)for(let x=0;x{e.isMounted=!0}),Dt(()=>{e.isUnmounting=!0}),e}const Ma=[Function,Array],Qx={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ma,onEnter:Ma,onAfterEnter:Ma,onEnterCancelled:Ma,onBeforeLeave:Ma,onLeave:Ma,onAfterLeave:Ma,onLeaveCancelled:Ma,onBeforeAppear:Ma,onAppear:Ma,onAfterAppear:Ma,onAppearCancelled:Ma};function ek(e,t){const{leavingVNodes:a}=e;let n=a.get(t.type);return n||(n=Object.create(null),a.set(t.type,n)),n}function vc(e,t,a,n,l){const{appear:r,mode:o,persisted:i=!1,onBeforeEnter:u,onEnter:c,onAfterEnter:d,onEnterCancelled:p,onBeforeLeave:v,onLeave:m,onAfterLeave:y,onLeaveCancelled:x,onBeforeAppear:C,onAppear:w,onAfterAppear:S,onAppearCancelled:L}=t,O=String(e.key),M=ek(a,e),R=(T,I)=>{T&&La(T,n,9,I)},q=(T,I)=>{const W=I[1];R(T,I),Qe(T)?T.every(A=>A.length<=1)&&W():T.length<=1&&W()},K={mode:o,persisted:i,beforeEnter(T){let I=u;if(!a.isMounted)if(r)I=C||u;else return;T[on]&&T[on](!0);const W=M[O];W&&Rr(e,W)&&W.el[on]&&W.el[on](),R(I,[T])},enter(T){if(M[O]===e)return;let I=c,W=d,A=p;if(!a.isMounted)if(r)I=w||c,W=S||d,A=L||p;else return;let B=!1;T[Ao]=U=>{B||(B=!0,U?R(A,[T]):R(W,[T]),K.delayedLeave&&K.delayedLeave(),T[Ao]=void 0)};const Y=T[Ao].bind(null,!1);I?q(I,[T,Y]):Y()},leave(T,I){const W=String(e.key);if(T[Ao]&&T[Ao](!0),a.isUnmounting)return I();R(v,[T]);let A=!1;T[on]=Y=>{A||(A=!0,I(),Y?R(x,[T]):R(y,[T]),T[on]=void 0,M[W]===e&&delete M[W])};const B=T[on].bind(null,!1);M[W]=e,m?q(m,[T,B]):B()},clone(T){return vc(T,t,a,n)}};return K}function cs(e,t){e.shapeFlag&6&&e.component?(e.transition=t,cs(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ey(e,t=!1,a){let n=[],l=0;for(let r=0;r1)for(let r=0;rQo(x,t&&(Qe(t)?t[C]:t),a,n,l));return}if(Hr(n)&&!l){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Qo(e,t,a,n.component.subTree);return}const r=n.shapeFlag&4?Su(n.component):n.el,o=l?null:r,{i,r:u}=e,c=t&&t.r,d=i.refs===Et?i.refs={}:i.refs,p=i.setupState,v=gt(p),m=p===Et?vg:x=>dm(d,x)?!1:kt(v,x),y=(x,C)=>!(C&&dm(d,C));if(c!=null&&c!==u){if(cm(t),Mt(c))d[c]=null,m(c)&&(p[c]=null);else if(Ct(c)){const x=t;y(c,x.k)&&(c.value=null),x.k&&(d[x.k]=null)}}if(ot(u))Ms(u,i,12,[o,d]);else{const x=Mt(u),C=Ct(u);if(x||C){const w=()=>{if(e.f){const S=x?m(u)?p[u]:d[u]:y()||!e.k?u.value:d[e.k];if(l)Qe(S)&&df(S,r);else if(Qe(S))S.includes(r)||S.push(r);else if(x)d[u]=[r],m(u)&&(p[u]=d[u]);else{const L=[r];y(u,e.k)&&(u.value=L),e.k&&(d[e.k]=L)}}else x?(d[u]=o,m(u)&&(p[u]=o)):C&&(y(u,e.k)&&(u.value=o),e.k&&(d[e.k]=o))};if(o){const S=()=>{w(),Pi.delete(e)};S.id=-1,Pi.set(e,S),ua(S,a)}else cm(e),w()}}}function cm(e){const t=Pi.get(e);t&&(t.flags|=8,Pi.delete(e))}vu().requestIdleCallback;vu().cancelIdleCallback;const Hr=e=>!!e.type.__asyncLoader,ay=e=>e.type.__isKeepAlive;function ny(e,t){ry(e,"a",t)}function ly(e,t){ry(e,"da",t)}function ry(e,t,a=la){const n=e.__wdc||(e.__wdc=()=>{let l=a;for(;l;){if(l.isDeactivated)return;l=l.parent}return e()});if(wu(t,n,a),a){let l=a.parent;for(;l&&l.parent;)ay(l.parent.vnode)&&tk(n,t,a,l),l=l.parent}}function tk(e,t,a,n){const l=wu(t,e,n,!0);Qn(()=>{df(n[t],l)},a)}function wu(e,t,a=la,n=!1){if(a){const l=a[e]||(a[e]=[]),r=t.__weh||(t.__weh=(...o)=>{Hn();const i=Ds(a),u=La(t,a,e,o);return i(),Kn(),u});return n?l.unshift(r):l.push(r),r}}const Xn=e=>(t,a=la)=>{(!ms||e==="sp")&&wu(e,(...n)=>t(...n),a)},oy=Xn("bm"),$t=Xn("m"),ak=Xn("bu"),yf=Xn("u"),Dt=Xn("bum"),Qn=Xn("um"),nk=Xn("sp"),lk=Xn("rtg"),rk=Xn("rtc");function ok(e,t=la){wu("ec",e,t)}const sy="components";function sk(e,t){return uy(sy,e,!0,t)||e}const iy=Symbol.for("v-ndc");function Wt(e){return Mt(e)?uy(sy,e,!1)||e:e||iy}function uy(e,t,a=!0,n=!1){const l=Xt||la;if(l){const r=l.type;{const i=Uk(r,!1);if(i&&(i===t||i===Qt(t)||i===pu(Qt(t))))return r}const o=fm(l[e]||r[e],t)||fm(l.appContext[e],t);return!o&&n?r:o}}function fm(e,t){return e&&(e[t]||e[Qt(t)]||e[pu(Qt(t))])}function Ie(e,t,a,n){let l;const r=a,o=Qe(e);if(o||Mt(e)){const i=o&&ir(e);let u=!1,c=!1;i&&(u=!Ca(e),c=Wn(e),e=gu(e)),l=new Array(e.length);for(let d=0,p=e.length;dt(i,u,void 0,r));else{const i=Object.keys(e);l=new Array(i.length);for(let u=0,c=i.length;u0;return t!=="default"&&(a.name=t),f(),V(ve,null,[D("slot",a,n&&n())],c?-2:64)}let r=e[t];r&&r._c&&(r._d=!1),f();const o=r&&dy(r(a)),i=a.key||o&&o.key,u=V(ve,{key:(i&&!Ea(i)?i:`_${t}`)+(!o&&n?"_fb":"")},o||(n?n():[]),o&&e._===1?64:-2);return u.scopeId&&(u.slotScopeIds=[u.scopeId+"-s"]),r&&r._c&&(r._d=!0),u}function dy(e){return e.some(t=>ps(t)?!(t.type===Ga||t.type===ve&&!dy(t.children)):!0)?e:null}function cy(e,t){const a={};for(const n in e)a[Jo(n)]=e[n];return a}const hc=e=>e?Dy(e)?Su(e):hc(e.parent):null,es=zt(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>hc(e.parent),$root:e=>hc(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>my(e),$forceUpdate:e=>e.f||(e.f=()=>{hf(e.update)}),$nextTick:e=>e.n||(e.n=Ge.bind(e.proxy)),$watch:e=>Kx.bind(e)}),cd=(e,t)=>e!==Et&&!e.__isScriptSetup&&kt(e,t),ik={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:a,setupState:n,data:l,props:r,accessCache:o,type:i,appContext:u}=e;if(t[0]!=="$"){const v=o[t];if(v!==void 0)switch(v){case 1:return n[t];case 2:return l[t];case 4:return a[t];case 3:return r[t]}else{if(cd(n,t))return o[t]=1,n[t];if(l!==Et&&kt(l,t))return o[t]=2,l[t];if(kt(r,t))return o[t]=3,r[t];if(a!==Et&&kt(a,t))return o[t]=4,a[t];yc&&(o[t]=0)}}const c=es[t];let d,p;if(c)return t==="$attrs"&&na(e.attrs,"get",""),c(e);if((d=i.__cssModules)&&(d=d[t]))return d;if(a!==Et&&kt(a,t))return o[t]=4,a[t];if(p=u.config.globalProperties,kt(p,t))return p[t]},set({_:e},t,a){const{data:n,setupState:l,ctx:r}=e;return cd(l,t)?(l[t]=a,!0):n!==Et&&kt(n,t)?(n[t]=a,!0):kt(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=a,!0)},has({_:{data:e,setupState:t,accessCache:a,ctx:n,appContext:l,props:r,type:o}},i){let u;return!!(a[i]||e!==Et&&i[0]!=="$"&&kt(e,i)||cd(t,i)||kt(r,i)||kt(n,i)||kt(es,i)||kt(l.config.globalProperties,i)||(u=o.__cssModules)&&u[i])},defineProperty(e,t,a){return a.get!=null?e._.accessCache[t]=0:kt(a,"value")&&this.set(e,t,a.value,null),Reflect.defineProperty(e,t,a)}};function gc(e){return Qe(e)?e.reduce((t,a)=>(t[a]=null,t),{}):e}function fy(e,t){const a=gc(e);for(const n in t){if(n.startsWith("__skip"))continue;let l=a[n];l?Qe(l)||ot(l)?l=a[n]={type:l,default:t[n]}:l.default=t[n]:l===null&&(l=a[n]={default:t[n]}),l&&t[`__skip_${n}`]&&(l.skipFactory=!0)}return a}let yc=!0;function uk(e){const t=my(e),a=e.proxy,n=e.ctx;yc=!1,t.beforeCreate&&pm(t.beforeCreate,e,"bc");const{data:l,computed:r,methods:o,watch:i,provide:u,inject:c,created:d,beforeMount:p,mounted:v,beforeUpdate:m,updated:y,activated:x,deactivated:C,beforeDestroy:w,beforeUnmount:S,destroyed:L,unmounted:O,render:M,renderTracked:R,renderTriggered:q,errorCaptured:K,serverPrefetch:T,expose:I,inheritAttrs:W,components:A,directives:B,filters:Y}=t;if(c&&dk(c,n,null),o)for(const re in o){const fe=o[re];ot(fe)&&(n[re]=fe.bind(a))}if(l){const re=l.call(a,a);_t(re)&&(e.data=Ka(re))}if(yc=!0,r)for(const re in r){const fe=r[re],Ae=ot(fe)?fe.bind(a,a):ot(fe.get)?fe.get.bind(a,a):vn,xe=!ot(fe)&&ot(fe.set)?fe.set.bind(a):vn,_e=k({get:Ae,set:xe});Object.defineProperty(n,re,{enumerable:!0,configurable:!0,get:()=>_e.value,set:le=>_e.value=le})}if(i)for(const re in i)py(i[re],n,a,re);if(u){const re=ot(u)?u.call(a):u;Reflect.ownKeys(re).forEach(fe=>{yt(fe,re[fe])})}d&&pm(d,e,"c");function H(re,fe){Qe(fe)?fe.forEach(Ae=>re(Ae.bind(a))):fe&&re(fe.bind(a))}if(H(oy,p),H($t,v),H(ak,m),H(yf,y),H(ny,x),H(ly,C),H(ok,K),H(rk,R),H(lk,q),H(Dt,S),H(Qn,O),H(nk,T),Qe(I))if(I.length){const re=e.exposed||(e.exposed={});I.forEach(fe=>{Object.defineProperty(re,fe,{get:()=>a[fe],set:Ae=>a[fe]=Ae,enumerable:!0})})}else e.exposed||(e.exposed={});M&&e.render===vn&&(e.render=M),W!=null&&(e.inheritAttrs=W),A&&(e.components=A),B&&(e.directives=B),T&&ty(e)}function dk(e,t,a=vn){Qe(e)&&(e=bc(e));for(const n in e){const l=e[n];let r;_t(l)?"default"in l?r=ct(l.from||n,l.default,!0):r=ct(l.from||n):r=ct(l),Ct(r)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>r.value,set:o=>r.value=o}):t[n]=r}}function pm(e,t,a){La(Qe(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,a)}function py(e,t,a,n){let l=n.includes(".")?Xg(a,n):()=>a[n];if(Mt(e)){const r=t[e];ot(r)&&Ve(l,r)}else if(ot(e))Ve(l,e.bind(a));else if(_t(e))if(Qe(e))e.forEach(r=>py(r,t,a,n));else{const r=ot(e.handler)?e.handler.bind(a):t[e.handler];ot(r)&&Ve(l,r,e)}}function my(e){const t=e.type,{mixins:a,extends:n}=t,{mixins:l,optionsCache:r,config:{optionMergeStrategies:o}}=e.appContext,i=r.get(t);let u;return i?u=i:!l.length&&!a&&!n?u=t:(u={},l.length&&l.forEach(c=>Ii(u,c,o,!0)),Ii(u,t,o)),_t(t)&&r.set(t,u),u}function Ii(e,t,a,n=!1){const{mixins:l,extends:r}=t;r&&Ii(e,r,a,!0),l&&l.forEach(o=>Ii(e,o,a,!0));for(const o in t)if(!(n&&o==="expose")){const i=ck[o]||a&&a[o];e[o]=i?i(e[o],t[o]):t[o]}return e}const ck={data:mm,props:vm,emits:vm,methods:Uo,computed:Uo,beforeCreate:ia,created:ia,beforeMount:ia,mounted:ia,beforeUpdate:ia,updated:ia,beforeDestroy:ia,beforeUnmount:ia,destroyed:ia,unmounted:ia,activated:ia,deactivated:ia,errorCaptured:ia,serverPrefetch:ia,components:Uo,directives:Uo,watch:pk,provide:mm,inject:fk};function mm(e,t){return t?e?function(){return zt(ot(e)?e.call(this,this):e,ot(t)?t.call(this,this):t)}:t:e}function fk(e,t){return Uo(bc(e),bc(t))}function bc(e){if(Qe(e)){const t={};for(let a=0;at==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Qt(t)}Modifiers`]||e[`${Fl(t)}Modifiers`];function gk(e,t,...a){if(e.isUnmounted)return;const n=e.vnode.props||Et;let l=a;const r=t.startsWith("update:"),o=r&&hk(n,t.slice(7));o&&(o.trim&&(l=a.map(d=>Mt(d)?d.trim():d)),o.number&&(l=a.map(mu)));let i,u=n[i=Jo(t)]||n[i=Jo(Qt(t))];!u&&r&&(u=n[i=Jo(Fl(t))]),u&&La(u,e,6,l);const c=n[i+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[i])return;e.emitted[i]=!0,La(c,e,6,l)}}const yk=new WeakMap;function hy(e,t,a=!1){const n=a?yk:t.emitsCache,l=n.get(e);if(l!==void 0)return l;const r=e.emits;let o={},i=!1;if(!ot(e)){const u=c=>{const d=hy(c,t,!0);d&&(i=!0,zt(o,d))};!a&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}return!r&&!i?(_t(e)&&n.set(e,null),null):(Qe(r)?r.forEach(u=>o[u]=null):zt(o,r),_t(e)&&n.set(e,o),o)}function $u(e,t){return!e||!uu(t)?!1:(t=t.slice(2).replace(/Once$/,""),kt(e,t[0].toLowerCase()+t.slice(1))||kt(e,Fl(t))||kt(e,t))}function hm(e){const{type:t,vnode:a,proxy:n,withProxy:l,propsOptions:[r],slots:o,attrs:i,emit:u,render:c,renderCache:d,props:p,data:v,setupState:m,ctx:y,inheritAttrs:x}=e,C=Oi(e);let w,S;try{if(a.shapeFlag&4){const O=l||n,M=O;w=un(c.call(M,O,d,p,m,v,y)),S=i}else{const O=t;w=un(O.length>1?O(p,{attrs:i,slots:o,emit:u}):O(p,null)),S=t.props?i:bk(i)}}catch(O){ts.length=0,xu(O,e,1),w=D(Ga)}let L=w;if(S&&x!==!1){const O=Object.keys(S),{shapeFlag:M}=L;O.length&&M&7&&(r&&O.some(du)&&(S=_k(S,r)),L=Tl(L,S,!1,!0))}return a.dirs&&(L=Tl(L,null,!1,!0),L.dirs=L.dirs?L.dirs.concat(a.dirs):a.dirs),a.transition&&cs(L,a.transition),w=L,Oi(C),w}const bk=e=>{let t;for(const a in e)(a==="class"||a==="style"||uu(a))&&((t||(t={}))[a]=e[a]);return t},_k=(e,t)=>{const a={};for(const n in e)(!du(n)||!(n.slice(9)in t))&&(a[n]=e[n]);return a};function xk(e,t,a){const{props:n,children:l,component:r}=e,{props:o,children:i,patchFlag:u}=t,c=r.emitsOptions;if(t.dirs||t.transition)return!0;if(a&&u>=0){if(u&1024)return!0;if(u&16)return n?gm(n,o,c):!!o;if(u&8){const d=t.dynamicProps;for(let p=0;pObject.create(yy),_y=e=>Object.getPrototypeOf(e)===yy;function wk(e,t,a,n=!1){const l={},r=by();e.propsDefaults=Object.create(null),xy(e,t,l,r);for(const o in e.propsOptions[0])o in l||(l[o]=void 0);a?e.props=n?l:zg(l):e.type.props?e.props=l:e.props=r,e.attrs=r}function $k(e,t,a,n){const{props:l,attrs:r,vnode:{patchFlag:o}}=e,i=gt(l),[u]=e.propsOptions;let c=!1;if((n||o>0)&&!(o&16)){if(o&8){const d=e.vnode.dynamicProps;for(let p=0;p{u=!0;const[v,m]=ky(p,t,!0);zt(o,v),m&&i.push(...m)};!a&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!r&&!u)return _t(e)&&n.set(e,zr),zr;if(Qe(r))for(let d=0;de==="_"||e==="_ctx"||e==="$stable",_f=e=>Qe(e)?e.map(un):[un(e)],Sk=(e,t,a)=>{if(t._n)return t;const n=N((...l)=>_f(t(...l)),a);return n._c=!1,n},wy=(e,t,a)=>{const n=e._ctx;for(const l in e){if(bf(l))continue;const r=e[l];if(ot(r))t[l]=Sk(l,r,n);else if(r!=null){const o=_f(r);t[l]=()=>o}}},$y=(e,t)=>{const a=_f(t);e.slots.default=()=>a},Cy=(e,t,a)=>{for(const n in t)(a||!bf(n))&&(e[n]=t[n])},Ek=(e,t,a)=>{const n=e.slots=by();if(e.vnode.shapeFlag&32){const l=t._;l?(Cy(n,t,a),a&&bg(n,"_",l,!0)):wy(t,n)}else t&&$y(e,t)},Ak=(e,t,a)=>{const{vnode:n,slots:l}=e;let r=!0,o=Et;if(n.shapeFlag&32){const i=t._;i?a&&i===1?r=!1:Cy(l,t,a):(r=!t.$stable,wy(t,l)),o=t}else t&&($y(e,t),o={default:1});if(r)for(const i in l)!bf(i)&&o[i]==null&&delete l[i]},ua=Pk;function Tk(e){return Mk(e)}function Mk(e,t){const a=vu();a.__VUE__=!0;const{insert:n,remove:l,patchProp:r,createElement:o,createText:i,createComment:u,setText:c,setElementText:d,parentNode:p,nextSibling:v,setScopeId:m=vn,insertStaticContent:y}=e,x=($,P,z,ce=null,X=null,oe=null,ke=void 0,Ce=null,Ee=!!P.dynamicChildren)=>{if($===P)return;$&&!Rr($,P)&&(ce=Z($),le($,X,oe,!0),$=null),P.patchFlag===-2&&(Ee=!1,P.dynamicChildren=null);const{type:ie,ref:Te,shapeFlag:$e}=P;switch(ie){case Cu:C($,P,z,ce);break;case Ga:w($,P,z,ce);break;case _i:$==null&&S(P,z,ce,ke);break;case ve:A($,P,z,ce,X,oe,ke,Ce,Ee);break;default:$e&1?M($,P,z,ce,X,oe,ke,Ce,Ee):$e&6?B($,P,z,ce,X,oe,ke,Ce,Ee):($e&64||$e&128)&&ie.process($,P,z,ce,X,oe,ke,Ce,Ee,ee)}Te!=null&&X?Qo(Te,$&&$.ref,oe,P||$,!P):Te==null&&$&&$.ref!=null&&Qo($.ref,null,oe,$,!0)},C=($,P,z,ce)=>{if($==null)n(P.el=i(P.children),z,ce);else{const X=P.el=$.el;P.children!==$.children&&c(X,P.children)}},w=($,P,z,ce)=>{$==null?n(P.el=u(P.children||""),z,ce):P.el=$.el},S=($,P,z,ce)=>{[$.el,$.anchor]=y($.children,P,z,ce,$.el,$.anchor)},L=({el:$,anchor:P},z,ce)=>{let X;for(;$&&$!==P;)X=v($),n($,z,ce),$=X;n(P,z,ce)},O=({el:$,anchor:P})=>{let z;for(;$&&$!==P;)z=v($),l($),$=z;l(P)},M=($,P,z,ce,X,oe,ke,Ce,Ee)=>{if(P.type==="svg"?ke="svg":P.type==="math"&&(ke="mathml"),$==null)R(P,z,ce,X,oe,ke,Ce,Ee);else{const ie=$.el&&$.el._isVueCE?$.el:null;try{ie&&ie._beginPatch(),T($,P,X,oe,ke,Ce,Ee)}finally{ie&&ie._endPatch()}}},R=($,P,z,ce,X,oe,ke,Ce)=>{let Ee,ie;const{props:Te,shapeFlag:$e,transition:Be,dirs:je}=$;if(Ee=$.el=o($.type,oe,Te&&Te.is,Te),$e&8?d(Ee,$.children):$e&16&&K($.children,Ee,null,ce,X,fd($,oe),ke,Ce),je&&Gl($,null,ce,"created"),q(Ee,$,$.scopeId,ke,ce),Te){for(const nt in Te)nt!=="value"&&!Yo(nt)&&r(Ee,nt,null,Te[nt],oe,ce);"value"in Te&&r(Ee,"value",null,Te.value,oe),(ie=Te.onVnodeBeforeMount)&&an(ie,ce,$)}je&&Gl($,null,ce,"beforeMount");const Ze=Dk(X,Be);Ze&&Be.beforeEnter(Ee),n(Ee,P,z),((ie=Te&&Te.onVnodeMounted)||Ze||je)&&ua(()=>{ie&&an(ie,ce,$),Ze&&Be.enter(Ee),je&&Gl($,null,ce,"mounted")},X)},q=($,P,z,ce,X)=>{if(z&&m($,z),ce)for(let oe=0;oe{for(let ie=Ee;ie<$.length;ie++){const Te=$[ie]=Ce?Pn($[ie]):un($[ie]);x(null,Te,P,z,ce,X,oe,ke,Ce)}},T=($,P,z,ce,X,oe,ke)=>{const Ce=P.el=$.el;let{patchFlag:Ee,dynamicChildren:ie,dirs:Te}=P;Ee|=$.patchFlag&16;const $e=$.props||Et,Be=P.props||Et;let je;if(z&&Yl(z,!1),(je=Be.onVnodeBeforeUpdate)&&an(je,z,P,$),Te&&Gl(P,$,z,"beforeUpdate"),z&&Yl(z,!0),($e.innerHTML&&Be.innerHTML==null||$e.textContent&&Be.textContent==null)&&d(Ce,""),ie?I($.dynamicChildren,ie,Ce,z,ce,fd(P,X),oe):ke||fe($,P,Ce,null,z,ce,fd(P,X),oe,!1),Ee>0){if(Ee&16)W(Ce,$e,Be,z,X);else if(Ee&2&&$e.class!==Be.class&&r(Ce,"class",null,Be.class,X),Ee&4&&r(Ce,"style",$e.style,Be.style,X),Ee&8){const Ze=P.dynamicProps;for(let nt=0;nt{je&&an(je,z,P,$),Te&&Gl(P,$,z,"updated")},ce)},I=($,P,z,ce,X,oe,ke)=>{for(let Ce=0;Ce{if(P!==z){if(P!==Et)for(const oe in P)!Yo(oe)&&!(oe in z)&&r($,oe,P[oe],null,X,ce);for(const oe in z){if(Yo(oe))continue;const ke=z[oe],Ce=P[oe];ke!==Ce&&oe!=="value"&&r($,oe,Ce,ke,X,ce)}"value"in z&&r($,"value",P.value,z.value,X)}},A=($,P,z,ce,X,oe,ke,Ce,Ee)=>{const ie=P.el=$?$.el:i(""),Te=P.anchor=$?$.anchor:i("");let{patchFlag:$e,dynamicChildren:Be,slotScopeIds:je}=P;je&&(Ce=Ce?Ce.concat(je):je),$==null?(n(ie,z,ce),n(Te,z,ce),K(P.children||[],z,Te,X,oe,ke,Ce,Ee)):$e>0&&$e&64&&Be&&$.dynamicChildren&&$.dynamicChildren.length===Be.length?(I($.dynamicChildren,Be,z,X,oe,ke,Ce),(P.key!=null||X&&P===X.subTree)&&xf($,P,!0)):fe($,P,z,Te,X,oe,ke,Ce,Ee)},B=($,P,z,ce,X,oe,ke,Ce,Ee)=>{P.slotScopeIds=Ce,$==null?P.shapeFlag&512?X.ctx.activate(P,z,ce,ke,Ee):Y(P,z,ce,X,oe,ke,Ee):U($,P,Ee)},Y=($,P,z,ce,X,oe,ke)=>{const Ce=$.component=Bk($,ce,X);if(ay($)&&(Ce.ctx.renderer=ee),Fk(Ce,!1,ke),Ce.asyncDep){if(X&&X.registerDep(Ce,H,ke),!$.el){const Ee=Ce.subTree=D(Ga);w(null,Ee,P,z),$.placeholder=Ee.el}}else H(Ce,$,P,z,X,oe,ke)},U=($,P,z)=>{const ce=P.component=$.component;if(xk($,P,z))if(ce.asyncDep&&!ce.asyncResolved){re(ce,P,z);return}else ce.next=P,ce.update();else P.el=$.el,ce.vnode=P},H=($,P,z,ce,X,oe,ke)=>{const Ce=()=>{if($.isMounted){let{next:$e,bu:Be,u:je,parent:Ze,vnode:nt}=$;{const Je=Sy($);if(Je){$e&&($e.el=nt.el,re($,$e,ke)),Je.asyncDep.then(()=>{ua(()=>{$.isUnmounted||ie()},X)});return}}let be=$e,Oe;Yl($,!1),$e?($e.el=nt.el,re($,$e,ke)):$e=nt,Be&&bi(Be),(Oe=$e.props&&$e.props.onVnodeBeforeUpdate)&&an(Oe,Ze,$e,nt),Yl($,!0);const se=hm($),Ue=$.subTree;$.subTree=se,x(Ue,se,p(Ue.el),Z(Ue),$,X,oe),$e.el=se.el,be===null&&kk($,se.el),je&&ua(je,X),(Oe=$e.props&&$e.props.onVnodeUpdated)&&ua(()=>an(Oe,Ze,$e,nt),X)}else{let $e;const{el:Be,props:je}=P,{bm:Ze,m:nt,parent:be,root:Oe,type:se}=$,Ue=Hr(P);Yl($,!1),Ze&&bi(Ze),!Ue&&($e=je&&je.onVnodeBeforeMount)&&an($e,be,P),Yl($,!0);{Oe.ce&&Oe.ce._hasShadowRoot()&&Oe.ce._injectChildStyle(se,$.parent?$.parent.type:void 0);const Je=$.subTree=hm($);x(null,Je,z,ce,$,X,oe),P.el=Je.el}if(nt&&ua(nt,X),!Ue&&($e=je&&je.onVnodeMounted)){const Je=P;ua(()=>an($e,be,Je),X)}(P.shapeFlag&256||be&&Hr(be.vnode)&&be.vnode.shapeFlag&256)&&$.a&&ua($.a,X),$.isMounted=!0,P=z=ce=null}};$.scope.on();const Ee=$.effect=new Sg(Ce);$.scope.off();const ie=$.update=Ee.run.bind(Ee),Te=$.job=Ee.runIfDirty.bind(Ee);Te.i=$,Te.id=$.uid,Ee.scheduler=()=>hf(Te),Yl($,!0),ie()},re=($,P,z)=>{P.component=$;const ce=$.vnode.props;$.vnode=P,$.next=null,$k($,P.props,ce,z),Ak($,P.children,z),Hn(),sm($),Kn()},fe=($,P,z,ce,X,oe,ke,Ce,Ee=!1)=>{const ie=$&&$.children,Te=$?$.shapeFlag:0,$e=P.children,{patchFlag:Be,shapeFlag:je}=P;if(Be>0){if(Be&128){xe(ie,$e,z,ce,X,oe,ke,Ce,Ee);return}else if(Be&256){Ae(ie,$e,z,ce,X,oe,ke,Ce,Ee);return}}je&8?(Te&16&&he(ie,X,oe),$e!==ie&&d(z,$e)):Te&16?je&16?xe(ie,$e,z,ce,X,oe,ke,Ce,Ee):he(ie,X,oe,!0):(Te&8&&d(z,""),je&16&&K($e,z,ce,X,oe,ke,Ce,Ee))},Ae=($,P,z,ce,X,oe,ke,Ce,Ee)=>{$=$||zr,P=P||zr;const ie=$.length,Te=P.length,$e=Math.min(ie,Te);let Be;for(Be=0;Be<$e;Be++){const je=P[Be]=Ee?Pn(P[Be]):un(P[Be]);x($[Be],je,z,null,X,oe,ke,Ce,Ee)}ie>Te?he($,X,oe,!0,!1,$e):K(P,z,ce,X,oe,ke,Ce,Ee,$e)},xe=($,P,z,ce,X,oe,ke,Ce,Ee)=>{let ie=0;const Te=P.length;let $e=$.length-1,Be=Te-1;for(;ie<=$e&&ie<=Be;){const je=$[ie],Ze=P[ie]=Ee?Pn(P[ie]):un(P[ie]);if(Rr(je,Ze))x(je,Ze,z,null,X,oe,ke,Ce,Ee);else break;ie++}for(;ie<=$e&&ie<=Be;){const je=$[$e],Ze=P[Be]=Ee?Pn(P[Be]):un(P[Be]);if(Rr(je,Ze))x(je,Ze,z,null,X,oe,ke,Ce,Ee);else break;$e--,Be--}if(ie>$e){if(ie<=Be){const je=Be+1,Ze=jeBe)for(;ie<=$e;)le($[ie],X,oe,!0),ie++;else{const je=ie,Ze=ie,nt=new Map;for(ie=Ze;ie<=Be;ie++){const He=P[ie]=Ee?Pn(P[ie]):un(P[ie]);He.key!=null&&nt.set(He.key,ie)}let be,Oe=0;const se=Be-Ze+1;let Ue=!1,Je=0;const it=new Array(se);for(ie=0;ie=se){le(He,X,oe,!0);continue}let Xe;if(He.key!=null)Xe=nt.get(He.key);else for(be=Ze;be<=Be;be++)if(it[be-Ze]===0&&Rr(He,P[be])){Xe=be;break}Xe===void 0?le(He,X,oe,!0):(it[Xe-Ze]=ie+1,Xe>=Je?Je=Xe:Ue=!0,x(He,P[Xe],z,null,X,oe,ke,Ce,Ee),Oe++)}const Ke=Ue?Ok(it):zr;for(be=Ke.length-1,ie=se-1;ie>=0;ie--){const He=Ze+ie,Xe=P[He],Pt=P[He+1],oa=He+1{const{el:oe,type:ke,transition:Ce,children:Ee,shapeFlag:ie}=$;if(ie&6){_e($.component.subTree,P,z,ce);return}if(ie&128){$.suspense.move(P,z,ce);return}if(ie&64){ke.move($,P,z,ee);return}if(ke===ve){n(oe,P,z);for(let $e=0;$eCe.enter(oe),X));else{const{leave:$e,delayLeave:Be,afterLeave:je}=Ce,Ze=()=>{$.ctx.isUnmounted?l(oe):n(oe,P,z)},nt=()=>{const be=oe._isLeaving||!!oe[on];oe._isLeaving&&oe[on](!0),Ce.persisted&&!be?Ze():$e(oe,()=>{Ze(),je&&je()})};Be?Be(oe,Ze,nt):nt()}else n(oe,P,z)},le=($,P,z,ce=!1,X=!1)=>{const{type:oe,props:ke,ref:Ce,children:Ee,dynamicChildren:ie,shapeFlag:Te,patchFlag:$e,dirs:Be,cacheIndex:je,memo:Ze}=$;if($e===-2&&(X=!1),Ce!=null&&(Hn(),Qo(Ce,null,z,$,!0),Kn()),je!=null&&(P.renderCache[je]=void 0),Te&256){P.ctx.deactivate($);return}const nt=Te&1&&Be,be=!Hr($);let Oe;if(be&&(Oe=ke&&ke.onVnodeBeforeUnmount)&&an(Oe,P,$),Te&6)de($.component,z,ce);else{if(Te&128){$.suspense.unmount(z,ce);return}nt&&Gl($,null,P,"beforeUnmount"),Te&64?$.type.remove($,P,z,ee,ce):ie&&!ie.hasOnce&&(oe!==ve||$e>0&&$e&64)?he(ie,P,z,!1,!0):(oe===ve&&$e&384||!X&&Te&16)&&he(Ee,P,z),ce&&pe($)}const se=Ze!=null&&je==null;(be&&(Oe=ke&&ke.onVnodeUnmounted)||nt||se)&&ua(()=>{Oe&&an(Oe,P,$),nt&&Gl($,null,P,"unmounted"),se&&($.el=null)},z)},pe=$=>{const{type:P,el:z,anchor:ce,transition:X}=$;if(P===ve){F(z,ce);return}if(P===_i){O($);return}const oe=()=>{l(z),X&&!X.persisted&&X.afterLeave&&X.afterLeave()};if($.shapeFlag&1&&X&&!X.persisted){const{leave:ke,delayLeave:Ce}=X,Ee=()=>ke(z,oe);Ce?Ce($.el,oe,Ee):Ee()}else oe()},F=($,P)=>{let z;for(;$!==P;)z=v($),l($),$=z;l(P)},de=($,P,z)=>{const{bum:ce,scope:X,job:oe,subTree:ke,um:Ce,m:Ee,a:ie}=$;bm(Ee),bm(ie),ce&&bi(ce),X.stop(),oe&&(oe.flags|=8,le(ke,$,P,z)),Ce&&ua(Ce,P),ua(()=>{$.isUnmounted=!0},P)},he=($,P,z,ce=!1,X=!1,oe=0)=>{for(let ke=oe;ke<$.length;ke++)le($[ke],P,z,ce,X)},Z=$=>{if($.shapeFlag&6)return Z($.component.subTree);if($.shapeFlag&128)return $.suspense.next();const P=v($.anchor||$.el),z=P&&P[Qg];return z?v(z):P};let ge=!1;const J=($,P,z)=>{let ce;$==null?P._vnode&&(le(P._vnode,null,null,!0),ce=P._vnode.component):x(P._vnode||null,$,P,null,null,null,z),P._vnode=$,ge||(ge=!0,sm(ce),Gg(),ge=!1)},ee={p:x,um:le,m:_e,r:pe,mt:Y,mc:K,pc:fe,pbc:I,n:Z,o:e};return{render:J,hydrate:void 0,createApp:vk(J)}}function fd({type:e,props:t},a){return a==="svg"&&e==="foreignObject"||a==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:a}function Yl({effect:e,job:t},a){a?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Dk(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function xf(e,t,a=!1){const n=e.children,l=t.children;if(Qe(n)&&Qe(l))for(let r=0;r>1,e[a[i]]0&&(t[n]=a[r-1]),a[r]=n)}}for(r=a.length,o=a[r-1];r-- >0;)a[r]=o,o=t[o];return a}function Sy(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Sy(t)}function bm(e){if(e)for(let t=0;te.__isSuspense;function Pk(e,t){t&&t.pendingBranch?Qe(e)?t.effects.push(...e):t.effects.push(e):jx(e)}const ve=Symbol.for("v-fgt"),Cu=Symbol.for("v-txt"),Ga=Symbol.for("v-cmt"),_i=Symbol.for("v-stc"),ts=[];let ka=null;function f(e=!1){ts.push(ka=e?null:[])}function Ik(){ts.pop(),ka=ts[ts.length-1]||null}let fs=1;function Ri(e,t=!1){fs+=e,e<0&&ka&&t&&(ka.hasOnce=!0)}function Ty(e){return e.dynamicChildren=fs>0?ka||zr:null,Ik(),fs>0&&ka&&ka.push(e),e}function b(e,t,a,n,l,r){return Ty(g(e,t,a,n,l,r,!0))}function V(e,t,a,n,l){return Ty(D(e,t,a,n,l,!0))}function ps(e){return e?e.__v_isVNode===!0:!1}function Rr(e,t){return e.type===t.type&&e.key===t.key}const My=({key:e})=>e??null,xi=({ref:e,ref_key:t,ref_for:a})=>(typeof e=="number"&&(e=""+e),e!=null?Mt(e)||Ct(e)||ot(e)?{i:Xt,r:e,k:t,f:!!a}:e:null);function g(e,t=null,a=null,n=0,l=null,r=e===ve?0:1,o=!1,i=!1){const u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&My(t),ref:t&&xi(t),scopeId:Jg,slotScopeIds:null,children:a,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:n,dynamicProps:l,dynamicChildren:null,appContext:null,ctx:Xt};return i?(kf(u,a),r&128&&e.normalize(u)):a&&(u.shapeFlag|=Mt(a)?8:16),fs>0&&!o&&ka&&(u.patchFlag>0||r&6)&&u.patchFlag!==32&&ka.push(u),u}const D=Rk;function Rk(e,t=null,a=null,n=0,l=null,r=!1){if((!e||e===iy)&&(e=Ga),ps(e)){const i=Tl(e,t,!0);return a&&kf(i,a),fs>0&&!r&&ka&&(i.shapeFlag&6?ka[ka.indexOf(e)]=i:ka.push(i)),i.patchFlag=-2,i}if(Hk(e)&&(e=e.__vccOpts),t){t=ft(t);let{class:i,style:u}=t;i&&!Mt(i)&&(t.class=me(i)),_t(u)&&(_u(u)&&!Qe(u)&&(u=zt({},u)),t.style=ra(u))}const o=Mt(e)?1:Ay(e)?128:Wx(e)?64:_t(e)?4:ot(e)?2:0;return g(e,t,a,n,l,o,r,!0)}function ft(e){return e?_u(e)||_y(e)?zt({},e):e:null}function Tl(e,t,a=!1,n=!1){const{props:l,ref:r,patchFlag:o,children:i,transition:u}=e,c=t?Ye(l||{},t):l,d={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&My(c),ref:t&&t.ref?a&&r?Qe(r)?r.concat(xi(t)):[r,xi(t)]:xi(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ve?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:u,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Tl(e.ssContent),ssFallback:e.ssFallback&&Tl(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return u&&n&&cs(d,u.clone(d)),d}function ye(e=" ",t=0){return D(Cu,null,e,t)}function qk(e,t){const a=D(_i,null,e);return a.staticCount=t,a}function G(e="",t=!1){return t?(f(),V(Ga,null,e)):D(Ga,null,e)}function un(e){return e==null||typeof e=="boolean"?D(Ga):Qe(e)?D(ve,null,e.slice()):ps(e)?Pn(e):D(Cu,null,String(e))}function Pn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Tl(e)}function kf(e,t){let a=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(Qe(t))a=16;else if(typeof t=="object")if(n&65){const l=t.default;l&&(l._c&&(l._d=!1),kf(e,l()),l._c&&(l._d=!0));return}else{a=32;const l=t._;!l&&!_y(t)?t._ctx=Xt:l===3&&Xt&&(Xt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ot(t)?(t={default:t,_ctx:Xt},a=32):(t=String(t),n&64?(a=16,t=[ye(t)]):a=8);e.children=t,e.shapeFlag|=a}function Ye(...e){const t={};for(let a=0;ala||Xt;let qi,xc;{const e=vu(),t=(a,n)=>{let l;return(l=e[a])||(l=e[a]=[]),l.push(n),r=>{l.length>1?l.forEach(o=>o(r)):l[0](r)}};qi=t("__VUE_INSTANCE_SETTERS__",a=>la=a),xc=t("__VUE_SSR_SETTERS__",a=>ms=a)}const Ds=e=>{const t=la;return qi(e),e.scope.on(),()=>{e.scope.off(),qi(t)}},_m=()=>{la&&la.scope.off(),qi(null)};function Dy(e){return e.vnode.shapeFlag&4}let ms=!1;function Fk(e,t=!1,a=!1){t&&xc(t);const{props:n,children:l}=e.vnode,r=Dy(e);wk(e,n,r,t),Ek(e,l,a||t);const o=r?Vk(e,t):void 0;return t&&xc(!1),o}function Vk(e,t){const a=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,ik);const{setup:n}=a;if(n){Hn();const l=e.setupContext=n.length>1?jk(e):null,r=Ds(e),o=Ms(n,e,0,[e.props,l]),i=hg(o);if(Kn(),r(),(i||e.sp)&&!Hr(e)&&ty(e),i){if(o.then(_m,_m),t)return o.then(u=>{xm(e,u)}).catch(u=>{xu(u,e,0)});e.asyncDep=o}else xm(e,o)}else Oy(e)}function xm(e,t,a){ot(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:_t(t)&&(e.setupState=Ug(t)),Oy(e)}function Oy(e,t,a){const n=e.type;e.render||(e.render=n.render||vn);{const l=Ds(e);Hn();try{uk(e)}finally{Kn(),l()}}}const zk={get(e,t){return na(e,"get",""),e[t]}};function jk(e){const t=a=>{e.exposed=a||{}};return{attrs:new Proxy(e.attrs,zk),slots:e.slots,emit:e.emit,expose:t}}function Su(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Ug(Ti(e.exposed)),{get(t,a){if(a in t)return t[a];if(a in es)return es[a](e)},has(t,a){return a in t||a in es}})):e.proxy}function Uk(e,t=!0){return ot(e)?e.displayName||e.name:e.name||t&&e.__name}function Hk(e){return ot(e)&&"__vccOpts"in e}const k=(e,t)=>Nx(e,t,ms);function qa(e,t,a){try{Ri(-1);const n=arguments.length;return n===2?_t(t)&&!Qe(t)?ps(t)?D(e,null,[t]):D(e,t):D(e,null,t):(n>3?a=Array.prototype.slice.call(arguments,2):n===3&&ps(a)&&(a=[a]),D(e,t,a))}finally{Ri(1)}}const Kk="3.5.35";let kc;const km=typeof window<"u"&&window.trustedTypes;if(km)try{kc=km.createPolicy("vue",{createHTML:e=>e})}catch{}const Py=kc?e=>kc.createHTML(e):e=>e,Wk="http://www.w3.org/2000/svg",Gk="http://www.w3.org/1998/Math/MathML",Dn=typeof document<"u"?document:null,wm=Dn&&Dn.createElement("template"),Yk={insert:(e,t,a)=>{t.insertBefore(e,a||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,a,n)=>{const l=t==="svg"?Dn.createElementNS(Wk,e):t==="mathml"?Dn.createElementNS(Gk,e):a?Dn.createElement(e,{is:a}):Dn.createElement(e);return e==="select"&&n&&n.multiple!=null&&l.setAttribute("multiple",n.multiple),l},createText:e=>Dn.createTextNode(e),createComment:e=>Dn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Dn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,a,n,l,r){const o=a?a.previousSibling:t.lastChild;if(l&&(l===r||l.nextSibling))for(;t.insertBefore(l.cloneNode(!0),a),!(l===r||!(l=l.nextSibling)););else{wm.innerHTML=Py(n==="svg"?`${e}`:n==="mathml"?`${e}`:e);const i=wm.content;if(n==="svg"||n==="mathml"){const u=i.firstChild;for(;u.firstChild;)i.appendChild(u.firstChild);i.removeChild(u)}t.insertBefore(i,a)}return[o?o.nextSibling:t.firstChild,a?a.previousSibling:t.lastChild]}},fl="transition",To="animation",to=Symbol("_vtc"),Iy={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Jk=zt({},Qx,Iy),Jl=(e,t=[])=>{Qe(e)?e.forEach(a=>a(...t)):e&&e(...t)},$m=e=>e?Qe(e)?e.some(t=>t.length>1):e.length>1:!1;function Zk(e){const t={};for(const A in e)A in Iy||(t[A]=e[A]);if(e.css===!1)return t;const{name:a="v",type:n,duration:l,enterFromClass:r=`${a}-enter-from`,enterActiveClass:o=`${a}-enter-active`,enterToClass:i=`${a}-enter-to`,appearFromClass:u=r,appearActiveClass:c=o,appearToClass:d=i,leaveFromClass:p=`${a}-leave-from`,leaveActiveClass:v=`${a}-leave-active`,leaveToClass:m=`${a}-leave-to`}=e,y=Xk(l),x=y&&y[0],C=y&&y[1],{onBeforeEnter:w,onEnter:S,onEnterCancelled:L,onLeave:O,onLeaveCancelled:M,onBeforeAppear:R=w,onAppear:q=S,onAppearCancelled:K=L}=t,T=(A,B,Y,U)=>{A._enterCancelled=U,yl(A,B?d:i),yl(A,B?c:o),Y&&Y()},I=(A,B)=>{A._isLeaving=!1,yl(A,p),yl(A,m),yl(A,v),B&&B()},W=A=>(B,Y)=>{const U=A?q:S,H=()=>T(B,A,Y);Jl(U,[B,H]),Cm(()=>{yl(B,A?u:r),nn(B,A?d:i),$m(U)||Sm(B,n,x,H)})};return zt(t,{onBeforeEnter(A){Jl(w,[A]),nn(A,r),nn(A,o)},onBeforeAppear(A){Jl(R,[A]),nn(A,u),nn(A,c)},onEnter:W(!1),onAppear:W(!0),onLeave(A,B){A._isLeaving=!0;const Y=()=>I(A,B);nn(A,p),A._enterCancelled?(nn(A,v),wc(A)):(wc(A),nn(A,v)),Cm(()=>{A._isLeaving&&(yl(A,p),nn(A,m),$m(O)||Sm(A,n,C,Y))}),Jl(O,[A,Y])},onEnterCancelled(A){T(A,!1,void 0,!0),Jl(L,[A])},onAppearCancelled(A){T(A,!0,void 0,!0),Jl(K,[A])},onLeaveCancelled(A){I(A),Jl(M,[A])}})}function Xk(e){if(e==null)return null;if(_t(e))return[pd(e.enter),pd(e.leave)];{const t=pd(e);return[t,t]}}function pd(e){return nx(e)}function nn(e,t){t.split(/\s+/).forEach(a=>a&&e.classList.add(a)),(e[to]||(e[to]=new Set)).add(t)}function yl(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const a=e[to];a&&(a.delete(t),a.size||(e[to]=void 0))}function Cm(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Qk=0;function Sm(e,t,a,n){const l=e._endId=++Qk,r=()=>{l===e._endId&&n()};if(a!=null)return setTimeout(r,a);const{type:o,timeout:i,propCount:u}=Ry(e,t);if(!o)return n();const c=o+"end";let d=0;const p=()=>{e.removeEventListener(c,v),r()},v=m=>{m.target===e&&++d>=u&&p()};setTimeout(()=>{d(a[y]||"").split(", "),l=n(`${fl}Delay`),r=n(`${fl}Duration`),o=Em(l,r),i=n(`${To}Delay`),u=n(`${To}Duration`),c=Em(i,u);let d=null,p=0,v=0;t===fl?o>0&&(d=fl,p=o,v=r.length):t===To?c>0&&(d=To,p=c,v=u.length):(p=Math.max(o,c),d=p>0?o>c?fl:To:null,v=d?d===fl?r.length:u.length:0);const m=d===fl&&/\b(?:transform|all)(?:,|$)/.test(n(`${fl}Property`).toString());return{type:d,timeout:p,propCount:v,hasTransform:m}}function Em(e,t){for(;e.lengthAm(a)+Am(e[n])))}function Am(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function wc(e){return(e?e.ownerDocument:document).body.offsetHeight}function ew(e,t,a){const n=e[to];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):a?e.setAttribute("class",t):e.className=t}const Li=Symbol("_vod"),qy=Symbol("_vsh"),vs={name:"show",beforeMount(e,{value:t},{transition:a}){e[Li]=e.style.display==="none"?"":e.style.display,a&&t?a.beforeEnter(e):Mo(e,t)},mounted(e,{value:t},{transition:a}){a&&t&&a.enter(e)},updated(e,{value:t,oldValue:a},{transition:n}){!t!=!a&&(n?t?(n.beforeEnter(e),Mo(e,!0),n.enter(e)):n.leave(e,()=>{Mo(e,!1)}):Mo(e,t))},beforeUnmount(e,{value:t}){Mo(e,t)}};function Mo(e,t){e.style.display=t?e[Li]:"none",e[qy]=!t}const tw=Symbol(""),aw=/(?:^|;)\s*display\s*:/;function nw(e,t,a){const n=e.style,l=Mt(a);let r=!1;if(a&&!l){if(t)if(Mt(t))for(const o of t.split(";")){const i=o.slice(0,o.indexOf(":")).trim();a[i]==null&&Ho(n,i,"")}else for(const o in t)a[o]==null&&Ho(n,o,"");for(const o in a){o==="display"&&(r=!0);const i=a[o];i!=null?rw(e,o,!Mt(t)&&t?t[o]:void 0,i)||Ho(n,o,i):Ho(n,o,"")}}else if(l){if(t!==a){const o=n[tw];o&&(a+=";"+o),n.cssText=a,r=aw.test(a)}}else t&&e.removeAttribute("style");Li in e&&(e[Li]=r?n.display:"",e[qy]&&(n.display="none"))}const Tm=/\s*!important$/;function Ho(e,t,a){if(Qe(a))a.forEach(n=>Ho(e,t,n));else if(a==null&&(a=""),t.startsWith("--"))e.setProperty(t,a);else{const n=lw(e,t);Tm.test(a)?e.setProperty(Fl(n),a.replace(Tm,""),"important"):e[n]=a}}const Mm=["Webkit","Moz","ms"],md={};function lw(e,t){const a=md[t];if(a)return a;let n=Qt(t);if(n!=="filter"&&n in e)return md[t]=n;n=pu(n);for(let l=0;lvd||(uw.then(()=>vd=0),vd=Date.now());function cw(e,t){const a=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=a.attached)return;const l=a.value;if(Qe(l)){const r=n.stopImmediatePropagation;n.stopImmediatePropagation=()=>{r.call(n),n._stopped=!0};const o=l.slice(),i=[n];for(let u=0;ue.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,fw=(e,t,a,n,l,r)=>{const o=l==="svg";t==="class"?ew(e,n,o):t==="style"?nw(e,a,n):uu(t)?du(t)||sw(e,t,a,n,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):pw(e,t,n,o))?(Pm(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Om(e,t,n,o,r,t!=="value")):e._isVueCE&&(mw(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Mt(n)))?Pm(e,Qt(t),n,r,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),Om(e,t,n,o))};function pw(e,t,a,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&qm(t)&&ot(a));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const l=e.tagName;if(l==="IMG"||l==="VIDEO"||l==="CANVAS"||l==="SOURCE")return!1}return qm(t)&&Mt(a)?!1:t in e}function mw(e,t){const a=e._def.props;if(!a)return!1;const n=Qt(t);return Array.isArray(a)?a.some(l=>Qt(l)===n):Object.keys(a).some(l=>Qt(l)===n)}const Ly=new WeakMap,Ny=new WeakMap,Ni=Symbol("_moveCb"),Lm=Symbol("_enterCb"),vw=e=>(delete e.props.mode,e),hw=vw({name:"TransitionGroup",props:zt({},Jk,{tag:String,moveClass:String}),setup(e,{slots:t}){const a=kn(),n=Xx();let l,r;return yf(()=>{if(!l.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!xw(l[0].el,a.vnode.el,o)){l=[];return}l.forEach(yw),l.forEach(bw);const i=l.filter(_w);wc(a.vnode.el),i.forEach(u=>{const c=u.el,d=c.style;nn(c,o),d.transform=d.webkitTransform=d.transitionDuration="";const p=c[Ni]=v=>{v&&v.target!==c||(!v||v.propertyName.endsWith("transform"))&&(c.removeEventListener("transitionend",p),c[Ni]=null,yl(c,o))};c.addEventListener("transitionend",p)}),l=[]}),()=>{const o=gt(e),i=Zk(o);let u=o.tag||ve;if(l=[],r)for(let c=0;c{i.split(/\s+/).forEach(u=>u&&n.classList.remove(u))}),a.split(/\s+/).forEach(i=>i&&n.classList.add(i)),n.style.display="none";const r=t.nodeType===1?t:t.parentNode;r.appendChild(n);const{hasTransform:o}=Ry(n);return r.removeChild(n),o}const ao=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Qe(t)?a=>bi(t,a):t};function kw(e){e.target.composing=!0}function Nm(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Fn=Symbol("_assign");function Bm(e,t,a){return t&&(e=e.trim()),a&&(e=mu(e)),e}const Ua={created(e,{modifiers:{lazy:t,trim:a,number:n}},l){e[Fn]=ao(l);const r=n||l.props&&l.props.type==="number";wl(e,t?"change":"input",o=>{o.target.composing||e[Fn](Bm(e.value,a,r))}),(a||r)&&wl(e,"change",()=>{e.value=Bm(e.value,a,r)}),t||(wl(e,"compositionstart",kw),wl(e,"compositionend",Nm),wl(e,"change",Nm))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:a,modifiers:{lazy:n,trim:l,number:r}},o){if(e[Fn]=ao(o),e.composing)return;const i=(r||e.type==="number")&&!/^0\d/.test(e.value)?mu(e.value):e.value,u=t??"";if(i===u)return;const c=e.getRootNode();(c instanceof Document||c instanceof ShadowRoot)&&c.activeElement===e&&e.type!=="range"&&(n&&t===a||l&&e.value.trim()===u)||(e.value=u)}},ww={deep:!0,created(e,t,a){e[Fn]=ao(a),wl(e,"change",()=>{const n=e._modelValue,l=hs(e),r=e.checked,o=e[Fn];if(Qe(n)){const i=cf(n,l),u=i!==-1;if(r&&!u)o(n.concat(l));else if(!r&&u){const c=[...n];c.splice(i,1),o(c)}}else if(co(n)){const i=new Set(n);r?i.add(l):i.delete(l),o(i)}else o(Fy(e,r))})},mounted:Fm,beforeUpdate(e,t,a){e[Fn]=ao(a),Fm(e,t,a)}};function Fm(e,{value:t,oldValue:a},n){e._modelValue=t;let l;if(Qe(t))l=cf(t,n.props.value)>-1;else if(co(t))l=t.has(n.props.value);else{if(t===a)return;l=fo(t,Fy(e,!0))}e.checked!==l&&(e.checked=l)}const $w={deep:!0,created(e,{value:t,modifiers:{number:a}},n){const l=co(t);wl(e,"change",()=>{const r=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>a?mu(hs(o)):hs(o));e[Fn](e.multiple?l?new Set(r):r:r[0]),e._assigning=!0,Ge(()=>{e._assigning=!1})}),e[Fn]=ao(n)},mounted(e,{value:t}){Vm(e,t)},beforeUpdate(e,t,a){e[Fn]=ao(a)},updated(e,{value:t}){e._assigning||Vm(e,t)}};function Vm(e,t){const a=e.multiple,n=Qe(t);if(!(a&&!n&&!co(t))){for(let l=0,r=e.options.length;lString(c)===String(i)):o.selected=cf(t,i)>-1}else o.selected=t.has(i);else if(fo(hs(o),t)){e.selectedIndex!==l&&(e.selectedIndex=l);return}}!a&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function hs(e){return"_value"in e?e._value:e.value}function Fy(e,t){const a=t?"_trueValue":"_falseValue";return a in e?e[a]:t}const Cw=["ctrl","shift","alt","meta"],Sw={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Cw.some(a=>e[`${a}Key`]&&!t.includes(a))},mt=(e,t)=>{if(!e)return e;const a=e._withMods||(e._withMods={}),n=t.join(".");return a[n]||(a[n]=((l,...r)=>{for(let o=0;o{const a=e._withKeys||(e._withKeys={}),n=t.join(".");return a[n]||(a[n]=(l=>{if(!("key"in l))return;const r=Fl(l.key);if(t.some(o=>o===r||Ew[o]===r))return e(l)}))},Aw=zt({patchProp:fw},Yk);let zm;function Tw(){return zm||(zm=Tk(Aw))}const Mw=((...e)=>{const t=Tw().createApp(...e),{mount:a}=t;return t.mount=n=>{const l=Ow(n);if(!l)return;const r=t._component;!ot(r)&&!r.render&&!r.template&&(r.template=l.innerHTML),l.nodeType===1&&(l.textContent="");const o=a(l,!1,Dw(l));return l instanceof Element&&(l.removeAttribute("v-cloak"),l.setAttribute("data-v-app","")),o},t});function Dw(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Ow(e){return Mt(e)?document.querySelector(e):e}const qr=typeof document<"u";function Vy(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Pw(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Vy(e.default)}const xt=Object.assign;function hd(e,t){const a={};for(const n in t){const l=t[n];a[n]=Ya(l)?l.map(e):e(l)}return a}const as=()=>{},Ya=Array.isArray;function jm(e,t){const a={};for(const n in e)a[n]=n in t?t[n]:e[n];return a}const zy=Symbol("");function no(e,t){return xt(new Error,{type:e,[zy]:!0},t)}function ln(e,t){return e instanceof Error&&zy in e&&(t==null||!!(e.type&t))}const wf=Symbol(""),Um=Symbol(""),Eu=Symbol(""),$f=Symbol(""),$c=Symbol("");function wn(){return ct(Eu)}function ga(e){return ct($f)}const jy=/#/g,Iw=/&/g,Rw=/\//g,qw=/=/g,Lw=/\?/g,Uy=/\+/g,Nw=/%5B/g,Bw=/%5D/g,Hy=/%5E/g,Fw=/%60/g,Ky=/%7B/g,Vw=/%7C/g,Wy=/%7D/g,zw=/%20/g;function Cf(e){return e==null?"":encodeURI(""+e).replace(Vw,"|").replace(Nw,"[").replace(Bw,"]")}function jw(e){return Cf(e).replace(Ky,"{").replace(Wy,"}").replace(Hy,"^")}function Cc(e){return Cf(e).replace(Uy,"%2B").replace(zw,"+").replace(jy,"%23").replace(Iw,"%26").replace(Fw,"`").replace(Ky,"{").replace(Wy,"}").replace(Hy,"^")}function Uw(e){return Cc(e).replace(qw,"%3D")}function Hw(e){return Cf(e).replace(jy,"%23").replace(Lw,"%3F")}function Kw(e){return Hw(e).replace(Rw,"%2F")}function Bi(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const Ww=/\/$/,Gw=e=>e.replace(Ww,"");function gd(e,t,a="/"){let n,l={},r="",o="";const i=t.indexOf("#");let u=t.indexOf("?");return u=i>=0&&u>i?-1:u,u>=0&&(n=t.slice(0,u),r=t.slice(u,i>0?i:t.length),l=e(r.slice(1))),i>=0&&(n=n||t.slice(0,i),o=t.slice(i,t.length)),n=Xw(n??t,a),{fullPath:n+r+o,path:n,query:l,hash:Bi(o)}}function Yw(e,t){const a=t.query?e(t.query):"";return t.path+(a&&"?")+a+(t.hash||"")}function Hm(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Jw(e,t,a){const n=t.matched.length-1,l=a.matched.length-1;return n>-1&&n===l&&lo(t.matched[n],a.matched[l])&&Gy(t.params,a.params)&&e(t.query)===e(a.query)&&t.hash===a.hash}function lo(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Gy(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var a in e)if(!Zw(e[a],t[a]))return!1;return!0}function Zw(e,t){return Ya(e)?Km(e,t):Ya(t)?Km(t,e):(e&&e.valueOf())===(t&&t.valueOf())}function Km(e,t){return Ya(t)?e.length===t.length&&e.every((a,n)=>a===t[n]):e.length===1&&e[0]===t}function Xw(e,t){if(e.startsWith("/"))return e;if(!e)return t;const a=t.split("/"),n=e.split("/"),l=n[n.length-1];(l===".."||l===".")&&n.push("");let r=a.length-1,o,i;for(o=0;o1&&r--;else break;return a.slice(0,r).join("/")+"/"+n.slice(o).join("/")}const pl={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};function Qw(e){if(!e)if(qr){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Gw(e)}const e2=/^[^#]+#/;function t2(e,t){return e.replace(e2,"#")+t}function a2(e,t){const a=document.documentElement.getBoundingClientRect(),n=e.getBoundingClientRect();return{behavior:t.behavior,left:n.left-a.left-(t.left||0),top:n.top-a.top-(t.top||0)}}const Au=()=>({left:window.scrollX,top:window.scrollY});function n2(e){let t;if("el"in e){const a=e.el,n=typeof a=="string"&&a.startsWith("#"),l=typeof a=="string"?n?document.getElementById(a.slice(1)):document.querySelector(a):a;if(!l)return;t=a2(l,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function Wm(e,t){return(history.state?history.state.position-t:-1)+e}const Sc=new Map;function l2(e,t){Sc.set(e,t)}function r2(e){const t=Sc.get(e);return Sc.delete(e),t}function o2(e){return typeof e=="string"||e&&typeof e=="object"}function Yy(e){return typeof e=="string"||typeof e=="symbol"}function s2(e){const t={};if(e===""||e==="?")return t;const a=(e[0]==="?"?e.slice(1):e).split("&");for(let n=0;nl&&Cc(l)):[n&&Cc(n)]).forEach(l=>{l!==void 0&&(t+=(t.length?"&":"")+a,l!=null&&(t+="="+l))})}return t}function i2(e){const t={};for(const a in e){const n=e[a];n!==void 0&&(t[a]=Ya(n)?n.map(l=>l==null?null:""+l):n==null?n:""+n)}return t}function Do(){let e=[];function t(n){return e.push(n),()=>{const l=e.indexOf(n);l>-1&&e.splice(l,1)}}function a(){e=[]}return{add:t,list:()=>e.slice(),reset:a}}function Jy(e,t,a){const n=e.value;if(!n)return;let l=n;const r=()=>{l[t].delete(a)};Qn(r),ly(r),ny(()=>{const o=e.value;o&&(l=o),l[t].add(a)}),l[t].add(a)}function Zy(e){Jy(ct(wf,{}),"leaveGuards",e)}function u2(e){Jy(ct(wf,{}),"updateGuards",e)}function xl(e,t,a,n,l,r=o=>o()){const o=n&&(n.enterCallbacks[l]=n.enterCallbacks[l]||[]);return()=>new Promise((i,u)=>{const c=v=>{v===!1?u(no(4,{from:a,to:t})):v instanceof Error?u(v):o2(v)?u(no(2,{from:t,to:v})):(o&&n.enterCallbacks[l]===o&&typeof v=="function"&&o.push(v),i())},d=r(()=>e.call(n&&n.instances[l],t,a,c));let p=Promise.resolve(d);e.length<3&&(p=p.then(c)),p.catch(v=>u(v))})}function yd(e,t,a,n,l=r=>r()){const r=[];for(const o of e)for(const i in o.components){let u=o.components[i];if(!(t!=="beforeRouteEnter"&&!o.instances[i]))if(Vy(u)){const c=(u.__vccOpts||u)[t];c&&r.push(xl(c,a,n,o,i,l))}else{let c=u();r.push(()=>c.then(d=>{if(!d)throw new Error(`Couldn't resolve component "${i}" at "${o.path}"`);const p=Pw(d)?d.default:d;o.mods[i]=d,o.components[i]=p;const v=(p.__vccOpts||p)[t];return v&&xl(v,a,n,o,i,l)()}))}}return r}function d2(e,t){const a=[],n=[],l=[],r=Math.max(t.matched.length,e.matched.length);for(let o=0;olo(c,i))?n.push(i):a.push(i));const u=e.matched[o];u&&(t.matched.find(c=>lo(c,u))||l.push(u))}return[a,n,l]}let c2=()=>location.protocol+"//"+location.host;function Xy(e,t){const{pathname:a,search:n,hash:l}=t,r=e.indexOf("#");if(r>-1){let o=l.includes(e.slice(r))?e.slice(r).length:1,i=l.slice(o);return i[0]!=="/"&&(i="/"+i),Hm(i,"")}return Hm(a,e)+n+l}function f2(e,t,a,n){let l=[],r=[],o=null;const i=({state:v})=>{const m=Xy(e,location),y=a.value,x=t.value;let C=0;if(v){if(a.value=m,t.value=v,o&&o===y){o=null;return}C=x?v.position-x.position:0}else n(m);l.forEach(w=>{w(a.value,y,{delta:C,type:"pop",direction:C?C>0?"forward":"back":""})})};function u(){o=a.value}function c(v){l.push(v);const m=()=>{const y=l.indexOf(v);y>-1&&l.splice(y,1)};return r.push(m),m}function d(){if(document.visibilityState==="hidden"){const{history:v}=window;if(!v.state)return;v.replaceState(xt({},v.state,{scroll:Au()}),"")}}function p(){for(const v of r)v();r=[],window.removeEventListener("popstate",i),window.removeEventListener("pagehide",d),document.removeEventListener("visibilitychange",d)}return window.addEventListener("popstate",i),window.addEventListener("pagehide",d),document.addEventListener("visibilitychange",d),{pauseListeners:u,listen:c,destroy:p}}function Ym(e,t,a,n=!1,l=!1){return{back:e,current:t,forward:a,replaced:n,position:window.history.length,scroll:l?Au():null}}function p2(e){const{history:t,location:a}=window,n={value:Xy(e,a)},l={value:t.state};l.value||r(n.value,{back:null,current:n.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function r(u,c,d){const p=e.indexOf("#"),v=p>-1?(a.host&&document.querySelector("base")?e:e.slice(p))+u:c2()+e+u;try{t[d?"replaceState":"pushState"](c,"",v),l.value=c}catch(m){console.error(m),a[d?"replace":"assign"](v)}}function o(u,c){r(u,xt({},t.state,Ym(l.value.back,u,l.value.forward,!0),c,{position:l.value.position}),!0),n.value=u}function i(u,c){const d=xt({},l.value,t.state,{forward:u,scroll:Au()});r(d.current,d,!0),r(u,xt({},Ym(n.value,u,null),{position:d.position+1},c),!1),n.value=u}return{location:n,state:l,push:i,replace:o}}function m2(e){e=Qw(e);const t=p2(e),a=f2(e,t.state,t.location,t.replace);function n(r,o=!0){o||a.pauseListeners(),history.go(r)}const l=xt({location:"",base:e,go:n,createHref:t2.bind(null,e)},t,a);return Object.defineProperty(l,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(l,"state",{enumerable:!0,get:()=>t.state.value}),l}const v2={type:0,value:""},h2=/[a-zA-Z0-9_]/;function g2(e){if(!e)return[[]];if(e==="/")return[[v2]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(m){throw new Error(`ERR (${a})/"${c}": ${m}`)}let a=0,n=a;const l=[];let r;function o(){r&&l.push(r),r=[]}let i=0,u,c="",d="";function p(){c&&(a===0?r.push({type:0,value:c}):a===1||a===2||a===3?(r.length>1&&(u==="*"||u==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),r.push({type:1,value:c,regexp:d,repeatable:u==="*"||u==="+",optional:u==="*"||u==="?"})):t("Invalid state to consume buffer"),c="")}function v(){c+=u}for(;it.length?t.length===1&&t[0]===80?1:-1:0}function Qy(e,t){let a=0;const n=e.score,l=t.score;for(;a0&&t[t.length-1]<0}const k2={strict:!1,end:!0,sensitive:!1};function w2(e,t,a){const n=_2(g2(e.path),a),l=xt(n,{record:e,parent:t,children:[],alias:[]});return t&&!l.record.aliasOf==!t.record.aliasOf&&t.children.push(l),l}function $2(e,t){const a=[],n=new Map;t=jm(k2,t);function l(p){return n.get(p)}function r(p,v,m){const y=!m,x=Qm(p);x.aliasOf=m&&m.record;const C=jm(t,p),w=[x];if("alias"in p){const O=typeof p.alias=="string"?[p.alias]:p.alias;for(const M of O)w.push(Qm(xt({},x,{components:m?m.record.components:x.components,path:M,aliasOf:m?m.record:x})))}let S,L;for(const O of w){const{path:M}=O;if(v&&M[0]!=="/"){const R=v.record.path,q=R[R.length-1]==="/"?"":"/";O.path=v.record.path+(M&&q+M)}if(S=w2(O,v,C),m?m.alias.push(S):(L=L||S,L!==S&&L.alias.push(S),y&&p.name&&!ev(S)&&o(p.name)),eb(S)&&u(S),x.children){const R=x.children;for(let q=0;q{o(L)}:as}function o(p){if(Yy(p)){const v=n.get(p);v&&(n.delete(p),a.splice(a.indexOf(v),1),v.children.forEach(o),v.alias.forEach(o))}else{const v=a.indexOf(p);v>-1&&(a.splice(v,1),p.record.name&&n.delete(p.record.name),p.children.forEach(o),p.alias.forEach(o))}}function i(){return a}function u(p){const v=E2(p,a);a.splice(v,0,p),p.record.name&&!ev(p)&&n.set(p.record.name,p)}function c(p,v){let m,y={},x,C;if("name"in p&&p.name){if(m=n.get(p.name),!m)throw no(1,{location:p});C=m.record.name,y=xt(Xm(v.params,m.keys.filter(L=>!L.optional).concat(m.parent?m.parent.keys.filter(L=>L.optional):[]).map(L=>L.name)),p.params&&Xm(p.params,m.keys.map(L=>L.name))),x=m.stringify(y)}else if(p.path!=null)x=p.path,m=a.find(L=>L.re.test(x)),m&&(y=m.parse(x),C=m.record.name,m.keys.forEach(L=>{L.optional&&!y[L.name]&&delete y[L.name]}));else{if(m=v.name?n.get(v.name):a.find(L=>L.re.test(v.path)),!m)throw no(1,{location:p,currentLocation:v});C=m.record.name,y=xt({},v.params,p.params),x=m.stringify(y)}const w=[];let S=m;for(;S;)w.unshift(S.record),S=S.parent;return{name:C,path:x,params:y,matched:w,meta:S2(w)}}e.forEach(p=>r(p));function d(){a.length=0,n.clear()}return{addRoute:r,resolve:c,removeRoute:o,clearRoutes:d,getRoutes:i,getRecordMatcher:l}}function Xm(e,t){const a={};for(const n of t)n in e&&(a[n]=e[n]);return a}function Qm(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:C2(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function C2(e){const t={},a=e.props||!1;if("component"in e)t.default=a;else for(const n in e.components)t[n]=typeof a=="object"?a[n]:a;return t}function ev(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function S2(e){return e.reduce((t,a)=>xt(t,a.meta),{})}function E2(e,t){let a=0,n=t.length;for(;a!==n;){const r=a+n>>1;Qy(e,t[r])<0?n=r:a=r+1}const l=A2(e);return l&&(n=t.lastIndexOf(l,n-1)),n}function A2(e){let t=e;for(;t=t.parent;)if(eb(t)&&Qy(e,t)===0)return t}function eb({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function tv(e){const t=ct(Eu),a=ct($f),n=k(()=>{const u=s(e.to);return t.resolve(u)}),l=k(()=>{const{matched:u}=n.value,{length:c}=u,d=u[c-1],p=a.matched;if(!d||!p.length)return-1;const v=p.findIndex(lo.bind(null,d));if(v>-1)return v;const m=av(u[c-2]);return c>1&&av(d)===m&&p[p.length-1].path!==m?p.findIndex(lo.bind(null,u[c-2])):v}),r=k(()=>l.value>-1&&D2(a.params,n.value.params)),o=k(()=>l.value>-1&&l.value===a.matched.length-1&&Gy(a.params,n.value.params));function i(u={}){if(M2(u)){const c=t[s(e.replace)?"replace":"push"](s(e.to)).catch(as);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:n,href:k(()=>n.value.href),isActive:r,isExactActive:o,navigate:i}}function T2(e){return e.length===1?e[0]:e}const Sa=ae({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:tv,setup(e,{slots:t}){const a=Ka(tv(e)),{options:n}=ct(Eu),l=k(()=>({[nv(e.activeClass,n.linkActiveClass,"router-link-active")]:a.isActive,[nv(e.exactActiveClass,n.linkExactActiveClass,"router-link-exact-active")]:a.isExactActive}));return()=>{const r=t.default&&T2(t.default(a));return e.custom?r:qa("a",{"aria-current":a.isExactActive?e.ariaCurrentValue:null,href:a.href,onClick:a.navigate,class:l.value},r)}}});function M2(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function D2(e,t){for(const a in t){const n=t[a],l=e[a];if(typeof n=="string"){if(n!==l)return!1}else if(!Ya(l)||l.length!==n.length||n.some((r,o)=>r.valueOf()!==l[o].valueOf()))return!1}return!0}function av(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const nv=(e,t,a)=>e??t??a,O2=ae({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:a}){const n=ct($c),l=k(()=>e.route||n.value),r=ct(Um,0),o=k(()=>{let c=s(r);const{matched:d}=l.value;let p;for(;(p=d[c])&&!p.components;)c++;return c}),i=k(()=>l.value.matched[o.value]);yt(Um,k(()=>o.value+1)),yt(wf,i),yt($c,l);const u=E();return Ve(()=>[u.value,i.value,e.name],([c,d,p],[v,m,y])=>{d&&(d.instances[p]=c,m&&m!==d&&c&&c===v&&(d.leaveGuards.size||(d.leaveGuards=m.leaveGuards),d.updateGuards.size||(d.updateGuards=m.updateGuards))),c&&d&&(!m||!lo(d,m)||!v)&&(d.enterCallbacks[p]||[]).forEach(x=>x(c))},{flush:"post"}),()=>{const c=l.value,d=e.name,p=i.value,v=p&&p.components[d];if(!v)return lv(a.default,{Component:v,route:c});const m=p.props[d],y=m?m===!0?c.params:typeof m=="function"?m(c):m:null,C=qa(v,xt({},y,t,{onVnodeUnmounted:w=>{w.component.isUnmounted&&(p.instances[d]=null)},ref:u}));return lv(a.default,{Component:C,route:c})||C}}});function lv(e,t){if(!e)return null;const a=e(t);return a.length===1?a[0]:a}const Ec=O2;function P2(e){const t=$2(e.routes,e),a=e.parseQuery||s2,n=e.stringifyQuery||Gm,l=e.history,r=Do(),o=Do(),i=Do(),u=pr(pl);let c=pl;qr&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const d=hd.bind(null,Z=>""+Z),p=hd.bind(null,Kw),v=hd.bind(null,Bi);function m(Z,ge){let J,ee;return Yy(Z)?(J=t.getRecordMatcher(Z),ee=ge):ee=Z,t.addRoute(ee,J)}function y(Z){const ge=t.getRecordMatcher(Z);ge&&t.removeRoute(ge)}function x(){return t.getRoutes().map(Z=>Z.record)}function C(Z){return!!t.getRecordMatcher(Z)}function w(Z,ge){if(ge=xt({},ge||u.value),typeof Z=="string"){const z=gd(a,Z,ge.path),ce=t.resolve({path:z.path},ge),X=l.createHref(z.fullPath);return xt(z,ce,{params:v(ce.params),redirectedFrom:void 0,href:X})}let J;if(Z.path!=null)J=xt({},Z,{path:gd(a,Z.path,ge.path).path});else{const z=xt({},Z.params);for(const ce in z)z[ce]==null&&delete z[ce];J=xt({},Z,{params:p(z)}),ge.params=p(ge.params)}const ee=t.resolve(J,ge),te=Z.hash||"";ee.params=d(v(ee.params));const $=Yw(n,xt({},Z,{hash:jw(te),path:ee.path})),P=l.createHref($);return xt({fullPath:$,hash:te,query:n===Gm?i2(Z.query):Z.query||{}},ee,{redirectedFrom:void 0,href:P})}function S(Z){return typeof Z=="string"?gd(a,Z,u.value.path):xt({},Z)}function L(Z,ge){if(c!==Z)return no(8,{from:ge,to:Z})}function O(Z){return q(Z)}function M(Z){return O(xt(S(Z),{replace:!0}))}function R(Z,ge){const J=Z.matched[Z.matched.length-1];if(J&&J.redirect){const{redirect:ee}=J;let te=typeof ee=="function"?ee(Z,ge):ee;return typeof te=="string"&&(te=te.includes("?")||te.includes("#")?te=S(te):{path:te},te.params={}),xt({query:Z.query,hash:Z.hash,params:te.path!=null?{}:Z.params},te)}}function q(Z,ge){const J=c=w(Z),ee=u.value,te=Z.state,$=Z.force,P=Z.replace===!0,z=R(J,ee);if(z)return q(xt(S(z),{state:typeof z=="object"?xt({},te,z.state):te,force:$,replace:P}),ge||J);const ce=J;ce.redirectedFrom=ge;let X;return!$&&Jw(n,ee,J)&&(X=no(16,{to:ce,from:ee}),_e(ee,ee,!0,!1)),(X?Promise.resolve(X):I(ce,ee)).catch(oe=>ln(oe)?ln(oe,2)?oe:xe(oe):fe(oe,ce,ee)).then(oe=>{if(oe){if(ln(oe,2))return q(xt({replace:P},S(oe.to),{state:typeof oe.to=="object"?xt({},te,oe.to.state):te,force:$}),ge||ce)}else oe=A(ce,ee,!0,P,te);return W(ce,ee,oe),oe})}function K(Z,ge){const J=L(Z,ge);return J?Promise.reject(J):Promise.resolve()}function T(Z){const ge=F.values().next().value;return ge&&typeof ge.runWithContext=="function"?ge.runWithContext(Z):Z()}function I(Z,ge){let J;const[ee,te,$]=d2(Z,ge);J=yd(ee.reverse(),"beforeRouteLeave",Z,ge);for(const z of ee)z.leaveGuards.forEach(ce=>{J.push(xl(ce,Z,ge))});const P=K.bind(null,Z,ge);return J.push(P),he(J).then(()=>{J=[];for(const z of r.list())J.push(xl(z,Z,ge));return J.push(P),he(J)}).then(()=>{J=yd(te,"beforeRouteUpdate",Z,ge);for(const z of te)z.updateGuards.forEach(ce=>{J.push(xl(ce,Z,ge))});return J.push(P),he(J)}).then(()=>{J=[];for(const z of $)if(z.beforeEnter)if(Ya(z.beforeEnter))for(const ce of z.beforeEnter)J.push(xl(ce,Z,ge));else J.push(xl(z.beforeEnter,Z,ge));return J.push(P),he(J)}).then(()=>(Z.matched.forEach(z=>z.enterCallbacks={}),J=yd($,"beforeRouteEnter",Z,ge,T),J.push(P),he(J))).then(()=>{J=[];for(const z of o.list())J.push(xl(z,Z,ge));return J.push(P),he(J)}).catch(z=>ln(z,8)?z:Promise.reject(z))}function W(Z,ge,J){i.list().forEach(ee=>T(()=>ee(Z,ge,J)))}function A(Z,ge,J,ee,te){const $=L(Z,ge);if($)return $;const P=ge===pl,z=qr?history.state:{};J&&(ee||P?l.replace(Z.fullPath,xt({scroll:P&&z&&z.scroll},te)):l.push(Z.fullPath,te)),u.value=Z,_e(Z,ge,J,P),xe()}let B;function Y(){B||(B=l.listen((Z,ge,J)=>{if(!de.listening)return;const ee=w(Z),te=R(ee,de.currentRoute.value);if(te){q(xt(te,{replace:!0,force:!0}),ee).catch(as);return}c=ee;const $=u.value;qr&&l2(Wm($.fullPath,J.delta),Au()),I(ee,$).catch(P=>ln(P,12)?P:ln(P,2)?(q(xt(S(P.to),{force:!0}),ee).then(z=>{ln(z,20)&&!J.delta&&J.type==="pop"&&l.go(-1,!1)}).catch(as),Promise.reject()):(J.delta&&l.go(-J.delta,!1),fe(P,ee,$))).then(P=>{P=P||A(ee,$,!1),P&&(J.delta&&!ln(P,8)?l.go(-J.delta,!1):J.type==="pop"&&ln(P,20)&&l.go(-1,!1)),W(ee,$,P)}).catch(as)}))}let U=Do(),H=Do(),re;function fe(Z,ge,J){xe(Z);const ee=H.list();return ee.length?ee.forEach(te=>te(Z,ge,J)):console.error(Z),Promise.reject(Z)}function Ae(){return re&&u.value!==pl?Promise.resolve():new Promise((Z,ge)=>{U.add([Z,ge])})}function xe(Z){return re||(re=!Z,Y(),U.list().forEach(([ge,J])=>Z?J(Z):ge()),U.reset()),Z}function _e(Z,ge,J,ee){const{scrollBehavior:te}=e;if(!qr||!te)return Promise.resolve();const $=!J&&r2(Wm(Z.fullPath,0))||(ee||!J)&&history.state&&history.state.scroll||null;return Ge().then(()=>te(Z,ge,$)).then(P=>P&&n2(P)).catch(P=>fe(P,Z,ge))}const le=Z=>l.go(Z);let pe;const F=new Set,de={currentRoute:u,listening:!0,addRoute:m,removeRoute:y,clearRoutes:t.clearRoutes,hasRoute:C,getRoutes:x,resolve:w,options:e,push:O,replace:M,go:le,back:()=>le(-1),forward:()=>le(1),beforeEach:r.add,beforeResolve:o.add,afterEach:i.add,onError:H.add,isReady:Ae,install(Z){Z.component("RouterLink",Sa),Z.component("RouterView",Ec),Z.config.globalProperties.$router=de,Object.defineProperty(Z.config.globalProperties,"$route",{enumerable:!0,get:()=>s(u)}),qr&&!pe&&u.value===pl&&(pe=!0,O(l.location).catch(ee=>{}));const ge={};for(const ee in pl)Object.defineProperty(ge,ee,{get:()=>u.value[ee],enumerable:!0});Z.provide(Eu,de),Z.provide($f,zg(ge)),Z.provide($c,u);const J=Z.unmount;F.add(Z),Z.unmount=function(){F.delete(Z),F.size<1&&(c=pl,B&&B(),B=null,u.value=pl,pe=!1,re=!1),J()}}};function he(Z){return Z.reduce((ge,J)=>ge.then(()=>T(J)),Promise.resolve())}return de}const I2=/^[A-Za-z0-9_-]+$/;function Tu(e){const t=e.split(".");if(t.length!==3||!t.every(r=>I2.test(r)))return null;const[a,n,l]=t;return{vendor:a,plugin:n,controller:l}}function Ja(e){const t=Tu(e);return t?`/${t.vendor}/${t.plugin}/${t.controller}`:null}function Os(e){return`${e.vendor}.${e.plugin}.${e.controller}`}function po(e){const t=e.replace(/^\/+|\/+$/g,"").split("/");if(t.length<3)return null;const a=t.slice(0,3).join(".");return Tu(a)?a:null}function rv(e){const t=Tu(e);return t?`${t.vendor}.${t.plugin}`:null}const R2=/\{[^{}]+\}/g,q2=()=>typeof process=="object"&&Number.parseInt(process?.versions?.node?.substring(0,2))>=18&&process.versions.undici;function L2(){return Math.random().toString(36).slice(2,11)}function N2(e){let{baseUrl:t="",Request:a=globalThis.Request,fetch:n=globalThis.fetch,querySerializer:l,bodySerializer:r,pathSerializer:o,headers:i,requestInitExt:u=void 0,...c}={...e};u=q2()?u:void 0,t=iv(t);const d=[];async function p(v,m){const{baseUrl:y,fetch:x=n,Request:C=a,headers:w,params:S={},parseAs:L="json",querySerializer:O,bodySerializer:M=r??F2,pathSerializer:R,body:q,middleware:K=[],...T}=m||{};let I=t;y&&(I=iv(y)??t);let W=typeof l=="function"?l:ov(l);O&&(W=typeof O=="function"?O:ov({...typeof l=="object"?l:{},...O}));const A=R||o||B2,B=q===void 0?void 0:M(q,sv(i,w,S.header)),Y=sv(B===void 0||B instanceof FormData?{}:{"Content-Type":"application/json"},i,w,S.header),U=[...d,...K],H={redirect:"follow",...c,...T,body:B,headers:Y};let re,fe,Ae=new C(V2(v,{baseUrl:I,params:S,querySerializer:W,pathSerializer:A}),H),xe;for(const pe in T)pe in Ae||(Ae[pe]=T[pe]);if(U.length){re=L2(),fe=Object.freeze({baseUrl:I,fetch:x,parseAs:L,querySerializer:W,bodySerializer:M,pathSerializer:A});for(const pe of U)if(pe&&typeof pe=="object"&&typeof pe.onRequest=="function"){const F=await pe.onRequest({request:Ae,schemaPath:v,params:S,options:fe,id:re});if(F)if(F instanceof C)Ae=F;else if(F instanceof Response){xe=F;break}else throw new Error("onRequest: must return new Request() or Response() when modifying the request")}}if(!xe){try{xe=await x(Ae,u)}catch(pe){let F=pe;if(U.length)for(let de=U.length-1;de>=0;de--){const he=U[de];if(he&&typeof he=="object"&&typeof he.onError=="function"){const Z=await he.onError({request:Ae,error:F,schemaPath:v,params:S,options:fe,id:re});if(Z){if(Z instanceof Response){F=void 0,xe=Z;break}if(Z instanceof Error){F=Z;continue}throw new Error("onError: must return new Response() or instance of Error")}}}if(F)throw F}if(U.length)for(let pe=U.length-1;pe>=0;pe--){const F=U[pe];if(F&&typeof F=="object"&&typeof F.onResponse=="function"){const de=await F.onResponse({request:Ae,response:xe,schemaPath:v,params:S,options:fe,id:re});if(de){if(!(de instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");xe=de}}}}const _e=xe.headers.get("Content-Length");if(xe.status===204||Ae.method==="HEAD"||_e==="0"&&!xe.headers.get("Transfer-Encoding")?.includes("chunked"))return xe.ok?{data:void 0,response:xe}:{error:void 0,response:xe};if(xe.ok)return{data:await(async()=>{if(L==="stream")return xe.body;if(L==="json"&&!_e){const F=await xe.text();return F?JSON.parse(F):void 0}return await xe[L]()})(),response:xe};let le=await xe.text();try{le=JSON.parse(le)}catch{}return{error:le,response:xe}}return{request(v,m,y){return p(m,{...y,method:v.toUpperCase()})},GET(v,m){return p(v,{...m,method:"GET"})},PUT(v,m){return p(v,{...m,method:"PUT"})},POST(v,m){return p(v,{...m,method:"POST"})},DELETE(v,m){return p(v,{...m,method:"DELETE"})},OPTIONS(v,m){return p(v,{...m,method:"OPTIONS"})},HEAD(v,m){return p(v,{...m,method:"HEAD"})},PATCH(v,m){return p(v,{...m,method:"PATCH"})},TRACE(v,m){return p(v,{...m,method:"TRACE"})},use(...v){for(const m of v)if(m){if(typeof m!="object"||!("onRequest"in m||"onResponse"in m||"onError"in m))throw new Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");d.push(m)}},eject(...v){for(const m of v){const y=d.indexOf(m);y!==-1&&d.splice(y,1)}}}}function Mu(e,t,a){if(t==null)return"";if(typeof t=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${a?.allowReserved===!0?t:encodeURIComponent(t)}`}function tb(e,t,a){if(!t||typeof t!="object")return"";const n=[],l={simple:",",label:".",matrix:";"}[a.style]||"&";if(a.style!=="deepObject"&&a.explode===!1){for(const i in t)n.push(i,a.allowReserved===!0?t[i]:encodeURIComponent(t[i]));const o=n.join(",");switch(a.style){case"form":return`${e}=${o}`;case"label":return`.${o}`;case"matrix":return`;${e}=${o}`;default:return o}}for(const o in t){const i=a.style==="deepObject"?`${e}[${o}]`:o;n.push(Mu(i,t[o],a))}const r=n.join(l);return a.style==="label"||a.style==="matrix"?`${l}${r}`:r}function ab(e,t,a){if(!Array.isArray(t))return"";if(a.explode===!1){const r={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[a.style]||",",o=(a.allowReserved===!0?t:t.map(i=>encodeURIComponent(i))).join(r);switch(a.style){case"simple":return o;case"label":return`.${o}`;case"matrix":return`;${e}=${o}`;default:return`${e}=${o}`}}const n={simple:",",label:".",matrix:";"}[a.style]||"&",l=[];for(const r of t)a.style==="simple"||a.style==="label"?l.push(a.allowReserved===!0?r:encodeURIComponent(r)):l.push(Mu(e,r,a));return a.style==="label"||a.style==="matrix"?`${n}${l.join(n)}`:l.join(n)}function ov(e){return function(a){const n=[];if(a&&typeof a=="object")for(const l in a){const r=a[l];if(r!=null){if(Array.isArray(r)){if(r.length===0)continue;n.push(ab(l,r,{style:"form",explode:!0,...e?.array,allowReserved:e?.allowReserved||!1}));continue}if(typeof r=="object"){n.push(tb(l,r,{style:"deepObject",explode:!0,...e?.object,allowReserved:e?.allowReserved||!1}));continue}n.push(Mu(l,r,e))}}return n.join("&")}}function B2(e,t){let a=e;for(const n of e.match(R2)??[]){let l=n.substring(1,n.length-1),r=!1,o="simple";if(l.endsWith("*")&&(r=!0,l=l.substring(0,l.length-1)),l.startsWith(".")?(o="label",l=l.substring(1)):l.startsWith(";")&&(o="matrix",l=l.substring(1)),!t||t[l]===void 0||t[l]===null)continue;const i=t[l];if(Array.isArray(i)){a=a.replace(n,ab(l,i,{style:o,explode:r}));continue}if(typeof i=="object"){a=a.replace(n,tb(l,i,{style:o,explode:r}));continue}if(o==="matrix"){a=a.replace(n,`;${Mu(l,i)}`);continue}a=a.replace(n,o==="label"?`.${encodeURIComponent(i)}`:encodeURIComponent(i))}return a}function F2(e,t){return e instanceof FormData?e:t&&(t.get instanceof Function?t.get("Content-Type")??t.get("content-type"):t["Content-Type"]??t["content-type"])==="application/x-www-form-urlencoded"?new URLSearchParams(e).toString():JSON.stringify(e)}function V2(e,t){let a=`${t.baseUrl}${e}`;t.params?.path&&(a=t.pathSerializer(a,t.params.path));let n=t.querySerializer(t.params.query??{});return n.startsWith("?")&&(n=n.substring(1)),n&&(a+=`?${n}`),a}function sv(...e){const t=new Headers;for(const a of e){if(!a||typeof a!="object")continue;const n=a instanceof Headers?a.entries():Object.entries(a);for(const[l,r]of n)if(r===null)t.delete(l);else if(Array.isArray(r))for(const o of r)t.append(l,o);else r!==void 0&&t.set(l,r)}return t}function iv(e){return e.endsWith("/")?e.substring(0,e.length-1):e}const uv="/backend",z2="__SUMMER_ADMIN_BASE__",j2="__SUMMER_ADMIN_BUILD__",U2=/^[0-9a-f]{6,64}$/;function H2(e=document){const t=e.querySelector('meta[name="summer-admin-base"]')?.content.trim()??"";if(t===""||t===z2||!t.startsWith("/"))return uv;const a=t.replace(/\/+$/,"");return a===""?uv:a}function K2(e=document){const t=e.querySelector('meta[name="summer-admin-build"]')?.content.trim()??"";return t===j2||!U2.test(t)?"":t}const dv=H2(),mr={base:dv,api:`${dv}/api/v1`,build:K2()},nb="XMLHttpRequest";let Fi=null,lb=null,Oo=null;const bd=new WeakMap;function W2(e){Fi=e}function G2(){Fi?.()}function Y2(e){lb=e}function J2(e){return new URL(e.url,"http://local").pathname}function cv(e){const t=J2(e);return t.endsWith("/auth/login")||t.endsWith("/auth/refresh")}function Sf(){return Oo||(Oo=(async()=>{try{const{data:e,response:t}=await Le.POST("/auth/refresh");if(!t.ok||!e)return!1;const a=e.data.expires_in;return lb?.(typeof a=="number"?a:null),!0}catch{return!1}finally{Oo=null}})(),Oo)}const Z2={onRequest({request:e}){return e.headers.set("X-Requested-With",nb),cv(e)||bd.set(e,e.clone()),e},async onResponse({request:e,response:t}){if(t.status!==401||cv(e))return t;const a=bd.get(e);if(bd.delete(e),!a||!await Sf())return Fi?.(),t;const n=await globalThis.fetch(a);return n.status===401&&Fi?.(),n}},Le=N2({baseUrl:mr.api,credentials:"same-origin",fetch:e=>globalThis.fetch(e)});Le.use(Z2);const Ef=E({}),Af=E(typeof document>"u"?"pl":document.documentElement.lang||"pl"),Na=At(Af),rb=E([]),X2=At(rb);function Q2(e,t){Ef.value=e,t&&(Af.value=t,typeof document<"u"&&(document.documentElement.lang=t))}async function ob(e){const{data:t,response:a}=await Le.GET("/lang",e?{params:{query:{locale:e}}}:{});!a.ok||!t||(rb.value=Array.isArray(t.meta.locales)?[...t.meta.locales]:[],Q2(t.data,t.meta.locale))}function fv(e){const t=e.codePointAt(0);if(t===void 0)return e;const a=String.fromCodePoint(t);return a.toUpperCase()+e.slice(a.length)}function Vi(e,t={}){if(e==="")return e;const a=[];for(const[l,r]of Object.entries(t)){const o=l.replace(/^:/,"");if(o==="")continue;const i=String(r);a.push([`:${fv(o)}`,fv(i)]),a.push([`:${o.toUpperCase()}`,i.toUpperCase()]),a.push([`:${o}`,i])}a.sort((l,r)=>r[0].length-l[0].length);let n=e;for(const[l,r]of a)n=n.split(l).join(r);return n}const pv=new Map;function e$(e,t=Af.value){let a=pv.get(t);if(a===void 0){try{a=new Intl.PluralRules(t)}catch{a=null}pv.set(t,a)}return a?a.select(e):"other"}function at(e,t,a={}){if(!e)return"";if(t===void 0)return Vi(e.other??"",a);const n=e[e$(t)]??e.other??"";return Vi(n,{count:t,...a})}function h(e,t={}){const a=Ef.value[e]?.other;return a===void 0?e:Vi(a,t)}function wa(e,t,a={}){const n=Ef.value[e];return n?at(n,t,a):e}const Tf=E(""),Ko=At(Tf);function Mf(e){Tf.value=e}function Df(){Tf.value=""}const zi=E([]);async function sb(){const{data:e,response:t}=await Le.GET("/navigation");return zi.value=t.ok&&e?e.data:[],zi.value}function t$(e){zi.value=e}const ji=k(()=>zi.value.filter(e=>e.sideMenu.length>0).map((e,t)=>({entry:e,index:t})).sort((e,t)=>e.entry.order-t.entry.order||e.index-t.index).map(({entry:e})=>e));function Of(e){for(const t of e.sideMenu){const a=Ja(t.controller);if(a)return a}return Ja(e.controller)}function Ps(e,t){const a=`${e}.${t}`;return ji.value.find(n=>rv(n.controller)===a||n.sideMenu.some(l=>rv(l.controller)===a))??null}function a$(){for(const e of ji.value){const t=Of(e);if(t)return t}return null}const Ml=E([]),n$=k(()=>Ml.value.length>0);async function ib(){const{data:e,response:t}=await Le.GET("/settings");return Ml.value=t.ok&&e?e.data:[],Ml.value}function l$(e){Ml.value=e}function gs(e){return Ml.value.find(t=>t.code===e)??null}function Pf(e){return e.path?e.path:e.controller?Ja(e.controller)??"/settings":`/settings/${encodeURIComponent(e.code)}`}function Du(e){return e?Ml.value.find(t=>t.controller!==""&&t.controller===e)??null:null}function ub(e){return Ml.value.find(t=>!!t.path&&t.path===e)??null}const Ac=k(()=>{const e=Ml.value.map((a,n)=>({entry:a,index:n})).sort((a,n)=>a.entry.order-n.entry.order||a.index-n.index).map(({entry:a})=>a),t=[];for(const a of e){let n=t.find(l=>l.category===a.category);n||(n={category:a.category,entries:[]},t.push(n)),n.entries.push(a)}return t});function _d(e){if(!e)return null;const t=Ac.value.find(a=>a.category===e.category);return!t||t.entries.length<2?null:{category:t.category,current:e,entries:t.entries}}const mv="SummerCMS";function r$(e){if(e.name==="login")return h("backend::lang.auth.title");if(e.name==="settings")return h("backend::lang.settings.title");if(e.name==="account")return h("backend::lang.myaccount.menu_label");if(e.name==="plugins")return h("backend::lang.plugins.title");if(e.name==="media")return h("backend::lang.media.title");if(e.name==="connect")return h("backend::lang.mcp_connect.page_title");if(e.name==="settings-form")return gs(String(e.params.code??""))?.label??String(e.params.code??"");if(e.name==="home")return h("backend::lang.nav.empty");if(e.name==="not-found")return h("backend::lang.page.not_found");const t=Ps(String(e.params.vendor??""),String(e.params.plugin??"")),a=po(e.path),l=t?.sideMenu.find(r=>r.controller===a)?.label??t?.label??Du(a)?.label??"";return(e.name==="create"||e.name==="record"||e.name==="preview")&&Ko.value||l}function o$(e){const t=r$(e).trim();return t===""?mv:`${t} | ${mv}`}const vv=e=>e==="";const s$=(...e)=>e.filter((t,a,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===a).join(" ").trim();const hv=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const i$=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,a,n)=>n?n.toUpperCase():a.toLowerCase());const u$=e=>{const t=i$(e);return t.charAt(0).toUpperCase()+t.slice(1)};var Ar={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};const d$=Symbol("lucide-icons");function c$(){return ct(d$,{})}const f$=({name:e,iconNode:t,absoluteStrokeWidth:a,"absolute-stroke-width":n,strokeWidth:l,"stroke-width":r,size:o,color:i,...u},{slots:c})=>{const{size:d,color:p,strokeWidth:v=2,absoluteStrokeWidth:m=!1,class:y=""}=c$(),x=k(()=>{const C=vv(a)||vv(n)||a===!0||n===!0||m===!0,w=l||r||v||Ar["stroke-width"];return C?Number(w)*24/Number(o??d??Ar.width):w});return qa("svg",{...Ar,...u,width:o??d??Ar.width,height:o??d??Ar.height,stroke:i??p??Ar.stroke,"stroke-width":x.value,class:s$("lucide",y,...e?[`lucide-${hv(u$(e))}-icon`,`lucide-${hv(e)}`]:["lucide-icon"])},[...t.map(C=>qa(...C)),...c.default?[c.default()]:[]])};const we=(e,t)=>(a,{slots:n,attrs:l})=>qa(f$,{...l,...a,iconNode:t,name:e},n.default?{default:n.default}:void 0);const p$=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],m$=we("archive",p$);const v$=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],db=we("arrow-down",v$);const h$=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],mo=we("arrow-left",h$);const g$=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],y$=we("arrow-right",g$);const b$=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],cb=we("arrow-up-down",b$);const _$=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],fb=we("arrow-up-right",_$);const x$=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],pb=we("arrow-up",x$);const k$=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]],mb=we("ban",k$);const w$=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],$$=we("bell",w$);const C$=[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]],S$=we("bold",C$);const E$=[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]],A$=we("book",E$);const T$=[["path",{d:"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",key:"oz39mx"}]],M$=we("bookmark",T$);const D$=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],gv=we("bot",D$);const O$=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],P$=we("box",O$);const I$=[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],R$=we("briefcase",I$);const q$=[["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M9 22v-3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3",key:"cabbwy"}],["rect",{x:"4",y:"2",width:"16",height:"20",rx:"2",key:"1uxh74"}]],L$=we("building",q$);const N$=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],vb=we("calendar",N$);const B$=[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],F$=we("camera",B$);const V$=[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["circle",{cx:"8",cy:"10",r:"2",key:"1xl4ub"}],["path",{d:"M8 12h8",key:"1wcyev"}],["circle",{cx:"16",cy:"10",r:"2",key:"r14t7q"}],["path",{d:"m6 20 .7-2.9A1.4 1.4 0 0 1 8.1 16h7.8a1.4 1.4 0 0 1 1.4 1l.7 3",key:"l01ucn"}]],z$=we("cassette-tape",V$);const j$=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M7 16h8",key:"srdodz"}],["path",{d:"M7 11h12",key:"127s9w"}],["path",{d:"M7 6h3",key:"w9rmul"}]],U$=we("chart-bar",j$);const H$=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ba=we("check",H$);const K$=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Gn=we("chevron-down",K$);const W$=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Is=we("chevron-left",W$);const G$=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],vr=we("chevron-right",G$);const Y$=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],hb=we("chevron-up",Y$);const J$=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],bt=we("circle-alert",J$);const Z$=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]],X$=we("circle-arrow-up",Z$);const Q$=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],eC=we("circle-check",Q$);const tC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aC=we("circle-question-mark",tC);const nC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],lC=we("circle",nC);const rC=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],oC=we("clipboard-list",rC);const sC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],Ui=we("clock",sC);const iC=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],uC=we("cloud",iC);const dC=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],gb=we("code",dC);const cC=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],ro=we("copy",cC);const fC=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],pC=we("credit-card",fC);const mC=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],vC=we("database",mC);const hC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M6 12c0-1.7.7-3.2 1.8-4.2",key:"oqkarx"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M18 12c0 1.7-.7 3.2-1.8 4.2",key:"1eah9h"}]],gC=we("disc-3",hC);const yC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],bC=we("disc",yC);const _C=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Tc=we("download",_C);const xC=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],yb=we("external-link",xC);const kC=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],wC=we("eye-off",kC);const $C=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],CC=we("eye",$C);const SC=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Ia=we("file-text",SC);const EC=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],AC=we("file",EC);const TC=[["path",{d:"M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8",key:"14sh0y"}],["path",{d:"M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z",key:"1970lx"}],["path",{d:"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1",key:"l4dndm"}]],MC=we("files",TC);const DC=[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]],OC=we("flag",DC);const PC=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],IC=we("folder-open",PC);const RC=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],yv=we("folder-plus",RC);const qC=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],bb=we("folder",qC);const LC=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],NC=we("funnel",LC);const BC=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],FC=we("gauge",BC);const VC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],zC=we("globe",VC);const jC=[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]],UC=we("graduation-cap",jC);const HC=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],Hi=we("grip-vertical",HC);const KC=[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2",key:"68ncm8"}],["path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2",key:"1ejuhz"}]],WC=we("heading-3",KC);const GC=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],YC=we("heart",GC);const JC=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],ZC=we("house",JC);const XC=[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]],bv=we("image-off",XC);const QC=[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]],_b=we("image-plus",QC);const e3=[["path",{d:"M10.3 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10l-3.1-3.1a2 2 0 0 0-2.814.014L6 21",key:"9csbqa"}],["path",{d:"m14 19.5 3-3 3 3",key:"9vmjn0"}],["path",{d:"M17 22v-5.5",key:"1aa6fl"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]],t3=we("image-up",e3);const a3=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],If=we("image",a3);const n3=[["path",{d:"m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16",key:"9kzy35"}],["path",{d:"M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2",key:"1t0f0t"}],["circle",{cx:"13",cy:"7",r:"1",fill:"currentColor",key:"1obus6"}],["rect",{x:"8",y:"2",width:"14",height:"14",rx:"2",key:"1gvhby"}]],xb=we("images",n3);const l3=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],kb=we("inbox",l3);const r3=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Vl=we("info",r3);const o3=[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]],s3=we("italic",o3);const i3=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],u3=we("key-round",i3);const d3=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],c3=we("key",d3);const f3=[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]],p3=we("languages",f3);const m3=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],wb=we("layout-grid",m3);const v3=[["path",{d:"M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z",key:"nnexq3"}],["path",{d:"M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12",key:"mt58a7"}]],h3=we("leaf",v3);const g3=[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]],y3=we("library",g3);const b3=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.93 4.93 4.24 4.24",key:"1ymg45"}],["path",{d:"m14.83 9.17 4.24-4.24",key:"1cb5xl"}],["path",{d:"m14.83 14.83 4.24 4.24",key:"q42g0n"}],["path",{d:"m9.17 14.83-4.24 4.24",key:"bqpfvv"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]],_3=we("life-buoy",b3);const x3=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],$b=we("link",x3);const k3=[["path",{d:"M21 5H11",key:"us1j55"}],["path",{d:"M21 12H11",key:"wd7e0v"}],["path",{d:"M21 19H11",key:"saa85w"}],["path",{d:"m7 8-4 4 4 4",key:"o5hrat"}]],w3=we("list-indent-decrease",k3);const $3=[["path",{d:"M21 5H11",key:"us1j55"}],["path",{d:"M21 12H11",key:"wd7e0v"}],["path",{d:"M21 19H11",key:"saa85w"}],["path",{d:"m3 8 4 4-4 4",key:"1a3j6y"}]],C3=we("list-indent-increase",$3);const S3=[["path",{d:"M11 5h10",key:"1cz7ny"}],["path",{d:"M11 12h10",key:"1438ji"}],["path",{d:"M11 19h10",key:"11t30w"}],["path",{d:"M4 4h1v5",key:"10yrso"}],["path",{d:"M4 9h2",key:"r1h2o0"}],["path",{d:"M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",key:"xtkcd5"}]],Cb=we("list-ordered",S3);const E3=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],Rf=we("list",E3);const A3=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Vn=we("loader-circle",A3);const T3=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],cn=we("lock",T3);const M3=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],Sb=we("log-out",M3);const D3=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],O3=we("mail",D3);const P3=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],I3=we("map-pin",P3);const R3=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],q3=we("message-circle",R3);const L3=[["path",{d:"m11 7.601-5.994 8.19a1 1 0 0 0 .1 1.298l.817.818a1 1 0 0 0 1.314.087L15.09 12",key:"80a601"}],["path",{d:"M16.5 21.174C15.5 20.5 14.372 20 13 20c-2.058 0-3.928 2.356-6 2-2.072-.356-2.775-3.369-1.5-4.5",key:"j0ngtp"}],["circle",{cx:"16",cy:"7",r:"5",key:"d08jfb"}]],N3=we("mic-vocal",L3);const B3=[["path",{d:"M5 12h14",key:"1ays0h"}]],Eb=we("minus",B3);const F3=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],V3=we("moon",F3);const z3=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],j3=we("network",z3);const U3=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],H3=we("palette",U3);const K3=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],qf=we("panel-left-close",K3);const W3=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],Ab=we("panel-left-open",W3);const G3=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],Y3=we("paperclip",G3);const J3=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],Z3=we("pause",J3);const X3=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Wr=we("pencil",X3);const Q3=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],eS=we("phone",Q3);const tS=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],aS=we("play",tS);const nS=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],vo=we("plus",nS);const lS=[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]],Tb=we("puzzle",lS);const rS=[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]],oS=we("quote",rS);const sS=[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]],iS=we("redo-2",sS);const uS=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],dS=we("refresh-cw",uS);const cS=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],ki=we("rotate-ccw",cS);const fS=[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Mb=we("search-x",fS);const pS=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],hr=we("search",pS);const mS=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],vS=we("send",mS);const hS=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Db=we("settings",hS);const gS=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],yS=we("shield-check",gS);const bS=[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]],_S=we("shopping-cart",bS);const xS=[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]],Ob=we("sliders-horizontal",xS);const kS=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],Pb=we("star",kS);const wS=[["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M14.837 16.385a6 6 0 1 1-7.223-7.222c.624-.147.97.66.715 1.248a4 4 0 0 0 5.26 5.259c.589-.255 1.396.09 1.248.715",key:"xlf6rm"}],["path",{d:"M16 12a4 4 0 0 0-4-4",key:"6vsxu"}],["path",{d:"m19 5-1.256 1.256",key:"1yg6a6"}],["path",{d:"M20 12h2",key:"1q8mjw"}]],$S=we("sun-moon",wS);const CS=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],Rs=we("sun",CS);const SS=[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]],ES=we("table",SS);const AS=[["path",{d:"M13.172 2a2 2 0 0 1 1.414.586l6.71 6.71a2.4 2.4 0 0 1 0 3.408l-4.592 4.592a2.4 2.4 0 0 1-3.408 0l-6.71-6.71A2 2 0 0 1 6 9.172V3a1 1 0 0 1 1-1z",key:"16rjxf"}],["path",{d:"M2 7v6.172a2 2 0 0 0 .586 1.414l6.71 6.71a2.4 2.4 0 0 0 3.191.193",key:"178nd4"}],["circle",{cx:"10.5",cy:"6.5",r:".5",fill:"currentColor",key:"12ikhr"}]],TS=we("tags",AS);const MS=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Xa=we("trash-2",MS);const DS=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Ki=we("triangle-alert",DS);const OS=[["path",{d:"M10 14.66v1.626a2 2 0 0 1-.976 1.696A5 5 0 0 0 7 21.978",key:"1n3hpd"}],["path",{d:"M14 14.66v1.626a2 2 0 0 0 .976 1.696A5 5 0 0 1 17 21.978",key:"rfe1zi"}],["path",{d:"M18 9h1.5a1 1 0 0 0 0-5H18",key:"7xy6bh"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z",key:"1mhfuq"}],["path",{d:"M6 9H4.5a1 1 0 0 1 0-5H6",key:"tex48p"}]],PS=we("trophy",OS);const IS=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],RS=we("underline",IS);const qS=[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]],Ib=we("undo-2",qS);const LS=[["path",{d:"m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71",key:"yqzxt4"}],["path",{d:"m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71",key:"4qinb0"}],["line",{x1:"8",x2:"8",y1:"2",y2:"5",key:"1041cp"}],["line",{x1:"2",x2:"5",y1:"8",y2:"8",key:"14m1p5"}],["line",{x1:"16",x2:"16",y1:"19",y2:"22",key:"rzdirn"}],["line",{x1:"19",x2:"22",y1:"16",y2:"16",key:"ox905f"}]],NS=we("unlink",LS);const BS=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],ns=we("upload",BS);const FS=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],Rb=we("user-minus",FS);const VS=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],qb=we("user-plus",VS);const zS=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],jS=we("user-round",zS);const US=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],HS=we("user",US);const KS=[["path",{d:"M18 21a8 8 0 0 0-16 0",key:"3ypg7q"}],["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}],["path",{d:"M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3",key:"10s06x"}]],WS=we("users-round",KS);const GS=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],YS=we("users",GS);const JS=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],ZS=we("wand-sparkles",JS);const XS=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],QS=we("wrench",XS);const e4=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],qt=we("x",e4),_v={archive:m$,"arrow-down":db,"arrow-left":mo,"arrow-right":y$,"arrow-up":pb,"arrow-up-right":fb,bell:$$,book:A$,bookmark:M$,box:P$,briefcase:R$,building:L$,calendar:vb,camera:F$,"cassette-tape":z$,"chart-bar":U$,check:Ba,"chevron-down":Gn,"chevron-left":Is,"chevron-right":vr,circle:lC,"circle-alert":bt,"circle-check":eC,"circle-question-mark":aC,"clipboard-list":oC,clock:Ui,cloud:uC,code:gb,copy:ro,"credit-card":pC,database:vC,disc:bC,"disc-3":gC,download:Tc,"external-link":yb,file:AC,"file-text":Ia,files:MC,flag:OC,folder:bb,funnel:NC,gauge:FC,globe:zC,"graduation-cap":UC,heart:YC,house:ZC,image:If,inbox:kb,info:Vl,key:c3,languages:p3,"layout-grid":wb,leaf:h3,library:y3,"life-buoy":_3,link:$b,list:Rf,"list-ordered":Cb,lock:cn,"log-out":Sb,mail:O3,"map-pin":I3,"message-circle":q3,"mic-vocal":N3,minus:Eb,network:j3,palette:H3,"panel-left-close":qf,"panel-left-open":Ab,paperclip:Y3,pause:Z3,pencil:Wr,phone:eS,play:aS,plus:vo,puzzle:Tb,"refresh-cw":dS,search:hr,"search-x":Mb,settings:Db,"shield-check":yS,"shopping-cart":_S,star:Pb,sun:Rs,table:ES,tags:TS,"trash-2":Xa,"triangle-alert":Ki,trophy:PS,upload:ns,user:HS,"user-minus":Rb,"user-plus":qb,users:YS,"users-round":WS,"wand-sparkles":ZS,wrench:QS,x:qt},t4={"icon-archive":"archive","icon-bar-chart":"chart-bar","icon-bell":"bell","icon-book":"book","icon-bookmark":"bookmark","icon-briefcase":"briefcase","icon-building":"building","icon-calendar":"calendar","icon-camera":"camera","icon-check":"check","icon-check-circle":"circle-check","icon-circle":"circle","icon-clock":"clock","icon-clock-o":"clock","icon-cloud":"cloud","icon-code":"code","icon-cog":"settings","icon-cogs":"settings","icon-comment":"message-circle","icon-comments":"message-circle","icon-comments-o":"message-circle","icon-copy":"copy","icon-credit-card":"credit-card","icon-cube":"box","icon-dashboard":"gauge","icon-database":"database","icon-download":"download","icon-edit":"pencil","icon-envelope":"mail","icon-envelope-o":"mail","icon-exclamation-triangle":"triangle-alert","icon-external-link":"external-link","icon-file":"file","icon-file-o":"file","icon-file-text":"file-text","icon-file-text-o":"file-text","icon-files-o":"files","icon-filter":"funnel","icon-flag":"flag","icon-folder":"folder","icon-folder-o":"folder","icon-globe":"globe","icon-graduation-cap":"graduation-cap","icon-group":"users","icon-heart":"heart","icon-home":"house","icon-inbox":"inbox","icon-info-circle":"info","icon-key":"key","icon-language":"languages","icon-leaf":"leaf","icon-life-ring":"life-buoy","icon-link":"link","icon-list":"list","icon-list-alt":"clipboard-list","icon-list-ol":"list-ordered","icon-list-ul":"list","icon-lock":"lock","icon-magic":"wand-sparkles","icon-map-marker":"map-pin","icon-minus":"minus","icon-paperclip":"paperclip","icon-pause":"pause","icon-pencil":"pencil","icon-phone":"phone","icon-photo":"image","icon-picture-o":"image","icon-play":"play","icon-plus":"plus","icon-question":"circle-question-mark","icon-question-circle":"circle-question-mark","icon-refresh":"refresh-cw","icon-search":"search","icon-shopping-cart":"shopping-cart","icon-sign-out":"log-out","icon-sitemap":"network","icon-star":"star","icon-table":"table","icon-tachometer":"gauge","icon-tags":"tags","icon-th":"layout-grid","icon-th-large":"layout-grid","icon-times":"x","icon-trash":"trash-2","icon-trash-o":"trash-2","icon-trophy":"trophy","icon-upload":"upload","icon-user":"user","icon-users":"users","icon-warning":"triangle-alert","icon-wrench":"wrench"},xv=Rs;function xd(e,t){return Object.hasOwn(e,t)?e[t]:void 0}function qs(e){if(!e)return xv;const t=e.trim();return xd(_v,t)??xd(_v,xd(t4,t)??"")??xv}const Wi=E(!1),Mc=E(!1),a4=At(Wi);async function Lb(){const{data:e,response:t}=await Le.GET("/media/items",{params:{query:{per_page:1}}});return t.ok&&e?(Wi.value=!0,Mc.value=e.meta.can_manage===!0,!0):(Wi.value=!1,Mc.value=!1,!1)}function n4(e){Wi.value=e.canView,Mc.value=e.canManage===!0}const l4="(prefers-color-scheme: dark)",wi=["system","light","dark"];function Nb(e){return typeof e=="string"&&wi.includes(e)}function r4(e=window,t="system"){const a=e.document.documentElement;if(t!=="system")return a.classList.toggle("dark",t==="dark"),()=>{};if(typeof e.matchMedia!="function")return a.classList.remove("dark"),()=>{};const n=e.matchMedia(l4),l=o=>{a.classList.toggle("dark",o)};l(n.matches);const r=o=>l(o.matches);return n.addEventListener("change",r),()=>n.removeEventListener("change",r)}const o4=4e3,ys=E([]),Dc=new Map;let s4=1;const i4=At(ys);function De(e,t="success"){const a=s4++;return ys.value=[{id:a,text:e,tone:t},...ys.value],Dc.set(a,setTimeout(()=>Bb(a),o4)),a}function Bb(e){const t=Dc.get(e);t!==void 0&&(clearTimeout(t),Dc.delete(e)),ys.value=ys.value.filter(a=>a.id!==e)}const Fb="summer-admin.theme",Lf="summer-admin.locale",u4=/^[A-Za-z]{2,8}(?:[-_][A-Za-z0-9]{1,8})?$/,oo=E("system");let kv=()=>{};const wv=At(oo),Gi=E(""),d4=At(Gi);function Yi(){try{return typeof window>"u"?null:window.localStorage}catch{return null}}function Nf(e,t){try{t===null?Yi()?.removeItem(e):Yi()?.setItem(e,t)}catch{}}function Oc(e){Nf(Fb,e==="system"?null:e)}function c4(){try{const e=Yi()?.getItem(Fb);return Nb(e)?e:"system"}catch{return"system"}}function f4(){try{const e=Yi()?.getItem(Lf)??"";return e.length<=16&&u4.test(e)?e:""}catch{return""}}const Vb={reload(){window.location.reload()}};function Ji(e){kv(),oo.value=e,kv=typeof window>"u"?()=>{}:r4(window,e)}function p4(e){const t=wi.indexOf(e);return wi[(t+1)%wi.length]??"system"}async function m4(e){const t=oo.value;Ji(e),Oc(e);let a=!1;try{const{response:n}=await Le.PUT("/account/preferences",{body:{theme:e}});a=n.ok}catch{a=!1}a||(oo.value===e&&(Ji(t),Oc(t)),De(h("backend::lang.myaccount.preferences_failed"),"danger"))}function $v(){return m4(p4(oo.value))}async function v4(e){const t=e?.preferences;t&&(Nb(t.theme)&&(t.theme!==oo.value&&Ji(t.theme),Oc(t.theme)),typeof t.locale=="string"&&(Gi.value=t.locale,t.locale!==""&&t.locale!==Na.value&&await ob(t.locale).catch(()=>{}),Nf(Lf,t.locale===""?null:t.locale)))}async function h4(e){if(e===Gi.value)return;let t=!1;try{const{response:a}=await Le.PUT("/account/preferences",{body:{locale:e}});t=a.ok}catch{t=!1}if(!t){De(h("backend::lang.myaccount.preferences_failed"),"danger");return}Gi.value=e,Nf(Lf,e===""?null:e),Vb.reload()}const zb="summer-admin.sidebar",g4="(max-width: 1099px)",Ou=E(!1),ls=E(!1),y4=k(()=>ls.value||Ou.value);function jb(){try{return typeof window>"u"?null:window.localStorage}catch{return null}}function b4(){try{return jb()?.getItem(zb)==="true"}catch{return!1}}function Bf(e){Ou.value=e;try{jb()?.setItem(zb,e?"true":"false")}catch{}}function _4(){if(Ou.value=b4(),typeof window>"u"||typeof window.matchMedia!="function")return ls.value=!1,()=>{};const e=window.matchMedia(g4);ls.value=e.matches;const t=a=>{ls.value=a.matches};return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}function Ub(){return{collapsed:y4,narrow:At(ls),manual:At(Ou),setCollapsed:Bf,watchViewport:_4}}const x4=["id","aria-label"],k4={class:"px-2.5 pt-1 pb-2 text-[14px] font-bold","aria-hidden":"true"},w4=ae({__name:"SectionFlyout",props:{entry:{},id:{}},emits:["escape","leave","navigate"],setup(e,{expose:t,emit:a}){const n=e,l=a,r=ga(),o=E(null),i=k(()=>po(r.path)),u=k(()=>n.entry.sideMenu.flatMap(m=>{const y=Ja(m.controller);return y?[{item:m,to:y,icon:qs(m.icon),current:i.value===m.controller}]:[]}));function c(){return[...o.value?.querySelectorAll('[role="menuitem"]')??[]]}async function d(){await Ge(),c()[0]?.focus()}function p(m){return!!m&&!!o.value?.contains(m)}function v(m){const y=c(),x=y.indexOf(document.activeElement);switch(m.key){case"ArrowDown":m.preventDefault(),y[(x+1)%y.length]?.focus();break;case"ArrowUp":m.preventDefault(),y[(x-1+y.length)%y.length]?.focus();break;case"Home":m.preventDefault(),y[0]?.focus();break;case"End":m.preventDefault(),y[y.length-1]?.focus();break;case"Escape":m.preventDefault(),l("escape");break;case"Tab":l("leave");break}}return t({focusFirst:d,contains:p}),(m,y)=>(f(),b("div",{id:e.id,ref_key:"root",ref:o,role:"menu","data-section-flyout":"","aria-label":e.entry.label,class:"fixed top-3 left-[calc(var(--spacing-rail)+8px)] z-40 flex w-[230px] flex-col gap-0.5 rounded-[14px] border border-border bg-surface p-2 text-text shadow-pop",onKeydown:v},[g("span",k4,_(e.entry.label),1),(f(!0),b(ve,null,Ie(u.value,x=>(f(),V(s(Sa),{key:x.item.code,to:x.to,role:"menuitem",tabindex:"-1","aria-current":x.current?"page":void 0,class:me([x.current?"bg-sel font-semibold text-text":"font-medium text-muted hover:bg-hover hover:text-text","flex h-[38px] items-center gap-3 rounded-tab px-2.5 no-underline transition-colors duration-150 ease-out"]),onClick:y[0]||(y[0]=C=>l("navigate"))},{default:N(()=>[(f(),V(Wt(x.icon),{size:18,"aria-hidden":"true"})),g("span",null,_(x.item.label),1)]),_:2},1032,["to","aria-current","class"]))),128))],40,x4))}}),$4=["aria-label"],C4=["aria-label","title"],S4={class:"max-w-full [overflow-wrap:anywhere]"},E4={class:"max-w-full [overflow-wrap:anywhere]"},A4=["aria-label","title"],T4={class:"max-w-full [overflow-wrap:anywhere]"},M4=200,D4=ae({__name:"PluginRail",setup(e){const t=ga(),{collapsed:a,narrow:n,setCollapsed:l}=Ub(),r={system:{icon:$S,key:"backend::lang.nav.theme_system"},light:{icon:Rs,key:"backend::lang.nav.theme_light"},dark:{icon:V3,key:"backend::lang.nav.theme_dark"}},o=k(()=>r[wv.value].icon),i=k(()=>h("backend::lang.nav.theme",{mode:h(r[wv.value].key)})),u=k(()=>Ps(String(t.params.vendor??""),String(t.params.plugin??""))),c=k(()=>t.path==="/media"||t.path.startsWith("/media/")),d=k(()=>t.path==="/settings"||t.path.startsWith("/settings/")||ub(t.path)!==null||u.value===null&&Du(po(t.path))!==null),p=k(()=>ji.value.map(A=>({entry:A,to:Of(A)??"/",icon:qs(A.icon),current:u.value?.code===A.code}))),v=E(null),m=E(null),y=k(()=>ji.value.find(A=>A.code===v.value)??null),x=new Map;let C=null,w=!1;function S(A){return`section-flyout-${A}`}function L(A,B){const Y=B?.$el;Y instanceof HTMLElement?x.set(A,Y):x.delete(A)}function O(){C!==null&&(clearTimeout(C),C=null)}function M(){O(),v.value=null}function R(){O(),C=setTimeout(()=>{C=null;const A=document.activeElement,B=v.value;B!==null&&(x.get(B)===A||m.value?.contains(A))||(v.value=null)},M4)}function q(A){a.value&&(O(),v.value=A)}function K(A){w||q(A)}async function T(A,B){a.value&&(A.key==="Enter"||A.key==="ArrowDown"?(A.preventDefault(),q(B),await Ge(),await m.value?.focusFirst()):A.key==="Escape"&&v.value!==null&&(A.preventDefault(),M()))}function I(){const A=v.value;M(),A!==null&&(w=!0,x.get(A)?.focus(),w=!1)}function W(){l(!1),Ge(()=>document.querySelector("[data-sidebar-collapse]")?.focus())}return Ve(a,A=>{A||M()}),Dt(O),(A,B)=>(f(),b("nav",{"aria-label":s(h)("backend::lang.nav.plugins"),class:"sticky top-0 flex h-screen w-rail shrink-0 flex-col items-center gap-1.5 self-start overflow-y-auto border-r border-side-border bg-side pt-3.5 pb-3"},[g("button",{type:"button","data-theme-toggle":"","aria-label":i.value,title:i.value,class:"mb-3.5 flex size-10 shrink-0 items-center justify-center rounded-inner bg-accent-soft transition-colors duration-150 ease-out hover:bg-side-hover",onClick:B[0]||(B[0]=(...Y)=>s($v)&&s($v)(...Y))},[(f(),V(Wt(o.value),{size:22,class:"text-accent","aria-hidden":"true"}))],8,C4),(f(!0),b(ve,null,Ie(p.value,Y=>(f(),V(s(Sa),{key:Y.entry.code,ref_for:!0,ref:U=>L(Y.entry.code,U),to:Y.to,"data-rail-item":Y.entry.code,"aria-current":Y.current?"page":void 0,"aria-haspopup":s(a)?"menu":void 0,"aria-expanded":s(a)?v.value===Y.entry.code?"true":"false":void 0,"aria-controls":s(a)&&v.value===Y.entry.code?S(Y.entry.code):void 0,class:me([Y.current?"bg-accent-soft font-bold text-accent":"text-side-text hover:bg-side-hover hover:text-white","flex w-[92px] flex-col items-center gap-1 rounded-inner px-1 py-2 text-center text-[11px] leading-[1.2] tracking-[-0.01em] no-underline transition-colors duration-150 ease-out"]),onMouseenter:U=>q(Y.entry.code),onMouseleave:R,onFocus:U=>K(Y.entry.code),onBlur:R,onKeydown:U=>T(U,Y.entry.code)},{default:N(()=>[(f(),V(Wt(Y.icon),{size:20,"aria-hidden":"true"})),g("span",S4,_(Y.entry.label),1)]),_:2},1032,["to","data-rail-item","aria-current","aria-haspopup","aria-expanded","aria-controls","class","onMouseenter","onFocus","onKeydown"]))),128)),s(a4)?(f(),V(s(Sa),{key:0,to:"/media","data-rail-media":"","aria-current":c.value?"page":void 0,class:me([c.value?"bg-accent-soft font-bold text-accent":"text-side-text hover:bg-side-hover hover:text-white","flex w-[92px] flex-col items-center gap-1 rounded-inner px-1 py-2 text-center text-[11px] leading-[1.2] tracking-[-0.01em] no-underline transition-colors duration-150 ease-out"])},{default:N(()=>[D(s(xb),{size:20,"aria-hidden":"true"}),g("span",E4,_(s(h)("backend::lang.nav.media")),1)]),_:1},8,["aria-current","class"])):G("",!0),s(a)&&y.value?(f(),V(w4,{key:1,id:S(y.value.code),ref_key:"flyout",ref:m,entry:y.value,onMouseenter:O,onMouseleave:R,onFocusin:O,onFocusout:R,onEscape:I,onLeave:R,onNavigate:M},null,8,["id","entry"])):G("",!0),B[1]||(B[1]=g("span",{class:"flex-1","aria-hidden":"true"},null,-1)),s(a)&&!s(n)?(f(),b("button",{key:2,type:"button","data-sidebar-expand":"","aria-label":s(h)("backend::lang.nav.expand"),title:s(h)("backend::lang.nav.expand"),class:"mb-1 flex size-10 items-center justify-center rounded-inner text-side-text transition-colors duration-150 ease-out hover:bg-side-hover hover:text-white",onClick:W},[D(s(Ab),{size:20,"aria-hidden":"true"})],8,A4)):G("",!0),s(n$)?(f(),V(s(Sa),{key:3,to:"/settings","data-rail-settings":"","aria-current":d.value?"page":void 0,class:me([d.value?"bg-accent-soft font-bold text-accent":"text-side-text hover:bg-side-hover hover:text-white","flex w-[92px] flex-col items-center gap-1 rounded-inner px-1 py-2 text-center text-[11px] leading-[1.2] tracking-[-0.01em] no-underline transition-colors duration-150 ease-out"])},{default:N(()=>[D(s(Db),{size:20,"aria-hidden":"true"}),g("span",T4,_(s(h)("backend::lang.nav.settings")),1)]),_:1},8,["aria-current","class"])):G("",!0)],8,$4))}}),O4=["aria-label"],P4={class:"mb-3.5 flex h-10 items-center justify-between gap-2 pl-2"},I4={class:"truncate text-[16px] font-bold"},R4=["aria-label","title"],q4=ae({__name:"SectionPanel",props:{entry:{}},setup(e){const t=e,a=ga(),n=k(()=>po(a.path)),l=k(()=>t.entry.sideMenu.flatMap(o=>{const i=Ja(o.controller);return i?[{item:o,to:i,icon:qs(o.icon),current:n.value===o.controller}]:[]}));function r(){Bf(!0),Ge(()=>document.querySelector("[data-sidebar-expand]")?.focus())}return(o,i)=>(f(),b("aside",{"aria-label":s(h)("backend::lang.nav.sections"),class:"sticky top-0 flex h-screen w-panel shrink-0 flex-col gap-0.5 self-start overflow-y-auto border-r border-border bg-surface px-3 py-3.5"},[g("div",P4,[g("span",I4,_(e.entry.label),1),g("button",{type:"button","data-sidebar-collapse":"","aria-label":s(h)("backend::lang.nav.collapse"),title:s(h)("backend::lang.nav.collapse"),class:"flex size-[30px] shrink-0 items-center justify-center rounded-tab text-muted transition-colors duration-150 ease-out hover:bg-hover hover:text-text",onClick:r},[D(s(qf),{size:18,"aria-hidden":"true"})],8,R4)]),(f(!0),b(ve,null,Ie(l.value,u=>(f(),V(s(Sa),{key:u.item.code,to:u.to,"aria-current":u.current?"page":void 0,class:me([u.current?"bg-sel font-semibold text-text":"font-medium text-muted hover:bg-hover hover:text-text","flex h-nav items-center gap-3 rounded-control px-3 no-underline transition-colors duration-150 ease-out"])},{default:N(()=>[(f(),V(Wt(u.icon),{size:18,"aria-hidden":"true"})),g("span",null,_(u.item.label),1)]),_:2},1032,["to","aria-current","class"]))),128))],8,O4))}}),L4=["aria-label"],N4={class:"mb-3.5 flex h-10 items-center justify-between gap-2 pl-2"},B4={class:"truncate text-[16px] font-bold"},F4=["aria-label","title"],V4=ae({__name:"SettingsPanel",props:{section:{}},setup(e){function t(){Bf(!0),Ge(()=>document.querySelector("[data-sidebar-expand]")?.focus())}return(a,n)=>(f(),b("aside",{"data-settings-panel":"","aria-label":s(h)("backend::lang.nav.sections"),class:"sticky top-0 flex h-screen w-panel shrink-0 flex-col gap-0.5 self-start overflow-y-auto border-r border-border bg-surface px-3 py-3.5"},[g("div",N4,[g("span",B4,_(e.section.category||s(h)("backend::lang.nav.settings")),1),g("button",{type:"button","data-sidebar-collapse":"","aria-label":s(h)("backend::lang.nav.collapse"),title:s(h)("backend::lang.nav.collapse"),class:"flex size-[30px] shrink-0 items-center justify-center rounded-tab text-muted transition-colors duration-150 ease-out hover:bg-hover hover:text-text",onClick:t},[D(s(qf),{size:18,"aria-hidden":"true"})],8,F4)]),(f(!0),b(ve,null,Ie(e.section.entries,l=>(f(),V(s(Sa),{key:l.code,to:s(Pf)(l),"data-settings-panel-item":l.code,"aria-current":l.code===e.section.current.code?"page":void 0,class:me([l.code===e.section.current.code?"bg-sel font-semibold text-text":"font-medium text-muted hover:bg-hover hover:text-text","flex h-nav items-center gap-3 rounded-control px-3 no-underline transition-colors duration-150 ease-out"])},{default:N(()=>[(f(),V(Wt(s(qs)(l.icon)),{size:18,"aria-hidden":"true"})),g("span",null,_(l.label),1)]),_:2},1032,["to","data-settings-panel-item","aria-current","class"]))),128))],8,L4))}}),z4=["aria-label"],j4={class:"flex min-w-0 items-center gap-2"},U4=["aria-current"],H4=ae({__name:"Breadcrumbs",setup(e){const t=ga(),a=k(()=>{if(t.name==="account")return[{label:h("backend::lang.myaccount.menu_label")}];if(t.name==="media")return[{label:h("backend::lang.media.title")}];if(t.name==="plugins")return[{label:h("backend::lang.nav.settings"),to:"/settings"},{label:h("backend::lang.plugins.title")}];if(t.name==="settings"||t.name==="settings-form"){const i=[{label:h("backend::lang.nav.settings"),to:"/settings"}],u=t.name==="settings-form"?gs(String(t.params.code??"")):null;return u&&i.push({label:u.label}),i}const n=Ps(String(t.params.vendor??""),String(t.params.plugin??"")),l=po(t.path);if(!n){const i=Du(l);if(!i)return[];const u=[{label:h("backend::lang.nav.settings"),to:"/settings"},{label:i.label,to:Pf(i)}];return(t.name==="record"||t.name==="create")&&Ko.value!==""&&u.push({label:Ko.value}),u}const r=[{label:n.label,to:Of(n)??void 0}],o=n.sideMenu.find(i=>i.controller===l)??null;return o&&r.push({label:o.label,to:Ja(o.controller)??void 0}),(t.name==="record"||t.name==="create")&&Ko.value!==""&&r.push({label:Ko.value}),r});return(n,l)=>(f(),b("nav",{"aria-label":s(h)("backend::lang.nav.breadcrumbs"),class:"min-w-0"},[g("ol",j4,[(f(!0),b(ve,null,Ie(a.value,(r,o)=>(f(),b("li",{key:o,"data-crumb":"",class:"flex min-w-0 items-center gap-2"},[o>0?(f(),V(s(vr),{key:0,size:14,class:"shrink-0 text-muted","aria-hidden":"true"})):G("",!0),o===a.value.length-1||!r.to?(f(),b("span",{key:1,"aria-current":o===a.value.length-1?"page":void 0,class:me([o===a.value.length-1?"font-semibold text-text":"text-muted","truncate"])},_(r.label),11,U4)):(f(),V(s(Sa),{key:2,to:r.to,class:"truncate text-muted no-underline transition-colors duration-150 ease-out hover:text-text"},{default:N(()=>[ye(_(r.label),1)]),_:2},1032,["to"]))]))),128))])],8,z4))}});function Cv(e){return typeof e=="string"?`'${e}'`:new W4().serialize(e)}const K4=" _-,;:!?.'\"()[]{}@*/\\&#%`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz",Xs=(function(){const e=new Uint8Array(128);for(let t=0;t<69;t++)e[K4.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function kd(e,t){if(e===t)return 0;const a=Math.min(e.length,t.length);let n=0;for(let l=0;lo?-1:1)}return e.length!==t.length?e.lengththis.compare(o[0],i[0]));let r=`${a}{`;for(let o=0;othis.compare(n,l)))}`}$Map(a){return this.serializeObjectEntries("Map",a.entries())}}for(const t of["Error","RegExp","URL"])e.prototype["$"+t]=function(a){return`${t}(${a})`};for(const t of["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"])e.prototype["$"+t]=function(a){return`${t}[${a.join(",")}]`};for(const t of["BigInt64Array","BigUint64Array"])e.prototype["$"+t]=function(a){return`${t}[${a.join("n,")}${a.length>0?"n":""}]`};return e})();function bs(e,t){return e===t||Cv(e)===Cv(t)}function Qs(e,t){let a=e;const n=t.toString(),l=n.indexOf("."),r=l>=0?n.length-l:0;if(r>0){const o=10**r;a=Math.round(a*o)/o}return a}function wd(e,t,a,n){t=Number(t),a=Number(a);const l=(e-(Number.isNaN(t)?0:t))%n;let r=Qs(Math.abs(l)*2>=n?e+Math.sign(l)*(n-Math.abs(l)):e-l,n);return Number.isNaN(t)?!Number.isNaN(a)&&r>a&&(r=Math.floor(Qs(a/n,n))*n):ra&&(r=t+Math.floor(Qs((a-t)/n,n))*n),r=Qs(r,n),r}function Ot(e,t){const a=typeof e=="string"&&!t?`${e}Context`:t,n=Symbol(a);return[o=>{const i=ct(n,o);if(i||i===null)return i;throw new Error(`Injection \`${n.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(", ")}`:`\`${e}\``}`)},o=>(yt(n,o),o)]}function Jt(){let e=document.activeElement;if(e==null)return null;for(;e!=null&&e.shadowRoot!=null&&e.shadowRoot.activeElement!=null;)e=e.shadowRoot.activeElement;return e}function Ff(e,t,a){const n=a.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:a});t&&n.addEventListener(e,t,{once:!0}),n.dispatchEvent(l)}function $a(e){return e==null}function Sv(e,t){return $a(e)?!1:Array.isArray(e)?e.some(a=>bs(a,t)):bs(e,t)}function G4(e,t){var a;const n=pr();return Aa(()=>{n.value=e()},{...t,flush:(a=t?.flush)!==null&&a!==void 0?a:"sync"}),At(n)}function Hb(e,t){return ff()?(Cg(e,t),!0):!1}function Y4(e){let t=!1,a;const n=$g(!0);return((...l)=>(t||(a=n.run(()=>e(...l)),t=!0),a))}const el=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const J4=e=>typeof e<"u",Z4=Object.prototype.toString,X4=e=>Z4.call(e)==="[object Object]",Ev=Q4();function Q4(){var e,t,a;return el&&!!(!((e=window)===null||e===void 0||(e=e.navigator)===null||e===void 0)&&e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window)===null||t===void 0||(t=t.navigator)===null||t===void 0?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test((a=window)===null||a===void 0?void 0:a.navigator.userAgent))}function $d(e){return Array.isArray(e)?e:[e]}function eE(e){return kn()}function Kb(e){if(!el)return e;let t=0,a,n;const l=()=>{t-=1,n&&t<=0&&(n.stop(),a=void 0,n=void 0)};return((...r)=>(t+=1,n||(n=$g(!0),a=n.run(()=>e(...r))),Hb(l),a))}function tE(e){return Ka(Ct(e)?new Proxy({},{get(t,a,n){return s(Reflect.get(e.value,a,n))},set(t,a,n){return Ct(e.value[a])&&!Ct(n)?e.value[a].value=n:e.value[a]=n,!0},deleteProperty(t,a){return Reflect.deleteProperty(e.value,a)},has(t,a){return Reflect.has(e.value,a)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}}):e)}function aE(e){return tE(k(e))}function Vf(e,...t){const a=t.flat(),n=a[0];return aE(()=>Object.fromEntries(typeof n=="function"?Object.entries(Kt(e)).filter(([l,r])=>!n(ca(r),l)):Object.entries(Kt(e)).filter(l=>!a.includes(l[0]))))}function nE(e,t=1e4){return Px((a,n)=>{let l=ca(e),r;const o=()=>setTimeout(()=>{l=ca(e),n()},ca(t));return Hb(()=>{clearTimeout(r)}),{get(){return a(),l},set(i){l=i,n(),clearTimeout(r),r=o()}}})}function lE(e,t){eE()&&Dt(e,t)}function rE(e,t,a){return Ve(e,t,{...a,immediate:!0})}const zf=el?window:void 0;function gr(e){var t;const a=ca(e);return(t=a?.$el)!==null&&t!==void 0?t:a}function so(...e){const t=(n,l,r,o)=>(n.addEventListener(l,r,o),()=>n.removeEventListener(l,r,o)),a=k(()=>{const n=$d(ca(e[0])).filter(l=>l!=null);return n.every(l=>typeof l!="string")?n:void 0});return rE(()=>{var n,l;return[(n=(l=a.value)===null||l===void 0?void 0:l.map(r=>gr(r)))!==null&&n!==void 0?n:[zf].filter(r=>r!=null),$d(ca(a.value?e[1]:e[0])),$d(s(a.value?e[2]:e[1])),ca(a.value?e[3]:e[2])]},([n,l,r,o],i,u)=>{if(!n?.length||!l?.length||!r?.length)return;const c=X4(o)?{...o}:o,d=n.flatMap(p=>l.flatMap(v=>r.map(m=>t(p,v,m,c))));u(()=>{d.forEach(p=>p())})},{flush:"post"})}function oE(){const e=pr(!1),t=kn();return t&&$t(()=>{e.value=!0},t),e}function sE(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function iE(...e){let t,a,n={};e.length===3?(t=e[0],a=e[1],n=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,a=e[0],n=e[1]):(t=e[0],a=e[1]):(t=!0,a=e[0]);const{target:l=zf,eventName:r="keydown",passive:o=!1,dedupe:i=!1}=n,u=sE(t);return so(l,r,d=>{d.repeat&&ca(i)||u(d)&&a(d)},o)}function uE(e){return JSON.parse(JSON.stringify(e))}function Ft(e,t,a,n={}){var l,r;const{clone:o=!1,passive:i=!1,eventName:u,deep:c=!1,defaultValue:d,shouldEmit:p}=n,v=kn(),m=a||v?.emit||(v==null||(l=v.$emit)===null||l===void 0?void 0:l.bind(v))||(v==null||(r=v.proxy)===null||r===void 0||(r=r.$emit)===null||r===void 0?void 0:r.bind(v?.proxy));let y=u;t||(t="modelValue"),y=y||`update:${t.toString()}`;const x=S=>o?typeof o=="function"?o(S):uE(S):S,C=()=>J4(e[t])?x(e[t]):d,w=S=>{p?p(S)&&m(y,S):m(y,S)};if(i){const S=E(C());let L=!1;return Ve(()=>e[t],O=>{L||(L=!0,S.value=x(O),Ge(()=>L=!1))}),Ve(S,O=>{!L&&(O!==e[t]||c)&&w(O)},{deep:c}),S}else return k({get(){return C()},set(S){w(S)}})}function jf(e){return e?e.flatMap(t=>t.type===ve?jf(t.children):[t]):[]}const dE=["INPUT","TEXTAREA"];function Av(e,t,a,n={}){if(!t||n.enableIgnoredElement&&dE.includes(t.nodeName))return null;const{arrowKeyOptions:l="both",attributeName:r="[data-reka-collection-item]",itemsArray:o=[],loop:i=!0,dir:u="ltr",preventScroll:c=!0,focus:d=!1}=n,[p,v,m,y,x,C]=[e.key==="ArrowRight",e.key==="ArrowLeft",e.key==="ArrowUp",e.key==="ArrowDown",e.key==="Home",e.key==="End"],w=m||y,S=p||v;if(!x&&!C&&(!w&&!S||l==="vertical"&&S||l==="horizontal"&&w))return null;const L=a?Array.from(a.querySelectorAll(r)):o;if(!L.length)return null;c&&e.preventDefault();let O=null;return S||w?O=Wb(L,t,{goForward:w?y:u==="ltr"?p:v,loop:i}):x?O=L.at(0)||null:C&&(O=L.at(-1)||null),d&&O?.focus(),O}function Wb(e,t,a,n=e.includes(t)?e.length:e.length+1){if(--n===0)return null;const l=e.indexOf(t);let r;if(l===-1?r=a.goForward?0:e.length-1:r=a.goForward?l+1:l-1,!a.loop&&(r<0||r>=e.length))return null;const o=(r+e.length)%e.length,i=e[o];return i?i.hasAttribute("disabled")&&i.getAttribute("disabled")!=="false"?Wb(e,i,a,n):i:null}const[Pu]=Ot("ConfigProvider");function Cd(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function Pc(e,t,a=".",n){if(!Cd(t))return Pc(e,{},a,n);const l={...t};for(const r of Object.keys(e)){if(r==="__proto__"||r==="constructor")continue;const o=e[r];o!=null&&(n&&n(l,r,o,a)||(Array.isArray(o)&&Array.isArray(l[r])?l[r]=[...o,...l[r]]:Cd(o)&&Cd(l[r])?l[r]=Pc(o,l[r],(a?`${a}.`:"")+r.toString(),n):l[r]=o))}return l}function cE(e){return(...t)=>t.reduce((a,n)=>Pc(a,n,"",e),{})}const Gb=cE(),fE=Kb(()=>{const e=E(new Map),t=E(),a=k(()=>{for(const o of e.value.values())if(o)return!0;return!1}),n=Pu({scrollBody:E(!0)});let l=null;const r=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.documentElement.style.removeProperty("--scrollbar-width"),document.body.style.overflow=t.value??"",Ev&&l?.(),t.value=void 0};return Ve(a,(o,i)=>{if(!el)return;if(!o){i&&r();return}t.value===void 0&&(t.value=document.body.style.overflow);const u=window.innerWidth-document.documentElement.clientWidth,c={padding:u,margin:0},d=n.scrollBody?.value?typeof n.scrollBody.value=="object"?Gb({padding:n.scrollBody.value.padding===!0?u:n.scrollBody.value.padding,margin:n.scrollBody.value.margin===!0?u:n.scrollBody.value.margin},c):c:{padding:0,margin:0};u>0&&(document.body.style.paddingRight=typeof d.padding=="number"?`${d.padding}px`:String(d.padding),document.body.style.marginRight=typeof d.margin=="number"?`${d.margin}px`:String(d.margin),document.documentElement.style.setProperty("--scrollbar-width",`${u}px`),document.body.style.overflow="hidden"),Ev&&(l=so(document,"touchmove",p=>pE(p),{passive:!1})),Ge(()=>{a.value&&(document.body.style.pointerEvents="none",document.body.style.overflow="hidden")})},{immediate:!0,flush:"sync"}),e});function Uf(e){const t=Math.random().toString(36).substring(2,7),a=fE();a.value.set(t,e??!1);const n=k({get:()=>a.value.get(t)??!1,set:l=>a.value.set(t,l)});return lE(()=>{a.value.delete(t)}),n}function Yb(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth1?!0:(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}function Gr(e,t){return e-t*Math.floor(e/t)}const Jb=1721426;function rr(e,t,a,n){t=Ls(e,t);let l=t-1,r=-2;return a<=2?r=0:$l(t)&&(r=-1),Jb-1+365*l+Math.floor(l/4)-Math.floor(l/100)+Math.floor(l/400)+Math.floor((367*a-362)/12+r+n)}function $l(e){return e%4===0&&(e%100!==0||e%400===0)}function Ls(e,t){return e==="BC"?1-t:t}function Iu(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}const mE={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class Za{fromJulianDay(t){let a=t,n=a-Jb,l=Math.floor(n/146097),r=Gr(n,146097),o=Math.floor(r/36524),i=Gr(r,36524),u=Math.floor(i/1461),c=Gr(i,1461),d=Math.floor(c/365),p=l*400+o*100+u*4+d+(o!==4&&d!==4?1:0),[v,m]=Iu(p),y=a-rr(v,m,1,1),x=2;a0&&t===Qa()&&!Qb())return new Date(e).getTimezoneOffset()*-6e4;let{year:a,month:n,day:l,hour:r,minute:o,second:i}=t1(e,t);return e1(a,n,l,r,o,i,0)-Math.floor(e/1e3)*1e3}const Pv=new Map;function t1(e,t){let a=Pv.get(t);a||(a=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),Pv.set(t,a));let n=a.formatToParts(new Date(e)),l={};for(let r of n)r.type!=="literal"&&(l[r.type]=r.value);return{year:l.era==="BC"||l.era==="B"?-l.year+1:+l.year,month:+l.month,day:+l.day,hour:l.hour==="24"?0:+l.hour,minute:+l.minute,second:+l.second}}const Iv=864e5;function kE(e,t,a,n){return(a===n?[a]:[a,n]).filter(r=>wE(e,t,r))}function wE(e,t,a){let n=t1(a,t);return e.year===n.year&&e.month===n.month&&e.day===n.day&&e.hour===n.hour&&e.minute===n.minute&&e.second===n.second}function qn(e,t,a="compatible"){let n=yn(e);if(t==="UTC")return io(n);if(t===Qa()&&a==="compatible"&&!Qb()){n=ma(n,new Za);let u=new Date,c=Ls(n.era,n.year);return u.setFullYear(c,n.month-1,n.day),u.setHours(n.hour,n.minute,n.second,n.millisecond),u.getTime()}let l=io(n),r=Rc(l-Iv,t),o=Rc(l+Iv,t),i=kE(n,t,l-r,l-o);if(i.length===1)return i[0];if(i.length>1)switch(a){case"compatible":case"earlier":return i[0];case"later":return i[i.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(a){case"earlier":return Math.min(l-r,l-o);case"compatible":case"later":return Math.max(l-r,l-o);case"reject":throw new RangeError("No such absolute time found")}}function a1(e,t,a="compatible"){return new Date(qn(e,t,a))}function Ln(e,t){let a=Rc(e,t),n=new Date(e+a),l=n.getUTCFullYear(),r=n.getUTCMonth()+1,o=n.getUTCDate(),i=n.getUTCHours(),u=n.getUTCMinutes(),c=n.getUTCSeconds(),d=n.getUTCMilliseconds();return new Yn(l<1?"BC":"AD",l<1?-l+1:l,r,o,t,a,i,u,c,d)}function $E(e){return new wt(e.calendar,e.era,e.year,e.month,e.day)}function yn(e,t){let a=0,n=0,l=0,r=0;if("timeZone"in e)({hour:a,minute:n,second:l,millisecond:r}=e);else if("hour"in e&&!t)return e;return t&&({hour:a,minute:n,second:l,millisecond:r}=t),new Ol(e.calendar,e.era,e.year,e.month,e.day,a,n,l,r)}function ma(e,t){if(Kf(e.calendar,t))return e;let a=t.fromJulianDay(e.calendar.toJulianDay(e)),n=e.copy();return n.calendar=t,n.era=a.era,n.year=a.year,n.month=a.month,n.day=a.day,ur(n),n}function Wf(e,t,a){if(e instanceof Yn)return e.timeZone===t?e:qu(e,t);let n=qn(e,t,a);return Ln(n,t)}function CE(e){let t=io(e)-e.offset;return new Date(t)}function qu(e,t){let a=io(e)-e.offset;return ma(Ln(a,t),e.calendar)}const Po=36e5;function Lu(e,t){let a=e.copy(),n="hour"in a?o1(a,t):0;qc(a,t.years||0),a.calendar.balanceYearMonth&&a.calendar.balanceYearMonth(a,e),a.month+=t.months||0,Lc(a),n1(a),a.day+=(t.weeks||0)*7,a.day+=t.days||0,a.day+=n,SE(a),a.calendar.balanceDate&&a.calendar.balanceDate(a),a.year<1&&(a.year=1,a.month=1,a.day=1);let l=a.calendar.getYearsInEra(a);if(a.year>l){let o=a.calendar.isInverseEra?.(a);a.year=l,a.month=o?1:a.calendar.getMonthsInYear(a),a.day=o?1:a.calendar.getDaysInMonth(a)}a.month<1&&(a.month=1,a.day=1);let r=a.calendar.getMonthsInYear(a);return a.month>r&&(a.month=r,a.day=a.calendar.getDaysInMonth(a)),a.day=Math.max(1,Math.min(a.calendar.getDaysInMonth(a),a.day)),a}function qc(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function Lc(e){for(;e.month<1;)qc(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,qc(e,1)}function SE(e){for(;e.day<1;)e.month--,Lc(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,Lc(e)}function n1(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function ur(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),n1(e)}function Gf(e){let t={};for(let a in e)typeof e[a]=="number"&&(t[a]=-e[a]);return t}function l1(e,t){return Lu(e,Gf(t))}function Yf(e,t){let a=e.copy();return t.era!=null&&(a.era=t.era),t.year!=null&&(a.year=t.year),t.month!=null&&(a.month=t.month),t.day!=null&&(a.day=t.day),ur(a),a}function _s(e,t){let a=e.copy();return t.hour!=null&&(a.hour=t.hour),t.minute!=null&&(a.minute=t.minute),t.second!=null&&(a.second=t.second),t.millisecond!=null&&(a.millisecond=t.millisecond),r1(a),a}function EE(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=ei(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=ei(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=ei(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=ei(e.hour,24),t}function r1(e){e.millisecond=Math.max(0,Math.min(e.millisecond,999)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function ei(e,t){let a=e%t;return a<0&&(a+=t),a}function o1(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,EE(e)}function s1(e,t){let a=e.copy();return o1(a,t),a}function AE(e,t){return s1(e,Gf(t))}function Jf(e,t,a,n){let l=e.copy();switch(t){case"era":{let r=e.calendar.getEras(),o=r.indexOf(e.era);if(o<0)throw new Error("Invalid era: "+e.era);o=Nn(o,a,0,r.length-1,n?.round),l.era=r[o],ur(l);break}case"year":l.calendar.isInverseEra?.(l)&&(a=-a),l.year=Nn(e.year,a,-1/0,9999,n?.round),l.year===-1/0&&(l.year=1),l.calendar.balanceYearMonth&&l.calendar.balanceYearMonth(l,e);break;case"month":l.month=Nn(e.month,a,1,e.calendar.getMonthsInYear(e),n?.round);break;case"day":l.day=Nn(e.day,a,1,e.calendar.getDaysInMonth(e),n?.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(l),ur(l),l}function Zf(e,t,a,n){let l=e.copy();switch(t){case"hour":{let r=e.hour,o=0,i=23;if(n?.hourCycle===12){let u=r>=12;o=u?12:0,i=u?23:11}l.hour=Nn(r,a,o,i,n?.round);break}case"minute":l.minute=Nn(e.minute,a,0,59,n?.round);break;case"second":l.second=Nn(e.second,a,0,59,n?.round);break;case"millisecond":l.millisecond=Nn(e.millisecond,a,0,999,n?.round);break;default:throw new Error("Unsupported field "+t)}return l}function Nn(e,t,a,n,l=!1){if(l){e+=Math.sign(t),e0?e=Math.ceil(e/r)*r:e=Math.floor(e/r)*r,e>n&&(e=a)}else e+=t,en&&(e=a+(e-n-1));return e}function i1(e,t){let a;if(t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0){let l=Lu(yn(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});a=qn(l,e.timeZone)}else a=io(e)-e.offset;a+=t.milliseconds||0,a+=(t.seconds||0)*1e3,a+=(t.minutes||0)*6e4,a+=(t.hours||0)*36e5;let n=Ln(a,e.timeZone);return ma(n,e.calendar)}function TE(e,t){return i1(e,Gf(t))}function ME(e,t,a,n){switch(t){case"hour":{let l=0,r=23;if(n?.hourCycle===12){let y=e.hour>=12;l=y?12:0,r=y?23:11}let o=yn(e),i=ma(_s(o,{hour:l}),new Za),u=[qn(i,e.timeZone,"earlier"),qn(i,e.timeZone,"later")].filter(y=>Ln(y,e.timeZone).day===i.day)[0],c=ma(_s(o,{hour:r}),new Za),d=[qn(c,e.timeZone,"earlier"),qn(c,e.timeZone,"later")].filter(y=>Ln(y,e.timeZone).day===c.day).pop(),p=io(e)-e.offset,v=Math.floor(p/Po),m=p%Po;return p=Nn(v,a,Math.floor(u/Po),Math.floor(d/Po),n?.round)*Po+m,ma(Ln(p,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return Zf(e,t,a,n);case"era":case"year":case"month":case"day":{let l=Jf(yn(e),t,a,n),r=qn(l,e.timeZone);return ma(Ln(r,e.timeZone),e.calendar)}default:throw new Error("Unsupported field "+t)}}function DE(e,t,a){let n=yn(e),l=_s(Yf(n,t),t);if(l.compare(n)===0)return e;let r=qn(l,e.timeZone,a);return ma(Ln(r,e.timeZone),e.calendar)}const OE=/^(\d{2})(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,PE=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,u1=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function IE(e){let t=e.match(OE);if(!t)throw new Error("Invalid ISO 8601 time string: "+e);return new fn(ta(t[1],0,23),t[2]?ta(t[2],0,59):0,t[3]?ta(t[3],0,59):0,t[4]?ta(t[4],0,1/0)*1e3:0)}function d1(e){let t=e.match(PE);if(!t)throw u1.test(e)?new Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date string: "+e);let a=new wt(ta(t[1],0,9999),ta(t[2],1,12),1);return a.day=ta(t[3],1,a.calendar.getDaysInMonth(a)),a}function Rv(e,t){let a=e.match(u1);if(!a)throw new Error("Invalid ISO 8601 date time string: "+e);let n=ta(a[1],-9999,9999),l=n<1?"BC":"AD",r=new Yn(l,n<1?-n+1:n,ta(a[2],1,12),1,t,0,a[4]?ta(a[4],0,23):0,a[5]?ta(a[5],0,59):0,a[6]?ta(a[6],0,59):0,a[7]?ta(a[7],0,1/0)*1e3:0);return r.day=ta(a[3],0,r.calendar.getDaysInMonth(r)),a[8]&&(r.offset=ta(a[8],-23,23)*36e5+ta(a[9]??"0",0,59)*6e4),qu(r,t)}function ta(e,t,a){let n=Number(e);if(na)throw new RangeError(`Value out of range: ${t} <= ${n} <= ${a}`);return n}function c1(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function f1(e){let t=ma(e,new Za),a;return t.era==="BC"?a=t.year===1?"0000":"-"+String(Math.abs(1-t.year)).padStart(6,"00"):a=String(t.year).padStart(4,"0"),`${a}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function p1(e){return`${f1(e)}T${c1(e)}`}function RE(e){let t=Math.sign(e)<0?"-":"+";e=Math.abs(e);let a=Math.floor(e/36e5),n=Math.floor(e%36e5/6e4),l=Math.floor(e%36e5%6e4/1e3),r=`${t}${String(a).padStart(2,"0")}:${String(n).padStart(2,"0")}`;return l!==0&&(r+=`:${String(l).padStart(2,"0")}`),r}function qE(e){return`${p1(e)}${RE(e.offset)}[${e.timeZone}]`}function Xf(e){let t=typeof e[0]=="object"?e.shift():new Za,a;if(typeof e[0]=="string")a=e.shift();else{let o=t.getEras();a=o[o.length-1]}let n=e.shift(),l=e.shift(),r=e.shift();return[t,a,n,l,r]}class wt{#e;constructor(...t){let[a,n,l,r,o]=Xf(t);this.calendar=a,this.era=n,this.year=l,this.month=r,this.day=o,ur(this)}copy(){return this.era?new wt(this.calendar,this.era,this.year,this.month,this.day):new wt(this.calendar,this.year,this.month,this.day)}add(t){return Lu(this,t)}subtract(t){return l1(this,t)}set(t){return Yf(this,t)}cycle(t,a,n){return Jf(this,t,a,n)}toDate(t){return a1(this,t)}toString(){return f1(this)}compare(t){return Zb(this,t)}}class fn{#e;constructor(t=0,a=0,n=0,l=0){this.hour=t,this.minute=a,this.second=n,this.millisecond=l,r1(this)}copy(){return new fn(this.hour,this.minute,this.second,this.millisecond)}add(t){return s1(this,t)}subtract(t){return AE(this,t)}set(t){return _s(this,t)}cycle(t,a,n){return Zf(this,t,a,n)}toString(){return c1(this)}compare(t){return Xb(this,t)}}class Ol{#e;constructor(...t){let[a,n,l,r,o]=Xf(t);this.calendar=a,this.era=n,this.year=l,this.month=r,this.day=o,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,ur(this)}copy(){return this.era?new Ol(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new Ol(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return Lu(this,t)}subtract(t){return l1(this,t)}set(t){return Yf(_s(this,t),t)}cycle(t,a,n){switch(t){case"era":case"year":case"month":case"day":return Jf(this,t,a,n);default:return Zf(this,t,a,n)}}toDate(t,a){return a1(this,t,a)}toString(){return p1(this)}compare(t){let a=Zb(this,t);return a===0?Xb(this,yn(t)):a}}class Yn{#e;constructor(...t){let[a,n,l,r,o]=Xf(t),i=t.shift(),u=t.shift();this.calendar=a,this.era=n,this.year=l,this.month=r,this.day=o,this.timeZone=i,this.offset=u,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,ur(this)}copy(){return this.era?new Yn(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new Yn(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return i1(this,t)}subtract(t){return TE(this,t)}set(t,a){return DE(this,t,a)}cycle(t,a,n){return ME(this,t,a,n)}toDate(){return CE(this)}toString(){return qE(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-Wf(t,this.timeZone).toDate().getTime()}}const Jr=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],LE=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],$i=[1867,1911,1925,1988,2018],kl=["meiji","taisho","showa","heisei","reiwa"];function qv(e){const t=Jr.findIndex(([a,n,l])=>e.year=0){let[,l,r]=Jr[a];t.month=Math.max(l,t.month),t.month===l&&(t.day=Math.max(r,t.day))}}getEras(){return kl}getYearsInEra(t){let a=kl.indexOf(t.era),n=Jr[a],l=Jr[a+1];if(l==null)return 9999-n[0]+1;let r=l[0]-n[0];return(t.month0?["minguo",t]:["before_minguo",1-t]}class FE extends Za{fromJulianDay(t){let a=super.fromJulianDay(t),n=Ls(a.era,a.year),[l,r]=Bv(n);return new wt(this,l,r,a.month,a.day)}toJulianDay(t){return super.toJulianDay(Fv(t))}getEras(){return["before_minguo","minguo"]}balanceDate(t){let[a,n]=Bv(v1(t));t.era=a,t.year=n}isInverseEra(t){return t.era==="before_minguo"}getDaysInMonth(t){return super.getDaysInMonth(Fv(t))}getYearsInEra(t){return t.era==="before_minguo"?9999:9999-Zi}constructor(...t){super(...t),this.identifier="roc"}}function Fv(e){let[t,a]=Iu(v1(e));return new wt(t,a,e.month,e.day)}const Vv=1948320,zv=[0,31,62,93,124,155,186,216,246,276,306,336];class VE{fromJulianDay(t){let a=t-Vv,n=1+Math.floor((33*a+3)/12053),l=365*(n-1)+Math.floor((8*n+21)/33),r=a-l,o=r<216?Math.floor(r/31):Math.floor((r-6)/30),i=r-zv[o]+1;return new wt(this,n,o+1,i)}toJulianDay(t){let a=Vv-1+365*(t.year-1)+Math.floor((8*t.year+21)/33);return a+=zv[t.month-1],a+=t.day,a}getMonthsInYear(){return 12}getDaysInMonth(t){return t.month<=6?31:t.month<=11||Gr(25*t.year+11,33)<8?30:29}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}const Td=78,jv=80;class zE extends Za{fromJulianDay(t){let a=super.fromJulianDay(t),n=a.year-Td,l=t-rr(a.era,a.year,1,1),r;l=8&&(o+=(t.month-7)*30),o+=t.day-1,o)}getDaysInMonth(t){return t.month===1&&$l(t.year+Td)||t.month>=2&&t.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return["saka"]}balanceDate(){}constructor(...t){super(...t),this.identifier="indian"}}const Xi=1948440,Uv=1948439,Oa=1300,Tr=1600,jE=460322;function Qi(e,t,a,n){return n+Math.ceil(29.5*(a-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function h1(e,t,a){let n=Math.floor((30*(a-t)+10646)/10631),l=Math.min(12,Math.ceil((a-(29+Qi(t,n,1,1)))/29.5)+1),r=a-Qi(t,n,l,1)+1;return new wt(e,n,l,r)}function Hv(e){return(14+11*e)%30<11}class Qf{fromJulianDay(t){return h1(this,Xi,t)}toJulianDay(t){return Qi(Xi,t.year,t.month,t.day)}getDaysInMonth(t){let a=29+t.month%2;return t.month===12&&Hv(t.year)&&a++,a}getMonthsInYear(){return 12}getDaysInYear(t){return Hv(t.year)?355:354}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 30}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class UE extends Qf{fromJulianDay(t){return h1(this,Uv,t)}toJulianDay(t){return Qi(Uv,t.year,t.month,t.day)}constructor(...t){super(...t),this.identifier="islamic-tbla"}}const HE="qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=";let Nc,Zr;function Ci(e){return jE+Zr[e-Oa]}function Wo(e,t){let a=e-Oa,n=1<<11-(t-1);return(Nc[a]&n)===0?29:30}function Kv(e,t){let a=Ci(e);for(let n=1;nt.charCodeAt(0)).buffer)),!Zr){Zr=new Uint32Array(Tr-Oa+1);let t=0;for(let a=Oa;a<=Tr;a++){Zr[a-Oa]=t;for(let n=1;n<=12;n++)t+=Wo(a,n)}}}fromJulianDay(t){let a=t-Xi,n=Ci(Oa),l=Ci(Tr);if(al)return super.fromJulianDay(t);{let r=Oa-1,o=1,i=1;for(;i>0;){r++,i=a-Ci(r)+1;let u=Wv(r);if(i===u){o=12;break}else if(ic;)i-=c,o++,c=Wo(r,o);break}}return new wt(this,r,o,a-Kv(r,o)+1)}}toJulianDay(t){return t.yearTr?super.toJulianDay(t):Xi+Kv(t.year,t.month)+(t.day-1)}getDaysInMonth(t){return t.yearTr?super.getDaysInMonth(t):Wo(t.year,t.month)}getDaysInYear(t){return t.yearTr?super.getDaysInYear(t):Wv(t.year)}}const Gv=347997,g1=1080,y1=24*g1,WE=29,GE=12*g1+793,YE=WE*y1+GE;function lr(e){return Gr(e*7+1,19)<7}function Si(e){let t=Math.floor((235*e-234)/19),a=12084+13753*t,n=t*29+Math.floor(a/25920);return Gr(3*(n+1),7)<3&&(n+=1),n}function JE(e){let t=Si(e-1),a=Si(e);return Si(e+1)-a===356?2:a-t===382?1:0}function rs(e){return Si(e)+JE(e)}function b1(e){return rs(e+1)-rs(e)}function ZE(e){let t=b1(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}function ti(e,t){if(t>=6&&!lr(e)&&t++,t===4||t===7||t===9||t===11||t===13)return 29;let a=ZE(e);return t===2?a===2?30:29:t===3?a===0?29:30:t===6?lr(e)?30:0:30}class XE{fromJulianDay(t){let a=t-Gv,n=a*y1/YE,l=Math.floor((19*n+234)/235)+1,r=rs(l),o=Math.floor(a-r);for(;o<1;)l--,r=rs(l),o=Math.floor(a-r);let i=1,u=0;for(;u6?t.month--:!lr(a.year)&&lr(t.year)&&a.month>6&&t.month++)}constructor(){this.identifier="hebrew"}}const Bc=1723856,Yv=1824665,Fc=5500;function os(e,t,a,n){return e+365*t+Math.floor(t/4)+30*(a-1)+n-1}function ep(e,t){let a=Math.floor(4*(t-e)/1461);t>=os(e,a+1,1,1)&&a++;let n=1+Math.floor((t-os(e,a,1,1))/30),l=t+1-os(e,a,n,1);return[a,n,l]}function _1(e){return Math.floor(e%4/3)}function x1(e,t){return t%13!==0?30:_1(e)+5}class tp{fromJulianDay(t){let[a,n,l]=ep(Bc,t),r="AM";return a<=0&&(r="AA",a+=Fc),new wt(this,r,a,n,l)}toJulianDay(t){let a=t.year;return t.era==="AA"&&(a-=Fc),os(Bc,a,t.month,t.day)}getDaysInMonth(t){return x1(t.year,t.month)}getMonthsInYear(){return 13}getDaysInYear(t){return 365+_1(t.year)}getMaximumMonthsInYear(){return 13}getMaximumDaysInMonth(){return 30}getYearsInEra(t){return t.era==="AA"?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class QE extends tp{fromJulianDay(t){let[a,n,l]=ep(Bc,t);return a+=Fc,new wt(this,"AA",a,n,l)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...t){super(...t),this.identifier="ethioaa"}}class eA extends tp{fromJulianDay(t){let[a,n,l]=ep(Yv,t),r="CE";return a<=0&&(r="BCE",a=1-a),new wt(this,r,a,n,l)}toJulianDay(t){let a=t.year;return t.era==="BCE"&&(a=1-a),os(Yv,a,t.month,t.day)}getDaysInMonth(t){let a=t.year;return t.era==="BCE"&&(a=1-a),x1(a,t.month)}isInverseEra(t){return t.era==="BCE"}balanceDate(t){t.year<=0&&(t.era=t.era==="BCE"?"CE":"BCE",t.year=1-t.year)}getEras(){return["BCE","CE"]}getYearsInEra(t){return t.era==="BCE"?9999:9715}constructor(...t){super(...t),this.identifier="coptic"}}function tA(e){switch(e){case"buddhist":return new BE;case"ethiopic":return new tp;case"ethioaa":return new QE;case"coptic":return new eA;case"hebrew":return new XE;case"indian":return new zE;case"islamic-civil":return new Qf;case"islamic-tbla":return new UE;case"islamic-umalqura":return new KE;case"japanese":return new NE;case"persian":return new VE;case"roc":return new FE;default:return new Za}}let Md=new Map;class za{constructor(t,a={}){this.formatter=k1(t,a),this.options=a}format(t){return this.formatter.format(t)}formatToParts(t){return this.formatter.formatToParts(t)}formatRange(t,a){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(t,a);if(a= start date");return`${this.formatter.format(t)} – ${this.formatter.format(a)}`}formatRangeToParts(t,a){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(t,a);if(a= start date");let n=this.formatter.formatToParts(t),l=this.formatter.formatToParts(a);return[...n.map(r=>({...r,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...l.map(r=>({...r,source:"endRange"}))]}resolvedOptions(){let t=this.formatter.resolvedOptions();return lA()&&(this.resolvedHourCycle||(this.resolvedHourCycle=rA(t.locale,this.options)),t.hourCycle=this.resolvedHourCycle,t.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),t.calendar==="ethiopic-amete-alem"&&(t.calendar="ethioaa"),t}}const aA={true:{ja:"h11"},false:{}};function k1(e,t={}){if(typeof t.hour12=="boolean"&&nA()){t={...t};let l=aA[String(t.hour12)][e.split("-")[0]],r=t.hour12?"h12":"h23";t.hourCycle=l??r,delete t.hour12}let a=e+(t?Object.entries(t).sort((l,r)=>l[0]r.type==="hour").value,10),l=parseInt(a.formatToParts(new Date(2020,2,3,23)).find(r=>r.type==="hour").value,10);if(n===0&&l===23)return"h23";if(n===24&&l===23)return"h24";if(n===0&&l===11)return"h11";if(n===12&&l===11)return"h12";throw new Error("Unexpected hour cycle result")}function Pa(e,t=Qa()){return xs(e)?e.toDate():e.toDate(t)}function oA(e){return e instanceof Ol}function xs(e){return e instanceof Yn}function Vc(e){return oA(e)||xs(e)}function Al(e){if(e instanceof Date){const t=e.getFullYear(),a=e.getMonth()+1;return new Date(t,a,0).getDate()}else return e.set({day:100}).day}function Cl(e,t){return e.compare(t)<0}function Pd(e,t){return e.compare(t)>0}function sA(e,t,a){const n=Ru(e,a,"sun");return t>n?e.subtract({days:n+7-t}):t===n?e:e.subtract({days:n-t})}function iA(e,t,a){const n=Ru(e,a,"sun"),l=t===0?6:t-1;return n===l?e:n>l?e.add({days:7-n+l}):e.add({days:l-n})}function ap(e){const{defaultValue:t,defaultPlaceholder:a,granularity:n="day",locale:l="en"}=e;if(Array.isArray(t)&&t.length)return t.at(-1).copy();if(t&&!Array.isArray(t))return t.copy();if(a)return a.copy();const r=new Date,o=r.getFullYear(),i=r.getMonth()+1,u=r.getDate(),c=["hour","minute","second"],d=new za(l),p=tA(d.resolvedOptions().calendar);return c.includes(n??"day")?ma(new Ol(o,i,u,0,0,0),p):ma(new wt(o,i,u),p)}function uA(e){const{defaultValue:t,defaultPlaceholder:a}=e;return t?t.copy():a?a.copy():new fn(0,0,0)}function dA(e,t){const a=[];for(let n=0;nt.set({day:w+1})),i=Ic(t),u=Dv(t),c=sA(i,a,l),d=iA(u,a,l),p=Jv(c.subtract({days:1}),i),v=Jv(u,d.add({days:1})),m=p.length+o.length+v.length;if(n&&m<42){const C=42-m;let w=v.at(-1);w||(w=Dv(t));const S=Array.from({length:C},(L,O)=>{const M=O+1;return w.add({days:M})});v.push(...S)}const y=p.concat(o,v),x=dA(y,7);return{value:t,cells:y,rows:x}}function Zl(e){const{numberOfMonths:t,dateObj:a,...n}=e,l=[];if(!t||t===1)return l.push(Rd({...n,dateObj:a})),l;l.push(Rd({...n,dateObj:a}));for(let r=1;r({label:u(Pa(C.set({month:S}))),value:S}))}function d(C,w={}){return new za(a.value,{...t,year:"numeric",...w}).format(C)}function p(C,w){return xs(C)?new za(a.value,{...t,...w,timeZone:C.timeZone}).formatToParts(Pa(C)):new za(a.value,{...t,...w}).formatToParts(Pa(C))}function v(C,w="narrow"){return new za(a.value,{...t,weekday:w}).format(C)}function m(C){const S=new za(a.value,{...t,hour:"numeric",minute:"numeric"}).formatToParts(C).find(L=>L.type==="dayPeriod")?.value;return S==="PM"||S==="pm"||S==="p.m."?"PM":"AM"}const y={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};function x(C,w,S={}){const L={...y,...S},M=p(C,L).find(R=>R.type===w);return M?M.value:""}return{setLocale:l,getLocale:n,fullMonth:u,fullYear:d,fullMonthAndYear:i,toParts:p,custom:r,part:x,dayPeriod:m,selectedDate:o,dayOfWeek:v,getMonths:c}}function $n(e){const t=Pu({dir:E("ltr")});return k(()=>e?.value||t.dir?.value||"ltr")}function yr(e){const t=kn(),a=t?.type.emits,n={};return a?.length||console.warn(`No emitted event found. Please check component: ${t?.type.__name}`),a?.forEach(l=>{n[Jo(Qt(l))]=(...r)=>e(l,...r)}),n}let qd=0;function E1(){Aa(e=>{if(!el)return;const t=document.querySelectorAll("[data-reka-focus-guard]");document.body.insertAdjacentElement("afterbegin",t[0]??Zv()),document.body.insertAdjacentElement("beforeend",t[1]??Zv()),qd++,e(()=>{qd===1&&document.querySelectorAll("[data-reka-focus-guard]").forEach(a=>a.remove()),qd--})})}function Zv(){const e=document.createElement("span");return e.setAttribute("data-reka-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}function lp(e){return k(()=>ca(e)?!!gr(e)?.closest("form"):!0)}function lt(){const e=kn(),t=E(),a=k(()=>n());yf(()=>{a.value!==n()&&Mx(t)});function n(){return t.value&&"$el"in t.value&&["#text","#comment"].includes(t.value.$el.nodeName)?t.value.$el.nextElementSibling:gr(t)}const l=Object.assign({},e.exposed),r={};for(const i in e.props)Object.defineProperty(r,i,{enumerable:!0,configurable:!0,get:()=>e.props[i]});if(Object.keys(l).length>0)for(const i in l)Object.defineProperty(r,i,{enumerable:!0,configurable:!0,get:()=>l[i]});Object.defineProperty(r,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=r;function o(i){if(t.value=i,!!i&&(Object.defineProperty(r,"$el",{enumerable:!0,configurable:!0,get:()=>i instanceof Element?i:i.$el}),!(i instanceof Element)&&!Object.hasOwn(i,"$el"))){const u=i.$.exposed,c=Object.assign({},r);for(const d in u)Object.defineProperty(c,d,{enumerable:!0,configurable:!0,get:()=>u[d]});e.exposed=c}}return{forwardRef:o,currentRef:t,currentElement:a}}function Nu(e){const t=kn(),a=Object.keys(t?.type.props??{}).reduce((l,r)=>{const o=(t?.type.props[r]).default;return o!==void 0&&(l[r]=o),l},{}),n=qx(e);return k(()=>{const l={},r=t?.vnode.props??{};return Object.keys(r).forEach(o=>{l[Qt(o)]=r[o]}),Object.keys({...a,...l}).reduce((o,i)=>(n.value[i]!==void 0&&(o[i]=n.value[i]),o),{})})}function Cn(e,t){const a=Nu(e),n=t?yr(t):{};return k(()=>({...a.value,...n}))}var pA=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Mr=new WeakMap,ai=new WeakMap,ni={},Ld=0,A1=function(e){return e&&(e.host||A1(e.parentNode))},mA=function(e,t){return t.map(function(a){if(e.contains(a))return a;var n=A1(a);return n&&e.contains(n)?n:(console.error("aria-hidden",a,"in not contained inside",e,". Doing nothing"),null)}).filter(function(a){return!!a})},vA=function(e,t,a,n){var l=mA(t,Array.isArray(e)?e:[e]);ni[a]||(ni[a]=new WeakMap);var r=ni[a],o=[],i=new Set,u=new Set(l),c=function(p){!p||i.has(p)||(i.add(p),c(p.parentNode))};l.forEach(c);var d=function(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,function(v){if(i.has(v))d(v);else try{var m=v.getAttribute(n),y=m!==null&&m!=="false",x=(Mr.get(v)||0)+1,C=(r.get(v)||0)+1;Mr.set(v,x),r.set(v,C),o.push(v),x===1&&y&&ai.set(v,!0),C===1&&v.setAttribute(a,"true"),y||v.setAttribute(n,"true")}catch(w){console.error("aria-hidden: cannot operate on ",v,w)}})};return d(t),i.clear(),Ld++,function(){o.forEach(function(p){var v=Mr.get(p)-1,m=r.get(p)-1;Mr.set(p,v),r.set(p,m),v||(ai.has(p)||p.removeAttribute(n),ai.delete(p)),m||p.removeAttribute(a)}),Ld--,Ld||(Mr=new WeakMap,Mr=new WeakMap,ai=new WeakMap,ni={})}},hA=function(e,t,a){a===void 0&&(a="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),l=pA(e);return l?(n.push.apply(n,Array.from(l.querySelectorAll("[aria-live], script"))),vA(n,l,a,"aria-hidden")):function(){return null}};function rp(e){let t;Ve(()=>gr(e),a=>{let n=!1;try{n=!!a?.closest("[popover]:not(:popover-open)")}catch{}a&&!n?t=hA(a):t&&t()}),Qn(()=>{t&&t()})}function Jn(e,t="reka"){let a;const n=Pu({useId:void 0});return n.useId?a=n.useId():a=gf?.(),t?`${t}-${a}`:a}function ho(){return{ALT:"Alt",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",BACKSPACE:"Backspace",CAPS_LOCK:"CapsLock",CONTROL:"Control",DELETE:"Delete",END:"End",ENTER:"Enter",ESCAPE:"Escape",F1:"F1",F10:"F10",F11:"F11",F12:"F12",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",HOME:"Home",META:"Meta",PAGE_DOWN:"PageDown",PAGE_UP:"PageUp",SHIFT:"Shift",SPACE:" ",TAB:"Tab",CTRL:"Control",ASTERISK:"*",SPACE_CODE:"Space"}}function Bu(e){const t=Pu({locale:E("en")});return k(()=>e?.value||t.locale?.value||"en")}function gA(e){const t=E(),a=k(()=>t.value?.width??0),n=k(()=>t.value?.height??0);return $t(()=>{const l=gr(e);if(l){t.value={width:l.offsetWidth,height:l.offsetHeight};const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let u,c;if("borderBoxSize"in i){const d=i.borderBoxSize,p=Array.isArray(d)?d[0]:d;u=p.inlineSize,c=p.blockSize}else u=l.offsetWidth,c=l.offsetHeight;t.value={width:u,height:c}});return r.observe(l,{box:"border-box"}),()=>r.unobserve(l)}else t.value=void 0}),{width:a,height:n}}function yA(e,t){const a=E(e);function n(r){return t[a.value][r]??a.value}return{state:a,dispatch:r=>{a.value=n(r)}}}function bA(e){const t=nE("",1e3);return{search:t,handleTypeaheadSearch:(l,r)=>{t.value=t.value+l;{const o=Jt(),i=r.map(v=>({...v,textValue:v.value?.textValue??v.ref.textContent?.trim()??""})),u=i.find(v=>v.ref===o),c=i.map(v=>v.textValue),d=xA(c,t.value,u?.textValue),p=i.find(v=>v.textValue===d);return p&&p.ref.focus(),p?.ref}},resetTypeahead:()=>{t.value=""}}}function _A(e,t){return e.map((a,n)=>e[(t+n)%e.length])}function xA(e,t,a){const l=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,r=a?e.indexOf(a):-1;let o=_A(e,Math.max(r,0));l.length===1&&(o=o.filter(c=>c!==a));const u=o.find(c=>c.toLowerCase().startsWith(l.toLowerCase()));return u!==a?u:void 0}function kA(e,t){const a=E({}),n=E("none"),l=E(e),r=e.value?"mounted":"unmounted";let o;const i=t.value?.ownerDocument.defaultView??zf,{state:u,dispatch:c}=yA(r,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),d=C=>{if(el){const w=new CustomEvent(C,{bubbles:!1,cancelable:!1});t.value?.dispatchEvent(w)}};Ve(e,async(C,w)=>{const S=w!==C;if(await Ge(),S){const L=n.value,O=li(t.value);C?(c("MOUNT"),d("enter"),O==="none"&&d("after-enter")):O==="none"||O==="undefined"||a.value?.display==="none"?(c("UNMOUNT"),d("leave"),d("after-leave")):w&&L!==O?(c("ANIMATION_OUT"),d("leave")):(c("UNMOUNT"),d("after-leave"))}},{immediate:!0});const p=C=>{const w=li(t.value),S=w.includes(CSS.escape(C.animationName)),L=u.value==="mounted"?"enter":"leave";if(C.target===t.value&&S&&(d(`after-${L}`),c("ANIMATION_END"),!l.value)){const O=t.value.style.animationFillMode;t.value.style.animationFillMode="forwards",o=i?.setTimeout(()=>{t.value?.style.animationFillMode==="forwards"&&(t.value.style.animationFillMode=O)})}C.target===t.value&&w==="none"&&c("ANIMATION_END")},v=C=>{C.target===t.value&&(n.value=li(t.value))},m=Ve(t,(C,w)=>{C?(a.value=getComputedStyle(C),C.addEventListener("animationstart",v),C.addEventListener("animationcancel",p),C.addEventListener("animationend",p)):(c("ANIMATION_END"),o!==void 0&&i?.clearTimeout(o),w?.removeEventListener("animationstart",v),w?.removeEventListener("animationcancel",p),w?.removeEventListener("animationend",p))},{immediate:!0}),y=Ve(u,()=>{const C=li(t.value);n.value=u.value==="mounted"?C:"none"});return Qn(()=>{m(),y()}),{isPresent:k(()=>["mounted","unmountSuspended"].includes(u.value))}}function li(e){return e&&getComputedStyle(e).animationName||"none"}var br=ae({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:a}){const{present:n,forceMount:l}=Kt(e),r=E(),{isPresent:o}=kA(n,r);a({present:o});let i=t.default({present:o.value});i=jf(i||[]);const u=kn();if(i&&i?.length>1){const c=u?.parent?.type.name?`<${u.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${c}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(d=>` - ${d}`).join(` +`)].join(` +`))}return()=>l.value||n.value||o.value?qa(t.default({present:o.value})[0],{ref:c=>{const d=gr(c);return typeof d?.hasAttribute>"u"||(d?.hasAttribute("data-reka-popper-content-wrapper")?r.value=d.firstElementChild:r.value=d),d}}):null}});const zc=ae({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:t,slots:a}){return()=>{if(!a.default)return null;const n=jf(a.default()),l=n.findIndex(u=>u.type!==Ga);if(l===-1)return n;const r=n[l];delete r.props?.ref;const o=r.props?Ye(t,r.props):t,i=Tl({...r,props:{}},o);return n.length===1?i:(n[l]=i,n)}}}),wA=["area","img","input"],rt=ae({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(e,{attrs:t,slots:a}){const n=e.asChild?"template":e.as;return typeof n=="string"&&wA.includes(n)?()=>qa(n,t):n!=="template"?()=>qa(e.as,t,{default:a.default}):()=>qa(zc,t,{default:a.default})}});function dr(){const e=E(),t=k(()=>["#text","#comment"].includes(e.value?.$el.nodeName)?e.value?.$el.nextElementSibling:gr(e));return{primitiveElement:e,currentElement:t}}const[tl,$A]=Ot("DialogRoot");var CA=ae({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1,default:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(e,{emit:t}){const a=e,l=Ft(a,"open",t,{defaultValue:a.defaultOpen,passive:a.open===void 0}),r=E(),o=E(),{modal:i}=Kt(a);return $A({open:l,modal:i,openModal:()=>{l.value=!0},onOpenChange:u=>{l.value=u},onOpenToggle:()=>{l.value=!l.value},contentId:"",titleId:"",descriptionId:"",triggerElement:r,contentElement:o}),(u,c)=>Se(u.$slots,"default",{open:s(l),close:()=>l.value=!1})}}),al=CA,SA=ae({__name:"DialogClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e;lt();const a=tl();return(n,l)=>(f(),V(s(rt),Ye(t,{type:n.as==="button"?"button":void 0,onClick:l[0]||(l[0]=r=>s(a).onOpenChange(!1))}),{default:N(()=>[Se(n.$slots,"default")]),_:3},16,["type"]))}}),Pl=SA;const EA="dismissableLayer.pointerDownOutside",AA="dismissableLayer.focusOutside";function T1(e,t){if(!(t instanceof Element))return!1;const a=t.closest("[data-dismissable-layer]"),n=e.dataset.dismissableLayer===""?e:e.querySelector("[data-dismissable-layer]"),l=Array.from(e.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(a&&(n===a||l.indexOf(n){});return Aa(o=>{if(!el||!ca(a))return;const i=async c=>{const d=c.target;if(!(!t?.value||!d)){if(T1(t.value,d)){l.value=!1;return}if(c.target&&!l.value){let v=function(){Ff(EA,e,p)};const p={originalEvent:c};c.pointerType==="touch"?(n.removeEventListener("click",r.value),r.value=v,n.addEventListener("click",r.value,{once:!0})):v()}else n.removeEventListener("click",r.value);l.value=!1}},u=window.setTimeout(()=>{n.addEventListener("pointerdown",i)},0);o(()=>{window.clearTimeout(u),n.removeEventListener("pointerdown",i),n.removeEventListener("click",r.value)})}),{onPointerDownCapture:()=>{ca(a)&&(l.value=!0)}}}function MA(e,t,a=!0){const n=t?.value?.ownerDocument??globalThis?.document,l=E(!1);return Aa(r=>{if(!el||!ca(a))return;const o=async i=>{if(!t?.value)return;await Ge(),await Ge();const u=i.target;!t.value||!u||T1(t.value,u)||i.target&&!l.value&&Ff(AA,e,{originalEvent:i})};n.addEventListener("focusin",o),r(()=>n.removeEventListener("focusin",o))}),{onFocusCapture:()=>{ca(a)&&(l.value=!0)},onBlurCapture:()=>{ca(a)&&(l.value=!1)}}}const ba=Ka({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,originalBodyPointerEvents:void 0,branches:new Set});var DA=ae({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(e,{emit:t}){const a=e,n=t,{forwardRef:l,currentElement:r}=lt(),o=k(()=>r.value?.ownerDocument??globalThis.document),i=k(()=>ba.layersRoot),u=k(()=>r.value?Array.from(i.value).indexOf(r.value):-1),c=k(()=>ba.layersWithOutsidePointerEventsDisabled.size>0),d=k(()=>{const m=Array.from(i.value),[y]=[...ba.layersWithOutsidePointerEventsDisabled].slice(-1),x=m.indexOf(y);return u.value>=x}),p=TA(async m=>{const y=[...ba.branches].some(x=>x?.contains(m.target));!d.value||y||(n("pointerDownOutside",m),n("interactOutside",m),await Ge(),m.defaultPrevented||n("dismiss"))},r),v=MA(m=>{[...ba.branches].some(x=>x?.contains(m.target))||(n("focusOutside",m),n("interactOutside",m),m.defaultPrevented||n("dismiss"))},r);return iE("Escape",m=>{u.value===i.value.size-1&&(n("escapeKeyDown",m),m.defaultPrevented||n("dismiss"))}),Ve([r,()=>a.disableOutsidePointerEvents],([m,y],x,C)=>{m&&(y&&(ba.layersWithOutsidePointerEventsDisabled.size===0&&(ba.originalBodyPointerEvents=o.value.body.style.pointerEvents,o.value.body.style.pointerEvents="none"),ba.layersWithOutsidePointerEventsDisabled.add(m),C(()=>{ba.layersWithOutsidePointerEventsDisabled.delete(m),ba.layersWithOutsidePointerEventsDisabled.size===0&&!$a(ba.originalBodyPointerEvents)&&(o.value.body.style.pointerEvents=ba.originalBodyPointerEvents)})),i.value.add(m))},{immediate:!0}),Aa(m=>{m(()=>{r.value&&(i.value.delete(r.value),ba.layersWithOutsidePointerEventsDisabled.delete(r.value))})}),(m,y)=>(f(),V(s(rt),{ref:s(l),"as-child":m.asChild,as:m.as,"data-dismissable-layer":"",style:ra({pointerEvents:c.value?d.value?"auto":"none":void 0}),onFocusCapture:s(v).onFocusCapture,onBlurCapture:s(v).onBlurCapture,onPointerdownCapture:s(p).onPointerDownCapture},{default:N(()=>[Se(m.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),op=DA;const OA=Y4(()=>E([]));function PA(){const e=OA();return{add(t){const a=e.value[0];t!==a&&a?.pause(),e.value=Xv(e.value,t),e.value.unshift(t)},remove(t){e.value=Xv(e.value,t),e.value[0]?.resume()}}}function Xv(e,t){const a=[...e],n=a.indexOf(t);return n!==-1&&a.splice(n,1),a}const Nd="focusScope.autoFocusOnMount",Bd="focusScope.autoFocusOnUnmount",Qv={bubbles:!1,cancelable:!0};function IA(e,{select:t=!1}={}){const a=Jt();for(const n of e)if(bl(n,{select:t}),Jt()!==a)return!0}function RA(e){const t=M1(e),a=eh(t,e),n=eh(t.reverse(),e);return[a,n]}function M1(e){const t=[],a=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const l=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||l?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;a.nextNode();)t.push(a.currentNode);return t}function eh(e,t){for(const a of e)if(!qA(a,{upTo:t}))return a}function qA(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function LA(e){return e instanceof HTMLInputElement&&"select"in e}function bl(e,{select:t=!1}={}){if(e&&e.focus){const a=Jt();e.focus({preventScroll:!0}),e!==a&&LA(e)&&t&&e.select()}}var NA=ae({__name:"FocusScope",props:{loop:{type:Boolean,required:!1,default:!1},trapped:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["mountAutoFocus","unmountAutoFocus"],setup(e,{emit:t}){const a=e,n=t,{currentRef:l,currentElement:r}=lt(),o=E(null),i=PA(),u=Ka({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});Aa(d=>{if(!el)return;const p=r.value;if(!a.trapped)return;function v(C){if(u.paused||!p)return;const w=C.target;p.contains(w)?o.value=w:bl(o.value,{select:!0})}function m(C){if(u.paused||!p)return;const w=C.relatedTarget;w!==null&&(p.contains(w)||bl(o.value,{select:!0}))}function y(C){const w=o.value;if(w===null||!C.some(O=>O.removedNodes.length>0))return;p.contains(w)||bl(p)}document.addEventListener("focusin",v),document.addEventListener("focusout",m);const x=new MutationObserver(y);p&&x.observe(p,{childList:!0,subtree:!0}),d(()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",m),x.disconnect()})}),Aa(async d=>{const p=r.value;if(await Ge(),!p)return;i.add(u);const v=Jt();if(!p.contains(v)){const y=new CustomEvent(Nd,Qv);p.addEventListener(Nd,x=>n("mountAutoFocus",x)),p.dispatchEvent(y),y.defaultPrevented||(IA(M1(p),{select:!0}),Jt()===v&&bl(p))}d(()=>{p.removeEventListener(Nd,C=>n("mountAutoFocus",C));const y=new CustomEvent(Bd,Qv),x=C=>{n("unmountAutoFocus",C)};p.addEventListener(Bd,x),p.dispatchEvent(y),p.setAttribute("data-focus-scope-unmounting",""),setTimeout(()=>{y.defaultPrevented||bl(v??document.body,{select:!0}),p.removeEventListener(Bd,x),i.remove(u),p.removeAttribute("data-focus-scope-unmounting")},0)})});function c(d){if(!a.loop&&!a.trapped||u.paused)return;const p=d.key==="Tab"&&!d.altKey&&!d.ctrlKey&&!d.metaKey,v=Jt();if(p&&v){const m=d.currentTarget,[y,x]=RA(m);y&&x?!d.shiftKey&&v===x?(d.preventDefault(),a.loop&&bl(y,{select:!0})):d.shiftKey&&v===y&&(d.preventDefault(),a.loop&&bl(x,{select:!0})):v===m&&d.preventDefault()}}return(d,p)=>(f(),V(s(rt),{ref_key:"currentRef",ref:l,tabindex:"-1","as-child":d.asChild,as:d.as,onKeydown:c},{default:N(()=>[Se(d.$slots,"default")]),_:3},8,["as-child","as"]))}}),sp=NA;const BA="menu.itemSelect",jc=["Enter"," "],FA=["ArrowDown","PageUp","Home"],D1=["ArrowUp","PageDown","End"],VA=[...FA,...D1];[...jc],[...jc];function O1(e){return e?"open":"closed"}function P1(e){return e==="indeterminate"}function I1(e){return P1(e)?"indeterminate":e?"checked":"unchecked"}function zA(e){const t=Jt();for(const a of e)if(a===t||(a.focus(),Jt()!==t))return}function jA(e,t){const{x:a,y:n}=e;let l=!1;for(let r=0,o=t.length-1;rn!=d>n&&a<(c-i)*(n-u)/(d-u)+i&&(l=!l)}return l}function UA(e,t){if(!t)return!1;const a={x:e.clientX,y:e.clientY};return jA(a,t)}function eu(e){return e.pointerType==="mouse"}var HA=ae({__name:"DialogContentImpl",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const a=e,n=t,l=tl(),{forwardRef:r,currentElement:o}=lt();return l.titleId||=Jn(void 0,"reka-dialog-title"),l.descriptionId||=Jn(void 0,"reka-dialog-description"),$t(()=>{l.contentElement=o,Jt()!==document.body&&(l.triggerElement.value=Jt())}),(i,u)=>(f(),V(s(sp),{"as-child":"",loop:"",trapped:a.trapFocus,onMountAutoFocus:u[5]||(u[5]=c=>n("openAutoFocus",c)),onUnmountAutoFocus:u[6]||(u[6]=c=>n("closeAutoFocus",c))},{default:N(()=>[D(s(op),Ye({id:s(l).contentId,ref:s(r),as:i.as,"as-child":i.asChild,"disable-outside-pointer-events":i.disableOutsidePointerEvents,role:"dialog","aria-describedby":s(l).descriptionId,"aria-labelledby":s(l).titleId,"data-state":s(O1)(s(l).open.value)},i.$attrs,{onDismiss:u[0]||(u[0]=c=>s(l).onOpenChange(!1)),onEscapeKeyDown:u[1]||(u[1]=c=>n("escapeKeyDown",c)),onFocusOutside:u[2]||(u[2]=c=>n("focusOutside",c)),onInteractOutside:u[3]||(u[3]=c=>n("interactOutside",c)),onPointerDownOutside:u[4]||(u[4]=c=>n("pointerDownOutside",c))}),{default:N(()=>[Se(i.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),R1=HA,KA=ae({__name:"DialogContentModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const a=e,n=t,l=tl(),r=yr(n),{forwardRef:o,currentElement:i}=lt();return rp(i),(u,c)=>(f(),V(R1,Ye({...a,...s(r)},{ref:s(o),"trap-focus":s(l).open.value,"disable-outside-pointer-events":a.disableOutsidePointerEvents,onCloseAutoFocus:c[0]||(c[0]=d=>{d.defaultPrevented||(d.preventDefault(),s(l).triggerElement.value?.focus())}),onPointerDownOutside:c[1]||(c[1]=d=>{const p=d.detail.originalEvent,v=p.button===0&&p.ctrlKey===!0;(p.button===2||v)&&d.preventDefault()}),onFocusOutside:c[2]||(c[2]=d=>{d.preventDefault()})}),{default:N(()=>[Se(u.$slots,"default")]),_:3},16,["trap-focus","disable-outside-pointer-events"]))}}),WA=KA,GA=ae({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const a=e,l=yr(t);lt();const r=tl(),o=E(!1),i=E(!1);return(u,c)=>(f(),V(R1,Ye({...a,...s(l)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:c[0]||(c[0]=d=>{d.defaultPrevented||(o.value||s(r).triggerElement.value?.focus(),d.preventDefault()),o.value=!1,i.value=!1}),onInteractOutside:c[1]||(c[1]=d=>{d.defaultPrevented||(o.value=!0,d.detail.originalEvent.type==="pointerdown"&&(i.value=!0));const p=d.target;s(r).triggerElement.value?.contains(p)&&d.preventDefault(),d.detail.originalEvent.type==="focusin"&&i.value&&d.preventDefault()})}),{default:N(()=>[Se(u.$slots,"default")]),_:3},16))}}),YA=GA,JA=ae({__name:"DialogContent",props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:void 0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const a=e,n=t,l=tl(),r=yr(n),{forwardRef:o}=lt();return(i,u)=>(f(),V(s(br),{present:i.forceMount||s(l).open.value},{default:N(()=>[s(l).modal.value?(f(),V(WA,Ye({key:0,ref:s(o)},{...a,...s(r),...i.$attrs}),{default:N(()=>[Se(i.$slots,"default")]),_:3},16)):(f(),V(YA,Ye({key:1,ref:s(o)},{...a,...s(r),...i.$attrs}),{default:N(()=>[Se(i.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),nl=JA,ZA=ae({__name:"DialogDescription",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"p"}},setup(e){const t=e;lt();const a=tl();return(n,l)=>(f(),V(s(rt),Ye(t,{id:s(a).descriptionId}),{default:N(()=>[Se(n.$slots,"default")]),_:3},16,["id"]))}}),hn=ZA,XA=ae({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=tl();return Uf(!0),lt(),(a,n)=>(f(),V(s(rt),{as:a.as,"as-child":a.asChild,"data-state":s(t).open.value?"open":"closed",style:{"pointer-events":"auto"},onPointerdown:n[0]||(n[0]=mt(()=>{},["left","self","prevent"]))},{default:N(()=>[Se(a.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),QA=XA,e5=ae({__name:"DialogOverlay",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=tl(),{forwardRef:a}=lt();return(n,l)=>s(t)?.modal.value?(f(),V(s(br),{key:0,present:n.forceMount||s(t).open.value},{default:N(()=>[D(QA,Ye(n.$attrs,{ref:s(a),as:n.as,"as-child":n.asChild}),{default:N(()=>[Se(n.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):G("v-if",!0)}}),ll=e5,t5=ae({__name:"Teleport",props:{to:{type:null,required:!1,default:"body"},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=oE();return(a,n)=>s(t)||a.forceMount?(f(),V(Zx,{key:0,to:a.to,disabled:a.disabled,defer:a.defer},[Se(a.$slots,"default")],8,["to","disabled","defer"])):G("v-if",!0)}}),Fu=t5,a5=ae({__name:"DialogPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=e;return(a,n)=>(f(),V(s(Fu),ut(ft(t)),{default:N(()=>[Se(a.$slots,"default")]),_:3},16))}}),zl=a5,n5=ae({__name:"DialogTitle",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"h2"}},setup(e){const t=e,a=tl();return lt(),(n,l)=>(f(),V(s(rt),Ye(t,{id:s(a).titleId}),{default:N(()=>[Se(n.$slots,"default")]),_:3},16,["id"]))}}),bn=n5;const[l5,r5]=Ot("AlertDialogContent");var o5=ae({__name:"AlertDialogContent",props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const a=e,l=yr(t);lt();const r=E();return r5({onCancelElementChange:o=>{r.value=o}}),(o,i)=>(f(),V(s(nl),Ye({...a,...s(l)},{role:"alertdialog",onPointerDownOutside:i[0]||(i[0]=mt(()=>{},["prevent"])),onInteractOutside:i[1]||(i[1]=mt(()=>{},["prevent"])),onOpenAutoFocus:i[2]||(i[2]=()=>{Ge(()=>{r.value?.focus({preventScroll:!0})})})}),{default:N(()=>[Se(o.$slots,"default")]),_:3},16))}}),s5=o5,i5=ae({__name:"AlertDialogCancel",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,a=l5(),{forwardRef:n,currentElement:l}=lt();return $t(()=>{a.onCancelElementChange(l.value)}),(r,o)=>(f(),V(s(Pl),Ye(t,{ref:s(n)}),{default:N(()=>[Se(r.$slots,"default")]),_:3},16))}}),u5=i5,d5=ae({__name:"AlertDialogDescription",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"p"}},setup(e){const t=e;return lt(),(a,n)=>(f(),V(s(hn),ut(ft(t)),{default:N(()=>[Se(a.$slots,"default")]),_:3},16))}}),c5=d5,f5=ae({__name:"AlertDialogOverlay",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return lt(),(a,n)=>(f(),V(s(ll),ut(ft(t)),{default:N(()=>[Se(a.$slots,"default")]),_:3},16))}}),p5=f5,m5=ae({__name:"AlertDialogPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=e;return(a,n)=>(f(),V(s(Fu),ut(ft(t)),{default:N(()=>[Se(a.$slots,"default")]),_:3},16))}}),v5=m5,h5=ae({__name:"AlertDialogRoot",props:{open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1}},emits:["update:open"],setup(e,{emit:t}){const l=Cn(e,t);return lt(),(r,o)=>(f(),V(s(al),Ye(s(l),{modal:!0}),{default:N(i=>[Se(r.$slots,"default",ut(ft(i)))]),_:3},16))}}),g5=h5,y5=ae({__name:"AlertDialogTitle",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"h2"}},setup(e){const t=e;return lt(),(a,n)=>(f(),V(s(bn),ut(ft(t)),{default:N(()=>[Se(a.$slots,"default")]),_:3},16))}}),b5=y5;const th="data-reka-collection-item";function ip(e={}){const{key:t="",isProvider:a=!1}=e,n=`${t}CollectionProvider`;let l;a?(l={collectionRef:E(),itemMap:E(new Map)},yt(n,l)):l=ct(n);const r=(d=!1)=>{const p=l.collectionRef.value;if(!p)return[];const v=Array.from(p.querySelectorAll(`[${th}]`)),y=Array.from(l.itemMap.value.values()).sort((x,C)=>v.indexOf(x.ref)-v.indexOf(C.ref));return d?y:y.filter(x=>x.ref.dataset.disabled!=="")},o=ae({name:"CollectionSlot",inheritAttrs:!1,setup(d,{slots:p,attrs:v}){const{primitiveElement:m,currentElement:y}=dr();return Ve(y,()=>{l.collectionRef.value=y.value}),()=>qa(zc,{ref:m,...v},p)}}),i=ae({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(d,{slots:p,attrs:v}){const{primitiveElement:m,currentElement:y}=dr();return Aa(x=>{if(y.value){const C=Ti(y.value);l.itemMap.value.set(C,{ref:y.value,value:d.value}),x(()=>l.itemMap.value.delete(C))}}),()=>qa(zc,{...v,[th]:"",ref:m},p)}}),u=k(()=>Array.from(l.itemMap.value.values())),c=k(()=>l.itemMap.value.size);return{getItems:r,reactiveItems:u,itemMapSize:c,CollectionSlot:o,CollectionItem:i}}var _5=ae({__name:"VisuallyHidden",props:{feature:{type:String,required:!1,default:"focusable"},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){return(t,a)=>(f(),V(s(rt),{as:t.as,"as-child":t.asChild,"aria-hidden":t.feature==="focusable"?"true":void 0,"data-hidden":t.feature==="fully-hidden"?"":void 0,tabindex:t.feature==="fully-hidden"?"-1":void 0,style:{position:"absolute",border:0,width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",wordWrap:"normal",top:"-1px",left:"-1px"}},{default:N(()=>[Se(t.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}}),up=_5,x5=ae({inheritAttrs:!1,__name:"VisuallyHiddenInputBubble",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(e){const t=e,{primitiveElement:a,currentElement:n}=dr(),l=k(()=>t.checked??t.value);return Ve(l,(r,o)=>{if(!n.value)return;const i=n.value,u=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(u,"value").set;if(d&&r!==o){const p=new Event("input",{bubbles:!0}),v=new Event("change",{bubbles:!0});d.call(i,r),i.dispatchEvent(p),i.dispatchEvent(v)}}),(r,o)=>(f(),V(up,Ye({ref_key:"primitiveElement",ref:a},{...t,...r.$attrs},{as:"input"}),null,16))}}),ah=x5,k5=ae({inheritAttrs:!1,__name:"VisuallyHiddenInput",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(e){const t=e,a=k(()=>typeof t.value=="object"&&Array.isArray(t.value)&&t.value.length===0&&t.required),n=k(()=>typeof t.value=="string"||typeof t.value=="number"||typeof t.value=="boolean"||t.value===null||t.value===void 0?[{name:t.name,value:t.value}]:typeof t.value=="object"&&Array.isArray(t.value)?t.value.flatMap((l,r)=>typeof l=="object"?Object.entries(l).map(([o,i])=>({name:`${t.name}[${r}][${o}]`,value:i})):{name:`${t.name}[${r}]`,value:l}):t.value!==null&&typeof t.value=="object"&&!Array.isArray(t.value)?Object.entries(t.value).map(([l,r])=>({name:`${t.name}[${l}]`,value:r})):[]);return(l,r)=>(f(),b(ve,null,[G(" We render single input if it's required "),a.value?(f(),V(ah,Ye({key:l.name},{...t,...l.$attrs},{name:l.name,value:l.value}),null,16,["name","value"])):(f(!0),b(ve,{key:1},Ie(n.value,o=>(f(),V(ah,Ye({key:o.name},{ref_for:!0},{...t,...l.$attrs},{name:o.name,value:o.value}),null,16,["name","value"]))),128))],2112))}}),dp=k5;const w5="rovingFocusGroup.onEntryFocus",$5={bubbles:!1,cancelable:!0},C5={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function S5(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function E5(e,t,a){const n=S5(e.key,a);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return C5[n]}function q1(e,t=!1){const a=Jt();for(const n of e)if(n===a||(n.focus({preventScroll:t}),Jt()!==a))return}function A5(e,t){return e.map((a,n)=>e[(t+n)%e.length])}const[L1,T5]=Ot("PopperRoot");var M5=ae({inheritAttrs:!1,__name:"PopperRoot",setup(e){const t=E();return T5({anchor:t,onAnchorChange:a=>t.value=a}),(a,n)=>Se(a.$slots,"default")}}),N1=M5,D5=ae({__name:"PopperAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:a,currentElement:n}=lt(),l=L1();return Zg(()=>{l.onAnchorChange(t.reference??n.value)}),(r,o)=>(f(),V(s(rt),{ref:s(a),as:r.as,"as-child":r.asChild},{default:N(()=>[Se(r.$slots,"default")]),_:3},8,["as","as-child"]))}}),cp=D5;function O5(e){return e!==null}function P5(e){return{name:"transformOrigin",options:e,fn(t){const{placement:a,rects:n,middlewareData:l}=t,o=l.arrow?.centerOffset!==0,i=o?0:e.arrowWidth,u=o?0:e.arrowHeight,[c,d]=Uc(a),p={start:"0%",center:"50%",end:"100%"}[d],v=(l.arrow?.x??0)+i/2,m=(l.arrow?.y??0)+u/2;let y="",x="";return c==="bottom"?(y=o?p:`${v}px`,x=`${-u}px`):c==="top"?(y=o?p:`${v}px`,x=`${n.floating.height+u}px`):c==="right"?(y=`${-u}px`,x=o?p:`${m}px`):c==="left"&&(y=`${n.floating.width+u}px`,x=o?p:`${m}px`),{data:{x:y,y:x}}}}}function Uc(e){const[t,a="center"]=e.split("-");return[t,a]}const I5=["top","right","bottom","left"],Il=Math.min,zn=Math.max,tu=Math.round,ri=Math.floor,jn=e=>({x:e,y:e}),R5={left:"right",right:"left",bottom:"top",top:"bottom"};function B1(e,t,a){return zn(e,Il(t,a))}function Zn(e,t){return typeof e=="function"?e(t):e}function Rl(e){return e.split("-")[0]}function go(e){return e.split("-")[1]}function fp(e){return e==="x"?"y":"x"}function pp(e){return e==="y"?"height":"width"}function pn(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function mp(e){return fp(pn(e))}function q5(e,t,a){a===void 0&&(a=!1);const n=go(e),l=mp(e),r=pp(l);let o=l==="x"?n===(a?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(o=au(o)),[o,au(o)]}function L5(e){const t=au(e);return[Hc(e),t,Hc(t)]}function Hc(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const nh=["left","right"],lh=["right","left"],N5=["top","bottom"],B5=["bottom","top"];function F5(e,t,a){switch(e){case"top":case"bottom":return a?t?lh:nh:t?nh:lh;case"left":case"right":return t?N5:B5;default:return[]}}function V5(e,t,a,n){const l=go(e);let r=F5(Rl(e),a==="start",n);return l&&(r=r.map(o=>o+"-"+l),t&&(r=r.concat(r.map(Hc)))),r}function au(e){const t=Rl(e);return R5[t]+e.slice(t.length)}function z5(e){var t,a,n,l;return{top:(t=e.top)!=null?t:0,right:(a=e.right)!=null?a:0,bottom:(n=e.bottom)!=null?n:0,left:(l=e.left)!=null?l:0}}function F1(e){return typeof e!="number"?z5(e):{top:e,right:e,bottom:e,left:e}}function nu(e){const{x:t,y:a,width:n,height:l}=e;return{width:n,height:l,top:a,left:t,right:t+n,bottom:a+l,x:t,y:a}}function rh(e,t,a){let{reference:n,floating:l}=e;const r=pn(t),o=mp(t),i=pp(o),u=Rl(t),c=r==="y",d=n.x+n.width/2-l.width/2,p=n.y+n.height/2-l.height/2,v=n[i]/2-l[i]/2;let m;switch(u){case"top":m={x:d,y:n.y-l.height};break;case"bottom":m={x:d,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:p};break;case"left":m={x:n.x-l.width,y:p};break;default:m={x:n.x,y:n.y}}const y=go(t);return y&&(m[o]+=v*(y==="end"?1:-1)*(a&&c?-1:1)),m}async function j5(e,t){var a;t===void 0&&(t={});const{x:n,y:l,platform:r,rects:o,elements:i,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:v=!1,padding:m=0}=Zn(t,e),y=F1(m),C=i[v?p==="floating"?"reference":"floating":p],w=nu(await r.getClippingRect({element:(a=await(r.isElement==null?void 0:r.isElement(C)))==null||a?C:C.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(i.floating)),boundary:c,rootBoundary:d,strategy:u})),S=p==="floating"?{x:n,y:l,width:o.floating.width,height:o.floating.height}:o.reference,L=await(r.getOffsetParent==null?void 0:r.getOffsetParent(i.floating)),O=await(r.isElement==null?void 0:r.isElement(L))&&await(r.getScale==null?void 0:r.getScale(L))||{x:1,y:1},M=nu(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:S,offsetParent:L,strategy:u}):S);return{top:(w.top-M.top+y.top)/O.y,bottom:(M.bottom-w.bottom+y.bottom)/O.y,left:(w.left-M.left+y.left)/O.x,right:(M.right-w.right+y.right)/O.x}}const U5=50,H5=async(e,t,a)=>{const{placement:n="bottom",strategy:l="absolute",middleware:r=[],platform:o}=a,i=o.detectOverflow?o:{...o,detectOverflow:j5},u=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:l}),{x:d,y:p}=rh(c,n,u),v=n,m=0;const y={};for(let x=0;x({name:"arrow",options:e,async fn(t){const{x:a,y:n,placement:l,rects:r,platform:o,elements:i,middlewareData:u}=t,{element:c,padding:d=0}=Zn(e,t)||{};if(c==null)return{};const p=F1(d),v={x:a,y:n},m=mp(l),y=pp(m),x=await o.getDimensions(c),C=m==="y",w=C?"top":"left",S=C?"bottom":"right",L=C?"clientHeight":"clientWidth",O=r.reference[y]+r.reference[m]-v[m]-r.floating[y],M=v[m]-r.reference[m],R=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let q=R?R[L]:0;(!q||!await(o.isElement==null?void 0:o.isElement(R)))&&(q=i.floating[L]||r.floating[y]);const K=O/2-M/2,T=q/2-x[y]/2-1,I=Il(p[w],T),W=Il(p[S],T),A=q-x[y]-W,B=q/2-x[y]/2+K,Y=B1(I,B,A),U=!u.arrow&&go(l)!=null&&B!==Y&&r.reference[y]/2-(BY<=0)){var W,A;const Y=(((W=r.flip)==null?void 0:W.index)||0)+1,U=q[Y];if(U&&(!(p==="alignment"?S!==pn(U):!1)||I.every(fe=>pn(fe.placement)===S?fe.overflows[0]>0:!0)))return{data:{index:Y,overflows:I},reset:{placement:U}};let H=(A=I.filter(re=>re.overflows[0]<=0).sort((re,fe)=>re.overflows[1]-fe.overflows[1])[0])==null?void 0:A.placement;if(!H)switch(m){case"bestFit":{var B;const re=(B=I.filter(fe=>{if(R){const Ae=pn(fe.placement);return Ae===S||Ae==="y"}return!0}).map(fe=>[fe.placement,fe.overflows.filter(Ae=>Ae>0).reduce((Ae,xe)=>Ae+xe,0)]).sort((fe,Ae)=>fe[1]-Ae[1])[0])==null?void 0:B[0];re&&(H=re);break}case"initialPlacement":H=i;break}if(l!==H)return{reset:{placement:H}}}return{}}}};function oh(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function sh(e){return I5.some(t=>e[t]>=0)}const G5=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:a,platform:n}=t,{strategy:l="referenceHidden",...r}=Zn(e,t);switch(l){case"referenceHidden":{const o=await n.detectOverflow(t,{...r,elementContext:"reference"}),i=oh(o,a.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:sh(i)}}}case"escaped":{const o=await n.detectOverflow(t,{...r,altBoundary:!0}),i=oh(o,a.floating);return{data:{escapedOffsets:i,escaped:sh(i)}}}default:return{}}}}},V1=new Set(["left","top"]);async function Y5(e,t){const{placement:a,platform:n,elements:l}=e,r=await(n.isRTL==null?void 0:n.isRTL(l.floating)),o=Rl(a),i=go(a),u=pn(a)==="y",c=V1.has(o)?-1:1,d=r&&u?-1:1,p=Zn(t,e);let{mainAxis:v,crossAxis:m,alignmentAxis:y}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return i&&typeof y=="number"&&(m=i==="end"?y*-1:y),u?{x:m*d,y:v*c}:{x:v*c,y:m*d}}const J5=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var a,n;const{x:l,y:r,placement:o,middlewareData:i}=t,u=await Y5(t,e);return o===((a=i.offset)==null?void 0:a.placement)&&(n=i.arrow)!=null&&n.alignmentOffset?{}:{x:l+u.x,y:r+u.y,data:{...u,placement:o}}}}},Z5=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:a,y:n,placement:l,platform:r}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:u={fn:S=>{let{x:L,y:O}=S;return{x:L,y:O}}},...c}=Zn(e,t),d={x:a,y:n},p=await r.detectOverflow(t,c),v=pn(l),m=fp(v);let y=d[m],x=d[v];const C=(S,L)=>B1(L+p[S==="y"?"top":"left"],L,L-p[S==="y"?"bottom":"right"]);o&&(y=C(m,y)),i&&(x=C(v,x));const w=u.fn({...t,[m]:y,[v]:x});return{...w,data:{x:w.x-a,y:w.y-n,enabled:{[m]:o,[v]:i}}}}}},X5=function(e){return e===void 0&&(e={}),{options:e,fn(t){var a,n;const{x:l,y:r,placement:o,rects:i,middlewareData:u}=t,{offset:c=0,mainAxis:d=!0,crossAxis:p=!0}=Zn(e,t),v={x:l,y:r},m=pn(o),y=fp(m);let x=v[y],C=v[m];const w=Zn(c,t),S=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:(a=w.mainAxis)!=null?a:0,crossAxis:(n=w.crossAxis)!=null?n:0};if(d){const M=y==="y"?"height":"width",R=i.reference[y]-i.floating[M]+S.mainAxis,q=i.reference[y]+i.reference[M]-S.mainAxis;xq&&(x=q)}if(p){var L,O;const M=y==="y"?"width":"height",R=V1.has(Rl(o)),q=i.reference[m]-i.floating[M]+(R&&((L=u.offset)==null?void 0:L[m])||0)+(R?0:S.crossAxis),K=i.reference[m]+i.reference[M]+(R?0:((O=u.offset)==null?void 0:O[m])||0)-(R?S.crossAxis:0);CK&&(C=K)}return{[y]:x,[m]:C}}}},Q5=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:a,rects:n,platform:l,elements:r}=t,{apply:o=()=>{},...i}=Zn(e,t),u=await l.detectOverflow(t,i),c=Rl(a),d=go(a),p=pn(a)==="y",{width:v,height:m}=n.floating;let y,x;c==="top"||c==="bottom"?(y=c,x=d===(await(l.isRTL==null?void 0:l.isRTL(r.floating))?"start":"end")?"left":"right"):(x=c,y=d==="end"?"top":"bottom");const C=m-u.top-u.bottom,w=v-u.left-u.right,S=Il(m-u[y],C),L=Il(v-u[x],w),O=t.middlewareData.shift,M=!O;let R=S,q=L;O!=null&&O.enabled.x&&(q=w),O!=null&&O.enabled.y&&(R=C),M&&!d&&(p?q=v-2*zn(u.left,u.right):R=m-2*zn(u.top,u.bottom)),await o({...t,availableWidth:q,availableHeight:R});const K=await l.getDimensions(r.floating);return v!==K.width||m!==K.height?{reset:{rects:!0}}:{}}}};function Vu(){return typeof window<"u"}function _r(e){return vp(e)?(e.nodeName||"").toLowerCase():"#document"}function ha(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function rl(e){var t;return(t=(vp(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function vp(e){return Vu()?e instanceof Node||e instanceof ha(e).Node:!1}function _n(e){return Vu()?e instanceof Element||e instanceof ha(e).Element:!1}function jl(e){return Vu()?e instanceof HTMLElement||e instanceof ha(e).HTMLElement:!1}function ih(e){return!Vu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ha(e).ShadowRoot}function zu(e){const{overflow:t,overflowX:a,overflowY:n,display:l}=xn(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+a)&&l!=="inline"&&l!=="contents"}function eT(e){return/^(table|td|th)$/.test(_r(e))}function ju(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const tT=/transform|translate|scale|rotate|perspective|filter/,aT=/paint|layout|strict|content/,Xl=e=>!!e&&e!=="none";let Fd;function hp(e){const t=_n(e)?xn(e):e;return Xl(t.transform)||Xl(t.translate)||Xl(t.scale)||Xl(t.rotate)||Xl(t.perspective)||!gp()&&(Xl(t.backdropFilter)||Xl(t.filter))||tT.test(t.willChange||"")||aT.test(t.contain||"")}function nT(e){let t=cr(e);for(;jl(t)&&!ws(t);){if(hp(t))return t;if(ju(t))return null;t=cr(t)}return null}function gp(){return Fd==null&&(Fd=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Fd}function ws(e){return/^(html|body|#document)$/.test(_r(e))}function xn(e){return ha(e).getComputedStyle(e)}function Uu(e){return _n(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function cr(e){if(_r(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ih(e)&&e.host||rl(e);return ih(t)?t.host:t}function z1(e){const t=cr(e);return ws(t)?(e.ownerDocument||e).body:jl(t)&&zu(t)?t:z1(t)}function $s(e,t,a){var n;t===void 0&&(t=[]),a===void 0&&(a=!0);const l=z1(e),r=l===((n=e.ownerDocument)==null?void 0:n.body),o=ha(l);if(r){const i=Kc(o);return t.concat(o,o.visualViewport||[],zu(l)?l:[],i&&a?$s(i):[])}else return t.concat(l,$s(l,[],a))}function Kc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function j1(e){const t=xn(e);let a=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const l=jl(e),r=l?e.offsetWidth:a,o=l?e.offsetHeight:n,i=tu(a)!==r||tu(n)!==o;return i&&(a=r,n=o),{width:a,height:n,$:i}}function yp(e){return _n(e)?e:e.contextElement}function Xr(e){const t=yp(e);if(!jl(t))return jn(1);const a=t.getBoundingClientRect(),{width:n,height:l,$:r}=j1(t);let o=(r?tu(a.width):a.width)/n,i=(r?tu(a.height):a.height)/l;return(!o||!Number.isFinite(o))&&(o=1),(!i||!Number.isFinite(i))&&(i=1),{x:o,y:i}}const lT=jn(0);function U1(e){const t=ha(e);return!gp()||!t.visualViewport?lT:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function rT(e,t,a){return t===void 0&&(t=!1),!!a&&t&&a===ha(e)}function fr(e,t,a,n){t===void 0&&(t=!1),a===void 0&&(a=!1);const l=e.getBoundingClientRect(),r=yp(e);let o=jn(1);t&&(n?_n(n)&&(o=Xr(n)):o=Xr(e));const i=rT(r,a,n)?U1(r):jn(0);let u=(l.left+i.x)/o.x,c=(l.top+i.y)/o.y,d=l.width/o.x,p=l.height/o.y;if(r&&n){const v=ha(r),m=_n(n)?ha(n):n;let y=v,x=Kc(y);for(;x&&m!==y;){const C=Xr(x),w=x.getBoundingClientRect(),S=xn(x),L=w.left+(x.clientLeft+parseFloat(S.paddingLeft))*C.x,O=w.top+(x.clientTop+parseFloat(S.paddingTop))*C.y;u*=C.x,c*=C.y,d*=C.x,p*=C.y,u+=L,c+=O,y=ha(x),x=Kc(y)}}return nu({width:d,height:p,x:u,y:c})}function Hu(e,t){const a=Uu(e).scrollLeft;return t?t.left+a:fr(rl(e)).left+a}function H1(e,t){const a=e.getBoundingClientRect(),n=a.left+t.scrollLeft-Hu(e,a),l=a.top+t.scrollTop;return{x:n,y:l}}function oT(e){let{elements:t,rect:a,offsetParent:n,strategy:l}=e;const r=l==="fixed",o=rl(n),i=t?ju(t.floating):!1;if(n===o||i&&r)return a;let u={scrollLeft:0,scrollTop:0},c=jn(1);const d=jn(0),p=jl(n);if((p||!r)&&((_r(n)!=="body"||zu(o))&&(u=Uu(n)),p)){const m=fr(n);c=Xr(n),d.x=m.x+n.clientLeft,d.y=m.y+n.clientTop}const v=o&&!p&&!r?H1(o,u):jn(0);return{width:a.width*c.x,height:a.height*c.y,x:a.x*c.x-u.scrollLeft*c.x+d.x+v.x,y:a.y*c.y-u.scrollTop*c.y+d.y+v.y}}function sT(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function iT(e){const t=Uu(e),a=e.ownerDocument.body,n=zn(e.scrollWidth,e.clientWidth,a.scrollWidth,a.clientWidth),l=zn(e.scrollHeight,e.clientHeight,a.scrollHeight,a.clientHeight);let r=-t.scrollLeft+Hu(e);const o=-t.scrollTop;return xn(a).direction==="rtl"&&(r+=zn(e.clientWidth,a.clientWidth)-n),{width:n,height:l,x:r,y:o}}const uT=25;function dT(e,t,a){a===void 0&&(a="viewport");const n=a==="layoutViewport",l=ha(e),r=rl(e),o=l.visualViewport;let i=r.clientWidth,u=r.clientHeight,c=0,d=0;if(o){const v=!gp()||t==="fixed";n?v||(c=-o.offsetLeft,d=-o.offsetTop):(i=o.width,u=o.height,v&&(c=o.offsetLeft,d=o.offsetTop))}if(Hu(r)<=0){const v=r.ownerDocument,m=v.body,y=getComputedStyle(m),x=v.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,C=Math.abs(r.clientWidth-m.clientWidth-x),w=getComputedStyle(r).scrollbarGutter==="stable both-edges"?C/2:C;w<=uT&&(i-=w)}return{width:i,height:u,x:c,y:d}}function cT(e,t){const a=fr(e,!0,t==="fixed"),n=a.top+e.clientTop,l=a.left+e.clientLeft,r=Xr(e),o=e.clientWidth*r.x,i=e.clientHeight*r.y,u=l*r.x,c=n*r.y;return{width:o,height:i,x:u,y:c}}function uh(e,t,a){let n;if(t==="viewport"||t==="layoutViewport")n=dT(e,a,t);else if(t==="document")n=iT(rl(e));else if(_n(t))n=cT(t,a);else{const l=U1(e);n={x:t.x-l.x,y:t.y-l.y,width:t.width,height:t.height}}return nu(n)}function fT(e,t){const a=t.get(e);if(a)return a;let n=$s(e,[],!1).filter(i=>_n(i)&&_r(i)!=="body"),l=null;const r=xn(e).position==="fixed";let o=r?cr(e):e;for(;_n(o)&&!ws(o);){const i=xn(o),u=hp(o),c=l?l.position:r?"fixed":"";!u&&(c==="fixed"||c==="absolute"&&i.position==="static")?n=n.filter(p=>p!==o):l=i,o=cr(o)}return t.set(e,n),n}function pT(e){let{element:t,boundary:a,rootBoundary:n,strategy:l}=e;const o=[...a==="clippingAncestors"?ju(t)?[]:fT(t,this._c):[].concat(a),n],i=uh(t,o[0],l);let u=i.top,c=i.right,d=i.bottom,p=i.left;for(let v=1;v{i(!1,1e-7)},1e3)}q=!1}try{n=new IntersectionObserver(K,{...R,root:r.ownerDocument})}catch{n=new IntersectionObserver(K,R)}n.observe(e)}const u=ha(e),c=()=>i(a);return u.addEventListener("resize",c),i(!0),()=>{u.removeEventListener("resize",c),o()}}function _T(e,t,a,n){n===void 0&&(n={});const{ancestorScroll:l=!0,ancestorResize:r=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:u=!1}=n,c=yp(e),d=l||r?[...c?$s(c):[],...t?$s(t):[]]:[];d.forEach(w=>{l&&w.addEventListener("scroll",a),r&&w.addEventListener("resize",a)});const p=c&&i?bT(c,a,r):null;let v=-1,m=null;o&&(m=new ResizeObserver(w=>{let[S]=w;S&&S.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var L;(L=m)==null||L.observe(t)})),a()}),c&&!u&&m.observe(c),t&&m.observe(t));let y,x=u?fr(e):null;u&&C();function C(){const w=fr(e);x&&!W1(x,w)&&a(),x=w,y=requestAnimationFrame(C)}return a(),()=>{var w;d.forEach(S=>{l&&S.removeEventListener("scroll",a),r&&S.removeEventListener("resize",a)}),p?.(),(w=m)==null||w.disconnect(),m=null,u&&cancelAnimationFrame(y)}}const xT=J5,kT=Z5,ch=W5,wT=Q5,$T=G5,CT=K5,ST=X5,ET=(e,t,a)=>{const n=new Map,l=a??{},r={...yT,...l.platform,_c:n};return H5(e,t,{...l,platform:r})};function AT(e){return e!=null&&typeof e=="object"&&"$el"in e}function Wc(e){if(AT(e)){const t=e.$el;return vp(t)&&_r(t)==="#comment"?null:t}return e}function Lr(e){return typeof e=="function"?e():s(e)}function TT(e){return{name:"arrow",options:e,fn(t){const a=Wc(Lr(e.element));return a==null?{}:CT({element:a,padding:e.padding}).fn(t)}}}function G1(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function fh(e,t){const a=G1(e);return Math.round(t*a)/a}function MT(e,t,a){a===void 0&&(a={});const n=a.whileElementsMounted,l=k(()=>{var q;return(q=Lr(a.open))!=null?q:!0}),r=k(()=>Lr(a.middleware)),o=k(()=>{var q;return(q=Lr(a.placement))!=null?q:"bottom"}),i=k(()=>{var q;return(q=Lr(a.strategy))!=null?q:"absolute"}),u=k(()=>{var q;return(q=Lr(a.transform))!=null?q:!0}),c=k(()=>Wc(e.value)),d=k(()=>Wc(t.value)),p=E(0),v=E(0),m=E(i.value),y=E(o.value),x=pr({}),C=E(!1),w=k(()=>{const q={position:m.value,left:"0",top:"0"};if(!d.value)return q;const K=fh(d.value,p.value),T=fh(d.value,v.value);return u.value?{...q,transform:"translate("+K+"px, "+T+"px)",...G1(d.value)>=1.5&&{willChange:"transform"}}:{position:m.value,left:K+"px",top:T+"px"}});let S;function L(){if(c.value==null||d.value==null)return;const q=l.value;ET(c.value,d.value,{middleware:r.value,placement:o.value,strategy:i.value}).then(K=>{p.value=K.x,v.value=K.y,m.value=K.strategy,y.value=K.placement,x.value=K.middlewareData,C.value=q!==!1})}function O(){typeof S=="function"&&(S(),S=void 0)}function M(){if(O(),n===void 0){L();return}if(c.value!=null&&d.value!=null){S=n(c.value,d.value,L);return}}function R(){l.value||(C.value=!1)}return Ve([r,o,i,l],L,{flush:"sync"}),Ve([c,d],M,{flush:"sync"}),Ve(l,R,{flush:"sync"}),ff()&&Cg(O),{x:Er(p),y:Er(v),strategy:Er(m),placement:Er(y),middlewareData:Er(x),isPositioned:Er(C),floatingStyles:w,update:L}}const Y1={side:"bottom",sideOffset:0,sideFlip:!0,align:"center",alignOffset:0,alignFlip:!0,arrowPadding:0,hideShiftedArrow:!0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,positionStrategy:"fixed",updatePositionStrategy:"optimized",prioritizePosition:!1},[cZ,DT]=Ot("PopperContent");var OT=ae({inheritAttrs:!1,__name:"PopperContent",props:fy({side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...Y1}),emits:["placed"],setup(e,{emit:t}){const a=e,n=t,l=L1(),{forwardRef:r,currentElement:o}=lt(),i=E(),u=E(),{width:c,height:d}=gA(u),p=k(()=>a.side+(a.align!=="center"?`-${a.align}`:"")),v=k(()=>typeof a.collisionPadding=="number"?a.collisionPadding:{top:0,right:0,bottom:0,left:0,...a.collisionPadding}),m=k(()=>Array.isArray(a.collisionBoundary)?a.collisionBoundary:[a.collisionBoundary]),y=k(()=>({padding:v.value,boundary:m.value.filter(O5),altBoundary:m.value.length>0})),x=k(()=>({mainAxis:a.sideFlip,crossAxis:a.alignFlip})),C=G4(()=>[xT({mainAxis:a.sideOffset+d.value,alignmentAxis:a.alignOffset}),a.prioritizePosition&&a.avoidCollisions&&ch({...y.value,...x.value}),a.avoidCollisions&&kT({mainAxis:!0,crossAxis:!!a.prioritizePosition,limiter:a.sticky==="partial"?ST():void 0,...y.value}),!a.prioritizePosition&&a.avoidCollisions&&ch({...y.value,...x.value}),wT({...y.value,apply:({elements:A,rects:B,availableWidth:Y,availableHeight:U})=>{const{width:H,height:re}=B.reference,fe=A.floating.style;fe.setProperty("--reka-popper-available-width",`${Y}px`),fe.setProperty("--reka-popper-available-height",`${U}px`),fe.setProperty("--reka-popper-anchor-width",`${H}px`),fe.setProperty("--reka-popper-anchor-height",`${re}px`)}}),u.value&&TT({element:u.value,padding:a.arrowPadding}),P5({arrowWidth:c.value,arrowHeight:d.value}),a.hideWhenDetached&&$T({strategy:"referenceHidden",...y.value})]),w=k(()=>a.reference??l.anchor.value),{floatingStyles:S,placement:L,isPositioned:O,middlewareData:M}=MT(w,i,{strategy:a.positionStrategy,placement:p,whileElementsMounted:(...A)=>_T(...A,{layoutShift:!a.disableUpdateOnLayoutShift,animationFrame:a.updatePositionStrategy==="always"}),middleware:C}),R=k(()=>Uc(L.value)[0]),q=k(()=>Uc(L.value)[1]);Zg(()=>{O.value&&n("placed")});const K=k(()=>{const A=M.value.arrow?.centerOffset!==0;return a.hideShiftedArrow&&A}),T=E("");Aa(()=>{o.value&&(T.value=window.getComputedStyle(o.value).zIndex)});const I=k(()=>M.value.arrow?.x??0),W=k(()=>M.value.arrow?.y??0);return DT({placedSide:R,onArrowChange:A=>u.value=A,arrowX:I,arrowY:W,shouldHideArrow:K}),(A,B)=>(f(),b("div",{ref_key:"floatingRef",ref:i,"data-reka-popper-content-wrapper":"",style:ra({...s(S),transform:s(O)?s(S).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:T.value,"--reka-popper-transform-origin":[s(M).transformOrigin?.x,s(M).transformOrigin?.y].join(" "),...s(M).hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}})},[D(s(rt),Ye({ref:s(r)},A.$attrs,{"as-child":a.asChild,as:A.as,"data-side":R.value,"data-align":q.value,style:{animation:s(O)?void 0:"none"}}),{default:N(()=>[Se(A.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4))}}),J1=OT;const bp=["day","month","year"],_p=["hour","minute","second","dayPeriod"],Z1=[...bp,..._p];function PT(e){return bp.includes(e)}function X1(e){return Z1.includes(e)}const IT=["ach","af","am","an","ar","ast","az","be","bg","bn","br","bs","ca","cak","ckb","cs","cy","da","de","dsb","el","en","eo","es","et","eu","fa","ff","fi","fr","fy","ga","gd","gl","he","hr","hsb","hu","ia","id","it","ja","ka","kk","kn","ko","lb","lo","lt","lv","meh","ml","ms","nl","nn","no","oc","pl","pt","rm","ro","ru","sc","scn","sk","sl","sr","sv","szl","tg","th","tr","uk","zh-CN","zh-TW"],RT=["year","month","day"],zd={ach:{year:"mwaka",month:"dwe",day:"nino"},af:{year:"jjjj",month:"mm",day:"dd"},am:{year:"ዓዓዓዓ",month:"ሚሜ",day:"ቀቀ"},an:{year:"aaaa",month:"mm",day:"dd"},ar:{year:"سنة",month:"شهر",day:"يوم"},ast:{year:"aaaa",month:"mm",day:"dd"},az:{year:"iiii",month:"aa",day:"gg"},be:{year:"гггг",month:"мм",day:"дд"},bg:{year:"гггг",month:"мм",day:"дд"},bn:{year:"yyyy",month:"মিমি",day:"dd"},br:{year:"bbbb",month:"mm",day:"dd"},bs:{year:"gggg",month:"mm",day:"dd"},ca:{year:"aaaa",month:"mm",day:"dd"},cak:{year:"jjjj",month:"ii",day:"q'q'"},ckb:{year:"ساڵ",month:"مانگ",day:"ڕۆژ"},cs:{year:"rrrr",month:"mm",day:"dd"},cy:{year:"bbbb",month:"mm",day:"dd"},da:{year:"åååå",month:"mm",day:"dd"},de:{year:"jjjj",month:"mm",day:"tt"},dsb:{year:"llll",month:"mm",day:"źź"},el:{year:"εεεε",month:"μμ",day:"ηη"},en:{year:"yyyy",month:"mm",day:"dd"},eo:{year:"jjjj",month:"mm",day:"tt"},es:{year:"aaaa",month:"mm",day:"dd"},et:{year:"aaaa",month:"kk",day:"pp"},eu:{year:"uuuu",month:"hh",day:"ee"},fa:{year:"سال",month:"ماه",day:"روز"},ff:{year:"hhhh",month:"ll",day:"ññ"},fi:{year:"vvvv",month:"kk",day:"pp"},fr:{year:"aaaa",month:"mm",day:"jj"},fy:{year:"jjjj",month:"mm",day:"dd"},ga:{year:"bbbb",month:"mm",day:"ll"},gd:{year:"bbbb",month:"mm",day:"ll"},gl:{year:"aaaa",month:"mm",day:"dd"},he:{year:"שנה",month:"חודש",day:"יום"},hr:{year:"gggg",month:"mm",day:"dd"},hsb:{year:"llll",month:"mm",day:"dd"},hu:{year:"éééé",month:"hh",day:"nn"},ia:{year:"aaaa",month:"mm",day:"dd"},id:{year:"tttt",month:"bb",day:"hh"},it:{year:"aaaa",month:"mm",day:"gg"},ja:{year:" 年 ",month:"月",day:"日"},ka:{year:"წწწწ",month:"თთ",day:"რრ"},kk:{year:"жжжж",month:"аа",day:"кк"},kn:{year:"ವವವವ",month:"ಮಿಮೀ",day:"ದಿದಿ"},ko:{year:"연도",month:"월",day:"일"},lb:{year:"jjjj",month:"mm",day:"dd"},lo:{year:"ປປປປ",month:"ດດ",day:"ວວ"},lt:{year:"mmmm",month:"mm",day:"dd"},lv:{year:"gggg",month:"mm",day:"dd"},meh:{year:"aaaa",month:"mm",day:"dd"},ml:{year:"വർഷം",month:"മാസം",day:"തീയതി"},ms:{year:"tttt",month:"mm",day:"hh"},nl:{year:"jjjj",month:"mm",day:"dd"},nn:{year:"åååå",month:"mm",day:"dd"},no:{year:"åååå",month:"mm",day:"dd"},oc:{year:"aaaa",month:"mm",day:"jj"},pl:{year:"rrrr",month:"mm",day:"dd"},pt:{year:"aaaa",month:"mm",day:"dd"},rm:{year:"oooo",month:"mm",day:"dd"},ro:{year:"aaaa",month:"ll",day:"zz"},ru:{year:"гггг",month:"мм",day:"дд"},sc:{year:"aaaa",month:"mm",day:"dd"},scn:{year:"aaaa",month:"mm",day:"jj"},sk:{year:"rrrr",month:"mm",day:"dd"},sl:{year:"llll",month:"mm",day:"dd"},sr:{year:"гггг",month:"мм",day:"дд"},sv:{year:"åååå",month:"mm",day:"dd"},szl:{year:"rrrr",month:"mm",day:"dd"},tg:{year:"сссс",month:"мм",day:"рр"},th:{year:"ปปปป",month:"ดด",day:"วว"},tr:{year:"yyyy",month:"aa",day:"gg"},uk:{year:"рррр",month:"мм",day:"дд"},"zh-CN":{year:"年",month:"月",day:"日"},"zh-TW":{year:"年",month:"月",day:"日"}};function qT(e){if(ph(e))return zd[e];{const t=FT(e);return ph(t)?zd[t]:zd.en}}function jd(e,t,a){return LT(e)?qT(a)[e]:BT(e)?t:NT(e)?"––":""}function ph(e){return IT.includes(e)}function LT(e){return RT.includes(e)}function NT(e){return e==="hour"||e==="minute"||e==="second"}function BT(e){return e==="era"||e==="dayPeriod"}function FT(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}const VT=["hour","minute","second"];function Gc(e){return Object.fromEntries(_p.map(t=>t==="dayPeriod"?[t,e.formatter.dayPeriod(Pa(e.value))]:[t,e.value[t]]))}function mh(e){const{formatter:t}=e,a=bp.map(n=>[n,e.value[n]]);if("hour"in e.value){const n=Gc({value:e.value,formatter:t});return{...Object.fromEntries(a),...n}}return Object.fromEntries(a)}function zT(e){return Object.fromEntries(_p.map(t=>t==="dayPeriod"?[t,"AM"]:[t,null]).filter(([t])=>!(t==="literal"||t===null||e==="minute"&&t==="second"||e==="hour"&&(t==="second"||t==="minute"))))}function jT(e){const t=Z1.map(a=>a==="dayPeriod"?[a,"AM"]:[a,null]).filter(([a])=>a==="literal"||a===null||e==="minute"&&a==="second"||e==="hour"&&(a==="second"||a==="minute")?!1:e==="day"?!VT.includes(a)&&a!=="dayPeriod":!0);return Object.fromEntries(t)}function UT(e){const{segmentValues:t,formatter:a,locale:n}=e;function l(o){if("hour"in t){const i=t[o];return i!==null?o==="day"?a.part(e.dateRef.set({[o]:i,month:t.month??1}),o,{hourCycle:ks(e.hourCycle)}):a.part(e.dateRef.set({[o]:i}),o,{hourCycle:ks(e.hourCycle)}):jd(o,"",n.value)}else{if(PT(o)){const i=t[o];return i!==null?o==="day"?a.part(e.dateRef.set({[o]:i,month:t.month??1}),o):a.part(e.dateRef.set({[o]:i}),o):jd(o,"",n.value)}return""}}return Object.keys(t).reduce((o,i)=>{if(!X1(i))return o;if("hour"in t&&i==="dayPeriod"){const u=t[i];u!==null?o[i]=u:o[i]=jd(i,"AM",n.value)}else o[i]=l(i);return o},{})}function HT(e){const{granularity:t,formatter:a,contentObj:n,hideTimeZone:l,hourCycle:r,isTimeValue:o}=e;return a.toParts(e.dateRef,cA(t,r,o)).map(c=>["literal","timeZoneName",null].includes(c.type)||!X1(c.type)?{part:c.type,value:c.value}:{part:c.type,value:n[c.type]}).filter(c=>!(c.part===null||c.value===null||c.part==="timeZoneName"&&(!xs(e.dateRef)||l)||(!xs(e.dateRef)||l)&&c.part==="literal"&&["[","]"].includes(c.value.trim())))}function Q1(e){const t=UT(e),a=HT({contentObj:t,...e});return{obj:t,arr:a}}function On(e){const t=ho();return e===t.ARROW_RIGHT||e===t.ARROW_LEFT}function tr(e){return!Number.isNaN(Number.parseInt(e))}function ml(e){const t=ho();return!!([t.ENTER,t.ARROW_UP,t.ARROW_DOWN,t.ARROW_LEFT,t.ARROW_RIGHT,t.BACKSPACE,t.SPACE,"a","A","p","P"].includes(e)||tr(e))}function vh(e){return Array.from(e.querySelectorAll("[data-reka-date-field-segment]")).filter(t=>t.getAttribute("data-reka-date-field-segment")!=="literal")}function hh(e){return Array.from(e.querySelectorAll("[data-reka-time-field-segment]")).filter(t=>t.getAttribute("data-reka-time-field-segment")!=="literal")}const KT=/^\d$/;function Ul(e){return{role:"spinbutton",contenteditable:!0,tabindex:e.disabled?void 0:0,spellcheck:!1,inputmode:"numeric",autocorrect:"off",enterkeyhint:"next",style:"caret-color: transparent;"}}function WT(e){const{segmentValues:t,placeholder:a}=e,n=t.day===null,l={};t.day&&(l.day=t.day),t.month&&(l.month=t.month);const r=Object.keys(l).length>0?a.set(l):a,o=r.day,i=1,u=Al(r),c=n?"Empty":`${o}`;return{...Ul(e),"aria-label":"day,","aria-valuemin":i,"aria-valuemax":u,"aria-valuenow":o,"aria-valuetext":c,"data-placeholder":n?"":void 0}}function GT(e){const{segmentValues:t,placeholder:a,formatter:n}=e,l=t.month===null,r=t.month?a.set({month:t.month}):a,o=r.month,i=1,u=12,c=l?"Empty":`${o} - ${n.fullMonth(Pa(r))}`;return{...Ul(e),"aria-label":"month, ",contenteditable:!0,"aria-valuemin":i,"aria-valuemax":u,"aria-valuenow":o,"aria-valuetext":c,"data-placeholder":l?"":void 0}}function YT(e){const{segmentValues:t,placeholder:a}=e,n=t.year===null,l=t.year?a.set({year:t.year}):a,r=1,o=9999,i=l.year,u=n?"Empty":`${i}`;return{...Ul(e),"aria-label":"year, ","aria-valuemin":r,"aria-valuemax":o,"aria-valuenow":i,"aria-valuetext":u,"data-placeholder":n?"":void 0}}function JT(e){const{segmentValues:t,hourCycle:a,placeholder:n}=e;if(!("hour"in t)||!("hour"in n))return{};const l=t.hour===null,r=t.hour?n.set({hour:t.hour}):n,o=a===12?1:0,i=a===12?12:23,u=r.hour,c=l?"Empty":`${u} ${t.dayPeriod??""}`;return{...Ul(e),"aria-label":"hour, ","aria-valuemin":o,"aria-valuemax":i,"aria-valuenow":u,"aria-valuetext":c,"data-placeholder":l?"":void 0}}function ZT(e){const{segmentValues:t,placeholder:a}=e;if(!("minute"in t)||!("minute"in a))return{};const n=t.minute===null,r=(t.minute?a.set({minute:t.minute}):a).minute,o=0,i=59,u=n?"Empty":`${r}`;return{...Ul(e),"aria-label":"minute, ","aria-valuemin":o,"aria-valuemax":i,"aria-valuenow":r,"aria-valuetext":u,"data-placeholder":n?"":void 0}}function XT(e){const{segmentValues:t,placeholder:a}=e;if(!("second"in t)||!("second"in a))return{};const n=t.second===null,r=(t.second?a.set({second:t.second}):a).second,o=0,i=59,u=n?"Empty":`${r}`;return{...Ul(e),"aria-label":"second, ","aria-valuemin":o,"aria-valuemax":i,"aria-valuenow":r,"aria-valuetext":u,"data-placeholder":n?"":void 0}}function QT(e){const{segmentValues:t}=e;if(!("dayPeriod"in t))return{};const a=0,n=12,l=t.hour?t.hour>12?t.hour-12:t.hour:0,r=t.dayPeriod??"AM";return{...Ul(e),inputmode:"text","aria-label":"AM/PM","aria-valuemin":a,"aria-valuemax":n,"aria-valuenow":l,"aria-valuetext":r}}function e8(e){return{"aria-hidden":!0,"data-segment":"literal"}}function t8(e){return{role:"textbox","aria-label":"timezone, ","data-readonly":!0,"data-segment":"timeZoneName",tabindex:e.disabled?void 0:0,style:"caret-color: transparent;"}}function a8(e){const{segmentValues:t,placeholder:a}=e,n=0,l=0,r=0,o="era"in t?t.era:a.era;return{...Ul(e),"aria-label":"era","aria-valuemin":n,"aria-valuemax":l,"aria-valuenow":r,"aria-valuetext":o}}const n8={day:{attrs:WT},month:{attrs:GT},year:{attrs:YT},hour:{attrs:JT},minute:{attrs:ZT},second:{attrs:XT},dayPeriod:{attrs:QT},literal:{attrs:e8},timeZoneName:{attrs:t8},era:{attrs:a8}};function e0(e){const t=ho();function a({e:T,part:I,dateRef:W,prevValue:A}){const B=e.step.value[I]??1,Y=T.key===t.ARROW_UP?B:-B,U=0,H=59;if(A===null)return Y>0?U:H;const re=[I,Y];return W.set({[I]:A}).cycle(...re)[I]}function n(T){if(e.hasLeftFocus.value=!1,T===null)return T;const I=T.toString();return I.length===1?(e.modelValue.value=void 0,null):Number.parseInt(I.slice(0,-1))}function l({e:T,part:I,dateRef:W,prevValue:A}){const B=e.step.value[I]??1,Y=T.key===t.ARROW_UP?B:-B;if(A===null)return W[I];if(I==="hour"&&"hour"in W){const H=[I,Y];return W.set({[I]:A}).cycle(...H)[I]}const U=[I,Y];return I==="day"?W.set({[I]:A,month:e.segmentValues.value.month??1}).cycle(...U)[I]:W.set({[I]:A}).cycle(...U)[I]}function r(T,I,W){let A=!1;const B=Math.floor(T/10);if(e.hasLeftFocus.value&&(e.hasLeftFocus.value=!1,e.lastKeyZero.value=!1,W=null),W===null)return I===0?(e.lastKeyZero.value=!0,{value:null,moveToNext:A}):((e.lastKeyZero.value||I>B)&&(A=!0),e.lastKeyZero.value=!1,{value:I,moveToNext:A});const Y=W.toString().length,U=Number.parseInt(W.toString()+I.toString());return Y===2||U>T?((I>B||U>T)&&(A=!0),{value:I,moveToNext:A}):(A=!0,{value:U,moveToNext:A})}function o(T,I){let A=!1;const B=Math.floor(59/10);if(e.hasLeftFocus.value&&(e.hasLeftFocus.value=!1,e.lastKeyZero.value=!1,I=null),I===null)return T===0?(e.lastKeyZero.value=!0,{value:0,moveToNext:A}):((e.lastKeyZero.value||T>B)&&(A=!0),e.lastKeyZero.value=!1,{value:T,moveToNext:A});const Y=I.toString().length,U=Number.parseInt(I.toString()+T.toString());return Y===2||U>59?(T>B&&(A=!0),{value:T,moveToNext:A}):(A=!0,{value:U,moveToNext:A})}function i(T,I,W){let A=!1;const B=Math.floor(T/10);if(e.hasLeftFocus.value&&(e.hasLeftFocus.value=!1,e.lastKeyZero.value=!1,W=null),W===null)return I===0?(e.lastKeyZero.value=!0,{value:0,moveToNext:A}):((e.lastKeyZero.value||I>B)&&(A=!0),e.lastKeyZero.value=!1,{value:I,moveToNext:A});const Y=W.toString().length,U=Number.parseInt(W.toString()+I.toString());return Y===2||U>T?(I>B&&(A=!0),{value:I,moveToNext:A}):(A=!0,{value:U,moveToNext:A})}function u(T,I){let W=!1;if(e.hasLeftFocus.value&&(e.hasLeftFocus.value=!1,I=null),I===null)return{value:T===0?1:T,moveToNext:W};const A=I.toString()+T.toString();return A.length>4?{value:T===0?1:T,moveToNext:W}:(A.length===4&&(W=!0),{value:Number.parseInt(A),moveToNext:W})}const c=k(()=>n8[e.part]?.attrs({disabled:e.disabled.value,placeholder:e.placeholder.value,hourCycle:e.hourCycle,segmentValues:e.segmentValues.value,formatter:e.formatter})??{});function d(T){if(!ml(T.key)||On(T.key))return;const I=e.segmentValues.value.day;if(T.key===t.ARROW_DOWN||T.key===t.ARROW_UP){e.segmentValues.value.day=l({e:T,part:"day",dateRef:e.placeholder.value,prevValue:I});return}if(tr(T.key)){const W=Number.parseInt(T.key),A=e.segmentValues.value.month,B=A?Al(e.placeholder.value.set({month:A})):31,{value:Y,moveToNext:U}=r(B,W,I);e.segmentValues.value.day=Y,U&&e.focusNext()}T.key===t.BACKSPACE&&(e.hasLeftFocus.value=!1,e.segmentValues.value.day=n(I))}function p(T){if(!ml(T.key)||On(T.key))return;const I=e.segmentValues.value.month;if(T.key===t.ARROW_DOWN||T.key===t.ARROW_UP){e.segmentValues.value.month=l({e:T,part:"month",dateRef:e.placeholder.value,prevValue:I});return}if(tr(T.key)){const W=Number.parseInt(T.key),{value:A,moveToNext:B}=r(12,W,I);e.segmentValues.value.month=A,B&&e.focusNext()}T.key===t.BACKSPACE&&(e.hasLeftFocus.value=!1,e.segmentValues.value.month=n(I))}function v(T){if(!ml(T.key)||On(T.key))return;const I=e.segmentValues.value.year;if(T.key===t.ARROW_DOWN||T.key===t.ARROW_UP){e.segmentValues.value.year=l({e:T,part:"year",dateRef:e.placeholder.value,prevValue:I});return}if(tr(T.key)){const W=Number.parseInt(T.key),{value:A,moveToNext:B}=u(W,I);e.segmentValues.value.year=A,B&&e.focusNext()}T.key===t.BACKSPACE&&(e.hasLeftFocus.value=!1,e.segmentValues.value.year=n(I))}function m(T){const I=new za(T,{hour:"numeric"}).resolvedOptions().hourCycle;return I==="h11"||I==="h12"}function y(T){const I=e.placeholder.value;if(!ml(T.key)||On(T.key)||!("hour"in I)||!("hour"in e.segmentValues.value))return;const W=e.segmentValues.value.hour;if(T.key===t.ARROW_UP||T.key===t.ARROW_DOWN){const A=l({e:T,part:"hour",dateRef:e.placeholder.value,prevValue:W});e.segmentValues.value.hour=A,"dayPeriod"in e.segmentValues.value&&A!==null&&(e.segmentValues.value.dayPeriod=A>=12?"PM":"AM");return}if(tr(T.key)){const A=Number.parseInt(T.key),B=e.hourCycle!==void 0?e.hourCycle===12:m(e.formatter.getLocale()),Y=B?12:24;let U=W;B&&W!==null&&(U=W%12===0?0:W>12?W-12:W);const{value:H,moveToNext:re}=i(Y,A,U);let fe=H;if(B&&H!==null){const Ae=e.segmentValues.value.dayPeriod||"AM";H===12?fe=Ae==="AM"?0:12:fe=Ae==="PM"?H+12:H}e.segmentValues.value.hour=fe,re&&e.focusNext()}T.key===t.BACKSPACE&&(e.hasLeftFocus.value=!1,e.segmentValues.value.hour=n(W))}function x(T){const I=e.placeholder.value;if(!ml(T.key)||On(T.key)||!("minute"in I)||!("minute"in e.segmentValues.value))return;const W=e.segmentValues.value.minute;if((T.key===t.ARROW_UP||T.key===t.ARROW_DOWN)&&(e.segmentValues.value.minute=a({e:T,part:"minute",dateRef:e.placeholder.value,prevValue:W})),tr(T.key)){const A=Number.parseInt(T.key),{value:B,moveToNext:Y}=o(A,W);e.segmentValues.value.minute=B,Y&&e.focusNext()}T.key===t.BACKSPACE&&(e.hasLeftFocus.value=!1,e.segmentValues.value.minute=n(W))}function C(T){const I=e.placeholder.value;if(!ml(T.key)||On(T.key)||!("second"in I)||!("second"in e.segmentValues.value))return;const W=e.segmentValues.value.second;if((T.key===t.ARROW_UP||T.key===t.ARROW_DOWN)&&(e.segmentValues.value.second=a({e:T,part:"second",dateRef:e.placeholder.value,prevValue:W})),tr(T.key)){const A=Number.parseInt(T.key),{value:B,moveToNext:Y}=o(A,W);e.segmentValues.value.second=B,Y&&e.focusNext()}T.key===t.BACKSPACE&&(e.hasLeftFocus.value=!1,e.segmentValues.value.second=n(W))}function w(T){if(!((!ml(T.key)||On(T.key))&&T.key!=="a"&&T.key!=="p"||!("hour"in e.placeholder.value)||!("dayPeriod"in e.segmentValues.value))){if(T.key===t.ARROW_UP||T.key===t.ARROW_DOWN){if(e.segmentValues.value.dayPeriod==="AM"){e.segmentValues.value.dayPeriod="PM",e.segmentValues.value.hour=e.segmentValues.value.hour+12;return}e.segmentValues.value.dayPeriod="AM",e.segmentValues.value.hour=e.segmentValues.value.hour-12;return}if(["a","A"].includes(T.key)&&e.segmentValues.value.dayPeriod!=="AM"){e.segmentValues.value.dayPeriod="AM",e.segmentValues.value.hour=e.segmentValues.value.hour-12;return}["p","P"].includes(T.key)&&e.segmentValues.value.dayPeriod!=="PM"&&(e.segmentValues.value.dayPeriod="PM",e.segmentValues.value.hour=e.segmentValues.value.hour+12)}}function S(T){e.disabled.value&&T.preventDefault()}function L(T){if(T.isComposing||T.key==="Process")return;const I=e.disabled.value,W=e.readonly.value;if(I||W)return;if(T.key!==t.TAB&&T.preventDefault(),{day:d,month:p,year:v,hour:y,minute:x,second:C,dayPeriod:w,timeZoneName:()=>{}}[e.part](T),![t.ARROW_LEFT,t.ARROW_RIGHT].includes(T.key)&&T.key!==t.TAB&&T.key!==t.SHIFT&&ml(T.key)&&Object.values(e.segmentValues.value).every(B=>B!==null)){const B={...e.segmentValues.value},Y=e.placeholder.value.set(B);e.modelValue.value=Y.copy()}}function O(){if(e.stepSnapping?.value&&(e.part==="hour"&&"hour"in e.segmentValues.value&&e.segmentValues.value.hour!==null&&e.step.value.hour&&e.step.value.hour>1?(e.segmentValues.value.hour=wd(e.segmentValues.value.hour,0,23,e.step.value.hour),"dayPeriod"in e.segmentValues.value&&(e.segmentValues.value.hour<12?e.segmentValues.value.dayPeriod="AM":e.segmentValues.value.hour&&(e.segmentValues.value.dayPeriod="PM"))):e.part==="minute"&&"minute"in e.segmentValues.value&&e.segmentValues.value.minute!==null&&e.step.value.minute&&e.step.value.minute>1?e.segmentValues.value.minute=wd(e.segmentValues.value.minute,0,59,e.step.value.minute):e.part==="second"&&"second"in e.segmentValues.value&&e.segmentValues.value.second!==null&&e.step.value.second&&e.step.value.second>1&&(e.segmentValues.value.second=wd(e.segmentValues.value.second,0,59,e.step.value.second)),Object.values(e.segmentValues.value).every(T=>T!==null))){const T=e.placeholder.value.set({...e.segmentValues.value});e.modelValue.value=T.copy()}}let M=null;function R(T){T.isComposing||T.preventDefault()}function q(T){const I=T.target;M=Array.from(I.childNodes,W=>({node:W,value:W.nodeValue}))}function K(T){const I=T.target,W=M;if(M=null,W){for(const{node:B,value:Y}of W)B.nodeValue=Y;I.replaceChildren(...W.map(B=>B.node))}const A=T.data;if(A)for(const B of A){if(!KT.test(B))continue;const Y=Jt();if(!(Y instanceof HTMLElement))break;Y.dispatchEvent(new KeyboardEvent("keydown",{key:B,bubbles:!0,cancelable:!0}))}}return{handleSegmentClick:S,handleSegmentKeydown:L,handleSegmentBeforeInput:R,handleSegmentCompositionStart:q,handleSegmentCompositionEnd:K,handleSegmentFocusOut:O,attributes:c}}function l8(e){function t(r){return Array.isArray(e.date.value)?e.date.value.some(o=>Dl(o,r)):e.date.value?Dl(e.date.value,r):!1}const a=k(()=>{if(Array.isArray(e.date.value)){if(!e.date.value.length)return!1;for(const r of e.date.value)if(e.isDateDisabled?.(r)||e.isDateUnavailable?.(r))return!0}else{if(!e.date.value)return!1;if(e.isDateDisabled?.(e.date.value)||e.isDateUnavailable?.(e.date.value))return!0}return!1}),n=k(()=>Array.isArray(e.date.value)?e.date.value.length>0:!!e.date.value),l=k(()=>Array.isArray(e.date.value)?e.date.value.length?e.date.value.some(r=>e.isDateDisabled?.(r)):!1:e.date.value?!!e.isDateDisabled?.(e.date.value):!1);return{isDateSelected:t,isInvalid:a,hasSelectedDate:n,isSelectedDateDisabled:l}}function r8(e,t){const a=t(e),n=a.compare(e),l={};return n>=7&&(l.day=1),n>=Al(e)&&(l.month=1),a.set({...l})}function o8(e,t){const a=t(e),n=e.compare(a),l={};return n>=7&&(l.day=35),n>=Al(e)&&(l.month=13),a.set({...l})}function s8(e,t){return t(e)}function i8(e,t){return t(e)}function u8(e){const t=np(e.locale.value),a=k(()=>{const w={calendar:e.placeholder.value.calendar.identifier};return e.placeholder.value.calendar.identifier==="gregory"&&e.placeholder.value.era==="BC"&&(w.era="short"),w}),n=E(Zl({dateObj:e.placeholder.value,weekStartsOn:e.weekStartsOn.value,locale:e.locale.value,fixedWeeks:e.fixedWeeks.value,numberOfMonths:e.numberOfMonths.value})),l=k(()=>n.value.map(w=>w.value));function r(w){return!l.value.some(S=>Tv(w,S))}const o=w=>{if(!e.maxValue.value||!n.value.length)return!1;if(e.disabled.value)return!0;const S=n.value.at(-1).value;if(!w&&!e.nextPage.value){const O=S.add({months:1}).set({day:1});return Pd(O,e.maxValue.value)}const L=r8(S,w||e.nextPage.value);return Pd(L,e.maxValue.value)},i=w=>{if(!e.minValue.value||!n.value.length)return!1;if(e.disabled.value)return!0;const S=n.value[0].value;if(!w&&!e.prevPage.value){const O=S.subtract({months:1}).set({day:35});return Cl(O,e.minValue.value)}const L=o8(S,w||e.prevPage.value);return Cl(L,e.minValue.value)};function u(w){return!!(e.isDateDisabled?.(w)||e.disabled.value||e.maxValue.value&&Pd(w,e.maxValue.value)||e.minValue.value&&Cl(w,e.minValue.value))}const c=w=>!!e.isDateUnavailable?.(w),d=k(()=>n.value.length?n.value[0].rows[0].map(w=>t.dayOfWeek(Pa(w),e.weekdayFormat.value)):[]),p=w=>{const S=n.value[0].value;if(!w&&!e.nextPage.value){const R=S.add({months:e.pagedNavigation.value?e.numberOfMonths.value:1}),q=Zl({dateObj:R,weekStartsOn:e.weekStartsOn.value,locale:e.locale.value,fixedWeeks:e.fixedWeeks.value,numberOfMonths:e.numberOfMonths.value});n.value=q,e.placeholder.value=q[0].value.set({day:1});return}const L=s8(S,w||e.nextPage.value),O=Zl({dateObj:L,weekStartsOn:e.weekStartsOn.value,locale:e.locale.value,fixedWeeks:e.fixedWeeks.value,numberOfMonths:e.numberOfMonths.value});n.value=O;const M={};if(!w){const R=O[0].value.compare(S);R>=Al(S)&&(M.day=1),R>=365&&(M.month=1)}e.placeholder.value=O[0].value.set({...M})},v=w=>{const S=n.value[0].value;if(!w&&!e.prevPage.value){const R=S.subtract({months:e.pagedNavigation.value?e.numberOfMonths.value:1}),q=Zl({dateObj:R,weekStartsOn:e.weekStartsOn.value,locale:e.locale.value,fixedWeeks:e.fixedWeeks.value,numberOfMonths:e.numberOfMonths.value});n.value=q,e.placeholder.value=q[0].value.set({day:1});return}const L=i8(S,w||e.prevPage.value),O=Zl({dateObj:L,weekStartsOn:e.weekStartsOn.value,locale:e.locale.value,fixedWeeks:e.fixedWeeks.value,numberOfMonths:e.numberOfMonths.value});n.value=O;const M={};if(!w){const R=S.compare(O[0].value);R>=Al(S)&&(M.day=1),R>=365&&(M.month=1)}e.placeholder.value=O[0].value.set({...M})};Ve(e.placeholder,w=>{l.value.some(S=>Tv(S,w))||(n.value=Zl({dateObj:w,weekStartsOn:e.weekStartsOn.value,locale:e.locale.value,fixedWeeks:e.fixedWeeks.value,numberOfMonths:e.numberOfMonths.value}))}),Ve([e.locale,e.weekStartsOn,e.fixedWeeks,e.numberOfMonths],()=>{n.value=Zl({dateObj:e.placeholder.value,weekStartsOn:e.weekStartsOn.value,locale:e.locale.value,fixedWeeks:e.fixedWeeks.value,numberOfMonths:e.numberOfMonths.value})});const m=k(()=>{if(!n.value.length)return"";if(e.locale.value!==t.getLocale()&&t.setLocale(e.locale.value),n.value.length===1){const K=n.value[0].value;return`${t.fullMonthAndYear(Pa(K),a.value)}`}const w=Pa(n.value[0].value),S=Pa(n.value.at(-1).value),L=t.fullMonth(w,a.value),O=t.fullMonth(S,a.value),M=t.fullYear(w,a.value),R=t.fullYear(S,a.value);return M===R?`${L} - ${O} ${R}`:`${L} ${M} - ${O} ${R}`}),y=k(()=>`${e.calendarLabel.value??"Event Date"}, ${m.value}`),x=k(()=>!(u(e.placeholder.value)||c(e.placeholder.value)||r(e.placeholder.value))),C=k(()=>{for(const w of n.value){if(e.minValue.value&&Cl(w.value,e.minValue.value))continue;const S=Al(w.value),L=e.minValue.value&&Hf(e.minValue.value,w.value)?e.minValue.value.day:1;for(let O=L;O<=S;O++){const M=w.value.set({day:O});if(!(u(M)||c(M)))return M}}});return{isDateDisabled:u,isDateUnavailable:c,isNextButtonDisabled:o,isPrevButtonDisabled:i,grid:n,weekdays:d,visibleView:l,isOutsideVisibleView:r,formatter:t,nextPage:p,prevPage:v,headingValue:m,fullCalendarLabel:y,isPlaceholderFocusable:x,firstFocusableDate:C}}const d8={style:{border:"0px",clip:"rect(0px, 0px, 0px, 0px)","clip-path":"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0px",position:"absolute","white-space":"nowrap",width:"1px"}},c8={role:"heading","aria-level":"2"},[yo,f8]=Ot("CalendarRoot");var p8=ae({__name:"CalendarRoot",props:{defaultValue:{type:null,required:!1,default:void 0},defaultPlaceholder:{type:null,required:!1},placeholder:{type:null,required:!1,default:void 0},pagedNavigation:{type:Boolean,required:!1,default:!1},preventDeselect:{type:Boolean,required:!1,default:!1},weekStartsOn:{type:Number,required:!1},weekdayFormat:{type:String,required:!1,default:"narrow"},calendarLabel:{type:String,required:!1},fixedWeeks:{type:Boolean,required:!1,default:!1},maxValue:{type:null,required:!1},minValue:{type:null,required:!1},locale:{type:String,required:!1},numberOfMonths:{type:Number,required:!1,default:1},disabled:{type:Boolean,required:!1,default:!1},readonly:{type:Boolean,required:!1,default:!1},initialFocus:{type:Boolean,required:!1,default:!1},isDateDisabled:{type:Function,required:!1,default:void 0},isDateUnavailable:{type:Function,required:!1,default:void 0},dir:{type:String,required:!1},nextPage:{type:Function,required:!1},prevPage:{type:Function,required:!1},modelValue:{type:null,required:!1},multiple:{type:Boolean,required:!1,default:!1},disableDaysOutsideCurrentView:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},emits:["update:modelValue","update:placeholder"],setup(e,{emit:t}){const a=e,n=t,{disabled:l,readonly:r,initialFocus:o,pagedNavigation:i,weekdayFormat:u,fixedWeeks:c,multiple:d,minValue:p,maxValue:v,numberOfMonths:m,preventDeselect:y,isDateDisabled:x,isDateUnavailable:C,calendarLabel:w,defaultValue:S,nextPage:L,prevPage:O,dir:M,locale:R,disableDaysOutsideCurrentView:q}=Kt(a),{primitiveElement:K,currentElement:T}=dr(),I=Bu(R),W=$n(M),A=k(()=>a.weekStartsOn??S1(I.value)),B=Ft(a,"modelValue",n,{defaultValue:S.value,passive:a.modelValue===void 0}),Y=ap({defaultPlaceholder:a.placeholder,defaultValue:B.value,locale:a.locale}),U=Ft(a,"placeholder",n,{defaultValue:a.defaultPlaceholder??Y.copy(),passive:a.placeholder===void 0});function H(X){U.value=X.copy()}const{fullCalendarLabel:re,headingValue:fe,isDateDisabled:Ae,isDateUnavailable:xe,isNextButtonDisabled:_e,isPrevButtonDisabled:le,weekdays:pe,isOutsideVisibleView:F,nextPage:de,prevPage:he,formatter:Z,grid:ge,isPlaceholderFocusable:J,firstFocusableDate:ee}=u8({locale:I,placeholder:U,weekStartsOn:A,fixedWeeks:c,numberOfMonths:m,minValue:p,maxValue:v,disabled:l,weekdayFormat:u,pagedNavigation:i,isDateDisabled:x.value,isDateUnavailable:C.value,calendarLabel:w,nextPage:L,prevPage:O}),{isInvalid:te,isDateSelected:$,hasSelectedDate:P,isSelectedDateDisabled:z}=l8({date:B,isDateDisabled:Ae,isDateUnavailable:xe});Ve(B,X=>{if(Array.isArray(X)&&X.length){const oe=X.at(-1);oe&&!Yr(U.value,oe)&&H(oe)}else!Array.isArray(X)&&X&&!Yr(U.value,X)&&H(X)});function ce(X){if(d.value){if(!B.value)B.value=[X.copy()];else if(Array.isArray(B.value)){if(B.value.findIndex(ke=>Dl(ke,X))===-1)B.value=[...B.value,X];else if(!y.value){const ke=B.value.filter(Ce=>!Dl(Ce,X));if(!ke.length){U.value=X.copy(),B.value=void 0;return}B.value=ke.map(Ce=>Ce.copy())}}}else{if(!B.value){B.value=X.copy();return}!y.value&&Yr(B.value,X)?(U.value=X.copy(),B.value=void 0):B.value=X.copy()}}return $t(()=>{o.value&&$1(T.value)}),f8({isDateUnavailable:xe,dir:W,isDateDisabled:Ae,locale:I,formatter:Z,modelValue:B,placeholder:U,disabled:l,initialFocus:o,pagedNavigation:i,grid:ge,weekDays:pe,weekStartsOn:A,weekdayFormat:u,fixedWeeks:c,multiple:d,numberOfMonths:m,readonly:r,preventDeselect:y,fullCalendarLabel:re,headingValue:fe,isInvalid:te,isDateSelected:$,isNextButtonDisabled:_e,isPrevButtonDisabled:le,isOutsideVisibleView:F,nextPage:de,prevPage:he,parentElement:T,onPlaceholderChange:H,onDateChange:ce,disableDaysOutsideCurrentView:q,minValue:p,maxValue:v,isPlaceholderFocusable:J,firstFocusableDate:ee,hasSelectedDate:P,isSelectedDateDisabled:z}),(X,oe)=>(f(),V(s(rt),{ref_key:"primitiveElement",ref:K,as:X.as,"as-child":X.asChild,"aria-label":s(re),"data-readonly":s(r)?"":void 0,"data-disabled":s(l)?"":void 0,"data-invalid":s(te)?"":void 0,dir:s(W)},{default:N(()=>[Se(X.$slots,"default",{date:s(U),grid:s(ge),weekDays:s(pe),weekStartsOn:A.value,locale:s(I),fixedWeeks:s(c),modelValue:s(B)}),g("div",d8,[g("div",c8,_(s(re)),1)])]),_:3},8,["as","as-child","aria-label","data-readonly","data-disabled","data-invalid","dir"]))}}),m8=p8,v8=ae({__name:"CalendarCell",props:{date:{type:null,required:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"td"}},setup(e){const t=yo();return(a,n)=>(f(),V(s(rt),{as:a.as,"as-child":a.asChild,role:"gridcell","aria-selected":s(t).isDateSelected(a.date)?!0:void 0,"aria-disabled":s(t).isDateDisabled(a.date)||s(t).isDateUnavailable?.(a.date)||s(t).disableDaysOutsideCurrentView.value,"data-disabled":s(t).isDateDisabled(a.date)||s(t).disableDaysOutsideCurrentView.value?"":void 0},{default:N(()=>[Se(a.$slots,"default")]),_:3},8,["as","as-child","aria-selected","aria-disabled","data-disabled"]))}}),h8=v8,g8=ae({__name:"CalendarCellTrigger",props:{day:{type:null,required:!0},month:{type:null,required:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(e){const t=e,a=ho(),n=yo(),{primitiveElement:l}=dr(),r=k(()=>t.day.day.toLocaleString(n.locale.value)),o=k(()=>n.formatter.custom(Pa(t.day),{weekday:"long",month:"long",day:"numeric",year:"numeric"})),i=k(()=>n.isDateUnavailable?.(t.day)??!1),u=k(()=>hE(t.day,Qa())),c=k(()=>!Hf(t.day,t.month)),d=k(()=>n.isOutsideVisibleView(t.day)),p=k(()=>n.isDateDisabled(t.day)||n.disableDaysOutsideCurrentView.value&&c.value),v=k(()=>c.value||p.value?!1:!n.disabled.value&&n.isPlaceholderFocusable.value&&Dl(t.day,n.placeholder.value)?!0:(!n.hasSelectedDate.value||n.isSelectedDateDisabled.value)&&!n.isPlaceholderFocusable.value?n.firstFocusableDate.value&&Dl(t.day,n.firstFocusableDate.value):!1),m=k(()=>n.isDateSelected(t.day));function y(w){n.readonly.value||n.isDateDisabled(w)||n.isDateUnavailable?.(w)||n.onDateChange(w)}function x(){p.value||y(t.day)}function C(w){if(p.value)return;w.preventDefault(),w.stopPropagation();const S=n.parentElement.value,L=7,O=n.dir.value==="rtl"?-1:1;switch(w.code){case a.ARROW_RIGHT:M(t.day,O);break;case a.ARROW_LEFT:M(t.day,-O);break;case a.ARROW_UP:M(t.day,-L);break;case a.ARROW_DOWN:M(t.day,L);break;case a.ENTER:case a.SPACE_CODE:y(t.day)}function M(R,q){const K=R.add({days:q});if(n.minValue.value&&K.compare(n.minValue.value)<0||n.maxValue.value&&K.compare(n.maxValue.value)>0)return;const T=S.querySelector(`[data-value='${K.toString()}']:not([data-outside-view])`);if(!T){if(q>0){if(n.isNextButtonDisabled())return;n.nextPage()}else{if(n.isPrevButtonDisabled())return;n.prevPage()}Ge(()=>{M(R,q)});return}if(T&&T.hasAttribute("data-disabled"))return M(K,q);n.onPlaceholderChange(K),T?.focus()}}return(w,S)=>(f(),V(s(rt),{ref_key:"primitiveElement",ref:l,as:t.as,"as-child":t.asChild,role:"button","aria-label":o.value,"data-reka-calendar-cell-trigger":"","aria-disabled":p.value||i.value?!0:void 0,"data-selected":m.value?!0:void 0,"data-value":w.day.toString(),"data-disabled":p.value?"":void 0,"data-unavailable":i.value?"":void 0,"data-today":u.value?"":void 0,"data-outside-view":c.value?"":void 0,"data-outside-visible-view":d.value?"":void 0,"data-focused":v.value?"":void 0,tabindex:v.value?0:c.value||p.value?void 0:-1,onClick:x,onKeydown:[gn(C,["up","down","left","right","space","enter"]),S[0]||(S[0]=gn(mt(()=>{},["prevent"]),["enter"]))]},{default:N(()=>[Se(w.$slots,"default",{dayValue:r.value,disabled:p.value,today:u.value,selected:m.value,outsideView:c.value,outsideVisibleView:d.value,unavailable:i.value},()=>[ye(_(r.value),1)])]),_:3},8,["as","as-child","aria-label","aria-disabled","data-selected","data-value","data-disabled","data-unavailable","data-today","data-outside-view","data-outside-visible-view","data-focused","tabindex"]))}}),y8=g8,b8=ae({__name:"CalendarGrid",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"table"}},setup(e){const t=e,a=yo(),n=k(()=>a.disabled.value?!0:void 0),l=k(()=>a.readonly.value?!0:void 0);return(r,o)=>(f(),V(s(rt),Ye(t,{tabindex:"-1",role:"application","aria-readonly":l.value,"aria-disabled":n.value,"data-readonly":l.value&&"","data-disabled":n.value&&""}),{default:N(()=>[Se(r.$slots,"default")]),_:3},16,["aria-readonly","aria-disabled","data-readonly","data-disabled"]))}}),_8=b8,x8=ae({__name:"CalendarGridBody",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"tbody"}},setup(e){const t=e;return(a,n)=>(f(),V(s(rt),ut(ft(t)),{default:N(()=>[Se(a.$slots,"default")]),_:3},16))}}),k8=x8,w8=ae({__name:"CalendarGridHead",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"thead"}},setup(e){const t=e;return(a,n)=>(f(),V(s(rt),Ye(t,{"aria-hidden":"true"}),{default:N(()=>[Se(a.$slots,"default")]),_:3},16))}}),$8=w8,C8=ae({__name:"CalendarGridRow",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"tr"}},setup(e){const t=e;return(a,n)=>(f(),V(s(rt),ut(ft(t)),{default:N(()=>[Se(a.$slots,"default")]),_:3},16))}}),S8=C8,E8=ae({__name:"CalendarHeadCell",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"th"}},setup(e){const t=e;return(a,n)=>(f(),V(s(rt),ut(ft(t)),{default:N(()=>[Se(a.$slots,"default")]),_:3},16))}}),A8=E8,T8=ae({__name:"CalendarHeader",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(e){const t=e;return(a,n)=>(f(),V(s(rt),ut(ft(t)),{default:N(()=>[Se(a.$slots,"default")]),_:3},16))}}),M8=T8,D8=ae({__name:"CalendarHeading",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(e){const t=e,a=yo();return(n,l)=>(f(),V(s(rt),Ye(t,{"data-disabled":s(a).disabled.value?"":void 0}),{default:N(()=>[Se(n.$slots,"default",{headingValue:s(a).headingValue.value},()=>[ye(_(s(a).headingValue.value),1)])]),_:3},16,["data-disabled"]))}}),O8=D8,P8=ae({__name:"CalendarNext",props:{nextPage:{type:Function,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,a=k(()=>n.disabled.value||n.isNextButtonDisabled(t.nextPage)),n=yo();function l(){a.value||n.nextPage(t.nextPage)}return(r,o)=>(f(),V(s(rt),{as:t.as,"as-child":t.asChild,"aria-label":"Next page",type:t.as==="button"?"button":void 0,"aria-disabled":a.value||void 0,"data-disabled":a.value||void 0,disabled:a.value,onClick:l},{default:N(()=>[Se(r.$slots,"default",{disabled:a.value},()=>[o[0]||(o[0]=ye(" Next page "))])]),_:3},8,["as","as-child","type","aria-disabled","data-disabled","disabled"]))}}),I8=P8,R8=ae({__name:"CalendarPrev",props:{prevPage:{type:Function,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,a=k(()=>n.disabled.value||n.isPrevButtonDisabled(t.prevPage)),n=yo();function l(){a.value||n.prevPage(t.prevPage)}return(r,o)=>(f(),V(s(rt),{"aria-label":"Previous page",as:t.as,"as-child":t.asChild,type:t.as==="button"?"button":void 0,"aria-disabled":a.value||void 0,"data-disabled":a.value||void 0,disabled:a.value,onClick:l},{default:N(()=>[Se(r.$slots,"default",{disabled:a.value},()=>[o[0]||(o[0]=ye(" Prev page "))])]),_:3},8,["as","as-child","type","aria-disabled","data-disabled","disabled"]))}}),q8=R8;const[L8,N8]=Ot("RovingFocusGroup");var B8=ae({__name:"RovingFocusGroup",props:{orientation:{type:String,required:!1,default:void 0},dir:{type:String,required:!1},loop:{type:Boolean,required:!1,default:!1},currentTabStopId:{type:[String,null],required:!1},defaultCurrentTabStopId:{type:String,required:!1},preventScrollOnEntryFocus:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["entryFocus","update:currentTabStopId"],setup(e,{expose:t,emit:a}){const n=e,l=a,{loop:r,orientation:o,dir:i}=Kt(n),u=$n(i),c=Ft(n,"currentTabStopId",l,{defaultValue:n.defaultCurrentTabStopId,passive:n.currentTabStopId===void 0}),d=E(!1),p=E(!1),v=E(0),{getItems:m,CollectionSlot:y}=ip({isProvider:!0});function x(w){const S=!p.value;if(w.currentTarget&&w.target===w.currentTarget&&S&&!d.value){const L=new CustomEvent(w5,$5);if(w.currentTarget.dispatchEvent(L),l("entryFocus",L),!L.defaultPrevented){const O=m().map(T=>T.ref).filter(T=>T.dataset.disabled!==""),M=O.find(T=>T.getAttribute("data-active")===""),R=O.find(T=>T.getAttribute("data-highlighted")===""),q=O.find(T=>T.id===c.value),K=[M,R,q,...O].filter(Boolean);q1(K,n.preventScrollOnEntryFocus)}}p.value=!1}function C(){setTimeout(()=>{p.value=!1},1)}return t({getItems:m}),N8({loop:r,dir:u,orientation:o,currentTabStopId:c,onItemFocus:w=>{c.value=w},onItemShiftTab:()=>{d.value=!0},onFocusableItemAdd:()=>{v.value++},onFocusableItemRemove:()=>{v.value--}}),(w,S)=>(f(),V(s(y),null,{default:N(()=>[D(s(rt),{tabindex:d.value||v.value===0?-1:0,"data-orientation":s(o),as:w.as,"as-child":w.asChild,dir:s(u),style:{outline:"none"},onMousedown:S[0]||(S[0]=L=>p.value=!0),onMouseup:C,onFocus:x,onBlur:S[1]||(S[1]=L=>d.value=!1)},{default:N(()=>[Se(w.$slots,"default")]),_:3},8,["tabindex","data-orientation","as","as-child","dir"])]),_:3}))}}),Ku=B8,F8=ae({__name:"RovingFocusItem",props:{tabStopId:{type:String,required:!1},focusable:{type:Boolean,required:!1,default:!0},active:{type:Boolean,required:!1},allowShiftKey:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,a=L8(),n=Jn(),l=k(()=>t.tabStopId||n),r=k(()=>a.currentTabStopId.value===l.value),{getItems:o,CollectionItem:i}=ip();$t(()=>{t.focusable&&a.onFocusableItemAdd()}),Qn(()=>{t.focusable&&a.onFocusableItemRemove()});function u(c){if(c.key==="Tab"&&c.shiftKey){a.onItemShiftTab();return}if(c.target!==c.currentTarget)return;const d=E5(c,a.orientation.value,a.dir.value);if(d!==void 0){if(c.metaKey||c.ctrlKey||c.altKey||!t.allowShiftKey&&c.shiftKey)return;c.preventDefault();let p=[...o().map(v=>v.ref).filter(v=>v.dataset.disabled!=="")];if(d==="last")p.reverse();else if(d==="prev"||d==="next"){d==="prev"&&p.reverse();const v=p.indexOf(c.currentTarget);p=a.loop.value?A5(p,v+1):p.slice(v+1)}Ge(()=>q1(p))}}return(c,d)=>(f(),V(s(i),null,{default:N(()=>[D(s(rt),{tabindex:r.value?0:-1,"data-orientation":s(a).orientation.value,"data-active":c.active?"":void 0,"data-disabled":c.focusable?void 0:"",as:c.as,"as-child":c.asChild,onMousedown:d[0]||(d[0]=p=>{c.focusable?s(a).onItemFocus(l.value):p.preventDefault()}),onFocus:d[1]||(d[1]=p=>s(a).onItemFocus(l.value)),onKeydown:u},{default:N(()=>[Se(c.$slots,"default")]),_:3},8,["tabindex","data-orientation","data-active","data-disabled","as","as-child"])]),_:3}))}}),Wu=F8;const[V8]=Ot("CheckboxGroupRoot");function xp(e){return e==="indeterminate"}function t0(e){return xp(e)?"indeterminate":e?"checked":"unchecked"}const[z8,j8]=Ot("CheckboxRoot");var U8=ae({inheritAttrs:!1,__name:"CheckboxRoot",props:{defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},disabled:{type:Boolean,required:!1},value:{type:null,required:!1,default:"on"},id:{type:String,required:!1},trueValue:{type:null,required:!1,default:()=>!0},falseValue:{type:null,required:!1,default:()=>!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const a=e,n=t,{forwardRef:l,currentElement:r}=lt(),o=V8(null),i=Ft(a,"modelValue",n,{defaultValue:a.defaultValue??a.falseValue,passive:a.modelValue===void 0}),u=k(()=>o?.disabled.value||a.disabled),c=k(()=>bs(i.value,a.trueValue)),d=k(()=>$a(o?.modelValue.value)?i.value==="indeterminate"?"indeterminate":c.value:Sv(o.modelValue.value,a.value));function p(){if($a(o?.modelValue.value))i.value==="indeterminate"?i.value=a.trueValue:i.value=c.value?a.falseValue:a.trueValue;else{const y=[...o.modelValue.value||[]];if(Sv(y,a.value)){const x=y.findIndex(C=>bs(C,a.value));y.splice(x,1)}else y.push(a.value);o.modelValue.value=y}}const v=lp(r),m=k(()=>a.id&&r.value?document.querySelector(`[for="${a.id}"]`)?.innerText:void 0);return j8({disabled:u,state:d}),(y,x)=>(f(),V(Wt(s(o)?.rovingFocus.value?s(Wu):s(rt)),Ye(y.$attrs,{id:y.id,ref:s(l),role:"checkbox","as-child":y.asChild,as:y.as,type:y.as==="button"?"button":void 0,"aria-checked":s(xp)(d.value)?"mixed":d.value,"aria-required":y.required,"aria-label":y.$attrs["aria-label"]||m.value,"data-state":s(t0)(d.value),"data-disabled":u.value?"":void 0,disabled:u.value,focusable:s(o)?.rovingFocus.value?!u.value:void 0,onKeydown:gn(mt(()=>{},["prevent"]),["enter"]),onClick:p}),{default:N(()=>[Se(y.$slots,"default",{modelValue:s(i),state:d.value}),s(v)&&y.name&&!s(o)?(f(),V(s(dp),{key:0,type:"checkbox",checked:!!d.value,name:y.name,value:y.value,disabled:u.value,required:y.required},null,8,["checked","name","value","disabled","required"])):G("v-if",!0)]),_:3},16,["id","as-child","as","type","aria-checked","aria-required","aria-label","data-state","data-disabled","disabled","focusable","onKeydown"]))}}),H8=U8,K8=ae({__name:"CheckboxIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const{forwardRef:t}=lt(),a=z8();return(n,l)=>(f(),V(s(br),{present:n.forceMount||s(xp)(s(a).state.value)||s(a).state.value===!0},{default:N(()=>[D(s(rt),Ye({ref:s(t),"data-state":s(t0)(s(a).state.value),"data-disabled":s(a).disabled.value?"":void 0,style:{pointerEvents:"none"},"as-child":n.asChild,as:n.as},n.$attrs),{default:N(()=>[Se(n.$slots,"default")]),_:3},16,["data-state","data-disabled","as-child","as"])]),_:3},8,["present"]))}}),W8=K8,G8=ae({__name:"MenuAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(a,n)=>(f(),V(s(cp),ut(ft(t)),{default:N(()=>[Se(a.$slots,"default")]),_:3},16))}}),Y8=G8;function J8(){const e=E(!1);return $t(()=>{so("keydown",()=>{e.value=!0},{capture:!0,passive:!0}),so(["pointerdown","pointermove"],()=>{e.value=!1},{capture:!0,passive:!0})}),e}const Z8=Kb(J8),[Gu,X8]=Ot(["MenuRoot","MenuSub"],"MenuContext"),[kp,Q8]=Ot("MenuRoot");var e6=ae({__name:"MenuRoot",props:{open:{type:Boolean,required:!1,default:!1},dir:{type:String,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(e,{emit:t}){const a=e,n=t,{modal:l,dir:r}=Kt(a),o=$n(r),i=Ft(a,"open",n),u=E(),c=Z8();return X8({open:i,onOpenChange:d=>{i.value=d},content:u,onContentChange:d=>{u.value=d}}),Q8({onClose:()=>{i.value=!1},isUsingKeyboardRef:c,dir:o,modal:l}),(d,p)=>(f(),V(s(N1),null,{default:N(()=>[Se(d.$slots,"default")]),_:3}))}}),t6=e6;const[a0,a6]=Ot("MenuContent");var n6=ae({__name:"MenuContentImpl",props:fy({loop:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},disableOutsideScroll:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...Y1}),emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus","dismiss"],setup(e,{emit:t}){const a=e,n=t,l=Gu(),r=kp(),{trapFocus:o,disableOutsidePointerEvents:i,loop:u}=Kt(a);E1(),Uf(i.value);const c=E(""),d=E(0),p=E(0),v=E(null),m=E("right"),y=E(0),x=E(null),C=E(),{forwardRef:w,currentElement:S}=lt(),{handleTypeaheadSearch:L}=bA(),O=E();function M(U){const H=Av(U,O.value||Jt(),S.value,{loop:u.value,arrowKeyOptions:"vertical",dir:r?.dir.value,focus:!1,attributeName:"[data-reka-collection-item]:not([data-disabled])"});H&&(O.value=H,H.scrollIntoView({block:"nearest"}))}function R(){O.value&&O.value.click()}const q=E(),K=E();Ve(O,U=>{K.value&&(U===void 0||U!==K.value.trigger.value)&&(K.value.onOpenChange(!1),K.value=void 0)}),Ve(S,U=>{l.onContentChange(U)}),Qn(()=>{window.clearTimeout(d.value)});function T(U){return m.value===v.value?.side&&UA(U,v.value?.area)}async function I(U){n("openAutoFocus",U),!U.defaultPrevented&&(U.preventDefault(),S.value?.focus({preventScroll:!0}))}function W(U){if(U.defaultPrevented)return;const H=U.target,re=H.closest("[data-reka-menu-content]")===U.currentTarget,fe=["input","textarea"].includes(H.tagName.toLowerCase()),Ae=U.ctrlKey||U.altKey||U.metaKey,xe=U.key.length===1,_e=Av(U,Jt(),S.value,{loop:u.value,arrowKeyOptions:"vertical",dir:r?.dir.value,focus:!0,attributeName:"[data-reka-collection-item]:not([data-disabled])"});if(_e)return _e?.focus();if(U.code==="Space")return;const le=C.value?.getItems()??[];if(re&&(U.key==="Tab"&&U.preventDefault(),!Ae&&xe&&!fe&&L(U.key,le)),U.target!==S.value||!VA.includes(U.key))return;U.preventDefault();const pe=[...le.map(F=>F.ref)];D1.includes(U.key)&&pe.reverse(),zA(pe)}function A(U){U?.currentTarget?.contains?.(U.target)||(window.clearTimeout(d.value),c.value="")}function B(U){if(!eu(U))return;const H=U.target,re=y.value!==U.clientX;if(U?.currentTarget?.contains(H)&&re){const fe=U.clientX>y.value?"right":"left";m.value=fe,y.value=U.clientX}}function Y(U){eu(U)&&q.value&&q.value.focus()}return a6({onItemEnter:U=>!!T(U),onItemLeave:U=>T(U)?!0:(["INPUT","TEXTAREA"].includes(Jt()?.tagName||"")||S.value?.focus(),x.value=null,!1),onTriggerLeave:U=>!!T(U),searchRef:c,highlightedElement:O,onKeydownNavigation:M,onKeydownEnter:R,filterElement:q,onFilterElementChange:U=>{q.value=U},activeSubmenuContext:K,pointerGraceTimerRef:p,onPointerGraceIntentChange:U=>{v.value=U}}),(U,H)=>(f(),V(s(sp),{"as-child":"",trapped:s(o),onMountAutoFocus:I,onUnmountAutoFocus:H[7]||(H[7]=re=>n("closeAutoFocus",re))},{default:N(()=>[D(s(op),{"as-child":"","disable-outside-pointer-events":s(i),onEscapeKeyDown:H[2]||(H[2]=re=>n("escapeKeyDown",re)),onPointerDownOutside:H[3]||(H[3]=re=>n("pointerDownOutside",re)),onFocusOutside:H[4]||(H[4]=re=>n("focusOutside",re)),onInteractOutside:H[5]||(H[5]=re=>n("interactOutside",re)),onDismiss:H[6]||(H[6]=re=>n("dismiss"))},{default:N(()=>[D(s(Ku),{ref_key:"rovingFocusGroupRef",ref:C,"current-tab-stop-id":x.value,"onUpdate:currentTabStopId":H[0]||(H[0]=re=>x.value=re),"as-child":"",orientation:"vertical",dir:s(r).dir.value,loop:s(u),onEntryFocus:H[1]||(H[1]=re=>{n("entryFocus",re),s(r).isUsingKeyboardRef.value||re.preventDefault()})},{default:N(()=>[D(s(J1),{ref:s(w),role:"menu",as:U.as,"as-child":U.asChild,"aria-orientation":"vertical","data-reka-menu-content":"","data-state":s(O1)(s(l).open.value),dir:s(r).dir.value,side:U.side,"side-offset":U.sideOffset,align:U.align,"align-offset":U.alignOffset,"avoid-collisions":U.avoidCollisions,"collision-boundary":U.collisionBoundary,"collision-padding":U.collisionPadding,"arrow-padding":U.arrowPadding,"prioritize-position":U.prioritizePosition,"position-strategy":U.positionStrategy,"update-position-strategy":U.updatePositionStrategy,sticky:U.sticky,"hide-when-detached":U.hideWhenDetached,reference:U.reference,onKeydown:W,onBlur:A,onPointermove:B,onPointerenter:Y},{default:N(()=>[Se(U.$slots,"default")]),_:3},8,["as","as-child","data-state","dir","side","side-offset","align","align-offset","avoid-collisions","collision-boundary","collision-padding","arrow-padding","prioritize-position","position-strategy","update-position-strategy","sticky","hide-when-detached","reference"])]),_:3},8,["current-tab-stop-id","dir","loop"])]),_:3},8,["disable-outside-pointer-events"])]),_:3},8,["trapped"]))}}),n0=n6,l6=ae({inheritAttrs:!1,__name:"MenuItemImpl",props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,a=a0(),{forwardRef:n,currentElement:l}=lt(),{CollectionItem:r}=ip(),o=E(!1),i=k(()=>o.value||l.value!=null&&a.highlightedElement.value===l.value);async function u(d){if(!(d.defaultPrevented||!eu(d))){if(t.disabled)a.onItemLeave(d);else if(!a.onItemEnter(d)){const v=d.currentTarget;a.highlightedElement.value=v,["INPUT","TEXTAREA"].includes(Jt()?.tagName||"")||v.focus({preventScroll:!0})}}}async function c(d){if(await Ge(),d.defaultPrevented||!eu(d)||a.highlightedElement.value!==l.value)return;!a.onItemLeave(d)&&a.highlightedElement.value===l.value&&(a.highlightedElement.value=void 0)}return(d,p)=>(f(),V(s(r),{value:{textValue:d.textValue}},{default:N(()=>[D(s(rt),Ye({ref:s(n),role:"menuitem",tabindex:"-1"},d.$attrs,{as:d.as,"as-child":d.asChild,"aria-disabled":d.disabled||void 0,"data-disabled":d.disabled?"":void 0,"data-highlighted":i.value?"":void 0,onPointermove:u,onPointerleave:c,onFocus:p[0]||(p[0]=async v=>{await Ge(),!(v.defaultPrevented||d.disabled)&&(o.value=!0,s(a).highlightedElement.value=v.currentTarget)}),onBlur:p[1]||(p[1]=async v=>{await Ge(),!v.defaultPrevented&&(o.value=!1)})}),{default:N(()=>[Se(d.$slots,"default")]),_:3},16,["as","as-child","aria-disabled","data-disabled","data-highlighted"])]),_:3},8,["value"]))}}),r6=l6,o6=ae({__name:"MenuItem",props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(e,{emit:t}){const a=e,n=t,{forwardRef:l,currentElement:r}=lt(),o=kp(),i=a0(),u=E(!1);async function c(){const d=r.value;if(!a.disabled&&d){const p=new CustomEvent(BA,{bubbles:!0,cancelable:!0});n("select",p),await Ge(),p.defaultPrevented?u.value=!1:o.onClose()}}return(d,p)=>(f(),V(r6,Ye(a,{ref:s(l),onClick:c,onPointerdown:p[0]||(p[0]=()=>{u.value=!0}),onPointerup:p[1]||(p[1]=async v=>{await Ge(),!v.defaultPrevented&&(u.value||v.currentTarget?.click())}),onKeydown:p[2]||(p[2]=async v=>{const m=s(i).searchRef.value!=="";d.disabled||m&&v.key===" "||s(jc).includes(v.key)&&(v.currentTarget?.click(),v.preventDefault())})}),{default:N(()=>[Se(d.$slots,"default")]),_:3},16))}}),l0=o6;const[s6,i6]=Ot(["MenuCheckboxItem","MenuRadioItem"],"MenuItemIndicatorContext");var u6=ae({__name:"MenuItemIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=s6({modelValue:E(!1)});return(a,n)=>(f(),V(s(br),{present:a.forceMount||s(P1)(s(t).modelValue.value)||s(t).modelValue.value===!0},{default:N(()=>[D(s(rt),{as:a.as,"as-child":a.asChild,"data-state":s(I1)(s(t).modelValue.value)},{default:N(()=>[Se(a.$slots,"default")]),_:3},8,["as","as-child","data-state"])]),_:3},8,["present"]))}}),d6=u6,c6=ae({__name:"MenuRootContentModal",props:{loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const a=e,n=t,l=Cn(a,n),r=Gu(),{forwardRef:o,currentElement:i}=lt();return rp(i),(u,c)=>(f(),V(n0,Ye(s(l),{ref:s(o),"trap-focus":s(r).open.value,"disable-outside-pointer-events":s(r).open.value,"disable-outside-scroll":!0,onDismiss:c[0]||(c[0]=d=>s(r).onOpenChange(!1)),onFocusOutside:c[1]||(c[1]=mt(d=>n("focusOutside",d),["prevent"]))}),{default:N(()=>[Se(u.$slots,"default")]),_:3},16,["trap-focus","disable-outside-pointer-events"]))}}),f6=c6,p6=ae({__name:"MenuRootContentNonModal",props:{loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const l=Cn(e,t),r=Gu();return(o,i)=>(f(),V(n0,Ye(s(l),{"trap-focus":!1,"disable-outside-pointer-events":!1,"disable-outside-scroll":!1,onDismiss:i[0]||(i[0]=u=>s(r).onOpenChange(!1))}),{default:N(()=>[Se(o.$slots,"default")]),_:3},16))}}),m6=p6,v6=ae({__name:"MenuContent",props:{forceMount:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const l=Cn(e,t),r=Gu(),o=kp();return(i,u)=>(f(),V(s(br),{present:i.forceMount||s(r).open.value},{default:N(()=>[s(o).modal.value?(f(),V(f6,ut(Ye({key:0},{...i.$attrs,...s(l)})),{default:N(()=>[Se(i.$slots,"default")]),_:3},16)):(f(),V(m6,ut(Ye({key:1},{...i.$attrs,...s(l)})),{default:N(()=>[Se(i.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),h6=v6;const[g6,y6]=Ot("MenuGroup");var b6=ae({__name:"MenuGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,a=Jn(void 0,"reka-menu-group");return y6({id:a}),(n,l)=>(f(),V(s(rt),Ye({role:"group"},t,{"aria-labelledby":s(a)}),{default:N(()=>[Se(n.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),_6=b6,x6=ae({__name:"MenuLabel",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(e){const t=e,a=g6({id:""});return(n,l)=>(f(),V(s(rt),Ye(t,{id:s(a).id||void 0}),{default:N(()=>[Se(n.$slots,"default")]),_:3},16,["id"]))}}),k6=x6,w6=ae({__name:"MenuPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=e;return(a,n)=>(f(),V(s(Fu),ut(ft(t)),{default:N(()=>[Se(a.$slots,"default")]),_:3},16))}}),$6=w6;const[C6,S6]=Ot("MenuRadioGroup");var E6=ae({__name:"MenuRadioGroup",props:{modelValue:{type:null,required:!1,default:""},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const a=e,n=t,l=Vf(a,["modelValue"]),r=Nu(l),o=Ft(a,"modelValue",n);return S6({modelValue:o,onValueChange:i=>{o.value=i}}),(i,u)=>(f(),V(_6,ut(ft(s(r))),{default:N(()=>[Se(i.$slots,"default",{modelValue:s(o)})]),_:3},16))}}),A6=E6,T6=ae({__name:"MenuRadioItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(e,{emit:t}){const a=e,n=t,l=Vf(a,["value"]),r=Nu(l),{value:o}=Kt(a),i=C6(),u=k(()=>i.modelValue.value===o?.value);return i6({modelValue:u}),(c,d)=>(f(),V(l0,Ye({role:"menuitemradio"},s(r),{"aria-checked":u.value,"data-state":s(I1)(u.value),onSelect:d[0]||(d[0]=async p=>{n("select",p),s(i).onValueChange(s(o))})}),{default:N(()=>[Se(c.$slots,"default")]),_:3},16,["aria-checked","data-state"]))}}),M6=T6,D6=ae({__name:"MenuSeparator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(a,n)=>(f(),V(s(rt),Ye(t,{role:"separator","aria-orientation":"horizontal"}),{default:N(()=>[Se(a.$slots,"default")]),_:3},16))}}),O6=D6;const[P6,I6]=Ot("DateFieldRoot");var R6=ae({inheritAttrs:!1,__name:"DateFieldRoot",props:{defaultValue:{type:null,required:!1,default:void 0},defaultPlaceholder:{type:null,required:!1},placeholder:{type:null,required:!1,default:void 0},modelValue:{type:null,required:!1},hourCycle:{type:null,required:!1},step:{type:Object,required:!1},granularity:{type:String,required:!1},hideTimeZone:{type:Boolean,required:!1},maxValue:{type:null,required:!1},minValue:{type:null,required:!1},locale:{type:String,required:!1},disabled:{type:Boolean,required:!1,default:!1},readonly:{type:Boolean,required:!1,default:!1},isDateUnavailable:{type:Function,required:!1,default:void 0},id:{type:String,required:!1},dir:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","update:placeholder"],setup(e,{expose:t,emit:a}){const n=e,l=a,{disabled:r,readonly:o,isDateUnavailable:i,granularity:u,defaultValue:c,dir:d,locale:p}=Kt(n),v=Bu(p),m=$n(d),y=np(v.value,{hourCycle:ks(n.hourCycle)}),{primitiveElement:x,currentElement:C}=dr(),w=E(new Set);$t(()=>{vh(C.value).forEach(F=>w.value.add(F))});const S=Ft(n,"modelValue",l,{defaultValue:c.value,passive:n.modelValue===void 0}),L=ap({defaultPlaceholder:n.placeholder,granularity:u.value,defaultValue:S.value,locale:n.locale}),O=Ft(n,"placeholder",l,{defaultValue:n.defaultPlaceholder??L.copy(),passive:n.placeholder===void 0}),M=k(()=>w1(n)),R=k(()=>n.granularity?Vc(O.value)?n.granularity:"day":Vc(O.value)?"minute":"day"),q=k(()=>S.value?!!(i.value?.(S.value)||n.minValue&&Cl(S.value,n.minValue)||n.maxValue&&Cl(n.maxValue,S.value)):!1),K=jT(R.value),T=E(S.value?{...mh({value:S.value,formatter:y})}:{...K}),I=k(()=>Q1({granularity:R.value,dateRef:O.value,formatter:y,hideTimeZone:n.hideTimeZone,hourCycle:n.hourCycle,segmentValues:T.value,locale:v})),W=k(()=>I.value.arr),A=k(()=>W.value.filter(({part:F})=>F!=="literal"));Ve(v,F=>{y.getLocale()!==F&&(y.setLocale(F),Ge(()=>{w.value.clear(),vh(C.value).forEach(de=>w.value.add(de))}))}),Ve(S,F=>{!$a(F)&&O.value.compare(F)!==0&&(O.value=F.copy())}),Ve([S,v],([F])=>{$a(F)?Object.values(T.value).every(de=>de!==null)&&$a(F)&&(T.value={...K}):T.value={...mh({value:F,formatter:y})}});const B=E(null),Y=k(()=>Array.from(w.value).findIndex(F=>F.getAttribute("data-reka-date-field-segment")===B.value?.getAttribute("data-reka-date-field-segment"))),U=k(()=>{const F=m.value==="rtl"?-1:1;return(F<0?Y.value<0:Y.value>w.value.size-1)?null:Array.from(w.value)[Y.value+F]}),H=k(()=>{const F=m.value==="rtl"?-1:1;return(F>0?Y.value<0:Y.value>w.value.size-1)?null:Array.from(w.value)[Y.value-F]}),re=k(()=>C1(R.value)),fe=k(()=>Id(S.value,R.value)),Ae=k(()=>n.maxValue?Id(n.maxValue,R.value):void 0),xe=k(()=>n.minValue?Id(n.minValue,R.value):void 0),_e=ho();function le(F){F.isComposing||On(F.key)&&(F.key===_e.ARROW_LEFT&&H.value?.focus(),F.key===_e.ARROW_RIGHT&&U.value?.focus())}function pe(F){B.value=F}return I6({isDateUnavailable:i.value,locale:v,modelValue:S,placeholder:O,disabled:r,formatter:y,hourCycle:n.hourCycle,step:M,readonly:o,segmentValues:T,isInvalid:q,segmentContents:A,elements:w,setFocusedElement:pe,focusNext(){U.value?.focus()}}),t({setFocusedElement:pe}),(F,de)=>(f(),V(s(rt),Ye(F.$attrs,{ref_key:"primitiveElement",ref:x,role:"group","aria-disabled":s(r)?!0:void 0,"data-disabled":s(r)?"":void 0,"data-readonly":s(o)?"":void 0,"data-invalid":q.value?"":void 0,dir:s(m),onKeydown:gn(le,["left","right"])}),{default:N(()=>[Se(F.$slots,"default",{modelValue:s(S),segments:W.value,isInvalid:q.value}),D(s(up),{id:F.id,as:"input",type:re.value,feature:"focusable",tabindex:"-1",value:fe.value,name:F.name,disabled:s(r),required:F.required,max:Ae.value,min:xe.value,onFocus:de[0]||(de[0]=he=>Array.from(w.value)?.[0]?.focus())},null,8,["id","type","value","name","disabled","required","max","min"])]),_:3},16,["aria-disabled","data-disabled","data-readonly","data-invalid","dir"]))}}),q6=R6,L6=ae({__name:"DateFieldInput",props:{part:{type:null,required:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,a=P6(),n=E(!0),l=E(!1),{handleSegmentClick:r,handleSegmentKeydown:o,handleSegmentBeforeInput:i,handleSegmentCompositionStart:u,handleSegmentCompositionEnd:c,attributes:d}=e0({hasLeftFocus:n,lastKeyZero:l,placeholder:a.placeholder,hourCycle:a.hourCycle,step:a.step,segmentValues:a.segmentValues,formatter:a.formatter,part:t.part,disabled:a.disabled,readonly:a.readonly,focusNext:a.focusNext,modelValue:a.modelValue}),p=k(()=>a.disabled.value),v=k(()=>a.readonly.value),m=k(()=>a.isInvalid.value);return(y,x)=>(f(),V(s(rt),Ye({as:y.as,"as-child":y.asChild},s(d),{contenteditable:p.value||v.value?!1:y.part!=="literal","data-reka-date-field-segment":y.part,"aria-disabled":p.value?!0:void 0,"aria-readonly":v.value?!0:void 0,"data-disabled":p.value?"":void 0,"data-invalid":m.value?"":void 0,"aria-invalid":m.value?!0:void 0},cy(y.part!=="literal"?{mousedown:s(r),keydown:s(o),beforeinput:s(i),compositionstart:s(u),compositionend:s(c),focusout:()=>{n.value=!0},focusin:C=>{s(a).setFocusedElement(C.target)}}:{})),{default:N(()=>[Se(y.$slots,"default")]),_:3},16,["as","as-child","contenteditable","data-reka-date-field-segment","aria-disabled","aria-readonly","data-disabled","data-invalid","aria-invalid"]))}}),N6=L6;const[bo,B6]=Ot("PopoverRoot");var F6=ae({__name:"PopoverRoot",props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},modal:{type:Boolean,required:!1,default:!1}},emits:["update:open"],setup(e,{emit:t}){const a=e,n=t,{modal:l}=Kt(a),r=Ft(a,"open",n,{defaultValue:a.defaultOpen,passive:a.open===void 0});return B6({contentId:"",triggerId:"",modal:l,open:r,onOpenChange:u=>{r.value=u},onOpenToggle:()=>{r.value=!r.value},triggerElement:E(),hasCustomAnchor:E(!1)}),(u,c)=>(f(),V(s(N1),null,{default:N(()=>[Se(u.$slots,"default",{open:s(r),close:()=>r.value=!1})]),_:3}))}}),r0=F6,V6=ae({__name:"PopoverAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;lt();const a=bo();return oy(()=>{a.hasCustomAnchor.value=!0}),Qn(()=>{a.hasCustomAnchor.value=!1}),(n,l)=>(f(),V(s(cp),ut(ft(t)),{default:N(()=>[Se(n.$slots,"default")]),_:3},16))}}),z6=V6;const[wp,j6]=Ot("DatePickerRoot");var U6=ae({inheritAttrs:!1,__name:"DatePickerRoot",props:{defaultValue:{type:null,required:!1,default:void 0},defaultPlaceholder:{type:null,required:!1},placeholder:{type:null,required:!1,default:void 0},modelValue:{type:null,required:!1},hourCycle:{type:null,required:!1},step:{type:Object,required:!1},granularity:{type:String,required:!1},hideTimeZone:{type:Boolean,required:!1},maxValue:{type:null,required:!1},minValue:{type:null,required:!1},locale:{type:String,required:!1},disabled:{type:Boolean,required:!1,default:!1},readonly:{type:Boolean,required:!1,default:!1},isDateUnavailable:{type:Function,required:!1,default:void 0},id:{type:String,required:!1},dir:{type:String,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},modal:{type:Boolean,required:!1,default:!1},isDateDisabled:{type:Function,required:!1,default:void 0},pagedNavigation:{type:Boolean,required:!1,default:!1},weekStartsOn:{type:Number,required:!1},weekdayFormat:{type:String,required:!1,default:"narrow"},fixedWeeks:{type:Boolean,required:!1,default:!1},numberOfMonths:{type:Number,required:!1,default:1},preventDeselect:{type:Boolean,required:!1,default:!1},closeOnSelect:{type:Boolean,required:!1,default:!1}},emits:["update:open","update:modelValue","update:placeholder"],setup(e,{emit:t}){const a=e,n=t,{locale:l,disabled:r,readonly:o,pagedNavigation:i,weekdayFormat:u,fixedWeeks:c,numberOfMonths:d,preventDeselect:p,isDateDisabled:v,isDateUnavailable:m,defaultOpen:y,modal:x,id:C,name:w,required:S,minValue:L,maxValue:O,granularity:M,hideTimeZone:R,hourCycle:q,defaultValue:K,dir:T,step:I,closeOnSelect:W}=Kt(a),A=$n(T),B=Bu(l),Y=k(()=>a.weekStartsOn??S1(B.value)),U=Ft(a,"modelValue",n,{defaultValue:K.value,passive:a.modelValue===void 0}),H=k(()=>ap({defaultPlaceholder:a.placeholder,granularity:a.granularity,defaultValue:U.value,locale:B.value})),re=Ft(a,"placeholder",n,{defaultValue:a.defaultPlaceholder??H.value.copy(),passive:a.placeholder===void 0}),fe=Ft(a,"open",n,{defaultValue:y.value,passive:a.open===void 0}),Ae=E();function xe(_e){return"hour"in _e?_e.set({hour:0,minute:0,second:0,millisecond:0}):_e}return Ve(U,_e=>{_e&&_e.compare(re.value)!==0?re.value=_e.copy():!_e&&"hour"in re.value&&(re.value=xe(re.value)),W.value&&(fe.value=!1)}),j6({isDateUnavailable:m.value,isDateDisabled:v.value,locale:B,disabled:r,pagedNavigation:i,weekStartsOn:Y,weekdayFormat:u,fixedWeeks:c,numberOfMonths:d,readonly:o,preventDeselect:p,modelValue:U,placeholder:re,defaultOpen:y,modal:x,open:fe,id:C,name:w,required:S,minValue:L,maxValue:O,granularity:M,hideTimeZone:R,hourCycle:q,dateFieldRef:Ae,dir:A,step:I,onDateChange(_e){_e?U.value&&!p.value&&_e&&U.value.compare(_e)===0?U.value=void 0:U.value=_e.copy():U.value=void 0},onPlaceholderChange(_e){re.value=_e.copy()},closeOnSelect:W}),(_e,le)=>(f(),V(s(r0),{open:s(fe),"onUpdate:open":le[0]||(le[0]=pe=>Ct(fe)?fe.value=pe:null),"default-open":s(y),modal:s(x)},{default:N(()=>[Se(_e.$slots,"default")]),_:3},8,["open","default-open","modal"]))}}),H6=U6,K6=ae({__name:"DatePickerCalendar",setup(e){const t=wp();return(a,n)=>(f(),V(s(m8),Ye({isDateDisabled:s(t).isDateDisabled,isDateUnavailable:s(t).isDateUnavailable,minValue:s(t).minValue.value,maxValue:s(t).maxValue.value,locale:s(t).locale.value,disabled:s(t).disabled.value,pagedNavigation:s(t).pagedNavigation.value,weekStartsOn:s(t).weekStartsOn.value,weekdayFormat:s(t).weekdayFormat.value,fixedWeeks:s(t).fixedWeeks.value,numberOfMonths:s(t).numberOfMonths.value,readonly:s(t).readonly.value,preventDeselect:s(t).preventDeselect.value,dir:s(t).dir.value},{"model-value":s(t).modelValue.value,placeholder:s(t).placeholder.value,multiple:!1,"onUpdate:modelValue":n[0]||(n[0]=l=>{l&&s(t).modelValue.value&&s(Yr)(l,s(t).modelValue.value)||s(t).onDateChange(l)}),"onUpdate:placeholder":n[1]||(n[1]=l=>{s(Yr)(l,s(t).placeholder.value)||s(t).onPlaceholderChange(l)})}),{default:N(({weekDays:l,grid:r,date:o,weekStartsOn:i,locale:u,fixedWeeks:c})=>[Se(a.$slots,"default",{date:o,grid:r,weekDays:l,weekStartsOn:i,locale:u,fixedWeeks:c})]),_:3},16,["model-value","placeholder"]))}}),W6=K6,G6=ae({__name:"DatePickerCell",props:{date:{type:null,required:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(a,n)=>(f(),V(s(h8),ut(ft(t)),{default:N(()=>[Se(a.$slots,"default")]),_:3},16))}}),Y6=G6,J6=ae({__name:"DatePickerCellTrigger",props:{day:{type:null,required:!0},month:{type:null,required:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(a,n)=>(f(),V(s(y8),ut(ft(t)),{default:N(l=>[Se(a.$slots,"default",ut(ft(l)))]),_:3},16))}}),Z6=J6,X6=ae({__name:"PopoverContentImpl",props:{trapFocus:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const a=e,n=t,l=Nu(Vf(a,"trapFocus","disableOutsidePointerEvents")),{forwardRef:r}=lt(),o=bo();return E1(),(i,u)=>(f(),V(s(sp),{"as-child":"",loop:"",trapped:i.trapFocus,onMountAutoFocus:u[5]||(u[5]=c=>n("openAutoFocus",c)),onUnmountAutoFocus:u[6]||(u[6]=c=>n("closeAutoFocus",c))},{default:N(()=>[D(s(op),{"as-child":"","disable-outside-pointer-events":i.disableOutsidePointerEvents,onPointerDownOutside:u[0]||(u[0]=c=>n("pointerDownOutside",c)),onInteractOutside:u[1]||(u[1]=c=>n("interactOutside",c)),onEscapeKeyDown:u[2]||(u[2]=c=>n("escapeKeyDown",c)),onFocusOutside:u[3]||(u[3]=c=>n("focusOutside",c)),onDismiss:u[4]||(u[4]=c=>s(o).onOpenChange(!1))},{default:N(()=>[D(s(J1),Ye(s(l),{id:s(o).contentId,ref:s(r),"data-state":s(o).open.value?"open":"closed","aria-labelledby":s(o).triggerId,style:{"--reka-popover-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-popover-content-available-width":"var(--reka-popper-available-width)","--reka-popover-content-available-height":"var(--reka-popper-available-height)","--reka-popover-trigger-width":"var(--reka-popper-anchor-width)","--reka-popover-trigger-height":"var(--reka-popper-anchor-height)"},role:"dialog"}),{default:N(()=>[Se(i.$slots,"default")]),_:3},16,["id","data-state","aria-labelledby"])]),_:3},8,["disable-outside-pointer-events"])]),_:3},8,["trapped"]))}}),o0=X6,Q6=ae({__name:"PopoverContentModal",props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const a=e,n=t,l=bo(),r=E(!1);Uf(!0);const o=Cn(a,n),{forwardRef:i,currentElement:u}=lt();return rp(u),(c,d)=>(f(),V(o0,Ye(s(o),{ref:s(i),"trap-focus":s(l).open.value,"disable-outside-pointer-events":"",onCloseAutoFocus:d[0]||(d[0]=mt(p=>{n("closeAutoFocus",p),r.value||s(l).triggerElement.value?.focus()},["prevent"])),onPointerDownOutside:d[1]||(d[1]=p=>{n("pointerDownOutside",p);const v=p.detail.originalEvent,m=v.button===0&&v.ctrlKey===!0,y=v.button===2||m;r.value=y}),onFocusOutside:d[2]||(d[2]=mt(()=>{},["prevent"]))}),{default:N(()=>[Se(c.$slots,"default")]),_:3},16,["trap-focus"]))}}),eM=Q6,tM=ae({__name:"PopoverContentNonModal",props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const a=e,n=t,l=bo(),r=E(!1),o=E(!1),i=Cn(a,n);return(u,c)=>(f(),V(o0,Ye(s(i),{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:c[0]||(c[0]=d=>{n("closeAutoFocus",d),d.defaultPrevented||(r.value||s(l).triggerElement.value?.focus(),d.preventDefault()),r.value=!1,o.value=!1}),onInteractOutside:c[1]||(c[1]=async d=>{n("interactOutside",d),d.defaultPrevented||(r.value=!0,d.detail.originalEvent.type==="pointerdown"&&(o.value=!0));const p=d.target;s(l).triggerElement.value?.contains(p)&&d.preventDefault(),d.detail.originalEvent.type==="focusin"&&o.value&&d.preventDefault()})}),{default:N(()=>[Se(u.$slots,"default")]),_:3},16))}}),aM=tM,nM=ae({__name:"PopoverContent",props:{forceMount:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const a=e,n=t,l=bo(),r=Cn(a,n),{forwardRef:o}=lt();return l.contentId||=Jn(void 0,"reka-popover-content"),(i,u)=>(f(),V(s(br),{present:i.forceMount||s(l).open.value},{default:N(()=>[s(l).modal.value?(f(),V(eM,Ye({key:0},s(r),{ref:s(o)}),{default:N(()=>[Se(i.$slots,"default")]),_:3},16)):(f(),V(aM,Ye({key:1},s(r),{ref:s(o)}),{default:N(()=>[Se(i.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),s0=nM,lM=ae({__name:"PopoverPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=e;return(a,n)=>(f(),V(s(Fu),ut(ft(t)),{default:N(()=>[Se(a.$slots,"default")]),_:3},16))}}),i0=lM,rM=ae({__name:"DatePickerContent",props:{portal:{type:Object,required:!1},forceMount:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const a=e,n=t,l=k(()=>({...a,portal:void 0})),r=Cn(l,n);return(o,i)=>(f(),V(s(i0),ut(ft(o.portal)),{default:N(()=>[D(s(s0),Ye({...s(r),...o.$attrs},{onOpenAutoFocus:i[0]||(i[0]=u=>{n("openAutoFocus",u),!u.defaultPrevented&&u.target&&(s($1)(u.target),u.preventDefault())})}),{default:N(()=>[Se(o.$slots,"default")]),_:3},16)]),_:3},16))}}),oM=rM,sM=ae({__name:"DatePickerField",setup(e){const t=wp();return(a,n)=>(f(),V(s(q6),Ye({ref:s(t).dateFieldRef,"model-value":s(t).modelValue.value,placeholder:s(t).placeholder.value},{id:s(t).id.value,name:s(t).name.value,disabled:s(t).disabled.value,minValue:s(t).minValue.value,maxValue:s(t).maxValue.value,readonly:s(t).readonly.value,hourCycle:s(t).hourCycle.value,granularity:s(t).granularity.value,hideTimeZone:s(t).hideTimeZone.value,locale:s(t).locale.value,isDateUnavailable:s(t).isDateUnavailable,required:s(t).required.value,dir:s(t).dir.value,step:s(t).step.value},{"onUpdate:modelValue":n[0]||(n[0]=l=>{l&&s(t).modelValue.value&&l.compare(s(t).modelValue.value)===0||s(t).onDateChange(l)}),"onUpdate:placeholder":n[1]||(n[1]=l=>{l.compare(s(t).placeholder.value)!==0&&s(t).onPlaceholderChange(l)})}),{default:N(({segments:l,modelValue:r})=>[Se(a.$slots,"default",{segments:l,modelValue:r})]),_:3},16,["model-value","placeholder"]))}}),iM=sM,uM=ae({__name:"DatePickerGrid",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(a,n)=>(f(),V(s(_8),ut(ft(t)),{default:N(()=>[Se(a.$slots,"default")]),_:3},16))}}),dM=uM,cM=ae({__name:"DatePickerGridBody",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(a,n)=>(f(),V(s(k8),ut(ft(t)),{default:N(()=>[Se(a.$slots,"default")]),_:3},16))}}),fM=cM,pM=ae({__name:"DatePickerGridHead",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(a,n)=>(f(),V(s($8),ut(ft(t)),{default:N(()=>[Se(a.$slots,"default")]),_:3},16))}}),mM=pM,vM=ae({__name:"DatePickerGridRow",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(a,n)=>(f(),V(s(S8),ut(ft(t)),{default:N(()=>[Se(a.$slots,"default")]),_:3},16))}}),gh=vM,hM=ae({__name:"DatePickerHeadCell",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(a,n)=>(f(),V(s(A8),ut(ft(t)),{default:N(()=>[Se(a.$slots,"default")]),_:3},16))}}),gM=hM,yM=ae({__name:"DatePickerHeader",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(a,n)=>(f(),V(s(M8),ut(ft(t)),{default:N(()=>[Se(a.$slots,"default")]),_:3},16))}}),bM=yM,_M=ae({__name:"DatePickerHeading",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(a,n)=>(f(),V(s(O8),ut(ft(t)),{default:N(({headingValue:l})=>[Se(a.$slots,"default",{headingValue:l},()=>[ye(_(l),1)])]),_:3},16))}}),xM=_M,kM=ae({__name:"DatePickerInput",props:{part:{type:null,required:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(a,n)=>(f(),V(s(N6),ut(ft(t)),{default:N(()=>[Se(a.$slots,"default")]),_:3},16))}}),wM=kM,$M=ae({__name:"DatePickerNext",props:{nextPage:{type:Function,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(a,n)=>(f(),V(s(I8),ut(ft(t)),{default:N(l=>[Se(a.$slots,"default",ut(ft(l)))]),_:3},16))}}),CM=$M,SM=ae({__name:"DatePickerPrev",props:{prevPage:{type:Function,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(a,n)=>(f(),V(s(q8),ut(ft(t)),{default:N(l=>[Se(a.$slots,"default",ut(ft(l)))]),_:3},16))}}),EM=SM,AM=ae({__name:"PopoverTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,a=bo(),{forwardRef:n,currentElement:l}=lt();return a.triggerId||=Jn(void 0,"reka-popover-trigger"),$t(()=>{a.triggerElement.value=l.value}),(r,o)=>(f(),V(Wt(s(a).hasCustomAnchor.value?s(rt):s(cp)),{"as-child":""},{default:N(()=>[D(s(rt),{id:s(a).triggerId,ref:s(n),type:r.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":s(a).open.value,"aria-controls":s(a).contentId,"data-state":s(a).open.value?"open":"closed",as:r.as,"as-child":t.asChild,onClick:s(a).onOpenToggle},{default:N(()=>[Se(r.$slots,"default")]),_:3},8,["id","type","aria-expanded","aria-controls","data-state","as","as-child","onClick"])]),_:3}))}}),TM=AM,MM=ae({__name:"DatePickerTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,a=wp();return(n,l)=>(f(),V(s(TM),Ye({"data-reka-date-field-segment":"trigger"},t,{disabled:s(a).disabled.value,onFocusin:l[0]||(l[0]=r=>{s(a).dateFieldRef.value?.setFocusedElement(r.target)})}),{default:N(()=>[Se(n.$slots,"default")]),_:3},16,["disabled"]))}}),DM=MM;const[u0,OM]=Ot("DropdownMenuRoot");var PM=ae({__name:"DropdownMenuRoot",props:{defaultOpen:{type:Boolean,required:!1},open:{type:Boolean,required:!1,default:void 0},dir:{type:String,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(e,{emit:t}){const a=e,n=t;lt();const l=Ft(a,"open",n,{defaultValue:a.defaultOpen,passive:a.open===void 0}),r=E(),{modal:o,dir:i}=Kt(a),u=$n(i);return OM({open:l,onOpenChange:c=>{l.value=c},onOpenToggle:()=>{l.value=!l.value},triggerId:"",triggerElement:r,contentId:"",modal:o,dir:u}),(c,d)=>(f(),V(s(t6),{open:s(l),"onUpdate:open":d[0]||(d[0]=p=>Ct(l)?l.value=p:null),dir:s(u),modal:s(o)},{default:N(()=>[Se(c.$slots,"default",{open:s(l)})]),_:3},8,["open","dir","modal"]))}}),d0=PM,IM=ae({__name:"DropdownMenuContent",props:{forceMount:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(e,{emit:t}){const l=Cn(e,t);lt();const r=u0(),o=E(!1);function i(u){u.defaultPrevented||(o.value||setTimeout(()=>{r.triggerElement.value?.focus()},0),o.value=!1,u.preventDefault())}return r.contentId||=Jn(void 0,"reka-dropdown-menu-content"),(u,c)=>(f(),V(s(h6),Ye(s(l),{id:s(r).contentId,"aria-labelledby":s(r)?.triggerId,style:{"--reka-dropdown-menu-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-dropdown-menu-content-available-width":"var(--reka-popper-available-width)","--reka-dropdown-menu-content-available-height":"var(--reka-popper-available-height)","--reka-dropdown-menu-trigger-width":"var(--reka-popper-anchor-width)","--reka-dropdown-menu-trigger-height":"var(--reka-popper-anchor-height)"},onCloseAutoFocus:i,onInteractOutside:c[0]||(c[0]=d=>{if(d.defaultPrevented)return;const p=d.detail.originalEvent,v=p.button===0&&p.ctrlKey===!0,m=p.button===2||v;(!s(r).modal.value||m)&&(o.value=!0),s(r).triggerElement.value?.contains(d.target)&&d.preventDefault()})}),{default:N(()=>[Se(u.$slots,"default")]),_:3},16,["id","aria-labelledby"]))}}),c0=IM,RM=ae({__name:"DropdownMenuItem",props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(e,{emit:t}){const a=e,l=yr(t);return lt(),(r,o)=>(f(),V(s(l0),ut(ft({...a,...s(l)})),{default:N(()=>[Se(r.$slots,"default")]),_:3},16))}}),Yc=RM,qM=ae({__name:"DropdownMenuItemIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return lt(),(a,n)=>(f(),V(s(d6),ut(ft(t)),{default:N(()=>[Se(a.$slots,"default")]),_:3},16))}}),LM=qM,NM=ae({__name:"DropdownMenuLabel",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return lt(),(a,n)=>(f(),V(s(k6),ut(ft(t)),{default:N(()=>[Se(a.$slots,"default")]),_:3},16))}}),BM=NM,FM=ae({__name:"DropdownMenuPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=e;return(a,n)=>(f(),V(s($6),ut(ft(t)),{default:N(()=>[Se(a.$slots,"default")]),_:3},16))}}),f0=FM,VM=ae({__name:"DropdownMenuRadioGroup",props:{modelValue:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const a=e,l=yr(t);return lt(),(r,o)=>(f(),V(s(A6),ut(ft({...a,...s(l)})),{default:N(()=>[Se(r.$slots,"default")]),_:3},16))}}),zM=VM,jM=ae({__name:"DropdownMenuRadioItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(e,{emit:t}){const l=Cn(e,t);return lt(),(r,o)=>(f(),V(s(M6),ut(ft(s(l))),{default:N(()=>[Se(r.$slots,"default")]),_:3},16))}}),UM=jM,HM=ae({__name:"DropdownMenuSeparator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return lt(),(a,n)=>(f(),V(s(O6),ut(ft(t)),{default:N(()=>[Se(a.$slots,"default")]),_:3},16))}}),yh=HM,KM=ae({__name:"DropdownMenuTrigger",props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,a=u0(),{forwardRef:n,currentElement:l}=lt();return $t(()=>{a.triggerElement=l}),a.triggerId||=Jn(void 0,"reka-dropdown-menu-trigger"),(r,o)=>(f(),V(s(Y8),{"as-child":""},{default:N(()=>[D(s(rt),{id:s(a).triggerId,ref:s(n),type:r.as==="button"?"button":void 0,"as-child":t.asChild,as:r.as,"aria-haspopup":"menu","aria-expanded":s(a).open.value,"aria-controls":s(a).open.value?s(a).contentId:void 0,"data-disabled":r.disabled?"":void 0,disabled:r.disabled,"data-state":s(a).open.value?"open":"closed",onClick:o[0]||(o[0]=async i=>{!r.disabled&&i.button===0&&i.ctrlKey===!1&&(s(a)?.onOpenToggle(),await Ge(),s(a).open.value&&i.preventDefault())}),onKeydown:o[1]||(o[1]=gn(i=>{r.disabled||(["Enter"," "].includes(i.key)&&s(a).onOpenToggle(),i.key==="ArrowDown"&&s(a).onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())},["enter","space","arrow-down"]))},{default:N(()=>[Se(r.$slots,"default")]),_:3},8,["id","type","as-child","as","aria-expanded","aria-controls","data-disabled","disabled","data-state"])]),_:3}))}}),p0=KM;const Cs=100,[WM,GM]=Ot("ProgressRoot"),lu=e=>typeof e=="number";function YM(e,t){return $a(e)||lu(e)&&!Number.isNaN(e)&&e<=t&&e>=0?e:(console.error(`Invalid prop \`value\` of value \`${e}\` supplied to \`ProgressRoot\`. The \`value\` prop must be: + - a positive number + - less than the value passed to \`max\` (or ${Cs} if no \`max\` prop is set) + - \`null\` or \`undefined\` if the progress is indeterminate. + +Defaulting to \`null\`.`),null)}function JM(e){return lu(e)&&!Number.isNaN(e)&&e>0?e:(console.error(`Invalid prop \`max\` of value \`${e}\` supplied to \`ProgressRoot\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Cs}\`.`),Cs)}var ZM=ae({__name:"ProgressRoot",props:{modelValue:{type:[Number,null],required:!1},max:{type:Number,required:!1,default:Cs},getValueLabel:{type:Function,required:!1,default:(e,t)=>lu(e)?`${Math.round(e/t*Cs)}%`:void 0},getValueText:{type:Function,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:modelValue","update:max"],setup(e,{emit:t}){const a=e,n=t;lt();const l=Ft(a,"modelValue",n,{passive:a.modelValue===void 0}),r=Ft(a,"max",n,{passive:a.max===void 0});Ve(()=>l.value,async i=>{const u=YM(i,a.max);u!==i&&(await Ge(),l.value=u)},{immediate:!0}),Ve(()=>a.max,i=>{const u=JM(a.max);u!==i&&(r.value=u)},{immediate:!0});const o=k(()=>$a(l.value)?"indeterminate":l.value===r.value?"complete":"loading");return GM({modelValue:l,max:r,progressState:o}),(i,u)=>(f(),V(s(rt),{"as-child":i.asChild,as:i.as,"aria-valuemax":s(r),"aria-valuemin":0,"aria-valuenow":lu(s(l))?s(l):void 0,"aria-valuetext":i.getValueText?.(s(l),s(r)),"aria-label":i.getValueLabel(s(l),s(r)),role:"progressbar","data-state":o.value,"data-value":s(l)??void 0,"data-max":s(r)},{default:N(()=>[Se(i.$slots,"default",{modelValue:s(l)})]),_:3},8,["as-child","as","aria-valuemax","aria-valuenow","aria-valuetext","aria-label","data-state","data-value","data-max"]))}}),Ud=ZM,XM=ae({__name:"ProgressIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,a=WM();return lt(),(n,l)=>(f(),V(s(rt),Ye(t,{"data-state":s(a).progressState.value,"data-value":s(a).modelValue?.value??void 0,"data-max":s(a).max.value}),{default:N(()=>[Se(n.$slots,"default")]),_:3},16,["data-state","data-value","data-max"]))}}),Hd=XM;const QM="radio.select";function eD(e,t,a){Ff(QM,a,{originalEvent:e,value:t})}var tD=ae({__name:"Radio",props:{id:{type:String,required:!1},value:{type:null,required:!1},disabled:{type:Boolean,required:!1,default:!1},checked:{type:Boolean,required:!1,default:void 0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:checked","select"],setup(e,{emit:t}){const a=e,n=t,l=Ft(a,"checked",n,{passive:a.checked===void 0}),{value:r}=Kt(a),{forwardRef:o,currentElement:i}=lt(),u=lp(i),c=k(()=>a.id&&i.value?document.querySelector(`[for="${a.id}"]`)?.innerText??a.value:void 0);function d(p){a.disabled||eD(p,a.value,v=>{n("select",v),!v?.defaultPrevented&&(l.value=!0,u.value&&v.stopPropagation())})}return(p,v)=>(f(),V(s(rt),Ye(p.$attrs,{id:p.id,ref:s(o),role:"radio",type:p.as==="button"?"button":void 0,as:p.as,"aria-checked":s(l),"aria-label":c.value,"as-child":p.asChild,disabled:p.disabled?"":void 0,"data-state":s(l)?"checked":"unchecked","data-disabled":p.disabled?"":void 0,value:s(r),required:p.required,name:p.name,onClick:mt(d,["stop"])}),{default:N(()=>[Se(p.$slots,"default",{checked:s(l)}),s(u)&&p.name?(f(),V(s(dp),{key:0,type:"radio",tabindex:"-1",value:s(r),checked:!!s(l),name:p.name,disabled:p.disabled,required:p.required},null,8,["value","checked","name","disabled","required"])):G("v-if",!0)]),_:3},16,["id","type","as","aria-checked","aria-label","as-child","disabled","data-state","data-disabled","value","required","name"]))}}),aD=tD;const[nD,lD]=Ot("RadioGroupRoot");var rD=ae({__name:"RadioGroupRoot",props:{modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},disabled:{type:Boolean,required:!1,default:!1},orientation:{type:String,required:!1,default:void 0},dir:{type:String,required:!1},loop:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const a=e,n=t,{forwardRef:l,currentElement:r}=lt(),o=Ft(a,"modelValue",n,{defaultValue:a.defaultValue,passive:a.modelValue===void 0}),{disabled:i,loop:u,orientation:c,name:d,required:p,dir:v}=Kt(a),m=$n(v),y=lp(r);return lD({modelValue:o,changeModelValue:x=>{o.value=x},disabled:i,loop:u,orientation:c,name:d?.value,required:p}),(x,C)=>(f(),V(s(Ku),{"as-child":"",orientation:s(c),dir:s(m),loop:s(u)},{default:N(()=>[D(s(rt),{ref:s(l),role:"radiogroup","data-disabled":s(i)?"":void 0,"as-child":x.asChild,as:x.as,"aria-orientation":s(c),"aria-required":s(p),dir:s(m)},{default:N(()=>[Se(x.$slots,"default",{modelValue:s(o)}),s(y)&&s(d)?(f(),V(s(dp),{key:0,required:s(p),disabled:s(i),value:s(o),name:s(d)},null,8,["required","disabled","value","name"])):G("v-if",!0)]),_:3},8,["data-disabled","as-child","as","aria-orientation","aria-required","dir"])]),_:3},8,["orientation","dir","loop"]))}}),$p=rD;const[fZ,oD]=Ot("RadioGroupItem");var sD=ae({inheritAttrs:!1,__name:"RadioGroupItem",props:{id:{type:String,required:!1},value:{type:null,required:!1},disabled:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["select"],setup(e,{emit:t}){const a=e,n=t,{forwardRef:l,currentElement:r}=lt(),o=nD(),i=k(()=>o.disabled.value||a.disabled),u=k(()=>o.required.value||a.required),c=k(()=>bs(o.modelValue?.value,a.value));oD({disabled:i,checked:c});const d=E(!1),p=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"];so("keydown",m=>{p.includes(m.key)&&(d.value=!0)}),so("keyup",()=>{d.value=!1});function v(){setTimeout(()=>{d.value&&r.value?.click()},0)}return(m,y)=>(f(),V(s(Wu),{checked:c.value,disabled:i.value,"as-child":"",focusable:!i.value,active:c.value},{default:N(()=>[D(aD,Ye({...m.$attrs,...a},{ref:s(l),checked:c.value,required:u.value,disabled:i.value,"onUpdate:checked":y[0]||(y[0]=x=>s(o).changeModelValue(m.value)),onSelect:y[1]||(y[1]=x=>n("select",x)),onKeydown:y[2]||(y[2]=gn(mt(()=>{},["prevent"]),["enter"])),onFocus:v}),{default:N(()=>[Se(m.$slots,"default",{checked:c.value,required:u.value,disabled:i.value})]),_:3},16,["checked","required","disabled"])]),_:3},8,["checked","disabled","focusable","active"]))}}),Cp=sD,iD=ae({__name:"BaseSeparator",props:{orientation:{type:String,required:!1,default:"horizontal"},decorative:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,a=["horizontal","vertical"];function n(i){return a.includes(i)}const l=k(()=>n(t.orientation)?t.orientation:"horizontal"),r=k(()=>l.value==="vertical"?t.orientation:void 0),o=k(()=>t.decorative?{role:"none"}:{"aria-orientation":r.value,role:"separator"});return(i,u)=>(f(),V(s(rt),Ye({as:i.as,"as-child":i.asChild,"data-orientation":l.value},o.value),{default:N(()=>[Se(i.$slots,"default")]),_:3},16,["as","as-child","data-orientation"]))}}),uD=iD;const[Sp,dD]=Ot("TabsRoot");var cD=ae({__name:"TabsRoot",props:{defaultValue:{type:null,required:!1},orientation:{type:String,required:!1,default:"horizontal"},dir:{type:String,required:!1},activationMode:{type:String,required:!1,default:"automatic"},modelValue:{type:null,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const a=e,n=t,{orientation:l,unmountOnHide:r,dir:o}=Kt(a),i=$n(o);lt();const u=Ft(a,"modelValue",n,{defaultValue:a.defaultValue,passive:a.modelValue===void 0}),c=E(),d=pr(new Set);return dD({modelValue:u,changeModelValue:p=>{u.value=p},orientation:l,dir:i,unmountOnHide:r,activationMode:a.activationMode,baseId:Jn(void 0,"reka-tabs"),tabsList:c,contentIds:d,registerContent:p=>{d.value=new Set([...d.value,p])},unregisterContent:p=>{const v=new Set(d.value);v.delete(p),d.value=v}}),(p,v)=>(f(),V(s(rt),{dir:s(i),"data-orientation":s(l),"as-child":p.asChild,as:p.as},{default:N(()=>[Se(p.$slots,"default",{modelValue:s(u)})]),_:3},8,["dir","data-orientation","as-child","as"]))}}),fD=cD;function m0(e,t){return`${e}-trigger-${t}`}function v0(e,t){return`${e}-content-${t}`}var pD=ae({__name:"TabsContent",props:{value:{type:[String,Number],required:!0},forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:a}=lt(),n=Sp(),l=k(()=>m0(n.baseId,t.value)),r=k(()=>v0(n.baseId,t.value)),o=k(()=>t.value===n.modelValue.value),i=E(o.value);return $t(()=>{n.registerContent(t.value),requestAnimationFrame(()=>{i.value=!1})}),Dt(()=>{n.unregisterContent(t.value)}),(u,c)=>(f(),V(s(br),{present:u.forceMount||o.value,"force-mount":""},{default:N(({present:d})=>[D(s(rt),{id:r.value,ref:s(a),"as-child":u.asChild,as:u.as,role:"tabpanel","data-state":o.value?"active":"inactive","data-orientation":s(n).orientation.value,"aria-labelledby":l.value,hidden:!d,tabindex:"0",style:ra({animationDuration:i.value?"0s":void 0})},{default:N(()=>[!s(n).unmountOnHide.value||d?Se(u.$slots,"default",{key:0}):G("v-if",!0)]),_:2},1032,["id","as-child","as","data-state","data-orientation","aria-labelledby","hidden","style"])]),_:3},8,["present"]))}}),bh=pD,mD=ae({__name:"TabsList",props:{loop:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{loop:a}=Kt(t),{forwardRef:n,currentElement:l}=lt(),r=Sp();return r.tabsList=l,(o,i)=>(f(),V(s(Ku),{"as-child":"",orientation:s(r).orientation.value,dir:s(r).dir.value,loop:s(a)},{default:N(()=>[D(s(rt),{ref:s(n),role:"tablist","as-child":o.asChild,as:o.as,"aria-orientation":s(r).orientation.value},{default:N(()=>[Se(o.$slots,"default")]),_:3},8,["as-child","as","aria-orientation"])]),_:3},8,["orientation","dir","loop"]))}}),vD=mD,hD=ae({__name:"TabsTrigger",props:{value:{type:[String,Number],required:!0},disabled:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,{forwardRef:a}=lt(),n=Sp(),l=k(()=>m0(n.baseId,t.value)),r=k(()=>n.contentIds.value.has(t.value)?v0(n.baseId,t.value):void 0),o=k(()=>t.value===n.modelValue.value);return(i,u)=>(f(),V(s(Wu),{"as-child":"",focusable:!i.disabled,active:o.value},{default:N(()=>[D(s(rt),{id:l.value,ref:s(a),role:"tab",type:i.as==="button"?"button":void 0,as:i.as,"as-child":i.asChild,"aria-selected":o.value?"true":"false","aria-controls":r.value,"data-state":o.value?"active":"inactive",disabled:i.disabled,"data-disabled":i.disabled?"":void 0,"data-orientation":s(n).orientation.value,onMousedown:u[0]||(u[0]=mt(c=>{!i.disabled&&c.ctrlKey===!1?s(n).changeModelValue(i.value):c.preventDefault()},["left"])),onKeydown:u[1]||(u[1]=gn(c=>s(n).changeModelValue(i.value),["enter","space"])),onFocus:u[2]||(u[2]=()=>{const c=s(n).activationMode!=="manual";!o.value&&!i.disabled&&c&&s(n).changeModelValue(i.value)})},{default:N(()=>[Se(i.$slots,"default")]),_:3},8,["id","type","as","as-child","aria-selected","aria-controls","data-state","disabled","data-disabled","data-orientation"])]),_:3},8,["focusable","active"]))}}),_h=hD;const[gD,yD]=Ot("TimeFieldRoot");function oi(e,t=Ns(Qa())){return e&&"day"in e?e:yn(t,e)}var bD=ae({inheritAttrs:!1,__name:"TimeFieldRoot",props:{defaultValue:{type:Object,required:!1,default:void 0},defaultPlaceholder:{type:Object,required:!1},placeholder:{type:Object,required:!1,default:void 0},modelValue:{type:[Object,null],required:!1},hourCycle:{type:null,required:!1},step:{type:Object,required:!1},stepSnapping:{type:Boolean,required:!1,default:!1},granularity:{type:String,required:!1},hideTimeZone:{type:Boolean,required:!1},maxValue:{type:Object,required:!1},minValue:{type:Object,required:!1},locale:{type:String,required:!1},disabled:{type:Boolean,required:!1,default:!1},readonly:{type:Boolean,required:!1,default:!1},id:{type:String,required:!1},dir:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","update:placeholder"],setup(e,{expose:t,emit:a}){const n=e,l=a,{disabled:r,readonly:o,granularity:i,defaultValue:u,minValue:c,maxValue:d,stepSnapping:p,dir:v,locale:m}=Kt(n),y=Bu(m),x=$n(v),C=np(y.value,{hourCycle:ks(n.hourCycle)}),{primitiveElement:w,currentElement:S}=dr(),L=E(new Set),O=k(()=>w1(n)),M=k(()=>c.value?oi(c.value):void 0),R=k(()=>d.value?oi(d.value):void 0);$t(()=>{hh(S.value).forEach(he=>L.value.add(he))});const q=Ft(n,"modelValue",l,{defaultValue:u.value,passive:n.modelValue===void 0}),K=k({get(){return $a(q.value)?q.value:oi(q.value)},set(he){return he?q.value=q.value&&"day"in q.value?he:new fn(he.hour,he.minute,he.second,q.value?.millisecond):q.value=he,he}}),T=uA({defaultPlaceholder:n.placeholder,defaultValue:q.value}),I=Ft(n,"placeholder",l,{defaultValue:n.defaultPlaceholder??T.copy(),passive:n.placeholder===void 0}),W=k({get(){return oi(I.value)},set(he){return he&&(I.value="day"in I.value?he.copy():new fn(he.hour,he.minute,he.second,I.value?.millisecond)),he}}),A=k(()=>i.value?i.value:"minute"),B=k(()=>q.value?!!(M.value&&Cl(K.value,M.value)||R.value&&Cl(R.value,K.value)):!1),Y=zT(A.value),U=E(q.value?{...Gc({value:K.value,formatter:C})}:{...Y}),H=k(()=>Q1({granularity:A.value,dateRef:W.value,formatter:C,hideTimeZone:n.hideTimeZone,hourCycle:n.hourCycle,segmentValues:U.value,locale:y,isTimeValue:!0})),re=k(()=>{const he=H.value.arr;return n.hourCycle===12?he.map(Z=>{if(Z.part==="hour"&&"hour"in U.value){const ge=U.value.hour;if(ge!==null){const J=ge===0?12:ge>12?ge-12:ge;return{...Z,value:J.toString()}}}return Z}):he}),fe=k(()=>re.value.filter(({part:he})=>he!=="literal"));Ve(y,he=>{C.getLocale()!==he&&(C.setLocale(he),Ge(()=>{L.value.clear(),hh(S.value).forEach(Z=>L.value.add(Z))}))}),Ve(K,he=>{!$a(he)&&(!Yr(W.value,he)||W.value.compare(he)!==0)&&(I.value=he.copy())}),Ve([K,y],([he])=>{$a(he)?Object.values(U.value).every(Z=>Z!==null)&&$a(he)&&(U.value={...Y}):U.value={...Gc({value:he,formatter:C})}});const Ae=E(null),xe=k(()=>Array.from(L.value).findIndex(he=>he.getAttribute("data-reka-time-field-segment")===Ae.value?.getAttribute("data-reka-time-field-segment"))),_e=k(()=>{const he=x.value==="rtl"?-1:1;return(he<0?xe.value<0:xe.value>L.value.size-1)?null:Array.from(L.value)[xe.value+he]}),le=k(()=>{const he=x.value==="rtl"?-1:1;return(he>0?xe.value<0:xe.value>L.value.size-1)?null:Array.from(L.value)[xe.value-he]}),pe=ho();function F(he){he.isComposing||On(he.key)&&(he.key===pe.ARROW_LEFT&&le.value?.focus(),he.key===pe.ARROW_RIGHT&&_e.value?.focus())}function de(he){Ae.value=he}return yD({locale:y,modelValue:K,placeholder:W,disabled:r,formatter:C,hourCycle:n.hourCycle,step:O,stepSnapping:p,readonly:o,segmentValues:U,isInvalid:B,segmentContents:fe,elements:L,setFocusedElement:de,focusNext(){_e.value?.focus()}}),t({setFocusedElement:de}),(he,Z)=>(f(),V(s(rt),Ye(he.$attrs,{ref_key:"primitiveElement",ref:w,role:"group","aria-disabled":s(r)?!0:void 0,"data-disabled":s(r)?"":void 0,"data-readonly":s(o)?"":void 0,"data-invalid":B.value?"":void 0,dir:s(x),onKeydown:gn(F,["left","right"])}),{default:N(()=>[Se(he.$slots,"default",{modelValue:s(q),segments:re.value,isInvalid:B.value}),D(s(up),{id:he.id,as:"input",feature:"focusable",tabindex:"-1",value:s(q)?s(q).toString():"",name:he.name,disabled:s(r),required:he.required,onFocus:Z[0]||(Z[0]=ge=>Array.from(L.value)?.[0]?.focus())},null,8,["id","value","name","disabled","required"])]),_:3},16,["aria-disabled","data-disabled","data-readonly","data-invalid","dir"]))}}),xh=bD,_D=ae({__name:"TimeFieldInput",props:{part:{type:null,required:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,a=gD(),n=E(!0),l=E(!1),{handleSegmentClick:r,handleSegmentKeydown:o,handleSegmentBeforeInput:i,handleSegmentCompositionStart:u,handleSegmentCompositionEnd:c,handleSegmentFocusOut:d,attributes:p}=e0({hasLeftFocus:n,lastKeyZero:l,placeholder:a.placeholder,hourCycle:a.hourCycle,step:a.step,stepSnapping:a.stepSnapping,segmentValues:a.segmentValues,formatter:a.formatter,part:t.part,disabled:a.disabled,readonly:a.readonly,focusNext:a.focusNext,modelValue:a.modelValue}),v=k(()=>a.disabled.value),m=k(()=>a.readonly.value),y=k(()=>a.isInvalid.value);return(x,C)=>(f(),V(s(rt),Ye({as:x.as,"as-child":x.asChild},s(p),{contenteditable:v.value||m.value?!1:x.part!=="literal","data-reka-time-field-segment":x.part,"aria-disabled":v.value?!0:void 0,"aria-readonly":m.value?!0:void 0,"data-disabled":v.value?"":void 0,"data-invalid":y.value?"":void 0,"aria-invalid":y.value?!0:void 0},cy(x.part!=="literal"?{mousedown:s(r),keydown:s(o),beforeinput:s(i),compositionstart:s(u),compositionend:s(c),focusout:()=>{n.value=!0,s(d)()},focusin:w=>{s(a).setFocusedElement(w.target)}}:{})),{default:N(()=>[Se(x.$slots,"default")]),_:3},16,["as","as-child","contenteditable","data-reka-time-field-segment","aria-disabled","aria-readonly","data-disabled","data-invalid","aria-invalid"]))}}),kh=_D,xD=ae({__name:"ToolbarButton",props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,{forwardRef:a}=lt();return(n,l)=>(f(),V(s(Wu),{"as-child":"",focusable:!n.disabled},{default:N(()=>[D(s(rt),Ye({ref:s(a),type:n.as==="button"?"button":void 0},t),{default:N(()=>[Se(n.$slots,"default")]),_:3},16,["type"])]),_:3},8,["focusable"]))}}),Io=xD;const[kD,wD]=Ot("ToolbarRoot");var $D=ae({__name:"ToolbarRoot",props:{orientation:{type:String,required:!1,default:"horizontal"},dir:{type:String,required:!1},loop:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{orientation:a,dir:n}=Kt(t),l=$n(n),{forwardRef:r}=lt();return wD({orientation:a,dir:l}),(o,i)=>(f(),V(s(Ku),{"as-child":"",orientation:s(a),dir:s(l),loop:o.loop},{default:N(()=>[D(s(rt),{ref:s(r),role:"toolbar","aria-orientation":s(a),"as-child":o.asChild,as:o.as},{default:N(()=>[Se(o.$slots,"default")]),_:3},8,["aria-orientation","as-child","as"])]),_:3},8,["orientation","dir","loop"]))}}),CD=$D,SD=ae({__name:"ToolbarSeparator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,a=kD();return lt(),(n,l)=>(f(),V(uD,{orientation:s(a).orientation.value,"as-child":t.asChild,as:n.as},{default:N(()=>[Se(n.$slots,"default")]),_:3},8,["orientation","as-child","as"]))}}),Kd=SD;const ED=/^filter\[(.+)\]$/,AD=/^[1-9]\d*$/;function Dr(e){const t=Array.isArray(e)?e[e.length-1]:e;return typeof t=="string"?t:""}function wh(e){return AD.test(e)?Number(e):void 0}function h0(e){const t={},a=Dr(e.search).trim();a!==""&&(t.search=a);const n=Dr(e.sort).trim();if(n!==""){t.sort=n;const i=Dr(e.dir);t.dir=i==="desc"?"desc":"asc"}const l=wh(Dr(e.page));l!==void 0&&(t.page=l);const r=wh(Dr(e.per_page));r!==void 0&&(t.per_page=r);const o={};for(const i of Object.keys(e).sort()){const u=ED.exec(i)?.[1],c=Dr(e[i]);u&&c!==""&&(o[u]=c)}return Object.keys(o).length>0&&(t.filter=o),t}function ru(e){const t={};e.search&&(t.search=e.search),e.sort&&(t.sort=e.sort,t.dir=e.dir==="desc"?"desc":"asc"),e.page!==void 0&&e.page>1&&(t.page=String(e.page)),e.per_page!==void 0&&(t.per_page=String(e.per_page));for(const a of Object.keys(e.filter??{}).sort()){const n=e.filter?.[a];n!==void 0&&n!==""&&(t[`filter[${a}]`]=n)}return t}function Vr(e){return JSON.stringify(ru(e))}const g0="summer-admin.list:",TD=Vr({});let Jc=null;function Yu(){try{return typeof window>"u"?null:window.localStorage}catch{return null}}function y0(e){return`${g0}${e}:`}function b0(e){return Jc===null?null:y0(Jc)+e}function Zc(e){try{Yu()?.removeItem(e)}catch{}}function $h(e){const t=Yu();if(t)try{const a=[];for(let n=0;n!0);return}const a=y0(t);$h(n=>!n.startsWith(a))}function MD(e){const t=b0(e);if(t===null)return{};let a=null;try{a=Yu()?.getItem(t)??null}catch{return{}}if(a===null)return{};let n;try{n=JSON.parse(a)}catch{return Zc(t),{}}return typeof n!="object"||n===null||Array.isArray(n)||Object.getPrototypeOf(n)!==Object.prototype||!Object.values(n).every(l=>typeof l=="string")?(Zc(t),{}):h0(n)}function si(e,t){const a=b0(e);if(a!==null){if(Vr(t)===TD){Zc(a);return}try{Yu()?.setItem(a,JSON.stringify(ru(t)))}catch{}}}const or=E(null),_0=E(null);let ss=null;function x0(e){k0(),_0.value=e,!(e===null||e<=0)&&(ss=setTimeout(()=>{ss=null,Sf()},e*800))}function k0(){ss!==null&&(clearTimeout(ss),ss=null)}Y2(x0);const aa=At(or);async function DD(e,t){const{data:a,response:n}=await Le.POST("/auth/login",{body:{login:e,password:t}});return!n.ok||!a?!1:(x0(typeof a.data.expires_in=="number"?a.data.expires_in:null),!0)}async function w0(){const{data:e,response:t}=await Le.GET("/auth/me");return or.value=t.ok&&e?e.data:null,Ep(or.value?.id??null),await v4(or.value),or.value}function $0(e){if(!e)return"";const t=[e.first_name,e.last_name].map(a=>a.trim()).filter(Boolean);return t.length>0?t.slice(0,2).map(a=>a.charAt(0).toUpperCase()).join(""):e.login.slice(0,2).toUpperCase()}function Wd(e){or.value=e,Ep(e.id)}function C0(){k0(),or.value=null,_0.value=null,Ep(null)}function Xc(e){C0();const t=e.currentRoute.value;t.name!=="login"&&e.push({name:"login",query:{redirect:t.fullPath}}).catch(()=>{})}async function S0(e){try{await Le.POST("/auth/logout")}catch{}finally{C0(),t$([]),l$([]),n4({canView:!1,canManage:!1})}e&&await e.replace({name:"login"}).catch(()=>{})}const OD=["src"],PD={key:1,class:"flex size-[34px] shrink-0 items-center justify-center rounded-full bg-accent text-[13px] font-bold text-on-accent","aria-hidden":"true","data-user-initials":""},ID={class:"flex flex-col leading-tight max-[1099px]:hidden","data-user-identity":""},RD={class:"font-semibold"},qD={key:0,class:"text-[12px] text-muted","data-user-role":""},LD={class:"flex items-center gap-3 px-2 py-2"},ND=["src"],BD={key:1,class:"flex size-10 shrink-0 items-center justify-center rounded-full bg-accent text-[14px] font-bold text-on-accent","aria-hidden":"true"},FD={class:"flex min-w-0 flex-col leading-tight"},VD={class:"truncate font-bold"},zD={class:"truncate text-[13px] text-muted"},jD={class:"flex size-[18px] items-center justify-center"},UD=ae({__name:"UserMenu",setup(e){const t=wn(),a=k(()=>{const v=aa.value;if(!v)return"";const m=`${v.first_name} ${v.last_name}`.trim();return m===""?v.login:m}),n=k(()=>$0(aa.value)),l=k(()=>aa.value?.avatar?.thumb_url||aa.value?.avatar?.url||""),r=k(()=>aa.value?.role?.name??""),o=k(()=>d4.value||Na.value);function i(v){try{const m=new Intl.DisplayNames([v],{type:"language"}).of(v);if(m&&m!==v)return m.charAt(0).toLocaleUpperCase(v)+m.slice(1)}catch{}return v.toUpperCase()}const u=k(()=>X2.value.map(v=>({code:v,name:i(v)})));function c(v){typeof v=="string"&&v!==""&&h4(v)}async function d(){await t.push({name:"account"}).catch(()=>{})}async function p(){await S0(t)}return(v,m)=>(f(),V(s(d0),{modal:!1},{default:N(()=>[D(s(p0),{"data-user-menu":"",disabled:!s(aa),"aria-label":`${s(h)("backend::lang.nav.user_menu")}: ${a.value}`,class:"flex h-input items-center gap-2.5 rounded-inner px-2 text-left transition-colors duration-150 ease-out hover:bg-hover"},{default:N(()=>[l.value?(f(),b("img",{key:0,src:l.value,alt:"","data-user-avatar":"",class:"size-[34px] shrink-0 rounded-full object-cover"},null,8,OD)):(f(),b("span",PD,_(n.value),1)),g("span",ID,[g("span",RD,_(a.value),1),r.value?(f(),b("span",qD,_(r.value),1)):G("",!0)]),D(s(Gn),{size:16,class:"text-muted","aria-hidden":"true"})]),_:1},8,["disabled","aria-label"]),D(s(f0),null,{default:N(()=>[D(s(c0),{"data-user-menu-content":"",align:"end","side-offset":8,class:"z-50 flex w-[280px] flex-col rounded-[14px] border border-border bg-surface p-2 text-text shadow-menu"},{default:N(()=>[g("div",LD,[l.value?(f(),b("img",{key:0,src:l.value,alt:"","data-user-avatar":"",class:"size-10 shrink-0 rounded-full object-cover"},null,8,ND)):(f(),b("span",BD,_(n.value),1)),g("span",FD,[g("span",VD,_(a.value),1),g("span",zD,_(s(aa)?.email),1)])]),D(s(Yc),{"data-action":"account",class:"flex h-10 cursor-pointer items-center gap-2.5 rounded-control px-3 font-medium outline-none transition-colors duration-150 ease-out data-[highlighted]:bg-hover",onSelect:d},{default:N(()=>[D(s(jS),{size:18,"aria-hidden":"true"}),g("span",null,_(s(h)("backend::lang.myaccount.menu_label")),1)]),_:1}),u.value.length>1?(f(),b(ve,{key:0},[D(s(yh),{class:"my-1 h-px bg-border"}),D(s(BM),{class:"px-3 pt-1 pb-1 text-[12px] font-semibold text-muted","data-language-label":""},{default:N(()=>[ye(_(s(h)("backend::lang.nav.language")),1)]),_:1}),D(s(zM),{"model-value":o.value,"onUpdate:modelValue":c},{default:N(()=>[(f(!0),b(ve,null,Ie(u.value,y=>(f(),V(s(UM),{key:y.code,value:y.code,"data-locale-option":y.code,lang:y.code,class:"flex h-10 cursor-pointer items-center gap-2.5 rounded-control px-3 font-medium outline-none transition-colors duration-150 ease-out data-[highlighted]:bg-hover"},{default:N(()=>[g("span",jD,[D(s(LM),null,{default:N(()=>[D(s(Ba),{size:18,"aria-hidden":"true"})]),_:1})]),g("span",null,_(y.name),1)]),_:2},1032,["value","data-locale-option","lang"]))),128))]),_:1},8,["model-value"])],64)):G("",!0),D(s(yh),{class:"my-1 h-px bg-border"}),D(s(Yc),{"data-action":"logout",class:"flex h-10 cursor-pointer items-center gap-2.5 rounded-control px-3 font-medium outline-none transition-colors duration-150 ease-out data-[highlighted]:bg-hover",onSelect:p},{default:N(()=>[D(s(Sb),{size:18,"aria-hidden":"true"}),g("span",null,_(s(h)("backend::lang.auth.logout")),1)]),_:1})]),_:1})]),_:1})]),_:1}))}}),HD=["role","data-tone"],KD={class:"font-medium"},WD=["aria-label","onClick"],GD=ae({__name:"Toast",setup(e){return(t,a)=>(f(),V(gw,{tag:"div",name:"toast",class:"pointer-events-none fixed inset-x-0 bottom-[88px] z-50 flex flex-col items-center gap-2 px-4"},{default:N(()=>[(f(!0),b(ve,null,Ie(s(i4),n=>(f(),b("div",{key:n.id,role:n.tone==="danger"?"alert":"status","data-tone":n.tone,class:"pointer-events-auto flex max-w-[560px] items-center gap-3 rounded-[14px] bg-[#1d2740] py-3 pr-2.5 pl-3.5 text-white shadow-toast"},[g("span",{class:me([n.tone==="danger"?"bg-[#f58a8a] text-[#1d2740]":"bg-accent text-on-accent","flex size-[26px] shrink-0 items-center justify-center rounded-full"]),"aria-hidden":"true"},[n.tone==="danger"?(f(),V(s(bt),{key:0,size:16})):(f(),V(s(Ba),{key:1,size:16}))],2),g("span",KD,_(n.text),1),g("button",{type:"button","aria-label":s(h)("backend::lang.form.close"),class:"flex size-8 items-center justify-center rounded-pager text-[#c3cbda] transition-colors duration-150 ease-out hover:bg-side-hover hover:text-white",onClick:l=>s(Bb)(n.id)},[D(s(qt),{size:16,"aria-hidden":"true"})],8,WD)],8,HD))),128))]),_:1}))}}),YD=[{combo:"mod+s",labelKey:"backend::lang.form.save"},{combo:"mod+enter",labelKey:"backend::lang.form.save_and_close"},{combo:"mod+shift+s",labelKey:"backend::lang.form.create_and_new"},{combo:"escape",labelKey:"backend::lang.shortcuts.leave"},{combo:"/",labelKey:"backend::lang.shortcuts.search"},{combo:"?",labelKey:"backend::lang.shortcuts.help"}],JD=new Set(["mod+s","mod+enter","mod+shift+s"]);function Ap(e){const t=typeof navigator>"u"?"":navigator.platform||"";return/mac|iphone|ipad|ipod/i.test(t)}function ZD(e){if(/^[a-z]$/i.test(e.key))return e.key.toLowerCase();const t=/^Key([A-Z])$/.exec(e.code??"");return t?t[1].toLowerCase():""}function E0(e){if(e.isComposing)return null;if(e.ctrlKey||e.metaKey)return e.altKey?null:e.key==="Enter"?e.shiftKey?null:"mod+enter":ZD(e)==="s"?e.shiftKey?"mod+shift+s":"mod+s":null;if(e.altKey)return null;switch(e.key){case"Escape":return"escape";case"/":return"/";case"?":return"?";default:return null}}function XD(e){if(!e||typeof e.closest!="function")return!1;const t=e;return t.closest('input, textarea, select, [contenteditable]:not([contenteditable="false"])')!==null?!0:t.tagName.includes("-")&&t.closest('form, [role="form"]')!==null}function QD(e){return(typeof e.composedPath=="function"?e.composedPath():[])[0]??e.target}function A0(e,t=Ap()){switch(e){case"mod+s":return t?["⌘","S"]:["Ctrl","S"];case"mod+enter":return t?["⌘","↩"]:["Ctrl","Enter"];case"mod+shift+s":return t?["⇧","⌘","S"]:["Ctrl","Shift","S"];case"escape":return["Esc"];default:return[e]}}function eO(e,t=Ap()){return A0(e,t).join(t?"":"+")}function Ha(e,t,a=Ap()){return h("backend::lang.shortcuts.hint",{label:e,keys:eO(t,a)})}const Ch={"mod+s":"Control+S Meta+S","mod+enter":"Control+Enter Meta+Enter","mod+shift+s":"Control+Shift+S Meta+Shift+S",escape:"Escape","/":"/","?":"?"};function Ju(e){return e.split(/\s+/).filter(t=>t in Ch).map(t=>Ch[t]).join(" ")}function T0(e=document){return Array.from(e.querySelectorAll('[role="dialog"][aria-modal="true"], [role="alertdialog"]')).filter(a=>a.getAttribute("data-state")!=="closed").at(-1)??e}function Tp(e,t){return t.querySelector(`[data-hotkey~="${e}"]`)}function tO(e=document){const t=T0(e);return YD.filter(a=>a.combo==="?"||Tp(a.combo,t)!==null)}const Mp=E(null),Sh=At(Mp);function aO(){Mp.value=tO()}function M0(){Mp.value=null}function D0(e){return e.disabled===!0||e.getAttribute("aria-disabled")==="true"}function Eh(e){const t=E0(e);if(!t||!JD.has(t))return;t==="mod+s"&&e.preventDefault();const a=e.target?.ownerDocument??document,n=Tp(t,T0(a));if(!n||(e.preventDefault(),e.stopPropagation(),e.repeat||D0(n)))return;const l=Ah(a),r=l instanceof HTMLElement&&l!==n&&l!==a.body?l:null;r&&(n.focus({preventScroll:!0}),Ah(a)===r&&r.blur()),n.click();const o=a.activeElement;r?.isConnected&&(o===n||o===a.body||o===null)&&r.focus({preventScroll:!0})}function Ah(e=document){let t=e.activeElement;for(;t?.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t}function Th(e){const t=E0(e);if(t!=="escape"&&t!=="/"&&t!=="?"||e.defaultPrevented||XD(QD(e)))return;const a=e.target?.ownerDocument??document;if(a.querySelector("[data-dismissable-layer]"))return;if(t==="?"){e.preventDefault(),aO();return}const n=Tp(t,a);!n||D0(n)||(e.preventDefault(),n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement?(n.focus(),n.select()):n.click())}let ii=0;function nO(){ii===0&&(window.addEventListener("keydown",Eh,!0),window.addEventListener("keydown",Th)),ii++;let e=!1;return()=>{e||(e=!0,ii--,ii===0&&(window.removeEventListener("keydown",Eh,!0),window.removeEventListener("keydown",Th)))}}const lO={class:"flex items-start gap-3"},rO={class:"flex min-w-0 flex-1 flex-col gap-1"},oO={class:"flex flex-col gap-2.5"},sO=["data-shortcut"],iO={class:"flex shrink-0 items-center gap-1"},uO={class:"text-right text-muted"},dO=ae({__name:"ShortcutHelpDialog",setup(e){function t(a){a||M0()}return(a,n)=>(f(),V(s(al),{open:s(Sh)!==null,"onUpdate:open":t},{default:N(()=>[D(s(zl),null,{default:N(()=>[D(s(ll),{"data-dialog-overlay":"",class:"fixed inset-0 z-40 bg-overlay"}),D(s(nl),{"data-shortcut-help":"","data-dialog-content":"","aria-modal":"true",class:"fixed top-1/2 left-1/2 z-50 flex max-h-[calc(100vh-32px)] w-[calc(100%-32px)] max-w-[440px] -translate-x-1/2 -translate-y-1/2 flex-col gap-4 overflow-y-auto rounded-modal bg-surface p-6 text-text shadow-pop"},{default:N(()=>[g("div",lO,[g("div",rO,[D(s(bn),{class:"text-[20px] font-bold tracking-[-0.01em]"},{default:N(()=>[ye(_(s(h)("backend::lang.shortcuts.title")),1)]),_:1}),D(s(hn),{class:"text-muted"},{default:N(()=>[ye(_(s(h)("backend::lang.shortcuts.description")),1)]),_:1})]),D(s(Pl),{"data-action":"close","aria-label":s(h)("backend::lang.form.close"),class:"flex size-[34px] shrink-0 items-center justify-center rounded-tab bg-subtle text-muted hover:bg-hover hover:text-text"},{default:N(()=>[D(s(qt),{size:16,"aria-hidden":"true"})]),_:1},8,["aria-label"])]),g("dl",oO,[(f(!0),b(ve,null,Ie(s(Sh)??[],l=>(f(),b("div",{key:l.combo,"data-shortcut":l.combo,class:"flex items-center justify-between gap-4"},[g("dt",iO,[(f(!0),b(ve,null,Ie(s(A0)(l.combo),r=>(f(),b("kbd",{key:r,class:"inline-flex min-w-6 items-center justify-center rounded-pager border border-border bg-subtle px-1.5 font-mono text-[13px]"},_(r),1))),128))]),g("dd",uO,_(s(h)(l.labelKey)),1)],8,sO))),128))])]),_:1})]),_:1})]),_:1},8,["open"]))}}),cO={class:"flex min-w-0 flex-1 flex-col"},fO={class:"flex h-header shrink-0 items-center justify-between gap-4 border-b border-border bg-surface pr-6 pl-8"},pO={class:"flex shrink-0 items-center gap-1"},mO=["title","aria-label"],vO={class:"min-w-0 flex-1 px-8 py-7"},hO=ae({__name:"AppShell",setup(e){const t=ga(),{collapsed:a,watchViewport:n}=Ub(),l=n();Dt(l);const r=nO();Dt(()=>{r(),M0()});const o=`${window.location.origin}/`,i=k(()=>Ps(String(t.params.vendor??""),String(t.params.plugin??""))),u=k(()=>i.value?null:t.name==="settings-form"?_d(gs(String(t.params.code??""))):t.name==="plugins"?_d(ub(t.path)):_d(Du(po(t.path)))),c=k(()=>(i.value||u.value)&&!a.value?"calc(var(--spacing-rail) + var(--spacing-panel))":"var(--spacing-rail)");return(d,p)=>(f(),b("div",{class:"flex min-h-screen bg-bg text-text",style:ra({"--shell-offset":c.value})},[D(D4),i.value&&!s(a)?(f(),V(q4,{key:0,entry:i.value},null,8,["entry"])):u.value&&!s(a)?(f(),V(V4,{key:1,section:u.value},null,8,["section"])):G("",!0),g("div",cO,[g("header",fO,[D(H4),g("div",pO,[g("a",{"data-view-site":"",href:o,target:"_blank",rel:"noopener noreferrer",title:s(h)("backend::lang.nav.view_site"),"aria-label":s(h)("backend::lang.nav.view_site"),class:"flex size-input items-center justify-center rounded-inner text-muted transition-colors duration-150 ease-out hover:bg-hover hover:text-text"},[D(s(yb),{class:"size-[18px]","aria-hidden":"true"})],8,mO),D(UD)])]),g("main",vO,[Se(d.$slots,"default")])]),D(GD),D(dO)],4))}}),gO=300*1e3,yO=30*1e3;function bO(e,t){return e!==""&&t!==""&&e!==t}async function _O(){try{const e=await globalThis.fetch(`${mr.base}/build.json`,{cache:"no-store",credentials:"same-origin"});if(!e.ok)return"";const t=await e.json();if(typeof t!="object"||t===null)return"";const a=t.build;return typeof a=="string"?a:""}catch{return""}}const Dp=E(!1);let O0="",P0="";const xO=At(Dp);function kO(e,t=mr.build){bO(t,e)&&e!==P0&&(O0=e,Dp.value=!0)}function wO(){P0=O0,Dp.value=!1}function $O(e={}){const t=e.booted??mr.build;if(t==="")return()=>{};const a=e.check??_O,n=e.interval??gO,l=e.minGap??yO,r=e.win??window,o=e.doc??document,i=e.now??Date.now;let u=!1,c=Number.NEGATIVE_INFINITY;const d=async()=>{if(!(o.visibilityState==="hidden"||u||i()-c{d().catch(()=>{})};o.addEventListener("visibilitychange",p),r.addEventListener("focus",p);const v=r.setInterval(p,n);return()=>{o.removeEventListener("visibilitychange",p),r.removeEventListener("focus",p),r.clearInterval(v)}}const CO={key:0,"data-update-banner":"",role:"status","aria-live":"polite",class:"fixed right-4 bottom-[88px] z-50 flex max-w-[420px] items-center gap-3 rounded-[14px] bg-[#1d2740] py-3 pr-2.5 pl-3.5 text-white shadow-toast"},SO={class:"font-medium"},EO=["aria-label"],AO=ae({__name:"UpdateBanner",setup(e){return(t,a)=>s(xO)?(f(),b("div",CO,[g("span",SO,_(s(h)("backend::lang.version.available")),1),g("button",{type:"button","data-update-reload":"",class:"shrink-0 rounded-pager bg-accent px-3 py-1.5 font-medium text-on-accent transition-opacity duration-150 ease-out hover:opacity-90",onClick:a[0]||(a[0]=n=>s(Vb).reload())},_(s(h)("backend::lang.version.reload")),1),g("button",{type:"button","data-update-close":"","aria-label":s(h)("backend::lang.form.close"),class:"flex size-8 shrink-0 items-center justify-center rounded-pager text-[#c3cbda] transition-colors duration-150 ease-out hover:bg-side-hover hover:text-white",onClick:a[1]||(a[1]=n=>s(wO)())},[D(s(qt),{size:16,"aria-hidden":"true"})],8,EO)])):G("",!0)}}),I0=E(0),TO=At(I0);function MO(){I0.value++}const DO=ae({__name:"App",setup(e){const t=ga(),a=k(()=>t.meta.shell===!0);return Aa(()=>{document.title=o$(t)}),(n,l)=>(f(),b(ve,null,[a.value?(f(),V(hO,{key:0},{default:N(()=>[D(s(Ec),null,{default:N(({Component:r,route:o})=>[(f(),V(Wt(r),{key:`${o.path}#${s(TO)}`}))]),_:1})]),_:1})):(f(),V(s(Ec),{key:1})),D(AO)],64))}}),OO="data-summer-controller",R0="*",Gd=new Map,Qc=new Map;let q0="";function L0(){return`${mr.base}/assets/`}function N0(e){if(!e.startsWith(L0())||e.includes("\\"))return!1;for(const a of e){const n=a.codePointAt(0)??0;if(n<=32||n===127)return!1}return!(e.split(/[?#]/,1)[0]??"").split("/").some(a=>{const n=a.toLowerCase().replaceAll("%2e",".");return n==="."||n===".."})}function B0(e){if(!N0(e))return Promise.reject(new Error(`plugin script outside ${L0()}: ${e}`));const t=Gd.get(e);if(t)return t;const a=new Promise((n,l)=>{const r=document.createElement("script");r.type="module",r.addEventListener("load",()=>n(),{once:!0}),r.addEventListener("error",()=>{Gd.delete(e),r.remove(),l(new Error(`plugin script failed to load: ${e}`))},{once:!0}),r.src=e,document.head.appendChild(r)});return Gd.set(e,a),a}function F0(e,t){for(const a of t){const n=`${e} +${a}`;if(!N0(a)||Qc.has(n))continue;const l=document.createElement("link");l.rel="stylesheet",l.setAttribute(OO,e),l.disabled=!V0(e),l.href=a,Qc.set(n,{owner:e,link:l}),document.head.appendChild(l)}}function PO(e){q0=e;for(const{owner:t,link:a}of Qc.values())a.disabled=!V0(t)}function V0(e){return e===R0||e===q0}function IO(e){F0(R0,e)}async function Op(e,t){F0(e,t?.styles??[]);const a=t?.scripts??[],n=await Promise.allSettled(a.map(l=>B0(l)));return a.filter((l,r)=>n[r]?.status==="rejected")}const z0=new Map;async function j0(){let e=[];try{const{data:t,response:a}=await Le.GET("/field-types");e=a.ok&&t?t.data:[]}catch{return[]}for(const t of e){IO(t.styles??[]);const a=t.scripts??[];z0.set(t.element,Promise.allSettled(a.map(n=>B0(n))).then(n=>a.filter((l,r)=>n[r]?.status==="rejected")))}return e}function RO(e){return z0.get(e)??Promise.resolve([])}const qO={class:"flex min-h-screen items-center justify-center px-4",style:{background:"radial-gradient(ellipse at 50% 35%, #2b3a5c 0%, #1d2740 60%)"}},LO={class:"flex w-full max-w-[400px] flex-col gap-6"},NO={class:"flex items-center justify-center gap-3"},BO={class:"flex size-[34px] items-center justify-center rounded-full bg-accent-soft"},FO={class:"text-[22px] font-bold tracking-[-0.02em]"},VO={key:0,"data-login-hint":"",class:"text-[13px] text-[#566175]"},zO={class:"flex flex-col gap-1.5"},jO={class:"font-semibold"},UO={class:"flex flex-col gap-1.5"},HO={class:"font-semibold"},KO=["aria-invalid"],WO={key:1,role:"alert",class:"flex items-center gap-2.5 rounded-control bg-[#fdf0f0] px-3.5 py-3 text-[#c62828]"},GO=["disabled"],YO=ae({__name:"LoginView",setup(e){const t=ga(),a=wn(),n=E(""),l=E(""),r=E(!1),o=E(!1),i=k(()=>{const c=sf(t.query.redirect);return c!==null&&new URL(c,"http://admin.invalid").pathname==="/connect"});async function u(){if(!o.value){o.value=!0,r.value=!1;try{if(!await DD(n.value.trim(),l.value)||!await w0()){r.value=!0;return}l.value="",await Promise.all([sb(),ib().catch(()=>[]),Lb().catch(()=>!1),j0()]),await a.replace(sf(t.query.redirect)??"/")}finally{o.value=!1}}}return(c,d)=>(f(),b("main",qO,[g("div",LO,[g("div",NO,[g("span",BO,[D(s(Rs),{size:20,class:"text-accent","aria-hidden":"true"})]),d[2]||(d[2]=g("span",{class:"text-[18px] font-bold text-white"},[ye("Summer"),g("span",{class:"text-accent"},"CMS")],-1))]),g("form",{class:"flex flex-col gap-[18px] rounded-card bg-white p-8 text-[#141b2d] shadow-login",novalidate:"",onSubmit:mt(u,["prevent"])},[g("h1",FO,_(s(h)("backend::lang.auth.title")),1),i.value?(f(),b("p",VO,_(s(h)("backend::lang.mcp_connect.login_hint")),1)):G("",!0),g("label",zO,[g("span",jO,_(s(h)("backend::lang.auth.login")),1),Yt(g("input",{"onUpdate:modelValue":d[0]||(d[0]=p=>n.value=p),name:"login",type:"text",autocomplete:"username",required:"",class:"h-input rounded-control border border-[#d2d8e2] bg-white px-3.5"},null,512),[[Ua,n.value]])]),g("label",UO,[g("span",HO,_(s(h)("backend::lang.auth.password")),1),Yt(g("input",{"onUpdate:modelValue":d[1]||(d[1]=p=>l.value=p),name:"password",type:"password",autocomplete:"current-password",required:"","aria-invalid":r.value?"true":void 0,class:me([r.value?"border-[#c62828]":"border-[#d2d8e2]","h-input rounded-control border bg-white px-3.5"])},null,10,KO),[[Ua,l.value]])]),r.value?(f(),b("div",WO,[D(s(bt),{size:18,"aria-hidden":"true"}),g("span",null,_(s(h)("backend::lang.auth.invalid")),1)])):G("",!0),g("button",{type:"submit",disabled:o.value,class:"h-input rounded-control bg-[#22304d] font-semibold text-white disabled:opacity-60"},_(s(h)("backend::lang.auth.submit")),9,GO)],32)])]))}}),Mh=/^\d+$/;function U0(e,t,a){const n=Tu(t),l=Ja(t);if(!n||!l)return"/";const o=((e??"").trim().split(/[?#]/,1)[0]??"").split("/").filter(d=>d!==""),i=[n.vendor,n.plugin,n.controller];if(!i.every((d,p)=>o[p]?.toLowerCase()===d.toLowerCase()))return l;const c=o.slice(i.length);if(c.length===0)return l;if(c.length===1&&c[0]==="create")return`${l}/create`;if(c.length===2&&c[0]==="update"){const d=c[1]===":id"?String(a??""):c[1]??"";return Mh.test(d)?`${l}/${d}`:l}if(c.length===2&&c[0]==="preview"){const d=c[1]===":id"?String(a??""):c[1]??"";return Mh.test(d)?`${l}/${d}/preview`:l}return l}const Dh=/^[0-9]+$/;function JO(e,t){const a=e.replace(/[\s ]/g,"");if(a==="")return{value:null,error:null};let n=a,l=!1;n.startsWith("-")&&(l=!0,n=n.slice(1));const r=n.match(/[.,]/g)??[];if(r.length>1)return{value:null,error:"invalid"};const[o,i=""]=n.split(/[.,]/);if(!Dh.test(o??"")||r.length===1&&!Dh.test(i))return{value:null,error:"invalid"};if(i.replace(/0+$/,"").length>t)return{value:null,error:"too_precise"};const u=i===""?o:`${o}.${i}`;return{value:`${l?"-":""}${u}`,error:null}}function ZO(e){const[t,a]=e.split(".");if(a===void 0||a.length<=2)return e;let n=a.length;for(;n>2&&a.charAt(n-1)==="0";)n-=1;return`${t}.${a.slice(0,n)}`}function XO(e){return new Intl.NumberFormat(e).formatToParts(1.1).find(a=>a.type==="decimal")?.value??"."}function H0(e,t,a,n=4){const l={minimumFractionDigits:2,maximumFractionDigits:Math.max(2,n)},r=t===""?{style:"decimal",...l}:{style:"currency",currency:t,currencyDisplay:"code",...l};let o;try{o=new Intl.NumberFormat(a,r)}catch{return`${new Intl.NumberFormat(a,{style:"decimal",...l}).format(e)} ${t}`.trim()}return o.format(e)}const QO={key:0,"data-switch":"true",class:"inline-flex h-6 items-center gap-1 rounded-pill bg-ok-bg px-2.5 text-[12px] font-semibold text-ok-text"},eP={key:1,"data-switch":"false",class:"inline-flex h-6 items-center rounded-pill border border-border-strong px-2.5 text-[12px] font-semibold text-muted"},tP={key:1,class:"text-muted","data-empty":""},aP={key:2,class:"text-[13px] text-muted tabular-nums"},nP={key:3,"data-money":"",class:"tabular-nums whitespace-nowrap"},Or=ae({__name:"CellValue",props:{column:{},value:{},row:{}},setup(e){const t=e;function a(m){return m==null||m===""}function n(m){return a(m)?"":Array.isArray(m)?m.map(n).filter(y=>y!=="").join(", "):typeof m=="boolean"?h(m?"backend::lang.list.column_switch_true":"backend::lang.list.column_switch_false"):typeof m=="object"?"":String(m)}function l(m){return String(m).padStart(2,"0")}function r(m){if(typeof m!="string"&&typeof m!="number")return"";const y=new Date(m);return Number.isNaN(y.getTime())?String(m):`${y.getFullYear()}-${l(y.getMonth()+1)}-${l(y.getDate())} ${l(y.getHours())}:${l(y.getMinutes())}`}function o(m){if(typeof m!="string")return"";const y=/^\d{4}-\d{2}-\d{2}/.exec(m.trim());return y?y[0]:m.trim()}function i(m){if(typeof m!="string")return"";const y=/(\d{2}):(\d{2})/.exec(m);return y?`${y[1]}:${y[2]}`:m.trim()}function u(m){return typeof m=="string"?m!==""&&m!=="0"&&m.toLowerCase()!=="false":!!m}function c(){if(t.column.currencyFrom){const m=t.row?.[t.column.currencyFrom];return typeof m=="string"?m.trim():""}return t.column.currency??""}function d(m){return typeof m!="string"||m.trim()===""?"":H0(m.trim(),c(),Na.value,4)}const p=k(()=>t.column.type==="switch"?"switch":t.column.type==="money"?"money":t.column.type==="datetime"?"datetime":t.column.type==="date"?"date":t.column.type==="time"?"time":"text"),v=k(()=>{switch(p.value){case"datetime":return r(t.value);case"date":return o(t.value);case"time":return i(t.value);case"money":return d(t.value);default:return n(t.value)}});return(m,y)=>p.value==="switch"&&!a(e.value)?(f(),b(ve,{key:0},[u(e.value)?(f(),b("span",QO,[D(s(fb),{size:14,"aria-hidden":"true"}),ye(_(s(h)("backend::lang.list.column_switch_true")),1)])):(f(),b("span",eP,_(s(h)("backend::lang.list.column_switch_false")),1))],64)):v.value===""?(f(),b("span",tP,"—")):p.value==="datetime"||p.value==="date"||p.value==="time"?(f(),b("span",aP,_(v.value),1)):p.value==="money"?(f(),b("span",nP,_(v.value),1)):(f(),b(ve,{key:4},[ye(_(v.value),1)],64))}}),lP={key:0,class:"flex shrink-0 gap-2"},rP=["data-row-state"],oP=ae({__name:"RowStateBadges",props:{states:{},labels:{}},setup(e){const t=e,a={deleted:"border border-border-strong text-muted",negative:"bg-danger-soft text-danger",disabled:"bg-subtle text-muted",customized:"border border-border-strong text-text",outdated:"bg-sel text-text"},n=["deleted","negative","disabled","customized","outdated"],l=k(()=>n.filter(r=>t.states.includes(r)));return(r,o)=>l.value.length>0?(f(),b("span",lP,[(f(!0),b(ve,null,Ie(l.value,i=>(f(),b("span",{key:i,"data-row-state":i,class:me([a[i],"inline-flex h-6 shrink-0 items-center rounded-pill px-2.5 text-[12px] font-semibold whitespace-nowrap"])},_(e.labels[i]??i),11,rP))),128))])):G("",!0)}}),sP={class:"overflow-x-auto"},iP={class:"sticky top-0 z-10"},uP={class:"h-row-head border-y border-border bg-subtle"},dP={key:0,scope:"col","data-select":"",class:"w-[52px] pl-5"},cP=["aria-checked","aria-label","disabled"],fP=["aria-sort"],pP=["data-sort","onClick"],mP={key:1,class:"w-[56px] pr-5"},vP=["aria-busy"],hP={key:0,class:"pl-5"},gP={key:1,class:"pr-5"},yP={key:1},bP=["colspan"],_P={class:"text-muted"},xP=["aria-selected","data-row-states","onClick"],kP={key:0,"data-select":"",class:"pl-5"},wP=["aria-checked","aria-label","onClick"],$P={key:0,class:"flex items-center gap-3"},CP={"data-avatar":"",class:"flex size-[30px] shrink-0 items-center justify-center rounded-full bg-subtle text-[12px] font-bold text-text","aria-hidden":"true"},SP=["onClick"],EP={key:1,class:"flex items-center gap-2"},AP={key:1,"data-trailing":"",class:"w-[56px] pr-5"},K0=ae({__name:"DataTable",props:{columns:{},rows:{},loading:{type:Boolean,default:!1},rowLink:{type:Function,default:void 0},selectable:{type:Boolean,default:!1},selected:{default:()=>[]},sortable:{type:Boolean,default:!1},sort:{default:null},variant:{default:"list"},openable:{type:Boolean,default:!1},trailing:{type:Boolean,default:!1},rowStates:{default:()=>({})},stateLabels:{default:()=>({})}},emits:["update:selected","sort","open"],setup(e,{emit:t}){const a=e,n=t,l=wn();function r(Y){const U=Y.id;return typeof U=="number"||typeof U=="string"?U:null}function o(Y,U){const H=r(Y);return H===null?`row-${U}`:String(H)}function i(Y){return a.rowLink?a.rowLink(Y):null}function u(Y,U){if(Y.target?.closest("a, button, input, label, select"))return;if(a.openable){const fe=Y.currentTarget?.querySelector("[data-row-open]")??null;n("open",U,fe);return}const re=i(U);re&&l.push(re)}const c=k(()=>a.rows.map(r).filter(Y=>Y!==null)),d=k(()=>new Set(a.selected.map(String))),p=k(()=>{const Y=c.value,U=Y.filter(H=>d.value.has(String(H))).length;return U===0?"false":U===Y.length?"true":"mixed"});function v(Y){const U=r(Y);return U!==null&&d.value.has(String(U))}function m(){n("update:selected",p.value==="true"?[]:[...c.value])}function y(Y){const U=r(Y);U!==null&&(d.value.has(String(U))?n("update:selected",a.selected.filter(H=>String(H)!==String(U))):n("update:selected",[...a.selected,U]))}function x(Y){if(a.sort?.column===Y.key)return a.sort.dir==="desc"?"descending":"ascending"}function C(Y){return a.sortable&&Y.sortable}const w=k(()=>a.variant==="relation"),S=k(()=>w.value?"h-[56px]":"h-row"),L=k(()=>w.value?3:8);function O(Y){return(typeof Y=="string"||typeof Y=="number"?String(Y):"").split(/[\s@._-]+/).filter(Boolean).slice(0,2).map(H=>H.charAt(0).toUpperCase()).join("")}const M=["deleted","negative","disabled","customized","outdated"];function R(Y){const U=r(Y),H=U===null?void 0:a.rowStates[String(U)];return Array.isArray(H)?M.filter(re=>H.includes(re)):[]}function q(Y,U,H=[]){const re=H.includes("deleted")||H.includes("disabled"),fe=K(Y);return U===0?[re?"font-semibold text-muted":"font-semibold",fe].filter(Boolean).join(" "):[re||w.value||Y.relation?"text-muted":"",fe].filter(Boolean).join(" ")}function K(Y){return Y.type==="money"?"text-right":""}function T(Y){return["min-w-0 truncate",Y.includes("deleted")?"line-through":"no-underline",Y.includes("negative")?"text-danger":Y.includes("deleted")||Y.includes("disabled")?"text-muted":"text-text"]}const I=k(()=>a.columns.filter(Y=>!Y.invisible)),W=k(()=>Math.max(I.value.length+(a.selectable?1:0)+(a.trailing?1:0),1));function A(Y,U){n("open",U,Y.currentTarget)}const B=["w-3/5","w-2/5","w-1/2","w-3/4","w-1/3","w-2/3","w-1/2","w-2/5"];return(Y,U)=>(f(),b("div",sP,[g("table",{class:me([w.value?"min-w-[480px]":"min-w-[640px]","w-full border-collapse text-left"])},[g("thead",iP,[g("tr",uP,[e.selectable?(f(),b("th",dP,[g("button",{type:"button",role:"checkbox","aria-checked":p.value,"aria-label":s(h)("backend::lang.list.select_all"),disabled:e.loading||c.value.length===0,class:me([p.value==="false"?"border-border-strong bg-surface":"border-primary bg-primary text-on-primary","flex size-[18px] items-center justify-center rounded-checkbox border disabled:opacity-60"]),onClick:m},[p.value==="mixed"?(f(),V(s(Eb),{key:0,size:14,"aria-hidden":"true"})):p.value==="true"?(f(),V(s(Ba),{key:1,size:14,"aria-hidden":"true"})):G("",!0)],10,cP)])):G("",!0),(f(!0),b(ve,null,Ie(I.value,H=>(f(),b("th",{key:H.key,scope:"col","aria-sort":C(H)?x(H)??"none":void 0,class:me([[x(H)?"text-text":"text-muted",K(H)],"px-3.5 text-[12px] font-semibold first:pl-5 last:pr-5"])},[C(H)?(f(),b("button",{key:0,type:"button","data-sort":H.key,class:"inline-flex items-center gap-1 font-semibold",onClick:re=>n("sort",H.key)},[ye(_(H.label)+" ",1),x(H)==="ascending"?(f(),V(s(pb),{key:0,size:14,"aria-hidden":"true"})):x(H)==="descending"?(f(),V(s(db),{key:1,size:14,"aria-hidden":"true"})):G("",!0)],8,pP)):(f(),b(ve,{key:1},[ye(_(H.label),1)],64))],10,fP))),128)),e.trailing?(f(),b("td",mP)):G("",!0)])]),g("tbody",{"aria-busy":e.loading?"true":void 0},[e.loading?(f(!0),b(ve,{key:0},Ie(L.value,H=>(f(),b("tr",{key:`skeleton-${H}`,"data-skeleton":"",class:me([S.value,"border-b border-border"])},[e.selectable?(f(),b("td",hP,[...U[0]||(U[0]=[g("span",{class:"block size-[18px] rounded-checkbox bg-skel"},null,-1)])])):G("",!0),(f(!0),b(ve,null,Ie(I.value,re=>(f(),b("td",{key:re.key,class:"px-3.5 first:pl-5 last:pr-5"},[g("span",{class:me([B[(H-1)%B.length],"block h-3 rounded-[6px] bg-skel"])},null,2)]))),128)),e.trailing?(f(),b("td",gP)):G("",!0)],2))),128)):e.rows.length===0?(f(),b("tr",yP,[g("td",{colspan:W.value,class:"px-5 py-20 text-center"},[Se(Y.$slots,"empty",{},()=>[g("span",_P,_(s(h)("backend::lang.list.no_records")),1)])],8,bP)])):(f(!0),b(ve,{key:2},Ie(e.rows,(H,re)=>(f(),b("tr",{key:o(H,re),class:me([[S.value,v(H)?"bg-sel":i(H)||e.openable?"hover:bg-hover":"",i(H)||e.openable?"cursor-pointer":""],"border-b border-border transition-colors duration-150 ease-out"]),"aria-selected":e.selectable?v(H)?"true":"false":void 0,"data-row-states":R(H).length>0?R(H).join(" "):void 0,onClick:fe=>u(fe,H)},[e.selectable?(f(),b("td",kP,[g("button",{type:"button",role:"checkbox","aria-checked":v(H)?"true":"false","aria-label":s(h)("backend::lang.list.select_row"),class:me([v(H)?"border-primary bg-primary text-on-primary":"border-border-strong bg-surface","flex size-[18px] items-center justify-center rounded-checkbox border"]),onClick:fe=>y(H)},[v(H)?(f(),V(s(Ba),{key:0,size:14,"aria-hidden":"true"})):G("",!0)],10,wP)])):G("",!0),(f(!0),b(ve,null,Ie(I.value,(fe,Ae)=>(f(),b("td",{key:fe.key,class:me([q(fe,Ae,R(H)),"px-3.5 first:pl-5 last:pr-5"])},[w.value&&Ae===0?(f(),b("span",$P,[g("span",CP,_(O(H[fe.key])),1),e.openable?(f(),b("button",{key:0,type:"button","data-row-open":"",class:"min-w-0 truncate text-left font-semibold text-text",onClick:xe=>A(xe,H)},[D(Or,{column:fe,value:H[fe.key],row:H},null,8,["column","value","row"])],8,SP)):(f(),V(Or,{key:1,column:fe,value:H[fe.key],row:H},null,8,["column","value","row"]))])):Ae===0&&R(H).length>0?(f(),b("span",EP,[i(H)?(f(),V(s(Sa),{key:0,to:i(H),class:me(T(R(H)))},{default:N(()=>[D(Or,{column:fe,value:H[fe.key],row:H},null,8,["column","value","row"])]),_:2},1032,["to","class"])):(f(),b("span",{key:1,class:me(T(R(H)))},[D(Or,{column:fe,value:H[fe.key],row:H},null,8,["column","value","row"])],2)),D(oP,{states:R(H),labels:e.stateLabels},null,8,["states","labels"])])):Ae===0&&i(H)?(f(),V(s(Sa),{key:2,to:i(H),class:"text-text no-underline"},{default:N(()=>[D(Or,{column:fe,value:H[fe.key],row:H},null,8,["column","value","row"])]),_:2},1032,["to"])):(f(),V(Or,{key:3,column:fe,value:H[fe.key],row:H},null,8,["column","value","row"]))],2))),128)),e.trailing?(f(),b("td",AP,[Se(Y.$slots,"trailing",{row:H})])):G("",!0)],10,xP))),128))],8,vP)],2)]))}}),TP=["aria-label"],MP={key:0,class:"flex flex-col gap-1 text-[13px]"},DP={class:"font-semibold text-muted"},OP=["data-filter","value","onChange"],PP=["value"],IP={key:1,class:"flex flex-col gap-1 text-[13px]"},RP={class:"mb-1 font-semibold text-muted"},qP={class:"flex items-center gap-2"},LP=["data-filter","aria-label","value","onChange"],NP=["data-filter","aria-label","value","onChange"],BP={key:2,class:"flex flex-col gap-1 text-[13px]"},FP={class:"font-semibold text-muted"},VP=["data-filter","value","onChange"],zP=["value"],Ro="",ui="h-button rounded-control border border-border-strong bg-surface px-3 text-text",jP=ae({__name:"FilterBar",props:{filters:{},values:{},source:{}},emits:["update"],setup(e,{emit:t}){const a=e,n=t;function l(p){if(p.options&&p.options.length>0)return p.options.map(m=>({value:JSON.stringify(m.value),label:m.label}));const v=[];return p.trueValue!==void 0&&v.push({value:JSON.stringify(p.trueValue),label:h("backend::lang.list.column_switch_true")}),p.falseValue!==void 0&&v.push({value:JSON.stringify(p.falseValue),label:h("backend::lang.list.column_switch_false")}),v}const r=E({});async function o(p){const{data:v}=await Le.GET("/{vendor}/{plugin}/{controller}/filters/{scope}/options",{params:{path:{...a.source,scope:p.name}}});r.value={...r.value,[p.name]:v?.data??[]}}$t(()=>{for(const p of a.filters)p.type==="scope"&&o(p)});const i=Ka({});function u(){for(const p of a.filters){if(p.type!=="daterange")continue;const[v="",m=""]=(a.values[p.name]??"").split(".."),y=i[p.name];(!y||a.values[p.name]!==void 0||y.from!==""&&y.to!=="")&&(i[p.name]={from:v,to:m})}}Ve(()=>a.values,u,{immediate:!0,deep:!0});function c(p,v,m){const y={...i[p.name]??{from:"",to:""},[v]:m};i[p.name]=y,y.from!==""&&y.to!==""?n("update",p.name,`${y.from}..${y.to}`):(y.from===""&&y.to===""||a.values[p.name]!==void 0)&&n("update",p.name,null)}function d(p,v){n("update",p.name,v===Ro?null:v)}return(p,v)=>(f(),b("div",{role:"group","aria-label":s(h)("backend::lang.list.filters"),"data-filter-bar":"",class:"flex flex-wrap items-end gap-4 border-t border-border px-5 py-3.5"},[(f(!0),b(ve,null,Ie(e.filters,m=>(f(),b(ve,{key:m.name},[m.type==="switch"?(f(),b("label",MP,[g("span",DP,_(m.label||m.name),1),g("select",{"data-filter":m.name,value:e.values[m.name]??Ro,class:me(ui),onChange:y=>d(m,y.target.value)},[g("option",{value:Ro},_(s(h)("backend::lang.list.filter_all")),1),(f(!0),b(ve,null,Ie(l(m),y=>(f(),b("option",{key:y.value,value:y.value},_(y.label),9,PP))),128))],40,OP)])):m.type==="daterange"?(f(),b("fieldset",IP,[g("legend",RP,_(m.label||m.name),1),g("div",qP,[g("input",{type:"date","data-filter":`${m.name}-from`,"aria-label":s(h)("backend::lang.list.filter_from"),value:i[m.name]?.from??"",class:me(ui),onChange:y=>c(m,"from",y.target.value)},null,40,LP),v[0]||(v[0]=g("span",{"aria-hidden":"true"},"–",-1)),g("input",{type:"date","data-filter":`${m.name}-to`,"aria-label":s(h)("backend::lang.list.filter_to"),value:i[m.name]?.to??"",class:me(ui),onChange:y=>c(m,"to",y.target.value)},null,40,NP)])])):m.type==="scope"?(f(),b("label",BP,[g("span",FP,_(m.label||m.name),1),(f(),b("select",{key:`${m.name}-${r.value[m.name]?.length??-1}`,"data-filter":m.name,value:e.values[m.name]??Ro,class:me(ui),onChange:y=>d(m,y.target.value)},[g("option",{value:Ro},_(s(h)("backend::lang.list.filter_all")),1),(f(!0),b(ve,null,Ie(r.value[m.name]??[],y=>(f(),b("option",{key:y.value,value:y.value},_(y.label),9,zP))),128))],40,VP))])):G("",!0)],64))),128))],8,TP))}}),UP=["type","disabled","data-hotkey","aria-keyshortcuts"],We=ae({__name:"Button",props:{variant:{default:"outline"},size:{default:"md"},type:{default:"button"},disabled:{type:Boolean,default:!1},icon:{default:void 0},to:{default:void 0},hotkey:{default:void 0}},setup(e){const t=e,a={primary:"bg-primary text-on-primary hover:opacity-90",outline:"border border-border-strong bg-surface text-text hover:bg-hover",ghost:"text-muted hover:bg-hover hover:text-text",danger:"border border-danger bg-surface text-danger hover:bg-danger-soft"},n=k(()=>t.hotkey?Ju(t.hotkey):void 0),l=k(()=>["inline-flex shrink-0 items-center justify-center gap-2 rounded-control px-4 font-semibold whitespace-nowrap no-underline transition-colors duration-150 ease-out disabled:cursor-not-allowed disabled:opacity-60",t.size==="sm"?"h-[38px]":"h-button",a[t.variant]]);return(r,o)=>e.to!==void 0?(f(),V(s(Sa),{key:0,to:e.to,class:me(l.value),"data-hotkey":e.hotkey,"aria-keyshortcuts":n.value},{default:N(()=>[e.icon?(f(),V(Wt(e.icon),{key:0,size:16,"aria-hidden":"true"})):G("",!0),Se(r.$slots,"default")]),_:3},8,["to","class","data-hotkey","aria-keyshortcuts"])):(f(),b("button",{key:1,type:e.type,disabled:e.disabled,class:me(l.value),"data-hotkey":e.hotkey,"aria-keyshortcuts":n.value},[e.icon?(f(),V(Wt(e.icon),{key:0,size:16,"aria-hidden":"true"})):G("",!0),Se(r.$slots,"default")],10,UP))}}),HP=ae({__name:"BulkActionsMenu",props:{actions:{},disabled:{type:Boolean}},emits:["select"],setup(e,{expose:t,emit:a}){const n=a,l=E(null);function r(){const o=l.value?.$el;o instanceof HTMLElement&&o.focus()}return t({focus:r}),(o,i)=>(f(),V(s(d0),{modal:!1},{default:N(()=>[D(s(p0),{"as-child":"",disabled:e.disabled},{default:N(()=>[D(We,{ref_key:"trigger",ref:l,variant:"outline",size:"md","data-action":"bulk-actions",disabled:e.disabled},{default:N(()=>[ye(_(s(h)("backend::lang.list.bulk_actions"))+" ",1),D(s(Gn),{size:16,class:"text-muted","aria-hidden":"true"})]),_:1},8,["disabled"])]),_:1},8,["disabled"]),D(s(f0),null,{default:N(()=>[D(s(c0),{"data-bulk-menu":"",align:"end","side-offset":8,class:"z-50 flex w-[240px] max-w-[320px] flex-col rounded-[14px] border border-border bg-surface p-2 text-text shadow-menu"},{default:N(()=>[(f(!0),b(ve,null,Ie(e.actions,u=>(f(),V(s(Yc),{key:u.name,"data-bulk-action":u.name,class:"flex min-h-10 cursor-pointer items-center rounded-control px-3 py-2 outline-none transition-colors duration-150 ease-out data-[highlighted]:bg-hover",onSelect:c=>n("select",u.name)},{default:N(()=>[ye(_(u.label),1)]),_:2},1032,["data-bulk-action","onSelect"]))),128))]),_:1})]),_:1})]),_:1}))}}),KP={class:"flex flex-wrap items-center justify-between gap-3 px-5 py-4"},WP={key:0,class:"relative block w-[320px] max-w-full"},GP={class:"sr-only"},YP=["value","placeholder"],JP={key:1},ZP={class:"flex flex-wrap items-center justify-end gap-2.5"},XP={key:0,"data-selected-pill":"",class:"inline-flex h-8 items-center gap-1.5 rounded-pill bg-sel px-3 text-[13px] font-semibold"},QP=ae({__name:"ListToolbar",props:{showSearch:{type:Boolean},search:{},searchPrompt:{},buttons:{},selectedCount:{},selectedLabel:{},deleteLabel:{},actions:{default:()=>[]},busyAction:{default:null},bulkActions:{default:()=>[]},bulkBusy:{type:Boolean,default:!1}},emits:["update:search","delete","action","bulk"],setup(e,{expose:t,emit:a}){const n=e,l=a,r=k(()=>new Map(n.actions.map(u=>[u.name,u.label]))),o=E(null);function i(){o.value?.focus()}return t({focusBulk:i}),(u,c)=>(f(),b("div",KP,[e.showSearch?(f(),b("label",WP,[g("span",GP,_(s(h)("backend::lang.list.search")),1),D(s(hr),{size:18,class:"pointer-events-none absolute top-1/2 left-3.5 -translate-y-1/2 text-muted","aria-hidden":"true"}),g("input",{type:"search","data-list-search":"","data-hotkey":"/","aria-keyshortcuts":"/",value:e.search,placeholder:e.searchPrompt,class:"h-button w-full rounded-control border border-transparent bg-subtle pr-3.5 pl-10",onInput:c[0]||(c[0]=d=>l("update:search",d.target.value))},null,40,YP)])):(f(),b("span",JP)),g("div",ZP,[e.selectedCount>0?(f(),b("span",XP,[D(s(Ba),{size:14,"aria-hidden":"true"}),ye(_(e.selectedLabel),1)])):G("",!0),e.bulkActions.length>0?(f(),V(HP,{key:1,ref_key:"bulkMenu",ref:o,actions:e.bulkActions,disabled:e.selectedCount===0||e.bulkBusy,onSelect:c[1]||(c[1]=d=>l("bulk",d))},null,8,["actions","disabled"])):G("",!0),(f(!0),b(ve,null,Ie(e.buttons,d=>(f(),b(ve,{key:d},[d==="delete"?(f(),V(We,{key:0,"data-action":"delete",variant:e.selectedCount>0?"danger":"outline",icon:s(Xa),disabled:e.selectedCount===0,onClick:c[2]||(c[2]=p=>l("delete"))},{default:N(()=>[ye(_(e.deleteLabel),1)]),_:1},8,["variant","icon","disabled"])):r.value.has(d)?(f(),V(We,{key:1,variant:"outline",size:"md","data-action":d,disabled:e.busyAction===d,"aria-busy":e.busyAction===d?"true":void 0,onClick:p=>l("action",d)},{default:N(()=>[ye(_(r.value.get(d)),1)]),_:2},1032,["data-action","disabled","aria-busy","onClick"])):G("",!0)],64))),128))])]))}}),eI={class:"flex flex-wrap items-center gap-x-6 gap-y-3 border-t border-border px-5 py-3.5 text-[13px] text-muted"},tI={"data-range":""},aI={key:0,class:"flex items-center gap-2"},nI=["value"],lI=["value"],rI=["aria-label"],oI=["disabled"],sI={key:0,"aria-hidden":"true",class:"px-1"},iI=["data-page","aria-current","onClick"],uI=["disabled"],Yd="inline-flex h-pager min-w-pager items-center justify-center gap-1 rounded-pager border border-border px-2.5 text-[13px] text-text disabled:cursor-not-allowed disabled:opacity-60 hover:bg-hover",W0=ae({__name:"Pagination",props:{meta:{},loading:{type:Boolean},perPageOptions:{},perPage:{}},emits:["page","perPage"],setup(e,{emit:t}){const a=e,n=t,l=k(()=>a.meta?.total??0),r=k(()=>a.meta?.page??1),o=k(()=>Math.max(a.meta?.last_page??1,1)),i=k(()=>{const d=a.meta;if(!d||d.total===0)return wa("backend::lang.list.results",0);const p=(d.page-1)*d.per_page+1,v=Math.min(d.page*d.per_page,d.total);return h("backend::lang.list.pagination_range",{from:p,to:v,total:d.total})}),u=k(()=>{const d=o.value,p=r.value,v=new Set([1,d,p-1,p,p+1].filter(x=>x>=1&&x<=d));p<=3&&[2,3].forEach(x=>x<=d&&v.add(x)),p>=d-2&&[d-1,d-2].forEach(x=>x>=1&&v.add(x));const m=[...v].sort((x,C)=>x-C),y=[];return m.forEach((x,C)=>{const w=m[C-1];w!==void 0&&x-w>1&&y.push(null),y.push(x)}),y});function c(d){const p=Number(d.target.value);Number.isFinite(p)&&p>0&&n("perPage",p)}return(d,p)=>(f(),b("footer",eI,[g("span",tI,_(e.loading?s(h)("backend::lang.list.loading"):i.value),1),e.perPageOptions.length>1?(f(),b("label",aI,[g("span",null,_(s(h)("backend::lang.list.records_per_page")),1),g("select",{"data-per-page":"",value:String(e.perPage),class:"h-pager rounded-pager border border-border-strong bg-surface px-2 text-text",onChange:c},[(f(!0),b(ve,null,Ie(e.perPageOptions,v=>(f(),b("option",{key:v,value:String(v)},_(v),9,lI))),128))],40,nI)])):G("",!0),!e.loading&&l.value>0?(f(),b("nav",{key:1,"aria-label":s(h)("backend::lang.list.pagination"),class:"ml-auto flex items-center gap-1.5"},[g("button",{type:"button","data-page":"prev",class:me(Yd),disabled:r.value<=1,onClick:p[0]||(p[0]=v=>n("page",r.value-1))},[D(s(Is),{size:14,"aria-hidden":"true"}),ye(_(s(h)("backend::lang.list.prev_page")),1)],8,oI),(f(!0),b(ve,null,Ie(u.value,(v,m)=>(f(),b(ve,{key:v??`gap-${m}`},[v===null?(f(),b("span",sI,"…")):(f(),b("button",{key:1,type:"button","data-page":v,"aria-current":v===r.value?"page":void 0,class:me([Yd,v===r.value?"border-transparent bg-sel font-bold":""]),onClick:y=>v!==r.value&&n("page",v)},_(v),11,iI))],64))),128)),g("button",{type:"button","data-page":"next",class:me(Yd),disabled:r.value>=o.value,onClick:p[1]||(p[1]=v=>n("page",r.value+1))},[ye(_(s(h)("backend::lang.list.next_page")),1),D(s(vr),{size:14,"aria-hidden":"true"})],8,uI)],8,rI)):G("",!0)]))}}),dI={role:"alert","data-extension-failure":"",class:"flex min-h-input items-center rounded-control border-[1.5px] border-dashed border-border-strong bg-subtle px-3.5 py-2.5 text-[13px] text-muted"},cI={class:"flex min-w-0 items-start gap-2.5"},fI={class:"min-w-0 [overflow-wrap:anywhere]"},Zu=ae({__name:"ExtensionFailure",props:{text:{}},setup(e){return(t,a)=>(f(),b("div",dI,[g("span",cI,[D(s(bt),{size:16,class:"mt-0.5 shrink-0 text-danger","aria-hidden":"true"}),g("span",fI,_(e.text),1)])]))}}),pI=new Set(["div","span","p","strong","em","b","i","u","s","small","mark","code","pre","br","hr","ul","ol","li","dl","dt","dd","h2","h3","h4","h5","h6","table","thead","tbody","tfoot","tr","th","td","caption","section","header","footer","figure","figcaption","blockquote","q","abbr","time","data","meter","progress","sup","sub","a","img"]),mI=new Set(["script","style","template","iframe","object","embed","noscript","textarea","title","xmp","svg","math","form","input","button","select","link","meta","base"]),vI=32,hI=2e3,gI=new Set(["class","title","lang","dir","role"]),yI={a:new Set(["href"]),img:new Set(["src","alt","width","height"]),td:new Set(["colspan","rowspan","scope"]),th:new Set(["colspan","rowspan","scope"]),time:new Set(["datetime"]),data:new Set(["value"]),meter:new Set(["value","min","max","low","high","optimum"]),progress:new Set(["value","max"])},bI=/^(aria|data)-[a-z0-9_-]+$/;function _I(e,t){if(e==="")return!1;for(const a of e){const n=a.codePointAt(0)??0;if(n<=32||n===127)return!1}return e.startsWith("#")?t:e.startsWith("/")?e.length===1||e[1]!=="/"&&e[1]!=="\\":!1}function xI(e,t,a){return gI.has(t)||yI[e]?.has(t)===!0||bI.test(t)?e==="a"&&t==="href"||e==="img"&&t==="src"?_I(a,e==="a"):!0:!1}function kI(e,t){const a={};for(const[n,l]of Object.entries(t??{})){const r=n.toLowerCase();typeof l=="string"&&xI(e,r,l)&&(a[r]=l)}return a}function ef(e,t,a){const n=[];for(const l of e??[]){if(a.left<=0)break;if(l.tag===void 0||l.tag===""){typeof l.text=="string"&&l.text!==""&&(a.left-=1,n.push(l.text));continue}const r=l.tag.toLowerCase();if(mI.has(r))continue;if(!pI.has(r)){n.push(...ef(l.children,t,a));continue}if(t+1>vI)continue;a.left-=1;const o=ef(l.children,t+1,a);n.push(qa(r,kI(r,l.attrs),o.length>0?o:void 0))}return n}function wI(e){return ef(e,0,{left:hI})}const $I={key:1,"data-partial-loading":"","aria-busy":"true"},CI=["data-partial","aria-busy"],Pp=ae({__name:"PartialHost",props:{source:{},name:{},recordId:{default:null},variant:{},reloadKey:{default:0},hint:{type:Boolean,default:!1}},setup(e){const t=e,a=E(null),n=E(!1),l=E(!1);let r=0;const o=u=>wI(u.nodes);o.props=["nodes"];async function i(){const u=++r;l.value=!0;let c=null;try{c=(await Le.GET("/{vendor}/{plugin}/{controller}/partials/{name}",{params:{path:{...t.source,name:t.name},query:t.recordId!=null?{id:t.recordId}:void 0}})).data?.data.nodes??null}catch{c=null}u===r&&(l.value=!1,n.value=c===null,a.value=c)}return Ve(()=>t.reloadKey,()=>{i()}),i(),(u,c)=>n.value?(f(),V(Zu,{key:0,"data-partial-failed":"",text:s(h)("backend::lang.extension.partial_failed")},null,8,["text"])):a.value===null?(f(),b("div",$I,[g("div",{"data-partial-skeleton":"",class:me([e.hint?"h-[68px] w-full rounded-inner":e.variant==="header"?"h-[80px] w-full rounded-card":"h-[44px] w-full rounded-control","bg-skel"]),"aria-hidden":"true"},null,2)])):a.value.length>0?(f(),b("div",{key:2,class:"summer-partial","data-partial":e.variant,"aria-busy":l.value?"true":void 0},[D(o,{nodes:a.value},null,8,["nodes"])],8,CI)):G("",!0)}}),SI={key:0,class:"flex flex-col gap-1.5","data-confirm-prompt":""},EI=["for"],AI=["id","maxlength","placeholder","aria-describedby","disabled","value","onKeydown"],TI=["id"],MI={class:"flex gap-2.5"},DI=["disabled","aria-busy"],Sn=ae({__name:"ConfirmDialog",props:{open:{type:Boolean},message:{},title:{default:void 0},confirmLabel:{default:void 0},cancelLabel:{default:void 0},danger:{type:Boolean,default:!1},busy:{type:Boolean,default:!1},prompt:{default:null},value:{default:""}},emits:["update:open","update:value","confirm","cancel"],setup(e,{emit:t}){const a=e,n=t,l=`confirm-${gf()}`,r=E(null),o=k(()=>!!a.prompt&&a.value.trim()==="");function i(d){!d&&a.busy||(n("update:open",d),d||n("cancel"))}function u(){a.busy||o.value||(n("confirm"),n("update:open",!1))}function c(d){n("update:value",d.target.value)}return Ve(()=>a.open&&!!a.prompt,async d=>{d&&(await Ge(),r.value?.focus())}),(d,p)=>(f(),V(s(g5),{open:e.open,"onUpdate:open":i},{default:N(()=>[D(s(v5),null,{default:N(()=>[D(s(p5),{class:"pointer-events-auto fixed inset-0 z-[80] bg-overlay"}),D(s(s5),{"data-confirm-dialog":"",class:"pointer-events-auto fixed top-1/2 left-1/2 z-[90] flex w-[calc(100%-32px)] max-w-[440px] -translate-x-1/2 -translate-y-1/2 flex-col gap-4 rounded-modal bg-surface p-6 text-text shadow-pop"},{default:N(()=>[D(s(b5),{class:"text-[20px] font-bold tracking-[-0.01em]"},{default:N(()=>[ye(_(e.title??s(h)("backend::lang.form.confirm")),1)]),_:1}),D(s(c5),{class:"text-muted [overflow-wrap:anywhere]"},{default:N(()=>[ye(_(e.message),1)]),_:1}),e.prompt?(f(),b("div",SI,[g("label",{for:`${l}-value`,class:"text-[13px] font-semibold"},_(e.prompt.label),9,EI),g("input",{id:`${l}-value`,ref_key:"promptInput",ref:r,type:"text",autocomplete:"off",maxlength:e.prompt.maxLength,placeholder:e.prompt.placeholder,"aria-describedby":e.prompt.comment?`${l}-comment`:void 0,disabled:e.busy,value:e.value,class:"h-control w-full rounded-control border border-border-strong bg-surface px-3 text-text outline-none focus:border-primary disabled:cursor-not-allowed disabled:opacity-60",onInput:c,onKeydown:gn(mt(u,["prevent"]),["enter"])},null,40,AI),e.prompt.comment?(f(),b("p",{key:0,id:`${l}-comment`,class:"text-[13px] text-muted"},_(e.prompt.comment),9,TI)):G("",!0)])):G("",!0),g("div",MI,[D(s(u5),{"data-action":"cancel",disabled:e.busy,class:"inline-flex h-button flex-1 items-center justify-center rounded-control border border-border-strong bg-surface font-semibold hover:bg-hover disabled:cursor-not-allowed disabled:opacity-60"},{default:N(()=>[ye(_(e.cancelLabel??s(h)("backend::lang.form.cancel")),1)]),_:1},8,["disabled"]),g("button",{type:"button","data-action":"confirm",disabled:e.busy||o.value,"aria-busy":e.busy?"true":void 0,class:me([e.danger?"bg-danger text-white":"bg-primary text-on-primary","inline-flex h-button flex-1 items-center justify-center gap-2 rounded-control font-semibold hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-60"]),onClick:mt(u,["prevent"])},[e.busy?(f(),V(s(Vn),{key:0,size:16,class:"animate-spin","aria-hidden":"true"})):G("",!0),ye(" "+_(e.confirmLabel??s(h)("backend::lang.form.confirm")),1)],10,DI)])]),_:1})]),_:1})]),_:1},8,["open"]))}});function ol(){const e=E(null),t=E(!1),a=E("");let n=null,l=null;function r(d){const p=n;n=null,l=null,e.value=null,p?.(d)}function o(d,p){return r(!1),a.value="",e.value=d,l=p??null,new Promise(v=>{n=v})}async function i(){if(t.value||e.value?.prompt&&a.value.trim()==="")return;const d=l;if(d){t.value=!0;try{await d()}finally{t.value=!1}}r(!0)}function u(){t.value||r(!1)}function c(d){a.value=d}return{request:e,busy:t,value:a,ask:o,confirm:i,cancel:u,setValue:c}}const OI={class:"flex flex-col gap-5"},PI={class:"flex flex-wrap items-end justify-between gap-4"},II={class:"flex flex-col"},RI={class:"text-[26px] font-bold tracking-[-0.02em]"},qI={key:0,"data-record-count":"",class:"text-muted"},LI={key:0,class:"flex items-center gap-2.5"},NI={class:"overflow-hidden rounded-card border border-border bg-surface shadow-card"},BI={key:2,"data-list-failed":"",class:"flex flex-wrap items-center justify-between gap-3 border-t border-border px-5 py-4"},FI={role:"alert",class:"text-danger"},VI={key:0,"data-empty-search":"",class:"flex flex-col items-center gap-3"},zI={class:"flex size-14 items-center justify-center rounded-full bg-subtle text-muted"},jI={class:"text-[17px] font-bold"},UI={class:"max-w-[420px] text-muted"},HI={key:1,"data-empty-list":"",class:"text-muted"},KI=300,WI=ae({__name:"ListView",setup(e){const t=ga(),a=wn(),n={vendor:String(t.params.vendor??""),plugin:String(t.params.plugin??""),controller:String(t.params.controller??"")},l=Os(n),r=Ja(l)??"/",o=E(null),i=E([]),u=E(null),c=E(!0),d=E(!1),p=E(!1),v=k(()=>d.value||p.value),m=E([]),y=E(!1),x=E(0),C=ol(),w=k(()=>h0(t.query)),S=E(w.value.search??""),L=k(()=>o.value?.messages),O=k(()=>o.value?.title?o.value.title:Ps(n.vendor,n.plugin)?.sideMenu.find(Te=>Te.controller===l)?.label??l),M=k(()=>u.value?at(L.value?.recordCount,u.value.total):""),R=k(()=>o.value?.toolbarButtons??[]),q=k(()=>R.value.filter(ie=>ie==="create")),K=k(()=>{const ie=o.value?.reorder;if(!ie)return null;const Te=ie.partition?.column,$e=Te?o.value?.filters.find(je=>je.column===Te||je.name===Te):void 0,Be=$e?w.value.filter?.[$e.name]:void 0;return{path:`${r}/reorder`,query:Be!==void 0&&Be!==""?{partition:String(Be)}:{}}}),T=k(()=>o.value?.toolbarActions??[]),I=k(()=>R.value.filter(ie=>ie==="delete"||T.value.some(Te=>Te.name===ie))),W=E(null),A=k(()=>u.value?.row_states??{}),B=k(()=>({deleted:at(L.value?.rowStateDeleted),negative:at(L.value?.rowStateNegative),disabled:at(L.value?.rowStateDisabled),customized:at(L.value?.rowStateCustomized),outdated:at(L.value?.rowStateOutdated)})),Y=k(()=>(o.value?.bulkActions??[]).filter(ie=>ie.name!=="delete")),U=E(!1),H=E(null),re=k(()=>{const ie=o.value?.perPageOptions??[];return ie.length>0?ie:[o.value?.recordsPerPage||20]}),fe=k(()=>w.value.per_page??u.value?.per_page??o.value?.recordsPerPage??20),Ae=k(()=>w.value.sort?{column:w.value.sort,dir:w.value.dir==="desc"?"desc":"asc"}:null);function xe(ie){const Te=o.value?.recordUrl,$e=ie.id;return!Te||typeof $e!="number"&&typeof $e!="string"?null:U0(Te,l,$e)}function _e(ie){si(l,ie),a.replace({path:t.path,query:ru(ie)})}const le=Vr({}),pe=k(()=>Vr(w.value)!==le);let F=0,de=null;function he(){_e({})}async function Z(ie=!1){const Te=++F;c.value=!0,p.value=!1;let $e=null;try{$e=await J()}catch{$e=null}if(Te!==F)return;if(!$e?.data&&ie){si(l,{}),a.replace({path:t.path,query:{}});return}if(!$e?.data&&$e?.response?.status===404&&await ge(Te))return;if(i.value=$e?.data?.data??[],u.value=$e?.data?.meta??null,p.value=!$e?.data,c.value=!1,$e?.response?.status===422){si(l,{});return}const Be=u.value?.last_page??0;Be>=1&&(u.value?.page??0)>Be&&_e({...w.value,page:Be})}async function ge(ie){try{const{data:Te}=await Le.GET("/{vendor}/{plugin}/{controller}/singleton",{params:{path:n}});return ie!==F?!0:Te?(await a.replace(`${r}/${Te.data.id}`),!0):!1}catch{return!1}}function J(){return Le.GET("/{vendor}/{plugin}/{controller}",{params:{path:n,query:w.value}})}async function ee(){const ie=await Le.GET("/{vendor}/{plugin}/{controller}/schema/list",{params:{path:n}});o.value=ie.data?.data??null,d.value=!o.value,o.value&&Op(l,o.value.assets)}ee(),Ve(()=>Vr(w.value),ie=>{if(ie===le){const $e=MD(l),Be=Vr($e);if(Be!==le){de=Be,a.replace({path:t.path,query:ru($e)});return}}const Te=de!==null&&de===ie;de=null,si(l,w.value),m.value=[],S.value=w.value.search??"",Z(Te)},{immediate:!0});let te=null;function $(ie){S.value=ie,te!==null&&clearTimeout(te),te=setTimeout(()=>{te=null;const Te=ie.trim();_e({...w.value,search:Te===""?void 0:Te,page:void 0})},KI)}Dt(()=>{te!==null&&clearTimeout(te)});function P(){S.value="",_e({...w.value,search:void 0,page:void 0})}function z(ie){const Te=Ae.value;Te?.column!==ie?_e({...w.value,sort:ie,dir:"asc",page:void 0}):Te.dir==="asc"?_e({...w.value,sort:ie,dir:"desc",page:void 0}):_e({...w.value,sort:void 0,dir:void 0,page:void 0})}function ce(ie){_e({...w.value,page:ie})}function X(ie){_e({...w.value,per_page:ie,page:void 0})}function oe(ie,Te){const $e={...w.value.filter??{}};Te===null?delete $e[ie]:$e[ie]=Te,_e({...w.value,filter:$e,page:void 0})}async function ke(){const ie=m.value.map(Number).filter($e=>Number.isInteger($e)&&$e>0);if(!(ie.length===0||y.value||!await C.ask({message:at(L.value?.deleteConfirm,ie.length),confirmLabel:h("backend::lang.form.delete"),danger:!0}))){y.value=!0;try{const $e=await Le.POST("/{vendor}/{plugin}/{controller}/bulk-delete",{params:{path:n},body:{ids:ie}});if($e.data){De(at(L.value?.deleted,$e.data.data.deleted)),m.value=[],await Z(),x.value+=1;return}De($e.error?.error.message||h("backend::lang.list.delete_failed"),"danger")}catch{De(h("backend::lang.list.delete_failed"),"danger")}finally{y.value=!1}}}async function Ce(ie){const Te=Y.value.find(se=>se.name===ie),$e=m.value.map(Number).filter(se=>Number.isInteger(se)&&se>0);if(!Te||$e.length===0||U.value)return;const Be=Te.label??ie;let je=0,Ze=null,nt="";const be=await C.ask({message:Te.confirm||wa("backend::lang.list.bulk_confirm",$e.length,{action:Be}),confirmLabel:Be,danger:!1},async()=>{U.value=!0;try{const se=await Le.POST("/{vendor}/{plugin}/{controller}/bulk/{action}",{params:{path:{...n,action:ie}},body:{ids:$e}});je=se.response.status,Ze=se.data?.data??null,nt=se.error?.error.message??""}catch{je=0}finally{U.value=!1}});if(await new Promise(se=>setTimeout(se,0)),H.value?.focusBulk(),!be)return;const Oe=Ze;if(Oe){De(Oe.message||wa("backend::lang.list.bulk_done",Oe.affected)),m.value=[],await Z(),x.value+=1;return}if(je===409){De(h("backend::lang.list.bulk_stale"),"danger"),m.value=[],await Z();return}if(je===403){De(nt||h("backend::lang.list.action_forbidden"),"danger");return}De(nt||h("backend::lang.extension.action_failed"),"danger")}async function Ee(ie){if(W.value===null){W.value=ie;try{const Te=await Le.POST("/{vendor}/{plugin}/{controller}/toolbar/{action}",{params:{path:{...n,action:ie}},body:{}});if(Te.data){Te.data.data.message&&De(Te.data.data.message),await Z(),x.value+=1;return}De(Te.error?.error.message||h("backend::lang.extension.action_failed"),"danger")}catch{De(h("backend::lang.extension.action_failed"),"danger")}finally{W.value=null}}}return(ie,Te)=>(f(),b("section",OI,[g("header",PI,[g("div",II,[g("h1",RI,_(O.value),1),M.value?(f(),b("p",qI,_(M.value),1)):G("",!0)]),q.value.length>0||K.value?(f(),b("div",LI,[K.value?(f(),V(We,{key:0,"data-action":"reorder",variant:"outline",icon:s(cb),to:K.value},{default:N(()=>[ye(_(s(h)("backend::lang.messages.list.reorder")),1)]),_:1},8,["icon","to"])):G("",!0),(f(!0),b(ve,null,Ie(q.value,$e=>(f(),V(We,{key:$e,"data-action":"create",variant:"primary",icon:s(vo),to:`${s(r)}/create`},{default:N(()=>[ye(_(s(at)(L.value?.create)),1)]),_:1},8,["icon","to"]))),128))])):G("",!0)]),o.value?.headerPartial?(f(),V(Pp,{key:0,variant:"header",source:n,name:o.value.headerPartial,"reload-key":x.value},null,8,["name","reload-key"])):G("",!0),g("div",NI,[o.value?(f(),V(QP,{key:0,ref_key:"toolbar",ref:H,"show-search":o.value.showSearch,search:S.value,"search-prompt":s(at)(L.value?.searchPrompt),buttons:I.value,"selected-count":m.value.length,"selected-label":s(at)(L.value?.selected,m.value.length),"delete-label":s(at)(L.value?.deleteSelected,m.value.length),actions:T.value,"busy-action":W.value,"bulk-actions":Y.value,"bulk-busy":U.value,"onUpdate:search":$,onDelete:ke,onAction:Ee,onBulk:Ce},null,8,["show-search","search","search-prompt","buttons","selected-count","selected-label","delete-label","actions","busy-action","bulk-actions","bulk-busy"])):G("",!0),o.value&&o.value.filters.length>0?(f(),V(jP,{key:1,filters:o.value.filters,values:w.value.filter??{},source:n,onUpdate:oe},null,8,["filters","values"])):G("",!0),v.value&&!c.value?(f(),b("div",BI,[g("p",FI,_(s(h)("backend::lang.list.load_failed")),1),p.value&&pe.value?(f(),V(We,{key:0,"data-action":"reset-list",onClick:he},{default:N(()=>[ye(_(s(h)("backend::lang.list.reset_list")),1)]),_:1})):G("",!0)])):(f(),V(K0,{key:3,columns:o.value?.columns??[],rows:i.value,loading:c.value||!o.value,"row-link":xe,selectable:o.value?.showCheckboxes??!1,selected:m.value,sortable:o.value?.showSorting??!1,sort:Ae.value,"row-states":A.value,"state-labels":B.value,"onUpdate:selected":Te[0]||(Te[0]=$e=>m.value=$e),onSort:z},{empty:N(()=>[w.value.search?(f(),b("div",VI,[g("span",zI,[D(s(Mb),{size:24,"aria-hidden":"true"})]),g("p",jI,_(s(at)(L.value?.emptySearch,void 0,{term:w.value.search})),1),g("p",UI,_(s(at)(L.value?.emptySearchHint,void 0,{term:w.value.search})),1),D(We,{"data-action":"clear-search",onClick:P},{default:N(()=>[ye(_(s(h)("backend::lang.list.clear_search")),1)]),_:1})])):(f(),b("p",HI,_(s(at)(L.value?.empty)||o.value?.noRecordsMessage||s(h)("backend::lang.list.no_records")),1))]),_:1},8,["columns","rows","loading","selectable","selected","sortable","sort","row-states","state-labels"])),D(W0,{meta:u.value,loading:c.value||!o.value,"per-page-options":re.value,"per-page":fe.value,onPage:ce,onPerPage:X},null,8,["meta","loading","per-page-options","per-page"])]),D(Sn,{open:s(C).request.value!==null,message:s(C).request.value?.message??"","confirm-label":s(C).request.value?.confirmLabel,danger:s(C).request.value?.danger,busy:s(C).busy.value,onConfirm:s(C).confirm,onCancel:s(C).cancel},null,8,["open","message","confirm-label","danger","busy","onConfirm","onCancel"])]))}}),ql="X-Session-Key",G0="X-Child-Session-Key",GI=32;function Ss(){const e=new Uint8Array(GI);globalThis.crypto.getRandomValues(e);let t="";for(const a of e)t+=String.fromCharCode(a);return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}const YI="X-Upload-Id";async function Sl(e){try{const t=await e();return{data:t.data?t.data.data:null,status:t.response.status,error:t.error?.error??null}}catch{return{data:null,status:0,error:null}}}async function ou(e){try{const t=await e();return t.response.ok&&t.data instanceof Blob?t.data:null}catch{return null}}function Bn(e){return encodeURIComponent(String(e))}function Y0(e){return`${mr.api}/${Bn(e.vendor)}/${Bn(e.plugin)}/${Bn(e.controller)}`}function JI(e){try{return e===""?null:JSON.parse(e)}catch{return null}}function Ip(e){if(!e)return"";for(const t of Object.values(e.details??{})){const a=Array.isArray(t)?t.find(n=>typeof n=="string"&&n!==""):t;if(typeof a=="string"&&a!=="")return a}return e.message??""}function ZI(e,t){const a=t;if((e===200||e===201)&&a?.data)return{ok:!0,item:a.data};const n=Ip(a?.error);return e===413?{ok:!1,reason:"too_large",status:e,message:n}:e===422?{ok:!1,reason:"invalid",status:e,message:n}:e===0?{ok:!1,reason:"network",status:e,message:n}:{ok:!1,reason:"failed",status:e,message:n}}function J0(e,t,a,n,l){let r=null,o=!1;const i=()=>new Promise(c=>{const d=new XMLHttpRequest;r=d,d.open("POST",e),d.setRequestHeader("X-Requested-With",nb),d.setRequestHeader("Accept","application/json");for(const[v,m]of Object.entries(a))d.setRequestHeader(v,m);l&&d.setRequestHeader(YI,l),d.upload.onprogress=v=>{v.lengthComputable&&n?.(v.loaded,v.total)},d.onload=()=>c({status:d.status,body:JI(d.responseText)}),d.onerror=()=>c("network"),d.ontimeout=()=>c("network"),d.onabort=()=>c("aborted");const p=new FormData;p.append("file_data",t,t.name),d.send(p)});return{promise:(async()=>{let c=await i();return typeof c=="object"&&c.status===401&&!o&&(await Sf()&&(c=o?"aborted":await i()),typeof c=="object"&&c.status===401&&G2()),c==="aborted"||o?{ok:!1,reason:"aborted",status:0,message:""}:c==="network"?{ok:!1,reason:"network",status:0,message:""}:ZI(c.status,c.body)})(),abort(){o=!0,r?.abort()}}}function Z0(e,t,a,n){const l={...e,id:t,field:a},r={[ql]:n},o=`${Y0(e)}/${Bn(t)}/files/${Bn(a)}`;return{list:()=>Sl(()=>Le.GET("/{vendor}/{plugin}/{controller}/{id}/files/{field}",{params:{path:l,header:r}})),upload:(i,u,c)=>J0(o,i,{...r},u,c),update:(i,u)=>Sl(()=>Le.PUT("/{vendor}/{plugin}/{controller}/{id}/files/{field}/{file}",{params:{path:{...l,file:i},header:r},body:u})),remove:i=>Sl(()=>Le.DELETE("/{vendor}/{plugin}/{controller}/{id}/files/{field}/{file}",{params:{path:{...l,file:i},header:r}})),reorder:i=>Sl(()=>Le.POST("/{vendor}/{plugin}/{controller}/{id}/files/{field}/reorder",{params:{path:l,header:r},body:{ids:i}})),download:i=>ou(()=>Le.GET("/{vendor}/{plugin}/{controller}/{id}/files/{field}/{file}/download",{params:{path:{...l,file:i},header:r},parseAs:"blob"})),thumb:i=>ou(()=>Le.GET("/{vendor}/{plugin}/{controller}/{id}/files/{field}/{file}/thumb",{params:{path:{...l,file:i},header:r},parseAs:"blob"}))}}function XI(e,t,a,n,l,r,o){const i={...e,id:t,name:a,child:n,field:l},u={[ql]:r,[G0]:o},c=`${Y0(e)}/${Bn(t)}/relations/${Bn(a)}/records/${Bn(n)}/files/${Bn(l)}`;return{list:()=>Sl(()=>Le.GET("/{vendor}/{plugin}/{controller}/{id}/relations/{name}/records/{child}/files/{field}",{params:{path:i,header:u}})),upload:(d,p,v)=>J0(c,d,{...u},p,v),update:(d,p)=>Sl(()=>Le.PUT("/{vendor}/{plugin}/{controller}/{id}/relations/{name}/records/{child}/files/{field}/{file}",{params:{path:{...i,file:d},header:u},body:p})),remove:d=>Sl(()=>Le.DELETE("/{vendor}/{plugin}/{controller}/{id}/relations/{name}/records/{child}/files/{field}/{file}",{params:{path:{...i,file:d},header:u}})),reorder:d=>Sl(()=>Le.POST("/{vendor}/{plugin}/{controller}/{id}/relations/{name}/records/{child}/files/{field}/reorder",{params:{path:i,header:u},body:{ids:d}})),download:d=>ou(()=>Le.GET("/{vendor}/{plugin}/{controller}/{id}/relations/{name}/records/{child}/files/{field}/{file}/download",{params:{path:{...i,file:d},header:u},parseAs:"blob"})),thumb:d=>ou(()=>Le.GET("/{vendor}/{plugin}/{controller}/{id}/relations/{name}/records/{child}/files/{field}/{file}/thumb",{params:{path:{...i,file:d},header:u},parseAs:"blob"}))}}const QI=new Set(["readonly","placeholder","maxlength","minlength","min","max","step","autocomplete","spellcheck","pattern"]);function Hl(e){const t={};for(const[a,n]of Object.entries(e.attributes??{})){const l=a.toLowerCase();!QI.has(l)||n===null||n===!1||(t[l]=n)}return t}function Lt(e){return["w-full rounded-control border bg-surface px-3.5 text-text transition-colors duration-150 ease-out",e?"border-danger":"border-border-strong"].join(" ")}function Xu(e){return typeof e=="string"?e!==""&&e!=="0"&&e.toLowerCase()!=="false":!!e}function X0(e,t){return typeof e=="number"?t?1:0:t}function Q0(e,t,a){const n={};if(t===null||typeof t!="object"||Array.isArray(t))return n;const l=t;for(const r of e.permissionOptions??[]){if(a?.has(r.code))continue;const o=Number(l[r.code]);(o===1||e.mode==="radio"&&o===-1)&&(n[r.code]=o)}return n}const eR=new Set(["mltext","mltextarea","mlmarkdown"]);function tR(e){return e!==void 0&&eR.has(e)}function Ll(e){return e?tR(e.type)||!!e.element&&e.translatable===!0:!1}const Es="summer:ml-locale";function aR(e){typeof window>"u"||e===""||window.dispatchEvent(new CustomEvent(Es,{detail:e}))}function mn(e){const t={};if(e===null||typeof e!="object"||Array.isArray(e))return t;for(const[a,n]of Object.entries(e))typeof n=="string"&&(t[a]=n);return t}const nR={class:"flex min-w-0 flex-col"},lR=["for"],rR={key:0,class:"text-danger","aria-hidden":"true"},oR=["id"],sR=["id","name","checked","aria-invalid","aria-describedby"],iR=ae({__name:"CheckboxField",props:{field:{},modelValue:{},controlId:{},invalid:{type:Boolean},describedBy:{},labels:{},source:{},recordId:{}},emits:["update:modelValue"],setup(e,{emit:t}){const a=e,n=t,l=k(()=>Xu(a.modelValue));function r(o){n("update:modelValue",X0(a.modelValue,o.target.checked))}return(o,i)=>(f(),b("div",{class:me([e.invalid?"border-danger":"border-border","flex items-center justify-between gap-4 rounded-inner border px-4 py-3.5"]),"data-toggle-card":""},[g("div",nR,[g("label",{for:e.controlId,class:"font-semibold"},[ye(_(e.field.label||e.field.name),1),e.field.required?(f(),b("span",rR," *")):G("",!0)],8,lR),e.field.comment?(f(),b("p",{key:0,id:`${e.controlId}-comment`,class:"text-[13px] text-muted"},_(e.field.comment),9,oR)):G("",!0)]),g("input",{id:e.controlId,type:"checkbox",name:e.field.name,checked:l.value,"aria-invalid":e.invalid?"true":void 0,"aria-describedby":e.describedBy||void 0,class:"size-5 shrink-0 rounded-[6px] accent-primary",onChange:r},null,40,sR)],2))}});function uR(e){return e==="date"||e==="time"?e:"datetime"}function pa(e,t=2){return String(e).padStart(t,"0")}const dR=/(Z|[+-]\d{2}:?\d{2})$/i;function cR(e,t,a=!1){if(typeof t!="string"||t.trim()==="")return null;const n=t.trim();try{if(e==="date")return d1(n.slice(0,10));if(e==="time"){const r=/(\d{2}:\d{2}(:\d{2})?)/.exec(n.includes("T")?n.slice(n.indexOf("T")):n);return r?IE(r[1]):null}const l=dR.test(n)?n.replace(" ","T"):`${n.replace(" ","T")}Z`;return a?yn(Rv(l,"UTC")):Rv(l,Qa())}catch{return null}}function Jd(e){return`${pa(e.year,4)}-${pa(e.month)}-${pa(e.day)}`}function Zd(e){return`${pa(e.hour)}:${pa(e.minute)}:${pa(e.second)}`}function Oh(e,t,a=!1){if(!t)return null;if(e==="time")return"hour"in t?Zd(t):null;if(!("year"in t))return null;if(e==="date")return Jd(t);if(a){const r=t instanceof Yn?yn(t):t,o="hour"in r?Zd(r):"00:00:00";return`${Jd(r)}T${o}Z`}const n=t instanceof Yn?t:Wf(t instanceof wt?yn(t):t,Qa()),l=qu(n,"UTC");return`${Jd(l)}T${Zd(l)}Z`}const fR={date:"YYYY-MM-DD",datetime:"YYYY-MM-DD HH:mm",time:"HH:mm"},pR=/\[([^\]]*)\]|YYYY|YY|MMMM|MMM|MM|M|dddd|ddd|DD|D|HH|H|hh|h|mm|ss|A|a/g;function mR(e){return"year"in e?new wt(e.year,e.month,e.day):null}function Xd(e,t,a,n){return new za(e,{...a,timeZone:"UTC"}).formatToParts(t.toDate("UTC")).find(r=>r.type===n)?.value??""}function vR(e,t,a,n){if(!e)return"";const l=a||fR[t],r=mR(e),o="hour"in e?e:null,i=/D/.test(l.replace(/\[[^\]]*\]/g,""));return l.replace(pR,(u,c)=>{if(c!==void 0)return c;switch(u){case"YYYY":return r?pa(r.year,4):"";case"YY":return r?pa(r.year%100):"";case"MMMM":case"MMM":{if(!r)return"";const d=u==="MMMM"?"long":"short";return i?Xd(n,r,{day:"numeric",month:d},"month"):Xd(n,r,{month:d},"month")}case"MM":return r?pa(r.month):"";case"M":return r?String(r.month):"";case"dddd":case"ddd":return r?Xd(n,r,{weekday:u==="dddd"?"long":"short"},"weekday"):"";case"DD":return r?pa(r.day):"";case"D":return r?String(r.day):"";case"HH":return o?pa(o.hour):"";case"H":return o?String(o.hour):"";case"hh":return o?pa(o.hour%12||12):"";case"h":return o?String(o.hour%12||12):"";case"mm":return o?pa(o.minute):"";case"ss":return o?pa(o.second):"";case"A":return o?o.hour<12?"AM":"PM":"";case"a":return o?o.hour<12?"am":"pm":"";default:return u}})}const hR=new wt(2026,10,4);function gR(e,t){if(typeof t=="number"&&Number.isInteger(t)&&t>=0&&t<=6)return t;try{return(7-Ru(hR,e))%7}catch{return 1}}function Ph(e){if(e)try{return d1(e.slice(0,10))}catch{return}}function yR(e,t=Ns(Qa())){const a=Ph(e.minDate),n=Ph(e.maxDate);if(a||n)return{min:a,max:n};const l=e.yearRange??[];return l.length===1&&typeof l[0]=="number"?{min:new wt(t.year-l[0],1,1),max:new wt(t.year+l[0],12,31)}:l.length===2&&typeof l[0]=="number"&&typeof l[1]=="number"?{min:new wt(l[0],1,1),max:new wt(l[1],12,31)}:{}}function tf(e,t,a,n){if(!e||t==="time")return;if(t==="date")return e;const l=new Ol(e.year,e.month,e.day,n?23:0,n?59:0,n?59:0);return a?l:qu(Wf(l,"UTC"),Qa())}function bR(e,t){const a=Ns(Qa());return tf(a,e==="time"?"datetime":e,t,!1)??a}const _R=["id","aria-describedby"],xR={key:0},kR={key:1,class:"text-muted","data-empty":""},wR=["aria-label"],$R={class:"flex size-8 shrink-0 items-center justify-center text-muted","aria-hidden":"true"},CR=["data-mode"],SR=["aria-label"],ER={key:0,"data-datepicker-time":"",class:"mt-3 flex items-center gap-2 border-t border-border pt-3"},qo="flex size-8 shrink-0 items-center justify-center rounded-pager text-muted transition-colors duration-150 ease-out hover:bg-hover hover:text-text",AR=ae({__name:"DatepickerField",props:{field:{},modelValue:{},controlId:{},invalid:{type:Boolean},describedBy:{},labels:{},source:{},recordId:{}},emits:["update:modelValue"],setup(e,{emit:t}){const a=e,n=t,l=k(()=>uR(a.field.mode)),r=k(()=>l.value==="datetime"&&!!a.field.ignoreTimezone),o=k(()=>Na.value||"pl"),i=k(()=>{const le=a.field.attributes?.readonly;return!!a.field.readOnly||le!=null&&le!==!1}),u=k(()=>cR(l.value,a.modelValue,r.value)),c=k(()=>l.value==="time"?null:u.value),d=k(()=>l.value==="time"?u.value:null),p=k(()=>yR(a.field)),v=k(()=>tf(p.value.min,l.value,r.value,!1)),m=k(()=>tf(p.value.max,l.value,r.value,!0)),y=bR(l.value,r.value),x=k(()=>gR(o.value,a.field.firstDay)),C=k(()=>a.field.twelveHour?12:24),w=k(()=>l.value==="date"?"day":"minute"),S=k(()=>vR(u.value,l.value,a.field.displayFormat,o.value)),L=k(()=>!a.field.required&&u.value!==null&&!i.value),O=k(()=>{const le=c.value;return le?!!v.value&&le.compare(v.value)<0||!!m.value&&le.compare(m.value)>0:!1}),M=new Set(["day","month","year","hour","minute","second"]),R=E(null),q=E(!1);function K(){const le=R.value;if(!le){q.value=!1;return}const pe=Array.from(le.querySelectorAll("[data-reka-date-field-segment], [data-reka-time-field-segment]")).filter(de=>M.has(de.dataset.rekaDateFieldSegment??de.dataset.rekaTimeFieldSegment??"")),F=pe.filter(de=>!de.hasAttribute("data-placeholder")).length;q.value=F>0&&F!!a.invalid||O.value||q.value),W=k(()=>Oh(l.value,u.value,r.value));function A(le){const pe=Oh(l.value,le??null,r.value);T(),!(pe===W.value&&(pe!==null||a.modelValue===null))&&n("update:modelValue",pe)}function B(le){if(!le||l.value!=="datetime"){A(le);return}const pe=c.value,F=H.value,de=!pe||pe.year!==le.year||pe.month!==le.month||pe.day!==le.day,he=!("hour"in le)||le.hour!==F.hour||le.minute!==F.minute;de&&he&&(le=re(le,F)),U.value=le,A(le)}function Y(){n("update:modelValue",null),T()}const U=E(null);Ve(c,le=>{U.value=le},{immediate:!0});const H=k(()=>{const le=U.value??c.value;return le&&"hour"in le?new fn(le.hour,le.minute):new fn(0,0)});function re(le,pe){return"hour"in le?le.set({hour:pe.hour,minute:pe.minute,second:0,millisecond:0}):new Ol(le.year,le.month,le.day,pe.hour,pe.minute)}function fe(le){if(!le)return;const pe=le instanceof fn?le:new fn(le.hour,le.minute),F=U.value??c.value??y,de=re(F,pe);U.value=de,A(de)}function Ae(le){return le.charAt(0).toLocaleUpperCase(o.value)+le.slice(1)}const xe=k(()=>[Lt(I.value),"h-input flex min-w-0 items-center gap-1 pl-3.5 pr-1.5","focus-within:border-primary focus-within:shadow-[0_0_0_3px_var(--c-ring)]","has-[[data-invalid]]:border-danger"]);function _e(le){return le==="literal"?"text-muted":le==="timeZoneName"?"ml-2 min-w-0 truncate text-[13px] text-muted":"rounded-[4px] px-0.5 tabular-nums outline-none focus:bg-sel focus:text-text focus-visible:outline-none data-[placeholder]:text-placeholder focus:data-[placeholder]:text-text"}return(le,pe)=>i.value?(f(),b("p",{key:0,id:e.controlId,"data-datepicker-readonly":"","aria-describedby":e.describedBy||void 0,class:"flex min-h-input items-center rounded-control border border-border bg-subtle px-3.5 tabular-nums"},[S.value!==""?(f(),b("span",xR,_(S.value),1)):(f(),b("span",kR,"—"))],8,_R)):l.value==="time"?(f(),b("div",{key:1,ref_key:"container",ref:R,"data-datepicker":"","data-mode":"time",class:me(xe.value),onKeyup:T,onFocusout:T},[D(s(xh),{id:e.controlId,"model-value":d.value,locale:o.value,"hour-cycle":C.value,granularity:"minute",name:e.field.name,required:e.field.required||void 0,"aria-invalid":I.value?"true":void 0,"aria-describedby":e.describedBy||void 0,class:"flex min-w-0 flex-1 items-center","onUpdate:modelValue":A},{default:N(({segments:F})=>[(f(!0),b(ve,null,Ie(F,de=>(f(),V(s(kh),{key:de.part,part:de.part,class:me(_e(de.part))},{default:N(()=>[ye(_(de.value),1)]),_:2},1032,["part","class"]))),128))]),_:1},8,["id","model-value","locale","hour-cycle","name","required","aria-invalid","aria-describedby"]),L.value?(f(),b("button",{key:0,type:"button","data-action":"clear","aria-label":s(h)("backend::lang.datepicker.clear"),class:me(qo),onClick:Y},[D(s(qt),{size:16,"aria-hidden":"true"})],8,wR)):G("",!0),g("span",$R,[D(s(Ui),{size:16})])],34)):(f(),V(s(H6),{key:2,id:e.controlId,"model-value":c.value,"default-placeholder":c.value??s(y),locale:o.value,granularity:w.value,"hour-cycle":C.value,"hide-time-zone":l.value!=="datetime"||r.value,"min-value":v.value,"max-value":m.value,"week-starts-on":x.value,name:e.field.name,required:e.field.required||void 0,"close-on-select":l.value==="date","prevent-deselect":"","onUpdate:modelValue":B},{default:N(()=>[g("div",{ref_key:"container",ref:R,"data-datepicker":"","data-mode":l.value,class:me(xe.value),onKeyup:T,onFocusout:T},[D(s(iM),{"aria-invalid":I.value?"true":void 0,"aria-describedby":e.describedBy||void 0,class:"flex min-w-0 flex-1 items-center overflow-hidden"},{default:N(({segments:F})=>[(f(!0),b(ve,null,Ie(F,de=>(f(),V(s(wM),{key:de.part,part:de.part,class:me(_e(de.part))},{default:N(()=>[ye(_(de.value),1)]),_:2},1032,["part","class"]))),128))]),_:1},8,["aria-invalid","aria-describedby"]),L.value?(f(),b("button",{key:0,type:"button","data-action":"clear","aria-label":s(h)("backend::lang.datepicker.clear"),class:me(qo),onClick:Y},[D(s(qt),{size:16,"aria-hidden":"true"})],8,SR)):G("",!0),D(s(DM),{"data-action":"open-calendar","aria-label":s(h)("backend::lang.datepicker.open_calendar"),class:me(qo)},{default:N(()=>[D(s(vb),{size:16,"aria-hidden":"true"})]),_:1},8,["aria-label"])],42,CR),D(s(oM),{"data-datepicker-calendar":"","side-offset":4,align:"end",class:"z-50 w-[284px] rounded-inner border border-border bg-surface p-4 text-text shadow-menu"},{default:N(()=>[D(s(W6),null,{default:N(({weekDays:F,grid:de})=>[D(s(bM),{class:"flex h-9 items-center justify-between"},{default:N(()=>[D(s(EM),{"aria-label":s(h)("backend::lang.datepicker.prev_month"),class:me(qo)},{default:N(()=>[D(s(Is),{size:16,"aria-hidden":"true"})]),_:1},8,["aria-label"]),D(s(xM),{class:"font-semibold"},{default:N(({headingValue:he})=>[ye(_(Ae(he)),1)]),_:1}),D(s(CM),{"aria-label":s(h)("backend::lang.datepicker.next_month"),class:me(qo)},{default:N(()=>[D(s(vr),{size:16,"aria-hidden":"true"})]),_:1},8,["aria-label"])]),_:1}),(f(!0),b(ve,null,Ie(de,he=>(f(),V(s(dM),{key:he.value.toString(),class:"mt-2 w-full border-collapse select-none"},{default:N(()=>[D(s(mM),null,{default:N(()=>[D(s(gh),{class:"flex"},{default:N(()=>[(f(!0),b(ve,null,Ie(F,Z=>(f(),V(s(gM),{key:Z,class:"flex h-9 w-9 items-center justify-center text-[13px] font-normal text-muted"},{default:N(()=>[ye(_(Z),1)]),_:2},1024))),128))]),_:2},1024)]),_:2},1024),D(s(fM),null,{default:N(()=>[(f(!0),b(ve,null,Ie(he.rows,(Z,ge)=>(f(),V(s(gh),{key:`week-${ge}`,class:"flex"},{default:N(()=>[(f(!0),b(ve,null,Ie(Z,J=>(f(),V(s(Y6),{key:J.toString(),date:J,class:"p-0"},{default:N(()=>[D(s(Z6),{day:J,month:he.value,class:"flex size-9 items-center justify-center rounded-pager tabular-nums text-text transition-colors duration-150 ease-out hover:bg-hover data-[outside-view]:text-placeholder data-[today]:font-semibold data-[today]:shadow-[inset_0_0_0_1px_var(--c-border-strong)] data-[selected]:bg-primary data-[selected]:font-semibold data-[selected]:text-on-primary data-[disabled]:cursor-not-allowed data-[disabled]:text-placeholder data-[disabled]:opacity-40 data-[disabled]:hover:bg-transparent data-[unavailable]:cursor-not-allowed data-[unavailable]:opacity-40"},null,8,["day","month"])]),_:2},1032,["date"]))),128))]),_:2},1024))),128))]),_:2},1024)]),_:2},1024))),128))]),_:1}),l.value==="datetime"?(f(),b("div",ER,[D(s(Ui),{size:16,class:"shrink-0 text-muted","aria-hidden":"true"}),D(s(xh),{"model-value":H.value,locale:o.value,"hour-cycle":C.value,granularity:"minute","hide-time-zone":"",class:"flex min-w-0 items-center","onUpdate:modelValue":fe},{default:N(({segments:F})=>[(f(!0),b(ve,null,Ie(F,de=>(f(),V(s(kh),{key:de.part,part:de.part,class:me(_e(de.part))},{default:N(()=>[ye(_(de.value),1)]),_:2},1032,["part","class"]))),128))]),_:1},8,["model-value","locale","hour-cycle"])])):G("",!0)]),_:1})]),_:1},8,["id","model-value","default-placeholder","locale","granularity","hour-cycle","hide-time-zone","min-value","max-value","week-starts-on","name","required","close-on-select"]))}}),Bs=Symbol("summer.form.values"),Rp=Symbol("summer.form.patch"),Qu=Symbol("summer.form.locale"),e_=Symbol("summer.form.partialReload"),su=Symbol("summer.form.enabledLocales"),t_=Symbol("summer.form.assets");function qp(){const e=E(0);return{activeUploads:e,beginUpload(){e.value++;let t=!1;return()=>{t||(t=!0,e.value>0&&e.value--)}}}}const _o=Symbol("summer.form.session"),a_=Symbol("summer.settings.secrets"),Lp=Symbol("summer.form.permissionLocks"),Np=Symbol("summer.form.triggerNotes"),Ih="summer-action",TR="summer-result",Rh="summer-change",qh="summer-upload",MR="summer-upload-result",n_=5e3,Bp=Symbol("summer.form.feedback"),Fs=Symbol("summer.form.fieldScope"),Fp=Symbol("summer.form.rememberLabel"),l_=Symbol("summer.form.dependentCache"),DR=["data-dependent"],OR={class:"relative"},PR=["id","name","value","disabled","required","aria-required","aria-invalid","aria-busy","aria-describedby"],IR={key:0,value:"state",class:"text-muted"},RR=["value"],qR=["id"],LR={key:1,class:"flex flex-wrap items-center gap-2"},NR=["id"],di="empty",ci="placeholder",BR=ae({__name:"DropdownField",props:{field:{},modelValue:{},controlId:{},invalid:{type:Boolean},describedBy:{},labels:{},source:{},recordId:{}},emits:["update:modelValue"],setup(e,{emit:t}){const a=e,n=t,l=" ".repeat(4),r=ct(Fs,null),o=ct(Bp,null),i=ct(l_,null)??new Map,u=k(()=>a.field.dependsOn??""),c=k(()=>u.value!==""),d=E("waiting"),p=E([]),v=k(()=>{const H=r?.values.value[u.value];return H==null||H===""||typeof H=="object"?null:String(H)}),m=k(()=>r?.fields.value.find(H=>H.name===u.value)),y=k(()=>m.value?.label||u.value),x=k(()=>(m.value?.options??[]).find(re=>w(re.value,v.value))?.label??v.value??""),C=k(()=>c.value?p.value:a.field.options??[]);function w(H,re){return H==null||re===null||re===void 0?H===re||H==null&&re==null:String(H)===String(re)}function S(){return a.modelValue!==null&&a.modelValue!==void 0&&a.modelValue!==""}function L(){S()&&(n("update:modelValue",null),o?.announce(h("backend::lang.form.dependent_cleared",{field:a.field.label||a.field.name})))}function O(H,re){if(!H.applies){p.value=[],d.value="unused",re&&L();return}p.value=H.options.map(fe=>({value:fe.value,label:l.repeat(Math.max(0,fe.depth))+fe.label})),d.value=p.value.length>0?"ready":"empty",re&&S()&&!p.value.some(fe=>w(fe.value,a.modelValue))&&L()}let M=0,R=!1;async function q(H){const re=++M,fe=v.value;if(fe===null){p.value=[],d.value="waiting",H&&L();return}const Ae=r?.path(a.field.name)??a.field.name,xe=`${Ae}\0${fe}`,_e=i.get(xe);if(_e){O(_e,H);return}if(!a.source){R=H,d.value="failed";return}d.value="loading";try{const{data:le}=await Le.GET("/{vendor}/{plugin}/{controller}/fields/{field}/dependent-options",{params:{path:{...a.source,field:Ae},query:{[`values[${u.value}]`]:fe}}});if(re!==M)return;if(!le){R=H,d.value="failed";return}i.set(xe,le.data),O(le.data,H)}catch{re===M&&(R=H,d.value="failed")}}function K(){q(R)}Ve(v,(H,re)=>{c.value&&H!==re&&q(!0)}),$t(()=>{c.value&&q(!1)}),Dt(()=>{M++});const T=k(()=>{const H=C.value.findIndex(re=>w(re.value,a.modelValue));return H>=0?String(H):a.field.emptyOption!==void 0&&!S()?di:ci}),I=k(()=>{switch(d.value){case"waiting":return h("backend::lang.form.dependent_waiting",{field:y.value});case"loading":return h("backend::lang.form.loading_options");case"unused":return h("backend::lang.form.dependent_not_used");case"empty":return h("backend::lang.form.dependent_empty",{type:x.value});case"failed":return h("backend::lang.form.dependent_failed");default:return""}}),W=k(()=>c.value&&d.value!=="ready"),A=k(()=>W.value||T.value===di||T.value===ci),B=k(()=>`${a.controlId}-dependent`),Y=k(()=>[a.describedBy??"",c.value&&(d.value==="empty"||d.value==="failed")?B.value:""].filter(Boolean).join(" "));function U(H){const re=H.target.value;if(re===di){n("update:modelValue",null);return}const fe=C.value[Number(re)];fe&&n("update:modelValue",fe.value)}return(H,re)=>(f(),b("div",{class:"flex flex-col gap-1.5","data-dependent":c.value?d.value:void 0},[g("div",OR,[g("select",{id:e.controlId,name:e.field.name,value:W.value?"state":T.value,disabled:W.value||void 0,required:e.field.required||void 0,"aria-required":e.field.required?"true":void 0,"aria-invalid":e.invalid?"true":void 0,"aria-busy":c.value&&d.value==="loading"?"true":void 0,"aria-describedby":Y.value||void 0,class:me([[s(Lt)(e.invalid),A.value?"text-muted":""],"h-input appearance-none pr-10 disabled:cursor-not-allowed"]),onChange:U},[W.value?(f(),b("option",IR,_(I.value),1)):(f(),b(ve,{key:1},[e.field.emptyOption!==void 0?(f(),b("option",{key:0,value:di,class:"text-muted"},_(e.field.emptyOption),1)):G("",!0),T.value===ci?(f(),b("option",{key:1,value:ci,disabled:""},_(s(h)("backend::lang.form.select_placeholder")),1)):G("",!0),(f(!0),b(ve,null,Ie(C.value,(fe,Ae)=>(f(),b("option",{key:Ae,value:String(Ae),class:"text-text"},_(fe.label),9,RR))),128))],64))],42,PR),D(s(Gn),{size:16,class:"pointer-events-none absolute top-1/2 right-3.5 -translate-y-1/2 text-muted","aria-hidden":"true"})]),c.value&&d.value==="empty"?(f(),b("p",{key:0,id:B.value,"data-dependent-hint":"",class:"text-[13px] text-muted"},_(I.value),9,qR)):c.value&&d.value==="failed"?(f(),b("div",LR,[g("p",{id:B.value,role:"alert",class:"flex items-center gap-1.5 text-[13px] text-danger"},[D(s(bt),{size:14,class:"shrink-0","aria-hidden":"true"}),g("span",null,_(s(h)("backend::lang.form.dependent_failed")),1)],8,NR),D(We,{variant:"ghost",size:"sm",icon:s(ki),"data-action":"dependent-retry",onClick:K},{default:N(()=>[ye(_(s(h)("backend::lang.form.dependent_retry")),1)]),_:1},8,["icon"])])):G("",!0)],8,DR))}}),FR={class:"flex items-start gap-3"},VR={class:"flex min-w-0 flex-1 flex-col gap-1"},zR={key:0,class:"flex items-center gap-4"},jR=["src"],UR={key:1,class:"flex size-16 shrink-0 items-center justify-center rounded-inner bg-subtle","aria-hidden":"true"},HR=["title"],KR={class:"flex flex-col gap-1.5"},WR=["for"],GR=["id","disabled","aria-invalid","aria-describedby"],YR=["id"],JR={class:"flex flex-col gap-1.5"},ZR=["for"],XR=["id","disabled","aria-invalid","aria-describedby"],QR=["id"],eq={class:"flex gap-2.5"},tq=["disabled"],aq=["aria-keyshortcuts","title","disabled"],nq=ae({__name:"FileCaptionModal",props:{open:{type:Boolean},file:{},routes:{},preview:{},idPrefix:{}},emits:["update:open","saved","closed"],setup(e,{emit:t}){const a=e,n=t,l=E(""),r=E(""),o=E({}),i=E(!1),u=ol();function c(C){const w={};for(const[S,L]of Object.entries(C??{})){const O=(Array.isArray(L)?L:[L]).filter(M=>typeof M=="string"&&M!=="");O.length>0&&(w[S]=O)}return w}const d=k(()=>`${a.idPrefix}-caption-title`),p=k(()=>`${a.idPrefix}-caption-description`),v=k(()=>!!a.file&&(l.value!==a.file.title||r.value!==a.file.description));Ve(()=>a.open,C=>{C&&a.file&&(l.value=a.file.title??"",r.value=a.file.description??"",o.value={},i.value=!1)},{immediate:!0});async function m(C){if(C){n("update:open",!0);return}i.value||v.value&&!await u.ask({message:h("backend::lang.form.unsaved_confirm"),confirmLabel:h("backend::lang.form.discard"),danger:!0})||n("update:open",!1)}async function y(){if(!(i.value||!a.file||!a.routes)){i.value=!0;try{const C=await a.routes.update(a.file.id,{title:l.value,description:r.value});if(C.data){o.value={},n("saved",C.data),n("update:open",!1),De(h("backend::lang.fileupload.details_saved"));return}if(C.status===422){o.value=c(C.error?.details),Object.keys(o.value).length===0&&(o.value={title:[Ip(C.error)||h("backend::lang.form.error_generic")]});return}De(C.error?.message||h("backend::lang.form.error_generic"),"danger")}finally{i.value=!1}}}function x(C){C.preventDefault(),n("closed")}return(C,w)=>(f(),b(ve,null,[D(s(al),{open:e.open,"onUpdate:open":m},{default:N(()=>[D(s(zl),null,{default:N(()=>[D(s(ll),{"data-dialog-overlay":"",class:"fixed inset-0 z-40 bg-overlay"}),D(s(nl),{"data-caption-modal":"","data-dialog-content":"","aria-modal":"true",class:"fixed top-1/2 left-1/2 z-50 flex max-h-[calc(100vh-32px)] w-[calc(100%-32px)] max-w-[560px] -translate-x-1/2 -translate-y-1/2 flex-col gap-4 overflow-y-auto rounded-modal bg-surface p-6 text-text shadow-pop",onCloseAutoFocus:x},{default:N(()=>[g("div",FR,[g("div",VR,[D(s(bn),{class:"text-[20px] font-bold tracking-[-0.01em]"},{default:N(()=>[ye(_(s(h)("backend::lang.fileupload.attachment")),1)]),_:1}),D(s(hn),{class:"text-muted"},{default:N(()=>[ye(_(s(h)("backend::lang.fileupload.help")),1)]),_:1})]),D(s(Pl),{"data-action":"close","aria-label":s(h)("backend::lang.form.close"),disabled:i.value,class:"flex size-[34px] shrink-0 items-center justify-center rounded-tab bg-subtle text-muted hover:bg-hover hover:text-text"},{default:N(()=>[D(s(qt),{size:16,"aria-hidden":"true"})]),_:1},8,["aria-label","disabled"])]),e.file?(f(),b("div",zR,[e.preview?(f(),b("img",{key:0,src:e.preview,alt:"",class:"size-16 shrink-0 rounded-inner object-cover"},null,8,jR)):(f(),b("span",UR,[D(s(Ia),{size:16,class:"text-muted"})])),g("span",{class:"min-w-0 truncate text-[13px] text-muted",title:e.file.file_name},_(e.file.file_name),9,HR)])):G("",!0),g("form",{class:"flex flex-col gap-4",novalidate:"",onSubmit:mt(y,["prevent"])},[g("div",KR,[g("label",{for:d.value,class:"font-semibold"},_(s(h)("backend::lang.fileupload.title_label")),9,WR),Yt(g("input",{id:d.value,"onUpdate:modelValue":w[0]||(w[0]=S=>l.value=S),type:"text","data-caption-title":"",disabled:i.value,"aria-invalid":o.value.title?"true":void 0,"aria-describedby":o.value.title?`${d.value}-error`:void 0,class:me([s(Lt)(!!o.value.title),"h-input"])},null,10,GR),[[Ua,l.value]]),o.value.title?(f(),b("p",{key:0,id:`${d.value}-error`,class:"flex items-center gap-1.5 text-[13px] text-danger"},[D(s(bt),{size:14,class:"shrink-0","aria-hidden":"true"}),g("span",null,_(o.value.title.join(" ")),1)],8,YR)):G("",!0)]),g("div",JR,[g("label",{for:p.value,class:"font-semibold"},_(s(h)("backend::lang.fileupload.description_label")),9,ZR),Yt(g("textarea",{id:p.value,"onUpdate:modelValue":w[1]||(w[1]=S=>r.value=S),rows:"3","data-caption-description":"",disabled:i.value,"aria-invalid":o.value.description?"true":void 0,"aria-describedby":o.value.description?`${p.value}-error`:void 0,class:me([s(Lt)(!!o.value.description),"min-h-input resize-y py-2.5"])},null,10,XR),[[Ua,r.value]]),o.value.description?(f(),b("p",{key:0,id:`${p.value}-error`,class:"flex items-center gap-1.5 text-[13px] text-danger"},[D(s(bt),{size:14,class:"shrink-0","aria-hidden":"true"}),g("span",null,_(o.value.description.join(" ")),1)],8,QR)):G("",!0)]),g("div",eq,[g("button",{type:"button","data-action":"cancel",disabled:i.value,class:"inline-flex h-button flex-1 items-center justify-center rounded-control border border-border-strong bg-surface font-semibold hover:bg-hover disabled:cursor-not-allowed disabled:opacity-60",onClick:w[2]||(w[2]=S=>m(!1))},_(s(h)("backend::lang.form.cancel")),9,tq),g("button",{type:"submit","data-action":"save-caption","data-hotkey":"mod+s mod+enter","aria-keyshortcuts":s(Ju)("mod+s mod+enter"),title:s(Ha)(s(h)("backend::lang.fileupload.details_submit"),"mod+s"),disabled:i.value,class:"inline-flex h-button flex-1 items-center justify-center rounded-control bg-primary font-semibold text-on-primary hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-60"},_(i.value?s(h)("backend::lang.form.saving"):s(h)("backend::lang.fileupload.details_submit")),9,aq)])],32)]),_:1})]),_:1})]),_:1},8,["open"]),D(Sn,{open:s(u).request.value!==null,message:s(u).request.value?.message??"","confirm-label":s(u).request.value?.confirmLabel,danger:s(u).request.value?.danger,onConfirm:s(u).confirm,onCancel:s(u).cancel},null,8,["open","message","confirm-label","danger","onConfirm","onCancel"])],64))}}),lq=["id","data-field-name","aria-labelledby","aria-describedby","aria-busy"],rq={key:0,"data-fileupload-loading":"",class:"h-[112px] rounded-control bg-skel","aria-hidden":"true"},oq={key:1,role:"alert","data-fileupload-failed":"",class:"rounded-inner bg-danger-soft px-[18px] py-3.5 text-danger"},sq={key:0,"data-fileupload-empty":"",class:"flex min-h-input items-center rounded-control border border-border bg-subtle px-3.5 text-muted"},iq={key:1,"data-fileupload-grid":"",class:"grid grid-cols-[repeat(auto-fill,minmax(160px,1fr))] gap-4"},uq=["data-file-item","data-state","onDragover","onDrop"],dq={class:"relative flex aspect-square items-center justify-center bg-subtle"},cq=["href","aria-label"],fq=["src","alt","onError"],pq=["aria-label","onClick"],mq=["src","alt"],vq={key:2,"data-preview-unavailable":"",class:"flex flex-col items-center gap-2 text-[13px] text-muted"},hq=["data-handle","aria-label","onKeydown","onDragstart"],gq={key:5,class:"absolute top-2 right-2 flex gap-1"},yq=["data-caption","aria-label","onClick"],bq=["aria-label","onClick"],_q=["aria-label","onClick"],xq={class:"flex flex-col gap-1 p-2"},kq=["title"],wq={class:"flex items-center gap-2 text-[13px] text-muted tabular-nums"},$q={key:0},Cq={key:1},Sq={key:2},Eq={key:3,"data-unsaved-chip":"",class:"inline-flex h-6 items-center rounded-pill bg-sel px-2 text-[13px] font-semibold text-text"},Aq={key:1,"data-file-error":"",class:"text-[13px] text-danger"},Tq={class:"sr-only"},Mq={key:2,"data-fileupload-single":"",class:"flex flex-col gap-2"},Dq=["data-file-item","data-state"],Oq=["src","alt","onError"],Pq={key:3,"data-preview-unavailable":"",class:"flex flex-col items-center gap-2 text-[13px] text-muted"},Iq={class:"flex min-w-0 flex-1 flex-col gap-1"},Rq=["title"],qq={class:"flex items-center gap-2 text-[13px] text-muted tabular-nums"},Lq={key:0},Nq={key:1},Bq={key:2},Fq={key:3,"data-unsaved-chip":"",class:"inline-flex h-6 items-center rounded-pill bg-sel px-2 text-[13px] font-semibold text-text"},Vq={key:1,"data-file-error":"",class:"text-[13px] text-danger"},zq={class:"sr-only"},jq={key:2,class:"mt-1 flex flex-wrap gap-2"},Uq={key:3,"data-fileupload-rows":"",class:"flex flex-col gap-2"},Hq=["data-file-item","data-state","onDragover","onDrop"],Kq={class:"flex items-center gap-3"},Wq=["data-handle","aria-label","onKeydown","onDragstart"],Gq={class:"flex size-8 shrink-0 items-center justify-center overflow-hidden rounded-pager bg-subtle"},Yq=["src","onError"],Jq={class:"flex min-w-0 flex-1 flex-col leading-tight"},Zq=["title"],Xq=["title"],Qq=["title"],eL={class:"flex shrink-0 items-center gap-2 text-[13px] text-muted tabular-nums"},tL={key:0},aL={key:1},nL={key:2},lL={key:3,"data-unsaved-chip":"",class:"inline-flex h-6 items-center rounded-pill bg-sel px-2 text-[13px] font-semibold text-text"},rL={class:"flex shrink-0 items-center gap-1"},oL=["href","aria-label"],sL=["aria-label","onClick"],iL=["data-caption","aria-label","onClick"],uL=["aria-label","onClick"],dL=["aria-label","onClick"],cL={key:1,"data-file-error":"",class:"text-[13px] text-danger"},fL={class:"sr-only"},pL=["aria-describedby"],mL={class:"flex size-10 items-center justify-center rounded-full bg-surface","aria-hidden":"true"},vL={class:"text-text"},hL={key:0,"data-fileupload-limits":"",class:"text-[13px] text-muted tabular-nums"},gL={key:5,"data-fileupload-limits":"",class:"text-[13px] text-muted tabular-nums"},yL={key:6,role:"alert","data-fileupload-too-many":"",class:"flex items-center gap-1.5 text-[13px] text-danger"},bL=["accept","multiple"],_L={class:"sr-only","aria-live":"polite","data-fileupload-live":""},xL=1<<20,kL=400,Qd="inline-flex size-8 items-center justify-center rounded-pager border border-border bg-surface text-muted hover:text-text",wL="inline-flex size-8 items-center justify-center rounded-pager border border-border bg-surface text-muted hover:bg-danger-soft hover:text-danger",Pr="inline-flex size-8 shrink-0 items-center justify-center rounded-pager text-muted hover:bg-hover hover:text-text",$L=ae({__name:"FileuploadField",props:{field:{},modelValue:{},controlId:{},invalid:{type:Boolean},describedBy:{},labels:{},source:{},recordId:{}},setup(e){const t=e,a=ct(_o,null),n=["jpg","jpeg","png","gif","webp"],l=["image/jpeg","image/png","image/gif","image/webp"];let r=1;const o=E([]),i=E("loading"),u=E(!1),c=E(0),d=E(""),p=E(null),v=E(null),m=E(null),y=E(null),x=E(null),C=E(!1),w=E({}),S=E(new Set),L=E(new Set),O=new Set,M=[],R=a?a.routes(t.field.name):null;let q=null,K=null,T=!1,I=null,W=0,A=!1;const B=k(()=>{const Q=t.field.attributes?.readonly;return!!t.field.readOnly||Q!=null&&Q!==!1}),Y=k(()=>t.field.multiple===!0),U=k(()=>t.field.mode==="image"),H=k(()=>Y.value?t.field.maxFiles:1),re=k(()=>(a?.recordId??0)!==0),fe=k(()=>o.value.filter(Q=>Q.state!=="failed")),Ae=k(()=>{if(Y.value)return o.value;const Q=fe.value,Re=Q[Q.length-1];return o.value.filter(ne=>ne.state==="failed"||ne===Re)}),xe=k(()=>Ae.value.filter(Q=>Q.state!=="failed").length),_e=k(()=>B.value||i.value!=="ready"?!1:Y.value?H.value===void 0||H.value===null||fe.value.lengthY.value&&!B.value&&typeof H.value=="number"&&fe.value.length>=H.value),pe=k(()=>t.field.fileTypes?.length?t.field.fileTypes.map(Q=>Q.toLowerCase()):U.value&&!t.field.mimeTypes?.length?n:null),F=k(()=>(t.field.fileTypes?.length?t.field.fileTypes:t.field.mimeTypes??[]).join(", ")),de=k(()=>{const Q=[];for(const Re of t.field.fileTypes??[])Q.push(`.${Re.toLowerCase()}`);for(const Re of t.field.mimeTypes??[])Q.push(Re.includes("/")?Re:`.${Re.toLowerCase()}`);return Q.length===0&&U.value&&Q.push(...l),Q.length>0?Q.join(","):void 0}),he=k(()=>t.field.prompt||h(Y.value?"backend::lang.fileupload.default_prompt_many":"backend::lang.fileupload.default_prompt"));function Z(Q,Re){return new Intl.NumberFormat(Na.value,{minimumFractionDigits:Re,maximumFractionDigits:Re}).format(Q)}function ge(Q){const Re=["B","kB","MB","GB"];let ne=Q,Fe=0;for(;ne>=1e3&&Fe{const Q=t.field.maxFilesize;return typeof Q=="number"?`${new Intl.NumberFormat(Na.value).format(Q)} MB`:""}),ee=k(()=>{const Q=[];return F.value!==""&&Q.push(h("backend::lang.fileupload.limits_types",{types:F.value})),J.value!==""&&Q.push(h("backend::lang.fileupload.limits_size",{size:J.value})),Y.value&&typeof H.value=="number"&&Q.push(h("backend::lang.fileupload.limits_count",{current:fe.value.length,max:H.value})),Q.join(" · ")});function te(Q){const Re=Q.lastIndexOf(".");return Re<0?"":Q.slice(Re+1).toLowerCase()}function $(Q){const Re=t.field.mimeTypes??[];if(Re.length===0||Q.type==="")return!0;const ne=Q.type.toLowerCase(),Fe=te(Q.name);return Re.some(st=>{const Nt=st.toLowerCase();return Nt.includes("/")?Nt.endsWith("/*")?ne.startsWith(Nt.slice(0,-1)):ne===Nt:Nt===Fe})}function P(Q){const Re=pe.value;if(Re&&!Re.includes(te(Q.name)))return h("backend::lang.fileupload.wrong_type",{name:Q.name,types:Re.join(", ")});if(!$(Q))return h("backend::lang.fileupload.wrong_type",{name:Q.name,types:F.value});const ne=t.field.maxFilesize;return typeof ne=="number"&&Q.size>Math.ceil(ne*xL)?h("backend::lang.fileupload.too_large",{name:Q.name,size:J.value}):""}function z(Q){return Ka({uid:r++,name:Q.file_name,size:Q.file_size,state:"done",progress:100,error:"",retryable:!1,file:Q,source:null,handle:null,uploadId:""})}function ce(){return globalThis.crypto?.randomUUID?.()??`u${Date.now().toString(36)}${Math.random().toString(36).slice(2,10)}`}function X(Q,Re){return Ka({uid:r++,name:Q.name,size:Q.size,state:Re===""?"queued":"failed",progress:0,error:Re,retryable:!1,file:null,source:Ti(Q),handle:null,uploadId:ce()})}function oe(Q){return o.value.find(Re=>Re.uid===Q)}async function ke(Q){if(!R){i.value="failed";return}Q&&(i.value="loading");const Re=await R.list();if(A)return;if(!Re.data){Q&&(i.value="failed");return}const ne=o.value.filter(Fe=>Fe.state!=="done");for(const Fe of o.value)Fe.state==="done"&&An(Fe.uid);o.value=[...Re.data.map(z),...ne],i.value="ready"}function Ce(){B.value||p.value?.click()}function Ee(Q){if(Q.length===0||B.value)return;if(c.value=0,!Y.value)for(const st of[...o.value])st.state!=="failed"&&(st.state!=="done"||st.file?.pending)&&Oe(st);let Re=Y.value?typeof H.value=="number"?Math.max(H.value-fe.value.length,0):Number.POSITIVE_INFINITY:1,ne=0;const Fe=[];for(const st of Q.slice(0,Y.value?Q.length:1)){const Nt=P(st);if(Nt===""&&Re<=0){ne++;continue}Nt===""&&Re--,Fe.push(X(st,Nt))}o.value=[...o.value,...Fe],c.value=ne,je()}function ie(Q){const Re=Q.target;Ee(Array.from(Re.files??[])),Re.value=""}function Te(Q){return m.value===null&&Array.from(Q.dataTransfer?.types??[]).includes("Files")}function $e(Q){Te(Q)&&(Q.preventDefault(),u.value=!0)}function Be(Q){Te(Q)&&(Q.preventDefault(),u.value=!1,Ee(Array.from(Q.dataTransfer?.files??[])))}function je(){if(!R||o.value.some(Re=>Re.state==="uploading"))return;const Q=o.value.find(Re=>Re.state==="queued");Q&&Ze(Q)}async function Ze(Q){if(!R||!Q.source)return;Q.state="uploading",Q.progress=0,Q.error="",Q.retryable=!1;const Re=new Set(o.value.filter(Fe=>Fe.file).map(Fe=>Fe.file.id)),ne=a?.beginUpload();try{const Fe=R.upload(Q.source,(en,dl)=>{Q.progress=dl>0?Math.min(100,Math.round(en/dl*100)):0},Q.uploadId||void 0);Q.handle=Ti(Fe);const st=await Fe.promise;Q.handle=null;const Nt=!!oe(Q.uid);if(st.ok)!Nt||A?R.remove(st.item.id):(Q.state="done",Q.progress=100,Q.file=st.item,Q.name=st.item.file_name,Q.size=st.item.file_size,a?.markDirty());else if(st.reason==="aborted"||st.reason==="network"){const en=await nt(Re);if(st.reason==="aborted"){for(const dl of en)R.remove(dl.id);o.value=o.value.filter(dl=>dl.uid!==Q.uid),An(Q.uid)}else Nt&&en[0]&&en.length===1?(Q.state="done",Q.progress=100,Q.file=en[0],Q.name=en[0].file_name,Q.size=en[0].file_size,a?.markDirty()):(Q.state="failed",Q.error=h("backend::lang.fileupload.upload_failed"),Q.retryable=!0)}else if(Nt)switch(Q.state="failed",st.reason){case"too_large":Q.error=J.value?h("backend::lang.fileupload.too_large",{name:Q.name,size:J.value}):st.message||h("backend::lang.fileupload.upload_failed");break;case"invalid":Q.error=st.message||h("backend::lang.fileupload.upload_failed");break;default:Q.error=st.message||h("backend::lang.fileupload.upload_failed"),Q.retryable=st.status>=500}}finally{ne?.(),A||je()}}async function nt(Q){if(!R)return[];const Re=await R.list();return Re.data?Re.data.filter(ne=>ne.pending&&!Q.has(ne.id)):[]}function be(Q){Q.state!=="failed"||!Q.source||(Q.state="queued",Q.error="",Q.retryable=!1,je())}async function Oe(Q){const Re=o.value.findIndex(Fe=>Fe.uid===Q.uid);if(Re<0)return;switch(o.value=o.value.filter(Fe=>Fe.uid!==Q.uid),An(Q.uid),Q.state){case"uploading":Q.handle?.abort(),a?.markDirty(),je();return;case"queued":case"failed":return}if(!R||!Q.file)return;a?.markDirty();const ne=await R.remove(Q.file.id);if(!ne.data&&!A){const Fe=[...o.value];Fe.splice(Math.min(Re,Fe.length),0,Q),o.value=Fe,De(ne.error?.message||h("backend::lang.form.error_generic"),"danger")}}function se(){return o.value.map(Q=>Q.uid)}function Ue(Q){const Re=new Map(o.value.map(st=>[st.uid,st])),ne=Q.map(st=>Re.get(st)).filter(st=>!!st),Fe=o.value.filter(st=>!Q.includes(st.uid));o.value=[...ne,...Fe]}function Je(){q!==null&&clearTimeout(q),q=setTimeout(()=>{q=null,Ke()},kL)}function it(){return o.value.filter(Q=>Q.state==="done"&&Q.file).map(Q=>Q.file.id)}async function Ke(){if(!R)return;const Q=it();if(T){I=Q;return}const Re=K;K=null;const ne=++W;T=!0;try{const Fe=await R.reorder(Q);if(I)return;!Fe.data&&!A&&ne===W&&(Re&&Ue(Re),De(h("backend::lang.fileupload.reorder_failed"),"danger"))}finally{T=!1,I&&(I=null,Ke())}}function He(Q,Re){const ne=o.value.findIndex(Nt=>Nt.uid===Q);if(ne<0||Re<0||Re>=o.value.length||Re===ne)return!1;K===null&&(K=se());const Fe=[...o.value],[st]=Fe.splice(ne,1);return Fe.splice(Re,0,st),o.value=Fe,d.value=h("backend::lang.fileupload.moved",{name:st.name,position:Re+1,total:Fe.length}),Je(),!0}async function Xe(Q,Re){const ne=o.value.findIndex(st=>st.uid===Re.uid);let Fe;switch(Q.key){case"ArrowUp":case"ArrowLeft":Fe=ne-1;break;case"ArrowDown":case"ArrowRight":Fe=ne+1;break;default:return}Q.preventDefault(),He(Re.uid,Fe)&&(await Ge(),v.value?.querySelector(`[data-handle="${Re.uid}"]`)?.focus())}function Pt(Q,Re){m.value=Re.uid,Q.dataTransfer&&(Q.dataTransfer.effectAllowed="move",Q.dataTransfer.setData("text/plain",Re.name))}function oa(Q,Re){m.value!==null&&(Q.preventDefault(),y.value=Re.uid)}function sl(Q,Re){m.value!==null&&(Q.preventDefault(),He(m.value,o.value.findIndex(ne=>ne.uid===Re.uid)),En())}function En(){m.value=null,y.value=null}function Fa(Q){const Re=Q.file?.content_type??Q.source?.type??"";return l.includes(Re.toLowerCase())}function Gt(Q){return!Q.file||!Fa(Q)||S.value.has(Q.uid)?null:!t.field.protected&&!L.value.has(Q.uid)?Q.file.thumb_url||Q.file.url||null:w.value[Q.uid]??null}function il(){return typeof URL.revokeObjectURL=="function"}function An(Q){const Re=w.value[Q];if(Re!==void 0){il()&&URL.revokeObjectURL(Re);const ne={...w.value};delete ne[Q],w.value=ne}if(O.delete(Q),L.value.has(Q)){const ne=new Set(L.value);ne.delete(Q),L.value=ne}}async function ul(Q){if(!R||!Q.file||O.has(Q.uid)||typeof URL.createObjectURL!="function")return;O.add(Q.uid);const Re=await R.thumb(Q.file.id);if(!(A||!oe(Q.uid)||!O.has(Q.uid))){if(!Re){S.value=new Set([...S.value,Q.uid]);return}w.value={...w.value,[Q.uid]:URL.createObjectURL(Re)}}}Ve(()=>o.value.map(Q=>`${Q.uid}:${Q.state}`).join(","),()=>{if(t.field.protected)for(const Q of o.value)Q.state==="done"&&Fa(Q)&&ul(Q)});function Me(Q){if(!t.field.protected&&!L.value.has(Q.uid)&&(L.value=new Set([...L.value,Q.uid]),R&&typeof URL.createObjectURL=="function")){ul(Q);return}S.value=new Set([...S.value,Q.uid])}async function ze(Q,Re){if(!R||!Q.file||typeof URL.createObjectURL!="function")return;const ne=await R.download(Q.file.id);if(!ne){De(h("backend::lang.form.error_generic"),"danger");return}const Fe=URL.createObjectURL(ne);M.push(Fe);const st=document.createElement("a");st.href=Fe,st.rel="noopener",Re?st.download=Q.file.file_name:st.target="_blank",st.click()}function et(Q){return t.field.useCaption&&Q.file?.title?Q.file.title:Q.name}function dt(Q){return re.value&&!!Q.file?.pending}const St=k(()=>x.value===null?void 0:oe(x.value));function It(Q){x.value=Q.uid,C.value=!0}function Kl(Q){const Re=St.value;Re&&(Re.file=Q)}function $o(){const Q=x.value;x.value=null,Q!==null&&v.value?.querySelector(`[data-caption="${Q}"]`)?.focus()}const Co=k(()=>{const Q=t.field.thumbOptions?.mode;return Q==="fit"||Q==="auto"?"object-contain":"object-cover"});return $t(()=>{ke(!0)}),a&&Ve(a.revision,()=>{ke(!1)}),Dt(()=>{A=!0,q!==null&&(clearTimeout(q),q=null);for(const Q of o.value)Q.handle?.abort();if(il()){for(const Q of Object.values(w.value))URL.revokeObjectURL(Q);for(const Q of M)URL.revokeObjectURL(Q)}}),(Q,Re)=>(f(),b("div",{id:e.controlId,ref_key:"root",ref:v,role:"group","data-fileupload":"","data-field-name":e.field.name,"aria-labelledby":e.field.label?`${e.controlId}-label`:void 0,"aria-describedby":e.describedBy||void 0,"aria-busy":i.value==="loading"?"true":void 0,class:"flex min-w-0 flex-col gap-4"},[i.value==="loading"?(f(),b("span",rq)):i.value==="failed"?(f(),b("p",oq,_(s(h)("backend::lang.fileupload.load_failed")),1)):(f(),b(ve,{key:2},[B.value&&Ae.value.length===0?(f(),b("p",sq,_(s(h)("backend::lang.fileupload.empty")),1)):U.value&&Y.value&&Ae.value.length>0?(f(),b("ul",iq,[(f(!0),b(ve,null,Ie(Ae.value,ne=>(f(),b("li",{key:ne.uid,"data-file-item":ne.uid,"data-state":ne.state,class:me([[ne.state==="failed"?"border-danger":"border-border",m.value===ne.uid?"opacity-50":"",y.value===ne.uid&&m.value!==ne.uid?"border-2 border-dashed border-primary bg-sel":""],"relative overflow-hidden rounded-inner border bg-surface"]),onDragover:Fe=>oa(Fe,ne),onDrop:Fe=>sl(Fe,ne)},[g("div",dq,[ne.state==="uploading"?(f(),V(s(Vn),{key:0,size:20,class:"animate-spin text-muted","aria-hidden":"true"})):ne.state==="failed"?(f(),V(s(bt),{key:1,size:16,class:"text-danger","aria-hidden":"true"})):ne.state==="done"?(f(),b(ve,{key:2},[Gt(ne)&&!e.field.protected&&ne.file?.url?(f(),b("a",{key:0,href:ne.file.url,target:"_blank",rel:"noopener",class:"block size-full","aria-label":s(h)("backend::lang.fileupload.open_preview",{name:ne.name})},[g("img",{src:Gt(ne)??void 0,alt:et(ne),class:me([Co.value,"size-full"]),onError:Fe=>Me(ne)},null,42,fq)],8,cq)):Gt(ne)?(f(),b("button",{key:1,type:"button",class:"block size-full","aria-label":s(h)("backend::lang.fileupload.open_preview",{name:ne.name}),onClick:Fe=>ze(ne,!1)},[g("img",{src:Gt(ne)??void 0,alt:et(ne),class:me([Co.value,"size-full"])},null,10,mq)],8,pq)):S.value.has(ne.uid)?(f(),b("span",vq,[D(s(bv),{size:20,"aria-hidden":"true"}),ye(" "+_(s(h)("backend::lang.fileupload.preview_unavailable")),1)])):(f(),V(s(Ia),{key:3,size:20,class:"text-muted","aria-hidden":"true"}))],64)):(f(),V(s(Ia),{key:3,size:20,class:"text-muted","aria-hidden":"true"})),!B.value&&ne.state==="done"?(f(),b("button",{key:4,type:"button",draggable:"true","data-handle":ne.uid,"aria-label":s(h)("backend::lang.fileupload.move",{name:ne.name}),class:me([Qd,"absolute top-2 left-2 cursor-grab"]),onKeydown:Fe=>Xe(Fe,ne),onDragstart:Fe=>Pt(Fe,ne),onDragend:En},[D(s(Hi),{size:16,"aria-hidden":"true"})],40,hq)):G("",!0),B.value?G("",!0):(f(),b("div",gq,[e.field.useCaption&&ne.state==="done"?(f(),b("button",{key:0,type:"button","data-caption":ne.uid,"aria-label":s(h)("backend::lang.fileupload.edit_details",{name:ne.name}),class:me(Qd),onClick:Fe=>It(ne)},[D(s(Wr),{size:16,"aria-hidden":"true"})],8,yq)):G("",!0),ne.state==="failed"&&ne.retryable?(f(),b("button",{key:1,type:"button","data-action":"retry","aria-label":s(h)("backend::lang.fileupload.retry"),class:me(Qd),onClick:Fe=>be(ne)},[D(s(ki),{size:16,"aria-hidden":"true"})],8,bq)):G("",!0),g("button",{type:"button","data-action":"remove-file","aria-label":ne.state==="uploading"||ne.state==="queued"?s(h)("backend::lang.fileupload.cancel_upload",{name:ne.name}):s(h)("backend::lang.form.remove_item",{name:ne.name}),class:me(wL),onClick:Fe=>Oe(ne)},[D(s(qt),{size:16,"aria-hidden":"true"})],8,_q)]))]),g("div",xq,[g("span",{class:"truncate text-[13px]",title:et(ne)},_(et(ne)),9,kq),g("span",wq,[ne.state==="queued"?(f(),b("span",$q,_(s(h)("backend::lang.fileupload.queued")),1)):ne.state==="uploading"?(f(),b("span",Cq,_(s(h)("backend::lang.fileupload.uploading",{percent:ne.progress})),1)):(f(),b("span",Sq,_(ge(ne.size)),1)),dt(ne)?(f(),b("span",Eq,_(s(h)("backend::lang.fileupload.unsaved")),1)):G("",!0)]),ne.state==="uploading"?(f(),V(s(Ud),{key:0,"model-value":ne.progress,max:100,"aria-label":s(h)("backend::lang.fileupload.uploading",{percent:ne.progress}),class:"h-1 w-full overflow-hidden rounded-pill bg-subtle"},{default:N(()=>[D(s(Hd),{class:"h-full bg-primary",style:ra({width:`${ne.progress}%`})},null,8,["style"])]),_:2},1032,["model-value","aria-label"])):G("",!0),ne.state==="failed"?(f(),b("p",Aq,[g("span",Tq,_(s(h)("backend::lang.fileupload.upload_error"))+": ",1),ye(_(ne.error),1)])):G("",!0)])],42,uq))),128))])):U.value&&!Y.value&&Ae.value.length>0?(f(),b("div",Mq,[(f(!0),b(ve,null,Ie(Ae.value,ne=>(f(),b("div",{key:ne.uid,"data-file-item":ne.uid,"data-state":ne.state,class:"flex items-start gap-4"},[g("div",{class:me([ne.state==="failed"?"border-danger":"border-border","flex size-40 shrink-0 items-center justify-center overflow-hidden rounded-inner border bg-subtle"])},[ne.state==="uploading"?(f(),V(s(Vn),{key:0,size:20,class:"animate-spin text-muted","aria-hidden":"true"})):ne.state==="failed"?(f(),V(s(bt),{key:1,size:16,class:"text-danger","aria-hidden":"true"})):Gt(ne)?(f(),b("img",{key:2,src:Gt(ne)??void 0,alt:et(ne),class:me([Co.value,"size-full"]),onError:Fe=>Me(ne)},null,42,Oq)):S.value.has(ne.uid)?(f(),b("span",Pq,[D(s(bv),{size:20,"aria-hidden":"true"}),ye(" "+_(s(h)("backend::lang.fileupload.preview_unavailable")),1)])):(f(),V(s(Ia),{key:4,size:20,class:"text-muted","aria-hidden":"true"}))],2),g("div",Iq,[g("span",{class:"truncate font-semibold",title:et(ne)},_(et(ne)),9,Rq),g("span",qq,[ne.state==="queued"?(f(),b("span",Lq,_(s(h)("backend::lang.fileupload.queued")),1)):ne.state==="uploading"?(f(),b("span",Nq,_(s(h)("backend::lang.fileupload.uploading",{percent:ne.progress})),1)):(f(),b("span",Bq,_(ge(ne.size)),1)),dt(ne)?(f(),b("span",Fq,_(s(h)("backend::lang.fileupload.unsaved")),1)):G("",!0)]),ne.state==="uploading"?(f(),V(s(Ud),{key:0,"model-value":ne.progress,max:100,"aria-label":s(h)("backend::lang.fileupload.uploading",{percent:ne.progress}),class:"h-1 w-full overflow-hidden rounded-pill bg-subtle"},{default:N(()=>[D(s(Hd),{class:"h-full bg-primary",style:ra({width:`${ne.progress}%`})},null,8,["style"])]),_:2},1032,["model-value","aria-label"])):G("",!0),ne.state==="failed"?(f(),b("p",Vq,[g("span",zq,_(s(h)("backend::lang.fileupload.upload_error"))+": ",1),ye(_(ne.error),1)])):G("",!0),B.value?G("",!0):(f(),b("div",jq,[ne.state!=="failed"?(f(),V(We,{key:0,size:"sm",variant:"outline","data-action":"replace-file",icon:s(ns),onClick:Ce},{default:N(()=>[ye(_(s(h)("backend::lang.fileupload.replace_file")),1)]),_:1},8,["icon"])):G("",!0),ne.state==="failed"&&ne.retryable?(f(),V(We,{key:1,size:"sm",variant:"outline","data-action":"retry",icon:s(ki),onClick:Fe=>be(ne)},{default:N(()=>[ye(_(s(h)("backend::lang.fileupload.retry")),1)]),_:1},8,["icon","onClick"])):G("",!0),e.field.useCaption&&ne.state==="done"?(f(),V(We,{key:2,size:"sm",variant:"outline","data-caption":ne.uid,icon:s(Wr),onClick:Fe=>It(ne)},{default:N(()=>[ye(_(s(h)("backend::lang.fileupload.details_submit")),1)]),_:1},8,["data-caption","icon","onClick"])):G("",!0),D(We,{size:"sm",variant:"danger","data-action":"remove-file",icon:s(qt),onClick:Fe=>Oe(ne)},{default:N(()=>[ye(_(s(h)("backend::lang.fileupload.remove_file")),1)]),_:1},8,["icon","onClick"])]))])],8,Dq))),128))])):Ae.value.length>0?(f(),b("ul",Uq,[(f(!0),b(ve,null,Ie(Ae.value,ne=>(f(),b("li",{key:ne.uid,"data-file-item":ne.uid,"data-state":ne.state,class:me([[ne.state==="failed"?"border-danger":"border-border",m.value===ne.uid?"opacity-50":"",y.value===ne.uid&&m.value!==ne.uid?"border-2 border-dashed border-primary bg-sel":""],"flex min-h-14 flex-col justify-center gap-1 rounded-inner border bg-surface px-3 py-2"]),onDragover:Fe=>oa(Fe,ne),onDrop:Fe=>sl(Fe,ne)},[g("div",Kq,[Y.value&&!B.value&&ne.state==="done"?(f(),b("button",{key:0,type:"button",draggable:"true","data-handle":ne.uid,"aria-label":s(h)("backend::lang.fileupload.move",{name:ne.name}),class:me([Pr,"cursor-grab"]),onKeydown:Fe=>Xe(Fe,ne),onDragstart:Fe=>Pt(Fe,ne),onDragend:En},[D(s(Hi),{size:16,"aria-hidden":"true"})],40,Wq)):G("",!0),g("span",Gq,[ne.state==="uploading"?(f(),V(s(Vn),{key:0,size:16,class:"animate-spin text-muted","aria-hidden":"true"})):ne.state==="failed"?(f(),V(s(bt),{key:1,size:16,class:"text-danger","aria-hidden":"true"})):Gt(ne)?(f(),b("img",{key:2,src:Gt(ne)??void 0,alt:"",class:"size-8 object-cover",onError:Fe=>Me(ne)},null,40,Yq)):(f(),V(s(Ia),{key:3,size:16,class:"text-muted","aria-hidden":"true"}))]),g("span",Jq,[e.field.useCaption&&ne.file?.title?(f(),b(ve,{key:0},[g("span",{class:"truncate font-semibold",title:ne.file.title},_(ne.file.title),9,Zq),g("span",{class:"truncate text-[13px] text-muted",title:ne.name},_(ne.name),9,Xq)],64)):(f(),b("span",{key:1,class:"truncate",title:ne.name},_(ne.name),9,Qq))]),g("span",eL,[ne.state==="queued"?(f(),b("span",tL,_(s(h)("backend::lang.fileupload.queued")),1)):ne.state==="uploading"?(f(),b("span",aL,_(s(h)("backend::lang.fileupload.uploading",{percent:ne.progress})),1)):(f(),b("span",nL,_(ge(ne.size)),1)),dt(ne)?(f(),b("span",lL,_(s(h)("backend::lang.fileupload.unsaved")),1)):G("",!0)]),!Y.value&&!B.value&&ne.state!=="failed"?(f(),V(We,{key:1,size:"sm",variant:"outline","data-action":"replace-file",icon:s(ns),onClick:Ce},{default:N(()=>[ye(_(s(h)("backend::lang.fileupload.replace_file")),1)]),_:1},8,["icon"])):G("",!0),g("span",rL,[ne.state==="done"&&ne.file?(f(),b(ve,{key:0},[!e.field.protected&&ne.file.url?(f(),b("a",{key:0,href:ne.file.url,download:"",target:"_blank",rel:"noopener","aria-label":s(h)("backend::lang.fileupload.download",{name:ne.name}),class:me(Pr)},[D(s(Tc),{size:16,"aria-hidden":"true"})],8,oL)):e.field.protected?(f(),b("button",{key:1,type:"button","data-action":"download","aria-label":s(h)("backend::lang.fileupload.download",{name:ne.name}),class:me(Pr),onClick:Fe=>ze(ne,!0)},[D(s(Tc),{size:16,"aria-hidden":"true"})],8,sL)):G("",!0),e.field.useCaption&&!B.value?(f(),b("button",{key:2,type:"button","data-caption":ne.uid,"aria-label":s(h)("backend::lang.fileupload.edit_details",{name:ne.name}),class:me(Pr),onClick:Fe=>It(ne)},[D(s(Wr),{size:16,"aria-hidden":"true"})],8,iL)):G("",!0)],64)):G("",!0),ne.state==="failed"&&ne.retryable?(f(),b("button",{key:1,type:"button","data-action":"retry","aria-label":s(h)("backend::lang.fileupload.retry"),class:me(Pr),onClick:Fe=>be(ne)},[D(s(ki),{size:16,"aria-hidden":"true"})],8,uL)):G("",!0),B.value?G("",!0):(f(),b("button",{key:2,type:"button","data-action":"remove-file","aria-label":ne.state==="uploading"||ne.state==="queued"?s(h)("backend::lang.fileupload.cancel_upload",{name:ne.name}):s(h)("backend::lang.form.remove_item",{name:ne.name}),class:me([Pr,"hover:bg-danger-soft hover:text-danger"]),onClick:Fe=>Oe(ne)},[D(s(qt),{size:16,"aria-hidden":"true"})],8,dL))])]),ne.state==="uploading"?(f(),V(s(Ud),{key:0,"model-value":ne.progress,max:100,"aria-label":s(h)("backend::lang.fileupload.uploading",{percent:ne.progress}),class:"h-1 w-full overflow-hidden rounded-pill bg-subtle"},{default:N(()=>[D(s(Hd),{class:"h-full bg-primary",style:ra({width:`${ne.progress}%`})},null,8,["style"])]),_:2},1032,["model-value","aria-label"])):G("",!0),ne.state==="failed"?(f(),b("p",cL,[g("span",fL,_(s(h)("backend::lang.fileupload.upload_error"))+": ",1),ye(_(ne.error),1)])):G("",!0)],42,Hq))),128))])):G("",!0),_e.value?(f(),b("button",{key:4,type:"button","data-fileupload-dropzone":"","aria-describedby":e.describedBy||void 0,class:me([[u.value?"border-solid border-primary bg-sel":e.invalid?"border-dashed border-danger bg-subtle":"border-dashed border-border-strong bg-subtle"],"flex min-h-[112px] w-full flex-col items-center justify-center gap-2 rounded-control border-[1.5px] px-4 py-6 text-center transition-colors duration-150 ease-out hover:bg-hover"]),onClick:Ce,onDragover:$e,onDragleave:Re[0]||(Re[0]=ne=>u.value=!1),onDrop:Be},[g("span",mL,[D(s(ns),{size:20,class:"text-muted"})]),g("span",vL,_(he.value),1),ee.value!==""?(f(),b("span",hL,_(ee.value),1)):G("",!0)],42,pL)):le.value&&ee.value!==""?(f(),b("p",gL,_(ee.value),1)):G("",!0),c.value>0?(f(),b("p",yL,[D(s(bt),{size:14,class:"shrink-0","aria-hidden":"true"}),g("span",null,_(s(wa)("backend::lang.fileupload.too_many",c.value,{max:H.value??0})),1)])):G("",!0)],64)),g("input",{ref_key:"input",ref:p,type:"file",hidden:"",tabindex:"-1","data-fileupload-input":"",accept:de.value,multiple:Y.value||void 0,onChange:ie},null,40,bL),g("p",_L,_(d.value),1),e.field.useCaption?(f(),V(nq,{key:3,open:C.value,"onUpdate:open":Re[1]||(Re[1]=ne=>C.value=ne),file:St.value?.file??null,routes:s(R),preview:St.value?Gt(St.value):null,"id-prefix":e.controlId,onSaved:Kl,onClosed:$o},null,8,["open","file","routes","preview","id-prefix"])):G("",!0)],8,lq))}}),CL=["id","name","value","required","aria-required","aria-invalid","aria-describedby"],SL=ae({__name:"NumberField",props:{field:{},modelValue:{},controlId:{},invalid:{type:Boolean},describedBy:{},labels:{},source:{},recordId:{}},emits:["update:modelValue"],setup(e,{emit:t}){const a=e,n=t,l=k(()=>a.modelValue===null||a.modelValue===void 0?"":String(a.modelValue)),r=k(()=>Hl(a.field));function o(i){const u=i.target.value.trim();if(u===""){n("update:modelValue",null);return}const c=Number(u);n("update:modelValue",Number.isFinite(c)?c:null)}return(i,u)=>(f(),b("input",Ye({id:e.controlId},r.value,{name:e.field.name,type:"number",inputmode:"decimal",value:l.value,required:e.field.required||void 0,"aria-required":e.field.required?"true":void 0,"aria-invalid":e.invalid?"true":void 0,"aria-describedby":e.describedBy||void 0,class:[s(Lt)(e.invalid),"h-input tabular-nums"],onInput:o}),null,16,CL))}}),EL=["id","aria-labelledby","aria-describedby"],AL=ae({__name:"PartialField",props:{field:{},modelValue:{},controlId:{},invalid:{type:Boolean},describedBy:{},labels:{},source:{},recordId:{}},setup(e){const t=e,a=ct(e_,E(0));return(n,l)=>(f(),b("div",{id:e.controlId,role:"group","data-partial-field":"","aria-labelledby":t.field.label?`${e.controlId}-label`:void 0,"aria-describedby":e.describedBy||void 0},[e.source?(f(),V(Pp,{key:0,variant:"field",source:e.source,name:t.field.path||t.field.name,"record-id":e.recordId??null,"reload-key":s(a)},null,8,["source","name","record-id","reload-key"])):(f(),V(Zu,{key:1,"data-partial-failed":"",text:s(h)("backend::lang.extension.partial_failed")},null,8,["text"]))],8,EL))}}),TL={class:"flex min-w-0 flex-col gap-1.5"},ML={class:"relative"},DL=["id","name","type","value","placeholder","disabled","required","aria-required","aria-invalid","aria-describedby"],OL=["aria-pressed","aria-label","disabled"],PL=["id","data-secret-state","role"],IL={key:3},RL=ae({__name:"PasswordField",props:{field:{},modelValue:{},controlId:{},invalid:{type:Boolean},describedBy:{},labels:{},source:{},recordId:{}},emits:["update:modelValue"],setup(e,{emit:t}){const a=e,n=t,l=E(!1),r=k(()=>typeof a.modelValue=="string"?a.modelValue:""),o=k(()=>Hl(a.field)),i=ct(_o,null);i&&Ve(i.revision,()=>{l.value=!1});const u=ct(a_,null),c=k(()=>u?.value[a.field.name]??""),d=k(()=>c.value!==""),p=k(()=>c.value==="stored"&&a.modelValue===null),v=k(()=>`${a.controlId}-secret`),m=k(()=>[a.describedBy??"",d.value?v.value:""].filter(Boolean).join(" ")),y=k(()=>{if(c.value==="stored"&&!p.value)return h("backend::lang.secret.placeholder_stored");const w=o.value.placeholder;return typeof w=="string"?w:void 0});function x(){l.value=!1,n("update:modelValue",null)}function C(){n("update:modelValue","")}return(w,S)=>(f(),b("div",TL,[g("div",ML,[g("input",Ye({id:e.controlId,autocomplete:"new-password",spellcheck:"false"},o.value,{name:e.field.name,type:l.value?"text":"password",value:p.value?"":r.value,placeholder:y.value,disabled:p.value||void 0,required:e.field.required||void 0,"aria-required":e.field.required?"true":void 0,"aria-invalid":e.invalid?"true":void 0,"aria-describedby":m.value||void 0,class:[s(Lt)(e.invalid),"h-input pr-12"],onInput:S[0]||(S[0]=L=>n("update:modelValue",L.target.value))}),null,16,DL),g("button",{type:"button","data-password-toggle":"","aria-pressed":l.value?"true":"false","aria-label":s(h)(l.value?"backend::lang.form.hide_password":"backend::lang.form.show_password"),disabled:p.value||void 0,class:"absolute top-1/2 right-1.5 flex size-8 -translate-y-1/2 items-center justify-center rounded-pager text-muted transition-colors duration-150 ease-out hover:bg-hover hover:text-text disabled:opacity-60",onClick:S[1]||(S[1]=L=>l.value=!l.value)},[(f(),V(Wt(l.value?s(wC):s(CC)),{size:16,"aria-hidden":"true"}))],8,OL)]),d.value?(f(),b("p",{key:0,id:v.value,"data-secret-state":p.value?"clearing":c.value,role:p.value?"status":void 0,class:me([p.value?"text-danger":"text-muted","flex flex-wrap items-center gap-2 text-[13px]"])},[p.value?(f(),b(ve,{key:0},[D(s(bt),{size:14,class:"shrink-0","aria-hidden":"true"}),g("span",null,_(s(h)("backend::lang.secret.clear_pending")),1),D(We,{variant:"ghost",size:"sm",icon:s(Ib),"data-action":"secret-undo",onClick:C},{default:N(()=>[ye(_(s(h)("backend::lang.secret.undo")),1)]),_:1},8,["icon"])],64)):c.value==="stored"?(f(),b(ve,{key:1},[D(s(cn),{size:14,class:"shrink-0","aria-hidden":"true"}),g("span",null,_(s(h)("backend::lang.secret.stored")),1),D(We,{variant:"ghost",size:"sm",icon:s(Xa),"data-action":"secret-clear",onClick:x},{default:N(()=>[ye(_(s(h)("backend::lang.secret.clear")),1)]),_:1},8,["icon"])],64)):c.value==="env"?(f(),b(ve,{key:2},[D(s(Vl),{size:14,class:"shrink-0","aria-hidden":"true"}),g("span",null,_(s(h)("backend::lang.secret.env")),1)],64)):(f(),b("span",IL,_(s(h)("backend::lang.secret.empty")),1))],10,PL)):G("",!0)]))}}),qL=["aria-labelledby","data-ml-field"],LL={class:"flex flex-wrap items-center gap-2"},NL=["value","aria-label"],BL=["value"],ed=ae({__name:"MLField",props:{inner:{},innerType:{},mlType:{},contentLocale:{type:Boolean},field:{},modelValue:{},controlId:{},invalid:{type:Boolean},describedBy:{},labels:{},source:{},recordId:{}},emits:["update:modelValue"],setup(e,{emit:t}){const a=e,n=t,l=k(()=>mn(a.modelValue)),r=ct(su,null),o=k(()=>{const w=r?.value;return w&&w.length>0?[...w]:[]}),i=E(o.value[0]??"en"),u=k(()=>`${a.controlId}-label`),c=k(()=>`${a.controlId}-editor`),d=k(()=>l.value[i.value]??""),p=k(()=>({...a.field,type:a.innerType})),v=k(()=>a.contentLocale?{contentLocale:i.value}:{});function m(w){w&&(i.value=w)}function y(w){const S=w.target.value;m(S),aR(S)}function x(w){n("update:modelValue",{...l.value,[i.value]:w})}function C(w){const S=w.detail;typeof S=="string"&&S!==""&&m(S)}return $t(()=>{window.addEventListener(Es,C)}),Qn(()=>{window.removeEventListener(Es,C)}),(w,S)=>(f(),b("div",{class:"flex flex-col gap-1.5",role:"group","aria-labelledby":u.value,"data-ml-field":e.mlType},[g("div",LL,[g("select",{"data-ml-locale":"",class:"rounded-control border border-border-strong bg-surface px-2 py-1 text-[13px]",value:i.value,"aria-label":`Locale for ${e.field.label||e.field.name}`,onChange:y},[(f(!0),b(ve,null,Ie(o.value,L=>(f(),b("option",{key:L,value:L},_(L),9,BL))),128))],40,NL)]),(f(),V(Wt(e.inner),Ye({field:p.value,"model-value":d.value,"control-id":c.value,invalid:e.invalid,"described-by":e.describedBy,source:e.source,"record-id":e.recordId},v.value,{"onUpdate:modelValue":x}),null,16,["field","model-value","control-id","invalid","described-by","source","record-id"]))],8,qL))}}),FL=["id","aria-labelledby","aria-describedby","aria-busy"],VL={key:0,"data-plugin-field-skeleton":"",class:"h-[42px] w-full rounded-control bg-skel","aria-hidden":"true"},r_=ae({__name:"PluginField",props:{contentLocale:{},field:{},modelValue:{},controlId:{},invalid:{type:Boolean},describedBy:{},labels:{},source:{},recordId:{}},emits:["update:modelValue"],setup(e,{emit:t}){const a=e,n=t,l=ct(Qu,null),r=E("loading"),o=E(null);let i=null,u=!1;const c=k(()=>l?.value||Na.value),d=k(()=>JSON.stringify(a.field.typeOptions??{})),p=k(()=>a.field.readOnly===!0);function v(M,R){if(Object.is(M,R))return!0;if(M===null||R===null||typeof M!="object"||typeof R!="object")return!1;try{return JSON.stringify(M)===JSON.stringify(R)}catch{return!1}}function m(M,R){v(M.value,R)||(M.value=R)}function y(M,R,q){q?M.setAttribute(R,""):M.removeAttribute(R)}function x(M){M.setAttribute("field-name",a.field.name),M.setAttribute("record-id",a.recordId==null?"":String(a.recordId)),M.setAttribute("locale",a.contentLocale??""),M.setAttribute("ui-locale",c.value),M.setAttribute("options",d.value),y(M,"disabled",p.value),y(M,"invalid",a.invalid===!0)}function C(M){let R;return{promise:new Promise((K,T)=>{R=setTimeout(()=>T(new Error("field type element was not defined in time")),M)}),cancel:()=>clearTimeout(R)}}async function w(M){const R=await RO(M);if(customElements.get(M))return;if(R.length>0)throw new Error(`plugin script failed: ${R.join(", ")}`);const q=C(n_);try{await Promise.race([customElements.whenDefined(M),q.promise])}finally{q.cancel()}}async function S(M){const R=i,q=M.detail;if(!R||q===null||typeof q!="object")return;const{id:K,file:T}=q,I=Y=>{!u&&i===R&&R.dispatchEvent(new CustomEvent(MR,{detail:{id:K,...Y}}))},W=()=>h("backend::lang.fileupload.upload_failed"),A=a.source;if(!(T instanceof Blob)||!A){I({error:W()});return}const B=T instanceof File&&T.name!==""?T.name:"upload";try{const Y=await Le.POST("/{vendor}/{plugin}/{controller}/{id}/fields/{field}/upload",{params:{path:{...A,id:a.recordId??0,field:a.field.name}},body:{file:""},bodySerializer:()=>{const H=new FormData;return H.append("file",T,B),H}});if(Y.data){I({url:Y.data.data.url});return}const U=Y.response.status===422?Ip(Y.error?.error):"";I({error:U||W()})}catch{I({error:W()})}}function L(M){S(M)}function O(M){const R=M.detail;R!==null&&typeof R=="object"&&Object.hasOwn(R,"value")&&n("update:modelValue",R.value)}return $t(async()=>{const M=a.field.element??"";try{if(M==="")throw new Error("plugin field without an element");if(await w(M),u||!o.value)return;const R=document.createElement(M);x(R),m(R,a.modelValue),R.addEventListener(Rh,O),R.addEventListener(qh,L),o.value.append(R),i=R,r.value="ready"}catch{u||(r.value="failed")}}),Ve(()=>[a.recordId,a.invalid,a.contentLocale,p.value,c.value,d.value],()=>{i&&x(i)}),Ve(()=>a.modelValue,M=>{i&&m(i,M)},{deep:!0}),Dt(()=>{u=!0,i?.removeEventListener(Rh,O),i?.removeEventListener(qh,L),i=null}),(M,R)=>r.value==="failed"?(f(),V(Zu,{key:0,id:e.controlId,"data-plugin-field-failed":"","aria-describedby":e.describedBy||void 0,text:s(h)("backend::lang.extension.widget_failed")},null,8,["id","aria-describedby","text"])):(f(),b("div",{key:1,id:e.controlId,role:"group","data-plugin-field":"","aria-labelledby":e.field.label?`${e.controlId}-label`:void 0,"aria-describedby":e.describedBy||void 0,"aria-busy":r.value==="loading"?"true":void 0,class:"flex min-h-input min-w-0 flex-col"},[r.value==="loading"?(f(),b("span",VL)):G("",!0),g("div",{ref_key:"mountPoint",ref:o,class:"contents"},null,512)],8,FL))}}),zL=ae({__name:"MLPluginField",props:{field:{},modelValue:{},controlId:{},invalid:{type:Boolean},describedBy:{},labels:{},source:{},recordId:{}},emits:["update:modelValue"],setup(e,{emit:t}){const a=e,n=t;return(l,r)=>(f(),V(ed,Ye(a,{inner:r_,"inner-type":e.field.type,"ml-type":e.field.type,"content-locale":"","onUpdate:modelValue":r[0]||(r[0]=o=>n("update:modelValue",o))}),null,16,["inner-type","ml-type"]))}}),jL=["id"],UL=["id","aria-labelledby","aria-label","aria-describedby","data-mode"],HL=["aria-labelledby"],KL=["id"],WL={class:"min-w-0 [overflow-wrap:anywhere]"},GL={key:0,class:"shrink-0 text-[12px] font-semibold text-muted","aria-hidden":"true"},YL=["data-permission","data-locked","data-locked-by"],JL={class:"flex min-w-0 flex-col"},ZL=["id"],XL=["id"],QL=ae({__name:"PermissionEditorField",props:{field:{},modelValue:{},controlId:{},invalid:{type:Boolean},describedBy:{},labels:{},source:{},recordId:{}},emits:["update:modelValue"],setup(e,{emit:t}){const a=e,n=t,l=ct(Lp,null),r=k(()=>{const O=new Map;for(const M of l?.value[a.field.name]??[])O.set(M.code,M);return O}),o=k(()=>a.field.permissionOptions??[]),i=k(()=>a.field.mode==="radio"),u=k(()=>!!a.field.readOnly||!!Hl(a.field).readonly),c=k(()=>Q0(a.field,a.modelValue)),d=k(()=>{const O=[],M=[];for(const R of o.value){if(!R.tab){M.push(R);continue}let q=O.find(K=>K.label===R.tab);q||(q={key:`tab:${R.tab}`,label:R.tab,options:[]},O.push(q)),q.options.push(R)}return M.length>0&&O.push({key:"other",label:h("backend::lang.permissioneditor.other"),options:M}),O}),p=[{value:"1",label:"backend::lang.permissioneditor.allow",checked:"data-[state=checked]:bg-ok-bg data-[state=checked]:text-ok-text"},{value:"0",label:"backend::lang.permissioneditor.inherit",checked:"data-[state=checked]:bg-surface data-[state=checked]:text-text data-[state=checked]:shadow-tab"},{value:"-1",label:"backend::lang.permissioneditor.deny",checked:"data-[state=checked]:bg-danger-soft data-[state=checked]:text-danger"}],v=k(()=>`${a.controlId}-label`);function m(O,M){return`${a.controlId}-${O}-${M}`}function y(O){return r.value.get(O.code)}function x(O){return u.value||!!O.locked||y(O)!==void 0}function C(O){return(!!O.locked||y(O)!==void 0)&&!u.value}function w(O){return y(O)?.note||h("backend::lang.permissioneditor.locked")}function S(O){const M=y(O);return M?M.value===1||i.value&&M.value===-1?M.value:0:c.value[O.code]??0}function L(O,M){if(x(O))return;const R={...c.value};M===1||i.value&&M===-1?R[O.code]=M:delete R[O.code],n("update:modelValue",R)}return(O,M)=>o.value.length===0?(f(),b("div",{key:0,id:e.controlId,"data-permission-empty":"",class:"flex min-h-input items-center rounded-control border border-border bg-subtle px-3.5 text-muted"},_(s(h)("backend::lang.permissioneditor.empty")),9,jL)):(f(),b("div",{key:1,id:e.controlId,role:"group","aria-labelledby":e.field.label?v.value:void 0,"aria-label":e.field.label?void 0:e.field.name,"aria-describedby":e.describedBy||void 0,class:me([e.invalid?"border-danger":"border-border","overflow-hidden rounded-inner border"]),"data-permission-editor":"","data-mode":i.value?"radio":"checkbox"},[(f(!0),b(ve,null,Ie(d.value,(R,q)=>(f(),b("div",{key:R.key,role:"group","aria-labelledby":`${e.controlId}-section-${q}`,"data-permission-section":""},[g("h3",{id:`${e.controlId}-section-${q}`,class:me([q>0?"border-t border-border":"","flex h-row-head items-center justify-between gap-4 bg-subtle px-4 font-semibold"])},[g("span",WL,_(R.label),1),i.value?G("",!0):(f(),b("span",GL,_(s(h)("backend::lang.permissioneditor.allow")),1))],10,KL),(f(!0),b(ve,null,Ie(R.options,(K,T)=>(f(),b("div",{key:K.code,"data-permission":K.code,"data-locked":C(K)?"":void 0,"data-locked-by":C(K)&&y(K)?"record":void 0,class:"flex min-h-[56px] items-center justify-between gap-x-4 gap-y-2 border-t border-border px-4 py-3 max-sm:flex-col max-sm:items-start"},[g("div",JL,[(f(),V(Wt(i.value?"span":"label"),{id:`${m(q,T)}-label`,for:i.value?void 0:m(q,T),class:"[overflow-wrap:anywhere]"},{default:N(()=>[ye(_(K.label||K.code)+" ",1),C(K)?(f(),V(s(cn),{key:0,size:14,class:"ml-1 inline-block align-[-2px] text-muted","aria-hidden":"true"})):G("",!0)]),_:2},1032,["id","for"])),C(K)?(f(),b("p",{key:0,id:`${m(q,T)}-note`,class:"text-[13px] text-muted [overflow-wrap:anywhere]","data-permission-locked":""},_(w(K)),9,ZL)):K.comment?(f(),b("p",{key:1,id:`${m(q,T)}-note`,class:"text-[13px] text-muted [overflow-wrap:anywhere]"},_(K.comment),9,XL)):G("",!0)]),i.value?(f(),V(s($p),{key:0,orientation:"horizontal","model-value":String(S(K)),disabled:x(K),"aria-disabled":x(K)?"true":void 0,"aria-labelledby":`${m(q,T)}-label`,"aria-describedby":C(K)||K.comment?`${m(q,T)}-note`:void 0,class:"inline-flex shrink-0 gap-1 rounded-inner border border-border bg-subtle p-1","onUpdate:modelValue":I=>L(K,Number(I))},{default:N(()=>[(f(),b(ve,null,Ie(p,I=>D(s(Cp),{key:I.value,value:I.value,"data-segment":I.value,class:me([I.checked,"inline-flex h-pager items-center rounded-tab px-4 text-[13px] whitespace-nowrap text-muted transition-colors duration-150 ease-out hover:text-text disabled:cursor-not-allowed disabled:hover:text-muted data-[state=checked]:text-[14px] data-[state=checked]:font-semibold"])},{default:N(()=>[ye(_(s(h)(I.label)),1)]),_:2},1032,["value","data-segment","class"])),64))]),_:1},8,["model-value","disabled","aria-disabled","aria-labelledby","aria-describedby","onUpdate:modelValue"])):(f(),V(s(H8),{key:1,id:m(q,T),"model-value":S(K)===1,disabled:x(K),"aria-disabled":x(K)?"true":void 0,"aria-labelledby":`${m(q,T)}-label`,"aria-describedby":C(K)||K.comment?`${m(q,T)}-note`:void 0,class:"flex size-[18px] shrink-0 items-center justify-center rounded-checkbox border border-border-strong bg-surface disabled:cursor-not-allowed disabled:opacity-60 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-on-primary","onUpdate:modelValue":I=>L(K,I===!0?1:0)},{default:N(()=>[D(s(W8),null,{default:N(()=>[D(s(Ba),{size:14,"aria-hidden":"true"})]),_:1})]),_:1},8,["id","model-value","disabled","aria-disabled","aria-labelledby","aria-describedby","onUpdate:modelValue"]))],8,YL))),128))],8,HL))),128))],10,UL))}}),e9=ae({__name:"FieldRenderer",props:{field:{},modelValue:{},controlId:{},invalid:{type:Boolean},describedBy:{},labels:{},source:{},recordId:{}},emits:["update:modelValue"],setup(e,{emit:t}){const a=e,n=t,l=k(()=>S_(a.field));return(r,o)=>(f(),V(Wt(l.value),{field:e.field,"model-value":e.modelValue,"control-id":e.controlId,invalid:e.invalid,"described-by":e.describedBy,labels:e.labels,source:e.source,"record-id":e.recordId,"onUpdate:modelValue":o[0]||(o[0]=i=>n("update:modelValue",i))},null,8,["field","model-value","control-id","invalid","described-by","labels","source","record-id"]))}}),t9=["data-field"],a9=["id"],n9={key:0,class:"text-danger","aria-hidden":"true"},l9=["id","for"],r9={key:0,class:"text-danger","aria-hidden":"true"},o9=["id"],s9=["id"],i9=["id"],u9=["id"],d9=ae({__name:"FormField",props:{field:{},modelValue:{},errors:{},notices:{},labels:{},source:{},recordId:{},idPrefix:{}},emits:["update:modelValue"],setup(e,{emit:t}){const a=e,n=t,l=k(()=>`${a.idPrefix??"field"}-${a.field.name}`),r=k(()=>l.value),o=k(()=>`${l.value}-comment`),i=k(()=>`${l.value}-error`),u=k(()=>`${l.value}-notice`),c=k(()=>`${l.value}-trigger`),d=ct(Fs,null),p=ct(Np,null),v=k(()=>p?.value[d?d.path(a.field.name):a.field.name]??""),m=k(()=>(a.errors?.length??0)>0),y=k(()=>(a.notices?.length??0)>0),x=k(()=>dU(a.field.type)),C=k(()=>cU(a.field.type)||ad(a.field)),w=k(()=>!x.value&&!!a.field.comment),S=k(()=>[v.value!==""?c.value:"",w.value||x.value&&a.field.comment?o.value:"",m.value?i.value:"",y.value?u.value:""].filter(Boolean).join(" "));return(L,O)=>(f(),b("div",{class:"flex min-w-0 flex-col gap-1.5","data-field":e.field.name},[C.value&&e.field.label?(f(),b("span",{key:0,id:`${r.value}-label`,class:"font-semibold"},[ye(_(e.field.label),1),e.field.required?(f(),b("span",n9," *")):G("",!0)],8,a9)):!x.value&&!C.value?(f(),b("label",{key:1,id:`${r.value}-label`,for:r.value,class:"font-semibold"},[ye(_(e.field.label||e.field.name),1),e.field.required?(f(),b("span",r9," *")):G("",!0)],8,l9)):G("",!0),v.value!==""?(f(),b("p",{key:2,id:c.value,"data-trigger-note":"",class:"flex items-center gap-2 text-[13px] text-muted"},[D(s(Vl),{size:14,class:"shrink-0","aria-hidden":"true"}),g("span",null,_(v.value),1)],8,o9)):G("",!0),D(e9,{field:e.field,"model-value":e.modelValue,"control-id":r.value,invalid:m.value,"described-by":S.value,labels:e.labels,source:e.source,"record-id":e.recordId,"onUpdate:modelValue":O[0]||(O[0]=M=>n("update:modelValue",M))},null,8,["field","model-value","control-id","invalid","described-by","labels","source","record-id"]),w.value?(f(),b("p",{key:3,id:o.value,class:"text-[13px] text-muted"},_(e.field.comment),9,s9)):G("",!0),y.value?(f(),b("div",{key:4,id:u.value,role:"status","data-field-notice":"",class:"summer-callout summer-callout--warning text-[13px]!"},[(f(!0),b(ve,null,Ie(e.notices,(M,R)=>(f(),b("p",{key:R,class:"summer-callout__text"},_(M),1))),128))],8,i9)):G("",!0),m.value?(f(),b("div",{key:5,id:i.value,class:"flex flex-col gap-0.5 text-[13px] text-danger"},[(f(!0),b(ve,null,Ie(e.errors,(M,R)=>(f(),b("p",{key:R,class:"flex items-center gap-1.5"},[D(s(bt),{size:14,class:"shrink-0","aria-hidden":"true"}),g("span",null,_(M),1)]))),128))],8,u9)):G("",!0)],8,t9))}}),c9={class:"grid grid-cols-1 gap-x-6 gap-y-[22px] min-[600px]:grid-cols-2"},xo=ae({__name:"FormGrid",props:{fields:{},values:{},errors:{},notices:{},labels:{},source:{},recordId:{},idPrefix:{},scopePath:{}},emits:["update"],setup(e,{emit:t}){const a=e,n=t;yt(Fs,{fields:k(()=>a.fields),values:k(()=>a.values),path:r=>a.scopePath?`${a.scopePath}.${r}`:r});function l(r){if(r.type===xr)return"col-span-full";switch(r.span){case"left":return"min-[600px]:col-start-1";case"right":return"min-[600px]:col-start-2";case"auto":case"row":return"";default:return"col-span-full"}}return(r,o)=>(f(),b("div",c9,[(f(!0),b(ve,null,Ie(e.fields,i=>(f(),V(d9,{key:i.name,class:me(l(i)),field:i,"model-value":e.values[i.name],errors:e.errors[i.name],notices:e.notices?.[i.name],labels:e.labels?.[i.name],source:e.source,"record-id":e.recordId,"id-prefix":e.idPrefix,"onUpdate:modelValue":u=>n("update",i.name,u)},null,8,["class","field","model-value","errors","notices","labels","source","record-id","id-prefix","onUpdate:modelValue"]))),128))]))}}),f9=["data-preview-field"],p9=["id"],m9={class:"m-0 min-w-0"},v9={key:0,"data-switch":"true",class:"inline-flex h-6 items-center rounded-pill bg-ok-bg px-2.5 text-[12px] font-semibold text-ok-text"},h9={key:1,"data-switch":"false",class:"inline-flex h-6 items-center rounded-pill border border-border-strong px-2.5 text-[12px] font-semibold text-muted"},g9={class:"flex size-[22px] shrink-0 items-center justify-center rounded-full bg-primary text-[10px] font-bold text-on-primary","aria-hidden":"true"},y9={class:"font-semibold"},b9={key:0,class:"px-2 text-muted","data-empty":""},_9={key:0},x9={key:1,class:"text-muted","data-empty":""},k9={key:0},w9={key:1,class:"text-muted","data-empty":""},ec="flex min-h-input items-center rounded-control border border-border bg-subtle px-3.5 [overflow-wrap:anywhere]",o_=ae({__name:"PreviewField",props:{field:{},value:{},labels:{},source:{},recordId:{},idPrefix:{}},setup(e){const t=e,a=new Set(["datepicker","fileupload","partial","permissioneditor","richeditor","repeater","money","taglist"]),n=k(()=>`${t.idPrefix??"preview"}-${t.field.name}`),l=k(()=>`${n.value}-label`),r=k(()=>{const m=t.field.type;return a.has(m)||ad(t.field)?"control":m==="checkbox"||m==="switch"?"toggle":m==="relation"?t.field.multiple?"chips":"relation":m==="textarea"?"textarea":"text"}),o=k(()=>({...t.field,readOnly:!0})),i=k(()=>S_(t.field));function u(m){return m==null||m===""}const c=k(()=>{const m=t.value;if(u(m)||typeof m=="object")return"";if(t.field.type==="dropdown"){const y=(t.field.options??[]).find(x=>String(x.value)===String(m));return y?y.label:String(m)}return String(m)}),d=k(()=>t.labels?.[0]?.label??""),p=k(()=>Array.isArray(t.value)?t.labels??[]:[]);function v(m){return m.trim().split(/\s+/).filter(Boolean).slice(0,2).map(x=>x.charAt(0).toUpperCase()).join("")}return(m,y)=>(f(),b("div",{class:"flex min-w-0 flex-col gap-1.5","data-preview-field":e.field.name},[g("dt",{id:l.value,class:"font-semibold"},_(e.field.label||e.field.name),9,p9),g("dd",m9,[r.value==="control"?(f(),V(Wt(i.value),{key:0,field:o.value,"model-value":e.value,"control-id":n.value,labels:e.labels,source:e.source,"record-id":e.recordId},null,8,["field","model-value","control-id","labels","source","record-id"])):r.value==="toggle"?(f(),b(ve,{key:1},[s(Xu)(e.value)?(f(),b("span",v9,_(s(h)("backend::lang.list.column_switch_true")),1)):(f(),b("span",h9,_(s(h)("backend::lang.list.column_switch_false")),1))],64)):r.value==="chips"?(f(),b("div",{key:2,"data-preview-value":"",class:me([ec,"flex-wrap gap-1.5 p-1.5"])},[(f(!0),b(ve,null,Ie(p.value,x=>(f(),b("span",{key:String(x.value),"data-chip":"",class:"inline-flex min-h-[30px] items-center gap-1.5 rounded-pill bg-surface pr-3 pl-1"},[g("span",g9,_(v(x.label)),1),g("span",y9,_(x.label),1)]))),128)),p.value.length===0?(f(),b("span",b9,_(s(h)("backend::lang.list.empty_value")),1)):G("",!0)])):r.value==="relation"?(f(),b("div",{key:3,"data-preview-value":"",class:me(ec)},[d.value!==""?(f(),b("span",_9,_(d.value),1)):(f(),b("span",x9,_(e.field.emptyOption||s(h)("backend::lang.list.empty_value")),1))])):(f(),b("div",{key:4,"data-preview-value":"",class:me([ec,r.value==="textarea"?"items-start! py-3 whitespace-pre-wrap":""])},[c.value!==""?(f(),b("span",k9,_(c.value),1)):(f(),b("span",w9,_(s(h)("backend::lang.list.empty_value")),1))],2))])],8,f9))}}),s_=new Set(["p","br","strong","b","em","i","u","s","h3","ul","ol","li","blockquote","a","div","span"]);function i_(e){const t=document.createElement("template");return t.innerHTML=e,t.content}function $9(e){if(e==="")return[];const t=new Set;for(const a of Array.from(i_(e).querySelectorAll("*")))t.add(a.localName.toLowerCase());return[...t]}function Lh(e){return $9(e).some(t=>!s_.has(t))}const C9=["aria-labelledby","aria-describedby","data-repeater"],S9={key:0,"data-repeater-empty":"",class:"flex flex-col items-center gap-2 rounded-inner border border-dashed border-border-strong px-6 py-8 text-center"},E9={class:"font-semibold"},A9={key:0,class:"max-w-[420px] text-[13px] text-muted"},T9={key:0,"data-repeater-slot":"",class:"h-12 rounded-inner border-2 border-dashed border-primary bg-sel"},M9=["data-repeater-row","data-repeater-key","onDragover"],D9=["data-repeater-handle","aria-label","onKeydown","onDragstart"],O9={class:"text-[13px] text-muted tabular-nums"},P9=["title"],I9={key:1,"data-repeater-errors":"",class:"inline-flex h-6 items-center rounded-pill bg-danger-soft px-2.5 text-[13px] font-semibold text-danger"},R9={key:2,class:"flex gap-1"},q9=["aria-label","disabled","onClick"],L9=["aria-label","disabled","onClick"],N9=["aria-label","aria-expanded","aria-controls","onClick"],B9=["aria-label","disabled","onClick"],F9=["id"],V9={key:0,class:"m-0 grid grid-cols-1 gap-x-6 gap-y-[22px] min-[600px]:grid-cols-2"},z9={key:2,class:"flex flex-wrap items-center gap-4"},j9={key:0,"data-repeater-count":"",class:"text-[13px] text-muted tabular-nums"},Lo="inline-flex size-8 shrink-0 items-center justify-center rounded-pager text-muted transition-colors duration-150 ease-out hover:bg-hover hover:text-text disabled:cursor-not-allowed disabled:opacity-40",U9=ae({__name:"RepeaterField",props:{field:{},modelValue:{},controlId:{},invalid:{type:Boolean},describedBy:{},labels:{},source:{},recordId:{}},emits:["update:modelValue"],setup(e,{emit:t}){const a=e,n=t,l=ct(Bp,null),r=k(()=>a.field.form?.fields??[]),o=k(()=>!!a.field.readOnly),i=k(()=>Array.isArray(a.modelValue)?a.modelValue.map(J=>J!==null&&typeof J=="object"&&!Array.isArray(J)?J:{}):[]),u=k(()=>typeof a.field.maxItems=="number"?a.field.maxItems:null),c=k(()=>typeof a.field.minItems=="number"?a.field.minItems:0),d=k(()=>a.field.prompt||h("backend::lang.repeater.add")),p=k(()=>`${a.controlId}-label`);let v=0;const m=E([]),y=E(new Set);let x;function C(){return v+=1,`r${v}`}Ve(()=>a.modelValue,J=>{J===x&&m.value.length===i.value.length||m.value.length!==i.value.length&&(m.value=i.value.map(()=>C()),y.value=new Set)},{immediate:!0});function w(J,ee){m.value=ee,x=J,n("update:modelValue",J)}function S(J){return J==null||J===""||J===!1||Array.isArray(J)&&J.length===0}function L(){const J={};for(const ee of r.value)ee.default!==void 0?J[ee.name]=ee.default:ee.type==="checkbox"||ee.type==="switch"?J[ee.name]=!1:J[ee.name]=null;return J}function O(J){return r.value.some(ee=>{const te=J[ee.name];return S(te)?!1:ee.default===void 0||String(ee.default)!==String(te)})}function M(J){return(i_(J).textContent??"").replace(/\s+/g," ").trim()}function R(J){const ee=i.value[J]??{},te=r.value.find(z=>z.name===a.field.titleFrom),$=te?ee[te.name]:void 0;let P="";return te&&!S($)&&typeof $!="object"&&(te.type==="dropdown"?P=(te.options??[]).find(z=>String(z.value)===String($))?.label??String($):te.type==="richeditor"?P=M(String($)):P=String($).trim()),P!==""?P:h("backend::lang.repeater.untitled",{n:J+1})}function q(J,ee){const te=`${a.field.name}.${ee}.`,$={};for(const[P,z]of Object.entries(J??{}))P.startsWith(te)&&P.length>te.length&&($[P.slice(te.length)]=z);return $}const K=k(()=>i.value.map((J,ee)=>q(l?.errors.value,ee))),T=k(()=>i.value.map((J,ee)=>q(l?.notices.value,ee))),I=J=>Object.keys(K.value[J]??{}).length;Ve(K,J=>{const ee=J.flatMap((te,$)=>Object.keys(te).length>0?[m.value[$]]:[]);if(ee.length>0){const te=new Set(y.value);for(const $ of ee)te.delete($);y.value=te}});function W(J){return o.value||!y.value.has(J)}function A(J,ee){const te=new Set(y.value);ee?te.delete(J):te.add(J),y.value=te}const B=k(()=>m.value.some(J=>!y.value.has(J)));function Y(){y.value=B.value?new Set(m.value):new Set}const U=E(null),H=E(null);function re(J){return U.value?.querySelector(`[data-repeater-handle="${J}"]`)??null}function fe(J,ee,te){const $=i.value.map((P,z)=>z===J?{...P,[ee]:te}:P);w($,[...m.value]),l?.clearError(`${a.field.name}.${J}.${ee}`)}async function Ae(){if(o.value||u.value!==null&&i.value.length>=u.value)return;const J=C();w([...i.value,L()],[...m.value,J]),await Ge(),U.value?.querySelector(`[data-repeater-key="${J}"]`)?.querySelector('[data-repeater-body] input, [data-repeater-body] select, [data-repeater-body] textarea, [data-repeater-body] [contenteditable="true"]')?.focus()}async function xe(J){const ee=i.value[J];if(!ee||o.value||i.value.length<=c.value)return;if(O(ee)&&l){const z=R(J);if(!await l.confirm({message:h("backend::lang.repeater.remove_confirm",{title:z}),confirmLabel:h("backend::lang.repeater.remove"),danger:!0}))return}const te=m.value.filter((z,ce)=>ce!==J);w(i.value.filter((z,ce)=>ce!==J),te),await Ge();const $=te[J]??te[J-1],P=$?re($):null;P?P.focus():H.value?.$el.focus()}async function _e(J,ee){const te=i.value.length;if(o.value||J===ee||J<0||ee<0||J>=te||ee>=te)return;const $=[...i.value],P=[...m.value],[z]=$.splice(J,1),[ce]=P.splice(J,1);$.splice(ee,0,z),P.splice(ee,0,ce),w($,P),await Ge(),re(ce)?.focus(),l?.announce(h("backend::lang.repeater.moved",{title:R(ee),position:ee+1,total:te}))}function le(J,ee){(J.key==="ArrowUp"||J.key==="ArrowDown")&&(J.preventDefault(),_e(ee,J.key==="ArrowUp"?ee-1:ee+1))}const pe=E(null),F=E(null);function de(J,ee){pe.value=ee,F.value=null,J.dataTransfer?.setData("text/plain",m.value[ee]??""),J.dataTransfer&&(J.dataTransfer.effectAllowed="move")}function he(J,ee){if(pe.value===null)return;J.preventDefault();const $=J.currentTarget.getBoundingClientRect();F.value=J.clientY>$.top+$.height/2?ee+1:ee}function Z(J){if(pe.value===null||F.value===null)return;J.preventDefault();const ee=pe.value,te=F.value>ee?F.value-1:F.value;ge(),_e(ee,te)}function ge(){pe.value=null,F.value=null}return(J,ee)=>(f(),b("div",{ref_key:"root",ref:U,role:"group","aria-labelledby":p.value,"aria-describedby":e.describedBy||void 0,"data-repeater":e.field.name,class:"flex flex-col gap-4"},[i.value.length===0?(f(),b("div",S9,[g("p",E9,_(s(h)("backend::lang.repeater.empty")),1),o.value?G("",!0):(f(),b("p",A9,_(s(h)("backend::lang.repeater.empty_hint",{prompt:d.value})),1))])):G("",!0),(f(!0),b(ve,null,Ie(i.value,(te,$)=>(f(),b(ve,{key:m.value[$]},[pe.value!==null&&F.value===$&&F.value!==pe.value&&F.value!==pe.value+1?(f(),b("div",T9)):G("",!0),g("div",{"data-repeater-row":$,"data-repeater-key":m.value[$],class:me([[I($)>0?"border-danger":"border-border",pe.value===$?"opacity-50":""],"rounded-inner border bg-surface"]),onDragover:P=>he(P,$),onDrop:Z},[g("div",{class:me([W(m.value[$])?"rounded-t-inner border-b border-border":"rounded-inner","flex min-h-12 items-center gap-2 bg-subtle px-2"])},[o.value?G("",!0):(f(),b("button",{key:0,type:"button",draggable:"true","data-repeater-handle":m.value[$],"aria-label":s(h)("backend::lang.repeater.move",{title:R($)}),class:me([Lo,"cursor-grab"]),onKeydown:P=>le(P,$),onDragstart:P=>de(P,$),onDragend:ge},[D(s(Hi),{size:16,"aria-hidden":"true"})],40,D9)),g("span",O9,_($+1)+".",1),g("span",{"data-repeater-title":"",class:"min-w-0 flex-1 truncate font-semibold",title:R($)},_(R($)),9,P9),I($)>0?(f(),b("span",I9,_(s(wa)("backend::lang.form.tab_errors",I($))),1)):G("",!0),o.value?G("",!0):(f(),b("div",R9,[g("button",{type:"button","data-action":"repeater-up","aria-label":s(h)("backend::lang.repeater.move_up",{title:R($)}),disabled:$===0,class:me(Lo),onClick:P=>_e($,$-1)},[D(s(hb),{size:16,"aria-hidden":"true"})],8,q9),g("button",{type:"button","data-action":"repeater-down","aria-label":s(h)("backend::lang.repeater.move_down",{title:R($)}),disabled:$===i.value.length-1,class:me(Lo),onClick:P=>_e($,$+1)},[D(s(Gn),{size:16,"aria-hidden":"true"})],8,L9),g("button",{type:"button","data-action":"repeater-toggle","aria-label":s(h)(W(m.value[$])?"backend::lang.repeater.collapse":"backend::lang.repeater.expand",{title:R($)}),"aria-expanded":W(m.value[$])?"true":"false","aria-controls":`${e.controlId}-${m.value[$]}-body`,class:me(Lo),onClick:P=>A(m.value[$],!W(m.value[$]))},[D(s(Gn),{size:16,class:me([W(m.value[$])?"rotate-180":"","transition-transform duration-150"]),"aria-hidden":"true"},null,8,["class"])],8,N9),g("button",{type:"button","data-action":"repeater-remove","aria-label":s(h)("backend::lang.repeater.remove_named",{title:R($)}),disabled:i.value.length<=c.value,class:me([Lo,"hover:bg-danger-soft hover:text-danger"]),onClick:P=>xe($)},[D(s(Xa),{size:16,"aria-hidden":"true"})],8,B9)]))],2),W(m.value[$])?(f(),b("div",{key:0,id:`${e.controlId}-${m.value[$]}-body`,"data-repeater-body":"",class:"p-4"},[o.value?(f(),b("dl",V9,[(f(!0),b(ve,null,Ie(r.value,P=>(f(),V(o_,{key:P.name,class:me(P.span==="left"?"min-[600px]:col-start-1":P.span==="right"?"min-[600px]:col-start-2":"col-span-full"),field:{...P,readOnly:!0},value:te[P.name],source:e.source,"record-id":e.recordId,"id-prefix":`${e.controlId}-${m.value[$]}`},null,8,["class","field","value","source","record-id","id-prefix"]))),128))])):(f(),V(xo,{key:1,fields:r.value,values:te,errors:K.value[$]??{},notices:T.value[$],source:e.source,"record-id":e.recordId,"id-prefix":`${e.controlId}-${m.value[$]}`,"scope-path":e.field.name,onUpdate:(P,z)=>fe($,P,z)},null,8,["fields","values","errors","notices","source","record-id","id-prefix","scope-path","onUpdate"]))],8,F9)):G("",!0)],42,M9)],64))),128)),pe.value!==null&&F.value===i.value.length&&F.value!==pe.value+1?(f(),b("div",{key:1,"data-repeater-slot":"",class:"h-12 rounded-inner border-2 border-dashed border-primary bg-sel",onDragover:ee[0]||(ee[0]=mt(()=>{},["prevent"])),onDrop:Z},null,32)):G("",!0),o.value?G("",!0):(f(),b("div",z9,[D(We,{ref_key:"addButton",ref:H,variant:"outline",size:"sm",icon:s(vo),"data-action":"repeater-add",disabled:u.value!==null&&i.value.length>=u.value,onClick:Ae},{default:N(()=>[ye(_(d.value),1)]),_:1},8,["icon","disabled"]),u.value!==null?(f(),b("span",j9,_(s(h)("backend::lang.repeater.count",{current:i.value.length,max:u.value})),1)):G("",!0),i.value.length>1?(f(),V(We,{key:1,variant:"ghost",size:"sm",class:"ml-auto","data-action":"repeater-toggle-all",onClick:Y},{default:N(()=>[ye(_(s(h)(B.value?"backend::lang.repeater.collapse_all":"backend::lang.repeater.expand_all")),1)]),_:1})):G("",!0)]))],8,C9))}}),H9="modulepreload",K9=function(e,t){return new URL(e,t).href},Nh={},u_=function(t,a,n){let l=Promise.resolve();if(a&&a.length>0){let c=function(d){return Promise.all(d.map(p=>Promise.resolve(p).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};const o=document.getElementsByTagName("link"),i=document.querySelector("meta[property=csp-nonce]"),u=i?.nonce||i?.getAttribute("nonce");l=c(a.map(d=>{if(d=K9(d,n),d in Nh)return;Nh[d]=!0;const p=d.endsWith(".css"),v=p?'[rel="stylesheet"]':"";if(n)for(let y=o.length-1;y>=0;y--){const x=o[y];if(x.href===d&&(!p||x.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${d}"]${v}`))return;const m=document.createElement("link");if(m.rel=p?"stylesheet":H9,p||(m.as="script"),m.crossOrigin="",m.href=d,u&&m.setAttribute("nonce",u),document.head.appendChild(m),p)return new Promise((y,x)=>{m.addEventListener("load",y),m.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${d}`)))})}))}function r(o){const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=o,window.dispatchEvent(i),!i.defaultPrevented)throw o}return l.then(o=>{for(const i of o||[])i.status==="rejected"&&r(i.reason);return t().catch(r)})};function Bh(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,n=Array(t);a2?n-2:0),r=2;r1?a-1:0),l=1;l"u"?null:jt(BigInt.prototype.toString),Hh=typeof Symbol>"u"?null:jt(Symbol.prototype.toString),fa=jt(Object.prototype.hasOwnProperty),Fo=jt(Object.prototype.toString),ea=jt(RegExp.prototype.test),vl=oN(TypeError);function jt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var a=arguments.length,n=new Array(a>1?a-1:0),l=1;l2&&arguments[2]!==void 0?arguments[2]:Go;if(Fh&&Fh(e,null),!Qr(t))return e;let n=t.length;for(;n--;){let l=t[n];if(typeof l=="string"){const r=a(l);r!==l&&(X9(t)||(t[n]=r),l=r)}e[l]=!0}return e}function sN(e){for(let t=0;t/g),mN=Zt(/\${[\w\W]*/g),vN=Zt(/^data-[\-\w.\u00B7-\uFFFF]+$/),hN=Zt(/^aria-[\-\w]+$/),Jh=Zt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),gN=Zt(/^(?:\w+script|data):/i),yN=Zt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),bN=Zt(/^html$/i),_N=Zt(/^[a-z][.\w]*(-[.\w]+)+$/i),Zh=Zt(/<[/\w!]/g),Xh=Zt(/<[/\w]/g),xN=Zt(/<\/no(script|embed|frames)/i),kN=Zt(/\/>/i),_a={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},f_=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],wN=Ht(ht({},f_)),$N=(function(){const e={};return ar(f_,t=>{e[t]=Zt(new RegExp("])","i"))}),Ht(e)})(),CN=function(){return typeof window>"u"?null:window},SN=function(t,a){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;const l="data-tt-policy-suffix";a&&a.hasAttribute(l)&&(n=a.getAttribute(l));const r="dompurify"+(n?"#"+n:"");try{return t.createPolicy(r,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}},Qh=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},hl=function(t,a,n,l){return fa(t,a)&&Qr(t[a])?ht(l.base?xa(l.base):{},t[a],l.transform):n},oc=function(t,a,n){const l=fa(t,a)?t[a]:void 0;return l&&typeof l=="object"?xa(l):n()};function p_(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:CN();const t=qe=>p_(qe);if(t.version="3.4.16",t.removed=[],!e||!e.document||e.document.nodeType!==_a.document||!e.Element)return t.isSupported=!1,t;let a=e.document;const n=a,l=n.currentScript;e.DocumentFragment;const r=e.HTMLTemplateElement,o=e.Node,i=e.Element,u=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const c=e.DOMParser,d=e.trustedTypes,p=i.prototype,v=Da(p,"cloneNode"),m=Da(p,"remove"),y=Da(p,"removeAttributeNode"),x=Da(p,"nextSibling"),C=Da(p,"childNodes"),w=Da(p,"parentNode"),S=Da(p,"shadowRoot"),L=Da(p,"attributes"),O=o&&o.prototype?Da(o.prototype,"nodeType"):null,M=o&&o.prototype?Da(o.prototype,"nodeName"):null,R=o&&o.prototype?Da(o.prototype,"ownerDocument"):null,q=function(j){return O?O(j):j.nodeType},K=function(j){return M?M(j):j.nodeName};if(typeof r=="function"){const qe=a.createElement("template");qe.content&&qe.content.ownerDocument&&(a=qe.content.ownerDocument)}let T,I="",W,A=!1,B=0;const Y=function(){if(B>0)throw vl('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},U=function(j){Y(),B++;try{return T.createHTML(j)}finally{B--}},H=function(j){Y(),B++;try{return T.createScriptURL(j)}finally{B--}},re=function(){return A||(W=SN(d,l),A=!0),W},fe=a,Ae=fe.implementation,xe=fe.createNodeIterator,_e=fe.createDocumentFragment,le=fe.getElementsByTagName,pe=n.importNode;let F=Qh();t.isSupported=typeof d_=="function"&&typeof w=="function"&&Ae&&Ae.createHTMLDocument!==void 0;const de=fN,he=pN,Z=mN,ge=vN,J=hN,ee=gN,te=yN,$=_N;let P=Jh,z=null;const ce=ht({},[...Kh,...ac,...nc,...lc,...Wh]);let X=null;const oe=ht({},[...Gh,...rc,...Yh,...fi]);let ke=Object.seal(Nr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ce=null,Ee=null;const ie=Object.seal(Nr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Te=!0,$e=!0,Be=!1,je=!0,Ze=!1,nt=!0,be=!1,Oe=!1,se=null,Ue=null,Je=!1,it=!1,Ke=!1,He=!1,Xe=!0,Pt=!1;const oa="user-content-";let sl=!0,En=!1,Fa={},Gt=null;const il=ht({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let An=null;const ul=ht({},["audio","video","img","source","image","track"]);let Me=null;const ze=ht({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),et="http://www.w3.org/1998/Math/MathML",dt="http://www.w3.org/2000/svg",St="http://www.w3.org/1999/xhtml";let It=St,Kl=!1,$o=null;const Co=ht({},[et,dt,St],tc),Q=Ht(["mi","mo","mn","ms","mtext"]);let Re=ht({},Q);const ne=Ht(["annotation-xml"]);let Fe=ht({},ne);const st=ht({},["title","style","font","a","script"]);let Nt=null;const en=["application/xhtml+xml","text/html"],dl="text/html";let Bt=null,kr=null;const V_=a.createElement("form"),Up=function(j){return j instanceof RegExp||j instanceof Function},nd=function(){let j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(kr&&kr===j)return;(!j||typeof j!="object")&&(j={}),j=xa(j),Nt=en.indexOf(j.PARSER_MEDIA_TYPE)===-1?dl:j.PARSER_MEDIA_TYPE,Bt=Nt==="application/xhtml+xml"?tc:Go,z=hl(j,"ALLOWED_TAGS",ce,{transform:Bt}),X=hl(j,"ALLOWED_ATTR",oe,{transform:Bt}),$o=hl(j,"ALLOWED_NAMESPACES",Co,{transform:tc}),Me=hl(j,"ADD_URI_SAFE_ATTR",ze,{transform:Bt,base:ze}),An=hl(j,"ADD_DATA_URI_TAGS",ul,{transform:Bt,base:ul}),Gt=hl(j,"FORBID_CONTENTS",il,{transform:Bt}),Ce=hl(j,"FORBID_TAGS",xa({}),{transform:Bt}),Ee=hl(j,"FORBID_ATTR",xa({}),{transform:Bt}),Fa=fa(j,"USE_PROFILES")?j.USE_PROFILES&&typeof j.USE_PROFILES=="object"?xa(j.USE_PROFILES):j.USE_PROFILES:!1,Te=j.ALLOW_ARIA_ATTR!==!1,$e=j.ALLOW_DATA_ATTR!==!1,Be=j.ALLOW_UNKNOWN_PROTOCOLS||!1,je=j.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ze=j.SAFE_FOR_TEMPLATES||!1,nt=j.SAFE_FOR_XML!==!1,be=j.WHOLE_DOCUMENT||!1,it=j.RETURN_DOM||!1,Ke=j.RETURN_DOM_FRAGMENT||!1,He=j.RETURN_TRUSTED_TYPE||!1,Je=j.FORCE_BODY||!1,Xe=j.SANITIZE_DOM!==!1,Pt=j.SANITIZE_NAMED_PROPS||!1,sl=j.KEEP_CONTENT!==!1,En=j.IN_PLACE||!1,P=uN(j.ALLOWED_URI_REGEXP)?j.ALLOWED_URI_REGEXP:Jh,It=typeof j.NAMESPACE=="string"?j.NAMESPACE:St,Re=oc(j,"MATHML_TEXT_INTEGRATION_POINTS",()=>ht({},Q)),Fe=oc(j,"HTML_INTEGRATION_POINTS",()=>ht({},ne));const ue=oc(j,"CUSTOM_ELEMENT_HANDLING",()=>Nr(null));if(ke=Nr(null),fa(ue,"tagNameCheck")&&Up(ue.tagNameCheck)&&(ke.tagNameCheck=ue.tagNameCheck),fa(ue,"attributeNameCheck")&&Up(ue.attributeNameCheck)&&(ke.attributeNameCheck=ue.attributeNameCheck),fa(ue,"allowCustomizedBuiltInElements")&&typeof ue.allowCustomizedBuiltInElements=="boolean"&&(ke.allowCustomizedBuiltInElements=ue.allowCustomizedBuiltInElements),Zt(ke),Ze&&($e=!1),Ke&&(it=!0),Fa&&(z=ht({},Wh),X=Nr(null),Fa.html===!0&&(ht(z,Kh),ht(X,Gh)),Fa.svg===!0&&(ht(z,ac),ht(X,rc),ht(X,fi)),Fa.svgFilters===!0&&(ht(z,nc),ht(X,rc),ht(X,fi)),Fa.mathMl===!0&&(ht(z,lc),ht(X,Yh),ht(X,fi))),ie.tagCheck=null,ie.attributeCheck=null,fa(j,"ADD_TAGS")&&(typeof j.ADD_TAGS=="function"?ie.tagCheck=j.ADD_TAGS:Qr(j.ADD_TAGS)&&(z===ce&&(z=xa(z)),ht(z,j.ADD_TAGS,Bt))),fa(j,"ADD_ATTR")&&(typeof j.ADD_ATTR=="function"?ie.attributeCheck=j.ADD_ATTR:Qr(j.ADD_ATTR)&&(X===oe&&(X=xa(X)),ht(X,j.ADD_ATTR,Bt))),fa(j,"ADD_FORBID_CONTENTS")&&Qr(j.ADD_FORBID_CONTENTS)&&(Gt===il&&(Gt=xa(Gt)),ht(Gt,j.ADD_FORBID_CONTENTS,Bt)),sl&&(z["#text"]=!0),be&&ht(z,["html","head","body"]),z.table&&(ht(z,["tbody"]),delete Ce.tbody),j.TRUSTED_TYPES_POLICY){if(typeof j.TRUSTED_TYPES_POLICY.createHTML!="function")throw vl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof j.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw vl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const Pe=T;T=j.TRUSTED_TYPES_POLICY;try{I=U("")}catch(Ne){throw T=Pe,Ne}}else j.TRUSTED_TYPES_POLICY===null?(T=void 0,I=""):(T===void 0&&(T=re()),T&&typeof I=="string"&&(I=U("")));Ht&&Ht(j),kr=j},Hp=ht({},[...ac,...nc,...dN]),Kp=ht({},[...lc,...cN]),z_=function(j,ue,Pe){return ue.namespaceURI===St?j==="svg":ue.namespaceURI===et?j==="svg"&&(Pe==="annotation-xml"||Re[Pe]):!!Hp[j]},j_=function(j,ue,Pe){return ue.namespaceURI===St?j==="math":ue.namespaceURI===dt?j==="math"&&Fe[Pe]:!!Kp[j]},U_=function(j,ue,Pe){return ue.namespaceURI===dt&&!Fe[Pe]||ue.namespaceURI===et&&!Re[Pe]?!1:!Kp[j]&&(st[j]||!Hp[j])},H_=function(j){let ue=w(j);(!ue||!ue.tagName)&&(ue={namespaceURI:It,tagName:"template"});const Pe=Go(j.tagName),Ne=Go(ue.tagName);return $o[j.namespaceURI]?j.namespaceURI===dt?z_(Pe,ue,Ne):j.namespaceURI===et?j_(Pe,ue,Ne):j.namespaceURI===St?U_(Pe,ue,Ne):!!(Nt==="application/xhtml+xml"&&$o[j.namespaceURI]):!1},cl=function(j){No(t.removed,{element:j});try{w(j).removeChild(j)}catch{if(m(j),!w(j))throw vl("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Wp=function(j,ue,Pe){try{y(j,ue)}catch{try{j.removeAttribute(Pe)}catch{}}},zs=function(j){js(j);const ue=C(j);if(ue){const Ne=[];ar(ue,tt=>{No(Ne,tt)}),ar(Ne,tt=>{try{m(tt)}catch{}})}const Pe=L(j);if(Pe)for(let Ne=Pe.length-1;Ne>=0;--Ne){const tt=Pe[Ne],pt=tt&&tt.name;typeof pt=="string"&&Wp(j,tt,pt)}},Wl=function(j,ue,Pe){if(!Pe)try{Pe=ue.getAttributeNode(j)}catch{Pe=null}No(t.removed,{attribute:Pe||null,from:ue});try{Pe?y(ue,Pe):ue.removeAttribute(j)}catch{try{ue.removeAttribute(j)}catch{}}if(j==="is")if(it||Ke)try{cl(ue)}catch{}else try{ue.setAttribute(j,"")}catch{}},K_=function(j){const ue=L(j);if(ue)for(let Pe=ue.length-1;Pe>=0;--Pe){const Ne=ue[Pe],tt=Ne&&Ne.name;typeof tt!="string"||X[Bt(tt)]||Wp(j,Ne,tt)}},js=function(j){const ue=[j];for(;ue.length>0;){const Pe=ue.pop();q(Pe)===_a.element&&K_(Pe);const Ne=C(Pe);if(Ne)for(let tt=Ne.length-1;tt>=0;--tt)ue.push(Ne[tt])}},Gp=function(j,ue){return nt?j==="patchsrc"?!0:j==="for"&&ue!=="label"&&ue!=="output":!1},W_=function(j){if(!nt)return;const ue=[j];for(;ue.length>0;){const Pe=ue.pop(),Ne=q(Pe);if(Ne===_a.processingInstruction||Ne===_a.comment&&ea(Xh,Pe.data)){try{m(Pe)}catch{}continue}if(Ne===_a.element){const pt=Pe,vt=Bt(K(Pe));try{pt.hasAttribute&&pt.hasAttribute("patchsrc")&&pt.removeAttribute("patchsrc"),pt.hasAttribute&&pt.hasAttribute("for")&&Gp("for",vt)&&pt.removeAttribute("for")}catch{}}const tt=C(Pe);if(tt)for(let pt=tt.length-1;pt>=0;--pt)ue.push(tt[pt])}},Yp=function(j){let ue=null,Pe=null;if(Je)j=""+j;else{const pt=zh(j,/^[\r\n\t ]+/);Pe=pt&&pt[0]}Nt==="application/xhtml+xml"&&It===St&&(j=''+j+"");const Ne=T?U(j):j;if(It===St)try{ue=new c().parseFromString(Ne,Nt)}catch{}if(!ue||!ue.documentElement){ue=Ae.createDocument(It,"template",null);try{ue.documentElement.innerHTML=Kl?I:Ne}catch{}}const tt=ue.body||ue.documentElement;return j&&Pe&&tt.insertBefore(a.createTextNode(Pe),tt.childNodes[0]||null),It===St?le.call(ue,be?"html":"body")[0]:be?ue.documentElement:tt},Jp=function(j){const ue=R?R(j):j.ownerDocument;return xe.call(ue||j,j,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Us=function(j){return j=Bo(j,de," "),j=Bo(j,he," "),j=Bo(j,Z," "),j},ld=function(j){var ue;j.normalize();const Pe=R?R(j):j.ownerDocument,Ne=xe.call(Pe||j,j,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let tt=Ne.nextNode();for(;tt;)tt.data=Us(tt.data),tt=Ne.nextNode();const pt=(ue=j.querySelectorAll)===null||ue===void 0?void 0:ue.call(j,"template");pt&&ar(pt,vt=>{wr(vt.content)&&ld(vt.content)})},Hs=function(j){const ue=M?M(j):null;return typeof ue!="string"||Bt(ue)!=="form"?!1:typeof j.nodeName!="string"||typeof j.textContent!="string"||typeof j.removeChild!="function"||j.attributes!==L(j)||typeof j.removeAttribute!="function"||typeof j.removeAttributeNode!="function"||typeof j.getAttributeNode!="function"||typeof j.setAttribute!="function"||typeof j.namespaceURI!="string"||typeof j.insertBefore!="function"||typeof j.hasChildNodes!="function"||j.nodeType!==O(j)||j.childNodes!==C(j)},wr=function(j){if(!O||typeof j!="object"||j===null)return!1;try{return O(j)===_a.documentFragment}catch{return!1}},So=function(j){if(!O||typeof j!="object"||j===null)return!1;try{return typeof O(j)=="number"}catch{return!1}};function tn(qe,j,ue){qe.length!==0&&ar(qe,Pe=>{Pe.call(t,j,ue,kr)})}const G_=function(j,ue){return!!(nt&&j.hasChildNodes()&&!So(j.firstElementChild)&&ea(Zh,j.textContent)&&ea(Zh,j.innerHTML)||nt&&j.namespaceURI===St&&wN[ue]&&(So(j.firstElementChild)||typeof j.textContent=="string"&&ea($N[ue],j.textContent))||j.nodeType===_a.processingInstruction||nt&&j.nodeType===_a.comment&&ea(Xh,j.data))},Ks=function(j,ue){if(j instanceof RegExp)return ea(j,ue);if(j instanceof Function){for(var Pe=arguments.length,Ne=new Array(Pe>2?Pe-2:0),tt=2;tt=0;--vt){const Rt=j===Pe?v(tt[vt],!0):tt[vt];Ne.insertBefore(Rt,x(j))}}}return cl(j),!0},Zp=function(j,ue,Pe,Ne){return j.length===0?ue:ue===Pe||ue===Ne?xa(ue):ue},$r=function(j,ue){return j===ue||w(j)!==null?!1:(En&&js(j),!0)},Xp=function(j,ue){if(tn(F.beforeSanitizeElements,j,null),$r(j,ue))return!0;if(Hs(j))return cl(j),!0;const Pe=Bt(K(j));if(z=Zp(F.uponSanitizeElement,z,ce,se),tn(F.uponSanitizeElement,j,{tagName:Pe,allowedTags:z}),$r(j,ue))return!0;if(G_(j,Pe))return cl(j),!0;if(Ce[Pe]||!(ie.tagCheck instanceof Function&&ie.tagCheck(Pe))&&!z[Pe]){const Ne=Y_(j,Pe,ue);return Ne===!1&&(tn(F.afterSanitizeElements,j,null),$r(j,ue))?!0:Ne}if(q(j)===_a.element&&!H_(j)||(Pe==="noscript"||Pe==="noembed"||Pe==="noframes")&&ea(xN,j.innerHTML))return cl(j),!0;if(Ze&&j.nodeType===_a.text){const Ne=Us(j.textContent);j.textContent!==Ne&&(No(t.removed,{element:j.cloneNode()}),j.textContent=Ne)}return tn(F.afterSanitizeElements,j,null),$r(j,ue)},Qp=function(j,ue,Pe){if(Ee[ue]||Gp(ue,j)||Xe&&(ue==="id"||ue==="name")&&(Pe in a||Pe in V_))return!1;const Ne=X[ue]||ie.attributeCheck instanceof Function&&ie.attributeCheck(ue,j);return $e&&ea(ge,ue)||Te&&ea(J,ue)?!0:Ne?Me[ue]||ea(P,Bo(Pe,te,""))||(ue==="src"||ue==="xlink:href"||ue==="href")&&j!=="script"&&jh(Pe,"data:")===0&&An[j]||Be&&!ea(ee,Bo(Pe,te,""))?!0:!Pe:em(j)&&Ks(ke.tagNameCheck,j)&&Ks(ke.attributeNameCheck,ue,j)||ue==="is"&&ke.allowCustomizedBuiltInElements&&Ks(ke.tagNameCheck,Pe)},J_=ht({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),em=function(j){return!J_[Go(j)]&&ea($,j)},Z_=function(j,ue,Pe,Ne){if(T&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!Pe)switch(d.getAttributeType(j,ue)){case"TrustedHTML":return U(Ne);case"TrustedScriptURL":return H(Ne)}return Ne},X_=function(j,ue,Pe,Ne){try{return Pe?j.setAttributeNS(Pe,ue,Ne):j.setAttribute(ue,Ne),Hs(j)?(cl(j),!1):!0}catch{return Wl(ue,j),!1}},tm=function(j,ue){if(tn(F.beforeSanitizeAttributes,j,null),$r(j,ue))return;const Pe=j.attributes;if(!Pe||Hs(j))return;X=Zp(F.uponSanitizeAttribute,X,oe,Ue);const Ne={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:X,forceKeepAttr:void 0};let tt=Pe.length;const pt=Bt(j.nodeName);for(;tt--;){const vt=Pe[tt],Rt=vt.name,Ta=vt.namespaceURI,ya=vt.value,Cr=Bt(Rt),od=ya;let sa=Rt==="value"?od:nN(od),am=!1;if(Ne.attrName=Cr,Ne.attrValue=sa,Ne.keepAttr=!0,Ne.forceKeepAttr=void 0,tn(F.uponSanitizeAttribute,j,Ne),sa=Ne.attrValue,Pt&&(Cr==="id"||Cr==="name")&&jh(sa,oa)!==0&&(Wl(Rt,j,vt),sa=oa+sa,am=!0),nt&&ea(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,sa)){Wl(Rt,j,vt);continue}if(Cr==="attributename"&&zh(sa,"href")){Wl(Rt,j,vt);continue}if(!Ne.forceKeepAttr){if(!Ne.keepAttr){Wl(Rt,j,vt);continue}if(!je&&ea(kN,sa)){Wl(Rt,j,vt);continue}if(Ze&&(sa=Us(sa)),!Qp(pt,Cr,sa)){Wl(Rt,j,vt);continue}sa=Z_(pt,Cr,Ta,sa),sa!==od&&X_(j,Rt,Ta,sa)&&am&&Vh(t.removed)}}tn(F.afterSanitizeAttributes,j,null),$r(j,ue)},Ws=function(j){let ue=null;const Pe=Jp(j);for(tn(F.beforeSanitizeShadowDOM,j,null);ue=Pe.nextNode();)if(tn(F.uponSanitizeShadowNode,ue,null),Xp(ue,j),tm(ue,j),wr(ue.content)&&Ws(ue.content),q(ue)===_a.element){const Ne=S(ue);wr(Ne)&&(rd(Ne),Ws(Ne))}tn(F.afterSanitizeShadowDOM,j,null)},rd=function(j){const ue=[{node:j,shadow:null}];for(;ue.length>0;){const Pe=ue.pop();if(Pe.shadow){Ws(Pe.shadow);continue}const Ne=Pe.node,tt=q(Ne)===_a.element,pt=C(Ne);if(pt)for(let vt=pt.length-1;vt>=0;--vt)ue.push({node:pt[vt],shadow:null});if(tt){const vt=M?M(Ne):null;if(typeof vt=="string"&&Bt(vt)==="template"){const Rt=Ne.content;wr(Rt)&&ue.push({node:Rt,shadow:null})}}if(tt){const vt=S(Ne);wr(vt)&&ue.push({node:null,shadow:vt},{node:vt,shadow:null})}}};return t.sanitize=function(qe){let j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ue=null,Pe=null,Ne=null,tt=null;if(Kl=!qe,Kl&&(qe=""),typeof qe!="string"&&!So(qe)&&(qe=iN(qe),typeof qe!="string"))throw vl("dirty is not a string, aborting");if(!t.isSupported)return qe;Oe?(z=se,X=Ue):nd(j),(F.uponSanitizeElement.length>0||F.uponSanitizeAttribute.length>0)&&(z=xa(z)),F.uponSanitizeAttribute.length>0&&(X=xa(X)),t.removed=[];const pt=En&&typeof qe!="string"&&So(qe);if(pt){W_(qe);const Ta=K(qe);if(typeof Ta=="string"){const ya=Bt(Ta);if(!z[ya]||Ce[ya])throw zs(qe),vl("root node is forbidden and cannot be sanitized in-place")}if(Hs(qe))throw zs(qe),vl("root node is clobbered and cannot be sanitized in-place");try{rd(qe)}catch(ya){throw zs(qe),ya}}else if(So(qe))ue=Yp(""),Pe=ue.ownerDocument.importNode(qe,!0),Pe.nodeType===_a.element&&Pe.nodeName==="BODY"||Pe.nodeName==="HTML"?ue=Pe:ue.appendChild(Pe),rd(ue);else{if(!it&&!Ze&&!be&&qe.indexOf("<")===-1)return T&&He?U(qe):qe;if(ue=Yp(qe),!ue)return it?null:He?I:""}ue&&Je&&cl(ue.firstChild);const vt=pt?qe:ue;try{const Ta=Jp(vt);for(;Ne=Ta.nextNode();)Xp(Ne,vt),tm(Ne,vt),wr(Ne.content)&&Ws(Ne.content)}catch(Ta){throw pt&&(zs(qe),ar(t.removed,ya=>{ya.element&&js(ya.element)})),Ta}if(pt){let Ta=!1;if(ar(t.removed,ya=>{ya.element&&(ya.element===qe&&(Ta=!0),js(ya.element))}),Ta)throw vl("a node selected for removal could not be safely returned; refusing to sanitize in place");return Ze&&ld(qe),qe}if(it){if(Ze&&ld(ue),Ke)for(tt=_e.call(ue.ownerDocument);ue.firstChild;)tt.appendChild(ue.firstChild);else tt=ue;return(X.shadowroot||X.shadowrootmode)&&(tt=pe.call(n,tt,!0)),tt}let Rt=be?ue.outerHTML:ue.innerHTML;return be&&z["!doctype"]&&ue.ownerDocument&&ue.ownerDocument.doctype&&ue.ownerDocument.doctype.name&&ea(bN,ue.ownerDocument.doctype.name)&&(Rt=" +`+Rt),Ze&&(Rt=Us(Rt)),T&&He?U(Rt):Rt},t.setConfig=function(){let qe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};nd(qe),Oe=!0,se=z,Ue=X},t.clearConfig=function(){kr=null,Oe=!1,se=null,Ue=null,T=W,I=""},t.isValidAttribute=function(qe,j,ue){kr||nd({});const Pe=Bt(qe),Ne=Bt(j);return Qp(Pe,Ne,ue)},t.addHook=function(qe,j){typeof j=="function"&&fa(F,qe)&&No(F[qe],j)},t.removeHook=function(qe,j){if(fa(F,qe)){if(j!==void 0){const ue=tN(F[qe],j);return ue===-1?void 0:aN(F[qe],ue,1)[0]}return Vh(F[qe])}},t.removeHooks=function(qe){fa(F,qe)&&(F[qe]=[])},t.removeAllHooks=function(){F=Qh()},t}var EN=p_();const AN=["http","https","mailto","tel"],TN=/[\x00-\x20\x7f]+/g,MN=/^([a-z][a-z0-9+.-]*):/i;function m_(e){if(e==null)return!1;const t=e.replace(TN,"");if(t==="")return!1;const a=MN.exec(t);if(a)return AN.includes(a[1].toLowerCase());try{return new URL(t,"https://admin.invalid/"),!0}catch{return!1}}const DN=["script","style","template","noscript","iframe","frame","frameset","object","embed","applet","svg","math","title","head","meta","link","base"],v_=Object.freeze({ALLOWED_TAGS:[...s_],ALLOWED_ATTR:["href"],ALLOW_DATA_ATTR:!1,ALLOW_ARIA_ATTR:!1,ADD_FORBID_CONTENTS:[...DN],KEEP_CONTENT:!0,RETURN_TRUSTED_TYPE:!1}),ON='

a - + +