@runeya/runeya 1.33.26 → 1.33.28

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 (74) hide show
  1. package/node-red-contrib-runeya.tar +0 -0
  2. package/package.json +1 -1
  3. package/public/assets/{App-Cuu3qapD.js → App-CsI6OcLx.js} +4 -4
  4. package/public/assets/{Bugs-H-Otgxln.js → Bugs-MZTedjOE.js} +1 -1
  5. package/public/assets/{Configs-CS7LQ3j2.js → Configs-BgQMyHZa.js} +1 -1
  6. package/public/assets/{CurrentEditor-DSg_c1cT.js → CurrentEditor-DWe_jHov.js} +1 -1
  7. package/public/assets/{DynamicComponent-Cd8cbFTY.js → DynamicComponent-21b6a83j.js} +1 -1
  8. package/public/assets/{Editor-BUC6Zjcy.js → Editor-DN-ZxIRY.js} +6 -6
  9. package/public/assets/{Git-CWhmBLgo.js → Git-Cwuf8t1y.js} +1 -1
  10. package/public/assets/{ImportCreate-BMYQ7CRt.js → ImportCreate-D7EkVr9x.js} +1 -1
  11. package/public/assets/{Index-DXLLCB8w.js → Index-C0kNw_RG.js} +1 -1
  12. package/public/assets/Index-CmroLpq5.js +1 -0
  13. package/public/assets/{Index-CCt5RYhV.js → Index-Dfxab_I2.js} +1 -1
  14. package/public/assets/{Index-CvSNWhOl.js → Index-DrguhRqW.js} +1 -1
  15. package/public/assets/Index-DtZrxZqP.js +1 -0
  16. package/public/assets/{Index-CNTmcq3o.js → Index-DusWDLpW.js} +1 -1
  17. package/public/assets/{Index-CKyiBy6h.js → Index-Q4_j8YjB.js} +1 -1
  18. package/public/assets/{Init-ec91xg4K.js → Init-UQADYgJ2.js} +1 -1
  19. package/public/assets/{LeftLogo-DdpN8uKw.js → LeftLogo-WwcR9Ouh.js} +1 -1
  20. package/public/assets/{Logs-Dr0aVld6.js → Logs-X8OwrHBK.js} +4 -4
  21. package/public/assets/{Markdown-CINu7VUT.js → Markdown-h-TQzZmw.js} +1 -1
  22. package/public/assets/{Modal-CMVKUmmz.js → Modal-BdxNbadF.js} +1 -1
  23. package/public/assets/{Modals-UgnVGGTd.js → Modals-TRAAm7M1.js} +1 -1
  24. package/public/assets/{NotUpToDate-Dv1x5laT.js → NotUpToDate-DzOvMb7E.js} +1 -1
  25. package/public/assets/{Npm-BQOhWPXB.js → Npm-CjJPSo9X.js} +1 -1
  26. package/public/assets/Overview-CeyyN0oI.js +1 -0
  27. package/public/assets/{Section-DWZalQSy.js → Section-lgKMkAwG.js} +1 -1
  28. package/public/assets/{Settings-gQ2r_ArG.js → Settings-CHmRle2O.js} +1 -1
  29. package/public/assets/{Spinner-BDdyfVPn.js → Spinner-CUHDMnpi.js} +1 -1
  30. package/public/assets/{StackChooser-D4JG1V6p.js → StackChooser-BevuWQmP.js} +1 -1
  31. package/public/assets/{StackChooser-Dy0nw-1k.js → StackChooser-_zBnelt3.js} +1 -1
  32. package/public/assets/{StackMultiple-CXbZO3gp.js → StackMultiple-Csmw3IYP.js} +1 -1
  33. package/public/assets/StackSingle-Dlt8beq2.js +1 -0
  34. package/public/assets/{Tabs-zx6MP1w5.js → Tabs-BywdfSIb.js} +1 -1
  35. package/public/assets/{Theme-CVJqEc74.js → Theme-Crc3Y5Xq.js} +1 -1
  36. package/public/assets/{Toolbox-CeYvSlof.js → Toolbox-CdJUlTYX.js} +1 -1
  37. package/public/assets/{cssMode-DRJB02N-.js → cssMode-Dc_mjwBm.js} +1 -1
  38. package/public/assets/{currentEditor-Mutd140I.js → currentEditor-7U_ffDbK.js} +1 -1
  39. package/public/assets/{freemarker2-CUNqJsQJ.js → freemarker2-DenoI_EN.js} +1 -1
  40. package/public/assets/{fs-zCN6KWbV.js → fs--ioNfX4e.js} +1 -1
  41. package/public/assets/{handlebars-DFPe5IUH.js → handlebars-DE9m4AD9.js} +1 -1
  42. package/public/assets/{html-iAZ8fYxX.js → html-DWkY5lmD.js} +1 -1
  43. package/public/assets/{htmlMode-CiLcIJ9M.js → htmlMode-H_uCDovv.js} +1 -1
  44. package/public/assets/{index-D6ITaiDq.js → index-BDHszrMp.js} +1 -1
  45. package/public/assets/{index-D7eodgey.js → index-BRb5P6Lf.js} +1 -1
  46. package/public/assets/{index-DlBh1BN-.js → index-BU5twE5I.js} +1 -1
  47. package/public/assets/{index-LXuPKlr_.js → index-BgXIYHf3.js} +1 -1
  48. package/public/assets/{index-CnHkskP1.js → index-C02AjRq4.js} +2 -2
  49. package/public/assets/{index-r5zB7DkH.js → index-CDIN4LjQ.js} +1 -1
  50. package/public/assets/{index-BYlmWHqo.js → index-CajhEFGy.js} +1 -1
  51. package/public/assets/{index-BvK3ngOF.js → index-Cz_I0ncW.js} +1 -1
  52. package/public/assets/{index-CED4m1pl.js → index-DNGpCJ06.js} +1 -1
  53. package/public/assets/index-DzbsgEyi.js +1 -0
  54. package/public/assets/{index-BykKOUV5.js → index-oilsqKTE.js} +1 -1
  55. package/public/assets/{javascript-DRLQS2xP.js → javascript-JEHh0kiL.js} +1 -1
  56. package/public/assets/{json-tree-view-vue3.es-BAcuRLYG.js → json-tree-view-vue3.es-rwBZaiwd.js} +1 -1
  57. package/public/assets/{jsonMode-BKVfjW9m.js → jsonMode-IIPA7cCY.js} +1 -1
  58. package/public/assets/{liquid-CBIGo8D7.js → liquid-BRkFpgwx.js} +1 -1
  59. package/public/assets/{mdx-D_MaKLKm.js → mdx-BrIuyYYh.js} +1 -1
  60. package/public/assets/{python-ROmifk5f.js → python-DeMyHNgB.js} +1 -1
  61. package/public/assets/{razor-B2BrIgAg.js → razor-JtCeytr2.js} +1 -1
  62. package/public/assets/router-6vVxI5YF.js +103 -0
  63. package/public/assets/{system-CmOEECxV.js → system-h6IsCj_l.js} +1 -1
  64. package/public/assets/{tsMode-ur-_baj-.js → tsMode-z-HPtKEe.js} +1 -1
  65. package/public/assets/{typescript-BI5fccq7.js → typescript-Doy-VTuU.js} +1 -1
  66. package/public/assets/{xml-C8ZhN0MF.js → xml-BOYtRcyI.js} +1 -1
  67. package/public/assets/{yaml-DEXuQlV0.js → yaml-Cu0wuKOc.js} +1 -1
  68. package/public/index.html +1 -1
  69. package/www.js +24 -3
  70. package/www.js.map +1 -1
  71. package/public/assets/Index-_Myie1IE.js +0 -1
  72. package/public/assets/Overview-CyhbZrp6.js +0 -1
  73. package/public/assets/StackSingle-BrA92wNq.js +0 -1
  74. package/public/assets/router-BmEvmcw4.js +0 -103
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runeya/runeya",
3
- "version": "1.33.26",
3
+ "version": "1.33.28",
4
4
  "description": "Monitor processes as a stack",
5
5
  "git": "https://github.com/runeya/runeya",
6
6
  "repository": "https://github.com/runeya/runeya",
