@fabiofiorita/porcelain 0.83.0 → 0.85.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 -1
- package/package.json +1 -1
- package/server/src/cli/main.mjs +6203 -5256
- package/web/dist/assets/_paired-B6tiTIDs.js +40 -0
- package/web/dist/assets/_paired-BTiwzm1O.js +1 -0
- package/web/dist/assets/_section-C1ant2Gf.js +1 -0
- package/web/dist/assets/access-Dl1HKbYr.js +17 -0
- package/web/dist/assets/confirmed-read-DcLEUmry.js +133 -0
- package/web/dist/assets/{core-R2hgk4px.js → core-CzPj8AUX.js} +1 -1
- package/web/dist/assets/{file-editor-CnQvPWI-.js → file-editor-ZzNIR2Bb.js} +13 -13
- package/web/dist/assets/{highlights-DchcZkI3.js → highlights-CkhjI2ek.js} +2 -2
- package/web/dist/assets/index-B38tyj8W.js +1504 -0
- package/web/dist/assets/{index-HBCxqMtr.css → index-wLG_09Ob.css} +1 -1
- package/web/dist/assets/lazyRouteComponent-Blj06I1z.js +1 -0
- package/web/dist/assets/pair-BTiwzm1O.js +1 -0
- package/web/dist/assets/pair-Cc4RvFWD.js +1 -0
- package/web/dist/assets/resolveLanguages-ByH4UCRT.js +2 -0
- package/web/dist/assets/shiki-DylxQut3.js +1 -0
- package/web/dist/assets/{stream-tokenizer-BU46NudF.js → stream-tokenizer-DzPUGMwH.js} +3 -3
- package/web/dist/assets/themeResolver-fzWDoZkr.js +2 -0
- package/web/dist/assets/themes-K9KCd10n.js +2 -0
- package/web/dist/assets/useMatch-DOx1OLzI.js +1 -0
- package/web/dist/assets/workspace-error-WdCLSEta.js +1 -0
- package/web/dist/index.html +8 -13
- package/web/dist/assets/_-16pZD2GN.js +0 -1
- package/web/dist/assets/_paired-B0WyT4V9.js +0 -1
- package/web/dist/assets/_paired-Dr6SPIr0.js +0 -1
- package/web/dist/assets/_paired-DtlvYTx3.js +0 -1
- package/web/dist/assets/_paired-DwhFACbc.js +0 -1
- package/web/dist/assets/_section-BtREvi1c.js +0 -1
- package/web/dist/assets/_worktreeId-B0WyT4V9.js +0 -1
- package/web/dist/assets/_worktreeId-BqvleVW2.js +0 -1
- package/web/dist/assets/_worktreeId-DwhFACbc.js +0 -1
- package/web/dist/assets/_worktreeId-mENbJ8d6.js +0 -1
- package/web/dist/assets/access-FSq50_zr.js +0 -17
- package/web/dist/assets/connected-workspace-CoqMh8ZH.js +0 -1
- package/web/dist/assets/constants-CmGPilXJ.js +0 -1
- package/web/dist/assets/desktop-actions-Dp7uXLpd.js +0 -40
- package/web/dist/assets/edit-file-u4Jh7DaZ.js +0 -271
- package/web/dist/assets/hastToHtml-yWaxTNYJ.js +0 -3
- package/web/dist/assets/index-C-VbrrPp.js +0 -10
- package/web/dist/assets/lazyRouteComponent-1k1cz2Rs.js +0 -1
- package/web/dist/assets/lib-6HYXi0_j.js +0 -9
- package/web/dist/assets/pair-B0WyT4V9.js +0 -1
- package/web/dist/assets/pair-CDRRpeB2.js +0 -1
- package/web/dist/assets/resolveLanguages-BkDrap64.js +0 -2
- package/web/dist/assets/root-DLTE-HSj.js +0 -1
- package/web/dist/assets/settings-page-C4F13mjh.js +0 -1350
- package/web/dist/assets/shiki-DuHfSKnd.js +0 -1
- package/web/dist/assets/themes-BSeJ3lIS.js +0 -2
- package/web/dist/assets/useMatch-CfGvegwy.js +0 -1
- package/web/dist/assets/useRouterState-CWTR8rVi.js +0 -1
- package/web/dist/assets/workspace-error-Cufx_WLE.js +0 -1
- package/web/dist/assets/workspace-pending-jNTTS2oy.js +0 -1
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{$ as t,$s as n,Aa as r,Bc as i,Cc as a,Cl as o,Cn as s,Da as c,Dc as l,Dn as u,Do as d,Dt as f,Ea as p,En as m,Eo as h,Et as g,Fl as _,Gc as v,Gi as y,Hc as b,Hl as x,Hn as S,Ht as C,Ic as w,Ii as T,It as E,J as D,Ja as O,Jo as k,Jr as A,Ka as j,Kc as M,Ki as ee,L as N,Ll as P,Lo as F,Mc as I,Ml as L,Mt as R,Nl as z,Nr as B,Nt as te,Oo as ne,Ot as re,Pc as ie,Po as ae,Rl as oe,Ro as se,Ss as ce,St as le,Tc as ue,Ti as de,To as fe,Tt as pe,Ua as me,Uc as he,Va as ge,Vc as _e,Wa as V,Wo as ve,Xo as ye,Xr as be,Y as xe,Z as Se,Za as Ce,Zc as we,Zo as Te,_a as Ee,_o as De,aa as Oe,an as H,ao as ke,bn as Ae,cc as je,ci as Me,cn as Ne,co as Pe,cs as Fe,dc as Ie,dn as Le,do as Re,ds as ze,ei as Be,el as Ve,eo as He,es as Ue,et as We,fc as Ge,fl as Ke,ga as qe,gn as Je,gt as Ye,hn as Xe,ia as Ze,ic as Qe,in as $e,io as et,is as tt,it as nt,jt as rt,ka as it,kc as at,ko as ot,kt as st,la as ct,li as lt,ln as ut,ls as dt,ml as ft,nc as pt,nn as mt,no as ht,oa as gt,oc as _t,on as vt,oo as yt,os as bt,pn as xt,ps as St,qa as Ct,qc as wt,rn as Tt,rs as Et,sc as Dt,sn as Ot,ss as kt,ta as At,tc as jt,ti as Mt,tn as Nt,ts as Pt,ua as Ft,ul as It,un as Lt,uo as Rt,va as zt,vl as Bt,vn as Vt,vo as Ht,vs as Ut,vt as Wt,wa as Gt,wl as Kt,xa as qt,xn as Jt,xo as Yt,yc as Xt,yn as Zt,yo as Qt,zn as $t,zo as en}from"./access-Dl1HKbYr.js";import{n as tn}from"./themeResolver-fzWDoZkr.js";import{t as nn}from"./formatCSSVariablePrefix-KRh9vnZf.js";var U=e(n(),1),rn=(0,U.createContext)(null),an={};function on({children:e,defaultOptions:t=an}){let n=(0,U.useMemo)(()=>({defaultOptions:t}),[t]);return U.createElement(rn.Provider,{value:n},e)}function sn(){return(0,U.useContext)(rn)?.defaultOptions??{}}function cn(e){return typeof e==`object`&&!!e&&`current`in e}function W(){if(typeof navigator>`u`)return`linux`;let e=navigator.platform?.toLowerCase()??``,t=navigator.userAgent?.toLowerCase()??``;return e.includes(`mac`)||t.includes(`mac`)?`mac`:e.includes(`win`)||t.includes(`win`)?`windows`:`linux`}var ln=[`Control`,`Alt`,`Shift`,`Meta`];new Set(ln);var un={Control:`Control`,Ctrl:`Control`,control:`Control`,ctrl:`Control`,Shift:`Shift`,shift:`Shift`,Alt:`Alt`,Option:`Alt`,alt:`Alt`,option:`Alt`,Command:`Meta`,Cmd:`Meta`,Meta:`Meta`,command:`Meta`,cmd:`Meta`,meta:`Meta`,OS:`Meta`,os:`Meta`,Win:`Meta`,win:`Meta`,CommandOrControl:`Mod`,Mod:`Mod`,commandorcontrol:`Mod`,mod:`Mod`};function dn(e,t=W()){return e===`Mod`?t===`mac`?`Meta`:`Control`:e}var fn=new Set(`ABCDEFGHIJKLMNOPQRSTUVWXYZ`.split(``)),pn=new Set([`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`]),mn=new Set([`F1`,`F2`,`F3`,`F4`,`F5`,`F6`,`F7`,`F8`,`F9`,`F10`,`F11`,`F12`]),hn=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`,`PageUp`,`PageDown`]),gn=new Set([`Enter`,`Escape`,`Space`,`Tab`,`Backspace`,`Delete`]),_n=new Set([`/`,`[`,`]`,`\\`,`=`,`-`,`,`,`.`,`;`,"`"]),vn={Backquote:"`",Backslash:`\\`,BracketLeft:`[`,BracketRight:`]`,Comma:`,`,Equal:`=`,Minus:`-`,Period:`.`,Semicolon:`;`,Slash:`/`};[...fn,...pn,...mn,...hn,...gn,..._n];var yn={Esc:`Escape`,esc:`Escape`,escape:`Escape`,Return:`Enter`,return:`Enter`,enter:`Enter`," ":`Space`,space:`Space`,Spacebar:`Space`,spacebar:`Space`,tab:`Tab`,backspace:`Backspace`,Del:`Delete`,del:`Delete`,delete:`Delete`,Up:`ArrowUp`,up:`ArrowUp`,arrowup:`ArrowUp`,Down:`ArrowDown`,down:`ArrowDown`,arrowdown:`ArrowDown`,Left:`ArrowLeft`,left:`ArrowLeft`,arrowleft:`ArrowLeft`,Right:`ArrowRight`,right:`ArrowRight`,arrowright:`ArrowRight`,home:`Home`,end:`End`,pageup:`PageUp`,pagedown:`PageDown`,PgUp:`PageUp`,PgDn:`PageDown`,pgup:`PageUp`,pgdn:`PageDown`};function bn(e){return/^\p{Letter}$/u.test(e)}function xn(e){if(!e)return``;if(e in yn)return yn[e];if(bn(e)){let t=e.toUpperCase();return t.length===1?t:e}let t=e.toUpperCase();return/^F([1-9]|1[0-2])$/.test(t)?t:e}var Sn={Control:`⌃`,Alt:`⌥`,Shift:`⇧`,Meta:`⌘`,Mod:`⌘`},Cn={Control:`Control`,Alt:`Option`,Shift:`Shift`,Meta:`Cmd`,Mod:`Cmd`},wn={Control:`Ctrl`,Alt:`Alt`,Shift:`Shift`,Meta:`Win`,Mod:`Ctrl`},Tn={...wn,Meta:`Super`},En={"`":`Backquote`,"\\":`Backslash`,"[":`Left Bracket`,"]":`Right Bracket`,",":`Comma`,"=":`Equal`,"-":`Minus`,".":`Period`,";":`Semicolon`},Dn={ArrowUp:`↑`,ArrowDown:`↓`,ArrowLeft:`←`,ArrowRight:`→`,Enter:`↵`,Escape:`Esc`,Backspace:`⌫`,Delete:`⌦`,Tab:`⇥`,Space:`␣`};function On(e,t=W()){let n=e.split(`+`),r=new Set,i=``;for(let e=0;e<n.length;e++){let a=n[e].trim();if(e===n.length-1)i=xn(a);else{let e=un[a]??un[a.toLowerCase()];if(e){let n=dn(e,t);r.add(n)}else n.length===1&&(i=xn(a))}}return!i&&n.length>0&&(i=xn(n[n.length-1].trim())),{key:i,ctrl:r.has(`Control`),shift:r.has(`Shift`),alt:r.has(`Alt`),meta:r.has(`Meta`),modifiers:ln.filter(e=>r.has(e))}}function kn(e,t=W()){let n=e.ctrl??!1,r=e.shift??!1,i=e.alt??!1,a=e.meta??!1;e.mod&&(dn(`Mod`,t)===`Control`?n=!0:a=!0);let o=ln.filter(e=>{switch(e){case`Control`:return n;case`Shift`:return r;case`Alt`:return i;case`Meta`:return a;default:return!1}});return{key:e.key,ctrl:n,shift:r,alt:i,meta:a,modifiers:o}}function An(e,t){let n=t===`mac`?e.meta&&!e.ctrl:e.ctrl&&!e.meta,r=[];if(n)r.push(`Mod`),e.alt&&r.push(`Alt`),e.shift&&r.push(`Shift`);else for(let t of ln)e.modifiers.includes(t)&&r.push(t);return r.push(xn(e.key)),r.join(`+`)}function jn(e,t=W()){return An(On(e,t),t)}function Mn(e,t=W()){return An(e,t)}function Nn(e,t=W()){return typeof e==`string`?jn(e,t):Mn(kn(e,t),t)}function Pn(e){return e in un||e.toLowerCase()in un}function Fn(e){let t=[];for(let n of ln)e.modifiers.includes(n)&&t.push(n);return t.push(e.key),t.join(`+`)}function In(e,t={}){let n=t.platform??W(),r=t.useSymbols??!0,i=t.separatorToken??(n===`mac`&&r?` `:`+`);return Nn(e,n).split(`+`).map(e=>{if(Pn(e)){let t=un[e]??un[e.toLowerCase()];return n===`mac`?r?Sn[t]:Cn[t]:n===`windows`?wn[t]:Tn[t]}return r&&Dn[e]||!r&&En[e]||e}).join(i)}function Ln(e,t,n=W()){let r=typeof t==`string`?On(t,n):t;if(e.ctrlKey!==r.ctrl||e.shiftKey!==r.shift||e.altKey!==r.alt||e.metaKey!==r.meta)return!1;let i=xn(e.key),a=r.key;if(i!==`Dead`&&i.length===1&&a.length===1){if(i.toUpperCase()===a.toUpperCase())return!0;if(bn(i)&&(/^[A-Za-z]$/.test(i)||!e.altKey))return!1}if(e.code&&(i===`Dead`||i.length===1&&a.length===1)){if(e.code.startsWith(`Key`)){let t=e.code.slice(3);if(t.length===1&&/^[A-Za-z]$/.test(t))return t.toUpperCase()===a.toUpperCase()}if(e.code.startsWith(`Digit`)){let t=e.code.slice(5);if(t.length===1&&/^[0-9]$/.test(t))return t===a}return e.code in vn&&vn[e.code]===a}return i===a}var Rn={preventDefault:!0,stopPropagation:!0,eventType:`keydown`,enabled:!0,ignoreInputs:!0,conflictBehavior:`warn`};function zn(e){return!(e.ctrl||e.meta||e.key===`Escape`)}function Bn(e){if(!e)return!1;if(e instanceof HTMLInputElement){let t=e.type.toLowerCase();return t!==`button`&&t!==`submit`&&t!==`reset`}return!!(e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement||e instanceof HTMLElement&&e.isContentEditable)}function Vn(e){return typeof document>`u`?null:typeof Document<`u`&&e instanceof Document||typeof Node<`u`&&e.nodeType===Node.DOCUMENT_NODE?e.activeElement:typeof HTMLElement<`u`&&e instanceof HTMLElement?e.ownerDocument.activeElement??null:e.document.activeElement??null}function Hn(e,t,n){let r=Vn(t);return r&&Bn(r)&&r!==n||e.composedPath().some(e=>Bn(e)&&e!==n)?!0:Bn(e.target)&&e.target!==n}function Un(e,t){return t===document||t===window?e.currentTarget===t||e.currentTarget===document.documentElement:t===window?e.currentTarget===window||e.currentTarget===document||e.currentTarget===document.documentElement:!!(t instanceof HTMLElement&&(e.currentTarget===t||e.target instanceof Node&&t.contains(e.target)))}function Wn(e,t,n,r){if(n!==`allow`){if(n===`warn`)console.warn(`'${t}' is already registered. Multiple handlers will be triggered. Use conflictBehavior: 'replace' to replace the existing handler, or conflictBehavior: 'allow' to suppress this warning.`);else{if(n===`error`)throw Error(`'${t}' is already registered. Use conflictBehavior: 'replace' to replace the existing handler, or conflictBehavior: 'allow' to allow multiple registrations.`);r(e)}}}function Gn({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0)n=e.nextSub;else{for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}}while(1)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(1)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function Kn(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var qn=[],Jn=0,{link:Yn,unlink:Xn,propagate:Zn,checkDirty:Qn,shallowPropagate:$n}=Gn({update(e){return e._update()},notify(e){qn[tr++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,ir(e))}}),er=0,tr=0,nr,rr=0;function G(e){try{++rr,e()}finally{--rr||ar()}}function ir(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=Xn(n,e)}function ar(){if(!(rr>0)){for(;er<tr;){let e=qn[er];qn[er++]=void 0,e.notify()}er=0,tr=0}}function or(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:+!n,get(){return nr!==void 0&&Yn(i,nr,Jn),i._snapshot},subscribe(e){let t=Kn(e),n={current:!1},r=sr(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=nr,o=t?.compare??Object.is;if(n)nr=i,++Jn,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=5);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{nr=a,n&&(i.flags&=-5),ir(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&Qn(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&$n(e)}}else e&32&&(i.flags=e&-33);return nr!==void 0&&Yn(i,nr,Jn),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(Zn(e),$n(e),ar())}},i}function sr(e){let t=()=>{let t=nr;nr=n,++Jn,n.depsTail=void 0,n.flags=6;try{return e()}finally{nr=t,n.flags&=-5,ir(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let e=this.flags;e&16||e&32&&Qn(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,ir(this)}};return t(),n}var cr=class{constructor(e,t){this.atom=or(e),this.get=this.get.bind(this),this.setState=this.setState.bind(this),this.subscribe=this.subscribe.bind(this),t&&(this.actions=t(this))}setState(e){this.atom.set(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(Kn(e))}},lr=class{constructor(e){this.atom=or(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(Kn(e))}};function ur(e,t){return typeof e==`function`?new lr(e):t?new cr(e,t):new cr(e)}var dr=0;function fr(){return`hotkey_${++dr}`}var pr=class e{static#e=null;#t;#n=new Map;#r=new Map;constructor(){this.registrations=new cr(new Map),this.#t=W()}static getInstance(){return e.#e||=new e,e.#e}static resetInstance(){e.#e&&=(e.#e.destroy(),null)}register(e,t,n={}){if(typeof document>`u`&&!n.target){let e=t;return{id:fr(),unregister:()=>{},get callback(){return e},set callback(t){e=t},setOptions:()=>{},get isActive(){return!1}}}let r=fr(),i=n.platform??this.#t,a=typeof e==`string`?On(e,i):kn(e,i),o=typeof e==`string`?e:Fn(a),s=n.target??document,c=n.conflictBehavior??`warn`,l=this.#d(o,s);l&&Wn(l.id,o,c,e=>this.#i(e));let u=n.ignoreInputs??zn(a),d={id:r,hotkey:o,parsedHotkey:a,callback:t,options:{...Rn,requireReset:!1,...n,platform:i,ignoreInputs:u},hasFired:!1,triggerCount:0,target:s};this.registrations.setState(e=>new Map(e).set(r,d)),this.#r.has(s)||this.#r.set(s,new Set),this.#r.get(s).add(r),this.#a(s);let f=this;return{get id(){return r},unregister:()=>{f.#i(r)},get callback(){return f.registrations.state.get(r)?.callback??t},set callback(e){let t=f.registrations.state.get(r);t&&(t.callback=e)},setOptions:e=>{f.registrations.setState(t=>{let n=t.get(r);if(n){let i=new Map(t);return i.set(r,{...n,options:{...n.options,...e}}),i}return t})},get isActive(){return f.registrations.state.has(r)}}}#i(e){let t=this.registrations.state.get(e);if(!t)return;let n=t.target;this.registrations.setState(t=>{let n=new Map(t);return n.delete(e),n});let r=this.#r.get(n);r&&(r.delete(e),r.size===0&&this.#o(n))}#a(e){if(typeof document>`u`||this.#n.has(e))return;let t=this.#l(e),n=this.#u(e);e.addEventListener(`keydown`,t),e.addEventListener(`keyup`,n),this.#n.set(e,{keydown:t,keyup:n})}#o(e){if(typeof document>`u`)return;let t=this.#n.get(e);t&&(e.removeEventListener(`keydown`,t.keydown),e.removeEventListener(`keyup`,t.keyup),this.#n.delete(e),this.#r.delete(e))}#s(e,t,n){let r=this.#r.get(t);if(r)for(let i of r){let r=this.registrations.state.get(i);if(r&&Un(e,t)&&r.options.enabled&&!(r.options.ignoreInputs!==!1&&Hn(e,t,r.target))){if(n===`keydown`){if(r.options.eventType!==`keydown`)continue;Ln(e,r.parsedHotkey,r.options.platform)&&(r.options.preventDefault&&e.preventDefault(),r.options.stopPropagation&&e.stopPropagation(),r.options.requireReset&&r.hasFired||(this.#c(r,e),r.options.requireReset&&(r.hasFired=!0)))}else r.options.eventType===`keyup`&&Ln(e,r.parsedHotkey,r.options.platform)&&this.#c(r,e),r.options.requireReset&&r.hasFired&&this.#f(r,e)&&(r.hasFired=!1)}}}#c(e,t){e.options.preventDefault&&t.preventDefault(),e.options.stopPropagation&&t.stopPropagation(),e.triggerCount++,this.registrations.setState(e=>new Map(e));let n={hotkey:e.hotkey,parsedHotkey:e.parsedHotkey};e.callback(t,n)}#l(e){return t=>{this.#s(t,e,`keydown`)}}#u(e){return t=>{this.#s(t,e,`keyup`)}}#d(e,t){for(let n of this.registrations.state.values())if(n.hotkey===e&&n.target===t)return n;return null}#f(e,t){let n=e.parsedHotkey,r=xn(t.key),i=n.key.length===1?n.key.toUpperCase():n.key;return!!((r.length===1?r.toUpperCase():r)===i||n.ctrl&&r===`Control`||n.shift&&r===`Shift`||n.alt&&r===`Alt`||n.meta&&r===`Meta`)}triggerRegistration(e){let t=this.registrations.state.get(e);if(!t)return!1;let n=t.parsedHotkey,r=new KeyboardEvent(t.options.eventType??`keydown`,{key:n.key,ctrlKey:n.ctrl,shiftKey:n.shift,altKey:n.alt,metaKey:n.meta,bubbles:!0,cancelable:!0});return t.triggerCount++,this.registrations.setState(e=>new Map(e)),t.callback(r,{hotkey:t.hotkey,parsedHotkey:t.parsedHotkey}),!0}getRegistrationCount(){return this.registrations.state.size}isRegistered(e,t){for(let n of this.registrations.state.values())if(n.hotkey===e&&(t===void 0||n.target===t))return!0;return!1}destroy(){for(let e of this.#n.keys())this.#o(e);this.registrations.setState(()=>new Map),this.#n.clear(),this.#r.clear()}};function mr(){return pr.getInstance()}function hr(e,t,n={}){let r={...sn().hotkey,...n},i=mr(),a=(0,U.useRef)(null),o=(0,U.useRef)(t),s=(0,U.useRef)(r),c=(0,U.useRef)(i);o.current=t,s.current=r,c.current=i;let l=(0,U.useRef)(null),u=(0,U.useRef)(null),d=Nn(e,r.platform??W()),{target:f,...p}=r;(0,U.useEffect)(()=>{let e=cn(s.current.target)?s.current.target.current:s.current.target??(typeof document<`u`?document:null);if(!e){a.current?.isActive&&(a.current.unregister(),a.current=null),l.current=null,u.current=null;return}let t=l.current!==null&&l.current!==e,n=u.current!==null&&u.current!==d;return a.current?.isActive&&(t||n)&&(a.current.unregister(),a.current=null),a.current&&a.current.isActive||(a.current=c.current.register(d,o.current,{...s.current,target:e})),l.current=e,u.current=d,()=>{a.current?.isActive&&(a.current.unregister(),a.current=null)}},[d]),a.current?.isActive&&(a.current.callback=t,a.current.setOptions(p))}var gr=Ut();function _r(e,t){return e===t}function K(e,t=e=>e,n){let r=n?.compare??_r,i=(0,U.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,U.useCallback)(()=>e.get(),[e]);return(0,gr.useSyncExternalStoreWithSelector)(i,a,a,t,r)}var vr={name:`rotate-ccw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]};vr.node;var yr=me(vr),br={name:`triangle-alert`,size:24,node:[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`alert-triangle`]};br.node;var xr=me(br),Sr=Xt(()=>globalThis.localStorage),Cr=new Intl.Collator,wr=(e,t)=>Cr.compare(e,t);function Tr(e){let t=e.path?`${e.path}/`:``;return e.entries.map(e=>({path:`${t}${e.name}${e.kind===`directory`?`/`:``}`,kind:e.kind,...e.ignored?{ignored:!0}:{},...e.target===void 0?{}:{target:e.target}}))}var Er=e=>e.replace(/\/$/,``);function Dr(e,t){let n=Er(t),r=Er(e);return r===n||r.startsWith(`${n}/`)}function Or(e,t,n){let r=Er(t);return Dr(e,r)?`${Er(n)}${e.slice(r.length)}`:e}function kr(e){let t=e.split(`/`).filter(Boolean);return t.slice(0,-1).map((e,n)=>t.slice(0,n+1).join(`/`))}function Ar(e,t,n){let r=e=>e.replace(/\/$/,``),i=new Set([...t].map(r)),a=new Set([...n].map(r)),o=e.filter(e=>e.kind===`directory`).map(e=>r(e.path)).sort(wr),s=new Set(o.filter(e=>i.has(e))),c=new Map;for(let t of e){let e=kr(t.path).at(-1);e&&c.set(e,(c.get(e)??0)+1)}for(let e of o){let t=kr(e).at(-1);!a.has(e)&&t&&s.has(t)&&c.get(t)===1&&s.add(e)}return[...s].filter(e=>kr(e).every(e=>s.has(e)))}function jr(e){let t=new Map(e.map(e=>[e.path,e])),n=new Map,r=t.has(``)?[``]:[];for(let e of r){let i=t.get(e);if(i){for(let e of Tr(i))if(n.set(e.path,e),e.kind===`directory`){let n=e.path.replace(/\/$/,``);t.has(n)&&r.push(n)}}}return[...n.values()].sort((e,t)=>wr(e.path,t.path))}function Mr(e){let t=e.trim();if(!t.includes(`/`)&&!t.startsWith(`.`))return null;let n=M(qe)(t);return n._tag===`Some`?n.value:null}function Nr(e,t){return Pr(e,t).slice(0,50)}function Pr(e,t){let n=t.trim().toLowerCase();return e.filter(e=>e.toLowerCase().includes(n)).map(e=>{let t=e.slice(e.lastIndexOf(`/`)+1).toLowerCase();return{path:e,rank:t===n?0:t.startsWith(n)?1:t.includes(n)?2:3}}).sort((e,t)=>e.rank-t.rank||e.path.length-t.path.length||(e.path<t.path?-1:+(e.path>t.path))).map(({path:e})=>e)}var Fr={added:{letter:`A`,label:`Added`},modified:{letter:`M`,label:`Modified`},deleted:{letter:`D`,label:`Deleted`},renamed:{letter:`R`,label:`Renamed`},untracked:{letter:`U`,label:`Untracked`}};function Ir(e){return e.scope===`untracked`?`untracked`:e.scope===`unmerged`||e.kind===`type-changed`?`modified`:e.kind}function Lr(e){return e.status===`type-changed`?`modified`:e.status}function Rr(e){let t=new Map;for(let n of e)t.has(n.path)||t.set(n.path,n.status);let n=new Map(e.map(({path:e,status:t})=>[e,t]));return{files:t,folders:new Set([...n].filter(([,e])=>e!==`deleted`).flatMap(([e])=>kr(e)))}}function zr(e){return Rr(e.flatMap(e=>e.comparisons.map(t=>({path:e.path,status:Ir(t)}))))}function Br(e){return[...new Set(e.filter(e=>e.pinned).flatMap(e=>kr(e.path)))]}function Vr(e,t){let n=new Map(t.map(e=>[e.path,e])),r=e=>{let t=kr(e).at(-1)??``,i=n.get(t);if(!i||i.status!==`loaded`){if(!i&&t){let n=r(t);if(n.state!==`resolved`)return{path:e,state:n.state};if(n.entry.kind!==`directory`)return{path:e,state:`missing`}}return{path:e,state:i?.status??`loading`}}let a=i.entries.find(t=>t.name===B(e));return a?{path:e,state:`resolved`,entry:{kind:a.kind,path:`${e}${a.kind===`directory`?`/`:``}`,...a.ignored===void 0?{}:{ignored:a.ignored},...a.target===void 0?{}:{target:a.target}}}:{path:e,state:`missing`}};return e.map(e=>r(Hr(e)))}function Hr(e){return e.endsWith(`/`)?e.slice(0,-1):e}function Ur(e,t){if(t.has(e))return e;for(let n of t)if(e.startsWith(`${n}/`))return n;return null}function Wr(e,t,n){return n?e:e.filter(e=>Ur(e,t)===null)}function Gr(e,t){let n=[...e].map(t),r=n.every(e=>e===`directory`)?`folder`:n.every(e=>e===`file`)?`file`:`item`;return`${e.size} hidden ${r}${e.size===1?``:`s`}`}var Kr={names:{".babelrc":`babel`,".babelrc.json":`babel`,".bash_profile":`bash`,".bashrc":`bash`,".browserslistrc":`browserslist`,".dockerignore":`docker`,".eslintignore":`eslint`,".eslintrc":`eslint`,".eslintrc.cjs":`eslint`,".eslintrc.js":`eslint`,".eslintrc.json":`eslint`,".eslintrc.yaml":`eslint`,".eslintrc.yml":`eslint`,".gitattributes":`git`,".gitignore":`git`,".gitkeep":`git`,".gitmodules":`git`,".oxlintrc.json":`oxc`,".postcssrc":`postcss`,".postcssrc.json":`postcss`,".postcssrc.yaml":`postcss`,".postcssrc.yml":`postcss`,".prettierignore":`prettier`,".prettierrc":`prettier`,".prettierrc.cjs":`prettier`,".prettierrc.js":`prettier`,".prettierrc.json":`prettier`,".prettierrc.mjs":`prettier`,".prettierrc.toml":`prettier`,".prettierrc.yaml":`prettier`,".prettierrc.yml":`prettier`,".stylelintignore":`stylelint`,".stylelintrc":`stylelint`,".stylelintrc.cjs":`stylelint`,".stylelintrc.js":`stylelint`,".stylelintrc.json":`stylelint`,".stylelintrc.mjs":`stylelint`,".stylelintrc.yaml":`stylelint`,".stylelintrc.yml":`stylelint`,".terraform.lock.hcl":`terraform`,".zprofile":`bash`,".zshenv":`bash`,".zshrc":`bash`,"babel.config.cjs":`babel`,"babel.config.js":`babel`,"babel.config.json":`babel`,"babel.config.mjs":`babel`,"biome.json":`biome`,"biome.jsonc":`biome`,"bootstrap.bundle.js":`bootstrap`,"bootstrap.bundle.min.js":`bootstrap`,"bootstrap.css":`bootstrap`,"bootstrap.js":`bootstrap`,"bootstrap.min.css":`bootstrap`,"bootstrap.min.js":`bootstrap`,"bun.lock":`bun`,"bun.lockb":`bun`,"bunfig.toml":`bun`,"claude.md":`claude`,"compose.yaml":`docker`,"compose.yml":`docker`,"docker-compose.override.yml":`docker`,"docker-compose.yaml":`docker`,"docker-compose.yml":`docker`,dockerfile:`docker`,"eslint.config.cjs":`eslint`,"eslint.config.js":`eslint`,"eslint.config.mjs":`eslint`,"eslint.config.mts":`eslint`,"eslint.config.ts":`eslint`,gemfile:`ruby`,"next.config.js":`nextjs`,"next.config.mjs":`nextjs`,"next.config.mts":`nextjs`,"next.config.ts":`nextjs`,"postcss.config.cjs":`postcss`,"postcss.config.js":`postcss`,"postcss.config.mjs":`postcss`,"postcss.config.ts":`postcss`,"prettier.config.cjs":`prettier`,"prettier.config.js":`prettier`,"prettier.config.mjs":`prettier`,rakefile:`ruby`,"readme.md":`markdown`,"stylelint.config.cjs":`stylelint`,"stylelint.config.js":`stylelint`,"stylelint.config.mjs":`stylelint`,"svgo.config.cjs":`svgo`,"svgo.config.js":`svgo`,"svgo.config.mjs":`svgo`,"svgo.config.ts":`svgo`,"tailwind.config.cjs":`tailwind`,"tailwind.config.js":`tailwind`,"tailwind.config.mjs":`tailwind`,"tailwind.config.ts":`tailwind`,"vite.config.js":`vite`,"vite.config.mjs":`vite`,"vite.config.mts":`vite`,"vite.config.ts":`vite`,"webpack.config.babel.js":`webpack`,"webpack.config.cjs":`webpack`,"webpack.config.js":`webpack`,"webpack.config.mjs":`webpack`,"webpack.config.ts":`webpack`},extensions:{"7z":`zip`,astro:`astro`,authors:`text`,avif:`image`,bash:`bash`,bmp:`image`,bz2:`zip`,c:`c`,cc:`cpp`,cfg:`text`,changelog:`text`,cjs:`javascript`,"code-workspace":`vscode`,conf:`text`,contributors:`text`,cpp:`cpp`,csh:`bash`,css:`css`,csv:`table`,cts:`typescript`,cxx:`cpp`,db:`database`,editorconfig:`text`,env:`text`,"env.development":`text`,"env.local":`text`,"env.production":`text`,eot:`font`,erb:`ruby`,fish:`bash`,gemspec:`ruby`,gif:`image`,go:`go`,gql:`graphql`,graphql:`graphql`,gz:`zip`,h:`c`,hh:`cpp`,hpp:`cpp`,htm:`html`,html:`html`,hxx:`cpp`,icns:`image`,ico:`image`,ini:`text`,inl:`cpp`,jar:`zip`,jpeg:`image`,jpg:`image`,js:`javascript`,json:`json`,json5:`json`,jsonc:`json`,jsonl:`json`,jsx:`react`,ksh:`bash`,less:`css`,license:`text`,log:`text`,markdown:`markdown`,mcp:`mcp`,md:`markdown`,mdx:`markdown`,"mdx.tsx":`markdown`,mjs:`javascript`,mm:`cpp`,mts:`typescript`,ods:`table`,otf:`font`,png:`image`,postcss:`css`,py:`python`,pyi:`python`,pyw:`python`,pyx:`python`,rake:`ruby`,rar:`zip`,rb:`ruby`,rs:`rust`,rst:`text`,rtf:`text`,sass:`sass`,scss:`sass`,sh:`bash`,sql:`database`,sqlite:`database`,sqlite3:`database`,styl:`css`,svelte:`svelte`,svg:`svg`,swift:`swift`,tar:`zip`,tf:`terraform`,tfstate:`terraform`,tfvars:`terraform`,tgz:`zip`,tif:`image`,tiff:`image`,ts:`typescript`,tsv:`table`,tsx:`react`,ttf:`font`,txt:`text`,vue:`vue`,war:`zip`,wasm:`wasm`,wast:`wasm`,wat:`wasm`,webp:`image`,woff:`font`,woff2:`font`,xhtml:`html`,xls:`table`,xlsx:`table`,xz:`zip`,yaml:`yml`,yml:`yml`,zig:`zig`,zip:`zip`,zsh:`bash`},symbols:JSON.parse(`{"bash":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7\\" class=\\"bg\\" opacity=\\".2\\"/>\\n <path fill=\\"currentColor\\" d=\\"M11.5 11a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1zM7 6.75C7 6.42 6.64 6 6 6s-1 .42-1 .75q-.01.25.22.41.26.21.89.35.74.14 1.28.53c.37.29.61.7.61 1.21 0 .87-.68 1.5-1.5 1.7v.55a.5.5 0 0 1-1 0v-.56c-.82-.18-1.5-.82-1.5-1.69a.5.5 0 0 1 1 0c0 .33.36.75 1 .75s1-.42 1-.75q.01-.25-.22-.41a2 2 0 0 0-.89-.35q-.74-.14-1.28-.53A1.5 1.5 0 0 1 4 6.75c0-.87.68-1.5 1.5-1.7V4.5a.5.5 0 0 1 1 0v.56c.82.18 1.5.82 1.5 1.69a.5.5 0 0 1-1 0\\" class=\\"fg-stroke\\"/>\\n</svg>","c":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" fill-rule=\\"evenodd\\" d=\\"M8 1q.084 0 .166.021.098.023.186.075c1.055.624 4.22 2.486 5.277 3.11.085.05.15.112.209.192h-.002l.028.037a.5.5 0 0 1 .103.21q.031.102.033.21v6.29a.71.71 0 0 1-.347.616l-5.307 3.144a.68.68 0 0 1-.693 0l-5.307-3.144A.72.72 0 0 1 2 11.145V4.832a.71.71 0 0 1 .346-.612l5.288-3.126A.7.7 0 0 1 7.992 1zm2.901 4.349a3.75 3.75 0 1 0 0 5.302l-1.06-1.06a2.25 2.25 0 1 1 0-3.182z\\" clip-rule=\\"evenodd\\"/>\\n</svg>","cpp":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" fill-rule=\\"evenodd\\" d=\\"M8 1q.084 0 .166.021.098.023.186.075c1.055.624 4.22 2.486 5.277 3.11.085.05.15.112.209.192h-.002l.028.037a.5.5 0 0 1 .103.21q.031.102.033.21v6.29a.71.71 0 0 1-.347.616l-5.307 3.144a.68.68 0 0 1-.693 0l-5.307-3.144A.72.72 0 0 1 2 11.145V4.832a.71.71 0 0 1 .346-.612l5.288-3.126A.7.7 0 0 1 7.992 1zm2.901 4.349a3.75 3.75 0 1 0 0 5.302l-1.06-1.06a2.25 2.25 0 1 1 0-3.182z\\" clip-rule=\\"evenodd\\"/>\\n</svg>","css":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M8 15c-5.76 0-7-1.24-7-7V2a1 1 0 0 1 1-1h6c5.77 0 7 1.24 7 7s-1.24 7-7 7\\" class=\\"vector\\" opacity=\\".2\\"/>\\n <path fill=\\"currentColor\\" d=\\"M10.1 9.19h.73c.03.49.22.6 1 .6.76 0 .93-.12.93-.68 0-.52-.17-.67-.94-.85-1.38-.3-1.68-.56-1.68-1.47 0-1.05.3-1.29 1.67-1.29 1.29 0 1.57.2 1.6 1.13h-.74c-.01-.34-.17-.42-.85-.42-.77 0-.94.1-.94.58 0 .42.17.55.96.73 1.36.3 1.66.58 1.66 1.59 0 1.14-.31 1.39-1.73 1.39-1.39 0-1.69-.24-1.67-1.31m-3.9 0h.74c.03.49.21.6.99.6.76 0 .93-.12.93-.68 0-.52-.17-.67-.93-.85-1.39-.3-1.69-.56-1.69-1.47 0-1.05.3-1.29 1.67-1.29 1.3 0 1.58.2 1.6 1.13h-.73c-.02-.34-.18-.42-.85-.42-.78 0-.95.1-.95.58 0 .42.17.55.96.73 1.37.3 1.67.58 1.67 1.59 0 1.14-.32 1.39-1.74 1.39-1.38 0-1.68-.24-1.66-1.31m-1.22 0h.75c-.09 1.07-.37 1.31-1.56 1.31-1.37 0-1.68-.45-1.68-2.5 0-1.96.36-2.5 1.68-2.5 1.16 0 1.44.25 1.52 1.35h-.76c-.08-.52-.22-.64-.76-.64-.74 0-.9.33-.9 1.78 0 1.47.16 1.8.9 1.8.58 0 .74-.11.8-.6\\"/>\\n</svg>","database":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M14.953 9.733a12.4 12.4 0 0 1-.244 1.936c-.207.933-.532 1.58-.996 2.044s-1.11.789-2.044.996C10.73 14.918 9.533 15 8 15s-2.73-.082-3.669-.291c-.933-.207-1.58-.532-2.044-.996s-.789-1.11-.996-2.044c-.122-.547-.2-1.182-.244-1.92q.23.364.532.667c.64.639 1.482 1.031 2.533 1.265 1.046.232 2.33.315 3.884.315 1.555 0 2.838-.083 3.884-.315 1.051-.234 1.893-.626 2.532-1.265a4 4 0 0 0 .541-.683\\"/>\\n <path fill=\\"currentColor\\" d=\\"M14.93 5.924c-.046.663-.118 1.24-.23 1.743-.207.932-.532 1.579-.995 2.042s-1.11.789-2.042.996c-.938.209-2.135.291-3.667.291-1.531 0-2.729-.082-3.667-.29-.932-.208-1.579-.534-2.042-.997s-.789-1.11-.996-2.042a12 12 0 0 1-.227-1.683l.016-.188a4 4 0 0 0 .5.62c.638.639 1.48 1.031 2.532 1.265 1.046.232 2.33.315 3.884.315 1.555 0 2.838-.083 3.884-.315 1.051-.234 1.893-.626 2.532-1.265.192-.192.357-.404.506-.633z\\"/>\\n <path fill=\\"currentColor\\" d=\\"M8 1c1.533 0 2.73.082 3.669.291.933.207 1.58.533 2.044.996.403.404.904.944.91 1.695.004.764-.509 1.318-.918 1.727-.463.463-1.11.789-2.042.996-.938.209-2.135.291-3.667.291-1.531 0-2.729-.082-3.667-.29-.932-.208-1.579-.534-2.042-.997-.406-.406-.915-.953-.915-1.71 0-.758.509-1.305.915-1.712.464-.463 1.11-.789 2.044-.996C5.27 1.082 6.467 1 8 1\\"/>\\n</svg>","default":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M8 1v3a3 3 0 0 0 3 3h3v5.5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 12.5v-9A2.5 2.5 0 0 1 4.5 1z\\" class=\\"bg\\" opacity=\\".4\\"/>\\n <path fill=\\"currentColor\\" d=\\"M9.5 1a.5.5 0 0 1 .354.146l4 4A.5.5 0 0 1 14 5.5V6h-3a2 2 0 0 1-2-2V1z\\" class=\\"fg\\"/>\\n</svg>","font":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M12.3 13c-1.59 0-2.68-.99-2.68-2.5 0-1.43 1-2.34 2.88-2.35h2.16v-.83c0-1.08-.62-1.68-1.73-1.68-1.05 0-1.66.54-1.73 1.36H9.93c.09-1.43 1.06-2.48 3.05-2.48 1.75 0 3.02.95 3.02 2.68v5.66h-1.29v-1.02h-.04c-.41.66-1.16 1.16-2.37 1.16m.36-1.12c1.14 0 2-.72 2-1.74v-.96H12.6c-1.12 0-1.6.54-1.6 1.28 0 .97.8 1.42 1.66 1.42m-11.24.98H0L3.8 2h1.39l3.8 10.86H7.54l-1.08-3.2H2.5zm3.09-9.25h-.04l-1.6 4.95H6.1z\\"/>\\n</svg>","git":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M14.74 7.38 8.62 1.26a.9.9 0 0 0-1.27 0L6.08 2.53l1.61 1.61a1.07 1.07 0 0 1 1.36 1.37l1.55 1.55a1.07 1.07 0 0 1 1.1 1.77 1.07 1.07 0 0 1-1.74-1.16L8.5 6.22v3.8a1.07 1.07 0 1 1-.89-.02V6.15a1.07 1.07 0 0 1-.58-1.4l-1.58-1.6-4.2 4.2a.9.9 0 0 0 0 1.27l6.12 6.12a.9.9 0 0 0 1.27 0l6.09-6.09a.9.9 0 0 0 0-1.27\\"/>\\n</svg>","go":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" fill-rule=\\"evenodd\\" d=\\"M4.41 4.57A3.2 3.2 0 0 1 6.87 5q.74.49 1.08 1.29.08.12-.1.16l-1.55.4c-.14.03-.15.04-.27-.1a1 1 0 0 0-.44-.34 1.6 1.6 0 0 0-1.68.14q-.95.61-.94 1.73c0 .73.52 1.33 1.25 1.43q.95.1 1.58-.6l.25-.34h-1.8c-.19 0-.24-.12-.17-.27.12-.28.34-.76.47-1a.3.3 0 0 1 .24-.14h2.98a4 4 0 0 1 .64-1.19 4 4 0 0 1 2.6-1.52 3.5 3.5 0 0 1 2.64.46q1.13.73 1.31 2.04a3.5 3.5 0 0 1-1.06 3.09q-.93.92-2.23 1.17l-.74.08a3.5 3.5 0 0 1-2.27-.8 3 3 0 0 1-.93-1.42 4 4 0 0 1-.39.61 4 4 0 0 1-2.64 1.56 3.3 3.3 0 0 1-2.5-.6 3 3 0 0 1-1.18-2.03 3.5 3.5 0 0 1 .8-2.67 4 4 0 0 1 2.6-1.58M13.1 7.5a1.53 1.53 0 0 0-1.9-1.21q-1.3.3-1.62 1.59a1.5 1.5 0 0 0 .85 1.72q.77.33 1.52-.05a2 2 0 0 0 1.18-1.74q0-.17-.03-.3\\" clip-rule=\\"evenodd\\"/>\\n</svg>","html":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7\\" class=\\"bg\\" opacity=\\".2\\"/>\\n <path fill=\\"currentColor\\" d=\\"M10.48 3.76a.5.5 0 0 1 .4.58L10.6 5.8h1.14a.5.5 0 0 1 0 1h-1.32L10 9.2h1.08a.5.5 0 0 1 0 1H9.8l-.3 1.64a.5.5 0 1 1-.98-.18l.27-1.46H6.4l-.3 1.64a.5.5 0 1 1-.98-.18l.27-1.46H4.25a.5.5 0 0 1 0-1h1.32L6 6.8H4.93a.5.5 0 0 1 0-1H6.2l.3-1.64a.5.5 0 1 1 .98.18L7.2 5.8h2.4l.3-1.64a.5.5 0 0 1 .58-.4M6.58 9.2h2.4l.44-2.4h-2.4z\\" class=\\"fg\\"/>\\n</svg>","image":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M12.5 2A2.5 2.5 0 0 1 15 4.5v4.67l-4.05-3.54-4.08 4.08-3-2L1 10.6V4.5A2.5 2.5 0 0 1 3.5 2z\\" opacity=\\".3\\"/>\\n <path fill=\\"currentColor\\" d=\\"M15 10.5v1a2.5 2.5 0 0 1-2.5 2.5h-9a2.5 2.5 0 0 1-2.46-2.04L4 9l3 2 4-4zm-7-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0\\"/>\\n</svg>","javascript":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7\\" class=\\"bg\\" opacity=\\".2\\"/>\\n <path fill=\\"currentColor\\" d=\\"M8.1 9.64h.95c.04.62.28.76 1.28.76s1.2-.14 1.2-.85c0-.66-.2-.85-1.2-1.07-1.79-.38-2.18-.7-2.18-1.86C8.15 5.3 8.54 5 10.31 5c1.67 0 2.04.26 2.07 1.42h-.95c-.02-.43-.23-.53-1.1-.53-1 0-1.22.14-1.22.74 0 .52.22.7 1.24.92 1.76.38 2.15.73 2.15 2 0 1.44-.4 1.75-2.24 1.75-1.8 0-2.18-.3-2.15-1.66M3.5 9.5h.98c0 .76.15.92.85.92.77 0 .94-.18.94-1.02V5.1h1v4.34c0 1.54-.35 1.87-1.92 1.87-1.55 0-1.89-.32-1.86-1.8\\"/>\\n</svg>","json":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M13.25 11.5V9.75a.5.5 0 0 1 .36-.48l.55-.15a1.16 1.16 0 0 0 0-2.24l-.55-.15a.5.5 0 0 1-.36-.48V4.5a2.5 2.5 0 0 0-2.5-2.5h-.25a.5.5 0 0 0 0 1h.25a1.5 1.5 0 0 1 1.5 1.5v1.75a1.5 1.5 0 0 0 1.09 1.44l.54.15a.16.16 0 0 1 0 .32l-.54.15a1.5 1.5 0 0 0-1.09 1.44v1.75a1.5 1.5 0 0 1-1.5 1.5h-.25a.5.5 0 0 0 0 1h.25a2.5 2.5 0 0 0 2.5-2.5m-10.5 0V9.75a.5.5 0 0 0-.36-.48l-.55-.15a1.16 1.16 0 0 1 0-2.24l.55-.15a.5.5 0 0 0 .36-.48V4.5A2.5 2.5 0 0 1 5.25 2h.25a.5.5 0 0 1 0 1h-.25a1.5 1.5 0 0 0-1.5 1.5v1.75a1.5 1.5 0 0 1-1.09 1.44l-.54.15a.16.16 0 0 0 0 .32l.54.15a1.5 1.5 0 0 1 1.09 1.45v1.74a1.5 1.5 0 0 0 1.5 1.5h.25a.5.5 0 0 1 0 1h-.25a2.5 2.5 0 0 1-2.5-2.5\\"/>\\n</svg>","markdown":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M1 12V4h2l2 2.5L7 4h2v8H7V7.5l-2 2-2-2V12zm9-3 3 3.5L16 9h-2V4h-2v5z\\"/>\\n</svg>","mcp":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M9.26-.04a3 3 0 0 1 2 .82 2.8 2.8 0 0 1 .8 2.35 2.9 2.9 0 0 1 2.41.8l.03.02a2.74 2.74 0 0 1 0 3.94l-5.8 5.69-.04.06-.02.07q0 .04.02.07.01.04.04.06l1.2 1.17a.55.55 0 0 1 0 .79.6.6 0 0 1-.81 0l-1.2-1.17a1.3 1.3 0 0 1 0-1.84L13.7 7.1a1.65 1.65 0 0 0 .37-1.82 2 2 0 0 0-.37-.54l-.03-.03a1.73 1.73 0 0 0-2.4 0L6.47 9.4l-.07.06a.58.58 0 0 1-.92-.18.6.6 0 0 1 .12-.6l4.85-4.76a1.65 1.65 0 0 0 0-2.36 1.73 1.73 0 0 0-2.4 0l-6.43 6.3a.6.6 0 0 1-.8 0 .55.55 0 0 1 0-.8L7.25.79a3 3 0 0 1 2-.82\\"/>\\n <path fill=\\"currentColor\\" d=\\"M9.26 2.19a.6.6 0 0 1 .52.34.6.6 0 0 1 0 .43l-.12.18L4.9 7.79a1.65 1.65 0 0 0 0 2.36 1.73 1.73 0 0 0 2.4 0l4.75-4.66a.58.58 0 0 1 .93.18.6.6 0 0 1-.12.61l-4.75 4.66a2.9 2.9 0 0 1-4.01 0 2.75 2.75 0 0 1-.62-3.04A3 3 0 0 1 4.1 7l4.74-4.65a.6.6 0 0 1 .4-.16\\"/>\\n</svg>","python":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M8.33 8.4H10c1.16 0 1.9-.73 1.9-1.86V5.08q0-.24.25-.24h.74c.75 0 1.33.32 1.66.97q.4.73.41 1.46c.09.9.09 1.78-.24 2.67-.25.73-.75 1.3-1.58 1.46h-4.8c-.08 0-.25 0-.25.08v.4s.17.09.25.09h2.82q.34-.02.33.32v1.06c0 .56-.25.97-.75 1.13-.41.16-.83.33-1.24.4a7 7 0 0 1-2.98-.07 3 3 0 0 1-1.16-.49c-.33-.32-.58-.65-.5-1.14v-2.91c0-1.13.67-1.78 1.82-1.78q.89-.1 1.66-.08m2.32 4.86a.65.65 0 0 0-.66-.65c-.34 0-.67.33-.67.65s.33.57.67.65a.65.65 0 0 0 .66-.65\\" class=\\"bg\\" opacity=\\".8\\"/>\\n <path fill=\\"currentColor\\" d=\\"M7.67 7.6H6c-1.16 0-1.9.73-1.9 1.86v1.46q0 .24-.25.24h-.74c-.75 0-1.33-.32-1.66-.97a3 3 0 0 1-.41-1.46 6 6 0 0 1 .24-2.67c.25-.73.75-1.3 1.58-1.46h4.8c.08 0 .25 0 .25-.08v-.4s-.17-.09-.25-.09H4.85c-.24 0-.33-.08-.33-.32V2.65c0-.56.25-.97.75-1.13.41-.16.83-.33 1.24-.4a7 7 0 0 1 2.98.07c.41.09.83.25 1.16.49.33.32.58.65.5 1.13v2.92c0 1.14-.67 1.78-1.82 1.78-.58.08-1.16.08-1.66.08M5.35 2.73c0 .33.25.65.66.65.33 0 .66-.32.66-.65 0-.32-.33-.56-.66-.64a.65.65 0 0 0-.66.64\\" class=\\"fg\\"/>\\n</svg>","ruby":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" fill-rule=\\"evenodd\\" d=\\"M11.04 2c.48 0 .92.23 1.18.6l2.54 3.65c.37.52.3 1.23-.15 1.69l-5.58 5.64a1.47 1.47 0 0 1-2.06 0L1.39 7.94a1.3 1.3 0 0 1-.15-1.7l2.54-3.63q.2-.3.5-.45.33-.16.68-.16zm.84 2.17a.5.5 0 0 0-.7-.05L8 6.84 4.83 4.12a.5.5 0 0 0-.65.76L6.65 7H3.5a.5.5 0 0 0 0 1h9a.5.5 0 0 0 0-1H9.35l2.48-2.12a.5.5 0 0 0 .05-.7\\" clip-rule=\\"evenodd\\"/>\\n</svg>","rust":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" fill-rule=\\"evenodd\\" d=\\"M8 .8a.2.2 0 0 1 .18.1l.38.6.16.02.5-.53.01-.01a.2.2 0 0 1 .33.08l.25.68.16.05.59-.43h.02a.2.2 0 0 1 .3.14l.12.71.15.08.65-.3a.2.2 0 0 1 .2.02.2.2 0 0 1 .1.18l-.03.72.12.1.71-.16a.2.2 0 0 1 .25.25l-.17.7q.06.06.1.13l.73-.03A.2.2 0 0 1 14 4a.2.2 0 0 1 .02.2l-.3.66.08.14.71.12a.2.2 0 0 1 .14.32l-.43.59.05.16.68.25a.2.2 0 0 1 .07.35l-.53.49.01.16.62.38a.2.2 0 0 1 0 .36l-.62.38-.01.16.53.5a.2.2 0 0 1-.07.34l-.68.25-.05.16.43.59a.2.2 0 0 1-.14.32l-.72.12-.07.15.3.65a.2.2 0 0 1-.02.2.2.2 0 0 1-.18.1l-.72-.03-.1.13.16.7a.2.2 0 0 1-.25.25l-.7-.17-.13.1.03.73a.2.2 0 0 1-.1.18.2.2 0 0 1-.2.02l-.66-.3-.14.08-.12.71a.2.2 0 0 1-.32.14l-.59-.43-.16.05-.25.68a.2.2 0 0 1-.34.07l-.5-.53-.16.01-.38.62a.2.2 0 0 1-.36 0l-.38-.62-.16-.01-.5.53a.2.2 0 0 1-.34-.07l-.25-.68-.16-.05-.59.43a.2.2 0 0 1-.32-.14L5 13.78l-.15-.07-.65.3a.2.2 0 0 1-.2-.02.2.2 0 0 1-.1-.18l.03-.72-.13-.1-.7.16a.2.2 0 0 1-.25-.25l.17-.7-.1-.13-.73.03a.2.2 0 0 1-.2-.3l.3-.66-.08-.14-.71-.12a.2.2 0 0 1-.14-.32l.43-.59-.05-.16-.68-.25A.2.2 0 0 1 1 9.22l.53-.5-.02-.16-.6-.38A.2.2 0 0 1 .8 8a.2.2 0 0 1 .1-.18l.6-.38.02-.16-.53-.5a.2.2 0 0 1 .07-.34l.68-.25.05-.16-.43-.59a.2.2 0 0 1 .14-.32L2.2 5l.08-.15L2 4.2a.2.2 0 0 1 .2-.3l.72.03.1-.13-.16-.7a.2.2 0 0 1 .25-.25l.7.16.13-.1-.03-.72A.2.2 0 0 1 4 2a.2.2 0 0 1 .2-.02l.65.3L5 2.2l.12-.71v-.03a.2.2 0 0 1 .32-.1l.59.41.16-.04.25-.68.01-.02A.2.2 0 0 1 6.8.99l.49.53.16-.02.38-.61.02-.02A.2.2 0 0 1 8 .79M6.8 9.45h1.26l.06.01q.03.01.03.05v1.52q0 .07-.09.06h-4.5A5.4 5.4 0 0 0 8 13.42a5.4 5.4 0 0 0 4.45-2.33h-2.42c-.36 0-.68-.5-.77-.75-.08-.22-.2-.91-.25-1.12-.15-.61-.59-.71-.78-.73H6.8zM8 2.58a5.4 5.4 0 0 0-4.07 1.85h5.74l.17.02c.23.03.6.12.96.35.34.23.83.68.83 1.4 0 .66-.55 1.16-1.08 1.5.42.33.7.53.86 1.44.04.17.34.32.62.29.29-.03.62-.16.62-.75v-.24q0-.1.07-.1h.68A5.43 5.43 0 0 0 8 2.59M2.96 6.03a5.4 5.4 0 0 0-.19 3.37h1.66V6.03zM6.8 7.06h1.66c.35 0 .77-.12.77-.47 0-.42-.55-.53-.65-.53H6.8z\\" clip-rule=\\"evenodd\\"/>\\n</svg>","swift":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M9.63 1c6.15 4.35 4.16 9.15 4.16 9.15s1.75 2.05 1.04 3.85c0 0-.72-1.26-1.93-1.26-1.17 0-1.85 1.26-4.2 1.26C3.47 14 1 9.46 1 9.46c4.71 3.22 7.93.94 7.93.94C6.8 9.12 2.29 3 2.29 3c3.93 3.47 5.63 4.39 5.63 4.39-1.01-.87-3.86-5.13-3.86-5.13C6.34 4.66 10.86 8 10.86 8c1.28-3.7-1.23-7-1.23-7\\"/>\\n</svg>","table":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M8 4a3 3 0 0 0 3 3h3v5.5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 12.5v-9A2.5 2.5 0 0 1 4.5 1H8z\\" class=\\"bg\\" opacity=\\".4\\"/>\\n <path fill=\\"currentColor\\" d=\\"M11.5 8a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-7a.5.5 0 0 1-.5-.5v-4a.5.5 0 0 1 .5-.5zM5 12h2.5v-1H5zm3.5 0H11v-1H8.5zM5 10h2.5V9H5zm3.5 0H11V9H8.5zm1-9a.5.5 0 0 1 .354.146l4 4A.5.5 0 0 1 14 5.5V6h-3a2 2 0 0 1-2-2V1z\\" class=\\"fg\\"/>\\n</svg>","text":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" fill-rule=\\"evenodd\\" d=\\"M8 4a3 3 0 0 0 3 3h3v5.5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 12.5v-9A2.5 2.5 0 0 1 4.5 1H8z\\" class=\\"bg\\" clip-rule=\\"evenodd\\" opacity=\\".4\\"/>\\n <path fill=\\"currentColor\\" d=\\"M8.5 11a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1zm2-2a.5.5 0 0 1 0 1h-5a.5.5 0 0 1 0-1zm-1-8a.5.5 0 0 1 .354.146l4 4A.5.5 0 0 1 14 5.5V6h-3a2 2 0 0 1-2-2V1z\\"/>\\n</svg>","typescript":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7\\" class=\\"bg\\" opacity=\\".2\\"/>\\n <path fill=\\"currentColor\\" d=\\"M8.1 9.64h.95c.04.62.28.76 1.28.76s1.2-.14 1.2-.85c0-.66-.2-.85-1.2-1.07-1.79-.38-2.18-.7-2.18-1.86C8.15 5.3 8.54 5 10.31 5c1.67 0 2.04.26 2.07 1.42h-.95c-.02-.43-.23-.53-1.1-.53-1 0-1.22.14-1.22.74 0 .52.22.7 1.24.92 1.76.38 2.15.73 2.15 2 0 1.44-.4 1.75-2.24 1.75-1.8 0-2.18-.3-2.15-1.66m-3 1.57V5.99H3.5v-.9h4.21v.9H6.1v5.22z\\"/>\\n</svg>","zip":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M4.585 2a2 2 0 0 1 1.028.285l1.788 1.072a1 1 0 0 0 .514.143H12A2 2 0 0 1 13.935 5H0V4a2 2 0 0 1 2-2z\\" class=\\"bg\\" opacity=\\".5\\"/>\\n <path fill=\\"currentColor\\" fill-rule=\\"evenodd\\" d=\\"M14 12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-1.25h1v-1H0V6h14zM9.9 8.25c-.883 0-1.9.5-1.9.5H7v1h1v1s1.017.5 1.9.5c.884 0 1.6-.672 1.6-1.5s-.716-1.5-1.6-1.5M2 9.75v1h1v-1zm2 0v1h1v-1zm2 0v1h1v-1zm-5-1v1h1v-1zm2 0v1h1v-1zm2 0v1h1v-1z\\" class=\\"fg\\" clip-rule=\\"evenodd\\"/>\\n</svg>","astro":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M6.08 13.92c-.63-.57-.81-1.79-.55-2.67.45.56 1.08.73 1.73.83 1 .15 1.99.1 2.92-.37l.32-.19q.13.38.08.78a2.1 2.1 0 0 1-.9 1.5q-.3.24-.61.43c-.64.44-.81.95-.57 1.69l.02.08a1.7 1.7 0 0 1-.74-.64 2 2 0 0 1-.3-.98q0-.27-.02-.52-.07-.61-.61-.62a.7.7 0 0 0-.75.6z\\" class=\\"bg\\" opacity=\\".6\\"/>\\n <path fill=\\"currentColor\\" d=\\"M2.5 11.1s1.86-.9 3.72-.9l1.4-4.39c.05-.21.2-.36.38-.36s.33.15.38.36l1.4 4.38c2.2 0 3.72.92 3.72.92l-3.16-8.69q-.13-.4-.45-.42H6.11q-.3.02-.45.42z\\" class=\\"fg\\"/>\\n</svg>","babel":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" fill-rule=\\"evenodd\\" d=\\"M9.49.5q1.92.05 2.66.54 1.27.6 1.35 1.52v.23a4 4 0 0 1-.53 1.9l-1.38 1.24q-.74.38-.72.63c.77.82 1.33 1.29.85 2.42q-.47 1.1-2.04 2.28c-.5.32-1.88 1.35-2.96 1.86-1.64.77-3.1 1.4-4.65 1.89-.51.16-1.5.16-1.5.16L.5 15A76 76 0 0 0 5.76 3.49q-.1-.08-.1-.2.1 0 .32-.35l-.03-.09q-1.17.39-2.38 1.3l-.13.03q0-.1-.21-.16-.46.31-.82.7l-.13-.19.16-.06-.03-.16-.34.29L2 4.5q.36-.48.72-.54l.04-.1V3.8q.16 0 .15-.06l.13-.06a6 6 0 0 0 1.13-.9v-.03H4.1l-.12.07q0-.1-.1-.1l-.15.07-.04-.1q.93-.52 1.63-1.05Q7.89.65 9.5.5M8.46 7.83l-.32.04c-1.31.54-2.31.82-2.91.88a71 71 0 0 0-2.2 4.54h.07q.58-.04 3.04-1.42.13 0 1.66-1.05L9.18 9.7v.03q.45-.2.81-1.3v-.2q-.5-.46-1.53-.4m.28-5.75c-.5.1-.75.19-.72.38l-1.16 2.6q-.17.1-.34.95-.3.48-.25.77v.1l.22.05A15 15 0 0 1 8.86 6c1.1-.71 2.12-1.38 2.8-2.54q.24-.33.21-.54-.02-.33-.4-.54c-.54 0-1.07-.34-1.63-.28l-.94-.03z\\" clip-rule=\\"evenodd\\"/>\\n</svg>","biome":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M8 2 4.88 7.35a7 7 0 0 1 3.7-.13l1.04.25-.99 4.16-1.05-.25a2.7 2.7 0 0 0-3.07 1.45l-.98-.47a4 4 0 0 1 1.07-1.31 3.8 3.8 0 0 1 3.23-.71l.5-2.08a6 6 0 0 0-5.07 1.12A5.9 5.9 0 0 0 1 14h14z\\"/>\\n</svg>","bootstrap":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" fill-rule=\\"evenodd\\" d=\\"M11.72 1.5A2.5 2.5 0 0 1 14.2 4q.02 1.08.3 2.09c.22.73.56 1.24 1.08 1.45.22.08.4.27.4.5s-.18.43-.4.51q-.76.34-1.08 1.45c-.2.65-.27 1.32-.3 2a2.5 2.5 0 0 1-2.48 2.5H4.25A2.6 2.6 0 0 1 1.7 12c-.04-.85-.1-1.68-.22-2.04C1.26 9.23.92 8.7.4 8.5.18 8.42 0 8.23 0 8s.18-.42.4-.5q.77-.35 1.09-1.46c.1-.36.17-1.19.2-2.04a2.6 2.6 0 0 1 2.56-2.5z\\" class=\\"bg\\" clip-rule=\\"evenodd\\" opacity=\\".2\\"/>\\n <path fill=\\"currentColor\\" fill-rule=\\"evenodd\\" d=\\"M8.47 4.54c1.23 0 2.04.68 2.04 1.73 0 .73-.55 1.39-1.24 1.5v.04c.94.1 1.58.77 1.58 1.7 0 1.2-.9 1.95-2.37 1.95H5.97a.3.3 0 0 1-.2-.08.3.3 0 0 1-.08-.2V4.82a.3.3 0 0 1 .08-.2.3.3 0 0 1 .2-.08zm-1.7 6.04h1.49q1.47-.01 1.49-1.15Q9.74 8.31 8.2 8.3H6.77zm0-5.16v2.06h1.21c.93 0 1.45-.38 1.45-1.06 0-.65-.44-1-1.22-1z\\" class=\\"fg\\" clip-rule=\\"evenodd\\"/>\\n</svg>","browserslist":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M8.88 6.96c0 3.82 3.72 4.7 5.7 3.74-.23.9-1.04 1.67-2.35 1.93-.02.4.42 1.28.82 1.63-.9.35-1.94-.12-2.51-.48a5 5 0 0 0-.32 1.87c-.68 0-1.57-1-1.8-1.37-.3.18-.85 1.15-.96 1.72a2.4 2.4 0 0 1-.81-.86 2.4 2.4 0 0 1-.3-1.15c-.38.27-1.48.95-1.99 1.18-.25-.58-.15-1.3 0-2.06-.21.12-1.8.27-2.43.12.32-.36.75-1.19.94-1.57A4.5 4.5 0 0 1 .44 10.6c.48-.22.97-.53 1.49-1.06C1.26 9.17.24 8.64 0 7.7a6 6 0 0 0 1.79-.32C1.28 7.08.44 6.15.6 5.01c.42.21 1.3.37 1.73.3a3.4 3.4 0 0 1-.25-2.75 5 5 0 0 0 1.48 1c-.08-.8.3-2.31.8-2.71.2.46.73 1.21 1.08 1.4.09-.61.87-2.06 1.57-2.25 0 .5.27 1.4.5 1.67.51-.54 2.25-1.44 3.64-1.13-.43.45-.75.61-.86.98 1.05 0 2.78.34 4.27 1.93-2.34-.89-5.69.56-5.69 3.5\\" class=\\"bg\\" opacity=\\".5\\"/>\\n <path fill=\\"currentColor\\" d=\\"M11.21 3.59a4.1 4.1 0 0 0 2.47 2.89c.24-.22.61-.38.95-.19.76.44.2 1.26-.34 1.66l-.07.06a13 13 0 0 1-4.49 1.61l-.3-.43a10.5 10.5 0 0 0 4.13-1.31 1 1 0 0 0 .23-.25.5.5 0 0 0-.21-.69l-.15-.06a4.5 4.5 0 0 1-1.77-1.31 4.5 4.5 0 0 1-.88-1.77q.2-.12.43-.21\\"/>\\n <path fill=\\"currentColor\\" d=\\"M10.36 5.18a.4.4 0 0 0-.03.38c.09.2.3.3.46.23s.24-.3.15-.5l-.01-.02q.23.13.34.39a.83.83 0 0 1-.43 1.08.8.8 0 0 1-1.08-.43.83.83 0 0 1 .6-1.13\\"/>\\n</svg>","bun":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M8 14c3.87 0 7-2.46 7-5.49 0-1.88-1.2-3.53-3.04-4.52q-1.1-.61-1.84-1.07C9.2 2.35 8.64 2 8 2s-1.36.45-2.31 1.03A29 29 0 0 1 4.04 4C2.2 4.98 1 6.63 1 8.51 1 11.54 4.13 14 8 14M7.18 3.88q.3-.66.3-1.37c0-.08.11-.1.13-.01.38 1.57-.53 2.35-1.2 2.61-.08.03-.12-.07-.06-.12a3 3 0 0 0 .83-1.12m1.2-.05a3 3 0 0 0-.45-1.3V2.5c-.04-.07.05-.15.1-.1 1.15 1.2.77 2.3.33 2.87-.05.05-.13 0-.11-.08q.21-.67.13-1.37m1.04-.32a3 3 0 0 0-.94-1.02v-.01c-.06-.05-.01-.16.07-.12 1.51.61 1.61 1.8 1.43 2.5l-.03.03a.07.07 0 0 1-.1-.06 3 3 0 0 0-.43-1.32m-2.97.32c-.36.3-.74.43-1.2.56q-.11 0-.1-.1a3.5 3.5 0 0 0 1.76-1.57s.09-.07.1.04c0 .18-.2.76-.56 1.07m2.89 6.36q-.13.52-.55.88a1.3 1.3 0 0 1-.75.35 1.3 1.3 0 0 1-.77-.35 1.7 1.7 0 0 1-.54-.88.13.13 0 0 1 .15-.15h2.31a.14.14 0 0 1 .15.15M6.15 8.95a1.1 1.1 0 0 1-1.39-.14A1.1 1.1 0 0 1 5.12 7a1.1 1.1 0 0 1 1.2.25 1.1 1.1 0 0 1-.17 1.69m4.96 0a1.1 1.1 0 0 1-1.4-.14 1.1 1.1 0 0 1 .37-1.8 1.1 1.1 0 0 1 1.2.25 1.1 1.1 0 0 1 .24 1.2 1 1 0 0 1-.41.5\\"/>\\n</svg>","claude":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M3.75 10.31 6.5 8.77l.04-.14-.04-.07h-.14l-.46-.03-1.57-.04-1.38-.07-1.33-.07-.34-.07L1 7.86l.03-.21.28-.18.4.03.89.07 1.33.08.97.06 1.43.16h.22l.03-.1-.07-.05-.06-.06-1.39-.92-1.48-.98-.79-.57-.42-.28-.2-.28-.1-.6.39-.41.52.04.12.03.52.4 1.12.86L6.2 6.04l.2.17.09-.06.01-.04-.1-.15-.76-1.46-.85-1.46-.37-.6-.1-.36a1 1 0 0 1-.06-.42l.42-.59.25-.07.6.08.22.2.36.84.58 1.3.9 1.77.29.53.14.47.04.14h.1v-.07l.07-1 .14-1.22.14-1.57.04-.45.23-.53.42-.28.36.15.28.41-.04.25-.16 1.08-.36 1.7-.21 1.14h.12l.14-.15.58-.76.97-1.2.42-.5.5-.51.32-.25h.6l.44.66-.2.68-.61.79-.52.65-.74 1-.45.8.04.05h.1l1.68-.36.9-.16 1.06-.18.5.23.05.22-.2.48-1.15.28-1.34.28-2 .46-.04.01.03.04.9.09.4.03h.94l1.77.14.46.28.27.37-.04.28-.72.37-.95-.23-2.24-.53-.76-.18h-.11v.06l.64.63L12 10.86l1.48 1.35.07.34-.18.28-.2-.03-1.29-.98-.5-.42-1.12-.95h-.07v.1l.25.38 1.37 2.05.07.63-.1.2-.36.14-.38-.08-.8-1.12-.85-1.26-.66-1.15-.07.05-.4 4.23-.19.21-.42.17-.35-.28-.2-.42.2-.87.23-1.12.18-.9.17-1.1.1-.36v-.03h-.1l-.84 1.16-1.27 1.72-1 1.07-.24.1-.42-.22.04-.39.22-.32 1.4-1.8.84-1.1.57-.64-.02-.07h-.04l-3.7 2.4-.66.09-.28-.28.03-.42.14-.14 1.12-.77z\\"/>\\n</svg>","docker":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M15.85 6.54c-.05-.04-.45-.36-1.31-.36q-.34 0-.68.06a2.7 2.7 0 0 0-1.14-1.79l-.23-.14-.15.23a3 3 0 0 0-.4 1q-.24 1.01.26 1.84c-.4.24-1.03.3-1.17.3H.5a.5.5 0 0 0-.5.52q-.01 1.46.46 2.83.55 1.5 1.6 2.18c.79.5 2.08.79 3.54.79q.96 0 1.94-.18a8 8 0 0 0 2.55-.97 7 7 0 0 0 1.73-1.5 10 10 0 0 0 1.7-3.06h.15a2.4 2.4 0 0 0 1.8-.7 2 2 0 0 0 .47-.74l.06-.2z\\"/>\\n <path fill=\\"currentColor\\" d=\\"M1.48 7.36h1.4a.14.14 0 0 0 .14-.13V5.91q-.01-.12-.13-.14H1.48a.13.13 0 0 0-.13.14v1.32q.02.13.13.13m1.94 0h1.41a.14.14 0 0 0 .13-.13V5.91q-.01-.12-.13-.14h-1.4a.13.13 0 0 0-.13.14v1.32q0 .13.12.13m1.98 0h1.4q.13 0 .14-.13V5.91a.13.13 0 0 0-.14-.14H5.4q-.1.01-.12.14v1.32q0 .13.12.13m1.95 0h1.42q.1 0 .12-.13V5.91q0-.12-.12-.14H7.35q-.1.01-.12.14v1.32q.01.13.12.13M3.42 5.5h1.41c.07 0 .13-.08.13-.15V4.03a.13.13 0 0 0-.13-.14h-1.4q-.12 0-.13.14v1.31q0 .13.12.15m1.98 0h1.4c.08 0 .14-.08.14-.15V4.03q0-.13-.14-.14H5.4q-.1 0-.12.14v1.31q0 .13.12.15m1.95 0h1.42c.06 0 .12-.08.12-.15V4.03q-.01-.13-.12-.14H7.35q-.1 0-.12.14v1.31q.01.13.12.15m0-1.9h1.42q.1-.02.12-.14v-1.3Q8.88 2 8.77 2H7.35q-.1 0-.12.14v1.3q.01.13.12.14m1.97 3.78h1.4a.13.13 0 0 0 .14-.13V5.91q-.01-.12-.13-.14H9.32q-.1.01-.12.14v1.32q.01.13.12.13\\" opacity=\\".5\\"/>\\n</svg>","eslint":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M11.16 6.1 8.12 4.35a.3.3 0 0 0-.24 0L4.84 6.1a.3.3 0 0 0-.12.2v3.5q0 .14.12.22l3.04 1.74q.12.08.24 0l3.04-1.74a.2.2 0 0 0 .13-.22V6.3a.3.3 0 0 0-.13-.2\\" opacity=\\".5\\"/>\\n <path fill=\\"currentColor\\" d=\\"m.1 7.69 3.63-6.3A.8.8 0 0 1 4.37 1h7.26c.26 0 .5.17.64.4l3.63 6.27a.8.8 0 0 1 0 .75l-3.63 6.24a.7.7 0 0 1-.64.34H4.37a.7.7 0 0 1-.64-.34L.1 8.41a.7.7 0 0 1 0-.72m3 3.02q.01.15.14.23l4.63 2.66q.13.06.26 0l4.63-2.66a.3.3 0 0 0 .14-.23V5.4a.3.3 0 0 0-.14-.23L8.13 2.52a.3.3 0 0 0-.26 0L3.24 5.17a.3.3 0 0 0-.14.23z\\"/>\\n</svg>","graphql":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" fill-rule=\\"evenodd\\" d=\\"M8 1a1.25 1.25 0 0 1 1.18 1.65l2.8 1.61q.33-.25.77-.26a1.25 1.25 0 0 1 .48 2.4v3.2a1.25 1.25 0 1 1-1.25 2.13l-2.8 1.62A1.25 1.25 0 0 1 8 15a1.25 1.25 0 0 1-1.18-1.65l-2.8-1.62q-.33.26-.77.27a1.25 1.25 0 0 1-.48-2.4V6.4a1.25 1.25 0 1 1 1.25-2.14l2.8-1.61A1.25 1.25 0 0 1 8 1M4.44 11.14l-.06.13 2.75 1.58a1.25 1.25 0 0 1 1.74 0l2.74-1.58-.05-.13zm3.89-7.68a1.3 1.3 0 0 1-.66 0L4.03 9.77q.37.3.45.78h7.04q.08-.48.45-.78zM4.38 4.73a1.24 1.24 0 0 1-1.02 1.76v3.02l.13.01 3.67-6.35-.03-.02zm4.46-1.56 3.67 6.35.13-.01V6.49a1.25 1.25 0 0 1-1.03-1.76L8.87 3.15z\\" clip-rule=\\"evenodd\\"/>\\n</svg>","nextjs":"<svg viewBox=\\"0 0 16 16\\">\\n <defs>\\n <linearGradient id=\\"a\\" x1=\\"4.522\\" x2=\\"14\\" y1=\\"3.943\\" y2=\\"16\\" gradientUnits=\\"userSpaceOnUse\\">\\n <stop stop-color=\\"currentColor\\"/>\\n <stop offset=\\"1\\" stop-color=\\"currentColor\\" stop-opacity=\\"0\\"/>\\n </linearGradient>\\n </defs>\\n <path fill=\\"currentColor\\" d=\\"M3 2h1.522v9.09H3z\\"/>\\n <path fill=\\"url(#a)\\" d=\\"M4.903 2 15 15.075q-.565.5-1.195.925L4.522 3.943z\\"/>\\n <path fill=\\"currentColor\\" d=\\"M12.172 2h-1.508v9.094h1.508z\\"/>\\n</svg>","npm":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M2 1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1z\\" class=\\"vector\\" opacity=\\".2\\"/>\\n <path fill=\\"currentColor\\" d=\\"M10.5 13H13V3H3v10h5V5.5h2.5z\\"/>\\n</svg>","oxc":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M9.5 1a.5.5 0 0 1 .5.5V3h3.5a.5.5 0 0 1 .38.83L10.5 7.69v1.44q.41.04.95-.16a4 4 0 0 0 .72-.35l.04-.03h.01a.5.5 0 0 1 .67.1l2 2.5a.5.5 0 0 1 0 .62c-.76.96-3.14 2.69-6.89 2.69s-6.13-1.73-6.89-2.69a.5.5 0 0 1 0-.62l2-2.5a.5.5 0 0 1 .67-.1l.05.03.16.09q.22.13.56.26.54.2.95.16V7.69L2.12 3.83A.5.5 0 0 1 2.5 3H6V1.5a.5.5 0 0 1 .5-.5zM7 3.5a.5.5 0 0 1-.5.5H3.6l2.78 3.17a.5.5 0 0 1 .12.33v2a.5.5 0 0 1-.28.45c-.7.35-1.5.15-2.02-.05a5 5 0 0 1-.58-.26l-1.46 1.84c.82.78 2.8 2.02 5.84 2.02s5.02-1.24 5.84-2.02l-1.46-1.83a5 5 0 0 1-.58.26c-.52.2-1.33.39-2.02.04a.5.5 0 0 1-.28-.45v-2a.5.5 0 0 1 .12-.33L12.4 4H9.5a.5.5 0 0 1-.5-.5V2H7z\\"/>\\n</svg>","postcss":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M14.5 8a6.5 6.5 0 0 0-5.9-6.47l5.42 8.93A7 7 0 0 0 14.5 8M2.88 12A6.5 6.5 0 0 0 8 14.5c2.08 0 3.93-.98 5.12-2.5zm8.62-1h1.68L11.5 8.24zm-1-.55a4 4 0 0 1-.7.55h.7zM8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5M5.5 11h.7a4 4 0 0 1-.7-.55zm-2.68 0H4.5V8.24zm3.76-6.2A4 4 0 0 1 8 4.5q.76 0 1.42.3L8 2.46zM1.5 8q0 1.31.48 2.46L7.4 1.53A6.5 6.5 0 0 0 1.5 8m14 0a7.5 7.5 0 0 1-.99 3.72l-.01.03-.02.03A7.5 7.5 0 0 1 8 15.5a7.5 7.5 0 0 1-6.5-3.75l-.01-.03A7.5 7.5 0 1 1 15.5 8\\"/>\\n</svg>","prettier":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M6 12v1H4.93v-1zm1-2v1H2v-1zm6-4v1h-3V6zm-1-4v1H9V2z\\"/>\\n <path fill=\\"currentColor\\" d=\\"M11.5 10v1H8v-1zM5 6v1H2V6zm5-2v1H9V4z\\" opacity=\\".8\\"/>\\n <path fill=\\"currentColor\\" d=\\"M6 14v1H2v-1zm-.5-6v1H2V8zM13 4v1h-3V4zM4.93 2v1H2V2z\\" opacity=\\".6\\"/>\\n <path fill=\\"currentColor\\" d=\\"M4.93 12v1H2v-1zM13 8v1H9V8zM5.5 4v1H2V4zM9 2v1H4.93V2z\\" opacity=\\".4\\"/>\\n</svg>","react":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M8 6.65c.73 0 1.31.6 1.31 1.35S8.73 9.35 8 9.35 6.69 8.75 6.69 8 7.27 6.65 8 6.65\\"/>\\n <path fill=\\"currentColor\\" fill-rule=\\"evenodd\\" d=\\"M8 2.55c1.3-.99 2.59-1.34 3.5-.8.92.55 1.27 1.87 1.08 3.53C14.06 5.94 15 6.9 15 8s-.94 2.06-2.42 2.72c.19 1.65-.16 2.98-1.08 3.52-.91.55-2.2.2-3.5-.8-1.3 1-2.58 1.35-3.5.8-.91-.54-1.27-1.87-1.08-3.52C1.94 10.06 1 9.1 1 8s.94-2.06 2.42-2.72c-.19-1.66.17-2.98 1.08-3.52s2.2-.2 3.5.8M4.26 11.2c-.08 1.34.28 2.03.68 2.26s1.15.22 2.25-.52l.11-.09a12 12 0 0 1-1.24-1.39 11 11 0 0 1-1.8-.41zm7.47-.15q-.83.27-1.79.41-.6.8-1.24 1.4l.11.08c1.1.74 1.86.76 2.25.52.4-.23.76-.92.68-2.26zm-3.04.54a14 14 0 0 1-1.38 0q.34.38.69.7.35-.32.7-.7M8 5.29q-.76 0-1.47.1A13 13 0 0 0 5.07 8a14 14 0 0 0 1.46 2.62 13 13 0 0 0 2.94 0A13 13 0 0 0 10.93 8a14 14 0 0 0-1.46-2.62A13 13 0 0 0 8 5.3M4.64 9.18q-.15.5-.25.96.44.16.94.27a15 15 0 0 1-.7-1.23m6.73 0a15 15 0 0 1-.7 1.23q.5-.11.95-.27a10 10 0 0 0-.25-.96M3.44 6.26C2.27 6.86 1.87 7.53 1.87 8s.4 1.14 1.57 1.74l.13.07q.18-.88.55-1.81a12 12 0 0 1-.55-1.8q-.07.02-.13.06m8.99-.07A12 12 0 0 1 11.88 8q.36.94.55 1.8l.13-.06c1.17-.6 1.56-1.27 1.56-1.74s-.39-1.14-1.56-1.74zm-7.1-.6q-.5.11-.94.27.1.46.25.96a15 15 0 0 1 .69-1.23m5.34 0a15 15 0 0 1 .7 1.23q.14-.5.24-.96-.44-.15-.94-.27M7.18 3.06c-1.09-.74-1.85-.76-2.24-.52s-.76.92-.69 2.26l.01.15a11 11 0 0 1 1.8-.41q.6-.8 1.24-1.4zm3.88-.52c-.4-.24-1.15-.22-2.25.52l-.12.08q.65.6 1.25 1.4.96.15 1.8.41v-.14c.08-1.35-.28-2.04-.68-2.27M8 3.7a10 10 0 0 0-.7.7 14 14 0 0 1 1.4 0 10 10 0 0 0-.7-.7\\" clip-rule=\\"evenodd\\"/>\\n</svg>","sass":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" fill-rule=\\"evenodd\\" d=\\"M8.08 1.44c2.41-.91 4.96-.37 5.35 1.27.39 1.62-.92 3.56-2.6 4.25a5 5 0 0 1-3.26.35c-.58-.2-.92-.62-1-.85-.03-.09-.09-.24 0-.3.05-.03.08-.02.22.15s.7.6 1.75.48c2.78-.34 4.45-2.64 3.92-3.88-.37-.87-2.5-1.26-5.18.16C4.03 4.81 3.85 6.24 3.82 6.8c-.08 1.5 1.73 2.28 2.7 3.4q.04.03.07.08c.3-.12.7-.19 1.35-.2 1.58-.03 2.47 1.08 2.43 2.08-.03.78-.7 1.1-.82 1.13-.1.01-.14.02-.15-.06q-.03-.06.13-.15c.16-.09.42-.3.48-.72.05-.43-.24-1.44-1.76-1.63a3 3 0 0 0-1.33.08c.27.62.32 1.87-.29 2.83-.63 1-1.8 1.61-2.93 1.27-.37-.1-.93-.92-.45-2.05.46-1.07 2.4-2.12 2.66-2.26-.9-.83-3.08-1.95-3.4-3.65-.08-.49.13-1.65 1.46-2.98a12 12 0 0 1 4.11-2.52m-1.88 9.7c-.01.01-.9.47-1.52 1.17-.59.66-.75 1.48-.43 1.69.3.18 1-.04 1.51-.62a3 3 0 0 0 .5-.9q.2-.64.02-1.39z\\" clip-rule=\\"evenodd\\"/>\\n</svg>","stylelint":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M4 3v3.5l1.5-1L7 15 .5 6l1-1.5L0 3l2.5-2h1zm12 0-1.5 1.5 1 1.5L9 15l1.5-9.5 1.5 1V3l.5-2h1zm-8 8.5a.5.5 0 1 1 0 1 .5.5 0 0 1 0-1m0-3a.5.5 0 1 1 0 1 .5.5 0 0 1 0-1m0-3a.5.5 0 1 1 0 1 .5.5 0 0 1 0-1\\"/>\\n <path fill=\\"currentColor\\" d=\\"M6.5 2.5V4l-2 1.5v-4zm5 3L9.5 4V2.5l2-1zM9 4H7V2.5h2z\\"/>\\n</svg>","svelte":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"m3.98 3.7 3.36-2.08a4.5 4.5 0 0 1 5.9 1.23 4 4 0 0 1 .7 3.02q-.16.75-.58 1.4c.42.77.56 1.66.4 2.52a3.7 3.7 0 0 1-1.57 2.4l-.17.1-3.36 2.09a4.5 4.5 0 0 1-5.9-1.23 4 4 0 0 1-.66-1.44 4 4 0 0 1-.04-1.58 4 4 0 0 1 .58-1.4 4 4 0 0 1-.4-2.52 3.7 3.7 0 0 1 1.57-2.4zl3.36-2.08zm7.87 0a2.7 2.7 0 0 0-1.26-.95 2.7 2.7 0 0 0-1.6-.07 3 3 0 0 0-.52.2l-.16.09-3.36 2.08a2 2 0 0 0-.69.64 2 2 0 0 0-.36.86 2.3 2.3 0 0 0 .42 1.81A2.7 2.7 0 0 0 7.18 9.4q.28-.06.53-.2l.16-.09 1.28-.79.2-.09a.8.8 0 0 1 .87.31.7.7 0 0 1 .13.55.7.7 0 0 1-.24.4l-.08.05-3.36 2.08-.2.09a1 1 0 0 1-.49-.02 1 1 0 0 1-.38-.3 1 1 0 0 1-.13-.37v-.1l.01-.13-.13-.03a4 4 0 0 1-1.1-.5l-.2-.14-.18-.12-.07.18-.08.3a2.3 2.3 0 0 0 .43 1.82q.45.64 1.19.93.73.28 1.51.14l.16-.04q.27-.07.52-.2l.16-.09 3.36-2.08q.4-.25.69-.64.27-.4.36-.86a2.3 2.3 0 0 0-.42-1.82 2.7 2.7 0 0 0-1.27-.95 2.7 2.7 0 0 0-1.6-.08q-.27.07-.52.2l-.16.1-1.28.79-.2.09a1 1 0 0 1-.49-.03 1 1 0 0 1-.38-.29.7.7 0 0 1-.13-.54.7.7 0 0 1 .24-.4l.08-.06L9.33 4.4l.2-.1a.8.8 0 0 1 .87.32 1 1 0 0 1 .13.38v.22l.11.04q.6.18 1.12.5l.2.14.17.12.06-.19.08-.3a2.3 2.3 0 0 0-.42-1.81z\\"/>\\n</svg>","svg":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M5 7a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2z\\"/>\\n <path fill=\\"currentColor\\" d=\\"M6 1a5 5 0 0 1 4.58 3H7a3 3 0 0 0-3 3v3.58A5 5 0 0 1 6 1\\" opacity=\\".5\\"/>\\n</svg>","svgo":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M9.43 4.8A.6.6 0 1 1 9.19 6l-.56.96a1.2 1.2 0 0 1 .32 1.58l.7.53a.89.89 0 1 1-.17.22l-.7-.52a1.2 1.2 0 0 1-1.4.25l-.56.87a.75.75 0 1 1-.57-.2 1 1 0 0 1 .32.05l.56-.87a1.2 1.2 0 0 1-.4-1.24l-1.2-.47a.56.56 0 1 1 .1-.28v.02l1.2.47a1.2 1.2 0 0 1 1.56-.55l.56-.97a.6.6 0 0 1-.15-.64.6.6 0 0 1 .63-.4\\"/>\\n <path fill=\\"currentColor\\" fill-rule=\\"evenodd\\" d=\\"M9.17 1q.16.63.27 1.26a6 6 0 0 1 1.61.67q.52-.38 1.08-.71l1.65 1.64q-.32.56-.68 1.05.48.78.72 1.67.6.09 1.18.25v2.32q-.55.15-1.11.24a6 6 0 0 1-.7 1.82q.31.44.59.91l-1.65 1.65-.85-.55a6 6 0 0 1-1.9.83q-.08.47-.2.95H6.84q-.12-.46-.2-.93a6 6 0 0 1-1.96-.81q-.39.27-.8.51l-1.65-1.65q.25-.43.53-.84a6 6 0 0 1-.75-1.9L1 9.16V6.83q.54-.14 1.09-.24a6 6 0 0 1 .77-1.74q-.33-.47-.63-.98l1.65-1.65q.54.32 1.03.68a6 6 0 0 1 1.66-.66q.1-.61.26-1.24zM7.96 3.73a4 4 0 0 0-1.74.36 4.5 4.5 0 0 0-2.3 2.3 4.4 4.4 0 0 0-.1 3.29l.03.06a4.4 4.4 0 0 0 2.4 2.47 4.4 4.4 0 0 0 3.48-.02l.03-.02a4.4 4.4 0 0 0 2.3-2.42l.06-.14a4.4 4.4 0 0 0-.2-3.4 4.4 4.4 0 0 0-2.13-2.07L9.47 4a4 4 0 0 0-1.51-.27\\" clip-rule=\\"evenodd\\"/>\\n</svg>","tailwind":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" fill-rule=\\"evenodd\\" d=\\"M8 4Q5.2 4 4.5 6.67q1.05-1.34 2.45-1c.53.12.91.5 1.33.9C8.98 7.23 9.77 8 11.5 8q2.8 0 3.5-2.67-1.05 1.34-2.45 1c-.53-.12-.91-.5-1.33-.9C10.52 4.77 9.73 4 8 4M4.5 8Q1.7 8 1 10.67q1.05-1.34 2.45-1c.53.12.91.5 1.33.9C5.48 11.23 6.26 12 8 12q2.8 0 3.5-2.67-1.05 1.34-2.45 1c-.53-.12-.91-.5-1.33-.9C7.02 8.77 6.24 8 4.5 8\\" clip-rule=\\"evenodd\\"/>\\n</svg>","terraform":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M1 0v5.05l4.35 2.53V2.53zm9.18 5.34L5.83 2.82v5.05l4.35 2.53zm.47 5.06V5.34L15 2.82v5.05zm-.48 5.6-4.35-2.53V8.42l4.35 2.53z\\"/>\\n</svg>","vite":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M8.57 14.87c-.18.26-.55.11-.55-.22v-3.18l-.05-.27-.13-.22-.2-.15-.24-.06H4.29c-.26 0-.4-.32-.26-.55L6.08 7c.3-.46 0-1.1-.5-1.1H1.8c-.25 0-.4-.32-.25-.56l2.65-4.2A.3.3 0 0 1 4.46 1h7.9c.26 0 .4.32.26.55l-2.05 3.23c-.29.46 0 1.1.5 1.1h3.12c.26 0 .4.34.24.57z\\"/>\\n</svg>","vscode":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"m5.11 9.68-2.4 1.84a.6.6 0 0 1-.75-.04l-.77-.7a.6.6 0 0 1 0-.87L3.28 8zm5.52-8.42a.51.51 0 0 1 .87.36V4.8L7.32 8 5.1 6.32z\\" opacity=\\".75\\"/>\\n <path fill=\\"currentColor\\" d=\\"M11.1 14.99h.03zM1.96 4.52a.6.6 0 0 1 .75-.04l8.8 6.71v3.19a.51.51 0 0 1-.88.36L1.19 6.1a.6.6 0 0 1 0-.87z\\" opacity=\\".65\\"/>\\n <path fill=\\"currentColor\\" d=\\"M11.62 14.91a.9.9 0 0 1-1-.17.51.51 0 0 0 .88-.36V1.62a.51.51 0 0 0-.87-.36.9.9 0 0 1 1-.17l2.87 1.39a.9.9 0 0 1 .5.8v9.44a.9.9 0 0 1-.5.8z\\"/>\\n</svg>","vue":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M9.62 2.25 8 5.02 6.38 2.25H1l7 12 7-12z\\" opacity=\\".5\\"/>\\n <path fill=\\"currentColor\\" d=\\"M9.54 2.25 8 4.95l-1.54-2.7H4l4 7 4-7z\\"/>\\n</svg>","wasm":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M13 1a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h3a2 2 0 1 0 4 0z\\" class=\\"subtract\\" opacity=\\".2\\"/>\\n <path fill=\\"currentColor\\" d=\\"M4.64 11.4h.02l.8-3.4h.91l.73 3.45L7.88 8h.96l-1.25 5h-.97L5.9 9.6 5.1 13h-1L3 8h.98z\\"/>\\n <path fill=\\"currentColor\\" fill-rule=\\"evenodd\\" d=\\"M13 13h-1.02l-.33-1.11H9.9L9.64 13h-.97l1.26-5h1.54zm-2.49-3.77-.42 1.84h1.32l-.49-1.84z\\" clip-rule=\\"evenodd\\"/>\\n</svg>","webpack":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M14.1 11.79 8.26 15v-2.5l3.64-1.94zm.4-.35V4.73l-2.14 1.2v4.3zm-12.6.35L7.74 15v-2.5L4.1 10.56zm-.4-.35V4.73l2.14 1.2v4.3zm.25-7.15 6-3.29v2.42L3.9 5.47l-.03.01zm12.5 0L8.25 1v2.42l3.85 2.05.03.01z\\" class=\\"bg\\" opacity=\\".4\\"/>\\n <path fill=\\"currentColor\\" d=\\"m7.74 11.93-3.59-1.92v-3.8l3.6 2.02zm.52 0 3.59-1.92v-3.8l-3.6 2.02zM4.4 5.77 8 3.85l3.6 1.93L8 7.8z\\" class=\\"fg\\"/>\\n</svg>","yml":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"M7.5 2A1.5 1.5 0 0 1 9 3.5v3A1.5 1.5 0 0 1 7.5 8h-2v2A1.5 1.5 0 0 0 7 11.5v-1A1.5 1.5 0 0 1 8.5 9h5a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1-1.5 1.5h-5A1.5 1.5 0 0 1 7 13.5v-1A2.5 2.5 0 0 1 4.5 10V8h-2A1.5 1.5 0 0 1 1 6.5v-3A1.5 1.5 0 0 1 2.5 2zm1 8a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h5a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5zm-6-7a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h5a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5z\\"/>\\n</svg>","zig":"<svg viewBox=\\"0 0 16 16\\">\\n <path fill=\\"currentColor\\" d=\\"m14.73 1.5-7.29 8.82h4.17l-1.73 2.04H5.76L1.27 14.5l7.3-8.91H4.39l1.73-2.05h4.12z\\"/>\\n <path fill=\\"currentColor\\" d=\\"M5.21 3.54 3.56 5.6h-.55v4.73h.83L2.1 12.36H1V3.54zm9.79 0v8.82h-4.3l1.74-2.04h.55V5.68h-.83l1.74-2.14z\\"/>\\n</svg>"}`),colors:{default:{light:`#84848a`,dark:`#adadb1`},astro:{light:`#a631be`,dark:`#d568ea`},babel:{light:`#d5a910`,dark:`#ffd452`},bash:{light:`#199f43`,dark:`#5ecc71`},biome:{light:`#1a85d4`,dark:`#69b1ff`},bootstrap:{light:`#693acf`,dark:`#9d6afb`},browserslist:{light:`#d5a910`,dark:`#ffd452`},bun:{light:`#594c5b`,dark:`#79697b`},c:{light:`#1a85d4`,dark:`#69b1ff`},cpp:{light:`#1a85d4`,dark:`#69b1ff`},claude:{light:`#d47628`,dark:`#ffa359`},css:{light:`#693acf`,dark:`#9d6afb`},database:{light:`#a631be`,dark:`#d568ea`},docker:{light:`#1a85d4`,dark:`#69b1ff`},eslint:{light:`#693acf`,dark:`#9d6afb`},git:{light:`#ff8c5b`,dark:`#d5512f`},go:{light:`#1ca1c7`,dark:`#68cdf2`},graphql:{light:`#d32a61`,dark:`#ff678d`},html:{light:`#d47628`,dark:`#ffa359`},image:{light:`#d32a61`,dark:`#ff678d`},javascript:{light:`#d5a910`,dark:`#ffd452`},json:{light:`#d47628`,dark:`#ffa359`},markdown:{light:`#199f43`,dark:`#5ecc71`},mcp:{light:`#17a5af`,dark:`#64d1db`},npm:{light:`#d52c36`,dark:`#ff6762`},oxc:{light:`#1ca1c7`,dark:`#68cdf2`},postcss:{light:`#d52c36`,dark:`#ff6762`},prettier:{light:`#17a5af`,dark:`#64d1db`},python:{light:`#1a85d4`,dark:`#69b1ff`},react:{light:`#1ca1c7`,dark:`#68cdf2`},ruby:{light:`#d52c36`,dark:`#ff6762`},rust:{light:`#d47628`,dark:`#ffa359`},sass:{light:`#d32a61`,dark:`#ff678d`},svg:{light:`#d47628`,dark:`#ffa359`},svelte:{light:`#d52c36`,dark:`#ff6762`},svgo:{light:`#199f43`,dark:`#5ecc71`},swift:{light:`#d47628`,dark:`#ffa359`},table:{light:`#17a5af`,dark:`#64d1db`},text:{light:`#84848a`,dark:`#adadb1`},tailwind:{light:`#1ca1c7`,dark:`#68cdf2`},terraform:{light:`#693acf`,dark:`#9d6afb`},typescript:{light:`#1a85d4`,dark:`#69b1ff`},vite:{light:`#a631be`,dark:`#d568ea`},vscode:{light:`#1a85d4`,dark:`#69b1ff`},vue:{light:`#199f43`,dark:`#5ecc71`},wasm:{light:`#693acf`,dark:`#9d6afb`},webpack:{light:`#1a85d4`,dark:`#69b1ff`},yml:{light:`#d52c36`,dark:`#ff6762`},zig:{light:`#d47628`,dark:`#ffa359`},zip:{light:`#d47628`,dark:`#ffa359`},stylelint:{light:`#84848a`,dark:`#adadb1`},nextjs:{light:`#84848a`,dark:`#adadb1`},font:{light:`#84848a`,dark:`#adadb1`}}},qr={byFileName:Object.fromEntries(Object.entries(Kr.names).map(([e,t])=>[e,{name:`file-tree-builtin-${t}`,token:t}])),byFileExtension:Object.fromEntries(Object.entries(Kr.extensions).map(([e,t])=>[e,{name:`file-tree-builtin-${t}`,token:t}]))};new Map(Object.entries(Kr.names)),new Map(Object.entries(Kr.extensions)),Kr.symbols;var Jr=Kr.colors,Yr=`diffs-container`,Xr=(()=>{try{return!1}catch{return!1}})(),Zr=/(?=^From [a-f0-9]+ .+$)/m,Qr=/(?=^diff --git)/gm,$r=/(?<=\n)/,ei=/^(---|\+\+\+)\s+([^\t\r\n]+)/,ti=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,ni=`header-prefix`,ri=`header-filename-suffix`,ii=`header-metadata`,ai=`header-custom`,oi={dark:`pierre-dark`,light:`pierre-light`},si=`data-theme-css`,ci=`data-unsafe-css`,li=`data-diffs-scrollbar-measure`,ui=`data-diffs-code-view-header`,di=`data-diffs-code-view-footer`,fi=`--diffs-scrollbar-gutter-measured`,pi=1e5,mi={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8},hi={...mi,hunkLineCount:1},gi={paddingTop:8,paddingBottom:8,gap:8},_i={omega:.015,positionEpsilon:.5,velocityEpsilon:.05},vi=Object.freeze({fromStart:0,fromEnd:0}),yi={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},bi=Object.freeze([]),xi={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0};function Si({name:e=`css-variables`,variablePrefix:t=`--diffs-`,variableDefaults:n={},fontStyle:r=!0}={}){let i=e=>{let r=n[e];return`var(${t}${e}${r!=null&&r!==``?`, ${r}`:``})`},a=i(`foreground`),o=i(`background`),s={"editor.foreground":a,"editor.background":o};for(let e of[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`]){let t=e[0].toUpperCase()+e.slice(1);s[`terminal.ansi${t}`]=i(`ansi-${e}`),s[`terminal.ansiBright${t}`]=i(`ansi-bright-${e}`)}let c={comment:`token-comment`,string:`token-string-expression`,"string.escape":`token-constant`,"text.literal":`token-string`,keyword:`token-keyword`,operator:`token-keyword`,preproc:`token-keyword`,boolean:`token-constant`,number:`token-constant`,constant:`token-constant`,property:`token-constant`,"property.json_key":`token-keyword`,"variable.special":`token-constant`,"variable.parameter":`token-parameter`,function:`token-function`,constructor:`token-function`,type:`token-function`,attribute:`token-function`,tag:`token-string-expression`,punctuation:`token-punctuation`,link_text:`token-link`,link_uri:`token-link`,"diff.plus":`token-inserted`,"diff.minus":`token-deleted`};return r&&(c.emphasis={font_style:`italic`},c[`emphasis.strong`]={font_weight:700},c.title={font_weight:700}),{name:e,type:`dark`,fg:a,bg:o,colors:s,cssVariables:{name:e,variablePrefix:t,variableDefaults:n,fontStyle:r},zed:{name:e,appearance:`dark`,cssVariables:{prefix:t,defaults:n},style:{"editor.foreground":`foreground`,"editor.background":`background`,syntax:c}}}}function Ci(e,t,n=`textmate`){let r=tn.get(e)??{};r[n]==null?(r[n]=t,tn.set(e,r)):console.error(`SharedHighlight.registerCustomTheme: theme name and type already registered`,e,n)}function wi(e,t,n=!1){let r=Si({name:e,variablePrefix:nn(`global`),variableDefaults:t,fontStyle:n});Ci(e,()=>Promise.resolve(r),`diffs`)}function Ti(){try{return new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0)),`highlights`}catch{return`shiki-js`}}var Ei=Ti(),Di={light:`pierre-light`,dark:`pierre-dark`},Oi=`porcelain-review`;wi(Oi,{});var ki=`
|
|
2
|
+
[data-diffs-header] {
|
|
3
|
+
min-height: calc(var(--spacing) * 10);
|
|
4
|
+
padding-inline: calc(var(--spacing) * 2) calc(var(--spacing) * 1.5);
|
|
5
|
+
border: 1px solid var(--border);
|
|
6
|
+
border-radius: var(--radius-lg) var(--radius-lg) 0 0;
|
|
7
|
+
background: var(--muted);
|
|
8
|
+
}
|
|
9
|
+
[data-diffs-header] [data-change-icon] {
|
|
10
|
+
display: none;
|
|
11
|
+
}
|
|
12
|
+
[data-diffs-header] [data-title] {
|
|
13
|
+
font-family: var(--font-mono);
|
|
14
|
+
font-size: var(--text-caption);
|
|
15
|
+
font-weight: 500;
|
|
16
|
+
line-height: calc(var(--spacing) * 4);
|
|
17
|
+
color: var(--foreground);
|
|
18
|
+
}
|
|
19
|
+
[data-diffs-header] [data-deletions-count],
|
|
20
|
+
[data-diffs-header] [data-additions-count] {
|
|
21
|
+
font-family: var(--font-mono);
|
|
22
|
+
font-size: var(--text-xs);
|
|
23
|
+
font-weight: 500;
|
|
24
|
+
line-height: calc(var(--spacing) * 4);
|
|
25
|
+
}
|
|
26
|
+
[data-diffs-header] [data-deletions-count] {
|
|
27
|
+
color: var(--del-fg);
|
|
28
|
+
}
|
|
29
|
+
[data-diffs-header] [data-additions-count] {
|
|
30
|
+
color: var(--add-fg);
|
|
31
|
+
}
|
|
32
|
+
pre {
|
|
33
|
+
border: 1px solid var(--border);
|
|
34
|
+
border-top: 0;
|
|
35
|
+
border-radius: 0 0 var(--radius-lg) var(--radius-lg);
|
|
36
|
+
}
|
|
37
|
+
`,Ai=`
|
|
38
|
+
:host {
|
|
39
|
+
--diffs-font-size: var(--text-caption);
|
|
40
|
+
--diffs-line-height: calc(var(--spacing) * 5.5);
|
|
41
|
+
--diffs-fg-number-addition-override: var(--muted-foreground);
|
|
42
|
+
--diffs-fg-number-deletion-override: var(--muted-foreground);
|
|
43
|
+
--diffs-min-number-column-width: calc(var(--spacing) * 4.5);
|
|
44
|
+
--diffs-gap-style: calc(var(--spacing) * .5) solid transparent;
|
|
45
|
+
}
|
|
46
|
+
[data-diffs-header] [data-deletions-count],
|
|
47
|
+
[data-diffs-header] [data-additions-count] {
|
|
48
|
+
display: none;
|
|
49
|
+
}
|
|
50
|
+
[data-code] {
|
|
51
|
+
padding-block: 0;
|
|
52
|
+
scrollbar-gutter: auto;
|
|
53
|
+
}
|
|
54
|
+
pre {
|
|
55
|
+
overflow: hidden;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
[data-diffs-header] {
|
|
59
|
+
min-height: calc(var(--spacing) * 10.25);
|
|
60
|
+
padding-inline: calc(var(--spacing) * 2);
|
|
61
|
+
}
|
|
62
|
+
[data-diffs-header] [data-change-icon] {
|
|
63
|
+
display: none;
|
|
64
|
+
}
|
|
65
|
+
[data-diffs-header] [data-title] {
|
|
66
|
+
font-family: var(--font-mono);
|
|
67
|
+
font-size: var(--text-caption);
|
|
68
|
+
font-weight: 500;
|
|
69
|
+
line-height: calc(var(--spacing) * 4);
|
|
70
|
+
color: var(--foreground);
|
|
71
|
+
}
|
|
72
|
+
[data-diffs-header] [data-deletions-count],
|
|
73
|
+
[data-diffs-header] [data-additions-count] {
|
|
74
|
+
font-family: var(--font-mono);
|
|
75
|
+
font-size: var(--text-xs);
|
|
76
|
+
font-weight: 500;
|
|
77
|
+
line-height: calc(var(--spacing) * 4);
|
|
78
|
+
}
|
|
79
|
+
[data-diffs-header] [data-deletions-count] {
|
|
80
|
+
color: var(--del-fg);
|
|
81
|
+
}
|
|
82
|
+
[data-diffs-header] [data-additions-count] {
|
|
83
|
+
color: var(--add-fg);
|
|
84
|
+
}
|
|
85
|
+
`,ji=`
|
|
86
|
+
[data-line-type='change-addition'] {
|
|
87
|
+
--diffs-computed-diff-line-bg: var(--add-bg);
|
|
88
|
+
}
|
|
89
|
+
[data-line-type='change-deletion'] {
|
|
90
|
+
--diffs-computed-diff-line-bg: var(--del-bg);
|
|
91
|
+
}
|
|
92
|
+
${ki}`,Mi=`
|
|
93
|
+
@media (max-width: 720px) {
|
|
94
|
+
[data-header-content] {
|
|
95
|
+
flex: 1 1 auto;
|
|
96
|
+
min-width: 6rem;
|
|
97
|
+
overflow: hidden;
|
|
98
|
+
}
|
|
99
|
+
[data-metadata] {
|
|
100
|
+
flex: 0 1 auto;
|
|
101
|
+
min-width: 0;
|
|
102
|
+
overflow: hidden;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
`,Ni=`
|
|
106
|
+
:host {
|
|
107
|
+
--diffs-light-bg: var(--card) !important;
|
|
108
|
+
--diffs-dark-bg: var(--card) !important;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
* {
|
|
112
|
+
scrollbar-width: thin;
|
|
113
|
+
scrollbar-color: var(--border) transparent;
|
|
114
|
+
}
|
|
115
|
+
`;function Pi(e,t={}){return{preferredHighlighter:Ei,theme:Di,themeType:e,overflow:t.overflow??`scroll`,disableFileHeader:!0,unsafeCSS:Ni}}function Fi(e){let t=Be;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,Mt);return t>>>1}var Ii=`
|
|
116
|
+
[data-gutter] {
|
|
117
|
+
min-width: calc(var(--spacing) * 12);
|
|
118
|
+
}
|
|
119
|
+
[data-column-number] {
|
|
120
|
+
min-width: calc(var(--spacing) * 12);
|
|
121
|
+
padding-inline: 0 calc(var(--spacing) * 3);
|
|
122
|
+
}
|
|
123
|
+
[data-code] [data-line] {
|
|
124
|
+
padding-inline-start: calc(var(--spacing) * 3);
|
|
125
|
+
}
|
|
126
|
+
[data-code] {
|
|
127
|
+
padding-top: var(--spacing) !important;
|
|
128
|
+
}
|
|
129
|
+
`,q=ce(),J=ze(),Li=Ie(Sr),Ri=[`system`,`light`,`dark`],zi=w(Ri);function Bi(e,t){return e===`system`?t?`dark`:`light`:e}function Vi(e){return Ri[(Ri.indexOf(e)+1)%Ri.length]??`system`}var Hi={pullStrategy:`merge`,collapseSpecs:!1,archiveDeleteWorktree:!0,archiveDeleteLocalBranch:!0,archiveDeleteRemoteBranch:!1},Ui=`Reviews & Git settings could not be read.`;function Wi(e){return e instanceof Error&&(e.name===`ConnectionError`||e.name===`RequestError`)?`${Ui} ${e.message}`:Ui}function Gi(e){return e instanceof Error&&e.name===`RequestError`&&`status`in e&&e.status===404}function Ki(e){let{confirmed:t,failure:n}=e;return t===void 0?n===void 0?{kind:`reading`}:Gi(n.error)?{kind:`unsupported`}:{kind:`unreadable`,message:Wi(n.error)}:t.kind===`unconfigured`?n===void 0?{kind:`unconfigured`}:{kind:`unreadable`,message:Wi(n.error)}:{kind:`configured`,settings:t.settings,revision:t.revision,unreadable:n===void 0?void 0:Wi(n.error)}}function qi(e){return e.kind===`configured`&&e.unreadable===void 0?e.settings:void 0}function Ji(e){return e.kind===`unconfigured`?Hi.pullStrategy:qi(e)?.pullStrategy}function Yi(e,t){switch(e.kind){case`configured`:return e.settings;case`unconfigured`:return t;case`reading`:case`unsupported`:case`unreadable`:return}}function Xi(e,t){return e.pullStrategy!==t.pullStrategy||e.collapseSpecs!==t.collapseSpecs||e.archiveDeleteWorktree!==t.archiveDeleteWorktree||e.archiveDeleteLocalBranch!==t.archiveDeleteLocalBranch||e.archiveDeleteRemoteBranch!==t.archiveDeleteRemoteBranch}function Zi(e){return`${e} already had settings; yours weren’t used.`}function Qi(e){return e===void 0?`Device trust could not be confirmed. Check again before changing Reviews & Git settings.`:e?void 0:`An owner must trust this device on the computer that runs Porcelain before it can change Reviews & Git settings.`}function $i(e){return e.kind===`configured`&&e.settings.collapseSpecs}function ea(e){switch(e.kind){case`reading`:return`Reading Reviews & Git settings for this computer…`;case`unsupported`:return`Update Porcelain on this computer to use its Reviews & Git settings.`;case`unreadable`:return e.message;case`unconfigured`:return`Choose Reviews & Git settings for this computer in Settings first.`;case`configured`:return e.unreadable}}function ta(e){return e instanceof Error&&e.message.length>0?e.message:`Reviews & Git settings could not be saved. Try again.`}var na=b({commitModel:_e.check(we(160)),appearance:zi,diffStyle:w([`unified`,`split`]),lineOverflow:w([`scroll`,`wrap`]),documentsDefault:w([`rendered`,`source`]),reviewGitSettingsImportCandidate:Ee,notifications:b({reviewReady:ie,agentReply:ie})}),ra={commitModel:``,appearance:`system`,diffStyle:`unified`,lineOverflow:`scroll`,documentsDefault:`rendered`,reviewGitSettingsImportCandidate:Hi,notifications:{reviewReady:!1,agentReply:!1}};function ia(e){let t=Ee.fields;return{pullStrategy:Y(t.pullStrategy,e.pullStrategy,Hi.pullStrategy),collapseSpecs:Y(t.collapseSpecs,e.collapseSpecs,Hi.collapseSpecs),archiveDeleteWorktree:Y(t.archiveDeleteWorktree,e.archiveDeleteWorktree,Hi.archiveDeleteWorktree),archiveDeleteLocalBranch:Y(t.archiveDeleteLocalBranch,e.archiveDeleteLocalBranch,Hi.archiveDeleteLocalBranch),archiveDeleteRemoteBranch:Y(t.archiveDeleteRemoteBranch,e.archiveDeleteRemoteBranch,Hi.archiveDeleteRemoteBranch)}}function Y(e,t,n){return _(M(e)(t),()=>n)}var aa=he.pipe(v(na,Ve({decode:e=>{let t=_(M(i(_e,he))(e),()=>({}));return{commitModel:Y(na.fields.commitModel,t.commitModel,ra.commitModel),appearance:Y(na.fields.appearance,`appearance`in t?t.appearance:t.theme,ra.appearance),diffStyle:Y(na.fields.diffStyle,t.diffStyle,ra.diffStyle),lineOverflow:Y(na.fields.lineOverflow,`lineOverflow`in t?t.lineOverflow:typeof t.wrapLongLines==`boolean`?t.wrapLongLines?`wrap`:`scroll`:void 0,ra.lineOverflow),documentsDefault:Y(na.fields.documentsDefault,t.documentsDefault,t.markdownDefault===`source`||t.htmlDefault===`source`?`source`:ra.documentsDefault),reviewGitSettingsImportCandidate:_(M(Ee)(t.reviewGitSettingsImportCandidate),()=>ia(t)),notifications:Y(na.fields.notifications,t.notifications,ra.notifications)}},encode:e=>e}))),oa=It(`ReviewGitSettingsState.resource`)(function*(e){let t=yield*Ft(e);return yield*Ze(e,Oe.reviewGitSettings(e.environmentId),t.request(e=>e.reviewGitSettings.readReviewGitSettings()))}),sa=class e extends z()(`@porcelain/client/ReviewGitSettingsState`){static layer(t){return o(e,oa(t))}},ca=pt(e=>e.atoms(t=>Kt(sa.layer(e),t(ct(e).layer)))),la=pt(e=>ca(e).atom(a(ft(sa,e=>e.stream))).pipe(je(e=>ue(e,e=>e)),Ge(0),T)),ua=pt(e=>je(la(e),e=>Ki({confirmed:P(I(e)),failure:l(e)?{error:L(e.cause)}:void 0}))),da=pt(e=>Dt(t=>{if(t(ua(e)).kind!==`unconfigured`)return;let n=t(gt(e));return Qi(at(n)?n.value.canUpdate:void 0)})),fa=pt(e=>Qe((t,n)=>n.refresh(gt(e)))),pa=pt(e=>ca(e).fn(t=>Ke(function*(){let n=yield*Ft(e),r=yield*(yield*sa).confirm(n.request(e=>(t.kind,e.reviewGitSettings.saveReviewGitSettings({payload:t}))),(e,t)=>x(t));return{answer:r,kept:t.kind===`initialize`&&Xi(t.settings,r.settings)}}),{concurrent:!0})),ma=pt(e=>ca(e).fn(t=>Ke(function*(){let t=yield*Ft(e);yield*(yield*sa).refresh(t.request(e=>e.reviewGitSettings.readReviewGitSettings()))}),{concurrent:!0})),ha=pt(e=>je(pa(e),e=>({saving:e.waiting,kept:at(e)&&e.value.kept,failure:l(e)?ta(L(e.cause)):void 0}))),ga=class extends z()(`@porcelain/client/PreferenceStorage`){};(class e extends z()(`@porcelain/client/PreferencesStore`){static layer=o(e,Ke(function*(){let e=yield*ga,t=yield*qt({initial:{preferences:ra},read:()=>ft(e.read(),e=>({preferences:e})),write:({preferences:t})=>e.write(t),messages:{beforeRead:`Saved preferences must be read before changing them.`,readFailed:`Saved preferences could not be read. Try reading them again.`,writeFailed:`Preferences could not be saved. Read them again before changing them.`}});return{state:t.state,load:t.load,change:It(`PreferencesStore.change`)(e=>t.write(({preferences:t})=>Bt({preferences:{...t,...e}})))}}))});var _a=_t({runtime:Li,key:`porcelain.prototype.preferences`,schema:aa,defaultValue:()=>ra}),va=Dt(e=>{if(typeof window>`u`)return!1;let t=window.matchMedia(`(prefers-color-scheme: dark)`),n=()=>e.setSelf(t.matches);return t.addEventListener(`change`,n),e.addFinalizer(()=>t.removeEventListener(`change`,n)),t.matches});function ya(){let e=(0,J.c)(9),t=dt(_a),n=kt(_a),r=dt(va),i;e[0]===n?i=e[1]:(i=(e,t)=>n(n=>({...n,[e]:t})),e[0]=n,e[1]=i);let a;e[2]!==r||e[3]!==t.appearance?(a=Bi(t.appearance,r),e[2]=r,e[3]=t.appearance,e[4]=a):a=e[4];let o;return e[5]!==i||e[6]!==a||e[7]!==t?(o={preferences:t,setPreference:i,resolvedTheme:a},e[5]=i,e[6]=a,e[7]=t,e[8]=o):o=e[8],o}function ba(){let e=(0,J.c)(2),{resolvedTheme:t}=ya(),n=t===`dark`,r;return e[0]===n?r=e[1]:(r={dark:n},e[0]=n,e[1]=r),r}var xa=Dt(e=>{e.addFinalizer(A());let t=document.documentElement,n=t.classList.contains(`dark`),r=()=>{let n=e.once(_a);be(n.appearance),t.classList.toggle(`dark`,Bi(n.appearance,e.once(va))===`dark`)};e.subscribe(_a,r),e.subscribe(va,r),r(),e.addFinalizer(()=>{t.classList.toggle(`dark`,n)})}),Sa=Dt(e=>Bi(e(_a).appearance,e(va))),X={saveFile:`Mod+S`,toggleNavigator:`Mod+B`,toggleSidebar:`Alt+Shift+R`,cycleAppearance:`Alt+Shift+D`,openSettings:`Alt+Shift+S`,closeSettings:`Escape`,openShortcuts:`Mod+/`,surfaceFiles:`Alt+1`,surfaceChanges:`Alt+2`,surfaceHistory:`Alt+3`,nextFile:`J`,previousFile:`K`,toggleReviewed:`R`,findInFile:`Mod+F`,duplicateFile:`Mod+D`,nextTab:`Alt+ArrowRight`,previousTab:`Alt+ArrowLeft`,closeTab:`Alt+W`,openToSide:`Alt+\\`},Ca=[{title:`Workspace`,items:[{keys:X.toggleNavigator,label:`Show or hide projects`},{keys:X.toggleSidebar,label:`Show or hide the side panel`},{keys:X.surfaceFiles,label:`Go to Files`},{keys:X.surfaceChanges,label:`Go to Changes`},{keys:X.surfaceHistory,label:`Go to History`},{keys:X.openSettings,label:`Settings`},{keys:X.closeSettings,label:`Close Settings`},{keys:X.cycleAppearance,label:`Cycle appearance`},{keys:X.openShortcuts,label:`Keyboard shortcuts`}]},{title:`Code review`,items:[{keys:X.nextFile,label:`Next file`},{keys:X.previousFile,label:`Previous file`},{keys:X.toggleReviewed,label:`Toggle reviewed`},{keys:X.findInFile,label:`Find in file`},{keys:X.saveFile,label:`Save file edits`},{keys:X.duplicateFile,label:`Duplicate the open file (Files panel open)`}]},{title:`Tabs`,items:[{keys:X.nextTab,label:`Next tab`},{keys:X.previousTab,label:`Previous tab`},{keys:X.closeTab,label:`Close tab`},{keys:X.openToSide,label:`Open the tab to the side`}]}];function wa(e){let t=(0,J.c)(9),{children:n}=e,{preferences:r,setPreference:i,resolvedTheme:a}=ya();tt(xa);let o;t[0]!==r.appearance||t[1]!==i?(o=()=>i(`appearance`,Vi(r.appearance)),t[0]=r.appearance,t[1]=i,t[2]=o):o=t[2];let s;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(s={ignoreInputs:!0},t[3]=s):s=t[3],hr(X.cycleAppearance,o,s);let c=a===`dark`&&`dark`,l;t[4]===c?l=t[5]:(l=Ct(`min-h-svh bg-background text-foreground`,c),t[4]=c,t[5]=l);let u;return t[6]!==n||t[7]!==l?(u=(0,q.jsx)(`div`,{className:l,children:n}),t[6]=n,t[7]=l,t[8]=u):u=t[8],u}var Ta=[{key:`archiveDeleteWorktree`,label:`Delete local worktree`,description:`Removes the branch’s folder. The main checkout is never deleted.`},{key:`archiveDeleteLocalBranch`,label:`Delete local branch`,description:`Deletes the pull request branch from this clone.`},{key:`archiveDeleteRemoteBranch`,label:`Delete remote branch`,description:`Deletes the branch on origin if it still exists.`}];function Ea(e){return{deleteWorktree:e.archiveDeleteWorktree,deleteLocalBranch:e.archiveDeleteLocalBranch,deleteRemoteBranch:e.archiveDeleteRemoteBranch}}var Da=[{key:`deleteWorktree`,label:Ta[0].label},{key:`deleteLocalBranch`,label:Ta[1].label},{key:`deleteRemoteBranch`,label:Ta[2].label}];function Oa(e,t){return{...Ea(e),deleteLocalBranch:!t&&e.archiveDeleteLocalBranch,deleteRemoteBranch:!t&&e.archiveDeleteRemoteBranch}}function ka(e,t,n){return e.filter(e=>!e.remote).map(e=>({...e,current:t.some(t=>t.id===n&&t.branch===e.name),inUse:t.some(t=>t.id!==n&&t.branch===e.name)}))}function Aa(e){return[e.mainCheckout?`The project’s main checkout and its branches are protected. Nothing will be deleted.`:void 0,e.worktreePath?`Delete worktree: ${e.worktreePath}`:void 0,e.worktreePath?`The entire worktree folder will be permanently deleted, including ignored files such as .env and local build output.`:void 0,e.detachWorktreePath?`Keep worktree detached from its branch: ${e.detachWorktreePath}`:void 0,e.localBranch?`Delete local branch: ${e.localBranch}`:void 0,e.remoteBranch?`Delete remote branch: ${e.remoteBranch}`:void 0,e.remoteBranchNote,!e.mainCheckout&&!e.worktreePath&&!e.localBranch&&!e.remoteBranch?`Nothing will be deleted with the current settings.`:void 0,e.dirty?`Warning: this worktree has uncommitted changes. Deleting the worktree permanently discards them.`:void 0,e.unpushed?`Warning: this branch has commits not confirmed on its remote. Deleting branches may lose those commits.`:void 0].filter(Boolean).join(`
|
|
130
|
+
|
|
131
|
+
`)}function ja(e){return e instanceof Error?e.message:`Deletion could not be completed. Prepare the deletion again.`}function Ma(e){return[Aa(e)].join(`
|
|
132
|
+
|
|
133
|
+
`)}function Na(e){return e instanceof Error?e.message:`Archiving failed. Try preparing the archive again.`}var Pa=(e,t)=>{let[n,r]=e.split(`:`);return wt(zt)({provider:n,model:r,effort:t})};function Fa(e,t){let n=t??e.writer,r=e.models.find(e=>e.provider===n.provider&&e.model===n.model),i=n.provider===`claude`?`Claude`:`Codex`;return{available:r!==void 0,label:`${i} / ${r?.label??n.model} · ${n.effort}`}}function Ia(e){return e.project&&e.current!==void 0&&e.writer===`${e.current.provider}:${e.current.model}`&&e.effort===e.current.effort||e.writer==="default"||e.models.some(t=>`${t.provider}:${t.model}`===e.writer)}function La(e){return e.state===`open`&&e.draft?`draft`:e.state}var Ra={open:`Open`,draft:`Draft`,merged:`Merged`,closed:`Closed`};function za(e){return Ra[La(e)]}var Ba=new Set([`FAILURE`,`ERROR`,`CANCELLED`,`TIMED_OUT`,`ACTION_REQUIRED`,`STARTUP_FAILURE`,`STALE`]);function Va(e){return e.status!==`COMPLETED`||e.conclusion===`EXPECTED`?`running`:Ba.has(e.conclusion??``)?`failed`:`passed`}function Ha(e,t,n){let r=`${e.length}${t?`+`:``}`;if(t){let e=Wa(n);return e.tone===`none`?{tone:`none`,label:`${r} checks listed · result incomplete`,short:`Checks incomplete`}:{tone:e.tone,label:e.label,short:e.label}}if(e.length===0)return{tone:`none`,label:`No checks`,short:`No checks`};let i=`${e.length} ${e.length===1?`check`:`checks`}`,a=e.filter(e=>Va(e)===`failed`);if(a.length>0)return{tone:`failed`,label:`${a.length} of ${i} failed`,short:`${a.length} failed`};let o=e.filter(e=>Va(e)===`running`);return o.length>0?{tone:`running`,label:`${o.length} of ${i} running`,short:`${o.length} running`}:{tone:`passed`,label:`${i} passed`,short:i}}function Ua(e){return Va(e)}function Wa(e){return e===`SUCCESS`?{tone:`passed`,label:`Checks passing`}:e===`FAILURE`||e===`ERROR`?{tone:`failed`,label:`Checks failing`}:e===`PENDING`||e===`EXPECTED`?{tone:`running`,label:`Checks running`}:{tone:`none`,label:`No checks`}}function Ga(e){switch(e){case`no-access`:return{description:`The chosen or detected GitHub account cannot open this repository. Choose another account or reset the choice in Settings › Reviews & Git.`,action:{kind:`settings`,label:`Choose an account`}};case`gh-not-installed`:return{description:`The GitHub CLI (gh) is not installed on this computer.`,action:{kind:`install`,label:`How to install`,url:`https://cli.github.com`}};case`no-accounts`:return{description:`No GitHub account is signed in. Run gh auth login on this computer.`,action:{kind:`copy`,label:`Copy gh auth login`,text:`gh auth login`}};case`rate-limited`:return{description:`GitHub rate limit reached.`,action:{kind:`retry`,label:`Try again`}};case`offline`:return{description:`GitHub can’t be reached.`,action:{kind:`retry`,label:`Try again`}};case`invalid-response`:return{description:`GitHub’s answer was unreadable.`,action:{kind:`retry`,label:`Try again`}};case`pull-request-not-found`:return{description:`GitHub could not find this pull request. It may have been removed or become unavailable to this account. You can still read local changes.`,action:{kind:`retry`,label:`Try again`}};case`not-github`:return{description:`This repository has no GitHub remote.`,action:{kind:`retry`,label:`Try again`}}}}function Ka(e){return e===`MERGEABLE`?{label:`No conflicts`,tone:`passed`}:e===`CONFLICTING`?{label:`Conflicts`,tone:`failed`}:{label:`Not known yet`,tone:`none`}}function qa(e){if(e===`APPROVED`)return{label:`Approved`,tone:`passed`};if(e===`CHANGES_REQUESTED`)return{label:`Changes requested`,tone:`failed`};if(e===`DISMISSED`)return{label:`Dismissed`,tone:`none`}}function Ja(e){return/^https:\/\/github\.com\/([^/]+\/[^/]+)\/pull\//.exec(e)?.[1]}function Ya(e){if(e===void 0)return;let t=Math.floor(e/1e3);return t<60?`${t}s`:`${Math.floor(t/60)}m ${t%60}s`}function Xa(e){let t=new Set(e.filter(e=>e.kind===`review`).map(e=>e.id));return e.filter(e=>e.kind!==`review-comment`||e.reviewId===void 0||!t.has(e.reviewId)).map(t=>({item:t,comments:t.kind===`review`?e.filter(e=>e.kind===`review-comment`&&e.reviewId===t.id):[]}))}function Za(e){let t=(0,J.c)(2),n;return t[0]===e?n=t[1]:(n=ua(e),t[0]=e,t[1]=n),dt(n)}function Qa(e){let t=(0,J.c)(2),n=Za(e),r;return t[0]===n?r=t[1]:(r=$i(n),t[0]=n,t[1]=r),r}function $a(e){let t=(0,J.c)(2),n;return t[0]===e?n=t[1]:(n=da(e),t[0]=e,t[1]=n),dt(n)}function eo(e){let t=(0,J.c)(10),n;t[0]===e?n=t[1]:(n=At(e),t[0]=e,t[1]=n);let r=n,i=dt(r),a;t[2]===i?a=t[3]:(a=P(I(i))?.projects,t[2]=i,t[3]=a);let o;t[4]===i?o=t[5]:(o=l(i),t[4]=i,t[5]=o);let s=bt(r),c;return t[6]!==a||t[7]!==o||t[8]!==s?(c={projects:a,failed:o,retry:s},t[6]=a,t[7]=o,t[8]=s,t[9]=c):c=t[9],c}function to(e){let t=(0,J.c)(15),n;t[0]===e?n=t[1]:(n=fa(e),t[0]=e,t[1]=n);let r=kt(n),i;t[2]===e?i=t[3]:(i=ha(e),t[2]=e,t[3]=i);let a=dt(i),o;t[4]===e?o=t[5]:(o=pa(e),t[4]=e,t[5]=o);let s=kt(o),c;t[6]===e?c=t[7]:(c=ma(e),t[6]=e,t[7]=c);let l=kt(c),u;t[8]===r?u=t[9]:(u=()=>r(void 0),t[8]=r,t[9]=u);let d;return t[10]!==a||t[11]!==s||t[12]!==l||t[13]!==u?(d={...a,save:s,readAgain:l,checkTrustAgain:u},t[10]=a,t[11]=s,t[12]=l,t[13]=u,t[14]=d):d=t[14],d}var no=U.createContext(void 0);function ro(){let e=U.useContext(no);if(e===void 0)throw Error(ye(64));return e}var io=`data-activation-direction`,ao={tabActivationDirection:e=>({[io]:e})},oo=U.forwardRef(function(e,t){let{className:n,defaultValue:r=0,onValueChange:i,orientation:a=`horizontal`,render:o,value:s,style:c,...l}=e,u=e.defaultValue!==void 0,d=U.useRef([]),[f,p]=U.useState(()=>new Map),[m,h]=Nt({controlled:s,default:r,name:`Tabs`,state:`value`}),g=s!==void 0,[_,v]=U.useState(()=>new Map),y=U.useRef(void 0),b=U.useCallback(e=>so(_,e),[_]),[x,S]=U.useState(()=>({previousValue:m,tabActivationDirection:`none`})),{previousValue:C,tabActivationDirection:w}=x,T=w,E=!1;C!==m&&(T=co(C,m,a,_),E=C!=null&&m!=null&&b(m)==null);let D=E?C:m,O=C!==D||w!==T;Te(()=>{O&&S({previousValue:D,tabActivationDirection:T})},[D,O,T]);let A=k((e,t)=>{t.activationDirection=co(m,e,a,_),i?.(e,t),t.isCanceled||h(e)}),j=k((e,t)=>{i?.(e,He(t,void 0,void 0,{activationDirection:`none`}))}),M=k((e,t)=>(p(n=>{let r=new Map(n);return r.set(e,t),r}),()=>{p(n=>{if(n.get(e)!==t)return n;let r=new Map(n);return r.delete(e),r})})),ee=U.useCallback(e=>f.get(e),[f]),N=U.useCallback(e=>{for(let t of _.values())if(e===t.value)return t.id},[_]),P=U.useMemo(()=>({getTabElementBySelectedValue:b,getTabIdByPanelValue:N,getTabPanelIdByValue:ee,onValueChange:A,orientation:a,registerMountedTabPanel:M,setTabMap:v,tabActivationDirection:T,value:m}),[b,N,ee,A,a,M,v,T,m]),F=U.useMemo(()=>{for(let e of _.values())if(e.value===m)return e},[_,m]),I=U.useMemo(()=>{for(let e of _.values())if(!e.disabled)return e.value},[_]),L=U.useRef(!u),R=U.useRef(r),z=U.useRef(u),B=U.useRef(!1);Te(()=>{if(g)return;function e(e,t){h(e),S({previousValue:e,tabActivationDirection:`none`}),j(e,t),L.current=!1}if(_.size===0){B.current&&m!==null&&!y.current?.isConnected&&e(null,ke);return}B.current=!0,y.current=_.keys().next().value;let t=F?.disabled,n=F==null&&m!==null;if(!t&&m===R.current&&(z.current=!1),z.current&&t&&m===R.current)return;let r=L.current;if(t||n){let n=I??null;if(m===n){L.current=!1;return}let i=ke;r?i=et:t&&(i=ht),e(n,i)}else r&&F!=null&&(j(m,et),L.current=!1)},[I,g,j,F,h,_,m]);let te=Qt(`div`,e,{state:{orientation:a,tabActivationDirection:T},ref:t,props:l,stateAttributesMapping:ao});return(0,q.jsx)(no.Provider,{value:P,children:(0,q.jsx)(le,{elementsRef:d,children:te})})});function so(e,t){for(let[n,r]of e.entries())if(t===r.value)return n;return null}function co(e,t,n,r){if(e==null||t==null)return`none`;let[i,a,o]=n===`horizontal`?[`left`,`left`,`right`]:[`top`,`up`,`down`],s=so(r,e),c=so(r,t);if(s==null||c==null)return s!==c&&(typeof e==`number`||typeof e==`string`)&&typeof e==typeof t?t>e?o:a:`none`;let l=s.getBoundingClientRect()[i],u=c.getBoundingClientRect()[i];return u<l?a:u>l?o:`none`}var lo=`data-composite-item-active`,uo=U.createContext(void 0);function fo(){let e=U.useContext(uo);if(e===void 0)throw Error(ye(65));return e}var po=U.forwardRef(function(e,t){let{className:n,disabled:i=!1,render:a,value:o,id:s,nativeButton:c=!0,style:l,...u}=e,{value:d,getTabPanelIdByValue:f,onValueChange:p,orientation:m,tabActivationDirection:h}=ro(),{activateOnFocus:g,registerTabResizeObserverElement:_,tabsListElement:v}=fo(),{highlightedIndex:y,onHighlightedIndexChange:b}=Re(),x=r(s),S=U.useMemo(()=>({disabled:i,id:x,value:o}),[i,x,o]),{compositeProps:C,compositeRef:w,index:T}=Wt({metadata:S}),E=o===d,D=U.useRef(!1),O=U.useRef(null),A=k(e=>{O.current?.(),O.current=e?_(e):null});Te(()=>{if(D.current){D.current=!1;return}if(!(E&&T>-1&&y!==T))return;let e=v;if(e!=null){let t=F(ve(e));if(t&&se(e,t))return}i||b(T)},[E,T,y,b,i,v]);let{getButtonProps:j,buttonRef:M}=Pe({disabled:i,native:c,focusableWhenDisabled:!0}),ee=f(o),N=U.useRef(!1),P=U.useRef(!1);function I(e){p(o,He(yt,e.nativeEvent,void 0,{activationDirection:`none`}))}function L(e){E||i||I(e)}function R(e){E||i||g&&(!N.current||P.current)&&I(e)}function z(e){if(E||i)return;N.current=!0,P.current=e.button===0;let t=ve(e.currentTarget);function n(){N.current=!1,P.current=!1,t.removeEventListener(`pointerup`,n),t.removeEventListener(`pointercancel`,n)}t.addEventListener(`pointerup`,n),t.addEventListener(`pointercancel`,n)}return Qt(`button`,e,{state:{disabled:i,active:E,orientation:m,tabActivationDirection:h},ref:[t,M,w,A],props:[C,{role:`tab`,"aria-controls":ee,"aria-selected":E,id:x,onClick:L,onFocus:R,onPointerDown:z,[lo]:E?``:void 0,onKeyDownCapture(){D.current=!0}},u,j],stateAttributesMapping:ao})}),mo=`data-index`,ho={...ao,...ae},go=U.forwardRef(function(e,t){let{className:n,value:i,render:a,keepMounted:o=!1,style:s,...c}=e,{value:l,getTabIdByPanelValue:u,orientation:d,tabActivationDirection:f,registerMountedTabPanel:p}=ro(),m=r(),{ref:h,index:g}=E(),_=i===l,{mounted:v,transitionStatus:y,setMounted:b}=Ce(_),x=!v,S=u(i),C={hidden:x,orientation:d,tabActivationDirection:f,transitionStatus:y},w=U.useRef(null),T=Qt(`div`,e,{state:C,ref:[t,h,w],props:[{"aria-labelledby":S,hidden:x,id:m,role:`tabpanel`,tabIndex:_?0:-1,inert:Ht(!_),[mo]:g},c],stateAttributesMapping:ho});return De({open:_,ref:w,onComplete(){_||b(!1)}}),Te(()=>{if(!(m==null||x&&!o))return p(i,m)},[x,o,i,m,p]),o||v?T:null});function _o(e){let{loopFocus:t=!0,orientation:n=`both`,grid:r,onLoop:i,direction:a,highlightedIndex:o,onHighlightedIndexChange:s,rootRef:c,enableHomeAndEndKeys:l=!1,stopEventPropagation:u,disabledIndices:p,modifierKeys:m=Ue}=e,[_,v]=U.useState(0),y=r!=null,b=U.useRef(null),x=Yt(b,c),S=U.useRef([]),C=U.useRef(!1),w=U.useRef(null),T=o??_,E=k((e,t=!1)=>{if(w.current=S.current[e]??null,(s??v)(e),t){let t=S.current[e];te(b.current,t,a,n)}}),D=k(e=>{if(e.size===0)return;if(C.current){let e=S.current,t=e.indexOf(w.current);if(t===-1){let t=e[T];!t||ot(e,T,p)?E(vo(e,p)):w.current=t}else t!==T&&E(t);return}C.current=!0;let t=Array.from(e.keys()),r=t.find(e=>e?.hasAttribute(`data-composite-item-active`))??null,i=r?e.get(r)?.index??-1:-1;if(i!==-1)E(i);else if(ot(t,T,p)){let e=fe(t,{disabledIndices:p});ne(t,e)||E(e)}te(b.current,r,a,n)});Te(()=>{if(p==null||o!=null||!C.current)return;let e=S.current;if(ot(e,T,p)){let t=fe(e,{disabledIndices:p});ne(e,t)||E(t)}},[p,o,T,S,E]);let O=k((e,t,n)=>i?i(e,t,n,S):n),A=k(e=>{let o=e.key===`Home`||e.key===`End`;if(!st.has(e.key)||!l&&o||yo(e,m)||!b.current)return;let s=a===`rtl`,c=s?g:f,_=s?f:g,v=n===`vertical`?pe:c,x=n===`vertical`?re:_,C=en(e.nativeEvent);if(C!=null&&R(C)&&!Ye(C)){let t=C.selectionStart,n=C.selectionEnd,r=C.value;if(t==null||e.shiftKey||t!==n||e.key!==x&&t<r.length||e.key!==v&&t>0)return}let w=T,D=d(S,p),k=h(S,p);r!=null&&(w=r({disabledIndices:p,elementsRef:S,event:e,highlightedIndex:T,loopFocus:t,maxIndex:k,minIndex:D,onLoop:O,orientation:n,rtl:s}));let A=n!==`vertical`&&e.key===c||n!==`horizontal`&&e.key===`ArrowDown`,j=n!==`vertical`&&e.key===_||n!==`horizontal`&&e.key===`ArrowUp`;l&&(e.key===`Home`?w=D:e.key===`End`&&(w=k)),w===T&&(A||j)&&(t&&w===k&&A?(w=D,i&&(w=i(e,T,w,S))):t&&w===D&&j?(w=k,i&&(w=i(e,T,w,S))):w=fe(S.current,{startingIndex:w,decrement:j,disabledIndices:p})),w!==T&&!ne(S.current,w)&&(u&&e.stopPropagation(),(y||o||A||j)&&e.preventDefault(),E(w,!0),queueMicrotask(()=>{S.current[w]?.focus()}))});return{props:{ref:x,onFocus(e){let t=b.current,n=en(e.nativeEvent);t&&n!=null&&R(n)&&n.setSelectionRange(0,n.value.length)},onKeyDown:A},highlightedIndex:T,onHighlightedIndexChange:E,elementsRef:S,onMapChange:D,relayKeyboardEvent:A}}function vo(e,t){let n=-1;for(let r=0;r<e.length;r+=1){let i=e[r];if(i&&!ot(e,r,t)){if(i.hasAttribute(`data-composite-item-active`))return r;n===-1&&(n=r)}}return Math.max(n,0)}function yo(e,t){for(let n of rt)if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function bo(e){let{render:t,className:n,style:r,refs:i=Ue,props:a=Ue,state:o=Pt,stateAttributesMapping:s,highlightedIndex:c,onHighlightedIndexChange:l,orientation:u,grid:d,loopFocus:f,onLoop:p,enableHomeAndEndKeys:m,onMapChange:h,stopEventPropagation:g=!0,rootRef:_,disabledIndices:v,modifierKeys:y,highlightItemOnHover:b=!1,tag:x=`div`,...S}=e,{props:C,highlightedIndex:w,onHighlightedIndexChange:T,elementsRef:E,onMapChange:D,relayKeyboardEvent:k}=_o({grid:d,loopFocus:f,onLoop:p,orientation:u,highlightedIndex:c,onHighlightedIndexChange:l,rootRef:_,stopEventPropagation:g,enableHomeAndEndKeys:m,direction:O(),disabledIndices:v,modifierKeys:y}),A=Qt(x,e,{state:o,ref:i,props:[C,...a,S],stateAttributesMapping:s}),j=U.useMemo(()=>({highlightedIndex:w,onHighlightedIndexChange:T,highlightItemOnHover:b,relayKeyboardEvent:k}),[w,T,b,k]);return(0,q.jsx)(Rt.Provider,{value:j,children:(0,q.jsx)(le,{elementsRef:E,onMapChange:e=>{h?.(e),D(e)},children:A})})}var xo=U.forwardRef(function(e,t){let{activateOnFocus:n=!1,className:r,loopFocus:i=!0,render:a,style:o,...s}=e,{orientation:c,setTabMap:l,tabActivationDirection:u}=ro(),[d,f]=U.useState(0),[p,m]=U.useState(null),h=U.useRef(new Set),g=U.useRef(new Set),_=U.useRef(null);Te(()=>{if(typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{h.current.forEach(e=>{e()})});return _.current=e,p&&e.observe(p),g.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),_.current=null}},[p]);let v=k(e=>(h.current.add(e),()=>{h.current.delete(e)})),y=k(e=>(g.current.add(e),_.current?.observe(e),()=>{g.current.delete(e),_.current?.unobserve(e)})),b={orientation:c,tabActivationDirection:u},x={"aria-orientation":c===`vertical`?`vertical`:void 0,role:`tablist`},S=U.useMemo(()=>({activateOnFocus:n,registerIndicatorUpdateListener:v,registerTabResizeObserverElement:y,tabsListElement:p}),[n,v,y,p]);return(0,q.jsx)(uo.Provider,{value:S,children:(0,q.jsx)(bo,{render:a,className:r,style:o,state:b,refs:[t,m],props:[x,s],stateAttributesMapping:ao,highlightedIndex:d,enableHomeAndEndKeys:!0,loopFocus:i,orientation:c,onHighlightedIndexChange:f,onMapChange:l,disabledIndices:Ue})})});function So({className:e,orientation:t=`horizontal`,...n}){return(0,q.jsx)(oo,{"data-slot":`tabs`,"data-orientation":t,className:Ct(`group/tabs flex gap-2 data-horizontal:flex-col`,e),...n})}var Co=j(`group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none`,{variants:{variant:{default:`bg-muted`,line:`gap-1 bg-transparent`}},defaultVariants:{variant:`default`}});function wo({className:e,variant:t=`default`,...n}){return(0,q.jsx)(xo,{"data-slot":`tabs-list`,"data-variant":t,className:Ct(Co({variant:t}),e),...n})}function To({className:e,...t}){return(0,q.jsx)(po,{"data-slot":`tabs-trigger`,className:Ct(`relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-xs font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start group-data-vertical/tabs:py-[calc(--spacing(1.25))] hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent`,`data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground`,`after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100`,e),...t})}function Eo({className:e,...t}){return(0,q.jsx)(go,{"data-slot":`tabs-content`,className:Ct(`flex-1 text-xs/relaxed outline-none`,e),...t})}var Do=class{constructor(e,t){this.fn=e,this.options=t,this.lastExecutionTime=0,this.isPending=!1,this.maybeExecute=(...e)=>{let t=Date.now()-this.lastExecutionTime;if(this.options.leading&&t>=this.options.wait)this.execute(...e);else if(this.lastArgs=e,!this.timeoutId&&this.options.trailing){let e=this.options.wait-t;this.isPending=!0,this.timeoutId=setTimeout(()=>{this.lastArgs!==void 0&&this.execute(...this.lastArgs)},e)}},this.execute=(...e)=>{this.fn(...e),this.options.onExecute?.(e,this),this.lastExecutionTime=Date.now(),this.clearTimeout(),this.lastArgs=void 0,this.isPending=!1},this.flush=()=>{this.isPending&&this.lastArgs&&this.execute(...this.lastArgs)},this.cancel=()=>{this.clearTimeout(),this.lastArgs=void 0,this.isPending=!1},this.clearTimeout=()=>{this.timeoutId&&=(clearTimeout(this.timeoutId),void 0)},this.options.leading===void 0&&this.options.trailing===void 0&&(this.options.leading=!0,this.options.trailing=!0)}};function Oo(e,t){return new Do(e,t).maybeExecute}var ko=class{#e=!0;#t;#n;#r;#i;#a;#o;#s;#c=0;#l=5;#u=!1;#d=!1;#f=null;#p=()=>{this.debugLog(`Connected to event bus`),this.#a=!0,this.#u=!1,this.debugLog(`Emitting queued events`,this.#i),this.#i.forEach(e=>this.emitEventToBus(e)),this.#i=[],this.stopConnectLoop(),this.#n().removeEventListener(`tanstack-connect-success`,this.#p)};#m=()=>{this.#c<this.#l?(this.#c++,this.dispatchCustomEvent(`tanstack-connect`,{})):(this.#n().removeEventListener(`tanstack-connect`,this.#m),this.#d=!0,this.debugLog(`Max retries reached, giving up on connection`),this.stopConnectLoop())};#h=()=>{this.#u||(this.#u=!0,this.#n().addEventListener(`tanstack-connect-success`,this.#p),this.#m())};constructor({pluginId:e,debug:t=!1,enabled:n=!0,reconnectEveryMs:r=300}){this.#t=e,this.#e=n,this.#n=this.getGlobalTarget,this.#r=t,this.debugLog(` Initializing event subscription for plugin`,this.#t),this.#i=[],this.#a=!1,this.#d=!1,this.#o=null,this.#s=r}startConnectLoop(){this.#o!==null||this.#a||(this.debugLog(`Starting connect loop (every ${this.#s}ms)`),this.#o=setInterval(this.#m,this.#s))}stopConnectLoop(){this.#u=!1,this.#o!==null&&(clearInterval(this.#o),this.#o=null,this.#i=[],this.debugLog(`Stopped connect loop`))}debugLog(...e){this.#r&&console.log(`🌴 [tanstack-devtools:${this.#t}-plugin]`,...e)}getGlobalTarget(){if(typeof globalThis<`u`&&globalThis.__TANSTACK_EVENT_TARGET__)return this.debugLog(`Using global event target`),globalThis.__TANSTACK_EVENT_TARGET__;if(typeof window<`u`&&window.addEventListener!==void 0)return this.debugLog(`Using window as event target`),window;let e=typeof EventTarget<`u`?new EventTarget:void 0;return e===void 0||e.addEventListener===void 0?(this.debugLog(`No event mechanism available, running in non-web environment`),{addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!1}):(this.debugLog(`Using new EventTarget as fallback`),e)}getPluginId(){return this.#t}dispatchCustomEventShim(e,t){try{let n=new Event(e,{detail:t});this.#n().dispatchEvent(n)}catch{this.debugLog(`Failed to dispatch shim event`)}}dispatchCustomEvent(e,t){try{this.#n().dispatchEvent(new CustomEvent(e,{detail:t}))}catch{this.dispatchCustomEventShim(e,t)}}emitEventToBus(e){this.debugLog(`Emitting event to client bus`,e),this.dispatchCustomEvent(`tanstack-dispatch-event`,e)}createEventPayload(e,t){return{type:`${this.#t}:${e}`,payload:t,pluginId:this.#t}}emit(e,t){if(!this.#e)this.debugLog(`Event bus client is disabled, not emitting event`,e,t);else if(this.#f&&(this.debugLog(`Emitting event to internal event target`,e,t),this.#f.dispatchEvent(new CustomEvent(`${this.#t}:${e}`,{detail:this.createEventPayload(e,t)}))),this.#d)this.debugLog(`Previously failed to connect, not emitting to bus`);else if(!this.#a)this.debugLog(`Bus not available, will be pushed as soon as connected`),this.#i.push(this.createEventPayload(e,t)),typeof CustomEvent<`u`&&!this.#u&&(this.#h(),this.startConnectLoop());else return this.emitEventToBus(this.createEventPayload(e,t))}on(e,t,n){let r=n?.withEventTarget??!1,i=`${this.#t}:${e}`;if(r&&(this.#f||=new EventTarget,this.#f.addEventListener(i,e=>{t(e.detail)})),!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`,i),()=>{};let a=e=>{this.debugLog(`Received event from bus`,e.detail),t(e.detail)};return this.#n().addEventListener(i,a),this.debugLog(`Registered event to bus`,i),()=>{r&&this.#f?.removeEventListener(i,a),this.#n().removeEventListener(i,a)}}onAll(e){if(!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`),()=>{};let t=t=>{let n=t.detail;e(n)};return this.#n().addEventListener(`tanstack-devtools-global`,t),()=>this.#n().removeEventListener(`tanstack-devtools-global`,t)}onAllPluginEvents(e){if(!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`),()=>{};let t=t=>{let n=t.detail;this.#t&&n.pluginId!==this.#t||e(n)};return this.#n().addEventListener(`tanstack-devtools-global`,t),()=>this.#n().removeEventListener(`tanstack-devtools-global`,t)}},Z=new class extends ko{constructor(){super({pluginId:`form-devtools`,reconnectEveryMs:1e3})}};function Ao(e,t){return typeof e==`function`?e(t):e}function jo(e,t){return zo(t).reduce((e,t)=>{if(e===null)return null;if(e!==void 0)return e[t]},e)}function Mo(e,t,n){let r=zo(t);function i(e){if(!r.length)return Ao(n,e);let t=r.shift();if(typeof t==`string`||typeof t==`number`&&!Array.isArray(e))return typeof e==`object`?(e===null&&(e={}),{...e,[t]:i(e[t])}):{[t]:i()};if(Array.isArray(e)&&typeof t==`number`){let n=e.slice(0,t);return[...n.length?n:Array(t),i(e[t]),...e.slice(t+1)]}return[...Array(t),i()]}return i(e)}function No(e,t){let n=zo(t);function r(e){if(!e)return;if(n.length===1){let t=n[0];if(Array.isArray(e)&&typeof t==`number`)return e.filter((e,n)=>n!==t);let{[t]:r,...i}=e;return i}let t=n.shift();if((typeof t==`string`||typeof t==`number`&&!Array.isArray(e))&&typeof e==`object`)return{...e,[t]:r(e[t])};if(typeof t==`number`&&Array.isArray(e)){if(t>=e.length)return e;let n=e.slice(0,t);return[...n.length?n:Array(t),r(e[t]),...e.slice(t+1)]}throw Error(`It seems we have created an infinite loop in deleteBy. `)}return r(e)}var Po=46,Fo=91,Io=93,Lo=48,Ro=57;function zo(e){if(Array.isArray(e))return[...e];if(typeof e!=`string`)throw Error(`Path must be a string.`);let t=e.length,n=[],r=+(t>0&&e.charCodeAt(0)===Fo),i=!0,a=-1;for(let o=r;o<=t;o++){let s=o<t?e.charCodeAt(o):-1;if(o===t||s===Po||s===Fo||s===Io){let t=o-r;if(t>0){let a=i&&(t===1||e.charCodeAt(r)!==Lo),s=e.slice(r,o);if(a){let e=parseInt(s,10);t<=15||String(e)===s?n.push(e):n.push(s)}else n.push(s)}else a!==Io&&(a!==-1||s!==Io)&&(a!==s||s!==Po&&s!==Fo)&&n.push(``);r=o+1,i=!0}else(s<Lo||s>Ro)&&(i=!1);a=s}return n.length||n.push(``),n}function Bo(e){return!(Array.isArray(e)&&e.length===0)}function Vo(e,t){return t.validationLogic({form:t.form,group:t.group,validators:t.validators,event:{type:e,fieldName:t.fieldName,async:!1},runValidation:e=>e.validators.filter(Boolean).map(e=>({cause:e.cause,validate:e.fn}))})}function Ho(e,t){let{asyncDebounceMs:n}=t,{onBlurAsyncDebounceMs:r,onChangeAsyncDebounceMs:i,onDynamicAsyncDebounceMs:a}=t.validators||{},o=n??0;return t.validationLogic({form:t.form,group:t.group,validators:t.validators,event:{type:e,fieldName:t.fieldName,async:!0},runValidation:t=>t.validators.filter(Boolean).map(t=>{let n=t?.cause||e,s=o;switch(n){case`change`:s=i??o;break;case`blur`:s=r??o;break;case`dynamic`:s=a??o;break;case`submit`:s=0}return e===`submit`&&(s=0),{cause:n,validate:t.fn,debounceMs:s}})})}var Uo=e=>!!e&&typeof e==`object`&&`fields`in e;function Wo(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!t.has(n)||!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length||n.length===0&&!Array.isArray(e)&&!Array.isArray(t)&&(Object.getPrototypeOf(e)!==Object.prototype||Object.getPrototypeOf(t)!==Object.prototype))return!1;for(let i of n)if(!r.includes(i)||!Wo(e[i],t[i]))return!1;return!0}var Go=({newFormValidatorError:e,isPreviousErrorFromFormValidator:t,previousErrorValue:n})=>e?{newErrorValue:e,newSource:`form`}:t?{newErrorValue:void 0,newSource:void 0}:n?{newErrorValue:n,newSource:`field`}:{newErrorValue:void 0,newSource:void 0},Ko=({formLevelError:e,fieldLevelError:t})=>t?{newErrorValue:t,newSource:`field`}:e?{newErrorValue:e,newSource:`form`}:{newErrorValue:void 0,newSource:void 0};function Q(e,t){return e==null?t:{...e,...t}}for(var qo=256,Jo=[],Yo;qo--;)Jo[qo]=(qo+256).toString(16).substring(1);function Xo(){let e=0,t,n=``;if(!Yo||qo+16>256){for(Yo=Array(256),e=256;e--;)Yo[e]=256*Math.random()|0;e=0,qo=0}for(;e<16;e++)t=Yo[qo+e],n+=e===6?Jo[t&15|64]:e===8?Jo[t&63|128]:Jo[t],e&1&&e>1&&e<11&&(n+=`-`);return qo++,n}var Zo=Oo(e=>Z.emit(`form-state`,{id:e.formId,state:e.store.state}),{wait:300});function Qo(e){if(typeof e!=`object`||!e)return e;if(e instanceof Date)return new Date(e.getTime());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++)t[n]=Qo(e[n]);return t}if(e instanceof Map){let t=new Map;return e.forEach((e,n)=>{t.set(n,Qo(e))}),t}if(e instanceof Set){let t=new Set;return e.forEach(e=>{t.add(Qo(e))}),t}let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=Qo(e[n]));return t}function $o(e,t){return t===e||t.startsWith(`${e}.`)||t.startsWith(`${e}[`)}var es=e=>{if(!e.validators)return e.runValidation({validators:[],form:e.form});let t=e.event.async,n=t?void 0:{fn:e.validators.onMount,cause:`mount`},r={fn:t?e.validators.onChangeAsync:e.validators.onChange,cause:`change`},i={fn:t?e.validators.onBlurAsync:e.validators.onBlur,cause:`blur`},a={fn:t?e.validators.onSubmitAsync:e.validators.onSubmit,cause:`submit`},o=t?void 0:{fn:()=>void 0,cause:`server`};switch(e.event.type){case`mount`:return e.runValidation({validators:[n],form:e.form});case`submit`:return e.runValidation({validators:[r,i,a,o],form:e.form});case`server`:return e.runValidation({validators:[],form:e.form});case`blur`:return e.runValidation({validators:[i,o],form:e.form});case`change`:return e.runValidation({validators:[r,o],form:e.form});default:throw Error(`Unknown validation event type: ${e.event.type}`)}};function ts(e,t){let n=new Map;for(let r of e){let e=r.path??[],i=t,a=``;for(let t=0;t<e.length;t++){let n=e[t];if(n===void 0)continue;let r=typeof n==`object`?n.key:n,o=Number(r);a+=Array.isArray(i)&&!Number.isNaN(o)?`[${o}]`:(t>0?`.`:``)+String(r),i=typeof i==`object`&&i?i[r]:void 0}n.set(a,(n.get(a)??[]).concat(r))}return Object.fromEntries(n)}var ns=(e,t)=>{let n=ts(e,t);return{form:n,fields:n}},rs={validate({value:e,validationSource:t},n){let r=n[`~standard`].validate(e);if(r instanceof Promise)throw Error(`async function passed to sync validator`);if(r.issues)return t===`field`?r.issues:ns(r.issues,e)},async validateAsync({value:e,validationSource:t},n){let r=await n[`~standard`].validate(e);if(r.issues)return t===`field`?r.issues:ns(r.issues,e)}},is=e=>!!e&&`~standard`in e,$={isValidating:!1,isTouched:!1,isBlurred:!1,isDirty:!1,isPristine:!0,isValid:!0,isDefaultValue:!0,errors:[],errorMap:{},errorSourceMap:{},_arrayVersion:0,_pendingValidationsCount:0};function as(e){function t(t){let n=e.getFieldMeta(t)??$;e.setFieldMeta(t,{...n,_arrayVersion:(n._arrayVersion||0)+1})}function n(n,r,i){t(n);let a=s(n,r,`move`,i),c=Math.min(r,i),u=Math.max(r,i);for(let e=c;e<=u;e++)a.push(o(n,e));let d=Object.keys(e.fieldInfo).reduce((t,i)=>(i.startsWith(o(n,r))&&t.set(i,e.getFieldMeta(i)),t),new Map);l(a,r<i?`up`:`down`),Object.keys(e.fieldInfo).filter(e=>e.startsWith(o(n,i))).forEach(t=>{let a=t.replace(o(n,i),o(n,r)),s=d.get(a);s&&e.setFieldMeta(t,s)})}function r(e,n){t(e),l(s(e,n,`remove`),`up`)}function i(n,r,i){t(n),s(n,r,`swap`,i).forEach(t=>{if(!t.toString().startsWith(o(n,r)))return;let a=t.toString().replace(o(n,r),o(n,i)),[s,c]=[e.getFieldMeta(t),e.getFieldMeta(a)];s&&e.setFieldMeta(a,s),c&&e.setFieldMeta(t,c)})}function a(n,r){t(n);let i=s(n,r,`insert`);l(i,`down`),i.forEach(t=>{t.toString().startsWith(o(n,r))&&e.setFieldMeta(t,u())})}function o(e,t){return`${e}[${t}]`}function s(t,n,r,i){let a=[o(t,n)];switch(r){case`swap`:a.push(o(t,i));break;case`move`:{let[e,r]=[Math.min(n,i),Math.max(n,i)];for(let n=e;n<=r;n++)a.push(o(t,n));break}default:{let r=e.getFieldValue(t),i=Array.isArray(r)?r.length:0;for(let e=n+1;e<i;e++)a.push(o(t,e));break}}return Object.keys(e.fieldInfo).filter(e=>a.some(t=>e.startsWith(t)))}function c(e,t){return e.replace(/\[(\d+)\]/,(e,n)=>{let r=parseInt(n,10);return`[${t===`up`?r+1:Math.max(0,r-1)}]`})}function l(t,n){(n===`up`?t:[...t].reverse()).forEach(t=>{let r=c(t.toString(),n),i=e.getFieldMeta(r);i?e.setFieldMeta(t,i):e.setFieldMeta(t,u())})}let u=()=>$;return{bumpArrayVersion:t,handleArrayMove:n,handleArrayRemove:r,handleArraySwap:i,handleArrayInsert:a}}function os(e){return{values:e.values??{},errorMap:e.errorMap??{},fieldMetaBase:e.fieldMetaBase??{},formGroupStateBase:e.formGroupStateBase??{},isSubmitted:e.isSubmitted??!1,isSubmitting:e.isSubmitting??!1,isValidating:e.isValidating??!1,submissionAttempts:e.submissionAttempts??0,isSubmitSuccessful:e.isSubmitSuccessful??!1,validationMetaMap:e.validationMetaMap??{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}}}var ss=class{constructor(e){this.options={},this.fieldInfo={},this.formGroupApis=new Set,this.mount=()=>{let e=this.store.subscribe(()=>{Zo(this)}),t=Z.on(`request-form-state`,e=>{e.payload.id===this._formId&&Z.emit(`form-api`,{id:this._formId,state:this.store.state,options:this.options})}),n=Z.on(`request-form-reset`,e=>{e.payload.id===this._formId&&this.reset()}),r=Z.on(`request-form-force-submit`,e=>{e.payload.id===this._formId&&(this._devtoolsSubmissionOverride=!0,this.handleSubmit(),this._devtoolsSubmissionOverride=!1)}),i=()=>{r(),n(),t(),e.unsubscribe(),Z.emit(`form-unmounted`,{id:this._formId})};this.options.listeners?.onMount?.({formApi:this});let{onMount:a}=this.options.validators||{};return Z.emit(`form-api`,{id:this._formId,state:this.store.state,options:this.options}),a&&this.validateSync(`mount`),i},this.update=e=>{if(!e)return;let t=this.options;this.options=e;let n=e.defaultValues&&!Wo(e.defaultValues,t.defaultValues)&&!this.state.isTouched,r=!Wo(e.defaultState,t.defaultState)&&!this.state.isTouched;if(n||r){if(G(()=>{this.baseStore.setState(()=>os(Object.assign({},this.state,r?e.defaultState:{},n?{values:e.defaultValues}:{})))}),n){let e=as(this);for(let t of Object.keys(this.fieldInfo))Array.isArray(this.getFieldValue(t))&&e.bumpArrayVersion(t)}Z.emit(`form-api`,{id:this._formId,state:this.store.state,options:this.options})}},this.reset=(e,t)=>{let{fieldMeta:n}=this.state,r=this.resetFieldMeta(n);e&&!t?.keepDefaultValues&&(this.options={...this.options,defaultValues:e}),this.baseStore.setState(()=>{let t=e??this.options.defaultValues??this.options.defaultState?.values;return e||Object.values(this.fieldInfo).forEach(e=>{e.instance&&e.instance.options.defaultValue!==void 0&&(t=Mo(t,e.instance.name,e.instance.options.defaultValue))}),os({...this.options.defaultState,values:t,fieldMetaBase:r})})},this.validateAllFields=async e=>{let t=[];return G(()=>{Object.values(this.fieldInfo).forEach(n=>{if(!n.instance)return;let r=n.instance;t.push(Promise.resolve().then(()=>r.validate(e,{skipFormValidation:!0,skipGroupValidation:!0}))),n.instance.store.state.meta.isTouched||n.instance.setMeta(e=>({...e,isTouched:!0}))})}),(await Promise.all(t)).flat()},this.validateArrayFieldsStartingFrom=async(e,t,n)=>{let r=this.getFieldValue(e),i=Array.isArray(r)?Math.max(r.length-1,0):null,a=[`${e}[${t}]`];for(let n=t+1;n<=(i??0);n++)a.push(`${e}[${n}]`);let o=Object.keys(this.fieldInfo).filter(e=>a.some(t=>e.startsWith(t))),s=[];return G(()=>{o.forEach(e=>{s.push(Promise.resolve().then(()=>this.validateField(e,n)))})}),(await Promise.all(s)).flat()},this.validateField=(e,t)=>{let n=this.fieldInfo[e]?.instance;if(!n){let{hasErrored:n}=this.validateSync(t);return n&&!this.options.asyncAlways?this.getFieldMeta(e)?.errors??[]:this.validateAsync(t).then(()=>this.getFieldMeta(e)?.errors??[])}return n.store.state.meta.isTouched||n.setMeta(e=>({...e,isTouched:!0})),n.validate(t)},this.validateSync=(e,t)=>{let n=Vo(e,{...this.options,form:this,group:t?.group,validationLogic:this.options.validationLogic||es}),r=!1,i={};return G(()=>{for(let e of n){if(!e.validate)continue;let{formError:n,fieldErrors:a}=cs(this.runValidator({validate:e.validate,value:{value:this.state.values,formApi:this,validationSource:`form`},type:`validate`})),o=ls(e.cause),s=new Set([...Object.keys(this.state.fieldMeta),...Object.keys(a||{})]);t?.filterFieldNames&&(s=new Set([...s].filter(t.filterFieldNames)));for(let e of s){if(this.baseStore.state.fieldMetaBase[e]===void 0&&!a?.[e])continue;let{errorMap:t,errorSourceMap:n}=this.getFieldMeta(e)??$,r=a?.[e],{newErrorValue:s,newSource:c}=Go({newFormValidatorError:r,isPreviousErrorFromFormValidator:n?.[o]===`form`,previousErrorValue:t?.[o]});c===`form`&&(i[e]={...i[e],[o]:r}),t?.[o]!==s&&this.setFieldMeta(e,(e=$)=>({...e,errorMap:{...e.errorMap,[o]:s},errorSourceMap:{...e.errorSourceMap,[o]:c}}))}t?.dontUpdateFormErrorMap||this.state.errorMap?.[o]!==n&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[o]:n}})),(n||a)&&(r=!0)}if(t?.dontUpdateFormErrorMap)return;let a=ls(`submit`);this.state.errorMap?.[a]&&e!==`submit`&&!r&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[a]:void 0}}));let o=ls(`server`);this.state.errorMap?.[o]&&e!==`server`&&!r&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[o]:void 0}}))}),{hasErrored:r,fieldsErrorMap:i}},this.validateAsync=async(e,t)=>{let n=Ho(e,{...this.options,form:this,group:t?.group,validationLogic:this.options.validationLogic||es});this.state.isFormValidating||this.baseStore.setState(e=>({...e,isFormValidating:!0}));let r=[],i;for(let e of n){if(!e.validate)continue;let n=ls(e.cause);this.state.validationMetaMap[n]?.lastAbortController.abort();let a=new AbortController;this.state.validationMetaMap[n]={lastAbortController:a},r.push(new Promise(async n=>{let r;try{r=await new Promise((t,n)=>{setTimeout(async()=>{if(a.signal.aborted)return t(void 0);try{t(await this.runValidator({validate:e.validate,value:{value:this.state.values,formApi:this,validationSource:`form`,signal:a.signal},type:`validateAsync`}))}catch(e){n(e)}},e.debounceMs)})}catch(e){r=e}let{formError:o,fieldErrors:s}=cs(r);s&&(i=i?{...i,...s}:s);let c=ls(e.cause),l=new Set([...Object.keys(this.state.fieldMeta),...Object.keys(i||{})]),u=Array.from(l);t?.filterFieldNames&&(u=u.filter(t.filterFieldNames));for(let e of u){if(this.baseStore.state.fieldMetaBase[e]===void 0&&!i?.[e])continue;let{errorMap:t,errorSourceMap:n}=this.getFieldMeta(e)??$,r=i?.[e],{newErrorValue:a,newSource:o}=Go({newFormValidatorError:r,isPreviousErrorFromFormValidator:n?.[c]===`form`,previousErrorValue:t?.[c]});t?.[c]!==a&&this.setFieldMeta(e,(e=$)=>({...e,errorMap:{...e.errorMap,[c]:a},errorSourceMap:{...e.errorSourceMap,[c]:o}}))}t?.dontUpdateFormErrorMap||this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[c]:o}})),n(i?{fieldErrors:i,errorMapKey:c}:void 0)}))}let a=[],o={};if(r.length){a=await Promise.all(r);for(let e of a)if(e?.fieldErrors){let{errorMapKey:t}=e;for(let[n,r]of Object.entries(e.fieldErrors))o[n]={...o[n]||{},[t]:r}}}return this.baseStore.setState(e=>({...e,isFormValidating:!1})),o},this.validate=(e,t)=>{let{hasErrored:n,fieldsErrorMap:r}=this.validateSync(e,t);return n&&!this.options.asyncAlways?r:this.validateAsync(e,t)},this._handleSubmit=async e=>{this.baseStore.setState(e=>({...e,isSubmitted:!1,submissionAttempts:e.submissionAttempts+1,isSubmitSuccessful:!1})),G(()=>{Object.values(this.fieldInfo).forEach(e=>{e.instance&&(e.instance.store.state.meta.isTouched||e.instance.setMeta(e=>({...e,isTouched:!0})))})});let t=e??this.options.onSubmitMeta;if(!this.state.canSubmit&&!this._devtoolsSubmissionOverride&&this.baseStore.state.submissionAttempts<=1){this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t});return}this.baseStore.setState(e=>({...e,isSubmitting:!0}));let n=()=>{this.baseStore.setState(e=>({...e,isSubmitting:!1}))};if(await this.validateAllFields(`submit`),!this.state.isFieldsValid)n(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t}),Z.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:`validateAllFields`,errors:Object.values(this.state.fieldMeta).map(e=>e.errors).flat()});else if(await this.validate(`submit`),!this.state.isValid)n(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t}),Z.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:`validate`,errors:this.state.errors});else{G(()=>{Object.values(this.fieldInfo).forEach(e=>{e.instance?.triggerOnSubmitListener()})}),this.options.listeners?.onSubmit?.({formApi:this,meta:t});try{await this.options.onSubmit?.({value:this.state.values,formApi:this,meta:t}),G(()=>{this.baseStore.setState(e=>({...e,isSubmitted:!0,isSubmitSuccessful:!0})),Z.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!0}),n()})}catch(e){throw this.baseStore.setState(e=>({...e,isSubmitSuccessful:!1})),Z.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:`inflight`,onError:e}),n(),e}}},this.getFieldValue=e=>jo(this.state.values,e),this.getFieldMeta=e=>this.state.fieldMeta[e],this.getFormGroupMeta=e=>this.formGroupMetaDerived.state[e],this.getFieldInfo=e=>this.fieldInfo[e]||={instance:null,validationMetaMap:{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}},this.setFieldMeta=(e,t)=>{this.baseStore.setState(n=>({...n,fieldMetaBase:{...n.fieldMetaBase,[e]:Ao(t,n.fieldMetaBase[e])}}))},this.resetFieldMeta=e=>Object.keys(e).reduce((e,t)=>{let n=t;return e[n]=$,e},{}),this.setFieldValue=(e,t,n)=>{let r=n?.dontUpdateMeta??!1,i=n?.dontRunListeners??!1,a=n?.dontValidate??!1;G(()=>{r||this.setFieldMeta(e,e=>({...e,isTouched:!0,isDirty:!0,errorMap:{...e?.errorMap,onMount:void 0}})),this.baseStore.setState(n=>({...n,values:Mo(n.values,e,t)}))}),i||this.getFieldInfo(e).instance?.triggerOnChangeListener(),a||this.validateField(e,`change`)},this.deleteField=e=>{let t=[...Object.keys(this.fieldInfo).filter(t=>{let n=e.toString();return t.startsWith(`${n}.`)||t.startsWith(`${n}[`)}),e];this.baseStore.setState(e=>{let n={...e};return t.forEach(e=>{n.values=No(n.values,e),delete this.fieldInfo[e],delete n.fieldMetaBase[e]}),n})},this.pushFieldValue=(e,t,n)=>{this.setFieldValue(e,e=>[...Array.isArray(e)?e:[],t],n),as(this).bumpArrayVersion(e)},this.insertFieldValue=async(e,t,n,r)=>{this.setFieldValue(e,e=>[...e.slice(0,t),n,...e.slice(t)],Q(r,{dontValidate:!0}));let i=r?.dontValidate??!1;i||await this.validateField(e,`change`),as(this).handleArrayInsert(e,t),i||await this.validateArrayFieldsStartingFrom(e,t,`change`)},this.replaceFieldValue=async(e,t,n,r)=>{this.setFieldValue(e,e=>e.map((e,r)=>r===t?n:e),Q(r,{dontValidate:!0})),as(this).bumpArrayVersion(e),(r?.dontValidate??!1)||(await this.validateField(e,`change`),await this.validateArrayFieldsStartingFrom(e,t,`change`))},this.removeFieldValue=async(e,t,n)=>{let r=this.getFieldValue(e),i=Array.isArray(r)?Math.max(r.length-1,0):null;if(this.setFieldValue(e,e=>e.filter((e,n)=>n!==t),Q(n,{dontValidate:!0})),as(this).handleArrayRemove(e,t),i!==null){let t=`${e}[${i}]`;this.deleteField(t)}(n?.dontValidate??!1)||(await this.validateField(e,`change`),await this.validateArrayFieldsStartingFrom(e,t,`change`))},this.swapFieldValues=(e,t,n,r)=>{this.setFieldValue(e,e=>{let r=e[t],i=e[n];return Mo(Mo(e,`${t}`,i),`${n}`,r)},Q(r,{dontValidate:!0})),as(this).handleArraySwap(e,t,n),(r?.dontValidate??!1)||(this.validateField(e,`change`),this.validateField(`${e}[${t}]`,`change`),this.validateField(`${e}[${n}]`,`change`))},this.moveFieldValues=(e,t,n,r)=>{this.setFieldValue(e,e=>{let r=[...e];return r.splice(n,0,r.splice(t,1)[0]),r},Q(r,{dontValidate:!0})),as(this).handleArrayMove(e,t,n),(r?.dontValidate??!1)||(this.validateField(e,`change`),this.validateField(`${e}[${t}]`,`change`),this.validateField(`${e}[${n}]`,`change`))},this.clearFieldValues=(e,t)=>{let n=this.getFieldValue(e),r=Array.isArray(n)?Math.max(n.length-1,0):null;if(this.setFieldValue(e,[],Q(t,{dontValidate:!0})),as(this).bumpArrayVersion(e),r!==null)for(let t=0;t<=r;t++){let n=`${e}[${t}]`;this.deleteField(n)}(t?.dontValidate??!1)||this.validateField(e,`change`)},this.resetField=e=>{this.baseStore.setState(t=>{let n=this.getFieldInfo(e).instance?.options.defaultValue,r=jo(this.options.defaultValues,e),i=n??r;return{...t,fieldMetaBase:{...t.fieldMetaBase,[e]:$},values:i===void 0?t.values:Mo(t.values,e,i)}})},this.setErrorMap=e=>{G(()=>{Object.entries(e).forEach(([e,t])=>{let n=e;if(Uo(t)){let{formError:e,fieldErrors:r}=cs(t);for(let e of Object.keys(this.fieldInfo))this.getFieldMeta(e)&&this.setFieldMeta(e,t=>({...t,errorMap:{...t.errorMap,[n]:r?.[e]},errorSourceMap:{...t.errorSourceMap,[n]:`form`}}));this.baseStore.setState(t=>({...t,errorMap:{...t.errorMap,[n]:e}}))}else this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[n]:t}}))})})},this.getAllErrors=()=>({form:{errors:this.state.errors,errorMap:this.state.errorMap},fields:Object.entries(this.state.fieldMeta).reduce((e,[t,n])=>(Object.keys(n).length&&n.errors.length&&(e[t]={errors:n.errors,errorMap:n.errorMap}),e),{})}),this.parseValuesWithSchema=e=>rs.validate({value:this.state.values,validationSource:`form`},e),this.parseValuesWithSchemaAsync=e=>rs.validateAsync({value:this.state.values,validationSource:`form`},e),this.timeoutIds={validations:{},listeners:{},formListeners:{}},this._formId=e?.formId??Xo(),this._devtoolsSubmissionOverride=!1;let t=os({...e?.defaultState,values:e?.defaultValues??e?.defaultState?.values});if(e?.transform){t=e.transform({state:t}).state;for(let e of Object.keys(t.errorMap)){let n=t.errorMap[e];if(n!==void 0&&Uo(n))for(let r of Object.keys(n.fields)){let i=n.fields[r];if(i===void 0)continue;let a=t.fieldMetaBase[r];t.fieldMetaBase[r]={isTouched:!1,isValidating:!1,isBlurred:!1,isDirty:!1,_arrayVersion:0,_pendingValidationsCount:0,...a??{},errorSourceMap:{...a?.errorSourceMap??{},onChange:`form`},errorMap:{...a?.errorMap??{},[e]:i}}}}}this.baseStore=ur(t);let n;this.fieldMetaDerived=ur(e=>{let t=this.baseStore.get(),r=0,i={};for(let a of Object.keys(t.fieldMetaBase)){let o=t.fieldMetaBase[a],s=n?.fieldMetaBase[a],c=e?.[a],l=jo(t.values,a),u=c?.errors;if(!s||o.errorMap!==s.errorMap){u=Object.values(o.errorMap??{}).filter(e=>e!==void 0);let e=this.getFieldInfo(a)?.instance;e&&e.options.disableErrorFlat||(u=u.flat(1))}let d=!Bo(u),f=!o.isDirty,p=Wo(l,this.getFieldInfo(a)?.instance?.options.defaultValue??jo(this.options.defaultValues,a));c&&c.isPristine===f&&c.isValid===d&&c.isDefaultValue===p&&c.errors===u&&o===s?(i[a]=c,r++):i[a]={...o,errors:u??[],isPristine:f,isValid:d,isDefaultValue:p}}return Object.keys(t.fieldMetaBase).length?e&&r===Object.keys(t.fieldMetaBase).length?e:(n=this.baseStore.get(),i):i}),this.formGroupMetaDerived=ur(e=>{let t=this.baseStore.get(),n=this.fieldMetaDerived.get(),r={};for(let i of this.formGroupApis){let a=i.name,o=t.formGroupStateBase[a]??{isSubmitted:!1,isSubmitting:!1,isValidating:!1,submissionAttempts:0,isSubmitSuccessful:!1},s=n[a],c=!1,l=!0,u=!1,d=!1,f=!0,p=!1;for(let e in n){if(e===a||!$o(a,e))continue;let t=n[e];t&&(t.isValidating&&(c=!0),t.isValid||(l=!1),t.isTouched&&(u=!0),t.isBlurred&&(d=!0),t.isDefaultValue||(f=!1),t.isDirty&&(p=!0))}let m=!p,h=!!c||o.isValidating,g=s?.errorMap??{},_=s?.errorSourceMap??{},v=!!(g.onMount||Object.entries(n).some(([e,t])=>t&&e!==a&&$o(a,e)&&t.errorMap.onMount)),y=e?.[a],b=y?.errors??[];y&&y.__srcErrorMap===g||(b=Object.values(g).reduce((e,t)=>{if(t===void 0)return e;if(t&&typeof t==`object`&&`fields`in t){let n=t.group;return n!==void 0&&e.push(n),e}return e.push(t),e},[]));let x=b.length===0,S=l&&x,C=i.options.canSubmitWhenInvalid??!1,w=o.submissionAttempts===0&&!u&&!v||!h&&!o.isSubmitting&&S||C;if(y&&y.errorMap===g&&y.errorSourceMap===_&&y.errors===b&&y.isFieldsValidating===c&&y.isFieldsValid===l&&y.isGroupValid===x&&y.isValid===S&&y.canSubmit===w&&y.isTouched===u&&y.isBlurred===d&&y.isPristine===m&&y.isDefaultValue===f&&y.isDirty===p&&y.isValidating===h&&y.isSubmitting===o.isSubmitting&&y.isSubmitted===o.isSubmitted&&y.submissionAttempts===o.submissionAttempts&&y.isSubmitSuccessful===o.isSubmitSuccessful){r[a]=y;continue}let T={...o,errorMap:g,errorSourceMap:_,_arrayVersion:s?._arrayVersion??0,isTouched:u,isBlurred:d,isDirty:p,isPristine:m,isDefaultValue:f,isValid:S,errors:b,isValidating:h,isFieldsValidating:c,isFieldsValid:l,isGroupValid:x,canSubmit:w};Object.defineProperty(T,"__srcErrorMap",{value:g,enumerable:!1,configurable:!0}),r[a]=T}return r});let r;this.store=ur(e=>{let t=this.baseStore.get(),n=this.fieldMetaDerived.get(),i=Object.values(n).filter(Boolean),a=i.some(e=>e.isValidating),o=i.every(e=>e.isValid),s=i.some(e=>e.isTouched),c=i.some(e=>e.isBlurred),l=i.every(e=>e.isDefaultValue),u=s&&t.errorMap?.onMount,d=i.some(e=>e.isDirty),f=!d,p=!!(t.errorMap?.onMount||i.some(e=>e?.errorMap?.onMount)),m=!!a,h=e?.errors??[];r&&t.errorMap===r.errorMap||(h=Object.values(t.errorMap).reduce((e,t)=>t===void 0?e:t&&Uo(t)?(e.push(t.form),e):(e.push(t),e),[]));let g=h.length===0,_=o&&g,v=this.options.canSubmitWhenInvalid??!1,y=t.submissionAttempts===0&&!s&&!p||!m&&!t.isSubmitting&&_||v,b=t.errorMap;if(u&&(h=h.filter(e=>e!==t.errorMap.onMount),b=Object.assign(b,{onMount:void 0})),e&&r&&e.errorMap===b&&e.fieldMeta===this.fieldMetaDerived.state&&e.errors===h&&e.isFieldsValidating===a&&e.isFieldsValid===o&&e.isFormValid===g&&e.isValid===_&&e.canSubmit===y&&e.isTouched===s&&e.isBlurred===c&&e.isPristine===f&&e.isDefaultValue===l&&e.isDirty===d&&Wo(r,t))return e;let x={...t,errorMap:b,fieldMeta:this.fieldMetaDerived.state,errors:h,isFieldsValidating:a,isFieldsValid:o,isFormValid:g,isValid:_,canSubmit:y,isTouched:s,isBlurred:c,isPristine:f,isDefaultValue:l,isDirty:d};return r=this.baseStore.get(),x}),this.handleSubmit=this.handleSubmit.bind(this),this.update(e||{})}get state(){return this.store.state}get formId(){return this._formId}runValidator(e){return is(e.validate)?rs[e.type](e.value,e.validate):e.validate(e.value)}handleSubmit(e){return this._handleSubmit(e)}};function cs(e){return e?Uo(e)?{formError:cs(e.form).formError,fieldErrors:e.fields}:{formError:e}:{formError:void 0}}function ls(e){switch(e){case`submit`:return`onSubmit`;case`blur`:return`onBlur`;case`mount`:return`onMount`;case`server`:return`onServer`;case`dynamic`:return`onDynamic`;default:return`onChange`}}var us=class e{constructor(t){this.options={},this.mount=()=>{this.options.defaultValue!==void 0&&!this.getMeta().isTouched&&this.form.setFieldValue(this.name,this.options.defaultValue,{dontUpdateMeta:!0});let e=this.getInfo();e.instance=this,this.update(this.options);let{onMount:t}=this.options.validators||{};if(t){let e=this.runValidator({validate:t,value:{value:this.state.value,fieldApi:this,validationSource:`field`},type:`validate`});e&&this.setMeta(t=>({...t,errorMap:{...t?.errorMap,onMount:e},errorSourceMap:{...t?.errorSourceMap,onMount:`field`}}))}return this.options.listeners?.onMount?.({value:this.state.value,fieldApi:this}),()=>{for(let[e,t]of Object.entries(this.timeoutIds.validations))t&&(clearTimeout(t),this.timeoutIds.validations[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.listeners))t&&(clearTimeout(t),this.timeoutIds.listeners[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.formListeners))t&&(clearTimeout(t),this.timeoutIds.formListeners[e]=null);let e=this.form.fieldInfo[this.name];if(e&&e.instance===this){for(let[t,n]of Object.entries(e.validationMetaMap))n?.lastAbortController.abort(),e.validationMetaMap[t]=void 0;this.form.baseStore.setState(e=>({...e,fieldMetaBase:{...e.fieldMetaBase,[this.name]:{...$,isTouched:e.fieldMetaBase[this.name]?.isTouched??$.isTouched,isBlurred:e.fieldMetaBase[this.name]?.isBlurred??$.isBlurred,isDirty:e.fieldMetaBase[this.name]?.isDirty??$.isDirty}}})),e.instance=null,this.options.listeners?.onUnmount?.({value:this.state.value,fieldApi:this}),this.form.options.listeners?.onFieldUnmount?.({formApi:this.form,fieldApi:this})}}},this.update=e=>{this.options=e,this.name=e.name,this.state.meta.isTouched||this.options.defaultValue===void 0||Wo(this.form.getFieldValue(this.name),e.defaultValue)||this.form.setFieldValue(this.name,e.defaultValue,{dontUpdateMeta:!0,dontValidate:!0,dontRunListeners:!0}),this.form.getFieldMeta(this.name)||this.form.setFieldMeta(this.name,this.state.meta)},this.getValue=()=>this.form.getFieldValue(this.name),this.setValue=(e,t)=>{this.form.setFieldValue(this.name,e,Q(t,{dontRunListeners:!0,dontValidate:!0})),t?.dontRunListeners||this.triggerOnChangeListener(),t?.dontValidate||this.validate(`change`)},this.getMeta=()=>this.store.state.meta,this.setMeta=e=>this.form.setFieldMeta(this.name,e),this.getInfo=()=>this.form.getFieldInfo(this.name),this.pushValue=(e,t)=>{this.form.pushFieldValue(this.name,e,Q(t,{dontRunListeners:!0})),t?.dontRunListeners||this.triggerOnChangeListener()},this.insertValue=(e,t,n)=>{this.form.insertFieldValue(this.name,e,t,Q(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.replaceValue=(e,t,n)=>{this.form.replaceFieldValue(this.name,e,t,Q(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.removeValue=(e,t)=>{this.form.removeFieldValue(this.name,e,Q(t,{dontRunListeners:!0})),t?.dontRunListeners||this.triggerOnChangeListener()},this.swapValues=(e,t,n)=>{this.form.swapFieldValues(this.name,e,t,Q(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.moveValue=(e,t,n)=>{this.form.moveFieldValues(this.name,e,t,Q(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.clearValues=e=>{this.form.clearFieldValues(this.name,Q(e,{dontRunListeners:!0})),e?.dontRunListeners||this.triggerOnChangeListener()},this.getLinkedFields=t=>{let n=Object.values(this.form.fieldInfo),r=[];for(let i of n){if(!i.instance||!(i.instance instanceof e))continue;let{onChangeListenTo:n,onBlurListenTo:a}=i.instance.options.validators||{};t===`change`&&n?.includes(this.name)&&r.push(i.instance),t===`blur`&&a?.includes(this.name)&&r.push(i.instance)}return r},this.validateSync=(e,t)=>{let n=Vo(e,{...this.options,form:this.form,fieldName:this.name,validationLogic:this.form.options.validationLogic||es}),r=this.getLinkedFields(e).reduce((t,n)=>{let r=Vo(e,{...n.options,form:n.form,fieldName:n.name,validationLogic:n.form.options.validationLogic||es});return r.forEach(e=>{e.field=n}),t.concat(r)},[]),i=!1;G(()=>{let e=(e,n)=>{let r=fs(n.cause),a=n.validate?ds(e.runValidator({validate:n.validate,value:{value:e.store.state.value,validationSource:`field`,fieldApi:e},type:`validate`})):void 0,o=t[r],{newErrorValue:s,newSource:c}=Ko({formLevelError:o,fieldLevelError:a});e.state.meta.errorMap?.[r]!==s&&e.setMeta(e=>({...e,errorMap:{...e.errorMap,[r]:s},errorSourceMap:{...e.errorSourceMap,[r]:c}})),s&&(i=!0)};for(let t of n)e(this,t);for(let t of r)t.validate&&e(t.field,t)});let a=fs(`submit`);return this.state.meta.errorMap?.[a]&&e!==`submit`&&!i&&this.setMeta(e=>({...e,errorMap:{...e.errorMap,[a]:void 0},errorSourceMap:{...e.errorSourceMap,[a]:void 0}})),{hasErrored:i}},this.validateAsync=async(e,t)=>{let n=Ho(e,{...this.options,form:this.form,fieldName:this.name,validationLogic:this.form.options.validationLogic||es}),r=await t,i=this.getLinkedFields(e).reduce((t,n)=>{let r=Ho(e,{...n.options,form:n.form,fieldName:n.name,validationLogic:n.form.options.validationLogic||es});return r.forEach(e=>{e.field=n}),t.concat(r)},[]),a=[],o=[],s=n.some(e=>e.validate),c=Array.from(new Set(i.filter(e=>e.validate).map(e=>e.field)));G(()=>{s&&this.startValidation();for(let e of c)e.startValidation()});let l=(e,t,n)=>{let i=fs(t.cause),a=e.getInfo();a.validationMetaMap[i]?.lastAbortController.abort();let o=new AbortController;a.validationMetaMap[i]={lastAbortController:o},n.push(new Promise(async n=>{let a;try{a=await new Promise((n,r)=>{e.timeoutIds.validations[t.cause]&&(clearTimeout(e.timeoutIds.validations[t.cause]),e.endValidation()),e.timeoutIds.validations[t.cause]=setTimeout(async()=>{if(o.signal.aborted)return n(void 0);try{n(await this.runValidator({validate:t.validate,value:{value:e.store.state.value,fieldApi:e,signal:o.signal,validationSource:`field`},type:`validateAsync`}))}catch(e){r(e)}},t.debounceMs)})}catch(e){a=e}if(o.signal.aborted)return n(void 0);let s=ds(a),c=r[e.name]?.[i],{newErrorValue:l,newSource:u}=Ko({formLevelError:c,fieldLevelError:s});if(e.getInfo().instance!==e)return n(void 0);e.setMeta(e=>({...e,errorMap:{...e?.errorMap,[i]:l},errorSourceMap:{...e.errorSourceMap,[i]:u}})),n(l)}))};for(let e of n)e.validate&&l(this,e,a);for(let e of i)e.validate&&l(e.field,e,o);let u=[];return(a.length||o.length)&&(u=await Promise.all(a),await Promise.all(o)),G(()=>{s&&this.endValidation();for(let e of c)e.endValidation()}),u.filter(Boolean)},this.validate=(e,t)=>{if(!this.state.meta.isTouched)return[];let n=t?.skipGroupValidation?[]:Array.from(this.form.formGroupApis).filter(e=>this.name.startsWith(e.name)),r=(t?.skipFormValidation?{fieldsErrorMap:{}}:this.form.validateSync(e)).fieldsErrorMap[this.name]??{};if(!t?.skipFormValidation)for(let t of n){if(t.state.meta.submissionAttempts===0)continue;let{fieldsErrorMap:n}=this.form.validateSync(e,{group:t,dontUpdateFormErrorMap:!0,filterFieldNames:e=>$o(t.name,e)});r={...r,...n[this.name]??{}}}let{hasErrored:i}=this.validateSync(e,r),a=new WeakMap;for(let t of n){let{hasErrored:n}=t.validateSync(e,{},{skipRelatedFieldValidation:!0});a.set(t,n)}if(i&&!this.options.asyncAlways){this.getInfo().validationMetaMap[fs(e)]?.lastAbortController.abort();let t=[];for(let r of n)r.getInfo().validationMetaMap[fs(e)]?.lastAbortController.abort(),t.push(r.state.meta.errors);return[...this.state.meta.errors,...t.flat()]}let o=t?.skipFormValidation?Promise.resolve({}):this.form.validateAsync(e),s=this.validateAsync(e,o),c=[];for(let t of n)(!a.get(t)||t.options.asyncAlways)&&c.push(t.validateAsync(e,o,{skipRelatedFieldValidation:!0}));return c.length===0?s:Promise.all([s,...c]).then(e=>e.flat())},this.handleChange=e=>{this.setValue(e)},this.handleBlur=()=>{this.state.meta.isTouched||this.setMeta(e=>({...e,isTouched:!0})),this.state.meta.isBlurred||this.setMeta(e=>({...e,isBlurred:!0})),this.validate(`blur`),this.triggerOnBlurListener()},this.setErrorMap=e=>{this.setMeta(t=>({...t,errorMap:{...t.errorMap,...e}}))},this.parseValueWithSchema=e=>rs.validate({value:this.state.value,validationSource:`field`},e),this.parseValueWithSchemaAsync=e=>rs.validateAsync({value:this.state.value,validationSource:`field`},e),this.triggerOnBlurListener=()=>{let e=this.form.options.listeners?.onBlurDebounceMs;e&&e>0?(this.timeoutIds.formListeners.blur&&clearTimeout(this.timeoutIds.formListeners.blur),this.timeoutIds.formListeners.blur=setTimeout(()=>{this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this})},e)):this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this});let t=this.options.listeners?.onBlurDebounceMs;t&&t>0?(this.timeoutIds.listeners.blur&&clearTimeout(this.timeoutIds.listeners.blur),this.timeoutIds.listeners.blur=setTimeout(()=>{this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})},t)):this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})},this.triggerOnChangeListener=()=>{let e=this.form.options.listeners?.onChangeDebounceMs;e&&e>0?(this.timeoutIds.formListeners.change&&clearTimeout(this.timeoutIds.formListeners.change),this.timeoutIds.formListeners.change=setTimeout(()=>{this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this})},e)):this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this});let t=this.options.listeners?.onChangeDebounceMs;t&&t>0?(this.timeoutIds.listeners.change&&clearTimeout(this.timeoutIds.listeners.change),this.timeoutIds.listeners.change=setTimeout(()=>{this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this})},t)):this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this});for(let e of this.form.formGroupApis)$o(e.name,this.name)&&e.triggerOnChangeListener()},this.triggerOnSubmitListener=()=>{this.options.listeners?.onSubmit?.({value:this.state.value,fieldApi:this})},this.form=t.form,this.name=t.name,this.options=t,this.timeoutIds={validations:{},listeners:{},formListeners:{}},this.store=ur(e=>{this.form.store.get();let n=this.form.getFieldMeta(this.name)??{...$,...t.defaultMeta},r=this.form.getFieldValue(this.name);return!n.isTouched&&r===void 0&&this.options.defaultValue!==void 0&&!Wo(r,this.options.defaultValue)&&(r=this.options.defaultValue),e&&e.value===r&&e.meta===n?e:{value:r,meta:n}})}get state(){return this.store.state}runValidator(e){return is(e.validate)?rs[e.type](e.value,e.validate):e.validate(e.value)}startValidation(){this.setMeta(e=>{let t=e._pendingValidationsCount+1;return{...e,_pendingValidationsCount:t,isValidating:t>0&&!e.isValidating||e.isValidating}})}endValidation(){this.setMeta(e=>{let t=Math.max(0,e._pendingValidationsCount-1);return{...e,_pendingValidationsCount:t,isValidating:t===0&&e.isValidating?!1:e.isValidating}})}};function ds(e){if(e)return e}function fs(e){switch(e){case`submit`:return`onSubmit`;case`blur`:return`onBlur`;case`mount`:return`onMount`;case`server`:return`onServer`;case`dynamic`:return`onDynamic`;default:return`onChange`}}function ps(e){return{isSubmitted:e.isSubmitted??!1,isSubmitting:e.isSubmitting??!1,isValidating:e.isValidating??!1,submissionAttempts:e.submissionAttempts??0,isSubmitSuccessful:e.isSubmitSuccessful??!1}}function ms(e){return{...$,...e,errors:[],isPristine:!0,isValid:!0,isDefaultValue:!0,isFieldsValidating:!1,isFieldsValid:!0,isGroupValid:!0,canSubmit:!0,isSubmitting:!1,isSubmitted:!1,isValidating:!1,submissionAttempts:0,isSubmitSuccessful:!1}}var hs=class e{constructor(t){this.options={},this.setFormGroupState=e=>{this.form.baseStore.setState(t=>{let n=t.formGroupStateBase[this.name]??ps({});return{...t,formGroupStateBase:{...t.formGroupStateBase,[this.name]:e(n)}}})},this._lastDistributedFieldNames={},this.update=e=>{this.options=e,this.name=e.name,this.state.meta.isTouched||this.options.defaultValue===void 0||Wo(this.form.getFieldValue(this.name),e.defaultValue)||this.form.setFieldValue(this.name,e.defaultValue,{dontUpdateMeta:!0,dontValidate:!0,dontRunListeners:!0}),this.form.getFieldMeta(this.name)||this.form.setFieldMeta(this.name,{...$,...this.options.defaultMeta})},this.mount=()=>{this.update(this.options),this.form.formGroupApis.add(this),this.fieldInfo.instance=this,this.form.baseStore.setState(e=>({...e,formGroupStateBase:{...e.formGroupStateBase,[this.name]:e.formGroupStateBase[this.name]??ps({...this.options.defaultState})}}));let{onMount:e}=this.options.validators||{};if(e){let t=this.runValidator({validate:e,value:{value:this.state.value,groupApi:this,validationSource:`form`},type:`validate`}),n=t,r;_s(t)&&(n=t.group,r=t.fields);let i=gs(n);i&&this.setMeta(e=>({...e,errorMap:{...e.errorMap,onMount:i},errorSourceMap:{...e.errorSourceMap,onMount:`field`}})),this.distributeFieldErrors(`onMount`,r)}return this.options.listeners?.onMount?.({value:this.state.value,groupApi:this}),()=>{for(let[e,t]of Object.entries(this.timeoutIds.validations))t&&(clearTimeout(t),this.timeoutIds.validations[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.listeners))t&&(clearTimeout(t),this.timeoutIds.listeners[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.formListeners))t&&(clearTimeout(t),this.timeoutIds.formListeners[e]=null);if(this.fieldInfo.instance===this){for(let[e,t]of Object.entries(this.fieldInfo.validationMetaMap))t?.lastAbortController.abort(),this.fieldInfo.validationMetaMap[e]=void 0;this.form.formGroupApis.delete(this),this.form.baseStore.setState(e=>({...e,formGroupStateBase:{...e.formGroupStateBase,[this.name]:ps({})}})),this.fieldInfo.instance=null,this.options.listeners?.onUnmount?.({value:this.state.value,groupApi:this})}}},this.setValue=(e,t)=>{this.form.setFieldValue(this.name,e,Q(t,{dontRunListeners:!0,dontValidate:!0})),t?.dontRunListeners||this.triggerOnChangeListener(),t?.dontValidate||this.validate(`change`)},this.getMeta=()=>this.store.state.meta,this.setMeta=e=>this.form.setFieldMeta(this.name,e),this.getInfo=()=>this.fieldInfo,this.getRelatedFields=()=>{let e=Object.values(this.form.fieldInfo),t=[];for(let n of e)n.instance&&n.instance instanceof us&&n.instance.name.startsWith(this.name)&&t.push(n.instance);return t},this.getRelatedFieldMetasDerived=()=>{let e=Object.entries(this.form.fieldMetaDerived.state),t=[];for(let[n,r]of e)n!==this.name&&$o(this.name,n)&&t.push({...r,name:n});return t},this.buildChildFieldName=e=>e===``?this.name:e.startsWith(`[`)?`${this.name}${e}`:`${this.name}.${e}`,this.distributeFieldErrors=(e,t)=>{let n=this._lastDistributedFieldNames[e]??new Set,r=new Set;if(t)for(let[e,n]of Object.entries(t))n!=null&&n!==!1&&r.add(this.buildChildFieldName(e));let i=new Set([...n,...r]),a=!1;for(let n of i){let r=n.startsWith(this.name+`[`)?n.slice(this.name.length):n.slice(this.name.length+1),i=t?.[r],o=this.form.getFieldMeta(n);if(!o&&!i)continue;let s=o?.errorMap[e],{newErrorValue:c,newSource:l}=Go({newFormValidatorError:i,isPreviousErrorFromFormValidator:o?.errorSourceMap[e]===`form`,previousErrorValue:s});c&&(a=!0),(s!==c||o?.errorSourceMap[e]!==l)&&this.form.setFieldMeta(n,(t=$)=>({...t,errorMap:{...t.errorMap,[e]:c},errorSourceMap:{...t.errorSourceMap,[e]:l}}))}return this._lastDistributedFieldNames[e]=r,a},this.validateSync=(t,n,r={})=>{let i=Vo(t,{...this.options,form:this.form,group:this,validationLogic:this.options.validationLogic||this.form.options.validationLogic||es}),a=(r.skipRelatedFieldValidation?[]:this.getRelatedFields()).reduce((e,n)=>{let r=Vo(t,{...n.options,form:n.form,validationLogic:n.form.options.validationLogic||es});return r.forEach(e=>{e.field=n}),e.concat(r)},[]),o=!1;G(()=>{let t=(t,r)=>{let i=ys(r.cause),a=t===this,s;r.validate&&(s=t.runValidator({validate:r.validate,value:{value:t.store.state.value,validationSource:a?`form`:`field`,...t instanceof e?{groupApi:t}:{fieldApi:t}},type:`validate`}));let c=s,l;a&&_s(s)&&(c=s.group,l=s.fields);let u=gs(c),d=n[i],{newErrorValue:f,newSource:p}=Ko({formLevelError:d,fieldLevelError:u});t.state.meta.errorMap?.[i]!==f&&t.setMeta(e=>({...e,errorMap:{...e.errorMap,[i]:f},errorSourceMap:{...e.errorSourceMap,[i]:p}})),f&&(o=!0),a&&this.distributeFieldErrors(i,l)&&(o=!0)};for(let e of i)t(this,e);for(let e of a)e.validate&&t(e.field,e)});let s=ys(`submit`);return this.state.meta.errorMap?.[s]&&t!==`submit`&&!o&&this.setMeta(e=>({...e,errorMap:{...e.errorMap,[s]:void 0},errorSourceMap:{...e.errorSourceMap,[s]:void 0}})),{hasErrored:o}},this.validateAsync=async(t,n,r={})=>{let i=Ho(t,{...this.options,form:this.form,group:this,validationLogic:this.options.validationLogic||this.form.options.validationLogic||es}),a=await n,o=r.skipRelatedFieldValidation?[]:this.getRelatedFields(),s=o.reduce((e,n)=>{let r=Ho(t,{...n.options,form:n.form,validationLogic:n.form.options.validationLogic||es});return r.forEach(e=>{e.field=n}),e.concat(r)},[]),c=[],l=[],u=i.some(e=>e.validate)||s.some(e=>e.validate);if(u){this.state.meta.isValidating||this.setMeta(e=>({...e,isValidating:!0}));for(let e of o)e.setMeta(e=>({...e,isValidating:!0}))}let d=(t,n,r)=>{let i=ys(n.cause),o=t.getInfo();o.validationMetaMap[i]?.lastAbortController.abort();let s=new AbortController;o.validationMetaMap[i]={lastAbortController:s};let c=t===this;r.push(new Promise(async r=>{let o;try{o=await new Promise((r,i)=>{t.timeoutIds.validations[n.cause]&&clearTimeout(t.timeoutIds.validations[n.cause]),t.timeoutIds.validations[n.cause]=setTimeout(async()=>{if(s.signal.aborted)return r(void 0);try{r(await this.runValidator({validate:n.validate,value:{value:t.store.state.value,signal:s.signal,validationSource:c?`form`:`field`,...t instanceof e?{groupApi:t}:{fieldApi:t}},type:`validateAsync`}))}catch(e){i(e)}},n.debounceMs)})}catch(e){o=e}if(s.signal.aborted)return r(void 0);let l=o,u;c&&_s(o)&&(l=o.group,u=o.fields);let d=gs(l),f=a[t.name]?.[i],{newErrorValue:p,newSource:m}=Ko({formLevelError:f,fieldLevelError:d});if(t.getInfo().instance!==t)return r(void 0);t.setMeta(e=>({...e,errorMap:{...e?.errorMap,[i]:p},errorSourceMap:{...e.errorSourceMap,[i]:m}})),c&&this.distributeFieldErrors(i,u),r(p)}))};for(let e of i)e.validate&&d(this,e,c);for(let e of s)e.validate&&d(e.field,e,l);let f=[];if((c.length||l.length)&&(f=await Promise.all(c),await Promise.all(l)),u){this.setMeta(e=>({...e,isValidating:!1}));for(let e of o)e.setMeta(e=>({...e,isValidating:!1}))}return f.filter(Boolean)},this.validateAllFields=async e=>{let t=[];return G(()=>{Object.values(this.getRelatedFields()).forEach(n=>{t.push(Promise.resolve().then(()=>n.validate(e,{skipFormValidation:!0,skipGroupValidation:!0}))),n.store.state.meta.isTouched||n.setMeta(e=>({...e,isTouched:!0}))})}),(await Promise.all(t)).flat()},this.validateArrayFieldsStartingFrom=(e,t,n)=>this.form.validateArrayFieldsStartingFrom(e,t,n),this.validateField=(e,t)=>this.form.validateField(e,t),this.getFieldValue=e=>this.form.getFieldValue(e),this.getFieldMeta=e=>this.form.getFieldMeta(e),this.setFieldMeta=(e,t)=>this.form.setFieldMeta(e,t),this.setFieldValue=(e,t)=>this.form.setFieldValue(e,t),this.deleteField=e=>this.form.deleteField(e),this.pushFieldValue=(e,t)=>this.form.pushFieldValue(e,t),this.insertFieldValue=(e,t,n)=>this.form.insertFieldValue(e,t,n),this.replaceFieldValue=(e,t,n)=>this.form.replaceFieldValue(e,t,n),this.swapFieldValues=(e,t,n)=>this.form.swapFieldValues(e,t,n),this.moveFieldValues=(e,t,n)=>this.form.moveFieldValues(e,t,n),this.clearFieldValues=e=>this.form.clearFieldValues(e),this.resetField=e=>this.form.resetField(e),this.removeFieldValue=(e,t)=>this.form.removeFieldValue(e,t),this.areRelatedFieldsValid=()=>Object.values(this.getRelatedFields()).every(e=>e.state.meta.isValid),this.validate=(e,t)=>{let{fieldsErrorMap:n}=t?.skipFormValidation?{fieldsErrorMap:{}}:this.form.validateSync(e,{dontUpdateFormErrorMap:!0,filterFieldNames:e=>$o(this.name,e)}),{hasErrored:r}=this.validateSync(e,n[this.name]??{},{skipRelatedFieldValidation:t?.skipRelatedFieldValidation});if(r&&!this.options.asyncAlways)return this.getInfo().validationMetaMap[ys(e)]?.lastAbortController.abort(),this.state.meta.errors;let i=t?.skipFormValidation?Promise.resolve({}):this.form.validateAsync(e,{dontUpdateFormErrorMap:!0,filterFieldNames:e=>$o(this.name,e)});return this.validateAsync(e,i,{skipRelatedFieldValidation:t?.skipRelatedFieldValidation})},this.triggerOnChangeListener=()=>{let e=this.form.options.listeners?.onChangeGroupDebounceMs;e&&e>0?(this.timeoutIds.formListeners.change&&clearTimeout(this.timeoutIds.formListeners.change),this.timeoutIds.formListeners.change=setTimeout(()=>{this.form.options.listeners?.onChangeGroup?.({formApi:this.form,groupApi:this})},e)):this.form.options.listeners?.onChangeGroup?.({formApi:this.form,groupApi:this});let t=this.options.listeners?.onChangeDebounceMs;t&&t>0?(this.timeoutIds.listeners.change&&clearTimeout(this.timeoutIds.listeners.change),this.timeoutIds.listeners.change=setTimeout(()=>{this.options.listeners?.onChange?.({value:this.state.value,groupApi:this})},t)):this.options.listeners?.onChange?.({value:this.state.value,groupApi:this})},this.triggerOnSubmitListener=()=>{this.options.listeners?.onSubmit?.({value:this.state.value,groupApi:this})},this._handleSubmit=async e=>{this.setFormGroupState(e=>({...e,isSubmitted:!1,submissionAttempts:e.submissionAttempts+1,isSubmitSuccessful:!1})),G(()=>{Object.values(this.getRelatedFields()).forEach(e=>{e.state.meta.isTouched||e.setMeta(e=>({...e,isTouched:!0}))})});let t=e??this.options.onSubmitMeta;this.setFormGroupState(e=>({...e,isSubmitting:!0}));let n=()=>{this.setFormGroupState(e=>({...e,isSubmitting:!1}))};if(await this.validateAllFields(`submit`),!this.areRelatedFieldsValid())n(),this.options.onGroupSubmitInvalid?.({value:this.state.value,groupApi:this,meta:t});else if(await this.validate(`submit`,{skipRelatedFieldValidation:!0}),!this.areRelatedFieldsValid()||!this.state.meta.isValid)n(),this.options.onGroupSubmitInvalid?.({value:this.state.value,groupApi:this,meta:t});else{G(()=>{Object.values(this.getRelatedFields()).forEach(e=>{e.options.listeners?.onGroupSubmit?.({value:e.state.value,fieldApi:e})})}),this.options.listeners?.onSubmit?.({groupApi:this,value:this.state.value});try{await this.options.onGroupSubmit?.({value:this.state.value,groupApi:this,meta:t}),G(()=>{this.setFormGroupState(e=>({...e,isSubmitted:!0,isSubmitSuccessful:!0})),n()})}catch(e){throw this.setFormGroupState(e=>({...e,isSubmitSuccessful:!1})),n(),e}}},this.form=t.form,this.name=t.name,this.options=t,this.timeoutIds={validations:{},listeners:{},formListeners:{}},this.fieldInfo={instance:null,validationMetaMap:{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}},this.store=ur(e=>{this.form.formGroupMetaDerived.get(),this.form.baseStore.get();let n=this.form.getFormGroupMeta(this.name)??ms(t.defaultMeta),r=this.form.getFieldValue(this.name);return!n.isTouched&&r===void 0&&this.options.defaultValue!==void 0&&!Wo(r,this.options.defaultValue)&&(r=this.options.defaultValue),e&&e.value===r&&e.meta===n?e:{value:r,meta:n}}),this.handleSubmit=this.handleSubmit.bind(this)}get state(){return this.store.state}runValidator(e){if(is(e.validate)){let t=rs[e.type](e.value,e.validate);return e.type===`validate`?vs(t):t.then(vs)}return e.validate(e.value)}handleSubmit(e){return this._handleSubmit(e)}};function gs(e){if(e)return e}function _s(e){return!!e&&typeof e==`object`&&`fields`in e}function vs(e){if(!e||typeof e!=`object`||!(`form`in e)&&!(`fields`in e))return e;let{form:t,fields:n,...r}=e;return{...r,group:t,fields:n}}function ys(e){switch(e){case`submit`:return`onSubmit`;case`blur`:return`onBlur`;case`mount`:return`onMount`;case`server`:return`onServer`;case`dynamic`:return`onDynamic`;default:return`onChange`}}function bs(e,t){if(!t)return;let n=Object.assign({},e,{state:Qo(e.state)});t(n),n.fieldInfo!==e.fieldInfo&&(e.fieldInfo=n.fieldInfo),n.options!==e.options&&(e.options=n.options);let r=Object.keys({values:null,validationMetaMap:null,fieldMetaBase:null,formGroupStateBase:null,isSubmitting:null,isSubmitted:null,isValidating:null,submissionAttempts:null,isSubmitSuccessful:null,_force_re_eval:null}).reduce((t,r)=>(e.state[r]!==n.state[r]&&(t[r]=n.state[r]),t),{});return G(()=>{Object.keys(r).length&&e.baseStore.setState(e=>({...e,...r})),n.state.errorMap!==e.state.errorMap&&e.setErrorMap(n.state.errorMap)}),n}var xs=typeof window<`u`?U.useLayoutEffect:U.useEffect;function Ss(e){let[t,n]=(0,U.useState)(()=>({form:e.form,name:e.name})),[r,i]=(0,U.useState)(()=>new us({...e})),a=r;(t.form!==e.form||t.name!==e.name)&&(a=new us({...e}),i(a),n({form:e.form,name:e.name}));let o=K(a.store,e.mode===`array`?e=>e.meta._arrayVersion||0:e=>e.value),s=K(a.store,e=>e.meta.isTouched),c=K(a.store,e=>e.meta.isBlurred),l=K(a.store,e=>e.meta.isDirty),u=K(a.store,e=>e.meta.errorMap),d=K(a.store,e=>e.meta.errorSourceMap),f=K(a.store,e=>e.meta.isValidating),p=(0,U.useMemo)(()=>({...a,get state(){return{value:e.mode===`array`?a.state.value:o,get meta(){return{...a.state.meta,isTouched:s,isBlurred:c,isDirty:l,errorMap:u,errorSourceMap:d,isValidating:f}}}}}),[a,e.mode,o,s,c,l,u,d,f]);return xs(a.mount,[a]),xs(()=>{a.update(e)}),p}var Cs=(({children:e,...t})=>{let n=Ss(t),r=(0,U.useMemo)(()=>Ao(e,n),[e,n]);return(0,q.jsx)(q.Fragment,{children:r})});function ws(){return(0,U.useState)(()=>Xo())[0]}var Ts=U,Es=`19.2.8`.split(`.`)[0]===`17`?ws:Ts.useId;function Ds(e){let[t,n]=(0,U.useState)(()=>({form:e.form,name:e.name})),[r,i]=(0,U.useState)(()=>new hs({...e}));(t.form!==e.form||t.name!==e.name)&&(i(new hs({...e})),n({form:e.form,name:e.name}));let a=K(r.store,e=>e.value),o=K(r.store,e=>e.meta.isTouched),s=K(r.store,e=>e.meta.isBlurred),c=K(r.store,e=>e.meta.isDirty),l=K(r.store,e=>e.meta.errorMap),u=K(r.store,e=>e.meta.errorSourceMap),d=K(r.store,e=>e.meta.isValidating),f=K(r.store,e=>e.meta.isSubmitting),p=K(r.store,e=>e.meta.isSubmitted),m=K(r.store,e=>e.meta.submissionAttempts),h=K(r.store,e=>e.meta.isSubmitSuccessful),g=K(r.store,e=>e.meta.canSubmit),_=K(r.store,e=>e.meta.isValid),v=K(r.store,e=>e.meta.isFieldsValid),y=K(r.store,e=>e.meta.isFieldsValidating),b=K(r.store,e=>e.meta.isGroupValid),x=(0,U.useMemo)(()=>({...r,handleSubmit:((...e)=>r._handleSubmit(...e)),get state(){return{...r.state,value:a,get meta(){return{...r.state.meta,isTouched:o,isBlurred:s,isDirty:c,errorMap:l,errorSourceMap:u,isValidating:d,isSubmitting:f,isSubmitted:p,submissionAttempts:m,isSubmitSuccessful:h,canSubmit:g,isValid:_,isFieldsValid:v,isFieldsValidating:y,isGroupValid:b}}}}}),[r,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b]);return xs(r.mount,[r]),xs(()=>{r.update(e)}),x}var Os=(({children:e,...t})=>{let n=Ds(t),r=(0,U.useMemo)(()=>Ao(e,n),[e,n]);return(0,q.jsx)(q.Fragment,{children:r})});function ks({form:e,selector:t=e=>e,children:n}){let r=K(e.store,t);return(0,q.jsx)(q.Fragment,{children:Ao(n,r)})}function As(e){let t=Es(),[n,r]=(0,U.useState)(e?.formId),[i,a]=(0,U.useState)(()=>new ss({...e,formId:e?.formId??t}));if(n!==e?.formId){let n=e?.formId??t;a(new ss({...e,formId:n})),r(n)}let o=(0,U.useMemo)(()=>{let e={...i,handleSubmit:((...e)=>i._handleSubmit(...e)),get formId(){return i._formId},get state(){return i.store.state}};return e.Field=function(e){return(0,q.jsx)(Cs,{...e,form:i})},e.FormGroup=function(e){return(0,q.jsx)(Os,{...e,form:i})},e.Subscribe=function(e){return(0,q.jsx)(ks,{form:i,selector:e.selector,children:e.children})},e},[i]);xs(i.mount,[]),xs(()=>{i.update(e)});let s=(0,U.useRef)(!1);return xs(()=>{s.current&&e?.transform&&bs(i,e.transform)},[i,e?.transform]),xs(()=>{s.current=!0}),o}var js=pt(e=>Dt(t=>{t.mount(e);let n=t.registry;t.addFinalizer(()=>{n.getNodes().has(e)&&(n.get(e).waiting||n.set(e,jt))})}));function Ms(e){let t=(0,J.c)(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={mode:`promise`},t[0]=n):n=t[0];let r=Et(e,n),i;return t[1]===e?i=t[2]:(i=js(e),t[1]=e,t[2]=i),tt(i),r}function Ns(e,t,n){return r=>(r.project?e({projectId:r.project.id,mode:r.mode,writer:r.writer}):r.writer?t(r.writer):void 0)?.then(()=>n?.(),()=>void 0)}function Ps(e){let t=(0,J.c)(9),{checking:n,onCheck:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,q.jsx)(vt,{children:`No writers available`}),t[0]=i):i=t[0];let a;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,q.jsx)(`code`,{children:`claude auth login`}),t[1]=a):a=t[1];let o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,q.jsxs)(`p`,{children:[`Install Claude Code or Codex on the connected computer, then sign in with `,a,` or `,(0,q.jsx)(`code`,{children:`codex login`}),`.`]}),t[2]=o):o=t[2];let s;t[3]===n?s=t[4]:(s=n&&(0,q.jsx)(m,{"aria-hidden":`true`}),t[3]=n,t[4]=s);let c;return t[5]!==n||t[6]!==r||t[7]!==s?(c=(0,q.jsxs)($e,{children:[i,(0,q.jsxs)(H,{children:[o,(0,q.jsxs)(V,{type:`button`,className:`mt-2`,variant:`outline`,size:`sm`,disabled:n,onClick:r,children:[s,`Check writers again`]})]})]}),t[5]=n,t[6]=r,t[7]=s,t[8]=c):c=t[8],c}function Fs(e){let t=(0,J.c)(18),{connection:n,project:r,unavailable:i,onSaved:a}=e,o;t[0]===n?o=t[1]:(o=lt(n),t[0]=n,t[1]=o);let s=o,c=dt(s),u=bt(s),d;t[2]===c?d=t[3]:(d=P(I(c)),t[2]=c,t[3]=d);let f=d;if(l(c)){let e;return t[4]===u?e=t[5]:(e=(0,q.jsxs)(`p`,{role:`alert`,className:`flex items-center gap-2 text-ui text-muted-foreground`,children:[`Could not read walkthrough models.`,(0,q.jsx)(V,{size:`xs`,variant:`outline`,onClick:u,children:`Try again`})]}),t[4]=u,t[5]=e),e}if(!f){let e;return t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,q.jsx)(N,{label:`Reading walkthrough models`}),t[6]=e):e=t[6],e}if(f.models.length===0&&!r){let e;return t[7]!==u||t[8]!==c.waiting?(e=(0,q.jsx)(Ps,{checking:c.waiting,onCheck:u}),t[7]=u,t[8]=c.waiting,t[9]=e):e=t[9],e}let p;return t[10]!==n||t[11]!==a||t[12]!==r||t[13]!==u||t[14]!==c.waiting||t[15]!==f||t[16]!==i?(p=(0,q.jsx)(Is,{connection:n,project:r,unavailable:i,onSaved:a,settings:f,checking:c.waiting,onCheck:u}),t[10]=n,t[11]=a,t[12]=r,t[13]=u,t[14]=c.waiting,t[15]=f,t[16]=i,t[17]=p):p=t[17],p}function Is(e){let n=(0,J.c)(57),{connection:r,project:i,unavailable:a,onSaved:o,settings:c,checking:u,onCheck:d}=e,f;n[0]===r?f=n[1]:(f=ee(r),n[0]=r,n[1]=f);let[p,h]=Ms(f),g;n[2]===r?g=n[3]:(g=y(r),n[2]=r,n[3]=g);let[_,v]=Ms(g),b=i?i.walkthroughSettings?.writer:c.writer,x;n[4]===c?x=n[5]:(x=Fa(c),n[4]=c,n[5]=x);let S=x.label,w=i?p:_,T=Ns(h,v,o),E=b?`${b.provider}:${b.model}`:`default`,O=b?.effort??c.writer.effort,k=i?.walkthroughSettings?.mode??`manual`,A;n[6]!==E||n[7]!==O||n[8]!==k?(A={writer:E,effort:O,mode:k},n[6]=E,n[7]=O,n[8]=k,n[9]=A):A=n[9];let j;n[10]!==i||n[11]!==T?(j=e=>{let{value:t}=e;return T({project:i,writer:t.writer==="default"?void 0:Pa(t.writer,t.effort),mode:t.mode})},n[10]=i,n[11]=T,n[12]=j):j=n[12];let M;n[13]!==A||n[14]!==j?(M={defaultValues:A,onSubmit:j},n[13]=A,n[14]=j,n[15]=M):M=n[15];let N=As(M),P;n[16]===N?P=n[17]:(P=e=>C(e,()=>N.handleSubmit()),n[16]=N,n[17]=P);let F;n[18]!==u||n[19]!==b?.model||n[20]!==b?.provider||n[21]!==S||n[22]!==N||n[23]!==d||n[24]!==i||n[25]!==w.waiting||n[26]!==c.models||n[27]!==c.writer||n[28]!==a?(F=c.models.length===0?(0,q.jsx)(Ps,{checking:u,onCheck:d}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(N.Field,{name:`writer`,children:e=>{let n=c.models.find(t=>`${t.provider}:${t.model}`===e.state.value),r=`${b?.provider} / ${b?.model} (unavailable)`;return n&&(r=`${n.provider===`claude`?`Claude`:`Codex`} / ${n.label}`),e.state.value==="default"&&(r=`Use the default · ${S}`),(0,q.jsxs)(`div`,{className:`grid gap-2`,children:[(0,q.jsx)(s,{htmlFor:`walkthrough-writer`,children:`Writer`}),(0,q.jsxs)(D,{value:e.state.value,disabled:w.waiting||a!==void 0,onValueChange:t=>{if(t===null)return;e.handleChange(t);let n=c.models.find(e=>`${e.provider}:${e.model}`===t);N.setFieldValue(`effort`,n?.defaultEffort??c.writer.effort)},children:[(0,q.jsx)(t,{id:`walkthrough-writer`,"aria-label":`Walkthrough writer`,className:`w-full`,children:(0,q.jsx)(We,{children:r})}),(0,q.jsxs)(xe,{children:[i&&(0,q.jsxs)(Se,{value:`default`,children:[`Use the default · `,S]}),!n&&e.state.value!=="default"&&(0,q.jsx)(Se,{value:e.state.value,disabled:!0,children:r}),c.models.map(Bs)]})]}),e.state.value!=="default"&&!n&&(0,q.jsx)(`p`,{role:`status`,className:`text-ui text-muted-foreground`,children:`This model is unavailable. Install its CLI and sign in, or select an available model. Runs will fail clearly while it is unavailable.`})]})}}),(0,q.jsx)(N.Subscribe,{selector:zs,children:e=>{let n=c.models.find(t=>`${t.provider}:${t.model}`===e);return(0,q.jsx)(N.Field,{name:`effort`,children:r=>(0,q.jsxs)(`div`,{className:`grid gap-2`,children:[(0,q.jsx)(s,{htmlFor:`walkthrough-effort`,children:`Effort`}),(0,q.jsxs)(D,{value:e==="default"?c.writer.effort:r.state.value,disabled:e==="default"||!n||w.waiting,onValueChange:e=>{e!==null&&r.handleChange(e)},children:[(0,q.jsx)(t,{id:`walkthrough-effort`,"aria-label":`Walkthrough effort`,className:`w-full`,children:(0,q.jsx)(We,{children:e==="default"?c.writer.effort:r.state.value})}),(0,q.jsx)(xe,{children:n?.efforts.map(Rs)})]})]})})}})]}),n[18]=u,n[19]=b?.model,n[20]=b?.provider,n[21]=S,n[22]=N,n[23]=d,n[24]=i,n[25]=w.waiting,n[26]=c.models,n[27]=c.writer,n[28]=a,n[29]=F):F=n[29];let I;n[30]!==N.Field||n[31]!==i||n[32]!==w.waiting?(I=i&&(0,q.jsx)(N.Field,{name:`mode`,children:e=>(0,q.jsxs)(`div`,{className:`grid gap-2`,children:[(0,q.jsx)(s,{htmlFor:`walkthrough-mode`,children:`Write walkthroughs`}),(0,q.jsxs)(D,{value:e.state.value,disabled:w.waiting,onValueChange:t=>{(t===`manual`||t===`automatic`)&&e.handleChange(t)},children:[(0,q.jsx)(t,{id:`walkthrough-mode`,"aria-label":`Walkthrough mode`,className:`w-full`,children:(0,q.jsx)(We,{children:e.state.value===`manual`?`Manual`:`Automatic`})}),(0,q.jsxs)(xe,{children:[(0,q.jsx)(Se,{value:`manual`,children:`Manual`}),(0,q.jsx)(Se,{value:`automatic`,children:`Automatic when a pull request opens`})]})]})]})}),n[30]=N.Field,n[31]=i,n[32]=w.waiting,n[33]=I):I=n[33];let R;n[34]===a?R=n[35]:(R=a&&(0,q.jsx)($e,{variant:`destructive`,children:(0,q.jsx)(H,{children:a})}),n[34]=a,n[35]=R);let z;n[36]===w?z=n[37]:(z=l(w)&&(0,q.jsx)($e,{variant:`destructive`,children:(0,q.jsx)(H,{children:String(L(w.cause))})}),n[36]=w,n[37]=z);let B;n[38]===w?B=n[39]:(B=at(w)&&!w.waiting&&(0,q.jsx)(`p`,{role:`status`,className:`text-ui text-muted-foreground`,children:`Saved on this computer.`}),n[38]=w,n[39]=B);let te;n[40]!==b||n[41]!==i||n[42]!==w.waiting||n[43]!==c.models||n[44]!==a?(te=e=>{let{writer:t,effort:n}=e;return(0,q.jsxs)(V,{type:`submit`,disabled:w.waiting||a!==void 0||!Ia({writer:t,effort:n,current:b,project:i!==void 0,models:c.models}),children:[w.waiting&&(0,q.jsx)(m,{}),`Save`]})},n[40]=b,n[41]=i,n[42]=w.waiting,n[43]=c.models,n[44]=a,n[45]=te):te=n[45];let ne;n[46]!==N.Subscribe||n[47]!==te?(ne=(0,q.jsx)(N.Subscribe,{selector:Ls,children:te}),n[46]=N.Subscribe,n[47]=te,n[48]=ne):ne=n[48];let re;return n[49]!==P||n[50]!==F||n[51]!==I||n[52]!==R||n[53]!==z||n[54]!==B||n[55]!==ne?(re=(0,q.jsxs)(`form`,{className:`grid gap-4`,onSubmit:P,children:[F,I,R,z,B,ne]}),n[49]=P,n[50]=F,n[51]=I,n[52]=R,n[53]=z,n[54]=B,n[55]=ne,n[56]=re):re=n[56],re}function Ls(e){return{writer:e.values.writer,effort:e.values.effort}}function Rs(e){return(0,q.jsx)(Se,{value:e,children:e},e)}function zs(e){return e.values.writer}function Bs(e){return(0,q.jsxs)(Se,{value:`${e.provider}:${e.model}`,children:[e.provider===`claude`?`Claude`:`Codex`,` /`,` `,e.label]},`${e.provider}:${e.model}`)}function Vs(e){let t=(0,J.c)(4),{connection:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,q.jsx)(Zt,{variant:`label`,children:`Walkthroughs`}),t[0]=r):r=t[0];let i;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,q.jsxs)(ut,{className:`min-w-0`,children:[(0,q.jsx)(xt,{children:`Default walkthrough writer`}),(0,q.jsx)(Lt,{children:`Saved on this computer for manual and automatic walkthroughs. Each project can override this writer from its three-dot menu. Projects using the default follow later changes here.`})]}),t[1]=i):i=t[1];let a;return t[2]===n?a=t[3]:(a=(0,q.jsxs)(Ae,{children:[r,(0,q.jsx)(Le,{children:(0,q.jsxs)(Ot,{variant:`outline`,children:[i,(0,q.jsx)(Ne,{children:(0,q.jsx)(Fs,{connection:n})})]})})]}),t[2]=n,t[3]=a),a}function Hs(e){let t=(0,J.c)(18),{connection:n}=e,{projects:r,failed:i,retry:a}=eo(n),o,s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,q.jsx)(Zt,{variant:`label`,children:`GitHub account for pull requests`}),s=(0,q.jsx)(Je,{children:`Porcelain finds a signed-in account that can read each project’s repository. Choose one to keep using it. Saved on this computer, for every device.`}),t[0]=o,t[1]=s):(o=t[0],s=t[1]);let c;t[2]!==n||t[3]!==r?(c=r?.map(e=>(0,q.jsx)(Us,{connection:n,project:e},e.id)),t[2]=n,t[3]=r,t[4]=c):c=t[4];let l;t[5]===r?l=t[6]:(l=r!==void 0&&r.length>0&&(0,q.jsx)(`p`,{className:`hidden py-3 text-ui text-muted-foreground only:block`,children:`No project has a GitHub remote.`}),t[5]=r,t[6]=l);let u;t[7]!==i||t[8]!==r||t[9]!==a?(u=r===void 0&&i&&(0,q.jsxs)(`p`,{role:`alert`,className:`flex items-center gap-2 py-3 text-ui text-muted-foreground`,children:[`Could not read this computer’s projects.`,(0,q.jsx)(V,{size:`xs`,variant:`outline`,onClick:a,children:`Try again`})]}),t[7]=i,t[8]=r,t[9]=a,t[10]=u):u=t[10];let d;t[11]===r?.length?d=t[12]:(d=r?.length===0&&(0,q.jsx)(`p`,{className:`py-3 text-ui text-muted-foreground`,children:`Add a project to choose its GitHub account.`}),t[11]=r?.length,t[12]=d);let f;return t[13]!==c||t[14]!==l||t[15]!==u||t[16]!==d?(f=(0,q.jsxs)(Ae,{children:[o,s,(0,q.jsxs)(Le,{children:[c,l,u,d]})]}),t[13]=c,t[14]=l,t[15]=u,t[16]=d,t[17]=f):f=t[17],f}function Us(e){let n=(0,J.c)(50),{connection:r,project:i}=e,a={connection:r,projectId:i.id},o=de(a),s=dt(o),d=bt(o),[f,m]=Et(Me(a)),h,g,_,v,y,b,x,S,C,w;if(n[0]!==f||n[1]!==i.name||n[2]!==s||n[3]!==m){S=Symbol.for(`react.early_return_sentinel`);bb0:{if(g=l(s)?void 0:P(I(s)),g?.unavailable?.reason===`not-github`){S=null;break bb0}let e=g?.choice;_=s.waiting||f.waiting,C=g?.unavailable?Ga(g.unavailable.reason):void 0;let r=g?.override?`The chosen account cannot open it. Choose another or use the detected account.`:`No signed-in account can open it`;w=g?.unavailable?.reason===`no-access`?r:C?.description,v=`Use the detected account for ${i.name}`,h=Ot,y=`outline`;let a;n[14]===i.name?a=n[15]:(a=(0,q.jsx)(xt,{className:`max-w-full min-w-0`,children:(0,q.jsx)(u,{text:i.name})}),n[14]=i.name,n[15]=a),b=(0,q.jsxs)(ut,{className:`min-w-0`,children:[a,g?.repository&&(0,q.jsx)(u,{text:g.repository,className:`block font-mono text-xs leading-4.5 text-muted-foreground`})]}),x=g&&g.accounts.length>0&&(0,q.jsxs)(Ne,{children:[e&&(0,q.jsx)(Tt,{variant:`secondary`,children:e.source===`overridden`?`Chosen`:`Detected`}),(0,q.jsxs)(D,{value:e?.account??g.override??null,disabled:_,items:g.accounts.map(qs),onValueChange:t=>{typeof t==`string`&&t!==e?.account&&m({account:t})},children:[(0,q.jsx)(t,{"aria-label":`GitHub account for ${i.name}`,children:(0,q.jsx)(We,{children:Ks})}),(0,q.jsx)(xe,{children:g.accounts.map(Gs)})]})]})}n[0]=f,n[1]=i.name,n[2]=s,n[3]=m,n[4]=h,n[5]=g,n[6]=_,n[7]=v,n[8]=y,n[9]=b,n[10]=x,n[11]=S,n[12]=C,n[13]=w}else h=n[4],g=n[5],_=n[6],v=n[7],y=n[8],b=n[9],x=n[10],S=n[11],C=n[12],w=n[13];if(S!==Symbol.for(`react.early_return_sentinel`))return S;let T;n[16]!==g?.override||n[17]!==_||n[18]!==v||n[19]!==m?(T=g?.override&&(0,q.jsxs)(p,{children:[(0,q.jsx)(it,{render:(0,q.jsx)(V,{size:`icon-sm`,variant:`ghost`,"aria-label":v,disabled:_,onClick:()=>m({account:void 0})}),children:(0,q.jsx)(yr,{"aria-hidden":`true`,className:`size-3.5`})}),(0,q.jsx)(c,{children:v})]}),n[16]=g?.override,n[17]=_,n[18]=v,n[19]=m,n[20]=T):T=n[20];let E;n[21]!==_||n[22]!==d||n[23]!==C||n[24]!==w?(E=C&&(0,q.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2 text-ui leading-4.5 text-warn`,children:[(0,q.jsx)(xr,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),(0,q.jsx)(`span`,{children:w}),C.action.kind===`install`&&(0,q.jsx)(V,{size:`xs`,variant:`link`,nativeButton:!1,render:(0,q.jsx)(`a`,{href:C.action.url,target:`_blank`,rel:`noreferrer`}),children:C.action.label}),C.action.kind===`copy`&&(0,q.jsx)(V,{size:`xs`,variant:`link`,onClick:Ws,children:C.action.label}),C.action.kind!==`install`&&(0,q.jsx)(V,{size:`xs`,variant:`ghost`,disabled:_,onClick:d,children:`Try again`})]}),n[21]=_,n[22]=d,n[23]=C,n[24]=w,n[25]=E):E=n[25];let O;n[26]!==g||n[27]!==_||n[28]!==d||n[29]!==C?(O=g&&g.accounts.length===0&&!C&&(0,q.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-ui text-muted-foreground`,children:[`No GitHub account is available.`,(0,q.jsx)(V,{size:`xs`,variant:`ghost`,disabled:_,onClick:d,children:`Try again`})]}),n[26]=g,n[27]=_,n[28]=d,n[29]=C,n[30]=O):O=n[30];let k;n[31]!==_||n[32]!==d||n[33]!==s?(k=l(s)&&(0,q.jsx)($e,{variant:`destructive`,className:`basis-full`,children:(0,q.jsxs)(H,{children:[`Could not display the GitHub account.`,` `,(0,q.jsx)(V,{size:`xs`,variant:`outline`,disabled:_,onClick:d,children:`Try again`})]})}),n[31]=_,n[32]=d,n[33]=s,n[34]=k):k=n[34];let A;n[35]===f?A=n[36]:(A=l(f)&&(0,q.jsx)($e,{variant:`destructive`,className:`basis-full`,children:(0,q.jsx)(H,{children:`Could not save the GitHub account. Choose an account or reset it to try again.`})}),n[35]=f,n[36]=A);let j;n[37]===f.waiting?j=n[38]:(j=f.waiting&&(0,q.jsx)(`p`,{role:`status`,className:`basis-full text-xs text-muted-foreground`,children:`Saving GitHub account…`}),n[37]=f.waiting,n[38]=j);let M;return n[39]!==h||n[40]!==y||n[41]!==j||n[42]!==b||n[43]!==x||n[44]!==T||n[45]!==E||n[46]!==O||n[47]!==k||n[48]!==A?(M=(0,q.jsxs)(h,{variant:y,children:[b,x,T,E,O,k,A,j]}),n[39]=h,n[40]=y,n[41]=j,n[42]=b,n[43]=x,n[44]=T,n[45]=E,n[46]=O,n[47]=k,n[48]=A,n[49]=M):M=n[49],M}function Ws(){return Gt(`gh auth login`,`command`)}function Gs(e){return(0,q.jsx)(Se,{value:e,children:(0,q.jsx)(u,{text:e,className:`block max-w-40`})},e)}function Ks(e){return e===null?`Choose an account`:(0,q.jsx)(u,{text:e,className:`block max-w-30`})}function qs(e){return{value:e,label:e}}function Js(e){let t=(0,J.c)(12),{label:n,description:r,children:i}=e,a;t[0]===n?a=t[1]:(a=(0,q.jsx)(xt,{children:n}),t[0]=n,t[1]=a);let o;t[2]===r?o=t[3]:(o=(0,q.jsx)(Lt,{children:r}),t[2]=r,t[3]=o);let s;t[4]!==a||t[5]!==o?(s=(0,q.jsxs)(ut,{className:`min-w-0`,children:[a,o]}),t[4]=a,t[5]=o,t[6]=s):s=t[6];let c;t[7]===i?c=t[8]:(c=(0,q.jsx)(Ne,{children:i}),t[7]=i,t[8]=c);let l;return t[9]!==s||t[10]!==c?(l=(0,q.jsxs)(Ot,{variant:`outline`,children:[s,c]}),t[9]=s,t[10]=c,t[11]=l):l=t[11],l}function Ys(e){let t=(0,J.c)(21),{label:n,description:r,value:i,options:a,disabled:o,onChange:s}=e,c=o!==void 0&&o,l=i??null,u;t[0]!==s||t[1]!==a?(u=e=>{let t=a.find(t=>t.value===e);t&&s(t.value)},t[0]=s,t[1]=a,t[2]=u):u=t[2];let d;if(t[3]!==c||t[4]!==a||t[5]!==i){let e;t[7]!==c||t[8]!==i?(e=e=>(0,q.jsx)(To,{value:e.value,disabled:c,children:(0,q.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[i===e.value&&(0,q.jsx)(ge,{"aria-hidden":!0,className:`size-3.5`}),(0,q.jsx)(`span`,{className:i===e.value?`font-semibold`:void 0,children:e.label})]})},e.value),t[7]=c,t[8]=i,t[9]=e):e=t[9],d=a.map(e),t[3]=c,t[4]=a,t[5]=i,t[6]=d}else d=t[6];let f;t[10]!==n||t[11]!==d?(f=(0,q.jsx)(wo,{"aria-label":n,children:d}),t[10]=n,t[11]=d,t[12]=f):f=t[12];let p;t[13]!==l||t[14]!==u||t[15]!==f?(p=(0,q.jsx)(So,{value:l,onValueChange:u,children:f}),t[13]=l,t[14]=u,t[15]=f,t[16]=p):p=t[16];let m;return t[17]!==r||t[18]!==n||t[19]!==p?(m=(0,q.jsx)(Js,{label:n,description:r,children:p}),t[17]=r,t[18]=n,t[19]=p,t[20]=m):m=t[20],m}function Xs(e){let t=(0,J.c)(9),{label:n,description:r,name:i,options:a}=e,{preferences:o,setPreference:s}=ya(),c=o[i],l;t[0]!==i||t[1]!==s?(l=e=>s(i,e),t[0]=i,t[1]=s,t[2]=l):l=t[2];let u;return t[3]!==r||t[4]!==n||t[5]!==a||t[6]!==c||t[7]!==l?(u=(0,q.jsx)(Ys,{label:n,description:r,value:c,options:a,onChange:l}),t[3]=r,t[4]=n,t[5]=a,t[6]=c,t[7]=l,t[8]=u):u=t[8],u}function Zs(e){let t=(0,J.c)(12),{label:n,description:r,checked:i,disabled:a,onChange:o}=e,s=i===void 0?`Unavailable`:i===!0?`On`:`Off`,c;t[0]===s?c=t[1]:(c=(0,q.jsx)(`span`,{"aria-hidden":!0,className:`text-xs text-muted-foreground`,children:s}),t[0]=s,t[1]=c);let l=i??!1,u;t[2]!==a||t[3]!==n||t[4]!==o||t[5]!==l?(u=(0,q.jsx)(nt,{"aria-label":n,checked:l,disabled:a,onCheckedChange:o}),t[2]=a,t[3]=n,t[4]=o,t[5]=l,t[6]=u):u=t[6];let d;return t[7]!==r||t[8]!==n||t[9]!==c||t[10]!==u?(d=(0,q.jsxs)(Js,{label:n,description:r,children:[c,u]}),t[7]=r,t[8]=n,t[9]=c,t[10]=u,t[11]=d):d=t[11],d}function Qs(e){let t=(0,J.c)(13),{view:n,computer:r,onRetry:i}=e;if(n.kind===`unsupported`){let e;return t[0]===r?e=t[1]:(e=(0,q.jsxs)($e,{children:[(0,q.jsxs)(vt,{children:[`Update `,r,` to sync settings`]}),(0,q.jsxs)(H,{children:[`Porcelain on `,r,` is older and keeps no Changes & Git settings. Update it from Computers to choose them here.`]})]}),t[0]=r,t[1]=e),e}let a;t[2]===n?a=t[3]:(a=ea(n),t[2]=n,t[3]=a);let o=a;if(n.kind===`reading`||n.kind===`unconfigured`||!o)return null;let s;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,q.jsx)(vt,{children:`Settings unavailable`}),t[4]=s):s=t[4];let c;t[5]===o?c=t[6]:(c=(0,q.jsx)(`p`,{children:o}),t[5]=o,t[6]=c);let l;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,q.jsx)(`p`,{children:`Pull and Archive wait until they can be read again.`}),t[7]=l):l=t[7];let u;t[8]===i?u=t[9]:(u=(0,q.jsx)(V,{className:`mt-3`,size:`sm`,variant:`outline`,onClick:i,children:`Read settings again`}),t[8]=i,t[9]=u);let d;return t[10]!==c||t[11]!==u?(d=(0,q.jsxs)($e,{variant:`destructive`,children:[s,(0,q.jsxs)(H,{children:[c,l,u]})]}),t[10]=c,t[11]=u,t[12]=d):d=t[12],d}function $s(e){let t=(0,J.c)(63),{connection:n,computer:r}=e,i=Za(n),a=$a(n),{preferences:o}=ya(),{save:s,saving:c,failure:l,kept:u,readAgain:d,checkTrustAgain:f}=to(n),p;t[0]!==o.reviewGitSettingsImportCandidate||t[1]!==i?(p=Yi(i,o.reviewGitSettingsImportCandidate),t[0]=o.reviewGitSettingsImportCandidate,t[1]=i,t[2]=p):p=t[2];let m=p,h;t[3]!==c||t[4]!==i?(h=qi(i)!==void 0&&!c,t[3]=c,t[4]=i,t[5]=h):h=t[5];let g=h,_;t[6]===s?_=t[7]:(_=e=>s({kind:`change`,change:e}),t[6]=s,t[7]=_);let v=_,y;t[8]===d?y=t[9]:(y=()=>d(void 0),t[8]=d,t[9]=y);let b;t[10]!==r.phrase||t[11]!==y||t[12]!==i?(b=(0,q.jsx)(Qs,{view:i,computer:r.phrase,onRetry:y}),t[10]=r.phrase,t[11]=y,t[12]=i,t[13]=b):b=t[13];let x;t[14]!==f||t[15]!==r.phrase||t[16]!==o.reviewGitSettingsImportCandidate||t[17]!==s||t[18]!==c||t[19]!==a||t[20]!==i.kind?(x=i.kind===`unconfigured`&&(0,q.jsxs)($e,{children:[(0,q.jsxs)(vt,{children:[`Choose settings for `,r.phrase]}),(0,q.jsxs)(H,{children:[(0,q.jsxs)(`p`,{children:[`Every device connected to `,r.phrase,` uses the same Changes & Git settings. These preview values come from this device’s preferences or the defaults. Controls stay disabled until you use them for `,r.phrase,`.`]}),(0,q.jsx)(St,{to:`/settings/$section`,params:{section:`git`},hash:`archive-settings`,replace:!0,className:`w-fit text-foreground underline underline-offset-4`,children:`Review archive deletions`}),a&&(0,q.jsx)(`p`,{children:a}),(0,q.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:[(0,q.jsxs)(V,{className:`h-auto min-h-7 max-w-full whitespace-normal`,size:`sm`,disabled:c||a!==void 0,onClick:()=>s({kind:`initialize`,settings:o.reviewGitSettingsImportCandidate}),children:[`Use these settings for `,r.phrase]}),a&&(0,q.jsx)(V,{size:`sm`,variant:`outline`,onClick:f,children:`Check again`})]})]})]}),t[14]=f,t[15]=r.phrase,t[16]=o.reviewGitSettingsImportCandidate,t[17]=s,t[18]=c,t[19]=a,t[20]=i.kind,t[21]=x):x=t[21];let S;t[22]!==r.name||t[23]!==u?(S=u&&(0,q.jsx)($e,{children:(0,q.jsx)(H,{children:Zi(r.name)})}),t[22]=r.name,t[23]=u,t[24]=S):S=t[24];let C;t[25]===l?C=t[26]:(C=l&&(0,q.jsxs)($e,{variant:`destructive`,children:[(0,q.jsx)(vt,{children:`Not saved`}),(0,q.jsx)(H,{children:l})]}),t[25]=l,t[26]=C);let w;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,q.jsx)(Zt,{variant:`label`,children:`Changes`}),t[27]=w):w=t[27];let T=m?.collapseSpecs,E=!g,D;t[28]===v?D=t[29]:(D=e=>v({collapseSpecs:e}),t[28]=v,t[29]=D);let O;t[30]!==T||t[31]!==E||t[32]!==D?(O=(0,q.jsxs)(Ae,{children:[w,(0,q.jsx)(Le,{children:(0,q.jsx)(Zs,{label:`Spec files`,description:`Group specs separately and start them collapsed, in the changed files.`,checked:T,disabled:E,onChange:D})})]}),t[30]=T,t[31]=E,t[32]=D,t[33]=O):O=t[33];let k;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,q.jsx)(Zt,{variant:`label`,children:`Git`}),t[34]=k):k=t[34];let A=m?.pullStrategy,j=!g,M;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(M=[{value:`merge`,label:`Merge`},{value:`rebase`,label:`Rebase`}],t[35]=M):M=t[35];let ee;t[36]===v?ee=t[37]:(ee=e=>v({pullStrategy:e}),t[36]=v,t[37]=ee);let N;t[38]!==A||t[39]!==j||t[40]!==ee?(N=(0,q.jsxs)(Ae,{children:[k,(0,q.jsx)(Le,{children:(0,q.jsx)(Ys,{label:`Pull strategy`,description:`Used by Pull in the Git menu.`,value:A,disabled:j,options:M,onChange:ee})})]}),t[38]=A,t[39]=j,t[40]=ee,t[41]=N):N=t[41];let P,F;t[42]===n?(P=t[43],F=t[44]):(P=(0,q.jsx)(Vs,{connection:n}),F=(0,q.jsx)(Hs,{connection:n}),t[42]=n,t[43]=P,t[44]=F);let I,L;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,q.jsx)(Zt,{variant:`label`,children:`When archiving`}),L=(0,q.jsx)(Je,{children:`Archive asks you to confirm these deletions before running them.`}),t[45]=I,t[46]=L):(I=t[45],L=t[46]);let R;t[47]!==v||t[48]!==g||t[49]!==m?(R=Ta.map(e=>{let{key:t,label:n,description:r}=e;return(0,q.jsx)(Zs,{label:n,description:r,checked:m?.[t],disabled:!g,onChange:e=>v({[t]:e})},t)}),t[47]=v,t[48]=g,t[49]=m,t[50]=R):R=t[50];let z;t[51]===R?z=t[52]:(z=(0,q.jsxs)(Ae,{id:`archive-settings`,className:`scroll-mt-4`,children:[I,L,(0,q.jsx)(Le,{children:R})]}),t[51]=R,t[52]=z);let B;return t[53]!==O||t[54]!==N||t[55]!==P||t[56]!==F||t[57]!==z||t[58]!==b||t[59]!==x||t[60]!==S||t[61]!==C?(B=(0,q.jsxs)(q.Fragment,{children:[b,x,S,C,O,N,P,F,z]}),t[53]=O,t[54]=N,t[55]=P,t[56]=F,t[57]=z,t[58]=b,t[59]=x,t[60]=S,t[61]=C,t[62]=B):B=t[62],B}function ec(e){let n=(0,J.c)(18),{computers:r,selected:i,onSelect:a}=e,o;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,q.jsx)(Vt,{htmlFor:`settings-computer`,children:`Computer`}),n[0]=o):o=n[0];let s;n[1]===r?s=n[2]:(s=r.map(nc),n[1]=r,n[2]=s);let c;n[3]===a?c=n[4]:(c=e=>{typeof e==`string`&&a(e)},n[3]=a,n[4]=c);let l;n[5]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,q.jsx)(t,{id:`settings-computer`,className:`w-full min-w-0`,children:(0,q.jsx)(We,{})}),n[5]=l):l=n[5];let u;n[6]===r?u=n[7]:(u=r.map(tc),n[6]=r,n[7]=u);let d;n[8]===u?d=n[9]:(d=(0,q.jsx)(xe,{children:u}),n[8]=u,n[9]=d);let f;n[10]!==i||n[11]!==s||n[12]!==c||n[13]!==d?(f=(0,q.jsxs)(D,{items:s,value:i,onValueChange:c,children:[l,d]}),n[10]=i,n[11]=s,n[12]=c,n[13]=d,n[14]=f):f=n[14];let p;n[15]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,q.jsx)(Je,{children:`Each computer keeps its own Changes & Git settings.`}),n[15]=p):p=n[15];let m;return n[16]===f?m=n[17]:(m=(0,q.jsxs)(Xe,{children:[o,f,p]}),n[16]=f,n[17]=m),m}function tc(e){return(0,q.jsx)(Se,{value:e.id,children:(0,q.jsx)(u,{text:e.name,className:`block min-w-0`})},e.id)}function nc(e){return{value:e.id,label:e.name}}function rc(){let e=(0,J.c)(9),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,q.jsx)(mt,{section:`Settings`,title:`General`,lead:`How Porcelain looks, and how code and documents open.`}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,q.jsx)(Zt,{variant:`label`,children:`Appearance`}),e[1]=n):n=e[1];let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,q.jsxs)(Ae,{children:[n,(0,q.jsx)(Le,{children:(0,q.jsx)(Xs,{label:`Theme`,description:`System follows your operating system.`,name:`appearance`,options:[{value:`system`,label:`System`},{value:`light`,label:`Light`},{value:`dark`,label:`Dark`}]})})]}),e[2]=r):r=e[2];let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,q.jsx)(Zt,{variant:`label`,children:`Code`}),e[3]=i):i=e[3];let a,o;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,q.jsx)(Xs,{label:`Diff layout`,description:`Split shows old and new side by side.`,name:`diffStyle`,options:[{value:`unified`,label:`Unified`},{value:`split`,label:`Split`}]}),o=(0,q.jsx)(Jt,{}),e[4]=a,e[5]=o):(a=e[4],o=e[5]);let s;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,q.jsxs)(Ae,{children:[i,(0,q.jsxs)(Le,{children:[a,o,(0,q.jsx)(Xs,{label:`Long lines`,description:`Wrap keeps every line visible without scrolling.`,name:`lineOverflow`,options:[{value:`scroll`,label:`Scroll`},{value:`wrap`,label:`Wrap`}]})]})]}),e[6]=s):s=e[6];let c;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,q.jsx)(Zt,{variant:`label`,children:`Documents`}),e[7]=c):c=e[7];let l;return e[8]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,q.jsxs)(`div`,{className:`flex flex-col`,children:[t,(0,q.jsxs)(`div`,{className:`mt-8 flex flex-col gap-7`,children:[r,s,(0,q.jsxs)(Ae,{children:[c,(0,q.jsx)(Le,{children:(0,q.jsx)(Xs,{label:`Documents open as`,description:`Markdown and HTML. You can switch per file; HTML previews run in a sandbox with no access to Porcelain.`,name:`documentsDefault`,options:[{value:`rendered`,label:`Rendered`},{value:`source`,label:`Source`}]})})]})]}),(0,q.jsx)(`p`,{className:`mt-4 text-xs text-muted-foreground`,children:`These preferences are saved on this device.`})]}),e[8]=l):l=e[8],l}function ic(){let e=(0,J.c)(18),{connection:t}=$t(),n=S(),r;e[0]===t?r=e[1]:(r={id:`this-computer`,name:`This computer`,phrase:`this computer`,connection:t},e[0]=t,e[1]=r);let i;e[2]!==n||e[3]!==r?(i=[r,...n.map(ac)],e[2]=n,e[3]=r,e[4]=i):i=e[4];let a=i,[o,s]=(0,U.useState)(`this-computer`),c;e[5]!==o||e[6]!==a?(c=a.find(e=>e.id===o)??a[0],e[5]=o,e[6]=a,e[7]=c):c=e[7];let l=c,u;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,q.jsx)(mt,{section:`Settings`,title:`Changes & Git`,lead:`How changes are grouped, who writes walkthroughs, which GitHub account opens pull requests, and what Git does when you pull and archive.`}),e[8]=u):u=e[8];let d;e[9]!==l?.id||e[10]!==a?(d=a.length>1&&(0,q.jsx)(ec,{computers:a,selected:l?.id??`this-computer`,onSelect:s}),e[9]=l?.id,e[10]=a,e[11]=d):d=e[11];let f;e[12]===l?f=e[13]:(f=l&&(0,q.jsx)($s,{connection:l.connection,computer:l},l.id),e[12]=l,e[13]=f);let p;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Saved on the computer, for every device connected to it. Archive and pull run on the computer that holds the worktree.`}),e[14]=p):p=e[14];let m;return e[15]!==d||e[16]!==f?(m=(0,q.jsxs)(q.Fragment,{children:[u,d,f,p]}),e[15]=d,e[16]=f,e[17]=m):m=e[17],m}function ac(e){return{id:e.remote.environmentId,name:e.remote.name,phrase:e.remote.name,connection:e.connection}}function oc(e){let t=(0,J.c)(9),n=dt(e),r;t[0]===n?r=t[1]:(r=oe(I(n)),t[0]=n,t[1]=r);let i;t[2]===r?i=t[3]:(i={includeFailure:!0,suspendOnWaiting:r},t[2]=r,t[3]=i);let a=Fe(e,i),o;t[4]===a?o=t[5]:(o=_(I(a),()=>{throw l(a)?L(a.cause):Error(`The read has no confirmed value`)}),t[4]=a,t[5]=o);let s=o,c;return t[6]!==a||t[7]!==s?(c={result:a,value:s},t[6]=a,t[7]=s,t[8]=c):c=t[8],c}export{di as $,W as $t,Da as A,Gr as At,Ji as B,Mr as Bt,Fa as C,$r as Ct,ka as D,qr as Dt,Ea as E,Jr as Et,_a as F,Ir as Ft,Oi as G,Dr as Gt,Li as H,Ar as Ht,Sa as I,Fr as It,Ei as J,K as Jt,Ii as K,xr as Kt,ya as L,zr as Lt,wa as M,Br as Mt,X as N,Wr as Nt,Aa as O,Hr as Ot,Ca as P,Lr as Pt,Pi as Q,On as Qt,ba as R,Pr as Rt,qa as S,ti as St,Na as T,ci as Tt,Ai as U,jr as Ut,ea as V,kr as Vt,ji as W,Or as Wt,Di as X,In as Xt,Ni as Y,hr as Yt,Fi as Z,Fn as Zt,Xa as _,ei as _t,Ms as a,vi as at,La as b,ii as bt,Eo as c,oi as ct,Za as d,Xr as dt,on as en,ui as et,Qa as f,fi as ft,Ha as g,xi as gt,Ua as h,bi as ht,Fs as i,gi as it,Oa as j,Vr as jt,ja as k,Ur as kt,wo as l,pi as lt,Ya as m,Yr as mt,rc as n,ai as nt,As as o,yi as ot,Ga as p,li as pt,Mi as q,yr as qt,ic as r,hi as rt,So as s,_i as st,oc as t,sn as tn,Zr as tt,To as u,mi as ut,Ka as v,Qr as vt,Ma as w,si as wt,za as x,ni as xt,Ja as y,ri as yt,qi as z,Nr as zt};
|