@alepha/devtools 0.14.4 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/devtools/actions.html +4 -22
- package/assets/devtools/actions.html.br +0 -0
- package/assets/devtools/actions.html.gz +0 -0
- package/assets/devtools/asset.CMFNRMve.css +1 -0
- package/assets/devtools/asset.CMFNRMve.css.br +0 -0
- package/assets/devtools/asset.CMFNRMve.css.gz +0 -0
- package/assets/devtools/atoms.html +4 -22
- package/assets/devtools/atoms.html.br +0 -0
- package/assets/devtools/atoms.html.gz +0 -0
- package/assets/devtools/caches.html +4 -22
- package/assets/devtools/caches.html.br +0 -0
- package/assets/devtools/caches.html.gz +0 -0
- package/assets/devtools/chunk.9K7EO5hq.js +1 -0
- package/assets/devtools/chunk.9K7EO5hq.js.br +0 -0
- package/assets/devtools/chunk.9K7EO5hq.js.gz +0 -0
- package/assets/devtools/{chunk.BgMi2Pqe.js → chunk.B4porofG.js} +1 -1
- package/assets/devtools/chunk.B4porofG.js.br +0 -0
- package/assets/devtools/chunk.B4porofG.js.gz +0 -0
- package/assets/devtools/{chunk.BKZ6YEV4.js → chunk.BIGcMrv-.js} +1 -1
- package/assets/devtools/chunk.BIGcMrv-.js.br +0 -0
- package/assets/devtools/chunk.BIGcMrv-.js.gz +0 -0
- package/assets/devtools/chunk.BP23bv4G.js +1 -0
- package/assets/devtools/chunk.BP23bv4G.js.br +0 -0
- package/assets/devtools/chunk.BP23bv4G.js.gz +0 -0
- package/assets/devtools/{chunk.W-1mjDd7.js → chunk.BWdBHr2F.js} +1 -1
- package/assets/devtools/chunk.BWdBHr2F.js.br +0 -0
- package/assets/devtools/chunk.BWdBHr2F.js.gz +0 -0
- package/assets/devtools/{chunk.5EOPWu_h.js → chunk.BfFwPQgv.js} +2 -2
- package/assets/devtools/chunk.BfFwPQgv.js.br +0 -0
- package/assets/devtools/chunk.BfFwPQgv.js.gz +0 -0
- package/assets/devtools/{chunk.CIYikik4.js → chunk.BiIrl-Hq.js} +1 -1
- package/assets/devtools/chunk.BiIrl-Hq.js.br +0 -0
- package/assets/devtools/chunk.BiIrl-Hq.js.gz +0 -0
- package/assets/devtools/chunk.C8JxGZtc.js +1 -0
- package/assets/devtools/chunk.C8JxGZtc.js.br +0 -0
- package/assets/devtools/chunk.C8JxGZtc.js.gz +0 -0
- package/assets/devtools/{chunk.CEbDj1NR.js → chunk.CFLl96SC.js} +1 -1
- package/assets/devtools/chunk.CFLl96SC.js.br +0 -0
- package/assets/devtools/chunk.CFLl96SC.js.gz +0 -0
- package/assets/devtools/{chunk.CZ4J9K5b.js → chunk.CMTEfKUa.js} +1 -1
- package/assets/devtools/chunk.CMTEfKUa.js.br +0 -0
- package/assets/devtools/chunk.CMTEfKUa.js.gz +0 -0
- package/assets/devtools/{chunk.BQQ5nN1l.js → chunk.CN7ovTep.js} +1 -1
- package/assets/devtools/chunk.CN7ovTep.js.br +0 -0
- package/assets/devtools/chunk.CN7ovTep.js.gz +0 -0
- package/assets/devtools/chunk.CUs8lFwI.js +1 -0
- package/assets/devtools/chunk.CUs8lFwI.js.br +0 -0
- package/assets/devtools/chunk.CUs8lFwI.js.gz +0 -0
- package/assets/devtools/{chunk.CsxSstrk.js → chunk.CUw48lF5.js} +1 -1
- package/assets/devtools/chunk.CUw48lF5.js.br +0 -0
- package/assets/devtools/chunk.CUw48lF5.js.gz +0 -0
- package/assets/devtools/chunk.CdkqxSCz.js +1 -0
- package/assets/devtools/chunk.CdkqxSCz.js.br +0 -0
- package/assets/devtools/chunk.CdkqxSCz.js.gz +0 -0
- package/assets/devtools/{chunk.BCBZ1wAk.js → chunk.CgxElNrD.js} +1 -1
- package/assets/devtools/chunk.CgxElNrD.js.br +2 -0
- package/assets/devtools/chunk.CgxElNrD.js.gz +0 -0
- package/assets/devtools/{chunk.BjOMCPQ3.js → chunk.CoH_IYrv.js} +1 -1
- package/assets/devtools/chunk.CoH_IYrv.js.br +0 -0
- package/assets/devtools/chunk.CoH_IYrv.js.gz +0 -0
- package/assets/devtools/chunk.D0butndH.js +1 -0
- package/assets/devtools/chunk.D0butndH.js.br +0 -0
- package/assets/devtools/chunk.D0butndH.js.gz +0 -0
- package/assets/devtools/{chunk.BZpSlmHc.js → chunk.DGI4-Nej.js} +1 -1
- package/assets/devtools/chunk.DGI4-Nej.js.br +0 -0
- package/assets/devtools/chunk.DGI4-Nej.js.gz +0 -0
- package/assets/devtools/{chunk.BX7p74D8.js → chunk.DOiJ5r3P.js} +1 -1
- package/assets/devtools/chunk.DOiJ5r3P.js.br +0 -0
- package/assets/devtools/chunk.DOiJ5r3P.js.gz +0 -0
- package/assets/devtools/{chunk.D0jFBu2p.js → chunk.DZFiDTv5.js} +1 -1
- package/assets/devtools/chunk.DZFiDTv5.js.br +0 -0
- package/assets/devtools/chunk.DZFiDTv5.js.gz +0 -0
- package/assets/devtools/{chunk.lo8X57tY.js → chunk.Dbm9E6HI.js} +1 -1
- package/assets/devtools/chunk.Dbm9E6HI.js.br +0 -0
- package/assets/devtools/chunk.Dbm9E6HI.js.gz +0 -0
- package/assets/devtools/chunk.DdgmE5g8.js +1 -0
- package/assets/devtools/chunk.DdgmE5g8.js.br +0 -0
- package/assets/devtools/chunk.DdgmE5g8.js.gz +0 -0
- package/assets/devtools/{chunk.albVVSQX.js → chunk.DeN6s4_I.js} +1 -1
- package/assets/devtools/chunk.DeN6s4_I.js.br +0 -0
- package/assets/devtools/chunk.DeN6s4_I.js.gz +0 -0
- package/assets/devtools/{chunk.C3geCUq9.js → chunk.DpW9QoyF.js} +1 -1
- package/assets/devtools/chunk.DpW9QoyF.js.br +0 -0
- package/assets/devtools/chunk.DpW9QoyF.js.gz +0 -0
- package/assets/devtools/chunk.PcVF_qXP.js +1 -0
- package/assets/devtools/chunk.PcVF_qXP.js.br +0 -0
- package/assets/devtools/chunk.PcVF_qXP.js.gz +0 -0
- package/assets/devtools/{chunk.u4exfSZ6.js → chunk.Q6_b9IUt.js} +1 -1
- package/assets/devtools/chunk.Q6_b9IUt.js.br +0 -0
- package/assets/devtools/chunk.Q6_b9IUt.js.gz +0 -0
- package/assets/devtools/chunk.YqHRwxdc.js +2 -0
- package/assets/devtools/chunk.YqHRwxdc.js.br +0 -0
- package/assets/devtools/chunk.YqHRwxdc.js.gz +0 -0
- package/assets/devtools/{chunk.CQO49DQF.js → chunk._D_TfCmJ.js} +1 -1
- package/assets/devtools/chunk._D_TfCmJ.js.br +0 -0
- package/assets/devtools/chunk._D_TfCmJ.js.gz +0 -0
- package/assets/devtools/chunk.l66LreXu.js +1 -0
- package/assets/devtools/chunk.l66LreXu.js.br +0 -0
- package/assets/devtools/chunk.l66LreXu.js.gz +0 -0
- package/assets/devtools/{chunk.ffYG67rk.js → chunk.lvb4PIb4.js} +1 -1
- package/assets/devtools/chunk.lvb4PIb4.js.br +0 -0
- package/assets/devtools/chunk.lvb4PIb4.js.gz +0 -0
- package/assets/devtools/chunk.rvqQkpV6.js +2 -0
- package/assets/devtools/chunk.rvqQkpV6.js.br +0 -0
- package/assets/devtools/chunk.rvqQkpV6.js.gz +0 -0
- package/assets/devtools/{chunk._t5z0lP9.js → chunk.s1U1MhH3.js} +1 -1
- package/assets/devtools/chunk.s1U1MhH3.js.br +0 -0
- package/assets/devtools/chunk.s1U1MhH3.js.gz +0 -0
- package/assets/devtools/{chunk.BqEqrty9.js → chunk.wg5XuK3_.js} +1 -1
- package/assets/devtools/chunk.wg5XuK3_.js.br +0 -0
- package/assets/devtools/chunk.wg5XuK3_.js.gz +0 -0
- package/assets/devtools/db.html +4 -19
- package/assets/devtools/db.html.br +0 -0
- package/assets/devtools/db.html.gz +0 -0
- package/assets/devtools/entry.Cgjh-xX-.js +79 -0
- package/assets/devtools/entry.Cgjh-xX-.js.br +0 -0
- package/assets/devtools/entry.Cgjh-xX-.js.gz +0 -0
- package/assets/devtools/env.html +4 -20
- package/assets/devtools/env.html.br +0 -0
- package/assets/devtools/env.html.gz +0 -0
- package/assets/devtools/graph.html +4 -22
- package/assets/devtools/graph.html.br +0 -0
- package/assets/devtools/graph.html.gz +0 -0
- package/assets/devtools/index.html +4 -16
- package/assets/devtools/index.html.br +0 -0
- package/assets/devtools/index.html.gz +0 -0
- package/assets/devtools/logs.html +4 -23
- package/assets/devtools/logs.html.br +0 -0
- package/assets/devtools/logs.html.gz +0 -0
- package/assets/devtools/queues.html +4 -15
- package/assets/devtools/queues.html.br +0 -0
- package/assets/devtools/queues.html.gz +0 -0
- package/assets/devtools/topics.html +4 -23
- package/assets/devtools/topics.html.br +0 -0
- package/assets/devtools/topics.html.gz +0 -0
- package/dist/index.d.ts +318 -1601
- package/dist/index.js +5 -9
- package/dist/index.js.map +1 -1
- package/package.json +10 -10
- package/src/api/DevToolsProvider.ts +3 -3
- package/src/api/providers/DevToolsDatabaseProvider.ts +1 -1
- package/src/api/providers/DevToolsMetadataProvider.ts +2 -2
- package/src/api/repositories/LogRepository.ts +4 -5
- package/assets/devtools/asset.DbJSgVPr.css +0 -1
- package/assets/devtools/asset.DbJSgVPr.css.br +0 -0
- package/assets/devtools/asset.DbJSgVPr.css.gz +0 -0
- package/assets/devtools/chunk.5EOPWu_h.js.br +0 -0
- package/assets/devtools/chunk.5EOPWu_h.js.gz +0 -0
- package/assets/devtools/chunk.B-FEo0lV.js +0 -1
- package/assets/devtools/chunk.B-FEo0lV.js.br +0 -0
- package/assets/devtools/chunk.B-FEo0lV.js.gz +0 -0
- package/assets/devtools/chunk.BCBZ1wAk.js.br +0 -0
- package/assets/devtools/chunk.BCBZ1wAk.js.gz +0 -0
- package/assets/devtools/chunk.BKZ6YEV4.js.br +0 -0
- package/assets/devtools/chunk.BKZ6YEV4.js.gz +0 -0
- package/assets/devtools/chunk.BQQ5nN1l.js.br +0 -0
- package/assets/devtools/chunk.BQQ5nN1l.js.gz +0 -0
- package/assets/devtools/chunk.BX7p74D8.js.br +0 -0
- package/assets/devtools/chunk.BX7p74D8.js.gz +0 -0
- package/assets/devtools/chunk.BZpSlmHc.js.br +0 -0
- package/assets/devtools/chunk.BZpSlmHc.js.gz +0 -0
- package/assets/devtools/chunk.BgMi2Pqe.js.br +0 -0
- package/assets/devtools/chunk.BgMi2Pqe.js.gz +0 -0
- package/assets/devtools/chunk.BjOMCPQ3.js.br +0 -0
- package/assets/devtools/chunk.BjOMCPQ3.js.gz +0 -0
- package/assets/devtools/chunk.BqEqrty9.js.br +0 -0
- package/assets/devtools/chunk.BqEqrty9.js.gz +0 -0
- package/assets/devtools/chunk.BuGWOypT.js +0 -1
- package/assets/devtools/chunk.BuGWOypT.js.br +0 -0
- package/assets/devtools/chunk.BuGWOypT.js.gz +0 -0
- package/assets/devtools/chunk.C3geCUq9.js.br +0 -0
- package/assets/devtools/chunk.C3geCUq9.js.gz +0 -0
- package/assets/devtools/chunk.CEbDj1NR.js.br +0 -0
- package/assets/devtools/chunk.CEbDj1NR.js.gz +0 -0
- package/assets/devtools/chunk.CIYikik4.js.br +0 -0
- package/assets/devtools/chunk.CIYikik4.js.gz +0 -0
- package/assets/devtools/chunk.CQO49DQF.js.br +0 -0
- package/assets/devtools/chunk.CQO49DQF.js.gz +0 -0
- package/assets/devtools/chunk.CWwJDVEM.js +0 -1
- package/assets/devtools/chunk.CWwJDVEM.js.br +0 -0
- package/assets/devtools/chunk.CWwJDVEM.js.gz +0 -0
- package/assets/devtools/chunk.CZ4J9K5b.js.br +0 -4
- package/assets/devtools/chunk.CZ4J9K5b.js.gz +0 -0
- package/assets/devtools/chunk.CoD2sLa1.js +0 -1
- package/assets/devtools/chunk.CoD2sLa1.js.br +0 -0
- package/assets/devtools/chunk.CoD2sLa1.js.gz +0 -0
- package/assets/devtools/chunk.CsxSstrk.js.br +0 -0
- package/assets/devtools/chunk.CsxSstrk.js.gz +0 -0
- package/assets/devtools/chunk.D0jFBu2p.js.br +0 -0
- package/assets/devtools/chunk.D0jFBu2p.js.gz +0 -0
- package/assets/devtools/chunk.D7ro5_n3.js +0 -1
- package/assets/devtools/chunk.D7ro5_n3.js.br +0 -0
- package/assets/devtools/chunk.D7ro5_n3.js.gz +0 -0
- package/assets/devtools/chunk.W-1mjDd7.js.br +0 -0
- package/assets/devtools/chunk.W-1mjDd7.js.gz +0 -0
- package/assets/devtools/chunk._3YEef80.js +0 -1
- package/assets/devtools/chunk._3YEef80.js.br +0 -0
- package/assets/devtools/chunk._3YEef80.js.gz +0 -0
- package/assets/devtools/chunk._t5z0lP9.js.br +0 -0
- package/assets/devtools/chunk._t5z0lP9.js.gz +0 -0
- package/assets/devtools/chunk.albVVSQX.js.br +0 -0
- package/assets/devtools/chunk.albVVSQX.js.gz +0 -0
- package/assets/devtools/chunk.bPNpu2iW.js +0 -1
- package/assets/devtools/chunk.bPNpu2iW.js.br +0 -0
- package/assets/devtools/chunk.bPNpu2iW.js.gz +0 -0
- package/assets/devtools/chunk.fWijEdcZ.js +0 -2
- package/assets/devtools/chunk.fWijEdcZ.js.br +0 -0
- package/assets/devtools/chunk.fWijEdcZ.js.gz +0 -0
- package/assets/devtools/chunk.ffYG67rk.js.br +0 -0
- package/assets/devtools/chunk.ffYG67rk.js.gz +0 -0
- package/assets/devtools/chunk.lo8X57tY.js.br +0 -0
- package/assets/devtools/chunk.lo8X57tY.js.gz +0 -0
- package/assets/devtools/chunk.rqjDVBSo.js +0 -1
- package/assets/devtools/chunk.rqjDVBSo.js.br +0 -0
- package/assets/devtools/chunk.rqjDVBSo.js.gz +0 -0
- package/assets/devtools/chunk.u4exfSZ6.js.br +0 -0
- package/assets/devtools/chunk.u4exfSZ6.js.gz +0 -0
- package/assets/devtools/chunk.xjh83uy1.js +0 -1
- package/assets/devtools/chunk.xjh83uy1.js.br +0 -0
- package/assets/devtools/chunk.xjh83uy1.js.gz +0 -0
- package/assets/devtools/chunk.yZM2qlCX.js +0 -2
- package/assets/devtools/chunk.yZM2qlCX.js.br +0 -0
- package/assets/devtools/chunk.yZM2qlCX.js.gz +0 -0
- package/assets/devtools/entry.BWhdC3SJ.js +0 -79
- package/assets/devtools/entry.BWhdC3SJ.js.br +0 -0
- package/assets/devtools/entry.BWhdC3SJ.js.gz +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as m,f as j,b as A,o as se,j as i,B as L,t as re,w as ee,v as oe,c as Po,aC as me,b8 as Ro,b9 as Ue,ah as ge,bc as To,q as fe,$ as te,aJ as Ke,e as Ce,ay as $o,U as Vo,a0 as we,b7 as qe,ak as We,al as Ze,aH as Fo,ad as Mo,d as zo,ax as Bo,a2 as Je,x as ye}from"./entry.Cgjh-xX-.js";import{I as Lo,a as Go,b as Ho}from"./chunk.BP23bv4G.js";import{P as he}from"./chunk.C8JxGZtc.js";function Ko(e){const o=m.useRef(void 0);return m.useEffect(()=>{o.current=e},[e]),o.current}function be(e,o=document){const t=o.querySelector(e);if(t)return t;const s=o.querySelectorAll("*");for(let r=0;r<s.length;r+=1){const a=s[r];if(a.shadowRoot){const n=be(e,a.shadowRoot);if(n)return n}}return null}function U(e,o=document){const t=[],s=o.querySelectorAll(e);t.push(...Array.from(s));const r=o.querySelectorAll("*");for(let a=0;a<r.length;a+=1){const n=r[a];if(n.shadowRoot){const l=U(e,n.shadowRoot);t.push(...l)}}return t}function K(e){if(!e)return document;const o=e.getRootNode();return o instanceof ShadowRoot||o instanceof Document?o:document}function Qe(e){return typeof e=="string"?{value:e,label:e}:"value"in e&&!("label"in e)?{value:e.value,label:e.value,disabled:e.disabled}:typeof e=="number"?{value:e.toString(),label:e.toString()}:"group"in e?{group:e.group,items:e.items.map(o=>Qe(o))}:e}function Uo(e){return e?e.map(o=>Qe(o)):[]}function Xe(e){return e.reduce((o,t)=>"group"in t?{...o,...Xe(t.items)}:(o[t.value]=t,o),{})}var R={dropdown:"m_88b62a41",search:"m_985517d8",options:"m_b2821a6e",option:"m_92253aa5",empty:"m_2530cd1d",header:"m_858f94bd",footer:"m_82b967cb",group:"m_254f3e4f",groupLabel:"m_2bb2e9e5",chevron:"m_2943220b",optionsDropdownOption:"m_390b5f4",optionsDropdownCheckIcon:"m_8ee53fc2",optionsDropdownCheckPlaceholder:"m_a530ee0a"};const qo={error:null},Wo=re((e,{size:o,color:t})=>({chevron:{"--combobox-chevron-size":oe(o,"combobox-chevron-size"),"--combobox-chevron-color":t?ee(t,e):void 0}})),ke=j((e,o)=>{const t=A("ComboboxChevron",qo,e),{size:s,error:r,style:a,className:n,classNames:l,styles:c,unstyled:d,vars:p,mod:u,...b}=t,x=se({name:"ComboboxChevron",classes:R,props:t,style:a,className:n,classNames:l,styles:c,unstyled:d,vars:p,varsResolver:Wo,rootSelector:"chevron"});return i.jsx(L,{component:"svg",...b,...x("chevron"),size:s,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",mod:["combobox-chevron",{error:r},u],ref:o,children:i.jsx("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})});ke.classes=R;ke.displayName="@mantine/core/ComboboxChevron";const[Zo,M]=Po("Combobox component was not found in tree"),Ye=m.forwardRef(({size:e,onMouseDown:o,onClick:t,onClear:s,...r},a)=>i.jsx(me.ClearButton,{ref:a,tabIndex:-1,"aria-hidden":!0,...r,onMouseDown:n=>{n.preventDefault(),o?.(n)},onClick:n=>{s(),t?.(n)}}));Ye.displayName="@mantine/core/ComboboxClearButton";const Oe=j((e,o)=>{const{classNames:t,styles:s,className:r,style:a,hidden:n,...l}=A("ComboboxDropdown",null,e),c=M();return i.jsx(he.Dropdown,{...l,ref:o,role:"presentation","data-hidden":n||void 0,...c.getStyles("dropdown",{className:r,style:a,classNames:t,styles:s})})});Oe.classes=R;Oe.displayName="@mantine/core/ComboboxDropdown";const Jo={refProp:"ref"},eo=j((e,o)=>{const{children:t,refProp:s}=A("ComboboxDropdownTarget",Jo,e);if(M(),!Ro(t))throw new Error("Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return i.jsx(he.Target,{ref:o,refProp:s,children:t})});eo.displayName="@mantine/core/ComboboxDropdownTarget";const Se=j((e,o)=>{const{classNames:t,className:s,style:r,styles:a,vars:n,...l}=A("ComboboxEmpty",null,e),c=M();return i.jsx(L,{ref:o,...c.getStyles("empty",{className:s,classNames:t,styles:a,style:r}),...l})});Se.classes=R;Se.displayName="@mantine/core/ComboboxEmpty";function De({onKeyDown:e,withKeyboardNavigation:o,withAriaAttributes:t,withExpandedAttribute:s,targetType:r,autoComplete:a}){const n=M(),[l,c]=m.useState(null),d=u=>{if(e?.(u),!n.readOnly&&o){if(u.nativeEvent.isComposing)return;if(u.nativeEvent.code==="ArrowDown"&&(u.preventDefault(),n.store.dropdownOpened?c(n.store.selectNextOption()):(n.store.openDropdown("keyboard"),c(n.store.selectActiveOption()),n.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),u.nativeEvent.code==="ArrowUp"&&(u.preventDefault(),n.store.dropdownOpened?c(n.store.selectPreviousOption()):(n.store.openDropdown("keyboard"),c(n.store.selectActiveOption()),n.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),u.nativeEvent.code==="Enter"||u.nativeEvent.code==="NumpadEnter"){if(u.nativeEvent.keyCode===229)return;const b=n.store.getSelectedOptionIndex();n.store.dropdownOpened&&b!==-1?(u.preventDefault(),n.store.clickSelectedOption()):r==="button"&&(u.preventDefault(),n.store.openDropdown("keyboard"))}u.key==="Escape"&&n.store.closeDropdown("keyboard"),u.nativeEvent.code==="Space"&&r==="button"&&(u.preventDefault(),n.store.toggleDropdown("keyboard"))}};return{...t?{"aria-haspopup":"listbox","aria-expanded":s?!!(n.store.listId&&n.store.dropdownOpened):void 0,"aria-controls":n.store.dropdownOpened&&n.store.listId?n.store.listId:void 0,"aria-activedescendant":n.store.dropdownOpened&&l||void 0,autoComplete:a,"data-expanded":n.store.dropdownOpened||void 0,"data-mantine-stop-propagation":n.store.dropdownOpened||void 0}:{},onKeyDown:d}}const Qo={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},oo=j((e,o)=>{const{children:t,refProp:s,withKeyboardNavigation:r,withAriaAttributes:a,withExpandedAttribute:n,targetType:l,autoComplete:c,...d}=A("ComboboxEventsTarget",Qo,e),p=Ue(t);if(!p)throw new Error("Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const u=M(),b=De({targetType:l,withAriaAttributes:a,withKeyboardNavigation:r,withExpandedAttribute:n,onKeyDown:p.props.onKeyDown,autoComplete:c});return m.cloneElement(p,{...b,...d,[s]:ge(o,u.store.targetRef,To(p))})});oo.displayName="@mantine/core/ComboboxEventsTarget";const _e=j((e,o)=>{const{classNames:t,className:s,style:r,styles:a,vars:n,...l}=A("ComboboxFooter",null,e),c=M();return i.jsx(L,{ref:o,...c.getStyles("footer",{className:s,classNames:t,style:r,styles:a}),...l,onMouseDown:d=>{d.preventDefault()}})});_e.classes=R;_e.displayName="@mantine/core/ComboboxFooter";const Ne=j((e,o)=>{const{classNames:t,className:s,style:r,styles:a,vars:n,children:l,label:c,id:d,...p}=A("ComboboxGroup",null,e),u=M(),b=fe(d);return i.jsxs(L,{ref:o,role:"group","aria-labelledby":c?b:void 0,...u.getStyles("group",{className:s,classNames:t,style:r,styles:a}),...p,children:[c&&i.jsx("div",{id:b,...u.getStyles("groupLabel",{classNames:t,styles:a}),children:c}),l]})});Ne.classes=R;Ne.displayName="@mantine/core/ComboboxGroup";const Ie=j((e,o)=>{const{classNames:t,className:s,style:r,styles:a,vars:n,...l}=A("ComboboxHeader",null,e),c=M();return i.jsx(L,{ref:o,...c.getStyles("header",{className:s,classNames:t,style:r,styles:a}),...l,onMouseDown:d=>{d.preventDefault()}})});Ie.classes=R;Ie.displayName="@mantine/core/ComboboxHeader";function to({value:e,valuesDivider:o=",",...t}){return i.jsx("input",{type:"hidden",value:Array.isArray(e)?e.join(o):e||"",...t})}to.displayName="@mantine/core/ComboboxHiddenInput";const Ae=j((e,o)=>{const t=A("ComboboxOption",null,e),{classNames:s,className:r,style:a,styles:n,vars:l,onClick:c,id:d,active:p,onMouseDown:u,onMouseOver:b,disabled:x,selected:y,mod:C,...g}=t,k=M(),S=m.useId(),_=d||S;return i.jsx(L,{...k.getStyles("option",{className:r,classNames:s,styles:n,style:a}),...g,ref:o,id:_,mod:["combobox-option",{"combobox-active":p,"combobox-disabled":x,"combobox-selected":y},C],role:"option",onClick:h=>{x?h.preventDefault():(k.onOptionSubmit?.(t.value,t),c?.(h))},onMouseDown:h=>{h.preventDefault(),u?.(h)},onMouseOver:h=>{k.resetSelectionOnOptionHover&&k.store.resetSelectedOption(),b?.(h)}})});Ae.classes=R;Ae.displayName="@mantine/core/ComboboxOption";const Ee=j((e,o)=>{const t=A("ComboboxOptions",null,e),{classNames:s,className:r,style:a,styles:n,id:l,onMouseDown:c,labelledBy:d,...p}=t,u=M(),b=fe(l);return m.useEffect(()=>{u.store.setListId(b)},[b]),i.jsx(L,{ref:o,...u.getStyles("options",{className:r,style:a,classNames:s,styles:n}),...p,id:b,role:"listbox","aria-labelledby":d,onMouseDown:x=>{x.preventDefault(),c?.(x)}})});Ee.classes=R;Ee.displayName="@mantine/core/ComboboxOptions";const Xo={withAriaAttributes:!0,withKeyboardNavigation:!0},je=j((e,o)=>{const t=A("ComboboxSearch",Xo,e),{classNames:s,styles:r,unstyled:a,vars:n,withAriaAttributes:l,onKeyDown:c,withKeyboardNavigation:d,size:p,...u}=t,b=M(),x=b.getStyles("search"),y=De({targetType:"input",withAriaAttributes:l,withKeyboardNavigation:d,withExpandedAttribute:!1,onKeyDown:c,autoComplete:"off"});return i.jsx(me,{ref:ge(o,b.store.searchRef),classNames:[{input:x.className},s],styles:[{input:x.style},r],size:p||b.size,...y,...u,__staticSelector:"Combobox"})});je.classes=R;je.displayName="@mantine/core/ComboboxSearch";const Yo={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},no=j((e,o)=>{const{children:t,refProp:s,withKeyboardNavigation:r,withAriaAttributes:a,withExpandedAttribute:n,targetType:l,autoComplete:c,...d}=A("ComboboxTarget",Yo,e),p=Ue(t);if(!p)throw new Error("Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const u=M(),b=De({targetType:l,withAriaAttributes:a,withKeyboardNavigation:r,withExpandedAttribute:n,onKeyDown:p.props.onKeyDown,autoComplete:c}),x=m.cloneElement(p,{...b,...d});return i.jsx(he.Target,{ref:ge(o,u.store.targetRef),children:x})});no.displayName="@mantine/core/ComboboxTarget";function et(e,o,t){for(let s=e-1;s>=0;s-=1)if(!o[s].hasAttribute("data-combobox-disabled"))return s;if(t){for(let s=o.length-1;s>-1;s-=1)if(!o[s].hasAttribute("data-combobox-disabled"))return s}return e}function ot(e,o,t){for(let s=e+1;s<o.length;s+=1)if(!o[s].hasAttribute("data-combobox-disabled"))return s;if(t){for(let s=0;s<o.length;s+=1)if(!o[s].hasAttribute("data-combobox-disabled"))return s}return e}function tt(e){for(let o=0;o<e.length;o+=1)if(!e[o].hasAttribute("data-combobox-disabled"))return o;return-1}function so({defaultOpened:e,opened:o,onOpenedChange:t,onDropdownClose:s,onDropdownOpen:r,loop:a=!0,scrollBehavior:n="instant"}={}){const[l,c]=te({value:o,defaultValue:e,finalValue:!1,onChange:t}),d=m.useRef(null),p=m.useRef(-1),u=m.useRef(null),b=m.useRef(null),x=m.useRef(-1),y=m.useRef(-1),C=m.useRef(-1),g=m.useCallback((f="unknown")=>{l||(c(!0),r?.(f))},[c,r,l]),k=m.useCallback((f="unknown")=>{l&&(c(!1),s?.(f))},[c,s,l]),S=m.useCallback((f="unknown")=>{l?k(f):g(f)},[k,g,l]),_=m.useCallback(()=>{const f=K(b.current),D=be(`#${d.current} [data-combobox-selected]`,f);D?.removeAttribute("data-combobox-selected"),D?.removeAttribute("aria-selected")},[]),h=m.useCallback(f=>{const D=K(b.current),F=be(`#${d.current}`,D),N=F?U("[data-combobox-option]",F):null;if(!N)return null;const I=f>=N.length?0:f<0?N.length-1:f;return p.current=I,N?.[I]&&!N[I].hasAttribute("data-combobox-disabled")?(_(),N[I].setAttribute("data-combobox-selected","true"),N[I].setAttribute("aria-selected","true"),N[I].scrollIntoView({block:"nearest",behavior:n}),N[I].id):null},[n,_]),O=m.useCallback(()=>{const f=K(b.current),D=be(`#${d.current} [data-combobox-active]`,f);if(D){const N=U(`#${d.current} [data-combobox-option]`,f).findIndex(I=>I===D);return h(N)}return h(0)},[h]),P=m.useCallback(()=>{const f=K(b.current),D=U(`#${d.current} [data-combobox-option]`,f);return h(ot(p.current,D,a))},[h,a]),E=m.useCallback(()=>{const f=K(b.current),D=U(`#${d.current} [data-combobox-option]`,f);return h(et(p.current,D,a))},[h,a]),ce=m.useCallback(()=>{const f=K(b.current),D=U(`#${d.current} [data-combobox-option]`,f);return h(tt(D))},[h]),J=m.useCallback((f="selected",D)=>{C.current=window.setTimeout(()=>{const F=K(b.current),N=U(`#${d.current} [data-combobox-option]`,F),I=N.findIndex(Y=>Y.hasAttribute(`data-combobox-${f}`));p.current=I,D?.scrollIntoView&&N[I]?.scrollIntoView({block:"nearest",behavior:n})},0)},[]),le=m.useCallback(()=>{p.current=-1,_()},[_]),Q=m.useCallback(()=>{const f=K(b.current);U(`#${d.current} [data-combobox-option]`,f)?.[p.current]?.click()},[]),q=m.useCallback(f=>{d.current=f},[]),z=m.useCallback(()=>{x.current=window.setTimeout(()=>u.current?.focus(),0)},[]),H=m.useCallback(()=>{y.current=window.setTimeout(()=>b.current?.focus(),0)},[]),X=m.useCallback(()=>p.current,[]);return m.useEffect(()=>()=>{window.clearTimeout(x.current),window.clearTimeout(y.current),window.clearTimeout(C.current)},[]),{dropdownOpened:l,openDropdown:g,closeDropdown:k,toggleDropdown:S,selectedOptionIndex:p.current,getSelectedOptionIndex:X,selectOption:h,selectFirstOption:ce,selectActiveOption:O,selectNextOption:P,selectPreviousOption:E,resetSelectedOption:le,updateSelectedOptionIndex:J,listId:d.current,setListId:q,clickSelectedOption:Q,searchRef:u,focusSearchInput:z,targetRef:b,focusTarget:H}}const nt={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:"target",transitionProps:{transition:"fade",duration:0},size:"sm"},st=re((e,{size:o,dropdownPadding:t})=>({options:{"--combobox-option-fz":Ke(o),"--combobox-option-padding":oe(o,"combobox-option-padding")},dropdown:{"--combobox-padding":t===void 0?void 0:Ce(t),"--combobox-option-fz":Ke(o),"--combobox-option-padding":oe(o,"combobox-option-padding")}}));function v(e){const o=A("Combobox",nt,e),{classNames:t,styles:s,unstyled:r,children:a,store:n,vars:l,onOptionSubmit:c,onClose:d,size:p,dropdownPadding:u,resetSelectionOnOptionHover:b,__staticSelector:x,readOnly:y,attributes:C,...g}=o,k=so(),S=n||k,_=se({name:x||"Combobox",classes:R,props:o,classNames:t,styles:s,unstyled:r,attributes:C,vars:l,varsResolver:st}),h=()=>{d?.(),S.closeDropdown()};return i.jsx(Zo,{value:{getStyles:_,store:S,onOptionSubmit:c,size:p,resetSelectionOnOptionHover:b,readOnly:y},children:i.jsx(he,{opened:S.dropdownOpened,preventPositionChangeWhenVisible:!1,...g,onChange:O=>!O&&h(),withRoles:!1,unstyled:r,children:a})})}const rt=e=>e;v.extend=rt;v.classes=R;v.displayName="@mantine/core/Combobox";v.Target=no;v.Dropdown=Oe;v.Options=Ee;v.Option=Ae;v.Search=je;v.Empty=Se;v.Chevron=ke;v.Footer=_e;v.Header=Ie;v.EventsTarget=oo;v.DropdownTarget=eo;v.Group=Ne;v.ClearButton=Ye;v.HiddenInput=to;var ro={root:"m_bf2d988c",inner:"m_26062bec",input:"m_26063560",icon:"m_bf295423","input--outline":"m_215c4542"};const ao=m.createContext(null),at=ao.Provider,co=()=>m.useContext(ao),[ct,lt]=$o();var lo={card:"m_26775b0a"};const it={withBorder:!0},dt=re((e,{radius:o})=>({card:{"--card-radius":we(o)}})),Pe=j((e,o)=>{const t=A("CheckboxCard",it,e),{classNames:s,className:r,style:a,styles:n,unstyled:l,vars:c,checked:d,mod:p,withBorder:u,value:b,onClick:x,defaultChecked:y,onChange:C,attributes:g,...k}=t,S=se({name:"CheckboxCard",classes:lo,props:t,className:r,style:a,classNames:s,styles:n,unstyled:l,attributes:g,vars:c,varsResolver:dt,rootSelector:"card"}),_=co(),h=typeof d=="boolean"?d:_?_.value.includes(b||""):void 0,[O,P]=te({value:h,defaultValue:y,finalValue:!1,onChange:C});return i.jsx(ct,{value:{checked:O},children:i.jsx(Vo,{ref:o,mod:[{"with-border":u,checked:O},p],...S("card"),...k,role:"checkbox","aria-checked":O,onClick:E=>{x?.(E),_?.onChange(b||""),P(!O)}})})});Pe.displayName="@mantine/core/CheckboxCard";Pe.classes=lo;const Re=j((e,o)=>{const{value:t,defaultValue:s,onChange:r,size:a,wrapperProps:n,children:l,readOnly:c,disabled:d,...p}=A("CheckboxGroup",null,e),[u,b]=te({value:t,defaultValue:s,finalValue:[],onChange:r}),x=y=>{const C=typeof y=="string"?y:y.currentTarget.value;!c&&b(u.includes(C)?u.filter(g=>g!==C):[...u,C])};return i.jsx(at,{value:{value:u,onChange:x,size:a,disabled:d},children:i.jsx(me.Wrapper,{size:a,ref:o,...n,...p,labelElement:"div",__staticSelector:"CheckboxGroup",children:i.jsx(Lo,{role:"group",children:l})})})});Re.classes=me.Wrapper.classes;Re.displayName="@mantine/core/CheckboxGroup";function io({size:e,style:o,...t}){const s=e!==void 0?{width:Ce(e),height:Ce(e),...o}:o;return i.jsx("svg",{viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:s,"aria-hidden":!0,...t,children:i.jsx("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function uo({indeterminate:e,...o}){return e?i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6","aria-hidden":!0,...o,children:i.jsx("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})}):i.jsx(io,{...o})}var po={indicator:"m_5e5256ee",icon:"m_1b1c543a","indicator--outline":"m_76e20374"};const ut={icon:uo,variant:"filled"},pt=re((e,{radius:o,color:t,size:s,iconColor:r,variant:a,autoContrast:n})=>{const l=qe({color:t||e.primaryColor,theme:e}),c=l.isThemeColor&&l.shade===void 0?`var(--mantine-color-${l.color}-outline)`:l.color;return{indicator:{"--checkbox-size":oe(s,"checkbox-size"),"--checkbox-radius":o===void 0?void 0:we(o),"--checkbox-color":a==="outline"?c:ee(t,e),"--checkbox-icon-color":r?ee(r,e):We(n,e)?Ze({color:t,theme:e,autoContrast:n}):void 0}}}),Te=j((e,o)=>{const t=A("CheckboxIndicator",ut,e),{classNames:s,className:r,style:a,styles:n,unstyled:l,vars:c,icon:d,indeterminate:p,radius:u,color:b,iconColor:x,autoContrast:y,checked:C,mod:g,variant:k,disabled:S,attributes:_,...h}=t,O=se({name:"CheckboxIndicator",classes:po,props:t,className:r,style:a,classNames:s,styles:n,unstyled:l,attributes:_,vars:c,varsResolver:pt,rootSelector:"indicator"}),P=lt(),E=typeof C=="boolean"||typeof p=="boolean"?C||p:P?.checked||!1;return i.jsx(L,{ref:o,...O("indicator",{variant:k}),variant:k,mod:[{checked:E,disabled:S},g],...h,children:i.jsx(d,{indeterminate:p,...O("icon")})})});Te.displayName="@mantine/core/CheckboxIndicator";Te.classes=po;const bt={labelPosition:"right",icon:uo,variant:"filled"},mt=re((e,{radius:o,color:t,size:s,iconColor:r,variant:a,autoContrast:n})=>{const l=qe({color:t||e.primaryColor,theme:e}),c=l.isThemeColor&&l.shade===void 0?`var(--mantine-color-${l.color}-outline)`:l.color;return{root:{"--checkbox-size":oe(s,"checkbox-size"),"--checkbox-radius":o===void 0?void 0:we(o),"--checkbox-color":a==="outline"?c:ee(t,e),"--checkbox-icon-color":r?ee(r,e):We(n,e)?Ze({color:t,theme:e,autoContrast:n}):void 0}}}),ae=j((e,o)=>{const t=A("Checkbox",bt,e),{classNames:s,className:r,style:a,styles:n,unstyled:l,vars:c,color:d,label:p,id:u,size:b,radius:x,wrapperProps:y,checked:C,labelPosition:g,description:k,error:S,disabled:_,variant:h,indeterminate:O,icon:P,rootRef:E,iconColor:ce,onChange:J,autoContrast:le,mod:Q,attributes:q,...z}=t,H=co(),X=b||H?.size,f=se({name:"Checkbox",props:t,classes:ro,className:r,style:a,classNames:s,styles:n,unstyled:l,attributes:q,vars:c,varsResolver:mt}),{styleProps:D,rest:F}=Fo(z),N=fe(u),I={checked:H?.value.includes(F.value)??C,onChange:ie=>{H?.onChange(ie),J?.(ie)},disabled:H?.disabled??_},Y=m.useRef(null),B=o||Y;return m.useEffect(()=>{B&&"current"in B&&B.current&&(B.current.indeterminate=O||!1,O?B.current.setAttribute("data-indeterminate","true"):B.current.removeAttribute("data-indeterminate"))},[O,B]),i.jsx(Go,{...f("root"),__staticSelector:"Checkbox",__stylesApiProps:t,id:N,size:X,labelPosition:g,label:p,description:k,error:S,disabled:I.disabled,classNames:s,styles:n,unstyled:l,"data-checked":I.checked||C||void 0,variant:h,ref:E,mod:Q,...D,...y,children:i.jsxs(L,{...f("inner"),mod:{"data-label-position":g},children:[i.jsx(L,{component:"input",id:N,ref:B,mod:{error:!!S},...f("input",{focusable:!0,variant:h}),...F,...I,type:"checkbox"}),i.jsx(P,{indeterminate:O,...f("icon")})]})})});ae.classes={...ro,...Ho};ae.displayName="@mantine/core/Checkbox";ae.Group=Re;ae.Indicator=Te;ae.Card=Pe;function ne(e){return"group"in e}function bo({options:e,search:o,limit:t}){const s=o.trim().toLowerCase(),r=[];for(let a=0;a<e.length;a+=1){const n=e[a];if(r.length===t)return r;ne(n)&&r.push({group:n.group,items:bo({options:n.items,search:o,limit:t-r.length})}),ne(n)||n.label.toLowerCase().includes(s)&&r.push(n)}return r}function ft(e){if(e.length===0)return!0;for(const o of e)if(!("group"in o)||o.items.length>0)return!1;return!0}function mo(e,o=new Set){if(Array.isArray(e))for(const t of e)if(ne(t))mo(t.items,o);else{if(typeof t.value>"u")throw new Error("[@mantine/core] Each option must have value property");if(typeof t.value!="string")throw new Error(`[@mantine/core] Option value must be a string, other data formats are not supported, got ${typeof t.value}`);if(o.has(t.value))throw new Error(`[@mantine/core] Duplicate options are not supported. Option with value "${t.value}" was provided more than once`);o.add(t.value)}}function ht(e,o){return Array.isArray(e)?e.includes(o):e===o}function fo({data:e,withCheckIcon:o,withAlignedLabels:t,value:s,checkIconPosition:r,unstyled:a,renderOption:n}){if(!ne(e)){const c=ht(s,e.value),d=o&&(c?i.jsx(io,{className:R.optionsDropdownCheckIcon}):t?i.jsx("div",{className:R.optionsDropdownCheckPlaceholder}):null),p=i.jsxs(i.Fragment,{children:[r==="left"&&d,i.jsx("span",{children:e.label}),r==="right"&&d]});return i.jsx(v.Option,{value:e.value,disabled:e.disabled,className:zo({[R.optionsDropdownOption]:!a}),"data-reverse":r==="right"||void 0,"data-checked":c||void 0,"aria-selected":c,active:c,children:typeof n=="function"?n({option:e,checked:c}):p})}const l=e.items.map(c=>i.jsx(fo,{data:c,value:s,unstyled:a,withCheckIcon:o,withAlignedLabels:t,checkIconPosition:r,renderOption:n},c.value));return i.jsx(v.Group,{label:e.group,children:l})}function xt({data:e,hidden:o,hiddenWhenEmpty:t,filter:s,search:r,limit:a,maxDropdownHeight:n,withScrollArea:l=!0,filterOptions:c=!0,withCheckIcon:d=!1,withAlignedLabels:p=!1,value:u,checkIconPosition:b,nothingFoundMessage:x,unstyled:y,labelId:C,renderOption:g,scrollAreaProps:k,"aria-label":S}){mo(e);const h=typeof r=="string"?(s||bo)({options:e,search:c?r:"",limit:a??1/0}):e,O=ft(h),P=h.map(E=>i.jsx(fo,{data:E,withCheckIcon:d,withAlignedLabels:p,value:u,checkIconPosition:b,unstyled:y,renderOption:g},ne(E)?E.group:E.value));return i.jsx(v.Dropdown,{hidden:o||t&&O,"data-composed":!0,children:i.jsxs(v.Options,{labelledBy:C,"aria-label":S,children:[l?i.jsx(Mo.Autosize,{mah:n??220,type:"scroll",scrollbarSize:"var(--combobox-padding)",offsetScrollbars:"y",...k,children:P}):P,O&&x&&i.jsx(v.Empty,{children:x})]})})}const vt={withCheckIcon:!0,allowDeselect:!0,checkIconPosition:"left",openOnFocus:!0},ho=j((e,o)=>{const t=A("Select",vt,e),{classNames:s,styles:r,unstyled:a,vars:n,dropdownOpened:l,defaultDropdownOpened:c,onDropdownClose:d,onDropdownOpen:p,onFocus:u,onBlur:b,onClick:x,onChange:y,data:C,value:g,defaultValue:k,selectFirstOptionOnChange:S,selectFirstOptionOnDropdownOpen:_,onOptionSubmit:h,comboboxProps:O,readOnly:P,disabled:E,filter:ce,limit:J,withScrollArea:le,maxDropdownHeight:Q,size:q,searchable:z,rightSection:H,checkIconPosition:X,withCheckIcon:f,withAlignedLabels:D,nothingFoundMessage:F,name:N,form:I,searchValue:Y,defaultSearchValue:B,onSearchChange:ie,allowDeselect:xo,error:$e,rightSectionPointerEvents:vo,id:Co,clearable:go,clearButtonProps:wo,hiddenInputProps:yo,renderOption:ko,onClear:Oo,autoComplete:So,scrollAreaProps:Do,__defaultRightSection:yt,__clearSection:kt,__clearable:Ot,chevronColor:_o,autoSelectOnBlur:Ve,openOnFocus:No,attributes:Fe,...de}=t,xe=m.useMemo(()=>Uo(C),[C]),ue=m.useRef({}),V=m.useMemo(()=>Xe(xe),[xe]),Me=fe(Co),[w,ze,Be]=te({value:g,defaultValue:k,finalValue:null,onChange:y}),G=typeof w=="string"?w in V?V[w]:ue.current[w]:void 0,Le=Ko(G),[pe,Io,Ao]=te({value:Y,defaultValue:B,finalValue:G?G.label:"",onChange:ie}),T=so({opened:l,defaultOpened:c,onDropdownOpen:()=>{p?.(),_?T.selectFirstOption():T.updateSelectedOptionIndex("active",{scrollIntoView:!0})},onDropdownClose:()=>{d?.(),setTimeout(T.resetSelectedOption,0)}}),W=$=>{Io($),T.resetSelectedOption()},{resolvedClassNames:Ge,resolvedStyles:He}=Bo({props:t,styles:r,classNames:s});m.useEffect(()=>{S&&T.selectFirstOption()},[S,pe]),m.useEffect(()=>{g===null&&W(""),typeof g=="string"&&G&&(Le?.value!==G.value||Le?.label!==G.label)&&W(G.label)},[g,G]),m.useEffect(()=>{!Be&&!Ao&&W(typeof w=="string"?w in V?V[w]?.label:ue.current[w]?.label||"":"")},[V,w]),m.useEffect(()=>{w&&w in V&&(ue.current[w]=V[w])},[V,w]);const Eo=i.jsx(v.ClearButton,{...wo,onClear:()=>{ze(null,null),W(""),Oo?.()}}),jo=go&&!!w&&!E&&!P;return i.jsxs(i.Fragment,{children:[i.jsxs(v,{store:T,__staticSelector:"Select",classNames:Ge,styles:He,unstyled:a,readOnly:P,size:q,attributes:Fe,keepMounted:Ve,onOptionSubmit:$=>{h?.($);const Z=xo&&V[$].value===w?null:V[$],ve=Z?Z.value:null;ve!==w&&ze(ve,Z),!Be&&W(typeof ve=="string"&&Z?.label||""),T.closeDropdown()},...O,children:[i.jsx(v.Target,{targetType:z?"input":"button",autoComplete:So,children:i.jsx(Je,{id:Me,ref:o,__defaultRightSection:i.jsx(v.Chevron,{size:q,error:$e,unstyled:a,color:_o}),__clearSection:Eo,__clearable:jo,rightSection:H,rightSectionPointerEvents:vo||"none",...de,size:q,__staticSelector:"Select",disabled:E,readOnly:P||!z,value:pe,onChange:$=>{W($.currentTarget.value),T.openDropdown(),S&&T.selectFirstOption()},onFocus:$=>{No&&z&&T.openDropdown(),u?.($)},onBlur:$=>{Ve&&T.clickSelectedOption(),z&&T.closeDropdown();const Z=typeof w=="string"&&(w in V?V[w]:ue.current[w]);W(Z&&Z.label||""),b?.($)},onClick:$=>{z?T.openDropdown():T.toggleDropdown(),x?.($)},classNames:Ge,styles:He,unstyled:a,pointer:!z,error:$e,attributes:Fe})}),i.jsx(xt,{data:xe,hidden:P||E,filter:ce,search:pe,limit:J,hiddenWhenEmpty:!F,withScrollArea:le,maxDropdownHeight:Q,filterOptions:!!z&&G?.label!==pe,value:w,checkIconPosition:X,withCheckIcon:f,withAlignedLabels:D,nothingFoundMessage:F,unstyled:a,labelId:de.label?`${Me}-label`:void 0,"aria-label":de.label?void 0:de["aria-label"],renderOption:ko,scrollAreaProps:Do})]}),i.jsx(v.HiddenInput,{value:w,name:N,form:I,disabled:E,...yo})]})});ho.classes={...Je.classes,...v.classes};ho.displayName="@mantine/core/Select";const Ct=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M18 13l-6 6",key:"svg-1"}],["path",{d:"M6 13l6 6",key:"svg-2"}]],Nt=ye("outline","arrow-down","ArrowDown",Ct);const gt=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M18 11l-6 -6",key:"svg-1"}],["path",{d:"M6 11l6 -6",key:"svg-2"}]],It=ye("outline","arrow-up","ArrowUp",gt);const wt=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]],At=ye("outline","plus","Plus",wt);export{ae as C,Nt as I,xt as O,ho as S,It as a,At as b,Xe as c,v as d,io as e,Uo as g,ne as i,so as u};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{x as a}from"./entry.Cgjh-xX-.js";const o=[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]],e=a("outline","lock","Lock",o);export{e as I};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i}from"./entry.
|
|
1
|
+
import{r as i}from"./entry.Cgjh-xX-.js";const f=["mousedown","touchstart"];function g(e,a,s){const r=i.useRef(null),n=a||f;return i.useEffect(()=>{const u=t=>{const{target:o}=t??{};if(Array.isArray(s)){const d=!document.body.contains(o)&&o?.tagName!=="HTML";s.every(c=>!!c&&!t.composedPath().includes(c))&&!d&&e(t)}else r.current&&!r.current.contains(o)&&e(t)};return n.forEach(t=>document.addEventListener(t,u)),()=>{n.forEach(t=>document.removeEventListener(t,u))}},[r,e,s]),r}export{g as u};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{x as e}from"./entry.Cgjh-xX-.js";const a=[["path",{d:"M3 7a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3",key:"svg-0"}],["path",{d:"M3 15a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3l0 -2",key:"svg-1"}],["path",{d:"M7 8l0 .01",key:"svg-2"}],["path",{d:"M7 16l0 .01",key:"svg-3"}]],o=e("outline","server","Server",a);export{o as I};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{x as t,j as e,F as l,T as s,Z as o}from"./entry.Cgjh-xX-.js";import{A as a}from"./chunk.9K7EO5hq.js";const n=[["path",{d:"M3 21h4l13 -13a1.5 1.5 0 0 0 -4 -4l-13 13v4",key:"svg-0"}],["path",{d:"M14.5 5.5l4 4",key:"svg-1"}],["path",{d:"M12 8l-5 -5l-4 4l5 5",key:"svg-2"}],["path",{d:"M7 8l-1.5 1.5",key:"svg-3"}],["path",{d:"M16 12l5 5l-4 4l-5 -5",key:"svg-4"}],["path",{d:"M16 17l-1.5 1.5",key:"svg-5"}]],r=t("outline","tools","Tools",n),d=()=>e.jsxs(l,{direction:"column",align:"center",justify:"center",flex:1,w:"100%",gap:"xl",children:[e.jsx(l,{direction:"column",align:"center",gap:4,mb:"md",children:e.jsxs(l,{align:"center",gap:"sm",children:[e.jsx(r,{size:40,stroke:1.5,opacity:.8}),e.jsx(s,{size:"2rem",fw:300,style:{letterSpacing:"-0.02em"},children:"Alepha DevTools"})]})}),e.jsx(a,{icon:e.jsx(o,{}),title:"Work In Progress",color:"blue",variant:"light",maw:500,children:"DevTools is still in active development. New features and improvements are being added regularly. Use the navigation to explore available tools."})]});export{d as DevDashboard,d as default};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as Ae,r as m,M as Ce,a as Ie,c as ze,f as w,b as x,j as a,B as j,d as D,R as W,e as f,k as N,g as Se,h as re,i as Pe,l as Be,I as Re,p as _e,m as Te,n as Ve,o as O,q as Ee,s as Fe,t as q,U as Le,v as le,w as He,x as A,y as E,F as u,z as $e,A as ye,T as K,C as F,D as S,E as ie,G as De,H as We,J as V,N as Oe,K as qe,L as Ke,O as Xe,P as Qe,Q as Ye,S as Ge,V as Ue,W as Je,X as Ze,Y as Me}from"./entry.Cgjh-xX-.js";import{g as ce,a as oe,A as C,u as et}from"./chunk.DpW9QoyF.js";import{n as tt}from"./chunk.BjFrJKj1.js";import{S as st}from"./chunk.DeN6s4_I.js";import{D as rt}from"./chunk.C8JxGZtc.js";import"./chunk.CN7ovTep.js";import"./chunk.BlqFPyLh.js";import"./chunk.CgxElNrD.js";import"./chunk.uyVen0u2.js";import"./chunk.DOiJ5r3P.js";function pe(e,t){return Ae("(prefers-color-scheme: dark)",e==="dark",t)?"dark":"light"}function ae(e){const t=document.createElement("style");return t.setAttribute("data-mantine-styles","inline"),t.innerHTML="*, *::before, *::after {transition: none !important;}",t.setAttribute("data-mantine-disable-transition","true"),e&&t.setAttribute("nonce",e),document.head.appendChild(t),()=>document.querySelectorAll("[data-mantine-disable-transition]").forEach(r=>r.remove())}function he({keepTransitions:e}={}){const t=m.useRef(tt),o=m.useRef(-1),r=m.useContext(Ce),c=Ie(),p=m.useRef(c?.());if(!r)throw new Error("[@mantine/core] MantineProvider was not found in tree");const n=b=>{r.setColorScheme(b),t.current=e?()=>{}:ae(p.current),window.clearTimeout(o.current),o.current=window.setTimeout(()=>{t.current?.()},10)},l=()=>{r.clearColorScheme(),t.current=e?()=>{}:ae(p.current),window.clearTimeout(o.current),o.current=window.setTimeout(()=>{t.current?.()},10)},i=pe("light",{getInitialValueInEffect:!1}),s=r.colorScheme==="auto"?i:r.colorScheme,h=m.useCallback(()=>n(s==="light"?"dark":"light"),[n,s]);return m.useEffect(()=>()=>{t.current?.(),window.clearTimeout(o.current)},[]),{colorScheme:r.colorScheme,setColorScheme:n,clearColorScheme:l,toggleColorScheme:h}}function ot(e,t={getInitialValueInEffect:!0}){const o=pe(e,t),{colorScheme:r}=he();return r==="auto"?o:r}const[at,I]=ze("AppShell was not found in tree");var k={root:"m_89ab340",navbar:"m_45252eee",aside:"m_9cdde9a",header:"m_3b16f56b",main:"m_8983817",footer:"m_3840c879",section:"m_6dcfc7c7"};const X=w((e,t)=>{const{classNames:o,className:r,style:c,styles:p,unstyled:n,vars:l,withBorder:i,zIndex:s,mod:h,...b}=x("AppShellAside",null,e),d=I();return d.disabled?null:a.jsx(j,{component:"aside",ref:t,mod:[{"with-border":i??d.withBorder},h],...d.getStyles("aside",{className:D({[W.classNames.zeroRight]:d.offsetScrollbars},r),classNames:o,styles:p,style:c}),...b,__vars:{"--app-shell-aside-z-index":`calc(${s??d.zIndex} + 1)`}})});X.classes=k;X.displayName="@mantine/core/AppShellAside";const Q=w((e,t)=>{const{classNames:o,className:r,style:c,styles:p,unstyled:n,vars:l,withBorder:i,zIndex:s,mod:h,...b}=x("AppShellFooter",null,e),d=I();return d.disabled?null:a.jsx(j,{component:"footer",ref:t,mod:[{"with-border":i??d.withBorder},h],...d.getStyles("footer",{className:D({[W.classNames.zeroRight]:d.offsetScrollbars},r),classNames:o,styles:p,style:c}),...b,__vars:{"--app-shell-footer-z-index":(s??d.zIndex)?.toString()}})});Q.classes=k;Q.displayName="@mantine/core/AppShellFooter";const Y=w((e,t)=>{const{classNames:o,className:r,style:c,styles:p,unstyled:n,vars:l,withBorder:i,zIndex:s,mod:h,...b}=x("AppShellHeader",null,e),d=I();return d.disabled?null:a.jsx(j,{component:"header",ref:t,mod:[{"with-border":i??d.withBorder},h],...d.getStyles("header",{className:D({[W.classNames.zeroRight]:d.offsetScrollbars},r),classNames:o,styles:p,style:c}),...b,__vars:{"--app-shell-header-z-index":(s??d.zIndex)?.toString()}})});Y.classes=k;Y.displayName="@mantine/core/AppShellHeader";const G=w((e,t)=>{const{classNames:o,className:r,style:c,styles:p,vars:n,...l}=x("AppShellMain",null,e),i=I();return a.jsx(j,{component:"main",ref:t,...i.getStyles("main",{className:r,style:c,classNames:o,styles:p}),...l})});G.classes=k;G.displayName="@mantine/core/AppShellMain";function P(e){return typeof e=="object"?e.base:e}function B(e){const t=typeof e=="object"&&e!==null&&typeof e.base<"u"&&Object.keys(e).length===1;return typeof e=="number"||typeof e=="string"||t}function R(e){return!(typeof e!="object"||e===null||Object.keys(e).length===1&&"base"in e)}function nt({baseStyles:e,minMediaStyles:t,maxMediaStyles:o,aside:r,theme:c,mode:p}){const n=r?.width,l="translateX(var(--app-shell-aside-width))",i="translateX(calc(var(--app-shell-aside-width) * -1))";if(r?.breakpoint&&!r?.collapsed?.mobile&&(o[r?.breakpoint]=o[r?.breakpoint]||{},p==="fixed"?(o[r?.breakpoint]["--app-shell-aside-width"]="100%",o[r?.breakpoint]["--app-shell-aside-offset"]="0px"):(o[r?.breakpoint]["--app-shell-aside-width"]="0px",o[r?.breakpoint]["--app-shell-aside-offset"]="0px")),B(n)){const s=f(P(n));e["--app-shell-aside-width"]=s,e["--app-shell-aside-offset"]=s}if(R(n)&&(typeof n.base<"u"&&(e["--app-shell-aside-width"]=f(n.base),e["--app-shell-aside-offset"]=f(n.base)),N(n).forEach(s=>{s!=="base"&&(t[s]=t[s]||{},t[s]["--app-shell-aside-width"]=f(n[s]),t[s]["--app-shell-aside-offset"]=f(n[s]))})),r?.breakpoint&&p==="static"&&(t[r.breakpoint]=t[r.breakpoint]||{},t[r.breakpoint]["--app-shell-aside-position"]="sticky",t[r.breakpoint]["--app-shell-aside-grid-row"]="2",t[r.breakpoint]["--app-shell-aside-grid-column"]="3",t[r.breakpoint]["--app-shell-main-column-end"]="3"),r?.collapsed?.desktop){const s=r.breakpoint;t[s]=t[s]||{},t[s]["--app-shell-aside-transform"]=l,t[s]["--app-shell-aside-transform-rtl"]=i,p==="fixed"?t[s]["--app-shell-aside-offset"]="0px !important":(t[s]["--app-shell-aside-width"]="0px",t[s]["--app-shell-aside-display"]="none",t[s]["--app-shell-main-column-end"]="-1"),t[s]["--app-shell-aside-scroll-locked-visibility"]="hidden"}if(r?.collapsed?.mobile){const s=ce(r.breakpoint,c.breakpoints)-.1;o[s]=o[s]||{},p==="fixed"?(o[s]["--app-shell-aside-width"]="100%",o[s]["--app-shell-aside-offset"]="0px"):o[s]["--app-shell-aside-width"]="0px",o[s]["--app-shell-aside-transform"]=l,o[s]["--app-shell-aside-transform-rtl"]=i,o[s]["--app-shell-aside-scroll-locked-visibility"]="hidden"}}function lt({baseStyles:e,minMediaStyles:t,footer:o,mode:r}){const c=o?.height,p="translateY(var(--app-shell-footer-height))",n=r==="static"?!0:o?.offset??!0;if(r==="static"&&o&&(e["--app-shell-footer-position"]="sticky",e["--app-shell-footer-grid-column"]="1 / -1",e["--app-shell-footer-grid-row"]="3"),B(c)){const l=f(P(c));e["--app-shell-footer-height"]=l,n&&(e["--app-shell-footer-offset"]=l)}R(c)&&(typeof c.base<"u"&&(e["--app-shell-footer-height"]=f(c.base),n&&(e["--app-shell-footer-offset"]=f(c.base))),N(c).forEach(l=>{l!=="base"&&(t[l]=t[l]||{},t[l]["--app-shell-footer-height"]=f(c[l]),n&&(t[l]["--app-shell-footer-offset"]=f(c[l])))})),o?.collapsed&&(e["--app-shell-footer-transform"]=p,r==="fixed"&&(e["--app-shell-footer-offset"]="0px !important"))}function it({baseStyles:e,minMediaStyles:t,header:o,mode:r}){const c=o?.height,p="translateY(calc(var(--app-shell-header-height) * -1))",n=r==="static"?!0:o?.offset??!0;if(r==="static"&&o&&(e["--app-shell-header-position"]="sticky",e["--app-shell-header-grid-column"]="1 / -1",e["--app-shell-header-grid-row"]="1"),B(c)){const l=f(P(c));e["--app-shell-header-height"]=l,n&&(e["--app-shell-header-offset"]=l)}R(c)&&(typeof c.base<"u"&&(e["--app-shell-header-height"]=f(c.base),n&&(e["--app-shell-header-offset"]=f(c.base))),N(c).forEach(l=>{l!=="base"&&(t[l]=t[l]||{},t[l]["--app-shell-header-height"]=f(c[l]),n&&(t[l]["--app-shell-header-offset"]=f(c[l])))})),o?.collapsed&&(e["--app-shell-header-transform"]=p,r==="fixed"&&(e["--app-shell-header-offset"]="0px !important"))}function ct({baseStyles:e,minMediaStyles:t,maxMediaStyles:o,navbar:r,theme:c,mode:p}){const n=r?.width,l="translateX(calc(var(--app-shell-navbar-width) * -1))",i="translateX(var(--app-shell-navbar-width))";if(r?.breakpoint&&!r?.collapsed?.mobile&&(o[r?.breakpoint]=o[r?.breakpoint]||{},o[r?.breakpoint]["--app-shell-navbar-offset"]="0px",o[r?.breakpoint]["--app-shell-navbar-width"]="100%",p==="static"&&(o[r?.breakpoint]["--app-shell-navbar-grid-width"]="0px")),B(n)){const s=f(P(n));e["--app-shell-navbar-width"]=s,e["--app-shell-navbar-offset"]=s,p==="static"&&(e["--app-shell-navbar-grid-width"]=s)}if(R(n)&&(typeof n.base<"u"&&(e["--app-shell-navbar-width"]=f(n.base),e["--app-shell-navbar-offset"]=f(n.base),p==="static"&&(e["--app-shell-navbar-grid-width"]=f(n.base))),N(n).forEach(s=>{s!=="base"&&(t[s]=t[s]||{},t[s]["--app-shell-navbar-width"]=f(n[s]),t[s]["--app-shell-navbar-offset"]=f(n[s]),p==="static"&&(t[s]["--app-shell-navbar-grid-width"]=f(n[s])))})),r?.breakpoint&&p==="static"&&(t[r.breakpoint]=t[r.breakpoint]||{},t[r.breakpoint]["--app-shell-navbar-position"]="sticky",t[r.breakpoint]["--app-shell-navbar-grid-row"]="2",t[r.breakpoint]["--app-shell-navbar-grid-column"]="1",t[r.breakpoint]["--app-shell-main-column-start"]="2"),r?.collapsed?.desktop){const s=r.breakpoint;t[s]=t[s]||{},t[s]["--app-shell-navbar-transform"]=l,t[s]["--app-shell-navbar-transform-rtl"]=i,p==="fixed"?t[s]["--app-shell-navbar-offset"]="0px !important":(t[s]["--app-shell-navbar-width"]="0px",t[s]["--app-shell-navbar-display"]="none",t[s]["--app-shell-main-column-start"]="1")}if(r?.collapsed?.mobile){const s=ce(r.breakpoint,c.breakpoints)-.1;o[s]=o[s]||{},o[s]["--app-shell-navbar-width"]="100%",o[s]["--app-shell-navbar-offset"]="0px",p==="static"&&(o[s]["--app-shell-navbar-grid-width"]="0px"),o[s]["--app-shell-navbar-transform"]=l,o[s]["--app-shell-navbar-transform-rtl"]=i}}function $(e){return Number(e)===0?"0px":Se(e)}function pt({padding:e,baseStyles:t,minMediaStyles:o}){B(e)&&(t["--app-shell-padding"]=$(P(e))),R(e)&&(e.base&&(t["--app-shell-padding"]=$(e.base)),N(e).forEach(r=>{r!=="base"&&(o[r]=o[r]||{},o[r]["--app-shell-padding"]=$(e[r]))}))}function ht({navbar:e,header:t,footer:o,aside:r,padding:c,theme:p,mode:n}){const l={},i={},s={};n==="static"&&(s["--app-shell-main-grid-column"]="1 / -1",s["--app-shell-main-grid-row"]="2"),ct({baseStyles:s,minMediaStyles:l,maxMediaStyles:i,navbar:e,theme:p,mode:n}),nt({baseStyles:s,minMediaStyles:l,maxMediaStyles:i,aside:r,theme:p,mode:n}),it({baseStyles:s,minMediaStyles:l,header:t,mode:n}),lt({baseStyles:s,minMediaStyles:l,footer:o,mode:n}),pt({baseStyles:s,minMediaStyles:l,padding:c});const h=oe(N(l),p.breakpoints).map(v=>({query:`(min-width: ${re(v.px)})`,styles:l[v.value]})),b=oe(N(i),p.breakpoints).map(v=>({query:`(max-width: ${re(v.px)})`,styles:i[v.value]})),d=[...h,...b];return{baseStyles:s,media:d}}function dt({navbar:e,header:t,aside:o,footer:r,padding:c,mode:p,selector:n}){const l=Pe(),i=Be(),{media:s,baseStyles:h}=ht({navbar:e,header:t,footer:r,aside:o,padding:c,theme:l,mode:p});return a.jsx(Re,{media:s,styles:h,selector:n||i.cssVariablesSelector})}const U=w((e,t)=>{const{classNames:o,className:r,style:c,styles:p,unstyled:n,vars:l,withBorder:i,zIndex:s,mod:h,...b}=x("AppShellNavbar",null,e),d=I();return d.disabled?null:a.jsx(j,{component:"nav",ref:t,mod:[{"with-border":i??d.withBorder},h],...d.getStyles("navbar",{className:r,classNames:o,styles:p,style:c}),...b,__vars:{"--app-shell-navbar-z-index":`calc(${s??d.zIndex} + 1)`}})});U.classes=k;U.displayName="@mantine/core/AppShellNavbar";const J=_e((e,t)=>{const{classNames:o,className:r,style:c,styles:p,vars:n,grow:l,mod:i,...s}=x("AppShellSection",null,e),h=I();return a.jsx(j,{ref:t,mod:[{grow:l},i],...h.getStyles("section",{className:r,style:c,classNames:o,styles:p}),...s})});J.classes=k;J.displayName="@mantine/core/AppShellSection";function ut({transitionDuration:e,disabled:t}){const[o,r]=m.useState(!0),c=m.useRef(-1),p=m.useRef(-1);return Te("resize",()=>{r(!0),clearTimeout(c.current),c.current=window.setTimeout(()=>m.startTransition(()=>{r(!1)}),200)}),Ve(()=>{r(!0),clearTimeout(p.current),p.current=window.setTimeout(()=>m.startTransition(()=>{r(!1)}),e||0)},[t,e]),o}const ft={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:"ease",zIndex:Fe("app"),mode:"fixed"},mt=q((e,{transitionDuration:t,transitionTimingFunction:o})=>({root:{"--app-shell-transition-duration":`${t}ms`,"--app-shell-transition-timing-function":o}})),g=w((e,t)=>{const o=x("AppShell",ft,e),{classNames:r,className:c,style:p,styles:n,unstyled:l,vars:i,navbar:s,withBorder:h,padding:b,transitionDuration:d,transitionTimingFunction:v,header:z,zIndex:L,layout:_,disabled:H,aside:be,footer:ge,offsetScrollbars:ve=!0,mode:T,mod:xe,attributes:je,id:we,...ke}=o,te=O({name:"AppShell",classes:k,props:o,className:c,style:p,classNames:r,styles:n,unstyled:l,attributes:je,vars:i,varsResolver:mt}),Ne=ut({disabled:H,transitionDuration:d}),se=Ee(we);return a.jsxs(at,{value:{getStyles:te,withBorder:h,zIndex:L,disabled:H,offsetScrollbars:ve,mode:T},children:[a.jsx(dt,{navbar:s,header:z,aside:be,footer:ge,padding:b,mode:T,selector:T==="static"?`#${se}`:void 0}),a.jsx(j,{ref:t,...te("root"),mod:[{resizing:Ne,layout:_,disabled:H,mode:T},xe],id:se,...ke})]})});g.classes=k;g.displayName="@mantine/core/AppShell";g.Navbar=U;g.Header=Y;g.Main=G;g.Aside=X;g.Footer=Q;g.Section=J;var de={root:"m_fea6bf1a",burger:"m_d4fb9cad"};const bt=q((e,{color:t,size:o,lineSize:r,transitionDuration:c,transitionTimingFunction:p})=>({root:{"--burger-color":t?He(t,e):void 0,"--burger-size":le(o,"burger-size"),"--burger-line-size":r?f(r):void 0,"--burger-transition-duration":c===void 0?void 0:`${c}ms`,"--burger-transition-timing-function":p}})),Z=w((e,t)=>{const o=x("Burger",null,e),{classNames:r,className:c,style:p,styles:n,unstyled:l,vars:i,opened:s,children:h,transitionDuration:b,transitionTimingFunction:d,lineSize:v,attributes:z,...L}=o,_=O({name:"Burger",classes:de,props:o,className:c,style:p,classNames:r,styles:n,unstyled:l,attributes:z,vars:i,varsResolver:bt});return a.jsxs(Le,{..._("root"),ref:t,...L,children:[a.jsx(j,{mod:["reduce-motion",{opened:s}],..._("burger")}),h]})});Z.classes=de;Z.displayName="@mantine/core/Burger";var ue={root:"m_dc6f14e2"};const gt=q((e,{size:t})=>({root:{"--kbd-fz":le(t,"kbd-fz")}})),M=w((e,t)=>{const o=x("Kbd",null,e),{classNames:r,className:c,style:p,styles:n,unstyled:l,vars:i,attributes:s,...h}=o,b=O({name:"Kbd",classes:ue,props:o,className:c,style:p,classNames:r,styles:n,unstyled:l,attributes:s,vars:i,varsResolver:gt});return a.jsx(j,{component:"kbd",ref:t,...b("root"),...h})});M.classes=ue;M.displayName="@mantine/core/Kbd";const vt=[["path",{d:"M9 6.371c0 4.418 -2.239 6.629 -5 6.629",key:"svg-0"}],["path",{d:"M4 6.371h7",key:"svg-1"}],["path",{d:"M5 9c0 2.144 2.252 3.908 6 4",key:"svg-2"}],["path",{d:"M12 20l4 -9l4 9",key:"svg-3"}],["path",{d:"M19.1 18h-6.2",key:"svg-4"}],["path",{d:"M6.694 3l.793 .582",key:"svg-5"}]],xt=A("outline","language","Language",vt);const jt=[["path",{d:"M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12",key:"svg-0"}],["path",{d:"M9 4v16",key:"svg-1"}],["path",{d:"M15 10l-2 2l2 2",key:"svg-2"}]],wt=A("outline","layout-sidebar-left-collapse","LayoutSidebarLeftCollapse",jt);const kt=[["path",{d:"M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12",key:"svg-0"}],["path",{d:"M15 4v16",key:"svg-1"}],["path",{d:"M9 10l2 2l-2 2",key:"svg-2"}]],Nt=A("outline","layout-sidebar-right-collapse","LayoutSidebarRightCollapse",kt);const At=[["path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454l0 .008",key:"svg-0"}]],ne=A("outline","moon","Moon",At);const Ct=[["path",{d:"M12 3c7.2 0 9 1.8 9 9c0 7.2 -1.8 9 -9 9c-7.2 0 -9 -1.8 -9 -9c0 -7.2 1.8 -9 9 -9",key:"svg-0"}]],It=A("outline","square-rounded","SquareRounded",Ct);const zt=[["path",{d:"M8 12a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7",key:"svg-1"}]],y=A("outline","sun","Sun",zt),St=e=>{const[t,o]=E("alepha.ui.sidebar.opened");return a.jsx(Z,{opened:t,onClick:()=>o(!t),hiddenFrom:"sm",size:"sm",...e})},fe=e=>{const{setColorScheme:t}=he(),o=ot("light"),[r,c]=m.useState("default"),p=e.mode??"minimal";m.useEffect(()=>{c(o)},[o]);const n=()=>{t(o==="dark"?"light":"dark")};return p==="segmented"?a.jsx(st,{value:r,onChange:l=>t(l),data:[{value:"light",label:a.jsx(u,{h:20,align:"center",justify:"center",children:a.jsx(y,{size:16})})},{value:"dark",label:a.jsx(u,{h:20,align:"center",justify:"center",children:a.jsx(ne,{size:16})})}],w:e.fullWidth?"100%":void 0,...e.segmentedProps}):a.jsx(C,{onClick:n,variant:e.variant??"subtle",size:e.size??"sm","aria-label":"Toggle color scheme",px:"xs",fullWidth:e.fullWidth??!1,icon:r==="dark"?y:r==="light"?ne:y,...e.actionProps})},Pt=e=>{const t=et();return a.jsx(C,{variant:"default",icon:xt,menu:{items:t.languages.map(o=>({label:t.tr(o),onClick:()=>t.setLang(o),active:t.lang===o}))},...e.actionProps})},ee=e=>a.jsx(C,{variant:"default",onClick:$e.open,justify:"space-between",rightSection:a.jsx(M,{visibleFrom:"sm",size:"sm",children:"⌘+K"}),radius:"md",...e.actionProps,children:a.jsxs(u,{align:"center",gap:"xs",children:[a.jsx(ye,{size:16,color:"gray"}),a.jsx(u,{visibleFrom:"sm",miw:192,children:a.jsx(K,{size:"xs",c:"dimmed",children:"Search..."})})]})}),Bt=e=>{const{items:t=[]}=e,o=(n,l)=>{if("type"in n){if(n.type==="burger")return a.jsx(St,{},l);if(n.type==="dark")return a.jsx(fe,{...n.props},l);if(n.type==="search")return a.jsx(ee,{...n.props},l);if(n.type==="lang")return a.jsx(Pt,{...n.props},l);if(n.type==="spacer")return a.jsx(u,{w:16},l);if(n.type==="divider")return a.jsx(rt,{orientation:"vertical"},l)}return"element"in n?n.element:null},r=t.filter(n=>n.position==="left"),c=t.filter(n=>n.position==="center"),p=t.filter(n=>n.position==="right");return a.jsxs(u,{h:"100%",align:"center",px:"md",justify:"space-between",...e.flexProps,children:[a.jsx(u,{flex:1,children:r.map((n,l)=>a.jsx(u,{ml:l===0?0:"md",align:"center",children:o(n,l)},l))}),a.jsx(u,{children:c.map((n,l)=>a.jsx(u,{mx:"md",align:"center",children:o(n,l)},l))}),a.jsx(u,{flex:1,align:"center",justify:"end",children:p.map((n,l)=>a.jsx(u,{ml:l===0?0:"md",align:"center",children:o(n,l)},l))})]})},Rt=()=>{const[e,t]=E("alepha.ui.sidebar.collapsed");return a.jsx(u,{children:a.jsx(C,{icon:e?a.jsx(Nt,{}):a.jsx(wt,{}),variant:"subtle",size:"md",onClick:()=>t(!e),tooltip:{position:"right",label:e?"Show sidebar":"Hide sidebar"}})})},_t=e=>{const t=F(),{onItemClick:o}=e,r=(i,s)=>{if("type"in i){if(i.type==="spacer")return a.jsx(u,{h:16},s);if(i.type==="divider")return a.jsx(u,{h:1,bg:"var(--alepha-border)",my:"md",mx:"sm"},s);if(i.type==="search")return a.jsx(ee,{collapsed:e.collapsed},s);if(i.type==="toggle")return a.jsx(Rt,{},s);if(i.type==="section")return e.collapsed?void 0:a.jsxs(u,{mt:"md",mb:"xs",align:"center",gap:"xs",children:[S(i.icon),a.jsx(K,{size:"xs",c:"dimmed",tt:"uppercase",fw:"bold",children:i.label},s)]},s)}return"element"in i?a.jsx(u,{children:i.element},s):i.can&&!i.can()?null:e.collapsed?a.jsx(Tt,{item:i,level:0,onItemClick:o,theme:e.theme??{}},s):a.jsx(me,{item:i,level:0,onItemClick:o,theme:e.theme??{}},s)},c=()=>{if(e.items)return e.items;if(e.autoPopulateMenu){const i=t.concretePages.filter(s=>!s.can||s.can()).map(s=>({label:s.label??s.name,icon:S(s.icon),href:t.path(s.name)}));if(typeof e.autoPopulateMenu=="object"&&e.autoPopulateMenu.startsWith){const s=e.autoPopulateMenu.startsWith;return i.filter(h=>h.href?.startsWith(s))}return i}return[]},p="md",n=e.items?e.gap:"xs",l=m.useMemo(()=>c(),[]);return a.jsxs(u,{flex:1,py:p,direction:"column",className:"overflow-auto",...e.flexProps,children:[a.jsx(u,{gap:n,px:p,direction:"column",children:l.filter(i=>i.position==="top").map((i,s)=>r(i,s))}),a.jsx(u,{gap:n,px:p,direction:"column",flex:1,className:"overflow-auto",children:l.filter(i=>!i.position).map((i,s)=>r(i,s))}),a.jsx(u,{gap:n,px:p,direction:"column",children:l.filter(i=>i.position==="bottom").map((i,s)=>r(i,s))})]})},me=e=>{const{item:t,level:o}=e,r=2,c=F(),p=m.useCallback(s=>{if(!s.children)return!1;for(const h of s.children)if(h.href&&c.isActive(h.href)||p(h))return!0;return!1},[]),[n,l]=m.useState(p(t));if(ie({"react:transition:end":()=>{p(t)&&l(!0)}},[]),o>r)return null;const i=s=>{e.item.target||s.preventDefault(),t.children&&t.children.length>0?l(!n):(e.onItemClick?.(t),t.onClick?.())};return a.jsxs(u,{direction:"column",ps:o===0?0:32,pos:"relative",children:[a.jsx(C,{w:"100%",justify:"space-between",href:e.item.href,target:e.item.target,size:e.item.theme?.size??e.theme.button?.size??(o===0?"sm":"xs"),c:"var(--mantine-color-text)",color:"gray",variant:"subtle",variantActive:"default",radius:e.item.theme?.radius??e.theme.button?.radius??"md",onClick:i,leftSection:a.jsxs(u,{w:"100%",align:"center",gap:"sm",children:[S(t.icon),a.jsxs(u,{direction:"column",children:[a.jsx(u,{children:t.label}),t.description&&a.jsx(K,{size:"xs",c:"dimmed",children:t.description})]})]}),rightSection:t.children?a.jsx(u,{children:n?a.jsx(De,{size:14}):a.jsx(We,{size:14})}):e.item.rightSection,...e.item.actionProps}),t.children&&n&&a.jsxs(u,{direction:"column","data-parent-level":o,children:[a.jsx(u,{style:{position:"absolute",width:1,background:"linear-gradient(to bottom, transparent, var(--alepha-border), transparent)",top:48,left:20+32*o,bottom:16}}),t.children.filter(s=>!s.can||s.can()).map((s,h)=>a.jsx(me,{item:s,level:o+1,onItemClick:e.onItemClick,theme:e.theme},h))]})]})},Tt=e=>{const{item:t,level:o}=e,r=F(),c=m.useCallback(i=>{if(!i.children)return!1;for(const s of i.children)if(s.href&&r.isActive(s.href)||c(s))return!0;return!1},[]),[p,n]=m.useState(c(t)),l=i=>{e.item.target||i.preventDefault(),t.children&&t.children.length>0?n(!p):(e.onItemClick?.(t),t.onClick?.())};return a.jsx(C,{size:e.item.theme?.size??e.theme.button?.size??(o===0?"sm":"xs"),variant:"subtle",variantActive:"default",tooltip:t.children?void 0:{label:t.label,position:"right"},radius:e.item.theme?.radius??e.theme.button?.radius??"md",onClick:l,icon:S(t.icon)??a.jsx(It,{}),href:e.item.href,target:e.item.target,menu:t.children?{position:"right",on:"hover",items:t.children.filter(i=>!i.can||i.can()).map(i=>({label:i.label,href:i.href,icon:S(i.icon),children:i.children?.filter(s=>!s.can||s.can())}))}:void 0,...e.item.actionProps})},Vt=e=>{const t=F(),[o,r]=E("alepha.ui.sidebar.opened"),[c]=E("alepha.ui.sidebar.collapsed",e.sidebarProps?.collapsed),p=()=>{if(e.noSidebarWhen?.paths){for(const z of e.noSidebarWhen.paths)if(t.isActive(z,{startWith:!0}))return!1}return!0},[n,l]=m.useState(p());ie({"react:transition:end":()=>{l(p())},"react:transition:begin":()=>{r(!1)}},[]);const i=[{position:"left",type:"burger"}],s=n&&e.sidebarProps!==void 0,h=s||e.appBarProps||e.header,b=h?60:0,d=e.footer?24:0,v=s?c?78:300:0;return a.jsxs(g,{w:"100%",flex:1,padding:"md",header:h?{height:60}:void 0,navbar:s?{width:c?{base:78}:{base:300},breakpoint:"sm",collapsed:{mobile:!o}}:void 0,footer:e.footer?{height:24}:void 0,...e.appShellProps,children:[a.jsx(g.Header,{bg:V.colors.surface,...e.appShellHeaderProps,children:e.header??a.jsx(Bt,{items:i,...e.appBarProps})}),s&&a.jsx(g.Navbar,{bg:V.colors.surface,...e.appShellNavbarProps,children:a.jsx(_t,{collapsed:c,...e.sidebarProps??{}})}),a.jsx(g.Main,{pl:v,pt:b,pb:d,pr:0,display:"flex",flex:1,style:{flexDirection:"column"},...e.appShellMainProps,children:e.children??a.jsx(Oe,{})}),e.footer&&a.jsx(g.Footer,{bg:V.colors.surface,...e.appShellFooterProps,children:e.footer})]})},Kt=()=>a.jsx(Vt,{appShellHeaderProps:{bg:V.colors.background},appShellNavbarProps:{bg:"transparent"},sidebarProps:{gap:4,collapsed:!0,items:[{label:"Dashboard",icon:a.jsx(qe,{}),href:"/"},{type:"divider"},{label:"Actions",icon:a.jsx(Ke,{}),href:"/actions"},{label:"Queues",icon:a.jsx(Xe,{}),href:"/queues"},{label:"Topics",icon:a.jsx(Qe,{}),href:"/topics"},{label:"Caches",icon:a.jsx(Ye,{}),href:"/caches"},{label:"DB Studio",icon:a.jsx(Ge,{}),href:"/db"},{type:"divider"},{label:"Environment",icon:a.jsx(Ue,{}),href:"/env"},{label:"Atoms",icon:a.jsx(Je,{}),href:"/atoms"},{type:"divider"},{label:"Graph",icon:a.jsx(Ze,{}),href:"/graph"},{label:"Logs",icon:a.jsx(Me,{}),href:"/logs"}]},appBarProps:{items:[{position:"left",type:"burger"},{position:"left",element:a.jsx(u,{h:"60px",w:"78px",style:{marginLeft:"-32px",borderRight:"1px solid var(--mantine-color-default-border)"}})},{position:"left",element:a.jsx(ee,{actionProps:{variant:"outline",bd:"1px solid var(--mantine-color-default-border)"}})},{position:"right",element:a.jsx(fe,{})}]}});export{Kt as DevLayout,Kt as default};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,bv as E,f as F,b as W,
|
|
1
|
+
import{r,bv as E,f as F,b as W,o as L,ah as B,j as $,B as x,t as M,i as oe,bw as j,$ as ae,q as ie,al as ue,aJ as le,v as ce,w as de,a0 as fe}from"./entry.Cgjh-xX-.js";import{g as me}from"./chunk.uyVen0u2.js";function ve(t,e){if(t===e||Number.isNaN(t)&&Number.isNaN(e))return!0;if(!(t instanceof Object)||!(e instanceof Object))return!1;const n=Object.keys(t),{length:o}=n;if(o!==Object.keys(e).length)return!1;for(let a=0;a<o;a+=1){const i=n[a];if(!(i in e)||t[i]!==e[i]&&!(Number.isNaN(t[i])&&Number.isNaN(e[i])))return!1}return!0}function he(t,e){if(!t||!e)return!1;if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n+=1)if(!ve(t[n],e[n]))return!1;return!0}function be(t){const e=r.useRef([]),n=r.useRef(0);return he(e.current,t)||(e.current=t,n.current+=1),[n.current]}function ge(t,e){r.useEffect(t,be(e))}function pe(t,e,n={autoInvoke:!1}){const o=r.useRef(null),a=r.useCallback((...m)=>{o.current||(o.current=window.setTimeout(()=>{t(m),o.current=null},e))},[e]),i=r.useCallback(()=>{o.current&&(window.clearTimeout(o.current),o.current=null)},[]);return r.useEffect(()=>(n.autoInvoke&&a(),i),[i,a]),{start:a,clear:i}}function ye(t,e,n){const o=r.useRef(null),a=r.useRef(null);return r.useEffect(()=>{const i=typeof n=="function"?n():n;return(i||a.current)&&(o.current=new MutationObserver(t),o.current.observe(i||a.current,e)),()=>{o.current?.disconnect()}},[t,e]),a}function we(){const[t,e]=r.useState(!1);return r.useEffect(()=>e(!0),[]),t}var P={root:"m_96b553a6"};function Re(t,e){if(!e||!t)return!1;let n=e.parentNode;for(;n!=null;){if(n===t)return!0;n=n.parentNode}return!1}function Se({target:t,parent:e,ref:n,displayAfterTransitionEnd:o}){const a=r.useRef(-1),[i,m]=r.useState(!1),[R,S]=r.useState(typeof o=="boolean"?o:!1),l=()=>{if(!t||!e||!n.current)return;const u=t.getBoundingClientRect(),c=e.getBoundingClientRect(),f=window.getComputedStyle(t),h=window.getComputedStyle(e),p=E(f.borderTopWidth)+E(h.borderTopWidth),y=E(f.borderLeftWidth)+E(h.borderLeftWidth),b={top:u.top-c.top-p,left:u.left-c.left-y,width:u.width,height:u.height};n.current.style.transform=`translateY(${b.top}px) translateX(${b.left}px)`,n.current.style.width=`${b.width}px`,n.current.style.height=`${b.height}px`},d=()=>{window.clearTimeout(a.current),n.current&&(n.current.style.transitionDuration="0ms"),l(),a.current=window.setTimeout(()=>{n.current&&(n.current.style.transitionDuration="")},30)},g=r.useRef(null),v=r.useRef(null);return r.useEffect(()=>{if(l(),t)return g.current=new ResizeObserver(d),g.current.observe(t),e&&(v.current=new ResizeObserver(d),v.current.observe(e)),()=>{g.current?.disconnect(),v.current?.disconnect()}},[e,t]),r.useEffect(()=>{if(e){const u=c=>{Re(c.target,e)&&(d(),S(!1))};return e.addEventListener("transitionend",u),()=>{e.removeEventListener("transitionend",u)}}},[e]),pe(()=>{me()!=="test"&&m(!0)},20,{autoInvoke:!0}),ye(u=>{u.forEach(c=>{c.type==="attributes"&&c.attributeName==="dir"&&d()})},{attributes:!0,attributeFilter:["dir"]},()=>document.documentElement),{initialized:i,hidden:R}}const Ce=M((t,{transitionDuration:e})=>({root:{"--transition-duration":typeof e=="number"?`${e}ms`:e}})),_=F((t,e)=>{const n=W("FloatingIndicator",null,t),{classNames:o,className:a,style:i,styles:m,unstyled:R,vars:S,target:l,parent:d,transitionDuration:g,mod:v,displayAfterTransitionEnd:u,attributes:c,...f}=n,h=L({name:"FloatingIndicator",classes:P,props:n,className:a,style:i,classNames:o,styles:m,unstyled:R,attributes:c,vars:S,varsResolver:Ce}),p=r.useRef(null),{initialized:y,hidden:b}=Se({target:l,parent:d,ref:p,displayAfterTransitionEnd:u}),N=B(e,p);return!l||!d?null:$.jsx(x,{ref:N,mod:[{initialized:y,hidden:b},v],...h("root"),...f})});_.displayName="@mantine/core/FloatingIndicator";_.classes=P;var A={root:"m_cf365364",indicator:"m_9e182ccd",label:"m_1738fcb2",input:"m_1714d588",control:"m_69686b9b",innerLabel:"m_78882f40"};const Ne={withItemsBorders:!0},Ee=M((t,{radius:e,color:n,transitionDuration:o,size:a,transitionTimingFunction:i})=>({root:{"--sc-radius":e===void 0?void 0:fe(e),"--sc-color":n?de(n,t):void 0,"--sc-shadow":n?void 0:"var(--mantine-shadow-xs)","--sc-transition-duration":o===void 0?void 0:`${o}ms`,"--sc-transition-timing-function":i,"--sc-padding":ce(a,"sc-padding"),"--sc-font-size":le(a)}})),q=F((t,e)=>{const n=W("SegmentedControl",Ne,t),{classNames:o,className:a,style:i,styles:m,unstyled:R,vars:S,data:l,value:d,defaultValue:g,onChange:v,size:u,name:c,disabled:f,readOnly:h,fullWidth:p,orientation:y,radius:b,color:N,transitionDuration:$e,transitionTimingFunction:xe,variant:D,autoContrast:H,withItemsBorders:J,mod:K,attributes:U,...X}=n,w=L({name:"SegmentedControl",props:n,classes:A,className:a,style:i,classNames:o,styles:m,unstyled:R,attributes:U,vars:S,varsResolver:Ee}),z=oe(),O=l.map(s=>typeof s=="string"?{label:s,value:s}:s),Y=we(),[G,Q]=r.useState(j()),[Z,V]=r.useState(null),[I,ee]=r.useState({}),te=(s,T)=>{I[T]=s,ee(I)},[C,ne]=ae({value:d,defaultValue:g,finalValue:Array.isArray(l)?O.find(s=>!s.disabled)?.value??l[0]?.value??null:null,onChange:v}),k=ie(c),se=O.map(s=>r.createElement(x,{...w("control"),mod:{active:C===s.value,orientation:y},key:s.value},r.createElement("input",{...w("input"),disabled:f||s.disabled,type:"radio",name:k,value:s.value,id:`${k}-${s.value}`,checked:C===s.value,onChange:()=>!h&&ne(s.value),"data-focus-ring":z.focusRing,key:`${s.value}-input`}),r.createElement(x,{component:"label",...w("label"),mod:{active:C===s.value&&!(f||s.disabled),disabled:f||s.disabled,"read-only":h},htmlFor:`${k}-${s.value}`,ref:T=>te(T,s.value),__vars:{"--sc-label-color":N!==void 0?ue({color:N,theme:z,autoContrast:H}):void 0},key:`${s.value}-label`},$.jsx("span",{...w("innerLabel"),children:s.label})))),re=B(e,s=>V(s));return ge(()=>{Q(j())},[l.length]),l.length===0?null:$.jsxs(x,{...w("root"),variant:D,size:u,ref:re,mod:[{"full-width":p,orientation:y,initialized:Y,"with-items-borders":J},K],...X,role:"radiogroup","data-disabled":f,children:[typeof C=="string"&&$.jsx(_,{target:I[C],parent:Z,component:"span",transitionDuration:"var(--sc-transition-duration)",...w("indicator")},G),se]})});q.classes=A;q.displayName="@mantine/core/SegmentedControl";export{q as S};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{av as Me,r as x,aM as De,x as je,a3 as ke,b5 as Ie,b6 as Ae,A as z,aK as te,p as H,b as M,j as r,T as Pe,d as Te,c as Ne,f as B,B as se,ah as K,ay as Ee,i as q,aj as re,b7 as ie,U as ae,b8 as Le,_ as Fe,b9 as Re,q as _e,$ as Oe,ax as Be,a1 as Ke,a$ as Ve,H as $e,F as ne,ae as ze,a6 as L,G as He,ab as qe}from"./entry.BWhdC3SJ.js";import{T as ce}from"./chunk.BQQ5nN1l.js";import{f as Ue,c as le}from"./chunk.BlqFPyLh.js";import{P as F,u as de}from"./chunk.CoD2sLa1.js";import{A as Ge}from"./chunk.BCBZ1wAk.js";const ue=(n,o=["loading","dirty","error"])=>{const t=Me(),s=o,[a,i]=x.useState(!1),[e,c]=x.useState(!1),[l,u]=x.useState(void 0),[m,y]=x.useState(void 0),h="form"in n?n.form:n,f="path"in n?n.path:void 0,w=s.includes("values"),d=s.includes("error"),v=s.includes("dirty"),b=s.includes("loading");return x.useEffect(()=>{const C=[];return(d||w||v)&&C.push(t.events.on("form:change",p=>{p.id===h.id&&((!f||p.path===f)&&(v&&i(!0),d&&u(void 0)),w&&y(h.currentValues))})),w&&C.push(t.events.on("form:reset",p=>{p.id===h.id&&y(p.values)})),b&&C.push(t.events.on("form:submit:begin",p=>{p.id===h.id&&c(!0)}),t.events.on("form:submit:end",p=>{p.id===h.id&&c(!1)})),(w||v)&&C.push(t.events.on("form:submit:success",p=>{p.id===h.id&&(w&&y(p.values),v&&i(!1))})),d&&C.push(t.events.on("form:submit:error",p=>{p.id===h.id&&(!f||p.error instanceof De&&p.error.value.path===f)&&u(p.error)})),()=>{for(const p of C)p()}},[]),{dirty:a,loading:e,error:l,values:m}},pt=()=>(je("alepha.react.i18n.lang"),ke(Ie)),We=n=>{Ae();const o=z(),[t,s]=x.useState(!1),a=typeof n=="string"?{href:n}:{...n,href:n.href},i=a.href,e=o.isActive(i,a);return{isPending:t,isActive:e,anchorProps:{href:o.base(i),onClick:async c=>{if(c?.stopPropagation(),c?.preventDefault(),!e&&!t){s(!0);try{await o.go(i)}finally{s(!1)}}}}}};function S(n,o){return t=>{n?.(t),o?.(t)}}function Je(n,o){return n in o?te(o[n]):te(n)}function vt(n,o){const t=n.map(s=>({value:s,px:Je(s,o)}));return t.sort((s,a)=>s.px-a.px),t}function Qe(n,o,t){return t?Array.from(Ue(t,o)?.querySelectorAll(n)||[]).findIndex(s=>s===t):null}function Xe(n=!1,o={}){const[t,s]=x.useState(n),a=x.useCallback(()=>{s(c=>c||(o.onOpen?.(),!0))},[o.onOpen]),i=x.useCallback(()=>{s(c=>c&&(o.onClose?.(),!1))},[o.onClose]),e=x.useCallback(()=>{t?i():a()},[i,a,t]);return[t,{open:a,close:i,toggle:e}]}function me({open:n,close:o,openDelay:t,closeDelay:s}){const a=x.useRef(-1),i=x.useRef(-1),e=()=>{window.clearTimeout(a.current),window.clearTimeout(i.current)},c=()=>{e(),t===0||t===void 0?n():a.current=window.setTimeout(n,t)},l=()=>{e(),s===0||s===void 0?o():i.current=window.setTimeout(o,s)};return x.useEffect(()=>e,[]),{openDropdown:c,closeDropdown:l}}var he={root:"m_849cf0da"};const Ye={underline:"hover"},U=H((n,o)=>{const{underline:t,className:s,unstyled:a,mod:i,...e}=M("Anchor",Ye,n);return r.jsx(Pe,{component:"a",ref:o,className:Te({[he.root]:!a},s),...e,mod:[{underline:t},i],__staticSelector:"Anchor",unstyled:a})});U.classes=he;U.displayName="@mantine/core/Anchor";const[Ze,k]=Ne("Menu component was not found in the tree");var I={dropdown:"m_dc9b7c9f",label:"m_9bfac126",divider:"m_efdf90cb",item:"m_99ac2aa1",itemLabel:"m_5476e0d3",itemSection:"m_8b75e504",chevron:"m_b85b0bed"};const G=B((n,o)=>{const{classNames:t,className:s,style:a,styles:i,vars:e,...c}=M("MenuDivider",null,n),l=k();return r.jsx(se,{ref:o,...l.getStyles("divider",{className:s,style:a,styles:i,classNames:t}),...c})});G.classes=I;G.displayName="@mantine/core/MenuDivider";const W=B((n,o)=>{const{classNames:t,className:s,style:a,styles:i,vars:e,onMouseEnter:c,onMouseLeave:l,onKeyDown:u,children:m,...y}=M("MenuDropdown",null,n),h=x.useRef(null),f=k(),w=S(u,b=>{(b.key==="ArrowUp"||b.key==="ArrowDown")&&(b.preventDefault(),h.current?.querySelectorAll("[data-menu-item]:not(:disabled)")[0]?.focus())}),d=S(c,()=>(f.trigger==="hover"||f.trigger==="click-hover")&&f.openDropdown()),v=S(l,()=>(f.trigger==="hover"||f.trigger==="click-hover")&&f.closeDropdown());return r.jsxs(F.Dropdown,{...y,onMouseEnter:d,onMouseLeave:v,role:"menu","aria-orientation":"vertical",ref:K(o,h),...f.getStyles("dropdown",{className:s,style:a,styles:i,classNames:t,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:w,children:[f.withInitialFocusPlaceholder&&r.jsx("div",{tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),m]})});W.classes=I;W.displayName="@mantine/core/MenuDropdown";const[et,V]=Ee(),J=H((n,o)=>{const{classNames:t,className:s,style:a,styles:i,vars:e,color:c,closeMenuOnClick:l,leftSection:u,rightSection:m,children:y,disabled:h,"data-disabled":f,...w}=M("MenuItem",null,n),d=k(),v=V(),b=q(),{dir:C}=re(),p=x.useRef(null),D=w,A=S(D.onClick,()=>{f||(typeof l=="boolean"?l&&d.closeDropdownImmediately():d.closeOnItemClick&&d.closeDropdownImmediately())}),j=c?b.variantColorResolver({color:c,theme:b,variant:"light"}):void 0,P=c?ie({color:c,theme:b}):null,_=S(D.onKeyDown,T=>{T.key==="ArrowLeft"&&v&&(v.close(),v.focusParentItem())});return r.jsxs(ae,{onMouseDown:T=>T.preventDefault(),...w,unstyled:d.unstyled,tabIndex:d.menuItemTabIndex,...d.getStyles("item",{className:s,style:a,styles:i,classNames:t}),ref:K(p,o),role:"menuitem",disabled:h,"data-menu-item":!0,"data-disabled":h||f||void 0,"data-mantine-stop-propagation":!0,onClick:A,onKeyDown:le({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:d.loop,dir:C,orientation:"vertical",onKeyDown:_}),__vars:{"--menu-item-color":P?.isThemeColor&&P?.shade===void 0?`var(--mantine-color-${P.color}-6)`:j?.color,"--menu-item-hover":j?.hover},children:[u&&r.jsx("div",{...d.getStyles("itemSection",{styles:i,classNames:t}),"data-position":"left",children:u}),y&&r.jsx("div",{...d.getStyles("itemLabel",{styles:i,classNames:t}),children:y}),m&&r.jsx("div",{...d.getStyles("itemSection",{styles:i,classNames:t}),"data-position":"right",children:m})]})});J.classes=I;J.displayName="@mantine/core/MenuItem";const Q=B((n,o)=>{const{classNames:t,className:s,style:a,styles:i,vars:e,...c}=M("MenuLabel",null,n),l=k();return r.jsx(se,{ref:o,...l.getStyles("label",{className:s,style:a,styles:i,classNames:t}),...c})});Q.classes=I;Q.displayName="@mantine/core/MenuLabel";const X=B((n,o)=>{const{classNames:t,className:s,style:a,styles:i,vars:e,onMouseEnter:c,onMouseLeave:l,onKeyDown:u,children:m,...y}=M("MenuSubDropdown",null,n),h=x.useRef(null),f=k(),w=V(),d=S(c,w?.open),v=S(l,w?.close);return r.jsx(F.Dropdown,{...y,onMouseEnter:d,onMouseLeave:v,role:"menu","aria-orientation":"vertical",ref:K(o,h),...f.getStyles("dropdown",{className:s,style:a,styles:i,classNames:t,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,children:m})});X.classes=I;X.displayName="@mantine/core/MenuSubDropdown";const Y=H((n,o)=>{const{classNames:t,className:s,style:a,styles:i,vars:e,color:c,leftSection:l,rightSection:u,children:m,disabled:y,"data-disabled":h,closeMenuOnClick:f,...w}=M("MenuSubItem",null,n),d=k(),v=V(),b=q(),{dir:C}=re(),p=x.useRef(null),D=w,A=c?b.variantColorResolver({color:c,theme:b,variant:"light"}):void 0,j=c?ie({color:c,theme:b}):null,P=S(D.onKeyDown,E=>{E.key==="ArrowRight"&&(v?.open(),v?.focusFirstItem()),E.key==="ArrowLeft"&&v?.parentContext&&(v.parentContext.close(),v.parentContext.focusParentItem())}),_=S(D.onClick,()=>{!h&&f&&d.closeDropdownImmediately()}),T=S(D.onMouseEnter,v?.open),N=S(D.onMouseLeave,v?.close);return r.jsxs(ae,{onMouseDown:E=>E.preventDefault(),...w,unstyled:d.unstyled,tabIndex:d.menuItemTabIndex,...d.getStyles("item",{className:s,style:a,styles:i,classNames:t}),ref:K(p,o),role:"menuitem",disabled:y,"data-menu-item":!0,"data-sub-menu-item":!0,"data-disabled":y||h||void 0,"data-mantine-stop-propagation":!0,onMouseEnter:T,onMouseLeave:N,onClick:_,onKeyDown:le({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:d.loop,dir:C,orientation:"vertical",onKeyDown:P}),__vars:{"--menu-item-color":j?.isThemeColor&&j?.shade===void 0?`var(--mantine-color-${j.color}-6)`:A?.color,"--menu-item-hover":A?.hover},children:[l&&r.jsx("div",{...d.getStyles("itemSection",{styles:i,classNames:t}),"data-position":"left",children:l}),m&&r.jsx("div",{...d.getStyles("itemLabel",{styles:i,classNames:t}),children:m}),r.jsx("div",{...d.getStyles("itemSection",{styles:i,classNames:t}),"data-position":"right",children:u||r.jsx(Ge,{...d.getStyles("chevron"),size:14})})]})});Y.classes=I;Y.displayName="@mantine/core/MenuSubItem";function fe({children:n,refProp:o}){if(!Le(n))throw new Error("Menu.Sub.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return k(),r.jsx(F.Target,{refProp:o,popupType:"menu",children:n})}fe.displayName="@mantine/core/MenuSubTarget";const tt={offset:0,position:"right-start",transitionProps:{duration:0},openDelay:0,middlewares:{shift:{crossAxis:!0}}};function R(n){const{children:o,closeDelay:t,openDelay:s,...a}=M("MenuSub",tt,n),i=Fe(),[e,{open:c,close:l}]=Xe(!1),u=V(),{openDropdown:m,closeDropdown:y}=me({open:c,close:l,closeDelay:t,openDelay:s}),h=()=>window.setTimeout(()=>{document.getElementById(`${i}-dropdown`)?.querySelectorAll("[data-menu-item]:not([data-disabled])")[0]?.focus()},16),f=()=>window.setTimeout(()=>{document.getElementById(`${i}-target`)?.focus()},16);return r.jsx(et,{value:{opened:e,close:y,open:m,focusFirstItem:h,focusParentItem:f,parentContext:u},children:r.jsx(F,{opened:e,withinPortal:!1,withArrow:!1,id:i,...a,children:o})})}R.extend=n=>n;R.displayName="@mantine/core/MenuSub";R.Target=fe;R.Dropdown=X;R.Item=Y;const nt={refProp:"ref"},pe=x.forwardRef((n,o)=>{const{children:t,refProp:s,...a}=M("MenuTarget",nt,n),i=Re(t);if(!i)throw new Error("Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const e=k(),c=i.props,l=S(c.onClick,()=>{e.trigger==="click"?e.toggleDropdown():e.trigger==="click-hover"&&(e.setOpenedViaClick(!0),e.opened||e.openDropdown())}),u=S(c.onMouseEnter,()=>(e.trigger==="hover"||e.trigger==="click-hover")&&e.openDropdown()),m=S(c.onMouseLeave,()=>{(e.trigger==="hover"||e.trigger==="click-hover"&&!e.openedViaClick)&&e.closeDropdown()});return r.jsx(F.Target,{refProp:s,popupType:"menu",ref:o,...a,children:x.cloneElement(i,{onClick:l,onMouseEnter:u,onMouseLeave:m,"data-expanded":e.opened?!0:void 0})})});pe.displayName="@mantine/core/MenuTarget";const ot={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:["mousedown","touchstart","keydown"],loop:!0,trigger:"click",openDelay:0,closeDelay:100,menuItemTabIndex:-1};function g(n){const o=M("Menu",ot,n),{children:t,onOpen:s,onClose:a,opened:i,defaultOpened:e,trapFocus:c,onChange:l,closeOnItemClick:u,loop:m,closeOnEscape:y,trigger:h,openDelay:f,closeDelay:w,classNames:d,styles:v,unstyled:b,variant:C,vars:p,menuItemTabIndex:D,keepMounted:A,withInitialFocusPlaceholder:j,attributes:P,..._}=o,T=_e({name:"Menu",classes:I,props:o,classNames:d,styles:v,unstyled:b,attributes:P}),[N,E]=Oe({value:i,defaultValue:e,finalValue:!1,onChange:l}),[ge,Z]=x.useState(!1),O=()=>{E(!1),Z(!1),N&&a?.()},$=()=>{E(!0),!N&&s?.()},ee=()=>{N?O():$()},{openDropdown:xe,closeDropdown:ye}=me({open:$,close:O,closeDelay:w,openDelay:f}),we=Ce=>Qe("[data-menu-item]","[data-menu-dropdown]",Ce),{resolvedClassNames:be,resolvedStyles:Se}=Be({classNames:d,styles:v,props:o});return r.jsx(Ze,{value:{getStyles:T,opened:N,toggleDropdown:ee,getItemIndex:we,openedViaClick:ge,setOpenedViaClick:Z,closeOnItemClick:u,closeDropdown:h==="click"?O:ye,openDropdown:h==="click"?$:xe,closeDropdownImmediately:O,loop:m,trigger:h,unstyled:b,menuItemTabIndex:D,withInitialFocusPlaceholder:j},children:r.jsx(F,{returnFocus:!0,..._,opened:N,onChange:ee,defaultOpened:e,trapFocus:A?!1:c,closeOnEscape:y,__staticSelector:"Menu",classNames:be,styles:Se,unstyled:b,variant:C,keepMounted:A,children:t})})}g.extend=n=>n;g.withProps=Ke(g);g.classes=I;g.displayName="@mantine/core/Menu";g.Item=J;g.Label=Q;g.Dropdown=W;g.Target=pe;g.Divider=G;g.Sub=R;const ve=n=>{const{item:o,index:t}=n,s=z(),a=de({handler:async e=>{await o.onClick?.()}},[o.onClick]);if(o.type==="divider")return r.jsx(g.Divider,{},t);if(o.type==="label")return r.jsx(g.Label,{children:o.label},t);if(o.children&&o.children.length>0)return r.jsxs(g,{trigger:"hover",position:"right-start",offset:2,children:[r.jsx(g.Target,{children:r.jsx(g.Item,{leftSection:o.icon,rightSection:r.jsx(He,{size:14}),children:o.label})}),r.jsx(g.Dropdown,{children:o.children.map((e,c)=>r.jsx(ve,{item:e,index:c},c))})]},t);const i={};return n.item.onClick?i.onClick=a.run:n.item.href&&Object.assign(i,s.anchor(n.item.href)),r.jsx(g.Item,{leftSection:o.icon,onClick:o.onClick,color:o.color,rightSection:o.active?r.jsx(ce,{size:"xs",variant:"transparent",children:r.jsx(qe,{})}):void 0,...i,children:o.label},t)},oe=n=>{const o=q(),t={...n},{tooltip:s,menu:a,icon:i,...e}=t;if(t.variant==="subtle"&&(e.c??="var(--mantine-color-text)",e.color??="gray"),t.intent&&(t.intent==="none"?(e.c??="var(--mantine-color-text)",e.color??="gray"):t.intent==="primary"?(e.c??="white",e.color??=o.primaryColor):t.intent==="success"?(e.c??="white",e.color??="green"):t.intent==="danger"?(e.c??="white",e.color??="red"):t.intent==="warning"?(e.c??="var(--mantine-color-text)",e.color??="yellow"):t.intent==="info"&&(e.c??="white",e.color??="blue")),t.icon){const u=Ve(t.icon)?r.jsx(t.icon,{size:$e.sizes.icon.md}):r.jsx(ce,{w:24,variant:"transparent",size:"sm",c:"var(--mantine-color-text)",...t.themeIconProps,children:t.icon});t.children?e.leftSection=u:(e.children=x.Children.only(u),e.px??="xs")}if(t.leftSection&&!t.children&&(e.px??="xs"),t.textVisibleFrom){const{children:u,textVisibleFrom:m,leftSection:y,...h}=e;return r.jsxs(r.Fragment,{children:[r.jsx(ne,{w:"100%",visibleFrom:m,children:r.jsx(oe,{flex:1,...h,leftSection:y,tooltip:s,menu:a,children:u})}),r.jsx(ne,{w:"100%",hiddenFrom:m,children:r.jsx(oe,{px:"xs",...h,tooltip:s,menu:a,children:y})})]})}let l="href"in e&&e.href?e.href.startsWith("http")||e.target?r.jsx(lt,{...e,href:e.href,children:e.children}):r.jsx(ct,{...e,href:e.href,children:e.children}):(delete e.classNameActive,delete e.variantActive,"action"in e&&e.action?r.jsx(it,{...e,action:e.action,children:e.children}):"onClick"in e&&e.onClick?r.jsx(at,{...e,onClick:e.onClick,children:e.children}):"form"in e&&e.form?e.type==="reset"?r.jsx(rt,{...e,form:e.form,children:e.children}):r.jsx(st,{...e,form:e.form,children:e.children}):r.jsx(L,{...e,children:e.children}));if(a&&(l=r.jsxs(g,{position:a.position||"bottom-start",width:a.width||200,shadow:a.shadow||"md",trigger:a.on==="hover"?"hover":"click",...a.menuProps,children:[r.jsx(g.Target,{...a.targetProps,children:l}),r.jsx(g.Dropdown,{children:a.items.map((u,m)=>r.jsx(ve,{item:u,index:m},m))})]})),s){const u={openDelay:1e3},m=typeof s=="string"||typeof s=="number"?{...u,label:s,children:l}:{...u,...s,children:l};return r.jsx(ze,{...m})}return l},st=n=>{const{form:o,...t}=n,s=ue(o);return r.jsx(L,{...t,loading:s.loading,disabled:s.loading,type:"submit",children:n.children})},rt=n=>{const{form:o,...t}=n,s=ue(o);return r.jsx(L,{...t,disabled:s.loading,type:"reset",children:n.children})},it=n=>{const{action:o,...t}=n;return r.jsx(L,{...t,disabled:o.loading||n.disabled,loading:o.loading,onClick:()=>o.run(),children:n.children})},at=n=>{const o=de({handler:async t=>{await n.onClick(t)}},[n.onClick]);return r.jsx(L,{...n,disabled:o.loading||n.disabled,loading:o.loading,onClick:o.run,children:n.children})},ct=n=>{const{active:o,classNameActive:t,variantActive:s,routerGoOptions:a,...i}=n,e=z(),{isPending:c,isActive:l}=We(o?{href:n.href,...o}:{href:n.href}),u=e.anchor(n.href,a),m=i.className||"";return l&&o!==!1&&t&&(i.className=`${m} ${t}`.trim()),n.anchorProps?r.jsx(U,{component:"a",...u,...n.anchorProps,children:n.children}):r.jsx(L,{component:"a",loading:c,...i,...u,variant:l&&o!==!1?s??"filled":i.variant??"subtle",children:n.children})},lt=n=>{const{active:o,classNameActive:t,variantActive:s,routerGoOptions:a,target:i,...e}=n;return r.jsx(L,{component:"a",target:i,...e,children:n.children})};export{oe as A,vt as a,Xe as b,S as c,ue as d,Je as g,pt as u};
|
|
1
|
+
import{av as Me,r as x,aM as De,y as je,a3 as ke,b5 as Ie,b6 as Pe,C as z,aK as te,p as H,b as M,j as r,T as Ae,d as Te,c as Ne,f as B,B as se,ah as K,ay as Ee,i as q,aj as re,b7 as ie,U as ae,b8 as Le,q as Fe,b9 as Re,o as _e,$ as Oe,ax as Be,a1 as Ke,a$ as Ve,J as $e,F as ne,ae as ze,a6 as L,H as He,ab as qe}from"./entry.Cgjh-xX-.js";import{T as ce}from"./chunk.CN7ovTep.js";import{f as Ue,c as le}from"./chunk.BlqFPyLh.js";import{P as F,u as de}from"./chunk.C8JxGZtc.js";import{A as Ge}from"./chunk.CgxElNrD.js";const ue=(n,o=["loading","dirty","error"])=>{const t=Me(),s=o,[a,i]=x.useState(!1),[e,c]=x.useState(!1),[l,u]=x.useState(void 0),[m,y]=x.useState(void 0),h="form"in n?n.form:n,f="path"in n?n.path:void 0,w=s.includes("values"),d=s.includes("error"),v=s.includes("dirty"),b=s.includes("loading");return x.useEffect(()=>{const C=[];return(d||w||v)&&C.push(t.events.on("form:change",p=>{p.id===h.id&&((!f||p.path===f)&&(v&&i(!0),d&&u(void 0)),w&&y(h.currentValues))})),w&&C.push(t.events.on("form:reset",p=>{p.id===h.id&&y(p.values)})),b&&C.push(t.events.on("form:submit:begin",p=>{p.id===h.id&&c(!0)}),t.events.on("form:submit:end",p=>{p.id===h.id&&c(!1)})),(w||v)&&C.push(t.events.on("form:submit:success",p=>{p.id===h.id&&(w&&y(p.values),v&&i(!1))})),d&&C.push(t.events.on("form:submit:error",p=>{p.id===h.id&&(!f||p.error instanceof De&&p.error.value.path===f)&&u(p.error)})),()=>{for(const p of C)p()}},[]),{dirty:a,loading:e,error:l,values:m}},pt=()=>(je("alepha.react.i18n.lang"),ke(Ie)),We=n=>{Pe();const o=z(),[t,s]=x.useState(!1),a=typeof n=="string"?{href:n}:{...n,href:n.href},i=a.href,e=o.isActive(i,a);return{isPending:t,isActive:e,anchorProps:{href:o.base(i),onClick:async c=>{if(c?.stopPropagation(),c?.preventDefault(),!e&&!t){s(!0);try{await o.go(i)}finally{s(!1)}}}}}};function S(n,o){return t=>{n?.(t),o?.(t)}}function Je(n,o){return n in o?te(o[n]):te(n)}function vt(n,o){const t=n.map(s=>({value:s,px:Je(s,o)}));return t.sort((s,a)=>s.px-a.px),t}function Qe(n,o,t){return t?Array.from(Ue(t,o)?.querySelectorAll(n)||[]).findIndex(s=>s===t):null}function Xe(n=!1,o={}){const[t,s]=x.useState(n),a=x.useCallback(()=>{s(c=>c||(o.onOpen?.(),!0))},[o.onOpen]),i=x.useCallback(()=>{s(c=>c&&(o.onClose?.(),!1))},[o.onClose]),e=x.useCallback(()=>{t?i():a()},[i,a,t]);return[t,{open:a,close:i,toggle:e}]}function me({open:n,close:o,openDelay:t,closeDelay:s}){const a=x.useRef(-1),i=x.useRef(-1),e=()=>{window.clearTimeout(a.current),window.clearTimeout(i.current)},c=()=>{e(),t===0||t===void 0?n():a.current=window.setTimeout(n,t)},l=()=>{e(),s===0||s===void 0?o():i.current=window.setTimeout(o,s)};return x.useEffect(()=>e,[]),{openDropdown:c,closeDropdown:l}}var he={root:"m_849cf0da"};const Ye={underline:"hover"},U=H((n,o)=>{const{underline:t,className:s,unstyled:a,mod:i,...e}=M("Anchor",Ye,n);return r.jsx(Ae,{component:"a",ref:o,className:Te({[he.root]:!a},s),...e,mod:[{underline:t},i],__staticSelector:"Anchor",unstyled:a})});U.classes=he;U.displayName="@mantine/core/Anchor";const[Ze,k]=Ne("Menu component was not found in the tree");var I={dropdown:"m_dc9b7c9f",label:"m_9bfac126",divider:"m_efdf90cb",item:"m_99ac2aa1",itemLabel:"m_5476e0d3",itemSection:"m_8b75e504",chevron:"m_b85b0bed"};const G=B((n,o)=>{const{classNames:t,className:s,style:a,styles:i,vars:e,...c}=M("MenuDivider",null,n),l=k();return r.jsx(se,{ref:o,...l.getStyles("divider",{className:s,style:a,styles:i,classNames:t}),...c})});G.classes=I;G.displayName="@mantine/core/MenuDivider";const W=B((n,o)=>{const{classNames:t,className:s,style:a,styles:i,vars:e,onMouseEnter:c,onMouseLeave:l,onKeyDown:u,children:m,...y}=M("MenuDropdown",null,n),h=x.useRef(null),f=k(),w=S(u,b=>{(b.key==="ArrowUp"||b.key==="ArrowDown")&&(b.preventDefault(),h.current?.querySelectorAll("[data-menu-item]:not(:disabled)")[0]?.focus())}),d=S(c,()=>(f.trigger==="hover"||f.trigger==="click-hover")&&f.openDropdown()),v=S(l,()=>(f.trigger==="hover"||f.trigger==="click-hover")&&f.closeDropdown());return r.jsxs(F.Dropdown,{...y,onMouseEnter:d,onMouseLeave:v,role:"menu","aria-orientation":"vertical",ref:K(o,h),...f.getStyles("dropdown",{className:s,style:a,styles:i,classNames:t,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:w,children:[f.withInitialFocusPlaceholder&&r.jsx("div",{tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),m]})});W.classes=I;W.displayName="@mantine/core/MenuDropdown";const[et,V]=Ee(),J=H((n,o)=>{const{classNames:t,className:s,style:a,styles:i,vars:e,color:c,closeMenuOnClick:l,leftSection:u,rightSection:m,children:y,disabled:h,"data-disabled":f,...w}=M("MenuItem",null,n),d=k(),v=V(),b=q(),{dir:C}=re(),p=x.useRef(null),D=w,P=S(D.onClick,()=>{f||(typeof l=="boolean"?l&&d.closeDropdownImmediately():d.closeOnItemClick&&d.closeDropdownImmediately())}),j=c?b.variantColorResolver({color:c,theme:b,variant:"light"}):void 0,A=c?ie({color:c,theme:b}):null,_=S(D.onKeyDown,T=>{T.key==="ArrowLeft"&&v&&(v.close(),v.focusParentItem())});return r.jsxs(ae,{onMouseDown:T=>T.preventDefault(),...w,unstyled:d.unstyled,tabIndex:d.menuItemTabIndex,...d.getStyles("item",{className:s,style:a,styles:i,classNames:t}),ref:K(p,o),role:"menuitem",disabled:h,"data-menu-item":!0,"data-disabled":h||f||void 0,"data-mantine-stop-propagation":!0,onClick:P,onKeyDown:le({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:d.loop,dir:C,orientation:"vertical",onKeyDown:_}),__vars:{"--menu-item-color":A?.isThemeColor&&A?.shade===void 0?`var(--mantine-color-${A.color}-6)`:j?.color,"--menu-item-hover":j?.hover},children:[u&&r.jsx("div",{...d.getStyles("itemSection",{styles:i,classNames:t}),"data-position":"left",children:u}),y&&r.jsx("div",{...d.getStyles("itemLabel",{styles:i,classNames:t}),children:y}),m&&r.jsx("div",{...d.getStyles("itemSection",{styles:i,classNames:t}),"data-position":"right",children:m})]})});J.classes=I;J.displayName="@mantine/core/MenuItem";const Q=B((n,o)=>{const{classNames:t,className:s,style:a,styles:i,vars:e,...c}=M("MenuLabel",null,n),l=k();return r.jsx(se,{ref:o,...l.getStyles("label",{className:s,style:a,styles:i,classNames:t}),...c})});Q.classes=I;Q.displayName="@mantine/core/MenuLabel";const X=B((n,o)=>{const{classNames:t,className:s,style:a,styles:i,vars:e,onMouseEnter:c,onMouseLeave:l,onKeyDown:u,children:m,...y}=M("MenuSubDropdown",null,n),h=x.useRef(null),f=k(),w=V(),d=S(c,w?.open),v=S(l,w?.close);return r.jsx(F.Dropdown,{...y,onMouseEnter:d,onMouseLeave:v,role:"menu","aria-orientation":"vertical",ref:K(o,h),...f.getStyles("dropdown",{className:s,style:a,styles:i,classNames:t,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,children:m})});X.classes=I;X.displayName="@mantine/core/MenuSubDropdown";const Y=H((n,o)=>{const{classNames:t,className:s,style:a,styles:i,vars:e,color:c,leftSection:l,rightSection:u,children:m,disabled:y,"data-disabled":h,closeMenuOnClick:f,...w}=M("MenuSubItem",null,n),d=k(),v=V(),b=q(),{dir:C}=re(),p=x.useRef(null),D=w,P=c?b.variantColorResolver({color:c,theme:b,variant:"light"}):void 0,j=c?ie({color:c,theme:b}):null,A=S(D.onKeyDown,E=>{E.key==="ArrowRight"&&(v?.open(),v?.focusFirstItem()),E.key==="ArrowLeft"&&v?.parentContext&&(v.parentContext.close(),v.parentContext.focusParentItem())}),_=S(D.onClick,()=>{!h&&f&&d.closeDropdownImmediately()}),T=S(D.onMouseEnter,v?.open),N=S(D.onMouseLeave,v?.close);return r.jsxs(ae,{onMouseDown:E=>E.preventDefault(),...w,unstyled:d.unstyled,tabIndex:d.menuItemTabIndex,...d.getStyles("item",{className:s,style:a,styles:i,classNames:t}),ref:K(p,o),role:"menuitem",disabled:y,"data-menu-item":!0,"data-sub-menu-item":!0,"data-disabled":y||h||void 0,"data-mantine-stop-propagation":!0,onMouseEnter:T,onMouseLeave:N,onClick:_,onKeyDown:le({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:d.loop,dir:C,orientation:"vertical",onKeyDown:A}),__vars:{"--menu-item-color":j?.isThemeColor&&j?.shade===void 0?`var(--mantine-color-${j.color}-6)`:P?.color,"--menu-item-hover":P?.hover},children:[l&&r.jsx("div",{...d.getStyles("itemSection",{styles:i,classNames:t}),"data-position":"left",children:l}),m&&r.jsx("div",{...d.getStyles("itemLabel",{styles:i,classNames:t}),children:m}),r.jsx("div",{...d.getStyles("itemSection",{styles:i,classNames:t}),"data-position":"right",children:u||r.jsx(Ge,{...d.getStyles("chevron"),size:14})})]})});Y.classes=I;Y.displayName="@mantine/core/MenuSubItem";function fe({children:n,refProp:o}){if(!Le(n))throw new Error("Menu.Sub.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return k(),r.jsx(F.Target,{refProp:o,popupType:"menu",children:n})}fe.displayName="@mantine/core/MenuSubTarget";const tt={offset:0,position:"right-start",transitionProps:{duration:0},openDelay:0,middlewares:{shift:{crossAxis:!0}}};function R(n){const{children:o,closeDelay:t,openDelay:s,...a}=M("MenuSub",tt,n),i=Fe(),[e,{open:c,close:l}]=Xe(!1),u=V(),{openDropdown:m,closeDropdown:y}=me({open:c,close:l,closeDelay:t,openDelay:s}),h=()=>window.setTimeout(()=>{document.getElementById(`${i}-dropdown`)?.querySelectorAll("[data-menu-item]:not([data-disabled])")[0]?.focus()},16),f=()=>window.setTimeout(()=>{document.getElementById(`${i}-target`)?.focus()},16);return r.jsx(et,{value:{opened:e,close:y,open:m,focusFirstItem:h,focusParentItem:f,parentContext:u},children:r.jsx(F,{opened:e,withinPortal:!1,withArrow:!1,id:i,...a,children:o})})}R.extend=n=>n;R.displayName="@mantine/core/MenuSub";R.Target=fe;R.Dropdown=X;R.Item=Y;const nt={refProp:"ref"},pe=x.forwardRef((n,o)=>{const{children:t,refProp:s,...a}=M("MenuTarget",nt,n),i=Re(t);if(!i)throw new Error("Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const e=k(),c=i.props,l=S(c.onClick,()=>{e.trigger==="click"?e.toggleDropdown():e.trigger==="click-hover"&&(e.setOpenedViaClick(!0),e.opened||e.openDropdown())}),u=S(c.onMouseEnter,()=>(e.trigger==="hover"||e.trigger==="click-hover")&&e.openDropdown()),m=S(c.onMouseLeave,()=>{(e.trigger==="hover"||e.trigger==="click-hover"&&!e.openedViaClick)&&e.closeDropdown()});return r.jsx(F.Target,{refProp:s,popupType:"menu",ref:o,...a,children:x.cloneElement(i,{onClick:l,onMouseEnter:u,onMouseLeave:m,"data-expanded":e.opened?!0:void 0})})});pe.displayName="@mantine/core/MenuTarget";const ot={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:["mousedown","touchstart","keydown"],loop:!0,trigger:"click",openDelay:0,closeDelay:100,menuItemTabIndex:-1};function g(n){const o=M("Menu",ot,n),{children:t,onOpen:s,onClose:a,opened:i,defaultOpened:e,trapFocus:c,onChange:l,closeOnItemClick:u,loop:m,closeOnEscape:y,trigger:h,openDelay:f,closeDelay:w,classNames:d,styles:v,unstyled:b,variant:C,vars:p,menuItemTabIndex:D,keepMounted:P,withInitialFocusPlaceholder:j,attributes:A,..._}=o,T=_e({name:"Menu",classes:I,props:o,classNames:d,styles:v,unstyled:b,attributes:A}),[N,E]=Oe({value:i,defaultValue:e,finalValue:!1,onChange:l}),[ge,Z]=x.useState(!1),O=()=>{E(!1),Z(!1),N&&a?.()},$=()=>{E(!0),!N&&s?.()},ee=()=>{N?O():$()},{openDropdown:xe,closeDropdown:ye}=me({open:$,close:O,closeDelay:w,openDelay:f}),we=Ce=>Qe("[data-menu-item]","[data-menu-dropdown]",Ce),{resolvedClassNames:be,resolvedStyles:Se}=Be({classNames:d,styles:v,props:o});return r.jsx(Ze,{value:{getStyles:T,opened:N,toggleDropdown:ee,getItemIndex:we,openedViaClick:ge,setOpenedViaClick:Z,closeOnItemClick:u,closeDropdown:h==="click"?O:ye,openDropdown:h==="click"?$:xe,closeDropdownImmediately:O,loop:m,trigger:h,unstyled:b,menuItemTabIndex:D,withInitialFocusPlaceholder:j},children:r.jsx(F,{returnFocus:!0,..._,opened:N,onChange:ee,defaultOpened:e,trapFocus:P?!1:c,closeOnEscape:y,__staticSelector:"Menu",classNames:be,styles:Se,unstyled:b,variant:C,keepMounted:P,children:t})})}g.extend=n=>n;g.withProps=Ke(g);g.classes=I;g.displayName="@mantine/core/Menu";g.Item=J;g.Label=Q;g.Dropdown=W;g.Target=pe;g.Divider=G;g.Sub=R;const ve=n=>{const{item:o,index:t}=n,s=z(),a=de({handler:async e=>{await o.onClick?.()}},[o.onClick]);if(o.type==="divider")return r.jsx(g.Divider,{},t);if(o.type==="label")return r.jsx(g.Label,{children:o.label},t);if(o.children&&o.children.length>0)return r.jsxs(g,{trigger:"hover",position:"right-start",offset:2,children:[r.jsx(g.Target,{children:r.jsx(g.Item,{leftSection:o.icon,rightSection:r.jsx(He,{size:14}),children:o.label})}),r.jsx(g.Dropdown,{children:o.children.map((e,c)=>r.jsx(ve,{item:e,index:c},c))})]},t);const i={};return n.item.onClick?i.onClick=a.run:n.item.href&&Object.assign(i,s.anchor(n.item.href)),r.jsx(g.Item,{leftSection:o.icon,onClick:o.onClick,color:o.color,rightSection:o.active?r.jsx(ce,{size:"xs",variant:"transparent",children:r.jsx(qe,{})}):void 0,...i,children:o.label},t)},oe=n=>{const o=q(),t={...n},{tooltip:s,menu:a,icon:i,...e}=t;if(t.variant==="subtle"&&(e.c??="var(--mantine-color-text)",e.color??="gray"),t.intent&&(t.intent==="none"?(e.c??="var(--mantine-color-text)",e.color??="gray"):t.intent==="primary"?(e.c??="white",e.color??=o.primaryColor):t.intent==="success"?(e.c??="white",e.color??="green"):t.intent==="danger"?(e.c??="white",e.color??="red"):t.intent==="warning"?(e.c??="var(--mantine-color-text)",e.color??="yellow"):t.intent==="info"&&(e.c??="white",e.color??="blue")),t.icon){const u=Ve(t.icon)?r.jsx(t.icon,{size:$e.sizes.icon.md}):r.jsx(ce,{w:24,variant:"transparent",size:"sm",c:"var(--mantine-color-text)",...t.themeIconProps,children:t.icon});t.children?e.leftSection=u:(e.children=x.Children.only(u),e.px??="xs")}if(t.leftSection&&!t.children&&(e.px??="xs"),t.textVisibleFrom){const{children:u,textVisibleFrom:m,leftSection:y,...h}=e;return r.jsxs(r.Fragment,{children:[r.jsx(ne,{w:"100%",visibleFrom:m,children:r.jsx(oe,{flex:1,...h,leftSection:y,tooltip:s,menu:a,children:u})}),r.jsx(ne,{w:"100%",hiddenFrom:m,children:r.jsx(oe,{px:"xs",...h,tooltip:s,menu:a,children:y})})]})}let l="href"in e&&e.href?e.href.startsWith("http")||e.target?r.jsx(lt,{...e,href:e.href,children:e.children}):r.jsx(ct,{...e,href:e.href,children:e.children}):(delete e.classNameActive,delete e.variantActive,"action"in e&&e.action?r.jsx(it,{...e,action:e.action,children:e.children}):"onClick"in e&&e.onClick?r.jsx(at,{...e,onClick:e.onClick,children:e.children}):"form"in e&&e.form?e.type==="reset"?r.jsx(rt,{...e,form:e.form,children:e.children}):r.jsx(st,{...e,form:e.form,children:e.children}):r.jsx(L,{...e,children:e.children}));if(a&&(l=r.jsxs(g,{position:a.position||"bottom-start",width:a.width||200,shadow:a.shadow||"md",trigger:a.on==="hover"?"hover":"click",...a.menuProps,children:[r.jsx(g.Target,{...a.targetProps,children:l}),r.jsx(g.Dropdown,{children:a.items.map((u,m)=>r.jsx(ve,{item:u,index:m},m))})]})),s){const u={openDelay:1e3},m=typeof s=="string"||typeof s=="number"?{...u,label:s,children:l}:{...u,...s,children:l};return r.jsx(ze,{...m})}return l},st=n=>{const{form:o,...t}=n,s=ue(o);return r.jsx(L,{...t,loading:s.loading,disabled:s.loading,type:"submit",children:n.children})},rt=n=>{const{form:o,...t}=n,s=ue(o);return r.jsx(L,{...t,disabled:s.loading,type:"reset",children:n.children})},it=n=>{const{action:o,...t}=n;return r.jsx(L,{...t,disabled:o.loading||n.disabled,loading:o.loading,onClick:()=>o.run(),children:n.children})},at=n=>{const o=de({handler:async t=>{await n.onClick(t)}},[n.onClick]);return r.jsx(L,{...n,disabled:o.loading||n.disabled,loading:o.loading,onClick:o.run,children:n.children})},ct=n=>{const{active:o,classNameActive:t,variantActive:s,routerGoOptions:a,...i}=n,e=z(),{isPending:c,isActive:l}=We(o?{href:n.href,...o}:{href:n.href}),u=e.anchor(n.href,a),m=i.className||"";return l&&o!==!1&&t&&(i.className=`${m} ${t}`.trim()),n.anchorProps?r.jsx(U,{component:"a",...u,...n.anchorProps,children:n.children}):r.jsx(L,{component:"a",loading:c,...i,...u,variant:l&&o!==!1?s??"filled":i.variant??"subtle",children:n.children})},lt=n=>{const{active:o,classNameActive:t,variantActive:s,routerGoOptions:a,target:i,...e}=n;return r.jsx(L,{component:"a",target:i,...e,children:n.children})};export{oe as A,vt as a,Xe as b,S as c,ue as d,Je as g,pt as u};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as b,b as x,o as f,j as g,B as j,t as N,w as R}from"./entry.Cgjh-xX-.js";var a={root:"m_b183c0a2"};const h=N((e,{color:s})=>({root:{"--code-bg":s?R(s,e):void 0}})),r=b((e,s)=>{const o=x("Code",null,e),{classNames:c,className:l,style:n,styles:m,unstyled:d,vars:p,color:B,block:t,variant:i,mod:u,attributes:v,...y}=o,C=f({name:"Code",props:o,classes:a,className:l,style:n,classNames:c,styles:m,unstyled:d,attributes:v,vars:p,varsResolver:h});return g.jsx(j,{component:t?"pre":"code",variant:i,ref:s,mod:[{block:t},u],...C("root"),...y,dir:"ltr"})});r.classes=a;r.displayName="@mantine/core/Code";export{r as C};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a3 as B,a4 as L,r as c,j as e,F as t,T as r,B as x,
|
|
1
|
+
import{a3 as B,a4 as L,r as c,j as e,F as t,T as r,B as x,J as a,af as T,A as C,ad as S,Q as v,ae as w,a6 as A,aa as P}from"./entry.Cgjh-xX-.js";import{d as E}from"./chunk.BIGcMrv-.js";import{S as g,B as u}from"./chunk.wg5XuK3_.js";import{I as M}from"./chunk.DZFiDTv5.js";import{T as j}from"./chunk._D_TfCmJ.js";import{T as n}from"./chunk.CFLl96SC.js";import{a as O,I}from"./chunk.CoH_IYrv.js";import{I as R}from"./chunk.CMTEfKUa.js";import"./chunk.BlqFPyLh.js";const z={memory:"#69db7c",redis:"#ff6b6b",default:"#495057"},$=s=>z[s]??z.default,D=s=>s?typeof s=="number"?s<60?`${s}s`:s<3600?`${Math.floor(s/60)}m`:s<86400?`${Math.floor(s/3600)}h`:`${Math.floor(s/86400)}d`:String(s):"No TTL",K=({caches:s,selectedCache:l,onSelectCache:p,search:f,onSearchChange:b})=>{const h=c.useMemo(()=>{const i={};for(const o of s){const d=o.provider||"default";i[d]||(i[d]=[]),i[d].push(o)}return i},[s]),y=Object.keys(h).sort();return e.jsxs(g,{gap:0,h:"100%",children:[e.jsx(x,{p:"sm",style:{borderBottom:`1px solid ${a.colors.border}`},children:e.jsx(T,{placeholder:"Search caches...",leftSection:e.jsx(C,{size:14}),size:"xs",value:f,onChange:i=>b(i.target.value)})}),e.jsx(S,{style:{flex:1},children:y.map(i=>e.jsxs(x,{children:[e.jsx(r,{size:"xs",fw:600,c:"dimmed",px:"sm",py:"xs",style:{backgroundColor:a.colors.background,borderBottom:`1px solid ${a.colors.border}`,textTransform:"uppercase",letterSpacing:"0.05em"},children:i}),h[i].map(o=>{const d=l?.name===o.name,m=$(o.provider);return e.jsxs(t,{align:"center",gap:"xs",px:"sm",py:6,onClick:()=>p(o),style:{cursor:"pointer",backgroundColor:d?`${m}15`:void 0,borderLeft:d?`2px solid ${m}`:"2px solid transparent",borderBottom:`1px solid ${a.colors.border}`,opacity:o.disabled?.5:1},children:[e.jsx(v,{size:14,opacity:.5}),e.jsx(r,{size:"sm",style:{flex:1},truncate:!0,children:o.name}),o.disabled&&e.jsx(u,{size:"xs",variant:"light",color:"gray",children:"off"})]},o.name)})]},i))})]})},N=({cache:s})=>e.jsx(S,{h:"100%",p:"md",children:e.jsxs(g,{gap:"lg",children:[e.jsxs(x,{children:[e.jsx(r,{size:"sm",fw:600,mb:"xs",children:"Configuration"}),e.jsx(n,{striped:!0,highlightOnHover:!0,withTableBorder:!0,children:e.jsxs(n.Tbody,{children:[e.jsxs(n.Tr,{children:[e.jsx(n.Td,{w:150,children:e.jsx(r,{size:"sm",c:"dimmed",children:"Name"})}),e.jsx(n.Td,{children:e.jsx(r,{size:"sm",ff:"monospace",children:s.name})})]}),e.jsxs(n.Tr,{children:[e.jsx(n.Td,{children:e.jsx(r,{size:"sm",c:"dimmed",children:"Provider"})}),e.jsx(n.Td,{children:e.jsx(u,{size:"xs",variant:"light",color:s.provider==="redis"?"red":"green",children:s.provider})})]}),e.jsxs(n.Tr,{children:[e.jsx(n.Td,{children:e.jsx(r,{size:"sm",c:"dimmed",children:"TTL"})}),e.jsx(n.Td,{children:e.jsxs(t,{align:"center",gap:"xs",children:[e.jsx(O,{size:14,opacity:.5}),e.jsx(r,{size:"sm",ff:"monospace",children:D(s.ttl)})]})})]}),e.jsxs(n.Tr,{children:[e.jsx(n.Td,{children:e.jsx(r,{size:"sm",c:"dimmed",children:"Status"})}),e.jsx(n.Td,{children:e.jsx(u,{size:"xs",variant:"light",color:s.disabled?"gray":"green",children:s.disabled?"Disabled":"Enabled"})})]})]})})]}),e.jsxs(x,{children:[e.jsx(r,{size:"sm",fw:600,mb:"xs",children:"Actions"}),e.jsx(t,{gap:"sm",children:e.jsx(w,{label:"Clear all cached entries (coming soon)",children:e.jsx(A,{size:"xs",variant:"light",color:"red",leftSection:e.jsx(I,{size:14}),disabled:!0,children:"Clear All"})})})]})]})}),F=({cache:s})=>{const[l,p]=c.useState("");return e.jsxs(t,{direction:"column",h:"100%",children:[e.jsx(x,{p:"sm",style:{borderBottom:`1px solid ${a.colors.border}`},children:e.jsxs(t,{gap:"sm",align:"center",children:[e.jsx(T,{placeholder:"Filter by pattern...",leftSection:e.jsx(C,{size:14}),size:"xs",value:l,onChange:f=>p(f.target.value),style:{flex:1}}),e.jsx(w,{label:"Invalidate matching keys (coming soon)",children:e.jsx(P,{size:"sm",variant:"light",color:"orange",disabled:!0,children:e.jsx(I,{size:14})})})]})}),e.jsx(t,{align:"center",justify:"center",style:{flex:1},c:"dimmed",children:e.jsxs(g,{align:"center",gap:"xs",children:[e.jsx(R,{size:48,opacity:.3}),e.jsx(r,{size:"sm",children:"Key browser coming soon"}),e.jsxs(r,{size:"xs",c:"dimmed",children:["Browse and manage cached keys for ",s.name]})]})})]})},H=({cache:s})=>{const l=$(s.provider);return e.jsxs(t,{direction:"column",h:"100%",children:[e.jsx(x,{px:"md",py:"sm",style:{borderBottom:`1px solid ${a.colors.border}`,backgroundColor:`${l}08`},children:e.jsxs(t,{align:"center",gap:"sm",children:[e.jsx(v,{size:18,opacity:.7}),e.jsx(r,{size:"md",fw:600,children:s.name}),e.jsx(u,{size:"xs",variant:"light",color:s.provider==="redis"?"red":"green",children:s.provider}),s.disabled&&e.jsx(u,{size:"xs",variant:"light",color:"gray",children:"disabled"})]})}),e.jsxs(j,{defaultValue:"config",style:{flex:1,display:"flex",flexDirection:"column"},children:[e.jsxs(j.List,{px:"md",children:[e.jsx(j.Tab,{value:"config",children:"Config"}),e.jsx(j.Tab,{value:"keys",children:"Keys"})]}),e.jsx(j.Panel,{value:"config",style:{flex:1,overflow:"hidden"},children:e.jsx(N,{cache:s})}),e.jsx(j.Panel,{value:"keys",style:{flex:1,overflow:"hidden"},children:e.jsx(F,{cache:s})})]})]})},V=()=>e.jsx(t,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(g,{align:"center",gap:"xs",children:[e.jsx(v,{size:48,opacity:.3}),e.jsx(r,{size:"sm",children:"Select a cache to view its configuration"})]})}),J=()=>e.jsx(t,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(g,{align:"center",gap:"xs",children:[e.jsx(M,{size:48,opacity:.3}),e.jsx(r,{children:"No caches found"}),e.jsx(r,{size:"sm",c:"dimmed",children:"Add caches using $cache primitive to see them here"})]})}),ee=()=>{const s=B(L),[l,p]=c.useState([]),[f,b]=c.useState(!0),[h,y]=c.useState(null),[i,o]=c.useState("");c.useEffect(()=>{s.fetch("/devtools/api/metadata",{schema:{response:E}}).then(m=>{p(m.data.caches),b(!1)})},[]);const d=c.useMemo(()=>{if(!i)return l;const m=i.toLowerCase();return l.filter(k=>k.name.toLowerCase().includes(m))},[l,i]);return f?e.jsx(t,{align:"center",justify:"center",h:"100%",children:e.jsx(r,{c:"dimmed",children:"Loading..."})}):l.length===0?e.jsx(J,{}):e.jsxs(t,{h:"100%",style:{overflow:"hidden"},children:[e.jsx(x,{w:240,style:{borderRight:`1px solid ${a.colors.border}`,backgroundColor:a.colors.surface},children:e.jsx(K,{caches:d,selectedCache:h,onSelectCache:y,search:i,onSearchChange:o})}),e.jsx(x,{style:{flex:1,overflow:"hidden"},children:h?e.jsx(H,{cache:h}):e.jsx(V,{})})]})};export{ee as DevCacheInspector,ee as default};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{x as z,a3 as C,a4 as k,r as h,j as e,F as x,T as r,B as a,J as p,af as L,A as V,ad as v,V as w,a9 as E,ae as B,ab as I,ac as M}from"./entry.Cgjh-xX-.js";import{d as $}from"./chunk.BIGcMrv-.js";import{S as y,B as b}from"./chunk.wg5XuK3_.js";import{C as T}from"./chunk.PcVF_qXP.js";import{T as t}from"./chunk.CFLl96SC.js";import{I as A}from"./chunk.CMTEfKUa.js";const N=[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]],O=z("outline","settings","Settings",N),H=s=>{const n=new Map;for(const l of s){const i=l.schema;if(i?.properties)for(const[o,c]of Object.entries(i.properties)){if(n.has(o))continue;const d=c,u=l.values[o];let g=d.type??"unknown",m=d.format;if(d.anyOf){const j=d.anyOf.find(f=>f.type!=="null");j&&(g=j.type??"unknown",m=j.format)}n.set(o,{name:o,value:u,type:g,description:d.description,format:m})}}return Array.from(n.values()).sort((l,i)=>l.name.localeCompare(i.name))},F=({variables:s,selectedVar:n,onSelectVar:l,search:i,onSearchChange:o})=>e.jsxs(y,{gap:0,h:"100%",children:[e.jsx(a,{p:"sm",style:{borderBottom:`1px solid ${p.colors.border}`},children:e.jsx(L,{placeholder:"Search variables...",leftSection:e.jsx(V,{size:14}),size:"xs",value:i,onChange:c=>o(c.target.value)})}),e.jsx(v,{style:{flex:1},children:e.jsxs(a,{children:[e.jsxs(r,{size:"xs",fw:600,c:"dimmed",px:"sm",py:"xs",style:{backgroundColor:p.colors.background,borderBottom:`1px solid ${p.colors.border}`,textTransform:"uppercase",letterSpacing:"0.05em"},children:["Variables (",s.length,")"]}),s.map(c=>{const d=n?.name===c.name;return e.jsxs(x,{align:"center",gap:"xs",px:"sm",py:6,onClick:()=>l(c),style:{cursor:"pointer",backgroundColor:d?"#228be615":void 0,borderLeft:d?"2px solid #228be6":"2px solid transparent",borderBottom:`1px solid ${p.colors.border}`},children:[e.jsx(w,{size:14,opacity:.5}),e.jsx(r,{size:"sm",style:{flex:1},truncate:!0,ff:"monospace",children:c.name})]},c.name)})]})})]}),R=({variable:s})=>{const n=s.value!==void 0&&s.value!=="",l=n?String(s.value):"(not set)",i=s.name.toLowerCase().includes("secret")||s.name.toLowerCase().includes("password")||s.name.toLowerCase().includes("key")||s.name.toLowerCase().includes("token");return e.jsxs(x,{direction:"column",h:"100%",children:[e.jsx(a,{px:"md",py:"sm",style:{borderBottom:`1px solid ${p.colors.border}`,backgroundColor:"#228be608"},children:e.jsxs(x,{align:"center",gap:"sm",children:[e.jsx(w,{size:18,opacity:.7}),e.jsx(r,{size:"md",fw:600,ff:"monospace",children:s.name}),e.jsx(b,{size:"xs",variant:"outline",color:"blue",children:s.format||s.type})]})}),e.jsx(v,{style:{flex:1},p:"md",children:e.jsxs(y,{gap:"lg",children:[s.description&&e.jsxs(a,{children:[e.jsx(r,{size:"sm",fw:600,mb:"xs",children:"Description"}),e.jsx(r,{size:"sm",c:"dimmed",children:s.description})]}),e.jsxs(a,{children:[e.jsx(r,{size:"sm",fw:600,mb:"xs",children:"Current Value"}),e.jsxs(x,{align:"center",gap:"sm",children:[e.jsx(T,{block:!0,style:{flex:1,filter:i&&n?"blur(4px)":void 0,transition:"filter 0.2s"},onMouseEnter:o=>{i&&(o.currentTarget.style.filter="none")},onMouseLeave:o=>{i&&n&&(o.currentTarget.style.filter="blur(4px)")},children:l}),n&&e.jsx(E,{value:String(s.value),children:({copied:o,copy:c})=>e.jsx(B,{label:o?"Copied!":"Copy value",children:e.jsx(a,{onClick:c,style:{cursor:"pointer"},c:o?"teal":"dimmed",children:o?e.jsx(I,{size:16}):e.jsx(M,{size:16})})})})]}),i&&e.jsx(r,{size:"xs",c:"dimmed",mt:"xs",children:"Hover to reveal sensitive value"})]}),e.jsxs(a,{children:[e.jsx(r,{size:"sm",fw:600,mb:"xs",children:"Schema"}),e.jsx(t,{striped:!0,highlightOnHover:!0,withTableBorder:!0,children:e.jsxs(t.Tbody,{children:[e.jsxs(t.Tr,{children:[e.jsx(t.Td,{w:120,children:e.jsx(r,{size:"sm",c:"dimmed",children:"Type"})}),e.jsx(t.Td,{children:e.jsx(r,{size:"sm",ff:"monospace",children:s.type})})]}),s.format&&e.jsxs(t.Tr,{children:[e.jsx(t.Td,{children:e.jsx(r,{size:"sm",c:"dimmed",children:"Format"})}),e.jsx(t.Td,{children:e.jsx(r,{size:"sm",ff:"monospace",children:s.format})})]})]})})]}),e.jsxs(a,{children:[e.jsx(r,{size:"sm",fw:600,mb:"xs",children:"Usage"}),e.jsx(T,{block:!0,children:`# Set in .env file or environment
|
|
2
|
+
${s.name}=${n?s.value:"<value>"}`})]})]})})]})},D=()=>e.jsx(x,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(y,{align:"center",gap:"xs",children:[e.jsx(O,{size:48,opacity:.3}),e.jsx(r,{children:"No environment variables found"}),e.jsx(r,{size:"sm",c:"dimmed",children:"Use $env primitive to define expected environment variables"})]})}),U=({variables:s})=>e.jsx(v,{h:"100%",p:"md",children:e.jsx(y,{gap:"lg",children:e.jsxs(a,{children:[e.jsxs(x,{align:"center",gap:"xs",mb:"sm",children:[e.jsx(A,{size:18,opacity:.7}),e.jsx(r,{size:"md",fw:600,children:"All Environment Variables"}),e.jsxs(b,{size:"sm",variant:"light",children:[s.length," variables"]})]}),e.jsxs(t,{striped:!0,highlightOnHover:!0,withTableBorder:!0,children:[e.jsx(t.Thead,{children:e.jsxs(t.Tr,{children:[e.jsx(t.Th,{children:"Name"}),e.jsx(t.Th,{children:"Type"}),e.jsx(t.Th,{children:"Value"})]})}),e.jsx(t.Tbody,{children:s.map(n=>{const l=n.value!==void 0&&n.value!=="",i=n.name.toLowerCase().includes("secret")||n.name.toLowerCase().includes("password")||n.name.toLowerCase().includes("key")||n.name.toLowerCase().includes("token");return e.jsxs(t.Tr,{children:[e.jsx(t.Td,{children:e.jsx(r,{size:"sm",ff:"monospace",fw:500,children:n.name})}),e.jsx(t.Td,{children:e.jsx(b,{size:"xs",variant:"outline",color:"blue",children:n.format||n.type})}),e.jsx(t.Td,{children:l?e.jsxs(r,{size:"sm",ff:"monospace",c:"dimmed",style:{filter:i?"blur(4px)":void 0},children:[String(n.value).slice(0,30),String(n.value).length>30?"...":""]}):e.jsx(r,{size:"sm",c:"dimmed",fs:"italic",children:"(not set)"})})]},n.name)})})]})]})})}),Q=()=>{const s=C(k),[n,l]=h.useState([]),[i,o]=h.useState(!0),[c,d]=h.useState(null),[u,g]=h.useState("");h.useEffect(()=>{s.fetch("/devtools/api/metadata",{schema:{response:$}}).then(f=>{l(f.data.envs),o(!1)})},[]);const m=h.useMemo(()=>H(n),[n]),j=h.useMemo(()=>{if(!u)return m;const f=u.toLowerCase();return m.filter(S=>S.name.toLowerCase().includes(f))},[m,u]);return i?e.jsx(x,{align:"center",justify:"center",h:"100%",children:e.jsx(r,{c:"dimmed",children:"Loading..."})}):m.length===0?e.jsx(D,{}):e.jsxs(x,{h:"100%",style:{overflow:"hidden"},children:[e.jsx(a,{w:280,style:{borderRight:`1px solid ${p.colors.border}`,backgroundColor:p.colors.surface},children:e.jsx(F,{variables:j,selectedVar:c,onSelectVar:d,search:u,onSearchChange:g})}),e.jsx(a,{style:{flex:1,overflow:"hidden"},children:c?e.jsx(R,{variable:c}):e.jsx(U,{variables:m})})]})};export{Q as DevEnvExplorer,Q as default};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as q,f as w,b as C,j as u,B as R,i as F,aj as H,U as G,
|
|
1
|
+
import{c as q,f as w,b as C,j as u,B as R,i as F,aj as H,U as G,w as z,q as J,$ as Q,o as X,t as Y,ak as Z,al as tt,a0 as et}from"./entry.Cgjh-xX-.js";import{c as at}from"./chunk.BlqFPyLh.js";function E(s,o){return a=>{if(typeof a!="string"||a.trim().length===0)throw new Error(o);return`${s}-${a}`}}const[st,K]=q("Tabs component was not found in the tree");var g={root:"m_89d60db1","list--default":"m_576c9d4",list:"m_89d33d6d",tab:"m_4ec4dce6",panel:"m_b0c91715",tabSection:"m_fc420b1f",tabLabel:"m_42bbd1ae","tab--default":"m_539e827b","list--outline":"m_6772fbd5","tab--outline":"m_b59ab47c","tab--pills":"m_c3381914"};const D=w((s,o)=>{const a=C("TabsList",null,s),{children:l,className:c,grow:r,justify:i,classNames:n,styles:m,style:p,mod:d,...b}=a,e=K();return u.jsx(R,{...b,...e.getStyles("list",{className:c,style:p,classNames:n,styles:m,props:a,variant:e.variant}),ref:o,role:"tablist",variant:e.variant,mod:[{grow:r,orientation:e.orientation,placement:e.orientation==="vertical"&&e.placement,inverted:e.inverted},d],"aria-orientation":e.orientation,__vars:{"--tabs-justify":i},children:l})});D.classes=g;D.displayName="@mantine/core/TabsList";const M=w((s,o)=>{const a=C("TabsPanel",null,s),{children:l,className:c,value:r,classNames:i,styles:n,style:m,mod:p,keepMounted:d,...b}=a,e=K(),v=e.value===r,y=e.keepMounted||d||v?l:null;return u.jsx(R,{...e.getStyles("panel",{className:c,classNames:i,styles:n,style:[m,v?void 0:{display:"none"}],props:a}),ref:o,mod:[{orientation:e.orientation},p],role:"tabpanel",id:e.getPanelId(r),"aria-labelledby":e.getTabId(r),...b,children:y})});M.classes=g;M.displayName="@mantine/core/TabsPanel";const V=w((s,o)=>{const a=C("TabsTab",null,s),{className:l,children:c,rightSection:r,leftSection:i,value:n,onClick:m,onKeyDown:p,disabled:d,color:b,style:e,classNames:v,styles:y,vars:N,mod:x,tabIndex:S,...P}=a,I=F(),{dir:_}=H(),t=K(),T=n===t.value,k=L=>{t.onChange(t.allowTabDeactivation&&n===t.value?null:n),m?.(L)},h={classNames:v,styles:y,props:a};return u.jsxs(G,{...t.getStyles("tab",{className:l,style:e,variant:t.variant,...h}),disabled:d,unstyled:t.unstyled,variant:t.variant,mod:[{active:T,disabled:d,orientation:t.orientation,inverted:t.inverted,placement:t.orientation==="vertical"&&t.placement},x],ref:o,role:"tab",id:t.getTabId(n),"aria-selected":T,tabIndex:S!==void 0?S:T||t.value===null?0:-1,"aria-controls":t.getPanelId(n),onClick:k,__vars:{"--tabs-color":b?z(b,I):void 0},onKeyDown:at({siblingSelector:'[role="tab"]',parentSelector:'[role="tablist"]',activateOnFocus:t.activateTabWithKeyboard,loop:t.loop,orientation:t.orientation||"horizontal",dir:_,onKeyDown:p}),...P,children:[i&&u.jsx("span",{...t.getStyles("tabSection",h),"data-position":"left",children:i}),c&&u.jsx("span",{...t.getStyles("tabLabel",h),children:c}),r&&u.jsx("span",{...t.getStyles("tabSection",h),"data-position":"right",children:r})]})});V.classes=g;V.displayName="@mantine/core/TabsTab";const U="Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value",nt={keepMounted:!0,orientation:"horizontal",loop:!0,activateTabWithKeyboard:!0,variant:"default",placement:"left"},ot=Y((s,{radius:o,color:a,autoContrast:l})=>({root:{"--tabs-radius":et(o),"--tabs-color":z(a,s),"--tabs-text-color":Z(l,s)?tt({color:a,theme:s,autoContrast:l}):void 0}})),f=w((s,o)=>{const a=C("Tabs",nt,s),{defaultValue:l,value:c,onChange:r,orientation:i,children:n,loop:m,id:p,activateTabWithKeyboard:d,allowTabDeactivation:b,variant:e,color:v,radius:y,inverted:N,placement:x,keepMounted:S,classNames:P,styles:I,unstyled:_,className:t,style:T,vars:k,autoContrast:h,mod:L,attributes:A,...B}=a,j=J(p),[W,O]=Q({value:c,defaultValue:l,finalValue:null,onChange:r}),$=X({name:"Tabs",props:a,classes:g,className:t,style:T,classNames:P,styles:I,unstyled:_,attributes:A,vars:k,varsResolver:ot});return u.jsx(st,{value:{placement:x,value:W,orientation:i,id:j,loop:m,activateTabWithKeyboard:d,getTabId:E(`${j}-tab`,U),getPanelId:E(`${j}-panel`,U),onChange:O,allowTabDeactivation:b,variant:e,color:v,radius:y,inverted:N,keepMounted:S,unstyled:_,getStyles:$},children:u.jsx(R,{ref:o,id:j,variant:e,mod:[{orientation:i,inverted:i==="horizontal"&&N,placement:i==="vertical"&&x},L],...$("root"),...B,children:n})})});f.classes=g;f.displayName="@mantine/core/Tabs";f.Tab=V;f.Panel=M;f.List=D;export{f as T,E as g};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as h,j as i,B as W,f as oe,b as ae,o as ce,ah as le,t as ie,g as ue,T as A,a5 as de,G as fe,H as he,aa as pe,ab as me,ac as ye,ai as ve,F as ge,J as xe}from"./entry.Cgjh-xX-.js";import{f as L}from"./chunk.BlqFPyLh.js";import{u as ke}from"./chunk.DOiJ5r3P.js";function Y(e){const r=new Map;return(...n)=>{const t=JSON.stringify(n);if(r.has(t))return r.get(t);const s=e(...n);return r.set(t,s),s}}var Z={root:"m_f698e191",subtree:"m_75f3ecf",node:"m_f6970eb1",label:"m_dc283425"};function q(e,r,n){if(!e||!r)return[];const t=n.indexOf(e),s=n.indexOf(r),c=Math.min(t,s),d=Math.max(t,s);return n.slice(c,d+1)}function H({node:e,getStyles:r,rootIndex:n,controller:t,expandOnClick:s,selectOnClick:c,isSubtree:d,level:p=1,renderNode:g,flatValues:f,allowRangeSelection:m,expandOnSpace:x,checkOnSpace:b}){const u=h.useRef(null),y=(e.children||[]).map(o=>i.jsx(H,{node:o,flatValues:f,getStyles:r,rootIndex:void 0,level:p+1,controller:t,expandOnClick:s,isSubtree:!0,renderNode:g,selectOnClick:c,allowRangeSelection:m,expandOnSpace:x,checkOnSpace:b},o.value)),v=o=>{if(o.nativeEvent.code==="ArrowRight"&&(o.stopPropagation(),o.preventDefault(),t.expandedState[e.value]?o.currentTarget.querySelector("[role=treeitem]")?.focus():t.expand(e.value)),o.nativeEvent.code==="ArrowLeft"&&(o.stopPropagation(),o.preventDefault(),t.expandedState[e.value]&&(e.children||[]).length>0?t.collapse(e.value):d&&L(o.currentTarget,"[role=treeitem]")?.focus()),o.nativeEvent.code==="ArrowDown"||o.nativeEvent.code==="ArrowUp"){const w=L(o.currentTarget,"[data-tree-root]");if(!w)return;o.stopPropagation(),o.preventDefault();const T=Array.from(w.querySelectorAll("[role=treeitem]")),O=T.indexOf(o.currentTarget);if(O===-1)return;const I=o.nativeEvent.code==="ArrowDown"?O+1:O-1;if(T[I]?.focus(),o.shiftKey){const E=T[I];E&&t.setSelectedState(q(t.anchorNode,E.dataset.value,f))}}o.nativeEvent.code==="Space"&&(x&&(o.stopPropagation(),o.preventDefault(),t.toggleExpanded(e.value)),b&&(o.stopPropagation(),o.preventDefault(),t.isNodeChecked(e.value)?t.uncheckNode(e.value):t.checkNode(e.value)))},N=o=>{o.stopPropagation(),m&&o.shiftKey&&t.anchorNode?(t.setSelectedState(q(t.anchorNode,e.value,f)),u.current?.focus()):(s&&t.toggleExpanded(e.value),c&&t.select(e.value),u.current?.focus())},C=t.selectedState.includes(e.value),S={...r("label"),onClick:N,"data-selected":C||void 0,"data-value":e.value,"data-hovered":t.hoveredNode===e.value||void 0};return i.jsxs("li",{...r("node",{style:{"--label-offset":`calc(var(--level-offset) * ${p-1})`}}),role:"treeitem","aria-selected":C,"data-value":e.value,"data-selected":C||void 0,"data-hovered":t.hoveredNode===e.value||void 0,"data-level":p,tabIndex:n===0?0:-1,onKeyDown:v,ref:u,onMouseOver:o=>{o.stopPropagation(),t.setHoveredNode(e.value)},onMouseLeave:o=>{o.stopPropagation(),t.setHoveredNode(null)},children:[typeof g=="function"?g({node:e,level:p,selected:C,tree:t,expanded:t.expandedState[e.value]||!1,hasChildren:Array.isArray(e.children)&&e.children.length>0,elementProps:S}):i.jsx("div",{...S,children:e.label}),t.expandedState[e.value]&&y.length>0&&i.jsx(W,{component:"ul",role:"group",...r("subtree"),"data-level":p,children:y})]})}H.displayName="@mantine/core/TreeNode";function M(e,r,n=[]){const t=[];for(const s of e)if(Array.isArray(s.children)&&s.children.length>0){const c=M(s.children,r,n);if(c.currentTreeChecked.length===s.children.length){const d=c.currentTreeChecked.every(g=>g.checked),p={checked:d,indeterminate:!d,value:s.value,hasChildren:!0};t.push(p),n.push(p)}else if(c.currentTreeChecked.length>0){const d={checked:!1,indeterminate:!0,value:s.value,hasChildren:!0};t.push(d),n.push(d)}}else if(r.includes(s.value)){const c={checked:!0,indeterminate:!1,value:s.value,hasChildren:!1};t.push(c),n.push(c)}return{result:n,currentTreeChecked:t}}function X(e,r){for(const n of r){if(n.value===e)return n;if(Array.isArray(n.children)){const t=X(e,n.children);if(t)return t}}return null}function P(e,r,n=[]){const t=X(e,r);return t?!Array.isArray(t.children)||t.children.length===0?[t.value]:(t.children.forEach(s=>{Array.isArray(s.children)&&s.children.length>0?P(s.value,r,n):n.push(s.value)}),n):n}function Q(e){return e.reduce((r,n)=>(Array.isArray(n.children)&&n.children.length>0?r.push(...Q(n.children)):r.push(n.value),r),[])}function be(e,r,n){return n.length===0?!1:n.includes(e)?!0:M(r,n).result.some(s=>s.value===e&&s.checked)}const Ne=Y(be);function je(e,r,n){return n.length===0?!1:M(r,n).result.some(s=>s.value===e&&s.indeterminate)}const Ce=Y(je);function _(e,r,n,t={}){return r.forEach(s=>{t[s.value]=s.value in e?e[s.value]:s.value===n,Array.isArray(s.children)&&_(e,s.children,n,t)}),t}function B(e,r){const n=_({},e,[]);return r==="*"?Object.keys(n).reduce((t,s)=>({...t,[s]:!0}),{}):(r.forEach(t=>{n[t]=!0}),n)}function Se(e,r){const n=[];return e.forEach(t=>n.push(...P(t,r))),Array.from(new Set(n))}function z({initialSelectedState:e=[],initialCheckedState:r=[],initialExpandedState:n={},multiple:t=!1,onNodeCollapse:s,onNodeExpand:c}={}){const[d,p]=h.useState([]),[g,f]=h.useState(n),[m,x]=h.useState(e),[b,u]=h.useState(r),[y,v]=h.useState(null),[N,C]=h.useState(null),S=h.useCallback(a=>{f(l=>_(l,a,m)),u(l=>Se(l,a)),p(a)},[m,b]),o=h.useCallback(a=>{f(l=>{const j={...l,[a]:!l[a]};return j[a]?c?.(a):s?.(a),j})},[s,c]),w=h.useCallback(a=>{f(l=>(l[a]!==!1&&s?.(a),{...l,[a]:!1}))},[s]),T=h.useCallback(a=>{f(l=>(l[a]!==!0&&c?.(a),{...l,[a]:!0}))},[c]),O=h.useCallback(()=>{f(a=>{const l={...a};return Object.keys(l).forEach(j=>{l[j]=!0}),l})},[]),I=h.useCallback(()=>{f(a=>{const l={...a};return Object.keys(l).forEach(j=>{l[j]=!1}),l})},[]),E=h.useCallback(a=>x(l=>t?l.includes(a)?(v(null),l.filter(j=>j!==a)):(v(a),[...l,a]):l.includes(a)?(v(null),[]):(v(a),[a])),[]),V=h.useCallback(a=>{v(a),x(l=>t?l.includes(a)?l:[...l,a]:[a])},[]),$=h.useCallback(a=>{y===a&&v(null),x(l=>l.filter(j=>j!==a))},[]),J=h.useCallback(()=>{x([]),v(null)},[]),R=h.useCallback(a=>{const l=P(a,d);u(j=>Array.from(new Set([...j,...l])))},[d]),D=h.useCallback(a=>{const l=P(a,d);u(j=>j.filter(se=>!l.includes(se)))},[d]),ne=h.useCallback(()=>{u(()=>Q(d))},[d]),re=h.useCallback(()=>{u([])},[]);return{multiple:t,expandedState:g,selectedState:m,checkedState:b,anchorNode:y,initialize:S,toggleExpanded:o,collapse:w,expand:T,expandAllNodes:O,collapseAllNodes:I,setExpandedState:f,checkNode:R,uncheckNode:D,checkAllNodes:ne,uncheckAllNodes:re,setCheckedState:u,toggleSelected:E,select:V,deselect:$,clearSelected:J,setSelectedState:x,hoveredNode:N,setHoveredNode:C,getCheckedNodes:()=>M(d,b).result,isNodeChecked:a=>Ne(a,d,b),isNodeIndeterminate:a=>Ce(a,d,b)}}function ee(e){return e.reduce((r,n)=>(r.push(n.value),n.children&&r.push(...ee(n.children)),r),[])}const Ae={expandOnClick:!0,allowRangeSelection:!0,expandOnSpace:!0},we=ie((e,{levelOffset:r})=>({root:{"--level-offset":ue(r)}})),G=oe((e,r)=>{const n=ae("Tree",Ae,e),{classNames:t,className:s,style:c,styles:d,unstyled:p,vars:g,data:f,expandOnClick:m,tree:x,renderNode:b,selectOnClick:u,clearSelectionOnOutsideClick:y,allowRangeSelection:v,expandOnSpace:N,levelOffset:C,checkOnSpace:S,attributes:o,...w}=n,T=z(),O=x||T,I=ce({name:"Tree",classes:Z,props:n,className:s,style:c,classNames:t,styles:d,unstyled:p,attributes:o,vars:g,varsResolver:we}),E=ke(()=>y&&O.clearSelected()),V=le(r,E),$=h.useMemo(()=>ee(f),[f]);h.useEffect(()=>{O.initialize(f)},[f]);const J=f.map((R,D)=>i.jsx(H,{node:R,getStyles:I,rootIndex:D,expandOnClick:m,selectOnClick:u,controller:O,renderNode:b,flatValues:$,allowRangeSelection:v,expandOnSpace:N,checkOnSpace:S},R.value));return i.jsx(W,{component:"ul",ref:V,...I("root"),...w,role:"tree","aria-multiselectable":O.multiple,"data-tree-root":!0,children:J})});G.displayName="@mantine/core/Tree";G.classes=Z;const U={xs:{icon:14,levelOffset:16},sm:{icon:16,levelOffset:20},md:{icon:18,levelOffset:24},lg:{icon:20,levelOffset:28},xl:{icon:22,levelOffset:32}},k={root:{fontFamily:"var(--mantine-font-family-monospace)"},chevron:{flexShrink:0,color:"var(--mantine-color-dimmed)"},key:{color:"var(--mantine-color-cyan-text)",fontWeight:500},colon:{color:"var(--mantine-color-dimmed)"},string:{color:"var(--mantine-color-teal-text)"},number:{color:"var(--mantine-color-blue-text)"},boolean:{color:"var(--mantine-color-violet-text)"},null:{color:"var(--mantine-color-dimmed)",fontStyle:"italic"},preview:{color:"var(--mantine-color-dimmed)"}},K=e=>e===null?"null":e===void 0?"undefined":Array.isArray(e)?"array":typeof e;function F(e,r=[],n,t=!1,s=10){const c=n!==void 0?[...r,n]:r,d=c.length>0?c.join("."):"root";if(c.length>s)return{value:d,label:n??"",nodeValue:e,nodeKey:n,path:c,isArrayItem:t};const p=K(e);if(p==="object"||p==="array"){const f=(p==="array"?e.map((m,x)=>[String(x),m]):Object.entries(e)).map(([m,x])=>F(x,c,m,p==="array",s)).filter(m=>m!==null);return{value:d,label:n??"",nodeValue:e,nodeKey:n,path:c,isArrayItem:t,children:f.length>0?f:void 0}}return{value:d,label:n??"",nodeValue:e,nodeKey:n,path:c,isArrayItem:t}}function te(e,r,n=0){if(n>=r)return[];const t=[];for(const s of e)s.children&&(t.push(s.value),t.push(...te(s.children,r,n+1)));return t}const Oe=({value:e,iconSize:r})=>{const[n,t]=h.useState(!1),s=h.useCallback(c=>{c.stopPropagation(),navigator.clipboard.writeText(e),t(!0),setTimeout(()=>t(!1),1500)},[e]);return i.jsx(pe,{size:r+4,variant:"transparent",c:n?"green":"dimmed",onClick:s,className:"alepha-json-viewer-copy",children:n?i.jsx(me,{size:r}):i.jsx(ye,{size:r})})},Te=({node:e,expanded:r,hasChildren:n,elementProps:t,size:s,config:c,showQuotes:d,showCopyButton:p,renderValue:g})=>{const{nodeValue:f,nodeKey:m,path:x,isArrayItem:b,isRoot:u}=e,y=K(f),v=y==="object"||y==="array",N=()=>{if(!v)return null;const o=(y==="array"?f:Object.keys(f)).length,w=y==="array"?"item":"key";return r?null:i.jsx(A,{fs:"italic",component:"span",size:s,style:k.preview,children:o===0?y==="array"?"[]":"{}":y==="array"?`[ ${o} ${o===1?w:`${w}s`} ]`:`{ ${o} ${o===1?w:`${w}s`} }`})},C=()=>v?JSON.stringify(f,null,2):String(f??"");return i.jsxs(de,{gap:6,wrap:"nowrap",...t,className:`alepha-json-viewer-row ${t.className||""}`,children:[n?r?i.jsx(fe,{size:c.icon,style:k.chevron}):i.jsx(he,{size:c.icon,style:k.chevron}):i.jsx("span",{style:{width:c.icon,flexShrink:0}}),m!==void 0&&!b&&i.jsxs(A,{component:"span",size:s,children:[i.jsx("span",{style:k.key,children:d?`"${m}"`:m}),i.jsx("span",{style:k.colon,children:":"})]}),m!==void 0&&b&&i.jsxs(A,{component:"span",size:s,children:[i.jsx("span",{style:k.key,children:m}),i.jsx("span",{style:k.colon,children:":"})]}),n?N():v?y==="array"?i.jsx(A,{component:"span",size:s,style:k.preview,children:"[]"}):i.jsx(A,{component:"span",size:s,style:k.preview,children:"{}"}):g(f,m,x),p&&i.jsx(Oe,{value:C(),iconSize:c.icon})]})},Ie=({data:e,defaultExpandedDepth:r=2,maxDepth:n=10,size:t="sm",showQuotes:s=!1,showCopyButton:c=!0,formatValue:d})=>{const p=U[t]||U.sm,g=h.useMemo(()=>{const u=K(e);if(u==="object"||u==="array"){const N=(u==="array"?e.map((S,o)=>[String(o),S]):Object.entries(e)).map(([S,o])=>F(o,[],S,u==="array",n)).filter(S=>S!==null);return[{value:"root",label:"",nodeValue:e,nodeKey:void 0,path:[],isArrayItem:!1,isRoot:!0,children:N.length>0?N:void 0}]}const y=F(e,[],void 0,!1,n);return y?[y]:[]},[e,n]),f=h.useMemo(()=>{if(r===0)return{};if(r===1/0)return B(g,"*");const u=te(g,r+1);return B(g,u)},[g,r]),m=z({initialExpandedState:f}),x=h.useCallback((u,y,v)=>{const N=d?.(y,u,v);if(N!==void 0)return i.jsx(A,{component:"span",size:t,style:k.string,className:"alepha-json-viewer-value",title:String(u),children:N});const C=K(u);switch(C){case"string":return i.jsxs(A,{style:k.string,component:"span",size:t,className:"alepha-json-viewer-value",title:u,children:['"',u,'"']});case"number":return i.jsx(A,{component:"span",size:t,style:k.number,children:u});case"boolean":return i.jsx(A,{component:"span",size:t,style:k.boolean,children:String(u)});case"null":case"undefined":return i.jsx(A,{component:"span",size:t,style:k.null,children:C});default:return i.jsx(A,{component:"span",size:t,children:String(u)})}},[d,s,t]),b=h.useCallback(({node:u,expanded:y,hasChildren:v,elementProps:N})=>i.jsx(Te,{node:u,expanded:y,hasChildren:v,elementProps:N,size:t,config:p,showQuotes:s,showCopyButton:c,renderValue:x}),[p,x,c,s,t]);return g.length===0?i.jsx(A,{size:t,style:k.null,children:e===null?"null":e===void 0?"undefined":"{}"}):i.jsx(G,{data:g,tree:m,levelOffset:p.levelOffset,expandOnClick:!0,renderNode:b,styles:{root:k.root}})};ve.prototype.json=function(e,r){this.open({size:"lg",title:r?.title||"Json Viewer",...r,content:i.jsx(ge,{bdrs:"md",w:"100%",flex:1,p:"sm",bg:xe.colors.surface,children:i.jsx(Ie,{size:"xs",data:e})})})};export{Ie as J};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{w as C,a3 as O,a4 as R,r as x,j as e,F as m,T as i,B as c,H as j,af as D,z as B,ad as z,O as S,E as F,G as _,ae as v,a6 as $,aa as I}from"./entry.BWhdC3SJ.js";import{J as w}from"./chunk.bPNpu2iW.js";import{d as A}from"./chunk.BKZ6YEV4.js";import{S as f,B as T}from"./chunk.BqEqrty9.js";import{I as H}from"./chunk.D0jFBu2p.js";import{T as g}from"./chunk.CQO49DQF.js";import{I as J}from"./chunk.CIYikik4.js";import{I as V,a as G}from"./chunk.BjOMCPQ3.js";import{T as q}from"./chunk._t5z0lP9.js";import"./chunk.BlqFPyLh.js";import"./chunk.BX7p74D8.js";import"./chunk.uyVen0u2.js";const K=[["path",{d:"M5 19l2.757 -7.351a1 1 0 0 1 .936 -.649h12.307a1 1 0 0 1 .986 1.164l-.996 5.211a2 2 0 0 1 -1.964 1.625h-14.026a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l3 3h7a2 2 0 0 1 2 2v2",key:"svg-0"}]],Q=C("outline","folder-open","FolderOpen",K);const U=[["path",{d:"M5 4h4l3 3h7a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2",key:"svg-0"}]],W=C("outline","folder","Folder",U);const X=[["path",{d:"M10 14l11 -11",key:"svg-0"}],["path",{d:"M21 3l-6.5 18a.55 .55 0 0 1 -1 0l-3.5 -7l-7 -3.5a.55 .55 0 0 1 0 -1l18 -6.5",key:"svg-1"}]],L=C("outline","send","Send",X),M={memory:"#69db7c",redis:"#ff6b6b",default:"#495057"},E=s=>M[s]??M.default,Y=s=>{const o={name:"",fullPath:"",children:new Map};for(const p of s){const a=p.name.split(/[./]/);let l=o;for(let n=0;n<a.length;n++){const r=a[n],d=a.slice(0,n+1).join("/");l.children.has(r)||l.children.set(r,{name:r,fullPath:d,children:new Map}),l=l.children.get(r)}l.topic=p}return o},N=({node:s,depth:o,selectedTopic:p,onSelectTopic:a,expandedNodes:l,onToggleExpand:n})=>{const r=s.children.size>0,d=l.has(s.fullPath),b=s.topic&&p?.name===s.topic.name,t=s.topic?E(s.topic.provider):"#495057",u=()=>{s.topic&&a(s.topic),r&&n(s.fullPath)};return e.jsxs(c,{children:[e.jsxs(m,{align:"center",gap:4,px:"sm",py:4,onClick:u,style:{cursor:"pointer",paddingLeft:o*16+8,backgroundColor:b?`${t}15`:void 0,borderLeft:b?`2px solid ${t}`:"2px solid transparent",borderBottom:`1px solid ${j.colors.border}`},children:[r?d?e.jsx(F,{size:12,opacity:.5}):e.jsx(_,{size:12,opacity:.5}):e.jsx(c,{w:12}),r?d?e.jsx(Q,{size:14,opacity:.5}):e.jsx(W,{size:14,opacity:.5}):e.jsx(S,{size:14,opacity:.5}),e.jsx(i,{size:"sm",style:{flex:1},truncate:!0,fw:s.topic?500:400,children:s.name}),s.topic&&e.jsx(T,{size:"xs",variant:"light",color:s.topic.provider==="redis"?"red":"green",children:s.topic.provider})]}),r&&d&&e.jsx(c,{children:Array.from(s.children.values()).sort((h,y)=>{const P=h.children.size>0,k=y.children.size>0;return P&&!k?-1:!P&&k?1:h.name.localeCompare(y.name)}).map(h=>e.jsx(N,{node:h,depth:o+1,selectedTopic:p,onSelectTopic:a,expandedNodes:l,onToggleExpand:n},h.fullPath))})]})},Z=({topics:s,selectedTopic:o,onSelectTopic:p,search:a,onSearchChange:l})=>{const[n,r]=x.useState(new Set),d=x.useMemo(()=>Y(s),[s]);x.useEffect(()=>{const t=new Set,u=h=>{h.fullPath&&t.add(h.fullPath);for(const y of h.children.values())u(y)};u(d),r(t)},[d]);const b=x.useCallback(t=>{r(u=>{const h=new Set(u);return h.has(t)?h.delete(t):h.add(t),h})},[]);return e.jsxs(f,{gap:0,h:"100%",children:[e.jsx(c,{p:"sm",style:{borderBottom:`1px solid ${j.colors.border}`},children:e.jsx(D,{placeholder:"Search topics...",leftSection:e.jsx(B,{size:14}),size:"xs",value:a,onChange:t=>l(t.target.value)})}),e.jsx(z,{style:{flex:1},children:Array.from(d.children.values()).sort((t,u)=>t.name.localeCompare(u.name)).map(t=>e.jsx(N,{node:t,depth:0,selectedTopic:o,onSelectTopic:p,expandedNodes:n,onToggleExpand:b},t.fullPath))})]})},ee=({topic:s})=>e.jsx(z,{h:"100%",p:"md",children:e.jsxs(f,{gap:"lg",children:[e.jsxs(c,{children:[e.jsx(i,{size:"sm",fw:600,mb:"xs",children:"Topic Info"}),e.jsxs(f,{gap:"xs",children:[e.jsxs(m,{gap:"sm",children:[e.jsx(i,{size:"sm",c:"dimmed",w:100,children:"Name"}),e.jsx(i,{size:"sm",ff:"monospace",children:s.name})]}),e.jsxs(m,{gap:"sm",children:[e.jsx(i,{size:"sm",c:"dimmed",w:100,children:"Provider"}),e.jsx(T,{size:"xs",variant:"light",color:s.provider==="redis"?"red":"green",children:s.provider})]}),s.description&&e.jsxs(m,{gap:"sm",children:[e.jsx(i,{size:"sm",c:"dimmed",w:100,children:"Description"}),e.jsx(i,{size:"sm",children:s.description})]})]})]}),s.schema&&e.jsxs(c,{children:[e.jsx(i,{size:"sm",fw:600,mb:"xs",children:"Message Schema"}),e.jsx(c,{p:"sm",style:{border:`1px solid ${j.colors.border}`,borderRadius:8,backgroundColor:j.colors.surface},children:e.jsx(w,{data:s.schema,maxDepth:5,size:"xs"})})]})]})}),se=({topic:s})=>{const[o,p]=x.useState([]),[a,l]=x.useState(!1),n=x.useCallback(()=>{const r=s.schema?{example:"data",topic:s.name,timestamp:new Date().toISOString()}:{message:`Hello from ${s.name}`};p(d=>[{id:Math.random().toString(36).slice(2),timestamp:new Date,payload:r},...d.slice(0,49)])},[s]);return e.jsxs(m,{direction:"column",h:"100%",children:[e.jsx(c,{p:"sm",style:{borderBottom:`1px solid ${j.colors.border}`},children:e.jsxs(m,{gap:"sm",align:"center",justify:"space-between",children:[e.jsxs(m,{gap:"sm",align:"center",children:[e.jsx(v,{label:a?"Stop listening (coming soon)":"Start listening (coming soon)",children:e.jsx($,{size:"xs",variant:"light",color:a?"red":"green",leftSection:e.jsx(J,{size:14}),onClick:()=>l(!a),disabled:!0,children:a?"Stop":"Listen"})}),e.jsxs(i,{size:"xs",c:"dimmed",children:[o.length," messages"]})]}),e.jsxs(m,{gap:"sm",children:[e.jsx(v,{label:"Add fake message (for demo)",children:e.jsx(I,{size:"sm",variant:"light",onClick:n,children:e.jsx(L,{size:14})})}),e.jsx(v,{label:"Clear messages",children:e.jsx(I,{size:"sm",variant:"light",color:"gray",onClick:()=>p([]),children:e.jsx(V,{size:14})})})]})]})}),o.length===0?e.jsx(m,{align:"center",justify:"center",style:{flex:1},c:"dimmed",children:e.jsxs(f,{align:"center",gap:"xs",children:[e.jsx(S,{size:48,opacity:.3}),e.jsx(i,{size:"sm",children:"No messages yet"}),e.jsx(i,{size:"xs",c:"dimmed",children:"Click the send icon to add a fake message for demo"})]})}):e.jsx(z,{style:{flex:1},children:e.jsx(f,{gap:0,children:o.map(r=>e.jsxs(c,{p:"sm",style:{borderBottom:`1px solid ${j.colors.border}`},children:[e.jsxs(m,{align:"center",gap:"xs",mb:"xs",children:[e.jsx(G,{size:12,opacity:.5}),e.jsx(i,{size:"xs",c:"dimmed",children:r.timestamp.toLocaleTimeString()})]}),e.jsx(c,{p:"xs",style:{backgroundColor:j.colors.surface,borderRadius:4},children:e.jsx(w,{data:r.payload,maxDepth:3,size:"xs"})})]},r.id))})})]})},re=({topic:s})=>{const[o,p]=x.useState(JSON.stringify({message:"Hello",timestamp:new Date().toISOString()},null,2)),[a,l]=x.useState(null),n=()=>{try{JSON.parse(o),l(null),alert(`Message would be published to "${s.name}" (coming soon)`)}catch{l("Invalid JSON")}};return e.jsx(z,{h:"100%",p:"md",children:e.jsxs(f,{gap:"md",children:[e.jsxs(c,{children:[e.jsx(i,{size:"sm",fw:600,mb:"xs",children:"Publish Message"}),e.jsx(i,{size:"xs",c:"dimmed",mb:"sm",children:"Send a test message to this topic (coming soon)"})]}),e.jsxs(c,{children:[e.jsx(i,{size:"sm",c:"dimmed",mb:"xs",children:"Payload (JSON)"}),e.jsx(q,{value:o,onChange:r=>p(r.target.value),minRows:8,maxRows:15,autosize:!0,ff:"monospace",size:"xs",error:a,styles:{input:{backgroundColor:j.colors.surface}}})]}),e.jsx(v,{label:"Publish message (coming soon)",children:e.jsx($,{size:"sm",variant:"light",leftSection:e.jsx(L,{size:16}),onClick:n,disabled:!0,children:"Publish"})}),s.schema&&e.jsxs(c,{children:[e.jsx(i,{size:"sm",c:"dimmed",mb:"xs",children:"Expected Schema"}),e.jsx(c,{p:"sm",style:{border:`1px solid ${j.colors.border}`,borderRadius:8,backgroundColor:j.colors.surface},children:e.jsx(w,{data:s.schema,maxDepth:3,size:"xs"})})]})]})})},ie=({topic:s})=>{const o=E(s.provider);return e.jsxs(m,{direction:"column",h:"100%",children:[e.jsxs(c,{px:"md",py:"sm",style:{borderBottom:`1px solid ${j.colors.border}`,backgroundColor:`${o}08`},children:[e.jsxs(m,{align:"center",gap:"sm",children:[e.jsx(S,{size:18,opacity:.7}),e.jsx(i,{size:"md",fw:600,ff:"monospace",children:s.name}),e.jsx(T,{size:"xs",variant:"light",color:s.provider==="redis"?"red":"green",children:s.provider})]}),s.description&&e.jsx(i,{size:"xs",c:"dimmed",mt:4,children:s.description})]}),e.jsxs(g,{defaultValue:"schema",style:{flex:1,display:"flex",flexDirection:"column"},children:[e.jsxs(g.List,{px:"md",children:[e.jsx(g.Tab,{value:"schema",children:"Schema"}),e.jsx(g.Tab,{value:"messages",children:"Messages"}),e.jsx(g.Tab,{value:"publish",children:"Publish"})]}),e.jsx(g.Panel,{value:"schema",style:{flex:1,overflow:"hidden"},children:e.jsx(ee,{topic:s})}),e.jsx(g.Panel,{value:"messages",style:{flex:1,overflow:"hidden"},children:e.jsx(se,{topic:s})}),e.jsx(g.Panel,{value:"publish",style:{flex:1,overflow:"hidden"},children:e.jsx(re,{topic:s})})]})]})},oe=()=>e.jsx(m,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(f,{align:"center",gap:"xs",children:[e.jsx(S,{size:48,opacity:.3}),e.jsx(i,{size:"sm",children:"Select a topic to view details"})]})}),te=()=>e.jsx(m,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(f,{align:"center",gap:"xs",children:[e.jsx(H,{size:48,opacity:.3}),e.jsx(i,{children:"No topics found"}),e.jsx(i,{size:"sm",c:"dimmed",children:"Add topics using $topic primitive to see them here"})]})}),fe=()=>{const s=O(R),[o,p]=x.useState([]),[a,l]=x.useState(!0),[n,r]=x.useState(null),[d,b]=x.useState("");x.useEffect(()=>{s.fetch("/devtools/api/metadata",{schema:{response:A}}).then(u=>{p(u.data.topics),l(!1)})},[]);const t=x.useMemo(()=>{if(!d)return o;const u=d.toLowerCase();return o.filter(h=>h.name.toLowerCase().includes(u))},[o,d]);return a?e.jsx(m,{align:"center",justify:"center",h:"100%",children:e.jsx(i,{c:"dimmed",children:"Loading..."})}):o.length===0?e.jsx(te,{}):e.jsxs(m,{h:"100%",style:{overflow:"hidden"},children:[e.jsx(c,{w:280,style:{borderRight:`1px solid ${j.colors.border}`,backgroundColor:j.colors.surface},children:e.jsx(Z,{topics:t,selectedTopic:n,onSelectTopic:r,search:d,onSearchChange:b})}),e.jsx(c,{style:{flex:1,overflow:"hidden"},children:n?e.jsx(ie,{topic:n}):e.jsx(oe,{})})]})};export{fe as DevTopicsViewer,fe as default};
|
|
1
|
+
import{x as C,a3 as D,a4 as E,r as x,j as e,F as m,T as i,B as c,J as j,af as O,A as B,ad as z,P as S,G as A,H as F,ae as v,a6 as $,aa as I}from"./entry.Cgjh-xX-.js";import{J as w}from"./chunk.l66LreXu.js";import{d as J}from"./chunk.BIGcMrv-.js";import{S as f,B as P}from"./chunk.wg5XuK3_.js";import{I as _}from"./chunk.DZFiDTv5.js";import{T as g}from"./chunk._D_TfCmJ.js";import{I as H}from"./chunk.BiIrl-Hq.js";import{I as V,a as G}from"./chunk.CoH_IYrv.js";import{T as q}from"./chunk.s1U1MhH3.js";import"./chunk.BlqFPyLh.js";import"./chunk.DOiJ5r3P.js";import"./chunk.uyVen0u2.js";const K=[["path",{d:"M5 19l2.757 -7.351a1 1 0 0 1 .936 -.649h12.307a1 1 0 0 1 .986 1.164l-.996 5.211a2 2 0 0 1 -1.964 1.625h-14.026a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l3 3h7a2 2 0 0 1 2 2v2",key:"svg-0"}]],Q=C("outline","folder-open","FolderOpen",K);const U=[["path",{d:"M5 4h4l3 3h7a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2",key:"svg-0"}]],W=C("outline","folder","Folder",U);const X=[["path",{d:"M10 14l11 -11",key:"svg-0"}],["path",{d:"M21 3l-6.5 18a.55 .55 0 0 1 -1 0l-3.5 -7l-7 -3.5a.55 .55 0 0 1 0 -1l18 -6.5",key:"svg-1"}]],L=C("outline","send","Send",X),M={memory:"#69db7c",redis:"#ff6b6b",default:"#495057"},N=s=>M[s]??M.default,Y=s=>{const o={name:"",fullPath:"",children:new Map};for(const p of s){const a=p.name.split(/[./]/);let l=o;for(let n=0;n<a.length;n++){const r=a[n],d=a.slice(0,n+1).join("/");l.children.has(r)||l.children.set(r,{name:r,fullPath:d,children:new Map}),l=l.children.get(r)}l.topic=p}return o},R=({node:s,depth:o,selectedTopic:p,onSelectTopic:a,expandedNodes:l,onToggleExpand:n})=>{const r=s.children.size>0,d=l.has(s.fullPath),b=s.topic&&p?.name===s.topic.name,t=s.topic?N(s.topic.provider):"#495057",u=()=>{s.topic&&a(s.topic),r&&n(s.fullPath)};return e.jsxs(c,{children:[e.jsxs(m,{align:"center",gap:4,px:"sm",py:4,onClick:u,style:{cursor:"pointer",paddingLeft:o*16+8,backgroundColor:b?`${t}15`:void 0,borderLeft:b?`2px solid ${t}`:"2px solid transparent",borderBottom:`1px solid ${j.colors.border}`},children:[r?d?e.jsx(A,{size:12,opacity:.5}):e.jsx(F,{size:12,opacity:.5}):e.jsx(c,{w:12}),r?d?e.jsx(Q,{size:14,opacity:.5}):e.jsx(W,{size:14,opacity:.5}):e.jsx(S,{size:14,opacity:.5}),e.jsx(i,{size:"sm",style:{flex:1},truncate:!0,fw:s.topic?500:400,children:s.name}),s.topic&&e.jsx(P,{size:"xs",variant:"light",color:s.topic.provider==="redis"?"red":"green",children:s.topic.provider})]}),r&&d&&e.jsx(c,{children:Array.from(s.children.values()).sort((h,y)=>{const T=h.children.size>0,k=y.children.size>0;return T&&!k?-1:!T&&k?1:h.name.localeCompare(y.name)}).map(h=>e.jsx(R,{node:h,depth:o+1,selectedTopic:p,onSelectTopic:a,expandedNodes:l,onToggleExpand:n},h.fullPath))})]})},Z=({topics:s,selectedTopic:o,onSelectTopic:p,search:a,onSearchChange:l})=>{const[n,r]=x.useState(new Set),d=x.useMemo(()=>Y(s),[s]);x.useEffect(()=>{const t=new Set,u=h=>{h.fullPath&&t.add(h.fullPath);for(const y of h.children.values())u(y)};u(d),r(t)},[d]);const b=x.useCallback(t=>{r(u=>{const h=new Set(u);return h.has(t)?h.delete(t):h.add(t),h})},[]);return e.jsxs(f,{gap:0,h:"100%",children:[e.jsx(c,{p:"sm",style:{borderBottom:`1px solid ${j.colors.border}`},children:e.jsx(O,{placeholder:"Search topics...",leftSection:e.jsx(B,{size:14}),size:"xs",value:a,onChange:t=>l(t.target.value)})}),e.jsx(z,{style:{flex:1},children:Array.from(d.children.values()).sort((t,u)=>t.name.localeCompare(u.name)).map(t=>e.jsx(R,{node:t,depth:0,selectedTopic:o,onSelectTopic:p,expandedNodes:n,onToggleExpand:b},t.fullPath))})]})},ee=({topic:s})=>e.jsx(z,{h:"100%",p:"md",children:e.jsxs(f,{gap:"lg",children:[e.jsxs(c,{children:[e.jsx(i,{size:"sm",fw:600,mb:"xs",children:"Topic Info"}),e.jsxs(f,{gap:"xs",children:[e.jsxs(m,{gap:"sm",children:[e.jsx(i,{size:"sm",c:"dimmed",w:100,children:"Name"}),e.jsx(i,{size:"sm",ff:"monospace",children:s.name})]}),e.jsxs(m,{gap:"sm",children:[e.jsx(i,{size:"sm",c:"dimmed",w:100,children:"Provider"}),e.jsx(P,{size:"xs",variant:"light",color:s.provider==="redis"?"red":"green",children:s.provider})]}),s.description&&e.jsxs(m,{gap:"sm",children:[e.jsx(i,{size:"sm",c:"dimmed",w:100,children:"Description"}),e.jsx(i,{size:"sm",children:s.description})]})]})]}),s.schema&&e.jsxs(c,{children:[e.jsx(i,{size:"sm",fw:600,mb:"xs",children:"Message Schema"}),e.jsx(c,{p:"sm",style:{border:`1px solid ${j.colors.border}`,borderRadius:8,backgroundColor:j.colors.surface},children:e.jsx(w,{data:s.schema,maxDepth:5,size:"xs"})})]})]})}),se=({topic:s})=>{const[o,p]=x.useState([]),[a,l]=x.useState(!1),n=x.useCallback(()=>{const r=s.schema?{example:"data",topic:s.name,timestamp:new Date().toISOString()}:{message:`Hello from ${s.name}`};p(d=>[{id:Math.random().toString(36).slice(2),timestamp:new Date,payload:r},...d.slice(0,49)])},[s]);return e.jsxs(m,{direction:"column",h:"100%",children:[e.jsx(c,{p:"sm",style:{borderBottom:`1px solid ${j.colors.border}`},children:e.jsxs(m,{gap:"sm",align:"center",justify:"space-between",children:[e.jsxs(m,{gap:"sm",align:"center",children:[e.jsx(v,{label:a?"Stop listening (coming soon)":"Start listening (coming soon)",children:e.jsx($,{size:"xs",variant:"light",color:a?"red":"green",leftSection:e.jsx(H,{size:14}),onClick:()=>l(!a),disabled:!0,children:a?"Stop":"Listen"})}),e.jsxs(i,{size:"xs",c:"dimmed",children:[o.length," messages"]})]}),e.jsxs(m,{gap:"sm",children:[e.jsx(v,{label:"Add fake message (for demo)",children:e.jsx(I,{size:"sm",variant:"light",onClick:n,children:e.jsx(L,{size:14})})}),e.jsx(v,{label:"Clear messages",children:e.jsx(I,{size:"sm",variant:"light",color:"gray",onClick:()=>p([]),children:e.jsx(V,{size:14})})})]})]})}),o.length===0?e.jsx(m,{align:"center",justify:"center",style:{flex:1},c:"dimmed",children:e.jsxs(f,{align:"center",gap:"xs",children:[e.jsx(S,{size:48,opacity:.3}),e.jsx(i,{size:"sm",children:"No messages yet"}),e.jsx(i,{size:"xs",c:"dimmed",children:"Click the send icon to add a fake message for demo"})]})}):e.jsx(z,{style:{flex:1},children:e.jsx(f,{gap:0,children:o.map(r=>e.jsxs(c,{p:"sm",style:{borderBottom:`1px solid ${j.colors.border}`},children:[e.jsxs(m,{align:"center",gap:"xs",mb:"xs",children:[e.jsx(G,{size:12,opacity:.5}),e.jsx(i,{size:"xs",c:"dimmed",children:r.timestamp.toLocaleTimeString()})]}),e.jsx(c,{p:"xs",style:{backgroundColor:j.colors.surface,borderRadius:4},children:e.jsx(w,{data:r.payload,maxDepth:3,size:"xs"})})]},r.id))})})]})},re=({topic:s})=>{const[o,p]=x.useState(JSON.stringify({message:"Hello",timestamp:new Date().toISOString()},null,2)),[a,l]=x.useState(null),n=()=>{try{JSON.parse(o),l(null),alert(`Message would be published to "${s.name}" (coming soon)`)}catch{l("Invalid JSON")}};return e.jsx(z,{h:"100%",p:"md",children:e.jsxs(f,{gap:"md",children:[e.jsxs(c,{children:[e.jsx(i,{size:"sm",fw:600,mb:"xs",children:"Publish Message"}),e.jsx(i,{size:"xs",c:"dimmed",mb:"sm",children:"Send a test message to this topic (coming soon)"})]}),e.jsxs(c,{children:[e.jsx(i,{size:"sm",c:"dimmed",mb:"xs",children:"Payload (JSON)"}),e.jsx(q,{value:o,onChange:r=>p(r.target.value),minRows:8,maxRows:15,autosize:!0,ff:"monospace",size:"xs",error:a,styles:{input:{backgroundColor:j.colors.surface}}})]}),e.jsx(v,{label:"Publish message (coming soon)",children:e.jsx($,{size:"sm",variant:"light",leftSection:e.jsx(L,{size:16}),onClick:n,disabled:!0,children:"Publish"})}),s.schema&&e.jsxs(c,{children:[e.jsx(i,{size:"sm",c:"dimmed",mb:"xs",children:"Expected Schema"}),e.jsx(c,{p:"sm",style:{border:`1px solid ${j.colors.border}`,borderRadius:8,backgroundColor:j.colors.surface},children:e.jsx(w,{data:s.schema,maxDepth:3,size:"xs"})})]})]})})},ie=({topic:s})=>{const o=N(s.provider);return e.jsxs(m,{direction:"column",h:"100%",children:[e.jsxs(c,{px:"md",py:"sm",style:{borderBottom:`1px solid ${j.colors.border}`,backgroundColor:`${o}08`},children:[e.jsxs(m,{align:"center",gap:"sm",children:[e.jsx(S,{size:18,opacity:.7}),e.jsx(i,{size:"md",fw:600,ff:"monospace",children:s.name}),e.jsx(P,{size:"xs",variant:"light",color:s.provider==="redis"?"red":"green",children:s.provider})]}),s.description&&e.jsx(i,{size:"xs",c:"dimmed",mt:4,children:s.description})]}),e.jsxs(g,{defaultValue:"schema",style:{flex:1,display:"flex",flexDirection:"column"},children:[e.jsxs(g.List,{px:"md",children:[e.jsx(g.Tab,{value:"schema",children:"Schema"}),e.jsx(g.Tab,{value:"messages",children:"Messages"}),e.jsx(g.Tab,{value:"publish",children:"Publish"})]}),e.jsx(g.Panel,{value:"schema",style:{flex:1,overflow:"hidden"},children:e.jsx(ee,{topic:s})}),e.jsx(g.Panel,{value:"messages",style:{flex:1,overflow:"hidden"},children:e.jsx(se,{topic:s})}),e.jsx(g.Panel,{value:"publish",style:{flex:1,overflow:"hidden"},children:e.jsx(re,{topic:s})})]})]})},oe=()=>e.jsx(m,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(f,{align:"center",gap:"xs",children:[e.jsx(S,{size:48,opacity:.3}),e.jsx(i,{size:"sm",children:"Select a topic to view details"})]})}),te=()=>e.jsx(m,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(f,{align:"center",gap:"xs",children:[e.jsx(_,{size:48,opacity:.3}),e.jsx(i,{children:"No topics found"}),e.jsx(i,{size:"sm",c:"dimmed",children:"Add topics using $topic primitive to see them here"})]})}),fe=()=>{const s=D(E),[o,p]=x.useState([]),[a,l]=x.useState(!0),[n,r]=x.useState(null),[d,b]=x.useState("");x.useEffect(()=>{s.fetch("/devtools/api/metadata",{schema:{response:J}}).then(u=>{p(u.data.topics),l(!1)})},[]);const t=x.useMemo(()=>{if(!d)return o;const u=d.toLowerCase();return o.filter(h=>h.name.toLowerCase().includes(u))},[o,d]);return a?e.jsx(m,{align:"center",justify:"center",h:"100%",children:e.jsx(i,{c:"dimmed",children:"Loading..."})}):o.length===0?e.jsx(te,{}):e.jsxs(m,{h:"100%",style:{overflow:"hidden"},children:[e.jsx(c,{w:280,style:{borderRight:`1px solid ${j.colors.border}`,backgroundColor:j.colors.surface},children:e.jsx(Z,{topics:t,selectedTopic:n,onSelectTopic:r,search:d,onSearchChange:b})}),e.jsx(c,{style:{flex:1,overflow:"hidden"},children:n?e.jsx(ie,{topic:n}):e.jsx(oe,{})})]})};export{fe as DevTopicsViewer,fe as default};
|
|
Binary file
|
|
Binary file
|