@autocode-cli/autocode 0.38.2 → 0.38.4

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 (83) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/{DEvRa3of.js → 3z6Bx0TK.js} +1 -1
  3. package/.output/public/_nuxt/{DpcTyoGM.js → B-EYUTUP.js} +1 -1
  4. package/.output/public/_nuxt/{CsTVNF-2.js → B2gCcJnq.js} +1 -1
  5. package/.output/public/_nuxt/{DGy8YoXT.js → B7nWSjvG.js} +1 -1
  6. package/.output/public/_nuxt/{D0qgRfni.js → BAdDJAIJ.js} +1 -1
  7. package/.output/public/_nuxt/{DNy56O1k.js → BDF6z5kO.js} +1 -1
  8. package/.output/public/_nuxt/{BZ6FzmBL.js → BJ0oxbP4.js} +1 -1
  9. package/.output/public/_nuxt/{0HczxCVv.js → BJMuKgrF.js} +1 -1
  10. package/.output/public/_nuxt/{GnKgiMOf.js → BLY1kH3B.js} +1 -1
  11. package/.output/public/_nuxt/{DlO36yMp.js → BPebzFqY.js} +1 -1
  12. package/.output/public/_nuxt/{N7kSzZAV.js → BQ3I6Zb-.js} +1 -1
  13. package/.output/public/_nuxt/{DzaPzzsO.js → BXHie6U8.js} +1 -1
  14. package/.output/public/_nuxt/{ZwekkJkt.js → BY3B9N78.js} +1 -1
  15. package/.output/public/_nuxt/{Da1dX7RW.js → BY3UuM66.js} +1 -1
  16. package/.output/public/_nuxt/{DKgemWiE.js → BbUL7hnj.js} +1 -1
  17. package/.output/public/_nuxt/{CLW3obj5.js → Bu0Sw6DH.js} +1 -1
  18. package/.output/public/_nuxt/{B2RgqbNO.js → BuPN94lV.js} +1 -1
  19. package/.output/public/_nuxt/{-f1liQz1.js → BvY1WXIe.js} +1 -1
  20. package/.output/public/_nuxt/{0fb47W2G.js → BxKcPgEg.js} +1 -1
  21. package/.output/public/_nuxt/{oFSgMRDY.js → C2Gd8Ubb.js} +1 -1
  22. package/.output/public/_nuxt/{C5fz81dA.js → C48H1zN4.js} +1 -1
  23. package/.output/public/_nuxt/{BNy2STaj.js → C49YQbKc.js} +1 -1
  24. package/.output/public/_nuxt/{PakvrKeO.js → CDvthk08.js} +1 -1
  25. package/.output/public/_nuxt/{vmoRsjSo.js → CKy_jiNP.js} +1 -1
  26. package/.output/public/_nuxt/CNNlgeI3.js +1 -0
  27. package/.output/public/_nuxt/{B1XzNfSL.js → CPOZ4QbL.js} +1 -1
  28. package/.output/public/_nuxt/{DJjCRJhp.js → CVuOP4i8.js} +1 -1
  29. package/.output/public/_nuxt/{C_xNnhFc.js → Cc4J1prP.js} +1 -1
  30. package/.output/public/_nuxt/{D6PNtP0_.js → CeyWHUCw.js} +1 -1
  31. package/.output/public/_nuxt/{DcNcSmJ0.js → Cfwp13o7.js} +1 -1
  32. package/.output/public/_nuxt/{WK5WZELE.js → ClZ7SeE6.js} +1 -1
  33. package/.output/public/_nuxt/{DDABJbm9.js → ClrPQ_cX.js} +1 -1
  34. package/.output/public/_nuxt/{Dy-CBgLm.js → CmgKZaWw.js} +1 -1
  35. package/.output/public/_nuxt/{B3P4PwA5.js → Cn0vJYPC.js} +1 -1
  36. package/.output/public/_nuxt/{Bc3I1G9W.js → CxFxslZw.js} +1 -1
  37. package/.output/public/_nuxt/{DU_LmBMB.js → Cxse0Kvr.js} +1 -1
  38. package/.output/public/_nuxt/{CBvW1gAI.js → D1IDxc6Q.js} +1 -1
  39. package/.output/public/_nuxt/D5_wLLrC.js +1 -0
  40. package/.output/public/_nuxt/{CIrlkMnL.js → D60mo3Q5.js} +1 -1
  41. package/.output/public/_nuxt/{DqEU6TSY.js → D6KySJ4l.js} +1 -1
  42. package/.output/public/_nuxt/{BajA-R3t.js → D7UiNNwv.js} +3 -3
  43. package/.output/public/_nuxt/{CRQzIZYM.js → DCV7Ub3p.js} +1 -1
  44. package/.output/public/_nuxt/{BYF8gHRW.js → DFI0tjGU.js} +1 -1
  45. package/.output/public/_nuxt/{BnQis2Wb.js → DFnb_ryf.js} +1 -1
  46. package/.output/public/_nuxt/{RgNv66WU.js → DIffTefD.js} +1 -1
  47. package/.output/public/_nuxt/{Dred22d0.js → DLDWaS1v.js} +1 -1
  48. package/.output/public/_nuxt/{BS8cve1k.js → DSTMsAN4.js} +1 -1
  49. package/.output/public/_nuxt/{PvSILeNu.js → DkKR7Yir.js} +1 -1
  50. package/.output/public/_nuxt/{CDrMVkFg.js → DoNcpemc.js} +1 -1
  51. package/.output/public/_nuxt/{tYdwqztA.js → DpbkD_Tz.js} +1 -1
  52. package/.output/public/_nuxt/{BVsyb2e6.js → DqDM_AJE.js} +1 -1
  53. package/.output/public/_nuxt/{rEg4ipuK.js → DuK-C58J.js} +1 -1
  54. package/.output/public/_nuxt/{DQcftxMR.js → FM-P_Zmw.js} +1 -1
  55. package/.output/public/_nuxt/{jNB-5CTq.js → QdkHS5sG.js} +1 -1
  56. package/.output/public/_nuxt/{_NYypPKu.js → XSV2zb2_.js} +1 -1
  57. package/.output/public/_nuxt/{DKB4Mc1Q.js → _GOFtDs5.js} +3 -3
  58. package/.output/public/_nuxt/builds/latest.json +1 -1
  59. package/.output/public/_nuxt/builds/meta/4c2cd1bf-9a38-45ef-8d6c-622d3c43f8ae.json +1 -0
  60. package/.output/public/_nuxt/{DxfoOa6c.js → cfrPIAhM.js} +1 -1
  61. package/.output/public/_nuxt/{B5fw33KK.js → dMixNHaY.js} +1 -1
  62. package/.output/public/_nuxt/{CxIMD2YC.js → fUde1ZSn.js} +1 -1
  63. package/.output/public/_nuxt/{DTcXWbr5.js → gSUFBi_6.js} +1 -1
  64. package/.output/public/_nuxt/nC4-4Tu6.js +1 -0
  65. package/.output/public/_nuxt/{BJqVHY5h.js → npH0CJGc.js} +1 -1
  66. package/.output/public/_nuxt/{CIXkncWO.js → owPaJjQp.js} +1 -1
  67. package/.output/public/_nuxt/{COSxhdDS.js → rH-6mYch.js} +1 -1
  68. package/.output/public/_nuxt/{CZqTwjXm.js → trvxen2b.js} +1 -1
  69. package/.output/public/_nuxt/{6guOtdqw.js → uqtnWFyq.js} +1 -1
  70. package/.output/public/api/_openapi.json +1 -1
  71. package/.output/public/docs/api/index.html +1 -1
  72. package/.output/public/docs/cli/index.html +1 -1
  73. package/.output/public/index.html +1 -1
  74. package/.output/server/chunks/build/client.precomputed.mjs +1 -1
  75. package/.output/server/chunks/build/server.mjs +2 -2
  76. package/.output/server/chunks/build/styles.mjs +16 -16
  77. package/.output/server/chunks/nitro/nitro.mjs +416 -416
  78. package/.output/server/package.json +1 -1
  79. package/package.json +1 -1
  80. package/.output/public/_nuxt/BCNjSdYq.js +0 -1
  81. package/.output/public/_nuxt/Bn4DFtby.js +0 -1
  82. package/.output/public/_nuxt/D4nTCY0i.js +0 -1
  83. package/.output/public/_nuxt/builds/meta/9a1c9664-8962-4c8a-9520-847d9c1906db.json +0 -1
