@hienlh/ppm 0.9.91 → 0.9.93
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/CHANGELOG.md +7 -1
- package/dist/web/assets/{chat-tab-BPoQy-Fp.js → chat-tab-CC721_mQ.js} +1 -1
- package/dist/web/assets/{code-editor-DDW9dlUL.js → code-editor-BZ0xwZ4Z.js} +1 -1
- package/dist/web/assets/{conflict-editor-Bt24HTjk.js → conflict-editor-Bwls2-yk.js} +1 -1
- package/dist/web/assets/{database-viewer-DbD8rfQF.js → database-viewer-DiXWqOJH.js} +1 -1
- package/dist/web/assets/{diff-viewer-DVWJoL2y.js → diff-viewer-CC-RmeV5.js} +1 -1
- package/dist/web/assets/extension-webview-C1d6fezE.js +3 -0
- package/dist/web/assets/{index-DK4yJlIj.js → index-BcIyrJiY.js} +3 -3
- package/dist/web/assets/keybindings-store-BIufrOzJ.js +1 -0
- package/dist/web/assets/{markdown-renderer-CCq6xBWp.js → markdown-renderer-C5UPA1-7.js} +1 -1
- package/dist/web/assets/{port-forwarding-tab-BBwfD-s_.js → port-forwarding-tab-DmifthYH.js} +1 -1
- package/dist/web/assets/{postgres-viewer-Dqnhi-ci.js → postgres-viewer-Bo7jEQfQ.js} +1 -1
- package/dist/web/assets/{settings-tab-DX9zkGvD.js → settings-tab-D9GicyA9.js} +1 -1
- package/dist/web/assets/{sql-query-editor-CxODOF9o.js → sql-query-editor-DaePHpQI.js} +1 -1
- package/dist/web/assets/{sqlite-viewer-DAgT72tD.js → sqlite-viewer-pacZlViY.js} +1 -1
- package/dist/web/assets/{terminal-tab-5ib6rUAO.js → terminal-tab-DpzE3yoD.js} +1 -1
- package/dist/web/assets/{use-monaco-theme-vmoBT6np.js → use-monaco-theme-CM4IMROI.js} +1 -1
- package/dist/web/index.html +1 -1
- package/dist/web/sw.js +1 -1
- package/package.json +1 -1
- package/packages/ext-git-graph/src/extension.ts +5 -20
- package/packages/vscode-compat/src/window.ts +14 -0
- package/src/server/ws/extensions.ts +12 -0
- package/src/services/extension-host-worker.ts +12 -0
- package/src/types/extension-messages.ts +1 -0
- package/src/web/components/extensions/extension-webview.tsx +24 -3
- package/src/web/hooks/use-extension-ws.ts +37 -10
- package/dist/web/assets/extension-webview-nq9rDNgj.js +0 -3
- package/dist/web/assets/keybindings-store-CpFk-yNF.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./react-nm2Ru1Pt.js";import"./api-client-BvxmRZUi.js";import{w as e}from"./index-BcIyrJiY.js";export{e as useKeybindingsStore};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/c4Diagram-IC4MRINW-BIymcNsg.js","assets/dist-DZmJeHOA.js","assets/chunk-CFjPhJqf.js","assets/src-CqyWLlNZ.js","assets/chunk-GEFDOKGD-86LFbsAC.js","assets/math-CRc16Nj6.js","assets/chunk-7R4GIKGN-y8bfHEy-.js","assets/preload-helper-mr3rCizq.js","assets/isArrayLikeObject-ClzWCpcm.js","assets/chunk-JSJVCQXG-23eG9mgt.js","assets/flowDiagram-PKNHOUZH-CFYAfZBx.js","assets/chunk-PU5JKC2W-DD95Rx35.js","assets/channel-wumTB1if.js","assets/chunk-55IACEB6-DhZGI1l3.js","assets/chunk-FMBD7UC4-Bog4cpN-.js","assets/chunk-GLR3WWYH-Re-5eSlQ.js","assets/chunk-KYZI473N-gqRLpJ4w.js","assets/chunk-PQ6SQG4A-Bik13fTV.js","assets/chunk-YBOYWFTD-D_ILLe6_.js","assets/rough.esm-eLccZ4OJ.js","assets/chunk-O4XLMI2P-Vp_V4P-b.js","assets/line-CSuSrJ9J.js","assets/path-INs8XTPH.js","assets/array-BFDiaBgf.js","assets/chunk-MX3YWQON-B6g1ZH9X.js","assets/chunk-KX2RTZJC-CHj8TnTB.js","assets/chunk-XPW4576I-CgLyyW03.js","assets/erDiagram-INFDFZHY-DSkriYZ9.js","assets/gitGraphDiagram-K3NZZRJ6-BMgjjVys.js","assets/chunk-XZSTWKYB-DjV8xl5A.js","assets/isEmpty-BfLnxq-B.js","assets/_baseUniq-CyzdZeQH.js","assets/_basePickBy-Bj0dI1ei.js","assets/clone--z5KLAuR.js","assets/chunk-7E7YKBS2-DZcnC7Ow.js","assets/chunk-C72U2L5F-BHPkfQj2.js","assets/chunk-EGIJ26TM-nant2LXl.js","assets/chunk-L3YUKLVL-DnSMmNFC.js","assets/chunk-OZEHJAEY-lKq2SWjA.js","assets/chunk-R5LLSJPH-dRhXRnrb.js","assets/chunk-XIRO2GV7-DZBoNl1_.js","assets/mermaid-parser.core-CFdP1Z5_.js","assets/chunk-4BX2VUAB-CENmY7Kw.js","assets/chunk-QZHKN3VN-N3VXx1VH.js","assets/ganttDiagram-A5KZAMGK-KSn4XAU4.js","assets/linear-DFN_MPsw.js","assets/defaultLocale-ZeknFqNe.js","assets/init-0VJVrkRJ.js","assets/infoDiagram-LFFYTUFH-Diq4Cyc3.js","assets/chunk-HHEYEP7N-C45i5G_3.js","assets/pieDiagram-SKSYHLDU-Dovdlvhu.js","assets/ordinal-DpFn432U.js","assets/arc-CxgHJ7Z4.js","assets/quadrantDiagram-337W2JSQ-TXe6cU_F.js","assets/xychartDiagram-JWTSCODW-CtpjAakO.js","assets/requirementDiagram-Z7DCOOCP-CuiiuGS9.js","assets/sequenceDiagram-2WXFIKYE-B2D8IQDb.js","assets/classDiagram-VBA2DB6C-mr-Cb1me.js","assets/chunk-WL4C6EOR-B1iIvLOG.js","assets/classDiagram-v2-RAHNMMFH-BKe8_uda.js","assets/stateDiagram-RAJIS63D-ylr4HxPu.js","assets/dagre-CkhlMHnx.js","assets/graphlib-BWe1iK_s.js","assets/chunk-NQ4KR5QH-DX32345Y.js","assets/stateDiagram-v2-FVOUBMTO-D6zvxf3M.js","assets/journeyDiagram-4ABVD52K-CG_v5Aho.js","assets/timeline-definition-YZTLITO2-pMv1grvM.js","assets/mindmap-definition-YRQLILUH-pYPWwASE.js","assets/kanban-definition-K7BYSVSG-miB0-_Zq.js","assets/sankeyDiagram-WA2Y5GQK-BbRmhv0t.js","assets/diagram-P4PSJMXO-CW0eCkwC.js","assets/diagram-IFDJBPK2-nUcO8sN8.js","assets/blockDiagram-WCTKOSBZ-Ct57Wtfk.js","assets/architectureDiagram-2XIMDMQ5-D16OotsC.js","assets/cytoscape.esm-C8i2jUzT.js","assets/ishikawaDiagram-PHBUUO56-CiVEvp8o.js","assets/vennDiagram-LZ73GAT5-C-rkIUbo.js","assets/diagram-E7M64L7V-BZF0tSOr.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{o as e,r as t,t as n}from"./chunk-CFjPhJqf.js";import{t as r}from"./react-nm2Ru1Pt.js";import{n as i,t as a}from"./jsx-runtime-BRW_vwa9.js";import{t as o}from"./preload-helper-mr3rCizq.js";import{t as s}from"./utils-DX8jb5qv.js";import{i as c,r as l,t as u}from"./api-client-BvxmRZUi.js";import{E as d,T as f,_ as p,n as m,r as h}from"./index-DK4yJlIj.js";import{t as g}from"./isEmpty-BfLnxq-B.js";import{a as _,d as v,h as y,i as b,m as x,r as S}from"./chunk-GEFDOKGD-86LFbsAC.js";import{_ as C,g as w,h as T,p as E}from"./src-CqyWLlNZ.js";import{F as ee,G as te,H as ne,J as D,M as re,N as ie,S as ae,T as oe,X as se,Y as ce,Z as le,c as ue,f as de,g as fe,h as pe,l as me,n as he,p as ge,r as _e,t as ve,w as ye,x as be,y as xe,z as Se}from"./chunk-7R4GIKGN-y8bfHEy-.js";import{t as Ce}from"./chunk-HHEYEP7N-C45i5G_3.js";import{i as we,o as Te}from"./chunk-PU5JKC2W-DD95Rx35.js";import{n as Ee}from"./chunk-GLR3WWYH-Re-5eSlQ.js";import{n as De,t as Oe}from"./chunk-XPW4576I-CgLyyW03.js";var ke=i(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]);function Ae(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function je(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Me=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ne=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Pe={};function Fe(e,t){return((t||Pe).jsx?Ne:Me).test(e)}var Ie=/[ \t\n\f\r]/g;function Le(e){return typeof e==`object`?e.type===`text`?Re(e.value):!1:Re(e)}function Re(e){return e.replace(Ie,``)===``}var ze=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};ze.prototype.normal={},ze.prototype.property={},ze.prototype.space=void 0;function Be(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new ze(n,r,t)}function Ve(e){return e.toLowerCase()}var He=class{constructor(e,t){this.attribute=t,this.property=e}};He.prototype.attribute=``,He.prototype.booleanish=!1,He.prototype.boolean=!1,He.prototype.commaOrSpaceSeparated=!1,He.prototype.commaSeparated=!1,He.prototype.defined=!1,He.prototype.mustUseProperty=!1,He.prototype.number=!1,He.prototype.overloadedBoolean=!1,He.prototype.property=``,He.prototype.spaceSeparated=!1,He.prototype.space=void 0;var Ue=t({boolean:()=>Ge,booleanish:()=>Ke,commaOrSpaceSeparated:()=>Xe,commaSeparated:()=>Ye,number:()=>O,overloadedBoolean:()=>qe,spaceSeparated:()=>Je}),We=0,Ge=Ze(),Ke=Ze(),qe=Ze(),O=Ze(),Je=Ze(),Ye=Ze(),Xe=Ze();function Ze(){return 2**++We}var Qe=Object.keys(Ue),$e=class extends He{constructor(e,t,n,r){let i=-1;if(super(e,t),et(this,`space`,r),typeof n==`number`)for(;++i<Qe.length;){let e=Qe[i];et(this,Qe[i],(n&Ue[e])===Ue[e])}}};$e.prototype.defined=!0;function et(e,t,n){n&&(e[t]=n)}function tt(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new $e(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Ve(r)]=r,n[Ve(a.attribute)]=r}return new ze(t,n,e.space)}var nt=tt({properties:{ariaActiveDescendant:null,ariaAtomic:Ke,ariaAutoComplete:null,ariaBusy:Ke,ariaChecked:Ke,ariaColCount:O,ariaColIndex:O,ariaColSpan:O,ariaControls:Je,ariaCurrent:null,ariaDescribedBy:Je,ariaDetails:null,ariaDisabled:Ke,ariaDropEffect:Je,ariaErrorMessage:null,ariaExpanded:Ke,ariaFlowTo:Je,ariaGrabbed:Ke,ariaHasPopup:null,ariaHidden:Ke,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Je,ariaLevel:O,ariaLive:null,ariaModal:Ke,ariaMultiLine:Ke,ariaMultiSelectable:Ke,ariaOrientation:null,ariaOwns:Je,ariaPlaceholder:null,ariaPosInSet:O,ariaPressed:Ke,ariaReadOnly:Ke,ariaRelevant:null,ariaRequired:Ke,ariaRoleDescription:Je,ariaRowCount:O,ariaRowIndex:O,ariaRowSpan:O,ariaSelected:Ke,ariaSetSize:O,ariaSort:null,ariaValueMax:O,ariaValueMin:O,ariaValueNow:O,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function rt(e,t){return t in e?e[t]:t}function it(e,t){return rt(e,t.toLowerCase())}var at=tt({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Ye,acceptCharset:Je,accessKey:Je,action:null,allow:null,allowFullScreen:Ge,allowPaymentRequest:Ge,allowUserMedia:Ge,alt:null,as:null,async:Ge,autoCapitalize:null,autoComplete:Je,autoFocus:Ge,autoPlay:Ge,blocking:Je,capture:null,charSet:null,checked:Ge,cite:null,className:Je,cols:O,colSpan:null,content:null,contentEditable:Ke,controls:Ge,controlsList:Je,coords:O|Ye,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ge,defer:Ge,dir:null,dirName:null,disabled:Ge,download:qe,draggable:Ke,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ge,formTarget:null,headers:Je,height:O,hidden:qe,high:O,href:null,hrefLang:null,htmlFor:Je,httpEquiv:Je,id:null,imageSizes:null,imageSrcSet:null,inert:Ge,inputMode:null,integrity:null,is:null,isMap:Ge,itemId:null,itemProp:Je,itemRef:Je,itemScope:Ge,itemType:Je,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ge,low:O,manifest:null,max:null,maxLength:O,media:null,method:null,min:null,minLength:O,multiple:Ge,muted:Ge,name:null,nonce:null,noModule:Ge,noValidate:Ge,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:Ge,optimum:O,pattern:null,ping:Je,placeholder:null,playsInline:Ge,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ge,referrerPolicy:null,rel:Je,required:Ge,reversed:Ge,rows:O,rowSpan:O,sandbox:Je,scope:null,scoped:Ge,seamless:Ge,selected:Ge,shadowRootClonable:Ge,shadowRootDelegatesFocus:Ge,shadowRootMode:null,shape:null,size:O,sizes:null,slot:null,span:O,spellCheck:Ke,src:null,srcDoc:null,srcLang:null,srcSet:null,start:O,step:null,style:null,tabIndex:O,target:null,title:null,translate:null,type:null,typeMustMatch:Ge,useMap:null,value:Ke,width:O,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Je,axis:null,background:null,bgColor:null,border:O,borderColor:null,bottomMargin:O,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ge,declare:Ge,event:null,face:null,frame:null,frameBorder:null,hSpace:O,leftMargin:O,link:null,longDesc:null,lowSrc:null,marginHeight:O,marginWidth:O,noResize:Ge,noHref:Ge,noShade:Ge,noWrap:Ge,object:null,profile:null,prompt:null,rev:null,rightMargin:O,rules:null,scheme:null,scrolling:Ke,standby:null,summary:null,text:null,topMargin:O,valueType:null,version:null,vAlign:null,vLink:null,vSpace:O,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ge,disableRemotePlayback:Ge,prefix:null,property:null,results:O,security:null,unselectable:null},space:`html`,transform:it}),ot=tt({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`,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:Xe,accentHeight:O,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:O,amplitude:O,arabicForm:null,ascent:O,attributeName:null,attributeType:null,azimuth:O,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:O,by:null,calcMode:null,capHeight:O,className:Je,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:O,diffuseConstant:O,direction:null,display:null,dur:null,divisor:O,dominantBaseline:null,download:Ge,dx:null,dy:null,edgeMode:null,editable:null,elevation:O,enableBackground:null,end:null,event:null,exponent:O,externalResourcesRequired:null,fill:null,fillOpacity:O,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:Ye,g2:Ye,glyphName:Ye,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:O,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:O,horizOriginX:O,horizOriginY:O,id:null,ideographic:O,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:O,k:O,k1:O,k2:O,k3:O,k4:O,kernelMatrix:Xe,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:O,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:O,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:O,overlineThickness:O,paintOrder:null,panose1:null,path:null,pathLength:O,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Je,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:O,pointsAtY:O,pointsAtZ:O,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Xe,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Xe,rev:Xe,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Xe,requiredFeatures:Xe,requiredFonts:Xe,requiredFormats:Xe,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:O,specularExponent:O,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:O,strikethroughThickness:O,string:null,stroke:null,strokeDashArray:Xe,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:O,strokeOpacity:O,strokeWidth:null,style:null,surfaceScale:O,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Xe,tabIndex:O,tableValues:null,target:null,targetX:O,targetY:O,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Xe,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:O,underlineThickness:O,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:O,values:null,vAlphabetic:O,vMathematical:O,vectorEffect:null,vHanging:O,vIdeographic:O,version:null,vertAdvY:O,vertOriginX:O,vertOriginY:O,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:O,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:rt}),st=tt({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()}}),ct=tt({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:it}),lt=tt({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),ut={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`},dt=/[A-Z]/g,ft=/-[a-z]/g,pt=/^data[-\w.:]+$/i;function mt(e,t){let n=Ve(t),r=t,i=He;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&pt.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(ft,gt);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!ft.test(e)){let n=e.replace(dt,ht);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=$e}return new i(r,t)}function ht(e){return`-`+e.toLowerCase()}function gt(e){return e.charAt(1).toUpperCase()}var _t=Be([nt,at,st,ct,lt],`html`),vt=Be([nt,ot,st,ct,lt],`svg`);function yt(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function bt(e){return e.join(` `).trim()}var xt=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
|
|
2
|
+
import{o as e,r as t,t as n}from"./chunk-CFjPhJqf.js";import{t as r}from"./react-nm2Ru1Pt.js";import{n as i,t as a}from"./jsx-runtime-BRW_vwa9.js";import{t as o}from"./preload-helper-mr3rCizq.js";import{t as s}from"./utils-DX8jb5qv.js";import{i as c,r as l,t as u}from"./api-client-BvxmRZUi.js";import{E as d,T as f,_ as p,n as m,r as h}from"./index-BcIyrJiY.js";import{t as g}from"./isEmpty-BfLnxq-B.js";import{a as _,d as v,h as y,i as b,m as x,r as S}from"./chunk-GEFDOKGD-86LFbsAC.js";import{_ as C,g as w,h as T,p as E}from"./src-CqyWLlNZ.js";import{F as ee,G as te,H as ne,J as D,M as re,N as ie,S as ae,T as oe,X as se,Y as ce,Z as le,c as ue,f as de,g as fe,h as pe,l as me,n as he,p as ge,r as _e,t as ve,w as ye,x as be,y as xe,z as Se}from"./chunk-7R4GIKGN-y8bfHEy-.js";import{t as Ce}from"./chunk-HHEYEP7N-C45i5G_3.js";import{i as we,o as Te}from"./chunk-PU5JKC2W-DD95Rx35.js";import{n as Ee}from"./chunk-GLR3WWYH-Re-5eSlQ.js";import{n as De,t as Oe}from"./chunk-XPW4576I-CgLyyW03.js";var ke=i(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]);function Ae(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function je(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Me=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ne=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Pe={};function Fe(e,t){return((t||Pe).jsx?Ne:Me).test(e)}var Ie=/[ \t\n\f\r]/g;function Le(e){return typeof e==`object`?e.type===`text`?Re(e.value):!1:Re(e)}function Re(e){return e.replace(Ie,``)===``}var ze=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};ze.prototype.normal={},ze.prototype.property={},ze.prototype.space=void 0;function Be(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new ze(n,r,t)}function Ve(e){return e.toLowerCase()}var He=class{constructor(e,t){this.attribute=t,this.property=e}};He.prototype.attribute=``,He.prototype.booleanish=!1,He.prototype.boolean=!1,He.prototype.commaOrSpaceSeparated=!1,He.prototype.commaSeparated=!1,He.prototype.defined=!1,He.prototype.mustUseProperty=!1,He.prototype.number=!1,He.prototype.overloadedBoolean=!1,He.prototype.property=``,He.prototype.spaceSeparated=!1,He.prototype.space=void 0;var Ue=t({boolean:()=>Ge,booleanish:()=>Ke,commaOrSpaceSeparated:()=>Xe,commaSeparated:()=>Ye,number:()=>O,overloadedBoolean:()=>qe,spaceSeparated:()=>Je}),We=0,Ge=Ze(),Ke=Ze(),qe=Ze(),O=Ze(),Je=Ze(),Ye=Ze(),Xe=Ze();function Ze(){return 2**++We}var Qe=Object.keys(Ue),$e=class extends He{constructor(e,t,n,r){let i=-1;if(super(e,t),et(this,`space`,r),typeof n==`number`)for(;++i<Qe.length;){let e=Qe[i];et(this,Qe[i],(n&Ue[e])===Ue[e])}}};$e.prototype.defined=!0;function et(e,t,n){n&&(e[t]=n)}function tt(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new $e(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Ve(r)]=r,n[Ve(a.attribute)]=r}return new ze(t,n,e.space)}var nt=tt({properties:{ariaActiveDescendant:null,ariaAtomic:Ke,ariaAutoComplete:null,ariaBusy:Ke,ariaChecked:Ke,ariaColCount:O,ariaColIndex:O,ariaColSpan:O,ariaControls:Je,ariaCurrent:null,ariaDescribedBy:Je,ariaDetails:null,ariaDisabled:Ke,ariaDropEffect:Je,ariaErrorMessage:null,ariaExpanded:Ke,ariaFlowTo:Je,ariaGrabbed:Ke,ariaHasPopup:null,ariaHidden:Ke,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Je,ariaLevel:O,ariaLive:null,ariaModal:Ke,ariaMultiLine:Ke,ariaMultiSelectable:Ke,ariaOrientation:null,ariaOwns:Je,ariaPlaceholder:null,ariaPosInSet:O,ariaPressed:Ke,ariaReadOnly:Ke,ariaRelevant:null,ariaRequired:Ke,ariaRoleDescription:Je,ariaRowCount:O,ariaRowIndex:O,ariaRowSpan:O,ariaSelected:Ke,ariaSetSize:O,ariaSort:null,ariaValueMax:O,ariaValueMin:O,ariaValueNow:O,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function rt(e,t){return t in e?e[t]:t}function it(e,t){return rt(e,t.toLowerCase())}var at=tt({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Ye,acceptCharset:Je,accessKey:Je,action:null,allow:null,allowFullScreen:Ge,allowPaymentRequest:Ge,allowUserMedia:Ge,alt:null,as:null,async:Ge,autoCapitalize:null,autoComplete:Je,autoFocus:Ge,autoPlay:Ge,blocking:Je,capture:null,charSet:null,checked:Ge,cite:null,className:Je,cols:O,colSpan:null,content:null,contentEditable:Ke,controls:Ge,controlsList:Je,coords:O|Ye,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ge,defer:Ge,dir:null,dirName:null,disabled:Ge,download:qe,draggable:Ke,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ge,formTarget:null,headers:Je,height:O,hidden:qe,high:O,href:null,hrefLang:null,htmlFor:Je,httpEquiv:Je,id:null,imageSizes:null,imageSrcSet:null,inert:Ge,inputMode:null,integrity:null,is:null,isMap:Ge,itemId:null,itemProp:Je,itemRef:Je,itemScope:Ge,itemType:Je,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ge,low:O,manifest:null,max:null,maxLength:O,media:null,method:null,min:null,minLength:O,multiple:Ge,muted:Ge,name:null,nonce:null,noModule:Ge,noValidate:Ge,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:Ge,optimum:O,pattern:null,ping:Je,placeholder:null,playsInline:Ge,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ge,referrerPolicy:null,rel:Je,required:Ge,reversed:Ge,rows:O,rowSpan:O,sandbox:Je,scope:null,scoped:Ge,seamless:Ge,selected:Ge,shadowRootClonable:Ge,shadowRootDelegatesFocus:Ge,shadowRootMode:null,shape:null,size:O,sizes:null,slot:null,span:O,spellCheck:Ke,src:null,srcDoc:null,srcLang:null,srcSet:null,start:O,step:null,style:null,tabIndex:O,target:null,title:null,translate:null,type:null,typeMustMatch:Ge,useMap:null,value:Ke,width:O,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Je,axis:null,background:null,bgColor:null,border:O,borderColor:null,bottomMargin:O,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ge,declare:Ge,event:null,face:null,frame:null,frameBorder:null,hSpace:O,leftMargin:O,link:null,longDesc:null,lowSrc:null,marginHeight:O,marginWidth:O,noResize:Ge,noHref:Ge,noShade:Ge,noWrap:Ge,object:null,profile:null,prompt:null,rev:null,rightMargin:O,rules:null,scheme:null,scrolling:Ke,standby:null,summary:null,text:null,topMargin:O,valueType:null,version:null,vAlign:null,vLink:null,vSpace:O,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ge,disableRemotePlayback:Ge,prefix:null,property:null,results:O,security:null,unselectable:null},space:`html`,transform:it}),ot=tt({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`,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:Xe,accentHeight:O,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:O,amplitude:O,arabicForm:null,ascent:O,attributeName:null,attributeType:null,azimuth:O,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:O,by:null,calcMode:null,capHeight:O,className:Je,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:O,diffuseConstant:O,direction:null,display:null,dur:null,divisor:O,dominantBaseline:null,download:Ge,dx:null,dy:null,edgeMode:null,editable:null,elevation:O,enableBackground:null,end:null,event:null,exponent:O,externalResourcesRequired:null,fill:null,fillOpacity:O,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:Ye,g2:Ye,glyphName:Ye,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:O,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:O,horizOriginX:O,horizOriginY:O,id:null,ideographic:O,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:O,k:O,k1:O,k2:O,k3:O,k4:O,kernelMatrix:Xe,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:O,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:O,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:O,overlineThickness:O,paintOrder:null,panose1:null,path:null,pathLength:O,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Je,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:O,pointsAtY:O,pointsAtZ:O,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Xe,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Xe,rev:Xe,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Xe,requiredFeatures:Xe,requiredFonts:Xe,requiredFormats:Xe,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:O,specularExponent:O,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:O,strikethroughThickness:O,string:null,stroke:null,strokeDashArray:Xe,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:O,strokeOpacity:O,strokeWidth:null,style:null,surfaceScale:O,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Xe,tabIndex:O,tableValues:null,target:null,targetX:O,targetY:O,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Xe,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:O,underlineThickness:O,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:O,values:null,vAlphabetic:O,vMathematical:O,vectorEffect:null,vHanging:O,vIdeographic:O,version:null,vertAdvY:O,vertOriginX:O,vertOriginY:O,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:O,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:rt}),st=tt({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()}}),ct=tt({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:it}),lt=tt({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),ut={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`},dt=/[A-Z]/g,ft=/-[a-z]/g,pt=/^data[-\w.:]+$/i;function mt(e,t){let n=Ve(t),r=t,i=He;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&pt.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(ft,gt);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!ft.test(e)){let n=e.replace(dt,ht);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=$e}return new i(r,t)}function ht(e){return`-`+e.toLowerCase()}function gt(e){return e.charAt(1).toUpperCase()}var _t=Be([nt,at,st,ct,lt],`html`),vt=Be([nt,ot,st,ct,lt],`svg`);function yt(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function bt(e){return e.join(` `).trim()}var xt=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
|
|
3
3
|
`,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function ee(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),ee()}function _(e){return e?e.replace(l,p):p}t.exports=g})),St=n((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(xt());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),Ct=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),wt=n(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(St()),r=Ct();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),Tt=Dt(`end`),Et=Dt(`start`);function Dt(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Ot(e){let t=Et(e),n=Tt(e);if(t&&n)return{start:t,end:n}}function kt(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?jt(e.position):`start`in e||`end`in e?jt(e):`line`in e||`column`in e?At(e):``}function At(e){return Mt(e&&e.line)+`:`+Mt(e&&e.column)}function jt(e){return At(e&&e.start)+`-`+At(e&&e.end)}function Mt(e){return e&&typeof e==`number`?e:1}var Nt=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=kt(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Nt.prototype.file=``,Nt.prototype.name=``,Nt.prototype.reason=``,Nt.prototype.message=``,Nt.prototype.stack=``,Nt.prototype.column=void 0,Nt.prototype.line=void 0,Nt.prototype.ancestors=void 0,Nt.prototype.cause=void 0,Nt.prototype.fatal=void 0,Nt.prototype.place=void 0,Nt.prototype.ruleId=void 0,Nt.prototype.source=void 0;var Pt=e(wt(),1),Ft={}.hasOwnProperty,It=new Map,Lt=/[A-Z]/g,Rt=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),zt=new Set([`td`,`th`]),Bt=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Vt(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=Qt(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=Zt(n,t.jsx,t.jsxs)}let 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`?vt:_t,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Ht(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Ht(e,t,n){if(t.type===`element`)return Ut(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Wt(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Kt(e,t,n);if(t.type===`mdxjsEsm`)return Gt(e,t);if(t.type===`root`)return qt(e,t,n);if(t.type===`text`)return Jt(e,t)}function Ut(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=vt,e.schema=i),e.ancestors.push(t);let a=an(e,t.tagName,!1),o=$t(e,t),s=tn(e,t);return Rt.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!Le(e):!0})),Yt(e,o,a,t),Xt(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Wt(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}on(e,t.position)}function Gt(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);on(e,t.position)}function Kt(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=vt,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:an(e,t.name,!0),o=en(e,t),s=tn(e,t);return Yt(e,o,a,t),Xt(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function qt(e,t,n){let r={};return Xt(r,tn(e,t)),e.create(t,e.Fragment,r,n)}function Jt(e,t){return t.value}function Yt(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Xt(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Zt(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function Qt(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Et(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function $t(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Ft.call(t.properties,i)){let a=nn(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&zt.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function en(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else on(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else on(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function tn(e,t){let n=[],r=-1,i=e.passKeys?new Map:It;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Ht(e,a,o);s!==void 0&&n.push(s)}return n}function nn(e,t,n){let r=mt(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?je(n):bt(n)),r.property===`style`){let t=typeof n==`object`?n:rn(e,String(n));return e.stylePropertyNameCase===`css`&&(t=sn(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?ut[r.property]||r.property:r.attribute,n]}}function rn(e,t){try{return(0,Pt.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new Nt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=Bt+`#cannot-parse-style-attribute`,r}}function an(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=Fe(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=Fe(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Ft.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);on(e)}function on(e,t){let n=new Nt("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=Bt+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function sn(e){let t={},n;for(n in e)Ft.call(e,n)&&(t[cn(n)]=e[n]);return t}function cn(e){let t=e.replace(Lt,ln);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function ln(e){return`-`+e.toLowerCase()}var un={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`]},dn={};function fn(e,t){let n=t||dn;return pn(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function pn(e,t,n){if(hn(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 mn(e.children,t,n)}return Array.isArray(e)?mn(e,t,n):``}function mn(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=pn(e[i],t,n);return r.join(``)}function hn(e){return!!(e&&typeof e==`object`)}var gn=document.createElement(`i`);function _n(e){let t=`&`+e+`;`;gn.innerHTML=t;let n=gn.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function vn(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function yn(e,t){return e.length>0?(vn(e,e.length,0,t),e):t}var bn={}.hasOwnProperty;function xn(e){let t={},n=-1;for(;++n<e.length;)Sn(t,e[n]);return t}function Sn(e,t){let n;for(n in t){let r=(bn.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){bn.call(r,a)||(r[a]=[]);let e=i[a];Cn(r[a],Array.isArray(e)?e:e?[e]:[])}}}function Cn(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);vn(e,0,0,r)}function wn(e,t){let 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 Tn(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var En=Ln(/[A-Za-z]/),Dn=Ln(/[\dA-Za-z]/),On=Ln(/[#-'*+\--9=?A-Z^-~]/);function kn(e){return e!==null&&(e<32||e===127)}var An=Ln(/\d/),jn=Ln(/[\dA-Fa-f]/),Mn=Ln(/[!-/:-@[-`{-~]/);function k(e){return e!==null&&e<-2}function Nn(e){return e!==null&&(e<0||e===32)}function Pn(e){return e===-2||e===-1||e===32}var Fn=Ln(/\p{P}|\p{S}/u),In=Ln(/\s/);function Ln(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Rn(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&Dn(e.charCodeAt(n+1))&&Dn(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function zn(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return Pn(r)?(e.enter(n),s(r)):t(r)}function s(r){return Pn(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var Bn={tokenize:Vn};function Vn(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),zn(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return k(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var Hn={tokenize:Wn},Un={tokenize:Gn};function Wn(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return vn(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Un,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(Un,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return k(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;vn(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Gn(e,t,n){return zn(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function Kn(e){if(e===null||Nn(e)||In(e))return 1;if(Fn(e))return 2}function qn(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var Jn={name:`attention`,resolveAll:Yn,tokenize:Xn};function Yn(e,t){let n=-1,r,i,a,o,s,c,l,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;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};Zn(d,-c),Zn(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=yn(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=yn(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=yn(l,qn(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=yn(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=yn(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,vn(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Xn(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Kn(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=Kn(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Zn(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Qn={name:`autolink`,tokenize:$n};function $n(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return En(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||Dn(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||Dn(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||kn(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):On(t)?(e.consume(t),l):n(t)}function u(e){return Dn(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||Dn(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var er={partial:!0,tokenize:tr};function tr(e,t,n){return r;function r(t){return Pn(t)?zn(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||k(e)?t(e):n(e)}}var nr={continuation:{tokenize:ir},exit:ar,name:`blockQuote`,tokenize:rr};function rr(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return Pn(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function ir(e,t,n){let r=this;return i;function i(t){return Pn(t)?zn(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(nr,t,n)(r)}}function ar(e){e.exit(`blockQuote`)}var or={name:`characterEscape`,tokenize:sr};function sr(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return Mn(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var cr={name:`characterReference`,tokenize:lr};function lr(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=Dn,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=jn,u):(e.enter(`characterReferenceValue`),a=7,o=An,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===Dn&&!_n(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var ur={partial:!0,tokenize:pr},dr={concrete:!0,name:`codeFenced`,tokenize:fr};function fr(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),Pn(t)?zn(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||k(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(ur,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||k(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):Pn(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),zn(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||k(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||k(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&Pn(t)?zn(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||k(t)?e.check(ur,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||k(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),Pn(t)?zn(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),Pn(t)?zn(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||k(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function pr(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var mr={name:`codeIndented`,tokenize:gr},hr={partial:!0,tokenize:_r};function gr(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),zn(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):k(t)?e.attempt(hr,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||k(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function _r(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):k(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):zn(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):k(e)?i(e):n(e)}}var vr={name:`codeText`,previous:br,resolve:yr,tokenize:xr};function yr(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 br(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function xr(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):k(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||k(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var Sr=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&Cr(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),Cr(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Cr(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);Cr(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);Cr(this.left,t.reverse())}}};function Cr(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 wr(e){let t={},n=-1,r,i,a,o,s,c,l,u=new Sr(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`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,Tr(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[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 vn(e,0,1/0,u.slice(0)),!l}function Tr(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._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&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var Er={resolve:Or,tokenize:kr},Dr={partial:!0,tokenize:Ar};function Or(e){return wr(e),e}function kr(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):k(t)?e.check(Dr,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function Ar(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),zn(e,a,`linePrefix`)}function a(i){if(i===null||k(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function jr(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||kn(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||k(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||Nn(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||kn(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function Mr(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):k(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||k(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!Pn(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Nr(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):k(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),zn(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||k(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function Pr(e,t){let n;return r;function r(i){return k(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Pn(i)?zn(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Fr={name:`definition`,tokenize:Lr},Ir={partial:!0,tokenize:Rr};function Lr(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Mr.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=Tn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return Nn(t)?Pr(e,l)(t):l(t)}function l(t){return jr(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Ir,d,d)(t)}function d(t){return Pn(t)?zn(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||k(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Rr(e,t,n){return r;function r(t){return Nn(t)?Pr(e,i)(t):n(t)}function i(t){return Nr(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Pn(t)?zn(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||k(e)?t(e):n(e)}}var zr={name:`hardBreakEscape`,tokenize:Br};function Br(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return k(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Vr={name:`headingAtx`,resolve:Hr,tokenize:Ur};function Hr(e,t){let n=e.length-2,r=3,i,a;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},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},vn(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Ur(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||Nn(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||k(n)?(e.exit(`atxHeading`),t(n)):Pn(n)?zn(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||Nn(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Wr=`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`.split(`.`),Gr=[`pre`,`script`,`style`,`textarea`],Kr={concrete:!0,name:`htmlFlow`,resolveTo:Yr,tokenize:Xr},qr={partial:!0,tokenize:Qr},Jr={partial:!0,tokenize:Zr};function Yr(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 Xr(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:ce):En(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):En(a)?(e.consume(a),i=4,r.interrupt?t:ce):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:ce):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:te:m):n(i)}function h(t){return En(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||Nn(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Gr.includes(l)?(i=1,r.interrupt?t(s):te(s)):Wr.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):te(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||Dn(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:te):n(i)}function v(t){return Pn(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||En(t)?(e.consume(t),b):Pn(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||Dn(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):Pn(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):Pn(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||k(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||Nn(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||Pn(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),ee):n(t)}function ee(t){return t===null||k(t)?te(t):Pn(t)?(e.consume(t),ee):n(t)}function te(t){return t===45&&i===2?(e.consume(t),ie):t===60&&i===1?(e.consume(t),ae):t===62&&i===4?(e.consume(t),le):t===63&&i===3?(e.consume(t),ce):t===93&&i===5?(e.consume(t),se):k(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(qr,ue,ne)(t)):t===null||k(t)?(e.exit(`htmlFlowData`),ne(t)):(e.consume(t),te)}function ne(t){return e.check(Jr,D,ue)(t)}function D(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),re}function re(t){return t===null||k(t)?ne(t):(e.enter(`htmlFlowData`),te(t))}function ie(t){return t===45?(e.consume(t),ce):te(t)}function ae(t){return t===47?(e.consume(t),o=``,oe):te(t)}function oe(t){if(t===62){let n=o.toLowerCase();return Gr.includes(n)?(e.consume(t),le):te(t)}return En(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),oe):te(t)}function se(t){return t===93?(e.consume(t),ce):te(t)}function ce(t){return t===62?(e.consume(t),le):t===45&&i===2?(e.consume(t),ce):te(t)}function le(t){return t===null||k(t)?(e.exit(`htmlFlowData`),ue(t)):(e.consume(t),le)}function ue(n){return e.exit(`htmlFlow`),t(n)}}function Zr(e,t,n){let r=this;return i;function i(t){return k(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Qr(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(er,t,n)}}var $r={name:`htmlText`,tokenize:ei};function ei(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):En(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):En(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):k(t)?(o=d,ae(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?ie(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):k(t)?(o=h,ae(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?ie(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?ie(t):k(t)?(o=v,ae(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):k(t)?(o=y,ae(t)):(e.consume(t),y)}function b(e){return e===62?ie(e):y(e)}function x(t){return En(t)?(e.consume(t),S):n(t)}function S(t){return t===45||Dn(t)?(e.consume(t),S):C(t)}function C(t){return k(t)?(o=C,ae(t)):Pn(t)?(e.consume(t),C):ie(t)}function w(t){return t===45||Dn(t)?(e.consume(t),w):t===47||t===62||Nn(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),ie):t===58||t===95||En(t)?(e.consume(t),E):k(t)?(o=T,ae(t)):Pn(t)?(e.consume(t),T):ie(t)}function E(t){return t===45||t===46||t===58||t===95||Dn(t)?(e.consume(t),E):ee(t)}function ee(t){return t===61?(e.consume(t),te):k(t)?(o=ee,ae(t)):Pn(t)?(e.consume(t),ee):T(t)}function te(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,ne):k(t)?(o=te,ae(t)):Pn(t)?(e.consume(t),te):(e.consume(t),D)}function ne(t){return t===i?(e.consume(t),i=void 0,re):t===null?n(t):k(t)?(o=ne,ae(t)):(e.consume(t),ne)}function D(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||Nn(t)?T(t):(e.consume(t),D)}function re(e){return e===47||e===62||Nn(e)?T(e):n(e)}function ie(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function ae(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),oe}function oe(t){return Pn(t)?zn(e,se,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):se(t)}function se(t){return e.enter(`htmlTextData`),o(t)}}var ti={name:`labelEnd`,resolveAll:ai,resolveTo:oi,tokenize:si},ni={tokenize:ci},ri={tokenize:li},ii={tokenize:ui};function ai(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&vn(e,0,e.length,n),e}function oi(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=yn(s,e.slice(a+1,a+r+3)),s=yn(s,[[`enter`,u,t]]),s=yn(s,qn(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=yn(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=yn(s,e.slice(o+1)),s=yn(s,[[`exit`,c,t]]),vn(e,a,e.length,s),e}function si(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(Tn(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(ni,u,o?u:d)(t):t===91?e.attempt(ri,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(ii,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function ci(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return Nn(t)?Pr(e,a)(t):a(t)}function a(t){return t===41?u(t):jr(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return Nn(t)?Pr(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Nr(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return Nn(t)?Pr(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function li(e,t,n){let r=this;return i;function i(t){return Mr.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(Tn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function ui(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var di={name:`labelStartImage`,resolveAll:ti.resolveAll,tokenize:fi};function fi(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var pi={name:`labelStartLink`,resolveAll:ti.resolveAll,tokenize:mi};function mi(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var hi={name:`lineEnding`,tokenize:gi};function gi(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),zn(e,t,`linePrefix`)}}var _i={name:`thematicBreak`,tokenize:vi};function vi(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||k(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),Pn(t)?zn(e,s,`whitespace`)(t):s(t))}}var yi={continuation:{tokenize:Ci},exit:Ti,name:`list`,tokenize:Si},bi={partial:!0,tokenize:Ei},xi={partial:!0,tokenize:wi};function Si(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:An(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(_i,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return An(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(er,r.interrupt?n:u,e.attempt(bi,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Pn(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function Ci(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(er,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,zn(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Pn(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(xi,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,zn(e,e.attempt(yi,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function wi(e,t,n){let r=this;return zn(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function Ti(e){e.exit(this.containerState.type)}function Ei(e,t,n){let r=this;return zn(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!Pn(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Di={name:`setextUnderline`,resolveTo:Oi,tokenize:ki};function Oi(e,t){let n=e.length,r,i,a;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),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function ki(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),Pn(t)?zn(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||k(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var Ai={tokenize:ji};function ji(e){let t=this,n=e.attempt(er,r,e.attempt(this.parser.constructs.flowInitial,i,zn(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Er,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var Mi={resolveAll:Ii()},Ni=Fi(`string`),Pi=Fi(`text`);function Fi(e){return{resolveAll:Ii(e===`text`?Li:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function Ii(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function Li(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var Ri=t({attentionMarkers:()=>Ki,contentInitial:()=>Bi,disable:()=>qi,document:()=>zi,flow:()=>Hi,flowInitial:()=>Vi,insideSpan:()=>Gi,string:()=>Ui,text:()=>Wi}),zi={42:yi,43:yi,45:yi,48:yi,49:yi,50:yi,51:yi,52:yi,53:yi,54:yi,55:yi,56:yi,57:yi,62:nr},Bi={91:Fr},Vi={[-2]:mr,[-1]:mr,32:mr},Hi={35:Vr,42:_i,45:[Di,_i],60:Kr,61:Di,95:_i,96:dr,126:dr},Ui={38:cr,92:or},Wi={[-5]:hi,[-4]:hi,[-3]:hi,33:di,38:cr,42:Jn,60:[Qn,$r],91:pi,92:[zr,or],93:ti,95:Jn,96:vr},Gi={null:[Jn,Mi]},Ki={null:[42,95]},qi={null:[]};function Ji(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=yn(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=qn(a,l.events,l),l.events):[]}function f(e,t){return Xi(p(e),t)}function p(e){return Yi(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){k(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&vn(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Yi(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Xi(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
4
4
|
`;break;case-3:o=`\r
|
|
5
5
|
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function Zi(e){let t={constructs:xn([Ri,...(e||{}).extensions||[]]),content:n(Bn),defined:[],document:n(Hn),flow:n(Ai),lazy:{},string:n(Ni),text:n(Pi)};return t;function n(e){return n;function n(n){return Ji(t,e,n)}}}function Qi(e){for(;!wr(e););return e}var $i=/[\0\t\n\r]/g;function ea(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if($i.lastIndex=u,c=$i.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var ta=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function na(e){return e.replace(ta,ra)}function ra(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return wn(n.slice(t?2:1),t?16:10)}return _n(n)||e}var ia={}.hasOwnProperty;function aa(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),oa(n)(Qi(Zi(n).document().write(ea()(e,t,!0))))}function oa(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(De),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(Ce),blockQuote:a(ve),characterEscape:T,characterReference:T,codeFenced:a(ye),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ye,o),codeText:a(be,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(xe),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(Se),hardBreakEscape:a(we),hardBreakTrailing:a(we),htmlFlow:a(Te,o),htmlFlowData:T,htmlText:a(Te,o),htmlTextData:T,image:a(Ee),label:o,link:a(De),listItem:a(ke),listItemValue:f,listOrdered:a(Oe,d),listUnordered:a(Oe),paragraph:a(Ae),reference:de,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(Ce),strong:a(je),thematicBreak:a(Ne)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:_e,autolinkProtocol:ge,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:pe,characterReferenceMarkerNumeric:pe,characterReferenceValue:me,characterReference:he,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(re),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(te),hardBreakTrailing:c(te),htmlFlow:c(ne),htmlFlowData:E,htmlText:c(D),htmlTextData:E,image:c(ae),label:se,labelText:oe,lineEnding:ee,link:c(ie),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:fe,resourceDestinationString:ce,resourceTitleString:le,resource:ue,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};ca(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];ia.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||ua).call(a,void 0,e[0])}for(r.position={start:sa(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:sa(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:sa(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||ua).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+kt({start:e.start,end:e.end})+`): it’s not open`);n.position.end=sa(e.end)}function u(){return fn(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Tn(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=Me(),n.position={start:sa(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=sa(e.end)}function ee(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=sa(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function te(){this.data.atHardBreak=!0}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function D(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function re(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ie(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ae(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function oe(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=na(t),n.identifier=Tn(t).toLowerCase()}function se(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function ce(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function le(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ue(){this.data.inReference=void 0}function de(){this.data.referenceType=`collapsed`}function fe(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Tn(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function pe(e){this.data.characterReferenceType=e.type}function me(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=wn(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=_n(t);let i=this.stack[this.stack.length-1];i.value+=r}function he(e){let t=this.stack.pop();t.position.end=sa(e.end)}function ge(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function _e(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ve(){return{type:`blockquote`,children:[]}}function ye(){return{type:`code`,lang:null,meta:null,value:``}}function be(){return{type:`inlineCode`,value:``}}function xe(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function Se(){return{type:`emphasis`,children:[]}}function Ce(){return{type:`heading`,depth:0,children:[]}}function we(){return{type:`break`}}function Te(){return{type:`html`,value:``}}function Ee(){return{type:`image`,title:null,url:``,alt:null}}function De(){return{type:`link`,title:null,url:``,children:[]}}function Oe(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function ke(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function Ae(){return{type:`paragraph`,children:[]}}function je(){return{type:`strong`,children:[]}}function Me(){return{type:`text`,value:``}}function Ne(){return{type:`thematicBreak`}}}function sa(e){return{line:e.line,column:e.column,offset:e.offset}}function ca(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?ca(e,r):la(e,r)}}function la(e,t){let n;for(n in t)if(ia.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function ua(e,t){throw e?Error("Cannot close `"+e.type+"` ("+kt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+kt({start:t.start,end:t.end})+`) is open`):Error("Cannot close document, a token (`"+t.type+"`, "+kt({start:t.start,end:t.end})+`) is still open`)}function da(e){let t=this;t.parser=n;function n(n){return aa(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function fa(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function pa(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CFjPhJqf.js";import{t}from"./react-nm2Ru1Pt.js";import"./react-dom-Bpkvzu3U.js";import{n,t as r}from"./jsx-runtime-BRW_vwa9.js";import{i,n as a,r as o}from"./dist-CM0oD8tQ.js";import{t as s}from"./square-vBdqj0bF.js";import{t as c}from"./api-client-BvxmRZUi.js";import{B as l,J as u,Y as d}from"./index-
|
|
1
|
+
import{o as e}from"./chunk-CFjPhJqf.js";import{t}from"./react-nm2Ru1Pt.js";import"./react-dom-Bpkvzu3U.js";import{n,t as r}from"./jsx-runtime-BRW_vwa9.js";import{i,n as a,r as o}from"./dist-CM0oD8tQ.js";import{t as s}from"./square-vBdqj0bF.js";import{t as c}from"./api-client-BvxmRZUi.js";import{B as l,J as u,Y as d}from"./index-BcIyrJiY.js";var f=n(`wifi`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M2 8.82a15 15 0 0 1 20 0`,key:`dnpr2z`}],[`path`,{d:`M5 12.859a10 10 0 0 1 14 0`,key:`1x1e6c`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}]]),p=e(t(),1),m=r();function h(){let[e,t]=(0,p.useState)(``),[n,r]=(0,p.useState)([]),[h,g]=(0,p.useState)(!1),[_,v]=(0,p.useState)(null),[y,b]=(0,p.useState)(null),x=(0,p.useCallback)(async()=>{try{r(await c.get(`/api/preview/tunnels`))}catch(e){console.warn(`[ports] failed to fetch tunnels`,e)}},[]);(0,p.useEffect)(()=>{x();let e=setInterval(x,1e4);return()=>clearInterval(e)},[x]);let S=async e=>{let r=n.find(t=>t.port===e);if(r){window.open(r.url,`_blank`),t(``);return}g(!0),v(null);try{let n=await c.post(`/api/preview/tunnel`,{port:e});window.open(n.url,`_blank`),t(``),await x()}catch(t){v(t.message||`Failed to start tunnel for port ${e}`)}finally{g(!1)}},C=async e=>{try{await c.del(`/api/preview/tunnel/${e}`),await x()}catch(t){a.error(t.message||`Failed to stop tunnel for port ${e}`)}},w=(e,t)=>{navigator.clipboard.writeText(t).then(()=>{b(e),a.success(`URL copied`),setTimeout(()=>b(null),2e3)}).catch(()=>{a.error(`Failed to copy URL`)})};return(0,m.jsxs)(`div`,{className:`flex flex-col h-full w-full bg-background`,children:[(0,m.jsxs)(`div`,{className:`p-4 md:p-6 border-b border-border bg-surface`,children:[(0,m.jsxs)(`div`,{className:`flex items-center gap-2 mb-3`,children:[(0,m.jsx)(f,{className:`size-5 text-primary`}),(0,m.jsx)(`h2`,{className:`text-base font-medium text-text-primary`,children:`Port Forwarding`})]}),(0,m.jsxs)(`form`,{onSubmit:t=>{t.preventDefault();let n=parseInt(e,10);n>=1&&n<=65535?S(n):v(`Port must be 1-65535`)},className:`flex items-center gap-2`,children:[(0,m.jsxs)(`div`,{className:`flex-1 flex items-center gap-2 px-3 py-2.5 rounded-lg bg-background border border-border focus-within:border-primary/50 transition-colors`,children:[(0,m.jsx)(`span`,{className:`text-sm text-text-subtle shrink-0`,children:`localhost:`}),(0,m.jsx)(`input`,{type:`number`,value:e,onChange:e=>{t(e.target.value),v(null)},placeholder:`3000`,min:1,max:65535,className:`flex-1 bg-transparent text-sm text-text-primary outline-none placeholder:text-text-subtle min-w-0 [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none`})]}),(0,m.jsx)(`button`,{type:`submit`,disabled:h||!e,className:`px-4 py-2.5 rounded-lg bg-primary text-primary-foreground text-sm font-medium hover:bg-primary/90 disabled:opacity-50 transition-colors shrink-0 min-w-[72px] flex items-center justify-center`,children:h?(0,m.jsx)(l,{className:`size-4 animate-spin`}):`Forward`})]}),_&&(0,m.jsx)(`p`,{className:`text-sm text-red-400 mt-2`,children:_}),h&&(0,m.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-text-secondary mt-2`,children:[(0,m.jsx)(l,{className:`size-3.5 animate-spin`}),(0,m.jsx)(`span`,{children:`Starting tunnel...`})]})]}),(0,m.jsx)(`div`,{className:`flex-1 overflow-y-auto p-4 md:p-6`,children:n.length===0?(0,m.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-full gap-3 text-center`,children:[(0,m.jsx)(o,{className:`size-10 text-text-subtle`}),(0,m.jsx)(`p`,{className:`text-sm text-text-secondary max-w-xs`,children:`No active ports. Forward a port to access your local dev server from anywhere.`})]}):(0,m.jsx)(`div`,{className:`space-y-2`,children:n.map(e=>(0,m.jsxs)(`div`,{className:`flex items-center gap-3 p-3 rounded-lg bg-surface border border-border`,children:[(0,m.jsxs)(`div`,{className:`shrink-0 px-2 py-1 rounded bg-primary/10 text-primary text-xs font-mono font-medium`,children:[`:`,e.port]}),(0,m.jsx)(`span`,{className:`flex-1 text-xs text-text-secondary truncate min-w-0`,children:e.url}),(0,m.jsxs)(`div`,{className:`flex items-center shrink-0`,children:[(0,m.jsx)(`button`,{onClick:()=>window.open(e.url,`_blank`),className:`p-2.5 rounded-md hover:bg-surface-elevated transition-colors`,title:`Open in browser`,children:(0,m.jsx)(u,{className:`size-4 text-text-secondary`})}),(0,m.jsx)(`button`,{onClick:()=>w(e.port,e.url),className:`p-2.5 rounded-md hover:bg-surface-elevated transition-colors`,title:`Copy URL`,children:y===e.port?(0,m.jsx)(i,{className:`size-4 text-green-400`}):(0,m.jsx)(d,{className:`size-4 text-text-secondary`})}),(0,m.jsx)(`button`,{onClick:()=>C(e.port),className:`p-2.5 rounded-md hover:bg-red-500/10 transition-colors`,title:`Stop tunnel`,children:(0,m.jsx)(s,{className:`size-4 text-red-400`})})]})]},e.port))})})]})}export{h as PortForwardingTab};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CFjPhJqf.js";import{t}from"./react-nm2Ru1Pt.js";import{t as n}from"./jsx-runtime-BRW_vwa9.js";import{t as r}from"./chevron-right-DY_wImxB.js";import{t as i}from"./database-CgTomMxt.js";import{t as a}from"./refresh-cw-Clk8fdUD.js";import{t as o}from"./table-Bi27fEaN.js";import{t as s}from"./api-client-BvxmRZUi.js";import{$ as c,B as l,P as u,Q as d}from"./index-
|
|
1
|
+
import{o as e}from"./chunk-CFjPhJqf.js";import{t}from"./react-nm2Ru1Pt.js";import{t as n}from"./jsx-runtime-BRW_vwa9.js";import{t as r}from"./chevron-right-DY_wImxB.js";import{t as i}from"./database-CgTomMxt.js";import{t as a}from"./refresh-cw-Clk8fdUD.js";import{t as o}from"./table-Bi27fEaN.js";import{t as s}from"./api-client-BvxmRZUi.js";import{$ as c,B as l,P as u,Q as d}from"./index-BcIyrJiY.js";import{n as f,r as p,t as m}from"./lib-DSLzfeW0.js";var h=e(t());function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g.apply(null,arguments)}function _(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var v=[],y=[];(()=>{let e=`lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o`.split(`,`).map(e=>e?parseInt(e,36):1);for(let t=0,n=0;t<e.length;t++)(t%2?y:v).push(n+=e[t])})();function ee(e){if(e<768)return!1;for(let t=0,n=v.length;;){let r=t+n>>1;if(e<v[r])n=r;else if(e>=y[r])t=r+1;else return!0;if(t==n)return!1}}function b(e){return e>=127462&&e<=127487}var x=8205;function te(e,t,n=!0,r=!0){return(n?ne:re)(e,t,r)}function ne(e,t,n){if(t==e.length)return t;t&&ie(e.charCodeAt(t))&&ae(e.charCodeAt(t-1))&&t--;let r=S(e,t);for(t+=C(r);t<e.length;){let i=S(e,t);if(r==x||i==x||n&&ee(i))t+=C(i),r=i;else if(b(i)){let n=0,r=t-2;for(;r>=0&&b(S(e,r));)n++,r-=2;if(n%2==0)break;t+=2}else break}return t}function re(e,t,n){for(;t>0;){let r=ne(e,t-2,n);if(r<t)return r;t--}return 0}function S(e,t){let n=e.charCodeAt(t);if(!ae(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return ie(r)?(n-55296<<10)+(r-56320)+65536:n}function ie(e){return e>=56320&&e<57344}function ae(e){return e>=55296&&e<56320}function C(e){return e<65536?1:2}var w=class e{lineAt(e){if(e<0||e>this.length)throw RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=me(this,e,t);let r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),oe.from(r,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=me(this,e,t);let n=[];return this.decompose(e,t,n,0),oe.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new ue(this),i=new ue(e);for(let e=t,a=t;;){if(r.next(e),i.next(e),e=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(a+=r.value.length,r.done||a>=n)return!0}}iter(e=1){return new ue(this,e)}iterRange(e,t=this.length){return new de(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t??=this.lines+1;let r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new fe(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(t){if(t.length==0)throw RangeError(`A document must have at least one line`);return t.length==1&&!t[0]?e.empty:t.length<=32?new T(t):oe.from(T.split(t,[]))}},T=class e extends w{constructor(e,t=se(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.text[i],o=r+a.length;if((t?n:o)>=e)return new pe(r,o,n,a);r=o+1,n++}}decompose(t,n,r,i){let a=t<=0&&n>=this.length?this:new e(le(this.text,t,n),Math.min(n,this.length)-Math.max(0,t));if(i&1){let t=r.pop(),n=ce(a.text,t.text.slice(),0,a.length);if(n.length<=32)r.push(new e(n,t.length+a.length));else{let t=n.length>>1;r.push(new e(n.slice(0,t)),new e(n.slice(t)))}}else r.push(a)}replace(t,n,r){if(!(r instanceof e))return super.replace(t,n,r);[t,n]=me(this,t,n);let i=ce(this.text,ce(r.text,le(this.text,0,t)),n),a=this.length+r.length-(n-t);return i.length<=32?new e(i,a):oe.from(e.split(i,[]),a)}sliceString(e,t=this.length,n=`
|
|
2
2
|
`){[e,t]=me(this,e,t);let r=``;for(let i=0,a=0;i<=t&&a<this.text.length;a++){let o=this.text[a],s=i+o.length;i>e&&a&&(r+=n),e<s&&t>i&&(r+=o.slice(Math.max(0,e-i),t-i)),i=s+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(t,n){let r=[],i=-1;for(let a of t)r.push(a),i+=a.length+1,r.length==32&&(n.push(new e(r,i)),r=[],i=-1);return i>-1&&n.push(new e(r,i)),n}},oe=class e extends w{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.children[i],o=r+a.length,s=n+a.lines-1;if((t?s:o)>=e)return a.lineInner(e,t,n,r);r=o+1,n=s+1}}decompose(e,t,n,r){for(let i=0,a=0;a<=t&&i<this.children.length;i++){let o=this.children[i],s=a+o.length;if(e<=s&&t>=a){let i=r&((a<=e?1:0)|(s>=t?2:0));a>=e&&s<=t&&!i?n.push(o):o.decompose(e-a,t-a,n,i)}a=s+1}}replace(t,n,r){if([t,n]=me(this,t,n),r.lines<this.lines)for(let i=0,a=0;i<this.children.length;i++){let o=this.children[i],s=a+o.length;if(t>=a&&n<=s){let c=o.replace(t-a,n-a,r),l=this.lines-o.lines+c.lines;if(c.lines<l>>4&&c.lines>l>>6){let a=this.children.slice();return a[i]=c,new e(a,this.length-(n-t)+r.length)}return super.replace(a,s,c)}a=s+1}return super.replace(t,n,r)}sliceString(e,t=this.length,n=`
|
|
3
3
|
`){[e,t]=me(this,e,t);let r=``;for(let i=0,a=0;i<this.children.length&&a<=t;i++){let o=this.children[i],s=a+o.length;a>e&&i&&(r+=n),e<s&&t>a&&(r+=o.sliceString(e-a,t-a,n)),a=s+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(t,n){if(!(t instanceof e))return 0;let r=0,[i,a,o,s]=n>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;i+=n,a+=n){if(i==o||a==s)return r;let e=this.children[i],c=t.children[a];if(e!=c)return r+e.scanIdentical(c,n);r+=e.length+1}}static from(t,n=t.reduce((e,t)=>e+t.length+1,-1)){let r=0;for(let e of t)r+=e.lines;if(r<32){let e=[];for(let n of t)n.flatten(e);return new T(e,n)}let i=Math.max(32,r>>5),a=i<<1,o=i>>1,s=[],c=0,l=-1,u=[];function d(t){let n;if(t.lines>a&&t instanceof e)for(let e of t.children)d(e);else t.lines>o&&(c>o||!c)?(f(),s.push(t)):t instanceof T&&c&&(n=u[u.length-1])instanceof T&&t.lines+n.lines<=32?(c+=t.lines,l+=t.length+1,u[u.length-1]=new T(n.text.concat(t.text),n.length+1+t.length)):(c+t.lines>i&&f(),c+=t.lines,l+=t.length+1,u.push(t))}function f(){c!=0&&(s.push(u.length==1?u[0]:e.from(u,l)),l=-1,c=u.length=0)}for(let e of t)d(e);return f(),s.length==1?s[0]:new e(s,n)}};w.empty=new T([``],0);function se(e){let t=-1;for(let n of e)t+=n.length+1;return t}function ce(e,t,n=0,r=1e9){for(let i=0,a=0,o=!0;a<e.length&&i<=r;a++){let s=e[a],c=i+s.length;c>=n&&(c>r&&(s=s.slice(0,r-i)),i<n&&(s=s.slice(n-i)),o?(t[t.length-1]+=s,o=!1):t.push(s)),i=c+1}return t}function le(e,t,n){return ce(e,[``],t,n)}var ue=class{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value=``,this.nodes=[e],this.offsets=[t>0?1:(e instanceof T?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],a=i>>1,o=r instanceof T?r.text.length:r.children.length;if(a==(t>0?o:0)){if(n==0)return this.done=!0,this.value=``,this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((i&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=`
|
|
4
4
|
`,this;e--}else if(r instanceof T){let i=r.text[a+(t<0?-1:0)];if(this.offsets[n]+=t,i.length>Math.max(0,e))return this.value=e==0?i:t>0?i.slice(e):i.slice(0,i.length-e),this;e-=i.length}else{let i=r.children[a+(t<0?-1:0)];e>i.length?(e-=i.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(i),this.offsets.push(t>0?1:(i instanceof T?i.text.length:i.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}},de=class{constructor(e,t,n){this.value=``,this.done=!1,this.cursor=new ue(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value=``,this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=``}},fe=class{constructor(e){this.inner=e,this.afterBreak=!0,this.value=``,this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value=``,this.afterBreak=!1):t?(this.done=!0,this.value=``):n?this.afterBreak?this.value=``:(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}};typeof Symbol<`u`&&(w.prototype[Symbol.iterator]=function(){return this.iter()},ue.prototype[Symbol.iterator]=de.prototype[Symbol.iterator]=fe.prototype[Symbol.iterator]=function(){return this});var pe=class{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}};function me(e,t,n){return t=Math.max(0,Math.min(e.length,t)),[t,Math.max(t,Math.min(e.length,n))]}function E(e,t,n=!0,r=!0){return te(e,t,n,r)}function he(e){return e>=56320&&e<57344}function ge(e){return e>=55296&&e<56320}function _e(e,t){let n=e.charCodeAt(t);if(!ge(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return he(r)?(n-55296<<10)+(r-56320)+65536:n}function ve(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}function ye(e){return e<65536?1:2}var be=/\r\n?|\n/,xe=(function(e){return e[e.Simple=0]=`Simple`,e[e.TrackDel=1]=`TrackDel`,e[e.TrackBefore=2]=`TrackBefore`,e[e.TrackAfter=3]=`TrackAfter`,e})(xe||={}),Se=class e{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,r=0;t<this.sections.length;){let i=this.sections[t++],a=this.sections[t++];a<0?(e(n,r,i),r+=i):r+=a,n+=i}}iterChangedRanges(e,t=!1){Te(this,e,t)}get invertedDesc(){let t=[];for(let e=0;e<this.sections.length;){let n=this.sections[e++],r=this.sections[e++];r<0?t.push(n,r):t.push(r,n)}return new e(t)}composeDesc(e){return this.empty?e:e.empty?this:De(this,e)}mapDesc(e,t=!1){return e.empty?this:Ee(this,e,t)}mapPos(e,t=-1,n=xe.Simple){let r=0,i=0;for(let a=0;a<this.sections.length;){let o=this.sections[a++],s=this.sections[a++],c=r+o;if(s<0){if(c>e)return i+(e-r);i+=o}else{if(n!=xe.Simple&&c>=e&&(n==xe.TrackDel&&r<e&&c>e||n==xe.TrackBefore&&r<e||n==xe.TrackAfter&&c>e))return null;if(c>e||c==e&&t<0&&!o)return e==r||t<0?i:i+s;i+=s}r=c}if(e>r)throw RangeError(`Position ${e} is out of range for changeset of length ${r}`);return i}touchesRange(e,t=e){for(let n=0,r=0;n<this.sections.length&&r<=t;){let i=this.sections[n++],a=this.sections[n++],o=r+i;if(a>=0&&r<=t&&o>=e)return r<e&&o>t?`cover`:!0;r=o}return!1}toString(){let e=``;for(let t=0;t<this.sections.length;){let n=this.sections[t++],r=this.sections[t++];e+=(e?` `:``)+n+(r>=0?`:`+r:``)}return e}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(e=>typeof e!=`number`))throw RangeError(`Invalid JSON representation of ChangeDesc`);return new e(t)}static create(t){return new e(t)}},Ce=class e extends Se{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw RangeError(`Applying change set to a document with the wrong length`);return Te(this,(t,n,r,i,a)=>e=e.replace(r,r+(n-t),a),!1),e}mapDesc(e,t=!1){return Ee(this,e,t,!0)}invert(t){let n=this.sections.slice(),r=[];for(let e=0,i=0;e<n.length;e+=2){let a=n[e],o=n[e+1];if(o>=0){n[e]=o,n[e+1]=a;let s=e>>1;for(;r.length<s;)r.push(w.empty);r.push(a?t.slice(i,i+a):w.empty)}i+=a}return new e(n,r)}compose(e){return this.empty?e:e.empty?this:De(this,e,!0)}map(e,t=!1){return e.empty?this:Ee(this,e,t,!0)}iterChanges(e,t=!1){Te(this,e,t)}get desc(){return Se.create(this.sections)}filter(t){let n=[],r=[],i=[],a=new Oe(this);done:for(let e=0,o=0;;){let s=e==t.length?1e9:t[e++];for(;o<s||o==s&&a.len==0;){if(a.done)break done;let e=Math.min(a.len,s-o);D(i,e,-1);let t=a.ins==-1?-1:a.off==0?a.ins:0;D(n,e,t),t>0&&we(r,n,a.text),a.forward(e),o+=e}let c=t[e++];for(;o<c;){if(a.done)break done;let e=Math.min(a.len,c-o);D(n,e,-1),D(i,e,a.ins==-1?-1:a.off==0?a.ins:0),a.forward(e),o+=e}}return{changes:new e(n,r),filtered:Se.create(i)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],r=this.sections[t+1];r<0?e.push(n):r==0?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(t,n,r){let i=[],a=[],o=0,s=null;function c(t=!1){if(!t&&!i.length)return;o<n&&D(i,n-o,-1);let r=new e(i,a);s=s?s.compose(r.map(s)):r,i=[],a=[],o=0}function l(t){if(Array.isArray(t))for(let e of t)l(e);else if(t instanceof e){if(t.length!=n)throw RangeError(`Mismatched change set length (got ${t.length}, expected ${n})`);c(),s=s?s.compose(t.map(s)):t}else{let{from:e,to:s=e,insert:l}=t;if(e>s||e<0||s>n)throw RangeError(`Invalid change range ${e} to ${s} (in doc of length ${n})`);let u=l?typeof l==`string`?w.of(l.split(r||be)):l:w.empty,d=u.length;if(e==s&&d==0)return;e<o&&c(),e>o&&D(i,e-o,-1),D(i,s-e,d),we(a,i,u),o=s}}return l(t),c(!s),s}static empty(t){return new e(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw RangeError(`Invalid JSON representation of ChangeSet`);let n=[],r=[];for(let e=0;e<t.length;e++){let i=t[e];if(typeof i==`number`)n.push(i,-1);else if(!Array.isArray(i)||typeof i[0]!=`number`||i.some((e,t)=>t&&typeof e!=`string`))throw RangeError(`Invalid JSON representation of ChangeSet`);else if(i.length==1)n.push(i[0],0);else{for(;r.length<e;)r.push(w.empty);r[e]=w.of(i.slice(1)),n.push(i[0],r[e].length)}}return new e(n,r)}static createSet(t,n){return new e(t,n)}};function D(e,t,n,r=!1){if(t==0&&n<=0)return;let i=e.length-2;i>=0&&n<=0&&n==e[i+1]?e[i]+=t:i>=0&&t==0&&e[i]==0?e[i+1]+=n:r?(e[i]+=t,e[i+1]+=n):e.push(t,n)}function we(e,t,n){if(n.length==0)return;let r=t.length-2>>1;if(r<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<r;)e.push(w.empty);e.push(n)}}function Te(e,t,n){let r=e.inserted;for(let i=0,a=0,o=0;o<e.sections.length;){let s=e.sections[o++],c=e.sections[o++];if(c<0)i+=s,a+=s;else{let l=i,u=a,d=w.empty;for(;l+=s,u+=c,c&&r&&(d=d.append(r[o-2>>1])),!(n||o==e.sections.length||e.sections[o+1]<0);)s=e.sections[o++],c=e.sections[o++];t(i,l,a,u,d),i=l,a=u}}}function Ee(e,t,n,r=!1){let i=[],a=r?[]:null,o=new Oe(e),s=new Oe(t);for(let e=-1;;)if(o.done&&s.len||s.done&&o.len)throw Error(`Mismatched change set lengths`);else if(o.ins==-1&&s.ins==-1){let e=Math.min(o.len,s.len);D(i,e,-1),o.forward(e),s.forward(e)}else if(s.ins>=0&&(o.ins<0||e==o.i||o.off==0&&(s.len<o.len||s.len==o.len&&!n))){let t=s.len;for(D(i,s.ins,-1);t;){let n=Math.min(o.len,t);o.ins>=0&&e<o.i&&o.len<=n&&(D(i,0,o.ins),a&&we(a,i,o.text),e=o.i),o.forward(n),t-=n}s.next()}else if(o.ins>=0){let t=0,n=o.len;for(;n;)if(s.ins==-1){let e=Math.min(n,s.len);t+=e,n-=e,s.forward(e)}else if(s.ins==0&&s.len<n)n-=s.len,s.next();else break;D(i,t,e<o.i?o.ins:0),a&&e<o.i&&we(a,i,o.text),e=o.i,o.forward(o.len-n)}else if(o.done&&s.done)return a?Ce.createSet(i,a):Se.create(i);else throw Error(`Mismatched change set lengths`)}function De(e,t,n=!1){let r=[],i=n?[]:null,a=new Oe(e),o=new Oe(t);for(let e=!1;;)if(a.done&&o.done)return i?Ce.createSet(r,i):Se.create(r);else if(a.ins==0)D(r,a.len,0,e),a.next();else if(o.len==0&&!o.done)D(r,0,o.ins,e),i&&we(i,r,o.text),o.next();else if(a.done||o.done)throw Error(`Mismatched change set lengths`);else{let t=Math.min(a.len2,o.len),n=r.length;if(a.ins==-1){let n=o.ins==-1?-1:o.off?0:o.ins;D(r,t,n,e),i&&n&&we(i,r,o.text)}else o.ins==-1?(D(r,a.off?0:a.len,t,e),i&&we(i,r,a.textBit(t))):(D(r,a.off?0:a.len,o.off?0:o.ins,e),i&&!o.off&&we(i,r,o.text));e=(a.ins>t||o.ins>=0&&o.len>t)&&(e||r.length>n),a.forward2(t),o.forward(t)}}var Oe=class{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?w.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?w.empty:t[n].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}},ke=class e{constructor(e,t,n){this.from=e,this.to=t,this.flags=n}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(t,n=-1){let r,i;return this.empty?r=i=t.mapPos(this.from,n):(r=t.mapPos(this.from,1),i=t.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new e(r,i,this.flags)}extend(e,t=e,n=0){if(e<=this.anchor&&t>=this.anchor)return O.range(e,t,void 0,void 0,n);let r=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return O.range(this.anchor,r,void 0,void 0,n)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!=`number`||typeof e.head!=`number`)throw RangeError(`Invalid JSON representation for SelectionRange`);return O.range(e.anchor,e.head)}static create(t,n,r){return new e(t,n,r)}},O=class e{constructor(e,t){this.ranges=e,this.mainIndex=t}map(t,n=-1){return t.empty?this:e.create(this.ranges.map(e=>e.map(t,n)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new e([this.main],0)}addRange(t,n=!0){return e.create([t].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(t,n=this.mainIndex){let r=this.ranges.slice();return r[n]=t,e.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||typeof t.main!=`number`||t.main>=t.ranges.length)throw RangeError(`Invalid JSON representation for EditorSelection`);return new e(t.ranges.map(e=>ke.fromJSON(e)),t.main)}static single(t,n=t){return new e([e.range(t,n)],0)}static create(t,n=0){if(t.length==0)throw RangeError(`A selection needs at least one range`);for(let r=0,i=0;i<t.length;i++){let a=t[i];if(a.empty?a.from<=r:a.from<r)return e.normalized(t.slice(),n);r=a.to}return new e(t,n)}static cursor(e,t=0,n,r){return ke.create(e,e,(t==0?0:t<0?8:16)|(n==null?7:Math.min(6,n))|(r??16777215)<<6)}static range(e,t,n,r,i){let a=(n??16777215)<<6|(r==null?7:Math.min(6,r));return!i&&e!=t&&(i=t<e?1:-1),t<e?ke.create(t,e,48|a):ke.create(e,t,(i?i<0?8:16:0)|a)}static normalized(t,n=0){let r=t[n];t.sort((e,t)=>e.from-t.from),n=t.indexOf(r);for(let r=1;r<t.length;r++){let i=t[r],a=t[r-1];if(i.empty?i.from<=a.to:i.from<a.to){let o=a.from,s=Math.max(i.to,a.to);r<=n&&n--,t.splice(--r,2,i.anchor>i.head?e.range(s,o):e.range(o,s))}}return new e(t,n)}};function Ae(e,t){for(let n of e.ranges)if(n.to>t)throw RangeError(`Selection points outside of document`)}var je=0,k=class e{constructor(e,t,n,r,i){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=r,this.id=je++,this.default=e([]),this.extensions=typeof i==`function`?i(this):i}get reader(){return this}static define(t={}){return new e(t.combine||(e=>e),t.compareInput||((e,t)=>e===t),t.compare||(t.combine?(e,t)=>e===t:Me),!!t.static,t.enables)}of(e){return new Ne([],this,0,e)}compute(e,t){if(this.isStatic)throw Error(`Can't compute a static facet`);return new Ne(e,this,1,t)}computeN(e,t){if(this.isStatic)throw Error(`Can't compute a static facet`);return new Ne(e,this,2,t)}from(e,t){return t||=e=>e,this.compute([e],n=>t(n.field(e)))}};function Me(e,t){return e==t||e.length==t.length&&e.every((e,n)=>e===t[n])}var Ne=class{constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=je++}dynamicSlot(e){let t=this.value,n=this.facet.compareInput,r=this.id,i=e[r]>>1,a=this.type==2,o=!1,s=!1,c=[];for(let t of this.dependencies)t==`doc`?o=!0:t==`selection`?s=!0:(e[t.id]??1)&1||c.push(e[t.id]);return{create(e){return e.values[i]=t(e),1},update(e,r){if(o&&r.docChanged||s&&(r.docChanged||r.selection)||Fe(e,c)){let r=t(e);if(a?!Pe(r,e.values[i],n):!n(r,e.values[i]))return e.values[i]=r,1}return 0},reconfigure:(e,o)=>{let s,c=o.config.address[r];if(c!=null){let r=Je(o,c);if(this.dependencies.every(t=>t instanceof k?o.facet(t)===e.facet(t):t instanceof Re?o.field(t,!1)==e.field(t,!1):!0)||(a?Pe(s=t(e),r,n):n(s=t(e),r)))return e.values[i]=r,0}else s=t(e);return e.values[i]=s,1}}}};function Pe(e,t,n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function Fe(e,t){let n=!1;for(let r of t)qe(e,r)&1&&(n=!0);return n}function Ie(e,t,n){let r=n.map(t=>e[t.id]),i=n.map(e=>e.type),a=r.filter(e=>!(e&1)),o=e[t.id]>>1;function s(e){let n=[];for(let t=0;t<r.length;t++){let a=Je(e,r[t]);if(i[t]==2)for(let e of a)n.push(e);else n.push(a)}return t.combine(n)}return{create(e){for(let t of r)qe(e,t);return e.values[o]=s(e),1},update(e,n){if(!Fe(e,a))return 0;let r=s(e);return t.compare(r,e.values[o])?0:(e.values[o]=r,1)},reconfigure(e,i){let a=Fe(e,r),c=i.config.facets[t.id],l=i.facet(t);if(c&&!a&&Me(n,c))return e.values[o]=l,0;let u=s(e);return t.compare(u,l)?(e.values[o]=l,0):(e.values[o]=u,1)}}}var Le=k.define({static:!0}),Re=class e{constructor(e,t,n,r,i){this.id=e,this.createF=t,this.updateF=n,this.compareF=r,this.spec=i,this.provides=void 0}static define(t){let n=new e(je++,t.create,t.update,t.compare||((e,t)=>e===t),t);return t.provide&&(n.provides=t.provide(n)),n}create(e){return(e.facet(Le).find(e=>e.field==this)?.create||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,n)=>{let r=e.values[t],i=this.updateF(r,n);return this.compareF(r,i)?0:(e.values[t]=i,1)},reconfigure:(e,n)=>{let r=e.facet(Le),i=n.facet(Le),a;return(a=r.find(e=>e.field==this))&&a!=i.find(e=>e.field==this)?(e.values[t]=a.create(e),1):n.config.address[this.id]==null?(e.values[t]=this.create(e),1):(e.values[t]=n.field(this),0)}}}init(e){return[this,Le.of({field:this,create:e})]}get extension(){return this}},ze={lowest:4,low:3,default:2,high:1,highest:0};function Be(e){return t=>new He(t,e)}var Ve={highest:Be(ze.highest),high:Be(ze.high),default:Be(ze.default),low:Be(ze.low),lowest:Be(ze.lowest)},He=class{constructor(e,t){this.inner=e,this.prec=t}},Ue=class e{of(e){return new We(this,e)}reconfigure(t){return e.reconfigure.of({compartment:this,extension:t})}get(e){return e.config.compartments.get(this)}},We=class{constructor(e,t){this.compartment=e,this.inner=t}},Ge=class e{constructor(e,t,n,r,i,a){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=r,this.staticValues=i,this.facets=a,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(t,n,r){let i=[],a=Object.create(null),o=new Map;for(let e of Ke(t,n,o))e instanceof Re?i.push(e):(a[e.facet.id]||(a[e.facet.id]=[])).push(e);let s=Object.create(null),c=[],l=[];for(let e of i)s[e.id]=l.length<<1,l.push(t=>e.slot(t));let u=r?.config.facets;for(let e in a){let t=a[e],n=t[0].facet,i=u&&u[e]||[];if(t.every(e=>e.type==0))if(s[n.id]=c.length<<1|1,Me(i,t))c.push(r.facet(n));else{let e=n.combine(t.map(e=>e.value));c.push(r&&n.compare(e,r.facet(n))?r.facet(n):e)}else{for(let e of t)e.type==0?(s[e.id]=c.length<<1|1,c.push(e.value)):(s[e.id]=l.length<<1,l.push(t=>e.dynamicSlot(t)));s[n.id]=l.length<<1,l.push(e=>Ie(e,n,t))}}return new e(t,o,l.map(e=>e(s)),s,c,a)}};function Ke(e,t,n){let r=[[],[],[],[],[]],i=new Map;function a(e,o){let s=i.get(e);if(s!=null){if(s<=o)return;let t=r[s].indexOf(e);t>-1&&r[s].splice(t,1),e instanceof We&&n.delete(e.compartment)}if(i.set(e,o),Array.isArray(e))for(let t of e)a(t,o);else if(e instanceof We){if(n.has(e.compartment))throw RangeError(`Duplicate use of compartment in extensions`);let r=t.get(e.compartment)||e.inner;n.set(e.compartment,r),a(r,o)}else if(e instanceof He)a(e.inner,e.prec);else if(e instanceof Re)r[o].push(e),e.provides&&a(e.provides,o);else if(e instanceof Ne)r[o].push(e),e.facet.extensions&&a(e.facet.extensions,ze.default);else{let t=e.extension;if(!t)throw Error(`Unrecognized extension value in extension set (${e}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);a(t,o)}}return a(e,ze.default),r.reduce((e,t)=>e.concat(t))}function qe(e,t){if(t&1)return 2;let n=t>>1,r=e.status[n];if(r==4)throw Error(`Cyclic dependency between fields and/or facets`);if(r&2)return r;e.status[n]=4;let i=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|i}function Je(e,t){return t&1?e.config.staticValues[t>>1]:e.values[t>>1]}var Ye=k.define(),Xe=k.define({combine:e=>e.some(e=>e),static:!0}),Ze=k.define({combine:e=>e.length?e[0]:void 0,static:!0}),Qe=k.define(),$e=k.define(),et=k.define(),tt=k.define({combine:e=>e.length?e[0]:!1}),nt=class{constructor(e,t){this.type=e,this.value=t}static define(){return new rt}},rt=class{of(e){return new nt(this,e)}},it=class{constructor(e){this.map=e}of(e){return new A(this,e)}},A=class e{constructor(e,t){this.type=e,this.value=t}map(t){let n=this.type.map(this.value,t);return n===void 0?void 0:n==this.value?this:new e(this.type,n)}is(e){return this.type==e}static define(e={}){return new it(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let r of e){let e=r.map(t);e&&n.push(e)}return n}};A.reconfigure=A.define(),A.appendConfig=A.define();var at=class e{constructor(t,n,r,i,a,o){this.startState=t,this.changes=n,this.selection=r,this.effects=i,this.annotations=a,this.scrollIntoView=o,this._doc=null,this._state=null,r&&Ae(r,n.newLength),a.some(t=>t.type==e.time)||(this.annotations=a.concat(e.time.of(Date.now())))}static create(t,n,r,i,a,o){return new e(t,n,r,i,a,o)}get newDoc(){return this._doc||=this.changes.apply(this.startState.doc)}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let n=this.annotation(e.userEvent);return!!(n&&(n==t||n.length>t.length&&n.slice(0,t.length)==t&&n[t.length]==`.`))}};at.time=nt.define(),at.userEvent=nt.define(),at.addToHistory=nt.define(),at.remote=nt.define();function ot(e,t){let n=[];for(let r=0,i=0;;){let a,o;if(r<e.length&&(i==t.length||t[i]>=e[r]))a=e[r++],o=e[r++];else if(i<t.length)a=t[i++],o=t[i++];else return n;!n.length||n[n.length-1]<a?n.push(a,o):n[n.length-1]<o&&(n[n.length-1]=o)}}function st(e,t,n){let r,i,a;return n?(r=t.changes,i=Ce.empty(t.changes.length),a=e.changes.compose(t.changes)):(r=t.changes.map(e.changes),i=e.changes.mapDesc(t.changes,!0),a=e.changes.compose(r)),{changes:a,selection:t.selection?t.selection.map(i):e.selection?.map(r),effects:A.mapEffects(e.effects,r).concat(A.mapEffects(t.effects,i)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function ct(e,t,n){let r=t.selection,i=pt(t.annotations);return t.userEvent&&(i=i.concat(at.userEvent.of(t.userEvent))),{changes:t.changes instanceof Ce?t.changes:Ce.of(t.changes||[],n,e.facet(Ze)),selection:r&&(r instanceof O?r:O.single(r.anchor,r.head)),effects:pt(t.effects),annotations:i,scrollIntoView:!!t.scrollIntoView}}function lt(e,t,n){let r=ct(e,t.length?t[0]:{},e.doc.length);t.length&&t[0].filter===!1&&(n=!1);for(let i=1;i<t.length;i++){t[i].filter===!1&&(n=!1);let a=!!t[i].sequential;r=st(r,ct(e,t[i],a?r.changes.newLength:e.doc.length),a)}let i=at.create(e,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return dt(n?ut(i):i)}function ut(e){let t=e.startState,n=!0;for(let r of t.facet(Qe)){let t=r(e);if(t===!1){n=!1;break}Array.isArray(t)&&(n=n===!0?t:ot(n,t))}if(n!==!0){let r,i;if(n===!1)i=e.changes.invertedDesc,r=Ce.empty(t.doc.length);else{let t=e.changes.filter(n);r=t.changes,i=t.filtered.mapDesc(t.changes).invertedDesc}e=at.create(t,r,e.selection&&e.selection.map(i),A.mapEffects(e.effects,i),e.annotations,e.scrollIntoView)}let r=t.facet($e);for(let n=r.length-1;n>=0;n--){let i=r[n](e);e=i instanceof at?i:Array.isArray(i)&&i.length==1&&i[0]instanceof at?i[0]:lt(t,pt(i),!1)}return e}function dt(e){let t=e.startState,n=t.facet(et),r=e;for(let i=n.length-1;i>=0;i--){let a=n[i](e);a&&Object.keys(a).length&&(r=st(r,ct(t,a,e.changes.newLength),!0))}return r==e?e:at.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}var ft=[];function pt(e){return e==null?ft:Array.isArray(e)?e:[e]}var j=(function(e){return e[e.Word=0]=`Word`,e[e.Space=1]=`Space`,e[e.Other=2]=`Other`,e})(j||={}),mt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,ht;try{ht=RegExp(`[\\p{Alphabetic}\\p{Number}_]`,`u`)}catch{}function gt(e){if(ht)return ht.test(e);for(let t=0;t<e.length;t++){let n=e[t];if(/\w/.test(n)||n>``&&(n.toUpperCase()!=n.toLowerCase()||mt.test(n)))return!0}return!1}function _t(e){return t=>{if(!/\S/.test(t))return j.Space;if(gt(t))return j.Word;for(let n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return j.Word;return j.Other}}var M=class e{constructor(e,t,n,r,i,a){this.config=e,this.doc=t,this.selection=n,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=i,a&&(a._state=this);for(let e=0;e<this.config.dynamicSlots.length;e++)qe(this,e<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(n==null){if(t)throw RangeError(`Field is not present in this state`);return}return qe(this,n),Je(this,n)}update(...e){return lt(this,e,!0)}applyTransaction(t){let n=this.config,{base:r,compartments:i}=n;for(let e of t.effects)e.is(Ue.reconfigure)?(n&&=(i=new Map,n.compartments.forEach((e,t)=>i.set(t,e)),null),i.set(e.value.compartment,e.value.extension)):e.is(A.reconfigure)?(n=null,r=e.value):e.is(A.appendConfig)&&(n=null,r=pt(r).concat(e.value));let a;n?a=t.startState.values.slice():(n=Ge.resolve(r,i,this),a=new e(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(e,t)=>t.reconfigure(e,this),null).values);let o=t.startState.facet(Xe)?t.newSelection:t.newSelection.asSingle();new e(n,t.newDoc,o,a,(e,n)=>n.update(e,t),t)}replaceSelection(e){return typeof e==`string`&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:O.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),r=this.changes(n.changes),i=[n.range],a=pt(n.effects);for(let n=1;n<t.ranges.length;n++){let o=e(t.ranges[n]),s=this.changes(o.changes),c=s.map(r);for(let e=0;e<n;e++)i[e]=i[e].map(c);let l=r.mapDesc(s,!0);i.push(o.range.map(l)),r=r.compose(c),a=A.mapEffects(a,c).concat(A.mapEffects(pt(o.effects),l))}return{changes:r,selection:O.create(i,t.mainIndex),effects:a}}changes(t=[]){return t instanceof Ce?t:Ce.of(t,this.doc.length,this.facet(e.lineSeparator))}toText(t){return w.of(t.split(this.facet(e.lineSeparator)||be))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(qe(this,t),Je(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let r=e[n];r instanceof Re&&this.config.address[r.id]!=null&&(t[n]=r.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(t,n={},r){if(!t||typeof t.doc!=`string`)throw RangeError(`Invalid JSON representation for EditorState`);let i=[];if(r){for(let e in r)if(Object.prototype.hasOwnProperty.call(t,e)){let n=r[e],a=t[e];i.push(n.init(e=>n.spec.fromJSON(a,e)))}}return e.create({doc:t.doc,selection:O.fromJSON(t.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(t={}){let n=Ge.resolve(t.extensions||[],new Map),r=t.doc instanceof w?t.doc:w.of((t.doc||``).split(n.staticFacet(e.lineSeparator)||be)),i=t.selection?t.selection instanceof O?t.selection:O.single(t.selection.anchor,t.selection.head):O.single(0);return Ae(i,r.length),n.staticFacet(Xe)||(i=i.asSingle()),new e(n,r,i,n.dynamicSlots.map(()=>null),(e,t)=>t.create(e),null)}get tabSize(){return this.facet(e.tabSize)}get lineBreak(){return this.facet(e.lineSeparator)||`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./react-nm2Ru1Pt.js";import"./react-dom-Bpkvzu3U.js";import"./jsx-runtime-BRW_vwa9.js";import"./scroll-area-BpXCNme3.js";import"./ai-settings-section-Bo9lCaTd.js";import"./dist-CM0oD8tQ.js";import"./input-BHj0veau.js";import"./api-client-BvxmRZUi.js";import"./api-settings-CUxg9RE5.js";import{s as e}from"./index-
|
|
1
|
+
import"./react-nm2Ru1Pt.js";import"./react-dom-Bpkvzu3U.js";import"./jsx-runtime-BRW_vwa9.js";import"./scroll-area-BpXCNme3.js";import"./ai-settings-section-Bo9lCaTd.js";import"./dist-CM0oD8tQ.js";import"./input-BHj0veau.js";import"./api-client-BvxmRZUi.js";import"./api-settings-CUxg9RE5.js";import{s as e}from"./index-BcIyrJiY.js";export{e as SettingsTab};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CFjPhJqf.js";import{t}from"./react-nm2Ru1Pt.js";import{t as n}from"./jsx-runtime-BRW_vwa9.js";import{n as r,t as i}from"./use-monaco-theme-
|
|
1
|
+
import{o as e}from"./chunk-CFjPhJqf.js";import{t}from"./react-nm2Ru1Pt.js";import{t as n}from"./jsx-runtime-BRW_vwa9.js";import{n as r,t as i}from"./use-monaco-theme-CM4IMROI.js";import{n as a,t as o}from"./sql-completion-provider-B8uUWWej.js";var s=e(t(),1),c=n();function l(e,t){let n=e.split(`
|
|
2
2
|
`),r=0;for(let e=0;e<n.length;e++){let i=n[e].trim();e<t-1&&i.endsWith(`;`)&&(r=e+1)}let i=n.length-1;for(let e=t-1;e<n.length;e++)if(n[e].trim().endsWith(`;`)){i=e;break}for(;r<=i;){let e=n[r].trim();if(e&&!e.startsWith(`--`))break;r++}return n.slice(r,i+1).join(`
|
|
3
3
|
`).trim()}function u({onExecute:e,loading:t,defaultValue:n=`SELECT * FROM `,schemaInfo:u}){let[d,f]=(0,s.useState)(n),p=(0,s.useRef)(null),m=(0,s.useRef)(null),h=(0,s.useRef)(null),g=(0,s.useRef)(e);g.current=e;let _=i();(0,s.useEffect)(()=>{if(!(!m.current||!u))return h.current?.dispose(),o(),h.current=m.current.languages.registerCompletionItemProvider(`sql`,a(m.current,u)),()=>{h.current?.dispose()}},[u]);let v=(0,s.useCallback)((e,t)=>{p.current=e,m.current=t,e.addAction({id:`run-query-at-cursor`,label:`Run Statement at Cursor`,keybindings:[t.KeyMod.CtrlCmd|t.KeyCode.Enter],run:e=>{let t=e.getPosition();if(!t)return;let n=l(e.getValue(),t.lineNumber);n&&g.current(n)}}),u&&(h.current?.dispose(),h.current=t.languages.registerCompletionItemProvider(`sql`,a(t,u)))},[u]);return(0,s.useEffect)(()=>{f(n)},[n]),(0,c.jsx)(`div`,{className:`h-full overflow-hidden`,children:(0,c.jsx)(r,{height:`100%`,language:`sql`,theme:_,value:d,onChange:e=>f(e??``),onMount:v,options:{minimap:{enabled:!1},lineNumbers:`off`,scrollBeyondLastLine:!1,wordWrap:`on`,fontSize:12,tabSize:2,renderLineHighlight:`none`,overviewRulerLanes:0,hideCursorInOverviewRuler:!0,scrollbar:{vertical:`auto`,horizontal:`auto`,verticalScrollbarSize:6,horizontalScrollbarSize:6},padding:{top:4,bottom:4},lineDecorationsWidth:4,lineNumbersMinChars:0,glyphMargin:!1,folding:!1,fixedOverflowWidgets:!0}})})}export{u as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CFjPhJqf.js";import{t}from"./react-nm2Ru1Pt.js";import{t as n}from"./jsx-runtime-BRW_vwa9.js";import{t as r}from"./chevron-right-DY_wImxB.js";import{t as i}from"./database-CgTomMxt.js";import{t as a}from"./refresh-cw-Clk8fdUD.js";import{t as o}from"./table-Bi27fEaN.js";import{t as s}from"./trash-2-CNuB-htI.js";import{i as c,t as l}from"./api-client-BvxmRZUi.js";import{$ as u,B as d,Q as f}from"./index-DK4yJlIj.js";import"./use-monaco-theme-vmoBT6np.js";import{t as p}from"./sql-query-editor-CxODOF9o.js";import{n as m,r as h,t as g}from"./lib-DSLzfeW0.js";var _=e(t(),1);function v(e,t,n){let[r,i]=(0,_.useState)([]),[a,o]=(0,_.useState)(null),[s,u]=(0,_.useState)(null),[d,f]=(0,_.useState)([]),[p,m]=(0,_.useState)(!1),[h,g]=(0,_.useState)(null),[v,y]=(0,_.useState)(1),[b,x]=(0,_.useState)(null),[S,C]=(0,_.useState)(null),[w,T]=(0,_.useState)(!1),E=n?`/api/db/connections/${n}`:null,D=E??`${c(e)}/sqlite`,O=E?``:`path=${encodeURIComponent(t)}`,k=(0,_.useCallback)(async()=>{m(!0),g(null);try{let e=E?`?cached=1`:O?`?${O}`:``,t=await l.get(`${D}/tables${e}`);i(t),!E&&t.length>0&&!a&&o(t[0].name)}catch(e){g(e.message)}finally{m(!1)}},[D,O,E]);(0,_.useEffect)(()=>{k()},[k]);let A=(0,_.useCallback)(async()=>{if(a){m(!0);try{let e=O?`${O}&`:``,[t,n]=await Promise.all([l.get(`${D}/data?${e}table=${encodeURIComponent(a)}&page=${v}&limit=100`),l.get(`${D}/schema?${e}table=${encodeURIComponent(a)}`)]);u(t),f(n)}catch(e){g(e.message)}finally{m(!1)}}},[D,O,a,v]);return(0,_.useEffect)(()=>{A()},[A]),{tables:r,selectedTable:a,selectTable:(0,_.useCallback)(e=>{o(e),y(1),x(null)},[]),tableData:s,schema:d,loading:p,error:h,page:v,setPage:y,queryResult:b,queryError:S,queryLoading:w,executeQuery:(0,_.useCallback)(async e=>{T(!0),C(null);try{let n=E?{sql:e}:{path:t,sql:e},r=await l.post(`${D}/query`,n);x(r),r.changeType===`modify`&&A()}catch(e){C(e.message)}finally{T(!1)}},[D,E,t,A]),updateCell:(0,_.useCallback)(async(e,n,r)=>{if(a)try{E?await l.put(`${D}/cell`,{table:a,pkColumn:`rowid`,pkValue:e,column:n,value:r}):await l.put(`${D}/cell`,{path:t,table:a,rowid:e,column:n,value:r}),A()}catch(e){g(e.message)}},[D,E,t,a,A]),deleteRow:(0,_.useCallback)(async e=>{if(a)try{E?await l.del(`${D}/row`,{table:a,pkColumn:`rowid`,pkValue:e}):await l.del(`${D}/row`,{path:t,table:a,rowid:e}),A(),k()}catch(e){g(e.message)}},[D,E,t,a,A,k]),refreshTables:k,refreshData:A}}var y=n();function b({tables:e,selectedTable:t,onSelect:n,onRefresh:r}){return(0,y.jsxs)(`div`,{className:`w-48 shrink-0 flex flex-col bg-background overflow-hidden`,children:[(0,y.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-2 border-b border-border`,children:[(0,y.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground uppercase tracking-wider`,children:`Tables`}),(0,y.jsx)(`button`,{type:`button`,onClick:r,className:`text-muted-foreground hover:text-foreground transition-colors`,title:`Refresh tables`,children:(0,y.jsx)(a,{className:`size-3`})})]}),(0,y.jsxs)(`div`,{className:`flex-1 overflow-y-auto`,children:[e.map(e=>(0,y.jsxs)(`button`,{type:`button`,onClick:()=>n(e.name),className:`w-full flex items-center gap-2 px-3 py-1.5 text-left text-xs transition-colors ${t===e.name?`bg-muted text-foreground`:`text-muted-foreground hover:bg-muted/50 hover:text-foreground`}`,children:[(0,y.jsx)(o,{className:`size-3 shrink-0`}),(0,y.jsx)(`span`,{className:`truncate flex-1`,children:e.name}),(0,y.jsx)(`span`,{className:`text-[10px] opacity-60`,children:e.rowCount})]},e.name)),e.length===0&&(0,y.jsx)(`p`,{className:`px-3 py-4 text-xs text-muted-foreground text-center`,children:`No tables found`})]})]})}function x({tableData:e,schema:t,loading:n,page:i,onPageChange:a,onCellUpdate:o,onRowDelete:s}){if(!e)return(0,y.jsx)(`div`,{className:`flex items-center justify-center h-full text-xs text-muted-foreground`,children:n?(0,y.jsx)(d,{className:`size-4 animate-spin`}):`Select a table`});let c=Math.ceil(e.total/e.limit)||1;return(0,y.jsxs)(`div`,{className:`flex flex-col h-full overflow-hidden`,children:[(0,y.jsx)(`div`,{className:`flex-1 overflow-auto`,children:(0,y.jsx)(S,{columns:e.columns,rows:e.rows,schema:t,onCellUpdate:o,onRowDelete:s})}),(0,y.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-1.5 border-t border-border bg-background shrink-0 text-xs text-muted-foreground`,children:[(0,y.jsxs)(`span`,{children:[e.total.toLocaleString(),` rows`]}),(0,y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,y.jsx)(`button`,{type:`button`,disabled:i<=1,onClick:()=>a(i-1),className:`p-0.5 rounded hover:bg-muted disabled:opacity-30`,children:(0,y.jsx)(u,{className:`size-3.5`})}),(0,y.jsxs)(`span`,{children:[i,` / `,c]}),(0,y.jsx)(`button`,{type:`button`,disabled:i>=c,onClick:()=>a(i+1),className:`p-0.5 rounded hover:bg-muted disabled:opacity-30`,children:(0,y.jsx)(r,{className:`size-3.5`})})]})]})]})}function S({columns:e,rows:t,schema:n,onCellUpdate:r,onRowDelete:i}){let[a,o]=(0,_.useState)(null),[c,l]=(0,_.useState)(``),[u,d]=(0,_.useState)(null),f=(0,_.useMemo)(()=>new Set(n.filter(e=>e.pk).map(e=>e.name)),[n]),p=(0,_.useCallback)((e,t,n)=>{t!==`rowid`&&(o({rowIdx:e,col:t}),l(n==null?``:String(n)))},[]),v=(0,_.useCallback)(()=>{if(!a)return;let e=t[a.rowIdx];if(!e)return;let n=e.rowid,i=e[a.col];String(i??``)!==c&&r(n,a.col,c===``?null:c),o(null)},[a,c,t,r]),b=(0,_.useCallback)(()=>o(null),[]),x=(0,_.useCallback)(e=>{let n=t[e];!n||!i||(i(n.rowid),d(null))},[t,i]),S=m({data:t,columns:(0,_.useMemo)(()=>{let t=e.map(e=>({id:e,accessorFn:t=>t[e],header:()=>(0,y.jsx)(`span`,{className:`${f.has(e)?`font-bold`:``} ${e===`rowid`?`text-muted-foreground/50`:``}`,children:e}),cell:({row:t,getValue:n})=>{let r=t.index,i=a?.rowIdx===r&&a?.col===e,o=n();return i?(0,y.jsx)(`input`,{autoFocus:!0,className:`w-full bg-transparent border border-primary/50 rounded px-1 py-0 text-xs outline-none`,value:c,onChange:e=>l(e.target.value),onBlur:v,onKeyDown:e=>{e.key===`Enter`&&v(),e.key===`Escape`&&b()}}):(0,y.jsx)(`span`,{className:`cursor-pointer truncate block ${o==null?`text-muted-foreground/40 italic`:``} ${e===`rowid`?`text-muted-foreground/50`:``}`,onDoubleClick:()=>p(r,e,o),title:o==null?`NULL`:String(o),children:o==null?`NULL`:String(o)})}}));return i&&t.push({id:`_actions`,header:()=>null,cell:({row:e})=>{let t=e.index;return u===t?(0,y.jsxs)(`span`,{className:`flex items-center gap-1 whitespace-nowrap`,children:[(0,y.jsx)(`button`,{type:`button`,onClick:()=>x(t),className:`text-destructive text-[10px] font-medium hover:underline`,children:`Confirm`}),(0,y.jsx)(`button`,{type:`button`,onClick:()=>d(null),className:`text-muted-foreground text-[10px] hover:underline`,children:`Cancel`})]}):(0,y.jsx)(`button`,{type:`button`,onClick:()=>d(t),className:`p-0.5 rounded opacity-0 group-hover:opacity-100 hover:bg-destructive/10 hover:text-destructive transition-opacity`,title:`Delete row`,children:(0,y.jsx)(s,{className:`size-3`})})},size:60}),t},[e,f,a,c,v,b,p,i,u,x]),getCoreRowModel:h()});return(0,y.jsxs)(`table`,{className:`w-full text-xs border-collapse`,children:[(0,y.jsx)(`thead`,{className:`sticky top-0 z-10 bg-muted`,children:S.getHeaderGroups().map(e=>(0,y.jsx)(`tr`,{children:e.headers.map(e=>(0,y.jsx)(`th`,{className:`px-2 py-1.5 text-left font-medium text-muted-foreground border-b border-border whitespace-nowrap`,children:g(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),(0,y.jsxs)(`tbody`,{children:[S.getRowModel().rows.map(e=>(0,y.jsx)(`tr`,{className:`group hover:bg-muted/30 border-b border-border/50`,children:e.getVisibleCells().map(e=>(0,y.jsx)(`td`,{className:`px-2 py-1 max-w-[300px]`,children:g(e.column.columnDef.cell,e.getContext())},e.id))},e.id)),t.length===0&&(0,y.jsx)(`tr`,{children:(0,y.jsx)(`td`,{colSpan:e.length,className:`px-2 py-8 text-center text-muted-foreground`,children:`No data`})})]})]})}function C({onExecute:e,loading:t}){return(0,y.jsx)(p,{onExecute:e,loading:t})}function w({metadata:e}){let t=e?.filePath,n=e?.projectName,r=e?.connectionId,a=e?.tableName,[o,s]=(0,_.useState)(!1);return r?(0,y.jsx)(T,{projectName:``,dbPath:``,connectionId:r,connectionName:e?.connectionName,initialTable:a,queryPanelOpen:o,onToggleQueryPanel:()=>s(e=>!e),hideTableList:!0}):!t||!n?(0,y.jsxs)(`div`,{className:`flex items-center justify-center h-full text-text-secondary text-sm`,children:[(0,y.jsx)(i,{className:`size-5 mr-2`}),` No database file selected.`]}):(0,y.jsx)(T,{projectName:n,dbPath:t,queryPanelOpen:o,onToggleQueryPanel:()=>s(e=>!e)})}function T({projectName:e,dbPath:t,connectionId:n,connectionName:r,initialTable:a,queryPanelOpen:o,onToggleQueryPanel:s,hideTableList:c}){let l=v(e,t,n),u=(0,_.useRef)(!1);return(0,_.useEffect)(()=>{a&&!u.current&&l.tables.length>0&&(u.current=!0,l.selectTable(a))},[a,l.tables]),l.error&&l.tables.length===0?(0,y.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-full gap-3 text-text-secondary`,children:[(0,y.jsx)(f,{className:`size-10 text-destructive`}),(0,y.jsx)(`p`,{className:`text-sm`,children:l.error})]}):l.loading&&l.tables.length===0?(0,y.jsxs)(`div`,{className:`flex items-center justify-center h-full gap-2 text-text-secondary`,children:[(0,y.jsx)(d,{className:`size-5 animate-spin`}),(0,y.jsx)(`span`,{className:`text-sm`,children:`Loading database...`})]}):(0,y.jsxs)(`div`,{className:`flex h-full w-full overflow-hidden`,children:[!c&&(0,y.jsx)(b,{tables:l.tables,selectedTable:l.selectedTable,onSelect:l.selectTable,onRefresh:l.refreshTables}),(0,y.jsxs)(`div`,{className:`flex-1 flex flex-col overflow-hidden ${c?``:`border-l border-border`}`,children:[(0,y.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-1.5 border-b border-border bg-background shrink-0`,children:[(0,y.jsx)(i,{className:`size-3.5 text-muted-foreground`}),(0,y.jsx)(`span`,{className:`text-xs text-muted-foreground truncate`,children:r??t}),(0,y.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:l.selectedTable&&`/ ${l.selectedTable}`}),(0,y.jsx)(`div`,{className:`ml-auto`,children:(0,y.jsx)(`button`,{type:`button`,onClick:s,className:`px-2 py-1 rounded text-xs transition-colors ${o?`bg-muted text-foreground`:`text-muted-foreground hover:text-foreground`}`,children:`SQL`})})]}),(0,y.jsx)(`div`,{className:`flex-1 overflow-hidden ${o?`max-h-[60%]`:``}`,children:(0,y.jsx)(x,{tableData:l.tableData,schema:l.schema,loading:l.loading,page:l.page,onPageChange:l.setPage,onCellUpdate:l.updateCell,onRowDelete:l.deleteRow})}),o&&(0,y.jsx)(`div`,{className:`border-t border-border h-[40%] shrink-0`,children:(0,y.jsx)(C,{onExecute:l.executeQuery,loading:l.queryLoading})})]})]})}export{w as SqliteViewer};
|
|
1
|
+
import{o as e}from"./chunk-CFjPhJqf.js";import{t}from"./react-nm2Ru1Pt.js";import{t as n}from"./jsx-runtime-BRW_vwa9.js";import{t as r}from"./chevron-right-DY_wImxB.js";import{t as i}from"./database-CgTomMxt.js";import{t as a}from"./refresh-cw-Clk8fdUD.js";import{t as o}from"./table-Bi27fEaN.js";import{t as s}from"./trash-2-CNuB-htI.js";import{i as c,t as l}from"./api-client-BvxmRZUi.js";import{$ as u,B as d,Q as f}from"./index-BcIyrJiY.js";import"./use-monaco-theme-CM4IMROI.js";import{t as p}from"./sql-query-editor-DaePHpQI.js";import{n as m,r as h,t as g}from"./lib-DSLzfeW0.js";var _=e(t(),1);function v(e,t,n){let[r,i]=(0,_.useState)([]),[a,o]=(0,_.useState)(null),[s,u]=(0,_.useState)(null),[d,f]=(0,_.useState)([]),[p,m]=(0,_.useState)(!1),[h,g]=(0,_.useState)(null),[v,y]=(0,_.useState)(1),[b,x]=(0,_.useState)(null),[S,C]=(0,_.useState)(null),[w,T]=(0,_.useState)(!1),E=n?`/api/db/connections/${n}`:null,D=E??`${c(e)}/sqlite`,O=E?``:`path=${encodeURIComponent(t)}`,k=(0,_.useCallback)(async()=>{m(!0),g(null);try{let e=E?`?cached=1`:O?`?${O}`:``,t=await l.get(`${D}/tables${e}`);i(t),!E&&t.length>0&&!a&&o(t[0].name)}catch(e){g(e.message)}finally{m(!1)}},[D,O,E]);(0,_.useEffect)(()=>{k()},[k]);let A=(0,_.useCallback)(async()=>{if(a){m(!0);try{let e=O?`${O}&`:``,[t,n]=await Promise.all([l.get(`${D}/data?${e}table=${encodeURIComponent(a)}&page=${v}&limit=100`),l.get(`${D}/schema?${e}table=${encodeURIComponent(a)}`)]);u(t),f(n)}catch(e){g(e.message)}finally{m(!1)}}},[D,O,a,v]);return(0,_.useEffect)(()=>{A()},[A]),{tables:r,selectedTable:a,selectTable:(0,_.useCallback)(e=>{o(e),y(1),x(null)},[]),tableData:s,schema:d,loading:p,error:h,page:v,setPage:y,queryResult:b,queryError:S,queryLoading:w,executeQuery:(0,_.useCallback)(async e=>{T(!0),C(null);try{let n=E?{sql:e}:{path:t,sql:e},r=await l.post(`${D}/query`,n);x(r),r.changeType===`modify`&&A()}catch(e){C(e.message)}finally{T(!1)}},[D,E,t,A]),updateCell:(0,_.useCallback)(async(e,n,r)=>{if(a)try{E?await l.put(`${D}/cell`,{table:a,pkColumn:`rowid`,pkValue:e,column:n,value:r}):await l.put(`${D}/cell`,{path:t,table:a,rowid:e,column:n,value:r}),A()}catch(e){g(e.message)}},[D,E,t,a,A]),deleteRow:(0,_.useCallback)(async e=>{if(a)try{E?await l.del(`${D}/row`,{table:a,pkColumn:`rowid`,pkValue:e}):await l.del(`${D}/row`,{path:t,table:a,rowid:e}),A(),k()}catch(e){g(e.message)}},[D,E,t,a,A,k]),refreshTables:k,refreshData:A}}var y=n();function b({tables:e,selectedTable:t,onSelect:n,onRefresh:r}){return(0,y.jsxs)(`div`,{className:`w-48 shrink-0 flex flex-col bg-background overflow-hidden`,children:[(0,y.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-2 border-b border-border`,children:[(0,y.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground uppercase tracking-wider`,children:`Tables`}),(0,y.jsx)(`button`,{type:`button`,onClick:r,className:`text-muted-foreground hover:text-foreground transition-colors`,title:`Refresh tables`,children:(0,y.jsx)(a,{className:`size-3`})})]}),(0,y.jsxs)(`div`,{className:`flex-1 overflow-y-auto`,children:[e.map(e=>(0,y.jsxs)(`button`,{type:`button`,onClick:()=>n(e.name),className:`w-full flex items-center gap-2 px-3 py-1.5 text-left text-xs transition-colors ${t===e.name?`bg-muted text-foreground`:`text-muted-foreground hover:bg-muted/50 hover:text-foreground`}`,children:[(0,y.jsx)(o,{className:`size-3 shrink-0`}),(0,y.jsx)(`span`,{className:`truncate flex-1`,children:e.name}),(0,y.jsx)(`span`,{className:`text-[10px] opacity-60`,children:e.rowCount})]},e.name)),e.length===0&&(0,y.jsx)(`p`,{className:`px-3 py-4 text-xs text-muted-foreground text-center`,children:`No tables found`})]})]})}function x({tableData:e,schema:t,loading:n,page:i,onPageChange:a,onCellUpdate:o,onRowDelete:s}){if(!e)return(0,y.jsx)(`div`,{className:`flex items-center justify-center h-full text-xs text-muted-foreground`,children:n?(0,y.jsx)(d,{className:`size-4 animate-spin`}):`Select a table`});let c=Math.ceil(e.total/e.limit)||1;return(0,y.jsxs)(`div`,{className:`flex flex-col h-full overflow-hidden`,children:[(0,y.jsx)(`div`,{className:`flex-1 overflow-auto`,children:(0,y.jsx)(S,{columns:e.columns,rows:e.rows,schema:t,onCellUpdate:o,onRowDelete:s})}),(0,y.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-1.5 border-t border-border bg-background shrink-0 text-xs text-muted-foreground`,children:[(0,y.jsxs)(`span`,{children:[e.total.toLocaleString(),` rows`]}),(0,y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,y.jsx)(`button`,{type:`button`,disabled:i<=1,onClick:()=>a(i-1),className:`p-0.5 rounded hover:bg-muted disabled:opacity-30`,children:(0,y.jsx)(u,{className:`size-3.5`})}),(0,y.jsxs)(`span`,{children:[i,` / `,c]}),(0,y.jsx)(`button`,{type:`button`,disabled:i>=c,onClick:()=>a(i+1),className:`p-0.5 rounded hover:bg-muted disabled:opacity-30`,children:(0,y.jsx)(r,{className:`size-3.5`})})]})]})]})}function S({columns:e,rows:t,schema:n,onCellUpdate:r,onRowDelete:i}){let[a,o]=(0,_.useState)(null),[c,l]=(0,_.useState)(``),[u,d]=(0,_.useState)(null),f=(0,_.useMemo)(()=>new Set(n.filter(e=>e.pk).map(e=>e.name)),[n]),p=(0,_.useCallback)((e,t,n)=>{t!==`rowid`&&(o({rowIdx:e,col:t}),l(n==null?``:String(n)))},[]),v=(0,_.useCallback)(()=>{if(!a)return;let e=t[a.rowIdx];if(!e)return;let n=e.rowid,i=e[a.col];String(i??``)!==c&&r(n,a.col,c===``?null:c),o(null)},[a,c,t,r]),b=(0,_.useCallback)(()=>o(null),[]),x=(0,_.useCallback)(e=>{let n=t[e];!n||!i||(i(n.rowid),d(null))},[t,i]),S=m({data:t,columns:(0,_.useMemo)(()=>{let t=e.map(e=>({id:e,accessorFn:t=>t[e],header:()=>(0,y.jsx)(`span`,{className:`${f.has(e)?`font-bold`:``} ${e===`rowid`?`text-muted-foreground/50`:``}`,children:e}),cell:({row:t,getValue:n})=>{let r=t.index,i=a?.rowIdx===r&&a?.col===e,o=n();return i?(0,y.jsx)(`input`,{autoFocus:!0,className:`w-full bg-transparent border border-primary/50 rounded px-1 py-0 text-xs outline-none`,value:c,onChange:e=>l(e.target.value),onBlur:v,onKeyDown:e=>{e.key===`Enter`&&v(),e.key===`Escape`&&b()}}):(0,y.jsx)(`span`,{className:`cursor-pointer truncate block ${o==null?`text-muted-foreground/40 italic`:``} ${e===`rowid`?`text-muted-foreground/50`:``}`,onDoubleClick:()=>p(r,e,o),title:o==null?`NULL`:String(o),children:o==null?`NULL`:String(o)})}}));return i&&t.push({id:`_actions`,header:()=>null,cell:({row:e})=>{let t=e.index;return u===t?(0,y.jsxs)(`span`,{className:`flex items-center gap-1 whitespace-nowrap`,children:[(0,y.jsx)(`button`,{type:`button`,onClick:()=>x(t),className:`text-destructive text-[10px] font-medium hover:underline`,children:`Confirm`}),(0,y.jsx)(`button`,{type:`button`,onClick:()=>d(null),className:`text-muted-foreground text-[10px] hover:underline`,children:`Cancel`})]}):(0,y.jsx)(`button`,{type:`button`,onClick:()=>d(t),className:`p-0.5 rounded opacity-0 group-hover:opacity-100 hover:bg-destructive/10 hover:text-destructive transition-opacity`,title:`Delete row`,children:(0,y.jsx)(s,{className:`size-3`})})},size:60}),t},[e,f,a,c,v,b,p,i,u,x]),getCoreRowModel:h()});return(0,y.jsxs)(`table`,{className:`w-full text-xs border-collapse`,children:[(0,y.jsx)(`thead`,{className:`sticky top-0 z-10 bg-muted`,children:S.getHeaderGroups().map(e=>(0,y.jsx)(`tr`,{children:e.headers.map(e=>(0,y.jsx)(`th`,{className:`px-2 py-1.5 text-left font-medium text-muted-foreground border-b border-border whitespace-nowrap`,children:g(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),(0,y.jsxs)(`tbody`,{children:[S.getRowModel().rows.map(e=>(0,y.jsx)(`tr`,{className:`group hover:bg-muted/30 border-b border-border/50`,children:e.getVisibleCells().map(e=>(0,y.jsx)(`td`,{className:`px-2 py-1 max-w-[300px]`,children:g(e.column.columnDef.cell,e.getContext())},e.id))},e.id)),t.length===0&&(0,y.jsx)(`tr`,{children:(0,y.jsx)(`td`,{colSpan:e.length,className:`px-2 py-8 text-center text-muted-foreground`,children:`No data`})})]})]})}function C({onExecute:e,loading:t}){return(0,y.jsx)(p,{onExecute:e,loading:t})}function w({metadata:e}){let t=e?.filePath,n=e?.projectName,r=e?.connectionId,a=e?.tableName,[o,s]=(0,_.useState)(!1);return r?(0,y.jsx)(T,{projectName:``,dbPath:``,connectionId:r,connectionName:e?.connectionName,initialTable:a,queryPanelOpen:o,onToggleQueryPanel:()=>s(e=>!e),hideTableList:!0}):!t||!n?(0,y.jsxs)(`div`,{className:`flex items-center justify-center h-full text-text-secondary text-sm`,children:[(0,y.jsx)(i,{className:`size-5 mr-2`}),` No database file selected.`]}):(0,y.jsx)(T,{projectName:n,dbPath:t,queryPanelOpen:o,onToggleQueryPanel:()=>s(e=>!e)})}function T({projectName:e,dbPath:t,connectionId:n,connectionName:r,initialTable:a,queryPanelOpen:o,onToggleQueryPanel:s,hideTableList:c}){let l=v(e,t,n),u=(0,_.useRef)(!1);return(0,_.useEffect)(()=>{a&&!u.current&&l.tables.length>0&&(u.current=!0,l.selectTable(a))},[a,l.tables]),l.error&&l.tables.length===0?(0,y.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-full gap-3 text-text-secondary`,children:[(0,y.jsx)(f,{className:`size-10 text-destructive`}),(0,y.jsx)(`p`,{className:`text-sm`,children:l.error})]}):l.loading&&l.tables.length===0?(0,y.jsxs)(`div`,{className:`flex items-center justify-center h-full gap-2 text-text-secondary`,children:[(0,y.jsx)(d,{className:`size-5 animate-spin`}),(0,y.jsx)(`span`,{className:`text-sm`,children:`Loading database...`})]}):(0,y.jsxs)(`div`,{className:`flex h-full w-full overflow-hidden`,children:[!c&&(0,y.jsx)(b,{tables:l.tables,selectedTable:l.selectedTable,onSelect:l.selectTable,onRefresh:l.refreshTables}),(0,y.jsxs)(`div`,{className:`flex-1 flex flex-col overflow-hidden ${c?``:`border-l border-border`}`,children:[(0,y.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-1.5 border-b border-border bg-background shrink-0`,children:[(0,y.jsx)(i,{className:`size-3.5 text-muted-foreground`}),(0,y.jsx)(`span`,{className:`text-xs text-muted-foreground truncate`,children:r??t}),(0,y.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:l.selectedTable&&`/ ${l.selectedTable}`}),(0,y.jsx)(`div`,{className:`ml-auto`,children:(0,y.jsx)(`button`,{type:`button`,onClick:s,className:`px-2 py-1 rounded text-xs transition-colors ${o?`bg-muted text-foreground`:`text-muted-foreground hover:text-foreground`}`,children:`SQL`})})]}),(0,y.jsx)(`div`,{className:`flex-1 overflow-hidden ${o?`max-h-[60%]`:``}`,children:(0,y.jsx)(x,{tableData:l.tableData,schema:l.schema,loading:l.loading,page:l.page,onPageChange:l.setPage,onCellUpdate:l.updateCell,onRowDelete:l.deleteRow})}),o&&(0,y.jsx)(`div`,{className:`border-t border-border h-[40%] shrink-0`,children:(0,y.jsx)(C,{onExecute:l.executeQuery,loading:l.queryLoading})})]})]})}export{w as SqliteViewer};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CFjPhJqf.js";import{t}from"./react-nm2Ru1Pt.js";import{t as n}from"./jsx-runtime-BRW_vwa9.js";import{n as r}from"./utils-DX8jb5qv.js";import{X as i,Y as a,k as o}from"./index-
|
|
1
|
+
import{o as e}from"./chunk-CFjPhJqf.js";import{t}from"./react-nm2Ru1Pt.js";import{t as n}from"./jsx-runtime-BRW_vwa9.js";import{n as r}from"./utils-DX8jb5qv.js";import{X as i,Y as a,k as o}from"./index-BcIyrJiY.js";var s=e(t(),1),c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,u=(e,t)=>{for(var n in t)c(e,n,{get:t[n],enumerable:!0})},d=(e,t,n,r)=>{for(var i=r>1?void 0:r?l(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&c(t,n,i),i},f=(e,t)=>(n,r)=>t(n,r,e),p=`Terminal input`,m={get:()=>p,set:e=>p=e},h=`Too much output to announce, navigate to rows manually to read`,g={get:()=>h,set:e=>h=e};function _(e){return e.replace(/\r?\n/g,`\r`)}function v(e,t){return t?`\x1B[200~`+e+`\x1B[201~`:e}function ee(e,t){e.clipboardData&&e.clipboardData.setData(`text/plain`,t.selectionText),e.preventDefault()}function te(e,t,n,r){e.stopPropagation(),e.clipboardData&&ne(e.clipboardData.getData(`text/plain`),t,n,r)}function ne(e,t,n,r){e=_(e),e=v(e,n.decPrivateModes.bracketedPasteMode&&r.rawOptions.ignoreBracketedPasteMode!==!0),n.triggerDataEvent(e,!0),t.value=``}function re(e,t,n){let r=n.getBoundingClientRect(),i=e.clientX-r.left-10,a=e.clientY-r.top-10;t.style.width=`20px`,t.style.height=`20px`,t.style.left=`${i}px`,t.style.top=`${a}px`,t.style.zIndex=`1000`,t.focus()}function ie(e,t,n,r,i){re(e,t,n),i&&r.rightClickSelect(e),t.value=r.selectionText,t.select()}function y(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function ae(e,t=0,n=e.length){let r=``;for(let i=t;i<n;++i){let t=e[i];t>65535?(t-=65536,r+=String.fromCharCode((t>>10)+55296)+String.fromCharCode(t%1024+56320)):r+=String.fromCharCode(t)}return r}var oe=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i=0;if(this._interim){let n=e.charCodeAt(i++);56320<=n&&n<=57343?t[r++]=(this._interim-55296)*1024+n-56320+65536:(t[r++]=this._interim,t[r++]=n),this._interim=0}for(let a=i;a<n;++a){let i=e.charCodeAt(a);if(55296<=i&&i<=56319){if(++a>=n)return this._interim=i,r;let o=e.charCodeAt(a);56320<=o&&o<=57343?t[r++]=(i-55296)*1024+o-56320+65536:(t[r++]=i,t[r++]=o);continue}i!==65279&&(t[r++]=i)}return r}},b=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let n=e.length;if(!n)return 0;let r=0,i,a,o,s,c=0,l=0;if(this.interim[0]){let i=!1,a=this.interim[0];a&=(a&224)==192?31:(a&240)==224?15:7;let o=0,s;for(;(s=this.interim[++o]&63)&&o<4;)a<<=6,a|=s;let c=(this.interim[0]&224)==192?2:(this.interim[0]&240)==224?3:4,u=c-o;for(;l<u;){if(l>=n)return 0;if(s=e[l++],(s&192)!=128){l--,i=!0;break}else this.interim[o++]=s,a<<=6,a|=s&63}i||(c===2?a<128?l--:t[r++]=a:c===3?a<2048||a>=55296&&a<=57343||a===65279||(t[r++]=a):a<65536||a>1114111||(t[r++]=a)),this.interim.fill(0)}let u=n-4,d=l;for(;d<n;){for(;d<u&&!((i=e[d])&128)&&!((a=e[d+1])&128)&&!((o=e[d+2])&128)&&!((s=e[d+3])&128);)t[r++]=i,t[r++]=a,t[r++]=o,t[r++]=s,d+=4;if(i=e[d++],i<128)t[r++]=i;else if((i&224)==192){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(c=(i&31)<<6|a&63,c<128){d--;continue}t[r++]=c}else if((i&240)==224){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(c=(i&15)<<12|(a&63)<<6|o&63,c<2048||c>=55296&&c<=57343||c===65279)continue;t[r++]=c}else if((i&248)==240){if(d>=n)return this.interim[0]=i,r;if(a=e[d++],(a&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,r;if(o=e[d++],(o&192)!=128){d--;continue}if(d>=n)return this.interim[0]=i,this.interim[1]=a,this.interim[2]=o,r;if(s=e[d++],(s&192)!=128){d--;continue}if(c=(i&7)<<18|(a&63)<<12|(o&63)<<6|s&63,c<65536||c>1114111)continue;t[r++]=c}}return r}},se=``,ce=` `,le=class e{constructor(){this.fg=0,this.bg=0,this.extended=new x}static toColorRGB(e){return[e>>>16&255,e>>>8&255,e&255]}static fromColorRGB(e){return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255}clone(){let t=new e;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)==50331648}isBgRGB(){return(this.bg&50331648)==50331648}isFgPalette(){return(this.fg&50331648)==16777216||(this.fg&50331648)==33554432}isBgPalette(){return(this.bg&50331648)==16777216||(this.bg&50331648)==33554432}isFgDefault(){return(this.fg&50331648)==0}isBgDefault(){return(this.bg&50331648)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==16777216||(this.extended.underlineColor&50331648)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)==0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},x=class e{constructor(e=0,t=0){this._ext=0,this._urlId=0,this._ext=e,this._urlId=t}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(e){this._ext=e}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(e){this._ext&=-469762049,this._ext|=e<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(e){this._ext&=-67108864,this._ext|=e&67108863}get urlId(){return this._urlId}set urlId(e){this._urlId=e}get underlineVariantOffset(){let e=(this._ext&3758096384)>>29;return e<0?e^4294967288:e}set underlineVariantOffset(e){this._ext&=536870911,this._ext|=e<<29&3758096384}clone(){return new e(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},S=class e extends le{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new x,this.combinedData=``}static fromCharData(t){let n=new e;return n.setFromCharData(t),n}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?y(this.content&2097151):``}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(e){this.fg=e[0],this.bg=0;let t=!1;if(e[1].length>2)t=!0;else if(e[1].length===2){let n=e[1].charCodeAt(0);if(55296<=n&&n<=56319){let r=e[1].charCodeAt(1);56320<=r&&r<=57343?this.content=(n-55296)*1024+r-56320+65536|e[2]<<22:t=!0}else t=!0}else this.content=e[1].charCodeAt(0)|e[2]<<22;t&&(this.combinedData=e[1],this.content=2097152|e[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},ue=`di$target`,de=`di$dependencies`,C=new Map;function fe(e){return e[de]||[]}function w(e){if(C.has(e))return C.get(e);let t=function(e,n,r){if(arguments.length!==3)throw Error(`@IServiceName-decorator can only be used to decorate a parameter`);pe(t,e,r)};return t._id=e,C.set(e,t),t}function pe(e,t,n){t[ue]===t?t[de].push({id:e,index:n}):(t[de]=[{id:e,index:n}],t[ue]=t)}var T=w(`BufferService`),me=w(`CoreMouseService`),E=w(`CoreService`),he=w(`CharsetService`),ge=w(`InstantiationService`),_e=w(`LogService`),D=w(`OptionsService`),ve=w(`OscLinkService`),ye=w(`UnicodeService`),be=w(`DecorationService`),xe=class{constructor(e,t,n){this._bufferService=e,this._optionsService=t,this._oscLinkService=n}provideLinks(e,t){let n=this._bufferService.buffer.lines.get(e-1);if(!n){t(void 0);return}let r=[],i=this._optionsService.rawOptions.linkHandler,a=new S,o=n.getTrimmedLength(),s=-1,c=-1,l=!1;for(let t=0;t<o;t++)if(!(c===-1&&!n.hasContent(t))){if(n.loadCell(t,a),a.hasExtendedAttrs()&&a.extended.urlId)if(c===-1){c=t,s=a.extended.urlId;continue}else l=a.extended.urlId!==s;else c!==-1&&(l=!0);if(l||c!==-1&&t===o-1){let n=this._oscLinkService.getLinkData(s)?.uri;if(n){let a={start:{x:c+1,y:e},end:{x:t+(!l&&t===o-1?1:0),y:e}},s=!1;if(!i?.allowNonHttpProtocols)try{let e=new URL(n);[`http:`,`https:`].includes(e.protocol)||(s=!0)}catch{s=!0}s||r.push({text:n,range:a,activate:(e,t)=>i?i.activate(e,t,a):Se(e,t),hover:(e,t)=>i?.hover?.(e,t,a),leave:(e,t)=>i?.leave?.(e,t,a)})}l=!1,a.hasExtendedAttrs()&&a.extended.urlId?(c=t,s=a.extended.urlId):(c=-1,s=-1)}}t(r)}};xe=d([f(0,T),f(1,D),f(2,ve)],xe);function Se(e,t){if(confirm(`Do you want to navigate to ${t}?
|
|
2
2
|
|
|
3
3
|
WARNING: This link could potentially be dangerous`)){let e=window.open();if(e){try{e.opener=null}catch{}e.location.href=t}else console.warn(`Opening link blocked as opener could not be cleared`)}}var Ce=w(`CharSizeService`),we=w(`CoreBrowserService`),Te=w(`MouseService`),Ee=w(`RenderService`),De=w(`SelectionService`),Oe=w(`CharacterJoinerService`),ke=w(`ThemeService`),Ae=w(`LinkProviderService`),je=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?Le.isErrorNoTelemetry(e)?new Le(e.message+`
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CFjPhJqf.js";import{t}from"./react-nm2Ru1Pt.js";import{k as n}from"./index-
|
|
1
|
+
import{o as e}from"./chunk-CFjPhJqf.js";import{t}from"./react-nm2Ru1Pt.js";import{k as n}from"./index-BcIyrJiY.js";function r(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function i(e){if(Array.isArray(e))return e}function a(e,t,n){return(t=m(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function s(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?c(Object(n),!0).forEach(function(t){a(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(e,t){if(e==null)return{};var n,r,i=d(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function d(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function f(e,t){return i(e)||o(e,t)||h(e,t)||s()}function p(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function m(e){var t=p(e,`string`);return typeof t==`symbol`?t:t+``}function h(e,t){if(e){if(typeof e==`string`)return r(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?_(Object(n),!0).forEach(function(t){g(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function y(){var e=[...arguments];return function(t){return e.reduceRight(function(e,t){return t(e)},t)}}function b(e){return function t(){var n=this,r=[...arguments];return r.length>=e.length?e.apply(this,r):function(){var e=[...arguments];return t.apply(n,[].concat(r,e))}}}function x(e){return{}.toString.call(e).includes(`Object`)}function S(e){return!Object.keys(e).length}function C(e){return typeof e==`function`}function w(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function T(e,t){return x(t)||A(`changeType`),Object.keys(t).some(function(t){return!w(e,t)})&&A(`changeField`),t}function E(e){C(e)||A(`selectorType`)}function D(e){C(e)||x(e)||A(`handlerType`),x(e)&&Object.values(e).some(function(e){return!C(e)})&&A(`handlersType`)}function O(e){e||A(`initialIsRequired`),x(e)||A(`initialType`),S(e)&&A(`initialContent`)}function k(e,t){throw Error(e[t]||e.default)}var A=b(k)({initialIsRequired:`initial state is required`,initialType:`initial state should be an object`,initialContent:`initial state shouldn't be an empty object`,handlerType:`handler should be an object or a function`,handlersType:`all handlers should be a functions`,selectorType:`selector should be a function`,changeType:`provided value of changes should be an object`,changeField:`it seams you want to change a field in the state which is not specified in the "initial" state`,default:"an unknown error accured in `state-local` package"}),j={changes:T,selector:E,handler:D,initial:O};function ee(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};j.initial(e),j.handler(t);var n={current:e},r=b(P)(n,t),i=b(N)(n),a=b(j.changes)(e),o=b(M)(n);function s(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(e){return e};return j.selector(e),e(n.current)}function c(e){y(r,i,a,o)(e)}return[s,c]}function M(e,t){return C(t)?t(e.current):t}function N(e,t){return e.current=v(v({},e.current),t),t}function P(e,t,n){return C(t)?t(e.current):Object.keys(n).forEach(function(n){return t[n]?.call(t,e.current[n])}),n}var F={create:ee},te={paths:{vs:`https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs`}};function ne(e){return function t(){var n=this,r=[...arguments];return r.length>=e.length?e.apply(this,r):function(){var e=[...arguments];return t.apply(n,[].concat(r,e))}}}function re(e){return{}.toString.call(e).includes(`Object`)}function ie(e){return e||L(`configIsRequired`),re(e)||L(`configType`),e.urls?(ae(),{paths:{vs:e.urls.monacoBase}}):e}function ae(){console.warn(I.deprecation)}function oe(e,t){throw Error(e[t]||e.default)}var I={configIsRequired:`the configuration object is required`,configType:`the configuration object should be an object`,default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
|
|
3
3
|
You are using deprecated way of configuration.
|
|
4
4
|
|
package/dist/web/index.html
CHANGED
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
40
40
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
41
41
|
<link href="https://fonts.googleapis.com/css2?family=Geist+Mono:wght@400;500;600;700&family=Geist:wght@400;500;600;700&display=swap" rel="stylesheet" />
|
|
42
|
-
<script type="module" crossorigin src="/assets/index-
|
|
42
|
+
<script type="module" crossorigin src="/assets/index-BcIyrJiY.js"></script>
|
|
43
43
|
<link rel="modulepreload" crossorigin href="/assets/chunk-CFjPhJqf.js">
|
|
44
44
|
<link rel="modulepreload" crossorigin href="/assets/preload-helper-mr3rCizq.js">
|
|
45
45
|
<link rel="modulepreload" crossorigin href="/assets/utils-DX8jb5qv.js">
|