@bobbykim/manguito-cms-admin 0.1.1 → 0.3.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-8UW4RWd8.js → ChangePasswordView-B0wg3O_I.js} +1 -1
- package/dist/assets/{EnumSelect-BOrBkA76.js → ComputedDisplay-C2FpwSB1.js} +2 -2
- package/dist/assets/ContentFormView-D92O0ICh.js +1 -0
- package/dist/assets/{ContentListView-BiPHUBHa.js → ContentListView-DM4xggDx.js} +1 -1
- package/dist/assets/{ContentSettingsView-DPKF5MRL.js → ContentSettingsView-B9UHNleT.js} +1 -1
- package/dist/assets/{LoginView-WELPH4Vh.js → LoginView-DPpdT3Ro.js} +1 -1
- package/dist/assets/{MediaDetailView-BT66fV9b.js → MediaDetailView-OUzzhO1B.js} +1 -1
- package/dist/assets/{MediaLibraryView-BcdiJ_7a.js → MediaLibraryView-Dx9t8r8T.js} +1 -1
- package/dist/assets/TaxonomyFormView-CZlOjxOY.js +1 -0
- package/dist/assets/{TaxonomyListView-BB7iTfjb.js → TaxonomyListView-Dkga11a3.js} +1 -1
- package/dist/assets/{UserFormView-C2p-FV0A.js → UserFormView-CaOcoKX5.js} +1 -1
- package/dist/assets/{UserListView-BnlU2Ovr.js → UserListView-B6_Hdemt.js} +1 -1
- package/dist/assets/{index-BkazhAun.js → index-s-2X8XCa.js} +2 -2
- package/dist/assets/{useNotification-DU6J5vms.js → useNotification-CEPVkHak.js} +1 -1
- package/dist/codegen/index.cjs +7 -2
- package/dist/codegen/index.js +7 -2
- package/dist/index.html +1 -1
- package/index.html +13 -0
- package/package.json +11 -7
- package/public/favicon.ico +0 -0
- package/src/App.vue +147 -0
- package/src/adapters/admin.ts +13 -0
- package/src/components/.gitkeep +0 -0
- package/src/components/fields/BooleanToggle.vue +63 -0
- package/src/components/fields/ComputedDisplay.vue +23 -0
- package/src/components/fields/DatePicker.vue +61 -0
- package/src/components/fields/EnumSelect.vue +69 -0
- package/src/components/fields/MediaUpload.vue +445 -0
- package/src/components/fields/NumberInput.vue +66 -0
- package/src/components/fields/ParagraphEmbed.vue +149 -0
- package/src/components/fields/ReferenceSelect.vue +275 -0
- package/src/components/fields/RichTextEditor.vue +293 -0
- package/src/components/fields/TextInput.vue +93 -0
- package/src/components/fields/__tests__/BooleanToggle.test.ts +37 -0
- package/src/components/fields/__tests__/ComputedDisplay.test.ts +34 -0
- package/src/components/fields/__tests__/DatePicker.test.ts +37 -0
- package/src/components/fields/__tests__/EnumSelect.test.ts +53 -0
- package/src/components/fields/__tests__/NumberInput.test.ts +64 -0
- package/src/components/fields/__tests__/ReferenceSelect.test.ts +196 -0
- package/src/components/fields/__tests__/RichTextEditor.test.ts +81 -0
- package/src/components/fields/__tests__/TextInput.test.ts +72 -0
- package/src/components/layout/AppShell.vue +33 -0
- package/src/components/layout/Footer.vue +11 -0
- package/src/components/layout/Sidebar.vue +254 -0
- package/src/components/layout/Topbar.vue +46 -0
- package/src/components/shared/ConfirmDialog.vue +38 -0
- package/src/components/shared/MediaSelectModal.vue +273 -0
- package/src/components/shared/Pagination.vue +93 -0
- package/src/components/shared/StatusBadge.vue +14 -0
- package/src/components/shared/ToastContainer.vue +44 -0
- package/src/composables/.gitkeep +0 -0
- package/src/composables/__tests__/useApiClient.test.ts +90 -0
- package/src/composables/__tests__/useFormValidation.test.ts +83 -0
- package/src/composables/__tests__/usePermission.test.ts +116 -0
- package/src/composables/useApiClient.ts +68 -0
- package/src/composables/useDirtyState.ts +28 -0
- package/src/composables/useFormValidation.ts +107 -0
- package/src/composables/useNotification.ts +26 -0
- package/src/composables/usePermission.ts +20 -0
- package/src/composables/useTabIndicator.ts +25 -0
- package/src/env.d.ts +2 -0
- package/src/main.ts +21 -0
- package/src/router/index.ts +174 -0
- package/src/stores/auth.ts +82 -0
- package/src/stores/content.ts +40 -0
- package/src/stores/media.ts +31 -0
- package/src/stores/schema.ts +130 -0
- package/src/stores/taxonomy.ts +40 -0
- package/src/stores/ui.ts +94 -0
- package/src/stores/users.ts +44 -0
- package/src/style.css +46 -0
- package/src/test-utils/server.ts +54 -0
- package/src/types/index.ts +0 -0
- package/src/views/.gitkeep +0 -0
- package/src/views/ChangePasswordView.vue +134 -0
- package/src/views/LoginView.vue +187 -0
- package/src/views/RolesView.vue +84 -0
- package/src/views/content/ContentFormView.vue +553 -0
- package/src/views/content/ContentListView.vue +236 -0
- package/src/views/content/ContentSettingsView.vue +122 -0
- package/src/views/media/MediaDetailView.vue +222 -0
- package/src/views/media/MediaLibraryView.vue +492 -0
- package/src/views/taxonomy/TaxonomyFormView.vue +286 -0
- package/src/views/taxonomy/TaxonomyListView.vue +198 -0
- package/src/views/users/UserFormView.vue +307 -0
- package/src/views/users/UserListView.vue +127 -0
- package/src/vite-env.d.ts +1 -0
- package/vite.config.ts +17 -0
- package/dist/assets/ContentFormView-vaIInaYs.js +0 -1
- package/dist/assets/TaxonomyFormView-BdRO9L-7.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e,B as t,E as n,O as r,W as i,c as a,d as o,g as s,i as c,j as ee,l,s as u,t as d,u as f,ut as p,w as te}from"./schema-B-RKX_ep.js";import{c as ne,n as re,s as ie,t as ae}from"./index-s-2X8XCa.js";import{a as m,c as oe,i as se,n as ce,o as h,r as le,s as g,t as _}from"./ComputedDisplay-C2FpwSB1.js";import{t as v}from"./useNotification-CEPVkHak.js";import{t as y}from"./ConfirmDialog-B7nxdDge.js";import{t as b}from"./taxonomy-DC-6wyg3.js";var ue={key:0,class:`flex items-center justify-center py-20`},de={key:1,class:`py-12 text-center text-sm text-gray-500`},x={key:2},S={class:`mb-6 flex items-start justify-between gap-4`},C={class:`text-xs font-medium uppercase tracking-wide text-gray-400`},w={class:`text-[26px] font-bold tracking-tight text-ink`},T={class:`flex shrink-0 items-center gap-2`},E=[`disabled`],D=[`disabled`],O={class:`space-y-5`},k={key:0,class:`mt-4 text-sm text-red-600`,role:`alert`},A=s({__name:`TaxonomyFormView`,setup(s){let A=ie(),j=ne(),M=ae(),{can:N}=re(),{errors:P,validate:F,mergeServerErrors:I,clearErrors:L,setError:R}=oe(),z=v(),fe=d(),B=b(),V=u(()=>A.params.type),H=u(()=>A.params.id),U=u(()=>!!H.value),W=u(()=>fe.taxonomyTypes[V.value]),G=u(()=>W.value?.fields??[]),K=t(null),q=t({}),J=t(!0),Y=t(!1),X=t(``),Z=t(!1),pe={"text/plain":g,"text/rich":h,integer:m,float:m,boolean:se,date:le,enum:ce,programmatic:_};function me(e){let t=e.field_type;return pe[t]??g}function he(e){switch(e.field_type){case`text/plain`:case`text/rich`:return``;case`integer`:case`float`:return null;case`boolean`:return!1;case`date`:return null;case`enum`:return``;default:return null}}function Q(e){let t={};for(let n of G.value)n.field_type!==`programmatic`&&(t[n.name]=e?.[n.name]??he(n));q.value=t}function ge(e,t){q.value[e]=t}async function $(e){let t=await M.get(`/taxonomy/${V.value}/${e}`);t.ok?(K.value=t.data,Q(t.data)):X.value=t.error.message}te(async()=>{if(!W.value){J.value=!1;return}U.value&&H.value?await $(H.value):Q(),J.value=!1}),ee(H,async(e,t)=>{e!==t&&(J.value=!0,L(),e?await $(e):(K.value=null,Q()),J.value=!1)});async function _e(){if(!F(G.value,q.value))return;Y.value=!0,X.value=``;let e=U.value?await M.patch(`/taxonomy/${V.value}/${H.value}`,q.value):await M.post(`/taxonomy/${V.value}`,q.value);if(Y.value=!1,!e.ok){let t=e.error;t.code===`PUBLISH_VALIDATION_ERROR`&&t.details?I(t.details):t.code===`SLUG_CONFLICT`?R(`slug`,`This slug is already taken.`):X.value=t.message;return}K.value=e.data,B.invalidate(V.value),z.success(`Saved.`),U.value||j.replace({name:`taxonomy-edit`,params:{type:V.value,id:String(e.data.id)}})}async function ve(){Z.value=!1,Y.value=!0;let e=await M.del(`/taxonomy/${V.value}/${H.value}`);if(Y.value=!1,!e.ok){X.value=e.error.message;return}B.invalidate(V.value),j.push({name:`taxonomy-list`,params:{type:V.value}})}let ye=u(()=>{if(!U.value)return`New ${W.value?.label??``}`;let e=G.value.find(e=>e.field_type===`text/plain`);return e?String(K.value?.[e.name]??``):W.value?.label??``});return(t,s)=>J.value?(n(),o(`div`,ue,[...s[1]||=[a(`span`,{class:`inline-block h-6 w-6 animate-spin rounded-full border-2 border-indigo-600 border-t-transparent`,"aria-hidden":`true`},null,-1)]])):W.value?(n(),o(`div`,x,[a(`div`,S,[a(`div`,null,[a(`p`,C,p(W.value.label),1),a(`h1`,w,p(ye.value),1)]),a(`div`,T,[i(N)(`taxonomy:delete`)&&U.value?(n(),o(`button`,{key:0,type:`button`,disabled:Y.value,class:`rounded-md px-3 py-2 text-sm font-medium text-red-600 ring-1 ring-inset ring-red-300 hover:bg-red-50 disabled:cursor-not-allowed disabled:opacity-50`,onClick:s[0]||=e=>Z.value=!0},` Delete `,8,E)):f(``,!0),(U.value?i(N)(`taxonomy:edit`):i(N)(`taxonomy:create`))?(n(),o(`button`,{key:1,type:`button`,disabled:Y.value,class:`rounded-[11px] bg-indigo-600 px-4 py-2.5 text-[13.5px] font-semibold text-white shadow-[0_3px_10px_rgba(91,87,232,0.3)] transition-all hover:bg-indigo-700 hover:shadow-[0_6px_18px_rgba(91,87,232,0.4)] disabled:cursor-not-allowed disabled:opacity-50`,onClick:_e},p(Y.value?`Saving…`:`Save`),9,D)):f(``,!0)])]),a(`div`,O,[(n(!0),o(c,null,r(G.value,t=>(n(),l(e(me(t)),{key:t.name,field:t,"model-value":q.value[t.name],error:i(P)[t.name],disabled:Y.value,"onUpdate:modelValue":e=>ge(t.name,e)},null,8,[`field`,`model-value`,`error`,`disabled`,`onUpdate:modelValue`]))),128))]),X.value?(n(),o(`p`,k,p(X.value),1)):f(``,!0),Z.value?(n(),l(y,{key:1,message:`Are you sure you want to delete this term? This action cannot be undone.`,"on-confirm":ve,"on-cancel":()=>Z.value=!1},null,8,[`on-cancel`])):f(``,!0)])):(n(),o(`div`,de,` Taxonomy type not found. `))}});export{A as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as e,E as t,O as n,P as r,W as i,c as a,d as o,g as s,h as c,i as l,j as u,m as d,s as f,t as p,u as m,ut as h,w as g}from"./schema-B-RKX_ep.js";import{a as _,c as v,n as y,s as b,t as x,u as S}from"./index-
|
|
1
|
+
import{B as e,E as t,O as n,P as r,W as i,c as a,d as o,g as s,h as c,i as l,j as u,m as d,s as f,t as p,u as m,ut as h,w as g}from"./schema-B-RKX_ep.js";import{a as _,c as v,n as y,s as b,t as x,u as S}from"./index-s-2X8XCa.js";import{t as C}from"./Pagination-BIf7mQy7.js";import{t as w}from"./taxonomy-DC-6wyg3.js";var T={class:`mb-5.5 flex flex-wrap items-center justify-between gap-4`},ee={class:`text-[26px] font-bold tracking-tight text-ink`},te={class:`mb-4 flex h-9.5 items-center gap-2 rounded-[10px] border border-card-border bg-[#FBFBFD] px-2.75 text-[13px] transition-colors focus-within:border-indigo-400`},E={key:0,class:`space-y-2`},D={key:1,class:`rounded-2xl border border-dashed border-gray-300 p-12 text-center`},O={class:`text-sm text-muted`},k={key:2,class:`overflow-hidden rounded-2xl border border-card-border bg-white shadow-[0_1px_2px_rgba(24,24,48,0.04),0_10px_28px_rgba(24,24,48,0.04)]`},A={class:`w-full text-sm`},j={class:`divide-y divide-[#F4F3F9]`},M=[`onClick`],N={class:`px-5.5 py-4 text-[14.5px] font-semibold text-ink`},P={class:`px-5.5 py-4 text-[13px] text-faint`},F={key:3,class:`mt-4 flex justify-center`},I=s({__name:`TaxonomyListView`,setup(s){let I=b(),L=v(),R=x(),{can:z}=y(),B=p(),V=w(),H=f(()=>I.params.type),U=f(()=>B.taxonomyTypes[H.value]),W=f(()=>U.value?.fields.find(e=>e.field_type===`text/plain`)?.name??`id`),G=e([]),K=e(0),q=e(1),J=e(!1),Y=e(``);function X(e){return typeof e!=`string`||!e?`—`:new Date(e).toLocaleDateString(void 0,{year:`numeric`,month:`short`,day:`numeric`})}async function Z(e){J.value=!0;let t=Y.value.trim();if(t===``){let t=V.getPage(H.value,e,50);if(t){G.value=t,K.value=V.total,J.value=!1;return}}let n=t===``?``:`&search=${encodeURIComponent(t)}`,r=await R.get(`/taxonomy/${H.value}?page=${e}&per_page=50${n}`);J.value=!1,r.ok&&(G.value=r.data,K.value=r.meta?.total??r.data.length,t===``&&(V.total=K.value,V.setPage(H.value,e,50,r.data)))}let Q=_(()=>{q.value=1,Z(1)},300);g(()=>{Z(q.value)}),u(H,()=>{q.value=1,G.value=[],Z(1)});function ne(e){q.value=e,Z(e)}function re(e){L.push({name:`taxonomy-edit`,params:{type:H.value,id:String(e.id)}})}function $(){L.push({name:`taxonomy-new`,params:{type:H.value}})}return(e,s)=>(t(),o(`div`,null,[a(`div`,T,[a(`h1`,ee,h(U.value?.label??H.value),1),i(z)(`taxonomy:create`)?(t(),o(`button`,{key:0,type:`button`,class:`inline-flex items-center gap-1.75 rounded-[11px] bg-indigo-600 px-4 py-2.5 text-[13.5px] font-semibold text-white shadow-[0_3px_10px_rgba(91,87,232,0.3)] transition-all hover:bg-indigo-700 hover:shadow-[0_6px_18px_rgba(91,87,232,0.4)]`,onClick:$},[s[2]||=a(`svg`,{width:`17`,height:`17`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`},[a(`path`,{d:`M12 5v14`}),a(`path`,{d:`M5 12h14`})],-1),d(` New `+h(U.value?.label??`Term`),1)])):m(``,!0)]),a(`div`,te,[s[3]||=a(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.8`,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:`shrink-0 text-faint`},[a(`path`,{d:`M21 21l-4.3-4.3`}),a(`path`,{d:`M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16z`})],-1),r(a(`input`,{"onUpdate:modelValue":s[0]||=e=>Y.value=e,type:`text`,placeholder:`Search terms…`,class:`w-full bg-transparent text-ink outline-none placeholder:text-faint`,onInput:s[1]||=(...e)=>i(Q)&&i(Q)(...e)},null,544),[[S,Y.value]])]),J.value?(t(),o(`div`,E,[(t(),o(l,null,n(6,e=>a(`div`,{key:e,class:`h-12 animate-pulse rounded-[10px] bg-gray-100`})),64))])):G.value.length===0?(t(),o(`div`,D,[a(`p`,O,h(Y.value.trim()===``?`No terms yet.`:`No results for “${Y.value.trim()}”.`),1),i(z)(`taxonomy:create`)&&Y.value.trim()===``?(t(),o(`button`,{key:0,type:`button`,class:`mt-3 text-sm font-medium text-indigo-600 hover:text-indigo-800`,onClick:$},` Create the first one → `)):m(``,!0)])):(t(),o(`div`,k,[a(`table`,A,[s[4]||=a(`thead`,{class:`text-[11.5px] font-bold uppercase tracking-[.06em] text-faint`},[a(`tr`,{class:`border-b border-divider`},[a(`th`,{class:`px-5.5 py-3.5 text-left`},`Name`),a(`th`,{class:`px-5.5 py-3.5 text-left`},`Updated`)])],-1),a(`tbody`,j,[(t(!0),o(l,null,n(G.value,e=>(t(),o(`tr`,{key:String(e.id),class:`cursor-pointer transition-colors hover:bg-[#FAFAFE]`,onClick:t=>re(e)},[a(`td`,N,h(e[W.value]??`—`),1),a(`td`,P,h(X(e.updated_at)),1)],8,M))),128))])])])),!J.value&&K.value>i(50)?(t(),o(`div`,F,[c(C,{total:K.value,page:q.value,"per-page":i(50),"onUpdate:page":ne},null,8,[`total`,`page`,`per-page`])])):m(``,!0)]))}});export{I as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as e,E as t,O as ee,P as n,W as r,c as i,d as a,g as o,i as s,l as c,s as l,u,ut as d,w as te}from"./schema-B-RKX_ep.js";import{c as f,d as p,l as m,n as h,o as g,s as _,t as v,u as y}from"./index-
|
|
1
|
+
import{B as e,E as t,O as ee,P as n,W as r,c as i,d as a,g as o,i as s,l as c,s as l,u,ut as d,w as te}from"./schema-B-RKX_ep.js";import{c as f,d as p,l as m,n as h,o as g,s as _,t as v,u as y}from"./index-s-2X8XCa.js";import{t as ne}from"./useNotification-CEPVkHak.js";import{t as re}from"./ConfirmDialog-B7nxdDge.js";import{t as ie}from"./users-DVibZ_HD.js";var ae={key:0,class:`flex items-center justify-center py-20`},oe={key:1,class:`mx-auto max-w-lg`},se={class:`mb-6 flex items-start justify-between gap-4`},ce={class:`text-[26px] font-bold tracking-tight text-ink`},le={class:`flex shrink-0 items-center gap-2`},ue=[`disabled`],de=[`disabled`],b={key:0,class:`mb-5 rounded-md border border-amber-200 bg-amber-50 p-4`,role:`alert`},x={class:`flex items-center gap-2`},S=[`value`],C={key:1,class:`mb-5 rounded-md border border-amber-200 bg-amber-50 p-4`,role:`alert`},w={class:`flex items-center gap-2`},T=[`value`],E=[`disabled`],D={key:0},O=[`disabled`],k=[`value`],A={key:0,class:`mt-1 text-xs text-gray-400`},j={key:1,class:`text-sm text-red-600`,role:`alert`},M=[`disabled`],N=o({__name:`UserFormView`,setup(o){let N=_(),P=f(),F=v(),{can:I,rolesBelow:L}=h(),R=ne(),fe=g(),z=ie(),B=l(()=>N.params.id),V=l(()=>!!B.value),H=l(()=>fe.id===B.value),U=e(``),W=e(``),G=e(!1),K=e(!1),q=e(``),J=e(null),Y=e(!1),X=e(null),Z=e(!1),Q=e(!1);te(async()=>{if(!V.value||!B.value){W.value=L()[0]?.name??``;return}G.value=!0;let e=z.users.find(e=>e.id===B.value);if(e){U.value=e.email,W.value=e.role,G.value=!1;return}let t=await F.get(`/users/${B.value}`);G.value=!1,t.ok&&(U.value=t.data.email,W.value=t.data.role,z.setUser(t.data))});async function pe(){if(q.value=``,K.value=!0,V.value){let e=await F.patch(`/users/${B.value}`,{email:U.value.trim(),role:W.value});if(K.value=!1,!e.ok){q.value=e.error.message;return}z.setUser(e.data),R.success(`User updated.`)}else{let e=await F.post(`/users`,{email:U.value.trim(),role:W.value});if(K.value=!1,!e.ok){q.value=e.error.message;return}z.setUser(e.data),J.value=e.data.temporary_password??null,R.success(`User created.`)}}async function $(e){try{await navigator.clipboard.writeText(e),Y.value=!0,setTimeout(()=>{Y.value=!1},2e3)}catch{}}async function me(){if(!B.value)return;Z.value=!0;let e=await F.post(`/users/${B.value}/reset-password`,{});Z.value=!1,e.ok?(X.value=e.data.temporary_password,Y.value=!1):R.error(e.error.message)}async function he(){if(Q.value=!1,!B.value)return;K.value=!0;let e=await F.del(`/users/${B.value}`);if(K.value=!1,!e.ok){q.value=e.error.message;return}z.removeUser(B.value),P.push({name:`user-list`})}let ge=l(()=>V.value?U.value||`Edit user`:`New user`);return(e,o)=>G.value?(t(),a(`div`,ae,[...o[5]||=[i(`span`,{class:`inline-block h-6 w-6 animate-spin rounded-full border-2 border-indigo-600 border-t-transparent`,"aria-hidden":`true`},null,-1)]])):(t(),a(`div`,oe,[i(`div`,se,[i(`h1`,ce,d(ge.value),1),i(`div`,le,[r(I)(`users:edit`)&&V.value&&!H.value?(t(),a(`button`,{key:0,type:`button`,disabled:Z.value,class:`rounded-md px-3 py-2 text-[13px] font-semibold text-[#3D3D52] ring-1 ring-inset ring-gray-300 hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-50`,onClick:me},d(Z.value?`Resetting…`:`Reset password`),9,ue)):u(``,!0),r(I)(`users:delete`)&&V.value&&!H.value?(t(),a(`button`,{key:1,type:`button`,disabled:K.value,class:`rounded-md px-3 py-2 text-sm font-medium text-red-600 ring-1 ring-inset ring-red-300 hover:bg-red-50 disabled:cursor-not-allowed disabled:opacity-50`,onClick:o[0]||=e=>Q.value=!0},` Delete `,8,de)):u(``,!0)])]),J.value?(t(),a(`div`,b,[o[6]||=i(`p`,{class:`mb-2 text-sm font-medium text-amber-800`},` User created. Share this temporary password — it will not be shown again. `,-1),i(`div`,x,[i(`input`,{value:J.value,type:`text`,readonly:``,class:`flex-1 rounded-md border border-amber-200 bg-white px-3 py-1.5 font-mono text-sm`},null,8,S),i(`button`,{type:`button`,class:`shrink-0 rounded-md bg-amber-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-amber-700`,onClick:o[1]||=e=>$(J.value)},d(Y.value?`Copied!`:`Copy`),1)])])):u(``,!0),X.value?(t(),a(`div`,C,[o[7]||=i(`p`,{class:`mb-2 text-sm font-medium text-amber-800`},` Password reset. Share this temporary password — it will not be shown again. `,-1),i(`div`,w,[i(`input`,{value:X.value,type:`text`,readonly:``,class:`flex-1 rounded-md border border-amber-200 bg-white px-3 py-1.5 font-mono text-sm`},null,8,T),i(`button`,{type:`button`,class:`shrink-0 rounded-md bg-amber-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-amber-700`,onClick:o[2]||=e=>$(X.value)},d(Y.value?`Copied!`:`Copy`),1)])])):u(``,!0),i(`form`,{class:`space-y-5`,novalidate:``,onSubmit:p(pe,[`prevent`])},[i(`div`,null,[o[8]||=i(`label`,{for:`user-email`,class:`block text-[13px] font-semibold text-[#3D3D52]`},`Email`,-1),n(i(`input`,{id:`user-email`,"onUpdate:modelValue":o[3]||=e=>U.value=e,type:`email`,required:``,autocomplete:`email`,disabled:K.value,class:`mt-1 block w-full rounded-md border border-gray-300 px-3 py-2 text-sm shadow-sm focus:border-indigo-400 focus:outline-none focus:ring-2 focus:ring-indigo-200 disabled:cursor-not-allowed disabled:opacity-60`},null,8,E),[[y,U.value]])]),H.value?u(``,!0):(t(),a(`div`,D,[o[10]||=i(`label`,{for:`user-role`,class:`block text-[13px] font-semibold text-[#3D3D52]`},`Role`,-1),n(i(`select`,{id:`user-role`,"onUpdate:modelValue":o[4]||=e=>W.value=e,disabled:K.value||r(L)().length===0,class:`mt-1 block w-full rounded-md border border-gray-300 px-3 py-2 text-sm shadow-sm focus:border-indigo-400 focus:outline-none focus:ring-2 focus:ring-indigo-200 disabled:cursor-not-allowed disabled:opacity-60`},[o[9]||=i(`option`,{value:``,disabled:``},`Select a role`,-1),(t(!0),a(s,null,ee(r(L)(),e=>(t(),a(`option`,{key:e.name,value:e.name},d(e.label),9,k))),128))],8,O),[[m,W.value]]),r(L)().length===0?(t(),a(`p`,A,` No assignable roles available. `)):u(``,!0)])),q.value?(t(),a(`p`,j,d(q.value),1)):u(``,!0),(V.value?r(I)(`users:edit`):r(I)(`users:create`))?(t(),a(`button`,{key:2,type:`submit`,disabled:K.value||!U.value.trim()||!H.value&&!W.value,class:`w-full rounded-md bg-indigo-600 px-4 py-2 text-sm font-semibold text-white hover:bg-indigo-700 disabled:cursor-not-allowed disabled:opacity-50`},d(K.value?`Saving…`:V.value?`Save changes`:`Create user`),9,M)):u(``,!0)],32),Q.value?(t(),c(re,{key:2,message:`Are you sure you want to delete this user? This action cannot be undone.`,"on-confirm":he,"on-cancel":()=>Q.value=!1},null,8,[`on-cancel`])):u(``,!0)]))}});export{N as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as e,E as t,O as n,P as r,W as i,c as a,d as o,g as s,i as c,m as l,s as u,u as d,ut as f,w as p}from"./schema-B-RKX_ep.js";import{c as m,n as h,t as g,u as _}from"./index-
|
|
1
|
+
import{B as e,E as t,O as n,P as r,W as i,c as a,d as o,g as s,i as c,m as l,s as u,u as d,ut as f,w as p}from"./schema-B-RKX_ep.js";import{c as m,n as h,t as g,u as _}from"./index-s-2X8XCa.js";import{t as v}from"./users-DVibZ_HD.js";var y={class:`mb-5.5 flex flex-wrap items-center justify-between gap-4`},b={key:0,class:`space-y-2`},x={key:1,class:`mb-4 flex h-9.5 items-center gap-2 rounded-[10px] border border-card-border bg-[#FBFBFD] px-2.75 text-[13px] transition-colors focus-within:border-indigo-400`},S={key:2,class:`rounded-2xl border border-dashed border-gray-300 p-12 text-center text-sm text-muted`},C={key:3,class:`rounded-2xl border border-dashed border-gray-300 p-12 text-center text-sm text-muted`},w={key:4,class:`overflow-hidden rounded-2xl border border-card-border bg-white shadow-[0_1px_2px_rgba(24,24,48,0.04),0_10px_28px_rgba(24,24,48,0.04)]`},T={class:`w-full text-sm`},E={class:`divide-y divide-[#F4F3F9]`},D=[`onClick`],O={class:`px-5.5 py-4 text-[14.5px] font-semibold text-ink`},k={class:`px-5.5 py-4`},A={class:`rounded-[7px] bg-indigo-50 px-2.5 py-1 font-mono text-xs font-medium text-indigo-600`},j={class:`px-5.5 py-4 text-[13px] text-faint`},M=s({__name:`UserListView`,setup(s){let M=m(),N=g(),{can:P}=h(),F=v(),I=e(``),L=u(()=>{let e=I.value.trim().toLowerCase();return e===``?F.users:F.users.filter(t=>t.email.toLowerCase().includes(e))});function R(e){return typeof e!=`string`||!e?`—`:new Date(e).toLocaleDateString(void 0,{year:`numeric`,month:`short`,day:`numeric`})}p(async()=>{if(F.users.length>0)return;F.loading=!0;let e=await N.get(`/users`);F.loading=!1,e.ok&&F.setUsers(e.data)});function z(e){M.push({name:`user-edit`,params:{id:e.id}})}function B(){M.push({name:`user-new`})}return(e,s)=>(t(),o(`div`,null,[a(`div`,y,[s[2]||=a(`h1`,{class:`text-[26px] font-bold tracking-tight text-ink`},`Users`,-1),i(P)(`users:create`)?(t(),o(`button`,{key:0,type:`button`,class:`inline-flex items-center gap-1.75 rounded-[11px] bg-indigo-600 px-4 py-2.5 text-[13.5px] font-semibold text-white shadow-[0_3px_10px_rgba(91,87,232,0.3)] transition-all hover:bg-indigo-700 hover:shadow-[0_6px_18px_rgba(91,87,232,0.4)]`,onClick:B},[...s[1]||=[a(`svg`,{width:`17`,height:`17`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`},[a(`path`,{d:`M12 5v14`}),a(`path`,{d:`M5 12h14`})],-1),l(` New user `,-1)]])):d(``,!0)]),i(F).loading?(t(),o(`div`,b,[(t(),o(c,null,n(5,e=>a(`div`,{key:e,class:`h-12 animate-pulse rounded-[10px] bg-gray-100`})),64))])):i(F).users.length>0?(t(),o(`div`,x,[s[3]||=a(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.8`,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:`shrink-0 text-faint`},[a(`path`,{d:`M21 21l-4.3-4.3`}),a(`path`,{d:`M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16z`})],-1),r(a(`input`,{"onUpdate:modelValue":s[0]||=e=>I.value=e,type:`text`,placeholder:`Search users…`,class:`w-full bg-transparent text-ink outline-none placeholder:text-faint`},null,512),[[_,I.value]])])):d(``,!0),!i(F).loading&&i(F).users.length===0?(t(),o(`div`,S,` No users found. `)):!i(F).loading&&L.value.length===0?(t(),o(`div`,C,` No results for “`+f(I.value.trim())+`”. `,1)):i(F).loading?d(``,!0):(t(),o(`div`,w,[a(`table`,T,[s[4]||=a(`thead`,{class:`text-[11.5px] font-bold uppercase tracking-[.06em] text-faint`},[a(`tr`,{class:`border-b border-divider`},[a(`th`,{class:`px-5.5 py-3.5 text-left`},`Email`),a(`th`,{class:`px-5.5 py-3.5 text-left`},`Role`),a(`th`,{class:`px-5.5 py-3.5 text-left`},`Created`)])],-1),a(`tbody`,E,[(t(!0),o(c,null,n(L.value,e=>(t(),o(`tr`,{key:e.id,class:`cursor-pointer transition-colors hover:bg-[#FAFAFE]`,onClick:t=>z(e)},[a(`td`,O,f(e.email),1),a(`td`,k,[a(`span`,A,f(e.role),1)]),a(`td`,j,f(R(e.created_at)),1)],8,D))),128))])])]))]))}});export{M as default};
|
|
@@ -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-WELPH4Vh.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-8UW4RWd8.js`),__vite__mapDeps([2,1]))},{path:`content/:type`,name:`content-list`,component:()=>$(()=>import(`./ContentListView-BiPHUBHa.js`),__vite__mapDeps([3,1,4,5]))},{path:`content/:type/new`,name:`content-new`,component:()=>$(()=>import(`./ContentFormView-vaIInaYs.js`),__vite__mapDeps([6,1,7,8,4,9,10]))},{path:`content/:type/settings`,name:`content-settings`,component:()=>$(()=>import(`./ContentSettingsView-DPKF5MRL.js`),__vite__mapDeps([11,1,8])),meta:{permission:`content:edit`}},{path:`content/:type/:id`,name:`content-edit`,component:()=>$(()=>import(`./ContentFormView-vaIInaYs.js`),__vite__mapDeps([6,1,7,8,4,9,10]))},{path:`taxonomy/:type`,name:`taxonomy-list`,component:()=>$(()=>import(`./TaxonomyListView-BB7iTfjb.js`),__vite__mapDeps([12,1,5,13]))},{path:`taxonomy/:type/new`,name:`taxonomy-new`,component:()=>$(()=>import(`./TaxonomyFormView-BdRO9L-7.js`),__vite__mapDeps([14,1,7,8,9,13]))},{path:`taxonomy/:type/:id`,name:`taxonomy-edit`,component:()=>$(()=>import(`./TaxonomyFormView-BdRO9L-7.js`),__vite__mapDeps([14,1,7,8,9,13]))},{path:`media`,name:`media-library`,component:()=>$(()=>import(`./MediaLibraryView-BcdiJ_7a.js`),__vite__mapDeps([15,1,8,9,10,5,16]))},{path:`media/:id`,name:`media-detail`,component:()=>$(()=>import(`./MediaDetailView-BT66fV9b.js`),__vite__mapDeps([17,1,8,9,16]))},{path:`users`,name:`user-list`,component:()=>$(()=>import(`./UserListView-BnlU2Ovr.js`),__vite__mapDeps([18,1,19])),meta:{permission:`users:read`}},{path:`users/new`,name:`user-new`,component:()=>$(()=>import(`./UserFormView-C2p-FV0A.js`),__vite__mapDeps([20,1,8,9,19])),meta:{permission:`users:read`}},{path:`users/:id`,name:`user-edit`,component:()=>$(()=>import(`./UserFormView-C2p-FV0A.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-DPpdT3Ro.js","assets/schema-B-RKX_ep.js","assets/ChangePasswordView-B0wg3O_I.js","assets/ContentListView-DM4xggDx.js","assets/content--2XYr_UQ.js","assets/Pagination-BIf7mQy7.js","assets/ContentFormView-D92O0ICh.js","assets/ComputedDisplay-C2FpwSB1.js","assets/useNotification-CEPVkHak.js","assets/ConfirmDialog-B7nxdDge.js","assets/useTabIndicator-CvEsGBJh.js","assets/ContentSettingsView-B9UHNleT.js","assets/TaxonomyListView-Dkga11a3.js","assets/taxonomy-DC-6wyg3.js","assets/TaxonomyFormView-CZlOjxOY.js","assets/MediaLibraryView-Dx9t8r8T.js","assets/media-DvQfZD4o.js","assets/MediaDetailView-OUzzhO1B.js","assets/UserListView-B6_Hdemt.js","assets/users-DVibZ_HD.js","assets/UserFormView-CaOcoKX5.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-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 +1 @@
|
|
|
1
|
-
import{r as e}from"./index-
|
|
1
|
+
import{r as e}from"./index-s-2X8XCa.js";var t={INTERNAL_ERROR:`Something went wrong. Please try again.`,NOT_FOUND:`The requested item could not be found.`,STORAGE_ERROR:`File storage is unavailable. Please try again later.`,MEDIA_IN_USE:`This file is still in use and cannot be deleted.`,INSUFFICIENT_PERMISSION:`You do not have permission to do that.`,RATE_LIMITED:`Too many requests. Please wait before trying again.`,UNAUTHORIZED:`Your session has expired. Please log in again.`,TOKEN_EXPIRED:`Your session has expired. Please log in again.`};function n(){let n=e();return{success:e=>n.addToast(`success`,e),error:e=>n.addToast(`error`,e),warning:e=>n.addToast(`warning`,e),apiError:(e,r)=>n.addToast(`error`,t[e]??r)}}export{n as t};
|
package/dist/codegen/index.cjs
CHANGED
|
@@ -35,7 +35,8 @@ var COMPONENT_NAME = {
|
|
|
35
35
|
"file-upload": "MediaUpload",
|
|
36
36
|
select: "EnumSelect",
|
|
37
37
|
"typeahead-select": "ReferenceSelect",
|
|
38
|
-
"paragraph-embed": "ParagraphEmbed"
|
|
38
|
+
"paragraph-embed": "ParagraphEmbed",
|
|
39
|
+
"computed-display": "ComputedDisplay"
|
|
39
40
|
};
|
|
40
41
|
var COMPONENT_IMPORT = {
|
|
41
42
|
TextInput: `${ADMIN_PKG}/src/components/fields/TextInput.vue`,
|
|
@@ -46,7 +47,8 @@ var COMPONENT_IMPORT = {
|
|
|
46
47
|
MediaUpload: `${ADMIN_PKG}/src/components/fields/MediaUpload.vue`,
|
|
47
48
|
EnumSelect: `${ADMIN_PKG}/src/components/fields/EnumSelect.vue`,
|
|
48
49
|
ReferenceSelect: `${ADMIN_PKG}/src/components/fields/ReferenceSelect.vue`,
|
|
49
|
-
ParagraphEmbed: `${ADMIN_PKG}/src/components/fields/ParagraphEmbed.vue
|
|
50
|
+
ParagraphEmbed: `${ADMIN_PKG}/src/components/fields/ParagraphEmbed.vue`,
|
|
51
|
+
ComputedDisplay: `${ADMIN_PKG}/src/components/fields/ComputedDisplay.vue`
|
|
50
52
|
};
|
|
51
53
|
function esc(s) {
|
|
52
54
|
return s.replace(/\\/g, "\\\\").replace(/'/g, "\\'");
|
|
@@ -93,6 +95,9 @@ function renderField(field, indent) {
|
|
|
93
95
|
const compName = COMPONENT_NAME[field.ui_component.component];
|
|
94
96
|
const fieldObj = buildFieldObject(field);
|
|
95
97
|
const attr = indent + " ";
|
|
98
|
+
if (field.ui_component.component === "computed-display") {
|
|
99
|
+
return [`${indent}<${compName}`, `${attr}:field="${fieldObj}"`, `${indent}/>`].join("\n");
|
|
100
|
+
}
|
|
96
101
|
const lines = [`${indent}<${compName}`];
|
|
97
102
|
lines.push(`${attr}:field="${fieldObj}"`);
|
|
98
103
|
if (field.ui_component.component === "paragraph-embed") {
|
package/dist/codegen/index.js
CHANGED
|
@@ -9,7 +9,8 @@ var COMPONENT_NAME = {
|
|
|
9
9
|
"file-upload": "MediaUpload",
|
|
10
10
|
select: "EnumSelect",
|
|
11
11
|
"typeahead-select": "ReferenceSelect",
|
|
12
|
-
"paragraph-embed": "ParagraphEmbed"
|
|
12
|
+
"paragraph-embed": "ParagraphEmbed",
|
|
13
|
+
"computed-display": "ComputedDisplay"
|
|
13
14
|
};
|
|
14
15
|
var COMPONENT_IMPORT = {
|
|
15
16
|
TextInput: `${ADMIN_PKG}/src/components/fields/TextInput.vue`,
|
|
@@ -20,7 +21,8 @@ var COMPONENT_IMPORT = {
|
|
|
20
21
|
MediaUpload: `${ADMIN_PKG}/src/components/fields/MediaUpload.vue`,
|
|
21
22
|
EnumSelect: `${ADMIN_PKG}/src/components/fields/EnumSelect.vue`,
|
|
22
23
|
ReferenceSelect: `${ADMIN_PKG}/src/components/fields/ReferenceSelect.vue`,
|
|
23
|
-
ParagraphEmbed: `${ADMIN_PKG}/src/components/fields/ParagraphEmbed.vue
|
|
24
|
+
ParagraphEmbed: `${ADMIN_PKG}/src/components/fields/ParagraphEmbed.vue`,
|
|
25
|
+
ComputedDisplay: `${ADMIN_PKG}/src/components/fields/ComputedDisplay.vue`
|
|
24
26
|
};
|
|
25
27
|
function esc(s) {
|
|
26
28
|
return s.replace(/\\/g, "\\\\").replace(/'/g, "\\'");
|
|
@@ -67,6 +69,9 @@ function renderField(field, indent) {
|
|
|
67
69
|
const compName = COMPONENT_NAME[field.ui_component.component];
|
|
68
70
|
const fieldObj = buildFieldObject(field);
|
|
69
71
|
const attr = indent + " ";
|
|
72
|
+
if (field.ui_component.component === "computed-display") {
|
|
73
|
+
return [`${indent}<${compName}`, `${attr}:field="${fieldObj}"`, `${indent}/>`].join("\n");
|
|
74
|
+
}
|
|
70
75
|
const lines = [`${indent}<${compName}`];
|
|
71
76
|
lines.push(`${attr}:field="${fieldObj}"`);
|
|
72
77
|
if (field.ui_component.component === "paragraph-embed") {
|
package/dist/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
|
|
7
7
|
<title>Manguito CMS</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-s-2X8XCa.js"></script>
|
|
9
9
|
<link rel="modulepreload" crossorigin href="/assets/schema-B-RKX_ep.js">
|
|
10
10
|
<link rel="stylesheet" crossorigin href="/assets/index-B7BOeskw.css">
|
|
11
11
|
</head>
|
package/index.html
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
|
|
7
|
+
<title>Manguito CMS</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="app"></div>
|
|
11
|
+
<script type="module" src="/src/main.ts"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bobbykim/manguito-cms-admin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Bobby Kim <bobby.sihun.kim@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/bobbykim89/manguito-cms",
|
|
@@ -21,33 +21,37 @@
|
|
|
21
21
|
"main": "./dist/index.js",
|
|
22
22
|
"types": "./dist/index.d.ts",
|
|
23
23
|
"files": [
|
|
24
|
-
"dist"
|
|
24
|
+
"dist",
|
|
25
|
+
"src",
|
|
26
|
+
"public",
|
|
27
|
+
"index.html",
|
|
28
|
+
"vite.config.ts"
|
|
25
29
|
],
|
|
26
30
|
"dependencies": {
|
|
27
31
|
"@fontsource/jetbrains-mono": "^5.2.8",
|
|
28
32
|
"@fontsource/plus-jakarta-sans": "^5.2.8",
|
|
33
|
+
"@tailwindcss/vite": "^4.3.2",
|
|
29
34
|
"@tiptap/extension-link": "^2.27.2",
|
|
30
35
|
"@tiptap/starter-kit": "^2.27.2",
|
|
31
36
|
"@tiptap/vue-3": "^2.27.2",
|
|
37
|
+
"@vitejs/plugin-vue": "^6.0.7",
|
|
32
38
|
"@vueuse/core": "^12.8.2",
|
|
33
39
|
"pinia": "^3.0.4",
|
|
40
|
+
"tailwindcss": "^4.3.2",
|
|
41
|
+
"vite": "^8.1.3",
|
|
34
42
|
"vue": "^3.5.39",
|
|
35
43
|
"vue-router": "^4.6.4",
|
|
36
|
-
"@bobbykim/manguito-cms-core": "0.
|
|
44
|
+
"@bobbykim/manguito-cms-core": "0.2.0"
|
|
37
45
|
},
|
|
38
46
|
"devDependencies": {
|
|
39
|
-
"@tailwindcss/vite": "^4.3.2",
|
|
40
47
|
"@testing-library/vue": "^8.1.0",
|
|
41
48
|
"@types/jsdom": "^28.0.3",
|
|
42
|
-
"@vitejs/plugin-vue": "^6.0.7",
|
|
43
49
|
"@vue/test-utils": "^2.4.11",
|
|
44
50
|
"dotenv-cli": "latest",
|
|
45
51
|
"jsdom": "^29.1.1",
|
|
46
52
|
"msw": "^2.15.0",
|
|
47
|
-
"tailwindcss": "^4.3.2",
|
|
48
53
|
"tsup": "^8.5.1",
|
|
49
54
|
"typescript": "^6.0.3",
|
|
50
|
-
"vite": "^8.1.3",
|
|
51
55
|
"vitest": "^4.1.10",
|
|
52
56
|
"vue-tsc": "^3.3.7"
|
|
53
57
|
},
|
|
Binary file
|