@lemoncat7/dsh-ssh 1.9.0 → 1.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/docs/releases/1.9.1.md +11 -0
- package/lib/api.js +13 -12
- package/lib/api.js.map +1 -1
- package/lib/client.js +22 -22
- package/lib/client.js.map +3 -3
- package/lib/connector.d.ts +9 -1
- package/lib/connector.d.ts.map +1 -1
- package/lib/connector.js +9 -4
- package/lib/connector.js.map +1 -1
- package/lib/locales/messages.d.ts +28 -0
- package/lib/locales/messages.d.ts.map +1 -1
- package/lib/locales/messages.js +7 -0
- package/lib/locales/messages.js.map +1 -1
- package/lib/profile-editor.d.ts.map +1 -1
- package/lib/profile-editor.js +9 -3
- package/lib/profile-editor.js.map +1 -1
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -8,7 +8,7 @@ WARNING: This link could potentially be dangerous`)){let m=window.open();if(m){t
|
|
|
8
8
|
`:`
|
|
9
9
|
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(k){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),m.isLinux&&k&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(k){let S=this._getMouseBufferCoords(k),C=this._model.finalSelectionStart,T=this._model.finalSelectionEnd;return!!(C&&T&&S)&&this._areCoordsInSelection(S,C,T)}isCellInSelection(k,S){let C=this._model.finalSelectionStart,T=this._model.finalSelectionEnd;return!(!C||!T)&&this._areCoordsInSelection([k,S],C,T)}_areCoordsInSelection(k,S,C){return k[1]>S[1]&&k[1]<C[1]||S[1]===C[1]&&k[1]===S[1]&&k[0]>=S[0]&&k[0]<C[0]||S[1]<C[1]&&k[1]===C[1]&&k[0]<C[0]||S[1]<C[1]&&k[1]===S[1]&&k[0]>=S[0]}_selectWordAtCursor(k,S){let C=this._linkifier.currentLink?.link?.range;if(C)return this._model.selectionStart=[C.start.x-1,C.start.y-1],this._model.selectionStartLength=(0,g.getRangeLength)(C,this._bufferService.cols),this._model.selectionEnd=void 0,!0;let T=this._getMouseBufferCoords(k);return!!T&&(this._selectWordAt(T,S),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(k,S){this._model.clearSelection(),k=Math.max(k,0),S=Math.min(S,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,k],this._model.selectionEnd=[this._bufferService.cols,S],this.refresh(),this._onSelectionChange.fire()}_handleTrim(k){this._model.handleTrim(k)&&this.refresh()}_getMouseBufferCoords(k){let S=this._mouseService.getCoords(k,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(S)return S[0]--,S[1]--,S[1]+=this._bufferService.buffer.ydisp,S}_getMouseEventScrollAmount(k){let S=(0,c.getCoordsRelativeToElement)(this._coreBrowserService.window,k,this._screenElement)[1],C=this._renderService.dimensions.css.canvas.height;return S>=0&&S<=C?0:(S>C&&(S-=C),S=Math.min(Math.max(S,-50),50),S/=50,S/Math.abs(S)+Math.round(14*S))}shouldForceSelection(k){return m.isMac?k.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:k.shiftKey}handleMouseDown(k){if(this._mouseDownTimeStamp=k.timeStamp,(k.button!==2||!this.hasSelection)&&k.button===0){if(!this._enabled){if(!this.shouldForceSelection(k))return;k.stopPropagation()}k.preventDefault(),this._dragScrollAmount=0,this._enabled&&k.shiftKey?this._handleIncrementalClick(k):k.detail===1?this._handleSingleClick(k):k.detail===2?this._handleDoubleClick(k):k.detail===3&&this._handleTripleClick(k),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(k){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(k))}_handleSingleClick(k){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(k)?3:0,this._model.selectionStart=this._getMouseBufferCoords(k),!this._model.selectionStart)return;this._model.selectionEnd=void 0;let S=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);S&&S.length!==this._model.selectionStart[0]&&S.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(k){this._selectWordAtCursor(k,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(k){let S=this._getMouseBufferCoords(k);S&&(this._activeSelectionMode=2,this._selectLineAt(S[1]))}shouldColumnSelect(k){return k.altKey&&!(m.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(k){if(k.stopImmediatePropagation(),!this._model.selectionStart)return;let S=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(k),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(k),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));let C=this._bufferService.buffer;if(this._model.selectionEnd[1]<C.lines.length){let T=C.lines.get(this._model.selectionEnd[1]);T&&T.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}S&&S[0]===this._model.selectionEnd[0]&&S[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});let k=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(k.ydisp+this._bufferService.rows,k.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=k.ydisp),this.refresh()}}_handleMouseUp(k){let S=k.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&S<500&&k.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){let C=this._mouseService.getCoords(k,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(C&&C[0]!==void 0&&C[1]!==void 0){let T=(0,h.moveToCellSequence)(C[0]-1,C[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(T,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){let k=this._model.finalSelectionStart,S=this._model.finalSelectionEnd,C=!(!k||!S||k[0]===S[0]&&k[1]===S[1]);C?k&&S&&(this._oldSelectionStart&&this._oldSelectionEnd&&k[0]===this._oldSelectionStart[0]&&k[1]===this._oldSelectionStart[1]&&S[0]===this._oldSelectionEnd[0]&&S[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(k,S,C)):this._oldHasSelection&&this._fireOnSelectionChange(k,S,C)}_fireOnSelectionChange(k,S,C){this._oldSelectionStart=k,this._oldSelectionEnd=S,this._oldHasSelection=C,this._onSelectionChange.fire()}_handleBufferActivate(k){this.clearSelection(),this._trimListener.dispose(),this._trimListener=k.activeBuffer.lines.onTrim((S=>this._handleTrim(S)))}_convertViewportColToCharacterIndex(k,S){let C=S;for(let T=0;S>=T;T++){let E=k.loadCell(T,this._workCell).getChars().length;this._workCell.getWidth()===0?C--:E>1&&S!==T&&(C+=E-1)}return C}setSelection(k,S,C){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[k,S],this._model.selectionStartLength=C,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(k){this._isClickInSelection(k)||(this._selectWordAtCursor(k,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(k,S,C=!0,T=!0){if(k[0]>=this._bufferService.cols)return;let E=this._bufferService.buffer,M=E.lines.get(k[1]);if(!M)return;let z=E.translateBufferLineToString(k[1],!1),N=this._convertViewportColToCharacterIndex(M,k[0]),$=N,F=k[0]-N,j=0,P=0,I=0,R=0;if(z.charAt(N)===" "){for(;N>0&&z.charAt(N-1)===" ";)N--;for(;$<z.length&&z.charAt($+1)===" ";)$++}else{let q=k[0],O=k[0];M.getWidth(q)===0&&(j++,q--),M.getWidth(O)===2&&(P++,O++);let Z=M.getString(O).length;for(Z>1&&(R+=Z-1,$+=Z-1);q>0&&N>0&&!this._isCharWordSeparator(M.loadCell(q-1,this._workCell));){M.loadCell(q-1,this._workCell);let H=this._workCell.getChars().length;this._workCell.getWidth()===0?(j++,q--):H>1&&(I+=H-1,N-=H-1),N--,q--}for(;O<M.length&&$+1<z.length&&!this._isCharWordSeparator(M.loadCell(O+1,this._workCell));){M.loadCell(O+1,this._workCell);let H=this._workCell.getChars().length;this._workCell.getWidth()===2?(P++,O++):H>1&&(R+=H-1,$+=H-1),$++,O++}}$++;let A=N+F-j+I,V=Math.min(this._bufferService.cols,$-N+j+P-I-R);if(S||z.slice(N,$).trim()!==""){if(C&&A===0&&M.getCodePoint(0)!==32){let q=E.lines.get(k[1]-1);if(q&&M.isWrapped&&q.getCodePoint(this._bufferService.cols-1)!==32){let O=this._getWordAt([this._bufferService.cols-1,k[1]-1],!1,!0,!1);if(O){let Z=this._bufferService.cols-O.start;A-=Z,V+=Z}}}if(T&&A+V===this._bufferService.cols&&M.getCodePoint(this._bufferService.cols-1)!==32){let q=E.lines.get(k[1]+1);if(q?.isWrapped&&q.getCodePoint(0)!==32){let O=this._getWordAt([0,k[1]+1],!1,!1,!0);O&&(V+=O.length)}}return{start:A,length:V}}}_selectWordAt(k,S){let C=this._getWordAt(k,S);if(C){for(;C.start<0;)C.start+=this._bufferService.cols,k[1]--;this._model.selectionStart=[C.start,k[1]],this._model.selectionStartLength=C.length}}_selectToWordAt(k){let S=this._getWordAt(k,!0);if(S){let C=k[1];for(;S.start<0;)S.start+=this._bufferService.cols,C--;if(!this._model.areSelectionValuesReversed())for(;S.start+S.length>this._bufferService.cols;)S.length-=this._bufferService.cols,C++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?S.start:S.start+S.length,C]}}_isCharWordSeparator(k){return k.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(k.getChars())>=0}_selectLineAt(k){let S=this._bufferService.buffer.getWrappedRangeForLine(k),C={start:{x:0,y:S.first},end:{x:this._bufferService.cols-1,y:S.last}};this._model.selectionStart=[0,S.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,g.getRangeLength)(C,this._bufferService.cols)}};i.SelectionService=_=a([l(3,v.IBufferService),l(4,v.ICoreService),l(5,u.IMouseService),l(6,v.IOptionsService),l(7,u.IRenderService),l(8,u.ICoreBrowserService)],_)},4725:(s,i,o)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ILinkProviderService=i.IThemeService=i.ICharacterJoinerService=i.ISelectionService=i.IRenderService=i.IMouseService=i.ICoreBrowserService=i.ICharSizeService=void 0;let a=o(8343);i.ICharSizeService=(0,a.createDecorator)("CharSizeService"),i.ICoreBrowserService=(0,a.createDecorator)("CoreBrowserService"),i.IMouseService=(0,a.createDecorator)("MouseService"),i.IRenderService=(0,a.createDecorator)("RenderService"),i.ISelectionService=(0,a.createDecorator)("SelectionService"),i.ICharacterJoinerService=(0,a.createDecorator)("CharacterJoinerService"),i.IThemeService=(0,a.createDecorator)("ThemeService"),i.ILinkProviderService=(0,a.createDecorator)("LinkProviderService")},6731:function(s,i,o){var a=this&&this.__decorate||function(_,k,S,C){var T,E=arguments.length,M=E<3?k:C===null?C=Object.getOwnPropertyDescriptor(k,S):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(_,k,S,C);else for(var z=_.length-1;z>=0;z--)(T=_[z])&&(M=(E<3?T(M):E>3?T(k,S,M):T(k,S))||M);return E>3&&M&&Object.defineProperty(k,S,M),M},l=this&&this.__param||function(_,k){return function(S,C){k(S,C,_)}};Object.defineProperty(i,"__esModule",{value:!0}),i.ThemeService=i.DEFAULT_ANSI_COLORS=void 0;let c=o(7239),h=o(8055),d=o(8460),u=o(844),f=o(2585),p=h.css.toColor("#ffffff"),m=h.css.toColor("#000000"),g=h.css.toColor("#ffffff"),b=h.css.toColor("#000000"),v={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};i.DEFAULT_ANSI_COLORS=Object.freeze((()=>{let _=[h.css.toColor("#2e3436"),h.css.toColor("#cc0000"),h.css.toColor("#4e9a06"),h.css.toColor("#c4a000"),h.css.toColor("#3465a4"),h.css.toColor("#75507b"),h.css.toColor("#06989a"),h.css.toColor("#d3d7cf"),h.css.toColor("#555753"),h.css.toColor("#ef2929"),h.css.toColor("#8ae234"),h.css.toColor("#fce94f"),h.css.toColor("#729fcf"),h.css.toColor("#ad7fa8"),h.css.toColor("#34e2e2"),h.css.toColor("#eeeeec")],k=[0,95,135,175,215,255];for(let S=0;S<216;S++){let C=k[S/36%6|0],T=k[S/6%6|0],E=k[S%6];_.push({css:h.channels.toCss(C,T,E),rgba:h.channels.toRgba(C,T,E)})}for(let S=0;S<24;S++){let C=8+10*S;_.push({css:h.channels.toCss(C,C,C),rgba:h.channels.toRgba(C,C,C)})}return _})());let w=i.ThemeService=class extends u.Disposable{get colors(){return this._colors}constructor(_){super(),this._optionsService=_,this._contrastCache=new c.ColorContrastCache,this._halfContrastCache=new c.ColorContrastCache,this._onChangeColors=this.register(new d.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:p,background:m,cursor:g,cursorAccent:b,selectionForeground:void 0,selectionBackgroundTransparent:v,selectionBackgroundOpaque:h.color.blend(m,v),selectionInactiveBackgroundTransparent:v,selectionInactiveBackgroundOpaque:h.color.blend(m,v),ansi:i.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(_={}){let k=this._colors;if(k.foreground=x(_.foreground,p),k.background=x(_.background,m),k.cursor=x(_.cursor,g),k.cursorAccent=x(_.cursorAccent,b),k.selectionBackgroundTransparent=x(_.selectionBackground,v),k.selectionBackgroundOpaque=h.color.blend(k.background,k.selectionBackgroundTransparent),k.selectionInactiveBackgroundTransparent=x(_.selectionInactiveBackground,k.selectionBackgroundTransparent),k.selectionInactiveBackgroundOpaque=h.color.blend(k.background,k.selectionInactiveBackgroundTransparent),k.selectionForeground=_.selectionForeground?x(_.selectionForeground,h.NULL_COLOR):void 0,k.selectionForeground===h.NULL_COLOR&&(k.selectionForeground=void 0),h.color.isOpaque(k.selectionBackgroundTransparent)&&(k.selectionBackgroundTransparent=h.color.opacity(k.selectionBackgroundTransparent,.3)),h.color.isOpaque(k.selectionInactiveBackgroundTransparent)&&(k.selectionInactiveBackgroundTransparent=h.color.opacity(k.selectionInactiveBackgroundTransparent,.3)),k.ansi=i.DEFAULT_ANSI_COLORS.slice(),k.ansi[0]=x(_.black,i.DEFAULT_ANSI_COLORS[0]),k.ansi[1]=x(_.red,i.DEFAULT_ANSI_COLORS[1]),k.ansi[2]=x(_.green,i.DEFAULT_ANSI_COLORS[2]),k.ansi[3]=x(_.yellow,i.DEFAULT_ANSI_COLORS[3]),k.ansi[4]=x(_.blue,i.DEFAULT_ANSI_COLORS[4]),k.ansi[5]=x(_.magenta,i.DEFAULT_ANSI_COLORS[5]),k.ansi[6]=x(_.cyan,i.DEFAULT_ANSI_COLORS[6]),k.ansi[7]=x(_.white,i.DEFAULT_ANSI_COLORS[7]),k.ansi[8]=x(_.brightBlack,i.DEFAULT_ANSI_COLORS[8]),k.ansi[9]=x(_.brightRed,i.DEFAULT_ANSI_COLORS[9]),k.ansi[10]=x(_.brightGreen,i.DEFAULT_ANSI_COLORS[10]),k.ansi[11]=x(_.brightYellow,i.DEFAULT_ANSI_COLORS[11]),k.ansi[12]=x(_.brightBlue,i.DEFAULT_ANSI_COLORS[12]),k.ansi[13]=x(_.brightMagenta,i.DEFAULT_ANSI_COLORS[13]),k.ansi[14]=x(_.brightCyan,i.DEFAULT_ANSI_COLORS[14]),k.ansi[15]=x(_.brightWhite,i.DEFAULT_ANSI_COLORS[15]),_.extendedAnsi){let S=Math.min(k.ansi.length-16,_.extendedAnsi.length);for(let C=0;C<S;C++)k.ansi[C+16]=x(_.extendedAnsi[C],i.DEFAULT_ANSI_COLORS[C+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(_){this._restoreColor(_),this._onChangeColors.fire(this.colors)}_restoreColor(_){if(_!==void 0)switch(_){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[_]=this._restoreColors.ansi[_]}else for(let k=0;k<this._restoreColors.ansi.length;++k)this._colors.ansi[k]=this._restoreColors.ansi[k]}modifyColors(_){_(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function x(_,k){if(_!==void 0)try{return h.css.toColor(_)}catch{}return k}i.ThemeService=w=a([l(0,f.IOptionsService)],w)},6349:(s,i,o)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CircularList=void 0;let a=o(8460),l=o(844);class c extends l.Disposable{constructor(d){super(),this._maxLength=d,this.onDeleteEmitter=this.register(new a.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new a.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new a.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(d){if(this._maxLength===d)return;let u=new Array(d);for(let f=0;f<Math.min(d,this.length);f++)u[f]=this._array[this._getCyclicIndex(f)];this._array=u,this._maxLength=d,this._startIndex=0}get length(){return this._length}set length(d){if(d>this._length)for(let u=this._length;u<d;u++)this._array[u]=void 0;this._length=d}get(d){return this._array[this._getCyclicIndex(d)]}set(d,u){this._array[this._getCyclicIndex(d)]=u}push(d){this._array[this._getCyclicIndex(this._length)]=d,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(d,u,...f){if(u){for(let p=d;p<this._length-u;p++)this._array[this._getCyclicIndex(p)]=this._array[this._getCyclicIndex(p+u)];this._length-=u,this.onDeleteEmitter.fire({index:d,amount:u})}for(let p=this._length-1;p>=d;p--)this._array[this._getCyclicIndex(p+f.length)]=this._array[this._getCyclicIndex(p)];for(let p=0;p<f.length;p++)this._array[this._getCyclicIndex(d+p)]=f[p];if(f.length&&this.onInsertEmitter.fire({index:d,amount:f.length}),this._length+f.length>this._maxLength){let p=this._length+f.length-this._maxLength;this._startIndex+=p,this._length=this._maxLength,this.onTrimEmitter.fire(p)}else this._length+=f.length}trimStart(d){d>this._length&&(d=this._length),this._startIndex+=d,this._length-=d,this.onTrimEmitter.fire(d)}shiftElements(d,u,f){if(!(u<=0)){if(d<0||d>=this._length)throw new Error("start argument out of range");if(d+f<0)throw new Error("Cannot shift elements in list beyond index 0");if(f>0){for(let m=u-1;m>=0;m--)this.set(d+m+f,this.get(d+m));let p=d+u+f-this._length;if(p>0)for(this._length+=p;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let p=0;p<u;p++)this.set(d+p+f,this.get(d+p))}}_getCyclicIndex(d){return(this._startIndex+d)%this._maxLength}}i.CircularList=c},1439:(s,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.clone=void 0,i.clone=function o(a,l=5){if(typeof a!="object")return a;let c=Array.isArray(a)?[]:{};for(let h in a)c[h]=l<=1?a[h]:a[h]&&o(a[h],l-1);return c}},8055:(s,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.contrastRatio=i.toPaddedHex=i.rgba=i.rgb=i.css=i.color=i.channels=i.NULL_COLOR=void 0;let o=0,a=0,l=0,c=0;var h,d,u,f,p;function m(b){let v=b.toString(16);return v.length<2?"0"+v:v}function g(b,v){return b<v?(v+.05)/(b+.05):(b+.05)/(v+.05)}i.NULL_COLOR={css:"#00000000",rgba:0},(function(b){b.toCss=function(v,w,x,_){return _!==void 0?`#${m(v)}${m(w)}${m(x)}${m(_)}`:`#${m(v)}${m(w)}${m(x)}`},b.toRgba=function(v,w,x,_=255){return(v<<24|w<<16|x<<8|_)>>>0},b.toColor=function(v,w,x,_){return{css:b.toCss(v,w,x,_),rgba:b.toRgba(v,w,x,_)}}})(h||(i.channels=h={})),(function(b){function v(w,x){return c=Math.round(255*x),[o,a,l]=p.toChannels(w.rgba),{css:h.toCss(o,a,l,c),rgba:h.toRgba(o,a,l,c)}}b.blend=function(w,x){if(c=(255&x.rgba)/255,c===1)return{css:x.css,rgba:x.rgba};let _=x.rgba>>24&255,k=x.rgba>>16&255,S=x.rgba>>8&255,C=w.rgba>>24&255,T=w.rgba>>16&255,E=w.rgba>>8&255;return o=C+Math.round((_-C)*c),a=T+Math.round((k-T)*c),l=E+Math.round((S-E)*c),{css:h.toCss(o,a,l),rgba:h.toRgba(o,a,l)}},b.isOpaque=function(w){return(255&w.rgba)==255},b.ensureContrastRatio=function(w,x,_){let k=p.ensureContrastRatio(w.rgba,x.rgba,_);if(k)return h.toColor(k>>24&255,k>>16&255,k>>8&255)},b.opaque=function(w){let x=(255|w.rgba)>>>0;return[o,a,l]=p.toChannels(x),{css:h.toCss(o,a,l),rgba:x}},b.opacity=v,b.multiplyOpacity=function(w,x){return c=255&w.rgba,v(w,c*x/255)},b.toColorRGB=function(w){return[w.rgba>>24&255,w.rgba>>16&255,w.rgba>>8&255]}})(d||(i.color=d={})),(function(b){let v,w;try{let x=document.createElement("canvas");x.width=1,x.height=1;let _=x.getContext("2d",{willReadFrequently:!0});_&&(v=_,v.globalCompositeOperation="copy",w=v.createLinearGradient(0,0,1,1))}catch{}b.toColor=function(x){if(x.match(/#[\da-f]{3,8}/i))switch(x.length){case 4:return o=parseInt(x.slice(1,2).repeat(2),16),a=parseInt(x.slice(2,3).repeat(2),16),l=parseInt(x.slice(3,4).repeat(2),16),h.toColor(o,a,l);case 5:return o=parseInt(x.slice(1,2).repeat(2),16),a=parseInt(x.slice(2,3).repeat(2),16),l=parseInt(x.slice(3,4).repeat(2),16),c=parseInt(x.slice(4,5).repeat(2),16),h.toColor(o,a,l,c);case 7:return{css:x,rgba:(parseInt(x.slice(1),16)<<8|255)>>>0};case 9:return{css:x,rgba:parseInt(x.slice(1),16)>>>0}}let _=x.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(_)return o=parseInt(_[1]),a=parseInt(_[2]),l=parseInt(_[3]),c=Math.round(255*(_[5]===void 0?1:parseFloat(_[5]))),h.toColor(o,a,l,c);if(!v||!w)throw new Error("css.toColor: Unsupported css format");if(v.fillStyle=w,v.fillStyle=x,typeof v.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(v.fillRect(0,0,1,1),[o,a,l,c]=v.getImageData(0,0,1,1).data,c!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:h.toRgba(o,a,l,c),css:x}}})(u||(i.css=u={})),(function(b){function v(w,x,_){let k=w/255,S=x/255,C=_/255;return .2126*(k<=.03928?k/12.92:Math.pow((k+.055)/1.055,2.4))+.7152*(S<=.03928?S/12.92:Math.pow((S+.055)/1.055,2.4))+.0722*(C<=.03928?C/12.92:Math.pow((C+.055)/1.055,2.4))}b.relativeLuminance=function(w){return v(w>>16&255,w>>8&255,255&w)},b.relativeLuminance2=v})(f||(i.rgb=f={})),(function(b){function v(x,_,k){let S=x>>24&255,C=x>>16&255,T=x>>8&255,E=_>>24&255,M=_>>16&255,z=_>>8&255,N=g(f.relativeLuminance2(E,M,z),f.relativeLuminance2(S,C,T));for(;N<k&&(E>0||M>0||z>0);)E-=Math.max(0,Math.ceil(.1*E)),M-=Math.max(0,Math.ceil(.1*M)),z-=Math.max(0,Math.ceil(.1*z)),N=g(f.relativeLuminance2(E,M,z),f.relativeLuminance2(S,C,T));return(E<<24|M<<16|z<<8|255)>>>0}function w(x,_,k){let S=x>>24&255,C=x>>16&255,T=x>>8&255,E=_>>24&255,M=_>>16&255,z=_>>8&255,N=g(f.relativeLuminance2(E,M,z),f.relativeLuminance2(S,C,T));for(;N<k&&(E<255||M<255||z<255);)E=Math.min(255,E+Math.ceil(.1*(255-E))),M=Math.min(255,M+Math.ceil(.1*(255-M))),z=Math.min(255,z+Math.ceil(.1*(255-z))),N=g(f.relativeLuminance2(E,M,z),f.relativeLuminance2(S,C,T));return(E<<24|M<<16|z<<8|255)>>>0}b.blend=function(x,_){if(c=(255&_)/255,c===1)return _;let k=_>>24&255,S=_>>16&255,C=_>>8&255,T=x>>24&255,E=x>>16&255,M=x>>8&255;return o=T+Math.round((k-T)*c),a=E+Math.round((S-E)*c),l=M+Math.round((C-M)*c),h.toRgba(o,a,l)},b.ensureContrastRatio=function(x,_,k){let S=f.relativeLuminance(x>>8),C=f.relativeLuminance(_>>8);if(g(S,C)<k){if(C<S){let M=v(x,_,k),z=g(S,f.relativeLuminance(M>>8));if(z<k){let N=w(x,_,k);return z>g(S,f.relativeLuminance(N>>8))?M:N}return M}let T=w(x,_,k),E=g(S,f.relativeLuminance(T>>8));if(E<k){let M=v(x,_,k);return E>g(S,f.relativeLuminance(M>>8))?T:M}return T}},b.reduceLuminance=v,b.increaseLuminance=w,b.toChannels=function(x){return[x>>24&255,x>>16&255,x>>8&255,255&x]}})(p||(i.rgba=p={})),i.toPaddedHex=m,i.contrastRatio=g},8969:(s,i,o)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CoreTerminal=void 0;let a=o(844),l=o(2585),c=o(4348),h=o(7866),d=o(744),u=o(7302),f=o(6975),p=o(8460),m=o(1753),g=o(1480),b=o(7994),v=o(9282),w=o(5435),x=o(5981),_=o(2660),k=!1;class S extends a.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new p.EventEmitter),this._onScroll.event((T=>{this._onScrollApi?.fire(T.position)}))),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(T){for(let E in T)this.optionsService.options[E]=T[E]}constructor(T){super(),this._windowsWrappingHeuristics=this.register(new a.MutableDisposable),this._onBinary=this.register(new p.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new p.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new p.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new p.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new p.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new p.EventEmitter),this._instantiationService=new c.InstantiationService,this.optionsService=this.register(new u.OptionsService(T)),this._instantiationService.setService(l.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(d.BufferService)),this._instantiationService.setService(l.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(h.LogService)),this._instantiationService.setService(l.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(f.CoreService)),this._instantiationService.setService(l.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(m.CoreMouseService)),this._instantiationService.setService(l.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(g.UnicodeService)),this._instantiationService.setService(l.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(b.CharsetService),this._instantiationService.setService(l.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(_.OscLinkService),this._instantiationService.setService(l.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new w.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,p.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,p.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,p.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,p.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((E=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this.register(this._inputHandler.onScroll((E=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new x.WriteBuffer(((E,M)=>this._inputHandler.parse(E,M)))),this.register((0,p.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(T,E){this._writeBuffer.write(T,E)}writeSync(T,E){this._logService.logLevel<=l.LogLevelEnum.WARN&&!k&&(this._logService.warn("writeSync is unreliable and will be removed soon."),k=!0),this._writeBuffer.writeSync(T,E)}input(T,E=!0){this.coreService.triggerDataEvent(T,E)}resize(T,E){isNaN(T)||isNaN(E)||(T=Math.max(T,d.MINIMUM_COLS),E=Math.max(E,d.MINIMUM_ROWS),this._bufferService.resize(T,E))}scroll(T,E=!1){this._bufferService.scroll(T,E)}scrollLines(T,E,M){this._bufferService.scrollLines(T,E,M)}scrollPages(T){this.scrollLines(T*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(T){let E=T-this._bufferService.buffer.ydisp;E!==0&&this.scrollLines(E)}registerEscHandler(T,E){return this._inputHandler.registerEscHandler(T,E)}registerDcsHandler(T,E){return this._inputHandler.registerDcsHandler(T,E)}registerCsiHandler(T,E){return this._inputHandler.registerCsiHandler(T,E)}registerOscHandler(T,E){return this._inputHandler.registerOscHandler(T,E)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let T=!1,E=this.optionsService.rawOptions.windowsPty;E&&E.buildNumber!==void 0&&E.buildNumber!==void 0?T=E.backend==="conpty"&&E.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(T=!0),T?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){let T=[];T.push(this.onLineFeed(v.updateWindowsModeWrappedState.bind(null,this._bufferService))),T.push(this.registerCsiHandler({final:"H"},(()=>((0,v.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,a.toDisposable)((()=>{for(let E of T)E.dispose()}))}}}i.CoreTerminal=S},8460:(s,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.runAndSubscribe=i.forwardEvent=i.EventEmitter=void 0,i.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=o=>(this._listeners.push(o),{dispose:()=>{if(!this._disposed){for(let a=0;a<this._listeners.length;a++)if(this._listeners[a]===o)return void this._listeners.splice(a,1)}}})),this._event}fire(o,a){let l=[];for(let c=0;c<this._listeners.length;c++)l.push(this._listeners[c]);for(let c=0;c<l.length;c++)l[c].call(void 0,o,a)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},i.forwardEvent=function(o,a){return o((l=>a.fire(l)))},i.runAndSubscribe=function(o,a){return a(void 0),o((l=>a(l)))}},5435:function(s,i,o){var a=this&&this.__decorate||function(j,P,I,R){var A,V=arguments.length,q=V<3?P:R===null?R=Object.getOwnPropertyDescriptor(P,I):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")q=Reflect.decorate(j,P,I,R);else for(var O=j.length-1;O>=0;O--)(A=j[O])&&(q=(V<3?A(q):V>3?A(P,I,q):A(P,I))||q);return V>3&&q&&Object.defineProperty(P,I,q),q},l=this&&this.__param||function(j,P){return function(I,R){P(I,R,j)}};Object.defineProperty(i,"__esModule",{value:!0}),i.InputHandler=i.WindowsOptionsReportType=void 0;let c=o(2584),h=o(7116),d=o(2015),u=o(844),f=o(482),p=o(8437),m=o(8460),g=o(643),b=o(511),v=o(3734),w=o(2585),x=o(1480),_=o(6242),k=o(6351),S=o(5941),C={"(":0,")":1,"*":2,"+":3,"-":1,".":2},T=131072;function E(j,P){if(j>24)return P.setWinLines||!1;switch(j){case 1:return!!P.restoreWin;case 2:return!!P.minimizeWin;case 3:return!!P.setWinPosition;case 4:return!!P.setWinSizePixels;case 5:return!!P.raiseWin;case 6:return!!P.lowerWin;case 7:return!!P.refreshWin;case 8:return!!P.setWinSizeChars;case 9:return!!P.maximizeWin;case 10:return!!P.fullscreenWin;case 11:return!!P.getWinState;case 13:return!!P.getWinPosition;case 14:return!!P.getWinSizePixels;case 15:return!!P.getScreenSizePixels;case 16:return!!P.getCellSizePixels;case 18:return!!P.getWinSizeChars;case 19:return!!P.getScreenSizeChars;case 20:return!!P.getIconTitle;case 21:return!!P.getWinTitle;case 22:return!!P.pushTitle;case 23:return!!P.popTitle;case 24:return!!P.setWinLines}return!1}var M;(function(j){j[j.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",j[j.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(M||(i.WindowsOptionsReportType=M={}));let z=0;class N extends u.Disposable{getAttrData(){return this._curAttrData}constructor(P,I,R,A,V,q,O,Z,H=new d.EscapeSequenceParser){super(),this._bufferService=P,this._charsetService=I,this._coreService=R,this._logService=A,this._optionsService=V,this._oscLinkService=q,this._coreMouseService=O,this._unicodeService=Z,this._parser=H,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new f.StringToUtf32,this._utf8Decoder=new f.Utf8ToUtf32,this._workCell=new b.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=p.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=p.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new m.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new m.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new m.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new m.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new m.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new m.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new m.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new m.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new m.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new m.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new m.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new m.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new m.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new $(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((L=>this._activeBuffer=L.activeBuffer))),this._parser.setCsiHandlerFallback(((L,Y)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(L),params:Y.toArray()})})),this._parser.setEscHandlerFallback((L=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(L)})})),this._parser.setExecuteHandlerFallback((L=>{this._logService.debug("Unknown EXECUTE code: ",{code:L})})),this._parser.setOscHandlerFallback(((L,Y,G)=>{this._logService.debug("Unknown OSC code: ",{identifier:L,action:Y,data:G})})),this._parser.setDcsHandlerFallback(((L,Y,G)=>{Y==="HOOK"&&(G=G.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(L),action:Y,payload:G})})),this._parser.setPrintHandler(((L,Y,G)=>this.print(L,Y,G))),this._parser.registerCsiHandler({final:"@"},(L=>this.insertChars(L))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(L=>this.scrollLeft(L))),this._parser.registerCsiHandler({final:"A"},(L=>this.cursorUp(L))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(L=>this.scrollRight(L))),this._parser.registerCsiHandler({final:"B"},(L=>this.cursorDown(L))),this._parser.registerCsiHandler({final:"C"},(L=>this.cursorForward(L))),this._parser.registerCsiHandler({final:"D"},(L=>this.cursorBackward(L))),this._parser.registerCsiHandler({final:"E"},(L=>this.cursorNextLine(L))),this._parser.registerCsiHandler({final:"F"},(L=>this.cursorPrecedingLine(L))),this._parser.registerCsiHandler({final:"G"},(L=>this.cursorCharAbsolute(L))),this._parser.registerCsiHandler({final:"H"},(L=>this.cursorPosition(L))),this._parser.registerCsiHandler({final:"I"},(L=>this.cursorForwardTab(L))),this._parser.registerCsiHandler({final:"J"},(L=>this.eraseInDisplay(L,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(L=>this.eraseInDisplay(L,!0))),this._parser.registerCsiHandler({final:"K"},(L=>this.eraseInLine(L,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(L=>this.eraseInLine(L,!0))),this._parser.registerCsiHandler({final:"L"},(L=>this.insertLines(L))),this._parser.registerCsiHandler({final:"M"},(L=>this.deleteLines(L))),this._parser.registerCsiHandler({final:"P"},(L=>this.deleteChars(L))),this._parser.registerCsiHandler({final:"S"},(L=>this.scrollUp(L))),this._parser.registerCsiHandler({final:"T"},(L=>this.scrollDown(L))),this._parser.registerCsiHandler({final:"X"},(L=>this.eraseChars(L))),this._parser.registerCsiHandler({final:"Z"},(L=>this.cursorBackwardTab(L))),this._parser.registerCsiHandler({final:"`"},(L=>this.charPosAbsolute(L))),this._parser.registerCsiHandler({final:"a"},(L=>this.hPositionRelative(L))),this._parser.registerCsiHandler({final:"b"},(L=>this.repeatPrecedingCharacter(L))),this._parser.registerCsiHandler({final:"c"},(L=>this.sendDeviceAttributesPrimary(L))),this._parser.registerCsiHandler({prefix:">",final:"c"},(L=>this.sendDeviceAttributesSecondary(L))),this._parser.registerCsiHandler({final:"d"},(L=>this.linePosAbsolute(L))),this._parser.registerCsiHandler({final:"e"},(L=>this.vPositionRelative(L))),this._parser.registerCsiHandler({final:"f"},(L=>this.hVPosition(L))),this._parser.registerCsiHandler({final:"g"},(L=>this.tabClear(L))),this._parser.registerCsiHandler({final:"h"},(L=>this.setMode(L))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(L=>this.setModePrivate(L))),this._parser.registerCsiHandler({final:"l"},(L=>this.resetMode(L))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(L=>this.resetModePrivate(L))),this._parser.registerCsiHandler({final:"m"},(L=>this.charAttributes(L))),this._parser.registerCsiHandler({final:"n"},(L=>this.deviceStatus(L))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(L=>this.deviceStatusPrivate(L))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(L=>this.softReset(L))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(L=>this.setCursorStyle(L))),this._parser.registerCsiHandler({final:"r"},(L=>this.setScrollRegion(L))),this._parser.registerCsiHandler({final:"s"},(L=>this.saveCursor(L))),this._parser.registerCsiHandler({final:"t"},(L=>this.windowOptions(L))),this._parser.registerCsiHandler({final:"u"},(L=>this.restoreCursor(L))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(L=>this.insertColumns(L))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(L=>this.deleteColumns(L))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(L=>this.selectProtected(L))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(L=>this.requestMode(L,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(L=>this.requestMode(L,!1))),this._parser.setExecuteHandler(c.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(c.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(c.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(c.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(c.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(c.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(c.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(c.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(c.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(c.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(c.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(c.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new _.OscHandler((L=>(this.setTitle(L),this.setIconName(L),!0)))),this._parser.registerOscHandler(1,new _.OscHandler((L=>this.setIconName(L)))),this._parser.registerOscHandler(2,new _.OscHandler((L=>this.setTitle(L)))),this._parser.registerOscHandler(4,new _.OscHandler((L=>this.setOrReportIndexedColor(L)))),this._parser.registerOscHandler(8,new _.OscHandler((L=>this.setHyperlink(L)))),this._parser.registerOscHandler(10,new _.OscHandler((L=>this.setOrReportFgColor(L)))),this._parser.registerOscHandler(11,new _.OscHandler((L=>this.setOrReportBgColor(L)))),this._parser.registerOscHandler(12,new _.OscHandler((L=>this.setOrReportCursorColor(L)))),this._parser.registerOscHandler(104,new _.OscHandler((L=>this.restoreIndexedColor(L)))),this._parser.registerOscHandler(110,new _.OscHandler((L=>this.restoreFgColor(L)))),this._parser.registerOscHandler(111,new _.OscHandler((L=>this.restoreBgColor(L)))),this._parser.registerOscHandler(112,new _.OscHandler((L=>this.restoreCursorColor(L)))),this._parser.registerEscHandler({final:"7"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:"8"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:"D"},(()=>this.index())),this._parser.registerEscHandler({final:"E"},(()=>this.nextLine())),this._parser.registerEscHandler({final:"H"},(()=>this.tabSet())),this._parser.registerEscHandler({final:"M"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:"="},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:">"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:"c"},(()=>this.fullReset())),this._parser.registerEscHandler({final:"n"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"o"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"|"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"}"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"~"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:"%",final:"@"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:"%",final:"G"},(()=>this.selectDefaultCharset()));for(let L in h.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:L},(()=>this.selectCharset("("+L))),this._parser.registerEscHandler({intermediates:")",final:L},(()=>this.selectCharset(")"+L))),this._parser.registerEscHandler({intermediates:"*",final:L},(()=>this.selectCharset("*"+L))),this._parser.registerEscHandler({intermediates:"+",final:L},(()=>this.selectCharset("+"+L))),this._parser.registerEscHandler({intermediates:"-",final:L},(()=>this.selectCharset("-"+L))),this._parser.registerEscHandler({intermediates:".",final:L},(()=>this.selectCharset("."+L))),this._parser.registerEscHandler({intermediates:"/",final:L},(()=>this.selectCharset("/"+L)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((L=>(this._logService.error("Parsing error: ",L),L))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new k.DcsHandler(((L,Y)=>this.requestStatusString(L,Y))))}_preserveStack(P,I,R,A){this._parseStack.paused=!0,this._parseStack.cursorStartX=P,this._parseStack.cursorStartY=I,this._parseStack.decodedLength=R,this._parseStack.position=A}_logSlowResolvingAsync(P){this._logService.logLevel<=w.LogLevelEnum.WARN&&Promise.race([P,new Promise(((I,R)=>setTimeout((()=>R("#SLOW_TIMEOUT")),5e3)))]).catch((I=>{if(I!=="#SLOW_TIMEOUT")throw I;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(P,I){let R,A=this._activeBuffer.x,V=this._activeBuffer.y,q=0,O=this._parseStack.paused;if(O){if(R=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,I))return this._logSlowResolvingAsync(R),R;A=this._parseStack.cursorStartX,V=this._parseStack.cursorStartY,this._parseStack.paused=!1,P.length>T&&(q=this._parseStack.position+T)}if(this._logService.logLevel<=w.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof P=="string"?` "${P}"`:` "${Array.prototype.map.call(P,(L=>String.fromCharCode(L))).join("")}"`),typeof P=="string"?P.split("").map((L=>L.charCodeAt(0))):P),this._parseBuffer.length<P.length&&this._parseBuffer.length<T&&(this._parseBuffer=new Uint32Array(Math.min(P.length,T))),O||this._dirtyRowTracker.clearRange(),P.length>T)for(let L=q;L<P.length;L+=T){let Y=L+T<P.length?L+T:P.length,G=typeof P=="string"?this._stringDecoder.decode(P.substring(L,Y),this._parseBuffer):this._utf8Decoder.decode(P.subarray(L,Y),this._parseBuffer);if(R=this._parser.parse(this._parseBuffer,G))return this._preserveStack(A,V,G,L),this._logSlowResolvingAsync(R),R}else if(!O){let L=typeof P=="string"?this._stringDecoder.decode(P,this._parseBuffer):this._utf8Decoder.decode(P,this._parseBuffer);if(R=this._parser.parse(this._parseBuffer,L))return this._preserveStack(A,V,L,0),this._logSlowResolvingAsync(R),R}this._activeBuffer.x===A&&this._activeBuffer.y===V||this._onCursorMove.fire();let Z=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),H=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);H<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(H,this._bufferService.rows-1),Math.min(Z,this._bufferService.rows-1))}print(P,I,R){let A,V,q=this._charsetService.charset,O=this._optionsService.rawOptions.screenReaderMode,Z=this._bufferService.cols,H=this._coreService.decPrivateModes.wraparound,L=this._coreService.modes.insertMode,Y=this._curAttrData,G=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&R-I>0&&G.getWidth(this._activeBuffer.x-1)===2&&G.setCellFromCodepoint(this._activeBuffer.x-1,0,1,Y);let oe=this._parser.precedingJoinState;for(let U=I;U<R;++U){if(A=P[U],A<127&&q){let Ze=q[String.fromCharCode(A)];Ze&&(A=Ze.charCodeAt(0))}let fe=this._unicodeService.charProperties(A,oe);V=x.UnicodeService.extractWidth(fe);let Ee=x.UnicodeService.extractShouldJoin(fe),Pe=Ee?x.UnicodeService.extractWidth(oe):0;if(oe=fe,O&&this._onA11yChar.fire((0,f.stringFromCodePoint)(A)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+V-Pe>Z){if(H){let Ze=G,ve=this._activeBuffer.x-Pe;for(this._activeBuffer.x=Pe,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),G=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Pe>0&&G instanceof p.BufferLine&&G.copyCellsFrom(Ze,ve,0,Pe,!1);ve<Z;)Ze.setCellFromCodepoint(ve++,0,1,Y)}else if(this._activeBuffer.x=Z-1,V===2)continue}if(Ee&&this._activeBuffer.x){let Ze=G.getWidth(this._activeBuffer.x-1)?1:2;G.addCodepointToCell(this._activeBuffer.x-Ze,A,V);for(let ve=V-Pe;--ve>=0;)G.setCellFromCodepoint(this._activeBuffer.x++,0,0,Y)}else if(L&&(G.insertCells(this._activeBuffer.x,V-Pe,this._activeBuffer.getNullCell(Y)),G.getWidth(Z-1)===2&&G.setCellFromCodepoint(Z-1,g.NULL_CELL_CODE,g.NULL_CELL_WIDTH,Y)),G.setCellFromCodepoint(this._activeBuffer.x++,A,V,Y),V>0)for(;--V;)G.setCellFromCodepoint(this._activeBuffer.x++,0,0,Y)}this._parser.precedingJoinState=oe,this._activeBuffer.x<Z&&R-I>0&&G.getWidth(this._activeBuffer.x)===0&&!G.hasContent(this._activeBuffer.x)&&G.setCellFromCodepoint(this._activeBuffer.x,0,1,Y),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(P,I){return P.final!=="t"||P.prefix||P.intermediates?this._parser.registerCsiHandler(P,I):this._parser.registerCsiHandler(P,(R=>!E(R.params[0],this._optionsService.rawOptions.windowOptions)||I(R)))}registerDcsHandler(P,I){return this._parser.registerDcsHandler(P,new k.DcsHandler(I))}registerEscHandler(P,I){return this._parser.registerEscHandler(P,I)}registerOscHandler(P,I){return this._parser.registerOscHandler(P,new _.OscHandler(I))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)?.isWrapped){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;let P=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);P.hasWidth(this._activeBuffer.x)&&!P.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let P=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-P),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(P=this._bufferService.cols-1){this._activeBuffer.x=Math.min(P,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(P,I){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=P,this._activeBuffer.y=this._activeBuffer.scrollTop+I):(this._activeBuffer.x=P,this._activeBuffer.y=I),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(P,I){this._restrictCursor(),this._setCursor(this._activeBuffer.x+P,this._activeBuffer.y+I)}cursorUp(P){let I=this._activeBuffer.y-this._activeBuffer.scrollTop;return I>=0?this._moveCursor(0,-Math.min(I,P.params[0]||1)):this._moveCursor(0,-(P.params[0]||1)),!0}cursorDown(P){let I=this._activeBuffer.scrollBottom-this._activeBuffer.y;return I>=0?this._moveCursor(0,Math.min(I,P.params[0]||1)):this._moveCursor(0,P.params[0]||1),!0}cursorForward(P){return this._moveCursor(P.params[0]||1,0),!0}cursorBackward(P){return this._moveCursor(-(P.params[0]||1),0),!0}cursorNextLine(P){return this.cursorDown(P),this._activeBuffer.x=0,!0}cursorPrecedingLine(P){return this.cursorUp(P),this._activeBuffer.x=0,!0}cursorCharAbsolute(P){return this._setCursor((P.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(P){return this._setCursor(P.length>=2?(P.params[1]||1)-1:0,(P.params[0]||1)-1),!0}charPosAbsolute(P){return this._setCursor((P.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(P){return this._moveCursor(P.params[0]||1,0),!0}linePosAbsolute(P){return this._setCursor(this._activeBuffer.x,(P.params[0]||1)-1),!0}vPositionRelative(P){return this._moveCursor(0,P.params[0]||1),!0}hVPosition(P){return this.cursorPosition(P),!0}tabClear(P){let I=P.params[0];return I===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:I===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(P){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let I=P.params[0]||1;for(;I--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(P){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let I=P.params[0]||1;for(;I--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(P){let I=P.params[0];return I===1&&(this._curAttrData.bg|=536870912),I!==2&&I!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(P,I,R,A=!1,V=!1){let q=this._activeBuffer.lines.get(this._activeBuffer.ybase+P);q.replaceCells(I,R,this._activeBuffer.getNullCell(this._eraseAttrData()),V),A&&(q.isWrapped=!1)}_resetBufferLine(P,I=!1){let R=this._activeBuffer.lines.get(this._activeBuffer.ybase+P);R&&(R.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),I),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+P),R.isWrapped=!1)}eraseInDisplay(P,I=!1){let R;switch(this._restrictCursor(this._bufferService.cols),P.params[0]){case 0:for(R=this._activeBuffer.y,this._dirtyRowTracker.markDirty(R),this._eraseInBufferLine(R++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,I);R<this._bufferService.rows;R++)this._resetBufferLine(R,I);this._dirtyRowTracker.markDirty(R);break;case 1:for(R=this._activeBuffer.y,this._dirtyRowTracker.markDirty(R),this._eraseInBufferLine(R,0,this._activeBuffer.x+1,!0,I),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(R+1).isWrapped=!1);R--;)this._resetBufferLine(R,I);this._dirtyRowTracker.markDirty(0);break;case 2:for(R=this._bufferService.rows,this._dirtyRowTracker.markDirty(R-1);R--;)this._resetBufferLine(R,I);this._dirtyRowTracker.markDirty(0);break;case 3:let A=this._activeBuffer.lines.length-this._bufferService.rows;A>0&&(this._activeBuffer.lines.trimStart(A),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-A,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-A,0),this._onScroll.fire(0))}return!0}eraseInLine(P,I=!1){switch(this._restrictCursor(this._bufferService.cols),P.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,I);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,I);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,I)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(P){this._restrictCursor();let I=P.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let R=this._activeBuffer.ybase+this._activeBuffer.y,A=this._bufferService.rows-1-this._activeBuffer.scrollBottom,V=this._bufferService.rows-1+this._activeBuffer.ybase-A+1;for(;I--;)this._activeBuffer.lines.splice(V-1,1),this._activeBuffer.lines.splice(R,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(P){this._restrictCursor();let I=P.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let R=this._activeBuffer.ybase+this._activeBuffer.y,A;for(A=this._bufferService.rows-1-this._activeBuffer.scrollBottom,A=this._bufferService.rows-1+this._activeBuffer.ybase-A;I--;)this._activeBuffer.lines.splice(R,1),this._activeBuffer.lines.splice(A,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(P){this._restrictCursor();let I=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return I&&(I.insertCells(this._activeBuffer.x,P.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(P){this._restrictCursor();let I=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return I&&(I.deleteCells(this._activeBuffer.x,P.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(P){let I=P.params[0]||1;for(;I--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(P){let I=P.params[0]||1;for(;I--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(p.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(P){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let I=P.params[0]||1;for(let R=this._activeBuffer.scrollTop;R<=this._activeBuffer.scrollBottom;++R){let A=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);A.deleteCells(0,I,this._activeBuffer.getNullCell(this._eraseAttrData())),A.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(P){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let I=P.params[0]||1;for(let R=this._activeBuffer.scrollTop;R<=this._activeBuffer.scrollBottom;++R){let A=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);A.insertCells(0,I,this._activeBuffer.getNullCell(this._eraseAttrData())),A.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(P){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let I=P.params[0]||1;for(let R=this._activeBuffer.scrollTop;R<=this._activeBuffer.scrollBottom;++R){let A=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);A.insertCells(this._activeBuffer.x,I,this._activeBuffer.getNullCell(this._eraseAttrData())),A.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(P){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let I=P.params[0]||1;for(let R=this._activeBuffer.scrollTop;R<=this._activeBuffer.scrollBottom;++R){let A=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);A.deleteCells(this._activeBuffer.x,I,this._activeBuffer.getNullCell(this._eraseAttrData())),A.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(P){this._restrictCursor();let I=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return I&&(I.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(P.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(P){let I=this._parser.precedingJoinState;if(!I)return!0;let R=P.params[0]||1,A=x.UnicodeService.extractWidth(I),V=this._activeBuffer.x-A,q=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(V),O=new Uint32Array(q.length*R),Z=0;for(let L=0;L<q.length;){let Y=q.codePointAt(L)||0;O[Z++]=Y,L+=Y>65535?2:1}let H=Z;for(let L=1;L<R;++L)O.copyWithin(H,0,Z),H+=Z;return this.print(O,0,H),!0}sendDeviceAttributesPrimary(P){return P.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(c.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(c.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(P){return P.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(c.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(c.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(P.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(c.C0.ESC+"[>83;40003;0c")),!0}_is(P){return(this._optionsService.rawOptions.termName+"").indexOf(P)===0}setMode(P){for(let I=0;I<P.length;I++)switch(P.params[I]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(P){for(let I=0;I<P.length;I++)switch(P.params[I]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,h.DEFAULT_CHARSET),this._charsetService.setgCharset(1,h.DEFAULT_CHARSET),this._charsetService.setgCharset(2,h.DEFAULT_CHARSET),this._charsetService.setgCharset(3,h.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(P){for(let I=0;I<P.length;I++)switch(P.params[I]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(P){for(let I=0;I<P.length;I++)switch(P.params[I]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),P.params[I]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(P,I){let R=this._coreService.decPrivateModes,{activeProtocol:A,activeEncoding:V}=this._coreMouseService,q=this._coreService,{buffers:O,cols:Z}=this._bufferService,{active:H,alt:L}=O,Y=this._optionsService.rawOptions,G=Ee=>Ee?1:2,oe=P.params[0];return U=oe,fe=I?oe===2?4:oe===4?G(q.modes.insertMode):oe===12?3:oe===20?G(Y.convertEol):0:oe===1?G(R.applicationCursorKeys):oe===3?Y.windowOptions.setWinLines?Z===80?2:Z===132?1:0:0:oe===6?G(R.origin):oe===7?G(R.wraparound):oe===8?3:oe===9?G(A==="X10"):oe===12?G(Y.cursorBlink):oe===25?G(!q.isCursorHidden):oe===45?G(R.reverseWraparound):oe===66?G(R.applicationKeypad):oe===67?4:oe===1e3?G(A==="VT200"):oe===1002?G(A==="DRAG"):oe===1003?G(A==="ANY"):oe===1004?G(R.sendFocus):oe===1005?4:oe===1006?G(V==="SGR"):oe===1015?4:oe===1016?G(V==="SGR_PIXELS"):oe===1048?1:oe===47||oe===1047||oe===1049?G(H===L):oe===2004?G(R.bracketedPasteMode):0,q.triggerDataEvent(`${c.C0.ESC}[${I?"":"?"}${U};${fe}$y`),!0;var U,fe}_updateAttrColor(P,I,R,A,V){return I===2?(P|=50331648,P&=-16777216,P|=v.AttributeData.fromColorRGB([R,A,V])):I===5&&(P&=-50331904,P|=33554432|255&R),P}_extractColor(P,I,R){let A=[0,0,-1,0,0,0],V=0,q=0;do{if(A[q+V]=P.params[I+q],P.hasSubParams(I+q)){let O=P.getSubParams(I+q),Z=0;do A[1]===5&&(V=1),A[q+Z+1+V]=O[Z];while(++Z<O.length&&Z+q+1+V<A.length);break}if(A[1]===5&&q+V>=2||A[1]===2&&q+V>=5)break;A[1]&&(V=1)}while(++q+I<P.length&&q+V<A.length);for(let O=2;O<A.length;++O)A[O]===-1&&(A[O]=0);switch(A[0]){case 38:R.fg=this._updateAttrColor(R.fg,A[1],A[3],A[4],A[5]);break;case 48:R.bg=this._updateAttrColor(R.bg,A[1],A[3],A[4],A[5]);break;case 58:R.extended=R.extended.clone(),R.extended.underlineColor=this._updateAttrColor(R.extended.underlineColor,A[1],A[3],A[4],A[5])}return q}_processUnderline(P,I){I.extended=I.extended.clone(),(!~P||P>5)&&(P=1),I.extended.underlineStyle=P,I.fg|=268435456,P===0&&(I.fg&=-268435457),I.updateExtended()}_processSGR0(P){P.fg=p.DEFAULT_ATTR_DATA.fg,P.bg=p.DEFAULT_ATTR_DATA.bg,P.extended=P.extended.clone(),P.extended.underlineStyle=0,P.extended.underlineColor&=-67108864,P.updateExtended()}charAttributes(P){if(P.length===1&&P.params[0]===0)return this._processSGR0(this._curAttrData),!0;let I=P.length,R,A=this._curAttrData;for(let V=0;V<I;V++)R=P.params[V],R>=30&&R<=37?(A.fg&=-50331904,A.fg|=16777216|R-30):R>=40&&R<=47?(A.bg&=-50331904,A.bg|=16777216|R-40):R>=90&&R<=97?(A.fg&=-50331904,A.fg|=16777224|R-90):R>=100&&R<=107?(A.bg&=-50331904,A.bg|=16777224|R-100):R===0?this._processSGR0(A):R===1?A.fg|=134217728:R===3?A.bg|=67108864:R===4?(A.fg|=268435456,this._processUnderline(P.hasSubParams(V)?P.getSubParams(V)[0]:1,A)):R===5?A.fg|=536870912:R===7?A.fg|=67108864:R===8?A.fg|=1073741824:R===9?A.fg|=2147483648:R===2?A.bg|=134217728:R===21?this._processUnderline(2,A):R===22?(A.fg&=-134217729,A.bg&=-134217729):R===23?A.bg&=-67108865:R===24?(A.fg&=-268435457,this._processUnderline(0,A)):R===25?A.fg&=-536870913:R===27?A.fg&=-67108865:R===28?A.fg&=-1073741825:R===29?A.fg&=2147483647:R===39?(A.fg&=-67108864,A.fg|=16777215&p.DEFAULT_ATTR_DATA.fg):R===49?(A.bg&=-67108864,A.bg|=16777215&p.DEFAULT_ATTR_DATA.bg):R===38||R===48||R===58?V+=this._extractColor(P,V,A):R===53?A.bg|=1073741824:R===55?A.bg&=-1073741825:R===59?(A.extended=A.extended.clone(),A.extended.underlineColor=-1,A.updateExtended()):R===100?(A.fg&=-67108864,A.fg|=16777215&p.DEFAULT_ATTR_DATA.fg,A.bg&=-67108864,A.bg|=16777215&p.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",R);return!0}deviceStatus(P){switch(P.params[0]){case 5:this._coreService.triggerDataEvent(`${c.C0.ESC}[0n`);break;case 6:let I=this._activeBuffer.y+1,R=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${c.C0.ESC}[${I};${R}R`)}return!0}deviceStatusPrivate(P){if(P.params[0]===6){let I=this._activeBuffer.y+1,R=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${c.C0.ESC}[?${I};${R}R`)}return!0}softReset(P){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=p.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(P){let I=P.params[0]||1;switch(I){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}let R=I%2==1;return this._optionsService.options.cursorBlink=R,!0}setScrollRegion(P){let I=P.params[0]||1,R;return(P.length<2||(R=P.params[1])>this._bufferService.rows||R===0)&&(R=this._bufferService.rows),R>I&&(this._activeBuffer.scrollTop=I-1,this._activeBuffer.scrollBottom=R-1,this._setCursor(0,0)),!0}windowOptions(P){if(!E(P.params[0],this._optionsService.rawOptions.windowOptions))return!0;let I=P.length>1?P.params[1]:0;switch(P.params[0]){case 14:I!==2&&this._onRequestWindowsOptionsReport.fire(M.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(M.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${c.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:I!==0&&I!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),I!==0&&I!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:I!==0&&I!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),I!==0&&I!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(P){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(P){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(P){return this._windowTitle=P,this._onTitleChange.fire(P),!0}setIconName(P){return this._iconName=P,!0}setOrReportIndexedColor(P){let I=[],R=P.split(";");for(;R.length>1;){let A=R.shift(),V=R.shift();if(/^\d+$/.exec(A)){let q=parseInt(A);if(F(q))if(V==="?")I.push({type:0,index:q});else{let O=(0,S.parseColor)(V);O&&I.push({type:1,index:q,color:O})}}}return I.length&&this._onColor.fire(I),!0}setHyperlink(P){let I=P.split(";");return!(I.length<2)&&(I[1]?this._createHyperlink(I[0],I[1]):!I[0]&&this._finishHyperlink())}_createHyperlink(P,I){this._getCurrentLinkId()&&this._finishHyperlink();let R=P.split(":"),A,V=R.findIndex((q=>q.startsWith("id=")));return V!==-1&&(A=R[V].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:A,uri:I}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(P,I){let R=P.split(";");for(let A=0;A<R.length&&!(I>=this._specialColors.length);++A,++I)if(R[A]==="?")this._onColor.fire([{type:0,index:this._specialColors[I]}]);else{let V=(0,S.parseColor)(R[A]);V&&this._onColor.fire([{type:1,index:this._specialColors[I],color:V}])}return!0}setOrReportFgColor(P){return this._setOrReportSpecialColor(P,0)}setOrReportBgColor(P){return this._setOrReportSpecialColor(P,1)}setOrReportCursorColor(P){return this._setOrReportSpecialColor(P,2)}restoreIndexedColor(P){if(!P)return this._onColor.fire([{type:2}]),!0;let I=[],R=P.split(";");for(let A=0;A<R.length;++A)if(/^\d+$/.exec(R[A])){let V=parseInt(R[A]);F(V)&&I.push({type:2,index:V})}return I.length&&this._onColor.fire(I),!0}restoreFgColor(P){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(P){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(P){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,h.DEFAULT_CHARSET),!0}selectCharset(P){return P.length!==2?(this.selectDefaultCharset(),!0):(P[0]==="/"||this._charsetService.setgCharset(C[P[0]],h.CHARSETS[P[1]]||h.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){let P=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,P,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=p.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=p.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(P){return this._charsetService.setgLevel(P),!0}screenAlignmentPattern(){let P=new b.CellData;P.content=4194373,P.fg=this._curAttrData.fg,P.bg=this._curAttrData.bg,this._setCursor(0,0);for(let I=0;I<this._bufferService.rows;++I){let R=this._activeBuffer.ybase+this._activeBuffer.y+I,A=this._activeBuffer.lines.get(R);A&&(A.fill(P),A.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(P,I){let R=this._bufferService.buffer,A=this._optionsService.rawOptions;return(V=>(this._coreService.triggerDataEvent(`${c.C0.ESC}${V}${c.C0.ESC}\\`),!0))(P==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:P==='"p'?'P1$r61;1"p':P==="r"?`P1$r${R.scrollTop+1};${R.scrollBottom+1}r`:P==="m"?"P1$r0m":P===" q"?`P1$r${{block:2,underline:4,bar:6}[A.cursorStyle]-(A.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(P,I){this._dirtyRowTracker.markRangeDirty(P,I)}}i.InputHandler=N;let $=class{constructor(j){this._bufferService=j,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(j){j<this.start?this.start=j:j>this.end&&(this.end=j)}markRangeDirty(j,P){j>P&&(z=j,j=P,P=z),j<this.start&&(this.start=j),P>this.end&&(this.end=P)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function F(j){return 0<=j&&j<256}$=a([l(0,w.IBufferService)],$)},844:(s,i)=>{function o(a){for(let l of a)l.dispose();a.length=0}Object.defineProperty(i,"__esModule",{value:!0}),i.getDisposeArrayDisposable=i.disposeArray=i.toDisposable=i.MutableDisposable=i.Disposable=void 0,i.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(let a of this._disposables)a.dispose();this._disposables.length=0}register(a){return this._disposables.push(a),a}unregister(a){let l=this._disposables.indexOf(a);l!==-1&&this._disposables.splice(l,1)}},i.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(a){this._isDisposed||a===this._value||(this._value?.dispose(),this._value=a)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,this._value?.dispose(),this._value=void 0}},i.toDisposable=function(a){return{dispose:a}},i.disposeArray=o,i.getDisposeArrayDisposable=function(a){return{dispose:()=>o(a)}}},1505:(s,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.FourKeyMap=i.TwoKeyMap=void 0;class o{constructor(){this._data={}}set(l,c,h){this._data[l]||(this._data[l]={}),this._data[l][c]=h}get(l,c){return this._data[l]?this._data[l][c]:void 0}clear(){this._data={}}}i.TwoKeyMap=o,i.FourKeyMap=class{constructor(){this._data=new o}set(a,l,c,h,d){this._data.get(a,l)||this._data.set(a,l,new o),this._data.get(a,l).set(c,h,d)}get(a,l,c,h){return this._data.get(a,l)?.get(c,h)}clear(){this._data.clear()}}},6114:(s,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.isChromeOS=i.isLinux=i.isWindows=i.isIphone=i.isIpad=i.isMac=i.getSafariVersion=i.isSafari=i.isLegacyEdge=i.isFirefox=i.isNode=void 0,i.isNode=typeof process<"u"&&"title"in process;let o=i.isNode?"node":navigator.userAgent,a=i.isNode?"node":navigator.platform;i.isFirefox=o.includes("Firefox"),i.isLegacyEdge=o.includes("Edge"),i.isSafari=/^((?!chrome|android).)*safari/i.test(o),i.getSafariVersion=function(){if(!i.isSafari)return 0;let l=o.match(/Version\/(\d+)/);return l===null||l.length<2?0:parseInt(l[1])},i.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(a),i.isIpad=a==="iPad",i.isIphone=a==="iPhone",i.isWindows=["Windows","Win16","Win32","WinCE"].includes(a),i.isLinux=a.indexOf("Linux")>=0,i.isChromeOS=/\bCrOS\b/.test(o)},6106:(s,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.SortedList=void 0;let o=0;i.SortedList=class{constructor(a){this._getKey=a,this._array=[]}clear(){this._array.length=0}insert(a){this._array.length!==0?(o=this._search(this._getKey(a)),this._array.splice(o,0,a)):this._array.push(a)}delete(a){if(this._array.length===0)return!1;let l=this._getKey(a);if(l===void 0||(o=this._search(l),o===-1)||this._getKey(this._array[o])!==l)return!1;do if(this._array[o]===a)return this._array.splice(o,1),!0;while(++o<this._array.length&&this._getKey(this._array[o])===l);return!1}*getKeyIterator(a){if(this._array.length!==0&&(o=this._search(a),!(o<0||o>=this._array.length)&&this._getKey(this._array[o])===a))do yield this._array[o];while(++o<this._array.length&&this._getKey(this._array[o])===a)}forEachByKey(a,l){if(this._array.length!==0&&(o=this._search(a),!(o<0||o>=this._array.length)&&this._getKey(this._array[o])===a))do l(this._array[o]);while(++o<this._array.length&&this._getKey(this._array[o])===a)}values(){return[...this._array].values()}_search(a){let l=0,c=this._array.length-1;for(;c>=l;){let h=l+c>>1,d=this._getKey(this._array[h]);if(d>a)c=h-1;else{if(!(d<a)){for(;h>0&&this._getKey(this._array[h-1])===a;)h--;return h}l=h+1}}return l}}},7226:(s,i,o)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.DebouncedIdleTask=i.IdleTaskQueue=i.PriorityTaskQueue=void 0;let a=o(6114);class l{constructor(){this._tasks=[],this._i=0}enqueue(d){this._tasks.push(d),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(d){this._idleCallback=void 0;let u=0,f=0,p=d.timeRemaining(),m=0;for(;this._i<this._tasks.length;){if(u=Date.now(),this._tasks[this._i]()||this._i++,u=Math.max(1,Date.now()-u),f=Math.max(u,f),m=d.timeRemaining(),1.5*f>m)return p-u<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(p-u))}ms`),void this._start();p=m}this.clear()}}class c extends l{_requestCallback(d){return setTimeout((()=>d(this._createDeadline(16))))}_cancelCallback(d){clearTimeout(d)}_createDeadline(d){let u=Date.now()+d;return{timeRemaining:()=>Math.max(0,u-Date.now())}}}i.PriorityTaskQueue=c,i.IdleTaskQueue=!a.isNode&&"requestIdleCallback"in window?class extends l{_requestCallback(h){return requestIdleCallback(h)}_cancelCallback(h){cancelIdleCallback(h)}}:c,i.DebouncedIdleTask=class{constructor(){this._queue=new i.IdleTaskQueue}set(h){this._queue.clear(),this._queue.enqueue(h)}flush(){this._queue.flush()}}},9282:(s,i,o)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.updateWindowsModeWrappedState=void 0;let a=o(643);i.updateWindowsModeWrappedState=function(l){let c=l.buffer.lines.get(l.buffer.ybase+l.buffer.y-1),h=c?.get(l.cols-1),d=l.buffer.lines.get(l.buffer.ybase+l.buffer.y);d&&h&&(d.isWrapped=h[a.CHAR_DATA_CODE_INDEX]!==a.NULL_CELL_CODE&&h[a.CHAR_DATA_CODE_INDEX]!==a.WHITESPACE_CELL_CODE)}},3734:(s,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ExtendedAttrs=i.AttributeData=void 0;class o{constructor(){this.fg=0,this.bg=0,this.extended=new a}static toColorRGB(c){return[c>>>16&255,c>>>8&255,255&c]}static fromColorRGB(c){return(255&c[0])<<16|(255&c[1])<<8|255&c[2]}clone(){let c=new o;return c.fg=this.fg,c.bg=this.bg,c.extended=this.extended.clone(),c}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}i.AttributeData=o;class a{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(c){this._ext=c}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(c){this._ext&=-469762049,this._ext|=c<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(c){this._ext&=-67108864,this._ext|=67108863&c}get urlId(){return this._urlId}set urlId(c){this._urlId=c}get underlineVariantOffset(){let c=(3758096384&this._ext)>>29;return c<0?4294967288^c:c}set underlineVariantOffset(c){this._ext&=536870911,this._ext|=c<<29&3758096384}constructor(c=0,h=0){this._ext=0,this._urlId=0,this._ext=c,this._urlId=h}clone(){return new a(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}i.ExtendedAttrs=a},9092:(s,i,o)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Buffer=i.MAX_BUFFER_SIZE=void 0;let a=o(6349),l=o(7226),c=o(3734),h=o(8437),d=o(4634),u=o(511),f=o(643),p=o(4863),m=o(7116);i.MAX_BUFFER_SIZE=4294967295,i.Buffer=class{constructor(g,b,v){this._hasScrollback=g,this._optionsService=b,this._bufferService=v,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=h.DEFAULT_ATTR_DATA.clone(),this.savedCharset=m.DEFAULT_CHARSET,this.markers=[],this._nullCell=u.CellData.fromCharData([0,f.NULL_CELL_CHAR,f.NULL_CELL_WIDTH,f.NULL_CELL_CODE]),this._whitespaceCell=u.CellData.fromCharData([0,f.WHITESPACE_CELL_CHAR,f.WHITESPACE_CELL_WIDTH,f.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new l.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new a.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(g){return g?(this._nullCell.fg=g.fg,this._nullCell.bg=g.bg,this._nullCell.extended=g.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new c.ExtendedAttrs),this._nullCell}getWhitespaceCell(g){return g?(this._whitespaceCell.fg=g.fg,this._whitespaceCell.bg=g.bg,this._whitespaceCell.extended=g.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new c.ExtendedAttrs),this._whitespaceCell}getBlankLine(g,b){return new h.BufferLine(this._bufferService.cols,this.getNullCell(g),b)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){let g=this.ybase+this.y-this.ydisp;return g>=0&&g<this._rows}_getCorrectBufferLength(g){if(!this._hasScrollback)return g;let b=g+this._optionsService.rawOptions.scrollback;return b>i.MAX_BUFFER_SIZE?i.MAX_BUFFER_SIZE:b}fillViewportRows(g){if(this.lines.length===0){g===void 0&&(g=h.DEFAULT_ATTR_DATA);let b=this._rows;for(;b--;)this.lines.push(this.getBlankLine(g))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new a.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(g,b){let v=this.getNullCell(h.DEFAULT_ATTR_DATA),w=0,x=this._getCorrectBufferLength(b);if(x>this.lines.maxLength&&(this.lines.maxLength=x),this.lines.length>0){if(this._cols<g)for(let k=0;k<this.lines.length;k++)w+=+this.lines.get(k).resize(g,v);let _=0;if(this._rows<b)for(let k=this._rows;k<b;k++)this.lines.length<b+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new h.BufferLine(g,v)):this.ybase>0&&this.lines.length<=this.ybase+this.y+_+1?(this.ybase--,_++,this.ydisp>0&&this.ydisp--):this.lines.push(new h.BufferLine(g,v)));else for(let k=this._rows;k>b;k--)this.lines.length>b+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(x<this.lines.maxLength){let k=this.lines.length-x;k>0&&(this.lines.trimStart(k),this.ybase=Math.max(this.ybase-k,0),this.ydisp=Math.max(this.ydisp-k,0),this.savedY=Math.max(this.savedY-k,0)),this.lines.maxLength=x}this.x=Math.min(this.x,g-1),this.y=Math.min(this.y,b-1),_&&(this.y+=_),this.savedX=Math.min(this.savedX,g-1),this.scrollTop=0}if(this.scrollBottom=b-1,this._isReflowEnabled&&(this._reflow(g,b),this._cols>g))for(let _=0;_<this.lines.length;_++)w+=+this.lines.get(_).resize(g,v);this._cols=g,this._rows=b,this._memoryCleanupQueue.clear(),w>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let g=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,g=!1);let b=0;for(;this._memoryCleanupPosition<this.lines.length;)if(b+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),b>100)return!0;return g}get _isReflowEnabled(){let g=this._optionsService.rawOptions.windowsPty;return g&&g.buildNumber?this._hasScrollback&&g.backend==="conpty"&&g.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(g,b){this._cols!==g&&(g>this._cols?this._reflowLarger(g,b):this._reflowSmaller(g,b))}_reflowLarger(g,b){let v=(0,d.reflowLargerGetLinesToRemove)(this.lines,this._cols,g,this.ybase+this.y,this.getNullCell(h.DEFAULT_ATTR_DATA));if(v.length>0){let w=(0,d.reflowLargerCreateNewLayout)(this.lines,v);(0,d.reflowLargerApplyNewLayout)(this.lines,w.layout),this._reflowLargerAdjustViewport(g,b,w.countRemoved)}}_reflowLargerAdjustViewport(g,b,v){let w=this.getNullCell(h.DEFAULT_ATTR_DATA),x=v;for(;x-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<b&&this.lines.push(new h.BufferLine(g,w))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-v,0)}_reflowSmaller(g,b){let v=this.getNullCell(h.DEFAULT_ATTR_DATA),w=[],x=0;for(let _=this.lines.length-1;_>=0;_--){let k=this.lines.get(_);if(!k||!k.isWrapped&&k.getTrimmedLength()<=g)continue;let S=[k];for(;k.isWrapped&&_>0;)k=this.lines.get(--_),S.unshift(k);let C=this.ybase+this.y;if(C>=_&&C<_+S.length)continue;let T=S[S.length-1].getTrimmedLength(),E=(0,d.reflowSmallerGetNewLineLengths)(S,this._cols,g),M=E.length-S.length,z;z=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+M):Math.max(0,this.lines.length-this.lines.maxLength+M);let N=[];for(let R=0;R<M;R++){let A=this.getBlankLine(h.DEFAULT_ATTR_DATA,!0);N.push(A)}N.length>0&&(w.push({start:_+S.length+x,newLines:N}),x+=N.length),S.push(...N);let $=E.length-1,F=E[$];F===0&&($--,F=E[$]);let j=S.length-M-1,P=T;for(;j>=0;){let R=Math.min(P,F);if(S[$]===void 0)break;if(S[$].copyCellsFrom(S[j],P-R,F-R,R,!0),F-=R,F===0&&($--,F=E[$]),P-=R,P===0){j--;let A=Math.max(j,0);P=(0,d.getWrappedLineTrimmedLength)(S,A,this._cols)}}for(let R=0;R<S.length;R++)E[R]<g&&S[R].setCell(E[R],v);let I=M-z;for(;I-- >0;)this.ybase===0?this.y<b-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+x)-b&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+M,this.ybase+b-1)}if(w.length>0){let _=[],k=[];for(let $=0;$<this.lines.length;$++)k.push(this.lines.get($));let S=this.lines.length,C=S-1,T=0,E=w[T];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+x);let M=0;for(let $=Math.min(this.lines.maxLength-1,S+x-1);$>=0;$--)if(E&&E.start>C+M){for(let F=E.newLines.length-1;F>=0;F--)this.lines.set($--,E.newLines[F]);$++,_.push({index:C+1,amount:E.newLines.length}),M+=E.newLines.length,E=w[++T]}else this.lines.set($,k[C--]);let z=0;for(let $=_.length-1;$>=0;$--)_[$].index+=z,this.lines.onInsertEmitter.fire(_[$]),z+=_[$].amount;let N=Math.max(0,S+x-this.lines.maxLength);N>0&&this.lines.onTrimEmitter.fire(N)}}translateBufferLineToString(g,b,v=0,w){let x=this.lines.get(g);return x?x.translateToString(b,v,w):""}getWrappedRangeForLine(g){let b=g,v=g;for(;b>0&&this.lines.get(b).isWrapped;)b--;for(;v+1<this.lines.length&&this.lines.get(v+1).isWrapped;)v++;return{first:b,last:v}}setupTabStops(g){for(g!=null?this.tabs[g]||(g=this.prevStop(g)):(this.tabs={},g=0);g<this._cols;g+=this._optionsService.rawOptions.tabStopWidth)this.tabs[g]=!0}prevStop(g){for(g==null&&(g=this.x);!this.tabs[--g]&&g>0;);return g>=this._cols?this._cols-1:g<0?0:g}nextStop(g){for(g==null&&(g=this.x);!this.tabs[++g]&&g<this._cols;);return g>=this._cols?this._cols-1:g<0?0:g}clearMarkers(g){this._isClearing=!0;for(let b=0;b<this.markers.length;b++)this.markers[b].line===g&&(this.markers[b].dispose(),this.markers.splice(b--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let g=0;g<this.markers.length;g++)this.markers[g].dispose(),this.markers.splice(g--,1);this._isClearing=!1}addMarker(g){let b=new p.Marker(g);return this.markers.push(b),b.register(this.lines.onTrim((v=>{b.line-=v,b.line<0&&b.dispose()}))),b.register(this.lines.onInsert((v=>{b.line>=v.index&&(b.line+=v.amount)}))),b.register(this.lines.onDelete((v=>{b.line>=v.index&&b.line<v.index+v.amount&&b.dispose(),b.line>v.index&&(b.line-=v.amount)}))),b.register(b.onDispose((()=>this._removeMarker(b)))),b}_removeMarker(g){this._isClearing||this.markers.splice(this.markers.indexOf(g),1)}}},8437:(s,i,o)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferLine=i.DEFAULT_ATTR_DATA=void 0;let a=o(3734),l=o(511),c=o(643),h=o(482);i.DEFAULT_ATTR_DATA=Object.freeze(new a.AttributeData);let d=0;class u{constructor(p,m,g=!1){this.isWrapped=g,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*p);let b=m||l.CellData.fromCharData([0,c.NULL_CELL_CHAR,c.NULL_CELL_WIDTH,c.NULL_CELL_CODE]);for(let v=0;v<p;++v)this.setCell(v,b);this.length=p}get(p){let m=this._data[3*p+0],g=2097151&m;return[this._data[3*p+1],2097152&m?this._combined[p]:g?(0,h.stringFromCodePoint)(g):"",m>>22,2097152&m?this._combined[p].charCodeAt(this._combined[p].length-1):g]}set(p,m){this._data[3*p+1]=m[c.CHAR_DATA_ATTR_INDEX],m[c.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[p]=m[1],this._data[3*p+0]=2097152|p|m[c.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*p+0]=m[c.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|m[c.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(p){return this._data[3*p+0]>>22}hasWidth(p){return 12582912&this._data[3*p+0]}getFg(p){return this._data[3*p+1]}getBg(p){return this._data[3*p+2]}hasContent(p){return 4194303&this._data[3*p+0]}getCodePoint(p){let m=this._data[3*p+0];return 2097152&m?this._combined[p].charCodeAt(this._combined[p].length-1):2097151&m}isCombined(p){return 2097152&this._data[3*p+0]}getString(p){let m=this._data[3*p+0];return 2097152&m?this._combined[p]:2097151&m?(0,h.stringFromCodePoint)(2097151&m):""}isProtected(p){return 536870912&this._data[3*p+2]}loadCell(p,m){return d=3*p,m.content=this._data[d+0],m.fg=this._data[d+1],m.bg=this._data[d+2],2097152&m.content&&(m.combinedData=this._combined[p]),268435456&m.bg&&(m.extended=this._extendedAttrs[p]),m}setCell(p,m){2097152&m.content&&(this._combined[p]=m.combinedData),268435456&m.bg&&(this._extendedAttrs[p]=m.extended),this._data[3*p+0]=m.content,this._data[3*p+1]=m.fg,this._data[3*p+2]=m.bg}setCellFromCodepoint(p,m,g,b){268435456&b.bg&&(this._extendedAttrs[p]=b.extended),this._data[3*p+0]=m|g<<22,this._data[3*p+1]=b.fg,this._data[3*p+2]=b.bg}addCodepointToCell(p,m,g){let b=this._data[3*p+0];2097152&b?this._combined[p]+=(0,h.stringFromCodePoint)(m):2097151&b?(this._combined[p]=(0,h.stringFromCodePoint)(2097151&b)+(0,h.stringFromCodePoint)(m),b&=-2097152,b|=2097152):b=m|4194304,g&&(b&=-12582913,b|=g<<22),this._data[3*p+0]=b}insertCells(p,m,g){if((p%=this.length)&&this.getWidth(p-1)===2&&this.setCellFromCodepoint(p-1,0,1,g),m<this.length-p){let b=new l.CellData;for(let v=this.length-p-m-1;v>=0;--v)this.setCell(p+m+v,this.loadCell(p+v,b));for(let v=0;v<m;++v)this.setCell(p+v,g)}else for(let b=p;b<this.length;++b)this.setCell(b,g);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,g)}deleteCells(p,m,g){if(p%=this.length,m<this.length-p){let b=new l.CellData;for(let v=0;v<this.length-p-m;++v)this.setCell(p+v,this.loadCell(p+m+v,b));for(let v=this.length-m;v<this.length;++v)this.setCell(v,g)}else for(let b=p;b<this.length;++b)this.setCell(b,g);p&&this.getWidth(p-1)===2&&this.setCellFromCodepoint(p-1,0,1,g),this.getWidth(p)!==0||this.hasContent(p)||this.setCellFromCodepoint(p,0,1,g)}replaceCells(p,m,g,b=!1){if(b)for(p&&this.getWidth(p-1)===2&&!this.isProtected(p-1)&&this.setCellFromCodepoint(p-1,0,1,g),m<this.length&&this.getWidth(m-1)===2&&!this.isProtected(m)&&this.setCellFromCodepoint(m,0,1,g);p<m&&p<this.length;)this.isProtected(p)||this.setCell(p,g),p++;else for(p&&this.getWidth(p-1)===2&&this.setCellFromCodepoint(p-1,0,1,g),m<this.length&&this.getWidth(m-1)===2&&this.setCellFromCodepoint(m,0,1,g);p<m&&p<this.length;)this.setCell(p++,g)}resize(p,m){if(p===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;let g=3*p;if(p>this.length){if(this._data.buffer.byteLength>=4*g)this._data=new Uint32Array(this._data.buffer,0,g);else{let b=new Uint32Array(g);b.set(this._data),this._data=b}for(let b=this.length;b<p;++b)this.setCell(b,m)}else{this._data=this._data.subarray(0,g);let b=Object.keys(this._combined);for(let w=0;w<b.length;w++){let x=parseInt(b[w],10);x>=p&&delete this._combined[x]}let v=Object.keys(this._extendedAttrs);for(let w=0;w<v.length;w++){let x=parseInt(v[w],10);x>=p&&delete this._extendedAttrs[x]}}return this.length=p,4*g*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){let p=new Uint32Array(this._data.length);return p.set(this._data),this._data=p,1}return 0}fill(p,m=!1){if(m)for(let g=0;g<this.length;++g)this.isProtected(g)||this.setCell(g,p);else{this._combined={},this._extendedAttrs={};for(let g=0;g<this.length;++g)this.setCell(g,p)}}copyFrom(p){this.length!==p.length?this._data=new Uint32Array(p._data):this._data.set(p._data),this.length=p.length,this._combined={};for(let m in p._combined)this._combined[m]=p._combined[m];this._extendedAttrs={};for(let m in p._extendedAttrs)this._extendedAttrs[m]=p._extendedAttrs[m];this.isWrapped=p.isWrapped}clone(){let p=new u(0);p._data=new Uint32Array(this._data),p.length=this.length;for(let m in this._combined)p._combined[m]=this._combined[m];for(let m in this._extendedAttrs)p._extendedAttrs[m]=this._extendedAttrs[m];return p.isWrapped=this.isWrapped,p}getTrimmedLength(){for(let p=this.length-1;p>=0;--p)if(4194303&this._data[3*p+0])return p+(this._data[3*p+0]>>22);return 0}getNoBgTrimmedLength(){for(let p=this.length-1;p>=0;--p)if(4194303&this._data[3*p+0]||50331648&this._data[3*p+2])return p+(this._data[3*p+0]>>22);return 0}copyCellsFrom(p,m,g,b,v){let w=p._data;if(v)for(let _=b-1;_>=0;_--){for(let k=0;k<3;k++)this._data[3*(g+_)+k]=w[3*(m+_)+k];268435456&w[3*(m+_)+2]&&(this._extendedAttrs[g+_]=p._extendedAttrs[m+_])}else for(let _=0;_<b;_++){for(let k=0;k<3;k++)this._data[3*(g+_)+k]=w[3*(m+_)+k];268435456&w[3*(m+_)+2]&&(this._extendedAttrs[g+_]=p._extendedAttrs[m+_])}let x=Object.keys(p._combined);for(let _=0;_<x.length;_++){let k=parseInt(x[_],10);k>=m&&(this._combined[k-m+g]=p._combined[k])}}translateToString(p,m,g,b){m=m??0,g=g??this.length,p&&(g=Math.min(g,this.getTrimmedLength())),b&&(b.length=0);let v="";for(;m<g;){let w=this._data[3*m+0],x=2097151&w,_=2097152&w?this._combined[m]:x?(0,h.stringFromCodePoint)(x):c.WHITESPACE_CELL_CHAR;if(v+=_,b)for(let k=0;k<_.length;++k)b.push(m);m+=w>>22||1}return b&&b.push(m),v}}i.BufferLine=u},4841:(s,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.getRangeLength=void 0,i.getRangeLength=function(o,a){if(o.start.y>o.end.y)throw new Error(`Buffer range end (${o.end.x}, ${o.end.y}) cannot be before start (${o.start.x}, ${o.start.y})`);return a*(o.end.y-o.start.y)+(o.end.x-o.start.x+1)}},4634:(s,i)=>{function o(a,l,c){if(l===a.length-1)return a[l].getTrimmedLength();let h=!a[l].hasContent(c-1)&&a[l].getWidth(c-1)===1,d=a[l+1].getWidth(0)===2;return h&&d?c-1:c}Object.defineProperty(i,"__esModule",{value:!0}),i.getWrappedLineTrimmedLength=i.reflowSmallerGetNewLineLengths=i.reflowLargerApplyNewLayout=i.reflowLargerCreateNewLayout=i.reflowLargerGetLinesToRemove=void 0,i.reflowLargerGetLinesToRemove=function(a,l,c,h,d){let u=[];for(let f=0;f<a.length-1;f++){let p=f,m=a.get(++p);if(!m.isWrapped)continue;let g=[a.get(f)];for(;p<a.length&&m.isWrapped;)g.push(m),m=a.get(++p);if(h>=f&&h<p){f+=g.length-1;continue}let b=0,v=o(g,b,l),w=1,x=0;for(;w<g.length;){let k=o(g,w,l),S=k-x,C=c-v,T=Math.min(S,C);g[b].copyCellsFrom(g[w],x,v,T,!1),v+=T,v===c&&(b++,v=0),x+=T,x===k&&(w++,x=0),v===0&&b!==0&&g[b-1].getWidth(c-1)===2&&(g[b].copyCellsFrom(g[b-1],c-1,v++,1,!1),g[b-1].setCell(c-1,d))}g[b].replaceCells(v,c,d);let _=0;for(let k=g.length-1;k>0&&(k>b||g[k].getTrimmedLength()===0);k--)_++;_>0&&(u.push(f+g.length-_),u.push(_)),f+=g.length-1}return u},i.reflowLargerCreateNewLayout=function(a,l){let c=[],h=0,d=l[h],u=0;for(let f=0;f<a.length;f++)if(d===f){let p=l[++h];a.onDeleteEmitter.fire({index:f-u,amount:p}),f+=p-1,u+=p,d=l[++h]}else c.push(f);return{layout:c,countRemoved:u}},i.reflowLargerApplyNewLayout=function(a,l){let c=[];for(let h=0;h<l.length;h++)c.push(a.get(l[h]));for(let h=0;h<c.length;h++)a.set(h,c[h]);a.length=l.length},i.reflowSmallerGetNewLineLengths=function(a,l,c){let h=[],d=a.map(((m,g)=>o(a,g,l))).reduce(((m,g)=>m+g)),u=0,f=0,p=0;for(;p<d;){if(d-p<c){h.push(d-p);break}u+=c;let m=o(a,f,l);u>m&&(u-=m,f++);let g=a[f].getWidth(u-1)===2;g&&u--;let b=g?c-1:c;h.push(b),p+=b}return h},i.getWrappedLineTrimmedLength=o},5295:(s,i,o)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferSet=void 0;let a=o(8460),l=o(844),c=o(9092);class h extends l.Disposable{constructor(u,f){super(),this._optionsService=u,this._bufferService=f,this._onBufferActivate=this.register(new a.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new c.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new c.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(u){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(u),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(u,f){this._normal.resize(u,f),this._alt.resize(u,f),this.setupTabStops(u)}setupTabStops(u){this._normal.setupTabStops(u),this._alt.setupTabStops(u)}}i.BufferSet=h},511:(s,i,o)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CellData=void 0;let a=o(482),l=o(643),c=o(3734);class h extends c.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new c.ExtendedAttrs,this.combinedData=""}static fromCharData(u){let f=new h;return f.setFromCharData(u),f}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,a.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(u){this.fg=u[l.CHAR_DATA_ATTR_INDEX],this.bg=0;let f=!1;if(u[l.CHAR_DATA_CHAR_INDEX].length>2)f=!0;else if(u[l.CHAR_DATA_CHAR_INDEX].length===2){let p=u[l.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=p&&p<=56319){let m=u[l.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=m&&m<=57343?this.content=1024*(p-55296)+m-56320+65536|u[l.CHAR_DATA_WIDTH_INDEX]<<22:f=!0}else f=!0}else this.content=u[l.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|u[l.CHAR_DATA_WIDTH_INDEX]<<22;f&&(this.combinedData=u[l.CHAR_DATA_CHAR_INDEX],this.content=2097152|u[l.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}i.CellData=h},643:(s,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.WHITESPACE_CELL_CODE=i.WHITESPACE_CELL_WIDTH=i.WHITESPACE_CELL_CHAR=i.NULL_CELL_CODE=i.NULL_CELL_WIDTH=i.NULL_CELL_CHAR=i.CHAR_DATA_CODE_INDEX=i.CHAR_DATA_WIDTH_INDEX=i.CHAR_DATA_CHAR_INDEX=i.CHAR_DATA_ATTR_INDEX=i.DEFAULT_EXT=i.DEFAULT_ATTR=i.DEFAULT_COLOR=void 0,i.DEFAULT_COLOR=0,i.DEFAULT_ATTR=256|i.DEFAULT_COLOR<<9,i.DEFAULT_EXT=0,i.CHAR_DATA_ATTR_INDEX=0,i.CHAR_DATA_CHAR_INDEX=1,i.CHAR_DATA_WIDTH_INDEX=2,i.CHAR_DATA_CODE_INDEX=3,i.NULL_CELL_CHAR="",i.NULL_CELL_WIDTH=1,i.NULL_CELL_CODE=0,i.WHITESPACE_CELL_CHAR=" ",i.WHITESPACE_CELL_WIDTH=1,i.WHITESPACE_CELL_CODE=32},4863:(s,i,o)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Marker=void 0;let a=o(8460),l=o(844);class c{get id(){return this._id}constructor(d){this.line=d,this.isDisposed=!1,this._disposables=[],this._id=c._nextId++,this._onDispose=this.register(new a.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,l.disposeArray)(this._disposables),this._disposables.length=0)}register(d){return this._disposables.push(d),d}}i.Marker=c,c._nextId=1},7116:(s,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.DEFAULT_CHARSET=i.CHARSETS=void 0,i.CHARSETS={},i.DEFAULT_CHARSET=i.CHARSETS.B,i.CHARSETS[0]={"`":"\u25C6",a:"\u2592",b:"\u2409",c:"\u240C",d:"\u240D",e:"\u240A",f:"\xB0",g:"\xB1",h:"\u2424",i:"\u240B",j:"\u2518",k:"\u2510",l:"\u250C",m:"\u2514",n:"\u253C",o:"\u23BA",p:"\u23BB",q:"\u2500",r:"\u23BC",s:"\u23BD",t:"\u251C",u:"\u2524",v:"\u2534",w:"\u252C",x:"\u2502",y:"\u2264",z:"\u2265","{":"\u03C0","|":"\u2260","}":"\xA3","~":"\xB7"},i.CHARSETS.A={"#":"\xA3"},i.CHARSETS.B=void 0,i.CHARSETS[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"},i.CHARSETS.C=i.CHARSETS[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},i.CHARSETS.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"},i.CHARSETS.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"},i.CHARSETS.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"},i.CHARSETS.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"},i.CHARSETS.E=i.CHARSETS[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"},i.CHARSETS.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"},i.CHARSETS.H=i.CHARSETS[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},i.CHARSETS["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"}},2584:(s,i)=>{var o,a,l;Object.defineProperty(i,"__esModule",{value:!0}),i.C1_ESCAPED=i.C1=i.C0=void 0,(function(c){c.NUL="\0",c.SOH="",c.STX="",c.ETX="",c.EOT="",c.ENQ="",c.ACK="",c.BEL="\x07",c.BS="\b",c.HT=" ",c.LF=`
|
|
10
10
|
`,c.VT="\v",c.FF="\f",c.CR="\r",c.SO="",c.SI="",c.DLE="",c.DC1="",c.DC2="",c.DC3="",c.DC4="",c.NAK="",c.SYN="",c.ETB="",c.CAN="",c.EM="",c.SUB="",c.ESC="\x1B",c.FS="",c.GS="",c.RS="",c.US="",c.SP=" ",c.DEL="\x7F"})(o||(i.C0=o={})),(function(c){c.PAD="\x80",c.HOP="\x81",c.BPH="\x82",c.NBH="\x83",c.IND="\x84",c.NEL="\x85",c.SSA="\x86",c.ESA="\x87",c.HTS="\x88",c.HTJ="\x89",c.VTS="\x8A",c.PLD="\x8B",c.PLU="\x8C",c.RI="\x8D",c.SS2="\x8E",c.SS3="\x8F",c.DCS="\x90",c.PU1="\x91",c.PU2="\x92",c.STS="\x93",c.CCH="\x94",c.MW="\x95",c.SPA="\x96",c.EPA="\x97",c.SOS="\x98",c.SGCI="\x99",c.SCI="\x9A",c.CSI="\x9B",c.ST="\x9C",c.OSC="\x9D",c.PM="\x9E",c.APC="\x9F"})(a||(i.C1=a={})),(function(c){c.ST=`${o.ESC}\\`})(l||(i.C1_ESCAPED=l={}))},7399:(s,i,o)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.evaluateKeyboardEvent=void 0;let a=o(2584),l={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};i.evaluateKeyboardEvent=function(c,h,d,u){let f={type:0,cancel:!1,key:void 0},p=(c.shiftKey?1:0)|(c.altKey?2:0)|(c.ctrlKey?4:0)|(c.metaKey?8:0);switch(c.keyCode){case 0:c.key==="UIKeyInputUpArrow"?f.key=h?a.C0.ESC+"OA":a.C0.ESC+"[A":c.key==="UIKeyInputLeftArrow"?f.key=h?a.C0.ESC+"OD":a.C0.ESC+"[D":c.key==="UIKeyInputRightArrow"?f.key=h?a.C0.ESC+"OC":a.C0.ESC+"[C":c.key==="UIKeyInputDownArrow"&&(f.key=h?a.C0.ESC+"OB":a.C0.ESC+"[B");break;case 8:f.key=c.ctrlKey?"\b":a.C0.DEL,c.altKey&&(f.key=a.C0.ESC+f.key);break;case 9:if(c.shiftKey){f.key=a.C0.ESC+"[Z";break}f.key=a.C0.HT,f.cancel=!0;break;case 13:f.key=c.altKey?a.C0.ESC+a.C0.CR:a.C0.CR,f.cancel=!0;break;case 27:f.key=a.C0.ESC,c.altKey&&(f.key=a.C0.ESC+a.C0.ESC),f.cancel=!0;break;case 37:if(c.metaKey)break;p?(f.key=a.C0.ESC+"[1;"+(p+1)+"D",f.key===a.C0.ESC+"[1;3D"&&(f.key=a.C0.ESC+(d?"b":"[1;5D"))):f.key=h?a.C0.ESC+"OD":a.C0.ESC+"[D";break;case 39:if(c.metaKey)break;p?(f.key=a.C0.ESC+"[1;"+(p+1)+"C",f.key===a.C0.ESC+"[1;3C"&&(f.key=a.C0.ESC+(d?"f":"[1;5C"))):f.key=h?a.C0.ESC+"OC":a.C0.ESC+"[C";break;case 38:if(c.metaKey)break;p?(f.key=a.C0.ESC+"[1;"+(p+1)+"A",d||f.key!==a.C0.ESC+"[1;3A"||(f.key=a.C0.ESC+"[1;5A")):f.key=h?a.C0.ESC+"OA":a.C0.ESC+"[A";break;case 40:if(c.metaKey)break;p?(f.key=a.C0.ESC+"[1;"+(p+1)+"B",d||f.key!==a.C0.ESC+"[1;3B"||(f.key=a.C0.ESC+"[1;5B")):f.key=h?a.C0.ESC+"OB":a.C0.ESC+"[B";break;case 45:c.shiftKey||c.ctrlKey||(f.key=a.C0.ESC+"[2~");break;case 46:f.key=p?a.C0.ESC+"[3;"+(p+1)+"~":a.C0.ESC+"[3~";break;case 36:f.key=p?a.C0.ESC+"[1;"+(p+1)+"H":h?a.C0.ESC+"OH":a.C0.ESC+"[H";break;case 35:f.key=p?a.C0.ESC+"[1;"+(p+1)+"F":h?a.C0.ESC+"OF":a.C0.ESC+"[F";break;case 33:c.shiftKey?f.type=2:c.ctrlKey?f.key=a.C0.ESC+"[5;"+(p+1)+"~":f.key=a.C0.ESC+"[5~";break;case 34:c.shiftKey?f.type=3:c.ctrlKey?f.key=a.C0.ESC+"[6;"+(p+1)+"~":f.key=a.C0.ESC+"[6~";break;case 112:f.key=p?a.C0.ESC+"[1;"+(p+1)+"P":a.C0.ESC+"OP";break;case 113:f.key=p?a.C0.ESC+"[1;"+(p+1)+"Q":a.C0.ESC+"OQ";break;case 114:f.key=p?a.C0.ESC+"[1;"+(p+1)+"R":a.C0.ESC+"OR";break;case 115:f.key=p?a.C0.ESC+"[1;"+(p+1)+"S":a.C0.ESC+"OS";break;case 116:f.key=p?a.C0.ESC+"[15;"+(p+1)+"~":a.C0.ESC+"[15~";break;case 117:f.key=p?a.C0.ESC+"[17;"+(p+1)+"~":a.C0.ESC+"[17~";break;case 118:f.key=p?a.C0.ESC+"[18;"+(p+1)+"~":a.C0.ESC+"[18~";break;case 119:f.key=p?a.C0.ESC+"[19;"+(p+1)+"~":a.C0.ESC+"[19~";break;case 120:f.key=p?a.C0.ESC+"[20;"+(p+1)+"~":a.C0.ESC+"[20~";break;case 121:f.key=p?a.C0.ESC+"[21;"+(p+1)+"~":a.C0.ESC+"[21~";break;case 122:f.key=p?a.C0.ESC+"[23;"+(p+1)+"~":a.C0.ESC+"[23~";break;case 123:f.key=p?a.C0.ESC+"[24;"+(p+1)+"~":a.C0.ESC+"[24~";break;default:if(!c.ctrlKey||c.shiftKey||c.altKey||c.metaKey)if(d&&!u||!c.altKey||c.metaKey)!d||c.altKey||c.ctrlKey||c.shiftKey||!c.metaKey?c.key&&!c.ctrlKey&&!c.altKey&&!c.metaKey&&c.keyCode>=48&&c.key.length===1?f.key=c.key:c.key&&c.ctrlKey&&(c.key==="_"&&(f.key=a.C0.US),c.key==="@"&&(f.key=a.C0.NUL)):c.keyCode===65&&(f.type=1);else{let m=l[c.keyCode],g=m?.[c.shiftKey?1:0];if(g)f.key=a.C0.ESC+g;else if(c.keyCode>=65&&c.keyCode<=90){let b=c.ctrlKey?c.keyCode-64:c.keyCode+32,v=String.fromCharCode(b);c.shiftKey&&(v=v.toUpperCase()),f.key=a.C0.ESC+v}else if(c.keyCode===32)f.key=a.C0.ESC+(c.ctrlKey?a.C0.NUL:" ");else if(c.key==="Dead"&&c.code.startsWith("Key")){let b=c.code.slice(3,4);c.shiftKey||(b=b.toLowerCase()),f.key=a.C0.ESC+b,f.cancel=!0}}else c.keyCode>=65&&c.keyCode<=90?f.key=String.fromCharCode(c.keyCode-64):c.keyCode===32?f.key=a.C0.NUL:c.keyCode>=51&&c.keyCode<=55?f.key=String.fromCharCode(c.keyCode-51+27):c.keyCode===56?f.key=a.C0.DEL:c.keyCode===219?f.key=a.C0.ESC:c.keyCode===220?f.key=a.C0.FS:c.keyCode===221&&(f.key=a.C0.GS)}return f}},482:(s,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Utf8ToUtf32=i.StringToUtf32=i.utf32ToString=i.stringFromCodePoint=void 0,i.stringFromCodePoint=function(o){return o>65535?(o-=65536,String.fromCharCode(55296+(o>>10))+String.fromCharCode(o%1024+56320)):String.fromCharCode(o)},i.utf32ToString=function(o,a=0,l=o.length){let c="";for(let h=a;h<l;++h){let d=o[h];d>65535?(d-=65536,c+=String.fromCharCode(55296+(d>>10))+String.fromCharCode(d%1024+56320)):c+=String.fromCharCode(d)}return c},i.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(o,a){let l=o.length;if(!l)return 0;let c=0,h=0;if(this._interim){let d=o.charCodeAt(h++);56320<=d&&d<=57343?a[c++]=1024*(this._interim-55296)+d-56320+65536:(a[c++]=this._interim,a[c++]=d),this._interim=0}for(let d=h;d<l;++d){let u=o.charCodeAt(d);if(55296<=u&&u<=56319){if(++d>=l)return this._interim=u,c;let f=o.charCodeAt(d);56320<=f&&f<=57343?a[c++]=1024*(u-55296)+f-56320+65536:(a[c++]=u,a[c++]=f)}else u!==65279&&(a[c++]=u)}return c}},i.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(o,a){let l=o.length;if(!l)return 0;let c,h,d,u,f=0,p=0,m=0;if(this.interim[0]){let v=!1,w=this.interim[0];w&=(224&w)==192?31:(240&w)==224?15:7;let x,_=0;for(;(x=63&this.interim[++_])&&_<4;)w<<=6,w|=x;let k=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,S=k-_;for(;m<S;){if(m>=l)return 0;if(x=o[m++],(192&x)!=128){m--,v=!0;break}this.interim[_++]=x,w<<=6,w|=63&x}v||(k===2?w<128?m--:a[f++]=w:k===3?w<2048||w>=55296&&w<=57343||w===65279||(a[f++]=w):w<65536||w>1114111||(a[f++]=w)),this.interim.fill(0)}let g=l-4,b=m;for(;b<l;){for(;!(!(b<g)||128&(c=o[b])||128&(h=o[b+1])||128&(d=o[b+2])||128&(u=o[b+3]));)a[f++]=c,a[f++]=h,a[f++]=d,a[f++]=u,b+=4;if(c=o[b++],c<128)a[f++]=c;else if((224&c)==192){if(b>=l)return this.interim[0]=c,f;if(h=o[b++],(192&h)!=128){b--;continue}if(p=(31&c)<<6|63&h,p<128){b--;continue}a[f++]=p}else if((240&c)==224){if(b>=l)return this.interim[0]=c,f;if(h=o[b++],(192&h)!=128){b--;continue}if(b>=l)return this.interim[0]=c,this.interim[1]=h,f;if(d=o[b++],(192&d)!=128){b--;continue}if(p=(15&c)<<12|(63&h)<<6|63&d,p<2048||p>=55296&&p<=57343||p===65279)continue;a[f++]=p}else if((248&c)==240){if(b>=l)return this.interim[0]=c,f;if(h=o[b++],(192&h)!=128){b--;continue}if(b>=l)return this.interim[0]=c,this.interim[1]=h,f;if(d=o[b++],(192&d)!=128){b--;continue}if(b>=l)return this.interim[0]=c,this.interim[1]=h,this.interim[2]=d,f;if(u=o[b++],(192&u)!=128){b--;continue}if(p=(7&c)<<18|(63&h)<<12|(63&d)<<6|63&u,p<65536||p>1114111)continue;a[f++]=p}}return f}}},225:(s,i,o)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.UnicodeV6=void 0;let a=o(1480),l=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],c=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],h;i.UnicodeV6=class{constructor(){if(this.version="6",!h){h=new Uint8Array(65536),h.fill(1),h[0]=0,h.fill(0,1,32),h.fill(0,127,160),h.fill(2,4352,4448),h[9001]=2,h[9002]=2,h.fill(2,11904,42192),h[12351]=1,h.fill(2,44032,55204),h.fill(2,63744,64256),h.fill(2,65040,65050),h.fill(2,65072,65136),h.fill(2,65280,65377),h.fill(2,65504,65511);for(let d=0;d<l.length;++d)h.fill(0,l[d][0],l[d][1]+1)}}wcwidth(d){return d<32?0:d<127?1:d<65536?h[d]:(function(u,f){let p,m=0,g=f.length-1;if(u<f[0][0]||u>f[g][1])return!1;for(;g>=m;)if(p=m+g>>1,u>f[p][1])m=p+1;else{if(!(u<f[p][0]))return!0;g=p-1}return!1})(d,c)?0:d>=131072&&d<=196605||d>=196608&&d<=262141?2:1}charProperties(d,u){let f=this.wcwidth(d),p=f===0&&u!==0;if(p){let m=a.UnicodeService.extractWidth(u);m===0?p=!1:m>f&&(f=m)}return a.UnicodeService.createPropertyValue(0,f,p)}}},5981:(s,i,o)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.WriteBuffer=void 0;let a=o(8460),l=o(844);class c extends l.Disposable{constructor(d){super(),this._action=d,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new a.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(d,u){if(u!==void 0&&this._syncCalls>u)return void(this._syncCalls=0);if(this._pendingData+=d.length,this._writeBuffer.push(d),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let f;for(this._isSyncWriting=!0;f=this._writeBuffer.shift();){this._action(f);let p=this._callbacks.shift();p&&p()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(d,u){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=d.length,this._writeBuffer.push(d),this._callbacks.push(u),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=d.length,this._writeBuffer.push(d),this._callbacks.push(u)}_innerWrite(d=0,u=!0){let f=d||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){let p=this._writeBuffer[this._bufferOffset],m=this._action(p,u);if(m){let b=v=>Date.now()-f>=12?setTimeout((()=>this._innerWrite(0,v))):this._innerWrite(f,v);return void m.catch((v=>(queueMicrotask((()=>{throw v})),Promise.resolve(!1)))).then(b)}let g=this._callbacks[this._bufferOffset];if(g&&g(),this._bufferOffset++,this._pendingData-=p.length,Date.now()-f>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}i.WriteBuffer=c},5941:(s,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.toRgbString=i.parseColor=void 0;let o=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,a=/^[\da-f]+$/;function l(c,h){let d=c.toString(16),u=d.length<2?"0"+d:d;switch(h){case 4:return d[0];case 8:return u;case 12:return(u+u).slice(0,3);default:return u+u}}i.parseColor=function(c){if(!c)return;let h=c.toLowerCase();if(h.indexOf("rgb:")===0){h=h.slice(4);let d=o.exec(h);if(d){let u=d[1]?15:d[4]?255:d[7]?4095:65535;return[Math.round(parseInt(d[1]||d[4]||d[7]||d[10],16)/u*255),Math.round(parseInt(d[2]||d[5]||d[8]||d[11],16)/u*255),Math.round(parseInt(d[3]||d[6]||d[9]||d[12],16)/u*255)]}}else if(h.indexOf("#")===0&&(h=h.slice(1),a.exec(h)&&[3,6,9,12].includes(h.length))){let d=h.length/3,u=[0,0,0];for(let f=0;f<3;++f){let p=parseInt(h.slice(d*f,d*f+d),16);u[f]=d===1?p<<4:d===2?p:d===3?p>>4:p>>8}return u}},i.toRgbString=function(c,h=16){let[d,u,f]=c;return`rgb:${l(d,h)}/${l(u,h)}/${l(f,h)}`}},5770:(s,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.PAYLOAD_LIMIT=void 0,i.PAYLOAD_LIMIT=1e7},6351:(s,i,o)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.DcsHandler=i.DcsParser=void 0;let a=o(482),l=o(8742),c=o(5770),h=[];i.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=h,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=h}registerHandler(u,f){this._handlers[u]===void 0&&(this._handlers[u]=[]);let p=this._handlers[u];return p.push(f),{dispose:()=>{let m=p.indexOf(f);m!==-1&&p.splice(m,1)}}}clearHandler(u){this._handlers[u]&&delete this._handlers[u]}setHandlerFallback(u){this._handlerFb=u}reset(){if(this._active.length)for(let u=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;u>=0;--u)this._active[u].unhook(!1);this._stack.paused=!1,this._active=h,this._ident=0}hook(u,f){if(this.reset(),this._ident=u,this._active=this._handlers[u]||h,this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].hook(f);else this._handlerFb(this._ident,"HOOK",f)}put(u,f,p){if(this._active.length)for(let m=this._active.length-1;m>=0;m--)this._active[m].put(u,f,p);else this._handlerFb(this._ident,"PUT",(0,a.utf32ToString)(u,f,p))}unhook(u,f=!0){if(this._active.length){let p=!1,m=this._active.length-1,g=!1;if(this._stack.paused&&(m=this._stack.loopPosition-1,p=f,g=this._stack.fallThrough,this._stack.paused=!1),!g&&p===!1){for(;m>=0&&(p=this._active[m].unhook(u),p!==!0);m--)if(p instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=m,this._stack.fallThrough=!1,p;m--}for(;m>=0;m--)if(p=this._active[m].unhook(!1),p instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=m,this._stack.fallThrough=!0,p}else this._handlerFb(this._ident,"UNHOOK",u);this._active=h,this._ident=0}};let d=new l.Params;d.addParam(0),i.DcsHandler=class{constructor(u){this._handler=u,this._data="",this._params=d,this._hitLimit=!1}hook(u){this._params=u.length>1||u.params[0]?u.clone():d,this._data="",this._hitLimit=!1}put(u,f,p){this._hitLimit||(this._data+=(0,a.utf32ToString)(u,f,p),this._data.length>c.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(u){let f=!1;if(this._hitLimit)f=!1;else if(u&&(f=this._handler(this._data,this._params),f instanceof Promise))return f.then((p=>(this._params=d,this._data="",this._hitLimit=!1,p)));return this._params=d,this._data="",this._hitLimit=!1,f}}},2015:(s,i,o)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.EscapeSequenceParser=i.VT500_TRANSITION_TABLE=i.TransitionTable=void 0;let a=o(844),l=o(8742),c=o(6242),h=o(6351);class d{constructor(m){this.table=new Uint8Array(m)}setDefault(m,g){this.table.fill(m<<4|g)}add(m,g,b,v){this.table[g<<8|m]=b<<4|v}addMany(m,g,b,v){for(let w=0;w<m.length;w++)this.table[g<<8|m[w]]=b<<4|v}}i.TransitionTable=d;let u=160;i.VT500_TRANSITION_TABLE=(function(){let p=new d(4095),m=Array.apply(null,Array(256)).map(((_,k)=>k)),g=(_,k)=>m.slice(_,k),b=g(32,127),v=g(0,24);v.push(25),v.push.apply(v,g(28,32));let w=g(0,14),x;for(x in p.setDefault(1,0),p.addMany(b,0,2,0),w)p.addMany([24,26,153,154],x,3,0),p.addMany(g(128,144),x,3,0),p.addMany(g(144,152),x,3,0),p.add(156,x,0,0),p.add(27,x,11,1),p.add(157,x,4,8),p.addMany([152,158,159],x,0,7),p.add(155,x,11,3),p.add(144,x,11,9);return p.addMany(v,0,3,0),p.addMany(v,1,3,1),p.add(127,1,0,1),p.addMany(v,8,0,8),p.addMany(v,3,3,3),p.add(127,3,0,3),p.addMany(v,4,3,4),p.add(127,4,0,4),p.addMany(v,6,3,6),p.addMany(v,5,3,5),p.add(127,5,0,5),p.addMany(v,2,3,2),p.add(127,2,0,2),p.add(93,1,4,8),p.addMany(b,8,5,8),p.add(127,8,5,8),p.addMany([156,27,24,26,7],8,6,0),p.addMany(g(28,32),8,0,8),p.addMany([88,94,95],1,0,7),p.addMany(b,7,0,7),p.addMany(v,7,0,7),p.add(156,7,0,0),p.add(127,7,0,7),p.add(91,1,11,3),p.addMany(g(64,127),3,7,0),p.addMany(g(48,60),3,8,4),p.addMany([60,61,62,63],3,9,4),p.addMany(g(48,60),4,8,4),p.addMany(g(64,127),4,7,0),p.addMany([60,61,62,63],4,0,6),p.addMany(g(32,64),6,0,6),p.add(127,6,0,6),p.addMany(g(64,127),6,0,0),p.addMany(g(32,48),3,9,5),p.addMany(g(32,48),5,9,5),p.addMany(g(48,64),5,0,6),p.addMany(g(64,127),5,7,0),p.addMany(g(32,48),4,9,5),p.addMany(g(32,48),1,9,2),p.addMany(g(32,48),2,9,2),p.addMany(g(48,127),2,10,0),p.addMany(g(48,80),1,10,0),p.addMany(g(81,88),1,10,0),p.addMany([89,90,92],1,10,0),p.addMany(g(96,127),1,10,0),p.add(80,1,11,9),p.addMany(v,9,0,9),p.add(127,9,0,9),p.addMany(g(28,32),9,0,9),p.addMany(g(32,48),9,9,12),p.addMany(g(48,60),9,8,10),p.addMany([60,61,62,63],9,9,10),p.addMany(v,11,0,11),p.addMany(g(32,128),11,0,11),p.addMany(g(28,32),11,0,11),p.addMany(v,10,0,10),p.add(127,10,0,10),p.addMany(g(28,32),10,0,10),p.addMany(g(48,60),10,8,10),p.addMany([60,61,62,63],10,0,11),p.addMany(g(32,48),10,9,12),p.addMany(v,12,0,12),p.add(127,12,0,12),p.addMany(g(28,32),12,0,12),p.addMany(g(32,48),12,9,12),p.addMany(g(48,64),12,0,11),p.addMany(g(64,127),12,12,13),p.addMany(g(64,127),10,12,13),p.addMany(g(64,127),9,12,13),p.addMany(v,13,13,13),p.addMany(b,13,13,13),p.add(127,13,0,13),p.addMany([27,156,24,26],13,14,0),p.add(u,0,2,0),p.add(u,8,5,8),p.add(u,6,0,6),p.add(u,11,0,11),p.add(u,13,13,13),p})();class f extends a.Disposable{constructor(m=i.VT500_TRANSITION_TABLE){super(),this._transitions=m,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new l.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(g,b,v)=>{},this._executeHandlerFb=g=>{},this._csiHandlerFb=(g,b)=>{},this._escHandlerFb=g=>{},this._errorHandlerFb=g=>g,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,a.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new c.OscParser),this._dcsParser=this.register(new h.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(m,g=[64,126]){let b=0;if(m.prefix){if(m.prefix.length>1)throw new Error("only one byte as prefix supported");if(b=m.prefix.charCodeAt(0),b&&60>b||b>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(m.intermediates){if(m.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let w=0;w<m.intermediates.length;++w){let x=m.intermediates.charCodeAt(w);if(32>x||x>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");b<<=8,b|=x}}if(m.final.length!==1)throw new Error("final must be a single byte");let v=m.final.charCodeAt(0);if(g[0]>v||v>g[1])throw new Error(`final must be in range ${g[0]} .. ${g[1]}`);return b<<=8,b|=v,b}identToString(m){let g=[];for(;m;)g.push(String.fromCharCode(255&m)),m>>=8;return g.reverse().join("")}setPrintHandler(m){this._printHandler=m}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(m,g){let b=this._identifier(m,[48,126]);this._escHandlers[b]===void 0&&(this._escHandlers[b]=[]);let v=this._escHandlers[b];return v.push(g),{dispose:()=>{let w=v.indexOf(g);w!==-1&&v.splice(w,1)}}}clearEscHandler(m){this._escHandlers[this._identifier(m,[48,126])]&&delete this._escHandlers[this._identifier(m,[48,126])]}setEscHandlerFallback(m){this._escHandlerFb=m}setExecuteHandler(m,g){this._executeHandlers[m.charCodeAt(0)]=g}clearExecuteHandler(m){this._executeHandlers[m.charCodeAt(0)]&&delete this._executeHandlers[m.charCodeAt(0)]}setExecuteHandlerFallback(m){this._executeHandlerFb=m}registerCsiHandler(m,g){let b=this._identifier(m);this._csiHandlers[b]===void 0&&(this._csiHandlers[b]=[]);let v=this._csiHandlers[b];return v.push(g),{dispose:()=>{let w=v.indexOf(g);w!==-1&&v.splice(w,1)}}}clearCsiHandler(m){this._csiHandlers[this._identifier(m)]&&delete this._csiHandlers[this._identifier(m)]}setCsiHandlerFallback(m){this._csiHandlerFb=m}registerDcsHandler(m,g){return this._dcsParser.registerHandler(this._identifier(m),g)}clearDcsHandler(m){this._dcsParser.clearHandler(this._identifier(m))}setDcsHandlerFallback(m){this._dcsParser.setHandlerFallback(m)}registerOscHandler(m,g){return this._oscParser.registerHandler(m,g)}clearOscHandler(m){this._oscParser.clearHandler(m)}setOscHandlerFallback(m){this._oscParser.setHandlerFallback(m)}setErrorHandler(m){this._errorHandler=m}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(m,g,b,v,w){this._parseStack.state=m,this._parseStack.handlers=g,this._parseStack.handlerPos=b,this._parseStack.transition=v,this._parseStack.chunkPos=w}parse(m,g,b){let v,w=0,x=0,_=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,_=this._parseStack.chunkPos+1;else{if(b===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");let k=this._parseStack.handlers,S=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(b===!1&&S>-1){for(;S>=0&&(v=k[S](this._params),v!==!0);S--)if(v instanceof Promise)return this._parseStack.handlerPos=S,v}this._parseStack.handlers=[];break;case 4:if(b===!1&&S>-1){for(;S>=0&&(v=k[S](),v!==!0);S--)if(v instanceof Promise)return this._parseStack.handlerPos=S,v}this._parseStack.handlers=[];break;case 6:if(w=m[this._parseStack.chunkPos],v=this._dcsParser.unhook(w!==24&&w!==26,b),v)return v;w===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(w=m[this._parseStack.chunkPos],v=this._oscParser.end(w!==24&&w!==26,b),v)return v;w===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,_=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let k=_;k<g;++k){switch(w=m[k],x=this._transitions.table[this.currentState<<8|(w<160?w:u)],x>>4){case 2:for(let M=k+1;;++M){if(M>=g||(w=m[M])<32||w>126&&w<u){this._printHandler(m,k,M),k=M-1;break}if(++M>=g||(w=m[M])<32||w>126&&w<u){this._printHandler(m,k,M),k=M-1;break}if(++M>=g||(w=m[M])<32||w>126&&w<u){this._printHandler(m,k,M),k=M-1;break}if(++M>=g||(w=m[M])<32||w>126&&w<u){this._printHandler(m,k,M),k=M-1;break}}break;case 3:this._executeHandlers[w]?this._executeHandlers[w]():this._executeHandlerFb(w),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:k,code:w,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:let S=this._csiHandlers[this._collect<<8|w],C=S?S.length-1:-1;for(;C>=0&&(v=S[C](this._params),v!==!0);C--)if(v instanceof Promise)return this._preserveStack(3,S,C,x,k),v;C<0&&this._csiHandlerFb(this._collect<<8|w,this._params),this.precedingJoinState=0;break;case 8:do switch(w){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(w-48)}while(++k<g&&(w=m[k])>47&&w<60);k--;break;case 9:this._collect<<=8,this._collect|=w;break;case 10:let T=this._escHandlers[this._collect<<8|w],E=T?T.length-1:-1;for(;E>=0&&(v=T[E](),v!==!0);E--)if(v instanceof Promise)return this._preserveStack(4,T,E,x,k),v;E<0&&this._escHandlerFb(this._collect<<8|w),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|w,this._params);break;case 13:for(let M=k+1;;++M)if(M>=g||(w=m[M])===24||w===26||w===27||w>127&&w<u){this._dcsParser.put(m,k,M),k=M-1;break}break;case 14:if(v=this._dcsParser.unhook(w!==24&&w!==26),v)return this._preserveStack(6,[],0,x,k),v;w===27&&(x|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let M=k+1;;M++)if(M>=g||(w=m[M])<32||w>127&&w<u){this._oscParser.put(m,k,M),k=M-1;break}break;case 6:if(v=this._oscParser.end(w!==24&&w!==26),v)return this._preserveStack(5,[],0,x,k),v;w===27&&(x|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&x}}}i.EscapeSequenceParser=f},6242:(s,i,o)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.OscHandler=i.OscParser=void 0;let a=o(5770),l=o(482),c=[];i.OscParser=class{constructor(){this._state=0,this._active=c,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(h,d){this._handlers[h]===void 0&&(this._handlers[h]=[]);let u=this._handlers[h];return u.push(d),{dispose:()=>{let f=u.indexOf(d);f!==-1&&u.splice(f,1)}}}clearHandler(h){this._handlers[h]&&delete this._handlers[h]}setHandlerFallback(h){this._handlerFb=h}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=c}reset(){if(this._state===2)for(let h=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;h>=0;--h)this._active[h].end(!1);this._stack.paused=!1,this._active=c,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||c,this._active.length)for(let h=this._active.length-1;h>=0;h--)this._active[h].start();else this._handlerFb(this._id,"START")}_put(h,d,u){if(this._active.length)for(let f=this._active.length-1;f>=0;f--)this._active[f].put(h,d,u);else this._handlerFb(this._id,"PUT",(0,l.utf32ToString)(h,d,u))}start(){this.reset(),this._state=1}put(h,d,u){if(this._state!==3){if(this._state===1)for(;d<u;){let f=h[d++];if(f===59){this._state=2,this._start();break}if(f<48||57<f)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+f-48}this._state===2&&u-d>0&&this._put(h,d,u)}}end(h,d=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let u=!1,f=this._active.length-1,p=!1;if(this._stack.paused&&(f=this._stack.loopPosition-1,u=d,p=this._stack.fallThrough,this._stack.paused=!1),!p&&u===!1){for(;f>=0&&(u=this._active[f].end(h),u!==!0);f--)if(u instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=f,this._stack.fallThrough=!1,u;f--}for(;f>=0;f--)if(u=this._active[f].end(!1),u instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=f,this._stack.fallThrough=!0,u}else this._handlerFb(this._id,"END",h);this._active=c,this._id=-1,this._state=0}}},i.OscHandler=class{constructor(h){this._handler=h,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(h,d,u){this._hitLimit||(this._data+=(0,l.utf32ToString)(h,d,u),this._data.length>a.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(h){let d=!1;if(this._hitLimit)d=!1;else if(h&&(d=this._handler(this._data),d instanceof Promise))return d.then((u=>(this._data="",this._hitLimit=!1,u)));return this._data="",this._hitLimit=!1,d}}},8742:(s,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.Params=void 0;let o=2147483647;class a{static fromArray(c){let h=new a;if(!c.length)return h;for(let d=Array.isArray(c[0])?1:0;d<c.length;++d){let u=c[d];if(Array.isArray(u))for(let f=0;f<u.length;++f)h.addSubParam(u[f]);else h.addParam(u)}return h}constructor(c=32,h=32){if(this.maxLength=c,this.maxSubParamsLength=h,h>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(c),this.length=0,this._subParams=new Int32Array(h),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(c),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){let c=new a(this.maxLength,this.maxSubParamsLength);return c.params.set(this.params),c.length=this.length,c._subParams.set(this._subParams),c._subParamsLength=this._subParamsLength,c._subParamsIdx.set(this._subParamsIdx),c._rejectDigits=this._rejectDigits,c._rejectSubDigits=this._rejectSubDigits,c._digitIsSub=this._digitIsSub,c}toArray(){let c=[];for(let h=0;h<this.length;++h){c.push(this.params[h]);let d=this._subParamsIdx[h]>>8,u=255&this._subParamsIdx[h];u-d>0&&c.push(Array.prototype.slice.call(this._subParams,d,u))}return c}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(c){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(c<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=c>o?o:c}}addSubParam(c){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(c<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=c>o?o:c,this._subParamsIdx[this.length-1]++}}hasSubParams(c){return(255&this._subParamsIdx[c])-(this._subParamsIdx[c]>>8)>0}getSubParams(c){let h=this._subParamsIdx[c]>>8,d=255&this._subParamsIdx[c];return d-h>0?this._subParams.subarray(h,d):null}getSubParamsAll(){let c={};for(let h=0;h<this.length;++h){let d=this._subParamsIdx[h]>>8,u=255&this._subParamsIdx[h];u-d>0&&(c[h]=this._subParams.slice(d,u))}return c}addDigit(c){let h;if(this._rejectDigits||!(h=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;let d=this._digitIsSub?this._subParams:this.params,u=d[h-1];d[h-1]=~u?Math.min(10*u+c,o):c}}i.Params=a},5741:(s,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.AddonManager=void 0,i.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let o=this._addons.length-1;o>=0;o--)this._addons[o].instance.dispose()}loadAddon(o,a){let l={instance:a,dispose:a.dispose,isDisposed:!1};this._addons.push(l),a.dispose=()=>this._wrappedAddonDispose(l),a.activate(o)}_wrappedAddonDispose(o){if(o.isDisposed)return;let a=-1;for(let l=0;l<this._addons.length;l++)if(this._addons[l]===o){a=l;break}if(a===-1)throw new Error("Could not dispose an addon that has not been loaded");o.isDisposed=!0,o.dispose.apply(o.instance),this._addons.splice(a,1)}}},8771:(s,i,o)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferApiView=void 0;let a=o(3785),l=o(511);i.BufferApiView=class{constructor(c,h){this._buffer=c,this.type=h}init(c){return this._buffer=c,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(c){let h=this._buffer.lines.get(c);if(h)return new a.BufferLineApiView(h)}getNullCell(){return new l.CellData}}},3785:(s,i,o)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferLineApiView=void 0;let a=o(511);i.BufferLineApiView=class{constructor(l){this._line=l}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(l,c){if(!(l<0||l>=this._line.length))return c?(this._line.loadCell(l,c),c):this._line.loadCell(l,new a.CellData)}translateToString(l,c,h){return this._line.translateToString(l,c,h)}}},8285:(s,i,o)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.BufferNamespaceApi=void 0;let a=o(8771),l=o(8460),c=o(844);class h extends c.Disposable{constructor(u){super(),this._core=u,this._onBufferChange=this.register(new l.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new a.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new a.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}i.BufferNamespaceApi=h},7975:(s,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ParserApi=void 0,i.ParserApi=class{constructor(o){this._core=o}registerCsiHandler(o,a){return this._core.registerCsiHandler(o,(l=>a(l.toArray())))}addCsiHandler(o,a){return this.registerCsiHandler(o,a)}registerDcsHandler(o,a){return this._core.registerDcsHandler(o,((l,c)=>a(l,c.toArray())))}addDcsHandler(o,a){return this.registerDcsHandler(o,a)}registerEscHandler(o,a){return this._core.registerEscHandler(o,a)}addEscHandler(o,a){return this.registerEscHandler(o,a)}registerOscHandler(o,a){return this._core.registerOscHandler(o,a)}addOscHandler(o,a){return this.registerOscHandler(o,a)}}},7090:(s,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.UnicodeApi=void 0,i.UnicodeApi=class{constructor(o){this._core=o}register(o){this._core.unicodeService.register(o)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(o){this._core.unicodeService.activeVersion=o}}},744:function(s,i,o){var a=this&&this.__decorate||function(p,m,g,b){var v,w=arguments.length,x=w<3?m:b===null?b=Object.getOwnPropertyDescriptor(m,g):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(p,m,g,b);else for(var _=p.length-1;_>=0;_--)(v=p[_])&&(x=(w<3?v(x):w>3?v(m,g,x):v(m,g))||x);return w>3&&x&&Object.defineProperty(m,g,x),x},l=this&&this.__param||function(p,m){return function(g,b){m(g,b,p)}};Object.defineProperty(i,"__esModule",{value:!0}),i.BufferService=i.MINIMUM_ROWS=i.MINIMUM_COLS=void 0;let c=o(8460),h=o(844),d=o(5295),u=o(2585);i.MINIMUM_COLS=2,i.MINIMUM_ROWS=1;let f=i.BufferService=class extends h.Disposable{get buffer(){return this.buffers.active}constructor(p){super(),this.isUserScrolling=!1,this._onResize=this.register(new c.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new c.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(p.rawOptions.cols||0,i.MINIMUM_COLS),this.rows=Math.max(p.rawOptions.rows||0,i.MINIMUM_ROWS),this.buffers=this.register(new d.BufferSet(p,this))}resize(p,m){this.cols=p,this.rows=m,this.buffers.resize(p,m),this._onResize.fire({cols:p,rows:m})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(p,m=!1){let g=this.buffer,b;b=this._cachedBlankLine,b&&b.length===this.cols&&b.getFg(0)===p.fg&&b.getBg(0)===p.bg||(b=g.getBlankLine(p,m),this._cachedBlankLine=b),b.isWrapped=m;let v=g.ybase+g.scrollTop,w=g.ybase+g.scrollBottom;if(g.scrollTop===0){let x=g.lines.isFull;w===g.lines.length-1?x?g.lines.recycle().copyFrom(b):g.lines.push(b.clone()):g.lines.splice(w+1,0,b.clone()),x?this.isUserScrolling&&(g.ydisp=Math.max(g.ydisp-1,0)):(g.ybase++,this.isUserScrolling||g.ydisp++)}else{let x=w-v+1;g.lines.shiftElements(v+1,x-1,-1),g.lines.set(w,b.clone())}this.isUserScrolling||(g.ydisp=g.ybase),this._onScroll.fire(g.ydisp)}scrollLines(p,m,g){let b=this.buffer;if(p<0){if(b.ydisp===0)return;this.isUserScrolling=!0}else p+b.ydisp>=b.ybase&&(this.isUserScrolling=!1);let v=b.ydisp;b.ydisp=Math.max(Math.min(b.ydisp+p,b.ybase),0),v!==b.ydisp&&(m||this._onScroll.fire(b.ydisp))}};i.BufferService=f=a([l(0,u.IOptionsService)],f)},7994:(s,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.CharsetService=void 0,i.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(o){this.glevel=o,this.charset=this._charsets[o]}setgCharset(o,a){this._charsets[o]=a,this.glevel===o&&(this.charset=a)}}},1753:function(s,i,o){var a=this&&this.__decorate||function(b,v,w,x){var _,k=arguments.length,S=k<3?v:x===null?x=Object.getOwnPropertyDescriptor(v,w):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(b,v,w,x);else for(var C=b.length-1;C>=0;C--)(_=b[C])&&(S=(k<3?_(S):k>3?_(v,w,S):_(v,w))||S);return k>3&&S&&Object.defineProperty(v,w,S),S},l=this&&this.__param||function(b,v){return function(w,x){v(w,x,b)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CoreMouseService=void 0;let c=o(2585),h=o(8460),d=o(844),u={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:b=>b.button!==4&&b.action===1&&(b.ctrl=!1,b.alt=!1,b.shift=!1,!0)},VT200:{events:19,restrict:b=>b.action!==32},DRAG:{events:23,restrict:b=>b.action!==32||b.button!==3},ANY:{events:31,restrict:b=>!0}};function f(b,v){let w=(b.ctrl?16:0)|(b.shift?4:0)|(b.alt?8:0);return b.button===4?(w|=64,w|=b.action):(w|=3&b.button,4&b.button&&(w|=64),8&b.button&&(w|=128),b.action===32?w|=32:b.action!==0||v||(w|=3)),w}let p=String.fromCharCode,m={DEFAULT:b=>{let v=[f(b,!1)+32,b.col+32,b.row+32];return v[0]>255||v[1]>255||v[2]>255?"":`\x1B[M${p(v[0])}${p(v[1])}${p(v[2])}`},SGR:b=>{let v=b.action===0&&b.button!==4?"m":"M";return`\x1B[<${f(b,!0)};${b.col};${b.row}${v}`},SGR_PIXELS:b=>{let v=b.action===0&&b.button!==4?"m":"M";return`\x1B[<${f(b,!0)};${b.x};${b.y}${v}`}},g=i.CoreMouseService=class extends d.Disposable{constructor(b,v){super(),this._bufferService=b,this._coreService=v,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new h.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(let w of Object.keys(u))this.addProtocol(w,u[w]);for(let w of Object.keys(m))this.addEncoding(w,m[w]);this.reset()}addProtocol(b,v){this._protocols[b]=v}addEncoding(b,v){this._encodings[b]=v}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(b){if(!this._protocols[b])throw new Error(`unknown protocol "${b}"`);this._activeProtocol=b,this._onProtocolChange.fire(this._protocols[b].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(b){if(!this._encodings[b])throw new Error(`unknown encoding "${b}"`);this._activeEncoding=b}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(b){if(b.col<0||b.col>=this._bufferService.cols||b.row<0||b.row>=this._bufferService.rows||b.button===4&&b.action===32||b.button===3&&b.action!==32||b.button!==4&&(b.action===2||b.action===3)||(b.col++,b.row++,b.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,b,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(b))return!1;let v=this._encodings[this._activeEncoding](b);return v&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(v):this._coreService.triggerDataEvent(v,!0)),this._lastEvent=b,!0}explainEvents(b){return{down:!!(1&b),up:!!(2&b),drag:!!(4&b),move:!!(8&b),wheel:!!(16&b)}}_equalEvents(b,v,w){if(w){if(b.x!==v.x||b.y!==v.y)return!1}else if(b.col!==v.col||b.row!==v.row)return!1;return b.button===v.button&&b.action===v.action&&b.ctrl===v.ctrl&&b.alt===v.alt&&b.shift===v.shift}};i.CoreMouseService=g=a([l(0,c.IBufferService),l(1,c.ICoreService)],g)},6975:function(s,i,o){var a=this&&this.__decorate||function(g,b,v,w){var x,_=arguments.length,k=_<3?b:w===null?w=Object.getOwnPropertyDescriptor(b,v):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(g,b,v,w);else for(var S=g.length-1;S>=0;S--)(x=g[S])&&(k=(_<3?x(k):_>3?x(b,v,k):x(b,v))||k);return _>3&&k&&Object.defineProperty(b,v,k),k},l=this&&this.__param||function(g,b){return function(v,w){b(v,w,g)}};Object.defineProperty(i,"__esModule",{value:!0}),i.CoreService=void 0;let c=o(1439),h=o(8460),d=o(844),u=o(2585),f=Object.freeze({insertMode:!1}),p=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),m=i.CoreService=class extends d.Disposable{constructor(g,b,v){super(),this._bufferService=g,this._logService=b,this._optionsService=v,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new h.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new h.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new h.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new h.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,c.clone)(f),this.decPrivateModes=(0,c.clone)(p)}reset(){this.modes=(0,c.clone)(f),this.decPrivateModes=(0,c.clone)(p)}triggerDataEvent(g,b=!1){if(this._optionsService.rawOptions.disableStdin)return;let v=this._bufferService.buffer;b&&this._optionsService.rawOptions.scrollOnUserInput&&v.ybase!==v.ydisp&&this._onRequestScrollToBottom.fire(),b&&this._onUserInput.fire(),this._logService.debug(`sending data "${g}"`,(()=>g.split("").map((w=>w.charCodeAt(0))))),this._onData.fire(g)}triggerBinaryEvent(g){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${g}"`,(()=>g.split("").map((b=>b.charCodeAt(0))))),this._onBinary.fire(g))}};i.CoreService=m=a([l(0,u.IBufferService),l(1,u.ILogService),l(2,u.IOptionsService)],m)},9074:(s,i,o)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.DecorationService=void 0;let a=o(8055),l=o(8460),c=o(844),h=o(6106),d=0,u=0;class f extends c.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new h.SortedList((g=>g?.marker.line)),this._onDecorationRegistered=this.register(new l.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new l.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,c.toDisposable)((()=>this.reset())))}registerDecoration(g){if(g.marker.isDisposed)return;let b=new p(g);if(b){let v=b.marker.onDispose((()=>b.dispose()));b.onDispose((()=>{b&&(this._decorations.delete(b)&&this._onDecorationRemoved.fire(b),v.dispose())})),this._decorations.insert(b),this._onDecorationRegistered.fire(b)}return b}reset(){for(let g of this._decorations.values())g.dispose();this._decorations.clear()}*getDecorationsAtCell(g,b,v){let w=0,x=0;for(let _ of this._decorations.getKeyIterator(b))w=_.options.x??0,x=w+(_.options.width??1),g>=w&&g<x&&(!v||(_.options.layer??"bottom")===v)&&(yield _)}forEachDecorationAtCell(g,b,v,w){this._decorations.forEachByKey(b,(x=>{d=x.options.x??0,u=d+(x.options.width??1),g>=d&&g<u&&(!v||(x.options.layer??"bottom")===v)&&w(x)}))}}i.DecorationService=f;class p extends c.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=a.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=a.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(g){super(),this.options=g,this.onRenderEmitter=this.register(new l.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new l.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=g.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(s,i,o)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.InstantiationService=i.ServiceCollection=void 0;let a=o(2585),l=o(8343);class c{constructor(...d){this._entries=new Map;for(let[u,f]of d)this.set(u,f)}set(d,u){let f=this._entries.get(d);return this._entries.set(d,u),f}forEach(d){for(let[u,f]of this._entries.entries())d(u,f)}has(d){return this._entries.has(d)}get(d){return this._entries.get(d)}}i.ServiceCollection=c,i.InstantiationService=class{constructor(){this._services=new c,this._services.set(a.IInstantiationService,this)}setService(h,d){this._services.set(h,d)}getService(h){return this._services.get(h)}createInstance(h,...d){let u=(0,l.getServiceDependencies)(h).sort(((m,g)=>m.index-g.index)),f=[];for(let m of u){let g=this._services.get(m.id);if(!g)throw new Error(`[createInstance] ${h.name} depends on UNKNOWN service ${m.id}.`);f.push(g)}let p=u.length>0?u[0].index:d.length;if(d.length!==p)throw new Error(`[createInstance] First service dependency of ${h.name} at position ${p+1} conflicts with ${d.length} static arguments`);return new h(...d,...f)}}},7866:function(s,i,o){var a=this&&this.__decorate||function(p,m,g,b){var v,w=arguments.length,x=w<3?m:b===null?b=Object.getOwnPropertyDescriptor(m,g):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(p,m,g,b);else for(var _=p.length-1;_>=0;_--)(v=p[_])&&(x=(w<3?v(x):w>3?v(m,g,x):v(m,g))||x);return w>3&&x&&Object.defineProperty(m,g,x),x},l=this&&this.__param||function(p,m){return function(g,b){m(g,b,p)}};Object.defineProperty(i,"__esModule",{value:!0}),i.traceCall=i.setTraceLogger=i.LogService=void 0;let c=o(844),h=o(2585),d={trace:h.LogLevelEnum.TRACE,debug:h.LogLevelEnum.DEBUG,info:h.LogLevelEnum.INFO,warn:h.LogLevelEnum.WARN,error:h.LogLevelEnum.ERROR,off:h.LogLevelEnum.OFF},u,f=i.LogService=class extends c.Disposable{get logLevel(){return this._logLevel}constructor(p){super(),this._optionsService=p,this._logLevel=h.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),u=this}_updateLogLevel(){this._logLevel=d[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(p){for(let m=0;m<p.length;m++)typeof p[m]=="function"&&(p[m]=p[m]())}_log(p,m,g){this._evalLazyOptionalParams(g),p.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+m,...g)}trace(p,...m){this._logLevel<=h.LogLevelEnum.TRACE&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,p,m)}debug(p,...m){this._logLevel<=h.LogLevelEnum.DEBUG&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,p,m)}info(p,...m){this._logLevel<=h.LogLevelEnum.INFO&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,p,m)}warn(p,...m){this._logLevel<=h.LogLevelEnum.WARN&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,p,m)}error(p,...m){this._logLevel<=h.LogLevelEnum.ERROR&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,p,m)}};i.LogService=f=a([l(0,h.IOptionsService)],f),i.setTraceLogger=function(p){u=p},i.traceCall=function(p,m,g){if(typeof g.value!="function")throw new Error("not supported");let b=g.value;g.value=function(...v){if(u.logLevel!==h.LogLevelEnum.TRACE)return b.apply(this,v);u.trace(`GlyphRenderer#${b.name}(${v.map((x=>JSON.stringify(x))).join(", ")})`);let w=b.apply(this,v);return u.trace(`GlyphRenderer#${b.name} return`,w),w}}},7302:(s,i,o)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.OptionsService=i.DEFAULT_OPTIONS=void 0;let a=o(8460),l=o(844),c=o(6114);i.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:c.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};let h=["normal","bold","100","200","300","400","500","600","700","800","900"];class d extends l.Disposable{constructor(f){super(),this._onOptionChange=this.register(new a.EventEmitter),this.onOptionChange=this._onOptionChange.event;let p={...i.DEFAULT_OPTIONS};for(let m in f)if(m in p)try{let g=f[m];p[m]=this._sanitizeAndValidateOption(m,g)}catch(g){console.error(g)}this.rawOptions=p,this.options={...p},this._setupOptions(),this.register((0,l.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(f,p){return this.onOptionChange((m=>{m===f&&p(this.rawOptions[f])}))}onMultipleOptionChange(f,p){return this.onOptionChange((m=>{f.indexOf(m)!==-1&&p()}))}_setupOptions(){let f=m=>{if(!(m in i.DEFAULT_OPTIONS))throw new Error(`No option with key "${m}"`);return this.rawOptions[m]},p=(m,g)=>{if(!(m in i.DEFAULT_OPTIONS))throw new Error(`No option with key "${m}"`);g=this._sanitizeAndValidateOption(m,g),this.rawOptions[m]!==g&&(this.rawOptions[m]=g,this._onOptionChange.fire(m))};for(let m in this.rawOptions){let g={get:f.bind(this,m),set:p.bind(this,m)};Object.defineProperty(this.options,m,g)}}_sanitizeAndValidateOption(f,p){switch(f){case"cursorStyle":if(p||(p=i.DEFAULT_OPTIONS[f]),!(function(m){return m==="block"||m==="underline"||m==="bar"})(p))throw new Error(`"${p}" is not a valid value for ${f}`);break;case"wordSeparator":p||(p=i.DEFAULT_OPTIONS[f]);break;case"fontWeight":case"fontWeightBold":if(typeof p=="number"&&1<=p&&p<=1e3)break;p=h.includes(p)?p:i.DEFAULT_OPTIONS[f];break;case"cursorWidth":p=Math.floor(p);case"lineHeight":case"tabStopWidth":if(p<1)throw new Error(`${f} cannot be less than 1, value: ${p}`);break;case"minimumContrastRatio":p=Math.max(1,Math.min(21,Math.round(10*p)/10));break;case"scrollback":if((p=Math.min(p,4294967295))<0)throw new Error(`${f} cannot be less than 0, value: ${p}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(p<=0)throw new Error(`${f} cannot be less than or equal to 0, value: ${p}`);break;case"rows":case"cols":if(!p&&p!==0)throw new Error(`${f} must be numeric, value: ${p}`);break;case"windowsPty":p=p??{}}return p}}i.OptionsService=d},2660:function(s,i,o){var a=this&&this.__decorate||function(d,u,f,p){var m,g=arguments.length,b=g<3?u:p===null?p=Object.getOwnPropertyDescriptor(u,f):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(d,u,f,p);else for(var v=d.length-1;v>=0;v--)(m=d[v])&&(b=(g<3?m(b):g>3?m(u,f,b):m(u,f))||b);return g>3&&b&&Object.defineProperty(u,f,b),b},l=this&&this.__param||function(d,u){return function(f,p){u(f,p,d)}};Object.defineProperty(i,"__esModule",{value:!0}),i.OscLinkService=void 0;let c=o(2585),h=i.OscLinkService=class{constructor(d){this._bufferService=d,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(d){let u=this._bufferService.buffer;if(d.id===void 0){let v=u.addMarker(u.ybase+u.y),w={data:d,id:this._nextId++,lines:[v]};return v.onDispose((()=>this._removeMarkerFromLink(w,v))),this._dataByLinkId.set(w.id,w),w.id}let f=d,p=this._getEntryIdKey(f),m=this._entriesWithId.get(p);if(m)return this.addLineToLink(m.id,u.ybase+u.y),m.id;let g=u.addMarker(u.ybase+u.y),b={id:this._nextId++,key:this._getEntryIdKey(f),data:f,lines:[g]};return g.onDispose((()=>this._removeMarkerFromLink(b,g))),this._entriesWithId.set(b.key,b),this._dataByLinkId.set(b.id,b),b.id}addLineToLink(d,u){let f=this._dataByLinkId.get(d);if(f&&f.lines.every((p=>p.line!==u))){let p=this._bufferService.buffer.addMarker(u);f.lines.push(p),p.onDispose((()=>this._removeMarkerFromLink(f,p)))}}getLinkData(d){return this._dataByLinkId.get(d)?.data}_getEntryIdKey(d){return`${d.id};;${d.uri}`}_removeMarkerFromLink(d,u){let f=d.lines.indexOf(u);f!==-1&&(d.lines.splice(f,1),d.lines.length===0&&(d.data.id!==void 0&&this._entriesWithId.delete(d.key),this._dataByLinkId.delete(d.id)))}};i.OscLinkService=h=a([l(0,c.IBufferService)],h)},8343:(s,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.createDecorator=i.getServiceDependencies=i.serviceRegistry=void 0;let o="di$target",a="di$dependencies";i.serviceRegistry=new Map,i.getServiceDependencies=function(l){return l[a]||[]},i.createDecorator=function(l){if(i.serviceRegistry.has(l))return i.serviceRegistry.get(l);let c=function(h,d,u){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(f,p,m){p[o]===p?p[a].push({id:f,index:m}):(p[a]=[{id:f,index:m}],p[o]=p)})(c,h,u)};return c.toString=()=>l,i.serviceRegistry.set(l,c),c}},2585:(s,i,o)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.IDecorationService=i.IUnicodeService=i.IOscLinkService=i.IOptionsService=i.ILogService=i.LogLevelEnum=i.IInstantiationService=i.ICharsetService=i.ICoreService=i.ICoreMouseService=i.IBufferService=void 0;let a=o(8343);var l;i.IBufferService=(0,a.createDecorator)("BufferService"),i.ICoreMouseService=(0,a.createDecorator)("CoreMouseService"),i.ICoreService=(0,a.createDecorator)("CoreService"),i.ICharsetService=(0,a.createDecorator)("CharsetService"),i.IInstantiationService=(0,a.createDecorator)("InstantiationService"),(function(c){c[c.TRACE=0]="TRACE",c[c.DEBUG=1]="DEBUG",c[c.INFO=2]="INFO",c[c.WARN=3]="WARN",c[c.ERROR=4]="ERROR",c[c.OFF=5]="OFF"})(l||(i.LogLevelEnum=l={})),i.ILogService=(0,a.createDecorator)("LogService"),i.IOptionsService=(0,a.createDecorator)("OptionsService"),i.IOscLinkService=(0,a.createDecorator)("OscLinkService"),i.IUnicodeService=(0,a.createDecorator)("UnicodeService"),i.IDecorationService=(0,a.createDecorator)("DecorationService")},1480:(s,i,o)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.UnicodeService=void 0;let a=o(8460),l=o(225);class c{static extractShouldJoin(d){return(1&d)!=0}static extractWidth(d){return d>>1&3}static extractCharKind(d){return d>>3}static createPropertyValue(d,u,f=!1){return(16777215&d)<<3|(3&u)<<1|(f?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new a.EventEmitter,this.onChange=this._onChange.event;let d=new l.UnicodeV6;this.register(d),this._active=d.version,this._activeProvider=d}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(d){if(!this._providers[d])throw new Error(`unknown Unicode version "${d}"`);this._active=d,this._activeProvider=this._providers[d],this._onChange.fire(d)}register(d){this._providers[d.version]=d}wcwidth(d){return this._activeProvider.wcwidth(d)}getStringCellWidth(d){let u=0,f=0,p=d.length;for(let m=0;m<p;++m){let g=d.charCodeAt(m);if(55296<=g&&g<=56319){if(++m>=p)return u+this.wcwidth(g);let w=d.charCodeAt(m);56320<=w&&w<=57343?g=1024*(g-55296)+w-56320+65536:u+=this.wcwidth(w)}let b=this.charProperties(g,f),v=c.extractWidth(b);c.extractShouldJoin(b)&&(v-=c.extractWidth(f)),u+=v,f=b}return u}charProperties(d,u){return this._activeProvider.charProperties(d,u)}}i.UnicodeService=c}},e={};function n(s){var i=e[s];if(i!==void 0)return i.exports;var o=e[s]={exports:{}};return t[s].call(o.exports,o,o.exports,n),o.exports}var r={};return(()=>{var s=r;Object.defineProperty(s,"__esModule",{value:!0}),s.Terminal=void 0;let i=n(9042),o=n(3236),a=n(844),l=n(5741),c=n(8285),h=n(7975),d=n(7090),u=["cols","rows"];class f extends a.Disposable{constructor(m){super(),this._core=this.register(new o.Terminal(m)),this._addonManager=this.register(new l.AddonManager),this._publicOptions={...this._core.options};let g=v=>this._core.options[v],b=(v,w)=>{this._checkReadonlyOptions(v),this._core.options[v]=w};for(let v in this._core.options){let w={get:g.bind(this,v),set:b.bind(this,v)};Object.defineProperty(this._publicOptions,v,w)}}_checkReadonlyOptions(m){if(u.includes(m))throw new Error(`Option "${m}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new h.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new d.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new c.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){let m=this._core.coreService.decPrivateModes,g="none";switch(this._core.coreMouseService.activeProtocol){case"X10":g="x10";break;case"VT200":g="vt200";break;case"DRAG":g="drag";break;case"ANY":g="any"}return{applicationCursorKeysMode:m.applicationCursorKeys,applicationKeypadMode:m.applicationKeypad,bracketedPasteMode:m.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:g,originMode:m.origin,reverseWraparoundMode:m.reverseWraparound,sendFocusMode:m.sendFocus,wraparoundMode:m.wraparound}}get options(){return this._publicOptions}set options(m){for(let g in m)this._publicOptions[g]=m[g]}blur(){this._core.blur()}focus(){this._core.focus()}input(m,g=!0){this._core.input(m,g)}resize(m,g){this._verifyIntegers(m,g),this._core.resize(m,g)}open(m){this._core.open(m)}attachCustomKeyEventHandler(m){this._core.attachCustomKeyEventHandler(m)}attachCustomWheelEventHandler(m){this._core.attachCustomWheelEventHandler(m)}registerLinkProvider(m){return this._core.registerLinkProvider(m)}registerCharacterJoiner(m){return this._checkProposedApi(),this._core.registerCharacterJoiner(m)}deregisterCharacterJoiner(m){this._checkProposedApi(),this._core.deregisterCharacterJoiner(m)}registerMarker(m=0){return this._verifyIntegers(m),this._core.registerMarker(m)}registerDecoration(m){return this._checkProposedApi(),this._verifyPositiveIntegers(m.x??0,m.width??0,m.height??0),this._core.registerDecoration(m)}hasSelection(){return this._core.hasSelection()}select(m,g,b){this._verifyIntegers(m,g,b),this._core.select(m,g,b)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(m,g){this._verifyIntegers(m,g),this._core.selectLines(m,g)}dispose(){super.dispose()}scrollLines(m){this._verifyIntegers(m),this._core.scrollLines(m)}scrollPages(m){this._verifyIntegers(m),this._core.scrollPages(m)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(m){this._verifyIntegers(m),this._core.scrollToLine(m)}clear(){this._core.clear()}write(m,g){this._core.write(m,g)}writeln(m,g){this._core.write(m),this._core.write(`\r
|
|
11
|
-
`,g)}paste(m){this._core.paste(m)}refresh(m,g){this._verifyIntegers(m,g),this._core.refresh(m,g)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(m){this._addonManager.loadAddon(this,m)}static get strings(){return i}_verifyIntegers(...m){for(let g of m)if(g===1/0||isNaN(g)||g%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...m){for(let g of m)if(g&&(g===1/0||isNaN(g)||g%1!=0||g<0))throw new Error("This API only accepts positive integers")}}s.Terminal=f})(),r})()))});var g6={};du(g6,{apply:()=>qH,inject:()=>UH});module.exports=CA(g6);var mv=require("react");var fv={"local-transfer.uploadAction":{zh:"\u4ECE\u672C\u673A\u4E0A\u4F20\u6587\u4EF6",en:"Upload files from this computer"},"local-transfer.uploading":{zh:"\u4E0A\u4F20\u4E2D",en:"Uploading"},"local-transfer.allowUpload":{zh:"\u5141\u8BB8 Agent \u672C\u5730\u4E0A\u4F20",en:"Allow agent local uploads"},"local-transfer.allowDownload":{zh:"\u5141\u8BB8 Agent \u672C\u5730\u4E0B\u8F7D",en:"Allow agent local downloads"},"local-transfer.uploadScope":{zh:"\u4ECE DSH \u4F1A\u8BDD\u76EE\u5F55\u4E0A\u4F20\u5230\u5DF2\u6388\u6743\u8FDE\u63A5\uFF1B\u9700\u540C\u65F6\u5F00\u542F\u5141\u8BB8\u4F20\u8F93\uFF0C\u4E0D\u4EE3\u8868\u8BBF\u95EE\u6D4F\u89C8\u5668\u7535\u8111\u3002",en:"Upload from the DSH session directory to authorized connections. Requires transfer permission; does not grant access to the browser computer."},"local-transfer.downloadScope":{zh:"\u4ECE\u5DF2\u6388\u6743\u8FDE\u63A5\u4E0B\u8F7D\u5230 DSH \u4F1A\u8BDD\u76EE\u5F55\uFF1B\u9700\u540C\u65F6\u5F00\u542F\u5141\u8BB8\u4F20\u8F93\uFF0C\u4E0D\u4EE3\u8868\u8BBF\u95EE\u6D4F\u89C8\u5668\u7535\u8111\u3002",en:"Download from authorized connections to the DSH session directory. Requires transfer permission; does not grant access to the browser computer."},"browser-transfer.title":{zh:"\u672C\u5730\u4E0A\u4F20\u4E0E\u4E0B\u8F7D",en:"Local uploads and downloads"},"browser-transfer.preparing":{zh:"\u51C6\u5907\u4F20\u8F93\u2026",en:"Preparing transfer\u2026"},"browser-transfer.waiting":{zh:"\u5DF2\u53D1\u9001\uFF0C\u7B49\u5F85\u8FDC\u7AEF\u4FDD\u5B58\u5B8C\u6210\u2026",en:"Sent; waiting for remote save\u2026"},"browser-transfer.unavailable":{zh:"\u5DF2\u53D1\u8D77\u4E0B\u8F7D\uFF0C\u5F53\u524D\u73AF\u5883\u65E0\u6CD5\u786E\u8BA4\u8FDB\u5EA6\u6216\u4FDD\u5B58\u7ED3\u679C\uFF1B\u65E0\u54CD\u5E94\u65F6\u8BF7\u5728\u6D4F\u89C8\u5668\u4E2D\u91CD\u8BD5",en:"Download requested; this environment cannot confirm progress or saving. If nothing happens, retry in a browser."},"browser-transfer.savingLocal":{zh:"\u6B63\u5728\u5B8C\u6210\u672C\u5730\u4FDD\u5B58\u2026",en:"Finalizing local save\u2026"},"browser-transfer.savedLocal":{zh:"\u5DF2\u4FDD\u5B58\u5230\u6240\u9009\u6587\u4EF6",en:"Saved to the selected file"},"browser-transfer.failed":{zh:"\u4F20\u8F93\u5931\u8D25",en:"Transfer failed"},"browser-transfer.delivered":{zh:"\u4F20\u8F93\u5B8C\u6210\uFF0C\u4FDD\u5B58\u7ED3\u679C\u8BF7\u67E5\u770B\u6D4F\u89C8\u5668\u4E0B\u8F7D\u5217\u8868",en:"Transferred; check browser downloads for save status"},"browser-transfer.saved":{zh:"\u5DF2\u4FDD\u5B58\u5230\u8FDC\u7AEF",en:"Saved remotely"},"browser-transfer.finishedAt":{zh:"\u7ED3\u675F\u4E8E {0}",en:"Finished at {0}"},"browser-transfer.upload":{zh:"\u4E0A\u4F20",en:"Upload"},"browser-transfer.download":{zh:"\u4E0B\u8F7D",en:"Download"},"group-proxy.title":{zh:"\u5206\u7EC4\u4EE3\u7406 \xB7 {0}",en:"Group proxy \xB7 {0}"},"group-proxy.selection":{zh:"\u9ED8\u8BA4\u4EE3\u7406",en:"Default proxy"},"group-proxy.hint":{zh:"\u4E3B\u673A\u81EA\u8EAB\u4EE3\u7406\u4F18\u5148\uFF1B\u672A\u8BBE\u7F6E\u4EE3\u7406\u7684\u4E3B\u673A\u4F7F\u7528\u672C\u5206\u7EC4\u4EE3\u7406\u3002",en:"A host's own proxy takes priority. Hosts without one use this group proxy."},"group-proxy.reconnect":{zh:"\u4EC5\u5F71\u54CD\u672C\u5206\u7EC4 SSH \u4E3B\u673A\u7684\u65B0\u8FDE\u63A5\uFF0C\u4E0D\u4F1A\u6253\u65AD\u73B0\u6709\u7EC8\u7AEF\u3002",en:"Applies to new SSH connections in this group. Existing terminals stay connected."},"group-proxy.none":{zh:"\u4E0D\u8BBE\u7F6E\uFF08\u9ED8\u8BA4\u76F4\u8FDE\uFF09",en:"None (direct by default)"},"group-proxy.automatic":{zh:"\u9ED8\u8BA4\uFF08\u5206\u7EC4\u4EE3\u7406 / \u76F4\u8FDE\uFF09",en:"Default (group proxy / direct)"},"sftp-client.followTerminal":{zh:"\u8DDF\u968F\u7EC8\u7AEF\u76EE\u5F55",en:"Follow terminal directory"},"sftp-client.followWaiting":{zh:"\u5C1A\u672A\u6536\u5230\u7EC8\u7AEF\u76EE\u5F55\u3002\u8BF7\u91CD\u8FDE\u7EC8\u7AEF\uFF1B\u652F\u6301 Bash/Zsh/sh\uFF0C\u5176\u4ED6 Shell \u9700\u652F\u6301 OSC 7 \u6216 CurrentDir",en:"No terminal directory received. Reconnect the terminal; Bash/Zsh/sh are supported. Other shells need OSC 7 or CurrentDir."},"sftp-client.followHint":{zh:"\u8DDF\u968F\u5F53\u524D\u9009\u4E2D\u7684\u7EC8\u7AEF\uFF1B\u9884\u89C8\u3001\u4E0A\u4F20\u6216\u64CD\u4F5C\u6587\u4EF6\u65F6\u6682\u505C",en:"Follow the focused terminal; pause while previewing, uploading or managing files"},"sftp-client.downloadEntry":{zh:"\u4E0B\u8F7D {0}",en:"Download {0}"},"client.deviceCodeExpiry":{zh:"\u4EE3\u7801\u5C06\u5728 {0} \u5931\u6548",en:"Code expires at {0}"},"file-entry-delete-dialog.deleteFromLocation":{zh:"\u5C06\u76F4\u63A5\u4ECE{0}\u5220\u9664\u6240\u9009\u5185\u5BB9\u3002",en:"The selected items will be deleted directly from {0}. "},"activity-panel.sshActivity":{zh:"SSH \u6D3B\u52A8",en:"SSH Activity"},"activity-panel.currentSession":{zh:"\u5F53\u524D\u4F1A\u8BDD \xB7",en:"Current session \xB7"},"activity-panel.closeSshActivity":{zh:"\u5173\u95ED SSH \u6D3B\u52A8",en:"Close SSH Activity"},"activity-panel.sshActivityView":{zh:"SSH \u6D3B\u52A8\u89C6\u56FE",en:"SSH activity view"},"activity-panel.sessionDirectory":{zh:"\u4F1A\u8BDD\u76EE\u5F55",en:"Session directory"},"activity-panel.remoteDirectory":{zh:"\u8FDC\u7AEF\u76EE\u5F55",en:"Remote directory"},"activity-panel.terminal":{zh:"\u7EC8\u7AEF",en:"Terminal"},"activity-panel.readingSshSessions":{zh:"\u6B63\u5728\u8BFB\u53D6 SSH \u4F1A\u8BDD\u2026",en:"Reading SSH sessions\u2026"},"activity-panel.noRemoteToBrowse":{zh:"\u6CA1\u6709\u53EF\u6D4F\u89C8\u7684\u8FDC\u7AEF",en:"No remote to browse"},"activity-panel.allowTheCurrentSessionToAccessAHostIn":{zh:"\u8BF7\u5148\u5728 SSH \u9762\u677F\u4E2D\u5141\u8BB8\u5F53\u524D\u4F1A\u8BDD\u8BBF\u95EE\u4E00\u53F0\u4E3B\u673A\u3002",en:"Allow the current session to access a host in the SSH panel first."},"activity-panel.noTerminalsOpenYet":{zh:"\u8FD8\u6CA1\u6709\u6253\u5F00\u7684\u7EC8\u7AEF",en:"No terminals open yet"},"activity-panel.terminalsOpenedByTheAiAppearRightHere":{zh:"AI \u6253\u5F00\u4EA4\u4E92\u7EC8\u7AEF\u540E\uFF0C\u4F1A\u76F4\u63A5\u663E\u793A\u5728\u8FD9\u91CC\u3002",en:"Terminals opened by the AI appear right here."},"activity-panel.end":{zh:"\u7ED3\u675F",en:"End"},"activity-panel.remove":{zh:"\u79FB\u9664",en:"Remove"},"activity-panel.sshTerminal":{zh:"SSH \u7EC8\u7AEF",en:"SSH terminal"},"activity-panel.terminal2":{zh:"\u7EC8\u7AEF {0}",en:"Terminal {0}"},"activity-panel.running":{zh:"\u8FD0\u884C\u4E2D",en:"Running"},"activity-panel.exited":{zh:"\u5DF2\u9000\u51FA",en:"Exited"},"activity-panel.terminal3":{zh:"{0}\u7EC8\u7AEF {1}",en:"{0}Terminal {1}"},"activity-panel.endAndCloseThisTerminal":{zh:"\u7ED3\u675F\u5E76\u5173\u95ED\u8FD9\u4E2A\u7EC8\u7AEF",en:"End and close this terminal"},"activity-panel.removeThisTerminalFromTheActivityPanel":{zh:"\u4ECE\u6D3B\u52A8\u9762\u677F\u79FB\u9664\u8FD9\u4E2A\u7EC8\u7AEF",en:"Remove this terminal from the activity panel"},"activity-panel.processing":{zh:"\u5904\u7406\u4E2D",en:"Processing"},"activity-panel.interactiveSshTerminal":{zh:"\u4EA4\u4E92\u5F0F SSH \u7EC8\u7AEF",en:"Interactive SSH terminal"},"adaptive-workspace.details":{zh:"\u8BE6\u60C5",en:"Details"},"adaptive-workspace.workspacePanel":{zh:"\u5DE5\u4F5C\u533A\u9762\u677F",en:"Workspace panel"},"adaptive-workspace.closePanel":{zh:"\u5173\u95ED\u9762\u677F",en:"Close panel"},"client.openASessionToSeeTheSshSidebar":{zh:"\u6253\u5F00\u4F1A\u8BDD\u540E\u53EF\u67E5\u770B SSH \u4FA7\u680F",en:"Open a session to see the SSH sidebar"},"client.collapseSshSidebar":{zh:"\u6536\u8D77 SSH \u4FA7\u680F",en:"Collapse SSH sidebar"},"client.expandSshSidebar":{zh:"\u5C55\u5F00 SSH \u4FA7\u680F",en:"Expand SSH sidebar"},"client.theRemote":{zh:"\u8FDC\u7AEF",en:"Remote"},"client.sshPanel":{zh:"SSH \u9762\u677F",en:"SSH panel"},"client.availableRemotesAppearOnceASessionIsOpen":{zh:"\u6253\u5F00\u4F1A\u8BDD\u540E\u663E\u793A\u53EF\u7528\u8FDC\u7AEF",en:"Available remotes appear once a session is open"},"client.noRemotesGrantedToThisSession":{zh:"\u5F53\u524D\u4F1A\u8BDD\u672A\u6388\u6743\u8FDC\u7AEF",en:"No remotes granted to this session"},"client.mounted":{zh:"\u5DF2\u6302\u8F7D",en:"Mounted"},"client.another":{zh:"\u8FD8\u6709",en:"Another"},"client.availableHosts":{zh:"\u53F0\u53EF\u7528\u8FDC\u7AEF",en:"available hosts"},"client.backToSession":{zh:"\u8FD4\u56DE\u4F1A\u8BDD",en:"Back to session"},"client.sshWorkbench":{zh:"SSH \u5DE5\u4F5C\u53F0",en:"SSH workbench"},"client.selectAHost":{zh:"\u9009\u62E9\u4E00\u53F0\u4E3B\u673A",en:"Select a host"},"client.sshWorkbenchView":{zh:"SSH \u5DE5\u4F5C\u53F0\u89C6\u56FE",en:"SSH workbench view"},"client.terminalsFiles":{zh:"\u7EC8\u7AEF\u4E0E\u6587\u4EF6",en:"Terminals & files"},"client.fileTransfer":{zh:"\u6587\u4EF6\u4F20\u8F93",en:"File Transfer"},"client.savedCommands":{zh:"\u5E38\u7528\u547D\u4EE4",en:"Saved commands"},"client.portForwarding":{zh:"\u7AEF\u53E3\u8F6C\u53D1",en:"Port forwarding"},"client.credentialVault":{zh:"\u5BC6\u94A5\u5E93",en:"Credential vault"},"client.proxyVault":{zh:"\u4EE3\u7406\u5E93",en:"Proxy vault"},"client.settings":{zh:"\u8BBE\u7F6E",en:"Settings"},"client.close":{zh:"\u5173\u95ED",en:"Close"},"client.host":{zh:"\u4E3B\u673A",en:"Host"},"client.closeTerminalsOnAllHosts":{zh:"\u5173\u95ED\u6240\u6709\u4E3B\u673A\u7684\u7EC8\u7AEF\uFF1F",en:"Close terminals on all hosts?"},"client.thisClosesAllTerminalTabsInThisWorkspaceIncluding":{zh:"\u5C06\u5173\u95ED\u672C\u5DE5\u4F5C\u53F0\u6240\u6709\u4E3B\u673A\u7684 {0} \u4E2A\u7EC8\u7AEF\u6807\u7B7E\uFF0C\u5305\u62EC\u9690\u85CF\u6807\u7B7E\u53CA\u8FDE\u63A5\u4E2D\u7684\u7EC8\u7AEF\uFF0C\u53EF\u80FD\u4E2D\u65AD\u6B63\u5728\u8FD0\u884C\u7684\u547D\u4EE4\u3002\u4E0D\u4F1A\u5220\u9664\u4E3B\u673A\u914D\u7F6E\uFF0C\u4E5F\u4E0D\u4F1A\u5173\u95ED\u5176\u4ED6\u6D4F\u89C8\u5668\u7A97\u53E3\u7684\u7EC8\u7AEF\u3002",en:"This closes all {0} terminal tabs in this workspace, including hidden and connecting tabs, and may interrupt running commands. Host configurations and terminals in other browser windows are not affected."},"client.cancel":{zh:"\u53D6\u6D88",en:"Cancel"},"client.closeAll":{zh:"\u786E\u8BA4\u5173\u95ED\u5168\u90E8",en:"Close all"},"client.hostActions":{zh:"\u4E3B\u673A\u64CD\u4F5C",en:"Host actions"},"client.showSftp":{zh:"\u5C55\u5F00 SFTP",en:"Show SFTP"},"client.hideSftp":{zh:"\u6536\u8D77 SFTP",en:"Hide SFTP"},"client.editHost":{zh:"\u7F16\u8F91\u4E3B\u673A",en:"Edit host"},"client.closeAllTerminals":{zh:"\u5173\u95ED\u5168\u90E8\u7EC8\u7AEF",en:"Close all terminals"},"client.closeTerminalsOnAllHosts2":{zh:"\u5173\u95ED\u6240\u6709\u4E3B\u673A\u7684\u7EC8\u7AEF",en:"Close terminals on all hosts"},"client.deleteHost":{zh:"\u5220\u9664\u4E3B\u673A {0}",en:"Delete host {0}"},"client.deleteHost2":{zh:"\u5220\u9664\u4E3B\u673A",en:"Delete host"},"client.adjustTheTerminalAndSftpWidths":{zh:"\u8C03\u6574\u7EC8\u7AEF\u4E0E SFTP \u7684\u5BBD\u5EA6",en:"Adjust the terminal and SFTP widths"},"client.terminal":{zh:"{0} \u7EC8\u7AEF",en:"{0} Terminal"},"client.waitingForTerminalConnection":{zh:"\u7B49\u5F85\u7EC8\u7AEF\u8FDE\u63A5",en:"Waiting for terminal connection"},"client.theRemoteDirectoryLoadsOnceATerminalIsOpen":{zh:"\u6253\u5F00\u7EC8\u7AEF\u540E\u518D\u8BFB\u53D6\u8FDC\u7AEF\u76EE\u5F55\u3002",en:"The remote directory loads once a terminal is open."},"client.localRemoteAndDynamicSocks5":{zh:"\xB7 \u672C\u5730\u3001\u8FDC\u7A0B\u4E0E\u52A8\u6001 SOCKS5",en:"\xB7 Local, remote and dynamic SOCKS5"},"client.newRule":{zh:"\u65B0\u5EFA\u89C4\u5219",en:"New rule"},"client.thisHostHasNoPortForwardingRulesYet":{zh:"\u8FD9\u53F0\u4E3B\u673A\u8FD8\u6CA1\u6709\u7AEF\u53E3\u8F6C\u53D1\u89C4\u5219\u3002",en:"This host has no port forwarding rules yet."},"client.edit":{zh:"\u7F16\u8F91",en:"Edit"},"client.stop":{zh:"\u505C\u6B62",en:"Stop"},"client.start":{zh:"\u542F\u52A8",en:"Start"},"client.delete":{zh:"\u5220\u9664",en:"Delete"},"client.deleteTheCredentialVaultEntryThisActionCannotBe":{zh:"\u5220\u9664\u5BC6\u94A5\u5E93\u6761\u76EE\u201C{0}\u201D\uFF1F\u6B64\u64CD\u4F5C\u65E0\u6CD5\u64A4\u9500\u3002",en:"Delete the credential vault entry \u201C{0}\u201D? This action cannot be undone."},"client.keepCommonAccountsInOnePlaceConnectionConfigsOnly":{zh:"\u96C6\u4E2D\u4FDD\u5B58\u5E38\u7528\u8D26\u53F7\uFF0C\u8FDE\u63A5\u914D\u7F6E\u53EA\u5F15\u7528\u51ED\u636E\u3002",en:"Keep common accounts in one place; connection configs only reference credentials."},"client.newCredential":{zh:"\u65B0\u5EFA\u51ED\u636E",en:"New credential"},"client.noSavedCredentialsYet":{zh:"\u8FD8\u6CA1\u6709\u5E38\u7528\u51ED\u636E",en:"No saved credentials yet"},"client.passwordsAndPrivateKeysAreStoredOnlyInThe":{zh:"\u5BC6\u7801\u548C\u79C1\u94A5\u53EA\u4FDD\u5B58\u5728 DSH \u51ED\u636E\u670D\u52A1\u4E2D\uFF0C\u4E0D\u5199\u5165 SSH \u914D\u7F6E\u6587\u4EF6\u3002",en:"Passwords and private keys are stored only in the DSH credential service, never written to SSH config files."},"client.addCredential":{zh:"\u6DFB\u52A0\u51ED\u636E",en:"Add credential"},"client.password":{zh:"\u5BC6\u7801",en:"Password"},"client.privateKey":{zh:"\u79C1\u94A5",en:"Private key"},"client.available":{zh:"\u53EF\u7528",en:"Available"},"client.missingCredentials":{zh:"\u7F3A\u5C11\u51ED\u636E",en:"Missing credentials"},"client.connections":{zh:"\u4E2A\u8FDE\u63A5",en:"connections"},"client.edit2":{zh:"\u7F16\u8F91 {0}",en:"Edit {0}"},"client.delete2":{zh:"\u5220\u9664 {0}",en:"Delete {0}"},"client.stillInUseByConnections":{zh:"\u4ECD\u6709\u8FDE\u63A5\u6B63\u5728\u4F7F\u7528",en:"Still in use by connections"},"client.deleteCredential":{zh:"\u5220\u9664\u51ED\u636E",en:"Delete credential"},"client.createCredential":{zh:"\u65B0\u5EFA\u5E38\u7528\u51ED\u636E",en:"Create credential"},"client.passwordsAndPrivateKeysAreNotShownAgainAfter":{zh:"\u5BC6\u7801\u548C\u79C1\u94A5\u4FDD\u5B58\u540E\u4E0D\u4F1A\u56DE\u663E",en:"Passwords and private keys are not shown again after saving"},"client.name":{zh:"\u540D\u79F0",en:"Name"},"client.productionOps":{zh:"\u751F\u4EA7\u73AF\u5883\u8FD0\u7EF4",en:"Production ops"},"client.username":{zh:"\u7528\u6237\u540D",en:"Username"},"client.authMethod":{zh:"\u8BA4\u8BC1\u65B9\u5F0F",en:"Auth method"},"client.savedLeaveBlankToKeepUnchanged":{zh:"\u5DF2\u4FDD\u5B58\uFF1B\u7559\u7A7A\u4FDD\u6301\u4E0D\u53D8",en:"Saved; leave blank to keep unchanged"},"client.requiredCannotBeReadBackAfterSaving":{zh:"\u5FC5\u586B\uFF0C\u4FDD\u5B58\u540E\u4E0D\u53EF\u8BFB\u56DE",en:"Required. Cannot be read back after saving."},"client.pasteAnOpensshOrPemPrivateKey":{zh:"\u7C98\u8D34 OpenSSH \u6216 PEM \u79C1\u94A5",en:"Paste an OpenSSH or PEM private key"},"client.keyPassphrase":{zh:"\u79C1\u94A5\u53E3\u4EE4",en:"Key passphrase"},"client.saving":{zh:"\u6B63\u5728\u4FDD\u5B58\u2026",en:"Saving\u2026"},"client.saveCredential":{zh:"\u4FDD\u5B58\u51ED\u636E",en:"Save credential"},"client.deleteTheProxyThisActionCannotBeUndone":{zh:"\u5220\u9664\u4EE3\u7406\u201C{0}\u201D\uFF1F\u6B64\u64CD\u4F5C\u65E0\u6CD5\u64A4\u9500\u3002",en:"Delete the proxy \u201C{0}\u201D? This action cannot be undone."},"client.keepCommonHttpAndSocks5ProxiesInOnePlace":{zh:"\u96C6\u4E2D\u4FDD\u5B58\u5E38\u7528 HTTP \u4E0E SOCKS5 \u4EE3\u7406\uFF0C\u4E3B\u673A\u914D\u7F6E\u53EA\u4FDD\u7559\u5F15\u7528\u3002",en:"Keep common HTTP and SOCKS5 proxies in one place; host configs only reference them."},"client.newProxy":{zh:"\u65B0\u5EFA\u4EE3\u7406",en:"New proxy"},"client.noSavedProxiesYet":{zh:"\u8FD8\u6CA1\u6709\u5E38\u7528\u4EE3\u7406",en:"No saved proxies yet"},"client.saveOnceAndMultipleSshHostsCanShareThe":{zh:"\u4FDD\u5B58\u4E00\u6B21\u540E\uFF0C\u591A\u53F0 SSH \u4E3B\u673A\u53EF\u4EE5\u5171\u7528\u540C\u4E00\u6761\u8FDE\u63A5\u8DEF\u5F84\u3002",en:"Save once and multiple SSH hosts can share the same connection path."},"client.addProxy":{zh:"\u6DFB\u52A0\u4EE3\u7406",en:"Add proxy"},"client.deleteProxy":{zh:"\u5220\u9664\u4EE3\u7406",en:"Delete proxy"},"client.createProxy":{zh:"\u65B0\u5EFA\u5E38\u7528\u4EE3\u7406",en:"Create proxy"},"client.theProxyPasswordIsNotShownAgainAfterSaving":{zh:"\u4EE3\u7406\u5BC6\u7801\u4FDD\u5B58\u540E\u4E0D\u4F1A\u56DE\u663E",en:"The proxy password is not shown again after saving"},"client.officeSocks5":{zh:"\u529E\u516C\u5BA4 SOCKS5",en:"Office SOCKS5"},"client.proxyType":{zh:"\u4EE3\u7406\u7C7B\u578B",en:"Proxy type"},"client.proxyHost":{zh:"\u4EE3\u7406\u4E3B\u673A",en:"Proxy host"},"client.proxyPort":{zh:"\u4EE3\u7406\u7AEF\u53E3",en:"Proxy port"},"client.proxyUsername":{zh:"\u4EE3\u7406\u7528\u6237\u540D",en:"Proxy username"},"client.proxyPassword":{zh:"\u4EE3\u7406\u5BC6\u7801",en:"Proxy password"},"client.optionalCannotBeReadBackAfterSaving":{zh:"\u53EF\u9009\uFF0C\u4FDD\u5B58\u540E\u4E0D\u53EF\u8BFB\u56DE",en:"Optional. Cannot be read back after saving."},"client.saveProxy":{zh:"\u4FDD\u5B58\u4EE3\u7406",en:"Save proxy"},"client.githubAuthorizationExpired":{zh:"GitHub \u6388\u6743\u5DF2\u5931\u6548",en:"GitHub authorization expired"},"client.githubConnected":{zh:"GitHub \u5DF2\u8FDE\u63A5 \xB7 {0}",en:"GitHub connected \xB7 {0}"},"client.githubReachable":{zh:"GitHub \u7F51\u7EDC\u8FDE\u63A5\u6210\u529F \xB7 {0}",en:"GitHub reachable \xB7 {0}"},"client.viaProxy":{zh:"\u901A\u8FC7\u4EE3\u7406",en:"Via proxy"},"client.direct":{zh:"\u76F4\u8FDE",en:"Direct"},"client.gistSyncSettingsAreNotLoadedYet":{zh:"Gist \u540C\u6B65\u8BBE\u7F6E\u5C1A\u672A\u52A0\u8F7D",en:"Gist sync settings are not loaded yet"},"client.gistSyncSettingsSaved":{zh:"Gist \u540C\u6B65\u8BBE\u7F6E\u5DF2\u4FDD\u5B58",en:"Gist sync settings saved"},"client.connected":{zh:"\u8FDE\u63A5\u6210\u529F \xB7 {0}",en:"Connected \xB7 {0}"},"client.deviceCodeGeneratedCopyItInTheAuthorizationWindow":{zh:"\u8BBE\u5907\u4EE3\u7801\u5DF2\u751F\u6210\uFF0C\u8BF7\u5728\u6388\u6743\u7A97\u53E3\u4E2D\u590D\u5236\u540E\u524D\u5F80 GitHub",en:"Device code generated. Copy it in the authorization window, then go to GitHub."},"client.githubAccountDisconnectedTheSyncEncryptionPasswordIsStill":{zh:"GitHub \u8D26\u53F7\u5DF2\u65AD\u5F00\uFF0C\u540C\u6B65\u52A0\u5BC6\u5BC6\u7801\u4ECD\u4FDD\u7559\u5728\u672C\u673A",en:"GitHub account disconnected. The sync encryption password is still kept on this device."},"client.sshSettings":{zh:"SSH \u8BBE\u7F6E",en:"SSH settings"},"client.securityBoundariesCommandLimitsAndCrossDeviceConfigSync":{zh:"\u5B89\u5168\u8FB9\u754C\u3001\u547D\u4EE4\u9650\u5236\u4E0E\u8DE8\u8BBE\u5907\u914D\u7F6E\u540C\u6B65",en:"Security boundaries, command limits, and cross-device config sync"},"client.githubGistSync":{zh:"GitHub Gist \u540C\u6B65",en:"GitHub Gist sync"},"client.endToEndEncryptedSyncOfHostsFtpFtps":{zh:"\u540C\u6B65\u4E3B\u673A\u3001FTP\u3001\u76EE\u5F55\u3001\u5206\u7EC4\u4EE3\u7406\u3001\u5BC6\u94A5\u5E93\u4E0E\u5E38\u7528\u547D\u4EE4\uFF1B\u5BC6\u7801\u548C\u79C1\u94A5\u5355\u72EC\u52A0\u5BC6",en:"Sync hosts, FTP, directories, group proxies, credentials and saved commands; passwords and private keys are encrypted separately"},"client.checkGithubAuthorization":{zh:"GitHub \u6388\u6743\u9700\u68C0\u67E5",en:"Check GitHub authorization"},"client.connected2":{zh:"\u5DF2\u8FDE\u63A5 {0}",en:"Connected {0}"},"client.connectGithub":{zh:"\u8FDE\u63A5 GitHub",en:"Connect GitHub"},"client.authorizationCredentialsAreStoredSecurelyInThisDsh":{zh:"\u6388\u6743\u51ED\u636E\u5B89\u5168\u4FDD\u5B58\u5728\u5F53\u524D DSH",en:"Authorization credentials are stored securely in this DSH"},"client.getGistAccessThroughGithubDeviceAuthorization":{zh:"\u901A\u8FC7 GitHub \u8BBE\u5907\u6388\u6743\u83B7\u53D6 Gist \u8BBF\u95EE\u6743\u9650",en:"Get Gist access through GitHub device authorization"},"client.connecting":{zh:"\u8FDE\u63A5\u4E2D\u2026",en:"Connecting\u2026"},"client.waitingForAuthorization":{zh:"\u7B49\u5F85\u6388\u6743\u2026",en:"Waiting for authorization\u2026"},"client.reconnect":{zh:"\u91CD\u65B0\u8FDE\u63A5",en:"Reconnect"},"client.disconnecting":{zh:"\u65AD\u5F00\u4E2D\u2026",en:"Disconnecting\u2026"},"client.disconnect":{zh:"\u65AD\u5F00",en:"Disconnect"},"client.onFirstUseEnterYourGithubOauthClientId":{zh:"\u9996\u6B21\u4F7F\u7528\u9700\u5728\u4E0B\u65B9\u201C\u9AD8\u7EA7\u6388\u6743\u8BBE\u7F6E\u201D\u4E2D\u586B\u5199 GitHub OAuth Client ID\u3002\u5B83\u4E0D\u662F\u5BC6\u94A5\uFF0C\u53EA\u7528\u4E8E\u6807\u8BC6\u6388\u6743\u5E94\u7528\u3002",en:"On first use, enter your GitHub OAuth Client ID under \u201CAdvanced authorization settings\u201D below. It is not a secret; it only identifies the authorization app."},"client.leaveEmptyToCreateAPrivateGistAutomaticallyOn":{zh:"\u7559\u7A7A\u540E\u9996\u6B21\u540C\u6B65\u4F1A\u81EA\u52A8\u521B\u5EFA\u79C1\u6709 Gist",en:"Leave empty to create a private Gist automatically on the first sync"},"client.autoCreate":{zh:"\u81EA\u52A8\u521B\u5EFA",en:"Auto-create"},"client.syncEncryptionPassword":{zh:"\u540C\u6B65\u52A0\u5BC6\u5BC6\u7801",en:"Sync encryption password"},"client.savedSecurelyEnterTheSamePasswordOnANew":{zh:"\u5DF2\u5B89\u5168\u4FDD\u5B58\uFF1B\u65B0\u8BBE\u5907\u9700\u8F93\u5165\u76F8\u540C\u5BC6\u7801",en:"Saved securely. Enter the same password on a new device."},"client.atLeast6CharactersALongerPasswordIsRecommended":{zh:"\u81F3\u5C11 6 \u4E2A\u5B57\u7B26\uFF0C\u5EFA\u8BAE\u4F7F\u7528\u66F4\u957F\u5BC6\u7801",en:"At least 6 characters. A longer password is recommended."},"client.configured":{zh:"\u5DF2\u914D\u7F6E",en:"Configured"},"client.setASeparateEncryptionPassword":{zh:"\u8BBE\u7F6E\u72EC\u7ACB\u52A0\u5BC6\u5BC6\u7801",en:"Set a separate encryption password"},"client.syncVersionInfo":{zh:"\u540C\u6B65\u7248\u672C\u4FE1\u606F",en:"Sync version info"},"client.cloudVersion":{zh:"\u4E91\u7AEF\u7248\u672C",en:"Cloud version"},"client.notReadYet":{zh:"\u5C1A\u672A\u8BFB\u53D6",en:"Not read yet"},"client.lastSync":{zh:"\u4E0A\u6B21\u540C\u6B65",en:"Last sync"},"client.neverSynced":{zh:"\u5C1A\u672A\u540C\u6B65",en:"Never synced"},"client.syncPolicy":{zh:"\u540C\u6B65\u7B56\u7565",en:"Sync policy"},"client.gistSyncPolicy":{zh:"Gist \u540C\u6B65\u7B56\u7565",en:"Gist sync policy"},"client.smart":{zh:"\u667A\u80FD",en:"Smart"},"client.detectChangesOnBothSidesAutomaticallyAndMergePer":{zh:"\u81EA\u52A8\u5224\u65AD\u4E24\u7AEF\u53D8\u5316\u5E76\u6309\u6761\u76EE\u5408\u5E76",en:"Detect changes on both sides automatically and merge per item"},"client.localFirst":{zh:"\u672C\u5730\u4F18\u5148",en:"Local first"},"client.keepThisDeviceSConfigWhenBothSidesChanged":{zh:"\u53CC\u65B9\u540C\u65F6\u4FEE\u6539\u65F6\u4FDD\u7559\u672C\u673A\u914D\u7F6E",en:"Keep this device's config when both sides changed"},"client.cloudFirst":{zh:"\u4E91\u7AEF\u4F18\u5148",en:"Cloud first"},"client.useTheGistConfigWhenBothSidesChanged":{zh:"\u53CC\u65B9\u540C\u65F6\u4FEE\u6539\u65F6\u91C7\u7528 Gist \u914D\u7F6E",en:"Use the Gist config when both sides changed"},"client.autoSync":{zh:"\u81EA\u52A8\u540C\u6B65",en:"Auto sync"},"client.checksAfterStartupAfterConfigChangesAndEveryFive":{zh:"\u542F\u52A8\u540E\u3001\u914D\u7F6E\u53D8\u5316\u540E\u548C\u540E\u53F0\u6BCF\u4E94\u5206\u949F\u68C0\u67E5\u4E00\u6B21",en:"Checks after startup, after config changes, and every five minutes in the background"},"client.backupsToKeep":{zh:"\u5907\u4EFD\u4FDD\u7559\u6570\u91CF",en:"Backups to keep"},"client.explicitHistorySnapshotsKeptInTheMainGistGithub":{zh:"\u4E3B Gist \u5185\u4FDD\u7559\u7684\u663E\u5F0F\u5386\u53F2\u5FEB\u7167\uFF1BGitHub \u81EA\u8EAB\u4FEE\u8BA2\u5386\u53F2\u4E0D\u53D7\u5F71\u54CD",en:"Explicit history snapshots kept in the main Gist; GitHub's own revision history is unaffected"},"client.copies":{zh:"\u4EFD",en:"copies"},"client.advancedAuthorizationSettings":{zh:"\u9AD8\u7EA7\u6388\u6743\u8BBE\u7F6E",en:"Advanced authorization settings"},"client.enableDeviceFlowInTheGithubOauthAppNo":{zh:"\u5728 GitHub OAuth App \u4E2D\u542F\u7528 Device Flow\uFF1B\u4E0D\u9700\u8981 Client Secret",en:"Enable Device Flow in the GitHub OAuth App; no Client Secret needed"},"client.personalAccessTokenFallback":{zh:"Personal Access Token\uFF08\u5907\u7528\uFF09",en:"Personal Access Token (fallback)"},"client.alreadyAuthorizedEnteringATokenReplacesTheCurrentAuthorization":{zh:"\u5DF2\u6709\u6388\u6743\uFF1B\u586B\u5199\u540E\u4F1A\u66FF\u6362\u5F53\u524D\u6388\u6743",en:"Already authorized. Entering a token replaces the current authorization."},"client.fillInOnlyWhenOauthIsUnavailableRequiresThe":{zh:"\u4EC5\u5728\u65E0\u6CD5\u4F7F\u7528 OAuth \u65F6\u586B\u5199\uFF0C\u9700\u8981 gist \u6743\u9650",en:"Fill in only when OAuth is unavailable. Requires the gist scope."},"client.noOauthApp":{zh:"\u6CA1\u6709 OAuth App\uFF1F",en:"No OAuth App?"},"client.goToGithubToCreateOne":{zh:"\u524D\u5F80 GitHub \u521B\u5EFA",en:"Go to GitHub to create one"},"client.thenEnableDeviceFlowInTheAppSettings":{zh:"\uFF0C\u521B\u5EFA\u540E\u5728\u5E94\u7528\u8BBE\u7F6E\u4E2D\u542F\u7528 Device Flow\u3002",en:", then enable Device Flow in the app settings."},"client.syncedContent":{zh:"\u540C\u6B65\u5185\u5BB9\uFF1A",en:"Synced content: "},"client.hostsFtpFtpsPinnedProjectDirectoriesTheProxyVault":{zh:"\u4E3B\u673A\u3001FTP/FTPS\u3001\u56FA\u5B9A\u9879\u76EE\u76EE\u5F55\u3001\u4EE3\u7406\u5E93\u3001\u5BC6\u94A5\u5E93\uFF0C\u4EE5\u53CA\u5176\u4E2D\u7684\u5BC6\u7801\u548C\u79C1\u94A5\u3002\u654F\u611F\u5B57\u6BB5\u4E0A\u4F20\u524D\u4F1A\u52A0\u5BC6\u3002",en:"Hosts, FTP/FTPS, pinned project directories, the proxy vault, the credential vault, and their passwords and private keys. Sensitive fields are encrypted before upload."},"client.keptLocalOnly":{zh:"\u4EC5\u4FDD\u7559\u672C\u673A\uFF1A",en:"Kept local only: "},"client.sessionGrantsPortForwardingPublicBindsAndCommandLimits":{zh:"\u5F53\u524D\u4F1A\u8BDD\u6388\u6743\u3001\u7AEF\u53E3\u8F6C\u53D1\u3001\u516C\u5F00\u7ED1\u5B9A\u4E0E\u547D\u4EE4\u9650\u5236\u3002GitHub Token \u548C\u540C\u6B65\u52A0\u5BC6\u5BC6\u7801\u4E5F\u59CB\u7EC8\u53EA\u4FDD\u5B58\u5728\u672C\u673A DSH \u51ED\u636E\u670D\u52A1\u3002",en:"Session grants, port forwarding, public binds, and command limits. The GitHub Token and sync encryption passphrase are also always stored only in the local DSH credential service."},"client.lastSyncFailed":{zh:"\u4E0A\u6B21\u540C\u6B65\u5931\u8D25\uFF1A",en:"Last sync failed: "},"client.openGist":{zh:"\u6253\u5F00 Gist",en:"Open Gist"},"client.testing":{zh:"\u6D4B\u8BD5\u4E2D\u2026",en:"Testing\u2026"},"client.testConnection":{zh:"\u6D4B\u8BD5\u8FDE\u63A5",en:"Test connection"},"client.syncing":{zh:"\u540C\u6B65\u4E2D\u2026",en:"Syncing\u2026"},"client.syncNow":{zh:"\u7ACB\u5373\u540C\u6B65",en:"Sync now"},"client.saving2":{zh:"\u4FDD\u5B58\u4E2D\u2026",en:"Saving\u2026"},"client.saveSyncSettings":{zh:"\u4FDD\u5B58\u540C\u6B65\u8BBE\u7F6E",en:"Save sync settings"},"client.localRuntimeSettings":{zh:"\u672C\u673A\u8FD0\u884C\u8BBE\u7F6E",en:"Local runtime settings"},"client.affectsThisDshInstanceOnlyNotSyncedViaGist":{zh:"\u53EA\u5F71\u54CD\u5F53\u524D DSH\uFF0C\u4E0D\u53C2\u4E0E Gist \u540C\u6B65",en:"Affects this DSH instance only; not synced via Gist"},"client.githubOutboundProxy":{zh:"GitHub \u51FA\u7AD9\u4EE3\u7406",en:"GitHub outbound proxy"},"client.usedOnlyForOauthAndTheGistApiE":{zh:"\u4EC5\u7528\u4E8E OAuth \u4E0E Gist API\uFF1B\u4F8B\u5982 http://host.docker.internal:7893\uFF0C\u7559\u7A7A\u65F6\u4F7F\u7528\u7CFB\u7EDF HTTPS_PROXY",en:"Used only for OAuth and the Gist API; e.g. http://host.docker.internal:7893. Falls back to the system HTTPS_PROXY when left empty."},"client.connectToGithubDirectly":{zh:"\u76F4\u8FDE GitHub",en:"Connect to GitHub directly"},"client.testGithubNetwork":{zh:"\u6D4B\u8BD5 GitHub \u7F51\u7EDC",en:"Test GitHub network"},"client.allowPublicPortBinding":{zh:"\u5141\u8BB8\u516C\u5F00\u7AEF\u53E3\u7ED1\u5B9A",en:"Allow public port binding"},"client.allowsForwardsToListenOn0000":{zh:"\u5141\u8BB8\u8F6C\u53D1\u76D1\u542C 0.0.0.0 \u6216\u5176\u4ED6\u975E\u56DE\u73AF\u5730\u5740\u3002\u4EC5\u5728\u660E\u786E\u914D\u7F6E\u9632\u706B\u5899\u540E\u5F00\u542F\u3002",en:"Allows forwards to listen on 0.0.0.0 or other non-loopback addresses. Enable only with a properly configured firewall."},"client.defaultCommandTimeout":{zh:"\u9ED8\u8BA4\u547D\u4EE4\u8D85\u65F6",en:"Default command timeout"},"client.maximumWaitTimeForTheAiSSshExec":{zh:"AI \u7684 ssh_exec \u6700\u957F\u7B49\u5F85\u65F6\u95F4",en:"Maximum wait time for the AI's ssh_exec"},"client.ms":{zh:"\u6BEB\u79D2",en:"ms"},"client.maxCommandOutput":{zh:"\u6700\u5927\u547D\u4EE4\u8F93\u51FA",en:"Max command output"},"client.keepsTheNewestOutputBeyondThisLimitSoContext":{zh:"\u8D85\u51FA\u540E\u4FDD\u7559\u6700\u65B0\u8F93\u51FA\uFF0C\u907F\u514D\u6324\u5360\u4E0A\u4E0B\u6587",en:"Keeps the newest output beyond this limit so context is not crowded out"},"client.chars":{zh:"\u5B57\u7B26",en:"chars"},"client.copyTheDeviceCodeThenGoToGithubTo":{zh:"\u590D\u5236\u8BBE\u5907\u4EE3\u7801\uFF0C\u518D\u524D\u5F80 GitHub \u5B8C\u6210\u672C\u6B21\u6388\u6743",en:"Copy the device code, then go to GitHub to finish authorizing"},"client.oneTimeDeviceCode":{zh:"\u4E00\u6B21\u6027\u8BBE\u5907\u4EE3\u7801",en:"One-time device code"},"client.copied":{zh:"\u5DF2\u590D\u5236",en:"Copied"},"client.copyCode":{zh:"\u590D\u5236\u4EE3\u7801",en:"Copy code"},"client.copyTheCodeAbove":{zh:"\u590D\u5236\u4E0A\u65B9\u4EE3\u7801",en:"Copy the code above"},"client.theDeviceCodeIsUsedForThisAuthorizationOnly":{zh:"\u8BBE\u5907\u4EE3\u7801\u53EA\u7528\u4E8E\u8FD9\u4E00\u6B21\u6388\u6743",en:"The device code is used for this authorization only"},"client.openTheGithubAuthorizationPage":{zh:"\u6253\u5F00 GitHub \u6388\u6743\u9875",en:"Open the GitHub authorization page"},"client.pasteTheCodeAndConfirmAuthorizationForTheCurrent":{zh:"\u7C98\u8D34\u4EE3\u7801\u5E76\u786E\u8BA4\u6388\u6743\u7ED9\u5F53\u524D OAuth App",en:"Paste the code and confirm authorization for the current OAuth App"},"client.backToDsh":{zh:"\u8FD4\u56DE DSH",en:"Back to DSH"},"client.theConnectionCompletesAutomaticallyOnceAuthorized":{zh:"\u6388\u6743\u6210\u529F\u540E\u4F1A\u81EA\u52A8\u5B8C\u6210\u8FDE\u63A5",en:"The connection completes automatically once authorized"},"client.theBrowserBlockedAutomaticCopyingSelectTheDeviceCode":{zh:"\u6D4F\u89C8\u5668\u672A\u5141\u8BB8\u81EA\u52A8\u590D\u5236\uFF0C\u8BF7\u9009\u4E2D\u8BBE\u5907\u4EE3\u7801\u624B\u52A8\u590D\u5236\u3002",en:"The browser blocked automatic copying. Select the device code and copy it manually."},"client.later":{zh:"\u7A0D\u540E\u518D\u8BF4",en:"Later"},"client.goToGithubToAuthorize":{zh:"\u524D\u5F80 GitHub \u6388\u6743",en:"Go to GitHub to authorize"},"client.syncing2":{zh:"\u540C\u6B65\u4E2D",en:"Syncing"},"client.actionNeeded":{zh:"\u9700\u8981\u5904\u7406",en:"Action needed"},"client.waitingForFirstSync":{zh:"\u7B49\u5F85\u9996\u6B21\u540C\u6B65",en:"Waiting for first sync"},"client.notConfigured":{zh:"\u5C1A\u672A\u914D\u7F6E",en:"Not configured"},"client.lastSynced":{zh:"\u4E0A\u6B21\u540C\u6B65 {0}",en:"Last synced {0}"},"client.localConfigUploaded":{zh:"\u672C\u5730\u914D\u7F6E\u5DF2\u4E0A\u4F20",en:"Local config uploaded"},"client.cloudConfigApplied":{zh:"\u4E91\u7AEF\u914D\u7F6E\u5DF2\u5E94\u7528",en:"Cloud config applied"},"client.configsFromBothSidesMergedIntelligently":{zh:"\u4E24\u7AEF\u914D\u7F6E\u5DF2\u667A\u80FD\u5408\u5E76",en:"Configs from both sides merged intelligently"},"client.configIsAlreadyUpToDate":{zh:"\u914D\u7F6E\u5DF2\u7ECF\u662F\u6700\u65B0\u72B6\u6001",en:"Config is already up to date"},"client.justNow":{zh:"\u521A\u521A",en:"Just now"},"client.minutesAgo":{zh:"{0} \u5206\u949F\u524D",en:"{0} minutes ago"},"client.hoursAgo":{zh:"{0} \u5C0F\u65F6\u524D",en:"{0} hours ago"},"client.newPortForward":{zh:"\u65B0\u5EFA\u7AEF\u53E3\u8F6C\u53D1",en:"New port forward"},"client.type":{zh:"\u7C7B\u578B",en:"Type"},"client.localForwardL":{zh:"\u672C\u5730\u8F6C\u53D1\uFF08L\uFF09",en:"Local forward (L)"},"client.remoteForwardR":{zh:"\u8FDC\u7A0B\u8F6C\u53D1\uFF08R\uFF09",en:"Remote forward (R)"},"client.dynamicSocks5D":{zh:"\u52A8\u6001 SOCKS5\uFF08D\uFF09",en:"Dynamic SOCKS5 (D)"},"client.listenAddress":{zh:"\u76D1\u542C\u5730\u5740",en:"Listen address"},"client.listenPort":{zh:"\u76D1\u542C\u7AEF\u53E3",en:"Listen port"},"client.automaticPortHint":{zh:"0 \u8868\u793A\u81EA\u52A8\u9009\u62E9",en:"0 means choose automatically"},"client.targetHost":{zh:"\u76EE\u6807\u4E3B\u673A",en:"Target host"},"client.targetPort":{zh:"\u76EE\u6807\u7AEF\u53E3",en:"Target port"},"client.autoStart":{zh:"\u81EA\u52A8\u542F\u52A8",en:"Auto-start"},"client.restoreThisForwardWhenDshStarts":{zh:"DSH \u542F\u52A8\u65F6\u6062\u590D\u6B64\u8F6C\u53D1",en:"Restore this forward when DSH starts"},"client.saveRule":{zh:"\u4FDD\u5B58\u89C4\u5219",en:"Save rule"},"client.commonProxies":{zh:"\u5E38\u7528\u4EE3\u7406",en:"Common proxies"},"client.sshJumpHost":{zh:"SSH \u8DF3\u677F",en:"SSH jump host"},"client.httpProxy":{zh:"HTTP \u4EE3\u7406",en:"HTTP proxy"},"client.socks5Proxy":{zh:"SOCKS5 \u4EE3\u7406",en:"SOCKS5 proxy"},"client.running":{zh:"\u8FD0\u884C\u4E2D \xB7 {0}",en:"Running \xB7 {0}"},"client.starting":{zh:"\u542F\u52A8\u4E2D",en:"Starting"},"client.failed":{zh:"\u5931\u8D25",en:"Failed"},"client.stopped":{zh:"\u5DF2\u505C\u6B62",en:"Stopped"},"commands-panel.saveCommandsManuallyThenSelectAndConfirmExecutionIn":{zh:"\u624B\u52A8\u8BB0\u5F55\uFF0C\u5728\u7EC8\u7AEF\u4E2D\u9009\u62E9\u5E76\u786E\u8BA4\u6267\u884C\u3002\u8BF7\u52FF\u4FDD\u5B58\u5BC6\u7801\u6216 Token\u3002",en:"Save commands manually, then select and confirm execution in a terminal. Do not store passwords or tokens."},"commands-panel.newCommand":{zh:"\u65B0\u5EFA\u547D\u4EE4",en:"New command"},"commands-panel.searchCommands":{zh:"\u641C\u7D22\u547D\u4EE4",en:"Search commands"},"commands-panel.searchNamesOrCommands":{zh:"\u641C\u7D22\u540D\u79F0\u6216\u547D\u4EE4\u2026",en:"Search names or commands\u2026"},"commands-panel.retry":{zh:"\u91CD\u8BD5",en:"Retry"},"commands-panel.loadingCommands":{zh:"\u6B63\u5728\u8BFB\u53D6\u547D\u4EE4\u2026",en:"Loading commands\u2026"},"commands-panel.noMatchingCommands":{zh:"\u6CA1\u6709\u5339\u914D\u7684\u547D\u4EE4",en:"No matching commands"},"commands-panel.noSavedCommandsYetCreateOneOnTheWorkspace":{zh:"\u8FD8\u6CA1\u6709\u5E38\u7528\u547D\u4EE4\uFF0C\u8BF7\u5148\u5230\u5DE5\u4F5C\u53F0\u7684\u5E38\u7528\u547D\u4EE4\u9875\u9762\u65B0\u5EFA\u3002",en:"No saved commands yet. Create one on the workspace\u2019s Saved commands page."},"commands-panel.noSavedCommandsYetClickNewCommandToGet":{zh:"\u8FD8\u6CA1\u6709\u5E38\u7528\u547D\u4EE4\uFF0C\u70B9\u51FB\u65B0\u5EFA\u5F00\u59CB\u8BB0\u5F55\u3002",en:"No saved commands yet. Click New command to get started."},"commands-panel.select":{zh:"\u9009\u7528",en:"Select"},"commands-panel.editCommand":{zh:"\u7F16\u8F91\u547D\u4EE4",en:"Edit command"},"commands-panel.deleteCommand":{zh:"\u5220\u9664\u547D\u4EE4",en:"Delete command"},"commands-panel.commandPages":{zh:"\u547D\u4EE4\u5206\u9875",en:"Command pages"},"commands-panel.pages":{zh:"\u9875 \xB7",en:"pages \xB7"},"commands-panel.items":{zh:"\u6761",en:"items"},"commands-panel.previousPage":{zh:"\u4E0A\u4E00\u9875",en:"Previous page"},"commands-panel.nextPage":{zh:"\u4E0B\u4E00\u9875",en:"Next page"},"commands-panel.deleteSavedCommand":{zh:"\u5220\u9664\u5E38\u7528\u547D\u4EE4",en:"Delete saved command"},"commands-panel.onlyThisRecordIsDeletedRunningTerminalsAreNot":{zh:"\u4EC5\u5220\u9664\u8BB0\u5F55\uFF0C\u4E0D\u5F71\u54CD\u5DF2\u7ECF\u8FD0\u884C\u7684\u7EC8\u7AEF\u3002",en:"Only this record is deleted. Running terminals are not affected."},"commands-panel.deleting":{zh:"\u5220\u9664\u4E2D\u2026",en:"Deleting\u2026"},"commands-panel.command":{zh:"\u547D\u4EE4",en:"Command"},"commands-panel.multiLineScriptsAreSupportedRecordsStayInThis":{zh:"\u652F\u6301\u591A\u884C\u811A\u672C\uFF1B\u8BB0\u5F55\u4FDD\u5B58\u5728\u5F53\u524D DSH \u5B9E\u4F8B\uFF0C\u4E0D\u4F1A\u81EA\u52A8\u6267\u884C\u6216\u4E0A\u4F20\u5230 Gist\u3002",en:"Multi-line scripts are supported. Records stay in this DSH instance and are not executed automatically or uploaded to Gist."},"commands-panel.save":{zh:"\u4FDD\u5B58",en:"Save"},"file-entry-delete-dialog.deleteItems":{zh:"\u5220\u9664 {0} \u9879\uFF1F",en:"Delete {0} items?"},"file-entry-delete-dialog.thisCannotBeUndone":{zh:"{0} \xB7 \u6B64\u64CD\u4F5C\u65E0\u6CD5\u64A4\u9500",en:"{0} \xB7 this cannot be undone"},"file-entry-delete-dialog.theCurrentSessionDirectory":{zh:"\u5F53\u524D\u4F1A\u8BDD\u76EE\u5F55",en:"the current session directory"},"file-entry-delete-dialog.ofTheseDirectoriesAndAllTheirContentsWillBe":{zh:"\u5176\u4E2D {0} \u4E2A\u76EE\u5F55\u53CA\u5176\u5168\u90E8\u5185\u5BB9\u4F1A\u88AB\u9012\u5F52\u5220\u9664\u3002",en:"Of these, {0} directories and all their contents will be recursively deleted."},"file-entry-delete-dialog.andAnother":{zh:"\u4EE5\u53CA\u5176\u4ED6",en:"and another"},"file-entry-delete-dialog.items":{zh:"\u9879",en:"items"},"file-entry-delete-dialog.deleting":{zh:"\u6B63\u5728\u5220\u9664\u2026",en:"Deleting\u2026"},"file-entry-delete-dialog.confirmDelete":{zh:"\u786E\u8BA4\u5220\u9664",en:"Confirm delete"},"file-transfer-workspace.directStreamingTransfersBetweenFtpFtpsAndSftp":{zh:"FTP\u3001FTPS \u4E0E SFTP \u4E4B\u95F4\u76F4\u63A5\u6D41\u5F0F\u4E92\u4F20",en:"Direct streaming transfers between FTP, FTPS, and SFTP"},"file-transfer-workspace.sessionAccess":{zh:"\u4F1A\u8BDD\u8BBF\u95EE \xB7",en:"Session access \xB7"},"file-transfer-workspace.ftpManager":{zh:"FTP \u7BA1\u7406",en:"FTP manager"},"file-transfer-workspace.fileTransferTasksPage":{zh:"\u6587\u4EF6\u4F20\u8F93\u4EFB\u52A1\u9875",en:"File transfer tasks page"},"file-transfer-workspace.close":{zh:"\u5173\u95ED {0}",en:"Close {0}"},"file-transfer-workspace.newTransferTasksPage":{zh:"\u65B0\u5EFA\u4F20\u8F93\u4EFB\u52A1\u9875",en:"New transfer tasks page"},"file-transfer-workspace.panes":{zh:"\u7A97\u683C\u6570\u91CF",en:"Panes"},"file-transfer-workspace.panes2":{zh:"\u680F",en:"panes"},"file-transfer-workspace.noFileConnectionsAvailableYet":{zh:"\u8FD8\u6CA1\u6709\u53EF\u7528\u6587\u4EF6\u8FDE\u63A5",en:"No file connections available yet"},"file-transfer-workspace.createAnFtpFtpsConnectionOrAddAnSsh":{zh:"\u65B0\u5EFA FTP/FTPS \u8FDE\u63A5\uFF0C\u6216\u5148\u6DFB\u52A0\u4E00\u53F0 SSH \u4E3B\u673A\u4F7F\u7528 SFTP\u3002",en:"Create an FTP/FTPS connection, or add an SSH host first to use SFTP."},"file-transfer-workspace.newFtpConnection":{zh:"\u65B0\u5EFA FTP \u8FDE\u63A5",en:"New FTP connection"},"file-transfer-workspace.connectionList":{zh:"\u8FDE\u63A5\u5217\u8868",en:"Connection list"},"file-transfer-workspace.clickAConnectionToBrowseRemoteFiles":{zh:"\u5355\u51FB\u8FDE\u63A5\u540E\u6D4F\u89C8\u8FDC\u7AEF\u6587\u4EF6",en:"Click a connection to browse remote files"},"file-transfer-workspace.sshHosts":{zh:"SSH \u4E3B\u673A",en:"SSH hosts"},"file-transfer-workspace.fileConnections":{zh:"\u6587\u4EF6\u8FDE\u63A5",en:"File connections"},"file-transfer-workspace.availableConnections":{zh:"\u4E2A\u53EF\u7528\u8FDE\u63A5",en:"available connections"},"file-transfer-workspace.sftpReusesSshHostConfiguration":{zh:"SFTP \u590D\u7528 SSH \u4E3B\u673A\u914D\u7F6E",en:"SFTP reuses SSH host configuration"},"file-transfer-workspace.backToConnectionList":{zh:"\u8FD4\u56DE\u8FDE\u63A5\u5217\u8868",en:"Back to connection list"},"file-transfer-workspace.parentDirectory":{zh:"\u4E0A\u4E00\u7EA7\u76EE\u5F55",en:"Parent directory"},"file-transfer-workspace.refreshDirectory":{zh:"\u5237\u65B0\u76EE\u5F55",en:"Refresh directory"},"file-transfer-workspace.remotePath":{zh:"\u8FDC\u7AEF\u8DEF\u5F84",en:"Remote path"},"file-transfer-workspace.goTo":{zh:"\u524D\u5F80",en:"Go to"},"file-transfer-workspace.size":{zh:"\u5927\u5C0F",en:"Size"},"file-transfer-workspace.modified":{zh:"\u4FEE\u6539\u65F6\u95F4",en:"Modified"},"file-transfer-workspace.actions":{zh:"\u64CD\u4F5C",en:"Actions"},"file-transfer-workspace.readingDirectory":{zh:"\u6B63\u5728\u8BFB\u53D6\u76EE\u5F55\u2026",en:"Reading directory\u2026"},"file-transfer-workspace.thisDirectoryIsEmpty":{zh:"\u8FD9\u4E2A\u76EE\u5F55\u662F\u7A7A\u7684\u3002",en:"This directory is empty."},"file-transfer-workspace.selectedItems":{zh:"\u5DF2\u9009\u62E9 {0} \u9879",en:"Selected {0} items"},"file-transfer-workspace.items":{zh:"{0} \u9879",en:"{0} items"},"file-transfer-workspace.sendToNextPane":{zh:"\u4F20\u9001\u5230\u4E0B\u4E00\u680F",en:"Send to next pane"},"file-transfer-workspace.moveToThisDirectory":{zh:"\u79FB\u52A8\u5230\u6B64\u76EE\u5F55",en:"Move to this directory"},"file-transfer-workspace.copyToThisDirectory":{zh:"\u590D\u5236\u5230\u6B64\u76EE\u5F55",en:"Copy to this directory"},"file-transfer-workspace.download":{zh:"\u4E0B\u8F7D\u5230\u672C\u5730",en:"Download"},"file-transfer-workspace.directoryClickToEnterAcceptsDragDrop":{zh:"\uFF0C\u76EE\u5F55\uFF0C\u5355\u51FB\u8FDB\u5165\uFF1B\u53EF\u63A5\u6536\u62D6\u653E",en:", directory, click to enter; accepts drag & drop"},"file-transfer-workspace.clickToView":{zh:"\uFF0C\u5355\u51FB\u67E5\u770B",en:", click to view"},"file-transfer-workspace.downloadLocally":{zh:"\u4E0B\u8F7D {0} \u5230\u672C\u5730",en:"Download {0} locally"},"file-transfer-workspace.packageAndDownloadLocally":{zh:"\u5C06 {0} \u6253\u5305\u4E0B\u8F7D\u5230\u672C\u5730",en:"Package {0} and download locally"},"file-transfer-workspace.collapseTransferTasks":{zh:"\u6536\u8D77\u4F20\u8F93\u4EFB\u52A1",en:"Collapse transfer tasks"},"file-transfer-workspace.expandTransferTasks":{zh:"\u5C55\u5F00\u4F20\u8F93\u4EFB\u52A1",en:"Expand transfer tasks"},"file-transfer-workspace.transferTasks":{zh:"\u4F20\u8F93\u4EFB\u52A1",en:"Transfer tasks"},"file-transfer-workspace.inProgress":{zh:"{0} \u4E2A\u8FDB\u884C\u4E2D",en:"{0} in progress"},"file-transfer-workspace.recentTasks":{zh:"\u6700\u8FD1\u4EFB\u52A1",en:"Recent tasks"},"file-transfer-workspace.noTasksYet":{zh:"\u6682\u65E0\u4EFB\u52A1",en:"No tasks yet"},"file-transfer-workspace.dragFromOnePaneToAnotherOrSelectFiles":{zh:"\u4ECE\u4E00\u4E2A\u7A97\u683C\u62D6\u5230\u53E6\u4E00\u4E2A\u7A97\u683C\uFF0C\u6216\u9009\u4E2D\u6587\u4EF6\u540E\u70B9\u51FB\u201C\u4F20\u9001\u5230\u4E0B\u4E00\u680F\u201D\u3002",en:"Drag from one pane to another, or select files and click \u201CSend to next pane\u201D."},"file-transfer-workspace.cancelTransfer":{zh:"\u53D6\u6D88\u4F20\u8F93",en:"Cancel transfer"},"file-transfer-workspace.handle":{zh:"\u5904\u7406",en:"Handle"},"file-transfer-workspace.aFileWithTheSameNameExistsAtThe":{zh:"\u76EE\u6807\u4E2D\u5B58\u5728\u540C\u540D\u6587\u4EF6",en:"A file with the same name exists at the destination"},"file-transfer-workspace.chooseHowToHandleThisBatchOfTransfers":{zh:"\u4E3A\u672C\u6279\u4F20\u8F93\u9009\u62E9\u5904\u7406\u65B9\u5F0F",en:"Choose how to handle this batch of transfers"},"file-transfer-workspace.autoRename":{zh:"\u81EA\u52A8\u91CD\u547D\u540D",en:"Auto rename"},"file-transfer-workspace.keepBothFilesAppendANumberToTheName":{zh:"\u4FDD\u7559\u4E24\u4EFD\u6587\u4EF6\uFF0C\u5728\u540D\u79F0\u540E\u6DFB\u52A0\u5E8F\u53F7",en:"Keep both files; append a number to the name"},"file-transfer-workspace.skipFilesWithTheSameName":{zh:"\u8DF3\u8FC7\u540C\u540D\u6587\u4EF6",en:"Skip files with the same name"},"file-transfer-workspace.continueTransferringTheRemainingItems":{zh:"\u7EE7\u7EED\u4F20\u8F93\u5176\u4ED6\u5185\u5BB9",en:"Continue transferring the remaining items"},"file-transfer-workspace.overwriteTheTargetFiles":{zh:"\u8986\u76D6\u76EE\u6807\u6587\u4EF6",en:"Overwrite the target files"},"file-transfer-workspace.replaceTheDestinationContentWithTheSourceContent":{zh:"\u4F7F\u7528\u6765\u6E90\u5185\u5BB9\u66FF\u6362\u76EE\u6807\u5185\u5BB9",en:"Replace the destination content with the source content"},"file-transfer-workspace.reQueuing":{zh:"\u6B63\u5728\u91CD\u65B0\u52A0\u5165\u961F\u5217\u2026",en:"Re-queuing\u2026"},"file-transfer-workspace.continueTransfer":{zh:"\u7EE7\u7EED\u4F20\u8F93",en:"Continue transfer"},"file-transfer-workspace.sessionAccess2":{zh:"\u4F1A\u8BDD\u8BBF\u95EE",en:"Session access"},"file-transfer-workspace.manageTheRemoteFileConnectionsAvailableToThisSession":{zh:"\u5355\u72EC\u7BA1\u7406\u5F53\u524D\u4F1A\u8BDD\u53EF\u4F7F\u7528\u7684\u8FDC\u7AEF\u6587\u4EF6\u8FDE\u63A5",en:"Manage the remote file connections available to this session"},"file-transfer-workspace.letTheCurrentSessionBrowseSelectedFtpFtpsOr":{zh:"\u5141\u8BB8\u5F53\u524D\u4F1A\u8BDD\u6D4F\u89C8\u6307\u5B9A\u7684 FTP\u3001FTPS \u6216 SFTP",en:"Let the current session browse selected FTP, FTPS, or SFTP"},"file-transfer-workspace.noConnectionsAvailable":{zh:"\u6CA1\u6709\u53EF\u7528\u8FDE\u63A5",en:"No connections available"},"file-transfer-workspace.addAnFtpInFileTransferFirstOrAdd":{zh:"\u8BF7\u5148\u5728\u6587\u4EF6\u4F20\u8F93\u4E2D\u6DFB\u52A0 FTP\uFF0C\u6216\u5728\u4E3B\u673A\u9762\u677F\u4E2D\u6DFB\u52A0 SSH \u4E3B\u673A\u3002",en:"Add an FTP in File Transfer first, or add an SSH host in the hosts panel."},"file-transfer-workspace.accessPolicy":{zh:"\u8BBF\u95EE\u7B56\u7565",en:"Access policy"},"file-transfer-workspace.filePermissionsAreSeparateFromSshCommandAndTerminal":{zh:"\u6587\u4EF6\u6743\u9650\u4E0E SSH \u547D\u4EE4\u3001\u7EC8\u7AEF\u6743\u9650\u76F8\u4E92\u72EC\u7ACB",en:"File permissions are separate from SSH command and terminal permissions"},"file-transfer-workspace.fileOperationPermissions":{zh:"\u6587\u4EF6\u64CD\u4F5C\u6743\u9650",en:"File operation permissions"},"file-transfer-workspace.browseModeDoesNotExposeCrossEndpointTransferTools":{zh:"\u6D4F\u89C8\u6A21\u5F0F\u4E0D\u4F1A\u5411 AI \u66B4\u9732\u8DE8\u7AEF\u4F20\u8F93\u5DE5\u5177",en:"Browse mode does not expose cross-endpoint transfer tools to the AI"},"file-transfer-workspace.confirmBeforeTransfer":{zh:"\u4F20\u8F93\u524D\u786E\u8BA4",en:"Confirm before transfer"},"file-transfer-workspace.requireDshApprovalWhenTheAiStartsATransfer":{zh:"AI \u53D1\u8D77\u4F20\u8F93\u65F6\u8BF7\u6C42 DSH \u6388\u6743",en:"Require DSH approval when the AI starts a transfer"},"file-transfer-workspace.savingChanges":{zh:"\u6B63\u5728\u4FDD\u5B58\u66F4\u6539",en:"Saving changes"},"file-transfer-workspace.autosaves":{zh:"{0} \xB7 \u81EA\u52A8\u4FDD\u5B58",en:"{0} \xB7 autosaves"},"file-transfer-workspace.authorizedConnections":{zh:"\u5DF2\u6388\u6743 {0} \u4E2A\u8FDE\u63A5",en:"Authorized {0} connections"},"file-transfer-workspace.noAuthorizedConnections":{zh:"\u672A\u6388\u6743\u8FDE\u63A5",en:"No authorized connections"},"file-transfer-workspace.done":{zh:"\u5B8C\u6210",en:"Done"},"file-transfer-workspace.authorized":{zh:"\u5DF2\u6388\u6743",en:"Authorized"},"file-transfer-workspace.notAuthorized":{zh:"\u672A\u6388\u6743",en:"Not authorized"},"file-transfer-workspace.readingSessionPermissions":{zh:"\u6B63\u5728\u8BFB\u53D6\u4F1A\u8BDD\u6743\u9650",en:"Reading session permissions"},"file-transfer-workspace.browseOnly":{zh:"\u4EC5\u6D4F\u89C8",en:"Browse only"},"file-transfer-workspace.allowTransfer":{zh:"\u5141\u8BB8\u4F20\u8F93",en:"Allow transfer"},"file-transfer-workspace.confirmationRequired":{zh:"\u9700\u8981\u786E\u8BA4",en:"Confirmation required"},"file-transfer-workspace.runDirectly":{zh:"\u76F4\u63A5\u6267\u884C",en:"Run directly"},"file-transfer-workspace.tasks":{zh:"\u4EFB\u52A1 {0}",en:"Tasks {0}"},"file-transfer-workspace.files":{zh:"\u6587\u4EF6",en:"Files"},"file-transfer-workspace.andMore":{zh:"{0} \u7B49 {1} \u9879",en:"{0} and {1} more"},"file-transfer-workspace.waitingToTransfer":{zh:"\u7B49\u5F85\u4F20\u8F93",en:"Waiting to transfer"},"file-transfer-workspace.scanningDirectories":{zh:"\u6B63\u5728\u626B\u63CF\u76EE\u5F55",en:"Scanning directories"},"file-transfer-workspace.expirySuffix":{zh:" \xB7 \u7EA6 {0}",en:" \xB7 ~ {0}"},"file-transfer-workspace.completedFiles":{zh:"\u5DF2\u5B8C\u6210 {0} \u4E2A\u6587\u4EF6{1}",en:"Completed {0} files{1}"},"file-transfer-workspace.skipped":{zh:"\uFF0C\u8DF3\u8FC7 {0}",en:", skipped {0}"},"file-transfer-workspace.cancelled":{zh:"\u5DF2\u53D6\u6D88",en:"Cancelled"},"file-transfer-workspace.transferFailed":{zh:"\u4F20\u8F93\u5931\u8D25",en:"Transfer failed"},"file-transfer-workspace.created":{zh:"\u521B\u5EFA\u4E8E {0}",en:"Created {0}"},"file-transfer-workspace.executed":{zh:"\u5DF2\u6267\u884C {0}",en:"Executed {0}"},"file-transfer-workspace.tookCompleted":{zh:"\u8017\u65F6 {0} \xB7 \u5B8C\u6210\u4E8E {1}",en:"Took {0} \xB7 completed {1}"},"file-transfer-workspace.seconds":{zh:"{0} \u79D2",en:"{0} seconds"},"file-transfer-workspace.minutesSeconds":{zh:"{0} \u5206 {1} \u79D2",en:"{0} minutes {1} seconds"},"file-transfer-workspace.hoursMinutes":{zh:"{0} \u5C0F\u65F6 {1} \u5206",en:"{0} hours {1} minutes"},"file-transfer-workspace.minutes":{zh:"{0} \u5206\u949F",en:"{0} minutes"},"file-transfer-workspace.hMin":{zh:"{0} \u5C0F\u65F6 {1} \u5206\u949F",en:"{0} h {1} min"},"ftp-profile-editor.manageFtpAndFtpsSftpReusesExistingSshHosts":{zh:"\u7BA1\u7406 FTP \u4E0E FTPS\uFF1BSFTP \u76F4\u63A5\u590D\u7528\u5DF2\u6709 SSH \u4E3B\u673A",en:"Manage FTP and FTPS; SFTP reuses existing SSH hosts directly"},"ftp-profile-editor.new":{zh:"\u65B0\u5EFA",en:"New"},"ftp-profile-editor.noStandaloneFileConnectionsYet":{zh:"\u8FD8\u6CA1\u6709\u72EC\u7ACB\u6587\u4EF6\u8FDE\u63A5",en:"No standalone file connections yet"},"ftp-profile-editor.sftpAppearsInTheFilePaneSConnectionList":{zh:"SFTP \u4F1A\u663E\u793A\u5728\u6587\u4EF6\u7A97\u683C\u7684\u8FDE\u63A5\u5217\u8868\u4E2D\uFF1B\u8FD9\u91CC\u53EA\u7BA1\u7406 FTP \u4E0E FTPS\u3002",en:"SFTP appears in the file pane's connection list; only FTP and FTPS are managed here."},"ftp-profile-editor.newFtpsConnection":{zh:"\u65B0\u5EFA FTPS \u8FDE\u63A5",en:"New FTPS connection"},"ftp-profile-editor.anonymous":{zh:"\u533F\u540D\u767B\u5F55",en:"Anonymous"},"ftp-profile-editor.missingPassword":{zh:"\u7F3A\u5C11\u5BC6\u7801",en:"Missing password"},"ftp-profile-editor.selectAConnectionToEdit":{zh:"\u9009\u62E9\u4E00\u4E2A\u8FDE\u63A5\u8FDB\u884C\u7F16\u8F91",en:"Select a connection to edit"},"ftp-profile-editor.theFilePaneCombinesFtpFtpsAndSftpFrom":{zh:"\u6587\u4EF6\u7A97\u683C\u4F1A\u628A\u8FD9\u91CC\u4FDD\u5B58\u7684 FTP\u3001FTPS \u4E0E SSH \u4E3B\u673A\u63D0\u4F9B\u7684 SFTP \u6C47\u603B\u6210\u8FDE\u63A5\u5217\u8868\u3002",en:"The file pane combines FTP, FTPS, and SFTP from SSH hosts saved here into one connection list."},"ftp-profile-editor.encryptsControlAndFileDataCertificatesStrictlyValidatedBy":{zh:"\u52A0\u5BC6\u63A7\u5236\u4E0E\u6587\u4EF6\u6570\u636E\uFF0C\u9ED8\u8BA4\u4E25\u683C\u6821\u9A8C\u8BC1\u4E66",en:"Encrypts control and file data; certificates strictly validated by default"},"ftp-profile-editor.compatibleWithLegacyServersButCredentialsAndFileContent":{zh:"\u517C\u5BB9\u65E7\u670D\u52A1\u5668\uFF0C\u4F46\u8D26\u53F7\u548C\u6587\u4EF6\u5185\u5BB9\u4E0D\u52A0\u5BC6",en:"Compatible with legacy servers, but credentials and file content are unencrypted"},"ftp-profile-editor.managedBySshHostsNoNeedToConfigureIt":{zh:"\u7531 SSH \u4E3B\u673A\u7BA1\u7406\uFF0C\u4E0D\u5728\u8FD9\u91CC\u91CD\u590D\u914D\u7F6E",en:"Managed by SSH hosts; no need to configure it again here"},"ftp-profile-editor.delete":{zh:"\u5220\u9664\u201C",en:"Delete \u201C"},"ftp-profile-editor.thisRemovesTheFtpFtpsConnectionAndItsSeparately":{zh:"\u5C06\u79FB\u9664\u8BE5 FTP/FTPS \u8FDE\u63A5\u53CA\u5176\u72EC\u7ACB\u4FDD\u5B58\u7684\u5BC6\u7801\uFF0C\u4E0D\u4F1A\u5220\u9664\u8FDC\u7AEF\u670D\u52A1\u5668\u4E0A\u7684\u4EFB\u4F55\u6587\u4EF6\u3002",en:"This removes the FTP/FTPS connection and its separately saved password. No files on the remote server will be deleted."},"ftp-profile-editor.deleteConnection":{zh:"\u5220\u9664\u8FDE\u63A5",en:"Delete connection"},"ftp-profile-editor.connectedInitialDirectoryIsReadable":{zh:"\u8FDE\u63A5\u6210\u529F\uFF0C\u521D\u59CB\u76EE\u5F55\u53EF\u8BFB\u53D6",en:"Connected; initial directory is readable"},"ftp-profile-editor.newFileConnection":{zh:"\u65B0\u5EFA\u6587\u4EF6\u8FDE\u63A5",en:"New file connection"},"ftp-profile-editor.enterServerAndAuthenticationDetails":{zh:"\u586B\u5199\u670D\u52A1\u5668\u548C\u8BA4\u8BC1\u4FE1\u606F",en:"Enter server and authentication details"},"ftp-profile-editor.afterEditsTestBeforeSaving":{zh:"\u4FEE\u6539\u540E\u53EF\u5148\u6D4B\u8BD5\u518D\u4FDD\u5B58",en:"After edits, test before saving"},"ftp-profile-editor.connectionType":{zh:"\u8FDE\u63A5\u7C7B\u578B",en:"Connection type"},"ftp-profile-editor.preferFtpsChooseFtpOnlyWhenTheServerLacks":{zh:"\u4F18\u5148\u4F7F\u7528 FTPS\uFF1B\u4EC5\u5728\u670D\u52A1\u5668\u4E0D\u652F\u6301 TLS \u65F6\u9009\u62E9 FTP",en:"Prefer FTPS; choose FTP only when the server lacks TLS support"},"ftp-profile-editor.connectionProtocol":{zh:"\u8FDE\u63A5\u534F\u8BAE",en:"Connection protocol"},"ftp-profile-editor.explicitTlsRecommended":{zh:"\u663E\u5F0F TLS \xB7 \u63A8\u8350",en:"Explicit TLS \xB7 recommended"},"ftp-profile-editor.implicitTls":{zh:"\u9690\u5F0F TLS",en:"Implicit TLS"},"ftp-profile-editor.unencrypted":{zh:"\u672A\u52A0\u5BC6",en:"Unencrypted"},"ftp-profile-editor.plainFtpSendsYourAccountPasswordAndFileContent":{zh:"\u666E\u901A FTP \u7684\u8D26\u53F7\u3001\u5BC6\u7801\u548C\u6587\u4EF6\u5185\u5BB9\u5747\u4E0D\u52A0\u5BC6\u3002",en:"Plain FTP sends your account, password, and file content unencrypted."},"ftp-profile-editor.server":{zh:"\u670D\u52A1\u5668",en:"Server"},"ftp-profile-editor.theNameAppearsInTheConnectionListGroupsAnd":{zh:"\u540D\u79F0\u7528\u4E8E\u8FDE\u63A5\u5217\u8868\uFF0C\u5206\u7EC4\u4E0E\u6807\u7B7E\u53EF\u590D\u7528\u5DF2\u6709\u9009\u9879",en:"The name appears in the connection list; groups and tags can reuse existing options"},"ftp-profile-editor.connectionName":{zh:"\u8FDE\u63A5\u540D\u79F0",en:"Connection name"},"ftp-profile-editor.groupOptional":{zh:"\u5206\u7EC4\uFF08\u53EF\u9009\uFF09",en:"Group (optional)"},"ftp-profile-editor.ftpGroups":{zh:"FTP \u5206\u7EC4",en:"FTP groups"},"ftp-profile-editor.selectAnExistingGroupOrEnterANewOne":{zh:"\u9009\u62E9\u5DF2\u6709\u5206\u7EC4\u6216\u8F93\u5165\u65B0\u5206\u7EC4",en:"Select an existing group or enter a new one"},"ftp-profile-editor.serverAddress":{zh:"\u670D\u52A1\u5668\u5730\u5740",en:"Server address"},"ftp-profile-editor.port":{zh:"\u7AEF\u53E3",en:"Port"},"ftp-profile-editor.tagsOptional":{zh:"\u6807\u7B7E\uFF08\u53EF\u9009\uFF09",en:"Tags (optional)"},"ftp-profile-editor.pickExistingTagsOrTypeNewOnesSeparateMultiple":{zh:"\u53EF\u9009\u62E9\u5DF2\u6709\u6807\u7B7E\u6216\u76F4\u63A5\u8F93\u5165\uFF1B\u591A\u4E2A\u6807\u7B7E\u4F7F\u7528\u9017\u53F7\u5206\u9694\u3002",en:"Pick existing tags or type new ones; separate multiple tags with commas."},"ftp-profile-editor.ftpTags":{zh:"FTP \u6807\u7B7E",en:"FTP tags"},"ftp-profile-editor.selectOrEnterTags":{zh:"\u9009\u62E9\u6216\u8F93\u5165\u6807\u7B7E",en:"Select or enter tags"},"ftp-profile-editor.authentication":{zh:"\u8EAB\u4EFD\u8BA4\u8BC1",en:"Authentication"},"ftp-profile-editor.thePasswordIsWrittenOnlyToTheDshCredential":{zh:"\u5BC6\u7801\u53EA\u5199\u5165 DSH \u51ED\u636E\u670D\u52A1\uFF0C\u4E0D\u4F1A\u5728\u754C\u9762\u56DE\u663E",en:"The password is written only to the DSH credential service and never echoed in the UI"},"ftp-profile-editor.signInMethod":{zh:"\u767B\u5F55\u65B9\u5F0F",en:"Sign-in method"},"ftp-profile-editor.usernameAndPassword":{zh:"\u8D26\u53F7\u5BC6\u7801",en:"Username and password"},"ftp-profile-editor.signInAsAnonymousWithoutEnteringCredentialsTheServer":{zh:"\u4F7F\u7528 anonymous \u767B\u5F55\uFF0C\u65E0\u9700\u586B\u5199\u8D26\u53F7\u5BC6\u7801\uFF1B\u670D\u52A1\u5668\u5FC5\u987B\u5F00\u653E\u533F\u540D\u8BBF\u95EE\u3002",en:"Sign in as anonymous without entering credentials. The server must allow anonymous access."},"ftp-profile-editor.credentialSource":{zh:"\u51ED\u636E\u6765\u6E90",en:"Credential source"},"ftp-profile-editor.saveThePasswordWithThisConnectionOnly":{zh:"\u6B64\u8FDE\u63A5\u5355\u72EC\u4FDD\u5B58\u5BC6\u7801",en:"Save the password with this connection only"},"ftp-profile-editor.notEchoedAfterSaving":{zh:"\u4FDD\u5B58\u540E\u4E0D\u4F1A\u56DE\u663E",en:"Not echoed after saving"},"ftp-profile-editor.pathAndNetwork":{zh:"\u8DEF\u5F84\u4E0E\u7F51\u7EDC",en:"Path and network"},"ftp-profile-editor.proxyReusesTheSshPluginSProxyLibraryControl":{zh:"\u4EE3\u7406\u590D\u7528 SSH \u63D2\u4EF6\u7684\u4EE3\u7406\u5E93\uFF0C\u63A7\u5236\u548C\u6570\u636E\u8FDE\u63A5\u4F7F\u7528\u540C\u4E00\u8DEF\u5F84",en:"Proxy reuses the SSH plugin's proxy library; control and data connections take the same path"},"ftp-profile-editor.initialDirectory":{zh:"\u521D\u59CB\u76EE\u5F55",en:"Initial directory"},"ftp-profile-editor.connectionProxy":{zh:"\u8FDE\u63A5\u4EE3\u7406",en:"Connection proxy"},"ftp-profile-editor.advancedConnectionSettings":{zh:"\u9AD8\u7EA7\u8FDE\u63A5\u8BBE\u7F6E",en:"Advanced connection settings"},"ftp-profile-editor.connectionTimeoutMs":{zh:"\u8FDE\u63A5\u8D85\u65F6\uFF08\u6BEB\u79D2\uFF09",en:"Connection timeout (ms)"},"ftp-profile-editor.tlsServerName":{zh:"TLS \u670D\u52A1\u5668\u540D\u79F0",en:"TLS server name"},"ftp-profile-editor.fillInWhenTheCertificateNameDiffersFromThe":{zh:"\u8BC1\u4E66\u540D\u79F0\u4E0E\u4E3B\u673A\u4E0D\u540C\u65F6\u586B\u5199",en:"Fill in when the certificate name differs from the host"},"ftp-profile-editor.testing":{zh:"\u6B63\u5728\u6D4B\u8BD5\u2026",en:"Testing\u2026"},"ftp-profile-editor.saveConnection":{zh:"\u4FDD\u5B58\u8FDE\u63A5",en:"Save connection"},"html-file-preview.isolatedStaticPreviewScriptsAndExternalOrRelativeResources":{zh:"\u9759\u6001\u9694\u79BB\u9884\u89C8\uFF1A\u4E0D\u6267\u884C\u811A\u672C\uFF0C\u4E0D\u52A0\u8F7D\u5916\u90E8\u6216\u76F8\u5BF9\u8DEF\u5F84\u8D44\u6E90",en:"Isolated static preview: scripts and external or relative resources are disabled"},"html-file-preview.contentTruncated":{zh:"\u5185\u5BB9\u5DF2\u622A\u65AD",en:"Content truncated"},"html-file-preview.staticPreview":{zh:"\u9759\u6001\u9884\u89C8",en:"Static preview"},"html-file-preview.viewHtmlSource":{zh:"\u67E5\u770B HTML \u6E90\u7801",en:"View HTML source"},"html-file-preview.page":{zh:"\u9875\u9762",en:"Page"},"html-file-preview.source":{zh:"\u6E90\u7801",en:"Source"},"html-file-preview.htmlPreview":{zh:"HTML \u9884\u89C8\uFF1A{0}",en:"HTML preview: {0}"},"markdown-preview-editor.markdownBody":{zh:"Markdown \u6B63\u6587",en:"Markdown body"},"native-directory-button.theDshEnvironmentHasNoSupportedFileManagerUse":{zh:"DSH \u8FD0\u884C\u73AF\u5883\u4E0D\u652F\u6301\u7CFB\u7EDF\u6587\u4EF6\u7BA1\u7406\u5668\uFF0C\u8BF7\u4F7F\u7528\u76EE\u5F55\u5F39\u7A97\u6216\u4E0B\u8F7D",en:"The DSH environment has no supported file manager. Use the directory dialog or download instead."},"native-directory-button.requestedTheFileManagerOnTheComputerRunningDsh":{zh:"\u5DF2\u8BF7\u6C42\u5728 DSH \u6240\u5728\u7535\u8111\u6253\u5F00\u6587\u4EF6\u7BA1\u7406\u5668",en:"Requested the file manager on the computer running DSH"},"native-directory-button.openFileManager":{zh:"\u6253\u5F00\u6587\u4EF6\u7BA1\u7406\u5668",en:"Open file manager"},"native-directory-button.checkingFileManagerSupport":{zh:"\u6B63\u5728\u68C0\u6D4B\u6587\u4EF6\u7BA1\u7406\u5668\u652F\u6301",en:"Checking file manager support"},"native-directory-button.openThisDirectoryInTheFileManagerOnThe":{zh:"\u5728 DSH \u6240\u5728\u7535\u8111\u7684\u6587\u4EF6\u7BA1\u7406\u5668\u4E2D\u6253\u5F00\u5F53\u524D\u76EE\u5F55",en:"Open this directory in the file manager on the computer running DSH"},"preview-refresh-control.previewRefresh":{zh:"\u9884\u89C8\u5237\u65B0",en:"Preview refresh"},"preview-refresh-control.refreshPreview":{zh:"\u5237\u65B0\u9884\u89C8",en:"Refresh preview"},"preview-refresh-control.saveYourChangesFirst":{zh:"\u8BF7\u5148\u4FDD\u5B58\u6B63\u6587\u4FEE\u6539",en:"Save your changes first"},"preview-refresh-control.refreshing":{zh:"\u6B63\u5728\u5237\u65B0\u2026",en:"Refreshing\u2026"},"preview-refresh-control.refreshPreviewAndKeepReadingPosition":{zh:"\u5237\u65B0\u9884\u89C8\uFF0C\u4FDD\u7559\u9605\u8BFB\u4F4D\u7F6E",en:"Refresh preview and keep reading position"},"preview-refresh-control.autoRefresh":{zh:"\u81EA\u52A8\u5237\u65B0",en:"Auto-refresh"},"preview-refresh-control.autoRefreshIsUnavailableForThisPreview":{zh:"\u6B64\u9884\u89C8\u6682\u4E0D\u652F\u6301\u81EA\u52A8\u5237\u65B0",en:"Auto-refresh is unavailable for this preview"},"preview-refresh-control.checkForChangesEvery5SecondsClickForManual":{zh:"\u6BCF 5 \u79D2\u68C0\u67E5\u53D8\u5316\uFF0C\u70B9\u51FB\u5207\u6362\u4E3A\u624B\u52A8",en:"Check for changes every 5 seconds; click for manual refresh"},"preview-refresh-control.manualRefreshClickToEnableAutoRefresh":{zh:"\u5F53\u524D\u624B\u52A8\u5237\u65B0\uFF0C\u70B9\u51FB\u5F00\u542F\u81EA\u52A8\u5237\u65B0",en:"Manual refresh; click to enable auto-refresh"},"preview-refresh-control.auto":{zh:"\u81EA\u52A8",en:"Auto"},"preview-refresh-control.manual":{zh:"\u624B\u52A8",en:"Manual"},"profile-editor.thisActionCannotBeUndone":{zh:"\u8FD9\u4E2A\u64CD\u4F5C\u65E0\u6CD5\u64A4\u9500",en:"This action cannot be undone"},"profile-editor.theConnectionConfigThisHostSStandaloneCredentialsAnd":{zh:"\u8FDE\u63A5\u914D\u7F6E\u3001\u8BE5\u4E3B\u673A\u7684\u72EC\u7ACB\u51ED\u636E\u548C\u5173\u8054\u7AEF\u53E3\u8F6C\u53D1\u4F1A\u4E00\u5E76\u5220\u9664\uFF1B\u5B83\u4E5F\u4F1A\u4ECE\u6240\u6709\u4F1A\u8BDD\u6388\u6743\u4E2D\u79FB\u9664\u3002\u5BC6\u94A5\u5E93\u4E2D\u7684\u5171\u4EAB\u51ED\u636E\u4E0D\u4F1A\u5220\u9664\u3002",en:"The connection config, this host's standalone credentials, and its port forwards are all deleted; it is also removed from every session grant. Shared credentials in the vault are not deleted."},"profile-editor.cannotDeleteYet":{zh:"\u6682\u65F6\u4E0D\u80FD\u5220\u9664",en:"Cannot delete yet"},"profile-editor.theseConnectionsStillUseItAsAnSshJump":{zh:"\u4EE5\u4E0B\u8FDE\u63A5\u4ECD\u5C06\u5B83\u4F5C\u4E3A SSH \u8DF3\u677F\uFF1A",en:"These connections still use it as an SSH jump host: "},"profile-editor.editTheirJumpChainsFirst":{zh:"\u3002\u8BF7\u5148\u4FEE\u6539\u8FD9\u4E9B\u8FDE\u63A5\u7684\u8DF3\u677F\u94FE\u3002",en:". Edit their jump chains first."},"profile-editor.thisAddressAndPortAreAlreadyUsedByChange":{zh:"\u8BE5\u5730\u5740\u548C\u7AEF\u53E3\u5DF2\u7531\u201C{0}\u201D\u4F7F\u7528\uFF0C\u8BF7\u4FEE\u6539\u4E3B\u673A\u6216\u7AEF\u53E3\u3002",en:"This address and port are already used by \u201C{0}\u201D \u2014 change the host or port."},"profile-editor.newSshConnection":{zh:"\u65B0\u5EFA SSH \u8FDE\u63A5",en:"New SSH connection"},"profile-editor.credentialsAreNotShownAgainAfterSaving":{zh:"\u51ED\u636E\u4FDD\u5B58\u540E\u4E0D\u4F1A\u56DE\u663E",en:"Credentials are not shown again after saving"},"profile-editor.connectionInfo":{zh:"\u8FDE\u63A5\u4FE1\u606F",en:"Connection info"},"profile-editor.hostAddressAndDisplay":{zh:"\u4E3B\u673A\u5730\u5740\u4E0E\u663E\u793A\u65B9\u5F0F",en:"Host address and display"},"profile-editor.devServer":{zh:"\u5F00\u53D1\u670D\u52A1\u5668",en:"Dev server"},"profile-editor.group":{zh:"\u5206\u7EC4",en:"Group"},"profile-editor.hostGroup":{zh:"\u4E3B\u673A\u5206\u7EC4",en:"Host group"},"profile-editor.tags":{zh:"\u6807\u7B7E",en:"Tags"},"profile-editor.hostTags":{zh:"\u4E3B\u673A\u6807\u7B7E",en:"Host tags"},"profile-editor.chooseSharedCredentialsOrSaveSeparately":{zh:"\u9009\u62E9\u5171\u4EAB\u51ED\u636E\u6216\u5355\u72EC\u4FDD\u5B58",en:"Choose shared credentials or save separately"},"profile-editor.useThisConnectionSOwnCredentialsOrReferenceA":{zh:"\u53EF\u4F7F\u7528\u6B64\u8FDE\u63A5\u81EA\u5DF1\u7684\u51ED\u636E\uFF0C\u6216\u5F15\u7528\u5BC6\u94A5\u5E93\u4E2D\u7684\u5E38\u7528\u8D26\u53F7\u3002",en:"Use this connection's own credentials, or reference a common account from the key store."},"profile-editor.savedWithThisConnectionOnly":{zh:"\u6B64\u8FDE\u63A5\u72EC\u7ACB\u4FDD\u5B58",en:"Saved with this connection only"},"profile-editor.ready":{zh:"\u5DF2\u5C31\u7EEA",en:"Ready"},"profile-editor.cannotBeReadBackAfterSaving":{zh:"\u4FDD\u5B58\u540E\u4E0D\u53EF\u8BFB\u56DE",en:"Cannot be read back after saving"},"profile-editor.pasteOpensshPemPrivateKey":{zh:"\u7C98\u8D34 OpenSSH/PEM \u79C1\u94A5",en:"Paste OpenSSH/PEM private key"},"profile-editor.connectionPath":{zh:"\u8FDE\u63A5\u8DEF\u5F84",en:"Connection path"},"profile-editor.directProxyOrJumpChain":{zh:"\u76F4\u8FDE\u3001\u4EE3\u7406\u6216\u8DF3\u677F\u94FE",en:"Direct, proxy, or jump chain"},"profile-editor.connectionMode":{zh:"\u8FDE\u63A5\u65B9\u5F0F",en:"Connection mode"},"profile-editor.customHttpConnect":{zh:"\u81EA\u5B9A\u4E49 HTTP CONNECT",en:"Custom HTTP CONNECT"},"profile-editor.customSocks5":{zh:"\u81EA\u5B9A\u4E49 SOCKS5",en:"Custom SOCKS5"},"profile-editor.addAnHttpOrSocks5ProxyToTheProxy":{zh:"\u8BF7\u5148\u5728\u4EE3\u7406\u5E93\u4E2D\u6DFB\u52A0 HTTP \u6216 SOCKS5 \u4EE3\u7406\u3002",en:"Add an HTTP or SOCKS5 proxy to the proxy library first."},"profile-editor.multipleHostsCanShareTheSameProxyConfiguration":{zh:"\u591A\u53F0\u4E3B\u673A\u53EF\u5F15\u7528\u540C\u4E00\u6761\u4EE3\u7406\u914D\u7F6E\u3002",en:"Multiple hosts can share the same proxy configuration."},"profile-editor.selectProxy":{zh:"\u9009\u62E9\u4EE3\u7406",en:"Select proxy"},"profile-editor.firstConnectionVerifyTheHostFingerprint":{zh:"\u9996\u6B21\u8FDE\u63A5\uFF0C\u8BF7\u6838\u5BF9\u4E3B\u673A\u6307\u7EB9",en:"First connection: verify the host fingerprint"},"profile-editor.confirmAndRetry":{zh:"\u786E\u8BA4\u5E76\u91CD\u8BD5",en:"Confirm and retry"},"profile-editor.connectionTestSucceeded":{zh:"\u8FDE\u63A5\u6D4B\u8BD5\u6210\u529F",en:"Connection test succeeded"},"profile-editor.jumpChain":{zh:"\u8DF3\u677F\u94FE",en:"Jump chain"},"profile-editor.connectionsAreEstablishedHopByHopTopToBottom":{zh:"\u8FDE\u63A5\u4F1A\u6309\u4ECE\u4E0A\u5230\u4E0B\u7684\u987A\u5E8F\u9010\u7EA7\u5EFA\u7ACB\u3002",en:"Connections are established hop by hop, top to bottom."},"profile-editor.selectAnExistingConnection":{zh:"\u9009\u62E9\u5DF2\u6709\u8FDE\u63A5",en:"Select an existing connection"},"profile-editor.moveJumpHostUp":{zh:"\u4E0A\u79FB\u8DF3\u677F",en:"Move jump host up"},"profile-editor.moveJumpHostDown":{zh:"\u4E0B\u79FB\u8DF3\u677F",en:"Move jump host down"},"profile-editor.removeJumpHost":{zh:"\u79FB\u9664\u8DF3\u677F",en:"Remove jump host"},"profile-editor.addAtLeastOneJumpHost":{zh:"\u81F3\u5C11\u6DFB\u52A0\u4E00\u53F0\u8DF3\u677F\u4E3B\u673A\u3002",en:"Add at least one jump host."},"profile-editor.addJumpHost":{zh:"\u6DFB\u52A0\u8DF3\u677F",en:"Add jump host"},"project-session-dialog.selectSessionWorkspace":{zh:"\u9009\u62E9\u4F1A\u8BDD\u5F52\u5C5E\u7A7A\u95F4",en:"Select session workspace"},"project-session-dialog.newRemoteSession":{zh:"\u65B0\u5EFA\u8FDC\u7AEF\u4F1A\u8BDD",en:"New remote session"},"project-session-dialog.chooseTheLocalProjectThisSessionBelongsToIn":{zh:"\u9009\u62E9\u8FD9\u4E2A\u4F1A\u8BDD\u5728 DSH \u4E2D\u5F52\u5C5E\u7684\u672C\u5730\u9879\u76EE",en:"Choose the local project this session belongs to in DSH"},"project-session-dialog.remoteHost":{zh:"\u8FDC\u7AEF\u4E3B\u673A",en:"Remote host"},"project-session-dialog.remoteWorkingDirectory":{zh:"\u8FDC\u7AEF\u5DE5\u4F5C\u76EE\u5F55",en:"Remote working directory"},"project-session-dialog.sessionWorkspace":{zh:"\u4F1A\u8BDD\u5F52\u5C5E\u7A7A\u95F4",en:"Session workspace"},"project-session-dialog.sessionRecordsAreStoredInTheSelectedDshProject":{zh:"\u4F1A\u8BDD\u8BB0\u5F55\u4FDD\u5B58\u5728\u6240\u9009 DSH \u9879\u76EE\u4E2D\uFF0CSSH \u547D\u4EE4\u4E0E\u7EC8\u7AEF\u56FA\u5B9A\u4F7F\u7528\u4E0A\u9762\u7684\u8FDC\u7AEF\u76EE\u5F55\u3002",en:"Session records are stored in the selected DSH project. SSH commands and terminals always use the remote directory above."},"project-session-dialog.noDshProjectsAvailableYet":{zh:"\u8FD8\u6CA1\u6709\u53EF\u7528\u7684 DSH \u9879\u76EE",en:"No DSH projects available yet"},"project-session-dialog.closeThisWindowFirstThenCreateOrAddA":{zh:"\u8BF7\u5148\u5173\u95ED\u6B64\u7A97\u53E3\uFF0C\u5728 DSH \u5DE6\u4FA7\u7A7A\u95F4\u4E2D\u65B0\u5EFA\u6216\u6DFB\u52A0\u9879\u76EE\u3002",en:"Close this window first, then create or add a project in the DSH workspace on the left."},"project-session-dialog.selectDshProject":{zh:"\u9009\u62E9 DSH \u9879\u76EE",en:"Select DSH project"},"project-session-dialog.currentProject":{zh:"\u5F53\u524D\u9879\u76EE",en:"Current project"},"project-session-dialog.recentlyUsed":{zh:"\u6700\u8FD1\u4F7F\u7528",en:"Recently used"},"project-session-dialog.creating":{zh:"\u6B63\u5728\u65B0\u5EFA\u2026",en:"Creating\u2026"},"project-session-dialog.createAndOpen":{zh:"\u65B0\u5EFA\u5E76\u6253\u5F00",en:"Create and open"},"remote-path-input.typeDirectlyTheRemotePathIsCheckedAutomaticallyAfter":{zh:"\u53EF\u76F4\u63A5\u8F93\u5165\uFF1B\u505C\u6B62\u8F93\u5165\u540E\u4F1A\u81EA\u52A8\u68C0\u67E5\u8FDC\u7AEF\u8DEF\u5F84\u3002",en:"Type directly; the remote path is checked automatically after you stop typing."},"remote-path-input.checkingTheRemotePath":{zh:"\u6B63\u5728\u68C0\u67E5\u8FDC\u7AEF\u8DEF\u5F84\u2026",en:"Checking the remote path\u2026"},"remote-path-input.thePathDoesNotExistOrCannotBeAccessed":{zh:"\u8DEF\u5F84\u4E0D\u5B58\u5728\u6216\u65E0\u6CD5\u8BBF\u95EE\uFF1A{0}\u3002\u4ECD\u53EF\u6309\u5F53\u524D\u8F93\u5165\u4FDD\u5B58\u3002",en:"The path does not exist or cannot be accessed: {0}. You can still save with the current input."},"remote-path-input.thePathIsAccessibleNoSubdirectoriesYet":{zh:"\u8DEF\u5F84\u53EF\u8BBF\u95EE\uFF0C\u5F53\u524D\u6CA1\u6709\u5B50\u76EE\u5F55\u3002",en:"The path is accessible; no subdirectories yet."},"remote-path-input.thePathIsAccessibleFoundSubdirectories":{zh:"\u8DEF\u5F84\u53EF\u8BBF\u95EE\uFF0C\u627E\u5230 {0} \u4E2A\u5B50\u76EE\u5F55\u3002",en:"The path is accessible; found {0} subdirectories."},"remote-path-input.selectableRemoteSubdirectories":{zh:"\u53EF\u9009\u62E9\u7684\u8FDC\u7AEF\u5B50\u76EE\u5F55",en:"Selectable remote subdirectories"},"remote-path-input.select":{zh:"\u9009\u62E9 {0}",en:"Select {0}"},"remote-workspace-tree.hostsProjects":{zh:"\u4E3B\u673A\u4E0E\u9879\u76EE",en:"Hosts & Projects"},"remote-workspace-tree.hosts":{zh:"\u53F0\u4E3B\u673A",en:"hosts"},"remote-workspace-tree.newConnection":{zh:"\u65B0\u5EFA\u8FDE\u63A5",en:"New connection"},"remote-workspace-tree.searchHosts":{zh:"\u641C\u7D22\u4E3B\u673A",en:"Search hosts"},"remote-workspace-tree.searchHostsGroupsTags":{zh:"\u641C\u7D22\u4E3B\u673A\u3001\u5206\u7EC4\u3001\u6807\u7B7E\u2026",en:"Search hosts, groups, tags\u2026"},"remote-workspace-tree.selectAndExpand":{zh:"\u9009\u62E9\u5E76\u5C55\u5F00 {0}",en:"Select and expand {0}"},"remote-workspace-tree.unmount":{zh:"\u5378\u8F7D",en:"Unmount"},"remote-workspace-tree.mount":{zh:"\u6302\u8F7D",en:"Mount"},"remote-workspace-tree.openADshSessionBeforeMountingHosts":{zh:"\u6253\u5F00\u4E00\u4E2A DSH \u4F1A\u8BDD\u540E\u624D\u80FD\u6302\u8F7D\u4E3B\u673A",en:"Open a DSH session before mounting hosts"},"remote-workspace-tree.unmountFromCurrentSession":{zh:"\u4ECE\u5F53\u524D\u4F1A\u8BDD\u5378\u8F7D",en:"Unmount from current session"},"remote-workspace-tree.mountToCurrentSession":{zh:"\u6302\u8F7D\u5230\u5F53\u524D\u4F1A\u8BDD",en:"Mount to current session"},"remote-workspace-tree.addPinnedDirectoryFor":{zh:"\u4E3A {0} \u6DFB\u52A0\u56FA\u5B9A\u76EE\u5F55",en:"Add pinned directory for {0}"},"remote-workspace-tree.addPinnedDirectory":{zh:"\u6DFB\u52A0\u56FA\u5B9A\u76EE\u5F55",en:"Add pinned directory"},"remote-workspace-tree.readingPinnedDirectories":{zh:"\u6B63\u5728\u8BFB\u53D6\u56FA\u5B9A\u76EE\u5F55\u2026",en:"Reading pinned directories\u2026"},"remote-workspace-tree.addProjectDirectory":{zh:"\u6DFB\u52A0\u9879\u76EE\u76EE\u5F55",en:"Add project directory"},"remote-workspace-tree.noDshSessionIsAvailableToMountADirectory":{zh:"\u5F53\u524D\u6CA1\u6709\u53EF\u6302\u8F7D\u76EE\u5F55\u7684 DSH \u4F1A\u8BDD",en:"No DSH session is available to mount a directory"},"remote-workspace-tree.mountThisHostFirst":{zh:"\u8BF7\u5148\u6302\u8F7D\u8BE5\u4E3B\u673A",en:"Mount this host first"},"remote-workspace-tree.unmountThisDirectoryFromTheCurrentSession":{zh:"\u4ECE\u5F53\u524D\u4F1A\u8BDD\u5378\u8F7D\u6B64\u76EE\u5F55",en:"Unmount this directory from the current session"},"remote-workspace-tree.mountDirectoryMultipleSelectionsAreAllowed":{zh:"\u6302\u8F7D\u76EE\u5F55\uFF0C\u53EF\u540C\u65F6\u9009\u62E9\u591A\u4E2A",en:"Mount directory; multiple selections are allowed"},"remote-workspace-tree.mountedDefaultWorkingDirectory":{zh:"\u5DF2\u6302\u8F7D \xB7 \u9ED8\u8BA4\u5DE5\u4F5C\u76EE\u5F55",en:"Mounted \xB7 Default working directory"},"remote-workspace-tree.setAsDefaultWorkingDirectory":{zh:"\u8BBE\u4E3A\u9ED8\u8BA4\u5DE5\u4F5C\u76EE\u5F55",en:"Set as default working directory"},"remote-workspace-tree.setAsTheDefaultDirectory":{zh:"\u5C06 {0} \u8BBE\u4E3A\u9ED8\u8BA4\u76EE\u5F55",en:"Set {0} as the default directory"},"remote-workspace-tree.newSessionIn":{zh:"\u5728 {0} \u65B0\u5EFA\u4F1A\u8BDD",en:"New session in {0}"},"remote-workspace-tree.newSession":{zh:"\u65B0\u5EFA\u4F1A\u8BDD",en:"New session"},"remote-workspace-tree.editPinnedDirectory":{zh:"\u7F16\u8F91\u56FA\u5B9A\u76EE\u5F55",en:"Edit pinned directory"},"remote-workspace-tree.noSshHostsYet":{zh:"\u8FD8\u6CA1\u6709 SSH \u4E3B\u673A",en:"No SSH hosts yet"},"remote-workspace-tree.noMatchingHosts":{zh:"\u6CA1\u6709\u5339\u914D\u7684\u4E3B\u673A",en:"No matching hosts"},"remote-workspace-tree.currentSessionPermissions":{zh:"\u5F53\u524D\u4F1A\u8BDD\u6743\u9650",en:"Current session permissions"},"remote-workspace-tree.availableHosts":{zh:"\u53F0\u4E3B\u673A\u53EF\u7528",en:"available hosts"},"remote-workspace-tree.loading":{zh:"\u8BFB\u53D6\u4E2D",en:"Loading"},"remote-workspace-tree.saving":{zh:"\u4FDD\u5B58\u4E2D",en:"Saving"},"remote-workspace-tree.notSynced":{zh:"\u672A\u540C\u6B65",en:"Not synced"},"remote-workspace-tree.synced":{zh:"\u5DF2\u540C\u6B65",en:"Synced"},"remote-workspace-tree.sshPermissions":{zh:"SSH \u6743\u9650",en:"SSH permissions"},"remote-workspace-tree.commandsOnly":{zh:"\u4EC5\u547D\u4EE4",en:"Commands only"},"remote-workspace-tree.terminalControl":{zh:"\u7EC8\u7AEF\u63A7\u5236",en:"Terminal control"},"remote-workspace-tree.confirmBeforeRunning":{zh:"\u6267\u884C\u524D\u786E\u8BA4",en:"Confirm before running"},"remote-workspace-tree.whenOffRunsDirectlyUnderCurrentSessionPermissions":{zh:"\u5173\u95ED\u540E\u6309\u5F53\u524D\u4F1A\u8BDD\u6743\u9650\u76F4\u63A5\u6267\u884C",en:"When off, runs directly under current session permissions"},"remote-workspace-tree.requiresDshAskModeFullAccessIsRejectedOutright":{zh:"\u9700 DSH \u4F7F\u7528 Ask\uFF1BFull Access \u4F1A\u76F4\u63A5\u62D2\u7EDD",en:"Requires DSH Ask mode; Full Access is rejected outright"},"remote-workspace-tree.deletePinnedDirectoryRelatedDshSessionsWillNotBe":{zh:"\u5220\u9664\u56FA\u5B9A\u76EE\u5F55\u201C{0}\u201D\uFF1F\u76F8\u5173 DSH \u4F1A\u8BDD\u4E0D\u4F1A\u5220\u9664\u3002",en:"Delete pinned directory '{0}'? Related DSH sessions will not be deleted."},"remote-workspace-tree.defaultRemotePathForTheTerminalAndSftp":{zh:"{0} \xB7 \u7EC8\u7AEF\u4E0E SFTP \u7684\u9ED8\u8BA4\u8FDC\u7AEF\u8DEF\u5F84",en:"{0} \xB7 default remote path for the terminal and SFTP"},"remote-workspace-tree.websiteProject":{zh:"\u7F51\u7AD9\u9879\u76EE",en:"Website project"},"remote-workspace-tree.saveDirectory":{zh:"\u4FDD\u5B58\u76EE\u5F55",en:"Save directory"},"remote-workspace-tree.ungrouped":{zh:"\u672A\u5206\u7EC4",en:"Ungrouped"},"resizable-split.dragToResizeDoubleClickToReset":{zh:"\u62D6\u52A8\u8C03\u6574\u5BBD\u5EA6\uFF0C\u53CC\u51FB\u6062\u590D\u9ED8\u8BA4",en:"Drag to resize, double-click to reset"},"sftp-client.localSession":{zh:"\u672C\u5730\u4F1A\u8BDD",en:"Local session"},"sftp-client.selectRemoteHost":{zh:"\u9009\u62E9\u8FDC\u7AEF\u4E3B\u673A",en:"Select remote host"},"sftp-client.thisPathIsNotARegularFileOrDirectory":{zh:"\u6B64\u8DEF\u5F84\u4E0D\u662F\u666E\u901A\u6587\u4EF6\u6216\u76EE\u5F55\uFF0C\u8BF7\u68C0\u67E5\u8DEF\u5F84\u540E\u91CD\u8BD5",en:"This path is not a regular file or directory. Check it and try again."},"sftp-client.aSingleFileCannotExceed512Mb":{zh:"\u5355\u4E2A\u6587\u4EF6\u4E0D\u80FD\u8D85\u8FC7 512 MB",en:"A single file cannot exceed 512 MB."},"sftp-client.skippedFilesLargerThan512Mb":{zh:"\u5DF2\u8DF3\u8FC7 {0} \u4E2A\u8D85\u8FC7 512 MB \u7684\u6587\u4EF6",en:"Skipped {0} files larger than 512 MB"},"sftp-client.waitForTheDirectoryToLoadOrTheCurrent":{zh:"\u5F53\u524D\u65E0\u6CD5\u4E0A\u4F20\uFF0C\u8BF7\u7B49\u5F85\u76EE\u5F55\u52A0\u8F7D\u6216\u5F53\u524D\u4E0A\u4F20\u5B8C\u6210\u540E\u91CD\u8BD5",en:"Wait for the directory to load or the current upload to finish, then try again."},"sftp-client.moved":{zh:"\u5DF2\u79FB\u52A8",en:"Moved"},"sftp-client.addedToTheTransferQueueSeeProgressInFile":{zh:"\u5DF2\u52A0\u5165\u4F20\u8F93\u4EFB\u52A1\uFF0C\u53EF\u5728\u6587\u4EF6\u4F20\u8F93\u4E2D\u67E5\u770B\u8FDB\u5EA6",en:"Added to the transfer queue. See progress in File Transfers."},"sftp-client.mountedDirectories":{zh:"\u5DF2\u6302\u8F7D\u76EE\u5F55",en:"Mounted directories"},"sftp-client.goToParentDirectory":{zh:"\u8FD4\u56DE\u4E0A\u7EA7\u76EE\u5F55",en:"Go to parent directory"},"sftp-client.directoryOrFilePath":{zh:"\u76EE\u5F55\u6216\u6587\u4EF6\u8DEF\u5F84",en:"Directory or file path"},"sftp-client.enterADirectoryToBrowseOrAFileTo":{zh:"\u8F93\u5165\u76EE\u5F55\u8FDB\u5165\uFF0C\u8F93\u5165\u6587\u4EF6\u8DEF\u5F84\u6253\u5F00\u9884\u89C8\uFF1B\u6309 Enter \u786E\u8BA4",en:"Enter a directory to browse or a file to preview; press Enter to open"},"sftp-client.directoryOrFilePathPressEnterToOpen":{zh:"\u76EE\u5F55\u6216\u6587\u4EF6\u8DEF\u5F84\uFF0C\u6309 Enter \u6253\u5F00",en:"Directory or file path; press Enter to open"},"sftp-client.closeDirectoryDialog":{zh:"\u6536\u8D77\u76EE\u5F55\u5F39\u7A97",en:"Close directory dialog"},"sftp-client.expandDirectory":{zh:"\u5C55\u5F00\u76EE\u5F55",en:"Expand directory"},"sftp-client.openDirectoryInADialog":{zh:"\u5728\u5F39\u7A97\u4E2D\u6253\u5F00\u76EE\u5F55",en:"Open directory in a dialog"},"sftp-client.upload":{zh:"\u4E0A\u4F20",en:"Upload"},"sftp-client.uploading":{zh:"\u4E0A\u4F20\u4E2D",en:"Uploading"},"sftp-client.aFileWithTheSameNameExists":{zh:"\u540C\u540D\u6587\u4EF6\u5DF2\u5B58\u5728",en:"A file with the same name exists"},"sftp-client.skip":{zh:"\u8DF3\u8FC7",en:"Skip"},"sftp-client.overwriteAndUpload":{zh:"\u8986\u76D6\u4E0A\u4F20",en:"Overwrite and upload"},"sftp-client.dismissNotice":{zh:"\u5173\u95ED\u63D0\u793A",en:"Dismiss notice"},"sftp-client.readingRemoteDirectory":{zh:"\u6B63\u5728\u8BFB\u53D6\u8FDC\u7AEF\u76EE\u5F55\u2026",en:"Reading remote directory\u2026"},"sftp-client.thisDirectoryIsEmpty":{zh:"\u6B64\u76EE\u5F55\u4E3A\u7A7A",en:"This directory is empty"},"sftp-client.fileClickToPreview":{zh:"\uFF0C\u6587\u4EF6\uFF0C\u5355\u51FB\u9884\u89C8",en:", file, click to preview"},"sftp-client.releaseToUpload":{zh:"\u677E\u5F00\u4EE5\u4E0A\u4F20",en:"Release to upload"},"sftp-client.uploadTo":{zh:"\u4E0A\u4F20\u5230",en:"Upload to"},"sftp-client.browseDirectory":{zh:"\u76EE\u5F55\u6D4F\u89C8",en:"Browse directory"},"sftp-client.closeDirectoryDialog2":{zh:"\u5173\u95ED\u76EE\u5F55\u5F39\u7A97",en:"Close directory dialog"},"sftp-client.thisDocumentIsReadOnlyItMayExceed256":{zh:"\u6B64\u6587\u6863\u6682\u4E3A\u53EA\u8BFB\uFF1A\u53EF\u80FD\u8D85\u8FC7 256 KB\u3001\u88AB\u622A\u65AD\uFF0C\u6216\u5305\u542B\u524D\u7F6E\u5143\u6570\u636E\u3001HTML\u3001\u5F15\u7528\u5B9A\u4E49\u7B49\u6682\u4E0D\u652F\u6301\u5B89\u5168\u56DE\u5199\u7684\u5185\u5BB9\u3002",en:"This document is read-only: it may exceed 256 KB, be truncated, or contain frontmatter, HTML or reference definitions that cannot yet be safely saved."},"sftp-client.saveMarkdown":{zh:"\u4FDD\u5B58 Markdown",en:"Save Markdown"},"sftp-client.saveBodyCtrlCmdS":{zh:"\u4FDD\u5B58\u6B63\u6587\uFF08Ctrl/Cmd + S\uFF09",en:"Save body (Ctrl/Cmd + S)"},"sftp-client.saved":{zh:"\u5DF2\u4FDD\u5B58",en:"Saved"},"sftp-client.downloadDraft":{zh:"\u4E0B\u8F7D\u8349\u7A3F",en:"Download draft"},"sftp-client.discardDraft":{zh:"\u653E\u5F03\u8349\u7A3F",en:"Discard draft"},"sftp-client.unsavedChanges":{zh:"\u6B63\u6587\u5C1A\u672A\u4FDD\u5B58",en:"Unsaved changes"},"sftp-client.discardUnsavedChanges":{zh:"\u653E\u5F03\u672A\u4FDD\u5B58\u7684\u66F4\u6539\uFF1F",en:"Discard unsaved changes?"},"sftp-client.theDraftStaysInThisBrowserTabSoYou":{zh:"\u8349\u7A3F\u4F1A\u4FDD\u7559\u5728\u5F53\u524D\u6D4F\u89C8\u5668\u6807\u7B7E\u9875\uFF0C\u4E0B\u6B21\u6253\u5F00\u6B64\u6587\u4EF6\u53EF\u7EE7\u7EED\u3002",en:"The draft stays in this browser tab so you can continue when you reopen this file."},"sftp-client.thisClearsTheDraftAndReloadsTheFileConsider":{zh:"\u8FD9\u4F1A\u6E05\u9664\u5F53\u524D\u8349\u7A3F\u5E76\u91CD\u65B0\u8BFB\u53D6\u6587\u4EF6\uFF0C\u5EFA\u8BAE\u5148\u4E0B\u8F7D\u8349\u7A3F\u3002",en:"This clears the draft and reloads the file. Consider downloading the draft first."},"sftp-client.keepEditing":{zh:"\u7EE7\u7EED\u7F16\u8F91",en:"Keep editing"},"sftp-client.keepDraftAndGoBack":{zh:"\u4FDD\u7559\u8349\u7A3F\u5E76\u8FD4\u56DE",en:"Keep draft and go back"},"sftp-client.discardAndRefresh":{zh:"\u653E\u5F03\u5E76\u5237\u65B0",en:"Discard and refresh"},"sftp-client.backToDirectory":{zh:"\u8FD4\u56DE\u76EE\u5F55",en:"Back to directory"},"sftp-client.downloadFile":{zh:"\u4E0B\u8F7D\u6587\u4EF6",en:"Download file"},"sftp-client.zoomPreview":{zh:"\u653E\u5927\u9884\u89C8",en:"Zoom preview"},"sftp-client.unsavedDraftKeptInThisBrowserTab":{zh:"\u672A\u4FDD\u5B58 \xB7 \u8349\u7A3F\u5DF2\u4FDD\u7559\u5728\u5F53\u524D\u6D4F\u89C8\u5668\u6807\u7B7E\u9875",en:"Unsaved \xB7 Draft kept in this browser tab"},"sftp-client.autoRefreshReadOnly":{zh:"\u81EA\u52A8\u5237\u65B0 \xB7 \u6B63\u6587\u53EA\u8BFB",en:"Auto-refresh \xB7 Read-only"},"sftp-client.editDirectlyCtrlCmdSToSave":{zh:"\u53EF\u76F4\u63A5\u4FEE\u6539\u6B63\u6587 \xB7 Ctrl/Cmd + S \u4FDD\u5B58",en:"Edit directly \xB7 Ctrl/Cmd + S to save"},"sftp-client.refreshFailedPreviousContentKept":{zh:"\u5237\u65B0\u5931\u8D25\uFF0C\u4FDD\u7559\u4E0A\u6B21\u5185\u5BB9\uFF1A",en:"Refresh failed; previous content kept:"},"sftp-client.preview":{zh:"\u9884\u89C8 {0}",en:"Preview {0}"},"sftp-client.closePreview":{zh:"\u5173\u95ED\u9884\u89C8",en:"Close preview"},"sftp-client.openingFile":{zh:"\u6B63\u5728\u6253\u5F00\u6587\u4EF6\u2026",en:"Opening file\u2026"},"sftp-client.largeFileShowingTheFirst1MbOnlyDownload":{zh:"\u6587\u4EF6\u8F83\u5927\uFF0C\u4EC5\u663E\u793A\u524D 1 MB\u3002\u4E0B\u8F7D\u53EF\u67E5\u770B\u5B8C\u6574\u5185\u5BB9\u3002",en:"Large file; showing the first 1 MB only. Download it to see the full content."},"sftp-client.thisFileCannotBePreviewedDirectly":{zh:"\u6B64\u6587\u4EF6\u65E0\u6CD5\u76F4\u63A5\u9884\u89C8",en:"This file cannot be previewed directly"},"terminal-session.connectionEndedYouCanReconnect":{zh:`\r
|
|
11
|
+
`,g)}paste(m){this._core.paste(m)}refresh(m,g){this._verifyIntegers(m,g),this._core.refresh(m,g)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(m){this._addonManager.loadAddon(this,m)}static get strings(){return i}_verifyIntegers(...m){for(let g of m)if(g===1/0||isNaN(g)||g%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...m){for(let g of m)if(g&&(g===1/0||isNaN(g)||g%1!=0||g<0))throw new Error("This API only accepts positive integers")}}s.Terminal=f})(),r})()))});var g6={};du(g6,{apply:()=>qH,inject:()=>UH});module.exports=CA(g6);var mv=require("react");var fv={"host-key.changed":{zh:"\u4E3B\u673A\u6307\u7EB9\u5DF2\u53D8\u5316",en:"Host fingerprint changed"},"host-key.warning":{zh:"\u91CD\u88C5\u7CFB\u7EDF\u53EF\u80FD\u5BFC\u81F4\u5BC6\u94A5\u53D8\u5316\uFF0C\u4E5F\u53EF\u80FD\u662F\u8FDE\u63A5\u88AB\u5192\u7528\u3002\u8BF7\u901A\u8FC7\u670D\u52A1\u5668\u63A7\u5236\u53F0\u6838\u5B9E\u65B0\u6307\u7EB9\u540E\u518D\u786E\u8BA4\u3002",en:"Reinstallation can change the key, but this may also indicate impersonation. Verify the new fingerprint through the server console before confirming."},"host-key.previous":{zh:"\u539F\u6307\u7EB9",en:"Previous fingerprint"},"host-key.current":{zh:"\u65B0\u6307\u7EB9",en:"New fingerprint"},"host-key.confirm":{zh:"\u5DF2\u6838\u5B9E\uFF0C\u786E\u8BA4\u5E76\u91CD\u8BD5",en:"Verified, confirm and retry"},"host-key.retest":{zh:"\u8FDE\u63A5\u914D\u7F6E\u5DF2\u4FEE\u6539\uFF0C\u8BF7\u91CD\u65B0\u6D4B\u8BD5\u5E76\u6838\u5BF9\u6307\u7EB9\u3002",en:"Connection settings changed. Test again and verify the fingerprint."},"host-key.saveHint":{zh:"\u5F53\u524D\u4E3B\u673A\u6D4B\u8BD5\u6210\u529F\u540E\u8BF7\u4FDD\u5B58\uFF1B\u8DF3\u677F\u673A\u786E\u8BA4\u6210\u529F\u540E\u4F1A\u5355\u72EC\u66F4\u65B0\u5176\u6307\u7EB9\u3002",en:"Save this host after a successful test. Confirming a jump host updates its fingerprint separately."},"local-transfer.uploadAction":{zh:"\u4ECE\u672C\u673A\u4E0A\u4F20\u6587\u4EF6",en:"Upload files from this computer"},"local-transfer.uploading":{zh:"\u4E0A\u4F20\u4E2D",en:"Uploading"},"local-transfer.allowUpload":{zh:"\u5141\u8BB8 Agent \u672C\u5730\u4E0A\u4F20",en:"Allow agent local uploads"},"local-transfer.allowDownload":{zh:"\u5141\u8BB8 Agent \u672C\u5730\u4E0B\u8F7D",en:"Allow agent local downloads"},"local-transfer.uploadScope":{zh:"\u4ECE DSH \u4F1A\u8BDD\u76EE\u5F55\u4E0A\u4F20\u5230\u5DF2\u6388\u6743\u8FDE\u63A5\uFF1B\u9700\u540C\u65F6\u5F00\u542F\u5141\u8BB8\u4F20\u8F93\uFF0C\u4E0D\u4EE3\u8868\u8BBF\u95EE\u6D4F\u89C8\u5668\u7535\u8111\u3002",en:"Upload from the DSH session directory to authorized connections. Requires transfer permission; does not grant access to the browser computer."},"local-transfer.downloadScope":{zh:"\u4ECE\u5DF2\u6388\u6743\u8FDE\u63A5\u4E0B\u8F7D\u5230 DSH \u4F1A\u8BDD\u76EE\u5F55\uFF1B\u9700\u540C\u65F6\u5F00\u542F\u5141\u8BB8\u4F20\u8F93\uFF0C\u4E0D\u4EE3\u8868\u8BBF\u95EE\u6D4F\u89C8\u5668\u7535\u8111\u3002",en:"Download from authorized connections to the DSH session directory. Requires transfer permission; does not grant access to the browser computer."},"browser-transfer.title":{zh:"\u672C\u5730\u4E0A\u4F20\u4E0E\u4E0B\u8F7D",en:"Local uploads and downloads"},"browser-transfer.preparing":{zh:"\u51C6\u5907\u4F20\u8F93\u2026",en:"Preparing transfer\u2026"},"browser-transfer.waiting":{zh:"\u5DF2\u53D1\u9001\uFF0C\u7B49\u5F85\u8FDC\u7AEF\u4FDD\u5B58\u5B8C\u6210\u2026",en:"Sent; waiting for remote save\u2026"},"browser-transfer.unavailable":{zh:"\u5DF2\u53D1\u8D77\u4E0B\u8F7D\uFF0C\u5F53\u524D\u73AF\u5883\u65E0\u6CD5\u786E\u8BA4\u8FDB\u5EA6\u6216\u4FDD\u5B58\u7ED3\u679C\uFF1B\u65E0\u54CD\u5E94\u65F6\u8BF7\u5728\u6D4F\u89C8\u5668\u4E2D\u91CD\u8BD5",en:"Download requested; this environment cannot confirm progress or saving. If nothing happens, retry in a browser."},"browser-transfer.savingLocal":{zh:"\u6B63\u5728\u5B8C\u6210\u672C\u5730\u4FDD\u5B58\u2026",en:"Finalizing local save\u2026"},"browser-transfer.savedLocal":{zh:"\u5DF2\u4FDD\u5B58\u5230\u6240\u9009\u6587\u4EF6",en:"Saved to the selected file"},"browser-transfer.failed":{zh:"\u4F20\u8F93\u5931\u8D25",en:"Transfer failed"},"browser-transfer.delivered":{zh:"\u4F20\u8F93\u5B8C\u6210\uFF0C\u4FDD\u5B58\u7ED3\u679C\u8BF7\u67E5\u770B\u6D4F\u89C8\u5668\u4E0B\u8F7D\u5217\u8868",en:"Transferred; check browser downloads for save status"},"browser-transfer.saved":{zh:"\u5DF2\u4FDD\u5B58\u5230\u8FDC\u7AEF",en:"Saved remotely"},"browser-transfer.finishedAt":{zh:"\u7ED3\u675F\u4E8E {0}",en:"Finished at {0}"},"browser-transfer.upload":{zh:"\u4E0A\u4F20",en:"Upload"},"browser-transfer.download":{zh:"\u4E0B\u8F7D",en:"Download"},"group-proxy.title":{zh:"\u5206\u7EC4\u4EE3\u7406 \xB7 {0}",en:"Group proxy \xB7 {0}"},"group-proxy.selection":{zh:"\u9ED8\u8BA4\u4EE3\u7406",en:"Default proxy"},"group-proxy.hint":{zh:"\u4E3B\u673A\u81EA\u8EAB\u4EE3\u7406\u4F18\u5148\uFF1B\u672A\u8BBE\u7F6E\u4EE3\u7406\u7684\u4E3B\u673A\u4F7F\u7528\u672C\u5206\u7EC4\u4EE3\u7406\u3002",en:"A host's own proxy takes priority. Hosts without one use this group proxy."},"group-proxy.reconnect":{zh:"\u4EC5\u5F71\u54CD\u672C\u5206\u7EC4 SSH \u4E3B\u673A\u7684\u65B0\u8FDE\u63A5\uFF0C\u4E0D\u4F1A\u6253\u65AD\u73B0\u6709\u7EC8\u7AEF\u3002",en:"Applies to new SSH connections in this group. Existing terminals stay connected."},"group-proxy.none":{zh:"\u4E0D\u8BBE\u7F6E\uFF08\u9ED8\u8BA4\u76F4\u8FDE\uFF09",en:"None (direct by default)"},"group-proxy.automatic":{zh:"\u9ED8\u8BA4\uFF08\u5206\u7EC4\u4EE3\u7406 / \u76F4\u8FDE\uFF09",en:"Default (group proxy / direct)"},"sftp-client.followTerminal":{zh:"\u8DDF\u968F\u7EC8\u7AEF\u76EE\u5F55",en:"Follow terminal directory"},"sftp-client.followWaiting":{zh:"\u5C1A\u672A\u6536\u5230\u7EC8\u7AEF\u76EE\u5F55\u3002\u8BF7\u91CD\u8FDE\u7EC8\u7AEF\uFF1B\u652F\u6301 Bash/Zsh/sh\uFF0C\u5176\u4ED6 Shell \u9700\u652F\u6301 OSC 7 \u6216 CurrentDir",en:"No terminal directory received. Reconnect the terminal; Bash/Zsh/sh are supported. Other shells need OSC 7 or CurrentDir."},"sftp-client.followHint":{zh:"\u8DDF\u968F\u5F53\u524D\u9009\u4E2D\u7684\u7EC8\u7AEF\uFF1B\u9884\u89C8\u3001\u4E0A\u4F20\u6216\u64CD\u4F5C\u6587\u4EF6\u65F6\u6682\u505C",en:"Follow the focused terminal; pause while previewing, uploading or managing files"},"sftp-client.downloadEntry":{zh:"\u4E0B\u8F7D {0}",en:"Download {0}"},"client.deviceCodeExpiry":{zh:"\u4EE3\u7801\u5C06\u5728 {0} \u5931\u6548",en:"Code expires at {0}"},"file-entry-delete-dialog.deleteFromLocation":{zh:"\u5C06\u76F4\u63A5\u4ECE{0}\u5220\u9664\u6240\u9009\u5185\u5BB9\u3002",en:"The selected items will be deleted directly from {0}. "},"activity-panel.sshActivity":{zh:"SSH \u6D3B\u52A8",en:"SSH Activity"},"activity-panel.currentSession":{zh:"\u5F53\u524D\u4F1A\u8BDD \xB7",en:"Current session \xB7"},"activity-panel.closeSshActivity":{zh:"\u5173\u95ED SSH \u6D3B\u52A8",en:"Close SSH Activity"},"activity-panel.sshActivityView":{zh:"SSH \u6D3B\u52A8\u89C6\u56FE",en:"SSH activity view"},"activity-panel.sessionDirectory":{zh:"\u4F1A\u8BDD\u76EE\u5F55",en:"Session directory"},"activity-panel.remoteDirectory":{zh:"\u8FDC\u7AEF\u76EE\u5F55",en:"Remote directory"},"activity-panel.terminal":{zh:"\u7EC8\u7AEF",en:"Terminal"},"activity-panel.readingSshSessions":{zh:"\u6B63\u5728\u8BFB\u53D6 SSH \u4F1A\u8BDD\u2026",en:"Reading SSH sessions\u2026"},"activity-panel.noRemoteToBrowse":{zh:"\u6CA1\u6709\u53EF\u6D4F\u89C8\u7684\u8FDC\u7AEF",en:"No remote to browse"},"activity-panel.allowTheCurrentSessionToAccessAHostIn":{zh:"\u8BF7\u5148\u5728 SSH \u9762\u677F\u4E2D\u5141\u8BB8\u5F53\u524D\u4F1A\u8BDD\u8BBF\u95EE\u4E00\u53F0\u4E3B\u673A\u3002",en:"Allow the current session to access a host in the SSH panel first."},"activity-panel.noTerminalsOpenYet":{zh:"\u8FD8\u6CA1\u6709\u6253\u5F00\u7684\u7EC8\u7AEF",en:"No terminals open yet"},"activity-panel.terminalsOpenedByTheAiAppearRightHere":{zh:"AI \u6253\u5F00\u4EA4\u4E92\u7EC8\u7AEF\u540E\uFF0C\u4F1A\u76F4\u63A5\u663E\u793A\u5728\u8FD9\u91CC\u3002",en:"Terminals opened by the AI appear right here."},"activity-panel.end":{zh:"\u7ED3\u675F",en:"End"},"activity-panel.remove":{zh:"\u79FB\u9664",en:"Remove"},"activity-panel.sshTerminal":{zh:"SSH \u7EC8\u7AEF",en:"SSH terminal"},"activity-panel.terminal2":{zh:"\u7EC8\u7AEF {0}",en:"Terminal {0}"},"activity-panel.running":{zh:"\u8FD0\u884C\u4E2D",en:"Running"},"activity-panel.exited":{zh:"\u5DF2\u9000\u51FA",en:"Exited"},"activity-panel.terminal3":{zh:"{0}\u7EC8\u7AEF {1}",en:"{0}Terminal {1}"},"activity-panel.endAndCloseThisTerminal":{zh:"\u7ED3\u675F\u5E76\u5173\u95ED\u8FD9\u4E2A\u7EC8\u7AEF",en:"End and close this terminal"},"activity-panel.removeThisTerminalFromTheActivityPanel":{zh:"\u4ECE\u6D3B\u52A8\u9762\u677F\u79FB\u9664\u8FD9\u4E2A\u7EC8\u7AEF",en:"Remove this terminal from the activity panel"},"activity-panel.processing":{zh:"\u5904\u7406\u4E2D",en:"Processing"},"activity-panel.interactiveSshTerminal":{zh:"\u4EA4\u4E92\u5F0F SSH \u7EC8\u7AEF",en:"Interactive SSH terminal"},"adaptive-workspace.details":{zh:"\u8BE6\u60C5",en:"Details"},"adaptive-workspace.workspacePanel":{zh:"\u5DE5\u4F5C\u533A\u9762\u677F",en:"Workspace panel"},"adaptive-workspace.closePanel":{zh:"\u5173\u95ED\u9762\u677F",en:"Close panel"},"client.openASessionToSeeTheSshSidebar":{zh:"\u6253\u5F00\u4F1A\u8BDD\u540E\u53EF\u67E5\u770B SSH \u4FA7\u680F",en:"Open a session to see the SSH sidebar"},"client.collapseSshSidebar":{zh:"\u6536\u8D77 SSH \u4FA7\u680F",en:"Collapse SSH sidebar"},"client.expandSshSidebar":{zh:"\u5C55\u5F00 SSH \u4FA7\u680F",en:"Expand SSH sidebar"},"client.theRemote":{zh:"\u8FDC\u7AEF",en:"Remote"},"client.sshPanel":{zh:"SSH \u9762\u677F",en:"SSH panel"},"client.availableRemotesAppearOnceASessionIsOpen":{zh:"\u6253\u5F00\u4F1A\u8BDD\u540E\u663E\u793A\u53EF\u7528\u8FDC\u7AEF",en:"Available remotes appear once a session is open"},"client.noRemotesGrantedToThisSession":{zh:"\u5F53\u524D\u4F1A\u8BDD\u672A\u6388\u6743\u8FDC\u7AEF",en:"No remotes granted to this session"},"client.mounted":{zh:"\u5DF2\u6302\u8F7D",en:"Mounted"},"client.another":{zh:"\u8FD8\u6709",en:"Another"},"client.availableHosts":{zh:"\u53F0\u53EF\u7528\u8FDC\u7AEF",en:"available hosts"},"client.backToSession":{zh:"\u8FD4\u56DE\u4F1A\u8BDD",en:"Back to session"},"client.sshWorkbench":{zh:"SSH \u5DE5\u4F5C\u53F0",en:"SSH workbench"},"client.selectAHost":{zh:"\u9009\u62E9\u4E00\u53F0\u4E3B\u673A",en:"Select a host"},"client.sshWorkbenchView":{zh:"SSH \u5DE5\u4F5C\u53F0\u89C6\u56FE",en:"SSH workbench view"},"client.terminalsFiles":{zh:"\u7EC8\u7AEF\u4E0E\u6587\u4EF6",en:"Terminals & files"},"client.fileTransfer":{zh:"\u6587\u4EF6\u4F20\u8F93",en:"File Transfer"},"client.savedCommands":{zh:"\u5E38\u7528\u547D\u4EE4",en:"Saved commands"},"client.portForwarding":{zh:"\u7AEF\u53E3\u8F6C\u53D1",en:"Port forwarding"},"client.credentialVault":{zh:"\u5BC6\u94A5\u5E93",en:"Credential vault"},"client.proxyVault":{zh:"\u4EE3\u7406\u5E93",en:"Proxy vault"},"client.settings":{zh:"\u8BBE\u7F6E",en:"Settings"},"client.close":{zh:"\u5173\u95ED",en:"Close"},"client.host":{zh:"\u4E3B\u673A",en:"Host"},"client.closeTerminalsOnAllHosts":{zh:"\u5173\u95ED\u6240\u6709\u4E3B\u673A\u7684\u7EC8\u7AEF\uFF1F",en:"Close terminals on all hosts?"},"client.thisClosesAllTerminalTabsInThisWorkspaceIncluding":{zh:"\u5C06\u5173\u95ED\u672C\u5DE5\u4F5C\u53F0\u6240\u6709\u4E3B\u673A\u7684 {0} \u4E2A\u7EC8\u7AEF\u6807\u7B7E\uFF0C\u5305\u62EC\u9690\u85CF\u6807\u7B7E\u53CA\u8FDE\u63A5\u4E2D\u7684\u7EC8\u7AEF\uFF0C\u53EF\u80FD\u4E2D\u65AD\u6B63\u5728\u8FD0\u884C\u7684\u547D\u4EE4\u3002\u4E0D\u4F1A\u5220\u9664\u4E3B\u673A\u914D\u7F6E\uFF0C\u4E5F\u4E0D\u4F1A\u5173\u95ED\u5176\u4ED6\u6D4F\u89C8\u5668\u7A97\u53E3\u7684\u7EC8\u7AEF\u3002",en:"This closes all {0} terminal tabs in this workspace, including hidden and connecting tabs, and may interrupt running commands. Host configurations and terminals in other browser windows are not affected."},"client.cancel":{zh:"\u53D6\u6D88",en:"Cancel"},"client.closeAll":{zh:"\u786E\u8BA4\u5173\u95ED\u5168\u90E8",en:"Close all"},"client.hostActions":{zh:"\u4E3B\u673A\u64CD\u4F5C",en:"Host actions"},"client.showSftp":{zh:"\u5C55\u5F00 SFTP",en:"Show SFTP"},"client.hideSftp":{zh:"\u6536\u8D77 SFTP",en:"Hide SFTP"},"client.editHost":{zh:"\u7F16\u8F91\u4E3B\u673A",en:"Edit host"},"client.closeAllTerminals":{zh:"\u5173\u95ED\u5168\u90E8\u7EC8\u7AEF",en:"Close all terminals"},"client.closeTerminalsOnAllHosts2":{zh:"\u5173\u95ED\u6240\u6709\u4E3B\u673A\u7684\u7EC8\u7AEF",en:"Close terminals on all hosts"},"client.deleteHost":{zh:"\u5220\u9664\u4E3B\u673A {0}",en:"Delete host {0}"},"client.deleteHost2":{zh:"\u5220\u9664\u4E3B\u673A",en:"Delete host"},"client.adjustTheTerminalAndSftpWidths":{zh:"\u8C03\u6574\u7EC8\u7AEF\u4E0E SFTP \u7684\u5BBD\u5EA6",en:"Adjust the terminal and SFTP widths"},"client.terminal":{zh:"{0} \u7EC8\u7AEF",en:"{0} Terminal"},"client.waitingForTerminalConnection":{zh:"\u7B49\u5F85\u7EC8\u7AEF\u8FDE\u63A5",en:"Waiting for terminal connection"},"client.theRemoteDirectoryLoadsOnceATerminalIsOpen":{zh:"\u6253\u5F00\u7EC8\u7AEF\u540E\u518D\u8BFB\u53D6\u8FDC\u7AEF\u76EE\u5F55\u3002",en:"The remote directory loads once a terminal is open."},"client.localRemoteAndDynamicSocks5":{zh:"\xB7 \u672C\u5730\u3001\u8FDC\u7A0B\u4E0E\u52A8\u6001 SOCKS5",en:"\xB7 Local, remote and dynamic SOCKS5"},"client.newRule":{zh:"\u65B0\u5EFA\u89C4\u5219",en:"New rule"},"client.thisHostHasNoPortForwardingRulesYet":{zh:"\u8FD9\u53F0\u4E3B\u673A\u8FD8\u6CA1\u6709\u7AEF\u53E3\u8F6C\u53D1\u89C4\u5219\u3002",en:"This host has no port forwarding rules yet."},"client.edit":{zh:"\u7F16\u8F91",en:"Edit"},"client.stop":{zh:"\u505C\u6B62",en:"Stop"},"client.start":{zh:"\u542F\u52A8",en:"Start"},"client.delete":{zh:"\u5220\u9664",en:"Delete"},"client.deleteTheCredentialVaultEntryThisActionCannotBe":{zh:"\u5220\u9664\u5BC6\u94A5\u5E93\u6761\u76EE\u201C{0}\u201D\uFF1F\u6B64\u64CD\u4F5C\u65E0\u6CD5\u64A4\u9500\u3002",en:"Delete the credential vault entry \u201C{0}\u201D? This action cannot be undone."},"client.keepCommonAccountsInOnePlaceConnectionConfigsOnly":{zh:"\u96C6\u4E2D\u4FDD\u5B58\u5E38\u7528\u8D26\u53F7\uFF0C\u8FDE\u63A5\u914D\u7F6E\u53EA\u5F15\u7528\u51ED\u636E\u3002",en:"Keep common accounts in one place; connection configs only reference credentials."},"client.newCredential":{zh:"\u65B0\u5EFA\u51ED\u636E",en:"New credential"},"client.noSavedCredentialsYet":{zh:"\u8FD8\u6CA1\u6709\u5E38\u7528\u51ED\u636E",en:"No saved credentials yet"},"client.passwordsAndPrivateKeysAreStoredOnlyInThe":{zh:"\u5BC6\u7801\u548C\u79C1\u94A5\u53EA\u4FDD\u5B58\u5728 DSH \u51ED\u636E\u670D\u52A1\u4E2D\uFF0C\u4E0D\u5199\u5165 SSH \u914D\u7F6E\u6587\u4EF6\u3002",en:"Passwords and private keys are stored only in the DSH credential service, never written to SSH config files."},"client.addCredential":{zh:"\u6DFB\u52A0\u51ED\u636E",en:"Add credential"},"client.password":{zh:"\u5BC6\u7801",en:"Password"},"client.privateKey":{zh:"\u79C1\u94A5",en:"Private key"},"client.available":{zh:"\u53EF\u7528",en:"Available"},"client.missingCredentials":{zh:"\u7F3A\u5C11\u51ED\u636E",en:"Missing credentials"},"client.connections":{zh:"\u4E2A\u8FDE\u63A5",en:"connections"},"client.edit2":{zh:"\u7F16\u8F91 {0}",en:"Edit {0}"},"client.delete2":{zh:"\u5220\u9664 {0}",en:"Delete {0}"},"client.stillInUseByConnections":{zh:"\u4ECD\u6709\u8FDE\u63A5\u6B63\u5728\u4F7F\u7528",en:"Still in use by connections"},"client.deleteCredential":{zh:"\u5220\u9664\u51ED\u636E",en:"Delete credential"},"client.createCredential":{zh:"\u65B0\u5EFA\u5E38\u7528\u51ED\u636E",en:"Create credential"},"client.passwordsAndPrivateKeysAreNotShownAgainAfter":{zh:"\u5BC6\u7801\u548C\u79C1\u94A5\u4FDD\u5B58\u540E\u4E0D\u4F1A\u56DE\u663E",en:"Passwords and private keys are not shown again after saving"},"client.name":{zh:"\u540D\u79F0",en:"Name"},"client.productionOps":{zh:"\u751F\u4EA7\u73AF\u5883\u8FD0\u7EF4",en:"Production ops"},"client.username":{zh:"\u7528\u6237\u540D",en:"Username"},"client.authMethod":{zh:"\u8BA4\u8BC1\u65B9\u5F0F",en:"Auth method"},"client.savedLeaveBlankToKeepUnchanged":{zh:"\u5DF2\u4FDD\u5B58\uFF1B\u7559\u7A7A\u4FDD\u6301\u4E0D\u53D8",en:"Saved; leave blank to keep unchanged"},"client.requiredCannotBeReadBackAfterSaving":{zh:"\u5FC5\u586B\uFF0C\u4FDD\u5B58\u540E\u4E0D\u53EF\u8BFB\u56DE",en:"Required. Cannot be read back after saving."},"client.pasteAnOpensshOrPemPrivateKey":{zh:"\u7C98\u8D34 OpenSSH \u6216 PEM \u79C1\u94A5",en:"Paste an OpenSSH or PEM private key"},"client.keyPassphrase":{zh:"\u79C1\u94A5\u53E3\u4EE4",en:"Key passphrase"},"client.saving":{zh:"\u6B63\u5728\u4FDD\u5B58\u2026",en:"Saving\u2026"},"client.saveCredential":{zh:"\u4FDD\u5B58\u51ED\u636E",en:"Save credential"},"client.deleteTheProxyThisActionCannotBeUndone":{zh:"\u5220\u9664\u4EE3\u7406\u201C{0}\u201D\uFF1F\u6B64\u64CD\u4F5C\u65E0\u6CD5\u64A4\u9500\u3002",en:"Delete the proxy \u201C{0}\u201D? This action cannot be undone."},"client.keepCommonHttpAndSocks5ProxiesInOnePlace":{zh:"\u96C6\u4E2D\u4FDD\u5B58\u5E38\u7528 HTTP \u4E0E SOCKS5 \u4EE3\u7406\uFF0C\u4E3B\u673A\u914D\u7F6E\u53EA\u4FDD\u7559\u5F15\u7528\u3002",en:"Keep common HTTP and SOCKS5 proxies in one place; host configs only reference them."},"client.newProxy":{zh:"\u65B0\u5EFA\u4EE3\u7406",en:"New proxy"},"client.noSavedProxiesYet":{zh:"\u8FD8\u6CA1\u6709\u5E38\u7528\u4EE3\u7406",en:"No saved proxies yet"},"client.saveOnceAndMultipleSshHostsCanShareThe":{zh:"\u4FDD\u5B58\u4E00\u6B21\u540E\uFF0C\u591A\u53F0 SSH \u4E3B\u673A\u53EF\u4EE5\u5171\u7528\u540C\u4E00\u6761\u8FDE\u63A5\u8DEF\u5F84\u3002",en:"Save once and multiple SSH hosts can share the same connection path."},"client.addProxy":{zh:"\u6DFB\u52A0\u4EE3\u7406",en:"Add proxy"},"client.deleteProxy":{zh:"\u5220\u9664\u4EE3\u7406",en:"Delete proxy"},"client.createProxy":{zh:"\u65B0\u5EFA\u5E38\u7528\u4EE3\u7406",en:"Create proxy"},"client.theProxyPasswordIsNotShownAgainAfterSaving":{zh:"\u4EE3\u7406\u5BC6\u7801\u4FDD\u5B58\u540E\u4E0D\u4F1A\u56DE\u663E",en:"The proxy password is not shown again after saving"},"client.officeSocks5":{zh:"\u529E\u516C\u5BA4 SOCKS5",en:"Office SOCKS5"},"client.proxyType":{zh:"\u4EE3\u7406\u7C7B\u578B",en:"Proxy type"},"client.proxyHost":{zh:"\u4EE3\u7406\u4E3B\u673A",en:"Proxy host"},"client.proxyPort":{zh:"\u4EE3\u7406\u7AEF\u53E3",en:"Proxy port"},"client.proxyUsername":{zh:"\u4EE3\u7406\u7528\u6237\u540D",en:"Proxy username"},"client.proxyPassword":{zh:"\u4EE3\u7406\u5BC6\u7801",en:"Proxy password"},"client.optionalCannotBeReadBackAfterSaving":{zh:"\u53EF\u9009\uFF0C\u4FDD\u5B58\u540E\u4E0D\u53EF\u8BFB\u56DE",en:"Optional. Cannot be read back after saving."},"client.saveProxy":{zh:"\u4FDD\u5B58\u4EE3\u7406",en:"Save proxy"},"client.githubAuthorizationExpired":{zh:"GitHub \u6388\u6743\u5DF2\u5931\u6548",en:"GitHub authorization expired"},"client.githubConnected":{zh:"GitHub \u5DF2\u8FDE\u63A5 \xB7 {0}",en:"GitHub connected \xB7 {0}"},"client.githubReachable":{zh:"GitHub \u7F51\u7EDC\u8FDE\u63A5\u6210\u529F \xB7 {0}",en:"GitHub reachable \xB7 {0}"},"client.viaProxy":{zh:"\u901A\u8FC7\u4EE3\u7406",en:"Via proxy"},"client.direct":{zh:"\u76F4\u8FDE",en:"Direct"},"client.gistSyncSettingsAreNotLoadedYet":{zh:"Gist \u540C\u6B65\u8BBE\u7F6E\u5C1A\u672A\u52A0\u8F7D",en:"Gist sync settings are not loaded yet"},"client.gistSyncSettingsSaved":{zh:"Gist \u540C\u6B65\u8BBE\u7F6E\u5DF2\u4FDD\u5B58",en:"Gist sync settings saved"},"client.connected":{zh:"\u8FDE\u63A5\u6210\u529F \xB7 {0}",en:"Connected \xB7 {0}"},"client.deviceCodeGeneratedCopyItInTheAuthorizationWindow":{zh:"\u8BBE\u5907\u4EE3\u7801\u5DF2\u751F\u6210\uFF0C\u8BF7\u5728\u6388\u6743\u7A97\u53E3\u4E2D\u590D\u5236\u540E\u524D\u5F80 GitHub",en:"Device code generated. Copy it in the authorization window, then go to GitHub."},"client.githubAccountDisconnectedTheSyncEncryptionPasswordIsStill":{zh:"GitHub \u8D26\u53F7\u5DF2\u65AD\u5F00\uFF0C\u540C\u6B65\u52A0\u5BC6\u5BC6\u7801\u4ECD\u4FDD\u7559\u5728\u672C\u673A",en:"GitHub account disconnected. The sync encryption password is still kept on this device."},"client.sshSettings":{zh:"SSH \u8BBE\u7F6E",en:"SSH settings"},"client.securityBoundariesCommandLimitsAndCrossDeviceConfigSync":{zh:"\u5B89\u5168\u8FB9\u754C\u3001\u547D\u4EE4\u9650\u5236\u4E0E\u8DE8\u8BBE\u5907\u914D\u7F6E\u540C\u6B65",en:"Security boundaries, command limits, and cross-device config sync"},"client.githubGistSync":{zh:"GitHub Gist \u540C\u6B65",en:"GitHub Gist sync"},"client.endToEndEncryptedSyncOfHostsFtpFtps":{zh:"\u540C\u6B65\u4E3B\u673A\u3001FTP\u3001\u76EE\u5F55\u3001\u5206\u7EC4\u4EE3\u7406\u3001\u5BC6\u94A5\u5E93\u4E0E\u5E38\u7528\u547D\u4EE4\uFF1B\u5BC6\u7801\u548C\u79C1\u94A5\u5355\u72EC\u52A0\u5BC6",en:"Sync hosts, FTP, directories, group proxies, credentials and saved commands; passwords and private keys are encrypted separately"},"client.checkGithubAuthorization":{zh:"GitHub \u6388\u6743\u9700\u68C0\u67E5",en:"Check GitHub authorization"},"client.connected2":{zh:"\u5DF2\u8FDE\u63A5 {0}",en:"Connected {0}"},"client.connectGithub":{zh:"\u8FDE\u63A5 GitHub",en:"Connect GitHub"},"client.authorizationCredentialsAreStoredSecurelyInThisDsh":{zh:"\u6388\u6743\u51ED\u636E\u5B89\u5168\u4FDD\u5B58\u5728\u5F53\u524D DSH",en:"Authorization credentials are stored securely in this DSH"},"client.getGistAccessThroughGithubDeviceAuthorization":{zh:"\u901A\u8FC7 GitHub \u8BBE\u5907\u6388\u6743\u83B7\u53D6 Gist \u8BBF\u95EE\u6743\u9650",en:"Get Gist access through GitHub device authorization"},"client.connecting":{zh:"\u8FDE\u63A5\u4E2D\u2026",en:"Connecting\u2026"},"client.waitingForAuthorization":{zh:"\u7B49\u5F85\u6388\u6743\u2026",en:"Waiting for authorization\u2026"},"client.reconnect":{zh:"\u91CD\u65B0\u8FDE\u63A5",en:"Reconnect"},"client.disconnecting":{zh:"\u65AD\u5F00\u4E2D\u2026",en:"Disconnecting\u2026"},"client.disconnect":{zh:"\u65AD\u5F00",en:"Disconnect"},"client.onFirstUseEnterYourGithubOauthClientId":{zh:"\u9996\u6B21\u4F7F\u7528\u9700\u5728\u4E0B\u65B9\u201C\u9AD8\u7EA7\u6388\u6743\u8BBE\u7F6E\u201D\u4E2D\u586B\u5199 GitHub OAuth Client ID\u3002\u5B83\u4E0D\u662F\u5BC6\u94A5\uFF0C\u53EA\u7528\u4E8E\u6807\u8BC6\u6388\u6743\u5E94\u7528\u3002",en:"On first use, enter your GitHub OAuth Client ID under \u201CAdvanced authorization settings\u201D below. It is not a secret; it only identifies the authorization app."},"client.leaveEmptyToCreateAPrivateGistAutomaticallyOn":{zh:"\u7559\u7A7A\u540E\u9996\u6B21\u540C\u6B65\u4F1A\u81EA\u52A8\u521B\u5EFA\u79C1\u6709 Gist",en:"Leave empty to create a private Gist automatically on the first sync"},"client.autoCreate":{zh:"\u81EA\u52A8\u521B\u5EFA",en:"Auto-create"},"client.syncEncryptionPassword":{zh:"\u540C\u6B65\u52A0\u5BC6\u5BC6\u7801",en:"Sync encryption password"},"client.savedSecurelyEnterTheSamePasswordOnANew":{zh:"\u5DF2\u5B89\u5168\u4FDD\u5B58\uFF1B\u65B0\u8BBE\u5907\u9700\u8F93\u5165\u76F8\u540C\u5BC6\u7801",en:"Saved securely. Enter the same password on a new device."},"client.atLeast6CharactersALongerPasswordIsRecommended":{zh:"\u81F3\u5C11 6 \u4E2A\u5B57\u7B26\uFF0C\u5EFA\u8BAE\u4F7F\u7528\u66F4\u957F\u5BC6\u7801",en:"At least 6 characters. A longer password is recommended."},"client.configured":{zh:"\u5DF2\u914D\u7F6E",en:"Configured"},"client.setASeparateEncryptionPassword":{zh:"\u8BBE\u7F6E\u72EC\u7ACB\u52A0\u5BC6\u5BC6\u7801",en:"Set a separate encryption password"},"client.syncVersionInfo":{zh:"\u540C\u6B65\u7248\u672C\u4FE1\u606F",en:"Sync version info"},"client.cloudVersion":{zh:"\u4E91\u7AEF\u7248\u672C",en:"Cloud version"},"client.notReadYet":{zh:"\u5C1A\u672A\u8BFB\u53D6",en:"Not read yet"},"client.lastSync":{zh:"\u4E0A\u6B21\u540C\u6B65",en:"Last sync"},"client.neverSynced":{zh:"\u5C1A\u672A\u540C\u6B65",en:"Never synced"},"client.syncPolicy":{zh:"\u540C\u6B65\u7B56\u7565",en:"Sync policy"},"client.gistSyncPolicy":{zh:"Gist \u540C\u6B65\u7B56\u7565",en:"Gist sync policy"},"client.smart":{zh:"\u667A\u80FD",en:"Smart"},"client.detectChangesOnBothSidesAutomaticallyAndMergePer":{zh:"\u81EA\u52A8\u5224\u65AD\u4E24\u7AEF\u53D8\u5316\u5E76\u6309\u6761\u76EE\u5408\u5E76",en:"Detect changes on both sides automatically and merge per item"},"client.localFirst":{zh:"\u672C\u5730\u4F18\u5148",en:"Local first"},"client.keepThisDeviceSConfigWhenBothSidesChanged":{zh:"\u53CC\u65B9\u540C\u65F6\u4FEE\u6539\u65F6\u4FDD\u7559\u672C\u673A\u914D\u7F6E",en:"Keep this device's config when both sides changed"},"client.cloudFirst":{zh:"\u4E91\u7AEF\u4F18\u5148",en:"Cloud first"},"client.useTheGistConfigWhenBothSidesChanged":{zh:"\u53CC\u65B9\u540C\u65F6\u4FEE\u6539\u65F6\u91C7\u7528 Gist \u914D\u7F6E",en:"Use the Gist config when both sides changed"},"client.autoSync":{zh:"\u81EA\u52A8\u540C\u6B65",en:"Auto sync"},"client.checksAfterStartupAfterConfigChangesAndEveryFive":{zh:"\u542F\u52A8\u540E\u3001\u914D\u7F6E\u53D8\u5316\u540E\u548C\u540E\u53F0\u6BCF\u4E94\u5206\u949F\u68C0\u67E5\u4E00\u6B21",en:"Checks after startup, after config changes, and every five minutes in the background"},"client.backupsToKeep":{zh:"\u5907\u4EFD\u4FDD\u7559\u6570\u91CF",en:"Backups to keep"},"client.explicitHistorySnapshotsKeptInTheMainGistGithub":{zh:"\u4E3B Gist \u5185\u4FDD\u7559\u7684\u663E\u5F0F\u5386\u53F2\u5FEB\u7167\uFF1BGitHub \u81EA\u8EAB\u4FEE\u8BA2\u5386\u53F2\u4E0D\u53D7\u5F71\u54CD",en:"Explicit history snapshots kept in the main Gist; GitHub's own revision history is unaffected"},"client.copies":{zh:"\u4EFD",en:"copies"},"client.advancedAuthorizationSettings":{zh:"\u9AD8\u7EA7\u6388\u6743\u8BBE\u7F6E",en:"Advanced authorization settings"},"client.enableDeviceFlowInTheGithubOauthAppNo":{zh:"\u5728 GitHub OAuth App \u4E2D\u542F\u7528 Device Flow\uFF1B\u4E0D\u9700\u8981 Client Secret",en:"Enable Device Flow in the GitHub OAuth App; no Client Secret needed"},"client.personalAccessTokenFallback":{zh:"Personal Access Token\uFF08\u5907\u7528\uFF09",en:"Personal Access Token (fallback)"},"client.alreadyAuthorizedEnteringATokenReplacesTheCurrentAuthorization":{zh:"\u5DF2\u6709\u6388\u6743\uFF1B\u586B\u5199\u540E\u4F1A\u66FF\u6362\u5F53\u524D\u6388\u6743",en:"Already authorized. Entering a token replaces the current authorization."},"client.fillInOnlyWhenOauthIsUnavailableRequiresThe":{zh:"\u4EC5\u5728\u65E0\u6CD5\u4F7F\u7528 OAuth \u65F6\u586B\u5199\uFF0C\u9700\u8981 gist \u6743\u9650",en:"Fill in only when OAuth is unavailable. Requires the gist scope."},"client.noOauthApp":{zh:"\u6CA1\u6709 OAuth App\uFF1F",en:"No OAuth App?"},"client.goToGithubToCreateOne":{zh:"\u524D\u5F80 GitHub \u521B\u5EFA",en:"Go to GitHub to create one"},"client.thenEnableDeviceFlowInTheAppSettings":{zh:"\uFF0C\u521B\u5EFA\u540E\u5728\u5E94\u7528\u8BBE\u7F6E\u4E2D\u542F\u7528 Device Flow\u3002",en:", then enable Device Flow in the app settings."},"client.syncedContent":{zh:"\u540C\u6B65\u5185\u5BB9\uFF1A",en:"Synced content: "},"client.hostsFtpFtpsPinnedProjectDirectoriesTheProxyVault":{zh:"\u4E3B\u673A\u3001FTP/FTPS\u3001\u56FA\u5B9A\u9879\u76EE\u76EE\u5F55\u3001\u4EE3\u7406\u5E93\u3001\u5BC6\u94A5\u5E93\uFF0C\u4EE5\u53CA\u5176\u4E2D\u7684\u5BC6\u7801\u548C\u79C1\u94A5\u3002\u654F\u611F\u5B57\u6BB5\u4E0A\u4F20\u524D\u4F1A\u52A0\u5BC6\u3002",en:"Hosts, FTP/FTPS, pinned project directories, the proxy vault, the credential vault, and their passwords and private keys. Sensitive fields are encrypted before upload."},"client.keptLocalOnly":{zh:"\u4EC5\u4FDD\u7559\u672C\u673A\uFF1A",en:"Kept local only: "},"client.sessionGrantsPortForwardingPublicBindsAndCommandLimits":{zh:"\u5F53\u524D\u4F1A\u8BDD\u6388\u6743\u3001\u7AEF\u53E3\u8F6C\u53D1\u3001\u516C\u5F00\u7ED1\u5B9A\u4E0E\u547D\u4EE4\u9650\u5236\u3002GitHub Token \u548C\u540C\u6B65\u52A0\u5BC6\u5BC6\u7801\u4E5F\u59CB\u7EC8\u53EA\u4FDD\u5B58\u5728\u672C\u673A DSH \u51ED\u636E\u670D\u52A1\u3002",en:"Session grants, port forwarding, public binds, and command limits. The GitHub Token and sync encryption passphrase are also always stored only in the local DSH credential service."},"client.lastSyncFailed":{zh:"\u4E0A\u6B21\u540C\u6B65\u5931\u8D25\uFF1A",en:"Last sync failed: "},"client.openGist":{zh:"\u6253\u5F00 Gist",en:"Open Gist"},"client.testing":{zh:"\u6D4B\u8BD5\u4E2D\u2026",en:"Testing\u2026"},"client.testConnection":{zh:"\u6D4B\u8BD5\u8FDE\u63A5",en:"Test connection"},"client.syncing":{zh:"\u540C\u6B65\u4E2D\u2026",en:"Syncing\u2026"},"client.syncNow":{zh:"\u7ACB\u5373\u540C\u6B65",en:"Sync now"},"client.saving2":{zh:"\u4FDD\u5B58\u4E2D\u2026",en:"Saving\u2026"},"client.saveSyncSettings":{zh:"\u4FDD\u5B58\u540C\u6B65\u8BBE\u7F6E",en:"Save sync settings"},"client.localRuntimeSettings":{zh:"\u672C\u673A\u8FD0\u884C\u8BBE\u7F6E",en:"Local runtime settings"},"client.affectsThisDshInstanceOnlyNotSyncedViaGist":{zh:"\u53EA\u5F71\u54CD\u5F53\u524D DSH\uFF0C\u4E0D\u53C2\u4E0E Gist \u540C\u6B65",en:"Affects this DSH instance only; not synced via Gist"},"client.githubOutboundProxy":{zh:"GitHub \u51FA\u7AD9\u4EE3\u7406",en:"GitHub outbound proxy"},"client.usedOnlyForOauthAndTheGistApiE":{zh:"\u4EC5\u7528\u4E8E OAuth \u4E0E Gist API\uFF1B\u4F8B\u5982 http://host.docker.internal:7893\uFF0C\u7559\u7A7A\u65F6\u4F7F\u7528\u7CFB\u7EDF HTTPS_PROXY",en:"Used only for OAuth and the Gist API; e.g. http://host.docker.internal:7893. Falls back to the system HTTPS_PROXY when left empty."},"client.connectToGithubDirectly":{zh:"\u76F4\u8FDE GitHub",en:"Connect to GitHub directly"},"client.testGithubNetwork":{zh:"\u6D4B\u8BD5 GitHub \u7F51\u7EDC",en:"Test GitHub network"},"client.allowPublicPortBinding":{zh:"\u5141\u8BB8\u516C\u5F00\u7AEF\u53E3\u7ED1\u5B9A",en:"Allow public port binding"},"client.allowsForwardsToListenOn0000":{zh:"\u5141\u8BB8\u8F6C\u53D1\u76D1\u542C 0.0.0.0 \u6216\u5176\u4ED6\u975E\u56DE\u73AF\u5730\u5740\u3002\u4EC5\u5728\u660E\u786E\u914D\u7F6E\u9632\u706B\u5899\u540E\u5F00\u542F\u3002",en:"Allows forwards to listen on 0.0.0.0 or other non-loopback addresses. Enable only with a properly configured firewall."},"client.defaultCommandTimeout":{zh:"\u9ED8\u8BA4\u547D\u4EE4\u8D85\u65F6",en:"Default command timeout"},"client.maximumWaitTimeForTheAiSSshExec":{zh:"AI \u7684 ssh_exec \u6700\u957F\u7B49\u5F85\u65F6\u95F4",en:"Maximum wait time for the AI's ssh_exec"},"client.ms":{zh:"\u6BEB\u79D2",en:"ms"},"client.maxCommandOutput":{zh:"\u6700\u5927\u547D\u4EE4\u8F93\u51FA",en:"Max command output"},"client.keepsTheNewestOutputBeyondThisLimitSoContext":{zh:"\u8D85\u51FA\u540E\u4FDD\u7559\u6700\u65B0\u8F93\u51FA\uFF0C\u907F\u514D\u6324\u5360\u4E0A\u4E0B\u6587",en:"Keeps the newest output beyond this limit so context is not crowded out"},"client.chars":{zh:"\u5B57\u7B26",en:"chars"},"client.copyTheDeviceCodeThenGoToGithubTo":{zh:"\u590D\u5236\u8BBE\u5907\u4EE3\u7801\uFF0C\u518D\u524D\u5F80 GitHub \u5B8C\u6210\u672C\u6B21\u6388\u6743",en:"Copy the device code, then go to GitHub to finish authorizing"},"client.oneTimeDeviceCode":{zh:"\u4E00\u6B21\u6027\u8BBE\u5907\u4EE3\u7801",en:"One-time device code"},"client.copied":{zh:"\u5DF2\u590D\u5236",en:"Copied"},"client.copyCode":{zh:"\u590D\u5236\u4EE3\u7801",en:"Copy code"},"client.copyTheCodeAbove":{zh:"\u590D\u5236\u4E0A\u65B9\u4EE3\u7801",en:"Copy the code above"},"client.theDeviceCodeIsUsedForThisAuthorizationOnly":{zh:"\u8BBE\u5907\u4EE3\u7801\u53EA\u7528\u4E8E\u8FD9\u4E00\u6B21\u6388\u6743",en:"The device code is used for this authorization only"},"client.openTheGithubAuthorizationPage":{zh:"\u6253\u5F00 GitHub \u6388\u6743\u9875",en:"Open the GitHub authorization page"},"client.pasteTheCodeAndConfirmAuthorizationForTheCurrent":{zh:"\u7C98\u8D34\u4EE3\u7801\u5E76\u786E\u8BA4\u6388\u6743\u7ED9\u5F53\u524D OAuth App",en:"Paste the code and confirm authorization for the current OAuth App"},"client.backToDsh":{zh:"\u8FD4\u56DE DSH",en:"Back to DSH"},"client.theConnectionCompletesAutomaticallyOnceAuthorized":{zh:"\u6388\u6743\u6210\u529F\u540E\u4F1A\u81EA\u52A8\u5B8C\u6210\u8FDE\u63A5",en:"The connection completes automatically once authorized"},"client.theBrowserBlockedAutomaticCopyingSelectTheDeviceCode":{zh:"\u6D4F\u89C8\u5668\u672A\u5141\u8BB8\u81EA\u52A8\u590D\u5236\uFF0C\u8BF7\u9009\u4E2D\u8BBE\u5907\u4EE3\u7801\u624B\u52A8\u590D\u5236\u3002",en:"The browser blocked automatic copying. Select the device code and copy it manually."},"client.later":{zh:"\u7A0D\u540E\u518D\u8BF4",en:"Later"},"client.goToGithubToAuthorize":{zh:"\u524D\u5F80 GitHub \u6388\u6743",en:"Go to GitHub to authorize"},"client.syncing2":{zh:"\u540C\u6B65\u4E2D",en:"Syncing"},"client.actionNeeded":{zh:"\u9700\u8981\u5904\u7406",en:"Action needed"},"client.waitingForFirstSync":{zh:"\u7B49\u5F85\u9996\u6B21\u540C\u6B65",en:"Waiting for first sync"},"client.notConfigured":{zh:"\u5C1A\u672A\u914D\u7F6E",en:"Not configured"},"client.lastSynced":{zh:"\u4E0A\u6B21\u540C\u6B65 {0}",en:"Last synced {0}"},"client.localConfigUploaded":{zh:"\u672C\u5730\u914D\u7F6E\u5DF2\u4E0A\u4F20",en:"Local config uploaded"},"client.cloudConfigApplied":{zh:"\u4E91\u7AEF\u914D\u7F6E\u5DF2\u5E94\u7528",en:"Cloud config applied"},"client.configsFromBothSidesMergedIntelligently":{zh:"\u4E24\u7AEF\u914D\u7F6E\u5DF2\u667A\u80FD\u5408\u5E76",en:"Configs from both sides merged intelligently"},"client.configIsAlreadyUpToDate":{zh:"\u914D\u7F6E\u5DF2\u7ECF\u662F\u6700\u65B0\u72B6\u6001",en:"Config is already up to date"},"client.justNow":{zh:"\u521A\u521A",en:"Just now"},"client.minutesAgo":{zh:"{0} \u5206\u949F\u524D",en:"{0} minutes ago"},"client.hoursAgo":{zh:"{0} \u5C0F\u65F6\u524D",en:"{0} hours ago"},"client.newPortForward":{zh:"\u65B0\u5EFA\u7AEF\u53E3\u8F6C\u53D1",en:"New port forward"},"client.type":{zh:"\u7C7B\u578B",en:"Type"},"client.localForwardL":{zh:"\u672C\u5730\u8F6C\u53D1\uFF08L\uFF09",en:"Local forward (L)"},"client.remoteForwardR":{zh:"\u8FDC\u7A0B\u8F6C\u53D1\uFF08R\uFF09",en:"Remote forward (R)"},"client.dynamicSocks5D":{zh:"\u52A8\u6001 SOCKS5\uFF08D\uFF09",en:"Dynamic SOCKS5 (D)"},"client.listenAddress":{zh:"\u76D1\u542C\u5730\u5740",en:"Listen address"},"client.listenPort":{zh:"\u76D1\u542C\u7AEF\u53E3",en:"Listen port"},"client.automaticPortHint":{zh:"0 \u8868\u793A\u81EA\u52A8\u9009\u62E9",en:"0 means choose automatically"},"client.targetHost":{zh:"\u76EE\u6807\u4E3B\u673A",en:"Target host"},"client.targetPort":{zh:"\u76EE\u6807\u7AEF\u53E3",en:"Target port"},"client.autoStart":{zh:"\u81EA\u52A8\u542F\u52A8",en:"Auto-start"},"client.restoreThisForwardWhenDshStarts":{zh:"DSH \u542F\u52A8\u65F6\u6062\u590D\u6B64\u8F6C\u53D1",en:"Restore this forward when DSH starts"},"client.saveRule":{zh:"\u4FDD\u5B58\u89C4\u5219",en:"Save rule"},"client.commonProxies":{zh:"\u5E38\u7528\u4EE3\u7406",en:"Common proxies"},"client.sshJumpHost":{zh:"SSH \u8DF3\u677F",en:"SSH jump host"},"client.httpProxy":{zh:"HTTP \u4EE3\u7406",en:"HTTP proxy"},"client.socks5Proxy":{zh:"SOCKS5 \u4EE3\u7406",en:"SOCKS5 proxy"},"client.running":{zh:"\u8FD0\u884C\u4E2D \xB7 {0}",en:"Running \xB7 {0}"},"client.starting":{zh:"\u542F\u52A8\u4E2D",en:"Starting"},"client.failed":{zh:"\u5931\u8D25",en:"Failed"},"client.stopped":{zh:"\u5DF2\u505C\u6B62",en:"Stopped"},"commands-panel.saveCommandsManuallyThenSelectAndConfirmExecutionIn":{zh:"\u624B\u52A8\u8BB0\u5F55\uFF0C\u5728\u7EC8\u7AEF\u4E2D\u9009\u62E9\u5E76\u786E\u8BA4\u6267\u884C\u3002\u8BF7\u52FF\u4FDD\u5B58\u5BC6\u7801\u6216 Token\u3002",en:"Save commands manually, then select and confirm execution in a terminal. Do not store passwords or tokens."},"commands-panel.newCommand":{zh:"\u65B0\u5EFA\u547D\u4EE4",en:"New command"},"commands-panel.searchCommands":{zh:"\u641C\u7D22\u547D\u4EE4",en:"Search commands"},"commands-panel.searchNamesOrCommands":{zh:"\u641C\u7D22\u540D\u79F0\u6216\u547D\u4EE4\u2026",en:"Search names or commands\u2026"},"commands-panel.retry":{zh:"\u91CD\u8BD5",en:"Retry"},"commands-panel.loadingCommands":{zh:"\u6B63\u5728\u8BFB\u53D6\u547D\u4EE4\u2026",en:"Loading commands\u2026"},"commands-panel.noMatchingCommands":{zh:"\u6CA1\u6709\u5339\u914D\u7684\u547D\u4EE4",en:"No matching commands"},"commands-panel.noSavedCommandsYetCreateOneOnTheWorkspace":{zh:"\u8FD8\u6CA1\u6709\u5E38\u7528\u547D\u4EE4\uFF0C\u8BF7\u5148\u5230\u5DE5\u4F5C\u53F0\u7684\u5E38\u7528\u547D\u4EE4\u9875\u9762\u65B0\u5EFA\u3002",en:"No saved commands yet. Create one on the workspace\u2019s Saved commands page."},"commands-panel.noSavedCommandsYetClickNewCommandToGet":{zh:"\u8FD8\u6CA1\u6709\u5E38\u7528\u547D\u4EE4\uFF0C\u70B9\u51FB\u65B0\u5EFA\u5F00\u59CB\u8BB0\u5F55\u3002",en:"No saved commands yet. Click New command to get started."},"commands-panel.select":{zh:"\u9009\u7528",en:"Select"},"commands-panel.editCommand":{zh:"\u7F16\u8F91\u547D\u4EE4",en:"Edit command"},"commands-panel.deleteCommand":{zh:"\u5220\u9664\u547D\u4EE4",en:"Delete command"},"commands-panel.commandPages":{zh:"\u547D\u4EE4\u5206\u9875",en:"Command pages"},"commands-panel.pages":{zh:"\u9875 \xB7",en:"pages \xB7"},"commands-panel.items":{zh:"\u6761",en:"items"},"commands-panel.previousPage":{zh:"\u4E0A\u4E00\u9875",en:"Previous page"},"commands-panel.nextPage":{zh:"\u4E0B\u4E00\u9875",en:"Next page"},"commands-panel.deleteSavedCommand":{zh:"\u5220\u9664\u5E38\u7528\u547D\u4EE4",en:"Delete saved command"},"commands-panel.onlyThisRecordIsDeletedRunningTerminalsAreNot":{zh:"\u4EC5\u5220\u9664\u8BB0\u5F55\uFF0C\u4E0D\u5F71\u54CD\u5DF2\u7ECF\u8FD0\u884C\u7684\u7EC8\u7AEF\u3002",en:"Only this record is deleted. Running terminals are not affected."},"commands-panel.deleting":{zh:"\u5220\u9664\u4E2D\u2026",en:"Deleting\u2026"},"commands-panel.command":{zh:"\u547D\u4EE4",en:"Command"},"commands-panel.multiLineScriptsAreSupportedRecordsStayInThis":{zh:"\u652F\u6301\u591A\u884C\u811A\u672C\uFF1B\u8BB0\u5F55\u4FDD\u5B58\u5728\u5F53\u524D DSH \u5B9E\u4F8B\uFF0C\u4E0D\u4F1A\u81EA\u52A8\u6267\u884C\u6216\u4E0A\u4F20\u5230 Gist\u3002",en:"Multi-line scripts are supported. Records stay in this DSH instance and are not executed automatically or uploaded to Gist."},"commands-panel.save":{zh:"\u4FDD\u5B58",en:"Save"},"file-entry-delete-dialog.deleteItems":{zh:"\u5220\u9664 {0} \u9879\uFF1F",en:"Delete {0} items?"},"file-entry-delete-dialog.thisCannotBeUndone":{zh:"{0} \xB7 \u6B64\u64CD\u4F5C\u65E0\u6CD5\u64A4\u9500",en:"{0} \xB7 this cannot be undone"},"file-entry-delete-dialog.theCurrentSessionDirectory":{zh:"\u5F53\u524D\u4F1A\u8BDD\u76EE\u5F55",en:"the current session directory"},"file-entry-delete-dialog.ofTheseDirectoriesAndAllTheirContentsWillBe":{zh:"\u5176\u4E2D {0} \u4E2A\u76EE\u5F55\u53CA\u5176\u5168\u90E8\u5185\u5BB9\u4F1A\u88AB\u9012\u5F52\u5220\u9664\u3002",en:"Of these, {0} directories and all their contents will be recursively deleted."},"file-entry-delete-dialog.andAnother":{zh:"\u4EE5\u53CA\u5176\u4ED6",en:"and another"},"file-entry-delete-dialog.items":{zh:"\u9879",en:"items"},"file-entry-delete-dialog.deleting":{zh:"\u6B63\u5728\u5220\u9664\u2026",en:"Deleting\u2026"},"file-entry-delete-dialog.confirmDelete":{zh:"\u786E\u8BA4\u5220\u9664",en:"Confirm delete"},"file-transfer-workspace.directStreamingTransfersBetweenFtpFtpsAndSftp":{zh:"FTP\u3001FTPS \u4E0E SFTP \u4E4B\u95F4\u76F4\u63A5\u6D41\u5F0F\u4E92\u4F20",en:"Direct streaming transfers between FTP, FTPS, and SFTP"},"file-transfer-workspace.sessionAccess":{zh:"\u4F1A\u8BDD\u8BBF\u95EE \xB7",en:"Session access \xB7"},"file-transfer-workspace.ftpManager":{zh:"FTP \u7BA1\u7406",en:"FTP manager"},"file-transfer-workspace.fileTransferTasksPage":{zh:"\u6587\u4EF6\u4F20\u8F93\u4EFB\u52A1\u9875",en:"File transfer tasks page"},"file-transfer-workspace.close":{zh:"\u5173\u95ED {0}",en:"Close {0}"},"file-transfer-workspace.newTransferTasksPage":{zh:"\u65B0\u5EFA\u4F20\u8F93\u4EFB\u52A1\u9875",en:"New transfer tasks page"},"file-transfer-workspace.panes":{zh:"\u7A97\u683C\u6570\u91CF",en:"Panes"},"file-transfer-workspace.panes2":{zh:"\u680F",en:"panes"},"file-transfer-workspace.noFileConnectionsAvailableYet":{zh:"\u8FD8\u6CA1\u6709\u53EF\u7528\u6587\u4EF6\u8FDE\u63A5",en:"No file connections available yet"},"file-transfer-workspace.createAnFtpFtpsConnectionOrAddAnSsh":{zh:"\u65B0\u5EFA FTP/FTPS \u8FDE\u63A5\uFF0C\u6216\u5148\u6DFB\u52A0\u4E00\u53F0 SSH \u4E3B\u673A\u4F7F\u7528 SFTP\u3002",en:"Create an FTP/FTPS connection, or add an SSH host first to use SFTP."},"file-transfer-workspace.newFtpConnection":{zh:"\u65B0\u5EFA FTP \u8FDE\u63A5",en:"New FTP connection"},"file-transfer-workspace.connectionList":{zh:"\u8FDE\u63A5\u5217\u8868",en:"Connection list"},"file-transfer-workspace.clickAConnectionToBrowseRemoteFiles":{zh:"\u5355\u51FB\u8FDE\u63A5\u540E\u6D4F\u89C8\u8FDC\u7AEF\u6587\u4EF6",en:"Click a connection to browse remote files"},"file-transfer-workspace.sshHosts":{zh:"SSH \u4E3B\u673A",en:"SSH hosts"},"file-transfer-workspace.fileConnections":{zh:"\u6587\u4EF6\u8FDE\u63A5",en:"File connections"},"file-transfer-workspace.availableConnections":{zh:"\u4E2A\u53EF\u7528\u8FDE\u63A5",en:"available connections"},"file-transfer-workspace.sftpReusesSshHostConfiguration":{zh:"SFTP \u590D\u7528 SSH \u4E3B\u673A\u914D\u7F6E",en:"SFTP reuses SSH host configuration"},"file-transfer-workspace.backToConnectionList":{zh:"\u8FD4\u56DE\u8FDE\u63A5\u5217\u8868",en:"Back to connection list"},"file-transfer-workspace.parentDirectory":{zh:"\u4E0A\u4E00\u7EA7\u76EE\u5F55",en:"Parent directory"},"file-transfer-workspace.refreshDirectory":{zh:"\u5237\u65B0\u76EE\u5F55",en:"Refresh directory"},"file-transfer-workspace.remotePath":{zh:"\u8FDC\u7AEF\u8DEF\u5F84",en:"Remote path"},"file-transfer-workspace.goTo":{zh:"\u524D\u5F80",en:"Go to"},"file-transfer-workspace.size":{zh:"\u5927\u5C0F",en:"Size"},"file-transfer-workspace.modified":{zh:"\u4FEE\u6539\u65F6\u95F4",en:"Modified"},"file-transfer-workspace.actions":{zh:"\u64CD\u4F5C",en:"Actions"},"file-transfer-workspace.readingDirectory":{zh:"\u6B63\u5728\u8BFB\u53D6\u76EE\u5F55\u2026",en:"Reading directory\u2026"},"file-transfer-workspace.thisDirectoryIsEmpty":{zh:"\u8FD9\u4E2A\u76EE\u5F55\u662F\u7A7A\u7684\u3002",en:"This directory is empty."},"file-transfer-workspace.selectedItems":{zh:"\u5DF2\u9009\u62E9 {0} \u9879",en:"Selected {0} items"},"file-transfer-workspace.items":{zh:"{0} \u9879",en:"{0} items"},"file-transfer-workspace.sendToNextPane":{zh:"\u4F20\u9001\u5230\u4E0B\u4E00\u680F",en:"Send to next pane"},"file-transfer-workspace.moveToThisDirectory":{zh:"\u79FB\u52A8\u5230\u6B64\u76EE\u5F55",en:"Move to this directory"},"file-transfer-workspace.copyToThisDirectory":{zh:"\u590D\u5236\u5230\u6B64\u76EE\u5F55",en:"Copy to this directory"},"file-transfer-workspace.download":{zh:"\u4E0B\u8F7D\u5230\u672C\u5730",en:"Download"},"file-transfer-workspace.directoryClickToEnterAcceptsDragDrop":{zh:"\uFF0C\u76EE\u5F55\uFF0C\u5355\u51FB\u8FDB\u5165\uFF1B\u53EF\u63A5\u6536\u62D6\u653E",en:", directory, click to enter; accepts drag & drop"},"file-transfer-workspace.clickToView":{zh:"\uFF0C\u5355\u51FB\u67E5\u770B",en:", click to view"},"file-transfer-workspace.downloadLocally":{zh:"\u4E0B\u8F7D {0} \u5230\u672C\u5730",en:"Download {0} locally"},"file-transfer-workspace.packageAndDownloadLocally":{zh:"\u5C06 {0} \u6253\u5305\u4E0B\u8F7D\u5230\u672C\u5730",en:"Package {0} and download locally"},"file-transfer-workspace.collapseTransferTasks":{zh:"\u6536\u8D77\u4F20\u8F93\u4EFB\u52A1",en:"Collapse transfer tasks"},"file-transfer-workspace.expandTransferTasks":{zh:"\u5C55\u5F00\u4F20\u8F93\u4EFB\u52A1",en:"Expand transfer tasks"},"file-transfer-workspace.transferTasks":{zh:"\u4F20\u8F93\u4EFB\u52A1",en:"Transfer tasks"},"file-transfer-workspace.inProgress":{zh:"{0} \u4E2A\u8FDB\u884C\u4E2D",en:"{0} in progress"},"file-transfer-workspace.recentTasks":{zh:"\u6700\u8FD1\u4EFB\u52A1",en:"Recent tasks"},"file-transfer-workspace.noTasksYet":{zh:"\u6682\u65E0\u4EFB\u52A1",en:"No tasks yet"},"file-transfer-workspace.dragFromOnePaneToAnotherOrSelectFiles":{zh:"\u4ECE\u4E00\u4E2A\u7A97\u683C\u62D6\u5230\u53E6\u4E00\u4E2A\u7A97\u683C\uFF0C\u6216\u9009\u4E2D\u6587\u4EF6\u540E\u70B9\u51FB\u201C\u4F20\u9001\u5230\u4E0B\u4E00\u680F\u201D\u3002",en:"Drag from one pane to another, or select files and click \u201CSend to next pane\u201D."},"file-transfer-workspace.cancelTransfer":{zh:"\u53D6\u6D88\u4F20\u8F93",en:"Cancel transfer"},"file-transfer-workspace.handle":{zh:"\u5904\u7406",en:"Handle"},"file-transfer-workspace.aFileWithTheSameNameExistsAtThe":{zh:"\u76EE\u6807\u4E2D\u5B58\u5728\u540C\u540D\u6587\u4EF6",en:"A file with the same name exists at the destination"},"file-transfer-workspace.chooseHowToHandleThisBatchOfTransfers":{zh:"\u4E3A\u672C\u6279\u4F20\u8F93\u9009\u62E9\u5904\u7406\u65B9\u5F0F",en:"Choose how to handle this batch of transfers"},"file-transfer-workspace.autoRename":{zh:"\u81EA\u52A8\u91CD\u547D\u540D",en:"Auto rename"},"file-transfer-workspace.keepBothFilesAppendANumberToTheName":{zh:"\u4FDD\u7559\u4E24\u4EFD\u6587\u4EF6\uFF0C\u5728\u540D\u79F0\u540E\u6DFB\u52A0\u5E8F\u53F7",en:"Keep both files; append a number to the name"},"file-transfer-workspace.skipFilesWithTheSameName":{zh:"\u8DF3\u8FC7\u540C\u540D\u6587\u4EF6",en:"Skip files with the same name"},"file-transfer-workspace.continueTransferringTheRemainingItems":{zh:"\u7EE7\u7EED\u4F20\u8F93\u5176\u4ED6\u5185\u5BB9",en:"Continue transferring the remaining items"},"file-transfer-workspace.overwriteTheTargetFiles":{zh:"\u8986\u76D6\u76EE\u6807\u6587\u4EF6",en:"Overwrite the target files"},"file-transfer-workspace.replaceTheDestinationContentWithTheSourceContent":{zh:"\u4F7F\u7528\u6765\u6E90\u5185\u5BB9\u66FF\u6362\u76EE\u6807\u5185\u5BB9",en:"Replace the destination content with the source content"},"file-transfer-workspace.reQueuing":{zh:"\u6B63\u5728\u91CD\u65B0\u52A0\u5165\u961F\u5217\u2026",en:"Re-queuing\u2026"},"file-transfer-workspace.continueTransfer":{zh:"\u7EE7\u7EED\u4F20\u8F93",en:"Continue transfer"},"file-transfer-workspace.sessionAccess2":{zh:"\u4F1A\u8BDD\u8BBF\u95EE",en:"Session access"},"file-transfer-workspace.manageTheRemoteFileConnectionsAvailableToThisSession":{zh:"\u5355\u72EC\u7BA1\u7406\u5F53\u524D\u4F1A\u8BDD\u53EF\u4F7F\u7528\u7684\u8FDC\u7AEF\u6587\u4EF6\u8FDE\u63A5",en:"Manage the remote file connections available to this session"},"file-transfer-workspace.letTheCurrentSessionBrowseSelectedFtpFtpsOr":{zh:"\u5141\u8BB8\u5F53\u524D\u4F1A\u8BDD\u6D4F\u89C8\u6307\u5B9A\u7684 FTP\u3001FTPS \u6216 SFTP",en:"Let the current session browse selected FTP, FTPS, or SFTP"},"file-transfer-workspace.noConnectionsAvailable":{zh:"\u6CA1\u6709\u53EF\u7528\u8FDE\u63A5",en:"No connections available"},"file-transfer-workspace.addAnFtpInFileTransferFirstOrAdd":{zh:"\u8BF7\u5148\u5728\u6587\u4EF6\u4F20\u8F93\u4E2D\u6DFB\u52A0 FTP\uFF0C\u6216\u5728\u4E3B\u673A\u9762\u677F\u4E2D\u6DFB\u52A0 SSH \u4E3B\u673A\u3002",en:"Add an FTP in File Transfer first, or add an SSH host in the hosts panel."},"file-transfer-workspace.accessPolicy":{zh:"\u8BBF\u95EE\u7B56\u7565",en:"Access policy"},"file-transfer-workspace.filePermissionsAreSeparateFromSshCommandAndTerminal":{zh:"\u6587\u4EF6\u6743\u9650\u4E0E SSH \u547D\u4EE4\u3001\u7EC8\u7AEF\u6743\u9650\u76F8\u4E92\u72EC\u7ACB",en:"File permissions are separate from SSH command and terminal permissions"},"file-transfer-workspace.fileOperationPermissions":{zh:"\u6587\u4EF6\u64CD\u4F5C\u6743\u9650",en:"File operation permissions"},"file-transfer-workspace.browseModeDoesNotExposeCrossEndpointTransferTools":{zh:"\u6D4F\u89C8\u6A21\u5F0F\u4E0D\u4F1A\u5411 AI \u66B4\u9732\u8DE8\u7AEF\u4F20\u8F93\u5DE5\u5177",en:"Browse mode does not expose cross-endpoint transfer tools to the AI"},"file-transfer-workspace.confirmBeforeTransfer":{zh:"\u4F20\u8F93\u524D\u786E\u8BA4",en:"Confirm before transfer"},"file-transfer-workspace.requireDshApprovalWhenTheAiStartsATransfer":{zh:"AI \u53D1\u8D77\u4F20\u8F93\u65F6\u8BF7\u6C42 DSH \u6388\u6743",en:"Require DSH approval when the AI starts a transfer"},"file-transfer-workspace.savingChanges":{zh:"\u6B63\u5728\u4FDD\u5B58\u66F4\u6539",en:"Saving changes"},"file-transfer-workspace.autosaves":{zh:"{0} \xB7 \u81EA\u52A8\u4FDD\u5B58",en:"{0} \xB7 autosaves"},"file-transfer-workspace.authorizedConnections":{zh:"\u5DF2\u6388\u6743 {0} \u4E2A\u8FDE\u63A5",en:"Authorized {0} connections"},"file-transfer-workspace.noAuthorizedConnections":{zh:"\u672A\u6388\u6743\u8FDE\u63A5",en:"No authorized connections"},"file-transfer-workspace.done":{zh:"\u5B8C\u6210",en:"Done"},"file-transfer-workspace.authorized":{zh:"\u5DF2\u6388\u6743",en:"Authorized"},"file-transfer-workspace.notAuthorized":{zh:"\u672A\u6388\u6743",en:"Not authorized"},"file-transfer-workspace.readingSessionPermissions":{zh:"\u6B63\u5728\u8BFB\u53D6\u4F1A\u8BDD\u6743\u9650",en:"Reading session permissions"},"file-transfer-workspace.browseOnly":{zh:"\u4EC5\u6D4F\u89C8",en:"Browse only"},"file-transfer-workspace.allowTransfer":{zh:"\u5141\u8BB8\u4F20\u8F93",en:"Allow transfer"},"file-transfer-workspace.confirmationRequired":{zh:"\u9700\u8981\u786E\u8BA4",en:"Confirmation required"},"file-transfer-workspace.runDirectly":{zh:"\u76F4\u63A5\u6267\u884C",en:"Run directly"},"file-transfer-workspace.tasks":{zh:"\u4EFB\u52A1 {0}",en:"Tasks {0}"},"file-transfer-workspace.files":{zh:"\u6587\u4EF6",en:"Files"},"file-transfer-workspace.andMore":{zh:"{0} \u7B49 {1} \u9879",en:"{0} and {1} more"},"file-transfer-workspace.waitingToTransfer":{zh:"\u7B49\u5F85\u4F20\u8F93",en:"Waiting to transfer"},"file-transfer-workspace.scanningDirectories":{zh:"\u6B63\u5728\u626B\u63CF\u76EE\u5F55",en:"Scanning directories"},"file-transfer-workspace.expirySuffix":{zh:" \xB7 \u7EA6 {0}",en:" \xB7 ~ {0}"},"file-transfer-workspace.completedFiles":{zh:"\u5DF2\u5B8C\u6210 {0} \u4E2A\u6587\u4EF6{1}",en:"Completed {0} files{1}"},"file-transfer-workspace.skipped":{zh:"\uFF0C\u8DF3\u8FC7 {0}",en:", skipped {0}"},"file-transfer-workspace.cancelled":{zh:"\u5DF2\u53D6\u6D88",en:"Cancelled"},"file-transfer-workspace.transferFailed":{zh:"\u4F20\u8F93\u5931\u8D25",en:"Transfer failed"},"file-transfer-workspace.created":{zh:"\u521B\u5EFA\u4E8E {0}",en:"Created {0}"},"file-transfer-workspace.executed":{zh:"\u5DF2\u6267\u884C {0}",en:"Executed {0}"},"file-transfer-workspace.tookCompleted":{zh:"\u8017\u65F6 {0} \xB7 \u5B8C\u6210\u4E8E {1}",en:"Took {0} \xB7 completed {1}"},"file-transfer-workspace.seconds":{zh:"{0} \u79D2",en:"{0} seconds"},"file-transfer-workspace.minutesSeconds":{zh:"{0} \u5206 {1} \u79D2",en:"{0} minutes {1} seconds"},"file-transfer-workspace.hoursMinutes":{zh:"{0} \u5C0F\u65F6 {1} \u5206",en:"{0} hours {1} minutes"},"file-transfer-workspace.minutes":{zh:"{0} \u5206\u949F",en:"{0} minutes"},"file-transfer-workspace.hMin":{zh:"{0} \u5C0F\u65F6 {1} \u5206\u949F",en:"{0} h {1} min"},"ftp-profile-editor.manageFtpAndFtpsSftpReusesExistingSshHosts":{zh:"\u7BA1\u7406 FTP \u4E0E FTPS\uFF1BSFTP \u76F4\u63A5\u590D\u7528\u5DF2\u6709 SSH \u4E3B\u673A",en:"Manage FTP and FTPS; SFTP reuses existing SSH hosts directly"},"ftp-profile-editor.new":{zh:"\u65B0\u5EFA",en:"New"},"ftp-profile-editor.noStandaloneFileConnectionsYet":{zh:"\u8FD8\u6CA1\u6709\u72EC\u7ACB\u6587\u4EF6\u8FDE\u63A5",en:"No standalone file connections yet"},"ftp-profile-editor.sftpAppearsInTheFilePaneSConnectionList":{zh:"SFTP \u4F1A\u663E\u793A\u5728\u6587\u4EF6\u7A97\u683C\u7684\u8FDE\u63A5\u5217\u8868\u4E2D\uFF1B\u8FD9\u91CC\u53EA\u7BA1\u7406 FTP \u4E0E FTPS\u3002",en:"SFTP appears in the file pane's connection list; only FTP and FTPS are managed here."},"ftp-profile-editor.newFtpsConnection":{zh:"\u65B0\u5EFA FTPS \u8FDE\u63A5",en:"New FTPS connection"},"ftp-profile-editor.anonymous":{zh:"\u533F\u540D\u767B\u5F55",en:"Anonymous"},"ftp-profile-editor.missingPassword":{zh:"\u7F3A\u5C11\u5BC6\u7801",en:"Missing password"},"ftp-profile-editor.selectAConnectionToEdit":{zh:"\u9009\u62E9\u4E00\u4E2A\u8FDE\u63A5\u8FDB\u884C\u7F16\u8F91",en:"Select a connection to edit"},"ftp-profile-editor.theFilePaneCombinesFtpFtpsAndSftpFrom":{zh:"\u6587\u4EF6\u7A97\u683C\u4F1A\u628A\u8FD9\u91CC\u4FDD\u5B58\u7684 FTP\u3001FTPS \u4E0E SSH \u4E3B\u673A\u63D0\u4F9B\u7684 SFTP \u6C47\u603B\u6210\u8FDE\u63A5\u5217\u8868\u3002",en:"The file pane combines FTP, FTPS, and SFTP from SSH hosts saved here into one connection list."},"ftp-profile-editor.encryptsControlAndFileDataCertificatesStrictlyValidatedBy":{zh:"\u52A0\u5BC6\u63A7\u5236\u4E0E\u6587\u4EF6\u6570\u636E\uFF0C\u9ED8\u8BA4\u4E25\u683C\u6821\u9A8C\u8BC1\u4E66",en:"Encrypts control and file data; certificates strictly validated by default"},"ftp-profile-editor.compatibleWithLegacyServersButCredentialsAndFileContent":{zh:"\u517C\u5BB9\u65E7\u670D\u52A1\u5668\uFF0C\u4F46\u8D26\u53F7\u548C\u6587\u4EF6\u5185\u5BB9\u4E0D\u52A0\u5BC6",en:"Compatible with legacy servers, but credentials and file content are unencrypted"},"ftp-profile-editor.managedBySshHostsNoNeedToConfigureIt":{zh:"\u7531 SSH \u4E3B\u673A\u7BA1\u7406\uFF0C\u4E0D\u5728\u8FD9\u91CC\u91CD\u590D\u914D\u7F6E",en:"Managed by SSH hosts; no need to configure it again here"},"ftp-profile-editor.delete":{zh:"\u5220\u9664\u201C",en:"Delete \u201C"},"ftp-profile-editor.thisRemovesTheFtpFtpsConnectionAndItsSeparately":{zh:"\u5C06\u79FB\u9664\u8BE5 FTP/FTPS \u8FDE\u63A5\u53CA\u5176\u72EC\u7ACB\u4FDD\u5B58\u7684\u5BC6\u7801\uFF0C\u4E0D\u4F1A\u5220\u9664\u8FDC\u7AEF\u670D\u52A1\u5668\u4E0A\u7684\u4EFB\u4F55\u6587\u4EF6\u3002",en:"This removes the FTP/FTPS connection and its separately saved password. No files on the remote server will be deleted."},"ftp-profile-editor.deleteConnection":{zh:"\u5220\u9664\u8FDE\u63A5",en:"Delete connection"},"ftp-profile-editor.connectedInitialDirectoryIsReadable":{zh:"\u8FDE\u63A5\u6210\u529F\uFF0C\u521D\u59CB\u76EE\u5F55\u53EF\u8BFB\u53D6",en:"Connected; initial directory is readable"},"ftp-profile-editor.newFileConnection":{zh:"\u65B0\u5EFA\u6587\u4EF6\u8FDE\u63A5",en:"New file connection"},"ftp-profile-editor.enterServerAndAuthenticationDetails":{zh:"\u586B\u5199\u670D\u52A1\u5668\u548C\u8BA4\u8BC1\u4FE1\u606F",en:"Enter server and authentication details"},"ftp-profile-editor.afterEditsTestBeforeSaving":{zh:"\u4FEE\u6539\u540E\u53EF\u5148\u6D4B\u8BD5\u518D\u4FDD\u5B58",en:"After edits, test before saving"},"ftp-profile-editor.connectionType":{zh:"\u8FDE\u63A5\u7C7B\u578B",en:"Connection type"},"ftp-profile-editor.preferFtpsChooseFtpOnlyWhenTheServerLacks":{zh:"\u4F18\u5148\u4F7F\u7528 FTPS\uFF1B\u4EC5\u5728\u670D\u52A1\u5668\u4E0D\u652F\u6301 TLS \u65F6\u9009\u62E9 FTP",en:"Prefer FTPS; choose FTP only when the server lacks TLS support"},"ftp-profile-editor.connectionProtocol":{zh:"\u8FDE\u63A5\u534F\u8BAE",en:"Connection protocol"},"ftp-profile-editor.explicitTlsRecommended":{zh:"\u663E\u5F0F TLS \xB7 \u63A8\u8350",en:"Explicit TLS \xB7 recommended"},"ftp-profile-editor.implicitTls":{zh:"\u9690\u5F0F TLS",en:"Implicit TLS"},"ftp-profile-editor.unencrypted":{zh:"\u672A\u52A0\u5BC6",en:"Unencrypted"},"ftp-profile-editor.plainFtpSendsYourAccountPasswordAndFileContent":{zh:"\u666E\u901A FTP \u7684\u8D26\u53F7\u3001\u5BC6\u7801\u548C\u6587\u4EF6\u5185\u5BB9\u5747\u4E0D\u52A0\u5BC6\u3002",en:"Plain FTP sends your account, password, and file content unencrypted."},"ftp-profile-editor.server":{zh:"\u670D\u52A1\u5668",en:"Server"},"ftp-profile-editor.theNameAppearsInTheConnectionListGroupsAnd":{zh:"\u540D\u79F0\u7528\u4E8E\u8FDE\u63A5\u5217\u8868\uFF0C\u5206\u7EC4\u4E0E\u6807\u7B7E\u53EF\u590D\u7528\u5DF2\u6709\u9009\u9879",en:"The name appears in the connection list; groups and tags can reuse existing options"},"ftp-profile-editor.connectionName":{zh:"\u8FDE\u63A5\u540D\u79F0",en:"Connection name"},"ftp-profile-editor.groupOptional":{zh:"\u5206\u7EC4\uFF08\u53EF\u9009\uFF09",en:"Group (optional)"},"ftp-profile-editor.ftpGroups":{zh:"FTP \u5206\u7EC4",en:"FTP groups"},"ftp-profile-editor.selectAnExistingGroupOrEnterANewOne":{zh:"\u9009\u62E9\u5DF2\u6709\u5206\u7EC4\u6216\u8F93\u5165\u65B0\u5206\u7EC4",en:"Select an existing group or enter a new one"},"ftp-profile-editor.serverAddress":{zh:"\u670D\u52A1\u5668\u5730\u5740",en:"Server address"},"ftp-profile-editor.port":{zh:"\u7AEF\u53E3",en:"Port"},"ftp-profile-editor.tagsOptional":{zh:"\u6807\u7B7E\uFF08\u53EF\u9009\uFF09",en:"Tags (optional)"},"ftp-profile-editor.pickExistingTagsOrTypeNewOnesSeparateMultiple":{zh:"\u53EF\u9009\u62E9\u5DF2\u6709\u6807\u7B7E\u6216\u76F4\u63A5\u8F93\u5165\uFF1B\u591A\u4E2A\u6807\u7B7E\u4F7F\u7528\u9017\u53F7\u5206\u9694\u3002",en:"Pick existing tags or type new ones; separate multiple tags with commas."},"ftp-profile-editor.ftpTags":{zh:"FTP \u6807\u7B7E",en:"FTP tags"},"ftp-profile-editor.selectOrEnterTags":{zh:"\u9009\u62E9\u6216\u8F93\u5165\u6807\u7B7E",en:"Select or enter tags"},"ftp-profile-editor.authentication":{zh:"\u8EAB\u4EFD\u8BA4\u8BC1",en:"Authentication"},"ftp-profile-editor.thePasswordIsWrittenOnlyToTheDshCredential":{zh:"\u5BC6\u7801\u53EA\u5199\u5165 DSH \u51ED\u636E\u670D\u52A1\uFF0C\u4E0D\u4F1A\u5728\u754C\u9762\u56DE\u663E",en:"The password is written only to the DSH credential service and never echoed in the UI"},"ftp-profile-editor.signInMethod":{zh:"\u767B\u5F55\u65B9\u5F0F",en:"Sign-in method"},"ftp-profile-editor.usernameAndPassword":{zh:"\u8D26\u53F7\u5BC6\u7801",en:"Username and password"},"ftp-profile-editor.signInAsAnonymousWithoutEnteringCredentialsTheServer":{zh:"\u4F7F\u7528 anonymous \u767B\u5F55\uFF0C\u65E0\u9700\u586B\u5199\u8D26\u53F7\u5BC6\u7801\uFF1B\u670D\u52A1\u5668\u5FC5\u987B\u5F00\u653E\u533F\u540D\u8BBF\u95EE\u3002",en:"Sign in as anonymous without entering credentials. The server must allow anonymous access."},"ftp-profile-editor.credentialSource":{zh:"\u51ED\u636E\u6765\u6E90",en:"Credential source"},"ftp-profile-editor.saveThePasswordWithThisConnectionOnly":{zh:"\u6B64\u8FDE\u63A5\u5355\u72EC\u4FDD\u5B58\u5BC6\u7801",en:"Save the password with this connection only"},"ftp-profile-editor.notEchoedAfterSaving":{zh:"\u4FDD\u5B58\u540E\u4E0D\u4F1A\u56DE\u663E",en:"Not echoed after saving"},"ftp-profile-editor.pathAndNetwork":{zh:"\u8DEF\u5F84\u4E0E\u7F51\u7EDC",en:"Path and network"},"ftp-profile-editor.proxyReusesTheSshPluginSProxyLibraryControl":{zh:"\u4EE3\u7406\u590D\u7528 SSH \u63D2\u4EF6\u7684\u4EE3\u7406\u5E93\uFF0C\u63A7\u5236\u548C\u6570\u636E\u8FDE\u63A5\u4F7F\u7528\u540C\u4E00\u8DEF\u5F84",en:"Proxy reuses the SSH plugin's proxy library; control and data connections take the same path"},"ftp-profile-editor.initialDirectory":{zh:"\u521D\u59CB\u76EE\u5F55",en:"Initial directory"},"ftp-profile-editor.connectionProxy":{zh:"\u8FDE\u63A5\u4EE3\u7406",en:"Connection proxy"},"ftp-profile-editor.advancedConnectionSettings":{zh:"\u9AD8\u7EA7\u8FDE\u63A5\u8BBE\u7F6E",en:"Advanced connection settings"},"ftp-profile-editor.connectionTimeoutMs":{zh:"\u8FDE\u63A5\u8D85\u65F6\uFF08\u6BEB\u79D2\uFF09",en:"Connection timeout (ms)"},"ftp-profile-editor.tlsServerName":{zh:"TLS \u670D\u52A1\u5668\u540D\u79F0",en:"TLS server name"},"ftp-profile-editor.fillInWhenTheCertificateNameDiffersFromThe":{zh:"\u8BC1\u4E66\u540D\u79F0\u4E0E\u4E3B\u673A\u4E0D\u540C\u65F6\u586B\u5199",en:"Fill in when the certificate name differs from the host"},"ftp-profile-editor.testing":{zh:"\u6B63\u5728\u6D4B\u8BD5\u2026",en:"Testing\u2026"},"ftp-profile-editor.saveConnection":{zh:"\u4FDD\u5B58\u8FDE\u63A5",en:"Save connection"},"html-file-preview.isolatedStaticPreviewScriptsAndExternalOrRelativeResources":{zh:"\u9759\u6001\u9694\u79BB\u9884\u89C8\uFF1A\u4E0D\u6267\u884C\u811A\u672C\uFF0C\u4E0D\u52A0\u8F7D\u5916\u90E8\u6216\u76F8\u5BF9\u8DEF\u5F84\u8D44\u6E90",en:"Isolated static preview: scripts and external or relative resources are disabled"},"html-file-preview.contentTruncated":{zh:"\u5185\u5BB9\u5DF2\u622A\u65AD",en:"Content truncated"},"html-file-preview.staticPreview":{zh:"\u9759\u6001\u9884\u89C8",en:"Static preview"},"html-file-preview.viewHtmlSource":{zh:"\u67E5\u770B HTML \u6E90\u7801",en:"View HTML source"},"html-file-preview.page":{zh:"\u9875\u9762",en:"Page"},"html-file-preview.source":{zh:"\u6E90\u7801",en:"Source"},"html-file-preview.htmlPreview":{zh:"HTML \u9884\u89C8\uFF1A{0}",en:"HTML preview: {0}"},"markdown-preview-editor.markdownBody":{zh:"Markdown \u6B63\u6587",en:"Markdown body"},"native-directory-button.theDshEnvironmentHasNoSupportedFileManagerUse":{zh:"DSH \u8FD0\u884C\u73AF\u5883\u4E0D\u652F\u6301\u7CFB\u7EDF\u6587\u4EF6\u7BA1\u7406\u5668\uFF0C\u8BF7\u4F7F\u7528\u76EE\u5F55\u5F39\u7A97\u6216\u4E0B\u8F7D",en:"The DSH environment has no supported file manager. Use the directory dialog or download instead."},"native-directory-button.requestedTheFileManagerOnTheComputerRunningDsh":{zh:"\u5DF2\u8BF7\u6C42\u5728 DSH \u6240\u5728\u7535\u8111\u6253\u5F00\u6587\u4EF6\u7BA1\u7406\u5668",en:"Requested the file manager on the computer running DSH"},"native-directory-button.openFileManager":{zh:"\u6253\u5F00\u6587\u4EF6\u7BA1\u7406\u5668",en:"Open file manager"},"native-directory-button.checkingFileManagerSupport":{zh:"\u6B63\u5728\u68C0\u6D4B\u6587\u4EF6\u7BA1\u7406\u5668\u652F\u6301",en:"Checking file manager support"},"native-directory-button.openThisDirectoryInTheFileManagerOnThe":{zh:"\u5728 DSH \u6240\u5728\u7535\u8111\u7684\u6587\u4EF6\u7BA1\u7406\u5668\u4E2D\u6253\u5F00\u5F53\u524D\u76EE\u5F55",en:"Open this directory in the file manager on the computer running DSH"},"preview-refresh-control.previewRefresh":{zh:"\u9884\u89C8\u5237\u65B0",en:"Preview refresh"},"preview-refresh-control.refreshPreview":{zh:"\u5237\u65B0\u9884\u89C8",en:"Refresh preview"},"preview-refresh-control.saveYourChangesFirst":{zh:"\u8BF7\u5148\u4FDD\u5B58\u6B63\u6587\u4FEE\u6539",en:"Save your changes first"},"preview-refresh-control.refreshing":{zh:"\u6B63\u5728\u5237\u65B0\u2026",en:"Refreshing\u2026"},"preview-refresh-control.refreshPreviewAndKeepReadingPosition":{zh:"\u5237\u65B0\u9884\u89C8\uFF0C\u4FDD\u7559\u9605\u8BFB\u4F4D\u7F6E",en:"Refresh preview and keep reading position"},"preview-refresh-control.autoRefresh":{zh:"\u81EA\u52A8\u5237\u65B0",en:"Auto-refresh"},"preview-refresh-control.autoRefreshIsUnavailableForThisPreview":{zh:"\u6B64\u9884\u89C8\u6682\u4E0D\u652F\u6301\u81EA\u52A8\u5237\u65B0",en:"Auto-refresh is unavailable for this preview"},"preview-refresh-control.checkForChangesEvery5SecondsClickForManual":{zh:"\u6BCF 5 \u79D2\u68C0\u67E5\u53D8\u5316\uFF0C\u70B9\u51FB\u5207\u6362\u4E3A\u624B\u52A8",en:"Check for changes every 5 seconds; click for manual refresh"},"preview-refresh-control.manualRefreshClickToEnableAutoRefresh":{zh:"\u5F53\u524D\u624B\u52A8\u5237\u65B0\uFF0C\u70B9\u51FB\u5F00\u542F\u81EA\u52A8\u5237\u65B0",en:"Manual refresh; click to enable auto-refresh"},"preview-refresh-control.auto":{zh:"\u81EA\u52A8",en:"Auto"},"preview-refresh-control.manual":{zh:"\u624B\u52A8",en:"Manual"},"profile-editor.thisActionCannotBeUndone":{zh:"\u8FD9\u4E2A\u64CD\u4F5C\u65E0\u6CD5\u64A4\u9500",en:"This action cannot be undone"},"profile-editor.theConnectionConfigThisHostSStandaloneCredentialsAnd":{zh:"\u8FDE\u63A5\u914D\u7F6E\u3001\u8BE5\u4E3B\u673A\u7684\u72EC\u7ACB\u51ED\u636E\u548C\u5173\u8054\u7AEF\u53E3\u8F6C\u53D1\u4F1A\u4E00\u5E76\u5220\u9664\uFF1B\u5B83\u4E5F\u4F1A\u4ECE\u6240\u6709\u4F1A\u8BDD\u6388\u6743\u4E2D\u79FB\u9664\u3002\u5BC6\u94A5\u5E93\u4E2D\u7684\u5171\u4EAB\u51ED\u636E\u4E0D\u4F1A\u5220\u9664\u3002",en:"The connection config, this host's standalone credentials, and its port forwards are all deleted; it is also removed from every session grant. Shared credentials in the vault are not deleted."},"profile-editor.cannotDeleteYet":{zh:"\u6682\u65F6\u4E0D\u80FD\u5220\u9664",en:"Cannot delete yet"},"profile-editor.theseConnectionsStillUseItAsAnSshJump":{zh:"\u4EE5\u4E0B\u8FDE\u63A5\u4ECD\u5C06\u5B83\u4F5C\u4E3A SSH \u8DF3\u677F\uFF1A",en:"These connections still use it as an SSH jump host: "},"profile-editor.editTheirJumpChainsFirst":{zh:"\u3002\u8BF7\u5148\u4FEE\u6539\u8FD9\u4E9B\u8FDE\u63A5\u7684\u8DF3\u677F\u94FE\u3002",en:". Edit their jump chains first."},"profile-editor.thisAddressAndPortAreAlreadyUsedByChange":{zh:"\u8BE5\u5730\u5740\u548C\u7AEF\u53E3\u5DF2\u7531\u201C{0}\u201D\u4F7F\u7528\uFF0C\u8BF7\u4FEE\u6539\u4E3B\u673A\u6216\u7AEF\u53E3\u3002",en:"This address and port are already used by \u201C{0}\u201D \u2014 change the host or port."},"profile-editor.newSshConnection":{zh:"\u65B0\u5EFA SSH \u8FDE\u63A5",en:"New SSH connection"},"profile-editor.credentialsAreNotShownAgainAfterSaving":{zh:"\u51ED\u636E\u4FDD\u5B58\u540E\u4E0D\u4F1A\u56DE\u663E",en:"Credentials are not shown again after saving"},"profile-editor.connectionInfo":{zh:"\u8FDE\u63A5\u4FE1\u606F",en:"Connection info"},"profile-editor.hostAddressAndDisplay":{zh:"\u4E3B\u673A\u5730\u5740\u4E0E\u663E\u793A\u65B9\u5F0F",en:"Host address and display"},"profile-editor.devServer":{zh:"\u5F00\u53D1\u670D\u52A1\u5668",en:"Dev server"},"profile-editor.group":{zh:"\u5206\u7EC4",en:"Group"},"profile-editor.hostGroup":{zh:"\u4E3B\u673A\u5206\u7EC4",en:"Host group"},"profile-editor.tags":{zh:"\u6807\u7B7E",en:"Tags"},"profile-editor.hostTags":{zh:"\u4E3B\u673A\u6807\u7B7E",en:"Host tags"},"profile-editor.chooseSharedCredentialsOrSaveSeparately":{zh:"\u9009\u62E9\u5171\u4EAB\u51ED\u636E\u6216\u5355\u72EC\u4FDD\u5B58",en:"Choose shared credentials or save separately"},"profile-editor.useThisConnectionSOwnCredentialsOrReferenceA":{zh:"\u53EF\u4F7F\u7528\u6B64\u8FDE\u63A5\u81EA\u5DF1\u7684\u51ED\u636E\uFF0C\u6216\u5F15\u7528\u5BC6\u94A5\u5E93\u4E2D\u7684\u5E38\u7528\u8D26\u53F7\u3002",en:"Use this connection's own credentials, or reference a common account from the key store."},"profile-editor.savedWithThisConnectionOnly":{zh:"\u6B64\u8FDE\u63A5\u72EC\u7ACB\u4FDD\u5B58",en:"Saved with this connection only"},"profile-editor.ready":{zh:"\u5DF2\u5C31\u7EEA",en:"Ready"},"profile-editor.cannotBeReadBackAfterSaving":{zh:"\u4FDD\u5B58\u540E\u4E0D\u53EF\u8BFB\u56DE",en:"Cannot be read back after saving"},"profile-editor.pasteOpensshPemPrivateKey":{zh:"\u7C98\u8D34 OpenSSH/PEM \u79C1\u94A5",en:"Paste OpenSSH/PEM private key"},"profile-editor.connectionPath":{zh:"\u8FDE\u63A5\u8DEF\u5F84",en:"Connection path"},"profile-editor.directProxyOrJumpChain":{zh:"\u76F4\u8FDE\u3001\u4EE3\u7406\u6216\u8DF3\u677F\u94FE",en:"Direct, proxy, or jump chain"},"profile-editor.connectionMode":{zh:"\u8FDE\u63A5\u65B9\u5F0F",en:"Connection mode"},"profile-editor.customHttpConnect":{zh:"\u81EA\u5B9A\u4E49 HTTP CONNECT",en:"Custom HTTP CONNECT"},"profile-editor.customSocks5":{zh:"\u81EA\u5B9A\u4E49 SOCKS5",en:"Custom SOCKS5"},"profile-editor.addAnHttpOrSocks5ProxyToTheProxy":{zh:"\u8BF7\u5148\u5728\u4EE3\u7406\u5E93\u4E2D\u6DFB\u52A0 HTTP \u6216 SOCKS5 \u4EE3\u7406\u3002",en:"Add an HTTP or SOCKS5 proxy to the proxy library first."},"profile-editor.multipleHostsCanShareTheSameProxyConfiguration":{zh:"\u591A\u53F0\u4E3B\u673A\u53EF\u5F15\u7528\u540C\u4E00\u6761\u4EE3\u7406\u914D\u7F6E\u3002",en:"Multiple hosts can share the same proxy configuration."},"profile-editor.selectProxy":{zh:"\u9009\u62E9\u4EE3\u7406",en:"Select proxy"},"profile-editor.firstConnectionVerifyTheHostFingerprint":{zh:"\u9996\u6B21\u8FDE\u63A5\uFF0C\u8BF7\u6838\u5BF9\u4E3B\u673A\u6307\u7EB9",en:"First connection: verify the host fingerprint"},"profile-editor.confirmAndRetry":{zh:"\u786E\u8BA4\u5E76\u91CD\u8BD5",en:"Confirm and retry"},"profile-editor.connectionTestSucceeded":{zh:"\u8FDE\u63A5\u6D4B\u8BD5\u6210\u529F",en:"Connection test succeeded"},"profile-editor.jumpChain":{zh:"\u8DF3\u677F\u94FE",en:"Jump chain"},"profile-editor.connectionsAreEstablishedHopByHopTopToBottom":{zh:"\u8FDE\u63A5\u4F1A\u6309\u4ECE\u4E0A\u5230\u4E0B\u7684\u987A\u5E8F\u9010\u7EA7\u5EFA\u7ACB\u3002",en:"Connections are established hop by hop, top to bottom."},"profile-editor.selectAnExistingConnection":{zh:"\u9009\u62E9\u5DF2\u6709\u8FDE\u63A5",en:"Select an existing connection"},"profile-editor.moveJumpHostUp":{zh:"\u4E0A\u79FB\u8DF3\u677F",en:"Move jump host up"},"profile-editor.moveJumpHostDown":{zh:"\u4E0B\u79FB\u8DF3\u677F",en:"Move jump host down"},"profile-editor.removeJumpHost":{zh:"\u79FB\u9664\u8DF3\u677F",en:"Remove jump host"},"profile-editor.addAtLeastOneJumpHost":{zh:"\u81F3\u5C11\u6DFB\u52A0\u4E00\u53F0\u8DF3\u677F\u4E3B\u673A\u3002",en:"Add at least one jump host."},"profile-editor.addJumpHost":{zh:"\u6DFB\u52A0\u8DF3\u677F",en:"Add jump host"},"project-session-dialog.selectSessionWorkspace":{zh:"\u9009\u62E9\u4F1A\u8BDD\u5F52\u5C5E\u7A7A\u95F4",en:"Select session workspace"},"project-session-dialog.newRemoteSession":{zh:"\u65B0\u5EFA\u8FDC\u7AEF\u4F1A\u8BDD",en:"New remote session"},"project-session-dialog.chooseTheLocalProjectThisSessionBelongsToIn":{zh:"\u9009\u62E9\u8FD9\u4E2A\u4F1A\u8BDD\u5728 DSH \u4E2D\u5F52\u5C5E\u7684\u672C\u5730\u9879\u76EE",en:"Choose the local project this session belongs to in DSH"},"project-session-dialog.remoteHost":{zh:"\u8FDC\u7AEF\u4E3B\u673A",en:"Remote host"},"project-session-dialog.remoteWorkingDirectory":{zh:"\u8FDC\u7AEF\u5DE5\u4F5C\u76EE\u5F55",en:"Remote working directory"},"project-session-dialog.sessionWorkspace":{zh:"\u4F1A\u8BDD\u5F52\u5C5E\u7A7A\u95F4",en:"Session workspace"},"project-session-dialog.sessionRecordsAreStoredInTheSelectedDshProject":{zh:"\u4F1A\u8BDD\u8BB0\u5F55\u4FDD\u5B58\u5728\u6240\u9009 DSH \u9879\u76EE\u4E2D\uFF0CSSH \u547D\u4EE4\u4E0E\u7EC8\u7AEF\u56FA\u5B9A\u4F7F\u7528\u4E0A\u9762\u7684\u8FDC\u7AEF\u76EE\u5F55\u3002",en:"Session records are stored in the selected DSH project. SSH commands and terminals always use the remote directory above."},"project-session-dialog.noDshProjectsAvailableYet":{zh:"\u8FD8\u6CA1\u6709\u53EF\u7528\u7684 DSH \u9879\u76EE",en:"No DSH projects available yet"},"project-session-dialog.closeThisWindowFirstThenCreateOrAddA":{zh:"\u8BF7\u5148\u5173\u95ED\u6B64\u7A97\u53E3\uFF0C\u5728 DSH \u5DE6\u4FA7\u7A7A\u95F4\u4E2D\u65B0\u5EFA\u6216\u6DFB\u52A0\u9879\u76EE\u3002",en:"Close this window first, then create or add a project in the DSH workspace on the left."},"project-session-dialog.selectDshProject":{zh:"\u9009\u62E9 DSH \u9879\u76EE",en:"Select DSH project"},"project-session-dialog.currentProject":{zh:"\u5F53\u524D\u9879\u76EE",en:"Current project"},"project-session-dialog.recentlyUsed":{zh:"\u6700\u8FD1\u4F7F\u7528",en:"Recently used"},"project-session-dialog.creating":{zh:"\u6B63\u5728\u65B0\u5EFA\u2026",en:"Creating\u2026"},"project-session-dialog.createAndOpen":{zh:"\u65B0\u5EFA\u5E76\u6253\u5F00",en:"Create and open"},"remote-path-input.typeDirectlyTheRemotePathIsCheckedAutomaticallyAfter":{zh:"\u53EF\u76F4\u63A5\u8F93\u5165\uFF1B\u505C\u6B62\u8F93\u5165\u540E\u4F1A\u81EA\u52A8\u68C0\u67E5\u8FDC\u7AEF\u8DEF\u5F84\u3002",en:"Type directly; the remote path is checked automatically after you stop typing."},"remote-path-input.checkingTheRemotePath":{zh:"\u6B63\u5728\u68C0\u67E5\u8FDC\u7AEF\u8DEF\u5F84\u2026",en:"Checking the remote path\u2026"},"remote-path-input.thePathDoesNotExistOrCannotBeAccessed":{zh:"\u8DEF\u5F84\u4E0D\u5B58\u5728\u6216\u65E0\u6CD5\u8BBF\u95EE\uFF1A{0}\u3002\u4ECD\u53EF\u6309\u5F53\u524D\u8F93\u5165\u4FDD\u5B58\u3002",en:"The path does not exist or cannot be accessed: {0}. You can still save with the current input."},"remote-path-input.thePathIsAccessibleNoSubdirectoriesYet":{zh:"\u8DEF\u5F84\u53EF\u8BBF\u95EE\uFF0C\u5F53\u524D\u6CA1\u6709\u5B50\u76EE\u5F55\u3002",en:"The path is accessible; no subdirectories yet."},"remote-path-input.thePathIsAccessibleFoundSubdirectories":{zh:"\u8DEF\u5F84\u53EF\u8BBF\u95EE\uFF0C\u627E\u5230 {0} \u4E2A\u5B50\u76EE\u5F55\u3002",en:"The path is accessible; found {0} subdirectories."},"remote-path-input.selectableRemoteSubdirectories":{zh:"\u53EF\u9009\u62E9\u7684\u8FDC\u7AEF\u5B50\u76EE\u5F55",en:"Selectable remote subdirectories"},"remote-path-input.select":{zh:"\u9009\u62E9 {0}",en:"Select {0}"},"remote-workspace-tree.hostsProjects":{zh:"\u4E3B\u673A\u4E0E\u9879\u76EE",en:"Hosts & Projects"},"remote-workspace-tree.hosts":{zh:"\u53F0\u4E3B\u673A",en:"hosts"},"remote-workspace-tree.newConnection":{zh:"\u65B0\u5EFA\u8FDE\u63A5",en:"New connection"},"remote-workspace-tree.searchHosts":{zh:"\u641C\u7D22\u4E3B\u673A",en:"Search hosts"},"remote-workspace-tree.searchHostsGroupsTags":{zh:"\u641C\u7D22\u4E3B\u673A\u3001\u5206\u7EC4\u3001\u6807\u7B7E\u2026",en:"Search hosts, groups, tags\u2026"},"remote-workspace-tree.selectAndExpand":{zh:"\u9009\u62E9\u5E76\u5C55\u5F00 {0}",en:"Select and expand {0}"},"remote-workspace-tree.unmount":{zh:"\u5378\u8F7D",en:"Unmount"},"remote-workspace-tree.mount":{zh:"\u6302\u8F7D",en:"Mount"},"remote-workspace-tree.openADshSessionBeforeMountingHosts":{zh:"\u6253\u5F00\u4E00\u4E2A DSH \u4F1A\u8BDD\u540E\u624D\u80FD\u6302\u8F7D\u4E3B\u673A",en:"Open a DSH session before mounting hosts"},"remote-workspace-tree.unmountFromCurrentSession":{zh:"\u4ECE\u5F53\u524D\u4F1A\u8BDD\u5378\u8F7D",en:"Unmount from current session"},"remote-workspace-tree.mountToCurrentSession":{zh:"\u6302\u8F7D\u5230\u5F53\u524D\u4F1A\u8BDD",en:"Mount to current session"},"remote-workspace-tree.addPinnedDirectoryFor":{zh:"\u4E3A {0} \u6DFB\u52A0\u56FA\u5B9A\u76EE\u5F55",en:"Add pinned directory for {0}"},"remote-workspace-tree.addPinnedDirectory":{zh:"\u6DFB\u52A0\u56FA\u5B9A\u76EE\u5F55",en:"Add pinned directory"},"remote-workspace-tree.readingPinnedDirectories":{zh:"\u6B63\u5728\u8BFB\u53D6\u56FA\u5B9A\u76EE\u5F55\u2026",en:"Reading pinned directories\u2026"},"remote-workspace-tree.addProjectDirectory":{zh:"\u6DFB\u52A0\u9879\u76EE\u76EE\u5F55",en:"Add project directory"},"remote-workspace-tree.noDshSessionIsAvailableToMountADirectory":{zh:"\u5F53\u524D\u6CA1\u6709\u53EF\u6302\u8F7D\u76EE\u5F55\u7684 DSH \u4F1A\u8BDD",en:"No DSH session is available to mount a directory"},"remote-workspace-tree.mountThisHostFirst":{zh:"\u8BF7\u5148\u6302\u8F7D\u8BE5\u4E3B\u673A",en:"Mount this host first"},"remote-workspace-tree.unmountThisDirectoryFromTheCurrentSession":{zh:"\u4ECE\u5F53\u524D\u4F1A\u8BDD\u5378\u8F7D\u6B64\u76EE\u5F55",en:"Unmount this directory from the current session"},"remote-workspace-tree.mountDirectoryMultipleSelectionsAreAllowed":{zh:"\u6302\u8F7D\u76EE\u5F55\uFF0C\u53EF\u540C\u65F6\u9009\u62E9\u591A\u4E2A",en:"Mount directory; multiple selections are allowed"},"remote-workspace-tree.mountedDefaultWorkingDirectory":{zh:"\u5DF2\u6302\u8F7D \xB7 \u9ED8\u8BA4\u5DE5\u4F5C\u76EE\u5F55",en:"Mounted \xB7 Default working directory"},"remote-workspace-tree.setAsDefaultWorkingDirectory":{zh:"\u8BBE\u4E3A\u9ED8\u8BA4\u5DE5\u4F5C\u76EE\u5F55",en:"Set as default working directory"},"remote-workspace-tree.setAsTheDefaultDirectory":{zh:"\u5C06 {0} \u8BBE\u4E3A\u9ED8\u8BA4\u76EE\u5F55",en:"Set {0} as the default directory"},"remote-workspace-tree.newSessionIn":{zh:"\u5728 {0} \u65B0\u5EFA\u4F1A\u8BDD",en:"New session in {0}"},"remote-workspace-tree.newSession":{zh:"\u65B0\u5EFA\u4F1A\u8BDD",en:"New session"},"remote-workspace-tree.editPinnedDirectory":{zh:"\u7F16\u8F91\u56FA\u5B9A\u76EE\u5F55",en:"Edit pinned directory"},"remote-workspace-tree.noSshHostsYet":{zh:"\u8FD8\u6CA1\u6709 SSH \u4E3B\u673A",en:"No SSH hosts yet"},"remote-workspace-tree.noMatchingHosts":{zh:"\u6CA1\u6709\u5339\u914D\u7684\u4E3B\u673A",en:"No matching hosts"},"remote-workspace-tree.currentSessionPermissions":{zh:"\u5F53\u524D\u4F1A\u8BDD\u6743\u9650",en:"Current session permissions"},"remote-workspace-tree.availableHosts":{zh:"\u53F0\u4E3B\u673A\u53EF\u7528",en:"available hosts"},"remote-workspace-tree.loading":{zh:"\u8BFB\u53D6\u4E2D",en:"Loading"},"remote-workspace-tree.saving":{zh:"\u4FDD\u5B58\u4E2D",en:"Saving"},"remote-workspace-tree.notSynced":{zh:"\u672A\u540C\u6B65",en:"Not synced"},"remote-workspace-tree.synced":{zh:"\u5DF2\u540C\u6B65",en:"Synced"},"remote-workspace-tree.sshPermissions":{zh:"SSH \u6743\u9650",en:"SSH permissions"},"remote-workspace-tree.commandsOnly":{zh:"\u4EC5\u547D\u4EE4",en:"Commands only"},"remote-workspace-tree.terminalControl":{zh:"\u7EC8\u7AEF\u63A7\u5236",en:"Terminal control"},"remote-workspace-tree.confirmBeforeRunning":{zh:"\u6267\u884C\u524D\u786E\u8BA4",en:"Confirm before running"},"remote-workspace-tree.whenOffRunsDirectlyUnderCurrentSessionPermissions":{zh:"\u5173\u95ED\u540E\u6309\u5F53\u524D\u4F1A\u8BDD\u6743\u9650\u76F4\u63A5\u6267\u884C",en:"When off, runs directly under current session permissions"},"remote-workspace-tree.requiresDshAskModeFullAccessIsRejectedOutright":{zh:"\u9700 DSH \u4F7F\u7528 Ask\uFF1BFull Access \u4F1A\u76F4\u63A5\u62D2\u7EDD",en:"Requires DSH Ask mode; Full Access is rejected outright"},"remote-workspace-tree.deletePinnedDirectoryRelatedDshSessionsWillNotBe":{zh:"\u5220\u9664\u56FA\u5B9A\u76EE\u5F55\u201C{0}\u201D\uFF1F\u76F8\u5173 DSH \u4F1A\u8BDD\u4E0D\u4F1A\u5220\u9664\u3002",en:"Delete pinned directory '{0}'? Related DSH sessions will not be deleted."},"remote-workspace-tree.defaultRemotePathForTheTerminalAndSftp":{zh:"{0} \xB7 \u7EC8\u7AEF\u4E0E SFTP \u7684\u9ED8\u8BA4\u8FDC\u7AEF\u8DEF\u5F84",en:"{0} \xB7 default remote path for the terminal and SFTP"},"remote-workspace-tree.websiteProject":{zh:"\u7F51\u7AD9\u9879\u76EE",en:"Website project"},"remote-workspace-tree.saveDirectory":{zh:"\u4FDD\u5B58\u76EE\u5F55",en:"Save directory"},"remote-workspace-tree.ungrouped":{zh:"\u672A\u5206\u7EC4",en:"Ungrouped"},"resizable-split.dragToResizeDoubleClickToReset":{zh:"\u62D6\u52A8\u8C03\u6574\u5BBD\u5EA6\uFF0C\u53CC\u51FB\u6062\u590D\u9ED8\u8BA4",en:"Drag to resize, double-click to reset"},"sftp-client.localSession":{zh:"\u672C\u5730\u4F1A\u8BDD",en:"Local session"},"sftp-client.selectRemoteHost":{zh:"\u9009\u62E9\u8FDC\u7AEF\u4E3B\u673A",en:"Select remote host"},"sftp-client.thisPathIsNotARegularFileOrDirectory":{zh:"\u6B64\u8DEF\u5F84\u4E0D\u662F\u666E\u901A\u6587\u4EF6\u6216\u76EE\u5F55\uFF0C\u8BF7\u68C0\u67E5\u8DEF\u5F84\u540E\u91CD\u8BD5",en:"This path is not a regular file or directory. Check it and try again."},"sftp-client.aSingleFileCannotExceed512Mb":{zh:"\u5355\u4E2A\u6587\u4EF6\u4E0D\u80FD\u8D85\u8FC7 512 MB",en:"A single file cannot exceed 512 MB."},"sftp-client.skippedFilesLargerThan512Mb":{zh:"\u5DF2\u8DF3\u8FC7 {0} \u4E2A\u8D85\u8FC7 512 MB \u7684\u6587\u4EF6",en:"Skipped {0} files larger than 512 MB"},"sftp-client.waitForTheDirectoryToLoadOrTheCurrent":{zh:"\u5F53\u524D\u65E0\u6CD5\u4E0A\u4F20\uFF0C\u8BF7\u7B49\u5F85\u76EE\u5F55\u52A0\u8F7D\u6216\u5F53\u524D\u4E0A\u4F20\u5B8C\u6210\u540E\u91CD\u8BD5",en:"Wait for the directory to load or the current upload to finish, then try again."},"sftp-client.moved":{zh:"\u5DF2\u79FB\u52A8",en:"Moved"},"sftp-client.addedToTheTransferQueueSeeProgressInFile":{zh:"\u5DF2\u52A0\u5165\u4F20\u8F93\u4EFB\u52A1\uFF0C\u53EF\u5728\u6587\u4EF6\u4F20\u8F93\u4E2D\u67E5\u770B\u8FDB\u5EA6",en:"Added to the transfer queue. See progress in File Transfers."},"sftp-client.mountedDirectories":{zh:"\u5DF2\u6302\u8F7D\u76EE\u5F55",en:"Mounted directories"},"sftp-client.goToParentDirectory":{zh:"\u8FD4\u56DE\u4E0A\u7EA7\u76EE\u5F55",en:"Go to parent directory"},"sftp-client.directoryOrFilePath":{zh:"\u76EE\u5F55\u6216\u6587\u4EF6\u8DEF\u5F84",en:"Directory or file path"},"sftp-client.enterADirectoryToBrowseOrAFileTo":{zh:"\u8F93\u5165\u76EE\u5F55\u8FDB\u5165\uFF0C\u8F93\u5165\u6587\u4EF6\u8DEF\u5F84\u6253\u5F00\u9884\u89C8\uFF1B\u6309 Enter \u786E\u8BA4",en:"Enter a directory to browse or a file to preview; press Enter to open"},"sftp-client.directoryOrFilePathPressEnterToOpen":{zh:"\u76EE\u5F55\u6216\u6587\u4EF6\u8DEF\u5F84\uFF0C\u6309 Enter \u6253\u5F00",en:"Directory or file path; press Enter to open"},"sftp-client.closeDirectoryDialog":{zh:"\u6536\u8D77\u76EE\u5F55\u5F39\u7A97",en:"Close directory dialog"},"sftp-client.expandDirectory":{zh:"\u5C55\u5F00\u76EE\u5F55",en:"Expand directory"},"sftp-client.openDirectoryInADialog":{zh:"\u5728\u5F39\u7A97\u4E2D\u6253\u5F00\u76EE\u5F55",en:"Open directory in a dialog"},"sftp-client.upload":{zh:"\u4E0A\u4F20",en:"Upload"},"sftp-client.uploading":{zh:"\u4E0A\u4F20\u4E2D",en:"Uploading"},"sftp-client.aFileWithTheSameNameExists":{zh:"\u540C\u540D\u6587\u4EF6\u5DF2\u5B58\u5728",en:"A file with the same name exists"},"sftp-client.skip":{zh:"\u8DF3\u8FC7",en:"Skip"},"sftp-client.overwriteAndUpload":{zh:"\u8986\u76D6\u4E0A\u4F20",en:"Overwrite and upload"},"sftp-client.dismissNotice":{zh:"\u5173\u95ED\u63D0\u793A",en:"Dismiss notice"},"sftp-client.readingRemoteDirectory":{zh:"\u6B63\u5728\u8BFB\u53D6\u8FDC\u7AEF\u76EE\u5F55\u2026",en:"Reading remote directory\u2026"},"sftp-client.thisDirectoryIsEmpty":{zh:"\u6B64\u76EE\u5F55\u4E3A\u7A7A",en:"This directory is empty"},"sftp-client.fileClickToPreview":{zh:"\uFF0C\u6587\u4EF6\uFF0C\u5355\u51FB\u9884\u89C8",en:", file, click to preview"},"sftp-client.releaseToUpload":{zh:"\u677E\u5F00\u4EE5\u4E0A\u4F20",en:"Release to upload"},"sftp-client.uploadTo":{zh:"\u4E0A\u4F20\u5230",en:"Upload to"},"sftp-client.browseDirectory":{zh:"\u76EE\u5F55\u6D4F\u89C8",en:"Browse directory"},"sftp-client.closeDirectoryDialog2":{zh:"\u5173\u95ED\u76EE\u5F55\u5F39\u7A97",en:"Close directory dialog"},"sftp-client.thisDocumentIsReadOnlyItMayExceed256":{zh:"\u6B64\u6587\u6863\u6682\u4E3A\u53EA\u8BFB\uFF1A\u53EF\u80FD\u8D85\u8FC7 256 KB\u3001\u88AB\u622A\u65AD\uFF0C\u6216\u5305\u542B\u524D\u7F6E\u5143\u6570\u636E\u3001HTML\u3001\u5F15\u7528\u5B9A\u4E49\u7B49\u6682\u4E0D\u652F\u6301\u5B89\u5168\u56DE\u5199\u7684\u5185\u5BB9\u3002",en:"This document is read-only: it may exceed 256 KB, be truncated, or contain frontmatter, HTML or reference definitions that cannot yet be safely saved."},"sftp-client.saveMarkdown":{zh:"\u4FDD\u5B58 Markdown",en:"Save Markdown"},"sftp-client.saveBodyCtrlCmdS":{zh:"\u4FDD\u5B58\u6B63\u6587\uFF08Ctrl/Cmd + S\uFF09",en:"Save body (Ctrl/Cmd + S)"},"sftp-client.saved":{zh:"\u5DF2\u4FDD\u5B58",en:"Saved"},"sftp-client.downloadDraft":{zh:"\u4E0B\u8F7D\u8349\u7A3F",en:"Download draft"},"sftp-client.discardDraft":{zh:"\u653E\u5F03\u8349\u7A3F",en:"Discard draft"},"sftp-client.unsavedChanges":{zh:"\u6B63\u6587\u5C1A\u672A\u4FDD\u5B58",en:"Unsaved changes"},"sftp-client.discardUnsavedChanges":{zh:"\u653E\u5F03\u672A\u4FDD\u5B58\u7684\u66F4\u6539\uFF1F",en:"Discard unsaved changes?"},"sftp-client.theDraftStaysInThisBrowserTabSoYou":{zh:"\u8349\u7A3F\u4F1A\u4FDD\u7559\u5728\u5F53\u524D\u6D4F\u89C8\u5668\u6807\u7B7E\u9875\uFF0C\u4E0B\u6B21\u6253\u5F00\u6B64\u6587\u4EF6\u53EF\u7EE7\u7EED\u3002",en:"The draft stays in this browser tab so you can continue when you reopen this file."},"sftp-client.thisClearsTheDraftAndReloadsTheFileConsider":{zh:"\u8FD9\u4F1A\u6E05\u9664\u5F53\u524D\u8349\u7A3F\u5E76\u91CD\u65B0\u8BFB\u53D6\u6587\u4EF6\uFF0C\u5EFA\u8BAE\u5148\u4E0B\u8F7D\u8349\u7A3F\u3002",en:"This clears the draft and reloads the file. Consider downloading the draft first."},"sftp-client.keepEditing":{zh:"\u7EE7\u7EED\u7F16\u8F91",en:"Keep editing"},"sftp-client.keepDraftAndGoBack":{zh:"\u4FDD\u7559\u8349\u7A3F\u5E76\u8FD4\u56DE",en:"Keep draft and go back"},"sftp-client.discardAndRefresh":{zh:"\u653E\u5F03\u5E76\u5237\u65B0",en:"Discard and refresh"},"sftp-client.backToDirectory":{zh:"\u8FD4\u56DE\u76EE\u5F55",en:"Back to directory"},"sftp-client.downloadFile":{zh:"\u4E0B\u8F7D\u6587\u4EF6",en:"Download file"},"sftp-client.zoomPreview":{zh:"\u653E\u5927\u9884\u89C8",en:"Zoom preview"},"sftp-client.unsavedDraftKeptInThisBrowserTab":{zh:"\u672A\u4FDD\u5B58 \xB7 \u8349\u7A3F\u5DF2\u4FDD\u7559\u5728\u5F53\u524D\u6D4F\u89C8\u5668\u6807\u7B7E\u9875",en:"Unsaved \xB7 Draft kept in this browser tab"},"sftp-client.autoRefreshReadOnly":{zh:"\u81EA\u52A8\u5237\u65B0 \xB7 \u6B63\u6587\u53EA\u8BFB",en:"Auto-refresh \xB7 Read-only"},"sftp-client.editDirectlyCtrlCmdSToSave":{zh:"\u53EF\u76F4\u63A5\u4FEE\u6539\u6B63\u6587 \xB7 Ctrl/Cmd + S \u4FDD\u5B58",en:"Edit directly \xB7 Ctrl/Cmd + S to save"},"sftp-client.refreshFailedPreviousContentKept":{zh:"\u5237\u65B0\u5931\u8D25\uFF0C\u4FDD\u7559\u4E0A\u6B21\u5185\u5BB9\uFF1A",en:"Refresh failed; previous content kept:"},"sftp-client.preview":{zh:"\u9884\u89C8 {0}",en:"Preview {0}"},"sftp-client.closePreview":{zh:"\u5173\u95ED\u9884\u89C8",en:"Close preview"},"sftp-client.openingFile":{zh:"\u6B63\u5728\u6253\u5F00\u6587\u4EF6\u2026",en:"Opening file\u2026"},"sftp-client.largeFileShowingTheFirst1MbOnlyDownload":{zh:"\u6587\u4EF6\u8F83\u5927\uFF0C\u4EC5\u663E\u793A\u524D 1 MB\u3002\u4E0B\u8F7D\u53EF\u67E5\u770B\u5B8C\u6574\u5185\u5BB9\u3002",en:"Large file; showing the first 1 MB only. Download it to see the full content."},"sftp-client.thisFileCannotBePreviewedDirectly":{zh:"\u6B64\u6587\u4EF6\u65E0\u6CD5\u76F4\u63A5\u9884\u89C8",en:"This file cannot be previewed directly"},"terminal-session.connectionEndedYouCanReconnect":{zh:`\r
|
|
12
12
|
[\u8FDE\u63A5\u5DF2\u7ED3\u675F\uFF0C\u53EF\u4EE5\u91CD\u65B0\u8FDE\u63A5]\r
|
|
13
13
|
`,en:`\r
|
|
14
14
|
[Connection ended; you can reconnect]\r
|
|
@@ -57,7 +57,7 @@ WARNING: This link could potentially be dangerous`)){let m=window.open();if(m){t
|
|
|
57
57
|
`);return{dom:l,text:u,slice:e}}function T_(t,e,n,r,s){let i=s.parent.type.spec.code,o,a;if(!n&&!e)return null;let l=!!e&&(r||i||!n);if(l){if(t.someProp("transformPastedText",u=>{e=u(e,i||r,t)}),i)return a=new ae(Q.from(t.state.schema.text(e.replace(/\r\n?/g,`
|
|
58
58
|
`))),0,0),t.someProp("transformPasted",u=>{a=u(a,t,!0)}),a;let d=t.someProp("clipboardTextParser",u=>u(e,s,r,t));if(d)a=d;else{let u=s.marks(),{schema:f}=t.state,p=qr.fromSchema(f);o=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(m=>{let g=o.appendChild(document.createElement("p"));m&&g.appendChild(p.serializeNode(f.text(m,u)))})}}else t.someProp("transformPastedHTML",d=>{n=d(n,t)}),o=DO(n),wl&&MO(o);let c=o&&o.querySelector("[data-pm-slice]"),h=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(h&&h[3])for(let d=+h[3];d>0;d--){let u=o.firstChild;for(;u&&u.nodeType!=1;)u=u.nextSibling;if(!u)break;o=u}if(a||(a=(t.someProp("clipboardParser")||t.someProp("domParser")||Sr.fromSchema(t.state.schema)).parseSlice(o,{preserveWhitespace:!!(l||h),context:s,ruleFromNode(u){return u.nodeName=="BR"&&!u.nextSibling&&u.parentNode&&!EO.test(u.parentNode.nodeName)?{ignore:!0}:null}})),h)a=RO(Z1(a,+h[1],+h[2]),h[4]);else if(a=ae.maxOpen(AO(a.content,s),!0),a.openStart||a.openEnd){let d=0,u=0;for(let f=a.content.firstChild;d<a.openStart&&!f.type.spec.isolating;d++,f=f.firstChild);for(let f=a.content.lastChild;u<a.openEnd&&!f.type.spec.isolating;u++,f=f.lastChild);a=Z1(a,d,u)}return t.someProp("transformPasted",d=>{a=d(a,t,l)}),a}var EO=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function AO(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let s=e.node(n).contentMatchAt(e.index(n)),i,o=[];if(t.forEach(a=>{if(!o)return;let l=s.findWrapping(a.type),c;if(!l)return o=null;if(c=o.length&&i.length&&A_(l,i,a,o[o.length-1],0))o[o.length-1]=c;else{o.length&&(o[o.length-1]=P_(o[o.length-1],i.length));let h=E_(a,l);o.push(h),s=s.matchType(h.type),i=l}}),o)return Q.from(o)}return t}function E_(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,Q.from(t));return t}function A_(t,e,n,r,s){if(s<t.length&&s<e.length&&t[s]==e[s]){let i=A_(t,e,n,r.lastChild,s+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(s==t.length-1?n.type:t[s+1]))return r.copy(r.content.append(Q.from(E_(n,t,s+1))))}}function P_(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,P_(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(Q.empty,!0);return t.copy(n.append(r))}function Xm(t,e,n,r,s,i){let o=e<0?t.firstChild:t.lastChild,a=o.content;return t.childCount>1&&(i=0),s<r-1&&(a=Xm(a,e,n,r,s+1,i)),s>=n&&(a=e<0?o.contentMatchAt(0).fillBefore(a,i<=s).append(a):a.append(o.contentMatchAt(o.childCount).fillBefore(Q.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,o.copy(a))}function Z1(t,e,n){return e<t.openStart&&(t=new ae(Xm(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new ae(Xm(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}var D_={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};function M_(){return document.implementation.createHTMLDocument("title")}var ul=null;function PO(t){let e=window.trustedTypes;if(!e)return t;if(!ul){if(ul=e.defaultPolicy)try{return ul.createHTML(t)}catch{}ul=e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})}return ul.createHTML(t)}function DO(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=M_(),r=n.body,s=/<([a-z][^>\s]+)/i.exec(t),i;if((i=s&&D_[s[1].toLowerCase()])&&(t=i.map(o=>"<"+o+">").join("")+t+i.map(o=>"</"+o+">").reverse().join("")),r.innerHTML=PO(t),i)for(let o=0;o<i.length;o++)r=r.querySelector(i[o])||r;for(let o=0;o<n.styleSheets.length;o++){let a=n.styleSheets[o];for(let l=0;l<a.rules.length;l++){let c=a.rules[l];if(c instanceof CSSStyleRule){let h=r.querySelectorAll(c.selectorText);for(let d=0;d<h.length;d++)h[d].style.cssText+=c.style.cssText}}}return r}function MO(t){let e=t.querySelectorAll(Vt?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];r.childNodes.length==1&&r.textContent=="\xA0"&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}function RO(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return t}let{content:s,openStart:i,openEnd:o}=t;for(let a=r.length-2;a>=0;a-=2){let l=n.nodes[r[a]];if(!l||l.hasRequiredAttrs())break;try{l.checkAttrs(r[a+1])}catch{break}s=Q.from(l.create(r[a+1],s)),i++,o++}return new ae(s,i,o)}var dn={},un={},IO={touchstart:!0,touchmove:!0},Ym=class{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}};function LO(t){for(let e in dn){let n=dn[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{zO(t,r)&&!lg(t,r)&&(t.editable||!(r.type in un))&&n(t,r)},IO[e]?{passive:!0}:void 0)}tn&&t.dom.addEventListener("input",()=>null),Qm(t)}function Zr(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function OO(t){t.input.mouseDown&&t.input.mouseDown.done(),t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function Qm(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>lg(t,r))})}function lg(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function zO(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function NO(t,e){!lg(t,e)&&dn[e.type]&&(t.editable||!(e.type in un))&&dn[e.type](t,e)}un.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!L_(t)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(Qr&&Vt&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),$o&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();t.input.lastIOSEnter=r,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==r&&(t.someProp("handleKeyDown",s=>s(t,Pi(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||TO(t,n)?n.preventDefault():Zr(t,"key")};un.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};un.keypress=(t,e)=>{let n=e;if(L_(t)||!n.charCode||n.ctrlKey&&!n.altKey||Un&&n.metaKey)return;if(t.someProp("handleKeyPress",s=>s(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof me)||!r.$from.sameParent(r.$to)){let s=String.fromCharCode(n.charCode),i=()=>t.state.tr.insertText(s).scrollIntoView();!/[\r\n]/.test(s)&&!t.someProp("handleTextInput",o=>o(t,r.$from.pos,r.$to.pos,s,i))&&t.dispatch(i()),n.preventDefault()}};function xl(t){return{left:t.clientX,top:t.clientY}}function FO(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function cg(t,e,n,r,s){if(r==-1)return!1;let i=t.state.doc.resolve(r);for(let o=i.depth+1;o>0;o--)if(t.someProp(e,a=>o>i.depth?a(t,n,i.nodeAfter,i.before(o),s,!0):a(t,n,i.node(o),i.before(o),s,!1)))return!0;return!1}function kl(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let r=t.state.tr.setSelection(e);n=="pointer"&&r.setMeta("pointer",!0),t.dispatch(r)}function BO(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&we.isSelectable(r)?(kl(t,new we(n),"pointer"),!0):!1}function HO(t,e){if(e==-1)return!1;let n=t.state.selection,r,s;n instanceof we&&(r=n.node);let i=t.state.doc.resolve(e);for(let o=i.depth+1;o>0;o--){let a=o>i.depth?i.nodeAfter:i.node(o);if(we.isSelectable(a)){r&&n.$from.depth>0&&o>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?s=i.before(n.$from.depth):s=i.before(o);break}}return s!=null?(kl(t,we.create(t.state.doc,s),"pointer"),!0):!1}function $O(t,e,n,r,s){return cg(t,"handleClickOn",e,n,r)||t.someProp("handleClick",i=>i(t,e,r))||(s?HO(t,n):BO(t,n))}function jO(t,e,n,r){return cg(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",s=>s(t,e,r))}function VO(t,e,n,r){return cg(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",s=>s(t,e,r))||WO(t,n,r)}function WO(t,e,n){if(n.button!=0)return!1;let r=R_(t,e,!0),s=t.state.doc;return r?(kl(t,r,"pointer"),r instanceof me&&s.eq(t.state.doc)&&(t.input.mouseDown=new eg(t,r)),!0):!1}function R_(t,e,n){let r=t.state.doc;if(e==-1)return r.inlineContent?me.create(r,0,r.content.size):null;let s=r.resolve(e);for(let i=s.depth+1;i>0;i--){let o=i>s.depth?s.nodeAfter:s.node(i),a=s.before(i);if(o.inlineContent)return me.create(r,a+1,a+1+o.content.size);if(n&&we.isSelectable(o))return we.create(r,a)}return null}function hg(t){return Sh(t)}var I_=Un?"metaKey":"ctrlKey";dn.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=hg(t),s=Date.now(),i="singleClick";s-t.input.lastClick.time<500&&FO(n,t.input.lastClick)&&!n[I_]&&t.input.lastClick.button==n.button&&(t.input.lastClick.type=="singleClick"?i="doubleClick":t.input.lastClick.type=="doubleClick"&&(i="tripleClick")),t.input.lastClick={time:s,x:n.clientX,y:n.clientY,type:i,button:n.button},t.input.mouseDown&&t.input.mouseDown.done();let o=t.posAtCoords(xl(n));o&&(i=="singleClick"?t.input.mouseDown=new Zm(t,o,n,!!r):(i=="doubleClick"?jO:VO)(t,o.pos,o.inside,n)?n.preventDefault():Zr(t,"pointer"))};var _h=class{constructor(e){this.view=e,this.mightDrag=null,e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this))}up(e){this.done()}move(e){e.buttons==0&&this.done()}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.view.input.mouseDown==this&&(this.view.input.mouseDown=null)}delaySelUpdate(){return!1}},Zm=class extends _h{constructor(e,n,r,s){super(e),this.pos=n,this.event=r,this.flushed=s,this.delayedSelectionSync=!1,this.startDoc=e.state.doc,this.selectNode=!!r[I_],this.allowDefault=r.shiftKey;let i,o;if(n.inside>-1)i=e.state.doc.nodeAt(n.inside),o=n.inside;else{let h=e.state.doc.resolve(n.pos);i=h.parent,o=h.depth?h.before():0}let a=s?null:r.target,l=a?e.docView.nearestDesc(a,!0):null;this.target=l&&l.nodeDOM.nodeType==1?l.nodeDOM:null;let{selection:c}=e.state;r.button==0&&(i.type.spec.draggable&&i.type.spec.selectable!==!1||c instanceof we&&c.from<=o&&c.to>o)&&(this.mightDrag={node:i,pos:o,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Kn&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),Zr(e,"pointer")}done(){super.done(),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>{this.view.isDestroyed||es(this.view)})}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(xl(e))),this.updateAllowDefault(e),this.allowDefault||!n?Zr(this.view,"pointer"):$O(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||tn&&this.mightDrag&&!this.mightDrag.node.isAtom||Vt&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(kl(this.view,xe.near(this.view.state.doc.resolve(n.pos)),"pointer"),e.preventDefault()):Zr(this.view,"pointer")}move(e){this.updateAllowDefault(e),Zr(this.view,"pointer"),super.move(e)}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}delaySelUpdate(){return this.allowDefault?(this.delayedSelectionSync=!0,!0):!1}},eg=class extends _h{constructor(e,n){super(e),this.startSelection=n,this.startDoc=e.state.doc}move(e){if(e.buttons==0||this.view.isDestroyed||!this.view.state.doc.eq(this.startDoc)){this.done();return}e.preventDefault(),Zr(this.view,"pointer");let n=this.view.posAtCoords(xl(e)),r=n&&R_(this.view,n.inside,!1);if(!r)return;let{doc:s}=this.view.state,i=this.startSelection,[o,a]=r.from<i.from?[i.to,r.from]:[i.from,r.to];kl(this.view,me.create(s,o,a),"pointer")}};dn.touchstart=t=>{t.input.lastTouch=Date.now(),hg(t),Zr(t,"pointer")};dn.touchmove=t=>{t.input.lastTouch=Date.now(),Zr(t,"pointer")};dn.contextmenu=t=>hg(t);function L_(t,e){return t.composing?!0:tn&&Math.abs(Date.now()-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}var UO=Qr?5e3:-1;un.compositionstart=un.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof me&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||Vt&&u_&&qO(t)))t.markCursor=t.state.storedMarks||n.marks(),Sh(t,!0),t.markCursor=null;else if(Sh(t,!e.selection.empty),Kn&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let s=r.focusNode,i=r.focusOffset;s&&s.nodeType==1&&i!=0;){let o=i<0?s.lastChild:s.childNodes[i-1];if(!o)break;if(o.nodeType==3){let a=t.domSelection();a&&a.collapse(o,o.nodeValue.length);break}else s=o,i=-1}}t.input.composing=!0}O_(t,UO)};function qO(t){let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(!e||e.nodeType!=1||n>=e.childNodes.length)return!1;let r=e.childNodes[n];return r.nodeType==1&&r.contentEditable=="false"}un.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=Date.now(),t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.badSafariComposition?t.domObserver.forceFlush():t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,O_(t,20))};function O_(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>Sh(t),e))}function z_(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=Date.now());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function KO(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=WL(e.focusNode,e.focusOffset),r=UL(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let s=r.pmViewDesc,i=t.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!s||!s.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let o=n.pmViewDesc;if(!(!o||!o.isText(n.nodeValue)))return r}}return n||r}function Sh(t,e=!1){if(!(Qr&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),z_(t),e||t.docView&&t.docView.dirty){let n=ig(t),r=t.state.selection;return n&&!n.eq(r)?t.dispatch(t.state.tr.setSelection(n)):(t.markCursor||e)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function GO(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),s=document.createRange();s.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(s),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}var ml=xn&&$s<15||$o&&JL<604;dn.copy=un.cut=(t,e)=>{let n=e,r=t.state.selection,s=n.type=="cut";if(r.empty)return;let i=ml?null:n.clipboardData,o=r.content(),{dom:a,text:l}=ag(t,o);i?(n.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",l)):GO(t,a),s&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function JO(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function XO(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let s=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?gl(t,r.value,null,s,e):gl(t,r.textContent,r.innerHTML,s,e)},50)}function gl(t,e,n,r,s){let i=T_(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",l=>l(t,s,i||ae.empty)))return!0;if(!i)return!1;let o=JO(i),a=o?t.state.tr.replaceSelectionWith(o,r):t.state.tr.replaceSelection(i);return t.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function N_(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}un.paste=(t,e)=>{let n=e;if(t.composing&&!Qr)return;let r=ml?null:n.clipboardData,s=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&gl(t,N_(r),r.getData("text/html"),s,n)?n.preventDefault():XO(t,n)};var Ch=class{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}},YO=Un?"altKey":"ctrlKey";function F_(t,e){let n;return t.someProp("dragCopies",r=>{n=n||r(e)}),n!=null?!n:!e[YO]}dn.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let s=t.state.selection,i=s.empty?null:t.posAtCoords(xl(n)),o;if(!(i&&i.pos>=s.from&&i.pos<=(s instanceof we?s.to-1:s.to))){if(r&&r.mightDrag)o=we.create(t.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=t.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=t.docView&&(o=we.create(t.state.doc,d.posBefore))}}let a=(o||t.state.selection).content(),{dom:l,text:c,slice:h}=ag(t,a);(!n.dataTransfer.files.length||!Vt||d_>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(ml?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",ml||n.dataTransfer.setData("text/plain",c),t.dragging=new Ch(h,F_(t,n),o)};dn.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};un.dragover=un.dragenter=(t,e)=>e.preventDefault();un.drop=(t,e)=>{try{QO(t,e,t.dragging)}finally{t.dragging=null}};function QO(t,e,n){if(!e.dataTransfer)return;let r=t.posAtCoords(xl(e));if(!r)return;let s=t.state.doc.resolve(r.pos),i=n&&n.slice;i?t.someProp("transformPasted",f=>{i=f(i,t,!1)}):i=T_(t,N_(e.dataTransfer),ml?null:e.dataTransfer.getData("text/html"),!1,s);let o=!!(n&&F_(t,e));if(t.someProp("handleDrop",f=>f(t,e,i||ae.empty,o))){e.preventDefault();return}if(!i)return;e.preventDefault();let a=i?mh(t.state.doc,s.pos,i):s.pos;a==null&&(a=s.pos);let l=t.state.tr;if(o){let{node:f}=n;f?f.replace(l):l.deleteSelection()}let c=l.mapping.map(a),h=i.openStart==0&&i.openEnd==0&&i.content.childCount==1,d=l.doc;if(h?l.replaceRangeWith(c,c,i.content.firstChild):l.replaceRange(c,c,i),l.doc.eq(d))return;let u=l.doc.resolve(c);if(h&&we.isSelectable(i.content.firstChild)&&u.nodeAfter&&u.nodeAfter.sameMarkup(i.content.firstChild))l.setSelection(new we(u));else{let f=l.mapping.map(a);l.mapping.maps[l.mapping.maps.length-1].forEach((p,m,g,b)=>f=b),l.setSelection(og(t,u,l.doc.resolve(f)))}t.focus(),t.dispatch(l.setMeta("uiEvent","drop"))}dn.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&es(t)},20))};dn.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)};dn.beforeinput=(t,e)=>{if(Qr&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:r}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=r||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",i=>i(t,Pi(8,"Backspace")))))return;let{$cursor:s}=t.state.selection;s&&s.pos>0&&t.dispatch(t.state.tr.delete(s.pos-1,s.pos).scrollIntoView())},50)}};for(let t in un)dn[t]=un[t];function bl(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}var Th=class t{constructor(e,n){this.toDOM=e,this.spec=n||Li,this.side=this.spec.side||0}map(e,n,r,s){let{pos:i,deleted:o}=e.mapResult(n.from+s,this.side<0?-1:1);return o?null:new Rt(i-r,i-r,this)}valid(){return!0}eq(e){return this==e||e instanceof t&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&bl(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}},Ii=class t{constructor(e,n){this.attrs=e,this.spec=n||Li}map(e,n,r,s){let i=e.map(n.from+s,this.spec.inclusiveStart?-1:1)-r,o=e.map(n.to+s,this.spec.inclusiveEnd?1:-1)-r;return i>=o?null:new Rt(i,o,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof t&&bl(this.attrs,e.attrs)&&bl(this.spec,e.spec)}static is(e){return e.type instanceof t}destroy(){}},tg=class t{constructor(e,n){this.attrs=e,this.spec=n||Li}map(e,n,r,s){let i=e.mapResult(n.from+s,1);if(i.deleted)return null;let o=e.mapResult(n.to+s,-1);return o.deleted||o.pos<=i.pos?null:new Rt(i.pos-r,o.pos-r,this)}valid(e,n){let{index:r,offset:s}=e.content.findIndex(n.from),i;return s==n.from&&!(i=e.child(r)).isText&&s+i.nodeSize==n.to}eq(e){return this==e||e instanceof t&&bl(this.attrs,e.attrs)&&bl(this.spec,e.spec)}destroy(){}},Rt=class t{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new t(e,n,this.type)}eq(e,n=0){return this.type.eq(e.type)&&this.from+n==e.from&&this.to+n==e.to}map(e,n,r){return this.type.map(e,this,n,r)}static widget(e,n,r){return new t(e,e,new Th(n,r))}static inline(e,n,r,s){return new t(e,n,new Ii(r,s))}static node(e,n,r,s){return new t(e,n,new tg(r,s))}get spec(){return this.type.spec}get inline(){return this.type instanceof Ii}get widget(){return this.type instanceof Th}},Bo=[],Li={},Je=class t{constructor(e,n){this.local=e.length?e:Bo,this.children=n.length?n:Bo}static create(e,n){return n.length?Ah(n,e,0,Li):en}find(e,n,r){let s=[];return this.findInner(e??0,n??1e9,s,0,r),s}findInner(e,n,r,s,i){for(let o=0;o<this.local.length;o++){let a=this.local[o];a.from<=n&&a.to>=e&&(!i||i(a.spec))&&r.push(a.copy(a.from+s,a.to+s))}for(let o=0;o<this.children.length;o+=3)if(this.children[o]<n&&this.children[o+1]>e){let a=this.children[o]+1;this.children[o+2].findInner(e-a,n-a,r,s+a,i)}}map(e,n,r){return this==en||e.maps.length==0?this:this.mapInner(e,n,0,0,r||Li)}mapInner(e,n,r,s,i){let o;for(let a=0;a<this.local.length;a++){let l=this.local[a].map(e,r,s);l&&l.type.valid(n,l)?(o||(o=[])).push(l):i.onRemove&&i.onRemove(this.local[a].spec)}return this.children.length?ZO(this.children,o||[],e,n,r,s,i):o?new t(o.sort(Oi),Bo):en}add(e,n){return n.length?this==en?t.create(e,n):this.addInner(e,n,0):this}addInner(e,n,r){let s,i=0;e.forEach((a,l)=>{let c=l+r,h;if(h=H_(n,a,c)){for(s||(s=this.children.slice());i<s.length&&s[i]<l;)i+=3;s[i]==l?s[i+2]=s[i+2].addInner(a,h,c+1):s.splice(i,0,l,l+a.nodeSize,Ah(h,a,c+1,Li)),i+=3}});let o=B_(i?$_(n):n,-r);for(let a=0;a<o.length;a++)o[a].type.valid(e,o[a])||o.splice(a--,1);return new t(o.length?this.local.concat(o).sort(Oi):this.local,s||this.children)}remove(e){return e.length==0||this==en?this:this.removeInner(e,0)}removeInner(e,n){let r=this.children,s=this.local;for(let i=0;i<r.length;i+=3){let o,a=r[i]+n,l=r[i+1]+n;for(let h=0,d;h<e.length;h++)(d=e[h])&&d.from>a&&d.to<l&&(e[h]=null,(o||(o=[])).push(d));if(!o)continue;r==this.children&&(r=this.children.slice());let c=r[i+2].removeInner(o,a+1);c!=en?r[i+2]=c:(r.splice(i,3),i-=3)}if(s.length){for(let i=0,o;i<e.length;i++)if(o=e[i])for(let a=0;a<s.length;a++)s[a].eq(o,n)&&(s==this.local&&(s=this.local.slice()),s.splice(a--,1))}return r==this.children&&s==this.local?this:s.length||r.length?new t(s,r):en}forChild(e,n){if(this==en)return this;if(n.isLeaf)return t.empty;let r,s;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=e){this.children[a]==e&&(r=this.children[a+2]);break}let i=e+1,o=i+n.content.size;for(let a=0;a<this.local.length;a++){let l=this.local[a];if(l.from<o&&l.to>i&&l.type instanceof Ii){let c=Math.max(i,l.from)-i,h=Math.min(o,l.to)-i;c<h&&(s||(s=[])).push(l.copy(c,h))}}if(s){let a=new t(s.sort(Oi),Bo);return r?new Eh([a,r]):a}return r||en}eq(e){if(this==e)return!0;if(!(e instanceof t)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(e.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return dg(this.localsInner(e))}localsInner(e){if(this==en)return Bo;if(e.inlineContent||!this.local.some(Ii.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Ii||n.push(this.local[r]);return n}forEachSet(e){e(this)}};Je.empty=new Je([],[]);Je.removeOverlap=dg;var en=Je.empty,Eh=class t{constructor(e){this.members=e}map(e,n){let r=this.members.map(s=>s.map(e,n,Li));return t.from(r)}forChild(e,n){if(n.isLeaf)return Je.empty;let r=[];for(let s=0;s<this.members.length;s++){let i=this.members[s].forChild(e,n);i!=en&&(i instanceof t?r=r.concat(i.members):r.push(i))}return t.from(r)}eq(e){if(!(e instanceof t)||e.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(e.members[n]))return!1;return!0}locals(e){let n,r=!0;for(let s=0;s<this.members.length;s++){let i=this.members[s].localsInner(e);if(i.length)if(!n)n=i;else{r&&(n=n.slice(),r=!1);for(let o=0;o<i.length;o++)n.push(i[o])}}return n?dg(r?n:n.sort(Oi)):Bo}static from(e){switch(e.length){case 0:return en;case 1:return e[0];default:return new t(e.every(n=>n instanceof Je)?e:e.reduce((n,r)=>n.concat(r instanceof Je?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}};function ZO(t,e,n,r,s,i,o){let a=t.slice();for(let c=0,h=i;c<n.maps.length;c++){let d=0;n.maps[c].forEach((u,f,p,m)=>{let g=m-p-(f-u);for(let b=0;b<a.length;b+=3){let v=a[b+1];if(v<0||u>v+h-d)continue;let w=a[b]+h-d;f>=w?a[b+1]=u<=w?-2:-1:u>=h&&g&&(a[b]+=g,a[b+1]+=g)}d+=g}),h=n.maps[c].map(h,-1)}let l=!1;for(let c=0;c<a.length;c+=3)if(a[c+1]<0){if(a[c+1]==-2){l=!0,a[c+1]=-1;continue}let h=n.map(t[c]+i),d=h-s;if(d<0||d>=r.content.size){l=!0;continue}let u=n.map(t[c+1]+i,-1),f=u-s,{index:p,offset:m}=r.content.findIndex(d),g=r.maybeChild(p);if(g&&m==d&&m+g.nodeSize==f){let b=a[c+2].mapInner(n,g,h+1,t[c]+i+1,o);b!=en?(a[c]=d,a[c+1]=f,a[c+2]=b):(a[c+1]=-2,l=!0)}else l=!0}if(l){let c=ez(a,t,e,n,s,i,o),h=Ah(c,r,0,o);e=h.local;for(let d=0;d<a.length;d+=3)a[d+1]<0&&(a.splice(d,3),d-=3);for(let d=0,u=0;d<h.children.length;d+=3){let f=h.children[d];for(;u<a.length&&a[u]<f;)u+=3;a.splice(u,0,h.children[d],h.children[d+1],h.children[d+2])}}return new Je(e.sort(Oi),a)}function B_(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let s=t[r];n.push(new Rt(s.from+e,s.to+e,s.type))}return n}function ez(t,e,n,r,s,i,o){function a(l,c){for(let h=0;h<l.local.length;h++){let d=l.local[h].map(r,s,c);d?n.push(d):o.onRemove&&o.onRemove(l.local[h].spec)}for(let h=0;h<l.children.length;h+=3)a(l.children[h+2],l.children[h]+c+1)}for(let l=0;l<t.length;l+=3)t[l+1]==-1&&a(t[l+2],e[l]+i+1);return n}function H_(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,s=null;for(let i=0,o;i<t.length;i++)(o=t[i])&&o.from>n&&o.to<r&&((s||(s=[])).push(o),t[i]=null);return s}function $_(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function Ah(t,e,n,r){let s=[],i=!1;e.forEach((a,l)=>{let c=H_(t,a,l+n);if(c){i=!0;let h=Ah(c,a,n+l+1,r);h!=en&&s.push(l,l+a.nodeSize,h)}});let o=B_(i?$_(t):t,-n).sort(Oi);for(let a=0;a<o.length;a++)o[a].type.valid(e,o[a])||(r.onRemove&&r.onRemove(o[a].spec),o.splice(a--,1));return o.length||s.length?new Je(o,s):en}function Oi(t,e){return t.from-e.from||t.to-e.to}function dg(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let s=n+1;s<e.length;s++){let i=e[s];if(i.from==r.from){i.to!=r.to&&(e==t&&(e=t.slice()),e[s]=i.copy(i.from,r.to),e_(e,s+1,i.copy(r.to,i.to)));continue}else{i.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,i.from),e_(e,s,r.copy(i.from,r.to)));break}}}return e}function e_(t,e,n){for(;e<t.length&&Oi(n,t[e])>0;)e++;t.splice(e,0,n)}function zm(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=en&&e.push(r)}),t.cursorWrapper&&e.push(Je.create(t.state.doc,[t.cursorWrapper.deco])),Eh.from(e)}var tz={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},nz=xn&&$s<=11,ng=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}},rg=class{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new ng,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let s=0;s<r.length;s++)this.queue.push(r[s]);xn&&$s<=11&&r.some(s=>s.type=="childList"&&s.removedNodes.length||s.type=="characterData"&&s.oldValue.length>s.target.nodeValue.length)?this.flushSoon():tn&&e.composing&&r.some(s=>s.type=="childList"&&s.target.nodeName=="TR")?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),nz&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,tz)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;n<e.length;n++)this.queue.push(e[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(K1(this.view)){if(this.suppressingSelectionUpdates)return es(this.view);if(xn&&$s<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&zi(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n=new Set,r;for(let i=e.focusNode;i;i=Ho(i))n.add(i);for(let i=e.anchorNode;i;i=Ho(i))if(n.has(i)){r=i;break}let s=r&&this.view.docView.nearestDesc(r);if(s&&s.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=e.domSelectionRange(),s=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&K1(e)&&!this.ignoreSelectionChange(r),i=-1,o=-1,a=!1,l=[];if(e.editable)for(let h=0;h<n.length;h++){let d=this.registerMutation(n[h],l);d&&(i=i<0?d.from:Math.min(d.from,i),o=o<0?d.to:Math.max(d.to,o),d.typeOver&&(a=!0))}if(l.some(h=>h.nodeName=="BR")&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46||Vt&&(e.composing||e.input.compositionEndedAt>Date.now()-50)&&n.some(h=>h.type=="childList"&&h.removedNodes.length))){for(let h of l)if(h.nodeName=="BR"&&h.parentNode){let d=h.nextSibling;for(;d&&d.nodeType==1;){if(d.contentEditable=="false"){h.parentNode.removeChild(h);break}d=d.firstChild}}}else if(Kn&&l.length){let h=l.filter(d=>d.nodeName=="BR");if(h.length==2){let[d,u]=h;d.parentNode&&d.parentNode.parentNode==u.parentNode?u.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let u of h){let f=u.parentNode;f&&f.nodeName=="LI"&&(!d||iz(e,d)!=f)&&u.remove()}}}let c=null;i<0&&s&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Ph(r)&&(c=ig(e))&&c.eq(xe.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,es(e),this.currentSelection.set(r),e.scrollToSelection()):(i>-1||s)&&(i>-1&&(e.docView.markDirty(i,o),rz(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,oz(e,l)),this.handleDOMChange(i,o,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||es(e),this.currentSelection.set(r))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let h=0;h<e.addedNodes.length;h++){let d=e.addedNodes[h];n.push(d),d.nodeType==3&&(this.lastChangedTextNode=d)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let s=e.previousSibling,i=e.nextSibling;if(xn&&$s<=11&&e.addedNodes.length)for(let h=0;h<e.addedNodes.length;h++){let{previousSibling:d,nextSibling:u}=e.addedNodes[h];(!d||Array.prototype.indexOf.call(e.addedNodes,d)<0)&&(s=d),(!u||Array.prototype.indexOf.call(e.addedNodes,u)<0)&&(i=u)}let o=s&&s.parentNode==e.target?jt(s)+1:0,a=r.localPosFromDOM(e.target,o,-1),l=i&&i.parentNode==e.target?jt(i):e.target.childNodes.length,c=r.localPosFromDOM(e.target,l,1);return{from:a,to:c}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}},t_=new WeakMap,n_=!1;function rz(t){if(!t_.has(t)&&(t_.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=Kn,n_)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),n_=!0}}function r_(t,e){let n=e.startContainer,r=e.startOffset,s=e.endContainer,i=e.endOffset,o=t.domAtPos(t.state.selection.anchor);return zi(o.node,o.offset,s,i)&&([n,r,s,i]=[s,i,n,r]),{anchorNode:n,anchorOffset:r,focusNode:s,focusOffset:i}}function sz(t,e){if(e.getComposedRanges){let s=e.getComposedRanges(t.root)[0];if(s)return r_(t,s)}let n;function r(s){s.preventDefault(),s.stopImmediatePropagation(),n=s.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",r,!0),n?r_(t,n):null}function iz(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let r=t.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function oz(t,e){var n;let{focusNode:r,focusOffset:s}=t.domSelectionRange();for(let i of e)if(((n=i.parentNode)===null||n===void 0?void 0:n.nodeName)=="TR"){let o=i.nextSibling;for(;o&&o.nodeName!="TD"&&o.nodeName!="TH";)o=o.nextSibling;if(o){let a=o;for(;;){let l=a.firstChild;if(!l||l.nodeType!=1||l.contentEditable=="false"||/^(BR|IMG)$/.test(l.nodeName))break;a=l}a.insertBefore(i,a.firstChild),r==i&&t.domSelection().collapse(i,s)}else i.parentNode.removeChild(i)}}function az(t,e,n,r){let{node:s,fromOffset:i,toOffset:o,from:a,to:l}=t.docView.parseRange(e,n),c=t.domSelectionRange(),h,d=c.anchorNode;if(d&&t.dom.contains(d.nodeType==1?d:d.parentNode)&&(h=[{node:d,offset:c.anchorOffset}],Ph(c)||h.push({node:c.focusNode,offset:c.focusOffset})),Vt&&t.input.lastKeyCode===8)for(let b=o;b>i;b--){let v=s.childNodes[b-1],w=v.pmViewDesc;if(v.nodeName=="BR"&&!w){o=b;break}if(!w||w.size)break}let u=t.state.doc,f=t.someProp("domParser")||Sr.fromSchema(t.state.schema),p=u.resolve(a),m=null,g=f.parse(s,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:i,to:o,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:h,ruleFromNode:lz(r),context:p});if(h&&h[0].pos!=null){let b=h[0].pos,v=h[1]&&h[1].pos;v==null&&(v=b),m={anchor:b+a,head:v+a}}return{doc:g,sel:m,from:a,to:l}}var lz=t=>e=>{let n=e.pmViewDesc;if(n)return n.parseRule(t);if(e.nodeName=="BR"&&e.parentNode){if(tn&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let r=document.createElement("div");return r.appendChild(document.createElement("li")),{skip:r}}else if(e.parentNode.lastChild==e||tn&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null},cz=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function hz(t,e,n,r,s){let i=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let S=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,C=ig(t,S);if(C&&!t.state.selection.eq(C)){if(Vt&&Qr&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",E=>E(t,Pi(13,"Enter"))))return;let T=t.state.tr.setSelection(C);S=="pointer"?T.setMeta("pointer",!0):S=="key"&&T.scrollIntoView(),i&&T.setMeta("composition",i),t.dispatch(T)}return}let o=t.state.doc.resolve(e),a=o.sharedDepth(n);e=o.before(a+1),n=t.state.doc.resolve(n).after(a+1);let l=t.state.selection,c=az(t,e,n,s),h=t.state.doc,d=h.slice(c.from,c.to),u,f;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(u=t.state.selection.to,f="end"):(u=t.state.selection.from,f="start"),t.input.lastKeyCode=null;let p=pz(d.content,c.doc.content,c.from,u,f);if(p&&t.input.domChangeCount++,($o&&t.input.lastIOSEnter>Date.now()-225||Qr)&&s.some(S=>S.nodeType==1&&!cz.test(S.nodeName))&&(!p||p.endA>=p.endB)&&t.someProp("handleKeyDown",S=>S(t,Pi(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!p)if(r&&l instanceof me&&!l.empty&&l.$head.sameParent(l.$anchor)&&!t.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))p={start:l.from,endA:l.to,endB:l.to};else{if(c.sel){let S=s_(t,t.state.doc,c.sel);if(S&&!S.eq(t.state.selection)){let C=t.state.tr.setSelection(S);i&&C.setMeta("composition",i),t.dispatch(C)}}return}t.state.selection.from<t.state.selection.to&&p.start==p.endB&&t.state.selection instanceof me&&(p.start>t.state.selection.from&&p.start<=t.state.selection.from+2&&t.state.selection.from>=c.from?p.start=t.state.selection.from:p.endA<t.state.selection.to&&p.endA>=t.state.selection.to-2&&t.state.selection.to<=c.to&&(p.endB+=t.state.selection.to-p.endA,p.endA=t.state.selection.to)),xn&&$s<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>c.from&&c.doc.textBetween(p.start-c.from-1,p.start-c.from+1)==" \xA0"&&(p.start--,p.endA--,p.endB--);let m=c.doc.resolveNoCache(p.start-c.from),g=c.doc.resolveNoCache(p.endB-c.from),b=h.resolve(p.start),v=m.sameParent(g)&&m.parent.inlineContent&&b.end()>=p.endA;if(($o&&t.input.lastIOSEnter>Date.now()-225&&(!v||s.some(S=>S.nodeName=="DIV"||S.nodeName=="P"))||!v&&m.pos<c.doc.content.size&&(!m.sameParent(g)||!m.parent.inlineContent)&&m.pos<g.pos&&!/\S/.test(c.doc.textBetween(m.pos,g.pos,"","")))&&t.someProp("handleKeyDown",S=>S(t,Pi(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>p.start&&uz(h,p.start,p.endA,m,g)&&t.someProp("handleKeyDown",S=>S(t,Pi(8,"Backspace")))){Qr&&Vt&&t.domObserver.suppressSelectionUpdates();return}Vt&&p.endB==p.start&&(t.input.lastChromeDelete=Date.now()),Qr&&!v&&m.start()!=g.start()&&g.parentOffset==0&&m.depth==g.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==p.endA&&(p.endB-=2,g=c.doc.resolveNoCache(p.endB-c.from),setTimeout(()=>{t.someProp("handleKeyDown",function(S){return S(t,Pi(13,"Enter"))})},20));let w=p.start,x=p.endA,_=S=>{let C=S||t.state.tr.replace(w,x,c.doc.slice(p.start-c.from,p.endB-c.from));if(c.sel){let T=s_(t,C.doc,c.sel);T&&!(Vt&&t.composing&&T.empty&&(p.start!=p.endB||t.input.lastChromeDelete<Date.now()-100)&&(T.head==w||T.head==C.mapping.map(x)-1)||xn&&T.empty&&T.head==w)&&C.setSelection(T)}return i&&C.setMeta("composition",i),C.scrollIntoView()},k;if(v)if(m.pos==g.pos){xn&&$s<=11&&m.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>es(t),20));let S=_(t.state.tr.delete(w,x)),C=h.resolve(p.start).marksAcross(h.resolve(p.endA));C&&S.ensureMarks(C),t.dispatch(S)}else if(p.endA==p.endB&&(k=dz(m.parent.content.cut(m.parentOffset,g.parentOffset),b.parent.content.cut(b.parentOffset,p.endA-b.start())))){let S=_(t.state.tr);k.type=="add"?S.addMark(w,x,k.mark):S.removeMark(w,x,k.mark),t.dispatch(S)}else if(m.parent.child(m.index()).isText&&m.index()==g.index()-(g.textOffset?0:1)){let S=m.parent.textBetween(m.parentOffset,g.parentOffset),C=()=>_(t.state.tr.insertText(S,w,x));t.someProp("handleTextInput",T=>T(t,w,x,S,C))||t.dispatch(C())}else t.dispatch(_());else t.dispatch(_())}function s_(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:og(t,e.resolve(n.anchor),e.resolve(n.head))}function dz(t,e){let n=t.firstChild.marks,r=e.firstChild.marks,s=n,i=r,o,a,l;for(let h=0;h<r.length;h++)s=r[h].removeFromSet(s);for(let h=0;h<n.length;h++)i=n[h].removeFromSet(i);if(s.length==1&&i.length==0)a=s[0],o="add",l=h=>h.mark(a.addToSet(h.marks));else if(s.length==0&&i.length==1)a=i[0],o="remove",l=h=>h.mark(a.removeFromSet(h.marks));else return null;let c=[];for(let h=0;h<e.childCount;h++)c.push(l(e.child(h)));if(Q.from(c).eq(t))return{mark:a,type:o}}function uz(t,e,n,r,s){if(n-e<=s.pos-r.pos||Nm(r,!0,!1)<s.pos)return!1;let i=t.resolve(e);if(!r.parent.isTextblock){let a=i.nodeAfter;return a!=null&&n==e+a.nodeSize}if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let o=t.resolve(Nm(i,!0,!0));return!o.parent.isTextblock||o.pos>n||Nm(o,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(o.parent.content)}function Nm(t,e,n){let r=t.depth,s=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,s++,e=!1;if(n){let i=t.node(r).maybeChild(t.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,s++}return s}function pz(t,e,n,r,s){let i=t.findDiffStart(e,n),o=n+t.size,a=n+e.size;if(i==null)return null;let{a:l,b:c}=t.findDiffEnd(e,o,a);if(s=="end"){let h=Math.max(0,i-Math.min(l,c));r-=l+h-i}if(l<i&&o<a){let h=r<=i&&r>=l?i-r:0;i-=h,c=i+(c-l),l=i}else if(c<i){let h=r<=i&&r>=c?i-r:0;i-=h,l=i+(l-c),c=i}return{start:i,endA:l,endB:c}}var vl=class{constructor(e,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new Ym,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(c_),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=a_(this),o_(this),this.nodeViews=l_(this),this.docView=$1(this.state.doc,i_(this),zm(this),this.dom,this),this.domObserver=new rg(this,(r,s,i,o)=>hz(this,r,s,i,o)),this.domObserver.start(),LO(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Qm(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(c_),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in e)n[r]=e[r];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){var r;let s=this.state,i=!1,o=!1;e.storedMarks&&this.composing&&(z_(this),o=!0),this.state=e;let a=s.plugins!=e.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let f=l_(this);mz(f,this.nodeViews)&&(this.nodeViews=f,i=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&Qm(this),this.editable=a_(this),o_(this);let l=zm(this),c=i_(this),h=s.plugins!=e.plugins&&!s.doc.eq(e.doc)?"reset":e.scrollToSelection>s.scrollToSelection?"to selection":"preserve",d=i||!this.docView.matchesNode(e.doc,c,l);(d||!e.selection.eq(s.selection))&&(o=!0);let u=h=="preserve"&&o&&this.dom.style.overflowAnchor==null&&QL(this);if(o){this.domObserver.stop();let f=d&&(xn||Vt)&&!this.composing&&!s.selection.empty&&!e.selection.empty&&fz(s.selection,e.selection);if(d){let m=Vt?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=KO(this)),(i||!this.docView.update(e.doc,c,l,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=$1(e.doc,c,l,this.dom,this)),m&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(f=!0)}let p=this.input.mouseDown;f||!(p&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&yO(this)&&p.delaySelUpdate())?es(this,f):(__(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(s),!((r=this.dragging)===null||r===void 0)&&r.node&&!s.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,s),h=="reset"?this.dom.scrollTop=0:h=="to selection"?this.scrollToSelection():u&&ZL(u)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof we){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&z1(this,n.getBoundingClientRect(),e)}else z1(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,e)}}updateDraggedNode(e,n){let r=e.node,s=-1;if(r.from<this.state.doc.content.size&&this.state.doc.nodeAt(r.from)==r.node)s=r.from;else{let i=r.from+(this.state.doc.content.size-n.doc.content.size);(i>0&&i<this.state.doc.content.size&&this.state.doc.nodeAt(i))==r.node&&(s=i)}this.dragging=new Ch(e.slice,e.move,s<0?void 0:we.create(this.state.doc,s))}someProp(e,n){let r=this._props&&this._props[e],s;if(r!=null&&(s=n?n(r):r))return s;for(let o=0;o<this.directPlugins.length;o++){let a=this.directPlugins[o].props[e];if(a!=null&&(s=n?n(a):a))return s}let i=this.state.plugins;if(i)for(let o=0;o<i.length;o++){let a=i[o].props[e];if(a!=null&&(s=n?n(a):a))return s}}hasFocus(){if(xn){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&eO(this.dom),es(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return e||document}updateRoot(){this._root=null}posAtCoords(e){return iO(this,e)}coordsAtPos(e,n=1){return b_(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,r=-1){let s=this.docView.posFromDOM(e,n,r);if(s==null)throw new RangeError("DOM position not inside the editor");return s}endOfTextblock(e,n){return hO(this,n||this.state,e)}pasteHTML(e,n){return gl(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return gl(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return ag(this,e)}destroy(){this.docView&&(OO(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],zm(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,jL())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return NO(this,e)}domSelectionRange(){let e=this.domSelection();return e?tn&&this.root.nodeType===11&&KL(this.dom.ownerDocument)==this.dom&&sz(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}};vl.prototype.dispatch=function(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))};function i_(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let r in n)r=="class"?e.class+=" "+n[r]:r=="style"?e.style=(e.style?e.style+";":"")+n[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(n[r]))}),e.translate||(e.translate="no"),[Rt.node(0,t.state.doc.content.size,e)]}function o_(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:Rt.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function a_(t){return!t.someProp("editable",e=>e(t.state)===!1)}function fz(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function l_(t){let e=Object.create(null);function n(r){for(let s in r)Object.prototype.hasOwnProperty.call(e,s)||(e[s]=r[s])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function mz(t,e){let n=0,r=0;for(let s in t){if(t[s]!=e[s])return!0;n++}for(let s in e)r++;return n!=r}function c_(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var ts={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Mh={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},gz=typeof navigator<"u"&&/Mac/.test(navigator.platform),bz=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(At=0;At<10;At++)ts[48+At]=ts[96+At]=String(At);var At;for(At=1;At<=24;At++)ts[At+111]="F"+At;var At;for(At=65;At<=90;At++)ts[At]=String.fromCharCode(At+32),Mh[At]=String.fromCharCode(At);var At;for(Dh in ts)Mh.hasOwnProperty(Dh)||(Mh[Dh]=ts[Dh]);var Dh;function j_(t){var e=gz&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||bz&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Mh:ts)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}var vz=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),yz=typeof navigator<"u"&&/Win/.test(navigator.platform);function wz(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,s,i,o;for(let a=0;a<e.length-1;a++){let l=e[a];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))s=!0;else if(/^s(hift)?$/i.test(l))i=!0;else if(/^mod$/i.test(l))vz?o=!0:s=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(n="Alt-"+n),s&&(n="Ctrl-"+n),o&&(n="Meta-"+n),i&&(n="Shift-"+n),n}function xz(t){let e=Object.create(null);for(let n in t)e[wz(n)]=t[n];return e}function ug(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function V_(t){return new Oe({props:{handleKeyDown:_l(t)}})}function _l(t){let e=xz(t);return function(n,r){let s=j_(r),i,o=e[ug(s,r)];if(o&&o(n.state,n.dispatch,n))return!0;if(s.length==1&&s!=" "){if(r.shiftKey){let a=e[ug(s,r,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(yz&&r.ctrlKey&&r.altKey)&&(i=ts[r.keyCode])&&i!=s){let a=e[ug(i,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}function Fh(t){let{state:e,transaction:n}=t,{selection:r}=n,{doc:s}=n,{storedMarks:i}=n;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return i},get selection(){return r},get doc(){return s},get tr(){return r=n.selection,s=n.doc,i=n.storedMarks,n}}}var Uo=class iS{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){let{rawCommands:e,editor:n,state:r}=this,{view:s}=n,{tr:i}=r,o=this.buildProps(i);return Object.fromEntries(Object.entries(e).map(([a,l])=>[a,(...h)=>{let d=l(...h)(o);return!i.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(i),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,n=!0){let{rawCommands:r,editor:s,state:i}=this,{view:o}=s,a=[],l=!!e,c=e||i.tr,h=()=>(!l&&n&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(c),a.every(u=>u===!0)),d={...Object.fromEntries(Object.entries(r).map(([u,f])=>[u,(...m)=>{let g=this.buildProps(c,n),b=f(...m)(g);return a.push(b),d}])),run:h};return d}static createFakeChain(){let e=new Proxy({},{get:(n,r)=>{if(r!=="then")return r==="run"?()=>!1:()=>e}});return e}createCan(e){let{rawCommands:n,state:r}=this,s=!1,i=e||r.tr,o=this.buildProps(i,s);return{...Object.fromEntries(Object.entries(n).map(([a,l])=>[a,(...c)=>l(...c)({...o,dispatch:void 0})])),chain:()=>this.createChain(i,s)}}static createFallbackCan(){let e=iS.createFakeChain();return new Proxy({chain:()=>e},{get:(n,r)=>{if(r!=="then")return r==="chain"?n.chain:()=>!1}})}buildProps(e,n=!0){let{rawCommands:r,editor:s,state:i}=this,{view:o}=s,a={tr:e,editor:s,view:o,state:Fh({state:i,transaction:e}),dispatch:n?()=>{}:void 0,chain:()=>this.createChain(e,n),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(r).map(([l,c])=>[l,(...h)=>c(...h)(a)]))}};return a}},kz=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{if(!t.isDestroyed){var n;e.dom.blur(),(n=window)===null||n===void 0||(n=n.getSelection())===null||n===void 0||n.removeAllRanges()}}),!0),_z=(t=!0)=>({commands:e})=>e.setContent("",{emitUpdate:t}),Sz=()=>({state:t,tr:e,dispatch:n})=>{let{selection:r}=e,{ranges:s}=r;return n&&s.forEach(({$from:i,$to:o})=>{t.doc.nodesBetween(i.pos,o.pos,(a,l)=>{if(a.type.isText)return;let{doc:c,mapping:h}=e,d=c.resolve(h.map(l)),u=c.resolve(h.map(l+a.nodeSize)),f=d.blockRange(u);if(!f)return;let p=Jr(f);if(a.type.isTextblock){let{defaultType:m}=d.parent.contentMatchAt(d.index());e.setNodeMarkup(f.start,m)}(p||p===0)&&e.lift(f,p)})}),!0},Cz=t=>e=>t(e),Tz=()=>({state:t,dispatch:e})=>Am(t,e),Ez=(t,e)=>({editor:n,tr:r})=>{let{state:s}=n,i=s.doc.slice(t.from,t.to);r.deleteRange(t.from,t.to);let o=r.mapping.map(e);return r.insert(o,i.content),r.setSelection(new me(r.doc.resolve(Math.max(o-1,0)))),!0},Az=()=>({tr:t,dispatch:e})=>{let{selection:n}=t,r=n.$anchor.node();if(r.content.size>0)return!1;let s=t.selection.$anchor;for(let i=s.depth;i>0;i-=1)if(s.node(i).type===r.type){if(e){let o=s.before(i),a=s.after(i);t.delete(o,a).scrollIntoView()}return!0}return!1};function Pt(t,e){if(typeof t=="string"){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}var Pz=t=>({tr:e,state:n,dispatch:r})=>{let s=Pt(t,n.schema),i=e.selection.$anchor;for(let o=i.depth;o>0;o-=1)if(i.node(o).type===s){if(r){let a=i.before(o),l=i.after(o);e.delete(a,l).scrollIntoView()}return!0}return!1},Dz=t=>({tr:e,dispatch:n})=>{let{from:r,to:s}=t;return n&&e.delete(r,s),!0},Mz=t=>t.content?/^text(\*|\+)/.test(t.content):!1,W_=(t,e,n)=>{if(!t.parent.isInline||n==="left"&&t.pos>t.start()||n==="right"&&t.pos<t.end())return t.pos;let r=e.nodes[t.parent.type.name].spec;return Mz(r)?n==="left"?t.start()-1:t.end()+1:t.pos},Rz=(t,e,n)=>({from:W_(t,n,"left"),to:W_(e,n,"right")}),Iz=()=>({state:t,dispatch:e})=>{if(t.selection.empty)return!1;if(e){let n=t.tr,{ranges:r}=t.selection,s=n.steps.length;r.forEach(i=>{let o=n.mapping.slice(s),a=n.doc.resolve(o.map(i.$from.pos)),l=n.doc.resolve(o.map(i.$to.pos)),{from:c,to:h}=Rz(a,l,t.schema);n.deleteRange(c,h)}),n.selection.empty||n.setSelection(me.near(n.doc.resolve(n.selection.from))),n.scrollIntoView(),e(n)}return!0},Lz=()=>({commands:t})=>t.keyboardShortcut("Enter"),Oz=()=>({state:t,dispatch:e})=>Em(t,e);function yg(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function zh(t,e,n={strict:!0}){let r=Object.keys(e);return r.length?r.every(s=>n.strict?e[s]===t[s]:yg(e[s])?e[s].test(t[s]):e[s]===t[s]):!0}function oS(t,e,n={}){return t.find(r=>r.type===e&&zh(Object.fromEntries(Object.keys(n).map(s=>[s,r.attrs[s]])),n))}function U_(t,e,n={}){return!!oS(t,e,n)}function wg(t,e,n){if(!t||!e)return;let r=t.parent.childAfter(t.parentOffset);if((!r.node||!r.node.marks.some(l=>l.type===e))&&(r=t.parent.childBefore(t.parentOffset)),!r.node||!r.node.marks.some(l=>l.type===e))return;if(!n){let l=r.node.marks.find(c=>c.type===e);l&&(n=l.attrs)}if(!oS([...r.node.marks],e,n))return;let s=r.index,i=t.start()+r.offset,o=s+1,a=i+r.node.nodeSize;for(;s>0&&U_([...t.parent.child(s-1).marks],e,n);)s-=1,i-=t.parent.child(s).nodeSize;for(;o<t.parent.childCount&&U_([...t.parent.child(o).marks],e,n);)a+=t.parent.child(o).nodeSize,o+=1;return{from:i,to:a}}function ns(t,e){if(typeof t=="string"){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}var zz=(t,e)=>({tr:n,state:r,dispatch:s})=>{let i=ns(t,r.schema),{doc:o,selection:a}=n,{$from:l,from:c,to:h}=a;if(s){let d=wg(l,i,e);if(d&&d.from<=c&&d.to>=h){let u=me.create(o,d.from,d.to);n.setSelection(u)}}return!0},Nz=t=>e=>{let n=typeof t=="function"?t(e):t;for(let r=0;r<n.length;r+=1)if(n[r](e))return!0;return!1};function aS(t){return t instanceof me}function Fi(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function gg(t,e=null){if(!e)return null;let n=xe.atStart(t),r=xe.atEnd(t);if(e==="start"||e===!0)return n;if(e==="end")return r;let s=n.from,i=r.to;return e==="all"?me.create(t,Fi(0,s,i),Fi(t.content.size,s,i)):me.create(t,Fi(e,s,i),Fi(e,s,i))}function q_(){return["Android"].includes(navigator.platform)||/android/i.test(navigator.userAgent)}function Nh(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function Fz(){return typeof navigator<"u"?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1}var Bz=(t=null,e={})=>({editor:n,view:r,tr:s,dispatch:i})=>{e={scrollIntoView:!0,...e};let o=()=>{(Nh()||q_())&&r.dom.focus(),Fz()&&!Nh()&&!q_()&&r.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),e?.scrollIntoView&&n.commands.scrollIntoView())})};try{if(r.hasFocus()&&t===null||t===!1)return!0}catch{return!1}if(i&&t===null&&!aS(n.state.selection))return o(),!0;let a=gg(s.doc,t)||n.state.selection,l=n.state.selection.eq(a);return i&&(l||s.setSelection(a),l&&s.storedMarks&&s.setStoredMarks(s.storedMarks),o()),!0},Hz=(t,e)=>n=>t.every((r,s)=>e(r,{...n,index:s})),$z=(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),lS=t=>{let e=t.childNodes;for(let n=e.length-1;n>=0;n-=1){let r=e[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?t.removeChild(r):r.nodeType===1&&lS(r)}return t};function Sl(t){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");let e=`<body>${t}</body>`,n=new window.DOMParser().parseFromString(e,"text/html").body;return lS(n)}function cS(t){return typeof t?.nodesBetween=="function"}function qo(t,e,n){if(cS(t))return t;let r=typeof t=="object"&&t!==null;n={slice:!0,parseOptions:{},...n};let s=typeof t=="string";if(r)try{if(Array.isArray(t)&&t.length>0)return Q.fromArray(t.map(o=>e.nodeFromJSON(o)));let i=e.nodeFromJSON(t);return n.errorOnInvalidContent&&i.check(),i}catch(i){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:i});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",i),qo("",e,n)}if(s){if(n.errorOnInvalidContent){let o=!1,a="",l=new el({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:c=>(o=!0,a=typeof c=="string"?c:c.outerHTML,null)}]}})});if(n.slice?Sr.fromSchema(l).parseSlice(Sl(t),n.parseOptions):Sr.fromSchema(l).parse(Sl(t),n.parseOptions),n.errorOnInvalidContent&&o)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${a}`)})}let i=Sr.fromSchema(e);return n.slice?i.parseSlice(Sl(t),n.parseOptions).content:i.parse(Sl(t),n.parseOptions)}return qo("",e,n)}function hS(t){return!("type"in t)}function dS(t,e,n){let r=t.steps.length-1;if(r<e)return;let s=t.steps[r];if(!(s instanceof Nt||s instanceof Et))return;let i=t.mapping.maps[r],o=0;i.forEach((a,l,c,h)=>{o===0&&(o=h)}),t.setSelection(xe.near(t.doc.resolve(o),n))}var jz=(t,e,n)=>({tr:r,dispatch:s,editor:i})=>{if(s){n={parseOptions:i.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let a,l=g=>{i.emit("contentError",{editor:i,error:g,disableCollaboration:()=>{"collaboration"in i.storage&&typeof i.storage.collaboration=="object"&&i.storage.collaboration&&(i.storage.collaboration.isDisabled=!0)}})},c={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!i.options.enableContentCheck&&i.options.emitContentError)try{qo(e,i.schema,{parseOptions:c,errorOnInvalidContent:!0})}catch(g){l(g)}try{var o;a=qo(e,i.schema,{parseOptions:c,errorOnInvalidContent:(o=n.errorOnInvalidContent)!==null&&o!==void 0?o:i.options.enableContentCheck})}catch(g){return l(g),!1}let{from:h,to:d}=typeof t=="number"?{from:t,to:t}:{from:t.from,to:t.to},u=!0,f=!0,p=hS(a)?a.content:[a];if(p.forEach(g=>{g.check(),u=u?g.isText&&g.marks.length===0:!1,f=f?g.isBlock:!1}),h===d&&f){let{parent:g}=r.doc.resolve(h);g.isTextblock&&!g.type.spec.code&&!g.childCount&&(h-=1,d+=1)}let m;if(u)Array.isArray(e)?m=e.map(g=>g.text||"").join(""):cS(e)?m=p.map(g=>{var b;return(b=g.text)!==null&&b!==void 0?b:""}).join(""):typeof e=="object"&&e&&e.text?m=e.text:m=e,r.insertText(m,h,d);else{m=Q.from(p);let g=r.doc.resolve(h),b=g.node(),v=g.parentOffset===0,w=b.isText||b.isTextblock,x=b.content.size>0;v&&w&&x&&f&&(h=Math.max(0,h-1)),r.replaceWith(h,d,p)}n.updateSelection&&dS(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:h,text:m}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:h,text:m})}return!0};function uS(t){for(let e=0;e<t.edgeCount;e+=1){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}var Vz=(t={})=>({tr:e,dispatch:n,editor:r})=>{let{pos:s,attrs:i,content:o,updateSelection:a=!0}=t,l;typeof s=="number"?l=e.doc.resolve(s):s?l=s:l=e.selection.$from;let c=uS(l.parent.contentMatchAt(l.index()));if(!c)return!1;let h=Object.keys(c.spec.attrs||{}),d=i?Object.fromEntries(Object.entries(i).filter(([f])=>h.includes(f))):{},u;if(o){let f=qo(o,r.schema);u=c.createAndFill(d,f)}else u=c.createAndFill(d);return u?(n&&(e.insert(l.pos,u),a&&dS(e,e.steps.length-1,-1)),!0):!1},Wz=()=>({state:t,dispatch:e})=>S1(t,e),Uz=()=>({state:t,dispatch:e})=>C1(t,e),qz=()=>({state:t,dispatch:e})=>ym(t,e),Kz=()=>({state:t,dispatch:e})=>km(t,e),Gz=()=>({state:t,dispatch:e,tr:n})=>{try{let r=Io(t.doc,t.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},Jz=()=>({state:t,dispatch:e,tr:n})=>{try{let r=Io(t.doc,t.selection.$from.pos,1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},Xz=()=>({state:t,dispatch:e})=>w1(t,e),Yz=()=>({state:t,dispatch:e})=>x1(t,e);function pS(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function Qz(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n==="Space"&&(n=" ");let r,s,i,o;for(let a=0;a<e.length-1;a+=1){let l=e[a];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))s=!0;else if(/^s(hift)?$/i.test(l))i=!0;else if(/^mod$/i.test(l))Nh()||pS()?o=!0:s=!0;else throw new Error(`Unrecognized modifier name: ${l}`)}return r&&(n=`Alt-${n}`),s&&(n=`Ctrl-${n}`),o&&(n=`Meta-${n}`),i&&(n=`Shift-${n}`),n}var Zz=t=>({editor:e,view:n,tr:r,dispatch:s})=>{let i=Qz(t).split(/-(?!$)/),o=i.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),a=new KeyboardEvent("keydown",{key:o==="Space"?" ":o,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),l=e.captureTransaction(()=>{n.someProp("handleKeyDown",c=>c(n,a))});return l?.steps.forEach(c=>{let h=c.map(r.mapping);h&&s&&r.maybeStep(h)}),!0};function Tr(t,e,n={}){let{from:r,to:s,empty:i}=t.selection,o=e?Pt(e,t.schema):null,a=[];t.doc.nodesBetween(r,s,(h,d)=>{if(h.isText)return;let u=Math.max(r,d),f=Math.min(s,d+h.nodeSize);a.push({node:h,from:u,to:f})});let l=s-r,c=a.filter(h=>o?o.name===h.node.type.name:!0).filter(h=>zh(h.node.attrs,n,{strict:!1}));return i?!!c.length:c.reduce((h,d)=>h+d.to-d.from,0)>=l}var eN=(t,e={})=>({state:n,dispatch:r})=>Tr(n,Pt(t,n.schema),e)?T1(n,r):!1,tN=()=>({state:t,dispatch:e})=>Pm(t,e),nN=t=>({state:e,dispatch:n})=>{let r=Pt(t,e.schema);return R1(r)(e,n)},rN=()=>({state:t,dispatch:e})=>Cm(t,e);function Bh(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function K_(t,e){let n=typeof e=="string"?[e]:e;return Object.keys(t).reduce((r,s)=>(n.includes(s)||(r[s]=t[s]),r),{})}var sN=(t,e)=>({tr:n,state:r,dispatch:s})=>{let i=null,o=null,a=Bh(typeof t=="string"?t:t.name,r.schema);if(!a)return!1;a==="node"&&(i=Pt(t,r.schema)),a==="mark"&&(o=ns(t,r.schema));let l=!1;return n.selection.ranges.forEach(c=>{r.doc.nodesBetween(c.$from.pos,c.$to.pos,(h,d)=>{i&&i===h.type&&(l=!0,s&&n.setNodeMarkup(d,void 0,K_(h.attrs,e))),o&&h.marks.length&&h.marks.forEach(u=>{o===u.type&&(l=!0,s&&n.addMark(d,d+h.nodeSize,o.create(K_(u.attrs,e))))})})}),l},iN=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),oN=()=>({tr:t,dispatch:e})=>{if(e){let n=new hn(t.doc);t.setSelection(n)}return!0},aN=()=>({state:t,dispatch:e})=>wm(t,e),lN=()=>({state:t,dispatch:e})=>_m(t,e),cN=()=>({state:t,dispatch:e})=>E1(t,e),hN=()=>({state:t,dispatch:e})=>Mm(t,e),dN=()=>({state:t,dispatch:e})=>Dm(t,e);function bg(t,e,n={},r={}){return qo(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var uN=(t,{errorOnInvalidContent:e,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:s,tr:i,dispatch:o,commands:a})=>{let{doc:l}=i;if(r.preserveWhitespace!=="full"){let c=bg(t,s.schema,r,{errorOnInvalidContent:e??s.options.enableContentCheck});if(o){let h=hS(c)?c.content:[c];i.replaceWith(0,l.content.size,h).setMeta("preventUpdate",!n)}return!0}return o&&i.setMeta("preventUpdate",!n),a.insertContentAt({from:0,to:l.content.size},t,{parseOptions:r,errorOnInvalidContent:e??s.options.enableContentCheck})};function fS(t,e){let n=ns(e,t.schema),{from:r,to:s,empty:i}=t.selection,o=[];i?(t.storedMarks&&o.push(...t.storedMarks),o.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,s,l=>{o.push(...l.marks)});let a=o.find(l=>l.type.name===n.name);return a?{...a.attrs}:{}}function xg(t,e){let n=new Ns(t);return e.forEach(r=>{r.steps.forEach(s=>{n.step(s)})}),n}function mS(t,e,n){let r=[];return t.nodesBetween(e.from,e.to,(s,i)=>{n(s)&&r.push({node:s,pos:i})}),r}function Go(t,e){for(let n=t.depth;n>0;n-=1){let r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}}function Hh(t){return e=>Go(e.$from,t)}function pe(t,e,n){return t.config[e]===void 0&&t.parent?pe(t.parent,e,n):typeof t.config[e]=="function"?t.config[e].bind({...n,parent:t.parent?pe(t.parent,e,n):null}):t.config[e]}function Tl(t){return t.map(e=>{let n=pe(e,"addExtensions",{name:e.name,options:e.options,storage:e.storage});return n?[e,...Tl(n())]:e}).flat(10)}function kg(t,e){let n=qr.fromSchema(e).serializeFragment(t),r=document.implementation.createHTMLDocument().createElement("div");return r.appendChild(n),r.innerHTML}function gS(t){return typeof t=="function"}function Ve(t,e=void 0,...n){return gS(t)?e?t.bind(e)(...n):t(...n):t}function pN(t={}){return Object.keys(t).length===0&&t.constructor===Object}function Ko(t){return{baseExtensions:t.filter(e=>e.type==="extension"),nodeExtensions:t.filter(e=>e.type==="node"),markExtensions:t.filter(e=>e.type==="mark")}}function bS(t){let e=[],{nodeExtensions:n,markExtensions:r}=Ko(t),s=[...n,...r],i={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},o=n.filter(c=>c.name!=="text").map(c=>c.name),a=r.map(c=>c.name),l=[...o,...a];return t.forEach(c=>{let h=pe(c,"addGlobalAttributes",{name:c.name,options:c.options,storage:c.storage,extensions:s});h&&h().forEach(d=>{let u;Array.isArray(d.types)?u=d.types:d.types==="*"?u=l:d.types==="nodes"?u=o:d.types==="marks"?u=a:u=[],u.forEach(f=>{Object.entries(d.attributes).forEach(([p,m])=>{e.push({type:f,name:p,attribute:{...i,...m}})})})})}),s.forEach(c=>{let h=pe(c,"addAttributes",{name:c.name,options:c.options,storage:c.storage});if(!h)return;let d=h();Object.entries(d).forEach(([u,f])=>{let p={...i,...f};typeof p?.default=="function"&&(p.default=p.default()),p?.isRequired&&p?.default===void 0&&delete p.default,e.push({type:c.name,name:u,attribute:p})})}),e}function fN(t){let e=[],n="",r=!1,s=!1,i=0,o=t.length;for(let a=0;a<o;a+=1){let l=t[a];if(l==="'"&&!s){r=!r,n+=l;continue}if(l==='"'&&!r){s=!s,n+=l;continue}if(!r&&!s){if(l==="("){i+=1,n+=l;continue}if(l===")"&&i>0){i-=1,n+=l;continue}if(l===";"&&i===0){e.push(n),n="";continue}}n+=l}return n&&e.push(n),e}function G_(t){let e=[],n=fN(t||""),r=n.length;for(let s=0;s<r;s+=1){let i=n[s],o=i.indexOf(":");if(o===-1)continue;let a=i.slice(0,o).trim(),l=i.slice(o+1).trim();a&&l&&e.push([a,l])}return e}function Ie(...t){return t.filter(e=>!!e).reduce((e,n)=>{let r={...e};return Object.entries(n).forEach(([s,i])=>{if(s==="__proto__"){Object.defineProperty(r,s,{configurable:!0,enumerable:!0,value:i,writable:!0});return}if(!r[s]){r[s]=i;return}if(s==="class"){let o=i?String(i).split(" "):[],a=r[s]?r[s].split(" "):[],l=o.filter(c=>!a.includes(c));r[s]=[...a,...l].join(" ")}else if(s==="style"){let o=new Map([...G_(r[s]),...G_(i)]);r[s]=Array.from(o.entries()).map(([a,l])=>`${a}: ${l}`).join("; ")}else r[s]=i}),r},{})}function Ws(t,e){return e.filter(n=>n.type===t.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(t.attrs)||{}:{[n.name]:t.attrs[n.name]}).reduce((n,r)=>Ie(n,r),{})}function mN(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function J_(t,e){return"style"in t?t:{...t,getAttrs:n=>{let r=t.getAttrs?t.getAttrs(n):t.attrs;if(r===!1)return!1;let s=e.reduce((i,o)=>{let a=o.attribute.parseHTML?o.attribute.parseHTML(n):mN(n.getAttribute(o.name));return a==null?i:{...i,[o.name]:a}},{});return{...r,...s}}}}function X_(t){return Object.fromEntries(Object.entries(t).filter(([e,n])=>e==="attrs"&&pN(n)?!1:n!=null))}function Y_(t){var e,n;let r={};return!(!(t==null||(e=t.attribute)===null||e===void 0)&&e.isRequired)&&"default"in(t?.attribute||{})&&(r.default=t.attribute.default),(t==null||(n=t.attribute)===null||n===void 0?void 0:n.validate)!==void 0&&(r.validate=t.attribute.validate),[t.name,r]}function vS(t,e){var n;let r=bS(t),{nodeExtensions:s,markExtensions:i}=Ko(t),o=(n=s.find(c=>pe(c,"topNode")))===null||n===void 0?void 0:n.name,a=Object.fromEntries(s.map(c=>{let h=r.filter(g=>g.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:e},u=X_({...t.reduce((g,b)=>{let v=pe(b,"extendNodeSchema",d);return{...g,...v?v(c):{}}},{}),content:Ve(pe(c,"content",d)),marks:Ve(pe(c,"marks",d)),group:Ve(pe(c,"group",d)),inline:Ve(pe(c,"inline",d)),atom:Ve(pe(c,"atom",d)),selectable:Ve(pe(c,"selectable",d)),draggable:Ve(pe(c,"draggable",d)),code:Ve(pe(c,"code",d)),whitespace:Ve(pe(c,"whitespace",d)),linebreakReplacement:Ve(pe(c,"linebreakReplacement",d)),defining:Ve(pe(c,"defining",d)),isolating:Ve(pe(c,"isolating",d)),attrs:Object.fromEntries(h.map(Y_))}),f=Ve(pe(c,"parseHTML",d));f&&(u.parseDOM=f.map(g=>J_(g,h)));let p=pe(c,"renderHTML",d);p&&(u.toDOM=g=>p({node:g,HTMLAttributes:Ws(g,h)}));let m=pe(c,"renderText",d);return m&&(u.toText=m),[c.name,u]})),l=Object.fromEntries(i.map(c=>{let h=r.filter(m=>m.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:e},u=X_({...t.reduce((m,g)=>{let b=pe(g,"extendMarkSchema",d);return{...m,...b?b(c):{}}},{}),inclusive:Ve(pe(c,"inclusive",d)),excludes:Ve(pe(c,"excludes",d)),group:Ve(pe(c,"group",d)),spanning:Ve(pe(c,"spanning",d)),code:Ve(pe(c,"code",d)),attrs:Object.fromEntries(h.map(Y_))}),f=Ve(pe(c,"parseHTML",d));f&&(u.parseDOM=f.map(m=>J_(m,h)));let p=pe(c,"renderHTML",d);return p&&(u.toDOM=m=>p({mark:m,HTMLAttributes:Ws(m,h)})),[c.name,u]}));return new el({topNode:o,nodes:a,marks:l})}function gN(t){let e=t.filter((n,r)=>t.indexOf(n)!==r);return Array.from(new Set(e))}function Bi(t){return t.sort((n,r)=>{let s=pe(n,"priority")||100,i=pe(r,"priority")||100;return s>i?-1:s<i?1:0})}function _g(t){let e=Bi(Tl(t)),n=gN(e.map(r=>r.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(r=>`'${r}'`).join(", ")}]. This can lead to issues.`),e}function $h(t,e){return vS(_g(t),e)}function yS(t,e){let n=$h(e),r=Sl(t);return Sr.fromSchema(n).parse(r).toJSON()}function wS(t,e,n){let{from:r,to:s}=e,{blockSeparator:i=`
|
|
59
59
|
|
|
60
|
-
`,textSerializers:o={}}=n||{},a="";return t.nodesBetween(r,s,(l,c,h,d)=>{l.isBlock&&c>r&&(a+=i);let u=o?.[l.type.name];if(u)return h&&(a+=u({node:l,pos:c,parent:h,index:d,range:e})),!1;if(l.isText){var f;a+=l==null||(f=l.text)===null||f===void 0?void 0:f.slice(Math.max(r,c)-c,s-c)}}),a}function bN(t,e){return wS(t,{from:0,to:t.content.size},e)}function xS(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}function vN(t,e){let n=Pt(e,t.schema),{from:r,to:s}=t.selection,i=[];t.doc.nodesBetween(r,s,a=>{i.push(a)});let o=i.reverse().find(a=>a.type.name===n.name);return o?{...o.attrs}:{}}function Sg(t,e){let n=Bh(typeof e=="string"?e:e.name,t.schema);return n==="node"?vN(t,e):n==="mark"?fS(t,e):{}}function yN(t,e=JSON.stringify){let n={};return t.filter(r=>{let s=e(r);return Object.prototype.hasOwnProperty.call(n,s)?!1:n[s]=!0})}function wN(t){let e=yN(t);return e.length===1?e:e.filter((n,r)=>!e.filter((s,i)=>i!==r).some(s=>n.oldRange.from>=s.oldRange.from&&n.oldRange.to<=s.oldRange.to&&n.newRange.from>=s.newRange.from&&n.newRange.to<=s.newRange.to))}function Jo(t){let{mapping:e,steps:n}=t,r=[];return e.maps.forEach((s,i)=>{let o=[];if(s.ranges.length)s.forEach((a,l)=>{o.push({from:a,to:l})});else{let{from:a,to:l}=n[i];if(a===void 0||l===void 0)return;o.push({from:a,to:l})}o.forEach(({from:a,to:l})=>{let c=e.slice(i).map(a,-1),h=e.slice(i).map(l),d=e.invert().map(c,-1),u=e.invert().map(h);r.push({oldRange:{from:d,to:u},newRange:{from:c,to:h}})})}),wN(r)}function jh(t,e,n){let r=[];return t===e?n.resolve(t).marks().forEach(s=>{let i=wg(n.resolve(t),s.type);i&&r.push({mark:s,...i})}):n.nodesBetween(t,e,(s,i)=>{!s||s?.nodeSize===void 0||r.push(...s.marks.map(o=>({from:i,to:i+s.nodeSize,mark:o})))}),r}var kS=(t,e,n,r=20)=>{let s=t.doc.resolve(n),i=r,o=null;for(;i>0&&o===null;){let a=s.node(i);a?.type.name===e?o=a:i-=1}return[o,i]},_S=t=>{let e=t.depth-1;if(e<0)return null;let n=t.index(e);return n===0?null:t.node(e).child(n-1)};function jo(t,e){return e.nodes[t]||e.marks[t]||null}function Oh(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{let s=t.find(i=>i.type===e&&i.name===r);return s?s.attribute.keepOnSplit:!1}))}var xN=(t,e=500)=>{let n="",r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(s,i,o,a)=>{var l,c;let h=((l=(c=s.type.spec).toText)===null||l===void 0?void 0:l.call(c,{node:s,pos:i,parent:o,index:a}))||s.textContent||"%leaf%";n+=s.isAtom&&!s.isText?h:h.slice(0,Math.max(0,r-i))}),n};function vg(t,e,n={}){let{empty:r,ranges:s}=t.selection,i=e?ns(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(h=>i?i.name===h.type.name:!0).find(h=>zh(h.attrs,n,{strict:!1}));let o=0,a=[];if(s.forEach(({$from:h,$to:d})=>{let u=h.pos,f=d.pos;t.doc.nodesBetween(u,f,(p,m)=>{if(i&&p.inlineContent&&!p.type.allowsMarkType(i))return!1;if(!p.isText&&!p.marks.length)return;let g=Math.max(u,m),b=Math.min(f,m+p.nodeSize),v=b-g;o+=v,a.push(...p.marks.map(w=>({mark:w,from:g,to:b})))})}),o===0)return!1;let l=a.filter(h=>i?i.name===h.mark.type.name:!0).filter(h=>zh(h.mark.attrs,n,{strict:!1})).reduce((h,d)=>h+d.to-d.from,0),c=a.filter(h=>i?h.mark.type!==i&&h.mark.type.excludes(i):!0).reduce((h,d)=>h+d.to-d.from,0);return(l>0?l+c:l)>=o}function kN(t,e,n={}){if(!e)return Tr(t,null,n)||vg(t,null,n);let r=Bh(e,t.schema);return r==="node"?Tr(t,e,n):r==="mark"?vg(t,e,n):!1}var SS=(t,e)=>{let{$from:n,$to:r,$anchor:s}=t.selection;if(e){let i=Hh(a=>a.type.name===e)(t.selection);if(!i)return!1;let o=t.doc.resolve(i.pos+1);return s.pos+1===o.end()}return!(r.parentOffset<r.parent.nodeSize-2||n.pos!==r.pos)},CS=t=>{let{$from:e,$to:n}=t.selection;return!(e.parentOffset>0||e.pos!==n.pos)};function Q_(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}function pg(t,e){let{nodeExtensions:n}=Ko(e),r=n.find(i=>i.name===t);if(!r)return!1;let s=Ve(pe(r,"group",{name:r.name,options:r.options,storage:r.storage}));return typeof s!="string"?!1:s.split(" ").includes("list")}function Xo(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){if(n){if(t.type.name==="hardBreak")return!0;if(t.isText){var r;return!/\S/.test((r=t.text)!==null&&r!==void 0?r:"")}}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let s=!0;return t.content.forEach(i=>{s!==!1&&(Xo(i,{ignoreWhitespace:n,checkChildren:e})||(s=!1))}),s}return!1}function Vh(t){return t instanceof we}var TS=class ES{constructor(e){this.position=e}static fromJSON(e){return new ES(e.position)}toJSON(){return{position:this.position}}};function _N(t,e){let n=e.mapping.mapResult(t.position);return{position:new TS(n.pos),mapResult:n}}function SN(t){return new TS(t)}function CN(t,e,n){let{selection:r}=e,s=null;if(aS(r)&&(s=r.$cursor),s){var i;let a=(i=t.storedMarks)!==null&&i!==void 0?i:s.marks();return s.parent.type.allowsMarkType(n)&&(!!n.isInSet(a)||!a.some(l=>l.type.excludes(n)))}let{ranges:o}=r;return o.some(({$from:a,$to:l})=>{let c=a.depth===0?t.doc.inlineContent&&t.doc.type.allowsMarkType(n):!1;return t.doc.nodesBetween(a.pos,l.pos,(h,d,u)=>{if(c)return!1;if(h.isInline){let f=!u||u.type.allowsMarkType(n),p=!!n.isInSet(h.marks)||!h.marks.some(m=>m.type.excludes(n));c=f&&p}return!c}),c})}var TN=(t,e={})=>({tr:n,state:r,dispatch:s})=>{let{selection:i}=n,{empty:o,ranges:a}=i,l=ns(t,r.schema);if(s)if(o){let c=fS(r,l);n.addStoredMark(l.create({...c,...e}))}else a.forEach(c=>{let h=c.$from.pos,d=c.$to.pos;r.doc.nodesBetween(h,d,(u,f)=>{let p=Math.max(f,h),m=Math.min(f+u.nodeSize,d);u.marks.find(g=>g.type===l)?u.marks.forEach(g=>{l===g.type&&n.addMark(p,m,l.create({...g.attrs,...e}))}):n.addMark(p,m,l.create(e))})});return CN(r,n,l)},EN=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),AN=(t,e={})=>({state:n,dispatch:r,chain:s})=>{let i=Pt(t,n.schema),o;return n.selection.$anchor.sameParent(n.selection.$head)&&(o=n.selection.$anchor.parent.attrs),i.isTextblock?s().command(({commands:a})=>Rm(i,{...o,...e})(n)?!0:a.clearNodes()).command(({state:a})=>Rm(i,{...o,...e})(a,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},PN=t=>({tr:e,dispatch:n})=>{if(n){let{doc:r}=e,s=Fi(t,0,r.content.size),i=we.create(r,s);e.setSelection(i)}return!0},DN=(t,e)=>({tr:n,state:r,dispatch:s})=>{let{selection:i}=r,o,a;return typeof e=="number"?(o=e,a=e):e&&"from"in e&&"to"in e?(o=e.from,a=e.to):(o=i.from,a=i.to),s&&n.doc.nodesBetween(o,a,(l,c)=>{l.isText||n.setNodeMarkup(c,void 0,{...l.attrs,dir:t})}),!0},MN=t=>({tr:e,dispatch:n})=>{if(n){let{doc:r}=e,{from:s,to:i}=typeof t=="number"?{from:t,to:t}:t,o=me.atStart(r).from,a=me.atEnd(r).to,l=Fi(s,o,a),c=Fi(i,o,a),h=me.create(r,l,c);e.setSelection(h)}return!0},RN=t=>({state:e,dispatch:n})=>{let r=Pt(t,e.schema);return I1(r)(e,n)};function Z_(t,e){let n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){let r=n.filter(s=>e?.includes(s.type.name));t.tr.ensureMarks(r)}}var IN=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:s})=>{let{selection:i,doc:o}=e,{$from:a,$to:l}=i,c=s.extensionManager.attributes,h=Oh(c,a.node().type.name,a.node().attrs);if(i instanceof we&&i.node.isBlock)return!a.parentOffset||!Wn(o,a.pos)?!1:(r&&(t&&Z_(n,s.extensionManager.splittableMarks),e.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;let d=l.parentOffset===l.parent.content.size,u=a.depth===0?void 0:uS(a.node(-1).contentMatchAt(a.indexAfter(-1))),f=d&&u?[{type:u,attrs:h}]:void 0,p=Wn(e.doc,e.mapping.map(a.pos),1,f);if(!f&&!p&&Wn(e.doc,e.mapping.map(a.pos),1,u?[{type:u}]:void 0)&&(p=!0,f=u?[{type:u,attrs:h}]:void 0),r){if(p&&(i instanceof me&&e.deleteSelection(),e.split(e.mapping.map(a.pos),1,f),u&&!d&&!a.parentOffset&&a.parent.type!==u)){let m=e.mapping.map(a.before()),g=e.doc.resolve(m);a.node(-1).canReplaceWith(g.index(),g.index()+1,u)&&e.setNodeMarkup(e.mapping.map(a.before()),u)}t&&Z_(n,s.extensionManager.splittableMarks),e.scrollIntoView()}return p},LN=(t,e={})=>({tr:n,state:r,dispatch:s,editor:i})=>{let o=Pt(t,r.schema),{$from:a,$to:l}=r.selection,c=r.selection.node;if(c&&c.isBlock||a.depth<2||!a.sameParent(l))return!1;let h=a.node(-1);if(h.type!==o)return!1;let d=i.extensionManager.attributes;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==o||a.index(-2)!==a.node(-2).childCount-1)return!1;if(s){var u;let b=Q.empty,v=a.index(-1)?1:a.index(-2)?2:3;for(let C=a.depth-v;C>=a.depth-3;C-=1)b=Q.from(a.node(C).copy(b));let w=a.indexAfter(-1)<a.node(-2).childCount?1:a.indexAfter(-2)<a.node(-3).childCount?2:3,x={...Oh(d,a.node().type.name,a.node().attrs),...e},_=((u=o.contentMatch.defaultType)===null||u===void 0?void 0:u.createAndFill(x))||void 0;b=b.append(Q.from(o.createAndFill(null,_)||void 0));let k=a.before(a.depth-(v-1));n.replace(k,a.after(-w),new ae(b,4-v,0));let S=-1;n.doc.nodesBetween(k,n.doc.content.size,(C,T)=>{if(S>-1)return!1;C.isTextblock&&C.content.size===0&&(S=T+1)}),S>-1&&n.setSelection(me.near(n.doc.resolve(S))),n.scrollIntoView()}return!0}let f=l.pos===a.end()?h.contentMatchAt(0).defaultType:null,p={...Oh(d,h.type.name,h.attrs),...e},m={...Oh(d,a.node().type.name,a.node().attrs),...e};n.delete(a.pos,l.pos);let g=f?[{type:o,attrs:p},{type:f,attrs:m}]:[{type:o,attrs:p}];if(!Wn(n.doc,a.pos,2))return!1;if(s){let{selection:b,storedMarks:v}=r,{splittableMarks:w}=i.extensionManager,x=v||b.$to.parentOffset&&b.$from.marks();if(n.split(a.pos,2,g).scrollIntoView(),!x||!s)return!0;let _=x.filter(k=>w.includes(k.type.name));n.ensureMarks(_)}return!0};function eS(t){return!t||t==="1"?null:t}function AS(t,e){return eS(t)===eS(e)}var fg=(t,e)=>{let n=Hh(i=>i.type===e)(t.selection);if(!n)return!0;let r=t.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;let s=t.doc.nodeAt(r);return!(n.node.type===s?.type&&or(t.doc,n.pos))||!AS(n.node.attrs.type,s?.attrs.type)||t.join(n.pos),!0},mg=(t,e)=>{let n=Hh(i=>i.type===e)(t.selection);if(!n)return!0;let r=t.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;let s=t.doc.nodeAt(r);return!(n.node.type===s?.type&&or(t.doc,r))||!AS(n.node.attrs.type,s?.attrs.type)||t.join(r),!0};function ON(t){let e=t.doc,n=e.firstChild;if(!n)return null;let r=e.resolve(1),s=e.resolve(n.nodeSize-1);return me.between(r,s)}var zN=(t,e,n,r={})=>({editor:s,tr:i,state:o,dispatch:a,chain:l,commands:c,can:h})=>{let{extensions:d,splittableMarks:u}=s.extensionManager,f=Pt(t,o.schema),p=Pt(e,o.schema),{selection:m,storedMarks:g}=o,{$from:b,$to:v}=m,w=b.blockRange(v),x=g||m.$to.parentOffset&&m.$from.marks();if(!w)return!1;let _=Hh(N=>pg(N.type.name,d))(m),k=m.from===0&&m.to===o.doc.content.size,S=o.doc.content.content,C=S.length===1?S[0]:null,T=k&&C&&pg(C.type.name,d)?{node:C,pos:0,depth:0}:null,E=_??T,M=!!_&&w.depth>=1&&w.depth-_.depth<=1,z=!!T;if((M||z)&&E){if(E.node.type===f)return k&&z?l().command(({tr:N,dispatch:$})=>{let F=ON(N);return F?(N.setSelection(F),$&&$(N),!0):!1}).liftListItem(p).run():c.liftListItem(p);if(pg(E.node.type.name,d)&&f.validContent(E.node.content))return l().command(()=>(i.setNodeMarkup(E.pos,f),!0)).command(()=>fg(i,f)).command(()=>mg(i,f)).run()}return!n||!x||!a?l().command(()=>h().wrapInList(f,r)?!0:c.clearNodes()).wrapInList(f,r).command(()=>fg(i,f)).command(()=>mg(i,f)).run():l().command(()=>{let N=h().wrapInList(f,r),$=x.filter(F=>u.includes(F.type.name));return i.ensureMarks($),N?!0:c.clearNodes()}).wrapInList(f,r).command(()=>fg(i,f)).command(()=>mg(i,f)).run()},NN=(t,e={},n={})=>({state:r,commands:s})=>{let{extendEmptyMarkRange:i=!1}=n,o=ns(t,r.schema);return vg(r,o,e)?s.unsetMark(o,{extendEmptyMarkRange:i}):s.setMark(o,e)},FN=(t,e,n={})=>({state:r,commands:s})=>{let i=Pt(t,r.schema),o=Pt(e,r.schema),a=Tr(r,i,n),l;return r.selection.$anchor.sameParent(r.selection.$head)&&(l=r.selection.$anchor.parent.attrs),a?s.setNode(o,l):s.setNode(i,{...l,...n})},BN=(t,e={})=>({state:n,commands:r})=>{let s=Pt(t,n.schema);return Tr(n,s,e)?r.lift(s):r.wrapIn(s,e)},HN=()=>({state:t,dispatch:e})=>{let n=t.plugins;for(let r=0;r<n.length;r+=1){let s=n[r],i;if(s.spec.isInputRules&&(i=s.getState(t))){if(e){let o=t.tr,a=i.transform;for(let l=a.steps.length-1;l>=0;l-=1)o.step(a.steps[l].invert(a.docs[l]));if(i.text){let l=o.doc.resolve(i.from).marks();o.replaceWith(i.from,i.to,t.schema.text(i.text,l))}else o.delete(i.from,i.to)}return!0}}return!1},$N=(t={})=>({tr:e,dispatch:n,editor:r})=>{let{ignoreClearable:s=!1}=t,{selection:i}=e,{empty:o,ranges:a}=i;if(o)return!0;let{nonClearableMarks:l}=r.extensionManager;if(n){let c=Object.values(r.schema.marks).filter(h=>s||!l.includes(h.name));a.forEach(h=>{for(let d of c)e.removeMark(h.$from.pos,h.$to.pos,d)})}return!0},jN=(t,e={})=>({tr:n,state:r,dispatch:s})=>{let{extendEmptyMarkRange:i=!1}=e,{selection:o}=n,a=ns(t,r.schema),{$from:l,empty:c,ranges:h}=o;if(!s)return!0;if(c&&i){var d;let{from:u,to:f}=o,p=wg(l,a,(d=l.marks().find(m=>m.type===a))===null||d===void 0?void 0:d.attrs);p&&(u=p.from,f=p.to),n.removeMark(u,f,a)}else h.forEach(u=>{n.removeMark(u.$from.pos,u.$to.pos,a)});return n.removeStoredMark(a),!0},VN=t=>({tr:e,state:n,dispatch:r})=>{let{selection:s}=n,i,o;return typeof t=="number"?(i=t,o=t):t&&"from"in t&&"to"in t?(i=t.from,o=t.to):(i=s.from,o=s.to),r&&e.doc.nodesBetween(i,o,(a,l)=>{if(a.isText)return;let c={...a.attrs};delete c.dir,e.setNodeMarkup(l,void 0,c)}),!0},WN=(t,e={})=>({tr:n,state:r,dispatch:s})=>{let i=null,o=null,a=Bh(typeof t=="string"?t:t.name,r.schema);if(!a)return!1;a==="node"&&(i=Pt(t,r.schema)),a==="mark"&&(o=ns(t,r.schema));let l=!1;return n.selection.ranges.forEach(c=>{let h=c.$from.pos,d=c.$to.pos,u,f,p,m;n.selection.empty?r.doc.nodesBetween(h,d,(g,b)=>{i&&i===g.type&&(l=!0,p=Math.max(b,h),m=Math.min(b+g.nodeSize,d),u=b,f=g)}):r.doc.nodesBetween(h,d,(g,b)=>{b<h&&i&&i===g.type&&(l=!0,p=Math.max(b,h),m=Math.min(b+g.nodeSize,d),u=b,f=g),b>=h&&b<=d&&(i&&i===g.type&&(l=!0,s&&n.setNodeMarkup(b,void 0,{...g.attrs,...e})),o&&g.marks.length&&g.marks.forEach(v=>{if(o===v.type&&(l=!0,s)){let w=Math.max(b,h),x=Math.min(b+g.nodeSize,d);n.addMark(w,x,o.create({...v.attrs,...e}))}}))}),f&&(u!==void 0&&s&&n.setNodeMarkup(u,void 0,{...f.attrs,...e}),o&&f.marks.length&&f.marks.forEach(g=>{o===g.type&&s&&n.addMark(p,m,o.create({...g.attrs,...e}))}))}),l},Vo=new Xe("__tiptap_decorations__"),UN=t=>({tr:e,dispatch:n})=>(n&&e.setMeta(Vo,{type:"force",name:t}),!0),qN=(t,e={})=>({state:n,dispatch:r})=>{let s=Pt(t,n.schema);return D1(s,e)(n,r)},KN=(t,e={})=>({state:n,dispatch:r})=>{let s=Pt(t,n.schema);return M1(s,e)(n,r)},lr=yk({blur:()=>kz,clearContent:()=>_z,clearNodes:()=>Sz,command:()=>Cz,createParagraphNear:()=>Tz,cut:()=>Ez,deleteCurrentNode:()=>Az,deleteNode:()=>Pz,deleteRange:()=>Dz,deleteSelection:()=>Iz,enter:()=>Lz,exitCode:()=>Oz,extendMarkRange:()=>zz,first:()=>Nz,focus:()=>Bz,forEach:()=>Hz,insertContent:()=>$z,insertContentAt:()=>jz,insertDefaultBlock:()=>Vz,joinBackward:()=>qz,joinDown:()=>Uz,joinForward:()=>Kz,joinItemBackward:()=>Gz,joinItemForward:()=>Jz,joinTextblockBackward:()=>Xz,joinTextblockForward:()=>Yz,joinUp:()=>Wz,keyboardShortcut:()=>Zz,lift:()=>eN,liftEmptyBlock:()=>tN,liftListItem:()=>nN,newlineInCode:()=>rN,resetAttributes:()=>sN,scrollIntoView:()=>iN,selectAll:()=>oN,selectNodeBackward:()=>aN,selectNodeForward:()=>lN,selectParentNode:()=>cN,selectTextblockEnd:()=>hN,selectTextblockStart:()=>dN,setContent:()=>uN,setMark:()=>TN,setMeta:()=>EN,setNode:()=>AN,setNodeSelection:()=>PN,setTextDirection:()=>DN,setTextSelection:()=>MN,sinkListItem:()=>RN,splitBlock:()=>IN,splitListItem:()=>LN,toggleList:()=>zN,toggleMark:()=>NN,toggleNode:()=>FN,toggleWrap:()=>BN,undoInputRule:()=>HN,unsetAllMarks:()=>$N,unsetMark:()=>jN,unsetTextDirection:()=>VN,updateAttributes:()=>WN,updateDecorations:()=>UN,wrapIn:()=>qN,wrapInList:()=>KN}),Wo=new WeakMap;function GN(t,e){var n;Wo.set(t,((n=Wo.get(t))!==null&&n!==void 0?n:0)+1);try{return e()}finally{var r;let s=((r=Wo.get(t))!==null&&r!==void 0?r:1)-1;s>0?Wo.set(t,s):Wo.delete(t)}}function JN(t){return Wo.has(t)}var XN=class{constructor(){this.callbacks={}}on(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}emit(t,...e){let n=this.callbacks[t];return n&&n.forEach(r=>r.apply(this,e)),this}off(t,e){let n=this.callbacks[t];return n&&(e?this.callbacks[t]=n.filter(r=>r!==e):delete this.callbacks[t]),this}once(t,e){let n=(...r)=>{this.off(t,n),e.apply(this,r)};return this.on(t,n)}removeAllListeners(){this.callbacks={}}},PS=typeof process<"u"&&!1;function YN(t){return t.kind==="widget"}function DS(t,e){let n=[],r=new Set;for(let s of t)s.kind==="widget"&&YN(s)&&r.add(s.key),n.push(s.toPMDecoration(e));return{decorations:n,widgetKeys:r}}function QN(t,e,n){let{decorations:r,widgetKeys:s}=DS(e,n);return{set:Je.create(t,r),widgetKeys:s}}function MS({position:t,from:e,to:n,docSize:r}){return t<e?!1:t<n?!0:t===n&&n===r}function ZN({decorations:t,from:e,to:n,docSize:r,extensionName:s,warnedExtensions:i}){return t.filter(o=>MS({position:o.anchor,from:e,to:n,docSize:r})?!0:(o.anchor===n||i.has(s)||(i.add(s),console.warn(`[tiptap warn]: Extension "${s}" returned a decoration outside the requested range [${e}, ${n}). It was ignored.`)),!1))}function RS(t){var e;let n=(e=t.spec)===null||e===void 0?void 0:e.key;return typeof n=="string"?n:void 0}function e3(t){let e=new Map,n=new Map;for(let o of t.find()){var r,s,i;let a=RS(o);if(!a)continue;let l=(r=o.spec.extensionName)!==null&&r!==void 0?r:"unknown",c=(s=e.get(a))!==null&&s!==void 0?s:new Set;c.add(l),e.set(a,c),n.set(a,((i=n.get(a))!==null&&i!==void 0?i:0)+1)}return Array.from(e,([o,a])=>({key:o,extensions:a})).filter(({key:o})=>{var a;return((a=n.get(o))!==null&&a!==void 0?a:0)>1})}function IS(t){return t.jsonID==="attr"}function t3(t){let e=!1;if(t.getMap().forEach(()=>{e=!0}),e||IS(t))return!0;let n=t;return typeof n.from=="number"&&typeof n.to=="number"}function n3(t,e){let n=null,r=0,s=0;for(let i=0;i<t.childCount&&!(s>e.to);i+=1){let o=s+t.child(i).nodeSize;o>=e.from&&(n===null&&(n=s),r=o),s=o}return n===null?null:{from:n,to:r}}function r3(t,e){if(t.steps.some(i=>!t3(i)))return{type:"full"};let n=Jo(t).map(({newRange:i})=>i);t.steps.forEach((i,o)=>{if(!IS(i))return;let a=t.mapping.slice(o);n.push({from:a.map(i.pos,-1),to:a.map(i.pos+1)})});let r=[];for(let i of n){let o=n3(e,i);o&&r.push(o)}r.sort((i,o)=>i.from-o.from);let s=[];for(let i of r){let o=s[s.length-1];o&&i.from<=o.to?o.to=Math.max(o.to,i.to):s.push({...i})}return{type:"ranges",ranges:s}}function LS(t,e,n,r){return t.map(e,n,{onRemove:s=>{let i=s?.key;typeof i=="string"&&r.delete(i)}})}function s3(t,e,n){var r,s;let i=(r=e.decorationSetsByExtension[t])!==null&&r!==void 0?r:Je.empty,o=new Set((s=e.widgetKeysByExtension[t])!==null&&s!==void 0?s:[]);return{set:LS(i,n.mapping,n.doc,o),widgetKeys:o}}function tS(t,e){let n=Object.values(e).flatMap(r=>r.find());return Je.create(t,n)}function nS(t){let e=new Set;for(let n of Object.values(t))for(let r of n)e.add(r);return e}function i3(t,e){var n;switch((n=e.update)!==null&&n!==void 0?n:"document"){case"document":if(e.createInRange)throw new Error(`[tiptap error]: Extension "${t}" provides createInRange() but does not use the "changedRanges" decoration update strategy.`);return;case"changedRanges":if(!e.createInRange)throw new Error(`[tiptap error]: Extension "${t}" uses the "changedRanges" decoration update strategy but does not provide createInRange().`);return;case"manual":if(e.createInRange)throw new Error(`[tiptap error]: Extension "${t}" uses the "manual" decoration update strategy, which is not compatible with createInRange(). createInRange() requires the "changedRanges" strategy.`);if(e.shouldUpdate)throw new Error(`[tiptap error]: Extension "${t}" cannot combine the "manual" decoration update strategy with shouldUpdate().`);return;default:throw new Error(`[tiptap error]: Extension "${t}" uses an unknown decoration update strategy. Expected "document", "changedRanges", or "manual".`)}}function o3(t,e,n){return n?!0:t.update==="manual"?!1:t.shouldUpdate?t.shouldUpdate(e):e.tr.docChanged}var a3=new Set;var l3=class{constructor(t){this.warnedWidgetKeys=new Set,this.warnedOutOfRangeExtensions=new Set,this.handleBeforeTransaction=({nextState:e})=>{let n=Vo.getState(e);n&&this.warnDuplicateWidgetKeys(n)},this.editor=t.editor,this.entries=this.resolveEntries(t.entries),this.entries.forEach(({name:e,spec:n})=>i3(e,n)),this.plugin=this.entries.length>0?this.createPlugin():null,this.editor.on("beforeTransaction",this.handleBeforeTransaction)}destroy(){this.editor.off("beforeTransaction",this.handleBeforeTransaction)}liveWidgetKeys(){var t,e;return(t=(e=Vo.getState(this.editor.state))===null||e===void 0?void 0:e.widgetKeys)!==null&&t!==void 0?t:a3}get mountedView(){return this.editor.isDestroyed?null:this.editor.view}resolveEntries(t){let e=[];for(let{name:n,addDecorations:r}of t){let s=r();s&&e.push({name:n,spec:s})}return e}createPlugin(){let{editor:t,entries:e}=this;return new Oe({key:Vo,state:{init:(n,r)=>{let s={},i={};for(let{name:a,spec:l}of e){let{set:c,widgetKeys:h}=this.buildFullSet(a,l,r);s[a]=c,i[a]=h}let o={decorationSetsByExtension:s,widgetKeysByExtension:i,mergedDecorationSet:this.buildMergedSet(r.doc,s),widgetKeys:nS(i)};return this.warnDuplicateWidgetKeys(o),o},apply:(n,r,s,i)=>{let o=n.getMeta(Vo),a=o?.type==="force"&&!o.name,l=o?.type==="force"?o.name:void 0,c={},h={},d=new Set;return GN(t,()=>{for(let{name:u,spec:f}of e){let p=a||l===u;if(o3(f,{editor:t,tr:n,oldState:s,newState:i},p))if(f.update==="changedRanges"&&n.docChanged&&!p){let m=this.applyChangedRangesRecompute(u,f,r,n,i);c[u]=m.set,h[u]=m.widgetKeys,d.add(u)}else{let{set:m,widgetKeys:g}=this.buildFullSet(u,f,i);c[u]=m,h[u]=g,d.add(u)}else{let m=s3(u,r,n);c[u]=m.set,h[u]=m.widgetKeys}}}),d.size===0&&!n.docChanged?r:{decorationSetsByExtension:c,widgetKeysByExtension:h,mergedDecorationSet:this.mergeAfterApply({entries:e,previous:r,tr:n,decorationSetsByExtension:c,recomputedNames:d}),widgetKeys:nS(h)}}},props:{decorations(n){var r,s;return(r=(s=Vo.getState(n))===null||s===void 0?void 0:s.mergedDecorationSet)!==null&&r!==void 0?r:Je.empty}}})}applyChangedRangesRecompute(t,e,n,r,s){let i=r3(r,s.doc);return i.type==="full"?this.buildFullSet(t,e,s):this.rebuildRanges(t,e,n,r,s,i.ranges)}rebuildRanges(t,e,n,r,s,i){var o,a;let l=(o=n.decorationSetsByExtension[t])!==null&&o!==void 0?o:Je.empty,c=new Set((a=n.widgetKeysByExtension[t])!==null&&a!==void 0?a:[]),h=LS(l,r.mapping,r.doc,c),d=s.doc.content.size;for(let{from:u,to:f}of i){let p=h.find(u,f).filter(b=>MS({position:b.from,from:u,to:f,docSize:d}));for(let b of p){let v=RS(b);v&&c.delete(v)}h=h.remove(p);let{decorations:m,widgetKeys:g}=DS(ZN({decorations:this.runCreate(t,"createInRange",()=>e.createInRange({editor:this.editor,state:s,view:this.mountedView,from:u,to:f})),from:u,to:f,docSize:d,extensionName:t,warnedExtensions:this.warnedOutOfRangeExtensions}),t);h=h.add(s.doc,m);for(let b of g)c.add(b)}return{set:h,widgetKeys:c}}buildFullSet(t,e,n){let r=this.runCreate(t,"create",()=>e.create({editor:this.editor,state:n,view:this.mountedView}));return QN(n.doc,r,t)}runCreate(t,e,n){try{return n()}catch(r){return console.error(`[tiptap error]: Extension "${t}" threw in \`addDecorations().${e}()\`. Its decorations were dropped for this update.`,r),[]}}warnDuplicateWidgetKeys(t){if(!PS)return;if(t.widgetKeys.size===0){this.warnedWidgetKeys.clear();return}let e=e3(t.mergedDecorationSet),n=new Set(e.map(({key:r})=>r));for(let{key:r,extensions:s}of e){if(this.warnedWidgetKeys.has(r))continue;let i=Array.from(s).map(o=>`"${o}"`).join(", ");console.warn(`[tiptap warn]: Duplicate widget decoration key "${r}" in extension${s.size===1?"":"s"} ${i}. Widget decoration keys must be globally unique, otherwise ProseMirror misplaces the widget DOM. Use a stable, unique key (e.g. \`comment-\${id}\`).`)}this.warnedWidgetKeys=n}buildMergedSet(t,e){let n=Object.keys(e);return n.length===1?e[n[0]]:tS(t,e)}mergeAfterApply({entries:t,previous:e,tr:n,decorationSetsByExtension:r,recomputedNames:s}){return t.length===1?r[t[0].name]:s.size===0?e.mergedDecorationSet.map(n.mapping,n.doc):tS(n.doc,r)}};function Hi(t,e){if(t===e)return!0;if(!t||!e)return!1;let n=Object.keys(t),r=Object.keys(e);return n.length!==r.length?!1:n.every(s=>Object.prototype.hasOwnProperty.call(e,s)&&Object.is(t[s],e[s]))}function OS(t,e){let{selection:n}=t,{$from:r}=n;if(n instanceof we){let i=r.index();return r.parent.canReplaceWith(i,i+1,e)}let s=r.depth;for(;s>=0;){let i=r.index(s);if(r.node(s).contentMatchAt(i).matchType(e))return!0;s-=1}return!1}function c3(t,e,n){let r=document.querySelector(`style[data-tiptap-style${n?`-${n}`:""}]`);if(r!==null)return r;let s=document.createElement("style");return e&&s.setAttribute("nonce",e),s.setAttribute(`data-tiptap-style${n?`-${n}`:""}`,""),s.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(s),s}function Cg(t){return t.replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/&/g,"&")}function zS(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function h3(t){return typeof t=="number"}function d3(t){return Object.prototype.toString.call(t).slice(8,-1)}function Rh(t){return d3(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function Tg(t,e,n){let r=t.split(`
|
|
60
|
+
`,textSerializers:o={}}=n||{},a="";return t.nodesBetween(r,s,(l,c,h,d)=>{l.isBlock&&c>r&&(a+=i);let u=o?.[l.type.name];if(u)return h&&(a+=u({node:l,pos:c,parent:h,index:d,range:e})),!1;if(l.isText){var f;a+=l==null||(f=l.text)===null||f===void 0?void 0:f.slice(Math.max(r,c)-c,s-c)}}),a}function bN(t,e){return wS(t,{from:0,to:t.content.size},e)}function xS(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}function vN(t,e){let n=Pt(e,t.schema),{from:r,to:s}=t.selection,i=[];t.doc.nodesBetween(r,s,a=>{i.push(a)});let o=i.reverse().find(a=>a.type.name===n.name);return o?{...o.attrs}:{}}function Sg(t,e){let n=Bh(typeof e=="string"?e:e.name,t.schema);return n==="node"?vN(t,e):n==="mark"?fS(t,e):{}}function yN(t,e=JSON.stringify){let n={};return t.filter(r=>{let s=e(r);return Object.prototype.hasOwnProperty.call(n,s)?!1:n[s]=!0})}function wN(t){let e=yN(t);return e.length===1?e:e.filter((n,r)=>!e.filter((s,i)=>i!==r).some(s=>n.oldRange.from>=s.oldRange.from&&n.oldRange.to<=s.oldRange.to&&n.newRange.from>=s.newRange.from&&n.newRange.to<=s.newRange.to))}function Jo(t){let{mapping:e,steps:n}=t,r=[];return e.maps.forEach((s,i)=>{let o=[];if(s.ranges.length)s.forEach((a,l)=>{o.push({from:a,to:l})});else{let{from:a,to:l}=n[i];if(a===void 0||l===void 0)return;o.push({from:a,to:l})}o.forEach(({from:a,to:l})=>{let c=e.slice(i).map(a,-1),h=e.slice(i).map(l),d=e.invert().map(c,-1),u=e.invert().map(h);r.push({oldRange:{from:d,to:u},newRange:{from:c,to:h}})})}),wN(r)}function jh(t,e,n){let r=[];return t===e?n.resolve(t).marks().forEach(s=>{let i=wg(n.resolve(t),s.type);i&&r.push({mark:s,...i})}):n.nodesBetween(t,e,(s,i)=>{!s||s?.nodeSize===void 0||r.push(...s.marks.map(o=>({from:i,to:i+s.nodeSize,mark:o})))}),r}var kS=(t,e,n,r=20)=>{let s=t.doc.resolve(n),i=r,o=null;for(;i>0&&o===null;){let a=s.node(i);a?.type.name===e?o=a:i-=1}return[o,i]},_S=t=>{let e=t.depth-1;if(e<0)return null;let n=t.index(e);return n===0?null:t.node(e).child(n-1)};function jo(t,e){return e.nodes[t]||e.marks[t]||null}function Oh(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{let s=t.find(i=>i.type===e&&i.name===r);return s?s.attribute.keepOnSplit:!1}))}var xN=(t,e=500)=>{let n="",r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(s,i,o,a)=>{var l,c;let h=((l=(c=s.type.spec).toText)===null||l===void 0?void 0:l.call(c,{node:s,pos:i,parent:o,index:a}))||s.textContent||"%leaf%";n+=s.isAtom&&!s.isText?h:h.slice(0,Math.max(0,r-i))}),n};function vg(t,e,n={}){let{empty:r,ranges:s}=t.selection,i=e?ns(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(h=>i?i.name===h.type.name:!0).find(h=>zh(h.attrs,n,{strict:!1}));let o=0,a=[];if(s.forEach(({$from:h,$to:d})=>{let u=h.pos,f=d.pos;t.doc.nodesBetween(u,f,(p,m)=>{if(i&&p.inlineContent&&!p.type.allowsMarkType(i))return!1;if(!p.isText&&!p.marks.length)return;let g=Math.max(u,m),b=Math.min(f,m+p.nodeSize),v=b-g;o+=v,a.push(...p.marks.map(w=>({mark:w,from:g,to:b})))})}),o===0)return!1;let l=a.filter(h=>i?i.name===h.mark.type.name:!0).filter(h=>zh(h.mark.attrs,n,{strict:!1})).reduce((h,d)=>h+d.to-d.from,0),c=a.filter(h=>i?h.mark.type!==i&&h.mark.type.excludes(i):!0).reduce((h,d)=>h+d.to-d.from,0);return(l>0?l+c:l)>=o}function kN(t,e,n={}){if(!e)return Tr(t,null,n)||vg(t,null,n);let r=Bh(e,t.schema);return r==="node"?Tr(t,e,n):r==="mark"?vg(t,e,n):!1}var SS=(t,e)=>{let{$from:n,$to:r,$anchor:s}=t.selection;if(e){let i=Hh(a=>a.type.name===e)(t.selection);if(!i)return!1;let o=t.doc.resolve(i.pos+1);return s.pos+1===o.end()}return!(r.parentOffset<r.parent.nodeSize-2||n.pos!==r.pos)},CS=t=>{let{$from:e,$to:n}=t.selection;return!(e.parentOffset>0||e.pos!==n.pos)};function Q_(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}function pg(t,e){let{nodeExtensions:n}=Ko(e),r=n.find(i=>i.name===t);if(!r)return!1;let s=Ve(pe(r,"group",{name:r.name,options:r.options,storage:r.storage}));return typeof s!="string"?!1:s.split(" ").includes("list")}function Xo(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){if(n){if(t.type.name==="hardBreak")return!0;if(t.isText){var r;return!/\S/.test((r=t.text)!==null&&r!==void 0?r:"")}}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let s=!0;return t.content.forEach(i=>{s!==!1&&(Xo(i,{ignoreWhitespace:n,checkChildren:e})||(s=!1))}),s}return!1}function Vh(t){return t instanceof we}var TS=class ES{constructor(e){this.position=e}static fromJSON(e){return new ES(e.position)}toJSON(){return{position:this.position}}};function _N(t,e){let n=e.mapping.mapResult(t.position);return{position:new TS(n.pos),mapResult:n}}function SN(t){return new TS(t)}function CN(t,e,n){let{selection:r}=e,s=null;if(aS(r)&&(s=r.$cursor),s){var i;let a=(i=t.storedMarks)!==null&&i!==void 0?i:s.marks();return s.parent.type.allowsMarkType(n)&&(!!n.isInSet(a)||!a.some(l=>l.type.excludes(n)))}let{ranges:o}=r;return o.some(({$from:a,$to:l})=>{let c=a.depth===0?t.doc.inlineContent&&t.doc.type.allowsMarkType(n):!1;return t.doc.nodesBetween(a.pos,l.pos,(h,d,u)=>{if(c)return!1;if(h.isInline){let f=!u||u.type.allowsMarkType(n),p=!!n.isInSet(h.marks)||!h.marks.some(m=>m.type.excludes(n));c=f&&p}return!c}),c})}var TN=(t,e={})=>({tr:n,state:r,dispatch:s})=>{let{selection:i}=n,{empty:o,ranges:a}=i,l=ns(t,r.schema);if(s)if(o){let c=fS(r,l);n.addStoredMark(l.create({...c,...e}))}else a.forEach(c=>{let h=c.$from.pos,d=c.$to.pos;r.doc.nodesBetween(h,d,(u,f)=>{let p=Math.max(f,h),m=Math.min(f+u.nodeSize,d);u.marks.find(g=>g.type===l)?u.marks.forEach(g=>{l===g.type&&n.addMark(p,m,l.create({...g.attrs,...e}))}):n.addMark(p,m,l.create(e))})});return CN(r,n,l)},EN=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),AN=(t,e={})=>({state:n,dispatch:r,chain:s})=>{let i=Pt(t,n.schema),o;return n.selection.$anchor.sameParent(n.selection.$head)&&(o=n.selection.$anchor.parent.attrs),i.isTextblock?s().command(({commands:a})=>Rm(i,{...o,...e})(n)?!0:a.clearNodes()).command(({state:a})=>Rm(i,{...o,...e})(a,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},PN=t=>({tr:e,dispatch:n})=>{if(n){let{doc:r}=e,s=Fi(t,0,r.content.size),i=we.create(r,s);e.setSelection(i)}return!0},DN=(t,e)=>({tr:n,state:r,dispatch:s})=>{let{selection:i}=r,o,a;return typeof e=="number"?(o=e,a=e):e&&"from"in e&&"to"in e?(o=e.from,a=e.to):(o=i.from,a=i.to),s&&n.doc.nodesBetween(o,a,(l,c)=>{l.isText||n.setNodeMarkup(c,void 0,{...l.attrs,dir:t})}),!0},MN=t=>({tr:e,dispatch:n})=>{if(n){let{doc:r}=e,{from:s,to:i}=typeof t=="number"?{from:t,to:t}:t,o=me.atStart(r).from,a=me.atEnd(r).to,l=Fi(s,o,a),c=Fi(i,o,a),h=me.create(r,l,c);e.setSelection(h)}return!0},RN=t=>({state:e,dispatch:n})=>{let r=Pt(t,e.schema);return I1(r)(e,n)};function Z_(t,e){let n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){let r=n.filter(s=>e?.includes(s.type.name));t.tr.ensureMarks(r)}}var IN=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:s})=>{let{selection:i,doc:o}=e,{$from:a,$to:l}=i,c=s.extensionManager.attributes,h=Oh(c,a.node().type.name,a.node().attrs);if(i instanceof we&&i.node.isBlock)return!a.parentOffset||!Wn(o,a.pos)?!1:(r&&(t&&Z_(n,s.extensionManager.splittableMarks),e.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;let d=l.parentOffset===l.parent.content.size,u=a.depth===0?void 0:uS(a.node(-1).contentMatchAt(a.indexAfter(-1))),f=d&&u?[{type:u,attrs:h}]:void 0,p=Wn(e.doc,e.mapping.map(a.pos),1,f);if(!f&&!p&&Wn(e.doc,e.mapping.map(a.pos),1,u?[{type:u}]:void 0)&&(p=!0,f=u?[{type:u,attrs:h}]:void 0),r){if(p&&(i instanceof me&&e.deleteSelection(),e.split(e.mapping.map(a.pos),1,f),u&&!d&&!a.parentOffset&&a.parent.type!==u)){let m=e.mapping.map(a.before()),g=e.doc.resolve(m);a.node(-1).canReplaceWith(g.index(),g.index()+1,u)&&e.setNodeMarkup(e.mapping.map(a.before()),u)}t&&Z_(n,s.extensionManager.splittableMarks),e.scrollIntoView()}return p},LN=(t,e={})=>({tr:n,state:r,dispatch:s,editor:i})=>{let o=Pt(t,r.schema),{$from:a,$to:l}=r.selection,c=r.selection.node;if(c&&c.isBlock||a.depth<2||!a.sameParent(l))return!1;let h=a.node(-1);if(h.type!==o)return!1;let d=i.extensionManager.attributes;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==o||a.index(-2)!==a.node(-2).childCount-1)return!1;if(s){var u;let b=Q.empty,v=a.index(-1)?1:a.index(-2)?2:3;for(let C=a.depth-v;C>=a.depth-3;C-=1)b=Q.from(a.node(C).copy(b));let w=a.indexAfter(-1)<a.node(-2).childCount?1:a.indexAfter(-2)<a.node(-3).childCount?2:3,x={...Oh(d,a.node().type.name,a.node().attrs),...e},_=((u=o.contentMatch.defaultType)===null||u===void 0?void 0:u.createAndFill(x))||void 0;b=b.append(Q.from(o.createAndFill(null,_)||void 0));let k=a.before(a.depth-(v-1));n.replace(k,a.after(-w),new ae(b,4-v,0));let S=-1;n.doc.nodesBetween(k,n.doc.content.size,(C,T)=>{if(S>-1)return!1;C.isTextblock&&C.content.size===0&&(S=T+1)}),S>-1&&n.setSelection(me.near(n.doc.resolve(S))),n.scrollIntoView()}return!0}let f=l.pos===a.end()?h.contentMatchAt(0).defaultType:null,p={...Oh(d,h.type.name,h.attrs),...e},m={...Oh(d,a.node().type.name,a.node().attrs),...e};n.delete(a.pos,l.pos);let g=f?[{type:o,attrs:p},{type:f,attrs:m}]:[{type:o,attrs:p}];if(!Wn(n.doc,a.pos,2))return!1;if(s){let{selection:b,storedMarks:v}=r,{splittableMarks:w}=i.extensionManager,x=v||b.$to.parentOffset&&b.$from.marks();if(n.split(a.pos,2,g).scrollIntoView(),!x||!s)return!0;let _=x.filter(k=>w.includes(k.type.name));n.ensureMarks(_)}return!0};function eS(t){return!t||t==="1"?null:t}function AS(t,e){return eS(t)===eS(e)}var fg=(t,e)=>{let n=Hh(i=>i.type===e)(t.selection);if(!n)return!0;let r=t.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;let s=t.doc.nodeAt(r);return!(n.node.type===s?.type&&or(t.doc,n.pos))||!AS(n.node.attrs.type,s?.attrs.type)||t.join(n.pos),!0},mg=(t,e)=>{let n=Hh(i=>i.type===e)(t.selection);if(!n)return!0;let r=t.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;let s=t.doc.nodeAt(r);return!(n.node.type===s?.type&&or(t.doc,r))||!AS(n.node.attrs.type,s?.attrs.type)||t.join(r),!0};function ON(t){let e=t.doc,n=e.firstChild;if(!n)return null;let r=e.resolve(1),s=e.resolve(n.nodeSize-1);return me.between(r,s)}var zN=(t,e,n,r={})=>({editor:s,tr:i,state:o,dispatch:a,chain:l,commands:c,can:h})=>{let{extensions:d,splittableMarks:u}=s.extensionManager,f=Pt(t,o.schema),p=Pt(e,o.schema),{selection:m,storedMarks:g}=o,{$from:b,$to:v}=m,w=b.blockRange(v),x=g||m.$to.parentOffset&&m.$from.marks();if(!w)return!1;let _=Hh(N=>pg(N.type.name,d))(m),k=m.from===0&&m.to===o.doc.content.size,S=o.doc.content.content,C=S.length===1?S[0]:null,T=k&&C&&pg(C.type.name,d)?{node:C,pos:0,depth:0}:null,E=_??T,M=!!_&&w.depth>=1&&w.depth-_.depth<=1,z=!!T;if((M||z)&&E){if(E.node.type===f)return k&&z?l().command(({tr:N,dispatch:$})=>{let F=ON(N);return F?(N.setSelection(F),$&&$(N),!0):!1}).liftListItem(p).run():c.liftListItem(p);if(pg(E.node.type.name,d)&&f.validContent(E.node.content))return l().command(()=>(i.setNodeMarkup(E.pos,f),!0)).command(()=>fg(i,f)).command(()=>mg(i,f)).run()}return!n||!x||!a?l().command(()=>h().wrapInList(f,r)?!0:c.clearNodes()).wrapInList(f,r).command(()=>fg(i,f)).command(()=>mg(i,f)).run():l().command(()=>{let N=h().wrapInList(f,r),$=x.filter(F=>u.includes(F.type.name));return i.ensureMarks($),N?!0:c.clearNodes()}).wrapInList(f,r).command(()=>fg(i,f)).command(()=>mg(i,f)).run()},NN=(t,e={},n={})=>({state:r,commands:s})=>{let{extendEmptyMarkRange:i=!1}=n,o=ns(t,r.schema);return vg(r,o,e)?s.unsetMark(o,{extendEmptyMarkRange:i}):s.setMark(o,e)},FN=(t,e,n={})=>({state:r,commands:s})=>{let i=Pt(t,r.schema),o=Pt(e,r.schema),a=Tr(r,i,n),l;return r.selection.$anchor.sameParent(r.selection.$head)&&(l=r.selection.$anchor.parent.attrs),a?s.setNode(o,l):s.setNode(i,{...l,...n})},BN=(t,e={})=>({state:n,commands:r})=>{let s=Pt(t,n.schema);return Tr(n,s,e)?r.lift(s):r.wrapIn(s,e)},HN=()=>({state:t,dispatch:e})=>{let n=t.plugins;for(let r=0;r<n.length;r+=1){let s=n[r],i;if(s.spec.isInputRules&&(i=s.getState(t))){if(e){let o=t.tr,a=i.transform;for(let l=a.steps.length-1;l>=0;l-=1)o.step(a.steps[l].invert(a.docs[l]));if(i.text){let l=o.doc.resolve(i.from).marks();o.replaceWith(i.from,i.to,t.schema.text(i.text,l))}else o.delete(i.from,i.to)}return!0}}return!1},$N=(t={})=>({tr:e,dispatch:n,editor:r})=>{let{ignoreClearable:s=!1}=t,{selection:i}=e,{empty:o,ranges:a}=i;if(o)return!0;let{nonClearableMarks:l}=r.extensionManager;if(n){let c=Object.values(r.schema.marks).filter(h=>s||!l.includes(h.name));a.forEach(h=>{for(let d of c)e.removeMark(h.$from.pos,h.$to.pos,d)})}return!0},jN=(t,e={})=>({tr:n,state:r,dispatch:s})=>{let{extendEmptyMarkRange:i=!1}=e,{selection:o}=n,a=ns(t,r.schema),{$from:l,empty:c,ranges:h}=o;if(!s)return!0;if(c&&i){var d;let{from:u,to:f}=o,p=wg(l,a,(d=l.marks().find(m=>m.type===a))===null||d===void 0?void 0:d.attrs);p&&(u=p.from,f=p.to),n.removeMark(u,f,a)}else h.forEach(u=>{n.removeMark(u.$from.pos,u.$to.pos,a)});return n.removeStoredMark(a),!0},VN=t=>({tr:e,state:n,dispatch:r})=>{let{selection:s}=n,i,o;return typeof t=="number"?(i=t,o=t):t&&"from"in t&&"to"in t?(i=t.from,o=t.to):(i=s.from,o=s.to),r&&e.doc.nodesBetween(i,o,(a,l)=>{if(a.isText)return;let c={...a.attrs};delete c.dir,e.setNodeMarkup(l,void 0,c)}),!0},WN=(t,e={})=>({tr:n,state:r,dispatch:s})=>{let i=null,o=null,a=Bh(typeof t=="string"?t:t.name,r.schema);if(!a)return!1;a==="node"&&(i=Pt(t,r.schema)),a==="mark"&&(o=ns(t,r.schema));let l=!1;return n.selection.ranges.forEach(c=>{let h=c.$from.pos,d=c.$to.pos,u,f,p,m;n.selection.empty?r.doc.nodesBetween(h,d,(g,b)=>{i&&i===g.type&&(l=!0,p=Math.max(b,h),m=Math.min(b+g.nodeSize,d),u=b,f=g)}):r.doc.nodesBetween(h,d,(g,b)=>{b<h&&i&&i===g.type&&(l=!0,p=Math.max(b,h),m=Math.min(b+g.nodeSize,d),u=b,f=g),b>=h&&b<=d&&(i&&i===g.type&&(l=!0,s&&n.setNodeMarkup(b,void 0,{...g.attrs,...e})),o&&g.marks.length&&g.marks.forEach(v=>{if(o===v.type&&(l=!0,s)){let w=Math.max(b,h),x=Math.min(b+g.nodeSize,d);n.addMark(w,x,o.create({...v.attrs,...e}))}}))}),f&&(u!==void 0&&s&&n.setNodeMarkup(u,void 0,{...f.attrs,...e}),o&&f.marks.length&&f.marks.forEach(g=>{o===g.type&&s&&n.addMark(p,m,o.create({...g.attrs,...e}))}))}),l},Vo=new Xe("__tiptap_decorations__"),UN=t=>({tr:e,dispatch:n})=>(n&&e.setMeta(Vo,{type:"force",name:t}),!0),qN=(t,e={})=>({state:n,dispatch:r})=>{let s=Pt(t,n.schema);return D1(s,e)(n,r)},KN=(t,e={})=>({state:n,dispatch:r})=>{let s=Pt(t,n.schema);return M1(s,e)(n,r)},lr=yk({blur:()=>kz,clearContent:()=>_z,clearNodes:()=>Sz,command:()=>Cz,createParagraphNear:()=>Tz,cut:()=>Ez,deleteCurrentNode:()=>Az,deleteNode:()=>Pz,deleteRange:()=>Dz,deleteSelection:()=>Iz,enter:()=>Lz,exitCode:()=>Oz,extendMarkRange:()=>zz,first:()=>Nz,focus:()=>Bz,forEach:()=>Hz,insertContent:()=>$z,insertContentAt:()=>jz,insertDefaultBlock:()=>Vz,joinBackward:()=>qz,joinDown:()=>Uz,joinForward:()=>Kz,joinItemBackward:()=>Gz,joinItemForward:()=>Jz,joinTextblockBackward:()=>Xz,joinTextblockForward:()=>Yz,joinUp:()=>Wz,keyboardShortcut:()=>Zz,lift:()=>eN,liftEmptyBlock:()=>tN,liftListItem:()=>nN,newlineInCode:()=>rN,resetAttributes:()=>sN,scrollIntoView:()=>iN,selectAll:()=>oN,selectNodeBackward:()=>aN,selectNodeForward:()=>lN,selectParentNode:()=>cN,selectTextblockEnd:()=>hN,selectTextblockStart:()=>dN,setContent:()=>uN,setMark:()=>TN,setMeta:()=>EN,setNode:()=>AN,setNodeSelection:()=>PN,setTextDirection:()=>DN,setTextSelection:()=>MN,sinkListItem:()=>RN,splitBlock:()=>IN,splitListItem:()=>LN,toggleList:()=>zN,toggleMark:()=>NN,toggleNode:()=>FN,toggleWrap:()=>BN,undoInputRule:()=>HN,unsetAllMarks:()=>$N,unsetMark:()=>jN,unsetTextDirection:()=>VN,updateAttributes:()=>WN,updateDecorations:()=>UN,wrapIn:()=>qN,wrapInList:()=>KN}),Wo=new WeakMap;function GN(t,e){var n;Wo.set(t,((n=Wo.get(t))!==null&&n!==void 0?n:0)+1);try{return e()}finally{var r;let s=((r=Wo.get(t))!==null&&r!==void 0?r:1)-1;s>0?Wo.set(t,s):Wo.delete(t)}}function JN(t){return Wo.has(t)}var XN=class{constructor(){this.callbacks={}}on(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}emit(t,...e){let n=this.callbacks[t];return n&&n.forEach(r=>r.apply(this,e)),this}off(t,e){let n=this.callbacks[t];return n&&(e?this.callbacks[t]=n.filter(r=>r!==e):delete this.callbacks[t]),this}once(t,e){let n=(...r)=>{this.off(t,n),e.apply(this,r)};return this.on(t,n)}removeAllListeners(){this.callbacks={}}},PS=typeof process<"u"&&!1;function YN(t){return t.kind==="widget"}function DS(t,e){let n=[],r=new Set;for(let s of t)s.kind==="widget"&&YN(s)&&r.add(s.key),n.push(s.toPMDecoration(e));return{decorations:n,widgetKeys:r}}function QN(t,e,n){let{decorations:r,widgetKeys:s}=DS(e,n);return{set:Je.create(t,r),widgetKeys:s}}function MS({position:t,from:e,to:n,docSize:r}){return t<e?!1:t<n?!0:t===n&&n===r}function ZN({decorations:t,from:e,to:n,docSize:r,extensionName:s,warnedExtensions:i}){return t.filter(o=>MS({position:o.anchor,from:e,to:n,docSize:r})?!0:(o.anchor===n||i.has(s)||(i.add(s),console.warn(`[tiptap warn]: Extension "${s}" returned a decoration outside the requested range [${e}, ${n}). It was ignored.`)),!1))}function RS(t){var e;let n=(e=t.spec)===null||e===void 0?void 0:e.key;return typeof n=="string"?n:void 0}function eF(t){let e=new Map,n=new Map;for(let o of t.find()){var r,s,i;let a=RS(o);if(!a)continue;let l=(r=o.spec.extensionName)!==null&&r!==void 0?r:"unknown",c=(s=e.get(a))!==null&&s!==void 0?s:new Set;c.add(l),e.set(a,c),n.set(a,((i=n.get(a))!==null&&i!==void 0?i:0)+1)}return Array.from(e,([o,a])=>({key:o,extensions:a})).filter(({key:o})=>{var a;return((a=n.get(o))!==null&&a!==void 0?a:0)>1})}function IS(t){return t.jsonID==="attr"}function tF(t){let e=!1;if(t.getMap().forEach(()=>{e=!0}),e||IS(t))return!0;let n=t;return typeof n.from=="number"&&typeof n.to=="number"}function nF(t,e){let n=null,r=0,s=0;for(let i=0;i<t.childCount&&!(s>e.to);i+=1){let o=s+t.child(i).nodeSize;o>=e.from&&(n===null&&(n=s),r=o),s=o}return n===null?null:{from:n,to:r}}function rF(t,e){if(t.steps.some(i=>!tF(i)))return{type:"full"};let n=Jo(t).map(({newRange:i})=>i);t.steps.forEach((i,o)=>{if(!IS(i))return;let a=t.mapping.slice(o);n.push({from:a.map(i.pos,-1),to:a.map(i.pos+1)})});let r=[];for(let i of n){let o=nF(e,i);o&&r.push(o)}r.sort((i,o)=>i.from-o.from);let s=[];for(let i of r){let o=s[s.length-1];o&&i.from<=o.to?o.to=Math.max(o.to,i.to):s.push({...i})}return{type:"ranges",ranges:s}}function LS(t,e,n,r){return t.map(e,n,{onRemove:s=>{let i=s?.key;typeof i=="string"&&r.delete(i)}})}function sF(t,e,n){var r,s;let i=(r=e.decorationSetsByExtension[t])!==null&&r!==void 0?r:Je.empty,o=new Set((s=e.widgetKeysByExtension[t])!==null&&s!==void 0?s:[]);return{set:LS(i,n.mapping,n.doc,o),widgetKeys:o}}function tS(t,e){let n=Object.values(e).flatMap(r=>r.find());return Je.create(t,n)}function nS(t){let e=new Set;for(let n of Object.values(t))for(let r of n)e.add(r);return e}function iF(t,e){var n;switch((n=e.update)!==null&&n!==void 0?n:"document"){case"document":if(e.createInRange)throw new Error(`[tiptap error]: Extension "${t}" provides createInRange() but does not use the "changedRanges" decoration update strategy.`);return;case"changedRanges":if(!e.createInRange)throw new Error(`[tiptap error]: Extension "${t}" uses the "changedRanges" decoration update strategy but does not provide createInRange().`);return;case"manual":if(e.createInRange)throw new Error(`[tiptap error]: Extension "${t}" uses the "manual" decoration update strategy, which is not compatible with createInRange(). createInRange() requires the "changedRanges" strategy.`);if(e.shouldUpdate)throw new Error(`[tiptap error]: Extension "${t}" cannot combine the "manual" decoration update strategy with shouldUpdate().`);return;default:throw new Error(`[tiptap error]: Extension "${t}" uses an unknown decoration update strategy. Expected "document", "changedRanges", or "manual".`)}}function oF(t,e,n){return n?!0:t.update==="manual"?!1:t.shouldUpdate?t.shouldUpdate(e):e.tr.docChanged}var aF=new Set;var lF=class{constructor(t){this.warnedWidgetKeys=new Set,this.warnedOutOfRangeExtensions=new Set,this.handleBeforeTransaction=({nextState:e})=>{let n=Vo.getState(e);n&&this.warnDuplicateWidgetKeys(n)},this.editor=t.editor,this.entries=this.resolveEntries(t.entries),this.entries.forEach(({name:e,spec:n})=>iF(e,n)),this.plugin=this.entries.length>0?this.createPlugin():null,this.editor.on("beforeTransaction",this.handleBeforeTransaction)}destroy(){this.editor.off("beforeTransaction",this.handleBeforeTransaction)}liveWidgetKeys(){var t,e;return(t=(e=Vo.getState(this.editor.state))===null||e===void 0?void 0:e.widgetKeys)!==null&&t!==void 0?t:aF}get mountedView(){return this.editor.isDestroyed?null:this.editor.view}resolveEntries(t){let e=[];for(let{name:n,addDecorations:r}of t){let s=r();s&&e.push({name:n,spec:s})}return e}createPlugin(){let{editor:t,entries:e}=this;return new Oe({key:Vo,state:{init:(n,r)=>{let s={},i={};for(let{name:a,spec:l}of e){let{set:c,widgetKeys:h}=this.buildFullSet(a,l,r);s[a]=c,i[a]=h}let o={decorationSetsByExtension:s,widgetKeysByExtension:i,mergedDecorationSet:this.buildMergedSet(r.doc,s),widgetKeys:nS(i)};return this.warnDuplicateWidgetKeys(o),o},apply:(n,r,s,i)=>{let o=n.getMeta(Vo),a=o?.type==="force"&&!o.name,l=o?.type==="force"?o.name:void 0,c={},h={},d=new Set;return GN(t,()=>{for(let{name:u,spec:f}of e){let p=a||l===u;if(oF(f,{editor:t,tr:n,oldState:s,newState:i},p))if(f.update==="changedRanges"&&n.docChanged&&!p){let m=this.applyChangedRangesRecompute(u,f,r,n,i);c[u]=m.set,h[u]=m.widgetKeys,d.add(u)}else{let{set:m,widgetKeys:g}=this.buildFullSet(u,f,i);c[u]=m,h[u]=g,d.add(u)}else{let m=sF(u,r,n);c[u]=m.set,h[u]=m.widgetKeys}}}),d.size===0&&!n.docChanged?r:{decorationSetsByExtension:c,widgetKeysByExtension:h,mergedDecorationSet:this.mergeAfterApply({entries:e,previous:r,tr:n,decorationSetsByExtension:c,recomputedNames:d}),widgetKeys:nS(h)}}},props:{decorations(n){var r,s;return(r=(s=Vo.getState(n))===null||s===void 0?void 0:s.mergedDecorationSet)!==null&&r!==void 0?r:Je.empty}}})}applyChangedRangesRecompute(t,e,n,r,s){let i=rF(r,s.doc);return i.type==="full"?this.buildFullSet(t,e,s):this.rebuildRanges(t,e,n,r,s,i.ranges)}rebuildRanges(t,e,n,r,s,i){var o,a;let l=(o=n.decorationSetsByExtension[t])!==null&&o!==void 0?o:Je.empty,c=new Set((a=n.widgetKeysByExtension[t])!==null&&a!==void 0?a:[]),h=LS(l,r.mapping,r.doc,c),d=s.doc.content.size;for(let{from:u,to:f}of i){let p=h.find(u,f).filter(b=>MS({position:b.from,from:u,to:f,docSize:d}));for(let b of p){let v=RS(b);v&&c.delete(v)}h=h.remove(p);let{decorations:m,widgetKeys:g}=DS(ZN({decorations:this.runCreate(t,"createInRange",()=>e.createInRange({editor:this.editor,state:s,view:this.mountedView,from:u,to:f})),from:u,to:f,docSize:d,extensionName:t,warnedExtensions:this.warnedOutOfRangeExtensions}),t);h=h.add(s.doc,m);for(let b of g)c.add(b)}return{set:h,widgetKeys:c}}buildFullSet(t,e,n){let r=this.runCreate(t,"create",()=>e.create({editor:this.editor,state:n,view:this.mountedView}));return QN(n.doc,r,t)}runCreate(t,e,n){try{return n()}catch(r){return console.error(`[tiptap error]: Extension "${t}" threw in \`addDecorations().${e}()\`. Its decorations were dropped for this update.`,r),[]}}warnDuplicateWidgetKeys(t){if(!PS)return;if(t.widgetKeys.size===0){this.warnedWidgetKeys.clear();return}let e=eF(t.mergedDecorationSet),n=new Set(e.map(({key:r})=>r));for(let{key:r,extensions:s}of e){if(this.warnedWidgetKeys.has(r))continue;let i=Array.from(s).map(o=>`"${o}"`).join(", ");console.warn(`[tiptap warn]: Duplicate widget decoration key "${r}" in extension${s.size===1?"":"s"} ${i}. Widget decoration keys must be globally unique, otherwise ProseMirror misplaces the widget DOM. Use a stable, unique key (e.g. \`comment-\${id}\`).`)}this.warnedWidgetKeys=n}buildMergedSet(t,e){let n=Object.keys(e);return n.length===1?e[n[0]]:tS(t,e)}mergeAfterApply({entries:t,previous:e,tr:n,decorationSetsByExtension:r,recomputedNames:s}){return t.length===1?r[t[0].name]:s.size===0?e.mergedDecorationSet.map(n.mapping,n.doc):tS(n.doc,r)}};function Hi(t,e){if(t===e)return!0;if(!t||!e)return!1;let n=Object.keys(t),r=Object.keys(e);return n.length!==r.length?!1:n.every(s=>Object.prototype.hasOwnProperty.call(e,s)&&Object.is(t[s],e[s]))}function OS(t,e){let{selection:n}=t,{$from:r}=n;if(n instanceof we){let i=r.index();return r.parent.canReplaceWith(i,i+1,e)}let s=r.depth;for(;s>=0;){let i=r.index(s);if(r.node(s).contentMatchAt(i).matchType(e))return!0;s-=1}return!1}function cF(t,e,n){let r=document.querySelector(`style[data-tiptap-style${n?`-${n}`:""}]`);if(r!==null)return r;let s=document.createElement("style");return e&&s.setAttribute("nonce",e),s.setAttribute(`data-tiptap-style${n?`-${n}`:""}`,""),s.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(s),s}function Cg(t){return t.replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/&/g,"&")}function zS(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function hF(t){return typeof t=="number"}function dF(t){return Object.prototype.toString.call(t).slice(8,-1)}function Rh(t){return dF(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function Tg(t,e,n){let r=t.split(`
|
|
61
61
|
`),s=[],i="",o=0,a=e.baseIndentSize||2;for(;o<r.length;){let h=r[o],d=h.match(e.itemPattern);if(!d){if(s.length>0)break;if(h.trim()===""){o+=1,i=`${i}${h}
|
|
62
62
|
`;continue}else return}let u=e.extractItemData(d),{indentLevel:f,mainContent:p}=u;i=`${i}${h}
|
|
63
63
|
`;let m=[p];for(o+=1;o<r.length;){var l;let w=r[o];if(w.trim()===""){var c;let x=r.slice(o+1).findIndex(_=>_.trim()!=="");if(x===-1)break;if((((c=r[o+1+x].match(/^(\s*)/))===null||c===void 0||(c=c[1])===null||c===void 0?void 0:c.length)||0)>f){m.push(w),i=`${i}${w}
|
|
@@ -68,10 +68,10 @@ WARNING: This link could potentially be dangerous`)){let m=window.open();if(m){t
|
|
|
68
68
|
`);a+=l.type==="paragraph"?`
|
|
69
69
|
|
|
70
70
|
${f}`:`
|
|
71
|
-
${f}`}}),a}function rS(t){return typeof t.type=="string"?t.type:t.type.name}function NS(t,e){if(t.length!==e.length)return!1;let n=Array.from({length:e.length},()=>!1);return t.every(r=>{let s=rS(r),i=e.findIndex((o,a)=>!n[a]&&s===rS(o)&&Hi(r.attrs,o.attrs));return i===-1?!1:(n[i]=!0,!0)})}function FS(t,e){let n={...t};return Rh(t)&&Rh(e)&&Object.keys(e).forEach(r=>{Rh(e[r])&&Rh(t[r])?n[r]=FS(t[r],e[r]):n[r]=e[r]}),n}function
|
|
72
|
-
`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}var Ag=class{constructor(t={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...t},this.name=this.config.name}get options(){return{...Ve(pe(this,"addOptions",{name:this.name}))}}get storage(){return{...Ve(pe(this,"addStorage",{name:this.name,options:this.options}))}}configure(t={}){let e=this.extend({...this.config,addOptions:()=>FS(this.options,t)});return e.name=this.name,e.parent=this.parent,this.child=null,e}extend(t={}){let e=new this.constructor({...this.config,...t});return e.parent=this,this.child=e,e.name="name"in t?t.name:e.parent.name,e}},An=class BS extends Ag{constructor(...e){super(...e),this.type="mark"}static create(e={}){let n=typeof e=="function"?e():e;return new BS(n)}static handleExit({editor:e,mark:n}){let{tr:r}=e.state,s=e.state.selection.$from;if(s.pos===s.end()){let i=s.marks();if(!i.find(a=>a?.type.name===n.name))return!1;let o=i.find(a=>a?.type.name===n.name);return o&&r.removeStoredMark(o),r.insertText(" ",s.pos),e.view.dispatch(r),!0}return!1}configure(e){return super.configure(e)}extend(e){let n=typeof e=="function"?e():e;return super.extend(n)}},Pg=class{constructor(t){this.find=t.find,this.handler=t.handler}},
|
|
71
|
+
${f}`}}),a}function rS(t){return typeof t.type=="string"?t.type:t.type.name}function NS(t,e){if(t.length!==e.length)return!1;let n=Array.from({length:e.length},()=>!1);return t.every(r=>{let s=rS(r),i=e.findIndex((o,a)=>!n[a]&&s===rS(o)&&Hi(r.attrs,o.attrs));return i===-1?!1:(n[i]=!0,!0)})}function FS(t,e){let n={...t};return Rh(t)&&Rh(e)&&Object.keys(e).forEach(r=>{Rh(e[r])&&Rh(t[r])?n[r]=FS(t[r],e[r]):n[r]=e[r]}),n}function uF(t,e,n={}){let{state:r}=e,{doc:s,tr:i}=r,o=t;s.descendants((a,l)=>{let c=i.mapping.map(l),h=i.mapping.map(l)+a.nodeSize,d=null;if(a.marks.forEach(f=>{if(f!==o)return!1;d=f}),!d)return;let u=!1;if(Object.keys(n).forEach(f=>{n[f]!==d.attrs[f]&&(u=!0)}),u){let f=t.type.create({...t.attrs,...n});i.removeMark(c,h,t.type),i.addMark(c,h,f)}}),i.docChanged&&e.view.dispatch(i)}var Yo=class{constructor(t){var e;this.find=t.find,this.handler=t.handler,this.undoable=(e=t.undoable)!==null&&e!==void 0?e:!0}},pF=(t,e)=>{if(yg(e))return e.exec(t);let n=e(t);if(!n)return null;let r=[n.text];return r.index=n.index,r.input=t,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function Ih(t){var e;let{editor:n,from:r,to:s,text:i,rules:o,plugin:a}=t,{view:l}=n;if(l.composing)return!1;let c=l.state.doc.resolve(r);if(c.parent.type.spec.code||!((e=c.nodeBefore||c.nodeAfter)===null||e===void 0)&&e.marks.find(u=>u.type.spec.code))return!1;let h=!1,d=xN(c)+i;return o.forEach(u=>{if(h)return;let f=pF(d,u.find);if(!f)return;let p=f[0].length-i.length;if(p>0){let _=c.parentOffset-p;if(_<0||c.parent.textBetween(_,c.parentOffset)!==f[0].slice(0,p))return}let m=l.state.tr,g=Fh({state:l.state,transaction:m}),b={from:r-(f[0].length-i.length),to:s},{commands:v,chain:w,can:x}=new Uo({editor:n,state:g});u.handler({state:g,range:b,match:f,commands:v,chain:w,can:x})===null||!m.steps.length||(u.undoable&&m.setMeta(a,{transform:m,from:r,to:s,text:i}),l.dispatch(m),h=!0)}),h}function fF(t){let{editor:e,rules:n}=t,r=new Oe({state:{init(){return null},apply(s,i,o){let a=s.getMeta(r);if(a)return a;let l=s.getMeta("applyInputRules");return l&&setTimeout(()=>{let{text:c}=l;typeof c=="string"?c=c:c=kg(Q.from(c),o.schema);let{from:h}=l,d=h+c.length;Ih({editor:e,from:h,to:d,text:c,rules:n,plugin:r})}),s.selectionSet||s.docChanged?null:i}},props:{handleTextInput(s,i,o,a){return Ih({editor:e,from:i,to:o,text:a,rules:n,plugin:r})},handleDOMEvents:{compositionend:s=>(setTimeout(()=>{let{$cursor:i}=s.state.selection;i&&Ih({editor:e,from:i.pos,to:i.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(s,i){if(i.key!=="Enter")return!1;let{$cursor:o}=s.state.selection;return o?Ih({editor:e,from:o.pos,to:o.pos,text:`
|
|
72
|
+
`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}var Ag=class{constructor(t={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...t},this.name=this.config.name}get options(){return{...Ve(pe(this,"addOptions",{name:this.name}))}}get storage(){return{...Ve(pe(this,"addStorage",{name:this.name,options:this.options}))}}configure(t={}){let e=this.extend({...this.config,addOptions:()=>FS(this.options,t)});return e.name=this.name,e.parent=this.parent,this.child=null,e}extend(t={}){let e=new this.constructor({...this.config,...t});return e.parent=this,this.child=e,e.name="name"in t?t.name:e.parent.name,e}},An=class BS extends Ag{constructor(...e){super(...e),this.type="mark"}static create(e={}){let n=typeof e=="function"?e():e;return new BS(n)}static handleExit({editor:e,mark:n}){let{tr:r}=e.state,s=e.state.selection.$from;if(s.pos===s.end()){let i=s.marks();if(!i.find(a=>a?.type.name===n.name))return!1;let o=i.find(a=>a?.type.name===n.name);return o&&r.removeStoredMark(o),r.insertText(" ",s.pos),e.view.dispatch(r),!0}return!1}configure(e){return super.configure(e)}extend(e){let n=typeof e=="function"?e():e;return super.extend(n)}},Pg=class{constructor(t){this.find=t.find,this.handler=t.handler}},mF=(t,e,n)=>{if(yg(e))return[...t.matchAll(e)];let r=e(t,n);return r?r.map(s=>{let i=[s.text];return i.index=s.index,i.input=t,i.data=s.data,s.replaceWith&&(s.text.includes(s.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),i.push(s.replaceWith)),i}):[]};function gF(t){let{editor:e,state:n,from:r,to:s,rule:i,pasteEvent:o,dropEvent:a}=t,{commands:l,chain:c,can:h}=new Uo({editor:e,state:n}),d=[];return n.doc.nodesBetween(r,s,(u,f)=>{var p,m,g,b;if(!((p=u.type)===null||p===void 0||(p=p.spec)===null||p===void 0)&&p.code||!(u.isText||u.isTextblock||u.isInline))return;let v=(m=(g=(b=u.content)===null||b===void 0?void 0:b.size)!==null&&g!==void 0?g:u.nodeSize)!==null&&m!==void 0?m:0,w=Math.max(r,f),x=Math.min(s,f+v);if(w>=x)return;let _=u.isText?u.text||"":u.textBetween(w-f,x-f,void 0,"\uFFFC");mF(_,i.find,o).forEach(k=>{if(k.index===void 0)return;let S=w+k.index+1,C=S+k[0].length,T={from:n.tr.mapping.map(S),to:n.tr.mapping.map(C)},E=i.handler({state:n,range:T,match:k,commands:l,chain:c,can:h,pasteEvent:o,dropEvent:a});d.push(E)})}),d.every(u=>u!==null)}var Lh=null,bF=t=>{var e;let n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=n.clipboardData)===null||e===void 0||e.setData("text/html",t),n};function vF(t){let{editor:e,rules:n}=t,r=null,s=!1,i=!1,o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,a;try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}let l=({state:c,from:h,to:d,rule:u,pasteEvt:f})=>{let p=c.tr,m=Fh({state:c,transaction:p});if(!(!gF({editor:e,state:m,from:Math.max(h-1,0),to:d.b-1,rule:u,pasteEvent:f,dropEvent:a})||!p.steps.length)){try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}return o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,p}};return n.map(c=>new Oe({view(h){let d=f=>{var p;r=!((p=h.dom.parentElement)===null||p===void 0)&&p.contains(f.target)?h.dom.parentElement:null,r&&(Lh=e)},u=()=>{Lh&&(Lh=null)};return window.addEventListener("dragstart",d),window.addEventListener("dragend",u),{destroy(){window.removeEventListener("dragstart",d),window.removeEventListener("dragend",u)}}},props:{handleDOMEvents:{drop:(h,d)=>{if(i=r===h.dom.parentElement,a=d,!i){let u=Lh;u?.isEditable&&setTimeout(()=>{let f=u.state.selection;f&&u.commands.deleteRange({from:f.from,to:f.to})},10)}return!1},paste:(h,d)=>{var u;let f=(u=d.clipboardData)===null||u===void 0?void 0:u.getData("text/html");return o=d,s=!!f?.includes("data-pm-slice"),!1}}},appendTransaction:(h,d,u)=>{let f=h[0],p=f.getMeta("uiEvent")==="paste"&&!s,m=f.getMeta("uiEvent")==="drop"&&!i,g=f.getMeta("applyPasteRules"),b=!!g;if(!p&&!m&&!b)return;if(b){let{text:x}=g;typeof x=="string"?x=x:x=kg(Q.from(x),u.schema);let{from:_}=g,k=_+x.length,S=bF(x);return l({rule:c,state:u,from:_,to:{b:k},pasteEvt:S})}let v=d.doc.content.findDiffStart(u.doc.content),w=d.doc.content.findDiffEnd(u.doc.content);if(!(!hF(v)||!w||v===w.b))return l({rule:c,state:u,from:v,to:w,pasteEvt:o})}}))}var Wh=class{constructor(t,e){this.splittableMarks=[],this.nonClearableMarks=[],this.decorationManager=null,this.editor=e,this.baseExtensions=t,this.extensions=_g(t),this.schema=vS(this.extensions,e),this.setupExtensions()}get commands(){return this.extensions.reduce((t,e)=>{let n=pe(e,"addCommands",{name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:jo(e.name,this.schema)});return n?{...t,...n()}:t},{})}get plugins(){let{editor:t}=this,e=Bi([...this.extensions].reverse()).flatMap(r=>{let s={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:t,type:jo(r.name,this.schema)},i=[],o=pe(r,"addKeyboardShortcuts",s),a={};if(r.type==="mark"&&pe(r,"exitable",s)&&(a.ArrowRight=()=>An.handleExit({editor:t,mark:r})),o){let u=Object.fromEntries(Object.entries(o()).map(([f,p])=>[f,()=>p({editor:t})]));a={...a,...u}}let l=V_(a);i.push(l);let c=pe(r,"addInputRules",s);if(Q_(r,t.options.enableInputRules)&&c){let u=c();if(u&&u.length){let f=fF({editor:t,rules:u}),p=Array.isArray(f)?f:[f];i.push(...p)}}let h=pe(r,"addPasteRules",s);if(Q_(r,t.options.enablePasteRules)&&h){let u=h();if(u&&u.length){let f=vF({editor:t,rules:u});i.push(...f)}}let d=pe(r,"addProseMirrorPlugins",s);if(d){let u=d();i.push(...u)}return i}),n=this.createDecorationPlugin();return n&&e.push(n),e}createDecorationPlugin(){var t;let{editor:e}=this;(t=this.decorationManager)===null||t===void 0||t.destroy();let n=[];return this.extensions.forEach(r=>{let s=pe(r,"addDecorations",{name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:e,type:jo(r.name,this.schema)});s&&n.push({name:r.name,addDecorations:s})}),this.decorationManager=new lF({editor:e,entries:n}),this.decorationManager.plugin}get attributes(){return bS(this.extensions)}get nodeViews(){let{editor:t}=this,{nodeExtensions:e}=Ko(this.extensions);return Object.fromEntries(e.filter(n=>!!pe(n,"addNodeView")).map(n=>{let r=this.attributes.filter(a=>a.type===n.name),s=pe(n,"addNodeView",{name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:Pt(n.name,this.schema)});if(!s)return[];let i=s();if(!i)return[];let o=(a,l,c,h,d)=>{let u=Ws(a,r);return i({node:a,view:l,getPos:c,decorations:h,innerDecorations:d,editor:t,extension:n,HTMLAttributes:u})};return[n.name,o]}))}dispatchTransaction(t){let{editor:e}=this;return Bi([...this.extensions].reverse()).reduceRight((n,r)=>{let s={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:e,type:jo(r.name,this.schema)},i=pe(r,"dispatchTransaction",s);return i?o=>{i.call(s,{transaction:o,next:n})}:n},t)}transformPastedHTML(t){let{editor:e}=this;return Bi([...this.extensions]).reduce((n,r)=>{let s={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:e,type:jo(r.name,this.schema)},i=pe(r,"transformPastedHTML",s);return i?(o,a)=>{let l=n(o,a);return i.call(s,l)}:n},t||(n=>n))}get markViews(){let{editor:t}=this,{markExtensions:e}=Ko(this.extensions);return Object.fromEntries(e.filter(n=>!!pe(n,"addMarkView")).map(n=>{let r=this.attributes.filter(o=>o.type===n.name),s=pe(n,"addMarkView",{name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:ns(n.name,this.schema)});if(!s)return[];let i=(o,a,l)=>{let c=Ws(o,r);return s()({mark:o,view:a,inline:l,editor:t,extension:n,HTMLAttributes:c,updateAttributes:h=>{uF(o,t,h)}})};return[n.name,i]}))}destroy(){var t;(t=this.decorationManager)===null||t===void 0||t.destroy(),this.extensions.forEach(e=>{let n=e;for(;n.parent;){let r=n.parent;r.child===n&&(r.child=null),n=r}}),this.extensions=[],this.baseExtensions=[],this.decorationManager=null,this.schema=null,this.editor=null}setupExtensions(){let t=this.extensions;this.editor.extensionStorage=Object.fromEntries(t.map(e=>[e.name,e.storage])),t.forEach(e=>{let n={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:jo(e.name,this.schema)};if(e.type==="mark"){var r,s;(!((r=Ve(pe(e,"keepOnSplit",n)))!==null&&r!==void 0)||r)&&this.splittableMarks.push(e.name),!((s=Ve(pe(e,"clearable",n)))!==null&&s!==void 0)||s||this.nonClearableMarks.push(e.name)}let i=pe(e,"onBeforeCreate",n),o=pe(e,"onCreate",n),a=pe(e,"onUpdate",n),l=pe(e,"onSelectionUpdate",n),c=pe(e,"onTransaction",n),h=pe(e,"onFocus",n),d=pe(e,"onBlur",n),u=pe(e,"onDestroy",n);i&&this.editor.on("beforeCreate",i),o&&this.editor.on("create",o),a&&this.editor.on("update",a),l&&this.editor.on("selectionUpdate",l),c&&this.editor.on("transaction",c),h&&this.editor.on("focus",h),d&&this.editor.on("blur",d),u&&this.editor.on("destroy",u)})}};Wh.resolve=_g;Wh.sort=Bi;Wh.flatten=Tl;var et=class HS extends Ag{constructor(...e){super(...e),this.type="extension"}static create(e={}){let n=typeof e=="function"?e():e;return new HS(n)}configure(e){return super.configure(e)}extend(e){let n=typeof e=="function"?e():e;return super.extend(n)}},yF=et.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new Oe({key:new Xe("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{let{editor:t}=this,{state:e,schema:n}=t,{doc:r,selection:s}=e,i=xS(n),{blockSeparator:o}=this.options,a={...o!==void 0?{blockSeparator:o}:{},textSerializers:i};return[...s.ranges].sort((l,c)=>l.$from.pos-c.$from.pos).map(({$from:l,$to:c})=>wS(r,{from:l.pos,to:c.pos},a)).join(o??`
|
|
73
73
|
|
|
74
|
-
`)}}})]}}),
|
|
74
|
+
`)}}})]}}),wF=et.create({name:"commands",addCommands(){return{...lr}}}),xF=et.create({name:"delete",onUpdate({transaction:t,appendedTransactions:e}){var n,r;let s=()=>{var i,o,a;if((i=(o=this.editor.options.coreExtensionOptions)===null||o===void 0||(o=o.delete)===null||o===void 0||(a=o.filterTransaction)===null||a===void 0?void 0:a.call(o,t))!==null&&i!==void 0?i:t.getMeta("y-sync$"))return;let l=xg(t.before,[t,...e]);Jo(l).forEach(h=>{l.mapping.mapResult(h.oldRange.from).deletedAfter&&l.mapping.mapResult(h.oldRange.to).deletedBefore&&l.before.nodesBetween(h.oldRange.from,h.oldRange.to,(d,u)=>{let f=u+d.nodeSize-2,p=h.oldRange.from<=u&&f<=h.oldRange.to;this.editor.emit("delete",{type:"node",node:d,from:u,to:f,newFrom:l.mapping.map(u),newTo:l.mapping.map(f),deletedRange:h.oldRange,newRange:h.newRange,partial:!p,editor:this.editor,transaction:t,combinedTransform:l})})});let c=l.mapping;l.steps.forEach((h,d)=>{if(h instanceof Gr){var u,f;let p=c.slice(d).map(h.from,-1),m=c.slice(d).map(h.to),g=c.invert().map(p,-1),b=c.invert().map(m),v=p>0?(u=l.doc.nodeAt(p-1))===null||u===void 0?void 0:u.marks.some(x=>x.eq(h.mark)):!1,w=(f=l.doc.nodeAt(m))===null||f===void 0?void 0:f.marks.some(x=>x.eq(h.mark));this.editor.emit("delete",{type:"mark",mark:h.mark,from:h.from,to:h.to,deletedRange:{from:g,to:b},newRange:{from:p,to:m},partial:!!(w||v),editor:this.editor,transaction:t,combinedTransform:l})}})};!((n=(r=this.editor.options.coreExtensionOptions)===null||r===void 0||(r=r.delete)===null||r===void 0?void 0:r.async)!==null&&n!==void 0)||n?setTimeout(s,0):s()}}),kF=et.create({name:"drop",addProseMirrorPlugins(){return[new Oe({key:new Xe("tiptapDrop"),props:{handleDrop:(t,e,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:r})}}})]}}),_F=et.create({name:"editable",addProseMirrorPlugins(){return[new Oe({key:new Xe("editable"),props:{editable:()=>this.editor.options.editable}})]}}),SF=new Xe("focusEvents"),CF=et.create({name:"focusEvents",addProseMirrorPlugins(){let{editor:t}=this;return[new Oe({key:SF,props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;let r=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,n)=>{t.isFocused=!1;let r=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),TF=et.create({name:"keymap",addKeyboardShortcuts(){let t=()=>this.editor.commands.first(({commands:o})=>[()=>o.undoInputRule(),()=>o.command(({tr:a})=>{let{selection:l,doc:c}=a,{empty:h,$anchor:d}=l,{pos:u,parent:f}=d,p=d.parent.isTextblock&&u>0?a.doc.resolve(u-1):d,m=p.parent.type.spec.isolating,g=d.pos-d.parentOffset,b=m&&p.parent.childCount===1?g===d.pos:xe.atStart(c).from===u;return!h||!f.type.isTextblock||f.textContent.length||!b||b&&d.parent.type.name==="paragraph"?!1:o.clearNodes()}),()=>o.deleteSelection(),()=>o.joinBackward(),()=>o.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:o})=>[()=>o.deleteSelection(),()=>o.deleteCurrentNode(),()=>o.joinForward(),()=>o.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:o})=>[()=>o.newlineInCode(),()=>o.createParagraphNear(),()=>o.liftEmptyBlock(),()=>o.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},s={...r},i={...r,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return Nh()||pS()?i:s},addProseMirrorPlugins(){return[new Oe({key:new Xe("clearDocument"),appendTransaction:(t,e,n)=>{if(t.some(f=>f.getMeta("composition")))return;let r=t.some(f=>f.docChanged)&&!e.doc.eq(n.doc),s=t.some(f=>f.getMeta("preventClearDocument"));if(!r||s)return;let{empty:i,from:o,to:a}=e.selection,l=xe.atStart(e.doc).from,c=xe.atEnd(e.doc).to;if(i||!(o===l&&a===c)||!Xo(n.doc))return;let h=n.tr,d=Fh({state:n,transaction:h}),{commands:u}=new Uo({editor:this.editor,state:d});if(u.clearNodes(),!!h.steps.length)return h}})]}}),EF=et.create({name:"paste",addProseMirrorPlugins(){return[new Oe({key:new Xe("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}}),AF=et.create({name:"tabindex",addOptions(){return{value:void 0}},addProseMirrorPlugins(){return[new Oe({key:new Xe("tabindex"),props:{attributes:()=>{var t;return!this.editor.isEditable&&this.options.value===void 0?{}:{tabindex:(t=this.options.value)!==null&&t!==void 0?t:"0"}}}})]}}),PF=et.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];let{nodeExtensions:t}=Ko(this.extensions);return[{types:t.filter(e=>e.name!=="text").map(e=>e.name),attributes:{dir:{default:this.options.direction,parseHTML:e=>{let n=e.getAttribute("dir");return n&&(n==="ltr"||n==="rtl"||n==="auto")?n:this.options.direction},renderHTML:e=>e.dir?{dir:e.dir}:{}}}}]},addProseMirrorPlugins(){return[new Oe({key:new Xe("textDirection"),props:{attributes:()=>{let t=this.options.direction;return t?{dir:t}:{}}}})]}});var sS=!1;function DF(t){if(sS)return;sS=!0;let e;try{e=Nt.fromJSON(t,{from:0,to:0}).slice.content}catch{return}e instanceof Q||console.warn("[tiptap warn]: prosemirror-model is loaded more than once. Wrapping and splitting nodes will fail. Deduplicate it in your lock file, or alias it to a single copy in your bundler.")}var MF=class Cl{get name(){return this.node.type.name}constructor(e,n,r=!1,s=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=e,this.editor=n,this.currentNode=s}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!==null&&e!==void 0?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can\u2019t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;let e=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(e);return new Cl(n,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new Cl(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new Cl(e,this.editor)}get children(){let e=[];return this.node.content.forEach((n,r)=>{let s=n.isBlock&&!n.isTextblock,i=n.isAtom&&!n.isText,o=n.isInline,a=this.pos+r+(i?0:1);if(a<0||a>this.resolvedPos.doc.nodeSize-2)return;let l=this.resolvedPos.doc.resolve(a);if(!s&&!o&&l.depth<=this.depth)return;let c=new Cl(l,this.editor,s,s||o?n:null);s&&(c.actualDepth=this.depth+1),e.push(c)}),e}get firstChild(){return this.children[0]||null}get lastChild(){let e=this.children;return e[e.length-1]||null}closest(e,n={}){let r=null,s=this.parent;for(;s&&!r;){if(s.node.type.name===e)if(Object.keys(n).length>0){let i=s.node.attrs,o=Object.keys(n);for(let a=0;a<o.length;a+=1){let l=o[a];if(i[l]!==n[l])break}}else r=s;s=s.parent}return r}querySelector(e,n={}){return this.querySelectorAll(e,n,!0)[0]||null}querySelectorAll(e,n={},r=!1){let s=[];if(!this.children||this.children.length===0)return s;let i=Object.keys(n);return this.children.forEach(o=>{r&&s.length>0||(o.node.type.name===e&&i.every(a=>n[a]===o.node.attrs[a])&&s.push(o),!(r&&s.length>0)&&(s=s.concat(o.querySelectorAll(e,n,r))))}),s}setAttribute(e){let{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(n)}},RF=`.ProseMirror {
|
|
75
75
|
position: relative;
|
|
76
76
|
}
|
|
77
77
|
|
|
@@ -141,13 +141,13 @@ img.ProseMirror-separator {
|
|
|
141
141
|
|
|
142
142
|
.ProseMirror-focused .ProseMirror-gapcursor {
|
|
143
143
|
display: block;
|
|
144
|
-
}`,$S=class extends XN{constructor(t={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.destroyed=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.hasWarnedStaleDecorationRead=!1,this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:n})=>{throw n},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:_N,createMappablePosition:SN},this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:n,slice:r,moved:s})=>this.options.onDrop(n,r,s)),this.on("paste",({event:n,slice:r})=>this.options.onPaste(n,r)),this.on("delete",this.options.onDelete);let e=this.createDoc();if(!this.editorState){let n=gg(e,this.options.autofocus);this.editorState=hl.create({doc:e,schema:this.schema,selection:n||void 0})}
|
|
144
|
+
}`,$S=class extends XN{constructor(t={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.destroyed=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.hasWarnedStaleDecorationRead=!1,this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:n})=>{throw n},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:_N,createMappablePosition:SN},this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:n,slice:r,moved:s})=>this.options.onDrop(n,r,s)),this.on("paste",({event:n,slice:r})=>this.options.onPaste(n,r)),this.on("delete",this.options.onDelete);let e=this.createDoc();if(!this.editorState){let n=gg(e,this.options.autofocus);this.editorState=hl.create({doc:e,schema:this.schema,selection:n||void 0})}DF(this.schema),this.options.element&&this.mount(this.options.element)}mount(t){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(t),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){this.editorState=this.editorView.state;let t=this.editorView.dom;t?.editor&&delete t.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(t){console.warn("Failed to remove CSS element:",t)}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager?this.commandManager.chain():Uo.createFakeChain()}can(){return this.commandManager?this.commandManager.can():Uo.createFallbackCan()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=cF(RF,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,e=!0){this.setOptions({editable:t}),e&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:t=>{this.editorState=t},dispatch:t=>{this.dispatchTransaction(t)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(t,e)=>{if(this.editorView)return this.editorView[e];if(e==="state")return this.editorState;if(e in t)return Reflect.get(t,e);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${e}']. The editor may not be mounted yet.`)}})}get state(){return PS&&!this.hasWarnedStaleDecorationRead&&JN(this)&&(this.hasWarnedStaleDecorationRead=!0,console.warn("[tiptap warn]: `editor.state` was read while decoration `create()` was running. It returns the pre-transaction document. Use the `state` argument passed to `create()` instead. Helpers like `editor.isActive()` read `editor.state` too, so pass `state` to their standalone versions instead of calling them on the editor.")),this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(t,e){let n=gS(e)?e(t,[...this.state.plugins]):[...this.state.plugins,t],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(t){if(this.isDestroyed)return;let e=this.state.plugins,n=e;if([].concat(t).forEach(s=>{let i=typeof s=="string"?`${s}$`:s.key;n=n.filter(o=>!o.key.startsWith(i))}),e.length===n.length)return;let r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var t,e;let n=[...this.options.enableCoreExtensions?[_F,yF.configure({blockSeparator:(t=this.options.coreExtensionOptions)===null||t===void 0||(t=t.clipboardTextSerializer)===null||t===void 0?void 0:t.blockSeparator}),wF,CF,TF,AF.configure({value:(e=this.options.coreExtensionOptions)===null||e===void 0||(e=e.tabindex)===null||e===void 0?void 0:e.value}),kF,EF,xF,PF.configure({direction:this.options.textDirection})].filter(r=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[r.name]!==!1:!0):[],...this.options.extensions].filter(r=>["extension","node","mark"].includes(r?.type));this.extensionManager=new Wh(n,this)}createCommandManager(){this.commandManager=new Uo({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let t;try{t=bg(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(e){if(!(e instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(e.message))throw e;let n=bg(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1});return this.editorState=hl.create({doc:n,schema:this.schema,selection:gg(n,this.options.autofocus)||void 0}),this.emit("contentError",{editor:this,error:e,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(r=>r.name!=="collaboration"),this.createExtensionManager()}}),this.editorState.doc}return t}createView(t){let{editorProps:e,enableExtensionDispatchTransaction:n}=this.options,r=e.dispatchTransaction||this.dispatchTransaction.bind(this),s=n?this.extensionManager.dispatchTransaction(r):r,i=e.transformPastedHTML,o=this.extensionManager.transformPastedHTML(i);this.editorView=new vl(t,{...e,attributes:{role:"textbox",...e?.attributes},dispatchTransaction:s,transformPastedHTML:o,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});let a=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(a),this.prependClass(),this.injectCSS();let l=this.view.dom;l.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;let e=this.capturedTransaction;return this.capturedTransaction=null,e}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=t;return}t.steps.forEach(c=>{var h;return(h=this.capturedTransaction)===null||h===void 0?void 0:h.step(c)});return}let{state:e,transactions:n}=this.state.applyTransaction(t),r=!this.state.selection.eq(e.selection),s=n.includes(t),i=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:t,nextState:e}),!s)return;this.view.updateState(e),this.emit("transaction",{editor:this,transaction:t,appendedTransactions:n.slice(1)}),r&&this.emit("selectionUpdate",{editor:this,transaction:t});let o=n.findLast(c=>c.getMeta("focus")||c.getMeta("blur")),a=o?.getMeta("focus"),l=o?.getMeta("blur");a&&this.emit("focus",{editor:this,event:a.event,transaction:o}),l&&this.emit("blur",{editor:this,event:l.event,transaction:o}),!(t.getMeta("preventUpdate")||!n.some(c=>c.docChanged)||i.doc.eq(e.doc))&&this.emit("update",{editor:this,transaction:t,appendedTransactions:n.slice(1)})}getAttributes(t){return Sg(this.state,t)}isActive(t,e){let n=typeof t=="string"?t:null,r=typeof t=="string"?e:t;return kN(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return kg(this.state.doc.content,this.schema)}getText(t){let{blockSeparator:e=`
|
|
145
145
|
|
|
146
|
-
`,textSerializers:n={}}=t||{};return bN(this.state.doc,{blockSeparator:e,textSerializers:{...xS(this.schema),...n}})}get isEmpty(){return Xo(this.state.doc)}destroy(){this.destroyed||(this.destroyed=!0,this.emit("destroy"),this.unmount(),this.removeAllListeners(),this.extensionManager.destroy(),this.extensionManager=null,this.schema=null,this.commandManager=null,this.extensionStorage={})}get isDestroyed(){var t,e;return(t=(e=this.editorView)===null||e===void 0?void 0:e.isDestroyed)!==null&&t!==void 0?t:!0}$node(t,e){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelector(t,e))||null}$nodes(t,e){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelectorAll(t,e))||null}$pos(t){let e=this.state.doc.resolve(t),n=t>0&&e.nodeAfter&&!e.nodeAfter.isText&&e.nodeAfter.isAtom?e.nodeAfter:null;return new M3(e,this,!1,n)}get $doc(){return this.$pos(0)}};function Jn(t){return new Yo({find:t.find,handler:({state:e,range:n,match:r})=>{let s=Ve(t.getAttributes,void 0,r);if(s===!1||s===null)return null;let{tr:i}=e,o=r[r.length-1],a=r[0];if(o){let l=a.search(/\S/),c=n.from+a.indexOf(o),h=c+o.length;if(jh(n.from,n.to,e.doc).filter(u=>u.mark.type.excluded.find(f=>f===t.type&&f!==u.mark.type)).filter(u=>u.to>c).length)return null;h<n.to&&i.delete(h,n.to),c>n.from&&i.delete(n.from+l,c);let d=n.from+l+o.length;i.addMark(n.from+l,d,t.type.create(s||{})),i.removeStoredMark(t.type)}},undoable:t.undoable})}function Uh(t){return new Yo({find:t.find,handler:({state:e,range:n,match:r})=>{let s=Ve(t.getAttributes,void 0,r)||{},{tr:i}=e,o=n.from,a=n.to,l=t.type.create(s);if(r[1]){let c=o+r[0].lastIndexOf(r[1]);c>a?c=a:a=c+r[1].length;let h=r[0][r[0].length-1];i.insertText(h,o+r[0].length-1),i.replaceWith(c,a,l)}else if(r[0]){let c=t.type.isInline?o:o-1;i.insert(c,t.type.create(s)).delete(i.mapping.map(o),i.mapping.map(a))}i.scrollIntoView()},undoable:t.undoable})}function El(t){return new Yo({find:t.find,handler:({state:e,range:n,match:r})=>{let s=e.doc.resolve(n.from),i=Ve(t.getAttributes,void 0,r)||{};if(!s.node(-1).canReplaceWith(s.index(-1),s.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,i)},undoable:t.undoable})}function Us(t){return new Yo({find:t.find,handler:({state:e,range:n,match:r,chain:s})=>{let i=Ve(t.getAttributes,void 0,r)||{},o=e.tr.delete(n.from,n.to),a=o.doc.resolve(n.from).blockRange(),l=a&&Ro(a,t.type,i);if(!l)return null;if(o.wrap(a,l),t.keepMarks&&t.editor){let{selection:h,storedMarks:d}=e,{splittableMarks:u}=t.editor.extensionManager,f=d||h.$to.parentOffset&&h.$from.marks();if(f){let p=f.filter(m=>u.includes(m.type.name));o.ensureMarks(p)}}if(t.keepAttributes){let h=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";s().updateAttributes(h,i).run()}let c=o.doc.resolve(n.from-1).nodeBefore;c&&c.type===t.type&&or(o.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,c))&&o.join(n.from-1)},undoable:t.undoable})}var I3=t=>"touches"in t,jS=class{constructor(t){var e,n,r,s,i,o;this.directions=["bottom-left","bottom-right","top-left","top-right"],this.minSize={height:8,width:8},this.preserveAspectRatio=!1,this.classNames={container:"",wrapper:"",handle:"",resizing:""},this.initialWidth=0,this.initialHeight=0,this.aspectRatio=1,this.isResizing=!1,this.activeHandle=null,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.isShiftKeyPressed=!1,this.lastEditableState=void 0,this.handleMap=new Map,this.handleMouseMove=a=>{if(!this.isResizing||!this.activeHandle)return;let l=a.clientX-this.startX,c=a.clientY-this.startY;this.handleResize(l,c)},this.handleTouchMove=a=>{if(!this.isResizing||!this.activeHandle)return;let l=a.touches[0];if(!l)return;let c=l.clientX-this.startX,h=l.clientY-this.startY;this.handleResize(c,h)},this.handleMouseUp=()=>{if(!this.isResizing)return;let a=this.element.offsetWidth,l=this.element.offsetHeight;this.onCommit(a,l),this.isResizing=!1,this.activeHandle=null,this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)},this.handleKeyDown=a=>{a.key==="Shift"&&(this.isShiftKeyPressed=!0)},this.handleKeyUp=a=>{a.key==="Shift"&&(this.isShiftKeyPressed=!1)},this.node=t.node,this.editor=t.editor,this.element=t.element,this.element.draggable=!1,this.contentElement=t.contentElement,this.getPos=t.getPos,this.onResize=t.onResize,this.onCommit=t.onCommit,this.onUpdate=t.onUpdate,!((e=t.options)===null||e===void 0)&&e.min&&(this.minSize={...this.minSize,...t.options.min}),!((n=t.options)===null||n===void 0)&&n.max&&(this.maxSize=t.options.max),!(t==null||(r=t.options)===null||r===void 0)&&r.directions&&(this.directions=t.options.directions),!((s=t.options)===null||s===void 0)&&s.preserveAspectRatio&&(this.preserveAspectRatio=t.options.preserveAspectRatio),!((i=t.options)===null||i===void 0)&&i.className&&(this.classNames={container:t.options.className.container||"",wrapper:t.options.className.wrapper||"",handle:t.options.className.handle||"",resizing:t.options.className.resizing||""}),!((o=t.options)===null||o===void 0)&&o.createCustomHandle&&(this.createCustomHandle=t.options.createCustomHandle),this.wrapper=this.createWrapper(),this.container=this.createContainer(),this.applyInitialSize(),this.attachHandles(),this.editor.on("update",this.handleEditorUpdate.bind(this))}get dom(){return this.container}get contentDOM(){var t;return(t=this.contentElement)!==null&&t!==void 0?t:null}handleEditorUpdate(){let t=this.editor.isEditable;t!==this.lastEditableState&&(this.lastEditableState=t,t?t&&this.handleMap.size===0&&this.attachHandles():this.removeHandles())}update(t,e,n){return t.type!==this.node.type?!1:(this.node=t,this.onUpdate?this.onUpdate(t,e,n):!0)}destroy(){this.isResizing&&(this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp),this.isResizing=!1,this.activeHandle=null),this.editor.off("update",this.handleEditorUpdate.bind(this)),this.container.remove()}createContainer(){let t=document.createElement("div");return t.dataset.resizeContainer="",t.dataset.node=this.node.type.name,t.style.display=this.node.type.isInline?"inline-flex":"flex",this.classNames.container&&(t.className=this.classNames.container),t.appendChild(this.wrapper),t}createWrapper(){let t=document.createElement("div");return t.style.position="relative",t.style.display="block",t.dataset.resizeWrapper="",this.classNames.wrapper&&(t.className=this.classNames.wrapper),t.appendChild(this.element),t}createHandle(t){let e=document.createElement("div");return e.dataset.resizeHandle=t,e.style.position="absolute",this.classNames.handle&&(e.className=this.classNames.handle),e}positionHandle(t,e){let n=e.includes("top"),r=e.includes("bottom"),s=e.includes("left"),i=e.includes("right");n&&(t.style.top="0"),r&&(t.style.bottom="0"),s&&(t.style.left="0"),i&&(t.style.right="0"),(e==="top"||e==="bottom")&&(t.style.left="0",t.style.right="0"),(e==="left"||e==="right")&&(t.style.top="0",t.style.bottom="0")}attachHandles(){this.directions.forEach(t=>{let e;this.createCustomHandle?e=this.createCustomHandle(t):e=this.createHandle(t),e instanceof HTMLElement||(console.warn(`[ResizableNodeView] createCustomHandle("${t}") did not return an HTMLElement. Falling back to default handle.`),e=this.createHandle(t)),this.createCustomHandle||this.positionHandle(e,t),e.addEventListener("mousedown",n=>this.handleResizeStart(n,t)),e.addEventListener("touchstart",n=>this.handleResizeStart(n,t)),this.handleMap.set(t,e),this.wrapper.appendChild(e)})}removeHandles(){this.handleMap.forEach(t=>t.remove()),this.handleMap.clear()}applyInitialSize(){let t=this.node.attrs.width,e=this.node.attrs.height;t?(this.element.style.width=`${t}px`,this.initialWidth=t):this.initialWidth=this.element.offsetWidth,e?(this.element.style.height=`${e}px`,this.initialHeight=e):this.initialHeight=this.element.offsetHeight,this.initialWidth>0&&this.initialHeight>0&&(this.aspectRatio=this.initialWidth/this.initialHeight)}handleResizeStart(t,e){t.preventDefault(),t.stopPropagation(),this.isResizing=!0,this.activeHandle=e,I3(t)?(this.startX=t.touches[0].clientX,this.startY=t.touches[0].clientY):(this.startX=t.clientX,this.startY=t.clientY),this.startWidth=this.element.offsetWidth,this.startHeight=this.element.offsetHeight,this.startWidth>0&&this.startHeight>0&&(this.aspectRatio=this.startWidth/this.startHeight),this.getPos(),this.container.dataset.resizeState="true",this.classNames.resizing&&this.container.classList.add(this.classNames.resizing),document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("touchmove",this.handleTouchMove),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}handleResize(t,e){if(!this.activeHandle)return;let n=this.preserveAspectRatio||this.isShiftKeyPressed,{width:r,height:s}=this.calculateNewDimensions(this.activeHandle,t,e),i=this.applyConstraints(r,s,n);this.element.style.width=`${i.width}px`,this.element.style.height=`${i.height}px`,this.onResize&&this.onResize(i.width,i.height)}calculateNewDimensions(t,e,n){let r=this.startWidth,s=this.startHeight,i=t.includes("right"),o=t.includes("left"),a=t.includes("bottom"),l=t.includes("top");return i?r=this.startWidth+e:o&&(r=this.startWidth-e),a?s=this.startHeight+n:l&&(s=this.startHeight-n),(t==="right"||t==="left")&&(r=this.startWidth+(i?e:-e)),(t==="top"||t==="bottom")&&(s=this.startHeight+(a?n:-n)),this.preserveAspectRatio||this.isShiftKeyPressed?this.applyAspectRatio(r,s,t):{width:r,height:s}}applyConstraints(t,e,n){var r,s;if(!n){var i,o;let c=Math.max(this.minSize.width,t),h=Math.max(this.minSize.height,e);return!((i=this.maxSize)===null||i===void 0)&&i.width&&(c=Math.min(this.maxSize.width,c)),!((o=this.maxSize)===null||o===void 0)&&o.height&&(h=Math.min(this.maxSize.height,h)),{width:c,height:h}}let a=t,l=e;return a<this.minSize.width&&(a=this.minSize.width,l=a/this.aspectRatio),l<this.minSize.height&&(l=this.minSize.height,a=l*this.aspectRatio),!((r=this.maxSize)===null||r===void 0)&&r.width&&a>this.maxSize.width&&(a=this.maxSize.width,l=a/this.aspectRatio),!((s=this.maxSize)===null||s===void 0)&&s.height&&l>this.maxSize.height&&(l=this.maxSize.height,a=l*this.aspectRatio),{width:a,height:l}}applyAspectRatio(t,e,n){let r=n==="left"||n==="right",s=n==="top"||n==="bottom";return r?{width:t,height:t/this.aspectRatio}:s?{width:e*this.aspectRatio,height:e}:{width:t,height:t/this.aspectRatio}}};var tt=class VS extends Ag{constructor(...e){super(...e),this.type="node"}static create(e={}){let n=typeof e=="function"?e():e;return new VS(n)}configure(e){return super.configure(e)}extend(e){let n=typeof e=="function"?e():e;return super.extend(n)}};function Pn(t){return new Pg({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:s})=>{let i=Ve(t.getAttributes,void 0,r,s);if(i===!1||i===null)return null;let{tr:o}=e,a=r[r.length-1],l=r[0],c=n.to;if(a){let h=l.search(/\S/),d=n.from+l.indexOf(a),u=d+a.length;if(jh(n.from,n.to,e.doc).filter(f=>f.mark.type.excluded.find(p=>p===t.type&&p!==f.mark.type)).filter(f=>f.to>d).length)return null;u<n.to&&o.delete(u,n.to),d>n.from&&o.delete(n.from+h,d),c=n.from+h+a.length,o.addMark(n.from+h,c,t.type.create(i||{})),r.index!==void 0&&r.input!==void 0&&r.index+r[0].length>=r.input.length||o.removeStoredMark(t.type)}}})}var WS=new WeakSet,US=new WeakSet;function $i(t){let e=t;return WS.add(e),e}function Dg(t){return Array.isArray(t)&&WS.has(t)}function qS(t){return t.flatMap(e=>e==null?[]:Array.isArray(e)&&US.has(e)&&!Dg(e)?qS(e):[e])}function L3(t,e){if(t==="slot")return 0;if(t instanceof Function){let s=t(e);return Array.isArray(s)&&!Dg(s)&&!US.has(s)?$i(s):s}let{children:n,...r}=e??{};if(t==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");if(Array.isArray(n)){if(Dg(n))return $i([t,r,n]);if(n.length===0)return $i([t,r]);let s=qS(n);return s.length===0?$i([t,r]):$i([t,r,...s])}return n!=null?$i([t,r,n]):$i([t,r])}var Qo=(t,e)=>L3(t,e);var O3=(t,e)=>{var n;let{state:r}=t,{selection:s}=r;if(!s.empty)return!1;let{$from:i}=s;if(i.parentOffset!==0)return!1;let o=i.depth-1;if(o<0)return!1;let a=i.node(o),l=i.index(o);if(l===0)return!1;if(a.type===e)return t.commands.lift(e.name);let c=a.child(l-1);if(c.type!==e||!(!((n=c.lastChild)===null||n===void 0)&&n.isTextblock))return!1;let h=i.before()-1-1;return t.commands.command(({tr:d,dispatch:u})=>{if(!u)return!0;let f=i.parent.content,p=new ae(f,0,0);return d.replace(h,i.after(),p),d.setSelection(me.create(d.doc,h+f.size)),d.scrollIntoView(),u(d),!0})},z3=/^\s*>\s$/,KS=tt.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return Qo("blockquote",{...Ie(this.options.HTMLAttributes,t),children:Qo("slot",{})})},parseMarkdown:(t,e)=>{var n;let r=(n=e.parseBlockChildren)!==null&&n!==void 0?n:e.parseChildren;return e.createNode("blockquote",void 0,r(t.tokens||[]))},renderMarkdown:(t,e)=>{if(!t.content)return"";let n=">",r=[];return t.content.forEach((s,i)=>{var o,a;let l=((o=(a=e.renderChild)===null||a===void 0?void 0:a.call(e,s,i))!==null&&o!==void 0?o:e.renderChildren([s])).split(`
|
|
146
|
+
`,textSerializers:n={}}=t||{};return bN(this.state.doc,{blockSeparator:e,textSerializers:{...xS(this.schema),...n}})}get isEmpty(){return Xo(this.state.doc)}destroy(){this.destroyed||(this.destroyed=!0,this.emit("destroy"),this.unmount(),this.removeAllListeners(),this.extensionManager.destroy(),this.extensionManager=null,this.schema=null,this.commandManager=null,this.extensionStorage={})}get isDestroyed(){var t,e;return(t=(e=this.editorView)===null||e===void 0?void 0:e.isDestroyed)!==null&&t!==void 0?t:!0}$node(t,e){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelector(t,e))||null}$nodes(t,e){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelectorAll(t,e))||null}$pos(t){let e=this.state.doc.resolve(t),n=t>0&&e.nodeAfter&&!e.nodeAfter.isText&&e.nodeAfter.isAtom?e.nodeAfter:null;return new MF(e,this,!1,n)}get $doc(){return this.$pos(0)}};function Jn(t){return new Yo({find:t.find,handler:({state:e,range:n,match:r})=>{let s=Ve(t.getAttributes,void 0,r);if(s===!1||s===null)return null;let{tr:i}=e,o=r[r.length-1],a=r[0];if(o){let l=a.search(/\S/),c=n.from+a.indexOf(o),h=c+o.length;if(jh(n.from,n.to,e.doc).filter(u=>u.mark.type.excluded.find(f=>f===t.type&&f!==u.mark.type)).filter(u=>u.to>c).length)return null;h<n.to&&i.delete(h,n.to),c>n.from&&i.delete(n.from+l,c);let d=n.from+l+o.length;i.addMark(n.from+l,d,t.type.create(s||{})),i.removeStoredMark(t.type)}},undoable:t.undoable})}function Uh(t){return new Yo({find:t.find,handler:({state:e,range:n,match:r})=>{let s=Ve(t.getAttributes,void 0,r)||{},{tr:i}=e,o=n.from,a=n.to,l=t.type.create(s);if(r[1]){let c=o+r[0].lastIndexOf(r[1]);c>a?c=a:a=c+r[1].length;let h=r[0][r[0].length-1];i.insertText(h,o+r[0].length-1),i.replaceWith(c,a,l)}else if(r[0]){let c=t.type.isInline?o:o-1;i.insert(c,t.type.create(s)).delete(i.mapping.map(o),i.mapping.map(a))}i.scrollIntoView()},undoable:t.undoable})}function El(t){return new Yo({find:t.find,handler:({state:e,range:n,match:r})=>{let s=e.doc.resolve(n.from),i=Ve(t.getAttributes,void 0,r)||{};if(!s.node(-1).canReplaceWith(s.index(-1),s.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,i)},undoable:t.undoable})}function Us(t){return new Yo({find:t.find,handler:({state:e,range:n,match:r,chain:s})=>{let i=Ve(t.getAttributes,void 0,r)||{},o=e.tr.delete(n.from,n.to),a=o.doc.resolve(n.from).blockRange(),l=a&&Ro(a,t.type,i);if(!l)return null;if(o.wrap(a,l),t.keepMarks&&t.editor){let{selection:h,storedMarks:d}=e,{splittableMarks:u}=t.editor.extensionManager,f=d||h.$to.parentOffset&&h.$from.marks();if(f){let p=f.filter(m=>u.includes(m.type.name));o.ensureMarks(p)}}if(t.keepAttributes){let h=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";s().updateAttributes(h,i).run()}let c=o.doc.resolve(n.from-1).nodeBefore;c&&c.type===t.type&&or(o.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,c))&&o.join(n.from-1)},undoable:t.undoable})}var IF=t=>"touches"in t,jS=class{constructor(t){var e,n,r,s,i,o;this.directions=["bottom-left","bottom-right","top-left","top-right"],this.minSize={height:8,width:8},this.preserveAspectRatio=!1,this.classNames={container:"",wrapper:"",handle:"",resizing:""},this.initialWidth=0,this.initialHeight=0,this.aspectRatio=1,this.isResizing=!1,this.activeHandle=null,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.isShiftKeyPressed=!1,this.lastEditableState=void 0,this.handleMap=new Map,this.handleMouseMove=a=>{if(!this.isResizing||!this.activeHandle)return;let l=a.clientX-this.startX,c=a.clientY-this.startY;this.handleResize(l,c)},this.handleTouchMove=a=>{if(!this.isResizing||!this.activeHandle)return;let l=a.touches[0];if(!l)return;let c=l.clientX-this.startX,h=l.clientY-this.startY;this.handleResize(c,h)},this.handleMouseUp=()=>{if(!this.isResizing)return;let a=this.element.offsetWidth,l=this.element.offsetHeight;this.onCommit(a,l),this.isResizing=!1,this.activeHandle=null,this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)},this.handleKeyDown=a=>{a.key==="Shift"&&(this.isShiftKeyPressed=!0)},this.handleKeyUp=a=>{a.key==="Shift"&&(this.isShiftKeyPressed=!1)},this.node=t.node,this.editor=t.editor,this.element=t.element,this.element.draggable=!1,this.contentElement=t.contentElement,this.getPos=t.getPos,this.onResize=t.onResize,this.onCommit=t.onCommit,this.onUpdate=t.onUpdate,!((e=t.options)===null||e===void 0)&&e.min&&(this.minSize={...this.minSize,...t.options.min}),!((n=t.options)===null||n===void 0)&&n.max&&(this.maxSize=t.options.max),!(t==null||(r=t.options)===null||r===void 0)&&r.directions&&(this.directions=t.options.directions),!((s=t.options)===null||s===void 0)&&s.preserveAspectRatio&&(this.preserveAspectRatio=t.options.preserveAspectRatio),!((i=t.options)===null||i===void 0)&&i.className&&(this.classNames={container:t.options.className.container||"",wrapper:t.options.className.wrapper||"",handle:t.options.className.handle||"",resizing:t.options.className.resizing||""}),!((o=t.options)===null||o===void 0)&&o.createCustomHandle&&(this.createCustomHandle=t.options.createCustomHandle),this.wrapper=this.createWrapper(),this.container=this.createContainer(),this.applyInitialSize(),this.attachHandles(),this.editor.on("update",this.handleEditorUpdate.bind(this))}get dom(){return this.container}get contentDOM(){var t;return(t=this.contentElement)!==null&&t!==void 0?t:null}handleEditorUpdate(){let t=this.editor.isEditable;t!==this.lastEditableState&&(this.lastEditableState=t,t?t&&this.handleMap.size===0&&this.attachHandles():this.removeHandles())}update(t,e,n){return t.type!==this.node.type?!1:(this.node=t,this.onUpdate?this.onUpdate(t,e,n):!0)}destroy(){this.isResizing&&(this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp),this.isResizing=!1,this.activeHandle=null),this.editor.off("update",this.handleEditorUpdate.bind(this)),this.container.remove()}createContainer(){let t=document.createElement("div");return t.dataset.resizeContainer="",t.dataset.node=this.node.type.name,t.style.display=this.node.type.isInline?"inline-flex":"flex",this.classNames.container&&(t.className=this.classNames.container),t.appendChild(this.wrapper),t}createWrapper(){let t=document.createElement("div");return t.style.position="relative",t.style.display="block",t.dataset.resizeWrapper="",this.classNames.wrapper&&(t.className=this.classNames.wrapper),t.appendChild(this.element),t}createHandle(t){let e=document.createElement("div");return e.dataset.resizeHandle=t,e.style.position="absolute",this.classNames.handle&&(e.className=this.classNames.handle),e}positionHandle(t,e){let n=e.includes("top"),r=e.includes("bottom"),s=e.includes("left"),i=e.includes("right");n&&(t.style.top="0"),r&&(t.style.bottom="0"),s&&(t.style.left="0"),i&&(t.style.right="0"),(e==="top"||e==="bottom")&&(t.style.left="0",t.style.right="0"),(e==="left"||e==="right")&&(t.style.top="0",t.style.bottom="0")}attachHandles(){this.directions.forEach(t=>{let e;this.createCustomHandle?e=this.createCustomHandle(t):e=this.createHandle(t),e instanceof HTMLElement||(console.warn(`[ResizableNodeView] createCustomHandle("${t}") did not return an HTMLElement. Falling back to default handle.`),e=this.createHandle(t)),this.createCustomHandle||this.positionHandle(e,t),e.addEventListener("mousedown",n=>this.handleResizeStart(n,t)),e.addEventListener("touchstart",n=>this.handleResizeStart(n,t)),this.handleMap.set(t,e),this.wrapper.appendChild(e)})}removeHandles(){this.handleMap.forEach(t=>t.remove()),this.handleMap.clear()}applyInitialSize(){let t=this.node.attrs.width,e=this.node.attrs.height;t?(this.element.style.width=`${t}px`,this.initialWidth=t):this.initialWidth=this.element.offsetWidth,e?(this.element.style.height=`${e}px`,this.initialHeight=e):this.initialHeight=this.element.offsetHeight,this.initialWidth>0&&this.initialHeight>0&&(this.aspectRatio=this.initialWidth/this.initialHeight)}handleResizeStart(t,e){t.preventDefault(),t.stopPropagation(),this.isResizing=!0,this.activeHandle=e,IF(t)?(this.startX=t.touches[0].clientX,this.startY=t.touches[0].clientY):(this.startX=t.clientX,this.startY=t.clientY),this.startWidth=this.element.offsetWidth,this.startHeight=this.element.offsetHeight,this.startWidth>0&&this.startHeight>0&&(this.aspectRatio=this.startWidth/this.startHeight),this.getPos(),this.container.dataset.resizeState="true",this.classNames.resizing&&this.container.classList.add(this.classNames.resizing),document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("touchmove",this.handleTouchMove),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}handleResize(t,e){if(!this.activeHandle)return;let n=this.preserveAspectRatio||this.isShiftKeyPressed,{width:r,height:s}=this.calculateNewDimensions(this.activeHandle,t,e),i=this.applyConstraints(r,s,n);this.element.style.width=`${i.width}px`,this.element.style.height=`${i.height}px`,this.onResize&&this.onResize(i.width,i.height)}calculateNewDimensions(t,e,n){let r=this.startWidth,s=this.startHeight,i=t.includes("right"),o=t.includes("left"),a=t.includes("bottom"),l=t.includes("top");return i?r=this.startWidth+e:o&&(r=this.startWidth-e),a?s=this.startHeight+n:l&&(s=this.startHeight-n),(t==="right"||t==="left")&&(r=this.startWidth+(i?e:-e)),(t==="top"||t==="bottom")&&(s=this.startHeight+(a?n:-n)),this.preserveAspectRatio||this.isShiftKeyPressed?this.applyAspectRatio(r,s,t):{width:r,height:s}}applyConstraints(t,e,n){var r,s;if(!n){var i,o;let c=Math.max(this.minSize.width,t),h=Math.max(this.minSize.height,e);return!((i=this.maxSize)===null||i===void 0)&&i.width&&(c=Math.min(this.maxSize.width,c)),!((o=this.maxSize)===null||o===void 0)&&o.height&&(h=Math.min(this.maxSize.height,h)),{width:c,height:h}}let a=t,l=e;return a<this.minSize.width&&(a=this.minSize.width,l=a/this.aspectRatio),l<this.minSize.height&&(l=this.minSize.height,a=l*this.aspectRatio),!((r=this.maxSize)===null||r===void 0)&&r.width&&a>this.maxSize.width&&(a=this.maxSize.width,l=a/this.aspectRatio),!((s=this.maxSize)===null||s===void 0)&&s.height&&l>this.maxSize.height&&(l=this.maxSize.height,a=l*this.aspectRatio),{width:a,height:l}}applyAspectRatio(t,e,n){let r=n==="left"||n==="right",s=n==="top"||n==="bottom";return r?{width:t,height:t/this.aspectRatio}:s?{width:e*this.aspectRatio,height:e}:{width:t,height:t/this.aspectRatio}}};var tt=class VS extends Ag{constructor(...e){super(...e),this.type="node"}static create(e={}){let n=typeof e=="function"?e():e;return new VS(n)}configure(e){return super.configure(e)}extend(e){let n=typeof e=="function"?e():e;return super.extend(n)}};function Pn(t){return new Pg({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:s})=>{let i=Ve(t.getAttributes,void 0,r,s);if(i===!1||i===null)return null;let{tr:o}=e,a=r[r.length-1],l=r[0],c=n.to;if(a){let h=l.search(/\S/),d=n.from+l.indexOf(a),u=d+a.length;if(jh(n.from,n.to,e.doc).filter(f=>f.mark.type.excluded.find(p=>p===t.type&&p!==f.mark.type)).filter(f=>f.to>d).length)return null;u<n.to&&o.delete(u,n.to),d>n.from&&o.delete(n.from+h,d),c=n.from+h+a.length,o.addMark(n.from+h,c,t.type.create(i||{})),r.index!==void 0&&r.input!==void 0&&r.index+r[0].length>=r.input.length||o.removeStoredMark(t.type)}}})}var WS=new WeakSet,US=new WeakSet;function $i(t){let e=t;return WS.add(e),e}function Dg(t){return Array.isArray(t)&&WS.has(t)}function qS(t){return t.flatMap(e=>e==null?[]:Array.isArray(e)&&US.has(e)&&!Dg(e)?qS(e):[e])}function LF(t,e){if(t==="slot")return 0;if(t instanceof Function){let s=t(e);return Array.isArray(s)&&!Dg(s)&&!US.has(s)?$i(s):s}let{children:n,...r}=e??{};if(t==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");if(Array.isArray(n)){if(Dg(n))return $i([t,r,n]);if(n.length===0)return $i([t,r]);let s=qS(n);return s.length===0?$i([t,r]):$i([t,r,...s])}return n!=null?$i([t,r,n]):$i([t,r])}var Qo=(t,e)=>LF(t,e);var OF=(t,e)=>{var n;let{state:r}=t,{selection:s}=r;if(!s.empty)return!1;let{$from:i}=s;if(i.parentOffset!==0)return!1;let o=i.depth-1;if(o<0)return!1;let a=i.node(o),l=i.index(o);if(l===0)return!1;if(a.type===e)return t.commands.lift(e.name);let c=a.child(l-1);if(c.type!==e||!(!((n=c.lastChild)===null||n===void 0)&&n.isTextblock))return!1;let h=i.before()-1-1;return t.commands.command(({tr:d,dispatch:u})=>{if(!u)return!0;let f=i.parent.content,p=new ae(f,0,0);return d.replace(h,i.after(),p),d.setSelection(me.create(d.doc,h+f.size)),d.scrollIntoView(),u(d),!0})},zF=/^\s*>\s$/,KS=tt.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return Qo("blockquote",{...Ie(this.options.HTMLAttributes,t),children:Qo("slot",{})})},parseMarkdown:(t,e)=>{var n;let r=(n=e.parseBlockChildren)!==null&&n!==void 0?n:e.parseChildren;return e.createNode("blockquote",void 0,r(t.tokens||[]))},renderMarkdown:(t,e)=>{if(!t.content)return"";let n=">",r=[];return t.content.forEach((s,i)=>{var o,a;let l=((o=(a=e.renderChild)===null||a===void 0?void 0:a.call(e,s,i))!==null&&o!==void 0?o:e.renderChildren([s])).split(`
|
|
147
147
|
`).map(c=>c.trim()===""?n:`${n} ${c}`);r.push(l.join(`
|
|
148
148
|
`))}),r.join(`
|
|
149
149
|
${n}
|
|
150
|
-
`)},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote(),Backspace:()=>
|
|
150
|
+
`)},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote(),Backspace:()=>OF(this.editor,this.type)}},addInputRules(){return[Us({find:zF,type:this.type})]}});var NF=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,FF=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,BF=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,HF=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,GS=An.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return Qo("strong",{...Ie(this.options.HTMLAttributes,t),children:Qo("slot",{})})},markdownTokenName:"strong",parseMarkdown:(t,e)=>e.applyMark("bold",e.parseInline(t.tokens||[])),markdownOptions:{htmlReopen:{open:"<strong>",close:"</strong>"}},renderMarkdown:(t,e)=>`**${e.renderChildren(t)}**`,addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Jn({find:NF,type:this.type}),Jn({find:BF,type:this.type})]},addPasteRules(){return[Pn({find:FF,type:this.type}),Pn({find:HF,type:this.type})]}});var $F=t=>{let e=/`([^`]+)`(?!`)$/.exec(t);return!e||e.index>0&&t[e.index-1]==="`"?null:{index:e.index,text:e[0],replaceWith:e[1]}},jF=t=>{let e=/`([^`]+)`(?!`)/g,n=[],r;for(;(r=e.exec(t))!==null;)r.index>0&&t[r.index-1]==="`"||n.push({index:r.index,text:r[0],replaceWith:r[1]});return n},JS=An.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",Ie(this.options.HTMLAttributes,t),0]},markdownTokenName:"codespan",parseMarkdown:(t,e)=>e.applyMark("code",[{type:"text",text:t.text||""}]),renderMarkdown:(t,e)=>t.content?`\`${e.renderChildren(t.content)}\``:"",addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Jn({find:$F,type:this.type})]},addPasteRules(){return[Pn({find:jF,type:this.type})]}});var Mg=4,VF=/^```([a-z]+)?[\s\n]$/,WF=/^~~~([a-z]+)?[\s\n]$/,XS=tt.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,exitOnArrowUp:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:Mg,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;let{languageClassPrefix:n}=this.options;if(!n)return null;let r=[...((e=t.firstElementChild)===null||e===void 0?void 0:e.classList)||[]].filter(s=>s.startsWith(n)).map(s=>s.replace(n,""))[0];return r||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",Ie(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(t,e)=>{var n,r;return((n=t.raw)===null||n===void 0?void 0:n.startsWith("```"))===!1&&((r=t.raw)===null||r===void 0?void 0:r.startsWith("~~~"))===!1&&t.codeBlockStyle!=="indented"?[]:e.createNode("codeBlock",{language:t.lang||null},t.text?[e.createTextNode(t.text)]:[])},renderMarkdown:(t,e)=>{var n;let r="",s=((n=t.attrs)===null||n===void 0?void 0:n.language)||"";return t.content?r=[`\`\`\`${s}`,e.renderChildren(t.content),"```"].join(`
|
|
151
151
|
`):r=`\`\`\`${s}
|
|
152
152
|
|
|
153
153
|
\`\`\``,r},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:t,$anchor:e}=this.editor.state.selection,n=e.pos===1;return!t||e.parent.type.name!==this.name?!1:n||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;let n=(e=this.options.tabSize)!==null&&e!==void 0?e:Mg,{state:r}=t,{selection:s}=r,{$from:i,empty:o}=s;if(i.parent.type!==this.type)return!1;let a=" ".repeat(n);return o?t.commands.insertContent(a):t.commands.command(({tr:l})=>{let{from:c,to:h}=s,d=r.doc.textBetween(c,h,`
|
|
@@ -163,26 +163,26 @@ ${n}
|
|
|
163
163
|
`).map(d=>{var u;let f=((u=d.match(/^ */))===null||u===void 0?void 0:u[0])||"",p=Math.min(f.length,n);return d.slice(p)}).join(`
|
|
164
164
|
`);return a.replaceWith(l,c,r.schema.text(h)),!0})},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:e}=t,{selection:n}=e,{$from:r,empty:s}=n;if(!s||r.parent.type!==this.type)return!1;let i=r.parentOffset===r.parent.nodeSize-2,o=r.parent.textContent.endsWith(`
|
|
165
165
|
|
|
166
|
-
`);return!i||!o?!1:t.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowUp:({editor:t})=>{if(!this.options.exitOnArrowUp)return!1;let{state:e}=t,{selection:n}=e,{$from:r,empty:s}=n;if(!s||r.parent.type!==this.type||r.parentOffset!==0)return!1;let i=r.before();return i>0?!1:t.commands.insertDefaultBlock({pos:i})},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;let{state:e}=t,{selection:n,doc:r}=e,{$from:s,empty:i}=n;if(!i||s.parent.type!==this.type||s.parentOffset!==s.parent.nodeSize-2)return!1;let o=s.after();return o===void 0?!1:r.nodeAt(o)?t.commands.command(({tr:a})=>(a.setSelection(xe.near(r.resolve(o))),!0)):t.commands.exitCode()}}},addInputRules(){return[El({find:
|
|
166
|
+
`);return!i||!o?!1:t.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowUp:({editor:t})=>{if(!this.options.exitOnArrowUp)return!1;let{state:e}=t,{selection:n}=e,{$from:r,empty:s}=n;if(!s||r.parent.type!==this.type||r.parentOffset!==0)return!1;let i=r.before();return i>0?!1:t.commands.insertDefaultBlock({pos:i})},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;let{state:e}=t,{selection:n,doc:r}=e,{$from:s,empty:i}=n;if(!i||s.parent.type!==this.type||s.parentOffset!==s.parent.nodeSize-2)return!1;let o=s.after();return o===void 0?!1:r.nodeAt(o)?t.commands.command(({tr:a})=>(a.setSelection(xe.near(r.resolve(o))),!0)):t.commands.exitCode()}}},addInputRules(){return[El({find:VF,type:this.type,getAttributes:t=>({language:t[1]})}),El({find:WF,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new Oe({key:new Xe("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;let n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),s=r?JSON.parse(r):void 0,i=s?.mode;if(!n||!i)return!1;let{tr:o,schema:a}=t.state,l=a.text(n.replace(/\r\n?/g,`
|
|
167
167
|
`));return o.replaceSelectionWith(this.type.create({language:i},l)),o.selection.$from.parent.type!==this.type&&o.setSelection(me.near(o.doc.resolve(Math.max(0,o.selection.from-2)))),o.setMeta("paste",!0),t.dispatch(o),!0}}})]}});var YS=tt.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
|
|
168
168
|
|
|
169
169
|
`):""});var QS=tt.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",Ie(this.options.HTMLAttributes,t)]},renderText(){return`
|
|
170
170
|
`},renderMarkdown:()=>`
|
|
171
|
-
`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{let{selection:s,storedMarks:i}=n;if(s.$from.parent.type.spec.isolating)return!1;let{keepMarks:o}=this.options,{splittableMarks:a}=r.extensionManager,l=i||s.$to.parentOffset&&s.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:h})=>{if(h&&l&&o){let d=l.filter(u=>a.includes(u.type.name));c.ensureMarks(d)}return!0}).scrollIntoView().run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}});var ZS=tt.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,Ie(this.options.HTMLAttributes,e),0]},parseMarkdown:(t,e)=>e.createNode("heading",{level:t.depth||1},e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>{var n;let r=!((n=t.attrs)===null||n===void 0)&&n.level?parseInt(t.attrs.level,10):1,s="#".repeat(r);return t.content?`${s} ${e.renderChildren(t.content)}`:""},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>El({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}});var eC=tt.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",Ie(this.options.HTMLAttributes,t)]},markdownTokenName:"hr",parseMarkdown:(t,e)=>e.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!OS(e,e.schema.nodes[this.name]))return!1;let{selection:n}=e,{$to:r}=n,s=t();return Vh(n)?s.insertContentAt(r.pos,{type:this.name}):s.insertContent({type:this.name}),s.command(({state:i,tr:o,dispatch:a})=>{if(a){let{$to:l}=o.selection,c=l.end();if(l.nodeAfter)l.nodeAfter.isTextblock?o.setSelection(me.create(o.doc,l.pos+1)):l.nodeAfter.isBlock?o.setSelection(we.create(o.doc,l.pos)):o.setSelection(me.create(o.doc,l.pos));else{let h=i.schema.nodes[this.options.nextNodeType]||l.parent.type.contentMatch.defaultType,d=h?.create();d&&(o.insert(c,d),o.setSelection(me.create(o.doc,c+1)))}o.scrollIntoView()}return!0}).run()}}},addInputRules(){return[Uh({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}});var U3=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,q3=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,K3=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,G3=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,tC=An.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",Ie(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(t,e)=>e.applyMark("italic",e.parseInline(t.tokens||[])),markdownOptions:{htmlReopen:{open:"<em>",close:"</em>"}},renderMarkdown:(t,e)=>`*${e.renderChildren(t)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Jn({find:U3,type:this.type}),Jn({find:K3,type:this.type})]},addPasteRules(){return[Pn({find:q3,type:this.type}),Pn({find:G3,type:this.type})]}});var J3="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xF6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",X3="\u03B5\u03BB1\u03C52\u0431\u04331\u0435\u043B3\u0434\u0435\u0442\u04384\u0435\u044E2\u043A\u0430\u0442\u043E\u043B\u0438\u043A6\u043E\u043C3\u043C\u043A\u04342\u043E\u043D1\u0441\u043A\u0432\u04306\u043E\u043D\u043B\u0430\u0439\u043D5\u0440\u04333\u0440\u0443\u04412\u04442\u0441\u0430\u0439\u04423\u0440\u04313\u0443\u043A\u04403\u049B\u0430\u04373\u0570\u0561\u05753\u05D9\u05E9\u05E8\u05D0\u05DC5\u05E7\u05D5\u05DD3\u0627\u0628\u0648\u0638\u0628\u064A5\u0631\u0627\u0645\u0643\u06485\u0644\u0627\u0631\u062F\u06464\u0628\u062D\u0631\u064A\u06465\u062C\u0632\u0627\u0626\u06315\u0633\u0639\u0648\u062F\u064A\u06296\u0639\u0644\u064A\u0627\u06465\u0645\u063A\u0631\u06285\u0645\u0627\u0631\u0627\u062A5\u06CC\u0631\u0627\u06465\u0628\u0627\u0631\u062A2\u0632\u0627\u06314\u064A\u062A\u06433\u06BE\u0627\u0631\u062A5\u062A\u0648\u0646\u06334\u0633\u0648\u062F\u0627\u06463\u0631\u064A\u06295\u0634\u0628\u0643\u06294\u0639\u0631\u0627\u06422\u06282\u0645\u0627\u06464\u0641\u0644\u0633\u0637\u064A\u06466\u0642\u0637\u06313\u0643\u0627\u062B\u0648\u0644\u064A\u06436\u0648\u06453\u0645\u0635\u06312\u0644\u064A\u0633\u064A\u06275\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u06277\u0642\u06394\u0647\u0645\u0631\u0627\u06475\u067E\u0627\u06A9\u0633\u062A\u0627\u06467\u0680\u0627\u0631\u062A4\u0915\u0949\u092E3\u0928\u0947\u091F3\u092D\u093E\u0930\u09240\u092E\u094D3\u094B\u09245\u0938\u0902\u0917\u0920\u09285\u09AC\u09BE\u0982\u09B2\u09BE5\u09AD\u09BE\u09B0\u09A42\u09F0\u09A44\u0A2D\u0A3E\u0A30\u0A244\u0AAD\u0ABE\u0AB0\u0AA44\u0B2D\u0B3E\u0B30\u0B244\u0B87\u0BA8\u0BCD\u0BA4\u0BBF\u0BAF\u0BBE6\u0BB2\u0B99\u0BCD\u0B95\u0BC86\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD11\u0C2D\u0C3E\u0C30\u0C24\u0C4D5\u0CAD\u0CBE\u0CB0\u0CA44\u0D2D\u0D3E\u0D30\u0D24\u0D025\u0DBD\u0D82\u0D9A\u0DCF4\u0E04\u0E2D\u0E213\u0E44\u0E17\u0E223\u0EA5\u0EB2\u0EA73\u10D2\u10D42\u307F\u3093\u306A3\u30A2\u30DE\u30BE\u30F34\u30AF\u30E9\u30A6\u30C94\u30B0\u30FC\u30B0\u30EB4\u30B3\u30E02\u30B9\u30C8\u30A23\u30BB\u30FC\u30EB3\u30D5\u30A1\u30C3\u30B7\u30E7\u30F36\u30DD\u30A4\u30F3\u30C84\u4E16\u754C2\u4E2D\u4FE11\u56FD1\u570B1\u6587\u7F513\u4E9A\u9A6C\u900A3\u4F01\u4E1A2\u4F5B\u5C712\u4FE1\u606F2\u5065\u5EB72\u516B\u53662\u516C\u53F81\u76CA2\u53F0\u6E7E1\u70632\u5546\u57CE1\u5E971\u68072\u5609\u91CC0\u5927\u9152\u5E975\u5728\u7EBF2\u5927\u62FF2\u5929\u4E3B\u65593\u5A31\u4E502\u5BB6\u96FB2\u5E7F\u4E1C2\u5FAE\u535A2\u6148\u55842\u6211\u7231\u4F603\u624B\u673A2\u62DB\u80582\u653F\u52A11\u5E9C2\u65B0\u52A0\u57612\u95FB2\u65F6\u5C1A2\u66F8\u7C4D2\u673A\u67842\u6DE1\u9A6C\u95213\u6E38\u620F2\u6FB3\u95802\u70B9\u770B2\u79FB\u52A82\u7EC4\u7EC7\u673A\u67844\u7F51\u57401\u5E971\u7AD91\u7EDC2\u8054\u901A2\u8C37\u6B4C2\u8D2D\u72692\u901A\u8CA92\u96C6\u56E22\u96FB\u8A0A\u76C8\u79D14\u98DE\u5229\u6D663\u98DF\u54C12\u9910\u53852\u9999\u683C\u91CC\u62C93\u6E2F2\uB2F7\uB1371\uCEF42\uC0BC\uC1312\uD55C\uAD6D2",Fg="numeric",Bg="ascii",Hg="alpha",Dl="asciinumeric",Pl="alphanumeric",$g="domain",aC="emoji",Y3="scheme",Q3="slashscheme",Rg="whitespace";function Z3(t,e){return t in e||(e[t]=[]),e[t]}function ji(t,e,n){e[Fg]&&(e[Dl]=!0,e[Pl]=!0),e[Bg]&&(e[Dl]=!0,e[Hg]=!0),e[Dl]&&(e[Pl]=!0),e[Hg]&&(e[Pl]=!0),e[Pl]&&(e[$g]=!0),e[aC]&&(e[$g]=!0);for(let r in e){let s=Z3(r,n);s.indexOf(t)<0&&s.push(t)}}function eF(t,e){let n={};for(let r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}function kn(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}kn.groups={};kn.prototype={accepts(){return!!this.t},go(t){let e=this,n=e.j[t];if(n)return n;for(let r=0;r<e.jr.length;r++){let s=e.jr[r][0],i=e.jr[r][1];if(i&&s.test(t))return i}return e.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,n,r){for(let s=0;s<t.length;s++)this.tt(t[s],e,n,r)},tr(t,e,n,r){r=r||kn.groups;let s;return e&&e.j?s=e:(s=new kn(e),n&&r&&ji(e,n,r)),this.jr.push([t,s]),s},ts(t,e,n,r){let s=this,i=t.length;if(!i)return s;for(let o=0;o<i-1;o++)s=s.tt(t[o]);return s.tt(t[i-1],e,n,r)},tt(t,e,n,r){r=r||kn.groups;let s=this;if(e&&e.j)return s.j[t]=e,e;let i=e,o,a=s.go(t);if(a?(o=new kn,Object.assign(o.j,a.j),o.jr.push.apply(o.jr,a.jr),o.jd=a.jd,o.t=a.t):o=new kn,i){if(r)if(o.t&&typeof o.t=="string"){let l=Object.assign(eF(o.t,r),n);ji(i,l,r)}else n&&ji(i,n,r);o.t=i}return s.j[t]=o,o}};var ze=(t,e,n,r,s)=>t.ta(e,n,r,s),vt=(t,e,n,r,s)=>t.tr(e,n,r,s),nC=(t,e,n,r,s)=>t.ts(e,n,r,s),re=(t,e,n,r,s)=>t.tt(e,n,r,s),is="WORD",jg="UWORD",lC="ASCIINUMERICAL",cC="ALPHANUMERICAL",zl="LOCALHOST",Vg="TLD",Wg="UTLD",Jh="SCHEME",Zo="SLASH_SCHEME",qg="NUM",Ug="WS",Kg="NL",Ml="OPENBRACE",Rl="CLOSEBRACE",Xh="OPENBRACKET",Yh="CLOSEBRACKET",Qh="OPENPAREN",Zh="CLOSEPAREN",ed="OPENANGLEBRACKET",td="CLOSEANGLEBRACKET",nd="FULLWIDTHLEFTPAREN",rd="FULLWIDTHRIGHTPAREN",sd="LEFTCORNERBRACKET",id="RIGHTCORNERBRACKET",od="LEFTWHITECORNERBRACKET",ad="RIGHTWHITECORNERBRACKET",ld="FULLWIDTHLESSTHAN",cd="FULLWIDTHGREATERTHAN",hd="AMPERSAND",dd="APOSTROPHE",ud="ASTERISK",Ks="AT",pd="BACKSLASH",fd="BACKTICK",md="CARET",Vi="COLON",Gg="COMMA",gd="DOLLAR",Er="DOT",bd="EQUALS",Jg="EXCLAMATION",Yn="HYPHEN",Il="PERCENT",vd="PIPE",yd="PLUS",wd="POUND",Ll="QUERY",Xg="QUOTE",hC="FULLWIDTHMIDDLEDOT",Yg="SEMI",Ar="SLASH",Ol="TILDE",xd="UNDERSCORE",dC="EMOJI",kd="SYM",uC=Object.freeze({__proto__:null,ALPHANUMERICAL:cC,AMPERSAND:hd,APOSTROPHE:dd,ASCIINUMERICAL:lC,ASTERISK:ud,AT:Ks,BACKSLASH:pd,BACKTICK:fd,CARET:md,CLOSEANGLEBRACKET:td,CLOSEBRACE:Rl,CLOSEBRACKET:Yh,CLOSEPAREN:Zh,COLON:Vi,COMMA:Gg,DOLLAR:gd,DOT:Er,EMOJI:dC,EQUALS:bd,EXCLAMATION:Jg,FULLWIDTHGREATERTHAN:cd,FULLWIDTHLEFTPAREN:nd,FULLWIDTHLESSTHAN:ld,FULLWIDTHMIDDLEDOT:hC,FULLWIDTHRIGHTPAREN:rd,HYPHEN:Yn,LEFTCORNERBRACKET:sd,LEFTWHITECORNERBRACKET:od,LOCALHOST:zl,NL:Kg,NUM:qg,OPENANGLEBRACKET:ed,OPENBRACE:Ml,OPENBRACKET:Xh,OPENPAREN:Qh,PERCENT:Il,PIPE:vd,PLUS:yd,POUND:wd,QUERY:Ll,QUOTE:Xg,RIGHTCORNERBRACKET:id,RIGHTWHITECORNERBRACKET:ad,SCHEME:Jh,SEMI:Yg,SLASH:Ar,SLASH_SCHEME:Zo,SYM:kd,TILDE:Ol,TLD:Vg,UNDERSCORE:xd,UTLD:Wg,UWORD:jg,WORD:is,WS:Ug}),rs=/[a-z]/,Al=/\p{L}/u,Ig=/\p{Emoji}/u;var ss=/\d/,Lg=/\s/;var rC="\r",Og=`
|
|
172
|
-
`,
|
|
171
|
+
`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{let{selection:s,storedMarks:i}=n;if(s.$from.parent.type.spec.isolating)return!1;let{keepMarks:o}=this.options,{splittableMarks:a}=r.extensionManager,l=i||s.$to.parentOffset&&s.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:h})=>{if(h&&l&&o){let d=l.filter(u=>a.includes(u.type.name));c.ensureMarks(d)}return!0}).scrollIntoView().run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}});var ZS=tt.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,Ie(this.options.HTMLAttributes,e),0]},parseMarkdown:(t,e)=>e.createNode("heading",{level:t.depth||1},e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>{var n;let r=!((n=t.attrs)===null||n===void 0)&&n.level?parseInt(t.attrs.level,10):1,s="#".repeat(r);return t.content?`${s} ${e.renderChildren(t.content)}`:""},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>El({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}});var eC=tt.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",Ie(this.options.HTMLAttributes,t)]},markdownTokenName:"hr",parseMarkdown:(t,e)=>e.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!OS(e,e.schema.nodes[this.name]))return!1;let{selection:n}=e,{$to:r}=n,s=t();return Vh(n)?s.insertContentAt(r.pos,{type:this.name}):s.insertContent({type:this.name}),s.command(({state:i,tr:o,dispatch:a})=>{if(a){let{$to:l}=o.selection,c=l.end();if(l.nodeAfter)l.nodeAfter.isTextblock?o.setSelection(me.create(o.doc,l.pos+1)):l.nodeAfter.isBlock?o.setSelection(we.create(o.doc,l.pos)):o.setSelection(me.create(o.doc,l.pos));else{let h=i.schema.nodes[this.options.nextNodeType]||l.parent.type.contentMatch.defaultType,d=h?.create();d&&(o.insert(c,d),o.setSelection(me.create(o.doc,c+1)))}o.scrollIntoView()}return!0}).run()}}},addInputRules(){return[Uh({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}});var UF=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,qF=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,KF=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,GF=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,tC=An.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",Ie(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(t,e)=>e.applyMark("italic",e.parseInline(t.tokens||[])),markdownOptions:{htmlReopen:{open:"<em>",close:"</em>"}},renderMarkdown:(t,e)=>`*${e.renderChildren(t)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Jn({find:UF,type:this.type}),Jn({find:KF,type:this.type})]},addPasteRules(){return[Pn({find:qF,type:this.type}),Pn({find:GF,type:this.type})]}});var JF="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xF6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",XF="\u03B5\u03BB1\u03C52\u0431\u04331\u0435\u043B3\u0434\u0435\u0442\u04384\u0435\u044E2\u043A\u0430\u0442\u043E\u043B\u0438\u043A6\u043E\u043C3\u043C\u043A\u04342\u043E\u043D1\u0441\u043A\u0432\u04306\u043E\u043D\u043B\u0430\u0439\u043D5\u0440\u04333\u0440\u0443\u04412\u04442\u0441\u0430\u0439\u04423\u0440\u04313\u0443\u043A\u04403\u049B\u0430\u04373\u0570\u0561\u05753\u05D9\u05E9\u05E8\u05D0\u05DC5\u05E7\u05D5\u05DD3\u0627\u0628\u0648\u0638\u0628\u064A5\u0631\u0627\u0645\u0643\u06485\u0644\u0627\u0631\u062F\u06464\u0628\u062D\u0631\u064A\u06465\u062C\u0632\u0627\u0626\u06315\u0633\u0639\u0648\u062F\u064A\u06296\u0639\u0644\u064A\u0627\u06465\u0645\u063A\u0631\u06285\u0645\u0627\u0631\u0627\u062A5\u06CC\u0631\u0627\u06465\u0628\u0627\u0631\u062A2\u0632\u0627\u06314\u064A\u062A\u06433\u06BE\u0627\u0631\u062A5\u062A\u0648\u0646\u06334\u0633\u0648\u062F\u0627\u06463\u0631\u064A\u06295\u0634\u0628\u0643\u06294\u0639\u0631\u0627\u06422\u06282\u0645\u0627\u06464\u0641\u0644\u0633\u0637\u064A\u06466\u0642\u0637\u06313\u0643\u0627\u062B\u0648\u0644\u064A\u06436\u0648\u06453\u0645\u0635\u06312\u0644\u064A\u0633\u064A\u06275\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u06277\u0642\u06394\u0647\u0645\u0631\u0627\u06475\u067E\u0627\u06A9\u0633\u062A\u0627\u06467\u0680\u0627\u0631\u062A4\u0915\u0949\u092E3\u0928\u0947\u091F3\u092D\u093E\u0930\u09240\u092E\u094D3\u094B\u09245\u0938\u0902\u0917\u0920\u09285\u09AC\u09BE\u0982\u09B2\u09BE5\u09AD\u09BE\u09B0\u09A42\u09F0\u09A44\u0A2D\u0A3E\u0A30\u0A244\u0AAD\u0ABE\u0AB0\u0AA44\u0B2D\u0B3E\u0B30\u0B244\u0B87\u0BA8\u0BCD\u0BA4\u0BBF\u0BAF\u0BBE6\u0BB2\u0B99\u0BCD\u0B95\u0BC86\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD11\u0C2D\u0C3E\u0C30\u0C24\u0C4D5\u0CAD\u0CBE\u0CB0\u0CA44\u0D2D\u0D3E\u0D30\u0D24\u0D025\u0DBD\u0D82\u0D9A\u0DCF4\u0E04\u0E2D\u0E213\u0E44\u0E17\u0E223\u0EA5\u0EB2\u0EA73\u10D2\u10D42\u307F\u3093\u306A3\u30A2\u30DE\u30BE\u30F34\u30AF\u30E9\u30A6\u30C94\u30B0\u30FC\u30B0\u30EB4\u30B3\u30E02\u30B9\u30C8\u30A23\u30BB\u30FC\u30EB3\u30D5\u30A1\u30C3\u30B7\u30E7\u30F36\u30DD\u30A4\u30F3\u30C84\u4E16\u754C2\u4E2D\u4FE11\u56FD1\u570B1\u6587\u7F513\u4E9A\u9A6C\u900A3\u4F01\u4E1A2\u4F5B\u5C712\u4FE1\u606F2\u5065\u5EB72\u516B\u53662\u516C\u53F81\u76CA2\u53F0\u6E7E1\u70632\u5546\u57CE1\u5E971\u68072\u5609\u91CC0\u5927\u9152\u5E975\u5728\u7EBF2\u5927\u62FF2\u5929\u4E3B\u65593\u5A31\u4E502\u5BB6\u96FB2\u5E7F\u4E1C2\u5FAE\u535A2\u6148\u55842\u6211\u7231\u4F603\u624B\u673A2\u62DB\u80582\u653F\u52A11\u5E9C2\u65B0\u52A0\u57612\u95FB2\u65F6\u5C1A2\u66F8\u7C4D2\u673A\u67842\u6DE1\u9A6C\u95213\u6E38\u620F2\u6FB3\u95802\u70B9\u770B2\u79FB\u52A82\u7EC4\u7EC7\u673A\u67844\u7F51\u57401\u5E971\u7AD91\u7EDC2\u8054\u901A2\u8C37\u6B4C2\u8D2D\u72692\u901A\u8CA92\u96C6\u56E22\u96FB\u8A0A\u76C8\u79D14\u98DE\u5229\u6D663\u98DF\u54C12\u9910\u53852\u9999\u683C\u91CC\u62C93\u6E2F2\uB2F7\uB1371\uCEF42\uC0BC\uC1312\uD55C\uAD6D2",Fg="numeric",Bg="ascii",Hg="alpha",Dl="asciinumeric",Pl="alphanumeric",$g="domain",aC="emoji",YF="scheme",QF="slashscheme",Rg="whitespace";function ZF(t,e){return t in e||(e[t]=[]),e[t]}function ji(t,e,n){e[Fg]&&(e[Dl]=!0,e[Pl]=!0),e[Bg]&&(e[Dl]=!0,e[Hg]=!0),e[Dl]&&(e[Pl]=!0),e[Hg]&&(e[Pl]=!0),e[Pl]&&(e[$g]=!0),e[aC]&&(e[$g]=!0);for(let r in e){let s=ZF(r,n);s.indexOf(t)<0&&s.push(t)}}function e3(t,e){let n={};for(let r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}function kn(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}kn.groups={};kn.prototype={accepts(){return!!this.t},go(t){let e=this,n=e.j[t];if(n)return n;for(let r=0;r<e.jr.length;r++){let s=e.jr[r][0],i=e.jr[r][1];if(i&&s.test(t))return i}return e.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,n,r){for(let s=0;s<t.length;s++)this.tt(t[s],e,n,r)},tr(t,e,n,r){r=r||kn.groups;let s;return e&&e.j?s=e:(s=new kn(e),n&&r&&ji(e,n,r)),this.jr.push([t,s]),s},ts(t,e,n,r){let s=this,i=t.length;if(!i)return s;for(let o=0;o<i-1;o++)s=s.tt(t[o]);return s.tt(t[i-1],e,n,r)},tt(t,e,n,r){r=r||kn.groups;let s=this;if(e&&e.j)return s.j[t]=e,e;let i=e,o,a=s.go(t);if(a?(o=new kn,Object.assign(o.j,a.j),o.jr.push.apply(o.jr,a.jr),o.jd=a.jd,o.t=a.t):o=new kn,i){if(r)if(o.t&&typeof o.t=="string"){let l=Object.assign(e3(o.t,r),n);ji(i,l,r)}else n&&ji(i,n,r);o.t=i}return s.j[t]=o,o}};var ze=(t,e,n,r,s)=>t.ta(e,n,r,s),vt=(t,e,n,r,s)=>t.tr(e,n,r,s),nC=(t,e,n,r,s)=>t.ts(e,n,r,s),re=(t,e,n,r,s)=>t.tt(e,n,r,s),is="WORD",jg="UWORD",lC="ASCIINUMERICAL",cC="ALPHANUMERICAL",zl="LOCALHOST",Vg="TLD",Wg="UTLD",Jh="SCHEME",Zo="SLASH_SCHEME",qg="NUM",Ug="WS",Kg="NL",Ml="OPENBRACE",Rl="CLOSEBRACE",Xh="OPENBRACKET",Yh="CLOSEBRACKET",Qh="OPENPAREN",Zh="CLOSEPAREN",ed="OPENANGLEBRACKET",td="CLOSEANGLEBRACKET",nd="FULLWIDTHLEFTPAREN",rd="FULLWIDTHRIGHTPAREN",sd="LEFTCORNERBRACKET",id="RIGHTCORNERBRACKET",od="LEFTWHITECORNERBRACKET",ad="RIGHTWHITECORNERBRACKET",ld="FULLWIDTHLESSTHAN",cd="FULLWIDTHGREATERTHAN",hd="AMPERSAND",dd="APOSTROPHE",ud="ASTERISK",Ks="AT",pd="BACKSLASH",fd="BACKTICK",md="CARET",Vi="COLON",Gg="COMMA",gd="DOLLAR",Er="DOT",bd="EQUALS",Jg="EXCLAMATION",Yn="HYPHEN",Il="PERCENT",vd="PIPE",yd="PLUS",wd="POUND",Ll="QUERY",Xg="QUOTE",hC="FULLWIDTHMIDDLEDOT",Yg="SEMI",Ar="SLASH",Ol="TILDE",xd="UNDERSCORE",dC="EMOJI",kd="SYM",uC=Object.freeze({__proto__:null,ALPHANUMERICAL:cC,AMPERSAND:hd,APOSTROPHE:dd,ASCIINUMERICAL:lC,ASTERISK:ud,AT:Ks,BACKSLASH:pd,BACKTICK:fd,CARET:md,CLOSEANGLEBRACKET:td,CLOSEBRACE:Rl,CLOSEBRACKET:Yh,CLOSEPAREN:Zh,COLON:Vi,COMMA:Gg,DOLLAR:gd,DOT:Er,EMOJI:dC,EQUALS:bd,EXCLAMATION:Jg,FULLWIDTHGREATERTHAN:cd,FULLWIDTHLEFTPAREN:nd,FULLWIDTHLESSTHAN:ld,FULLWIDTHMIDDLEDOT:hC,FULLWIDTHRIGHTPAREN:rd,HYPHEN:Yn,LEFTCORNERBRACKET:sd,LEFTWHITECORNERBRACKET:od,LOCALHOST:zl,NL:Kg,NUM:qg,OPENANGLEBRACKET:ed,OPENBRACE:Ml,OPENBRACKET:Xh,OPENPAREN:Qh,PERCENT:Il,PIPE:vd,PLUS:yd,POUND:wd,QUERY:Ll,QUOTE:Xg,RIGHTCORNERBRACKET:id,RIGHTWHITECORNERBRACKET:ad,SCHEME:Jh,SEMI:Yg,SLASH:Ar,SLASH_SCHEME:Zo,SYM:kd,TILDE:Ol,TLD:Vg,UNDERSCORE:xd,UTLD:Wg,UWORD:jg,WORD:is,WS:Ug}),rs=/[a-z]/,Al=/\p{L}/u,Ig=/\p{Emoji}/u;var ss=/\d/,Lg=/\s/;var rC="\r",Og=`
|
|
172
|
+
`,t3="\uFE0F",n3="\u200D",zg="\uFFFC",qh=null,Kh=null;function r3(t=[]){let e={};kn.groups=e;let n=new kn;qh==null&&(qh=sC(JF)),Kh==null&&(Kh=sC(XF)),re(n,"'",dd),re(n,"{",Ml),re(n,"}",Rl),re(n,"[",Xh),re(n,"]",Yh),re(n,"(",Qh),re(n,")",Zh),re(n,"<",ed),re(n,">",td),re(n,"\uFF08",nd),re(n,"\uFF09",rd),re(n,"\u300C",sd),re(n,"\u300D",id),re(n,"\u300E",od),re(n,"\u300F",ad),re(n,"\uFF1C",ld),re(n,"\uFF1E",cd),re(n,"&",hd),re(n,"*",ud),re(n,"@",Ks),re(n,"`",fd),re(n,"^",md),re(n,":",Vi),re(n,",",Gg),re(n,"$",gd),re(n,".",Er),re(n,"=",bd),re(n,"!",Jg),re(n,"-",Yn),re(n,"%",Il),re(n,"|",vd),re(n,"+",yd),re(n,"#",wd),re(n,"?",Ll),re(n,'"',Xg),re(n,"/",Ar),re(n,";",Yg),re(n,"~",Ol),re(n,"_",xd),re(n,"\\",pd),re(n,"\u30FB",hC);let r=vt(n,ss,qg,{[Fg]:!0});vt(r,ss,r);let s=vt(r,rs,lC,{[Dl]:!0}),i=vt(r,Al,cC,{[Pl]:!0}),o=vt(n,rs,is,{[Bg]:!0});vt(o,ss,s),vt(o,rs,o),vt(s,ss,s),vt(s,rs,s);let a=vt(n,Al,jg,{[Hg]:!0});vt(a,rs),vt(a,ss,i),vt(a,Al,a),vt(i,ss,i),vt(i,rs),vt(i,Al,i);let l=re(n,Og,Kg,{[Rg]:!0}),c=re(n,rC,Ug,{[Rg]:!0}),h=vt(n,Lg,Ug,{[Rg]:!0});re(n,zg,h),re(c,Og,l),re(c,zg,h),vt(c,Lg,h),re(h,rC),re(h,Og),vt(h,Lg,h),re(h,zg,h);let d=vt(n,Ig,dC,{[aC]:!0});re(d,"#"),vt(d,Ig,d),re(d,t3,d);let u=re(d,n3);re(u,"#"),vt(u,Ig,d);let f=[[rs,o],[ss,s]],p=[[rs,null],[Al,a],[ss,i]];for(let m=0;m<qh.length;m++)qs(n,qh[m],Vg,is,f);for(let m=0;m<Kh.length;m++)qs(n,Kh[m],Wg,jg,p);ji(Vg,{tld:!0,ascii:!0},e),ji(Wg,{utld:!0,alpha:!0},e),qs(n,"file",Jh,is,f),qs(n,"mailto",Jh,is,f),qs(n,"http",Zo,is,f),qs(n,"https",Zo,is,f),qs(n,"ftp",Zo,is,f),qs(n,"ftps",Zo,is,f),ji(Jh,{scheme:!0,ascii:!0},e),ji(Zo,{slashscheme:!0,ascii:!0},e),t=t.sort((m,g)=>m[0]>g[0]?1:-1);for(let m=0;m<t.length;m++){let g=t[m][0],v=t[m][1]?{[YF]:!0}:{[QF]:!0};g.indexOf("-")>=0?v[$g]=!0:rs.test(g)?ss.test(g)?v[Dl]=!0:v[Bg]=!0:v[Fg]=!0,nC(n,g,g,v)}return nC(n,"localhost",zl,{ascii:!0}),n.jd=new kn(kd),{start:n,tokens:Object.assign({groups:e},uC)}}function pC(t,e){let n=s3(e.replace(/[A-Z]/g,a=>a.toLowerCase())),r=n.length,s=[],i=0,o=0;for(;o<r;){let a=t,l=null,c=0,h=null,d=-1,u=-1;for(;o<r&&(l=a.go(n[o]));)a=l,a.accepts()?(d=0,u=0,h=a):d>=0&&(d+=n[o].length,u++),c+=n[o].length,i+=n[o].length,o++;i-=d,o-=u,c-=d,s.push({t:h.t,v:e.slice(i-c,i),s:i-c,e:i})}return s}function s3(t){let e=[],n=t.length,r=0;for(;r<n;){let s=t.charCodeAt(r),i,o=s<55296||s>56319||r+1===n||(i=t.charCodeAt(r+1))<56320||i>57343?t[r]:t.slice(r,r+2);e.push(o),r+=o.length}return e}function qs(t,e,n,r,s){let i,o=e.length;for(let a=0;a<o-1;a++){let l=e[a];t.j[l]?i=t.j[l]:(i=new kn(r),i.jr=s.slice(),t.j[l]=i),t=i}return i=new kn(n),i.jr=s.slice(),t.j[e[o-1]]=i,i}function sC(t){let e=[],n=[],r=0,s="0123456789";for(;r<t.length;){let i=0;for(;s.indexOf(t[r+i])>=0;)i++;if(i>0){e.push(n.join(""));for(let o=parseInt(t.substring(r,r+i),10);o>0;o--)n.pop();r+=i}else n.push(t[r]),r++}return e}var Nl={defaultProtocol:"http",events:null,format:iC,formatHref:iC,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Qg(t,e=null){let n=Object.assign({},Nl);t&&(n=Object.assign(n,t instanceof Qg?t.o:t));let r=n.ignoreTags,s=[];for(let i=0;i<r.length;i++)s.push(r[i].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=s}Qg.prototype={o:Nl,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,n){let r=e!=null,s=this.o[t];return s&&(typeof s=="object"?(s=n.t in s?s[n.t]:Nl[t],typeof s=="function"&&r&&(s=s(e,n))):typeof s=="function"&&r&&(s=s(e,n.t,n)),s)},getObj(t,e,n){let r=this.o[t];return typeof r=="function"&&e!=null&&(r=r(e,n.t,n)),r},render(t){let e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function iC(t){return t}function fC(t,e){this.t="token",this.v=t,this.tk=e}fC.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){let e=this.toString(),n=t.get("truncate",e,this),r=t.get("format",e,this);return n&&r.length>n?r.substring(0,n)+"\u2026":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=Nl.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){let e=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),s=t.get("tagName",n,e),i=this.toFormattedString(t),o={},a=t.get("className",n,e),l=t.get("target",n,e),c=t.get("rel",n,e),h=t.getObj("attributes",n,e),d=t.getObj("events",n,e);return o.href=r,a&&(o.class=a),l&&(o.target=l),c&&(o.rel=c),h&&Object.assign(o,h),{tagName:s,attributes:o,content:i,eventListeners:d}}};function _d(t,e){class n extends fC{constructor(s,i){super(s,i),this.t=t}}for(let r in e)n.prototype[r]=e[r];return n.t=t,n}var i3=_d("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),oC=_d("text"),o3=_d("nl"),Gh=_d("url",{isLink:!0,toHref(t=Nl.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){let t=this.tk;return t.length>=2&&t[0].t!==zl&&t[1].t===Vi}});var Xn=t=>new kn(t);function a3({groups:t}){let e=t.domain.concat([hd,ud,Ks,pd,fd,md,gd,bd,Yn,qg,Il,vd,yd,wd,Ar,kd,Ol,xd]),n=[dd,Vi,Gg,Er,Jg,Il,Ll,Xg,Yg,ed,td,Ml,Rl,Yh,Xh,Qh,Zh,nd,rd,sd,id,od,ad,ld,cd],r=[hd,dd,ud,pd,fd,md,gd,bd,Yn,Ml,Rl,Il,vd,yd,wd,Ll,Ar,kd,Ol,xd],s=Xn(),i=re(s,Ol);ze(i,r,i),ze(i,t.domain,i);let o=Xn(),a=Xn(),l=Xn();ze(s,t.domain,o),ze(s,t.scheme,a),ze(s,t.slashscheme,l),ze(o,r,i),ze(o,t.domain,o);let c=re(o,Ks);re(i,Ks,c),re(a,Ks,c),re(l,Ks,c);let h=re(i,Er);ze(h,r,i),ze(h,t.domain,i);let d=Xn();ze(c,t.domain,d),ze(d,t.domain,d);let u=re(d,Er);ze(u,t.domain,d);let f=Xn(i3);ze(u,t.tld,f),ze(u,t.utld,f),re(c,zl,f);let p=re(d,Yn);re(p,Yn,p),ze(p,t.domain,d),ze(f,t.domain,d),re(f,Er,u),re(f,Yn,p);let m=re(o,Yn),g=re(o,Er);re(m,Yn,m),ze(m,t.domain,o),ze(g,r,i),ze(g,t.domain,o);let b=Xn(Gh);ze(g,t.tld,b),ze(g,t.utld,b),ze(b,t.domain,o),ze(b,r,i),re(b,Er,g),re(b,Yn,m),re(b,Ks,c);let v=re(b,Vi),w=Xn(Gh);ze(v,t.numeric,w);let x=Xn(Gh),_=Xn();ze(x,e,x),ze(x,n,_),ze(_,e,x),ze(_,n,_),re(b,Ar,x),re(w,Ar,x);let k=re(a,Vi),S=re(l,Vi),C=re(S,Ar),T=re(C,Ar);ze(a,t.domain,o),re(a,Er,g),re(a,Yn,m),ze(l,t.domain,o),re(l,Er,g),re(l,Yn,m),ze(k,t.domain,x),re(k,Ar,x),re(k,Ll,x),ze(T,t.domain,x),ze(T,e,x),re(T,Ar,x);let E=[[Ml,Rl],[Xh,Yh],[Qh,Zh],[ed,td],[nd,rd],[sd,id],[od,ad],[ld,cd]];for(let M=0;M<E.length;M++){let[z,N]=E[M],$=re(x,z);re(_,z,$);let F=Xn(Gh);ze($,e,F);let j=Xn();ze($,n,j),re($,N,x),ze(F,e,F),ze(F,n,j),ze(j,e,F),ze(j,n,j),re(F,N,x),re(j,N,x)}return re(s,zl,b),re(s,Kg,o3),{start:s,tokens:uC}}function l3(t,e,n){let r=n.length,s=0,i=[],o=[];for(;s<r;){let a=t,l=null,c=null,h=0,d=null,u=-1;for(;s<r&&!(l=a.go(n[s].t));)o.push(n[s++]);for(;s<r&&(c=l||a.go(n[s].t));)l=null,a=c,a.accepts()?(u=0,d=a):u>=0&&u++,s++,h++;if(u<0)s-=h,s<r&&(o.push(n[s]),s++);else{o.length>0&&(i.push(Ng(oC,e,o)),o=[]),s-=u,h-=u;let f=d.t,p=n.slice(s-h,s);i.push(Ng(f,e,p))}}return o.length>0&&i.push(Ng(oC,e,o)),i}function Ng(t,e,n){let r=n[0].s,s=n[n.length-1].e,i=e.slice(r,s);return new t(i,n)}var c3=typeof console<"u"&&console&&console.warn||(()=>{}),h3="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",it={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function mC(){return kn.groups={},it.scanner=null,it.parser=null,it.tokenQueue=[],it.pluginQueue=[],it.customSchemes=[],it.initialized=!1,it}function Zg(t,e=!1){if(it.initialized&&c3(`linkifyjs: already initialized - will not register custom scheme "${t}" ${h3}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format.
|
|
173
173
|
1. Must only contain digits, lowercase ASCII letters or "-"
|
|
174
174
|
2. Cannot start or end with "-"
|
|
175
|
-
3. "-" cannot repeat`);it.customSchemes.push([t,e])}function dF(){it.scanner=rF(it.customSchemes);for(let t=0;t<it.tokenQueue.length;t++)it.tokenQueue[t][1]({scanner:it.scanner});it.parser=aF(it.scanner.tokens);for(let t=0;t<it.pluginQueue.length;t++)it.pluginQueue[t][1]({scanner:it.scanner,parser:it.parser});return it.initialized=!0,it}function Sd(t){return it.initialized||dF(),lF(it.parser.start,t,pC(it.scanner.start,t))}Sd.scan=pC;function eb(t,e=null,n=null){if(e&&typeof e=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}let r=new Qg(n),s=Sd(t),i=[];for(let o=0;o<s.length;o++){let a=s[o];a.isLink&&(!e||a.t===e)&&r.check(a)&&i.push(a.toFormattedObject(r))}return i}var tb="[\0- \xA0\u1680\u180E\u2000-\u2029\u205F\u3000]",uF=new RegExp(tb),pF=new RegExp(`${tb}$`),fF=new RegExp(tb,"g");function mF(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function gF(t){return new Oe({key:new Xe("autolink"),appendTransaction:(e,n,r)=>{let s=e.some(l=>l.docChanged)&&!n.doc.eq(r.doc),i=e.some(l=>l.getMeta("preventAutolink"));if(!s||i)return;let{tr:o}=r,a=xg(n.doc,[...e]);if(Jo(a).forEach(({newRange:l})=>{let c=mS(r.doc,l,u=>u.isTextblock),h,d;if(c.length>1)h=c[0],d=r.doc.textBetween(h.pos,h.pos+h.node.nodeSize,void 0," ");else if(c.length){let u=r.doc.textBetween(l.from,l.to," "," ");if(!pF.test(u))return;h=c[0],d=r.doc.textBetween(h.pos,l.to,void 0," ")}if(h&&d){let u=d.split(uF).filter(Boolean);if(u.length<=0)return!1;let f=u[u.length-1],p=h.pos+d.lastIndexOf(f);if(!f)return!1;let m=Sd(f).map(g=>g.toObject(t.defaultProtocol));if(!mF(m))return!1;m.filter(g=>g.isLink).map(g=>({...g,from:p+g.start+1,to:p+g.end+1})).filter(g=>r.schema.marks.code?!r.doc.rangeHasMark(g.from,g.to,r.schema.marks.code):!0).filter(g=>t.validate(g.value)).filter(g=>t.shouldAutoLink(g.value)).forEach(g=>{jh(g.from,g.to,r.doc).some(b=>b.mark.type===t.type)||o.addMark(g.from,g.to,t.type.create({href:g.href}))})}}),!!o.steps.length)return o}})}function bF(t){return new Oe({key:new Xe("handleClickLink"),props:{handleClick:(e,n,r)=>{if(r.button!==0||!e.editable)return!1;let s=null;if(r.target instanceof HTMLAnchorElement)s=r.target;else{let l=r.target;if(!l)return!1;let c=t.editor.view.dom;s=l.closest("a"),s&&!c.contains(s)&&(s=null)}if(!s)return!1;let i=!1;if(t.enableClickSelection&&(i=t.editor.commands.extendMarkRange(t.type.name)),t.openOnClick){var o,a;let l=Sg(e.state,t.type.name),c=(o=s.href)!==null&&o!==void 0?o:l.href,h=(a=s.target)!==null&&a!==void 0?a:l.target;c&&(window.open(c,h),i=!0)}return i}}})}var vF=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)$/,yF=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)/g;function gC(t,e){let n=0;for(let r=e-1;r>=0&&t[r]==="\\";r-=1)n+=1;return n%2===1}function wF(t,e){let n=0,r=0;for(;r<e;){if(t[r]!=="`"){r+=1;continue}if(n===0&&gC(t,r)){r+=1;continue}let s=0;for(;r<e&&t[r]==="`";)s+=1,r+=1;n===0?n=s:s===n&&(n=0)}return n>0}function bC(t,e,n){var r,s;let[,i,o]=e;return(e.index?t[e.index-1]:void 0)==="!"||gC(t,(r=e.index)!==null&&r!==void 0?r:0)||wF(t,(s=e.index)!==null&&s!==void 0?s:0)?!1:!!i.trim()&&n(o)}function vC(t){var e,n;let[r,s,i,,o,a,l]=t,c=(e=o??a)!==null&&e!==void 0?e:l;return{index:(n=t.index)!==null&&n!==void 0?n:0,text:r,replaceWith:s,data:{href:i,title:c||null,markdown:!0}}}function xF(t,e){return t.index<e.index+e.text.length&&e.index<t.index+t.text.length}function yC(t){var e,n,r;return{href:(e=t.data)===null||e===void 0?void 0:e.href,title:(n=(r=t.data)===null||r===void 0?void 0:r.title)!==null&&n!==void 0?n:null}}function kF(t){let e=Jn({find:n=>{let r=vF.exec(n);return!r||!bC(n,r,t.isAllowedHref)?null:vC(r)},type:t.type,getAttributes:yC});return new Yo({find:e.find,handler:n=>{let r=e.handler(n);return r!==null&&n.state.tr.steps.length&&n.state.tr.setMeta("preventAutolink",!0),r}})}function _F(t){let e=Pn({find:n=>{var r,s;let i=[];for(let a of n.matchAll(yF))bC(n,a,t.isAllowedHref)&&i.push(vC(a));let o=((r=(s=t.findPlainUrls)===null||s===void 0?void 0:s.call(t,n))!==null&&r!==void 0?r:[]).filter(a=>!i.some(l=>xF(l,a)));return[...i,...o]},type:t.type,getAttributes:yC});return new Pg({find:e.find,handler:n=>{var r;let s=e.handler(n);return s!==null&&n.state.tr.steps.length&&(!((r=n.match.data)===null||r===void 0)&&r.markdown)&&n.state.tr.setMeta("preventAutolink",!0),s}})}function SF(t){return new Oe({key:new Xe("handlePasteLink"),props:{handlePaste:(e,n,r)=>{let{shouldAutoLink:s}=t,{state:i}=e,{selection:o}=i,{empty:a}=o;if(a)return!1;let l="";r.content.forEach(h=>{l+=h.textContent});let c=eb(l,{defaultProtocol:t.defaultProtocol}).find(h=>h.isLink&&h.value===l);return!l||!c||s!==void 0&&!s(c.value)?!1:t.editor.commands.setMark(t.type,{href:c.href})}}})}function as(t,e){let n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{let s=typeof r=="string"?r:r.scheme;s&&n.push(s)}),!t||t.replace(fF,"").match(new RegExp(`^(?:(?:${n.map(r=>r.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")).join("|")}):|[^a-z]|[a-z0-9+.\\-]+(?:[^a-z+.\\-:]|$))`,"i"))}var wC=An.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{if(typeof t=="string"){Zg(t);return}Zg(t.scheme,t.optionalSlashes)})},onDestroy(){mC()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,markdownLinks:!1,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!as(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>{let e=/^[a-z][a-z0-9+.-]*:\/\//i.test(t),n=/^[a-z][a-z0-9+.-]*:/i.test(t);if(e||n&&!t.includes("@"))return!0;let r=(t.includes("@")?t.split("@").pop():t).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(r)||!/\./.test(r))}}},addAttributes(){var t,e,n;return{href:{default:null,parseHTML(r){return r.getAttribute("href")}},target:{default:(t=this.options.HTMLAttributes.target)!==null&&t!==void 0?t:null},rel:{default:(e=this.options.HTMLAttributes.rel)!==null&&e!==void 0?e:null},class:{default:(n=this.options.HTMLAttributes.class)!==null&&n!==void 0?n:null},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{let e=t.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:n=>!!as(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!as(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",Ie(this.options.HTMLAttributes,t),0]:["a",Ie(this.options.HTMLAttributes,{...t,href:""}),0]},markdownTokenName:"link",parseMarkdown:(t,e)=>e.applyMark("link",e.parseInline(t.tokens||[]),{href:t.href,title:t.title||null}),renderMarkdown:(t,e)=>{var n,r,s,i;let o=(n=(r=t.attrs)===null||r===void 0?void 0:r.href)!==null&&n!==void 0?n:"",a=(s=(i=t.attrs)===null||i===void 0?void 0:i.title)!==null&&s!==void 0?s:"",l=e.renderChildren(t);return a?`[${l}](${o} "${a}")`:`[${l}](${o})`},addCommands(){return{setLink:t=>({chain:e})=>{let{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!as(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,t).setMeta("preventAutolink",!0).run():!1},toggleLink:t=>({chain:e})=>{let{href:n}=t||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:r=>!!as(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addInputRules(){return this.options.markdownLinks?[kF({type:this.type,isAllowedHref:t=>this.options.isAllowedUri(t,{defaultValidate:e=>!!as(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})})]:[]},addPasteRules(){let t=e=>{let n=[];if(e){let{protocols:r,defaultProtocol:s}=this.options;eb(e).filter(i=>i.isLink&&this.options.isAllowedUri(i.value,{defaultValidate:o=>!!as(o,r),protocols:r,defaultProtocol:s})).forEach(i=>{this.options.shouldAutoLink(i.value)&&n.push({text:i.value,data:{href:i.href},index:i.start})})}return n};return this.options.markdownLinks?[_F({type:this.type,isAllowedHref:e=>this.options.isAllowedUri(e,{defaultValidate:n=>!!as(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}),findPlainUrls:t})]:[Pn({find:t,type:this.type,getAttributes:e=>{var n;return{href:(n=e.data)===null||n===void 0?void 0:n.href}}})]},addProseMirrorPlugins(){let t=[],{protocols:e,defaultProtocol:n}=this.options;return this.options.autolink&&t.push(gF({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:s=>!!as(s,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),t.push(bF({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&t.push(SF({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),t}});var CF="listItem",xC="textStyle",kC=/^\s*([-+*])\s$/,rb=tt.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",Ie(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>t.type!=="list"||t.ordered?[]:{type:"bulletList",content:t.items?e.parseChildren(t.items):[]},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
|
|
176
|
-
`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(
|
|
175
|
+
3. "-" cannot repeat`);it.customSchemes.push([t,e])}function d3(){it.scanner=r3(it.customSchemes);for(let t=0;t<it.tokenQueue.length;t++)it.tokenQueue[t][1]({scanner:it.scanner});it.parser=a3(it.scanner.tokens);for(let t=0;t<it.pluginQueue.length;t++)it.pluginQueue[t][1]({scanner:it.scanner,parser:it.parser});return it.initialized=!0,it}function Sd(t){return it.initialized||d3(),l3(it.parser.start,t,pC(it.scanner.start,t))}Sd.scan=pC;function eb(t,e=null,n=null){if(e&&typeof e=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}let r=new Qg(n),s=Sd(t),i=[];for(let o=0;o<s.length;o++){let a=s[o];a.isLink&&(!e||a.t===e)&&r.check(a)&&i.push(a.toFormattedObject(r))}return i}var tb="[\0- \xA0\u1680\u180E\u2000-\u2029\u205F\u3000]",u3=new RegExp(tb),p3=new RegExp(`${tb}$`),f3=new RegExp(tb,"g");function m3(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function g3(t){return new Oe({key:new Xe("autolink"),appendTransaction:(e,n,r)=>{let s=e.some(l=>l.docChanged)&&!n.doc.eq(r.doc),i=e.some(l=>l.getMeta("preventAutolink"));if(!s||i)return;let{tr:o}=r,a=xg(n.doc,[...e]);if(Jo(a).forEach(({newRange:l})=>{let c=mS(r.doc,l,u=>u.isTextblock),h,d;if(c.length>1)h=c[0],d=r.doc.textBetween(h.pos,h.pos+h.node.nodeSize,void 0," ");else if(c.length){let u=r.doc.textBetween(l.from,l.to," "," ");if(!p3.test(u))return;h=c[0],d=r.doc.textBetween(h.pos,l.to,void 0," ")}if(h&&d){let u=d.split(u3).filter(Boolean);if(u.length<=0)return!1;let f=u[u.length-1],p=h.pos+d.lastIndexOf(f);if(!f)return!1;let m=Sd(f).map(g=>g.toObject(t.defaultProtocol));if(!m3(m))return!1;m.filter(g=>g.isLink).map(g=>({...g,from:p+g.start+1,to:p+g.end+1})).filter(g=>r.schema.marks.code?!r.doc.rangeHasMark(g.from,g.to,r.schema.marks.code):!0).filter(g=>t.validate(g.value)).filter(g=>t.shouldAutoLink(g.value)).forEach(g=>{jh(g.from,g.to,r.doc).some(b=>b.mark.type===t.type)||o.addMark(g.from,g.to,t.type.create({href:g.href}))})}}),!!o.steps.length)return o}})}function b3(t){return new Oe({key:new Xe("handleClickLink"),props:{handleClick:(e,n,r)=>{if(r.button!==0||!e.editable)return!1;let s=null;if(r.target instanceof HTMLAnchorElement)s=r.target;else{let l=r.target;if(!l)return!1;let c=t.editor.view.dom;s=l.closest("a"),s&&!c.contains(s)&&(s=null)}if(!s)return!1;let i=!1;if(t.enableClickSelection&&(i=t.editor.commands.extendMarkRange(t.type.name)),t.openOnClick){var o,a;let l=Sg(e.state,t.type.name),c=(o=s.href)!==null&&o!==void 0?o:l.href,h=(a=s.target)!==null&&a!==void 0?a:l.target;c&&(window.open(c,h),i=!0)}return i}}})}var v3=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)$/,y3=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)/g;function gC(t,e){let n=0;for(let r=e-1;r>=0&&t[r]==="\\";r-=1)n+=1;return n%2===1}function w3(t,e){let n=0,r=0;for(;r<e;){if(t[r]!=="`"){r+=1;continue}if(n===0&&gC(t,r)){r+=1;continue}let s=0;for(;r<e&&t[r]==="`";)s+=1,r+=1;n===0?n=s:s===n&&(n=0)}return n>0}function bC(t,e,n){var r,s;let[,i,o]=e;return(e.index?t[e.index-1]:void 0)==="!"||gC(t,(r=e.index)!==null&&r!==void 0?r:0)||w3(t,(s=e.index)!==null&&s!==void 0?s:0)?!1:!!i.trim()&&n(o)}function vC(t){var e,n;let[r,s,i,,o,a,l]=t,c=(e=o??a)!==null&&e!==void 0?e:l;return{index:(n=t.index)!==null&&n!==void 0?n:0,text:r,replaceWith:s,data:{href:i,title:c||null,markdown:!0}}}function x3(t,e){return t.index<e.index+e.text.length&&e.index<t.index+t.text.length}function yC(t){var e,n,r;return{href:(e=t.data)===null||e===void 0?void 0:e.href,title:(n=(r=t.data)===null||r===void 0?void 0:r.title)!==null&&n!==void 0?n:null}}function k3(t){let e=Jn({find:n=>{let r=v3.exec(n);return!r||!bC(n,r,t.isAllowedHref)?null:vC(r)},type:t.type,getAttributes:yC});return new Yo({find:e.find,handler:n=>{let r=e.handler(n);return r!==null&&n.state.tr.steps.length&&n.state.tr.setMeta("preventAutolink",!0),r}})}function _3(t){let e=Pn({find:n=>{var r,s;let i=[];for(let a of n.matchAll(y3))bC(n,a,t.isAllowedHref)&&i.push(vC(a));let o=((r=(s=t.findPlainUrls)===null||s===void 0?void 0:s.call(t,n))!==null&&r!==void 0?r:[]).filter(a=>!i.some(l=>x3(l,a)));return[...i,...o]},type:t.type,getAttributes:yC});return new Pg({find:e.find,handler:n=>{var r;let s=e.handler(n);return s!==null&&n.state.tr.steps.length&&(!((r=n.match.data)===null||r===void 0)&&r.markdown)&&n.state.tr.setMeta("preventAutolink",!0),s}})}function S3(t){return new Oe({key:new Xe("handlePasteLink"),props:{handlePaste:(e,n,r)=>{let{shouldAutoLink:s}=t,{state:i}=e,{selection:o}=i,{empty:a}=o;if(a)return!1;let l="";r.content.forEach(h=>{l+=h.textContent});let c=eb(l,{defaultProtocol:t.defaultProtocol}).find(h=>h.isLink&&h.value===l);return!l||!c||s!==void 0&&!s(c.value)?!1:t.editor.commands.setMark(t.type,{href:c.href})}}})}function as(t,e){let n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{let s=typeof r=="string"?r:r.scheme;s&&n.push(s)}),!t||t.replace(f3,"").match(new RegExp(`^(?:(?:${n.map(r=>r.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")).join("|")}):|[^a-z]|[a-z0-9+.\\-]+(?:[^a-z+.\\-:]|$))`,"i"))}var wC=An.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{if(typeof t=="string"){Zg(t);return}Zg(t.scheme,t.optionalSlashes)})},onDestroy(){mC()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,markdownLinks:!1,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!as(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>{let e=/^[a-z][a-z0-9+.-]*:\/\//i.test(t),n=/^[a-z][a-z0-9+.-]*:/i.test(t);if(e||n&&!t.includes("@"))return!0;let r=(t.includes("@")?t.split("@").pop():t).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(r)||!/\./.test(r))}}},addAttributes(){var t,e,n;return{href:{default:null,parseHTML(r){return r.getAttribute("href")}},target:{default:(t=this.options.HTMLAttributes.target)!==null&&t!==void 0?t:null},rel:{default:(e=this.options.HTMLAttributes.rel)!==null&&e!==void 0?e:null},class:{default:(n=this.options.HTMLAttributes.class)!==null&&n!==void 0?n:null},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{let e=t.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:n=>!!as(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!as(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",Ie(this.options.HTMLAttributes,t),0]:["a",Ie(this.options.HTMLAttributes,{...t,href:""}),0]},markdownTokenName:"link",parseMarkdown:(t,e)=>e.applyMark("link",e.parseInline(t.tokens||[]),{href:t.href,title:t.title||null}),renderMarkdown:(t,e)=>{var n,r,s,i;let o=(n=(r=t.attrs)===null||r===void 0?void 0:r.href)!==null&&n!==void 0?n:"",a=(s=(i=t.attrs)===null||i===void 0?void 0:i.title)!==null&&s!==void 0?s:"",l=e.renderChildren(t);return a?`[${l}](${o} "${a}")`:`[${l}](${o})`},addCommands(){return{setLink:t=>({chain:e})=>{let{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!as(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,t).setMeta("preventAutolink",!0).run():!1},toggleLink:t=>({chain:e})=>{let{href:n}=t||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:r=>!!as(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addInputRules(){return this.options.markdownLinks?[k3({type:this.type,isAllowedHref:t=>this.options.isAllowedUri(t,{defaultValidate:e=>!!as(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})})]:[]},addPasteRules(){let t=e=>{let n=[];if(e){let{protocols:r,defaultProtocol:s}=this.options;eb(e).filter(i=>i.isLink&&this.options.isAllowedUri(i.value,{defaultValidate:o=>!!as(o,r),protocols:r,defaultProtocol:s})).forEach(i=>{this.options.shouldAutoLink(i.value)&&n.push({text:i.value,data:{href:i.href},index:i.start})})}return n};return this.options.markdownLinks?[_3({type:this.type,isAllowedHref:e=>this.options.isAllowedUri(e,{defaultValidate:n=>!!as(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}),findPlainUrls:t})]:[Pn({find:t,type:this.type,getAttributes:e=>{var n;return{href:(n=e.data)===null||n===void 0?void 0:n.href}}})]},addProseMirrorPlugins(){let t=[],{protocols:e,defaultProtocol:n}=this.options;return this.options.autolink&&t.push(g3({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:s=>!!as(s,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),t.push(b3({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&t.push(S3({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),t}});var C3="listItem",xC="textStyle",kC=/^\s*([-+*])\s$/,rb=tt.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",Ie(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>t.type!=="list"||t.ordered?[]:{type:"bulletList",content:t.items?e.parseChildren(t.items):[]},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
|
|
176
|
+
`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(C3,this.editor.getAttributes(xC)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=Us({find:kC,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Us({find:kC,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(xC),editor:this.editor})),[t]}}),T3=(t,e,n)=>{let{selection:r}=t;if(!r.empty)return null;let{$from:s}=r;if(!s.parent.isTextblock||s.parentOffset!==s.parent.content.size)return null;let i=-1;for(let f=s.depth;f>0;f-=1)if(s.node(f).type.name===e){i=f;break}if(i<0)return null;let o=s.node(i),a=s.index(i);if(a+1>=o.childCount)return null;let l=o.child(a+1);if(!n.includes(l.type.name))return null;let c=t.schema.nodes[e],h=!1;if(l.forEach(f=>{f.type===c&&f.childCount>1&&(h=!0)}),!h)return null;let d=t.doc.resolve(s.after()).nodeAfter;if(!d||!n.includes(d.type.name))return null;let u=[];return d.forEach(f=>{u.push(f)}),u.length===0?null:{listItemDepth:i,nestedList:d,nestedListPos:s.after(),insertPos:s.after(i),items:u}},E3=(t,e,n,r)=>{let s=T3(t,n,r);if(!s)return!1;let{selection:i}=t,{nestedList:o,nestedListPos:a,insertPos:l,items:c}=s,h=t.tr;h.delete(a,a+o.nodeSize);let d=h.mapping.map(l);return h.insert(d,Q.from(c)),h.setSelection(i.map(h.doc,h.mapping)),e&&e(h),!0},A3=(t,e,n)=>E3(t.state,t.view.dispatch,e,n),AC=(t,e)=>et.create({name:`${t}BranchingDeleteKeymap`,priority:101,addKeyboardShortcuts(){let n=()=>A3(this.editor,t,e);return{Delete:n,"Mod-Delete":n}}}),PC=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],Cd="abcdefghijklmnopqrstuvwxyz",DC=String.raw`\d+|[ivxlcdmIVXLCDM]+|${"[a-zA-Z]{1,2}"}`;function Ed(t){let e=t,n="";for(let[r,s]of PC)for(;e>=r;)n+=s,e-=r;return n}function sb(t){return Ed(t).toUpperCase()}function MC(t){let e=t.toLowerCase(),n=0,r=0;for(;n<e.length;){let s=!1;for(let[i,o]of PC)if(e.startsWith(o,n)){r+=i,n+=o.length,s=!0;break}if(!s)return 0}return r}function P3(t){if(!/^[ivxlcdmIVXLCDM]+$/.test(t))return!1;let e=MC(t);return e<=0?!1:(t===t.toLowerCase()?Ed(e):sb(e))===t}function D3(t){let e=t.toLowerCase();if(e.length===1)return e.charCodeAt(0)-97+1;if(e.length===2){let n=e.charCodeAt(0)-97,r=e.charCodeAt(1)-97;return(n+1)*26+r+1}return 0}function Td(t){if(t<=26)return Cd[t-1];let e=Math.floor((t-1)/26)-1,n=(t-1)%26;return e<0?Cd[n]:Cd[e]+Cd[n]}function Ad(t){if(!(!t||/^\d+$/.test(t))){if(P3(t))return t===t.toLowerCase()?"i":"I";if(/^[a-z]{1,2}$/.test(t))return"a";if(/^[A-Z]{1,2}$/.test(t))return"A"}}function ib(t){if(/^\d+$/.test(t))return parseInt(t,10);let e=Ad(t);if(e==="i"||e==="I")return MC(t);if(e==="a"||e==="A"){let r=D3(t);return r>0?r:1}let n=parseInt(t,10);return Number.isNaN(n)?1:n}function M3(t,e){if(t==="numeric")return String(e);switch(t){case"a":return Td(e);case"A":return Td(e).toUpperCase();case"i":return Ed(e);case"I":return sb(e);default:return String(e)}}function R3(t){var e;if(t.length===0)return!1;let n=(e=Ad(t[0]))!==null&&e!==void 0?e:"numeric",r=ib(t[0]);if(r<1)return!1;for(let s=0;s<t.length;s++){let i=M3(n,r+s);if(t[s]!==i)return!1}return!0}function I3(t){return{type:Ad(t),start:ib(t)}}function L3(t){let{type:e,start:n}=I3(t),r={};return e&&(r.type=e),n!==1&&(r.start=n),r}function O3(t,e,n=". "){let r=e+1;if(!t||t==="1")return`${r}${n}`;switch(t){case"a":return`${Td(r)}${n}`;case"A":return`${Td(r).toUpperCase()}${n}`;case"i":return`${Ed(r)}${n}`;case"I":return`${sb(r)}${n}`;default:return`${r}${n}`}}function z3(t){var e,n;let r=(e=t.tokens)===null||e===void 0?void 0:e[0];return!!(t.text&&((n=t.tokens)===null||n===void 0?void 0:n.length)===1&&r?.type==="list"&&r.ordered&&r.raw===t.text)}function N3(t,e){return e.tokenizeInline?e.parseInline(e.tokenizeInline(t)):e.parseInline([{type:"text",raw:t,text:t}])}var ob=tt.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",Ie(this.options.HTMLAttributes,t),0]},markdownTokenName:"list_item",parseMarkdown:(t,e)=>{var n;if(t.type!=="list_item")return[];let r=(n=e.parseBlockChildren)!==null&&n!==void 0?n:e.parseChildren,s=[];if(t.tokens&&t.tokens.length>0){if(z3(t))return{type:"listItem",content:[{type:"paragraph",content:N3(t.text||"",e)}]};if(t.tokens.some(i=>i.type==="paragraph"))s=r(t.tokens);else{let i=t.tokens[0];if(i&&i.type==="text"&&i.tokens&&i.tokens.length>0){if(s=[{type:"paragraph",content:e.parseInline(i.tokens)}],t.tokens.length>1){let o=r(t.tokens.slice(1));s.push(...o)}}else s=r(t.tokens)}}return s.length===0&&(s=[{type:"paragraph",content:[]}]),{type:"listItem",content:s}},renderMarkdown:(t,e,n)=>Eg(t,e,r=>{if(r.parentType==="bulletList")return"- ";if(r.parentType==="orderedList"){var s,i;let o=((s=r.meta)===null||s===void 0||(s=s.parentAttrs)===null||s===void 0?void 0:s.start)||1;return O3((i=r.meta)===null||i===void 0||(i=i.parentAttrs)===null||i===void 0?void 0:i.type,o-1+(r.index||0),". ")}return"- "},n),addExtensions(){return[AC(this.name,[this.options.bulletListTypeName,this.options.orderedListTypeName])]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),ab=(t,e)=>{let{$from:n}=e.selection,r=Pt(t,e.schema),s=null,i=n.depth,o=n.pos,a=null;for(;i>0&&a===null;)s=n.node(i),s.type===r?a=i:(i-=1,o-=1);return a===null?null:{$pos:e.doc.resolve(o),depth:a}},RC=(t,e)=>{let n=ab(t,e);if(!n)return!1;let[,r]=kS(e,t,n.$pos.pos+4);return r},F3=(t,e,n)=>{let{$anchor:r}=t.selection,s=Math.max(0,r.pos-2),i=t.doc.resolve(s).node();return!(!i||!n.includes(i.type.name))},_C=(t,e,n)=>{if(t.commands.undoInputRule())return!0;if(t.state.selection.from!==t.state.selection.to)return!1;if(!Tr(t.state,e)&&F3(t.state,e,n)){let{$anchor:i}=t.state.selection,o=t.state.doc.resolve(i.before()-1),a=[];o.node().descendants((h,d)=>{h.type.name===e&&a.push({node:h,pos:d})});let l=a.at(-1);if(!l)return!1;let c=t.state.doc.resolve(o.start()+l.pos+1);return t.chain().cut({from:i.start()-1,to:i.end()+1},c.end()).joinForward().run()}if(!Tr(t.state,e)||!CS(t.state))return!1;let{$from:r}=t.state.selection,s=r.depth-1;return r.node(s).type!==t.schema.nodes[e]||r.index(s)!==0?!1:t.chain().liftListItem(e).run()},B3=(t,e)=>{let n=RC(t,e),r=ab(t,e);return!r||!n?!1:n>r.depth},H3=(t,e)=>{let n=RC(t,e),r=ab(t,e);return!r||!n?!1:n<r.depth},SC=(t,e)=>{if(!Tr(t.state,e)||!SS(t.state,e))return!1;let{selection:n}=t.state,{$from:r,$to:s}=n;return!n.empty&&r.sameParent(s)?!1:B3(e,t.state)?t.chain().focus(t.state.selection.from+4).lift(e).joinBackward().run():H3(e,t.state)?t.chain().joinForward().joinBackward().run():t.commands.joinItemForward()},$3=(t,e,n)=>{let{state:r}=t,{selection:s}=r;if(!s.empty)return!1;let{$from:i}=s;if(i.parentOffset!==0||!i.parent.isTextblock||Tr(r,e))return!1;let o=_S(i);if(!o||!n.includes(o.type.name))return!1;let a=o.lastChild;if(!a||a.type.name!==e)return!1;let l=i.parent;if(!a.canReplace(a.childCount,a.childCount,Q.from(l)))return!1;let c=i.before(),h=i.after(),d=c-2;return t.commands.command(({tr:u,dispatch:f})=>(f&&(u.delete(c,h).insert(d,Q.from(l)),u.setSelection(me.create(u.doc,d+1)),u.scrollIntoView()),!0))};var lb=et.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&SC(t,n)&&(e=!0)}),e},"Mod-Delete":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&SC(t,n)&&(e=!0)}),e},Backspace:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&_C(t,n,r)&&(e=!0)}),e},"Mod-Backspace":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&_C(t,n,r)&&(e=!0)}),e},Tab:({editor:t})=>{for(let{itemName:e,wrapperNames:n}of this.options.listTypes)if(t.state.schema.nodes[e]!==void 0&&$3(t,e,n))return!0;return!1}}}}),nb=new RegExp(`^(\\s*)(${DC})([.)])\\s+(.*)$`),j3=/^\s/,ea={heading:/^#{1,6}(?:\s|$)/,bulletItem:/^[-+*]\s+/,codeFence:/^(?:```|~~~)/,blockMath:/^\$\$/,thematicBreak:/^(?:(?:-[ \t]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})$/};function V3(t){return nb.test(t.trimStart())}function W3(t){let e=t.trimStart();return ea.bulletItem.test(e)||V3(e)||ea.heading.test(e)||ea.thematicBreak.test(e)&&!e.startsWith("-")||/^>\s?/.test(e)||ea.codeFence.test(e)||ea.blockMath.test(e)}function U3(t){return Object.values(ea).some(e=>e.test(t))}function q3(t){let e=[],n=[],r=!1;return t.forEach(s=>{if(r){n.push(s);return}if(s.trim()===""){r=!0,n.push(s);return}if(e.length>0&&W3(s)){r=!0,n.push(s);return}e.push(s)}),{paragraphLines:e,blockLines:n}}function K3(t){let e=[],n=0,r=0;for(;n<t.length;){let s=t[n],i=s.match(nb);if(!i)break;let[,o,a,l,c]=i,h=o.length,d=parseInt(a,10),u=isNaN(d)?Ad(a):void 0,f=isNaN(d)?ib(a):d,p=[c],m=n+1,g=[s],b=!1;for(;m<t.length;){let v=t[m];if(v.match(nb))break;if(v.trim()==="")g.push(v),p.push(""),b=!0,m+=1;else if(v.match(j3)){let w=v.length-v.trimStart().length,x=h+a.length+1;g.push(v),p.push(v.slice(Math.min(w,x))),m+=1}else{if(b||U3(v))break;g.push(v),p.push(v),m+=1}}e.push({indent:h,number:f,type:u,content:p.join(`
|
|
177
177
|
`).trim(),contentLines:p,raw:g.join(`
|
|
178
|
-
`)}),r=m,n=m}return[e,r]}var
|
|
179
|
-
`).filter(r=>r.trim().length>0);if(e.length===0)return null;let n=[];for(let r of e){let s=r.trim().match(
|
|
178
|
+
`)}),r=m,n=m}return[e,r]}var G3=new RegExp(`^(${DC})([.)])\\s+(.+)$`);function J3(t){let e=t.split(`
|
|
179
|
+
`).filter(r=>r.trim().length>0);if(e.length===0)return null;let n=[];for(let r of e){let s=r.trim().match(G3);if(!s)return null;n.push({marker:s[1],content:s[3]})}return R3(n.map(r=>r.marker))?{type:"orderedList",attrs:L3(n[0].marker),content:n.map(r=>({type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:r.content}]}]}))}:null}function IC(t,e,n){let r=[],s=0;for(;s<t.length;){let i=t[s];if(i.indent===e){let{paragraphLines:o,blockLines:a}=q3(i.contentLines),l=o.join(`
|
|
180
180
|
`).trim(),c=[];l&&c.push({type:"paragraph",raw:l,tokens:n.inlineTokens(l)});let h=a.join(`
|
|
181
181
|
`).trim();if(h){let f=n.blockTokens(h);c.push(...f)}let d=s+1,u=[];for(;d<t.length&&t[d].indent>e;)u.push(t[d]),d+=1;if(u.length>0){let f=IC(u,Math.min(...u.map(p=>p.indent)),n);c.push({type:"list",ordered:!0,start:u[0].number,typeMarker:u[0].type,items:f,raw:u.map(p=>p.raw).join(`
|
|
182
|
-
`)})}r.push({type:"list_item",raw:i.raw,tokens:c}),s=d}else s+=1}return r}function
|
|
182
|
+
`)})}r.push({type:"list_item",raw:i.raw,tokens:c}),s=d}else s+=1}return r}function X3(t,e){return t.map(n=>{if(n.type!=="list_item")return e.parseChildren([n])[0];let r=[];return n.tokens&&n.tokens.length>0&&n.tokens.forEach(s=>{if(s.type==="paragraph"||s.type==="list"||s.type==="blockquote"||s.type==="code")r.push(...e.parseChildren([s]));else if(s.type==="text"&&s.tokens){let i=e.parseChildren([s]);r.push({type:"paragraph",content:i})}else{let i=e.parseChildren([s]);i.length>0&&r.push(...i)}}),{type:"listItem",content:r}})}var Y3="listItem",CC="textStyle",TC=/^(\d+)\.\s$/;function EC(t){let e=t.match(/list-style-type\s*:\s*([^;]+)/i);if(!e)return null;switch(e[1].trim().toLowerCase()){case"upper-roman":return"I";case"lower-roman":return"i";case"upper-alpha":case"upper-latin":return"A";case"lower-alpha":case"lower-latin":return"a";default:return null}}var cb=tt.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>{let e=t.getAttribute("type");if(e)return e;let n=t.getAttribute("style");if(n){let s=EC(n);if(s)return s}let r=t.querySelector("li");if(r){let s=r.getAttribute("style");if(s){let i=EC(s);if(i)return i}}return null}}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){let{start:e,type:n,...r}=t,s=Ie(this.options.HTMLAttributes,r);return e!==1&&(s.start=e),n&&n!=="1"&&(s.type=n),["ol",s,0]},markdownTokenName:"list",parseMarkdown:(t,e)=>{if(t.type!=="list"||!t.ordered)return[];let n=t.start||1,r=t.typeMarker,s=t.items?X3(t.items,e):[],i={};return n!==1&&(i.start=n),r&&(i.type=r),Object.keys(i).length>0?{type:"orderedList",attrs:i,content:s}:{type:"orderedList",content:s}},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
|
|
183
183
|
`):"",markdownTokenizer:{name:"orderedList",level:"block",start:()=>-1,tokenize:(t,e,n)=>{var r,s;let i=t.split(`
|
|
184
|
-
`),[o,a]=
|
|
185
|
-
`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(
|
|
184
|
+
`),[o,a]=K3(i);if(o.length===0)return;let l=IC(o,o[0].indent,n);if(l.length!==0)return{type:"list",ordered:!0,start:((r=o[0])===null||r===void 0?void 0:r.number)||1,typeMarker:(s=o[0])===null||s===void 0?void 0:s.type,items:l,raw:i.slice(0,a).join(`
|
|
185
|
+
`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Y3,this.editor.getAttributes(CC)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addProseMirrorPlugins(){return[new Oe({props:{handlePaste:(t,e)=>{var n,r;let s=(n=e.clipboardData)===null||n===void 0?void 0:n.getData("text/html");if(s?.trim())return!1;let i=(r=e.clipboardData)===null||r===void 0?void 0:r.getData("text/plain");if(!i)return!1;let o=J3(i);if(!o)return!1;try{let a=t.state.schema.nodeFromJSON(o),l=t.state.tr.replaceSelectionWith(a);return t.dispatch(l),!0}catch{return!1}}}})]},addInputRules(){let t=(n,r)=>(!r.attrs.type||r.attrs.type==="1")&&r.childCount+r.attrs.start===+n[1],e=Us({find:TC,type:this.type,getAttributes:n=>({start:+n[1]}),joinPredicate:t});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Us({find:TC,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:n=>({start:+n[1],...this.editor.getAttributes(CC)}),joinPredicate:t,editor:this.editor})),[e]}}),Q3=/^\s*(\[([( |x])?\])\s$/,Z3="position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0",e5=(t,e,n)=>{var r;return(n==null||(r=n.checkboxLabel)===null||r===void 0?void 0:r.call(n,t,e))||`Task item checkbox for ${t.textContent||"empty task item"}`},Pd=tt.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{let e=t.getAttribute("data-checked");return e===""||e==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51,contentElement:t=>{var e;return(e=t.querySelector("div"))!==null&&e!==void 0?e:t}}]},renderHTML({node:t,HTMLAttributes:e}){return["li",Ie(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(t,e)=>{let n=[];if(t.tokens&&t.tokens.length>0?n.push(e.createNode("paragraph",{},e.parseInline(t.tokens))):t.text?n.push(e.createNode("paragraph",{},[e.createNode("text",{text:t.text})])):n.push(e.createNode("paragraph",{},[])),t.nestedTokens&&t.nestedTokens.length>0){let r=e.parseChildren(t.nestedTokens);n.push(...r)}return e.createNode("taskItem",{checked:t.checked||!1},n)},renderMarkdown:(t,e)=>{var n;let r=`- [${!((n=t.attrs)===null||n===void 0)&&n.checked?"x":" "}] `;return Eg(t,e,r)},addExtensions(){return this.options.nested?[AC(this.name,[this.options.taskListTypeName])]:[]},addKeyboardShortcuts(){let t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:n,editor:r})=>{let s=document.createElement("li"),i=document.createElement("label"),o=document.createElement("span"),a=document.createElement("input"),l=document.createElement("div");o.style.cssText=Z3;let c=d=>{let u=e5(d,d.attrs.checked,this.options.a11y);a.setAttribute("aria-label",u),o.textContent=u};c(t),i.contentEditable="false",a.type="checkbox",a.addEventListener("mousedown",d=>d.preventDefault()),a.addEventListener("change",d=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){a.checked=!a.checked;return}let{checked:u}=d.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:f})=>{let p=n();if(typeof p!="number")return!1;let m=f.doc.nodeAt(p);return f.setNodeMarkup(p,void 0,{...m?.attrs,checked:u}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,u)||(a.checked=!a.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([d,u])=>{s.setAttribute(d,u)}),s.dataset.checked=t.attrs.checked,a.checked=t.attrs.checked,i.append(a,o),s.append(i,l),Object.entries(e).forEach(([d,u])=>{s.setAttribute(d,u)});let h=new Set(Object.keys(e));return{dom:s,contentDOM:l,update:d=>{if(d.type!==this.type)return!1;s.dataset.checked=d.attrs.checked,a.checked=d.attrs.checked,c(d);let u=r.extensionManager.attributes,f=Ws(d,u),p=new Set(Object.keys(f)),m=this.options.HTMLAttributes;return h.forEach(g=>{p.has(g)||(g in m?s.setAttribute(g,m[g]):s.removeAttribute(g))}),Object.entries(f).forEach(([g,b])=>{b==null?g in m?s.setAttribute(g,m[g]):s.removeAttribute(g):s.setAttribute(g,b)}),h=p,!0}}}},addInputRules(){return[Us({find:Q3,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),Dd=tt.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",Ie(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},parseMarkdown:(t,e)=>e.createNode("taskList",{},e.parseChildren(t.items||[])),renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
|
|
186
186
|
`):"",markdownTokenizer:{name:"taskList",level:"block",start(t){var e;let n=(e=t.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))===null||e===void 0?void 0:e.index;return n!==void 0?n:-1},tokenize(t,e,n){let r=i=>{let o=Tg(i,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:a=>({indentLevel:a[1].length,mainContent:a[4],checked:a[3].toLowerCase()==="x"}),createToken:(a,l)=>({type:"taskItem",raw:"",mainContent:a.mainContent,indentLevel:a.indentLevel,checked:a.checked,text:a.mainContent,tokens:n.inlineTokens(a.mainContent),nestedTokens:l}),customNestedParser:r},n);if(o){let a={type:"taskList",raw:o.raw,items:o.items},l=i.slice(o.raw.length);return l.trim()?[a,...n.blockTokens(l)]:[a]}return n.blockTokens(i)},s=Tg(t,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:i=>({indentLevel:i[1].length,mainContent:i[4],checked:i[3].toLowerCase()==="x"}),createToken:(i,o)=>({type:"taskItem",raw:"",mainContent:i.mainContent,indentLevel:i.indentLevel,checked:i.checked,text:i.mainContent,tokens:n.inlineTokens(i.mainContent),nestedTokens:o}),customNestedParser:r},n);if(s)return{type:"taskList",raw:s.raw,items:s.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),VX=et.create({name:"listKit",addExtensions(){let t=[];return this.options.bulletList!==!1&&t.push(rb.configure(this.options.bulletList)),this.options.listItem!==!1&&t.push(ob.configure(this.options.listItem)),this.options.listKeymap!==!1&&t.push(lb.configure(this.options.listKeymap)),this.options.orderedList!==!1&&t.push(cb.configure(this.options.orderedList)),this.options.taskItem!==!1&&t.push(Pd.configure(this.options.taskItem)),this.options.taskList!==!1&&t.push(Dd.configure(this.options.taskList)),t}});var Md=" ",hb="\xA0",LC=tt.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",Ie(this.options.HTMLAttributes,t),0]},parseMarkdown:(t,e)=>{let n=t.tokens||[];if(n.length===1&&n[0].type==="image")return e.parseChildren([n[0]]);let r=e.parseInline(n);return n.length===1&&n[0].type==="text"&&(n[0].raw===Md||n[0].text===Md||n[0].raw===hb||n[0].text===hb)&&r.length===1&&r[0].type==="text"&&(r[0].text===Md||r[0].text===hb)?e.createNode("paragraph",void 0,[]):e.createNode("paragraph",void 0,r)},renderMarkdown:(t,e,n)=>{if(!t)return"";let r=Array.isArray(t.content)?t.content:[];if(r.length===0){var s,i;let o=Array.isArray(n==null||(s=n.previousNode)===null||s===void 0?void 0:s.content)?n.previousNode.content:[];return(n==null||(i=n.previousNode)===null||i===void 0?void 0:i.type)==="paragraph"&&o.length===0?Md:""}return e.renderChildren(r)},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}});var t5=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,n5=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,OC=An.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",Ie(this.options.HTMLAttributes,t),0]},markdownTokenName:"del",parseMarkdown:(t,e)=>e.applyMark("strike",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`~~${e.renderChildren(t)}~~`,addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Jn({find:t5,type:this.type})]},addPasteRules(){return[Pn({find:n5,type:this.type})]}});var zC=tt.create({name:"text",group:"inline",parseMarkdown:t=>({type:"text",text:t.text||""}),renderMarkdown:t=>t.text||""});var NC=An.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",Ie(this.options.HTMLAttributes,t),0]},parseMarkdown(t,e){return e.applyMark(this.name||"underline",e.parseInline(t.tokens||[]))},renderMarkdown(t,e){return`++${e.renderChildren(t)}++`},markdownTokenizer:{name:"underline",level:"inline",start(t){return t.indexOf("++")},tokenize(t,e,n){let r=/^(\+\+)([\s\S]+?)(\+\+)/.exec(t);if(!r)return;let s=r[2].trim();return{type:"underline",raw:r[0],text:s,tokens:n.inlineTokens(s)}}},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function FC(t={}){return new Oe({view(e){return new db(e,t)}})}var db=class{constructor(e,n){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.lastDragEvent=null,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(s=>{let i=o=>{this[s](o)};return e.dom.addEventListener(s,i),{name:s,handler:i}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){if(this.cursorPos!=null&&n.doc!=e.state.doc)if(this.lastDragEvent){let r=this.computeTarget(this.lastDragEvent);r==this.cursorPos?this.updateOverlay():this.setCursor(r)}else this.updateOverlay()}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r,s=this.editorView.dom,i=s.getBoundingClientRect(),o=i.width/s.offsetWidth,a=i.height/s.offsetHeight;if(n){let d=e.nodeBefore,u=e.nodeAfter;if(d||u){let f=this.editorView.nodeDOM(this.cursorPos-(d?d.nodeSize:0));if(f){let p=f.getBoundingClientRect(),m=d?p.bottom:p.top;d&&u&&(m=(m+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let g=this.width/2*a;r={left:p.left,right:p.right,top:m-g,bottom:m+g}}}}if(!r){let d=this.editorView.coordsAtPos(this.cursorPos),u=this.width/2*o;r={left:d.left-u,right:d.left+u,top:d.top,bottom:d.bottom}}let l=this.editorView.dom.offsetParent;this.element||(this.element=l.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let c,h;if(!l||l==document.body&&getComputedStyle(l).position=="static")c=-pageXOffset,h=-pageYOffset;else{let d=l.getBoundingClientRect(),u=d.width/l.offsetWidth,f=d.height/l.offsetHeight;c=d.left-l.scrollLeft*u,h=d.top-l.scrollTop*f}this.element.style.left=(r.left-c)/o+"px",this.element.style.top=(r.top-h)/a+"px",this.element.style.width=(r.right-r.left)/o+"px",this.element.style.height=(r.bottom-r.top)/a+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}computeTarget(e){let n=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),s=r&&r.type.spec.disableDropCursor,i=typeof s=="function"?s(this.editorView,n,e):s;if(!n||i)return null;let o=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=mh(this.editorView.state.doc,o,this.editorView.dragging.slice);a!=null&&(o=a)}return o}dragover(e){if(!this.editorView.editable)return;this.lastDragEvent=e;let n=this.computeTarget(e);n!=null&&(this.setCursor(n),this.scheduleRemoval(5e3))}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}};var nn=class t extends xe{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return t.valid(r)?new t(r):xe.near(r)}content(){return ae.empty}eq(e){return e instanceof t&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new t(e.resolve(n.pos))}getBookmark(){return new ub(this.anchor)}static valid(e){let n=e.parent;if(n.inlineContent||!r5(e)||!s5(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let s=n.contentMatchAt(e.index()).defaultType;return s&&s.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&t.valid(e))return e;let s=e.pos,i=null;for(let o=e.depth;;o--){let a=e.node(o);if(n>0?e.indexAfter(o)<a.childCount:e.index(o)>0){i=a.child(n>0?e.indexAfter(o):e.index(o)-1);break}else if(o==0)return null;s+=n;let l=e.doc.resolve(s);if(t.valid(l))return l}for(;;){let o=n>0?i.firstChild:i.lastChild;if(!o){if(i.isAtom&&!i.isText&&!we.isSelectable(i)){e=e.doc.resolve(s+i.nodeSize*n),r=!1;continue e}break}i=o,s+=n;let a=e.doc.resolve(s);if(t.valid(a))return a}return null}}};nn.prototype.visible=!1;nn.findFrom=nn.findGapCursorFrom;xe.jsonID("gapcursor",nn);var ub=class t{constructor(e){this.pos=e}map(e){return new t(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return nn.valid(n)?new nn(n):xe.near(n)}};function BC(t){return t.isAtom||t.spec.isolating||t.spec.createGapCursor}function r5(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let s=r.child(n-1);;s=s.lastChild){if(s.childCount==0&&!s.inlineContent||BC(s.type))return!0;if(s.inlineContent)return!1}}return!0}function s5(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let s=r.child(n);;s=s.firstChild){if(s.childCount==0&&!s.inlineContent||BC(s.type))return!0;if(s.inlineContent)return!1}}return!0}function HC(){return new Oe({props:{decorations:l5,createSelectionBetween(t,e,n){return e.pos==n.pos&&nn.valid(n)?new nn(n):null},handleClick:o5,handleKeyDown:i5,handleDOMEvents:{beforeinput:a5}}})}var i5=_l({ArrowLeft:Rd("horiz",-1),ArrowRight:Rd("horiz",1),ArrowUp:Rd("vert",-1),ArrowDown:Rd("vert",1)});function Rd(t,e){let n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,s,i){let o=r.selection,a=e>0?o.$to:o.$from,l=o.empty;if(o instanceof me){if(!i.endOfTextblock(n)||a.depth==0)return!1;l=!1,a=r.doc.resolve(e>0?a.after():a.before())}let c=nn.findGapCursorFrom(a,e,l);return c?(s&&s(r.tr.setSelection(new nn(c))),!0):!1}}function o5(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!nn.valid(r))return!1;let s=t.posAtCoords({left:n.clientX,top:n.clientY});return s&&s.inside>-1&&we.isSelectable(t.state.doc.nodeAt(s.inside))?!1:(t.dispatch(t.state.tr.setSelection(new nn(r))),!0)}function a5(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof nn))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let s=Q.empty;for(let o=r.length-1;o>=0;o--)s=Q.from(r[o].createAndFill(null,s));let i=t.state.tr.replace(n.pos,n.pos,new ae(s,0,0));return i.setSelection(me.near(i.doc.resolve(n.pos+1))),t.dispatch(i),!1}function l5(t){if(!(t.selection instanceof nn))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",Je.create(t.doc,[Rt.widget(t.selection.head,e,{key:"gapcursor"})])}var Id=200,Wt=function(){};Wt.prototype.append=function(e){return e.length?(e=Wt.from(e),!this.length&&e||e.length<Id&&this.leafAppend(e)||this.length<Id&&e.leafPrepend(this)||this.appendInner(e)):this};Wt.prototype.prepend=function(e){return e.length?Wt.from(e).append(this):this};Wt.prototype.appendInner=function(e){return new c5(this,e)};Wt.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?Wt.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};Wt.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};Wt.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)};Wt.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var s=[];return this.forEach(function(i,o){return s.push(e(i,o))},n,r),s};Wt.from=function(e){return e instanceof Wt?e:e&&e.length?new $C(e):Wt.empty};var $C=(function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(s,i){return s==0&&i==this.length?this:new e(this.values.slice(s,i))},e.prototype.getInner=function(s){return this.values[s]},e.prototype.forEachInner=function(s,i,o,a){for(var l=i;l<o;l++)if(s(this.values[l],a+l)===!1)return!1},e.prototype.forEachInvertedInner=function(s,i,o,a){for(var l=i-1;l>=o;l--)if(s(this.values[l],a+l)===!1)return!1},e.prototype.leafAppend=function(s){if(this.length+s.length<=Id)return new e(this.values.concat(s.flatten()))},e.prototype.leafPrepend=function(s){if(this.length+s.length<=Id)return new e(s.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e})(Wt);Wt.empty=new $C([]);var c5=(function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,s,i,o){var a=this.left.length;if(s<a&&this.left.forEachInner(r,s,Math.min(i,a),o)===!1||i>a&&this.right.forEachInner(r,Math.max(s-a,0),Math.min(this.length,i)-a,o+a)===!1)return!1},e.prototype.forEachInvertedInner=function(r,s,i,o){var a=this.left.length;if(s>a&&this.right.forEachInvertedInner(r,s-a,Math.max(i,a)-a,o+a)===!1||i<a&&this.left.forEachInvertedInner(r,Math.min(s,a),i,o)===!1)return!1},e.prototype.sliceInner=function(r,s){if(r==0&&s==this.length)return this;var i=this.left.length;return s<=i?this.left.slice(r,s):r>=i?this.right.slice(r-i,s-i):this.left.slice(r,i).append(this.right.slice(0,s-i))},e.prototype.leafAppend=function(r){var s=this.right.leafAppend(r);if(s)return new e(this.left,s)},e.prototype.leafPrepend=function(r){var s=this.left.leafPrepend(r);if(s)return new e(s,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e})(Wt),pb=Wt;var h5=500,Ui=class t{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let s,i;n&&(s=this.remapping(r,this.items.length),i=s.maps.length);let o=e.tr,a,l,c=[],h=[];return this.items.forEach((d,u)=>{if(!d.step){s||(s=this.remapping(r,u+1),i=s.maps.length),i--,h.push(d);return}if(s){h.push(new Pr(d.map));let f=d.step.map(s.slice(i)),p;f&&o.maybeStep(f).doc&&(p=o.mapping.maps[o.mapping.maps.length-1],c.push(new Pr(p,void 0,void 0,c.length+h.length))),i--,p&&s.appendMap(p,i)}else o.maybeStep(d.step);if(d.selection)return a=s?d.selection.map(s.slice(i)):d.selection,l=new t(this.items.slice(0,r).append(h.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:o,selection:a}}addTransform(e,n,r,s){let i=[],o=this.eventCount,a=this.items,l=!s&&a.length?a.get(a.length-1):null;for(let h=0;h<e.steps.length;h++){let d=e.steps[h].invert(e.docs[h]),u=new Pr(e.mapping.maps[h],d,n),f;(f=l&&l.merge(u))&&(u=f,h?i.pop():a=a.slice(0,a.length-1)),i.push(u),n&&(o++,n=void 0),s||(l=u)}let c=o-r.depth;return c>u5&&(a=d5(a,c),o-=c),new t(a.append(i),o)}remapping(e,n){let r=new il;return this.items.forEach((s,i)=>{let o=s.mirrorOffset!=null&&i-s.mirrorOffset>=e?r.maps.length-s.mirrorOffset:void 0;r.appendMap(s.map,o)},e,n),r}addMaps(e){return this.eventCount==0?this:new t(this.items.append(e.map(n=>new Pr(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],s=Math.max(0,this.items.length-n),i=e.mapping,o=e.steps.length,a=this.eventCount;this.items.forEach(u=>{u.selection&&a--},s);let l=n;this.items.forEach(u=>{let f=i.getMirror(--l);if(f==null)return;o=Math.min(o,f);let p=i.maps[f];if(u.step){let m=e.steps[f].invert(e.docs[f]),g=u.selection&&u.selection.map(i.slice(l+1,f));g&&a++,r.push(new Pr(p,m,g))}else r.push(new Pr(p))},s);let c=[];for(let u=n;u<o;u++)c.push(new Pr(i.maps[u]));let h=this.items.slice(0,s).append(c).append(r),d=new t(h,a);return d.emptyItemCount()>h5&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,s=[],i=0;return this.items.forEach((o,a)=>{if(a>=e)s.push(o),o.selection&&i++;else if(o.step){let l=o.step.map(n.slice(r)),c=l&&l.getMap();if(r--,c&&n.appendMap(c,r),l){let h=o.selection&&o.selection.map(n.slice(r));h&&i++;let d=new Pr(c.invert(),l,h),u,f=s.length-1;(u=s.length&&s[f].merge(d))?s[f]=u:s.push(d)}}else o.map&&r--},this.items.length,0),new t(pb.from(s.reverse()),i)}};Ui.empty=new Ui(pb.empty,0);function d5(t,e){let n;return t.forEach((r,s)=>{if(r.selection&&e--==0)return n=s,!1}),t.slice(n)}var Pr=class t{constructor(e,n,r,s){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=s}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new t(n.getMap().invert(),n,this.selection)}}},Dr=class{constructor(e,n,r,s,i){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=s,this.prevComposition=i}},u5=20;function p5(t,e,n,r){let s=n.getMeta(Wi),i;if(s)return s.historyState;n.getMeta(g5)&&(t=new Dr(t.done,t.undone,null,0,-1));let o=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(o&&o.getMeta(Wi))return o.getMeta(Wi).redo?new Dr(t.done.addTransform(n,void 0,r,Ld(e)),t.undone,jC(n.mapping.maps),t.prevTime,t.prevComposition):new Dr(t.done,t.undone.addTransform(n,void 0,r,Ld(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(o&&o.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),l=t.prevTime==0||!o&&t.prevComposition!=a&&(t.prevTime<(n.time||0)-r.newGroupDelay||!f5(n,t.prevRanges)),c=o?fb(t.prevRanges,n.mapping):jC(n.mapping.maps);return new Dr(t.done.addTransform(n,l?e.selection.getBookmark():void 0,r,Ld(e)),Ui.empty,c,n.time,a??t.prevComposition)}else return(i=n.getMeta("rebased"))?new Dr(t.done.rebased(n,i),t.undone.rebased(n,i),fb(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new Dr(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),fb(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function f5(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,s)=>{for(let i=0;i<e.length;i+=2)r<=e[i+1]&&s>=e[i]&&(n=!0)}),n}function jC(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,s,i,o)=>e.push(i,o));return e}function fb(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let s=e.map(t[r],1),i=e.map(t[r+1],-1);s<=i&&n.push(s,i)}return n}function m5(t,e,n){let r=Ld(e),s=Wi.get(e).spec.config,i=(n?t.undone:t.done).popEvent(e,r);if(!i)return null;let o=i.selection.resolve(i.transform.doc),a=(n?t.done:t.undone).addTransform(i.transform,e.selection.getBookmark(),s,r),l=new Dr(n?a:i.remaining,n?i.remaining:a,null,0,-1);return i.transform.setSelection(o).setMeta(Wi,{redo:n,historyState:l})}var mb=!1,VC=null;function Ld(t){let e=t.plugins;if(VC!=e){mb=!1,VC=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){mb=!0;break}}return mb}var Wi=new Xe("history"),g5=new Xe("closeHistory");function WC(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new Oe({key:Wi,state:{init(){return new Dr(Ui.empty,Ui.empty,null,0,-1)},apply(e,n,r){return p5(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,s=r=="historyUndo"?gb:r=="historyRedo"?bb:null;return!s||!e.editable?!1:(n.preventDefault(),s(e.state,e.dispatch))}}}})}function Od(t,e){return(n,r)=>{let s=Wi.getState(n);if(!s||(t?s.undone:s.done).eventCount==0)return!1;if(r){let i=m5(s,n,t);i&&r(e?i.scrollIntoView():i)}return!0}}var gb=Od(!1,!0),bb=Od(!0,!0),mY=Od(!1,!1),gY=Od(!0,!1);var TY=et.create({name:"characterCount",addOptions(){return{limit:null,autoTrim:!0,mode:"textSize",textCounter:t=>t.length,wordCounter:t=>t.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=t=>{let e=t?.node||this.editor.state.doc;if((t?.mode||this.options.mode)==="textSize"){let n=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(n)}return e.nodeSize},this.storage.words=t=>{let e=t?.node||this.editor.state.doc,n=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let t=!1;return[new Oe({key:new Xe("characterCount"),appendTransaction:(e,n,r)=>{if(t)return;let s=this.options.limit,i=this.options.autoTrim;if(s==null||s===0||i===!1){t=!0;return}let o=this.storage.characters({node:r.doc});if(o>s){let a=o-s,l=0,c=a;console.warn(`[CharacterCount] Initial content exceeded limit of ${s} characters. Content was automatically trimmed.`);let h=r.tr.deleteRange(l,c);return t=!0,h}t=!0},filterTransaction:(e,n)=>{let r=this.options.limit;if(!e.docChanged||r===0||r===null||r===void 0)return!0;let s=this.storage.characters({node:n.doc}),i=this.storage.characters({node:e.doc});if(i<=r||s>r&&i>r&&i<=s)return!0;if(s>r&&i>r&&i>s||!e.getMeta("paste"))return!1;let o=e.selection.$head.pos,a=o-(i-r),l=o;return e.deleteRange(a,l),!(this.storage.characters({node:e.doc})>r)}})]}}),KC=et.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[FC(this.options)]}}),EY=et.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new Oe({key:new Xe("focus"),props:{decorations:({doc:t,selection:e})=>{let{isEditable:n,isFocused:r}=this.editor,{anchor:s}=e,i=[];if(!n||!r)return Je.create(t,[]);let o=0;this.options.mode==="deepest"&&t.descendants((l,c)=>{if(!l.isText){if(!(s>=c&&s<=c+l.nodeSize-1))return!1;o+=1}});let a=0;return t.descendants((l,c)=>{if(l.isText||!(s>=c&&s<=c+l.nodeSize-1))return!1;if(a+=1,this.options.mode==="deepest"&&o-a>0||this.options.mode==="shallowest"&&a>1)return this.options.mode==="deepest";i.push(Rt.node(c,c+l.nodeSize,{class:this.options.className}))}),Je.create(t,i)}}})]}}),GC=et.create({name:"gapCursor",addProseMirrorPlugins(){return[HC()]},extendNodeSchema(t){var e;let n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=Ve(pe(t,"allowGapCursor",n)))!==null&&e!==void 0?e:null}}}),JC="placeholder",UC=new Xe("tiptap__placeholder");function XC(t){let{editor:e,placeholder:n,dataAttribute:r,pos:s,node:i,isEmptyDoc:o,hasAnchor:a,classes:{emptyNode:l,emptyEditor:c}}=t,h=[l];return o&&h.push(c),Rt.node(s,s+i.nodeSize,{class:h.join(" "),[r]:typeof n=="function"?n({editor:e,node:i,pos:s,hasAnchor:a}):n})}function YC(t,e){return typeof t=="function"?t(e):t}function QC({editor:t,options:e,dataAttribute:n,doc:r,selection:s,from:i,to:o}){let{anchor:a}=s,l=[],c=t.isEmpty;return r.nodesBetween(i,o,(h,d)=>{let u=a>=d&&a<=d+h.nodeSize,f=!h.isLeaf&&Xo(h);return h.type.isTextblock&&(u||!e.showOnlyCurrent)&&f&&l.push(XC({editor:t,isEmptyDoc:c,dataAttribute:n,hasAnchor:u,placeholder:e.placeholder,classes:{emptyEditor:e.emptyEditorClass,emptyNode:YC(e.emptyNodeClass,{editor:t,node:h,pos:d,hasAnchor:u})},node:h,pos:d})),e.includeChildren}),l}function ZC({editor:t,options:e,dataAttribute:n,doc:r,selection:s}){if(!(t.isEditable||!e.showOnlyWhenEditable))return null;let{anchor:i}=s,o=[],a=t.isEmpty;if(e.showOnlyCurrent&&!e.includeChildren){let l=r.resolve(i),c=l.depth>0?l.node(1):l.nodeAfter,h=l.depth>0?l.before(1):i;if(c&&c.type.isTextblock&&Xo(c)){let d=i>=h&&i<=h+c.nodeSize;o.push(XC({editor:t,isEmptyDoc:a,dataAttribute:n,hasAnchor:d,placeholder:e.placeholder,classes:{emptyEditor:e.emptyEditorClass,emptyNode:YC(e.emptyNodeClass,{editor:t,node:c,pos:h,hasAnchor:d})},node:c,pos:h}))}}else o.push(...QC({editor:t,options:e,dataAttribute:n,doc:r,selection:s,from:0,to:r.content.size}));return Je.create(r,o)}function Fl(t,e){let n=t.resolve(e);if(n.depth===0){var r;let i=(r=n.nodeAfter)!==null&&r!==void 0?r:n.nodeBefore;if(!i)return{from:e,to:e};let o=n.nodeAfter?e:e-i.nodeSize;return{from:o,to:o+i.nodeSize}}let s=n.before(1);return{from:s,to:s+n.node(1).nodeSize}}function Bl(t,e){return{from:Math.max(0,e.from-1),to:Math.min(t.content.size,e.to-1)}}function b5(t,e,n){let r=[];return t.forEach((s,i)=>{let o=i,a=o+s.nodeSize,l=o+1,c=a+1;l<n&&c>e&&r.push({from:o,to:a})}),r}function v5(t){if(t.length===0)return[];let e=[...t].sort((r,s)=>r.from-s.from),n=[{...e[0]}];for(let r=1;r<e.length;r+=1){let s=n[n.length-1],i=e[r];i.from<=s.to?s.to=Math.max(s.to,i.to):n.push({...i})}return n}function y5(t,e){let n=b5(t,e.from,e.to);return n.push(Bl(t,Fl(t,e.from))),e.to>e.from?n.push(Bl(t,Fl(t,Math.min(e.to,t.content.size+1)-1))):e.from<t.content.size+1&&n.push(Bl(t,Fl(t,Math.min(e.from+1,t.content.size)))),n}function w5(t,e,n){let r=[];if(t.docChanged){let s=Jo(t);for(let i of s)r.push(...y5(n.doc,i.newRange))}return t.selectionSet&&(r.push(Bl(n.doc,Fl(n.doc,t.mapping.map(e.selection.anchor)))),r.push(Bl(n.doc,Fl(n.doc,n.selection.anchor)))),v5(r)}function x5(t,e,n){let r=Math.max(0,Math.min(t,n.content.size));return{from:r,to:Math.max(r,Math.min(e,n.content.size))}}function k5({decorations:t,ranges:e,editor:n,options:r,dataAttribute:s,doc:i,selection:o}){let a=t;for(let l of e){let{from:c,to:h}=x5(l.from,l.to,i),d=a.find(c,h).filter(f=>f.from>=c&&f.to<=h);d.length&&(a=a.remove(d));let u=QC({editor:n,options:r,dataAttribute:s,doc:i,selection:o,from:c,to:h});u.length&&(a=a.add(i,u))}return a}function _5({editor:t,options:e,dataAttribute:n}){return{init(r,s){let i=ZC({editor:t,options:e,dataAttribute:n,doc:s.doc,selection:s.selection});return i??Je.empty},apply(r,s,i,o){return!r.docChanged&&!r.selectionSet?s:k5({decorations:s.map(r.mapping,r.doc),ranges:w5(r,i,o),editor:t,options:e,dataAttribute:n,doc:o.doc,selection:o.selection})}}}function S5(t){return t.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}function C5({editor:t,options:e}){let n=e.dataAttribute?`data-${S5(e.dataAttribute)}`:`data-${JC}`,r=e.showOnlyCurrent&&!e.includeChildren;return new Oe({key:UC,...r?{}:{state:_5({editor:t,options:e,dataAttribute:n})},props:{decorations:r?({doc:s,selection:i})=>ZC({editor:t,options:e,dataAttribute:n,doc:s,selection:i}):s=>{var i;return e.showOnlyWhenEditable&&!t.isEditable?Je.empty:(i=UC.getState(s))!==null&&i!==void 0?i:Je.empty}}})}var AY=et.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:JC,placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[C5({editor:this.editor,options:this.options})]}});function vb(t,e){return!t.selection.empty&&!Vh(t.selection)&&e.isEditable}function T5(t,e){return vb(t,e)&&!e.isFocused&&!e.view.dragging}function E5(){var t;(t=window.getSelection())===null||t===void 0||t.removeAllRanges()}function A5(t){t.focus()}var PY=et.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){let{editor:t,options:e}=this;return[new Oe({key:new Xe("selection"),props:{decorations(n){return T5(n,t)?Je.create(n.doc,[Rt.inline(n.selection.from,n.selection.to,{class:e.className})]):null},handleDOMEvents:{blur(n){return vb(n.state,t)&&E5(),!1},focus(n){return vb(n.state,t)&&requestAnimationFrame(()=>{!t.isDestroyed&&n.hasFocus()&&A5(n)}),!1}}}})]}});function qC({types:t,node:e}){return e&&Array.isArray(t)&&t.includes(e.type)||e?.type===t}var eT=et.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var t;let e=new Xe(this.name),n=this.options.node||((t=this.editor.schema.topNodeType.contentMatch.defaultType)===null||t===void 0?void 0:t.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,s])=>s).filter(s=>(this.options.notAfter||[]).concat(n).includes(s.name));return[new Oe({key:e,appendTransaction:(s,i,o)=>{let{doc:a,tr:l,schema:c}=o,h=e.getState(o),d=a.content.size,u=c.nodes[n];if(!s.some(f=>f.getMeta("skipTrailingNode"))&&h)return l.insert(d,u.create())},state:{init:(s,i)=>{let o=i.tr.doc.lastChild;return!qC({node:o,types:r})},apply:(s,i)=>{if(!s.docChanged||s.getMeta("__uniqueIDTransaction"))return i;let o=s.doc.lastChild;return!qC({node:o,types:r})}}})]}}),tT=et.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>gb(t,e),redo:()=>({state:t,dispatch:e})=>bb(t,e)}},addProseMirrorPlugins(){return[WC(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-\u044F":()=>this.editor.commands.undo(),"Shift-Mod-\u044F":()=>this.editor.commands.redo()}}});var P5=et.create({name:"starterKit",addExtensions(){let t=[];if(this.options.bold!==!1&&t.push(GS.configure(this.options.bold)),this.options.blockquote!==!1&&t.push(KS.configure(this.options.blockquote)),this.options.bulletList!==!1&&t.push(rb.configure(this.options.bulletList)),this.options.code!==!1&&t.push(JS.configure(this.options.code)),this.options.codeBlock!==!1&&t.push(XS.configure(this.options.codeBlock)),this.options.document!==!1&&t.push(YS.configure(this.options.document)),this.options.dropcursor!==!1&&t.push(KC.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&t.push(GC.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&t.push(QS.configure(this.options.hardBreak)),this.options.heading!==!1&&t.push(ZS.configure(this.options.heading)),this.options.undoRedo!==!1&&t.push(tT.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&t.push(eC.configure(this.options.horizontalRule)),this.options.italic!==!1&&t.push(tC.configure(this.options.italic)),this.options.listItem!==!1&&t.push(ob.configure(this.options.listItem)),this.options.listKeymap!==!1){var e;t.push(lb.configure((e=this.options)===null||e===void 0?void 0:e.listKeymap))}if(this.options.link!==!1){var n;t.push(wC.configure((n=this.options)===null||n===void 0?void 0:n.link))}if(this.options.orderedList!==!1&&t.push(cb.configure(this.options.orderedList)),this.options.paragraph!==!1&&t.push(LC.configure(this.options.paragraph)),this.options.strike!==!1&&t.push(OC.configure(this.options.strike)),this.options.text!==!1&&t.push(zC.configure(this.options.text)),this.options.underline!==!1){var r;t.push(NC.configure((r=this.options)===null||r===void 0?void 0:r.underline))}if(this.options.trailingNode!==!1){var s;t.push(eT.configure((s=this.options)===null||s===void 0?void 0:s.trailingNode))}return t}}),nT=P5;function kb(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Gi=kb();function cT(t){Gi=t}var qi={exec:()=>null};function Ue(t,e=""){let n=typeof t=="string"?t:t.source,r={replace:(s,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(pn.caret,"$1"),n=n.replace(s,o),r},getRegex:()=>new RegExp(n,e)};return r}var D5=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),pn={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}>`)},M5=/^(?:[ \t]*(?:\n|$))+/,R5=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,I5=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Vl=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,L5=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,_b=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,hT=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,dT=Ue(hT).replace(/bull/g,_b).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),O5=Ue(hT).replace(/bull/g,_b).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Sb=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,z5=/^[^\n]+/,Cb=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,N5=Ue(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Cb).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),F5=Ue(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,_b).getRegex(),Hd="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Tb=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,B5=Ue("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Tb).replace("tag",Hd).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),uT=Ue(Sb).replace("hr",Vl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Hd).getRegex(),H5=Ue(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",uT).getRegex(),Eb={blockquote:H5,code:R5,def:N5,fences:I5,heading:L5,hr:Vl,html:B5,lheading:dT,list:F5,newline:M5,paragraph:uT,table:qi,text:z5},rT=Ue("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Vl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Hd).getRegex(),$5={...Eb,lheading:O5,table:rT,paragraph:Ue(Sb).replace("hr",Vl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",rT).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Hd).getRegex()},j5={...Eb,html:Ue(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Tb).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:qi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ue(Sb).replace("hr",Vl).replace("heading",` *#{1,6} *[^
|
|
187
187
|
]`).replace("lheading",dT).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},V5=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,W5=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,pT=/^( {2,}|\\)\n(?!\s*$)/,U5=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ta=/[\p{P}\p{S}]/u,$d=/[\s\p{P}\p{S}]/u,Ab=/[^\s\p{P}\p{S}]/u,q5=Ue(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,$d).getRegex(),fT=/(?!~)[\p{P}\p{S}]/u,K5=/(?!~)[\s\p{P}\p{S}]/u,G5=/(?:[^\s\p{P}\p{S}]|~)/u,J5=Ue(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",D5?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),mT=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,X5=Ue(mT,"u").replace(/punct/g,ta).getRegex(),Y5=Ue(mT,"u").replace(/punct/g,fT).getRegex(),gT="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Q5=Ue(gT,"gu").replace(/notPunctSpace/g,Ab).replace(/punctSpace/g,$d).replace(/punct/g,ta).getRegex(),Z5=Ue(gT,"gu").replace(/notPunctSpace/g,G5).replace(/punctSpace/g,K5).replace(/punct/g,fT).getRegex(),eB=Ue("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ab).replace(/punctSpace/g,$d).replace(/punct/g,ta).getRegex(),tB=Ue(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,ta).getRegex(),nB="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",rB=Ue(nB,"gu").replace(/notPunctSpace/g,Ab).replace(/punctSpace/g,$d).replace(/punct/g,ta).getRegex(),sB=Ue(/\\(punct)/,"gu").replace(/punct/g,ta).getRegex(),iB=Ue(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),oB=Ue(Tb).replace("(?:-->|$)","-->").getRegex(),aB=Ue("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",oB).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Nd=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,lB=Ue(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Nd).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),bT=Ue(/^!?\[(label)\]\[(ref)\]/).replace("label",Nd).replace("ref",Cb).getRegex(),vT=Ue(/^!?\[(ref)\](?:\[\])?/).replace("ref",Cb).getRegex(),cB=Ue("reflink|nolink(?!\\()","g").replace("reflink",bT).replace("nolink",vT).getRegex(),sT=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Pb={_backpedal:qi,anyPunctuation:sB,autolink:iB,blockSkip:J5,br:pT,code:W5,del:qi,delLDelim:qi,delRDelim:qi,emStrongLDelim:X5,emStrongRDelimAst:Q5,emStrongRDelimUnd:eB,escape:V5,link:lB,nolink:vT,punctuation:q5,reflink:bT,reflinkSearch:cB,tag:aB,text:U5,url:qi},hB={...Pb,link:Ue(/^!?\[(label)\]\((.*?)\)/).replace("label",Nd).getRegex(),reflink:Ue(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Nd).getRegex()},yb={...Pb,emStrongRDelimAst:Z5,emStrongLDelim:Y5,delLDelim:tB,delRDelim:rB,url:Ue(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",sT).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Ue(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",sT).getRegex()},dB={...yb,br:Ue(pT).replace("{2,}","*").getRegex(),text:Ue(yb.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},zd={normal:Eb,gfm:$5,pedantic:j5},Hl={normal:Pb,gfm:yb,breaks:dB,pedantic:hB},uB={"&":"&","<":"<",">":">",'"':""","'":"'"},iT=t=>uB[t];function Mr(t,e){if(e){if(pn.escapeTest.test(t))return t.replace(pn.escapeReplace,iT)}else if(pn.escapeTestNoEncode.test(t))return t.replace(pn.escapeReplaceNoEncode,iT);return t}function oT(t){try{t=encodeURI(t).replace(pn.percentDecode,"%")}catch{return null}return t}function aT(t,e){let n=t.replace(pn.findPipe,(i,o,a)=>{let l=!1,c=o;for(;--c>=0&&a[c]==="\\";)l=!l;return l?"|":" |"}),r=n.split(pn.splitPipe),s=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;s<r.length;s++)r[s]=r[s].trim().replace(pn.slashPipe,"|");return r}function $l(t,e,n){let r=t.length;if(r===0)return"";let s=0;for(;s<r;){let i=t.charAt(r-s-1);if(i===e&&!n)s++;else if(i!==e&&n)s++;else break}return t.slice(0,r-s)}function pB(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let r=0;r<t.length;r++)if(t[r]==="\\")r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return n>0?-2:-1}function fB(t,e=0){let n=e,r="";for(let s of t)if(s===" "){let i=4-n%4;r+=" ".repeat(i),n+=i}else r+=s,n++;return r}function lT(t,e,n,r,s){let i=e.href,o=e.title||null,a=t[1].replace(s.other.outputLinkReplace,"$1");r.state.inLink=!0;let l={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:o,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,l}function mB(t,e,n){let r=t.match(n.other.indentCodeCompensation);if(r===null)return e;let s=r[1];return e.split(`
|
|
188
188
|
`).map(i=>{let o=i.match(n.other.beginningSpace);if(o===null)return i;let[a]=o;return a.length>=s.length?i.slice(s.length):i}).join(`
|
|
@@ -4482,6 +4482,7 @@ body[data-ds-dark-theme] :is(
|
|
|
4482
4482
|
}
|
|
4483
4483
|
.dsh-ssh-test-result.is-warning {
|
|
4484
4484
|
display: flex;
|
|
4485
|
+
flex-wrap: wrap;
|
|
4485
4486
|
align-items: center;
|
|
4486
4487
|
justify-content: space-between;
|
|
4487
4488
|
gap: 14px;
|
|
@@ -4500,11 +4501,10 @@ body[data-ds-dark-theme] :is(
|
|
|
4500
4501
|
gap: 4px;
|
|
4501
4502
|
}
|
|
4502
4503
|
.dsh-ssh-test-result.is-warning code {
|
|
4503
|
-
overflow: hidden;
|
|
4504
4504
|
font: var(--ssh-type-caption)/1.3 var(--ssh-font-mono),
|
|
4505
4505
|
monospace;
|
|
4506
|
-
|
|
4507
|
-
white-space:
|
|
4506
|
+
overflow-wrap: anywhere;
|
|
4507
|
+
white-space: normal;
|
|
4508
4508
|
}
|
|
4509
4509
|
.dsh-ssh-test-result.is-success {
|
|
4510
4510
|
display: flex;
|
|
@@ -6119,7 +6119,7 @@ ${C.command}`.toLocaleLowerCase()})),[n,e]),_=(0,wt.useMemo)(()=>{let C=s.toLoca
|
|
|
6119
6119
|
@media (prefers-reduced-transparency: reduce) {
|
|
6120
6120
|
.dsh-ssh-workspace :is(.dsh-ssh-command-list, .dsh-ssh-forward-list, .dsh-ssh-vault-list, .dsh-ssh-proxy-list, .dsh-ssh-workbench-split) { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--ssh-surface-raised); }
|
|
6121
6121
|
}
|
|
6122
|
-
`;var fn=require("react"),It=require("@deepseek-ai/dsh-client-ui-primitives");var ds=require("react"),Zi=require("@deepseek-ai/dsh-client-ui-primitives"),Re=require("react/jsx-runtime");function WE({profile:t,project:e,workspaces:n,currentWorkspaceId:r,recentWorkspaceId:s,returnFocus:i,onClose:o,onCreate:a}){le();let l=n.some(w=>String(w.workspaceId)===r)?r:n.some(w=>String(w.workspaceId)===s)?s:n[0]===void 0?void 0:String(n[0].workspaceId),[c,h]=(0,ds.useState)(l),[d,u]=(0,ds.useState)(!1),[f,p]=(0,ds.useState)(),m=(0,ds.useRef)(null),g=(0,ds.useRef)(null);(0,ds.useEffect)(()=>((m.current??g.current)?.focus(),()=>{i.isConnected&&i.focus()}),[i]);let b=()=>{d||o()},v=async w=>{if(w.preventDefault(),c!==void 0){u(!0),p(void 0);try{await a(e,c)}catch(x){p(rH(x)),u(!1)}}};return(0,Re.jsx)(Zi.Modal,{open:!0,onClose:b,title:y("project-session-dialog.selectSessionWorkspace"),headless:!0,className:"dsh-ssh-session-create-modal",children:(0,Re.jsxs)("section",{className:"dsh-ssh-session-create-shell",onKeyDown:nH,children:[(0,Re.jsxs)("header",{children:[(0,Re.jsxs)("span",{children:[(0,Re.jsx)("h2",{children:y("project-session-dialog.newRemoteSession")}),(0,Re.jsx)("p",{children:y("project-session-dialog.chooseTheLocalProjectThisSessionBelongsToIn")})]}),(0,Re.jsx)("button",{ref:g,type:"button",className:"dsh-ssh-icon-button",disabled:d,onClick:b,"aria-label":y("client.close"),children:(0,Re.jsx)(Zi.IconCloseOutline16,{size:16})})]}),(0,Re.jsxs)("form",{onSubmit:w=>{v(w)},children:[(0,Re.jsxs)("dl",{className:"dsh-ssh-session-create-target",children:[(0,Re.jsxs)("div",{children:[(0,Re.jsx)("dt",{children:y("project-session-dialog.remoteHost")}),(0,Re.jsxs)("dd",{children:[t.name,(0,Re.jsxs)("small",{children:[t.username,"@",t.host,":",t.port]})]})]}),(0,Re.jsxs)("div",{children:[(0,Re.jsx)("dt",{children:y("project-session-dialog.remoteWorkingDirectory")}),(0,Re.jsxs)("dd",{children:[e.name,(0,Re.jsx)("small",{title:e.path,children:e.path})]})]})]}),(0,Re.jsxs)("fieldset",{className:"dsh-ssh-workspace-picker",children:[(0,Re.jsx)("legend",{children:y("project-session-dialog.sessionWorkspace")}),(0,Re.jsx)("p",{children:y("project-session-dialog.sessionRecordsAreStoredInTheSelectedDshProject")}),n.length===0?(0,Re.jsxs)("div",{className:"dsh-ssh-workspace-picker-empty",children:[(0,Re.jsx)(Zi.IconFolderClose16,{size:18}),(0,Re.jsxs)("span",{children:[(0,Re.jsx)("strong",{children:y("project-session-dialog.noDshProjectsAvailableYet")}),(0,Re.jsx)("small",{children:y("project-session-dialog.closeThisWindowFirstThenCreateOrAddA")})]})]}):(0,Re.jsx)("div",{className:"dsh-ssh-workspace-options dsh-ssh-scroll-surface",role:"radiogroup","aria-label":y("project-session-dialog.selectDshProject"),children:n.map(w=>{let x=String(w.workspaceId),_=x===r?y("project-session-dialog.currentProject"):x===s?y("project-session-dialog.recentlyUsed"):void 0;return(0,Re.jsxs)("label",{className:"dsh-ssh-workspace-option",children:[(0,Re.jsx)("input",{ref:x===l?m:void 0,className:"sr-only",type:"radio",name:"dsh-ssh-session-workspace",value:x,checked:c===x,disabled:d,onChange:()=>h(x)}),(0,Re.jsxs)("span",{children:[(0,Re.jsx)("span",{className:"dsh-ssh-workspace-option-icon",children:(0,Re.jsx)(Zi.IconFolderClose16,{size:16})}),(0,Re.jsxs)("span",{className:"dsh-ssh-workspace-option-copy",children:[(0,Re.jsx)("strong",{children:w.title}),(0,Re.jsx)("small",{title:w.path,children:w.path})]}),_&&(0,Re.jsx)("em",{children:_}),(0,Re.jsx)("i",{"aria-hidden":"true"})]})]},x)})})]}),f&&(0,Re.jsx)("p",{className:"dsh-ssh-inline-error",role:"alert",children:f}),(0,Re.jsxs)("div",{className:"dsh-ssh-dialog-actions",children:[(0,Re.jsx)("button",{type:"button",className:"dsh-ssh-secondary-button",disabled:d,onClick:b,children:y("client.cancel")}),(0,Re.jsx)("button",{type:"submit",className:"dsh-ssh-primary-button",disabled:d||c===void 0,children:d?y("project-session-dialog.creating"):y("project-session-dialog.createAndOpen")})]})]})]})})}function nH(t){if(t.key!=="Tab")return;let e=Array.from(t.currentTarget.querySelectorAll('button:not(:disabled), input:not(:disabled), a[href], [tabindex]:not([tabindex="-1"])')).filter(s=>s.getClientRects().length>0),n=e[0],r=e[e.length-1];n===void 0||r===void 0||(t.shiftKey&&document.activeElement===n?(t.preventDefault(),r.focus()):!t.shiftKey&&document.activeElement===r&&(t.preventDefault(),n.focus()))}function rH(t){return t instanceof Error?t.message:String(t)}var pr=require("react"),lu=require("@deepseek-ai/dsh-client-ui-primitives");var ur=require("react/jsx-runtime"),sH="project-directory-picker",iH=600;function UE({profileId:t,value:e,disabled:n,onChange:r}){let s=le(),i=(0,pr.useId)(),o=(0,pr.useId)(),a=(0,pr.useRef)(0),[l,c]=(0,pr.useState)({kind:"idle"}),h=`sftp:${t}`,d=(0,pr.useMemo)(()=>l.kind==="ready"?l.directory.entries.filter(ks):[],[l,s]);(0,pr.useEffect)(()=>{let f=++a.current,p=e.trim();if(p.length===0){c({kind:"idle"});return}c({kind:"checking"});let m=window.setTimeout(()=>{Yl(sH,h,p).then(g=>{f===a.current&&c({kind:"ready",directory:g})}).catch(g=>{f===a.current&&c({kind:"error",message:oH(g)})})},iH);return()=>window.clearTimeout(m)},[h,e]);let u=l.kind==="idle"?y("remote-path-input.typeDirectlyTheRemotePathIsCheckedAutomaticallyAfter"):l.kind==="checking"?y("remote-path-input.checkingTheRemotePath"):l.kind==="error"?y("remote-path-input.thePathDoesNotExistOrCannotBeAccessed",[l.message]):d.length===0?y("remote-path-input.thePathIsAccessibleNoSubdirectoriesYet"):y("remote-path-input.thePathIsAccessibleFoundSubdirectories",[d.length]);return(0,ur.jsxs)("div",{className:"dsh-ssh-field dsh-ssh-remote-path-field",children:[(0,ur.jsx)("label",{htmlFor:i,children:y("file-transfer-workspace.remotePath")}),(0,ur.jsx)("input",{id:i,required:!0,maxLength:4096,value:e,disabled:n,spellCheck:!1,placeholder:"/var/www/example","aria-invalid":l.kind==="error"?"true":void 0,"aria-describedby":o,onChange:f=>r(f.target.value)}),(0,ur.jsx)("small",{id:o,className:`dsh-ssh-remote-path-feedback is-${l.kind}`,role:l.kind==="error"?"alert":"status",children:u}),l.kind==="ready"&&d.length>0&&(0,ur.jsx)("div",{className:"dsh-ssh-remote-path-options","aria-label":y("remote-path-input.selectableRemoteSubdirectories"),children:d.map(f=>(0,ur.jsxs)("button",{type:"button",disabled:n,title:y("remote-path-input.select",[f.path]),onClick:()=>r(f.path),children:[(0,ur.jsx)(lu.IconFolderClose16,{size:15,"aria-hidden":"true"}),(0,ur.jsx)("span",{children:f.name}),(0,ur.jsx)(lu.IconChevronRightOutline14,{size:13,"aria-hidden":"true"})]},f.path))})]})}function oH(t){return t instanceof Error?t.message:String(t)}var oa=require("react");var eo=require("react/jsx-runtime");function aa(){let[t,e]=(0,oa.useState)(),[n,r]=(0,oa.useState)(!1),[s,i]=(0,oa.useState)(),o=(0,oa.useRef)(!1),a=()=>{o.current||e(void 0)},l=async()=>{if(!(!t||o.current)){o.current=!0,r(!0),i(void 0);try{await t.onConfirm(),e(void 0)}catch(c){i(Me(c))}finally{o.current=!1,r(!1)}}};return{confirm:c=>{o.current||(i(void 0),e(c))},confirmation:t&&(0,eo.jsxs)(qe,{variant:"confirmation",dismissible:!n,title:t.title,subtitle:t.description,onClose:a,children:[s&&(0,eo.jsx)("p",{className:"dsh-ssh-inline-error",role:"alert",children:s}),(0,eo.jsxs)("div",{className:"dsh-ssh-dialog-actions",children:[(0,eo.jsx)("button",{type:"button",className:"dsh-ssh-secondary-button",disabled:n,onClick:a,children:y("client.cancel")}),(0,eo.jsx)("button",{type:"button",className:"dsh-ssh-danger-button",disabled:n,onClick:()=>{l()},children:n?y("file-entry-delete-dialog.deleting"):y("file-entry-delete-dialog.confirmDelete")})]})]})}}function la(t,e){return t.mountedProjectIds?.[e]??(t.workingProjectIds[e]?[t.workingProjectIds[e]]:[])}var ie=require("react/jsx-runtime");function qE(t){le();let e=Yi(),[n,r]=(0,fn.useState)(""),[s,i]=(0,fn.useState)(()=>new Set),[o,a]=(0,fn.useState)(()=>new Set),[l,c]=(0,fn.useState)({}),[h,d]=(0,fn.useState)(),[u,f]=(0,fn.useState)(),[p,m]=(0,fn.useState)(),[g,b]=(0,fn.useState)(),v=n.trim().toLocaleLowerCase(),w=(0,fn.useMemo)(()=>cH(t.profiles.filter(C=>hH(C).includes(v))),[v,t.profiles]),x=async C=>{d(C);try{let T=await Iv(C);c(E=>({...E,[C]:T})),b(void 0)}catch(T){b(KE(T))}finally{d(T=>T===C?void 0:T)}},_=C=>{a(new Set([C])),l[C]===void 0&&x(C),t.onSelect({profileId:C,path:"~"})},k=C=>{let T=t.access?.profileIds??[],E=T.includes(C);t.onProfiles(E?T.filter(M=>M!==C):[...T,C]),E&&t.onDirectory(C,void 0)},S=C=>i(T=>{let E=new Set(T);return E.has(C)?E.delete(C):E.add(C),E});return(0,ie.jsxs)("aside",{ref:e.ref,onPointerMove:e.onPointerMove,onPointerLeave:e.onPointerLeave,className:"dsh-ssh-remote-tree dsh-ssh-border-surface",children:[(0,ie.jsxs)("header",{className:"dsh-ssh-tree-header",children:[(0,ie.jsxs)("span",{children:[(0,ie.jsx)("strong",{children:y("remote-workspace-tree.hostsProjects")}),(0,ie.jsxs)("small",{children:[t.profiles.length," ",y("remote-workspace-tree.hosts")]})]}),(0,ie.jsx)("button",{type:"button",className:"dsh-ssh-icon-button",onClick:t.onNewProfile,"aria-label":y("remote-workspace-tree.newConnection"),title:y("remote-workspace-tree.newConnection"),children:(0,ie.jsx)(It.IconPlusOutline16,{size:16})})]}),(0,ie.jsxs)("label",{className:"dsh-ssh-search",children:[(0,ie.jsx)("span",{className:"sr-only",children:y("remote-workspace-tree.searchHosts")}),(0,ie.jsx)("input",{value:n,onChange:C=>r(C.target.value),placeholder:y("remote-workspace-tree.searchHostsGroupsTags")})]}),(0,ie.jsxs)("div",{className:"dsh-ssh-tree-scroll dsh-ssh-scroll-surface",children:[w.map(C=>{let T=s.has(C.name);return(0,ie.jsxs)("section",{className:"dsh-ssh-tree-group","data-collapsed":T,children:[(0,ie.jsxs)("h3",{children:[(0,ie.jsxs)("button",{type:"button","aria-expanded":!T,onClick:()=>S(C.name),children:[T?(0,ie.jsx)(It.IconChevronRightOutline14,{size:14}):(0,ie.jsx)(It.IconChevronDownOutline14,{size:14}),(0,ie.jsx)("span",{children:C.name||y("remote-workspace-tree.ungrouped")}),(0,ie.jsx)("small",{children:C.profiles.length})]}),C.name&&t.onGroupProxy&&(0,ie.jsx)("button",{type:"button",className:"dsh-ssh-group-proxy-button","aria-label":y("group-proxy.title",[C.name]),title:y("group-proxy.title",[C.name]),onClick:()=>t.onGroupProxy?.(C.name),children:(0,ie.jsx)(It.IconEditOutline16,{size:14})})]}),!T&&C.profiles.map(E=>{let M=o.has(E.id),z=t.access?.profileIds.includes(E.id)===!0,N=l[E.id]??[],$=t.selected?.profileId===E.id&&t.selected.projectId===void 0;return(0,ie.jsxs)("div",{className:"dsh-ssh-tree-host","data-open":M,children:[(0,ie.jsxs)("div",{"data-ssh-interactive":"row","data-ssh-context-row":!0,className:`dsh-ssh-tree-host-row${z?" is-authorized":""}${$?" is-active":""}`,children:[(0,ie.jsxs)("button",{type:"button",className:"dsh-ssh-tree-host-main","aria-pressed":$,"aria-expanded":M,title:y("remote-workspace-tree.selectAndExpand",[E.name]),onClick:()=>_(E.id),children:[(0,ie.jsx)("span",{className:"dsh-ssh-host-monogram",children:E.name.slice(0,1).toUpperCase()}),(0,ie.jsxs)("span",{children:[(0,ie.jsx)("strong",{children:E.name}),(0,ie.jsxs)("small",{children:[E.username,"@",E.host]})]})]}),(0,ie.jsx)("button",{type:"button","data-ssh-interactive":"choice",className:`dsh-ssh-tree-mount dsh-ssh-context-action${z?" is-mounted":""}`,"aria-label":`${z?y("remote-workspace-tree.unmount"):y("remote-workspace-tree.mount")} ${E.name}`,"aria-pressed":z,title:t.access===null?y("remote-workspace-tree.openADshSessionBeforeMountingHosts"):z?y("remote-workspace-tree.unmountFromCurrentSession"):y("remote-workspace-tree.mountToCurrentSession"),disabled:t.access===null||t.accessLoading||t.accessSaving,onClick:()=>k(E.id),children:z?y("remote-workspace-tree.unmount"):y("remote-workspace-tree.mount")}),(0,ie.jsx)("button",{type:"button",className:"dsh-ssh-tree-add","aria-label":y("remote-workspace-tree.addPinnedDirectoryFor",[E.name]),title:y("remote-workspace-tree.addPinnedDirectory"),onClick:()=>f({profile:E}),children:(0,ie.jsx)(It.IconPlusOutline16,{size:14})})]}),M&&(0,ie.jsx)("div",{className:"dsh-ssh-tree-branches",children:h===E.id&&l[E.id]===void 0?(0,ie.jsx)("p",{className:"dsh-ssh-tree-state",children:y("remote-workspace-tree.readingPinnedDirectories")}):N.length===0?(0,ie.jsxs)("button",{type:"button",className:"dsh-ssh-tree-empty",onClick:()=>f({profile:E}),children:[(0,ie.jsx)(It.IconPlusOutline16,{size:13}),y("remote-workspace-tree.addProjectDirectory")]}):N.map(F=>{let j=t.selected?.projectId===F.id,P=t.access!==null&&la(t.access,E.id).includes(F.id),I=t.access?.workingProjectIds[E.id]===F.id;return(0,ie.jsx)("div",{className:"dsh-ssh-tree-project",children:(0,ie.jsxs)("div",{"data-ssh-interactive":"row",className:`dsh-ssh-tree-project-row${j?" is-active":""}${P?" is-bound":""}`,children:[(0,ie.jsxs)("button",{type:"button",className:"dsh-ssh-tree-project-main","aria-pressed":t.access===null?void 0:P,title:t.access===null?y("remote-workspace-tree.noDshSessionIsAvailableToMountADirectory"):z?P?y("remote-workspace-tree.unmountThisDirectoryFromTheCurrentSession"):y("remote-workspace-tree.mountDirectoryMultipleSelectionsAreAllowed"):y("remote-workspace-tree.mountThisHostFirst"),onClick:()=>{z&&!t.accessLoading&&!t.accessSaving&&(t.onToggleProject(E.id,F.id,F.path),t.onSelect(P?{profileId:E.id,path:"~"}:{profileId:E.id,path:F.path,projectId:F.id}))},children:[(0,ie.jsx)("span",{children:P?(0,ie.jsx)(It.IconFolderOpenOutline16,{size:15}):(0,ie.jsx)(It.IconFolderClose16,{size:15})}),(0,ie.jsxs)("span",{children:[(0,ie.jsx)("strong",{children:F.name}),(0,ie.jsx)("small",{children:F.path}),P&&(0,ie.jsx)("em",{children:I?y("remote-workspace-tree.mountedDefaultWorkingDirectory"):y("client.mounted")})]})]}),(0,ie.jsxs)("div",{className:"dsh-ssh-tree-project-actions",children:[P&&!I&&(0,ie.jsx)("button",{type:"button",className:"dsh-ssh-tree-project-edit",disabled:t.accessSaving,title:y("remote-workspace-tree.setAsDefaultWorkingDirectory"),"aria-label":y("remote-workspace-tree.setAsTheDefaultDirectory",[F.name]),onClick:()=>t.onDirectory(E.id,F.path,F.id),children:(0,ie.jsx)(It.IconFolderOpenOutline16,{size:13})}),(0,ie.jsx)("button",{type:"button",className:"dsh-ssh-tree-project-new","aria-label":y("remote-workspace-tree.newSessionIn",[F.name]),title:y("remote-workspace-tree.newSession"),onClick:R=>{b(void 0),m({profile:E,project:F,returnFocus:R.currentTarget})},children:(0,ie.jsx)(It.IconPlusOutline16,{size:13})}),(0,ie.jsx)("button",{type:"button",className:"dsh-ssh-tree-project-edit","aria-label":y("client.edit2",[F.name]),title:y("remote-workspace-tree.editPinnedDirectory"),onClick:()=>f({profile:E,project:F}),children:(0,ie.jsx)(It.IconEditOutline16,{size:13})})]})]})},F.id)})})]},E.id)})]},C.name)}),w.length===0&&(0,ie.jsx)("p",{className:"dsh-ssh-tree-no-results",children:t.profiles.length===0?y("remote-workspace-tree.noSshHostsYet"):y("remote-workspace-tree.noMatchingHosts")})]}),(0,ie.jsx)(aH,{access:t.access,loading:t.accessLoading,saving:t.accessSaving,error:t.accessError??g,onPermission:t.onPermission,onApproval:t.onApproval}),u!==void 0&&(0,ie.jsx)(lH,{profile:u.profile,project:u.project,onClose:()=>f(void 0),onSaved:async()=>{let C=u.profile.id;f(void 0),await x(C),await t.onProjectsChanged()}}),p!==void 0&&(0,ie.jsx)(WE,{...p,workspaces:t.workspaces,currentWorkspaceId:t.currentWorkspaceId,recentWorkspaceId:t.recentWorkspaceId,onClose:()=>m(void 0),onCreate:t.onCreateSession})]})}function aH({access:t,loading:e,saving:n,error:r,onPermission:s,onApproval:i}){return le(),(0,ie.jsxs)("footer",{className:"dsh-ssh-access-footer",children:[(0,ie.jsxs)("div",{className:"dsh-ssh-access-heading",children:[(0,ie.jsxs)("span",{children:[(0,ie.jsx)("strong",{children:y("remote-workspace-tree.currentSessionPermissions")}),(0,ie.jsxs)("small",{children:[t?.profileIds.length??0," ",y("remote-workspace-tree.availableHosts")]})]}),(0,ie.jsx)("em",{children:e?y("remote-workspace-tree.loading"):n?y("remote-workspace-tree.saving"):r?y("remote-workspace-tree.notSynced"):y("remote-workspace-tree.synced")})]}),(0,ie.jsxs)("div",{className:"dsh-ssh-access-segments","aria-label":y("remote-workspace-tree.sshPermissions"),children:[(0,ie.jsx)("button",{type:"button","data-ssh-interactive":"choice",className:t?.permission==="exec"?"is-active":"","aria-pressed":t?.permission==="exec",disabled:t===null,onClick:()=>s("exec"),children:y("remote-workspace-tree.commandsOnly")}),(0,ie.jsx)("button",{type:"button","data-ssh-interactive":"choice",className:t?.permission==="terminal"?"is-active":"","aria-pressed":t?.permission==="terminal",disabled:t===null,onClick:()=>s("terminal"),children:y("remote-workspace-tree.terminalControl")})]}),(0,ie.jsxs)("label",{className:"dsh-ssh-access-approval",children:[(0,ie.jsxs)("span",{children:[(0,ie.jsx)("strong",{children:y("remote-workspace-tree.confirmBeforeRunning")}),(0,ie.jsx)("small",{children:t?.requireCommandApproval===!1?y("remote-workspace-tree.whenOffRunsDirectlyUnderCurrentSessionPermissions"):y("remote-workspace-tree.requiresDshAskModeFullAccessIsRejectedOutright")})]}),(0,ie.jsx)("input",{type:"checkbox",checked:t?.requireCommandApproval??!0,disabled:t===null,onChange:o=>i(o.target.checked)}),(0,ie.jsx)("i",{"aria-hidden":"true"})]}),r&&(0,ie.jsx)("p",{className:"dsh-ssh-inline-error",role:"alert",children:r})]})}function lH({profile:t,project:e,onClose:n,onSaved:r}){le();let{confirm:s,confirmation:i}=aa(),[o,a]=(0,fn.useState)(e?.name??""),[l,c]=(0,fn.useState)(e?.path??""),[h,d]=(0,fn.useState)(!1),[u,f]=(0,fn.useState)(),p=async g=>{g.preventDefault(),d(!0),f(void 0);try{e===void 0?await Lv(t.id,{name:o,path:l}):await Ov(t.id,e.id,{name:o,path:l}),await r()}catch(b){f(KE(b)),d(!1)}},m=async()=>{e!==void 0&&s({title:y("client.delete2",[e.name]),description:y("remote-workspace-tree.deletePinnedDirectoryRelatedDshSessionsWillNotBe",[e.name]),onConfirm:async()=>{await zv(t.id,e.id),await r()}})};return(0,ie.jsxs)(qe,{className:"dsh-ssh-project-dialog",title:e===void 0?y("remote-workspace-tree.addPinnedDirectory"):y("remote-workspace-tree.editPinnedDirectory"),subtitle:y("remote-workspace-tree.defaultRemotePathForTheTerminalAndSftp",[t.name]),onClose:n,children:[i,(0,ie.jsxs)("form",{className:"dsh-ssh-form",onSubmit:g=>{p(g)},children:[(0,ie.jsxs)("label",{className:"dsh-ssh-field",children:[(0,ie.jsx)("span",{children:y("client.name")}),(0,ie.jsx)("input",{required:!0,maxLength:80,value:o,placeholder:y("remote-workspace-tree.websiteProject"),onChange:g=>a(g.target.value)})]}),(0,ie.jsx)(UE,{profileId:t.id,value:l,disabled:h,onChange:c}),u&&(0,ie.jsx)("p",{className:"dsh-ssh-inline-error",role:"alert",children:u}),(0,ie.jsxs)("div",{className:"dsh-ssh-dialog-actions",children:[e!==void 0&&(0,ie.jsxs)("button",{type:"button",className:"dsh-ssh-danger-button",disabled:h,onClick:()=>{m()},children:[(0,ie.jsx)(It.IconTrashOutline16,{size:15}),y("client.delete")]}),(0,ie.jsx)("span",{className:"dsh-ssh-dialog-spacer"}),(0,ie.jsx)("button",{type:"button",className:"dsh-ssh-secondary-button","data-ssh-dialog-close":!0,disabled:h,onClick:n,children:y("client.cancel")}),(0,ie.jsx)("button",{className:"dsh-ssh-primary-button",disabled:h,children:h?y("client.saving2"):y("remote-workspace-tree.saveDirectory")})]})]})]})}function cH(t){let e=new Map;for(let n of t){let r=n.group?.trim()||"",s=e.get(r);s===void 0?e.set(r,[n]):s.push(n)}return[...e].map(([n,r])=>({name:n,profiles:r}))}function hH(t){return`${t.name} ${t.group??""} ${t.host} ${t.username} ${t.tags.join(" ")}`.toLocaleLowerCase()}function KE(t){return t instanceof Error?t.message:String(t)}var sn=require("react");var ev=new Set;function ca(t){for(let e of ev)e(t)}function GE(t){return ev.add(t),()=>ev.delete(t)}function JE(t){let[e,n]=(0,sn.useState)(null),[r,s]=(0,sn.useState)(t!==void 0),[i,o]=(0,sn.useState)(!1),[a,l]=(0,sn.useState)(),c=(0,sn.useRef)(null),h=(0,sn.useRef)(null),d=(0,sn.useRef)(t),u=(0,sn.useRef)(Promise.resolve()),f=(0,sn.useRef)(0);d.current=t,(0,sn.useEffect)(()=>{let g=!1;return c.current=null,h.current=null,n(null),l(void 0),s(t!==void 0),t===void 0?()=>{g=!0}:(ba(t).then(b=>{if(g)return;let v=b??ha(t);c.current=v,h.current=v,n(v),ca(v)}).catch(b=>{g||l(tv(b))}).finally(()=>{g||s(!1)}),()=>{g=!0})},[t]);let p=(0,sn.useCallback)(async g=>{c.current=g,n(g),ca(g),l(void 0),f.current+=1,o(!0);let b=u.current.catch(()=>{}).then(()=>Ql(g));u.current=b;try{let v=await b;return d.current===v.sessionId&&(h.current=v),d.current===v.sessionId&&c.current===g&&(c.current=v,n(v),ca(v)),v}catch(v){throw d.current===g.sessionId&&(l(tv(v)),c.current===g&&h.current&&(c.current=h.current,n(h.current),ca(h.current))),v}finally{f.current=Math.max(0,f.current-1),d.current===g.sessionId&&f.current===0&&o(!1)}},[]),m=(0,sn.useCallback)(g=>{let b=d.current;if(b===void 0)return;let v=c.current??ha(b);p({...v,...g,sessionId:b}).catch(()=>{})},[p]);return{value:e,loading:r,saving:i,error:a,refresh:async()=>{let g=d.current;if(g)try{await u.current.catch(()=>{});let b=c.current,v=await ba(g)??ha(g);if(g!==d.current||b!==c.current)return;c.current=v,h.current=v,n(v),ca(v)}catch(b){g===d.current&&l(tv(b))}},setProfiles:g=>{let b=c.current;m({profileIds:g,mountedProjectIds:Object.fromEntries(g.map(v=>[v,b?la(b,v):[]]))})},toggleProject:(g,b,v)=>{let w=c.current;if(!w||!w.profileIds.includes(g))return;let x=la(w,g),_=x.includes(b),k=_?x.filter(T=>T!==b):[...x,b],S={...w.workingDirectories},C={...w.workingProjectIds};!_&&C[g]===void 0?(S[g]=v,C[g]=b):_&&C[g]===b&&(delete S[g],delete C[g]),m({workingDirectories:S,workingProjectIds:C,mountedProjectIds:Object.fromEntries(w.profileIds.map(T=>[T,T===g?k:la(w,T)]))})},setDirectory:(g,b,v)=>{let w=d.current;if(w===void 0)return;let x=c.current??ha(w),_={...x.workingDirectories},k={...x.workingProjectIds};b===void 0?delete _[g]:_[g]=b,v===void 0?delete k[g]:k[g]=v,m({workingDirectories:_,workingProjectIds:k})},setPermission:g=>m({permission:g}),setRequireCommandApproval:g=>m({requireCommandApproval:g}),setFileEndpoints:g=>m({fileEndpointIds:g}),setFilePermission:g=>m({filePermission:g}),setRequireFileApproval:g=>m({requireFileApproval:g}),setLocalFileAccess:(g,b)=>m(g==="upload"?{allowLocalUpload:b}:{allowLocalDownload:b}),replace:p}}function ha(t){return{sessionId:t,profileIds:[],permission:"exec",requireCommandApproval:!0,fileEndpointIds:[],filePermission:"browse",requireFileApproval:!0,workingDirectories:{},workingProjectIds:{},updatedAt:0}}function tv(t){return t instanceof Error?t.message:String(t)}var to=require("react"),ql=require("react/jsx-runtime"),cu=38,Wl=28,Ul=66,dH=320,uH=280,pH=7;function XE(t,e,n){return Math.min(n,Math.max(e,t))}function fH(t){if(typeof window>"u")return cu;try{let e=Number.parseFloat(window.localStorage.getItem(t)??"");return Number.isFinite(e)?XE(e,Wl,Ul):cu}catch{return cu}}function nv(t,e){try{window.localStorage.setItem(t,e.toFixed(2))}catch{}}function mH(t){if(t<=0)return{min:Wl,max:Ul};let e=uH/t*100,n=(t-dH-pH)/t*100,r=Math.max(Wl,e),s=Math.max(r,Math.min(Ul,n));return{min:r,max:s}}function YE({primary:t,secondary:e,storageKey:n,label:r,secondaryHidden:s=!1}){le();let[i,o]=(0,to.useState)(()=>fH(n)),a=(0,to.useRef)(null),l=(0,to.useRef)(null),c=(0,to.useRef)(i),h=(0,to.useRef)(),d=v=>{let w=a.current;if(w===null)return v;let x=mH(w.getBoundingClientRect().width),_=XE(v,x.min,x.max);return w.style.setProperty("--ssh-sftp-width",`${_}%`),l.current?.setAttribute("aria-valuenow",String(Math.round(_))),c.current=_,_},u=v=>{if(h.current===void 0)return;let w=l.current;h.current=void 0,v!==void 0&&w?.hasPointerCapture(v)&&w.releasePointerCapture(v),a.current?.classList.remove("is-resizing");let x=c.current;o(x),nv(n,x)},f=v=>{v.button===0&&(h.current=v.pointerId,c.current=i,v.currentTarget.setPointerCapture(v.pointerId),a.current?.classList.add("is-resizing"),v.preventDefault())},p=v=>{if(h.current!==v.pointerId)return;let w=a.current?.getBoundingClientRect();w===void 0||w.width===0||(d((w.right-v.clientX)/w.width*100),v.preventDefault())},m=v=>{let w=v.shiftKey?5:2,x;if(v.key==="ArrowLeft"&&(x=i+w),v.key==="ArrowRight"&&(x=i-w),v.key==="Home"&&(x=Wl),v.key==="End"&&(x=Ul),x===void 0)return;let _=d(x);o(_),nv(n,_),v.preventDefault()},g=()=>{let v=d(cu);o(v),nv(n,v)},b={"--ssh-sftp-width":`${i}%`};return(0,ql.jsxs)("div",{ref:a,className:`dsh-ssh-workbench-split${s?" is-secondary-hidden":""}`,style:b,children:[t,(0,ql.jsx)("div",{ref:l,hidden:s,className:"dsh-ssh-workbench-resizer",role:"separator","aria-label":r,"aria-orientation":"vertical","aria-valuemin":Wl,"aria-valuemax":Ul,"aria-valuenow":Math.round(i),tabIndex:0,title:y("resizable-split.dragToResizeDoubleClickToReset"),onDoubleClick:g,onKeyDown:m,onPointerDown:f,onPointerMove:p,onPointerUp:v=>u(v.pointerId),onPointerCancel:v=>u(v.pointerId),onLostPointerCapture:()=>u()}),(0,ql.jsx)("div",{className:"dsh-ssh-split-secondary",hidden:s,children:e})]})}var Lt=require("react"),In=require("@deepseek-ai/dsh-client-ui-primitives");function QE(t){let e=t.port??22;if(!Number.isSafeInteger(e)||e<1||e>65535)return;let n=t.host.trim().normalize("NFKC").toLocaleLowerCase();return n.startsWith("[")&&n.endsWith("]")&&(n=n.slice(1,-1)),n=n.replace(/\.+$/u,""),n.length===0?void 0:`${n}\0${e}`}function ZE(t,e,n){let r=QE(e);if(r!==void 0)return t.find(s=>s.id!==n&&QE(s)===r)}var X=require("react/jsx-runtime");function eA({profile:t,dependents:e,onClose:n,onDeleted:r}){le();let[s,i]=(0,Lt.useState)(!1),[o,a]=(0,Lt.useState)(),l=async()=>{if(!(s||e.length>0)){i(!0),a(void 0);try{await se(`/profiles/${encodeURIComponent(t.id)}`,{method:"DELETE"}),r()}catch(c){a(Me(c))}finally{i(!1)}}};return(0,X.jsx)(qe,{variant:"confirmation",dismissible:!s,title:y("client.delete2",[t.name]),subtitle:ms(t),onClose:()=>{s||n()},children:(0,X.jsxs)("div",{className:"dsh-ssh-delete-profile",children:[(0,X.jsx)("span",{className:"dsh-ssh-delete-profile-mark",children:(0,X.jsx)(In.IconTrashOutline16,{size:19})}),(0,X.jsxs)("div",{children:[(0,X.jsx)("strong",{children:y("profile-editor.thisActionCannotBeUndone")}),(0,X.jsx)("p",{children:y("profile-editor.theConnectionConfigThisHostSStandaloneCredentialsAnd")})]}),e.length>0&&(0,X.jsxs)("div",{className:"dsh-ssh-delete-profile-block",role:"alert",children:[(0,X.jsx)("strong",{children:y("profile-editor.cannotDeleteYet")}),(0,X.jsxs)("p",{children:[y("profile-editor.theseConnectionsStillUseItAsAnSshJump"),e.map(c=>c.name).join("\u3001"),y("profile-editor.editTheirJumpChainsFirst")]})]}),o&&(0,X.jsx)("p",{className:"dsh-ssh-inline-error",role:"alert",children:o}),(0,X.jsxs)("div",{className:"dsh-ssh-dialog-actions",children:[(0,X.jsx)("button",{type:"button",className:"dsh-ssh-secondary-button","data-ssh-dialog-close":!0,disabled:s,onClick:n,children:y("client.cancel")}),(0,X.jsx)("button",{type:"button",className:"dsh-ssh-danger-button",disabled:s||e.length>0,onClick:()=>{l()},children:s?y("file-entry-delete-dialog.deleting"):y("client.deleteHost2")})]})]})})}function tA({profile:t,profiles:e,vaultEntries:n,proxyEntries:r,onClose:s,onSaved:i}){let o=le(),[a,l]=(0,Lt.useState)(()=>({name:t?.name??"",group:t?.group??"",host:t?.host??"",port:String(t?.port??22),username:t?.username??"",authType:t?.authType??"password",credentialId:t?.credentialId??"",proxyType:t?.proxy.type??"none",proxyEntryId:t?.proxy.type==="saved"?t.proxy.proxyId:"",proxyHost:t?.proxy.type==="http"||t?.proxy.type==="socks5"?t.proxy.host:"",proxyPort:t?.proxy.type==="http"||t?.proxy.type==="socks5"?String(t.proxy.port):"1080",proxyUsername:t?.proxy.type==="http"||t?.proxy.type==="socks5"?t.proxy.username??"":"",jumpProfileIds:t?.proxy.type==="jump"?t.proxy.profileIds:[],tags:t?.tags.join(", ")??"",password:"",privateKey:"",passphrase:"",proxyPassword:"",hostFingerprint:t?.hostFingerprint??""})),[c,h]=(0,Lt.useState)(!1),[d,u]=(0,Lt.useState)(!1),[f,p]=(0,Lt.useState)(),[m,g]=(0,Lt.useState)(),[b,v]=(0,Lt.useState)(),[w,x]=(0,Lt.useState)(),[_,k]=(0,Lt.useState)(!1),S=(0,Lt.useId)(),C=(0,Lt.useRef)(null),T=I=>({value:a[I],onChange:R=>{l(A=>({...A,[I]:R.target.value})),(I==="host"||I==="port")&&x(void 0),p(void 0),g(void 0)}}),E=n.find(I=>I.id===a.credentialId),M=(0,Lt.useMemo)(()=>e.flatMap(I=>I.group===void 0?[]:[I.group]),[e,o]),z=(0,Lt.useMemo)(()=>e.flatMap(I=>I.tags),[e,o]),N=(0,Lt.useMemo)(()=>ZE(e,{host:a.host,port:Number(a.port)},t?.id),[a.host,a.port,t?.id,e,o]),$=_?N===void 0?w:y("profile-editor.thisAddressAndPortAreAlreadyUsedByChange",[N.name]):void 0,F=(I=a.hostFingerprint)=>{let R=a.proxyType==="none"?{type:"none"}:a.proxyType==="saved"?{type:"saved",proxyId:a.proxyEntryId}:a.proxyType==="jump"?{type:"jump",profileIds:a.jumpProfileIds}:{type:a.proxyType,host:a.proxyHost,port:Number(a.proxyPort),...a.proxyUsername.trim()?{username:a.proxyUsername.trim()}:{}};return{profile:{name:a.name,...a.group.trim()?{group:a.group.trim()}:{},host:a.host,port:Number(a.port),username:E?.username??a.username,authType:E?.authType??a.authType,...a.credentialId?{credentialId:a.credentialId}:{},...I?{hostFingerprint:I}:{},proxy:R,keepAliveIntervalMs:t?.keepAliveIntervalMs??15e3,connectTimeoutMs:t?.connectTimeoutMs??15e3,terminalType:t?.terminalType??"xterm-256color",tags:a.tags.split(",").map(A=>A.trim()).filter(Boolean)},secrets:{password:a.password,privateKey:a.privateKey,passphrase:a.passphrase,proxyPassword:a.proxyPassword}}},j=async I=>{if(k(!0),N!==void 0){C.current?.focus();return}u(!0),v(void 0),p(void 0),g(void 0);try{await se("/profiles/test-draft",{method:"POST",body:JSON.stringify({...F(I),...t===void 0?{}:{profileId:t.id}})}),I!==void 0&&l(R=>({...R,hostFingerprint:I})),p("success")}catch(R){R instanceof Fn&&R.body?.code==="HOST_KEY_REQUIRED"&&typeof R.body.fingerprint=="string"?g(R.body.fingerprint):R instanceof Fn&&R.body?.code==="DUPLICATE_PROFILE_ENDPOINT"?(x(Me(R)),C.current?.focus()):v(Me(R))}finally{u(!1)}},P=async I=>{if(I.preventDefault(),k(!0),N!==void 0){C.current?.focus();return}h(!0),v(void 0);try{await se(t===void 0?"/profiles":`/profiles/${t.id}`,{method:t===void 0?"POST":"PUT",body:JSON.stringify(F())}),i()}catch(R){R instanceof Fn&&R.body?.code==="DUPLICATE_PROFILE_ENDPOINT"?(x(Me(R)),C.current?.focus()):v(Me(R))}finally{h(!1)}};return(0,X.jsx)(qe,{title:t===void 0?y("profile-editor.newSshConnection"):y("client.edit2",[t.name]),subtitle:y("profile-editor.credentialsAreNotShownAgainAfterSaving"),onClose:s,children:(0,X.jsxs)("form",{className:"dsh-ssh-form",onSubmit:I=>{P(I)},children:[(0,X.jsxs)("div",{className:"dsh-ssh-form-section",children:[(0,X.jsxs)("div",{className:"dsh-ssh-form-section-heading",children:[(0,X.jsx)("strong",{children:y("profile-editor.connectionInfo")}),(0,X.jsx)("small",{children:y("profile-editor.hostAddressAndDisplay")})]}),(0,X.jsxs)("div",{className:"dsh-ssh-form-grid",children:[(0,X.jsx)(ge,{label:y("client.name"),children:(0,X.jsx)("input",{required:!0,maxLength:80,placeholder:y("profile-editor.devServer"),...T("name")})}),(0,X.jsx)(ge,{label:y("profile-editor.group"),children:(0,X.jsx)(Co,{ariaLabel:y("profile-editor.hostGroup"),maxLength:64,options:M,placeholder:y("ftp-profile-editor.selectAnExistingGroupOrEnterANewOne"),value:a.group,onChange:I=>l(R=>({...R,group:I}))})})]}),(0,X.jsxs)("div",{className:"dsh-ssh-form-grid is-host",children:[(0,X.jsxs)(ge,{label:y("client.host"),children:[(0,X.jsx)("input",{ref:C,required:!0,"aria-invalid":$===void 0?void 0:!0,"aria-describedby":$===void 0?void 0:S,placeholder:"server.example.com",spellCheck:!1,...T("host"),onBlur:()=>k(!0)}),$&&(0,X.jsx)("small",{id:S,className:"dsh-ssh-field-error",role:"alert",children:$})]}),(0,X.jsx)(ge,{label:y("ftp-profile-editor.port"),children:(0,X.jsx)("input",{required:!0,"aria-invalid":$===void 0?void 0:!0,"aria-describedby":$===void 0?void 0:S,type:"number",inputMode:"numeric",min:"1",max:"65535",...T("port"),onBlur:()=>k(!0)})})]}),(0,X.jsx)(ge,{label:y("profile-editor.tags"),hint:y("ftp-profile-editor.pickExistingTagsOrTypeNewOnesSeparateMultiple"),children:(0,X.jsx)(Co,{ariaLabel:y("profile-editor.hostTags"),multiple:!0,options:z,placeholder:y("ftp-profile-editor.selectOrEnterTags"),value:a.tags,onChange:I=>l(R=>({...R,tags:I}))})})]}),(0,X.jsxs)("div",{className:"dsh-ssh-form-section",children:[(0,X.jsxs)("div",{className:"dsh-ssh-form-section-heading",children:[(0,X.jsx)("strong",{children:y("ftp-profile-editor.authentication")}),(0,X.jsx)("small",{children:y("profile-editor.chooseSharedCredentialsOrSaveSeparately")})]}),(0,X.jsx)(ge,{label:y("ftp-profile-editor.credentialSource"),hint:y("profile-editor.useThisConnectionSOwnCredentialsOrReferenceA"),children:(0,X.jsxs)("select",{...T("credentialId"),children:[(0,X.jsx)("option",{value:"",children:y("profile-editor.savedWithThisConnectionOnly")}),n.map(I=>(0,X.jsxs)("option",{value:I.id,children:[I.name," \xB7 ",I.username]},I.id))]})}),E?(0,X.jsxs)("div",{className:"dsh-ssh-credential-reference",children:[(0,X.jsx)("span",{children:(0,X.jsx)(In.IconUserOutline16,{size:16})}),(0,X.jsxs)("span",{children:[(0,X.jsx)("strong",{children:E.name}),(0,X.jsxs)("small",{children:[E.username," \xB7 ",E.authType==="password"?y("client.password"):y("client.privateKey")]})]}),(0,X.jsx)("em",{children:E.credential.configured?y("profile-editor.ready"):y("client.missingCredentials")})]}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)("div",{className:"dsh-ssh-form-grid",children:[(0,X.jsx)(ge,{label:y("client.username"),children:(0,X.jsx)("input",{required:!0,autoComplete:"username",...T("username")})}),(0,X.jsx)(ge,{label:y("client.authMethod"),children:(0,X.jsxs)("select",{...T("authType"),children:[(0,X.jsx)("option",{value:"password",children:y("client.password")}),(0,X.jsx)("option",{value:"private-key",children:y("client.privateKey")}),(0,X.jsx)("option",{value:"agent",children:"SSH Agent"})]})})]}),a.authType==="password"&&(0,X.jsx)(ge,{label:y("client.password"),hint:t?.credential.source==="profile"&&t.credential.fields.includes("password")?y("client.savedLeaveBlankToKeepUnchanged"):y("profile-editor.cannotBeReadBackAfterSaving"),children:(0,X.jsx)("input",{required:t===void 0,type:"password",autoComplete:"new-password",placeholder:t?.credential.source==="profile"&&t.credential.fields.includes("password")?"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022":"",...T("password")})}),a.authType==="private-key"&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(ge,{label:y("client.privateKey"),hint:t?.credential.source==="profile"&&t.credential.fields.includes("privateKey")?y("client.savedLeaveBlankToKeepUnchanged"):y("profile-editor.pasteOpensshPemPrivateKey"),children:(0,X.jsx)("textarea",{required:t===void 0,rows:5,spellCheck:!1,...T("privateKey")})}),(0,X.jsx)(ge,{label:y("client.keyPassphrase"),children:(0,X.jsx)("input",{type:"password",autoComplete:"new-password",...T("passphrase")})})]})]})]}),(0,X.jsxs)("div",{className:"dsh-ssh-form-section",children:[(0,X.jsxs)("div",{className:"dsh-ssh-form-section-heading",children:[(0,X.jsx)("strong",{children:y("profile-editor.connectionPath")}),(0,X.jsx)("small",{children:y("profile-editor.directProxyOrJumpChain")})]}),(0,X.jsx)(ge,{label:y("profile-editor.connectionMode"),children:(0,X.jsxs)("select",{...T("proxyType"),children:[(0,X.jsx)("option",{value:"none",children:y("group-proxy.automatic")}),(0,X.jsx)("option",{value:"saved",children:y("client.commonProxies")}),(0,X.jsx)("option",{value:"http",children:y("profile-editor.customHttpConnect")}),(0,X.jsx)("option",{value:"socks5",children:y("profile-editor.customSocks5")}),(0,X.jsx)("option",{value:"jump",children:y("client.sshJumpHost")})]})}),a.proxyType==="saved"&&(0,X.jsx)(ge,{label:y("client.commonProxies"),hint:r.length===0?y("profile-editor.addAnHttpOrSocks5ProxyToTheProxy"):y("profile-editor.multipleHostsCanShareTheSameProxyConfiguration"),children:(0,X.jsxs)("select",{required:!0,...T("proxyEntryId"),children:[(0,X.jsx)("option",{value:"",children:y("profile-editor.selectProxy")}),r.map(I=>(0,X.jsxs)("option",{value:I.id,children:[I.name," \xB7 ",I.proxyType==="http"?"HTTP":"SOCKS5"," \xB7 ",I.host,":",I.port]},I.id))]})}),(a.proxyType==="http"||a.proxyType==="socks5")&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)("div",{className:"dsh-ssh-form-grid is-host",children:[(0,X.jsx)(ge,{label:y("client.proxyHost"),children:(0,X.jsx)("input",{required:!0,spellCheck:!1,...T("proxyHost")})}),(0,X.jsx)(ge,{label:y("client.proxyPort"),children:(0,X.jsx)("input",{required:!0,type:"number",inputMode:"numeric",min:"1",max:"65535",...T("proxyPort")})})]}),(0,X.jsxs)("div",{className:"dsh-ssh-form-grid",children:[(0,X.jsx)(ge,{label:y("client.proxyUsername"),children:(0,X.jsx)("input",{autoComplete:"username",...T("proxyUsername")})}),(0,X.jsx)(ge,{label:y("client.proxyPassword"),children:(0,X.jsx)("input",{type:"password",autoComplete:"new-password",...T("proxyPassword")})})]})]}),a.proxyType==="jump"&&(0,X.jsx)(gH,{profiles:e.filter(I=>I.id!==t?.id),value:a.jumpProfileIds,onChange:I=>l(R=>({...R,jumpProfileIds:I}))})]}),m&&(0,X.jsxs)("div",{className:"dsh-ssh-test-result is-warning",role:"alert",children:[(0,X.jsxs)("span",{children:[(0,X.jsx)("strong",{children:y("profile-editor.firstConnectionVerifyTheHostFingerprint")}),(0,X.jsx)("code",{children:m})]}),(0,X.jsx)("button",{type:"button",className:"dsh-ssh-small-primary",disabled:d,onClick:()=>{j(m)},children:y("profile-editor.confirmAndRetry")})]}),f==="success"&&(0,X.jsxs)("p",{className:"dsh-ssh-test-result is-success",role:"status",children:[(0,X.jsx)(In.IconCheckOutline14,{size:14}),y("profile-editor.connectionTestSucceeded")]}),b&&(0,X.jsx)("p",{className:"dsh-ssh-inline-error",role:"alert",children:b}),(0,X.jsxs)("div",{className:"dsh-ssh-dialog-actions",children:[(0,X.jsx)("button",{type:"button",className:"dsh-ssh-secondary-button dsh-ssh-test-button",disabled:c||d,onClick:I=>{I.currentTarget.form?.reportValidity()&&j()},children:d?y("ftp-profile-editor.testing"):y("client.testConnection")}),(0,X.jsx)("button",{type:"button",className:"dsh-ssh-secondary-button","data-ssh-dialog-close":!0,disabled:c||d,onClick:s,children:y("client.cancel")}),(0,X.jsx)("button",{className:"dsh-ssh-primary-button",disabled:c||d,children:c?y("client.saving"):y("ftp-profile-editor.saveConnection")})]})]})})}function gH({profiles:t,value:e,onChange:n}){le();let r=()=>{let o=t.find(a=>!e.includes(a.id));o!==void 0&&e.length<8&&n([...e,o.id])},s=(o,a)=>n(e.map((l,c)=>c===o?a:l)),i=(o,a)=>{let l=o+a;if(l<0||l>=e.length)return;let c=[...e];[c[o],c[l]]=[c[l],c[o]],n(c)};return(0,X.jsxs)("fieldset",{className:"dsh-ssh-jump-chain",children:[(0,X.jsx)("legend",{children:y("profile-editor.jumpChain")}),(0,X.jsx)("p",{children:y("profile-editor.connectionsAreEstablishedHopByHopTopToBottom")}),(0,X.jsx)("div",{children:e.map((o,a)=>(0,X.jsxs)("div",{className:"dsh-ssh-jump-row",children:[(0,X.jsx)("em",{children:a+1}),(0,X.jsxs)("select",{required:!0,value:o,onChange:l=>s(a,l.target.value),children:[(0,X.jsx)("option",{value:"",children:y("profile-editor.selectAnExistingConnection")}),t.filter(l=>l.id===o||!e.includes(l.id)).map(l=>(0,X.jsxs)("option",{value:l.id,children:[l.name," \xB7 ",l.host]},l.id))]}),(0,X.jsx)("button",{type:"button",className:"dsh-ssh-icon-button",disabled:a===0,"aria-label":y("profile-editor.moveJumpHostUp"),onClick:()=>i(a,-1),children:(0,X.jsx)(In.IconChevronUpOutline14,{size:14})}),(0,X.jsx)("button",{type:"button",className:"dsh-ssh-icon-button",disabled:a===e.length-1,"aria-label":y("profile-editor.moveJumpHostDown"),onClick:()=>i(a,1),children:(0,X.jsx)(In.IconChevronDownOutline14,{size:14})}),(0,X.jsx)("button",{type:"button",className:"dsh-ssh-icon-button is-danger","aria-label":y("profile-editor.removeJumpHost"),onClick:()=>n(e.filter((l,c)=>c!==a)),children:(0,X.jsx)(In.IconTrashOutline16,{size:15})})]},`${o}-${a}`))}),e.length===0&&(0,X.jsx)("p",{className:"dsh-ssh-jump-empty",children:y("profile-editor.addAtLeastOneJumpHost")}),(0,X.jsxs)("button",{type:"button",className:"dsh-ssh-secondary-button",disabled:e.length>=8||t.every(o=>e.includes(o.id)),onClick:r,children:[(0,X.jsx)(In.IconPlusOutline16,{size:15}),y("profile-editor.addJumpHost")]})]})}var De=require("react"),Zn=require("@deepseek-ai/dsh-client-ui-primitives");var Ln=require("react"),us=require("@deepseek-ai/dsh-client-ui-primitives");var J=require("react/jsx-runtime");function nA({profiles:t,vaultEntries:e,proxyEntries:n,onClose:r,onChanged:s}){le();let[i,o]=(0,Ln.useState)(),[a,l]=(0,Ln.useState)(),[c,h]=(0,Ln.useState)(),d=i!==void 0||a!==void 0,u=g=>{l(void 0),o(g),h(void 0)},f=()=>{l(void 0),o("new"),h(void 0)},p=g=>{o(void 0),l(g),h(void 0)},m=async g=>{h(void 0);try{await se(`/ftp-profiles/${encodeURIComponent(g.id)}`,{method:"DELETE"}),l(void 0),s()}catch(b){h(Me(b))}};return a!==void 0?(0,J.jsx)(bH,{profile:a,error:c,onBack:()=>l(void 0),onDelete:()=>m(a)},a.id):(0,J.jsx)(qe,{className:"dsh-ssh-ftp-manager-dialog",title:y("file-transfer-workspace.fileConnections"),subtitle:y("ftp-profile-editor.manageFtpAndFtpsSftpReusesExistingSshHosts"),onClose:r,children:(0,J.jsxs)("div",{className:`dsh-ssh-ftp-manager${d?" has-detail":""}`,children:[(0,J.jsxs)("aside",{className:"dsh-ssh-ftp-manager-list",children:[(0,J.jsxs)("header",{children:[(0,J.jsxs)("span",{children:[(0,J.jsx)("strong",{children:"FTP / FTPS"}),(0,J.jsxs)("small",{children:[t.length," ",y("client.connections")]})]}),(0,J.jsxs)("button",{type:"button",className:"dsh-ssh-primary-button",onClick:f,children:[(0,J.jsx)(us.IconPlusOutline16,{size:15}),y("ftp-profile-editor.new")]})]}),t.length===0?(0,J.jsxs)("div",{className:"dsh-ssh-ftp-list-empty",children:[(0,J.jsx)("span",{children:(0,J.jsx)(us.IconDataOutline16,{size:20})}),(0,J.jsx)("strong",{children:y("ftp-profile-editor.noStandaloneFileConnectionsYet")}),(0,J.jsx)("p",{children:y("ftp-profile-editor.sftpAppearsInTheFilePaneSConnectionList")}),(0,J.jsx)("button",{type:"button",className:"dsh-ssh-secondary-button",onClick:f,children:y("ftp-profile-editor.newFtpsConnection")})]}):(0,J.jsx)("div",{className:"dsh-ssh-ftp-profile-list",role:"list",children:t.map(g=>{let b=i!=="new"&&i?.id===g.id;return(0,J.jsxs)("article",{role:"listitem","data-ssh-interactive":"choice","aria-selected":b,className:b?"is-active":"",children:[(0,J.jsxs)("button",{type:"button",className:"dsh-ssh-ftp-profile-main",onClick:()=>u(g),children:[(0,J.jsx)("span",{className:`dsh-ssh-protocol-badge is-${g.protocol}`,children:yH(g.protocol)}),(0,J.jsxs)("span",{children:[(0,J.jsx)("strong",{title:g.name,children:g.name}),(0,J.jsxs)("small",{title:`${g.username}@${g.host}:${g.port}`,children:[g.username,"@",g.host,":",g.port]})]}),(0,J.jsx)("i",{className:g.authMode==="anonymous"||g.credential.configured?"is-ready":"is-missing",children:g.authMode==="anonymous"?y("ftp-profile-editor.anonymous"):g.credential.configured?y("client.available"):y("ftp-profile-editor.missingPassword")})]}),(0,J.jsx)("button",{type:"button",className:"dsh-ssh-icon-button is-danger","aria-label":y("client.delete2",[g.name]),onClick:()=>p(g),children:(0,J.jsx)(us.IconTrashOutline16,{size:15})})]},g.id)})})]}),(0,J.jsx)("main",{className:"dsh-ssh-ftp-manager-detail",children:i!==void 0?(0,J.jsx)(vH,{value:i==="new"?void 0:i,profiles:t,vaultEntries:e,proxyEntries:n,onBack:()=>o(void 0),onSaved:()=>{o(void 0),s()}},i==="new"?"new":i.id):(0,J.jsxs)("div",{className:"dsh-ssh-ftp-manager-overview",children:[(0,J.jsx)("span",{children:(0,J.jsx)(us.IconDataOutline16,{size:22})}),(0,J.jsx)("h3",{children:y("ftp-profile-editor.selectAConnectionToEdit")}),(0,J.jsx)("p",{children:y("ftp-profile-editor.theFilePaneCombinesFtpFtpsAndSftpFrom")}),(0,J.jsxs)("dl",{children:[(0,J.jsxs)("div",{children:[(0,J.jsx)("dt",{children:"FTPS"}),(0,J.jsx)("dd",{children:y("ftp-profile-editor.encryptsControlAndFileDataCertificatesStrictlyValidatedBy")})]}),(0,J.jsxs)("div",{children:[(0,J.jsx)("dt",{children:"FTP"}),(0,J.jsx)("dd",{children:y("ftp-profile-editor.compatibleWithLegacyServersButCredentialsAndFileContent")})]}),(0,J.jsxs)("div",{children:[(0,J.jsx)("dt",{children:"SFTP"}),(0,J.jsx)("dd",{children:y("ftp-profile-editor.managedBySshHostsNoNeedToConfigureIt")})]})]})]})})]})})}function bH({profile:t,error:e,onBack:n,onDelete:r}){le();let[s,i]=(0,Ln.useState)(!1);return(0,J.jsxs)(qe,{variant:"confirmation",dismissible:!s,title:y("client.delete2",[t.name]),subtitle:y("ftp-profile-editor.thisRemovesTheFtpFtpsConnectionAndItsSeparately"),onClose:()=>{s||n()},children:[(0,J.jsxs)("p",{className:"dsh-ssh-confirmation-target",children:[t.username,"@",t.host,":",t.port]}),e&&(0,J.jsx)("p",{className:"dsh-ssh-inline-error",role:"alert",children:e}),(0,J.jsxs)("div",{className:"dsh-ssh-dialog-actions",children:[(0,J.jsx)("button",{type:"button",className:"dsh-ssh-secondary-button",onClick:n,disabled:s,children:y("client.cancel")}),(0,J.jsx)("button",{type:"button",className:"dsh-ssh-danger-button",disabled:s,onClick:()=>{i(!0),r().finally(()=>i(!1))},children:s?y("file-entry-delete-dialog.deleting"):y("ftp-profile-editor.deleteConnection")})]})]})}function vH({value:t,profiles:e,vaultEntries:n,proxyEntries:r,onBack:s,onSaved:i}){let o=le(),a=n.filter(C=>C.authType==="password"),[l,c]=(0,Ln.useState)({authMode:t?.authMode??"password",name:t?.name??"",group:t?.group??"",protocol:t?.protocol??"ftps-explicit",host:t?.host??"",port:String(t?.port??21),username:t?.username??"",credentialId:t?.credentialId??"",password:"",proxyId:t?.proxy.type==="saved"?t.proxy.proxyId:"",initialPath:t?.initialPath??"/",connectTimeoutMs:String(t?.connectTimeoutMs??15e3),tlsServerName:t?.tlsServerName??"",tags:t?.tags.join(", ")??""}),[h,d]=(0,Ln.useState)(!1),[u,f]=(0,Ln.useState)(!1),[p,m]=(0,Ln.useState)(),[g,b]=(0,Ln.useState)(),v=()=>({profile:{authMode:l.authMode,name:l.name,...l.group.trim()?{group:l.group.trim()}:{},protocol:l.protocol,host:l.host,port:Number(l.port),username:l.authMode==="anonymous"?"anonymous":l.username,...l.authMode!=="anonymous"&&l.credentialId?{credentialId:l.credentialId}:{},proxy:l.proxyId?{type:"saved",proxyId:l.proxyId}:{type:"none"},initialPath:l.initialPath,connectTimeoutMs:Number(l.connectTimeoutMs),...l.tlsServerName.trim()?{tlsServerName:l.tlsServerName.trim()}:{},tags:l.tags.split(/[,,]/u).map(C=>C.trim()).filter(Boolean)},secrets:l.authMode==="anonymous"?{}:{password:l.password}}),w=async C=>{C.preventDefault(),d(!0),b(void 0),m(void 0);try{await se(t===void 0?"/ftp-profiles":`/ftp-profiles/${encodeURIComponent(t.id)}`,{method:t===void 0?"POST":"PUT",body:JSON.stringify(v())}),i()}catch(T){b(Me(T))}finally{d(!1)}},x=async()=>{f(!0),b(void 0),m(void 0);try{await se("/ftp-profiles/test-draft",{method:"POST",body:JSON.stringify({...v(),...t===void 0?{}:{profileId:t.id}})}),m(y("ftp-profile-editor.connectedInitialDirectoryIsReadable"))}catch(C){b(Me(C))}finally{f(!1)}},_=C=>c(T=>({...T,protocol:C,port:T.port==="21"||T.port==="990"?String(C==="ftps-implicit"?990:21):T.port})),k=(0,Ln.useMemo)(()=>e.flatMap(C=>C.group===void 0?[]:[C.group]),[e,o]),S=(0,Ln.useMemo)(()=>e.flatMap(C=>C.tags),[e,o]);return(0,J.jsxs)("form",{className:"dsh-ssh-ftp-editor-form",onSubmit:C=>{w(C)},children:[(0,J.jsxs)("header",{className:"dsh-ssh-ftp-editor-heading",children:[(0,J.jsxs)("button",{type:"button",className:"dsh-ssh-ftp-detail-back",onClick:s,children:[(0,J.jsx)(us.IconChevronLeftOutline14,{size:14}),y("file-transfer-workspace.backToConnectionList")]}),(0,J.jsxs)("span",{children:[(0,J.jsx)("strong",{children:t===void 0?y("ftp-profile-editor.newFileConnection"):t.name}),(0,J.jsx)("small",{children:t===void 0?y("ftp-profile-editor.enterServerAndAuthenticationDetails"):y("ftp-profile-editor.afterEditsTestBeforeSaving")})]})]}),(0,J.jsxs)("div",{className:"dsh-ssh-ftp-editor-scroll",children:[(0,J.jsxs)("section",{className:"dsh-ssh-ftp-editor-section",children:[(0,J.jsxs)("div",{className:"dsh-ssh-form-section-heading",children:[(0,J.jsx)("strong",{children:y("ftp-profile-editor.connectionType")}),(0,J.jsx)("small",{children:y("ftp-profile-editor.preferFtpsChooseFtpOnlyWhenTheServerLacks")})]}),(0,J.jsx)("div",{className:"dsh-ssh-ftp-protocol-options",role:"radiogroup","aria-label":y("ftp-profile-editor.connectionProtocol"),children:[["ftps-explicit","FTPS",y("ftp-profile-editor.explicitTlsRecommended")],["ftps-implicit","FTPS-I",y("ftp-profile-editor.implicitTls")],["ftp","FTP",y("ftp-profile-editor.unencrypted")]].map(C=>(0,J.jsxs)("button",{type:"button","data-ssh-interactive":"choice",role:"radio","aria-checked":l.protocol===C[0],className:l.protocol===C[0]?"is-active":"",onClick:()=>_(C[0]),children:[(0,J.jsx)("span",{className:`dsh-ssh-protocol-badge is-${C[0]}`,children:C[1]}),(0,J.jsxs)("span",{children:[(0,J.jsx)("strong",{children:C[1]}),(0,J.jsx)("small",{children:C[2]})]})]},C[0]))}),l.protocol==="ftp"&&(0,J.jsx)("p",{className:"dsh-ssh-form-warning",children:y("ftp-profile-editor.plainFtpSendsYourAccountPasswordAndFileContent")})]}),(0,J.jsxs)("section",{className:"dsh-ssh-ftp-editor-section",children:[(0,J.jsxs)("div",{className:"dsh-ssh-form-section-heading",children:[(0,J.jsx)("strong",{children:y("ftp-profile-editor.server")}),(0,J.jsx)("small",{children:y("ftp-profile-editor.theNameAppearsInTheConnectionListGroupsAnd")})]}),(0,J.jsxs)("div",{className:"dsh-ssh-form-grid",children:[(0,J.jsx)(ge,{label:y("ftp-profile-editor.connectionName"),children:(0,J.jsx)("input",{autoFocus:t===void 0,required:!0,maxLength:80,value:l.name,onChange:C=>c({...l,name:C.target.value})})}),(0,J.jsx)(ge,{label:y("ftp-profile-editor.groupOptional"),children:(0,J.jsx)(Co,{ariaLabel:y("ftp-profile-editor.ftpGroups"),maxLength:64,options:k,placeholder:y("ftp-profile-editor.selectAnExistingGroupOrEnterANewOne"),value:l.group,onChange:C=>c(T=>({...T,group:C}))})})]}),(0,J.jsxs)("div",{className:"dsh-ssh-form-grid is-host",children:[(0,J.jsx)(ge,{label:y("ftp-profile-editor.serverAddress"),children:(0,J.jsx)("input",{required:!0,maxLength:253,spellCheck:!1,value:l.host,onChange:C=>c({...l,host:C.target.value})})}),(0,J.jsx)(ge,{label:y("ftp-profile-editor.port"),children:(0,J.jsx)("input",{required:!0,type:"number",min:"1",max:"65535",value:l.port,onChange:C=>c({...l,port:C.target.value})})})]}),(0,J.jsx)(ge,{label:y("ftp-profile-editor.tagsOptional"),hint:y("ftp-profile-editor.pickExistingTagsOrTypeNewOnesSeparateMultiple"),children:(0,J.jsx)(Co,{ariaLabel:y("ftp-profile-editor.ftpTags"),multiple:!0,options:S,placeholder:y("ftp-profile-editor.selectOrEnterTags"),value:l.tags,onChange:C=>c(T=>({...T,tags:C}))})})]}),(0,J.jsxs)("section",{className:"dsh-ssh-ftp-editor-section",children:[(0,J.jsxs)("div",{className:"dsh-ssh-form-section-heading",children:[(0,J.jsx)("strong",{children:y("ftp-profile-editor.authentication")}),(0,J.jsx)("small",{children:y("ftp-profile-editor.thePasswordIsWrittenOnlyToTheDshCredential")})]}),(0,J.jsx)(ge,{label:y("ftp-profile-editor.signInMethod"),children:(0,J.jsxs)("select",{value:l.authMode,onChange:C=>{c({...l,authMode:C.target.value}),m(void 0)},children:[(0,J.jsx)("option",{value:"password",children:y("ftp-profile-editor.usernameAndPassword")}),(0,J.jsx)("option",{value:"anonymous",children:y("ftp-profile-editor.anonymous")})]})}),l.authMode==="anonymous"?(0,J.jsx)("p",{children:y("ftp-profile-editor.signInAsAnonymousWithoutEnteringCredentialsTheServer")}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)("div",{className:"dsh-ssh-form-grid",children:[(0,J.jsx)(ge,{label:y("client.username"),children:(0,J.jsx)("input",{required:!0,maxLength:128,autoComplete:"username",value:l.username,onChange:C=>c({...l,username:C.target.value})})}),(0,J.jsx)(ge,{label:y("ftp-profile-editor.credentialSource"),children:(0,J.jsxs)("select",{value:l.credentialId,onChange:C=>c({...l,credentialId:C.target.value}),children:[(0,J.jsx)("option",{value:"",children:y("ftp-profile-editor.saveThePasswordWithThisConnectionOnly")}),a.map(C=>(0,J.jsxs)("option",{value:C.id,children:[C.name," \xB7 ",C.username]},C.id))]})})]}),!l.credentialId&&(0,J.jsx)(ge,{label:y("client.password"),hint:t?.credential.configured&&t.credential.source==="profile"?y("client.savedLeaveBlankToKeepUnchanged"):y("ftp-profile-editor.notEchoedAfterSaving"),children:(0,J.jsx)("input",{required:t===void 0||t.credential.source!=="profile"||!t.credential.configured,type:"password",autoComplete:"new-password",value:l.password,onChange:C=>c({...l,password:C.target.value})})})]})]}),(0,J.jsxs)("section",{className:"dsh-ssh-ftp-editor-section",children:[(0,J.jsxs)("div",{className:"dsh-ssh-form-section-heading",children:[(0,J.jsx)("strong",{children:y("ftp-profile-editor.pathAndNetwork")}),(0,J.jsx)("small",{children:y("ftp-profile-editor.proxyReusesTheSshPluginSProxyLibraryControl")})]}),(0,J.jsxs)("div",{className:"dsh-ssh-form-grid",children:[(0,J.jsx)(ge,{label:y("ftp-profile-editor.initialDirectory"),children:(0,J.jsx)("input",{required:!0,maxLength:4096,spellCheck:!1,value:l.initialPath,onChange:C=>c({...l,initialPath:C.target.value})})}),(0,J.jsx)(ge,{label:y("ftp-profile-editor.connectionProxy"),children:(0,J.jsxs)("select",{value:l.proxyId,onChange:C=>c({...l,proxyId:C.target.value}),children:[(0,J.jsx)("option",{value:"",children:y("client.direct")}),r.map(C=>(0,J.jsxs)("option",{value:C.id,children:[C.name," \xB7 ",C.proxyType.toUpperCase()]},C.id))]})})]}),(0,J.jsxs)("details",{className:"dsh-ssh-form-advanced",children:[(0,J.jsx)("summary",{children:y("ftp-profile-editor.advancedConnectionSettings")}),(0,J.jsxs)("div",{className:"dsh-ssh-form-grid",children:[(0,J.jsx)(ge,{label:y("ftp-profile-editor.connectionTimeoutMs"),children:(0,J.jsx)("input",{required:!0,type:"number",min:"1000",max:"120000",step:"1000",value:l.connectTimeoutMs,onChange:C=>c({...l,connectTimeoutMs:C.target.value})})}),(0,J.jsx)(ge,{label:y("ftp-profile-editor.tlsServerName"),hint:y("ftp-profile-editor.fillInWhenTheCertificateNameDiffersFromThe"),children:(0,J.jsx)("input",{maxLength:253,spellCheck:!1,value:l.tlsServerName,onChange:C=>c({...l,tlsServerName:C.target.value})})})]})]})]}),p&&(0,J.jsx)("p",{className:"dsh-ssh-inline-success",role:"status",children:p}),g&&(0,J.jsx)("p",{className:"dsh-ssh-inline-error",role:"alert",children:g})]}),(0,J.jsxs)("footer",{className:"dsh-ssh-ftp-editor-actions",children:[(0,J.jsx)("button",{type:"button",className:"dsh-ssh-secondary-button",onClick:()=>{x()},disabled:u||h,children:u?y("ftp-profile-editor.testing"):y("client.testConnection")}),(0,J.jsx)("span",{}),(0,J.jsx)("button",{type:"button",className:"dsh-ssh-secondary-button",onClick:s,disabled:h||u,children:y("client.cancel")}),(0,J.jsx)("button",{type:"submit",className:"dsh-ssh-primary-button",disabled:h||u,children:h?y("client.saving"):y("ftp-profile-editor.saveConnection")})]})]})}function yH(t){return t==="ftp"?"FTP":t==="ftps-explicit"?"FTPS":"FTPS-I"}var wH=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}),rv=wH.compare;var xH=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"];function rA(t,e){let n=/^([a-z]{3})\s+(\d{1,2})\s+(?:(\d{4})|(\d{1,2}):(\d{2})(?::(\d{2}))?)$/i.exec(t?.trim()??"");if(!n)return 0;let r=xH.indexOf(n[1].toLowerCase()),s=Number(n[2]),i=Number(n[4]??0),o=Number(n[5]??0),a=Number(n[6]??0),l=Number(n[3]??new Date(e).getUTCFullYear());if(r<0||s<1||s>31||i>23||o>59||a>59)return 0;let c=Date.UTC(l,r,s,i,o,a);!n[3]&&c>e+2160*60*1e3&&(c=Date.UTC(--l,r,s,i,o,a));let h=new Date(c);return h.getUTCMonth()===r&&h.getUTCDate()===s?c:0}function sA(t,e,n){let r=n==="asc"?1:-1,s=Date.now();return t.map((i,o)=>({entry:i,index:o,value:e==="modifiedAt"?i.modifiedAt||rA(i.modifiedAtText,s):i.size})).sort((i,o)=>{let a=i.entry.kind==="directory"||i.entry.navigable===!0,l=o.entry.kind==="directory"||o.entry.navigable===!0;if(a!==l)return a?-1:1;let c=e==="name"?rv(i.entry.name,o.entry.name):i.value-o.value;if(c!==0)return c*r;let h=e==="name"?0:rv(i.entry.name,o.entry.name);return h!==0?h*r:i.index-o.index}).map(i=>i.entry)}var B=require("react/jsx-runtime"),lA="dsh-ssh:file-transfer:tabs:v3",sv=38,kH=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"});function cA({ftpProfiles:t,vaultEntries:e,proxyEntries:n,access:r,onProfilesChanged:s}){le();let i=Yi(),[o,a]=(0,De.useState)([]),[l,c]=(0,De.useState)([]),[h,d]=(0,De.useState)(()=>IH()),[u,f]=(0,De.useState)(()=>h[0]?.id??"transfer-1"),[p,m]=(0,De.useState)(!1),[g,b]=(0,De.useState)(!1),[v,w]=(0,De.useState)(),[x,_]=(0,De.useState)(),[k,S]=(0,De.useState)(),[C,T]=(0,De.useState)({}),E=(0,De.useRef)(new Map),M=(0,De.useCallback)(async()=>{try{let R=await Ev();a(R),d(A=>LH(A,R))}catch(R){S(Me(R))}},[]);(0,De.useEffect)(()=>{M()},[M,t]),(0,De.useEffect)(()=>{try{localStorage.setItem(lA,JSON.stringify(h))}catch{}},[h]),(0,De.useEffect)(()=>{let R=E.current,A=l.filter(V=>oA(V.state)&&R.has(V.id)&&!oA(R.get(V.id)));E.current=new Map(l.map(V=>[V.id,V.state])),A.length!==0&&T(V=>{let q={...V};for(let O of A){let Z=hu(O.request.destinationEndpointId,O.request.destinationDirectory);q[Z]=(q[Z]??0)+1}return q})},[l]),(0,De.useEffect)(()=>{let R=!1,A,V=async()=>{if(document.visibilityState==="hidden"){A=window.setTimeout(()=>{V()},1800);return}try{let q=await Dv();R||c(q)}catch{}R||(A=window.setTimeout(()=>{V()},800))};return V(),()=>{R=!0,A!==void 0&&clearTimeout(A)}},[]);let z=h.find(R=>R.id===u)??h[0],N=R=>d(A=>A.map(V=>V.id===z?.id?R(V):V)),$=()=>{let R=`transfer-${Date.now().toString(36)}`,A=ov(R,h.length+1);d(V=>[...V,A]),f(R)},F=R=>{if(h.length===1)return;let A=h.findIndex(q=>q.id===R),V=h.filter(q=>q.id!==R);d(V),u===R&&f(V[Math.max(0,A-1)].id)},j=R=>N(A=>({...A,panes:Array.from({length:R},(V,q)=>A.panes[q]??lv(`${A.id}-pane-${q}`))})),P=async(R,A,V,q,O)=>{let Z={endpointId:R,directory:A},H={endpointId:q,directory:O};if(!(La(Z,H)||!Oa(Z,V,H)))try{S(void 0);let L=await ga({sourceEndpointId:R,sourcePaths:V,destinationEndpointId:q,destinationDirectory:O,conflictPolicy:"fail"});c(Y=>[L,...Y.filter(G=>G.id!==L.id)])}catch(L){S(Me(L))}},I=async(R,A,V)=>{try{S(void 0);let q=await Nc(R,{paneId:A.id,endpointId:A.endpointId,directory:V});q.job!==void 0&&c(O=>[q.job,...O.filter(Z=>Z.id!==q.job.id)]),q.operation==="move"&&T(O=>{let Z={...O};for(let H of[hu(R.endpointId,R.directory),hu(A.endpointId,V)])Z[H]=(Z[H]??0)+1;return Z})}catch(q){S(Me(q))}};return(0,B.jsxs)("div",{className:"dsh-ssh-transfer-workspace",children:[(0,B.jsxs)("header",{className:"dsh-ssh-transfer-header",children:[(0,B.jsxs)("div",{children:[(0,B.jsx)("h1",{children:y("client.fileTransfer")}),(0,B.jsx)("p",{children:y("file-transfer-workspace.directStreamingTransfersBetweenFtpFtpsAndSftp")})]}),(0,B.jsxs)("div",{className:"dsh-ssh-transfer-actions",children:[(0,B.jsxs)("button",{type:"button","data-ssh-interactive":"control",className:"dsh-ssh-secondary-button",onClick:()=>b(!0),children:[y("file-transfer-workspace.sessionAccess")," ",r.value?.fileEndpointIds.length??0]}),(0,B.jsx)("button",{type:"button","data-ssh-interactive":"control",className:"dsh-ssh-secondary-button",onClick:()=>m(!0),children:y("file-transfer-workspace.ftpManager")})]})]}),k&&(0,B.jsxs)("div",{className:"dsh-ssh-banner is-error",role:"alert",children:[(0,B.jsx)("span",{children:k}),(0,B.jsx)("button",{type:"button",onClick:()=>S(void 0),"aria-label":y("client.close"),children:(0,B.jsx)(Zn.IconCloseOutline16,{size:16})})]}),(0,B.jsxs)("section",{ref:i.ref,onPointerMove:i.onPointerMove,onPointerLeave:i.onPointerLeave,className:"dsh-ssh-transfer-stage dsh-ssh-border-surface",children:[(0,B.jsxs)("div",{className:"dsh-ssh-transfer-tabbar",role:"tablist","aria-label":y("file-transfer-workspace.fileTransferTasksPage"),children:[(0,B.jsxs)("div",{className:"dsh-ssh-transfer-tabs",children:[h.map(R=>(0,B.jsxs)("span",{"data-ssh-interactive":"choice",className:`dsh-ssh-transfer-tab${R.id===z?.id?" is-active":""}`,children:[(0,B.jsx)("button",{type:"button",role:"tab","aria-selected":R.id===z?.id,onClick:()=>f(R.id),children:iA(R)}),h.length>1&&(0,B.jsx)("button",{type:"button",className:"is-close","aria-label":y("file-transfer-workspace.close",[iA(R)]),onClick:()=>F(R.id),children:(0,B.jsx)(Zn.IconCloseOutline16,{size:13})})]},R.id)),(0,B.jsx)("button",{type:"button","data-ssh-interactive":"control",className:"is-add","aria-label":y("file-transfer-workspace.newTransferTasksPage"),onClick:$,children:(0,B.jsx)(Zn.IconPlusOutline16,{size:15})})]}),(0,B.jsx)("div",{className:"dsh-ssh-pane-layout","aria-label":y("file-transfer-workspace.panes"),children:[1,2,3,4].map(R=>(0,B.jsxs)("button",{type:"button","data-ssh-interactive":"choice","aria-pressed":z?.panes.length===R,className:z?.panes.length===R?"is-active":"",onClick:()=>j(R),children:[R," ",y("file-transfer-workspace.panes2")]},R))})]}),o.length===0?(0,B.jsxs)("div",{className:"dsh-ssh-transfer-empty",children:[(0,B.jsx)(Zn.IconDataOutline16,{size:24}),(0,B.jsx)("strong",{children:y("file-transfer-workspace.noFileConnectionsAvailableYet")}),(0,B.jsx)("p",{children:y("file-transfer-workspace.createAnFtpFtpsConnectionOrAddAnSsh")}),(0,B.jsx)("button",{type:"button",className:"dsh-ssh-primary-button",onClick:()=>m(!0),children:y("file-transfer-workspace.newFtpConnection")})]}):z&&(0,B.jsx)("div",{className:`dsh-ssh-transfer-panes has-${z.panes.length}`,children:z.panes.map((R,A)=>{let V=z.panes.length>1?z.panes[(A+1)%z.panes.length]:void 0;return(0,B.jsx)(_H,{pane:R,endpoints:o,dragSource:x,refreshRevision:C[hu(R.endpointId,R.path)]??0,...V===void 0?{}:{destination:V},onManageConnections:()=>m(!0),onDragSourceChange:_,onChange:q=>N(O=>({...O,panes:O.panes.map(Z=>Z.id===R.id?{...Z,...q}:Z)})),onTransfer:(q,O)=>{P(R.endpointId,R.path,q,O.endpointId,O.path)},onExternalDrop:(q,O)=>{I(q,R,O)}},R.id)})}),(0,B.jsx)("div",{className:"dsh-ssh-transfer-queues",children:(0,B.jsx)(TH,{jobs:l,endpoints:o,onCancel:async R=>{try{await Mv(R),c(A=>A.map(V=>V.id===R?{...V,state:"cancelled"}:V))}catch(A){S(Me(A))}},onConflict:w})})]}),p&&(0,B.jsx)(nA,{profiles:t,vaultEntries:e,proxyEntries:n,onClose:()=>m(!1),onChanged:()=>{s(),M()}}),g&&(0,B.jsx)(AH,{endpoints:o,access:r,onClose:()=>b(!1)}),v&&(0,B.jsx)(EH,{job:v,onClose:()=>w(void 0),onRetry:async R=>{try{let A=await ga({...v.request,conflictPolicy:R});c(V=>[A,...V]),w(void 0)}catch(A){S(Me(A))}}})]})}function _H({pane:t,endpoints:e,destination:n,dragSource:r,refreshRevision:s,onChange:i,onTransfer:o,onExternalDrop:a,onDragSourceChange:l,onManageConnections:c}){let h=le(),[d,u]=(0,De.useState)(),f=(0,De.useRef)(null),[p,m]=(0,De.useState)(!1),g=(0,De.useRef)({endpointId:t.endpointId,path:t.path});g.current={endpointId:t.endpointId,path:t.path};let[b,v]=(0,De.useState)(),[w,x]=(0,De.useState)([]),[_,k]=(0,De.useState)(t.path),[S,C]=(0,De.useState)(!1),[T,E]=(0,De.useState)(0),[M,z]=(0,De.useState)({key:"name",direction:"asc"}),[N,$]=(0,De.useState)(!1),[F,j]=(0,De.useState)(),[P,I]=(0,De.useState)(),[R,A]=(0,De.useState)(),V=(0,De.useRef)(null),q=(0,De.useRef)(0),O=e.find(de=>de.id===t.endpointId),Z=(0,De.useMemo)(()=>sA(b?.entries??[],M.key,M.direction),[b?.entries,M,h]),H=Z.length>200,L=H?Math.max(0,Math.floor(T/sv)-8):0,Y=(0,De.useMemo)(()=>H?Z.slice(L,Math.min(Z.length,L+56)):Z,[Z,L,H,h]),G=(0,De.useCallback)(async(de=t.path)=>{if(O===void 0)return;let Le=++q.current;C(!0),A(void 0);try{let He=await Yl(t.id,O.id,de);if(Le!==q.current)return;v(He),k(He.path),x([]),E(0),V.current&&(V.current.scrollTop=0),i({endpointId:O.id,path:He.path})}catch(He){Le===q.current&&A(Me(He))}finally{Le===q.current&&C(!1)}},[O?.id,t.path]);(0,De.useEffect)(()=>{O!==void 0&&G(t.path)},[O?.id,s]),(0,De.useEffect)(()=>{r===void 0&&($(!1),j(void 0))},[r]);let oe=async de=>{if(!O)return;let Le=++q.current;C(!0),A(void 0);try{let He=await Av(t.id,O.id,de);if(Le!==q.current)return;ks(He)?await G(He.path):u(He)}catch(He){Le===q.current&&A(Me(He))}finally{Le===q.current&&C(!1)}};(0,De.useEffect)(()=>{u(void 0)},[O?.id]);let U=de=>{de.preventDefault(),oe(_)},fe=async de=>{if(!O||!b||p||de.length===0)return;let Le={endpointId:O.id,path:b.path};m(!0),A(void 0);let He=[];try{for(let at of de)try{await Qv(Le.endpointId,Le.path,at)}catch(er){He.push(`${at.name}: ${Me(er)}`)}g.current.endpointId===Le.endpointId&&g.current.path===Le.path&&(await G(Le.path),He.length&&A(He.join(`
|
|
6122
|
+
`;var fn=require("react"),It=require("@deepseek-ai/dsh-client-ui-primitives");var ds=require("react"),Zi=require("@deepseek-ai/dsh-client-ui-primitives"),Re=require("react/jsx-runtime");function WE({profile:t,project:e,workspaces:n,currentWorkspaceId:r,recentWorkspaceId:s,returnFocus:i,onClose:o,onCreate:a}){le();let l=n.some(w=>String(w.workspaceId)===r)?r:n.some(w=>String(w.workspaceId)===s)?s:n[0]===void 0?void 0:String(n[0].workspaceId),[c,h]=(0,ds.useState)(l),[d,u]=(0,ds.useState)(!1),[f,p]=(0,ds.useState)(),m=(0,ds.useRef)(null),g=(0,ds.useRef)(null);(0,ds.useEffect)(()=>((m.current??g.current)?.focus(),()=>{i.isConnected&&i.focus()}),[i]);let b=()=>{d||o()},v=async w=>{if(w.preventDefault(),c!==void 0){u(!0),p(void 0);try{await a(e,c)}catch(x){p(rH(x)),u(!1)}}};return(0,Re.jsx)(Zi.Modal,{open:!0,onClose:b,title:y("project-session-dialog.selectSessionWorkspace"),headless:!0,className:"dsh-ssh-session-create-modal",children:(0,Re.jsxs)("section",{className:"dsh-ssh-session-create-shell",onKeyDown:nH,children:[(0,Re.jsxs)("header",{children:[(0,Re.jsxs)("span",{children:[(0,Re.jsx)("h2",{children:y("project-session-dialog.newRemoteSession")}),(0,Re.jsx)("p",{children:y("project-session-dialog.chooseTheLocalProjectThisSessionBelongsToIn")})]}),(0,Re.jsx)("button",{ref:g,type:"button",className:"dsh-ssh-icon-button",disabled:d,onClick:b,"aria-label":y("client.close"),children:(0,Re.jsx)(Zi.IconCloseOutline16,{size:16})})]}),(0,Re.jsxs)("form",{onSubmit:w=>{v(w)},children:[(0,Re.jsxs)("dl",{className:"dsh-ssh-session-create-target",children:[(0,Re.jsxs)("div",{children:[(0,Re.jsx)("dt",{children:y("project-session-dialog.remoteHost")}),(0,Re.jsxs)("dd",{children:[t.name,(0,Re.jsxs)("small",{children:[t.username,"@",t.host,":",t.port]})]})]}),(0,Re.jsxs)("div",{children:[(0,Re.jsx)("dt",{children:y("project-session-dialog.remoteWorkingDirectory")}),(0,Re.jsxs)("dd",{children:[e.name,(0,Re.jsx)("small",{title:e.path,children:e.path})]})]})]}),(0,Re.jsxs)("fieldset",{className:"dsh-ssh-workspace-picker",children:[(0,Re.jsx)("legend",{children:y("project-session-dialog.sessionWorkspace")}),(0,Re.jsx)("p",{children:y("project-session-dialog.sessionRecordsAreStoredInTheSelectedDshProject")}),n.length===0?(0,Re.jsxs)("div",{className:"dsh-ssh-workspace-picker-empty",children:[(0,Re.jsx)(Zi.IconFolderClose16,{size:18}),(0,Re.jsxs)("span",{children:[(0,Re.jsx)("strong",{children:y("project-session-dialog.noDshProjectsAvailableYet")}),(0,Re.jsx)("small",{children:y("project-session-dialog.closeThisWindowFirstThenCreateOrAddA")})]})]}):(0,Re.jsx)("div",{className:"dsh-ssh-workspace-options dsh-ssh-scroll-surface",role:"radiogroup","aria-label":y("project-session-dialog.selectDshProject"),children:n.map(w=>{let x=String(w.workspaceId),_=x===r?y("project-session-dialog.currentProject"):x===s?y("project-session-dialog.recentlyUsed"):void 0;return(0,Re.jsxs)("label",{className:"dsh-ssh-workspace-option",children:[(0,Re.jsx)("input",{ref:x===l?m:void 0,className:"sr-only",type:"radio",name:"dsh-ssh-session-workspace",value:x,checked:c===x,disabled:d,onChange:()=>h(x)}),(0,Re.jsxs)("span",{children:[(0,Re.jsx)("span",{className:"dsh-ssh-workspace-option-icon",children:(0,Re.jsx)(Zi.IconFolderClose16,{size:16})}),(0,Re.jsxs)("span",{className:"dsh-ssh-workspace-option-copy",children:[(0,Re.jsx)("strong",{children:w.title}),(0,Re.jsx)("small",{title:w.path,children:w.path})]}),_&&(0,Re.jsx)("em",{children:_}),(0,Re.jsx)("i",{"aria-hidden":"true"})]})]},x)})})]}),f&&(0,Re.jsx)("p",{className:"dsh-ssh-inline-error",role:"alert",children:f}),(0,Re.jsxs)("div",{className:"dsh-ssh-dialog-actions",children:[(0,Re.jsx)("button",{type:"button",className:"dsh-ssh-secondary-button",disabled:d,onClick:b,children:y("client.cancel")}),(0,Re.jsx)("button",{type:"submit",className:"dsh-ssh-primary-button",disabled:d||c===void 0,children:d?y("project-session-dialog.creating"):y("project-session-dialog.createAndOpen")})]})]})]})})}function nH(t){if(t.key!=="Tab")return;let e=Array.from(t.currentTarget.querySelectorAll('button:not(:disabled), input:not(:disabled), a[href], [tabindex]:not([tabindex="-1"])')).filter(s=>s.getClientRects().length>0),n=e[0],r=e[e.length-1];n===void 0||r===void 0||(t.shiftKey&&document.activeElement===n?(t.preventDefault(),r.focus()):!t.shiftKey&&document.activeElement===r&&(t.preventDefault(),n.focus()))}function rH(t){return t instanceof Error?t.message:String(t)}var pr=require("react"),lu=require("@deepseek-ai/dsh-client-ui-primitives");var ur=require("react/jsx-runtime"),sH="project-directory-picker",iH=600;function UE({profileId:t,value:e,disabled:n,onChange:r}){let s=le(),i=(0,pr.useId)(),o=(0,pr.useId)(),a=(0,pr.useRef)(0),[l,c]=(0,pr.useState)({kind:"idle"}),h=`sftp:${t}`,d=(0,pr.useMemo)(()=>l.kind==="ready"?l.directory.entries.filter(ks):[],[l,s]);(0,pr.useEffect)(()=>{let f=++a.current,p=e.trim();if(p.length===0){c({kind:"idle"});return}c({kind:"checking"});let m=window.setTimeout(()=>{Yl(sH,h,p).then(g=>{f===a.current&&c({kind:"ready",directory:g})}).catch(g=>{f===a.current&&c({kind:"error",message:oH(g)})})},iH);return()=>window.clearTimeout(m)},[h,e]);let u=l.kind==="idle"?y("remote-path-input.typeDirectlyTheRemotePathIsCheckedAutomaticallyAfter"):l.kind==="checking"?y("remote-path-input.checkingTheRemotePath"):l.kind==="error"?y("remote-path-input.thePathDoesNotExistOrCannotBeAccessed",[l.message]):d.length===0?y("remote-path-input.thePathIsAccessibleNoSubdirectoriesYet"):y("remote-path-input.thePathIsAccessibleFoundSubdirectories",[d.length]);return(0,ur.jsxs)("div",{className:"dsh-ssh-field dsh-ssh-remote-path-field",children:[(0,ur.jsx)("label",{htmlFor:i,children:y("file-transfer-workspace.remotePath")}),(0,ur.jsx)("input",{id:i,required:!0,maxLength:4096,value:e,disabled:n,spellCheck:!1,placeholder:"/var/www/example","aria-invalid":l.kind==="error"?"true":void 0,"aria-describedby":o,onChange:f=>r(f.target.value)}),(0,ur.jsx)("small",{id:o,className:`dsh-ssh-remote-path-feedback is-${l.kind}`,role:l.kind==="error"?"alert":"status",children:u}),l.kind==="ready"&&d.length>0&&(0,ur.jsx)("div",{className:"dsh-ssh-remote-path-options","aria-label":y("remote-path-input.selectableRemoteSubdirectories"),children:d.map(f=>(0,ur.jsxs)("button",{type:"button",disabled:n,title:y("remote-path-input.select",[f.path]),onClick:()=>r(f.path),children:[(0,ur.jsx)(lu.IconFolderClose16,{size:15,"aria-hidden":"true"}),(0,ur.jsx)("span",{children:f.name}),(0,ur.jsx)(lu.IconChevronRightOutline14,{size:13,"aria-hidden":"true"})]},f.path))})]})}function oH(t){return t instanceof Error?t.message:String(t)}var oa=require("react");var eo=require("react/jsx-runtime");function aa(){let[t,e]=(0,oa.useState)(),[n,r]=(0,oa.useState)(!1),[s,i]=(0,oa.useState)(),o=(0,oa.useRef)(!1),a=()=>{o.current||e(void 0)},l=async()=>{if(!(!t||o.current)){o.current=!0,r(!0),i(void 0);try{await t.onConfirm(),e(void 0)}catch(c){i(Me(c))}finally{o.current=!1,r(!1)}}};return{confirm:c=>{o.current||(i(void 0),e(c))},confirmation:t&&(0,eo.jsxs)(qe,{variant:"confirmation",dismissible:!n,title:t.title,subtitle:t.description,onClose:a,children:[s&&(0,eo.jsx)("p",{className:"dsh-ssh-inline-error",role:"alert",children:s}),(0,eo.jsxs)("div",{className:"dsh-ssh-dialog-actions",children:[(0,eo.jsx)("button",{type:"button",className:"dsh-ssh-secondary-button",disabled:n,onClick:a,children:y("client.cancel")}),(0,eo.jsx)("button",{type:"button",className:"dsh-ssh-danger-button",disabled:n,onClick:()=>{l()},children:n?y("file-entry-delete-dialog.deleting"):y("file-entry-delete-dialog.confirmDelete")})]})]})}}function la(t,e){return t.mountedProjectIds?.[e]??(t.workingProjectIds[e]?[t.workingProjectIds[e]]:[])}var ie=require("react/jsx-runtime");function qE(t){le();let e=Yi(),[n,r]=(0,fn.useState)(""),[s,i]=(0,fn.useState)(()=>new Set),[o,a]=(0,fn.useState)(()=>new Set),[l,c]=(0,fn.useState)({}),[h,d]=(0,fn.useState)(),[u,f]=(0,fn.useState)(),[p,m]=(0,fn.useState)(),[g,b]=(0,fn.useState)(),v=n.trim().toLocaleLowerCase(),w=(0,fn.useMemo)(()=>cH(t.profiles.filter(C=>hH(C).includes(v))),[v,t.profiles]),x=async C=>{d(C);try{let T=await Iv(C);c(E=>({...E,[C]:T})),b(void 0)}catch(T){b(KE(T))}finally{d(T=>T===C?void 0:T)}},_=C=>{a(new Set([C])),l[C]===void 0&&x(C),t.onSelect({profileId:C,path:"~"})},k=C=>{let T=t.access?.profileIds??[],E=T.includes(C);t.onProfiles(E?T.filter(M=>M!==C):[...T,C]),E&&t.onDirectory(C,void 0)},S=C=>i(T=>{let E=new Set(T);return E.has(C)?E.delete(C):E.add(C),E});return(0,ie.jsxs)("aside",{ref:e.ref,onPointerMove:e.onPointerMove,onPointerLeave:e.onPointerLeave,className:"dsh-ssh-remote-tree dsh-ssh-border-surface",children:[(0,ie.jsxs)("header",{className:"dsh-ssh-tree-header",children:[(0,ie.jsxs)("span",{children:[(0,ie.jsx)("strong",{children:y("remote-workspace-tree.hostsProjects")}),(0,ie.jsxs)("small",{children:[t.profiles.length," ",y("remote-workspace-tree.hosts")]})]}),(0,ie.jsx)("button",{type:"button",className:"dsh-ssh-icon-button",onClick:t.onNewProfile,"aria-label":y("remote-workspace-tree.newConnection"),title:y("remote-workspace-tree.newConnection"),children:(0,ie.jsx)(It.IconPlusOutline16,{size:16})})]}),(0,ie.jsxs)("label",{className:"dsh-ssh-search",children:[(0,ie.jsx)("span",{className:"sr-only",children:y("remote-workspace-tree.searchHosts")}),(0,ie.jsx)("input",{value:n,onChange:C=>r(C.target.value),placeholder:y("remote-workspace-tree.searchHostsGroupsTags")})]}),(0,ie.jsxs)("div",{className:"dsh-ssh-tree-scroll dsh-ssh-scroll-surface",children:[w.map(C=>{let T=s.has(C.name);return(0,ie.jsxs)("section",{className:"dsh-ssh-tree-group","data-collapsed":T,children:[(0,ie.jsxs)("h3",{children:[(0,ie.jsxs)("button",{type:"button","aria-expanded":!T,onClick:()=>S(C.name),children:[T?(0,ie.jsx)(It.IconChevronRightOutline14,{size:14}):(0,ie.jsx)(It.IconChevronDownOutline14,{size:14}),(0,ie.jsx)("span",{children:C.name||y("remote-workspace-tree.ungrouped")}),(0,ie.jsx)("small",{children:C.profiles.length})]}),C.name&&t.onGroupProxy&&(0,ie.jsx)("button",{type:"button",className:"dsh-ssh-group-proxy-button","aria-label":y("group-proxy.title",[C.name]),title:y("group-proxy.title",[C.name]),onClick:()=>t.onGroupProxy?.(C.name),children:(0,ie.jsx)(It.IconEditOutline16,{size:14})})]}),!T&&C.profiles.map(E=>{let M=o.has(E.id),z=t.access?.profileIds.includes(E.id)===!0,N=l[E.id]??[],$=t.selected?.profileId===E.id&&t.selected.projectId===void 0;return(0,ie.jsxs)("div",{className:"dsh-ssh-tree-host","data-open":M,children:[(0,ie.jsxs)("div",{"data-ssh-interactive":"row","data-ssh-context-row":!0,className:`dsh-ssh-tree-host-row${z?" is-authorized":""}${$?" is-active":""}`,children:[(0,ie.jsxs)("button",{type:"button",className:"dsh-ssh-tree-host-main","aria-pressed":$,"aria-expanded":M,title:y("remote-workspace-tree.selectAndExpand",[E.name]),onClick:()=>_(E.id),children:[(0,ie.jsx)("span",{className:"dsh-ssh-host-monogram",children:E.name.slice(0,1).toUpperCase()}),(0,ie.jsxs)("span",{children:[(0,ie.jsx)("strong",{children:E.name}),(0,ie.jsxs)("small",{children:[E.username,"@",E.host]})]})]}),(0,ie.jsx)("button",{type:"button","data-ssh-interactive":"choice",className:`dsh-ssh-tree-mount dsh-ssh-context-action${z?" is-mounted":""}`,"aria-label":`${z?y("remote-workspace-tree.unmount"):y("remote-workspace-tree.mount")} ${E.name}`,"aria-pressed":z,title:t.access===null?y("remote-workspace-tree.openADshSessionBeforeMountingHosts"):z?y("remote-workspace-tree.unmountFromCurrentSession"):y("remote-workspace-tree.mountToCurrentSession"),disabled:t.access===null||t.accessLoading||t.accessSaving,onClick:()=>k(E.id),children:z?y("remote-workspace-tree.unmount"):y("remote-workspace-tree.mount")}),(0,ie.jsx)("button",{type:"button",className:"dsh-ssh-tree-add","aria-label":y("remote-workspace-tree.addPinnedDirectoryFor",[E.name]),title:y("remote-workspace-tree.addPinnedDirectory"),onClick:()=>f({profile:E}),children:(0,ie.jsx)(It.IconPlusOutline16,{size:14})})]}),M&&(0,ie.jsx)("div",{className:"dsh-ssh-tree-branches",children:h===E.id&&l[E.id]===void 0?(0,ie.jsx)("p",{className:"dsh-ssh-tree-state",children:y("remote-workspace-tree.readingPinnedDirectories")}):N.length===0?(0,ie.jsxs)("button",{type:"button",className:"dsh-ssh-tree-empty",onClick:()=>f({profile:E}),children:[(0,ie.jsx)(It.IconPlusOutline16,{size:13}),y("remote-workspace-tree.addProjectDirectory")]}):N.map(F=>{let j=t.selected?.projectId===F.id,P=t.access!==null&&la(t.access,E.id).includes(F.id),I=t.access?.workingProjectIds[E.id]===F.id;return(0,ie.jsx)("div",{className:"dsh-ssh-tree-project",children:(0,ie.jsxs)("div",{"data-ssh-interactive":"row",className:`dsh-ssh-tree-project-row${j?" is-active":""}${P?" is-bound":""}`,children:[(0,ie.jsxs)("button",{type:"button",className:"dsh-ssh-tree-project-main","aria-pressed":t.access===null?void 0:P,title:t.access===null?y("remote-workspace-tree.noDshSessionIsAvailableToMountADirectory"):z?P?y("remote-workspace-tree.unmountThisDirectoryFromTheCurrentSession"):y("remote-workspace-tree.mountDirectoryMultipleSelectionsAreAllowed"):y("remote-workspace-tree.mountThisHostFirst"),onClick:()=>{z&&!t.accessLoading&&!t.accessSaving&&(t.onToggleProject(E.id,F.id,F.path),t.onSelect(P?{profileId:E.id,path:"~"}:{profileId:E.id,path:F.path,projectId:F.id}))},children:[(0,ie.jsx)("span",{children:P?(0,ie.jsx)(It.IconFolderOpenOutline16,{size:15}):(0,ie.jsx)(It.IconFolderClose16,{size:15})}),(0,ie.jsxs)("span",{children:[(0,ie.jsx)("strong",{children:F.name}),(0,ie.jsx)("small",{children:F.path}),P&&(0,ie.jsx)("em",{children:I?y("remote-workspace-tree.mountedDefaultWorkingDirectory"):y("client.mounted")})]})]}),(0,ie.jsxs)("div",{className:"dsh-ssh-tree-project-actions",children:[P&&!I&&(0,ie.jsx)("button",{type:"button",className:"dsh-ssh-tree-project-edit",disabled:t.accessSaving,title:y("remote-workspace-tree.setAsDefaultWorkingDirectory"),"aria-label":y("remote-workspace-tree.setAsTheDefaultDirectory",[F.name]),onClick:()=>t.onDirectory(E.id,F.path,F.id),children:(0,ie.jsx)(It.IconFolderOpenOutline16,{size:13})}),(0,ie.jsx)("button",{type:"button",className:"dsh-ssh-tree-project-new","aria-label":y("remote-workspace-tree.newSessionIn",[F.name]),title:y("remote-workspace-tree.newSession"),onClick:R=>{b(void 0),m({profile:E,project:F,returnFocus:R.currentTarget})},children:(0,ie.jsx)(It.IconPlusOutline16,{size:13})}),(0,ie.jsx)("button",{type:"button",className:"dsh-ssh-tree-project-edit","aria-label":y("client.edit2",[F.name]),title:y("remote-workspace-tree.editPinnedDirectory"),onClick:()=>f({profile:E,project:F}),children:(0,ie.jsx)(It.IconEditOutline16,{size:13})})]})]})},F.id)})})]},E.id)})]},C.name)}),w.length===0&&(0,ie.jsx)("p",{className:"dsh-ssh-tree-no-results",children:t.profiles.length===0?y("remote-workspace-tree.noSshHostsYet"):y("remote-workspace-tree.noMatchingHosts")})]}),(0,ie.jsx)(aH,{access:t.access,loading:t.accessLoading,saving:t.accessSaving,error:t.accessError??g,onPermission:t.onPermission,onApproval:t.onApproval}),u!==void 0&&(0,ie.jsx)(lH,{profile:u.profile,project:u.project,onClose:()=>f(void 0),onSaved:async()=>{let C=u.profile.id;f(void 0),await x(C),await t.onProjectsChanged()}}),p!==void 0&&(0,ie.jsx)(WE,{...p,workspaces:t.workspaces,currentWorkspaceId:t.currentWorkspaceId,recentWorkspaceId:t.recentWorkspaceId,onClose:()=>m(void 0),onCreate:t.onCreateSession})]})}function aH({access:t,loading:e,saving:n,error:r,onPermission:s,onApproval:i}){return le(),(0,ie.jsxs)("footer",{className:"dsh-ssh-access-footer",children:[(0,ie.jsxs)("div",{className:"dsh-ssh-access-heading",children:[(0,ie.jsxs)("span",{children:[(0,ie.jsx)("strong",{children:y("remote-workspace-tree.currentSessionPermissions")}),(0,ie.jsxs)("small",{children:[t?.profileIds.length??0," ",y("remote-workspace-tree.availableHosts")]})]}),(0,ie.jsx)("em",{children:e?y("remote-workspace-tree.loading"):n?y("remote-workspace-tree.saving"):r?y("remote-workspace-tree.notSynced"):y("remote-workspace-tree.synced")})]}),(0,ie.jsxs)("div",{className:"dsh-ssh-access-segments","aria-label":y("remote-workspace-tree.sshPermissions"),children:[(0,ie.jsx)("button",{type:"button","data-ssh-interactive":"choice",className:t?.permission==="exec"?"is-active":"","aria-pressed":t?.permission==="exec",disabled:t===null,onClick:()=>s("exec"),children:y("remote-workspace-tree.commandsOnly")}),(0,ie.jsx)("button",{type:"button","data-ssh-interactive":"choice",className:t?.permission==="terminal"?"is-active":"","aria-pressed":t?.permission==="terminal",disabled:t===null,onClick:()=>s("terminal"),children:y("remote-workspace-tree.terminalControl")})]}),(0,ie.jsxs)("label",{className:"dsh-ssh-access-approval",children:[(0,ie.jsxs)("span",{children:[(0,ie.jsx)("strong",{children:y("remote-workspace-tree.confirmBeforeRunning")}),(0,ie.jsx)("small",{children:t?.requireCommandApproval===!1?y("remote-workspace-tree.whenOffRunsDirectlyUnderCurrentSessionPermissions"):y("remote-workspace-tree.requiresDshAskModeFullAccessIsRejectedOutright")})]}),(0,ie.jsx)("input",{type:"checkbox",checked:t?.requireCommandApproval??!0,disabled:t===null,onChange:o=>i(o.target.checked)}),(0,ie.jsx)("i",{"aria-hidden":"true"})]}),r&&(0,ie.jsx)("p",{className:"dsh-ssh-inline-error",role:"alert",children:r})]})}function lH({profile:t,project:e,onClose:n,onSaved:r}){le();let{confirm:s,confirmation:i}=aa(),[o,a]=(0,fn.useState)(e?.name??""),[l,c]=(0,fn.useState)(e?.path??""),[h,d]=(0,fn.useState)(!1),[u,f]=(0,fn.useState)(),p=async g=>{g.preventDefault(),d(!0),f(void 0);try{e===void 0?await Lv(t.id,{name:o,path:l}):await Ov(t.id,e.id,{name:o,path:l}),await r()}catch(b){f(KE(b)),d(!1)}},m=async()=>{e!==void 0&&s({title:y("client.delete2",[e.name]),description:y("remote-workspace-tree.deletePinnedDirectoryRelatedDshSessionsWillNotBe",[e.name]),onConfirm:async()=>{await zv(t.id,e.id),await r()}})};return(0,ie.jsxs)(qe,{className:"dsh-ssh-project-dialog",title:e===void 0?y("remote-workspace-tree.addPinnedDirectory"):y("remote-workspace-tree.editPinnedDirectory"),subtitle:y("remote-workspace-tree.defaultRemotePathForTheTerminalAndSftp",[t.name]),onClose:n,children:[i,(0,ie.jsxs)("form",{className:"dsh-ssh-form",onSubmit:g=>{p(g)},children:[(0,ie.jsxs)("label",{className:"dsh-ssh-field",children:[(0,ie.jsx)("span",{children:y("client.name")}),(0,ie.jsx)("input",{required:!0,maxLength:80,value:o,placeholder:y("remote-workspace-tree.websiteProject"),onChange:g=>a(g.target.value)})]}),(0,ie.jsx)(UE,{profileId:t.id,value:l,disabled:h,onChange:c}),u&&(0,ie.jsx)("p",{className:"dsh-ssh-inline-error",role:"alert",children:u}),(0,ie.jsxs)("div",{className:"dsh-ssh-dialog-actions",children:[e!==void 0&&(0,ie.jsxs)("button",{type:"button",className:"dsh-ssh-danger-button",disabled:h,onClick:()=>{m()},children:[(0,ie.jsx)(It.IconTrashOutline16,{size:15}),y("client.delete")]}),(0,ie.jsx)("span",{className:"dsh-ssh-dialog-spacer"}),(0,ie.jsx)("button",{type:"button",className:"dsh-ssh-secondary-button","data-ssh-dialog-close":!0,disabled:h,onClick:n,children:y("client.cancel")}),(0,ie.jsx)("button",{className:"dsh-ssh-primary-button",disabled:h,children:h?y("client.saving2"):y("remote-workspace-tree.saveDirectory")})]})]})]})}function cH(t){let e=new Map;for(let n of t){let r=n.group?.trim()||"",s=e.get(r);s===void 0?e.set(r,[n]):s.push(n)}return[...e].map(([n,r])=>({name:n,profiles:r}))}function hH(t){return`${t.name} ${t.group??""} ${t.host} ${t.username} ${t.tags.join(" ")}`.toLocaleLowerCase()}function KE(t){return t instanceof Error?t.message:String(t)}var sn=require("react");var ev=new Set;function ca(t){for(let e of ev)e(t)}function GE(t){return ev.add(t),()=>ev.delete(t)}function JE(t){let[e,n]=(0,sn.useState)(null),[r,s]=(0,sn.useState)(t!==void 0),[i,o]=(0,sn.useState)(!1),[a,l]=(0,sn.useState)(),c=(0,sn.useRef)(null),h=(0,sn.useRef)(null),d=(0,sn.useRef)(t),u=(0,sn.useRef)(Promise.resolve()),f=(0,sn.useRef)(0);d.current=t,(0,sn.useEffect)(()=>{let g=!1;return c.current=null,h.current=null,n(null),l(void 0),s(t!==void 0),t===void 0?()=>{g=!0}:(ba(t).then(b=>{if(g)return;let v=b??ha(t);c.current=v,h.current=v,n(v),ca(v)}).catch(b=>{g||l(tv(b))}).finally(()=>{g||s(!1)}),()=>{g=!0})},[t]);let p=(0,sn.useCallback)(async g=>{c.current=g,n(g),ca(g),l(void 0),f.current+=1,o(!0);let b=u.current.catch(()=>{}).then(()=>Ql(g));u.current=b;try{let v=await b;return d.current===v.sessionId&&(h.current=v),d.current===v.sessionId&&c.current===g&&(c.current=v,n(v),ca(v)),v}catch(v){throw d.current===g.sessionId&&(l(tv(v)),c.current===g&&h.current&&(c.current=h.current,n(h.current),ca(h.current))),v}finally{f.current=Math.max(0,f.current-1),d.current===g.sessionId&&f.current===0&&o(!1)}},[]),m=(0,sn.useCallback)(g=>{let b=d.current;if(b===void 0)return;let v=c.current??ha(b);p({...v,...g,sessionId:b}).catch(()=>{})},[p]);return{value:e,loading:r,saving:i,error:a,refresh:async()=>{let g=d.current;if(g)try{await u.current.catch(()=>{});let b=c.current,v=await ba(g)??ha(g);if(g!==d.current||b!==c.current)return;c.current=v,h.current=v,n(v),ca(v)}catch(b){g===d.current&&l(tv(b))}},setProfiles:g=>{let b=c.current;m({profileIds:g,mountedProjectIds:Object.fromEntries(g.map(v=>[v,b?la(b,v):[]]))})},toggleProject:(g,b,v)=>{let w=c.current;if(!w||!w.profileIds.includes(g))return;let x=la(w,g),_=x.includes(b),k=_?x.filter(T=>T!==b):[...x,b],S={...w.workingDirectories},C={...w.workingProjectIds};!_&&C[g]===void 0?(S[g]=v,C[g]=b):_&&C[g]===b&&(delete S[g],delete C[g]),m({workingDirectories:S,workingProjectIds:C,mountedProjectIds:Object.fromEntries(w.profileIds.map(T=>[T,T===g?k:la(w,T)]))})},setDirectory:(g,b,v)=>{let w=d.current;if(w===void 0)return;let x=c.current??ha(w),_={...x.workingDirectories},k={...x.workingProjectIds};b===void 0?delete _[g]:_[g]=b,v===void 0?delete k[g]:k[g]=v,m({workingDirectories:_,workingProjectIds:k})},setPermission:g=>m({permission:g}),setRequireCommandApproval:g=>m({requireCommandApproval:g}),setFileEndpoints:g=>m({fileEndpointIds:g}),setFilePermission:g=>m({filePermission:g}),setRequireFileApproval:g=>m({requireFileApproval:g}),setLocalFileAccess:(g,b)=>m(g==="upload"?{allowLocalUpload:b}:{allowLocalDownload:b}),replace:p}}function ha(t){return{sessionId:t,profileIds:[],permission:"exec",requireCommandApproval:!0,fileEndpointIds:[],filePermission:"browse",requireFileApproval:!0,workingDirectories:{},workingProjectIds:{},updatedAt:0}}function tv(t){return t instanceof Error?t.message:String(t)}var to=require("react"),ql=require("react/jsx-runtime"),cu=38,Wl=28,Ul=66,dH=320,uH=280,pH=7;function XE(t,e,n){return Math.min(n,Math.max(e,t))}function fH(t){if(typeof window>"u")return cu;try{let e=Number.parseFloat(window.localStorage.getItem(t)??"");return Number.isFinite(e)?XE(e,Wl,Ul):cu}catch{return cu}}function nv(t,e){try{window.localStorage.setItem(t,e.toFixed(2))}catch{}}function mH(t){if(t<=0)return{min:Wl,max:Ul};let e=uH/t*100,n=(t-dH-pH)/t*100,r=Math.max(Wl,e),s=Math.max(r,Math.min(Ul,n));return{min:r,max:s}}function YE({primary:t,secondary:e,storageKey:n,label:r,secondaryHidden:s=!1}){le();let[i,o]=(0,to.useState)(()=>fH(n)),a=(0,to.useRef)(null),l=(0,to.useRef)(null),c=(0,to.useRef)(i),h=(0,to.useRef)(),d=v=>{let w=a.current;if(w===null)return v;let x=mH(w.getBoundingClientRect().width),_=XE(v,x.min,x.max);return w.style.setProperty("--ssh-sftp-width",`${_}%`),l.current?.setAttribute("aria-valuenow",String(Math.round(_))),c.current=_,_},u=v=>{if(h.current===void 0)return;let w=l.current;h.current=void 0,v!==void 0&&w?.hasPointerCapture(v)&&w.releasePointerCapture(v),a.current?.classList.remove("is-resizing");let x=c.current;o(x),nv(n,x)},f=v=>{v.button===0&&(h.current=v.pointerId,c.current=i,v.currentTarget.setPointerCapture(v.pointerId),a.current?.classList.add("is-resizing"),v.preventDefault())},p=v=>{if(h.current!==v.pointerId)return;let w=a.current?.getBoundingClientRect();w===void 0||w.width===0||(d((w.right-v.clientX)/w.width*100),v.preventDefault())},m=v=>{let w=v.shiftKey?5:2,x;if(v.key==="ArrowLeft"&&(x=i+w),v.key==="ArrowRight"&&(x=i-w),v.key==="Home"&&(x=Wl),v.key==="End"&&(x=Ul),x===void 0)return;let _=d(x);o(_),nv(n,_),v.preventDefault()},g=()=>{let v=d(cu);o(v),nv(n,v)},b={"--ssh-sftp-width":`${i}%`};return(0,ql.jsxs)("div",{ref:a,className:`dsh-ssh-workbench-split${s?" is-secondary-hidden":""}`,style:b,children:[t,(0,ql.jsx)("div",{ref:l,hidden:s,className:"dsh-ssh-workbench-resizer",role:"separator","aria-label":r,"aria-orientation":"vertical","aria-valuemin":Wl,"aria-valuemax":Ul,"aria-valuenow":Math.round(i),tabIndex:0,title:y("resizable-split.dragToResizeDoubleClickToReset"),onDoubleClick:g,onKeyDown:m,onPointerDown:f,onPointerMove:p,onPointerUp:v=>u(v.pointerId),onPointerCancel:v=>u(v.pointerId),onLostPointerCapture:()=>u()}),(0,ql.jsx)("div",{className:"dsh-ssh-split-secondary",hidden:s,children:e})]})}var Lt=require("react"),In=require("@deepseek-ai/dsh-client-ui-primitives");function QE(t){let e=t.port??22;if(!Number.isSafeInteger(e)||e<1||e>65535)return;let n=t.host.trim().normalize("NFKC").toLocaleLowerCase();return n.startsWith("[")&&n.endsWith("]")&&(n=n.slice(1,-1)),n=n.replace(/\.+$/u,""),n.length===0?void 0:`${n}\0${e}`}function ZE(t,e,n){let r=QE(e);if(r!==void 0)return t.find(s=>s.id!==n&&QE(s)===r)}var J=require("react/jsx-runtime");function eA({profile:t,dependents:e,onClose:n,onDeleted:r}){le();let[s,i]=(0,Lt.useState)(!1),[o,a]=(0,Lt.useState)(),l=async()=>{if(!(s||e.length>0)){i(!0),a(void 0);try{await se(`/profiles/${encodeURIComponent(t.id)}`,{method:"DELETE"}),r()}catch(c){a(Me(c))}finally{i(!1)}}};return(0,J.jsx)(qe,{variant:"confirmation",dismissible:!s,title:y("client.delete2",[t.name]),subtitle:ms(t),onClose:()=>{s||n()},children:(0,J.jsxs)("div",{className:"dsh-ssh-delete-profile",children:[(0,J.jsx)("span",{className:"dsh-ssh-delete-profile-mark",children:(0,J.jsx)(In.IconTrashOutline16,{size:19})}),(0,J.jsxs)("div",{children:[(0,J.jsx)("strong",{children:y("profile-editor.thisActionCannotBeUndone")}),(0,J.jsx)("p",{children:y("profile-editor.theConnectionConfigThisHostSStandaloneCredentialsAnd")})]}),e.length>0&&(0,J.jsxs)("div",{className:"dsh-ssh-delete-profile-block",role:"alert",children:[(0,J.jsx)("strong",{children:y("profile-editor.cannotDeleteYet")}),(0,J.jsxs)("p",{children:[y("profile-editor.theseConnectionsStillUseItAsAnSshJump"),e.map(c=>c.name).join("\u3001"),y("profile-editor.editTheirJumpChainsFirst")]})]}),o&&(0,J.jsx)("p",{className:"dsh-ssh-inline-error",role:"alert",children:o}),(0,J.jsxs)("div",{className:"dsh-ssh-dialog-actions",children:[(0,J.jsx)("button",{type:"button",className:"dsh-ssh-secondary-button","data-ssh-dialog-close":!0,disabled:s,onClick:n,children:y("client.cancel")}),(0,J.jsx)("button",{type:"button",className:"dsh-ssh-danger-button",disabled:s||e.length>0,onClick:()=>{l()},children:s?y("file-entry-delete-dialog.deleting"):y("client.deleteHost2")})]})]})})}function tA({profile:t,profiles:e,vaultEntries:n,proxyEntries:r,onClose:s,onSaved:i}){let o=le(),[a,l]=(0,Lt.useState)(()=>({name:t?.name??"",group:t?.group??"",host:t?.host??"",port:String(t?.port??22),username:t?.username??"",authType:t?.authType??"password",credentialId:t?.credentialId??"",proxyType:t?.proxy.type??"none",proxyEntryId:t?.proxy.type==="saved"?t.proxy.proxyId:"",proxyHost:t?.proxy.type==="http"||t?.proxy.type==="socks5"?t.proxy.host:"",proxyPort:t?.proxy.type==="http"||t?.proxy.type==="socks5"?String(t.proxy.port):"1080",proxyUsername:t?.proxy.type==="http"||t?.proxy.type==="socks5"?t.proxy.username??"":"",jumpProfileIds:t?.proxy.type==="jump"?t.proxy.profileIds:[],tags:t?.tags.join(", ")??"",password:"",privateKey:"",passphrase:"",proxyPassword:"",hostFingerprint:t?.hostFingerprint??""})),[c,h]=(0,Lt.useState)(!1),[d,u]=(0,Lt.useState)(!1),[f,p]=(0,Lt.useState)(),[m,g]=(0,Lt.useState)(),[b,v]=(0,Lt.useState)(),[w,x]=(0,Lt.useState)(),[_,k]=(0,Lt.useState)(!1),S=(0,Lt.useId)(),C=(0,Lt.useRef)(null),T=I=>({value:a[I],onChange:R=>{l(A=>({...A,[I]:R.target.value})),(I==="host"||I==="port")&&x(void 0),p(void 0),g(void 0)}}),E=n.find(I=>I.id===a.credentialId),M=(0,Lt.useMemo)(()=>e.flatMap(I=>I.group===void 0?[]:[I.group]),[e,o]),z=(0,Lt.useMemo)(()=>e.flatMap(I=>I.tags),[e,o]),N=(0,Lt.useMemo)(()=>ZE(e,{host:a.host,port:Number(a.port)},t?.id),[a.host,a.port,t?.id,e,o]),$=_?N===void 0?w:y("profile-editor.thisAddressAndPortAreAlreadyUsedByChange",[N.name]):void 0,F=(I=a.hostFingerprint)=>{let R=a.proxyType==="none"?{type:"none"}:a.proxyType==="saved"?{type:"saved",proxyId:a.proxyEntryId}:a.proxyType==="jump"?{type:"jump",profileIds:a.jumpProfileIds}:{type:a.proxyType,host:a.proxyHost,port:Number(a.proxyPort),...a.proxyUsername.trim()?{username:a.proxyUsername.trim()}:{}};return{profile:{name:a.name,...a.group.trim()?{group:a.group.trim()}:{},host:a.host,port:Number(a.port),username:E?.username??a.username,authType:E?.authType??a.authType,...a.credentialId?{credentialId:a.credentialId}:{},...I?{hostFingerprint:I}:{},proxy:R,keepAliveIntervalMs:t?.keepAliveIntervalMs??15e3,connectTimeoutMs:t?.connectTimeoutMs??15e3,terminalType:t?.terminalType??"xterm-256color",tags:a.tags.split(",").map(A=>A.trim()).filter(Boolean)},secrets:{password:a.password,privateKey:a.privateKey,passphrase:a.passphrase,proxyPassword:a.proxyPassword}}},j=async I=>{if(k(!0),N!==void 0){C.current?.focus();return}u(!0),v(void 0),p(void 0),g(void 0);try{if(I&&I.draft!==JSON.stringify(F()))throw Error(y("host-key.retest"));let R=I?.profileId!==void 0&&I.profileId!==t?.id&&e.some(V=>V.id===I.profileId);R&&await se(`/profiles/${encodeURIComponent(I.profileId)}/confirm-host`,{method:"POST",body:JSON.stringify({fingerprint:I.fingerprint,previousFingerprint:I.previousFingerprint})});let A=R?void 0:I?.fingerprint;await se("/profiles/test-draft",{method:"POST",body:JSON.stringify({...F(A),...t===void 0?{}:{profileId:t.id}})}),A!==void 0&&l(V=>({...V,hostFingerprint:A})),p("success")}catch(R){R instanceof Fn&&R.body?.code==="HOST_KEY_REQUIRED"&&typeof R.body.fingerprint=="string"?g({fingerprint:R.body.fingerprint,...typeof R.body.previousFingerprint=="string"?{previousFingerprint:R.body.previousFingerprint}:{},...typeof R.body.profileId=="string"?{profileId:R.body.profileId}:{},...typeof R.body.profileName=="string"?{profileName:R.body.profileName}:{},draft:JSON.stringify(F())}):R instanceof Fn&&R.body?.code==="DUPLICATE_PROFILE_ENDPOINT"?(x(Me(R)),C.current?.focus()):v(Me(R))}finally{u(!1)}},P=async I=>{if(I.preventDefault(),k(!0),N!==void 0){C.current?.focus();return}h(!0),v(void 0);try{await se(t===void 0?"/profiles":`/profiles/${t.id}`,{method:t===void 0?"POST":"PUT",body:JSON.stringify(F())}),i()}catch(R){R instanceof Fn&&R.body?.code==="DUPLICATE_PROFILE_ENDPOINT"?(x(Me(R)),C.current?.focus()):v(Me(R))}finally{h(!1)}};return(0,J.jsx)(qe,{title:t===void 0?y("profile-editor.newSshConnection"):y("client.edit2",[t.name]),subtitle:y("profile-editor.credentialsAreNotShownAgainAfterSaving"),onClose:s,children:(0,J.jsxs)("form",{className:"dsh-ssh-form",onSubmit:I=>{P(I)},children:[(0,J.jsxs)("div",{className:"dsh-ssh-form-section",children:[(0,J.jsxs)("div",{className:"dsh-ssh-form-section-heading",children:[(0,J.jsx)("strong",{children:y("profile-editor.connectionInfo")}),(0,J.jsx)("small",{children:y("profile-editor.hostAddressAndDisplay")})]}),(0,J.jsxs)("div",{className:"dsh-ssh-form-grid",children:[(0,J.jsx)(ge,{label:y("client.name"),children:(0,J.jsx)("input",{required:!0,maxLength:80,placeholder:y("profile-editor.devServer"),...T("name")})}),(0,J.jsx)(ge,{label:y("profile-editor.group"),children:(0,J.jsx)(Co,{ariaLabel:y("profile-editor.hostGroup"),maxLength:64,options:M,placeholder:y("ftp-profile-editor.selectAnExistingGroupOrEnterANewOne"),value:a.group,onChange:I=>l(R=>({...R,group:I}))})})]}),(0,J.jsxs)("div",{className:"dsh-ssh-form-grid is-host",children:[(0,J.jsxs)(ge,{label:y("client.host"),children:[(0,J.jsx)("input",{ref:C,required:!0,"aria-invalid":$===void 0?void 0:!0,"aria-describedby":$===void 0?void 0:S,placeholder:"server.example.com",spellCheck:!1,...T("host"),onBlur:()=>k(!0)}),$&&(0,J.jsx)("small",{id:S,className:"dsh-ssh-field-error",role:"alert",children:$})]}),(0,J.jsx)(ge,{label:y("ftp-profile-editor.port"),children:(0,J.jsx)("input",{required:!0,"aria-invalid":$===void 0?void 0:!0,"aria-describedby":$===void 0?void 0:S,type:"number",inputMode:"numeric",min:"1",max:"65535",...T("port"),onBlur:()=>k(!0)})})]}),(0,J.jsx)(ge,{label:y("profile-editor.tags"),hint:y("ftp-profile-editor.pickExistingTagsOrTypeNewOnesSeparateMultiple"),children:(0,J.jsx)(Co,{ariaLabel:y("profile-editor.hostTags"),multiple:!0,options:z,placeholder:y("ftp-profile-editor.selectOrEnterTags"),value:a.tags,onChange:I=>l(R=>({...R,tags:I}))})})]}),(0,J.jsxs)("div",{className:"dsh-ssh-form-section",children:[(0,J.jsxs)("div",{className:"dsh-ssh-form-section-heading",children:[(0,J.jsx)("strong",{children:y("ftp-profile-editor.authentication")}),(0,J.jsx)("small",{children:y("profile-editor.chooseSharedCredentialsOrSaveSeparately")})]}),(0,J.jsx)(ge,{label:y("ftp-profile-editor.credentialSource"),hint:y("profile-editor.useThisConnectionSOwnCredentialsOrReferenceA"),children:(0,J.jsxs)("select",{...T("credentialId"),children:[(0,J.jsx)("option",{value:"",children:y("profile-editor.savedWithThisConnectionOnly")}),n.map(I=>(0,J.jsxs)("option",{value:I.id,children:[I.name," \xB7 ",I.username]},I.id))]})}),E?(0,J.jsxs)("div",{className:"dsh-ssh-credential-reference",children:[(0,J.jsx)("span",{children:(0,J.jsx)(In.IconUserOutline16,{size:16})}),(0,J.jsxs)("span",{children:[(0,J.jsx)("strong",{children:E.name}),(0,J.jsxs)("small",{children:[E.username," \xB7 ",E.authType==="password"?y("client.password"):y("client.privateKey")]})]}),(0,J.jsx)("em",{children:E.credential.configured?y("profile-editor.ready"):y("client.missingCredentials")})]}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)("div",{className:"dsh-ssh-form-grid",children:[(0,J.jsx)(ge,{label:y("client.username"),children:(0,J.jsx)("input",{required:!0,autoComplete:"username",...T("username")})}),(0,J.jsx)(ge,{label:y("client.authMethod"),children:(0,J.jsxs)("select",{...T("authType"),children:[(0,J.jsx)("option",{value:"password",children:y("client.password")}),(0,J.jsx)("option",{value:"private-key",children:y("client.privateKey")}),(0,J.jsx)("option",{value:"agent",children:"SSH Agent"})]})})]}),a.authType==="password"&&(0,J.jsx)(ge,{label:y("client.password"),hint:t?.credential.source==="profile"&&t.credential.fields.includes("password")?y("client.savedLeaveBlankToKeepUnchanged"):y("profile-editor.cannotBeReadBackAfterSaving"),children:(0,J.jsx)("input",{required:t===void 0,type:"password",autoComplete:"new-password",placeholder:t?.credential.source==="profile"&&t.credential.fields.includes("password")?"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022":"",...T("password")})}),a.authType==="private-key"&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(ge,{label:y("client.privateKey"),hint:t?.credential.source==="profile"&&t.credential.fields.includes("privateKey")?y("client.savedLeaveBlankToKeepUnchanged"):y("profile-editor.pasteOpensshPemPrivateKey"),children:(0,J.jsx)("textarea",{required:t===void 0,rows:5,spellCheck:!1,...T("privateKey")})}),(0,J.jsx)(ge,{label:y("client.keyPassphrase"),children:(0,J.jsx)("input",{type:"password",autoComplete:"new-password",...T("passphrase")})})]})]})]}),(0,J.jsxs)("div",{className:"dsh-ssh-form-section",children:[(0,J.jsxs)("div",{className:"dsh-ssh-form-section-heading",children:[(0,J.jsx)("strong",{children:y("profile-editor.connectionPath")}),(0,J.jsx)("small",{children:y("profile-editor.directProxyOrJumpChain")})]}),(0,J.jsx)(ge,{label:y("profile-editor.connectionMode"),children:(0,J.jsxs)("select",{...T("proxyType"),children:[(0,J.jsx)("option",{value:"none",children:y("group-proxy.automatic")}),(0,J.jsx)("option",{value:"saved",children:y("client.commonProxies")}),(0,J.jsx)("option",{value:"http",children:y("profile-editor.customHttpConnect")}),(0,J.jsx)("option",{value:"socks5",children:y("profile-editor.customSocks5")}),(0,J.jsx)("option",{value:"jump",children:y("client.sshJumpHost")})]})}),a.proxyType==="saved"&&(0,J.jsx)(ge,{label:y("client.commonProxies"),hint:r.length===0?y("profile-editor.addAnHttpOrSocks5ProxyToTheProxy"):y("profile-editor.multipleHostsCanShareTheSameProxyConfiguration"),children:(0,J.jsxs)("select",{required:!0,...T("proxyEntryId"),children:[(0,J.jsx)("option",{value:"",children:y("profile-editor.selectProxy")}),r.map(I=>(0,J.jsxs)("option",{value:I.id,children:[I.name," \xB7 ",I.proxyType==="http"?"HTTP":"SOCKS5"," \xB7 ",I.host,":",I.port]},I.id))]})}),(a.proxyType==="http"||a.proxyType==="socks5")&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)("div",{className:"dsh-ssh-form-grid is-host",children:[(0,J.jsx)(ge,{label:y("client.proxyHost"),children:(0,J.jsx)("input",{required:!0,spellCheck:!1,...T("proxyHost")})}),(0,J.jsx)(ge,{label:y("client.proxyPort"),children:(0,J.jsx)("input",{required:!0,type:"number",inputMode:"numeric",min:"1",max:"65535",...T("proxyPort")})})]}),(0,J.jsxs)("div",{className:"dsh-ssh-form-grid",children:[(0,J.jsx)(ge,{label:y("client.proxyUsername"),children:(0,J.jsx)("input",{autoComplete:"username",...T("proxyUsername")})}),(0,J.jsx)(ge,{label:y("client.proxyPassword"),children:(0,J.jsx)("input",{type:"password",autoComplete:"new-password",...T("proxyPassword")})})]})]}),a.proxyType==="jump"&&(0,J.jsx)(gH,{profiles:e.filter(I=>I.id!==t?.id),value:a.jumpProfileIds,onChange:I=>l(R=>({...R,jumpProfileIds:I}))})]}),m&&(0,J.jsxs)("div",{className:"dsh-ssh-test-result is-warning",role:"alert",children:[(0,J.jsxs)("span",{children:[(0,J.jsx)("strong",{children:m.previousFingerprint?y("host-key.changed"):y("profile-editor.firstConnectionVerifyTheHostFingerprint")}),(0,J.jsx)("span",{children:m.profileName??a.name}),(0,J.jsx)("span",{children:y("host-key.warning")}),m.previousFingerprint&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)("span",{children:y("host-key.previous")}),(0,J.jsx)("code",{children:m.previousFingerprint})]}),(0,J.jsx)("span",{children:y("host-key.current")}),(0,J.jsx)("code",{children:m.fingerprint}),(0,J.jsx)("small",{children:y("host-key.saveHint")})]}),(0,J.jsx)("button",{type:"button",className:"dsh-ssh-small-primary",disabled:d,onClick:()=>{j(m)},children:y("host-key.confirm")})]}),f==="success"&&(0,J.jsxs)("p",{className:"dsh-ssh-test-result is-success",role:"status",children:[(0,J.jsx)(In.IconCheckOutline14,{size:14}),y("profile-editor.connectionTestSucceeded")]}),b&&(0,J.jsx)("p",{className:"dsh-ssh-inline-error",role:"alert",children:b}),(0,J.jsxs)("div",{className:"dsh-ssh-dialog-actions",children:[(0,J.jsx)("button",{type:"button",className:"dsh-ssh-secondary-button dsh-ssh-test-button",disabled:c||d,onClick:I=>{I.currentTarget.form?.reportValidity()&&j()},children:d?y("ftp-profile-editor.testing"):y("client.testConnection")}),(0,J.jsx)("button",{type:"button",className:"dsh-ssh-secondary-button","data-ssh-dialog-close":!0,disabled:c||d,onClick:s,children:y("client.cancel")}),(0,J.jsx)("button",{className:"dsh-ssh-primary-button",disabled:c||d,children:c?y("client.saving"):y("ftp-profile-editor.saveConnection")})]})]})})}function gH({profiles:t,value:e,onChange:n}){le();let r=()=>{let o=t.find(a=>!e.includes(a.id));o!==void 0&&e.length<8&&n([...e,o.id])},s=(o,a)=>n(e.map((l,c)=>c===o?a:l)),i=(o,a)=>{let l=o+a;if(l<0||l>=e.length)return;let c=[...e];[c[o],c[l]]=[c[l],c[o]],n(c)};return(0,J.jsxs)("fieldset",{className:"dsh-ssh-jump-chain",children:[(0,J.jsx)("legend",{children:y("profile-editor.jumpChain")}),(0,J.jsx)("p",{children:y("profile-editor.connectionsAreEstablishedHopByHopTopToBottom")}),(0,J.jsx)("div",{children:e.map((o,a)=>(0,J.jsxs)("div",{className:"dsh-ssh-jump-row",children:[(0,J.jsx)("em",{children:a+1}),(0,J.jsxs)("select",{required:!0,value:o,onChange:l=>s(a,l.target.value),children:[(0,J.jsx)("option",{value:"",children:y("profile-editor.selectAnExistingConnection")}),t.filter(l=>l.id===o||!e.includes(l.id)).map(l=>(0,J.jsxs)("option",{value:l.id,children:[l.name," \xB7 ",l.host]},l.id))]}),(0,J.jsx)("button",{type:"button",className:"dsh-ssh-icon-button",disabled:a===0,"aria-label":y("profile-editor.moveJumpHostUp"),onClick:()=>i(a,-1),children:(0,J.jsx)(In.IconChevronUpOutline14,{size:14})}),(0,J.jsx)("button",{type:"button",className:"dsh-ssh-icon-button",disabled:a===e.length-1,"aria-label":y("profile-editor.moveJumpHostDown"),onClick:()=>i(a,1),children:(0,J.jsx)(In.IconChevronDownOutline14,{size:14})}),(0,J.jsx)("button",{type:"button",className:"dsh-ssh-icon-button is-danger","aria-label":y("profile-editor.removeJumpHost"),onClick:()=>n(e.filter((l,c)=>c!==a)),children:(0,J.jsx)(In.IconTrashOutline16,{size:15})})]},`${o}-${a}`))}),e.length===0&&(0,J.jsx)("p",{className:"dsh-ssh-jump-empty",children:y("profile-editor.addAtLeastOneJumpHost")}),(0,J.jsxs)("button",{type:"button",className:"dsh-ssh-secondary-button",disabled:e.length>=8||t.every(o=>e.includes(o.id)),onClick:r,children:[(0,J.jsx)(In.IconPlusOutline16,{size:15}),y("profile-editor.addJumpHost")]})]})}var De=require("react"),Zn=require("@deepseek-ai/dsh-client-ui-primitives");var Ln=require("react"),us=require("@deepseek-ai/dsh-client-ui-primitives");var X=require("react/jsx-runtime");function nA({profiles:t,vaultEntries:e,proxyEntries:n,onClose:r,onChanged:s}){le();let[i,o]=(0,Ln.useState)(),[a,l]=(0,Ln.useState)(),[c,h]=(0,Ln.useState)(),d=i!==void 0||a!==void 0,u=g=>{l(void 0),o(g),h(void 0)},f=()=>{l(void 0),o("new"),h(void 0)},p=g=>{o(void 0),l(g),h(void 0)},m=async g=>{h(void 0);try{await se(`/ftp-profiles/${encodeURIComponent(g.id)}`,{method:"DELETE"}),l(void 0),s()}catch(b){h(Me(b))}};return a!==void 0?(0,X.jsx)(bH,{profile:a,error:c,onBack:()=>l(void 0),onDelete:()=>m(a)},a.id):(0,X.jsx)(qe,{className:"dsh-ssh-ftp-manager-dialog",title:y("file-transfer-workspace.fileConnections"),subtitle:y("ftp-profile-editor.manageFtpAndFtpsSftpReusesExistingSshHosts"),onClose:r,children:(0,X.jsxs)("div",{className:`dsh-ssh-ftp-manager${d?" has-detail":""}`,children:[(0,X.jsxs)("aside",{className:"dsh-ssh-ftp-manager-list",children:[(0,X.jsxs)("header",{children:[(0,X.jsxs)("span",{children:[(0,X.jsx)("strong",{children:"FTP / FTPS"}),(0,X.jsxs)("small",{children:[t.length," ",y("client.connections")]})]}),(0,X.jsxs)("button",{type:"button",className:"dsh-ssh-primary-button",onClick:f,children:[(0,X.jsx)(us.IconPlusOutline16,{size:15}),y("ftp-profile-editor.new")]})]}),t.length===0?(0,X.jsxs)("div",{className:"dsh-ssh-ftp-list-empty",children:[(0,X.jsx)("span",{children:(0,X.jsx)(us.IconDataOutline16,{size:20})}),(0,X.jsx)("strong",{children:y("ftp-profile-editor.noStandaloneFileConnectionsYet")}),(0,X.jsx)("p",{children:y("ftp-profile-editor.sftpAppearsInTheFilePaneSConnectionList")}),(0,X.jsx)("button",{type:"button",className:"dsh-ssh-secondary-button",onClick:f,children:y("ftp-profile-editor.newFtpsConnection")})]}):(0,X.jsx)("div",{className:"dsh-ssh-ftp-profile-list",role:"list",children:t.map(g=>{let b=i!=="new"&&i?.id===g.id;return(0,X.jsxs)("article",{role:"listitem","data-ssh-interactive":"choice","aria-selected":b,className:b?"is-active":"",children:[(0,X.jsxs)("button",{type:"button",className:"dsh-ssh-ftp-profile-main",onClick:()=>u(g),children:[(0,X.jsx)("span",{className:`dsh-ssh-protocol-badge is-${g.protocol}`,children:yH(g.protocol)}),(0,X.jsxs)("span",{children:[(0,X.jsx)("strong",{title:g.name,children:g.name}),(0,X.jsxs)("small",{title:`${g.username}@${g.host}:${g.port}`,children:[g.username,"@",g.host,":",g.port]})]}),(0,X.jsx)("i",{className:g.authMode==="anonymous"||g.credential.configured?"is-ready":"is-missing",children:g.authMode==="anonymous"?y("ftp-profile-editor.anonymous"):g.credential.configured?y("client.available"):y("ftp-profile-editor.missingPassword")})]}),(0,X.jsx)("button",{type:"button",className:"dsh-ssh-icon-button is-danger","aria-label":y("client.delete2",[g.name]),onClick:()=>p(g),children:(0,X.jsx)(us.IconTrashOutline16,{size:15})})]},g.id)})})]}),(0,X.jsx)("main",{className:"dsh-ssh-ftp-manager-detail",children:i!==void 0?(0,X.jsx)(vH,{value:i==="new"?void 0:i,profiles:t,vaultEntries:e,proxyEntries:n,onBack:()=>o(void 0),onSaved:()=>{o(void 0),s()}},i==="new"?"new":i.id):(0,X.jsxs)("div",{className:"dsh-ssh-ftp-manager-overview",children:[(0,X.jsx)("span",{children:(0,X.jsx)(us.IconDataOutline16,{size:22})}),(0,X.jsx)("h3",{children:y("ftp-profile-editor.selectAConnectionToEdit")}),(0,X.jsx)("p",{children:y("ftp-profile-editor.theFilePaneCombinesFtpFtpsAndSftpFrom")}),(0,X.jsxs)("dl",{children:[(0,X.jsxs)("div",{children:[(0,X.jsx)("dt",{children:"FTPS"}),(0,X.jsx)("dd",{children:y("ftp-profile-editor.encryptsControlAndFileDataCertificatesStrictlyValidatedBy")})]}),(0,X.jsxs)("div",{children:[(0,X.jsx)("dt",{children:"FTP"}),(0,X.jsx)("dd",{children:y("ftp-profile-editor.compatibleWithLegacyServersButCredentialsAndFileContent")})]}),(0,X.jsxs)("div",{children:[(0,X.jsx)("dt",{children:"SFTP"}),(0,X.jsx)("dd",{children:y("ftp-profile-editor.managedBySshHostsNoNeedToConfigureIt")})]})]})]})})]})})}function bH({profile:t,error:e,onBack:n,onDelete:r}){le();let[s,i]=(0,Ln.useState)(!1);return(0,X.jsxs)(qe,{variant:"confirmation",dismissible:!s,title:y("client.delete2",[t.name]),subtitle:y("ftp-profile-editor.thisRemovesTheFtpFtpsConnectionAndItsSeparately"),onClose:()=>{s||n()},children:[(0,X.jsxs)("p",{className:"dsh-ssh-confirmation-target",children:[t.username,"@",t.host,":",t.port]}),e&&(0,X.jsx)("p",{className:"dsh-ssh-inline-error",role:"alert",children:e}),(0,X.jsxs)("div",{className:"dsh-ssh-dialog-actions",children:[(0,X.jsx)("button",{type:"button",className:"dsh-ssh-secondary-button",onClick:n,disabled:s,children:y("client.cancel")}),(0,X.jsx)("button",{type:"button",className:"dsh-ssh-danger-button",disabled:s,onClick:()=>{i(!0),r().finally(()=>i(!1))},children:s?y("file-entry-delete-dialog.deleting"):y("ftp-profile-editor.deleteConnection")})]})]})}function vH({value:t,profiles:e,vaultEntries:n,proxyEntries:r,onBack:s,onSaved:i}){let o=le(),a=n.filter(C=>C.authType==="password"),[l,c]=(0,Ln.useState)({authMode:t?.authMode??"password",name:t?.name??"",group:t?.group??"",protocol:t?.protocol??"ftps-explicit",host:t?.host??"",port:String(t?.port??21),username:t?.username??"",credentialId:t?.credentialId??"",password:"",proxyId:t?.proxy.type==="saved"?t.proxy.proxyId:"",initialPath:t?.initialPath??"/",connectTimeoutMs:String(t?.connectTimeoutMs??15e3),tlsServerName:t?.tlsServerName??"",tags:t?.tags.join(", ")??""}),[h,d]=(0,Ln.useState)(!1),[u,f]=(0,Ln.useState)(!1),[p,m]=(0,Ln.useState)(),[g,b]=(0,Ln.useState)(),v=()=>({profile:{authMode:l.authMode,name:l.name,...l.group.trim()?{group:l.group.trim()}:{},protocol:l.protocol,host:l.host,port:Number(l.port),username:l.authMode==="anonymous"?"anonymous":l.username,...l.authMode!=="anonymous"&&l.credentialId?{credentialId:l.credentialId}:{},proxy:l.proxyId?{type:"saved",proxyId:l.proxyId}:{type:"none"},initialPath:l.initialPath,connectTimeoutMs:Number(l.connectTimeoutMs),...l.tlsServerName.trim()?{tlsServerName:l.tlsServerName.trim()}:{},tags:l.tags.split(/[,,]/u).map(C=>C.trim()).filter(Boolean)},secrets:l.authMode==="anonymous"?{}:{password:l.password}}),w=async C=>{C.preventDefault(),d(!0),b(void 0),m(void 0);try{await se(t===void 0?"/ftp-profiles":`/ftp-profiles/${encodeURIComponent(t.id)}`,{method:t===void 0?"POST":"PUT",body:JSON.stringify(v())}),i()}catch(T){b(Me(T))}finally{d(!1)}},x=async()=>{f(!0),b(void 0),m(void 0);try{await se("/ftp-profiles/test-draft",{method:"POST",body:JSON.stringify({...v(),...t===void 0?{}:{profileId:t.id}})}),m(y("ftp-profile-editor.connectedInitialDirectoryIsReadable"))}catch(C){b(Me(C))}finally{f(!1)}},_=C=>c(T=>({...T,protocol:C,port:T.port==="21"||T.port==="990"?String(C==="ftps-implicit"?990:21):T.port})),k=(0,Ln.useMemo)(()=>e.flatMap(C=>C.group===void 0?[]:[C.group]),[e,o]),S=(0,Ln.useMemo)(()=>e.flatMap(C=>C.tags),[e,o]);return(0,X.jsxs)("form",{className:"dsh-ssh-ftp-editor-form",onSubmit:C=>{w(C)},children:[(0,X.jsxs)("header",{className:"dsh-ssh-ftp-editor-heading",children:[(0,X.jsxs)("button",{type:"button",className:"dsh-ssh-ftp-detail-back",onClick:s,children:[(0,X.jsx)(us.IconChevronLeftOutline14,{size:14}),y("file-transfer-workspace.backToConnectionList")]}),(0,X.jsxs)("span",{children:[(0,X.jsx)("strong",{children:t===void 0?y("ftp-profile-editor.newFileConnection"):t.name}),(0,X.jsx)("small",{children:t===void 0?y("ftp-profile-editor.enterServerAndAuthenticationDetails"):y("ftp-profile-editor.afterEditsTestBeforeSaving")})]})]}),(0,X.jsxs)("div",{className:"dsh-ssh-ftp-editor-scroll",children:[(0,X.jsxs)("section",{className:"dsh-ssh-ftp-editor-section",children:[(0,X.jsxs)("div",{className:"dsh-ssh-form-section-heading",children:[(0,X.jsx)("strong",{children:y("ftp-profile-editor.connectionType")}),(0,X.jsx)("small",{children:y("ftp-profile-editor.preferFtpsChooseFtpOnlyWhenTheServerLacks")})]}),(0,X.jsx)("div",{className:"dsh-ssh-ftp-protocol-options",role:"radiogroup","aria-label":y("ftp-profile-editor.connectionProtocol"),children:[["ftps-explicit","FTPS",y("ftp-profile-editor.explicitTlsRecommended")],["ftps-implicit","FTPS-I",y("ftp-profile-editor.implicitTls")],["ftp","FTP",y("ftp-profile-editor.unencrypted")]].map(C=>(0,X.jsxs)("button",{type:"button","data-ssh-interactive":"choice",role:"radio","aria-checked":l.protocol===C[0],className:l.protocol===C[0]?"is-active":"",onClick:()=>_(C[0]),children:[(0,X.jsx)("span",{className:`dsh-ssh-protocol-badge is-${C[0]}`,children:C[1]}),(0,X.jsxs)("span",{children:[(0,X.jsx)("strong",{children:C[1]}),(0,X.jsx)("small",{children:C[2]})]})]},C[0]))}),l.protocol==="ftp"&&(0,X.jsx)("p",{className:"dsh-ssh-form-warning",children:y("ftp-profile-editor.plainFtpSendsYourAccountPasswordAndFileContent")})]}),(0,X.jsxs)("section",{className:"dsh-ssh-ftp-editor-section",children:[(0,X.jsxs)("div",{className:"dsh-ssh-form-section-heading",children:[(0,X.jsx)("strong",{children:y("ftp-profile-editor.server")}),(0,X.jsx)("small",{children:y("ftp-profile-editor.theNameAppearsInTheConnectionListGroupsAnd")})]}),(0,X.jsxs)("div",{className:"dsh-ssh-form-grid",children:[(0,X.jsx)(ge,{label:y("ftp-profile-editor.connectionName"),children:(0,X.jsx)("input",{autoFocus:t===void 0,required:!0,maxLength:80,value:l.name,onChange:C=>c({...l,name:C.target.value})})}),(0,X.jsx)(ge,{label:y("ftp-profile-editor.groupOptional"),children:(0,X.jsx)(Co,{ariaLabel:y("ftp-profile-editor.ftpGroups"),maxLength:64,options:k,placeholder:y("ftp-profile-editor.selectAnExistingGroupOrEnterANewOne"),value:l.group,onChange:C=>c(T=>({...T,group:C}))})})]}),(0,X.jsxs)("div",{className:"dsh-ssh-form-grid is-host",children:[(0,X.jsx)(ge,{label:y("ftp-profile-editor.serverAddress"),children:(0,X.jsx)("input",{required:!0,maxLength:253,spellCheck:!1,value:l.host,onChange:C=>c({...l,host:C.target.value})})}),(0,X.jsx)(ge,{label:y("ftp-profile-editor.port"),children:(0,X.jsx)("input",{required:!0,type:"number",min:"1",max:"65535",value:l.port,onChange:C=>c({...l,port:C.target.value})})})]}),(0,X.jsx)(ge,{label:y("ftp-profile-editor.tagsOptional"),hint:y("ftp-profile-editor.pickExistingTagsOrTypeNewOnesSeparateMultiple"),children:(0,X.jsx)(Co,{ariaLabel:y("ftp-profile-editor.ftpTags"),multiple:!0,options:S,placeholder:y("ftp-profile-editor.selectOrEnterTags"),value:l.tags,onChange:C=>c(T=>({...T,tags:C}))})})]}),(0,X.jsxs)("section",{className:"dsh-ssh-ftp-editor-section",children:[(0,X.jsxs)("div",{className:"dsh-ssh-form-section-heading",children:[(0,X.jsx)("strong",{children:y("ftp-profile-editor.authentication")}),(0,X.jsx)("small",{children:y("ftp-profile-editor.thePasswordIsWrittenOnlyToTheDshCredential")})]}),(0,X.jsx)(ge,{label:y("ftp-profile-editor.signInMethod"),children:(0,X.jsxs)("select",{value:l.authMode,onChange:C=>{c({...l,authMode:C.target.value}),m(void 0)},children:[(0,X.jsx)("option",{value:"password",children:y("ftp-profile-editor.usernameAndPassword")}),(0,X.jsx)("option",{value:"anonymous",children:y("ftp-profile-editor.anonymous")})]})}),l.authMode==="anonymous"?(0,X.jsx)("p",{children:y("ftp-profile-editor.signInAsAnonymousWithoutEnteringCredentialsTheServer")}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)("div",{className:"dsh-ssh-form-grid",children:[(0,X.jsx)(ge,{label:y("client.username"),children:(0,X.jsx)("input",{required:!0,maxLength:128,autoComplete:"username",value:l.username,onChange:C=>c({...l,username:C.target.value})})}),(0,X.jsx)(ge,{label:y("ftp-profile-editor.credentialSource"),children:(0,X.jsxs)("select",{value:l.credentialId,onChange:C=>c({...l,credentialId:C.target.value}),children:[(0,X.jsx)("option",{value:"",children:y("ftp-profile-editor.saveThePasswordWithThisConnectionOnly")}),a.map(C=>(0,X.jsxs)("option",{value:C.id,children:[C.name," \xB7 ",C.username]},C.id))]})})]}),!l.credentialId&&(0,X.jsx)(ge,{label:y("client.password"),hint:t?.credential.configured&&t.credential.source==="profile"?y("client.savedLeaveBlankToKeepUnchanged"):y("ftp-profile-editor.notEchoedAfterSaving"),children:(0,X.jsx)("input",{required:t===void 0||t.credential.source!=="profile"||!t.credential.configured,type:"password",autoComplete:"new-password",value:l.password,onChange:C=>c({...l,password:C.target.value})})})]})]}),(0,X.jsxs)("section",{className:"dsh-ssh-ftp-editor-section",children:[(0,X.jsxs)("div",{className:"dsh-ssh-form-section-heading",children:[(0,X.jsx)("strong",{children:y("ftp-profile-editor.pathAndNetwork")}),(0,X.jsx)("small",{children:y("ftp-profile-editor.proxyReusesTheSshPluginSProxyLibraryControl")})]}),(0,X.jsxs)("div",{className:"dsh-ssh-form-grid",children:[(0,X.jsx)(ge,{label:y("ftp-profile-editor.initialDirectory"),children:(0,X.jsx)("input",{required:!0,maxLength:4096,spellCheck:!1,value:l.initialPath,onChange:C=>c({...l,initialPath:C.target.value})})}),(0,X.jsx)(ge,{label:y("ftp-profile-editor.connectionProxy"),children:(0,X.jsxs)("select",{value:l.proxyId,onChange:C=>c({...l,proxyId:C.target.value}),children:[(0,X.jsx)("option",{value:"",children:y("client.direct")}),r.map(C=>(0,X.jsxs)("option",{value:C.id,children:[C.name," \xB7 ",C.proxyType.toUpperCase()]},C.id))]})})]}),(0,X.jsxs)("details",{className:"dsh-ssh-form-advanced",children:[(0,X.jsx)("summary",{children:y("ftp-profile-editor.advancedConnectionSettings")}),(0,X.jsxs)("div",{className:"dsh-ssh-form-grid",children:[(0,X.jsx)(ge,{label:y("ftp-profile-editor.connectionTimeoutMs"),children:(0,X.jsx)("input",{required:!0,type:"number",min:"1000",max:"120000",step:"1000",value:l.connectTimeoutMs,onChange:C=>c({...l,connectTimeoutMs:C.target.value})})}),(0,X.jsx)(ge,{label:y("ftp-profile-editor.tlsServerName"),hint:y("ftp-profile-editor.fillInWhenTheCertificateNameDiffersFromThe"),children:(0,X.jsx)("input",{maxLength:253,spellCheck:!1,value:l.tlsServerName,onChange:C=>c({...l,tlsServerName:C.target.value})})})]})]})]}),p&&(0,X.jsx)("p",{className:"dsh-ssh-inline-success",role:"status",children:p}),g&&(0,X.jsx)("p",{className:"dsh-ssh-inline-error",role:"alert",children:g})]}),(0,X.jsxs)("footer",{className:"dsh-ssh-ftp-editor-actions",children:[(0,X.jsx)("button",{type:"button",className:"dsh-ssh-secondary-button",onClick:()=>{x()},disabled:u||h,children:u?y("ftp-profile-editor.testing"):y("client.testConnection")}),(0,X.jsx)("span",{}),(0,X.jsx)("button",{type:"button",className:"dsh-ssh-secondary-button",onClick:s,disabled:h||u,children:y("client.cancel")}),(0,X.jsx)("button",{type:"submit",className:"dsh-ssh-primary-button",disabled:h||u,children:h?y("client.saving"):y("ftp-profile-editor.saveConnection")})]})]})}function yH(t){return t==="ftp"?"FTP":t==="ftps-explicit"?"FTPS":"FTPS-I"}var wH=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}),rv=wH.compare;var xH=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"];function rA(t,e){let n=/^([a-z]{3})\s+(\d{1,2})\s+(?:(\d{4})|(\d{1,2}):(\d{2})(?::(\d{2}))?)$/i.exec(t?.trim()??"");if(!n)return 0;let r=xH.indexOf(n[1].toLowerCase()),s=Number(n[2]),i=Number(n[4]??0),o=Number(n[5]??0),a=Number(n[6]??0),l=Number(n[3]??new Date(e).getUTCFullYear());if(r<0||s<1||s>31||i>23||o>59||a>59)return 0;let c=Date.UTC(l,r,s,i,o,a);!n[3]&&c>e+2160*60*1e3&&(c=Date.UTC(--l,r,s,i,o,a));let h=new Date(c);return h.getUTCMonth()===r&&h.getUTCDate()===s?c:0}function sA(t,e,n){let r=n==="asc"?1:-1,s=Date.now();return t.map((i,o)=>({entry:i,index:o,value:e==="modifiedAt"?i.modifiedAt||rA(i.modifiedAtText,s):i.size})).sort((i,o)=>{let a=i.entry.kind==="directory"||i.entry.navigable===!0,l=o.entry.kind==="directory"||o.entry.navigable===!0;if(a!==l)return a?-1:1;let c=e==="name"?rv(i.entry.name,o.entry.name):i.value-o.value;if(c!==0)return c*r;let h=e==="name"?0:rv(i.entry.name,o.entry.name);return h!==0?h*r:i.index-o.index}).map(i=>i.entry)}var B=require("react/jsx-runtime"),lA="dsh-ssh:file-transfer:tabs:v3",sv=38,kH=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"});function cA({ftpProfiles:t,vaultEntries:e,proxyEntries:n,access:r,onProfilesChanged:s}){le();let i=Yi(),[o,a]=(0,De.useState)([]),[l,c]=(0,De.useState)([]),[h,d]=(0,De.useState)(()=>IH()),[u,f]=(0,De.useState)(()=>h[0]?.id??"transfer-1"),[p,m]=(0,De.useState)(!1),[g,b]=(0,De.useState)(!1),[v,w]=(0,De.useState)(),[x,_]=(0,De.useState)(),[k,S]=(0,De.useState)(),[C,T]=(0,De.useState)({}),E=(0,De.useRef)(new Map),M=(0,De.useCallback)(async()=>{try{let R=await Ev();a(R),d(A=>LH(A,R))}catch(R){S(Me(R))}},[]);(0,De.useEffect)(()=>{M()},[M,t]),(0,De.useEffect)(()=>{try{localStorage.setItem(lA,JSON.stringify(h))}catch{}},[h]),(0,De.useEffect)(()=>{let R=E.current,A=l.filter(V=>oA(V.state)&&R.has(V.id)&&!oA(R.get(V.id)));E.current=new Map(l.map(V=>[V.id,V.state])),A.length!==0&&T(V=>{let q={...V};for(let O of A){let Z=hu(O.request.destinationEndpointId,O.request.destinationDirectory);q[Z]=(q[Z]??0)+1}return q})},[l]),(0,De.useEffect)(()=>{let R=!1,A,V=async()=>{if(document.visibilityState==="hidden"){A=window.setTimeout(()=>{V()},1800);return}try{let q=await Dv();R||c(q)}catch{}R||(A=window.setTimeout(()=>{V()},800))};return V(),()=>{R=!0,A!==void 0&&clearTimeout(A)}},[]);let z=h.find(R=>R.id===u)??h[0],N=R=>d(A=>A.map(V=>V.id===z?.id?R(V):V)),$=()=>{let R=`transfer-${Date.now().toString(36)}`,A=ov(R,h.length+1);d(V=>[...V,A]),f(R)},F=R=>{if(h.length===1)return;let A=h.findIndex(q=>q.id===R),V=h.filter(q=>q.id!==R);d(V),u===R&&f(V[Math.max(0,A-1)].id)},j=R=>N(A=>({...A,panes:Array.from({length:R},(V,q)=>A.panes[q]??lv(`${A.id}-pane-${q}`))})),P=async(R,A,V,q,O)=>{let Z={endpointId:R,directory:A},H={endpointId:q,directory:O};if(!(La(Z,H)||!Oa(Z,V,H)))try{S(void 0);let L=await ga({sourceEndpointId:R,sourcePaths:V,destinationEndpointId:q,destinationDirectory:O,conflictPolicy:"fail"});c(Y=>[L,...Y.filter(G=>G.id!==L.id)])}catch(L){S(Me(L))}},I=async(R,A,V)=>{try{S(void 0);let q=await Nc(R,{paneId:A.id,endpointId:A.endpointId,directory:V});q.job!==void 0&&c(O=>[q.job,...O.filter(Z=>Z.id!==q.job.id)]),q.operation==="move"&&T(O=>{let Z={...O};for(let H of[hu(R.endpointId,R.directory),hu(A.endpointId,V)])Z[H]=(Z[H]??0)+1;return Z})}catch(q){S(Me(q))}};return(0,B.jsxs)("div",{className:"dsh-ssh-transfer-workspace",children:[(0,B.jsxs)("header",{className:"dsh-ssh-transfer-header",children:[(0,B.jsxs)("div",{children:[(0,B.jsx)("h1",{children:y("client.fileTransfer")}),(0,B.jsx)("p",{children:y("file-transfer-workspace.directStreamingTransfersBetweenFtpFtpsAndSftp")})]}),(0,B.jsxs)("div",{className:"dsh-ssh-transfer-actions",children:[(0,B.jsxs)("button",{type:"button","data-ssh-interactive":"control",className:"dsh-ssh-secondary-button",onClick:()=>b(!0),children:[y("file-transfer-workspace.sessionAccess")," ",r.value?.fileEndpointIds.length??0]}),(0,B.jsx)("button",{type:"button","data-ssh-interactive":"control",className:"dsh-ssh-secondary-button",onClick:()=>m(!0),children:y("file-transfer-workspace.ftpManager")})]})]}),k&&(0,B.jsxs)("div",{className:"dsh-ssh-banner is-error",role:"alert",children:[(0,B.jsx)("span",{children:k}),(0,B.jsx)("button",{type:"button",onClick:()=>S(void 0),"aria-label":y("client.close"),children:(0,B.jsx)(Zn.IconCloseOutline16,{size:16})})]}),(0,B.jsxs)("section",{ref:i.ref,onPointerMove:i.onPointerMove,onPointerLeave:i.onPointerLeave,className:"dsh-ssh-transfer-stage dsh-ssh-border-surface",children:[(0,B.jsxs)("div",{className:"dsh-ssh-transfer-tabbar",role:"tablist","aria-label":y("file-transfer-workspace.fileTransferTasksPage"),children:[(0,B.jsxs)("div",{className:"dsh-ssh-transfer-tabs",children:[h.map(R=>(0,B.jsxs)("span",{"data-ssh-interactive":"choice",className:`dsh-ssh-transfer-tab${R.id===z?.id?" is-active":""}`,children:[(0,B.jsx)("button",{type:"button",role:"tab","aria-selected":R.id===z?.id,onClick:()=>f(R.id),children:iA(R)}),h.length>1&&(0,B.jsx)("button",{type:"button",className:"is-close","aria-label":y("file-transfer-workspace.close",[iA(R)]),onClick:()=>F(R.id),children:(0,B.jsx)(Zn.IconCloseOutline16,{size:13})})]},R.id)),(0,B.jsx)("button",{type:"button","data-ssh-interactive":"control",className:"is-add","aria-label":y("file-transfer-workspace.newTransferTasksPage"),onClick:$,children:(0,B.jsx)(Zn.IconPlusOutline16,{size:15})})]}),(0,B.jsx)("div",{className:"dsh-ssh-pane-layout","aria-label":y("file-transfer-workspace.panes"),children:[1,2,3,4].map(R=>(0,B.jsxs)("button",{type:"button","data-ssh-interactive":"choice","aria-pressed":z?.panes.length===R,className:z?.panes.length===R?"is-active":"",onClick:()=>j(R),children:[R," ",y("file-transfer-workspace.panes2")]},R))})]}),o.length===0?(0,B.jsxs)("div",{className:"dsh-ssh-transfer-empty",children:[(0,B.jsx)(Zn.IconDataOutline16,{size:24}),(0,B.jsx)("strong",{children:y("file-transfer-workspace.noFileConnectionsAvailableYet")}),(0,B.jsx)("p",{children:y("file-transfer-workspace.createAnFtpFtpsConnectionOrAddAnSsh")}),(0,B.jsx)("button",{type:"button",className:"dsh-ssh-primary-button",onClick:()=>m(!0),children:y("file-transfer-workspace.newFtpConnection")})]}):z&&(0,B.jsx)("div",{className:`dsh-ssh-transfer-panes has-${z.panes.length}`,children:z.panes.map((R,A)=>{let V=z.panes.length>1?z.panes[(A+1)%z.panes.length]:void 0;return(0,B.jsx)(_H,{pane:R,endpoints:o,dragSource:x,refreshRevision:C[hu(R.endpointId,R.path)]??0,...V===void 0?{}:{destination:V},onManageConnections:()=>m(!0),onDragSourceChange:_,onChange:q=>N(O=>({...O,panes:O.panes.map(Z=>Z.id===R.id?{...Z,...q}:Z)})),onTransfer:(q,O)=>{P(R.endpointId,R.path,q,O.endpointId,O.path)},onExternalDrop:(q,O)=>{I(q,R,O)}},R.id)})}),(0,B.jsx)("div",{className:"dsh-ssh-transfer-queues",children:(0,B.jsx)(TH,{jobs:l,endpoints:o,onCancel:async R=>{try{await Mv(R),c(A=>A.map(V=>V.id===R?{...V,state:"cancelled"}:V))}catch(A){S(Me(A))}},onConflict:w})})]}),p&&(0,B.jsx)(nA,{profiles:t,vaultEntries:e,proxyEntries:n,onClose:()=>m(!1),onChanged:()=>{s(),M()}}),g&&(0,B.jsx)(AH,{endpoints:o,access:r,onClose:()=>b(!1)}),v&&(0,B.jsx)(EH,{job:v,onClose:()=>w(void 0),onRetry:async R=>{try{let A=await ga({...v.request,conflictPolicy:R});c(V=>[A,...V]),w(void 0)}catch(A){S(Me(A))}}})]})}function _H({pane:t,endpoints:e,destination:n,dragSource:r,refreshRevision:s,onChange:i,onTransfer:o,onExternalDrop:a,onDragSourceChange:l,onManageConnections:c}){let h=le(),[d,u]=(0,De.useState)(),f=(0,De.useRef)(null),[p,m]=(0,De.useState)(!1),g=(0,De.useRef)({endpointId:t.endpointId,path:t.path});g.current={endpointId:t.endpointId,path:t.path};let[b,v]=(0,De.useState)(),[w,x]=(0,De.useState)([]),[_,k]=(0,De.useState)(t.path),[S,C]=(0,De.useState)(!1),[T,E]=(0,De.useState)(0),[M,z]=(0,De.useState)({key:"name",direction:"asc"}),[N,$]=(0,De.useState)(!1),[F,j]=(0,De.useState)(),[P,I]=(0,De.useState)(),[R,A]=(0,De.useState)(),V=(0,De.useRef)(null),q=(0,De.useRef)(0),O=e.find(de=>de.id===t.endpointId),Z=(0,De.useMemo)(()=>sA(b?.entries??[],M.key,M.direction),[b?.entries,M,h]),H=Z.length>200,L=H?Math.max(0,Math.floor(T/sv)-8):0,Y=(0,De.useMemo)(()=>H?Z.slice(L,Math.min(Z.length,L+56)):Z,[Z,L,H,h]),G=(0,De.useCallback)(async(de=t.path)=>{if(O===void 0)return;let Le=++q.current;C(!0),A(void 0);try{let He=await Yl(t.id,O.id,de);if(Le!==q.current)return;v(He),k(He.path),x([]),E(0),V.current&&(V.current.scrollTop=0),i({endpointId:O.id,path:He.path})}catch(He){Le===q.current&&A(Me(He))}finally{Le===q.current&&C(!1)}},[O?.id,t.path]);(0,De.useEffect)(()=>{O!==void 0&&G(t.path)},[O?.id,s]),(0,De.useEffect)(()=>{r===void 0&&($(!1),j(void 0))},[r]);let oe=async de=>{if(!O)return;let Le=++q.current;C(!0),A(void 0);try{let He=await Av(t.id,O.id,de);if(Le!==q.current)return;ks(He)?await G(He.path):u(He)}catch(He){Le===q.current&&A(Me(He))}finally{Le===q.current&&C(!1)}};(0,De.useEffect)(()=>{u(void 0)},[O?.id]);let U=de=>{de.preventDefault(),oe(_)},fe=async de=>{if(!O||!b||p||de.length===0)return;let Le={endpointId:O.id,path:b.path};m(!0),A(void 0);let He=[];try{for(let at of de)try{await Qv(Le.endpointId,Le.path,at)}catch(er){He.push(`${at.name}: ${Me(er)}`)}g.current.endpointId===Le.endpointId&&g.current.path===Le.path&&(await G(Le.path),He.length&&A(He.join(`
|
|
6123
6123
|
`)))}finally{m(!1)}},Ee=de=>{z(Le=>Le.key===de?{key:de,direction:Le.direction==="asc"?"desc":"asc"}:{key:de,direction:"asc"}),E(0),V.current&&(V.current.scrollTop=0)},Pe=de=>{q.current+=1,i({endpointId:de.id,path:de.initialPath}),k(de.initialPath),v(void 0),A(void 0)},Ze=()=>{q.current+=1,i({endpointId:"",path:"/"}),v(void 0),x([]),A(void 0),C(!1)},ve=(de,Le)=>x(He=>Le?He.includes(de.path)?He.filter(at=>at!==de.path):[...He,de.path]:[de.path]),qt=async()=>{if(!(P===void 0||b===void 0||O===void 0))try{await ma({paneId:t.id,endpointId:O.id,directory:b.path,paths:P.map(de=>de.path)}),x([])}finally{await G(b.path)}},zn=de=>{de.preventDefault(),$(!1);let Le=fo(de.dataTransfer.getData(rr));l(void 0),!(Le===void 0||Le.paneId===t.id||La(Le,{endpointId:t.endpointId,directory:t.path}))&&a(Le,t.path)};return O===void 0?(0,B.jsxs)("section",{className:"dsh-ssh-file-pane is-connections",children:[(0,B.jsxs)("header",{children:[(0,B.jsxs)("span",{className:"dsh-ssh-pane-heading",children:[(0,B.jsx)("strong",{children:y("file-transfer-workspace.connectionList")}),(0,B.jsx)("small",{children:y("file-transfer-workspace.clickAConnectionToBrowseRemoteFiles")})]}),(0,B.jsx)("button",{type:"button","data-ssh-interactive":"control",className:"dsh-ssh-pane-manage-button",onClick:c,children:y("file-transfer-workspace.ftpManager")})]}),(0,B.jsx)("div",{className:"dsh-ssh-endpoint-list",children:e.map(de=>(0,B.jsxs)("button",{type:"button","data-ssh-interactive":"row",className:"dsh-ssh-endpoint-row",onClick:()=>Pe(de),children:[(0,B.jsx)("span",{className:`dsh-ssh-protocol-badge is-${de.protocol}`,children:av(de.protocol)}),(0,B.jsxs)("span",{children:[(0,B.jsx)("strong",{title:de.name,children:de.name}),(0,B.jsx)("small",{title:de.address,children:de.address})]}),(0,B.jsxs)("span",{children:[(0,B.jsx)("i",{className:`dsh-ssh-protocol-dot is-${de.protocol}`,"aria-hidden":"true"}),de.group??(de.kind==="sftp"?y("file-transfer-workspace.sshHosts"):y("file-transfer-workspace.fileConnections"))]})]},de.id))}),(0,B.jsxs)("footer",{children:[(0,B.jsxs)("span",{children:[e.length," ",y("file-transfer-workspace.availableConnections")]}),(0,B.jsx)("small",{children:y("file-transfer-workspace.sftpReusesSshHostConfiguration")})]})]}):(0,B.jsxs)("section",{className:`dsh-ssh-file-pane${N?" is-drop-target":""}`,onDragOver:de=>{de.dataTransfer.types.includes(rr)&&zH(r,t)?(de.preventDefault(),de.dataTransfer.dropEffect=r?.endpointId===t.endpointId?"move":"copy",j(void 0),$(!0)):N&&$(!1)},onDragLeave:de=>{de.currentTarget.contains(de.relatedTarget)||($(!1),j(void 0))},onDrop:zn,children:[(0,B.jsxs)("header",{children:[(0,B.jsx)("button",{type:"button",className:"dsh-ssh-pane-back","aria-label":y("file-transfer-workspace.backToConnectionList"),onClick:Ze,children:(0,B.jsx)(Zn.IconChevronLeftOutline14,{size:14})}),(0,B.jsxs)("span",{className:"dsh-ssh-pane-endpoint",children:[(0,B.jsx)("strong",{children:O.name}),(0,B.jsx)("small",{title:O.address,children:O.address})]}),(0,B.jsx)("span",{className:`dsh-ssh-protocol-badge is-${O.protocol}`,children:av(O.protocol)})]}),(0,B.jsxs)("form",{className:"dsh-ssh-file-pathbar",onSubmit:U,children:[(0,B.jsx)("button",{type:"button","aria-label":y("file-transfer-workspace.parentDirectory"),disabled:b?.parent===null||S,onClick:()=>{b?.parent&&G(b.parent)},children:(0,B.jsx)($H,{})}),(0,B.jsx)("button",{type:"button","aria-label":y("file-transfer-workspace.refreshDirectory"),disabled:S,onClick:()=>{G()},children:(0,B.jsx)(jH,{})}),(0,B.jsx)("input",{"aria-label":y("file-transfer-workspace.remotePath"),value:_,onChange:de=>k(de.target.value)}),(0,B.jsx)("button",{type:"submit",disabled:S,children:y("file-transfer-workspace.goTo")}),(0,B.jsx)("button",{type:"button",disabled:S||p||!b,"aria-label":y("local-transfer.uploadAction"),title:y("local-transfer.uploadAction"),onClick:()=>f.current?.click(),children:p?y("local-transfer.uploading"):y("browser-transfer.upload")}),(0,B.jsx)("input",{ref:f,type:"file",multiple:!0,hidden:!0,onChange:de=>{let Le=Array.from(de.currentTarget.files??[]);de.currentTarget.value="",fe(Le)}})]}),(0,B.jsxs)("div",{className:"dsh-ssh-file-table",role:"grid","aria-busy":S,children:[(0,B.jsxs)("div",{className:"dsh-ssh-file-table-head",role:"row",children:[(0,B.jsx)(iv,{label:y("client.name"),sortKey:"name",current:M,onSort:Ee}),(0,B.jsx)(iv,{label:y("file-transfer-workspace.size"),sortKey:"size",current:M,onSort:Ee}),(0,B.jsx)(iv,{label:y("file-transfer-workspace.modified"),sortKey:"modifiedAt",current:M,onSort:Ee}),(0,B.jsx)("span",{role:"columnheader","aria-label":y("file-transfer-workspace.actions")})]}),(0,B.jsx)("div",{ref:V,className:"dsh-ssh-file-table-body",onScroll:de=>{H&&E(de.currentTarget.scrollTop)},children:S&&!b?(0,B.jsx)("div",{className:"dsh-ssh-file-loading",children:y("file-transfer-workspace.readingDirectory")}):R?(0,B.jsxs)("div",{className:"dsh-ssh-file-error",children:[(0,B.jsx)("span",{children:R}),(0,B.jsx)("button",{type:"button",onClick:()=>{G()},children:y("commands-panel.retry")})]}):Z.length===0?(0,B.jsx)("div",{className:"dsh-ssh-table-empty",children:y("file-transfer-workspace.thisDirectoryIsEmpty")}):(0,B.jsx)("div",{className:H?"dsh-ssh-file-virtual-list":void 0,style:H?{height:`${Z.length*sv}px`}:void 0,children:Y.map((de,Le)=>(0,B.jsx)(CH,{entry:de,paneId:t.id,endpointId:O.id,sourceDirectory:b?.path??t.path,dragSource:r,dropTarget:F===de.path,selected:w.includes(de.path),selectedPaths:w,...H?{style:{position:"absolute",insetInline:0,transform:`translateY(${(L+Le)*sv}px)`}}:{},onDelete:()=>I([de]),onDirectoryTarget:He=>{$(!1),j(He)},onDropIntoDirectory:(He,at)=>{j(void 0),l(void 0),a(He,at)},onDragSourceChange:l,onSelect:He=>ve(de,He),onOpen:()=>{oe(de.path)}},de.path))})})]}),(0,B.jsxs)("footer",{children:[(0,B.jsx)("span",{children:w.length>0?y("file-transfer-workspace.selectedItems",[w.length]):y("file-transfer-workspace.items",[b?.entries.length??0])}),n!==void 0&&(0,B.jsx)("span",{className:"dsh-ssh-file-pane-actions",children:(0,B.jsxs)("button",{type:"button","data-ssh-interactive":"control",className:"dsh-ssh-transfer-to-button",disabled:w.length===0||!n.endpointId||S,onClick:()=>{n.endpointId&&o(w,n)},children:[y("file-transfer-workspace.sendToNextPane")," ",(0,B.jsx)("span",{"aria-hidden":"true",children:"\u2192"})]})})]}),N&&(0,B.jsxs)("div",{className:"dsh-ssh-file-drop-overlay",children:[(0,B.jsx)("strong",{children:r?.endpointId===t.endpointId?y("file-transfer-workspace.moveToThisDirectory"):y("file-transfer-workspace.copyToThisDirectory")}),(0,B.jsx)("span",{children:b?.path??t.path})]}),d!==void 0&&(0,B.jsx)(qe,{variant:"confirmation",className:"dsh-ssh-file-download-dialog",title:d.name,subtitle:d.path,onClose:()=>u(void 0),children:(0,B.jsx)("div",{className:"dsh-ssh-dialog-actions",children:(0,B.jsxs)("a",{onClick:fs,className:"dsh-ssh-secondary-button",href:gu(O.id,d.path),download:!0,children:[(0,B.jsx)(hA,{}),(0,B.jsx)("span",{children:y("file-transfer-workspace.download")})]})})}),P!==void 0&&(0,B.jsx)(rh,{locationName:O.name,locationKind:"remote",entries:P,onClose:()=>I(void 0),onDelete:qt})]})}function iv({label:t,sortKey:e,current:n,onSort:r}){le();let s=n.key===e;return(0,B.jsx)("span",{role:"columnheader","aria-sort":s?n.direction==="asc"?"ascending":"descending":"none",children:(0,B.jsxs)("button",{type:"button",onClick:()=>r(e),children:[t,(0,B.jsx)(SH,{active:s,direction:n.direction})]})})}function SH({active:t,direction:e}){return(0,B.jsx)("svg",{className:t?"is-active":"",viewBox:"0 0 12 12","aria-hidden":"true",children:(0,B.jsx)("path",{d:"m3.5 5 2.5 2.5L8.5 5",transform:e==="desc"?void 0:"rotate(180 6 6)"})})}function hA(){return(0,B.jsx)("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",children:(0,B.jsx)("path",{d:"M8 2v7m0 0 2.6-2.6M8 9 5.4 6.4M3 11.5v1.25h10V11.5"})})}function CH({entry:t,paneId:e,endpointId:n,sourceDirectory:r,dragSource:s,dropTarget:i,selected:o,selectedPaths:a,style:l,onSelect:c,onOpen:h,onDelete:d,onDirectoryTarget:u,onDropIntoDirectory:f,onDragSourceChange:p}){le();let m=ks(t),g=n.startsWith("ftp:")&&t.navigable===void 0&&(t.kind==="symlink"||t.kind==="other"),b=!0,v=m&&(s===void 0||Oa(s,s.paths,{endpointId:n,directory:t.path})),w=x=>{if(!m)return;x.preventDefault(),x.stopPropagation(),u(void 0);let _=fo(x.dataTransfer.getData(rr));_!==void 0&&Oa(_,_.paths,{endpointId:n,directory:t.path})&&f(_,t.path)};return(0,B.jsxs)("div",{role:"row","data-ssh-interactive":"row","data-ssh-context-row":!0,tabIndex:0,"aria-selected":o,"aria-label":`${t.name}${m?y("file-transfer-workspace.directoryClickToEnterAcceptsDragDrop"):g?y("file-transfer-workspace.clickToView"):""}`,draggable:t.kind==="file"||m,className:`dsh-ssh-file-row is-${m?"directory":t.kind}${o?" is-selected":""}${i?" is-drop-target":""}`,style:l,onClick:x=>{b&&!x.ctrlKey&&!x.metaKey&&!x.shiftKey?h():c(x.ctrlKey||x.metaKey)},onKeyDown:x=>{x.target===x.currentTarget&&(x.key==="Enter"&&b&&h(),x.key===" "&&(x.preventDefault(),c(x.ctrlKey||x.metaKey)))},onDragStart:x=>{let _=o?a:[t.path],k={paneId:e,endpointId:n,directory:r,paths:_};p(k),x.dataTransfer.effectAllowed="copyMove",x.dataTransfer.setData(rr,JSON.stringify(k))},onDragEnd:()=>p(void 0),onDragOver:x=>{x.dataTransfer.types.includes(rr)&&v&&(x.preventDefault(),x.stopPropagation(),x.dataTransfer.dropEffect=s?.endpointId===n?"move":"copy",u(t.path))},onDragLeave:x=>{i&&!x.currentTarget.contains(x.relatedTarget)&&u(void 0)},onDrop:w,children:[(0,B.jsxs)("span",{children:[(0,B.jsx)(VH,{directory:m}),(0,B.jsx)("i",{title:t.name,children:t.name})]}),(0,B.jsx)("span",{children:m?"\u2014":uA(t.size)}),(0,B.jsx)("span",{title:t.modifiedAt>0?new Date(t.modifiedAt).toLocaleString():t.modifiedAtText,children:t.modifiedAt>0?new Date(t.modifiedAt).toLocaleString():t.modifiedAtText||"\u2014"}),(0,B.jsxs)("span",{className:"dsh-ssh-file-row-actions dsh-ssh-context-action",children:[(0,B.jsx)("a",{className:"dsh-ssh-file-row-download",href:gu(n,t.path),download:m?`${t.name}.tar`:t.name,draggable:!1,"aria-label":y("file-transfer-workspace.downloadLocally",[t.name]),title:t.kind==="directory"?y("file-transfer-workspace.packageAndDownloadLocally",[t.name]):y("file-transfer-workspace.downloadLocally",[t.name]),onClick:fs,children:(0,B.jsx)(hA,{})}),(0,B.jsx)("button",{type:"button",className:"dsh-ssh-file-row-delete",draggable:!1,"aria-label":y("client.delete2",[t.name]),title:y("client.delete2",[t.name]),onClick:x=>{x.stopPropagation(),d()},children:(0,B.jsx)(Zn.IconTrashOutline16,{size:14})})]})]})}function TH({jobs:t,endpoints:e,onCancel:n,onConflict:r}){le();let s=vu(),i=t.filter(a=>a.state==="queued"||a.state==="scanning"||a.state==="transferring"),o=[...t.map(a=>({kind:"remote",job:a,active:i.includes(a)})),...s.map(a=>({kind:"browser",job:a,active:Nn(a)}))].sort((a,l)=>Number(l.active)-Number(a.active)||l.job.createdAt-a.job.createdAt);return(0,B.jsx)(yu,{activeCount:i.length+s.filter(Nn).length,count:o.length,children:o.length===0?(0,B.jsx)("p",{children:y("file-transfer-workspace.dragFromOnePaneToAnotherOrSelectFiles")}):o.map(a=>{if(a.kind==="browser")return(0,B.jsx)(wu,{job:a.job},"browser-"+a.job.id);let l=a.job,c=l.totalBytes>0?Math.min(100,l.transferredBytes/l.totalBytes*100):l.state==="completed"?100:0;return(0,B.jsxs)("article",{children:[(0,B.jsx)("span",{className:`dsh-ssh-transfer-state is-${l.state}`,"aria-hidden":"true"}),(0,B.jsxs)("span",{className:"dsh-ssh-transfer-job-copy",children:[(0,B.jsxs)("strong",{children:[dA(l.request.sourcePaths)," ",(0,B.jsx)("i",{children:"\u2192"})," ",OH(e,l.request.destinationEndpointId)]}),(0,B.jsx)("small",{children:l.error??NH(l,c)}),(0,B.jsx)("span",{className:"dsh-ssh-transfer-job-time",children:FH(l)}),(0,B.jsx)("span",{className:"dsh-ssh-transfer-progress",children:(0,B.jsx)("i",{style:{transform:`scaleX(${c/100})`}})})]}),l.state==="queued"||l.state==="scanning"||l.state==="transferring"?(0,B.jsx)("button",{type:"button",className:"dsh-ssh-icon-button","aria-label":y("file-transfer-workspace.cancelTransfer"),onClick:()=>{n(l.id)},children:(0,B.jsx)(Zn.IconCloseOutline16,{size:15})}):l.state==="failed"&&l.error?.includes("destination already contains")?(0,B.jsx)("button",{type:"button",className:"dsh-ssh-job-resolve",onClick:()=>r(l),children:y("file-transfer-workspace.handle")}):null]},l.id)})})}function EH({job:t,onClose:e,onRetry:n}){le();let[r,s]=(0,De.useState)("rename"),[i,o]=(0,De.useState)(!1);return(0,B.jsxs)(qe,{variant:"confirmation",className:"dsh-ssh-transfer-conflict-dialog",title:y("file-transfer-workspace.aFileWithTheSameNameExistsAtThe"),subtitle:y("file-transfer-workspace.chooseHowToHandleThisBatchOfTransfers"),onClose:e,children:[(0,B.jsxs)("div",{className:"dsh-ssh-transfer-conflict-copy",children:[(0,B.jsx)("strong",{children:dA(t.request.sourcePaths)}),(0,B.jsx)("span",{children:t.request.destinationDirectory})]}),(0,B.jsx)("div",{className:"dsh-ssh-conflict-options",children:[["rename",y("file-transfer-workspace.autoRename"),y("file-transfer-workspace.keepBothFilesAppendANumberToTheName")],["skip",y("file-transfer-workspace.skipFilesWithTheSameName"),y("file-transfer-workspace.continueTransferringTheRemainingItems")],["overwrite",y("file-transfer-workspace.overwriteTheTargetFiles"),y("file-transfer-workspace.replaceTheDestinationContentWithTheSourceContent")]].map(a=>(0,B.jsxs)("button",{type:"button","data-ssh-interactive":"choice","aria-pressed":r===a[0],className:r===a[0]?"is-active":"",onClick:()=>s(a[0]),children:[(0,B.jsx)("i",{"aria-hidden":"true"}),(0,B.jsxs)("span",{children:[(0,B.jsx)("strong",{children:a[1]}),(0,B.jsx)("small",{children:a[2]})]})]},a[0]))}),(0,B.jsxs)("div",{className:"dsh-ssh-dialog-actions",children:[(0,B.jsx)("button",{type:"button",className:"dsh-ssh-secondary-button","data-ssh-dialog-close":!0,onClick:e,children:y("client.cancel")}),(0,B.jsx)("button",{type:"button",className:"dsh-ssh-primary-button",disabled:i,onClick:()=>{o(!0),n(r).finally(()=>o(!1))},children:i?y("file-transfer-workspace.reQueuing"):y("file-transfer-workspace.continueTransfer")})]})]})}function AH({endpoints:t,access:e,onClose:n}){le();let r=e.value,s=t.filter(o=>r?.fileEndpointIds.includes(o.id)).length,i=o=>e.setFileEndpoints(r?.fileEndpointIds.includes(o)?r.fileEndpointIds.filter(a=>a!==o):[...r?.fileEndpointIds??[],o]);return(0,B.jsxs)(qe,{className:"dsh-ssh-file-access-dialog",title:y("file-transfer-workspace.sessionAccess2"),subtitle:y("file-transfer-workspace.manageTheRemoteFileConnectionsAvailableToThisSession"),onClose:n,children:[(0,B.jsxs)("div",{className:"dsh-ssh-file-access-body dsh-ssh-scroll-surface",children:[e.error&&(0,B.jsx)("p",{className:"dsh-ssh-inline-error",role:"alert",children:e.error}),(0,B.jsxs)("section",{className:"dsh-ssh-file-access-section","aria-labelledby":"dsh-ssh-file-access-connections",children:[(0,B.jsxs)("header",{children:[(0,B.jsxs)("span",{children:[(0,B.jsx)("strong",{id:"dsh-ssh-file-access-connections",children:y("file-transfer-workspace.fileConnections")}),(0,B.jsx)("small",{children:y("file-transfer-workspace.letTheCurrentSessionBrowseSelectedFtpFtpsOr")})]}),(0,B.jsxs)("i",{children:[s.toString().padStart(2,"0")," / ",t.length.toString().padStart(2,"0")]})]}),(0,B.jsx)("div",{className:"dsh-ssh-file-access-list",children:e.loading?(0,B.jsx)(DH,{}):t.length===0?(0,B.jsxs)("div",{className:"dsh-ssh-file-access-empty",children:[(0,B.jsx)("strong",{children:y("file-transfer-workspace.noConnectionsAvailable")}),(0,B.jsx)("small",{children:y("file-transfer-workspace.addAnFtpInFileTransferFirstOrAdd")})]}):t.map(o=>(0,B.jsx)(PH,{endpoint:o,enabled:r?.fileEndpointIds.includes(o.id)??!1,onToggle:()=>i(o.id)},o.id))})]}),(0,B.jsxs)("section",{className:"dsh-ssh-file-access-section is-options","aria-labelledby":"dsh-ssh-file-access-policy",children:[(0,B.jsx)("header",{children:(0,B.jsxs)("span",{children:[(0,B.jsx)("strong",{id:"dsh-ssh-file-access-policy",children:y("file-transfer-workspace.accessPolicy")}),(0,B.jsx)("small",{children:y("file-transfer-workspace.filePermissionsAreSeparateFromSshCommandAndTerminal")})]})}),(0,B.jsxs)("div",{className:"dsh-ssh-file-access-options",children:[(0,B.jsxs)("div",{className:"dsh-ssh-file-access-policy-row",children:[(0,B.jsxs)("span",{children:[(0,B.jsx)("strong",{children:y("file-transfer-workspace.fileOperationPermissions")}),(0,B.jsx)("small",{children:y("file-transfer-workspace.browseModeDoesNotExposeCrossEndpointTransferTools")})]}),(0,B.jsx)(MH,{value:r?.filePermission??"browse",onChange:e.setFilePermission})]}),(0,B.jsxs)("div",{className:"dsh-ssh-file-access-policy-row",children:[(0,B.jsxs)("span",{children:[(0,B.jsx)("strong",{children:y("file-transfer-workspace.confirmBeforeTransfer")}),(0,B.jsx)("small",{children:y("file-transfer-workspace.requireDshApprovalWhenTheAiStartsATransfer")})]}),(0,B.jsx)(RH,{checked:r?.requireFileApproval??!0,onChange:e.setRequireFileApproval})]}),["upload","download"].map(o=>{let a=(o==="upload"?r?.allowLocalUpload:r?.allowLocalDownload)===!0,l=o==="upload"?y("local-transfer.allowUpload"):y("local-transfer.allowDownload");return(0,B.jsxs)("div",{className:"dsh-ssh-file-access-policy-row",children:[(0,B.jsxs)("span",{children:[(0,B.jsx)("strong",{children:l}),(0,B.jsx)("small",{children:o==="upload"?y("local-transfer.uploadScope"):y("local-transfer.downloadScope")})]}),(0,B.jsxs)("button",{type:"button",className:`dsh-ssh-file-approval-switch${a?" is-active":""}`,role:"switch","aria-label":l,"aria-checked":a,disabled:e.loading||!r,onClick:()=>e.setLocalFileAccess(o,!a),children:[(0,B.jsx)("i",{"aria-hidden":"true",children:(0,B.jsx)("b",{})}),(0,B.jsx)("span",{children:a?y("file-transfer-workspace.authorized"):y("file-transfer-workspace.notAuthorized")})]})]},o)})]})]})]}),(0,B.jsxs)("footer",{className:"dsh-ssh-file-access-footer",children:[(0,B.jsxs)("span",{className:e.saving?"is-saving":"is-saved",children:[(0,B.jsx)("i",{"aria-hidden":"true"}),e.saving?y("file-transfer-workspace.savingChanges"):y("file-transfer-workspace.autosaves",[s>0?y("file-transfer-workspace.authorizedConnections",[s]):y("file-transfer-workspace.noAuthorizedConnections")])]}),(0,B.jsx)("button",{type:"button",className:"dsh-ssh-primary-button","data-ssh-dialog-close":!0,disabled:e.saving,onClick:n,children:e.saving?y("client.saving2"):y("file-transfer-workspace.done")})]})]})}function PH({endpoint:t,enabled:e,onToggle:n}){return le(),(0,B.jsxs)("button",{type:"button","data-ssh-interactive":"choice",className:`dsh-ssh-file-access-endpoint${e?" is-mounted":""}`,"aria-pressed":e,onClick:n,children:[(0,B.jsx)("span",{className:`dsh-ssh-protocol-badge is-${t.protocol}`,children:av(t.protocol)}),(0,B.jsxs)("span",{className:"dsh-ssh-file-access-endpoint-copy",children:[(0,B.jsx)("strong",{title:t.name,children:t.name}),(0,B.jsx)("small",{title:t.address,children:t.address})]}),(0,B.jsxs)("span",{className:"dsh-ssh-file-access-state",children:[(0,B.jsx)("i",{"aria-hidden":"true",children:(0,B.jsx)("b",{})}),(0,B.jsx)("em",{children:e?y("file-transfer-workspace.authorized"):y("file-transfer-workspace.notAuthorized")})]})]})}function DH(){return le(),(0,B.jsx)("div",{className:"dsh-ssh-file-access-skeleton","aria-label":y("file-transfer-workspace.readingSessionPermissions"),children:[0,1,2].map(t=>(0,B.jsxs)("span",{style:{"--ssh-skeleton-index":t},children:[(0,B.jsx)("i",{}),(0,B.jsxs)("b",{children:[(0,B.jsx)("i",{}),(0,B.jsx)("i",{})]}),(0,B.jsx)("em",{})]},t))})}function MH({value:t,onChange:e}){return le(),(0,B.jsx)("div",{className:"dsh-ssh-file-permission-picker",role:"radiogroup","aria-label":y("file-transfer-workspace.fileOperationPermissions"),children:[["browse",y("file-transfer-workspace.browseOnly")],["transfer",y("file-transfer-workspace.allowTransfer")]].map(([n,r])=>(0,B.jsx)("button",{type:"button","data-ssh-interactive":"choice",role:"radio","aria-checked":t===n,className:t===n?"is-active":"",onClick:()=>e(n),children:r},n))})}function RH({checked:t,onChange:e}){return le(),(0,B.jsxs)("button",{type:"button","data-ssh-interactive":"choice",role:"switch","aria-checked":t,className:`dsh-ssh-file-approval-switch${t?" is-active":""}`,onClick:()=>e(!t),children:[(0,B.jsx)("i",{"aria-hidden":"true",children:(0,B.jsx)("b",{})}),(0,B.jsx)("span",{children:t?y("file-transfer-workspace.confirmationRequired"):y("file-transfer-workspace.runDirectly")})]})}function IH(){try{let t=localStorage.getItem(lA),e=JSON.parse(t??localStorage.getItem("dsh-ssh:file-transfer:tabs:v2")??"[]");if(!Array.isArray(e))return[ov("transfer-1",1)];let n=e.slice(0,8).flatMap(r=>{if(typeof r!="object"||r===null)return[];let s=r;if(typeof s.id!="string"||!/^[a-zA-Z0-9_-]{1,100}$/.test(s.id)||typeof s.name!="string"||!Array.isArray(s.panes))return[];let i=s.panes.slice(0,4).flatMap(o=>{if(typeof o!="object"||o===null)return[];let a=o;return typeof a.id=="string"&&/^[a-zA-Z0-9_-]{1,100}$/.test(a.id)&&typeof a.endpointId=="string"&&typeof a.path=="string"?[{id:a.id,endpointId:"",path:"/"}]:[]});return i.length>=1?[{id:s.id,name:s.name.slice(0,40),panes:t===null?i.slice(0,1):i}]:[]});if(n.length>0)return n}catch{}return[ov("transfer-1",1)]}function ov(t,e){return{id:t,name:`\u4EFB\u52A1 ${e}`,panes:[lv(`${t}-a`)]}}function iA(t){let e=/^任务 (\d+)$/.exec(t.name)?.[1];return e===void 0?t.name:y("file-transfer-workspace.tasks",[e])}function lv(t){return{id:t,endpointId:"",path:"/"}}function LH(t,e){return t.map(n=>({...n,panes:n.panes.map(r=>!r.endpointId||e.some(s=>s.id===r.endpointId)?r:lv(r.id))}))}function OH(t,e){return t.find(n=>n.id===e)?.name??e}function dA(t){let e=t[0]?.replaceAll("\\","/").split("/").filter(Boolean).at(-1)??y("file-transfer-workspace.files");return t.length>1?y("file-transfer-workspace.andMore",[e,t.length]):e}function av(t){return t==="sftp"?"SFTP":t==="ftp"?"FTP":t==="ftps-explicit"?"FTPS":"FTPS-I"}function hu(t,e){return JSON.stringify([t,e.replaceAll("\\","/").replace(/\/+$/,"")||"/"])}function zH(t,e){return t===void 0||t.paneId!==e.id&&!La(t,{endpointId:e.endpointId,directory:e.path})}function oA(t){return t==="completed"||t==="failed"||t==="cancelled"}function uA(t){return t<1024?`${t} B`:t<1024**2?`${(t/1024).toFixed(1)} KB`:t<1024**3?`${(t/1024**2).toFixed(1)} MB`:`${(t/1024**3).toFixed(2)} GB`}function NH(t,e){if(t.state==="queued")return y("file-transfer-workspace.waitingToTransfer");if(t.state==="scanning")return y("file-transfer-workspace.scanningDirectories");if(t.state==="transferring"){let n=Math.max(1,(Date.now()-(t.startedAt??Date.now()))/1e3),r=t.transferredBytes/n,s=r>0?Math.max(0,(t.totalBytes-t.transferredBytes)/r):0;return`${e.toFixed(0)}% \xB7 ${uA(r)}/s${s>1?y("file-transfer-workspace.expirySuffix",[HH(s)]):""}`}return t.state==="completed"?y("file-transfer-workspace.completedFiles",[t.completedFiles,t.skippedFiles?y("file-transfer-workspace.skipped",[t.skippedFiles]):""]):t.state==="cancelled"?y("file-transfer-workspace.cancelled"):y("file-transfer-workspace.transferFailed")}function FH(t){if(t.startedAt===void 0)return y("file-transfer-workspace.created",[aA(t.createdAt)]);let e=t.completedAt??Date.now(),n=BH(Math.max(0,e-t.startedAt));return t.completedAt===void 0?y("file-transfer-workspace.executed",[n]):y("file-transfer-workspace.tookCompleted",[n,aA(t.completedAt)])}function aA(t){return kH.format(t)}function BH(t){let e=Math.max(0,Math.floor(t/1e3));if(e<60)return y("file-transfer-workspace.seconds",[e]);let n=Math.floor(e/60);return n<60?y("file-transfer-workspace.minutesSeconds",[n,String(e%60).padStart(2,"0")]):y("file-transfer-workspace.hoursMinutes",[Math.floor(n/60),String(n%60).padStart(2,"0")])}function HH(t){if(t<60)return y("file-transfer-workspace.seconds",[Math.ceil(t)]);let e=Math.ceil(t/60);return e<60?y("file-transfer-workspace.minutes",[e]):y("file-transfer-workspace.hMin",[Math.floor(e/60),e%60])}function $H(){return(0,B.jsx)("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:(0,B.jsx)("path",{d:"M8 12V4m0 0L4.8 7.2M8 4l3.2 3.2"})})}function jH(){return(0,B.jsx)("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:(0,B.jsx)("path",{d:"M12.2 5.2A5 5 0 1 0 13 9M12.2 5.2V2.5m0 2.7H9.5"})})}function VH({directory:t}){return(0,B.jsx)("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:t?(0,B.jsx)("path",{d:"M2 4.3h4l1.2 1.4H14v6.8H2z"}):(0,B.jsx)("path",{d:"M3.2 2h6l3.6 3.6V14H3.2zm6 0v3.6h3.6"})})}var pA=`.dsh-ssh-transfer-workspace {
|
|
6124
6124
|
display: flex;
|
|
6125
6125
|
width: 100%;
|