@ingit/cli-darwin-x64 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -593,7 +593,7 @@ Error generating stack: `+e.message+`
593
593
  grid-template-columns: 1fr;
594
594
  }
595
595
  }
596
- `}),(0,E.jsxs)(`div`,{className:`repo-open-stack`,children:[ae.length>0&&(0,E.jsxs)(`section`,{className:`repo-open-agents-card`,children:[(0,E.jsx)(`div`,{className:`repo-open-agents-brand`,children:(0,E.jsx)(`img`,{className:`repo-open-agents-logo`,src:`/press-kit/ingit-icon-mark-light.svg`,alt:`ingit`})}),(0,E.jsx)(`div`,{className:`repo-open-agents-title`,children:`Running agent sessions`}),(0,E.jsx)(`div`,{className:`repo-open-agents-grid`,children:ae.map(t=>(0,E.jsxs)(`div`,{className:`repo-open-list-button repo-open-claude-row`,children:[(0,E.jsxs)(`span`,{className:`repo-open-list-name repo-open-agent-name`,children:[[...new Set(t.sessions.map(e=>e.agent))].map(e=>(0,E.jsx)(hr,{agent:e,size:15,busy:t.sessions.some(t=>t.agent===e&&t.busy)},e)),_r(t.cwd)]}),(0,E.jsx)(`span`,{className:`repo-open-list-path`,children:t.cwd}),(0,E.jsx)(`span`,{className:`repo-open-claude-chips`,children:t.sessions.map(e=>(0,E.jsx)(`button`,{type:`button`,className:`repo-open-claude-chip${e.busy?` repo-open-claude-chip-busy`:``}`,disabled:!e.focusable||o!==null,title:e.focusable?`Focus this session's window — ${dr(e)} (pid ${e.pid})`:`${dr(e)} (pid ${e.pid}) — window focus unavailable for this session`,onClick:()=>void s(e),children:o===e.pid?`focusing…`:`${e.title??`${e.agent===`codex`?`codex `:``}${dr(e)}`}${e.count>1?` ×${e.count}`:``}`},`${e.pid}:${e.cwd}`))}),(0,E.jsx)(`button`,{type:`button`,className:`repo-open-row-action repo-open-claude-open`,onClick:()=>e(t.cwd),children:`Open`})]},t.cwd))})]}),(0,E.jsxs)(`div`,{className:`repo-open-shell`,children:[(0,E.jsxs)(`div`,{className:`repo-open-header`,children:[(0,E.jsx)(`h1`,{className:`repo-open-title`,children:`Open repository`}),(0,E.jsxs)(`form`,{onSubmit:ee,className:`repo-open-form`,children:[(0,E.jsxs)(`div`,{className:`repo-open-input-wrap`,children:[(0,E.jsx)(`input`,{type:`text`,value:c,onChange:e=>l(e.target.value),onFocus:()=>{h(!0),b.length>0&&_(!0)},onBlur:()=>{h(!1),_(!1)},onKeyDown:ne,placeholder:`/home/user/my-project`,className:`repo-open-input`,autoComplete:`off`,role:`combobox`,"aria-expanded":ce,"aria-controls":`repo-open-path-suggestions`,"aria-autocomplete":`list`}),ce&&(0,E.jsx)(`div`,{id:`repo-open-path-suggestions`,className:`repo-open-path-suggestions`,role:`listbox`,children:v&&b.length===0?(0,E.jsx)(`div`,{className:`repo-open-path-suggestions-loading`,children:`Loading...`}):b.map((e,t)=>(0,E.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":t===C,className:`repo-open-path-suggestion${t===C?` repo-open-path-suggestion-active`:``}`,onMouseEnter:()=>w(t),onMouseDown:t=>{t.preventDefault(),te(e)},children:[(0,E.jsxs)(`span`,{className:`repo-open-path-suggestion-main`,children:[(0,E.jsx)(`span`,{className:`repo-open-path-suggestion-name`,children:e.name}),(0,E.jsx)(`span`,{className:`repo-open-path-suggestion-path`,children:e.path})]}),e.isGitRepo&&(0,E.jsx)(`span`,{className:`repo-open-repo-badge`,children:`repo`})]},e.path))})]}),(0,E.jsx)(`button`,{type:`submit`,disabled:!c.trim(),className:`repo-open-button`,children:`Open`})]})]}),(0,E.jsxs)(`div`,{className:`repo-open-body`,children:[(0,E.jsxs)(`section`,{className:`repo-open-explorer`,"aria-label":`Folder tree`,children:[(0,E.jsxs)(`div`,{className:`repo-open-explorer-head`,children:[(0,E.jsx)(`button`,{type:`button`,className:`repo-open-root-nav`,disabled:!oe?.parentPath,onClick:()=>{oe?.parentPath&&T(oe.parentPath,{makeRoot:!0})},title:`Parent folder`,"aria-label":`Parent folder`,children:`..`}),(0,E.jsx)(`div`,{className:`repo-open-root-path`,children:oe?br(oe.path).map((e,t,n)=>(0,E.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,minWidth:0},children:[t>0&&!/^(\/|[A-Za-z]:[\\/])$/.test(n[t-1].label)&&(0,E.jsx)(`span`,{className:`repo-open-root-separator`,children:`/`}),(0,E.jsx)(`button`,{type:`button`,className:`repo-open-root-crumb`,onClick:()=>void T(e.path,{makeRoot:!0}),title:e.path,children:e.label})]},e.path)):`Loading...`}),oe?.isGitRepo&&(0,E.jsx)(`button`,{type:`button`,className:`repo-open-root-action`,onClick:()=>e(oe.path),children:`Open`})]}),(0,E.jsxs)(`div`,{className:`repo-open-tree`,children:[se&&(0,E.jsx)(`div`,{className:`repo-open-tree-empty`,style:{paddingLeft:16},children:`Loading...`}),u&&!se&&ie(u,0)]})]}),(0,E.jsxs)(`aside`,{className:`repo-open-side`,children:[t&&(0,E.jsx)(`p`,{className:`repo-open-error`,children:t}),n.length>0&&(0,E.jsxs)(`section`,{className:`repo-open-section`,children:[(0,E.jsx)(`div`,{className:`repo-open-section-title`,children:`Recent repositories`}),(0,E.jsx)(`div`,{className:`repo-open-list`,children:n.map(t=>(0,E.jsxs)(`button`,{type:`button`,onClick:()=>e(t),className:`repo-open-list-button`,children:[(0,E.jsx)(`span`,{className:`repo-open-list-name`,children:_r(t)}),(0,E.jsx)(`span`,{className:`repo-open-list-path`,children:t})]},t))})]}),i.length>0&&(0,E.jsxs)(`section`,{className:`repo-open-section`,children:[(0,E.jsx)(`div`,{className:`repo-open-section-title`,children:`Repositories`}),r&&(0,E.jsx)(`div`,{className:`repo-open-folder-caption`,children:r}),(0,E.jsx)(`div`,{className:`repo-open-list`,children:i.map(t=>(0,E.jsxs)(`button`,{type:`button`,onClick:()=>e(t),className:`repo-open-list-button`,children:[(0,E.jsx)(`span`,{className:`repo-open-list-name`,children:_r(t)}),(0,E.jsx)(`span`,{className:`repo-open-list-path`,children:t})]},t))})]})]})]})]}),(0,E.jsxs)(`div`,{className:`repo-open-version`,children:[`v`,`0.1.2`]})]})]})}var Sr={head:`Branches`,remote:`Remotes`,tag:`Tags`},Cr=[`head`,`remote`,`tag`];function wr({refs:e,onSelectRef:t,selectedSha:n,onClose:r}){let[i,a]=(0,x.useState)({head:!0,remote:!0,tag:!0}),[o,s]=(0,x.useState)(``),c=o.toLowerCase(),l={head:[],remote:[],tag:[]};for(let t of e)c&&!t.shortName.toLowerCase().includes(c)||l[t.kind].push(t);function u(e){a(t=>({...t,[e]:!t[e]}))}return(0,E.jsxs)(`div`,{style:{width:250,flexShrink:0,height:`100%`,background:`#181825`,borderRight:`1px solid #313244`,display:`flex`,flexDirection:`column`,overflowY:`auto`,userSelect:`none`},children:[(0,E.jsxs)(`div`,{style:{padding:`8px 14px`,fontSize:11,fontWeight:700,letterSpacing:`0.08em`,color:`#6c7086`,textTransform:`uppercase`,borderBottom:`1px solid #313244`,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[`Refs`,(0,E.jsx)(`button`,{onClick:r,title:`Hide refs`,style:{background:`none`,border:`none`,color:`#6c7086`,cursor:`pointer`,fontSize:14,padding:`0 2px`,lineHeight:1},children:`✕`})]}),(0,E.jsx)(`div`,{style:{padding:`6px 10px`,borderBottom:`1px solid #313244`},children:(0,E.jsx)(`input`,{type:`text`,value:o,onChange:e=>s(e.target.value),placeholder:`Filter branches...`,style:{width:`100%`,background:`#1e1e2e`,border:`1px solid #45475a`,borderRadius:4,color:`#cdd6f4`,fontSize:12,padding:`5px 8px`,outline:`none`,fontFamily:`inherit`},onFocus:e=>{e.currentTarget.style.borderColor=`#89b4fa`},onBlur:e=>{e.currentTarget.style.borderColor=`#45475a`}})}),Cr.map(e=>{let r=l[e];if(r.length===0)return null;let a=o?!1:i[e];return(0,E.jsxs)(`div`,{children:[(0,E.jsxs)(`button`,{onClick:()=>u(e),style:{width:`100%`,display:`flex`,alignItems:`center`,gap:6,padding:`6px 14px`,background:`none`,border:`none`,color:`#a6adc8`,fontSize:12,fontWeight:600,cursor:`pointer`,textAlign:`left`,fontFamily:`inherit`},children:[(0,E.jsx)(`span`,{style:{display:`inline-block`,transform:a?`rotate(-90deg)`:`rotate(0deg)`,transition:`transform 0.15s`,fontSize:10,lineHeight:1},children:`▼`}),Sr[e],(0,E.jsx)(`span`,{style:{marginLeft:`auto`,background:`#313244`,borderRadius:8,padding:`1px 6px`,fontSize:10,color:`#6c7086`,fontWeight:500},children:r.length})]}),!a&&(0,E.jsx)(`div`,{children:r.map(e=>{let r=e.targetSha===n;return(0,E.jsxs)(`button`,{onClick:()=>t(e),title:e.name,style:{width:`100%`,display:`flex`,alignItems:`center`,gap:8,padding:`5px 14px 5px 28px`,background:r?`#313244`:`none`,border:`none`,color:r?`#89b4fa`:`#cdd6f4`,fontSize:13,fontWeight:e.isCurrent?700:`normal`,cursor:`pointer`,textAlign:`left`,fontFamily:`inherit`,overflow:`hidden`},children:[(0,E.jsx)(Tr,{kind:e.kind,isCurrent:e.isCurrent}),(0,E.jsx)(`span`,{style:{flex:1,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e.shortName}),(e.ahead!=null||e.behind!=null)&&(0,E.jsxs)(`span`,{style:{display:`flex`,gap:4,flexShrink:0,fontSize:11},children:[e.ahead!=null&&e.ahead>0&&(0,E.jsxs)(`span`,{style:{color:`#a6e3a1`},children:[`↑`,e.ahead]}),e.behind!=null&&e.behind>0&&(0,E.jsxs)(`span`,{style:{color:`#f38ba8`},children:[`↓`,e.behind]})]})]},e.name)})})]},e)})]})}function Tr({kind:e,isCurrent:t}){let n={flexShrink:0,fontSize:11,width:14,textAlign:`center`};return e===`head`?(0,E.jsx)(`span`,{style:{...n,color:t?`#a6e3a1`:`#89b4fa`},children:t?`●`:`⎇`}):e===`remote`?(0,E.jsx)(`span`,{style:{...n,color:`#94e2d5`},children:`◉`}):(0,E.jsx)(`span`,{style:{...n,color:`#f9e2af`},children:`◆`})}var Er=Object.defineProperty,Dr=(e,t)=>{let n={};for(var r in e)Er(n,r,{get:e[r],enumerable:!0});return t||Er(n,Symbol.toStringTag,{value:`Module`}),n},Or=Wr(),z=e=>zr(e,Or),kr=Wr();z.write=e=>zr(e,kr);var Ar=Wr();z.onStart=e=>zr(e,Ar);var jr=Wr();z.onFrame=e=>zr(e,jr);var Mr=Wr();z.onFinish=e=>zr(e,Mr);var Nr=[];z.setTimeout=(e,t)=>{let n=z.now()+t,r=()=>{let e=Nr.findIndex(e=>e.cancel==r);~e&&Nr.splice(e,1),Lr-=+!!~e},i={time:n,handler:e,cancel:r};return Nr.splice(Pr(n),0,i),Lr+=1,Br(),i};var Pr=e=>~(~Nr.findIndex(t=>t.time>e)||~Nr.length);z.cancel=e=>{Ar.delete(e),jr.delete(e),Mr.delete(e),Or.delete(e),kr.delete(e)},z.sync=e=>{Rr=!0,z.batchedUpdates(e),Rr=!1},z.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,z.onStart(n)}return r.handler=e,r.cancel=()=>{Ar.delete(n),t=null},r};var Fr=typeof window<`u`?window.requestAnimationFrame:()=>{};z.use=e=>Fr=e,z.now=typeof performance<`u`?()=>performance.now():Date.now,z.batchedUpdates=e=>e(),z.catch=console.error,z.frameLoop=`always`,z.onDemand=()=>{},z.advance=()=>{z.frameLoop===`demand`?Ur():console.warn(`Cannot call the manual advancement of rafz whilst frameLoop is not set as demand`)};var Ir=-1,Lr=0,Rr=!1;function zr(e,t){Rr?(t.delete(e),e(0)):(t.add(e),Br(),z.frameLoop===`demand`&&z.onDemand())}function Br(){Ir<0&&(Ir=0,z.frameLoop!==`demand`&&Fr(Hr))}function Vr(){Ir=-1}function Hr(){~Ir&&(Fr(Hr),z.batchedUpdates(Ur))}function Ur(){let e=Ir;Ir=z.now();let t=Pr(Ir);if(t&&(Gr(Nr.splice(0,t),e=>e.handler()),Lr-=t),!Lr){Vr();return}Ar.flush(),Or.flush(e?Math.min(64,Ir-e):16.667),jr.flush(),kr.flush(),Mr.flush(),z.frameLoop===`demand`&&Lr>0&&z.onDemand()}function Wr(){let e=new Set,t=e;return{add(n){Lr+=+(t==e&&!e.has(n)),e.add(n)},delete(n){return Lr-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,Lr-=t.size,Gr(t,t=>t(n)&&e.add(t)),Lr+=e.size,t=e)}}}function Gr(e,t){e.forEach(e=>{try{t(e)}catch(e){z.catch(e)}})}function Kr(){}var qr=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),B={arr:Array.isArray,obj:e=>!!e&&e.constructor.name===`Object`,fun:(e=>typeof e==`function`),str:e=>typeof e==`string`,num:e=>typeof e==`number`,und:e=>e===void 0};function Jr(e,t){if(B.arr(e)){if(!B.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var V=(e,t)=>e.forEach(t);function Yr(e,t,n){if(B.arr(e)){for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);return}for(let r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var Xr=e=>B.und(e)?[]:B.arr(e)?e:[e];function Zr(e,t){if(e.size){let n=Array.from(e);e.clear(),V(n,t)}}var Qr=(e,...t)=>Zr(e,e=>e(...t)),$r=()=>typeof window>`u`||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),ei=Dr({assign:()=>oi,colors:()=>ri,createStringInterpolator:()=>ti,skipAnimation:()=>ii,to:()=>ni,willAdvance:()=>ai}),ti,ni,ri=null,ii=!1,ai=Kr,oi=e=>{e.to&&(ni=e.to),e.now&&(z.now=e.now),e.colors!==void 0&&(ri=e.colors),e.skipAnimation!=null&&(ii=e.skipAnimation),e.createStringInterpolator&&(ti=e.createStringInterpolator),e.requestAnimationFrame&&z.use(e.requestAnimationFrame),e.batchedUpdates&&(z.batchedUpdates=e.batchedUpdates),e.willAdvance&&(ai=e.willAdvance),e.frameLoop&&(z.frameLoop=e.frameLoop),e.onDemand&&(z.onDemand=e.onDemand)},si=new Set,ci=[],li=[],ui=0,di={get idle(){return!si.size&&!ci.length},start(e){ui>e.priority?(si.add(e),z.onStart(fi)):(pi(e),z(hi))},advance:hi,sort(e){if(ui)z.onFrame(()=>di.sort(e));else{let t=ci.indexOf(e);~t&&(ci.splice(t,1),mi(e))}},clear(){ci=[],si.clear()}};function fi(){si.forEach(pi),si.clear(),z(hi)}function pi(e){ci.includes(e)||mi(e)}function mi(e){ci.splice(gi(ci,t=>t.priority>e.priority),0,e)}function hi(e){let t=li;for(let n=0;n<ci.length;n++){let r=ci[n];ui=r.priority,r.idle||(ai(r),r.advance(e),r.idle||t.push(r))}return ui=0,li=ci,li.length=0,ci=t,ci.length>0}function gi(e,t){let n=e.findIndex(t);return n<0?e.length:n}var _i=(e,t,n)=>Math.min(Math.max(n,e),t),vi={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},yi=`[-+]?\\d*\\.?\\d+`,bi=`[-+]?\\d*\\.?\\d+%`;function xi(...e){return`\\(\\s*(`+e.join(`)\\s*,\\s*(`)+`)\\s*\\)`}var Si=RegExp(`rgb`+xi(yi,yi,yi)),Ci=RegExp(`rgba`+xi(yi,yi,yi,yi)),wi=RegExp(`hsl`+xi(yi,bi,bi)),Ti=RegExp(`hsla`+xi(yi,bi,bi,yi)),Ei=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Di=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Oi=/^#([0-9a-fA-F]{6})$/,ki=/^#([0-9a-fA-F]{8})$/;function Ai(e){let t;return typeof e==`number`?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Oi.exec(e))?parseInt(t[1]+`ff`,16)>>>0:ri&&ri[e]!==void 0?ri[e]:(t=Si.exec(e))?(Mi(t[1])<<24|Mi(t[2])<<16|Mi(t[3])<<8|255)>>>0:(t=Ci.exec(e))?(Mi(t[1])<<24|Mi(t[2])<<16|Mi(t[3])<<8|Pi(t[4]))>>>0:(t=Ei.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+`ff`,16)>>>0:(t=ki.exec(e))?parseInt(t[1],16)>>>0:(t=Di.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=wi.exec(e))?(H(Ni(t[1]),Fi(t[2]),Fi(t[3]))|255)>>>0:(t=Ti.exec(e))?(H(Ni(t[1]),Fi(t[2]),Fi(t[3]))|Pi(t[4]))>>>0:null}function ji(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function H(e,t,n){let r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,a=ji(i,r,e+1/3),o=ji(i,r,e),s=ji(i,r,e-1/3);return Math.round(a*255)<<24|Math.round(o*255)<<16|Math.round(s*255)<<8}function Mi(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function Ni(e){return(parseFloat(e)%360+360)%360/360}function Pi(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function Fi(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function Ii(e){let t=Ai(e);return t===null?e:(t||=0,`rgba(${(t&4278190080)>>>24}, ${(t&16711680)>>>16}, ${(t&65280)>>>8}, ${(t&255)/255})`)}var Li=(e,t,n)=>{if(B.fun(e))return e;if(B.arr(e))return Li({range:e,output:t,extrapolate:n});if(B.str(e.output[0]))return ti(e);let r=e,i=r.output,a=r.range||[0,1],o=r.extrapolateLeft||r.extrapolate||`extend`,s=r.extrapolateRight||r.extrapolate||`extend`,c=r.easing||(e=>e);return e=>{let t=zi(e,a);return Ri(e,a[t],a[t+1],i[t],i[t+1],c,o,s,r.map)}};function Ri(e,t,n,r,i,a,o,s,c){let l=c?c(e):e;if(l<t){if(o===`identity`)return l;o===`clamp`&&(l=t)}if(l>n){if(s===`identity`)return l;s===`clamp`&&(l=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?l=-l:n===1/0?l-=t:l=(l-t)/(n-t),l=a(l),r===-1/0?l=-l:i===1/0?l+=r:l=l*(i-r)+r,l)}function zi(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var Bi=(e,t=`end`)=>n=>{n=t===`end`?Math.min(n,.999):Math.max(n,.001);let r=n*e;return _i(0,1,(t===`end`?Math.floor(r):Math.ceil(r))/e)},Vi=1.70158,Hi=Vi*1.525,Ui=2.70158,Wi=2*Math.PI/3,Gi=2*Math.PI/4.5,Ki=e=>{let t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},qi={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-(-2*e+2)**2/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-(1-e)**3,easeInOutCubic:e=>e<.5?4*e*e*e:1-(-2*e+2)**3/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-(1-e)**4,easeInOutQuart:e=>e<.5?8*e*e*e*e:1-(-2*e+2)**4/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-(1-e)**5,easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-(-2*e+2)**5/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:2**(10*e-10),easeOutExpo:e=>e===1?1:1-2**(-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?2**(20*e-10)/2:(2-2**(-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-e**2),easeOutCirc:e=>Math.sqrt(1-(e-1)**2),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-(2*e)**2))/2:(Math.sqrt(1-(-2*e+2)**2)+1)/2,easeInBack:e=>Ui*e*e*e-Vi*e*e,easeOutBack:e=>1+Ui*(e-1)**3+Vi*(e-1)**2,easeInOutBack:e=>e<.5?(2*e)**2*(3.5949095*2*e-Hi)/2:((2*e-2)**2*(3.5949095*(e*2-2)+Hi)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-(2**(10*e-10))*Math.sin((e*10-10.75)*Wi),easeOutElastic:e=>e===0?0:e===1?1:2**(-10*e)*Math.sin((e*10-.75)*Wi)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(2**(20*e-10)*Math.sin((20*e-11.125)*Gi))/2:2**(-20*e+10)*Math.sin((20*e-11.125)*Gi)/2+1,easeInBounce:e=>1-Ki(1-e),easeOutBounce:Ki,easeInOutBounce:e=>e<.5?(1-Ki(1-2*e))/2:(1+Ki(2*e-1))/2,steps:Bi},Ji=Symbol.for(`FluidValue.get`),Yi=Symbol.for(`FluidValue.observers`),Xi=e=>!!(e&&e[Ji]),Zi=e=>e&&e[Ji]?e[Ji]():e,Qi=e=>e[Yi]||null;function $i(e,t){e.eventObserved?e.eventObserved(t):e(t)}function ea(e,t){let n=e[Yi];n&&n.forEach(e=>{$i(e,t)})}var ta=class{constructor(e){if(!e&&!(e=this.get))throw Error(`Unknown getter`);na(this,e)}},na=(e,t)=>aa(e,Ji,t);function ra(e,t){if(e[Ji]){let n=e[Yi];n||aa(e,Yi,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function ia(e,t){let n=e[Yi];if(n&&n.has(t)){let r=n.size-1;r?n.delete(t):e[Yi]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var aa=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),oa=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,sa=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ca=RegExp(`(${oa.source})(%|[a-z]+)`,`i`),la=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,ua=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,da=e=>{let[t,n]=fa(e);if(!t||$r())return e;let r=window.getComputedStyle(document.documentElement).getPropertyValue(t);return r?r.trim():n&&n.startsWith(`--`)?window.getComputedStyle(document.documentElement).getPropertyValue(n)||e:n&&ua.test(n)?da(n):n||e},fa=e=>{let t=ua.exec(e);if(!t)return[,];let[,n,r]=t;return[n,r]},pa,ma=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,ha=e=>e.match(oa)??[],ga=e=>{pa||=ri?RegExp(`(${Object.keys(ri).join(`|`)})(?!\\w)`,`g`):/^\b$/;let t=e.output.map(e=>Zi(e).replace(ua,da).replace(sa,Ii).replace(pa,Ii)),n=t.map(e=>ha(e).map(Number)),r=n[0].map((e,t)=>n.map(e=>{if(!(t in e))throw Error(`The arity of each "output" value must be equal`);return e[t]})).map(t=>Li({...e,output:t})),i=e.range||[0,1],a=t.map(e=>ha(e)),o=a[0].map((e,t)=>{let n=a.map(e=>{let n=e[t],r=n.indexOf(`.`);return r===-1?0:n.length-r-1});return n.every(e=>e===n[0])&&n[0]>0?n[0]:null});return e=>{let n=i.indexOf(e);if(n!==-1)return t[n];let a=!ca.test(t[0])&&t.find(e=>ca.test(e))?.replace(oa,``),s=0;return t[0].replace(oa,()=>{let t=s++,n=r[t](e),i=o[t];return`${i==null?n:n.toFixed(i)}${a||``}`}).replace(la,ma)}},_a=`react-spring: `,va=e=>{let t=e,n=!1;if(typeof t!=`function`)throw TypeError(`${_a}once requires a function parameter`);return(...e)=>{n||=(t(...e),!0)}},ya=va(console.warn);function ba(){ya(`${_a}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var xa=va(console.warn);function Sa(){xa(`${_a}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function Ca(e){return B.str(e)&&(e[0]==`#`||/\d/.test(e)||!$r()&&ua.test(e)||e in(ri||{}))}var wa=$r()?x.useEffect:x.useLayoutEffect,Ta=()=>{let e=(0,x.useRef)(!1);return wa(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Ea(){let e=(0,x.useState)()[1],t=Ta();return()=>{t.current&&e(Math.random())}}var Da=e=>(0,x.useEffect)(e,Oa),Oa=[];function ka(e){let t=(0,x.useRef)(void 0);return(0,x.useEffect)(()=>{t.current=e}),t.current}var Aa=Symbol.for(`Animated:node`),ja=e=>!!e&&e[Aa]===e,Ma=e=>e&&e[Aa],Na=(e,t)=>qr(e,Aa,t),Pa=e=>e&&e[Aa]&&e[Aa].getPayload(),Fa=class{constructor(){Na(this,this)}getPayload(){return this.payload||[]}},Ia=class e extends Fa{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,B.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new e(t)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return B.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){let{done:e}=this;this.done=!1,B.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},La=class e extends Ia{constructor(e){super(0),this._string=null,this._toString=Li({output:[e,e]})}static create(t){return new e(t)}getValue(){return this._string??=this._toString(this._value)}setValue(e){if(B.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=Li({output:[this.getValue(),e]})),this._value=0,super.reset()}},Ra={dependencies:null},za=class extends Fa{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){let t={};return Yr(this.source,(n,r)=>{ja(n)?t[r]=n.getValue(e):Xi(n)?t[r]=Zi(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&V(this.payload,e=>e.reset())}_makePayload(e){if(e){let t=new Set;return Yr(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Ra.dependencies&&Xi(e)&&Ra.dependencies.add(e);let t=Pa(e);t&&V(t,e=>this.add(e))}},Ba=class e extends za{constructor(e){super(e)}static create(t){return new e(t)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){let t=this.getPayload();return e.length==t.length?t.map((t,n)=>t.setValue(e[n])).some(Boolean):(super.setValue(e.map(Va)),!0)}};function Va(e){return(Ca(e)?La:Ia).create(e)}function Ha(e){let t=Ma(e);return t?t.constructor:B.arr(e)?Ba:Ca(e)?La:Ia}var Ua=(e,t)=>{let n=!B.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,x.forwardRef)((r,i)=>{let a=(0,x.useRef)(null),o=n&&(0,x.useCallback)(e=>{a.current=Ka(i,e)},[i]),[s,c]=Ga(r,t),l=Ea(),u=()=>{let e=a.current;n&&!e||(e?t.applyAnimatedValues(e,s.getValue(!0)):!1)===!1&&l()},d=new Wa(u,c),f=(0,x.useRef)(void 0);wa(()=>(f.current=d,V(c,e=>ra(e,d)),()=>{f.current&&(V(f.current.deps,e=>ia(e,f.current)),z.cancel(f.current.update))})),(0,x.useEffect)(u,[]),Da(()=>()=>{let e=f.current;V(e.deps,t=>ia(t,e))});let p=t.getComponentProps(s.getValue());return x.createElement(e,{...p,ref:o})})},Wa=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type==`change`&&z.write(this.update)}};function Ga(e,t){let n=new Set;return Ra.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new za(e),Ra.dependencies=null,[e,n]}function Ka(e,t){return e&&(B.fun(e)?e(t):e.current=t),t}var qa=Symbol.for(`AnimatedComponent`),Ja=new WeakMap,Ya=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=e=>new za(e),getComponentProps:r=e=>e}={})=>{let i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},a=e=>{let t=Xa(e)||`Anonymous`;if(B.str(e))e=a[e]||(a[e]=Ua(e,i));else{let t=e[qa]??Ja.get(e);if(!t){t=Ua(e,i);try{e[qa]=t}catch{}Ja.set(e,t)}e=t}return e.displayName=`Animated(${t})`,e};return Yr(e,(t,n)=>{B.arr(e)&&(n=Xa(t)),a[n]=a(t)}),{animated:a}},Xa=e=>B.str(e)?e:e&&B.str(e.displayName)?e.displayName:B.fun(e)&&e.name||null;function Za(e,...t){return B.fun(e)?e(...t):e}var Qa=(e,t)=>e===!0||!!(t&&e&&(B.fun(e)?e(t):Xr(e).includes(t))),$a=(e,t)=>B.obj(e)?t&&e[t]:e,eo=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,to=e=>e,no=(e,t=to)=>{let n=ro;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));let r={};for(let i of n){let n=t(e[i],i);B.und(n)||(r[i]=n)}return r},ro=[`config`,`onProps`,`onStart`,`onChange`,`onPause`,`onResume`,`onRest`],io={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function ao(e){let t={},n=0;if(Yr(e,(e,r)=>{io[r]||(t[r]=e,n++)}),n)return t}function oo(e){let t=ao(e);if(t){let n={to:t};return Yr(e,(e,r)=>r in t||(n[r]=e)),n}return{...e}}function so(e){let t=Zi(e);return B.arr(t)?t.map(so):Ca(t)?ei.createStringInterpolator({range:[0,1],output:[t,t]})(1):t}function co(e){for(let t in e)return!0;return!1}function lo(e){return B.fun(e)||B.arr(e)&&B.obj(e[0])}function U(e,t){e.ref?.delete(e),t?.delete(e)}function uo(e,t){t&&e.ref!==t&&(e.ref?.delete(e),t.add(e),e.ref=t)}var fo={...{default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}}.default,mass:1,damping:1,easing:qi.linear,clamp:!1},po=class{constructor(){this.velocity=0,Object.assign(this,fo)}};function mo(e,t,n){n&&(n={...n},ho(n,t),t={...n,...t}),ho(e,t),Object.assign(e,t);for(let t in fo)e[t]??(e[t]=fo[t]);let{frequency:r,damping:i}=e,{mass:a}=e;return B.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=(2*Math.PI/r)**2*a,e.friction=4*Math.PI*i*a/r),e}function ho(e,t){if(!B.und(t.decay))e.duration=void 0;else{let n=!B.und(t.tension)||!B.und(t.friction);(n||!B.und(t.frequency)||!B.und(t.damping)||!B.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var go=[],_o=class{constructor(){this.changed=!1,this.values=go,this.toValues=null,this.fromValues=go,this.config=new po,this.immediate=!1}};function vo(e,{key:t,props:n,defaultProps:r,state:i,actions:a}){return new Promise((o,s)=>{let c,l,u=Qa(n.cancel??r?.cancel,t);if(u)p();else{B.und(n.pause)||(i.paused=Qa(n.pause,t));let e=r?.pause;e!==!0&&(e=i.paused||Qa(e,t)),c=Za(n.delay||0,t),e?(i.resumeQueue.add(f),a.pause()):(a.resume(),f())}function d(){i.resumeQueue.add(f),i.timeouts.delete(l),l.cancel(),c=l.time-z.now()}function f(){c>0&&!ei.skipAnimation?(i.delayed=!0,l=z.setTimeout(p,c),i.pauseQueue.add(d),i.timeouts.add(l)):p()}function p(){i.delayed&&=!1,i.pauseQueue.delete(d),i.timeouts.delete(l),e<=(i.cancelId||0)&&(u=!0);try{a.start({...n,callId:e,cancel:u},o)}catch(e){s(e)}}})}var yo=(e,t)=>t.length==1?t[0]:t.some(e=>e.cancelled)?So(e.get()):t.every(e=>e.noop)?bo(e.get()):xo(e.get(),t.every(e=>e.finished)),bo=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),xo=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),So=e=>({value:e,cancelled:!0,finished:!1});function Co(e,t,n,r){let{callId:i,parentId:a,onRest:o}=t,{asyncTo:s,promise:c}=n;return!a&&e===s&&!t.reset?c:n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;let l=no(t,(e,t)=>t===`onRest`?void 0:e),u,d,f=new Promise((e,t)=>(u=e,d=t)),p=e=>{let t=i<=(n.cancelId||0)&&So(r)||i!==n.asyncId&&xo(r,!1);if(t)throw e.result=t,d(e),e},m=0,h=(e,t)=>{let a=new To,o=new Eo;return(async()=>{p(a);let s=B.obj(e)?{...e}:{...t,to:e};if(s.parentId=i,Yr(l,(e,t)=>{B.und(s[t])&&(s[t]=e)}),ei.skipAnimation){if(++m>1024)throw wo(n),o.result=xo(r,!1),d(o),o;return s.immediate=!0,await r.start(s)}let c=await r.start(s);return p(a),n.paused&&await new Promise(e=>{n.resumeQueue.add(e)}),c})()},g;try{let t;t=B.arr(e)?(async e=>{for(let t of e)await h(t)})(e):Promise.resolve(e(h,r.stop.bind(r))),await Promise.all([t.then(u),f]),g=xo(r.get(),!0,!1)}catch(e){if(e instanceof To)g=e.result;else if(e instanceof Eo)g=e.result;else throw e}finally{i==n.asyncId&&(n.asyncId=a,n.asyncTo=a?s:void 0,n.promise=a?c:void 0)}return B.fun(o)&&z.batchedUpdates(()=>{o(g,r,r.item)}),g})()}function wo(e,t){Zr(e.timeouts,e=>e.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var To=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},Eo=class extends Error{constructor(){super(`SkipAnimationSignal`)}},Do=e=>e instanceof ko,Oo=1,ko=class extends ta{constructor(...e){super(...e),this.id=Oo++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=Ma(this);return e&&e.getValue()}to(...e){return ei.to(this,e)}interpolate(...e){return ba(),ei.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){ea(this,{type:`change`,parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||di.sort(this),ea(this,{type:`priority`,parent:this,priority:e})}},Ao=Symbol.for(`SpringPhase`),jo=1,Mo=2,No=4,Po=e=>(e[Ao]&jo)>0,Fo=e=>(e[Ao]&Mo)>0,Io=e=>(e[Ao]&No)>0,Lo=(e,t)=>t?e[Ao]|=3:e[Ao]&=-3,Ro=(e,t)=>t?e[Ao]|=No:e[Ao]&=-5,zo=class extends ko{constructor(e,t){if(super(),this.animation=new _o,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!B.und(e)||!B.und(t)){let n=B.obj(e)?{...e}:{...t,from:e};B.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Fo(this)||this._state.asyncTo)||Io(this)}get goal(){return Zi(this.animation.to)}get velocity(){let e=Ma(this);return e instanceof Ia?e.lastVelocity||0:e.getPayload().map(e=>e.lastVelocity||0)}get hasAnimated(){return Po(this)}get isAnimating(){return Fo(this)}get isPaused(){return Io(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,r=this.animation,{toValues:i}=r,{config:a}=r,o=Pa(r.to);!o&&Xi(r.to)&&(i=Xr(Zi(r.to))),r.values.forEach((s,c)=>{if(s.done)return;let l=s.constructor==La?1:o?o[c].lastPosition:i[c],u=r.immediate,d=l;if(!u){if(d=s.lastPosition,a.tension<=0){s.done=!0;return}let t=s.elapsedTime+=e,n=r.fromValues[c],i=s.v0==null?s.v0=B.arr(a.velocity)?a.velocity[c]:a.velocity:s.v0,o,f=a.precision||(n==l?.005:Math.max(Math.max(Math.abs(l),Math.abs(n),1)*2**-52,Math.min(1,Math.abs(l-n)*.001)));if(!B.und(a.duration)){let r=1;a.duration>0&&(this._memoizedDuration!==a.duration&&(this._memoizedDuration=a.duration,s.durationProgress>0&&(s.elapsedTime=a.duration*s.durationProgress,t=s.elapsedTime+=e)),r=(a.progress||0)+t/this._memoizedDuration,r=r>1?1:r<0?0:r,s.durationProgress=r),d=n+a.easing(r)*(l-n),o=(d-s.lastPosition)/e,u=r==1}else if(a.decay){let e=a.decay===!0?.998:a.decay,r=Math.exp(-(1-e)*t);d=n+i/(1-e)*(1-r),u=Math.abs(s.lastPosition-d)<=f,o=i*r}else{o=s.lastVelocity==null?i:s.lastVelocity;let t=a.restVelocity||f/10,r=a.clamp?0:a.bounce,c=!B.und(r),p=n==l?s.v0>0:n<l,m,h=!1,g=Math.ceil(e/1);for(let e=0;e<g&&(m=Math.abs(o)>t,!(!m&&(u=Math.abs(l-d)<=f,u)));++e){c&&(h=d==l||d>l==p,h&&(o=-o*r,d=l));let e=(-a.tension*1e-6*(d-l)+-a.friction*.001*o)/a.mass;o+=e*1,d+=o*1}}s.lastVelocity=o,Number.isNaN(d)&&(console.warn(`Got NaN while animating:`,this),u=!0)}o&&!o[c].done&&(u=!1),u?s.done=!0:t=!1,s.setValue(d,a.round)&&(n=!0)});let s=Ma(this),c=s.getValue();if(t){let e=Zi(r.to);(c!==e||n)&&!a.decay?(s.setValue(e),this._onChange(e)):n&&a.decay&&this._onChange(c),this._stop()}else n&&this._onChange(c)}set(e){return z.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Fo(this)){let{to:e,config:t}=this.animation;z.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||=[]).push(e),this}start(e,t){let n;return B.und(e)?(n=this.queue||[],this.queue=[]):n=[B.obj(e)?e:{...t,to:e}],Promise.all(n.map(e=>this._update(e))).then(e=>yo(this,e))}stop(e){let{to:t}=this.animation;return B.und(t)||this._focus(this.get()),wo(this._state,e&&this._lastCallId),z.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type==`change`?this._start():e.type==`priority`&&(this.priority=e.priority+1)}_prepareNode(e){let t=this.key||``,{to:n,from:r}=e;n=B.obj(n)?n[t]:n,(n==null||lo(n))&&(n=void 0),r=B.obj(r)?r[t]:r,r??=void 0;let i={to:n,from:r};return Po(this)||(e.reverse&&([n,r]=[r,n]),r=Zi(r),B.und(r)?Ma(this)||this._set(n):this._set(r)),i}_update({...e},t){let{key:n,defaultProps:r}=this;e.default&&Object.assign(r,no(e,(e,t)=>/^on/.test(t)?$a(e,n):e)),Ko(this,e,`onProps`),qo(this,`onProps`,e,this);let i=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");let a=this._state;return vo(++this._lastCallId,{key:n,props:e,defaultProps:r,state:a,actions:{pause:()=>{Io(this)||(Ro(this,!0),Qr(a.pauseQueue),qo(this,`onPause`,xo(this,Bo(this,this.animation.to)),this))},resume:()=>{Io(this)&&(Ro(this,!1),Fo(this)&&this._resume(),Qr(a.resumeQueue),qo(this,`onResume`,xo(this,Bo(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(n=>{if(e.loop&&n.finished&&!(t&&n.noop)){let t=Vo(e);if(t)return this._update(t,!0)}return n})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(So(this));let r=!B.und(e.to),i=!B.und(e.from);if(r||i)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(So(this));let{key:a,defaultProps:o,animation:s}=this,{to:c,from:l}=s,{to:u=c,from:d=l}=e;i&&!r&&(!t.default||B.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);let f=!Jr(d,l);f&&(s.from=d),d=Zi(d);let p=!Jr(u,c);p&&this._focus(u);let m=lo(t.to),{config:h}=s,{decay:g,velocity:_}=h;(r||i)&&!h.decay&&(h.velocity=0),t.config&&!m&&mo(h,Za(t.config,a),t.config===o.config?void 0:Za(o.config,a));let v=Ma(this);if(!v||B.und(u))return n(xo(this,!0));let y=B.und(t.reset)?i&&!t.default:!B.und(d)&&Qa(t.reset,a),b=y?d:this.get(),x=so(u),S=B.num(x)||B.arr(x)||Ca(x),C=!m&&(!S||Qa(o.immediate||t.immediate,a));if(p){let e=Ha(u);if(e!==v.constructor)if(C)v=this._set(x);else throw Error(`Cannot animate between ${v.constructor.name} and ${e.name}, as the "to" prop suggests`)}let w=v.constructor,T=Xi(u),E=!1;if(!T){let e=y||!Po(this)&&f;(p||e)&&(E=Jr(so(b),x),T=!E),(!Jr(s.immediate,C)&&!C||!Jr(h.decay,g)||!Jr(h.velocity,_))&&(T=!0)}if(E&&Fo(this)&&(s.changed&&!y?T=!0:T||this._stop(c)),!m&&((T||Xi(c))&&(s.values=v.getPayload(),s.toValues=Xi(u)?null:w==La?[1]:Xr(x)),s.immediate!=C&&(s.immediate=C,!C&&!y&&this._set(c)),T)){let{onRest:e}=s;V(Go,e=>Ko(this,t,e));let r=xo(this,Bo(this,c));Qr(this._pendingCalls,r),this._pendingCalls.add(n),s.changed&&z.batchedUpdates(()=>{s.changed=!y,e?.(r,this),y?Za(o.onRest,r):s.onStart?.(r,this)})}y&&this._set(b),m?n(Co(t.to,t,this._state,this)):T?this._start():Fo(this)&&!p?this._pendingCalls.add(n):n(bo(b))}_focus(e){let t=this.animation;e!==t.to&&(Qi(this)&&this._detach(),t.to=e,Qi(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;Xi(t)&&(ra(t,this),Do(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;Xi(e)&&ia(e,this)}_set(e,t=!0){let n=Zi(e);if(!B.und(n)){let e=Ma(this);if(!e||!Jr(n,e.getValue())){let r=Ha(n);!e||e.constructor!=r?Na(this,r.create(n)):e.setValue(n),e&&z.batchedUpdates(()=>{this._onChange(n,t)})}}return Ma(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,qo(this,`onStart`,xo(this,Bo(this,e.to)),this))}_onChange(e,t){let n=xo(e,!1);t||(this._onStart(),Za(this.animation.onChange,n,this)),Za(this.defaultProps.onChange,n,this),super._onChange(e,t)}_start(){let e=this.animation;Ma(this).reset(Zi(e.to)),e.immediate||(e.fromValues=e.values.map(e=>e.lastPosition)),Fo(this)||(Lo(this,!0),Io(this)||this._resume())}_resume(){ei.skipAnimation?this.finish():di.start(this)}_stop(e,t){if(Fo(this)){Lo(this,!1);let n=this.animation;V(n.values,e=>{e.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),ea(this,{type:`idle`,parent:this});let r=t?So(this.get()):xo(this.get(),Bo(this,e??n.to));Qr(this._pendingCalls,r),n.changed=!1,qo(this,`onRest`,r,this)}}};function Bo(e,t){let n=so(t);return Jr(so(e.get()),n)}function Vo(e,t=e.loop,n=e.to){let r=Za(t);if(r){let i=r!==!0&&oo(r),a=(i||e).reverse,o=!i||i.reset;return Ho({...e,loop:t,default:!1,pause:void 0,to:!a||lo(n)?n:void 0,from:o?e.from:void 0,reset:o,...i})}}function Ho(e){let{to:t,from:n}=e=oo(e),r=new Set;return B.obj(t)&&Wo(t,r),B.obj(n)&&Wo(n,r),e.keys=r.size?Array.from(r):null,e}function Uo(e){let t=Ho(e);return B.und(t.default)&&(t.default=no(t)),t}function Wo(e,t){Yr(e,(e,n)=>e!=null&&t.add(n))}var Go=[`onStart`,`onRest`,`onChange`,`onPause`,`onResume`];function Ko(e,t,n){e.animation[n]=t[n]===eo(t,n)?void 0:$a(t[n],e.key)}function qo(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var Jo=[`onStart`,`onChange`,`onRest`],Yo=1,Xo=class{constructor(e,t){this.id=Yo++,this.springs={},this.queue=[],this._lastAsyncId=0,this._lastLoopId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){let e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(let t in e){let n=e[t];B.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(Ho(e)),this}start(e){let{queue:t}=this;return e?t=Xr(e).map(Ho):this.queue=[],this._flush?this._flush(this,t):(rs(this,t),Zo(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){let n=this.springs;V(Xr(t),t=>n[t].stop(!!e))}else wo(this._state,this._lastAsyncId),this.each(t=>t.stop(!!e));return this}pause(e){if(B.und(e))this.start({pause:!0});else{let t=this.springs;V(Xr(e),e=>t[e].pause())}return this}resume(e){if(B.und(e))this.start({pause:!1});else{let t=this.springs;V(Xr(e),e=>t[e].resume())}return this}each(e){Yr(this.springs,e)}onLoopReset(e){let t=this._onLoopReset??=new Set;return t.add(e),()=>{t.delete(e)}}_onFrame(){let{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,i=this._changed.size>0;(r&&!this._started||i&&!this._started)&&(this._started=!0,Zr(e,([e,t])=>{t.value=this.get(),e(t,this,this._item)}));let a=!r&&this._started,o=i||a&&n.size?this.get():null;i&&t.size&&Zr(t,([e,t])=>{t.value=o,e(t,this,this._item)}),a&&(this._started=!1,Zr(n,([e,t])=>{t.value=o,e(t,this,this._item)}))}eventObserved(e){if(e.type==`change`)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type==`idle`)this._active.delete(e.parent);else return;z.onFrame(this._onFrame)}};function Zo(e,t){return Promise.all(t.map(t=>Qo(e,t))).then(t=>yo(e,t))}async function Qo(e,t,n){let{keys:r,to:i,from:a,loop:o,onRest:s,onResolve:c}=t,l=B.obj(t.default)&&t.default;o&&(t.loop=!1);let u=t,d=!n&&!u.parentId&&`loop`in t?++e._lastLoopId:n?u.loopId:e._lastLoopId;i===!1&&(t.to=null),a===!1&&(t.from=null);let f=B.arr(i)||B.fun(i)?i:void 0;f?(t.to=void 0,t.onRest=void 0,l&&(l.onRest=void 0)):V(Jo,n=>{let r=t[n];if(B.fun(r)){let i=e._events[n];t[n]=(({finished:e,cancelled:t})=>{let n=i.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):i.set(r,{value:null,finished:e||!1,cancelled:t||!1})}),l&&(l[n]=t[n])}});let p=e._state;t.pause===!p.paused?(p.paused=t.pause,Qr(t.pause?p.pauseQueue:p.resumeQueue)):p.paused&&(t.pause=!0);let m=(r||Object.keys(e.springs)).map(n=>e.springs[n].start(t)),h=t.cancel===!0||eo(t,`cancel`)===!0;(f||h&&p.asyncId)&&m.push(vo(++e._lastAsyncId,{props:t,state:p,actions:{pause:Kr,resume:Kr,start(t,n){h?(wo(p,e._lastAsyncId),n(So(e))):(t.onRest=s,n(Co(f,t,p,e)))}}})),p.paused&&await new Promise(e=>{p.resumeQueue.add(e)});let g=yo(e,await Promise.all(m));if(o&&g.finished&&!(n&&g.noop)&&d===e._lastLoopId){let n=Vo(t,o,i);if(n)return n.loopId=d,e._onLoopReset?.forEach(e=>e()),rs(e,[n]),Qo(e,n,!0)}return c&&z.batchedUpdates(()=>c(g,e,e.item)),g}function $o(e,t){let n={...e.springs};return t&&V(Xr(t),e=>{B.und(e.keys)&&(e=Ho(e)),B.obj(e.to)||(e={...e,to:void 0}),ns(n,e,e=>ts(e))}),es(e,n),n}function es(e,t){Yr(t,(t,n)=>{e.springs[n]||(e.springs[n]=t,ra(t,e))})}function ts(e,t){let n=new zo;return n.key=e,t&&ra(n,t),n}function ns(e,t,n){t.keys&&V(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function rs(e,t){V(t,t=>{ns(e.springs,t,t=>ts(t,e))})}var is=x.createContext({pause:!1,immediate:!1}),as=()=>{let e=[],t=function(t){Sa();let r=[];return V(e,(e,i)=>{if(B.und(t))r.push(e.start());else{let a=n(t,e,i);a&&r.push(e.start(a))}}),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){let n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return V(e,e=>e.pause(...arguments)),this},t.resume=function(){return V(e,e=>e.resume(...arguments)),this},t.set=function(t){V(e,(e,n)=>{let r=B.fun(t)?t(n,e):t;r&&e.set(r)})},t.start=function(t){let n=[];return V(e,(e,r)=>{if(B.und(t))n.push(e.start());else{let i=this._getProps(t,e,r);i&&n.push(e.start(i))}}),n},t.stop=function(){return V(e,e=>e.stop(...arguments)),this},t.update=function(t){return V(e,(e,n)=>e.update(this._getProps(t,e,n))),this};let n=function(e,t,n){return B.fun(e)?e(n,t):e};return t._getProps=n,t};function os(e,t,n){let r=B.fun(t)&&t;r&&!n&&(n=[]);let i=(0,x.useMemo)(()=>r||arguments.length==3?as():void 0,[]),a=(0,x.useRef)(0),o=Ea(),s=(0,x.useMemo)(()=>({ctrls:[],queue:[],flush(e,t){let n=$o(e,t);return a.current>0&&!s.queue.length&&!Object.keys(n).some(t=>!e.springs[t])?Zo(e,t):new Promise(r=>{es(e,n),s.queue.push(()=>{r(Zo(e,t))}),o()})}}),[]),c=(0,x.useRef)([...s.ctrls]),l=(0,x.useRef)([]),u=(0,x.useRef)([]);u.current=[];let d=ka(e)||0;(0,x.useMemo)(()=>{V(c.current.slice(e,d),e=>{U(e,i),e.stop(!0)}),c.current.length=e,f(d,e)},[e]),(0,x.useMemo)(()=>{f(0,Math.min(d,e))},n);function f(e,n){for(let i=e;i<n;i++){let e=c.current[i]||(c.current[i]=new Xo(null,s.flush)),n=r?r(i,e):t[i];n&&(l.current[i]=Uo(n))}}let p=c.current.map((e,t)=>$o(e,l.current[t])),m=(0,x.useContext)(is),h=m!==ka(m)&&co(m);wa(()=>{a.current++,s.ctrls=c.current;let{queue:e}=s;e.length&&(s.queue=[],V(e,e=>e()));let t=l.current.length>0?l.current:u.current;V(c.current,(e,n)=>{i?.add(e),h&&e.start({default:m});let r=t[n];r&&(uo(e,r.ref),e.ref?e.queue.push({...r,default:B.obj(r.default)?{...r.default}:r.default}):e.start(r))}),l.current.length>0&&(u.current=l.current),l.current=[]}),Da(()=>()=>{V(s.ctrls,e=>e.stop(!0))});let g=p.map(e=>({...e}));return i?[g,i]:g}function ss(e,t){let n=B.fun(e),[[r],i]=os(1,n?e:[e],n?t||[]:t);return n||arguments.length==2?[r,i]:r}var cs=class extends ko{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=Li(...t);let n=this._get(),r=Ha(n);Na(this,r.create(n))}advance(e){let t=this._get();Jr(t,this.get())||(Ma(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&us(this._active)&&ds(this)}_get(){let e=B.arr(this.source)?this.source.map(Zi):Xr(Zi(this.source));return this.calc(...e)}_start(){this.idle&&!us(this._active)&&(this.idle=!1,V(Pa(this),e=>{e.done=!1}),ei.skipAnimation?(z.batchedUpdates(()=>this.advance()),ds(this)):di.start(this))}_attach(){let e=1;V(Xr(this.source),t=>{Xi(t)&&ra(t,this),Do(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){V(Xr(this.source),e=>{Xi(e)&&ia(e,this)}),this._active.clear(),ds(this)}eventObserved(e){e.type==`change`?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type==`idle`?this._active.delete(e.parent):e.type==`priority`&&(this.priority=Xr(this.source).reduce((e,t)=>Math.max(e,(Do(t)?t.priority:0)+1),0))}};function ls(e){return e.idle!==!1}function us(e){return!e.size||Array.from(e).every(ls)}function ds(e){e.idle||(e.idle=!0,V(Pa(e),e=>{e.done=!0}),ea(e,{type:`idle`,parent:e}))}var fs=(e,...t)=>new cs(e,t);ei.assign({createStringInterpolator:ga,to:(e,t)=>new cs(e,t)}),di.advance;var ps=g(),ms=/^--/;function hs(e,t){return t==null||typeof t==`boolean`||t===``?``:typeof t==`number`&&t!==0&&!ms.test(e)&&!(vs.hasOwnProperty(e)&&vs[e])?t+`px`:(``+t).trim()}var gs={};function _s(e,t){if(!e.nodeType||!e.setAttribute||!e.removeAttribute)return!1;let n=e.nodeName===`filter`||e.parentNode&&e.parentNode.nodeName===`filter`,{className:r,style:i,children:a,scrollTop:o,scrollLeft:s,viewBox:c,...l}=t,u=Object.values(l),d=Object.keys(l).map(t=>n||e.hasAttribute(t)?t:gs[t]||(gs[t]=t.replace(/([A-Z])/g,e=>`-`+e.toLowerCase())));t.hasOwnProperty(`children`)&&(e.textContent=a);for(let t in i)if(i.hasOwnProperty(t)){let n=hs(t,i[t]);ms.test(t)?e.style.setProperty(t,n):e.style[t]=n}d.forEach((t,n)=>{let r=u[n];r===void 0?e.removeAttribute(t):e.setAttribute(t,r)}),t.hasOwnProperty(`className`)&&(r===void 0?e.removeAttribute(`class`):e.className=r),o!==void 0&&(e.scrollTop=o),s!==void 0&&(e.scrollLeft=s),t.hasOwnProperty(`viewBox`)&&(c===void 0?e.removeAttribute(`viewBox`):e.setAttribute(`viewBox`,c))}var vs={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ys=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),bs=[`Webkit`,`Ms`,`Moz`,`O`];vs=Object.keys(vs).reduce((e,t)=>(bs.forEach(n=>e[ys(n,t)]=e[t]),e),vs);var xs=/^(matrix3d|matrix|translate3d|translate[XYZ]?|scale3d|scale[XYZ]?|rotate3d|rotate[XYZ]?|skew[XY]?)$/,Ss=/^(translate)/,Cs=/^(rotate|skew)/,ws=(e,t)=>B.num(e)&&e!==0?e+t:e,Ts=(e,t)=>B.arr(e)?e.every(e=>Ts(e,t)):B.num(e)?e===t:parseFloat(e)===t,Es=class extends za{constructor({x:e,y:t,z:n,...r}){let i=[],a=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),a.push(e=>[`translate3d(${e.map(e=>ws(e,`px`)).join(`,`)})`,Ts(e,0)])),Yr(r,(e,t)=>{if(t===`transform`)i.push([e||``]),a.push(e=>[e,e===``]);else if(xs.test(t)){if(delete r[t],B.und(e))return;let n=Ss.test(t)?`px`:Cs.test(t)?`deg`:``;i.push(Xr(e)),a.push(t===`rotate3d`?([e,t,r,i])=>[`rotate3d(${e},${t},${r},${ws(i,n)})`,Ts(i,0)]:e=>[`${t}(${e.map(e=>ws(e,n)).join(`,`)})`,Ts(e,+!!t.startsWith(`scale`))])}}),i.length&&(r.transform=new Ds(i,a)),super(r)}},Ds=class extends ta{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||=this._get()}_get(){let e=``,t=!0;return V(this.inputs,(n,r)=>{let i=Zi(n[0]),[a,o]=this.transforms[r](B.arr(i)?i:n.map(Zi));e+=` `+a,t&&=o}),t?`none`:e}observerAdded(e){e==1&&V(this.inputs,e=>V(e,e=>Xi(e)&&ra(e,this)))}observerRemoved(e){e==0&&V(this.inputs,e=>V(e,e=>Xi(e)&&ia(e,this)))}eventObserved(e){e.type==`change`&&(this._value=null),ea(this,e)}},Os=`a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.big.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.keygen.label.legend.li.link.main.map.mark.menu.menuitem.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.param.picture.pre.progress.q.rp.rt.ruby.s.samp.script.section.select.small.source.span.strong.style.sub.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.title.tr.track.u.ul.var.video.wbr.circle.clipPath.defs.ellipse.foreignObject.g.image.line.linearGradient.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.svg.text.tspan`.split(`.`);ei.assign({batchedUpdates:ps.unstable_batchedUpdates,createStringInterpolator:ga,colors:vi});var ks=Ya(Os,{applyAnimatedValues:_s,createAnimatedStyle:e=>new Es(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}).animated,As=`BN.BN.BN.BN.BN.BN.BN.BN.BN.S.B.S.WS.B.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.B.B.B.S.WS.ON.ON.ET.ET.ET.ON.ON.ON.ON.ON.ES.CS.ES.CS.CS.EN.EN.EN.EN.EN.EN.EN.EN.EN.EN.CS.ON.ON.ON.ON.ON.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.ON.ON.ON.ON.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.ON.ON.ON.BN.BN.BN.BN.BN.BN.B.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.CS.ON.ET.ET.ET.ET.ON.ON.ON.ON.L.ON.ON.BN.ON.ON.ET.ET.EN.EN.ON.L.ON.ON.ON.EN.L.ON.ON.ON.ON.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.L.L.L.L.L.L.L.L`.split(`.`),js=[[697,698,`ON`],[706,719,`ON`],[722,735,`ON`],[741,749,`ON`],[751,767,`ON`],[768,879,`NSM`],[884,885,`ON`],[894,894,`ON`],[900,901,`ON`],[903,903,`ON`],[1014,1014,`ON`],[1155,1161,`NSM`],[1418,1418,`ON`],[1421,1422,`ON`],[1423,1423,`ET`],[1424,1424,`R`],[1425,1469,`NSM`],[1470,1470,`R`],[1471,1471,`NSM`],[1472,1472,`R`],[1473,1474,`NSM`],[1475,1475,`R`],[1476,1477,`NSM`],[1478,1478,`R`],[1479,1479,`NSM`],[1480,1535,`R`],[1536,1541,`AN`],[1542,1543,`ON`],[1544,1544,`AL`],[1545,1546,`ET`],[1547,1547,`AL`],[1548,1548,`CS`],[1549,1549,`AL`],[1550,1551,`ON`],[1552,1562,`NSM`],[1563,1610,`AL`],[1611,1631,`NSM`],[1632,1641,`AN`],[1642,1642,`ET`],[1643,1644,`AN`],[1645,1647,`AL`],[1648,1648,`NSM`],[1649,1749,`AL`],[1750,1756,`NSM`],[1757,1757,`AN`],[1758,1758,`ON`],[1759,1764,`NSM`],[1765,1766,`AL`],[1767,1768,`NSM`],[1769,1769,`ON`],[1770,1773,`NSM`],[1774,1775,`AL`],[1776,1785,`EN`],[1786,1808,`AL`],[1809,1809,`NSM`],[1810,1839,`AL`],[1840,1866,`NSM`],[1867,1957,`AL`],[1958,1968,`NSM`],[1969,1983,`AL`],[1984,2026,`R`],[2027,2035,`NSM`],[2036,2037,`R`],[2038,2041,`ON`],[2042,2044,`R`],[2045,2045,`NSM`],[2046,2069,`R`],[2070,2073,`NSM`],[2074,2074,`R`],[2075,2083,`NSM`],[2084,2084,`R`],[2085,2087,`NSM`],[2088,2088,`R`],[2089,2093,`NSM`],[2094,2136,`R`],[2137,2139,`NSM`],[2140,2143,`R`],[2144,2191,`AL`],[2192,2193,`AN`],[2194,2198,`AL`],[2199,2207,`NSM`],[2208,2249,`AL`],[2250,2273,`NSM`],[2274,2274,`AN`],[2275,2306,`NSM`],[2362,2362,`NSM`],[2364,2364,`NSM`],[2369,2376,`NSM`],[2381,2381,`NSM`],[2385,2391,`NSM`],[2402,2403,`NSM`],[2433,2433,`NSM`],[2492,2492,`NSM`],[2497,2500,`NSM`],[2509,2509,`NSM`],[2530,2531,`NSM`],[2546,2547,`ET`],[2555,2555,`ET`],[2558,2558,`NSM`],[2561,2562,`NSM`],[2620,2620,`NSM`],[2625,2626,`NSM`],[2631,2632,`NSM`],[2635,2637,`NSM`],[2641,2641,`NSM`],[2672,2673,`NSM`],[2677,2677,`NSM`],[2689,2690,`NSM`],[2748,2748,`NSM`],[2753,2757,`NSM`],[2759,2760,`NSM`],[2765,2765,`NSM`],[2786,2787,`NSM`],[2801,2801,`ET`],[2810,2815,`NSM`],[2817,2817,`NSM`],[2876,2876,`NSM`],[2879,2879,`NSM`],[2881,2884,`NSM`],[2893,2893,`NSM`],[2901,2902,`NSM`],[2914,2915,`NSM`],[2946,2946,`NSM`],[3008,3008,`NSM`],[3021,3021,`NSM`],[3059,3064,`ON`],[3065,3065,`ET`],[3066,3066,`ON`],[3072,3072,`NSM`],[3076,3076,`NSM`],[3132,3132,`NSM`],[3134,3136,`NSM`],[3142,3144,`NSM`],[3146,3149,`NSM`],[3157,3158,`NSM`],[3170,3171,`NSM`],[3192,3198,`ON`],[3201,3201,`NSM`],[3260,3260,`NSM`],[3276,3277,`NSM`],[3298,3299,`NSM`],[3328,3329,`NSM`],[3387,3388,`NSM`],[3393,3396,`NSM`],[3405,3405,`NSM`],[3426,3427,`NSM`],[3457,3457,`NSM`],[3530,3530,`NSM`],[3538,3540,`NSM`],[3542,3542,`NSM`],[3633,3633,`NSM`],[3636,3642,`NSM`],[3647,3647,`ET`],[3655,3662,`NSM`],[3761,3761,`NSM`],[3764,3772,`NSM`],[3784,3790,`NSM`],[3864,3865,`NSM`],[3893,3893,`NSM`],[3895,3895,`NSM`],[3897,3897,`NSM`],[3898,3901,`ON`],[3953,3966,`NSM`],[3968,3972,`NSM`],[3974,3975,`NSM`],[3981,3991,`NSM`],[3993,4028,`NSM`],[4038,4038,`NSM`],[4141,4144,`NSM`],[4146,4151,`NSM`],[4153,4154,`NSM`],[4157,4158,`NSM`],[4184,4185,`NSM`],[4190,4192,`NSM`],[4209,4212,`NSM`],[4226,4226,`NSM`],[4229,4230,`NSM`],[4237,4237,`NSM`],[4253,4253,`NSM`],[4957,4959,`NSM`],[5008,5017,`ON`],[5120,5120,`ON`],[5760,5760,`WS`],[5787,5788,`ON`],[5906,5908,`NSM`],[5938,5939,`NSM`],[5970,5971,`NSM`],[6002,6003,`NSM`],[6068,6069,`NSM`],[6071,6077,`NSM`],[6086,6086,`NSM`],[6089,6099,`NSM`],[6107,6107,`ET`],[6109,6109,`NSM`],[6128,6137,`ON`],[6144,6154,`ON`],[6155,6157,`NSM`],[6158,6158,`BN`],[6159,6159,`NSM`],[6277,6278,`NSM`],[6313,6313,`NSM`],[6432,6434,`NSM`],[6439,6440,`NSM`],[6450,6450,`NSM`],[6457,6459,`NSM`],[6464,6464,`ON`],[6468,6469,`ON`],[6622,6655,`ON`],[6679,6680,`NSM`],[6683,6683,`NSM`],[6742,6742,`NSM`],[6744,6750,`NSM`],[6752,6752,`NSM`],[6754,6754,`NSM`],[6757,6764,`NSM`],[6771,6780,`NSM`],[6783,6783,`NSM`],[6832,6877,`NSM`],[6880,6891,`NSM`],[6912,6915,`NSM`],[6964,6964,`NSM`],[6966,6970,`NSM`],[6972,6972,`NSM`],[6978,6978,`NSM`],[7019,7027,`NSM`],[7040,7041,`NSM`],[7074,7077,`NSM`],[7080,7081,`NSM`],[7083,7085,`NSM`],[7142,7142,`NSM`],[7144,7145,`NSM`],[7149,7149,`NSM`],[7151,7153,`NSM`],[7212,7219,`NSM`],[7222,7223,`NSM`],[7376,7378,`NSM`],[7380,7392,`NSM`],[7394,7400,`NSM`],[7405,7405,`NSM`],[7412,7412,`NSM`],[7416,7417,`NSM`],[7616,7679,`NSM`],[8125,8125,`ON`],[8127,8129,`ON`],[8141,8143,`ON`],[8157,8159,`ON`],[8173,8175,`ON`],[8189,8190,`ON`],[8192,8202,`WS`],[8203,8205,`BN`],[8207,8207,`R`],[8208,8231,`ON`],[8232,8232,`WS`],[8233,8233,`B`],[8234,8238,`BN`],[8239,8239,`CS`],[8240,8244,`ET`],[8245,8259,`ON`],[8260,8260,`CS`],[8261,8286,`ON`],[8287,8287,`WS`],[8288,8303,`BN`],[8304,8304,`EN`],[8308,8313,`EN`],[8314,8315,`ES`],[8316,8318,`ON`],[8320,8329,`EN`],[8330,8331,`ES`],[8332,8334,`ON`],[8352,8399,`ET`],[8400,8432,`NSM`],[8448,8449,`ON`],[8451,8454,`ON`],[8456,8457,`ON`],[8468,8468,`ON`],[8470,8472,`ON`],[8478,8483,`ON`],[8485,8485,`ON`],[8487,8487,`ON`],[8489,8489,`ON`],[8494,8494,`ET`],[8506,8507,`ON`],[8512,8516,`ON`],[8522,8525,`ON`],[8528,8543,`ON`],[8585,8587,`ON`],[8592,8721,`ON`],[8722,8722,`ES`],[8723,8723,`ET`],[8724,9013,`ON`],[9083,9108,`ON`],[9110,9257,`ON`],[9280,9290,`ON`],[9312,9351,`ON`],[9352,9371,`EN`],[9450,9899,`ON`],[9901,10239,`ON`],[10496,11123,`ON`],[11126,11263,`ON`],[11493,11498,`ON`],[11503,11505,`NSM`],[11513,11519,`ON`],[11647,11647,`NSM`],[11744,11775,`NSM`],[11776,11869,`ON`],[11904,11929,`ON`],[11931,12019,`ON`],[12032,12245,`ON`],[12272,12287,`ON`],[12288,12288,`WS`],[12289,12292,`ON`],[12296,12320,`ON`],[12330,12333,`NSM`],[12336,12336,`ON`],[12342,12343,`ON`],[12349,12351,`ON`],[12441,12442,`NSM`],[12443,12444,`ON`],[12448,12448,`ON`],[12539,12539,`ON`],[12736,12773,`ON`],[12783,12783,`ON`],[12829,12830,`ON`],[12880,12895,`ON`],[12924,12926,`ON`],[12977,12991,`ON`],[13004,13007,`ON`],[13175,13178,`ON`],[13278,13279,`ON`],[13311,13311,`ON`],[19904,19967,`ON`],[42128,42182,`ON`],[42509,42511,`ON`],[42607,42610,`NSM`],[42611,42611,`ON`],[42612,42621,`NSM`],[42622,42623,`ON`],[42654,42655,`NSM`],[42736,42737,`NSM`],[42752,42785,`ON`],[42888,42888,`ON`],[43010,43010,`NSM`],[43014,43014,`NSM`],[43019,43019,`NSM`],[43045,43046,`NSM`],[43048,43051,`ON`],[43052,43052,`NSM`],[43064,43065,`ET`],[43124,43127,`ON`],[43204,43205,`NSM`],[43232,43249,`NSM`],[43263,43263,`NSM`],[43302,43309,`NSM`],[43335,43345,`NSM`],[43392,43394,`NSM`],[43443,43443,`NSM`],[43446,43449,`NSM`],[43452,43453,`NSM`],[43493,43493,`NSM`],[43561,43566,`NSM`],[43569,43570,`NSM`],[43573,43574,`NSM`],[43587,43587,`NSM`],[43596,43596,`NSM`],[43644,43644,`NSM`],[43696,43696,`NSM`],[43698,43700,`NSM`],[43703,43704,`NSM`],[43710,43711,`NSM`],[43713,43713,`NSM`],[43756,43757,`NSM`],[43766,43766,`NSM`],[43882,43883,`ON`],[44005,44005,`NSM`],[44008,44008,`NSM`],[44013,44013,`NSM`],[64285,64285,`R`],[64286,64286,`NSM`],[64287,64296,`R`],[64297,64297,`ES`],[64298,64335,`R`],[64336,64450,`AL`],[64451,64466,`ON`],[64467,64829,`AL`],[64830,64847,`ON`],[64848,64911,`AL`],[64912,64913,`ON`],[64914,64967,`AL`],[64968,64975,`ON`],[64976,65007,`BN`],[65008,65020,`AL`],[65021,65023,`ON`],[65024,65039,`NSM`],[65040,65049,`ON`],[65056,65071,`NSM`],[65072,65103,`ON`],[65104,65104,`CS`],[65105,65105,`ON`],[65106,65106,`CS`],[65108,65108,`ON`],[65109,65109,`CS`],[65110,65118,`ON`],[65119,65119,`ET`],[65120,65121,`ON`],[65122,65123,`ES`],[65124,65126,`ON`],[65128,65128,`ON`],[65129,65130,`ET`],[65131,65131,`ON`],[65136,65278,`AL`],[65279,65279,`BN`],[65281,65282,`ON`],[65283,65285,`ET`],[65286,65290,`ON`],[65291,65291,`ES`],[65292,65292,`CS`],[65293,65293,`ES`],[65294,65295,`CS`],[65296,65305,`EN`],[65306,65306,`CS`],[65307,65312,`ON`],[65339,65344,`ON`],[65371,65381,`ON`],[65504,65505,`ET`],[65506,65508,`ON`],[65509,65510,`ET`],[65512,65518,`ON`],[65520,65528,`BN`],[65529,65533,`ON`],[65534,65535,`BN`],[65793,65793,`ON`],[65856,65932,`ON`],[65936,65948,`ON`],[65952,65952,`ON`],[66045,66045,`NSM`],[66272,66272,`NSM`],[66273,66299,`EN`],[66422,66426,`NSM`],[67584,67870,`R`],[67871,67871,`ON`],[67872,68096,`R`],[68097,68099,`NSM`],[68100,68100,`R`],[68101,68102,`NSM`],[68103,68107,`R`],[68108,68111,`NSM`],[68112,68151,`R`],[68152,68154,`NSM`],[68155,68158,`R`],[68159,68159,`NSM`],[68160,68324,`R`],[68325,68326,`NSM`],[68327,68408,`R`],[68409,68415,`ON`],[68416,68863,`R`],[68864,68899,`AL`],[68900,68903,`NSM`],[68904,68911,`AL`],[68912,68921,`AN`],[68922,68927,`AL`],[68928,68937,`AN`],[68938,68968,`R`],[68969,68973,`NSM`],[68974,68974,`ON`],[68975,69215,`R`],[69216,69246,`AN`],[69247,69290,`R`],[69291,69292,`NSM`],[69293,69311,`R`],[69312,69327,`AL`],[69328,69336,`ON`],[69337,69369,`AL`],[69370,69375,`NSM`],[69376,69423,`R`],[69424,69445,`AL`],[69446,69456,`NSM`],[69457,69487,`AL`],[69488,69505,`R`],[69506,69509,`NSM`],[69510,69631,`R`],[69633,69633,`NSM`],[69688,69702,`NSM`],[69714,69733,`ON`],[69744,69744,`NSM`],[69747,69748,`NSM`],[69759,69761,`NSM`],[69811,69814,`NSM`],[69817,69818,`NSM`],[69826,69826,`NSM`],[69888,69890,`NSM`],[69927,69931,`NSM`],[69933,69940,`NSM`],[70003,70003,`NSM`],[70016,70017,`NSM`],[70070,70078,`NSM`],[70089,70092,`NSM`],[70095,70095,`NSM`],[70191,70193,`NSM`],[70196,70196,`NSM`],[70198,70199,`NSM`],[70206,70206,`NSM`],[70209,70209,`NSM`],[70367,70367,`NSM`],[70371,70378,`NSM`],[70400,70401,`NSM`],[70459,70460,`NSM`],[70464,70464,`NSM`],[70502,70508,`NSM`],[70512,70516,`NSM`],[70587,70592,`NSM`],[70606,70606,`NSM`],[70608,70608,`NSM`],[70610,70610,`NSM`],[70625,70626,`NSM`],[70712,70719,`NSM`],[70722,70724,`NSM`],[70726,70726,`NSM`],[70750,70750,`NSM`],[70835,70840,`NSM`],[70842,70842,`NSM`],[70847,70848,`NSM`],[70850,70851,`NSM`],[71090,71093,`NSM`],[71100,71101,`NSM`],[71103,71104,`NSM`],[71132,71133,`NSM`],[71219,71226,`NSM`],[71229,71229,`NSM`],[71231,71232,`NSM`],[71264,71276,`ON`],[71339,71339,`NSM`],[71341,71341,`NSM`],[71344,71349,`NSM`],[71351,71351,`NSM`],[71453,71453,`NSM`],[71455,71455,`NSM`],[71458,71461,`NSM`],[71463,71467,`NSM`],[71727,71735,`NSM`],[71737,71738,`NSM`],[71995,71996,`NSM`],[71998,71998,`NSM`],[72003,72003,`NSM`],[72148,72151,`NSM`],[72154,72155,`NSM`],[72160,72160,`NSM`],[72193,72198,`NSM`],[72201,72202,`NSM`],[72243,72248,`NSM`],[72251,72254,`NSM`],[72263,72263,`NSM`],[72273,72278,`NSM`],[72281,72283,`NSM`],[72330,72342,`NSM`],[72344,72345,`NSM`],[72544,72544,`NSM`],[72546,72548,`NSM`],[72550,72550,`NSM`],[72752,72758,`NSM`],[72760,72765,`NSM`],[72850,72871,`NSM`],[72874,72880,`NSM`],[72882,72883,`NSM`],[72885,72886,`NSM`],[73009,73014,`NSM`],[73018,73018,`NSM`],[73020,73021,`NSM`],[73023,73029,`NSM`],[73031,73031,`NSM`],[73104,73105,`NSM`],[73109,73109,`NSM`],[73111,73111,`NSM`],[73459,73460,`NSM`],[73472,73473,`NSM`],[73526,73530,`NSM`],[73536,73536,`NSM`],[73538,73538,`NSM`],[73562,73562,`NSM`],[73685,73692,`ON`],[73693,73696,`ET`],[73697,73713,`ON`],[78912,78912,`NSM`],[78919,78933,`NSM`],[90398,90409,`NSM`],[90413,90415,`NSM`],[92912,92916,`NSM`],[92976,92982,`NSM`],[94031,94031,`NSM`],[94095,94098,`NSM`],[94178,94178,`ON`],[94180,94180,`NSM`],[113821,113822,`NSM`],[113824,113827,`BN`],[117760,117973,`ON`],[118e3,118009,`EN`],[118010,118012,`ON`],[118016,118451,`ON`],[118458,118480,`ON`],[118496,118512,`ON`],[118528,118573,`NSM`],[118576,118598,`NSM`],[119143,119145,`NSM`],[119155,119162,`BN`],[119163,119170,`NSM`],[119173,119179,`NSM`],[119210,119213,`NSM`],[119273,119274,`ON`],[119296,119361,`ON`],[119362,119364,`NSM`],[119365,119365,`ON`],[119552,119638,`ON`],[120513,120513,`ON`],[120539,120539,`ON`],[120571,120571,`ON`],[120597,120597,`ON`],[120629,120629,`ON`],[120655,120655,`ON`],[120687,120687,`ON`],[120713,120713,`ON`],[120745,120745,`ON`],[120771,120771,`ON`],[120782,120831,`EN`],[121344,121398,`NSM`],[121403,121452,`NSM`],[121461,121461,`NSM`],[121476,121476,`NSM`],[121499,121503,`NSM`],[121505,121519,`NSM`],[122880,122886,`NSM`],[122888,122904,`NSM`],[122907,122913,`NSM`],[122915,122916,`NSM`],[122918,122922,`NSM`],[123023,123023,`NSM`],[123184,123190,`NSM`],[123566,123566,`NSM`],[123628,123631,`NSM`],[123647,123647,`ET`],[124140,124143,`NSM`],[124398,124399,`NSM`],[124643,124643,`NSM`],[124646,124646,`NSM`],[124654,124655,`NSM`],[124661,124661,`NSM`],[124928,125135,`R`],[125136,125142,`NSM`],[125143,125251,`R`],[125252,125258,`NSM`],[125259,126063,`R`],[126064,126143,`AL`],[126144,126207,`R`],[126208,126287,`AL`],[126288,126463,`R`],[126464,126703,`AL`],[126704,126705,`ON`],[126706,126719,`AL`],[126720,126975,`R`],[126976,127019,`ON`],[127024,127123,`ON`],[127136,127150,`ON`],[127153,127167,`ON`],[127169,127183,`ON`],[127185,127221,`ON`],[127232,127242,`EN`],[127243,127247,`ON`],[127279,127279,`ON`],[127338,127343,`ON`],[127405,127405,`ON`],[127584,127589,`ON`],[127744,128728,`ON`],[128732,128748,`ON`],[128752,128764,`ON`],[128768,128985,`ON`],[128992,129003,`ON`],[129008,129008,`ON`],[129024,129035,`ON`],[129040,129095,`ON`],[129104,129113,`ON`],[129120,129159,`ON`],[129168,129197,`ON`],[129200,129211,`ON`],[129216,129217,`ON`],[129232,129240,`ON`],[129280,129623,`ON`],[129632,129645,`ON`],[129648,129660,`ON`],[129664,129674,`ON`],[129678,129734,`ON`],[129736,129736,`ON`],[129741,129756,`ON`],[129759,129770,`ON`],[129775,129784,`ON`],[129792,129938,`ON`],[129940,130031,`ON`],[130032,130041,`EN`],[130042,130042,`ON`],[131070,131071,`BN`],[196606,196607,`BN`],[262142,262143,`BN`],[327678,327679,`BN`],[393214,393215,`BN`],[458750,458751,`BN`],[524286,524287,`BN`],[589822,589823,`BN`],[655358,655359,`BN`],[720894,720895,`BN`],[786430,786431,`BN`],[851966,851967,`BN`],[917502,917759,`BN`],[917760,917999,`NSM`],[918e3,921599,`BN`],[983038,983039,`BN`],[1048574,1048575,`BN`],[1114110,1114111,`BN`]];function Ms(e){if(e<=255)return As[e];let t=0,n=js.length-1;for(;t<=n;){let r=t+n>>1,i=js[r];if(e<i[0]){n=r-1;continue}if(e>i[1]){t=r+1;continue}return i[2]}return`L`}function Ns(e){let t=e.length;if(t===0)return null;let n=Array(t),r=!1;for(let i=0;i<t;){let a=e.charCodeAt(i),o=a,s=1;if(a>=55296&&a<=56319&&i+1<t){let t=e.charCodeAt(i+1);t>=56320&&t<=57343&&(o=(a-55296<<10)+(t-56320)+65536,s=2)}let c=Ms(o);(c===`R`||c===`AL`||c===`AN`)&&(r=!0);for(let e=0;e<s;e++)n[i+e]=c;i+=s}if(!r)return null;let i=0;for(let e=0;e<t;e++){let t=n[e];if(t===`L`){i=0;break}if(t===`R`||t===`AL`){i=1;break}}let a=new Int8Array(t);for(let e=0;e<t;e++)a[e]=i;let o=i&1?`R`:`L`,s=o,c=s;for(let e=0;e<t;e++)n[e]===`NSM`?n[e]=c:c=n[e];c=s;for(let e=0;e<t;e++){let t=n[e];t===`EN`?n[e]=c===`AL`?`AN`:`EN`:(t===`R`||t===`L`||t===`AL`)&&(c=t)}for(let e=0;e<t;e++)n[e]===`AL`&&(n[e]=`R`);for(let e=1;e<t-1;e++)n[e]===`ES`&&n[e-1]===`EN`&&n[e+1]===`EN`&&(n[e]=`EN`),n[e]===`CS`&&(n[e-1]===`EN`||n[e-1]===`AN`)&&n[e+1]===n[e-1]&&(n[e]=n[e-1]);for(let e=0;e<t;e++){if(n[e]!==`EN`)continue;let r;for(r=e-1;r>=0&&n[r]===`ET`;r--)n[r]=`EN`;for(r=e+1;r<t&&n[r]===`ET`;r++)n[r]=`EN`}for(let e=0;e<t;e++){let t=n[e];(t===`WS`||t===`ES`||t===`ET`||t===`CS`)&&(n[e]=`ON`)}c=s;for(let e=0;e<t;e++){let t=n[e];t===`EN`?n[e]=c===`L`?`L`:`EN`:(t===`R`||t===`L`)&&(c=t)}for(let e=0;e<t;e++){if(n[e]!==`ON`)continue;let r=e+1;for(;r<t&&n[r]===`ON`;)r++;let i=e>0?n[e-1]:s,a=r<t?n[r]:s,o=i===`L`?`L`:`R`;if(o===(a===`L`?`L`:`R`))for(let t=e;t<r;t++)n[t]=o;e=r-1}for(let e=0;e<t;e++)n[e]===`ON`&&(n[e]=o);for(let e=0;e<t;e++){let t=n[e];a[e]&1?(t===`L`||t===`AN`||t===`EN`)&&a[e]++:t===`R`?a[e]++:(t===`AN`||t===`EN`)&&(a[e]+=2)}return a}function Ps(e,t){let n=Ns(e);if(n===null)return null;let r=new Int8Array(t.length);for(let e=0;e<t.length;e++)r[e]=n[t[e]];return r}var Fs=/[ \t\n\r\f]+/g,Is=/[\t\n\r\f]| {2,}|^ | $/;function Ls(e){let t=e??`normal`;return t===`pre-wrap`?{mode:t,preserveOrdinarySpaces:!0,preserveHardBreaks:!0}:{mode:t,preserveOrdinarySpaces:!1,preserveHardBreaks:!1}}function Rs(e){if(!Is.test(e))return e;let t=e.replace(Fs,` `);return t.charCodeAt(0)===32&&(t=t.slice(1)),t.length>0&&t.charCodeAt(t.length-1)===32&&(t=t.slice(0,-1)),t}function zs(e){return/[\r\f]/.test(e)?e.replace(/\r\n/g,`
596
+ `}),(0,E.jsxs)(`div`,{className:`repo-open-stack`,children:[ae.length>0&&(0,E.jsxs)(`section`,{className:`repo-open-agents-card`,children:[(0,E.jsx)(`div`,{className:`repo-open-agents-brand`,children:(0,E.jsx)(`img`,{className:`repo-open-agents-logo`,src:`/press-kit/ingit-icon-mark-light.svg`,alt:`ingit`})}),(0,E.jsx)(`div`,{className:`repo-open-agents-title`,children:`Running agent sessions`}),(0,E.jsx)(`div`,{className:`repo-open-agents-grid`,children:ae.map(t=>(0,E.jsxs)(`div`,{className:`repo-open-list-button repo-open-claude-row`,children:[(0,E.jsxs)(`span`,{className:`repo-open-list-name repo-open-agent-name`,children:[[...new Set(t.sessions.map(e=>e.agent))].map(e=>(0,E.jsx)(hr,{agent:e,size:15,busy:t.sessions.some(t=>t.agent===e&&t.busy)},e)),_r(t.cwd)]}),(0,E.jsx)(`span`,{className:`repo-open-list-path`,children:t.cwd}),(0,E.jsx)(`span`,{className:`repo-open-claude-chips`,children:t.sessions.map(e=>(0,E.jsx)(`button`,{type:`button`,className:`repo-open-claude-chip${e.busy?` repo-open-claude-chip-busy`:``}`,disabled:!e.focusable||o!==null,title:e.focusable?`Focus this session's window — ${dr(e)} (pid ${e.pid})`:`${dr(e)} (pid ${e.pid}) — window focus unavailable for this session`,onClick:()=>void s(e),children:o===e.pid?`focusing…`:`${e.title??`${e.agent===`codex`?`codex `:``}${dr(e)}`}${e.count>1?` ×${e.count}`:``}`},`${e.pid}:${e.cwd}`))}),(0,E.jsx)(`button`,{type:`button`,className:`repo-open-row-action repo-open-claude-open`,onClick:()=>e(t.cwd),children:`Open`})]},t.cwd))})]}),(0,E.jsxs)(`div`,{className:`repo-open-shell`,children:[(0,E.jsxs)(`div`,{className:`repo-open-header`,children:[(0,E.jsx)(`h1`,{className:`repo-open-title`,children:`Open repository`}),(0,E.jsxs)(`form`,{onSubmit:ee,className:`repo-open-form`,children:[(0,E.jsxs)(`div`,{className:`repo-open-input-wrap`,children:[(0,E.jsx)(`input`,{type:`text`,value:c,onChange:e=>l(e.target.value),onFocus:()=>{h(!0),b.length>0&&_(!0)},onBlur:()=>{h(!1),_(!1)},onKeyDown:ne,placeholder:`/home/user/my-project`,className:`repo-open-input`,autoComplete:`off`,role:`combobox`,"aria-expanded":ce,"aria-controls":`repo-open-path-suggestions`,"aria-autocomplete":`list`}),ce&&(0,E.jsx)(`div`,{id:`repo-open-path-suggestions`,className:`repo-open-path-suggestions`,role:`listbox`,children:v&&b.length===0?(0,E.jsx)(`div`,{className:`repo-open-path-suggestions-loading`,children:`Loading...`}):b.map((e,t)=>(0,E.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":t===C,className:`repo-open-path-suggestion${t===C?` repo-open-path-suggestion-active`:``}`,onMouseEnter:()=>w(t),onMouseDown:t=>{t.preventDefault(),te(e)},children:[(0,E.jsxs)(`span`,{className:`repo-open-path-suggestion-main`,children:[(0,E.jsx)(`span`,{className:`repo-open-path-suggestion-name`,children:e.name}),(0,E.jsx)(`span`,{className:`repo-open-path-suggestion-path`,children:e.path})]}),e.isGitRepo&&(0,E.jsx)(`span`,{className:`repo-open-repo-badge`,children:`repo`})]},e.path))})]}),(0,E.jsx)(`button`,{type:`submit`,disabled:!c.trim(),className:`repo-open-button`,children:`Open`})]})]}),(0,E.jsxs)(`div`,{className:`repo-open-body`,children:[(0,E.jsxs)(`section`,{className:`repo-open-explorer`,"aria-label":`Folder tree`,children:[(0,E.jsxs)(`div`,{className:`repo-open-explorer-head`,children:[(0,E.jsx)(`button`,{type:`button`,className:`repo-open-root-nav`,disabled:!oe?.parentPath,onClick:()=>{oe?.parentPath&&T(oe.parentPath,{makeRoot:!0})},title:`Parent folder`,"aria-label":`Parent folder`,children:`..`}),(0,E.jsx)(`div`,{className:`repo-open-root-path`,children:oe?br(oe.path).map((e,t,n)=>(0,E.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,minWidth:0},children:[t>0&&!/^(\/|[A-Za-z]:[\\/])$/.test(n[t-1].label)&&(0,E.jsx)(`span`,{className:`repo-open-root-separator`,children:`/`}),(0,E.jsx)(`button`,{type:`button`,className:`repo-open-root-crumb`,onClick:()=>void T(e.path,{makeRoot:!0}),title:e.path,children:e.label})]},e.path)):`Loading...`}),oe?.isGitRepo&&(0,E.jsx)(`button`,{type:`button`,className:`repo-open-root-action`,onClick:()=>e(oe.path),children:`Open`})]}),(0,E.jsxs)(`div`,{className:`repo-open-tree`,children:[se&&(0,E.jsx)(`div`,{className:`repo-open-tree-empty`,style:{paddingLeft:16},children:`Loading...`}),u&&!se&&ie(u,0)]})]}),(0,E.jsxs)(`aside`,{className:`repo-open-side`,children:[t&&(0,E.jsx)(`p`,{className:`repo-open-error`,children:t}),n.length>0&&(0,E.jsxs)(`section`,{className:`repo-open-section`,children:[(0,E.jsx)(`div`,{className:`repo-open-section-title`,children:`Recent repositories`}),(0,E.jsx)(`div`,{className:`repo-open-list`,children:n.map(t=>(0,E.jsxs)(`button`,{type:`button`,onClick:()=>e(t),className:`repo-open-list-button`,children:[(0,E.jsx)(`span`,{className:`repo-open-list-name`,children:_r(t)}),(0,E.jsx)(`span`,{className:`repo-open-list-path`,children:t})]},t))})]}),i.length>0&&(0,E.jsxs)(`section`,{className:`repo-open-section`,children:[(0,E.jsx)(`div`,{className:`repo-open-section-title`,children:`Repositories`}),r&&(0,E.jsx)(`div`,{className:`repo-open-folder-caption`,children:r}),(0,E.jsx)(`div`,{className:`repo-open-list`,children:i.map(t=>(0,E.jsxs)(`button`,{type:`button`,onClick:()=>e(t),className:`repo-open-list-button`,children:[(0,E.jsx)(`span`,{className:`repo-open-list-name`,children:_r(t)}),(0,E.jsx)(`span`,{className:`repo-open-list-path`,children:t})]},t))})]})]})]})]}),(0,E.jsxs)(`div`,{className:`repo-open-version`,children:[`v`,`0.1.4`]})]})]})}var Sr={head:`Branches`,remote:`Remotes`,tag:`Tags`},Cr=[`head`,`remote`,`tag`];function wr({refs:e,onSelectRef:t,selectedSha:n,onClose:r}){let[i,a]=(0,x.useState)({head:!0,remote:!0,tag:!0}),[o,s]=(0,x.useState)(``),c=o.toLowerCase(),l={head:[],remote:[],tag:[]};for(let t of e)c&&!t.shortName.toLowerCase().includes(c)||l[t.kind].push(t);function u(e){a(t=>({...t,[e]:!t[e]}))}return(0,E.jsxs)(`div`,{style:{width:250,flexShrink:0,height:`100%`,background:`#181825`,borderRight:`1px solid #313244`,display:`flex`,flexDirection:`column`,overflowY:`auto`,userSelect:`none`},children:[(0,E.jsxs)(`div`,{style:{padding:`8px 14px`,fontSize:11,fontWeight:700,letterSpacing:`0.08em`,color:`#6c7086`,textTransform:`uppercase`,borderBottom:`1px solid #313244`,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[`Refs`,(0,E.jsx)(`button`,{onClick:r,title:`Hide refs`,style:{background:`none`,border:`none`,color:`#6c7086`,cursor:`pointer`,fontSize:14,padding:`0 2px`,lineHeight:1},children:`✕`})]}),(0,E.jsx)(`div`,{style:{padding:`6px 10px`,borderBottom:`1px solid #313244`},children:(0,E.jsx)(`input`,{type:`text`,value:o,onChange:e=>s(e.target.value),placeholder:`Filter branches...`,style:{width:`100%`,background:`#1e1e2e`,border:`1px solid #45475a`,borderRadius:4,color:`#cdd6f4`,fontSize:12,padding:`5px 8px`,outline:`none`,fontFamily:`inherit`},onFocus:e=>{e.currentTarget.style.borderColor=`#89b4fa`},onBlur:e=>{e.currentTarget.style.borderColor=`#45475a`}})}),Cr.map(e=>{let r=l[e];if(r.length===0)return null;let a=o?!1:i[e];return(0,E.jsxs)(`div`,{children:[(0,E.jsxs)(`button`,{onClick:()=>u(e),style:{width:`100%`,display:`flex`,alignItems:`center`,gap:6,padding:`6px 14px`,background:`none`,border:`none`,color:`#a6adc8`,fontSize:12,fontWeight:600,cursor:`pointer`,textAlign:`left`,fontFamily:`inherit`},children:[(0,E.jsx)(`span`,{style:{display:`inline-block`,transform:a?`rotate(-90deg)`:`rotate(0deg)`,transition:`transform 0.15s`,fontSize:10,lineHeight:1},children:`▼`}),Sr[e],(0,E.jsx)(`span`,{style:{marginLeft:`auto`,background:`#313244`,borderRadius:8,padding:`1px 6px`,fontSize:10,color:`#6c7086`,fontWeight:500},children:r.length})]}),!a&&(0,E.jsx)(`div`,{children:r.map(e=>{let r=e.targetSha===n;return(0,E.jsxs)(`button`,{onClick:()=>t(e),title:e.name,style:{width:`100%`,display:`flex`,alignItems:`center`,gap:8,padding:`5px 14px 5px 28px`,background:r?`#313244`:`none`,border:`none`,color:r?`#89b4fa`:`#cdd6f4`,fontSize:13,fontWeight:e.isCurrent?700:`normal`,cursor:`pointer`,textAlign:`left`,fontFamily:`inherit`,overflow:`hidden`},children:[(0,E.jsx)(Tr,{kind:e.kind,isCurrent:e.isCurrent}),(0,E.jsx)(`span`,{style:{flex:1,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e.shortName}),(e.ahead!=null||e.behind!=null)&&(0,E.jsxs)(`span`,{style:{display:`flex`,gap:4,flexShrink:0,fontSize:11},children:[e.ahead!=null&&e.ahead>0&&(0,E.jsxs)(`span`,{style:{color:`#a6e3a1`},children:[`↑`,e.ahead]}),e.behind!=null&&e.behind>0&&(0,E.jsxs)(`span`,{style:{color:`#f38ba8`},children:[`↓`,e.behind]})]})]},e.name)})})]},e)})]})}function Tr({kind:e,isCurrent:t}){let n={flexShrink:0,fontSize:11,width:14,textAlign:`center`};return e===`head`?(0,E.jsx)(`span`,{style:{...n,color:t?`#a6e3a1`:`#89b4fa`},children:t?`●`:`⎇`}):e===`remote`?(0,E.jsx)(`span`,{style:{...n,color:`#94e2d5`},children:`◉`}):(0,E.jsx)(`span`,{style:{...n,color:`#f9e2af`},children:`◆`})}var Er=Object.defineProperty,Dr=(e,t)=>{let n={};for(var r in e)Er(n,r,{get:e[r],enumerable:!0});return t||Er(n,Symbol.toStringTag,{value:`Module`}),n},Or=Wr(),z=e=>zr(e,Or),kr=Wr();z.write=e=>zr(e,kr);var Ar=Wr();z.onStart=e=>zr(e,Ar);var jr=Wr();z.onFrame=e=>zr(e,jr);var Mr=Wr();z.onFinish=e=>zr(e,Mr);var Nr=[];z.setTimeout=(e,t)=>{let n=z.now()+t,r=()=>{let e=Nr.findIndex(e=>e.cancel==r);~e&&Nr.splice(e,1),Lr-=+!!~e},i={time:n,handler:e,cancel:r};return Nr.splice(Pr(n),0,i),Lr+=1,Br(),i};var Pr=e=>~(~Nr.findIndex(t=>t.time>e)||~Nr.length);z.cancel=e=>{Ar.delete(e),jr.delete(e),Mr.delete(e),Or.delete(e),kr.delete(e)},z.sync=e=>{Rr=!0,z.batchedUpdates(e),Rr=!1},z.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,z.onStart(n)}return r.handler=e,r.cancel=()=>{Ar.delete(n),t=null},r};var Fr=typeof window<`u`?window.requestAnimationFrame:()=>{};z.use=e=>Fr=e,z.now=typeof performance<`u`?()=>performance.now():Date.now,z.batchedUpdates=e=>e(),z.catch=console.error,z.frameLoop=`always`,z.onDemand=()=>{},z.advance=()=>{z.frameLoop===`demand`?Ur():console.warn(`Cannot call the manual advancement of rafz whilst frameLoop is not set as demand`)};var Ir=-1,Lr=0,Rr=!1;function zr(e,t){Rr?(t.delete(e),e(0)):(t.add(e),Br(),z.frameLoop===`demand`&&z.onDemand())}function Br(){Ir<0&&(Ir=0,z.frameLoop!==`demand`&&Fr(Hr))}function Vr(){Ir=-1}function Hr(){~Ir&&(Fr(Hr),z.batchedUpdates(Ur))}function Ur(){let e=Ir;Ir=z.now();let t=Pr(Ir);if(t&&(Gr(Nr.splice(0,t),e=>e.handler()),Lr-=t),!Lr){Vr();return}Ar.flush(),Or.flush(e?Math.min(64,Ir-e):16.667),jr.flush(),kr.flush(),Mr.flush(),z.frameLoop===`demand`&&Lr>0&&z.onDemand()}function Wr(){let e=new Set,t=e;return{add(n){Lr+=+(t==e&&!e.has(n)),e.add(n)},delete(n){return Lr-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,Lr-=t.size,Gr(t,t=>t(n)&&e.add(t)),Lr+=e.size,t=e)}}}function Gr(e,t){e.forEach(e=>{try{t(e)}catch(e){z.catch(e)}})}function Kr(){}var qr=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),B={arr:Array.isArray,obj:e=>!!e&&e.constructor.name===`Object`,fun:(e=>typeof e==`function`),str:e=>typeof e==`string`,num:e=>typeof e==`number`,und:e=>e===void 0};function Jr(e,t){if(B.arr(e)){if(!B.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var V=(e,t)=>e.forEach(t);function Yr(e,t,n){if(B.arr(e)){for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);return}for(let r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var Xr=e=>B.und(e)?[]:B.arr(e)?e:[e];function Zr(e,t){if(e.size){let n=Array.from(e);e.clear(),V(n,t)}}var Qr=(e,...t)=>Zr(e,e=>e(...t)),$r=()=>typeof window>`u`||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),ei=Dr({assign:()=>oi,colors:()=>ri,createStringInterpolator:()=>ti,skipAnimation:()=>ii,to:()=>ni,willAdvance:()=>ai}),ti,ni,ri=null,ii=!1,ai=Kr,oi=e=>{e.to&&(ni=e.to),e.now&&(z.now=e.now),e.colors!==void 0&&(ri=e.colors),e.skipAnimation!=null&&(ii=e.skipAnimation),e.createStringInterpolator&&(ti=e.createStringInterpolator),e.requestAnimationFrame&&z.use(e.requestAnimationFrame),e.batchedUpdates&&(z.batchedUpdates=e.batchedUpdates),e.willAdvance&&(ai=e.willAdvance),e.frameLoop&&(z.frameLoop=e.frameLoop),e.onDemand&&(z.onDemand=e.onDemand)},si=new Set,ci=[],li=[],ui=0,di={get idle(){return!si.size&&!ci.length},start(e){ui>e.priority?(si.add(e),z.onStart(fi)):(pi(e),z(hi))},advance:hi,sort(e){if(ui)z.onFrame(()=>di.sort(e));else{let t=ci.indexOf(e);~t&&(ci.splice(t,1),mi(e))}},clear(){ci=[],si.clear()}};function fi(){si.forEach(pi),si.clear(),z(hi)}function pi(e){ci.includes(e)||mi(e)}function mi(e){ci.splice(gi(ci,t=>t.priority>e.priority),0,e)}function hi(e){let t=li;for(let n=0;n<ci.length;n++){let r=ci[n];ui=r.priority,r.idle||(ai(r),r.advance(e),r.idle||t.push(r))}return ui=0,li=ci,li.length=0,ci=t,ci.length>0}function gi(e,t){let n=e.findIndex(t);return n<0?e.length:n}var _i=(e,t,n)=>Math.min(Math.max(n,e),t),vi={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},yi=`[-+]?\\d*\\.?\\d+`,bi=`[-+]?\\d*\\.?\\d+%`;function xi(...e){return`\\(\\s*(`+e.join(`)\\s*,\\s*(`)+`)\\s*\\)`}var Si=RegExp(`rgb`+xi(yi,yi,yi)),Ci=RegExp(`rgba`+xi(yi,yi,yi,yi)),wi=RegExp(`hsl`+xi(yi,bi,bi)),Ti=RegExp(`hsla`+xi(yi,bi,bi,yi)),Ei=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Di=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Oi=/^#([0-9a-fA-F]{6})$/,ki=/^#([0-9a-fA-F]{8})$/;function Ai(e){let t;return typeof e==`number`?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Oi.exec(e))?parseInt(t[1]+`ff`,16)>>>0:ri&&ri[e]!==void 0?ri[e]:(t=Si.exec(e))?(Mi(t[1])<<24|Mi(t[2])<<16|Mi(t[3])<<8|255)>>>0:(t=Ci.exec(e))?(Mi(t[1])<<24|Mi(t[2])<<16|Mi(t[3])<<8|Pi(t[4]))>>>0:(t=Ei.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+`ff`,16)>>>0:(t=ki.exec(e))?parseInt(t[1],16)>>>0:(t=Di.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=wi.exec(e))?(H(Ni(t[1]),Fi(t[2]),Fi(t[3]))|255)>>>0:(t=Ti.exec(e))?(H(Ni(t[1]),Fi(t[2]),Fi(t[3]))|Pi(t[4]))>>>0:null}function ji(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function H(e,t,n){let r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,a=ji(i,r,e+1/3),o=ji(i,r,e),s=ji(i,r,e-1/3);return Math.round(a*255)<<24|Math.round(o*255)<<16|Math.round(s*255)<<8}function Mi(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function Ni(e){return(parseFloat(e)%360+360)%360/360}function Pi(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function Fi(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function Ii(e){let t=Ai(e);return t===null?e:(t||=0,`rgba(${(t&4278190080)>>>24}, ${(t&16711680)>>>16}, ${(t&65280)>>>8}, ${(t&255)/255})`)}var Li=(e,t,n)=>{if(B.fun(e))return e;if(B.arr(e))return Li({range:e,output:t,extrapolate:n});if(B.str(e.output[0]))return ti(e);let r=e,i=r.output,a=r.range||[0,1],o=r.extrapolateLeft||r.extrapolate||`extend`,s=r.extrapolateRight||r.extrapolate||`extend`,c=r.easing||(e=>e);return e=>{let t=zi(e,a);return Ri(e,a[t],a[t+1],i[t],i[t+1],c,o,s,r.map)}};function Ri(e,t,n,r,i,a,o,s,c){let l=c?c(e):e;if(l<t){if(o===`identity`)return l;o===`clamp`&&(l=t)}if(l>n){if(s===`identity`)return l;s===`clamp`&&(l=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?l=-l:n===1/0?l-=t:l=(l-t)/(n-t),l=a(l),r===-1/0?l=-l:i===1/0?l+=r:l=l*(i-r)+r,l)}function zi(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var Bi=(e,t=`end`)=>n=>{n=t===`end`?Math.min(n,.999):Math.max(n,.001);let r=n*e;return _i(0,1,(t===`end`?Math.floor(r):Math.ceil(r))/e)},Vi=1.70158,Hi=Vi*1.525,Ui=2.70158,Wi=2*Math.PI/3,Gi=2*Math.PI/4.5,Ki=e=>{let t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},qi={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-(-2*e+2)**2/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-(1-e)**3,easeInOutCubic:e=>e<.5?4*e*e*e:1-(-2*e+2)**3/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-(1-e)**4,easeInOutQuart:e=>e<.5?8*e*e*e*e:1-(-2*e+2)**4/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-(1-e)**5,easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-(-2*e+2)**5/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:2**(10*e-10),easeOutExpo:e=>e===1?1:1-2**(-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?2**(20*e-10)/2:(2-2**(-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-e**2),easeOutCirc:e=>Math.sqrt(1-(e-1)**2),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-(2*e)**2))/2:(Math.sqrt(1-(-2*e+2)**2)+1)/2,easeInBack:e=>Ui*e*e*e-Vi*e*e,easeOutBack:e=>1+Ui*(e-1)**3+Vi*(e-1)**2,easeInOutBack:e=>e<.5?(2*e)**2*(3.5949095*2*e-Hi)/2:((2*e-2)**2*(3.5949095*(e*2-2)+Hi)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-(2**(10*e-10))*Math.sin((e*10-10.75)*Wi),easeOutElastic:e=>e===0?0:e===1?1:2**(-10*e)*Math.sin((e*10-.75)*Wi)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(2**(20*e-10)*Math.sin((20*e-11.125)*Gi))/2:2**(-20*e+10)*Math.sin((20*e-11.125)*Gi)/2+1,easeInBounce:e=>1-Ki(1-e),easeOutBounce:Ki,easeInOutBounce:e=>e<.5?(1-Ki(1-2*e))/2:(1+Ki(2*e-1))/2,steps:Bi},Ji=Symbol.for(`FluidValue.get`),Yi=Symbol.for(`FluidValue.observers`),Xi=e=>!!(e&&e[Ji]),Zi=e=>e&&e[Ji]?e[Ji]():e,Qi=e=>e[Yi]||null;function $i(e,t){e.eventObserved?e.eventObserved(t):e(t)}function ea(e,t){let n=e[Yi];n&&n.forEach(e=>{$i(e,t)})}var ta=class{constructor(e){if(!e&&!(e=this.get))throw Error(`Unknown getter`);na(this,e)}},na=(e,t)=>aa(e,Ji,t);function ra(e,t){if(e[Ji]){let n=e[Yi];n||aa(e,Yi,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function ia(e,t){let n=e[Yi];if(n&&n.has(t)){let r=n.size-1;r?n.delete(t):e[Yi]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var aa=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),oa=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,sa=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ca=RegExp(`(${oa.source})(%|[a-z]+)`,`i`),la=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,ua=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,da=e=>{let[t,n]=fa(e);if(!t||$r())return e;let r=window.getComputedStyle(document.documentElement).getPropertyValue(t);return r?r.trim():n&&n.startsWith(`--`)?window.getComputedStyle(document.documentElement).getPropertyValue(n)||e:n&&ua.test(n)?da(n):n||e},fa=e=>{let t=ua.exec(e);if(!t)return[,];let[,n,r]=t;return[n,r]},pa,ma=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,ha=e=>e.match(oa)??[],ga=e=>{pa||=ri?RegExp(`(${Object.keys(ri).join(`|`)})(?!\\w)`,`g`):/^\b$/;let t=e.output.map(e=>Zi(e).replace(ua,da).replace(sa,Ii).replace(pa,Ii)),n=t.map(e=>ha(e).map(Number)),r=n[0].map((e,t)=>n.map(e=>{if(!(t in e))throw Error(`The arity of each "output" value must be equal`);return e[t]})).map(t=>Li({...e,output:t})),i=e.range||[0,1],a=t.map(e=>ha(e)),o=a[0].map((e,t)=>{let n=a.map(e=>{let n=e[t],r=n.indexOf(`.`);return r===-1?0:n.length-r-1});return n.every(e=>e===n[0])&&n[0]>0?n[0]:null});return e=>{let n=i.indexOf(e);if(n!==-1)return t[n];let a=!ca.test(t[0])&&t.find(e=>ca.test(e))?.replace(oa,``),s=0;return t[0].replace(oa,()=>{let t=s++,n=r[t](e),i=o[t];return`${i==null?n:n.toFixed(i)}${a||``}`}).replace(la,ma)}},_a=`react-spring: `,va=e=>{let t=e,n=!1;if(typeof t!=`function`)throw TypeError(`${_a}once requires a function parameter`);return(...e)=>{n||=(t(...e),!0)}},ya=va(console.warn);function ba(){ya(`${_a}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var xa=va(console.warn);function Sa(){xa(`${_a}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function Ca(e){return B.str(e)&&(e[0]==`#`||/\d/.test(e)||!$r()&&ua.test(e)||e in(ri||{}))}var wa=$r()?x.useEffect:x.useLayoutEffect,Ta=()=>{let e=(0,x.useRef)(!1);return wa(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Ea(){let e=(0,x.useState)()[1],t=Ta();return()=>{t.current&&e(Math.random())}}var Da=e=>(0,x.useEffect)(e,Oa),Oa=[];function ka(e){let t=(0,x.useRef)(void 0);return(0,x.useEffect)(()=>{t.current=e}),t.current}var Aa=Symbol.for(`Animated:node`),ja=e=>!!e&&e[Aa]===e,Ma=e=>e&&e[Aa],Na=(e,t)=>qr(e,Aa,t),Pa=e=>e&&e[Aa]&&e[Aa].getPayload(),Fa=class{constructor(){Na(this,this)}getPayload(){return this.payload||[]}},Ia=class e extends Fa{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,B.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new e(t)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return B.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){let{done:e}=this;this.done=!1,B.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},La=class e extends Ia{constructor(e){super(0),this._string=null,this._toString=Li({output:[e,e]})}static create(t){return new e(t)}getValue(){return this._string??=this._toString(this._value)}setValue(e){if(B.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=Li({output:[this.getValue(),e]})),this._value=0,super.reset()}},Ra={dependencies:null},za=class extends Fa{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){let t={};return Yr(this.source,(n,r)=>{ja(n)?t[r]=n.getValue(e):Xi(n)?t[r]=Zi(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&V(this.payload,e=>e.reset())}_makePayload(e){if(e){let t=new Set;return Yr(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Ra.dependencies&&Xi(e)&&Ra.dependencies.add(e);let t=Pa(e);t&&V(t,e=>this.add(e))}},Ba=class e extends za{constructor(e){super(e)}static create(t){return new e(t)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){let t=this.getPayload();return e.length==t.length?t.map((t,n)=>t.setValue(e[n])).some(Boolean):(super.setValue(e.map(Va)),!0)}};function Va(e){return(Ca(e)?La:Ia).create(e)}function Ha(e){let t=Ma(e);return t?t.constructor:B.arr(e)?Ba:Ca(e)?La:Ia}var Ua=(e,t)=>{let n=!B.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,x.forwardRef)((r,i)=>{let a=(0,x.useRef)(null),o=n&&(0,x.useCallback)(e=>{a.current=Ka(i,e)},[i]),[s,c]=Ga(r,t),l=Ea(),u=()=>{let e=a.current;n&&!e||(e?t.applyAnimatedValues(e,s.getValue(!0)):!1)===!1&&l()},d=new Wa(u,c),f=(0,x.useRef)(void 0);wa(()=>(f.current=d,V(c,e=>ra(e,d)),()=>{f.current&&(V(f.current.deps,e=>ia(e,f.current)),z.cancel(f.current.update))})),(0,x.useEffect)(u,[]),Da(()=>()=>{let e=f.current;V(e.deps,t=>ia(t,e))});let p=t.getComponentProps(s.getValue());return x.createElement(e,{...p,ref:o})})},Wa=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type==`change`&&z.write(this.update)}};function Ga(e,t){let n=new Set;return Ra.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new za(e),Ra.dependencies=null,[e,n]}function Ka(e,t){return e&&(B.fun(e)?e(t):e.current=t),t}var qa=Symbol.for(`AnimatedComponent`),Ja=new WeakMap,Ya=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=e=>new za(e),getComponentProps:r=e=>e}={})=>{let i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},a=e=>{let t=Xa(e)||`Anonymous`;if(B.str(e))e=a[e]||(a[e]=Ua(e,i));else{let t=e[qa]??Ja.get(e);if(!t){t=Ua(e,i);try{e[qa]=t}catch{}Ja.set(e,t)}e=t}return e.displayName=`Animated(${t})`,e};return Yr(e,(t,n)=>{B.arr(e)&&(n=Xa(t)),a[n]=a(t)}),{animated:a}},Xa=e=>B.str(e)?e:e&&B.str(e.displayName)?e.displayName:B.fun(e)&&e.name||null;function Za(e,...t){return B.fun(e)?e(...t):e}var Qa=(e,t)=>e===!0||!!(t&&e&&(B.fun(e)?e(t):Xr(e).includes(t))),$a=(e,t)=>B.obj(e)?t&&e[t]:e,eo=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,to=e=>e,no=(e,t=to)=>{let n=ro;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));let r={};for(let i of n){let n=t(e[i],i);B.und(n)||(r[i]=n)}return r},ro=[`config`,`onProps`,`onStart`,`onChange`,`onPause`,`onResume`,`onRest`],io={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function ao(e){let t={},n=0;if(Yr(e,(e,r)=>{io[r]||(t[r]=e,n++)}),n)return t}function oo(e){let t=ao(e);if(t){let n={to:t};return Yr(e,(e,r)=>r in t||(n[r]=e)),n}return{...e}}function so(e){let t=Zi(e);return B.arr(t)?t.map(so):Ca(t)?ei.createStringInterpolator({range:[0,1],output:[t,t]})(1):t}function co(e){for(let t in e)return!0;return!1}function lo(e){return B.fun(e)||B.arr(e)&&B.obj(e[0])}function U(e,t){e.ref?.delete(e),t?.delete(e)}function uo(e,t){t&&e.ref!==t&&(e.ref?.delete(e),t.add(e),e.ref=t)}var fo={...{default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}}.default,mass:1,damping:1,easing:qi.linear,clamp:!1},po=class{constructor(){this.velocity=0,Object.assign(this,fo)}};function mo(e,t,n){n&&(n={...n},ho(n,t),t={...n,...t}),ho(e,t),Object.assign(e,t);for(let t in fo)e[t]??(e[t]=fo[t]);let{frequency:r,damping:i}=e,{mass:a}=e;return B.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=(2*Math.PI/r)**2*a,e.friction=4*Math.PI*i*a/r),e}function ho(e,t){if(!B.und(t.decay))e.duration=void 0;else{let n=!B.und(t.tension)||!B.und(t.friction);(n||!B.und(t.frequency)||!B.und(t.damping)||!B.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var go=[],_o=class{constructor(){this.changed=!1,this.values=go,this.toValues=null,this.fromValues=go,this.config=new po,this.immediate=!1}};function vo(e,{key:t,props:n,defaultProps:r,state:i,actions:a}){return new Promise((o,s)=>{let c,l,u=Qa(n.cancel??r?.cancel,t);if(u)p();else{B.und(n.pause)||(i.paused=Qa(n.pause,t));let e=r?.pause;e!==!0&&(e=i.paused||Qa(e,t)),c=Za(n.delay||0,t),e?(i.resumeQueue.add(f),a.pause()):(a.resume(),f())}function d(){i.resumeQueue.add(f),i.timeouts.delete(l),l.cancel(),c=l.time-z.now()}function f(){c>0&&!ei.skipAnimation?(i.delayed=!0,l=z.setTimeout(p,c),i.pauseQueue.add(d),i.timeouts.add(l)):p()}function p(){i.delayed&&=!1,i.pauseQueue.delete(d),i.timeouts.delete(l),e<=(i.cancelId||0)&&(u=!0);try{a.start({...n,callId:e,cancel:u},o)}catch(e){s(e)}}})}var yo=(e,t)=>t.length==1?t[0]:t.some(e=>e.cancelled)?So(e.get()):t.every(e=>e.noop)?bo(e.get()):xo(e.get(),t.every(e=>e.finished)),bo=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),xo=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),So=e=>({value:e,cancelled:!0,finished:!1});function Co(e,t,n,r){let{callId:i,parentId:a,onRest:o}=t,{asyncTo:s,promise:c}=n;return!a&&e===s&&!t.reset?c:n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;let l=no(t,(e,t)=>t===`onRest`?void 0:e),u,d,f=new Promise((e,t)=>(u=e,d=t)),p=e=>{let t=i<=(n.cancelId||0)&&So(r)||i!==n.asyncId&&xo(r,!1);if(t)throw e.result=t,d(e),e},m=0,h=(e,t)=>{let a=new To,o=new Eo;return(async()=>{p(a);let s=B.obj(e)?{...e}:{...t,to:e};if(s.parentId=i,Yr(l,(e,t)=>{B.und(s[t])&&(s[t]=e)}),ei.skipAnimation){if(++m>1024)throw wo(n),o.result=xo(r,!1),d(o),o;return s.immediate=!0,await r.start(s)}let c=await r.start(s);return p(a),n.paused&&await new Promise(e=>{n.resumeQueue.add(e)}),c})()},g;try{let t;t=B.arr(e)?(async e=>{for(let t of e)await h(t)})(e):Promise.resolve(e(h,r.stop.bind(r))),await Promise.all([t.then(u),f]),g=xo(r.get(),!0,!1)}catch(e){if(e instanceof To)g=e.result;else if(e instanceof Eo)g=e.result;else throw e}finally{i==n.asyncId&&(n.asyncId=a,n.asyncTo=a?s:void 0,n.promise=a?c:void 0)}return B.fun(o)&&z.batchedUpdates(()=>{o(g,r,r.item)}),g})()}function wo(e,t){Zr(e.timeouts,e=>e.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var To=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},Eo=class extends Error{constructor(){super(`SkipAnimationSignal`)}},Do=e=>e instanceof ko,Oo=1,ko=class extends ta{constructor(...e){super(...e),this.id=Oo++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=Ma(this);return e&&e.getValue()}to(...e){return ei.to(this,e)}interpolate(...e){return ba(),ei.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){ea(this,{type:`change`,parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||di.sort(this),ea(this,{type:`priority`,parent:this,priority:e})}},Ao=Symbol.for(`SpringPhase`),jo=1,Mo=2,No=4,Po=e=>(e[Ao]&jo)>0,Fo=e=>(e[Ao]&Mo)>0,Io=e=>(e[Ao]&No)>0,Lo=(e,t)=>t?e[Ao]|=3:e[Ao]&=-3,Ro=(e,t)=>t?e[Ao]|=No:e[Ao]&=-5,zo=class extends ko{constructor(e,t){if(super(),this.animation=new _o,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!B.und(e)||!B.und(t)){let n=B.obj(e)?{...e}:{...t,from:e};B.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Fo(this)||this._state.asyncTo)||Io(this)}get goal(){return Zi(this.animation.to)}get velocity(){let e=Ma(this);return e instanceof Ia?e.lastVelocity||0:e.getPayload().map(e=>e.lastVelocity||0)}get hasAnimated(){return Po(this)}get isAnimating(){return Fo(this)}get isPaused(){return Io(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,r=this.animation,{toValues:i}=r,{config:a}=r,o=Pa(r.to);!o&&Xi(r.to)&&(i=Xr(Zi(r.to))),r.values.forEach((s,c)=>{if(s.done)return;let l=s.constructor==La?1:o?o[c].lastPosition:i[c],u=r.immediate,d=l;if(!u){if(d=s.lastPosition,a.tension<=0){s.done=!0;return}let t=s.elapsedTime+=e,n=r.fromValues[c],i=s.v0==null?s.v0=B.arr(a.velocity)?a.velocity[c]:a.velocity:s.v0,o,f=a.precision||(n==l?.005:Math.max(Math.max(Math.abs(l),Math.abs(n),1)*2**-52,Math.min(1,Math.abs(l-n)*.001)));if(!B.und(a.duration)){let r=1;a.duration>0&&(this._memoizedDuration!==a.duration&&(this._memoizedDuration=a.duration,s.durationProgress>0&&(s.elapsedTime=a.duration*s.durationProgress,t=s.elapsedTime+=e)),r=(a.progress||0)+t/this._memoizedDuration,r=r>1?1:r<0?0:r,s.durationProgress=r),d=n+a.easing(r)*(l-n),o=(d-s.lastPosition)/e,u=r==1}else if(a.decay){let e=a.decay===!0?.998:a.decay,r=Math.exp(-(1-e)*t);d=n+i/(1-e)*(1-r),u=Math.abs(s.lastPosition-d)<=f,o=i*r}else{o=s.lastVelocity==null?i:s.lastVelocity;let t=a.restVelocity||f/10,r=a.clamp?0:a.bounce,c=!B.und(r),p=n==l?s.v0>0:n<l,m,h=!1,g=Math.ceil(e/1);for(let e=0;e<g&&(m=Math.abs(o)>t,!(!m&&(u=Math.abs(l-d)<=f,u)));++e){c&&(h=d==l||d>l==p,h&&(o=-o*r,d=l));let e=(-a.tension*1e-6*(d-l)+-a.friction*.001*o)/a.mass;o+=e*1,d+=o*1}}s.lastVelocity=o,Number.isNaN(d)&&(console.warn(`Got NaN while animating:`,this),u=!0)}o&&!o[c].done&&(u=!1),u?s.done=!0:t=!1,s.setValue(d,a.round)&&(n=!0)});let s=Ma(this),c=s.getValue();if(t){let e=Zi(r.to);(c!==e||n)&&!a.decay?(s.setValue(e),this._onChange(e)):n&&a.decay&&this._onChange(c),this._stop()}else n&&this._onChange(c)}set(e){return z.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Fo(this)){let{to:e,config:t}=this.animation;z.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||=[]).push(e),this}start(e,t){let n;return B.und(e)?(n=this.queue||[],this.queue=[]):n=[B.obj(e)?e:{...t,to:e}],Promise.all(n.map(e=>this._update(e))).then(e=>yo(this,e))}stop(e){let{to:t}=this.animation;return B.und(t)||this._focus(this.get()),wo(this._state,e&&this._lastCallId),z.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type==`change`?this._start():e.type==`priority`&&(this.priority=e.priority+1)}_prepareNode(e){let t=this.key||``,{to:n,from:r}=e;n=B.obj(n)?n[t]:n,(n==null||lo(n))&&(n=void 0),r=B.obj(r)?r[t]:r,r??=void 0;let i={to:n,from:r};return Po(this)||(e.reverse&&([n,r]=[r,n]),r=Zi(r),B.und(r)?Ma(this)||this._set(n):this._set(r)),i}_update({...e},t){let{key:n,defaultProps:r}=this;e.default&&Object.assign(r,no(e,(e,t)=>/^on/.test(t)?$a(e,n):e)),Ko(this,e,`onProps`),qo(this,`onProps`,e,this);let i=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");let a=this._state;return vo(++this._lastCallId,{key:n,props:e,defaultProps:r,state:a,actions:{pause:()=>{Io(this)||(Ro(this,!0),Qr(a.pauseQueue),qo(this,`onPause`,xo(this,Bo(this,this.animation.to)),this))},resume:()=>{Io(this)&&(Ro(this,!1),Fo(this)&&this._resume(),Qr(a.resumeQueue),qo(this,`onResume`,xo(this,Bo(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(n=>{if(e.loop&&n.finished&&!(t&&n.noop)){let t=Vo(e);if(t)return this._update(t,!0)}return n})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(So(this));let r=!B.und(e.to),i=!B.und(e.from);if(r||i)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(So(this));let{key:a,defaultProps:o,animation:s}=this,{to:c,from:l}=s,{to:u=c,from:d=l}=e;i&&!r&&(!t.default||B.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);let f=!Jr(d,l);f&&(s.from=d),d=Zi(d);let p=!Jr(u,c);p&&this._focus(u);let m=lo(t.to),{config:h}=s,{decay:g,velocity:_}=h;(r||i)&&!h.decay&&(h.velocity=0),t.config&&!m&&mo(h,Za(t.config,a),t.config===o.config?void 0:Za(o.config,a));let v=Ma(this);if(!v||B.und(u))return n(xo(this,!0));let y=B.und(t.reset)?i&&!t.default:!B.und(d)&&Qa(t.reset,a),b=y?d:this.get(),x=so(u),S=B.num(x)||B.arr(x)||Ca(x),C=!m&&(!S||Qa(o.immediate||t.immediate,a));if(p){let e=Ha(u);if(e!==v.constructor)if(C)v=this._set(x);else throw Error(`Cannot animate between ${v.constructor.name} and ${e.name}, as the "to" prop suggests`)}let w=v.constructor,T=Xi(u),E=!1;if(!T){let e=y||!Po(this)&&f;(p||e)&&(E=Jr(so(b),x),T=!E),(!Jr(s.immediate,C)&&!C||!Jr(h.decay,g)||!Jr(h.velocity,_))&&(T=!0)}if(E&&Fo(this)&&(s.changed&&!y?T=!0:T||this._stop(c)),!m&&((T||Xi(c))&&(s.values=v.getPayload(),s.toValues=Xi(u)?null:w==La?[1]:Xr(x)),s.immediate!=C&&(s.immediate=C,!C&&!y&&this._set(c)),T)){let{onRest:e}=s;V(Go,e=>Ko(this,t,e));let r=xo(this,Bo(this,c));Qr(this._pendingCalls,r),this._pendingCalls.add(n),s.changed&&z.batchedUpdates(()=>{s.changed=!y,e?.(r,this),y?Za(o.onRest,r):s.onStart?.(r,this)})}y&&this._set(b),m?n(Co(t.to,t,this._state,this)):T?this._start():Fo(this)&&!p?this._pendingCalls.add(n):n(bo(b))}_focus(e){let t=this.animation;e!==t.to&&(Qi(this)&&this._detach(),t.to=e,Qi(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;Xi(t)&&(ra(t,this),Do(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;Xi(e)&&ia(e,this)}_set(e,t=!0){let n=Zi(e);if(!B.und(n)){let e=Ma(this);if(!e||!Jr(n,e.getValue())){let r=Ha(n);!e||e.constructor!=r?Na(this,r.create(n)):e.setValue(n),e&&z.batchedUpdates(()=>{this._onChange(n,t)})}}return Ma(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,qo(this,`onStart`,xo(this,Bo(this,e.to)),this))}_onChange(e,t){let n=xo(e,!1);t||(this._onStart(),Za(this.animation.onChange,n,this)),Za(this.defaultProps.onChange,n,this),super._onChange(e,t)}_start(){let e=this.animation;Ma(this).reset(Zi(e.to)),e.immediate||(e.fromValues=e.values.map(e=>e.lastPosition)),Fo(this)||(Lo(this,!0),Io(this)||this._resume())}_resume(){ei.skipAnimation?this.finish():di.start(this)}_stop(e,t){if(Fo(this)){Lo(this,!1);let n=this.animation;V(n.values,e=>{e.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),ea(this,{type:`idle`,parent:this});let r=t?So(this.get()):xo(this.get(),Bo(this,e??n.to));Qr(this._pendingCalls,r),n.changed=!1,qo(this,`onRest`,r,this)}}};function Bo(e,t){let n=so(t);return Jr(so(e.get()),n)}function Vo(e,t=e.loop,n=e.to){let r=Za(t);if(r){let i=r!==!0&&oo(r),a=(i||e).reverse,o=!i||i.reset;return Ho({...e,loop:t,default:!1,pause:void 0,to:!a||lo(n)?n:void 0,from:o?e.from:void 0,reset:o,...i})}}function Ho(e){let{to:t,from:n}=e=oo(e),r=new Set;return B.obj(t)&&Wo(t,r),B.obj(n)&&Wo(n,r),e.keys=r.size?Array.from(r):null,e}function Uo(e){let t=Ho(e);return B.und(t.default)&&(t.default=no(t)),t}function Wo(e,t){Yr(e,(e,n)=>e!=null&&t.add(n))}var Go=[`onStart`,`onRest`,`onChange`,`onPause`,`onResume`];function Ko(e,t,n){e.animation[n]=t[n]===eo(t,n)?void 0:$a(t[n],e.key)}function qo(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var Jo=[`onStart`,`onChange`,`onRest`],Yo=1,Xo=class{constructor(e,t){this.id=Yo++,this.springs={},this.queue=[],this._lastAsyncId=0,this._lastLoopId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){let e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(let t in e){let n=e[t];B.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(Ho(e)),this}start(e){let{queue:t}=this;return e?t=Xr(e).map(Ho):this.queue=[],this._flush?this._flush(this,t):(rs(this,t),Zo(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){let n=this.springs;V(Xr(t),t=>n[t].stop(!!e))}else wo(this._state,this._lastAsyncId),this.each(t=>t.stop(!!e));return this}pause(e){if(B.und(e))this.start({pause:!0});else{let t=this.springs;V(Xr(e),e=>t[e].pause())}return this}resume(e){if(B.und(e))this.start({pause:!1});else{let t=this.springs;V(Xr(e),e=>t[e].resume())}return this}each(e){Yr(this.springs,e)}onLoopReset(e){let t=this._onLoopReset??=new Set;return t.add(e),()=>{t.delete(e)}}_onFrame(){let{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,i=this._changed.size>0;(r&&!this._started||i&&!this._started)&&(this._started=!0,Zr(e,([e,t])=>{t.value=this.get(),e(t,this,this._item)}));let a=!r&&this._started,o=i||a&&n.size?this.get():null;i&&t.size&&Zr(t,([e,t])=>{t.value=o,e(t,this,this._item)}),a&&(this._started=!1,Zr(n,([e,t])=>{t.value=o,e(t,this,this._item)}))}eventObserved(e){if(e.type==`change`)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type==`idle`)this._active.delete(e.parent);else return;z.onFrame(this._onFrame)}};function Zo(e,t){return Promise.all(t.map(t=>Qo(e,t))).then(t=>yo(e,t))}async function Qo(e,t,n){let{keys:r,to:i,from:a,loop:o,onRest:s,onResolve:c}=t,l=B.obj(t.default)&&t.default;o&&(t.loop=!1);let u=t,d=!n&&!u.parentId&&`loop`in t?++e._lastLoopId:n?u.loopId:e._lastLoopId;i===!1&&(t.to=null),a===!1&&(t.from=null);let f=B.arr(i)||B.fun(i)?i:void 0;f?(t.to=void 0,t.onRest=void 0,l&&(l.onRest=void 0)):V(Jo,n=>{let r=t[n];if(B.fun(r)){let i=e._events[n];t[n]=(({finished:e,cancelled:t})=>{let n=i.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):i.set(r,{value:null,finished:e||!1,cancelled:t||!1})}),l&&(l[n]=t[n])}});let p=e._state;t.pause===!p.paused?(p.paused=t.pause,Qr(t.pause?p.pauseQueue:p.resumeQueue)):p.paused&&(t.pause=!0);let m=(r||Object.keys(e.springs)).map(n=>e.springs[n].start(t)),h=t.cancel===!0||eo(t,`cancel`)===!0;(f||h&&p.asyncId)&&m.push(vo(++e._lastAsyncId,{props:t,state:p,actions:{pause:Kr,resume:Kr,start(t,n){h?(wo(p,e._lastAsyncId),n(So(e))):(t.onRest=s,n(Co(f,t,p,e)))}}})),p.paused&&await new Promise(e=>{p.resumeQueue.add(e)});let g=yo(e,await Promise.all(m));if(o&&g.finished&&!(n&&g.noop)&&d===e._lastLoopId){let n=Vo(t,o,i);if(n)return n.loopId=d,e._onLoopReset?.forEach(e=>e()),rs(e,[n]),Qo(e,n,!0)}return c&&z.batchedUpdates(()=>c(g,e,e.item)),g}function $o(e,t){let n={...e.springs};return t&&V(Xr(t),e=>{B.und(e.keys)&&(e=Ho(e)),B.obj(e.to)||(e={...e,to:void 0}),ns(n,e,e=>ts(e))}),es(e,n),n}function es(e,t){Yr(t,(t,n)=>{e.springs[n]||(e.springs[n]=t,ra(t,e))})}function ts(e,t){let n=new zo;return n.key=e,t&&ra(n,t),n}function ns(e,t,n){t.keys&&V(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function rs(e,t){V(t,t=>{ns(e.springs,t,t=>ts(t,e))})}var is=x.createContext({pause:!1,immediate:!1}),as=()=>{let e=[],t=function(t){Sa();let r=[];return V(e,(e,i)=>{if(B.und(t))r.push(e.start());else{let a=n(t,e,i);a&&r.push(e.start(a))}}),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){let n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return V(e,e=>e.pause(...arguments)),this},t.resume=function(){return V(e,e=>e.resume(...arguments)),this},t.set=function(t){V(e,(e,n)=>{let r=B.fun(t)?t(n,e):t;r&&e.set(r)})},t.start=function(t){let n=[];return V(e,(e,r)=>{if(B.und(t))n.push(e.start());else{let i=this._getProps(t,e,r);i&&n.push(e.start(i))}}),n},t.stop=function(){return V(e,e=>e.stop(...arguments)),this},t.update=function(t){return V(e,(e,n)=>e.update(this._getProps(t,e,n))),this};let n=function(e,t,n){return B.fun(e)?e(n,t):e};return t._getProps=n,t};function os(e,t,n){let r=B.fun(t)&&t;r&&!n&&(n=[]);let i=(0,x.useMemo)(()=>r||arguments.length==3?as():void 0,[]),a=(0,x.useRef)(0),o=Ea(),s=(0,x.useMemo)(()=>({ctrls:[],queue:[],flush(e,t){let n=$o(e,t);return a.current>0&&!s.queue.length&&!Object.keys(n).some(t=>!e.springs[t])?Zo(e,t):new Promise(r=>{es(e,n),s.queue.push(()=>{r(Zo(e,t))}),o()})}}),[]),c=(0,x.useRef)([...s.ctrls]),l=(0,x.useRef)([]),u=(0,x.useRef)([]);u.current=[];let d=ka(e)||0;(0,x.useMemo)(()=>{V(c.current.slice(e,d),e=>{U(e,i),e.stop(!0)}),c.current.length=e,f(d,e)},[e]),(0,x.useMemo)(()=>{f(0,Math.min(d,e))},n);function f(e,n){for(let i=e;i<n;i++){let e=c.current[i]||(c.current[i]=new Xo(null,s.flush)),n=r?r(i,e):t[i];n&&(l.current[i]=Uo(n))}}let p=c.current.map((e,t)=>$o(e,l.current[t])),m=(0,x.useContext)(is),h=m!==ka(m)&&co(m);wa(()=>{a.current++,s.ctrls=c.current;let{queue:e}=s;e.length&&(s.queue=[],V(e,e=>e()));let t=l.current.length>0?l.current:u.current;V(c.current,(e,n)=>{i?.add(e),h&&e.start({default:m});let r=t[n];r&&(uo(e,r.ref),e.ref?e.queue.push({...r,default:B.obj(r.default)?{...r.default}:r.default}):e.start(r))}),l.current.length>0&&(u.current=l.current),l.current=[]}),Da(()=>()=>{V(s.ctrls,e=>e.stop(!0))});let g=p.map(e=>({...e}));return i?[g,i]:g}function ss(e,t){let n=B.fun(e),[[r],i]=os(1,n?e:[e],n?t||[]:t);return n||arguments.length==2?[r,i]:r}var cs=class extends ko{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=Li(...t);let n=this._get(),r=Ha(n);Na(this,r.create(n))}advance(e){let t=this._get();Jr(t,this.get())||(Ma(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&us(this._active)&&ds(this)}_get(){let e=B.arr(this.source)?this.source.map(Zi):Xr(Zi(this.source));return this.calc(...e)}_start(){this.idle&&!us(this._active)&&(this.idle=!1,V(Pa(this),e=>{e.done=!1}),ei.skipAnimation?(z.batchedUpdates(()=>this.advance()),ds(this)):di.start(this))}_attach(){let e=1;V(Xr(this.source),t=>{Xi(t)&&ra(t,this),Do(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){V(Xr(this.source),e=>{Xi(e)&&ia(e,this)}),this._active.clear(),ds(this)}eventObserved(e){e.type==`change`?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type==`idle`?this._active.delete(e.parent):e.type==`priority`&&(this.priority=Xr(this.source).reduce((e,t)=>Math.max(e,(Do(t)?t.priority:0)+1),0))}};function ls(e){return e.idle!==!1}function us(e){return!e.size||Array.from(e).every(ls)}function ds(e){e.idle||(e.idle=!0,V(Pa(e),e=>{e.done=!0}),ea(e,{type:`idle`,parent:e}))}var fs=(e,...t)=>new cs(e,t);ei.assign({createStringInterpolator:ga,to:(e,t)=>new cs(e,t)}),di.advance;var ps=g(),ms=/^--/;function hs(e,t){return t==null||typeof t==`boolean`||t===``?``:typeof t==`number`&&t!==0&&!ms.test(e)&&!(vs.hasOwnProperty(e)&&vs[e])?t+`px`:(``+t).trim()}var gs={};function _s(e,t){if(!e.nodeType||!e.setAttribute||!e.removeAttribute)return!1;let n=e.nodeName===`filter`||e.parentNode&&e.parentNode.nodeName===`filter`,{className:r,style:i,children:a,scrollTop:o,scrollLeft:s,viewBox:c,...l}=t,u=Object.values(l),d=Object.keys(l).map(t=>n||e.hasAttribute(t)?t:gs[t]||(gs[t]=t.replace(/([A-Z])/g,e=>`-`+e.toLowerCase())));t.hasOwnProperty(`children`)&&(e.textContent=a);for(let t in i)if(i.hasOwnProperty(t)){let n=hs(t,i[t]);ms.test(t)?e.style.setProperty(t,n):e.style[t]=n}d.forEach((t,n)=>{let r=u[n];r===void 0?e.removeAttribute(t):e.setAttribute(t,r)}),t.hasOwnProperty(`className`)&&(r===void 0?e.removeAttribute(`class`):e.className=r),o!==void 0&&(e.scrollTop=o),s!==void 0&&(e.scrollLeft=s),t.hasOwnProperty(`viewBox`)&&(c===void 0?e.removeAttribute(`viewBox`):e.setAttribute(`viewBox`,c))}var vs={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ys=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),bs=[`Webkit`,`Ms`,`Moz`,`O`];vs=Object.keys(vs).reduce((e,t)=>(bs.forEach(n=>e[ys(n,t)]=e[t]),e),vs);var xs=/^(matrix3d|matrix|translate3d|translate[XYZ]?|scale3d|scale[XYZ]?|rotate3d|rotate[XYZ]?|skew[XY]?)$/,Ss=/^(translate)/,Cs=/^(rotate|skew)/,ws=(e,t)=>B.num(e)&&e!==0?e+t:e,Ts=(e,t)=>B.arr(e)?e.every(e=>Ts(e,t)):B.num(e)?e===t:parseFloat(e)===t,Es=class extends za{constructor({x:e,y:t,z:n,...r}){let i=[],a=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),a.push(e=>[`translate3d(${e.map(e=>ws(e,`px`)).join(`,`)})`,Ts(e,0)])),Yr(r,(e,t)=>{if(t===`transform`)i.push([e||``]),a.push(e=>[e,e===``]);else if(xs.test(t)){if(delete r[t],B.und(e))return;let n=Ss.test(t)?`px`:Cs.test(t)?`deg`:``;i.push(Xr(e)),a.push(t===`rotate3d`?([e,t,r,i])=>[`rotate3d(${e},${t},${r},${ws(i,n)})`,Ts(i,0)]:e=>[`${t}(${e.map(e=>ws(e,n)).join(`,`)})`,Ts(e,+!!t.startsWith(`scale`))])}}),i.length&&(r.transform=new Ds(i,a)),super(r)}},Ds=class extends ta{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||=this._get()}_get(){let e=``,t=!0;return V(this.inputs,(n,r)=>{let i=Zi(n[0]),[a,o]=this.transforms[r](B.arr(i)?i:n.map(Zi));e+=` `+a,t&&=o}),t?`none`:e}observerAdded(e){e==1&&V(this.inputs,e=>V(e,e=>Xi(e)&&ra(e,this)))}observerRemoved(e){e==0&&V(this.inputs,e=>V(e,e=>Xi(e)&&ia(e,this)))}eventObserved(e){e.type==`change`&&(this._value=null),ea(this,e)}},Os=`a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.big.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.keygen.label.legend.li.link.main.map.mark.menu.menuitem.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.param.picture.pre.progress.q.rp.rt.ruby.s.samp.script.section.select.small.source.span.strong.style.sub.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.title.tr.track.u.ul.var.video.wbr.circle.clipPath.defs.ellipse.foreignObject.g.image.line.linearGradient.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.svg.text.tspan`.split(`.`);ei.assign({batchedUpdates:ps.unstable_batchedUpdates,createStringInterpolator:ga,colors:vi});var ks=Ya(Os,{applyAnimatedValues:_s,createAnimatedStyle:e=>new Es(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}).animated,As=`BN.BN.BN.BN.BN.BN.BN.BN.BN.S.B.S.WS.B.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.B.B.B.S.WS.ON.ON.ET.ET.ET.ON.ON.ON.ON.ON.ES.CS.ES.CS.CS.EN.EN.EN.EN.EN.EN.EN.EN.EN.EN.CS.ON.ON.ON.ON.ON.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.ON.ON.ON.ON.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.ON.ON.ON.BN.BN.BN.BN.BN.BN.B.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.CS.ON.ET.ET.ET.ET.ON.ON.ON.ON.L.ON.ON.BN.ON.ON.ET.ET.EN.EN.ON.L.ON.ON.ON.EN.L.ON.ON.ON.ON.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.L.L.L.L.L.L.L.L`.split(`.`),js=[[697,698,`ON`],[706,719,`ON`],[722,735,`ON`],[741,749,`ON`],[751,767,`ON`],[768,879,`NSM`],[884,885,`ON`],[894,894,`ON`],[900,901,`ON`],[903,903,`ON`],[1014,1014,`ON`],[1155,1161,`NSM`],[1418,1418,`ON`],[1421,1422,`ON`],[1423,1423,`ET`],[1424,1424,`R`],[1425,1469,`NSM`],[1470,1470,`R`],[1471,1471,`NSM`],[1472,1472,`R`],[1473,1474,`NSM`],[1475,1475,`R`],[1476,1477,`NSM`],[1478,1478,`R`],[1479,1479,`NSM`],[1480,1535,`R`],[1536,1541,`AN`],[1542,1543,`ON`],[1544,1544,`AL`],[1545,1546,`ET`],[1547,1547,`AL`],[1548,1548,`CS`],[1549,1549,`AL`],[1550,1551,`ON`],[1552,1562,`NSM`],[1563,1610,`AL`],[1611,1631,`NSM`],[1632,1641,`AN`],[1642,1642,`ET`],[1643,1644,`AN`],[1645,1647,`AL`],[1648,1648,`NSM`],[1649,1749,`AL`],[1750,1756,`NSM`],[1757,1757,`AN`],[1758,1758,`ON`],[1759,1764,`NSM`],[1765,1766,`AL`],[1767,1768,`NSM`],[1769,1769,`ON`],[1770,1773,`NSM`],[1774,1775,`AL`],[1776,1785,`EN`],[1786,1808,`AL`],[1809,1809,`NSM`],[1810,1839,`AL`],[1840,1866,`NSM`],[1867,1957,`AL`],[1958,1968,`NSM`],[1969,1983,`AL`],[1984,2026,`R`],[2027,2035,`NSM`],[2036,2037,`R`],[2038,2041,`ON`],[2042,2044,`R`],[2045,2045,`NSM`],[2046,2069,`R`],[2070,2073,`NSM`],[2074,2074,`R`],[2075,2083,`NSM`],[2084,2084,`R`],[2085,2087,`NSM`],[2088,2088,`R`],[2089,2093,`NSM`],[2094,2136,`R`],[2137,2139,`NSM`],[2140,2143,`R`],[2144,2191,`AL`],[2192,2193,`AN`],[2194,2198,`AL`],[2199,2207,`NSM`],[2208,2249,`AL`],[2250,2273,`NSM`],[2274,2274,`AN`],[2275,2306,`NSM`],[2362,2362,`NSM`],[2364,2364,`NSM`],[2369,2376,`NSM`],[2381,2381,`NSM`],[2385,2391,`NSM`],[2402,2403,`NSM`],[2433,2433,`NSM`],[2492,2492,`NSM`],[2497,2500,`NSM`],[2509,2509,`NSM`],[2530,2531,`NSM`],[2546,2547,`ET`],[2555,2555,`ET`],[2558,2558,`NSM`],[2561,2562,`NSM`],[2620,2620,`NSM`],[2625,2626,`NSM`],[2631,2632,`NSM`],[2635,2637,`NSM`],[2641,2641,`NSM`],[2672,2673,`NSM`],[2677,2677,`NSM`],[2689,2690,`NSM`],[2748,2748,`NSM`],[2753,2757,`NSM`],[2759,2760,`NSM`],[2765,2765,`NSM`],[2786,2787,`NSM`],[2801,2801,`ET`],[2810,2815,`NSM`],[2817,2817,`NSM`],[2876,2876,`NSM`],[2879,2879,`NSM`],[2881,2884,`NSM`],[2893,2893,`NSM`],[2901,2902,`NSM`],[2914,2915,`NSM`],[2946,2946,`NSM`],[3008,3008,`NSM`],[3021,3021,`NSM`],[3059,3064,`ON`],[3065,3065,`ET`],[3066,3066,`ON`],[3072,3072,`NSM`],[3076,3076,`NSM`],[3132,3132,`NSM`],[3134,3136,`NSM`],[3142,3144,`NSM`],[3146,3149,`NSM`],[3157,3158,`NSM`],[3170,3171,`NSM`],[3192,3198,`ON`],[3201,3201,`NSM`],[3260,3260,`NSM`],[3276,3277,`NSM`],[3298,3299,`NSM`],[3328,3329,`NSM`],[3387,3388,`NSM`],[3393,3396,`NSM`],[3405,3405,`NSM`],[3426,3427,`NSM`],[3457,3457,`NSM`],[3530,3530,`NSM`],[3538,3540,`NSM`],[3542,3542,`NSM`],[3633,3633,`NSM`],[3636,3642,`NSM`],[3647,3647,`ET`],[3655,3662,`NSM`],[3761,3761,`NSM`],[3764,3772,`NSM`],[3784,3790,`NSM`],[3864,3865,`NSM`],[3893,3893,`NSM`],[3895,3895,`NSM`],[3897,3897,`NSM`],[3898,3901,`ON`],[3953,3966,`NSM`],[3968,3972,`NSM`],[3974,3975,`NSM`],[3981,3991,`NSM`],[3993,4028,`NSM`],[4038,4038,`NSM`],[4141,4144,`NSM`],[4146,4151,`NSM`],[4153,4154,`NSM`],[4157,4158,`NSM`],[4184,4185,`NSM`],[4190,4192,`NSM`],[4209,4212,`NSM`],[4226,4226,`NSM`],[4229,4230,`NSM`],[4237,4237,`NSM`],[4253,4253,`NSM`],[4957,4959,`NSM`],[5008,5017,`ON`],[5120,5120,`ON`],[5760,5760,`WS`],[5787,5788,`ON`],[5906,5908,`NSM`],[5938,5939,`NSM`],[5970,5971,`NSM`],[6002,6003,`NSM`],[6068,6069,`NSM`],[6071,6077,`NSM`],[6086,6086,`NSM`],[6089,6099,`NSM`],[6107,6107,`ET`],[6109,6109,`NSM`],[6128,6137,`ON`],[6144,6154,`ON`],[6155,6157,`NSM`],[6158,6158,`BN`],[6159,6159,`NSM`],[6277,6278,`NSM`],[6313,6313,`NSM`],[6432,6434,`NSM`],[6439,6440,`NSM`],[6450,6450,`NSM`],[6457,6459,`NSM`],[6464,6464,`ON`],[6468,6469,`ON`],[6622,6655,`ON`],[6679,6680,`NSM`],[6683,6683,`NSM`],[6742,6742,`NSM`],[6744,6750,`NSM`],[6752,6752,`NSM`],[6754,6754,`NSM`],[6757,6764,`NSM`],[6771,6780,`NSM`],[6783,6783,`NSM`],[6832,6877,`NSM`],[6880,6891,`NSM`],[6912,6915,`NSM`],[6964,6964,`NSM`],[6966,6970,`NSM`],[6972,6972,`NSM`],[6978,6978,`NSM`],[7019,7027,`NSM`],[7040,7041,`NSM`],[7074,7077,`NSM`],[7080,7081,`NSM`],[7083,7085,`NSM`],[7142,7142,`NSM`],[7144,7145,`NSM`],[7149,7149,`NSM`],[7151,7153,`NSM`],[7212,7219,`NSM`],[7222,7223,`NSM`],[7376,7378,`NSM`],[7380,7392,`NSM`],[7394,7400,`NSM`],[7405,7405,`NSM`],[7412,7412,`NSM`],[7416,7417,`NSM`],[7616,7679,`NSM`],[8125,8125,`ON`],[8127,8129,`ON`],[8141,8143,`ON`],[8157,8159,`ON`],[8173,8175,`ON`],[8189,8190,`ON`],[8192,8202,`WS`],[8203,8205,`BN`],[8207,8207,`R`],[8208,8231,`ON`],[8232,8232,`WS`],[8233,8233,`B`],[8234,8238,`BN`],[8239,8239,`CS`],[8240,8244,`ET`],[8245,8259,`ON`],[8260,8260,`CS`],[8261,8286,`ON`],[8287,8287,`WS`],[8288,8303,`BN`],[8304,8304,`EN`],[8308,8313,`EN`],[8314,8315,`ES`],[8316,8318,`ON`],[8320,8329,`EN`],[8330,8331,`ES`],[8332,8334,`ON`],[8352,8399,`ET`],[8400,8432,`NSM`],[8448,8449,`ON`],[8451,8454,`ON`],[8456,8457,`ON`],[8468,8468,`ON`],[8470,8472,`ON`],[8478,8483,`ON`],[8485,8485,`ON`],[8487,8487,`ON`],[8489,8489,`ON`],[8494,8494,`ET`],[8506,8507,`ON`],[8512,8516,`ON`],[8522,8525,`ON`],[8528,8543,`ON`],[8585,8587,`ON`],[8592,8721,`ON`],[8722,8722,`ES`],[8723,8723,`ET`],[8724,9013,`ON`],[9083,9108,`ON`],[9110,9257,`ON`],[9280,9290,`ON`],[9312,9351,`ON`],[9352,9371,`EN`],[9450,9899,`ON`],[9901,10239,`ON`],[10496,11123,`ON`],[11126,11263,`ON`],[11493,11498,`ON`],[11503,11505,`NSM`],[11513,11519,`ON`],[11647,11647,`NSM`],[11744,11775,`NSM`],[11776,11869,`ON`],[11904,11929,`ON`],[11931,12019,`ON`],[12032,12245,`ON`],[12272,12287,`ON`],[12288,12288,`WS`],[12289,12292,`ON`],[12296,12320,`ON`],[12330,12333,`NSM`],[12336,12336,`ON`],[12342,12343,`ON`],[12349,12351,`ON`],[12441,12442,`NSM`],[12443,12444,`ON`],[12448,12448,`ON`],[12539,12539,`ON`],[12736,12773,`ON`],[12783,12783,`ON`],[12829,12830,`ON`],[12880,12895,`ON`],[12924,12926,`ON`],[12977,12991,`ON`],[13004,13007,`ON`],[13175,13178,`ON`],[13278,13279,`ON`],[13311,13311,`ON`],[19904,19967,`ON`],[42128,42182,`ON`],[42509,42511,`ON`],[42607,42610,`NSM`],[42611,42611,`ON`],[42612,42621,`NSM`],[42622,42623,`ON`],[42654,42655,`NSM`],[42736,42737,`NSM`],[42752,42785,`ON`],[42888,42888,`ON`],[43010,43010,`NSM`],[43014,43014,`NSM`],[43019,43019,`NSM`],[43045,43046,`NSM`],[43048,43051,`ON`],[43052,43052,`NSM`],[43064,43065,`ET`],[43124,43127,`ON`],[43204,43205,`NSM`],[43232,43249,`NSM`],[43263,43263,`NSM`],[43302,43309,`NSM`],[43335,43345,`NSM`],[43392,43394,`NSM`],[43443,43443,`NSM`],[43446,43449,`NSM`],[43452,43453,`NSM`],[43493,43493,`NSM`],[43561,43566,`NSM`],[43569,43570,`NSM`],[43573,43574,`NSM`],[43587,43587,`NSM`],[43596,43596,`NSM`],[43644,43644,`NSM`],[43696,43696,`NSM`],[43698,43700,`NSM`],[43703,43704,`NSM`],[43710,43711,`NSM`],[43713,43713,`NSM`],[43756,43757,`NSM`],[43766,43766,`NSM`],[43882,43883,`ON`],[44005,44005,`NSM`],[44008,44008,`NSM`],[44013,44013,`NSM`],[64285,64285,`R`],[64286,64286,`NSM`],[64287,64296,`R`],[64297,64297,`ES`],[64298,64335,`R`],[64336,64450,`AL`],[64451,64466,`ON`],[64467,64829,`AL`],[64830,64847,`ON`],[64848,64911,`AL`],[64912,64913,`ON`],[64914,64967,`AL`],[64968,64975,`ON`],[64976,65007,`BN`],[65008,65020,`AL`],[65021,65023,`ON`],[65024,65039,`NSM`],[65040,65049,`ON`],[65056,65071,`NSM`],[65072,65103,`ON`],[65104,65104,`CS`],[65105,65105,`ON`],[65106,65106,`CS`],[65108,65108,`ON`],[65109,65109,`CS`],[65110,65118,`ON`],[65119,65119,`ET`],[65120,65121,`ON`],[65122,65123,`ES`],[65124,65126,`ON`],[65128,65128,`ON`],[65129,65130,`ET`],[65131,65131,`ON`],[65136,65278,`AL`],[65279,65279,`BN`],[65281,65282,`ON`],[65283,65285,`ET`],[65286,65290,`ON`],[65291,65291,`ES`],[65292,65292,`CS`],[65293,65293,`ES`],[65294,65295,`CS`],[65296,65305,`EN`],[65306,65306,`CS`],[65307,65312,`ON`],[65339,65344,`ON`],[65371,65381,`ON`],[65504,65505,`ET`],[65506,65508,`ON`],[65509,65510,`ET`],[65512,65518,`ON`],[65520,65528,`BN`],[65529,65533,`ON`],[65534,65535,`BN`],[65793,65793,`ON`],[65856,65932,`ON`],[65936,65948,`ON`],[65952,65952,`ON`],[66045,66045,`NSM`],[66272,66272,`NSM`],[66273,66299,`EN`],[66422,66426,`NSM`],[67584,67870,`R`],[67871,67871,`ON`],[67872,68096,`R`],[68097,68099,`NSM`],[68100,68100,`R`],[68101,68102,`NSM`],[68103,68107,`R`],[68108,68111,`NSM`],[68112,68151,`R`],[68152,68154,`NSM`],[68155,68158,`R`],[68159,68159,`NSM`],[68160,68324,`R`],[68325,68326,`NSM`],[68327,68408,`R`],[68409,68415,`ON`],[68416,68863,`R`],[68864,68899,`AL`],[68900,68903,`NSM`],[68904,68911,`AL`],[68912,68921,`AN`],[68922,68927,`AL`],[68928,68937,`AN`],[68938,68968,`R`],[68969,68973,`NSM`],[68974,68974,`ON`],[68975,69215,`R`],[69216,69246,`AN`],[69247,69290,`R`],[69291,69292,`NSM`],[69293,69311,`R`],[69312,69327,`AL`],[69328,69336,`ON`],[69337,69369,`AL`],[69370,69375,`NSM`],[69376,69423,`R`],[69424,69445,`AL`],[69446,69456,`NSM`],[69457,69487,`AL`],[69488,69505,`R`],[69506,69509,`NSM`],[69510,69631,`R`],[69633,69633,`NSM`],[69688,69702,`NSM`],[69714,69733,`ON`],[69744,69744,`NSM`],[69747,69748,`NSM`],[69759,69761,`NSM`],[69811,69814,`NSM`],[69817,69818,`NSM`],[69826,69826,`NSM`],[69888,69890,`NSM`],[69927,69931,`NSM`],[69933,69940,`NSM`],[70003,70003,`NSM`],[70016,70017,`NSM`],[70070,70078,`NSM`],[70089,70092,`NSM`],[70095,70095,`NSM`],[70191,70193,`NSM`],[70196,70196,`NSM`],[70198,70199,`NSM`],[70206,70206,`NSM`],[70209,70209,`NSM`],[70367,70367,`NSM`],[70371,70378,`NSM`],[70400,70401,`NSM`],[70459,70460,`NSM`],[70464,70464,`NSM`],[70502,70508,`NSM`],[70512,70516,`NSM`],[70587,70592,`NSM`],[70606,70606,`NSM`],[70608,70608,`NSM`],[70610,70610,`NSM`],[70625,70626,`NSM`],[70712,70719,`NSM`],[70722,70724,`NSM`],[70726,70726,`NSM`],[70750,70750,`NSM`],[70835,70840,`NSM`],[70842,70842,`NSM`],[70847,70848,`NSM`],[70850,70851,`NSM`],[71090,71093,`NSM`],[71100,71101,`NSM`],[71103,71104,`NSM`],[71132,71133,`NSM`],[71219,71226,`NSM`],[71229,71229,`NSM`],[71231,71232,`NSM`],[71264,71276,`ON`],[71339,71339,`NSM`],[71341,71341,`NSM`],[71344,71349,`NSM`],[71351,71351,`NSM`],[71453,71453,`NSM`],[71455,71455,`NSM`],[71458,71461,`NSM`],[71463,71467,`NSM`],[71727,71735,`NSM`],[71737,71738,`NSM`],[71995,71996,`NSM`],[71998,71998,`NSM`],[72003,72003,`NSM`],[72148,72151,`NSM`],[72154,72155,`NSM`],[72160,72160,`NSM`],[72193,72198,`NSM`],[72201,72202,`NSM`],[72243,72248,`NSM`],[72251,72254,`NSM`],[72263,72263,`NSM`],[72273,72278,`NSM`],[72281,72283,`NSM`],[72330,72342,`NSM`],[72344,72345,`NSM`],[72544,72544,`NSM`],[72546,72548,`NSM`],[72550,72550,`NSM`],[72752,72758,`NSM`],[72760,72765,`NSM`],[72850,72871,`NSM`],[72874,72880,`NSM`],[72882,72883,`NSM`],[72885,72886,`NSM`],[73009,73014,`NSM`],[73018,73018,`NSM`],[73020,73021,`NSM`],[73023,73029,`NSM`],[73031,73031,`NSM`],[73104,73105,`NSM`],[73109,73109,`NSM`],[73111,73111,`NSM`],[73459,73460,`NSM`],[73472,73473,`NSM`],[73526,73530,`NSM`],[73536,73536,`NSM`],[73538,73538,`NSM`],[73562,73562,`NSM`],[73685,73692,`ON`],[73693,73696,`ET`],[73697,73713,`ON`],[78912,78912,`NSM`],[78919,78933,`NSM`],[90398,90409,`NSM`],[90413,90415,`NSM`],[92912,92916,`NSM`],[92976,92982,`NSM`],[94031,94031,`NSM`],[94095,94098,`NSM`],[94178,94178,`ON`],[94180,94180,`NSM`],[113821,113822,`NSM`],[113824,113827,`BN`],[117760,117973,`ON`],[118e3,118009,`EN`],[118010,118012,`ON`],[118016,118451,`ON`],[118458,118480,`ON`],[118496,118512,`ON`],[118528,118573,`NSM`],[118576,118598,`NSM`],[119143,119145,`NSM`],[119155,119162,`BN`],[119163,119170,`NSM`],[119173,119179,`NSM`],[119210,119213,`NSM`],[119273,119274,`ON`],[119296,119361,`ON`],[119362,119364,`NSM`],[119365,119365,`ON`],[119552,119638,`ON`],[120513,120513,`ON`],[120539,120539,`ON`],[120571,120571,`ON`],[120597,120597,`ON`],[120629,120629,`ON`],[120655,120655,`ON`],[120687,120687,`ON`],[120713,120713,`ON`],[120745,120745,`ON`],[120771,120771,`ON`],[120782,120831,`EN`],[121344,121398,`NSM`],[121403,121452,`NSM`],[121461,121461,`NSM`],[121476,121476,`NSM`],[121499,121503,`NSM`],[121505,121519,`NSM`],[122880,122886,`NSM`],[122888,122904,`NSM`],[122907,122913,`NSM`],[122915,122916,`NSM`],[122918,122922,`NSM`],[123023,123023,`NSM`],[123184,123190,`NSM`],[123566,123566,`NSM`],[123628,123631,`NSM`],[123647,123647,`ET`],[124140,124143,`NSM`],[124398,124399,`NSM`],[124643,124643,`NSM`],[124646,124646,`NSM`],[124654,124655,`NSM`],[124661,124661,`NSM`],[124928,125135,`R`],[125136,125142,`NSM`],[125143,125251,`R`],[125252,125258,`NSM`],[125259,126063,`R`],[126064,126143,`AL`],[126144,126207,`R`],[126208,126287,`AL`],[126288,126463,`R`],[126464,126703,`AL`],[126704,126705,`ON`],[126706,126719,`AL`],[126720,126975,`R`],[126976,127019,`ON`],[127024,127123,`ON`],[127136,127150,`ON`],[127153,127167,`ON`],[127169,127183,`ON`],[127185,127221,`ON`],[127232,127242,`EN`],[127243,127247,`ON`],[127279,127279,`ON`],[127338,127343,`ON`],[127405,127405,`ON`],[127584,127589,`ON`],[127744,128728,`ON`],[128732,128748,`ON`],[128752,128764,`ON`],[128768,128985,`ON`],[128992,129003,`ON`],[129008,129008,`ON`],[129024,129035,`ON`],[129040,129095,`ON`],[129104,129113,`ON`],[129120,129159,`ON`],[129168,129197,`ON`],[129200,129211,`ON`],[129216,129217,`ON`],[129232,129240,`ON`],[129280,129623,`ON`],[129632,129645,`ON`],[129648,129660,`ON`],[129664,129674,`ON`],[129678,129734,`ON`],[129736,129736,`ON`],[129741,129756,`ON`],[129759,129770,`ON`],[129775,129784,`ON`],[129792,129938,`ON`],[129940,130031,`ON`],[130032,130041,`EN`],[130042,130042,`ON`],[131070,131071,`BN`],[196606,196607,`BN`],[262142,262143,`BN`],[327678,327679,`BN`],[393214,393215,`BN`],[458750,458751,`BN`],[524286,524287,`BN`],[589822,589823,`BN`],[655358,655359,`BN`],[720894,720895,`BN`],[786430,786431,`BN`],[851966,851967,`BN`],[917502,917759,`BN`],[917760,917999,`NSM`],[918e3,921599,`BN`],[983038,983039,`BN`],[1048574,1048575,`BN`],[1114110,1114111,`BN`]];function Ms(e){if(e<=255)return As[e];let t=0,n=js.length-1;for(;t<=n;){let r=t+n>>1,i=js[r];if(e<i[0]){n=r-1;continue}if(e>i[1]){t=r+1;continue}return i[2]}return`L`}function Ns(e){let t=e.length;if(t===0)return null;let n=Array(t),r=!1;for(let i=0;i<t;){let a=e.charCodeAt(i),o=a,s=1;if(a>=55296&&a<=56319&&i+1<t){let t=e.charCodeAt(i+1);t>=56320&&t<=57343&&(o=(a-55296<<10)+(t-56320)+65536,s=2)}let c=Ms(o);(c===`R`||c===`AL`||c===`AN`)&&(r=!0);for(let e=0;e<s;e++)n[i+e]=c;i+=s}if(!r)return null;let i=0;for(let e=0;e<t;e++){let t=n[e];if(t===`L`){i=0;break}if(t===`R`||t===`AL`){i=1;break}}let a=new Int8Array(t);for(let e=0;e<t;e++)a[e]=i;let o=i&1?`R`:`L`,s=o,c=s;for(let e=0;e<t;e++)n[e]===`NSM`?n[e]=c:c=n[e];c=s;for(let e=0;e<t;e++){let t=n[e];t===`EN`?n[e]=c===`AL`?`AN`:`EN`:(t===`R`||t===`L`||t===`AL`)&&(c=t)}for(let e=0;e<t;e++)n[e]===`AL`&&(n[e]=`R`);for(let e=1;e<t-1;e++)n[e]===`ES`&&n[e-1]===`EN`&&n[e+1]===`EN`&&(n[e]=`EN`),n[e]===`CS`&&(n[e-1]===`EN`||n[e-1]===`AN`)&&n[e+1]===n[e-1]&&(n[e]=n[e-1]);for(let e=0;e<t;e++){if(n[e]!==`EN`)continue;let r;for(r=e-1;r>=0&&n[r]===`ET`;r--)n[r]=`EN`;for(r=e+1;r<t&&n[r]===`ET`;r++)n[r]=`EN`}for(let e=0;e<t;e++){let t=n[e];(t===`WS`||t===`ES`||t===`ET`||t===`CS`)&&(n[e]=`ON`)}c=s;for(let e=0;e<t;e++){let t=n[e];t===`EN`?n[e]=c===`L`?`L`:`EN`:(t===`R`||t===`L`)&&(c=t)}for(let e=0;e<t;e++){if(n[e]!==`ON`)continue;let r=e+1;for(;r<t&&n[r]===`ON`;)r++;let i=e>0?n[e-1]:s,a=r<t?n[r]:s,o=i===`L`?`L`:`R`;if(o===(a===`L`?`L`:`R`))for(let t=e;t<r;t++)n[t]=o;e=r-1}for(let e=0;e<t;e++)n[e]===`ON`&&(n[e]=o);for(let e=0;e<t;e++){let t=n[e];a[e]&1?(t===`L`||t===`AN`||t===`EN`)&&a[e]++:t===`R`?a[e]++:(t===`AN`||t===`EN`)&&(a[e]+=2)}return a}function Ps(e,t){let n=Ns(e);if(n===null)return null;let r=new Int8Array(t.length);for(let e=0;e<t.length;e++)r[e]=n[t[e]];return r}var Fs=/[ \t\n\r\f]+/g,Is=/[\t\n\r\f]| {2,}|^ | $/;function Ls(e){let t=e??`normal`;return t===`pre-wrap`?{mode:t,preserveOrdinarySpaces:!0,preserveHardBreaks:!0}:{mode:t,preserveOrdinarySpaces:!1,preserveHardBreaks:!1}}function Rs(e){if(!Is.test(e))return e;let t=e.replace(Fs,` `);return t.charCodeAt(0)===32&&(t=t.slice(1)),t.length>0&&t.charCodeAt(t.length-1)===32&&(t=t.slice(0,-1)),t}function zs(e){return/[\r\f]/.test(e)?e.replace(/\r\n/g,`
597
597
  `).replace(/[\r\f]/g,`
