@bobbykim/manguito-cms-admin 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{ChangePasswordView-B0wg3O_I.js → ChangePasswordView-BILytTnH.js} +1 -1
- package/dist/assets/{ComputedDisplay-C2FpwSB1.js → ComputedDisplay-Df_HvjzX.js} +1 -1
- package/dist/assets/ContentFormView-BsTU-zzP.js +1 -0
- package/dist/assets/{ContentListView-DM4xggDx.js → ContentListView-CWHYBV23.js} +1 -1
- package/dist/assets/{ContentSettingsView-B9UHNleT.js → ContentSettingsView-B9BHm-xg.js} +1 -1
- package/dist/assets/{LoginView-DPpdT3Ro.js → LoginView-8tF3SdN4.js} +1 -1
- package/dist/assets/MediaDetailView-HfRoV5W8.js +1 -0
- package/dist/assets/{MediaLibraryView-Dx9t8r8T.js → MediaLibraryView-COQmdQPB.js} +1 -1
- package/dist/assets/{TaxonomyFormView-CZlOjxOY.js → TaxonomyFormView-BibZ2qjc.js} +1 -1
- package/dist/assets/{TaxonomyListView-Dkga11a3.js → TaxonomyListView-DKnsY_ab.js} +1 -1
- package/dist/assets/{UserFormView-CaOcoKX5.js → UserFormView-DhH0m-Vq.js} +1 -1
- package/dist/assets/{UserListView-B6_Hdemt.js → UserListView-Dk3Jv2Z8.js} +1 -1
- package/dist/assets/{index-s-2X8XCa.js → index-C-iAN6wp.js} +2 -2
- package/dist/assets/{index-B7BOeskw.css → index-ivedPYqQ.css} +1 -1
- package/dist/assets/{useNotification-CEPVkHak.js → useNotification-kY57Myug.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/src/components/fields/__tests__/field-registry.test.ts +128 -0
- package/src/components/fields/field-registry.ts +116 -0
- package/src/views/content/ContentFormView.vue +2 -95
- package/src/views/media/MediaDetailView.vue +27 -5
- package/dist/assets/ContentFormView-D92O0ICh.js +0 -1
- package/dist/assets/MediaDetailView-OUzzhO1B.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LoginView-
|
|
2
|
-
import{$ as e,B as t,D as n,E as r,G as i,H as a,I as o,J as s,K as c,M as l,N as u,O as d,Q as f,R as p,S as m,U as h,V as g,W as _,X as v,Y as ee,Z as y,_ as te,at as b,b as x,c as S,ct as C,d as w,et as T,f as ne,g as E,h as D,i as re,it as ie,j as O,k as ae,l as k,lt as oe,n as se,nt as ce,o as le,ot as ue,p as de,q as fe,r as pe,rt as A,s as j,st as M,t as me,tt as he,u as N,ut as P,v as ge,w as _e,y as ve,z as ye}from"./schema-B-RKX_ep.js";var be=void 0,xe=typeof window<`u`&&window.trustedTypes;if(xe)try{be=xe.createPolicy(`vue`,{createHTML:e=>e})}catch{}var Se=be?e=>be.createHTML(e):e=>e,Ce=`http://www.w3.org/2000/svg`,we=`http://www.w3.org/1998/Math/MathML`,F=typeof document<`u`?document:null,Te=F&&F.createElement(`template`),Ee={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?F.createElementNS(Ce,e):t===`mathml`?F.createElementNS(we,e):n?F.createElement(e,{is:n}):F.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>F.createTextNode(e),createComment:e=>F.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>F.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===a||!(i=i.nextSibling)););else{Te.innerHTML=Se(r===`svg`?`<svg>${e}</svg>`:r===`mathml`?`<math>${e}</math>`:e);let i=Te.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},De=Symbol(`_vtc`);function Oe(e,t,n){let r=e[De];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var ke=Symbol(`_vod`),Ae=Symbol(`_vsh`),je=Symbol(``),Me=/(?:^|;)\s*display\s*:/;function Ne(e,t,n){let r=e.style,i=A(n),a=!1;if(n&&!i){if(t)if(A(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??Fe(r,t,``)}else for(let e in t)n[e]??Fe(r,e,``);for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?Fe(r,i,``):ze(e,i,!A(t)&&t?t[i]:void 0,o)||Fe(r,i,o)}}else if(i){if(t!==n){let e=r[je];e&&(n+=`;`+e),r.cssText=n,a=Me.test(n)}}else t&&e.removeAttribute(`style`);ke in e&&(e[ke]=a?r.display:``,e[Ae]&&(r.display=`none`))}var Pe=/\s*!important$/;function Fe(e,t,n){if(y(n))n.forEach(n=>Fe(e,t,n));else if(n??=``,t.startsWith(`--`))e.setProperty(t,n);else{let r=Re(e,t);Pe.test(n)?e.setProperty(s(r),n.replace(Pe,``),`important`):e[r]=n}}var Ie=[`Webkit`,`Moz`,`ms`],Le={};function Re(e,t){let n=Le[t];if(n)return n;let r=i(t);if(r!==`filter`&&r in e)return Le[t]=r;r=c(r);for(let n=0;n<Ie.length;n++){let i=Ie[n]+r;if(i in e)return Le[t]=i}return t}function ze(e,t,n,r){return e.tagName===`TEXTAREA`&&(t===`width`||t===`height`)&&A(r)&&n===r}var Be=`http://www.w3.org/1999/xlink`;function Ve(e,t,n,r,i,a=ce(t)){r&&t.startsWith(`xlink:`)?n==null?e.removeAttributeNS(Be,t.slice(6,t.length)):e.setAttributeNS(Be,t,n):n==null||a&&!ee(n)?e.removeAttribute(t):e.setAttribute(t,a?``:ie(n)?String(n):n)}function He(e,t,n,r,i){if(t===`innerHTML`||t===`textContent`){n!=null&&(e[t]=t===`innerHTML`?Se(n):n);return}let a=e.tagName;if(t===`value`&&a!==`PROGRESS`&&!a.includes(`-`)){let r=a===`OPTION`?e.getAttribute(`value`)||``:e.value,i=n==null?e.type===`checkbox`?`on`:``:String(n);(r!==i||!(`_value`in e))&&(e.value=i),n??e.removeAttribute(t),e._value=n;return}let o=!1;if(n===``||n==null){let r=typeof e[t];r===`boolean`?n=ee(n):n==null&&r===`string`?(n=``,o=!0):r===`number`&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(i||t)}function I(e,t,n,r){e.addEventListener(t,n,r)}function Ue(e,t,n,r){e.removeEventListener(t,n,r)}var We=Symbol(`_vei`);function Ge(e,t,n,r,i=null){let a=e[We]||(e[We]={}),o=a[t];if(r&&o)o.value=r;else{let[n,s]=Je(t);r?I(e,n,a[t]=Qe(r,i),s):o&&(Ue(e,n,o,s),a[t]=void 0)}}var Ke=/(Once|Passive|Capture)$/,qe=/^on:?(?:Once|Passive|Capture)$/;function Je(e){let t,n;for(;(n=e.match(Ke))&&!qe.test(e);)t||={},e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===`:`?e.slice(3):s(e.slice(2)),t]}var Ye=0,Xe=Promise.resolve(),Ze=()=>Ye||=(Xe.then(()=>Ye=0),Date.now());function Qe(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;let r=n.value;if(y(r)){let n=e.stopImmediatePropagation;e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0};let i=r.slice(),a=[e];for(let n=0;n<i.length&&!e._stopped;n++){let e=i[n];e&&le(e,t,5,a)}}else le(r,t,5,[e])};return n.value=e,n.attached=Ze(),n}var $e=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,et=(t,n,r,a,o,s)=>{let c=o===`svg`;n===`class`?Oe(t,a,c):n===`style`?Ne(t,r,a):T(n)?e(n)||Ge(t,n,r,a,s):(n[0]===`.`?(n=n.slice(1),!0):n[0]===`^`?(n=n.slice(1),!1):tt(t,n,a,c))?(He(t,n,a),!t.tagName.includes(`-`)&&(n===`value`||n===`checked`||n===`selected`)&&Ve(t,n,a,c,s,n!==`value`)):t._isVueCE&&(nt(t,n)||t._def.__asyncLoader&&(/[A-Z]/.test(n)||!A(a)))?He(t,i(n),a,s,n):(n===`true-value`?t._trueValue=a:n===`false-value`&&(t._falseValue=a),Ve(t,n,a,c))};function tt(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&$e(t)&&f(n));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`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return $e(t)&&A(n)?!1:t in e}function nt(e,t){let n=e._def.props;if(!n)return!1;let r=i(t);return Array.isArray(n)?n.some(e=>i(e)===r):Object.keys(n).some(e=>i(e)===r)}var rt=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return y(t)?e=>v(t,e):t};function it(e){e.target.composing=!0}function at(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event(`input`)))}var L=Symbol(`_assign`);function ot(e,t,n){return t&&(e=e.trim()),n&&(e=M(e)),e}var st={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e[L]=rt(i);let a=r||i.props&&i.props.type===`number`;I(e,t?`change`:`input`,t=>{t.target.composing||e[L](ot(e.value,n,a))}),(n||a)&&I(e,`change`,()=>{e.value=ot(e.value,n,a)}),t||(I(e,`compositionstart`,it),I(e,`compositionend`,at),I(e,`change`,at))},mounted(e,{value:t}){e.value=t??``},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:a}},o){if(e[L]=rt(o),e.composing)return;let s=(a||e.type===`number`)&&!/^0\d/.test(e.value)?M(e.value):e.value,c=t??``;if(s===c)return;let l=e.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===e&&e.type!==`range`&&(r&&t===n||i&&e.value.trim()===c)||(e.value=c)}},ct={deep:!0,created(e,{value:t,modifiers:{number:n}},r){let i=he(t);I(e,`change`,()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?M(ut(e)):ut(e));e[L](e.multiple?i?new Set(t):t:t[0]),e._assigning=!0,m(()=>{e._assigning=!1})}),e[L]=rt(r)},mounted(e,{value:t}){lt(e,t)},beforeUpdate(e,t,n){e[L]=rt(n)},updated(e,{value:t}){e._assigning||lt(e,t)}};function lt(e,t){let n=e.multiple,r=y(t);if(!(n&&!r&&!he(t))){for(let i=0,a=e.options.length;i<a;i++){let a=e.options[i],o=ut(a);if(n)if(r){let e=typeof o;e===`string`||e===`number`?a.selected=t.some(e=>String(e)===String(o)):a.selected=ue(t,o)>-1}else a.selected=t.has(o);else if(b(ut(a),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function ut(e){return`_value`in e?e._value:e.value}var dt=[`ctrl`,`shift`,`alt`,`meta`],ft={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)=>dt.some(n=>e[`${n}Key`]&&!t.includes(n))},pt=(e,t)=>{if(!e)return e;let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=((n,...r)=>{for(let e=0;e<t.length;e++){let r=ft[t[e]];if(r&&r(n,t))return}return e(n,...r)}))},mt=fe({patchProp:et},Ee),ht;function gt(){return ht||=ne(mt)}var _t=((...e)=>{let t=gt().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=yt(e);if(!r)return;let i=t._component;!f(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,vt(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t});function vt(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function yt(e){return A(e)?document.querySelector(e):e}var R=typeof document<`u`;function bt(e){return typeof e==`object`||`displayName`in e||`props`in e||`__vccOpts`in e}function xt(e){return e.__esModule||e[Symbol.toStringTag]===`Module`||e.default&&bt(e.default)}var z=Object.assign;function St(e,t){let n={};for(let r in t){let i=t[r];n[r]=B(i)?i.map(e):e(i)}return n}var Ct=()=>{},B=Array.isArray;function wt(e,t){let n={};for(let r in e)n[r]=r in t?t[r]:e[r];return n}var Tt=/#/g,Et=/&/g,Dt=/\//g,Ot=/=/g,kt=/\?/g,At=/\+/g,jt=/%5B/g,Mt=/%5D/g,Nt=/%5E/g,Pt=/%60/g,Ft=/%7B/g,It=/%7C/g,Lt=/%7D/g,Rt=/%20/g;function zt(e){return e==null?``:encodeURI(``+e).replace(It,`|`).replace(jt,`[`).replace(Mt,`]`)}function Bt(e){return zt(e).replace(Ft,`{`).replace(Lt,`}`).replace(Nt,`^`)}function Vt(e){return zt(e).replace(At,`%2B`).replace(Rt,`+`).replace(Tt,`%23`).replace(Et,`%26`).replace(Pt,"`").replace(Ft,`{`).replace(Lt,`}`).replace(Nt,`^`)}function Ht(e){return Vt(e).replace(Ot,`%3D`)}function Ut(e){return zt(e).replace(Tt,`%23`).replace(kt,`%3F`)}function Wt(e){return Ut(e).replace(Dt,`%2F`)}function Gt(e){if(e==null)return null;try{return decodeURIComponent(``+e)}catch{}return``+e}var Kt=/\/$/,qt=e=>e.replace(Kt,``);function Jt(e,t,n=`/`){let r,i={},a=``,o=``,s=t.indexOf(`#`),c=t.indexOf(`?`);return c=s>=0&&c>s?-1:c,c>=0&&(r=t.slice(0,c),a=t.slice(c,s>0?s:t.length),i=e(a.slice(1))),s>=0&&(r||=t.slice(0,s),o=t.slice(s,t.length)),r=tn(r??t,n),{fullPath:r+a+o,path:r,query:i,hash:Gt(o)}}function Yt(e,t){let n=t.query?e(t.query):``;return t.path+(n&&`?`)+n+(t.hash||``)}function Xt(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||`/`}function Zt(e,t,n){let r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&V(t.matched[r],n.matched[i])&&Qt(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function V(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Qt(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!$t(e[n],t[n]))return!1;return!0}function $t(e,t){return B(e)?en(e,t):B(t)?en(t,e):e?.valueOf()===t?.valueOf()}function en(e,t){return B(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e.length===1&&e[0]===t}function tn(e,t){if(e.startsWith(`/`))return e;if(!e)return t;let n=t.split(`/`),r=e.split(`/`),i=r[r.length-1];(i===`..`||i===`.`)&&r.push(``);let a=n.length-1,o,s;for(o=0;o<r.length;o++)if(s=r[o],s!==`.`)if(s===`..`)a>1&&a--;else break;return n.slice(0,a).join(`/`)+`/`+r.slice(o).join(`/`)}var H={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0},nn=function(e){return e.pop=`pop`,e.push=`push`,e}({}),rn=function(e){return e.back=`back`,e.forward=`forward`,e.unknown=``,e}({});function an(e){if(!e)if(R){let t=document.querySelector(`base`);e=t&&t.getAttribute(`href`)||`/`,e=e.replace(/^\w+:\/\/[^\/]+/,``)}else e=`/`;return e[0]!==`/`&&e[0]!==`#`&&(e=`/`+e),qt(e)}var on=/^[^#]+#/;function sn(e,t){return e.replace(on,`#`)+t}function cn(e,t){let n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}var ln=()=>({left:window.scrollX,top:window.scrollY});function un(e){let t;if(`el`in e){let n=e.el,r=typeof n==`string`&&n.startsWith(`#`),i=typeof n==`string`?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=cn(i,e)}else t=e;`scrollBehavior`in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left==null?window.scrollX:t.left,t.top==null?window.scrollY:t.top)}function dn(e,t){return(history.state?history.state.position-t:-1)+e}var fn=new Map;function pn(e,t){fn.set(e,t)}function mn(e){let t=fn.get(e);return fn.delete(e),t}function hn(e){return typeof e==`string`||e&&typeof e==`object`}function gn(e){return typeof e==`string`||typeof e==`symbol`}var U=function(e){return e[e.MATCHER_NOT_FOUND=1]=`MATCHER_NOT_FOUND`,e[e.NAVIGATION_GUARD_REDIRECT=2]=`NAVIGATION_GUARD_REDIRECT`,e[e.NAVIGATION_ABORTED=4]=`NAVIGATION_ABORTED`,e[e.NAVIGATION_CANCELLED=8]=`NAVIGATION_CANCELLED`,e[e.NAVIGATION_DUPLICATED=16]=`NAVIGATION_DUPLICATED`,e}({}),_n=Symbol(``);U.MATCHER_NOT_FOUND,U.NAVIGATION_GUARD_REDIRECT,U.NAVIGATION_ABORTED,U.NAVIGATION_CANCELLED,U.NAVIGATION_DUPLICATED;function W(e,t){return z(Error(),{type:e,[_n]:!0},t)}function G(e,t){return e instanceof Error&&_n in e&&(t==null||!!(e.type&t))}function vn(e){let t={};if(e===``||e===`?`)return t;let n=(e[0]===`?`?e.slice(1):e).split(`&`);for(let e=0;e<n.length;++e){let r=n[e].replace(At,` `),i=r.indexOf(`=`),a=Gt(i<0?r:r.slice(0,i)),o=i<0?null:Gt(r.slice(i+1));if(a in t){let e=t[a];B(e)||(e=t[a]=[e]),e.push(o)}else t[a]=o}return t}function yn(e){let t=``;for(let n in e){let r=e[n];if(n=Ht(n),r==null){r!==void 0&&(t+=(t.length?`&`:``)+n);continue}(B(r)?r.map(e=>e&&Vt(e)):[r&&Vt(r)]).forEach(e=>{e!==void 0&&(t+=(t.length?`&`:``)+n,e!=null&&(t+=`=`+e))})}return t}function bn(e){let t={};for(let n in e){let r=e[n];r!==void 0&&(t[n]=B(r)?r.map(e=>e==null?null:``+e):r==null?r:``+r)}return t}var xn=Symbol(``),Sn=Symbol(``),Cn=Symbol(``),wn=Symbol(``),Tn=Symbol(``);function En(){let e=[];function t(t){return e.push(t),()=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function K(e,t,n,r,i,a=e=>e()){let o=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((s,c)=>{let l=e=>{e===!1?c(W(U.NAVIGATION_ABORTED,{from:n,to:t})):e instanceof Error?c(e):hn(e)?c(W(U.NAVIGATION_GUARD_REDIRECT,{from:t,to:e})):(o&&r.enterCallbacks[i]===o&&typeof e==`function`&&o.push(e),s())},u=a(()=>e.call(r&&r.instances[i],t,n,l)),d=Promise.resolve(u);e.length<3&&(d=d.then(l)),d.catch(e=>c(e))})}function Dn(e,t,n,r,i=e=>e()){let a=[];for(let o of e)for(let e in o.components){let s=o.components[e];if(!(t!==`beforeRouteEnter`&&!o.instances[e]))if(bt(s)){let c=(s.__vccOpts||s)[t];c&&a.push(K(c,n,r,o,e,i))}else{let c=s();a.push(()=>c.then(a=>{if(!a)throw Error(`Couldn't resolve component "${e}" at "${o.path}"`);let s=xt(a)?a.default:a;o.mods[e]=a,o.components[e]=s;let c=(s.__vccOpts||s)[t];return c&&K(c,n,r,o,e,i)()}))}}return a}function On(e,t){let n=[],r=[],i=[],a=Math.max(t.matched.length,e.matched.length);for(let o=0;o<a;o++){let a=t.matched[o];a&&(e.matched.find(e=>V(e,a))?r.push(a):n.push(a));let s=e.matched[o];s&&(t.matched.find(e=>V(e,s))||i.push(s))}return[n,r,i]}var kn=()=>location.protocol+`//`+location.host;function An(e,t){let{pathname:n,search:r,hash:i}=t,a=e.indexOf(`#`);if(a>-1){let t=i.includes(e.slice(a))?e.slice(a).length:1,n=i.slice(t);return n[0]!==`/`&&(n=`/`+n),Xt(n,``)}return Xt(n,e)+r+i}function jn(e,t,n,r){let i=[],a=[],o=null,s=({state:a})=>{let s=An(e,location),c=n.value,l=t.value,u=0;if(a){if(n.value=s,t.value=a,o&&o===c){o=null;return}u=l?a.position-l.position:0}else r(s);i.forEach(e=>{e(n.value,c,{delta:u,type:nn.pop,direction:u?u>0?rn.forward:rn.back:rn.unknown})})};function c(){o=n.value}function l(e){i.push(e);let t=()=>{let t=i.indexOf(e);t>-1&&i.splice(t,1)};return a.push(t),t}function u(){if(document.visibilityState===`hidden`){let{history:e}=window;if(!e.state)return;e.replaceState(z({},e.state,{scroll:ln()}),``)}}function d(){for(let e of a)e();a=[],window.removeEventListener(`popstate`,s),window.removeEventListener(`pagehide`,u),document.removeEventListener(`visibilitychange`,u)}return window.addEventListener(`popstate`,s),window.addEventListener(`pagehide`,u),document.addEventListener(`visibilitychange`,u),{pauseListeners:c,listen:l,destroy:d}}function Mn(e,t,n,r=!1,i=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:i?ln():null}}function Nn(e){let{history:t,location:n}=window,r={value:An(e,n)},i={value:t.state};i.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(r,a,o){let s=e.indexOf(`#`),c=s>-1?(n.host&&document.querySelector(`base`)?e:e.slice(s))+r:kn()+e+r;try{t[o?`replaceState`:`pushState`](a,``,c),i.value=a}catch(e){console.error(e),n[o?`replace`:`assign`](c)}}function o(e,n){a(e,z({},t.state,Mn(i.value.back,e,i.value.forward,!0),n,{position:i.value.position}),!0),r.value=e}function s(e,n){let o=z({},i.value,t.state,{forward:e,scroll:ln()});a(o.current,o,!0),a(e,z({},Mn(r.value,e,null),{position:o.position+1},n),!1),r.value=e}return{location:r,state:i,push:s,replace:o}}function Pn(e){e=an(e);let t=Nn(e),n=jn(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}let i=z({location:``,base:e,go:r,createHref:sn.bind(null,e)},t,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>t.state.value}),i}var q=function(e){return e[e.Static=0]=`Static`,e[e.Param=1]=`Param`,e[e.Group=2]=`Group`,e}({}),J=function(e){return e[e.Static=0]=`Static`,e[e.Param=1]=`Param`,e[e.ParamRegExp=2]=`ParamRegExp`,e[e.ParamRegExpEnd=3]=`ParamRegExpEnd`,e[e.EscapeNext=4]=`EscapeNext`,e}(J||{}),Fn={type:q.Static,value:``},In=/[a-zA-Z0-9_]/;function Ln(e){if(!e)return[[]];if(e===`/`)return[[Fn]];if(!e.startsWith(`/`))throw Error(`Invalid path "${e}"`);function t(e){throw Error(`ERR (${n})/"${l}": ${e}`)}let n=J.Static,r=n,i=[],a;function o(){a&&i.push(a),a=[]}let s=0,c,l=``,u=``;function d(){l&&=(n===J.Static?a.push({type:q.Static,value:l}):n===J.Param||n===J.ParamRegExp||n===J.ParamRegExpEnd?(a.length>1&&(c===`*`||c===`+`)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:q.Param,value:l,regexp:u,repeatable:c===`*`||c===`+`,optional:c===`*`||c===`?`})):t(`Invalid state to consume buffer`),``)}function f(){l+=c}for(;s<e.length;){if(c=e[s++],c===`\\`&&n!==J.ParamRegExp){r=n,n=J.EscapeNext;continue}switch(n){case J.Static:c===`/`?(l&&d(),o()):c===`:`?(d(),n=J.Param):f();break;case J.EscapeNext:f(),n=r;break;case J.Param:c===`(`?n=J.ParamRegExp:In.test(c)?f():(d(),n=J.Static,c!==`*`&&c!==`?`&&c!==`+`&&s--);break;case J.ParamRegExp:c===`)`?u[u.length-1]==`\\`?u=u.slice(0,-1)+c:n=J.ParamRegExpEnd:u+=c;break;case J.ParamRegExpEnd:d(),n=J.Static,c!==`*`&&c!==`?`&&c!==`+`&&s--,u=``;break;default:t(`Unknown state`);break}}return n===J.ParamRegExp&&t(`Unfinished custom RegExp for param "${l}"`),d(),o(),i}var Rn=`[^/]+?`,zn={sensitive:!1,strict:!1,start:!0,end:!0},Y=function(e){return e[e._multiplier=10]=`_multiplier`,e[e.Root=90]=`Root`,e[e.Segment=40]=`Segment`,e[e.SubSegment=30]=`SubSegment`,e[e.Static=40]=`Static`,e[e.Dynamic=20]=`Dynamic`,e[e.BonusCustomRegExp=10]=`BonusCustomRegExp`,e[e.BonusWildcard=-50]=`BonusWildcard`,e[e.BonusRepeatable=-20]=`BonusRepeatable`,e[e.BonusOptional=-8]=`BonusOptional`,e[e.BonusStrict=.7000000000000001]=`BonusStrict`,e[e.BonusCaseSensitive=.25]=`BonusCaseSensitive`,e}(Y||{}),Bn=/[.+*?^${}()[\]/\\]/g;function Vn(e,t){let n=z({},zn,t),r=[],i=n.start?`^`:``,a=[];for(let t of e){let e=t.length?[]:[Y.Root];n.strict&&!t.length&&(i+=`/`);for(let r=0;r<t.length;r++){let o=t[r],s=Y.Segment+(n.sensitive?Y.BonusCaseSensitive:0);if(o.type===q.Static)r||(i+=`/`),i+=o.value.replace(Bn,`\\$&`),s+=Y.Static;else if(o.type===q.Param){let{value:e,repeatable:n,optional:c,regexp:l}=o;a.push({name:e,repeatable:n,optional:c});let u=l||Rn;if(u!==Rn){s+=Y.BonusCustomRegExp;try{`${u}`}catch(t){throw Error(`Invalid custom RegExp for param "${e}" (${u}): `+t.message)}}let d=n?`((?:${u})(?:/(?:${u}))*)`:`(${u})`;r||(d=c&&t.length<2?`(?:/${d})`:`/`+d),c&&(d+=`?`),i+=d,s+=Y.Dynamic,c&&(s+=Y.BonusOptional),n&&(s+=Y.BonusRepeatable),u===`.*`&&(s+=Y.BonusWildcard)}e.push(s)}r.push(e)}if(n.strict&&n.end){let e=r.length-1;r[e][r[e].length-1]+=Y.BonusStrict}n.strict||(i+=`/?`),n.end?i+=`$`:n.strict&&!i.endsWith(`/`)&&(i+=`(?:/|$)`);let o=new RegExp(i,n.sensitive?``:`i`);function s(e){let t=e.match(o),n={};if(!t)return null;for(let e=1;e<t.length;e++){let r=t[e]||``,i=a[e-1];n[i.name]=r&&i.repeatable?r.split(`/`):r}return n}function c(t){let n=``,r=!1;for(let i of e){(!r||!n.endsWith(`/`))&&(n+=`/`),r=!1;for(let e of i)if(e.type===q.Static)n+=e.value;else if(e.type===q.Param){let{value:a,repeatable:o,optional:s}=e,c=a in t?t[a]:``;if(B(c)&&!o)throw Error(`Provided param "${a}" is an array but it is not repeatable (* or + modifiers)`);let l=B(c)?c.join(`/`):c;if(!l)if(s)i.length<2&&(n.endsWith(`/`)?n=n.slice(0,-1):r=!0);else throw Error(`Missing required param "${a}"`);n+=l}}return n||`/`}return{re:o,score:r,keys:a,parse:s,stringify:c}}function Hn(e,t){let n=0;for(;n<e.length&&n<t.length;){let r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===Y.Static+Y.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===Y.Static+Y.Segment?1:-1:0}function Un(e,t){let n=0,r=e.score,i=t.score;for(;n<r.length&&n<i.length;){let e=Hn(r[n],i[n]);if(e)return e;n++}if(Math.abs(i.length-r.length)===1){if(Wn(r))return 1;if(Wn(i))return-1}return i.length-r.length}function Wn(e){let t=e[e.length-1];return e.length>0&&t[t.length-1]<0}var Gn={strict:!1,end:!0,sensitive:!1};function Kn(e,t,n){let r=z(Vn(Ln(e.path),n),{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function qn(e,t){let n=[],r=new Map;t=wt(Gn,t);function i(e){return r.get(e)}function a(e,n,r){let i=!r,s=Yn(e);s.aliasOf=r&&r.record;let l=wt(t,e),u=[s];if(`alias`in e){let t=typeof e.alias==`string`?[e.alias]:e.alias;for(let e of t)u.push(Yn(z({},s,{components:r?r.record.components:s.components,path:e,aliasOf:r?r.record:s})))}let d,f;for(let t of u){let{path:u}=t;if(n&&u[0]!==`/`){let e=n.record.path,r=e[e.length-1]===`/`?``:`/`;t.path=n.record.path+(u&&r+u)}if(d=Kn(t,n,l),r?r.alias.push(d):(f||=d,f!==d&&f.alias.push(d),i&&e.name&&!Zn(d)&&o(e.name)),tr(d)&&c(d),s.children){let e=s.children;for(let t=0;t<e.length;t++)a(e[t],d,r&&r.children[t])}r||=d}return f?()=>{o(f)}:Ct}function o(e){if(gn(e)){let t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(o),t.alias.forEach(o))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(o),e.alias.forEach(o))}}function s(){return n}function c(e){let t=$n(e,n);n.splice(t,0,e),e.record.name&&!Zn(e)&&r.set(e.record.name,e)}function l(e,t){let i,a={},o,s;if(`name`in e&&e.name){if(i=r.get(e.name),!i)throw W(U.MATCHER_NOT_FOUND,{location:e});s=i.record.name,a=z(Jn(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&Jn(e.params,i.keys.map(e=>e.name))),o=i.stringify(a)}else if(e.path!=null)o=e.path,i=n.find(e=>e.re.test(o)),i&&(a=i.parse(o),s=i.record.name);else{if(i=t.name?r.get(t.name):n.find(e=>e.re.test(t.path)),!i)throw W(U.MATCHER_NOT_FOUND,{location:e,currentLocation:t});s=i.record.name,a=z({},t.params,e.params),o=i.stringify(a)}let c=[],l=i;for(;l;)c.unshift(l.record),l=l.parent;return{name:s,path:o,params:a,matched:c,meta:Qn(c)}}e.forEach(e=>a(e));function u(){n.length=0,r.clear()}return{addRoute:a,resolve:l,removeRoute:o,clearRoutes:u,getRoutes:s,getRecordMatcher:i}}function Jn(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function Yn(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Xn(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 Xn(e){let t={},n=e.props||!1;if(`component`in e)t.default=n;else for(let r in e.components)t[r]=typeof n==`object`?n[r]:n;return t}function Zn(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Qn(e){return e.reduce((e,t)=>z(e,t.meta),{})}function $n(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1;Un(e,t[i])<0?r=i:n=i+1}let i=er(e);return i&&(r=t.lastIndexOf(i,r-1)),r}function er(e){let t=e;for(;t=t.parent;)if(tr(t)&&Un(e,t)===0)return t}function tr({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function nr(e){let t=x(Cn),n=x(wn),r=j(()=>{let n=_(e.to);return t.resolve(n)}),i=j(()=>{let{matched:e}=r.value,{length:t}=e,i=e[t-1],a=n.matched;if(!i||!a.length)return-1;let o=a.findIndex(V.bind(null,i));if(o>-1)return o;let s=sr(e[t-2]);return t>1&&sr(i)===s&&a[a.length-1].path!==s?a.findIndex(V.bind(null,e[t-2])):o}),a=j(()=>i.value>-1&&or(n.params,r.value.params)),o=j(()=>i.value>-1&&i.value===n.matched.length-1&&Qt(n.params,r.value.params));function s(n={}){if(ar(n)){let n=t[_(e.replace)?`replace`:`push`](_(e.to)).catch(Ct);return e.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>n),n}return Promise.resolve()}return{route:r,href:j(()=>r.value.href),isActive:a,isExactActive:o,navigate:s}}function rr(e){return e.length===1?e[0]:e}var ir=E({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:nr,setup(e,{slots:t}){let n=ye(nr(e)),{options:r}=x(Cn),i=j(()=>({[cr(e.activeClass,r.linkActiveClass,`router-link-active`)]:n.isActive,[cr(e.exactActiveClass,r.linkExactActiveClass,`router-link-exact-active`)]:n.isExactActive}));return()=>{let r=t.default&&rr(t.default(n));return e.custom?r:ge(`a`,{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},r)}}});function ar(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){let t=e.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function or(e,t){for(let n in t){let r=t[n],i=e[n];if(typeof r==`string`){if(r!==i)return!1}else if(!B(i)||i.length!==r.length||r.some((e,t)=>e.valueOf()!==i[t].valueOf()))return!1}return!0}function sr(e){return e?e.aliasOf?e.aliasOf.path:e.path:``}var cr=(e,t,n)=>e??t??n,lr=E({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(e,{attrs:r,slots:i}){let a=x(Tn),o=j(()=>e.route||a.value),s=x(Sn,0),c=j(()=>{let e=_(s),{matched:t}=o.value,n;for(;(n=t[e])&&!n.components;)e++;return e}),l=j(()=>o.value.matched[c.value]);n(Sn,j(()=>c.value+1)),n(xn,l),n(Tn,o);let u=t();return O(()=>[u.value,l.value,e.name],([e,t,n],[r,i,a])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),e&&t&&(!i||!V(t,i)||!r)&&(t.enterCallbacks[n]||[]).forEach(t=>t(e))},{flush:`post`}),()=>{let t=o.value,n=e.name,a=l.value,s=a&&a.components[n];if(!s)return ur(i.default,{Component:s,route:t});let c=a.props[n],d=ge(s,z({},c?c===!0?t.params:typeof c==`function`?c(t):c:null,r,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(a.instances[n]=null)},ref:u}));return ur(i.default,{Component:d,route:t})||d}}});function ur(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}var dr=lr;function fr(e){let t=qn(e.routes,e),n=e.parseQuery||vn,r=e.stringifyQuery||yn,i=e.history,o=En(),s=En(),c=En(),l=a(H),u=H;R&&e.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let d=St.bind(null,e=>``+e),f=St.bind(null,Wt),p=St.bind(null,Gt);function h(e,n){let r,i;return gn(e)?(r=t.getRecordMatcher(e),i=n):i=e,t.addRoute(i,r)}function v(e){let n=t.getRecordMatcher(e);n&&t.removeRoute(n)}function ee(){return t.getRoutes().map(e=>e.record)}function y(e){return!!t.getRecordMatcher(e)}function te(e,a){if(a=z({},a||l.value),typeof e==`string`){let r=Jt(n,e,a.path),o=t.resolve({path:r.path},a),s=i.createHref(r.fullPath);return z(r,o,{params:p(o.params),hash:Gt(r.hash),redirectedFrom:void 0,href:s})}let o;if(e.path!=null)o=z({},e,{path:Jt(n,e.path,a.path).path});else{let t=z({},e.params);for(let e in t)t[e]??delete t[e];o=z({},e,{params:f(t)}),a.params=f(a.params)}let s=t.resolve(o,a),c=e.hash||``;s.params=d(p(s.params));let u=Yt(r,z({},e,{hash:Bt(c),path:s.path})),m=i.createHref(u);return z({fullPath:u,hash:c,query:r===yn?bn(e.query):e.query||{}},s,{redirectedFrom:void 0,href:m})}function b(e){return typeof e==`string`?Jt(n,e,l.value.path):z({},e)}function x(e,t){if(u!==e)return W(U.NAVIGATION_CANCELLED,{from:t,to:e})}function S(e){return T(e)}function C(e){return S(z(b(e),{replace:!0}))}function w(e,t){let n=e.matched[e.matched.length-1];if(n&&n.redirect){let{redirect:r}=n,i=typeof r==`function`?r(e,t):r;return typeof i==`string`&&(i=i.includes(`?`)||i.includes(`#`)?i=b(i):{path:i},i.params={}),z({query:e.query,hash:e.hash,params:i.path==null?e.params:{}},i)}}function T(e,t){let n=u=te(e),i=l.value,a=e.state,o=e.force,s=e.replace===!0,c=w(n,i);if(c)return T(z(b(c),{state:typeof c==`object`?z({},a,c.state):a,force:o,replace:s}),t||n);let d=n;d.redirectedFrom=t;let f;return!o&&Zt(r,i,n)&&(f=W(U.NAVIGATION_DUPLICATED,{to:d,from:i}),de(i,i,!0,!1)),(f?Promise.resolve(f):D(d,i)).catch(e=>G(e)?G(e,U.NAVIGATION_GUARD_REDIRECT)?e:ue(e):ce(e,d,i)).then(e=>{if(e){if(G(e,U.NAVIGATION_GUARD_REDIRECT))return T(z({replace:s},b(e.to),{state:typeof e.to==`object`?z({},a,e.to.state):a,force:o}),t||d)}else e=ie(d,i,!0,s,a);return re(d,i,e),e})}function ne(e,t){let n=x(e,t);return n?Promise.reject(n):Promise.resolve()}function E(e){let t=A.values().next().value;return t&&typeof t.runWithContext==`function`?t.runWithContext(e):e()}function D(e,t){let n,[r,i,a]=On(e,t);n=Dn(r.reverse(),`beforeRouteLeave`,e,t);for(let i of r)i.leaveGuards.forEach(r=>{n.push(K(r,e,t))});let c=ne.bind(null,e,t);return n.push(c),M(n).then(()=>{n=[];for(let r of o.list())n.push(K(r,e,t));return n.push(c),M(n)}).then(()=>{n=Dn(i,`beforeRouteUpdate`,e,t);for(let r of i)r.updateGuards.forEach(r=>{n.push(K(r,e,t))});return n.push(c),M(n)}).then(()=>{n=[];for(let r of a)if(r.beforeEnter)if(B(r.beforeEnter))for(let i of r.beforeEnter)n.push(K(i,e,t));else n.push(K(r.beforeEnter,e,t));return n.push(c),M(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=Dn(a,`beforeRouteEnter`,e,t,E),n.push(c),M(n))).then(()=>{n=[];for(let r of s.list())n.push(K(r,e,t));return n.push(c),M(n)}).catch(e=>G(e,U.NAVIGATION_CANCELLED)?e:Promise.reject(e))}function re(e,t,n){c.list().forEach(r=>E(()=>r(e,t,n)))}function ie(e,t,n,r,a){let o=x(e,t);if(o)return o;let s=t===H,c=R?history.state:{};n&&(r||s?i.replace(e.fullPath,z({scroll:s&&c&&c.scroll},a)):i.push(e.fullPath,a)),l.value=e,de(e,t,n,s),ue()}let O;function ae(){O||=i.listen((e,t,n)=>{if(!j.listening)return;let r=te(e),a=w(r,j.currentRoute.value);if(a){T(z(a,{replace:!0,force:!0}),r).catch(Ct);return}u=r;let o=l.value;R&&pn(dn(o.fullPath,n.delta),ln()),D(r,o).catch(e=>G(e,U.NAVIGATION_ABORTED|U.NAVIGATION_CANCELLED)?e:G(e,U.NAVIGATION_GUARD_REDIRECT)?(T(z(b(e.to),{force:!0}),r).then(e=>{G(e,U.NAVIGATION_ABORTED|U.NAVIGATION_DUPLICATED)&&!n.delta&&n.type===nn.pop&&i.go(-1,!1)}).catch(Ct),Promise.reject()):(n.delta&&i.go(-n.delta,!1),ce(e,r,o))).then(e=>{e||=ie(r,o,!1),e&&(n.delta&&!G(e,U.NAVIGATION_CANCELLED)?i.go(-n.delta,!1):n.type===nn.pop&&G(e,U.NAVIGATION_ABORTED|U.NAVIGATION_DUPLICATED)&&i.go(-1,!1)),re(r,o,e)}).catch(Ct)})}let k=En(),oe=En(),se;function ce(e,t,n){ue(e);let r=oe.list();return r.length?r.forEach(r=>r(e,t,n)):console.error(e),Promise.reject(e)}function le(){return se&&l.value!==H?Promise.resolve():new Promise((e,t)=>{k.add([e,t])})}function ue(e){return se||(se=!e,ae(),k.list().forEach(([t,n])=>e?n(e):t()),k.reset()),e}function de(t,n,r,i){let{scrollBehavior:a}=e;if(!R||!a)return Promise.resolve();let o=!r&&mn(dn(t.fullPath,0))||(i||!r)&&history.state&&history.state.scroll||null;return m().then(()=>a(t,n,o)).then(e=>e&&un(e)).catch(e=>ce(e,t,n))}let fe=e=>i.go(e),pe,A=new Set,j={currentRoute:l,listening:!0,addRoute:h,removeRoute:v,clearRoutes:t.clearRoutes,hasRoute:y,getRoutes:ee,resolve:te,options:e,push:S,replace:C,go:fe,back:()=>fe(-1),forward:()=>fe(1),beforeEach:o.add,beforeResolve:s.add,afterEach:c.add,onError:oe.add,isReady:le,install(e){e.component(`RouterLink`,ir),e.component(`RouterView`,dr),e.config.globalProperties.$router=j,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>_(l)}),R&&!pe&&l.value===H&&(pe=!0,S(i.location).catch(e=>{}));let t={};for(let e in H)Object.defineProperty(t,e,{get:()=>l.value[e],enumerable:!0});e.provide(Cn,j),e.provide(wn,g(t)),e.provide(Tn,l);let n=e.unmount;A.add(e),e.unmount=function(){A.delete(e),A.size<1&&(u=H,O&&O(),O=null,l.value=H,pe=!1,se=!1),n()}}};function M(e){return e.reduce((e,t)=>e.then(()=>E(t)),Promise.resolve())}return j}function pr(){return x(Cn)}function mr(e){return x(wn)}var hr=`manguito_auth`;function gr(){try{let e=localStorage.getItem(hr);return e?JSON.parse(e):null}catch{return null}}var X=pe(`auth`,()=>{let e=me(),n=gr(),r=t(n?.id??null),i=t(n?.email??null),a=t(n?.role??null),o=t(n?.mustChangePassword??!1),s=j(()=>r.value!==null),c=j(()=>a.value?e.getRoleByName(a.value)?.permissions??[]:[]),l=j(()=>a.value?e.getRoleByName(a.value)?.hierarchy_level??1/0:1/0);function u(e){r.value=e.id,i.value=e.email,a.value=e.role,o.value=e.mustChangePassword??!1;try{localStorage.setItem(hr,JSON.stringify({id:e.id,email:e.email,role:e.role,mustChangePassword:e.mustChangePassword??!1}))}catch{}}function d(){r.value=null,i.value=null,a.value=null,o.value=!1;try{localStorage.removeItem(hr)}catch{}}function f(e){return c.value.includes(e)}return{id:r,email:i,role:a,mustChangePassword:o,isAuthenticated:s,permissions:c,hierarchyLevel:l,setUser:u,clear:d,hasPermission:f}});function _r(e){return o()?(p(e),!0):!1}var vr=new WeakMap,yr=(...e)=>{let t=e[0],n=te()?.proxy;if(n==null&&!ve())throw Error(`injectLocal must be called in setup`);return n&&vr.has(n)&&t in vr.get(n)?vr.get(n)[t]:x(...e)},br=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;var xr=Object.prototype.toString,Sr=e=>xr.call(e)===`[object Object]`,Z=()=>{},Cr=wr();function wr(){return br&&(window==null?void 0:window.navigator)?.userAgent&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||(window==null?void 0:window.navigator)?.maxTouchPoints>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function Tr(e,t){function n(...n){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(i)})}return n}function Er(e,t={}){let n,r,i=Z,a=e=>{clearTimeout(e),i(),i=Z},o;return s=>{let c=h(e),l=h(t.maxWait);return n&&a(n),c<=0||l!==void 0&&l<=0?(r&&=(a(r),null),Promise.resolve(s())):new Promise((e,u)=>{i=t.rejectOnCancel?u:e,o=s,l&&!r&&(r=setTimeout(()=>{n&&a(n),r=null,e(o())},l)),n=setTimeout(()=>{r&&a(r),r=null,e(s())},c)})}}function Dr(e){return e.endsWith(`rem`)?Number.parseFloat(e)*16:Number.parseFloat(e)}function Or(e){return Array.isArray(e)?e:[e]}function kr(e,t=200,n={}){return Tr(Er(t,n),e)}function Ar(e,t,n){return O(e,t,{...n,immediate:!0})}var jr=br?window:void 0;br&&window.document,br&&window.navigator,br&&window.location;function Mr(e){let t=h(e);return t?.$el??t}function Nr(...e){let t=[],n=()=>{t.forEach(e=>e()),t.length=0},r=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),i=j(()=>{let t=Or(h(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0}),a=Ar(()=>[i.value?.map(e=>Mr(e))??[jr].filter(e=>e!=null),Or(h(i.value?e[1]:e[0])),Or(_(i.value?e[2]:e[1])),h(i.value?e[3]:e[2])],([e,i,a,o])=>{if(n(),!e?.length||!i?.length||!a?.length)return;let s=Sr(o)?{...o}:o;t.push(...e.flatMap(e=>i.flatMap(t=>a.map(n=>r(e,t,n,s)))))},{flush:`post`});return _r(n),()=>{a(),n()}}var Pr=!1;function Fr(e,t,n={}){let{window:r=jr,ignore:i=[],capture:a=!0,detectIframe:o=!1,controls:s=!1}=n;if(!r)return s?{stop:Z,cancel:Z,trigger:Z}:Z;if(Cr&&!Pr){Pr=!0;let e={passive:!0};Array.from(r.document.body.children).forEach(t=>Nr(t,`click`,Z,e)),Nr(r.document.documentElement,`click`,Z,e)}let c=!0,l=e=>h(i).some(t=>{if(typeof t==`string`)return Array.from(r.document.querySelectorAll(t)).some(t=>t===e.target||e.composedPath().includes(t));{let n=Mr(t);return n&&(e.target===n||e.composedPath().includes(n))}});function u(e){let t=h(e);return t&&t.$.subTree.shapeFlag===16}function d(e,t){let n=h(e),r=n.$.subTree&&n.$.subTree.children;return r==null||!Array.isArray(r)?!1:r.some(e=>e.el===t.target||t.composedPath().includes(e.el))}let f=n=>{let r=Mr(e);if(n.target!=null&&!(!(r instanceof Element)&&u(e)&&d(e,n))&&!(!r||r===n.target||n.composedPath().includes(r))){if(`detail`in n&&n.detail===0&&(c=!l(n)),!c){c=!0;return}t(n)}},p=!1,m=[Nr(r,`click`,e=>{p||(p=!0,setTimeout(()=>{p=!1},0),f(e))},{passive:!0,capture:a}),Nr(r,`pointerdown`,t=>{let n=Mr(e);c=!l(t)&&!!(n&&!t.composedPath().includes(n))},{passive:!0}),o&&Nr(r,`blur`,n=>{setTimeout(()=>{let i=Mr(e);r.document.activeElement?.tagName===`IFRAME`&&!i?.contains(r.document.activeElement)&&t(n)},0)},{passive:!0})].filter(Boolean),g=()=>m.forEach(e=>e());return s?{stop:g,cancel:()=>{c=!1},trigger:e=>{c=!0,f(e),c=!1}}:g}function Ir(){let e=a(!1),t=te();return t&&_e(()=>{e.value=!0},t),e}function Lr(e){let t=Ir();return j(()=>(t.value,!!e()))}var Rr=Symbol(`vueuse-ssr-width`);function zr(){let e=ve()?yr(Rr,null):null;return typeof e==`number`?e:void 0}function Br(e,t={}){let{window:n=jr,ssrWidth:r=zr()}=t,i=Lr(()=>n&&`matchMedia`in n&&typeof n.matchMedia==`function`),o=a(typeof r==`number`),s=a(),c=a(!1);return l(()=>{if(o.value){o.value=!i.value;let t=h(e).split(`,`);c.value=t.some(e=>{let t=e.includes(`not all`),n=e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),i=e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),a=!!(n||i);return n&&a&&(a=r>=Dr(n[1])),i&&a&&(a=r<=Dr(i[1])),t?!a:a});return}i.value&&(s.value=n.matchMedia(h(e)),c.value=s.value.matches)}),Nr(s,`change`,e=>{c.value=e.matches},{passive:!0}),j(()=>c.value)}var Vr=3,Hr=4e3,Q=pe(`ui`,()=>{let e=t([]),n=t(!1),r=Br(`(max-width: 820px)`),i=t(!1),a=t(null),o=t(0),s=t(!1),c=t(`Manguito CMS`);function l(t,n,r=Hr){e.value.length>=Vr&&e.value.shift();let i=crypto.randomUUID();e.value.push({id:i,variant:t,message:n,duration:r}),r!==null&&setTimeout(()=>u(i),r)}function u(t){let n=e.value.findIndex(e=>e.id===t);n!==-1&&e.value.splice(n,1)}function d(e){o.value=e}function f(e){s.value=e}function p(e){c.value=e}function m(){r.value?i.value=!i.value:n.value=!n.value}function h(){i.value=!1}return{toasts:e,sidebarCollapsed:n,isMobile:r,mobileNavOpen:i,activeModal:a,maxFileSize:o,presignedUploads:s,cmsName:c,addToast:l,removeToast:u,setMaxFileSize:d,setPresignedUploads:f,setCmsName:p,toggleSidebar:m,closeMobileNav:h}}),Ur={key:0,class:`fixed inset-0 flex items-center justify-center bg-white`,"aria-label":`Loading`},Wr=E({__name:`App`,setup(e){let n=t(!0),i=pr(),a=X(),o=me(),s=Q();async function c(e=!0){let t=await fetch(`/admin/api/config`,{credentials:`include`});if(t.status===401){e&&(a.clear(),i.push(`/admin/login`));return}if(t.ok){let e=(await t.json()).data,n=e.all_roles??[];o.setRoles(n.map(e=>({name:e.name,label:e.label,hierarchy_level:e.hierarchy_level,is_system:e.is_system,permissions:e.permissions}))),e.user&&a.setUser({id:e.user.id,email:e.user.email,role:e.user.role,mustChangePassword:e.user.must_change_password}),s.setCmsName(e.cms_name),e.media?.max_file_size&&s.setMaxFileSize(e.media.max_file_size),s.setPresignedUploads(e.media?.presigned_uploads??!1);let r=await fetch(`/admin/api/schema`,{credentials:`include`});if(r.ok){let e=await r.json();o.setFromApiSchema(e.data)}a.mustChangePassword&&i.push(`/admin/change-password`)}}return _e(async()=>{if(!a.isAuthenticated){n.value=!1;return}try{await c()}finally{n.value=!1}}),O(()=>s.cmsName,e=>{document.title=e},{immediate:!0}),O(()=>a.isAuthenticated,async(e,t)=>{if(e&&!t){n.value=!0;try{await c(!1)}catch{}finally{n.value=!1}}}),(e,t)=>{let i=ae(`router-view`);return n.value?(r(),w(`div`,Ur,[...t[0]||=[S(`div`,{class:`h-10 w-10 animate-spin rounded-full border-4 border-gray-200 border-t-gray-600`,role:`status`},null,-1)]])):(r(),k(i,{key:1}))}}});function Gr(){let e=X(),t=me();function n(t){return e.permissions.includes(t)}function r(){return t.roles.filter(t=>t.hierarchy_level>e.hierarchyLevel&&t.name!==`admin`)}return{can:n,rolesBelow:r}}function Kr(){let e=pr(),t=X();async function n(i,a,o=!1){let s=await fetch(`/admin/api${i}`,{...a,credentials:`include`,headers:{"Content-Type":`application/json`,...a?.headers}});return s.status===401&&!o?await r()?n(i,a,!0):(t.clear(),e.push(`/admin/login`),{ok:!1,error:{code:`UNAUTHORIZED`,message:`Session expired.`}}):s.json()}async function r(){return(await fetch(`/admin/api/auth/refresh`,{method:`POST`,credentials:`include`})).ok}function i(e){return n(e,{method:`GET`})}function a(e,t){return n(e,{method:`POST`,body:JSON.stringify(t)})}function o(e,t){return n(e,{method:`PATCH`,body:JSON.stringify(t)})}function s(e,t){return n(e,{method:`PUT`,body:JSON.stringify(t)})}function c(e){return n(e,{method:`DELETE`})}return{get:i,post:a,patch:o,put:s,del:c}}var qr={class:`flex items-center gap-[11px] px-[17px] pb-[14px] pt-[18px]`},Jr={key:0,class:`overflow-hidden`},Yr={class:`whitespace-nowrap text-[15px] font-bold tracking-tight text-ink`},Xr={class:`flex flex-1 flex-col overflow-y-auto overflow-x-hidden px-3 pb-2.5 pt-1`},Zr=[`aria-expanded`],Qr={class:`min-h-0 overflow-hidden`},$r={key:0,class:`overflow-hidden whitespace-nowrap`},ei={key:0},ti=[`aria-expanded`],ni={class:`min-h-0 overflow-hidden`},ri={key:0,class:`overflow-hidden whitespace-nowrap`},ii={key:0,class:`overflow-hidden whitespace-nowrap`},ai={key:0,class:`overflow-hidden whitespace-nowrap`},oi={key:0,class:`overflow-hidden whitespace-nowrap`},si={class:`border-t border-divider p-3`},ci={class:`flex items-center gap-2.5 p-1.5`},li={class:`flex h-[34px] w-[34px] shrink-0 items-center justify-center rounded-[10px] bg-gradient-to-br from-[#6D5EF0] to-[#A06BF0] text-[14px] font-bold text-white`},ui={key:0,class:`overflow-hidden`},di={class:`whitespace-nowrap text-[13px] font-semibold text-[#2C2C44]`},fi={key:0,class:`whitespace-nowrap text-[11.5px] text-[#9A9AB0]`},pi={key:0,class:`whitespace-nowrap`},mi=E({__name:`Sidebar`,setup(e){let n=me(),i=X(),a=Q(),{can:o}=Gr(),s=pr(),c=Kr(),l=j(()=>Object.values(n.contentTypes)),f=j(()=>Object.values(n.taxonomyTypes)),p=j(()=>i.role?n.getRoleByName(i.role)?.label??i.role:null),m=t(!0),h=t(!0),g=j(()=>!a.isMobile&&a.sidebarCollapsed),v=`/admin`;async function ee(){await c.post(`/auth/logout`,{}),i.clear(),s.push(`${v}/login`)}function y(){return i.email?i.email.charAt(0).toUpperCase():`?`}return(e,t)=>{let n=ae(`RouterLink`);return r(),w(`aside`,{class:C([`flex h-full flex-col border-r border-card-border bg-white transition-[width] duration-300`,_(a).isMobile?`fixed inset-y-0 left-0 z-50 w-[258px] shadow-2xl transition-transform duration-300`:`relative shrink-0 overflow-hidden`,_(a).isMobile&&!_(a).mobileNavOpen?`-translate-x-full`:`translate-x-0`,!_(a).isMobile&&(g.value?`w-[74px]`:`w-[258px]`)]),"aria-label":`Main navigation`},[S(`div`,qr,[t[3]||=de(`<div class="flex h-[34px] w-[34px] shrink-0 items-center justify-center rounded-[11px] bg-gradient-to-br from-[#6D5EF0] to-[#5B57E8] shadow-[0_4px_12px_rgba(91,87,232,0.36)]"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2.1" stroke-linecap="round"><path d="M4 7h16"></path><path d="M4 12h10"></path><path d="M4 17h13"></path></svg></div>`,1),g.value?N(``,!0):(r(),w(`div`,Jr,[S(`div`,Yr,P(_(a).cmsName),1),t[2]||=S(`div`,{class:`whitespace-nowrap text-[11px] font-medium text-faint`},`Admin panel`,-1)]))]),S(`div`,Xr,[S(`div`,null,[g.value?N(``,!0):(r(),w(`button`,{key:0,type:`button`,class:`mb-1 mt-4 flex w-full items-center justify-between px-2 text-[11px] font-bold uppercase tracking-[.09em] text-faint hover:text-muted`,"aria-expanded":m.value,onClick:t[0]||=e=>m.value=!m.value},[t[5]||=S(`span`,null,`Content`,-1),(r(),w(`svg`,{class:C([`h-3 w-3 text-[#C2C2D0] transition-transform`,m.value?``:`-rotate-90`]),fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,"stroke-width":`2.5`},[...t[4]||=[S(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M19 9l-7 7-7-7`},null,-1)]],2))],8,Zr)),S(`div`,{class:`grid transition-[grid-template-rows] duration-300 ease-in-out`,style:oe({gridTemplateRows:g.value||m.value?`1fr`:`0fr`})},[S(`div`,Qr,[(r(!0),w(re,null,d(l.value,e=>(r(),k(n,{key:e.name,to:`${_(v)}/content/${e.name}`,class:C([`my-0.5 flex items-center rounded-[10px] text-sm font-medium text-[#4A4A60] transition-colors hover:bg-[#F3F2F8]`,g.value?`justify-center px-0 py-[11px]`:`gap-3 px-3 py-2.5`]),"active-class":`!bg-indigo-50 !text-indigo-600 !font-semibold`},{default:u(()=>[t[6]||=S(`span`,{class:`flex shrink-0`},[S(`svg`,{width:`19`,height:`19`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.7`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[S(`path`,{d:`M14 3v4a2 2 0 0 0 2 2h4`}),S(`path`,{d:`M5 3h9l5 5v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`}),S(`path`,{d:`M9 13h6`}),S(`path`,{d:`M9 17h5`})])],-1),g.value?N(``,!0):(r(),w(`span`,$r,P(e.label),1))]),_:2},1032,[`to`,`class`]))),128))])],4)]),f.value.length>0?(r(),w(`div`,ei,[g.value?N(``,!0):(r(),w(`button`,{key:0,type:`button`,class:`mb-1 mt-4 flex w-full items-center justify-between px-2 text-[11px] font-bold uppercase tracking-[.09em] text-faint hover:text-muted`,"aria-expanded":h.value,onClick:t[1]||=e=>h.value=!h.value},[t[8]||=S(`span`,null,`Taxonomy`,-1),(r(),w(`svg`,{class:C([`h-3 w-3 text-[#C2C2D0] transition-transform`,h.value?``:`-rotate-90`]),fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,"stroke-width":`2.5`},[...t[7]||=[S(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M19 9l-7 7-7-7`},null,-1)]],2))],8,ti)),S(`div`,{class:`grid transition-[grid-template-rows] duration-300 ease-in-out`,style:oe({gridTemplateRows:g.value||h.value?`1fr`:`0fr`})},[S(`div`,ni,[(r(!0),w(re,null,d(f.value,e=>(r(),k(n,{key:e.name,to:`${_(v)}/taxonomy/${e.name}`,class:C([`my-0.5 flex items-center rounded-[10px] text-sm font-medium text-[#4A4A60] transition-colors hover:bg-[#F3F2F8]`,g.value?`justify-center px-0 py-[11px]`:`gap-3 px-3 py-2.5`]),"active-class":`!bg-indigo-50 !text-indigo-600 !font-semibold`},{default:u(()=>[t[9]||=S(`span`,{class:`flex shrink-0`},[S(`svg`,{width:`19`,height:`19`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.7`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[S(`path`,{d:`M20.6 13.4l-7.2 7.2a2 2 0 0 1-2.8 0L2 12V2h10l8.6 8.6a2 2 0 0 1 0 2.8z`}),S(`path`,{d:`M7 7h.01`})])],-1),g.value?N(``,!0):(r(),w(`span`,ri,P(e.label),1))]),_:2},1032,[`to`,`class`]))),128))])],4)])):N(``,!0),t[13]||=S(`div`,{class:`my-3.5 mx-2.5 h-px bg-divider`},null,-1),_(o)(`media:read`)?(r(),k(n,{key:1,to:`${_(v)}/media`,class:C([`my-0.5 flex items-center rounded-[10px] text-sm font-medium text-[#4A4A60] transition-colors hover:bg-[#F3F2F8]`,g.value?`justify-center px-0 py-[11px]`:`gap-3 px-3 py-2.5`]),"active-class":`!bg-indigo-50 !text-indigo-600 !font-semibold`},{default:u(()=>[t[10]||=S(`span`,{class:`flex shrink-0`},[S(`svg`,{width:`19`,height:`19`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.7`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[S(`path`,{d:`M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`}),S(`path`,{d:`M8.5 11a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3z`}),S(`path`,{d:`M21 15l-5-5L5 21`})])],-1),g.value?N(``,!0):(r(),w(`span`,ii,`Media`))]),_:1},8,[`to`,`class`])):N(``,!0),_(o)(`users:read`)?(r(),k(n,{key:2,to:`${_(v)}/users`,class:C([`my-0.5 flex items-center rounded-[10px] text-sm font-medium text-[#4A4A60] transition-colors hover:bg-[#F3F2F8]`,g.value?`justify-center px-0 py-[11px]`:`gap-3 px-3 py-2.5`]),"active-class":`!bg-indigo-50 !text-indigo-600 !font-semibold`},{default:u(()=>[t[11]||=S(`span`,{class:`flex shrink-0`},[S(`svg`,{width:`19`,height:`19`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.7`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[S(`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`}),S(`path`,{d:`M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8z`}),S(`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.9`}),S(`path`,{d:`M16 3.1a4 4 0 0 1 0 7.8`})])],-1),g.value?N(``,!0):(r(),w(`span`,ai,`Users`))]),_:1},8,[`to`,`class`])):N(``,!0),_(o)(`roles:read`)?(r(),k(n,{key:3,to:`${_(v)}/roles`,class:C([`my-0.5 flex items-center rounded-[10px] text-sm font-medium text-[#4A4A60] transition-colors hover:bg-[#F3F2F8]`,g.value?`justify-center px-0 py-[11px]`:`gap-3 px-3 py-2.5`]),"active-class":`!bg-indigo-50 !text-indigo-600 !font-semibold`},{default:u(()=>[t[12]||=S(`span`,{class:`flex shrink-0`},[S(`svg`,{width:`19`,height:`19`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.7`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[S(`path`,{d:`M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z`})])],-1),g.value?N(``,!0):(r(),w(`span`,oi,`Roles`))]),_:1},8,[`to`,`class`])):N(``,!0)]),S(`div`,si,[S(`div`,ci,[S(`div`,li,P(y()),1),g.value?N(``,!0):(r(),w(`div`,ui,[S(`div`,di,P(_(i).email),1),p.value?(r(),w(`div`,fi,P(p.value),1)):N(``,!0)]))]),S(`button`,{type:`button`,class:C([`mt-1 flex w-full items-center rounded-[10px] py-[9px] text-left text-[13.5px] font-medium text-[#74748C] transition-colors hover:bg-[#FDF2F4] hover:text-[#E1495B]`,g.value?`justify-center px-0`:`gap-[11px] px-2`]),onClick:ee},[t[14]||=de(`<span class="flex shrink-0"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><path d="M16 17l5-5-5-5"></path><path d="M21 12H9"></path></svg></span>`,1),g.value?N(``,!0):(r(),w(`span`,pi,`Log out`))],2)])],2)}}}),hi={class:`flex h-[60px] shrink-0 items-center gap-[13px] border-b border-card-border bg-white/85 px-4 backdrop-blur-md`},gi={key:0,width:`21`,height:`21`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.9`,"stroke-linecap":`round`},_i={key:1,width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.8`,"stroke-linecap":`round`,"stroke-linejoin":`round`},vi={class:`flex min-w-0 items-center gap-[9px]`},yi={class:`overflow-hidden truncate whitespace-nowrap text-[14.5px] font-semibold text-[#2C2C44]`},bi=E({__name:`Topbar`,setup(e){let t=Q();return(e,n)=>(r(),w(`header`,hi,[S(`button`,{type:`button`,class:`flex h-[38px] w-[38px] items-center justify-center rounded-[10px] text-[#4A4A60] transition-colors hover:bg-[#F1F0F7]`,"aria-label":`Toggle sidebar`,onClick:n[0]||=e=>_(t).toggleSidebar()},[_(t).isMobile?(r(),w(`svg`,gi,[...n[1]||=[S(`path`,{d:`M3 6h18`},null,-1),S(`path`,{d:`M3 12h18`},null,-1),S(`path`,{d:`M3 18h18`},null,-1)]])):(r(),w(`svg`,_i,[...n[2]||=[S(`path`,{d:`M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`},null,-1),S(`path`,{d:`M9 3v18`},null,-1)]]))]),S(`div`,vi,[n[3]||=S(`span`,{class:`shrink-0 rounded-[7px] bg-indigo-50 px-[9px] py-[3px] text-[10.5px] font-bold tracking-[.05em] text-indigo-600`},` ADMIN `,-1),S(`span`,yi,P(_(t).cmsName),1)]),n[4]||=S(`div`,{class:`flex-1`},null,-1)]))}}),xi={class:`mt-10 border-t border-gray-200 px-1 py-5`},Si={class:`text-xs text-gray-400`},Ci=E({__name:`Footer`,setup(e){let t=Q();return(e,n)=>(r(),w(`footer`,xi,[S(`p`,Si,P(_(t).cmsName),1)]))}}),wi={"aria-live":`polite`,"aria-atomic":`false`,class:`pointer-events-none fixed bottom-4 right-4 z-50 flex flex-col gap-2`},Ti={class:`flex-1 text-sm`},Ei=[`aria-label`,`onClick`],Di=E({__name:`ToastContainer`,setup(e){let t=Q(),n=j(()=>[...t.toasts].reverse()),i={success:`bg-green-600 text-white`,error:`bg-red-600 text-white`,warning:`bg-amber-500 text-white`,info:`bg-blue-600 text-white`};return(e,a)=>(r(),w(`div`,wi,[(r(!0),w(re,null,d(n.value,e=>(r(),w(`div`,{key:e.id,class:C([`pointer-events-auto flex w-80 items-start gap-3 rounded-lg px-4 py-3 shadow-lg`,i[e.variant]??`bg-blue-600 text-white`]),role:`status`},[S(`span`,Ti,P(e.message),1),S(`button`,{type:`button`,class:`shrink-0 opacity-80 hover:opacity-100`,"aria-label":`Dismiss: ${e.message}`,onClick:n=>_(t).removeToast(e.id)},` × `,8,Ei)],2))),128))]))}}),Oi={class:`flex h-screen overflow-hidden bg-surface`},ki={class:`flex min-w-0 flex-1 flex-col`},Ai={class:`flex-1 overflow-y-auto p-6`},ji=E({__name:`AppShell`,setup(e){let t=Q();return(e,n)=>{let i=ae(`router-view`);return r(),w(`div`,Oi,[D(mi),_(t).isMobile&&_(t).mobileNavOpen?(r(),w(`div`,{key:0,class:`fixed inset-0 z-40 bg-[rgba(20,20,40,0.4)] backdrop-blur-[2px]`,onClick:n[0]||=e=>_(t).closeMobileNav()})):N(``,!0),S(`div`,ki,[D(bi),S(`main`,Ai,[D(i),D(Ci)])]),D(Di)])}}}),Mi=(function(){let e=typeof document<`u`&&document.createElement(`link`).relList;return e&&e.supports&&e.supports(`modulepreload`)?`modulepreload`:`preload`})(),Ni=function(e){return`/`+e},Pi={},$=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,new URL(`../../../src/node/plugins/importAnalysisBuild.ts`,import.meta.url)).href}r=o(t.map(t=>{if(t=Ni(t,n),t=s(t),t in Pi)return;Pi[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Mi,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Fi=[{path:`/admin/login`,name:`login`,component:()=>$(()=>import(`./LoginView-DPpdT3Ro.js`),__vite__mapDeps([0,1]))},{path:`/admin`,component:ji,meta:{requiresAuth:!0},children:[{path:``,redirect:`/admin/media`},{path:`change-password`,name:`change-password`,component:()=>$(()=>import(`./ChangePasswordView-B0wg3O_I.js`),__vite__mapDeps([2,1]))},{path:`content/:type`,name:`content-list`,component:()=>$(()=>import(`./ContentListView-DM4xggDx.js`),__vite__mapDeps([3,1,4,5]))},{path:`content/:type/new`,name:`content-new`,component:()=>$(()=>import(`./ContentFormView-D92O0ICh.js`),__vite__mapDeps([6,1,7,8,4,9,10]))},{path:`content/:type/settings`,name:`content-settings`,component:()=>$(()=>import(`./ContentSettingsView-B9UHNleT.js`),__vite__mapDeps([11,1,8])),meta:{permission:`content:edit`}},{path:`content/:type/:id`,name:`content-edit`,component:()=>$(()=>import(`./ContentFormView-D92O0ICh.js`),__vite__mapDeps([6,1,7,8,4,9,10]))},{path:`taxonomy/:type`,name:`taxonomy-list`,component:()=>$(()=>import(`./TaxonomyListView-Dkga11a3.js`),__vite__mapDeps([12,1,5,13]))},{path:`taxonomy/:type/new`,name:`taxonomy-new`,component:()=>$(()=>import(`./TaxonomyFormView-CZlOjxOY.js`),__vite__mapDeps([14,1,7,8,9,13]))},{path:`taxonomy/:type/:id`,name:`taxonomy-edit`,component:()=>$(()=>import(`./TaxonomyFormView-CZlOjxOY.js`),__vite__mapDeps([14,1,7,8,9,13]))},{path:`media`,name:`media-library`,component:()=>$(()=>import(`./MediaLibraryView-Dx9t8r8T.js`),__vite__mapDeps([15,1,8,9,10,5,16]))},{path:`media/:id`,name:`media-detail`,component:()=>$(()=>import(`./MediaDetailView-OUzzhO1B.js`),__vite__mapDeps([17,1,8,9,16]))},{path:`users`,name:`user-list`,component:()=>$(()=>import(`./UserListView-B6_Hdemt.js`),__vite__mapDeps([18,1,19])),meta:{permission:`users:read`}},{path:`users/new`,name:`user-new`,component:()=>$(()=>import(`./UserFormView-CaOcoKX5.js`),__vite__mapDeps([20,1,8,9,19])),meta:{permission:`users:read`}},{path:`users/:id`,name:`user-edit`,component:()=>$(()=>import(`./UserFormView-CaOcoKX5.js`),__vite__mapDeps([20,1,8,9,19])),meta:{permission:`users:read`}},{path:`roles`,name:`roles`,component:()=>$(()=>import(`./RolesView-DO-Tb2Yr.js`),__vite__mapDeps([21,1]))}]}],Ii=fr({history:Pn(),routes:Fi});Ii.beforeEach(e=>{let t=X();return e.path===`/admin/login`?t.isAuthenticated?{path:`/admin/media`}:!0:t.isAuthenticated?t.mustChangePassword&&e.path!==`/admin/change-password`?{path:`/admin/change-password`}:!t.mustChangePassword&&e.path===`/admin/change-password`?{path:`/admin/media`}:!0:{path:`/admin/login`,query:{redirect:e.fullPath}}}),Ii.beforeEach(e=>{let t=X();if(e.meta.permission&&!t.hasPermission(e.meta.permission))return{path:`/admin/media`}});var Li=_t(Wr);Li.use(se()),Li.use(Ii),Li.mount(`#app`);export{kr as a,pr as c,pt as d,Fr as i,ct as l,Gr as n,X as o,Q as r,mr as s,Kr as t,st as u};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LoginView-8tF3SdN4.js","assets/schema-B-RKX_ep.js","assets/ChangePasswordView-BILytTnH.js","assets/ContentListView-CWHYBV23.js","assets/content--2XYr_UQ.js","assets/Pagination-BIf7mQy7.js","assets/ContentFormView-BsTU-zzP.js","assets/ComputedDisplay-Df_HvjzX.js","assets/useNotification-kY57Myug.js","assets/ConfirmDialog-B7nxdDge.js","assets/useTabIndicator-CvEsGBJh.js","assets/ContentSettingsView-B9BHm-xg.js","assets/TaxonomyListView-DKnsY_ab.js","assets/taxonomy-DC-6wyg3.js","assets/TaxonomyFormView-BibZ2qjc.js","assets/MediaLibraryView-COQmdQPB.js","assets/media-DvQfZD4o.js","assets/MediaDetailView-HfRoV5W8.js","assets/UserListView-Dk3Jv2Z8.js","assets/users-DVibZ_HD.js","assets/UserFormView-DhH0m-Vq.js","assets/RolesView-DO-Tb2Yr.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{$ as e,B as t,D as n,E as r,G as i,H as a,I as o,J as s,K as c,M as l,N as u,O as d,Q as f,R as p,S as m,U as h,V as g,W as _,X as v,Y as ee,Z as y,_ as te,at as b,b as x,c as S,ct as C,d as w,et as T,f as ne,g as E,h as D,i as re,it as ie,j as O,k as ae,l as k,lt as oe,n as se,nt as ce,o as le,ot as ue,p as de,q as fe,r as pe,rt as A,s as j,st as M,t as me,tt as he,u as N,ut as P,v as ge,w as _e,y as ve,z as ye}from"./schema-B-RKX_ep.js";var be=void 0,xe=typeof window<`u`&&window.trustedTypes;if(xe)try{be=xe.createPolicy(`vue`,{createHTML:e=>e})}catch{}var Se=be?e=>be.createHTML(e):e=>e,Ce=`http://www.w3.org/2000/svg`,we=`http://www.w3.org/1998/Math/MathML`,F=typeof document<`u`?document:null,Te=F&&F.createElement(`template`),Ee={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?F.createElementNS(Ce,e):t===`mathml`?F.createElementNS(we,e):n?F.createElement(e,{is:n}):F.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>F.createTextNode(e),createComment:e=>F.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>F.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===a||!(i=i.nextSibling)););else{Te.innerHTML=Se(r===`svg`?`<svg>${e}</svg>`:r===`mathml`?`<math>${e}</math>`:e);let i=Te.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},De=Symbol(`_vtc`);function Oe(e,t,n){let r=e[De];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var ke=Symbol(`_vod`),Ae=Symbol(`_vsh`),je=Symbol(``),Me=/(?:^|;)\s*display\s*:/;function Ne(e,t,n){let r=e.style,i=A(n),a=!1;if(n&&!i){if(t)if(A(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??Fe(r,t,``)}else for(let e in t)n[e]??Fe(r,e,``);for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?Fe(r,i,``):ze(e,i,!A(t)&&t?t[i]:void 0,o)||Fe(r,i,o)}}else if(i){if(t!==n){let e=r[je];e&&(n+=`;`+e),r.cssText=n,a=Me.test(n)}}else t&&e.removeAttribute(`style`);ke in e&&(e[ke]=a?r.display:``,e[Ae]&&(r.display=`none`))}var Pe=/\s*!important$/;function Fe(e,t,n){if(y(n))n.forEach(n=>Fe(e,t,n));else if(n??=``,t.startsWith(`--`))e.setProperty(t,n);else{let r=Re(e,t);Pe.test(n)?e.setProperty(s(r),n.replace(Pe,``),`important`):e[r]=n}}var Ie=[`Webkit`,`Moz`,`ms`],Le={};function Re(e,t){let n=Le[t];if(n)return n;let r=i(t);if(r!==`filter`&&r in e)return Le[t]=r;r=c(r);for(let n=0;n<Ie.length;n++){let i=Ie[n]+r;if(i in e)return Le[t]=i}return t}function ze(e,t,n,r){return e.tagName===`TEXTAREA`&&(t===`width`||t===`height`)&&A(r)&&n===r}var Be=`http://www.w3.org/1999/xlink`;function Ve(e,t,n,r,i,a=ce(t)){r&&t.startsWith(`xlink:`)?n==null?e.removeAttributeNS(Be,t.slice(6,t.length)):e.setAttributeNS(Be,t,n):n==null||a&&!ee(n)?e.removeAttribute(t):e.setAttribute(t,a?``:ie(n)?String(n):n)}function He(e,t,n,r,i){if(t===`innerHTML`||t===`textContent`){n!=null&&(e[t]=t===`innerHTML`?Se(n):n);return}let a=e.tagName;if(t===`value`&&a!==`PROGRESS`&&!a.includes(`-`)){let r=a===`OPTION`?e.getAttribute(`value`)||``:e.value,i=n==null?e.type===`checkbox`?`on`:``:String(n);(r!==i||!(`_value`in e))&&(e.value=i),n??e.removeAttribute(t),e._value=n;return}let o=!1;if(n===``||n==null){let r=typeof e[t];r===`boolean`?n=ee(n):n==null&&r===`string`?(n=``,o=!0):r===`number`&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(i||t)}function I(e,t,n,r){e.addEventListener(t,n,r)}function Ue(e,t,n,r){e.removeEventListener(t,n,r)}var We=Symbol(`_vei`);function Ge(e,t,n,r,i=null){let a=e[We]||(e[We]={}),o=a[t];if(r&&o)o.value=r;else{let[n,s]=Je(t);r?I(e,n,a[t]=Qe(r,i),s):o&&(Ue(e,n,o,s),a[t]=void 0)}}var Ke=/(Once|Passive|Capture)$/,qe=/^on:?(?:Once|Passive|Capture)$/;function Je(e){let t,n;for(;(n=e.match(Ke))&&!qe.test(e);)t||={},e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===`:`?e.slice(3):s(e.slice(2)),t]}var Ye=0,Xe=Promise.resolve(),Ze=()=>Ye||=(Xe.then(()=>Ye=0),Date.now());function Qe(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;let r=n.value;if(y(r)){let n=e.stopImmediatePropagation;e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0};let i=r.slice(),a=[e];for(let n=0;n<i.length&&!e._stopped;n++){let e=i[n];e&&le(e,t,5,a)}}else le(r,t,5,[e])};return n.value=e,n.attached=Ze(),n}var $e=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,et=(t,n,r,a,o,s)=>{let c=o===`svg`;n===`class`?Oe(t,a,c):n===`style`?Ne(t,r,a):T(n)?e(n)||Ge(t,n,r,a,s):(n[0]===`.`?(n=n.slice(1),!0):n[0]===`^`?(n=n.slice(1),!1):tt(t,n,a,c))?(He(t,n,a),!t.tagName.includes(`-`)&&(n===`value`||n===`checked`||n===`selected`)&&Ve(t,n,a,c,s,n!==`value`)):t._isVueCE&&(nt(t,n)||t._def.__asyncLoader&&(/[A-Z]/.test(n)||!A(a)))?He(t,i(n),a,s,n):(n===`true-value`?t._trueValue=a:n===`false-value`&&(t._falseValue=a),Ve(t,n,a,c))};function tt(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&$e(t)&&f(n));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`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return $e(t)&&A(n)?!1:t in e}function nt(e,t){let n=e._def.props;if(!n)return!1;let r=i(t);return Array.isArray(n)?n.some(e=>i(e)===r):Object.keys(n).some(e=>i(e)===r)}var rt=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return y(t)?e=>v(t,e):t};function it(e){e.target.composing=!0}function at(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event(`input`)))}var L=Symbol(`_assign`);function ot(e,t,n){return t&&(e=e.trim()),n&&(e=M(e)),e}var st={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e[L]=rt(i);let a=r||i.props&&i.props.type===`number`;I(e,t?`change`:`input`,t=>{t.target.composing||e[L](ot(e.value,n,a))}),(n||a)&&I(e,`change`,()=>{e.value=ot(e.value,n,a)}),t||(I(e,`compositionstart`,it),I(e,`compositionend`,at),I(e,`change`,at))},mounted(e,{value:t}){e.value=t??``},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:a}},o){if(e[L]=rt(o),e.composing)return;let s=(a||e.type===`number`)&&!/^0\d/.test(e.value)?M(e.value):e.value,c=t??``;if(s===c)return;let l=e.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===e&&e.type!==`range`&&(r&&t===n||i&&e.value.trim()===c)||(e.value=c)}},ct={deep:!0,created(e,{value:t,modifiers:{number:n}},r){let i=he(t);I(e,`change`,()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?M(ut(e)):ut(e));e[L](e.multiple?i?new Set(t):t:t[0]),e._assigning=!0,m(()=>{e._assigning=!1})}),e[L]=rt(r)},mounted(e,{value:t}){lt(e,t)},beforeUpdate(e,t,n){e[L]=rt(n)},updated(e,{value:t}){e._assigning||lt(e,t)}};function lt(e,t){let n=e.multiple,r=y(t);if(!(n&&!r&&!he(t))){for(let i=0,a=e.options.length;i<a;i++){let a=e.options[i],o=ut(a);if(n)if(r){let e=typeof o;e===`string`||e===`number`?a.selected=t.some(e=>String(e)===String(o)):a.selected=ue(t,o)>-1}else a.selected=t.has(o);else if(b(ut(a),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function ut(e){return`_value`in e?e._value:e.value}var dt=[`ctrl`,`shift`,`alt`,`meta`],ft={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)=>dt.some(n=>e[`${n}Key`]&&!t.includes(n))},pt=(e,t)=>{if(!e)return e;let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=((n,...r)=>{for(let e=0;e<t.length;e++){let r=ft[t[e]];if(r&&r(n,t))return}return e(n,...r)}))},mt=fe({patchProp:et},Ee),ht;function gt(){return ht||=ne(mt)}var _t=((...e)=>{let t=gt().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=yt(e);if(!r)return;let i=t._component;!f(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,vt(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t});function vt(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function yt(e){return A(e)?document.querySelector(e):e}var R=typeof document<`u`;function bt(e){return typeof e==`object`||`displayName`in e||`props`in e||`__vccOpts`in e}function xt(e){return e.__esModule||e[Symbol.toStringTag]===`Module`||e.default&&bt(e.default)}var z=Object.assign;function St(e,t){let n={};for(let r in t){let i=t[r];n[r]=B(i)?i.map(e):e(i)}return n}var Ct=()=>{},B=Array.isArray;function wt(e,t){let n={};for(let r in e)n[r]=r in t?t[r]:e[r];return n}var Tt=/#/g,Et=/&/g,Dt=/\//g,Ot=/=/g,kt=/\?/g,At=/\+/g,jt=/%5B/g,Mt=/%5D/g,Nt=/%5E/g,Pt=/%60/g,Ft=/%7B/g,It=/%7C/g,Lt=/%7D/g,Rt=/%20/g;function zt(e){return e==null?``:encodeURI(``+e).replace(It,`|`).replace(jt,`[`).replace(Mt,`]`)}function Bt(e){return zt(e).replace(Ft,`{`).replace(Lt,`}`).replace(Nt,`^`)}function Vt(e){return zt(e).replace(At,`%2B`).replace(Rt,`+`).replace(Tt,`%23`).replace(Et,`%26`).replace(Pt,"`").replace(Ft,`{`).replace(Lt,`}`).replace(Nt,`^`)}function Ht(e){return Vt(e).replace(Ot,`%3D`)}function Ut(e){return zt(e).replace(Tt,`%23`).replace(kt,`%3F`)}function Wt(e){return Ut(e).replace(Dt,`%2F`)}function Gt(e){if(e==null)return null;try{return decodeURIComponent(``+e)}catch{}return``+e}var Kt=/\/$/,qt=e=>e.replace(Kt,``);function Jt(e,t,n=`/`){let r,i={},a=``,o=``,s=t.indexOf(`#`),c=t.indexOf(`?`);return c=s>=0&&c>s?-1:c,c>=0&&(r=t.slice(0,c),a=t.slice(c,s>0?s:t.length),i=e(a.slice(1))),s>=0&&(r||=t.slice(0,s),o=t.slice(s,t.length)),r=tn(r??t,n),{fullPath:r+a+o,path:r,query:i,hash:Gt(o)}}function Yt(e,t){let n=t.query?e(t.query):``;return t.path+(n&&`?`)+n+(t.hash||``)}function Xt(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||`/`}function Zt(e,t,n){let r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&V(t.matched[r],n.matched[i])&&Qt(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function V(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Qt(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!$t(e[n],t[n]))return!1;return!0}function $t(e,t){return B(e)?en(e,t):B(t)?en(t,e):e?.valueOf()===t?.valueOf()}function en(e,t){return B(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e.length===1&&e[0]===t}function tn(e,t){if(e.startsWith(`/`))return e;if(!e)return t;let n=t.split(`/`),r=e.split(`/`),i=r[r.length-1];(i===`..`||i===`.`)&&r.push(``);let a=n.length-1,o,s;for(o=0;o<r.length;o++)if(s=r[o],s!==`.`)if(s===`..`)a>1&&a--;else break;return n.slice(0,a).join(`/`)+`/`+r.slice(o).join(`/`)}var H={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0},nn=function(e){return e.pop=`pop`,e.push=`push`,e}({}),rn=function(e){return e.back=`back`,e.forward=`forward`,e.unknown=``,e}({});function an(e){if(!e)if(R){let t=document.querySelector(`base`);e=t&&t.getAttribute(`href`)||`/`,e=e.replace(/^\w+:\/\/[^\/]+/,``)}else e=`/`;return e[0]!==`/`&&e[0]!==`#`&&(e=`/`+e),qt(e)}var on=/^[^#]+#/;function sn(e,t){return e.replace(on,`#`)+t}function cn(e,t){let n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}var ln=()=>({left:window.scrollX,top:window.scrollY});function un(e){let t;if(`el`in e){let n=e.el,r=typeof n==`string`&&n.startsWith(`#`),i=typeof n==`string`?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=cn(i,e)}else t=e;`scrollBehavior`in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left==null?window.scrollX:t.left,t.top==null?window.scrollY:t.top)}function dn(e,t){return(history.state?history.state.position-t:-1)+e}var fn=new Map;function pn(e,t){fn.set(e,t)}function mn(e){let t=fn.get(e);return fn.delete(e),t}function hn(e){return typeof e==`string`||e&&typeof e==`object`}function gn(e){return typeof e==`string`||typeof e==`symbol`}var U=function(e){return e[e.MATCHER_NOT_FOUND=1]=`MATCHER_NOT_FOUND`,e[e.NAVIGATION_GUARD_REDIRECT=2]=`NAVIGATION_GUARD_REDIRECT`,e[e.NAVIGATION_ABORTED=4]=`NAVIGATION_ABORTED`,e[e.NAVIGATION_CANCELLED=8]=`NAVIGATION_CANCELLED`,e[e.NAVIGATION_DUPLICATED=16]=`NAVIGATION_DUPLICATED`,e}({}),_n=Symbol(``);U.MATCHER_NOT_FOUND,U.NAVIGATION_GUARD_REDIRECT,U.NAVIGATION_ABORTED,U.NAVIGATION_CANCELLED,U.NAVIGATION_DUPLICATED;function W(e,t){return z(Error(),{type:e,[_n]:!0},t)}function G(e,t){return e instanceof Error&&_n in e&&(t==null||!!(e.type&t))}function vn(e){let t={};if(e===``||e===`?`)return t;let n=(e[0]===`?`?e.slice(1):e).split(`&`);for(let e=0;e<n.length;++e){let r=n[e].replace(At,` `),i=r.indexOf(`=`),a=Gt(i<0?r:r.slice(0,i)),o=i<0?null:Gt(r.slice(i+1));if(a in t){let e=t[a];B(e)||(e=t[a]=[e]),e.push(o)}else t[a]=o}return t}function yn(e){let t=``;for(let n in e){let r=e[n];if(n=Ht(n),r==null){r!==void 0&&(t+=(t.length?`&`:``)+n);continue}(B(r)?r.map(e=>e&&Vt(e)):[r&&Vt(r)]).forEach(e=>{e!==void 0&&(t+=(t.length?`&`:``)+n,e!=null&&(t+=`=`+e))})}return t}function bn(e){let t={};for(let n in e){let r=e[n];r!==void 0&&(t[n]=B(r)?r.map(e=>e==null?null:``+e):r==null?r:``+r)}return t}var xn=Symbol(``),Sn=Symbol(``),Cn=Symbol(``),wn=Symbol(``),Tn=Symbol(``);function En(){let e=[];function t(t){return e.push(t),()=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function K(e,t,n,r,i,a=e=>e()){let o=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((s,c)=>{let l=e=>{e===!1?c(W(U.NAVIGATION_ABORTED,{from:n,to:t})):e instanceof Error?c(e):hn(e)?c(W(U.NAVIGATION_GUARD_REDIRECT,{from:t,to:e})):(o&&r.enterCallbacks[i]===o&&typeof e==`function`&&o.push(e),s())},u=a(()=>e.call(r&&r.instances[i],t,n,l)),d=Promise.resolve(u);e.length<3&&(d=d.then(l)),d.catch(e=>c(e))})}function Dn(e,t,n,r,i=e=>e()){let a=[];for(let o of e)for(let e in o.components){let s=o.components[e];if(!(t!==`beforeRouteEnter`&&!o.instances[e]))if(bt(s)){let c=(s.__vccOpts||s)[t];c&&a.push(K(c,n,r,o,e,i))}else{let c=s();a.push(()=>c.then(a=>{if(!a)throw Error(`Couldn't resolve component "${e}" at "${o.path}"`);let s=xt(a)?a.default:a;o.mods[e]=a,o.components[e]=s;let c=(s.__vccOpts||s)[t];return c&&K(c,n,r,o,e,i)()}))}}return a}function On(e,t){let n=[],r=[],i=[],a=Math.max(t.matched.length,e.matched.length);for(let o=0;o<a;o++){let a=t.matched[o];a&&(e.matched.find(e=>V(e,a))?r.push(a):n.push(a));let s=e.matched[o];s&&(t.matched.find(e=>V(e,s))||i.push(s))}return[n,r,i]}var kn=()=>location.protocol+`//`+location.host;function An(e,t){let{pathname:n,search:r,hash:i}=t,a=e.indexOf(`#`);if(a>-1){let t=i.includes(e.slice(a))?e.slice(a).length:1,n=i.slice(t);return n[0]!==`/`&&(n=`/`+n),Xt(n,``)}return Xt(n,e)+r+i}function jn(e,t,n,r){let i=[],a=[],o=null,s=({state:a})=>{let s=An(e,location),c=n.value,l=t.value,u=0;if(a){if(n.value=s,t.value=a,o&&o===c){o=null;return}u=l?a.position-l.position:0}else r(s);i.forEach(e=>{e(n.value,c,{delta:u,type:nn.pop,direction:u?u>0?rn.forward:rn.back:rn.unknown})})};function c(){o=n.value}function l(e){i.push(e);let t=()=>{let t=i.indexOf(e);t>-1&&i.splice(t,1)};return a.push(t),t}function u(){if(document.visibilityState===`hidden`){let{history:e}=window;if(!e.state)return;e.replaceState(z({},e.state,{scroll:ln()}),``)}}function d(){for(let e of a)e();a=[],window.removeEventListener(`popstate`,s),window.removeEventListener(`pagehide`,u),document.removeEventListener(`visibilitychange`,u)}return window.addEventListener(`popstate`,s),window.addEventListener(`pagehide`,u),document.addEventListener(`visibilitychange`,u),{pauseListeners:c,listen:l,destroy:d}}function Mn(e,t,n,r=!1,i=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:i?ln():null}}function Nn(e){let{history:t,location:n}=window,r={value:An(e,n)},i={value:t.state};i.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(r,a,o){let s=e.indexOf(`#`),c=s>-1?(n.host&&document.querySelector(`base`)?e:e.slice(s))+r:kn()+e+r;try{t[o?`replaceState`:`pushState`](a,``,c),i.value=a}catch(e){console.error(e),n[o?`replace`:`assign`](c)}}function o(e,n){a(e,z({},t.state,Mn(i.value.back,e,i.value.forward,!0),n,{position:i.value.position}),!0),r.value=e}function s(e,n){let o=z({},i.value,t.state,{forward:e,scroll:ln()});a(o.current,o,!0),a(e,z({},Mn(r.value,e,null),{position:o.position+1},n),!1),r.value=e}return{location:r,state:i,push:s,replace:o}}function Pn(e){e=an(e);let t=Nn(e),n=jn(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}let i=z({location:``,base:e,go:r,createHref:sn.bind(null,e)},t,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>t.state.value}),i}var q=function(e){return e[e.Static=0]=`Static`,e[e.Param=1]=`Param`,e[e.Group=2]=`Group`,e}({}),J=function(e){return e[e.Static=0]=`Static`,e[e.Param=1]=`Param`,e[e.ParamRegExp=2]=`ParamRegExp`,e[e.ParamRegExpEnd=3]=`ParamRegExpEnd`,e[e.EscapeNext=4]=`EscapeNext`,e}(J||{}),Fn={type:q.Static,value:``},In=/[a-zA-Z0-9_]/;function Ln(e){if(!e)return[[]];if(e===`/`)return[[Fn]];if(!e.startsWith(`/`))throw Error(`Invalid path "${e}"`);function t(e){throw Error(`ERR (${n})/"${l}": ${e}`)}let n=J.Static,r=n,i=[],a;function o(){a&&i.push(a),a=[]}let s=0,c,l=``,u=``;function d(){l&&=(n===J.Static?a.push({type:q.Static,value:l}):n===J.Param||n===J.ParamRegExp||n===J.ParamRegExpEnd?(a.length>1&&(c===`*`||c===`+`)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:q.Param,value:l,regexp:u,repeatable:c===`*`||c===`+`,optional:c===`*`||c===`?`})):t(`Invalid state to consume buffer`),``)}function f(){l+=c}for(;s<e.length;){if(c=e[s++],c===`\\`&&n!==J.ParamRegExp){r=n,n=J.EscapeNext;continue}switch(n){case J.Static:c===`/`?(l&&d(),o()):c===`:`?(d(),n=J.Param):f();break;case J.EscapeNext:f(),n=r;break;case J.Param:c===`(`?n=J.ParamRegExp:In.test(c)?f():(d(),n=J.Static,c!==`*`&&c!==`?`&&c!==`+`&&s--);break;case J.ParamRegExp:c===`)`?u[u.length-1]==`\\`?u=u.slice(0,-1)+c:n=J.ParamRegExpEnd:u+=c;break;case J.ParamRegExpEnd:d(),n=J.Static,c!==`*`&&c!==`?`&&c!==`+`&&s--,u=``;break;default:t(`Unknown state`);break}}return n===J.ParamRegExp&&t(`Unfinished custom RegExp for param "${l}"`),d(),o(),i}var Rn=`[^/]+?`,zn={sensitive:!1,strict:!1,start:!0,end:!0},Y=function(e){return e[e._multiplier=10]=`_multiplier`,e[e.Root=90]=`Root`,e[e.Segment=40]=`Segment`,e[e.SubSegment=30]=`SubSegment`,e[e.Static=40]=`Static`,e[e.Dynamic=20]=`Dynamic`,e[e.BonusCustomRegExp=10]=`BonusCustomRegExp`,e[e.BonusWildcard=-50]=`BonusWildcard`,e[e.BonusRepeatable=-20]=`BonusRepeatable`,e[e.BonusOptional=-8]=`BonusOptional`,e[e.BonusStrict=.7000000000000001]=`BonusStrict`,e[e.BonusCaseSensitive=.25]=`BonusCaseSensitive`,e}(Y||{}),Bn=/[.+*?^${}()[\]/\\]/g;function Vn(e,t){let n=z({},zn,t),r=[],i=n.start?`^`:``,a=[];for(let t of e){let e=t.length?[]:[Y.Root];n.strict&&!t.length&&(i+=`/`);for(let r=0;r<t.length;r++){let o=t[r],s=Y.Segment+(n.sensitive?Y.BonusCaseSensitive:0);if(o.type===q.Static)r||(i+=`/`),i+=o.value.replace(Bn,`\\$&`),s+=Y.Static;else if(o.type===q.Param){let{value:e,repeatable:n,optional:c,regexp:l}=o;a.push({name:e,repeatable:n,optional:c});let u=l||Rn;if(u!==Rn){s+=Y.BonusCustomRegExp;try{`${u}`}catch(t){throw Error(`Invalid custom RegExp for param "${e}" (${u}): `+t.message)}}let d=n?`((?:${u})(?:/(?:${u}))*)`:`(${u})`;r||(d=c&&t.length<2?`(?:/${d})`:`/`+d),c&&(d+=`?`),i+=d,s+=Y.Dynamic,c&&(s+=Y.BonusOptional),n&&(s+=Y.BonusRepeatable),u===`.*`&&(s+=Y.BonusWildcard)}e.push(s)}r.push(e)}if(n.strict&&n.end){let e=r.length-1;r[e][r[e].length-1]+=Y.BonusStrict}n.strict||(i+=`/?`),n.end?i+=`$`:n.strict&&!i.endsWith(`/`)&&(i+=`(?:/|$)`);let o=new RegExp(i,n.sensitive?``:`i`);function s(e){let t=e.match(o),n={};if(!t)return null;for(let e=1;e<t.length;e++){let r=t[e]||``,i=a[e-1];n[i.name]=r&&i.repeatable?r.split(`/`):r}return n}function c(t){let n=``,r=!1;for(let i of e){(!r||!n.endsWith(`/`))&&(n+=`/`),r=!1;for(let e of i)if(e.type===q.Static)n+=e.value;else if(e.type===q.Param){let{value:a,repeatable:o,optional:s}=e,c=a in t?t[a]:``;if(B(c)&&!o)throw Error(`Provided param "${a}" is an array but it is not repeatable (* or + modifiers)`);let l=B(c)?c.join(`/`):c;if(!l)if(s)i.length<2&&(n.endsWith(`/`)?n=n.slice(0,-1):r=!0);else throw Error(`Missing required param "${a}"`);n+=l}}return n||`/`}return{re:o,score:r,keys:a,parse:s,stringify:c}}function Hn(e,t){let n=0;for(;n<e.length&&n<t.length;){let r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===Y.Static+Y.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===Y.Static+Y.Segment?1:-1:0}function Un(e,t){let n=0,r=e.score,i=t.score;for(;n<r.length&&n<i.length;){let e=Hn(r[n],i[n]);if(e)return e;n++}if(Math.abs(i.length-r.length)===1){if(Wn(r))return 1;if(Wn(i))return-1}return i.length-r.length}function Wn(e){let t=e[e.length-1];return e.length>0&&t[t.length-1]<0}var Gn={strict:!1,end:!0,sensitive:!1};function Kn(e,t,n){let r=z(Vn(Ln(e.path),n),{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function qn(e,t){let n=[],r=new Map;t=wt(Gn,t);function i(e){return r.get(e)}function a(e,n,r){let i=!r,s=Yn(e);s.aliasOf=r&&r.record;let l=wt(t,e),u=[s];if(`alias`in e){let t=typeof e.alias==`string`?[e.alias]:e.alias;for(let e of t)u.push(Yn(z({},s,{components:r?r.record.components:s.components,path:e,aliasOf:r?r.record:s})))}let d,f;for(let t of u){let{path:u}=t;if(n&&u[0]!==`/`){let e=n.record.path,r=e[e.length-1]===`/`?``:`/`;t.path=n.record.path+(u&&r+u)}if(d=Kn(t,n,l),r?r.alias.push(d):(f||=d,f!==d&&f.alias.push(d),i&&e.name&&!Zn(d)&&o(e.name)),tr(d)&&c(d),s.children){let e=s.children;for(let t=0;t<e.length;t++)a(e[t],d,r&&r.children[t])}r||=d}return f?()=>{o(f)}:Ct}function o(e){if(gn(e)){let t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(o),t.alias.forEach(o))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(o),e.alias.forEach(o))}}function s(){return n}function c(e){let t=$n(e,n);n.splice(t,0,e),e.record.name&&!Zn(e)&&r.set(e.record.name,e)}function l(e,t){let i,a={},o,s;if(`name`in e&&e.name){if(i=r.get(e.name),!i)throw W(U.MATCHER_NOT_FOUND,{location:e});s=i.record.name,a=z(Jn(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&Jn(e.params,i.keys.map(e=>e.name))),o=i.stringify(a)}else if(e.path!=null)o=e.path,i=n.find(e=>e.re.test(o)),i&&(a=i.parse(o),s=i.record.name);else{if(i=t.name?r.get(t.name):n.find(e=>e.re.test(t.path)),!i)throw W(U.MATCHER_NOT_FOUND,{location:e,currentLocation:t});s=i.record.name,a=z({},t.params,e.params),o=i.stringify(a)}let c=[],l=i;for(;l;)c.unshift(l.record),l=l.parent;return{name:s,path:o,params:a,matched:c,meta:Qn(c)}}e.forEach(e=>a(e));function u(){n.length=0,r.clear()}return{addRoute:a,resolve:l,removeRoute:o,clearRoutes:u,getRoutes:s,getRecordMatcher:i}}function Jn(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function Yn(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Xn(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 Xn(e){let t={},n=e.props||!1;if(`component`in e)t.default=n;else for(let r in e.components)t[r]=typeof n==`object`?n[r]:n;return t}function Zn(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Qn(e){return e.reduce((e,t)=>z(e,t.meta),{})}function $n(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1;Un(e,t[i])<0?r=i:n=i+1}let i=er(e);return i&&(r=t.lastIndexOf(i,r-1)),r}function er(e){let t=e;for(;t=t.parent;)if(tr(t)&&Un(e,t)===0)return t}function tr({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function nr(e){let t=x(Cn),n=x(wn),r=j(()=>{let n=_(e.to);return t.resolve(n)}),i=j(()=>{let{matched:e}=r.value,{length:t}=e,i=e[t-1],a=n.matched;if(!i||!a.length)return-1;let o=a.findIndex(V.bind(null,i));if(o>-1)return o;let s=sr(e[t-2]);return t>1&&sr(i)===s&&a[a.length-1].path!==s?a.findIndex(V.bind(null,e[t-2])):o}),a=j(()=>i.value>-1&&or(n.params,r.value.params)),o=j(()=>i.value>-1&&i.value===n.matched.length-1&&Qt(n.params,r.value.params));function s(n={}){if(ar(n)){let n=t[_(e.replace)?`replace`:`push`](_(e.to)).catch(Ct);return e.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>n),n}return Promise.resolve()}return{route:r,href:j(()=>r.value.href),isActive:a,isExactActive:o,navigate:s}}function rr(e){return e.length===1?e[0]:e}var ir=E({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:nr,setup(e,{slots:t}){let n=ye(nr(e)),{options:r}=x(Cn),i=j(()=>({[cr(e.activeClass,r.linkActiveClass,`router-link-active`)]:n.isActive,[cr(e.exactActiveClass,r.linkExactActiveClass,`router-link-exact-active`)]:n.isExactActive}));return()=>{let r=t.default&&rr(t.default(n));return e.custom?r:ge(`a`,{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},r)}}});function ar(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){let t=e.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function or(e,t){for(let n in t){let r=t[n],i=e[n];if(typeof r==`string`){if(r!==i)return!1}else if(!B(i)||i.length!==r.length||r.some((e,t)=>e.valueOf()!==i[t].valueOf()))return!1}return!0}function sr(e){return e?e.aliasOf?e.aliasOf.path:e.path:``}var cr=(e,t,n)=>e??t??n,lr=E({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(e,{attrs:r,slots:i}){let a=x(Tn),o=j(()=>e.route||a.value),s=x(Sn,0),c=j(()=>{let e=_(s),{matched:t}=o.value,n;for(;(n=t[e])&&!n.components;)e++;return e}),l=j(()=>o.value.matched[c.value]);n(Sn,j(()=>c.value+1)),n(xn,l),n(Tn,o);let u=t();return O(()=>[u.value,l.value,e.name],([e,t,n],[r,i,a])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),e&&t&&(!i||!V(t,i)||!r)&&(t.enterCallbacks[n]||[]).forEach(t=>t(e))},{flush:`post`}),()=>{let t=o.value,n=e.name,a=l.value,s=a&&a.components[n];if(!s)return ur(i.default,{Component:s,route:t});let c=a.props[n],d=ge(s,z({},c?c===!0?t.params:typeof c==`function`?c(t):c:null,r,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(a.instances[n]=null)},ref:u}));return ur(i.default,{Component:d,route:t})||d}}});function ur(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}var dr=lr;function fr(e){let t=qn(e.routes,e),n=e.parseQuery||vn,r=e.stringifyQuery||yn,i=e.history,o=En(),s=En(),c=En(),l=a(H),u=H;R&&e.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let d=St.bind(null,e=>``+e),f=St.bind(null,Wt),p=St.bind(null,Gt);function h(e,n){let r,i;return gn(e)?(r=t.getRecordMatcher(e),i=n):i=e,t.addRoute(i,r)}function v(e){let n=t.getRecordMatcher(e);n&&t.removeRoute(n)}function ee(){return t.getRoutes().map(e=>e.record)}function y(e){return!!t.getRecordMatcher(e)}function te(e,a){if(a=z({},a||l.value),typeof e==`string`){let r=Jt(n,e,a.path),o=t.resolve({path:r.path},a),s=i.createHref(r.fullPath);return z(r,o,{params:p(o.params),hash:Gt(r.hash),redirectedFrom:void 0,href:s})}let o;if(e.path!=null)o=z({},e,{path:Jt(n,e.path,a.path).path});else{let t=z({},e.params);for(let e in t)t[e]??delete t[e];o=z({},e,{params:f(t)}),a.params=f(a.params)}let s=t.resolve(o,a),c=e.hash||``;s.params=d(p(s.params));let u=Yt(r,z({},e,{hash:Bt(c),path:s.path})),m=i.createHref(u);return z({fullPath:u,hash:c,query:r===yn?bn(e.query):e.query||{}},s,{redirectedFrom:void 0,href:m})}function b(e){return typeof e==`string`?Jt(n,e,l.value.path):z({},e)}function x(e,t){if(u!==e)return W(U.NAVIGATION_CANCELLED,{from:t,to:e})}function S(e){return T(e)}function C(e){return S(z(b(e),{replace:!0}))}function w(e,t){let n=e.matched[e.matched.length-1];if(n&&n.redirect){let{redirect:r}=n,i=typeof r==`function`?r(e,t):r;return typeof i==`string`&&(i=i.includes(`?`)||i.includes(`#`)?i=b(i):{path:i},i.params={}),z({query:e.query,hash:e.hash,params:i.path==null?e.params:{}},i)}}function T(e,t){let n=u=te(e),i=l.value,a=e.state,o=e.force,s=e.replace===!0,c=w(n,i);if(c)return T(z(b(c),{state:typeof c==`object`?z({},a,c.state):a,force:o,replace:s}),t||n);let d=n;d.redirectedFrom=t;let f;return!o&&Zt(r,i,n)&&(f=W(U.NAVIGATION_DUPLICATED,{to:d,from:i}),de(i,i,!0,!1)),(f?Promise.resolve(f):D(d,i)).catch(e=>G(e)?G(e,U.NAVIGATION_GUARD_REDIRECT)?e:ue(e):ce(e,d,i)).then(e=>{if(e){if(G(e,U.NAVIGATION_GUARD_REDIRECT))return T(z({replace:s},b(e.to),{state:typeof e.to==`object`?z({},a,e.to.state):a,force:o}),t||d)}else e=ie(d,i,!0,s,a);return re(d,i,e),e})}function ne(e,t){let n=x(e,t);return n?Promise.reject(n):Promise.resolve()}function E(e){let t=A.values().next().value;return t&&typeof t.runWithContext==`function`?t.runWithContext(e):e()}function D(e,t){let n,[r,i,a]=On(e,t);n=Dn(r.reverse(),`beforeRouteLeave`,e,t);for(let i of r)i.leaveGuards.forEach(r=>{n.push(K(r,e,t))});let c=ne.bind(null,e,t);return n.push(c),M(n).then(()=>{n=[];for(let r of o.list())n.push(K(r,e,t));return n.push(c),M(n)}).then(()=>{n=Dn(i,`beforeRouteUpdate`,e,t);for(let r of i)r.updateGuards.forEach(r=>{n.push(K(r,e,t))});return n.push(c),M(n)}).then(()=>{n=[];for(let r of a)if(r.beforeEnter)if(B(r.beforeEnter))for(let i of r.beforeEnter)n.push(K(i,e,t));else n.push(K(r.beforeEnter,e,t));return n.push(c),M(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=Dn(a,`beforeRouteEnter`,e,t,E),n.push(c),M(n))).then(()=>{n=[];for(let r of s.list())n.push(K(r,e,t));return n.push(c),M(n)}).catch(e=>G(e,U.NAVIGATION_CANCELLED)?e:Promise.reject(e))}function re(e,t,n){c.list().forEach(r=>E(()=>r(e,t,n)))}function ie(e,t,n,r,a){let o=x(e,t);if(o)return o;let s=t===H,c=R?history.state:{};n&&(r||s?i.replace(e.fullPath,z({scroll:s&&c&&c.scroll},a)):i.push(e.fullPath,a)),l.value=e,de(e,t,n,s),ue()}let O;function ae(){O||=i.listen((e,t,n)=>{if(!j.listening)return;let r=te(e),a=w(r,j.currentRoute.value);if(a){T(z(a,{replace:!0,force:!0}),r).catch(Ct);return}u=r;let o=l.value;R&&pn(dn(o.fullPath,n.delta),ln()),D(r,o).catch(e=>G(e,U.NAVIGATION_ABORTED|U.NAVIGATION_CANCELLED)?e:G(e,U.NAVIGATION_GUARD_REDIRECT)?(T(z(b(e.to),{force:!0}),r).then(e=>{G(e,U.NAVIGATION_ABORTED|U.NAVIGATION_DUPLICATED)&&!n.delta&&n.type===nn.pop&&i.go(-1,!1)}).catch(Ct),Promise.reject()):(n.delta&&i.go(-n.delta,!1),ce(e,r,o))).then(e=>{e||=ie(r,o,!1),e&&(n.delta&&!G(e,U.NAVIGATION_CANCELLED)?i.go(-n.delta,!1):n.type===nn.pop&&G(e,U.NAVIGATION_ABORTED|U.NAVIGATION_DUPLICATED)&&i.go(-1,!1)),re(r,o,e)}).catch(Ct)})}let k=En(),oe=En(),se;function ce(e,t,n){ue(e);let r=oe.list();return r.length?r.forEach(r=>r(e,t,n)):console.error(e),Promise.reject(e)}function le(){return se&&l.value!==H?Promise.resolve():new Promise((e,t)=>{k.add([e,t])})}function ue(e){return se||(se=!e,ae(),k.list().forEach(([t,n])=>e?n(e):t()),k.reset()),e}function de(t,n,r,i){let{scrollBehavior:a}=e;if(!R||!a)return Promise.resolve();let o=!r&&mn(dn(t.fullPath,0))||(i||!r)&&history.state&&history.state.scroll||null;return m().then(()=>a(t,n,o)).then(e=>e&&un(e)).catch(e=>ce(e,t,n))}let fe=e=>i.go(e),pe,A=new Set,j={currentRoute:l,listening:!0,addRoute:h,removeRoute:v,clearRoutes:t.clearRoutes,hasRoute:y,getRoutes:ee,resolve:te,options:e,push:S,replace:C,go:fe,back:()=>fe(-1),forward:()=>fe(1),beforeEach:o.add,beforeResolve:s.add,afterEach:c.add,onError:oe.add,isReady:le,install(e){e.component(`RouterLink`,ir),e.component(`RouterView`,dr),e.config.globalProperties.$router=j,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>_(l)}),R&&!pe&&l.value===H&&(pe=!0,S(i.location).catch(e=>{}));let t={};for(let e in H)Object.defineProperty(t,e,{get:()=>l.value[e],enumerable:!0});e.provide(Cn,j),e.provide(wn,g(t)),e.provide(Tn,l);let n=e.unmount;A.add(e),e.unmount=function(){A.delete(e),A.size<1&&(u=H,O&&O(),O=null,l.value=H,pe=!1,se=!1),n()}}};function M(e){return e.reduce((e,t)=>e.then(()=>E(t)),Promise.resolve())}return j}function pr(){return x(Cn)}function mr(e){return x(wn)}var hr=`manguito_auth`;function gr(){try{let e=localStorage.getItem(hr);return e?JSON.parse(e):null}catch{return null}}var X=pe(`auth`,()=>{let e=me(),n=gr(),r=t(n?.id??null),i=t(n?.email??null),a=t(n?.role??null),o=t(n?.mustChangePassword??!1),s=j(()=>r.value!==null),c=j(()=>a.value?e.getRoleByName(a.value)?.permissions??[]:[]),l=j(()=>a.value?e.getRoleByName(a.value)?.hierarchy_level??1/0:1/0);function u(e){r.value=e.id,i.value=e.email,a.value=e.role,o.value=e.mustChangePassword??!1;try{localStorage.setItem(hr,JSON.stringify({id:e.id,email:e.email,role:e.role,mustChangePassword:e.mustChangePassword??!1}))}catch{}}function d(){r.value=null,i.value=null,a.value=null,o.value=!1;try{localStorage.removeItem(hr)}catch{}}function f(e){return c.value.includes(e)}return{id:r,email:i,role:a,mustChangePassword:o,isAuthenticated:s,permissions:c,hierarchyLevel:l,setUser:u,clear:d,hasPermission:f}});function _r(e){return o()?(p(e),!0):!1}var vr=new WeakMap,yr=(...e)=>{let t=e[0],n=te()?.proxy;if(n==null&&!ve())throw Error(`injectLocal must be called in setup`);return n&&vr.has(n)&&t in vr.get(n)?vr.get(n)[t]:x(...e)},br=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;var xr=Object.prototype.toString,Sr=e=>xr.call(e)===`[object Object]`,Z=()=>{},Cr=wr();function wr(){return br&&(window==null?void 0:window.navigator)?.userAgent&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||(window==null?void 0:window.navigator)?.maxTouchPoints>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function Tr(e,t){function n(...n){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(i)})}return n}function Er(e,t={}){let n,r,i=Z,a=e=>{clearTimeout(e),i(),i=Z},o;return s=>{let c=h(e),l=h(t.maxWait);return n&&a(n),c<=0||l!==void 0&&l<=0?(r&&=(a(r),null),Promise.resolve(s())):new Promise((e,u)=>{i=t.rejectOnCancel?u:e,o=s,l&&!r&&(r=setTimeout(()=>{n&&a(n),r=null,e(o())},l)),n=setTimeout(()=>{r&&a(r),r=null,e(s())},c)})}}function Dr(e){return e.endsWith(`rem`)?Number.parseFloat(e)*16:Number.parseFloat(e)}function Or(e){return Array.isArray(e)?e:[e]}function kr(e,t=200,n={}){return Tr(Er(t,n),e)}function Ar(e,t,n){return O(e,t,{...n,immediate:!0})}var jr=br?window:void 0;br&&window.document,br&&window.navigator,br&&window.location;function Mr(e){let t=h(e);return t?.$el??t}function Nr(...e){let t=[],n=()=>{t.forEach(e=>e()),t.length=0},r=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),i=j(()=>{let t=Or(h(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0}),a=Ar(()=>[i.value?.map(e=>Mr(e))??[jr].filter(e=>e!=null),Or(h(i.value?e[1]:e[0])),Or(_(i.value?e[2]:e[1])),h(i.value?e[3]:e[2])],([e,i,a,o])=>{if(n(),!e?.length||!i?.length||!a?.length)return;let s=Sr(o)?{...o}:o;t.push(...e.flatMap(e=>i.flatMap(t=>a.map(n=>r(e,t,n,s)))))},{flush:`post`});return _r(n),()=>{a(),n()}}var Pr=!1;function Fr(e,t,n={}){let{window:r=jr,ignore:i=[],capture:a=!0,detectIframe:o=!1,controls:s=!1}=n;if(!r)return s?{stop:Z,cancel:Z,trigger:Z}:Z;if(Cr&&!Pr){Pr=!0;let e={passive:!0};Array.from(r.document.body.children).forEach(t=>Nr(t,`click`,Z,e)),Nr(r.document.documentElement,`click`,Z,e)}let c=!0,l=e=>h(i).some(t=>{if(typeof t==`string`)return Array.from(r.document.querySelectorAll(t)).some(t=>t===e.target||e.composedPath().includes(t));{let n=Mr(t);return n&&(e.target===n||e.composedPath().includes(n))}});function u(e){let t=h(e);return t&&t.$.subTree.shapeFlag===16}function d(e,t){let n=h(e),r=n.$.subTree&&n.$.subTree.children;return r==null||!Array.isArray(r)?!1:r.some(e=>e.el===t.target||t.composedPath().includes(e.el))}let f=n=>{let r=Mr(e);if(n.target!=null&&!(!(r instanceof Element)&&u(e)&&d(e,n))&&!(!r||r===n.target||n.composedPath().includes(r))){if(`detail`in n&&n.detail===0&&(c=!l(n)),!c){c=!0;return}t(n)}},p=!1,m=[Nr(r,`click`,e=>{p||(p=!0,setTimeout(()=>{p=!1},0),f(e))},{passive:!0,capture:a}),Nr(r,`pointerdown`,t=>{let n=Mr(e);c=!l(t)&&!!(n&&!t.composedPath().includes(n))},{passive:!0}),o&&Nr(r,`blur`,n=>{setTimeout(()=>{let i=Mr(e);r.document.activeElement?.tagName===`IFRAME`&&!i?.contains(r.document.activeElement)&&t(n)},0)},{passive:!0})].filter(Boolean),g=()=>m.forEach(e=>e());return s?{stop:g,cancel:()=>{c=!1},trigger:e=>{c=!0,f(e),c=!1}}:g}function Ir(){let e=a(!1),t=te();return t&&_e(()=>{e.value=!0},t),e}function Lr(e){let t=Ir();return j(()=>(t.value,!!e()))}var Rr=Symbol(`vueuse-ssr-width`);function zr(){let e=ve()?yr(Rr,null):null;return typeof e==`number`?e:void 0}function Br(e,t={}){let{window:n=jr,ssrWidth:r=zr()}=t,i=Lr(()=>n&&`matchMedia`in n&&typeof n.matchMedia==`function`),o=a(typeof r==`number`),s=a(),c=a(!1);return l(()=>{if(o.value){o.value=!i.value;let t=h(e).split(`,`);c.value=t.some(e=>{let t=e.includes(`not all`),n=e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),i=e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),a=!!(n||i);return n&&a&&(a=r>=Dr(n[1])),i&&a&&(a=r<=Dr(i[1])),t?!a:a});return}i.value&&(s.value=n.matchMedia(h(e)),c.value=s.value.matches)}),Nr(s,`change`,e=>{c.value=e.matches},{passive:!0}),j(()=>c.value)}var Vr=3,Hr=4e3,Q=pe(`ui`,()=>{let e=t([]),n=t(!1),r=Br(`(max-width: 820px)`),i=t(!1),a=t(null),o=t(0),s=t(!1),c=t(`Manguito CMS`);function l(t,n,r=Hr){e.value.length>=Vr&&e.value.shift();let i=crypto.randomUUID();e.value.push({id:i,variant:t,message:n,duration:r}),r!==null&&setTimeout(()=>u(i),r)}function u(t){let n=e.value.findIndex(e=>e.id===t);n!==-1&&e.value.splice(n,1)}function d(e){o.value=e}function f(e){s.value=e}function p(e){c.value=e}function m(){r.value?i.value=!i.value:n.value=!n.value}function h(){i.value=!1}return{toasts:e,sidebarCollapsed:n,isMobile:r,mobileNavOpen:i,activeModal:a,maxFileSize:o,presignedUploads:s,cmsName:c,addToast:l,removeToast:u,setMaxFileSize:d,setPresignedUploads:f,setCmsName:p,toggleSidebar:m,closeMobileNav:h}}),Ur={key:0,class:`fixed inset-0 flex items-center justify-center bg-white`,"aria-label":`Loading`},Wr=E({__name:`App`,setup(e){let n=t(!0),i=pr(),a=X(),o=me(),s=Q();async function c(e=!0){let t=await fetch(`/admin/api/config`,{credentials:`include`});if(t.status===401){e&&(a.clear(),i.push(`/admin/login`));return}if(t.ok){let e=(await t.json()).data,n=e.all_roles??[];o.setRoles(n.map(e=>({name:e.name,label:e.label,hierarchy_level:e.hierarchy_level,is_system:e.is_system,permissions:e.permissions}))),e.user&&a.setUser({id:e.user.id,email:e.user.email,role:e.user.role,mustChangePassword:e.user.must_change_password}),s.setCmsName(e.cms_name),e.media?.max_file_size&&s.setMaxFileSize(e.media.max_file_size),s.setPresignedUploads(e.media?.presigned_uploads??!1);let r=await fetch(`/admin/api/schema`,{credentials:`include`});if(r.ok){let e=await r.json();o.setFromApiSchema(e.data)}a.mustChangePassword&&i.push(`/admin/change-password`)}}return _e(async()=>{if(!a.isAuthenticated){n.value=!1;return}try{await c()}finally{n.value=!1}}),O(()=>s.cmsName,e=>{document.title=e},{immediate:!0}),O(()=>a.isAuthenticated,async(e,t)=>{if(e&&!t){n.value=!0;try{await c(!1)}catch{}finally{n.value=!1}}}),(e,t)=>{let i=ae(`router-view`);return n.value?(r(),w(`div`,Ur,[...t[0]||=[S(`div`,{class:`h-10 w-10 animate-spin rounded-full border-4 border-gray-200 border-t-gray-600`,role:`status`},null,-1)]])):(r(),k(i,{key:1}))}}});function Gr(){let e=X(),t=me();function n(t){return e.permissions.includes(t)}function r(){return t.roles.filter(t=>t.hierarchy_level>e.hierarchyLevel&&t.name!==`admin`)}return{can:n,rolesBelow:r}}function Kr(){let e=pr(),t=X();async function n(i,a,o=!1){let s=await fetch(`/admin/api${i}`,{...a,credentials:`include`,headers:{"Content-Type":`application/json`,...a?.headers}});return s.status===401&&!o?await r()?n(i,a,!0):(t.clear(),e.push(`/admin/login`),{ok:!1,error:{code:`UNAUTHORIZED`,message:`Session expired.`}}):s.json()}async function r(){return(await fetch(`/admin/api/auth/refresh`,{method:`POST`,credentials:`include`})).ok}function i(e){return n(e,{method:`GET`})}function a(e,t){return n(e,{method:`POST`,body:JSON.stringify(t)})}function o(e,t){return n(e,{method:`PATCH`,body:JSON.stringify(t)})}function s(e,t){return n(e,{method:`PUT`,body:JSON.stringify(t)})}function c(e){return n(e,{method:`DELETE`})}return{get:i,post:a,patch:o,put:s,del:c}}var qr={class:`flex items-center gap-[11px] px-[17px] pb-[14px] pt-[18px]`},Jr={key:0,class:`overflow-hidden`},Yr={class:`whitespace-nowrap text-[15px] font-bold tracking-tight text-ink`},Xr={class:`flex flex-1 flex-col overflow-y-auto overflow-x-hidden px-3 pb-2.5 pt-1`},Zr=[`aria-expanded`],Qr={class:`min-h-0 overflow-hidden`},$r={key:0,class:`overflow-hidden whitespace-nowrap`},ei={key:0},ti=[`aria-expanded`],ni={class:`min-h-0 overflow-hidden`},ri={key:0,class:`overflow-hidden whitespace-nowrap`},ii={key:0,class:`overflow-hidden whitespace-nowrap`},ai={key:0,class:`overflow-hidden whitespace-nowrap`},oi={key:0,class:`overflow-hidden whitespace-nowrap`},si={class:`border-t border-divider p-3`},ci={class:`flex items-center gap-2.5 p-1.5`},li={class:`flex h-[34px] w-[34px] shrink-0 items-center justify-center rounded-[10px] bg-gradient-to-br from-[#6D5EF0] to-[#A06BF0] text-[14px] font-bold text-white`},ui={key:0,class:`overflow-hidden`},di={class:`whitespace-nowrap text-[13px] font-semibold text-[#2C2C44]`},fi={key:0,class:`whitespace-nowrap text-[11.5px] text-[#9A9AB0]`},pi={key:0,class:`whitespace-nowrap`},mi=E({__name:`Sidebar`,setup(e){let n=me(),i=X(),a=Q(),{can:o}=Gr(),s=pr(),c=Kr(),l=j(()=>Object.values(n.contentTypes)),f=j(()=>Object.values(n.taxonomyTypes)),p=j(()=>i.role?n.getRoleByName(i.role)?.label??i.role:null),m=t(!0),h=t(!0),g=j(()=>!a.isMobile&&a.sidebarCollapsed),v=`/admin`;async function ee(){await c.post(`/auth/logout`,{}),i.clear(),s.push(`${v}/login`)}function y(){return i.email?i.email.charAt(0).toUpperCase():`?`}return(e,t)=>{let n=ae(`RouterLink`);return r(),w(`aside`,{class:C([`flex h-full flex-col border-r border-card-border bg-white transition-[width] duration-300`,_(a).isMobile?`fixed inset-y-0 left-0 z-50 w-[258px] shadow-2xl transition-transform duration-300`:`relative shrink-0 overflow-hidden`,_(a).isMobile&&!_(a).mobileNavOpen?`-translate-x-full`:`translate-x-0`,!_(a).isMobile&&(g.value?`w-[74px]`:`w-[258px]`)]),"aria-label":`Main navigation`},[S(`div`,qr,[t[3]||=de(`<div class="flex h-[34px] w-[34px] shrink-0 items-center justify-center rounded-[11px] bg-gradient-to-br from-[#6D5EF0] to-[#5B57E8] shadow-[0_4px_12px_rgba(91,87,232,0.36)]"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2.1" stroke-linecap="round"><path d="M4 7h16"></path><path d="M4 12h10"></path><path d="M4 17h13"></path></svg></div>`,1),g.value?N(``,!0):(r(),w(`div`,Jr,[S(`div`,Yr,P(_(a).cmsName),1),t[2]||=S(`div`,{class:`whitespace-nowrap text-[11px] font-medium text-faint`},`Admin panel`,-1)]))]),S(`div`,Xr,[S(`div`,null,[g.value?N(``,!0):(r(),w(`button`,{key:0,type:`button`,class:`mb-1 mt-4 flex w-full items-center justify-between px-2 text-[11px] font-bold uppercase tracking-[.09em] text-faint hover:text-muted`,"aria-expanded":m.value,onClick:t[0]||=e=>m.value=!m.value},[t[5]||=S(`span`,null,`Content`,-1),(r(),w(`svg`,{class:C([`h-3 w-3 text-[#C2C2D0] transition-transform`,m.value?``:`-rotate-90`]),fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,"stroke-width":`2.5`},[...t[4]||=[S(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M19 9l-7 7-7-7`},null,-1)]],2))],8,Zr)),S(`div`,{class:`grid transition-[grid-template-rows] duration-300 ease-in-out`,style:oe({gridTemplateRows:g.value||m.value?`1fr`:`0fr`})},[S(`div`,Qr,[(r(!0),w(re,null,d(l.value,e=>(r(),k(n,{key:e.name,to:`${_(v)}/content/${e.name}`,class:C([`my-0.5 flex items-center rounded-[10px] text-sm font-medium text-[#4A4A60] transition-colors hover:bg-[#F3F2F8]`,g.value?`justify-center px-0 py-[11px]`:`gap-3 px-3 py-2.5`]),"active-class":`!bg-indigo-50 !text-indigo-600 !font-semibold`},{default:u(()=>[t[6]||=S(`span`,{class:`flex shrink-0`},[S(`svg`,{width:`19`,height:`19`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.7`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[S(`path`,{d:`M14 3v4a2 2 0 0 0 2 2h4`}),S(`path`,{d:`M5 3h9l5 5v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`}),S(`path`,{d:`M9 13h6`}),S(`path`,{d:`M9 17h5`})])],-1),g.value?N(``,!0):(r(),w(`span`,$r,P(e.label),1))]),_:2},1032,[`to`,`class`]))),128))])],4)]),f.value.length>0?(r(),w(`div`,ei,[g.value?N(``,!0):(r(),w(`button`,{key:0,type:`button`,class:`mb-1 mt-4 flex w-full items-center justify-between px-2 text-[11px] font-bold uppercase tracking-[.09em] text-faint hover:text-muted`,"aria-expanded":h.value,onClick:t[1]||=e=>h.value=!h.value},[t[8]||=S(`span`,null,`Taxonomy`,-1),(r(),w(`svg`,{class:C([`h-3 w-3 text-[#C2C2D0] transition-transform`,h.value?``:`-rotate-90`]),fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,"stroke-width":`2.5`},[...t[7]||=[S(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M19 9l-7 7-7-7`},null,-1)]],2))],8,ti)),S(`div`,{class:`grid transition-[grid-template-rows] duration-300 ease-in-out`,style:oe({gridTemplateRows:g.value||h.value?`1fr`:`0fr`})},[S(`div`,ni,[(r(!0),w(re,null,d(f.value,e=>(r(),k(n,{key:e.name,to:`${_(v)}/taxonomy/${e.name}`,class:C([`my-0.5 flex items-center rounded-[10px] text-sm font-medium text-[#4A4A60] transition-colors hover:bg-[#F3F2F8]`,g.value?`justify-center px-0 py-[11px]`:`gap-3 px-3 py-2.5`]),"active-class":`!bg-indigo-50 !text-indigo-600 !font-semibold`},{default:u(()=>[t[9]||=S(`span`,{class:`flex shrink-0`},[S(`svg`,{width:`19`,height:`19`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.7`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[S(`path`,{d:`M20.6 13.4l-7.2 7.2a2 2 0 0 1-2.8 0L2 12V2h10l8.6 8.6a2 2 0 0 1 0 2.8z`}),S(`path`,{d:`M7 7h.01`})])],-1),g.value?N(``,!0):(r(),w(`span`,ri,P(e.label),1))]),_:2},1032,[`to`,`class`]))),128))])],4)])):N(``,!0),t[13]||=S(`div`,{class:`my-3.5 mx-2.5 h-px bg-divider`},null,-1),_(o)(`media:read`)?(r(),k(n,{key:1,to:`${_(v)}/media`,class:C([`my-0.5 flex items-center rounded-[10px] text-sm font-medium text-[#4A4A60] transition-colors hover:bg-[#F3F2F8]`,g.value?`justify-center px-0 py-[11px]`:`gap-3 px-3 py-2.5`]),"active-class":`!bg-indigo-50 !text-indigo-600 !font-semibold`},{default:u(()=>[t[10]||=S(`span`,{class:`flex shrink-0`},[S(`svg`,{width:`19`,height:`19`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.7`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[S(`path`,{d:`M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`}),S(`path`,{d:`M8.5 11a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3z`}),S(`path`,{d:`M21 15l-5-5L5 21`})])],-1),g.value?N(``,!0):(r(),w(`span`,ii,`Media`))]),_:1},8,[`to`,`class`])):N(``,!0),_(o)(`users:read`)?(r(),k(n,{key:2,to:`${_(v)}/users`,class:C([`my-0.5 flex items-center rounded-[10px] text-sm font-medium text-[#4A4A60] transition-colors hover:bg-[#F3F2F8]`,g.value?`justify-center px-0 py-[11px]`:`gap-3 px-3 py-2.5`]),"active-class":`!bg-indigo-50 !text-indigo-600 !font-semibold`},{default:u(()=>[t[11]||=S(`span`,{class:`flex shrink-0`},[S(`svg`,{width:`19`,height:`19`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.7`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[S(`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`}),S(`path`,{d:`M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8z`}),S(`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.9`}),S(`path`,{d:`M16 3.1a4 4 0 0 1 0 7.8`})])],-1),g.value?N(``,!0):(r(),w(`span`,ai,`Users`))]),_:1},8,[`to`,`class`])):N(``,!0),_(o)(`roles:read`)?(r(),k(n,{key:3,to:`${_(v)}/roles`,class:C([`my-0.5 flex items-center rounded-[10px] text-sm font-medium text-[#4A4A60] transition-colors hover:bg-[#F3F2F8]`,g.value?`justify-center px-0 py-[11px]`:`gap-3 px-3 py-2.5`]),"active-class":`!bg-indigo-50 !text-indigo-600 !font-semibold`},{default:u(()=>[t[12]||=S(`span`,{class:`flex shrink-0`},[S(`svg`,{width:`19`,height:`19`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.7`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[S(`path`,{d:`M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z`})])],-1),g.value?N(``,!0):(r(),w(`span`,oi,`Roles`))]),_:1},8,[`to`,`class`])):N(``,!0)]),S(`div`,si,[S(`div`,ci,[S(`div`,li,P(y()),1),g.value?N(``,!0):(r(),w(`div`,ui,[S(`div`,di,P(_(i).email),1),p.value?(r(),w(`div`,fi,P(p.value),1)):N(``,!0)]))]),S(`button`,{type:`button`,class:C([`mt-1 flex w-full items-center rounded-[10px] py-[9px] text-left text-[13.5px] font-medium text-[#74748C] transition-colors hover:bg-[#FDF2F4] hover:text-[#E1495B]`,g.value?`justify-center px-0`:`gap-[11px] px-2`]),onClick:ee},[t[14]||=de(`<span class="flex shrink-0"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><path d="M16 17l5-5-5-5"></path><path d="M21 12H9"></path></svg></span>`,1),g.value?N(``,!0):(r(),w(`span`,pi,`Log out`))],2)])],2)}}}),hi={class:`flex h-[60px] shrink-0 items-center gap-[13px] border-b border-card-border bg-white/85 px-4 backdrop-blur-md`},gi={key:0,width:`21`,height:`21`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.9`,"stroke-linecap":`round`},_i={key:1,width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.8`,"stroke-linecap":`round`,"stroke-linejoin":`round`},vi={class:`flex min-w-0 items-center gap-[9px]`},yi={class:`overflow-hidden truncate whitespace-nowrap text-[14.5px] font-semibold text-[#2C2C44]`},bi=E({__name:`Topbar`,setup(e){let t=Q();return(e,n)=>(r(),w(`header`,hi,[S(`button`,{type:`button`,class:`flex h-[38px] w-[38px] items-center justify-center rounded-[10px] text-[#4A4A60] transition-colors hover:bg-[#F1F0F7]`,"aria-label":`Toggle sidebar`,onClick:n[0]||=e=>_(t).toggleSidebar()},[_(t).isMobile?(r(),w(`svg`,gi,[...n[1]||=[S(`path`,{d:`M3 6h18`},null,-1),S(`path`,{d:`M3 12h18`},null,-1),S(`path`,{d:`M3 18h18`},null,-1)]])):(r(),w(`svg`,_i,[...n[2]||=[S(`path`,{d:`M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`},null,-1),S(`path`,{d:`M9 3v18`},null,-1)]]))]),S(`div`,vi,[n[3]||=S(`span`,{class:`shrink-0 rounded-[7px] bg-indigo-50 px-[9px] py-[3px] text-[10.5px] font-bold tracking-[.05em] text-indigo-600`},` ADMIN `,-1),S(`span`,yi,P(_(t).cmsName),1)]),n[4]||=S(`div`,{class:`flex-1`},null,-1)]))}}),xi={class:`mt-10 border-t border-gray-200 px-1 py-5`},Si={class:`text-xs text-gray-400`},Ci=E({__name:`Footer`,setup(e){let t=Q();return(e,n)=>(r(),w(`footer`,xi,[S(`p`,Si,P(_(t).cmsName),1)]))}}),wi={"aria-live":`polite`,"aria-atomic":`false`,class:`pointer-events-none fixed bottom-4 right-4 z-50 flex flex-col gap-2`},Ti={class:`flex-1 text-sm`},Ei=[`aria-label`,`onClick`],Di=E({__name:`ToastContainer`,setup(e){let t=Q(),n=j(()=>[...t.toasts].reverse()),i={success:`bg-green-600 text-white`,error:`bg-red-600 text-white`,warning:`bg-amber-500 text-white`,info:`bg-blue-600 text-white`};return(e,a)=>(r(),w(`div`,wi,[(r(!0),w(re,null,d(n.value,e=>(r(),w(`div`,{key:e.id,class:C([`pointer-events-auto flex w-80 items-start gap-3 rounded-lg px-4 py-3 shadow-lg`,i[e.variant]??`bg-blue-600 text-white`]),role:`status`},[S(`span`,Ti,P(e.message),1),S(`button`,{type:`button`,class:`shrink-0 opacity-80 hover:opacity-100`,"aria-label":`Dismiss: ${e.message}`,onClick:n=>_(t).removeToast(e.id)},` × `,8,Ei)],2))),128))]))}}),Oi={class:`flex h-screen overflow-hidden bg-surface`},ki={class:`flex min-w-0 flex-1 flex-col`},Ai={class:`flex-1 overflow-y-auto p-6`},ji=E({__name:`AppShell`,setup(e){let t=Q();return(e,n)=>{let i=ae(`router-view`);return r(),w(`div`,Oi,[D(mi),_(t).isMobile&&_(t).mobileNavOpen?(r(),w(`div`,{key:0,class:`fixed inset-0 z-40 bg-[rgba(20,20,40,0.4)] backdrop-blur-[2px]`,onClick:n[0]||=e=>_(t).closeMobileNav()})):N(``,!0),S(`div`,ki,[D(bi),S(`main`,Ai,[D(i),D(Ci)])]),D(Di)])}}}),Mi=(function(){let e=typeof document<`u`&&document.createElement(`link`).relList;return e&&e.supports&&e.supports(`modulepreload`)?`modulepreload`:`preload`})(),Ni=function(e){return`/`+e},Pi={},$=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,new URL(`../../../src/node/plugins/importAnalysisBuild.ts`,import.meta.url)).href}r=o(t.map(t=>{if(t=Ni(t,n),t=s(t),t in Pi)return;Pi[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Mi,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Fi=[{path:`/admin/login`,name:`login`,component:()=>$(()=>import(`./LoginView-8tF3SdN4.js`),__vite__mapDeps([0,1]))},{path:`/admin`,component:ji,meta:{requiresAuth:!0},children:[{path:``,redirect:`/admin/media`},{path:`change-password`,name:`change-password`,component:()=>$(()=>import(`./ChangePasswordView-BILytTnH.js`),__vite__mapDeps([2,1]))},{path:`content/:type`,name:`content-list`,component:()=>$(()=>import(`./ContentListView-CWHYBV23.js`),__vite__mapDeps([3,1,4,5]))},{path:`content/:type/new`,name:`content-new`,component:()=>$(()=>import(`./ContentFormView-BsTU-zzP.js`),__vite__mapDeps([6,1,7,8,4,9,10]))},{path:`content/:type/settings`,name:`content-settings`,component:()=>$(()=>import(`./ContentSettingsView-B9BHm-xg.js`),__vite__mapDeps([11,1,8])),meta:{permission:`content:edit`}},{path:`content/:type/:id`,name:`content-edit`,component:()=>$(()=>import(`./ContentFormView-BsTU-zzP.js`),__vite__mapDeps([6,1,7,8,4,9,10]))},{path:`taxonomy/:type`,name:`taxonomy-list`,component:()=>$(()=>import(`./TaxonomyListView-DKnsY_ab.js`),__vite__mapDeps([12,1,5,13]))},{path:`taxonomy/:type/new`,name:`taxonomy-new`,component:()=>$(()=>import(`./TaxonomyFormView-BibZ2qjc.js`),__vite__mapDeps([14,1,7,8,9,13]))},{path:`taxonomy/:type/:id`,name:`taxonomy-edit`,component:()=>$(()=>import(`./TaxonomyFormView-BibZ2qjc.js`),__vite__mapDeps([14,1,7,8,9,13]))},{path:`media`,name:`media-library`,component:()=>$(()=>import(`./MediaLibraryView-COQmdQPB.js`),__vite__mapDeps([15,1,8,9,10,5,16]))},{path:`media/:id`,name:`media-detail`,component:()=>$(()=>import(`./MediaDetailView-HfRoV5W8.js`),__vite__mapDeps([17,1,8,9,16]))},{path:`users`,name:`user-list`,component:()=>$(()=>import(`./UserListView-Dk3Jv2Z8.js`),__vite__mapDeps([18,1,19])),meta:{permission:`users:read`}},{path:`users/new`,name:`user-new`,component:()=>$(()=>import(`./UserFormView-DhH0m-Vq.js`),__vite__mapDeps([20,1,8,9,19])),meta:{permission:`users:read`}},{path:`users/:id`,name:`user-edit`,component:()=>$(()=>import(`./UserFormView-DhH0m-Vq.js`),__vite__mapDeps([20,1,8,9,19])),meta:{permission:`users:read`}},{path:`roles`,name:`roles`,component:()=>$(()=>import(`./RolesView-DO-Tb2Yr.js`),__vite__mapDeps([21,1]))}]}],Ii=fr({history:Pn(),routes:Fi});Ii.beforeEach(e=>{let t=X();return e.path===`/admin/login`?t.isAuthenticated?{path:`/admin/media`}:!0:t.isAuthenticated?t.mustChangePassword&&e.path!==`/admin/change-password`?{path:`/admin/change-password`}:!t.mustChangePassword&&e.path===`/admin/change-password`?{path:`/admin/media`}:!0:{path:`/admin/login`,query:{redirect:e.fullPath}}}),Ii.beforeEach(e=>{let t=X();if(e.meta.permission&&!t.hasPermission(e.meta.permission))return{path:`/admin/media`}});var Li=_t(Wr);Li.use(se()),Li.use(Ii),Li.mount(`#app`);export{kr as a,pr as c,pt as d,Fr as i,ct as l,Gr as n,X as o,Q as r,mr as s,Kr as t,st as u};
|