@@ -1,4 +1,4 @@
1
- import{u as le,S as M,n as A,P as Xe,p as et,d as tt}from"./router-BmEvmcw4.js";import re from"./system-CmOEECxV.js";import{s as nt}from"./sort-BibmqbFD.js";import{_ as G}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{c as Y,a as y,o as p,b as f,d as U,t as O,n as F,r as E,w as we,e as w,f as _,g as $,h as me,T as ot,i as he,j as ee,S as V,k as ae,l as L,m as Ke,v as it,p as Ne,F as P,q as J,s as R,u as Q,x as st,y as lt,B as rt,z as at,$ as te,A as ve,C as Ie,D as ne,E as _e,G as ut,H as ge,I as X,J as ct,K as Le,L as D,M as dt,N as ft,O as vt}from"./index-CnHkskP1.js";import{s as ue,a as pt,b as Ee}from"./index-BvK3ngOF.js";import{s as K}from"./index-BYlmWHqo.js";import{s as ye,R as mt}from"./index-r5zB7DkH.js";import{M as Te}from"./Modal-CMVKUmmz.js";import{P as Fe}from"./Section-DWZalQSy.js";import{T as be}from"./Theme-CVJqEc74.js";import{s as ht}from"./index-CED4m1pl.js";import{S as gt}from"./Spinner-BDdyfVPn.js";import{s as yt}from"./index-LXuPKlr_.js";import{s as Re}from"./index-D6ITaiDq.js";import"./lodash-D2RHCRSL.js";import{s as bt,a as kt}from"./index-DlBh1BN-.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./Editor-BUC6Zjcy.js";import"./_baseFor-DiPelG4M.js";const wt={key:0,class:"fas fa-exclamation"},Ct={key:1,class:"fas fa-heartbeat success"},St={key:2,class:"fas fa-times warning"},It={key:3,class:"fas fa-square"},_t={__name:"sidebarItem",props:{service:{default:null}},setup(t){const e=le(),n=t,o=Y(()=>{var d;const v=e.currentRoute.value.fullPath.split("?")[0].split("/").filter(c=>c).pop();return(d=n.service)!=null&&d.label?encodeURIComponent(n.service.label)===v:!1});function i(u){localStorage.setItem("last-service-visisted",u.label||""),e.push({name:"stack-single",params:{label:u.label}})}return(u,v)=>(p(),y("div",{onClick:v[0]||(v[0]=d=>i(t.service)),class:F(["sidebar-item",{active:o.value,disabled:!t.service.enabled,crashed:t.service.crashed}])},[f("span",null,[t.service.crashed?(p(),y("i",wt)):t.service.enabled&&!t.service.exited?(p(),y("i",Ct)):t.service.exited?(p(),y("i",St)):(p(),y("i",It)),U(" "+O(t.service.label),1)]),v[1]||(v[1]=f("i",{class:"fas fa-chevron-right hover","aria-hidden":"true"},null,-1))],2))}},Et=G(_t,[["__scopeId","data-v-30b21d4f"]]),xt={class:"title"},Vt={__name:"sidebarGroup",props:{header:{default:""},open:{default:!1}},emits:["open","close"],setup(t,{emit:e}){const n=t,o=e,i=E(n.open),u=E();we(()=>n.open,async()=>{i.value=n.open,await he(),u.value&&(u.value.style.maxHeight=`${u.value.scrollHeight}px`)});function v(){i.value=!i.value,i.value?o("open"):o("close")}return(d,c)=>(p(),y("div",{class:F({open:i.value})},[f("div",{class:"header",onClick:v},[c[0]||(c[0]=f("i",{class:"fas fa-chevron-right"},null,-1)),f("h3",xt,O(t.header),1)]),w(ot,{name:"fade-sidebar"},{default:_(()=>[i.value?(p(),y("div",{key:0,class:"slot-container",ref_key:"slotRef",ref:u},[me(d.$slots,"default",{},void 0,!0)],512)):$("",!0)]),_:3})],2))}},Tt=G(Vt,[["__scopeId","data-v-e715e98d"]]),At={components:{sidebarItem:Et,sidebarGroup:Tt,Dialog:ue,Button:K,InputText:ye},props:{currentService:{default:null},isMinimized:{default:!1}},setup(){const t=le(),e=E(""),n=E("All"),o=E(!1);ee(async()=>{await M.loadServices(),V.on("service:crash",async({label:d,code:c,signal:r})=>{A.next("error",`${d} has crashed with code ${c}`),await M.loadServices()}),V.on("service:exit",async({label:d,code:c,signal:r})=>{await M.loadServices()}),V.on("service:healthcheck:down",async({label:d,code:c,signal:r})=>{const m=await M.getService(d);m!=null&&m.crashed||await M.loadServices()}),V.on("service:healthcheck:up",async({label:d,code:c,signal:r})=>{const m=await M.getService(d);m!=null&&m.crashed&&await M.loadServices()})});const i=Y(()=>nt(M.services.value.filter(d=>(d.label||"").toUpperCase().includes(e.value.toUpperCase()))).desc(d=>d.enabled)),u=Y(()=>{const d=i.value.reduce((c,r)=>{var m;return(m=r.groups)!=null&&m.length&&r.groups.forEach(h=>{c[h]||(c[h]=[]),c[h].push(r)}),c},{});return Object.keys(d).map(c=>({label:c,services:d[c]})).sort((c,r)=>c.label.localeCompare(r.label))}),v=E("");return{groups:u,openGroup:n,search:e,sortedStack:i,System:re,serviceLabelToAdd:v,addServiceModalVisible:o,addServiceError:Y(()=>M.services.value.find(d=>d.label===v.value)?"A service already exists with this label":""),addService(){M.services.value.find(d=>d.label===v.value)||ae.post("/stack/services",{label:v.value}).then(()=>{const d=v.value;o.value=!1,setTimeout(()=>{t.push({name:"stack-single",params:{label:d},query:{tab:"Configuration"}})},100),v.value=""})},launchService(d){const c=i.value[0];d.ctrlKey&&c&&(c==null||c.restart(),localStorage.setItem("last-service-visisted",c.label||""),t.push({name:"stack-single",params:{label:c.label}}))},openAddServiceModal(){o.value=!0},cancelAddService(){o.value=!1,v.value=""}}}},Ot={class:"sidebar-root"},jt={class:"sidebar"},Lt={class:"add-container"},$t={key:0},Mt={class:"header"},Pt={class:"services-container"},Dt={class:"minimized-container"},Nt={class:"p-fluid"},Rt={class:"p-field"},zt={key:0,class:"p-error"};function Bt(t,e,n,o,i,u){const v=L("Button"),d=L("sidebar-item"),c=L("sidebar-group"),r=L("InputText"),m=L("Dialog");return p(),y("div",Ot,[f("div",jt,[f("div",Lt,[w(v,{class:"add-button",fluid:"",outlined:"",icon:"fas fa-plus",label:"Add service",onClick:o.openAddServiceModal},null,8,["onClick"]),o.addServiceError?(p(),y("label",$t,O(o.addServiceError),1)):$("",!0)]),f("div",Mt,[Ke(f("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=h=>o.search=h),onInput:e[1]||(e[1]=h=>o.openGroup="All"),class:"search-input",placeholder:"Search service...",onKeypress:e[2]||(e[2]=Ne((...h)=>o.launchService&&o.launchService(...h),["enter"]))},null,544),[[it,o.search]])]),f("div",Pt,[w(c,{header:"All",open:o.openGroup==="All",onOpen:e[3]||(e[3]=h=>o.openGroup="All")},{default:_(()=>[(p(!0),y(P,null,J(o.sortedStack,h=>(p(),R(d,{key:h.label,service:h},null,8,["service"]))),128))]),_:1},8,["open"]),(p(!0),y(P,null,J(o.groups,h=>(p(),R(c,{header:h.label,open:o.openGroup===h.label,onOpen:x=>o.openGroup=h.label,onClose:e[4]||(e[4]=x=>o.openGroup="All")},{default:_(()=>[(p(!0),y(P,null,J(h.services,x=>(p(),R(d,{key:x.label,service:x},null,8,["service"]))),128))]),_:2},1032,["header","open","onOpen"]))),256))]),f("div",Dt,[n.isMinimized?$("",!0):(p(),R(v,{key:0,icon:"fas fa-chevron-left",outlined:"",onClick:e[5]||(e[5]=h=>t.$emit("toggle-minimized"))}))])]),w(m,{visible:o.addServiceModalVisible,"onUpdate:visible":e[7]||(e[7]=h=>o.addServiceModalVisible=h),modal:"",header:"Add new service",style:{width:"350px"}},{footer:_(()=>[w(v,{label:"Cancel",icon:"fas fa-times",onClick:o.cancelAddService,class:"p-button-text"},null,8,["onClick"]),w(v,{label:"Add",icon:"fas fa-plus",onClick:o.addService,disabled:!!o.addServiceError||!o.serviceLabelToAdd},null,8,["onClick","disabled"])]),default:_(()=>[f("div",Nt,[f("div",Rt,[w(r,{modelValue:o.serviceLabelToAdd,"onUpdate:modelValue":e[6]||(e[6]=h=>o.serviceLabelToAdd=h),placeholder:"Service name",onKeypress:Ne(o.addService,["enter"]),autofocus:"",fluid:""},null,8,["modelValue","onKeypress"]),o.addServiceError?(p(),y("small",zt,O(o.addServiceError),1)):$("",!0)])])]),_:1},8,["visible"])])}const Ut=G(At,[["render",Bt],["__scopeId","data-v-367d8d42"]]);function Jt(t={}){let e;if(t.repoUrl)e=t.repoUrl;else if(t.user&&t.repo)e=`https://github.com/${t.user}/${t.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");const n=new URL(`${e}/issues/new`),o=["body","title","labels","template","milestone","assignee","projects","type"];for(const i of o){let u=t[i];if(u!==void 0){if(i==="labels"||i==="projects"){if(!Array.isArray(u))throw new TypeError(`The \`${i}\` option should be an array`);u=u.join(",")}n.searchParams.set(i,u)}}return n.toString()}const qt=Jt({user:"runeya",repo:"runeya",body:`
1
+ import{u as le,S as M,n as A,P as Xe,p as et}from"./router-6vVxI5YF.js";import re from"./system-h6IsCj_l.js";import{s as tt}from"./sort-BibmqbFD.js";import{_ as G}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{c as Y,a as y,o as p,b as f,d as U,t as O,n as F,r as E,w as we,e as w,f as _,g as $,h as me,T as nt,i as he,j as ee,S as V,k as ae,l as L,m as Ke,v as ot,p as Ne,F as P,q as J,s as R,u as Q,x as it,y as st,B as lt,z as rt,$ as te,A as ve,C as Ie,D as ne,E as _e,G as at,H as ge,I as X,J as ut,K as Le,L as D,M as ct,N as dt,O as ft}from"./index-C02AjRq4.js";import{s as ue,a as vt,b as Ee}from"./index-Cz_I0ncW.js";import{s as K}from"./index-CajhEFGy.js";import{s as ye,R as pt}from"./index-CDIN4LjQ.js";import{M as Te}from"./Modal-BdxNbadF.js";import{P as Fe}from"./Section-lgKMkAwG.js";import{T as be}from"./Theme-Crc3Y5Xq.js";import{s as mt}from"./index-DNGpCJ06.js";import{S as ht}from"./Spinner-CUHDMnpi.js";import{s as gt}from"./index-BgXIYHf3.js";import{s as Re}from"./index-BDHszrMp.js";import"./lodash-D2RHCRSL.js";import{s as yt,a as bt}from"./index-BU5twE5I.js";import{d as kt}from"./index-DzbsgEyi.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./Editor-DN-ZxIRY.js";import"./_baseFor-DiPelG4M.js";const wt={key:0,class:"fas fa-exclamation"},Ct={key:1,class:"fas fa-heartbeat success"},St={key:2,class:"fas fa-times warning"},It={key:3,class:"fas fa-square"},_t={__name:"sidebarItem",props:{service:{default:null}},setup(t){const e=le(),n=t,o=Y(()=>{var d;const v=e.currentRoute.value.fullPath.split("?")[0].split("/").filter(c=>c).pop();return(d=n.service)!=null&&d.label?encodeURIComponent(n.service.label)===v:!1});function i(u){localStorage.setItem("last-service-visisted",u.label||""),e.push({name:"stack-single",params:{label:u.label}})}return(u,v)=>(p(),y("div",{onClick:v[0]||(v[0]=d=>i(t.service)),class:F(["sidebar-item",{active:o.value,disabled:!t.service.enabled,crashed:t.service.crashed}])},[f("span",null,[t.service.crashed?(p(),y("i",wt)):t.service.enabled&&!t.service.exited?(p(),y("i",Ct)):t.service.exited?(p(),y("i",St)):(p(),y("i",It)),U(" "+O(t.service.label),1)]),v[1]||(v[1]=f("i",{class:"fas fa-chevron-right hover","aria-hidden":"true"},null,-1))],2))}},Et=G(_t,[["__scopeId","data-v-30b21d4f"]]),xt={class:"title"},Vt={__name:"sidebarGroup",props:{header:{default:""},open:{default:!1}},emits:["open","close"],setup(t,{emit:e}){const n=t,o=e,i=E(n.open),u=E();we(()=>n.open,async()=>{i.value=n.open,await he(),u.value&&(u.value.style.maxHeight=`${u.value.scrollHeight}px`)});function v(){i.value=!i.value,i.value?o("open"):o("close")}return(d,c)=>(p(),y("div",{class:F({open:i.value})},[f("div",{class:"header",onClick:v},[c[0]||(c[0]=f("i",{class:"fas fa-chevron-right"},null,-1)),f("h3",xt,O(t.header),1)]),w(nt,{name:"fade-sidebar"},{default:_(()=>[i.value?(p(),y("div",{key:0,class:"slot-container",ref_key:"slotRef",ref:u},[me(d.$slots,"default",{},void 0,!0)],512)):$("",!0)]),_:3})],2))}},Tt=G(Vt,[["__scopeId","data-v-e715e98d"]]),At={components:{sidebarItem:Et,sidebarGroup:Tt,Dialog:ue,Button:K,InputText:ye},props:{currentService:{default:null},isMinimized:{default:!1}},setup(){const t=le(),e=E(""),n=E("All"),o=E(!1);ee(async()=>{await M.loadServices(),V.on("service:crash",async({label:d,code:c,signal:r})=>{A.next("error",`${d} has crashed with code ${c}`),await M.loadServices()}),V.on("service:exit",async({label:d,code:c,signal:r})=>{await M.loadServices()}),V.on("service:healthcheck:down",async({label:d,code:c,signal:r})=>{const m=await M.getService(d);m!=null&&m.crashed||await M.loadServices()}),V.on("service:healthcheck:up",async({label:d,code:c,signal:r})=>{const m=await M.getService(d);m!=null&&m.crashed&&await M.loadServices()})});const i=Y(()=>tt(M.services.value.filter(d=>(d.label||"").toUpperCase().includes(e.value.toUpperCase()))).desc(d=>d.enabled)),u=Y(()=>{const d=i.value.reduce((c,r)=>{var m;return(m=r.groups)!=null&&m.length&&r.groups.forEach(h=>{c[h]||(c[h]=[]),c[h].push(r)}),c},{});return Object.keys(d).map(c=>({label:c,services:d[c]})).sort((c,r)=>c.label.localeCompare(r.label))}),v=E("");return{groups:u,openGroup:n,search:e,sortedStack:i,System:re,serviceLabelToAdd:v,addServiceModalVisible:o,addServiceError:Y(()=>M.services.value.find(d=>d.label===v.value)?"A service already exists with this label":""),addService(){M.services.value.find(d=>d.label===v.value)||ae.post("/stack/services",{label:v.value}).then(()=>{const d=v.value;o.value=!1,setTimeout(()=>{t.push({name:"stack-single",params:{label:d},query:{tab:"Configuration"}})},100),v.value=""})},launchService(d){const c=i.value[0];d.ctrlKey&&c&&(c==null||c.restart(),localStorage.setItem("last-service-visisted",c.label||""),t.push({name:"stack-single",params:{label:c.label}}))},openAddServiceModal(){o.value=!0},cancelAddService(){o.value=!1,v.value=""}}}},Ot={class:"sidebar-root"},jt={class:"sidebar"},Lt={class:"add-container"},$t={key:0},Mt={class:"header"},Pt={class:"services-container"},Dt={class:"minimized-container"},Nt={class:"p-fluid"},Rt={class:"p-field"},zt={key:0,class:"p-error"};function Bt(t,e,n,o,i,u){const v=L("Button"),d=L("sidebar-item"),c=L("sidebar-group"),r=L("InputText"),m=L("Dialog");return p(),y("div",Ot,[f("div",jt,[f("div",Lt,[w(v,{class:"add-button",fluid:"",outlined:"",icon:"fas fa-plus",label:"Add service",onClick:o.openAddServiceModal},null,8,["onClick"]),o.addServiceError?(p(),y("label",$t,O(o.addServiceError),1)):$("",!0)]),f("div",Mt,[Ke(f("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=h=>o.search=h),onInput:e[1]||(e[1]=h=>o.openGroup="All"),class:"search-input",placeholder:"Search service...",onKeypress:e[2]||(e[2]=Ne((...h)=>o.launchService&&o.launchService(...h),["enter"]))},null,544),[[ot,o.search]])]),f("div",Pt,[w(c,{header:"All",open:o.openGroup==="All",onOpen:e[3]||(e[3]=h=>o.openGroup="All")},{default:_(()=>[(p(!0),y(P,null,J(o.sortedStack,h=>(p(),R(d,{key:h.label,service:h},null,8,["service"]))),128))]),_:1},8,["open"]),(p(!0),y(P,null,J(o.groups,h=>(p(),R(c,{header:h.label,open:o.openGroup===h.label,onOpen:x=>o.openGroup=h.label,onClose:e[4]||(e[4]=x=>o.openGroup="All")},{default:_(()=>[(p(!0),y(P,null,J(h.services,x=>(p(),R(d,{key:x.label,service:x},null,8,["service"]))),128))]),_:2},1032,["header","open","onOpen"]))),256))]),f("div",Dt,[n.isMinimized?$("",!0):(p(),R(v,{key:0,icon:"fas fa-chevron-left",outlined:"",onClick:e[5]||(e[5]=h=>t.$emit("toggle-minimized"))}))])]),w(m,{visible:o.addServiceModalVisible,"onUpdate:visible":e[7]||(e[7]=h=>o.addServiceModalVisible=h),modal:"",header:"Add new service",style:{width:"350px"}},{footer:_(()=>[w(v,{label:"Cancel",icon:"fas fa-times",onClick:o.cancelAddService,class:"p-button-text"},null,8,["onClick"]),w(v,{label:"Add",icon:"fas fa-plus",onClick:o.addService,disabled:!!o.addServiceError||!o.serviceLabelToAdd},null,8,["onClick","disabled"])]),default:_(()=>[f("div",Nt,[f("div",Rt,[w(r,{modelValue:o.serviceLabelToAdd,"onUpdate:modelValue":e[6]||(e[6]=h=>o.serviceLabelToAdd=h),placeholder:"Service name",onKeypress:Ne(o.addService,["enter"]),autofocus:"",fluid:""},null,8,["modelValue","onKeypress"]),o.addServiceError?(p(),y("small",zt,O(o.addServiceError),1)):$("",!0)])])]),_:1},8,["visible"])])}const Ut=G(At,[["render",Bt],["__scopeId","data-v-367d8d42"]]);function Jt(t={}){let e;if(t.repoUrl)e=t.repoUrl;else if(t.user&&t.repo)e=`https://github.com/${t.user}/${t.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");const n=new URL(`${e}/issues/new`),o=["body","title","labels","template","milestone","assignee","projects","type"];for(const i of o){let u=t[i];if(u!==void 0){if(i==="labels"||i==="projects"){if(!Array.isArray(u))throw new TypeError(`The \`${i}\` option should be an array`);u=u.join(",")}n.searchParams.set(i,u)}}return n.toString()}const qt=Jt({user:"runeya",repo:"runeya",body:`
2
2
  ## Issue
3
3
 
4
4
  ### Plateform
@@ -16,7 +16,7 @@ import{u as le,S as M,n as A,P as Xe,p as et,d as tt}from"./router-BmEvmcw4.js";
16
16
  ### Reproduction
17
17
  \\<Step to bug...>
18
18
 
19
- `}),Kt={key:0},Ft={key:1},Gt={class:"messages"},Wt={key:0,class:"badge"},Ht={key:2,class:"badge"},Qt={__name:"Notification",props:{width:{default:"420px"},notif:{default:null},nolimit:{default:!1}},setup(t){return(e,n)=>{var o,i,u,v,d,c,r;return t.notif?(p(),y("div",{key:0,class:F([t.notif.type,"notif"]),style:Q({maxWidth:t.width})},[t.notif.hover?t.notif.serviceLabel?(p(),y("h2",Ft,n[0]||(n[0]=[f("i",{class:"fas fa-chevron-right"},null,-1)]))):$("",!0):(p(),y(P,{key:0},[t.notif.serviceLabel?(p(),y("h2",Kt,O(t.notif.serviceLabel),1)):$("",!0)],64)),f("div",Gt,[(p(!0),y(P,null,J((o=t.notif)==null?void 0:o.msgs,m=>{var h,x;return p(),y("div",{class:F(["message",{glow:((x=(h=t.notif)==null?void 0:h.msgs)==null?void 0:x.length)>1,oneline:!t.nolimit}]),key:m.label},[U(O(m.label)+" ",1),t.notif.msgs.length>1&&(m==null?void 0:m.nb)>1?(p(),y("div",Wt,O(m==null?void 0:m.nb),1)):$("",!0)],2)}),128))]),((u=(i=t.notif)==null?void 0:i.msgs)==null?void 0:u.length)===1&&((d=(v=t.notif)==null?void 0:v.msgs[0])==null?void 0:d.nb)>1?(p(),y("div",Ht,O((r=(c=t.notif)==null?void 0:c.msgs[0])==null?void 0:r.nb),1)):$("",!0)],6)):$("",!0)}}},Ge=G(Qt,[["__scopeId","data-v-e8fbbfbc"]]),Yt={components:{Notification:Ge},setup(){const t=(e,n)=>A.remove(e,n);return{notifs:A.notifs,remove:t,trash(){Xe.map(A.notifs.value||[],async e=>{await new Promise(n=>setTimeout(n,50)),A.notifs.value.map(n=>t(n,!1))})}}}},Zt={class:"notifications-container"};function Xt(t,e,n,o,i,u){var d;const v=L("notification");return p(),y("div",Zt,[(d=o.notifs)!=null&&d.length?(p(),y("div",{key:0,class:"trash",onClick:e[0]||(e[0]=(...c)=>o.trash&&o.trash(...c))},e[1]||(e[1]=[f("i",{class:"fas fa-trash"},null,-1)]))):$("",!0),w(st,{tag:"div",class:"root-notification",name:"slide"},{default:_(()=>[(p(!0),y(P,null,J(o.notifs,c=>(p(),R(v,{key:c.id,notif:c,onClick:r=>o.remove(c,!0),onMouseenter:r=>c.hover=!0,onMouseleave:r=>c.hover=!1},null,8,["notif","onClick","onMouseenter","onMouseleave"]))),128))]),_:1})])}const en=G(Yt,[["render",Xt],["__scopeId","data-v-5b545583"]]);V.on("alert",t=>{A.next(t.type||"error",t.message,t.label,null,t.commandId)});const tn={components:{Modal:Te,Notification:Ge},setup(){const t=E(null);return ee(()=>{A.openHistory.subscribe(()=>{var n;(n=t.value)==null||n.open()})}),{notifs:E(A.notifsHistory.value),remove(n){A.removeHistory(n,!0)},modal:t}}},nn={class:"notif-history-root"},on={class:"notifications"};function sn(t,e,n,o,i,u){const v=L("notification"),d=L("modal");return p(),y("div",nn,[w(d,{position:"right",ref:"modal",width:"600px",noActions:!0},{header:_(()=>e[0]||(e[0]=[U(" Notifications ")])),body:_(()=>[f("div",on,[(p(!0),y(P,null,J(o.notifs,c=>(p(),R(v,{key:c.id,width:"100%",notif:c,onClick:r=>o.remove(c),nolimit:!0},null,8,["notif","onClick"]))),128))])]),_:1},512)])}const ln=G(tn,[["render",sn],["__scopeId","data-v-5c55cf64"]]),rn=["title"],an=["alt","src"],un={__name:"SidebarViewModeItem",props:{button:{default:null}},setup(t){const e=le(),n=t,o=Y(()=>e.currentRoute.value.fullPath.includes(n.button.active));return(i,u)=>(p(),R(Fe,{appendTo:"parent",trigger:"mouseenter",placement:"right"},{trigger:_(()=>[f("button",{onClick:u[0]||(u[0]=v=>t.button.click()),class:F([{active:o.value},"sidebar-item"]),title:t.button.text},[t.button.icon?(p(),y("i",{key:0,class:F({[t.button.icon]:!0}),"aria-hidden":"true"},null,2)):t.button.img?(p(),y("img",{key:1,alt:`Icon for ${t.button.text}`,src:t.button.img},null,8,an)):$("",!0)],10,rn)]),content:_(()=>[U(O(t.button.text),1)]),_:1}))}},cn=G(un,[["__scopeId","data-v-e115a663"]]),dn={name:"doughtnut-chart",props:{value:{default:0},rayon:{default:150},strokeWidth:{default:25},strokeWidthBg:{default:10},strokeColorBg:{default:"#b8d3ca"},strokeColor:{default:"#5e9985"},padding:{default:50},title:{default:""},adjustTop:{default:0},adjustLeft:{default:0},adjustTitleTop:{default:0},adjustTitleLeft:{default:0},adjustSubtitleTop:{default:0},adjustSubtitleLeft:{default:0},adjustContainer:{default:0},subtitle:{default:""},width:{default:"auto"},textAlign:{default:"left"},noSubtitle:{default:!1},fontSize:{default:30},titleSuffix:{default:""},color:{default:"#606060"},placeholder:{default:""}},data(){return{anim:1}},mounted(){this.animation()},methods:{animation(){this.anim=this.anim?1:2}}},fn=["title"],vn=["width","height"],pn=["stroke","stroke-width","cx","cy","r"],mn=["stroke","stroke-width","cx","cy","r","stroke-dasharray","stroke-dashoffset"],hn=["y","fill","font-size"],gn=["x","y","fill","font-size"],yn=["x","y","fill"];function bn(t,e,n,o,i,u){return n.value!==null?(p(),y("div",{key:0,style:Q({width:n.width,textAlign:n.textAlign,marginLeft:n.adjustLeft,marginTop:n.adjustTop}),class:"root",title:n.placeholder},[f("section",null,[(p(),y("svg",{width:n.rayon*2+n.strokeWidth+n.padding+n.adjustContainer,height:n.rayon*2+n.strokeWidth+n.padding+n.adjustContainer,xmlns:"http://www.w3.org/2000/svg"},[f("circle",{stroke:n.strokeColorBg,"stroke-width":n.strokeWidthBg,fill:"none",cx:n.rayon+n.strokeWidth/2+n.padding/2+n.adjustContainer/2,cy:n.rayon+n.strokeWidth/2+n.padding/2+n.adjustContainer/2,r:n.rayon},null,8,pn),f("circle",{class:"circle",stroke:n.strokeColor,"stroke-width":n.strokeWidth,fill:"none",cx:n.rayon+n.strokeWidth/2+n.padding/2+n.adjustContainer/2,cy:n.rayon+n.strokeWidth/2+n.padding/2+n.adjustContainer/2,r:n.rayon,"stroke-dasharray":2*3.14*n.rayon,"stroke-dashoffset":2*3.14*n.rayon*(1-n.value/100)},null,8,mn),n.noSubtitle?$("",!0):(p(),y("g",{key:0,class:F("info info-anim-"+i.anim)},[f("text",{class:"text",x:"50%",y:n.rayon+13+n.padding/2+n.adjustSubtitleTop,width:"70",textAlign:"center","dominant-baseline":"central","alignment-baseline":"central","text-anchor":"middle",fill:n.strokeColorBg,"font-weight":"bold","font-size":n.fontSize},O(n.value.toFixed(0))+"% ",9,hn)],2)),f("text",{class:"additionnalText",x:n.rayon+n.padding-10+n.adjustTitleLeft+n.adjustContainer/2,y:n.rayon+n.padding-25+n.adjustTitleTop+n.adjustContainer/2,width:"60","dominant-baseline":"central","alignment-baseline":"central","text-anchor":"middle",fill:n.color,"font-size":n.fontSize},O(n.title)+" "+O(n.titleSuffix),9,gn),f("text",{class:"additionnalSubText",x:n.rayon+n.padding-10+n.adjustTitleLeft,y:n.rayon+10+n.padding+n.adjustTitleTop,width:"60","dominant-baseline":"central","alignment-baseline":"central","text-anchor":"middle",fill:n.color,"font-size":"15"},O(n.subtitle),9,yn)],8,vn))])],12,fn)):$("",!0)}const kn=G(dn,[["render",bn],["__scopeId","data-v-6a6c8b71"]]);var wn=lt`
19
+ `}),Kt={key:0},Ft={key:1},Gt={class:"messages"},Wt={key:0,class:"badge"},Ht={key:2,class:"badge"},Qt={__name:"Notification",props:{width:{default:"420px"},notif:{default:null},nolimit:{default:!1}},setup(t){return(e,n)=>{var o,i,u,v,d,c,r;return t.notif?(p(),y("div",{key:0,class:F([t.notif.type,"notif"]),style:Q({maxWidth:t.width})},[t.notif.hover?t.notif.serviceLabel?(p(),y("h2",Ft,n[0]||(n[0]=[f("i",{class:"fas fa-chevron-right"},null,-1)]))):$("",!0):(p(),y(P,{key:0},[t.notif.serviceLabel?(p(),y("h2",Kt,O(t.notif.serviceLabel),1)):$("",!0)],64)),f("div",Gt,[(p(!0),y(P,null,J((o=t.notif)==null?void 0:o.msgs,m=>{var h,x;return p(),y("div",{class:F(["message",{glow:((x=(h=t.notif)==null?void 0:h.msgs)==null?void 0:x.length)>1,oneline:!t.nolimit}]),key:m.label},[U(O(m.label)+" ",1),t.notif.msgs.length>1&&(m==null?void 0:m.nb)>1?(p(),y("div",Wt,O(m==null?void 0:m.nb),1)):$("",!0)],2)}),128))]),((u=(i=t.notif)==null?void 0:i.msgs)==null?void 0:u.length)===1&&((d=(v=t.notif)==null?void 0:v.msgs[0])==null?void 0:d.nb)>1?(p(),y("div",Ht,O((r=(c=t.notif)==null?void 0:c.msgs[0])==null?void 0:r.nb),1)):$("",!0)],6)):$("",!0)}}},Ge=G(Qt,[["__scopeId","data-v-e8fbbfbc"]]),Yt={components:{Notification:Ge},setup(){const t=(e,n)=>A.remove(e,n);return{notifs:A.notifs,remove:t,trash(){Xe.map(A.notifs.value||[],async e=>{await new Promise(n=>setTimeout(n,50)),A.notifs.value.map(n=>t(n,!1))})}}}},Zt={class:"notifications-container"};function Xt(t,e,n,o,i,u){var d;const v=L("notification");return p(),y("div",Zt,[(d=o.notifs)!=null&&d.length?(p(),y("div",{key:0,class:"trash",onClick:e[0]||(e[0]=(...c)=>o.trash&&o.trash(...c))},e[1]||(e[1]=[f("i",{class:"fas fa-trash"},null,-1)]))):$("",!0),w(it,{tag:"div",class:"root-notification",name:"slide"},{default:_(()=>[(p(!0),y(P,null,J(o.notifs,c=>(p(),R(v,{key:c.id,notif:c,onClick:r=>o.remove(c,!0),onMouseenter:r=>c.hover=!0,onMouseleave:r=>c.hover=!1},null,8,["notif","onClick","onMouseenter","onMouseleave"]))),128))]),_:1})])}const en=G(Yt,[["render",Xt],["__scopeId","data-v-5b545583"]]);V.on("alert",t=>{A.next(t.type||"error",t.message,t.label,null,t.commandId)});const tn={components:{Modal:Te,Notification:Ge},setup(){const t=E(null);return ee(()=>{A.openHistory.subscribe(()=>{var n;(n=t.value)==null||n.open()})}),{notifs:E(A.notifsHistory.value),remove(n){A.removeHistory(n,!0)},modal:t}}},nn={class:"notif-history-root"},on={class:"notifications"};function sn(t,e,n,o,i,u){const v=L("notification"),d=L("modal");return p(),y("div",nn,[w(d,{position:"right",ref:"modal",width:"600px",noActions:!0},{header:_(()=>e[0]||(e[0]=[U(" Notifications ")])),body:_(()=>[f("div",on,[(p(!0),y(P,null,J(o.notifs,c=>(p(),R(v,{key:c.id,width:"100%",notif:c,onClick:r=>o.remove(c),nolimit:!0},null,8,["notif","onClick"]))),128))])]),_:1},512)])}const ln=G(tn,[["render",sn],["__scopeId","data-v-5c55cf64"]]),rn=["title"],an=["alt","src"],un={__name:"SidebarViewModeItem",props:{button:{default:null}},setup(t){const e=le(),n=t,o=Y(()=>e.currentRoute.value.fullPath.includes(n.button.active));return(i,u)=>(p(),R(Fe,{appendTo:"parent",trigger:"mouseenter",placement:"right"},{trigger:_(()=>[f("button",{onClick:u[0]||(u[0]=v=>t.button.click()),class:F([{active:o.value},"sidebar-item"]),title:t.button.text},[t.button.icon?(p(),y("i",{key:0,class:F({[t.button.icon]:!0}),"aria-hidden":"true"},null,2)):t.button.img?(p(),y("img",{key:1,alt:`Icon for ${t.button.text}`,src:t.button.img},null,8,an)):$("",!0)],10,rn)]),content:_(()=>[U(O(t.button.text),1)]),_:1}))}},cn=G(un,[["__scopeId","data-v-e115a663"]]),dn={name:"doughtnut-chart",props:{value:{default:0},rayon:{default:150},strokeWidth:{default:25},strokeWidthBg:{default:10},strokeColorBg:{default:"#b8d3ca"},strokeColor:{default:"#5e9985"},padding:{default:50},title:{default:""},adjustTop:{default:0},adjustLeft:{default:0},adjustTitleTop:{default:0},adjustTitleLeft:{default:0},adjustSubtitleTop:{default:0},adjustSubtitleLeft:{default:0},adjustContainer:{default:0},subtitle:{default:""},width:{default:"auto"},textAlign:{default:"left"},noSubtitle:{default:!1},fontSize:{default:30},titleSuffix:{default:""},color:{default:"#606060"},placeholder:{default:""}},data(){return{anim:1}},mounted(){this.animation()},methods:{animation(){this.anim=this.anim?1:2}}},fn=["title"],vn=["width","height"],pn=["stroke","stroke-width","cx","cy","r"],mn=["stroke","stroke-width","cx","cy","r","stroke-dasharray","stroke-dashoffset"],hn=["y","fill","font-size"],gn=["x","y","fill","font-size"],yn=["x","y","fill"];function bn(t,e,n,o,i,u){return n.value!==null?(p(),y("div",{key:0,style:Q({width:n.width,textAlign:n.textAlign,marginLeft:n.adjustLeft,marginTop:n.adjustTop}),class:"root",title:n.placeholder},[f("section",null,[(p(),y("svg",{width:n.rayon*2+n.strokeWidth+n.padding+n.adjustContainer,height:n.rayon*2+n.strokeWidth+n.padding+n.adjustContainer,xmlns:"http://www.w3.org/2000/svg"},[f("circle",{stroke:n.strokeColorBg,"stroke-width":n.strokeWidthBg,fill:"none",cx:n.rayon+n.strokeWidth/2+n.padding/2+n.adjustContainer/2,cy:n.rayon+n.strokeWidth/2+n.padding/2+n.adjustContainer/2,r:n.rayon},null,8,pn),f("circle",{class:"circle",stroke:n.strokeColor,"stroke-width":n.strokeWidth,fill:"none",cx:n.rayon+n.strokeWidth/2+n.padding/2+n.adjustContainer/2,cy:n.rayon+n.strokeWidth/2+n.padding/2+n.adjustContainer/2,r:n.rayon,"stroke-dasharray":2*3.14*n.rayon,"stroke-dashoffset":2*3.14*n.rayon*(1-n.value/100)},null,8,mn),n.noSubtitle?$("",!0):(p(),y("g",{key:0,class:F("info info-anim-"+i.anim)},[f("text",{class:"text",x:"50%",y:n.rayon+13+n.padding/2+n.adjustSubtitleTop,width:"70",textAlign:"center","dominant-baseline":"central","alignment-baseline":"central","text-anchor":"middle",fill:n.strokeColorBg,"font-weight":"bold","font-size":n.fontSize},O(n.value.toFixed(0))+"% ",9,hn)],2)),f("text",{class:"additionnalText",x:n.rayon+n.padding-10+n.adjustTitleLeft+n.adjustContainer/2,y:n.rayon+n.padding-25+n.adjustTitleTop+n.adjustContainer/2,width:"60","dominant-baseline":"central","alignment-baseline":"central","text-anchor":"middle",fill:n.color,"font-size":n.fontSize},O(n.title)+" "+O(n.titleSuffix),9,gn),f("text",{class:"additionnalSubText",x:n.rayon+n.padding-10+n.adjustTitleLeft,y:n.rayon+10+n.padding+n.adjustTitleTop,width:"60","dominant-baseline":"central","alignment-baseline":"central","text-anchor":"middle",fill:n.color,"font-size":"15"},O(n.subtitle),9,yn)],8,vn))])],12,fn)):$("",!0)}const kn=G(dn,[["render",bn],["__scopeId","data-v-6a6c8b71"]]);var wn=st`
20
20
  .p-speeddial {
21
21
  position: static;
22
22
  display: flex;
@@ -97,5 +97,5 @@ import{u as le,S as M,n as A,P as Xe,p as et,d as tt}from"./router-BmEvmcw4.js";
97
97
  .p-speeddial-open .p-speeddial-rotate {
98
98
  transform: rotate(45deg);
99
99
  }
100
- `;function ce(t){"@babel/helpers - typeof";return ce=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ce(t)}function xe(t,e,n){return(e=Cn(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Cn(t){var e=Sn(t,"string");return ce(e)=="symbol"?e:e+""}function Sn(t,e){if(ce(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var o=n.call(t,e);if(ce(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var In={root:function(e){var n=e.props;return{alignItems:(n.direction==="up"||n.direction==="down")&&"center",justifyContent:(n.direction==="left"||n.direction==="right")&&"center",flexDirection:n.direction==="up"?"column-reverse":n.direction==="down"?"column":n.direction==="left"?"row-reverse":n.direction==="right"?"row":null}},list:function(e){var n=e.props;return{flexDirection:n.direction==="up"?"column-reverse":n.direction==="down"?"column":n.direction==="left"?"row-reverse":n.direction==="right"?"row":null}}},_n={root:function(e){var n=e.instance,o=e.props;return["p-speeddial p-component p-speeddial-".concat(o.type),xe(xe(xe({},"p-speeddial-direction-".concat(o.direction),o.type!=="circle"),"p-speeddial-open",n.d_visible),"p-disabled",o.disabled)]},pcButton:function(e){var n=e.props;return["p-speeddial-button",{"p-speeddial-rotate":n.rotateAnimation&&!n.hideIcon}]},list:"p-speeddial-list",item:"p-speeddial-item",action:"p-speeddial-action",actionIcon:"p-speeddial-action-icon",mask:function(e){var n=e.instance;return["p-speeddial-mask",{"p-speeddial-mask-visible":n.d_visible}]}},En=rt.extend({name:"speeddial",style:wn,classes:_n,inlineStyles:In}),xn={name:"BaseSpeedDial",extends:ht,props:{model:null,visible:{type:Boolean,default:!1},direction:{type:String,default:"up"},transitionDelay:{type:Number,default:30},type:{type:String,default:"linear"},radius:{type:Number,default:0},mask:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},hideOnClickOutside:{type:Boolean,default:!0},buttonClass:null,maskStyle:null,maskClass:null,showIcon:{type:String,default:void 0},hideIcon:{type:String,default:void 0},rotateAnimation:{type:Boolean,default:!0},tooltipOptions:null,style:null,class:null,buttonProps:{type:Object,default:function(){return{rounded:!0}}},actionButtonProps:{type:Object,default:function(){return{severity:"secondary",rounded:!0,size:"small"}}},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:En,provide:function(){return{$pcSpeedDial:this,$parentInstance:this}}};function de(t){"@babel/helpers - typeof";return de=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},de(t)}function ze(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,o)}return n}function Vn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ze(Object(n),!0).forEach(function(o){Tn(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ze(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function Tn(t,e,n){return(e=An(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function An(t){var e=On(t,"string");return de(e)=="symbol"?e:e+""}function On(t,e){if(de(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var o=n.call(t,e);if(de(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function pe(t){return Mn(t)||$n(t)||Ln(t)||jn()}function jn(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
101
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ln(t,e){if(t){if(typeof t=="string")return Ae(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ae(t,e):void 0}}function $n(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Mn(t){if(Array.isArray(t))return Ae(t)}function Ae(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=Array(e);n<e;n++)o[n]=t[n];return o}var Ve=3.14159265358979,We={name:"SpeedDial",extends:xn,inheritAttrs:!1,emits:["click","show","hide","focus","blur"],documentClickListener:null,container:null,list:null,data:function(){return{d_visible:this.visible,isItemClicked:!1,focused:!1,focusedOptionIndex:-1}},watch:{visible:function(e){this.d_visible=e}},mounted:function(){if(this.type!=="linear"){var e=ne(this.container,'[data-pc-name="pcbutton"]'),n=ne(this.list,'[data-pc-section="item"]');if(e&&n){var o=Math.abs(e.offsetWidth-n.offsetWidth),i=Math.abs(e.offsetHeight-n.offsetHeight);this.list.style.setProperty(te("item.diff.x").name,"".concat(o/2,"px")),this.list.style.setProperty(te("item.diff.y").name,"".concat(i/2,"px"))}}this.hideOnClickOutside&&this.bindDocumentClickListener()},beforeUnmount:function(){this.unbindDocumentClickListener()},methods:{getPTOptions:function(e,n){return this.ptm(n,{context:{active:this.isItemActive(e),hidden:!this.d_visible}})},onFocus:function(e){this.$emit("focus",e)},onBlur:function(e){this.focusedOptionIndex=-1,this.$emit("blur",e)},onItemClick:function(e,n){n.command&&n.command({originalEvent:e,item:n}),this.hide(),this.isItemClicked=!0,e.preventDefault()},onClick:function(e){this.d_visible?this.hide():this.show(),this.isItemClicked=!0,this.$emit("click",e)},show:function(){this.d_visible=!0,this.$emit("show")},hide:function(){this.d_visible=!1,this.$emit("hide")},calculateTransitionDelay:function(e){var n=this.model.length,o=this.d_visible;return(o?e:n-e-1)*this.transitionDelay},onTogglerKeydown:function(e){switch(e.code){case"ArrowDown":case"ArrowLeft":this.onTogglerArrowDown(e);break;case"ArrowUp":case"ArrowRight":this.onTogglerArrowUp(e);break;case"Escape":this.onEscapeKey();break}},onKeyDown:function(e){switch(e.code){case"ArrowDown":this.onArrowDown(e);break;case"ArrowUp":this.onArrowUp(e);break;case"ArrowLeft":this.onArrowLeft(e);break;case"ArrowRight":this.onArrowRight(e);break;case"Enter":case"NumpadEnter":case"Space":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break}},onTogglerArrowUp:function(e){this.show(),this.navigatePrevItem(e),e.preventDefault()},onTogglerArrowDown:function(e){this.show(),this.navigateNextItem(e),e.preventDefault()},onEnterKey:function(e){var n=this,o=ve(this.container,'[data-pc-section="item"]'),i=pe(o).findIndex(function(v){return v.id===n.focusedOptionIndex}),u=ne(this.container,"button");this.onItemClick(e,this.model[i]),this.onBlur(e),u&&_e(u)},onEscapeKey:function(){this.hide();var e=ne(this.container,"button");e&&_e(e)},onArrowUp:function(e){this.direction==="down"?this.navigatePrevItem(e):this.navigateNextItem(e)},onArrowDown:function(e){this.direction==="down"?this.navigateNextItem(e):this.navigatePrevItem(e)},onArrowLeft:function(e){var n=["left","up-right","down-left"],o=["right","up-left","down-right"];n.includes(this.direction)?this.navigateNextItem(e):o.includes(this.direction)?this.navigatePrevItem(e):this.navigatePrevItem(e)},onArrowRight:function(e){var n=["left","up-right","down-left"],o=["right","up-left","down-right"];n.includes(this.direction)?this.navigatePrevItem(e):o.includes(this.direction)?this.navigateNextItem(e):this.navigateNextItem(e)},onEndKey:function(e){e.preventDefault(),this.focusedOptionIndex=-1,this.navigatePrevItem(e)},onHomeKey:function(e){e.preventDefault(),this.focusedOptionIndex=-1,this.navigateNextItem(e)},navigateNextItem:function(e){var n=this.findNextOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(n),e.preventDefault()},navigatePrevItem:function(e){var n=this.findPrevOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(n),e.preventDefault()},changeFocusedOptionIndex:function(e){var n=ve(this.container,'[data-pc-section="item"]'),o=pe(n).filter(function(u){return!Ie(ne(u,"a"),"p-disabled")});if(o[e]){this.focusedOptionIndex=o[e].getAttribute("id");var i=ne(o[e],'[type="button"]');i&&_e(i)}},findPrevOptionIndex:function(e){var n=ve(this.container,'[data-pc-section="item"]'),o=pe(n).filter(function(v){return!Ie(ne(v,"a"),"p-disabled")}),i=e===-1?o[o.length-1].id:e,u=o.findIndex(function(v){return v.getAttribute("id")===i});return u=e===-1?o.length-1:u-1,u},findNextOptionIndex:function(e){var n=ve(this.container,'[data-pc-section="item"]'),o=pe(n).filter(function(v){return!Ie(ne(v,"a"),"p-disabled")}),i=e===-1?o[0].id:e,u=o.findIndex(function(v){return v.getAttribute("id")===i});return u=e===-1?0:u+1,u},calculatePointStyle:function(e){var n=this.type;if(n!=="linear"){var o=this.model.length,i=this.radius||o*20;if(n==="circle"){var u=2*Ve/o;return{left:"calc(".concat(i*Math.cos(u*e),"px + ").concat(te("item.diff.x").variable,")"),top:"calc(".concat(i*Math.sin(u*e),"px + ").concat(te("item.diff.y").variable,")")}}else if(n==="semi-circle"){var v=this.direction,d=Ve/(o-1),c="calc(".concat(i*Math.cos(d*e),"px + ").concat(te("item.diff.x").variable,")"),r="calc(".concat(i*Math.sin(d*e),"px + ").concat(te("item.diff.y").variable,")");if(v==="up")return{left:c,bottom:r};if(v==="down")return{left:c,top:r};if(v==="left")return{right:r,top:c};if(v==="right")return{left:r,top:c}}else if(n==="quarter-circle"){var m=this.direction,h=Ve/(2*(o-1)),x="calc(".concat(i*Math.cos(h*e),"px + ").concat(te("item.diff.x").variable,")"),j="calc(".concat(i*Math.sin(h*e),"px + ").concat(te("item.diff.y").variable,")");if(m==="up-left")return{right:x,bottom:j};if(m==="up-right")return{left:x,bottom:j};if(m==="down-left")return{right:j,top:x};if(m==="down-right")return{left:j,top:x}}}return{}},getItemStyle:function(e){var n=this.calculateTransitionDelay(e),o=this.calculatePointStyle(e);return Vn({transitionDelay:"".concat(n,"ms")},o)},bindDocumentClickListener:function(){var e=this;this.documentClickListener||(this.documentClickListener=function(n){e.d_visible&&e.isOutsideClicked(n)&&e.hide(),e.isItemClicked=!1},document.addEventListener("click",this.documentClickListener))},unbindDocumentClickListener:function(){this.documentClickListener&&(document.removeEventListener("click",this.documentClickListener),this.documentClickListener=null)},isOutsideClicked:function(e){return this.container&&!(this.container.isSameNode(e.target)||this.container.contains(e.target)||this.isItemClicked)},isItemVisible:function(e){return typeof e.visible=="function"?e.visible():e.visible!==!1},isItemActive:function(e){return e===this.focusedOptionId},containerRef:function(e){this.container=e},listRef:function(e){this.list=e}},computed:{containerClass:function(){return[this.cx("root"),this.class]},focusedOptionId:function(){return this.focusedOptionIndex!==-1?this.focusedOptionIndex:null}},components:{Button:K,PlusIcon:pt},directives:{ripple:mt,tooltip:at}},Pn=["id"],Dn=["id","data-p-active"];function Nn(t,e,n,o,i,u){var v=L("Button"),d=ut("tooltip");return p(),y(P,null,[f("div",X({ref:u.containerRef,class:u.containerClass,style:[t.style,t.sx("root")]},t.ptmi("root")),[me(t.$slots,"button",{visible:i.d_visible,toggleCallback:u.onClick},function(){return[w(v,X({class:[t.cx("pcButton"),t.buttonClass],disabled:t.disabled,"aria-expanded":i.d_visible,"aria-haspopup":!0,"aria-controls":t.$id+"_list","aria-label":t.ariaLabel,"aria-labelledby":t.ariaLabelledby,unstyled:t.unstyled,onClick:e[0]||(e[0]=function(c){return u.onClick(c)}),onKeydown:u.onTogglerKeydown},t.buttonProps,{pt:t.ptm("pcButton")}),{icon:_(function(c){return[me(t.$slots,"icon",{visible:i.d_visible},function(){return[i.d_visible&&t.hideIcon?(p(),R(ge(t.hideIcon?"span":"PlusIcon"),X({key:0,class:[t.hideIcon,c.class]},t.ptm("pcButton").icon,{"data-pc-section":"icon"}),null,16,["class"])):(p(),R(ge(t.showIcon?"span":"PlusIcon"),X({key:1,class:[i.d_visible&&t.hideIcon?t.hideIcon:t.showIcon,c.class]},t.ptm("pcButton").icon,{"data-pc-section":"icon"}),null,16,["class"]))]})]}),_:3},16,["class","disabled","aria-expanded","aria-controls","aria-label","aria-labelledby","unstyled","onKeydown","pt"])]}),f("ul",X({ref:u.listRef,id:t.$id+"_list",class:t.cx("list"),style:t.sx("list"),role:"menu",tabindex:"-1",onFocus:e[1]||(e[1]=function(){return u.onFocus&&u.onFocus.apply(u,arguments)}),onBlur:e[2]||(e[2]=function(){return u.onBlur&&u.onBlur.apply(u,arguments)}),onKeydown:e[3]||(e[3]=function(){return u.onKeyDown&&u.onKeyDown.apply(u,arguments)})},t.ptm("list")),[(p(!0),y(P,null,J(t.model,function(c,r){return p(),y(P,{key:r},[u.isItemVisible(c)?(p(),y("li",X({key:0,id:"".concat(t.$id,"_").concat(r),class:t.cx("item",{id:"".concat(t.$id,"_").concat(r)}),style:u.getItemStyle(r),role:"none","data-p-active":u.isItemActive("".concat(t.$id,"_").concat(r)),ref_for:!0},u.getPTOptions("".concat(t.$id,"_").concat(r),"item")),[t.$slots.item?(p(),R(ge(t.$slots.item),{key:1,item:c,onClick:function(h){return u.onItemClick(h,c)},toggleCallback:function(h){return u.onItemClick(h,c)}},null,8,["item","onClick","toggleCallback"])):Ke((p(),R(v,X({key:0,tabindex:-1,role:"menuitem",class:t.cx("pcAction",{item:c}),"aria-label":c.label,disabled:t.disabled,unstyled:t.unstyled,onClick:function(h){return u.onItemClick(h,c)},ref_for:!0},t.actionButtonProps,{pt:u.getPTOptions("".concat(t.$id,"_").concat(r),"pcAction")}),ct({_:2},[c.icon?{name:"icon",fn:_(function(m){return[me(t.$slots,"itemicon",{item:c,class:F(m.class)},function(){return[f("span",X({class:[c.icon,m.class],ref_for:!0},u.getPTOptions("".concat(t.$id,"_").concat(r),"actionIcon")),null,16)]})]}),key:"0"}:void 0]),1040,["class","aria-label","disabled","unstyled","onClick","pt"])),[[d,{value:c.label,disabled:!t.tooltipOptions},t.tooltipOptions]])],16,Dn)):$("",!0)],64)}),128))],16,Pn)],16),t.mask?(p(),y("div",X({key:0,class:[t.cx("mask"),t.maskClass],style:t.maskStyle},t.ptm("mask")),null,16)):$("",!0)],64)}We.render=Nn;const Rn={components:{SidebarViewModeItem:cn,DoughtnutChart:kn,Popover:Fe,SpeedDial:We,Button:K},setup(){const t=le(),e=E([]),n=E([]),o=E(0),i=E(0);ee(async()=>{await M.loadServices();const{data:d}=await ae.get("/plugins/sidebar"),{data:c}=await ae.get("/plugins/sidebar-top");e.value=(d==null?void 0:d.flat())||[],n.value=(c==null?void 0:c.flat())||[],V.on("infos:global",r=>{const{memPercentage:m,cpu:h}=r;o.value=h,i.value=m})});function u(d){return d.placements.map(c=>{if(typeof c!="string")return{text:c.label,icon:c.icon,img:re.proxyImg(c.img),click:c.goTo?()=>t.push(c.goTo||"/"):()=>{},active:c.active}})}function v(d){return d.map(u).flat().filter(c=>c)}return{speedDialVisible:E(!0),Theme:be,groups:Y(()=>{const d=Object.keys(be.themes.value).reduce((r,m)=>{const h=be.themes.value[m];if(h.id=m,!h.public||!h.preview)return r;const x=h.group||"Unknown";return r[x]||(r[x]={group:"unknown",themes:[]}),r[x].group=x,r[x].themes.push(h),r},{}),c=Object.keys(d).map(r=>({group:r,themes:d[r].themes}));return console.log(c.sort((r,m)=>r.group.localeCompare(m.group))),c.sort((r,m)=>r.group.localeCompare(m.group))}),buttons:Y(()=>[{text:"Overview",active:"overview",icon:"fas fa-home",click:()=>t.push({name:"overview"})},{text:"Single View",active:"single",icon:"fas fa-columns",click:()=>{var c;const d=M.services.value.find(r=>r.label===localStorage.getItem("last-service-visisted"));d?t.push({name:"stack-single",params:{label:d.label}}):M.services.value[0]?t.push({name:"stack-single",params:{label:(c=M.services.value[0])==null?void 0:c.label}}):t.push({name:"stack-single-no-view"})}},{text:"Multiple view",active:"multiple",icon:"fas fa-th",click:()=>t.push({name:"stack-multiple"})},...v(n.value)]),buttonsPlugins:Y(()=>[...v(e.value),...globalThis.sidebarPlugins.value.map(d=>({...d,active:`/dynamic/${encodeURIComponent(d.id)}`,click:()=>{t.push({path:`/dynamic/${encodeURIComponent(d.id)}`})}}))]),buttonsBottom:Y(()=>[{text:"Settings",active:"settings",icon:"fas fa-cog",click:()=>t.push({name:"settings-no-view"})},{text:"Disconnect",icon:"fas fa-unlink",click:()=>re.disconnect()}]),cpu:o,mem:i,System:re}}},zn={class:"sidebar"},Bn={key:0},Un={key:1},Jn={style:{position:"relative"}},qn={class:"button-container"},Kn=["onClick","title"],Fn=["alt"],Gn={class:"groups"},Wn={class:"group"},Hn={class:"themes"},Qn=["onClick"];function Yn(t,e,n,o,i,u){const v=L("sidebar-view-mode-item"),d=L("Popover"),c=L("doughtnut-chart");return p(),y("div",zn,[o.buttons.length?(p(),y("ul",Bn,[(p(!0),y(P,null,J(o.buttons,r=>(p(),R(v,{key:r.label,button:r},null,8,["button"]))),128))])):$("",!0),o.buttonsBottom.length?(p(),y("ul",Un,[f("div",Jn,[(p(!0),y(P,null,J(o.buttonsPlugins,r=>(p(),y("div",{key:r==null?void 0:r.text},[w(d,{appendTo:"parent",trigger:"mouseenter",placement:"right"},{trigger:_(()=>[f("div",qn,[f("button",{onClick:m=>r==null?void 0:r.click(),class:F([{active:t.$router.currentRoute.value.fullPath.includes((r==null?void 0:r.active)||""),"button-speed-dial":!0},"sidebar-item"]),title:r==null?void 0:r.text},[r!=null&&r.icon?(p(),y("i",{key:0,class:F({[r==null?void 0:r.icon]:!0}),"aria-hidden":"true"},null,2)):r!=null&&r.img?(p(),y("div",{key:1,alt:`Icon for ${r==null?void 0:r.text}`,class:"masked-icon",style:Q({WebkitMaskImage:`url(${r==null?void 0:r.img})`,maskImage:`url(${r==null?void 0:r.img})`})},null,12,Fn)):$("",!0)],10,Kn)])]),content:_(()=>[U(O(r==null?void 0:r.text),1)]),_:2},1024)]))),128))]),w(d,{appendTo:"parent",trigger:"mouseenter",placement:"right"},{trigger:_(()=>[w(c,{placeholder:"CPU",width:"10px",rayon:17,fontSize:"11",value:o.cpu*100,strokeWidth:3,strokeWidthBg:5,adjustSubtitleLeft:-2,adjustTitleTop:-5,adjustSubtitleTop:-11,padding:14,strokeColor:"var(--system-primary600-lightest)",strokeColorBg:"var(--system-primary400)"},null,8,["value"])]),content:_(()=>e[0]||(e[0]=[U(" CPU ")])),_:1}),w(d,{appendTo:"parent",trigger:"mouseenter",placement:"right"},{trigger:_(()=>[w(c,{placeholder:"RAM",width:"10px",rayon:17,value:o.mem,fontSize:"11",strokeWidth:3,strokeWidthBg:5,adjustSubtitleTop:-11,adjustSubtitleLeft:-2,adjustTitleTop:-5,padding:14,strokeColor:"var(--system-tertiary400)",strokeColorBg:"var(--system-tertiary600)"},null,8,["value"])]),content:_(()=>e[1]||(e[1]=[U(" RAM ")])),_:1}),w(d,{appendTo:"parent",trigger:"mouseenter",placement:"left-start",showOnCreate:!1},{trigger:_(()=>[w(v,{key:"Themes",button:{text:"",icon:"fas fa-sun",click:()=>{var r,m;console.log(o.Theme),(m=(r=o.Theme)==null?void 0:r.toggle)==null||m.call(r)}}},null,8,["button"])]),content:_(()=>[f("div",Gn,[(p(!0),y(P,null,J(o.groups,r=>(p(),y("div",Wn,[U(O(r.group)+" ",1),f("div",Hn,[(p(!0),y(P,null,J(r.themes,m=>(p(),y("div",{class:"theme",onClick:h=>o.Theme.apply(m.id),key:m.id},[(p(),y("div",{class:"view",key:m.id},[f("div",{class:"viewwindows",style:Q({...m.preview.background||{},border:`4px solid ${m.preview.background.backgroundColor}`})},[f("div",{class:"rad",style:Q(m.preview.foreground4||m.preview.foreground1)},null,4),f("div",{class:"rad",style:Q(m.preview.foreground3||m.preview.foreground1)},null,4),f("div",{class:"rad",style:Q(m.preview.foreground2||m.preview.foreground1)},null,4),f("div",{class:"rad",style:Q(m.preview.foreground1)},null,4)],4)]))],8,Qn))),128))])]))),256))])]),_:1}),(p(!0),y(P,null,J(o.buttonsBottom,r=>(p(),R(v,{key:r.label,button:r},null,8,["button"]))),128))])):$("",!0)])}const Zn=G(Rn,[["render",Yn],["__scopeId","data-v-792676e1"]]),Xn={class:"reload-modal"},eo={__name:"EnvironmentsChooser",setup(t){const e=le(),n=E(null),o=E([]),i=E(!1),u=E(null),v=E(null),d=E({label:"",color:"",bgColor:""});ee(c);async function c(){n.value=await M.getEnvironment(),o.value=await M.getEnvironments()}ee(()=>{V.on("reloadEnvironments",c)}),Le(()=>{V.off("reloadEnvironments",c)});async function r(){var C,k;await((C=v.value)==null?void 0:C.open().promise)&&(k=d.value)!=null&&k.label&&(await M.createEnvironment(d.value),d.value={label:"",color:"",bgColor:""})}function m(){var j;return(j=M.services.value)==null?void 0:j.filter(C=>C.enabled).reduce((C,k)=>{var z,q;const T=Object.keys(((z=k==null?void 0:k.spawnOptions)==null?void 0:z.overrideEnvs)||{});return Object.keys(((q=k==null?void 0:k.spawnOptions)==null?void 0:q.env)||{}).some(Z=>T.includes(Z))&&C.push(k),C},[])}async function h({value:j}){const C=m();C!=null&&C.length&&u.value&&!await u.value.open(C).promise||(i.value=!0,await M.changeEnvironment(j).then(()=>{window.location.reload()}).catch(k=>{console.error(k),A.next("error","Problem has occured")}).finally(()=>{i.value=!1}))}function x(){e.push({name:"settings",params:{setting:"environments"}})}return(j,C)=>(p(),y(P,null,[n.value?(p(),y("div",{key:0,class:"banner",style:Q({backgroundColor:n.value.bgColor||"transparent",color:n.value.color||"transparent"})},[f("div",null,[C[3]||(C[3]=U(" Current environment ")),w(D(yt),{class:"select",size:"small",defaultValue:n.value.label,value:n.value.label,onChange:h,options:o.value.filter(k=>k),optionLabel:"label",optionValue:"label",placeholder:"Select an environment"},{footer:_(()=>[w(D(K),{label:"Add New",fluid:"",severity:"secondary",text:"",size:"small",icon:"fas fa-plus",onClick:r}),w(D(K),{label:"Edit",fluid:"",severity:"secondary",text:"",size:"small",icon:"fas fa-edit",onClick:x})]),_:1},8,["defaultValue","value","options"])])],4)):$("",!0),i.value?(p(),R(dt,{key:1,to:"body"},[f("div",Xn,[w(gt),C[4]||(C[4]=U(" Change environments... "))])])):$("",!0),w(Te,{ref_key:"overrideModalRef",ref:u,cancelString:"Cancel",validateString:"Ok"},{header:_(({data:k})=>C[5]||(C[5]=[U(" Change environment ")])),body:_(({data:k})=>[C[6]||(C[6]=U(" Because .env in services root folder is the main truth. Some environments may not be taken into account. ")),f("ul",null,[(p(!0),y(P,null,J(k,T=>(p(),y("li",{key:T.id},[U(O(T.label)+" ",1),f("ul",null,[(p(!0),y(P,null,J(T.spawnOptions.overrideEnvs,(N,z)=>(p(),y("li",null,O(z)+": "+O(N),1))),256))])]))),128))])]),_:1},512),w(Te,{ref_key:"createEnvironmentModalRef",ref:v,cancelString:"Cancel",validateString:"Ok"},{header:_(()=>C[7]||(C[7]=[U(" Create environment ")])),body:_(()=>[w(D(Ee),null,{default:_(()=>[w(D(ye),{id:"environment-to-create-label",size:"small",modelValue:d.value.label,"onUpdate:modelValue":C[0]||(C[0]=k=>d.value.label=k),fluid:""},null,8,["modelValue"]),C[8]||(C[8]=f("label",{for:"environment-to-create-label"},"Label",-1))]),_:1,__:[8]}),w(D(Ee),null,{default:_(()=>[w(D(ye),{id:"environment-to-create-bgColor",size:"small",modelValue:d.value.bgColor,"onUpdate:modelValue":C[1]||(C[1]=k=>d.value.bgColor=k),fluid:""},null,8,["modelValue"]),C[9]||(C[9]=f("label",{for:"environment-to-create-bgColor"},"Background color",-1))]),_:1,__:[9]}),w(D(Ee),null,{default:_(()=>[w(D(ye),{id:"environment-to-create-color",size:"small",modelValue:d.value.color,"onUpdate:modelValue":C[2]||(C[2]=k=>d.value.color=k),fluid:""},null,8,["modelValue"]),C[10]||(C[10]=f("label",{for:"environment-to-create-color"},"Color",-1))]),_:1,__:[10]})]),_:1},512)],64))}},to=G(eo,[["__scopeId","data-v-42a01f9f"]]);function oe(){}oe.prototype={diff:function(e,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.callback;typeof o=="function"&&(i=o,o={}),this.options=o;var u=this;function v(k){return i?(setTimeout(function(){i(void 0,k)},0),!0):k}e=this.castInput(e),n=this.castInput(n),e=this.removeEmpty(this.tokenize(e)),n=this.removeEmpty(this.tokenize(n));var d=n.length,c=e.length,r=1,m=d+c,h=[{newPos:-1,components:[]}],x=this.extractCommon(h[0],n,e,0);if(h[0].newPos+1>=d&&x+1>=c)return v([{value:this.join(n),count:n.length}]);function j(){for(var k=-1*r;k<=r;k+=2){var T=void 0,N=h[k-1],z=h[k+1],q=(z?z.newPos:0)-k;N&&(h[k-1]=void 0);var Z=N&&N.newPos+1<d,H=z&&0<=q&&q<c;if(!Z&&!H){h[k]=void 0;continue}if(!Z||H&&N.newPos<z.newPos?(T=oo(z),u.pushComponent(T.components,void 0,!0)):(T=N,T.newPos++,u.pushComponent(T.components,!0,void 0)),q=u.extractCommon(T,n,e,k),T.newPos+1>=d&&q+1>=c)return v(no(u,T.components,n,e,u.useLongestToken));h[k]=T}r++}if(i)(function k(){setTimeout(function(){if(r>m)return i();j()||k()},0)})();else for(;r<=m;){var C=j();if(C)return C}},pushComponent:function(e,n,o){var i=e[e.length-1];i&&i.added===n&&i.removed===o?e[e.length-1]={count:i.count+1,added:n,removed:o}:e.push({count:1,added:n,removed:o})},extractCommon:function(e,n,o,i){for(var u=n.length,v=o.length,d=e.newPos,c=d-i,r=0;d+1<u&&c+1<v&&this.equals(n[d+1],o[c+1]);)d++,c++,r++;return r&&e.components.push({count:r}),e.newPos=d,c},equals:function(e,n){return this.options.comparator?this.options.comparator(e,n):e===n||this.options.ignoreCase&&e.toLowerCase()===n.toLowerCase()},removeEmpty:function(e){for(var n=[],o=0;o<e.length;o++)e[o]&&n.push(e[o]);return n},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};function no(t,e,n,o,i){for(var u=0,v=e.length,d=0,c=0;u<v;u++){var r=e[u];if(r.removed){if(r.value=t.join(o.slice(c,c+r.count)),c+=r.count,u&&e[u-1].added){var h=e[u-1];e[u-1]=e[u],e[u]=h}}else{if(!r.added&&i){var m=n.slice(d,d+r.count);m=m.map(function(j,C){var k=o[c+C];return k.length>j.length?k:j}),r.value=t.join(m)}else r.value=t.join(n.slice(d,d+r.count));d+=r.count,r.added||(c+=r.count)}}var x=e[v-1];return v>1&&typeof x.value=="string"&&(x.added||x.removed)&&t.equals("",x.value)&&(e[v-2].value+=x.value,e.pop()),e}function oo(t){return{newPos:t.newPos,components:t.components.slice(0)}}function io(t,e){if(typeof t=="function")e.callback=t;else if(t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}var Be=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Ue=/\S/,$e=new oe;$e.equals=function(t,e){return this.options.ignoreCase&&(t=t.toLowerCase(),e=e.toLowerCase()),t===e||this.options.ignoreWhitespace&&!Ue.test(t)&&!Ue.test(e)};$e.tokenize=function(t){for(var e=t.split(/(\s+|[()[\]{}'"]|\b)/),n=0;n<e.length-1;n++)!e[n+1]&&e[n+2]&&Be.test(e[n])&&Be.test(e[n+2])&&(e[n]+=e[n+2],e.splice(n+1,2),n--);return e};function Je(t,e,n){return n=io(n,{ignoreWhitespace:!0}),$e.diff(t,e,n)}var He=new oe;He.tokenize=function(t){var e=[],n=t.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var o=0;o<n.length;o++){var i=n[o];o%2&&!this.options.newlineIsToken?e[e.length-1]+=i:(this.options.ignoreWhitespace&&(i=i.trim()),e.push(i))}return e};var so=new oe;so.tokenize=function(t){return t.split(/(\S.+?[.!?])(?=\s+|$)/)};var lo=new oe;lo.tokenize=function(t){return t.split(/([{}:;,]|\s+)/)};function ke(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ke=function(e){return typeof e}:ke=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ke(t)}var ro=Object.prototype.toString,fe=new oe;fe.useLongestToken=!0;fe.tokenize=He.tokenize;fe.castInput=function(t){var e=this.options,n=e.undefinedReplacement,o=e.stringifyReplacer,i=o===void 0?function(u,v){return typeof v>"u"?n:v}:o;return typeof t=="string"?t:JSON.stringify(Oe(t,null,null,i),i," ")};fe.equals=function(t,e){return oe.prototype.equals.call(fe,t.replace(/,([\r\n])/g,"$1"),e.replace(/,([\r\n])/g,"$1"))};function Oe(t,e,n,o,i){e=e||[],n=n||[],o&&(t=o(i,t));var u;for(u=0;u<e.length;u+=1)if(e[u]===t)return n[u];var v;if(ro.call(t)==="[object Array]"){for(e.push(t),v=new Array(t.length),n.push(v),u=0;u<t.length;u+=1)v[u]=Oe(t[u],e,n,o,i);return e.pop(),n.pop(),v}if(t&&t.toJSON&&(t=t.toJSON()),ke(t)==="object"&&t!==null){e.push(t),v={},n.push(v);var d=[],c;for(c in t)t.hasOwnProperty(c)&&d.push(c);for(d.sort(),u=0;u<d.length;u+=1)c=d[u],v[c]=Oe(t[c],e,n,o,c);e.pop(),n.pop()}else v=t;return v}var je=new oe;je.tokenize=function(t){return t.slice()};je.join=je.removeEmpty=function(t){return t};const ao={key:0,class:"conflict-container"},uo={class:"conflict-header"},co={key:0,class:"file-info"},fo={class:"version-actions"},vo={key:0,class:"json-conflicts"},po={class:"json-conflicts-list"},mo={class:"json-header"},ho={class:"json-path"},go={class:"manual-edit-actions"},yo={class:"conflict-section"},bo={class:"conflict-versions"},ko=["onClick","data-index"],wo={class:"json-content"},Co=["onClick","data-index"],So={class:"json-content"},Io={class:"manual-edit-container"},_o={key:1,class:"conflicts-container"},Eo={class:"conflict-columns"},xo={class:"conflict-column"},Vo={class:"interactive-conflict"},To=["innerHTML"],Ao={class:"conflict-column"},Oo={class:"manual-edit-container"},jo={key:1,class:"no-conflict-message"},Lo={class:"flex justify-content-end"},$o={class:"flex gap-2"},Mo={__name:"GitConflictModal",emits:["conflict-resolved"],setup(t,{expose:e,emit:n}){const o=E(!1),i=E(null),u=E([]);function v(l,s){const a=Je(l,s),b=[];let g="",S=0;return a.forEach(I=>{if(I.added||I.removed){const B=`chunk-${S++}`;I.added?(b.push({id:B,ourVersion:"",theirVersion:I.value,selectedVersion:"ours"}),g+=`<span class="diff-chunk their-version not-selected" data-chunk-id="${B}">${I.value}</span>`):I.removed&&(b.push({id:B,ourVersion:I.value,theirVersion:"",selectedVersion:"ours"}),g+=`<span class="diff-chunk our-version selected" data-chunk-id="${B}">${I.value}</span>`)}else g+=`<span class="common-text">${I.value}</span>`}),[b,g]}function d(){i.value&&(i.value.isJson&&i.value.jsonConflicts?(i.value.jsonConflicts.forEach(l=>{l.selectedVersion="ours"}),T()):i.value.chunks&&(i.value.chunks.forEach(l=>{l.selectedVersion="ours";const s=document.querySelector(`.diff-chunk[data-chunk-id="${l.id}"]`);s&&(s.classList.contains("our-version")?(s.classList.add("selected"),s.classList.remove("not-selected")):(s.classList.remove("selected"),s.classList.add("not-selected")))}),m()))}function c(){i.value&&(i.value.isJson&&i.value.jsonConflicts?(i.value.jsonConflicts.forEach(l=>{l.selectedVersion="theirs"}),T()):i.value.chunks&&(i.value.chunks.forEach(l=>{l.selectedVersion="theirs";const s=document.querySelector(`.diff-chunk[data-chunk-id="${l.id}"]`);s&&(s.classList.contains("their-version")?(s.classList.add("selected"),s.classList.remove("not-selected")):(s.classList.remove("selected"),s.classList.add("not-selected")))}),m()))}function r(l){if(!i.value||!i.value.chunks)return;const s=i.value.chunks.find(b=>b.id===l);if(!s)return;s.selectedVersion=s.selectedVersion==="ours"?"theirs":"ours";const a=document.querySelector(`.diff-chunk[data-chunk-id="${l}"]`);a&&(a.classList.toggle("selected"),a.classList.toggle("not-selected"),a.classList.contains("our-version")?s.selectedVersion==="ours"?(a.classList.add("selected"),a.classList.remove("not-selected")):(a.classList.remove("selected"),a.classList.add("not-selected")):s.selectedVersion==="theirs"?(a.classList.add("selected"),a.classList.remove("not-selected")):(a.classList.remove("selected"),a.classList.add("not-selected"))),m()}function m(){if(!i.value||!i.value.chunks){console.warn("updateResolution appelée alors que currentConflict ou ses chunks sont null");return}try{let l="";const s=Je(i.value.ourVersion,i.value.theirVersion),a=i.value.chunks;s.forEach(b=>{try{if(b.added){const g=a.find(S=>S.theirVersion===b.value&&S.ourVersion==="");g&&g.selectedVersion==="theirs"&&(l+=b.value)}else if(b.removed){const g=a.find(S=>S.ourVersion===b.value&&S.theirVersion==="");(!g||g.selectedVersion==="ours")&&(l+=b.value)}else l+=b.value}catch(g){console.error("Erreur lors du traitement d'une partie:",g)}}),i.value&&(i.value.resolution=l)}catch(l){console.error("Erreur lors de la mise à jour de la résolution:",l)}}function h(){if(!i.value){console.warn("setupChunkListeners appelé alors que currentConflict.value est null"),setTimeout(()=>{i.value&&h()},50);return}console.log("Mise en place des écouteurs d'événements sur les chunks");try{const l=()=>{const s=document.querySelectorAll(".json-value");console.log(`Found ${s.length} JSON value elements`),s.forEach(a=>{if(a instanceof HTMLElement){const b=a.getAttribute("data-version"),g=a.getAttribute("data-index");if(b&&g&&(b==="ours"||b==="theirs"))try{const S=parseInt(g,10);a.addEventListener("click",I=>{I.stopPropagation(),console.log(`Clic sur JSON value: index=${S}, version=${b}`),(b==="ours"||b==="theirs")&&k(S,b)}),a.style.cursor="pointer"}catch(S){console.error("Error parsing index:",S)}}})};he(()=>{setTimeout(()=>{if(!i.value){console.warn("setupChunkListeners: currentConflict.value est devenu null pendant le délai");return}const s=document.querySelectorAll(".diff-chunk");if(console.log(`${s.length} chunks trouvés pour le conflit`),s.length===0){console.warn("Aucun chunk trouvé, tentative avec un délai plus long"),setTimeout(h,200);return}s.forEach(a=>{try{const b=a.getAttribute("data-chunk-id");if(b){a.replaceWith(a.cloneNode(!0));const g=document.querySelector(`.diff-chunk[data-chunk-id="${b}"]`);g&&(g.addEventListener("click",S=>{S.stopPropagation();try{console.log(`Clic sur le chunk ${b}`),r(b)}catch(I){console.error(`Erreur sur le clic du chunk ${b}:`,I)}}),g instanceof HTMLElement&&(g.style.cursor="pointer",g.style.userSelect="none"))}}catch(b){console.error("Erreur lors de la configuration d'un chunk:",b)}}),l(),console.log("Écouteurs d'événements ajoutés avec succès")},150)})}catch(l){console.error("Erreur générale dans setupChunkListeners:",l)}}function x(l,s){try{const a=JSON.parse(l),b=JSON.parse(s);return j(a,b)}catch{return[]}}function j(l,s,a=""){const b=[];for(const g in l){const S=a?`${a}.${g}`:g;if(!(g in s)){const I={path:S,ourValue:l[g],theirValue:void 0,selectedVersion:"ours",manualEdit:JSON.stringify(l[g],null,2)};b.push(I);continue}if(typeof l[g]=="object"&&l[g]!==null&&typeof s[g]=="object"&&s[g]!==null&&!Array.isArray(l[g])&&!Array.isArray(s[g])){b.push(...j(l[g],s[g],S));continue}if(JSON.stringify(l[g])!==JSON.stringify(s[g])){const I={path:S,ourValue:l[g],theirValue:s[g],selectedVersion:"ours",manualEdit:JSON.stringify(l[g],null,2)};b.push(I)}}for(const g in s)if(!(g in l)){const I={path:a?`${a}.${g}`:g,ourValue:void 0,theirValue:s[g],selectedVersion:"ours",manualEdit:"undefined"};b.push(I)}return b}function C(l){if(l===void 0)return"undefined";try{return JSON.stringify(l,null,2)}catch{return String(l)}}function k(l,s){if(console.log(`Tentative de sélection JSON : index=${l}, version=${s}`),!i.value||!i.value.jsonConflicts){console.error("selectJsonVersion: currentConflict ou jsonConflicts est null");return}const a=i.value.jsonConflicts[l];if(a){console.log(`Avant changement: selectedVersion=${a.selectedVersion}`),a.selectedVersion=s;const b=s==="ours"?a.ourValue:a.theirValue;a.manualEdit=C(b),console.log(`Après changement: selectedVersion=${a.selectedVersion}, manualEdit mis à jour`),T()}else console.error(`Aucun conflit JSON trouvé à l'index ${l}`)}function T(){if(!i.value||!i.value.jsonConflicts){console.warn("updateJsonResolution appelée alors que currentConflict ou ses jsonConflicts sont null");return}try{console.log("Mise à jour de la résolution JSON à partir des éditions manuelles");const l=JSON.parse(i.value.ourVersion),s=JSON.parse(JSON.stringify(l));if(i.value.jsonConflicts.forEach((a,b)=>{try{if(!a||!a.path){console.warn(`Conflit JSON invalide ou sans chemin à l'index ${b}`);return}const g=a.path.split(".");let S=s;for(let B=0;B<g.length-1;B++){const W=g[B];W in S||(S[W]={}),S=S[W]}const I=g[g.length-1];if(a.manualEdit&&a.manualEdit.trim()!==""&&a.manualEdit!=="undefined")try{console.log(`Utilisation de l'édition manuelle pour ${a.path}:`,a.manualEdit);const B=JSON.parse(a.manualEdit);S[I]=B,console.log(`Édition manuelle appliquée avec succès pour ${a.path}`)}catch(B){console.warn(`Échec du parsing de l'édition manuelle pour ${a.path}:`,B),console.log("Contenu de l'édition manuelle:",a.manualEdit),a.selectedVersion==="ours"?a.ourValue!==void 0?(console.log(`Fallback à notre version pour ${a.path}`),S[I]=a.ourValue):(console.log(`Suppression de ${a.path} car notre version est undefined`),delete S[I]):a.theirValue!==void 0?(console.log(`Fallback à leur version pour ${a.path}`),S[I]=a.theirValue):(console.log(`Suppression de ${a.path} car leur version est undefined`),delete S[I])}else console.log(`Pas d'édition manuelle pour ${a.path}, utilisation de la version ${a.selectedVersion}`),a.selectedVersion==="ours"?a.ourValue!==void 0?(S[I]=a.ourValue,console.log(`Utilisé notre version pour ${a.path}`)):(delete S[I],console.log(`Supprimé ${a.path} car notre version est undefined`)):a.theirValue!==void 0?(S[I]=a.theirValue,console.log(`Utilisé leur version pour ${a.path}`)):(delete S[I],console.log(`Supprimé ${a.path} car leur version est undefined`))}catch(g){console.error(`Erreur lors du traitement du conflit JSON à l'index ${b}:`,g)}}),i.value){const a=JSON.stringify(s,null,2);i.value.resolution=a,console.log("Résolution JSON finale mise à jour:",a.substring(0,100)+"...")}}catch(l){console.error("Erreur lors de la mise à jour de la résolution JSON:",l)}}Y(()=>{if(!i.value||!i.value.resolution)return{};try{return JSON.parse(i.value.resolution)}catch{return{}}});async function N(l){if(!l)return!1;try{if(console.log("Affichage du conflit:",{id:l.id,filename:l.filename,hasOriginal:!!l.original,originalLength:l.original?l.original.length:0,hasOurVersion:!!l.ourVersion,hasTheirVersion:!!l.theirVersion}),!l.original)return console.error(`Impossible d'afficher le conflit: champ "original" manquant`),A.next("error","Impossible d'afficher ce conflit: données originales manquantes"),!1;const s=x(l.ourVersion,l.theirVersion),a=s.length>0,[b,g]=v(l.ourVersion,l.theirVersion);return i.value={...l,chunks:b,mergedDisplay:g,resolution:l.resolution||l.ourVersion,jsonConflicts:a?s:void 0,isJson:a},o.value=!0,setTimeout(()=>{var S;h(),a&&((S=i.value)!=null&&S.jsonConflicts)&&console.log("Configuration de l'interface pour les conflits JSON")},300),!0}catch(s){return console.error("Erreur lors de l'affichage du conflit:",s),A.next("error",`Échec de l'affichage du conflit: ${Ce(s)}`),!1}}function z(){var l;try{const s=(l=i.value)==null?void 0:l.id;console.log(`Fermeture de la modal pour le conflit ${s||"inconnu"}`),o.value=!1,i.value=null}catch(s){console.error("Erreur lors de la fermeture de la modal:",s)}}async function q(){try{await se(),A.next("success","Liste des conflits rafraîchie")}catch(l){console.error("Erreur lors du rafraîchissement des conflits:",l),A.next("error","Erreur lors du rafraîchissement des conflits")}}async function Z(){try{A.next("success","Redémarrage de l'application en cours...","Veuillez patienter"),await M.restartApplication()}catch(l){console.error("Erreur lors du redémarrage de l'application:",l);const s=l instanceof Error?l.message:String(l);A.next("error",`Erreur lors du redémarrage: ${s}`)}}async function H(){console.log("Début de la résolution du conflit");const l=document.querySelector('button[label="Resolve and save"]');l&&l.setAttribute("disabled","disabled");try{const s=i.value?{...i.value}:null;if(!s){console.error("Impossible de résoudre : conflit est null"),A.next("error","Impossible de résoudre ce conflit. Données manquantes.");return}if(!s.resolution){console.error("Impossible de résoudre : résolution manquante"),A.next("error","Impossible de résoudre ce conflit. Résolution manquante.");return}if(!s.original){console.error("Impossible de résoudre : données originales manquantes"),A.next("error","Impossible de résoudre ce conflit. Données originales manquantes.");return}const a=s.id;console.log(`Résolution du conflit ${a} avec une copie sécurisée`);const b={conflictId:a,resolution:s.resolution,original:s.original};if(s.isJson&&s.resolution)try{const g=JSON.parse(s.resolution);if(s.filename&&s.filename.includes("/service/")&&g&&!g.label){console.error("Service sans label détecté lors de la résolution:",g),A.next("error",`Le service doit avoir une propriété "label". Veuillez l'ajouter manuellement.`);return}b.resolution=JSON.stringify(g)}catch(g){console.error("Erreur de parsing JSON:",g),A.next("error","Le format JSON de la résolution est invalide");return}console.log("Envoi de la résolution au serveur:",b);try{const g=await ae.post("/crypto/resolve-conflict",b);console.log("Réponse du serveur après résolution:",g.data),A.next("success","Conflit résolu avec succès, redémarrage de l'application..."),i.value&&i.value.id===a&&(console.log(`Fermeture du conflit ${a} après résolution`),o.value=!1,i.value=null),await se(),setTimeout(async()=>{try{await Z()}catch(S){console.error("Erreur lors du redémarrage:",S)}},1e3);try{let S=null;if(s.filename&&s.filename.includes("/service/")){const I=s.filename.split("/"),W=I[I.length-1].replace(".encrypted.json","");console.log(`Attempting to restart service: ${W}`);try{const De=(await M.loadServices()).find(Ze=>Ze.label===W);De?(console.log(`Service found for restart: ${W}`),await De.restart(),A.next("success",`Service ${W} restarted successfully`)):console.log(`No service found with name: ${W}`)}catch(Pe){console.error(`Error while searching/restarting service ${W}:`,Pe)}}else console.log("The file is not associated with a specific service, no restart needed")}catch(S){console.error("Error while attempting to restart the service:",S)}console.log("Immediate processing of the next conflict after resolution"),ie()}catch(g){throw console.error("Error during server request:",g),g}}catch(s){console.error("Error during conflict resolution:",s);let a="Error during conflict resolution";typeof s=="object"&&s!==null&&"response"in s&&s.response&&typeof s.response=="object"&&"data"in s.response&&s.response.data&&typeof s.response.data=="object"&&"message"in s.response.data?a=String(s.response.data.message):s instanceof Error&&(a=`${s.name}: ${s.message}`),A.next("error",a)}finally{l&&l.removeAttribute("disabled")}}async function ie(){if(console.log("Processing next conflict. Queue size:",u.value.length,"isVisible:",o.value),o.value||u.value.length===0){console.log("No conflict to process: modal already visible or empty queue");return}try{if(u.value.length===0){console.log("The queue is empty, nothing to process");return}const l={...u.value[0]};if(!l.id||!l.original){console.error("Invalid conflict found in the queue, ignored"),u.value.shift(),setTimeout(ie,50);return}console.log("Preparing to display the next conflict:",l.id),await N(l)?(console.log("Conflict displayed successfully, removing from queue"),u.value.shift()):(console.error("Failed to display conflict, it remains in the queue"),u.value.shift(),setTimeout(ie,200))}catch(l){console.error("Erreur lors du traitement du prochain conflit:",l),A.next("error",`Erreur lors du traitement du conflit: ${Ce(l)}`),u.value.length>0&&(u.value.shift(),setTimeout(ie,300))}}ee(async()=>{console.log("GitConflictModal mounted"),setTimeout(()=>{const s=document.querySelector(".conflict-dialog .p-dialog-content");s&&(console.log("Adding click event listener to modal content for debugging"),s.addEventListener("click",a=>{console.log("Click detected in modal content",{target:a.target,currentTarget:a.currentTarget,classes:a.target instanceof HTMLElement?Array.from(a.target.classList):[],id:a.target instanceof HTMLElement?a.target.id:null,tagName:a.target instanceof HTMLElement?a.target.tagName:null})}))},1e3);const l=new MutationObserver(s=>{for(const a of s)if(a.type==="attributes"&&a.attributeName==="class"){const b=document.querySelector(".conflict-dialog");b&&b.classList.contains("p-dialog-visible")&&(console.log("Modal is now visible - setting up click debugging"),document.querySelectorAll(".json-value").forEach(S=>{if(S instanceof HTMLElement){S.addEventListener("click",B=>{console.log("Direct click on json-value:",{element:S,classes:Array.from(S.classList),version:S.getAttribute("data-version"),index:S.getAttribute("data-index")})}),S.style.position="relative";const I=document.createElement("div");I.innerText="👆 Clickable",I.style.position="absolute",I.style.top="0",I.style.right="0",I.style.background="rgba(255,0,0,0.2)",I.style.color="white",I.style.padding="2px 5px",I.style.fontSize="10px",I.style.borderRadius="3px",S.appendChild(I)}}),l.disconnect())}});l.observe(document.body,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["class"]}),i.value=null,o.value=!1,u.value=[],await se(),V.on("crypto:conflict-resolved",async s=>{var a;try{if(console.log("Event crypto:conflict-resolved received:",s),!s||!s.conflictId){console.warn("Resolution event received without conflict ID");return}const b=s.conflictId,g=(a=i.value)==null?void 0:a.id;o.value&&g===b?(console.log(`Closing conflict ${b} following external resolution`),o.value=!1,i.value=null):console.log(`The resolved conflict ${b} is not currently displayed (displayed: ${g})`);const I=u.value.filter(W=>W.id!==b),B=u.value.length-I.length;B>0&&(console.log(`${B} conflict(s) removed from the queue`),u.value=I),await se(),!o.value&&u.value.length>0&&(console.log("Scheduling processing of the next conflict"),setTimeout(ie,200))}catch(b){console.error("Error while processing conflict-resolved event:",b)}}),V.on("crypto:conflict",async s=>{try{if(!s||!s.id){console.warn("New conflict event received without valid data");return}console.log("New conflict detected:",s.id),await se(),s&&s.id&&s.original&&Se(s)}catch(a){console.error("Error while processing a new conflict:",a)}})}),ft(()=>{console.log("GitConflictModal unmounted"),V.off("crypto:conflict-resolved"),V.off("crypto:conflict")});async function se(){try{const{data:l}=await ae.get("/crypto/pending-conflicts");if(console.log("Conflicts retrieved from server:",l?l.length:0),Array.isArray(l)&&l.length>0){console.log("Details of retrieved conflicts:",l.map(a=>({id:a.id,filename:a.filename,hasOriginal:!!a.original,hasOurVersion:!!a.ourVersion,hasTheirVersion:!!a.theirVersion})));const s=l.filter(a=>!a.id||!a.original?(console.warn("Invalid conflict ignored (id or original missing):",a.id),!1):((!a.ourVersion||!a.theirVersion)&&console.warn("Conflict with missing versions:",a.id),!0));s.forEach(a=>{Se(a)}),s.length>0&&A.next("error",`${s.length} Git conflict(s) pending resolution`,"Git Conflicts")}}catch(l){console.error("Error while retrieving pending conflicts:",l),A.next("error",`Error while retrieving conflicts: ${Ce(l)}`)}}function Ce(l){if(!l)return"Unknown error";if(typeof l=="object"&&l!==null){if("response"in l&&l.response&&typeof l.response=="object"&&"data"in l.response&&l.response.data&&typeof l.response.data=="object"&&"message"in l.response.data)return String(l.response.data.message);if("message"in l&&typeof l.message=="string")return l.message}try{return String(l)}catch{return"Unknown error"}}function Se(l){console.log("Adding a new conflict to the queue:",l.id),u.value.push(l),ie()}function Qe(){}function Ye(l){if(!i.value){console.error("updateManualEditForConflict: currentConflict.value is null");return}if(!i.value.jsonConflicts){console.error("updateManualEditForConflict: jsonConflicts is null");return}if(l<0||l>=i.value.jsonConflicts.length){console.error(`updateManualEditForConflict: invalid index ${l}, jsonConflicts length: ${i.value.jsonConflicts.length}`);return}const s=i.value.jsonConflicts[l];if(!s){console.error(`updateManualEditForConflict: conflict at index ${l} is null`);return}try{s.manualEdit!==void 0&&T()}catch(a){console.error(`Error while updating manual edit for index ${l}:`,a)}}function Me(l,s){if(!i.value){console.error("useVersionInManualEdit: currentConflict.value is null");return}if(!i.value.jsonConflicts){console.error("useVersionInManualEdit: jsonConflicts is null");return}if(l<0||l>=i.value.jsonConflicts.length){console.error(`useVersionInManualEdit: invalid index ${l}, jsonConflicts length: ${i.value.jsonConflicts.length}`);return}const a=i.value.jsonConflicts[l];if(!a){console.error(`useVersionInManualEdit: conflict at index ${l} is null`);return}try{console.log(`Using version ${s} for manual edit at index ${l}`);const b=s==="ours"?a.ourValue:a.theirValue;a.manualEdit=C(b),a.selectedVersion=s,console.log(`Manual edit updated with version ${s}:`,a.manualEdit),T()}catch(b){console.error(`Error while updating manual version for index ${l}:`,b)}}return e({addConflict:Se,showConflict:N,resolveConflict:H,closeModal:z,refreshConflicts:q,processNextConflict:ie,fetchPendingConflicts:se}),we(o,l=>{l&&i.value&&(console.log("Modal displayed, setting up event listeners"),he(()=>{h()}))}),we(()=>{var l;return(l=i.value)==null?void 0:l.id},(l,s)=>{l&&l!==s&&(console.log(`New conflict displayed (${l}), setting up event listeners`),he(()=>{h()}))}),(l,s)=>(p(),R(D(ue),{visible:o.value,"onUpdate:visible":s[1]||(s[1]=a=>o.value=a),modal:!0,closable:!0,style:{width:"95vw"},maximizable:!0,header:"Git Conflict Resolution",class:"conflict-dialog"},{footer:_(()=>[f("div",Lo,[f("div",$o,[w(D(K),{label:"Cancel",icon:"pi pi-times",onClick:z,class:"p-button-text"}),w(D(K),{label:"Refresh",icon:"pi pi-refresh",onClick:q,class:"p-button-outlined"}),w(D(K),{label:"Resolve and save",icon:"pi pi-check",onClick:H,disabled:!i.value||!i.value.resolution||!i.value.original},null,8,["disabled"])])])]),default:_(()=>[i.value&&i.value.id?(p(),y("div",ao,[f("div",uo,[i.value.filename?(p(),y("div",co,[s[2]||(s[2]=f("i",{class:"pi pi-file"},null,-1)),f("span",null,O(i.value.filename),1)])):$("",!0),f("div",fo,[w(D(K),{label:"Keep all your versions",icon:"pi pi-user",class:"p-button-outlined p-button-success",onClick:d}),w(D(K),{label:"Keep all their versions",icon:"pi pi-users",class:"p-button-outlined p-button-info",onClick:c})])]),i.value.isJson&&i.value.jsonConflicts&&i.value.jsonConflicts.length>0?(p(),y("div",vo,[s[9]||(s[9]=f("h3",null,"Conflicts detected in JSON",-1)),f("div",po,[(p(!0),y(P,null,J(i.value.jsonConflicts,(a,b)=>(p(),y("div",{key:a.path||b,class:"json-conflict-item"},[f("div",mo,[f("div",ho,[s[3]||(s[3]=f("i",{class:"pi pi-key"},null,-1)),f("span",null,O(a.path||"Unknown path"),1)]),f("div",go,[w(D(K),{label:"Use your version",size:"small",class:"p-button-sm p-button-text",onClick:g=>Me(b,"ours")},null,8,["onClick"]),w(D(K),{label:"Use remote version",size:"small",class:"p-button-sm p-button-text",onClick:g=>Me(b,"theirs")},null,8,["onClick"])])]),f("div",yo,[f("div",bo,[f("div",{class:F(["json-value our-value",{selected:a.selectedVersion==="ours"}]),onClick:g=>k(b,"ours"),"data-version":"ours","data-index":b},[s[4]||(s[4]=f("div",{class:"json-value-header"},[f("span",{class:"legend-color your-version"}),f("span",null,"Your version")],-1)),f("pre",wo,O(C(a.ourValue)),1),s[5]||(s[5]=f("div",{class:"select-overlay"},"Click to select your version",-1))],10,ko),f("div",{class:F(["json-value their-value",{selected:a.selectedVersion==="theirs"}]),onClick:g=>k(b,"theirs"),"data-version":"theirs","data-index":b},[s[6]||(s[6]=f("div",{class:"json-value-header"},[f("span",{class:"legend-color their-version"}),f("span",null,"Remote version")],-1)),f("pre",So,O(C(a.theirValue)),1),s[7]||(s[7]=f("div",{class:"select-overlay"},"Click to select remote version",-1))],10,Co)]),f("div",Io,[s[8]||(s[8]=f("div",{class:"manual-edit-header"},[f("h4",null,"Manual editing (final)"),f("span",{class:"manual-edit-info"},"This value will be used with priority for resolution")],-1)),w(D(Re),{modelValue:a.manualEdit,"onUpdate:modelValue":g=>a.manualEdit=g,class:"manual-edit-area",onInput:g=>Ye(b),autoResize:!0},null,8,["modelValue","onUpdate:modelValue","onInput"])])])]))),128))])])):(p(),y("div",_o,[f("div",Eo,[f("div",xo,[s[10]||(s[10]=f("div",{class:"column-header"},[f("h4",null,"Differences")],-1)),f("div",Vo,[i.value.mergedDisplay?(p(),y("div",{key:0,class:"interactive-editor",innerHTML:i.value.mergedDisplay},null,8,To)):$("",!0)])]),f("div",Ao,[s[12]||(s[12]=f("div",{class:"column-header"},[f("h4",null,"Manual editing")],-1)),f("div",Oo,[s[11]||(s[11]=f("div",{class:"manual-edit-header"},[f("h4",null,"Manual editing (final)"),f("span",{class:"manual-edit-info"},"This value will be used with priority for resolution")],-1)),w(D(Re),{modelValue:i.value.resolution,"onUpdate:modelValue":s[0]||(s[0]=a=>i.value.resolution=a),class:"manual-edit-area",onInput:Qe,autoResize:!0},null,8,["modelValue"])])])])]))])):o.value?(p(),y("div",jo,s[13]||(s[13]=[f("p",null,"No conflict to display or incomplete data.",-1)]))):$("",!0)]),_:1},8,["visible"]))}},Po=G(Mo,[["__scopeId","data-v-43eafe4e"]]),Do={__name:"PluginDev",setup(t){const e=E(null),n=E(!1),o=E(null);return V.on("plugins:front:changed",i=>{console.log(`🔄 Plugin ${i} changed, reloading page...`),n.value=!1,o.value=null,document.location.reload()}),V.on("plugins:front:building",i=>{console.log(`🔄 Plugin ${i} building...`),o.value=i,n.value=!0}),(i,u)=>(p(),y("div",null,[w(D(ue),{ref_key:"modalBuildingRef",ref:e,visible:n.value,"onUpdate:visible":u[0]||(u[0]=v=>n.value=v),closable:!1,modal:!0},{default:_(()=>[f("h1",null,"Plugin "+O(o.value)+" is building...",1)]),_:1},8,["visible"])]))}},No={class:"error-header"},Ro={__name:"PluginInstallError",setup(t){const e=E([]),n=E({plugin:null,step:null});function o(r){return{INSTALL_BACKEND_START:"Installing backend",LOAD_BACKEND_START:"Loading backend",CLEAR_CACHE:"Clearing cache",REQUIRE_BACKEND:"Requiring backend",INSTALL_START:"Installing plugin"}[r]||r}const i=r=>{console.log("closeError",r),e.value.splice(e.value.indexOf(r),1)},u=()=>{n.value={plugin:null,step:null}},v=r=>{const{plugin:m,step:h}=r;n.value={plugin:m,step:h}},d=(r,m)=>{e.value.push({id:crypto.randomUUID(),pluginName:r,error:m,message:`An error occurred while installing the plugin ${r}`,header:"Error while installing plugin"})},c=r=>{e.value.push({id:crypto.randomUUID(),error:r,message:"A critical error occurred",header:"Critical Error"})};return ee(()=>{V.on("plugins:install:error",d),V.on("plugins:loading:error",d),V.on("critical:error",c),V.on("plugins:loading:progress",v)}),Le(()=>{V.off("plugins:install:error",d),V.off("plugins:loading:error",d),V.off("critical:error",c),V.off("plugins:loading:progress",v)}),(r,m)=>(p(),y(P,null,[(p(!0),y(P,null,J(e.value,h=>(p(),R(D(ue),{visible:!0,modal:!0,key:h.id,"onUpdate:visible":x=>i(h)},{header:_(()=>[f("h2",No,[m[1]||(m[1]=f("i",{class:"fas fa-exclamation-triangle"},null,-1)),U(" "+O(h.header),1)])]),default:_(()=>[f("p",null,O(h.message),1),f("pre",null,O(h.error),1)]),_:2},1032,["onUpdate:visible"]))),128)),w(D(ue),{visible:!!n.value.step,modal:!0,"onUpdate:visible":m[0]||(m[0]=h=>u())},{header:_(()=>[f("h2",null,O(n.value.plugin),1)]),default:_(()=>[f("p",null,O(o(n.value.step)),1)]),_:1},8,["visible"])],64))}},zo=G(Ro,[["__scopeId","data-v-ea51820a"]]),qe=et.filter(t=>t.load).reduce((t,{cmp:e,name:n})=>(t[n]=e,t),{}),Bo={components:{sidebar:Ut,Notifications:en,NotifHistory:ln,SidebarViewMode:Zn,EnvironmentsChooser:to,GitConflictModal:Po,Splitter:kt,SplitterPanel:bt,Button:K,PluginDev:Do,PluginInstallError:zo,...qe},setup(){(async()=>{const k=await M.getAdditionalThemes().catch(T=>(console.error(T),{}));be.load(k)})();const t=le(),e=E(!0),n=E(null),o=E(null),i=E([]),u=async()=>{e.value=V.socket.connected,e.value||(M.services.value=[]),(t.currentRoute.value.fullPath.startsWith("/stack-single")||t.currentRoute.value.fullPath.startsWith("/stack-multiple"))&&t.push({name:"stack-chooser"}),await M.shouldSetup()&&t.push({name:"settings",params:{setting:"crypto"},query:{wrongKey:"true"}})},v=()=>{console.log("reload"),window.location.reload()},d=()=>t.push({name:"settings",params:{setting:"crypto"},query:{wrongKey:"true"}});ee(async()=>{V.on("connect",u),V.on("disconnect",u),V.on("forceReload",v),V.on("system:wrongKey",d),V.on("plugins:installed",v),V.on("plugins:uninstalled",v),V.on("crypto:conflict",c),await u(),setTimeout(()=>{o.value&&typeof o.value.fetchPendingConflicts=="function"?(o.value.fetchPendingConflicts(),i.value.length>0&&(console.log(`Traitement de ${i.value.length} conflits en attente...`),i.value.forEach(k=>{o.value&&typeof o.value.addConflict=="function"&&o.value.addConflict(k)}),i.value=[])):console.warn("GitConflictModal n'est pas correctement initialisé, impossible de récupérer les conflits en attente.")},500)}),Le(()=>{V.off("crypto:conflict",c),V.off("plugins:installed",v),V.off("plugins:uninstalled",v),V.off("forceReload",v),V.off("system:wrongKey",d)});function c(k){if(o.value&&typeof o.value.addConflict=="function"){o.value.addConflict(k),A.next("error","Conflit Git détecté dans un fichier chiffré","Conflit Git");return}console.log("GitConflictModal n'est pas encore prêt, nouvelle tentative dans 500ms..."),setTimeout(()=>{o.value&&typeof o.value.addConflict=="function"?(o.value.addConflict(k),A.next("error","Conflit Git détecté dans un fichier chiffré","Conflit Git")):(console.error("Impossible d'ajouter le conflit Git: le composant GitConflictModal n'est pas correctement initialisé."),i.value.push(k),A.next("error","Conflit Git détecté mais l'interface n'est pas prête. Rechargez la page pour le résoudre.","Conflit Git"))},500)}let r=E({local:"",remote:"",hasUpdate:!1});ee(async()=>{var k;r.value=await re.hasUpdate(),(k=r.value)!=null&&k.hasUpdate&&A.next("error",`Update available: ${r.value.local} => ${r.value.remote}`)});const m=E(40),h=E(!1),x=E(null),j=E(!1);we(j,()=>{h.value&&(j.value?C(m.value):C(0))});const C=k=>{var z,q;const T=(z=n.value)==null?void 0:z.$el,N=(q=x.value)==null?void 0:q.$el;!T||!N||(T.style["flex-basis"]=`calc(${k}%)`,T.style.transition="100ms",T.style["will-change"]="flex-basis",N.style["flex-basis"]=`calc(${100-k}%)`,N.style.transition="100ms",N.style["will-change"]="flex-basis",k===0?T.style["min-width"]="0px":T.style["min-width"]="160px",setTimeout(()=>{T.style.transition="0ms",N.style.transition="0ms"},300))};return{componentsToLoad:E(Object.keys(qe)),redirect:u,connected:e,githubIssue:qt,versions:r,gitConflictModalRef:o,sidebarPanelRef:n,mainPanelRef:x,isMinimized:h,mouseInAnchor:j,toggleMinimized:()=>{h.value=!h.value;const k=h.value?0:m.value;C(k)},debouncedMouseInAnchor:tt(k=>{j.value=k},75)}}},Uo={key:0,id:"app-container"},Jo={id:"app"},qo={key:0,class:"fas fa-thumbtack"},Ko={key:1,class:"fas fa-chevron-right"},Fo={class:"main"},Go={key:2,class:"main"},Wo={key:1,class:"not-connected"},Ho=["href"];function Qo(t,e,n,o,i,u){var q,Z;const v=L("sidebar-view-mode"),d=L("sidebar"),c=L("SplitterPanel"),r=L("Button"),m=L("router-view"),h=L("Splitter"),x=L("EnvironmentsChooser"),j=L("PluginDev"),C=L("Finder"),k=L("notif-history"),T=L("notifications"),N=L("GitConflictModal"),z=L("PluginInstallError");return p(),y(P,null,[o.connected?(p(),y("div",Uo,[f("div",Jo,[["stack-chooser","import-create"].includes(((q=t.$route.name)==null?void 0:q.toString())||"")?$("",!0):(p(),R(v,{key:0})),["stack-single","stack-single-no-view"].includes(((Z=t.$route.name)==null?void 0:Z.toString())||"")?(p(),R(h,{key:1,class:"splitter",pt:{gutter:{style:{width:o.isMinimized?"0px":"5px"}}}},{default:_(()=>[w(c,{ref:"sidebarPanelRef",style:{minWidth:"160px",maxWidth:"660px"},size:20,onMouseenter:e[0]||(e[0]=H=>o.debouncedMouseInAnchor(!0)),onMouseleave:e[1]||(e[1]=H=>o.debouncedMouseInAnchor(!1))},{default:_(()=>[w(d,{onToggleMinimized:o.toggleMinimized,"is-minimized":o.isMinimized},null,8,["onToggleMinimized","is-minimized"])]),_:1},512),w(c,{ref:"mainPanelRef",class:"main-panel",size:80},{default:_(()=>[w(r,{class:F(["maximize",{"mouse-in-anchor":o.mouseInAnchor}]),style:Q({display:o.isMinimized?"flex":"none"}),pt:{root:{style:{margin:"0",borderRadius:"0"}}},onMouseenter:e[2]||(e[2]=H=>o.debouncedMouseInAnchor(!0)),onMouseleave:e[3]||(e[3]=H=>o.debouncedMouseInAnchor(!1)),onClick:vt(o.toggleMinimized,["stop"])},{default:_(()=>[o.isMinimized?(p(),y(P,{key:0},[o.mouseInAnchor?(p(),y("i",qo)):(p(),y("i",Ko))],64)):$("",!0)]),_:1},8,["class","style","onClick"]),f("div",Fo,[w(m)])]),_:1},512)]),_:1},8,["pt"])):(p(),y("div",Go,[w(m)]))]),w(x),w(j)])):(p(),y("div",Wo,[e[4]||(e[4]=U(" Server is not connected or has crashed ")),e[5]||(e[5]=f("br",null,null,-1)),e[6]||(e[6]=U(" Try to restart it or fill an issue: ")),e[7]||(e[7]=f("br",null,null,-1)),e[8]||(e[8]=f("br",null,null,-1)),f("a",{href:o.githubIssue,target:"_blank"},"Click here",8,Ho)])),(p(!0),y(P,null,J(o.componentsToLoad,H=>(p(),R(ge(H)))),256)),w(C),w(k),w(T),w(N,{ref:"gitConflictModalRef"},null,512),w(z)],64)}const gi=G(Bo,[["render",Qo],["__scopeId","data-v-7179e5a8"]]);export{gi as default};
100
+ `;function ce(t){"@babel/helpers - typeof";return ce=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ce(t)}function xe(t,e,n){return(e=Cn(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Cn(t){var e=Sn(t,"string");return ce(e)=="symbol"?e:e+""}function Sn(t,e){if(ce(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var o=n.call(t,e);if(ce(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var In={root:function(e){var n=e.props;return{alignItems:(n.direction==="up"||n.direction==="down")&&"center",justifyContent:(n.direction==="left"||n.direction==="right")&&"center",flexDirection:n.direction==="up"?"column-reverse":n.direction==="down"?"column":n.direction==="left"?"row-reverse":n.direction==="right"?"row":null}},list:function(e){var n=e.props;return{flexDirection:n.direction==="up"?"column-reverse":n.direction==="down"?"column":n.direction==="left"?"row-reverse":n.direction==="right"?"row":null}}},_n={root:function(e){var n=e.instance,o=e.props;return["p-speeddial p-component p-speeddial-".concat(o.type),xe(xe(xe({},"p-speeddial-direction-".concat(o.direction),o.type!=="circle"),"p-speeddial-open",n.d_visible),"p-disabled",o.disabled)]},pcButton:function(e){var n=e.props;return["p-speeddial-button",{"p-speeddial-rotate":n.rotateAnimation&&!n.hideIcon}]},list:"p-speeddial-list",item:"p-speeddial-item",action:"p-speeddial-action",actionIcon:"p-speeddial-action-icon",mask:function(e){var n=e.instance;return["p-speeddial-mask",{"p-speeddial-mask-visible":n.d_visible}]}},En=lt.extend({name:"speeddial",style:wn,classes:_n,inlineStyles:In}),xn={name:"BaseSpeedDial",extends:mt,props:{model:null,visible:{type:Boolean,default:!1},direction:{type:String,default:"up"},transitionDelay:{type:Number,default:30},type:{type:String,default:"linear"},radius:{type:Number,default:0},mask:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},hideOnClickOutside:{type:Boolean,default:!0},buttonClass:null,maskStyle:null,maskClass:null,showIcon:{type:String,default:void 0},hideIcon:{type:String,default:void 0},rotateAnimation:{type:Boolean,default:!0},tooltipOptions:null,style:null,class:null,buttonProps:{type:Object,default:function(){return{rounded:!0}}},actionButtonProps:{type:Object,default:function(){return{severity:"secondary",rounded:!0,size:"small"}}},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:En,provide:function(){return{$pcSpeedDial:this,$parentInstance:this}}};function de(t){"@babel/helpers - typeof";return de=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},de(t)}function ze(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,o)}return n}function Vn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ze(Object(n),!0).forEach(function(o){Tn(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ze(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function Tn(t,e,n){return(e=An(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function An(t){var e=On(t,"string");return de(e)=="symbol"?e:e+""}function On(t,e){if(de(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var o=n.call(t,e);if(de(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function pe(t){return Mn(t)||$n(t)||Ln(t)||jn()}function jn(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
101
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ln(t,e){if(t){if(typeof t=="string")return Ae(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ae(t,e):void 0}}function $n(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Mn(t){if(Array.isArray(t))return Ae(t)}function Ae(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=Array(e);n<e;n++)o[n]=t[n];return o}var Ve=3.14159265358979,We={name:"SpeedDial",extends:xn,inheritAttrs:!1,emits:["click","show","hide","focus","blur"],documentClickListener:null,container:null,list:null,data:function(){return{d_visible:this.visible,isItemClicked:!1,focused:!1,focusedOptionIndex:-1}},watch:{visible:function(e){this.d_visible=e}},mounted:function(){if(this.type!=="linear"){var e=ne(this.container,'[data-pc-name="pcbutton"]'),n=ne(this.list,'[data-pc-section="item"]');if(e&&n){var o=Math.abs(e.offsetWidth-n.offsetWidth),i=Math.abs(e.offsetHeight-n.offsetHeight);this.list.style.setProperty(te("item.diff.x").name,"".concat(o/2,"px")),this.list.style.setProperty(te("item.diff.y").name,"".concat(i/2,"px"))}}this.hideOnClickOutside&&this.bindDocumentClickListener()},beforeUnmount:function(){this.unbindDocumentClickListener()},methods:{getPTOptions:function(e,n){return this.ptm(n,{context:{active:this.isItemActive(e),hidden:!this.d_visible}})},onFocus:function(e){this.$emit("focus",e)},onBlur:function(e){this.focusedOptionIndex=-1,this.$emit("blur",e)},onItemClick:function(e,n){n.command&&n.command({originalEvent:e,item:n}),this.hide(),this.isItemClicked=!0,e.preventDefault()},onClick:function(e){this.d_visible?this.hide():this.show(),this.isItemClicked=!0,this.$emit("click",e)},show:function(){this.d_visible=!0,this.$emit("show")},hide:function(){this.d_visible=!1,this.$emit("hide")},calculateTransitionDelay:function(e){var n=this.model.length,o=this.d_visible;return(o?e:n-e-1)*this.transitionDelay},onTogglerKeydown:function(e){switch(e.code){case"ArrowDown":case"ArrowLeft":this.onTogglerArrowDown(e);break;case"ArrowUp":case"ArrowRight":this.onTogglerArrowUp(e);break;case"Escape":this.onEscapeKey();break}},onKeyDown:function(e){switch(e.code){case"ArrowDown":this.onArrowDown(e);break;case"ArrowUp":this.onArrowUp(e);break;case"ArrowLeft":this.onArrowLeft(e);break;case"ArrowRight":this.onArrowRight(e);break;case"Enter":case"NumpadEnter":case"Space":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break}},onTogglerArrowUp:function(e){this.show(),this.navigatePrevItem(e),e.preventDefault()},onTogglerArrowDown:function(e){this.show(),this.navigateNextItem(e),e.preventDefault()},onEnterKey:function(e){var n=this,o=ve(this.container,'[data-pc-section="item"]'),i=pe(o).findIndex(function(v){return v.id===n.focusedOptionIndex}),u=ne(this.container,"button");this.onItemClick(e,this.model[i]),this.onBlur(e),u&&_e(u)},onEscapeKey:function(){this.hide();var e=ne(this.container,"button");e&&_e(e)},onArrowUp:function(e){this.direction==="down"?this.navigatePrevItem(e):this.navigateNextItem(e)},onArrowDown:function(e){this.direction==="down"?this.navigateNextItem(e):this.navigatePrevItem(e)},onArrowLeft:function(e){var n=["left","up-right","down-left"],o=["right","up-left","down-right"];n.includes(this.direction)?this.navigateNextItem(e):o.includes(this.direction)?this.navigatePrevItem(e):this.navigatePrevItem(e)},onArrowRight:function(e){var n=["left","up-right","down-left"],o=["right","up-left","down-right"];n.includes(this.direction)?this.navigatePrevItem(e):o.includes(this.direction)?this.navigateNextItem(e):this.navigateNextItem(e)},onEndKey:function(e){e.preventDefault(),this.focusedOptionIndex=-1,this.navigatePrevItem(e)},onHomeKey:function(e){e.preventDefault(),this.focusedOptionIndex=-1,this.navigateNextItem(e)},navigateNextItem:function(e){var n=this.findNextOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(n),e.preventDefault()},navigatePrevItem:function(e){var n=this.findPrevOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(n),e.preventDefault()},changeFocusedOptionIndex:function(e){var n=ve(this.container,'[data-pc-section="item"]'),o=pe(n).filter(function(u){return!Ie(ne(u,"a"),"p-disabled")});if(o[e]){this.focusedOptionIndex=o[e].getAttribute("id");var i=ne(o[e],'[type="button"]');i&&_e(i)}},findPrevOptionIndex:function(e){var n=ve(this.container,'[data-pc-section="item"]'),o=pe(n).filter(function(v){return!Ie(ne(v,"a"),"p-disabled")}),i=e===-1?o[o.length-1].id:e,u=o.findIndex(function(v){return v.getAttribute("id")===i});return u=e===-1?o.length-1:u-1,u},findNextOptionIndex:function(e){var n=ve(this.container,'[data-pc-section="item"]'),o=pe(n).filter(function(v){return!Ie(ne(v,"a"),"p-disabled")}),i=e===-1?o[0].id:e,u=o.findIndex(function(v){return v.getAttribute("id")===i});return u=e===-1?0:u+1,u},calculatePointStyle:function(e){var n=this.type;if(n!=="linear"){var o=this.model.length,i=this.radius||o*20;if(n==="circle"){var u=2*Ve/o;return{left:"calc(".concat(i*Math.cos(u*e),"px + ").concat(te("item.diff.x").variable,")"),top:"calc(".concat(i*Math.sin(u*e),"px + ").concat(te("item.diff.y").variable,")")}}else if(n==="semi-circle"){var v=this.direction,d=Ve/(o-1),c="calc(".concat(i*Math.cos(d*e),"px + ").concat(te("item.diff.x").variable,")"),r="calc(".concat(i*Math.sin(d*e),"px + ").concat(te("item.diff.y").variable,")");if(v==="up")return{left:c,bottom:r};if(v==="down")return{left:c,top:r};if(v==="left")return{right:r,top:c};if(v==="right")return{left:r,top:c}}else if(n==="quarter-circle"){var m=this.direction,h=Ve/(2*(o-1)),x="calc(".concat(i*Math.cos(h*e),"px + ").concat(te("item.diff.x").variable,")"),j="calc(".concat(i*Math.sin(h*e),"px + ").concat(te("item.diff.y").variable,")");if(m==="up-left")return{right:x,bottom:j};if(m==="up-right")return{left:x,bottom:j};if(m==="down-left")return{right:j,top:x};if(m==="down-right")return{left:j,top:x}}}return{}},getItemStyle:function(e){var n=this.calculateTransitionDelay(e),o=this.calculatePointStyle(e);return Vn({transitionDelay:"".concat(n,"ms")},o)},bindDocumentClickListener:function(){var e=this;this.documentClickListener||(this.documentClickListener=function(n){e.d_visible&&e.isOutsideClicked(n)&&e.hide(),e.isItemClicked=!1},document.addEventListener("click",this.documentClickListener))},unbindDocumentClickListener:function(){this.documentClickListener&&(document.removeEventListener("click",this.documentClickListener),this.documentClickListener=null)},isOutsideClicked:function(e){return this.container&&!(this.container.isSameNode(e.target)||this.container.contains(e.target)||this.isItemClicked)},isItemVisible:function(e){return typeof e.visible=="function"?e.visible():e.visible!==!1},isItemActive:function(e){return e===this.focusedOptionId},containerRef:function(e){this.container=e},listRef:function(e){this.list=e}},computed:{containerClass:function(){return[this.cx("root"),this.class]},focusedOptionId:function(){return this.focusedOptionIndex!==-1?this.focusedOptionIndex:null}},components:{Button:K,PlusIcon:vt},directives:{ripple:pt,tooltip:rt}},Pn=["id"],Dn=["id","data-p-active"];function Nn(t,e,n,o,i,u){var v=L("Button"),d=at("tooltip");return p(),y(P,null,[f("div",X({ref:u.containerRef,class:u.containerClass,style:[t.style,t.sx("root")]},t.ptmi("root")),[me(t.$slots,"button",{visible:i.d_visible,toggleCallback:u.onClick},function(){return[w(v,X({class:[t.cx("pcButton"),t.buttonClass],disabled:t.disabled,"aria-expanded":i.d_visible,"aria-haspopup":!0,"aria-controls":t.$id+"_list","aria-label":t.ariaLabel,"aria-labelledby":t.ariaLabelledby,unstyled:t.unstyled,onClick:e[0]||(e[0]=function(c){return u.onClick(c)}),onKeydown:u.onTogglerKeydown},t.buttonProps,{pt:t.ptm("pcButton")}),{icon:_(function(c){return[me(t.$slots,"icon",{visible:i.d_visible},function(){return[i.d_visible&&t.hideIcon?(p(),R(ge(t.hideIcon?"span":"PlusIcon"),X({key:0,class:[t.hideIcon,c.class]},t.ptm("pcButton").icon,{"data-pc-section":"icon"}),null,16,["class"])):(p(),R(ge(t.showIcon?"span":"PlusIcon"),X({key:1,class:[i.d_visible&&t.hideIcon?t.hideIcon:t.showIcon,c.class]},t.ptm("pcButton").icon,{"data-pc-section":"icon"}),null,16,["class"]))]})]}),_:3},16,["class","disabled","aria-expanded","aria-controls","aria-label","aria-labelledby","unstyled","onKeydown","pt"])]}),f("ul",X({ref:u.listRef,id:t.$id+"_list",class:t.cx("list"),style:t.sx("list"),role:"menu",tabindex:"-1",onFocus:e[1]||(e[1]=function(){return u.onFocus&&u.onFocus.apply(u,arguments)}),onBlur:e[2]||(e[2]=function(){return u.onBlur&&u.onBlur.apply(u,arguments)}),onKeydown:e[3]||(e[3]=function(){return u.onKeyDown&&u.onKeyDown.apply(u,arguments)})},t.ptm("list")),[(p(!0),y(P,null,J(t.model,function(c,r){return p(),y(P,{key:r},[u.isItemVisible(c)?(p(),y("li",X({key:0,id:"".concat(t.$id,"_").concat(r),class:t.cx("item",{id:"".concat(t.$id,"_").concat(r)}),style:u.getItemStyle(r),role:"none","data-p-active":u.isItemActive("".concat(t.$id,"_").concat(r)),ref_for:!0},u.getPTOptions("".concat(t.$id,"_").concat(r),"item")),[t.$slots.item?(p(),R(ge(t.$slots.item),{key:1,item:c,onClick:function(h){return u.onItemClick(h,c)},toggleCallback:function(h){return u.onItemClick(h,c)}},null,8,["item","onClick","toggleCallback"])):Ke((p(),R(v,X({key:0,tabindex:-1,role:"menuitem",class:t.cx("pcAction",{item:c}),"aria-label":c.label,disabled:t.disabled,unstyled:t.unstyled,onClick:function(h){return u.onItemClick(h,c)},ref_for:!0},t.actionButtonProps,{pt:u.getPTOptions("".concat(t.$id,"_").concat(r),"pcAction")}),ut({_:2},[c.icon?{name:"icon",fn:_(function(m){return[me(t.$slots,"itemicon",{item:c,class:F(m.class)},function(){return[f("span",X({class:[c.icon,m.class],ref_for:!0},u.getPTOptions("".concat(t.$id,"_").concat(r),"actionIcon")),null,16)]})]}),key:"0"}:void 0]),1040,["class","aria-label","disabled","unstyled","onClick","pt"])),[[d,{value:c.label,disabled:!t.tooltipOptions},t.tooltipOptions]])],16,Dn)):$("",!0)],64)}),128))],16,Pn)],16),t.mask?(p(),y("div",X({key:0,class:[t.cx("mask"),t.maskClass],style:t.maskStyle},t.ptm("mask")),null,16)):$("",!0)],64)}We.render=Nn;const Rn={components:{SidebarViewModeItem:cn,DoughtnutChart:kn,Popover:Fe,SpeedDial:We,Button:K},setup(){const t=le(),e=E([]),n=E([]),o=E(0),i=E(0);ee(async()=>{await M.loadServices();const{data:d}=await ae.get("/plugins/sidebar"),{data:c}=await ae.get("/plugins/sidebar-top");e.value=(d==null?void 0:d.flat())||[],n.value=(c==null?void 0:c.flat())||[],V.on("infos:global",r=>{const{memPercentage:m,cpu:h}=r;o.value=h,i.value=m})});function u(d){return d.placements.map(c=>{if(typeof c!="string")return{text:c.label,icon:c.icon,img:re.proxyImg(c.img),click:c.goTo?()=>t.push(c.goTo||"/"):()=>{},active:c.active}})}function v(d){return d.map(u).flat().filter(c=>c)}return{speedDialVisible:E(!0),Theme:be,groups:Y(()=>{const d=Object.keys(be.themes.value).reduce((r,m)=>{const h=be.themes.value[m];if(h.id=m,!h.public||!h.preview)return r;const x=h.group||"Unknown";return r[x]||(r[x]={group:"unknown",themes:[]}),r[x].group=x,r[x].themes.push(h),r},{}),c=Object.keys(d).map(r=>({group:r,themes:d[r].themes}));return console.log(c.sort((r,m)=>r.group.localeCompare(m.group))),c.sort((r,m)=>r.group.localeCompare(m.group))}),buttons:Y(()=>[{text:"Overview",active:"overview",icon:"fas fa-home",click:()=>t.push({name:"overview"})},{text:"Single View",active:"single",icon:"fas fa-columns",click:()=>{var c;const d=M.services.value.find(r=>r.label===localStorage.getItem("last-service-visisted"));d?t.push({name:"stack-single",params:{label:d.label}}):M.services.value[0]?t.push({name:"stack-single",params:{label:(c=M.services.value[0])==null?void 0:c.label}}):t.push({name:"stack-single-no-view"})}},{text:"Multiple view",active:"multiple",icon:"fas fa-th",click:()=>t.push({name:"stack-multiple"})},...v(n.value)]),buttonsPlugins:Y(()=>[...v(e.value),...globalThis.sidebarPlugins.value.map(d=>({...d,active:`/dynamic/${encodeURIComponent(d.id)}`,click:()=>{t.push({path:`/dynamic/${encodeURIComponent(d.id)}`})}}))]),buttonsBottom:Y(()=>[{text:"Settings",active:"settings",icon:"fas fa-cog",click:()=>t.push({name:"settings-no-view"})},{text:"Disconnect",icon:"fas fa-unlink",click:()=>re.disconnect()}]),cpu:o,mem:i,System:re}}},zn={class:"sidebar"},Bn={key:0},Un={key:1},Jn={style:{position:"relative"}},qn={class:"button-container"},Kn=["onClick","title"],Fn=["alt"],Gn={class:"groups"},Wn={class:"group"},Hn={class:"themes"},Qn=["onClick"];function Yn(t,e,n,o,i,u){const v=L("sidebar-view-mode-item"),d=L("Popover"),c=L("doughtnut-chart");return p(),y("div",zn,[o.buttons.length?(p(),y("ul",Bn,[(p(!0),y(P,null,J(o.buttons,r=>(p(),R(v,{key:r.label,button:r},null,8,["button"]))),128))])):$("",!0),o.buttonsBottom.length?(p(),y("ul",Un,[f("div",Jn,[(p(!0),y(P,null,J(o.buttonsPlugins,r=>(p(),y("div",{key:r==null?void 0:r.text},[w(d,{appendTo:"parent",trigger:"mouseenter",placement:"right"},{trigger:_(()=>[f("div",qn,[f("button",{onClick:m=>r==null?void 0:r.click(),class:F([{active:t.$router.currentRoute.value.fullPath.includes((r==null?void 0:r.active)||""),"button-speed-dial":!0},"sidebar-item"]),title:r==null?void 0:r.text},[r!=null&&r.icon?(p(),y("i",{key:0,class:F({[r==null?void 0:r.icon]:!0}),"aria-hidden":"true"},null,2)):r!=null&&r.img?(p(),y("div",{key:1,alt:`Icon for ${r==null?void 0:r.text}`,class:"masked-icon",style:Q({WebkitMaskImage:`url(${r==null?void 0:r.img})`,maskImage:`url(${r==null?void 0:r.img})`})},null,12,Fn)):$("",!0)],10,Kn)])]),content:_(()=>[U(O(r==null?void 0:r.text),1)]),_:2},1024)]))),128))]),w(d,{appendTo:"parent",trigger:"mouseenter",placement:"right"},{trigger:_(()=>[w(c,{placeholder:"CPU",width:"10px",rayon:17,fontSize:"11",value:o.cpu*100,strokeWidth:3,strokeWidthBg:5,adjustSubtitleLeft:-2,adjustTitleTop:-5,adjustSubtitleTop:-11,padding:14,strokeColor:"var(--system-primary600-lightest)",strokeColorBg:"var(--system-primary400)"},null,8,["value"])]),content:_(()=>e[0]||(e[0]=[U(" CPU ")])),_:1}),w(d,{appendTo:"parent",trigger:"mouseenter",placement:"right"},{trigger:_(()=>[w(c,{placeholder:"RAM",width:"10px",rayon:17,value:o.mem,fontSize:"11",strokeWidth:3,strokeWidthBg:5,adjustSubtitleTop:-11,adjustSubtitleLeft:-2,adjustTitleTop:-5,padding:14,strokeColor:"var(--system-tertiary400)",strokeColorBg:"var(--system-tertiary600)"},null,8,["value"])]),content:_(()=>e[1]||(e[1]=[U(" RAM ")])),_:1}),w(d,{appendTo:"parent",trigger:"mouseenter",placement:"left-start",showOnCreate:!1},{trigger:_(()=>[w(v,{key:"Themes",button:{text:"",icon:"fas fa-sun",click:()=>{var r,m;console.log(o.Theme),(m=(r=o.Theme)==null?void 0:r.toggle)==null||m.call(r)}}},null,8,["button"])]),content:_(()=>[f("div",Gn,[(p(!0),y(P,null,J(o.groups,r=>(p(),y("div",Wn,[U(O(r.group)+" ",1),f("div",Hn,[(p(!0),y(P,null,J(r.themes,m=>(p(),y("div",{class:"theme",onClick:h=>o.Theme.apply(m.id),key:m.id},[(p(),y("div",{class:"view",key:m.id},[f("div",{class:"viewwindows",style:Q({...m.preview.background||{},border:`4px solid ${m.preview.background.backgroundColor}`})},[f("div",{class:"rad",style:Q(m.preview.foreground4||m.preview.foreground1)},null,4),f("div",{class:"rad",style:Q(m.preview.foreground3||m.preview.foreground1)},null,4),f("div",{class:"rad",style:Q(m.preview.foreground2||m.preview.foreground1)},null,4),f("div",{class:"rad",style:Q(m.preview.foreground1)},null,4)],4)]))],8,Qn))),128))])]))),256))])]),_:1}),(p(!0),y(P,null,J(o.buttonsBottom,r=>(p(),R(v,{key:r.label,button:r},null,8,["button"]))),128))])):$("",!0)])}const Zn=G(Rn,[["render",Yn],["__scopeId","data-v-792676e1"]]),Xn={class:"reload-modal"},eo={__name:"EnvironmentsChooser",setup(t){const e=le(),n=E(null),o=E([]),i=E(!1),u=E(null),v=E(null),d=E({label:"",color:"",bgColor:""});ee(c);async function c(){n.value=await M.getEnvironment(),o.value=await M.getEnvironments()}ee(()=>{V.on("reloadEnvironments",c)}),Le(()=>{V.off("reloadEnvironments",c)});async function r(){var C,k;await((C=v.value)==null?void 0:C.open().promise)&&(k=d.value)!=null&&k.label&&(await M.createEnvironment(d.value),d.value={label:"",color:"",bgColor:""})}function m(){var j;return(j=M.services.value)==null?void 0:j.filter(C=>C.enabled).reduce((C,k)=>{var z,q;const T=Object.keys(((z=k==null?void 0:k.spawnOptions)==null?void 0:z.overrideEnvs)||{});return Object.keys(((q=k==null?void 0:k.spawnOptions)==null?void 0:q.env)||{}).some(Z=>T.includes(Z))&&C.push(k),C},[])}async function h({value:j}){const C=m();C!=null&&C.length&&u.value&&!await u.value.open(C).promise||(i.value=!0,await M.changeEnvironment(j).then(()=>{window.location.reload()}).catch(k=>{console.error(k),A.next("error","Problem has occured")}).finally(()=>{i.value=!1}))}function x(){e.push({name:"settings",params:{setting:"environments"}})}return(j,C)=>(p(),y(P,null,[n.value?(p(),y("div",{key:0,class:"banner",style:Q({backgroundColor:n.value.bgColor||"transparent",color:n.value.color||"transparent"})},[f("div",null,[C[3]||(C[3]=U(" Current environment ")),w(D(gt),{class:"select",size:"small",defaultValue:n.value.label,value:n.value.label,onChange:h,options:o.value.filter(k=>k),optionLabel:"label",optionValue:"label",placeholder:"Select an environment"},{footer:_(()=>[w(D(K),{label:"Add New",fluid:"",severity:"secondary",text:"",size:"small",icon:"fas fa-plus",onClick:r}),w(D(K),{label:"Edit",fluid:"",severity:"secondary",text:"",size:"small",icon:"fas fa-edit",onClick:x})]),_:1},8,["defaultValue","value","options"])])],4)):$("",!0),i.value?(p(),R(ct,{key:1,to:"body"},[f("div",Xn,[w(ht),C[4]||(C[4]=U(" Change environments... "))])])):$("",!0),w(Te,{ref_key:"overrideModalRef",ref:u,cancelString:"Cancel",validateString:"Ok"},{header:_(({data:k})=>C[5]||(C[5]=[U(" Change environment ")])),body:_(({data:k})=>[C[6]||(C[6]=U(" Because .env in services root folder is the main truth. Some environments may not be taken into account. ")),f("ul",null,[(p(!0),y(P,null,J(k,T=>(p(),y("li",{key:T.id},[U(O(T.label)+" ",1),f("ul",null,[(p(!0),y(P,null,J(T.spawnOptions.overrideEnvs,(N,z)=>(p(),y("li",null,O(z)+": "+O(N),1))),256))])]))),128))])]),_:1},512),w(Te,{ref_key:"createEnvironmentModalRef",ref:v,cancelString:"Cancel",validateString:"Ok"},{header:_(()=>C[7]||(C[7]=[U(" Create environment ")])),body:_(()=>[w(D(Ee),null,{default:_(()=>[w(D(ye),{id:"environment-to-create-label",size:"small",modelValue:d.value.label,"onUpdate:modelValue":C[0]||(C[0]=k=>d.value.label=k),fluid:""},null,8,["modelValue"]),C[8]||(C[8]=f("label",{for:"environment-to-create-label"},"Label",-1))]),_:1,__:[8]}),w(D(Ee),null,{default:_(()=>[w(D(ye),{id:"environment-to-create-bgColor",size:"small",modelValue:d.value.bgColor,"onUpdate:modelValue":C[1]||(C[1]=k=>d.value.bgColor=k),fluid:""},null,8,["modelValue"]),C[9]||(C[9]=f("label",{for:"environment-to-create-bgColor"},"Background color",-1))]),_:1,__:[9]}),w(D(Ee),null,{default:_(()=>[w(D(ye),{id:"environment-to-create-color",size:"small",modelValue:d.value.color,"onUpdate:modelValue":C[2]||(C[2]=k=>d.value.color=k),fluid:""},null,8,["modelValue"]),C[10]||(C[10]=f("label",{for:"environment-to-create-color"},"Color",-1))]),_:1,__:[10]})]),_:1},512)],64))}},to=G(eo,[["__scopeId","data-v-42a01f9f"]]);function oe(){}oe.prototype={diff:function(e,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.callback;typeof o=="function"&&(i=o,o={}),this.options=o;var u=this;function v(k){return i?(setTimeout(function(){i(void 0,k)},0),!0):k}e=this.castInput(e),n=this.castInput(n),e=this.removeEmpty(this.tokenize(e)),n=this.removeEmpty(this.tokenize(n));var d=n.length,c=e.length,r=1,m=d+c,h=[{newPos:-1,components:[]}],x=this.extractCommon(h[0],n,e,0);if(h[0].newPos+1>=d&&x+1>=c)return v([{value:this.join(n),count:n.length}]);function j(){for(var k=-1*r;k<=r;k+=2){var T=void 0,N=h[k-1],z=h[k+1],q=(z?z.newPos:0)-k;N&&(h[k-1]=void 0);var Z=N&&N.newPos+1<d,H=z&&0<=q&&q<c;if(!Z&&!H){h[k]=void 0;continue}if(!Z||H&&N.newPos<z.newPos?(T=oo(z),u.pushComponent(T.components,void 0,!0)):(T=N,T.newPos++,u.pushComponent(T.components,!0,void 0)),q=u.extractCommon(T,n,e,k),T.newPos+1>=d&&q+1>=c)return v(no(u,T.components,n,e,u.useLongestToken));h[k]=T}r++}if(i)(function k(){setTimeout(function(){if(r>m)return i();j()||k()},0)})();else for(;r<=m;){var C=j();if(C)return C}},pushComponent:function(e,n,o){var i=e[e.length-1];i&&i.added===n&&i.removed===o?e[e.length-1]={count:i.count+1,added:n,removed:o}:e.push({count:1,added:n,removed:o})},extractCommon:function(e,n,o,i){for(var u=n.length,v=o.length,d=e.newPos,c=d-i,r=0;d+1<u&&c+1<v&&this.equals(n[d+1],o[c+1]);)d++,c++,r++;return r&&e.components.push({count:r}),e.newPos=d,c},equals:function(e,n){return this.options.comparator?this.options.comparator(e,n):e===n||this.options.ignoreCase&&e.toLowerCase()===n.toLowerCase()},removeEmpty:function(e){for(var n=[],o=0;o<e.length;o++)e[o]&&n.push(e[o]);return n},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};function no(t,e,n,o,i){for(var u=0,v=e.length,d=0,c=0;u<v;u++){var r=e[u];if(r.removed){if(r.value=t.join(o.slice(c,c+r.count)),c+=r.count,u&&e[u-1].added){var h=e[u-1];e[u-1]=e[u],e[u]=h}}else{if(!r.added&&i){var m=n.slice(d,d+r.count);m=m.map(function(j,C){var k=o[c+C];return k.length>j.length?k:j}),r.value=t.join(m)}else r.value=t.join(n.slice(d,d+r.count));d+=r.count,r.added||(c+=r.count)}}var x=e[v-1];return v>1&&typeof x.value=="string"&&(x.added||x.removed)&&t.equals("",x.value)&&(e[v-2].value+=x.value,e.pop()),e}function oo(t){return{newPos:t.newPos,components:t.components.slice(0)}}function io(t,e){if(typeof t=="function")e.callback=t;else if(t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}var Be=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Ue=/\S/,$e=new oe;$e.equals=function(t,e){return this.options.ignoreCase&&(t=t.toLowerCase(),e=e.toLowerCase()),t===e||this.options.ignoreWhitespace&&!Ue.test(t)&&!Ue.test(e)};$e.tokenize=function(t){for(var e=t.split(/(\s+|[()[\]{}'"]|\b)/),n=0;n<e.length-1;n++)!e[n+1]&&e[n+2]&&Be.test(e[n])&&Be.test(e[n+2])&&(e[n]+=e[n+2],e.splice(n+1,2),n--);return e};function Je(t,e,n){return n=io(n,{ignoreWhitespace:!0}),$e.diff(t,e,n)}var He=new oe;He.tokenize=function(t){var e=[],n=t.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var o=0;o<n.length;o++){var i=n[o];o%2&&!this.options.newlineIsToken?e[e.length-1]+=i:(this.options.ignoreWhitespace&&(i=i.trim()),e.push(i))}return e};var so=new oe;so.tokenize=function(t){return t.split(/(\S.+?[.!?])(?=\s+|$)/)};var lo=new oe;lo.tokenize=function(t){return t.split(/([{}:;,]|\s+)/)};function ke(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ke=function(e){return typeof e}:ke=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ke(t)}var ro=Object.prototype.toString,fe=new oe;fe.useLongestToken=!0;fe.tokenize=He.tokenize;fe.castInput=function(t){var e=this.options,n=e.undefinedReplacement,o=e.stringifyReplacer,i=o===void 0?function(u,v){return typeof v>"u"?n:v}:o;return typeof t=="string"?t:JSON.stringify(Oe(t,null,null,i),i," ")};fe.equals=function(t,e){return oe.prototype.equals.call(fe,t.replace(/,([\r\n])/g,"$1"),e.replace(/,([\r\n])/g,"$1"))};function Oe(t,e,n,o,i){e=e||[],n=n||[],o&&(t=o(i,t));var u;for(u=0;u<e.length;u+=1)if(e[u]===t)return n[u];var v;if(ro.call(t)==="[object Array]"){for(e.push(t),v=new Array(t.length),n.push(v),u=0;u<t.length;u+=1)v[u]=Oe(t[u],e,n,o,i);return e.pop(),n.pop(),v}if(t&&t.toJSON&&(t=t.toJSON()),ke(t)==="object"&&t!==null){e.push(t),v={},n.push(v);var d=[],c;for(c in t)t.hasOwnProperty(c)&&d.push(c);for(d.sort(),u=0;u<d.length;u+=1)c=d[u],v[c]=Oe(t[c],e,n,o,c);e.pop(),n.pop()}else v=t;return v}var je=new oe;je.tokenize=function(t){return t.slice()};je.join=je.removeEmpty=function(t){return t};const ao={key:0,class:"conflict-container"},uo={class:"conflict-header"},co={key:0,class:"file-info"},fo={class:"version-actions"},vo={key:0,class:"json-conflicts"},po={class:"json-conflicts-list"},mo={class:"json-header"},ho={class:"json-path"},go={class:"manual-edit-actions"},yo={class:"conflict-section"},bo={class:"conflict-versions"},ko=["onClick","data-index"],wo={class:"json-content"},Co=["onClick","data-index"],So={class:"json-content"},Io={class:"manual-edit-container"},_o={key:1,class:"conflicts-container"},Eo={class:"conflict-columns"},xo={class:"conflict-column"},Vo={class:"interactive-conflict"},To=["innerHTML"],Ao={class:"conflict-column"},Oo={class:"manual-edit-container"},jo={key:1,class:"no-conflict-message"},Lo={class:"flex justify-content-end"},$o={class:"flex gap-2"},Mo={__name:"GitConflictModal",emits:["conflict-resolved"],setup(t,{expose:e,emit:n}){const o=E(!1),i=E(null),u=E([]);function v(l,s){const a=Je(l,s),b=[];let g="",S=0;return a.forEach(I=>{if(I.added||I.removed){const B=`chunk-${S++}`;I.added?(b.push({id:B,ourVersion:"",theirVersion:I.value,selectedVersion:"ours"}),g+=`<span class="diff-chunk their-version not-selected" data-chunk-id="${B}">${I.value}</span>`):I.removed&&(b.push({id:B,ourVersion:I.value,theirVersion:"",selectedVersion:"ours"}),g+=`<span class="diff-chunk our-version selected" data-chunk-id="${B}">${I.value}</span>`)}else g+=`<span class="common-text">${I.value}</span>`}),[b,g]}function d(){i.value&&(i.value.isJson&&i.value.jsonConflicts?(i.value.jsonConflicts.forEach(l=>{l.selectedVersion="ours"}),T()):i.value.chunks&&(i.value.chunks.forEach(l=>{l.selectedVersion="ours";const s=document.querySelector(`.diff-chunk[data-chunk-id="${l.id}"]`);s&&(s.classList.contains("our-version")?(s.classList.add("selected"),s.classList.remove("not-selected")):(s.classList.remove("selected"),s.classList.add("not-selected")))}),m()))}function c(){i.value&&(i.value.isJson&&i.value.jsonConflicts?(i.value.jsonConflicts.forEach(l=>{l.selectedVersion="theirs"}),T()):i.value.chunks&&(i.value.chunks.forEach(l=>{l.selectedVersion="theirs";const s=document.querySelector(`.diff-chunk[data-chunk-id="${l.id}"]`);s&&(s.classList.contains("their-version")?(s.classList.add("selected"),s.classList.remove("not-selected")):(s.classList.remove("selected"),s.classList.add("not-selected")))}),m()))}function r(l){if(!i.value||!i.value.chunks)return;const s=i.value.chunks.find(b=>b.id===l);if(!s)return;s.selectedVersion=s.selectedVersion==="ours"?"theirs":"ours";const a=document.querySelector(`.diff-chunk[data-chunk-id="${l}"]`);a&&(a.classList.toggle("selected"),a.classList.toggle("not-selected"),a.classList.contains("our-version")?s.selectedVersion==="ours"?(a.classList.add("selected"),a.classList.remove("not-selected")):(a.classList.remove("selected"),a.classList.add("not-selected")):s.selectedVersion==="theirs"?(a.classList.add("selected"),a.classList.remove("not-selected")):(a.classList.remove("selected"),a.classList.add("not-selected"))),m()}function m(){if(!i.value||!i.value.chunks){console.warn("updateResolution appelée alors que currentConflict ou ses chunks sont null");return}try{let l="";const s=Je(i.value.ourVersion,i.value.theirVersion),a=i.value.chunks;s.forEach(b=>{try{if(b.added){const g=a.find(S=>S.theirVersion===b.value&&S.ourVersion==="");g&&g.selectedVersion==="theirs"&&(l+=b.value)}else if(b.removed){const g=a.find(S=>S.ourVersion===b.value&&S.theirVersion==="");(!g||g.selectedVersion==="ours")&&(l+=b.value)}else l+=b.value}catch(g){console.error("Erreur lors du traitement d'une partie:",g)}}),i.value&&(i.value.resolution=l)}catch(l){console.error("Erreur lors de la mise à jour de la résolution:",l)}}function h(){if(!i.value){console.warn("setupChunkListeners appelé alors que currentConflict.value est null"),setTimeout(()=>{i.value&&h()},50);return}console.log("Mise en place des écouteurs d'événements sur les chunks");try{const l=()=>{const s=document.querySelectorAll(".json-value");console.log(`Found ${s.length} JSON value elements`),s.forEach(a=>{if(a instanceof HTMLElement){const b=a.getAttribute("data-version"),g=a.getAttribute("data-index");if(b&&g&&(b==="ours"||b==="theirs"))try{const S=parseInt(g,10);a.addEventListener("click",I=>{I.stopPropagation(),console.log(`Clic sur JSON value: index=${S}, version=${b}`),(b==="ours"||b==="theirs")&&k(S,b)}),a.style.cursor="pointer"}catch(S){console.error("Error parsing index:",S)}}})};he(()=>{setTimeout(()=>{if(!i.value){console.warn("setupChunkListeners: currentConflict.value est devenu null pendant le délai");return}const s=document.querySelectorAll(".diff-chunk");if(console.log(`${s.length} chunks trouvés pour le conflit`),s.length===0){console.warn("Aucun chunk trouvé, tentative avec un délai plus long"),setTimeout(h,200);return}s.forEach(a=>{try{const b=a.getAttribute("data-chunk-id");if(b){a.replaceWith(a.cloneNode(!0));const g=document.querySelector(`.diff-chunk[data-chunk-id="${b}"]`);g&&(g.addEventListener("click",S=>{S.stopPropagation();try{console.log(`Clic sur le chunk ${b}`),r(b)}catch(I){console.error(`Erreur sur le clic du chunk ${b}:`,I)}}),g instanceof HTMLElement&&(g.style.cursor="pointer",g.style.userSelect="none"))}}catch(b){console.error("Erreur lors de la configuration d'un chunk:",b)}}),l(),console.log("Écouteurs d'événements ajoutés avec succès")},150)})}catch(l){console.error("Erreur générale dans setupChunkListeners:",l)}}function x(l,s){try{const a=JSON.parse(l),b=JSON.parse(s);return j(a,b)}catch{return[]}}function j(l,s,a=""){const b=[];for(const g in l){const S=a?`${a}.${g}`:g;if(!(g in s)){const I={path:S,ourValue:l[g],theirValue:void 0,selectedVersion:"ours",manualEdit:JSON.stringify(l[g],null,2)};b.push(I);continue}if(typeof l[g]=="object"&&l[g]!==null&&typeof s[g]=="object"&&s[g]!==null&&!Array.isArray(l[g])&&!Array.isArray(s[g])){b.push(...j(l[g],s[g],S));continue}if(JSON.stringify(l[g])!==JSON.stringify(s[g])){const I={path:S,ourValue:l[g],theirValue:s[g],selectedVersion:"ours",manualEdit:JSON.stringify(l[g],null,2)};b.push(I)}}for(const g in s)if(!(g in l)){const I={path:a?`${a}.${g}`:g,ourValue:void 0,theirValue:s[g],selectedVersion:"ours",manualEdit:"undefined"};b.push(I)}return b}function C(l){if(l===void 0)return"undefined";try{return JSON.stringify(l,null,2)}catch{return String(l)}}function k(l,s){if(console.log(`Tentative de sélection JSON : index=${l}, version=${s}`),!i.value||!i.value.jsonConflicts){console.error("selectJsonVersion: currentConflict ou jsonConflicts est null");return}const a=i.value.jsonConflicts[l];if(a){console.log(`Avant changement: selectedVersion=${a.selectedVersion}`),a.selectedVersion=s;const b=s==="ours"?a.ourValue:a.theirValue;a.manualEdit=C(b),console.log(`Après changement: selectedVersion=${a.selectedVersion}, manualEdit mis à jour`),T()}else console.error(`Aucun conflit JSON trouvé à l'index ${l}`)}function T(){if(!i.value||!i.value.jsonConflicts){console.warn("updateJsonResolution appelée alors que currentConflict ou ses jsonConflicts sont null");return}try{console.log("Mise à jour de la résolution JSON à partir des éditions manuelles");const l=JSON.parse(i.value.ourVersion),s=JSON.parse(JSON.stringify(l));if(i.value.jsonConflicts.forEach((a,b)=>{try{if(!a||!a.path){console.warn(`Conflit JSON invalide ou sans chemin à l'index ${b}`);return}const g=a.path.split(".");let S=s;for(let B=0;B<g.length-1;B++){const W=g[B];W in S||(S[W]={}),S=S[W]}const I=g[g.length-1];if(a.manualEdit&&a.manualEdit.trim()!==""&&a.manualEdit!=="undefined")try{console.log(`Utilisation de l'édition manuelle pour ${a.path}:`,a.manualEdit);const B=JSON.parse(a.manualEdit);S[I]=B,console.log(`Édition manuelle appliquée avec succès pour ${a.path}`)}catch(B){console.warn(`Échec du parsing de l'édition manuelle pour ${a.path}:`,B),console.log("Contenu de l'édition manuelle:",a.manualEdit),a.selectedVersion==="ours"?a.ourValue!==void 0?(console.log(`Fallback à notre version pour ${a.path}`),S[I]=a.ourValue):(console.log(`Suppression de ${a.path} car notre version est undefined`),delete S[I]):a.theirValue!==void 0?(console.log(`Fallback à leur version pour ${a.path}`),S[I]=a.theirValue):(console.log(`Suppression de ${a.path} car leur version est undefined`),delete S[I])}else console.log(`Pas d'édition manuelle pour ${a.path}, utilisation de la version ${a.selectedVersion}`),a.selectedVersion==="ours"?a.ourValue!==void 0?(S[I]=a.ourValue,console.log(`Utilisé notre version pour ${a.path}`)):(delete S[I],console.log(`Supprimé ${a.path} car notre version est undefined`)):a.theirValue!==void 0?(S[I]=a.theirValue,console.log(`Utilisé leur version pour ${a.path}`)):(delete S[I],console.log(`Supprimé ${a.path} car leur version est undefined`))}catch(g){console.error(`Erreur lors du traitement du conflit JSON à l'index ${b}:`,g)}}),i.value){const a=JSON.stringify(s,null,2);i.value.resolution=a,console.log("Résolution JSON finale mise à jour:",a.substring(0,100)+"...")}}catch(l){console.error("Erreur lors de la mise à jour de la résolution JSON:",l)}}Y(()=>{if(!i.value||!i.value.resolution)return{};try{return JSON.parse(i.value.resolution)}catch{return{}}});async function N(l){if(!l)return!1;try{if(console.log("Affichage du conflit:",{id:l.id,filename:l.filename,hasOriginal:!!l.original,originalLength:l.original?l.original.length:0,hasOurVersion:!!l.ourVersion,hasTheirVersion:!!l.theirVersion}),!l.original)return console.error(`Impossible d'afficher le conflit: champ "original" manquant`),A.next("error","Impossible d'afficher ce conflit: données originales manquantes"),!1;const s=x(l.ourVersion,l.theirVersion),a=s.length>0,[b,g]=v(l.ourVersion,l.theirVersion);return i.value={...l,chunks:b,mergedDisplay:g,resolution:l.resolution||l.ourVersion,jsonConflicts:a?s:void 0,isJson:a},o.value=!0,setTimeout(()=>{var S;h(),a&&((S=i.value)!=null&&S.jsonConflicts)&&console.log("Configuration de l'interface pour les conflits JSON")},300),!0}catch(s){return console.error("Erreur lors de l'affichage du conflit:",s),A.next("error",`Échec de l'affichage du conflit: ${Ce(s)}`),!1}}function z(){var l;try{const s=(l=i.value)==null?void 0:l.id;console.log(`Fermeture de la modal pour le conflit ${s||"inconnu"}`),o.value=!1,i.value=null}catch(s){console.error("Erreur lors de la fermeture de la modal:",s)}}async function q(){try{await se(),A.next("success","Liste des conflits rafraîchie")}catch(l){console.error("Erreur lors du rafraîchissement des conflits:",l),A.next("error","Erreur lors du rafraîchissement des conflits")}}async function Z(){try{A.next("success","Redémarrage de l'application en cours...","Veuillez patienter"),await M.restartApplication()}catch(l){console.error("Erreur lors du redémarrage de l'application:",l);const s=l instanceof Error?l.message:String(l);A.next("error",`Erreur lors du redémarrage: ${s}`)}}async function H(){console.log("Début de la résolution du conflit");const l=document.querySelector('button[label="Resolve and save"]');l&&l.setAttribute("disabled","disabled");try{const s=i.value?{...i.value}:null;if(!s){console.error("Impossible de résoudre : conflit est null"),A.next("error","Impossible de résoudre ce conflit. Données manquantes.");return}if(!s.resolution){console.error("Impossible de résoudre : résolution manquante"),A.next("error","Impossible de résoudre ce conflit. Résolution manquante.");return}if(!s.original){console.error("Impossible de résoudre : données originales manquantes"),A.next("error","Impossible de résoudre ce conflit. Données originales manquantes.");return}const a=s.id;console.log(`Résolution du conflit ${a} avec une copie sécurisée`);const b={conflictId:a,resolution:s.resolution,original:s.original};if(s.isJson&&s.resolution)try{const g=JSON.parse(s.resolution);if(s.filename&&s.filename.includes("/service/")&&g&&!g.label){console.error("Service sans label détecté lors de la résolution:",g),A.next("error",`Le service doit avoir une propriété "label". Veuillez l'ajouter manuellement.`);return}b.resolution=JSON.stringify(g)}catch(g){console.error("Erreur de parsing JSON:",g),A.next("error","Le format JSON de la résolution est invalide");return}console.log("Envoi de la résolution au serveur:",b);try{const g=await ae.post("/crypto/resolve-conflict",b);console.log("Réponse du serveur après résolution:",g.data),A.next("success","Conflit résolu avec succès, redémarrage de l'application..."),i.value&&i.value.id===a&&(console.log(`Fermeture du conflit ${a} après résolution`),o.value=!1,i.value=null),await se(),setTimeout(async()=>{try{await Z()}catch(S){console.error("Erreur lors du redémarrage:",S)}},1e3);try{let S=null;if(s.filename&&s.filename.includes("/service/")){const I=s.filename.split("/"),W=I[I.length-1].replace(".encrypted.json","");console.log(`Attempting to restart service: ${W}`);try{const De=(await M.loadServices()).find(Ze=>Ze.label===W);De?(console.log(`Service found for restart: ${W}`),await De.restart(),A.next("success",`Service ${W} restarted successfully`)):console.log(`No service found with name: ${W}`)}catch(Pe){console.error(`Error while searching/restarting service ${W}:`,Pe)}}else console.log("The file is not associated with a specific service, no restart needed")}catch(S){console.error("Error while attempting to restart the service:",S)}console.log("Immediate processing of the next conflict after resolution"),ie()}catch(g){throw console.error("Error during server request:",g),g}}catch(s){console.error("Error during conflict resolution:",s);let a="Error during conflict resolution";typeof s=="object"&&s!==null&&"response"in s&&s.response&&typeof s.response=="object"&&"data"in s.response&&s.response.data&&typeof s.response.data=="object"&&"message"in s.response.data?a=String(s.response.data.message):s instanceof Error&&(a=`${s.name}: ${s.message}`),A.next("error",a)}finally{l&&l.removeAttribute("disabled")}}async function ie(){if(console.log("Processing next conflict. Queue size:",u.value.length,"isVisible:",o.value),o.value||u.value.length===0){console.log("No conflict to process: modal already visible or empty queue");return}try{if(u.value.length===0){console.log("The queue is empty, nothing to process");return}const l={...u.value[0]};if(!l.id||!l.original){console.error("Invalid conflict found in the queue, ignored"),u.value.shift(),setTimeout(ie,50);return}console.log("Preparing to display the next conflict:",l.id),await N(l)?(console.log("Conflict displayed successfully, removing from queue"),u.value.shift()):(console.error("Failed to display conflict, it remains in the queue"),u.value.shift(),setTimeout(ie,200))}catch(l){console.error("Erreur lors du traitement du prochain conflit:",l),A.next("error",`Erreur lors du traitement du conflit: ${Ce(l)}`),u.value.length>0&&(u.value.shift(),setTimeout(ie,300))}}ee(async()=>{console.log("GitConflictModal mounted"),setTimeout(()=>{const s=document.querySelector(".conflict-dialog .p-dialog-content");s&&(console.log("Adding click event listener to modal content for debugging"),s.addEventListener("click",a=>{console.log("Click detected in modal content",{target:a.target,currentTarget:a.currentTarget,classes:a.target instanceof HTMLElement?Array.from(a.target.classList):[],id:a.target instanceof HTMLElement?a.target.id:null,tagName:a.target instanceof HTMLElement?a.target.tagName:null})}))},1e3);const l=new MutationObserver(s=>{for(const a of s)if(a.type==="attributes"&&a.attributeName==="class"){const b=document.querySelector(".conflict-dialog");b&&b.classList.contains("p-dialog-visible")&&(console.log("Modal is now visible - setting up click debugging"),document.querySelectorAll(".json-value").forEach(S=>{if(S instanceof HTMLElement){S.addEventListener("click",B=>{console.log("Direct click on json-value:",{element:S,classes:Array.from(S.classList),version:S.getAttribute("data-version"),index:S.getAttribute("data-index")})}),S.style.position="relative";const I=document.createElement("div");I.innerText="👆 Clickable",I.style.position="absolute",I.style.top="0",I.style.right="0",I.style.background="rgba(255,0,0,0.2)",I.style.color="white",I.style.padding="2px 5px",I.style.fontSize="10px",I.style.borderRadius="3px",S.appendChild(I)}}),l.disconnect())}});l.observe(document.body,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["class"]}),i.value=null,o.value=!1,u.value=[],await se(),V.on("crypto:conflict-resolved",async s=>{var a;try{if(console.log("Event crypto:conflict-resolved received:",s),!s||!s.conflictId){console.warn("Resolution event received without conflict ID");return}const b=s.conflictId,g=(a=i.value)==null?void 0:a.id;o.value&&g===b?(console.log(`Closing conflict ${b} following external resolution`),o.value=!1,i.value=null):console.log(`The resolved conflict ${b} is not currently displayed (displayed: ${g})`);const I=u.value.filter(W=>W.id!==b),B=u.value.length-I.length;B>0&&(console.log(`${B} conflict(s) removed from the queue`),u.value=I),await se(),!o.value&&u.value.length>0&&(console.log("Scheduling processing of the next conflict"),setTimeout(ie,200))}catch(b){console.error("Error while processing conflict-resolved event:",b)}}),V.on("crypto:conflict",async s=>{try{if(!s||!s.id){console.warn("New conflict event received without valid data");return}console.log("New conflict detected:",s.id),await se(),s&&s.id&&s.original&&Se(s)}catch(a){console.error("Error while processing a new conflict:",a)}})}),dt(()=>{console.log("GitConflictModal unmounted"),V.off("crypto:conflict-resolved"),V.off("crypto:conflict")});async function se(){try{const{data:l}=await ae.get("/crypto/pending-conflicts");if(console.log("Conflicts retrieved from server:",l?l.length:0),Array.isArray(l)&&l.length>0){console.log("Details of retrieved conflicts:",l.map(a=>({id:a.id,filename:a.filename,hasOriginal:!!a.original,hasOurVersion:!!a.ourVersion,hasTheirVersion:!!a.theirVersion})));const s=l.filter(a=>!a.id||!a.original?(console.warn("Invalid conflict ignored (id or original missing):",a.id),!1):((!a.ourVersion||!a.theirVersion)&&console.warn("Conflict with missing versions:",a.id),!0));s.forEach(a=>{Se(a)}),s.length>0&&A.next("error",`${s.length} Git conflict(s) pending resolution`,"Git Conflicts")}}catch(l){console.error("Error while retrieving pending conflicts:",l),A.next("error",`Error while retrieving conflicts: ${Ce(l)}`)}}function Ce(l){if(!l)return"Unknown error";if(typeof l=="object"&&l!==null){if("response"in l&&l.response&&typeof l.response=="object"&&"data"in l.response&&l.response.data&&typeof l.response.data=="object"&&"message"in l.response.data)return String(l.response.data.message);if("message"in l&&typeof l.message=="string")return l.message}try{return String(l)}catch{return"Unknown error"}}function Se(l){console.log("Adding a new conflict to the queue:",l.id),u.value.push(l),ie()}function Qe(){}function Ye(l){if(!i.value){console.error("updateManualEditForConflict: currentConflict.value is null");return}if(!i.value.jsonConflicts){console.error("updateManualEditForConflict: jsonConflicts is null");return}if(l<0||l>=i.value.jsonConflicts.length){console.error(`updateManualEditForConflict: invalid index ${l}, jsonConflicts length: ${i.value.jsonConflicts.length}`);return}const s=i.value.jsonConflicts[l];if(!s){console.error(`updateManualEditForConflict: conflict at index ${l} is null`);return}try{s.manualEdit!==void 0&&T()}catch(a){console.error(`Error while updating manual edit for index ${l}:`,a)}}function Me(l,s){if(!i.value){console.error("useVersionInManualEdit: currentConflict.value is null");return}if(!i.value.jsonConflicts){console.error("useVersionInManualEdit: jsonConflicts is null");return}if(l<0||l>=i.value.jsonConflicts.length){console.error(`useVersionInManualEdit: invalid index ${l}, jsonConflicts length: ${i.value.jsonConflicts.length}`);return}const a=i.value.jsonConflicts[l];if(!a){console.error(`useVersionInManualEdit: conflict at index ${l} is null`);return}try{console.log(`Using version ${s} for manual edit at index ${l}`);const b=s==="ours"?a.ourValue:a.theirValue;a.manualEdit=C(b),a.selectedVersion=s,console.log(`Manual edit updated with version ${s}:`,a.manualEdit),T()}catch(b){console.error(`Error while updating manual version for index ${l}:`,b)}}return e({addConflict:Se,showConflict:N,resolveConflict:H,closeModal:z,refreshConflicts:q,processNextConflict:ie,fetchPendingConflicts:se}),we(o,l=>{l&&i.value&&(console.log("Modal displayed, setting up event listeners"),he(()=>{h()}))}),we(()=>{var l;return(l=i.value)==null?void 0:l.id},(l,s)=>{l&&l!==s&&(console.log(`New conflict displayed (${l}), setting up event listeners`),he(()=>{h()}))}),(l,s)=>(p(),R(D(ue),{visible:o.value,"onUpdate:visible":s[1]||(s[1]=a=>o.value=a),modal:!0,closable:!0,style:{width:"95vw"},maximizable:!0,header:"Git Conflict Resolution",class:"conflict-dialog"},{footer:_(()=>[f("div",Lo,[f("div",$o,[w(D(K),{label:"Cancel",icon:"pi pi-times",onClick:z,class:"p-button-text"}),w(D(K),{label:"Refresh",icon:"pi pi-refresh",onClick:q,class:"p-button-outlined"}),w(D(K),{label:"Resolve and save",icon:"pi pi-check",onClick:H,disabled:!i.value||!i.value.resolution||!i.value.original},null,8,["disabled"])])])]),default:_(()=>[i.value&&i.value.id?(p(),y("div",ao,[f("div",uo,[i.value.filename?(p(),y("div",co,[s[2]||(s[2]=f("i",{class:"pi pi-file"},null,-1)),f("span",null,O(i.value.filename),1)])):$("",!0),f("div",fo,[w(D(K),{label:"Keep all your versions",icon:"pi pi-user",class:"p-button-outlined p-button-success",onClick:d}),w(D(K),{label:"Keep all their versions",icon:"pi pi-users",class:"p-button-outlined p-button-info",onClick:c})])]),i.value.isJson&&i.value.jsonConflicts&&i.value.jsonConflicts.length>0?(p(),y("div",vo,[s[9]||(s[9]=f("h3",null,"Conflicts detected in JSON",-1)),f("div",po,[(p(!0),y(P,null,J(i.value.jsonConflicts,(a,b)=>(p(),y("div",{key:a.path||b,class:"json-conflict-item"},[f("div",mo,[f("div",ho,[s[3]||(s[3]=f("i",{class:"pi pi-key"},null,-1)),f("span",null,O(a.path||"Unknown path"),1)]),f("div",go,[w(D(K),{label:"Use your version",size:"small",class:"p-button-sm p-button-text",onClick:g=>Me(b,"ours")},null,8,["onClick"]),w(D(K),{label:"Use remote version",size:"small",class:"p-button-sm p-button-text",onClick:g=>Me(b,"theirs")},null,8,["onClick"])])]),f("div",yo,[f("div",bo,[f("div",{class:F(["json-value our-value",{selected:a.selectedVersion==="ours"}]),onClick:g=>k(b,"ours"),"data-version":"ours","data-index":b},[s[4]||(s[4]=f("div",{class:"json-value-header"},[f("span",{class:"legend-color your-version"}),f("span",null,"Your version")],-1)),f("pre",wo,O(C(a.ourValue)),1),s[5]||(s[5]=f("div",{class:"select-overlay"},"Click to select your version",-1))],10,ko),f("div",{class:F(["json-value their-value",{selected:a.selectedVersion==="theirs"}]),onClick:g=>k(b,"theirs"),"data-version":"theirs","data-index":b},[s[6]||(s[6]=f("div",{class:"json-value-header"},[f("span",{class:"legend-color their-version"}),f("span",null,"Remote version")],-1)),f("pre",So,O(C(a.theirValue)),1),s[7]||(s[7]=f("div",{class:"select-overlay"},"Click to select remote version",-1))],10,Co)]),f("div",Io,[s[8]||(s[8]=f("div",{class:"manual-edit-header"},[f("h4",null,"Manual editing (final)"),f("span",{class:"manual-edit-info"},"This value will be used with priority for resolution")],-1)),w(D(Re),{modelValue:a.manualEdit,"onUpdate:modelValue":g=>a.manualEdit=g,class:"manual-edit-area",onInput:g=>Ye(b),autoResize:!0},null,8,["modelValue","onUpdate:modelValue","onInput"])])])]))),128))])])):(p(),y("div",_o,[f("div",Eo,[f("div",xo,[s[10]||(s[10]=f("div",{class:"column-header"},[f("h4",null,"Differences")],-1)),f("div",Vo,[i.value.mergedDisplay?(p(),y("div",{key:0,class:"interactive-editor",innerHTML:i.value.mergedDisplay},null,8,To)):$("",!0)])]),f("div",Ao,[s[12]||(s[12]=f("div",{class:"column-header"},[f("h4",null,"Manual editing")],-1)),f("div",Oo,[s[11]||(s[11]=f("div",{class:"manual-edit-header"},[f("h4",null,"Manual editing (final)"),f("span",{class:"manual-edit-info"},"This value will be used with priority for resolution")],-1)),w(D(Re),{modelValue:i.value.resolution,"onUpdate:modelValue":s[0]||(s[0]=a=>i.value.resolution=a),class:"manual-edit-area",onInput:Qe,autoResize:!0},null,8,["modelValue"])])])])]))])):o.value?(p(),y("div",jo,s[13]||(s[13]=[f("p",null,"No conflict to display or incomplete data.",-1)]))):$("",!0)]),_:1},8,["visible"]))}},Po=G(Mo,[["__scopeId","data-v-43eafe4e"]]),Do={__name:"PluginDev",setup(t){const e=E(null),n=E(!1),o=E(null);return V.on("plugins:front:changed",i=>{console.log(`🔄 Plugin ${i} changed, reloading page...`),n.value=!1,o.value=null,document.location.reload()}),V.on("plugins:front:building",i=>{console.log(`🔄 Plugin ${i} building...`),o.value=i,n.value=!0}),(i,u)=>(p(),y("div",null,[w(D(ue),{ref_key:"modalBuildingRef",ref:e,visible:n.value,"onUpdate:visible":u[0]||(u[0]=v=>n.value=v),closable:!1,modal:!0},{default:_(()=>[f("h1",null,"Plugin "+O(o.value)+" is building...",1)]),_:1},8,["visible"])]))}},No={class:"error-header"},Ro={__name:"PluginInstallError",setup(t){const e=E([]),n=E({plugin:null,step:null});function o(r){return{INSTALL_BACKEND_START:"Installing backend",LOAD_BACKEND_START:"Loading backend",CLEAR_CACHE:"Clearing cache",REQUIRE_BACKEND:"Requiring backend",INSTALL_START:"Installing plugin"}[r]||r}const i=r=>{console.log("closeError",r),e.value.splice(e.value.indexOf(r),1)},u=()=>{n.value={plugin:null,step:null}},v=r=>{const{plugin:m,step:h}=r;n.value={plugin:m,step:h}},d=(r,m)=>{e.value.push({id:crypto.randomUUID(),pluginName:r,error:m,message:`An error occurred while installing the plugin ${r}`,header:"Error while installing plugin"})},c=r=>{e.value.push({id:crypto.randomUUID(),error:r,message:"A critical error occurred",header:"Critical Error"})};return ee(()=>{V.on("plugins:install:error",d),V.on("plugins:loading:error",d),V.on("critical:error",c),V.on("plugins:loading:progress",v)}),Le(()=>{V.off("plugins:install:error",d),V.off("plugins:loading:error",d),V.off("critical:error",c),V.off("plugins:loading:progress",v)}),(r,m)=>(p(),y(P,null,[(p(!0),y(P,null,J(e.value,h=>(p(),R(D(ue),{visible:!0,modal:!0,key:h.id,"onUpdate:visible":x=>i(h)},{header:_(()=>[f("h2",No,[m[1]||(m[1]=f("i",{class:"fas fa-exclamation-triangle"},null,-1)),U(" "+O(h.header),1)])]),default:_(()=>[f("p",null,O(h.message),1),f("pre",null,O(h.error),1)]),_:2},1032,["onUpdate:visible"]))),128)),w(D(ue),{visible:!!n.value.step,modal:!0,"onUpdate:visible":m[0]||(m[0]=h=>u())},{header:_(()=>[f("h2",null,O(n.value.plugin),1)]),default:_(()=>[f("p",null,O(o(n.value.step)),1)]),_:1},8,["visible"])],64))}},zo=G(Ro,[["__scopeId","data-v-ea51820a"]]),qe=et.filter(t=>t.load).reduce((t,{cmp:e,name:n})=>(t[n]=e,t),{}),Bo={components:{sidebar:Ut,Notifications:en,NotifHistory:ln,SidebarViewMode:Zn,EnvironmentsChooser:to,GitConflictModal:Po,Splitter:bt,SplitterPanel:yt,Button:K,PluginDev:Do,PluginInstallError:zo,...qe},setup(){(async()=>{const k=await M.getAdditionalThemes().catch(T=>(console.error(T),{}));be.load(k)})();const t=le(),e=E(!0),n=E(null),o=E(null),i=E([]),u=async()=>{e.value=V.socket.connected,e.value||(M.services.value=[]),(t.currentRoute.value.fullPath.startsWith("/stack-single")||t.currentRoute.value.fullPath.startsWith("/stack-multiple"))&&t.push({name:"stack-chooser"}),await M.shouldSetup()&&t.push({name:"settings",params:{setting:"crypto"},query:{wrongKey:"true"}})},v=()=>{console.log("reload"),window.location.reload()},d=()=>t.push({name:"settings",params:{setting:"crypto"},query:{wrongKey:"true"}});ee(async()=>{V.on("connect",u),V.on("disconnect",u),V.on("forceReload",v),V.on("system:wrongKey",d),V.on("plugins:installed",v),V.on("plugins:uninstalled",v),V.on("crypto:conflict",c),await u(),setTimeout(()=>{o.value&&typeof o.value.fetchPendingConflicts=="function"?(o.value.fetchPendingConflicts(),i.value.length>0&&(console.log(`Traitement de ${i.value.length} conflits en attente...`),i.value.forEach(k=>{o.value&&typeof o.value.addConflict=="function"&&o.value.addConflict(k)}),i.value=[])):console.warn("GitConflictModal n'est pas correctement initialisé, impossible de récupérer les conflits en attente.")},500)}),Le(()=>{V.off("crypto:conflict",c),V.off("plugins:installed",v),V.off("plugins:uninstalled",v),V.off("forceReload",v),V.off("system:wrongKey",d)});function c(k){if(o.value&&typeof o.value.addConflict=="function"){o.value.addConflict(k),A.next("error","Conflit Git détecté dans un fichier chiffré","Conflit Git");return}console.log("GitConflictModal n'est pas encore prêt, nouvelle tentative dans 500ms..."),setTimeout(()=>{o.value&&typeof o.value.addConflict=="function"?(o.value.addConflict(k),A.next("error","Conflit Git détecté dans un fichier chiffré","Conflit Git")):(console.error("Impossible d'ajouter le conflit Git: le composant GitConflictModal n'est pas correctement initialisé."),i.value.push(k),A.next("error","Conflit Git détecté mais l'interface n'est pas prête. Rechargez la page pour le résoudre.","Conflit Git"))},500)}let r=E({local:"",remote:"",hasUpdate:!1});ee(async()=>{var k;r.value=await re.hasUpdate(),(k=r.value)!=null&&k.hasUpdate&&A.next("error",`Update available: ${r.value.local} => ${r.value.remote}`)});const m=E(40),h=E(!1),x=E(null),j=E(!1);we(j,()=>{h.value&&(j.value?C(m.value):C(0))});const C=k=>{var z,q;const T=(z=n.value)==null?void 0:z.$el,N=(q=x.value)==null?void 0:q.$el;!T||!N||(T.style["flex-basis"]=`calc(${k}%)`,T.style.transition="100ms",T.style["will-change"]="flex-basis",N.style["flex-basis"]=`calc(${100-k}%)`,N.style.transition="100ms",N.style["will-change"]="flex-basis",k===0?T.style["min-width"]="0px":T.style["min-width"]="160px",setTimeout(()=>{T.style.transition="0ms",N.style.transition="0ms"},300))};return{componentsToLoad:E(Object.keys(qe)),redirect:u,connected:e,githubIssue:qt,versions:r,gitConflictModalRef:o,sidebarPanelRef:n,mainPanelRef:x,isMinimized:h,mouseInAnchor:j,toggleMinimized:()=>{h.value=!h.value;const k=h.value?0:m.value;C(k)},debouncedMouseInAnchor:kt(k=>{j.value=k},75)}}},Uo={key:0,id:"app-container"},Jo={id:"app"},qo={key:0,class:"fas fa-thumbtack"},Ko={key:1,class:"fas fa-chevron-right"},Fo={class:"main"},Go={key:2,class:"main"},Wo={key:1,class:"not-connected"},Ho=["href"];function Qo(t,e,n,o,i,u){var q,Z;const v=L("sidebar-view-mode"),d=L("sidebar"),c=L("SplitterPanel"),r=L("Button"),m=L("router-view"),h=L("Splitter"),x=L("EnvironmentsChooser"),j=L("PluginDev"),C=L("Finder"),k=L("notif-history"),T=L("notifications"),N=L("GitConflictModal"),z=L("PluginInstallError");return p(),y(P,null,[o.connected?(p(),y("div",Uo,[f("div",Jo,[["stack-chooser","import-create"].includes(((q=t.$route.name)==null?void 0:q.toString())||"")?$("",!0):(p(),R(v,{key:0})),["stack-single","stack-single-no-view"].includes(((Z=t.$route.name)==null?void 0:Z.toString())||"")?(p(),R(h,{key:1,class:"splitter",pt:{gutter:{style:{width:o.isMinimized?"0px":"5px"}}}},{default:_(()=>[w(c,{ref:"sidebarPanelRef",style:{minWidth:"160px",maxWidth:"660px"},size:20,onMouseenter:e[0]||(e[0]=H=>o.debouncedMouseInAnchor(!0)),onMouseleave:e[1]||(e[1]=H=>o.debouncedMouseInAnchor(!1))},{default:_(()=>[w(d,{onToggleMinimized:o.toggleMinimized,"is-minimized":o.isMinimized},null,8,["onToggleMinimized","is-minimized"])]),_:1},512),w(c,{ref:"mainPanelRef",class:"main-panel",size:80},{default:_(()=>[w(r,{class:F(["maximize",{"mouse-in-anchor":o.mouseInAnchor}]),style:Q({display:o.isMinimized?"flex":"none"}),pt:{root:{style:{margin:"0",borderRadius:"0"}}},onMouseenter:e[2]||(e[2]=H=>o.debouncedMouseInAnchor(!0)),onMouseleave:e[3]||(e[3]=H=>o.debouncedMouseInAnchor(!1)),onClick:ft(o.toggleMinimized,["stop"])},{default:_(()=>[o.isMinimized?(p(),y(P,{key:0},[o.mouseInAnchor?(p(),y("i",qo)):(p(),y("i",Ko))],64)):$("",!0)]),_:1},8,["class","style","onClick"]),f("div",Fo,[w(m)])]),_:1},512)]),_:1},8,["pt"])):(p(),y("div",Go,[w(m)]))]),w(x),w(j)])):(p(),y("div",Wo,[e[4]||(e[4]=U(" Server is not connected or has crashed ")),e[5]||(e[5]=f("br",null,null,-1)),e[6]||(e[6]=U(" Try to restart it or fill an issue: ")),e[7]||(e[7]=f("br",null,null,-1)),e[8]||(e[8]=f("br",null,null,-1)),f("a",{href:o.githubIssue,target:"_blank"},"Click here",8,Ho)])),(p(!0),y(P,null,J(o.componentsToLoad,H=>(p(),R(ge(H)))),256)),w(C),w(k),w(T),w(N,{ref:"gitConflictModalRef"},null,512),w(z)],64)}const yi=G(Bo,[["render",Qo],["__scopeId","data-v-7179e5a8"]]);export{yi as default};
@@ -1 +1 @@
1
- import{a as k,n as g}from"./router-BmEvmcw4.js";import{_ as x}from"./Section-DWZalQSy.js";import{S as N}from"./Spinner-BDdyfVPn.js";import{s as S}from"./index-LXuPKlr_.js";import{_ as V}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{l as f,a as r,o as i,e as h,s as B,g as w,f as I,d as F,F as y,q as M,n as O,b as C,t as u,u as P,r as p,j as T,w as b}from"./index-CnHkskP1.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./Editor-BUC6Zjcy.js";import"./index-CED4m1pl.js";import"./index-r5zB7DkH.js";const j={components:{sectionCmp:x,spinner:N,Select:S},props:{service:{default:null,required:!0,type:k},isInMultiMode:{type:Boolean}},setup(o){const n=p([]),t=p(!1),e=p([]),c=p(),d=async()=>{o.service&&(e.value=await o.service.getNpmPaths(),c.value||(c.value=e.value[0]))};return T(d),b(()=>o.service,d),{reload:d,launch:async()=>{n.value=[],t.value=!0,n.value=await o.service.getBugs(c.value).catch(a=>{var m,l,s,_;return((l=(m=a==null?void 0:a.response)==null?void 0:m.data)==null?void 0:l.code)==="TSC_NOT_FOUND"&&g.next("error",'Please "npm i -g typescript"'),((_=(s=a==null?void 0:a.response)==null?void 0:s.data)==null?void 0:_.code)==="JSCONFIG_NOT_FOUND"&&g.next("error","Please create a jsconfig.json in project"),[]}).finally(()=>{t.value=!1})},npmPaths:e,cwd:c,loading:t,bugs:n,openInVsCode(a){o.service.openLinkInVsCode(a.path)}}}},z={key:0,class:"loading"},D={key:1,class:"bugs"},L=["onClick"],U={class:"message"};function q(o,n,t,e,c,d){var l;const v=f("Select"),a=f("spinner"),m=f("section-cmp");return i(),r(y,null,[h(v,{modelValue:e.cwd,"onUpdate:modelValue":n[0]||(n[0]=s=>e.cwd=s),options:e.npmPaths,style:{marginBottom:"10px"}},null,8,["modelValue","options"]),t.service?(i(),B(m,{key:t.service.label,header:"Bugs("+(((l=e.bugs)==null?void 0:l.length)||0)+")",class:"bug-root",style:P({maxHeight:t.isInMultiMode?"400px":"inherit"}),actions:[{label:"Launch",icon:"fas fa-play",click:()=>e.launch(),hidden:e.loading}]},{default:I(()=>[e.loading?(i(),r("div",z,[h(a,{size:40}),n[1]||(n[1]=F(" Analyse en cours "))])):(i(),r("div",D,[(i(!0),r(y,null,M(e.bugs,s=>(i(),r("div",{class:O(["bug",s.category]),key:s},[C("div",{class:"path",onClick:_=>e.openInVsCode(s)},u(s.fileName)+"("+u(s.line)+","+u(s.column)+")",9,L),C("div",U,u(s.messageText),1)],2))),128))]))]),_:1},8,["header","style","actions"])):w("",!0)],64)}const Y=V(j,[["render",q],["__scopeId","data-v-6048e2b3"]]);export{Y as default};
1
+ import{a as k,n as g}from"./router-6vVxI5YF.js";import{_ as x}from"./Section-lgKMkAwG.js";import{S as N}from"./Spinner-CUHDMnpi.js";import{s as S}from"./index-BgXIYHf3.js";import{_ as V}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{l as f,a as r,o as i,e as h,s as B,g as w,f as I,d as F,F as y,q as M,n as O,b as C,t as u,u as P,r as p,j as T,w as b}from"./index-C02AjRq4.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./Editor-DN-ZxIRY.js";import"./index-DNGpCJ06.js";import"./index-CDIN4LjQ.js";const j={components:{sectionCmp:x,spinner:N,Select:S},props:{service:{default:null,required:!0,type:k},isInMultiMode:{type:Boolean}},setup(o){const n=p([]),t=p(!1),e=p([]),c=p(),d=async()=>{o.service&&(e.value=await o.service.getNpmPaths(),c.value||(c.value=e.value[0]))};return T(d),b(()=>o.service,d),{reload:d,launch:async()=>{n.value=[],t.value=!0,n.value=await o.service.getBugs(c.value).catch(a=>{var m,l,s,_;return((l=(m=a==null?void 0:a.response)==null?void 0:m.data)==null?void 0:l.code)==="TSC_NOT_FOUND"&&g.next("error",'Please "npm i -g typescript"'),((_=(s=a==null?void 0:a.response)==null?void 0:s.data)==null?void 0:_.code)==="JSCONFIG_NOT_FOUND"&&g.next("error","Please create a jsconfig.json in project"),[]}).finally(()=>{t.value=!1})},npmPaths:e,cwd:c,loading:t,bugs:n,openInVsCode(a){o.service.openLinkInVsCode(a.path)}}}},z={key:0,class:"loading"},D={key:1,class:"bugs"},L=["onClick"],U={class:"message"};function q(o,n,t,e,c,d){var l;const v=f("Select"),a=f("spinner"),m=f("section-cmp");return i(),r(y,null,[h(v,{modelValue:e.cwd,"onUpdate:modelValue":n[0]||(n[0]=s=>e.cwd=s),options:e.npmPaths,style:{marginBottom:"10px"}},null,8,["modelValue","options"]),t.service?(i(),B(m,{key:t.service.label,header:"Bugs("+(((l=e.bugs)==null?void 0:l.length)||0)+")",class:"bug-root",style:P({maxHeight:t.isInMultiMode?"400px":"inherit"}),actions:[{label:"Launch",icon:"fas fa-play",click:()=>e.launch(),hidden:e.loading}]},{default:I(()=>[e.loading?(i(),r("div",z,[h(a,{size:40}),n[1]||(n[1]=F(" Analyse en cours "))])):(i(),r("div",D,[(i(!0),r(y,null,M(e.bugs,s=>(i(),r("div",{class:O(["bug",s.category]),key:s},[C("div",{class:"path",onClick:_=>e.openInVsCode(s)},u(s.fileName)+"("+u(s.line)+","+u(s.column)+")",9,L),C("div",U,u(s.messageText),1)],2))),128))]))]),_:1},8,["header","style","actions"])):w("",!0)],64)}const Y=V(j,[["render",q],["__scopeId","data-v-6048e2b3"]]);export{Y as default};
@@ -1,4 +1,4 @@
1
- import{S as be,n as ae,v as $t,a as Ut,u as Rt}from"./router-BmEvmcw4.js";import{s as Bt}from"./index-BykKOUV5.js";import{s as j,a as Gt}from"./index-BYlmWHqo.js";import{a as Nt,R as qt,b as Ht,c as Wt,s as ee}from"./index-r5zB7DkH.js";import{a as St,b as Ce,f as _e,g as It,P as Be,s as nt,h as Yt,d as Zt,c as Jt,e as Qt}from"./index-D7eodgey.js";import{a as Xt,c as en,O as tn,s as Ge}from"./index-LXuPKlr_.js";import{s as ot}from"./index-D6ITaiDq.js";import{b as me,s as nn}from"./index-BvK3ngOF.js";import{s as ge,c as Fe,a as on}from"./index-CED4m1pl.js";import{B as pe,a as O,o as p,h as Z,I as z,V as rt,c as Te,aC as sn,j as we,i as xt,aD as We,aE as Ye,aF as ln,aG as Vt,aH as ut,r as G,w as it,aI as $e,aJ as an,O as Ue,s as D,f as V,H as Re,y as Ne,b as o,g as N,t as q,aK as Ze,D as rn,E as ve,aL as un,aq as dn,ar as cn,as as pn,at as fn,au as vn,av as Je,aw as mn,aM as xe,l as B,G as De,e as f,u as _t,n as ce,F as Y,q as Q,T as hn,J as bn,m as J,d as ie,L as C,p as de,k as Pe,x as se,S as ze,K as yn,v as gn}from"./index-CnHkskP1.js";import{_ as wn}from"./Section-DWZalQSy.js";import{M as On}from"./Modal-CMVKUmmz.js";import"./lodash-D2RHCRSL.js";import{_ as ue}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{E as kn}from"./Editor-BUC6Zjcy.js";import"./_commonjsHelpers-D6-XlEtG.js";var Cn={root:"p-tabpanels"},$n=pe.extend({name:"tabpanels",classes:Cn}),Sn={name:"BaseTabPanels",extends:ge,props:{},style:$n,provide:function(){return{$pcTabPanels:this,$parentInstance:this}}},Et={name:"TabPanels",extends:Sn,inheritAttrs:!1};function In(t,e,n,i,c,s){return p(),O("div",z({class:t.cx("root"),role:"presentation"},t.ptmi("root")),[Z(t.$slots,"default")],16)}Et.render=In;function ye(t){"@babel/helpers - typeof";return ye=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ye(t)}function dt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(c){return Object.getOwnPropertyDescriptor(t,c).enumerable})),n.push.apply(n,i)}return n}function Qe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?dt(Object(n),!0).forEach(function(i){Tt(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):dt(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Tt(t,e,n){return(e=xn(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function xn(t){var e=Vn(t,"string");return ye(e)=="symbol"?e:e+""}function Vn(t,e){if(ye(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(ye(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function le(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */le=function(){return e};var t,e={},n=Object.prototype,i=n.hasOwnProperty,c=typeof Symbol=="function"?Symbol:{},s=c.iterator||"@@iterator",g=c.asyncIterator||"@@asyncIterator",_=c.toStringTag||"@@toStringTag";function x(v,r,u,k){return Object.defineProperty(v,r,{value:u,enumerable:!k,configurable:!k,writable:!k})}try{x({},"")}catch{x=function(u,k,I){return u[k]=I}}function M(v,r,u,k){var I=r&&r.prototype instanceof h?r:h,F=Object.create(I.prototype);return x(F,"_invoke",function(W,X,R){var H=1;return function(ne,oe){if(H===3)throw Error("Generator is already running");if(H===4){if(ne==="throw")throw oe;return{value:t,done:!0}}for(R.method=ne,R.arg=oe;;){var Oe=R.delegate;if(Oe){var fe=$(Oe,R);if(fe){if(fe===P)continue;return fe}}if(R.method==="next")R.sent=R._sent=R.arg;else if(R.method==="throw"){if(H===1)throw H=4,R.arg;R.dispatchException(R.arg)}else R.method==="return"&&R.abrupt("return",R.arg);H=3;var re=A(W,X,R);if(re.type==="normal"){if(H=R.done?4:2,re.arg===P)continue;return{value:re.arg,done:R.done}}re.type==="throw"&&(H=4,R.method="throw",R.arg=re.arg)}}}(v,u,new L(k||[])),!0),F}function A(v,r,u){try{return{type:"normal",arg:v.call(r,u)}}catch(k){return{type:"throw",arg:k}}}e.wrap=M;var P={};function h(){}function a(){}function m(){}var d={};x(d,s,function(){return this});var l=Object.getPrototypeOf,w=l&&l(l(K([])));w&&w!==n&&i.call(w,s)&&(d=w);var b=m.prototype=h.prototype=Object.create(d);function S(v){["next","throw","return"].forEach(function(r){x(v,r,function(u){return this._invoke(r,u)})})}function y(v,r){function u(I,F,W,X){var R=A(v[I],v,F);if(R.type!=="throw"){var H=R.arg,ne=H.value;return ne&&ye(ne)=="object"&&i.call(ne,"__await")?r.resolve(ne.__await).then(function(oe){u("next",oe,W,X)},function(oe){u("throw",oe,W,X)}):r.resolve(ne).then(function(oe){H.value=oe,W(H)},function(oe){return u("throw",oe,W,X)})}X(R.arg)}var k;x(this,"_invoke",function(I,F){function W(){return new r(function(X,R){u(I,F,X,R)})}return k=k?k.then(W,W):W()},!0)}function $(v,r){var u=r.method,k=v.i[u];if(k===t)return r.delegate=null,u==="throw"&&v.i.return&&(r.method="return",r.arg=t,$(v,r),r.method==="throw")||u!=="return"&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+u+"' method")),P;var I=A(k,v.i,r.arg);if(I.type==="throw")return r.method="throw",r.arg=I.arg,r.delegate=null,P;var F=I.arg;return F?F.done?(r[v.r]=F.value,r.next=v.n,r.method!=="return"&&(r.method="next",r.arg=t),r.delegate=null,P):F:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,P)}function E(v){this.tryEntries.push(v)}function T(v){var r=v[4]||{};r.type="normal",r.arg=t,v[4]=r}function L(v){this.tryEntries=[[-1]],v.forEach(E,this),this.reset(!0)}function K(v){if(v!=null){var r=v[s];if(r)return r.call(v);if(typeof v.next=="function")return v;if(!isNaN(v.length)){var u=-1,k=function I(){for(;++u<v.length;)if(i.call(v,u))return I.value=v[u],I.done=!1,I;return I.value=t,I.done=!0,I};return k.next=k}}throw new TypeError(ye(v)+" is not iterable")}return a.prototype=m,x(b,"constructor",m),x(m,"constructor",a),a.displayName=x(m,_,"GeneratorFunction"),e.isGeneratorFunction=function(v){var r=typeof v=="function"&&v.constructor;return!!r&&(r===a||(r.displayName||r.name)==="GeneratorFunction")},e.mark=function(v){return Object.setPrototypeOf?Object.setPrototypeOf(v,m):(v.__proto__=m,x(v,_,"GeneratorFunction")),v.prototype=Object.create(b),v},e.awrap=function(v){return{__await:v}},S(y.prototype),x(y.prototype,g,function(){return this}),e.AsyncIterator=y,e.async=function(v,r,u,k,I){I===void 0&&(I=Promise);var F=new y(M(v,r,u,k),I);return e.isGeneratorFunction(r)?F:F.next().then(function(W){return W.done?W.value:F.next()})},S(b),x(b,_,"Generator"),x(b,s,function(){return this}),x(b,"toString",function(){return"[object Generator]"}),e.keys=function(v){var r=Object(v),u=[];for(var k in r)u.unshift(k);return function I(){for(;u.length;)if((k=u.pop())in r)return I.value=k,I.done=!1,I;return I.done=!0,I}},e.values=K,L.prototype={constructor:L,reset:function(r){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!r)for(var u in this)u.charAt(0)==="t"&&i.call(this,u)&&!isNaN(+u.slice(1))&&(this[u]=t)},stop:function(){this.done=!0;var r=this.tryEntries[0][4];if(r.type==="throw")throw r.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var u=this;function k(ne){W.type="throw",W.arg=r,u.next=ne}for(var I=u.tryEntries.length-1;I>=0;--I){var F=this.tryEntries[I],W=F[4],X=this.prev,R=F[1],H=F[2];if(F[0]===-1)return k("end"),!1;if(!R&&!H)throw Error("try statement without catch or finally");if(F[0]!=null&&F[0]<=X){if(X<R)return this.method="next",this.arg=t,k(R),!0;if(X<H)return k(H),!1}}},abrupt:function(r,u){for(var k=this.tryEntries.length-1;k>=0;--k){var I=this.tryEntries[k];if(I[0]>-1&&I[0]<=this.prev&&this.prev<I[2]){var F=I;break}}F&&(r==="break"||r==="continue")&&F[0]<=u&&u<=F[2]&&(F=null);var W=F?F[4]:{};return W.type=r,W.arg=u,F?(this.method="next",this.next=F[2],P):this.complete(W)},complete:function(r,u){if(r.type==="throw")throw r.arg;return r.type==="break"||r.type==="continue"?this.next=r.arg:r.type==="return"?(this.rval=this.arg=r.arg,this.method="return",this.next="end"):r.type==="normal"&&u&&(this.next=u),P},finish:function(r){for(var u=this.tryEntries.length-1;u>=0;--u){var k=this.tryEntries[u];if(k[2]===r)return this.complete(k[4],k[3]),T(k),P}},catch:function(r){for(var u=this.tryEntries.length-1;u>=0;--u){var k=this.tryEntries[u];if(k[0]===r){var I=k[4];if(I.type==="throw"){var F=I.arg;T(k)}return F}}throw Error("illegal catch attempt")},delegateYield:function(r,u,k){return this.delegate={i:K(r),r:u,n:k},this.method==="next"&&(this.arg=t),P}},e}function ct(t,e,n,i,c,s,g){try{var _=t[s](g),x=_.value}catch(M){return void n(M)}_.done?e(x):Promise.resolve(x).then(i,c)}function Ve(t){return function(){var e=this,n=arguments;return new Promise(function(i,c){var s=t.apply(e,n);function g(x){ct(s,i,c,g,_,"next",x)}function _(x){ct(s,i,c,g,_,"throw",x)}g(void 0)})}}function et(t,e){return Pn(t)||Tn(t,e)||En(t,e)||_n()}function _n(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{S as be,n as ae,v as $t,a as Ut,u as Rt}from"./router-6vVxI5YF.js";import{s as Bt}from"./index-oilsqKTE.js";import{s as j,a as Gt}from"./index-CajhEFGy.js";import{a as Nt,R as qt,b as Ht,c as Wt,s as ee}from"./index-CDIN4LjQ.js";import{a as St,b as Ce,f as _e,g as It,P as Be,s as nt,h as Yt,d as Zt,c as Jt,e as Qt}from"./index-BRb5P6Lf.js";import{a as Xt,c as en,O as tn,s as Ge}from"./index-BgXIYHf3.js";import{s as ot}from"./index-BDHszrMp.js";import{b as me,s as nn}from"./index-Cz_I0ncW.js";import{s as ge,c as Fe,a as on}from"./index-DNGpCJ06.js";import{B as pe,a as O,o as p,h as Z,I as z,V as rt,c as Te,aC as sn,j as we,i as xt,aD as We,aE as Ye,aF as ln,aG as Vt,aH as ut,r as G,w as it,aI as $e,aJ as an,O as Ue,s as D,f as V,H as Re,y as Ne,b as o,g as N,t as q,aK as Ze,D as rn,E as ve,aL as un,ap as dn,aq as cn,ar as pn,as as fn,at as vn,au as Je,av as mn,aM as xe,l as B,G as De,e as f,u as _t,n as ce,F as Y,q as Q,T as hn,J as bn,m as J,d as ie,L as C,p as de,k as Pe,x as se,S as ze,K as yn,v as gn}from"./index-C02AjRq4.js";import{_ as wn}from"./Section-lgKMkAwG.js";import{M as On}from"./Modal-BdxNbadF.js";import"./lodash-D2RHCRSL.js";import{_ as ue}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{E as kn}from"./Editor-DN-ZxIRY.js";import"./_commonjsHelpers-D6-XlEtG.js";var Cn={root:"p-tabpanels"},$n=pe.extend({name:"tabpanels",classes:Cn}),Sn={name:"BaseTabPanels",extends:ge,props:{},style:$n,provide:function(){return{$pcTabPanels:this,$parentInstance:this}}},Et={name:"TabPanels",extends:Sn,inheritAttrs:!1};function In(t,e,n,i,c,s){return p(),O("div",z({class:t.cx("root"),role:"presentation"},t.ptmi("root")),[Z(t.$slots,"default")],16)}Et.render=In;function ye(t){"@babel/helpers - typeof";return ye=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ye(t)}function dt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(c){return Object.getOwnPropertyDescriptor(t,c).enumerable})),n.push.apply(n,i)}return n}function Qe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?dt(Object(n),!0).forEach(function(i){Tt(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):dt(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Tt(t,e,n){return(e=xn(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function xn(t){var e=Vn(t,"string");return ye(e)=="symbol"?e:e+""}function Vn(t,e){if(ye(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(ye(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function le(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */le=function(){return e};var t,e={},n=Object.prototype,i=n.hasOwnProperty,c=typeof Symbol=="function"?Symbol:{},s=c.iterator||"@@iterator",g=c.asyncIterator||"@@asyncIterator",_=c.toStringTag||"@@toStringTag";function x(v,r,u,k){return Object.defineProperty(v,r,{value:u,enumerable:!k,configurable:!k,writable:!k})}try{x({},"")}catch{x=function(u,k,I){return u[k]=I}}function M(v,r,u,k){var I=r&&r.prototype instanceof h?r:h,F=Object.create(I.prototype);return x(F,"_invoke",function(W,X,R){var H=1;return function(ne,oe){if(H===3)throw Error("Generator is already running");if(H===4){if(ne==="throw")throw oe;return{value:t,done:!0}}for(R.method=ne,R.arg=oe;;){var Oe=R.delegate;if(Oe){var fe=$(Oe,R);if(fe){if(fe===P)continue;return fe}}if(R.method==="next")R.sent=R._sent=R.arg;else if(R.method==="throw"){if(H===1)throw H=4,R.arg;R.dispatchException(R.arg)}else R.method==="return"&&R.abrupt("return",R.arg);H=3;var re=A(W,X,R);if(re.type==="normal"){if(H=R.done?4:2,re.arg===P)continue;return{value:re.arg,done:R.done}}re.type==="throw"&&(H=4,R.method="throw",R.arg=re.arg)}}}(v,u,new L(k||[])),!0),F}function A(v,r,u){try{return{type:"normal",arg:v.call(r,u)}}catch(k){return{type:"throw",arg:k}}}e.wrap=M;var P={};function h(){}function a(){}function m(){}var d={};x(d,s,function(){return this});var l=Object.getPrototypeOf,w=l&&l(l(K([])));w&&w!==n&&i.call(w,s)&&(d=w);var b=m.prototype=h.prototype=Object.create(d);function S(v){["next","throw","return"].forEach(function(r){x(v,r,function(u){return this._invoke(r,u)})})}function y(v,r){function u(I,F,W,X){var R=A(v[I],v,F);if(R.type!=="throw"){var H=R.arg,ne=H.value;return ne&&ye(ne)=="object"&&i.call(ne,"__await")?r.resolve(ne.__await).then(function(oe){u("next",oe,W,X)},function(oe){u("throw",oe,W,X)}):r.resolve(ne).then(function(oe){H.value=oe,W(H)},function(oe){return u("throw",oe,W,X)})}X(R.arg)}var k;x(this,"_invoke",function(I,F){function W(){return new r(function(X,R){u(I,F,X,R)})}return k=k?k.then(W,W):W()},!0)}function $(v,r){var u=r.method,k=v.i[u];if(k===t)return r.delegate=null,u==="throw"&&v.i.return&&(r.method="return",r.arg=t,$(v,r),r.method==="throw")||u!=="return"&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+u+"' method")),P;var I=A(k,v.i,r.arg);if(I.type==="throw")return r.method="throw",r.arg=I.arg,r.delegate=null,P;var F=I.arg;return F?F.done?(r[v.r]=F.value,r.next=v.n,r.method!=="return"&&(r.method="next",r.arg=t),r.delegate=null,P):F:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,P)}function E(v){this.tryEntries.push(v)}function T(v){var r=v[4]||{};r.type="normal",r.arg=t,v[4]=r}function L(v){this.tryEntries=[[-1]],v.forEach(E,this),this.reset(!0)}function K(v){if(v!=null){var r=v[s];if(r)return r.call(v);if(typeof v.next=="function")return v;if(!isNaN(v.length)){var u=-1,k=function I(){for(;++u<v.length;)if(i.call(v,u))return I.value=v[u],I.done=!1,I;return I.value=t,I.done=!0,I};return k.next=k}}throw new TypeError(ye(v)+" is not iterable")}return a.prototype=m,x(b,"constructor",m),x(m,"constructor",a),a.displayName=x(m,_,"GeneratorFunction"),e.isGeneratorFunction=function(v){var r=typeof v=="function"&&v.constructor;return!!r&&(r===a||(r.displayName||r.name)==="GeneratorFunction")},e.mark=function(v){return Object.setPrototypeOf?Object.setPrototypeOf(v,m):(v.__proto__=m,x(v,_,"GeneratorFunction")),v.prototype=Object.create(b),v},e.awrap=function(v){return{__await:v}},S(y.prototype),x(y.prototype,g,function(){return this}),e.AsyncIterator=y,e.async=function(v,r,u,k,I){I===void 0&&(I=Promise);var F=new y(M(v,r,u,k),I);return e.isGeneratorFunction(r)?F:F.next().then(function(W){return W.done?W.value:F.next()})},S(b),x(b,_,"Generator"),x(b,s,function(){return this}),x(b,"toString",function(){return"[object Generator]"}),e.keys=function(v){var r=Object(v),u=[];for(var k in r)u.unshift(k);return function I(){for(;u.length;)if((k=u.pop())in r)return I.value=k,I.done=!1,I;return I.done=!0,I}},e.values=K,L.prototype={constructor:L,reset:function(r){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!r)for(var u in this)u.charAt(0)==="t"&&i.call(this,u)&&!isNaN(+u.slice(1))&&(this[u]=t)},stop:function(){this.done=!0;var r=this.tryEntries[0][4];if(r.type==="throw")throw r.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var u=this;function k(ne){W.type="throw",W.arg=r,u.next=ne}for(var I=u.tryEntries.length-1;I>=0;--I){var F=this.tryEntries[I],W=F[4],X=this.prev,R=F[1],H=F[2];if(F[0]===-1)return k("end"),!1;if(!R&&!H)throw Error("try statement without catch or finally");if(F[0]!=null&&F[0]<=X){if(X<R)return this.method="next",this.arg=t,k(R),!0;if(X<H)return k(H),!1}}},abrupt:function(r,u){for(var k=this.tryEntries.length-1;k>=0;--k){var I=this.tryEntries[k];if(I[0]>-1&&I[0]<=this.prev&&this.prev<I[2]){var F=I;break}}F&&(r==="break"||r==="continue")&&F[0]<=u&&u<=F[2]&&(F=null);var W=F?F[4]:{};return W.type=r,W.arg=u,F?(this.method="next",this.next=F[2],P):this.complete(W)},complete:function(r,u){if(r.type==="throw")throw r.arg;return r.type==="break"||r.type==="continue"?this.next=r.arg:r.type==="return"?(this.rval=this.arg=r.arg,this.method="return",this.next="end"):r.type==="normal"&&u&&(this.next=u),P},finish:function(r){for(var u=this.tryEntries.length-1;u>=0;--u){var k=this.tryEntries[u];if(k[2]===r)return this.complete(k[4],k[3]),T(k),P}},catch:function(r){for(var u=this.tryEntries.length-1;u>=0;--u){var k=this.tryEntries[u];if(k[0]===r){var I=k[4];if(I.type==="throw"){var F=I.arg;T(k)}return F}}throw Error("illegal catch attempt")},delegateYield:function(r,u,k){return this.delegate={i:K(r),r:u,n:k},this.method==="next"&&(this.arg=t),P}},e}function ct(t,e,n,i,c,s,g){try{var _=t[s](g),x=_.value}catch(M){return void n(M)}_.done?e(x):Promise.resolve(x).then(i,c)}function Ve(t){return function(){var e=this,n=arguments;return new Promise(function(i,c){var s=t.apply(e,n);function g(x){ct(s,i,c,g,_,"next",x)}function _(x){ct(s,i,c,g,_,"throw",x)}g(void 0)})}}function et(t,e){return Pn(t)||Tn(t,e)||En(t,e)||_n()}function _n(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function En(t,e){if(t){if(typeof t=="string")return pt(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pt(t,e):void 0}}function pt(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function Tn(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i,c,s,g,_=[],x=!0,M=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(x=(i=s.call(n)).done)&&(_.push(i.value),_.length!==e);x=!0);}catch(A){M=!0,c=A}finally{try{if(!x&&n.return!=null&&(g=n.return(),Object(g)!==g))return}finally{if(M)throw c}}return _}}function Pn(t){if(Array.isArray(t))return t}function An(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;sn()?we(t):e?t():xt(t)}function Ln(t,e,n){var i=G(!0),c=it(t,function(s,g){i.value&&e(s,g)},n);return{stop:c,pause:function(){i.value=!1},resume:function(){i.value=!0}}}function Xe(t){return Object.entries(t).reduce(function(e,n){var i=et(n,2),c=i[0],s=i[1];return c.split(/[\.\[\]]+/).filter(Boolean).reduce(function(g,_,x,M){var A;return(A=g[_])!==null&&A!==void 0?A:g[_]=isNaN(M[x+1])?x===M.length-1?s:{}:[]},e),e},{})}function ft(t,e){if(!t||!e)return null;try{var n=t[e];if($e(n))return n}catch{}var i=e.split(/[\.\[\]]+/).filter(Boolean);return i.reduce(function(c,s){return c&&c[s]!==void 0?c[s]:void 0},t)}var Mn=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=rt({}),i=rt({}),c=Te(function(){return Object.values(n).every(function(S){return!S.invalid})}),s=Te(function(){return Xe(n)}),g=function(y,$){return{value:$??ft(e.initialValues,y),touched:!1,dirty:!1,pristine:!0,valid:!0,invalid:!1,error:null,errors:[]}},_=function(y,$){var E=We($,y);return E===!0||Ye(E)&&E.includes(y)},x=function(){var S=Ve(le().mark(function y($,E){var T,L,K;return le().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(L={},!Ye(e[$])){r.next=7;break}return r.next=4,a(e[$]);case 4:L=r.sent,r.next=12;break;case 7:if(r.t0=(T=e[$])!==null&&T!==void 0?T:E,!r.t0){r.next=12;break}return r.next=11,a();case 11:L=r.sent;case 12:if(K=Object.keys(i).filter(function(u){var k;return(k=i[u])===null||k===void 0||(k=k.options)===null||k===void 0?void 0:k[$]})||[],r.t1=$e(K),!r.t1){r.next=18;break}return r.next=17,a(K);case 17:L=r.sent;case 18:return r.abrupt("return",L);case 19:case"end":return r.stop()}},y)}));return function($,E){return S.apply(this,arguments)}}(),M=function(y,$,E,T){var L,K;((L=$==null?void 0:$[E])!==null&&L!==void 0?L:_(y,(K=e[E])!==null&&K!==void 0?K:T))&&a(y)},A=function(y,$){var E,T;if(!y)return[];(E=i[y])===null||E===void 0||E._watcher.stop(),n[y]||(n[y]=g(y,$==null?void 0:$.initialValue));var L=z((T=We($,n[y]))===null||T===void 0?void 0:T.props,We($==null?void 0:$.props,n[y]),{name:y,onBlur:function(){n[y].touched=!0,M(y,$,"validateOnBlur")},onInput:function(r){n[y].value=r&&Object.hasOwn(r,"value")?r.value:r.target.value},onChange:function(r){n[y].value=r&&Object.hasOwn(r,"value")?r.value:r.target.type==="checkbox"||r.target.type==="radio"?r.target.checked:r.target.value},onInvalid:function(r){var u;n[y].invalid=!0,n[y].errors=r,n[y].error=(u=r==null?void 0:r[0])!==null&&u!==void 0?u:null}}),K=Ln(function(){return n[y].value},function(v,r){n[y].pristine&&(n[y].pristine=!1),v!==r&&(n[y].dirty=!0),M(y,$,"validateOnValueUpdate",!0)});return i[y]={props:L,states:n[y],options:$,_watcher:K},[n[y],L]},P=function(y){return function(){var $=Ve(le().mark(function E(T){var L;return le().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,x("validateOnSubmit",!0);case 2:return L=v.sent,v.abrupt("return",y(Qe({originalEvent:T,valid:ut(c),states:ut(s),reset:m},L)));case 4:case"end":return v.stop()}},E)}));return function(E){return $.apply(this,arguments)}}()},h=function(y){return function(){var $=Ve(le().mark(function E(T){return le().wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return m(),K.abrupt("return",y({originalEvent:T}));case 2:case"end":return K.stop()}},E)}));return function(E){return $.apply(this,arguments)}}()},a=function(){var S=Ve(le().mark(function y($){var E,T,L,K,v,r,u,k,I,F,W,X,R,H,ne,oe,Oe,fe,re,qe,Ke,Ie,ke;return le().wrap(function(U){for(;;)switch(U.prev=U.next){case 0:return v=Object.entries(n).reduce(function(He,zt){var lt=et(zt,2),at=lt[0],Ft=lt[1];return He.names.push(at),He.values[at]=Ft.value,He},{names:[],values:{}}),r=[v.names,Xe(v.values)],u=r[0],k=r[1],U.next=4,(T=e.resolver)===null||T===void 0?void 0:T.call(e,{names:u,values:k});case 4:if(U.t1=E=U.sent,U.t0=U.t1!==null,!U.t0){U.next=8;break}U.t0=E!==void 0;case 8:if(!U.t0){U.next=12;break}U.t2=E,U.next=13;break;case 12:U.t2={values:k};case 13:I=U.t2,(K=(L=I).errors)!==null&&K!==void 0||(L.errors={}),F=[$].flat(),W=0,X=Object.entries(i);case 17:if(!(W<X.length)){U.next=45;break}if(R=et(X[W],2),H=R[0],ne=R[1],!(F.includes(H)||!$||Vt(I.errors))){U.next=42;break}if(re=(oe=ne.options)===null||oe===void 0?void 0:oe.resolver,!re){U.next=37;break}return Ke=ne.states.value,U.next=25,re({values:Ke,value:Ke,name:H});case 25:if(U.t4=qe=U.sent,U.t3=U.t4!==null,!U.t3){U.next=29;break}U.t3=qe!==void 0;case 29:if(!U.t3){U.next=33;break}U.t5=qe,U.next=34;break;case 33:U.t5={values:Ke};case 34:Ie=U.t5,Ye(Ie.errors)&&(Ie.errors=Tt({},H,Ie.errors)),I=ln(I,Ie);case 37:ke=(Oe=ft(I.errors,H))!==null&&Oe!==void 0?Oe:[],n[H].invalid=ke.length>0,n[H].valid=!n[H].invalid,n[H].errors=ke,n[H].error=(fe=ke==null?void 0:ke[0])!==null&&fe!==void 0?fe:null;case 42:W++,U.next=17;break;case 45:return U.abrupt("return",Qe(Qe({},I),{},{errors:Xe(I.errors)}));case 46:case"end":return U.stop()}},y)}));return function($){return S.apply(this,arguments)}}(),m=function(){Object.keys(n).forEach(function(){var y=Ve(le().mark(function $(E){var T,L;return le().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return L=i[E]._watcher,L.pause(),i[E].states=n[E]=g(E,(T=i[E])===null||T===void 0||(T=T.options)===null||T===void 0?void 0:T.initialValue),v.next=5,xt();case 5:L.resume();case 6:case"end":return v.stop()}},$)}));return function($){return y.apply(this,arguments)}}())},d=function(y,$){n[y].value=$},l=function(y){var $;return($=i[y])===null||$===void 0?void 0:$.states},w=function(y){Object.keys(y).forEach(function($){return d($,y[$])})},b=function(){x("validateOnMount")};return An(b),{defineField:A,setFieldValue:d,getFieldState:l,handleSubmit:P,handleReset:h,validate:a,setValues:w,reset:m,valid:c,states:s,fields:i}},jn={root:"p-form p-component"},Dn=pe.extend({name:"form",classes:jn}),Kn={name:"BaseForm",extends:ge,style:Dn,props:{resolver:{type:Function,default:null},initialValues:{type:Object,default:null},validateOnValueUpdate:{type:[Boolean,Array],default:!0},validateOnBlur:{type:[Boolean,Array],default:!1},validateOnMount:{type:[Boolean,Array],default:!1},validateOnSubmit:{type:[Boolean,Array],default:!0}},provide:function(){return{$pcForm:this,$parentInstance:this}}};function Ae(t){"@babel/helpers - typeof";return Ae=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ae(t)}function vt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(c){return Object.getOwnPropertyDescriptor(t,c).enumerable})),n.push.apply(n,i)}return n}function zn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?vt(Object(n),!0).forEach(function(i){Fn(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vt(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Fn(t,e,n){return(e=Un(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Un(t){var e=Rn(t,"string");return Ae(e)=="symbol"?e:e+""}function Rn(t,e){if(Ae(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(Ae(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Bn(t,e){return Hn(t)||qn(t,e)||Nn(t,e)||Gn()}function Gn(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nn(t,e){if(t){if(typeof t=="string")return mt(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?mt(t,e):void 0}}function mt(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function qn(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i,c,s,g,_=[],x=!0,M=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(x=(i=s.call(n)).done)&&(_.push(i.value),_.length!==e);x=!0);}catch(A){M=!0,c=A}finally{try{if(!x&&n.return!=null&&(g=n.return(),Object(g)!==g))return}finally{if(M)throw c}}return _}}function Hn(t){if(Array.isArray(t))return t}var Pt={name:"Form",extends:Kn,inheritAttrs:!1,emits:["submit","reset"],setup:function(e,n){var i=n.emit,c=G(null),s=Mn(e),g=function(){var P;(P=c.value)===null||P===void 0||P.requestSubmit()},_=function(P,h){if(!(h!=null&&h.novalidate)){var a=s.defineField(P,h),m=Bn(a,2),d=m[1];return d}return{}},x=s.handleSubmit(function(A){i("submit",A)}),M=s.handleReset(function(A){i("reset",A)});return zn({formRef:c,submit:g,register:_,onSubmit:x,onReset:M},an(s,["handleSubmit","handleReset"]))}};function Wn(t,e,n,i,c,s){return p(),O("form",z({ref:"formRef",onSubmit:e[0]||(e[0]=Ue(function(){return i.onSubmit&&i.onSubmit.apply(i,arguments)},["prevent"])),onReset:e[1]||(e[1]=Ue(function(){return i.onReset&&i.onReset.apply(i,arguments)},["prevent"])),class:t.cx("root")},t.ptmi("root")),[Z(t.$slots,"default",z({register:i.register,valid:t.valid,reset:t.reset},t.states))],16)}Pt.render=Wn;var Yn={root:"p-formfield p-component"},Zn=pe.extend({name:"formfield",classes:Yn}),Jn={name:"BaseFormField",extends:ge,style:Zn,props:{name:{type:String,default:void 0},resolver:{type:Function,default:void 0},initialValue:{type:null,default:void 0},validateOnValueUpdate:{type:Boolean,default:void 0},validateOnBlur:{type:Boolean,default:void 0},validateOnMount:{type:Boolean,default:void 0},validateOnSubmit:{type:Boolean,default:void 0},as:{type:[String,Object],default:"DIV"},asChild:{type:Boolean,default:!1}},provide:function(){return{$pcFormField:this,$parentInstance:this}}};function Le(t){"@babel/helpers - typeof";return Le=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Le(t)}function ht(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(c){return Object.getOwnPropertyDescriptor(t,c).enumerable})),n.push.apply(n,i)}return n}function bt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ht(Object(n),!0).forEach(function(i){Qn(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ht(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Qn(t,e,n){return(e=Xn(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Xn(t){var e=eo(t,"string");return Le(e)=="symbol"?e:e+""}function eo(t,e){if(Le(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(Le(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var At={name:"FormField",extends:Jn,inheritAttrs:!1,inject:{$pcForm:{default:void 0}},watch:{formControl:{immediate:!0,handler:function(e){var n,i;(n=this.$pcForm)===null||n===void 0||(i=n.register)===null||i===void 0||i.call(n,this.name,e)}}},computed:{formControl:function(){return{name:this.name,resolver:this.resolver,initialValue:this.initialValue,validateOnValueUpdate:this.validateOnValueUpdate,validateOnBlur:this.validateOnBlur,validateOnMount:this.validateOnMount,validateOnSubmit:this.validateOnSubmit}},field:function(){var e;return((e=this.$pcForm)===null||e===void 0||(e=e.fields)===null||e===void 0?void 0:e[this.name])||{}},fieldAttrs:function(){return bt(bt({},this.field.props),this.field.states)}}};function to(t,e,n,i,c,s){return t.asChild?Z(t.$slots,"default",z({key:1,class:t.cx("root"),props:s.field.props},s.fieldAttrs)):(p(),D(Re(t.as),z({key:0,class:t.cx("root")},t.ptmi("root")),{default:V(function(){return[Z(t.$slots,"default",z({props:s.field.props},s.fieldAttrs))]}),_:3},16,["class"]))}At.render=to;var no=Ne`
4
4
  .p-inputgroup,
@@ -1 +1 @@
1
- import{P as g}from"./Section-DWZalQSy.js";import{u as h}from"./currentEditor-Mutd140I.js";import{S as C}from"./Spinner-BDdyfVPn.js";import{_ as E}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{s as c,L as e,o as r,f as d,b as y,a as n,F as v,q as x,n as b}from"./index-CnHkskP1.js";const B=["src","title"],$={key:1},w={class:"icons"},z=["alt","src","onClick"],F={__name:"CurrentEditor",props:{service:{default:void 0},direction:{default:"bottom"},dark:{default:!1}},setup(s){const u=s,{availableEditors:m,loading:p,allEditors:f,setDefaultEditor:k,currentEditor:i}=h(u.service);return(_,l)=>e(p)?(r(),c(C,{key:1,size:"18",noColor:!0})):(r(),c(g,{key:0,trigger:"mouseenter",appendTo:"parent",style:{display:"inline-block",width:"max-content"},triggerHeight:"18px",placement:s.direction},{trigger:d(()=>{var t,o,a;return[(t=e(i))!=null&&t.icon?(r(),n("img",{key:0,class:b({"filter-dark":s.dark}),src:(o=e(i))==null?void 0:o.icon,alt:"editor icon","aria-hidden":"true",title:(a=e(i))==null?void 0:a.title,onClick:l[0]||(l[0]=L=>_.$emit("openEditor",e(i).key))},null,10,B)):(r(),n("span",$,"Choose your default editor"))]}),content:d(()=>[y("div",w,[(r(!0),n(v,null,x(e(m),t=>{var o;return r(),n("img",{alt:`Editor icon: ${t}`,src:(o=e(f)[t])==null?void 0:o.icon,style:{width:"35px",height:"35px"},onClick:a=>e(k)(t),class:"filter-dark"},null,8,z)}),256))])]),_:1},8,["placement"]))}},I=E(F,[["__scopeId","data-v-1dc07b45"]]);export{I as C};
1
+ import{P as g}from"./Section-lgKMkAwG.js";import{u as h}from"./currentEditor-7U_ffDbK.js";import{S as C}from"./Spinner-CUHDMnpi.js";import{_ as E}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{s as c,L as e,o as r,f as d,b as y,a as n,F as v,q as x,n as b}from"./index-C02AjRq4.js";const B=["src","title"],$={key:1},w={class:"icons"},z=["alt","src","onClick"],F={__name:"CurrentEditor",props:{service:{default:void 0},direction:{default:"bottom"},dark:{default:!1}},setup(s){const u=s,{availableEditors:m,loading:p,allEditors:f,setDefaultEditor:k,currentEditor:i}=h(u.service);return(_,l)=>e(p)?(r(),c(C,{key:1,size:"18",noColor:!0})):(r(),c(g,{key:0,trigger:"mouseenter",appendTo:"parent",style:{display:"inline-block",width:"max-content"},triggerHeight:"18px",placement:s.direction},{trigger:d(()=>{var t,o,a;return[(t=e(i))!=null&&t.icon?(r(),n("img",{key:0,class:b({"filter-dark":s.dark}),src:(o=e(i))==null?void 0:o.icon,alt:"editor icon","aria-hidden":"true",title:(a=e(i))==null?void 0:a.title,onClick:l[0]||(l[0]=L=>_.$emit("openEditor",e(i).key))},null,10,B)):(r(),n("span",$,"Choose your default editor"))]}),content:d(()=>[y("div",w,[(r(!0),n(v,null,x(e(m),t=>{var o;return r(),n("img",{alt:`Editor icon: ${t}`,src:(o=e(f)[t])==null?void 0:o.icon,style:{width:"35px",height:"35px"},onClick:a=>e(k)(t),class:"filter-dark"},null,8,z)}),256))])]),_:1},8,["placement"]))}},I=E(F,[["__scopeId","data-v-1dc07b45"]]);export{I as C};
@@ -1 +1 @@
1
- import{b as r}from"./router-BmEvmcw4.js";import{_ as m}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{c as p,a as i,o,s as a,H as s,L as l,n as u}from"./index-CnHkskP1.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./Editor-BUC6Zjcy.js";import"./Section-DWZalQSy.js";const f={__name:"DynamicComponent",props:{context:{type:String,default:""}},setup(e){const t=r(),n=e,c=p(()=>n.context?t.params.plugin+"-"+n.context:t.params.plugin);return(x,_)=>(o(),i("div",{style:{flexGrow:1},class:u(`context-${e.context}`)},[(o(),a(s(c.value),{class:"dynamic-component"})),(o(),a(s(l(t).params.plugin),{class:"dynamic-component"}))],2))}},B=m(f,[["__scopeId","data-v-b5893e03"]]);export{B as default};
1
+ import{b as r}from"./router-6vVxI5YF.js";import{_ as m}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{c as p,a as i,o,s as a,H as s,L as l,n as u}from"./index-C02AjRq4.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./Editor-DN-ZxIRY.js";import"./Section-lgKMkAwG.js";const f={__name:"DynamicComponent",props:{context:{type:String,default:""}},setup(e){const t=r(),n=e,c=p(()=>n.context?t.params.plugin+"-"+n.context:t.params.plugin);return(x,_)=>(o(),i("div",{style:{flexGrow:1},class:u(`context-${e.context}`)},[(o(),a(s(c.value),{class:"dynamic-component"})),(o(),a(s(l(t).params.plugin),{class:"dynamic-component"}))],2))}},B=m(f,[["__scopeId","data-v-b5893e03"]]);export{B as default};