598
598
  `):e}var Bs=null,Vs;function Hs(){return Bs===null&&(Bs=new Intl.Segmenter(Vs,{granularity:`word`})),Bs}var Us=/\p{Script=Arabic}/u,Ws=/\p{M}/u,Gs=/\p{Nd}/u;function Ks(e){return Us.test(e)}function qs(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=191472&&e<=192093||e>=194560&&e<=195103||e>=196608&&e<=201551||e>=201552&&e<=205743||e>=205744&&e<=210041||e>=63744&&e<=64255||e>=12288&&e<=12351||e>=12352&&e<=12447||e>=12448&&e<=12543||e>=12592&&e<=12687||e>=44032&&e<=55215||e>=65280&&e<=65519}function Js(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(!(n<12288)){if(n>=55296&&n<=56319&&t+1<e.length){let r=e.charCodeAt(t+1);if(r>=56320&&r<=57343){if(qs((n-55296<<10)+(r-56320)+65536))return!0;t++;continue}}if(qs(n))return!0}}return!1}function Ys(e){let t=pc(e);return t!==null&&(tc.has(t)||ic.has(t))}var Xs=new Set([`\xA0`,` `,`⁠`,``]),Zs=new Set([`-`,`‐`,`–`,`—`]);function Qs(e){let t=pc(e);return t!==null&&Xs.has(t)}function $s(e){let t=pc(e);return t!==null&&Zs.has(t)}function ec(e,t){return Qs(e)?!1:t?!(Ys(e)||$s(e)):!0}var tc=new Set(`,...!.:.;.?.、.。.・.).〕.〉.》.」.』.】.〗.〙.〛.ー.々.〻.ゝ.ゞ.ヽ.ヾ`.split(`.`)),nc=new Set([`"`,`(`,`[`,`{`,`¡`,`¿`,`“`,`‘`,`‚`,`„`,`«`,`‹`,`⸘`,`(`,`〔`,`〈`,`《`,`「`,`『`,`【`,`〖`,`〘`,`〚`]),rc=new Set([`'`,`’`]),ic=new Set(`.(,(!(?(:(;(،(؛(؟(।(॥(၊(။(၌(၍(၏()(](}(%("(”(’(»(›(…`.split(`(`)),ac=new Set([`:`,`.`,`،`,`؛`]),oc=new Set([`၏`]),sc=new Set([`”`,`’`,`»`,`›`,`」`,`』`,`】`,`》`,`〉`,`〕`,`)`]);function cc(e){if(dc(e))return!0;let t=!1;for(let n of e){if(ic.has(n)||vc(n)){t=!0;continue}if(!(t&&Ws.test(n)))return!1}return t}function lc(e){for(let t of e)if(!tc.has(t)&&!ic.has(t))return!1;return e.length>0}function uc(e){if(dc(e))return!0;for(let t of e)if(!nc.has(t)&&!rc.has(t)&&!Ws.test(t)&&!vc(t))return!1;return e.length>0}function dc(e){let t=!1;for(let n of e)if(!(n===`\\`||Ws.test(n))){if(nc.has(n)||ic.has(n)||rc.has(n)){t=!0;continue}return!1}return t}function fc(e,t){let n=t-1;if(n<=0)return Math.max(n,0);let r=e.charCodeAt(n);if(r<56320||r>57343)return n;let i=n-1;if(i<0)return n;let a=e.charCodeAt(i);return a>=55296&&a<=56319?i:n}function pc(e){if(e.length===0)return null;let t=fc(e,e.length);return e.slice(t)}function mc(e){for(let t of e)if(!Ws.test(t))return t;return null}function hc(e){for(let t=e.length;t>0;){let n=fc(e,t),r=e.slice(n,t);if(!Ws.test(r))return r;t=n}return null}var gc=[36,37,43,43,92,92,162,165,176,177,1423,1423,1545,1547,1642,1642,2046,2047,2546,2547,2553,2555,2801,2801,3065,3065,3449,3449,3647,3647,6107,6107,8240,8247,8279,8279,8352,8399,8451,8451,8457,8457,8470,8470,8722,8723,43064,43064,65020,65020,65129,65130,65284,65285,65504,65505,65509,65510,73693,73696,123647,123647,126124,126124,126128,126128];function _c(e,t){for(let n=0;n<t.length;n+=2)if(e>=t[n]&&e<=t[n+1])return!0;return!1}function vc(e){let t=e.codePointAt(0);return t!==void 0&&_c(t,gc)}function yc(e){let t=hc(e);return t!==null&&vc(t)}function bc(e){let t=mc(e);return t!==null&&Gs.test(t)}function xc(e){let t=Array.from(e),n=t.length;for(;n>0;){let e=t[n-1];if(Ws.test(e)){n--;continue}if(nc.has(e)||rc.has(e)){n--;continue}break}return n<=0||n===t.length?null:{head:t.slice(0,n).join(``),tail:t.slice(n).join(``)}}function Sc(e,t,n){return n===`text`&&!t&&e.length===1&&e!==`-`&&e!==`—`?e:null}function Cc(e,t,n,r){let i=t[r],a=e[r];if(i==null)return a;let o=n[r];if(a.length===o)return a;let s=i.repeat(o);return e[r]=s,s}function wc(e,t){return e&&t!==null&&ac.has(t)}function Tc(e){let t=pc(e);return t!==null&&oc.has(t)}function Ec(e){if(e.length<2||e[0]!==` `)return null;let t=e.slice(1);return/^\p{M}+$/u.test(t)?{space:` `,marks:t}:null}function Dc(e){let t=e.length;for(;t>0;){let n=fc(e,t),r=e.slice(n,t);if(sc.has(r))return!0;if(!ic.has(r))return!1;t=n}return!1}function Oc(e,t){if(t.preserveOrdinarySpaces||t.preserveHardBreaks){if(e===` `)return`preserved-space`;if(e===` `)return`tab`;if(t.preserveHardBreaks&&e===`
599
599
  `)return`hard-break`}return e===` `?`space`:e===`\xA0`||e===` `||e===`⁠`||e===``?`glue`:e===`​`?`zero-width-break`:e===`­`?`soft-hyphen`:`text`}var kc=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function Ac(e){return e.length===1?e[0]:e.join(``)}function jc(e,t){let n=[];for(let t=e.length-1;t>=0;t--)n.push(e[t]);return n.push(t),Ac(n)}function Mc(e,t,n,r){if(!kc.test(e))return[{text:e,isWordLike:t,kind:`text`,start:n}];let i=[],a=null,o=[],s=n,c=!1,l=0;for(let u of e){let e=Oc(u,r),d=e===`text`&&t;if(a!==null&&e===a&&d===c){o.push(u),l+=u.length;continue}a!==null&&i.push({text:Ac(o),isWordLike:c,kind:a,start:s}),a=e,o=[u],s=n+l,c=d,l+=u.length}return a!==null&&i.push({text:Ac(o),isWordLike:c,kind:a,start:s}),i}function Nc(e){return e===`space`||e===`preserved-space`||e===`zero-width-break`||e===`hard-break`}var Pc=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function Fc(e,t){let n=e.texts[t];return n.startsWith(`www.`)?!0:Pc.test(n)&&t+1<e.len&&e.kinds[t+1]===`text`&&e.texts[t+1]===`//`}function Ic(e){return e.includes(`?`)&&(e.includes(`://`)||e.startsWith(`www.`))}function Lc(e){let t=e.texts.slice(),n=e.isWordLike.slice(),r=e.kinds.slice(),i=e.starts.slice();for(let i=0;i<e.len;i++){if(r[i]!==`text`||!Fc(e,i))continue;let a=[t[i]],o=i+1;for(;o<e.len&&!Nc(r[o]);){a.push(t[o]),n[i]=!0;let e=t[o].includes(`?`);if(r[o]=`text`,t[o]=``,o++,e)break}t[i]=Ac(a)}let a=0;for(let e=0;e<t.length;e++){let o=t[e];o.length!==0&&(a!==e&&(t[a]=o,n[a]=n[e],r[a]=r[e],i[a]=i[e]),a++)}return t.length=a,n.length=a,r.length=a,i.length=a,{len:a,texts:t,isWordLike:n,kinds:r,starts:i}}function Rc(e){let t=[],n=[],r=[],i=[];for(let a=0;a<e.len;a++){let o=e.texts[a];if(t.push(o),n.push(e.isWordLike[a]),r.push(e.kinds[a]),i.push(e.starts[a]),!Ic(o))continue;let s=a+1;if(s>=e.len||Nc(e.kinds[s]))continue;let c=[],l=e.starts[s],u=s;for(;u<e.len&&!Nc(e.kinds[u]);)c.push(e.texts[u]),u++;c.length>0&&(t.push(Ac(c)),n.push(!0),r.push(`text`),i.push(l),a=u-1)}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:i}}var zc=new Set([`:`,`-`,`/`,`×`,`,`,`.`,`+`,`–`,`—`]),Bc=/[\p{P}\p{S}\p{Co}]/u,Vc=/\p{Emoji_Presentation}/u,Hc=new Set([`?`,`֊`,`-`,`‐`,`‒`,`–`,`—`,`…`,`‼`,`‽`,`⁉`]);function Uc(e){return e>=33&&e<=47&&e!==45||e>=58&&e<=64&&e!==63||e>=91&&e<=96||e>=123&&e<=126}function Wc(e){let t=e.charCodeAt(0);return t<128?Uc(t):!Hc.has(e)&&!Vc.test(e)&&Bc.test(e)}function Gc(e){let t=!1;for(let n of e)if(!Ws.test(n)){if(!Wc(n))return!1;t=!0}return t}function Kc(e){for(let t=e.length;t>0;){let n=fc(e,t),r=e.slice(n,t);if(Ws.test(r)){t=n;continue}return Wc(r)||vc(r)}return!1}function qc(e,t,n,r){let i=!t&&Gc(e),a=!r&&Gc(n),o=yc(e),s=(t||o)&&Kc(e);return!i&&!a&&!s||Js(e)||Js(n)?!1:(t||i||o)&&(r||a)}function Jc(e){for(let t of e)if(Gs.test(t))return!0;return!1}function Yc(e){if(e.length===0)return!1;for(let t of e)if(!(Gs.test(t)||zc.has(t)))return!1;return!0}function Xc(e){let t=[],n=[],r=[],i=[];for(let a=0;a<e.len;a++){let o=e.texts[a],s=e.kinds[a];if(s===`text`&&Yc(o)&&Jc(o)){let s=[o],c=a+1;for(;c<e.len&&e.kinds[c]===`text`&&Yc(e.texts[c]);)s.push(e.texts[c]),c++;t.push(Ac(s)),n.push(!0),r.push(`text`),i.push(e.starts[a]),a=c-1;continue}t.push(o),n.push(e.isWordLike[a]),r.push(s),i.push(e.starts[a])}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:i}}function Zc(e){let t=[],n=[],r=[],i=[],a=0;for(;a<e.len;){let o=e.texts[a],s=e.kinds[a],c=e.isWordLike[a];if(s===`text`){let s=[o],l=a+1,u=c;for(;l<e.len&&e.kinds[l]===`text`&&qc(e.texts[l-1],e.isWordLike[l-1],e.texts[l],e.isWordLike[l]);){let t=e.texts[l];s.push(t),u||=e.isWordLike[l],l++}if(l>a+1){t.push(Ac(s)),n.push(u),r.push(`text`),i.push(e.starts[a]),a=l;continue}}t.push(o),n.push(c),r.push(s),i.push(e.starts[a]),a++}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:i}}function Qc(e){let t=[],n=[],r=[],i=[];for(let a=0;a<e.len;a++){let o=e.texts[a];if(e.kinds[a]===`text`&&o.includes(`-`)){let s=o.split(`-`),c=s.length>1;for(let e=0;e<s.length;e++){let t=s[e];if(!c)break;(t.length===0||!Jc(t)||!Yc(t))&&(c=!1)}if(c){let o=0;for(let c=0;c<s.length;c++){let l=s[c],u=c<s.length-1?`${l}-`:l;t.push(u),n.push(!0),r.push(`text`),i.push(e.starts[a]+o),o+=u.length}continue}}t.push(o),n.push(e.isWordLike[a]),r.push(e.kinds[a]),i.push(e.starts[a])}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:i}}function $c(e){let t=[],n=[],r=[],i=[],a=0;for(;a<e.len;){let o=[e.texts[a]],s=e.isWordLike[a],c=e.kinds[a],l=e.starts[a];if(c===`glue`){let u=[o[0]],d=l;for(a++;a<e.len&&e.kinds[a]===`glue`;)u.push(e.texts[a]),a++;let f=Ac(u);if(a<e.len&&e.kinds[a]===`text`)o[0]=f,o.push(e.texts[a]),s=e.isWordLike[a],c=`text`,l=d,a++;else{t.push(f),n.push(!1),r.push(`glue`),i.push(d);continue}}else a++;if(c===`text`)for(;a<e.len&&e.kinds[a]===`glue`;){let t=[];for(;a<e.len&&e.kinds[a]===`glue`;)t.push(e.texts[a]),a++;let n=Ac(t);if(a<e.len&&e.kinds[a]===`text`){o.push(n,e.texts[a]),s||=e.isWordLike[a],a++;continue}o.push(n)}t.push(Ac(o)),n.push(s),r.push(c),i.push(l)}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:i}}function el(e){let t=e.texts.slice(),n=e.isWordLike.slice(),r=e.kinds.slice(),i=e.starts.slice();for(let e=0;e<t.length-1;e++){if(r[e]!==`text`||r[e+1]!==`text`||!Js(t[e])||!Js(t[e+1]))continue;let n=xc(t[e]);n!==null&&(t[e]=n.head,t[e+1]=n.tail+t[e+1],i[e+1]=i[e]+n.head.length)}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:i}}function tl(e,t,n){let r=Hs(),i=0,a=[],o=[],s=[],c=[],l=[],u=[],d=[],f=[],p=[],m=[],h=[],g=[];for(let _ of r.segment(e))for(let e of Mc(_.segment,_.isWordLike??!1,_.index,n)){let n=e.kind===`text`,r=Sc(e.text,e.isWordLike,e.kind),_=Js(e.text),v=Ks(e.text),y=pc(e.text),b=Dc(e.text),x=Tc(e.text),S=i-1;function C(){u[S]!==null&&(o[S]=[Cc(a,u,d,S)],u[S]=null),o[S].push(e.text),s[S]=s[S]||e.isWordLike,f[S]=f[S]||_,p[S]=p[S]||v,m[S]=b,h[S]=x,g[S]=wc(p[S],y)}t.carryCJKAfterClosingQuote&&n&&i>0&&c[S]===`text`&&_&&f[S]&&m[S]||n&&i>0&&c[S]===`text`&&lc(e.text)&&f[S]||n&&i>0&&c[S]===`text`&&h[S]?C():n&&i>0&&c[S]===`text`&&e.isWordLike&&v&&g[S]?(C(),s[S]=!0):r!==null&&i>0&&c[S]===`text`&&u[S]===r?d[S]=(d[S]??1)+1:n&&!e.isWordLike&&i>0&&c[S]===`text`&&!f[S]&&(cc(e.text)||e.text===`-`&&s[S])?C():(a[i]=e.text,o[i]=[e.text],s[i]=e.isWordLike,c[i]=e.kind,l[i]=e.start,u[i]=r,d[i]=r===null?0:1,f[i]=_,p[i]=v,m[i]=b,h[i]=x,g[i]=wc(v,y),i++)}for(let e=0;e<i;e++){if(u[e]!==null){a[e]=Cc(a,u,d,e);continue}a[e]=Ac(o[e])}for(let e=1;e<i;e++)c[e]===`text`&&!s[e]&&dc(a[e])&&c[e-1]===`text`&&!f[e-1]&&(a[e-1]+=a[e],s[e-1]=s[e-1]||s[e],a[e]=``);let _=Array.from({length:i},()=>null),v=-1;for(let e=i-1;e>=0;e--){let t=a[e];if(t.length!==0){if(c[e]===`text`&&!s[e]&&v>=0&&c[v]===`text`&&(uc(t)||t===`-`&&bc(a[v]))){let n=_[v]??[];n.push(t),_[v]=n,l[v]=l[e],a[e]=``;continue}v=e}}for(let e=0;e<i;e++){let t=_[e];t!=null&&(a[e]=jc(t,a[e]))}let y=0;for(let e=0;e<i;e++){let t=a[e];t.length!==0&&(y!==e&&(a[y]=t,s[y]=s[e],c[y]=c[e],l[y]=l[e]),y++)}a.length=y,s.length=y,c.length=y,l.length=y;let b=el(Zc(Qc(Xc(Rc(Lc($c({len:y,texts:a,isWordLike:s,kinds:c,starts:l})))))));for(let e=0;e<b.len-1;e++){let t=Ec(b.texts[e]);t!==null&&(b.kinds[e]!==`space`&&b.kinds[e]!==`preserved-space`||b.kinds[e+1]!==`text`||!Ks(b.texts[e+1])||(b.texts[e]=t.space,b.isWordLike[e]=!1,b.kinds[e]=b.kinds[e]===`preserved-space`?`preserved-space`:`space`,b.texts[e+1]=t.marks+b.texts[e+1],b.starts[e+1]=b.starts[e]+t.space.length))}return b}function nl(e,t){if(e.len===0)return[];if(!t.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}];let n=[],r=0;for(let t=0;t<e.len;t++)e.kinds[t]===`hard-break`&&(n.push({startSegmentIndex:r,endSegmentIndex:t,consumedEndSegmentIndex:t+1}),r=t+1);return r<e.len&&n.push({startSegmentIndex:r,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}),n}function rl(e,t,n){if(t.len<=1)return t;let r=[],i=[],a=[],o=[],s=-1,c=!1;function l(e){r.push(t.texts[e]),i.push(t.isWordLike[e]),a.push(`text`),o.push(t.starts[e])}function u(n,s){let c=!1;for(let e=n;e<s;e++)c||=t.isWordLike[e];let l=t.starts[n],u=s<t.len?t.starts[s]:e.length;r.push(e.slice(l,u)),i.push(c),a.push(`text`),o.push(l)}function d(e){if(!(s<0)){if(c)s+1===e?l(s):u(s,e);else for(let t=s;t<e;t++)l(t);s=-1,c=!1}}for(let e=0;e<t.len;e++){let l=t.texts[e],u=t.kinds[e];if(u===`text`){s>=0&&!ec(t.texts[e-1],n)&&d(e),s<0&&(s=e),c||=Js(l);continue}d(e),r.push(l),i.push(t.isWordLike[e]),a.push(u),o.push(t.starts[e])}return d(t.len),{len:r.length,texts:r,isWordLike:i,kinds:a,starts:o}}function il(e,t,n=`normal`,r=`normal`){let i=Ls(n),a=i.mode===`pre-wrap`?zs(e):Rs(e);if(a.length===0)return{normalized:a,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};let o=tl(a,t,i),s=r===`keep-all`?rl(a,o,t.breakKeepAllAfterPunctuation):o;return{normalized:a,chunks:nl(s,i),...s}}var al=null,ol=new Map,sl=null,cl=96,ll=/\p{Emoji_Presentation}/u,ul=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u,dl=null,fl=new Map;function pl(){if(al!==null)return al;if(typeof OffscreenCanvas<`u`)return al=new OffscreenCanvas(1,1).getContext(`2d`),al;if(typeof document<`u`)return al=document.createElement(`canvas`).getContext(`2d`),al;throw Error(`Text measurement requires OffscreenCanvas or a DOM canvas context.`)}function ml(e){let t=ol.get(e);return t||(t=new Map,ol.set(e,t)),t}function hl(e,t){let n=t.get(e);return n===void 0&&(n={width:pl().measureText(e).width,containsCJK:Js(e)},t.set(e,n)),n}function gl(){if(sl!==null)return sl;if(typeof navigator>`u`)return sl={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,breakKeepAllAfterPunctuation:!0,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},sl;let e=navigator.userAgent,t=navigator.vendor===`Apple Computer, Inc.`&&e.includes(`Safari/`)&&!e.includes(`Chrome/`)&&!e.includes(`Chromium/`)&&!e.includes(`CriOS/`)&&!e.includes(`FxiOS/`)&&!e.includes(`EdgiOS/`),n=e.includes(`Chrome/`)||e.includes(`Chromium/`)||e.includes(`CriOS/`)||e.includes(`Edg/`);return sl={lineFitEpsilon:t?1/64:.005,carryCJKAfterClosingQuote:n,breakKeepAllAfterPunctuation:!t,preferPrefixWidthsForBreakableRuns:t,preferEarlySoftHyphenBreak:t},sl}function _l(e){let t=e.match(/(\d+(?:\.\d+)?)\s*px/);return t?parseFloat(t[1]):16}function vl(){return dl===null&&(dl=new Intl.Segmenter(void 0,{granularity:`grapheme`})),dl}function yl(e){return ll.test(e)||e.includes(`️`)}function bl(e){return ul.test(e)}function xl(e,t){let n=fl.get(e);if(n!==void 0)return n;let r=pl();r.font=e;let i=r.measureText(`😀`).width;if(n=0,i>t+.5&&typeof document<`u`&&document.body!==null){let t=document.createElement(`span`);t.style.font=e,t.style.display=`inline-block`,t.style.visibility=`hidden`,t.style.position=`absolute`,t.textContent=`😀`,document.body.appendChild(t);let r=t.getBoundingClientRect().width;document.body.removeChild(t),i-r>.5&&(n=i-r)}return fl.set(e,n),n}function Sl(e){let t=0,n=vl();for(let r of n.segment(e))yl(r.segment)&&t++;return t}function Cl(e,t){return t.emojiCount===void 0&&(t.emojiCount=Sl(e)),t.emojiCount}function wl(e,t,n){return n===0?t.width:t.width-Cl(e,t)*n}function Tl(e,t,n,r,i){if(t.breakableFitAdvances!==void 0&&t.breakableFitMode===i)return t.breakableFitAdvances;t.breakableFitMode=i;let a=vl(),o=[];for(let t of a.segment(e))o.push(t.segment);if(o.length<=1)return t.breakableFitAdvances=null,t.breakableFitAdvances;if(i===`sum-graphemes`){let e=[];for(let t of o){let i=hl(t,n);e.push(wl(t,i,r))}return t.breakableFitAdvances=e,t.breakableFitAdvances}if(i===`pair-context`||o.length>cl){let e=[],i=null,a=0;for(let t of o){let o=wl(t,hl(t,n),r);if(i===null)e.push(o);else{let o=i+t,s=hl(o,n);e.push(wl(o,s,r)-a)}i=t,a=o}return t.breakableFitAdvances=e,t.breakableFitAdvances}let s=[],c=``,l=0;for(let e of o){c+=e;let t=hl(c,n),i=wl(c,t,r);s.push(i-l),l=i}return t.breakableFitAdvances=s,t.breakableFitAdvances}function El(e,t){let n=pl();n.font=e;let r=ml(e),i=_l(e);return{cache:r,fontSize:i,emojiCorrection:t?xl(e,i):0}}function Dl(e){return e===`space`||e===`zero-width-break`||e===`soft-hyphen`}function Ol(e){return e===`space`||e===`preserved-space`||e===`tab`||e===`zero-width-break`||e===`soft-hyphen`}function kl(e,t,n=e.widths.length){for(;t<n;){let n=e.kinds[t];if(!Dl(n))break;t++}return t}function Al(e,t){if(t<=0)return 0;let n=e%t;return Math.abs(n)<=1e-6?t:t-n}function jl(e,t,n){return e.letterSpacing!==0&&t&&e.spacingGraphemeCounts[n]>0?e.letterSpacing:0}function Ml(e,t){return t===0?0:e+t}function Nl(e,t){return e.letterSpacing!==0&&e.spacingGraphemeCounts[t]>0?e.letterSpacing:0}function Pl(e,t,n,r,i){return Ml(r,t===`tab`?i+Nl(e,n):e.lineEndFitAdvances[n])}function Fl(e,t,n,r){return Ml(r,t===`tab`?0:e.lineEndFitAdvances[n])}function Il(e,t,n,r,i){return Ml(r,t===`tab`?i:e.lineEndPaintAdvances[n])}function Ll(e,t,n){return e.letterSpacing!==0&&t?n+e.letterSpacing:n}function Rl(e,t){return e.letterSpacing===0?t:t+e.letterSpacing}function zl(e,t,n){let r=t;for(;r<e.length&&e[r]<n;)r++;return r}function Bl(e,t,n,r,i){if(e.letterSpacing===0)return 0;if(i>0)return e.spacingGraphemeCounts[r]>0?e.letterSpacing:0;for(let i=r-1;i>=t;i--){let a=e.kinds[i];if(!(a===`space`||a===`zero-width-break`||a===`hard-break`)){if(a===`soft-hyphen`){if(i===r-1)return 0;continue}return i===t&&n>0||e.spacingGraphemeCounts[i]>0?e.letterSpacing:0}}return 0}function W(e,t,n,r,i,a){return t+Bl(e,n,r,i,a)}function Vl(e,t,n){let{widths:r,kinds:i,breakableFitAdvances:a,breakablePreferredBreaks:o}=e;if(r.length===0)return 0;let s=t+gl().lineFitEpsilon,c=0,l=0,u=!1,d=0,f=0,p=0,m=0,h=-1,g=0;function _(){h=-1,g=0}function v(e=p,t=m,r=l){c++,n?.(r,d,f,e,t),l=0,u=!1,_()}function y(e,t){u=!0,d=e,f=0,p=e+1,m=0,l=t}function b(e,t,n){u=!0,d=e,f=t,p=e,m=t+1,l=n}function x(e,t){if(!u){y(e,t);return}l+=t,p=e+1,m=0}function S(e,t){let n=a[e],r=o[e]??null,i=r===null?-1:zl(r,0,t+1),c=-1,d=0,f=t;for(;f<n.length;){let a=n[f];if(!u)b(e,f,a);else if(l+a>s){if(r!==null&&c>t){v(e,c,d),f=c,i=zl(r,i,f+1),c=-1,d=0;continue}v(),b(e,f,a)}else l+=a,p=e,m=f+1;let o=f+1;r!==null&&r[i]===o&&(c=o,d=l,i++),f++}u&&p===e&&m===n.length&&(p=e+1,m=0)}let C=0;for(;C<r.length&&!(!u&&(C=kl(e,C),C>=r.length));){let e=r[C],t=i[C],n=Ol(t);if(!u){e>s&&a[C]!==null?S(C,0):y(C,e),n&&(h=C+1,g=l-e),C++;continue}if(l+e>s){if(n){x(C,e),v(C+1,0,l-e),C++;continue}if(h>=0){if(p>h||p===h&&m>0){v();continue}v(h,0,g);continue}if(e>s&&a[C]!==null){v(),S(C,0),C++;continue}v();continue}x(C,e),n&&(h=C+1,g=l-e),C++}return u&&v(),c}function G(e,t,n){if(e.simpleLineWalkFastPath)return Vl(e,t,n);let{widths:r,kinds:i,breakableFitAdvances:a,breakablePreferredBreaks:o,discretionaryHyphenWidth:s,chunks:c}=e;if(r.length===0||c.length===0)return 0;let l=gl(),u=t+l.lineFitEpsilon,d=0,f=0,p=!1,m=0,h=0,g=0,_=0,v=-1,y=0,b=0,x=null;function S(){v=-1,y=0,b=0,x=null}function C(){return x===`soft-hyphen`&&v===g&&_===0?b:f}function w(t=g,r=_,i){d++,n!==void 0&&n(W(e,i??C(),m,h,t,r),m,h,t,r),f=0,p=!1,S()}function T(e,t){p=!0,m=e,h=0,g=e+1,_=0,f=t}function E(e,t,n){p=!0,m=e,h=t,g=e,_=t+1,f=n}function ee(e,t){if(!p){T(e,t);return}f+=t,g=e+1,_=0}function te(t,n,r,i,a,o){if(!n)return;let s=Fl(e,t,r,a),c=Il(e,t,r,a,i);v=r+1,y=f-o+s,b=f-o+c,x=t}function ne(t,n){let r=a[t],i=o[t]??null,s=i===null?-1:zl(i,0,n+1),c=-1,l=0,d=n;for(;d<r.length;){let a=r[d];if(!p)E(t,d,a);else{let r=Ll(e,!0,a),o=f+r;if(Rl(e,o)>u){if(i!==null&&c>n){w(t,c,l),d=c,s=zl(i,s,d+1),c=-1,l=0;continue}w(),E(t,d,a)}else f=o,g=t,_=d+1}let o=d+1;i!==null&&i[s]===o&&(c=o,l=f,s++),d++}p&&g===t&&_===r.length&&(g=t+1,_=0)}function re(e){d++,n?.(0,e.startSegmentIndex,0,e.consumedEndSegmentIndex,0),S()}for(let t=0;t<c.length;t++){let n=c[t];if(n.startSegmentIndex===n.endSegmentIndex){re(n);continue}p=!1,f=0,m=n.startSegmentIndex,h=0,g=n.startSegmentIndex,_=0,S();let o=n.startSegmentIndex;for(;o<n.endSegmentIndex&&!(!p&&(o=kl(e,o,n.endSegmentIndex),o>=n.endSegmentIndex));){let t=i[o],n=Ol(t),c=jl(e,p,o),d=t===`tab`?Al(f+c,e.tabStopAdvance):r[o],m=c+d,h=Pl(e,t,o,c,d);if(t===`soft-hyphen`){p&&(g=o+1,_=0,v=o+1,y=f+s,b=f+s,x=t),o++;continue}if(!p){h>u&&a[o]!==null?ne(o,0):T(o,d),te(t,n,o,d,c,m),o++;continue}if(f+h>u){let r=f+Fl(e,t,o,c),i=f+Il(e,t,o,c,d);if(x===`soft-hyphen`&&l.preferEarlySoftHyphenBreak&&y<=u){w(v,0,b);continue}if(n&&r<=u){ee(o,m),w(o+1,0,i),o++;continue}if(v>=0&&y<=u){if(g>v||g===v&&_>0){w();continue}let e=v;w(e,0,b),o=e;continue}if(h>u&&a[o]!==null){w(),ne(o,0),o++;continue}w();continue}ee(o,m),te(t,n,o,d,c,m),o++}if(p){let e=v===n.consumedEndSegmentIndex?b:f;w(n.consumedEndSegmentIndex,0,e)}}return d}var K=null;function q(){return K===null&&(K=new Intl.Segmenter(void 0,{granularity:`grapheme`})),K}function Hl(e){return e?{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],breakablePreferredBreaks:[],letterSpacing:0,spacingGraphemeCounts:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[],segments:[]}:{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],breakablePreferredBreaks:[],letterSpacing:0,spacingGraphemeCounts:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[]}}function Ul(e,t){let n=[],r=[],i=0,a=!1,o=!1,s=!1;function c(){r.length!==0&&(n.push({text:r.length===1?r[0]:r.join(``),start:i}),r=[],a=!1,o=!1,s=!1)}function l(e,t,n){r=[e],i=t,a=n,o=Dc(e),s=nc.has(e)}function u(e,t){r.push(e),a||=t;let n=Dc(e);e.length===1&&ic.has(e)?o||=n:o=n,s=!1}for(let n of q().segment(e)){let e=n.segment,i=Js(e);if(r.length===0){l(e,n.index,i);continue}if(s||tc.has(e)||ic.has(e)||t.carryCJKAfterClosingQuote&&i&&o){u(e,i);continue}if(!a&&!i){u(e,i);continue}c(),l(e,n.index,i)}return c(),n}function Wl(e,t,n){if(t.length<=1)return t;let r=[],i=-1,a=!1;function o(n,i){let a=t[n].start,o=i<t.length?t[i].start:e.length;r.push({text:e.slice(a,o),start:a})}function s(e){if(!(i<0)){if(a)i+1===e?r.push(t[i]):o(i,e);else for(let n=i;n<e;n++)r.push(t[n]);i=-1,a=!1}}for(let e=0;e<t.length;e++){let r=t[e];i>=0&&!ec(t[e-1].text,n)&&s(e),i<0&&(i=e),a||=Js(r.text)}return s(t.length),r}function Gl(e,t){if(t===`zero-width-break`||t===`soft-hyphen`||t===`hard-break`)return 0;if(t===`tab`)return 1;let n=0,r=q();for(let t of r.segment(e))n++;return n}function Kl(e){return e===`-`||e===`֊`||e===`‐`||e===`‒`||e===`–`||e===`—`}function ql(e){if(!/[-\u058A\u2010\u2012\u2013\u2014]/u.test(e))return null;let t=[],n=0;for(let r of q().segment(e))n++,Kl(r.segment)&&t.push(n);return t.length===0?null:t}function Jl(e,t,n){return t>1?e+(t-1)*n:e}function Yl(e,t,n,r,i){let a=gl(),{cache:o,emojiCorrection:s}=El(t,bl(e.normalized)),c=wl(`-`,hl(`-`,o),s)+(i===0?0:i*2),l=wl(` `,hl(` `,o),s)*8,u=i!==0;if(e.len===0)return Hl(n);let d=[],f=[],p=[],m=[],h=e.chunks.length<=1&&!u,g=n?[]:null,_=[],v=[],y=[],b=n?[]:null,x=Array.from({length:e.len});function S(e,t,n,r,i,a,o,s,c){i!==`text`&&i!==`space`&&i!==`zero-width-break`&&(h=!1),d.push(t),f.push(n),p.push(r),m.push(i),g?.push(a),_.push(o),v.push(s),u&&y.push(c),b!==null&&b.push(e)}function C(e,t,n,c,l){let d=hl(e,o),f=u?Gl(e,t):0,p=Jl(wl(e,d,s),f,i),m=t===`space`||t===`preserved-space`||t===`zero-width-break`?0:p,h=m===0?0:m+(f>0?i:0),g=t===`space`||t===`zero-width-break`?0:p;if(l&&c&&e.length>1){let c=`sum-graphemes`;i===0?Yc(e)?c=`pair-context`:a.preferPrefixWidthsForBreakableRuns&&(c=`segment-prefixes`):c=`segment-prefixes`;let l=Tl(e,d,o,s,c);S(e,p,h,g,t,n,l,l===null||r===`keep-all`?null:ql(e),f);return}S(e,p,h,g,t,n,null,null,f)}for(let t=0;t<e.len;t++){x[t]=d.length;let n=e.texts[t],i=e.isWordLike[t],s=e.kinds[t],l=e.starts[t];if(s===`soft-hyphen`){S(n,0,c,c,s,l,null,null,0);continue}if(s===`hard-break`){S(n,0,0,0,s,l,null,null,0);continue}if(s===`tab`){S(n,0,0,0,s,l,null,null,u?Gl(n,s):0);continue}let f=hl(n,o);if(s===`text`&&f.containsCJK){let e=Ul(n,a),t=r===`keep-all`?Wl(n,e,a.breakKeepAllAfterPunctuation):e;for(let e=0;e<t.length;e++){let n=t[e];C(n.text,`text`,l+n.start,i,r===`keep-all`||!Js(n.text))}continue}C(n,s,l,i,!0)}let w=Xl(e.chunks,x,d.length),T=g===null?null:Ps(e.normalized,g);return b===null?{widths:d,lineEndFitAdvances:f,lineEndPaintAdvances:p,kinds:m,simpleLineWalkFastPath:h,segLevels:T,breakableFitAdvances:_,breakablePreferredBreaks:v,letterSpacing:i,spacingGraphemeCounts:y,discretionaryHyphenWidth:c,tabStopAdvance:l,chunks:w}:{widths:d,lineEndFitAdvances:f,lineEndPaintAdvances:p,kinds:m,simpleLineWalkFastPath:h,segLevels:T,breakableFitAdvances:_,breakablePreferredBreaks:v,letterSpacing:i,spacingGraphemeCounts:y,discretionaryHyphenWidth:c,tabStopAdvance:l,chunks:w,segments:b}}function Xl(e,t,n){let r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a.startSegmentIndex<t.length?t[a.startSegmentIndex]:n,s=a.endSegmentIndex<t.length?t[a.endSegmentIndex]:n,c=a.consumedEndSegmentIndex<t.length?t[a.consumedEndSegmentIndex]:n;r.push({startSegmentIndex:o,endSegmentIndex:s,consumedEndSegmentIndex:c})}return r}function Zl(e,t,n,r){let i=r?.wordBreak??`normal`,a=r?.letterSpacing??0;return Yl(il(e,gl(),r?.whiteSpace,i),t,n,i,a)}function Ql(e,t,n){return Zl(e,t,!0,n)}function $l(e){return e}function eu(e){let t=0;return G($l(e),1/0,e=>{e>t&&(t=e)}),t}function tu(e){let t=e.toLowerCase().replace(/^←\s*/,``);return t.includes(`force push`)?`force-push`:t.includes(`cherry`)?`cherry-pick`:t.includes(`uncommit`)?`uncommit`:t.includes(`revert`)?`revert`:t.includes(`rebase`)?`rebase`:t.includes(`merge`)?`merge`:t.includes(`checkout`)?`checkout`:t.includes(`fetch`)?`fetch`:t.includes(`push`)?`push`:t.includes(`delete`)?`delete`:t.includes(`move`)?`move`:t.includes(`reset`)?`reset`:t.includes(`branch`)?`branch`:t.includes(`tag`)?`tag`:`checkout`}function nu({name:e,size:t=14}){let n={fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`};return(0,E.jsxs)(`svg`,{"aria-hidden":`true`,focusable:`false`,width:t,height:t,viewBox:`0 0 24 24`,style:{flex:`0 0 auto`},children:[e===`branch`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`circle`,{...n,cx:`6`,cy:`6`,r:`3`}),(0,E.jsx)(`circle`,{...n,cx:`18`,cy:`18`,r:`3`}),(0,E.jsx)(`path`,{...n,d:`M6 9v9`}),(0,E.jsx)(`path`,{...n,d:`M9 18h6`})]}),e===`checkout`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`path`,{...n,d:`M5 12h14`}),(0,E.jsx)(`path`,{...n,d:`m13 6 6 6-6 6`}),(0,E.jsx)(`path`,{...n,d:`M5 5v14`})]}),e===`cherry-pick`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`circle`,{...n,cx:`7`,cy:`7`,r:`3`}),(0,E.jsx)(`circle`,{...n,cx:`17`,cy:`17`,r:`3`}),(0,E.jsx)(`path`,{...n,d:`M10 7h2a5 5 0 0 1 5 5v2`})]}),e===`delete`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`path`,{...n,d:`M3 6h18`}),(0,E.jsx)(`path`,{...n,d:`M8 6V4h8v2`}),(0,E.jsx)(`path`,{...n,d:`m19 6-1 14H6L5 6`}),(0,E.jsx)(`path`,{...n,d:`M10 11v5`}),(0,E.jsx)(`path`,{...n,d:`M14 11v5`})]}),e===`fetch`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`path`,{...n,d:`M12 5v12`}),(0,E.jsx)(`path`,{...n,d:`m7 12 5 5 5-5`}),(0,E.jsx)(`path`,{...n,d:`M5 20h14`})]}),e===`force-push`&&(0,E.jsx)(`path`,{...n,d:`M13 2 4 14h7l-1 8 10-13h-7l0-7Z`}),e===`merge`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`circle`,{...n,cx:`6`,cy:`6`,r:`3`}),(0,E.jsx)(`circle`,{...n,cx:`6`,cy:`18`,r:`3`}),(0,E.jsx)(`circle`,{...n,cx:`18`,cy:`18`,r:`3`}),(0,E.jsx)(`path`,{...n,d:`M6 9v6`}),(0,E.jsx)(`path`,{...n,d:`M9 6h1a8 8 0 0 1 8 8v1`})]}),e===`move`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`path`,{...n,d:`M3 12h18`}),(0,E.jsx)(`path`,{...n,d:`m8 7-5 5 5 5`}),(0,E.jsx)(`path`,{...n,d:`m16 7 5 5-5 5`})]}),e===`push`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`path`,{...n,d:`M12 19V5`}),(0,E.jsx)(`path`,{...n,d:`m7 10 5-5 5 5`}),(0,E.jsx)(`path`,{...n,d:`M5 20h14`})]}),e===`rebase`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`circle`,{...n,cx:`6`,cy:`6`,r:`3`}),(0,E.jsx)(`circle`,{...n,cx:`6`,cy:`18`,r:`3`}),(0,E.jsx)(`circle`,{...n,cx:`18`,cy:`12`,r:`3`}),(0,E.jsx)(`path`,{...n,d:`M6 9v6`}),(0,E.jsx)(`path`,{...n,d:`M9 6h2a7 7 0 0 1 7 7`})]}),e===`reset`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`path`,{...n,d:`M4 7v6h6`}),(0,E.jsx)(`path`,{...n,d:`M20 17a8 8 0 0 1-14.9-4`}),(0,E.jsx)(`path`,{...n,d:`M4 13A8 8 0 0 1 19 8`})]}),e===`revert`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`path`,{...n,d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.7 2.7L3 8`}),(0,E.jsx)(`path`,{...n,d:`M3 3v5h5`})]}),e===`tag`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`path`,{...n,d:`M20 10 10 20 4 14V4h10l6 6Z`}),(0,E.jsx)(`circle`,{...n,cx:`9`,cy:`9`,r:`1`})]}),e===`uncommit`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`path`,{...n,d:`M9 14 4 9l5-5`}),(0,E.jsx)(`path`,{...n,d:`M4 9h10a6 6 0 0 1 0 12h-1`})]})]})}function ru({size:e=13}){return(0,E.jsx)(`svg`,{"aria-hidden":`true`,focusable:`false`,width:e,height:e,viewBox:`0 0 24 24`,style:{flex:`0 0 auto`},children:(0,E.jsx)(`path`,{d:`M12 3a9 9 0 0 1 9 9`,fill:`none`,stroke:`currentColor`,strokeWidth:2.4,strokeLinecap:`round`,children:(0,E.jsx)(`animateTransform`,{attributeName:`transform`,type:`rotate`,from:`0 12 12`,to:`360 12 12`,dur:`0.8s`,repeatCount:`indefinite`})})})}function iu({label:e,onClick:t,tone:n,onMouseEnter:r,onMouseLeave:i}){let a=n===`success`?`#0b1020`:n===`warning`?`#fff7d6`:n===`merge`?`#fff7ff`:`#fff7ed`,o=n===`success`?`#6d9658`:n===`warning`?`#d8a43a`:n===`merge`?`#b764d9`:`#9a3412`,s=n===`success`?`#8dcf78`:n===`warning`?`#b88a25`:n===`merge`?`#c77de4`:`#b45309`,c=n===`success`?`#9cda89`:n===`warning`?`#c99a30`:n===`merge`?`#d08bea`:`#c26115`;return(0,E.jsxs)(`button`,{onClick:e=>{e.stopPropagation(),t()},style:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,minWidth:104,height:30,padding:`0 12px`,background:s,border:`1px solid ${o}`,borderRadius:7,color:a,fontSize:10,fontWeight:700,cursor:`pointer`,fontFamily:`inherit`,whiteSpace:`nowrap`,position:`relative`,zIndex:8,boxShadow:`0 10px 24px rgba(0,0,0,0.35)`,gap:6,lineHeight:1},onMouseEnter:e=>{e.currentTarget.style.background=c},onMouseLeave:e=>{e.currentTarget.style.background=s},onPointerEnter:r,onPointerLeave:i,children:[(0,E.jsx)(nu,{name:tu(e)}),(0,E.jsx)(`span`,{children:e})]})}function au({label:e,onClick:t,tone:n,size:r=`default`,variant:i=`solid`,disabled:a=!1,loading:o=!1}){let s=r===`compact`,c=i===`ghost`,l=a||o,u=n===`danger`?`#5c2430`:n===`warning`?`#7a4e11`:n===`success`?`#2c4231`:`#2f3348`,d=n===`danger`?`#6a2b39`:n===`warning`?`#8a5a16`:n===`success`?`#37523d`:`#3a4058`,f=n===`danger`?`#8b3a4a`:n===`warning`?`#d19128`:n===`success`?`#588a5c`:`#4a4f68`,p=n===`danger`?`#f5a6b8`:n===`warning`?`#f9d28b`:n===`success`?`#a6e3a1`:c?`#bac2de`:`#cdd6f4`;return(0,E.jsxs)(`button`,{onClick:e=>{e.stopPropagation(),!l&&t()},disabled:l,"aria-busy":o||void 0,style:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,minWidth:s?72:84,height:s?20:28,padding:s?`0 8px`:`0 10px`,background:c?`rgba(24,24,37,0.5)`:u,border:c?`1px solid transparent`:`1px solid ${f}`,color:p,fontSize:10,fontWeight:600,cursor:l?`default`:`pointer`,opacity:a&&!o?.62:1,borderRadius:s?6:7,fontFamily:`inherit`,whiteSpace:`nowrap`,gap:s?5:6,lineHeight:1},onMouseEnter:e=>{l||(e.currentTarget.style.background=c?`rgba(49,50,68,0.8)`:d)},onMouseLeave:e=>{l||(e.currentTarget.style.background=c?`rgba(24,24,37,0.5)`:u)},children:[o?(0,E.jsx)(ru,{size:s?12:13}):(0,E.jsx)(nu,{name:tu(e),size:s?12:13}),(0,E.jsx)(`span`,{children:e})]})}var ou={position:`fixed`,inset:0,margin:`auto`,width:`min(420px, calc(100vw - 32px))`,padding:0,border:`1px solid #45475a`,borderRadius:8,background:`#1e1e2e`,color:`#cdd6f4`,boxShadow:`0 22px 64px rgba(0,0,0,0.58)`},su={display:`flex`,flexDirection:`column`,gap:14,padding:18,fontFamily:`system-ui, -apple-system, sans-serif`},cu={margin:0,color:`#f5e0dc`,fontSize:16,fontWeight:700,lineHeight:1.25},lu={height:30,padding:`0 12px`,borderRadius:6,border:`1px solid #45475a`,background:`#181825`,color:`#bac2de`,fontSize:12,fontWeight:700,fontFamily:`inherit`,cursor:`pointer`},uu={height:30,padding:`0 12px`,borderRadius:6,border:`1px solid #6d9658`,background:`#8dcf78`,color:`#0b1020`,fontSize:12,fontWeight:800,fontFamily:`inherit`,cursor:`pointer`};function du({open:e,title:t,label:n,initialValue:r=``,confirmLabel:i,onSubmit:a,onClose:o}){let s=(0,x.useRef)(null),c=(0,x.useRef)(null),[l,u]=(0,x.useState)(r);return(0,x.useEffect)(()=>{e&&u(r)},[r,e]),(0,x.useEffect)(()=>{let t=s.current;if(t){if(e){t.open||t.showModal(),requestAnimationFrame(()=>c.current?.focus());return}t.open&&t.close()}},[e]),(0,E.jsx)(`dialog`,{ref:s,"aria-labelledby":`text-input-dialog-title`,onCancel:o,onClose:o,onClick:e=>{e.target===e.currentTarget&&o()},style:ou,children:(0,E.jsxs)(`form`,{method:`dialog`,onSubmit:e=>{e.preventDefault();let t=l.trim();if(!t){c.current?.focus();return}a(t)},onClick:e=>e.stopPropagation(),style:su,children:[(0,E.jsx)(`h2`,{id:`text-input-dialog-title`,style:cu,children:t}),(0,E.jsxs)(`label`,{style:{display:`flex`,flexDirection:`column`,gap:7,color:`#bac2de`,fontSize:12,fontWeight:700},children:[n,(0,E.jsx)(`input`,{ref:c,value:l,onChange:e=>u(e.target.value),required:!0,autoComplete:`off`,spellCheck:!1,style:{height:34,padding:`0 10px`,borderRadius:6,border:`1px solid #45475a`,background:`#11111b`,color:`#cdd6f4`,fontSize:13,fontFamily:`inherit`,outline:`none`}})]}),(0,E.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:8,paddingTop:2},children:[(0,E.jsx)(`button`,{type:`button`,onClick:o,style:lu,children:`Cancel`}),(0,E.jsx)(`button`,{type:`submit`,value:`confirm`,style:uu,children:i})]})]})})}function fu({open:e,title:t,message:n,confirmLabel:r,onConfirm:i,onClose:a}){let o=(0,x.useRef)(null);return(0,x.useEffect)(()=>{let t=o.current;if(t){if(e){t.open||t.showModal();return}t.open&&t.close()}},[e]),(0,E.jsx)(`dialog`,{ref:o,"aria-labelledby":`confirm-dialog-title`,onCancel:a,onClose:a,onClick:e=>{e.target===e.currentTarget&&a()},style:ou,children:(0,E.jsxs)(`form`,{method:`dialog`,onSubmit:e=>{e.preventDefault(),i()},onClick:e=>e.stopPropagation(),style:su,children:[(0,E.jsx)(`h2`,{id:`confirm-dialog-title`,style:cu,children:t}),(0,E.jsx)(`p`,{style:{margin:0,color:`#bac2de`,fontSize:13,lineHeight:1.45},children:n}),(0,E.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:8,paddingTop:2},children:[(0,E.jsx)(`button`,{type:`button`,onClick:a,style:lu,children:`Cancel`}),(0,E.jsx)(`button`,{type:`submit`,value:`confirm`,style:uu,children:r})]})]})})}var pu=56,mu=20,hu=80,J=16,gu=`#11111b`,_u=20,vu=30,yu=28,bu=24,xu=112,Su=J-5,Cu=`#1e1e2e`,wu=`#45475a`,Tu=`#cdd6f455`,Eu=`#cdd6f422`,Du=`#a6e3a1`,Ou=`#f38ba8`,ku=2,Au=.85,ju=12,Mu=6,Nu=30,Pu=6,Fu=4,Iu=520,Lu=40,Ru=pu*2,zu=260,Bu=160,Vu={mass:2.1,tension:180,friction:28},Hu=6,Uu=14,Wu=`600 11px system-ui, -apple-system, sans-serif`,Gu=pu*.55,Ku=pu*.3,Y=54,qu=[`#89b4fa`,`#a6e3a1`,`#f9e2af`,`#f38ba8`,`#cba6f7`,`#94e2d5`,`#fab387`,`#74c7ec`,`#f5c2e7`,`#b4befe`],Ju=new Map;function Yu(e){return qu[(e%qu.length+qu.length)%qu.length]}function Xu(e){return qu[cd(e)%qu.length]}function Zu(e,t){let n=t.get(e);return n?Xu(n):qu[cd(e)%qu.length]}function Qu(e){return Math.round((_u-e)/2)}function $u(e,t){return!!e&&e.action===t.action&&e.refName===t.refName&&e.sha===t.sha&&e.force===t.force}function ed(e){return!!e&&typeof e==`object`&&e.code===`CONFLICT`}function td(e){let t=/^(v?)(\d+)\.(\d+)\.(\d+)$/.exec(e);return t?{hasVPrefix:t[1]===`v`,major:Number(t[2]),minor:Number(t[3]),patch:Number(t[4])}:null}function nd(e,t){return e.major-t.major||e.minor-t.minor||e.patch-t.patch||Number(e.hasVPrefix)-Number(t.hasVPrefix)}function rd(e){let t=null;for(let n of e){if(n.kind!==`tag`)continue;let e=td(n.shortName);e&&(!t||nd(e,t)>0)&&(t=e)}return t?`${t.hasVPrefix?`v`:``}${t.major}.${t.minor}.${t.patch+1}`:``}function id(e){return e?e.startsWith(`refs/remotes/`)?e.slice(13):e:null}function ad(e,t){let n=id(e.upstream);if(n)return t.find(e=>e.kind===`remote`&&e.shortName===n)??null;let r=t.find(t=>t.kind===`remote`&&t.shortName===`origin/${e.shortName}`);if(r)return r;let i=t.filter(t=>t.kind===`remote`&&t.shortName.endsWith(`/${e.shortName}`));return i.length===1?i[0]:null}function od(e,t=0){let n=1/0,r=-1/0,i=[],a=new Map,o=new Map;for(let t=0;t<e.length;t++){let i=e[t];i.lane<n&&(n=i.lane),i.lane>r&&(r=i.lane),o.set(i.sha,i)}let s=Math.max(Math.abs(Number.isFinite(n)?n:0),Math.abs(Number.isFinite(r)?r:0)),c=Bu+t;for(let t=0;t<e.length;t++){let n=e[t],r={row:n,x:c+(n.lane+s)*hu,y:152+t*pu,idx:t};i.push(r),a.set(n.sha,r)}let l=new Map;for(let t of e){let e=Id(t.refNames);if(!e)continue;let n=t.sha;for(;n&&!l.has(n);){l.set(n,e);let t=o.get(n);if(!t||t.parentShas.length===0)break;n=t.parentShas[0]}}let u=new Map;for(let e of i)u.set(e.row.sha,Zu(e.row.sha,l));return{nodes:i,shaToNode:a,shaToBranch:l,shaToColor:u,maxLane:r,totalWidth:200+t+(s*2+1)*hu+Iu,totalHeight:e.length*pu+Lu*2+Ru}}function sd(e,t,n,r){if(e===n)return`M${e},${t}L${n},${r}`;let i=r-t;return`M${e},${t}C${e},${t+i*.3} ${n},${r-i*.3} ${n},${r}`}function cd(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)>>>0;return t}function ld(e,t,n,r,i){let a=n-e,o=r-t,s=Math.hypot(a,o)||1;return{x:e+a/s*i,y:t+o/s*i}}function ud(e,t){if(e.length===0)return``;if(e.length===1)return`M${e[0].x},${e[0].y}`;let n=`M${e[0].x},${e[0].y}`;for(let r=1;r<e.length-1;r++){let i=e[r-1],a=e[r],o=e[r+1],s=a.x-i.x,c=a.y-i.y,l=o.x-a.x,u=o.y-a.y,d=Math.hypot(s,c),f=Math.hypot(l,u);if(d<.001||f<.001){n+=`L${a.x},${a.y}`;continue}let p=Math.min(t,d/2,f/2),m=a.x-s/d*p,h=a.y-c/d*p,g=a.x+l/f*p,_=a.y+u/f*p;n+=`L${m},${h}Q${a.x},${a.y} ${g},${_}`}let r=e[e.length-1];return n+=`L${r.x},${r.y}`,n}function dd(e,t,n){let r=Math.abs(t.idx-e.idx),i=Math.min(e.y,t.y),a=cd(n),o=r>12?[.28,.42,.56,.7]:[.35,.5,.65],s=o[a%o.length]??.5,c=Math.max(0,Math.min(r-1,Math.round((r-1)*s))),l=((a>>3)%3-1)*4;return i+pu*(c+.5)+l}function fd(e,t,n,r){let i=Math.max(0,Math.min(t,n)+1),a=Math.min(e.length-1,Math.max(t,n)-1),o=0;for(let t=i;t<=a;t++){let n=e[t];r(n,t)&&o++}return o}function pd(e,t,n){let r=t.y>e.y?1:-1,i=ld(e.x,e.y,n,e.y+r*24,J-1),a=ld(t.x,t.y,n,t.y-r*24,J-1),o=e.y+r*24,s=t.y-r*24;return ud([i,{x:n,y:o},{x:n,y:s},a],ju)}function md(e,t,n){let r=t.y>e.y?1:-1,i=ld(e.x,e.y,n,t.y,J-1),a=ld(t.x,t.y,n,t.y,J-1);return ud([i,{x:n,y:e.y+r*24},{x:n,y:t.y},a],ju)}function hd(e,t,n,r,i){let a=ld(e.x,e.y,t.x,t.y,J-1),o=ld(t.x,t.y,e.x,e.y,J-1),s=t.y>e.y?1:-1,c=e.y+s*24,l=t.y-s*24;return ud([a,{x:n,y:c},{x:n,y:i},{x:r,y:i},{x:r,y:l},o],ju)}function gd(e,t){let n=ld(e.x,e.y,t.x,t.y,J-1),r=ld(t.x,t.y,e.x,e.y,J-1);return`M${n.x},${n.y}L${r.x},${r.y}`}function _d(e,t){let n=ld(e.x,e.y,t.x,t.y,J-1),r=ld(t.x,t.y,e.x,e.y,J-1);return sd(n.x,n.y,r.x,r.y)}function vd(e,t,n,r,i={}){let a=Math.abs(e.row.lane-t.row.lane),o=Math.abs(t.idx-e.idx);if(a===0)return{mode:`straight`};if(a===1&&o>=Mu)return{mode:`adjacent-hook`,laneA:Math.min(e.row.lane,t.row.lane),laneB:Math.max(e.row.lane,t.row.lane),track:i.adjacentTrack??`from`};if(o<Mu)return{mode:`curve`};let s=Math.min(e.row.lane,t.row.lane),c=Math.max(e.row.lane,t.row.lane),l=cd(n)%3*Pu,u=t.x>e.x?1:-1,d=Nu+l,f=e.x+u*d,p=t.x-u*d,m=dd(e,t,n),h=Math.max(e.x,t.x),g=Math.min(e.x,t.x),_=fd(r,e.idx,t.idx,e=>e>s&&e<c),v=fd(r,e.idx,t.idx,e=>e<s),y=fd(r,e.idx,t.idx,e=>e>c),b=e.x<t.x?`left`:(e.x,t.x,`right`),x=_*5+a,S=v*2+(b===`left`?0:.5),C=y*2+(b===`right`?0:.5);return C<=S&&C<x?{mode:`outer-rail`,side:`right`,anchorLane:c,innerLane:s,outerRailX:h}:S<x?{mode:`outer-rail`,side:`left`,anchorLane:s,innerLane:c,outerRailX:g}:{mode:`inside-rail`,minLane:s,maxLane:c,sourceRailX:f,targetRailX:p,crossoverY:m}}function yd(e){switch(e.mode){case`outer-rail`:return`${e.mode}:${e.side}:${e.anchorLane}`;case`inside-rail`:return`${e.mode}:${e.minLane}:${e.maxLane}`;case`adjacent-hook`:return`${e.mode}:${e.laneA}:${e.laneB}:${e.track}`;default:return null}}function bd(e,t,n,r){switch(n.mode){case`straight`:return gd(e,t);case`curve`:return _d(e,t);case`adjacent-hook`:return md(e,t,(n.track===`to`?t.x:e.x)+r);case`inside-rail`:return hd(e,t,n.sourceRailX+r,n.targetRailX+r,n.crossoverY);case`outer-rail`:return pd(e,t,n.outerRailX+r)}}function xd(e,t,n){if(e.mode!==t.mode)return n<.5?e:t;switch(t.mode){case`straight`:case`curve`:return t;case`adjacent-hook`:return t;case`inside-rail`:{let r=e;return{...t,sourceRailX:Z(r.sourceRailX,t.sourceRailX,n),targetRailX:Z(r.targetRailX,t.targetRailX,n),crossoverY:Z(r.crossoverY,t.crossoverY,n)}}case`outer-rail`:{let r=e;return{...t,outerRailX:Z(r.outerRailX,t.outerRailX,n)}}}}function X(e,t){return bd({x:Z(e.fromX1,e.toX1,t),y:Z(e.fromY1,e.toY1,t)},{x:Z(e.fromX2,e.toX2,t),y:Z(e.fromY2,e.toY2,t)},xd(e.fromPlan,e.toPlan,t),Z(e.fromBundleOffset,e.toBundleOffset,t))}function Sd(e){if(e.length===0)return 0;let t=e.map(e=>e.locChanged).sort((e,t)=>e-t);return t[Math.max(0,Math.ceil(t.length*Au)-1)]??t[t.length-1]??0}function Cd(e,t,n,r){let i=+(r===`right`);return`M ${e} ${t-n} A ${n} ${n} 0 0 ${i} ${e} ${t+n} L ${e} ${t-n} Z`}function wd(e,t,n,r){let i=+(r===`right`);return`M ${e} ${t-n} A ${n} ${n} 0 0 ${i} ${e} ${t+n}`}function Td(e,t,n){if(e<=0||t<=0)return 0;let r=n*Math.min(e/t,1);return Math.max(ku,r)}var Ed=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`];function Dd(e){return e>=1.4}function Od(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function kd(e,t){return Od(e,t)&&e.getHours()===t.getHours()}function Ad(e){return`${Ed[e.getMonth()]} ${e.getDate()}, ${e.getFullYear()}`}function jd(e){return`${`${e.getHours()}`.padStart(2,`0`)}:${`${e.getMinutes()}`.padStart(2,`0`)}`}function Md(e,t){return Dd(t)?`${Ad(e)} ${jd(e)}`:Ad(e)}function Nd(e,t){if(e.length===0)return[];let n=Dd(t),r=[],i=null,a=-1/0;for(let o of e){let e=new Date(o.row.committerUnix*1e3),s=o.y*t,c=!i||!Od(e,i),l=!i||e.getMonth()!==i.getMonth()||e.getFullYear()!==i.getFullYear(),u=!i||!kd(e,i);i=e;let d=null;if(n?c?d={key:`${o.row.sha}:day`,text:Ad(e),y:s,kind:`month`}:u&&(d={key:`${o.row.sha}:hour`,text:jd(e),y:s,kind:`hour`}):c&&(d={key:`${o.row.sha}:day`,text:l?Ad(e):`${e.getDate()}`,y:s,kind:l?`month`:`day`}),!d)continue;let f=d.kind===`hour`?34:22;s-a<f||(r.push(d),a=s)}return r}function Pd(e,t,n){if(e.length===0)return null;let r=t/n,i=Math.max(0,Math.min(e.length-1,Math.floor((r-Lu-Ru)/pu)));for(;i+1<e.length&&e[i+1].y*n<=t;)i++;return e[i]??e[0]??null}function Fd(e){return e.includes(`/`)}function Id(e){return e.length===0?null:e.find(e=>!e.includes(`/`))||(e.find(e=>e.includes(`/`)&&e!==`origin`&&e!==`HEAD`)??null)}function Ld(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Rd(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.sha!==i.sha||r.row!==i.row||r.lane!==i.lane||r.parentShas.length!==i.parentShas.length||!Ld(r.refNames,i.refNames))return!1;for(let e=0;e<r.parentShas.length;e++)if(r.parentShas[e]!==i.parentShas[e])return!1}return!0}function zd(e,t){if(t.length<=e.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.sha!==i.sha||r.row!==i.row||r.lane!==i.lane||!Ld(r.refNames,i.refNames))return!1}return!0}function Bd(e,t){return!(!e||!t||e.length===0||t.length===0||Rd(e,t)||zd(e,t))}function Vd(e,t){return e?`☁ `:t?`● `:`⎇ `}var Hd=new Map;function Ud(e){let t=Hd.get(e);if(t!==void 0)return t;let n=eu(Ql(e,Wu));return Hd.set(e,n),n}function Wd(e,t,n){let r=Vd(t,n)+e;return Uu+Math.ceil(Ud(r))}function Gd(e,t,n,r){let i=[],a=new Map;for(let o of e){let e=o.x+J+8,s=o.y-10,c=e;for(let e of o.row.refNames){let a=t!==null&&e===t,l=Fd(e);i.push({refName:e,nodeSha:o.row.sha,x:c,y:s,color:r.get(o.row.sha)??Yu(o.row.lane),isCurrent:a,isSelected:e===n,isRemote:l}),c+=Wd(e,l,a)+Hu}a.set(o.row.sha,o.row.refNames.length>0?c-e-Hu:0)}return{placements:i,rowWidths:a}}function Z(e,t,n){return e+(t-e)*n}function Kd(e,t,n,r){let i=t*3,a=e-i,o=e+t+i,s=pu*r,c=152*r;return{firstIdx:Math.max(0,Math.floor((a-c)/s)),lastIdx:Math.min(n-1,Math.ceil((o-c)/s))}}function qd(e,t,n,r){return Math.max(e,t)>=n&&Math.min(e,t)<=r}function Jd(e,t,n){let r=e.nodes.slice(t,n+1),i=[];for(let r of e.nodes)for(let a=0;a<r.row.parentShas.length;a++){let o=e.shaToNode.get(r.row.parentShas[a]);o&&qd(r.idx,o.idx,t,n)&&i.push({from:r,to:o,isMerge:a>0,key:`${r.row.sha}-${o.row.sha}`})}return{visibleNodes:r,visibleEdges:i}}function Yd(e,t){let n=new Set;if(!e||!t)return n;let r=e.nodes.find(e=>e.row.refNames.includes(t));if(!r)return n;let i=r.row.sha,a=new Set;for(;i&&!a.has(i);){a.add(i);let t=e.shaToNode.get(i),r=t?.row.parentShas[0];if(!t||!r)break;let o=e.shaToNode.get(r);if(!o)break;n.add(`${t.row.sha}-${o.row.sha}`),i=o.row.sha}return n}function Xd(e,t){let n=new Set;if(!e||!t)return n;let r=e.nodes.find(e=>e.row.refNames.includes(t));if(!r)return n;let i=r.row.sha;for(;i&&!n.has(i);){n.add(i);let t=e.shaToNode.get(i),r=t?.row.parentShas[0];if(!t||!r||!e.shaToNode.get(r))break;i=r}return n}function Zd(e,t){if(!e||!t)return null;let n=e.nodes.find(e=>e.row.refNames.includes(t));return n?{key:t,x:n.x-Y/2,color:e.shaToColor.get(n.row.sha)??Yu(n.row.lane)}:null}function Qd(e,t){let n=t.row.lane,r=t.idx-1,i=t=>{for(let n of e.nodes){if(n.idx===r&&n.row.lane===t)return!0;if(n.row.lane!==t)continue;let i=n.row.parentShas[0];if(!i)continue;let a=e.shaToNode.get(i);if(!(!a||a.row.lane!==t)&&n.idx<=r&&r<=a.idx)return!0}return!1};return i(n+1)?i(n-1)?null:`left`:`right`}function $d(e){return new Set(e.unstaged.filter(e=>e.status===`U`).map(e=>e.path)).size}function ef(e,t){let n=new Map,r=new Map;for(let i of e){let e=vd(i.from,i.to,i.key,t,{adjacentTrack:i.isMerge?`to`:`from`});n.set(i.key,e);let a=yd(e);if(!a)continue;let o=r.get(a),s={key:i.key,topIdx:Math.min(i.from.idx,i.to.idx),bottomIdx:Math.max(i.from.idx,i.to.idx),innerLane:e.mode===`outer-rail`?e.innerLane:void 0};o?o.push(s):r.set(a,[s])}let i=new Map;for(let e of r.values()){let t=n.get(e[0]?.key??``);if(!t)continue;if(t.mode===`outer-rail`){e.sort((e,n)=>{let r=e.innerLane??t.innerLane,i=n.innerLane??t.innerLane;return t.side===`right`&&r!==i?r-i:t.side===`left`&&r!==i?i-r:e.topIdx-n.topIdx||e.bottomIdx-n.bottomIdx||e.key.localeCompare(n.key)});for(let n=0;n<e.length;n++){let r=t.side===`right`?1:-1;i.set(e[n].key,n*Fu*r)}continue}e.sort((e,t)=>e.topIdx-t.topIdx||e.bottomIdx-t.bottomIdx||e.key.localeCompare(t.key));let r=(e.length-1)/2;for(let t=0;t<e.length;t++)i.set(e[t].key,(t-r)*Fu)}return{plans:n,bundleOffsets:i}}function tf(e,t,n,r,i){return e.map(e=>{let a=r.has(e.key),o=t.plans.get(e.key)??vd(e.from,e.to,e.key,n,{adjacentTrack:e.isMerge?`to`:`from`}),s=t.bundleOffsets.get(e.key)??0,c=e.isMerge?e.to:e.from;return{key:e.key,fromSha:e.from.row.sha,toSha:e.to.row.sha,path:bd(e.from,e.to,o,s),plan:o,bundleOffset:s,x1:e.from.x,y1:e.from.y,x2:e.to.x,y2:e.to.y,isMerge:e.isMerge,stroke:i.get(c.row.sha)??Yu(c.row.lane),strokeWidth:a?4.5:e.isMerge?2:3,opacity:a?.95:.8}})}function nf(e,t,n,r,i,a){return Bd(e,t)?!0:!i||!a?!1:n!==r}function rf(){let e=R(e=>e.historyWindow),t=R(e=>e.refs),n=R(e=>e.totalCommitCount),r=R(e=>e.selectedSha),i=R(e=>e.selectedRefName),a=R(e=>e.mergePreview),o=R(e=>e.scrollToSha),s=R(e=>e.scrollToKey),c=R(e=>e.selectCommit),l=R(e=>e.selectGraphRef),u=R(e=>e.clearGraphRefSelection),d=R(e=>e.ensureMergePreview),f=R(e=>e.requestMore),p=R(e=>e.performRefAction),m=R(e=>e.performCommitAction),h=R(e=>e.performMergeRef),g=R(e=>e.performRebaseRef),_=R(e=>e.pendingMutation),v=R(e=>e.graphAnimationSuppressToken),y=R(e=>e.showCommitMessages),b=R(e=>e.showError),S=R(e=>e.commitCIStatus),C=R(e=>e.fetchCommitCIStatusesIfNeeded),w=R(e=>e.worktreeChanges),T=R(e=>e.worktreeSelected),ee=R(e=>e.selectWorktree),[te,ne]=(0,x.useState)(null),re=(0,x.useRef)(null),ie=(0,x.useRef)(null),ae=(0,x.useRef)(null),oe=(0,x.useRef)({scrollTop:0,clientHeight:0}),se=(0,x.useRef)(0),ce=(0,x.useRef)(null),D=(0,x.useRef)(null),O=(0,x.useRef)(null),le=(0,x.useRef)(0),[k,ue]=(0,x.useState)(1),[de,fe]=(0,x.useState)(0),[A,pe]=(0,x.useState)(0),[j,me]=(0,x.useState)(null),he=(0,x.useRef)(null),[ge,_e]=(0,x.useState)(!1),[ve,ye]=(0,x.useState)(null),[be,xe]=(0,x.useState)(null),[Se,Ce]=(0,x.useState)(null),[we,Te]=(0,x.useState)(null),[{graphProgress:Ee},De]=ss(()=>({graphProgress:1,config:Vu})),Oe=(0,x.useRef)(1),ke=(0,x.useRef)(0),Ae=(0,x.useRef)(0),je=(0,x.useRef)(null),Me=(0,x.useRef)(null),Ne=(0,x.useRef)(null),Pe=(0,x.useRef)(v),[,Fe]=(0,x.useReducer)(e=>e+1,0),Ie=(0,x.useRef)({firstIdx:0,lastIdx:100}),M=(0,x.useMemo)(()=>!e||e.rows.length===0?null:od(e.rows,y?zu:0),[e,y]),Le=(0,x.useMemo)(()=>new Map(t.map(e=>[e.shortName,e])),[t]),N=(0,x.useMemo)(()=>i?Le.get(i)??null:null,[Le,i]),P=(0,x.useMemo)(()=>t.find(e=>e.isCurrent)?.shortName??null,[t]),Re=(0,x.useMemo)(()=>rd(t),[t]),F=(0,x.useMemo)(()=>{if(!M||!w)return null;let e=w.staged.length+w.unstaged.length;if(e===0)return null;let t=(P?M.nodes.find(e=>e.row.refNames.includes(P)):void 0)??M.shaToNode.get(w.headSha);if(!t)return null;let n=w.mergeHeadShas?.length?`merge`:w.rebaseHeadSha?`rebase`:`worktree`,r=$d(w),i=t.y-pu,a=n===`worktree`?M.shaToColor.get(t.row.sha)??Yu(t.row.lane):`#fab387`,o={row:{row:t.row.row-1,sha:`${n}:${w.headSha}:${w.mergeHeadShas?.[0]??w.rebaseHeadSha??`dirty`}`,parentShas:[t.row.sha,...w.mergeHeadShas?.slice(0,1)??[]],authorName:``,authorEmail:``,authorUnix:0,committerUnix:0,subject:n===`merge`?`Merge in progress`:n===`rebase`?`Rebase in progress`:`Uncommitted changes`,additions:0,deletions:0,locChanged:0,refNames:[],lane:t.row.lane},x:t.x,y:i,idx:t.idx-1},s=M.nodes.map(e=>e.row.lane),c=bd(o,t,vd(o,t,`${o.row.sha}-${t.row.sha}`,s),0),l=w.mergeHeadShas?.[0],u=l?M.shaToNode.get(l)??null:null,d=u?bd(o,u,vd(o,u,`${o.row.sha}-${u.row.sha}`,s,{adjacentTrack:`to`}),0):null;return{kind:n,x:o.x,y:o.y,headY:t.y,color:a,count:e,conflictedCount:r,targetPath:c,sourcePath:d,labelSide:Qd(M,t)}},[M,w,P]),ze=(0,x.useCallback)(e=>{le.current=e,D.current===null&&(D.current=requestAnimationFrame(()=>{D.current=null,fe(le.current)}))},[]),Be=(0,x.useCallback)(()=>{ce.current!==null&&(cancelAnimationFrame(ce.current),ce.current=null),he.current&&(De.stop(),De.set({graphProgress:1}),he.current=null,me(null))},[De]),Ve=(0,x.useCallback)(e=>{ce.current!==null&&(cancelAnimationFrame(ce.current),ce.current=null),De.stop(),De.set({graphProgress:0}),he.current=e,me(e),ce.current=requestAnimationFrame(()=>{ce.current=requestAnimationFrame(()=>{ce.current=null,he.current===e&&De.start({graphProgress:1,immediate:!1,config:Vu,onRest:t=>{t.finished&&me(t=>t===e?(he.current=null,null):t)}})})})},[De]),He=(0,x.useCallback)(()=>{O.current!==null&&(clearTimeout(O.current),O.current=null)},[]),Ue=(0,x.useCallback)(e=>{He(),ye(e)},[He]),We=(0,x.useCallback)(e=>{He(),O.current=setTimeout(()=>{ye(t=>t===e?null:t),O.current=null},120)},[He]);(0,x.useEffect)(()=>{_e(!1),xe(null)},[i]),(0,x.useEffect)(()=>()=>{He()},[He]),(0,x.useEffect)(()=>{if(!M||!e){je.current=e?.rows??null,Me.current=M,Ne.current=P,Be();return}let t=v!==Pe.current;if(Pe.current=v,t){je.current=e.rows,Me.current=M,Ne.current=P;return}nf(je.current,e.rows,Ne.current,P,Me.current,M)&&Me.current?Ve({fromLayout:Me.current,toLayout:M,fromCurrentBranch:Ne.current,toCurrentBranch:P}):Be(),je.current=e.rows,Me.current=M,Ne.current=P},[P,e,M,v,Ve,Be]),(0,x.useEffect)(()=>()=>{De.stop(),ce.current!==null&&cancelAnimationFrame(ce.current),D.current!==null&&cancelAnimationFrame(D.current)},[De]);let Ge=(0,x.useMemo)(()=>e?Sd(e.rows):0,[e]),Ke=(0,x.useMemo)(()=>M?M.nodes.map(e=>e.row.lane):[],[M]),qe=(0,x.useMemo)(()=>Yd(M,P),[M,P]),Je=(0,x.useCallback)((e,t)=>{if(!M)return;oe.current={scrollTop:e.scrollTop,clientHeight:e.clientHeight},se.current=e.scrollTop,ze(e.scrollTop),ie.current&&(ie.current.style.transform=`translateY(${-e.scrollTop}px)`);let{firstIdx:n,lastIdx:r}=Kd(e.scrollTop,e.clientHeight,M.nodes.length,t);Ie.current={firstIdx:n,lastIdx:r},Fe()},[M,ze]);(0,x.useEffect)(()=>{if(!o||!M||!re.current||Date.now()<ke.current)return;let e=M.shaToNode.get(o);if(!e)return;let t=re.current,n=e.y*k-t.clientHeight/2;Ae.current=Date.now()+700,t.scrollTo({top:Math.max(0,n),behavior:`smooth`})},[o,s,M,k]),(0,x.useEffect)(()=>{let t=re.current;if(!t)return;let n=()=>{if(!M)return;let n=t.scrollTop,r=Math.abs(n-se.current)>.5;oe.current={scrollTop:t.scrollTop,clientHeight:t.clientHeight},pe(t.clientHeight),se.current=n,r&&Date.now()>=Ae.current&&Be(),ze(t.scrollTop),ie.current&&(ie.current.style.transform=`translateY(${-t.scrollTop}px)`),ae.current&&(ae.current.style.transform=`translateY(${-t.scrollTop}px)`);let{firstIdx:i,lastIdx:a}=Kd(t.scrollTop,t.clientHeight,M.nodes.length,Oe.current),o=Ie.current,s=Math.floor((o.lastIdx-o.firstIdx)*.25);if((i<o.firstIdx+s||a>o.lastIdx-s)&&(Ie.current={firstIdx:i,lastIdx:a},Fe()),e&&e.hasMoreAfter&&M){let e=M.nodes.length*pu*Oe.current;t.scrollTop+t.clientHeight>e-t.clientHeight&&f(`down`)}};if(M){oe.current={scrollTop:t.scrollTop,clientHeight:t.clientHeight},pe(t.clientHeight),se.current=t.scrollTop,ze(t.scrollTop),ie.current&&(ie.current.style.transform=`translateY(${-t.scrollTop}px)`),ae.current&&(ae.current.style.transform=`translateY(${-t.scrollTop}px)`);let{firstIdx:e,lastIdx:n}=Kd(t.scrollTop,t.clientHeight,M.nodes.length,Oe.current);Ie.current={firstIdx:e,lastIdx:n},Fe()}t.addEventListener(`scroll`,n,{passive:!0});let r=new ResizeObserver(()=>n());return r.observe(t),()=>{t.removeEventListener(`scroll`,n),r.disconnect()}},[M,e,f,Be,ze]),(0,x.useEffect)(()=>{let e=re.current;!e||!ie.current||Je(e,k)},[M,k,Je]),(0,x.useEffect)(()=>{let e=e=>{if(!e.ctrlKey&&!e.metaKey)return;let t=re.current;if(!t||!t.contains(e.target))return;e.preventDefault(),e.stopPropagation();let n=t.getBoundingClientRect(),r=e.clientY-n.top+t.scrollTop,i=Oe.current,a=e.deltaY>0?-.1:.1,o=Math.max(.1,Math.min(3,i+a));Oe.current=o,ue(o);let s=r/i*o-(e.clientY-n.top);t.scrollTop=Math.max(0,s)};return document.addEventListener(`wheel`,e,{passive:!1,capture:!0}),()=>document.removeEventListener(`wheel`,e,{capture:!0})},[]),(0,x.useEffect)(()=>{!M||!re.current||!e?.hasMoreAfter||re.current.clientHeight/k>M.nodes.length*pu*.8&&f(`down`)},[k,M,e,f]);let{visibleNodes:Ye,visibleEdges:Xe}=(0,x.useMemo)(()=>{if(!M)return{visibleNodes:[],visibleEdges:[]};let{firstIdx:e,lastIdx:t}=Ie.current;return Jd(M,e,t)},[M,Ie.current.firstIdx,Ie.current.lastIdx]),Ze=(0,x.useMemo)(()=>ef(Xe,Ke),[Xe,Ke]),{placements:Qe,rowWidths:$e}=(0,x.useMemo)(()=>Gd(Ye,P,i,M?.shaToColor??Ju),[Ye,P,i,M]),et=(0,x.useMemo)(()=>tf(Xe,Ze,Ke,qe,M?.shaToColor??Ju),[Xe,Ze,Ke,qe,M]),tt=(0,x.useMemo)(()=>Zd(M,P),[M,P]),nt=(0,x.useMemo)(()=>{if(!j)return null;let e=oe.current.scrollTop,t=oe.current.clientHeight||re.current?.clientHeight||0,n=j.fromLayout.nodes.map(e=>e.row.lane),r=j.toLayout.nodes.map(e=>e.row.lane),a=Kd(e,t,j.fromLayout.nodes.length,k),o=Kd(e,t,j.toLayout.nodes.length,k),s=Jd(j.fromLayout,a.firstIdx,a.lastIdx),c=Jd(j.toLayout,o.firstIdx,o.lastIdx),l=ef(s.visibleEdges,n),u=ef(c.visibleEdges,r),d=tf(s.visibleEdges,l,n,Yd(j.fromLayout,j.fromCurrentBranch),j.fromLayout.shaToColor),f=tf(c.visibleEdges,u,r,Yd(j.toLayout,j.toCurrentBranch),j.toLayout.shaToColor),p=Gd(s.visibleNodes,j.fromCurrentBranch,i,j.fromLayout.shaToColor).placements,m=Gd(c.visibleNodes,j.toCurrentBranch,i,j.toLayout.shaToColor).placements,h=Zd(j.fromLayout,j.fromCurrentBranch),g=Zd(j.toLayout,j.toCurrentBranch),_=new Map(s.visibleNodes.map(e=>[e.row.sha,e])),v=new Map(c.visibleNodes.map(e=>[e.row.sha,e])),y=new Map(d.map(e=>[e.key,e])),b=new Map(f.map(e=>[e.key,e])),x=new Map(p.map(e=>[e.refName,e])),S=new Map(m.map(e=>[e.refName,e]));return{nodes:[...new Set([..._.keys(),...v.keys()])].map(e=>{let t=_.get(e),n=v.get(e),r=n??t;if(!r)return null;let i=n?j.toLayout:j.fromLayout;return{sortIdx:n?.idx??t?.idx??0,item:{key:e,row:r.row,interactive:!!n,color:i.shaToColor.get(e)??Yu(r.row.lane),fromX:t?.x??r.x,fromY:t?t.y:r.y+Gu,toX:n?.x??r.x,toY:n?n.y:r.y-Ku,fromOpacity:+!!t,toOpacity:+!!n}}}).filter(e=>e!==null).sort((e,t)=>e.sortIdx-t.sortIdx).map(e=>e.item),edges:[...new Set([...y.keys(),...b.keys()])].map(e=>{let t=y.get(e),n=b.get(e),r=n??t;if(!r)return null;let i=n?j.fromLayout.shaToNode.get(n.fromSha):void 0,a=n?j.fromLayout.shaToNode.get(n.toSha):void 0,o=t?j.toLayout.shaToNode.get(t.fromSha):void 0,s=t?j.toLayout.shaToNode.get(t.toSha):void 0;return{sortY:Math.min(n?.y1??t?.y1??0,n?.y2??t?.y2??0),item:{key:e,path:n?.path??t?.path??``,fromPlan:t?.plan??n?.plan??{mode:`curve`},toPlan:n?.plan??t?.plan??{mode:`curve`},fromBundleOffset:t?.bundleOffset??n?.bundleOffset??0,toBundleOffset:n?.bundleOffset??t?.bundleOffset??0,stroke:n?.stroke??t?.stroke??`#cdd6f4`,fromStrokeWidth:t?.strokeWidth??r.strokeWidth,toStrokeWidth:n?.strokeWidth??r.strokeWidth,fromOpacity:t?.opacity??0,toOpacity:n?.opacity??0,fromX1:t?.x1??i?.x??r.x1,fromY1:t?.y1??i?.y??r.y1+Gu,fromX2:t?.x2??a?.x??r.x2,fromY2:t?.y2??a?.y??r.y2+Gu,toX1:n?.x1??o?.x??r.x1,toY1:n?.y1??o?.y??r.y1-Ku,toX2:n?.x2??s?.x??r.x2,toY2:n?.y2??s?.y??r.y2-Ku}}}).filter(e=>e!==null).sort((e,t)=>e.sortY-t.sortY).map(e=>e.item),refs:[...new Set([...x.keys(),...S.keys()])].map(e=>{let t=x.get(e),n=S.get(e),r=n??t;return r?{sortY:n?.y??t?.y??0,item:{key:e,placement:r,fromX:t?.x??r.x,fromY:t?t.y:r.y+Gu,toX:n?.x??r.x,toY:n?n.y:r.y-Ku,fromOpacity:+!!t,toOpacity:+!!n,fromScale:t?1:.9,toScale:n?1:.92}}:null}).filter(e=>e!==null).sort((e,t)=>e.sortY-t.sortY).map(e=>e.item),lane:h||g?{key:g?.key??h?.key??`current-lane`,color:g?.color??h?.color??`#89b4fa`,fromX:h?.x??g?.x??0,toX:g?.x??h?.x??0,fromOpacity:+!!h,toOpacity:+!!g}:null}},[j,i,k]),rt=(0,x.useMemo)(()=>nt?.nodes??Ye.map(e=>({key:e.row.sha,row:e.row,interactive:!0,color:M?.shaToColor.get(e.row.sha)??Yu(e.row.lane),fromX:e.x,fromY:e.y,toX:e.x,toY:e.y,fromOpacity:1,toOpacity:1})),[nt,Ye,M]),it=(0,x.useMemo)(()=>nt?.edges??et.map(e=>({key:e.key,path:e.path,fromPlan:e.plan,toPlan:e.plan,fromBundleOffset:e.bundleOffset,toBundleOffset:e.bundleOffset,stroke:e.stroke,fromStrokeWidth:e.strokeWidth,toStrokeWidth:e.strokeWidth,fromOpacity:e.opacity,toOpacity:e.opacity,fromX1:e.x1,fromY1:e.y1,fromX2:e.x2,fromY2:e.y2,toX1:e.x1,toY1:e.y1,toX2:e.x2,toY2:e.y2})),[nt,et]),at=(0,x.useMemo)(()=>nt?.refs??Qe.map(e=>({key:e.refName,placement:e,fromX:e.x,fromY:e.y,toX:e.x,toY:e.y,fromOpacity:1,toOpacity:1,fromScale:1,toScale:1})),[nt,Qe]),ot=(0,x.useMemo)(()=>nt?nt.lane:tt?{key:tt.key,color:tt.color,fromX:tt.x,toX:tt.x,fromOpacity:1,toOpacity:1}:null,[nt,tt]),st=(0,x.useMemo)(()=>M&&P?M.nodes.find(e=>e.row.refNames.includes(P))??null:null,[M,P]),ct=(0,x.useMemo)(()=>!N||N.kind!==`head`?null:ad(N,t),[N,t]),lt=(0,x.useMemo)(()=>!N||N.kind!==`head`?!1:!ct||ct.targetSha!==N.targetSha,[N,ct]),ut=(0,x.useMemo)(()=>!N||N.kind!==`head`||!ct||ct.targetSha===N.targetSha?!1:(N.ahead??0)>0,[N,ct]),dt=(0,x.useMemo)(()=>{if(!N)return[];if(N.kind===`head`){let e=(N.behind??0)>0?{action:`push`,label:`Force push`,tone:`warning`,force:!0}:{action:`push`,label:`Push`,tone:`neutral`};return N.isCurrent?[...lt?[e]:[],...ut?[{action:`reset`,label:`Reset`,tone:`warning`}]:[]]:[{action:`checkout`,label:`Checkout`,tone:`neutral`},...lt?[e]:[],...ut?[{action:`reset`,label:`Reset`,tone:`warning`}]:[],{action:`delete`,label:`Delete`,tone:`danger`}]}return N.kind===`remote`?[{action:`checkout`,label:`Checkout`,tone:`neutral`},{action:`delete`,label:`Delete`,tone:`danger`}]:[{action:`push`,label:`Push`,tone:`neutral`}]},[N,lt,ut]),ft=(0,x.useMemo)(()=>!N||N.kind!==`head`||N.isCurrent?null:N.shortName,[N]),pt=(0,x.useMemo)(()=>!!st&&!!P&&!!i&&i!==P&&a?.sourceRefName===i&&a.mergeable,[st,P,i,a]),mt=(0,x.useMemo)(()=>N&&N.kind===`head`&&N.isCurrent?N:null,[N]),ht=(0,x.useMemo)(()=>{if(!M||!i||!a?.mergeable||a.sourceRefName!==i||!a.sourceSha||!a.targetSha)return null;let e=M.shaToNode.get(a.sourceSha),t=M.shaToNode.get(a.targetSha);if(!e||!t)return null;let n=M.nodes[0]??t,r={row:{row:n.row.row-1,sha:`preview:${a.sourceSha}:${a.targetSha}`,parentShas:[t.row.sha,e.row.sha],authorName:``,authorEmail:``,authorUnix:0,committerUnix:0,subject:`Merge preview`,additions:0,deletions:0,locChanged:0,refNames:[],lane:t.row.lane},x:t.x,y:n.y-pu,idx:n.idx-1},o=`${r.row.sha}-${t.row.sha}`,s=`${r.row.sha}-${e.row.sha}`,c=vd(r,t,o,Ke);return{previewNode:r,sourceNode:e,targetNode:t,sourcePath:bd(r,e,vd(r,e,s,Ke,{adjacentTrack:`to`}),Ze.bundleOffsets.get(s)??0),targetPath:bd(r,t,c,Ze.bundleOffsets.get(o)??0),color:M.shaToColor.get(t.row.sha)??Yu(t.row.lane)}},[M,i,a,Ke,Ze.bundleOffsets]),I=(0,x.useMemo)(()=>ge?ht:null,[ge,ht]),gt=(0,x.useCallback)((e,t)=>{e.stopPropagation(),_e(!1),l(t)},[l]),_t=(0,x.useCallback)(e=>(ne(e),p(e.action,e.refName,e.sha,e.force).finally(()=>{ne(t=>$u(t,e)?null:t)})),[p]),vt=(0,x.useCallback)(e=>{if(!i||!N||_)return;_e(!1);let t=N.targetSha,n=i,r={...e,refName:n,sha:t,force:!!e.force};_t(r).catch(r=>{e.action===`push`&&!e.force&&ed(r)?b(`Push rejected`,r,{label:`Force push`,run:()=>{_t({action:`push`,label:`Force push`,tone:`warning`,force:!0,refName:n,sha:t}).catch(e=>b(`Force push failed`,e))}}):b(`${e.action} failed`,r)})},[i,N,_t,b,_]),yt=(0,x.useCallback)(e=>{ft&&(_||Te({title:`Move branch`,message:`Move branch ${ft} to commit ${e.slice(0,8)}?`,confirmLabel:`Move`,onConfirm:()=>{_e(!1),p(`move`,ft,e).catch(e=>{b(`Move failed`,e)})}}))},[ft,p,b,_]),bt=(0,x.useCallback)((e,t)=>{_||(_e(!1),xe(null),ye(null),Ce({kind:e,targetSha:t}))},[_]),xt=(0,x.useCallback)(e=>{if(!Se)return;let{kind:t,targetSha:n}=Se;Ce(null),p(t===`branch`?`create`:`create-tag`,e,n).catch(e=>{b(`Create ${t} failed`,e)})},[Se,p,b]),St=(0,x.useCallback)(()=>Ce(null),[]),Ct=Se?.kind===`branch`?`Branch name`:`Tag name`,wt=Se?`Create ${Se.kind} at ${Se.targetSha.slice(0,8)}`:`Create ref`,Tt=Se?.kind===`tag`?Re:``,Et=(0,x.useCallback)(()=>{i&&(_e(!0),(!a||a.sourceRefName!==i)&&d(i))},[i,a,d]),Dt=(0,x.useCallback)(()=>{_e(!1)},[]),Ot=(0,x.useCallback)(()=>{let e=re.current;if(!e||!ht)return;let t=Math.max(ht.previewNode.y+J,ht.sourceNode.y+J,ht.targetNode.y+J),n=Math.max(t+Lu,pu*4),r=Math.min(Oe.current,Math.max(.18,Math.min(1,e.clientHeight/n)));ke.current=Date.now()+500,Oe.current=r,ue(r),e.scrollTo({top:0,behavior:`smooth`}),requestAnimationFrame(()=>Je(e,r))},[ht,Je]),kt=(0,x.useCallback)(()=>{i&&(_||(_e(!0),Ot(),h(i).catch(e=>{b(`Merge failed`,e)})))},[i,h,Ot,b,_]),L=(0,x.useCallback)(e=>{_e(!1),g(e).catch(e=>{b(`Rebase failed`,e)})},[g,b]),At=(0,x.useCallback)(e=>{if(!mt||_)return;let n=ad(mt,t);if(e===mt.shortName||e===mt.name||e===n?.shortName||e===n?.name){L(e);return}Te({title:`Rebase branch`,message:`Rebase ${mt.shortName} onto ${e}? This rewrites the current branch history.`,confirmLabel:`Rebase`,onConfirm:()=>L(e)})},[mt,t,L,_]),jt=(0,x.useMemo)(()=>{if(!M||!re.current)return[];let e=re.current.scrollTop,t=new Map;for(let e of Ye){let n=t.get(e.row.lane);(!n||e.y<n.y)&&t.set(e.row.lane,e)}let n=new Map;for(let r of M.nodes){if(r.row.refNames.length===0||r.y*k>=e)continue;let i=r.row.lane;if(n.has(i))continue;let a=t.get(i);if(!a)continue;let o=Id(r.row.refNames);o&&M.shaToBranch.get(a.row.sha)===o&&n.set(i,{name:o,x:r.x,color:Xu(o)})}let r=[...n.values()].sort((e,t)=>e.x-t.x),i=[],a=[];for(let e of r){let t=e.x*k-4,n=e.name.length*7+20,r=0;for(let e=0;e<a.length;e++){if(t>=a[e]){r=e;break}r=e+1}r>=a.length&&a.push(0),a[r]=t+n+4,i.push({...e,row:r})}return i},[M,Ye,k]),Mt=(0,x.useMemo)(()=>M?Nd(M.nodes,k):[],[M,k]),Nt=(0,x.useMemo)(()=>{if(!M)return null;let e=Pd(M.nodes,de,k);return e?Md(new Date(e.row.committerUnix*1e3),k):null},[M,de,k]),Pt=(0,x.useMemo)(()=>Mt.filter(e=>e.y-de>28),[Mt,de]),Ft=(0,x.useMemo)(()=>Xd(M,P),[M,P]),It=(0,x.useMemo)(()=>!M||Ft.size===0||!y?[]:M.nodes.filter(e=>Ft.has(e.row.sha)).map(e=>({key:e.row.sha,sha:e.row.sha,y:e.y*k,text:e.row.subject})),[M,Ft,k,y]),Lt=(0,x.useMemo)(()=>It.filter(e=>e.y-de>28),[It,de]),Rt=(0,x.useMemo)(()=>A===0?[]:It.filter(e=>{let t=e.y-de;return t>0&&t<A}),[It,de,A]);(0,x.useEffect)(()=>{if(Rt.length===0)return;let e=window.setTimeout(()=>{let e=Rt.slice(0,mu).map(e=>e.sha);C(e)},200);return()=>window.clearTimeout(e)},[Rt,C]);let zt=(0,x.useMemo)(()=>M&&r?M.shaToNode.get(r)??null:null,[M,r]),Bt=(0,x.useMemo)(()=>{if(!M||!zt||!P)return!1;let e=M.nodes.find(e=>e.row.refNames.includes(P));if(!e)return!1;let t=e.row.sha,n=new Set;for(;t&&!n.has(t);){if(t===zt.row.sha)return!0;n.add(t);let e=M.shaToNode.get(t);if(!e||e.row.parentShas.length===0)break;t=e.row.parentShas[0]}return!1},[M,zt,P]),Vt=(0,x.useMemo)(()=>!zt||!P?!1:zt.row.refNames.includes(P),[zt,P]),Ht=(0,x.useMemo)(()=>{if(!zt)return[];let e=[],t=zt.row.parentShas.length===1;return Vt?(e.push({action:`uncommit`,label:`Uncommit`,tone:`uncommit`}),t&&e.push({action:`revert`,label:`Revert`,tone:`warning`}),e):Bt?(t&&e.push({action:`revert`,label:`Revert`,tone:`warning`}),e):(t&&(e.push({action:`cherry-pick`,label:`Cherry pick`,tone:`success`}),e.push({action:`revert`,label:`Revert`,tone:`warning`})),e)},[zt,Vt,Bt]),Ut=(0,x.useCallback)(e=>{if(!zt||_)return;let t=zt.row.sha.slice(0,8),n=e===`cherry-pick`?`Cherry pick commit`:e===`uncommit`?`Uncommit`:`Revert commit`,r=e===`uncommit`?`Uncommit ${t}? This will move HEAD to its parent and keep the changes in your working tree.`:`${e===`cherry-pick`?`Cherry-pick`:`Revert`} commit ${t} on the current branch?`;Te({title:n,message:r,confirmLabel:e===`cherry-pick`?`Cherry pick`:e===`uncommit`?`Uncommit`:`Revert`,onConfirm:()=>{m(e,zt.row.sha).catch(t=>{b(`${e} failed`,t)})}})},[zt,m,b,_]),Wt=j!==null;if(!M)return(0,E.jsx)(`div`,{style:{flex:1,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#45475a`,fontSize:13},children:`No commits to display`});let Gt=e?.hasMoreAfter===!1?M.nodes.length:Math.max(n,M.nodes.length),Kt=M.totalWidth,qt=Gt*pu+Lu*2+Ru,Jt=Kt*k,Yt=qt*k,Xt=F?Math.max(22,String(F.conflictedCount).length*7+14):0,Zt=F?.kind===`merge`?F.conflictedCount>0?`Merge conflicts`:`Merge in progress`:F?.kind===`rebase`?F.conflictedCount>0?`Rebase conflicts`:`Rebase in progress`:`Uncommitted changes`,Qt=F?.kind===`worktree`?`Uncommitted changes — ${F.count} file${F.count===1?``:`s`}\nClick to stage / unstage`:`${Zt} — ${F?.conflictedCount??0} conflict${F?.conflictedCount===1?``:`s`}\nClick to review files`;return(0,E.jsxs)(`div`,{ref:re,style:{flex:1,height:`100%`,overflow:`auto`,position:`relative`,background:`#1e1e2e`,touchAction:`pan-x pan-y`},onClick:()=>{_e(!1),xe(null),ye(null),He(),u()},children:[(0,E.jsx)(du,{open:!!Se,title:wt,label:Ct,initialValue:Tt,confirmLabel:`Create`,onSubmit:xt,onClose:St}),(0,E.jsx)(fu,{open:!!we,title:we?.title??``,message:we?.message??``,confirmLabel:we?.confirmLabel??`Confirm`,onConfirm:()=>{let e=we?.onConfirm;Te(null),e?.()},onClose:()=>Te(null)}),(0,E.jsx)(`div`,{style:{position:`sticky`,top:0,left:0,zIndex:20,height:0,overflow:`visible`,pointerEvents:`none`},children:jt.map(e=>(0,E.jsx)(`div`,{onClick:t=>gt(t,e.name),style:{position:`absolute`,left:e.x*k-4,top:4+e.row*22,padding:`2px 8px`,borderRadius:4,background:i===e.name?e.color+`35`:e.color+`20`,border:`1px solid ${i===e.name?e.color:e.color+`50`}`,color:e.color,fontSize:10,fontWeight:600,whiteSpace:`nowrap`,pointerEvents:`auto`,transform:`scale(${Math.min(k,1)})`,transformOrigin:`top left`,cursor:`pointer`,boxShadow:i===e.name?`0 0 8px ${e.color}40`:`none`},children:e.name},e.name))}),(0,E.jsxs)(`div`,{style:{position:`sticky`,top:0,left:0,width:`100%`,height:0,overflow:`visible`,zIndex:5,pointerEvents:`none`},children:[Nt&&(0,E.jsx)(`div`,{style:{position:`absolute`,right:20,top:6,padding:`3px 8px`,borderRadius:6,background:`#181825`,border:`1px solid #313244`,color:`#9399b2`,fontSize:11,fontWeight:600,whiteSpace:`nowrap`,boxShadow:`0 4px 12px rgba(0,0,0,0.2)`},children:Nt}),(0,E.jsx)(`div`,{ref:ae,style:{position:`relative`},children:Lt.map(e=>{let t=S[e.sha],n=t?{success:`#a6e3a1`,pending:`#f9e2af`,failure:`#f38ba8`,error:`#f38ba8`,neutral:`#6c7086`,loading:`#585b70`,none:`#45475a`}[t.state]:void 0;return(0,E.jsxs)(`div`,{style:{position:`absolute`,left:20,top:e.y-7,maxWidth:380*k,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,color:`#a6adc8`,fontSize:12,pointerEvents:`none`,userSelect:`none`,display:`flex`,alignItems:`center`,gap:6},children:[n&&(0,E.jsx)(`span`,{style:{display:`inline-block`,width:8,height:8,borderRadius:`50%`,background:n,flexShrink:0}}),(0,E.jsx)(`span`,{style:{overflow:`hidden`,textOverflow:`ellipsis`},children:e.text})]},e.key)})}),(0,E.jsx)(`div`,{ref:ie,style:{position:`relative`},children:Pt.map(e=>(0,E.jsxs)(`div`,{style:{position:`absolute`,right:20,top:e.y-7,padding:`2px 6px`,borderRadius:6,background:`#1e1e2e`,color:e.kind===`month`?`#6c7086`:e.kind===`hour`?`#585b70`:`#45475a`,fontSize:e.kind===`month`?11:10,fontWeight:e.kind===`month`?600:e.kind===`hour`?500:400,whiteSpace:`nowrap`,pointerEvents:`none`,userSelect:`none`},children:[(0,E.jsx)(`span`,{style:{display:`inline-block`,width:e.kind===`month`?16:e.kind===`hour`?6:8,height:1,background:e.kind===`month`?`#585b70`:e.kind===`hour`?`#45475a`:`#313244`,verticalAlign:`middle`,marginRight:4}}),e.text]},e.key))})]}),(0,E.jsx)(`div`,{style:{width:Jt,height:Yt,position:`relative`,zIndex:10},children:(0,E.jsxs)(`div`,{style:{position:`absolute`,top:0,left:0,width:Kt,height:qt,transform:`scale(${k})`,transformOrigin:`top left`},children:[(0,E.jsxs)(`svg`,{width:Kt,height:qt,style:{position:`absolute`,top:0,left:0,pointerEvents:`none`,overflow:`visible`},children:[ot&&(0,E.jsxs)(ks.g,{opacity:Wt?fs(Ee,e=>Z(ot.fromOpacity,ot.toOpacity,e)*.95):ot.toOpacity*.95,children:[(0,E.jsx)(ks.rect,{x:Wt?fs(Ee,e=>Z(ot.fromX,ot.toX,e)):ot.toX,y:0,width:Y,height:qt,rx:18,fill:`${ot.color}10`}),(0,E.jsx)(ks.rect,{x:Wt?fs(Ee,e=>Z(ot.fromX,ot.toX,e)+2):ot.toX+2,y:0,width:Y-4,height:qt,rx:16,fill:`${ot.color}06`})]},ot.key),I&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`path`,{d:I.targetPath,stroke:I.color,strokeWidth:3,fill:`none`,strokeLinecap:`round`,strokeDasharray:`8 6`,opacity:.7}),(0,E.jsx)(`path`,{d:I.sourcePath,stroke:I.color,strokeWidth:2.5,fill:`none`,strokeLinecap:`round`,strokeDasharray:`8 6`,opacity:.55})]}),it.map(e=>(0,E.jsx)(ks.path,{d:Wt?fs(Ee,t=>t>=.999?e.path:X(e,t)):e.path,stroke:e.stroke,strokeWidth:Wt?fs(Ee,t=>Z(e.fromStrokeWidth,e.toStrokeWidth,t)):e.toStrokeWidth,fill:`none`,strokeLinecap:`round`,opacity:Wt?fs(Ee,t=>Z(e.fromOpacity,e.toOpacity,t)):e.toOpacity},e.key)),I&&(0,E.jsxs)(`g`,{children:[(0,E.jsx)(`circle`,{cx:I.previewNode.x,cy:I.previewNode.y,r:J*1.9,fill:I.color,opacity:.12}),(0,E.jsx)(`circle`,{cx:I.previewNode.x,cy:I.previewNode.y,r:J,fill:gu,stroke:I.color,strokeWidth:3,strokeDasharray:`6 4`}),(0,E.jsx)(`circle`,{cx:I.previewNode.x,cy:I.previewNode.y,r:2.5,fill:I.color})]}),rt.map(e=>{let{row:t}=e,n=t.sha===r,i=e.color,a=Su*2,o=Td(t.additions,Ge,a),s=Td(t.deletions,Ge,a),l=`gauge-${t.sha}`,u=`${l}-left`,d=`${l}-right`,f=n?Tu:wu,p=n?Eu:Cu,m=Wt?fs(Ee,t=>Z(e.fromX,e.toX,t)):e.toX,h=Wt?fs(Ee,t=>Z(e.fromY,e.toY,t)):e.toY,g=Wt?fs(Ee,t=>Z(e.fromOpacity,e.toOpacity,t)):e.toOpacity,_=Wt?fs(Ee,t=>Cd(Z(e.fromX,e.toX,t),Z(e.fromY,e.toY,t),Su,`left`)):Cd(e.toX,e.toY,Su,`left`),v=Wt?fs(Ee,t=>Cd(Z(e.fromX,e.toX,t),Z(e.fromY,e.toY,t),Su,`right`)):Cd(e.toX,e.toY,Su,`right`),y=Wt?fs(Ee,t=>wd(Z(e.fromX,e.toX,t),Z(e.fromY,e.toY,t),Su,`left`)):wd(e.toX,e.toY,Su,`left`),b=Wt?fs(Ee,t=>wd(Z(e.fromX,e.toX,t),Z(e.fromY,e.toY,t),Su,`right`)):wd(e.toX,e.toY,Su,`right`);return(0,E.jsxs)(ks.g,{onClick:e.interactive?e=>{e.stopPropagation(),c(t.sha)}:void 0,onPointerEnter:e.interactive?()=>Ue(t.sha):void 0,onPointerLeave:e.interactive?()=>We(t.sha):void 0,opacity:g,style:{cursor:e.interactive?`pointer`:`default`,pointerEvents:e.interactive?`auto`:`none`},children:[(0,E.jsx)(`title`,{children:`${t.subject}\n+${t.additions} / -${t.deletions} (${t.locChanged} LOC changed)`}),n&&(0,E.jsx)(ks.circle,{cx:m,cy:h,r:J*2.5,fill:i,opacity:.15}),(0,E.jsx)(ks.circle,{cx:m,cy:h,r:J,fill:gu,stroke:i,strokeWidth:n?3.5:2.75}),(0,E.jsxs)(`defs`,{children:[(0,E.jsx)(`clipPath`,{id:u,clipPathUnits:`userSpaceOnUse`,children:(0,E.jsx)(ks.path,{d:_})}),(0,E.jsx)(`clipPath`,{id:d,clipPathUnits:`userSpaceOnUse`,children:(0,E.jsx)(ks.path,{d:v})})]}),(0,E.jsx)(ks.path,{d:_,fill:p}),(0,E.jsx)(ks.path,{d:v,fill:p}),o>0&&(0,E.jsx)(ks.rect,{x:Wt?fs(Ee,t=>Z(e.fromX,e.toX,t)-Su):e.toX-Su,y:Wt?fs(Ee,t=>Z(e.fromY,e.toY,t)+Su-o):e.toY+Su-o,width:Su,height:o,fill:Du,clipPath:`url(#${u})`}),s>0&&(0,E.jsx)(ks.rect,{x:m,y:Wt?fs(Ee,t=>Z(e.fromY,e.toY,t)+Su-s):e.toY+Su-s,width:Su,height:s,fill:Ou,clipPath:`url(#${d})`}),(0,E.jsx)(ks.path,{d:y,stroke:f,strokeWidth:1.6,fill:`none`}),(0,E.jsx)(ks.path,{d:b,stroke:f,strokeWidth:1.6,fill:`none`}),(0,E.jsx)(ks.line,{x1:m,y1:Wt?fs(Ee,t=>Z(e.fromY,e.toY,t)-Su):e.toY-Su,x2:m,y2:Wt?fs(Ee,t=>Z(e.fromY,e.toY,t)+Su):e.toY+Su,stroke:f,strokeWidth:1.6}),t.parentShas.length>1&&(0,E.jsx)(ks.circle,{cx:m,cy:h,r:2,fill:i})]},t.sha)}),F&&!Wt&&(0,E.jsxs)(`g`,{onClick:e=>{e.stopPropagation(),ee()},style:{cursor:`pointer`,pointerEvents:`auto`},children:[(0,E.jsx)(`title`,{children:Qt}),F.sourcePath&&(0,E.jsx)(`path`,{d:F.sourcePath,stroke:F.color,strokeWidth:2.25,strokeLinecap:`round`,strokeDasharray:`3 5`,fill:`none`,opacity:.55}),(0,E.jsx)(`path`,{d:F.targetPath,stroke:F.color,strokeWidth:2.5,strokeLinecap:`round`,strokeDasharray:`3 5`,fill:`none`,opacity:.7}),T&&(0,E.jsx)(`circle`,{cx:F.x,cy:F.y,r:J*2.5,fill:F.color,opacity:.15}),(0,E.jsx)(`circle`,{cx:F.x,cy:F.y,r:J,fill:gu,stroke:F.color,strokeWidth:T?3.5:2.75,strokeDasharray:`4 3`}),F.kind===`worktree`?(0,E.jsx)(`text`,{x:F.x,y:F.y,textAnchor:`middle`,dominantBaseline:`central`,fontSize:12,fontWeight:700,fill:F.color,style:{pointerEvents:`none`,userSelect:`none`},children:F.count}):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`circle`,{cx:F.x,cy:F.y,r:2.5,fill:F.color}),F.conflictedCount>0&&(0,E.jsxs)(`g`,{style:{pointerEvents:`none`,userSelect:`none`},children:[(0,E.jsx)(`rect`,{x:F.x+J+6,y:F.y-10,width:Xt,height:20,rx:10,fill:`#fab38722`,stroke:`#fab387`,strokeWidth:1.4}),(0,E.jsx)(`text`,{x:F.x+J+6+Xt/2,y:F.y,textAnchor:`middle`,dominantBaseline:`central`,fontSize:11,fontWeight:800,fill:`#fab387`,children:F.conflictedCount})]})]}),F.labelSide&&(0,E.jsx)(`text`,{x:F.labelSide===`left`?F.x-J-10:F.x+J+10+(F.kind===`worktree`||F.conflictedCount===0?0:Xt+6),y:F.y,textAnchor:F.labelSide===`left`?`end`:`start`,dominantBaseline:`central`,fontSize:12,fontWeight:600,fill:T?F.color:`#a6adc8`,style:{pointerEvents:`none`,userSelect:`none`},children:Zt})]})]}),at.map(e=>{let{placement:t}=e;return(0,E.jsxs)(ks.div,{onClick:e=>gt(e,t.refName),onPointerEnter:()=>Ue(t.nodeSha),onPointerLeave:()=>We(t.nodeSha),style:{position:`absolute`,left:0,top:0,zIndex:20,height:20,padding:`0 7px`,borderRadius:4,background:t.isSelected?t.color+`35`:t.isCurrent?t.color+`2a`:t.color+`18`,border:`1px solid ${t.isSelected||t.isCurrent?t.color:t.color+`55`}`,color:t.color,fontSize:11,fontWeight:600,lineHeight:`20px`,whiteSpace:`nowrap`,cursor:`pointer`,userSelect:`none`,boxShadow:t.isSelected||t.isCurrent?`0 0 6px ${t.color}40`:`none`,transformOrigin:`top left`,opacity:Wt?fs(Ee,t=>Z(e.fromOpacity,e.toOpacity,t)):e.toOpacity,transform:Wt?fs(Ee,t=>`translate(${Z(e.fromX,e.toX,t)}px, ${Z(e.fromY,e.toY,t)}px) scale(${Z(e.fromScale,e.toScale,t)})`):`translate(${e.toX}px, ${e.toY}px) scale(${e.toScale})`},children:[Vd(t.isRemote,t.isCurrent),t.refName]},e.key)}),Ye.map(e=>{let t=$e.get(e.row.sha)??0,n=e.x+J+8+t+(t>0?8:0),a=e.y-10,o=te!==null,s=!o&&e.row.sha===r?Ht:[],c=!!i&&e.row.refNames.includes(i),l=c?dt:[],u=o&&c&&te?l.find(e=>e.action===te.action)??te:null,d=o?u?[u]:[]:l,f=!o&&!!P&&e.row.refNames.includes(P)&&pt,p=!o&&!!ft&&e.row.sha!==N?.targetSha,m=!_&&!o&&!Wt&&(ve===e.row.sha||be===e.row.sha),h=!o&&mt&&e.row.sha!==mt.targetSha?Id(e.row.refNames.filter(e=>e!==mt.shortName)):null;return s.length===0&&d.length===0&&!f&&!p&&!m&&!h?null:(0,E.jsxs)(`div`,{onPointerEnter:()=>Ue(e.row.sha),onPointerLeave:()=>We(e.row.sha),style:{position:`absolute`,left:n,top:a,display:`flex`,alignItems:`flex-start`,gap:10,flexWrap:`nowrap`,zIndex:20},children:[d.length>0&&(0,E.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,position:`relative`,top:Qu(yu),zIndex:7},children:d.map(e=>(0,E.jsx)(au,{label:e.label,tone:e.tone,loading:!!u&&e.action===u.action,onClick:()=>vt(e)},e.action))}),s.length>0&&(0,E.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,position:`relative`,top:Qu(vu),zIndex:7},children:s.map(e=>(0,E.jsx)(iu,{label:e.label,tone:e.tone,onClick:()=>Ut(e.action)},e.action))}),p&&(0,E.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,position:`relative`,zIndex:7},children:(0,E.jsx)(au,{label:`Move`,tone:`neutral`,size:`compact`,variant:`ghost`,onClick:()=>yt(e.row.sha)})}),h&&(0,E.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,position:`relative`,top:Qu(vu),zIndex:7},children:(0,E.jsx)(iu,{label:`Rebase`,tone:`success`,onClick:()=>At(h)})}),f&&(0,E.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,position:`relative`,top:Qu(vu),zIndex:7},children:(0,E.jsx)(iu,{label:`Merge`,tone:`merge`,onClick:kt,onMouseEnter:Et,onMouseLeave:Dt})}),m&&(0,E.jsxs)(`div`,{style:{position:`relative`,top:Qu(bu),zIndex:8},children:[(0,E.jsx)(`button`,{type:`button`,title:`Create branch or tag`,"aria-label":`Create branch or tag`,onClick:t=>{t.stopPropagation(),_e(!1),xe(t=>t===e.row.sha?null:e.row.sha),ye(e.row.sha)},style:{width:bu,height:bu,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,padding:0,borderRadius:6,border:`1px solid #4a4f68`,background:`#2f3348`,color:`#cdd6f4`,fontSize:21,fontWeight:600,lineHeight:1,cursor:`pointer`,fontFamily:`inherit`,boxShadow:`0 8px 20px rgba(0,0,0,0.28)`},onMouseEnter:e=>{e.currentTarget.style.background=`#3a4058`},onMouseLeave:e=>{e.currentTarget.style.background=`#2f3348`},children:`+`}),be===e.row.sha&&(0,E.jsx)(`div`,{onClick:e=>e.stopPropagation(),style:{position:`absolute`,right:0,top:30,width:xu,padding:5,borderRadius:7,border:`1px solid #4a4f68`,background:`#181825`,boxShadow:`0 14px 30px rgba(0,0,0,0.42)`,display:`flex`,flexDirection:`column`,gap:4},children:[`branch`,`tag`].map(t=>(0,E.jsx)(`button`,{type:`button`,onClick:n=>{n.stopPropagation(),bt(t,e.row.sha)},style:{height:28,padding:`0 9px`,borderRadius:5,border:`1px solid transparent`,background:`transparent`,color:`#cdd6f4`,fontSize:12,fontWeight:600,fontFamily:`inherit`,textAlign:`left`,cursor:`pointer`},onMouseEnter:e=>{e.currentTarget.style.background=`#313244`,e.currentTarget.style.borderColor=`#45475a`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`,e.currentTarget.style.borderColor=`transparent`},children:t===`branch`?`Branch`:`Tag`},t))})]})]},`${e.row.sha}-actions`)})]})})]})}var af=56,of=56,sf=12,cf=`#11111b`,lf=56,uf=80,df=110,ff=150,pf=28,mf=640,hf=[`#89b4fa`,`#a6e3a1`,`#f9e2af`,`#f38ba8`,`#cba6f7`,`#94e2d5`,`#fab387`,`#74c7ec`,`#f5c2e7`,`#b4befe`];function gf(e){return hf[(e%hf.length+hf.length)%hf.length]}var _f=`#f9e2af`,vf={commit:`#a6e3a1`,amend:`#f9e2af`,checkout:`#89b4fa`,reset:`#f38ba8`,rebase:`#fab387`,merge:`#cba6f7`,"cherry-pick":`#94e2d5`,revert:`#f5c2e7`,pull:`#74c7ec`,branch:`#b4befe`,clone:`#9399b2`,other:`#9399b2`},yf=new Set([`reset`,`rebase`,`amend`]),bf={reset:`reset moved HEAD away — commits only on the old position may be unreachable`,rebase:`rebase rewrote history — the original commits live on only in the reflog`,amend:`amend replaced the previous commit — the original version is only in the reflog`};function xf(e,t,n,r){if(e===n)return`M${e},${t}L${n},${r}`;let i=r-t;return`M${e},${t}C${e},${t+i*.3} ${n},${r-i*.3} ${n},${r}`}function Sf(e){let t=new Map;e.forEach((e,n)=>t.set(e.sha,n));let n=new Map,r=[],i=[],a=0;for(let o=0;o<e.length;o++){let s=e[o],c=n.get(s.sha);c===void 0&&(c=r.indexOf(null),c===-1?(c=r.length,r.push(s.sha)):r[c]=s.sha,n.set(s.sha,c)),i.push(c),c>a&&(a=c),t.get(s.sha)===o&&(r[c]=null)}return{lanes:i,maxLane:a}}function Cf(e){if(!e)return``;let t=Math.floor(Date.now()/1e3-e);if(t<60)return`just now`;if(t<3600)return`${Math.floor(t/60)}m ago`;if(t<86400)return`${Math.floor(t/3600)}h ago`;if(t<172800)return`yesterday`;if(t<14*86400)return`${Math.floor(t/86400)}d ago`;let n=new Date(e*1e3),r=n.toLocaleDateString(void 0,{month:`short`,day:`numeric`});return n.getFullYear()===new Date().getFullYear()?r:`${r} ${n.getFullYear()}`}function wf(){let e=R(e=>e.reflog),t=R(e=>e.reflogLoading),n=R(e=>e.reflogMaxCount),r=R(e=>e.selectedSha),i=R(e=>e.selectCommit),a=R(e=>e.recoverBranch),o=R(e=>e.checkoutSha),s=R(e=>e.performCommitAction),c=R(e=>e.loadMoreReflog),l=R(e=>e.showError),[u,d]=(0,x.useState)(null),[f,p]=(0,x.useState)(null),[m,h]=(0,x.useState)(null);(0,x.useEffect)(()=>{d(null)},[e]);let g=e?.entries??[],{lanes:_,maxLane:v}=(0,x.useMemo)(()=>Sf(g),[g]),y=(0,x.useMemo)(()=>{let e=new Set;for(let t of g)t.isReachable||e.add(t.sha);return e},[g]),b=e=>ff+e*of,S=e=>lf+e*af,C=ff+(v+1)*of+pf,w=C+mf,T=lf+g.length*af+uf,ee=(0,x.useMemo)(()=>{let e=``;return g.map(t=>{let n=Cf(t.entryUnix);return n===e?``:(e=n,n)})},[g]),te=e=>{p({entry:e,defaultName:`recovered-${e.sha.slice(0,7)}`})},ne=e=>{h({title:`Checkout commit`,message:`Checkout ${e.sha.slice(0,8)}? This detaches HEAD at that state.`,confirmLabel:`Checkout`,onConfirm:()=>{o(e.sha).catch(e=>l(`Checkout failed`,e))}})},re=e=>{h({title:`Cherry pick commit`,message:`Cherry-pick ${e.sha.slice(0,8)} onto the current branch?`,confirmLabel:`Cherry pick`,onConfirm:()=>{s(`cherry-pick`,e.sha).catch(e=>l(`Cherry-pick failed`,e))}})},ie=e=>{if(!f)return;let{entry:t}=f;p(null),a(e,t.sha).catch(e=>l(`Recover failed`,e))},ae=e=>{navigator.clipboard?.writeText(e.sha)};return!e&&t?(0,E.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#6c7086`,fontSize:13},children:`Reading reflog…`}):g.length===0?(0,E.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#45475a`,fontSize:13},children:`No reflog entries — this repository has no recorded HEAD movements yet`}):(0,E.jsxs)(`div`,{style:{flex:1,height:`100%`,overflow:`auto`,position:`relative`,background:`#1e1e2e`},onClick:()=>d(null),children:[(0,E.jsx)(du,{open:!!f,title:f?`Create branch at ${f.entry.sha.slice(0,8)}`:`Create branch`,label:`Branch name`,initialValue:f?.defaultName??``,confirmLabel:`Create`,onSubmit:ie,onClose:()=>p(null)}),(0,E.jsx)(fu,{open:!!m,title:m?.title??``,message:m?.message??``,confirmLabel:m?.confirmLabel??`Confirm`,onConfirm:()=>{let e=m?.onConfirm;h(null),e?.()},onClose:()=>h(null)}),y.size>0&&(0,E.jsxs)(`div`,{style:{position:`sticky`,top:0,zIndex:30,margin:`10px 14px 0`,padding:`8px 14px`,borderRadius:6,background:`#f9e2af18`,border:`1px solid ${_f}55`,color:_f,fontSize:12,display:`flex`,alignItems:`center`,gap:8},children:[(0,E.jsx)(`span`,{style:{fontSize:14},children:`⚠`}),(0,E.jsxs)(`span`,{children:[y.size===1?`1 commit in your reflog is no longer reachable from any branch.`:`${y.size} commits in your reflog are no longer reachable from any branch.`,` `,`Select a dashed entry below to recover it.`]})]}),(0,E.jsxs)(`div`,{style:{width:w,height:T,position:`relative`},children:[(0,E.jsxs)(`div`,{style:{position:`absolute`,left:150-sf,top:16,color:`#585b70`,fontSize:11,whiteSpace:`nowrap`,userSelect:`none`},children:[e?.refName??`HEAD`,` time machine — every state HEAD has pointed to, newest first`]}),(0,E.jsxs)(`svg`,{width:w,height:T,style:{position:`absolute`,top:0,left:0,pointerEvents:`none`,overflow:`visible`},children:[g.slice(0,-1).map((e,t)=>{let n=b(_[t]),r=S(t);return(0,E.jsx)(`path`,{d:xf(b(_[t+1]),S(t+1),n,r),stroke:gf(_[t]),strokeWidth:2.25,fill:`none`,strokeLinecap:`round`,opacity:.85},`edge-${t}`)}),g.map((e,t)=>{let n=b(_[t]),a=S(t),o=gf(_[t]),s=u===t||u===null&&e.sha===r,c=!e.isReachable;return(0,E.jsxs)(`g`,{onClick:n=>{n.stopPropagation(),d(t),i(e.sha)},style:{cursor:`pointer`,pointerEvents:`auto`},children:[(0,E.jsx)(`title`,{children:`${e.selector} — ${e.message}`}),s&&(0,E.jsx)(`circle`,{cx:n,cy:a,r:sf*2.3,fill:o,opacity:.15}),c&&(0,E.jsx)(`circle`,{cx:n,cy:a,r:17,fill:`none`,stroke:_f,strokeWidth:1.5,strokeDasharray:`4 3`,opacity:.9}),(0,E.jsx)(`circle`,{cx:n,cy:a,r:sf,fill:cf,stroke:o,strokeWidth:s?3:2.25}),t===0&&(0,E.jsx)(`circle`,{cx:n,cy:a,r:3,fill:o})]},`node-${t}`)})]}),g.map((e,t)=>{let n=S(t);return ee[t]?(0,E.jsx)(`div`,{style:{position:`absolute`,left:0,top:n-7,width:df,textAlign:`right`,color:`#585b70`,fontSize:11,whiteSpace:`nowrap`,pointerEvents:`none`,userSelect:`none`},children:ee[t]},`time-${t}`):null}),g.map((e,t)=>{let n=S(t),r=u===t,a=!e.isReachable,o=vf[e.kind],s=yf.has(e.kind),c=bf[e.kind];return(0,E.jsxs)(`div`,{onClick:n=>{n.stopPropagation(),d(t),i(e.sha)},style:{position:`absolute`,left:C,top:n-10,cursor:`pointer`},children:[(0,E.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,height:20,whiteSpace:`nowrap`},children:[(0,E.jsxs)(`span`,{title:c??e.message,style:{height:18,padding:`0 8px`,borderRadius:4,background:o+`20`,border:`1px solid ${o}55`,color:o,fontSize:10,fontWeight:700,lineHeight:`18px`,textTransform:`uppercase`,letterSpacing:.4},children:[s?`⚠ `:``,e.kind]}),a&&(0,E.jsx)(`span`,{title:`Not reachable from any branch — only the reflog still knows this commit`,style:{height:18,padding:`0 8px`,borderRadius:4,background:`#f9e2af20`,border:`1px solid ${_f}`,color:_f,fontSize:10,fontWeight:700,lineHeight:`18px`},children:`LOST`}),e.refNames.slice(0,3).map(e=>(0,E.jsx)(`span`,{style:{height:18,padding:`0 7px`,borderRadius:4,background:`#89b4fa18`,border:`1px solid #89b4fa55`,color:`#89b4fa`,fontSize:10,fontWeight:600,lineHeight:`18px`},children:e},e)),(0,E.jsx)(`span`,{style:{color:`#6c7086`,fontSize:11,fontFamily:`monospace`},children:e.sha.slice(0,7)}),(0,E.jsx)(`span`,{style:{color:`#a6adc8`,fontSize:12,overflow:`hidden`,textOverflow:`ellipsis`,maxWidth:360},children:e.subject})]}),r?(0,E.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginTop:4},children:[a?(0,E.jsx)(iu,{label:`Recover branch`,tone:`success`,onClick:()=>te(e)}):(0,E.jsx)(au,{label:`Branch here`,tone:`neutral`,size:`compact`,onClick:()=>te(e)}),(0,E.jsx)(au,{label:`Checkout`,tone:`warning`,size:`compact`,onClick:()=>ne(e)}),(0,E.jsx)(au,{label:`Cherry-pick`,tone:`neutral`,size:`compact`,onClick:()=>re(e)}),(0,E.jsx)(au,{label:`Copy sha`,tone:`neutral`,size:`compact`,variant:`ghost`,onClick:()=>ae(e)})]}):(0,E.jsx)(`div`,{style:{marginTop:4,color:`#6c7086`,fontSize:10,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,maxWidth:mf-40},children:e.message})]},`row-${t}`)}),g.length>=n&&(0,E.jsx)(`div`,{style:{position:`absolute`,left:C,top:S(g.length)+4},children:(0,E.jsx)(au,{label:t?`Loading…`:`Load older entries`,tone:`neutral`,size:`compact`,variant:`ghost`,onClick:()=>{c()}})})]})]})}var Tf=Object.defineProperty,Ef=e=>t=>{var n=e[t];if(n)return n();throw Error(`Module not found in bundle: `+t)},Q=(e,t)=>()=>(e&&(t=e(e=0)),t),$=(e,t)=>{for(var n in t)Tf(e,n,{get:t[n],enumerable:!0})},Df={};$(Df,{default:()=>Of});var Of,kf=Q(()=>{Of=[{type:`cmnt`,match:/(;|#).*/gm},{expand:`str`},{expand:`num`},{type:`num`,match:/\$[\da-fA-F]*\b/g},{type:`kwd`,match:/^[a-z]+\s+[a-z.]+\b/gm,sub:[{type:`func`,match:/^[a-z]+/g}]},{type:`kwd`,match:/^\t*[a-z][a-z\d]*\b/gm},{match:/%|\$/g,type:`oper`}]}),Af={};$(Af,{default:()=>Mf});var jf,Mf,Nf=Q(()=>{jf={type:`var`,match:/\$\w+|\${[^}]*}|\$\([^)]*\)/g},Mf=[{sub:`todo`,match:/#.*/g},{type:`str`,match:/(["'])((?!\1)[^\r\n\\]|\\[^])*\1?/g,sub:[jf]},{type:`oper`,match:/(?<=\s|^)\.*\/[a-z/_.-]+/gi},{type:`kwd`,match:/\s-[a-zA-Z]+|$<|[&|;]+|\b(unset|readonly|shift|export|if|fi|else|elif|while|do|done|for|until|case|esac|break|continue|exit|return|trap|wait|eval|exec|then|declare|enable|local|select|typeset|time|add|remove|install|update|delete)(?=\s|$)/g},{expand:`num`},{type:`func`,match:/(?<=(^|\||\&\&|\;)\s*)[a-z_.-]+(?=\s|$)/gim},{type:`bool`,match:/(?<=\s|^)(true|false)(?=\s|$)/g},{type:`oper`,match:/[=(){}<>!]+/g},{type:`var`,match:/(?<=\s|^)[\w_]+(?=\s*=)/g},jf]}),Pf={};$(Pf,{default:()=>Ff});var Ff,If=Q(()=>{Ff=[{match:/[^\[\->+.<\]\s].*/g,sub:`todo`},{type:`func`,match:/\.+/g},{type:`kwd`,match:/[<>]+/g},{type:`oper`,match:/[+-]+/g}]}),Lf={};$(Lf,{default:()=>Rf});var Rf,zf=Q(()=>{Rf=[{match:/\/\/.*\n?|\/\*((?!\*\/)[^])*(\*\/)?/g,sub:`todo`},{expand:`str`},{expand:`num`},{type:`kwd`,match:/#\s*include (<.*>|".*")/g,sub:[{type:`str`,match:/(<|").*/g}]},{match:/asm\s*{[^}]*}/g,sub:[{type:`kwd`,match:/^asm/g},{match:/[^{}]*(?=}$)/g,sub:`asm`}]},{type:`kwd`,match:/\*|&|#[a-z]+\b|\b(asm|auto|double|int|struct|break|else|long|switch|case|enum|register|typedef|char|extern|return|union|const|float|short|unsigned|continue|for|signed|void|default|goto|sizeof|volatile|do|if|static|while)\b/g},{type:`oper`,match:/[/*+:?&|%^~=!,<>.^-]+/g},{type:`func`,match:/[a-zA-Z_][\w_]*(?=\s*\()/g},{type:`class`,match:/\b[A-Z][\w_]*\b/g}]}),Bf={};$(Bf,{default:()=>Vf});var Vf,Hf=Q(()=>{Vf=[{match:/\/\*((?!\*\/)[^])*(\*\/)?/g,sub:`todo`},{expand:`str`},{type:`kwd`,match:/@\w+\b|\b(and|not|only|or)\b|\b[a-z-]+(?=[^{}]*{)/g},{type:`var`,match:/\b[\w-]+(?=\s*:)|(::?|\.)[\w-]+(?=[^{}]*{)/g},{type:`func`,match:/#[\w-]+(?=[^{}]*{)/g},{type:`num`,match:/#[\da-f]{3,8}/g},{type:`num`,match:/\d+(\.\d+)?(cm|mm|in|px|pt|pc|em|ex|ch|rem|vm|vh|vmin|vmax|%)?/g,sub:[{type:`var`,match:/[a-z]+|%/g}]},{match:/url\([^)]*\)/g,sub:[{type:`func`,match:/url(?=\()/g},{type:`str`,match:/[^()]+/g}]},{type:`func`,match:/\b[a-zA-Z]\w*(?=\s*\()/g},{type:`num`,match:/\b[a-z-]+\b/g}]}),Uf={};$(Uf,{default:()=>Wf});var Wf,Gf=Q(()=>{Wf=[{expand:`strDouble`},{type:`oper`,match:/,/g}]}),Kf={};$(Kf,{default:()=>qf});var qf,Jf=Q(()=>{qf=[{type:`deleted`,match:/^[-<].*/gm},{type:`insert`,match:/^[+>].*/gm},{type:`kwd`,match:/!.*/gm},{type:`section`,match:/^@@.*@@$|^\d.*|^([*-+])\1\1.*/gm}]}),Yf={};$(Yf,{default:()=>Xf});var Xf,Zf=Q(()=>{Nf(),Xf=[{type:`kwd`,match:/^(FROM|RUN|CMD|LABEL|MAINTAINER|EXPOSE|ENV|ADD|COPY|ENTRYPOINT|VOLUME|USER|WORKDIR|ARG|ONBUILD|STOPSIGNAL|HEALTHCHECK|SHELL)\b/gim},...Mf]}),Qf={};$(Qf,{default:()=>$f});var $f,ep=Q(()=>{Jf(),$f=[{match:/^#.*/gm,sub:`todo`},{expand:`str`},...qf,{type:`func`,match:/^(\$ )?git(\s.*)?$/gm},{type:`kwd`,match:/^commit \w+$/gm}]}),tp={};$(tp,{default:()=>np});var np,rp=Q(()=>{np=[{match:/\/\/.*\n?|\/\*((?!\*\/)[^])*(\*\/)?/g,sub:`todo`},{expand:`str`},{expand:`num`},{type:`kwd`,match:/\*|&|\b(break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go|goto|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/g},{type:`func`,match:/[a-zA-Z_][\w_]*(?=\s*\()/g},{type:`class`,match:/\b[A-Z][\w_]*\b/g},{type:`oper`,match:/[+\-*\/%&|^~=!<>.^-]+/g}]}),ip={};$(ip,{default:()=>up,name:()=>sp,properties:()=>cp,xmlElement:()=>lp});var ap,op,sp,cp,lp,up,dp=Q(()=>{ap=`:A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�`,op=ap+`\\-\\.0-9·̀-ͯ‿-⁀`,sp=`[${ap}][${op}]*`,cp=`\\s*(\\s+${sp}\\s*(=\\s*([^"']\\S*|("|')(\\\\[^]|(?!\\4)[^])*\\4?)?)?\\s*)*`,lp={match:RegExp(`<[/!?]?${sp}${cp}[/!?]?>`,`g`),sub:[{type:`var`,match:RegExp(`^<[/!?]?${sp}`,`g`),sub:[{type:`oper`,match:/^<[\/!?]?/g}]},{type:`str`,match:/=\s*([^"']\S*|("|')(\\[^]|(?!\2)[^])*\2?)/g,sub:[{type:`oper`,match:/^=/g}]},{type:`oper`,match:/[\/!?]?>/g},{type:`class`,match:RegExp(sp,`g`)}]},up=[{match:/<!--[^]*?-->/g,sub:`todo`},{type:`class`,match:/<!\[CDATA\[[\s\S]*?\]\]>/gi},lp,{type:`str`,match:RegExp(`<\\?${sp}([^?]|\\?[^?>])*\\?+>`,`g`),sub:[{type:`var`,match:RegExp(`^<\\?${sp}`,`g`),sub:[{type:`oper`,match:/^<\?/g}]},{type:`oper`,match:/\?+>$/g}]},{type:`var`,match:/&(#x?)?[\da-z]{1,8};/gi}]}),fp={};$(fp,{default:()=>pp});var pp,mp=Q(()=>{dp(),pp=[{type:`class`,match:/<!DOCTYPE("[^"]*"|'[^']*'|[^"'>])*>/gi,sub:[{type:`str`,match:/"[^"]*"|'[^']*'/g},{type:`oper`,match:/^<!|>$/g},{type:`var`,match:/DOCTYPE/gi}]},{match:RegExp(`<style${cp}>[^]*?</style\\s*>`,`g`),sub:[{match:RegExp(`^<style${cp}>`,`g`),sub:lp.sub},{match:RegExp(`${lp.match}|[^]*(?=</style\\s*>$)`,`g`),sub:`css`},lp]},{match:RegExp(`<script${cp}>[^]*?<\/script\\s*>`,`g`),sub:[{match:RegExp(`^<script${cp}>`,`g`),sub:lp.sub},{match:RegExp(`${lp.match}|[^]*(?=<\/script\\s*>$)`,`g`),sub:`js`},lp]},...up]}),hp,gp,_p=Q(()=>{hp=[[`bash`,[/#!(\/usr)?\/bin\/bash/g,500],[/\b(if|elif|then|fi|echo)\b|\$/g,10]],[`html`,[/<\/?[a-z-]+[^\n>]*>/g,10],[/^\s+<!DOCTYPE\s+html/g,500]],[`http`,[/^(GET|HEAD|POST|PUT|DELETE|PATCH|HTTP)\b/g,500]],[`js`,[/\b(console|await|async|function|export|import|this|class|for|let|const|map|join|require|document|window)\b/g,10]],[`ts`,[/\b(console|await|async|function|export|import|this|class|for|let|const|map|join|require|document|window|implements|interface|namespace)\b/g,10]],[`py`,[/\b(def|print|await|async|class|and|or|lambda|import|from|self|asyncio|pass|True|False|None|__init__)\b/g,10]],[`sql`,[/\b(SELECT|INSERT|FROM)\b/g,50]],[`pl`,[/#!(\/usr)?\/bin\/perl/g,500],[/\b(use|print)\b|\$/g,10]],[`lua`,[/#!(\/usr)?\/bin\/lua/g,500]],[`make`,[/\b(ifneq|endif|if|elif|then|fi|echo|.PHONY|^[a-z]+ ?:$)\b|\$/gm,10]],[`uri`,[/https?:|mailto:|tel:|ftp:/g,30]],[`css`,[/^(@import|@page|@media|(\.|#)[a-z]+)/gm,20]],[`diff`,[/^[+><-]/gm,10],[/^@@ ?[-+,0-9 ]+ ?@@/gm,25]],[`md`,[/^(>|\t\*|\t\d+.)/gm,10],[/\[.*\](.*)/g,10]],[`docker`,[/^(FROM|ENTRYPOINT|RUN)/gm,500]],[`xml`,[/<\/?[a-z-]+[^\n>]*>/g,10],[/^<\?xml/g,500]],[`c`,[/#include\b|\bprintf\s+\(/g,100]],[`rs`,[/^\s+(use|fn|mut|match)\b/gm,100]],[`go`,[/\b(func|fmt|package)\b/g,100]],[`java`,[/^import\s+java/gm,500]],[`asm`,[/^(section|global main|extern|\t(call|mov|ret))/gm,100]],[`css`,[/^(@import|@page|@media|(\.|#)[a-z]+)/gm,20]],[`json`,[/\b(true|false|null|\{})\b|\"[^"]+\":/g,10]],[`yaml`,[/^(\s+)?[a-z][a-z0-9]*:/gim,10]]],gp=e=>hp.map(([t,...n])=>[t,n.reduce((t,[n,r])=>t+[...e.matchAll(n)].length*r,0)]).filter(([e,t])=>t>20).sort((e,t)=>t[1]-e[1])[0]?.[0]||`plain`}),vp={};$(vp,{default:()=>yp});var yp,bp=Q(()=>{_p(),yp=[{type:`kwd`,match:/^(GET|HEAD|POST|PUT|DELETE|CONNECT|OPTIONS|TRACE|PATCH|PRI|SEARCH)\b/gm},{expand:`str`},{type:`section`,match:/\bHTTP\/[\d.]+\b/g},{expand:`num`},{type:`oper`,match:/[,;:=]/g},{type:`var`,match:/[a-zA-Z][\w-]*(?=:)/g},{match:/\n\n[^]*/g,sub:gp}]}),xp={};$(xp,{default:()=>Sp});var Sp,Cp=Q(()=>{Sp=[{match:/(^[ \f\t\v]*)[#;].*/gm,sub:`todo`},{type:`var`,match:/.*(?==)/g},{type:`section`,match:/^\s*\[.+\]\s*$/gm},{type:`oper`,match:/=/g},{type:`str`,match:/.*/g}]}),wp={};$(wp,{default:()=>Tp});var Tp,Ep=Q(()=>{Tp=[{match:/\/\/.*\n?|\/\*((?!\*\/)[^])*(\*\/)?/g,sub:`todo`},{expand:`str`},{expand:`num`},{type:`kwd`,match:/\b(abstract|assert|boolean|break|byte|case|catch|char|class|continue|const|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|package|private|protected|public|requires|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|transient|try|var|void|volatile|while)\b/g},{type:`oper`,match:/[/*+:?&|%^~=!,<>.^-]+/g},{type:`func`,match:/[a-zA-Z_][\w_]*(?=\s*\()/g},{type:`class`,match:/\b[A-Z][\w_]*\b/g}]}),Dp={};$(Dp,{default:()=>Op});var Op,kp=Q(()=>{Op=[{match:/(("|')([^\r\n\\]|\\[^])*?\2|[a-zA-Z]\w*)(?=\s*:)/g},{match:/\/\*\*((?!\*\/)[^])*(\*\/)?/g,sub:`jsdoc`},{match:/\/\/.*\n?|\/\*((?!\*\/)[^])*(\*\/)?/g,sub:`todo`},{expand:`str`},{match:/`((?!`)[^]|\\[^])*`?/g,sub:`js_template_literals`},{type:`kwd`,match:/=>|\b(this|set|get|as|async|await|break|case|catch|class|const|constructor|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|if|implements|import|in|instanceof|interface|let|var|of|new|package|private|protected|public|return|static|super|switch|throw|throws|try|typeof|void|while|with|yield)\b/g},{match:/\/((?!\/)[^\r\n\\]|\\.)+\/[dgimsuy]*/g,sub:`regex`},{expand:`num`},{type:`num`,match:/\b(NaN|null|undefined|[A-Z][A-Z_]*)\b/g},{type:`bool`,match:/\b(true|false)\b/g},{type:`oper`,match:/[/*+:?&|%^~=!,<>.^-]+/g},{type:`class`,match:/\b[A-Z][\w_]*\b/g},{type:`func`,match:/[a-zA-Z$_][\w$_]*(?=\s*((\?\.)?\s*\(|=\s*(\(?[\w,{}\[\])]+\)? =>|function\b)))/g}]}),Ap={};$(Ap,{default:()=>jp,type:()=>Mp});var jp,Mp,Np=Q(()=>{jp=[{match:new class{exec(e){let t=this.lastIndex,n,r=n=>{for(;++t<e.length-2;)if(e[t]==`{`)r();else if(e[t]==`}`)return};for(;t<e.length;++t)if(e[t-1]!=`\\`&&e[t]==`$`&&e[t+1]==`{`)return n=t++,r(t),this.lastIndex=t+1,{index:n,0:e.slice(n,t+1)};return null}},sub:[{type:`kwd`,match:/^\${|}$/g},{match:/(?!^\$|{)[^]+(?=}$)/g,sub:`js`}]}],Mp=`str`}),Pp={};$(Pp,{default:()=>Fp,type:()=>Ip});var Fp,Ip,Lp=Q(()=>{Fp=[{type:`err`,match:/\b(TODO|FIXME|DEBUG|OPTIMIZE|WARNING|XXX|BUG)\b/g},{type:`class`,match:/\bIDEA\b/g},{type:`insert`,match:/\b(CHANGED|FIX|CHANGE)\b/g},{type:`oper`,match:/\bQUESTION\b/g}],Ip=`cmnt`}),Rp={};$(Rp,{default:()=>zp,type:()=>Bp});var zp,Bp,Vp=Q(()=>{Lp(),zp=[{type:`kwd`,match:/@\w+/g},{type:`class`,match:/{[\w\s|<>,.@\[\]]+}/g},{type:`var`,match:/\[[\w\s="']+\]/g},...Fp],Bp=`cmnt`}),Hp={};$(Hp,{default:()=>Up});var Up,Wp=Q(()=>{Up=[{type:`var`,match:/(("|')([^\r\n\\]|\\[^])*?\2|[a-zA-Z]\w*)(?=\s*:)/g},{expand:`str`},{expand:`num`},{type:`num`,match:/\bnull\b/g},{type:`bool`,match:/\b(true|false)\b/g}]}),Gp={};$(Gp,{default:()=>Kp});var Kp,qp=Q(()=>{_p(),Kp=[{type:`cmnt`,match:/^>.*|(=|-)\1+/gm},{type:`class`,match:/\*\*.*?\*\*/g},{match:/^(`{3,})(.*)\n[^]*?^\1[ \t]*$/gm,sub:e=>({type:`kwd`,sub:[{match:/\n[^]*(?=```)/g,sub:e.split(`
package/client/index.html CHANGED
@@ -19,7 +19,7 @@
19
19
  ::-webkit-scrollbar-thumb:hover { background: #585b70; }
20
20
  ::-webkit-scrollbar-corner { background: transparent; }
21
21
  </style>
22
- <script type="module" crossorigin src="/assets/index-ChQnVA9h.js"></script>
22
+ <script type="module" crossorigin src="/assets/index-DhcufkVd.js"></script>
23
23
  </head>
24
24
  <body>
25
25
  <div id="root"></div>
package/ingit CHANGED
Binary file
package/libziggit.dylib CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ingit/cli-darwin-x64",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "ingit prebuilt binary for darwin-x64",
5
5
  "os": [
6
6
  "darwin"