adminizer 4.1.0-build.13 → 4.1.0-build.14

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.
Files changed (131) hide show
  1. package/assets/{VanillaJSONEditor-BGC0iJ01.js → VanillaJSONEditor-D-Lx670g.js} +2 -2
  2. package/assets/add-BP_u3Tjl.js +1 -0
  3. package/assets/add-form-nffmiYTh.js +1 -0
  4. package/assets/add-group-D4vcHlm-.js +1 -0
  5. package/assets/{add-group-form-BUM07NJS.js → add-group-form-gNJW11-q.js} +1 -1
  6. package/assets/add-user-DWh3Nas0.js +1 -0
  7. package/assets/add-user-form-BJ0FsZYJ.js +1 -0
  8. package/assets/{app-BYldMVaW.css → app-C3OdwOHy.css} +1 -1
  9. package/assets/{app-layout-YPlKN2l5.js → app-layout-DYsRFUuP.js} +1 -1
  10. package/assets/{app-shell-D6Uf68EA.js → app-shell-Dd9Eknik.js} +1 -1
  11. package/assets/app-sidebar-BOmu6-Sl.js +1 -0
  12. package/assets/{app-sidebar-header-BTKq0Dr0.js → app-sidebar-header-CoXSzWxk.js} +1 -1
  13. package/assets/app.js +14 -14
  14. package/assets/{breadcrumbs-B4LOvzuL.js → breadcrumbs-BmAq4fHT.js} +1 -1
  15. package/assets/{button-CTOOfwvn.js → button-C9B_5Jf_.js} +1 -1
  16. package/assets/checkbox-Fg27sL_1.js +1 -0
  17. package/assets/{compiler-runtime-tM4jBQ-T.js → compiler-runtime-hB6dAw2d.js} +1 -1
  18. package/assets/dashboard-BOltB2Hq.css +1 -0
  19. package/assets/dashboard-Ddh74NBQ.js +3 -0
  20. package/assets/{date-picker-DdGpxs8q.js → date-picker-DI1cCO7K.js} +1 -1
  21. package/assets/{dropdown-menu-CsGmdVIn.js → dropdown-menu-Bhj17ENm.js} +1 -1
  22. package/assets/{field-renderer-Q3ajtfjk.js → field-renderer-DVHZF6HS.js} +3 -3
  23. package/assets/form-BgWdwvz1.js +1 -0
  24. package/assets/form-DgtErfln.js +1 -0
  25. package/assets/{geo-json-CFYMCghL.js → geo-json-BjiyTtMu.js} +1 -1
  26. package/assets/{handsontable-BCnjOpBr.js → handsontable-4mjU_b0n.js} +1 -1
  27. package/assets/home-CHntBHJa.js +2 -0
  28. package/assets/{icon-Bz9BMaD0.js → icon-Dt0vBgDO.js} +1 -1
  29. package/assets/index-B8BS9wMC.js +1 -0
  30. package/assets/{index-Mx04mBJl.js → index-BC0yfOHo.js} +1 -1
  31. package/assets/{index-m5itSoCR.js → index-BKCgnGj_.js} +1 -1
  32. package/assets/{index-C5OL14ES.js → index-BbXEMx9n.js} +1 -1
  33. package/assets/{index-DnbQEoxZ.js → index-BykbU6Ee.js} +1 -1
  34. package/assets/index-CaJgc5EZ.js +1 -0
  35. package/assets/{index-Cb_qrizV.js → index-Cgp8OfuI.js} +1 -1
  36. package/assets/{index-CGjCQBqR.js → index-Cw5o84pO.js} +1 -1
  37. package/assets/index-DrWfGwtf.js +1 -0
  38. package/assets/{init-user-CotD_o5_.js → init-user-JfCKJ5Ce.js} +1 -1
  39. package/assets/{input-DF7Ue23C.js → input-CvRbIbk4.js} +1 -1
  40. package/assets/{input-error-BBygona6.js → input-error-DMK7cAt7.js} +1 -1
  41. package/assets/{label-C2tlefOv.js → label-CSLFe9Bz.js} +1 -1
  42. package/assets/list-B2Oa5O_Q.js +1 -0
  43. package/assets/{list-table-Cz8Wgfsa.js → list-table-DA9MhywL.js} +2 -2
  44. package/assets/{login-B7br6gt5.js → login-DQwGtdis.js} +1 -1
  45. package/assets/manifest.json +588 -568
  46. package/assets/{material-icon-CItZiB53.js → material-icon-BJg8o_fs.js} +1 -1
  47. package/assets/module-DWXp59Vg.js +1 -0
  48. package/assets/{monaco-editor-DqAqwxw4.js → monaco-editor-CJs0_GlD.js} +1 -1
  49. package/assets/{multi-select-CDlcaNFy.js → multi-select-BvRpAW8r.js} +1 -1
  50. package/assets/{nav-footer-CXKG3O4K.js → nav-footer-Bs4dmN1d.js} +1 -1
  51. package/assets/{nav-main-ByHRr3yf.js → nav-main-Bq3IMk4C.js} +1 -1
  52. package/assets/{nav-user-BVRKiqm-.js → nav-user-CbB22J5O.js} +1 -1
  53. package/assets/{pagination-render-CihJ7J2u.js → pagination-render-DuXDDbC_.js} +1 -1
  54. package/assets/{popover-_WN_Lj46.js → popover-DtoGI2b1.js} +1 -1
  55. package/assets/{register-CpRFo88B.js → register-BSogVF0h.js} +1 -1
  56. package/assets/{select-DYffGc49.js → select-BWepUw-9.js} +1 -1
  57. package/assets/{sidebar-B9HagQ6H.js → sidebar-CAHsHdjM.js} +2 -2
  58. package/assets/skeleton-COOcAA8f.js +1 -0
  59. package/assets/{sonner-Dzckw3U3.js → sonner-BI0IFOQN.js} +1 -1
  60. package/assets/{toast-editor-ZLOtXFu5.js → toast-editor-CMK7QtF1.js} +82 -82
  61. package/assets/{tooltip-CWVAD5oF.js → tooltip-DHwpLKOI.js} +1 -1
  62. package/assets/{use-appearance-Co6mO0dV.js → use-appearance-DRfIqTgw.js} +1 -1
  63. package/assets/{use-window-size-B8l6Bpkf.js → use-window-size-h0Sh_NvX.js} +1 -1
  64. package/assets/{user-info-DA4KTAOF.js → user-info-DFrmpJ4y.js} +1 -1
  65. package/assets/{user-menu-content-Biwi4u9j.js → user-menu-content-DPXQdERj.js} +1 -1
  66. package/assets/welcome-B4WCIXKf.js +1 -0
  67. package/controllers/dashboard.js +15 -1
  68. package/controllers/getAllWidgets.js +1 -1
  69. package/controllers/widgetsDB.js +2 -2
  70. package/helpers/accessRightsHelper.js +2 -2
  71. package/helpers/controllerHelper.js +1 -1
  72. package/helpers/inertiaAddHelper.js +1 -1
  73. package/index.d.ts +0 -1
  74. package/index.js +0 -1
  75. package/interfaces/adminpanelConfig.d.ts +0 -17
  76. package/interfaces/global.d.ts +3 -0
  77. package/interfaces/types.d.ts +1 -1
  78. package/lib/Adminizer.js +9 -5
  79. package/lib/catalog/Navigation.js +0 -1
  80. package/lib/media-manager/Items.js +0 -3
  81. package/lib/v4/DataAccessor.js +4 -3
  82. package/lib/v4/model/adapter/sequelize.js +8 -1
  83. package/lib/v4/model/adapter/waterline.js +5 -2
  84. package/lib/widgets/abstractAction.d.ts +1 -1
  85. package/lib/widgets/abstractCustom.d.ts +27 -12
  86. package/lib/widgets/abstractCustom.js +8 -2
  87. package/lib/widgets/abstractInfo.d.ts +1 -1
  88. package/lib/widgets/abstractInfo.js +1 -1
  89. package/lib/widgets/abstractLink.d.ts +1 -0
  90. package/lib/widgets/abstractSwitch.d.ts +1 -1
  91. package/lib/widgets/abstractWidgetBase.d.ts +1 -1
  92. package/lib/widgets/widgetHandler.d.ts +26 -3
  93. package/lib/widgets/widgetHandler.js +25 -25
  94. package/models/UserAP.d.ts +5 -2
  95. package/package.json +14 -8
  96. package/system/Router.js +6 -14
  97. package/system/bindAccessRights.js +0 -4
  98. package/system/bindDev.js +1 -0
  99. package/system/bindMediaManager.js +0 -1
  100. package/system/bindModels.js +7 -2
  101. package/system/bindNavigation.js +0 -1
  102. package/translations/ru.json +17 -8
  103. package/assets/add-EOP63mij.js +0 -1
  104. package/assets/add-form-DofA75xF.js +0 -1
  105. package/assets/add-group-CbKcu8bN.js +0 -1
  106. package/assets/add-user-FQ_0_L3C.js +0 -1
  107. package/assets/add-user-form-D1f_2noB.js +0 -1
  108. package/assets/app-sidebar-mh83eSsH.js +0 -1
  109. package/assets/checkbox-D9ub-v0l.js +0 -1
  110. package/assets/dashboard-BiLSHuF2.js +0 -1
  111. package/assets/form-D2gvtdQt.js +0 -1
  112. package/assets/form-EPWwr8yD.js +0 -1
  113. package/assets/home-Co9WBSjN.js +0 -2
  114. package/assets/index-DEzdKGnS.js +0 -1
  115. package/assets/index-DUXJYtOc.js +0 -1
  116. package/assets/index-Dllsp4Rk.js +0 -1
  117. package/assets/list-BrJBbAVm.js +0 -1
  118. package/assets/module-BA_EenoK.js +0 -1
  119. package/assets/welcome-C1kRbbWq.js +0 -1
  120. package/controllers/processInstallFinalize.d.ts +0 -1
  121. package/controllers/processInstallFinalize.js +0 -16
  122. package/controllers/processInstallStep.d.ts +0 -0
  123. package/controllers/processInstallStep.js +0 -122
  124. package/lib/installStepper/InstallStepAbstract.d.ts +0 -52
  125. package/lib/installStepper/InstallStepAbstract.js +0 -69
  126. package/lib/installStepper/finalizeStep.d.ts +0 -21
  127. package/lib/installStepper/finalizeStep.js +0 -48
  128. package/lib/installStepper/installStepper.d.ts +0 -40
  129. package/lib/installStepper/installStepper.js +0 -195
  130. package/system/bindInstallStepper.d.ts +0 -2
  131. package/system/bindInstallStepper.js +0 -23
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./VanillaJSONEditor-BGC0iJ01.js","./app.js","./app-BYldMVaW.css","./compiler-runtime-tM4jBQ-T.js","./index-Vcq4gwWv.js","./use-appearance-Co6mO0dV.js","./form-state-702tb_BV.js","./add-form-DofA75xF.js","./button-CTOOfwvn.js","./index-DUXJYtOc.js","./utils-DjqsqOe8.js","./icon-Bz9BMaD0.js","./label-C2tlefOv.js","./index-DEzdKGnS.js","./tooltip-CWVAD5oF.js","./index-Dllsp4Rk.js","./index-D5ir9iUV.js","./index-Mx04mBJl.js","./index-Cb_qrizV.js","./field-renderer-Q3ajtfjk.js","./checkbox-D9ub-v0l.js","./index-DwctwfU0.js","./check-LAUWAnlX.js","./createLucideIcon-BFG25zNo.js","./select-DYffGc49.js","./index-C5OL14ES.js","./index-DnbQEoxZ.js","./chevron-down-B5XuAFRu.js","./dynamic-controls-CSVVCONh.js","./input-DF7Ue23C.js","./multi-select-CDlcaNFy.js","./popover-_WN_Lj46.js","./index-CGjCQBqR.js","./search-BspystAk.js","./field-renderer-BlBZuSiD.css","./input-error-BBygona6.js","./move-left-BhKZRPb4.js","./loader-circle-Utah5tGx.js","./add-group-form-BUM07NJS.js","./add-user-form-D1f_2noB.js","./material-icon-CItZiB53.js","./app-shell-D6Uf68EA.js","./sidebar-B9HagQ6H.js","./app-sidebar-header-BTKq0Dr0.js","./breadcrumbs-B4LOvzuL.js","./chevron-right-D5q8rF7h.js","./nav-user-BVRKiqm-.js","./dropdown-menu-CsGmdVIn.js","./index-m5itSoCR.js","./user-info-DA4KTAOF.js","./user-menu-content-Biwi4u9j.js","./chevrons-up-down-kALltqHV.js","./app-sidebar-mh83eSsH.js","./nav-main-ByHRr3yf.js","./date-picker-DdGpxs8q.js","./chevron-left-CoMhTMUD.js","./form-EPWwr8yD.js","./geo-json-CFYMCghL.js","./trash-2-BoK5Xp2F.js","./handsontable-BCnjOpBr.js","./list-table-Cz8Wgfsa.js","./sonner-Dzckw3U3.js","./pagination-render-CihJ7J2u.js","./monaco-editor-DqAqwxw4.js","./use-window-size-B8l6Bpkf.js","./nav-footer-CXKG3O4K.js","./toast-editor-ZLOtXFu5.js"])))=>i.map(i=>d[i]);
2
- import{q as x,r as u,j as o,a as v,J as P,_ as t}from"./app.js";const D=(m,r,_)=>{const e=m[r];return e?typeof e=="function"?e():Promise.resolve(e):new Promise((s,n)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(n.bind(null,new Error("Unknown variable dynamic import: "+r+(r.split("/").length!==_?". Note that variables only represent file names one level deep.":""))))})};function L(){const m=x(),[r,_]=u.useState(null),[e,s]=u.useState(null),n=m.props.controls,l=async()=>{const{component:i,props:p}=n[0],d=(await D(Object.assign({"../components/VanillaJSONEditor.tsx":()=>t(()=>import("./VanillaJSONEditor-BGC0iJ01.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url),"../components/add-form.tsx":()=>t(()=>import("./add-form-DofA75xF.js"),__vite__mapDeps([7,1,2,3,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,6,35,36,37]),import.meta.url),"../components/add-group-form.tsx":()=>t(()=>import("./add-group-form-BUM07NJS.js"),__vite__mapDeps([38,1,2,3,8,9,10,11,12,13,29,20,16,15,21,17,22,23,14,18,36,37]),import.meta.url),"../components/add-user-form.tsx":()=>t(()=>import("./add-user-form-D1f_2noB.js"),__vite__mapDeps([39,1,2,3,11,10,8,9,12,13,29,24,15,16,25,26,21,18,27,23,22,20,17,14,35,40,36,37]),import.meta.url),"../components/app-shell.tsx":()=>t(()=>import("./app-shell-D6Uf68EA.js"),__vite__mapDeps([41,1,2,3,42,9,8,10,32,23,15,16,13,26,17,14,18]),import.meta.url),"../components/app-sidebar-header.tsx":()=>t(()=>import("./app-sidebar-header-BTKq0Dr0.js"),__vite__mapDeps([43,1,2,3,44,9,10,45,23,42,8,32,15,16,13,26,17,14,18,46,47,48,25,49,50,51,11,5]),import.meta.url),"../components/app-sidebar.tsx":()=>t(()=>import("./app-sidebar-mh83eSsH.js"),__vite__mapDeps([52,1,2,3,53,42,9,8,10,32,23,15,16,13,26,17,14,18,40,45,25,48,51]),import.meta.url),"../components/breadcrumbs.tsx":()=>t(()=>import("./breadcrumbs-B4LOvzuL.js"),__vite__mapDeps([44,1,2,3,9,10,45,23]),import.meta.url),"../components/date-picker.tsx":()=>t(()=>import("./date-picker-DdGpxs8q.js"),__vite__mapDeps([54,1,2,3,10,8,9,45,23,55,31,15,16,13,26,17]),import.meta.url),"../components/dynamic-controls.tsx":()=>t(()=>import("./dynamic-controls-CSVVCONh.js"),__vite__mapDeps([28,1,2]),import.meta.url),"../components/field-renderer.tsx":()=>t(()=>import("./field-renderer-Q3ajtfjk.js"),__vite__mapDeps([19,1,2,3,20,9,16,15,13,21,17,10,22,23,24,25,26,18,27,28,29,30,8,31,32,33,34]),import.meta.url),"../components/form.tsx":()=>t(()=>import("./form-EPWwr8yD.js"),__vite__mapDeps([56,1,2,6,7,3,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37]),import.meta.url),"../components/geo-json.tsx":()=>t(()=>import("./geo-json-CFYMCghL.js"),__vite__mapDeps([57,1,2,3,8,9,10,23,22,58]),import.meta.url),"../components/handsontable.tsx":()=>t(()=>import("./handsontable-BCnjOpBr.js"),__vite__mapDeps([59,1,2,5,3]),import.meta.url),"../components/icon.tsx":()=>t(()=>import("./icon-Bz9BMaD0.js"),__vite__mapDeps([11,1,2,3,10]),import.meta.url),"../components/input-error.tsx":()=>t(()=>import("./input-error-BBygona6.js"),__vite__mapDeps([35,1,2,3,10]),import.meta.url),"../components/list-table.tsx":()=>t(()=>import("./list-table-Cz8Wgfsa.js"),__vite__mapDeps([60,1,2,8,3,9,10,11,23,29,33,40,47,15,16,13,48,25,26,17,61,32,58,24,21,18,27,22,62,55,45]),import.meta.url),"../components/material-icon.tsx":()=>t(()=>import("./material-icon-CItZiB53.js"),__vite__mapDeps([40,1,2,3,10]),import.meta.url),"../components/monaco-editor.tsx":()=>t(()=>import("./monaco-editor-DqAqwxw4.js"),__vite__mapDeps([63,1,2,3,5,64]),import.meta.url),"../components/multi-select.tsx":()=>t(()=>import("./multi-select-CDlcaNFy.js"),__vite__mapDeps([30,1,2,3,8,9,10,13,31,15,16,26,17,32,23,33,27,22]),import.meta.url),"../components/nav-footer.tsx":()=>t(()=>import("./nav-footer-CXKG3O4K.js"),__vite__mapDeps([65,1,2,3,11,10,42,9,8,32,23,15,16,13,26,17,14,18]),import.meta.url),"../components/nav-main.tsx":()=>t(()=>import("./nav-main-ByHRr3yf.js").then(E=>E.n),__vite__mapDeps([53,1,2,3,42,9,8,10,32,23,15,16,13,26,17,14,18,40,45]),import.meta.url),"../components/nav-user.tsx":()=>t(()=>import("./nav-user-BVRKiqm-.js"),__vite__mapDeps([46,1,2,3,47,15,16,13,9,48,25,26,17,10,42,8,32,23,14,18,49,50,51]),import.meta.url),"../components/pagination-render.tsx":()=>t(()=>import("./pagination-render-CihJ7J2u.js"),__vite__mapDeps([62,1,2,3,10,8,9,55,23,45]),import.meta.url),"../components/toast-editor.tsx":()=>t(()=>import("./toast-editor-ZLOtXFu5.js"),__vite__mapDeps([66,1,2,3,4,64,5]),import.meta.url),"../components/user-info.tsx":()=>t(()=>import("./user-info-DA4KTAOF.js"),__vite__mapDeps([49,1,2,3,16,13,9,10]),import.meta.url),"../components/user-menu-content.tsx":()=>t(()=>import("./user-menu-content-Biwi4u9j.js"),__vite__mapDeps([50,1,2,3,47,15,16,13,9,48,25,26,17,10,49,23]),import.meta.url)}),`../components/${i}.tsx`,3)).default;_(o.jsx(d,{...p}))},c=async()=>{const{component:i}=n[1],a=(await import(i)).default;s(o.jsx(a,{message:"Hello from Component B"}))};return o.jsxs(o.Fragment,{children:[o.jsx(v,{title:"Home"}),o.jsx("div",{children:o.jsx(P,{href:"/page",children:"Page"})}),o.jsx("div",{children:o.jsx("h1",{children:"Is Home"})}),o.jsxs("div",{children:[o.jsx("button",{onClick:l,children:"Загрузить компонент"}),o.jsx("p",{}),r||o.jsx("p",{children:"Нажмите кнопку, чтобы загрузить компонент"})]}),o.jsx("p",{}),o.jsxs("div",{children:[o.jsx("button",{onClick:c,children:"Загрузить компонент"}),o.jsx("p",{}),e||o.jsx("p",{children:"Нажмите кнопку, чтобы загрузить компонент"})]})]})}export{L as default};
@@ -1 +0,0 @@
1
- import{r as p,j as c,b as f}from"./app.js";import{c as u}from"./index-DUXJYtOc.js";var l=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],x=l.reduce((i,t)=>{const o=u(`Primitive.${t}`),r=p.forwardRef((s,e)=>{const{asChild:a,...n}=s,m=a?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(m,{...n,ref:e})});return r.displayName=`Primitive.${t}`,{...i,[t]:r}},{});function h(i,t){i&&f.flushSync(()=>i.dispatchEvent(t))}export{x as P,h as d};
@@ -1 +0,0 @@
1
- import{r as l,j as f}from"./app.js";function d(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function S(...e){return n=>{let r=!1;const o=e.map(t=>{const i=d(t,n);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let t=0;t<o.length;t++){const i=o[t];typeof i=="function"?i():d(e[t],null)}}}}function E(...e){return l.useCallback(S(...e),e)}function g(e){const n=C(e),r=l.forwardRef((o,t)=>{const{children:i,...c}=o,a=l.Children.toArray(i),s=a.find(R);if(s){const u=s.props.children,y=a.map(p=>p===s?l.Children.count(u)>1?l.Children.only(null):l.isValidElement(u)?u.props.children:null:p);return f.jsx(n,{...c,ref:t,children:l.isValidElement(u)?l.cloneElement(u,void 0,y):null})}return f.jsx(n,{...c,ref:t,children:i})});return r.displayName=`${e}.Slot`,r}var j=g("Slot");function C(e){const n=l.forwardRef((r,o)=>{const{children:t,...i}=r,c=l.isValidElement(t)?x(t):void 0,a=E(c,o);if(l.isValidElement(t)){const s=b(i,t.props);return t.type!==l.Fragment&&(s.ref=a),l.cloneElement(t,s)}return l.Children.count(t)>1?l.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var m=Symbol("radix.slottable");function V(e){const n=({children:r})=>f.jsx(f.Fragment,{children:r});return n.displayName=`${e}.Slottable`,n.__radixId=m,n}function R(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===m}function b(e,n){const r={...n};for(const o in n){const t=e[o],i=n[o];/^on[A-Z]/.test(o)?t&&i?r[o]=(...a)=>{const s=i(...a);return t(...a),s}:t&&(r[o]=t):o==="style"?r[o]={...t,...i}:o==="className"&&(r[o]=[t,i].filter(Boolean).join(" "))}return{...e,...r}}function x(e){var o,t;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(t=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:t.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}export{j as S,V as a,S as b,g as c,E as u};
@@ -1 +0,0 @@
1
- import{r as m,e as te,j as z,R as Me,b as ke}from"./app.js";import{u as tt,a as gt,c as Fe}from"./index-D5ir9iUV.js";import{P as nt,d as Ne}from"./index-DEzdKGnS.js";import{u as wt}from"./index-DUXJYtOc.js";function bt(t,e,{checkForDefaultPrevented:n=!0}={}){return function(r){if(t==null||t(r),n===!1||!r.defaultPrevented)return e==null?void 0:e(r)}}var $e=te[" useId ".trim().toString()]||(()=>{}),We=0;function ao(t){const[e,n]=m.useState($e());return tt(()=>{n(o=>o??String(We++))},[t]),e?`radix-${e}`:""}var Be=te[" useInsertionEffect ".trim().toString()]||tt;function fo({prop:t,defaultProp:e,onChange:n=()=>{},caller:o}){const[r,i,s]=_e({defaultProp:e,onChange:n}),c=t!==void 0,f=c?t:r;{const a=m.useRef(t!==void 0);m.useEffect(()=>{const u=a.current;u!==c&&console.warn(`${o} is changing from ${u?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),a.current=c},[c,o])}const l=m.useCallback(a=>{var u;if(c){const h=ze(a)?a(t):a;h!==t&&((u=s.current)==null||u.call(s,h))}else i(a)},[c,t,i,s]);return[f,l]}function _e({defaultProp:t,onChange:e}){const[n,o]=m.useState(t),r=m.useRef(n),i=m.useRef(e);return Be(()=>{i.current=e},[e]),m.useEffect(()=>{var s;r.current!==n&&((s=i.current)==null||s.call(i,n),r.current=n)},[n,r]),[n,o,i]}function ze(t){return typeof t=="function"}function He(t,e=globalThis==null?void 0:globalThis.document){const n=gt(t);m.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return e.addEventListener("keydown",o,{capture:!0}),()=>e.removeEventListener("keydown",o,{capture:!0})},[n,e])}var Ie="DismissableLayer",Pt="dismissableLayer.update",je="dismissableLayer.pointerDownOutside",Ve="dismissableLayer.focusOutside",Vt,ee=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ye=m.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:i,onInteractOutside:s,onDismiss:c,...f}=t,l=m.useContext(ee),[a,u]=m.useState(null),h=(a==null?void 0:a.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,d]=m.useState({}),p=wt(e,x=>u(x)),g=Array.from(l.layers),[y]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),w=g.indexOf(y),v=a?g.indexOf(a):-1,E=l.layersWithOutsidePointerEventsDisabled.size>0,b=v>=w,A=qe(x=>{const O=x.target,L=[...l.branches].some(C=>C.contains(O));!b||L||(r==null||r(x),s==null||s(x),x.defaultPrevented||c==null||c())},h),P=Ke(x=>{const O=x.target;[...l.branches].some(C=>C.contains(O))||(i==null||i(x),s==null||s(x),x.defaultPrevented||c==null||c())},h);return He(x=>{v===l.layers.size-1&&(o==null||o(x),!x.defaultPrevented&&c&&(x.preventDefault(),c()))},h),m.useEffect(()=>{if(a)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Vt=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(a)),l.layers.add(a),Yt(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Vt)}},[a,h,n,l]),m.useEffect(()=>()=>{a&&(l.layers.delete(a),l.layersWithOutsidePointerEventsDisabled.delete(a),Yt())},[a,l]),m.useEffect(()=>{const x=()=>d({});return document.addEventListener(Pt,x),()=>document.removeEventListener(Pt,x)},[]),z.jsx(nt.div,{...f,ref:p,style:{pointerEvents:E?b?"auto":"none":void 0,...t.style},onFocusCapture:bt(t.onFocusCapture,P.onFocusCapture),onBlurCapture:bt(t.onBlurCapture,P.onBlurCapture),onPointerDownCapture:bt(t.onPointerDownCapture,A.onPointerDownCapture)})});Ye.displayName=Ie;var Ue="DismissableLayerBranch",Xe=m.forwardRef((t,e)=>{const n=m.useContext(ee),o=m.useRef(null),r=wt(e,o);return m.useEffect(()=>{const i=o.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),z.jsx(nt.div,{...t,ref:r})});Xe.displayName=Ue;function qe(t,e=globalThis==null?void 0:globalThis.document){const n=gt(t),o=m.useRef(!1),r=m.useRef(()=>{});return m.useEffect(()=>{const i=c=>{if(c.target&&!o.current){let f=function(){ne(je,n,l,{discrete:!0})};const l={originalEvent:c};c.pointerType==="touch"?(e.removeEventListener("click",r.current),r.current=f,e.addEventListener("click",r.current,{once:!0})):f()}else e.removeEventListener("click",r.current);o.current=!1},s=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),e.removeEventListener("pointerdown",i),e.removeEventListener("click",r.current)}},[e,n]),{onPointerDownCapture:()=>o.current=!0}}function Ke(t,e=globalThis==null?void 0:globalThis.document){const n=gt(t),o=m.useRef(!1);return m.useEffect(()=>{const r=i=>{i.target&&!o.current&&ne(Ve,n,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",r),()=>e.removeEventListener("focusin",r)},[e,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Yt(){const t=new CustomEvent(Pt);document.dispatchEvent(t)}function ne(t,e,n,{discrete:o}){const r=n.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&r.addEventListener(t,e,{once:!0}),o?Ne(r,i):r.dispatchEvent(i)}var Ze="Portal",Ge=m.forwardRef((t,e)=>{var c;const{container:n,...o}=t,[r,i]=m.useState(!1);tt(()=>i(!0),[]);const s=n||r&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return s?Me.createPortal(z.jsx(nt.div,{...o,ref:e}),s):null});Ge.displayName=Ze;const Je=["top","right","bottom","left"],K=Math.min,B=Math.max,dt=Math.round,ft=Math.floor,j=t=>({x:t,y:t}),Qe={left:"right",right:"left",bottom:"top",top:"bottom"},tn={start:"end",end:"start"};function Rt(t,e,n){return B(t,K(e,n))}function X(t,e){return typeof t=="function"?t(e):t}function q(t){return t.split("-")[0]}function ot(t){return t.split("-")[1]}function St(t){return t==="x"?"y":"x"}function Dt(t){return t==="y"?"height":"width"}function U(t){return["top","bottom"].includes(q(t))?"y":"x"}function Lt(t){return St(U(t))}function en(t,e,n){n===void 0&&(n=!1);const o=ot(t),r=Lt(t),i=Dt(r);let s=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=ht(s)),[s,ht(s)]}function nn(t){const e=ht(t);return[Ot(t),e,Ot(e)]}function Ot(t){return t.replace(/start|end/g,e=>tn[e])}function on(t,e,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return n?e?r:o:e?o:r;case"left":case"right":return e?i:s;default:return[]}}function rn(t,e,n,o){const r=ot(t);let i=on(q(t),n==="start",o);return r&&(i=i.map(s=>s+"-"+r),e&&(i=i.concat(i.map(Ot)))),i}function ht(t){return t.replace(/left|right|bottom|top/g,e=>Qe[e])}function sn(t){return{top:0,right:0,bottom:0,left:0,...t}}function oe(t){return typeof t!="number"?sn(t):{top:t,right:t,bottom:t,left:t}}function pt(t){const{x:e,y:n,width:o,height:r}=t;return{width:o,height:r,top:n,left:e,right:e+o,bottom:n+r,x:e,y:n}}function Ut(t,e,n){let{reference:o,floating:r}=t;const i=U(e),s=Lt(e),c=Dt(s),f=q(e),l=i==="y",a=o.x+o.width/2-r.width/2,u=o.y+o.height/2-r.height/2,h=o[c]/2-r[c]/2;let d;switch(f){case"top":d={x:a,y:o.y-r.height};break;case"bottom":d={x:a,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:u};break;case"left":d={x:o.x-r.width,y:u};break;default:d={x:o.x,y:o.y}}switch(ot(e)){case"start":d[s]-=h*(n&&l?-1:1);break;case"end":d[s]+=h*(n&&l?-1:1);break}return d}const cn=async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,c=i.filter(Boolean),f=await(s.isRTL==null?void 0:s.isRTL(e));let l=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:a,y:u}=Ut(l,o,f),h=o,d={},p=0;for(let g=0;g<c.length;g++){const{name:y,fn:w}=c[g],{x:v,y:E,data:b,reset:A}=await w({x:a,y:u,initialPlacement:o,placement:h,strategy:r,middlewareData:d,rects:l,platform:s,elements:{reference:t,floating:e}});a=v??a,u=E??u,d={...d,[y]:{...d[y],...b}},A&&p<=50&&(p++,typeof A=="object"&&(A.placement&&(h=A.placement),A.rects&&(l=A.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:r}):A.rects),{x:a,y:u}=Ut(l,h,f)),g=-1)}return{x:a,y:u,placement:h,strategy:r,middlewareData:d}};async function st(t,e){var n;e===void 0&&(e={});const{x:o,y:r,platform:i,rects:s,elements:c,strategy:f}=t,{boundary:l="clippingAncestors",rootBoundary:a="viewport",elementContext:u="floating",altBoundary:h=!1,padding:d=0}=X(e,t),p=oe(d),y=c[h?u==="floating"?"reference":"floating":u],w=pt(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:l,rootBoundary:a,strategy:f})),v=u==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),b=await(i.isElement==null?void 0:i.isElement(E))?await(i.getScale==null?void 0:i.getScale(E))||{x:1,y:1}:{x:1,y:1},A=pt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:v,offsetParent:E,strategy:f}):v);return{top:(w.top-A.top+p.top)/b.y,bottom:(A.bottom-w.bottom+p.bottom)/b.y,left:(w.left-A.left+p.left)/b.x,right:(A.right-w.right+p.right)/b.x}}const ln=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:r,rects:i,platform:s,elements:c,middlewareData:f}=e,{element:l,padding:a=0}=X(t,e)||{};if(l==null)return{};const u=oe(a),h={x:n,y:o},d=Lt(r),p=Dt(d),g=await s.getDimensions(l),y=d==="y",w=y?"top":"left",v=y?"bottom":"right",E=y?"clientHeight":"clientWidth",b=i.reference[p]+i.reference[d]-h[d]-i.floating[p],A=h[d]-i.reference[d],P=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l));let x=P?P[E]:0;(!x||!await(s.isElement==null?void 0:s.isElement(P)))&&(x=c.floating[E]||i.floating[p]);const O=b/2-A/2,L=x/2-g[p]/2-1,C=K(u[w],L),$=K(u[v],L),W=C,S=x-g[p]-$,N=x/2-g[p]/2+O,T=Rt(W,N,S),M=!f.arrow&&ot(r)!=null&&N!==T&&i.reference[p]/2-(N<W?C:$)-g[p]/2<0,k=M?N<W?N-W:N-S:0;return{[d]:h[d]+k,data:{[d]:T,centerOffset:N-T-k,...M&&{alignmentOffset:k}},reset:M}}}),an=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:c,platform:f,elements:l}=e,{mainAxis:a=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...y}=X(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const w=q(r),v=U(c),E=q(c)===c,b=await(f.isRTL==null?void 0:f.isRTL(l.floating)),A=h||(E||!g?[ht(c)]:nn(c)),P=p!=="none";!h&&P&&A.push(...rn(c,g,p,b));const x=[c,...A],O=await st(e,y),L=[];let C=((o=i.flip)==null?void 0:o.overflows)||[];if(a&&L.push(O[w]),u){const T=en(r,s,b);L.push(O[T[0]],O[T[1]])}if(C=[...C,{placement:r,overflows:L}],!L.every(T=>T<=0)){var $,W;const T=((($=i.flip)==null?void 0:$.index)||0)+1,M=x[T];if(M){var S;const R=u==="alignment"?v!==U(M):!1,D=((S=C[0])==null?void 0:S.overflows[0])>0;if(!R||D)return{data:{index:T,overflows:C},reset:{placement:M}}}let k=(W=C.filter(R=>R.overflows[0]<=0).sort((R,D)=>R.overflows[1]-D.overflows[1])[0])==null?void 0:W.placement;if(!k)switch(d){case"bestFit":{var N;const R=(N=C.filter(D=>{if(P){const F=U(D.placement);return F===v||F==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(F=>F>0).reduce((F,J)=>F+J,0)]).sort((D,F)=>D[1]-F[1])[0])==null?void 0:N[0];R&&(k=R);break}case"initialPlacement":k=c;break}if(r!==k)return{reset:{placement:k}}}return{}}}};function Xt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function qt(t){return Je.some(e=>t[e]>=0)}const fn=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:o="referenceHidden",...r}=X(t,e);switch(o){case"referenceHidden":{const i=await st(e,{...r,elementContext:"reference"}),s=Xt(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:qt(s)}}}case"escaped":{const i=await st(e,{...r,altBoundary:!0}),s=Xt(i,n.floating);return{data:{escapedOffsets:s,escaped:qt(s)}}}default:return{}}}}};async function un(t,e){const{placement:n,platform:o,elements:r}=t,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=q(n),c=ot(n),f=U(n)==="y",l=["left","top"].includes(s)?-1:1,a=i&&f?-1:1,u=X(e,t);let{mainAxis:h,crossAxis:d,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof p=="number"&&(d=c==="end"?p*-1:p),f?{x:d*a,y:h*l}:{x:h*l,y:d*a}}const dn=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:r,y:i,placement:s,middlewareData:c}=e,f=await un(e,t);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+f.x,y:i+f.y,data:{...f,placement:s}}}}},hn=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:r}=e,{mainAxis:i=!0,crossAxis:s=!1,limiter:c={fn:y=>{let{x:w,y:v}=y;return{x:w,y:v}}},...f}=X(t,e),l={x:n,y:o},a=await st(e,f),u=U(q(r)),h=St(u);let d=l[h],p=l[u];if(i){const y=h==="y"?"top":"left",w=h==="y"?"bottom":"right",v=d+a[y],E=d-a[w];d=Rt(v,d,E)}if(s){const y=u==="y"?"top":"left",w=u==="y"?"bottom":"right",v=p+a[y],E=p-a[w];p=Rt(v,p,E)}const g=c.fn({...e,[h]:d,[u]:p});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[h]:i,[u]:s}}}}}},pn=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:o,placement:r,rects:i,middlewareData:s}=e,{offset:c=0,mainAxis:f=!0,crossAxis:l=!0}=X(t,e),a={x:n,y:o},u=U(r),h=St(u);let d=a[h],p=a[u];const g=X(c,e),y=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(f){const E=h==="y"?"height":"width",b=i.reference[h]-i.floating[E]+y.mainAxis,A=i.reference[h]+i.reference[E]-y.mainAxis;d<b?d=b:d>A&&(d=A)}if(l){var w,v;const E=h==="y"?"width":"height",b=["top","left"].includes(q(r)),A=i.reference[u]-i.floating[E]+(b&&((w=s.offset)==null?void 0:w[u])||0)+(b?0:y.crossAxis),P=i.reference[u]+i.reference[E]+(b?0:((v=s.offset)==null?void 0:v[u])||0)-(b?y.crossAxis:0);p<A?p=A:p>P&&(p=P)}return{[h]:d,[u]:p}}}},mn=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:r,rects:i,platform:s,elements:c}=e,{apply:f=()=>{},...l}=X(t,e),a=await st(e,l),u=q(r),h=ot(r),d=U(r)==="y",{width:p,height:g}=i.floating;let y,w;u==="top"||u==="bottom"?(y=u,w=h===(await(s.isRTL==null?void 0:s.isRTL(c.floating))?"start":"end")?"left":"right"):(w=u,y=h==="end"?"top":"bottom");const v=g-a.top-a.bottom,E=p-a.left-a.right,b=K(g-a[y],v),A=K(p-a[w],E),P=!e.middlewareData.shift;let x=b,O=A;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(O=E),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(x=v),P&&!h){const C=B(a.left,0),$=B(a.right,0),W=B(a.top,0),S=B(a.bottom,0);d?O=p-2*(C!==0||$!==0?C+$:B(a.left,a.right)):x=g-2*(W!==0||S!==0?W+S:B(a.top,a.bottom))}await f({...e,availableWidth:O,availableHeight:x});const L=await s.getDimensions(c.floating);return p!==L.width||g!==L.height?{reset:{rects:!0}}:{}}}};function yt(){return typeof window<"u"}function rt(t){return re(t)?(t.nodeName||"").toLowerCase():"#document"}function _(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Y(t){var e;return(e=(re(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function re(t){return yt()?t instanceof Node||t instanceof _(t).Node:!1}function H(t){return yt()?t instanceof Element||t instanceof _(t).Element:!1}function V(t){return yt()?t instanceof HTMLElement||t instanceof _(t).HTMLElement:!1}function Kt(t){return!yt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof _(t).ShadowRoot}function lt(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=I(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(r)}function gn(t){return["table","td","th"].includes(rt(t))}function xt(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function Tt(t){const e=Mt(),n=H(t)?I(t):t;return["transform","translate","scale","rotate","perspective"].some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function wn(t){let e=Z(t);for(;V(e)&&!et(e);){if(Tt(e))return e;if(xt(e))return null;e=Z(e)}return null}function Mt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function et(t){return["html","body","#document"].includes(rt(t))}function I(t){return _(t).getComputedStyle(t)}function vt(t){return H(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Z(t){if(rt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Kt(t)&&t.host||Y(t);return Kt(e)?e.host:e}function ie(t){const e=Z(t);return et(e)?t.ownerDocument?t.ownerDocument.body:t.body:V(e)&&lt(e)?e:ie(e)}function ct(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=ie(t),i=r===((o=t.ownerDocument)==null?void 0:o.body),s=_(r);if(i){const c=Ct(s);return e.concat(s,s.visualViewport||[],lt(r)?r:[],c&&n?ct(c):[])}return e.concat(r,ct(r,[],n))}function Ct(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function se(t){const e=I(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=V(t),i=r?t.offsetWidth:n,s=r?t.offsetHeight:o,c=dt(n)!==i||dt(o)!==s;return c&&(n=i,o=s),{width:n,height:o,$:c}}function kt(t){return H(t)?t:t.contextElement}function Q(t){const e=kt(t);if(!V(e))return j(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:i}=se(e);let s=(i?dt(n.width):n.width)/o,c=(i?dt(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const yn=j(0);function ce(t){const e=_(t);return!Mt()||!e.visualViewport?yn:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function xn(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==_(t)?!1:e}function G(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=kt(t);let s=j(1);e&&(o?H(o)&&(s=Q(o)):s=Q(t));const c=xn(i,n,o)?ce(i):j(0);let f=(r.left+c.x)/s.x,l=(r.top+c.y)/s.y,a=r.width/s.x,u=r.height/s.y;if(i){const h=_(i),d=o&&H(o)?_(o):o;let p=h,g=Ct(p);for(;g&&o&&d!==p;){const y=Q(g),w=g.getBoundingClientRect(),v=I(g),E=w.left+(g.clientLeft+parseFloat(v.paddingLeft))*y.x,b=w.top+(g.clientTop+parseFloat(v.paddingTop))*y.y;f*=y.x,l*=y.y,a*=y.x,u*=y.y,f+=E,l+=b,p=_(g),g=Ct(p)}}return pt({width:a,height:u,x:f,y:l})}function Ft(t,e){const n=vt(t).scrollLeft;return e?e.left+n:G(Y(t)).left+n}function le(t,e,n){n===void 0&&(n=!1);const o=t.getBoundingClientRect(),r=o.left+e.scrollLeft-(n?0:Ft(t,o)),i=o.top+e.scrollTop;return{x:r,y:i}}function vn(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const i=r==="fixed",s=Y(o),c=e?xt(e.floating):!1;if(o===s||c&&i)return n;let f={scrollLeft:0,scrollTop:0},l=j(1);const a=j(0),u=V(o);if((u||!u&&!i)&&((rt(o)!=="body"||lt(s))&&(f=vt(o)),V(o))){const d=G(o);l=Q(o),a.x=d.x+o.clientLeft,a.y=d.y+o.clientTop}const h=s&&!u&&!i?le(s,f,!0):j(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-f.scrollLeft*l.x+a.x+h.x,y:n.y*l.y-f.scrollTop*l.y+a.y+h.y}}function bn(t){return Array.from(t.getClientRects())}function An(t){const e=Y(t),n=vt(t),o=t.ownerDocument.body,r=B(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=B(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+Ft(t);const c=-n.scrollTop;return I(o).direction==="rtl"&&(s+=B(e.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:c}}function En(t,e){const n=_(t),o=Y(t),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,c=0,f=0;if(r){i=r.width,s=r.height;const l=Mt();(!l||l&&e==="fixed")&&(c=r.offsetLeft,f=r.offsetTop)}return{width:i,height:s,x:c,y:f}}function Pn(t,e){const n=G(t,!0,e==="fixed"),o=n.top+t.clientTop,r=n.left+t.clientLeft,i=V(t)?Q(t):j(1),s=t.clientWidth*i.x,c=t.clientHeight*i.y,f=r*i.x,l=o*i.y;return{width:s,height:c,x:f,y:l}}function Zt(t,e,n){let o;if(e==="viewport")o=En(t,n);else if(e==="document")o=An(Y(t));else if(H(e))o=Pn(e,n);else{const r=ce(t);o={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return pt(o)}function ae(t,e){const n=Z(t);return n===e||!H(n)||et(n)?!1:I(n).position==="fixed"||ae(n,e)}function Rn(t,e){const n=e.get(t);if(n)return n;let o=ct(t,[],!1).filter(c=>H(c)&&rt(c)!=="body"),r=null;const i=I(t).position==="fixed";let s=i?Z(t):t;for(;H(s)&&!et(s);){const c=I(s),f=Tt(s);!f&&c.position==="fixed"&&(r=null),(i?!f&&!r:!f&&c.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||lt(s)&&!f&&ae(t,s))?o=o.filter(a=>a!==s):r=c,s=Z(s)}return e.set(t,o),o}function On(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const s=[...n==="clippingAncestors"?xt(e)?[]:Rn(e,this._c):[].concat(n),o],c=s[0],f=s.reduce((l,a)=>{const u=Zt(e,a,r);return l.top=B(u.top,l.top),l.right=K(u.right,l.right),l.bottom=K(u.bottom,l.bottom),l.left=B(u.left,l.left),l},Zt(e,c,r));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function Cn(t){const{width:e,height:n}=se(t);return{width:e,height:n}}function Sn(t,e,n){const o=V(e),r=Y(e),i=n==="fixed",s=G(t,!0,i,e);let c={scrollLeft:0,scrollTop:0};const f=j(0);function l(){f.x=Ft(r)}if(o||!o&&!i)if((rt(e)!=="body"||lt(r))&&(c=vt(e)),o){const d=G(e,!0,i,e);f.x=d.x+e.clientLeft,f.y=d.y+e.clientTop}else r&&l();i&&!o&&r&&l();const a=r&&!o&&!i?le(r,c):j(0),u=s.left+c.scrollLeft-f.x-a.x,h=s.top+c.scrollTop-f.y-a.y;return{x:u,y:h,width:s.width,height:s.height}}function At(t){return I(t).position==="static"}function Gt(t,e){if(!V(t)||I(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Y(t)===n&&(n=n.ownerDocument.body),n}function fe(t,e){const n=_(t);if(xt(t))return n;if(!V(t)){let r=Z(t);for(;r&&!et(r);){if(H(r)&&!At(r))return r;r=Z(r)}return n}let o=Gt(t,e);for(;o&&gn(o)&&At(o);)o=Gt(o,e);return o&&et(o)&&At(o)&&!Tt(o)?n:o||wn(t)||n}const Dn=async function(t){const e=this.getOffsetParent||fe,n=this.getDimensions,o=await n(t.floating);return{reference:Sn(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Ln(t){return I(t).direction==="rtl"}const Tn={convertOffsetParentRelativeRectToViewportRelativeRect:vn,getDocumentElement:Y,getClippingRect:On,getOffsetParent:fe,getElementRects:Dn,getClientRects:bn,getDimensions:Cn,getScale:Q,isElement:H,isRTL:Ln};function ue(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Mn(t,e){let n=null,o;const r=Y(t);function i(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),i();const l=t.getBoundingClientRect(),{left:a,top:u,width:h,height:d}=l;if(c||e(),!h||!d)return;const p=ft(u),g=ft(r.clientWidth-(a+h)),y=ft(r.clientHeight-(u+d)),w=ft(a),E={rootMargin:-p+"px "+-g+"px "+-y+"px "+-w+"px",threshold:B(0,K(1,f))||1};let b=!0;function A(P){const x=P[0].intersectionRatio;if(x!==f){if(!b)return s();x?s(!1,x):o=setTimeout(()=>{s(!1,1e-7)},1e3)}x===1&&!ue(l,t.getBoundingClientRect())&&s(),b=!1}try{n=new IntersectionObserver(A,{...E,root:r.ownerDocument})}catch{n=new IntersectionObserver(A,E)}n.observe(t)}return s(!0),i}function kn(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=o,l=kt(t),a=r||i?[...l?ct(l):[],...ct(e)]:[];a.forEach(w=>{r&&w.addEventListener("scroll",n,{passive:!0}),i&&w.addEventListener("resize",n)});const u=l&&c?Mn(l,n):null;let h=-1,d=null;s&&(d=new ResizeObserver(w=>{let[v]=w;v&&v.target===l&&d&&(d.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var E;(E=d)==null||E.observe(e)})),n()}),l&&!f&&d.observe(l),d.observe(e));let p,g=f?G(t):null;f&&y();function y(){const w=G(t);g&&!ue(g,w)&&n(),g=w,p=requestAnimationFrame(y)}return n(),()=>{var w;a.forEach(v=>{r&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),u==null||u(),(w=d)==null||w.disconnect(),d=null,f&&cancelAnimationFrame(p)}}const Fn=dn,Nn=hn,$n=an,Wn=mn,Bn=fn,Jt=ln,_n=pn,zn=(t,e,n)=>{const o=new Map,r={platform:Tn,...n},i={...r.platform,_c:o};return cn(t,e,{...r,platform:i})};var ut=typeof document<"u"?m.useLayoutEffect:m.useEffect;function mt(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,o,r;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(o=n;o--!==0;)if(!mt(t[o],e[o]))return!1;return!0}if(r=Object.keys(t),n=r.length,n!==Object.keys(e).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(e,r[o]))return!1;for(o=n;o--!==0;){const i=r[o];if(!(i==="_owner"&&t.$$typeof)&&!mt(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function de(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Qt(t,e){const n=de(t);return Math.round(e*n)/n}function Et(t){const e=m.useRef(t);return ut(()=>{e.current=t}),e}function Hn(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:i,floating:s}={},transform:c=!0,whileElementsMounted:f,open:l}=t,[a,u]=m.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[h,d]=m.useState(o);mt(h,o)||d(o);const[p,g]=m.useState(null),[y,w]=m.useState(null),v=m.useCallback(R=>{R!==P.current&&(P.current=R,g(R))},[]),E=m.useCallback(R=>{R!==x.current&&(x.current=R,w(R))},[]),b=i||p,A=s||y,P=m.useRef(null),x=m.useRef(null),O=m.useRef(a),L=f!=null,C=Et(f),$=Et(r),W=Et(l),S=m.useCallback(()=>{if(!P.current||!x.current)return;const R={placement:e,strategy:n,middleware:h};$.current&&(R.platform=$.current),zn(P.current,x.current,R).then(D=>{const F={...D,isPositioned:W.current!==!1};N.current&&!mt(O.current,F)&&(O.current=F,ke.flushSync(()=>{u(F)}))})},[h,e,n,$,W]);ut(()=>{l===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,u(R=>({...R,isPositioned:!1})))},[l]);const N=m.useRef(!1);ut(()=>(N.current=!0,()=>{N.current=!1}),[]),ut(()=>{if(b&&(P.current=b),A&&(x.current=A),b&&A){if(C.current)return C.current(b,A,S);S()}},[b,A,S,C,L]);const T=m.useMemo(()=>({reference:P,floating:x,setReference:v,setFloating:E}),[v,E]),M=m.useMemo(()=>({reference:b,floating:A}),[b,A]),k=m.useMemo(()=>{const R={position:n,left:0,top:0};if(!M.floating)return R;const D=Qt(M.floating,a.x),F=Qt(M.floating,a.y);return c?{...R,transform:"translate("+D+"px, "+F+"px)",...de(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:D,top:F}},[n,c,M.floating,a.x,a.y]);return m.useMemo(()=>({...a,update:S,refs:T,elements:M,floatingStyles:k}),[a,S,T,M,k])}const In=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:o,padding:r}=typeof t=="function"?t(n):t;return o&&e(o)?o.current!=null?Jt({element:o.current,padding:r}).fn(n):{}:o?Jt({element:o,padding:r}).fn(n):{}}}},jn=(t,e)=>({...Fn(t),options:[t,e]}),Vn=(t,e)=>({...Nn(t),options:[t,e]}),Yn=(t,e)=>({..._n(t),options:[t,e]}),Un=(t,e)=>({...$n(t),options:[t,e]}),Xn=(t,e)=>({...Wn(t),options:[t,e]}),qn=(t,e)=>({...Bn(t),options:[t,e]}),Kn=(t,e)=>({...In(t),options:[t,e]});var Zn="Arrow",he=m.forwardRef((t,e)=>{const{children:n,width:o=10,height:r=5,...i}=t;return z.jsx(nt.svg,{...i,ref:e,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:z.jsx("polygon",{points:"0,0 30,0 15,10"})})});he.displayName=Zn;var Gn=he;function Jn(t){const[e,n]=m.useState(void 0);return tt(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const i=r[0];let s,c;if("borderBoxSize"in i){const f=i.borderBoxSize,l=Array.isArray(f)?f[0]:f;s=l.inlineSize,c=l.blockSize}else s=t.offsetWidth,c=t.offsetHeight;n({width:s,height:c})});return o.observe(t,{box:"border-box"}),()=>o.unobserve(t)}else n(void 0)},[t]),e}var Nt="Popper",[pe,uo]=Fe(Nt),[Qn,me]=pe(Nt),ge=t=>{const{__scopePopper:e,children:n}=t,[o,r]=m.useState(null);return z.jsx(Qn,{scope:e,anchor:o,onAnchorChange:r,children:n})};ge.displayName=Nt;var we="PopperAnchor",ye=m.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:o,...r}=t,i=me(we,n),s=m.useRef(null),c=wt(e,s);return m.useEffect(()=>{i.onAnchorChange((o==null?void 0:o.current)||s.current)}),o?null:z.jsx(nt.div,{...r,ref:c})});ye.displayName=we;var $t="PopperContent",[to,eo]=pe($t),xe=m.forwardRef((t,e)=>{var Wt,Bt,_t,zt,Ht,It;const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:i="center",alignOffset:s=0,arrowPadding:c=0,avoidCollisions:f=!0,collisionBoundary:l=[],collisionPadding:a=0,sticky:u="partial",hideWhenDetached:h=!1,updatePositionStrategy:d="optimized",onPlaced:p,...g}=t,y=me($t,n),[w,v]=m.useState(null),E=wt(e,it=>v(it)),[b,A]=m.useState(null),P=Jn(b),x=(P==null?void 0:P.width)??0,O=(P==null?void 0:P.height)??0,L=o+(i!=="center"?"-"+i:""),C=typeof a=="number"?a:{top:0,right:0,bottom:0,left:0,...a},$=Array.isArray(l)?l:[l],W=$.length>0,S={padding:C,boundary:$.filter(oo),altBoundary:W},{refs:N,floatingStyles:T,placement:M,isPositioned:k,middlewareData:R}=Hn({strategy:"fixed",placement:L,whileElementsMounted:(...it)=>kn(...it,{animationFrame:d==="always"}),elements:{reference:y.anchor},middleware:[jn({mainAxis:r+O,alignmentAxis:s}),f&&Vn({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?Yn():void 0,...S}),f&&Un({...S}),Xn({...S,apply:({elements:it,rects:jt,availableWidth:Se,availableHeight:De})=>{const{width:Le,height:Te}=jt.reference,at=it.floating.style;at.setProperty("--radix-popper-available-width",`${Se}px`),at.setProperty("--radix-popper-available-height",`${De}px`),at.setProperty("--radix-popper-anchor-width",`${Le}px`),at.setProperty("--radix-popper-anchor-height",`${Te}px`)}}),b&&Kn({element:b,padding:c}),ro({arrowWidth:x,arrowHeight:O}),h&&qn({strategy:"referenceHidden",...S})]}),[D,F]=Ae(M),J=gt(p);tt(()=>{k&&(J==null||J())},[k,J]);const Ee=(Wt=R.arrow)==null?void 0:Wt.x,Pe=(Bt=R.arrow)==null?void 0:Bt.y,Re=((_t=R.arrow)==null?void 0:_t.centerOffset)!==0,[Oe,Ce]=m.useState();return tt(()=>{w&&Ce(window.getComputedStyle(w).zIndex)},[w]),z.jsx("div",{ref:N.setFloating,"data-radix-popper-content-wrapper":"",style:{...T,transform:k?T.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Oe,"--radix-popper-transform-origin":[(zt=R.transformOrigin)==null?void 0:zt.x,(Ht=R.transformOrigin)==null?void 0:Ht.y].join(" "),...((It=R.hide)==null?void 0:It.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:z.jsx(to,{scope:n,placedSide:D,onArrowChange:A,arrowX:Ee,arrowY:Pe,shouldHideArrow:Re,children:z.jsx(nt.div,{"data-side":D,"data-align":F,...g,ref:E,style:{...g.style,animation:k?void 0:"none"}})})})});xe.displayName=$t;var ve="PopperArrow",no={top:"bottom",right:"left",bottom:"top",left:"right"},be=m.forwardRef(function(e,n){const{__scopePopper:o,...r}=e,i=eo(ve,o),s=no[i.placedSide];return z.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:z.jsx(Gn,{...r,ref:n,style:{...r.style,display:"block"}})})});be.displayName=ve;function oo(t){return t!==null}var ro=t=>({name:"transformOrigin",options:t,fn(e){var y,w,v;const{placement:n,rects:o,middlewareData:r}=e,s=((y=r.arrow)==null?void 0:y.centerOffset)!==0,c=s?0:t.arrowWidth,f=s?0:t.arrowHeight,[l,a]=Ae(n),u={start:"0%",center:"50%",end:"100%"}[a],h=(((w=r.arrow)==null?void 0:w.x)??0)+c/2,d=(((v=r.arrow)==null?void 0:v.y)??0)+f/2;let p="",g="";return l==="bottom"?(p=s?u:`${h}px`,g=`${-f}px`):l==="top"?(p=s?u:`${h}px`,g=`${o.floating.height+f}px`):l==="right"?(p=`${-f}px`,g=s?u:`${d}px`):l==="left"&&(p=`${o.floating.width+f}px`,g=s?u:`${d}px`),{data:{x:p,y:g}}}});function Ae(t){const[e,n="center"]=t.split("-");return[e,n]}var ho=ge,po=ye,mo=xe,go=be;export{po as A,mo as C,Ye as D,Ge as P,ho as R,ao as a,Jn as b,bt as c,uo as d,go as e,fo as u};
@@ -1 +0,0 @@
1
- import{j as o}from"./app.js";import{A as r}from"./app-layout-YPlKN2l5.js";import t from"./list-table-Cz8Wgfsa.js";import"./compiler-runtime-tM4jBQ-T.js";import"./sidebar-B9HagQ6H.js";import"./index-DUXJYtOc.js";import"./button-CTOOfwvn.js";import"./utils-DjqsqOe8.js";import"./index-CGjCQBqR.js";import"./createLucideIcon-BFG25zNo.js";import"./index-Dllsp4Rk.js";import"./index-D5ir9iUV.js";import"./index-DEzdKGnS.js";import"./index-DnbQEoxZ.js";import"./index-Mx04mBJl.js";import"./tooltip-CWVAD5oF.js";import"./index-Cb_qrizV.js";import"./app-shell-D6Uf68EA.js";import"./app-sidebar-mh83eSsH.js";import"./nav-main-ByHRr3yf.js";import"./material-icon-CItZiB53.js";import"./chevron-right-D5q8rF7h.js";import"./index-C5OL14ES.js";import"./index-m5itSoCR.js";import"./chevrons-up-down-kALltqHV.js";import"./app-sidebar-header-BTKq0Dr0.js";import"./breadcrumbs-B4LOvzuL.js";import"./nav-user-BVRKiqm-.js";import"./dropdown-menu-CsGmdVIn.js";import"./user-info-DA4KTAOF.js";import"./user-menu-content-Biwi4u9j.js";import"./icon-Bz9BMaD0.js";import"./use-appearance-Co6mO0dV.js";import"./input-DF7Ue23C.js";import"./search-BspystAk.js";import"./sonner-Dzckw3U3.js";import"./trash-2-BoK5Xp2F.js";import"./select-DYffGc49.js";import"./index-DwctwfU0.js";import"./chevron-down-B5XuAFRu.js";import"./check-LAUWAnlX.js";import"./pagination-render-CihJ7J2u.js";import"./chevron-left-CoMhTMUD.js";const m=[],V=()=>o.jsx(r,{breadcrumbs:m,className:"overflow-auto h-[calc(100svh-16px)]",children:o.jsx(t,{})});export{V as default};
@@ -1 +0,0 @@
1
- import{q as e,r,j as t}from"./app.js";import{A as s}from"./app-layout-YPlKN2l5.js";import{L as n}from"./loader-circle-Utah5tGx.js";import"./compiler-runtime-tM4jBQ-T.js";import"./sidebar-B9HagQ6H.js";import"./index-DUXJYtOc.js";import"./button-CTOOfwvn.js";import"./utils-DjqsqOe8.js";import"./index-CGjCQBqR.js";import"./createLucideIcon-BFG25zNo.js";import"./index-Dllsp4Rk.js";import"./index-D5ir9iUV.js";import"./index-DEzdKGnS.js";import"./index-DnbQEoxZ.js";import"./index-Mx04mBJl.js";import"./tooltip-CWVAD5oF.js";import"./index-Cb_qrizV.js";import"./app-shell-D6Uf68EA.js";import"./app-sidebar-mh83eSsH.js";import"./nav-main-ByHRr3yf.js";import"./material-icon-CItZiB53.js";import"./chevron-right-D5q8rF7h.js";import"./index-C5OL14ES.js";import"./index-m5itSoCR.js";import"./chevrons-up-down-kALltqHV.js";import"./app-sidebar-header-BTKq0Dr0.js";import"./breadcrumbs-B4LOvzuL.js";import"./nav-user-BVRKiqm-.js";import"./dropdown-menu-CsGmdVIn.js";import"./user-info-DA4KTAOF.js";import"./user-menu-content-Biwi4u9j.js";import"./icon-Bz9BMaD0.js";import"./use-appearance-Co6mO0dV.js";const a=[];function Q(){const o=e(),[m,i]=r.useState(null);return r.useEffect(()=>{(async()=>{const p=(await import(o.props.moduleComponent)).default;i(t.jsx(p,{message:o.props.message}))})()},[]),t.jsx(s,{breadcrumbs:a,children:t.jsxs("div",{className:"m-5",children:[t.jsx("div",{className:"mb-5",children:t.jsx("h1",{children:o.props.title})}),m||t.jsx(n,{className:"size-10 animate-spin text-neutral-500 mx-auto mt-[15%]"})]})})}export{Q as default};
@@ -1 +0,0 @@
1
- import{q as s,j as i}from"./app.js";import{c as l}from"./compiler-runtime-tM4jBQ-T.js";import{A as x}from"./app-layout-YPlKN2l5.js";import"./sidebar-B9HagQ6H.js";import"./index-DUXJYtOc.js";import"./button-CTOOfwvn.js";import"./utils-DjqsqOe8.js";import"./index-CGjCQBqR.js";import"./createLucideIcon-BFG25zNo.js";import"./index-Dllsp4Rk.js";import"./index-D5ir9iUV.js";import"./index-DEzdKGnS.js";import"./index-DnbQEoxZ.js";import"./index-Mx04mBJl.js";import"./tooltip-CWVAD5oF.js";import"./index-Cb_qrizV.js";import"./app-shell-D6Uf68EA.js";import"./app-sidebar-mh83eSsH.js";import"./nav-main-ByHRr3yf.js";import"./material-icon-CItZiB53.js";import"./chevron-right-D5q8rF7h.js";import"./index-C5OL14ES.js";import"./index-m5itSoCR.js";import"./chevrons-up-down-kALltqHV.js";import"./app-sidebar-header-BTKq0Dr0.js";import"./breadcrumbs-B4LOvzuL.js";import"./nav-user-BVRKiqm-.js";import"./dropdown-menu-CsGmdVIn.js";import"./user-info-DA4KTAOF.js";import"./user-menu-content-Biwi4u9j.js";import"./icon-Bz9BMaD0.js";import"./use-appearance-Co6mO0dV.js";const a=[];function J(){const t=l.c(8),r=s();let o;t[0]!==r.props.title?(o=r.props.title&&i.jsx("div",{className:"text-3xl mb-8",children:r.props.title}),t[0]=r.props.title,t[1]=o):o=t[1];let e;t[2]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx("div",{className:"text-3xl mb-8",children:"Adminizer"}),t[2]=e):e=t[2];let p;t[3]!==r.props.text?(p=r.props.text&&i.jsx("div",{dangerouslySetInnerHTML:{__html:r.props.text}}),t[3]=r.props.text,t[4]=p):p=t[4];let m;return t[5]!==o||t[6]!==p?(m=i.jsx(x,{breadcrumbs:a,children:i.jsxs("div",{className:"flex h-full flex-1 flex-col gap-4 rounded-xl p-4",children:[o,e,p]})}),t[5]=o,t[6]=p,t[7]=m):m=t[7],m}export{J as default};
@@ -1 +0,0 @@
1
- export default function processInstallFinalize(req: ReqType, res: ResType): Promise<void | ResType>;
@@ -1,16 +0,0 @@
1
- import { InstallStepper } from "../lib/installStepper/installStepper";
2
- import { Adminizer } from "../lib/Adminizer";
3
- let installStepper = InstallStepper.getInstance();
4
- export default async function processInstallFinalize(req, res) {
5
- if (req.adminizer.config.auth.enable) {
6
- if (!req.user) {
7
- return res.redirect(`${req.adminizer.config.routePrefix}/model/userap/login`);
8
- }
9
- else if (!req.adminizer.accessRightsHelper.hasPermission(`process-install-step`, req.user)) {
10
- return res.sendStatus(403);
11
- }
12
- }
13
- Adminizer.log.debug("IN PROCESS FINALIZE", installStepper.getFinalizeStatus());
14
- return res.json(installStepper.getFinalizeStatus());
15
- }
16
- ;
File without changes
@@ -1,122 +0,0 @@
1
- "use strict";
2
- // import {InstallStepper} from "../lib/installStepper/installStepper";
3
- // import * as path from "path";
4
- // import {Adminizer} from "../lib/Adminizer";
5
- // export default async function processInstallStep(req: ReqType, res: ResType): Promise<void> {
6
- // if (req.adminizer.config.auth.enable) {
7
- // if (!req.user) {
8
- // res.redirect(`${req.adminizer.config.routePrefix}/model/userap/login`);
9
- // return
10
- // } else if (!req.adminizer.accessRightsHelper.hasPermission(`process-install-step`, req.user)) {
11
- // res.sendStatus(403);
12
- // return
13
- // }
14
- // }
15
- // if (req.method.toUpperCase() === 'GET') {
16
- // Adminizer.log.debug("GET REQUEST TO PROCESS INSTALL STEP")
17
- // let installStepper = InstallStepper.getStepper(req.params.id);
18
- // if (!installStepper) {
19
- // res.redirect(`${req.adminizer.config.routePrefix}/`);
20
- // return
21
- // }
22
- // if (installStepper.hasUnprocessedSteps() || installStepper.hasUnfinalizedSteps()) {
23
- // let renderData = installStepper.render(req);
24
- // let renderer = renderData.currentStep.renderer;
25
- // // run onInit method before showing step to user
26
- // try {
27
- // await renderData.currentStep.onInit();
28
- // } catch (e) {
29
- // console.log("ERROR IN PROCESS INSTALL STEP", e)
30
- // res.viewAdmin(`installer/error`, {error: e, stepperId: installStepper.id});
31
- // return
32
- // }
33
- // res.viewAdmin(`installer/${renderer}`, {...renderData, stepperId: installStepper.id});
34
- // return
35
- // } else {
36
- // res.redirect(`${req.adminizer.config.routePrefix}/`);
37
- // return
38
- // }
39
- // }
40
- // if (req.method.toUpperCase() === 'POST') {
41
- // try {
42
- // Adminizer.log.debug("POST REQUEST TO PROCESS INSTALL STEP", JSON.stringify(req.body, null, 2))
43
- // let installStepper = InstallStepper.getStepper(req.params.id);
44
- // const currentStepId = req.body.currentStepId;
45
- // const filesCounter = req.body.filesCounter;
46
- // // upload files before processing other fields (filesCounter > 0 means that req contains files)
47
- // const uploadedFiles = await handleFileUploads(req, currentStepId, filesCounter);
48
- // if (req.body.action === 'next') {
49
- // const inputData = JSON.parse(req.body.inputData);
50
- // if (uploadedFiles.length) {
51
- // inputData.uploadedFiles = uploadedFiles;
52
- // }
53
- // // trying to process step
54
- // await installStepper.processStep(currentStepId, inputData);
55
- // } else if (req.body.action === 'skip') {
56
- // // trying to skip step
57
- // await installStepper.skipStep(currentStepId);
58
- // } else {
59
- // res.status(400).send("Invalid action parameter");
60
- // return
61
- // }
62
- // // go back to stepper if there are more unprocessed steps, otherwise go back to /admin
63
- // if (installStepper.hasUnprocessedSteps()) {
64
- // res.redirect(`${req.adminizer.config.routePrefix}/install/${installStepper.id}`);
65
- // return
66
- // } else {
67
- // res.redirect(`${req.adminizer.config.routePrefix}/`);
68
- // return
69
- // }
70
- // } catch (error) {
71
- // Adminizer.log.error("Error processing step:", error);
72
- // res.status(500).send("Error processing step");
73
- // return
74
- // }
75
- // }
76
- // if (req.method.toUpperCase() === 'DELETE') {
77
- // Adminizer.log.debug("DELETE REQUEST TO PROCESS INSTALL STEP", req.body)
78
- // try {
79
- // InstallStepper.deleteStepper(req.params.id);
80
- // res.status(200).send("OK")
81
- // return
82
- // } catch (e) {
83
- // res.status(403).send(e);
84
- // return
85
- // }
86
- // }
87
- // res.status(500).send("Invalid request method")
88
- // return
89
- // };
90
- // async function handleFileUploads(req: ReqType, currentStepId: string | number, filesCounter: number): Promise<string[]> {
91
- // const uploadedFiles: string[] = [];
92
- // for (let i = 0; i < filesCounter; i++) {
93
- // const fieldName = `files_${i}`;
94
- // const uploadMiddleware = req.upload({
95
- // destination: "installStepper/uploadedImages",
96
- // filename: (file) => {
97
- // const extension = path.extname(file.originalname);
98
- // const baseName = path.basename(file.originalname, extension);
99
- // return `${currentStepId}_${baseName}_${Date.now()}${extension}`;
100
- // },
101
- // }).single(fieldName);
102
- // try {
103
- // await new Promise<void>((resolve, reject) => {
104
- // uploadMiddleware(req, null, (err) => {
105
- // if (err) {
106
- // Adminizer.logger.error(`Error uploading file: ${fieldName}`, err);
107
- // reject(err);
108
- // } else {
109
- // const uploadedFile = (req.file as Express.Multer.File)?.path;
110
- // if (uploadedFile) {
111
- // uploadedFiles.push(uploadedFile);
112
- // }
113
- // resolve();
114
- // }
115
- // });
116
- // });
117
- // } catch (err) {
118
- // Adminizer.logger.error(`Failed to upload file: ${fieldName}`, err);
119
- // }
120
- // }
121
- // return uploadedFiles;
122
- // }
@@ -1,52 +0,0 @@
1
- import { ObservablePromise } from "../observablePromise";
2
- export default abstract class InstallStepAbstract {
3
- abstract id: string;
4
- abstract title: string;
5
- abstract badge: string;
6
- abstract sortOrder: number;
7
- /** Step can be skipped. For this option you should do realization for skip handler */
8
- abstract canBeSkipped: boolean;
9
- abstract description: string;
10
- abstract scriptsUrl: string;
11
- abstract stylesUrl: string;
12
- /** For custom modules to set the list of settings wanted to set in this step */
13
- settingsKeys: string[];
14
- /** Absolute path to ejs template */
15
- abstract ejsPath: string;
16
- abstract renderer: "ejs" | "jsonforms";
17
- isSkipped: boolean;
18
- isProcessed: boolean;
19
- /** Data that will be given to browser */
20
- payload: any;
21
- groupSortOrder: number;
22
- finallyPromise: ObservablePromise<void>;
23
- finallyDescription: string;
24
- /**
25
- * A sign that finalization should be started
26
- */
27
- finallyToRun: boolean;
28
- /**
29
- * The time it takes for finally to complete
30
- *
31
- * default: 15 seconds
32
- *
33
- * maximum: 10 minutes;
34
- */
35
- finallyTimeout: number;
36
- /** Action that will be run when saving data to storage */
37
- abstract process(data: any, context?: any): Promise<void>;
38
- /** Method will be called after processing step (both process or skip) */
39
- finally(data: any, context?: any): Promise<void>;
40
- /** This method will be called by InstallStepper and is a wrapper for "finally" method */
41
- toFinally(data?: any, context?: any, timeout?: number): void;
42
- /** Action that will be run when skipping the step */
43
- protected abstract skip(): Promise<void>;
44
- /** This method will be called by InstallStepper and is a wrapper for "skip" method */
45
- skipIt(): Promise<void>;
46
- /**
47
- * Checks that step should be processed during install
48
- * `true` means that the step has been completed and does not need to be shown
49
- */
50
- abstract check(): Promise<boolean>;
51
- onInit(): Promise<void>;
52
- }
@@ -1,69 +0,0 @@
1
- import { ObservablePromise } from "../observablePromise";
2
- import { Adminizer } from "../Adminizer";
3
- export default class InstallStepAbstract {
4
- /** For custom modules to set the list of settings wanted to set in this step */
5
- settingsKeys = [];
6
- isSkipped = false;
7
- isProcessed = false;
8
- /** Data that will be given to browser */
9
- payload = {};
10
- groupSortOrder = 1;
11
- finallyPromise = null;
12
- finallyDescription = null;
13
- /**
14
- * A sign that finalization should be started
15
- */
16
- finallyToRun = false;
17
- /**
18
- * The time it takes for finally to complete
19
- *
20
- * default: 15 seconds
21
- *
22
- * maximum: 10 minutes;
23
- */
24
- finallyTimeout = 15 * 60 * 1000;
25
- /** Method will be called after processing step (both process or skip) */
26
- finally(data, context) {
27
- return null;
28
- }
29
- /** This method will be called by InstallStepper and is a wrapper for "finally" method */
30
- toFinally(data, context, timeout) {
31
- Adminizer.log.debug(`To finally [${this.id}]`);
32
- if (!timeout) {
33
- timeout = this.finallyTimeout;
34
- }
35
- if (!timeout || typeof timeout !== "number") {
36
- timeout = 15 * 60 * 1000;
37
- }
38
- if (timeout > 10 * 60 * 60 * 1000) {
39
- timeout = 10 * 60 * 60 * 1000;
40
- }
41
- if (typeof arguments[0] === "number") {
42
- timeout = arguments[0];
43
- }
44
- if (this.finallyPromise && this.finallyPromise.status === "pending") {
45
- Adminizer.log.warn(`Method "finally" was already executed and won't be executed again`);
46
- }
47
- else {
48
- try {
49
- this.finallyPromise = new ObservablePromise(this.finally(data, context), timeout);
50
- }
51
- catch (error) {
52
- Adminizer.log.error(`Step [${this.id}] finally error:`, error);
53
- }
54
- }
55
- this.finallyPromise.promise;
56
- }
57
- /** This method will be called by InstallStepper and is a wrapper for "skip" method */
58
- async skipIt() {
59
- if (this.canBeSkipped === false) {
60
- throw `Step [${this.title}] can not be skipped`;
61
- }
62
- else {
63
- await this.skip();
64
- }
65
- }
66
- async onInit() {
67
- return;
68
- }
69
- }
@@ -1,21 +0,0 @@
1
- import InstallStepAbstract from "./InstallStepAbstract";
2
- export default class FinalizeStep extends InstallStepAbstract {
3
- canBeSkipped: boolean;
4
- description: string;
5
- ejsPath: string;
6
- id: string;
7
- scriptsUrl: string;
8
- sortOrder: number;
9
- stylesUrl: string;
10
- title: string;
11
- badge: string;
12
- isSkipped: boolean;
13
- settingsKeys: string[];
14
- renderer: "ejs";
15
- isProcessed: boolean;
16
- check(): Promise<boolean>;
17
- process(data: any): Promise<void>;
18
- skip(): Promise<void>;
19
- finally(): Promise<void>;
20
- toFinally(): void;
21
- }
@@ -1,48 +0,0 @@
1
- import InstallStepAbstract from "./InstallStepAbstract";
2
- import * as path from "path";
3
- import { InstallStepper } from "./installStepper";
4
- export default class FinalizeStep extends InstallStepAbstract {
5
- canBeSkipped = false;
6
- description = '';
7
- ejsPath = path.resolve(import.meta.dirname, '../../views/ejs/installer/partials/finalize.ejs');
8
- id = 'finalize';
9
- scriptsUrl = '';
10
- sortOrder = 0;
11
- stylesUrl = '';
12
- title = 'Finalize Step';
13
- badge = '';
14
- isSkipped = false;
15
- settingsKeys = [];
16
- renderer = "ejs";
17
- isProcessed = false;
18
- async check() {
19
- if (this.isProcessed) {
20
- return true;
21
- }
22
- else {
23
- let installStepper = InstallStepper.getInstance();
24
- if (!installStepper.hasUnfinalizedSteps()) {
25
- this.canBeSkipped = true;
26
- }
27
- }
28
- return false;
29
- }
30
- async process(data) {
31
- let installStepper = InstallStepper.getInstance();
32
- if (!installStepper.hasUnfinalizedSteps()) {
33
- this.isProcessed = true;
34
- }
35
- }
36
- async skip() {
37
- let installStepper = InstallStepper.getInstance();
38
- if (!installStepper.hasUnfinalizedSteps()) {
39
- this.isProcessed = true;
40
- }
41
- }
42
- finally() {
43
- return Promise.resolve();
44
- }
45
- toFinally() {
46
- return;
47
- }
48
- }
@@ -1,40 +0,0 @@
1
- import InstallStepAbstract from "./InstallStepAbstract";
2
- interface RenderData {
3
- totalStepCount: number;
4
- leftStepsCount: number;
5
- currentStep: InstallStepAbstract;
6
- locale: string;
7
- }
8
- export declare class InstallStepper {
9
- id: string;
10
- private steps;
11
- context: any;
12
- readonly canBeClosed: boolean;
13
- static instances: InstallStepper[];
14
- constructor(id: string, canBeClosed?: boolean);
15
- static addStepper(stepper?: InstallStepper): void;
16
- static getStepper(stepperId: string): InstallStepper;
17
- static deleteStepper(stepperId: string): void;
18
- static getInstance(): InstallStepper;
19
- getSteps(): InstallStepAbstract[];
20
- processStep(stepId: string, data: any): Promise<void>;
21
- private getStepById;
22
- /** Prepares steps array for user interface render */
23
- render(req: ReqType): RenderData;
24
- skipStep(stepId: string): Promise<void>;
25
- /** Add step (replace if it already exists) */
26
- addStep(step: InstallStepAbstract): void;
27
- hasUnprocessedSteps(): boolean;
28
- getNextUnprocessedStep(): InstallStepAbstract;
29
- hasUnfinalizedSteps(): boolean;
30
- getFinalizeStatus(): {
31
- status: string;
32
- finalizeList: {
33
- id: string;
34
- status: "pending" | "fulfilled" | "rejected";
35
- description: string;
36
- info: string;
37
- }[];
38
- };
39
- }
40
- export {};