ide-agents 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -7
- package/dist/git.d.ts +1 -0
- package/dist/git.js +24 -0
- package/dist/server.js +39 -1
- package/dist/template.d.ts +12 -0
- package/dist/template.js +86 -0
- package/package.json +10 -2
- package/template/.agents/AGENTS.md +51 -0
- package/template/.claude/CLAUDE.md +37 -0
- package/template/.cursor/rules/agents.mdc +72 -0
- package/template/.cursor/rules/repo-structure.mdc +46 -0
- package/template/.cursor/rules/scripts.mdc +101 -0
- package/template/README.md +60 -0
- package/template/agents/oracle.md +38 -0
- package/template/skills/hello/SKILL.md +43 -0
- package/template/skills/hello/scripts/now.mjs +49 -0
- package/web/dist/assets/{index-C1Mi5f8W.js → index-C-SOo38e.js} +1 -1
- package/web/dist/index.html +1 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: oracle
|
|
3
|
+
description: Playful fortune-teller subagent — upbeat predictions only, never doom.
|
|
4
|
+
scope: any
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Oracle
|
|
8
|
+
|
|
9
|
+
You are a cheerful, slightly theatrical fortune teller for **entertainment only**. You read the vibes, squint at the horizon, and deliver short prophecies — always **optimistic**, never alarming.
|
|
10
|
+
|
|
11
|
+
This is not financial, medical, or legal advice. Say so once if the user asks about money, health, or lawsuits.
|
|
12
|
+
|
|
13
|
+
## Workflow
|
|
14
|
+
|
|
15
|
+
1. Optional anchor in the present: if the `hello` skill is available, run
|
|
16
|
+
`node <SKILL_DIR>/scripts/now.mjs --json`
|
|
17
|
+
and weave the real timestamp into your opening (“The stars align at …”).
|
|
18
|
+
2. Ask for a topic if missing (career, side project, weekend, coffee, code review — anything goes).
|
|
19
|
+
3. Deliver **one** prophecy in 3–5 sentences: vivid, warm, lightly funny. No hedging, no warnings, no “but on the other hand”.
|
|
20
|
+
4. End with a single lucky token (emoji, silly number, or absurd ritual) — e.g. “lucky semicolon”, “42% more sunshine”.
|
|
21
|
+
|
|
22
|
+
## Tone
|
|
23
|
+
|
|
24
|
+
- Warm, playful, confident — like a friend who only owns good news.
|
|
25
|
+
- Never predict failure, illness, layoffs, breakups, or bugs that cannot be fixed.
|
|
26
|
+
- If the user pushes for bad news, reframes it as a plot twist that still ends well.
|
|
27
|
+
|
|
28
|
+
## Output format
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
🔮 Oracle says
|
|
32
|
+
|
|
33
|
+
<prophecy paragraphs>
|
|
34
|
+
|
|
35
|
+
Lucky sign: <one line>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Keep it under ~120 words unless the user asks for an epic saga.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hello
|
|
3
|
+
description: Demo skill — verifies ide-agents install and reads accurate local time via a bundled script.
|
|
4
|
+
scope: any
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Hello
|
|
8
|
+
|
|
9
|
+
Smoke-test skill that shows why **scripts beat chat** for deterministic output: the agent runs a bundled Node script that reads the **host system clock** (not model guesswork).
|
|
10
|
+
|
|
11
|
+
## Skill layout
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
skills/hello/
|
|
15
|
+
├── SKILL.md
|
|
16
|
+
└── scripts/
|
|
17
|
+
└── now.mjs
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Quick start
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
node <SKILL_DIR>/scripts/now.mjs
|
|
24
|
+
node <SKILL_DIR>/scripts/now.mjs --json
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Replace `<SKILL_DIR>` with the installed skill path (global or project symlink from ide-agents).
|
|
28
|
+
|
|
29
|
+
## Workflow
|
|
30
|
+
|
|
31
|
+
When the user invokes this skill or asks for a hello / time check:
|
|
32
|
+
|
|
33
|
+
1. Resolve `<SKILL_DIR>` (installed `hello` skill folder).
|
|
34
|
+
2. Run `node <SKILL_DIR>/scripts/now.mjs --json`.
|
|
35
|
+
3. Parse the JSON — fields `local`, `timeZone`, `utcOffset`, `iso`, `unixMs`.
|
|
36
|
+
4. Greet the user briefly and **quote the script output** as the authoritative local time.
|
|
37
|
+
5. Do not invent or approximate the time in prose; if the script fails, report the error.
|
|
38
|
+
|
|
39
|
+
## Agent instructions
|
|
40
|
+
|
|
41
|
+
- Prefer `--json` so the time is machine-parseable.
|
|
42
|
+
- Human summary example: “Hello — your system clock says … (timezone …).”
|
|
43
|
+
- This skill has no `assets/` folder; the script uses only Node stdlib and `Intl`.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// hello: read the host system clock and print accurate local time
|
|
3
|
+
//
|
|
4
|
+
// Usage:
|
|
5
|
+
// node <SKILL_DIR>/scripts/now.mjs
|
|
6
|
+
// node <SKILL_DIR>/scripts/now.mjs --json
|
|
7
|
+
|
|
8
|
+
import process, { argv } from 'node:process';
|
|
9
|
+
|
|
10
|
+
const flags = new Set(
|
|
11
|
+
argv.slice(2).filter((a) => a.startsWith('--')).map((a) => a.slice(2)),
|
|
12
|
+
);
|
|
13
|
+
const jsonOut = flags.has('json');
|
|
14
|
+
|
|
15
|
+
const now = new Date();
|
|
16
|
+
const timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
17
|
+
const offsetMinutes = -now.getTimezoneOffset();
|
|
18
|
+
|
|
19
|
+
function formatUtcOffset(minutes) {
|
|
20
|
+
const sign = minutes >= 0 ? '+' : '-';
|
|
21
|
+
const abs = Math.abs(minutes);
|
|
22
|
+
const hours = String(Math.floor(abs / 60)).padStart(2, '0');
|
|
23
|
+
const mins = String(abs % 60).padStart(2, '0');
|
|
24
|
+
return `UTC${sign}${hours}:${mins}`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const payload = {
|
|
28
|
+
source: 'system clock',
|
|
29
|
+
unixMs: now.getTime(),
|
|
30
|
+
unixSeconds: Math.floor(now.getTime() / 1000),
|
|
31
|
+
iso: now.toISOString(),
|
|
32
|
+
local: now.toLocaleString(undefined, {
|
|
33
|
+
timeZone,
|
|
34
|
+
dateStyle: 'full',
|
|
35
|
+
timeStyle: 'long',
|
|
36
|
+
}),
|
|
37
|
+
timeZone,
|
|
38
|
+
utcOffset: formatUtcOffset(offsetMinutes),
|
|
39
|
+
platform: process.platform,
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
if (jsonOut) {
|
|
43
|
+
process.stdout.write(`${JSON.stringify(payload, null, 2)}\n`);
|
|
44
|
+
} else {
|
|
45
|
+
process.stdout.write('Local time (system clock)\n');
|
|
46
|
+
process.stdout.write(` ${payload.local}\n`);
|
|
47
|
+
process.stdout.write(` ${payload.utcOffset} · ${payload.timeZone}\n`);
|
|
48
|
+
process.stdout.write(` ISO: ${payload.iso}\n`);
|
|
49
|
+
}
|
|
@@ -48,4 +48,4 @@ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}
|
|
|
48
48
|
`},vf=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},yf=function(){x.useEffect(function(){return document.body.setAttribute(gf,(vf()+1).toString()),function(){var e=vf()-1;e<=0?document.body.removeAttribute(gf):document.body.setAttribute(gf,e.toString())}},[])},bf=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;yf();var a=x.useMemo(function(){return mf(i)},[i]);return x.createElement(hf,{styles:_f(a,!t,i,n?``:`!important`)})},xf=!1;if(typeof window<`u`)try{var Sf=Object.defineProperty({},"passive",{get:function(){return xf=!0,!0}});window.addEventListener(`test`,Sf,Sf),window.removeEventListener(`test`,Sf,Sf)}catch{xf=!1}var Cf=xf?{passive:!1}:!1,wf=function(e){return e.tagName===`TEXTAREA`},Tf=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!wf(e)&&n[t]===`visible`)},Ef=function(e){return Tf(e,`overflowY`)},Df=function(e){return Tf(e,`overflowX`)},Of=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),jf(e,r)){var i=Mf(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},kf=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Af=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},jf=function(e,t){return e===`v`?Ef(t):Df(t)},Mf=function(e,t){return e===`v`?kf(t):Af(t)},Nf=function(e,t){return e===`h`&&t===`rtl`?-1:1},Pf=function(e,t,n,r,i){var a=Nf(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Mf(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&jf(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Ff=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},If=function(e){return[e.deltaX,e.deltaY]},Lf=function(e){return e&&`current`in e?e.current:e},Rf=function(e,t){return e[0]===t[0]&&e[1]===t[1]},zf=function(e){return`
|
|
49
49
|
.block-interactivity-${e} {pointer-events: none;}
|
|
50
50
|
.allow-interactivity-${e} {pointer-events: all;}
|
|
51
|
-
`},Bf=0,Vf=[];function Hf(e){var t=x.useRef([]),n=x.useRef([0,0]),r=x.useRef(),i=x.useState(Bf++)[0],a=x.useState(uf)[0],o=x.useRef(e);x.useEffect(function(){o.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Rd([e.lockRef.current],(e.shards||[]).map(Lf),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=x.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Ff(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Of(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Of(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Pf(h,t,e,h===`h`?s:c,!0)},[]),c=x.useCallback(function(e){var n=e;if(!(!Vf.length||Vf[Vf.length-1]!==a)){var r=`deltaY`in n?If(n):Ff(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Rf(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(Lf).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=x.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Uf(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=x.useCallback(function(e){n.current=Ff(e),r.current=void 0},[]),d=x.useCallback(function(t){l(t.type,If(t),t.target,s(t,e.lockRef.current))},[]),f=x.useCallback(function(t){l(t.type,Ff(t),t.target,s(t,e.lockRef.current))},[]);x.useEffect(function(){return Vf.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,Cf),document.addEventListener(`touchmove`,c,Cf),document.addEventListener(`touchstart`,u,Cf),function(){Vf=Vf.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Cf),document.removeEventListener(`touchmove`,c,Cf),document.removeEventListener(`touchstart`,u,Cf)}},[]);var p=e.removeScrollBar,m=e.inert;return x.createElement(x.Fragment,null,m?x.createElement(a,{styles:zf(i)}):null,p?x.createElement(bf,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Uf(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Wf=Qd($d,Hf),Gf=x.forwardRef(function(e,t){return x.createElement(tf,Id({},e,{ref:t,sideCar:Wf}))});Gf.classNames=tf.classNames;var Kf=(0,x.createContext)({size:`sm`}),qf=G(e=>{let t=U(`InputClearButton`,null,e),{size:n,variant:r,vars:i,classNames:a,styles:o,...s}=t,c=(0,x.use)(Kf),{resolvedClassNames:l,resolvedStyles:u}=ca({classNames:a,styles:o,props:t});return(0,H.jsx)(Ad,{variant:r||`transparent`,size:n||c?.size||`sm`,classNames:l,styles:u,__staticSelector:`InputClearButton`,style:{pointerEvents:`all`,background:`var(--input-bg)`,...s.style},...s})});qf.displayName=`@mantine/core/InputClearButton`;var Jf={xs:7,sm:8,md:10,lg:12,xl:15};function Yf({__clearable:e,__clearSection:t,rightSection:n,__defaultRightSection:r,size:i=`sm`,__clearSectionMode:a=`both`}){let o=e&&t;return a===`rightSection`?n===null?null:n||r:a===`clear`?n===null?null:o||r:o&&(n||r)?(0,H.jsxs)(`div`,{"data-combined-clear-section":!0,style:{display:`flex`,gap:2,alignItems:`center`,paddingInlineEnd:Jf[i]},children:[o,n||r]}):n===null?null:n||o||r}var Xf=(0,x.createContext)({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0}),Zf={wrapper:`m_6c018570`,input:`m_8fb7ebe7`,section:`m_82577fc2`,placeholder:`m_88bacfd0`,root:`m_46b77525`,label:`m_8fdc1311`,required:`m_78a94662`,error:`m_8f816625`,description:`m_fe47ce59`},Qf=B((e,{size:t})=>({description:{"--input-description-size":t===void 0?void 0:`calc(${or(t)} - ${z(2)})`}})),$f=G(e=>{let t=U(`InputDescription`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,__inheritStyles:l=!0,attributes:u,...d}=U(`InputDescription`,null,t),f=(0,x.use)(Xf),p=W({name:[`InputWrapper`,c],props:t,classes:Zf,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,rootSelector:`description`,vars:s,varsResolver:Qf});return(0,H.jsx)(q,{component:`p`,...(l&&f?.getStyles||p)(`description`,f?.getStyles?{className:r,style:i}:void 0),...d})});$f.classes=Zf,$f.varsResolver=Qf,$f.displayName=`@mantine/core/InputDescription`;var ep=B((e,{size:t})=>({error:{"--input-error-size":t===void 0?void 0:`calc(${or(t)} - ${z(2)})`}})),tp=G(e=>{let t=U(`InputError`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,__staticSelector:l,__inheritStyles:u=!0,...d}=t,f=W({name:[`InputWrapper`,l],props:t,classes:Zf,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,rootSelector:`error`,vars:s,varsResolver:ep}),p=(0,x.use)(Xf);return(0,H.jsx)(q,{component:`p`,...(u&&p?.getStyles||f)(`error`,p?.getStyles?{className:r,style:i}:void 0),...d})});tp.classes=Zf,tp.varsResolver=ep,tp.displayName=`@mantine/core/InputError`;var np={labelElement:`label`},rp=B((e,{size:t})=>({label:{"--input-label-size":or(t),"--input-asterisk-color":void 0}})),ip=G(e=>{let t=U(`InputLabel`,np,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,labelElement:c,required:l,htmlFor:u,onMouseDown:d,children:f,__staticSelector:p,mod:m,attributes:h,...g}=t,_=W({name:[`InputWrapper`,p],props:t,classes:Zf,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,rootSelector:`label`,vars:s,varsResolver:rp}),v=(0,x.use)(Xf),y=v?.getStyles||_;return(0,H.jsxs)(q,{...y(`label`,v?.getStyles?{className:r,style:i}:void 0),component:c,htmlFor:c===`label`?u:void 0,mod:[{required:l},m],onMouseDown:e=>{d?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault()},...g,children:[f,l&&(0,H.jsx)(`span`,{...y(`required`),"aria-hidden":!0,children:` *`})]})});ip.classes=Zf,ip.varsResolver=rp,ip.displayName=`@mantine/core/InputLabel`;var ap=G(e=>{let t=U(`InputPlaceholder`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,error:l,mod:u,attributes:d,...f}=t;return(0,H.jsx)(q,{...W({name:[`InputPlaceholder`,c],props:t,classes:Zf,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:d,rootSelector:`placeholder`})(`placeholder`),mod:[{error:!!l},u],component:`span`,...f})});ap.classes=Zf,ap.displayName=`@mantine/core/InputPlaceholder`;function op(e,{hasDescription:t,hasError:n}){let r=e.findIndex(e=>e===`input`),i=e.slice(0,r),a=e.slice(r+1),o=t&&i.includes(`description`)||n&&i.includes(`error`);return{offsetBottom:t&&a.includes(`description`)||n&&a.includes(`error`),offsetTop:o}}var sp={labelElement:`label`,inputContainer:e=>e,inputWrapperOrder:[`label`,`description`,`input`,`error`]},cp=B((e,{size:t})=>({label:{"--input-label-size":or(t),"--input-asterisk-color":void 0},error:{"--input-error-size":t===void 0?void 0:`calc(${or(t)} - ${z(2)})`},description:{"--input-description-size":t===void 0?void 0:`calc(${or(t)} - ${z(2)})`}})),lp=G(e=>{let t=U(`InputWrapper`,sp,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,size:c,variant:l,__staticSelector:u,inputContainer:d,inputWrapperOrder:f,label:p,error:m,description:h,labelProps:g,descriptionProps:_,errorProps:v,labelElement:y,children:b,withAsterisk:S,id:C,required:w,__stylesApiProps:T,mod:E,attributes:D,...O}=t,k=W({name:[`InputWrapper`,u],props:T||t,classes:Zf,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:D,vars:s,varsResolver:cp}),A={size:c,variant:l,__staticSelector:u},j=Mr(C),ee=typeof S==`boolean`?S:w,M=v?.id||`${j}-error`,te=_?.id||`${j}-description`,ne=j,N=!!m&&typeof m!=`boolean`,P=!!h,re=`${N?M:``} ${P?te:``}`,ie=re.trim().length>0?re.trim():void 0,ae=g?.id||`${j}-label`,oe=p&&(0,H.jsx)(ip,{labelElement:y,id:ae,htmlFor:ne,required:ee,...A,...g,children:p},`label`),se=P&&(0,H.jsx)($f,{..._,...A,size:_?.size||A.size,id:_?.id||te,children:h},`description`),F=(0,H.jsx)(x.Fragment,{children:d(b)},`input`),ce=N&&(0,x.createElement)(tp,{...v,...A,size:v?.size||A.size,key:`error`,id:v?.id||M},m),le=f.map(e=>{switch(e){case`label`:return oe;case`input`:return F;case`description`:return se;case`error`:return ce;default:return null}});return(0,H.jsx)(Xf,{value:{getStyles:k,describedBy:ie,inputId:ne,labelId:ae,...op(f,{hasDescription:P,hasError:N})},children:(0,H.jsx)(q,{variant:l,size:c,mod:[{error:!!m},E],id:y===`label`?void 0:C,...k(`root`),...O,children:le})})});lp.classes=Zf,lp.varsResolver=cp,lp.displayName=`@mantine/core/InputWrapper`;var up={variant:`default`,leftSectionPointerEvents:`none`,rightSectionPointerEvents:`none`,withAria:!0,withErrorStyles:!0,size:`sm`,loading:!1,loadingPosition:`right`},dp=B((e,t,n)=>({wrapper:{"--input-margin-top":n.offsetTop?`calc(var(--mantine-spacing-xs) / 2)`:void 0,"--input-margin-bottom":n.offsetBottom?`calc(var(--mantine-spacing-xs) / 2)`:void 0,"--input-height":rr(t.size,`input-height`),"--input-fz":or(t.size),"--input-radius":t.radius===void 0?void 0:ar(t.radius),"--input-left-section-width":t.leftSectionWidth===void 0?void 0:z(t.leftSectionWidth),"--input-right-section-width":t.rightSectionWidth===void 0?void 0:z(t.rightSectionWidth),"--input-padding-y":t.multiline?rr(t.size,`input-padding-y`):void 0,"--input-left-section-pointer-events":t.leftSectionPointerEvents,"--input-right-section-pointer-events":t.rightSectionPointerEvents}})),fp=ro(e=>{let t=U(`Input`,up,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,required:s,__staticSelector:c,__stylesApiProps:l,size:u,wrapperProps:d,error:f,disabled:p,leftSection:m,leftSectionProps:h,leftSectionWidth:g,rightSection:_,rightSectionProps:v,rightSectionWidth:y,rightSectionPointerEvents:b,leftSectionPointerEvents:S,variant:C,vars:w,pointer:T,multiline:E,radius:D,id:O,withAria:k,withErrorStyles:A,mod:j,inputSize:ee,attributes:M,__clearSection:te,__clearable:ne,__clearSectionMode:N,__defaultRightSection:P,loading:re,loadingPosition:ie,rootRef:ae,dir:oe,...se}=t,{styleProps:F,rest:ce}=Oa(se),le=(0,x.use)(Xf),ue={offsetBottom:le?.offsetBottom,offsetTop:le?.offsetTop},de=W({name:[`Input`,c],props:l||t,classes:Zf,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:M,stylesCtx:ue,rootSelector:`wrapper`,vars:w,varsResolver:dp}),fe=k?{required:s,disabled:p,"aria-invalid":f?!0:void 0,"aria-describedby":le?.describedBy,id:le?.inputId||O}:{},I=re?(0,H.jsx)(vd,{size:ie===`left`?`calc(var(--input-left-section-size) / 2)`:`calc(var(--input-right-section-size) / 2)`}):null,pe=re&&ie===`left`?I:m,me=Yf({__clearable:ne,__clearSection:te,rightSection:re&&ie===`right`?I:_,__defaultRightSection:P,size:u,__clearSectionMode:N});return(0,H.jsx)(Kf,{value:{size:u||`sm`},children:(0,H.jsxs)(q,{ref:ae,dir:oe,...de(`wrapper`),...F,...d,mod:[{error:!!f&&A,pointer:T,disabled:p,multiline:E,"data-with-right-section":!!me,"data-with-left-section":!!pe},j],variant:C,size:u,children:[pe&&(0,H.jsx)(`div`,{...h,"data-position":`left`,...de(`section`,{className:h?.className,style:h?.style}),children:pe}),(0,H.jsx)(q,{component:`input`,...ce,...fe,required:s,mod:{disabled:p,error:!!f&&A},variant:C,__size:ee,...de(`input`)}),me&&(0,H.jsx)(`div`,{...v,"data-position":`right`,...de(`section`,{className:v?.className,style:v?.style}),children:me})]})})});fp.classes=Zf,fp.varsResolver=dp,fp.Wrapper=lp,fp.Label=ip,fp.Error=tp,fp.Description=$f,fp.Placeholder=ap,fp.ClearButton=qf,fp.displayName=`@mantine/core/Input`;function pp(e,t,n){let r=U([`Input`,`InputWrapper`,e],t,n),{label:i,description:a,error:o,required:s,classNames:c,styles:l,className:u,unstyled:d,__staticSelector:f,__stylesApiProps:p,errorProps:m,labelProps:h,descriptionProps:g,wrapperProps:_,id:v,size:y,style:b,inputContainer:x,inputWrapperOrder:S,withAsterisk:C,variant:w,vars:T,mod:E,attributes:D,...O}=r,{styleProps:k,rest:A}=Oa(O),j={label:i,description:a,error:o,required:s,classNames:c,className:u,__staticSelector:f,__stylesApiProps:p||r,errorProps:m,labelProps:h,descriptionProps:g,unstyled:d,styles:l,size:y,style:b,inputContainer:x,inputWrapperOrder:S,withAsterisk:C,variant:w,id:v,mod:E,attributes:D,..._};return{...A,classNames:c,styles:l,unstyled:d,wrapperProps:{...j,...k},inputProps:{required:s,classNames:c,styles:l,unstyled:d,size:y,__staticSelector:f,__stylesApiProps:p||r,error:o,variant:w,id:v,attributes:D}}}var mp={__staticSelector:`InputBase`,withAria:!0,size:`sm`},hp=ro(e=>{let{inputProps:t,wrapperProps:n,...r}=pp(`InputBase`,mp,e);return(0,H.jsx)(fp.Wrapper,{...n,children:(0,H.jsx)(fp,{...t,...r})})});hp.classes={...fp.classes,...fp.Wrapper.classes},hp.displayName=`@mantine/core/InputBase`;var gp={root:`m_66836ed3`,wrapper:`m_a5d60502`,body:`m_667c2793`,title:`m_6a03f287`,label:`m_698f4f23`,icon:`m_667f2a6a`,message:`m_7fa78076`,closeButton:`m_87f54839`},_p=B((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({color:n||e.primaryColor,theme:e,variant:r||`light`,autoContrast:i});return{root:{"--alert-radius":t===void 0?void 0:ar(t),"--alert-bg":n||r?a.background:void 0,"--alert-color":a.color,"--alert-bd":n||r?a.border:void 0}}}),vp=G(e=>{let t=U(`Alert`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,title:u,children:d,id:f,icon:p,withCloseButton:m,onClose:h,closeButtonLabel:g,variant:_,autoContrast:v,role:y,attributes:b,...x}=t,S=W({name:`Alert`,classes:gp,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:b,vars:s,varsResolver:_p}),C=Mr(f),w=u&&`${C}-title`||void 0,T=`${C}-body`;return(0,H.jsx)(q,{id:C,...S(`root`,{variant:_}),variant:_,...x,role:y||`alert`,"aria-describedby":d?T:void 0,"aria-labelledby":u?w:void 0,children:(0,H.jsxs)(`div`,{...S(`wrapper`),children:[p&&(0,H.jsx)(`div`,{...S(`icon`),children:p}),(0,H.jsxs)(`div`,{...S(`body`),children:[u&&(0,H.jsx)(`div`,{...S(`title`),"data-with-close-button":m||void 0,children:(0,H.jsx)(`span`,{id:w,...S(`label`),children:u})}),d&&(0,H.jsx)(`div`,{id:T,...S(`message`),"data-variant":_,children:d})]}),m&&(0,H.jsx)(Ad,{...S(`closeButton`),onClick:h,variant:`transparent`,size:16,iconSize:16,"aria-label":g,unstyled:o})]})})});vp.classes=gp,vp.varsResolver=_p,vp.displayName=`@mantine/core/Alert`;var yp={root:`m_b6d8b162`};function bp(e){if(e===`start`)return`start`;if(e===`end`||e)return`end`}var xp={inherit:!1},Sp=B((e,{variant:t,lineClamp:n,gradient:r,size:i})=>({root:{"--text-fz":or(i),"--text-lh":sr(i),"--text-gradient":t===`gradient`?pi(r,e):void 0,"--text-line-clamp":typeof n==`number`?n.toString():void 0}})),Cp=ro(e=>{let t=U(`Text`,xp,e),{lineClamp:n,truncate:r,inline:i,inherit:a,gradient:o,span:s,__staticSelector:c,vars:l,className:u,style:d,classNames:f,styles:p,unstyled:m,variant:h,mod:g,size:_,attributes:v,...y}=t;return(0,H.jsx)(q,{...W({name:[`Text`,c],props:t,classes:yp,className:u,style:d,classNames:f,styles:p,unstyled:m,attributes:v,vars:l,varsResolver:Sp})(`root`,{focusable:!0}),component:s?`span`:`p`,variant:h,mod:[{"data-truncate":bp(r),"data-line-clamp":typeof n==`number`,"data-inline":i,"data-inherit":a},g],size:_,...y})});Cp.classes=yp,Cp.varsResolver=Sp,Cp.displayName=`@mantine/core/Text`;var[wp,Tp]=Qn(`AppShell was not found in tree`),Ep={root:`m_89ab340`,navbar:`m_45252eee`,aside:`m_9cdde9a`,header:`m_3b16f56b`,main:`m_8983817`,footer:`m_3840c879`,section:`m_6dcfc7c7`},Dp=G(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=U(`AppShellAside`,null,e),d=Tp();return d.disabled?null:(0,H.jsx)(q,{component:`aside`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`aside`,{className:qr({[Gf.classNames.zeroRight]:d.offsetScrollbars},n),classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-aside-z-index":`calc(${c??d.zIndex} + 1)`}})});Dp.classes=Ep,Dp.displayName=`@mantine/core/AppShellAside`;var Op=G(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=U(`AppShellFooter`,null,e),d=Tp();return d.disabled?null:(0,H.jsx)(q,{component:`footer`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`footer`,{className:qr({[Gf.classNames.zeroRight]:d.offsetScrollbars},n),classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-footer-z-index":(c??d.zIndex)?.toString()}})});Op.classes=Ep,Op.displayName=`@mantine/core/AppShellFooter`;var kp=G(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=U(`AppShellHeader`,null,e),d=Tp();return d.disabled?null:(0,H.jsx)(q,{component:`header`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`header`,{className:qr({[Gf.classNames.zeroRight]:d.offsetScrollbars},n),classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-header-z-index":(c??d.zIndex)?.toString()}})});kp.classes=Ep,kp.displayName=`@mantine/core/AppShellHeader`;var Ap=G(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=U(`AppShellMain`,null,e);return(0,H.jsx)(q,{component:`main`,...Tp().getStyles(`main`,{className:n,style:r,classNames:t,styles:i}),...o})});Ap.classes=Ep,Ap.displayName=`@mantine/core/AppShellMain`;var jp=G(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=U(`AppShellNavbar`,null,e),d=Tp();return d.disabled?null:(0,H.jsx)(q,{component:`nav`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`navbar`,{className:n,classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-navbar-z-index":`calc(${c??d.zIndex} + 1)`}})});jp.classes=Ep,jp.displayName=`@mantine/core/AppShellNavbar`;var Mp=ro(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,grow:o,mod:s,...c}=U(`AppShellSection`,null,e),l=Tp();return(0,H.jsx)(q,{mod:[{grow:o},s],...l.getStyles(`section`,{className:n,style:r,classNames:t,styles:i}),...c})});Mp.classes=Ep,Mp.displayName=`@mantine/core/AppShellSection`;function Np(e){return typeof e==`object`?e.base:e}function Pp(e){let t=typeof e==`object`&&!!e&&e.base!==void 0&&Object.keys(e).length===1;return typeof e==`number`||typeof e==`string`||t}function Fp(e){return!(typeof e!=`object`||!e||Object.keys(e).length===1&&`base`in e)}function Ip({baseStyles:e,minMediaStyles:t,maxMediaStyles:n,aside:r,theme:i,mode:a}){let o=r?.width,s=`translateX(var(--app-shell-aside-width))`,c=`translateX(calc(var(--app-shell-aside-width) * -1))`;if(r?.breakpoint&&!r?.collapsed?.mobile&&(n[r?.breakpoint]=n[r?.breakpoint]||{},a===`fixed`?(n[r?.breakpoint][`--app-shell-aside-width`]=`100%`,n[r?.breakpoint][`--app-shell-aside-offset`]=`0px`):(n[r?.breakpoint][`--app-shell-aside-width`]=`0px`,n[r?.breakpoint][`--app-shell-aside-offset`]=`0px`)),Pp(o)){let t=z(Np(o));e[`--app-shell-aside-width`]=t,e[`--app-shell-aside-offset`]=t}if(Fp(o)&&(o.base!==void 0&&(e[`--app-shell-aside-width`]=z(o.base),e[`--app-shell-aside-offset`]=z(o.base)),Bn(o).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-aside-width`]=z(o[e]),t[e][`--app-shell-aside-offset`]=z(o[e]))})),r?.breakpoint&&a===`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){let e=r.breakpoint;t[e]=t[e]||{},t[e][`--app-shell-aside-transform`]=s,t[e][`--app-shell-aside-transform-rtl`]=c,a===`fixed`?t[e][`--app-shell-aside-offset`]=`0px !important`:(t[e][`--app-shell-aside-width`]=`0px`,t[e][`--app-shell-aside-display`]=`none`,t[e][`--app-shell-main-column-end`]=`-1`),t[e][`--app-shell-aside-scroll-locked-visibility`]=`hidden`}if(r?.collapsed?.mobile){let e=lr(r.breakpoint,i.breakpoints)-.1;n[e]=n[e]||{},a===`fixed`?(n[e][`--app-shell-aside-width`]=`100%`,n[e][`--app-shell-aside-offset`]=`0px`):n[e][`--app-shell-aside-width`]=`0px`,n[e][`--app-shell-aside-transform`]=s,n[e][`--app-shell-aside-transform-rtl`]=c,n[e][`--app-shell-aside-scroll-locked-visibility`]=`hidden`}}function Lp({baseStyles:e,minMediaStyles:t,footer:n,mode:r}){let i=n?.height,a=r===`static`?!0:n?.offset??!0;if(r===`static`&&n&&(e[`--app-shell-footer-position`]=`sticky`,e[`--app-shell-footer-grid-column`]=`1 / -1`,e[`--app-shell-footer-grid-row`]=`3`),Pp(i)){let t=z(Np(i));e[`--app-shell-footer-height`]=t,a&&(e[`--app-shell-footer-offset`]=t)}Fp(i)&&(i.base!==void 0&&(e[`--app-shell-footer-height`]=z(i.base),a&&(e[`--app-shell-footer-offset`]=z(i.base))),Bn(i).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-footer-height`]=z(i[e]),a&&(t[e][`--app-shell-footer-offset`]=z(i[e])))})),n?.collapsed&&(e[`--app-shell-footer-transform`]=`translateY(var(--app-shell-footer-height))`,r===`fixed`&&(e[`--app-shell-footer-offset`]=`0px !important`))}function Rp({baseStyles:e,minMediaStyles:t,header:n,mode:r}){let i=n?.height,a=r===`static`?!0:n?.offset??!0;if(r===`static`&&n&&(e[`--app-shell-header-position`]=`sticky`,e[`--app-shell-header-grid-column`]=`1 / -1`,e[`--app-shell-header-grid-row`]=`1`),Pp(i)){let t=z(Np(i));e[`--app-shell-header-height`]=t,a&&(e[`--app-shell-header-offset`]=t)}Fp(i)&&(i.base!==void 0&&(e[`--app-shell-header-height`]=z(i.base),a&&(e[`--app-shell-header-offset`]=z(i.base))),Bn(i).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-header-height`]=z(i[e]),a&&(t[e][`--app-shell-header-offset`]=z(i[e])))})),n?.collapsed&&(e[`--app-shell-header-transform`]=`translateY(calc(var(--app-shell-header-height) * -1))`,r===`fixed`&&(e[`--app-shell-header-offset`]=`0px !important`))}function zp({baseStyles:e,minMediaStyles:t,maxMediaStyles:n,navbar:r,theme:i,mode:a}){let o=r?.width,s=`translateX(calc(var(--app-shell-navbar-width) * -1))`,c=`translateX(var(--app-shell-navbar-width))`;if(r?.breakpoint&&!r?.collapsed?.mobile&&(n[r?.breakpoint]=n[r?.breakpoint]||{},n[r?.breakpoint][`--app-shell-navbar-offset`]=`0px`,n[r?.breakpoint][`--app-shell-navbar-width`]=`100%`,a===`static`&&(n[r?.breakpoint][`--app-shell-navbar-grid-width`]=`0px`)),Pp(o)){let t=z(Np(o));e[`--app-shell-navbar-width`]=t,e[`--app-shell-navbar-offset`]=t,a===`static`&&(e[`--app-shell-navbar-grid-width`]=t)}if(Fp(o)&&(o.base!==void 0&&(e[`--app-shell-navbar-width`]=z(o.base),e[`--app-shell-navbar-offset`]=z(o.base),a===`static`&&(e[`--app-shell-navbar-grid-width`]=z(o.base))),Bn(o).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-navbar-width`]=z(o[e]),t[e][`--app-shell-navbar-offset`]=z(o[e]),a===`static`&&(t[e][`--app-shell-navbar-grid-width`]=z(o[e])))})),r?.breakpoint&&a===`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){let e=r.breakpoint;t[e]=t[e]||{},t[e][`--app-shell-navbar-transform`]=s,t[e][`--app-shell-navbar-transform-rtl`]=c,a===`fixed`?t[e][`--app-shell-navbar-offset`]=`0px !important`:(t[e][`--app-shell-navbar-width`]=`0px`,t[e][`--app-shell-navbar-display`]=`none`,t[e][`--app-shell-main-column-start`]=`1`)}if(r?.collapsed?.mobile){let e=lr(r.breakpoint,i.breakpoints)-.1;n[e]=n[e]||{},n[e][`--app-shell-navbar-width`]=`100%`,n[e][`--app-shell-navbar-offset`]=`0px`,a===`static`&&(n[e][`--app-shell-navbar-grid-width`]=`0px`),n[e][`--app-shell-navbar-transform`]=s,n[e][`--app-shell-navbar-transform-rtl`]=c}}function Bp(e){return Number(e)===0?`0px`:ir(e)}function Vp({padding:e,baseStyles:t,minMediaStyles:n}){Pp(e)&&(t[`--app-shell-padding`]=Bp(Np(e))),Fp(e)&&(e.base&&(t[`--app-shell-padding`]=Bp(e.base)),Bn(e).forEach(t=>{t!==`base`&&(n[t]=n[t]||{},n[t][`--app-shell-padding`]=Bp(e[t]))}))}function Hp({navbar:e,header:t,footer:n,aside:r,padding:i,theme:a,mode:o}){let s={},c={},l={};o===`static`&&(l[`--app-shell-main-grid-column`]=`1 / -1`,l[`--app-shell-main-grid-row`]=`2`),zp({baseStyles:l,minMediaStyles:s,maxMediaStyles:c,navbar:e,theme:a,mode:o}),Ip({baseStyles:l,minMediaStyles:s,maxMediaStyles:c,aside:r,theme:a,mode:o}),Rp({baseStyles:l,minMediaStyles:s,header:t,mode:o}),Lp({baseStyles:l,minMediaStyles:s,footer:n,mode:o}),Vp({baseStyles:l,minMediaStyles:s,padding:i});let u=ur(Bn(s),a.breakpoints).map(e=>({query:`(min-width: ${Jn(e.px)})`,styles:s[e.value]})),d=ur(Bn(c),a.breakpoints).map(e=>({query:`(max-width: ${Jn(e.px)})`,styles:c[e.value]}));return{baseStyles:l,media:[...u,...d]}}function Up({navbar:e,header:t,aside:n,footer:r,padding:i,mode:a,selector:o}){let s=Wi(),c=xi(),{media:l,baseStyles:u}=Hp({navbar:e,header:t,footer:r,aside:n,padding:i,theme:s,mode:a});return(0,H.jsx)(Ta,{media:l,styles:u,selector:o||c.cssVariablesSelector})}function Wp({transitionDuration:e,disabled:t}){let[n,r]=(0,x.useState)(!0),i=(0,x.useRef)(-1),a=(0,x.useRef)(-1);return Nr(`resize`,()=>{r(!0),clearTimeout(i.current),i.current=window.setTimeout(()=>(0,x.startTransition)(()=>{r(!1)}),200)}),yr(()=>{r(!0),clearTimeout(a.current),a.current=window.setTimeout(()=>(0,x.startTransition)(()=>{r(!1)}),e||0)},[t,e]),n}var Gp={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:`ease`,zIndex:er(`app`),mode:`fixed`},Kp=B((e,{transitionDuration:t,transitionTimingFunction:n})=>({root:{"--app-shell-transition-duration":`${t}ms`,"--app-shell-transition-timing-function":n}})),qp=G(e=>{let t=U(`AppShell`,Gp,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,navbar:c,withBorder:l,padding:u,transitionDuration:d,transitionTimingFunction:f,header:p,zIndex:m,layout:h,disabled:g,aside:_,footer:v,offsetScrollbars:y=!0,mode:b,mod:x,attributes:S,id:C,...w}=t,T=W({name:`AppShell`,classes:Ep,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:S,vars:s,varsResolver:Kp}),E=Wp({disabled:g,transitionDuration:d}),D=Mr(C);return(0,H.jsxs)(wp,{value:{getStyles:T,withBorder:l,zIndex:m,disabled:g,offsetScrollbars:y,mode:b},children:[(0,H.jsx)(Up,{navbar:c,header:p,aside:_,footer:v,padding:u,mode:b,selector:b===`static`?`#${D}`:void 0}),(0,H.jsx)(q,{...T(`root`),id:D,mod:[{resizing:E,layout:h,disabled:g,mode:b},x],...w})]})});qp.classes=Ep,qp.varsResolver=Kp,qp.displayName=`@mantine/core/AppShell`,qp.Navbar=jp,qp.Header=kp,qp.Main=Ap,qp.Aside=Dp,qp.Footer=Op,qp.Section=Mp;function Jp(e){return typeof e==`string`?{value:e,label:e}:typeof e==`object`&&`value`in e&&!(`label`in e)?{value:e.value,label:`${e.value}`,disabled:e.disabled}:typeof e==`object`&&`group`in e?{group:e.group,items:e.items.map(e=>Jp(e))}:typeof e==`number`||typeof e==`bigint`||typeof e==`boolean`?{value:e,label:`${e}`}:e}function Yp(e){return e?e.map(e=>Jp(e)):[]}function Xp(e){return e.reduce((e,t)=>`group`in t?{...e,...Xp(t.items)}:(e[`${t.value}`]=t,e),{})}var Zp={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`},Qp={error:null},$p=B((e,{size:t,color:n})=>({chevron:{"--combobox-chevron-size":rr(t,`combobox-chevron-size`),"--combobox-chevron-color":n?di(n,e):void 0}})),em=G(e=>{let t=U(`ComboboxChevron`,Qp,e),{size:n,error:r,style:i,className:a,classNames:o,styles:s,unstyled:c,vars:l,attributes:u,mod:d,...f}=t,p=W({name:`ComboboxChevron`,classes:Zp,props:t,style:i,className:a,classNames:o,styles:s,unstyled:c,vars:l,varsResolver:$p,attributes:u,rootSelector:`chevron`});return(0,H.jsx)(q,{component:`svg`,...f,...p(`chevron`),size:n,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,mod:[`combobox-chevron`,{error:r},d],children:(0,H.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`})})});em.classes=Zp,em.varsResolver=$p,em.displayName=`@mantine/core/ComboboxChevron`;var[tm,nm]=Qn(`Combobox component was not found in tree`);function rm({onMouseDown:e,onClick:t,onClear:n,...r}){return(0,H.jsx)(fp.ClearButton,{tabIndex:-1,"aria-hidden":!0,...r,onMouseDown:t=>{t.preventDefault(),e?.(t)},onClick:e=>{n(),t?.(e)}})}rm.displayName=`@mantine/core/ComboboxClearButton`;var im=G(e=>{let{classNames:t,styles:n,className:r,style:i,hidden:a,...o}=U(`ComboboxDropdown`,null,e),s=nm();return(0,H.jsx)(ud.Dropdown,{...o,role:`presentation`,"data-hidden":a||void 0,...s.getStyles(`dropdown`,{className:r,style:i,classNames:t,styles:n})})});im.classes=Zp,im.displayName=`@mantine/core/ComboboxDropdown`;var am={refProp:`ref`},om=G(e=>{let{children:t,refProp:n,ref:r}=U(`ComboboxDropdownTarget`,am,e);if(nm(),!Zn(t))throw 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(0,H.jsx)(ud.Target,{ref:r,refProp:n,children:t})});om.displayName=`@mantine/core/ComboboxDropdownTarget`;var sm=G(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=U(`ComboboxEmpty`,null,e);return(0,H.jsx)(q,{...nm().getStyles(`empty`,{className:n,classNames:t,styles:i,style:r}),...o})});sm.classes=Zp,sm.displayName=`@mantine/core/ComboboxEmpty`;function cm({onKeyDown:e,onClick:t,withKeyboardNavigation:n,withAriaAttributes:r,withExpandedAttribute:i,targetType:a,autoComplete:o}){let s=nm(),[c,l]=(0,x.useState)(null),u=t=>{if(e?.(t),!s.readOnly&&n){if(t.nativeEvent.isComposing)return;if(t.nativeEvent.code===`ArrowDown`&&(t.preventDefault(),s.store.dropdownOpened?l(s.store.selectNextOption()):(s.store.openDropdown(`keyboard`),l(s.store.selectActiveOption()),s.store.updateSelectedOptionIndex(`selected`,{scrollIntoView:!0}))),t.nativeEvent.code===`ArrowUp`&&(t.preventDefault(),s.store.dropdownOpened?l(s.store.selectPreviousOption()):(s.store.openDropdown(`keyboard`),l(s.store.selectActiveOption()),s.store.updateSelectedOptionIndex(`selected`,{scrollIntoView:!0}))),t.nativeEvent.code===`Enter`||t.nativeEvent.code===`NumpadEnter`){if(t.nativeEvent.keyCode===229)return;let e=s.store.getSelectedOptionIndex();s.store.dropdownOpened&&e!==-1?(t.preventDefault(),s.store.clickSelectedOption()):a===`button`&&(t.preventDefault(),s.store.openDropdown(`keyboard`))}t.key===`Escape`&&s.store.closeDropdown(`keyboard`),t.nativeEvent.code===`Space`&&a===`button`&&(t.preventDefault(),s.store.toggleDropdown(`keyboard`))}},d=r?{...i?{role:`combobox`}:{},"aria-haspopup":`listbox`,"aria-expanded":i?!!(s.store.listId&&s.store.dropdownOpened):void 0,"aria-controls":s.store.dropdownOpened&&s.store.listId?s.store.listId:void 0,"aria-activedescendant":s.store.dropdownOpened&&c||void 0,autoComplete:o,"data-expanded":s.store.dropdownOpened||void 0,"data-mantine-stop-propagation":s.store.dropdownOpened||void 0}:{},f=e=>{a===`button`&&e.currentTarget.focus(),t?.(e)};return{...d,onKeyDown:u,onClick:f}}var lm={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},um=G(e=>{let{children:t,refProp:n,withKeyboardNavigation:r,withAriaAttributes:i,withExpandedAttribute:a,targetType:o,autoComplete:s,ref:c,...l}=U(`ComboboxEventsTarget`,lm,e),u=Gr(t);if(!u)throw 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`);let d=nm();return(0,x.cloneElement)(u,{...cm({targetType:o,withAriaAttributes:i,withKeyboardNavigation:r,withExpandedAttribute:a,onKeyDown:u.props.onKeyDown,onClick:u.props.onClick,autoComplete:s}),...l,[n]:Ir(c,d.store.targetRef,Vr(u))})});um.displayName=`@mantine/core/ComboboxEventsTarget`;var dm=G(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=U(`ComboboxFooter`,null,e);return(0,H.jsx)(q,{...nm().getStyles(`footer`,{className:n,classNames:t,style:r,styles:i}),...o,onMouseDown:e=>{e.preventDefault()}})});dm.classes=Zp,dm.displayName=`@mantine/core/ComboboxFooter`;var fm=G(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,children:o,label:s,id:c,...l}=U(`ComboboxGroup`,null,e),u=nm(),d=Mr(c);return(0,H.jsxs)(q,{role:`group`,"aria-labelledby":s?d:void 0,...u.getStyles(`group`,{className:n,classNames:t,style:r,styles:i}),...l,children:[s&&(0,H.jsx)(`div`,{id:d,...u.getStyles(`groupLabel`,{classNames:t,styles:i}),children:s}),o]})});fm.classes=Zp,fm.displayName=`@mantine/core/ComboboxGroup`;var pm=G(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=U(`ComboboxHeader`,null,e);return(0,H.jsx)(q,{...nm().getStyles(`header`,{className:n,classNames:t,style:r,styles:i}),...o,onMouseDown:e=>{e.preventDefault()}})});pm.classes=Zp,pm.displayName=`@mantine/core/ComboboxHeader`;function mm({value:e,valuesDivider:t=`,`,...n}){return(0,H.jsx)(`input`,{type:`hidden`,value:Array.isArray(e)?e.join(t):e?`${e}`:``,...n})}mm.displayName=`@mantine/core/ComboboxHiddenInput`;var hm=G(e=>{let t=U(`ComboboxOption`,null,e),{classNames:n,className:r,style:i,styles:a,vars:o,onClick:s,id:c,active:l,onMouseDown:u,onMouseOver:d,disabled:f,selected:p,mod:m,...h}=t,g=nm(),_=(0,x.useId)(),v=c||_;return(0,H.jsx)(q,{...g.getStyles(`option`,{className:r,classNames:n,styles:a,style:i}),...h,id:v,mod:[`combobox-option`,{"combobox-active":l,"combobox-disabled":f,"combobox-selected":p},m],role:`option`,onClick:e=>{f?e.preventDefault():(g.onOptionSubmit?.(t.value,t),s?.(e))},onMouseDown:e=>{e.preventDefault(),u?.(e)},onMouseOver:e=>{g.resetSelectionOnOptionHover&&g.store.resetSelectedOption(),d?.(e)}})});hm.classes=Zp,hm.displayName=`@mantine/core/ComboboxOption`;var gm=G(e=>{let{classNames:t,className:n,style:r,styles:i,id:a,onMouseDown:o,labelledBy:s,...c}=U(`ComboboxOptions`,null,e),l=nm(),u=Mr(a);return(0,x.useEffect)(()=>{l.store.setListId(u)},[u]),(0,H.jsx)(q,{...l.getStyles(`options`,{className:n,style:r,classNames:t,styles:i}),...c,id:u,role:`listbox`,"aria-labelledby":s,onMouseDown:e=>{e.preventDefault(),o?.(e)}})});gm.classes=Zp,gm.displayName=`@mantine/core/ComboboxOptions`;var _m={withAriaAttributes:!0,withKeyboardNavigation:!0},vm=G(e=>{let{classNames:t,styles:n,unstyled:r,vars:i,withAriaAttributes:a,onKeyDown:o,onClick:s,withKeyboardNavigation:c,size:l,ref:u,...d}=U(`ComboboxSearch`,_m,e),f=nm(),p=f.getStyles(`search`),m=cm({targetType:`input`,withAriaAttributes:a,withKeyboardNavigation:c,withExpandedAttribute:!1,onKeyDown:o,onClick:s,autoComplete:`off`});return(0,H.jsx)(fp,{ref:Ir(u,f.store.searchRef),classNames:[{input:p.className},t],styles:[{input:p.style},n],size:l||f.size,...m,...d,__staticSelector:`Combobox`})});vm.classes=Zp,vm.displayName=`@mantine/core/ComboboxSearch`;var ym={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},bm=G(e=>{let{children:t,refProp:n,withKeyboardNavigation:r,withAriaAttributes:i,withExpandedAttribute:a,targetType:o,autoComplete:s,ref:c,...l}=U(`ComboboxTarget`,ym,e),u=Gr(t);if(!u)throw 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`);let d=nm(),f=(0,x.cloneElement)(u,{...cm({targetType:o,withAriaAttributes:i,withKeyboardNavigation:r,withExpandedAttribute:a,onKeyDown:u.props.onKeyDown,onClick:u.props.onClick,autoComplete:s}),...l});return(0,H.jsx)(ud.Target,{refProp:n,ref:Ir(c,d.store.targetRef),children:f})});bm.displayName=`@mantine/core/ComboboxTarget`;function xm(e,t,n){for(let n=e-1;n>=0;--n)if(!t[n].hasAttribute(`data-combobox-disabled`))return n;if(n){for(let e=t.length-1;e>-1;--e)if(!t[e].hasAttribute(`data-combobox-disabled`))return e}return e}function Sm(e,t,n){for(let n=e+1;n<t.length;n+=1)if(!t[n].hasAttribute(`data-combobox-disabled`))return n;if(n){for(let e=0;e<t.length;e+=1)if(!t[e].hasAttribute(`data-combobox-disabled`))return e}return e}function Cm(e){for(let t=0;t<e.length;t+=1)if(!e[t].hasAttribute(`data-combobox-disabled`))return t;return-1}function wm({defaultOpened:e,opened:t,onOpenedChange:n,onDropdownClose:r,onDropdownOpen:i,loop:a=!0,scrollBehavior:o=`instant`}={}){let[s,c]=Lr({value:t,defaultValue:e,finalValue:!1,onChange:n}),l=(0,x.useRef)(null),u=(0,x.useRef)(-1),d=(0,x.useRef)(null),f=(0,x.useRef)(null),p=(0,x.useRef)(-1),m=(0,x.useRef)(-1),h=(0,x.useRef)(-1),g=(0,x.useCallback)((e=`unknown`)=>{s||(c(!0),i?.(e))},[c,i,s]),_=(0,x.useCallback)((e=`unknown`)=>{s&&(c(!1),r?.(e))},[c,r,s]),v=(0,x.useCallback)((e=`unknown`)=>{s?_(e):g(e)},[_,g,s]),y=(0,x.useCallback)(()=>{let e=Wr(f.current),t=Hr(`#${l.current} [data-combobox-selected]`,e);t?.removeAttribute(`data-combobox-selected`),t?.removeAttribute(`aria-selected`)},[]),b=(0,x.useCallback)(e=>{let t=Wr(f.current),n=Hr(`#${l.current}`,t),r=n?Ur(`[data-combobox-option]`,n):null;if(!r)return null;let i=e>=r.length?0:e<0?r.length-1:e;return u.current=i,r?.[i]&&!r[i].hasAttribute(`data-combobox-disabled`)?(y(),r[i].setAttribute(`data-combobox-selected`,`true`),r[i].setAttribute(`aria-selected`,`true`),r[i].scrollIntoView({block:`nearest`,behavior:o}),r[i].id):null},[o,y]),S=(0,x.useCallback)(()=>{let e=Wr(f.current),t=Hr(`#${l.current} [data-combobox-active]`,e);return b(t?Ur(`#${l.current} [data-combobox-option]`,e).findIndex(e=>e===t):0)},[b]),C=(0,x.useCallback)(()=>{let e=Wr(f.current),t=Ur(`#${l.current} [data-combobox-option]`,e);return b(Sm(u.current,t,a))},[b,a]),w=(0,x.useCallback)(()=>{let e=Wr(f.current),t=Ur(`#${l.current} [data-combobox-option]`,e);return b(xm(u.current,t,a))},[b,a]),T=(0,x.useCallback)(()=>{let e=Wr(f.current);return b(Cm(Ur(`#${l.current} [data-combobox-option]`,e)))},[b]),E=(0,x.useCallback)((e=`selected`,t)=>{if(typeof e==`number`){u.current=e;let n=Wr(f.current),r=Ur(`#${l.current} [data-combobox-option]`,n);t?.scrollIntoView&&r[e]?.scrollIntoView({block:`nearest`,behavior:o});return}h.current=window.setTimeout(()=>{let n=Wr(f.current),r=Ur(`#${l.current} [data-combobox-option]`,n),i=r.findIndex(t=>t.hasAttribute(`data-combobox-${e}`));u.current=i,t?.scrollIntoView&&r[i]?.scrollIntoView({block:`nearest`,behavior:o})},0)},[]),D=(0,x.useCallback)(()=>{u.current=-1,y()},[y]),O=(0,x.useCallback)(()=>{let e=Wr(f.current);(Ur(`#${l.current} [data-combobox-option]`,e)?.[u.current])?.click()},[]),k=(0,x.useCallback)(e=>{l.current=e},[]),A=(0,x.useCallback)(()=>{p.current=window.setTimeout(()=>d.current?.focus(),0)},[]),j=(0,x.useCallback)(()=>{m.current=window.setTimeout(()=>f.current?.focus(),0)},[]),ee=(0,x.useCallback)(()=>u.current,[]);return(0,x.useEffect)(()=>()=>{window.clearTimeout(p.current),window.clearTimeout(m.current),window.clearTimeout(h.current)},[]),{dropdownOpened:s,openDropdown:g,closeDropdown:_,toggleDropdown:v,selectedOptionIndex:u.current,getSelectedOptionIndex:ee,selectOption:b,selectFirstOption:T,selectActiveOption:S,selectNextOption:C,selectPreviousOption:w,resetSelectedOption:D,updateSelectedOptionIndex:E,listId:l.current,setListId:k,clickSelectedOption:O,searchRef:d,focusSearchInput:A,targetRef:f,focusTarget:j}}var Tm={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:`target`,transitionProps:{transition:`fade`,duration:0},size:`sm`},Em=B((e,{size:t,dropdownPadding:n})=>({options:{"--combobox-option-fz":or(t),"--combobox-option-padding":rr(t,`combobox-option-padding`)},dropdown:{"--combobox-padding":n===void 0?void 0:z(n),"--combobox-option-fz":or(t),"--combobox-option-padding":rr(t,`combobox-option-padding`)}})),Dm=e=>{let t=U(`Combobox`,Tm,e),{classNames:n,styles:r,unstyled:i,children:a,store:o,vars:s,onOptionSubmit:c,onClose:l,size:u,dropdownPadding:d,resetSelectionOnOptionHover:f,__staticSelector:p,readOnly:m,attributes:h,...g}=t,_=wm(),v=o||_,y=W({name:p||`Combobox`,classes:Zp,props:t,classNames:n,styles:r,unstyled:i,attributes:h,vars:s,varsResolver:Em}),b=()=>{l?.(),v.closeDropdown()};return(0,H.jsx)(tm,{value:{getStyles:y,store:v,onOptionSubmit:c,size:u,resetSelectionOnOptionHover:f,readOnly:m},children:(0,H.jsx)(ud,{opened:v.dropdownOpened,preventPositionChangeWhenVisible:!1,...g,onChange:e=>!e&&b(),withRoles:!1,unstyled:i,children:a})})};Dm.extend=e=>e,Dm.classes=Zp,Dm.varsResolver=Em,Dm.displayName=`@mantine/core/Combobox`,Dm.Target=bm,Dm.Dropdown=im,Dm.Options=gm,Dm.Option=hm,Dm.Search=vm,Dm.Empty=sm,Dm.Chevron=em,Dm.Footer=dm,Dm.Header=pm,Dm.EventsTarget=um,Dm.DropdownTarget=om,Dm.Group=fm,Dm.ClearButton=rm,Dm.HiddenInput=mm;function Om({children:e,role:t}){let n=(0,x.use)(Xf);return n?(0,H.jsx)(`div`,{role:t,"aria-labelledby":n.labelId,"aria-describedby":n.describedBy,children:e}):(0,H.jsx)(H.Fragment,{children:e})}var km=(0,x.createContext)(null),Am={hiddenInputValuesSeparator:`,`},jm=no((e=>{let{value:t,defaultValue:n,onChange:r,size:i,wrapperProps:a,children:o,readOnly:s,name:c,hiddenInputValuesSeparator:l,hiddenInputProps:u,maxSelectedValues:d,disabled:f,...p}=U(`CheckboxGroup`,Am,e),[m,h]=Lr({value:t,defaultValue:n,finalValue:[],onChange:r}),g=e=>{let t=typeof e==`string`?e:e.currentTarget.value;if(s)return;let n=m.includes(t);!n&&d&&m.length>=d||h(n?m.filter(e=>e!==t):[...m,t])},_=e=>{if(f)return!0;if(!d)return!1;let t=m.includes(e),n=m.length>=d;return!t&&n},v=m.join(l);return(0,H.jsx)(km,{value:{value:m,onChange:g,size:i,isDisabled:_},children:(0,H.jsxs)(fp.Wrapper,{size:i,...a,...p,labelElement:`div`,__staticSelector:`CheckboxGroup`,children:[(0,H.jsx)(Om,{role:`group`,children:o}),(0,H.jsx)(`input`,{type:`hidden`,name:c,value:v,...u})]})})}));jm.classes=fp.Wrapper.classes,jm.displayName=`@mantine/core/CheckboxGroup`;var Mm={card:`m_26775b0a`},Nm=(0,x.createContext)(null),Pm={withBorder:!0},Fm=B((e,{radius:t})=>({card:{"--card-radius":ar(t)}})),Im=G(e=>{let t=U(`CheckboxCard`,Pm,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,checked:c,mod:l,withBorder:u,value:d,onClick:f,defaultChecked:p,onChange:m,attributes:h,...g}=t,_=W({name:`CheckboxCard`,classes:Mm,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s,varsResolver:Fm,rootSelector:`card`}),v=(0,x.use)(km),[y,b]=Lr({value:typeof c==`boolean`?c:v?v.value.includes(d||``):void 0,defaultValue:p,finalValue:!1,onChange:m});return(0,H.jsx)(Nm,{value:{checked:y},children:(0,H.jsx)(Cu,{mod:[{"with-border":u,checked:y},l],..._(`card`),...g,role:`checkbox`,"aria-checked":y,onClick:e=>{f?.(e),v?.onChange(d||``),b(!y)}})})});Im.displayName=`@mantine/core/CheckboxCard`,Im.classes=Mm,Im.varsResolver=Fm;function Lm({size:e,style:t,...n}){return(0,H.jsx)(`svg`,{viewBox:`0 0 10 7`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:e===void 0?t:{width:z(e),height:z(e),...t},"aria-hidden":!0,...n,children:(0,H.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 Rm({indeterminate:e,...t}){return e?(0,H.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 32 6`,"aria-hidden":!0,...t,children:(0,H.jsx)(`rect`,{width:`32`,height:`6`,fill:`currentColor`,rx:`3`})}):(0,H.jsx)(Lm,{...t})}var zm={indicator:`m_5e5256ee`,icon:`m_1b1c543a`,"indicator--outline":`m_76e20374`},Bm={icon:Rm,variant:`filled`,radius:`sm`},Vm=B((e,{radius:t,color:n,size:r,iconColor:i,variant:a,autoContrast:o})=>{let s=ui({color:n||e.primaryColor,theme:e}),c=s.isThemeColor&&s.shade===void 0?`var(--mantine-color-${s.color}-outline)`:s.color;return{indicator:{"--checkbox-size":rr(r,`checkbox-size`),"--checkbox-radius":t===void 0?void 0:ar(t),"--checkbox-color":a===`outline`?c:di(n,e),"--checkbox-icon-color":i?di(i,e):yi(o,e)?_i({color:n,theme:e,autoContrast:o}):void 0}}}),Hm=G(e=>{let t=U(`CheckboxIndicator`,Bm,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,icon:c,indeterminate:l,radius:u,color:d,iconColor:f,autoContrast:p,checked:m,mod:h,variant:g,disabled:_,attributes:v,...y}=t,b=W({name:`CheckboxIndicator`,classes:zm,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:v,vars:s,varsResolver:Vm,rootSelector:`indicator`}),S=(0,x.use)(Nm),C=typeof m==`boolean`||typeof l==`boolean`?m||l:S?.checked||!1;return(0,H.jsx)(q,{...b(`indicator`,{variant:g}),variant:g,mod:[{checked:C,disabled:_},h],...y,children:(0,H.jsx)(c,{indeterminate:l,...b(`icon`)})})});Hm.displayName=`@mantine/core/CheckboxIndicator`,Hm.classes=zm,Hm.varsResolver=Vm;var Um={root:`m_5f75b09e`,body:`m_5f6e695e`,labelWrapper:`m_d3ea56bb`,label:`m_8ee546b8`,description:`m_328f68c0`,error:`m_8e8a99cc`},Wm=Um;function Gm({__staticSelector:e,__stylesApiProps:t,className:n,classNames:r,styles:i,unstyled:a,children:o,label:s,description:c,id:l,disabled:u,error:d,size:f,labelPosition:p=`left`,bodyElement:m=`div`,labelElement:h=`label`,variant:g,style:_,vars:v,mod:y,attributes:b,...x}){let S=W({name:e,props:t,className:n,style:_,classes:Um,classNames:r,styles:i,unstyled:a,attributes:b}),C=c?`${l}-description`:void 0,w=d&&typeof d!=`boolean`?`${l}-error`:void 0;return(0,H.jsx)(q,{...S(`root`),__vars:{"--label-fz":or(f),"--label-lh":rr(f,`label-lh`)},mod:[{"label-position":p},y],variant:g,size:f,...x,children:(0,H.jsxs)(q,{component:m,htmlFor:m===`label`?l:void 0,...S(`body`),children:[o,(0,H.jsxs)(`div`,{...S(`labelWrapper`),"data-disabled":u||void 0,children:[s&&(0,H.jsx)(q,{component:h,htmlFor:h===`label`?l:void 0,...S(`label`),"data-disabled":u||void 0,children:s}),c&&(0,H.jsx)(fp.Description,{id:C,size:f,__inheritStyles:!1,...S(`description`),children:c}),d&&typeof d!=`boolean`&&(0,H.jsx)(fp.Error,{id:w,size:f,__inheritStyles:!1,...S(`error`),children:d})]})]})})}Gm.displayName=`@mantine/core/InlineInput`;var Km={root:`m_bf2d988c`,inner:`m_26062bec`,input:`m_26063560`,icon:`m_bf295423`,"input--outline":`m_215c4542`},qm={labelPosition:`right`,icon:Rm,withErrorStyles:!0,variant:`filled`,radius:`sm`},Jm=B((e,{radius:t,color:n,size:r,iconColor:i,variant:a,autoContrast:o})=>{let s=ui({color:n||e.primaryColor,theme:e}),c=s.isThemeColor&&s.shade===void 0?`var(--mantine-color-${s.color}-outline)`:s.color;return{root:{"--checkbox-size":rr(r,`checkbox-size`),"--checkbox-radius":t===void 0?void 0:ar(t),"--checkbox-color":a===`outline`?c:di(n,e),"--checkbox-icon-color":i?di(i,e):yi(o,e)?_i({color:n,theme:e,autoContrast:o}):void 0}}}),Ym=G(e=>{let t=U(`Checkbox`,qm,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,color:c,label:l,id:u,size:d,radius:f,wrapperProps:p,checked:m,labelPosition:h,description:g,error:_,disabled:v,variant:y,indeterminate:b,icon:S,rootRef:C,iconColor:w,onChange:T,autoContrast:E,mod:D,attributes:O,readOnly:k,onClick:A,withErrorStyles:j,ref:ee,...M}=t,te=(0,x.useRef)(null),ne=(0,x.use)(km),N=d||ne?.size,P=W({name:`Checkbox`,props:t,classes:Km,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:O,vars:s,varsResolver:Jm}),{styleProps:re,rest:ie}=Oa(M),ae=Mr(u),oe=[g?`${ae}-description`:void 0,_&&typeof _!=`boolean`?`${ae}-error`:void 0,ie[`aria-describedby`]].filter(Boolean).join(` `)||void 0,se={checked:ne?.value.includes(ie.value)??m,onChange:e=>{ne?.onChange(e),T?.(e)}},F=ne?.isDisabled?.(ie.value)??!1,ce=v||F;return(0,x.useEffect)(()=>{te.current&&(te.current.indeterminate=b||!1,b?te.current.setAttribute(`data-indeterminate`,`true`):te.current.removeAttribute(`data-indeterminate`))},[b]),(0,H.jsx)(Gm,{...P(`root`),__staticSelector:`Checkbox`,__stylesApiProps:t,id:ae,size:N,labelPosition:h,label:l,description:g,error:_,disabled:ce,classNames:n,styles:a,unstyled:o,"data-checked":se.checked||m||void 0,variant:y,ref:C,mod:D,attributes:O,inert:ie.inert,...re,...p,children:(0,H.jsxs)(q,{...P(`inner`),mod:{"data-label-position":h},children:[(0,H.jsx)(q,{component:`input`,id:ae,ref:Ir(te,ee),mod:{error:!!_,"with-error-styles":j},...P(`input`,{focusable:!0,variant:y}),...ie,...se,"aria-describedby":oe,disabled:ce,inert:ie.inert,type:`checkbox`,onClick:e=>{k&&e.preventDefault(),A?.(e)}}),(0,H.jsx)(S,{indeterminate:b,...P(`icon`)})]})})});Ym.classes={...Km,...Wm},Ym.varsResolver=Jm,Ym.displayName=`@mantine/core/Checkbox`,Ym.Group=jm,Ym.Indicator=Hm,Ym.Card=Im;function Xm(e){return`group`in e}function Zm({options:e,search:t,limit:n}){let r=t.trim().toLowerCase(),i=[];for(let a=0;a<e.length;a+=1){let o=e[a];if(i.length===n)return i;Xm(o)&&i.push({group:o.group,items:Zm({options:o.items,search:t,limit:n-i.length})}),Xm(o)||o.label.toLowerCase().includes(r)&&i.push(o)}return i}function Qm(e){if(e.length===0)return!0;for(let t of e)if(!(`group`in t)||t.items.length>0)return!1;return!0}function $m(e,t=new Set){if(Array.isArray(e))for(let n of e)if(Xm(n))$m(n.items,t);else{if(n.value===void 0)throw Error(`[@mantine/core] Each option must have value property`);if(t.has(n.value))throw Error(`[@mantine/core] Duplicate options are not supported. Option with value "${n.value}" was provided more than once`);t.add(n.value)}}function eh(e,t){return Array.isArray(e)?e.includes(t):e===t}function th({data:e,withCheckIcon:t,withAlignedLabels:n,value:r,checkIconPosition:i,unstyled:a,renderOption:o}){if(!Xm(e)){let s=eh(r,e.value),c=t&&(s?(0,H.jsx)(Lm,{className:Zp.optionsDropdownCheckIcon}):n?(0,H.jsx)(`div`,{className:Zp.optionsDropdownCheckPlaceholder}):null),l=(0,H.jsxs)(H.Fragment,{children:[i===`left`&&c,(0,H.jsx)(`span`,{children:e.label}),i===`right`&&c]});return(0,H.jsx)(Dm.Option,{value:e.value,disabled:e.disabled,className:qr({[Zp.optionsDropdownOption]:!a}),"data-reverse":i===`right`||void 0,"data-checked":s||void 0,"aria-selected":s,active:s,children:typeof o==`function`?o({option:e,checked:s}):l})}let s=e.items.map(e=>(0,H.jsx)(th,{data:e,value:r,unstyled:a,withCheckIcon:t,withAlignedLabels:n,checkIconPosition:i,renderOption:o},`${e.value}`));return(0,H.jsx)(Dm.Group,{label:e.group,children:s})}function nh({data:e,hidden:t,hiddenWhenEmpty:n,filter:r,search:i,limit:a,maxDropdownHeight:o,withScrollArea:s=!0,filterOptions:c=!0,withCheckIcon:l=!1,withAlignedLabels:u=!1,value:d,checkIconPosition:f,nothingFoundMessage:p,unstyled:m,labelId:h,renderOption:g,scrollAreaProps:_,"aria-label":v}){$m(e);let y=typeof i==`string`?(r||Zm)({options:e,search:c?i:``,limit:a??1/0}):e,b=Qm(y),x=y.map(e=>(0,H.jsx)(th,{data:e,withCheckIcon:l,withAlignedLabels:u,value:d,checkIconPosition:f,unstyled:m,renderOption:g},Xm(e)?e.group:`${e.value}`));return(0,H.jsx)(Dm.Dropdown,{hidden:t||n&&b,"data-composed":!0,children:(0,H.jsxs)(Dm.Options,{labelledBy:h,"aria-label":v,children:[s?(0,H.jsx)(yu.Autosize,{mah:o??220,type:`scroll`,scrollbarSize:`var(--combobox-padding)`,offsetScrollbars:`y`,..._,children:x}):x,b&&p&&(0,H.jsx)(Dm.Empty,{children:p})]})})}var rh={root:`m_347db0ec`,"root--dot":`m_fbd81e3d`,label:`m_5add502a`,section:`m_91fdda9b`},ih=B((e,{radius:t,color:n,gradient:r,variant:i,size:a,autoContrast:o,circle:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:o});return{root:{"--badge-height":rr(a,`badge-height`),"--badge-padding-x":rr(a,`badge-padding-x`),"--badge-fz":rr(a,`badge-fz`),"--badge-radius":s||t===void 0?void 0:ar(t),"--badge-bg":n||i?c.background:void 0,"--badge-color":n||i?c.color:void 0,"--badge-bd":n||i?c.border:void 0,"--badge-dot-color":i===`dot`?di(n,e):void 0}}}),ah=ro(e=>{let t=U(`Badge`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,gradient:u,leftSection:d,rightSection:f,children:p,variant:m,fullWidth:h,autoContrast:g,circle:_,mod:v,attributes:y,...b}=t,x=W({name:`Badge`,props:t,classes:rh,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:y,vars:s,varsResolver:ih});return(0,H.jsxs)(q,{variant:m,mod:[{block:h,circle:_,"with-right-section":!!f,"with-left-section":!!d},v],...x(`root`,{variant:m}),...b,children:[d&&(0,H.jsx)(`span`,{...x(`section`),"data-position":`left`,children:d}),(0,H.jsx)(`span`,{...x(`label`),children:p}),f&&(0,H.jsx)(`span`,{...x(`section`),"data-position":`right`,children:f})]})});ah.classes=rh,ah.varsResolver=ih,ah.displayName=`@mantine/core/Badge`;var oh={root:`m_fea6bf1a`,burger:`m_d4fb9cad`},sh=B((e,{color:t,size:n,lineSize:r,transitionDuration:i,transitionTimingFunction:a})=>({root:{"--burger-color":t?di(t,e):void 0,"--burger-size":rr(n,`burger-size`),"--burger-line-size":r?z(r):void 0,"--burger-transition-duration":i===void 0?void 0:`${i}ms`,"--burger-transition-timing-function":a}})),ch=G(e=>{let t=U(`Burger`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,opened:c,children:l,transitionDuration:u,transitionTimingFunction:d,lineSize:f,attributes:p,...m}=t,h=W({name:`Burger`,classes:oh,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:s,varsResolver:sh});return(0,H.jsxs)(Cu,{...h(`root`),...m,children:[(0,H.jsx)(q,{mod:[`reduce-motion`,{opened:c}],...h(`burger`)}),l]})});ch.classes=oh,ch.varsResolver=sh,ch.displayName=`@mantine/core/Burger`;var lh={root:`m_77c9d27d`,inner:`m_80f1301b`,label:`m_811560b9`,section:`m_a74036a`,loader:`m_a25b86ee`,group:`m_80d6d844`,groupSection:`m_70be2a01`},uh={orientation:`horizontal`},dh=B((e,{borderWidth:t})=>({group:{"--button-border-width":z(t)}})),fh=G(e=>{let t=U(`ButtonGroup`,uh,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,orientation:s,vars:c,borderWidth:l,mod:u,attributes:d,...f}=U(`ButtonGroup`,uh,e);return(0,H.jsx)(q,{...W({name:`ButtonGroup`,props:t,classes:lh,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:c,varsResolver:dh,rootSelector:`group`})(`group`),mod:[{"data-orientation":s},u],role:`group`,...f})});fh.classes=lh,fh.varsResolver=dh,fh.displayName=`@mantine/core/ButtonGroup`;var ph=B((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":rr(o,`section-height`),"--section-padding-x":rr(o,`section-padding-x`),"--section-fz":o?.includes(`compact`)?or(o.replace(`compact-`,``)):or(o),"--section-radius":t===void 0?void 0:ar(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),mh=G(e=>{let t=U(`ButtonGroupSection`,null,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,vars:s,gradient:c,radius:l,autoContrast:u,attributes:d,...f}=t;return(0,H.jsx)(q,{...W({name:`ButtonGroupSection`,props:t,classes:lh,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:ph,rootSelector:`groupSection`})(`groupSection`),...f})});mh.classes=lh,mh.varsResolver=ph,mh.displayName=`@mantine/core/ButtonGroupSection`;var hh={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${z(1)}))`},out:{opacity:0,transform:`translate(-50%, -200%)`},common:{transformOrigin:`center`},transitionProperty:`transform, opacity`},gh=B((e,{radius:t,color:n,gradient:r,variant:i,size:a,justify:o,autoContrast:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:s});return{root:{"--button-justify":o,"--button-height":rr(a,`button-height`),"--button-padding-x":rr(a,`button-padding-x`),"--button-fz":a?.includes(`compact`)?or(a.replace(`compact-`,``)):or(a),"--button-radius":t===void 0?void 0:ar(t),"--button-bg":n||i?c.background:void 0,"--button-hover":n||i?c.hover:void 0,"--button-color":c.color,"--button-bd":n||i?c.border:void 0,"--button-hover-color":n||i?c.hoverColor:void 0}}}),_h=ro(e=>{let t=U(`Button`,null,e),{style:n,vars:r,className:i,color:a,disabled:o,children:s,leftSection:c,rightSection:l,fullWidth:u,variant:d,radius:f,loading:p,loaderProps:m,gradient:h,classNames:g,styles:_,unstyled:v,"data-disabled":y,autoContrast:b,mod:x,attributes:S,...C}=t,w=W({name:`Button`,props:t,classes:lh,className:i,style:n,classNames:g,styles:_,unstyled:v,attributes:S,vars:r,varsResolver:gh}),T=!!c,E=!!l;return(0,H.jsxs)(Cu,{...w(`root`,{active:!o&&!p&&!y}),unstyled:v,variant:d,disabled:o||p,mod:[{disabled:o||y,loading:p,block:u,"with-left-section":T,"with-right-section":E},x],...C,children:[typeof p==`boolean`&&(0,H.jsx)(Ju,{mounted:p,transition:hh,duration:150,children:e=>(0,H.jsx)(q,{component:`span`,...w(`loader`,{style:e}),"aria-hidden":!0,children:(0,H.jsx)(vd,{color:`var(--button-color)`,size:`calc(var(--button-height) / 1.8)`,...m})})}),(0,H.jsxs)(`span`,{...w(`inner`),children:[c&&(0,H.jsx)(q,{component:`span`,...w(`section`),mod:{position:`left`},children:c}),(0,H.jsx)(q,{component:`span`,mod:{loading:p},...w(`label`),children:s}),l&&(0,H.jsx)(q,{component:`span`,...w(`section`),mod:{position:`right`},children:l})]})]})});_h.classes=lh,_h.varsResolver=gh,_h.displayName=`@mantine/core/Button`,_h.Group=fh,_h.GroupSection=mh;var[vh,yh]=Qn(`Card component was not found in tree`),bh={root:`m_e615b15f`,section:`m_599a2148`},xh=ro(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,withBorder:o,inheritPadding:s,mod:c,...l}=U(`CardSection`,null,e),u=yh();return(0,H.jsx)(q,{mod:[{"with-border":o,"inherit-padding":s},c],...u.getStyles(`section`,{className:n,style:r,styles:i,classNames:t}),...l})});xh.classes=bh,xh.displayName=`@mantine/core/CardSection`;var Sh=B((e,{padding:t})=>({root:{"--card-padding":ir(t)}})),Ch={orientation:`vertical`},wh=ro(e=>{let t=U(`Card`,Ch,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,children:c,padding:l,attributes:u,orientation:d,...f}=t,p=W({name:`Card`,props:t,classes:bh,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s,varsResolver:Sh}),m=x.Children.toArray(c),h=m.map((e,t)=>typeof e==`object`&&e&&`type`in e&&(e.type===xh||e.type?.displayName===`@mantine/core/CardSection`)?(0,x.cloneElement)(e,{"data-orientation":d,"data-first-section":t===0||void 0,"data-last-section":t===m.length-1||void 0}):e);return(0,H.jsx)(vh,{value:{getStyles:p},children:(0,H.jsx)(Ou,{unstyled:o,"data-orientation":d,...p(`root`),...f,children:h})})});wh.classes=bh,wh.varsResolver=Sh,wh.displayName=`@mantine/core/Card`,wh.Section=xh;var Th={root:`m_b183c0a2`},Eh=B((e,{color:t})=>({root:{"--code-bg":t?di(t,e):void 0}})),Dh=G(e=>{let t=U(`Code`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,color:c,block:l,mod:u,attributes:d,...f}=t,p=W({name:`Code`,props:t,classes:Th,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:Eh});return(0,H.jsx)(q,{component:l?`pre`:`code`,mod:[{block:l},u],...p(`root`),...f,dir:`ltr`})});Dh.classes=Th,Dh.varsResolver=Eh,Dh.displayName=`@mantine/core/Code`;var Oh={root:`m_7485cace`},kh={strategy:`block`},Ah=B((e,{size:t,fluid:n})=>({root:{"--container-size":n?void 0:rr(t,`container-size`)}})),jh=G(e=>{let t=U(`Container`,kh,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,fluid:c,mod:l,attributes:u,strategy:d,...f}=t,p=W({name:`Container`,classes:Oh,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s,varsResolver:Ah});return(0,H.jsx)(q,{mod:[{fluid:c,strategy:d},l],...p(`root`),...f})});jh.classes=Oh,jh.varsResolver=Ah,jh.displayName=`@mantine/core/Container`;function Mh({offset:e,position:t,defaultOpened:n}){let[r,i]=(0,x.useState)(n),a=(0,x.useRef)(null),{x:o,y:s,elements:c,refs:l,update:u,placement:d}=uu({placement:t,middleware:[wl({crossAxis:!0,padding:5,rootBoundary:`document`})]}),f=d.includes(`right`)?e:t.includes(`left`)?e*-1:0,p=d.includes(`bottom`)?e:t.includes(`top`)?e*-1:0,m=(0,x.useCallback)(({clientX:e,clientY:t})=>{l.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e+f,top:t+p,right:e,bottom:t}}})},[c.reference]);return(0,x.useEffect)(()=>{if(l.floating.current){let e=a.current;e.addEventListener(`mousemove`,m);let t=fs(l.floating.current);return t.forEach(e=>{e.addEventListener(`scroll`,u)}),()=>{e.removeEventListener(`mousemove`,m),t.forEach(e=>{e.removeEventListener(`scroll`,u)})}}},[c.reference,l.floating.current,u,m,r]),{handleMouseMove:m,x:o,y:s,opened:r,setOpened:i,boundaryRef:a,floating:l.setFloating}}var Nh={tooltip:`m_1b3c8819`,arrow:`m_f898399f`},Ph={refProp:`ref`,withinPortal:!0,offset:10,position:`right`,zIndex:er(`popover`)},Fh=B((e,{radius:t,color:n})=>({tooltip:{"--tooltip-radius":t===void 0?void 0:ar(t),"--tooltip-bg":n?di(n,e):void 0,"--tooltip-color":n?`var(--mantine-color-white)`:void 0}})),Ih=G(e=>{let t=U(`TooltipFloating`,Ph,e),{children:n,refProp:r,withinPortal:i,style:a,className:o,classNames:s,styles:c,unstyled:l,radius:u,color:d,label:f,offset:p,position:m,multiline:h,zIndex:g,disabled:_,defaultOpened:v,variant:y,vars:b,portalProps:S,attributes:C,ref:w,...T}=t,E=Wi(),D=W({name:`TooltipFloating`,props:t,classes:Nh,className:o,style:a,classNames:s,styles:c,unstyled:l,attributes:C,rootSelector:`tooltip`,vars:b,varsResolver:Fh}),{handleMouseMove:O,x:k,y:A,opened:j,boundaryRef:ee,floating:M,setOpened:te}=Mh({offset:p,position:m,defaultOpened:v}),ne=Gr(n);if(!ne)throw Error(`[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let N=Ir(ee,Vr(ne),w),P=ne.props,re=e=>{P.onMouseEnter?.(e),O(e),te(!0)},ie=e=>{P.onMouseLeave?.(e),te(!1)};return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Uu,{...S,withinPortal:i,children:(0,H.jsx)(q,{...T,...D(`tooltip`,{style:{...Qa(a,E),zIndex:g,display:!_&&j?`block`:`none`,top:(A&&Math.round(A))??``,left:(k&&Math.round(k))??``}}),variant:y,ref:M,mod:{multiline:h},children:f})}),(0,x.cloneElement)(ne,{...P,[r]:N,onMouseEnter:re,onMouseLeave:ie})]})});Ih.classes=Nh,Ih.varsResolver=Fh,Ih.displayName=`@mantine/core/TooltipFloating`;var Lh=(0,x.createContext)({withinGroup:!1}),Rh={openDelay:0,closeDelay:0};function zh(e){let{openDelay:t,closeDelay:n,children:r}=U(`TooltipGroup`,Rh,e);return(0,H.jsx)(Lh,{value:{withinGroup:!0},children:(0,H.jsx)(ru,{delay:{open:t,close:n},children:r})})}zh.displayName=`@mantine/core/TooltipGroup`,zh.extend=e=>e;function Bh(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function Vh(e){let t=Bh(e.middlewares),n=[Cl(e.offset)];return t.shift&&n.push(wl(typeof t.shift==`boolean`?{padding:8}:{padding:8,...t.shift})),t.flip&&n.push(typeof t.flip==`boolean`?El():El(t.flip)),n.push(Al({element:e.arrowRef,padding:e.arrowOffset})),t.inline?n.push(typeof t.inline==`boolean`?kl():kl(t.inline)):e.inline&&n.push(kl()),n}function Hh(e){let[t,n]=(0,x.useState)(e.defaultOpened),r=typeof e.opened==`boolean`?e.opened:t,i=(0,x.use)(Lh).withinGroup,a=Mr(),o=(0,x.useCallback)(e=>{n(e),e&&g(a)},[a]),{x:s,y:c,context:l,refs:u,placement:d,middlewareData:{arrow:{x:f,y:p}={}}}=uu({strategy:e.strategy,placement:e.position,open:r,onOpenChange:o,middleware:Vh(e),whileElementsMounted:al}),{delay:m,currentId:h,setCurrentId:g}=iu(l,{id:a}),{getReferenceProps:_,getFloatingProps:v}=mu([$l(l,{enabled:e.events?.hover,delay:i?m:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events?.touch}),fu(l,{enabled:e.events?.focus,visibleOnly:!0}),gu(l,{role:`tooltip`}),cu(l,{enabled:e.opened===void 0})]);br(()=>{e.onPositionChange?.(d)},[d]);let y=r&&h&&h!==a;return{x:s,y:c,arrowX:f,arrowY:p,reference:u.setReference,floating:u.setFloating,getFloatingProps:v,getReferenceProps:_,isGroupPhase:y,opened:r,placement:d}}var Uh={position:`top`,refProp:`ref`,withinPortal:!0,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:`side`,offset:5,transitionProps:{duration:100,transition:`fade`},events:{hover:!0,focus:!1,touch:!1},zIndex:er(`popover`),middlewares:{flip:!0,shift:!0,inline:!1}},Wh=B((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({theme:e,color:n||e.primaryColor,autoContrast:i,variant:r||`filled`});return{tooltip:{"--tooltip-radius":t===void 0?void 0:ar(t),"--tooltip-bg":n?a.background:void 0,"--tooltip-color":n?a.color:void 0}}}),Gh=G(e=>{let t=U(`Tooltip`,Uh,e),{children:n,position:r,refProp:i,label:a,openDelay:o,closeDelay:s,onPositionChange:c,opened:l,defaultOpened:u,withinPortal:d,radius:f,color:p,classNames:m,styles:h,unstyled:g,style:_,className:v,withArrow:y,arrowSize:b,arrowOffset:S,arrowRadius:C,arrowPosition:w,offset:T,transitionProps:E,multiline:D,events:O,zIndex:k,disabled:A,onClick:j,onMouseEnter:ee,onMouseLeave:M,inline:te,variant:ne,keepMounted:N,vars:P,portalProps:re,mod:ie,floatingStrategy:ae,middlewares:oe,autoContrast:se,attributes:F,target:ce,ref:le,...ue}=t,{dir:de}=uo(),fe=(0,x.useRef)(null),I=Hh({position:Pu(de,r),closeDelay:s,openDelay:o,onPositionChange:c,opened:l,defaultOpened:u,events:O,arrowRef:fe,arrowOffset:S,offset:typeof T==`number`?T+(y?b/2:0):T,inline:te,strategy:ae,middlewares:oe});(0,x.useEffect)(()=>{let e=ce instanceof HTMLElement?ce:typeof ce==`string`?document.querySelector(ce):ce?.current||null;e&&I.reference(e)},[ce,I]);let pe=W({name:`Tooltip`,props:t,classes:Nh,className:v,style:_,classNames:m,styles:h,unstyled:g,attributes:F,rootSelector:`tooltip`,vars:P,varsResolver:Wh}),me=Gr(n);if(!ce&&!me)throw Error(`[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let he=pe(`tooltip`);if(ce){let e=Xu(E,{duration:100,transition:`fade`});return(0,H.jsx)(H.Fragment,{children:(0,H.jsx)(Uu,{...re,withinPortal:d,children:(0,H.jsx)(Ju,{...e,keepMounted:N,mounted:!A&&!!I.opened,duration:I.isGroupPhase?10:e.duration,children:e=>(0,H.jsxs)(q,{...ue,"data-fixed":ae===`fixed`||void 0,variant:ne,mod:[{multiline:D},ie],...he,...I.getFloatingProps({ref:I.floating,className:he.className,style:{...he.style,...e,zIndex:k,top:I.y??0,left:I.x??0}}),children:[a,(0,H.jsx)(Nu,{ref:fe,arrowX:I.arrowX,arrowY:I.arrowY,visible:y,position:I.placement,arrowSize:b,arrowOffset:S,arrowRadius:C,arrowPosition:w,...pe(`arrow`)})]})})})})}let ge=me.props,_e=Ir(I.reference,Vr(me),le),ve=Xu(E,{duration:100,transition:`fade`});return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Uu,{...re,withinPortal:d,children:(0,H.jsx)(Ju,{...ve,keepMounted:N,mounted:!A&&!!I.opened,duration:I.isGroupPhase?10:ve.duration,children:e=>(0,H.jsxs)(q,{...ue,"data-fixed":ae===`fixed`||void 0,variant:ne,mod:[{multiline:D},ie],...I.getFloatingProps({ref:I.floating,className:pe(`tooltip`).className,style:{...pe(`tooltip`).style,...e,zIndex:k,top:I.y??0,left:I.x??0}}),children:[a,(0,H.jsx)(Nu,{ref:fe,arrowX:I.arrowX,arrowY:I.arrowY,visible:y,position:I.placement,arrowSize:b,arrowOffset:S,arrowRadius:C,arrowPosition:w,...pe(`arrow`)})]})})}),(0,x.cloneElement)(me,I.getReferenceProps({onClick:j,onMouseEnter:ee,onMouseLeave:M,onMouseMove:t.onMouseMove,onPointerDown:t.onPointerDown,onPointerEnter:t.onPointerEnter,...ge,className:qr(v,ge.className),[i]:_e}))]})});Gh.classes=Nh,Gh.varsResolver=Wh,Gh.displayName=`@mantine/core/Tooltip`,Gh.Floating=Ih,Gh.Group=zh;var Kh={size:`sm`,withCheckIcon:!0,allowDeselect:!0,checkIconPosition:`left`,openOnFocus:!0},qh=no(e=>{let t=U([`Input`,`InputWrapper`,`Select`],Kh,e),{classNames:n,styles:r,unstyled:i,vars:a,dropdownOpened:o,defaultDropdownOpened:s,onDropdownClose:c,onDropdownOpen:l,onFocus:u,onBlur:d,onClick:f,onChange:p,data:m,value:h,defaultValue:g,selectFirstOptionOnChange:_,selectFirstOptionOnDropdownOpen:v,onOptionSubmit:y,comboboxProps:b,readOnly:S,disabled:C,filter:w,limit:T,withScrollArea:E,maxDropdownHeight:D,size:O,searchable:k,rightSection:A,checkIconPosition:j,withCheckIcon:ee,withAlignedLabels:M,nothingFoundMessage:te,name:ne,form:N,searchValue:P,defaultSearchValue:re,onSearchChange:ie,allowDeselect:ae,error:oe,rightSectionPointerEvents:se,id:F,clearable:ce,clearSectionMode:le,clearButtonProps:ue,hiddenInputProps:de,renderOption:fe,onClear:I,autoComplete:pe,scrollAreaProps:me,__defaultRightSection:he,__clearSection:ge,__clearable:_e,chevronColor:ve,autoSelectOnBlur:ye,openOnFocus:be,attributes:xe,...Se}=t,Ce=(0,x.useMemo)(()=>Yp(m),[m]),we=(0,x.useRef)({}),Te=(0,x.useMemo)(()=>Xp(Ce),[Ce]),L=Mr(F),[R,Ee,De]=Lr({value:h,defaultValue:g,finalValue:null,onChange:p}),Oe=R==null?void 0:`${R}`in Te?Te[`${R}`]:we.current[`${R}`],ke=Br(Oe),[Ae,je,Me]=Lr({value:P,defaultValue:re,finalValue:Oe?Oe.label:``,onChange:ie}),Ne=wm({opened:o,defaultOpened:s,onDropdownOpen:()=>{l?.(),v?Ne.selectFirstOption():Ne.updateSelectedOptionIndex(`active`,{scrollIntoView:!0})},onDropdownClose:()=>{c?.(),setTimeout(Ne.resetSelectedOption,0)}}),Pe=e=>{je(e),Ne.resetSelectedOption()},{resolvedClassNames:Fe,resolvedStyles:Ie}=ca({props:t,styles:r,classNames:n});(0,x.useEffect)(()=>{_&&Ne.selectFirstOption()},[_,Ae]),(0,x.useEffect)(()=>{h===null&&Pe(``),h!=null&&Oe&&(ke?.value!==Oe.value||ke?.label!==Oe.label)&&Pe(Oe.label)},[h,Oe]),(0,x.useEffect)(()=>{!De&&!Me&&Pe(R==null?``:`${R}`in Te?Te[`${R}`]?.label:we.current[`${R}`]?.label||``)},[Te,R]),(0,x.useEffect)(()=>{R&&`${R}`in Te&&(we.current[`${R}`]=Te[`${R}`])},[Te,R]);let Le=(0,H.jsx)(Dm.ClearButton,{...ue,onClear:()=>{Ee(null,null),Pe(``),I?.()}}),Re=ce&&R!=null&&!C&&!S;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(Dm,{store:Ne,__staticSelector:`Select`,classNames:Fe,styles:Ie,unstyled:i,readOnly:S,size:O,attributes:xe,keepMounted:ye,onOptionSubmit:e=>{y?.(e);let t=ae&&`${Te[e].value}`==`${R}`?null:Te[e],n=t?t.value:null;n!==R&&Ee(n,t),!De&&Pe(n==null?``:t?.label||``),Ne.closeDropdown()},...b,children:[(0,H.jsx)(Dm.Target,{targetType:k?`input`:`button`,autoComplete:pe,withExpandedAttribute:!0,children:(0,H.jsx)(hp,{id:L,__defaultRightSection:(0,H.jsx)(Dm.Chevron,{size:O,error:oe,unstyled:i,color:ve}),__clearSection:Le,__clearable:Re,__clearSectionMode:le,rightSection:A,rightSectionPointerEvents:se||`none`,...Se,size:O,__staticSelector:`Select`,disabled:C,readOnly:S||!k,value:Ae,onChange:e=>{Pe(e.currentTarget.value),Ne.openDropdown(),_&&Ne.selectFirstOption()},onFocus:e=>{be&&k&&Ne.openDropdown(),u?.(e)},onBlur:e=>{ye&&Ne.clickSelectedOption(),k&&Ne.closeDropdown();let t=R!=null&&(`${R}`in Te?Te[`${R}`]:we.current[`${R}`]);Pe(t&&t.label||``),d?.(e)},onClick:e=>{k?Ne.openDropdown():Ne.toggleDropdown(),f?.(e)},classNames:Fe,styles:Ie,unstyled:i,pointer:!k,error:oe,attributes:xe})}),(0,H.jsx)(nh,{data:Ce,hidden:S||C,filter:w,search:Ae,limit:T,hiddenWhenEmpty:!te,withScrollArea:E,maxDropdownHeight:D,filterOptions:!!k&&Oe?.label!==Ae,value:R,checkIconPosition:j,withCheckIcon:ee,withAlignedLabels:M,nothingFoundMessage:te,unstyled:i,labelId:Se.label?`${L}-label`:void 0,"aria-label":Se.label?void 0:Se[`aria-label`],renderOption:fe,scrollAreaProps:me})]}),(0,H.jsx)(Dm.HiddenInput,{value:R,name:ne,form:N,disabled:C,...de})]})});qh.classes={...hp.classes,...Dm.classes},qh.displayName=`@mantine/core/Select`;function Jh(e){if(e!==void 0)return typeof e==`number`?z(e):e}function Yh({spacing:e,verticalSpacing:t,cols:n,minColWidth:r,autoRows:i,selector:a}){let o=Wi(),s=t===void 0?e:t,c=r!==void 0,l=Yn({"--sg-spacing-x":ir(dr(e)),"--sg-spacing-y":ir(dr(s)),"--sg-auto-rows":i,...c?{"--sg-min-col-width":Jh(r)}:{"--sg-cols":dr(n)?.toString()}}),u=Bn(o.breakpoints).reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=ir(e[r])),typeof s==`object`&&s[r]!==void 0&&(t[r][`--sg-spacing-y`]=ir(s[r])),!c&&typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{});return(0,H.jsx)(Ta,{styles:l,media:ur(Bn(u),o.breakpoints).filter(e=>Bn(u[e.value]).length>0).map(e=>({query:`(min-width: ${o.breakpoints[e.value]})`,styles:u[e.value]})),selector:a})}function Xh(e){return typeof e==`object`&&e?Bn(e):[]}function Zh(e){return e.sort((e,t)=>Gn(e)-Gn(t))}function Qh({spacing:e,verticalSpacing:t,cols:n,minColWidth:r}){return Zh(Array.from(new Set([...Xh(e),...Xh(t),...r===void 0?Xh(n):[]])))}function $h({spacing:e,verticalSpacing:t,cols:n,minColWidth:r,autoRows:i,selector:a}){let o=t===void 0?e:t,s=r!==void 0,c=Yn({"--sg-spacing-x":ir(dr(e)),"--sg-spacing-y":ir(dr(o)),"--sg-auto-rows":i,...s?{"--sg-min-col-width":Jh(r)}:{"--sg-cols":dr(n)?.toString()}}),l=Qh({spacing:e,verticalSpacing:t,cols:n,minColWidth:r}),u=l.reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=ir(e[r])),typeof o==`object`&&o[r]!==void 0&&(t[r][`--sg-spacing-y`]=ir(o[r])),!s&&typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{});return(0,H.jsx)(Ta,{styles:c,container:l.map(e=>({query:`simple-grid (min-width: ${e})`,styles:u[e]})),selector:a})}var eg={container:`m_925c2d2c`,root:`m_2415a157`},tg={cols:1,spacing:`md`,type:`media`},ng=G(e=>{let t=U(`SimpleGrid`,tg,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,cols:c,verticalSpacing:l,spacing:u,type:d,minColWidth:f,autoFlow:p,autoRows:m,attributes:h,...g}=t,_=W({name:`SimpleGrid`,classes:eg,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s}),v=Za(),y=f===void 0?void 0:p||`auto-fill`;return d===`container`?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)($h,{...t,selector:`.${v}`}),(0,H.jsx)(`div`,{..._(`container`),children:(0,H.jsx)(q,{..._(`root`,{className:v}),...g,"data-auto-cols":y})})]}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Yh,{...t,selector:`.${v}`}),(0,H.jsx)(q,{..._(`root`,{className:v}),...g,"data-auto-cols":y})]})});ng.classes=eg,ng.displayName=`@mantine/core/SimpleGrid`;var rg={root:`m_6d731127`},ig={gap:`md`,align:`stretch`,justify:`flex-start`},ag=B((e,{gap:t,align:n,justify:r})=>({root:{"--stack-gap":ir(t),"--stack-align":n,"--stack-justify":r}})),og=G(e=>{let t=U(`Stack`,ig,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,align:c,justify:l,gap:u,variant:d,attributes:f,...p}=t;return(0,H.jsx)(q,{...W({name:`Stack`,props:t,classes:rg,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:ag})(`root`),variant:d,...p})});og.classes=rg,og.varsResolver=ag,og.displayName=`@mantine/core/Stack`;var sg=G(e=>(0,H.jsx)(hp,{component:`input`,...U([`Input`,`InputWrapper`,`TextInput`],null,e),__staticSelector:`TextInput`}));sg.classes=hp.classes,sg.displayName=`@mantine/core/TextInput`;var cg=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],lg=[`xs`,`sm`,`md`,`lg`,`xl`];function ug(e,t){let n=t===void 0?`h${e}`:t;return cg.includes(n)?{fontSize:`var(--mantine-${n}-font-size)`,fontWeight:`var(--mantine-${n}-font-weight)`,lineHeight:`var(--mantine-${n}-line-height)`}:lg.includes(n)?{fontSize:`var(--mantine-font-size-${n})`,fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}:{fontSize:z(n),fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}}var dg={root:`m_8a5d1357`},fg={order:1},pg=B((e,{order:t,size:n,lineClamp:r,textWrap:i})=>{let a=ug(t||1,n);return{root:{"--title-fw":a.fontWeight,"--title-lh":a.lineHeight,"--title-fz":a.fontSize,"--title-line-clamp":typeof r==`number`?r.toString():void 0,"--title-text-wrap":i}}}),mg=G(e=>{let t=U(`Title`,fg,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,order:s,vars:c,size:l,variant:u,lineClamp:d,textWrap:f,mod:p,attributes:m,...h}=t,g=W({name:`Title`,props:t,classes:dg,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:m,vars:c,varsResolver:pg});return[1,2,3,4,5,6].includes(s)?(0,H.jsx)(q,{...g(`root`),component:`h${s}`,variant:u,mod:[{order:s,"data-line-clamp":typeof d==`number`},p],size:l,...h}):null});mg.classes=dg,mg.varsResolver=pg,mg.displayName=`@mantine/core/Title`;var hg=g(),gg=sa({primaryColor:`blue`,defaultRadius:`md`,fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif`,headings:{fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif`}});async function _g(e,t){let n=new Headers(t?.headers);t?.body!==void 0&&!n.has(`Content-Type`)&&n.set(`Content-Type`,`application/json`);let r=await fetch(e,{...t,headers:n}),i=await r.json();if(!r.ok)throw Error(i.error??`Request failed: ${r.status}`);return i}var vg={status:()=>_g(`/api/status`),settings:()=>_g(`/api/settings`),saveSettings:e=>_g(`/api/settings`,{method:`PUT`,body:JSON.stringify({ides:e})}),repos:()=>_g(`/api/repos`),addRepo:(e,t,n)=>_g(`/api/repos`,{method:`POST`,body:JSON.stringify({url:e,ref:t,...n?{id:n}:{}})}),deleteRepo:e=>_g(`/api/repos/${e}`,{method:`DELETE`}),fetchRepo:e=>_g(`/api/repos/${e}/fetch`,{method:`POST`}),checkRepoUpdates:e=>_g(`/api/repos/${e}/check-updates`,{method:`POST`}),pullRepo:e=>_g(`/api/repos/${e}/pull`,{method:`POST`}),artifacts:(e,t)=>_g(`/api/repos/${e}/artifacts${t?`?projectPath=${encodeURIComponent(t)}`:``}`),installations:()=>_g(`/api/installations`),saveInstallations:e=>_g(`/api/installations`,{method:`PUT`,body:JSON.stringify({installations:e})}),apply:()=>_g(`/api/apply`,{method:`POST`})};function yg(e,t){let n=e.replace(/\/$/,``),r=t.replace(/\/$/,``);return n===r?`~`:n.startsWith(`${r}/`)?`~${n.slice(r.length)}`:e}var bg=[{id:`codex`,label:`Codex`},{id:`claude`,label:`Claude`},{id:`cursor`,label:`Cursor`}];function xg(){let[e,t]=(0,x.useState)(null),[n,r]=(0,x.useState)(``),[i,a]=(0,x.useState)(``),[o,s]=(0,x.useState)(!1),[c,l]=(0,x.useState)(null),[u,d]=(0,x.useState)(null),f=(0,x.useCallback)(async()=>{let e=await vg.settings();t(e.ides),r(e.home),a(e.version)},[]);(0,x.useEffect)(()=>{f().catch(e=>l(e instanceof Error?e.message:String(e)))},[f]);let p=(0,x.useCallback)(async e=>{s(!0),l(null),d(null);try{let{ides:n}=await vg.saveSettings(e);t(n),d(`Settings saved`),await vg.apply()}catch(e){l(e instanceof Error?e.message:String(e))}finally{s(!1)}},[]);function m(n,r){if(!e)return;let i={...e,[n]:{...e[n],...r}};if([`cursor`,`claude`,`codex`].filter(e=>i[e].enabled).length===0){l(`At least one IDE must be enabled`);return}t(i),p(i)}function h(t){e&&p(e)}if(!e)return null;let g=n.replace(/\/\.ide-agents$/,``)||n;return(0,H.jsxs)(og,{gap:`lg`,children:[(0,H.jsxs)(og,{gap:4,children:[(0,H.jsx)(mg,{order:2,children:`Settings`}),(0,H.jsxs)(Cp,{size:`sm`,c:`dimmed`,children:[`Data directory: `,(0,H.jsx)(Dh,{children:n}),` · v`,i]})]}),(0,H.jsx)(Ou,{withBorder:!0,p:`md`,radius:`md`,children:(0,H.jsxs)(og,{gap:`lg`,children:[(0,H.jsx)(mg,{order:4,children:`What do you use?`}),(0,H.jsx)(Cp,{size:`sm`,c:`dimmed`,children:`Enabled tools receive symlinks when you install skills or agents. At least one tool should stay enabled.`}),bg.map(({id:n,label:r})=>(0,H.jsxs)(og,{gap:`xs`,children:[(0,H.jsx)(Ym,{label:r,checked:e[n].enabled,disabled:o,onChange:e=>m(n,{enabled:e.currentTarget.checked})}),(0,H.jsx)(sg,{label:`Config path`,value:yg(e[n].configPath,g),disabled:o||!e[n].enabled,onChange:e=>t(t=>t&&{...t,[n]:{...t[n],configPath:e.currentTarget.value}}),onBlur:()=>h(n)})]},n))]})}),c&&(0,H.jsx)(vp,{color:`red`,title:`Error`,variant:`light`,children:c}),u&&(0,H.jsx)(vp,{color:`green`,title:`Success`,variant:`light`,children:u})]})}var Sg={compact:`_compact_1rs7b_1`,hoverDetails:`_hoverDetails_1rs7b_10`,hoverDetailsInner:`_hoverDetailsInner_1rs7b_25`};function Cg({repo:e,loading:t,onAdd:n}){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Cp,{size:`sm`,c:`dimmed`,children:e.description}),(0,H.jsx)(Cp,{size:`xs`,c:`dimmed`,style:{wordBreak:`break-all`},children:e.url}),(0,H.jsx)(_h,{variant:`light`,size:`sm`,disabled:t,onClick:n,children:`Add / Clone`})]})}function wg({repo:e,primary:t=!1,loading:n,onAdd:r}){return t?(0,H.jsx)(Ou,{withBorder:!0,p:`md`,radius:`md`,children:(0,H.jsxs)(og,{gap:`sm`,children:[(0,H.jsx)(Cp,{fw:600,children:e.name}),(0,H.jsx)(Cg,{repo:e,loading:n,onAdd:r})]})}):(0,H.jsx)(Ou,{withBorder:!0,p:`md`,radius:`md`,tabIndex:0,className:Sg.compact,children:(0,H.jsxs)(og,{gap:`sm`,children:[(0,H.jsx)(Cp,{fw:600,children:e.name}),(0,H.jsx)(`div`,{className:Sg.hoverDetails,children:(0,H.jsx)(`div`,{className:Sg.hoverDetailsInner,children:(0,H.jsx)(og,{gap:`sm`,children:(0,H.jsx)(Cg,{repo:e,loading:n,onAdd:r})})})})]})})}var Tg=[{id:`repo-audit-skills`,name:`sergeychernov/repo-audit-skills`,url:`https://github.com/sergeychernov/repo-audit-skills.git`,ref:`main`,description:`Skills for repository audits — stack detection, architecture, code smells, security, and more.`},{id:`anthropics-skills`,name:`anthropics/skills`,url:`https://github.com/anthropics/skills.git`,ref:`main`,description:`Reference Agent Skills from Anthropic — documents, PDF, spreadsheets, design, and more.`},{id:`cursorskills`,name:`bluriesophos/cursorskills`,url:`https://github.com/bluriesophos/cursorskills.git`,ref:`main`,description:`Cursor workflow skills — planning, debugging, code review, scope discipline, verification.`}];function Eg(e){return e.trim().replace(/\.git$/i,``).replace(/\/$/,``).toLowerCase()}function Dg(e){return e.id===Tg[0]?.id}function Og(e,t){let n=Eg(e.url);return t.some(e=>Eg(e)===n)}function kg(e){return e.error?e.error:e.behind===null?`Unknown (fetch to check)`:e.behind===0?`Up to date`:`${e.behind} commit(s) behind remote`}function Ag(e){let t=[e.git.dirty?`Dirty working tree`:`Clean`];return e.git.behind!==null&&e.git.behind>0?t.push(`${e.git.behind} behind`):e.git.behind===0&&t.push(`up to date`),t.join(` · `)}function jg({onReposChange:e}){let[t,n]=(0,x.useState)([]),[r,i]=(0,x.useState)(null),[a,o]=(0,x.useState)(``),[s,c]=(0,x.useState)(`main`),[l,u]=(0,x.useState)(!1),[d,f]=(0,x.useState)(null),[p,m]=(0,x.useState)(null),h=(0,x.useCallback)(async()=>{let t=await vg.repos();n(t.repos),t.repos.length>0&&!r&&i(t.repos[0].id),e?.()},[r,e]);(0,x.useEffect)(()=>{h().catch(e=>f(e instanceof Error?e.message:String(e)))},[h]);let g=t.find(e=>e.id===r)??null,_=(0,x.useMemo)(()=>t.map(e=>e.url),[t]),v=(0,x.useMemo)(()=>Tg.filter(e=>!Og(e,_)),[_]),y=v.find(Dg),b=v.filter(e=>!Dg(e));async function S(t){t.preventDefault(),u(!0),f(null),m(null);try{let{repo:t}=await vg.addRepo(a.trim(),s.trim()||`main`);n(e=>[...e,t]),i(t.id),o(``),m(`Cloned ${t.url}`),e?.()}catch(e){f(e instanceof Error?e.message:String(e))}finally{u(!1)}}async function C(e){u(!0),f(null),m(null);try{let{git:t}=await vg.checkRepoUpdates(e);n(n=>n.map(n=>n.id===e?{...n,git:t}:n)),m(kg(t))}catch(e){f(e instanceof Error?e.message:String(e))}finally{u(!1)}}async function w(e){u(!0),f(null),m(null);try{let{git:t}=await vg.pullRepo(e);n(n=>n.map(n=>n.id===e?{...n,git:t}:n)),m(`Pull completed`)}catch(e){f(e instanceof Error?e.message:String(e))}finally{u(!1)}}async function T(t){u(!0),f(null),m(null);try{let{repo:r}=await vg.addRepo(t.url,t.ref,t.id);n(e=>[...e,r]),i(r.id),m(`Cloned ${t.name}`),e?.()}catch(e){f(e instanceof Error?e.message:String(e))}finally{u(!1)}}async function E(t){if(confirm(`Remove this repository from config?`)){u(!0),f(null);try{await vg.deleteRepo(t),n(e=>e.filter(e=>e.id!==t)),r===t&&i(null),e?.()}catch(e){f(e instanceof Error?e.message:String(e))}finally{u(!1)}}}return(0,H.jsxs)(og,{gap:`lg`,children:[(0,H.jsx)(mg,{order:2,children:`Repositories`}),(0,H.jsx)(Ou,{withBorder:!0,p:`md`,radius:`md`,children:(0,H.jsxs)(og,{gap:`md`,children:[(0,H.jsx)(mg,{order:4,children:`Add repository`}),(0,H.jsx)(`form`,{onSubmit:S,children:(0,H.jsxs)(og,{gap:`md`,children:[(0,H.jsx)(sg,{label:`Git URL`,placeholder:`https://github.com/org/skills.git or file:///path/to/repo`,value:a,onChange:e=>o(e.currentTarget.value),required:!0}),(0,H.jsx)(sg,{label:`Ref (branch/tag)`,value:s,onChange:e=>c(e.currentTarget.value)}),(0,H.jsx)(Fd,{children:(0,H.jsx)(_h,{type:`submit`,loading:l,children:`Add / Clone`})})]})})]})}),d&&(0,H.jsx)(vp,{color:`red`,title:`Error`,variant:`light`,children:d}),p&&(0,H.jsx)(vp,{color:`green`,title:`Success`,variant:`light`,children:p}),v.length>0&&(0,H.jsxs)(og,{gap:`md`,children:[(0,H.jsx)(mg,{order:4,children:`Suggested skill repositories`}),(0,H.jsxs)(Cp,{size:`sm`,c:`dimmed`,children:[`Public catalogs with `,(0,H.jsx)(Dh,{children:`SKILL.md`}),` — one click to clone.`]}),y&&(0,H.jsx)(wg,{repo:y,primary:!0,loading:l,onAdd:()=>T(y)}),b.length>0&&(0,H.jsx)(ng,{cols:{base:1,sm:2},spacing:`md`,children:b.map(e=>(0,H.jsx)(wg,{repo:e,loading:l,onAdd:()=>T(e)},e.id))})]}),(0,H.jsxs)(og,{gap:`md`,children:[(0,H.jsx)(mg,{order:4,children:`Your repositories`}),t.length===0?(0,H.jsx)(Cp,{c:`dimmed`,children:`No repositories yet. Pick a suggested catalog above or add a custom URL.`}):t.map(e=>{let t=r===e.id;return(0,H.jsx)(Ou,{withBorder:!0,p:`md`,radius:`md`,style:{cursor:`pointer`,borderColor:t?`var(--mantine-color-blue-outline)`:void 0,background:t?`var(--mantine-color-blue-light)`:void 0},onClick:()=>i(e.id),children:(0,H.jsxs)(og,{gap:`sm`,children:[(0,H.jsxs)(Fd,{justify:`space-between`,align:`flex-start`,wrap:`wrap`,children:[(0,H.jsxs)(og,{gap:2,children:[(0,H.jsx)(Cp,{fw:600,children:e.id}),(0,H.jsx)(Cp,{size:`sm`,c:`dimmed`,style:{wordBreak:`break-all`},children:e.url})]}),t&&(0,H.jsx)(ah,{color:`blue`,children:`Selected`})]}),(0,H.jsxs)(ng,{cols:{base:1,sm:2},spacing:`xs`,children:[(0,H.jsxs)(Cp,{size:`sm`,children:[(0,H.jsxs)(Cp,{span:!0,c:`dimmed`,children:[`Contents:`,` `]}),e.skillCount,` skill`,e.skillCount===1?``:`s`,e.agentCount>0?` · ${e.agentCount} agent${e.agentCount===1?``:`s`}`:``]}),(0,H.jsxs)(Cp,{size:`sm`,children:[(0,H.jsxs)(Cp,{span:!0,c:`dimmed`,children:[`Local path:`,` `]}),(0,H.jsx)(Dh,{block:!0,mt:4,children:e.localPath})]}),(0,H.jsxs)(Cp,{size:`sm`,children:[(0,H.jsxs)(Cp,{span:!0,c:`dimmed`,children:[`Branch:`,` `]}),e.git.branch??`—`]}),(0,H.jsxs)(Cp,{size:`sm`,children:[(0,H.jsxs)(Cp,{span:!0,c:`dimmed`,children:[`Commit:`,` `]}),(0,H.jsx)(Dh,{children:e.git.sha?.slice(0,8)??`—`})]}),(0,H.jsxs)(Cp,{size:`sm`,children:[(0,H.jsxs)(Cp,{span:!0,c:`dimmed`,children:[`Status:`,` `]}),Ag(e)]})]}),t&&(0,H.jsxs)(Fd,{gap:`xs`,mt:`xs`,onClick:e=>e.stopPropagation(),wrap:`wrap`,children:[(0,H.jsx)(_h,{variant:`light`,size:`sm`,disabled:l,onClick:()=>w(e.id),children:`Pull`}),(0,H.jsx)(_h,{variant:`light`,size:`sm`,disabled:l,onClick:()=>C(e.id),children:`Check for updates`}),(0,H.jsx)(_h,{variant:`light`,color:`red`,size:`sm`,disabled:l,onClick:()=>E(e.id),children:`Remove`})]})]})},e.id)})]}),g&&(0,H.jsxs)(Cp,{size:`sm`,c:`dimmed`,children:[`Selected: `,(0,H.jsx)(Cp,{span:!0,fw:600,children:g.id}),`. Use Skills or Agents to install from this repo.`]})]})}var Mg={outline:{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},filled:{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`currentColor`,stroke:`none`}},Ng=(e,t,n,r)=>{let i=(0,x.forwardRef)(({color:n=`currentColor`,size:i=24,stroke:a=2,title:o,className:s,children:c,...l},u)=>(0,x.createElement)(`svg`,{ref:u,...Mg[e],width:i,height:i,className:[`tabler-icon`,`tabler-icon-${t}`,s].join(` `),...e===`filled`?{fill:n}:{strokeWidth:a,stroke:n},...l},[o&&(0,x.createElement)(`title`,{key:`svg-title`},o),...r.map(([e,t])=>(0,x.createElement)(e,t)),...Array.isArray(c)?c:[c]]));return i.displayName=`${n}`,i},Pg=Ng(`outline`,`folder`,`Folder`,[[`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`}]]),Fg=Ng(`outline`,`world`,`World`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0`,key:`svg-0`}],[`path`,{d:`M3.6 9h16.8`,key:`svg-1`}],[`path`,{d:`M3.6 15h16.8`,key:`svg-2`}],[`path`,{d:`M11.5 3a17 17 0 0 0 0 18`,key:`svg-3`}],[`path`,{d:`M12.5 3a17 17 0 0 1 0 18`,key:`svg-4`}]]);function Ig(e){return e===`global`||e===`any`}function Lg(e){return e===`project`||e===`any`}function Rg(e){return Ig(e.artifact.allowedScope)?e.artifact.targets?.global.blocked??!1:!0}function zg(e){return!Lg(e.artifact.allowedScope)||!e.projectPath.trim()?!0:e.artifact.targets?.project?.blocked??!1}function Bg(e){if(Rg(e))return e.artifact.targets?.global.blocked?`A regular folder/file already exists at the global path`:e.artifact.allowedScope?`Not allowed by skill scope`:`Set scope in SKILL.md frontmatter`}function Vg(e){if(zg(e))return e.artifact.targets?.project?.blocked?`A regular folder/file already exists at the project path`:e.artifact.allowedScope?e.artifact.allowedScope===`global`?`Skill is global-only`:e.projectPath.trim()?`Not allowed by skill scope`:`Enter a project path`:`Set scope in SKILL.md frontmatter`}function Hg({active:e,disabled:t,loading:n,label:r,reason:i,icon:a,onClick:o}){return(0,H.jsx)(Gh,{label:t&&i?i:r,multiline:!!(t&&i),maw:280,withArrow:!0,children:(0,H.jsx)(`span`,{style:{display:`inline-flex`},children:(0,H.jsx)(Td,{variant:e?`filled`:`light`,color:e?`blue`:`gray`,disabled:t||n,loading:n,"aria-label":r,"aria-pressed":e,onClick:o,children:(0,H.jsx)(a,{size:18,stroke:1.75})})})})}function Ug({row:e,applying:t,onGlobalClick:n,onProjectClick:r}){return(0,H.jsx)(wh,{withBorder:!0,padding:`lg`,radius:`md`,w:`100%`,maw:480,children:(0,H.jsxs)(og,{gap:`md`,children:[(0,H.jsxs)(Fd,{justify:`space-between`,align:`flex-start`,wrap:`nowrap`,children:[(0,H.jsx)(mg,{order:4,lineClamp:1,style:{flex:1},children:e.artifact.name}),(0,H.jsxs)(Fd,{gap:`xs`,wrap:`nowrap`,children:[(0,H.jsx)(Hg,{active:e.global,disabled:Rg(e),loading:t,label:`Global`,reason:Bg(e),icon:Fg,onClick:n}),(0,H.jsx)(Hg,{active:e.project,disabled:zg(e),loading:t,label:`Project`,reason:Vg(e),icon:Pg,onClick:r})]})]}),e.artifact.description?(0,H.jsx)(Cp,{size:`sm`,c:`dimmed`,lineClamp:3,children:e.artifact.description}):null,(0,H.jsx)(sg,{label:`Project path`,description:`Directory where ide-agents was started`,size:`sm`,value:e.projectPath,readOnly:!0,disabled:t})]})})}var Wg=480;function Gg({children:e}){return(0,H.jsx)(q,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(min(100%, ${Wg}px), ${Wg}px))`,gap:`var(--mantine-spacing-md)`},children:e})}function Kg(e,t,n,r){return e.map(e=>{let i=t.find(t=>t.repoId===n&&t.artifactId===e.id);return{artifact:e,global:i?.global??!1,project:i?.project??!1,projectPath:r,installationId:i?.id??null}})}function qg(e,t,n,r){let i=n.filter(e=>e.repoId!==t),a=n.filter(e=>e.repoId===t),o=[];for(let n of e){let e=a.find(e=>e.artifactId===n.artifact.id),i=n.project?r||null:e?.projectPath??null;o.push({id:n.installationId??crypto.randomUUID(),repoId:t,kind:n.artifact.kind,artifactId:n.artifact.id,sourcePath:n.artifact.sourcePath,targetName:n.artifact.id,global:n.global,project:n.project,projectPath:i})}return[...i,...o]}function Jg({kind:e,title:t,emptyHint:n}){let[r,i]=(0,x.useState)([]),[a,o]=(0,x.useState)(``),[s,c]=(0,x.useState)([]),[l,u]=(0,x.useState)([]),[d,f]=(0,x.useState)(null),[p,m]=(0,x.useState)(null),[h,g]=(0,x.useState)(``),[_,v]=(0,x.useState)(!1),y=(0,x.useMemo)(()=>s.filter(t=>t.artifact.kind===e),[s,e]),b=(0,x.useCallback)(async()=>{let[e,t]=await Promise.all([vg.repos(),vg.installations()]);i(e.repos),u(t.installations),e.repos.length>0&&o(t=>t||e.repos[0].id)},[]),S=(0,x.useCallback)(async(e,t,n)=>{let{artifacts:r}=await vg.artifacts(e,n||void 0);c(Kg(r,t,e,n))},[]);(0,x.useEffect)(()=>{Promise.all([b(),vg.status()]).then(([,e])=>{g(e.defaultProjectPath??``),v(!0)}).catch(e=>m(e instanceof Error?e.message:String(e)))},[b]),(0,x.useEffect)(()=>{!a||!_||S(a,l,h).catch(e=>m(e instanceof Error?e.message:String(e)))},[a,l,h,_,S]);let C=(0,x.useCallback)(async(e,t)=>{if(!a)return;let n=s,r=n.map(n=>{if(n.artifact.id!==e)return n;let r={...n,...t};return t.projectPath!==void 0&&!r.projectPath.trim()&&h&&(r.projectPath=h),r});c(r),f(e),m(null);try{let e=qg(r,a,l,h);await vg.saveInstallations(e),u(e),await vg.apply()}catch(e){c(n),m(e instanceof Error?e.message:String(e))}finally{f(null)}},[a,s,l,h]);function w(e){let t=s.find(t=>t.artifact.id===e);if(!t||Rg(t))return;let n=!t.global;C(e,{global:n,project:n?!1:t.project})}function T(e){let t=s.find(t=>t.artifact.id===e);if(!t||zg(t))return;let n=!t.project;C(e,{project:n,global:n?!1:t.global,...n?{projectPath:h}:{}})}let E=r.map(e=>({value:e.id,label:e.id}));return(0,H.jsxs)(og,{gap:`lg`,children:[(0,H.jsx)(mg,{order:2,children:t}),(0,H.jsx)(qh,{label:`Repository`,placeholder:`No repositories`,data:E,value:a||null,onChange:e=>o(e??``),disabled:r.length===0,maw:400}),p&&(0,H.jsx)(vp,{color:`red`,title:`Error`,variant:`light`,children:p}),y.length===0?(0,H.jsx)(Cp,{c:`dimmed`,children:n}):(0,H.jsx)(Gg,{children:y.map(e=>(0,H.jsx)(Ug,{row:e,applying:d===e.artifact.id,onGlobalClick:()=>w(e.artifact.id),onProjectClick:()=>T(e.artifact.id)},e.artifact.id))})]})}function Yg(){return(0,H.jsx)(Jg,{kind:`skill`,title:`Skills`,emptyHint:`No skills found. Add a repo with a skills/ directory on the Settings page.`})}function Xg(){return(0,H.jsx)(Jg,{kind:`agent`,title:`Agents`,emptyHint:`No agents found. Add a repo with an agents/ directory on the Settings page.`})}function Zg({catalog:e,onNavigate:t}){return(0,H.jsx)(H.Fragment,{children:[{to:`/settings`,label:`Settings`,enabled:!0},{to:`/repositories`,label:`Repositories`,enabled:!0},{to:`/skills`,label:`Skills`,enabled:e.skills,disabledHint:`Add a repository that contains skills`},{to:`/agents`,label:`Agents`,enabled:e.agents,disabledHint:`Add a repository that contains agents`}].map(e=>e.enabled?(0,H.jsx)(Cn,{to:e.to,onClick:t,style:({isActive:e})=>({textDecoration:`none`,fontWeight:e?600:400,color:e?`var(--mantine-color-blue-filled)`:`var(--mantine-color-text)`,padding:`8px 12px`,borderRadius:`var(--mantine-radius-md)`,background:e?`var(--mantine-color-blue-light)`:`transparent`}),children:e.label},e.to):(0,H.jsx)(Gh,{label:e.disabledHint,children:(0,H.jsx)(Cp,{size:`sm`,c:`dimmed`,px:12,py:8,style:{cursor:`not-allowed`,opacity:.55},children:e.label})},e.to))})}function Qg(){let[e,{toggle:t,close:n}]=zr(),r=et(),[i,a]=(0,x.useState)({skills:!1,agents:!1}),o=(0,x.useCallback)(async()=>{let{repos:e}=await vg.repos();a({skills:e.some(e=>e.skillCount>0),agents:e.some(e=>e.agentCount>0)})},[]);return(0,x.useEffect)(()=>{o().catch(()=>{a({skills:!1,agents:!1})})},[o,r.pathname]),(0,H.jsxs)(qp,{header:{height:56},navbar:{width:200,breakpoint:`sm`,collapsed:{desktop:!0,mobile:!e}},padding:`md`,children:[(0,H.jsx)(qp.Header,{children:(0,H.jsxs)(Fd,{h:`100%`,px:`md`,justify:`space-between`,children:[(0,H.jsxs)(Fd,{children:[(0,H.jsx)(ch,{opened:e,onClick:t,hiddenFrom:`sm`,size:`sm`}),(0,H.jsx)(mg,{order:3,size:`h4`,children:`ide-agents`})]}),(0,H.jsx)(Fd,{gap:`xs`,visibleFrom:`sm`,children:(0,H.jsx)(Zg,{catalog:i})})]})}),(0,H.jsx)(qp.Navbar,{p:`md`,hiddenFrom:`sm`,children:(0,H.jsx)(og,{gap:`xs`,children:(0,H.jsx)(Zg,{catalog:i,onNavigate:n})})}),(0,H.jsx)(qp.Main,{children:(0,H.jsx)(jh,{size:`lg`,py:`sm`,px:{base:`xs`,sm:`md`},children:(0,H.jsxs)(jt,{children:[(0,H.jsx)(kt,{path:`/`,element:(0,H.jsx)(Ot,{to:`/repositories`,replace:!0})}),(0,H.jsx)(kt,{path:`/settings`,element:(0,H.jsx)(xg,{})}),(0,H.jsx)(kt,{path:`/repositories`,element:(0,H.jsx)(jg,{onReposChange:o})}),(0,H.jsx)(kt,{path:`/skills`,element:i.skills?(0,H.jsx)(Yg,{}):(0,H.jsx)(Ot,{to:`/repositories`,replace:!0})}),(0,H.jsx)(kt,{path:`/agents`,element:i.agents?(0,H.jsx)(Xg,{}):(0,H.jsx)(Ot,{to:`/repositories`,replace:!0})}),(0,H.jsx)(kt,{path:`/artifacts`,element:(0,H.jsx)(Ot,{to:`/skills`,replace:!0})})]})})})]})}(0,hg.createRoot)(document.getElementById(`root`)).render((0,H.jsx)(x.StrictMode,{children:(0,H.jsx)(aa,{theme:gg,defaultColorScheme:`auto`,children:(0,H.jsx)(yn,{children:(0,H.jsx)(Qg,{})})})}));
|
|
51
|
+
`},Bf=0,Vf=[];function Hf(e){var t=x.useRef([]),n=x.useRef([0,0]),r=x.useRef(),i=x.useState(Bf++)[0],a=x.useState(uf)[0],o=x.useRef(e);x.useEffect(function(){o.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Rd([e.lockRef.current],(e.shards||[]).map(Lf),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=x.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Ff(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Of(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Of(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Pf(h,t,e,h===`h`?s:c,!0)},[]),c=x.useCallback(function(e){var n=e;if(!(!Vf.length||Vf[Vf.length-1]!==a)){var r=`deltaY`in n?If(n):Ff(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Rf(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(Lf).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=x.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Uf(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=x.useCallback(function(e){n.current=Ff(e),r.current=void 0},[]),d=x.useCallback(function(t){l(t.type,If(t),t.target,s(t,e.lockRef.current))},[]),f=x.useCallback(function(t){l(t.type,Ff(t),t.target,s(t,e.lockRef.current))},[]);x.useEffect(function(){return Vf.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,Cf),document.addEventListener(`touchmove`,c,Cf),document.addEventListener(`touchstart`,u,Cf),function(){Vf=Vf.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Cf),document.removeEventListener(`touchmove`,c,Cf),document.removeEventListener(`touchstart`,u,Cf)}},[]);var p=e.removeScrollBar,m=e.inert;return x.createElement(x.Fragment,null,m?x.createElement(a,{styles:zf(i)}):null,p?x.createElement(bf,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Uf(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Wf=Qd($d,Hf),Gf=x.forwardRef(function(e,t){return x.createElement(tf,Id({},e,{ref:t,sideCar:Wf}))});Gf.classNames=tf.classNames;var Kf=(0,x.createContext)({size:`sm`}),qf=G(e=>{let t=U(`InputClearButton`,null,e),{size:n,variant:r,vars:i,classNames:a,styles:o,...s}=t,c=(0,x.use)(Kf),{resolvedClassNames:l,resolvedStyles:u}=ca({classNames:a,styles:o,props:t});return(0,H.jsx)(Ad,{variant:r||`transparent`,size:n||c?.size||`sm`,classNames:l,styles:u,__staticSelector:`InputClearButton`,style:{pointerEvents:`all`,background:`var(--input-bg)`,...s.style},...s})});qf.displayName=`@mantine/core/InputClearButton`;var Jf={xs:7,sm:8,md:10,lg:12,xl:15};function Yf({__clearable:e,__clearSection:t,rightSection:n,__defaultRightSection:r,size:i=`sm`,__clearSectionMode:a=`both`}){let o=e&&t;return a===`rightSection`?n===null?null:n||r:a===`clear`?n===null?null:o||r:o&&(n||r)?(0,H.jsxs)(`div`,{"data-combined-clear-section":!0,style:{display:`flex`,gap:2,alignItems:`center`,paddingInlineEnd:Jf[i]},children:[o,n||r]}):n===null?null:n||o||r}var Xf=(0,x.createContext)({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0}),Zf={wrapper:`m_6c018570`,input:`m_8fb7ebe7`,section:`m_82577fc2`,placeholder:`m_88bacfd0`,root:`m_46b77525`,label:`m_8fdc1311`,required:`m_78a94662`,error:`m_8f816625`,description:`m_fe47ce59`},Qf=B((e,{size:t})=>({description:{"--input-description-size":t===void 0?void 0:`calc(${or(t)} - ${z(2)})`}})),$f=G(e=>{let t=U(`InputDescription`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,__inheritStyles:l=!0,attributes:u,...d}=U(`InputDescription`,null,t),f=(0,x.use)(Xf),p=W({name:[`InputWrapper`,c],props:t,classes:Zf,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,rootSelector:`description`,vars:s,varsResolver:Qf});return(0,H.jsx)(q,{component:`p`,...(l&&f?.getStyles||p)(`description`,f?.getStyles?{className:r,style:i}:void 0),...d})});$f.classes=Zf,$f.varsResolver=Qf,$f.displayName=`@mantine/core/InputDescription`;var ep=B((e,{size:t})=>({error:{"--input-error-size":t===void 0?void 0:`calc(${or(t)} - ${z(2)})`}})),tp=G(e=>{let t=U(`InputError`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,__staticSelector:l,__inheritStyles:u=!0,...d}=t,f=W({name:[`InputWrapper`,l],props:t,classes:Zf,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,rootSelector:`error`,vars:s,varsResolver:ep}),p=(0,x.use)(Xf);return(0,H.jsx)(q,{component:`p`,...(u&&p?.getStyles||f)(`error`,p?.getStyles?{className:r,style:i}:void 0),...d})});tp.classes=Zf,tp.varsResolver=ep,tp.displayName=`@mantine/core/InputError`;var np={labelElement:`label`},rp=B((e,{size:t})=>({label:{"--input-label-size":or(t),"--input-asterisk-color":void 0}})),ip=G(e=>{let t=U(`InputLabel`,np,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,labelElement:c,required:l,htmlFor:u,onMouseDown:d,children:f,__staticSelector:p,mod:m,attributes:h,...g}=t,_=W({name:[`InputWrapper`,p],props:t,classes:Zf,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,rootSelector:`label`,vars:s,varsResolver:rp}),v=(0,x.use)(Xf),y=v?.getStyles||_;return(0,H.jsxs)(q,{...y(`label`,v?.getStyles?{className:r,style:i}:void 0),component:c,htmlFor:c===`label`?u:void 0,mod:[{required:l},m],onMouseDown:e=>{d?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault()},...g,children:[f,l&&(0,H.jsx)(`span`,{...y(`required`),"aria-hidden":!0,children:` *`})]})});ip.classes=Zf,ip.varsResolver=rp,ip.displayName=`@mantine/core/InputLabel`;var ap=G(e=>{let t=U(`InputPlaceholder`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,error:l,mod:u,attributes:d,...f}=t;return(0,H.jsx)(q,{...W({name:[`InputPlaceholder`,c],props:t,classes:Zf,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:d,rootSelector:`placeholder`})(`placeholder`),mod:[{error:!!l},u],component:`span`,...f})});ap.classes=Zf,ap.displayName=`@mantine/core/InputPlaceholder`;function op(e,{hasDescription:t,hasError:n}){let r=e.findIndex(e=>e===`input`),i=e.slice(0,r),a=e.slice(r+1),o=t&&i.includes(`description`)||n&&i.includes(`error`);return{offsetBottom:t&&a.includes(`description`)||n&&a.includes(`error`),offsetTop:o}}var sp={labelElement:`label`,inputContainer:e=>e,inputWrapperOrder:[`label`,`description`,`input`,`error`]},cp=B((e,{size:t})=>({label:{"--input-label-size":or(t),"--input-asterisk-color":void 0},error:{"--input-error-size":t===void 0?void 0:`calc(${or(t)} - ${z(2)})`},description:{"--input-description-size":t===void 0?void 0:`calc(${or(t)} - ${z(2)})`}})),lp=G(e=>{let t=U(`InputWrapper`,sp,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,size:c,variant:l,__staticSelector:u,inputContainer:d,inputWrapperOrder:f,label:p,error:m,description:h,labelProps:g,descriptionProps:_,errorProps:v,labelElement:y,children:b,withAsterisk:S,id:C,required:w,__stylesApiProps:T,mod:E,attributes:D,...O}=t,k=W({name:[`InputWrapper`,u],props:T||t,classes:Zf,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:D,vars:s,varsResolver:cp}),A={size:c,variant:l,__staticSelector:u},j=Mr(C),ee=typeof S==`boolean`?S:w,M=v?.id||`${j}-error`,te=_?.id||`${j}-description`,ne=j,N=!!m&&typeof m!=`boolean`,P=!!h,re=`${N?M:``} ${P?te:``}`,ie=re.trim().length>0?re.trim():void 0,ae=g?.id||`${j}-label`,oe=p&&(0,H.jsx)(ip,{labelElement:y,id:ae,htmlFor:ne,required:ee,...A,...g,children:p},`label`),se=P&&(0,H.jsx)($f,{..._,...A,size:_?.size||A.size,id:_?.id||te,children:h},`description`),F=(0,H.jsx)(x.Fragment,{children:d(b)},`input`),ce=N&&(0,x.createElement)(tp,{...v,...A,size:v?.size||A.size,key:`error`,id:v?.id||M},m),le=f.map(e=>{switch(e){case`label`:return oe;case`input`:return F;case`description`:return se;case`error`:return ce;default:return null}});return(0,H.jsx)(Xf,{value:{getStyles:k,describedBy:ie,inputId:ne,labelId:ae,...op(f,{hasDescription:P,hasError:N})},children:(0,H.jsx)(q,{variant:l,size:c,mod:[{error:!!m},E],id:y===`label`?void 0:C,...k(`root`),...O,children:le})})});lp.classes=Zf,lp.varsResolver=cp,lp.displayName=`@mantine/core/InputWrapper`;var up={variant:`default`,leftSectionPointerEvents:`none`,rightSectionPointerEvents:`none`,withAria:!0,withErrorStyles:!0,size:`sm`,loading:!1,loadingPosition:`right`},dp=B((e,t,n)=>({wrapper:{"--input-margin-top":n.offsetTop?`calc(var(--mantine-spacing-xs) / 2)`:void 0,"--input-margin-bottom":n.offsetBottom?`calc(var(--mantine-spacing-xs) / 2)`:void 0,"--input-height":rr(t.size,`input-height`),"--input-fz":or(t.size),"--input-radius":t.radius===void 0?void 0:ar(t.radius),"--input-left-section-width":t.leftSectionWidth===void 0?void 0:z(t.leftSectionWidth),"--input-right-section-width":t.rightSectionWidth===void 0?void 0:z(t.rightSectionWidth),"--input-padding-y":t.multiline?rr(t.size,`input-padding-y`):void 0,"--input-left-section-pointer-events":t.leftSectionPointerEvents,"--input-right-section-pointer-events":t.rightSectionPointerEvents}})),fp=ro(e=>{let t=U(`Input`,up,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,required:s,__staticSelector:c,__stylesApiProps:l,size:u,wrapperProps:d,error:f,disabled:p,leftSection:m,leftSectionProps:h,leftSectionWidth:g,rightSection:_,rightSectionProps:v,rightSectionWidth:y,rightSectionPointerEvents:b,leftSectionPointerEvents:S,variant:C,vars:w,pointer:T,multiline:E,radius:D,id:O,withAria:k,withErrorStyles:A,mod:j,inputSize:ee,attributes:M,__clearSection:te,__clearable:ne,__clearSectionMode:N,__defaultRightSection:P,loading:re,loadingPosition:ie,rootRef:ae,dir:oe,...se}=t,{styleProps:F,rest:ce}=Oa(se),le=(0,x.use)(Xf),ue={offsetBottom:le?.offsetBottom,offsetTop:le?.offsetTop},de=W({name:[`Input`,c],props:l||t,classes:Zf,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:M,stylesCtx:ue,rootSelector:`wrapper`,vars:w,varsResolver:dp}),fe=k?{required:s,disabled:p,"aria-invalid":f?!0:void 0,"aria-describedby":le?.describedBy,id:le?.inputId||O}:{},I=re?(0,H.jsx)(vd,{size:ie===`left`?`calc(var(--input-left-section-size) / 2)`:`calc(var(--input-right-section-size) / 2)`}):null,pe=re&&ie===`left`?I:m,me=Yf({__clearable:ne,__clearSection:te,rightSection:re&&ie===`right`?I:_,__defaultRightSection:P,size:u,__clearSectionMode:N});return(0,H.jsx)(Kf,{value:{size:u||`sm`},children:(0,H.jsxs)(q,{ref:ae,dir:oe,...de(`wrapper`),...F,...d,mod:[{error:!!f&&A,pointer:T,disabled:p,multiline:E,"data-with-right-section":!!me,"data-with-left-section":!!pe},j],variant:C,size:u,children:[pe&&(0,H.jsx)(`div`,{...h,"data-position":`left`,...de(`section`,{className:h?.className,style:h?.style}),children:pe}),(0,H.jsx)(q,{component:`input`,...ce,...fe,required:s,mod:{disabled:p,error:!!f&&A},variant:C,__size:ee,...de(`input`)}),me&&(0,H.jsx)(`div`,{...v,"data-position":`right`,...de(`section`,{className:v?.className,style:v?.style}),children:me})]})})});fp.classes=Zf,fp.varsResolver=dp,fp.Wrapper=lp,fp.Label=ip,fp.Error=tp,fp.Description=$f,fp.Placeholder=ap,fp.ClearButton=qf,fp.displayName=`@mantine/core/Input`;function pp(e,t,n){let r=U([`Input`,`InputWrapper`,e],t,n),{label:i,description:a,error:o,required:s,classNames:c,styles:l,className:u,unstyled:d,__staticSelector:f,__stylesApiProps:p,errorProps:m,labelProps:h,descriptionProps:g,wrapperProps:_,id:v,size:y,style:b,inputContainer:x,inputWrapperOrder:S,withAsterisk:C,variant:w,vars:T,mod:E,attributes:D,...O}=r,{styleProps:k,rest:A}=Oa(O),j={label:i,description:a,error:o,required:s,classNames:c,className:u,__staticSelector:f,__stylesApiProps:p||r,errorProps:m,labelProps:h,descriptionProps:g,unstyled:d,styles:l,size:y,style:b,inputContainer:x,inputWrapperOrder:S,withAsterisk:C,variant:w,id:v,mod:E,attributes:D,..._};return{...A,classNames:c,styles:l,unstyled:d,wrapperProps:{...j,...k},inputProps:{required:s,classNames:c,styles:l,unstyled:d,size:y,__staticSelector:f,__stylesApiProps:p||r,error:o,variant:w,id:v,attributes:D}}}var mp={__staticSelector:`InputBase`,withAria:!0,size:`sm`},hp=ro(e=>{let{inputProps:t,wrapperProps:n,...r}=pp(`InputBase`,mp,e);return(0,H.jsx)(fp.Wrapper,{...n,children:(0,H.jsx)(fp,{...t,...r})})});hp.classes={...fp.classes,...fp.Wrapper.classes},hp.displayName=`@mantine/core/InputBase`;var gp={root:`m_66836ed3`,wrapper:`m_a5d60502`,body:`m_667c2793`,title:`m_6a03f287`,label:`m_698f4f23`,icon:`m_667f2a6a`,message:`m_7fa78076`,closeButton:`m_87f54839`},_p=B((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({color:n||e.primaryColor,theme:e,variant:r||`light`,autoContrast:i});return{root:{"--alert-radius":t===void 0?void 0:ar(t),"--alert-bg":n||r?a.background:void 0,"--alert-color":a.color,"--alert-bd":n||r?a.border:void 0}}}),vp=G(e=>{let t=U(`Alert`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,title:u,children:d,id:f,icon:p,withCloseButton:m,onClose:h,closeButtonLabel:g,variant:_,autoContrast:v,role:y,attributes:b,...x}=t,S=W({name:`Alert`,classes:gp,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:b,vars:s,varsResolver:_p}),C=Mr(f),w=u&&`${C}-title`||void 0,T=`${C}-body`;return(0,H.jsx)(q,{id:C,...S(`root`,{variant:_}),variant:_,...x,role:y||`alert`,"aria-describedby":d?T:void 0,"aria-labelledby":u?w:void 0,children:(0,H.jsxs)(`div`,{...S(`wrapper`),children:[p&&(0,H.jsx)(`div`,{...S(`icon`),children:p}),(0,H.jsxs)(`div`,{...S(`body`),children:[u&&(0,H.jsx)(`div`,{...S(`title`),"data-with-close-button":m||void 0,children:(0,H.jsx)(`span`,{id:w,...S(`label`),children:u})}),d&&(0,H.jsx)(`div`,{id:T,...S(`message`),"data-variant":_,children:d})]}),m&&(0,H.jsx)(Ad,{...S(`closeButton`),onClick:h,variant:`transparent`,size:16,iconSize:16,"aria-label":g,unstyled:o})]})})});vp.classes=gp,vp.varsResolver=_p,vp.displayName=`@mantine/core/Alert`;var yp={root:`m_b6d8b162`};function bp(e){if(e===`start`)return`start`;if(e===`end`||e)return`end`}var xp={inherit:!1},Sp=B((e,{variant:t,lineClamp:n,gradient:r,size:i})=>({root:{"--text-fz":or(i),"--text-lh":sr(i),"--text-gradient":t===`gradient`?pi(r,e):void 0,"--text-line-clamp":typeof n==`number`?n.toString():void 0}})),Cp=ro(e=>{let t=U(`Text`,xp,e),{lineClamp:n,truncate:r,inline:i,inherit:a,gradient:o,span:s,__staticSelector:c,vars:l,className:u,style:d,classNames:f,styles:p,unstyled:m,variant:h,mod:g,size:_,attributes:v,...y}=t;return(0,H.jsx)(q,{...W({name:[`Text`,c],props:t,classes:yp,className:u,style:d,classNames:f,styles:p,unstyled:m,attributes:v,vars:l,varsResolver:Sp})(`root`,{focusable:!0}),component:s?`span`:`p`,variant:h,mod:[{"data-truncate":bp(r),"data-line-clamp":typeof n==`number`,"data-inline":i,"data-inherit":a},g],size:_,...y})});Cp.classes=yp,Cp.varsResolver=Sp,Cp.displayName=`@mantine/core/Text`;var[wp,Tp]=Qn(`AppShell was not found in tree`),Ep={root:`m_89ab340`,navbar:`m_45252eee`,aside:`m_9cdde9a`,header:`m_3b16f56b`,main:`m_8983817`,footer:`m_3840c879`,section:`m_6dcfc7c7`},Dp=G(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=U(`AppShellAside`,null,e),d=Tp();return d.disabled?null:(0,H.jsx)(q,{component:`aside`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`aside`,{className:qr({[Gf.classNames.zeroRight]:d.offsetScrollbars},n),classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-aside-z-index":`calc(${c??d.zIndex} + 1)`}})});Dp.classes=Ep,Dp.displayName=`@mantine/core/AppShellAside`;var Op=G(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=U(`AppShellFooter`,null,e),d=Tp();return d.disabled?null:(0,H.jsx)(q,{component:`footer`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`footer`,{className:qr({[Gf.classNames.zeroRight]:d.offsetScrollbars},n),classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-footer-z-index":(c??d.zIndex)?.toString()}})});Op.classes=Ep,Op.displayName=`@mantine/core/AppShellFooter`;var kp=G(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=U(`AppShellHeader`,null,e),d=Tp();return d.disabled?null:(0,H.jsx)(q,{component:`header`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`header`,{className:qr({[Gf.classNames.zeroRight]:d.offsetScrollbars},n),classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-header-z-index":(c??d.zIndex)?.toString()}})});kp.classes=Ep,kp.displayName=`@mantine/core/AppShellHeader`;var Ap=G(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=U(`AppShellMain`,null,e);return(0,H.jsx)(q,{component:`main`,...Tp().getStyles(`main`,{className:n,style:r,classNames:t,styles:i}),...o})});Ap.classes=Ep,Ap.displayName=`@mantine/core/AppShellMain`;var jp=G(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=U(`AppShellNavbar`,null,e),d=Tp();return d.disabled?null:(0,H.jsx)(q,{component:`nav`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`navbar`,{className:n,classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-navbar-z-index":`calc(${c??d.zIndex} + 1)`}})});jp.classes=Ep,jp.displayName=`@mantine/core/AppShellNavbar`;var Mp=ro(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,grow:o,mod:s,...c}=U(`AppShellSection`,null,e),l=Tp();return(0,H.jsx)(q,{mod:[{grow:o},s],...l.getStyles(`section`,{className:n,style:r,classNames:t,styles:i}),...c})});Mp.classes=Ep,Mp.displayName=`@mantine/core/AppShellSection`;function Np(e){return typeof e==`object`?e.base:e}function Pp(e){let t=typeof e==`object`&&!!e&&e.base!==void 0&&Object.keys(e).length===1;return typeof e==`number`||typeof e==`string`||t}function Fp(e){return!(typeof e!=`object`||!e||Object.keys(e).length===1&&`base`in e)}function Ip({baseStyles:e,minMediaStyles:t,maxMediaStyles:n,aside:r,theme:i,mode:a}){let o=r?.width,s=`translateX(var(--app-shell-aside-width))`,c=`translateX(calc(var(--app-shell-aside-width) * -1))`;if(r?.breakpoint&&!r?.collapsed?.mobile&&(n[r?.breakpoint]=n[r?.breakpoint]||{},a===`fixed`?(n[r?.breakpoint][`--app-shell-aside-width`]=`100%`,n[r?.breakpoint][`--app-shell-aside-offset`]=`0px`):(n[r?.breakpoint][`--app-shell-aside-width`]=`0px`,n[r?.breakpoint][`--app-shell-aside-offset`]=`0px`)),Pp(o)){let t=z(Np(o));e[`--app-shell-aside-width`]=t,e[`--app-shell-aside-offset`]=t}if(Fp(o)&&(o.base!==void 0&&(e[`--app-shell-aside-width`]=z(o.base),e[`--app-shell-aside-offset`]=z(o.base)),Bn(o).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-aside-width`]=z(o[e]),t[e][`--app-shell-aside-offset`]=z(o[e]))})),r?.breakpoint&&a===`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){let e=r.breakpoint;t[e]=t[e]||{},t[e][`--app-shell-aside-transform`]=s,t[e][`--app-shell-aside-transform-rtl`]=c,a===`fixed`?t[e][`--app-shell-aside-offset`]=`0px !important`:(t[e][`--app-shell-aside-width`]=`0px`,t[e][`--app-shell-aside-display`]=`none`,t[e][`--app-shell-main-column-end`]=`-1`),t[e][`--app-shell-aside-scroll-locked-visibility`]=`hidden`}if(r?.collapsed?.mobile){let e=lr(r.breakpoint,i.breakpoints)-.1;n[e]=n[e]||{},a===`fixed`?(n[e][`--app-shell-aside-width`]=`100%`,n[e][`--app-shell-aside-offset`]=`0px`):n[e][`--app-shell-aside-width`]=`0px`,n[e][`--app-shell-aside-transform`]=s,n[e][`--app-shell-aside-transform-rtl`]=c,n[e][`--app-shell-aside-scroll-locked-visibility`]=`hidden`}}function Lp({baseStyles:e,minMediaStyles:t,footer:n,mode:r}){let i=n?.height,a=r===`static`?!0:n?.offset??!0;if(r===`static`&&n&&(e[`--app-shell-footer-position`]=`sticky`,e[`--app-shell-footer-grid-column`]=`1 / -1`,e[`--app-shell-footer-grid-row`]=`3`),Pp(i)){let t=z(Np(i));e[`--app-shell-footer-height`]=t,a&&(e[`--app-shell-footer-offset`]=t)}Fp(i)&&(i.base!==void 0&&(e[`--app-shell-footer-height`]=z(i.base),a&&(e[`--app-shell-footer-offset`]=z(i.base))),Bn(i).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-footer-height`]=z(i[e]),a&&(t[e][`--app-shell-footer-offset`]=z(i[e])))})),n?.collapsed&&(e[`--app-shell-footer-transform`]=`translateY(var(--app-shell-footer-height))`,r===`fixed`&&(e[`--app-shell-footer-offset`]=`0px !important`))}function Rp({baseStyles:e,minMediaStyles:t,header:n,mode:r}){let i=n?.height,a=r===`static`?!0:n?.offset??!0;if(r===`static`&&n&&(e[`--app-shell-header-position`]=`sticky`,e[`--app-shell-header-grid-column`]=`1 / -1`,e[`--app-shell-header-grid-row`]=`1`),Pp(i)){let t=z(Np(i));e[`--app-shell-header-height`]=t,a&&(e[`--app-shell-header-offset`]=t)}Fp(i)&&(i.base!==void 0&&(e[`--app-shell-header-height`]=z(i.base),a&&(e[`--app-shell-header-offset`]=z(i.base))),Bn(i).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-header-height`]=z(i[e]),a&&(t[e][`--app-shell-header-offset`]=z(i[e])))})),n?.collapsed&&(e[`--app-shell-header-transform`]=`translateY(calc(var(--app-shell-header-height) * -1))`,r===`fixed`&&(e[`--app-shell-header-offset`]=`0px !important`))}function zp({baseStyles:e,minMediaStyles:t,maxMediaStyles:n,navbar:r,theme:i,mode:a}){let o=r?.width,s=`translateX(calc(var(--app-shell-navbar-width) * -1))`,c=`translateX(var(--app-shell-navbar-width))`;if(r?.breakpoint&&!r?.collapsed?.mobile&&(n[r?.breakpoint]=n[r?.breakpoint]||{},n[r?.breakpoint][`--app-shell-navbar-offset`]=`0px`,n[r?.breakpoint][`--app-shell-navbar-width`]=`100%`,a===`static`&&(n[r?.breakpoint][`--app-shell-navbar-grid-width`]=`0px`)),Pp(o)){let t=z(Np(o));e[`--app-shell-navbar-width`]=t,e[`--app-shell-navbar-offset`]=t,a===`static`&&(e[`--app-shell-navbar-grid-width`]=t)}if(Fp(o)&&(o.base!==void 0&&(e[`--app-shell-navbar-width`]=z(o.base),e[`--app-shell-navbar-offset`]=z(o.base),a===`static`&&(e[`--app-shell-navbar-grid-width`]=z(o.base))),Bn(o).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-navbar-width`]=z(o[e]),t[e][`--app-shell-navbar-offset`]=z(o[e]),a===`static`&&(t[e][`--app-shell-navbar-grid-width`]=z(o[e])))})),r?.breakpoint&&a===`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){let e=r.breakpoint;t[e]=t[e]||{},t[e][`--app-shell-navbar-transform`]=s,t[e][`--app-shell-navbar-transform-rtl`]=c,a===`fixed`?t[e][`--app-shell-navbar-offset`]=`0px !important`:(t[e][`--app-shell-navbar-width`]=`0px`,t[e][`--app-shell-navbar-display`]=`none`,t[e][`--app-shell-main-column-start`]=`1`)}if(r?.collapsed?.mobile){let e=lr(r.breakpoint,i.breakpoints)-.1;n[e]=n[e]||{},n[e][`--app-shell-navbar-width`]=`100%`,n[e][`--app-shell-navbar-offset`]=`0px`,a===`static`&&(n[e][`--app-shell-navbar-grid-width`]=`0px`),n[e][`--app-shell-navbar-transform`]=s,n[e][`--app-shell-navbar-transform-rtl`]=c}}function Bp(e){return Number(e)===0?`0px`:ir(e)}function Vp({padding:e,baseStyles:t,minMediaStyles:n}){Pp(e)&&(t[`--app-shell-padding`]=Bp(Np(e))),Fp(e)&&(e.base&&(t[`--app-shell-padding`]=Bp(e.base)),Bn(e).forEach(t=>{t!==`base`&&(n[t]=n[t]||{},n[t][`--app-shell-padding`]=Bp(e[t]))}))}function Hp({navbar:e,header:t,footer:n,aside:r,padding:i,theme:a,mode:o}){let s={},c={},l={};o===`static`&&(l[`--app-shell-main-grid-column`]=`1 / -1`,l[`--app-shell-main-grid-row`]=`2`),zp({baseStyles:l,minMediaStyles:s,maxMediaStyles:c,navbar:e,theme:a,mode:o}),Ip({baseStyles:l,minMediaStyles:s,maxMediaStyles:c,aside:r,theme:a,mode:o}),Rp({baseStyles:l,minMediaStyles:s,header:t,mode:o}),Lp({baseStyles:l,minMediaStyles:s,footer:n,mode:o}),Vp({baseStyles:l,minMediaStyles:s,padding:i});let u=ur(Bn(s),a.breakpoints).map(e=>({query:`(min-width: ${Jn(e.px)})`,styles:s[e.value]})),d=ur(Bn(c),a.breakpoints).map(e=>({query:`(max-width: ${Jn(e.px)})`,styles:c[e.value]}));return{baseStyles:l,media:[...u,...d]}}function Up({navbar:e,header:t,aside:n,footer:r,padding:i,mode:a,selector:o}){let s=Wi(),c=xi(),{media:l,baseStyles:u}=Hp({navbar:e,header:t,footer:r,aside:n,padding:i,theme:s,mode:a});return(0,H.jsx)(Ta,{media:l,styles:u,selector:o||c.cssVariablesSelector})}function Wp({transitionDuration:e,disabled:t}){let[n,r]=(0,x.useState)(!0),i=(0,x.useRef)(-1),a=(0,x.useRef)(-1);return Nr(`resize`,()=>{r(!0),clearTimeout(i.current),i.current=window.setTimeout(()=>(0,x.startTransition)(()=>{r(!1)}),200)}),yr(()=>{r(!0),clearTimeout(a.current),a.current=window.setTimeout(()=>(0,x.startTransition)(()=>{r(!1)}),e||0)},[t,e]),n}var Gp={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:`ease`,zIndex:er(`app`),mode:`fixed`},Kp=B((e,{transitionDuration:t,transitionTimingFunction:n})=>({root:{"--app-shell-transition-duration":`${t}ms`,"--app-shell-transition-timing-function":n}})),qp=G(e=>{let t=U(`AppShell`,Gp,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,navbar:c,withBorder:l,padding:u,transitionDuration:d,transitionTimingFunction:f,header:p,zIndex:m,layout:h,disabled:g,aside:_,footer:v,offsetScrollbars:y=!0,mode:b,mod:x,attributes:S,id:C,...w}=t,T=W({name:`AppShell`,classes:Ep,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:S,vars:s,varsResolver:Kp}),E=Wp({disabled:g,transitionDuration:d}),D=Mr(C);return(0,H.jsxs)(wp,{value:{getStyles:T,withBorder:l,zIndex:m,disabled:g,offsetScrollbars:y,mode:b},children:[(0,H.jsx)(Up,{navbar:c,header:p,aside:_,footer:v,padding:u,mode:b,selector:b===`static`?`#${D}`:void 0}),(0,H.jsx)(q,{...T(`root`),id:D,mod:[{resizing:E,layout:h,disabled:g,mode:b},x],...w})]})});qp.classes=Ep,qp.varsResolver=Kp,qp.displayName=`@mantine/core/AppShell`,qp.Navbar=jp,qp.Header=kp,qp.Main=Ap,qp.Aside=Dp,qp.Footer=Op,qp.Section=Mp;function Jp(e){return typeof e==`string`?{value:e,label:e}:typeof e==`object`&&`value`in e&&!(`label`in e)?{value:e.value,label:`${e.value}`,disabled:e.disabled}:typeof e==`object`&&`group`in e?{group:e.group,items:e.items.map(e=>Jp(e))}:typeof e==`number`||typeof e==`bigint`||typeof e==`boolean`?{value:e,label:`${e}`}:e}function Yp(e){return e?e.map(e=>Jp(e)):[]}function Xp(e){return e.reduce((e,t)=>`group`in t?{...e,...Xp(t.items)}:(e[`${t.value}`]=t,e),{})}var Zp={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`},Qp={error:null},$p=B((e,{size:t,color:n})=>({chevron:{"--combobox-chevron-size":rr(t,`combobox-chevron-size`),"--combobox-chevron-color":n?di(n,e):void 0}})),em=G(e=>{let t=U(`ComboboxChevron`,Qp,e),{size:n,error:r,style:i,className:a,classNames:o,styles:s,unstyled:c,vars:l,attributes:u,mod:d,...f}=t,p=W({name:`ComboboxChevron`,classes:Zp,props:t,style:i,className:a,classNames:o,styles:s,unstyled:c,vars:l,varsResolver:$p,attributes:u,rootSelector:`chevron`});return(0,H.jsx)(q,{component:`svg`,...f,...p(`chevron`),size:n,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,mod:[`combobox-chevron`,{error:r},d],children:(0,H.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`})})});em.classes=Zp,em.varsResolver=$p,em.displayName=`@mantine/core/ComboboxChevron`;var[tm,nm]=Qn(`Combobox component was not found in tree`);function rm({onMouseDown:e,onClick:t,onClear:n,...r}){return(0,H.jsx)(fp.ClearButton,{tabIndex:-1,"aria-hidden":!0,...r,onMouseDown:t=>{t.preventDefault(),e?.(t)},onClick:e=>{n(),t?.(e)}})}rm.displayName=`@mantine/core/ComboboxClearButton`;var im=G(e=>{let{classNames:t,styles:n,className:r,style:i,hidden:a,...o}=U(`ComboboxDropdown`,null,e),s=nm();return(0,H.jsx)(ud.Dropdown,{...o,role:`presentation`,"data-hidden":a||void 0,...s.getStyles(`dropdown`,{className:r,style:i,classNames:t,styles:n})})});im.classes=Zp,im.displayName=`@mantine/core/ComboboxDropdown`;var am={refProp:`ref`},om=G(e=>{let{children:t,refProp:n,ref:r}=U(`ComboboxDropdownTarget`,am,e);if(nm(),!Zn(t))throw 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(0,H.jsx)(ud.Target,{ref:r,refProp:n,children:t})});om.displayName=`@mantine/core/ComboboxDropdownTarget`;var sm=G(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=U(`ComboboxEmpty`,null,e);return(0,H.jsx)(q,{...nm().getStyles(`empty`,{className:n,classNames:t,styles:i,style:r}),...o})});sm.classes=Zp,sm.displayName=`@mantine/core/ComboboxEmpty`;function cm({onKeyDown:e,onClick:t,withKeyboardNavigation:n,withAriaAttributes:r,withExpandedAttribute:i,targetType:a,autoComplete:o}){let s=nm(),[c,l]=(0,x.useState)(null),u=t=>{if(e?.(t),!s.readOnly&&n){if(t.nativeEvent.isComposing)return;if(t.nativeEvent.code===`ArrowDown`&&(t.preventDefault(),s.store.dropdownOpened?l(s.store.selectNextOption()):(s.store.openDropdown(`keyboard`),l(s.store.selectActiveOption()),s.store.updateSelectedOptionIndex(`selected`,{scrollIntoView:!0}))),t.nativeEvent.code===`ArrowUp`&&(t.preventDefault(),s.store.dropdownOpened?l(s.store.selectPreviousOption()):(s.store.openDropdown(`keyboard`),l(s.store.selectActiveOption()),s.store.updateSelectedOptionIndex(`selected`,{scrollIntoView:!0}))),t.nativeEvent.code===`Enter`||t.nativeEvent.code===`NumpadEnter`){if(t.nativeEvent.keyCode===229)return;let e=s.store.getSelectedOptionIndex();s.store.dropdownOpened&&e!==-1?(t.preventDefault(),s.store.clickSelectedOption()):a===`button`&&(t.preventDefault(),s.store.openDropdown(`keyboard`))}t.key===`Escape`&&s.store.closeDropdown(`keyboard`),t.nativeEvent.code===`Space`&&a===`button`&&(t.preventDefault(),s.store.toggleDropdown(`keyboard`))}},d=r?{...i?{role:`combobox`}:{},"aria-haspopup":`listbox`,"aria-expanded":i?!!(s.store.listId&&s.store.dropdownOpened):void 0,"aria-controls":s.store.dropdownOpened&&s.store.listId?s.store.listId:void 0,"aria-activedescendant":s.store.dropdownOpened&&c||void 0,autoComplete:o,"data-expanded":s.store.dropdownOpened||void 0,"data-mantine-stop-propagation":s.store.dropdownOpened||void 0}:{},f=e=>{a===`button`&&e.currentTarget.focus(),t?.(e)};return{...d,onKeyDown:u,onClick:f}}var lm={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},um=G(e=>{let{children:t,refProp:n,withKeyboardNavigation:r,withAriaAttributes:i,withExpandedAttribute:a,targetType:o,autoComplete:s,ref:c,...l}=U(`ComboboxEventsTarget`,lm,e),u=Gr(t);if(!u)throw 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`);let d=nm();return(0,x.cloneElement)(u,{...cm({targetType:o,withAriaAttributes:i,withKeyboardNavigation:r,withExpandedAttribute:a,onKeyDown:u.props.onKeyDown,onClick:u.props.onClick,autoComplete:s}),...l,[n]:Ir(c,d.store.targetRef,Vr(u))})});um.displayName=`@mantine/core/ComboboxEventsTarget`;var dm=G(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=U(`ComboboxFooter`,null,e);return(0,H.jsx)(q,{...nm().getStyles(`footer`,{className:n,classNames:t,style:r,styles:i}),...o,onMouseDown:e=>{e.preventDefault()}})});dm.classes=Zp,dm.displayName=`@mantine/core/ComboboxFooter`;var fm=G(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,children:o,label:s,id:c,...l}=U(`ComboboxGroup`,null,e),u=nm(),d=Mr(c);return(0,H.jsxs)(q,{role:`group`,"aria-labelledby":s?d:void 0,...u.getStyles(`group`,{className:n,classNames:t,style:r,styles:i}),...l,children:[s&&(0,H.jsx)(`div`,{id:d,...u.getStyles(`groupLabel`,{classNames:t,styles:i}),children:s}),o]})});fm.classes=Zp,fm.displayName=`@mantine/core/ComboboxGroup`;var pm=G(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=U(`ComboboxHeader`,null,e);return(0,H.jsx)(q,{...nm().getStyles(`header`,{className:n,classNames:t,style:r,styles:i}),...o,onMouseDown:e=>{e.preventDefault()}})});pm.classes=Zp,pm.displayName=`@mantine/core/ComboboxHeader`;function mm({value:e,valuesDivider:t=`,`,...n}){return(0,H.jsx)(`input`,{type:`hidden`,value:Array.isArray(e)?e.join(t):e?`${e}`:``,...n})}mm.displayName=`@mantine/core/ComboboxHiddenInput`;var hm=G(e=>{let t=U(`ComboboxOption`,null,e),{classNames:n,className:r,style:i,styles:a,vars:o,onClick:s,id:c,active:l,onMouseDown:u,onMouseOver:d,disabled:f,selected:p,mod:m,...h}=t,g=nm(),_=(0,x.useId)(),v=c||_;return(0,H.jsx)(q,{...g.getStyles(`option`,{className:r,classNames:n,styles:a,style:i}),...h,id:v,mod:[`combobox-option`,{"combobox-active":l,"combobox-disabled":f,"combobox-selected":p},m],role:`option`,onClick:e=>{f?e.preventDefault():(g.onOptionSubmit?.(t.value,t),s?.(e))},onMouseDown:e=>{e.preventDefault(),u?.(e)},onMouseOver:e=>{g.resetSelectionOnOptionHover&&g.store.resetSelectedOption(),d?.(e)}})});hm.classes=Zp,hm.displayName=`@mantine/core/ComboboxOption`;var gm=G(e=>{let{classNames:t,className:n,style:r,styles:i,id:a,onMouseDown:o,labelledBy:s,...c}=U(`ComboboxOptions`,null,e),l=nm(),u=Mr(a);return(0,x.useEffect)(()=>{l.store.setListId(u)},[u]),(0,H.jsx)(q,{...l.getStyles(`options`,{className:n,style:r,classNames:t,styles:i}),...c,id:u,role:`listbox`,"aria-labelledby":s,onMouseDown:e=>{e.preventDefault(),o?.(e)}})});gm.classes=Zp,gm.displayName=`@mantine/core/ComboboxOptions`;var _m={withAriaAttributes:!0,withKeyboardNavigation:!0},vm=G(e=>{let{classNames:t,styles:n,unstyled:r,vars:i,withAriaAttributes:a,onKeyDown:o,onClick:s,withKeyboardNavigation:c,size:l,ref:u,...d}=U(`ComboboxSearch`,_m,e),f=nm(),p=f.getStyles(`search`),m=cm({targetType:`input`,withAriaAttributes:a,withKeyboardNavigation:c,withExpandedAttribute:!1,onKeyDown:o,onClick:s,autoComplete:`off`});return(0,H.jsx)(fp,{ref:Ir(u,f.store.searchRef),classNames:[{input:p.className},t],styles:[{input:p.style},n],size:l||f.size,...m,...d,__staticSelector:`Combobox`})});vm.classes=Zp,vm.displayName=`@mantine/core/ComboboxSearch`;var ym={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},bm=G(e=>{let{children:t,refProp:n,withKeyboardNavigation:r,withAriaAttributes:i,withExpandedAttribute:a,targetType:o,autoComplete:s,ref:c,...l}=U(`ComboboxTarget`,ym,e),u=Gr(t);if(!u)throw 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`);let d=nm(),f=(0,x.cloneElement)(u,{...cm({targetType:o,withAriaAttributes:i,withKeyboardNavigation:r,withExpandedAttribute:a,onKeyDown:u.props.onKeyDown,onClick:u.props.onClick,autoComplete:s}),...l});return(0,H.jsx)(ud.Target,{refProp:n,ref:Ir(c,d.store.targetRef),children:f})});bm.displayName=`@mantine/core/ComboboxTarget`;function xm(e,t,n){for(let n=e-1;n>=0;--n)if(!t[n].hasAttribute(`data-combobox-disabled`))return n;if(n){for(let e=t.length-1;e>-1;--e)if(!t[e].hasAttribute(`data-combobox-disabled`))return e}return e}function Sm(e,t,n){for(let n=e+1;n<t.length;n+=1)if(!t[n].hasAttribute(`data-combobox-disabled`))return n;if(n){for(let e=0;e<t.length;e+=1)if(!t[e].hasAttribute(`data-combobox-disabled`))return e}return e}function Cm(e){for(let t=0;t<e.length;t+=1)if(!e[t].hasAttribute(`data-combobox-disabled`))return t;return-1}function wm({defaultOpened:e,opened:t,onOpenedChange:n,onDropdownClose:r,onDropdownOpen:i,loop:a=!0,scrollBehavior:o=`instant`}={}){let[s,c]=Lr({value:t,defaultValue:e,finalValue:!1,onChange:n}),l=(0,x.useRef)(null),u=(0,x.useRef)(-1),d=(0,x.useRef)(null),f=(0,x.useRef)(null),p=(0,x.useRef)(-1),m=(0,x.useRef)(-1),h=(0,x.useRef)(-1),g=(0,x.useCallback)((e=`unknown`)=>{s||(c(!0),i?.(e))},[c,i,s]),_=(0,x.useCallback)((e=`unknown`)=>{s&&(c(!1),r?.(e))},[c,r,s]),v=(0,x.useCallback)((e=`unknown`)=>{s?_(e):g(e)},[_,g,s]),y=(0,x.useCallback)(()=>{let e=Wr(f.current),t=Hr(`#${l.current} [data-combobox-selected]`,e);t?.removeAttribute(`data-combobox-selected`),t?.removeAttribute(`aria-selected`)},[]),b=(0,x.useCallback)(e=>{let t=Wr(f.current),n=Hr(`#${l.current}`,t),r=n?Ur(`[data-combobox-option]`,n):null;if(!r)return null;let i=e>=r.length?0:e<0?r.length-1:e;return u.current=i,r?.[i]&&!r[i].hasAttribute(`data-combobox-disabled`)?(y(),r[i].setAttribute(`data-combobox-selected`,`true`),r[i].setAttribute(`aria-selected`,`true`),r[i].scrollIntoView({block:`nearest`,behavior:o}),r[i].id):null},[o,y]),S=(0,x.useCallback)(()=>{let e=Wr(f.current),t=Hr(`#${l.current} [data-combobox-active]`,e);return b(t?Ur(`#${l.current} [data-combobox-option]`,e).findIndex(e=>e===t):0)},[b]),C=(0,x.useCallback)(()=>{let e=Wr(f.current),t=Ur(`#${l.current} [data-combobox-option]`,e);return b(Sm(u.current,t,a))},[b,a]),w=(0,x.useCallback)(()=>{let e=Wr(f.current),t=Ur(`#${l.current} [data-combobox-option]`,e);return b(xm(u.current,t,a))},[b,a]),T=(0,x.useCallback)(()=>{let e=Wr(f.current);return b(Cm(Ur(`#${l.current} [data-combobox-option]`,e)))},[b]),E=(0,x.useCallback)((e=`selected`,t)=>{if(typeof e==`number`){u.current=e;let n=Wr(f.current),r=Ur(`#${l.current} [data-combobox-option]`,n);t?.scrollIntoView&&r[e]?.scrollIntoView({block:`nearest`,behavior:o});return}h.current=window.setTimeout(()=>{let n=Wr(f.current),r=Ur(`#${l.current} [data-combobox-option]`,n),i=r.findIndex(t=>t.hasAttribute(`data-combobox-${e}`));u.current=i,t?.scrollIntoView&&r[i]?.scrollIntoView({block:`nearest`,behavior:o})},0)},[]),D=(0,x.useCallback)(()=>{u.current=-1,y()},[y]),O=(0,x.useCallback)(()=>{let e=Wr(f.current);(Ur(`#${l.current} [data-combobox-option]`,e)?.[u.current])?.click()},[]),k=(0,x.useCallback)(e=>{l.current=e},[]),A=(0,x.useCallback)(()=>{p.current=window.setTimeout(()=>d.current?.focus(),0)},[]),j=(0,x.useCallback)(()=>{m.current=window.setTimeout(()=>f.current?.focus(),0)},[]),ee=(0,x.useCallback)(()=>u.current,[]);return(0,x.useEffect)(()=>()=>{window.clearTimeout(p.current),window.clearTimeout(m.current),window.clearTimeout(h.current)},[]),{dropdownOpened:s,openDropdown:g,closeDropdown:_,toggleDropdown:v,selectedOptionIndex:u.current,getSelectedOptionIndex:ee,selectOption:b,selectFirstOption:T,selectActiveOption:S,selectNextOption:C,selectPreviousOption:w,resetSelectedOption:D,updateSelectedOptionIndex:E,listId:l.current,setListId:k,clickSelectedOption:O,searchRef:d,focusSearchInput:A,targetRef:f,focusTarget:j}}var Tm={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:`target`,transitionProps:{transition:`fade`,duration:0},size:`sm`},Em=B((e,{size:t,dropdownPadding:n})=>({options:{"--combobox-option-fz":or(t),"--combobox-option-padding":rr(t,`combobox-option-padding`)},dropdown:{"--combobox-padding":n===void 0?void 0:z(n),"--combobox-option-fz":or(t),"--combobox-option-padding":rr(t,`combobox-option-padding`)}})),Dm=e=>{let t=U(`Combobox`,Tm,e),{classNames:n,styles:r,unstyled:i,children:a,store:o,vars:s,onOptionSubmit:c,onClose:l,size:u,dropdownPadding:d,resetSelectionOnOptionHover:f,__staticSelector:p,readOnly:m,attributes:h,...g}=t,_=wm(),v=o||_,y=W({name:p||`Combobox`,classes:Zp,props:t,classNames:n,styles:r,unstyled:i,attributes:h,vars:s,varsResolver:Em}),b=()=>{l?.(),v.closeDropdown()};return(0,H.jsx)(tm,{value:{getStyles:y,store:v,onOptionSubmit:c,size:u,resetSelectionOnOptionHover:f,readOnly:m},children:(0,H.jsx)(ud,{opened:v.dropdownOpened,preventPositionChangeWhenVisible:!1,...g,onChange:e=>!e&&b(),withRoles:!1,unstyled:i,children:a})})};Dm.extend=e=>e,Dm.classes=Zp,Dm.varsResolver=Em,Dm.displayName=`@mantine/core/Combobox`,Dm.Target=bm,Dm.Dropdown=im,Dm.Options=gm,Dm.Option=hm,Dm.Search=vm,Dm.Empty=sm,Dm.Chevron=em,Dm.Footer=dm,Dm.Header=pm,Dm.EventsTarget=um,Dm.DropdownTarget=om,Dm.Group=fm,Dm.ClearButton=rm,Dm.HiddenInput=mm;function Om({children:e,role:t}){let n=(0,x.use)(Xf);return n?(0,H.jsx)(`div`,{role:t,"aria-labelledby":n.labelId,"aria-describedby":n.describedBy,children:e}):(0,H.jsx)(H.Fragment,{children:e})}var km=(0,x.createContext)(null),Am={hiddenInputValuesSeparator:`,`},jm=no((e=>{let{value:t,defaultValue:n,onChange:r,size:i,wrapperProps:a,children:o,readOnly:s,name:c,hiddenInputValuesSeparator:l,hiddenInputProps:u,maxSelectedValues:d,disabled:f,...p}=U(`CheckboxGroup`,Am,e),[m,h]=Lr({value:t,defaultValue:n,finalValue:[],onChange:r}),g=e=>{let t=typeof e==`string`?e:e.currentTarget.value;if(s)return;let n=m.includes(t);!n&&d&&m.length>=d||h(n?m.filter(e=>e!==t):[...m,t])},_=e=>{if(f)return!0;if(!d)return!1;let t=m.includes(e),n=m.length>=d;return!t&&n},v=m.join(l);return(0,H.jsx)(km,{value:{value:m,onChange:g,size:i,isDisabled:_},children:(0,H.jsxs)(fp.Wrapper,{size:i,...a,...p,labelElement:`div`,__staticSelector:`CheckboxGroup`,children:[(0,H.jsx)(Om,{role:`group`,children:o}),(0,H.jsx)(`input`,{type:`hidden`,name:c,value:v,...u})]})})}));jm.classes=fp.Wrapper.classes,jm.displayName=`@mantine/core/CheckboxGroup`;var Mm={card:`m_26775b0a`},Nm=(0,x.createContext)(null),Pm={withBorder:!0},Fm=B((e,{radius:t})=>({card:{"--card-radius":ar(t)}})),Im=G(e=>{let t=U(`CheckboxCard`,Pm,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,checked:c,mod:l,withBorder:u,value:d,onClick:f,defaultChecked:p,onChange:m,attributes:h,...g}=t,_=W({name:`CheckboxCard`,classes:Mm,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s,varsResolver:Fm,rootSelector:`card`}),v=(0,x.use)(km),[y,b]=Lr({value:typeof c==`boolean`?c:v?v.value.includes(d||``):void 0,defaultValue:p,finalValue:!1,onChange:m});return(0,H.jsx)(Nm,{value:{checked:y},children:(0,H.jsx)(Cu,{mod:[{"with-border":u,checked:y},l],..._(`card`),...g,role:`checkbox`,"aria-checked":y,onClick:e=>{f?.(e),v?.onChange(d||``),b(!y)}})})});Im.displayName=`@mantine/core/CheckboxCard`,Im.classes=Mm,Im.varsResolver=Fm;function Lm({size:e,style:t,...n}){return(0,H.jsx)(`svg`,{viewBox:`0 0 10 7`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:e===void 0?t:{width:z(e),height:z(e),...t},"aria-hidden":!0,...n,children:(0,H.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 Rm({indeterminate:e,...t}){return e?(0,H.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 32 6`,"aria-hidden":!0,...t,children:(0,H.jsx)(`rect`,{width:`32`,height:`6`,fill:`currentColor`,rx:`3`})}):(0,H.jsx)(Lm,{...t})}var zm={indicator:`m_5e5256ee`,icon:`m_1b1c543a`,"indicator--outline":`m_76e20374`},Bm={icon:Rm,variant:`filled`,radius:`sm`},Vm=B((e,{radius:t,color:n,size:r,iconColor:i,variant:a,autoContrast:o})=>{let s=ui({color:n||e.primaryColor,theme:e}),c=s.isThemeColor&&s.shade===void 0?`var(--mantine-color-${s.color}-outline)`:s.color;return{indicator:{"--checkbox-size":rr(r,`checkbox-size`),"--checkbox-radius":t===void 0?void 0:ar(t),"--checkbox-color":a===`outline`?c:di(n,e),"--checkbox-icon-color":i?di(i,e):yi(o,e)?_i({color:n,theme:e,autoContrast:o}):void 0}}}),Hm=G(e=>{let t=U(`CheckboxIndicator`,Bm,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,icon:c,indeterminate:l,radius:u,color:d,iconColor:f,autoContrast:p,checked:m,mod:h,variant:g,disabled:_,attributes:v,...y}=t,b=W({name:`CheckboxIndicator`,classes:zm,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:v,vars:s,varsResolver:Vm,rootSelector:`indicator`}),S=(0,x.use)(Nm),C=typeof m==`boolean`||typeof l==`boolean`?m||l:S?.checked||!1;return(0,H.jsx)(q,{...b(`indicator`,{variant:g}),variant:g,mod:[{checked:C,disabled:_},h],...y,children:(0,H.jsx)(c,{indeterminate:l,...b(`icon`)})})});Hm.displayName=`@mantine/core/CheckboxIndicator`,Hm.classes=zm,Hm.varsResolver=Vm;var Um={root:`m_5f75b09e`,body:`m_5f6e695e`,labelWrapper:`m_d3ea56bb`,label:`m_8ee546b8`,description:`m_328f68c0`,error:`m_8e8a99cc`},Wm=Um;function Gm({__staticSelector:e,__stylesApiProps:t,className:n,classNames:r,styles:i,unstyled:a,children:o,label:s,description:c,id:l,disabled:u,error:d,size:f,labelPosition:p=`left`,bodyElement:m=`div`,labelElement:h=`label`,variant:g,style:_,vars:v,mod:y,attributes:b,...x}){let S=W({name:e,props:t,className:n,style:_,classes:Um,classNames:r,styles:i,unstyled:a,attributes:b}),C=c?`${l}-description`:void 0,w=d&&typeof d!=`boolean`?`${l}-error`:void 0;return(0,H.jsx)(q,{...S(`root`),__vars:{"--label-fz":or(f),"--label-lh":rr(f,`label-lh`)},mod:[{"label-position":p},y],variant:g,size:f,...x,children:(0,H.jsxs)(q,{component:m,htmlFor:m===`label`?l:void 0,...S(`body`),children:[o,(0,H.jsxs)(`div`,{...S(`labelWrapper`),"data-disabled":u||void 0,children:[s&&(0,H.jsx)(q,{component:h,htmlFor:h===`label`?l:void 0,...S(`label`),"data-disabled":u||void 0,children:s}),c&&(0,H.jsx)(fp.Description,{id:C,size:f,__inheritStyles:!1,...S(`description`),children:c}),d&&typeof d!=`boolean`&&(0,H.jsx)(fp.Error,{id:w,size:f,__inheritStyles:!1,...S(`error`),children:d})]})]})})}Gm.displayName=`@mantine/core/InlineInput`;var Km={root:`m_bf2d988c`,inner:`m_26062bec`,input:`m_26063560`,icon:`m_bf295423`,"input--outline":`m_215c4542`},qm={labelPosition:`right`,icon:Rm,withErrorStyles:!0,variant:`filled`,radius:`sm`},Jm=B((e,{radius:t,color:n,size:r,iconColor:i,variant:a,autoContrast:o})=>{let s=ui({color:n||e.primaryColor,theme:e}),c=s.isThemeColor&&s.shade===void 0?`var(--mantine-color-${s.color}-outline)`:s.color;return{root:{"--checkbox-size":rr(r,`checkbox-size`),"--checkbox-radius":t===void 0?void 0:ar(t),"--checkbox-color":a===`outline`?c:di(n,e),"--checkbox-icon-color":i?di(i,e):yi(o,e)?_i({color:n,theme:e,autoContrast:o}):void 0}}}),Ym=G(e=>{let t=U(`Checkbox`,qm,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,color:c,label:l,id:u,size:d,radius:f,wrapperProps:p,checked:m,labelPosition:h,description:g,error:_,disabled:v,variant:y,indeterminate:b,icon:S,rootRef:C,iconColor:w,onChange:T,autoContrast:E,mod:D,attributes:O,readOnly:k,onClick:A,withErrorStyles:j,ref:ee,...M}=t,te=(0,x.useRef)(null),ne=(0,x.use)(km),N=d||ne?.size,P=W({name:`Checkbox`,props:t,classes:Km,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:O,vars:s,varsResolver:Jm}),{styleProps:re,rest:ie}=Oa(M),ae=Mr(u),oe=[g?`${ae}-description`:void 0,_&&typeof _!=`boolean`?`${ae}-error`:void 0,ie[`aria-describedby`]].filter(Boolean).join(` `)||void 0,se={checked:ne?.value.includes(ie.value)??m,onChange:e=>{ne?.onChange(e),T?.(e)}},F=ne?.isDisabled?.(ie.value)??!1,ce=v||F;return(0,x.useEffect)(()=>{te.current&&(te.current.indeterminate=b||!1,b?te.current.setAttribute(`data-indeterminate`,`true`):te.current.removeAttribute(`data-indeterminate`))},[b]),(0,H.jsx)(Gm,{...P(`root`),__staticSelector:`Checkbox`,__stylesApiProps:t,id:ae,size:N,labelPosition:h,label:l,description:g,error:_,disabled:ce,classNames:n,styles:a,unstyled:o,"data-checked":se.checked||m||void 0,variant:y,ref:C,mod:D,attributes:O,inert:ie.inert,...re,...p,children:(0,H.jsxs)(q,{...P(`inner`),mod:{"data-label-position":h},children:[(0,H.jsx)(q,{component:`input`,id:ae,ref:Ir(te,ee),mod:{error:!!_,"with-error-styles":j},...P(`input`,{focusable:!0,variant:y}),...ie,...se,"aria-describedby":oe,disabled:ce,inert:ie.inert,type:`checkbox`,onClick:e=>{k&&e.preventDefault(),A?.(e)}}),(0,H.jsx)(S,{indeterminate:b,...P(`icon`)})]})})});Ym.classes={...Km,...Wm},Ym.varsResolver=Jm,Ym.displayName=`@mantine/core/Checkbox`,Ym.Group=jm,Ym.Indicator=Hm,Ym.Card=Im;function Xm(e){return`group`in e}function Zm({options:e,search:t,limit:n}){let r=t.trim().toLowerCase(),i=[];for(let a=0;a<e.length;a+=1){let o=e[a];if(i.length===n)return i;Xm(o)&&i.push({group:o.group,items:Zm({options:o.items,search:t,limit:n-i.length})}),Xm(o)||o.label.toLowerCase().includes(r)&&i.push(o)}return i}function Qm(e){if(e.length===0)return!0;for(let t of e)if(!(`group`in t)||t.items.length>0)return!1;return!0}function $m(e,t=new Set){if(Array.isArray(e))for(let n of e)if(Xm(n))$m(n.items,t);else{if(n.value===void 0)throw Error(`[@mantine/core] Each option must have value property`);if(t.has(n.value))throw Error(`[@mantine/core] Duplicate options are not supported. Option with value "${n.value}" was provided more than once`);t.add(n.value)}}function eh(e,t){return Array.isArray(e)?e.includes(t):e===t}function th({data:e,withCheckIcon:t,withAlignedLabels:n,value:r,checkIconPosition:i,unstyled:a,renderOption:o}){if(!Xm(e)){let s=eh(r,e.value),c=t&&(s?(0,H.jsx)(Lm,{className:Zp.optionsDropdownCheckIcon}):n?(0,H.jsx)(`div`,{className:Zp.optionsDropdownCheckPlaceholder}):null),l=(0,H.jsxs)(H.Fragment,{children:[i===`left`&&c,(0,H.jsx)(`span`,{children:e.label}),i===`right`&&c]});return(0,H.jsx)(Dm.Option,{value:e.value,disabled:e.disabled,className:qr({[Zp.optionsDropdownOption]:!a}),"data-reverse":i===`right`||void 0,"data-checked":s||void 0,"aria-selected":s,active:s,children:typeof o==`function`?o({option:e,checked:s}):l})}let s=e.items.map(e=>(0,H.jsx)(th,{data:e,value:r,unstyled:a,withCheckIcon:t,withAlignedLabels:n,checkIconPosition:i,renderOption:o},`${e.value}`));return(0,H.jsx)(Dm.Group,{label:e.group,children:s})}function nh({data:e,hidden:t,hiddenWhenEmpty:n,filter:r,search:i,limit:a,maxDropdownHeight:o,withScrollArea:s=!0,filterOptions:c=!0,withCheckIcon:l=!1,withAlignedLabels:u=!1,value:d,checkIconPosition:f,nothingFoundMessage:p,unstyled:m,labelId:h,renderOption:g,scrollAreaProps:_,"aria-label":v}){$m(e);let y=typeof i==`string`?(r||Zm)({options:e,search:c?i:``,limit:a??1/0}):e,b=Qm(y),x=y.map(e=>(0,H.jsx)(th,{data:e,withCheckIcon:l,withAlignedLabels:u,value:d,checkIconPosition:f,unstyled:m,renderOption:g},Xm(e)?e.group:`${e.value}`));return(0,H.jsx)(Dm.Dropdown,{hidden:t||n&&b,"data-composed":!0,children:(0,H.jsxs)(Dm.Options,{labelledBy:h,"aria-label":v,children:[s?(0,H.jsx)(yu.Autosize,{mah:o??220,type:`scroll`,scrollbarSize:`var(--combobox-padding)`,offsetScrollbars:`y`,..._,children:x}):x,b&&p&&(0,H.jsx)(Dm.Empty,{children:p})]})})}var rh={root:`m_347db0ec`,"root--dot":`m_fbd81e3d`,label:`m_5add502a`,section:`m_91fdda9b`},ih=B((e,{radius:t,color:n,gradient:r,variant:i,size:a,autoContrast:o,circle:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:o});return{root:{"--badge-height":rr(a,`badge-height`),"--badge-padding-x":rr(a,`badge-padding-x`),"--badge-fz":rr(a,`badge-fz`),"--badge-radius":s||t===void 0?void 0:ar(t),"--badge-bg":n||i?c.background:void 0,"--badge-color":n||i?c.color:void 0,"--badge-bd":n||i?c.border:void 0,"--badge-dot-color":i===`dot`?di(n,e):void 0}}}),ah=ro(e=>{let t=U(`Badge`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,gradient:u,leftSection:d,rightSection:f,children:p,variant:m,fullWidth:h,autoContrast:g,circle:_,mod:v,attributes:y,...b}=t,x=W({name:`Badge`,props:t,classes:rh,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:y,vars:s,varsResolver:ih});return(0,H.jsxs)(q,{variant:m,mod:[{block:h,circle:_,"with-right-section":!!f,"with-left-section":!!d},v],...x(`root`,{variant:m}),...b,children:[d&&(0,H.jsx)(`span`,{...x(`section`),"data-position":`left`,children:d}),(0,H.jsx)(`span`,{...x(`label`),children:p}),f&&(0,H.jsx)(`span`,{...x(`section`),"data-position":`right`,children:f})]})});ah.classes=rh,ah.varsResolver=ih,ah.displayName=`@mantine/core/Badge`;var oh={root:`m_fea6bf1a`,burger:`m_d4fb9cad`},sh=B((e,{color:t,size:n,lineSize:r,transitionDuration:i,transitionTimingFunction:a})=>({root:{"--burger-color":t?di(t,e):void 0,"--burger-size":rr(n,`burger-size`),"--burger-line-size":r?z(r):void 0,"--burger-transition-duration":i===void 0?void 0:`${i}ms`,"--burger-transition-timing-function":a}})),ch=G(e=>{let t=U(`Burger`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,opened:c,children:l,transitionDuration:u,transitionTimingFunction:d,lineSize:f,attributes:p,...m}=t,h=W({name:`Burger`,classes:oh,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:s,varsResolver:sh});return(0,H.jsxs)(Cu,{...h(`root`),...m,children:[(0,H.jsx)(q,{mod:[`reduce-motion`,{opened:c}],...h(`burger`)}),l]})});ch.classes=oh,ch.varsResolver=sh,ch.displayName=`@mantine/core/Burger`;var lh={root:`m_77c9d27d`,inner:`m_80f1301b`,label:`m_811560b9`,section:`m_a74036a`,loader:`m_a25b86ee`,group:`m_80d6d844`,groupSection:`m_70be2a01`},uh={orientation:`horizontal`},dh=B((e,{borderWidth:t})=>({group:{"--button-border-width":z(t)}})),fh=G(e=>{let t=U(`ButtonGroup`,uh,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,orientation:s,vars:c,borderWidth:l,mod:u,attributes:d,...f}=U(`ButtonGroup`,uh,e);return(0,H.jsx)(q,{...W({name:`ButtonGroup`,props:t,classes:lh,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:c,varsResolver:dh,rootSelector:`group`})(`group`),mod:[{"data-orientation":s},u],role:`group`,...f})});fh.classes=lh,fh.varsResolver=dh,fh.displayName=`@mantine/core/ButtonGroup`;var ph=B((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":rr(o,`section-height`),"--section-padding-x":rr(o,`section-padding-x`),"--section-fz":o?.includes(`compact`)?or(o.replace(`compact-`,``)):or(o),"--section-radius":t===void 0?void 0:ar(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),mh=G(e=>{let t=U(`ButtonGroupSection`,null,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,vars:s,gradient:c,radius:l,autoContrast:u,attributes:d,...f}=t;return(0,H.jsx)(q,{...W({name:`ButtonGroupSection`,props:t,classes:lh,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:ph,rootSelector:`groupSection`})(`groupSection`),...f})});mh.classes=lh,mh.varsResolver=ph,mh.displayName=`@mantine/core/ButtonGroupSection`;var hh={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${z(1)}))`},out:{opacity:0,transform:`translate(-50%, -200%)`},common:{transformOrigin:`center`},transitionProperty:`transform, opacity`},gh=B((e,{radius:t,color:n,gradient:r,variant:i,size:a,justify:o,autoContrast:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:s});return{root:{"--button-justify":o,"--button-height":rr(a,`button-height`),"--button-padding-x":rr(a,`button-padding-x`),"--button-fz":a?.includes(`compact`)?or(a.replace(`compact-`,``)):or(a),"--button-radius":t===void 0?void 0:ar(t),"--button-bg":n||i?c.background:void 0,"--button-hover":n||i?c.hover:void 0,"--button-color":c.color,"--button-bd":n||i?c.border:void 0,"--button-hover-color":n||i?c.hoverColor:void 0}}}),_h=ro(e=>{let t=U(`Button`,null,e),{style:n,vars:r,className:i,color:a,disabled:o,children:s,leftSection:c,rightSection:l,fullWidth:u,variant:d,radius:f,loading:p,loaderProps:m,gradient:h,classNames:g,styles:_,unstyled:v,"data-disabled":y,autoContrast:b,mod:x,attributes:S,...C}=t,w=W({name:`Button`,props:t,classes:lh,className:i,style:n,classNames:g,styles:_,unstyled:v,attributes:S,vars:r,varsResolver:gh}),T=!!c,E=!!l;return(0,H.jsxs)(Cu,{...w(`root`,{active:!o&&!p&&!y}),unstyled:v,variant:d,disabled:o||p,mod:[{disabled:o||y,loading:p,block:u,"with-left-section":T,"with-right-section":E},x],...C,children:[typeof p==`boolean`&&(0,H.jsx)(Ju,{mounted:p,transition:hh,duration:150,children:e=>(0,H.jsx)(q,{component:`span`,...w(`loader`,{style:e}),"aria-hidden":!0,children:(0,H.jsx)(vd,{color:`var(--button-color)`,size:`calc(var(--button-height) / 1.8)`,...m})})}),(0,H.jsxs)(`span`,{...w(`inner`),children:[c&&(0,H.jsx)(q,{component:`span`,...w(`section`),mod:{position:`left`},children:c}),(0,H.jsx)(q,{component:`span`,mod:{loading:p},...w(`label`),children:s}),l&&(0,H.jsx)(q,{component:`span`,...w(`section`),mod:{position:`right`},children:l})]})]})});_h.classes=lh,_h.varsResolver=gh,_h.displayName=`@mantine/core/Button`,_h.Group=fh,_h.GroupSection=mh;var[vh,yh]=Qn(`Card component was not found in tree`),bh={root:`m_e615b15f`,section:`m_599a2148`},xh=ro(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,withBorder:o,inheritPadding:s,mod:c,...l}=U(`CardSection`,null,e),u=yh();return(0,H.jsx)(q,{mod:[{"with-border":o,"inherit-padding":s},c],...u.getStyles(`section`,{className:n,style:r,styles:i,classNames:t}),...l})});xh.classes=bh,xh.displayName=`@mantine/core/CardSection`;var Sh=B((e,{padding:t})=>({root:{"--card-padding":ir(t)}})),Ch={orientation:`vertical`},wh=ro(e=>{let t=U(`Card`,Ch,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,children:c,padding:l,attributes:u,orientation:d,...f}=t,p=W({name:`Card`,props:t,classes:bh,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s,varsResolver:Sh}),m=x.Children.toArray(c),h=m.map((e,t)=>typeof e==`object`&&e&&`type`in e&&(e.type===xh||e.type?.displayName===`@mantine/core/CardSection`)?(0,x.cloneElement)(e,{"data-orientation":d,"data-first-section":t===0||void 0,"data-last-section":t===m.length-1||void 0}):e);return(0,H.jsx)(vh,{value:{getStyles:p},children:(0,H.jsx)(Ou,{unstyled:o,"data-orientation":d,...p(`root`),...f,children:h})})});wh.classes=bh,wh.varsResolver=Sh,wh.displayName=`@mantine/core/Card`,wh.Section=xh;var Th={root:`m_b183c0a2`},Eh=B((e,{color:t})=>({root:{"--code-bg":t?di(t,e):void 0}})),Dh=G(e=>{let t=U(`Code`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,color:c,block:l,mod:u,attributes:d,...f}=t,p=W({name:`Code`,props:t,classes:Th,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:Eh});return(0,H.jsx)(q,{component:l?`pre`:`code`,mod:[{block:l},u],...p(`root`),...f,dir:`ltr`})});Dh.classes=Th,Dh.varsResolver=Eh,Dh.displayName=`@mantine/core/Code`;var Oh={root:`m_7485cace`},kh={strategy:`block`},Ah=B((e,{size:t,fluid:n})=>({root:{"--container-size":n?void 0:rr(t,`container-size`)}})),jh=G(e=>{let t=U(`Container`,kh,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,fluid:c,mod:l,attributes:u,strategy:d,...f}=t,p=W({name:`Container`,classes:Oh,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s,varsResolver:Ah});return(0,H.jsx)(q,{mod:[{fluid:c,strategy:d},l],...p(`root`),...f})});jh.classes=Oh,jh.varsResolver=Ah,jh.displayName=`@mantine/core/Container`;function Mh({offset:e,position:t,defaultOpened:n}){let[r,i]=(0,x.useState)(n),a=(0,x.useRef)(null),{x:o,y:s,elements:c,refs:l,update:u,placement:d}=uu({placement:t,middleware:[wl({crossAxis:!0,padding:5,rootBoundary:`document`})]}),f=d.includes(`right`)?e:t.includes(`left`)?e*-1:0,p=d.includes(`bottom`)?e:t.includes(`top`)?e*-1:0,m=(0,x.useCallback)(({clientX:e,clientY:t})=>{l.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e+f,top:t+p,right:e,bottom:t}}})},[c.reference]);return(0,x.useEffect)(()=>{if(l.floating.current){let e=a.current;e.addEventListener(`mousemove`,m);let t=fs(l.floating.current);return t.forEach(e=>{e.addEventListener(`scroll`,u)}),()=>{e.removeEventListener(`mousemove`,m),t.forEach(e=>{e.removeEventListener(`scroll`,u)})}}},[c.reference,l.floating.current,u,m,r]),{handleMouseMove:m,x:o,y:s,opened:r,setOpened:i,boundaryRef:a,floating:l.setFloating}}var Nh={tooltip:`m_1b3c8819`,arrow:`m_f898399f`},Ph={refProp:`ref`,withinPortal:!0,offset:10,position:`right`,zIndex:er(`popover`)},Fh=B((e,{radius:t,color:n})=>({tooltip:{"--tooltip-radius":t===void 0?void 0:ar(t),"--tooltip-bg":n?di(n,e):void 0,"--tooltip-color":n?`var(--mantine-color-white)`:void 0}})),Ih=G(e=>{let t=U(`TooltipFloating`,Ph,e),{children:n,refProp:r,withinPortal:i,style:a,className:o,classNames:s,styles:c,unstyled:l,radius:u,color:d,label:f,offset:p,position:m,multiline:h,zIndex:g,disabled:_,defaultOpened:v,variant:y,vars:b,portalProps:S,attributes:C,ref:w,...T}=t,E=Wi(),D=W({name:`TooltipFloating`,props:t,classes:Nh,className:o,style:a,classNames:s,styles:c,unstyled:l,attributes:C,rootSelector:`tooltip`,vars:b,varsResolver:Fh}),{handleMouseMove:O,x:k,y:A,opened:j,boundaryRef:ee,floating:M,setOpened:te}=Mh({offset:p,position:m,defaultOpened:v}),ne=Gr(n);if(!ne)throw Error(`[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let N=Ir(ee,Vr(ne),w),P=ne.props,re=e=>{P.onMouseEnter?.(e),O(e),te(!0)},ie=e=>{P.onMouseLeave?.(e),te(!1)};return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Uu,{...S,withinPortal:i,children:(0,H.jsx)(q,{...T,...D(`tooltip`,{style:{...Qa(a,E),zIndex:g,display:!_&&j?`block`:`none`,top:(A&&Math.round(A))??``,left:(k&&Math.round(k))??``}}),variant:y,ref:M,mod:{multiline:h},children:f})}),(0,x.cloneElement)(ne,{...P,[r]:N,onMouseEnter:re,onMouseLeave:ie})]})});Ih.classes=Nh,Ih.varsResolver=Fh,Ih.displayName=`@mantine/core/TooltipFloating`;var Lh=(0,x.createContext)({withinGroup:!1}),Rh={openDelay:0,closeDelay:0};function zh(e){let{openDelay:t,closeDelay:n,children:r}=U(`TooltipGroup`,Rh,e);return(0,H.jsx)(Lh,{value:{withinGroup:!0},children:(0,H.jsx)(ru,{delay:{open:t,close:n},children:r})})}zh.displayName=`@mantine/core/TooltipGroup`,zh.extend=e=>e;function Bh(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function Vh(e){let t=Bh(e.middlewares),n=[Cl(e.offset)];return t.shift&&n.push(wl(typeof t.shift==`boolean`?{padding:8}:{padding:8,...t.shift})),t.flip&&n.push(typeof t.flip==`boolean`?El():El(t.flip)),n.push(Al({element:e.arrowRef,padding:e.arrowOffset})),t.inline?n.push(typeof t.inline==`boolean`?kl():kl(t.inline)):e.inline&&n.push(kl()),n}function Hh(e){let[t,n]=(0,x.useState)(e.defaultOpened),r=typeof e.opened==`boolean`?e.opened:t,i=(0,x.use)(Lh).withinGroup,a=Mr(),o=(0,x.useCallback)(e=>{n(e),e&&g(a)},[a]),{x:s,y:c,context:l,refs:u,placement:d,middlewareData:{arrow:{x:f,y:p}={}}}=uu({strategy:e.strategy,placement:e.position,open:r,onOpenChange:o,middleware:Vh(e),whileElementsMounted:al}),{delay:m,currentId:h,setCurrentId:g}=iu(l,{id:a}),{getReferenceProps:_,getFloatingProps:v}=mu([$l(l,{enabled:e.events?.hover,delay:i?m:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events?.touch}),fu(l,{enabled:e.events?.focus,visibleOnly:!0}),gu(l,{role:`tooltip`}),cu(l,{enabled:e.opened===void 0})]);br(()=>{e.onPositionChange?.(d)},[d]);let y=r&&h&&h!==a;return{x:s,y:c,arrowX:f,arrowY:p,reference:u.setReference,floating:u.setFloating,getFloatingProps:v,getReferenceProps:_,isGroupPhase:y,opened:r,placement:d}}var Uh={position:`top`,refProp:`ref`,withinPortal:!0,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:`side`,offset:5,transitionProps:{duration:100,transition:`fade`},events:{hover:!0,focus:!1,touch:!1},zIndex:er(`popover`),middlewares:{flip:!0,shift:!0,inline:!1}},Wh=B((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({theme:e,color:n||e.primaryColor,autoContrast:i,variant:r||`filled`});return{tooltip:{"--tooltip-radius":t===void 0?void 0:ar(t),"--tooltip-bg":n?a.background:void 0,"--tooltip-color":n?a.color:void 0}}}),Gh=G(e=>{let t=U(`Tooltip`,Uh,e),{children:n,position:r,refProp:i,label:a,openDelay:o,closeDelay:s,onPositionChange:c,opened:l,defaultOpened:u,withinPortal:d,radius:f,color:p,classNames:m,styles:h,unstyled:g,style:_,className:v,withArrow:y,arrowSize:b,arrowOffset:S,arrowRadius:C,arrowPosition:w,offset:T,transitionProps:E,multiline:D,events:O,zIndex:k,disabled:A,onClick:j,onMouseEnter:ee,onMouseLeave:M,inline:te,variant:ne,keepMounted:N,vars:P,portalProps:re,mod:ie,floatingStrategy:ae,middlewares:oe,autoContrast:se,attributes:F,target:ce,ref:le,...ue}=t,{dir:de}=uo(),fe=(0,x.useRef)(null),I=Hh({position:Pu(de,r),closeDelay:s,openDelay:o,onPositionChange:c,opened:l,defaultOpened:u,events:O,arrowRef:fe,arrowOffset:S,offset:typeof T==`number`?T+(y?b/2:0):T,inline:te,strategy:ae,middlewares:oe});(0,x.useEffect)(()=>{let e=ce instanceof HTMLElement?ce:typeof ce==`string`?document.querySelector(ce):ce?.current||null;e&&I.reference(e)},[ce,I]);let pe=W({name:`Tooltip`,props:t,classes:Nh,className:v,style:_,classNames:m,styles:h,unstyled:g,attributes:F,rootSelector:`tooltip`,vars:P,varsResolver:Wh}),me=Gr(n);if(!ce&&!me)throw Error(`[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let he=pe(`tooltip`);if(ce){let e=Xu(E,{duration:100,transition:`fade`});return(0,H.jsx)(H.Fragment,{children:(0,H.jsx)(Uu,{...re,withinPortal:d,children:(0,H.jsx)(Ju,{...e,keepMounted:N,mounted:!A&&!!I.opened,duration:I.isGroupPhase?10:e.duration,children:e=>(0,H.jsxs)(q,{...ue,"data-fixed":ae===`fixed`||void 0,variant:ne,mod:[{multiline:D},ie],...he,...I.getFloatingProps({ref:I.floating,className:he.className,style:{...he.style,...e,zIndex:k,top:I.y??0,left:I.x??0}}),children:[a,(0,H.jsx)(Nu,{ref:fe,arrowX:I.arrowX,arrowY:I.arrowY,visible:y,position:I.placement,arrowSize:b,arrowOffset:S,arrowRadius:C,arrowPosition:w,...pe(`arrow`)})]})})})})}let ge=me.props,_e=Ir(I.reference,Vr(me),le),ve=Xu(E,{duration:100,transition:`fade`});return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Uu,{...re,withinPortal:d,children:(0,H.jsx)(Ju,{...ve,keepMounted:N,mounted:!A&&!!I.opened,duration:I.isGroupPhase?10:ve.duration,children:e=>(0,H.jsxs)(q,{...ue,"data-fixed":ae===`fixed`||void 0,variant:ne,mod:[{multiline:D},ie],...I.getFloatingProps({ref:I.floating,className:pe(`tooltip`).className,style:{...pe(`tooltip`).style,...e,zIndex:k,top:I.y??0,left:I.x??0}}),children:[a,(0,H.jsx)(Nu,{ref:fe,arrowX:I.arrowX,arrowY:I.arrowY,visible:y,position:I.placement,arrowSize:b,arrowOffset:S,arrowRadius:C,arrowPosition:w,...pe(`arrow`)})]})})}),(0,x.cloneElement)(me,I.getReferenceProps({onClick:j,onMouseEnter:ee,onMouseLeave:M,onMouseMove:t.onMouseMove,onPointerDown:t.onPointerDown,onPointerEnter:t.onPointerEnter,...ge,className:qr(v,ge.className),[i]:_e}))]})});Gh.classes=Nh,Gh.varsResolver=Wh,Gh.displayName=`@mantine/core/Tooltip`,Gh.Floating=Ih,Gh.Group=zh;var Kh={size:`sm`,withCheckIcon:!0,allowDeselect:!0,checkIconPosition:`left`,openOnFocus:!0},qh=no(e=>{let t=U([`Input`,`InputWrapper`,`Select`],Kh,e),{classNames:n,styles:r,unstyled:i,vars:a,dropdownOpened:o,defaultDropdownOpened:s,onDropdownClose:c,onDropdownOpen:l,onFocus:u,onBlur:d,onClick:f,onChange:p,data:m,value:h,defaultValue:g,selectFirstOptionOnChange:_,selectFirstOptionOnDropdownOpen:v,onOptionSubmit:y,comboboxProps:b,readOnly:S,disabled:C,filter:w,limit:T,withScrollArea:E,maxDropdownHeight:D,size:O,searchable:k,rightSection:A,checkIconPosition:j,withCheckIcon:ee,withAlignedLabels:M,nothingFoundMessage:te,name:ne,form:N,searchValue:P,defaultSearchValue:re,onSearchChange:ie,allowDeselect:ae,error:oe,rightSectionPointerEvents:se,id:F,clearable:ce,clearSectionMode:le,clearButtonProps:ue,hiddenInputProps:de,renderOption:fe,onClear:I,autoComplete:pe,scrollAreaProps:me,__defaultRightSection:he,__clearSection:ge,__clearable:_e,chevronColor:ve,autoSelectOnBlur:ye,openOnFocus:be,attributes:xe,...Se}=t,Ce=(0,x.useMemo)(()=>Yp(m),[m]),we=(0,x.useRef)({}),Te=(0,x.useMemo)(()=>Xp(Ce),[Ce]),L=Mr(F),[R,Ee,De]=Lr({value:h,defaultValue:g,finalValue:null,onChange:p}),Oe=R==null?void 0:`${R}`in Te?Te[`${R}`]:we.current[`${R}`],ke=Br(Oe),[Ae,je,Me]=Lr({value:P,defaultValue:re,finalValue:Oe?Oe.label:``,onChange:ie}),Ne=wm({opened:o,defaultOpened:s,onDropdownOpen:()=>{l?.(),v?Ne.selectFirstOption():Ne.updateSelectedOptionIndex(`active`,{scrollIntoView:!0})},onDropdownClose:()=>{c?.(),setTimeout(Ne.resetSelectedOption,0)}}),Pe=e=>{je(e),Ne.resetSelectedOption()},{resolvedClassNames:Fe,resolvedStyles:Ie}=ca({props:t,styles:r,classNames:n});(0,x.useEffect)(()=>{_&&Ne.selectFirstOption()},[_,Ae]),(0,x.useEffect)(()=>{h===null&&Pe(``),h!=null&&Oe&&(ke?.value!==Oe.value||ke?.label!==Oe.label)&&Pe(Oe.label)},[h,Oe]),(0,x.useEffect)(()=>{!De&&!Me&&Pe(R==null?``:`${R}`in Te?Te[`${R}`]?.label:we.current[`${R}`]?.label||``)},[Te,R]),(0,x.useEffect)(()=>{R&&`${R}`in Te&&(we.current[`${R}`]=Te[`${R}`])},[Te,R]);let Le=(0,H.jsx)(Dm.ClearButton,{...ue,onClear:()=>{Ee(null,null),Pe(``),I?.()}}),Re=ce&&R!=null&&!C&&!S;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(Dm,{store:Ne,__staticSelector:`Select`,classNames:Fe,styles:Ie,unstyled:i,readOnly:S,size:O,attributes:xe,keepMounted:ye,onOptionSubmit:e=>{y?.(e);let t=ae&&`${Te[e].value}`==`${R}`?null:Te[e],n=t?t.value:null;n!==R&&Ee(n,t),!De&&Pe(n==null?``:t?.label||``),Ne.closeDropdown()},...b,children:[(0,H.jsx)(Dm.Target,{targetType:k?`input`:`button`,autoComplete:pe,withExpandedAttribute:!0,children:(0,H.jsx)(hp,{id:L,__defaultRightSection:(0,H.jsx)(Dm.Chevron,{size:O,error:oe,unstyled:i,color:ve}),__clearSection:Le,__clearable:Re,__clearSectionMode:le,rightSection:A,rightSectionPointerEvents:se||`none`,...Se,size:O,__staticSelector:`Select`,disabled:C,readOnly:S||!k,value:Ae,onChange:e=>{Pe(e.currentTarget.value),Ne.openDropdown(),_&&Ne.selectFirstOption()},onFocus:e=>{be&&k&&Ne.openDropdown(),u?.(e)},onBlur:e=>{ye&&Ne.clickSelectedOption(),k&&Ne.closeDropdown();let t=R!=null&&(`${R}`in Te?Te[`${R}`]:we.current[`${R}`]);Pe(t&&t.label||``),d?.(e)},onClick:e=>{k?Ne.openDropdown():Ne.toggleDropdown(),f?.(e)},classNames:Fe,styles:Ie,unstyled:i,pointer:!k,error:oe,attributes:xe})}),(0,H.jsx)(nh,{data:Ce,hidden:S||C,filter:w,search:Ae,limit:T,hiddenWhenEmpty:!te,withScrollArea:E,maxDropdownHeight:D,filterOptions:!!k&&Oe?.label!==Ae,value:R,checkIconPosition:j,withCheckIcon:ee,withAlignedLabels:M,nothingFoundMessage:te,unstyled:i,labelId:Se.label?`${L}-label`:void 0,"aria-label":Se.label?void 0:Se[`aria-label`],renderOption:fe,scrollAreaProps:me})]}),(0,H.jsx)(Dm.HiddenInput,{value:R,name:ne,form:N,disabled:C,...de})]})});qh.classes={...hp.classes,...Dm.classes},qh.displayName=`@mantine/core/Select`;function Jh(e){if(e!==void 0)return typeof e==`number`?z(e):e}function Yh({spacing:e,verticalSpacing:t,cols:n,minColWidth:r,autoRows:i,selector:a}){let o=Wi(),s=t===void 0?e:t,c=r!==void 0,l=Yn({"--sg-spacing-x":ir(dr(e)),"--sg-spacing-y":ir(dr(s)),"--sg-auto-rows":i,...c?{"--sg-min-col-width":Jh(r)}:{"--sg-cols":dr(n)?.toString()}}),u=Bn(o.breakpoints).reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=ir(e[r])),typeof s==`object`&&s[r]!==void 0&&(t[r][`--sg-spacing-y`]=ir(s[r])),!c&&typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{});return(0,H.jsx)(Ta,{styles:l,media:ur(Bn(u),o.breakpoints).filter(e=>Bn(u[e.value]).length>0).map(e=>({query:`(min-width: ${o.breakpoints[e.value]})`,styles:u[e.value]})),selector:a})}function Xh(e){return typeof e==`object`&&e?Bn(e):[]}function Zh(e){return e.sort((e,t)=>Gn(e)-Gn(t))}function Qh({spacing:e,verticalSpacing:t,cols:n,minColWidth:r}){return Zh(Array.from(new Set([...Xh(e),...Xh(t),...r===void 0?Xh(n):[]])))}function $h({spacing:e,verticalSpacing:t,cols:n,minColWidth:r,autoRows:i,selector:a}){let o=t===void 0?e:t,s=r!==void 0,c=Yn({"--sg-spacing-x":ir(dr(e)),"--sg-spacing-y":ir(dr(o)),"--sg-auto-rows":i,...s?{"--sg-min-col-width":Jh(r)}:{"--sg-cols":dr(n)?.toString()}}),l=Qh({spacing:e,verticalSpacing:t,cols:n,minColWidth:r}),u=l.reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=ir(e[r])),typeof o==`object`&&o[r]!==void 0&&(t[r][`--sg-spacing-y`]=ir(o[r])),!s&&typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{});return(0,H.jsx)(Ta,{styles:c,container:l.map(e=>({query:`simple-grid (min-width: ${e})`,styles:u[e]})),selector:a})}var eg={container:`m_925c2d2c`,root:`m_2415a157`},tg={cols:1,spacing:`md`,type:`media`},ng=G(e=>{let t=U(`SimpleGrid`,tg,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,cols:c,verticalSpacing:l,spacing:u,type:d,minColWidth:f,autoFlow:p,autoRows:m,attributes:h,...g}=t,_=W({name:`SimpleGrid`,classes:eg,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s}),v=Za(),y=f===void 0?void 0:p||`auto-fill`;return d===`container`?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)($h,{...t,selector:`.${v}`}),(0,H.jsx)(`div`,{..._(`container`),children:(0,H.jsx)(q,{..._(`root`,{className:v}),...g,"data-auto-cols":y})})]}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Yh,{...t,selector:`.${v}`}),(0,H.jsx)(q,{..._(`root`,{className:v}),...g,"data-auto-cols":y})]})});ng.classes=eg,ng.displayName=`@mantine/core/SimpleGrid`;var rg={root:`m_6d731127`},ig={gap:`md`,align:`stretch`,justify:`flex-start`},ag=B((e,{gap:t,align:n,justify:r})=>({root:{"--stack-gap":ir(t),"--stack-align":n,"--stack-justify":r}})),og=G(e=>{let t=U(`Stack`,ig,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,align:c,justify:l,gap:u,variant:d,attributes:f,...p}=t;return(0,H.jsx)(q,{...W({name:`Stack`,props:t,classes:rg,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:ag})(`root`),variant:d,...p})});og.classes=rg,og.varsResolver=ag,og.displayName=`@mantine/core/Stack`;var sg=G(e=>(0,H.jsx)(hp,{component:`input`,...U([`Input`,`InputWrapper`,`TextInput`],null,e),__staticSelector:`TextInput`}));sg.classes=hp.classes,sg.displayName=`@mantine/core/TextInput`;var cg=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],lg=[`xs`,`sm`,`md`,`lg`,`xl`];function ug(e,t){let n=t===void 0?`h${e}`:t;return cg.includes(n)?{fontSize:`var(--mantine-${n}-font-size)`,fontWeight:`var(--mantine-${n}-font-weight)`,lineHeight:`var(--mantine-${n}-line-height)`}:lg.includes(n)?{fontSize:`var(--mantine-font-size-${n})`,fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}:{fontSize:z(n),fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}}var dg={root:`m_8a5d1357`},fg={order:1},pg=B((e,{order:t,size:n,lineClamp:r,textWrap:i})=>{let a=ug(t||1,n);return{root:{"--title-fw":a.fontWeight,"--title-lh":a.lineHeight,"--title-fz":a.fontSize,"--title-line-clamp":typeof r==`number`?r.toString():void 0,"--title-text-wrap":i}}}),mg=G(e=>{let t=U(`Title`,fg,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,order:s,vars:c,size:l,variant:u,lineClamp:d,textWrap:f,mod:p,attributes:m,...h}=t,g=W({name:`Title`,props:t,classes:dg,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:m,vars:c,varsResolver:pg});return[1,2,3,4,5,6].includes(s)?(0,H.jsx)(q,{...g(`root`),component:`h${s}`,variant:u,mod:[{order:s,"data-line-clamp":typeof d==`number`},p],size:l,...h}):null});mg.classes=dg,mg.varsResolver=pg,mg.displayName=`@mantine/core/Title`;var hg=g(),gg=sa({primaryColor:`blue`,defaultRadius:`md`,fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif`,headings:{fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif`}});async function _g(e,t){let n=new Headers(t?.headers);t?.body!==void 0&&!n.has(`Content-Type`)&&n.set(`Content-Type`,`application/json`);let r=await fetch(e,{...t,headers:n}),i=await r.json();if(!r.ok)throw Error(i.error??`Request failed: ${r.status}`);return i}var vg={status:()=>_g(`/api/status`),settings:()=>_g(`/api/settings`),saveSettings:e=>_g(`/api/settings`,{method:`PUT`,body:JSON.stringify({ides:e})}),repos:()=>_g(`/api/repos`),addRepo:(e,t,n)=>_g(`/api/repos`,{method:`POST`,body:JSON.stringify({url:e,ref:t,...n?{id:n}:{}})}),deleteRepo:e=>_g(`/api/repos/${e}`,{method:`DELETE`}),bootstrapRepo:e=>_g(`/api/repos/${e}/bootstrap`,{method:`POST`}),fetchRepo:e=>_g(`/api/repos/${e}/fetch`,{method:`POST`}),checkRepoUpdates:e=>_g(`/api/repos/${e}/check-updates`,{method:`POST`}),pullRepo:e=>_g(`/api/repos/${e}/pull`,{method:`POST`}),artifacts:(e,t)=>_g(`/api/repos/${e}/artifacts${t?`?projectPath=${encodeURIComponent(t)}`:``}`),installations:()=>_g(`/api/installations`),saveInstallations:e=>_g(`/api/installations`,{method:`PUT`,body:JSON.stringify({installations:e})}),apply:()=>_g(`/api/apply`,{method:`POST`})};function yg(e,t){let n=e.replace(/\/$/,``),r=t.replace(/\/$/,``);return n===r?`~`:n.startsWith(`${r}/`)?`~${n.slice(r.length)}`:e}var bg=[{id:`codex`,label:`Codex`},{id:`claude`,label:`Claude`},{id:`cursor`,label:`Cursor`}];function xg(){let[e,t]=(0,x.useState)(null),[n,r]=(0,x.useState)(``),[i,a]=(0,x.useState)(``),[o,s]=(0,x.useState)(!1),[c,l]=(0,x.useState)(null),[u,d]=(0,x.useState)(null),f=(0,x.useCallback)(async()=>{let e=await vg.settings();t(e.ides),r(e.home),a(e.version)},[]);(0,x.useEffect)(()=>{f().catch(e=>l(e instanceof Error?e.message:String(e)))},[f]);let p=(0,x.useCallback)(async e=>{s(!0),l(null),d(null);try{let{ides:n}=await vg.saveSettings(e);t(n),d(`Settings saved`),await vg.apply()}catch(e){l(e instanceof Error?e.message:String(e))}finally{s(!1)}},[]);function m(n,r){if(!e)return;let i={...e,[n]:{...e[n],...r}};if([`cursor`,`claude`,`codex`].filter(e=>i[e].enabled).length===0){l(`At least one IDE must be enabled`);return}t(i),p(i)}function h(){e&&p(e)}if(!e)return null;let g=n.replace(/\/\.ide-agents$/,``)||n;return(0,H.jsxs)(og,{gap:`lg`,children:[(0,H.jsxs)(og,{gap:4,children:[(0,H.jsx)(mg,{order:2,children:`Settings`}),(0,H.jsxs)(Cp,{size:`sm`,c:`dimmed`,children:[`Data directory: `,(0,H.jsx)(Dh,{children:n}),` · v`,i]})]}),(0,H.jsx)(Ou,{withBorder:!0,p:`md`,radius:`md`,children:(0,H.jsxs)(og,{gap:`lg`,children:[(0,H.jsx)(mg,{order:4,children:`What do you use?`}),(0,H.jsx)(Cp,{size:`sm`,c:`dimmed`,children:`Enabled tools receive symlinks when you install skills or agents. At least one tool should stay enabled.`}),bg.map(({id:n,label:r})=>(0,H.jsxs)(og,{gap:`xs`,children:[(0,H.jsx)(Ym,{label:r,checked:e[n].enabled,disabled:o,onChange:e=>m(n,{enabled:e.currentTarget.checked})}),(0,H.jsx)(sg,{label:`Config path`,value:yg(e[n].configPath,g),disabled:o||!e[n].enabled,onChange:e=>t(t=>t&&{...t,[n]:{...t[n],configPath:e.currentTarget.value}}),onBlur:()=>h()})]},n))]})}),c&&(0,H.jsx)(vp,{color:`red`,title:`Error`,variant:`light`,children:c}),u&&(0,H.jsx)(vp,{color:`green`,title:`Success`,variant:`light`,children:u})]})}function Sg({url:e,ref:t,loading:n,onUrlChange:r,onRefChange:i,onSubmit:a}){return(0,H.jsx)(Ou,{withBorder:!0,p:`sm`,radius:`md`,children:(0,H.jsx)(`form`,{onSubmit:a,children:(0,H.jsxs)(og,{gap:`sm`,children:[(0,H.jsx)(mg,{order:5,children:`Custom repository`}),(0,H.jsxs)(Fd,{align:`flex-end`,gap:`sm`,wrap:`wrap`,children:[(0,H.jsx)(q,{style:{flex:`1 1 12rem`,minWidth:`min(100%, 12rem)`},children:(0,H.jsx)(sg,{size:`sm`,label:`Git URL`,placeholder:`https://github.com/org/skills.git or file:///path/to/repo`,value:e,onChange:e=>r(e.currentTarget.value),required:!0})}),(0,H.jsx)(q,{w:{base:`100%`,sm:`8.75rem`},style:{flex:`0 0 auto`},children:(0,H.jsx)(sg,{size:`sm`,label:`Ref (branch/tag)`,value:t,onChange:e=>i(e.currentTarget.value)})}),(0,H.jsx)(_h,{type:`submit`,size:`sm`,loading:n,w:{base:`100%`,sm:`auto`},style:{flex:`0 0 auto`},children:`Add / Clone`})]})]})})})}function Cg(e){let t=[e.git.dirty?`Dirty`:`Clean`];return e.git.behind!==null&&e.git.behind>0?t.push(`${e.git.behind} behind`):e.git.behind===0&&t.push(`up to date`),t.join(` · `)}function wg(e){return`${e.skillCount} skill${e.skillCount===1?``:`s`}`+(e.agentCount>0?` · ${e.agentCount} agent${e.agentCount===1?``:`s`}`:``)}function Tg({repo:e,expanded:t,loading:n,onToggle:r,onPull:i,onCheckUpdates:a,onBootstrap:o,onDelete:s}){let c=e.git.sha?.slice(0,8)??`—`,l=e.skillCount===0&&e.agentCount===0;return(0,H.jsx)(Ou,{withBorder:!0,p:t?`sm`:`md`,radius:`md`,style:{cursor:`pointer`,borderColor:t?`var(--mantine-color-blue-outline)`:void 0,background:t?`var(--mantine-color-blue-light)`:void 0},onClick:r,children:(0,H.jsxs)(og,{gap:t?`xs`:`sm`,children:[(0,H.jsxs)(Fd,{justify:`space-between`,align:`flex-start`,wrap:`nowrap`,gap:`sm`,children:[(0,H.jsxs)(og,{gap:2,style:{minWidth:0,flex:1},children:[(0,H.jsx)(Cp,{fw:600,children:e.id}),(0,H.jsx)(Cp,{size:`sm`,c:`dimmed`,style:{wordBreak:`break-all`},children:e.url})]}),t?(0,H.jsx)(ah,{color:`blue`,style:{flexShrink:0},children:`Selected`}):(0,H.jsxs)(Cp,{size:`sm`,c:`dimmed`,ta:`right`,style:{flexShrink:0},children:[wg(e),` · `,e.git.branch??`—`]})]}),t&&(0,H.jsxs)(Fd,{align:`flex-end`,justify:`space-between`,gap:`sm`,wrap:`wrap`,children:[(0,H.jsxs)(og,{gap:4,style:{minWidth:0,flex:1},children:[(0,H.jsxs)(Cp,{size:`sm`,style:{lineHeight:1.45},children:[(0,H.jsxs)(Cp,{span:!0,c:`dimmed`,children:[`Catalog`,` `]}),wg(e),(0,H.jsxs)(Cp,{span:!0,c:`dimmed`,children:[` `,`· `,e.git.branch??`—`,` @`,` `]}),(0,H.jsx)(Dh,{children:c}),(0,H.jsxs)(Cp,{span:!0,c:`dimmed`,children:[` `,`·`,` `]}),Cg(e)]}),(0,H.jsxs)(Cp,{size:`sm`,style:{lineHeight:1.45},children:[(0,H.jsxs)(Cp,{span:!0,c:`dimmed`,children:[`Local`,` `]}),(0,H.jsx)(Dh,{style:{wordBreak:`break-all`,whiteSpace:`normal`},children:e.localPath})]})]}),(0,H.jsxs)(Fd,{gap:`xs`,wrap:`wrap`,style:{flexShrink:0},onClick:e=>e.stopPropagation(),children:[l&&o&&(0,H.jsx)(_h,{variant:`filled`,size:`sm`,disabled:n,onClick:o,children:`Add starter template`}),(0,H.jsx)(_h,{variant:`light`,size:`sm`,disabled:n,onClick:i,children:`Pull`}),(0,H.jsx)(_h,{variant:`light`,size:`sm`,disabled:n,onClick:a,children:`Check updates`}),(0,H.jsx)(_h,{variant:`light`,color:`red`,size:`sm`,disabled:n,onClick:s,children:`Remove`})]})]})]})})}var Eg={compact:`_compact_1rs7b_1`,hoverDetails:`_hoverDetails_1rs7b_10`,hoverDetailsInner:`_hoverDetailsInner_1rs7b_25`};function Dg({repo:e,loading:t,onAdd:n}){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Cp,{size:`sm`,c:`dimmed`,children:e.description}),(0,H.jsx)(Cp,{size:`xs`,c:`dimmed`,style:{wordBreak:`break-all`},children:e.url}),(0,H.jsx)(_h,{variant:`light`,size:`sm`,disabled:t,onClick:n,children:`Add / Clone`})]})}function Og({repo:e,primary:t=!1,loading:n,onAdd:r}){return t?(0,H.jsx)(Ou,{withBorder:!0,p:`md`,radius:`md`,children:(0,H.jsxs)(og,{gap:`sm`,children:[(0,H.jsx)(Cp,{fw:600,children:e.name}),(0,H.jsx)(Dg,{repo:e,loading:n,onAdd:r})]})}):(0,H.jsx)(Ou,{withBorder:!0,p:`md`,radius:`md`,tabIndex:0,className:Eg.compact,children:(0,H.jsxs)(og,{gap:`sm`,children:[(0,H.jsx)(Cp,{fw:600,children:e.name}),(0,H.jsx)(`div`,{className:Eg.hoverDetails,children:(0,H.jsx)(`div`,{className:Eg.hoverDetailsInner,children:(0,H.jsx)(og,{gap:`sm`,children:(0,H.jsx)(Dg,{repo:e,loading:n,onAdd:r})})})})]})})}var kg=[{id:`repo-audit-skills`,name:`sergeychernov/repo-audit-skills`,url:`https://github.com/sergeychernov/repo-audit-skills.git`,ref:`main`,description:`Skills for repository audits — stack detection, architecture, code smells, security, and more.`},{id:`anthropics-skills`,name:`anthropics/skills`,url:`https://github.com/anthropics/skills.git`,ref:`main`,description:`Reference Agent Skills from Anthropic — documents, PDF, spreadsheets, design, and more.`},{id:`cursorskills`,name:`bluriesophos/cursorskills`,url:`https://github.com/bluriesophos/cursorskills.git`,ref:`main`,description:`Cursor workflow skills — planning, debugging, code review, scope discipline, verification.`}];function Ag(e){return e.trim().replace(/\.git$/i,``).replace(/\/$/,``).toLowerCase()}function jg(e){return e.id===kg[0]?.id}function Mg(e,t){let n=Ag(e.url);return t.some(e=>Ag(e)===n)}function Ng(e){return e.error?e.error:e.behind===null?`Unknown (fetch to check)`:e.behind===0?`Up to date`:`${e.behind} commit(s) behind remote`}function Pg(e,t){if(!t?.applied)return`Cloned ${e}`;let n=[`Cloned ${e} and filled it with the starter template`,`(${t.skillCount} skills, ${t.agentCount} agents)`];return t.pushed?n.push(`— pushed to remote`):t.pushError&&n.push(`— push failed: ${t.pushError}`),n.join(` `)}function Fg({onReposChange:e}){let[t,n]=(0,x.useState)([]),[r,i]=(0,x.useState)(null),[a,o]=(0,x.useState)(``),[s,c]=(0,x.useState)(`main`),[l,u]=(0,x.useState)(!1),[d,f]=(0,x.useState)(null),[p,m]=(0,x.useState)(null),h=(0,x.useCallback)(async()=>{n((await vg.repos()).repos),e?.()},[e]);(0,x.useEffect)(()=>{h().catch(e=>f(e instanceof Error?e.message:String(e)))},[h]);let g=t.find(e=>e.id===r)??null;function _(e){i(t=>t===e?null:e)}let v=(0,x.useMemo)(()=>t.map(e=>e.url),[t]),y=(0,x.useMemo)(()=>kg.filter(e=>!Mg(e,v)),[v]),b=y.find(jg),S=y.filter(e=>!jg(e));async function C(t){t.preventDefault(),u(!0),f(null),m(null);try{let{repo:t,bootstrap:r}=await vg.addRepo(a.trim(),s.trim()||`main`);n(e=>[...e,t]),i(t.id),o(``),m(Pg(t.url,r)),e?.()}catch(e){f(e instanceof Error?e.message:String(e))}finally{u(!1)}}async function w(e){u(!0),f(null),m(null);try{let{git:t}=await vg.checkRepoUpdates(e);n(n=>n.map(n=>n.id===e?{...n,git:t}:n)),m(Ng(t))}catch(e){f(e instanceof Error?e.message:String(e))}finally{u(!1)}}async function T(e){u(!0),f(null),m(null);try{let{git:t}=await vg.pullRepo(e);n(n=>n.map(n=>n.id===e?{...n,git:t}:n)),m(`Pull completed`)}catch(e){f(e instanceof Error?e.message:String(e))}finally{u(!1)}}async function E(t){u(!0),f(null),m(null);try{let{repo:r,bootstrap:a}=await vg.addRepo(t.url,t.ref,t.id);n(e=>[...e,r]),i(r.id),m(Pg(t.name,a)),e?.()}catch(e){f(e instanceof Error?e.message:String(e))}finally{u(!1)}}async function D(t){u(!0),f(null),m(null);try{let{repo:r,bootstrap:i}=await vg.bootstrapRepo(t);n(e=>e.map(e=>e.id===t?{...e,...r}:e)),m(Pg(r.url,i)),e?.()}catch(e){f(e instanceof Error?e.message:String(e))}finally{u(!1)}}async function O(t){if(confirm(`Remove this repository from config?`)){u(!0),f(null);try{await vg.deleteRepo(t),n(e=>e.filter(e=>e.id!==t)),r===t&&i(null),e?.()}catch(e){f(e instanceof Error?e.message:String(e))}finally{u(!1)}}}return(0,H.jsxs)(og,{gap:`lg`,children:[(0,H.jsxs)(og,{gap:`md`,children:[(0,H.jsx)(mg,{order:2,children:`Connect repositories`}),(0,H.jsxs)(Cp,{size:`sm`,c:`dimmed`,children:[`Start with public catalogs that include `,(0,H.jsx)(Dh,{children:`SKILL.md`}),` — one click to clone. For corporate, personal, or lesser-known sources, add a URL below. Empty repositories are filled automatically with sample skills, agents, and IDE rules.`]}),y.length>0&&(0,H.jsxs)(og,{gap:`md`,children:[b&&(0,H.jsx)(Og,{repo:b,primary:!0,loading:l,onAdd:()=>E(b)}),S.length>0&&(0,H.jsx)(ng,{cols:{base:1,sm:2},spacing:`md`,children:S.map(e=>(0,H.jsx)(Og,{repo:e,loading:l,onAdd:()=>E(e)},e.id))})]}),(0,H.jsx)(Sg,{url:a,ref:s,loading:l,onUrlChange:o,onRefChange:c,onSubmit:C})]}),d&&(0,H.jsx)(vp,{color:`red`,title:`Error`,variant:`light`,children:d}),p&&(0,H.jsx)(vp,{color:`green`,title:`Success`,variant:`light`,children:p}),(0,H.jsxs)(og,{gap:`md`,children:[(0,H.jsx)(mg,{order:4,children:`Your repositories`}),t.length===0?(0,H.jsx)(Cp,{c:`dimmed`,children:`No repositories yet. Pick a catalog above or add a custom URL.`}):t.map(e=>(0,H.jsx)(Tg,{repo:e,expanded:r===e.id,loading:l,onToggle:()=>_(e.id),onPull:()=>T(e.id),onCheckUpdates:()=>w(e.id),onBootstrap:()=>D(e.id),onDelete:()=>O(e.id)},e.id))]}),g&&(0,H.jsxs)(Cp,{size:`sm`,c:`dimmed`,children:[`Selected: `,(0,H.jsx)(Cp,{span:!0,fw:600,children:g.id}),`. Use Skills or Agents to install from this repo.`]})]})}var Ig={outline:{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},filled:{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`currentColor`,stroke:`none`}},Lg=(e,t,n,r)=>{let i=(0,x.forwardRef)(({color:n=`currentColor`,size:i=24,stroke:a=2,title:o,className:s,children:c,...l},u)=>(0,x.createElement)(`svg`,{ref:u,...Ig[e],width:i,height:i,className:[`tabler-icon`,`tabler-icon-${t}`,s].join(` `),...e===`filled`?{fill:n}:{strokeWidth:a,stroke:n},...l},[o&&(0,x.createElement)(`title`,{key:`svg-title`},o),...r.map(([e,t])=>(0,x.createElement)(e,t)),...Array.isArray(c)?c:[c]]));return i.displayName=`${n}`,i},Rg=Lg(`outline`,`folder`,`Folder`,[[`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`}]]),zg=Lg(`outline`,`world`,`World`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0`,key:`svg-0`}],[`path`,{d:`M3.6 9h16.8`,key:`svg-1`}],[`path`,{d:`M3.6 15h16.8`,key:`svg-2`}],[`path`,{d:`M11.5 3a17 17 0 0 0 0 18`,key:`svg-3`}],[`path`,{d:`M12.5 3a17 17 0 0 1 0 18`,key:`svg-4`}]]);function Bg(e){return e===`global`||e===`any`}function Vg(e){return e===`project`||e===`any`}function Hg(e){return Bg(e.artifact.allowedScope)?e.artifact.targets?.global.blocked??!1:!0}function Ug(e){return!Vg(e.artifact.allowedScope)||!e.projectPath.trim()?!0:e.artifact.targets?.project?.blocked??!1}function Wg(e){if(Hg(e))return e.artifact.targets?.global.blocked?`A regular folder/file already exists at the global path`:e.artifact.allowedScope?`Not allowed by skill scope`:`Set scope in SKILL.md frontmatter`}function Gg(e){if(Ug(e))return e.artifact.targets?.project?.blocked?`A regular folder/file already exists at the project path`:e.artifact.allowedScope?e.artifact.allowedScope===`global`?`Skill is global-only`:e.projectPath.trim()?`Not allowed by skill scope`:`Enter a project path`:`Set scope in SKILL.md frontmatter`}function Kg({active:e,disabled:t,loading:n,label:r,reason:i,icon:a,onClick:o}){return(0,H.jsx)(Gh,{label:t&&i?i:r,multiline:!!(t&&i),maw:280,withArrow:!0,children:(0,H.jsx)(`span`,{style:{display:`inline-flex`},children:(0,H.jsx)(Td,{variant:e?`filled`:`light`,color:e?`blue`:`gray`,disabled:t||n,loading:n,"aria-label":r,"aria-pressed":e,onClick:o,children:(0,H.jsx)(a,{size:18,stroke:1.75})})})})}function qg({row:e,applying:t,onGlobalClick:n,onProjectClick:r}){return(0,H.jsx)(wh,{withBorder:!0,padding:`lg`,radius:`md`,w:`100%`,maw:480,children:(0,H.jsxs)(og,{gap:`md`,children:[(0,H.jsxs)(Fd,{justify:`space-between`,align:`flex-start`,wrap:`nowrap`,children:[(0,H.jsx)(mg,{order:4,lineClamp:1,style:{flex:1},children:e.artifact.name}),(0,H.jsxs)(Fd,{gap:`xs`,wrap:`nowrap`,children:[(0,H.jsx)(Kg,{active:e.global,disabled:Hg(e),loading:t,label:`Global`,reason:Wg(e),icon:zg,onClick:n}),(0,H.jsx)(Kg,{active:e.project,disabled:Ug(e),loading:t,label:`Project`,reason:Gg(e),icon:Rg,onClick:r})]})]}),e.artifact.description?(0,H.jsx)(Cp,{size:`sm`,c:`dimmed`,lineClamp:3,children:e.artifact.description}):null,(0,H.jsx)(sg,{label:`Project path`,description:`Directory where ide-agents was started`,size:`sm`,value:e.projectPath,readOnly:!0,disabled:t})]})})}var Jg=480;function Yg({children:e}){return(0,H.jsx)(q,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(min(100%, ${Jg}px), ${Jg}px))`,gap:`var(--mantine-spacing-md)`},children:e})}function Xg(e,t,n,r){return e.map(e=>{let i=t.find(t=>t.repoId===n&&t.artifactId===e.id);return{artifact:e,global:i?.global??!1,project:i?.project??!1,projectPath:r,installationId:i?.id??null}})}function Zg(e,t,n,r){let i=n.filter(e=>e.repoId!==t),a=n.filter(e=>e.repoId===t),o=[];for(let n of e){let e=a.find(e=>e.artifactId===n.artifact.id),i=n.project?r||null:e?.projectPath??null;o.push({id:n.installationId??crypto.randomUUID(),repoId:t,kind:n.artifact.kind,artifactId:n.artifact.id,sourcePath:n.artifact.sourcePath,targetName:n.artifact.id,global:n.global,project:n.project,projectPath:i})}return[...i,...o]}function Qg({kind:e,title:t,emptyHint:n}){let[r,i]=(0,x.useState)([]),[a,o]=(0,x.useState)(``),[s,c]=(0,x.useState)([]),[l,u]=(0,x.useState)([]),[d,f]=(0,x.useState)(null),[p,m]=(0,x.useState)(null),[h,g]=(0,x.useState)(``),[_,v]=(0,x.useState)(!1),y=(0,x.useMemo)(()=>s.filter(t=>t.artifact.kind===e),[s,e]),b=(0,x.useCallback)(async()=>{let[e,t]=await Promise.all([vg.repos(),vg.installations()]);i(e.repos),u(t.installations),e.repos.length>0&&o(t=>t||e.repos[0].id)},[]),S=(0,x.useCallback)(async(e,t,n)=>{let{artifacts:r}=await vg.artifacts(e,n||void 0);c(Xg(r,t,e,n))},[]);(0,x.useEffect)(()=>{Promise.all([b(),vg.status()]).then(([,e])=>{g(e.defaultProjectPath??``),v(!0)}).catch(e=>m(e instanceof Error?e.message:String(e)))},[b]),(0,x.useEffect)(()=>{!a||!_||S(a,l,h).catch(e=>m(e instanceof Error?e.message:String(e)))},[a,l,h,_,S]);let C=(0,x.useCallback)(async(e,t)=>{if(!a)return;let n=s,r=n.map(n=>{if(n.artifact.id!==e)return n;let r={...n,...t};return t.projectPath!==void 0&&!r.projectPath.trim()&&h&&(r.projectPath=h),r});c(r),f(e),m(null);try{let e=Zg(r,a,l,h);await vg.saveInstallations(e),u(e),await vg.apply()}catch(e){c(n),m(e instanceof Error?e.message:String(e))}finally{f(null)}},[a,s,l,h]);function w(e){let t=s.find(t=>t.artifact.id===e);if(!t||Hg(t))return;let n=!t.global;C(e,{global:n,project:n?!1:t.project})}function T(e){let t=s.find(t=>t.artifact.id===e);if(!t||Ug(t))return;let n=!t.project;C(e,{project:n,global:n?!1:t.global,...n?{projectPath:h}:{}})}let E=r.map(e=>({value:e.id,label:e.id}));return(0,H.jsxs)(og,{gap:`lg`,children:[(0,H.jsx)(mg,{order:2,children:t}),(0,H.jsx)(qh,{label:`Repository`,placeholder:`No repositories`,data:E,value:a||null,onChange:e=>o(e??``),disabled:r.length===0,maw:400}),p&&(0,H.jsx)(vp,{color:`red`,title:`Error`,variant:`light`,children:p}),y.length===0?(0,H.jsx)(Cp,{c:`dimmed`,children:n}):(0,H.jsx)(Yg,{children:y.map(e=>(0,H.jsx)(qg,{row:e,applying:d===e.artifact.id,onGlobalClick:()=>w(e.artifact.id),onProjectClick:()=>T(e.artifact.id)},e.artifact.id))})]})}function $g(){return(0,H.jsx)(Qg,{kind:`skill`,title:`Skills`,emptyHint:`No skills found. Add a repo with a skills/ directory on the Settings page.`})}function e_(){return(0,H.jsx)(Qg,{kind:`agent`,title:`Agents`,emptyHint:`No agents found. Add a repo with an agents/ directory on the Settings page.`})}function t_({catalog:e,onNavigate:t}){return(0,H.jsx)(H.Fragment,{children:[{to:`/settings`,label:`Settings`,enabled:!0},{to:`/repositories`,label:`Repositories`,enabled:!0},{to:`/skills`,label:`Skills`,enabled:e.skills,disabledHint:`Add a repository that contains skills`},{to:`/agents`,label:`Agents`,enabled:e.agents,disabledHint:`Add a repository that contains agents`}].map(e=>e.enabled?(0,H.jsx)(Cn,{to:e.to,onClick:t,style:({isActive:e})=>({textDecoration:`none`,fontWeight:e?600:400,color:e?`var(--mantine-color-blue-filled)`:`var(--mantine-color-text)`,padding:`8px 12px`,borderRadius:`var(--mantine-radius-md)`,background:e?`var(--mantine-color-blue-light)`:`transparent`}),children:e.label},e.to):(0,H.jsx)(Gh,{label:e.disabledHint,children:(0,H.jsx)(Cp,{size:`sm`,c:`dimmed`,px:12,py:8,style:{cursor:`not-allowed`,opacity:.55},children:e.label})},e.to))})}function n_(){let[e,{toggle:t,close:n}]=zr(),r=et(),[i,a]=(0,x.useState)({skills:!1,agents:!1}),o=(0,x.useCallback)(async()=>{let{repos:e}=await vg.repos();a({skills:e.some(e=>e.skillCount>0),agents:e.some(e=>e.agentCount>0)})},[]);return(0,x.useEffect)(()=>{o().catch(()=>{a({skills:!1,agents:!1})})},[o,r.pathname]),(0,H.jsxs)(qp,{header:{height:56},navbar:{width:200,breakpoint:`sm`,collapsed:{desktop:!0,mobile:!e}},padding:`md`,children:[(0,H.jsx)(qp.Header,{children:(0,H.jsxs)(Fd,{h:`100%`,px:`md`,justify:`space-between`,children:[(0,H.jsxs)(Fd,{children:[(0,H.jsx)(ch,{opened:e,onClick:t,hiddenFrom:`sm`,size:`sm`}),(0,H.jsx)(mg,{order:3,size:`h4`,children:`ide-agents`})]}),(0,H.jsx)(Fd,{gap:`xs`,visibleFrom:`sm`,children:(0,H.jsx)(t_,{catalog:i})})]})}),(0,H.jsx)(qp.Navbar,{p:`md`,hiddenFrom:`sm`,children:(0,H.jsx)(og,{gap:`xs`,children:(0,H.jsx)(t_,{catalog:i,onNavigate:n})})}),(0,H.jsx)(qp.Main,{children:(0,H.jsx)(jh,{size:`lg`,py:`sm`,px:{base:`xs`,sm:`md`},children:(0,H.jsxs)(jt,{children:[(0,H.jsx)(kt,{path:`/`,element:(0,H.jsx)(Ot,{to:`/repositories`,replace:!0})}),(0,H.jsx)(kt,{path:`/settings`,element:(0,H.jsx)(xg,{})}),(0,H.jsx)(kt,{path:`/repositories`,element:(0,H.jsx)(Fg,{onReposChange:o})}),(0,H.jsx)(kt,{path:`/skills`,element:i.skills?(0,H.jsx)($g,{}):(0,H.jsx)(Ot,{to:`/repositories`,replace:!0})}),(0,H.jsx)(kt,{path:`/agents`,element:i.agents?(0,H.jsx)(e_,{}):(0,H.jsx)(Ot,{to:`/repositories`,replace:!0})}),(0,H.jsx)(kt,{path:`/artifacts`,element:(0,H.jsx)(Ot,{to:`/skills`,replace:!0})})]})})})]})}(0,hg.createRoot)(document.getElementById(`root`)).render((0,H.jsx)(x.StrictMode,{children:(0,H.jsx)(aa,{theme:gg,defaultColorScheme:`auto`,children:(0,H.jsx)(yn,{children:(0,H.jsx)(n_,{})})})}));
|