@@ -1 +1 @@
1
- import{u as W}from"./CZqTwjXm.js";import{x as D}from"./DGy8YoXT.js";import{r as h,bu as F,aW as g,aX as T,T as b,d as N,g as O,bv as M}from"./BajA-R3t.js";import{d as j,m as q,j as u,b as o,h as e,c as y,f,w as r,e as s,g as n,s as d,k as p,al as z,t as $,F as B,q as L,p as A,r as G,am as P}from"./DKB4Mc1Q.js";import"./92s3wAHG.js";import"./CLW3obj5.js";import"./N7kSzZAV.js";import"./Bc3I1G9W.js";const H=j({__name:"IntegrationLogo",props:{integration:{}},setup(w){const t=w,i=["adonisjs","astro","dotnet","elysiajs","express","fastapi","fastify","go","hono","laravel","litestar","nestjs","nextjs","nitro","nuxt","platformatic","react","rust","svelte"],k=q(()=>{const x="Openapi",l=t.integration?.toLocaleLowerCase();if(!l)return x;const m=l.charAt(0).toUpperCase()+l.slice(1);return i.includes(l)?m:x});return(x,l)=>(o(),u(e(h),{class:"h-full w-full rounded-lg",logo:k.value},null,8,["logo"]))}}),R={class:"flex flex-col gap-2"},X=j({__name:"SettingsAppearance",setup(w){const{colorMode:t,setColorMode:i}=F(),k=T({base:"w-full shadow-none text-c-1 justify-start pl-2 gap-2 border",variants:{active:{true:"bg-primary text-c-1 hover:bg-inherit",false:"bg-b-1 hover:bg-b-2"}}});return(x,l)=>(o(),y("div",R,[f(e(b),{class:d(e(g)(e(k)({active:e(t)==="system"}))),onClick:l[0]||(l[0]=m=>e(i)("system"))},{default:r(()=>[s("div",{class:d(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",{"bg-c-accent text-b-1 border-transparent":e(t)==="system"}])},[e(t)==="system"?(o(),u(e(h),{key:0,icon:"Checkmark",size:"xs",thickness:"3.5"})):p("",!0)],2),l[3]||(l[3]=n(" System Preference (default) ",-1))]),_:1},8,["class"]),f(e(b),{class:d(e(g)(e(k)({active:e(t)==="light"}))),onClick:l[1]||(l[1]=m=>e(i)("light"))},{default:r(()=>[s("div",{class:d(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",{"bg-c-accent text-b-1 border-transparent":e(t)==="light"}])},[e(t)==="light"?(o(),u(e(h),{key:0,icon:"Checkmark",size:"xs",thickness:"3.5"})):p("",!0)],2),l[4]||(l[4]=n(" Light Mode Always ",-1))]),_:1},8,["class"]),f(e(b),{class:d(e(g)(e(k)({active:e(t)==="dark"}))),onClick:l[2]||(l[2]=m=>e(i)("dark"))},{default:r(()=>[s("div",{class:d(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",{"bg-c-accent text-b-1 border-transparent":e(t)==="dark"}])},[e(t)==="dark"?(o(),u(e(h),{key:0,icon:"Checkmark",size:"xs",thickness:"3.5"})):p("",!0)],2),l[5]||(l[5]=n(" Dark Mode Always ",-1))]),_:1},8,["class"])]))}}),E={class:"flex flex-col gap-2"},J={key:0,class:"font-bold"},K={key:1,class:"text-c-2 mb-4 leading-[21px]"},S=j({__name:"SettingsSection",setup(w){return(t,i)=>(o(),y("div",E,[t.$slots.title?(o(),y("h3",J,[z(t.$slots,"title")])):p("",!0),t.$slots.description?(o(),y("p",K,[z(t.$slots,"description")])):p("",!0),z(t.$slots,"default")]))}}),Q={class:"bg-b-1 h-full w-full overflow-auto"},Y={class:"mr-auto ml-auto w-full max-w-[720px] px-5 py-5"},Z={class:"flex flex-col gap-8"},ee={class:"flex flex-col gap-2"},te={class:"flex flex-col gap-2"},ae={class:"grid grid-cols-2 gap-2"},se={class:"flex items-center gap-2"},re={class:"flex items-center gap-1"},le={class:"grid grid-cols-2 gap-2"},ce={class:"flex items-center gap-2"},oe={class:"flex items-center gap-1"},ne={class:"size-7 rounded-xl"},_="https://proxy.scalar.com",ie=j({__name:"SettingsGeneral",setup(w){const{activeWorkspace:t}=N(),{proxyUrl:i,workspaceMutators:k}=O(),x=["default","alternate","purple","solarized","saturn","kepler"],l=["elysiajs","fastify"],m=v=>({default:{light:"#fff",dark:"#0f0f0f",accent:"#0099ff"},alternate:{light:"#f9f9f9",dark:"#131313",accent:"#e7e7e7"},moon:{light:"#ccc9b3",dark:"#313332",accent:"#645b0f"},purple:{light:"#f5f6f8",dark:"#22252b",accent:"#5469d4"},solarized:{light:"#fdf6e3",dark:"#00212b",accent:"#007acc"},bluePlanet:{light:"#f0f2f5",dark:"#000e23",accent:"#e0e2e6"},saturn:{light:"#e4e4df",dark:"#2c2c30",accent:"#1763a6"},kepler:{light:"#f6f6f6",dark:"#0d0f1e",accent:"#7070ff"},mars:{light:"#f2efe8",dark:"#321116",accent:"#c75549"},deepSpace:{light:"#f4f4f5",dark:"#09090b",accent:"#8ab4f8"},laserwave:{light:"#f4f2f7",dark:"#27212e",accent:"#ed78c2"},none:{light:"#ffffff",dark:"#000000",accent:"#3b82f6"}})[v]||{light:"#ffffff",dark:"#000000",accent:"#3b82f6"},I=v=>k.edit(t.value?.uid,"themeId",v),C=T({base:"w-full shadow-none text-c-1 justify-start pl-2 gap-2 border",variants:{active:{true:"bg-primary text-c-1 hover:bg-inherit",false:"bg-b-1 hover:bg-b-2"}}}),U=v=>k.edit(t.value?.uid,"proxyUrl",v);return(v,a)=>(o(),y("div",Q,[s("div",Y,[s("div",Z,[a[13]||(a[13]=s("div",null,[s("h2",{class:"mt-10 text-xl font-bold"},"Settings")],-1)),f(S,null,{title:r(()=>[...a[3]||(a[3]=[n(" CORS Proxy ",-1)])]),description:r(()=>[...a[4]||(a[4]=[n(" Browsers block cross-origin requests for security. We provide a public proxy to ",-1),s("a",{class:"hover:text-c-1 underline-offset-2",href:"https://en.wikipedia.org/wiki/Cross-origin_resource_sharing",target:"_blank"}," bypass CORS issues ",-1),n(" . Check the ",-1),s("a",{class:"hover:text-c-1 underline-offset-2",href:"https://github.com/scalar/scalar/tree/main/examples/proxy-server",target:"_blank"}," source code on GitHub ",-1),n(" . ",-1)])]),default:r(()=>[s("div",ee,[f(e(b),{class:d(e(g)(e(C)({active:e(t)?.proxyUrl===_}))),onClick:a[0]||(a[0]=c=>U(_))},{default:r(()=>[s("div",{class:d(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",{"bg-c-accent text-b-1 border-transparent":e(t)?.proxyUrl===_}])},[e(t)?.proxyUrl===_?(o(),u(e(h),{key:0,icon:"Checkmark",size:"xs",thickness:"3.5"})):p("",!0)],2),a[5]||(a[5]=n(" Use proxy.scalar.com (default) ",-1))]),_:1},8,["class"]),e(i)&&e(i)!==_?(o(),u(e(b),{key:0,class:d(e(g)(e(C)({active:e(t)?.proxyUrl===e(i)}))),onClick:a[1]||(a[1]=c=>U(e(i)))},{default:r(()=>[s("div",{class:d(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",{"bg-c-accent text-b-1 border-transparent":e(t)?.proxyUrl===e(i)}])},[e(t)?.proxyUrl===e(i)?(o(),u(e(h),{key:0,icon:"Checkmark",size:"xs",thickness:"3.5"})):p("",!0)],2),n(" Use custom proxy ("+$(e(i))+") ",1)]),_:1},8,["class"])):p("",!0),f(e(b),{class:d(e(g)(e(C)({active:!e(t)?.proxyUrl}))),onClick:a[2]||(a[2]=c=>U(void 0))},{default:r(()=>[s("div",{class:d(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",!e(t)?.proxyUrl&&"bg-c-accent text-b-1 border-transparent"])},[e(t)?.proxyUrl?p("",!0):(o(),u(e(h),{key:0,icon:"Checkmark",size:"xs",thickness:"3.5"}))],2),a[6]||(a[6]=n(" Skip the proxy ",-1))]),_:1},8,["class"])])]),_:1}),f(S,null,{title:r(()=>[...a[7]||(a[7]=[n(" Themes ",-1)])]),description:r(()=>[...a[8]||(a[8]=[n(" We've got a whole rainbow of themes for you to play with: ",-1)])]),default:r(()=>[s("div",te,[s("div",ae,[(o(),y(B,null,L(x,c=>f(e(b),{key:c,class:d(e(g)(e(C)({active:e(t)?.themeId===c}))),onClick:V=>I(c)},{default:r(()=>[s("div",se,[s("div",{class:d(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",{"bg-c-accent text-b-1 border-transparent":e(t)?.themeId===c}])},[e(t)?.themeId===c?(o(),u(e(h),{key:0,icon:"Checkmark",size:"xs",thickness:"3.5"})):p("",!0)],2),n(" "+$(e(M)[c]),1)]),s("div",re,[s("span",{class:"border-c-3 -mr-3 inline-block h-5 w-5 rounded-full",style:A({backgroundColor:m(c).light})},null,4),s("span",{class:"border-c-3 -mr-3 inline-block h-5 w-5 rounded-full",style:A({backgroundColor:m(c).dark})},null,4),s("span",{class:"border-c-3 inline-block h-5 w-5 rounded-full",style:A({backgroundColor:m(c).accent})},null,4)])]),_:2},1032,["class","onClick"])),64))])])]),_:1}),f(S,null,{title:r(()=>[...a[9]||(a[9]=[n(" Framework Themes ",-1)])]),description:r(()=>[...a[10]||(a[10]=[n(" Are you a real fan? Show your support by using your favorite framework's theme! ",-1)])]),default:r(()=>[s("div",le,[(o(),y(B,null,L(l,c=>f(e(b),{key:c,class:d(e(g)(e(C)({active:e(t)?.themeId===c}))),onClick:V=>I(c)},{default:r(()=>[s("div",ce,[s("div",{class:d(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",{"bg-c-accent text-b-1 border-transparent":e(t)?.themeId===c}])},[e(t)?.themeId===c?(o(),u(e(h),{key:0,icon:"Checkmark",size:"xs",thickness:"3.5"})):p("",!0)],2),n(" "+$(e(M)[c]),1)]),s("div",oe,[s("div",ne,[f(H,{integration:c},null,8,["integration"])])])]),_:2},1032,["class","onClick"])),64))])]),_:1}),f(S,null,{title:r(()=>[...a[11]||(a[11]=[n(" Appearance ",-1)])]),description:r(()=>[...a[12]||(a[12]=[n(" Choose between light, dark, or system-based appearance for your workspace. ",-1)])]),default:r(()=>[f(X)]),_:1})])])]))}}),be=j({__name:"Settings",setup(w){const t={general:{component:ie,title:"general"}},i=G("general");return(k,x)=>(o(),u(W,null,{default:r(()=>[f(D,{class:"flex-1"},{default:r(()=>[t[i.value]?(o(),u(P(t[i.value].component),{key:0})):p("",!0)]),_:1})]),_:1}))}});export{be as default};
1
+ import{u as W}from"./trvxen2b.js";import{x as D}from"./B7nWSjvG.js";import{r as h,bu as F,aW as g,aX as T,T as b,d as N,g as O,bv as M}from"./D7UiNNwv.js";import{d as j,m as q,j as u,b as o,h as e,c as y,f,w as r,e as s,g as n,s as d,k as p,al as z,t as $,F as B,q as L,p as A,r as G,am as P}from"./_GOFtDs5.js";import"./92s3wAHG.js";import"./Bu0Sw6DH.js";import"./BQ3I6Zb-.js";import"./CxFxslZw.js";const H=j({__name:"IntegrationLogo",props:{integration:{}},setup(w){const t=w,i=["adonisjs","astro","dotnet","elysiajs","express","fastapi","fastify","go","hono","laravel","litestar","nestjs","nextjs","nitro","nuxt","platformatic","react","rust","svelte"],k=q(()=>{const x="Openapi",l=t.integration?.toLocaleLowerCase();if(!l)return x;const m=l.charAt(0).toUpperCase()+l.slice(1);return i.includes(l)?m:x});return(x,l)=>(o(),u(e(h),{class:"h-full w-full rounded-lg",logo:k.value},null,8,["logo"]))}}),R={class:"flex flex-col gap-2"},X=j({__name:"SettingsAppearance",setup(w){const{colorMode:t,setColorMode:i}=F(),k=T({base:"w-full shadow-none text-c-1 justify-start pl-2 gap-2 border",variants:{active:{true:"bg-primary text-c-1 hover:bg-inherit",false:"bg-b-1 hover:bg-b-2"}}});return(x,l)=>(o(),y("div",R,[f(e(b),{class:d(e(g)(e(k)({active:e(t)==="system"}))),onClick:l[0]||(l[0]=m=>e(i)("system"))},{default:r(()=>[s("div",{class:d(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",{"bg-c-accent text-b-1 border-transparent":e(t)==="system"}])},[e(t)==="system"?(o(),u(e(h),{key:0,icon:"Checkmark",size:"xs",thickness:"3.5"})):p("",!0)],2),l[3]||(l[3]=n(" System Preference (default) ",-1))]),_:1},8,["class"]),f(e(b),{class:d(e(g)(e(k)({active:e(t)==="light"}))),onClick:l[1]||(l[1]=m=>e(i)("light"))},{default:r(()=>[s("div",{class:d(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",{"bg-c-accent text-b-1 border-transparent":e(t)==="light"}])},[e(t)==="light"?(o(),u(e(h),{key:0,icon:"Checkmark",size:"xs",thickness:"3.5"})):p("",!0)],2),l[4]||(l[4]=n(" Light Mode Always ",-1))]),_:1},8,["class"]),f(e(b),{class:d(e(g)(e(k)({active:e(t)==="dark"}))),onClick:l[2]||(l[2]=m=>e(i)("dark"))},{default:r(()=>[s("div",{class:d(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",{"bg-c-accent text-b-1 border-transparent":e(t)==="dark"}])},[e(t)==="dark"?(o(),u(e(h),{key:0,icon:"Checkmark",size:"xs",thickness:"3.5"})):p("",!0)],2),l[5]||(l[5]=n(" Dark Mode Always ",-1))]),_:1},8,["class"])]))}}),E={class:"flex flex-col gap-2"},J={key:0,class:"font-bold"},K={key:1,class:"text-c-2 mb-4 leading-[21px]"},S=j({__name:"SettingsSection",setup(w){return(t,i)=>(o(),y("div",E,[t.$slots.title?(o(),y("h3",J,[z(t.$slots,"title")])):p("",!0),t.$slots.description?(o(),y("p",K,[z(t.$slots,"description")])):p("",!0),z(t.$slots,"default")]))}}),Q={class:"bg-b-1 h-full w-full overflow-auto"},Y={class:"mr-auto ml-auto w-full max-w-[720px] px-5 py-5"},Z={class:"flex flex-col gap-8"},ee={class:"flex flex-col gap-2"},te={class:"flex flex-col gap-2"},ae={class:"grid grid-cols-2 gap-2"},se={class:"flex items-center gap-2"},re={class:"flex items-center gap-1"},le={class:"grid grid-cols-2 gap-2"},ce={class:"flex items-center gap-2"},oe={class:"flex items-center gap-1"},ne={class:"size-7 rounded-xl"},_="https://proxy.scalar.com",ie=j({__name:"SettingsGeneral",setup(w){const{activeWorkspace:t}=N(),{proxyUrl:i,workspaceMutators:k}=O(),x=["default","alternate","purple","solarized","saturn","kepler"],l=["elysiajs","fastify"],m=v=>({default:{light:"#fff",dark:"#0f0f0f",accent:"#0099ff"},alternate:{light:"#f9f9f9",dark:"#131313",accent:"#e7e7e7"},moon:{light:"#ccc9b3",dark:"#313332",accent:"#645b0f"},purple:{light:"#f5f6f8",dark:"#22252b",accent:"#5469d4"},solarized:{light:"#fdf6e3",dark:"#00212b",accent:"#007acc"},bluePlanet:{light:"#f0f2f5",dark:"#000e23",accent:"#e0e2e6"},saturn:{light:"#e4e4df",dark:"#2c2c30",accent:"#1763a6"},kepler:{light:"#f6f6f6",dark:"#0d0f1e",accent:"#7070ff"},mars:{light:"#f2efe8",dark:"#321116",accent:"#c75549"},deepSpace:{light:"#f4f4f5",dark:"#09090b",accent:"#8ab4f8"},laserwave:{light:"#f4f2f7",dark:"#27212e",accent:"#ed78c2"},none:{light:"#ffffff",dark:"#000000",accent:"#3b82f6"}})[v]||{light:"#ffffff",dark:"#000000",accent:"#3b82f6"},I=v=>k.edit(t.value?.uid,"themeId",v),C=T({base:"w-full shadow-none text-c-1 justify-start pl-2 gap-2 border",variants:{active:{true:"bg-primary text-c-1 hover:bg-inherit",false:"bg-b-1 hover:bg-b-2"}}}),U=v=>k.edit(t.value?.uid,"proxyUrl",v);return(v,a)=>(o(),y("div",Q,[s("div",Y,[s("div",Z,[a[13]||(a[13]=s("div",null,[s("h2",{class:"mt-10 text-xl font-bold"},"Settings")],-1)),f(S,null,{title:r(()=>[...a[3]||(a[3]=[n(" CORS Proxy ",-1)])]),description:r(()=>[...a[4]||(a[4]=[n(" Browsers block cross-origin requests for security. We provide a public proxy to ",-1),s("a",{class:"hover:text-c-1 underline-offset-2",href:"https://en.wikipedia.org/wiki/Cross-origin_resource_sharing",target:"_blank"}," bypass CORS issues ",-1),n(" . Check the ",-1),s("a",{class:"hover:text-c-1 underline-offset-2",href:"https://github.com/scalar/scalar/tree/main/examples/proxy-server",target:"_blank"}," source code on GitHub ",-1),n(" . ",-1)])]),default:r(()=>[s("div",ee,[f(e(b),{class:d(e(g)(e(C)({active:e(t)?.proxyUrl===_}))),onClick:a[0]||(a[0]=c=>U(_))},{default:r(()=>[s("div",{class:d(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",{"bg-c-accent text-b-1 border-transparent":e(t)?.proxyUrl===_}])},[e(t)?.proxyUrl===_?(o(),u(e(h),{key:0,icon:"Checkmark",size:"xs",thickness:"3.5"})):p("",!0)],2),a[5]||(a[5]=n(" Use proxy.scalar.com (default) ",-1))]),_:1},8,["class"]),e(i)&&e(i)!==_?(o(),u(e(b),{key:0,class:d(e(g)(e(C)({active:e(t)?.proxyUrl===e(i)}))),onClick:a[1]||(a[1]=c=>U(e(i)))},{default:r(()=>[s("div",{class:d(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",{"bg-c-accent text-b-1 border-transparent":e(t)?.proxyUrl===e(i)}])},[e(t)?.proxyUrl===e(i)?(o(),u(e(h),{key:0,icon:"Checkmark",size:"xs",thickness:"3.5"})):p("",!0)],2),n(" Use custom proxy ("+$(e(i))+") ",1)]),_:1},8,["class"])):p("",!0),f(e(b),{class:d(e(g)(e(C)({active:!e(t)?.proxyUrl}))),onClick:a[2]||(a[2]=c=>U(void 0))},{default:r(()=>[s("div",{class:d(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",!e(t)?.proxyUrl&&"bg-c-accent text-b-1 border-transparent"])},[e(t)?.proxyUrl?p("",!0):(o(),u(e(h),{key:0,icon:"Checkmark",size:"xs",thickness:"3.5"}))],2),a[6]||(a[6]=n(" Skip the proxy ",-1))]),_:1},8,["class"])])]),_:1}),f(S,null,{title:r(()=>[...a[7]||(a[7]=[n(" Themes ",-1)])]),description:r(()=>[...a[8]||(a[8]=[n(" We've got a whole rainbow of themes for you to play with: ",-1)])]),default:r(()=>[s("div",te,[s("div",ae,[(o(),y(B,null,L(x,c=>f(e(b),{key:c,class:d(e(g)(e(C)({active:e(t)?.themeId===c}))),onClick:V=>I(c)},{default:r(()=>[s("div",se,[s("div",{class:d(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",{"bg-c-accent text-b-1 border-transparent":e(t)?.themeId===c}])},[e(t)?.themeId===c?(o(),u(e(h),{key:0,icon:"Checkmark",size:"xs",thickness:"3.5"})):p("",!0)],2),n(" "+$(e(M)[c]),1)]),s("div",re,[s("span",{class:"border-c-3 -mr-3 inline-block h-5 w-5 rounded-full",style:A({backgroundColor:m(c).light})},null,4),s("span",{class:"border-c-3 -mr-3 inline-block h-5 w-5 rounded-full",style:A({backgroundColor:m(c).dark})},null,4),s("span",{class:"border-c-3 inline-block h-5 w-5 rounded-full",style:A({backgroundColor:m(c).accent})},null,4)])]),_:2},1032,["class","onClick"])),64))])])]),_:1}),f(S,null,{title:r(()=>[...a[9]||(a[9]=[n(" Framework Themes ",-1)])]),description:r(()=>[...a[10]||(a[10]=[n(" Are you a real fan? Show your support by using your favorite framework's theme! ",-1)])]),default:r(()=>[s("div",le,[(o(),y(B,null,L(l,c=>f(e(b),{key:c,class:d(e(g)(e(C)({active:e(t)?.themeId===c}))),onClick:V=>I(c)},{default:r(()=>[s("div",ce,[s("div",{class:d(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",{"bg-c-accent text-b-1 border-transparent":e(t)?.themeId===c}])},[e(t)?.themeId===c?(o(),u(e(h),{key:0,icon:"Checkmark",size:"xs",thickness:"3.5"})):p("",!0)],2),n(" "+$(e(M)[c]),1)]),s("div",oe,[s("div",ne,[f(H,{integration:c},null,8,["integration"])])])]),_:2},1032,["class","onClick"])),64))])]),_:1}),f(S,null,{title:r(()=>[...a[11]||(a[11]=[n(" Appearance ",-1)])]),description:r(()=>[...a[12]||(a[12]=[n(" Choose between light, dark, or system-based appearance for your workspace. ",-1)])]),default:r(()=>[f(X)]),_:1})])])]))}}),be=j({__name:"Settings",setup(w){const t={general:{component:ie,title:"general"}},i=G("general");return(k,x)=>(o(),u(W,null,{default:r(()=>[f(D,{class:"flex-1"},{default:r(()=>[t[i.value]?(o(),u(P(t[i.value].component),{key:0})):p("",!0)]),_:1})]),_:1}))}});export{be as default};
@@ -1 +1 @@
1
- import{g as P,aA as q,ay as K,av as L,T,aC as Q,aD as ne,N as te,d as oe,M as O,r as se,L as H}from"./BajA-R3t.js";import{m as ie}from"./DU_LmBMB.js";import{w as re}from"./DKgemWiE.js";import{C as ce}from"./rEg4ipuK.js";import{b as ue}from"./DEvRa3of.js";import{J as ve,M as de}from"./D0qgRfni.js";import{d as X,r as V,m as W,n as R,j as $,o as me,b as g,w as f,f as u,c as Y,g as U,F as Z,q as ee,s as fe,ay as pe,h as n,k as ae,A as he,z as J,e as p,p as be,t as ke}from"./DKB4Mc1Q.js";import{x as G,H as ye}from"./_NYypPKu.js";import"./92s3wAHG.js";import"./CLW3obj5.js";import"./N7kSzZAV.js";import"./Bc3I1G9W.js";import"./WK5WZELE.js";const xe=X({__name:"EnvironmentForm",props:{collection:{},environment:{},workspace:{},envVariables:{}},setup(r){const{collectionMutators:t}=P(),s=V([]),z=V(new Set),k=V(new Map),h=V(!1),_=W(()=>{if(!r.environment?.value)return[{key:"",value:""}];try{const e=JSON.parse(r.environment.value),l=Object.entries(e).map(([o,a])=>({key:o,value:String(a)}));return l.length===0?[{key:"",value:""}]:l}catch{return[{key:"",value:""}]}}),F=W(()=>{const e=s.value[s.value.length-1];return e?e.key||e.value?[...s.value,{key:"",value:""}]:s.value:[{key:"",value:""}]}),w=W(()=>{const e=new Map;return s.value.forEach((l,o)=>{if(l.key){const a=e.get(l.key)||[];a.push(o),e.set(l.key,a)}}),k.value.forEach((l,o)=>{if(l){const a=e.get(l)||[];a.push(o),e.set(l,a)}}),Array.from(e.values()).filter(l=>l.length>1).flat()});R(_,e=>{s.value=[...e],z.value=new Set(e.map(l=>l.key).filter(Boolean))},{immediate:!0});const M=async(e,l,o)=>{if(!h.value){if(l==="key"){k.value.set(e,o);const a=new Set(z.value),d=s.value[e];if(d&&a.delete(d.key),a.has(o))return}h.value=!0;try{const a=[...s.value],d=a[e];if(!d)return;a[e]={key:l==="key"?o:d.key,value:l==="value"?o:d.value},!a[e].key&&!a[e].value&&e!==a.length-1&&a.splice(e,1);const S=a.reduce((b,{key:B,value:D})=>((B||D)&&(b[B]=D),b),{});if(r.collection){const b={...r.collection["x-scalar-environments"],[r.environment.name]:{...r.collection["x-scalar-environments"]?.[r.environment.name],variables:S}};await t.edit(r.collection.uid,"x-scalar-environments",b)}if(e===s.value.length-1){const b=a[a.length-1];b&&(b.key||b.value)&&await v()}await J(),s.value=a,l==="key"&&(z.value=new Set(a.map(b=>b.key).filter(Boolean)),k.value.delete(e))}finally{h.value=!1}}},v=async()=>{if(!h.value){h.value=!0;try{const e=[...s.value,{key:"",value:""}],l=e.reduce((o,{key:a,value:d})=>((a||d)&&(o[a]=d),o),{});if(r.collection){const o={...r.collection["x-scalar-environments"],[r.environment.name]:{...r.collection["x-scalar-environments"]?.[r.environment.name],variables:l}};await t.edit(r.collection.uid,"x-scalar-environments",o)}await J(),s.value=e}finally{h.value=!1}}},E=async e=>{if(!h.value){h.value=!0;try{const l=[...s.value];l.splice(e,1);const o=l.reduce((a,{key:d,value:S})=>((d||S)&&(a[d]=S),a),{});if(r.collection){const a={...r.collection["x-scalar-environments"],[r.environment.name]:{...r.collection["x-scalar-environments"]?.[r.environment.name],variables:o}};await t.edit(r.collection.uid,"x-scalar-environments",a)}await J(),s.value=l}finally{h.value=!1}}},A=async()=>{if(s.value.length===0)await v();else if(s.value.length>=1){const e=s.value[s.value.length-1];e&&(e.key||e.value)&&await v()}};return me(()=>{A()}),R(()=>s.value,()=>{A()}),(e,l)=>(g(),$(ne,{class:"group/table flex-1",columns:["",""]},{default:f(()=>[u(q,{class:"sr-only !block"},{default:f(()=>[u(G,null,{default:f(()=>[...l[0]||(l[0]=[U("Key",-1)])]),_:1}),u(G,null,{default:f(()=>[...l[1]||(l[1]=[U("Value",-1)])]),_:1})]),_:1}),(g(!0),Y(Z,null,ee(F.value,(o,a)=>(g(),$(q,{key:a,class:fe({error:w.value.includes(a)})},{default:f(()=>[u(K,null,{default:f(()=>[u(L,{disableCloseBrackets:"",disableEnter:"",disableTabIndent:"",lineWrapping:"",environment:e.environment,envVariables:e.envVariables,modelValue:o.key,placeholder:"Key",workspace:e.workspace,"onUpdate:modelValue":d=>M(a,"key",d)},pe({_:2},[w.value.includes(a)?{name:"icon",fn:f(()=>[u(n(ye),{class:"text-red mr-0.75 size-3.5 brightness-[.9]"})]),key:"0"}:void 0]),1032,["environment","envVariables","modelValue","workspace","onUpdate:modelValue"])]),_:2},1024),u(K,null,{default:f(()=>[u(L,{class:"pr-6 group-hover:pr-10 group-has-[.cm-focused]:pr-10",disableCloseBrackets:"",disableEnter:"",disableTabIndent:"",lineWrapping:"",environment:e.environment,envVariables:e.envVariables,modelValue:o.value,placeholder:"Value",workspace:e.workspace,"onUpdate:modelValue":d=>M(a,"value",d)},{icon:f(()=>[o.key||o.value?(g(),$(n(T),{key:0,class:"text-c-2 hover:text-c-1 hover:bg-b-2 z-context hidden h-fit rounded p-1 group-hover:flex group-has-[.cm-focused]:flex",size:"sm",variant:"ghost",onClick:he(d=>E(a),["stop"])},{default:f(()=>[u(n(Q),{class:"size-3.5"})]),_:1},8,["onClick"])):ae("",!0)]),_:2},1032,["environment","envVariables","modelValue","workspace","onUpdate:modelValue"])]),_:2},1024)]),_:2},1032,["class"]))),128))]),_:1}))}}),ge=te(xe,[["__scopeId","data-v-83bfcc8a"]]),we={class:"flex h-full w-full flex-col gap-12 px-1.5 pt-8"},Ce={class:"flex flex-col gap-4"},Ve={class:"rounded-lg border"},_e={class:"bg-b-2 flex cursor-grab items-center justify-between rounded-t-lg px-1 py-1 text-sm"},Fe={class:"flex items-center"},Ee=["onClick"],Se={class:"text-c-3 flex h-full items-center justify-center rounded-lg border p-4"},Je=X({__name:"CollectionEnvironment",setup(r){const{activeCollection:t,activeWorkspace:s,activeEnvVariables:z}=oe(),{collectionMutators:k}=P(),h=O(),_=O(),F=O(),w=O(),M=V(""),v=V(null),E=V(void 0),A=W(()=>t.value?.["x-scalar-environments"]?Object.entries(t.value["x-scalar-environments"]).map(([c,i])=>({uid:c,name:c,value:JSON.stringify(i.variables||{}),color:i.color||"#FFFFFF"})):[]),e=()=>{!t.value?.uid||!v.value||(k.removeEnvironment(v.value,t.value.uid),_.hide())},l=c=>{v.value=c,_.show()},o=c=>{t.value?.uid&&(k.addEnvironment(c.name,{variables:{},color:c.color},t.value.uid),F.hide())},a=c=>{v.value=c.name,M.value=c.color||"#FFFFFF",h.show()},d=c=>{if(!t.value?.uid||!v.value)return;const i={...t.value["x-scalar-environments"],[v.value]:{variables:t.value["x-scalar-environments"]?.[v.value]?.variables||{},color:c}};k.edit(t.value.uid,"x-scalar-environments",i),h.hide()},S=c=>{v.value=c,E.value=c,w.show()},b=()=>{v.value=null,E.value=void 0,w.hide()},B=c=>{if(!t.value?.uid||!v.value)return;const i={...t.value["x-scalar-environments"]};if(!i[v.value])return;const m={},y=Object.entries(i),x=y.findIndex(([C])=>C===v.value);y.forEach(([C,N],I)=>{I===x?m[c]=N:m[C]=N}),k.edit(t.value.uid,"x-scalar-environments",m),v.value=null,E.value=void 0,w.hide()},D=(c,i)=>{if(!t.value?.uid)return;const m={...t.value["x-scalar-environments"]},y={},x=Object.entries(m),C=x.findIndex(([j])=>j===c.id),N=x.findIndex(([j])=>j===i.id);if(C===-1||N===-1)return;const I=x[C];I&&(x.splice(C,1),x.splice(N,0,I),x.forEach(([j,le])=>{y[j]=le}),k.edit(t.value.uid,"x-scalar-environments",y))};return(c,i)=>(g(),$(ue,null,{default:f(()=>[p("div",we,[p("div",Ce,[i[5]||(i[5]=p("div",{class:"flex items-start justify-between gap-2"},[p("div",{class:"flex flex-col gap-2"},[p("div",{class:"flex h-8 items-center"},[p("h3",{class:"font-bold"},"Environment Variables")]),p("p",{class:"text-sm"},[U(" Set environment variables at your collection level. Use "),p("code",{class:"font-code text-c-2"},"{{ variable }}"),U(" to add / search among the selected environment's variables in your request inputs. ")])])],-1)),(g(!0),Y(Z,null,ee(A.value,m=>(g(),$(n(ie),{key:m.name,id:m.name,isDraggable:!0,isDroppable:!0,parentIds:[],onOnDragEnd:D},{default:f(()=>[p("div",Ve,[p("div",_e,[p("div",Fe,[u(n(T),{class:"hover:bg-b-3 flex h-6 w-6 p-1",onClick:y=>a(m),variant:"ghost"},{default:f(()=>[p("span",{style:be({backgroundColor:m.color||"#FFFFFF"}),class:"h-2.5 w-2.5 rounded-full"},null,4)]),_:2},1032,["onClick"]),p("button",{class:"hover:bg-b-3 rounded px-1 py-0.5 text-sm",onClick:y=>S(m.name)},ke(m.name),9,Ee)]),u(n(T),{class:"hover:bg-b-3 hover:text-c-1 h-fit p-1.25",variant:"ghost",onClick:y=>l(m.name)},{default:f(()=>[u(n(Q),{class:"size-3.5"})]),_:1},8,["onClick"])]),n(t)&&n(s)?(g(),$(ge,{key:0,collection:n(t),environment:m,envVariables:n(z),workspace:n(s)},null,8,["collection","environment","envVariables","workspace"])):ae("",!0)])]),_:2},1032,["id"]))),128)),p("div",Se,[u(n(T),{class:"hover:bg-b-2 hover:text-c-1 flex items-center gap-2",size:"sm",variant:"ghost",onClick:i[0]||(i[0]=m=>n(F).show())},{default:f(()=>[u(n(se),{class:"inline-flex",icon:"Add",size:"sm",thickness:"1.5"}),i[4]||(i[4]=p("span",null,"Add Environment",-1))]),_:1})])]),u(n(H),{size:"xxs",state:n(_),title:`Delete ${v.value||"Environment"}`},{default:f(()=>[u(re,{variableName:"Environment",warningMessage:"Are you sure you want to delete this environment? This action cannot be undone.",onClose:i[1]||(i[1]=m=>n(_).hide()),onDelete:e})]),_:1},8,["state","title"]),u(ve,{activeWorkspaceCollections:n(t)?[n(t)]:[],collectionId:n(t)?.uid,state:n(F),onCancel:i[2]||(i[2]=m=>n(F).hide()),onSubmit:o},null,8,["activeWorkspaceCollections","collectionId","state"]),u(de,{selectedColor:M.value,state:n(h),onCancel:i[3]||(i[3]=m=>n(h).hide()),onSubmit:d},null,8,["selectedColor","state"]),u(n(H),{size:"xxs",state:n(w),title:`Edit ${v.value}`},{default:f(()=>[u(ce,{name:E.value??"",onClose:b,onEdit:B},null,8,["name"])]),_:1},8,["state","title"])])]),_:1}))}});export{Je as default};
1
+ import{g as P,aA as q,ay as K,av as L,T,aC as Q,aD as ne,N as te,d as oe,M as O,r as se,L as H}from"./D7UiNNwv.js";import{m as ie}from"./Cxse0Kvr.js";import{w as re}from"./BbUL7hnj.js";import{C as ce}from"./DuK-C58J.js";import{b as ue}from"./3z6Bx0TK.js";import{J as ve,M as de}from"./BAdDJAIJ.js";import{d as X,r as V,m as W,n as R,j as $,o as me,b as g,w as f,f as u,c as Y,g as U,F as Z,q as ee,s as fe,ay as pe,h as n,k as ae,A as he,z as J,e as p,p as be,t as ke}from"./_GOFtDs5.js";import{x as G,H as ye}from"./XSV2zb2_.js";import"./92s3wAHG.js";import"./Bu0Sw6DH.js";import"./BQ3I6Zb-.js";import"./CxFxslZw.js";import"./ClZ7SeE6.js";const xe=X({__name:"EnvironmentForm",props:{collection:{},environment:{},workspace:{},envVariables:{}},setup(r){const{collectionMutators:t}=P(),s=V([]),z=V(new Set),k=V(new Map),h=V(!1),_=W(()=>{if(!r.environment?.value)return[{key:"",value:""}];try{const e=JSON.parse(r.environment.value),l=Object.entries(e).map(([o,a])=>({key:o,value:String(a)}));return l.length===0?[{key:"",value:""}]:l}catch{return[{key:"",value:""}]}}),F=W(()=>{const e=s.value[s.value.length-1];return e?e.key||e.value?[...s.value,{key:"",value:""}]:s.value:[{key:"",value:""}]}),w=W(()=>{const e=new Map;return s.value.forEach((l,o)=>{if(l.key){const a=e.get(l.key)||[];a.push(o),e.set(l.key,a)}}),k.value.forEach((l,o)=>{if(l){const a=e.get(l)||[];a.push(o),e.set(l,a)}}),Array.from(e.values()).filter(l=>l.length>1).flat()});R(_,e=>{s.value=[...e],z.value=new Set(e.map(l=>l.key).filter(Boolean))},{immediate:!0});const M=async(e,l,o)=>{if(!h.value){if(l==="key"){k.value.set(e,o);const a=new Set(z.value),d=s.value[e];if(d&&a.delete(d.key),a.has(o))return}h.value=!0;try{const a=[...s.value],d=a[e];if(!d)return;a[e]={key:l==="key"?o:d.key,value:l==="value"?o:d.value},!a[e].key&&!a[e].value&&e!==a.length-1&&a.splice(e,1);const S=a.reduce((b,{key:B,value:D})=>((B||D)&&(b[B]=D),b),{});if(r.collection){const b={...r.collection["x-scalar-environments"],[r.environment.name]:{...r.collection["x-scalar-environments"]?.[r.environment.name],variables:S}};await t.edit(r.collection.uid,"x-scalar-environments",b)}if(e===s.value.length-1){const b=a[a.length-1];b&&(b.key||b.value)&&await v()}await J(),s.value=a,l==="key"&&(z.value=new Set(a.map(b=>b.key).filter(Boolean)),k.value.delete(e))}finally{h.value=!1}}},v=async()=>{if(!h.value){h.value=!0;try{const e=[...s.value,{key:"",value:""}],l=e.reduce((o,{key:a,value:d})=>((a||d)&&(o[a]=d),o),{});if(r.collection){const o={...r.collection["x-scalar-environments"],[r.environment.name]:{...r.collection["x-scalar-environments"]?.[r.environment.name],variables:l}};await t.edit(r.collection.uid,"x-scalar-environments",o)}await J(),s.value=e}finally{h.value=!1}}},E=async e=>{if(!h.value){h.value=!0;try{const l=[...s.value];l.splice(e,1);const o=l.reduce((a,{key:d,value:S})=>((d||S)&&(a[d]=S),a),{});if(r.collection){const a={...r.collection["x-scalar-environments"],[r.environment.name]:{...r.collection["x-scalar-environments"]?.[r.environment.name],variables:o}};await t.edit(r.collection.uid,"x-scalar-environments",a)}await J(),s.value=l}finally{h.value=!1}}},A=async()=>{if(s.value.length===0)await v();else if(s.value.length>=1){const e=s.value[s.value.length-1];e&&(e.key||e.value)&&await v()}};return me(()=>{A()}),R(()=>s.value,()=>{A()}),(e,l)=>(g(),$(ne,{class:"group/table flex-1",columns:["",""]},{default:f(()=>[u(q,{class:"sr-only !block"},{default:f(()=>[u(G,null,{default:f(()=>[...l[0]||(l[0]=[U("Key",-1)])]),_:1}),u(G,null,{default:f(()=>[...l[1]||(l[1]=[U("Value",-1)])]),_:1})]),_:1}),(g(!0),Y(Z,null,ee(F.value,(o,a)=>(g(),$(q,{key:a,class:fe({error:w.value.includes(a)})},{default:f(()=>[u(K,null,{default:f(()=>[u(L,{disableCloseBrackets:"",disableEnter:"",disableTabIndent:"",lineWrapping:"",environment:e.environment,envVariables:e.envVariables,modelValue:o.key,placeholder:"Key",workspace:e.workspace,"onUpdate:modelValue":d=>M(a,"key",d)},pe({_:2},[w.value.includes(a)?{name:"icon",fn:f(()=>[u(n(ye),{class:"text-red mr-0.75 size-3.5 brightness-[.9]"})]),key:"0"}:void 0]),1032,["environment","envVariables","modelValue","workspace","onUpdate:modelValue"])]),_:2},1024),u(K,null,{default:f(()=>[u(L,{class:"pr-6 group-hover:pr-10 group-has-[.cm-focused]:pr-10",disableCloseBrackets:"",disableEnter:"",disableTabIndent:"",lineWrapping:"",environment:e.environment,envVariables:e.envVariables,modelValue:o.value,placeholder:"Value",workspace:e.workspace,"onUpdate:modelValue":d=>M(a,"value",d)},{icon:f(()=>[o.key||o.value?(g(),$(n(T),{key:0,class:"text-c-2 hover:text-c-1 hover:bg-b-2 z-context hidden h-fit rounded p-1 group-hover:flex group-has-[.cm-focused]:flex",size:"sm",variant:"ghost",onClick:he(d=>E(a),["stop"])},{default:f(()=>[u(n(Q),{class:"size-3.5"})]),_:1},8,["onClick"])):ae("",!0)]),_:2},1032,["environment","envVariables","modelValue","workspace","onUpdate:modelValue"])]),_:2},1024)]),_:2},1032,["class"]))),128))]),_:1}))}}),ge=te(xe,[["__scopeId","data-v-83bfcc8a"]]),we={class:"flex h-full w-full flex-col gap-12 px-1.5 pt-8"},Ce={class:"flex flex-col gap-4"},Ve={class:"rounded-lg border"},_e={class:"bg-b-2 flex cursor-grab items-center justify-between rounded-t-lg px-1 py-1 text-sm"},Fe={class:"flex items-center"},Ee=["onClick"],Se={class:"text-c-3 flex h-full items-center justify-center rounded-lg border p-4"},Je=X({__name:"CollectionEnvironment",setup(r){const{activeCollection:t,activeWorkspace:s,activeEnvVariables:z}=oe(),{collectionMutators:k}=P(),h=O(),_=O(),F=O(),w=O(),M=V(""),v=V(null),E=V(void 0),A=W(()=>t.value?.["x-scalar-environments"]?Object.entries(t.value["x-scalar-environments"]).map(([c,i])=>({uid:c,name:c,value:JSON.stringify(i.variables||{}),color:i.color||"#FFFFFF"})):[]),e=()=>{!t.value?.uid||!v.value||(k.removeEnvironment(v.value,t.value.uid),_.hide())},l=c=>{v.value=c,_.show()},o=c=>{t.value?.uid&&(k.addEnvironment(c.name,{variables:{},color:c.color},t.value.uid),F.hide())},a=c=>{v.value=c.name,M.value=c.color||"#FFFFFF",h.show()},d=c=>{if(!t.value?.uid||!v.value)return;const i={...t.value["x-scalar-environments"],[v.value]:{variables:t.value["x-scalar-environments"]?.[v.value]?.variables||{},color:c}};k.edit(t.value.uid,"x-scalar-environments",i),h.hide()},S=c=>{v.value=c,E.value=c,w.show()},b=()=>{v.value=null,E.value=void 0,w.hide()},B=c=>{if(!t.value?.uid||!v.value)return;const i={...t.value["x-scalar-environments"]};if(!i[v.value])return;const m={},y=Object.entries(i),x=y.findIndex(([C])=>C===v.value);y.forEach(([C,N],I)=>{I===x?m[c]=N:m[C]=N}),k.edit(t.value.uid,"x-scalar-environments",m),v.value=null,E.value=void 0,w.hide()},D=(c,i)=>{if(!t.value?.uid)return;const m={...t.value["x-scalar-environments"]},y={},x=Object.entries(m),C=x.findIndex(([j])=>j===c.id),N=x.findIndex(([j])=>j===i.id);if(C===-1||N===-1)return;const I=x[C];I&&(x.splice(C,1),x.splice(N,0,I),x.forEach(([j,le])=>{y[j]=le}),k.edit(t.value.uid,"x-scalar-environments",y))};return(c,i)=>(g(),$(ue,null,{default:f(()=>[p("div",we,[p("div",Ce,[i[5]||(i[5]=p("div",{class:"flex items-start justify-between gap-2"},[p("div",{class:"flex flex-col gap-2"},[p("div",{class:"flex h-8 items-center"},[p("h3",{class:"font-bold"},"Environment Variables")]),p("p",{class:"text-sm"},[U(" Set environment variables at your collection level. Use "),p("code",{class:"font-code text-c-2"},"{{ variable }}"),U(" to add / search among the selected environment's variables in your request inputs. ")])])],-1)),(g(!0),Y(Z,null,ee(A.value,m=>(g(),$(n(ie),{key:m.name,id:m.name,isDraggable:!0,isDroppable:!0,parentIds:[],onOnDragEnd:D},{default:f(()=>[p("div",Ve,[p("div",_e,[p("div",Fe,[u(n(T),{class:"hover:bg-b-3 flex h-6 w-6 p-1",onClick:y=>a(m),variant:"ghost"},{default:f(()=>[p("span",{style:be({backgroundColor:m.color||"#FFFFFF"}),class:"h-2.5 w-2.5 rounded-full"},null,4)]),_:2},1032,["onClick"]),p("button",{class:"hover:bg-b-3 rounded px-1 py-0.5 text-sm",onClick:y=>S(m.name)},ke(m.name),9,Ee)]),u(n(T),{class:"hover:bg-b-3 hover:text-c-1 h-fit p-1.25",variant:"ghost",onClick:y=>l(m.name)},{default:f(()=>[u(n(Q),{class:"size-3.5"})]),_:1},8,["onClick"])]),n(t)&&n(s)?(g(),$(ge,{key:0,collection:n(t),environment:m,envVariables:n(z),workspace:n(s)},null,8,["collection","environment","envVariables","workspace"])):ae("",!0)])]),_:2},1032,["id"]))),128)),p("div",Se,[u(n(T),{class:"hover:bg-b-2 hover:text-c-1 flex items-center gap-2",size:"sm",variant:"ghost",onClick:i[0]||(i[0]=m=>n(F).show())},{default:f(()=>[u(n(se),{class:"inline-flex",icon:"Add",size:"sm",thickness:"1.5"}),i[4]||(i[4]=p("span",null,"Add Environment",-1))]),_:1})])]),u(n(H),{size:"xxs",state:n(_),title:`Delete ${v.value||"Environment"}`},{default:f(()=>[u(re,{variableName:"Environment",warningMessage:"Are you sure you want to delete this environment? This action cannot be undone.",onClose:i[1]||(i[1]=m=>n(_).hide()),onDelete:e})]),_:1},8,["state","title"]),u(ve,{activeWorkspaceCollections:n(t)?[n(t)]:[],collectionId:n(t)?.uid,state:n(F),onCancel:i[2]||(i[2]=m=>n(F).hide()),onSubmit:o},null,8,["activeWorkspaceCollections","collectionId","state"]),u(de,{selectedColor:M.value,state:n(h),onCancel:i[3]||(i[3]=m=>n(h).hide()),onSubmit:d},null,8,["selectedColor","state"]),u(n(H),{size:"xxs",state:n(w),title:`Edit ${v.value}`},{default:f(()=>[u(ce,{name:E.value??"",onClose:b,onEdit:B},null,8,["name"])]),_:1},8,["state","title"])])]),_:1}))}});export{Je as default};
@@ -1 +1 @@
1
- import{_ as D}from"./DDABJbm9.js";import{d as E,H as F,r as h,x as v,m as I,n as L,v as N,c as i,f as R,e as t,h as a,t as c,A as x,D as B,E as V,I as O,F as U,q as W,b as m,_ as j}from"./DKB4Mc1Q.js";import{d as q}from"./C0Rlrcoy.js";import{u as z}from"./N7kSzZAV.js";import{u as J}from"./D6PNtP0_.js";import{u as y}from"./CLW3obj5.js";import{u as P}from"./DTcXWbr5.js";import"./B2RgqbNO.js";const Y={class:"issue-comments-page"},G={class:"comments-content card"},K=["placeholder"],Q=["disabled"],X={key:0,class:"loading"},Z={key:1,class:"empty"},ee={key:2,class:"comments-list"},te={class:"comment-header"},se={class:"comment-author"},oe={class:"comment-date"},ae=["innerHTML"],ne=E({__name:"comments",async setup(re){let s,l;const b=F(),{success:g,error:w}=z(),{getErrorMessage:$}=J(),u=b.params.id,o=h(""),d=h(!1),{data:n}=([s,l]=v(()=>y(`/api/issues/${u}`,"$sHdW2Rruhz")),s=await s,l(),s),C=I(()=>{if(!n.value)return null;const e={id:n.value.key,title:n.value.title,column:n.value.column_slug};return n.value.priority&&(e.priority=n.value.priority),e}),{data:p,status:k,refresh:_}=([s,l]=v(()=>y(`/api/issues/${u}/comments`,"$2TYRtwuSoA")),s=await s,l(),s),{lastMessage:S}=P();L(S,e=>{e?.type==="comment"&&e.issueId===u&&_()});const H=e=>new Date(e).toLocaleString(),M=e=>q(e),A=async()=>{if(o.value.trim()){d.value=!0;try{await fetch(`/api/issues/${u}/comments`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:o.value})}),o.value="",g("Comment added"),_()}catch(e){w($(e,"Failed to add comment"))}finally{d.value=!1}}};return N({title:`Comments - ${u} - AutoCode`}),(e,f)=>{const T=D;return m(),i("div",Y,[R(T,{issue:a(C),"active-tab":"comments"},null,8,["issue"]),t("div",G,[t("h2",null,c(e.$t("issue.comments")),1),t("form",{class:"comment-form",onSubmit:x(A,["prevent"])},[B(t("textarea",{"onUpdate:modelValue":f[0]||(f[0]=r=>O(o)?o.value=r:null),class:"form-input comment-input",placeholder:e.$t("issue.addComment"),rows:"3"},null,8,K),[[V,a(o)]]),t("button",{type:"submit",class:"btn btn-primary",disabled:!a(o).trim()||a(d)},c(e.$t("form.save")),9,Q)],32),a(k)==="pending"?(m(),i("div",X,c(e.$t("app.loading")),1)):a(p)?.length?(m(),i("ul",ee,[(m(!0),i(U,null,W(a(p),r=>(m(),i("li",{key:r.id,class:"comment"},[t("div",te,[t("span",se,c(r.author||"User"),1),t("time",oe,c(H(r.createdAt)),1)]),t("div",{class:"comment-body",innerHTML:M(r.content)},null,8,ae)]))),128))])):(m(),i("div",Z,c(e.$t("issue.noComments")),1))])])}}}),fe=j(ne,[["__scopeId","data-v-b988772a"]]);export{fe as default};
1
+ import{_ as D}from"./ClrPQ_cX.js";import{d as E,H as F,r as h,x as v,m as I,n as L,v as N,c as i,f as R,e as t,h as a,t as c,A as x,D as B,E as V,I as O,F as U,q as W,b as m,_ as j}from"./_GOFtDs5.js";import{d as q}from"./C0Rlrcoy.js";import{u as z}from"./BQ3I6Zb-.js";import{u as J}from"./CeyWHUCw.js";import{u as y}from"./Bu0Sw6DH.js";import{u as P}from"./gSUFBi_6.js";import"./BuPN94lV.js";const Y={class:"issue-comments-page"},G={class:"comments-content card"},K=["placeholder"],Q=["disabled"],X={key:0,class:"loading"},Z={key:1,class:"empty"},ee={key:2,class:"comments-list"},te={class:"comment-header"},se={class:"comment-author"},oe={class:"comment-date"},ae=["innerHTML"],ne=E({__name:"comments",async setup(re){let s,l;const b=F(),{success:g,error:w}=z(),{getErrorMessage:$}=J(),u=b.params.id,o=h(""),d=h(!1),{data:n}=([s,l]=v(()=>y(`/api/issues/${u}`,"$sHdW2Rruhz")),s=await s,l(),s),C=I(()=>{if(!n.value)return null;const e={id:n.value.key,title:n.value.title,column:n.value.column_slug};return n.value.priority&&(e.priority=n.value.priority),e}),{data:p,status:k,refresh:_}=([s,l]=v(()=>y(`/api/issues/${u}/comments`,"$2TYRtwuSoA")),s=await s,l(),s),{lastMessage:S}=P();L(S,e=>{e?.type==="comment"&&e.issueId===u&&_()});const H=e=>new Date(e).toLocaleString(),M=e=>q(e),A=async()=>{if(o.value.trim()){d.value=!0;try{await fetch(`/api/issues/${u}/comments`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:o.value})}),o.value="",g("Comment added"),_()}catch(e){w($(e,"Failed to add comment"))}finally{d.value=!1}}};return N({title:`Comments - ${u} - AutoCode`}),(e,f)=>{const T=D;return m(),i("div",Y,[R(T,{issue:a(C),"active-tab":"comments"},null,8,["issue"]),t("div",G,[t("h2",null,c(e.$t("issue.comments")),1),t("form",{class:"comment-form",onSubmit:x(A,["prevent"])},[B(t("textarea",{"onUpdate:modelValue":f[0]||(f[0]=r=>O(o)?o.value=r:null),class:"form-input comment-input",placeholder:e.$t("issue.addComment"),rows:"3"},null,8,K),[[V,a(o)]]),t("button",{type:"submit",class:"btn btn-primary",disabled:!a(o).trim()||a(d)},c(e.$t("form.save")),9,Q)],32),a(k)==="pending"?(m(),i("div",X,c(e.$t("app.loading")),1)):a(p)?.length?(m(),i("ul",ee,[(m(!0),i(U,null,W(a(p),r=>(m(),i("li",{key:r.id,class:"comment"},[t("div",te,[t("span",se,c(r.author||"User"),1),t("time",oe,c(H(r.createdAt)),1)]),t("div",{class:"comment-body",innerHTML:M(r.content)},null,8,ae)]))),128))])):(m(),i("div",Z,c(e.$t("issue.noComments")),1))])])}}}),fe=j(ne,[["__scopeId","data-v-b988772a"]]);export{fe as default};
@@ -1 +1 @@
1
- import{d as w,r as g,D as B,at as C,h as e,c as p,b as n,al as l,k as m,e as i,t as L,s as k,F as N,p as I,j as x,w as z}from"./DKB4Mc1Q.js";import{m as D,g as F,b as E,ba as X,N as j,T as R}from"./BajA-R3t.js";import{E as V}from"./jNB-5CTq.js";const W={key:0,class:"xl:min-h-header flex min-h-12 items-center justify-between px-3 py-1.5 text-sm md:px-[18px] md:py-2.5"},q={class:"m-0 text-sm font-medium whitespace-nowrap"},M={class:"bg-b-1 sticky bottom-0 z-10 w-[inherit] pt-0 has-[.empty-sidebar-item]:border-t md:px-2.5 md:pb-2.5"},O=w({__name:"Sidebar",props:{title:{}},setup(b){const{isSidebarOpen:u}=D(),{sidebarWidth:s,setSidebarWidth:r}=F(),{layout:o}=E(),d=g(!1),v=g(null),{breakpoints:c}=X(),S=t=>{t.preventDefault();const f=t.clientX,_=Number.parseInt(getComputedStyle(v.value).width||s.value,10),h=$=>{d.value=!0,document.body.classList.add("dragging");let a=_+$.clientX-f;a>420&&(a=420+(a-420)*.2),a<240&&(a=240),r(`${a}px`)},y=()=>{d.value=!1,document.body.classList.remove("dragging"),document.documentElement.removeEventListener("mousemove",h,!1),document.documentElement.removeEventListener("mouseup",y,!1),Number.parseInt(s.value,10)>420?r("360px"):Number.parseInt(s.value,10)<240&&r("240px")};document.documentElement.addEventListener("mousemove",h,!1),document.documentElement.addEventListener("mouseup",y,!1)};return(t,f)=>B((n(),p("aside",{ref_key:"sidebarRef",ref:v,class:k(["sidebar bg-b-1 relative flex min-w-full flex-1 flex-col overflow-hidden leading-3 md:min-w-fit md:flex-none md:border-r md:border-b-0",{dragging:d.value}]),style:I({width:e(c).lg?e(s):"100%"})},[l(t.$slots,"header",{},void 0,!0),e(o)!=="modal"&&t.title?(n(),p("div",W,[i("h2",q,L(t.title),1),e(c).lg?m("",!0):l(t.$slots,"button",{key:0},void 0,!0)])):m("",!0),i("div",{class:k(["custom-scroll sidebar-height w-[inherit] pb-0 md:pb-[37px]",{"sidebar-mask":e(o)!=="modal"}])},[l(t.$slots,"content",{},void 0,!0)],2),e(c).lg?(n(),p(N,{key:1},[i("div",M,[l(t.$slots,"button",{},void 0,!0)]),i("div",{class:"resizer",onMousedown:S},null,32)],64)):m("",!0)],6)),[[C,e(u)]])}}),H=j(O,[["__scopeId","data-v-dcff7b49"]]),J=w({__name:"SidebarButton",props:{click:{type:Function},hotkey:{}},setup(b){const u=b,{layout:s}=E(),r=()=>{u.click()};return(o,d)=>(n(),x(e(R),{class:"bg-b-1 text-c-1 hover:bg-b-2 group relative h-auto w-auto border px-2 py-1 md:w-full md:p-1.5",variant:"outlined",onClick:r},{default:z(()=>[l(o.$slots,"title"),o.hotkey&&e(s)==="desktop"?(n(),x(e(V),{key:0,class:"text-c-2 add-item-hotkey absolute right-2 hidden group-hover:opacity-80 md:flex",hotkey:o.hotkey},null,8,["hotkey"])):m("",!0)]),_:3}))}});export{J as g,H as m};
1
+ import{d as w,r as g,D as B,at as C,h as e,c as p,b as n,al as l,k as m,e as i,t as L,s as k,F as N,p as I,j as x,w as z}from"./_GOFtDs5.js";import{m as D,g as F,b as E,ba as X,N as j,T as R}from"./D7UiNNwv.js";import{E as V}from"./QdkHS5sG.js";const W={key:0,class:"xl:min-h-header flex min-h-12 items-center justify-between px-3 py-1.5 text-sm md:px-[18px] md:py-2.5"},q={class:"m-0 text-sm font-medium whitespace-nowrap"},M={class:"bg-b-1 sticky bottom-0 z-10 w-[inherit] pt-0 has-[.empty-sidebar-item]:border-t md:px-2.5 md:pb-2.5"},O=w({__name:"Sidebar",props:{title:{}},setup(b){const{isSidebarOpen:u}=D(),{sidebarWidth:s,setSidebarWidth:r}=F(),{layout:o}=E(),d=g(!1),v=g(null),{breakpoints:c}=X(),S=t=>{t.preventDefault();const f=t.clientX,_=Number.parseInt(getComputedStyle(v.value).width||s.value,10),h=$=>{d.value=!0,document.body.classList.add("dragging");let a=_+$.clientX-f;a>420&&(a=420+(a-420)*.2),a<240&&(a=240),r(`${a}px`)},y=()=>{d.value=!1,document.body.classList.remove("dragging"),document.documentElement.removeEventListener("mousemove",h,!1),document.documentElement.removeEventListener("mouseup",y,!1),Number.parseInt(s.value,10)>420?r("360px"):Number.parseInt(s.value,10)<240&&r("240px")};document.documentElement.addEventListener("mousemove",h,!1),document.documentElement.addEventListener("mouseup",y,!1)};return(t,f)=>B((n(),p("aside",{ref_key:"sidebarRef",ref:v,class:k(["sidebar bg-b-1 relative flex min-w-full flex-1 flex-col overflow-hidden leading-3 md:min-w-fit md:flex-none md:border-r md:border-b-0",{dragging:d.value}]),style:I({width:e(c).lg?e(s):"100%"})},[l(t.$slots,"header",{},void 0,!0),e(o)!=="modal"&&t.title?(n(),p("div",W,[i("h2",q,L(t.title),1),e(c).lg?m("",!0):l(t.$slots,"button",{key:0},void 0,!0)])):m("",!0),i("div",{class:k(["custom-scroll sidebar-height w-[inherit] pb-0 md:pb-[37px]",{"sidebar-mask":e(o)!=="modal"}])},[l(t.$slots,"content",{},void 0,!0)],2),e(c).lg?(n(),p(N,{key:1},[i("div",M,[l(t.$slots,"button",{},void 0,!0)]),i("div",{class:"resizer",onMousedown:S},null,32)],64)):m("",!0)],6)),[[C,e(u)]])}}),H=j(O,[["__scopeId","data-v-dcff7b49"]]),J=w({__name:"SidebarButton",props:{click:{type:Function},hotkey:{}},setup(b){const u=b,{layout:s}=E(),r=()=>{u.click()};return(o,d)=>(n(),x(e(R),{class:"bg-b-1 text-c-1 hover:bg-b-2 group relative h-auto w-auto border px-2 py-1 md:w-full md:p-1.5",variant:"outlined",onClick:r},{default:z(()=>[l(o.$slots,"title"),o.hotkey&&e(s)==="desktop"?(n(),x(e(V),{key:0,class:"text-c-2 add-item-hotkey absolute right-2 hidden group-hover:opacity-80 md:flex",hotkey:o.hotkey},null,8,["hotkey"])):m("",!0)]),_:3}))}});export{J as g,H as m};
@@ -1 +1 @@
1
- import{a5 as B,a8 as P,a_ as W,a$ as re,a7 as L,b0 as oe,b1 as ne,b2 as ue,b3 as se,b4 as ie,ap as de,a9 as S,b5 as C,b6 as F,af as w,b7 as _,b8 as pe,b9 as ce,B as ve,au as fe}from"./BajA-R3t.js";import{i as me}from"./6guOtdqw.js";import{d as A,o as N,a as q,h as k,r as $,m as i,a8 as z,aa as J,ah as R,n as be,ad as I,F as Y,j as D,b as G,w as O,al as K,f as V,e as U,g as H,c as ge,q as ye,t as he}from"./DKB4Mc1Q.js";let Q=Symbol("LabelContext");function X(){let a=J(Q,null);if(a===null){let u=new Error("You used a <Label /> component, but it is not inside a parent.");throw Error.captureStackTrace&&Error.captureStackTrace(u,X),u}return a}function Z({slot:a={},name:u="Label",props:c={}}={}){let d=$([]);function m(n){return d.value.push(n),()=>{let o=d.value.indexOf(n);o!==-1&&d.value.splice(o,1)}}return z(Q,{register:m,slot:a,name:u,props:c}),i(()=>d.value.length>0?d.value.join(" "):void 0)}let ke=A({name:"Label",props:{as:{type:[Object,String],default:"label"},passive:{type:[Boolean],default:!1},id:{type:String,default:null}},setup(a,{slots:u,attrs:c}){var d;let m=(d=a.id)!=null?d:`headlessui-label-${B()}`,n=X();return N(()=>q(n.register(m))),()=>{let{name:o="Label",slot:p={},props:l={}}=n,{passive:y,...x}=a,v={...Object.entries(l).reduce((E,[b,g])=>Object.assign(E,{[b]:k(g)}),{}),id:m};return y&&(delete v.onClick,delete v.htmlFor,delete x.onClick),P({ourProps:v,theirProps:x,slot:p,attrs:c,slots:u,name:o})}}});function Re(a,u){return a===u}let ee=Symbol("RadioGroupContext");function ae(a){let u=J(ee,null);if(u===null){let c=new Error(`<${a} /> is missing a parent <RadioGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(c,ae),c}return u}let xe=A({name:"RadioGroup",emits:{"update:modelValue":a=>!0},props:{as:{type:[Object,String],default:"div"},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],default:()=>Re},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},id:{type:String,default:null}},inheritAttrs:!1,setup(a,{emit:u,attrs:c,slots:d,expose:m}){var n;let o=(n=a.id)!=null?n:`headlessui-radiogroup-${B()}`,p=$(null),l=$([]),y=Z({name:"RadioGroupLabel"}),x=W({name:"RadioGroupDescription"});m({el:p,$el:p});let[v,E]=re(i(()=>a.modelValue),e=>u("update:modelValue",e),i(()=>a.defaultValue)),b={options:l,value:v,disabled:i(()=>a.disabled),firstOption:i(()=>l.value.find(e=>!e.propsRef.disabled)),containsCheckedOption:i(()=>l.value.some(e=>b.compare(R(e.propsRef.value),R(a.modelValue)))),compare(e,r){if(typeof a.by=="string"){let t=a.by;return e?.[t]===r?.[t]}return a.by(e,r)},change(e){var r;if(a.disabled||b.compare(R(v.value),R(e)))return!1;let t=(r=l.value.find(f=>b.compare(R(f.propsRef.value),R(e))))==null?void 0:r.propsRef;return t!=null&&t.disabled?!1:(E(e),!0)},registerOption(e){l.value.push(e),l.value=de(l.value,r=>r.element)},unregisterOption(e){let r=l.value.findIndex(t=>t.id===e);r!==-1&&l.value.splice(r,1)}};z(ee,b),me({container:i(()=>L(p)),accept(e){return e.getAttribute("role")==="radio"?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(e){e.setAttribute("role","none")}});function g(e){if(!p.value||!p.value.contains(e.target))return;let r=l.value.filter(t=>t.propsRef.disabled===!1).map(t=>t.element);switch(e.key){case S.Enter:pe(e.currentTarget);break;case S.ArrowLeft:case S.ArrowUp:if(e.preventDefault(),e.stopPropagation(),F(r,w.Previous|w.WrapAround)===_.Success){let t=l.value.find(f=>{var s;return f.element===((s=C(p))==null?void 0:s.activeElement)});t&&b.change(t.propsRef.value)}break;case S.ArrowRight:case S.ArrowDown:if(e.preventDefault(),e.stopPropagation(),F(r,w.Next|w.WrapAround)===_.Success){let t=l.value.find(f=>{var s;return f.element===((s=C(f.element))==null?void 0:s.activeElement)});t&&b.change(t.propsRef.value)}break;case S.Space:{e.preventDefault(),e.stopPropagation();let t=l.value.find(f=>{var s;return f.element===((s=C(f.element))==null?void 0:s.activeElement)});t&&b.change(t.propsRef.value)}break}}let h=i(()=>{var e;return(e=L(p))==null?void 0:e.closest("form")});return N(()=>{be([h],()=>{if(!h.value||a.defaultValue===void 0)return;function e(){b.change(a.defaultValue)}return h.value.addEventListener("reset",e),()=>{var r;(r=h.value)==null||r.removeEventListener("reset",e)}},{immediate:!0})}),()=>{let{disabled:e,name:r,form:t,...f}=a,s={ref:p,id:o,role:"radiogroup","aria-labelledby":y.value,"aria-describedby":x.value,onKeydown:g};return I(Y,[...r!=null&&v.value!=null?oe({[r]:v.value}).map(([T,j])=>I(ne,ue({features:se.Hidden,key:T,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:e,name:T,value:j}))):[],P({ourProps:s,theirProps:{...c,...ie(f,["modelValue","defaultValue","by"])},slot:{},attrs:c,slots:d,name:"RadioGroup"})])}}});var Se=(a=>(a[a.Empty=1]="Empty",a[a.Active=2]="Active",a))(Se||{});let Oe=A({name:"RadioGroupOption",props:{as:{type:[Object,String],default:"div"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},id:{type:String,default:null}},setup(a,{attrs:u,slots:c,expose:d}){var m;let n=(m=a.id)!=null?m:`headlessui-radiogroup-option-${B()}`,o=ae("RadioGroupOption"),p=Z({name:"RadioGroupLabel"}),l=W({name:"RadioGroupDescription"}),y=$(null),x=i(()=>({value:a.value,disabled:a.disabled})),v=$(1);d({el:y,$el:y});let E=i(()=>L(y));N(()=>o.registerOption({id:n,element:E,propsRef:x})),q(()=>o.unregisterOption(n));let b=i(()=>{var s;return((s=o.firstOption.value)==null?void 0:s.id)===n}),g=i(()=>o.disabled.value||a.disabled),h=i(()=>o.compare(R(o.value.value),R(a.value))),e=i(()=>g.value?-1:h.value||!o.containsCheckedOption.value&&b.value?0:-1);function r(){var s;o.change(a.value)&&(v.value|=2,(s=L(y))==null||s.focus())}function t(){v.value|=2}function f(){v.value&=-3}return()=>{let{value:s,disabled:T,...j}=a,le={checked:h.value,disabled:g.value,active:!!(v.value&2)},te={id:n,ref:y,role:"radio","aria-checked":h.value?"true":"false","aria-labelledby":p.value,"aria-describedby":l.value,"aria-disabled":g.value?!0:void 0,tabIndex:e.value,onClick:g.value?void 0:r,onFocus:g.value?void 0:t,onBlur:g.value?void 0:f};return P({ourProps:te,theirProps:j,slot:le,attrs:u,slots:c,name:"RadioGroupOption"})}}}),M=ke;const Ee={class:"flex text-sm"},$e={class:"bg-b-1 custom-scroll grid w-dvw max-w-[420px] auto-rows-[32px] grid-cols-[repeat(auto-fill,minmax(32px,1fr))] content-between justify-between rounded border p-1"},Ae=A({__name:"IconSelector",props:{modelValue:{},placement:{}},emits:["update:modelValue"],setup(a,{emit:u}){const c=a,d=u,m=i({get:()=>c.modelValue,set:n=>d("update:modelValue",n)});return(n,o)=>(G(),D(k(fe),{class:"bg-b-2 rounded",focus:"",placement:n.placement??"bottom"},{popover:O(({close:p})=>[V(k(xe),{modelValue:m.value,"onUpdate:modelValue":o[0]||(o[0]=l=>m.value=l),class:"flex flex-col"},{default:O(()=>[U("div",Ee,[V(k(M),{class:"text-c-2 px-1 py-1"},{default:O(()=>[K(n.$slots,"title",{},()=>[o[1]||(o[1]=H("Select an icon",-1))])]),_:3})]),U("ul",$e,[(G(!0),ge(Y,null,ye(k(ce),l=>(G(),D(k(Oe),{key:l.src,as:"li",class:"text-c-3 hover:text-c-2 hover:bg-b-2 ui-checked:bg-b-3 ui-active:bg-b-2 flex cursor-pointer items-center justify-center rounded p-2",value:l.src,onClick:p},{default:O(()=>[V(k(M),{class:"sr-only"},{default:O(()=>[H(he(l.src.replaceAll("-"," "))+" Icon ",1)]),_:2},1024),V(k(ve),{class:"stroke-[1.5]",src:l.src},null,8,["src"])]),_:2},1032,["value","onClick"]))),128))])]),_:2},1032,["modelValue"])]),default:O(()=>[K(n.$slots,"default")]),_:3},8,["placement"]))}});export{Ae as $};
1
+ import{a5 as B,a8 as P,a_ as W,a$ as re,a7 as L,b0 as oe,b1 as ne,b2 as ue,b3 as se,b4 as ie,ap as de,a9 as S,b5 as C,b6 as F,af as w,b7 as _,b8 as pe,b9 as ce,B as ve,au as fe}from"./D7UiNNwv.js";import{i as me}from"./uqtnWFyq.js";import{d as A,o as N,a as q,h as k,r as $,m as i,a8 as z,aa as J,ah as R,n as be,ad as I,F as Y,j as D,b as G,w as O,al as K,f as V,e as U,g as H,c as ge,q as ye,t as he}from"./_GOFtDs5.js";let Q=Symbol("LabelContext");function X(){let a=J(Q,null);if(a===null){let u=new Error("You used a <Label /> component, but it is not inside a parent.");throw Error.captureStackTrace&&Error.captureStackTrace(u,X),u}return a}function Z({slot:a={},name:u="Label",props:c={}}={}){let d=$([]);function m(n){return d.value.push(n),()=>{let o=d.value.indexOf(n);o!==-1&&d.value.splice(o,1)}}return z(Q,{register:m,slot:a,name:u,props:c}),i(()=>d.value.length>0?d.value.join(" "):void 0)}let ke=A({name:"Label",props:{as:{type:[Object,String],default:"label"},passive:{type:[Boolean],default:!1},id:{type:String,default:null}},setup(a,{slots:u,attrs:c}){var d;let m=(d=a.id)!=null?d:`headlessui-label-${B()}`,n=X();return N(()=>q(n.register(m))),()=>{let{name:o="Label",slot:p={},props:l={}}=n,{passive:y,...x}=a,v={...Object.entries(l).reduce((E,[b,g])=>Object.assign(E,{[b]:k(g)}),{}),id:m};return y&&(delete v.onClick,delete v.htmlFor,delete x.onClick),P({ourProps:v,theirProps:x,slot:p,attrs:c,slots:u,name:o})}}});function Re(a,u){return a===u}let ee=Symbol("RadioGroupContext");function ae(a){let u=J(ee,null);if(u===null){let c=new Error(`<${a} /> is missing a parent <RadioGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(c,ae),c}return u}let xe=A({name:"RadioGroup",emits:{"update:modelValue":a=>!0},props:{as:{type:[Object,String],default:"div"},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],default:()=>Re},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},id:{type:String,default:null}},inheritAttrs:!1,setup(a,{emit:u,attrs:c,slots:d,expose:m}){var n;let o=(n=a.id)!=null?n:`headlessui-radiogroup-${B()}`,p=$(null),l=$([]),y=Z({name:"RadioGroupLabel"}),x=W({name:"RadioGroupDescription"});m({el:p,$el:p});let[v,E]=re(i(()=>a.modelValue),e=>u("update:modelValue",e),i(()=>a.defaultValue)),b={options:l,value:v,disabled:i(()=>a.disabled),firstOption:i(()=>l.value.find(e=>!e.propsRef.disabled)),containsCheckedOption:i(()=>l.value.some(e=>b.compare(R(e.propsRef.value),R(a.modelValue)))),compare(e,r){if(typeof a.by=="string"){let t=a.by;return e?.[t]===r?.[t]}return a.by(e,r)},change(e){var r;if(a.disabled||b.compare(R(v.value),R(e)))return!1;let t=(r=l.value.find(f=>b.compare(R(f.propsRef.value),R(e))))==null?void 0:r.propsRef;return t!=null&&t.disabled?!1:(E(e),!0)},registerOption(e){l.value.push(e),l.value=de(l.value,r=>r.element)},unregisterOption(e){let r=l.value.findIndex(t=>t.id===e);r!==-1&&l.value.splice(r,1)}};z(ee,b),me({container:i(()=>L(p)),accept(e){return e.getAttribute("role")==="radio"?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(e){e.setAttribute("role","none")}});function g(e){if(!p.value||!p.value.contains(e.target))return;let r=l.value.filter(t=>t.propsRef.disabled===!1).map(t=>t.element);switch(e.key){case S.Enter:pe(e.currentTarget);break;case S.ArrowLeft:case S.ArrowUp:if(e.preventDefault(),e.stopPropagation(),F(r,w.Previous|w.WrapAround)===_.Success){let t=l.value.find(f=>{var s;return f.element===((s=C(p))==null?void 0:s.activeElement)});t&&b.change(t.propsRef.value)}break;case S.ArrowRight:case S.ArrowDown:if(e.preventDefault(),e.stopPropagation(),F(r,w.Next|w.WrapAround)===_.Success){let t=l.value.find(f=>{var s;return f.element===((s=C(f.element))==null?void 0:s.activeElement)});t&&b.change(t.propsRef.value)}break;case S.Space:{e.preventDefault(),e.stopPropagation();let t=l.value.find(f=>{var s;return f.element===((s=C(f.element))==null?void 0:s.activeElement)});t&&b.change(t.propsRef.value)}break}}let h=i(()=>{var e;return(e=L(p))==null?void 0:e.closest("form")});return N(()=>{be([h],()=>{if(!h.value||a.defaultValue===void 0)return;function e(){b.change(a.defaultValue)}return h.value.addEventListener("reset",e),()=>{var r;(r=h.value)==null||r.removeEventListener("reset",e)}},{immediate:!0})}),()=>{let{disabled:e,name:r,form:t,...f}=a,s={ref:p,id:o,role:"radiogroup","aria-labelledby":y.value,"aria-describedby":x.value,onKeydown:g};return I(Y,[...r!=null&&v.value!=null?oe({[r]:v.value}).map(([T,j])=>I(ne,ue({features:se.Hidden,key:T,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:e,name:T,value:j}))):[],P({ourProps:s,theirProps:{...c,...ie(f,["modelValue","defaultValue","by"])},slot:{},attrs:c,slots:d,name:"RadioGroup"})])}}});var Se=(a=>(a[a.Empty=1]="Empty",a[a.Active=2]="Active",a))(Se||{});let Oe=A({name:"RadioGroupOption",props:{as:{type:[Object,String],default:"div"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},id:{type:String,default:null}},setup(a,{attrs:u,slots:c,expose:d}){var m;let n=(m=a.id)!=null?m:`headlessui-radiogroup-option-${B()}`,o=ae("RadioGroupOption"),p=Z({name:"RadioGroupLabel"}),l=W({name:"RadioGroupDescription"}),y=$(null),x=i(()=>({value:a.value,disabled:a.disabled})),v=$(1);d({el:y,$el:y});let E=i(()=>L(y));N(()=>o.registerOption({id:n,element:E,propsRef:x})),q(()=>o.unregisterOption(n));let b=i(()=>{var s;return((s=o.firstOption.value)==null?void 0:s.id)===n}),g=i(()=>o.disabled.value||a.disabled),h=i(()=>o.compare(R(o.value.value),R(a.value))),e=i(()=>g.value?-1:h.value||!o.containsCheckedOption.value&&b.value?0:-1);function r(){var s;o.change(a.value)&&(v.value|=2,(s=L(y))==null||s.focus())}function t(){v.value|=2}function f(){v.value&=-3}return()=>{let{value:s,disabled:T,...j}=a,le={checked:h.value,disabled:g.value,active:!!(v.value&2)},te={id:n,ref:y,role:"radio","aria-checked":h.value?"true":"false","aria-labelledby":p.value,"aria-describedby":l.value,"aria-disabled":g.value?!0:void 0,tabIndex:e.value,onClick:g.value?void 0:r,onFocus:g.value?void 0:t,onBlur:g.value?void 0:f};return P({ourProps:te,theirProps:j,slot:le,attrs:u,slots:c,name:"RadioGroupOption"})}}}),M=ke;const Ee={class:"flex text-sm"},$e={class:"bg-b-1 custom-scroll grid w-dvw max-w-[420px] auto-rows-[32px] grid-cols-[repeat(auto-fill,minmax(32px,1fr))] content-between justify-between rounded border p-1"},Ae=A({__name:"IconSelector",props:{modelValue:{},placement:{}},emits:["update:modelValue"],setup(a,{emit:u}){const c=a,d=u,m=i({get:()=>c.modelValue,set:n=>d("update:modelValue",n)});return(n,o)=>(G(),D(k(fe),{class:"bg-b-2 rounded",focus:"",placement:n.placement??"bottom"},{popover:O(({close:p})=>[V(k(xe),{modelValue:m.value,"onUpdate:modelValue":o[0]||(o[0]=l=>m.value=l),class:"flex flex-col"},{default:O(()=>[U("div",Ee,[V(k(M),{class:"text-c-2 px-1 py-1"},{default:O(()=>[K(n.$slots,"title",{},()=>[o[1]||(o[1]=H("Select an icon",-1))])]),_:3})]),U("ul",$e,[(G(!0),ge(Y,null,ye(k(ce),l=>(G(),D(k(Oe),{key:l.src,as:"li",class:"text-c-3 hover:text-c-2 hover:bg-b-2 ui-checked:bg-b-3 ui-active:bg-b-2 flex cursor-pointer items-center justify-center rounded p-2",value:l.src,onClick:p},{default:O(()=>[V(k(M),{class:"sr-only"},{default:O(()=>[H(he(l.src.replaceAll("-"," "))+" Icon ",1)]),_:2},1024),V(k(ve),{class:"stroke-[1.5]",src:l.src},null,8,["src"])]),_:2},1032,["value","onClick"]))),128))])]),_:2},1032,["modelValue"])]),default:O(()=>[K(n.$slots,"default")]),_:3},8,["placement"]))}});export{Ae as $};
@@ -1 +1 @@
1
- import{b as w}from"./DEvRa3of.js";import{r as b,T as k,as as y,av as _,N as C,d as z,g as B}from"./BajA-R3t.js";import{d as g,r as h,n as E,z as I,c as m,b as s,e as o,j as u,k as c,w as f,f as p,h as l,F as V}from"./DKB4Mc1Q.js";import"./92s3wAHG.js";import"./CLW3obj5.js";import"./N7kSzZAV.js";import"./Bc3I1G9W.js";const N={class:"flex h-full w-full flex-col gap-2 pt-8"},F={class:"flex min-h-8 items-center justify-between gap-2 pl-1.5"},j={class:"has-[:focus-visible]:bg-b-1 group relative z-1 flex flex-col rounded-lg"},D={class:"flex h-full min-h-[calc(1rem*4)] flex-col"},M={key:1,class:"text-c-3 flex h-full items-center justify-center rounded-lg border p-4"},P=g({__name:"MarkdownInput",props:{modelValue:{},environment:{},envVariables:{},workspace:{}},emits:["update:modelValue"],setup(x,{emit:n}){const d=n,t=h("preview"),r=h(null);E(t,a=>{a==="edit"&&I(()=>{r.value?.focus()})});const v=()=>{requestAnimationFrame(()=>{t.value="preview"})};return(a,e)=>(s(),m("div",N,[o("div",F,[e[5]||(e[5]=o("h3",{class:"font-bold"},"Description",-1)),t.value==="preview"?(s(),u(l(k),{key:0,class:"text-c-2 hover:text-c-1 flex items-center gap-2",size:"sm",type:"button",variant:"outlined",onClick:e[0]||(e[0]=i=>t.value="edit")},{default:f(()=>[p(l(b),{icon:"Pencil",size:"sm",thickness:"1.5"}),e[4]||(e[4]=o("span",null,"Edit",-1))]),_:1})):c("",!0)]),o("div",j,[o("div",D,[t.value==="preview"?(s(),m(V,{key:0},[a.modelValue&&a.modelValue.trim().length?(s(),m(V,{key:0},[a.modelValue?(s(),u(l(y),{key:0,class:"h-full flex-1 rounded border border-transparent p-1.5 hover:border-(--scalar-background-3)",value:a.modelValue,withImages:"",onDblclick:e[1]||(e[1]=i=>t.value="edit")},null,8,["value"])):c("",!0),e[6]||(e[6]=o("div",{class:"brightness-lifted bg-b-1 absolute inset-0 -z-1 hidden rounded group-hover:block group-has-[:focus-visible]:hidden"},null,-1))],64)):(s(),m("div",M,[p(l(k),{class:"hover:bg-b-2 hover:text-c-1 text-c-2 flex items-center gap-2",size:"sm",variant:"ghost",onClick:e[2]||(e[2]=i=>t.value="edit")},{default:f(()=>[p(l(b),{icon:"Pencil",size:"sm",thickness:"1.5"}),e[7]||(e[7]=o("span",null,"Write a description",-1))]),_:1})]))],64)):c("",!0),t.value==="edit"?(s(),u(_,{key:1,ref_key:"codeInputRef",ref:r,class:"h-full flex-1 border px-0.5 py-0",envVariables:a.envVariables,environment:a.environment,modelValue:a.modelValue,workspace:a.workspace,onBlur:v,"onUpdate:modelValue":e[3]||(e[3]=i=>d("update:modelValue",i))},null,8,["envVariables","environment","modelValue","workspace"])):c("",!0)])])]))}}),T=C(P,[["__scopeId","data-v-5997a667"]]),S=g({__name:"CollectionOverview",setup(x){const{activeCollection:n,activeEnvironment:d,activeEnvVariables:t,activeWorkspace:r}=z(),{collectionMutators:v}=B(),a=e=>{n.value&&v.edit(n.value.uid,"info.description",e)};return(e,i)=>(s(),u(w,null,{default:f(()=>[l(d)&&l(r)?(s(),u(T,{key:0,envVariables:l(t),environment:l(d),modelValue:l(n)?.info?.description??"",workspace:l(r),"onUpdate:modelValue":a},null,8,["envVariables","environment","modelValue","workspace"])):c("",!0)]),_:1}))}});export{S as default};
1
+ import{b as w}from"./3z6Bx0TK.js";import{r as b,T as k,as as y,av as _,N as C,d as z,g as B}from"./D7UiNNwv.js";import{d as g,r as h,n as E,z as I,c as m,b as s,e as o,j as u,k as c,w as f,f as p,h as l,F as V}from"./_GOFtDs5.js";import"./92s3wAHG.js";import"./Bu0Sw6DH.js";import"./BQ3I6Zb-.js";import"./CxFxslZw.js";const N={class:"flex h-full w-full flex-col gap-2 pt-8"},F={class:"flex min-h-8 items-center justify-between gap-2 pl-1.5"},j={class:"has-[:focus-visible]:bg-b-1 group relative z-1 flex flex-col rounded-lg"},D={class:"flex h-full min-h-[calc(1rem*4)] flex-col"},M={key:1,class:"text-c-3 flex h-full items-center justify-center rounded-lg border p-4"},P=g({__name:"MarkdownInput",props:{modelValue:{},environment:{},envVariables:{},workspace:{}},emits:["update:modelValue"],setup(x,{emit:n}){const d=n,t=h("preview"),r=h(null);E(t,a=>{a==="edit"&&I(()=>{r.value?.focus()})});const v=()=>{requestAnimationFrame(()=>{t.value="preview"})};return(a,e)=>(s(),m("div",N,[o("div",F,[e[5]||(e[5]=o("h3",{class:"font-bold"},"Description",-1)),t.value==="preview"?(s(),u(l(k),{key:0,class:"text-c-2 hover:text-c-1 flex items-center gap-2",size:"sm",type:"button",variant:"outlined",onClick:e[0]||(e[0]=i=>t.value="edit")},{default:f(()=>[p(l(b),{icon:"Pencil",size:"sm",thickness:"1.5"}),e[4]||(e[4]=o("span",null,"Edit",-1))]),_:1})):c("",!0)]),o("div",j,[o("div",D,[t.value==="preview"?(s(),m(V,{key:0},[a.modelValue&&a.modelValue.trim().length?(s(),m(V,{key:0},[a.modelValue?(s(),u(l(y),{key:0,class:"h-full flex-1 rounded border border-transparent p-1.5 hover:border-(--scalar-background-3)",value:a.modelValue,withImages:"",onDblclick:e[1]||(e[1]=i=>t.value="edit")},null,8,["value"])):c("",!0),e[6]||(e[6]=o("div",{class:"brightness-lifted bg-b-1 absolute inset-0 -z-1 hidden rounded group-hover:block group-has-[:focus-visible]:hidden"},null,-1))],64)):(s(),m("div",M,[p(l(k),{class:"hover:bg-b-2 hover:text-c-1 text-c-2 flex items-center gap-2",size:"sm",variant:"ghost",onClick:e[2]||(e[2]=i=>t.value="edit")},{default:f(()=>[p(l(b),{icon:"Pencil",size:"sm",thickness:"1.5"}),e[7]||(e[7]=o("span",null,"Write a description",-1))]),_:1})]))],64)):c("",!0),t.value==="edit"?(s(),u(_,{key:1,ref_key:"codeInputRef",ref:r,class:"h-full flex-1 border px-0.5 py-0",envVariables:a.envVariables,environment:a.environment,modelValue:a.modelValue,workspace:a.workspace,onBlur:v,"onUpdate:modelValue":e[3]||(e[3]=i=>d("update:modelValue",i))},null,8,["envVariables","environment","modelValue","workspace"])):c("",!0)])])]))}}),T=C(P,[["__scopeId","data-v-5997a667"]]),S=g({__name:"CollectionOverview",setup(x){const{activeCollection:n,activeEnvironment:d,activeEnvVariables:t,activeWorkspace:r}=z(),{collectionMutators:v}=B(),a=e=>{n.value&&v.edit(n.value.uid,"info.description",e)};return(e,i)=>(s(),u(w,null,{default:f(()=>[l(d)&&l(r)?(s(),u(T,{key:0,envVariables:l(t),environment:l(d),modelValue:l(n)?.info?.description??"",workspace:l(r),"onUpdate:modelValue":a},null,8,["envVariables","environment","modelValue","workspace"])):c("",!0)]),_:1}))}});export{S as default};
@@ -1 +1 @@
1
- import{_ as P}from"./DDABJbm9.js";import{_ as T}from"./B2RgqbNO.js";import{d as A}from"./C0Rlrcoy.js";import{d as F,H as M,r as V,x as $,m as w,v as B,c as n,f as b,e as c,h as s,k as C,t as e,w as D,b as r,g as L,_ as O}from"./DKB4Mc1Q.js";import{u as I}from"./CLW3obj5.js";const S={class:"prompt-page"},E={class:"card"},R={class:"section-header"},Y={class:"session-badge"},G={key:0,class:"column-badge"},K=["title"],Q={key:0,class:"loading"},j={key:1,class:"error-message"},q={key:2,class:"empty"},z=["innerHTML"],J={key:4,class:"prompt-content prompt-raw"},U={class:"actions"},W=F({__name:"prompt",async setup(X){let o,p;const y=M(),m=y.params.id,h=y.params.sessionId,u=V(!0),{data:i}=([o,p]=$(()=>I(`/api/issues/${m}`,"$a3ca3_CGOD")),o=await o,p(),o),x=w(()=>{if(!i.value)return null;const t={id:i.value.key,title:i.value.title,column:i.value.column_slug};return i.value.priority&&(t.priority=i.value.priority),t}),{data:a,status:H,error:k}=([o,p]=$(()=>I(`/api/issues/${m}/history/${h}/prompt`,"$QrPKfenAcg")),o=await o,p(),o),N=w(()=>{if(!a.value?.content)return"";let t=a.value.content;if(t.includes("## Column Instructions")){const d="## Column Instructions\n\n```markdown\n",_="```\n\n## Your Task",l=t.indexOf(d);if(l!==-1){const v=l+d.length,f=t.indexOf(_,v);if(f!==-1){const g=t.substring(v,f);g.includes("```")&&(t=t.substring(0,l)+"## Column Instructions\n\n````markdown\n"+g+"````\n\n## Your Task"+t.substring(f+_.length))}}}return A(t)});return B({title:`Prompt ${h} - ${m} - AutoCode`}),(t,d)=>{const _=P,l=T;return r(),n("div",S,[b(_,{issue:s(x),"active-tab":"history"},null,8,["issue"]),c("div",E,[c("div",R,[c("h2",null,e(t.$t("history.viewPrompt")),1),c("span",Y,e(s(h)),1),s(a)?.column?(r(),n("span",G,e(s(a).column),1)):C("",!0),s(a)?.content?(r(),n("button",{key:1,class:"view-toggle",title:s(u)?t.$t("history.viewRaw"):t.$t("history.viewFormatted"),onClick:d[0]||(d[0]=v=>u.value=!s(u))},e(s(u)?"{ }":"Aa"),9,K)):C("",!0)]),s(H)==="pending"?(r(),n("div",Q,e(t.$t("app.loading")),1)):s(k)?(r(),n("div",j,e(s(k).message),1)):s(a)?.content?s(u)?(r(),n("div",{key:3,class:"prompt-content prompt-markdown",innerHTML:s(N)},null,8,z)):(r(),n("div",J,[c("pre",null,e(s(a).content),1)])):(r(),n("div",q,e(t.$t("column.noPrompt")),1))]),c("div",U,[b(l,{to:`/issue/${s(m)}/history`,class:"btn-secondary"},{default:D(()=>[L(e(t.$t("nav.back")),1)]),_:1},8,["to"])])])}}}),nt=O(W,[["__scopeId","data-v-9e0cebf5"]]);export{nt as default};
1
+ import{_ as P}from"./ClrPQ_cX.js";import{_ as T}from"./BuPN94lV.js";import{d as A}from"./C0Rlrcoy.js";import{d as F,H as M,r as V,x as $,m as w,v as B,c as n,f as b,e as c,h as s,k as C,t as e,w as D,b as r,g as L,_ as O}from"./_GOFtDs5.js";import{u as I}from"./Bu0Sw6DH.js";const S={class:"prompt-page"},E={class:"card"},R={class:"section-header"},Y={class:"session-badge"},G={key:0,class:"column-badge"},K=["title"],Q={key:0,class:"loading"},j={key:1,class:"error-message"},q={key:2,class:"empty"},z=["innerHTML"],J={key:4,class:"prompt-content prompt-raw"},U={class:"actions"},W=F({__name:"prompt",async setup(X){let o,p;const y=M(),m=y.params.id,h=y.params.sessionId,u=V(!0),{data:i}=([o,p]=$(()=>I(`/api/issues/${m}`,"$a3ca3_CGOD")),o=await o,p(),o),x=w(()=>{if(!i.value)return null;const t={id:i.value.key,title:i.value.title,column:i.value.column_slug};return i.value.priority&&(t.priority=i.value.priority),t}),{data:a,status:H,error:k}=([o,p]=$(()=>I(`/api/issues/${m}/history/${h}/prompt`,"$QrPKfenAcg")),o=await o,p(),o),N=w(()=>{if(!a.value?.content)return"";let t=a.value.content;if(t.includes("## Column Instructions")){const d="## Column Instructions\n\n```markdown\n",_="```\n\n## Your Task",l=t.indexOf(d);if(l!==-1){const v=l+d.length,f=t.indexOf(_,v);if(f!==-1){const g=t.substring(v,f);g.includes("```")&&(t=t.substring(0,l)+"## Column Instructions\n\n````markdown\n"+g+"````\n\n## Your Task"+t.substring(f+_.length))}}}return A(t)});return B({title:`Prompt ${h} - ${m} - AutoCode`}),(t,d)=>{const _=P,l=T;return r(),n("div",S,[b(_,{issue:s(x),"active-tab":"history"},null,8,["issue"]),c("div",E,[c("div",R,[c("h2",null,e(t.$t("history.viewPrompt")),1),c("span",Y,e(s(h)),1),s(a)?.column?(r(),n("span",G,e(s(a).column),1)):C("",!0),s(a)?.content?(r(),n("button",{key:1,class:"view-toggle",title:s(u)?t.$t("history.viewRaw"):t.$t("history.viewFormatted"),onClick:d[0]||(d[0]=v=>u.value=!s(u))},e(s(u)?"{ }":"Aa"),9,K)):C("",!0)]),s(H)==="pending"?(r(),n("div",Q,e(t.$t("app.loading")),1)):s(k)?(r(),n("div",j,e(s(k).message),1)):s(a)?.content?s(u)?(r(),n("div",{key:3,class:"prompt-content prompt-markdown",innerHTML:s(N)},null,8,z)):(r(),n("div",J,[c("pre",null,e(s(a).content),1)])):(r(),n("div",q,e(t.$t("column.noPrompt")),1))]),c("div",U,[b(l,{to:`/issue/${s(m)}/history`,class:"btn-secondary"},{default:D(()=>[L(e(t.$t("nav.back")),1)]),_:1},8,["to"])])])}}}),nt=O(W,[["__scopeId","data-v-9e0cebf5"]]);export{nt as default};
@@ -1 +1 @@
1
- import{_ as T}from"./B2RgqbNO.js";import{u as U}from"./CLW3obj5.js";import{u as V,s as B}from"./DTcXWbr5.js";import{d as D,u as K,r as L,x as M,n as E,o as R,a as j,m as b,v as q,c as l,e as s,f as z,w as g,t,k as r,h as o,s as H,F as h,q as I,b as n,g as k,j as W,_ as G}from"./DKB4Mc1Q.js";const J={class:"stats-page"},P={class:"page-header"},Q={class:"header-badges"},X={key:0,class:"badge badge-profile"},Y={key:1,class:"badge badge-model"},Z={key:0,class:"loading"},x={key:0,class:"processing-alert card"},ss={class:"processing-issues"},ts={class:"stats-grid"},es={class:"stat-card card"},as={class:"stat-value"},os={class:"stat-breakdown"},ns={class:"breakdown-item"},ls={class:"label"},is={class:"value"},ds={class:"breakdown-item"},cs={class:"label"},rs={class:"value"},us={class:"stat-footer"},_s={class:"calls-count"},ps={class:"cost-value"},hs={key:0,class:"started-at"},ks={class:"stat-card card"},vs={class:"stat-value"},fs={class:"stat-breakdown"},ms={class:"breakdown-item"},ys={class:"label"},$s={class:"value"},bs={class:"breakdown-item"},gs={class:"label"},Is={class:"value"},ws={class:"stat-footer"},Cs={class:"calls-count"},As={class:"cost-value"},Fs={class:"stat-card card info-card"},Os={class:"cost-explanation"},Ns={class:"card history-card"},Ss={key:0,class:"empty"},Ts={key:1,class:"table-container"},Us={class:"history-table"},Vs={key:1,class:"text-muted"},Bs={class:"cost-cell"},Ds=D({__name:"stats",async setup(Ks){let c,v;const{locale:w}=K(),u=L(!1),{data:a,status:C,refresh:f}=([c,v]=M(()=>U("/api/stats","$ygpy_aVKAm")),c=await c,v(),c),{lastMessage:A}=V();E(A,e=>{(e?.type==="claude_end"||e?.type==="stats-update"||e?.type==="refresh")&&(u.value=!0,f().finally(()=>{u.value=!1}))});let _;R(()=>{_=B(()=>{f()},5e3)}),j(()=>{_&&clearInterval(_)});const F=b(()=>(a.value?.session?.tokensInput||0)+(a.value?.session?.tokensOutput||0)),O=b(()=>(a.value?.totals?.tokensInput||0)+(a.value?.totals?.tokensOutput||0)),d=e=>e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(1)+"K":e.toString(),p=e=>e.toFixed(4),N=e=>e?e<1e3?e+"ms":(e/1e3).toFixed(1)+"s":"-",m=e=>e?new Date(e).toLocaleString(w.value==="fr"?"fr-FR":"en-US"):"-";return q({title:"Statistics - AutoCode"}),(e,y)=>{const $=T;return n(),l("div",J,[s("header",P,[z($,{to:"/kanban",class:"back-link"},{default:g(()=>[k(" ← "+t(e.$t("stats.backToKanban")),1)]),_:1}),s("h1",null,t(e.$t("stats.title")),1),s("div",Q,[o(a)?.profile?(n(),l("span",X,t(o(a).profile),1)):r("",!0),o(a)?.model?(n(),l("span",Y,t(o(a).model),1)):r("",!0),s("span",{class:H(["refresh-indicator",{active:o(u)}])},null,2)])]),o(C)==="pending"?(n(),l("div",Z,t(e.$t("kanban.loading")),1)):(n(),l(h,{key:1},[o(a)?.processingIssues?.length?(n(),l("div",x,[s("h3",null,t(e.$t("stats.processing")),1),s("div",ss,[(n(!0),l(h,null,I(o(a).processingIssues,i=>(n(),l("span",{key:i,class:"processing-badge"},[y[0]||(y[0]=s("span",{class:"dot-pulse"},null,-1)),k(" "+t(i),1)]))),128))])])):r("",!0),s("div",ts,[s("div",es,[s("h2",null,t(e.$t("stats.session")),1),s("div",as,t(d(o(F))),1),s("div",os,[s("div",ns,[s("span",ls,t(e.$t("stats.tokensInput")),1),s("span",is,t(d(o(a)?.session?.tokensInput||0)),1)]),s("div",ds,[s("span",cs,t(e.$t("stats.tokensOutput")),1),s("span",rs,t(d(o(a)?.session?.tokensOutput||0)),1)])]),s("div",us,[s("span",_s,t(o(a)?.session?.callCount||0)+" "+t(e.$t("stats.calls")),1),s("span",ps,"$"+t(p(o(a)?.session?.costUsd||0)),1)]),o(a)?.session?.startedAt?(n(),l("div",hs,t(e.$t("stats.startedAt"))+": "+t(m(o(a).session.startedAt)),1)):r("",!0)]),s("div",ks,[s("h2",null,t(e.$t("stats.totals")),1),s("div",vs,t(d(o(O))),1),s("div",fs,[s("div",ms,[s("span",ys,t(e.$t("stats.tokensInput")),1),s("span",$s,t(d(o(a)?.totals?.tokensInput||0)),1)]),s("div",bs,[s("span",gs,t(e.$t("stats.tokensOutput")),1),s("span",Is,t(d(o(a)?.totals?.tokensOutput||0)),1)])]),s("div",ws,[s("span",Cs,t(o(a)?.totals?.callCount||0)+" "+t(e.$t("stats.calls")),1),s("span",As,"$"+t(p(o(a)?.totals?.costUsd||0)),1)])]),s("div",Fs,[s("h2",null,t(e.$t("stats.cost")),1),s("p",Os,t(e.$t("stats.costExplanation")),1)])]),s("div",Ns,[s("h2",null,t(e.$t("stats.recentActivity")),1),o(a)?.history?.length?(n(),l("div",Ts,[s("table",Us,[s("thead",null,[s("tr",null,[s("th",null,t(e.$t("stats.issue")),1),s("th",null,t(e.$t("stats.column")),1),s("th",null,t(e.$t("stats.tokensInput")),1),s("th",null,t(e.$t("stats.tokensOutput")),1),s("th",null,t(e.$t("stats.cost")),1),s("th",null,t(e.$t("stats.duration")),1),s("th",null,t(e.$t("stats.date")),1)])]),s("tbody",null,[(n(!0),l(h,null,I(o(a).history,(i,S)=>(n(),l("tr",{key:S},[s("td",null,[i.issue?(n(),W($,{key:0,to:`/issue/${i.issue}`,class:"issue-link"},{default:g(()=>[k(t(i.issue),1)]),_:2},1032,["to"])):(n(),l("span",Vs,"-"))]),s("td",null,t(i.column||"-"),1),s("td",null,t(d(i.tokensInput)),1),s("td",null,t(d(i.tokensOutput)),1),s("td",Bs,"$"+t(p(i.costUsd||0)),1),s("td",null,t(N(i.duration)),1),s("td",null,t(m(i.timestamp)),1)]))),128))])])])):(n(),l("div",Ss,t(e.$t("stats.noActivity")),1))])],64))])}}}),js=G(Ds,[["__scopeId","data-v-3e093864"]]);export{js as default};
1
+ import{_ as T}from"./BuPN94lV.js";import{u as U}from"./Bu0Sw6DH.js";import{u as V,s as B}from"./gSUFBi_6.js";import{d as D,u as K,r as L,x as M,n as E,o as R,a as j,m as b,v as q,c as l,e as s,f as z,w as g,t,k as r,h as o,s as H,F as h,q as I,b as n,g as k,j as W,_ as G}from"./_GOFtDs5.js";const J={class:"stats-page"},P={class:"page-header"},Q={class:"header-badges"},X={key:0,class:"badge badge-profile"},Y={key:1,class:"badge badge-model"},Z={key:0,class:"loading"},x={key:0,class:"processing-alert card"},ss={class:"processing-issues"},ts={class:"stats-grid"},es={class:"stat-card card"},as={class:"stat-value"},os={class:"stat-breakdown"},ns={class:"breakdown-item"},ls={class:"label"},is={class:"value"},ds={class:"breakdown-item"},cs={class:"label"},rs={class:"value"},us={class:"stat-footer"},_s={class:"calls-count"},ps={class:"cost-value"},hs={key:0,class:"started-at"},ks={class:"stat-card card"},vs={class:"stat-value"},fs={class:"stat-breakdown"},ms={class:"breakdown-item"},ys={class:"label"},$s={class:"value"},bs={class:"breakdown-item"},gs={class:"label"},Is={class:"value"},ws={class:"stat-footer"},Cs={class:"calls-count"},As={class:"cost-value"},Fs={class:"stat-card card info-card"},Os={class:"cost-explanation"},Ns={class:"card history-card"},Ss={key:0,class:"empty"},Ts={key:1,class:"table-container"},Us={class:"history-table"},Vs={key:1,class:"text-muted"},Bs={class:"cost-cell"},Ds=D({__name:"stats",async setup(Ks){let c,v;const{locale:w}=K(),u=L(!1),{data:a,status:C,refresh:f}=([c,v]=M(()=>U("/api/stats","$ygpy_aVKAm")),c=await c,v(),c),{lastMessage:A}=V();E(A,e=>{(e?.type==="claude_end"||e?.type==="stats-update"||e?.type==="refresh")&&(u.value=!0,f().finally(()=>{u.value=!1}))});let _;R(()=>{_=B(()=>{f()},5e3)}),j(()=>{_&&clearInterval(_)});const F=b(()=>(a.value?.session?.tokensInput||0)+(a.value?.session?.tokensOutput||0)),O=b(()=>(a.value?.totals?.tokensInput||0)+(a.value?.totals?.tokensOutput||0)),d=e=>e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(1)+"K":e.toString(),p=e=>e.toFixed(4),N=e=>e?e<1e3?e+"ms":(e/1e3).toFixed(1)+"s":"-",m=e=>e?new Date(e).toLocaleString(w.value==="fr"?"fr-FR":"en-US"):"-";return q({title:"Statistics - AutoCode"}),(e,y)=>{const $=T;return n(),l("div",J,[s("header",P,[z($,{to:"/kanban",class:"back-link"},{default:g(()=>[k(" ← "+t(e.$t("stats.backToKanban")),1)]),_:1}),s("h1",null,t(e.$t("stats.title")),1),s("div",Q,[o(a)?.profile?(n(),l("span",X,t(o(a).profile),1)):r("",!0),o(a)?.model?(n(),l("span",Y,t(o(a).model),1)):r("",!0),s("span",{class:H(["refresh-indicator",{active:o(u)}])},null,2)])]),o(C)==="pending"?(n(),l("div",Z,t(e.$t("kanban.loading")),1)):(n(),l(h,{key:1},[o(a)?.processingIssues?.length?(n(),l("div",x,[s("h3",null,t(e.$t("stats.processing")),1),s("div",ss,[(n(!0),l(h,null,I(o(a).processingIssues,i=>(n(),l("span",{key:i,class:"processing-badge"},[y[0]||(y[0]=s("span",{class:"dot-pulse"},null,-1)),k(" "+t(i),1)]))),128))])])):r("",!0),s("div",ts,[s("div",es,[s("h2",null,t(e.$t("stats.session")),1),s("div",as,t(d(o(F))),1),s("div",os,[s("div",ns,[s("span",ls,t(e.$t("stats.tokensInput")),1),s("span",is,t(d(o(a)?.session?.tokensInput||0)),1)]),s("div",ds,[s("span",cs,t(e.$t("stats.tokensOutput")),1),s("span",rs,t(d(o(a)?.session?.tokensOutput||0)),1)])]),s("div",us,[s("span",_s,t(o(a)?.session?.callCount||0)+" "+t(e.$t("stats.calls")),1),s("span",ps,"$"+t(p(o(a)?.session?.costUsd||0)),1)]),o(a)?.session?.startedAt?(n(),l("div",hs,t(e.$t("stats.startedAt"))+": "+t(m(o(a).session.startedAt)),1)):r("",!0)]),s("div",ks,[s("h2",null,t(e.$t("stats.totals")),1),s("div",vs,t(d(o(O))),1),s("div",fs,[s("div",ms,[s("span",ys,t(e.$t("stats.tokensInput")),1),s("span",$s,t(d(o(a)?.totals?.tokensInput||0)),1)]),s("div",bs,[s("span",gs,t(e.$t("stats.tokensOutput")),1),s("span",Is,t(d(o(a)?.totals?.tokensOutput||0)),1)])]),s("div",ws,[s("span",Cs,t(o(a)?.totals?.callCount||0)+" "+t(e.$t("stats.calls")),1),s("span",As,"$"+t(p(o(a)?.totals?.costUsd||0)),1)])]),s("div",Fs,[s("h2",null,t(e.$t("stats.cost")),1),s("p",Os,t(e.$t("stats.costExplanation")),1)])]),s("div",Ns,[s("h2",null,t(e.$t("stats.recentActivity")),1),o(a)?.history?.length?(n(),l("div",Ts,[s("table",Us,[s("thead",null,[s("tr",null,[s("th",null,t(e.$t("stats.issue")),1),s("th",null,t(e.$t("stats.column")),1),s("th",null,t(e.$t("stats.tokensInput")),1),s("th",null,t(e.$t("stats.tokensOutput")),1),s("th",null,t(e.$t("stats.cost")),1),s("th",null,t(e.$t("stats.duration")),1),s("th",null,t(e.$t("stats.date")),1)])]),s("tbody",null,[(n(!0),l(h,null,I(o(a).history,(i,S)=>(n(),l("tr",{key:S},[s("td",null,[i.issue?(n(),W($,{key:0,to:`/issue/${i.issue}`,class:"issue-link"},{default:g(()=>[k(t(i.issue),1)]),_:2},1032,["to"])):(n(),l("span",Vs,"-"))]),s("td",null,t(i.column||"-"),1),s("td",null,t(d(i.tokensInput)),1),s("td",null,t(d(i.tokensOutput)),1),s("td",Bs,"$"+t(p(i.costUsd||0)),1),s("td",null,t(N(i.duration)),1),s("td",null,t(m(i.timestamp)),1)]))),128))])])])):(n(),l("div",Ss,t(e.$t("stats.noActivity")),1))])],64))])}}}),js=G(Ds,[["__scopeId","data-v-3e093864"]]);export{js as default};
@@ -1 +1 @@
1
- import{d as S,g as U,aH as N,ar as z,M as B,as as E,aC as F,T as w,r as I,L as P}from"./BajA-R3t.js";import{w as T}from"./DKgemWiE.js";import{q as V}from"./DqEU6TSY.js";import{d as A,m as g,n as $,c as n,b as i,k as y,F as _,f as o,j as k,s as D,r as L,e as f,l as M,q as R,h as r,t as q,w as h}from"./DKB4Mc1Q.js";import"./92s3wAHG.js";import"./CLW3obj5.js";import"./N7kSzZAV.js";import"./Bc3I1G9W.js";import"./DEvRa3of.js";const O=A({__name:"CollectionServerForm",props:{collectionId:{default:""},serverUid:{default:""}},setup(C){const t=C,{activeWorkspaceCollections:d}=S(),{servers:p,serverMutators:v}=U(),c=[{label:"URL",key:"url",placeholder:"https://void.scalar.com",type:"text"},{label:"Description",key:"description",placeholder:"Production",type:"text"}],e=g(()=>{const l=d.value.find(a=>a.uid===t.collectionId);return p[l&&typeof t.serverUid=="string"&&t.serverUid==="default"?l.servers[0]??"":l?.servers.find(a=>a===t.serverUid)??""]}),m=g(()=>e.value?.url?e.value.url.match(N.PATH)?.map(l=>l.slice(1,-1))??[]:[]);$(m,l=>{if(!e.value)return;const a=e.value.variables?{...e.value.variables}:{};Object.keys(a).forEach(s=>{l.includes(s)||delete a[s]}),l.forEach(s=>{a[s]||(a[s]={default:""})}),v.edit(e.value.uid,"variables",a)},{immediate:!0});const b=(l,a)=>{!d.value||!e.value||v.edit(e.value.uid,l,a)},x=(l,a)=>{if(!e.value)return;const s=e.value.variables||{};s[l]={...s[l],default:a},v.edit(e.value.uid,"variables",s)};return(l,a)=>(i(),n("div",{class:D(["divide-0.5 flex w-full flex-col divide-y rounded-b-lg text-sm",e.value?.variables&&"bg-b-1"])},[e.value?(i(),n(_,{key:0},[o(V,{data:e.value,onUpdate:b,options:c},null,8,["data"]),e.value.variables?(i(),k(z,{key:0,variables:e.value.variables,"onUpdate:variable":x},null,8,["variables"])):y("",!0)],64)):y("",!0)],2))}}),W={class:"flex h-full w-full flex-col gap-12 px-1.5 pt-8"},H={class:"flex flex-col gap-4"},Y={class:"rounded-lg border"},G={class:"bg-b-2 flex items-start justify-between rounded-t-lg py-1 pr-1 pl-3 text-sm"},X={key:1,class:"self-center"},J={class:"text-c-3 flex h-full items-center justify-center rounded-lg border p-4"},oe=A({__name:"CollectionServers",setup(C){const{activeCollection:t}=S(),{servers:d,events:p,serverMutators:v}=U(),c=B(),e=L(null),m=g(()=>!d||!t.value?.servers?[]:Object.values(d).filter(a=>t.value?.servers.includes(a.uid))),b=()=>p.commandPalette.emit({commandName:"Add Server"}),x=()=>{!t.value?.uid||!e.value||(v.delete(e.value,t.value.uid),c.hide())},l=a=>{e.value=a,c.show()};return(a,s)=>(i(),n("div",W,[f("div",H,[s[2]||(s[2]=M('<div class="flex items-start justify-between gap-2"><div class="flex flex-col gap-2"><div class="flex h-8 items-center"><h3 class="font-bold">Servers</h3></div><p class="text-sm"> Add different base URLs for your API. You can use <code class="font-code text-c-2">{variables}</code> for dynamic parts. </p></div></div>',1)),(i(!0),n(_,null,R(m.value,(u,j)=>(i(),n("div",{key:u.uid},[f("div",Y,[f("div",G,[u.description?(i(),k(r(E),{key:0,class:"self-center",value:u.description},null,8,["value"])):(i(),n("span",X,"Server "+q(j+1),1)),o(r(w),{class:"hover:bg-b-3 hover:text-c-1 h-fit p-1.25",variant:"ghost",onClick:K=>l(u.uid)},{default:h(()=>[o(r(F),{class:"size-3.5"})]),_:1},8,["onClick"])]),r(t)?(i(),k(O,{key:0,collectionId:r(t).uid,serverUid:u.uid},null,8,["collectionId","serverUid"])):y("",!0)])]))),128)),f("div",J,[o(r(w),{class:"hover:bg-b-2 hover:text-c-1 flex items-center gap-2",size:"sm",variant:"ghost",onClick:b},{default:h(()=>[o(r(I),{class:"inline-flex",icon:"Add",size:"sm",thickness:"1.5"}),s[1]||(s[1]=f("span",null,"Add Server",-1))]),_:1})])]),o(r(P),{size:"xxs",state:r(c),title:`Delete ${e.value?r(d)[e.value]?.url:"Server"}`},{default:h(()=>[o(T,{variableName:"Server",warningMessage:"Are you sure you want to delete this server? This action cannot be undone.",onClose:s[0]||(s[0]=u=>r(c).hide()),onDelete:x})]),_:1},8,["state","title"])]))}});export{oe as default};
1
+ import{d as S,g as U,aH as N,ar as z,M as B,as as E,aC as F,T as w,r as I,L as P}from"./D7UiNNwv.js";import{w as T}from"./BbUL7hnj.js";import{q as V}from"./D6KySJ4l.js";import{d as A,m as g,n as $,c as n,b as i,k as y,F as _,f as o,j as k,s as D,r as L,e as f,l as M,q as R,h as r,t as q,w as h}from"./_GOFtDs5.js";import"./92s3wAHG.js";import"./Bu0Sw6DH.js";import"./BQ3I6Zb-.js";import"./CxFxslZw.js";import"./3z6Bx0TK.js";const O=A({__name:"CollectionServerForm",props:{collectionId:{default:""},serverUid:{default:""}},setup(C){const t=C,{activeWorkspaceCollections:d}=S(),{servers:p,serverMutators:v}=U(),c=[{label:"URL",key:"url",placeholder:"https://void.scalar.com",type:"text"},{label:"Description",key:"description",placeholder:"Production",type:"text"}],e=g(()=>{const l=d.value.find(a=>a.uid===t.collectionId);return p[l&&typeof t.serverUid=="string"&&t.serverUid==="default"?l.servers[0]??"":l?.servers.find(a=>a===t.serverUid)??""]}),m=g(()=>e.value?.url?e.value.url.match(N.PATH)?.map(l=>l.slice(1,-1))??[]:[]);$(m,l=>{if(!e.value)return;const a=e.value.variables?{...e.value.variables}:{};Object.keys(a).forEach(s=>{l.includes(s)||delete a[s]}),l.forEach(s=>{a[s]||(a[s]={default:""})}),v.edit(e.value.uid,"variables",a)},{immediate:!0});const b=(l,a)=>{!d.value||!e.value||v.edit(e.value.uid,l,a)},x=(l,a)=>{if(!e.value)return;const s=e.value.variables||{};s[l]={...s[l],default:a},v.edit(e.value.uid,"variables",s)};return(l,a)=>(i(),n("div",{class:D(["divide-0.5 flex w-full flex-col divide-y rounded-b-lg text-sm",e.value?.variables&&"bg-b-1"])},[e.value?(i(),n(_,{key:0},[o(V,{data:e.value,onUpdate:b,options:c},null,8,["data"]),e.value.variables?(i(),k(z,{key:0,variables:e.value.variables,"onUpdate:variable":x},null,8,["variables"])):y("",!0)],64)):y("",!0)],2))}}),W={class:"flex h-full w-full flex-col gap-12 px-1.5 pt-8"},H={class:"flex flex-col gap-4"},Y={class:"rounded-lg border"},G={class:"bg-b-2 flex items-start justify-between rounded-t-lg py-1 pr-1 pl-3 text-sm"},X={key:1,class:"self-center"},J={class:"text-c-3 flex h-full items-center justify-center rounded-lg border p-4"},oe=A({__name:"CollectionServers",setup(C){const{activeCollection:t}=S(),{servers:d,events:p,serverMutators:v}=U(),c=B(),e=L(null),m=g(()=>!d||!t.value?.servers?[]:Object.values(d).filter(a=>t.value?.servers.includes(a.uid))),b=()=>p.commandPalette.emit({commandName:"Add Server"}),x=()=>{!t.value?.uid||!e.value||(v.delete(e.value,t.value.uid),c.hide())},l=a=>{e.value=a,c.show()};return(a,s)=>(i(),n("div",W,[f("div",H,[s[2]||(s[2]=M('<div class="flex items-start justify-between gap-2"><div class="flex flex-col gap-2"><div class="flex h-8 items-center"><h3 class="font-bold">Servers</h3></div><p class="text-sm"> Add different base URLs for your API. You can use <code class="font-code text-c-2">{variables}</code> for dynamic parts. </p></div></div>',1)),(i(!0),n(_,null,R(m.value,(u,j)=>(i(),n("div",{key:u.uid},[f("div",Y,[f("div",G,[u.description?(i(),k(r(E),{key:0,class:"self-center",value:u.description},null,8,["value"])):(i(),n("span",X,"Server "+q(j+1),1)),o(r(w),{class:"hover:bg-b-3 hover:text-c-1 h-fit p-1.25",variant:"ghost",onClick:K=>l(u.uid)},{default:h(()=>[o(r(F),{class:"size-3.5"})]),_:1},8,["onClick"])]),r(t)?(i(),k(O,{key:0,collectionId:r(t).uid,serverUid:u.uid},null,8,["collectionId","serverUid"])):y("",!0)])]))),128)),f("div",J,[o(r(w),{class:"hover:bg-b-2 hover:text-c-1 flex items-center gap-2",size:"sm",variant:"ghost",onClick:b},{default:h(()=>[o(r(I),{class:"inline-flex",icon:"Add",size:"sm",thickness:"1.5"}),s[1]||(s[1]=f("span",null,"Add Server",-1))]),_:1})])]),o(r(P),{size:"xxs",state:r(c),title:`Delete ${e.value?r(d)[e.value]?.url:"Server"}`},{default:h(()=>[o(T,{variableName:"Server",warningMessage:"Are you sure you want to delete this server? This action cannot be undone.",onClose:s[0]||(s[0]=u=>r(c).hide()),onDelete:x})]),_:1},8,["state","title"])]))}});export{oe as default};
@@ -1,4 +1,4 @@
1
- import{u as nt,v as ot,p as rt,V as it,C as ut,m as Se,_ as ct,o as dt,s as Ie,a as mt,b as he,c as Ke,d as pe,g as fe,e as pt,f as ft,h as vt,w as De,i as je,j as ht,x as yt,k as Ae,F as bt,J as gt,W as xt,I as kt,K as wt,T as te,l as ve,n as Me,q as Je,r as V,Z as ze,t as X,y as Ct,z as $e,A as qe,B as Qe,D as Rt,M as ge,E as _t,G as be,H as $t,L as xe,Q as Ye,N as Ee,$ as Pe,O as Ne,P as qt,R as St,S as Et,U as ae,X as It,Y as Re,a0 as Dt,a1 as Be,a2 as Ut,a3 as Ue,a4 as Tt}from"./BajA-R3t.js";import{d as ce,ao as Mt,r as K,ap as zt,c as L,o as we,b as m,f as b,D as Xe,j as S,k as z,h as e,E as Wt,e as d,ak as At,A as H,aj as Ot,an as jt,t as se,s as F,n as oe,aF as ye,m as B,w as k,F as ue,q as ke,g as re,z as Ge,ar as Oe,J as _e,aA as Pt,aJ as Nt,bc as Ve,al as Le,a9 as Bt,C as Vt,at as Lt,ay as Ht,I as Ze,aP as Ft}from"./DKB4Mc1Q.js";import{m as et,c as Kt,o as Jt,C as Qt,y as Yt,D as Xt,h as Gt}from"./DpcTyoGM.js";import{i as He}from"./PakvrKeO.js";import{g as Zt,m as ea}from"./RgNv66WU.js";import{a as ta,w as We}from"./DKgemWiE.js";import{$ as aa}from"./Dred22d0.js";import{C as tt}from"./rEg4ipuK.js";import{m as sa}from"./DU_LmBMB.js";import"./92s3wAHG.js";import"./CLW3obj5.js";import"./N7kSzZAV.js";import"./Bc3I1G9W.js";import"./jNB-5CTq.js";import"./6guOtdqw.js";const la=["aria-label"],na=ce({inheritAttrs:!1,__name:"ScalarSidebarSearchInput",props:Mt({autofocus:{type:Boolean},loader:{},label:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(r){const t=K(null),a=zt(r,"modelValue");function i(){a.value="",t.value&&t.value.focus()}const{stylingAttrsCx:p,otherAttrs:s}=nt();return we(()=>r.autofocus&&t.value?.focus()),(g,u)=>(m(),L("label",Ot(jt(e(p)("flex items-center rounded border text-base has-[:focus-visible]:bg-sidebar-b-1 has-[:focus-visible]:outline h-8 gap-1 pl-2 pr-1.5","bg-sidebar-b-search border-sidebar-border-search",a.value?"text-sidebar-c-1":"text-sidebar-c-search"))),[b(e(ot),{class:"text-sidebar-c-search size-4"}),Xe(d("input",At({ref_key:"inputRef",ref:t,"aria-label":g.label??"Enter search query",autocapitalize:"off",autocomplete:"off",autocorrect:"off",class:"flex-1 appearance-none rounded border-none bg-transparent outline-none",placeholder:"Search...",spellcheck:"false",type:"search"},e(s),{"onUpdate:modelValue":u[0]||(u[0]=v=>a.value=v)}),null,16,la),[[Wt,a.value]]),g.loader&&g.loader.isActive?(m(),S(e(rt),{key:0,class:"mr-3 self-center",loader:g.loader,size:"md"},null,8,["loader"])):a.value?(m(),S(e(ut),{key:1,class:"p-0.25 size-4",icon:e(it),weight:"bold",label:"Clear Search",onClick:H(i,["stop","prevent"])},null,8,["icon"])):z("",!0)],16))}}),oa={parse(r){try{return{error:!1,data:JSON.parse(r)}}catch(t){return{error:!0,message:t.message?String(t.message):"Unknown Error"}}}},ra=["aria-pressed"],ia={class:"sr-only"},ua={class:"size-4",fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},ca={"clip-path":"url(#mask)"},da=ce({__name:"SidebarToggle",setup(r){const{isSidebarOpen:t,toggleSidebarOpen:a}=Se();return(i,p)=>(m(),L("button",{"aria-pressed":e(t),class:"scalar-sidebar-toggle text-c-3 hover:bg-b-2 active:text-c-1 rounded-lg p-2",type:"button",onClick:p[0]||(p[0]=(...s)=>e(a)&&e(a)(...s))},[d("span",ia,se(e(t)?"Hide":"Show")+" sidebar",1),(m(),L("svg",ua,[p[1]||(p[1]=d("defs",null,[d("clipPath",{id:"mask"},[d("path",{"clip-rule":"evenodd",d:"M9 3.2H4c-1.7 0-3 1.3-3 3v11.5c0 1.7 1.3 3 3 3h5V3.2z"})])],-1)),d("g",ca,[d("path",{class:F(["transition-transform duration-300",e(t)?"translate-x-0":"-translate-x-1/2"]),d:"M1 3.2h8v17.5H1z",fill:"currentColor"},null,2)]),p[2]||(p[2]=d("path",{d:"M20 20.8H4c-1.7 0-3-1.3-3-3V6.2c0-1.7 1.3-3 3-3h16c1.7 0 3 1.3 3 3v11.5c0 1.7-1.3 3-3 3zM9 3.2v17.5",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},null,-1))]))],8,ra))}}),ma={"page-view":dt({to:Ie(),from:Ie(),hostname:Ie()}),"client-send-request":ct()},at=Object.keys(ma);mt(at);const pa=(r,t)=>{async function a(i,...[p]){if(!at.includes(i))throw new Error("[Analytics]: Invalid event submission");const s=t();await fetch(`${r}/analytics/send`,{method:"POST",headers:{"content-type":"application/json",...s?{authorization:`Bearer ${s}`}:{}},body:JSON.stringify({event:i,data:p})})}return{capture:a}},fa=pa("https://api.scalar.com",()=>null);function va(){const{layout:r}=he();if(!(!Ke().value.telemetry||r==="modal"))return fa}const ha=r=>{const t={invalidParams:new Set,hasBlockingErrors:!1};return r&&(r.parameters?.path?.forEach(a=>{a.enabled&&a.value.trim()===""&&(t.invalidParams.add(a.key),t.hasBlockingErrors=!0)}),["query","headers","cookies"].forEach(a=>{r.parameters?.[a]?.forEach(i=>{i.required&&i.value===""&&t.invalidParams.add(i.key)})})),t},ya=5*1e3,ba=60*1e3,ga=()=>{const{toast:r}=Ae(),t=pe(),a=fe(),{activeCollection:i,activeWorkspace:p}=t,{collectionMutators:s}=a,g=l=>r(`[useOpenApiWatcher] Changes to the ${l} were not applied`,"error"),u=l=>{l.path[0]==="info"||l.path[0]==="security"?bt(l,t,a)||g("collection"):l.path[0]==="components"&&l.path[1]==="securitySchemes"?gt(l,t,a)||g("securitySchemes"):l.path[0]==="servers"?xt(l,t,a)||g("servers"):l.path[0]==="tags"?kt(l,t,a)||g("tags"):l.path[0]==="paths"&&(wt(l,t,a)||g("requests"))},{pause:v,resume:_}=pt(async()=>{const l=i.value?.documentUrl;if(!l)return;const $=De[l];try{const D=await ft(l,p.value?.proxyUrl,void 0,!1),C=vt(D);if(s.edit(i.value.uid,"watchModeStatus","WATCHING"),$?.hash)if($.hash&&$.hash!==C){const{schema:w}=await je(D),y=ht($.schema,w),U=yt(y);try{U.forEach(u),De[l]={hash:C,schema:w}}catch(E){console.error("[useOpenApiWatcher] Error:",E)}}else console.log("[useOpenApiWatcher] No changes detected yet…");else{const{schema:w}=await je(D);w&&(De[l]={hash:C,schema:w})}}catch(D){console.error("[useOpenApiWatcher] Error:",D),console.info("[useOpenApiWatcher] Pausing watcher for 60 seconds"),v(),s.edit(i.value.uid,"watchModeStatus","ERROR"),r("[useOpenApiWatcher] Unable to fetch the spec file, paused the watcher for 60 seconds","error"),setTimeout(()=>{console.info("[useOpenApiWatcher] Resuming watcher"),_()},ba)}},ya);oe([()=>i.value?.documentUrl,()=>i.value?.watchMode],([l,$])=>{l&&$?(console.info(`[useOpenApiWatcher] Watching ${l} …`),_()):i.value&&(v(),s.edit(i.value.uid,"watchModeStatus","IDLE"))},{immediate:!0})},xa=` ,\\
1
+ import{u as nt,v as ot,p as rt,V as it,C as ut,m as Se,_ as ct,o as dt,s as Ie,a as mt,b as he,c as Ke,d as pe,g as fe,e as pt,f as ft,h as vt,w as De,i as je,j as ht,x as yt,k as Ae,F as bt,J as gt,W as xt,I as kt,K as wt,T as te,l as ve,n as Me,q as Je,r as V,Z as ze,t as X,y as Ct,z as $e,A as qe,B as Qe,D as Rt,M as ge,E as _t,G as be,H as $t,L as xe,Q as Ye,N as Ee,$ as Pe,O as Ne,P as qt,R as St,S as Et,U as ae,X as It,Y as Re,a0 as Dt,a1 as Be,a2 as Ut,a3 as Ue,a4 as Tt}from"./D7UiNNwv.js";import{d as ce,ao as Mt,r as K,ap as zt,c as L,o as we,b as m,f as b,D as Xe,j as S,k as z,h as e,E as Wt,e as d,ak as At,A as H,aj as Ot,an as jt,t as se,s as F,n as oe,aF as ye,m as B,w as k,F as ue,q as ke,g as re,z as Ge,ar as Oe,J as _e,aA as Pt,aJ as Nt,bc as Ve,al as Le,a9 as Bt,C as Vt,at as Lt,ay as Ht,I as Ze,aP as Ft}from"./_GOFtDs5.js";import{m as et,c as Kt,o as Jt,C as Qt,y as Yt,D as Xt,h as Gt}from"./B-EYUTUP.js";import{i as He}from"./CDvthk08.js";import{g as Zt,m as ea}from"./DIffTefD.js";import{a as ta,w as We}from"./BbUL7hnj.js";import{$ as aa}from"./DLDWaS1v.js";import{C as tt}from"./DuK-C58J.js";import{m as sa}from"./Cxse0Kvr.js";import"./92s3wAHG.js";import"./Bu0Sw6DH.js";import"./BQ3I6Zb-.js";import"./CxFxslZw.js";import"./QdkHS5sG.js";import"./uqtnWFyq.js";const la=["aria-label"],na=ce({inheritAttrs:!1,__name:"ScalarSidebarSearchInput",props:Mt({autofocus:{type:Boolean},loader:{},label:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(r){const t=K(null),a=zt(r,"modelValue");function i(){a.value="",t.value&&t.value.focus()}const{stylingAttrsCx:p,otherAttrs:s}=nt();return we(()=>r.autofocus&&t.value?.focus()),(g,u)=>(m(),L("label",Ot(jt(e(p)("flex items-center rounded border text-base has-[:focus-visible]:bg-sidebar-b-1 has-[:focus-visible]:outline h-8 gap-1 pl-2 pr-1.5","bg-sidebar-b-search border-sidebar-border-search",a.value?"text-sidebar-c-1":"text-sidebar-c-search"))),[b(e(ot),{class:"text-sidebar-c-search size-4"}),Xe(d("input",At({ref_key:"inputRef",ref:t,"aria-label":g.label??"Enter search query",autocapitalize:"off",autocomplete:"off",autocorrect:"off",class:"flex-1 appearance-none rounded border-none bg-transparent outline-none",placeholder:"Search...",spellcheck:"false",type:"search"},e(s),{"onUpdate:modelValue":u[0]||(u[0]=v=>a.value=v)}),null,16,la),[[Wt,a.value]]),g.loader&&g.loader.isActive?(m(),S(e(rt),{key:0,class:"mr-3 self-center",loader:g.loader,size:"md"},null,8,["loader"])):a.value?(m(),S(e(ut),{key:1,class:"p-0.25 size-4",icon:e(it),weight:"bold",label:"Clear Search",onClick:H(i,["stop","prevent"])},null,8,["icon"])):z("",!0)],16))}}),oa={parse(r){try{return{error:!1,data:JSON.parse(r)}}catch(t){return{error:!0,message:t.message?String(t.message):"Unknown Error"}}}},ra=["aria-pressed"],ia={class:"sr-only"},ua={class:"size-4",fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},ca={"clip-path":"url(#mask)"},da=ce({__name:"SidebarToggle",setup(r){const{isSidebarOpen:t,toggleSidebarOpen:a}=Se();return(i,p)=>(m(),L("button",{"aria-pressed":e(t),class:"scalar-sidebar-toggle text-c-3 hover:bg-b-2 active:text-c-1 rounded-lg p-2",type:"button",onClick:p[0]||(p[0]=(...s)=>e(a)&&e(a)(...s))},[d("span",ia,se(e(t)?"Hide":"Show")+" sidebar",1),(m(),L("svg",ua,[p[1]||(p[1]=d("defs",null,[d("clipPath",{id:"mask"},[d("path",{"clip-rule":"evenodd",d:"M9 3.2H4c-1.7 0-3 1.3-3 3v11.5c0 1.7 1.3 3 3 3h5V3.2z"})])],-1)),d("g",ca,[d("path",{class:F(["transition-transform duration-300",e(t)?"translate-x-0":"-translate-x-1/2"]),d:"M1 3.2h8v17.5H1z",fill:"currentColor"},null,2)]),p[2]||(p[2]=d("path",{d:"M20 20.8H4c-1.7 0-3-1.3-3-3V6.2c0-1.7 1.3-3 3-3h16c1.7 0 3 1.3 3 3v11.5c0 1.7-1.3 3-3 3zM9 3.2v17.5",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},null,-1))]))],8,ra))}}),ma={"page-view":dt({to:Ie(),from:Ie(),hostname:Ie()}),"client-send-request":ct()},at=Object.keys(ma);mt(at);const pa=(r,t)=>{async function a(i,...[p]){if(!at.includes(i))throw new Error("[Analytics]: Invalid event submission");const s=t();await fetch(`${r}/analytics/send`,{method:"POST",headers:{"content-type":"application/json",...s?{authorization:`Bearer ${s}`}:{}},body:JSON.stringify({event:i,data:p})})}return{capture:a}},fa=pa("https://api.scalar.com",()=>null);function va(){const{layout:r}=he();if(!(!Ke().value.telemetry||r==="modal"))return fa}const ha=r=>{const t={invalidParams:new Set,hasBlockingErrors:!1};return r&&(r.parameters?.path?.forEach(a=>{a.enabled&&a.value.trim()===""&&(t.invalidParams.add(a.key),t.hasBlockingErrors=!0)}),["query","headers","cookies"].forEach(a=>{r.parameters?.[a]?.forEach(i=>{i.required&&i.value===""&&t.invalidParams.add(i.key)})})),t},ya=5*1e3,ba=60*1e3,ga=()=>{const{toast:r}=Ae(),t=pe(),a=fe(),{activeCollection:i,activeWorkspace:p}=t,{collectionMutators:s}=a,g=l=>r(`[useOpenApiWatcher] Changes to the ${l} were not applied`,"error"),u=l=>{l.path[0]==="info"||l.path[0]==="security"?bt(l,t,a)||g("collection"):l.path[0]==="components"&&l.path[1]==="securitySchemes"?gt(l,t,a)||g("securitySchemes"):l.path[0]==="servers"?xt(l,t,a)||g("servers"):l.path[0]==="tags"?kt(l,t,a)||g("tags"):l.path[0]==="paths"&&(wt(l,t,a)||g("requests"))},{pause:v,resume:_}=pt(async()=>{const l=i.value?.documentUrl;if(!l)return;const $=De[l];try{const D=await ft(l,p.value?.proxyUrl,void 0,!1),C=vt(D);if(s.edit(i.value.uid,"watchModeStatus","WATCHING"),$?.hash)if($.hash&&$.hash!==C){const{schema:w}=await je(D),y=ht($.schema,w),U=yt(y);try{U.forEach(u),De[l]={hash:C,schema:w}}catch(E){console.error("[useOpenApiWatcher] Error:",E)}}else console.log("[useOpenApiWatcher] No changes detected yet…");else{const{schema:w}=await je(D);w&&(De[l]={hash:C,schema:w})}}catch(D){console.error("[useOpenApiWatcher] Error:",D),console.info("[useOpenApiWatcher] Pausing watcher for 60 seconds"),v(),s.edit(i.value.uid,"watchModeStatus","ERROR"),r("[useOpenApiWatcher] Unable to fetch the spec file, paused the watcher for 60 seconds","error"),setTimeout(()=>{console.info("[useOpenApiWatcher] Resuming watcher"),_()},ba)}},ya);oe([()=>i.value?.documentUrl,()=>i.value?.watchMode],([l,$])=>{l&&$?(console.info(`[useOpenApiWatcher] Watching ${l} …`),_()):i.value&&(v(),s.edit(i.value.uid,"watchModeStatus","IDLE"))},{immediate:!0})},xa=` ,\\
2
2
  \\\\\\,_
3
3
  \\\` ,\\
4
4
  __,.-" =__)
@@ -1 +1 @@
1
- import{D as r}from"./BajA-R3t.js";import{a as s}from"./DKgemWiE.js";import{d as u,r as i,j as d,b as c,w as p,f,h as C}from"./DKB4Mc1Q.js";const _=u({__name:"EditSidebarListElement",props:{name:{}},emits:["close","edit"],setup(l,{emit:n}){const m=l,t=n,o=i(m.name);return(V,e)=>(c(),d(s,{onCancel:e[1]||(e[1]=a=>t("close")),onSubmit:e[2]||(e[2]=a=>t("edit",o.value))},{default:p(()=>[f(C(r),{modelValue:o.value,"onUpdate:modelValue":e[0]||(e[0]=a=>o.value=a),autofocus:""},null,8,["modelValue"])]),_:1}))}});export{_ as C};
1
+ import{D as r}from"./D7UiNNwv.js";import{a as s}from"./BbUL7hnj.js";import{d as u,r as i,j as d,b as c,w as p,f,h as C}from"./_GOFtDs5.js";const _=u({__name:"EditSidebarListElement",props:{name:{}},emits:["close","edit"],setup(l,{emit:n}){const m=l,t=n,o=i(m.name);return(V,e)=>(c(),d(s,{onCancel:e[1]||(e[1]=a=>t("close")),onSubmit:e[2]||(e[2]=a=>t("edit",o.value))},{default:p(()=>[f(C(r),{modelValue:o.value,"onUpdate:modelValue":e[0]||(e[0]=a=>o.value=a),autofocus:""},null,8,["modelValue"])]),_:1}))}});export{_ as C};
@@ -1,4 +1,4 @@
1
- import{_ as f}from"./B2RgqbNO.js";import{d as x,u as y,v as h,c as n,e,f as v,w as D,t as o,h as t,F as p,q as r,b as i,g as _,k as u,_ as k}from"./DKB4Mc1Q.js";const b={class:"docs-cli-page"},w={class:"docs-cli-header"},C={class:"docs-cli-subtitle"},A={class:"docs-cli-content"},j={class:"docs-cli-section"},P={class:"docs-cli-code-block"},N={class:"docs-cli-section"},E={class:"docs-cli-note"},L={class:"docs-cli-command-desc"},O={class:"docs-cli-syntax"},S={key:0,class:"docs-cli-options"},F={class:"docs-cli-options-table"},I={key:1,class:"docs-cli-examples"},T={class:"docs-cli-code-block"},U={class:"docs-cli-section"},V={class:"docs-cli-env-table"},z=x({__name:"cli",setup(B){const{t:s}=y();h({title:()=>s("docs.cli.title")+" | AutoCode"});const m=[{key:"server",commands:[{cmd:"serve",syntax:"autocode serve [options]",description:"serve",options:[{flag:"-p, --port <port>",desc:"portDesc"},{flag:"-e, --expose",desc:"exposeDesc"},{flag:"--debug",desc:"debugDesc"}],examples:["autocode","autocode serve -p 8080","autocode serve --expose"]},{cmd:"init",syntax:"autocode init",description:"init",options:[],examples:["autocode init"]}]},{key:"issues",commands:[{cmd:"new",syntax:"autocode new <title> [description]",description:"new",options:[{flag:"-p, --priority <P0-P3>",desc:"priorityDesc"},{flag:"-l, --labels <labels>",desc:"labelsDesc"},{flag:"-a, --acceptance <criteria>",desc:"acceptanceDesc"},{flag:"-c, --column <slug>",desc:"columnDesc"},{flag:"--parent <key>",desc:"parentDesc"}],examples:['autocode new "Fix login bug"','autocode new "Add feature" "Detailed description" -p P1']},{cmd:"new-child",syntax:"autocode new-child <parent-key> <title> [description]",description:"newChild",options:[{flag:"-p, --priority <P0-P3>",desc:"priorityDesc"},{flag:"-l, --labels <labels>",desc:"labelsDesc"},{flag:"-a, --acceptance <criteria>",desc:"acceptanceDesc"}],examples:['autocode new-child AC-000001 "Subtask title"','autocode new-child AC-000001 "Subtask" "Description" -p P2']},{cmd:"show",syntax:"autocode show <key>",description:"show",options:[{flag:"--json",desc:"jsonDesc"}],examples:["autocode show AC-000001","autocode show AC-000001 --json"]},{cmd:"list",syntax:"autocode list [options]",description:"list",options:[{flag:"-c, --column <slug>",desc:"filterColumnDesc"},{flag:"-p, --priority <P0-P3>",desc:"filterPriorityDesc"},{flag:"-l, --label <label>",desc:"filterLabelDesc"},{flag:"--parent <key>",desc:"filterParentDesc"},{flag:"--tree",desc:"treeDesc"},{flag:"--json",desc:"jsonDesc"}],examples:["autocode list","autocode list -c in-progress","autocode list --tree","autocode list -p P0 --json"]},{cmd:"history",syntax:"autocode history <key>",description:"history",options:[{flag:"--json",desc:"jsonFullDesc"},{flag:"--full",desc:"fullDesc"},{flag:"--limit <N>",desc:"limitDesc"}],examples:["autocode history AC-000001","autocode history AC-000001 --full --limit 5"]}]},{key:"workflow",commands:[{cmd:"start",syntax:"autocode start <key>",description:"start",options:[],examples:["autocode start AC-000001"]},{cmd:"next",syntax:"autocode next <key>",description:"next",options:[],examples:["autocode next AC-000001"]},{cmd:"move",syntax:"autocode move <key> <column>",description:"move",options:[{flag:"-f, --force",desc:"forceDesc"}],examples:["autocode move AC-000001 in-progress","autocode move AC-000001 done --force"]},{cmd:"comment",syntax:"autocode comment <key> <text>",description:"comment",options:[],examples:['autocode comment AC-000001 "Work in progress"']},{cmd:"parent",syntax:"autocode parent <key> [parent]",description:"parent",options:[],examples:["autocode parent AC-000002","autocode parent AC-000002 AC-000001","autocode parent AC-000002 --clear"]}]},{key:"monitoring",commands:[{cmd:"health",syntax:"autocode health",description:"health",options:[{flag:"--json",desc:"jsonDesc"},{flag:"-v, --verbose",desc:"verboseDesc"}],examples:["autocode health","autocode health -v"]},{cmd:"stats",syntax:"autocode stats",description:"stats",options:[{flag:"--json",desc:"jsonDesc"},{flag:"--session",desc:"sessionDesc"},{flag:"--totals",desc:"totalsDesc"}],examples:["autocode stats","autocode stats --session"]},{cmd:"columns",syntax:"autocode columns",description:"columns",options:[{flag:"--json",desc:"jsonDesc"}],examples:["autocode columns"]}]},{key:"pipeline",commands:[{cmd:"pipeline list",syntax:"autocode pipeline list",description:"pipelineList",options:[{flag:"--json",desc:"jsonDesc"}],examples:["autocode pipeline list"]},{cmd:"pipeline show",syntax:"autocode pipeline show <name>",description:"pipelineShow",options:[{flag:"--version <N>",desc:"versionDesc"},{flag:"--json",desc:"jsonDesc"}],examples:["autocode pipeline show default","autocode pipeline show default --version 2"]},{cmd:"pipeline create",syntax:"autocode pipeline create <name>",description:"pipelineCreate",options:[{flag:'--description "..."',desc:"pipelineDescDesc"}],examples:['autocode pipeline create sprint-workflow --description "Sprint-based flow"']},{cmd:"pipeline activate",syntax:"autocode pipeline activate <name>",description:"pipelineActivate",options:[{flag:"--version <N>",desc:"versionDesc"}],examples:["autocode pipeline activate default"]},{cmd:"pipeline draft",syntax:"autocode pipeline draft <name>",description:"pipelineDraft",options:[],examples:["autocode pipeline draft default"]},{cmd:"pipeline finalize",syntax:"autocode pipeline finalize <name>",description:"pipelineFinalize",options:[{flag:"--activate",desc:"activateDesc"}],examples:["autocode pipeline finalize default --activate"]},{cmd:"pipeline add-column",syntax:"autocode pipeline add-column <pipeline> <slug>",description:"pipelineAddColumn",options:[{flag:"--segment <segment>",desc:"segmentDesc"},{flag:"--position <N>",desc:"positionDesc"},{flag:'--name "..."',desc:"nameDesc"}],examples:["autocode pipeline add-column default review --segment action --position 2"]}]},{key:"catalog",commands:[{cmd:"catalog",syntax:"autocode catalog",description:"catalogList",options:[],examples:["autocode catalog"]},{cmd:"catalog add",syntax:"autocode catalog add <slug>",description:"catalogAdd",options:[{flag:"--segment <segment>",desc:"segmentDesc"},{flag:'--name "..."',desc:"nameDesc"}],examples:['autocode catalog add code-review --segment action --name "Code Review"']}]},{key:"maintenance",commands:[{cmd:"purge",syntax:"autocode purge",description:"purge",options:[{flag:"--force",desc:"forceConfirmDesc"}],examples:["autocode purge --force"]},{cmd:"help",syntax:"autocode help",description:"help",options:[],examples:["autocode help"]}]}];return(R,c)=>{const g=f;return i(),n("div",b,[e("div",w,[v(g,{to:"/",class:"docs-cli-back"},{default:D(()=>[c[0]||(c[0]=e("span",{class:"docs-cli-back-arrow"},"←",-1)),_(" "+o(t(s)("docs.cli.back")),1)]),_:1}),e("h1",null,o(t(s)("docs.cli.title")),1),e("p",C,o(t(s)("docs.cli.subtitle")),1)]),e("div",A,[e("section",j,[e("h2",null,o(t(s)("docs.cli.quickStart")),1),e("div",P,[e("pre",null,[e("code",null,"# "+o(t(s)("docs.cli.installGlobal"))+`
1
+ import{_ as f}from"./BuPN94lV.js";import{d as x,u as y,v as h,c as n,e,f as v,w as D,t as o,h as t,F as p,q as r,b as i,g as _,k as u,_ as k}from"./_GOFtDs5.js";const b={class:"docs-cli-page"},w={class:"docs-cli-header"},C={class:"docs-cli-subtitle"},A={class:"docs-cli-content"},j={class:"docs-cli-section"},P={class:"docs-cli-code-block"},N={class:"docs-cli-section"},E={class:"docs-cli-note"},L={class:"docs-cli-command-desc"},O={class:"docs-cli-syntax"},S={key:0,class:"docs-cli-options"},F={class:"docs-cli-options-table"},I={key:1,class:"docs-cli-examples"},T={class:"docs-cli-code-block"},U={class:"docs-cli-section"},V={class:"docs-cli-env-table"},z=x({__name:"cli",setup(B){const{t:s}=y();h({title:()=>s("docs.cli.title")+" | AutoCode"});const m=[{key:"server",commands:[{cmd:"serve",syntax:"autocode serve [options]",description:"serve",options:[{flag:"-p, --port <port>",desc:"portDesc"},{flag:"-e, --expose",desc:"exposeDesc"},{flag:"--debug",desc:"debugDesc"}],examples:["autocode","autocode serve -p 8080","autocode serve --expose"]},{cmd:"init",syntax:"autocode init",description:"init",options:[],examples:["autocode init"]}]},{key:"issues",commands:[{cmd:"new",syntax:"autocode new <title> [description]",description:"new",options:[{flag:"-p, --priority <P0-P3>",desc:"priorityDesc"},{flag:"-l, --labels <labels>",desc:"labelsDesc"},{flag:"-a, --acceptance <criteria>",desc:"acceptanceDesc"},{flag:"-c, --column <slug>",desc:"columnDesc"},{flag:"--parent <key>",desc:"parentDesc"}],examples:['autocode new "Fix login bug"','autocode new "Add feature" "Detailed description" -p P1']},{cmd:"new-child",syntax:"autocode new-child <parent-key> <title> [description]",description:"newChild",options:[{flag:"-p, --priority <P0-P3>",desc:"priorityDesc"},{flag:"-l, --labels <labels>",desc:"labelsDesc"},{flag:"-a, --acceptance <criteria>",desc:"acceptanceDesc"}],examples:['autocode new-child AC-000001 "Subtask title"','autocode new-child AC-000001 "Subtask" "Description" -p P2']},{cmd:"show",syntax:"autocode show <key>",description:"show",options:[{flag:"--json",desc:"jsonDesc"}],examples:["autocode show AC-000001","autocode show AC-000001 --json"]},{cmd:"list",syntax:"autocode list [options]",description:"list",options:[{flag:"-c, --column <slug>",desc:"filterColumnDesc"},{flag:"-p, --priority <P0-P3>",desc:"filterPriorityDesc"},{flag:"-l, --label <label>",desc:"filterLabelDesc"},{flag:"--parent <key>",desc:"filterParentDesc"},{flag:"--tree",desc:"treeDesc"},{flag:"--json",desc:"jsonDesc"}],examples:["autocode list","autocode list -c in-progress","autocode list --tree","autocode list -p P0 --json"]},{cmd:"history",syntax:"autocode history <key>",description:"history",options:[{flag:"--json",desc:"jsonFullDesc"},{flag:"--full",desc:"fullDesc"},{flag:"--limit <N>",desc:"limitDesc"}],examples:["autocode history AC-000001","autocode history AC-000001 --full --limit 5"]}]},{key:"workflow",commands:[{cmd:"start",syntax:"autocode start <key>",description:"start",options:[],examples:["autocode start AC-000001"]},{cmd:"next",syntax:"autocode next <key>",description:"next",options:[],examples:["autocode next AC-000001"]},{cmd:"move",syntax:"autocode move <key> <column>",description:"move",options:[{flag:"-f, --force",desc:"forceDesc"}],examples:["autocode move AC-000001 in-progress","autocode move AC-000001 done --force"]},{cmd:"comment",syntax:"autocode comment <key> <text>",description:"comment",options:[],examples:['autocode comment AC-000001 "Work in progress"']},{cmd:"parent",syntax:"autocode parent <key> [parent]",description:"parent",options:[],examples:["autocode parent AC-000002","autocode parent AC-000002 AC-000001","autocode parent AC-000002 --clear"]}]},{key:"monitoring",commands:[{cmd:"health",syntax:"autocode health",description:"health",options:[{flag:"--json",desc:"jsonDesc"},{flag:"-v, --verbose",desc:"verboseDesc"}],examples:["autocode health","autocode health -v"]},{cmd:"stats",syntax:"autocode stats",description:"stats",options:[{flag:"--json",desc:"jsonDesc"},{flag:"--session",desc:"sessionDesc"},{flag:"--totals",desc:"totalsDesc"}],examples:["autocode stats","autocode stats --session"]},{cmd:"columns",syntax:"autocode columns",description:"columns",options:[{flag:"--json",desc:"jsonDesc"}],examples:["autocode columns"]}]},{key:"pipeline",commands:[{cmd:"pipeline list",syntax:"autocode pipeline list",description:"pipelineList",options:[{flag:"--json",desc:"jsonDesc"}],examples:["autocode pipeline list"]},{cmd:"pipeline show",syntax:"autocode pipeline show <name>",description:"pipelineShow",options:[{flag:"--version <N>",desc:"versionDesc"},{flag:"--json",desc:"jsonDesc"}],examples:["autocode pipeline show default","autocode pipeline show default --version 2"]},{cmd:"pipeline create",syntax:"autocode pipeline create <name>",description:"pipelineCreate",options:[{flag:'--description "..."',desc:"pipelineDescDesc"}],examples:['autocode pipeline create sprint-workflow --description "Sprint-based flow"']},{cmd:"pipeline activate",syntax:"autocode pipeline activate <name>",description:"pipelineActivate",options:[{flag:"--version <N>",desc:"versionDesc"}],examples:["autocode pipeline activate default"]},{cmd:"pipeline draft",syntax:"autocode pipeline draft <name>",description:"pipelineDraft",options:[],examples:["autocode pipeline draft default"]},{cmd:"pipeline finalize",syntax:"autocode pipeline finalize <name>",description:"pipelineFinalize",options:[{flag:"--activate",desc:"activateDesc"}],examples:["autocode pipeline finalize default --activate"]},{cmd:"pipeline add-column",syntax:"autocode pipeline add-column <pipeline> <slug>",description:"pipelineAddColumn",options:[{flag:"--segment <segment>",desc:"segmentDesc"},{flag:"--position <N>",desc:"positionDesc"},{flag:'--name "..."',desc:"nameDesc"}],examples:["autocode pipeline add-column default review --segment action --position 2"]}]},{key:"catalog",commands:[{cmd:"catalog",syntax:"autocode catalog",description:"catalogList",options:[],examples:["autocode catalog"]},{cmd:"catalog add",syntax:"autocode catalog add <slug>",description:"catalogAdd",options:[{flag:"--segment <segment>",desc:"segmentDesc"},{flag:'--name "..."',desc:"nameDesc"}],examples:['autocode catalog add code-review --segment action --name "Code Review"']}]},{key:"maintenance",commands:[{cmd:"purge",syntax:"autocode purge",description:"purge",options:[{flag:"--force",desc:"forceConfirmDesc"}],examples:["autocode purge --force"]},{cmd:"help",syntax:"autocode help",description:"help",options:[],examples:["autocode help"]}]}];return(R,c)=>{const g=f;return i(),n("div",b,[e("div",w,[v(g,{to:"/",class:"docs-cli-back"},{default:D(()=>[c[0]||(c[0]=e("span",{class:"docs-cli-back-arrow"},"←",-1)),_(" "+o(t(s)("docs.cli.back")),1)]),_:1}),e("h1",null,o(t(s)("docs.cli.title")),1),e("p",C,o(t(s)("docs.cli.subtitle")),1)]),e("div",A,[e("section",j,[e("h2",null,o(t(s)("docs.cli.quickStart")),1),e("div",P,[e("pre",null,[e("code",null,"# "+o(t(s)("docs.cli.installGlobal"))+`
2
2
  npm install -g @autocode-cli/autocode
3
3
 
4
4
  # `+o(t(s)("docs.cli.initProject"))+`
@@ -1 +1 @@
1
- import{bb as u,u as p}from"./BajA-R3t.js";import{d as f,m,c as o,b as n,F as h,q as b,e as s,t as i,h as l,aj as g,an as k}from"./DKB4Mc1Q.js";const c={"⌘":"Command","^":"Control",ctrl:"Control","⌥":"Option",alt:"Alt","⇧":"Shift","⇪":"Caps Lock","↵":"Enter","←":"Left Arrow","→":"Right Arrow","↑":"Up Arrow","↓":"Down Arrow"},A={Meta:"⌘",Shift:"⇧",Alt:"⌥",Control:"^"},C={Meta:"ctrl",Shift:"⇧",Alt:"alt",Control:"ctrl"};function x(e){return e==="default"}function v(e){const t=x(e)?"Meta":e;return u()?A[t]:C[t]}function w(e,t){return[...t.map(r=>v(r)),e]}function y(e){return e in c?c[e]:e}const S={"aria-hidden":"true",class:"contents"},M={class:"sr-only"},D=f({inheritAttrs:!1,__name:"ScalarHotkey",props:{hotkey:{},modifier:{default:()=>["Meta"]}},setup(e){const{cx:t}=p(),r=m(()=>w(e.hotkey,e.modifier));return(B,E)=>(n(),o("div",g(k(l(t)("border-(--scalar-background-3) inline-flex gap-0.5 overflow-hidden rounded border text-xxs rounded-b p-1 font-medium uppercase leading-none"))),[(n(!0),o(h,null,b(r.value,(a,d)=>(n(),o("div",{key:d},[s("span",S,i(a),1),s("span",M,i(l(y)(a)),1)]))),128))],16))}});export{D as E};
1
+ import{bb as u,u as p}from"./D7UiNNwv.js";import{d as f,m,c as o,b as n,F as h,q as b,e as s,t as i,h as l,aj as g,an as k}from"./_GOFtDs5.js";const c={"⌘":"Command","^":"Control",ctrl:"Control","⌥":"Option",alt:"Alt","⇧":"Shift","⇪":"Caps Lock","↵":"Enter","←":"Left Arrow","→":"Right Arrow","↑":"Up Arrow","↓":"Down Arrow"},A={Meta:"⌘",Shift:"⇧",Alt:"⌥",Control:"^"},C={Meta:"ctrl",Shift:"⇧",Alt:"alt",Control:"ctrl"};function x(e){return e==="default"}function v(e){const t=x(e)?"Meta":e;return u()?A[t]:C[t]}function w(e,t){return[...t.map(r=>v(r)),e]}function y(e){return e in c?c[e]:e}const S={"aria-hidden":"true",class:"contents"},M={class:"sr-only"},D=f({inheritAttrs:!1,__name:"ScalarHotkey",props:{hotkey:{},modifier:{default:()=>["Meta"]}},setup(e){const{cx:t}=p(),r=m(()=>w(e.hotkey,e.modifier));return(B,E)=>(n(),o("div",g(k(l(t)("border-(--scalar-background-3) inline-flex gap-0.5 overflow-hidden rounded border text-xxs rounded-b p-1 font-medium uppercase leading-none"))),[(n(!0),o(h,null,b(r.value,(a,d)=>(n(),o("div",{key:d},[s("span",S,i(a),1),s("span",M,i(l(y)(a)),1)]))),128))],16))}});export{D as E};
@@ -1 +1 @@
1
- import{br as d,u as p,ay as i}from"./BajA-R3t.js";import{d as Z,c as n,b as e,al as u,k as c,h as t,e as o,ak as m,j as M,w as g}from"./DKB4Mc1Q.js";const f={key:0},L={key:1},k={key:2},v={key:3},w={key:4},H={key:5},x={name:"ScalarIconWarning"},V=Z({...x,props:{label:{},weight:{}},setup(h){const s=h,{bind:r,weight:l}=d(s);return(A,a)=>(e(),n("svg",m({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",fill:"currentColor"},t(r)),[u(A.$slots,"default"),t(l)==="bold"?(e(),n("g",f,[...a[0]||(a[0]=[o("path",{d:"M240.26,186.1,152.81,34.23h0a28.74,28.74,0,0,0-49.62,0L15.74,186.1a27.45,27.45,0,0,0,0,27.71A28.31,28.31,0,0,0,40.55,228h174.9a28.31,28.31,0,0,0,24.79-14.19A27.45,27.45,0,0,0,240.26,186.1Zm-20.8,15.7a4.46,4.46,0,0,1-4,2.2H40.55a4.46,4.46,0,0,1-4-2.2,3.56,3.56,0,0,1,0-3.73L124,46.2a4.77,4.77,0,0,1,8,0l87.44,151.87A3.56,3.56,0,0,1,219.46,201.8ZM116,136V104a12,12,0,0,1,24,0v32a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,176Z"},null,-1)])])):t(l)==="duotone"?(e(),n("g",L,[...a[1]||(a[1]=[o("path",{d:"M215.46,216H40.54C27.92,216,20,202.79,26.13,192.09L113.59,40.22c6.3-11,22.52-11,28.82,0l87.46,151.87C236,202.79,228.08,216,215.46,216Z",opacity:"0.2"},null,-1),o("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"},null,-1)])])):t(l)==="fill"?(e(),n("g",k,[...a[2]||(a[2]=[o("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM120,104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,88a12,12,0,1,1,12-12A12,12,0,0,1,128,192Z"},null,-1)])])):t(l)==="light"?(e(),n("g",v,[...a[3]||(a[3]=[o("path",{d:"M235.07,189.09,147.61,37.22h0a22.75,22.75,0,0,0-39.22,0L20.93,189.09a21.53,21.53,0,0,0,0,21.72A22.35,22.35,0,0,0,40.55,222h174.9a22.35,22.35,0,0,0,19.6-11.19A21.53,21.53,0,0,0,235.07,189.09ZM224.66,204.8a10.46,10.46,0,0,1-9.21,5.2H40.55a10.46,10.46,0,0,1-9.21-5.2,9.51,9.51,0,0,1,0-9.72L118.79,43.21a10.75,10.75,0,0,1,18.42,0l87.46,151.87A9.51,9.51,0,0,1,224.66,204.8ZM122,144V104a6,6,0,0,1,12,0v40a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,180Z"},null,-1)])])):t(l)==="regular"?(e(),n("g",w,[...a[4]||(a[4]=[o("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"},null,-1)])])):t(l)==="thin"?(e(),n("g",H,[...a[5]||(a[5]=[o("path",{d:"M233.34,190.09,145.88,38.22h0a20.75,20.75,0,0,0-35.76,0L22.66,190.09a19.52,19.52,0,0,0,0,19.71A20.36,20.36,0,0,0,40.54,220H215.46a20.36,20.36,0,0,0,17.86-10.2A19.52,19.52,0,0,0,233.34,190.09ZM226.4,205.8a12.47,12.47,0,0,1-10.94,6.2H40.54a12.47,12.47,0,0,1-10.94-6.2,11.45,11.45,0,0,1,0-11.72L117.05,42.21a12.76,12.76,0,0,1,21.9,0L226.4,194.08A11.45,11.45,0,0,1,226.4,205.8ZM124,144V104a4,4,0,0,1,8,0v40a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,180Z"},null,-1)])])):c("",!0)],16))}}),b=Z({__name:"DataTableHeader",setup(h){const{cx:s}=p();return(r,l)=>(e(),M(i,m({is:"th"},t(s)("items-center font-medium px-2 min-w-0 -outline-offset-1")),{default:g(()=>[u(r.$slots,"default")]),_:3},16))}});export{V as H,b as x};
1
+ import{br as d,u as p,ay as i}from"./D7UiNNwv.js";import{d as Z,c as n,b as e,al as u,k as c,h as t,e as o,ak as m,j as M,w as g}from"./_GOFtDs5.js";const f={key:0},L={key:1},k={key:2},v={key:3},w={key:4},H={key:5},x={name:"ScalarIconWarning"},V=Z({...x,props:{label:{},weight:{}},setup(h){const s=h,{bind:r,weight:l}=d(s);return(A,a)=>(e(),n("svg",m({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",fill:"currentColor"},t(r)),[u(A.$slots,"default"),t(l)==="bold"?(e(),n("g",f,[...a[0]||(a[0]=[o("path",{d:"M240.26,186.1,152.81,34.23h0a28.74,28.74,0,0,0-49.62,0L15.74,186.1a27.45,27.45,0,0,0,0,27.71A28.31,28.31,0,0,0,40.55,228h174.9a28.31,28.31,0,0,0,24.79-14.19A27.45,27.45,0,0,0,240.26,186.1Zm-20.8,15.7a4.46,4.46,0,0,1-4,2.2H40.55a4.46,4.46,0,0,1-4-2.2,3.56,3.56,0,0,1,0-3.73L124,46.2a4.77,4.77,0,0,1,8,0l87.44,151.87A3.56,3.56,0,0,1,219.46,201.8ZM116,136V104a12,12,0,0,1,24,0v32a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,176Z"},null,-1)])])):t(l)==="duotone"?(e(),n("g",L,[...a[1]||(a[1]=[o("path",{d:"M215.46,216H40.54C27.92,216,20,202.79,26.13,192.09L113.59,40.22c6.3-11,22.52-11,28.82,0l87.46,151.87C236,202.79,228.08,216,215.46,216Z",opacity:"0.2"},null,-1),o("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"},null,-1)])])):t(l)==="fill"?(e(),n("g",k,[...a[2]||(a[2]=[o("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM120,104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,88a12,12,0,1,1,12-12A12,12,0,0,1,128,192Z"},null,-1)])])):t(l)==="light"?(e(),n("g",v,[...a[3]||(a[3]=[o("path",{d:"M235.07,189.09,147.61,37.22h0a22.75,22.75,0,0,0-39.22,0L20.93,189.09a21.53,21.53,0,0,0,0,21.72A22.35,22.35,0,0,0,40.55,222h174.9a22.35,22.35,0,0,0,19.6-11.19A21.53,21.53,0,0,0,235.07,189.09ZM224.66,204.8a10.46,10.46,0,0,1-9.21,5.2H40.55a10.46,10.46,0,0,1-9.21-5.2,9.51,9.51,0,0,1,0-9.72L118.79,43.21a10.75,10.75,0,0,1,18.42,0l87.46,151.87A9.51,9.51,0,0,1,224.66,204.8ZM122,144V104a6,6,0,0,1,12,0v40a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,180Z"},null,-1)])])):t(l)==="regular"?(e(),n("g",w,[...a[4]||(a[4]=[o("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"},null,-1)])])):t(l)==="thin"?(e(),n("g",H,[...a[5]||(a[5]=[o("path",{d:"M233.34,190.09,145.88,38.22h0a20.75,20.75,0,0,0-35.76,0L22.66,190.09a19.52,19.52,0,0,0,0,19.71A20.36,20.36,0,0,0,40.54,220H215.46a20.36,20.36,0,0,0,17.86-10.2A19.52,19.52,0,0,0,233.34,190.09ZM226.4,205.8a12.47,12.47,0,0,1-10.94,6.2H40.54a12.47,12.47,0,0,1-10.94-6.2,11.45,11.45,0,0,1,0-11.72L117.05,42.21a12.76,12.76,0,0,1,21.9,0L226.4,194.08A11.45,11.45,0,0,1,226.4,205.8ZM124,144V104a4,4,0,0,1,8,0v40a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,180Z"},null,-1)])])):c("",!0)],16))}}),b=Z({__name:"DataTableHeader",setup(h){const{cx:s}=p();return(r,l)=>(e(),M(i,m({is:"th"},t(s)("items-center font-medium px-2 min-w-0 -outline-offset-1")),{default:g(()=>[u(r.$slots,"default")]),_:3},16))}});export{V as H,b as x};