turbollm 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -12
- package/dist/webdist/assets/{ChatScreen-DwW1RFdb.js → ChatScreen-Omj31-b1.js} +1 -1
- package/dist/webdist/assets/{CustomizeScreen-DSE61GGl.js → CustomizeScreen-3-JeggEQ.js} +1 -1
- package/dist/webdist/assets/{DeveloperScreen-BYGLUEKp.js → DeveloperScreen-DPF-V0iQ.js} +1 -1
- package/dist/webdist/assets/{EnginesScreen-D1fV7OUs.js → EnginesScreen-DOuhRgoB.js} +2 -2
- package/dist/webdist/assets/{ModelDetailDialog-DOWC_r7x.js → ModelDetailDialog-DEvT_TCN.js} +1 -1
- package/dist/webdist/assets/{ModelDirs-BnEgYeD7.js → ModelDirs-BanIGLNL.js} +1 -1
- package/dist/webdist/assets/{ModelsScreen-CsIWlTix.js → ModelsScreen-BCkhr-NC.js} +1 -1
- package/dist/webdist/assets/{SettingsScreen-BsoeEYxo.js → SettingsScreen-LM-OXnFu.js} +1 -1
- package/dist/webdist/assets/check-CyrGNFl1.js +1 -0
- package/dist/webdist/assets/{circle-x-BMU1-bqZ.js → circle-x-nn8GPW_0.js} +1 -1
- package/dist/webdist/assets/{common-CsaPxOo6.js → common-BbPYnoqq.js} +1 -1
- package/dist/webdist/assets/{copy-button-VN55eluX.js → copy-button-BKEOGElI.js} +1 -1
- package/dist/webdist/assets/{dialog-oym6ZR4Z.js → dialog-DRRtzXcR.js} +1 -1
- package/dist/webdist/assets/{index-DdsLEQg8.js → index-iQ0Xd3d6.js} +2 -2
- package/dist/webdist/assets/{pencil-BUeTGZ2m.js → pencil-yXapP66e.js} +1 -1
- package/dist/webdist/assets/{personas-B44JP8XF.js → personas-Ch12R3nU.js} +1 -1
- package/dist/webdist/assets/{plus-B4N6E4A9.js → plus-CwldxWKW.js} +1 -1
- package/dist/webdist/assets/{refresh-cw-35eljdhP.js → refresh-cw-Bii-Kx0A.js} +1 -1
- package/dist/webdist/assets/{save-AXon2pXP.js → save-B6QW1US8.js} +1 -1
- package/dist/webdist/assets/{skeleton-BqBFt4sB.js → skeleton-BBR-OXdB.js} +1 -1
- package/dist/webdist/assets/{sparkles-C1EIsU4T.js → sparkles-B5zw8rOc.js} +1 -1
- package/dist/webdist/assets/{trash-2-BOZ6n1d2.js → trash-2-Cvm2LlD0.js} +1 -1
- package/dist/webdist/index.html +1 -1
- package/package.json +4 -4
- package/dist/webdist/assets/check-BEcwngnz.js +0 -1
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="https://raw.githubusercontent.com/mohitsoni48/
|
|
2
|
+
<img src="https://raw.githubusercontent.com/mohitsoni48/TurboLLM/main/turbollm/web/public/brand/turbollm-icon-512.jpeg?v=2" width="92" height="92" alt="TurboLLM" />
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<h1 align="center">TurboLLM</h1>
|
|
@@ -30,7 +30,7 @@ API any tool can talk to. TurboLLM is the **performance & bleeding-edge layer fo
|
|
|
30
30
|
LLMs** — built for people who today hand-compile forks and hunt forums for the right flags.
|
|
31
31
|
|
|
32
32
|
<p align="center">
|
|
33
|
-
<img src="https://raw.githubusercontent.com/mohitsoni48/
|
|
33
|
+
<img src="https://raw.githubusercontent.com/mohitsoni48/TurboLLM/main/assets/how-it-works.svg?v=2" width="860" alt="How TurboLLM works: clients -> one lightweight daemon -> any engine on your GPU" />
|
|
34
34
|
</p>
|
|
35
35
|
|
|
36
36
|
---
|
|
@@ -404,21 +404,27 @@ your machine.
|
|
|
404
404
|
|
|
405
405
|
## How TurboLLM compares
|
|
406
406
|
|
|
407
|
-
Focused on the differences that matter — all four are good tools.
|
|
407
|
+
Focused on the differences that matter — all four are good tools, and the others move fast.
|
|
408
|
+
Marks reflect mid-2026; verify the moving rows against each tool's current docs.
|
|
408
409
|
|
|
409
410
|
| | **TurboLLM** | LM Studio | Ollama | Open WebUI |
|
|
410
411
|
|---|:---:|:---:|:---:|:---:|
|
|
411
|
-
| Run **any engine / community forks** | ✅ | ❌
|
|
412
|
-
| **
|
|
413
|
-
| **Measured** t/s in the model list | ✅ | ◐ | ◐ | ❌ |
|
|
414
|
-
| **Anthropic** API (
|
|
412
|
+
| Run **any engine / community forks** | ✅ | ❌ llama.cpp/MLX only | ❌ hidden | ❌ frontend |
|
|
413
|
+
| **Benchmark-based auto-tune** of launch flags | ✅ | ◐ basic offload | ◐ basic offload | ❌ |
|
|
414
|
+
| **Measured** t/s in the model list | ✅ | ◐ per-run | ◐ `--verbose` | ❌ |
|
|
415
|
+
| **Anthropic** API (`/v1/messages`) → Claude Code | ✅ | ✅ 0.4.1+ | ✅ v0.14+ | ❌ |
|
|
415
416
|
| OpenAI-compatible API | ✅ | ✅ | ✅ | ◐ proxy |
|
|
416
|
-
|
|
|
417
|
-
| Use existing model folders (no re-download) | ✅ | ◐ |
|
|
418
|
-
| Speculative decoding (
|
|
417
|
+
| Auto-load the requested model / multi-model pool | ✅ | ✅ JIT | ✅ | ❌ |
|
|
418
|
+
| Use existing model folders (no re-download) | ✅ | ◐ import | ◐ import | ❌ frontend |
|
|
419
|
+
| Speculative decoding (draft / MTP) | ✅ | ✅ | ◐ env flag | ❌ |
|
|
419
420
|
| Web UI from any LAN device | ✅ | ❌ | ❌ | ✅ |
|
|
420
421
|
| **Lightweight** (no Electron / no Python) | ✅ npm | ❌ Electron | ✅ Go | ❌ Python |
|
|
421
|
-
| Offline-first · no telemetry | ✅ | ◐ | ✅ | ✅ |
|
|
422
|
+
| Offline-first · **no telemetry** | ✅ | ◐ analytics on by default | ✅ | ✅ |
|
|
423
|
+
|
|
424
|
+
LM Studio and Ollama both added Anthropic `/v1/messages` endpoints in 2026, so the API rows are
|
|
425
|
+
now parity — Claude Code works against any of them. TurboLLM's durable edges are **any engine
|
|
426
|
+
including community forks**, **benchmark-based auto-tuning with a VRAM-fit verdict + measured t/s
|
|
427
|
+
before you commit**, and **zero telemetry**.
|
|
422
428
|
|
|
423
429
|
Prefer Open WebUI's chat breadth? It works great pointed at TurboLLM's OpenAI endpoint.
|
|
424
430
|
|
|
@@ -463,6 +469,6 @@ shadcn/ui frontend. One TypeScript codebase, shipped as an npm package.
|
|
|
463
469
|
Source-available under the **Functional Source License 1.1 (Apache-2.0 future grant)** — SPDX
|
|
464
470
|
**`FSL-1.1-ALv2`**. Free for personal use, internal business use, education, and research; the
|
|
465
471
|
only restriction is shipping a competing product. Each release converts to Apache-2.0 two
|
|
466
|
-
years after it's published. Full text: [LICENSE.md](https://github.com/mohitsoni48/
|
|
472
|
+
years after it's published. Full text: [LICENSE.md](https://github.com/mohitsoni48/TurboLLM/blob/main/turbollm/LICENSE.md).
|
|
467
473
|
|
|
468
474
|
<p align="center"><sub>Built for people who refuse to wait for the mainstream to bless the fast path. ⚡</sub></p>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as g}from"./radix-BFvMxQq9.js";import{j as Cr,r as X,k as os,l as ss}from"./vendor-D_-14Whs.js";import{u as Dn,a as ls,g as ri,b as cs,c as us,P as ua,d as ii,e as ds,f as ps,s as fs,h as gs}from"./personas-B44JP8XF.js";import{c as gt,B as Be,L as da,D as fr,I as ms,t as De,C as hs,S as bs,A as Bt,u as xs,a as ys,b as Es,d as _s,e as ai,X as mn,g as ks,f as ws,h as Ns,i as Ss}from"./index-DdsLEQg8.js";import{C as gr,a as oi}from"./copy-button-VN55eluX.js";import{P as pa}from"./pencil-BUeTGZ2m.js";import{T as mr}from"./trash-2-BOZ6n1d2.js";import{R as vs}from"./refresh-cw-35eljdhP.js";import{C as rn,a as Ar,b as Ts,D as Cs,c as As,d as Is,e as Os,f as Rs,g as Ms,h as Ds,i as Ls,j as Ps,k as Bs}from"./dialog-oym6ZR4Z.js";import{C as Fs}from"./circle-x-BMU1-bqZ.js";import{S as zs,a as Us,M as $s}from"./ModelDetailDialog-DOWC_r7x.js";import{C as js}from"./check-BEcwngnz.js";import"./save-AXon2pXP.js";const Hs=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Ks=gt("arrow-down",Hs);const Gs=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],qs=gt("brain",Gs);const Ws=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Vs=gt("chevron-left",Ws);const Ys=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Zs=gt("file-text",Ys);const Xs=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 8v6",key:"1ib9pf"}],["path",{d:"M9 11h6",key:"1fldmi"}]],si=gt("message-square-plus",Xs);const Qs=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],Js=gt("paperclip",Qs);const el=[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]],tl=gt("send-horizontal",el);const nl=[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]],rl=gt("share-2",nl);const il=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],al=gt("square",il);const ol=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],sl=gt("user-round",ol);function ll(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const cl=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ul=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,dl={};function li(e,t){return(dl.jsx?ul:cl).test(e)}const pl=/[ \t\n\f\r]/g;function fl(e){return typeof e=="object"?e.type==="text"?ci(e.value):!1:ci(e)}function ci(e){return e.replace(pl,"")===""}class an{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}an.prototype.normal={};an.prototype.property={};an.prototype.space=void 0;function fa(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new an(n,r,t)}function hr(e){return e.toLowerCase()}class Ge{constructor(t,n){this.attribute=n,this.property=t}}Ge.prototype.attribute="";Ge.prototype.booleanish=!1;Ge.prototype.boolean=!1;Ge.prototype.commaOrSpaceSeparated=!1;Ge.prototype.commaSeparated=!1;Ge.prototype.defined=!1;Ge.prototype.mustUseProperty=!1;Ge.prototype.number=!1;Ge.prototype.overloadedBoolean=!1;Ge.prototype.property="";Ge.prototype.spaceSeparated=!1;Ge.prototype.space=void 0;let gl=0;const ne=It(),Se=It(),br=It(),R=It(),xe=It(),Ct=It(),We=It();function It(){return 2**++gl}const xr=Object.freeze(Object.defineProperty({__proto__:null,boolean:ne,booleanish:Se,commaOrSpaceSeparated:We,commaSeparated:Ct,number:R,overloadedBoolean:br,spaceSeparated:xe},Symbol.toStringTag,{value:"Module"})),Wn=Object.keys(xr);class Ir extends Ge{constructor(t,n,r,i){let o=-1;if(super(t,n),ui(this,"space",i),typeof r=="number")for(;++o<Wn.length;){const a=Wn[o];ui(this,Wn[o],(r&xr[a])===xr[a])}}}Ir.prototype.defined=!0;function ui(e,t,n){n&&(e[t]=n)}function jt(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new Ir(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[hr(r)]=r,n[hr(o.attribute)]=r}return new an(t,n,e.space)}const ga=jt({properties:{ariaActiveDescendant:null,ariaAtomic:Se,ariaAutoComplete:null,ariaBusy:Se,ariaChecked:Se,ariaColCount:R,ariaColIndex:R,ariaColSpan:R,ariaControls:xe,ariaCurrent:null,ariaDescribedBy:xe,ariaDetails:null,ariaDisabled:Se,ariaDropEffect:xe,ariaErrorMessage:null,ariaExpanded:Se,ariaFlowTo:xe,ariaGrabbed:Se,ariaHasPopup:null,ariaHidden:Se,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:xe,ariaLevel:R,ariaLive:null,ariaModal:Se,ariaMultiLine:Se,ariaMultiSelectable:Se,ariaOrientation:null,ariaOwns:xe,ariaPlaceholder:null,ariaPosInSet:R,ariaPressed:Se,ariaReadOnly:Se,ariaRelevant:null,ariaRequired:Se,ariaRoleDescription:xe,ariaRowCount:R,ariaRowIndex:R,ariaRowSpan:R,ariaSelected:Se,ariaSetSize:R,ariaSort:null,ariaValueMax:R,ariaValueMin:R,ariaValueNow:R,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function ma(e,t){return t in e?e[t]:t}function ha(e,t){return ma(e,t.toLowerCase())}const ml=jt({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ct,acceptCharset:xe,accessKey:xe,action:null,allow:null,allowFullScreen:ne,allowPaymentRequest:ne,allowUserMedia:ne,alpha:ne,alt:null,as:null,async:ne,autoCapitalize:null,autoComplete:xe,autoFocus:ne,autoPlay:ne,blocking:xe,capture:null,charSet:null,checked:ne,cite:null,className:xe,closedBy:null,colorSpace:null,cols:R,colSpan:R,command:null,commandFor:null,content:null,contentEditable:Se,controls:ne,controlsList:xe,coords:R|Ct,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ne,defer:ne,dir:null,dirName:null,disabled:ne,download:br,draggable:Se,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ne,formTarget:null,headers:xe,height:R,hidden:br,high:R,href:null,hrefLang:null,htmlFor:xe,httpEquiv:xe,id:null,imageSizes:null,imageSrcSet:null,inert:ne,inputMode:null,integrity:null,is:null,isMap:ne,itemId:null,itemProp:xe,itemRef:xe,itemScope:ne,itemType:xe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ne,low:R,manifest:null,max:null,maxLength:R,media:null,method:null,min:null,minLength:R,multiple:ne,muted:ne,name:null,nonce:null,noModule:ne,noValidate:ne,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ne,optimum:R,pattern:null,ping:xe,placeholder:null,playsInline:ne,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ne,referrerPolicy:null,rel:xe,required:ne,reversed:ne,rows:R,rowSpan:R,sandbox:xe,scope:null,scoped:ne,seamless:ne,selected:ne,shadowRootClonable:ne,shadowRootCustomElementRegistry:ne,shadowRootDelegatesFocus:ne,shadowRootMode:null,shadowRootSerializable:ne,shape:null,size:R,sizes:null,slot:null,span:R,spellCheck:Se,src:null,srcDoc:null,srcLang:null,srcSet:null,start:R,step:null,style:null,tabIndex:R,target:null,title:null,translate:null,type:null,typeMustMatch:ne,useMap:null,value:Se,width:R,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:xe,axis:null,background:null,bgColor:null,border:R,borderColor:null,bottomMargin:R,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ne,declare:ne,event:null,face:null,frame:null,frameBorder:null,hSpace:R,leftMargin:R,link:null,longDesc:null,lowSrc:null,marginHeight:R,marginWidth:R,noResize:ne,noHref:ne,noShade:ne,noWrap:ne,object:null,profile:null,prompt:null,rev:null,rightMargin:R,rules:null,scheme:null,scrolling:Se,standby:null,summary:null,text:null,topMargin:R,valueType:null,version:null,vAlign:null,vLink:null,vSpace:R,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:ne,disablePictureInPicture:ne,disableRemotePlayback:ne,exportParts:Ct,part:xe,prefix:null,property:null,results:R,security:null,unselectable:null},space:"html",transform:ha}),hl=jt({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:We,accentHeight:R,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:R,amplitude:R,arabicForm:null,ascent:R,attributeName:null,attributeType:null,azimuth:R,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:R,by:null,calcMode:null,capHeight:R,className:xe,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:R,diffuseConstant:R,direction:null,display:null,dur:null,divisor:R,dominantBaseline:null,download:ne,dx:null,dy:null,edgeMode:null,editable:null,elevation:R,enableBackground:null,end:null,event:null,exponent:R,externalResourcesRequired:null,fill:null,fillOpacity:R,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ct,g2:Ct,glyphName:Ct,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:R,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:R,horizOriginX:R,horizOriginY:R,id:null,ideographic:R,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:R,k:R,k1:R,k2:R,k3:R,k4:R,kernelMatrix:We,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:R,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:R,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:R,overlineThickness:R,paintOrder:null,panose1:null,path:null,pathLength:R,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:xe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:R,pointsAtY:R,pointsAtZ:R,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:We,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:We,rev:We,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:We,requiredFeatures:We,requiredFonts:We,requiredFormats:We,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:R,specularExponent:R,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:R,strikethroughThickness:R,string:null,stroke:null,strokeDashArray:We,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:R,strokeOpacity:R,strokeWidth:null,style:null,surfaceScale:R,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:We,tabIndex:R,tableValues:null,target:null,targetX:R,targetY:R,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:We,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:R,underlineThickness:R,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:R,values:null,vAlphabetic:R,vMathematical:R,vectorEffect:null,vHanging:R,vIdeographic:R,version:null,vertAdvY:R,vertOriginX:R,vertOriginY:R,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:R,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:ma}),ba=jt({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),xa=jt({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ha}),ya=jt({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),bl={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},xl=/[A-Z]/g,di=/-[a-z]/g,yl=/^data[-\w.:]+$/i;function El(e,t){const n=hr(t);let r=t,i=Ge;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&yl.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(di,kl);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!di.test(o)){let a=o.replace(xl,_l);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=Ir}return new i(r,t)}function _l(e){return"-"+e.toLowerCase()}function kl(e){return e.charAt(1).toUpperCase()}const wl=fa([ga,ml,ba,xa,ya],"html"),Or=fa([ga,hl,ba,xa,ya],"svg");function Nl(e){return e.join(" ").trim()}var Lt={},Vn,pi;function Sl(){if(pi)return Vn;pi=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,s=/^\s+|\s+$/g,l=`
|
|
1
|
+
import{j as g}from"./radix-BFvMxQq9.js";import{j as Cr,r as X,k as os,l as ss}from"./vendor-D_-14Whs.js";import{u as Dn,a as ls,g as ri,b as cs,c as us,P as ua,d as ii,e as ds,f as ps,s as fs,h as gs}from"./personas-Ch12R3nU.js";import{c as gt,B as Be,L as da,D as fr,I as ms,t as De,C as hs,S as bs,A as Bt,u as xs,a as ys,b as Es,d as _s,e as ai,X as mn,g as ks,f as ws,h as Ns,i as Ss}from"./index-iQ0Xd3d6.js";import{C as gr,a as oi}from"./copy-button-BKEOGElI.js";import{P as pa}from"./pencil-yXapP66e.js";import{T as mr}from"./trash-2-Cvm2LlD0.js";import{R as vs}from"./refresh-cw-Bii-Kx0A.js";import{C as rn,a as Ar,b as Ts,D as Cs,c as As,d as Is,e as Os,f as Rs,g as Ms,h as Ds,i as Ls,j as Ps,k as Bs}from"./dialog-DRRtzXcR.js";import{C as Fs}from"./circle-x-nn8GPW_0.js";import{S as zs,a as Us,M as $s}from"./ModelDetailDialog-DEvT_TCN.js";import{C as js}from"./check-CyrGNFl1.js";import"./save-B6QW1US8.js";const Hs=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Ks=gt("arrow-down",Hs);const Gs=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],qs=gt("brain",Gs);const Ws=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Vs=gt("chevron-left",Ws);const Ys=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Zs=gt("file-text",Ys);const Xs=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 8v6",key:"1ib9pf"}],["path",{d:"M9 11h6",key:"1fldmi"}]],si=gt("message-square-plus",Xs);const Qs=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],Js=gt("paperclip",Qs);const el=[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]],tl=gt("send-horizontal",el);const nl=[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]],rl=gt("share-2",nl);const il=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],al=gt("square",il);const ol=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],sl=gt("user-round",ol);function ll(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const cl=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ul=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,dl={};function li(e,t){return(dl.jsx?ul:cl).test(e)}const pl=/[ \t\n\f\r]/g;function fl(e){return typeof e=="object"?e.type==="text"?ci(e.value):!1:ci(e)}function ci(e){return e.replace(pl,"")===""}class an{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}an.prototype.normal={};an.prototype.property={};an.prototype.space=void 0;function fa(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new an(n,r,t)}function hr(e){return e.toLowerCase()}class Ge{constructor(t,n){this.attribute=n,this.property=t}}Ge.prototype.attribute="";Ge.prototype.booleanish=!1;Ge.prototype.boolean=!1;Ge.prototype.commaOrSpaceSeparated=!1;Ge.prototype.commaSeparated=!1;Ge.prototype.defined=!1;Ge.prototype.mustUseProperty=!1;Ge.prototype.number=!1;Ge.prototype.overloadedBoolean=!1;Ge.prototype.property="";Ge.prototype.spaceSeparated=!1;Ge.prototype.space=void 0;let gl=0;const ne=It(),Se=It(),br=It(),R=It(),xe=It(),Ct=It(),We=It();function It(){return 2**++gl}const xr=Object.freeze(Object.defineProperty({__proto__:null,boolean:ne,booleanish:Se,commaOrSpaceSeparated:We,commaSeparated:Ct,number:R,overloadedBoolean:br,spaceSeparated:xe},Symbol.toStringTag,{value:"Module"})),Wn=Object.keys(xr);class Ir extends Ge{constructor(t,n,r,i){let o=-1;if(super(t,n),ui(this,"space",i),typeof r=="number")for(;++o<Wn.length;){const a=Wn[o];ui(this,Wn[o],(r&xr[a])===xr[a])}}}Ir.prototype.defined=!0;function ui(e,t,n){n&&(e[t]=n)}function jt(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new Ir(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[hr(r)]=r,n[hr(o.attribute)]=r}return new an(t,n,e.space)}const ga=jt({properties:{ariaActiveDescendant:null,ariaAtomic:Se,ariaAutoComplete:null,ariaBusy:Se,ariaChecked:Se,ariaColCount:R,ariaColIndex:R,ariaColSpan:R,ariaControls:xe,ariaCurrent:null,ariaDescribedBy:xe,ariaDetails:null,ariaDisabled:Se,ariaDropEffect:xe,ariaErrorMessage:null,ariaExpanded:Se,ariaFlowTo:xe,ariaGrabbed:Se,ariaHasPopup:null,ariaHidden:Se,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:xe,ariaLevel:R,ariaLive:null,ariaModal:Se,ariaMultiLine:Se,ariaMultiSelectable:Se,ariaOrientation:null,ariaOwns:xe,ariaPlaceholder:null,ariaPosInSet:R,ariaPressed:Se,ariaReadOnly:Se,ariaRelevant:null,ariaRequired:Se,ariaRoleDescription:xe,ariaRowCount:R,ariaRowIndex:R,ariaRowSpan:R,ariaSelected:Se,ariaSetSize:R,ariaSort:null,ariaValueMax:R,ariaValueMin:R,ariaValueNow:R,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function ma(e,t){return t in e?e[t]:t}function ha(e,t){return ma(e,t.toLowerCase())}const ml=jt({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ct,acceptCharset:xe,accessKey:xe,action:null,allow:null,allowFullScreen:ne,allowPaymentRequest:ne,allowUserMedia:ne,alpha:ne,alt:null,as:null,async:ne,autoCapitalize:null,autoComplete:xe,autoFocus:ne,autoPlay:ne,blocking:xe,capture:null,charSet:null,checked:ne,cite:null,className:xe,closedBy:null,colorSpace:null,cols:R,colSpan:R,command:null,commandFor:null,content:null,contentEditable:Se,controls:ne,controlsList:xe,coords:R|Ct,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ne,defer:ne,dir:null,dirName:null,disabled:ne,download:br,draggable:Se,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ne,formTarget:null,headers:xe,height:R,hidden:br,high:R,href:null,hrefLang:null,htmlFor:xe,httpEquiv:xe,id:null,imageSizes:null,imageSrcSet:null,inert:ne,inputMode:null,integrity:null,is:null,isMap:ne,itemId:null,itemProp:xe,itemRef:xe,itemScope:ne,itemType:xe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ne,low:R,manifest:null,max:null,maxLength:R,media:null,method:null,min:null,minLength:R,multiple:ne,muted:ne,name:null,nonce:null,noModule:ne,noValidate:ne,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ne,optimum:R,pattern:null,ping:xe,placeholder:null,playsInline:ne,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ne,referrerPolicy:null,rel:xe,required:ne,reversed:ne,rows:R,rowSpan:R,sandbox:xe,scope:null,scoped:ne,seamless:ne,selected:ne,shadowRootClonable:ne,shadowRootCustomElementRegistry:ne,shadowRootDelegatesFocus:ne,shadowRootMode:null,shadowRootSerializable:ne,shape:null,size:R,sizes:null,slot:null,span:R,spellCheck:Se,src:null,srcDoc:null,srcLang:null,srcSet:null,start:R,step:null,style:null,tabIndex:R,target:null,title:null,translate:null,type:null,typeMustMatch:ne,useMap:null,value:Se,width:R,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:xe,axis:null,background:null,bgColor:null,border:R,borderColor:null,bottomMargin:R,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ne,declare:ne,event:null,face:null,frame:null,frameBorder:null,hSpace:R,leftMargin:R,link:null,longDesc:null,lowSrc:null,marginHeight:R,marginWidth:R,noResize:ne,noHref:ne,noShade:ne,noWrap:ne,object:null,profile:null,prompt:null,rev:null,rightMargin:R,rules:null,scheme:null,scrolling:Se,standby:null,summary:null,text:null,topMargin:R,valueType:null,version:null,vAlign:null,vLink:null,vSpace:R,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:ne,disablePictureInPicture:ne,disableRemotePlayback:ne,exportParts:Ct,part:xe,prefix:null,property:null,results:R,security:null,unselectable:null},space:"html",transform:ha}),hl=jt({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:We,accentHeight:R,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:R,amplitude:R,arabicForm:null,ascent:R,attributeName:null,attributeType:null,azimuth:R,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:R,by:null,calcMode:null,capHeight:R,className:xe,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:R,diffuseConstant:R,direction:null,display:null,dur:null,divisor:R,dominantBaseline:null,download:ne,dx:null,dy:null,edgeMode:null,editable:null,elevation:R,enableBackground:null,end:null,event:null,exponent:R,externalResourcesRequired:null,fill:null,fillOpacity:R,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ct,g2:Ct,glyphName:Ct,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:R,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:R,horizOriginX:R,horizOriginY:R,id:null,ideographic:R,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:R,k:R,k1:R,k2:R,k3:R,k4:R,kernelMatrix:We,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:R,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:R,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:R,overlineThickness:R,paintOrder:null,panose1:null,path:null,pathLength:R,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:xe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:R,pointsAtY:R,pointsAtZ:R,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:We,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:We,rev:We,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:We,requiredFeatures:We,requiredFonts:We,requiredFormats:We,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:R,specularExponent:R,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:R,strikethroughThickness:R,string:null,stroke:null,strokeDashArray:We,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:R,strokeOpacity:R,strokeWidth:null,style:null,surfaceScale:R,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:We,tabIndex:R,tableValues:null,target:null,targetX:R,targetY:R,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:We,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:R,underlineThickness:R,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:R,values:null,vAlphabetic:R,vMathematical:R,vectorEffect:null,vHanging:R,vIdeographic:R,version:null,vertAdvY:R,vertOriginX:R,vertOriginY:R,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:R,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:ma}),ba=jt({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),xa=jt({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ha}),ya=jt({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),bl={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},xl=/[A-Z]/g,di=/-[a-z]/g,yl=/^data[-\w.:]+$/i;function El(e,t){const n=hr(t);let r=t,i=Ge;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&yl.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(di,kl);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!di.test(o)){let a=o.replace(xl,_l);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=Ir}return new i(r,t)}function _l(e){return"-"+e.toLowerCase()}function kl(e){return e.charAt(1).toUpperCase()}const wl=fa([ga,ml,ba,xa,ya],"html"),Or=fa([ga,hl,ba,xa,ya],"svg");function Nl(e){return e.join(" ").trim()}var Lt={},Vn,pi;function Sl(){if(pi)return Vn;pi=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,s=/^\s+|\s+$/g,l=`
|
|
2
2
|
`,c="/",u="*",d="",f="comment",p="declaration";function h(_,E){if(typeof _!="string")throw new TypeError("First argument must be a string");if(!_)return[];E=E||{};var T=1,S=1;function O(P){var I=P.match(t);I&&(T+=I.length);var J=P.lastIndexOf(l);S=~J?P.length-J:S+P.length}function L(){var P={line:T,column:S};return function(I){return I.position=new w(P),G(),I}}function w(P){this.start=P,this.end={line:T,column:S},this.source=E.source}w.prototype.content=_;function j(P){var I=new Error(E.source+":"+T+":"+S+": "+P);if(I.reason=P,I.filename=E.source,I.line=T,I.column=S,I.source=_,!E.silent)throw I}function K(P){var I=P.exec(_);if(I){var J=I[0];return O(J),_=_.slice(J.length),I}}function G(){K(n)}function N(P){var I;for(P=P||[];I=B();)I!==!1&&P.push(I);return P}function B(){var P=L();if(!(c!=_.charAt(0)||u!=_.charAt(1))){for(var I=2;d!=_.charAt(I)&&(u!=_.charAt(I)||c!=_.charAt(I+1));)++I;if(I+=2,d===_.charAt(I-1))return j("End of comment missing");var J=_.slice(2,I-2);return S+=2,O(J),_=_.slice(I),S+=2,P({type:f,comment:J})}}function U(){var P=L(),I=K(r);if(I){if(B(),!K(i))return j("property missing ':'");var J=K(o),se=P({type:p,property:y(I[0].replace(e,d)),value:J?y(J[0].replace(e,d)):d});return K(a),se}}function te(){var P=[];N(P);for(var I;I=U();)I!==!1&&(P.push(I),N(P));return P}return G(),te()}function y(_){return _?_.replace(s,d):d}return Vn=h,Vn}var fi;function vl(){if(fi)return Lt;fi=1;var e=Lt&&Lt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.default=n;const t=e(Sl());function n(r,i){let o=null;if(!r||typeof r!="string")return o;const a=(0,t.default)(r),s=typeof i=="function";return a.forEach(l=>{if(l.type!=="declaration")return;const{property:c,value:u}=l;s?i(c,u,l):u&&(o=o||{},o[c]=u)}),o}return Lt}var Wt={},gi;function Tl(){if(gi)return Wt;gi=1,Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(c){return!c||n.test(c)||e.test(c)},a=function(c,u){return u.toUpperCase()},s=function(c,u){return"".concat(u,"-")},l=function(c,u){return u===void 0&&(u={}),o(c)?c:(c=c.toLowerCase(),u.reactCompat?c=c.replace(i,s):c=c.replace(r,s),c.replace(t,a))};return Wt.camelCase=l,Wt}var Vt,mi;function Cl(){if(mi)return Vt;mi=1;var e=Vt&&Vt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(vl()),n=Tl();function r(i,o){var a={};return!i||typeof i!="string"||(0,t.default)(i,function(s,l){s&&l&&(a[(0,n.camelCase)(s,o)]=l)}),a}return r.default=r,Vt=r,Vt}var Al=Cl();const Il=Cr(Al),Ea=_a("end"),Rr=_a("start");function _a(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Ol(e){const t=Rr(e),n=Ea(e);if(t&&n)return{start:t,end:n}}function Qt(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?hi(e.position):"start"in e||"end"in e?hi(e):"line"in e||"column"in e?yr(e):""}function yr(e){return bi(e&&e.line)+":"+bi(e&&e.column)}function hi(e){return yr(e&&e.start)+"-"+yr(e&&e.end)}function bi(e){return e&&typeof e=="number"?e:1}class ze extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},a=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(a=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?o.ruleId=r:(o.source=r.slice(0,l),o.ruleId=r.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){const l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}const s=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=s?s.line:void 0,this.name=Qt(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=a&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ze.prototype.file="";ze.prototype.name="";ze.prototype.reason="";ze.prototype.message="";ze.prototype.stack="";ze.prototype.column=void 0;ze.prototype.line=void 0;ze.prototype.ancestors=void 0;ze.prototype.cause=void 0;ze.prototype.fatal=void 0;ze.prototype.place=void 0;ze.prototype.ruleId=void 0;ze.prototype.source=void 0;const Mr={}.hasOwnProperty,Rl=new Map,Ml=/[A-Z]/g,Dl=new Set(["table","tbody","thead","tfoot","tr"]),Ll=new Set(["td","th"]),ka="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Pl(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Kl(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Hl(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Or:wl,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=wa(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function wa(e,t,n){if(t.type==="element")return Bl(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Fl(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Ul(e,t,n);if(t.type==="mdxjsEsm")return zl(e,t);if(t.type==="root")return $l(e,t,n);if(t.type==="text")return jl(e,t)}function Bl(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Or,e.schema=i),e.ancestors.push(t);const o=Sa(e,t.tagName,!1),a=Gl(e,t);let s=Lr(e,t);return Dl.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!fl(l):!0})),Na(e,a,o,t),Dr(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function Fl(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}tn(e,t.position)}function zl(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);tn(e,t.position)}function Ul(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Or,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Sa(e,t.name,!0),a=ql(e,t),s=Lr(e,t);return Na(e,a,o,t),Dr(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function $l(e,t,n){const r={};return Dr(r,Lr(e,t)),e.create(t,e.Fragment,r,n)}function jl(e,t){return t.value}function Na(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Dr(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Hl(e,t,n){return r;function r(i,o,a,s){const c=Array.isArray(a.children)?n:t;return s?c(o,a,s):c(o,a)}}function Kl(e,t){return n;function n(r,i,o,a){const s=Array.isArray(o.children),l=Rr(r);return t(i,o,a,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function Gl(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Mr.call(t.properties,i)){const o=Wl(e,i,t.properties[i]);if(o){const[a,s]=o;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&Ll.has(t.tagName)?r=s:n[a]=s}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function ql(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const a=o.expression;a.type;const s=a.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else tn(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,o=e.evaluater.evaluateExpression(s.expression)}else tn(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function Lr(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Rl;for(;++r<t.children.length;){const o=t.children[r];let a;if(e.passKeys){const l=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(l){const c=i.get(l)||0;a=l+"-"+c,i.set(l,c+1)}}const s=wa(e,o,a);s!==void 0&&n.push(s)}return n}function Wl(e,t,n){const r=El(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?ll(n):Nl(n)),r.property==="style"){let i=typeof n=="object"?n:Vl(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Yl(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?bl[r.property]||r.property:r.attribute,n]}}function Vl(e,t){try{return Il(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new ze("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=ka+"#cannot-parse-style-attribute",i}}function Sa(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,a;for(;++o<i.length;){const s=li(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};a=a?{type:"MemberExpression",object:a,property:s,computed:!!(o&&s.type==="Literal"),optional:!1}:s}r=a}else r=li(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Mr.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);tn(e)}function tn(e,t){const n=new ze("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=ka+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Yl(e){const t={};let n;for(n in e)Mr.call(e,n)&&(t[Zl(n)]=e[n]);return t}function Zl(e){let t=e.replace(Ml,Xl);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Xl(e){return"-"+e.toLowerCase()}const Yn={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Ql={};function Pr(e,t){const n=Ql,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return va(e,r,i)}function va(e,t,n){if(Jl(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return xi(e.children,t,n)}return Array.isArray(e)?xi(e,t,n):""}function xi(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=va(e[i],t,n);return r.join("")}function Jl(e){return!!(e&&typeof e=="object")}const yi=document.createElement("i");function Br(e){const t="&"+e+";";yi.innerHTML=t;const n=yi.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Ve(e,t,n,r){const i=e.length;let o=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);o<r.length;)a=r.slice(o,o+1e4),a.unshift(t,0),e.splice(...a),o+=1e4,t+=1e4}function Je(e,t){return e.length>0?(Ve(e,e.length,0,t),e):t}const Ei={}.hasOwnProperty;function Ta(e){const t={};let n=-1;for(;++n<e.length;)ec(t,e[n]);return t}function ec(e,t){let n;for(n in t){const i=(Ei.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let a;if(o)for(a in o){Ei.call(i,a)||(i[a]=[]);const s=o[a];tc(i[a],Array.isArray(s)?s:s?[s]:[])}}}function tc(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Ve(e,0,0,r)}function Ca(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function ot(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const je=Nt(/[A-Za-z]/),Fe=Nt(/[\dA-Za-z]/),nc=Nt(/[#-'*+\--9=?A-Z^-~]/);function Tn(e){return e!==null&&(e<32||e===127)}const Er=Nt(/\d/),rc=Nt(/[\dA-Fa-f]/),ic=Nt(/[!-/:-@[-`{-~]/);function Y(e){return e!==null&&e<-2}function ye(e){return e!==null&&(e<0||e===32)}function oe(e){return e===-2||e===-1||e===32}const Ln=Nt(new RegExp("\\p{P}|\\p{S}","u")),At=Nt(/\s/);function Nt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ht(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let a="";if(o===37&&Fe(e.charCodeAt(n+1))&&Fe(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(a=String.fromCharCode(o));else if(o>55295&&o<57344){const s=e.charCodeAt(n+1);o<56320&&s>56319&&s<57344?(a=String.fromCharCode(o,s),i=1):a="�"}else a=String.fromCharCode(o);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function de(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(l){return oe(l)?(e.enter(n),s(l)):t(l)}function s(l){return oe(l)&&o++<i?(e.consume(l),s):(e.exit(n),t(l))}}const ac={tokenize:oc};function oc(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),de(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),o(s)}function o(s){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return Y(s)?(e.consume(s),e.exit("chunkText"),o):(e.consume(s),a)}}const sc={tokenize:lc},_i={tokenize:cc};function lc(e){const t=this,n=[];let r=0,i,o,a;return s;function s(S){if(r<n.length){const O=n[r];return t.containerState=O[1],e.attempt(O[0].continuation,l,c)(S)}return c(S)}function l(S){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&T();const O=t.events.length;let L=O,w;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){w=t.events[L][1].end;break}E(r);let j=O;for(;j<t.events.length;)t.events[j][1].end={...w},j++;return Ve(t.events,L+1,0,t.events.slice(O)),t.events.length=j,c(S)}return s(S)}function c(S){if(r===n.length){if(!i)return f(S);if(i.currentConstruct&&i.currentConstruct.concrete)return h(S);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(_i,u,d)(S)}function u(S){return i&&T(),E(r),f(S)}function d(S){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,h(S)}function f(S){return t.containerState={},e.attempt(_i,p,h)(S)}function p(S){return r++,n.push([t.currentConstruct,t.containerState]),f(S)}function h(S){if(S===null){i&&T(),E(0),e.consume(S);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),y(S)}function y(S){if(S===null){_(e.exit("chunkFlow"),!0),E(0),e.consume(S);return}return Y(S)?(e.consume(S),_(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(S),y)}function _(S,O){const L=t.sliceStream(S);if(O&&L.push(null),S.previous=o,o&&(o.next=S),o=S,i.defineSkip(S.start),i.write(L),t.parser.lazy[S.start.line]){let w=i.events.length;for(;w--;)if(i.events[w][1].start.offset<a&&(!i.events[w][1].end||i.events[w][1].end.offset>a))return;const j=t.events.length;let K=j,G,N;for(;K--;)if(t.events[K][0]==="exit"&&t.events[K][1].type==="chunkFlow"){if(G){N=t.events[K][1].end;break}G=!0}for(E(r),w=j;w<t.events.length;)t.events[w][1].end={...N},w++;Ve(t.events,K+1,0,t.events.slice(j)),t.events.length=w}}function E(S){let O=n.length;for(;O-- >S;){const L=n[O];t.containerState=L[1],L[0].exit.call(t,e)}n.length=S}function T(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function cc(e,t,n){return de(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function $t(e){if(e===null||ye(e)||At(e))return 1;if(Ln(e))return 2}function Pn(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const _r={name:"attention",resolveAll:uc,tokenize:dc};function uc(e,t){let n=-1,r,i,o,a,s,l,c,u;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},f={...e[n][1].start};ki(d,-l),ki(f,l),a={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},s={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},o={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...a.start},end:{...s.end}},e[r][1].end={...a.start},e[n][1].start={...s.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=Je(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=Je(c,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",o,t]]),c=Je(c,Pn(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=Je(c,[["exit",o,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,c=Je(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,Ve(e,r-1,n-r+3,c),n=r+c.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function dc(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=$t(r);let o;return a;function a(l){return o=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===o)return e.consume(l),s;const c=e.exit("attentionSequence"),u=$t(l),d=!u||u===2&&i||n.includes(l),f=!i||i===2&&u||n.includes(r);return c._open=!!(o===42?d:d&&(i||!f)),c._close=!!(o===42?f:f&&(u||!d)),t(l)}}function ki(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const pc={name:"autolink",tokenize:fc};function fc(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(p){return je(p)?(e.consume(p),a):p===64?n(p):c(p)}function a(p){return p===43||p===45||p===46||Fe(p)?(r=1,s(p)):c(p)}function s(p){return p===58?(e.consume(p),r=0,l):(p===43||p===45||p===46||Fe(p))&&r++<32?(e.consume(p),s):(r=0,c(p))}function l(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Tn(p)?n(p):(e.consume(p),l)}function c(p){return p===64?(e.consume(p),u):nc(p)?(e.consume(p),c):n(p)}function u(p){return Fe(p)?d(p):n(p)}function d(p){return p===46?(e.consume(p),r=0,u):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):f(p)}function f(p){if((p===45||Fe(p))&&r++<63){const h=p===45?f:d;return e.consume(p),h}return n(p)}}const on={partial:!0,tokenize:gc};function gc(e,t,n){return r;function r(o){return oe(o)?de(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||Y(o)?t(o):n(o)}}const Aa={continuation:{tokenize:hc},exit:bc,name:"blockQuote",tokenize:mc};function mc(e,t,n){const r=this;return i;function i(a){if(a===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),o}return n(a)}function o(a){return oe(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function hc(e,t,n){const r=this;return i;function i(a){return oe(a)?de(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return e.attempt(Aa,t,n)(a)}}function bc(e){e.exit("blockQuote")}const Ia={name:"characterEscape",tokenize:xc};function xc(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return ic(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Oa={name:"characterReference",tokenize:yc};function yc(e,t,n){const r=this;let i=0,o,a;return s;function s(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),o=31,a=Fe,u(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=rc,u):(e.enter("characterReferenceValue"),o=7,a=Er,u(d))}function u(d){if(d===59&&i){const f=e.exit("characterReferenceValue");return a===Fe&&!Br(r.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(d)&&i++<o?(e.consume(d),u):n(d)}}const wi={partial:!0,tokenize:_c},Ni={concrete:!0,name:"codeFenced",tokenize:Ec};function Ec(e,t,n){const r=this,i={partial:!0,tokenize:L};let o=0,a=0,s;return l;function l(w){return c(w)}function c(w){const j=r.events[r.events.length-1];return o=j&&j[1].type==="linePrefix"?j[2].sliceSerialize(j[1],!0).length:0,s=w,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(w)}function u(w){return w===s?(a++,e.consume(w),u):a<3?n(w):(e.exit("codeFencedFenceSequence"),oe(w)?de(e,d,"whitespace")(w):d(w))}function d(w){return w===null||Y(w)?(e.exit("codeFencedFence"),r.interrupt?t(w):e.check(wi,y,O)(w)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(w))}function f(w){return w===null||Y(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(w)):oe(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),de(e,p,"whitespace")(w)):w===96&&w===s?n(w):(e.consume(w),f)}function p(w){return w===null||Y(w)?d(w):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(w))}function h(w){return w===null||Y(w)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(w)):w===96&&w===s?n(w):(e.consume(w),h)}function y(w){return e.attempt(i,O,_)(w)}function _(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),E}function E(w){return o>0&&oe(w)?de(e,T,"linePrefix",o+1)(w):T(w)}function T(w){return w===null||Y(w)?e.check(wi,y,O)(w):(e.enter("codeFlowValue"),S(w))}function S(w){return w===null||Y(w)?(e.exit("codeFlowValue"),T(w)):(e.consume(w),S)}function O(w){return e.exit("codeFenced"),t(w)}function L(w,j,K){let G=0;return N;function N(I){return w.enter("lineEnding"),w.consume(I),w.exit("lineEnding"),B}function B(I){return w.enter("codeFencedFence"),oe(I)?de(w,U,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):U(I)}function U(I){return I===s?(w.enter("codeFencedFenceSequence"),te(I)):K(I)}function te(I){return I===s?(G++,w.consume(I),te):G>=a?(w.exit("codeFencedFenceSequence"),oe(I)?de(w,P,"whitespace")(I):P(I)):K(I)}function P(I){return I===null||Y(I)?(w.exit("codeFencedFence"),j(I)):K(I)}}}function _c(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const Zn={name:"codeIndented",tokenize:wc},kc={partial:!0,tokenize:Nc};function wc(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),de(e,o,"linePrefix",5)(c)}function o(c){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?a(c):n(c)}function a(c){return c===null?l(c):Y(c)?e.attempt(kc,a,l)(c):(e.enter("codeFlowValue"),s(c))}function s(c){return c===null||Y(c)?(e.exit("codeFlowValue"),a(c)):(e.consume(c),s)}function l(c){return e.exit("codeIndented"),t(c)}}function Nc(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):Y(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):de(e,o,"linePrefix",5)(a)}function o(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):Y(a)?i(a):n(a)}}const Sc={name:"codeText",previous:Tc,resolve:vc,tokenize:Cc};function vc(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Tc(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Cc(e,t,n){let r=0,i,o;return a;function a(d){return e.enter("codeText"),e.enter("codeTextSequence"),s(d)}function s(d){return d===96?(e.consume(d),r++,s):(e.exit("codeTextSequence"),l(d))}function l(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),l):d===96?(o=e.enter("codeTextSequence"),i=0,u(d)):Y(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||Y(d)?(e.exit("codeTextData"),l(d)):(e.consume(d),c)}function u(d){return d===96?(e.consume(d),i++,u):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(o.type="codeTextData",c(d))}}class Ac{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Yt(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Yt(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Yt(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Yt(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Yt(this.left,n.reverse())}}}function Yt(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Ra(e){const t={};let n=-1,r,i,o,a,s,l,c;const u=new Ac(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,o=0,o<l.length&&l[o][1].type==="lineEndingBlank"&&(o+=2),o<l.length&&l[o][1].type==="content"))for(;++o<l.length&&l[o][1].type!=="content";)l[o][1].type==="chunkText"&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Ic(u,n)),n=t[n],c=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(a=u.get(o),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(u.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=o);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return Ve(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function Ic(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const s=a.events,l=[],c={};let u,d,f=-1,p=n,h=0,y=0;const _=[y];for(;p;){for(;e.get(++i)[1]!==p;);o.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]==="exit"&&s[f-1][0]==="enter"&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(y=f+1,_.push(y),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):_.pop(),f=_.length;f--;){const E=s.slice(_[f],_[f+1]),T=o.pop();l.push([T,T+E.length-1]),e.splice(T,2,E)}for(l.reverse(),f=-1;++f<l.length;)c[h+l[f][0]]=h+l[f][1],h+=l[f][1]-l[f][0]-1;return c}const Oc={resolve:Mc,tokenize:Dc},Rc={partial:!0,tokenize:Lc};function Mc(e){return Ra(e),e}function Dc(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?o(s):Y(s)?e.check(Rc,a,o)(s):(e.consume(s),i)}function o(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Lc(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),de(e,o,"linePrefix")}function o(a){if(a===null||Y(a))return n(a);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function Ma(e,t,n,r,i,o,a,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return d;function d(E){return E===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(E),e.exit(o),f):E===null||E===32||E===41||Tn(E)?n(E):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),y(E))}function f(E){return E===62?(e.enter(o),e.consume(E),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(E))}function p(E){return E===62?(e.exit("chunkString"),e.exit(s),f(E)):E===null||E===60||Y(E)?n(E):(e.consume(E),E===92?h:p)}function h(E){return E===60||E===62||E===92?(e.consume(E),p):p(E)}function y(E){return!u&&(E===null||E===41||ye(E))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(E)):u<c&&E===40?(e.consume(E),u++,y):E===41?(e.consume(E),u--,y):E===null||E===32||E===40||Tn(E)?n(E):(e.consume(E),E===92?_:y)}function _(E){return E===40||E===41||E===92?(e.consume(E),y):y(E)}}function Da(e,t,n,r,i,o){const a=this;let s=0,l;return c;function c(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(o),u}function u(p){return s>999||p===null||p===91||p===93&&!l||p===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):Y(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||Y(p)||s++>999?(e.exit("chunkString"),u(p)):(e.consume(p),l||(l=!oe(p)),p===92?f:d)}function f(p){return p===91||p===92||p===93?(e.consume(p),s++,d):d(p)}}function La(e,t,n,r,i,o){let a;return s;function s(f){return f===34||f===39||f===40?(e.enter(r),e.enter(i),e.consume(f),e.exit(i),a=f===40?41:f,l):n(f)}function l(f){return f===a?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):(e.enter(o),c(f))}function c(f){return f===a?(e.exit(o),l(a)):f===null?n(f):Y(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),de(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(f))}function u(f){return f===a||f===null||Y(f)?(e.exit("chunkString"),c(f)):(e.consume(f),f===92?d:u)}function d(f){return f===a||f===92?(e.consume(f),u):u(f)}}function Jt(e,t){let n;return r;function r(i){return Y(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):oe(i)?de(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Pc={name:"definition",tokenize:Fc},Bc={partial:!0,tokenize:zc};function Fc(e,t,n){const r=this;let i;return o;function o(p){return e.enter("definition"),a(p)}function a(p){return Da.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return i=ot(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),l):n(p)}function l(p){return ye(p)?Jt(e,c)(p):c(p)}function c(p){return Ma(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function u(p){return e.attempt(Bc,d,d)(p)}function d(p){return oe(p)?de(e,f,"whitespace")(p):f(p)}function f(p){return p===null||Y(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function zc(e,t,n){return r;function r(s){return ye(s)?Jt(e,i)(s):n(s)}function i(s){return La(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return oe(s)?de(e,a,"whitespace")(s):a(s)}function a(s){return s===null||Y(s)?t(s):n(s)}}const Uc={name:"hardBreakEscape",tokenize:$c};function $c(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return Y(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const jc={name:"headingAtx",resolve:Hc,tokenize:Kc};function Hc(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Ve(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function Kc(e,t,n){let r=0;return i;function i(u){return e.enter("atxHeading"),o(u)}function o(u){return e.enter("atxHeadingSequence"),a(u)}function a(u){return u===35&&r++<6?(e.consume(u),a):u===null||ye(u)?(e.exit("atxHeadingSequence"),s(u)):n(u)}function s(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||Y(u)?(e.exit("atxHeading"),t(u)):oe(u)?de(e,s,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function l(u){return u===35?(e.consume(u),l):(e.exit("atxHeadingSequence"),s(u))}function c(u){return u===null||u===35||ye(u)?(e.exit("atxHeadingText"),s(u)):(e.consume(u),c)}}const Gc=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Si=["pre","script","style","textarea"],qc={concrete:!0,name:"htmlFlow",resolveTo:Yc,tokenize:Zc},Wc={partial:!0,tokenize:Qc},Vc={partial:!0,tokenize:Xc};function Yc(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Zc(e,t,n){const r=this;let i,o,a,s,l;return c;function c(x){return u(x)}function u(x){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(x),d}function d(x){return x===33?(e.consume(x),f):x===47?(e.consume(x),o=!0,y):x===63?(e.consume(x),i=3,r.interrupt?t:b):je(x)?(e.consume(x),a=String.fromCharCode(x),_):n(x)}function f(x){return x===45?(e.consume(x),i=2,p):x===91?(e.consume(x),i=5,s=0,h):je(x)?(e.consume(x),i=4,r.interrupt?t:b):n(x)}function p(x){return x===45?(e.consume(x),r.interrupt?t:b):n(x)}function h(x){const ve="CDATA[";return x===ve.charCodeAt(s++)?(e.consume(x),s===ve.length?r.interrupt?t:U:h):n(x)}function y(x){return je(x)?(e.consume(x),a=String.fromCharCode(x),_):n(x)}function _(x){if(x===null||x===47||x===62||ye(x)){const ve=x===47,Oe=a.toLowerCase();return!ve&&!o&&Si.includes(Oe)?(i=1,r.interrupt?t(x):U(x)):Gc.includes(a.toLowerCase())?(i=6,ve?(e.consume(x),E):r.interrupt?t(x):U(x)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(x):o?T(x):S(x))}return x===45||Fe(x)?(e.consume(x),a+=String.fromCharCode(x),_):n(x)}function E(x){return x===62?(e.consume(x),r.interrupt?t:U):n(x)}function T(x){return oe(x)?(e.consume(x),T):N(x)}function S(x){return x===47?(e.consume(x),N):x===58||x===95||je(x)?(e.consume(x),O):oe(x)?(e.consume(x),S):N(x)}function O(x){return x===45||x===46||x===58||x===95||Fe(x)?(e.consume(x),O):L(x)}function L(x){return x===61?(e.consume(x),w):oe(x)?(e.consume(x),L):S(x)}function w(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),l=x,j):oe(x)?(e.consume(x),w):K(x)}function j(x){return x===l?(e.consume(x),l=null,G):x===null||Y(x)?n(x):(e.consume(x),j)}function K(x){return x===null||x===34||x===39||x===47||x===60||x===61||x===62||x===96||ye(x)?L(x):(e.consume(x),K)}function G(x){return x===47||x===62||oe(x)?S(x):n(x)}function N(x){return x===62?(e.consume(x),B):n(x)}function B(x){return x===null||Y(x)?U(x):oe(x)?(e.consume(x),B):n(x)}function U(x){return x===45&&i===2?(e.consume(x),J):x===60&&i===1?(e.consume(x),se):x===62&&i===4?(e.consume(x),fe):x===63&&i===3?(e.consume(x),b):x===93&&i===5?(e.consume(x),me):Y(x)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Wc,ue,te)(x)):x===null||Y(x)?(e.exit("htmlFlowData"),te(x)):(e.consume(x),U)}function te(x){return e.check(Vc,P,ue)(x)}function P(x){return e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),I}function I(x){return x===null||Y(x)?te(x):(e.enter("htmlFlowData"),U(x))}function J(x){return x===45?(e.consume(x),b):U(x)}function se(x){return x===47?(e.consume(x),a="",ee):U(x)}function ee(x){if(x===62){const ve=a.toLowerCase();return Si.includes(ve)?(e.consume(x),fe):U(x)}return je(x)&&a.length<8?(e.consume(x),a+=String.fromCharCode(x),ee):U(x)}function me(x){return x===93?(e.consume(x),b):U(x)}function b(x){return x===62?(e.consume(x),fe):x===45&&i===2?(e.consume(x),b):U(x)}function fe(x){return x===null||Y(x)?(e.exit("htmlFlowData"),ue(x)):(e.consume(x),fe)}function ue(x){return e.exit("htmlFlow"),t(x)}}function Xc(e,t,n){const r=this;return i;function i(a){return Y(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):n(a)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function Qc(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(on,t,n)}}const Jc={name:"htmlText",tokenize:eu};function eu(e,t,n){const r=this;let i,o,a;return s;function s(b){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(b),l}function l(b){return b===33?(e.consume(b),c):b===47?(e.consume(b),L):b===63?(e.consume(b),S):je(b)?(e.consume(b),K):n(b)}function c(b){return b===45?(e.consume(b),u):b===91?(e.consume(b),o=0,h):je(b)?(e.consume(b),T):n(b)}function u(b){return b===45?(e.consume(b),p):n(b)}function d(b){return b===null?n(b):b===45?(e.consume(b),f):Y(b)?(a=d,se(b)):(e.consume(b),d)}function f(b){return b===45?(e.consume(b),p):d(b)}function p(b){return b===62?J(b):b===45?f(b):d(b)}function h(b){const fe="CDATA[";return b===fe.charCodeAt(o++)?(e.consume(b),o===fe.length?y:h):n(b)}function y(b){return b===null?n(b):b===93?(e.consume(b),_):Y(b)?(a=y,se(b)):(e.consume(b),y)}function _(b){return b===93?(e.consume(b),E):y(b)}function E(b){return b===62?J(b):b===93?(e.consume(b),E):y(b)}function T(b){return b===null||b===62?J(b):Y(b)?(a=T,se(b)):(e.consume(b),T)}function S(b){return b===null?n(b):b===63?(e.consume(b),O):Y(b)?(a=S,se(b)):(e.consume(b),S)}function O(b){return b===62?J(b):S(b)}function L(b){return je(b)?(e.consume(b),w):n(b)}function w(b){return b===45||Fe(b)?(e.consume(b),w):j(b)}function j(b){return Y(b)?(a=j,se(b)):oe(b)?(e.consume(b),j):J(b)}function K(b){return b===45||Fe(b)?(e.consume(b),K):b===47||b===62||ye(b)?G(b):n(b)}function G(b){return b===47?(e.consume(b),J):b===58||b===95||je(b)?(e.consume(b),N):Y(b)?(a=G,se(b)):oe(b)?(e.consume(b),G):J(b)}function N(b){return b===45||b===46||b===58||b===95||Fe(b)?(e.consume(b),N):B(b)}function B(b){return b===61?(e.consume(b),U):Y(b)?(a=B,se(b)):oe(b)?(e.consume(b),B):G(b)}function U(b){return b===null||b===60||b===61||b===62||b===96?n(b):b===34||b===39?(e.consume(b),i=b,te):Y(b)?(a=U,se(b)):oe(b)?(e.consume(b),U):(e.consume(b),P)}function te(b){return b===i?(e.consume(b),i=void 0,I):b===null?n(b):Y(b)?(a=te,se(b)):(e.consume(b),te)}function P(b){return b===null||b===34||b===39||b===60||b===61||b===96?n(b):b===47||b===62||ye(b)?G(b):(e.consume(b),P)}function I(b){return b===47||b===62||ye(b)?G(b):n(b)}function J(b){return b===62?(e.consume(b),e.exit("htmlTextData"),e.exit("htmlText"),t):n(b)}function se(b){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),ee}function ee(b){return oe(b)?de(e,me,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):me(b)}function me(b){return e.enter("htmlTextData"),a(b)}}const Fr={name:"labelEnd",resolveAll:iu,resolveTo:au,tokenize:ou},tu={tokenize:su},nu={tokenize:lu},ru={tokenize:cu};function iu(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Ve(e,0,e.length,n),e}function au(e,t){let n=e.length,r=0,i,o,a,s;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const l={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[o][1].start},end:{...e[a][1].end}},u={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[a-2][1].start}};return s=[["enter",l,t],["enter",c,t]],s=Je(s,e.slice(o+1,o+r+3)),s=Je(s,[["enter",u,t]]),s=Je(s,Pn(t.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),t)),s=Je(s,[["exit",u,t],e[a-2],e[a-1],["exit",c,t]]),s=Je(s,e.slice(a+1)),s=Je(s,[["exit",l,t]]),Ve(e,o,e.length,s),e}function ou(e,t,n){const r=this;let i=r.events.length,o,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return s;function s(f){return o?o._inactive?d(f):(a=r.parser.defined.includes(ot(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),l):n(f)}function l(f){return f===40?e.attempt(tu,u,a?u:d)(f):f===91?e.attempt(nu,u,a?c:d)(f):a?u(f):d(f)}function c(f){return e.attempt(ru,u,d)(f)}function u(f){return t(f)}function d(f){return o._balanced=!0,n(f)}}function su(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return ye(d)?Jt(e,o)(d):o(d)}function o(d){return d===41?u(d):Ma(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function a(d){return ye(d)?Jt(e,l)(d):u(d)}function s(d){return n(d)}function l(d){return d===34||d===39||d===40?La(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function c(d){return ye(d)?Jt(e,u)(d):u(d)}function u(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function lu(e,t,n){const r=this;return i;function i(s){return Da.call(r,e,o,a,"reference","referenceMarker","referenceString")(s)}function o(s){return r.parser.defined.includes(ot(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function cu(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const uu={name:"labelStartImage",resolveAll:Fr.resolveAll,tokenize:du};function du(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),o}function o(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):n(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const pu={name:"labelStartLink",resolveAll:Fr.resolveAll,tokenize:fu};function fu(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),o}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const Xn={name:"lineEnding",tokenize:gu};function gu(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),de(e,t,"linePrefix")}}const vn={name:"thematicBreak",tokenize:mu};function mu(e,t,n){let r=0,i;return o;function o(c){return e.enter("thematicBreak"),a(c)}function a(c){return i=c,s(c)}function s(c){return c===i?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||Y(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===i?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),oe(c)?de(e,s,"whitespace")(c):s(c))}}const Ke={continuation:{tokenize:yu},exit:_u,name:"list",tokenize:xu},hu={partial:!0,tokenize:ku},bu={partial:!0,tokenize:Eu};function xu(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return s;function s(p){const h=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Er(p)){if(r.containerState.type||(r.containerState.type=h,e.enter(h,{_container:!0})),h==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(vn,n,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(p)}return n(p)}function l(p){return Er(p)&&++a<10?(e.consume(p),l):(!r.interrupt||a<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):n(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(on,r.interrupt?n:u,e.attempt(hu,f,d))}function u(p){return r.containerState.initialBlankLine=!0,o++,f(p)}function d(p){return oe(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),f):n(p)}function f(p){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function yu(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(on,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,de(e,t,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!oe(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(bu,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,de(e,e.attempt(Ke,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function Eu(e,t,n){const r=this;return de(e,i,"listItemIndent",r.containerState.size+1);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(o):n(o)}}function _u(e){e.exit(this.containerState.type)}function ku(e,t,n){const r=this;return de(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const a=r.events[r.events.length-1];return!oe(o)&&a&&a[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const vi={name:"setextUnderline",resolveTo:wu,tokenize:Nu};function wu(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",a,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function Nu(e,t,n){const r=this;let i;return o;function o(c){let u=r.events.length,d;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){d=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=c,a(c)):n(c)}function a(c){return e.enter("setextHeadingLineSequence"),s(c)}function s(c){return c===i?(e.consume(c),s):(e.exit("setextHeadingLineSequence"),oe(c)?de(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||Y(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const Su={tokenize:vu};function vu(e){const t=this,n=e.attempt(on,r,e.attempt(this.parser.constructs.flowInitial,i,de(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Oc,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Tu={resolveAll:Ba()},Cu=Pa("string"),Au=Pa("text");function Pa(e){return{resolveAll:Ba(e==="text"?Iu:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,a,s);return a;function a(u){return c(u)?o(u):s(u)}function s(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),l}function l(u){return c(u)?(n.exit("data"),o(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;const d=i[u];let f=-1;if(d)for(;++f<d.length;){const p=d[f];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Ba(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function Iu(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,a=-1,s=0,l;for(;o--;){const c=i[o];if(typeof c=="string"){for(a=c.length;c.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(c===-2)l=!0,s++;else if(c!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const c={type:n===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?a:r.start._bufferIndex+a,_index:r.start._index+o,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const Ou={42:Ke,43:Ke,45:Ke,48:Ke,49:Ke,50:Ke,51:Ke,52:Ke,53:Ke,54:Ke,55:Ke,56:Ke,57:Ke,62:Aa},Ru={91:Pc},Mu={[-2]:Zn,[-1]:Zn,32:Zn},Du={35:jc,42:vn,45:[vi,vn],60:qc,61:vi,95:vn,96:Ni,126:Ni},Lu={38:Oa,92:Ia},Pu={[-5]:Xn,[-4]:Xn,[-3]:Xn,33:uu,38:Oa,42:_r,60:[pc,Jc],91:pu,92:[Uc,Ia],93:Fr,95:_r,96:Sc},Bu={null:[_r,Tu]},Fu={null:[42,95]},zu={null:[]},Uu=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Fu,contentInitial:Ru,disable:zu,document:Ou,flow:Du,flowInitial:Mu,insideSpan:Bu,string:Lu,text:Pu},Symbol.toStringTag,{value:"Module"}));function $u(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let a=[],s=[];const l={attempt:j(L),check:j(w),consume:T,enter:S,exit:O,interrupt:j(w,{interrupt:!0})},c={code:null,containerState:{},defineSkip:y,events:[],now:h,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d};let u=t.tokenize.call(c,l);return t.resolveAll&&o.push(t),c;function d(B){return a=Je(a,B),_(),a[a.length-1]!==null?[]:(K(t,0),c.events=Pn(o,c.events,c),c.events)}function f(B,U){return Hu(p(B),U)}function p(B){return ju(a,B)}function h(){const{_bufferIndex:B,_index:U,line:te,column:P,offset:I}=r;return{_bufferIndex:B,_index:U,line:te,column:P,offset:I}}function y(B){i[B.line]=B.column,N()}function _(){let B;for(;r._index<a.length;){const U=a[r._index];if(typeof U=="string")for(B=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===B&&r._bufferIndex<U.length;)E(U.charCodeAt(r._bufferIndex));else E(U)}}function E(B){u=u(B)}function T(B){Y(B)?(r.line++,r.column=1,r.offset+=B===-3?2:1,N()):B!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=B}function S(B,U){const te=U||{};return te.type=B,te.start=h(),c.events.push(["enter",te,c]),s.push(te),te}function O(B){const U=s.pop();return U.end=h(),c.events.push(["exit",U,c]),U}function L(B,U){K(B,U.from)}function w(B,U){U.restore()}function j(B,U){return te;function te(P,I,J){let se,ee,me,b;return Array.isArray(P)?ue(P):"tokenize"in P?ue([P]):fe(P);function fe(ke){return Ye;function Ye(we){const Ie=we!==null&&ke[we],Te=we!==null&&ke.null,et=[...Array.isArray(Ie)?Ie:Ie?[Ie]:[],...Array.isArray(Te)?Te:Te?[Te]:[]];return ue(et)(we)}}function ue(ke){return se=ke,ee=0,ke.length===0?J:x(ke[ee])}function x(ke){return Ye;function Ye(we){return b=G(),me=ke,ke.partial||(c.currentConstruct=ke),ke.name&&c.parser.constructs.disable.null.includes(ke.name)?Oe():ke.tokenize.call(U?Object.assign(Object.create(c),U):c,l,ve,Oe)(we)}}function ve(ke){return B(me,b),I}function Oe(ke){return b.restore(),++ee<se.length?x(se[ee]):J}}}function K(B,U){B.resolveAll&&!o.includes(B)&&o.push(B),B.resolve&&Ve(c.events,U,c.events.length-U,B.resolve(c.events.slice(U),c)),B.resolveTo&&(c.events=B.resolveTo(c.events,c))}function G(){const B=h(),U=c.previous,te=c.currentConstruct,P=c.events.length,I=Array.from(s);return{from:P,restore:J};function J(){r=B,c.previous=U,c.currentConstruct=te,c.events.length=P,s=I,N()}}function N(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function ju(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,o)];else{if(a=e.slice(n,i),r>-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}function Hu(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let a;if(typeof o=="string")a=o;else switch(o){case-5:{a="\r";break}case-4:{a=`
|
|
3
3
|
`;break}case-3:{a=`\r
|
|
4
4
|
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(o)}i=o===-2,r.push(a)}return r.join("")}function Ku(e){const r={constructs:Ta([Uu,...(e||{}).extensions||[]]),content:i(ac),defined:[],document:i(sc),flow:i(Su),lazy:{},string:i(Cu),text:i(Au)};return r;function i(o){return a;function a(s){return $u(r,o,s)}}}function Gu(e){for(;!Ra(e););return e}const Ti=/[\0\t\n\r]/g;function qu(){let e=1,t="",n=!0,r;return i;function i(o,a,s){const l=[];let c,u,d,f,p;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(a||void 0).decode(o)),d=0,t="",n&&(o.charCodeAt(0)===65279&&d++,n=void 0);d<o.length;){if(Ti.lastIndex=d,c=Ti.exec(o),f=c&&c.index!==void 0?c.index:o.length,p=o.charCodeAt(f),!c){t=o.slice(d);break}if(p===10&&d===f&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),d<f&&(l.push(o.slice(d,f)),e+=f-d),p){case 0:{l.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,l.push(-2);e++<u;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}d=f+1}return s&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const Wu=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Vu(e){return e.replace(Wu,Yu)}function Yu(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return Ca(n.slice(o?2:1),o?16:10)}return Br(n)||e}const Fa={}.hasOwnProperty;function Zu(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Xu(n)(Gu(Ku(n).document().write(qu()(e,t,!0))))}function Xu(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(yt),autolinkProtocol:G,autolinkEmail:G,atxHeading:o(Ze),blockQuote:o(Te),characterEscape:G,characterReference:G,codeFenced:o(et),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(et,a),codeText:o(tt,a),codeTextData:G,data:G,codeFlowValue:G,definition:o(Rt),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(xt),hardBreakEscape:o(le),hardBreakTrailing:o(le),htmlFlow:o(nt,a),htmlFlowData:G,htmlText:o(nt,a),htmlTextData:G,image:o(rt),label:a,link:o(yt),listItem:o(Kt),listItemValue:f,listOrdered:o(St,d),listUnordered:o(St),paragraph:o(Mt),reference:x,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(Ze),strong:o(st),thematicBreak:o(Dt)},exit:{atxHeading:l(),atxHeadingSequence:L,autolink:l(),autolinkEmail:Ie,autolinkProtocol:we,blockQuote:l(),characterEscapeValue:N,characterReferenceMarkerHexadecimal:Oe,characterReferenceMarkerNumeric:Oe,characterReferenceValue:ke,characterReference:Ye,codeFenced:l(_),codeFencedFence:y,codeFencedFenceInfo:p,codeFencedFenceMeta:h,codeFlowValue:N,codeIndented:l(E),codeText:l(I),codeTextData:N,data:N,definition:l(),definitionDestinationString:O,definitionLabelString:T,definitionTitleString:S,emphasis:l(),hardBreakEscape:l(U),hardBreakTrailing:l(U),htmlFlow:l(te),htmlFlowData:N,htmlText:l(P),htmlTextData:N,image:l(se),label:me,labelText:ee,lineEnding:B,link:l(J),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ve,resourceDestinationString:b,resourceTitleString:fe,resource:ue,setextHeading:l(K),setextHeadingLineSequence:j,setextHeadingText:w,strong:l(),thematicBreak:l()}};za(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(v){let D={type:"root",children:[]};const Q={stack:[D],tokenStack:[],config:t,enter:s,exit:c,buffer:a,resume:u,data:n},ie=[];let pe=-1;for(;++pe<v.length;)if(v[pe][1].type==="listOrdered"||v[pe][1].type==="listUnordered")if(v[pe][0]==="enter")ie.push(pe);else{const Le=ie.pop();pe=i(v,Le,pe)}for(pe=-1;++pe<v.length;){const Le=t[v[pe][0]];Fa.call(Le,v[pe][1].type)&&Le[v[pe][1].type].call(Object.assign({sliceSerialize:v[pe][2].sliceSerialize},Q),v[pe][1])}if(Q.tokenStack.length>0){const Le=Q.tokenStack[Q.tokenStack.length-1];(Le[1]||Ci).call(Q,void 0,Le[0])}for(D.position={start:wt(v.length>0?v[0][1].start:{line:1,column:1,offset:0}),end:wt(v.length>0?v[v.length-2][1].end:{line:1,column:1,offset:0})},pe=-1;++pe<t.transforms.length;)D=t.transforms[pe](D)||D;return D}function i(v,D,Q){let ie=D-1,pe=-1,Le=!1,it,He,Qe,lt;for(;++ie<=Q;){const Re=v[ie];switch(Re[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Re[0]==="enter"?pe++:pe--,lt=void 0;break}case"lineEndingBlank":{Re[0]==="enter"&&(it&&!lt&&!pe&&!Qe&&(Qe=ie),lt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:lt=void 0}if(!pe&&Re[0]==="enter"&&Re[1].type==="listItemPrefix"||pe===-1&&Re[0]==="exit"&&(Re[1].type==="listUnordered"||Re[1].type==="listOrdered")){if(it){let ct=ie;for(He=void 0;ct--;){const Ue=v[ct];if(Ue[1].type==="lineEnding"||Ue[1].type==="lineEndingBlank"){if(Ue[0]==="exit")continue;He&&(v[He][1].type="lineEndingBlank",Le=!0),Ue[1].type="lineEnding",He=ct}else if(!(Ue[1].type==="linePrefix"||Ue[1].type==="blockQuotePrefix"||Ue[1].type==="blockQuotePrefixWhitespace"||Ue[1].type==="blockQuoteMarker"||Ue[1].type==="listItemIndent"))break}Qe&&(!He||Qe<He)&&(it._spread=!0),it.end=Object.assign({},He?v[He][1].start:Re[1].end),v.splice(He||ie,0,["exit",it,Re[2]]),ie++,Q++}if(Re[1].type==="listItemPrefix"){const ct={type:"listItem",_spread:!1,start:Object.assign({},Re[1].start),end:void 0};it=ct,v.splice(ie,0,["enter",ct,Re[2]]),ie++,Q++,Qe=void 0,lt=!0}}}return v[D][1]._spread=Le,Q}function o(v,D){return Q;function Q(ie){s.call(this,v(ie),ie),D&&D.call(this,ie)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(v,D,Q){this.stack[this.stack.length-1].children.push(v),this.stack.push(v),this.tokenStack.push([D,Q||void 0]),v.position={start:wt(D.start),end:void 0}}function l(v){return D;function D(Q){v&&v.call(this,Q),c.call(this,Q)}}function c(v,D){const Q=this.stack.pop(),ie=this.tokenStack.pop();if(ie)ie[0].type!==v.type&&(D?D.call(this,v,ie[0]):(ie[1]||Ci).call(this,v,ie[0]));else throw new Error("Cannot close `"+v.type+"` ("+Qt({start:v.start,end:v.end})+"): it’s not open");Q.position.end=wt(v.end)}function u(){return Pr(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(v){if(this.data.expectingFirstListItemValue){const D=this.stack[this.stack.length-2];D.start=Number.parseInt(this.sliceSerialize(v),10),this.data.expectingFirstListItemValue=void 0}}function p(){const v=this.resume(),D=this.stack[this.stack.length-1];D.lang=v}function h(){const v=this.resume(),D=this.stack[this.stack.length-1];D.meta=v}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){const v=this.resume(),D=this.stack[this.stack.length-1];D.value=v.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const v=this.resume(),D=this.stack[this.stack.length-1];D.value=v.replace(/(\r?\n|\r)$/g,"")}function T(v){const D=this.resume(),Q=this.stack[this.stack.length-1];Q.label=D,Q.identifier=ot(this.sliceSerialize(v)).toLowerCase()}function S(){const v=this.resume(),D=this.stack[this.stack.length-1];D.title=v}function O(){const v=this.resume(),D=this.stack[this.stack.length-1];D.url=v}function L(v){const D=this.stack[this.stack.length-1];if(!D.depth){const Q=this.sliceSerialize(v).length;D.depth=Q}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function j(v){const D=this.stack[this.stack.length-1];D.depth=this.sliceSerialize(v).codePointAt(0)===61?1:2}function K(){this.data.setextHeadingSlurpLineEnding=void 0}function G(v){const Q=this.stack[this.stack.length-1].children;let ie=Q[Q.length-1];(!ie||ie.type!=="text")&&(ie=Xe(),ie.position={start:wt(v.start),end:void 0},Q.push(ie)),this.stack.push(ie)}function N(v){const D=this.stack.pop();D.value+=this.sliceSerialize(v),D.position.end=wt(v.end)}function B(v){const D=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Q=D.children[D.children.length-1];Q.position.end=wt(v.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(D.type)&&(G.call(this,v),N.call(this,v))}function U(){this.data.atHardBreak=!0}function te(){const v=this.resume(),D=this.stack[this.stack.length-1];D.value=v}function P(){const v=this.resume(),D=this.stack[this.stack.length-1];D.value=v}function I(){const v=this.resume(),D=this.stack[this.stack.length-1];D.value=v}function J(){const v=this.stack[this.stack.length-1];if(this.data.inReference){const D=this.data.referenceType||"shortcut";v.type+="Reference",v.referenceType=D,delete v.url,delete v.title}else delete v.identifier,delete v.label;this.data.referenceType=void 0}function se(){const v=this.stack[this.stack.length-1];if(this.data.inReference){const D=this.data.referenceType||"shortcut";v.type+="Reference",v.referenceType=D,delete v.url,delete v.title}else delete v.identifier,delete v.label;this.data.referenceType=void 0}function ee(v){const D=this.sliceSerialize(v),Q=this.stack[this.stack.length-2];Q.label=Vu(D),Q.identifier=ot(D).toLowerCase()}function me(){const v=this.stack[this.stack.length-1],D=this.resume(),Q=this.stack[this.stack.length-1];if(this.data.inReference=!0,Q.type==="link"){const ie=v.children;Q.children=ie}else Q.alt=D}function b(){const v=this.resume(),D=this.stack[this.stack.length-1];D.url=v}function fe(){const v=this.resume(),D=this.stack[this.stack.length-1];D.title=v}function ue(){this.data.inReference=void 0}function x(){this.data.referenceType="collapsed"}function ve(v){const D=this.resume(),Q=this.stack[this.stack.length-1];Q.label=D,Q.identifier=ot(this.sliceSerialize(v)).toLowerCase(),this.data.referenceType="full"}function Oe(v){this.data.characterReferenceType=v.type}function ke(v){const D=this.sliceSerialize(v),Q=this.data.characterReferenceType;let ie;Q?(ie=Ca(D,Q==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ie=Br(D);const pe=this.stack[this.stack.length-1];pe.value+=ie}function Ye(v){const D=this.stack.pop();D.position.end=wt(v.end)}function we(v){N.call(this,v);const D=this.stack[this.stack.length-1];D.url=this.sliceSerialize(v)}function Ie(v){N.call(this,v);const D=this.stack[this.stack.length-1];D.url="mailto:"+this.sliceSerialize(v)}function Te(){return{type:"blockquote",children:[]}}function et(){return{type:"code",lang:null,meta:null,value:""}}function tt(){return{type:"inlineCode",value:""}}function Rt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function xt(){return{type:"emphasis",children:[]}}function Ze(){return{type:"heading",depth:0,children:[]}}function le(){return{type:"break"}}function nt(){return{type:"html",value:""}}function rt(){return{type:"image",title:null,url:"",alt:null}}function yt(){return{type:"link",title:null,url:"",children:[]}}function St(v){return{type:"list",ordered:v.type==="listOrdered",start:null,spread:v._spread,children:[]}}function Kt(v){return{type:"listItem",spread:v._spread,checked:null,children:[]}}function Mt(){return{type:"paragraph",children:[]}}function st(){return{type:"strong",children:[]}}function Xe(){return{type:"text",value:""}}function Dt(){return{type:"thematicBreak"}}}function wt(e){return{line:e.line,column:e.column,offset:e.offset}}function za(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?za(e,r):Qu(e,r)}}function Qu(e,t){let n;for(n in t)if(Fa.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Ci(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Qt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Qt({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Qt({start:t.start,end:t.end})+") is still open")}function Ju(e){const t=this;t.parser=n;function n(r){return Zu(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function ed(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function td(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./radix-BFvMxQq9.js";import{r as g}from"./vendor-D_-14Whs.js";import{S as w}from"./common-
|
|
1
|
+
import{j as e}from"./radix-BFvMxQq9.js";import{r as g}from"./vendor-D_-14Whs.js";import{S as w}from"./common-BbPYnoqq.js";import{M as P,B as y,a1 as A,L as K,t as d,A as N}from"./index-iQ0Xd3d6.js";import{C as U}from"./check-CyrGNFl1.js";import{P as M}from"./pencil-yXapP66e.js";import{T}from"./trash-2-Cvm2LlD0.js";import{P as z}from"./plus-CwldxWKW.js";function Y(){const{query:r}=P(),a=r.data;return e.jsxs("div",{className:"w-full px-6 py-6",children:[e.jsx(w,{title:"Customize",description:"Add tools and external providers the model can call during conversations."}),e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsx(L,{search:a?.search??{provider:"tavily",tavilyKeySet:!1,kagiKeySet:!1,searxngUrl:""},onSaved:()=>{r.refetch()}}),e.jsx($,{servers:a?.mcp?.servers??[]})]})]})}const C=[{id:"tavily",label:"Tavily",blurb:"AI-search API tuned for LLMs. Reliable default.",getKey:"https://app.tavily.com"},{id:"kagi",label:"Kagi",blurb:"Premium search, no bot-blocking, no tracking ($0.012/query).",getKey:"https://kagi.com/settings?p=api"},{id:"searxng",label:"SearXNG",blurb:"Your own self-hosted meta-search. Fully local — no key, just a URL."}];function L({search:r,onSaved:a}){const{save:l}=P(),[n,x]=g.useState(r.provider),[p,u]=g.useState(""),c=C.find(s=>s.id===n),o=n==="searxng",v=n==="tavily"?r.tavilyKeySet:n==="kagi"?r.kagiKeySet:!!r.searxngUrl,k=s=>{x(s),u(s==="searxng"?r.searxngUrl:"")},f=()=>{const s=p.trim(),b={provider:n};o?b.searxngUrl=s:s&&n==="tavily"?b.tavilyApiKey=s:s&&n==="kagi"&&(b.kagiApiKey=s),l.mutate({search:b},{onSuccess:()=>{d.success(`Search set to ${c.label}${s?` — ${o?"URL":"key"} saved`:""}`),o||u(""),a()},onError:j=>d.error(j instanceof N?j.message:"Could not save search settings.")})};return e.jsxs("section",{className:"rounded-lg border border-border bg-panel p-4",children:[e.jsx("h2",{className:"mb-1 text-[13px] font-semibold uppercase tracking-wide text-faint",children:"Web Search"}),e.jsxs("p",{className:"mb-3 text-[12px] text-muted",children:["Choose a search provider. When one is configured, the model can call the"," ",e.jsx("span",{className:"font-mono text-ink",children:"web_search"})," tool automatically."]}),e.jsx("div",{className:"mb-3 inline-flex rounded-md border border-border p-0.5",children:C.map(s=>e.jsx("button",{onClick:()=>k(s.id),className:`rounded px-3 py-1 text-[13px] transition-colors ${n===s.id?"bg-bg text-ink":"text-muted hover:text-ink"}`,children:s.label},s.id))}),e.jsxs("p",{className:"mb-2 text-[12px] text-muted",children:[c.blurb," ",c.getKey&&e.jsx("a",{href:c.getKey,target:"_blank",rel:"noopener noreferrer",className:"text-ink underline-offset-2 hover:underline",children:"Get a key"})]}),e.jsx("div",{className:"mb-2 text-[13px] text-muted",children:v?e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-ink",children:[e.jsx(U,{size:13,style:{color:"var(--ok)"}})," ",o?"A URL is configured":"A key is configured"]}):o?"No URL configured":"No key configured"}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center",children:[e.jsx("input",{type:o?"text":"password",value:p,onChange:s=>u(s.target.value),placeholder:o?"http://localhost:8888":v?"Enter a new key to replace the current one":n==="tavily"?"tvly-…":"Kagi API key",autoComplete:"off",className:"flex-1 rounded-md border border-border bg-bg px-2 py-1.5 font-mono text-[13px] text-ink outline-none"}),e.jsx(y,{size:"sm",onClick:f,disabled:l.isPending,children:"Save"})]}),e.jsxs("p",{className:"mt-3 text-[12px] text-faint",children:[e.jsx("span",{className:"font-mono text-ink",children:"fetch_url"})," and"," ",e.jsx("span",{className:"font-mono text-ink",children:"run_code"})," (sandboxed JS) are always available — no key needed."]})]})}const E=()=>({name:"",transport:"stdio",command:"",argsStr:"",envStr:"",url:"",enabled:!0});function R(r){return{name:r.name,transport:r.transport,command:r.command??"",argsStr:(r.args??[]).join(", "),envStr:Object.entries(r.env??{}).map(([a,l])=>`${a}=${l}`).join(`
|
|
2
2
|
`),url:r.url??"",enabled:r.enabled}}function F(r){const a=r.argsStr.trim()?r.argsStr.split(",").map(n=>n.trim()).filter(Boolean):[],l={};for(const n of r.envStr.split(`
|
|
3
3
|
`)){const x=n.indexOf("=");x>0&&(l[n.slice(0,x).trim()]=n.slice(x+1).trim())}return{name:r.name.trim(),transport:r.transport,command:r.transport==="stdio"&&r.command.trim()||void 0,args:r.transport==="stdio"&&a.length?a:void 0,env:r.transport==="stdio"&&Object.keys(l).length?l:void 0,url:r.transport==="sse"&&r.url.trim()||void 0,enabled:r.enabled}}function $({servers:r}){const a=A(),[l,n]=g.useState(null),[x,p]=g.useState(!1),[u,c]=g.useState(E()),o=t=>c(i=>({...i,...t})),v=()=>{n(null),c(E()),p(!0)},k=t=>{n(t.id),c(R(t)),p(!0)},f=()=>{p(!1),n(null)},s=()=>{const t=F(u);if(!t.name)return void d.error("Server name is required.");if(t.transport==="stdio"&&!t.command)return void d.error("Command is required for stdio transport.");if(t.transport==="sse"&&!t.url)return void d.error("URL is required for SSE transport.");const i={onSuccess:()=>{d.success(l?"MCP server updated":"MCP server added"),f()},onError:h=>d.error(h instanceof N?h.message:"Could not save server.")};l?a.update.mutate({id:l,patch:t},i):a.add.mutate(t,i)},b=(t,i)=>{window.confirm(`Remove MCP server "${i}"?`)&&a.remove.mutate(t,{onError:h=>d.error(h instanceof N?h.message:"Could not remove server.")})},j=t=>{a.update.mutate({id:t.id,patch:{enabled:!t.enabled}},{onError:i=>d.error(i instanceof N?i.message:"Could not update server.")})},m=u,S=a.add.isPending||a.update.isPending;return e.jsxs("section",{className:"rounded-lg border border-border bg-panel p-4",children:[e.jsx("h2",{className:"mb-1 text-[13px] font-semibold uppercase tracking-wide text-faint",children:"MCP Servers"}),e.jsx("p",{className:"mb-3 text-[12px] text-muted",children:"Connect external tool providers via the Model Context Protocol. Supports stdio (subprocess) and SSE (HTTP) transports per the MCP 2024-11-05 spec."}),r.length>0&&e.jsx("div",{className:"mb-3 flex flex-col gap-1.5",children:r.map(t=>e.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-border bg-panel-2 px-3 py-2",children:[e.jsx("span",{className:"shrink-0 rounded px-1.5 py-0.5 font-mono text-[10px] font-medium",style:{background:t.transport==="sse"?"color-mix(in srgb, var(--accent) 15%, transparent)":"color-mix(in srgb, var(--muted) 20%, transparent)",color:t.transport==="sse"?"var(--accent)":"var(--muted)"},children:t.transport}),e.jsx("span",{className:"flex-1 truncate text-[13px] font-medium text-ink",children:t.name}),e.jsx("span",{className:"hidden shrink-0 max-w-[220px] truncate font-mono text-[11px] text-faint sm:block",title:t.transport==="stdio"?t.command:t.url,children:t.transport==="stdio"?t.command?.split(/[\\/]/).slice(-1)[0]:t.url}),e.jsx("input",{type:"checkbox",checked:t.enabled,onChange:()=>j(t),title:t.enabled?"Disable":"Enable",className:"h-3.5 w-3.5 accent-[var(--accent)]"}),e.jsx("button",{type:"button",onClick:()=>k(t),title:"Edit",className:"rounded p-1 text-faint transition-colors hover:bg-bg hover:text-ink",children:e.jsx(M,{size:12})}),e.jsx("button",{type:"button",onClick:()=>b(t.id,t.name),title:"Delete",className:"rounded p-1 transition-colors hover:bg-bg",style:{color:"var(--err)"},children:e.jsx(T,{size:12})})]},t.id))}),x?e.jsxs("div",{className:"flex flex-col gap-3 rounded-lg border border-border bg-panel-2 p-3",children:[e.jsx("div",{className:"text-[13px] font-medium text-ink",children:l?"Edit server":"Add server"}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("label",{className:"text-[12px] text-muted",children:"Name"}),e.jsx("input",{type:"text",value:m.name,onChange:t=>o({name:t.target.value}),placeholder:"My Tool Server",className:"rounded-md border border-border bg-bg px-2 py-1.5 text-[13px] text-ink outline-none"})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("label",{className:"text-[12px] text-muted",children:"Transport"}),e.jsx("div",{className:"flex gap-4",children:["stdio","sse"].map(t=>e.jsxs("label",{className:"flex cursor-pointer items-center gap-1.5 text-[13px] text-ink",children:[e.jsx("input",{type:"radio",name:"mcp-transport",checked:m.transport===t,onChange:()=>o({transport:t}),className:"h-3.5 w-3.5 accent-[var(--accent)]"}),e.jsx("span",{className:"font-mono",children:t}),e.jsx("span",{className:"text-[11px] text-faint",children:t==="stdio"?"(subprocess)":"(HTTP)"})]},t))})]}),m.transport==="stdio"?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("label",{className:"text-[12px] text-muted",children:"Command"}),e.jsx("input",{type:"text",value:m.command,onChange:t=>o({command:t.target.value}),placeholder:"npx -y @modelcontextprotocol/server-filesystem",className:"rounded-md border border-border bg-bg px-2 py-1.5 font-mono text-[12px] text-ink outline-none"})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("label",{className:"text-[12px] text-muted",children:["Args ",e.jsx("span",{className:"text-faint",children:"(comma-separated, optional)"})]}),e.jsx("input",{type:"text",value:m.argsStr,onChange:t=>o({argsStr:t.target.value}),placeholder:"--port, 3000",className:"rounded-md border border-border bg-bg px-2 py-1.5 font-mono text-[12px] text-ink outline-none"})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("label",{className:"text-[12px] text-muted",children:["Env vars ",e.jsx("span",{className:"text-faint",children:"(KEY=VALUE, one per line, optional)"})]}),e.jsx("textarea",{rows:2,value:m.envStr,onChange:t=>o({envStr:t.target.value}),placeholder:`API_KEY=abc123
|
|
4
4
|
DEBUG=true`,className:"resize-none rounded-md border border-border bg-bg px-2 py-1.5 font-mono text-[12px] text-ink outline-none"})]})]}):e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("label",{className:"text-[12px] text-muted",children:"URL"}),e.jsx("input",{type:"text",value:m.url,onChange:t=>o({url:t.target.value}),placeholder:"http://localhost:3000",className:"rounded-md border border-border bg-bg px-2 py-1.5 font-mono text-[12px] text-ink outline-none"})]}),e.jsxs("label",{className:"flex cursor-pointer items-center gap-2 text-[13px] text-ink",children:[e.jsx("input",{type:"checkbox",checked:m.enabled,onChange:t=>o({enabled:t.target.checked}),className:"h-3.5 w-3.5 accent-[var(--accent)]"}),"Enable immediately"]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(y,{size:"sm",onClick:s,disabled:S,children:[S?e.jsx(K,{size:13,className:"animate-spin"}):null,l?"Update":"Add"]}),e.jsx(y,{variant:"outline",size:"sm",onClick:f,children:"Cancel"})]})]}):e.jsxs(y,{variant:"outline",size:"sm",onClick:v,children:[e.jsx(z,{size:13}),"Add server"]})]})}export{Y as CustomizeScreen};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./radix-BFvMxQq9.js";import{r as p}from"./vendor-D_-14Whs.js";import{C as m}from"./copy-button-
|
|
1
|
+
import{j as e}from"./radix-BFvMxQq9.js";import{r as p}from"./vendor-D_-14Whs.js";import{C as m}from"./copy-button-BKEOGElI.js";import{S as y}from"./common-BbPYnoqq.js";import{c as f,$ as N,B as v,t as b,A as g,a0 as k}from"./index-iQ0Xd3d6.js";import{T as C}from"./trash-2-Cvm2LlD0.js";import{P as S}from"./plus-CwldxWKW.js";import"./check-CyrGNFl1.js";const w=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],A=f("globe",w);const I=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],E=f("key",I);const L=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],P=f("terminal",L),u=window.location.origin,T=[{method:"POST",path:"/v1/chat/completions",desc:"OpenAI Chat Completions"},{method:"POST",path:"/v1/messages",desc:"Anthropic Messages"},{method:"GET",path:"/v1/models",desc:"OpenAI Models List"},{method:"GET",path:"/api/v1/status",desc:"Daemon Status"},{method:"GET",path:"/api/v1/engines",desc:"Engine Registry"},{method:"GET",path:"/api/v1/models",desc:"Model Library"},{method:"GET",path:"/api/v1/keys",desc:"API Keys"}],K=[{id:"claude-code",name:"Claude Code",desc:"Anthropic-compatible endpoint — the hero demo"},{id:"opencode",name:"opencode",desc:"OpenAI-compatible, AI SDK provider config"},{id:"kilo",name:"Kilo Code",desc:"OpenAI-compatible, kilo.jsonc provider entry"},{id:"qwen",name:"Qwen Code",desc:"OpenAI-compatible (OPENAI_BASE_URL)"}];function V(){return e.jsxs("div",{className:"w-full px-6 py-6",children:[e.jsx(y,{title:"Developer",description:"Server URLs, API endpoints, keys, and CLI setup."}),e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsx(_,{}),e.jsx(G,{}),e.jsx(z,{}),e.jsx(O,{})]})]})}function _(){return e.jsxs("section",{className:"rounded-lg border border-border bg-panel p-4",children:[e.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[e.jsx(A,{size:15,className:"text-accent"}),e.jsx("h2",{className:"text-[13px] font-semibold uppercase tracking-wide text-faint",children:"Server"})]}),e.jsxs("div",{className:"flex items-center justify-between py-1",children:[e.jsx("span",{className:"text-[13px] text-muted",children:"Local URL"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("code",{className:"font-mono text-[13px] text-ink",children:u}),e.jsx(m,{text:u})]})]})]})}function G(){const{query:s,create:n,revoke:c}=N(),[a,l]=p.useState(""),[r,o]=p.useState(null),x=s.data?.keys??[],i=()=>{const t=a.trim();t&&n.mutate(t,{onSuccess:d=>{l(""),o(d.key)},onError:d=>b.error(d instanceof g?d.message:"Could not create key.")})},h=(t,d)=>{c.mutate(t,{onSuccess:()=>{r?.startsWith(d)&&o(null)},onError:j=>b.error(j instanceof g?j.message:"Could not revoke key.")})};return e.jsxs("section",{className:"rounded-lg border border-border bg-panel p-4",children:[e.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[e.jsx(E,{size:15,className:"text-accent"}),e.jsx("h2",{className:"text-[13px] font-semibold uppercase tracking-wide text-faint",children:"API Keys"})]}),r&&e.jsxs("div",{className:"mb-4 rounded-md border p-3",style:{borderColor:"var(--ok)",background:"color-mix(in srgb, var(--ok) 8%, transparent)"},children:[e.jsx("p",{className:"mb-1.5 text-[12px] font-medium",style:{color:"var(--ok)"},children:"Key created — copy it now, it won't be shown again."}),e.jsxs("div",{className:"flex items-center gap-2 rounded border border-border bg-bg px-2 py-1.5",children:[e.jsx("code",{className:"min-w-0 flex-1 break-all font-mono text-[12px] text-ink",children:r}),e.jsx(m,{text:r})]})]}),x.length===0&&!r&&e.jsx("p",{className:"mb-3 text-[13px] text-faint",children:"No API keys yet."}),x.length>0&&e.jsx("div",{className:"mb-3 divide-y divide-border rounded-md border border-border",children:x.map(t=>e.jsxs("div",{className:"flex items-center justify-between px-3 py-2.5",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-[13px] font-medium text-ink",children:t.name}),e.jsxs("span",{className:"ml-2 font-mono text-[11px] text-faint",children:[t.prefix,"…"]})]}),e.jsx("button",{type:"button",onClick:()=>h(t.id,t.prefix),className:"rounded p-1 text-faint transition-colors hover:text-err",title:"Revoke key",children:e.jsx(C,{size:14})})]},t.id))}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{value:a,onChange:t=>l(t.target.value),placeholder:"Key name (e.g. claude-code)",className:"flex-1 rounded-md border border-border bg-bg px-2.5 py-1.5 text-[13px] text-ink outline-none placeholder:text-faint focus:border-[color:var(--accent)]",onKeyDown:t=>t.key==="Enter"&&i()}),e.jsxs(v,{size:"sm",onClick:i,disabled:!a.trim()||n.isPending,children:[e.jsx(S,{size:13}),n.isPending?"Creating…":"Create"]})]})]})}function z(){return e.jsxs("section",{className:"rounded-lg border border-border bg-panel p-4",children:[e.jsx("h2",{className:"mb-3 text-[13px] font-semibold uppercase tracking-wide text-faint",children:"Available APIs"}),e.jsx("div",{className:"divide-y divide-border rounded-md border border-border",children:T.map(({method:s,path:n,desc:c})=>e.jsxs("div",{className:"flex items-center gap-3 px-3 py-2",children:[e.jsx("span",{className:"w-10 shrink-0 rounded px-1 py-0.5 text-center font-mono text-[10px] font-bold uppercase",style:{background:s==="GET"?"color-mix(in srgb, var(--ok) 15%, transparent)":"color-mix(in srgb, var(--accent) 15%, transparent)",color:s==="GET"?"var(--ok)":"var(--accent)"},children:s}),e.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-[13px] text-ink",children:n}),e.jsx("span",{className:"hidden shrink-0 text-[11px] text-muted sm:block",children:c}),e.jsx(m,{text:`${u}${n}`})]},n))})]})}function O(){return e.jsxs("section",{className:"rounded-lg border border-border bg-panel p-4",children:[e.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[e.jsx(P,{size:15,className:"text-accent"}),e.jsx("h2",{className:"text-[13px] font-semibold uppercase tracking-wide text-faint",children:"Connect a CLI"})]}),e.jsx("div",{className:"flex flex-col gap-2.5",children:K.map(s=>e.jsx(B,{cli:s},s.id))})]})}function B({cli:s}){const[n,c]=p.useState(null),[a,l]=p.useState(!1),[r,o]=p.useState(!1),x=()=>{if(r){o(!1);return}if(n){o(!0);return}l(!0),k(s.id).then(i=>{c(i),o(!0)}).catch(()=>b.error("Could not fetch setup snippets.")).finally(()=>l(!1))};return e.jsxs("div",{className:"rounded-md border border-border bg-bg",children:[e.jsxs("div",{className:"flex items-center justify-between px-3 py-2.5",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-[13px] font-semibold text-ink",children:s.name}),e.jsx("span",{className:"ml-2 text-[11px] text-muted",children:s.desc})]}),e.jsx(v,{size:"sm",variant:r?"outline":"default",onClick:x,disabled:a,children:a?"Loading…":r?"Hide":"Get setup"})]}),r&&n&&e.jsx("div",{className:"flex flex-col gap-2.5 border-t border-border px-3 pb-3 pt-2.5",children:n.steps.map((i,h)=>e.jsx(R,{step:i},h))})]})}function R({step:s}){return e.jsxs("div",{children:[e.jsx("div",{className:"mb-1 text-[11px] text-faint",children:s.label}),e.jsxs("div",{className:"relative rounded border border-border bg-panel-2",children:[e.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap break-all px-3 py-2 pr-10 font-mono text-[12px] leading-relaxed text-ink",children:s.snippet}),e.jsx(m,{text:s.snippet,className:"absolute right-2 top-2"})]})]})}export{V as DeveloperScreen};
|