auto-coder-web 0.1.4__py3-none-any.whl → 0.1.6__py3-none-any.whl
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.
- auto_coder_web/version.py +1 -1
- auto_coder_web/web/asset-manifest.json +6 -6
- auto_coder_web/web/index.html +1 -1
- auto_coder_web/web/static/css/main.d3950267.css +6 -0
- auto_coder_web/web/static/css/main.d3950267.css.map +1 -0
- auto_coder_web/web/static/js/main.17ff65df.js +3 -0
- auto_coder_web/web/static/js/main.17ff65df.js.LICENSE.txt +121 -0
- auto_coder_web/web/static/js/main.17ff65df.js.map +1 -0
- auto_coder_web/web/static/js/main.80a0dc24.js +3 -0
- auto_coder_web/web/static/js/main.80a0dc24.js.LICENSE.txt +121 -0
- auto_coder_web/web/static/js/main.80a0dc24.js.map +1 -0
- {auto_coder_web-0.1.4.dist-info → auto_coder_web-0.1.6.dist-info}/METADATA +1 -1
- {auto_coder_web-0.1.4.dist-info → auto_coder_web-0.1.6.dist-info}/RECORD +16 -8
- {auto_coder_web-0.1.4.dist-info → auto_coder_web-0.1.6.dist-info}/WHEEL +0 -0
- {auto_coder_web-0.1.4.dist-info → auto_coder_web-0.1.6.dist-info}/entry_points.txt +0 -0
- {auto_coder_web-0.1.4.dist-info → auto_coder_web-0.1.6.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,3 @@
|
|
1
|
+
/*! For license information please see main.17ff65df.js.LICENSE.txt */
|
2
|
+
(()=>{var e={77:e=>{var t;self,t=()=>(()=>{"use strict";var e={};return(()=>{var t=e;Object.defineProperty(t,"__esModule",{value:!0}),t.FitAddon=void 0,t.FitAddon=class{activate(e){this._terminal=e}dispose(){}fit(){const e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;const t=this._terminal._core;this._terminal.rows===e.rows&&this._terminal.cols===e.cols||(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal)return;if(!this._terminal.element||!this._terminal.element.parentElement)return;const e=this._terminal._core,t=e._renderService.dimensions;if(0===t.css.cell.width||0===t.css.cell.height)return;const n=0===this._terminal.options.scrollback?0:e.viewport.scrollBarWidth,r=window.getComputedStyle(this._terminal.element.parentElement),i=parseInt(r.getPropertyValue("height")),o=Math.max(0,parseInt(r.getPropertyValue("width"))),a=window.getComputedStyle(this._terminal.element),s=i-(parseInt(a.getPropertyValue("padding-top"))+parseInt(a.getPropertyValue("padding-bottom"))),l=o-(parseInt(a.getPropertyValue("padding-right"))+parseInt(a.getPropertyValue("padding-left")))-n;return{cols:Math.max(2,Math.floor(l/t.css.cell.width)),rows:Math.max(1,Math.floor(s/t.css.cell.height))}}}})(),e})(),e.exports=t()},585:e=>{var t;self,t=()=>(()=>{"use strict";var e={345:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.runAndSubscribe=t.forwardEvent=t.EventEmitter=void 0,t.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=e=>(this._listeners.push(e),{dispose:()=>{if(!this._disposed)for(let t=0;t<this._listeners.length;t++)if(this._listeners[t]===e)return void this._listeners.splice(t,1)}})),this._event}fire(e,t){const n=[];for(let r=0;r<this._listeners.length;r++)n.push(this._listeners[r]);for(let r=0;r<n.length;r++)n[r].call(void 0,e,t)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},t.forwardEvent=function(e,t){return e((e=>t.fire(e)))},t.runAndSubscribe=function(e,t){return t(void 0),e((e=>t(e)))}},859:(e,t)=>{function n(e){for(const t of e)t.dispose();e.length=0}Object.defineProperty(t,"__esModule",{value:!0}),t.getDisposeArrayDisposable=t.disposeArray=t.toDisposable=t.MutableDisposable=t.Disposable=void 0,t.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const e of this._disposables)e.dispose();this._disposables.length=0}register(e){return this._disposables.push(e),e}unregister(e){const t=this._disposables.indexOf(e);-1!==t&&this._disposables.splice(t,1)}},t.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,this._value?.dispose(),this._value=void 0}},t.toDisposable=function(e){return{dispose:e}},t.disposeArray=n,t.getDisposeArrayDisposable=function(e){return{dispose:()=>n(e)}}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}var r={};return(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.SearchAddon=void 0;const t=n(345),i=n(859),o=" ~!@#$%^&*()+`-=[]{}|\\;:\"',./<>?";class a extends i.Disposable{constructor(e){super(),this._highlightedLines=new Set,this._highlightDecorations=[],this._selectedDecoration=this.register(new i.MutableDisposable),this._linesCacheTimeoutId=0,this._linesCacheDisposables=new i.MutableDisposable,this._onDidChangeResults=this.register(new t.EventEmitter),this.onDidChangeResults=this._onDidChangeResults.event,this._highlightLimit=e?.highlightLimit??1e3}activate(e){this._terminal=e,this.register(this._terminal.onWriteParsed((()=>this._updateMatches()))),this.register(this._terminal.onResize((()=>this._updateMatches()))),this.register((0,i.toDisposable)((()=>this.clearDecorations())))}_updateMatches(){this._highlightTimeout&&window.clearTimeout(this._highlightTimeout),this._cachedSearchTerm&&this._lastSearchOptions?.decorations&&(this._highlightTimeout=setTimeout((()=>{const e=this._cachedSearchTerm;this._cachedSearchTerm=void 0,this.findPrevious(e,{...this._lastSearchOptions,incremental:!0,noScroll:!0})}),200))}clearDecorations(e){this._selectedDecoration.clear(),(0,i.disposeArray)(this._highlightDecorations),this._highlightDecorations=[],this._highlightedLines.clear(),e||(this._cachedSearchTerm=void 0)}clearActiveDecoration(){this._selectedDecoration.clear()}findNext(e,t){if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");const n=!this._lastSearchOptions||this._didOptionsChange(this._lastSearchOptions,t);this._lastSearchOptions=t,t?.decorations&&(void 0===this._cachedSearchTerm||e!==this._cachedSearchTerm||n)&&this._highlightAllMatches(e,t);const r=this._findNextAndSelect(e,t);return this._fireResults(t),this._cachedSearchTerm=e,r}_highlightAllMatches(e,t){if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");if(!e||0===e.length)return void this.clearDecorations();t=t||{},this.clearDecorations(!0);const n=[];let r,i=this._find(e,0,0,t);for(;i&&(r?.row!==i.row||r?.col!==i.col)&&!(n.length>=this._highlightLimit);)r=i,n.push(r),i=this._find(e,r.col+r.term.length>=this._terminal.cols?r.row+1:r.row,r.col+r.term.length>=this._terminal.cols?0:r.col+1,t);for(const o of n){const e=this._createResultDecoration(o,t.decorations);e&&(this._highlightedLines.add(e.marker.line),this._highlightDecorations.push({decoration:e,match:o,dispose(){e.dispose()}}))}}_find(e,t,n,r){if(!this._terminal||!e||0===e.length)return this._terminal?.clearSelection(),void this.clearDecorations();if(n>this._terminal.cols)throw new Error(`Invalid col: ${n} to search in terminal of ${this._terminal.cols} cols`);let i;this._initLinesCache();const o={startRow:t,startCol:n};if(i=this._findInLine(e,o,r),!i)for(let a=t+1;a<this._terminal.buffer.active.baseY+this._terminal.rows&&(o.startRow=a,o.startCol=0,i=this._findInLine(e,o,r),!i);a++);return i}_findNextAndSelect(e,t){if(!this._terminal||!e||0===e.length)return this._terminal?.clearSelection(),this.clearDecorations(),!1;const n=this._terminal.getSelectionPosition();this._terminal.clearSelection();let r=0,i=0;n&&(this._cachedSearchTerm===e?(r=n.end.x,i=n.end.y):(r=n.start.x,i=n.start.y)),this._initLinesCache();const o={startRow:i,startCol:r};let a=this._findInLine(e,o,t);if(!a)for(let s=i+1;s<this._terminal.buffer.active.baseY+this._terminal.rows&&(o.startRow=s,o.startCol=0,a=this._findInLine(e,o,t),!a);s++);if(!a&&0!==i)for(let s=0;s<i&&(o.startRow=s,o.startCol=0,a=this._findInLine(e,o,t),!a);s++);return!a&&n&&(o.startRow=n.start.y,o.startCol=0,a=this._findInLine(e,o,t)),this._selectResult(a,t?.decorations,t?.noScroll)}findPrevious(e,t){if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");const n=!this._lastSearchOptions||this._didOptionsChange(this._lastSearchOptions,t);this._lastSearchOptions=t,t?.decorations&&(void 0===this._cachedSearchTerm||e!==this._cachedSearchTerm||n)&&this._highlightAllMatches(e,t);const r=this._findPreviousAndSelect(e,t);return this._fireResults(t),this._cachedSearchTerm=e,r}_didOptionsChange(e,t){return!!t&&(e.caseSensitive!==t.caseSensitive||e.regex!==t.regex||e.wholeWord!==t.wholeWord)}_fireResults(e){if(e?.decorations){let e=-1;if(this._selectedDecoration.value){const t=this._selectedDecoration.value.match;for(let n=0;n<this._highlightDecorations.length;n++){const r=this._highlightDecorations[n].match;if(r.row===t.row&&r.col===t.col&&r.size===t.size){e=n;break}}}this._onDidChangeResults.fire({resultIndex:e,resultCount:this._highlightDecorations.length})}}_findPreviousAndSelect(e,t){if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");if(!this._terminal||!e||0===e.length)return this._terminal?.clearSelection(),this.clearDecorations(),!1;const n=this._terminal.getSelectionPosition();this._terminal.clearSelection();let r=this._terminal.buffer.active.baseY+this._terminal.rows-1,i=this._terminal.cols;const o=!0;this._initLinesCache();const a={startRow:r,startCol:i};let s;if(n&&(a.startRow=r=n.start.y,a.startCol=i=n.start.x,this._cachedSearchTerm!==e&&(s=this._findInLine(e,a,t,!1),s||(a.startRow=r=n.end.y,a.startCol=i=n.end.x))),s||(s=this._findInLine(e,a,t,o)),!s){a.startCol=Math.max(a.startCol,this._terminal.cols);for(let n=r-1;n>=0&&(a.startRow=n,s=this._findInLine(e,a,t,o),!s);n--);}if(!s&&r!==this._terminal.buffer.active.baseY+this._terminal.rows-1)for(let l=this._terminal.buffer.active.baseY+this._terminal.rows-1;l>=r&&(a.startRow=l,s=this._findInLine(e,a,t,o),!s);l--);return this._selectResult(s,t?.decorations,t?.noScroll)}_initLinesCache(){const e=this._terminal;this._linesCache||(this._linesCache=new Array(e.buffer.active.length),this._linesCacheDisposables.value=(0,i.getDisposeArrayDisposable)([e.onLineFeed((()=>this._destroyLinesCache())),e.onCursorMove((()=>this._destroyLinesCache())),e.onResize((()=>this._destroyLinesCache()))])),window.clearTimeout(this._linesCacheTimeoutId),this._linesCacheTimeoutId=window.setTimeout((()=>this._destroyLinesCache()),15e3)}_destroyLinesCache(){this._linesCache=void 0,this._linesCacheDisposables.clear(),this._linesCacheTimeoutId&&(window.clearTimeout(this._linesCacheTimeoutId),this._linesCacheTimeoutId=0)}_isWholeWord(e,t,n){return(0===e||o.includes(t[e-1]))&&(e+n.length===t.length||o.includes(t[e+n.length]))}_findInLine(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=this._terminal,o=t.startRow,a=t.startCol,s=i.buffer.active.getLine(o);if(s?.isWrapped)return r?void(t.startCol+=i.cols):(t.startRow--,t.startCol+=i.cols,this._findInLine(e,t,n));let l=this._linesCache?.[o];l||(l=this._translateBufferLineToStringWithWrap(o,!0),this._linesCache&&(this._linesCache[o]=l));const[c,u]=l,d=this._bufferColsToStringOffset(o,a),h=n.caseSensitive?e:e.toLowerCase(),f=n.caseSensitive?c:c.toLowerCase();let p=-1;if(n.regex){const t=RegExp(h,"g");let n;if(r)for(;n=t.exec(f.slice(0,d));)p=t.lastIndex-n[0].length,e=n[0],t.lastIndex-=e.length-1;else n=t.exec(f.slice(d)),n&&n[0].length>0&&(p=d+(t.lastIndex-n[0].length),e=n[0])}else r?d-h.length>=0&&(p=f.lastIndexOf(h,d-h.length)):p=f.indexOf(h,d);if(p>=0){if(n.wholeWord&&!this._isWholeWord(p,f,e))return;let t=0;for(;t<u.length-1&&p>=u[t+1];)t++;let r=t;for(;r<u.length-1&&p+e.length>=u[r+1];)r++;const a=p-u[t],s=p+e.length-u[r],l=this._stringLengthToBufferSize(o+t,a);return{term:e,col:l,row:o+t,size:this._stringLengthToBufferSize(o+r,s)-l+i.cols*(r-t)}}}_stringLengthToBufferSize(e,t){const n=this._terminal.buffer.active.getLine(e);if(!n)return 0;for(let r=0;r<t;r++){const e=n.getCell(r);if(!e)break;const i=e.getChars();i.length>1&&(t-=i.length-1);const o=n.getCell(r+1);o&&0===o.getWidth()&&t++}return t}_bufferColsToStringOffset(e,t){const n=this._terminal;let r=e,i=0,o=n.buffer.active.getLine(r);for(;t>0&&o;){for(let e=0;e<t&&e<n.cols;e++){const t=o.getCell(e);if(!t)break;t.getWidth()&&(i+=0===t.getCode()?1:t.getChars().length)}if(r++,o=n.buffer.active.getLine(r),o&&!o.isWrapped)break;t-=n.cols}return i}_translateBufferLineToStringWithWrap(e,t){const n=this._terminal,r=[],i=[0];let o=n.buffer.active.getLine(e);for(;o;){const a=n.buffer.active.getLine(e+1),s=!!a&&a.isWrapped;let l=o.translateToString(!s&&t);if(s&&a){const e=o.getCell(o.length-1);e&&0===e.getCode()&&1===e.getWidth()&&2===a.getCell(0)?.getWidth()&&(l=l.slice(0,-1))}if(r.push(l),!s)break;i.push(i[i.length-1]+l.length),e++,o=a}return[r.join(""),i]}_selectResult(e,t,n){const r=this._terminal;if(this._selectedDecoration.clear(),!e)return r.clearSelection(),!1;if(r.select(e.col,e.row,e.size),t){const n=r.registerMarker(-r.buffer.active.baseY-r.buffer.active.cursorY+e.row);if(n){const o=r.registerDecoration({marker:n,x:e.col,width:e.size,backgroundColor:t.activeMatchBackground,layer:"top",overviewRulerOptions:{color:t.activeMatchColorOverviewRuler}});if(o){const r=[];r.push(n),r.push(o.onRender((e=>this._applyStyles(e,t.activeMatchBorder,!0)))),r.push(o.onDispose((()=>(0,i.disposeArray)(r)))),this._selectedDecoration.value={decoration:o,match:e,dispose(){o.dispose()}}}}}if(!n&&(e.row>=r.buffer.active.viewportY+r.rows||e.row<r.buffer.active.viewportY)){let t=e.row-r.buffer.active.viewportY;t-=Math.floor(r.rows/2),r.scrollLines(t)}return!0}_applyStyles(e,t,n){e.classList.contains("xterm-find-result-decoration")||(e.classList.add("xterm-find-result-decoration"),t&&(e.style.outline=`1px solid ${t}`)),n&&e.classList.add("xterm-find-active-result-decoration")}_createResultDecoration(e,t){const n=this._terminal,r=n.registerMarker(-n.buffer.active.baseY-n.buffer.active.cursorY+e.row);if(!r)return;const o=n.registerDecoration({marker:r,x:e.col,width:e.size,backgroundColor:t.matchBackground,overviewRulerOptions:this._highlightedLines.has(r.line)?void 0:{color:t.matchOverviewRuler,position:"center"}});if(o){const e=[];e.push(r),e.push(o.onRender((e=>this._applyStyles(e,t.matchBorder,!1)))),e.push(o.onDispose((()=>(0,i.disposeArray)(e))))}return o}}e.SearchAddon=a})(),r})(),e.exports=t()},933:e=>{var t;self,t=()=>(()=>{"use strict";var e={6:(e,t)=>{function n(e){try{const t=new URL(e),n=t.password&&t.username?`${t.protocol}//${t.username}:${t.password}@${t.host}`:t.username?`${t.protocol}//${t.username}@${t.host}`:`${t.protocol}//${t.host}`;return e.toLocaleLowerCase().startsWith(n.toLocaleLowerCase())}catch(e){return!1}}Object.defineProperty(t,"__esModule",{value:!0}),t.LinkComputer=t.WebLinkProvider=void 0,t.WebLinkProvider=class{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};this._terminal=e,this._regex=t,this._handler=n,this._options=r}provideLinks(e,t){const n=r.computeLink(e,this._regex,this._terminal,this._handler);t(this._addCallbacks(n))}_addCallbacks(e){return e.map((e=>(e.leave=this._options.leave,e.hover=(t,n)=>{if(this._options.hover){const{range:r}=e;this._options.hover(t,n,r)}},e)))}};class r{static computeLink(e,t,i,o){const a=new RegExp(t.source,(t.flags||"")+"g"),[s,l]=r._getWindowedLineStrings(e-1,i),c=s.join("");let u;const d=[];for(;u=a.exec(c);){const e=u[0];if(!n(e))continue;const[t,a]=r._mapStrIdx(i,l,0,u.index),[s,c]=r._mapStrIdx(i,t,a,e.length);if(-1===t||-1===a||-1===s||-1===c)continue;const h={start:{x:a+1,y:t+1},end:{x:c,y:s+1}};d.push({range:h,text:e,activate:o})}return d}static _getWindowedLineStrings(e,t){let n,r=e,i=e,o=0,a="";const s=[];if(n=t.buffer.active.getLine(e)){const e=n.translateToString(!0);if(n.isWrapped&&" "!==e[0]){for(o=0;(n=t.buffer.active.getLine(--r))&&o<2048&&(a=n.translateToString(!0),o+=a.length,s.push(a),n.isWrapped&&-1===a.indexOf(" ")););s.reverse()}for(s.push(e),o=0;(n=t.buffer.active.getLine(++i))&&n.isWrapped&&o<2048&&(a=n.translateToString(!0),o+=a.length,s.push(a),-1===a.indexOf(" ")););}return[s,r]}static _mapStrIdx(e,t,n,r){const i=e.buffer.active,o=i.getNullCell();let a=n;for(;r;){const e=i.getLine(t);if(!e)return[-1,-1];for(let n=a;n<e.length;++n){e.getCell(n,o);const a=o.getChars();if(o.getWidth()&&(r-=a.length||1,n===e.length-1&&""===a)){const e=i.getLine(t+1);e&&e.isWrapped&&(e.getCell(0,o),2===o.getWidth()&&(r+=1))}if(r<0)return[t,n]}t++,a=0}return[t,a]}}t.LinkComputer=r}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}var r={};return(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.WebLinksAddon=void 0;const t=n(6),i=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function o(e,t){const n=window.open();if(n){try{n.opener=null}catch{}n.location.href=t}else console.warn("Opening link blocked as opener could not be cleared")}e.WebLinksAddon=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._handler=e,this._options=t}activate(e){this._terminal=e;const n=this._options,r=n.urlRegex||i;this._linkProvider=this._terminal.registerLinkProvider(new t.WebLinkProvider(this._terminal,r,this._handler,n))}dispose(){this._linkProvider?.dispose()}}})(),r})(),e.exports=t()},69:e=>{var t;globalThis,t=()=>(()=>{"use strict";var e={4567:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AccessibilityManager=void 0;const o=n(9042),a=n(9924),s=n(844),l=n(4725),c=n(2585),u=n(3656);let d=t.AccessibilityManager=class extends s.Disposable{constructor(e,t,n,r){super(),this._terminal=e,this._coreBrowserService=n,this._renderService=r,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let i=0;i<this._terminal.rows;i++)this._rowElements[i]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[i]);if(this._topBoundaryFocusListener=e=>this._handleBoundaryFocus(e,0),this._bottomBoundaryFocusListener=e=>this._handleBoundaryFocus(e,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new a.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((e=>this._handleResize(e.rows)))),this.register(this._terminal.onRender((e=>this._refreshRows(e.start,e.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((e=>this._handleChar(e)))),this.register(this._terminal.onLineFeed((()=>this._handleChar("\n")))),this.register(this._terminal.onA11yTab((e=>this._handleTab(e)))),this.register(this._terminal.onKey((e=>this._handleKey(e.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,u.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,s.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(e){for(let t=0;t<e;t++)this._handleChar(" ")}_handleChar(e){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,"\n"===e&&(this._liveRegionLineCount++,21===this._liveRegionLineCount&&(this._liveRegion.textContent+=o.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),/\p{Control}/u.test(e)||this._charsToConsume.push(e)}_refreshRows(e,t){this._liveRegionDebouncer.refresh(e,t,this._terminal.rows)}_renderRows(e,t){const n=this._terminal.buffer,r=n.lines.length.toString();for(let i=e;i<=t;i++){const e=n.lines.get(n.ydisp+i),t=[],o=e?.translateToString(!0,void 0,void 0,t)||"",a=(n.ydisp+i+1).toString(),s=this._rowElements[i];s&&(0===o.length?(s.innerText="\xa0",this._rowColumns.set(s,[0,1])):(s.textContent=o,this._rowColumns.set(s,t)),s.setAttribute("aria-posinset",a),s.setAttribute("aria-setsize",r))}this._announceCharacters()}_announceCharacters(){0!==this._charsToAnnounce.length&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(e,t){const n=e.target,r=this._rowElements[0===t?1:this._rowElements.length-2];if(n.getAttribute("aria-posinset")===(0===t?"1":`${this._terminal.buffer.lines.length}`))return;if(e.relatedTarget!==r)return;let i,o;if(0===t?(i=n,o=this._rowElements.pop(),this._rowContainer.removeChild(o)):(i=this._rowElements.shift(),o=n,this._rowContainer.removeChild(i)),i.removeEventListener("focus",this._topBoundaryFocusListener),o.removeEventListener("focus",this._bottomBoundaryFocusListener),0===t){const e=this._createAccessibilityTreeNode();this._rowElements.unshift(e),this._rowContainer.insertAdjacentElement("afterbegin",e)}else{const e=this._createAccessibilityTreeNode();this._rowElements.push(e),this._rowContainer.appendChild(e)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(0===t?-1:1),this._rowElements[0===t?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){if(0===this._rowElements.length)return;const e=document.getSelection();if(!e)return;if(e.isCollapsed)return void(this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection());if(!e.anchorNode||!e.focusNode)return void console.error("anchorNode and/or focusNode are null");let t={node:e.anchorNode,offset:e.anchorOffset},n={node:e.focusNode,offset:e.focusOffset};if((t.node.compareDocumentPosition(n.node)&Node.DOCUMENT_POSITION_PRECEDING||t.node===n.node&&t.offset>n.offset)&&([t,n]=[n,t]),t.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(t={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(t.node))return;const r=this._rowElements.slice(-1)[0];if(n.node.compareDocumentPosition(r)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(n={node:r,offset:r.textContent?.length??0}),!this._rowContainer.contains(n.node))return;const i=e=>{let{node:t,offset:n}=e;const r=t instanceof Text?t.parentNode:t;let i=parseInt(r?.getAttribute("aria-posinset"),10)-1;if(isNaN(i))return console.warn("row is invalid. Race condition?"),null;const o=this._rowColumns.get(r);if(!o)return console.warn("columns is null. Race condition?"),null;let a=n<o.length?o[n]:o.slice(-1)[0]+1;return a>=this._terminal.cols&&(++i,a=0),{row:i,column:a}},o=i(t),a=i(n);if(o&&a){if(o.row>a.row||o.row===a.row&&o.column>=a.column)throw new Error("invalid range");this._terminal.select(o.column,o.row,(a.row-o.row)*this._terminal.cols-o.column+a.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let t=this._rowContainer.children.length;t<this._terminal.rows;t++)this._rowElements[t]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[t]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const e=this._coreBrowserService.mainDocument.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}};t.AccessibilityManager=d=r([i(1,c.IInstantiationService),i(2,l.ICoreBrowserService),i(3,l.IRenderService)],d)},3614:(e,t)=>{function n(e){return e.replace(/\r?\n/g,"\r")}function r(e,t){return t?"\x1b[200~"+e+"\x1b[201~":e}function i(e,t,i,o){e=r(e=n(e),i.decPrivateModes.bracketedPasteMode&&!0!==o.rawOptions.ignoreBracketedPasteMode),i.triggerDataEvent(e,!0),t.value=""}function o(e,t,n){const r=n.getBoundingClientRect(),i=e.clientX-r.left-10,o=e.clientY-r.top-10;t.style.width="20px",t.style.height="20px",t.style.left=`${i}px`,t.style.top=`${o}px`,t.style.zIndex="1000",t.focus()}Object.defineProperty(t,"__esModule",{value:!0}),t.rightClickHandler=t.moveTextAreaUnderMouseCursor=t.paste=t.handlePasteEvent=t.copyHandler=t.bracketTextForPaste=t.prepareTextForTerminal=void 0,t.prepareTextForTerminal=n,t.bracketTextForPaste=r,t.copyHandler=function(e,t){e.clipboardData&&e.clipboardData.setData("text/plain",t.selectionText),e.preventDefault()},t.handlePasteEvent=function(e,t,n,r){e.stopPropagation(),e.clipboardData&&i(e.clipboardData.getData("text/plain"),t,n,r)},t.paste=i,t.moveTextAreaUnderMouseCursor=o,t.rightClickHandler=function(e,t,n,r,i){o(e,t,n),i&&r.rightClickSelect(e),t.value=r.selectionText,t.select()}},7239:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ColorContrastCache=void 0;const r=n(1505);t.ColorContrastCache=class{constructor(){this._color=new r.TwoKeyMap,this._css=new r.TwoKeyMap}setCss(e,t,n){this._css.set(e,t,n)}getCss(e,t){return this._css.get(e,t)}setColor(e,t,n){this._color.set(e,t,n)}getColor(e,t){return this._color.get(e,t)}clear(){this._color.clear(),this._css.clear()}}},3656:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.addDisposableDomListener=void 0,t.addDisposableDomListener=function(e,t,n,r){e.addEventListener(t,n,r);let i=!1;return{dispose:()=>{i||(i=!0,e.removeEventListener(t,n,r))}}}},3551:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.Linkifier=void 0;const o=n(3656),a=n(8460),s=n(844),l=n(2585),c=n(4725);let u=t.Linkifier=class extends s.Disposable{get currentLink(){return this._currentLink}constructor(e,t,n,r,i){super(),this._element=e,this._mouseService=t,this._renderService=n,this._bufferService=r,this._linkProviderService=i,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new a.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new a.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,s.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,s.toDisposable)((()=>{this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,o.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,o.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,o.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,o.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(e){this._lastMouseEvent=e;const t=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!t)return;this._isMouseOut=!1;const n=e.composedPath();for(let r=0;r<n.length;r++){const e=n[r];if(e.classList.contains("xterm"))break;if(e.classList.contains("xterm-hover"))return}this._lastBufferCell&&t.x===this._lastBufferCell.x&&t.y===this._lastBufferCell.y||(this._handleHover(t),this._lastBufferCell=t)}_handleHover(e){if(this._activeLine!==e.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(e,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))}_askForLink(e,t){this._activeProviderReplies&&t||(this._activeProviderReplies?.forEach((e=>{e?.forEach((e=>{e.link.dispose&&e.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=e.y);let n=!1;for(const[r,i]of this._linkProviderService.linkProviders.entries())if(t){const t=this._activeProviderReplies?.get(r);t&&(n=this._checkLinkProviderResult(r,e,n))}else i.provideLinks(e.y,(t=>{if(this._isMouseOut)return;const i=t?.map((e=>({link:e})));this._activeProviderReplies?.set(r,i),n=this._checkLinkProviderResult(r,e,n),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)}))}_removeIntersectingLinks(e,t){const n=new Set;for(let r=0;r<t.size;r++){const i=t.get(r);if(i)for(let t=0;t<i.length;t++){const r=i[t],o=r.link.range.start.y<e?0:r.link.range.start.x,a=r.link.range.end.y>e?this._bufferService.cols:r.link.range.end.x;for(let e=o;e<=a;e++){if(n.has(e)){i.splice(t--,1);break}n.add(e)}}}}_checkLinkProviderResult(e,t,n){if(!this._activeProviderReplies)return n;const r=this._activeProviderReplies.get(e);let i=!1;for(let o=0;o<e;o++)this._activeProviderReplies.has(o)&&!this._activeProviderReplies.get(o)||(i=!0);if(!i&&r){const e=r.find((e=>this._linkAtPosition(e.link,t)));e&&(n=!0,this._handleNewLink(e))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!n)for(let o=0;o<this._activeProviderReplies.size;o++){const e=this._activeProviderReplies.get(o)?.find((e=>this._linkAtPosition(e.link,t)));if(e){n=!0,this._handleNewLink(e);break}}return n}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._currentLink)return;const t=this._positionFromMouseEvent(e,this._element,this._mouseService);t&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,t)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,t){this._currentLink&&this._lastMouseEvent&&(!e||!t||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=t)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,s.disposeArray)(this._linkCacheDisposables))}_handleNewLink(e){if(!this._lastMouseEvent)return;const t=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);t&&this._linkAtPosition(e.link,t)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:void 0===e.link.decorations||e.link.decorations.underline,pointerCursor:void 0===e.link.decorations||e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:e=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==e&&(this._currentLink.state.decorations.pointerCursor=e,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",e))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:t=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==t&&(this._currentLink.state.decorations.underline=t,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,t))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((e=>{if(!this._currentLink)return;const t=0===e.start?0:e.start+1+this._bufferService.buffer.ydisp,n=this._bufferService.buffer.ydisp+1+e.end;if(this._currentLink.link.range.start.y>=t&&this._currentLink.link.range.end.y<=n&&(this._clearCurrentLink(t,n),this._lastMouseEvent)){const e=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);e&&this._askForLink(e,!1)}}))))}_linkHover(e,t,n){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),t.hover&&t.hover(n,t.text)}_fireUnderlineEvent(e,t){const n=e.range,r=this._bufferService.buffer.ydisp,i=this._createLinkUnderlineEvent(n.start.x-1,n.start.y-r-1,n.end.x,n.end.y-r-1,void 0);(t?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(i)}_linkLeave(e,t,n){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),t.leave&&t.leave(n,t.text)}_linkAtPosition(e,t){const n=e.range.start.y*this._bufferService.cols+e.range.start.x,r=e.range.end.y*this._bufferService.cols+e.range.end.x,i=t.y*this._bufferService.cols+t.x;return n<=i&&i<=r}_positionFromMouseEvent(e,t,n){const r=n.getCoords(e,t,this._bufferService.cols,this._bufferService.rows);if(r)return{x:r[0],y:r[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,t,n,r,i){return{x1:e,y1:t,x2:n,y2:r,cols:this._bufferService.cols,fg:i}}};t.Linkifier=u=r([i(1,c.IMouseService),i(2,c.IRenderService),i(3,l.IBufferService),i(4,c.ILinkProviderService)],u)},9042:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.tooMuchOutput=t.promptLabel=void 0,t.promptLabel="Terminal input",t.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.OscLinkProvider=void 0;const o=n(511),a=n(2585);let s=t.OscLinkProvider=class{constructor(e,t,n){this._bufferService=e,this._optionsService=t,this._oscLinkService=n}provideLinks(e,t){const n=this._bufferService.buffer.lines.get(e-1);if(!n)return void t(void 0);const r=[],i=this._optionsService.rawOptions.linkHandler,a=new o.CellData,s=n.getTrimmedLength();let c=-1,u=-1,d=!1;for(let o=0;o<s;o++)if(-1!==u||n.hasContent(o)){if(n.loadCell(o,a),a.hasExtendedAttrs()&&a.extended.urlId){if(-1===u){u=o,c=a.extended.urlId;continue}d=a.extended.urlId!==c}else-1!==u&&(d=!0);if(d||-1!==u&&o===s-1){const t=this._oscLinkService.getLinkData(c)?.uri;if(t){const n={start:{x:u+1,y:e},end:{x:o+(d||o!==s-1?0:1),y:e}};let a=!1;if(!i?.allowNonHttpProtocols)try{const e=new URL(t);["http:","https:"].includes(e.protocol)||(a=!0)}catch(e){a=!0}a||r.push({text:t,range:n,activate:(e,t)=>i?i.activate(e,t,n):l(0,t),hover:(e,t)=>i?.hover?.(e,t,n),leave:(e,t)=>i?.leave?.(e,t,n)})}d=!1,a.hasExtendedAttrs()&&a.extended.urlId?(u=o,c=a.extended.urlId):(u=-1,c=-1)}}t(r)}};function l(e,t){if(confirm(`Do you want to navigate to ${t}?\n\nWARNING: This link could potentially be dangerous`)){const e=window.open();if(e){try{e.opener=null}catch{}e.location.href=t}else console.warn("Opening link blocked as opener could not be cleared")}}t.OscLinkProvider=s=r([i(0,a.IBufferService),i(1,a.IOptionsService),i(2,a.IOscLinkService)],s)},6193:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RenderDebouncer=void 0,t.RenderDebouncer=class{constructor(e,t){this._renderCallback=e,this._coreBrowserService=t,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(e){return this._refreshCallbacks.push(e),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(e,t,n){this._rowCount=n,e=void 0!==e?e:0,t=void 0!==t?t:this._rowCount-1,this._rowStart=void 0!==this._rowStart?Math.min(this._rowStart,e):e,this._rowEnd=void 0!==this._rowEnd?Math.max(this._rowEnd,t):t,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,void 0===this._rowStart||void 0===this._rowEnd||void 0===this._rowCount)return void this._runRefreshCallbacks();const e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const e of this._refreshCallbacks)e(0);this._refreshCallbacks=[]}}},3236:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Terminal=void 0;const r=n(3614),i=n(3656),o=n(3551),a=n(9042),s=n(3730),l=n(1680),c=n(3107),u=n(5744),d=n(2950),h=n(1296),f=n(428),p=n(4269),m=n(5114),g=n(8934),v=n(3230),b=n(9312),y=n(4725),_=n(6731),S=n(8055),w=n(8969),C=n(8460),x=n(844),E=n(6114),k=n(8437),O=n(2584),$=n(7399),R=n(5941),I=n(9074),M=n(2585),P=n(5435),N=n(4567),L=n(779);class T extends w.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),this.browser=E,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new x.MutableDisposable),this._onCursorMove=this.register(new C.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new C.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new C.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new C.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new C.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new C.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new C.EventEmitter),this._onBlur=this.register(new C.EventEmitter),this._onA11yCharEmitter=this.register(new C.EventEmitter),this._onA11yTabEmitter=this.register(new C.EventEmitter),this._onWillOpen=this.register(new C.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(I.DecorationService),this._instantiationService.setService(M.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(L.LinkProviderService),this._instantiationService.setService(y.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(s.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((e,t)=>this.refresh(e,t)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((e=>this._reportWindowsOptions(e)))),this.register(this._inputHandler.onColor((e=>this._handleColorEvent(e)))),this.register((0,C.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,C.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,C.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,C.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((e=>this._afterResize(e.cols,e.rows)))),this.register((0,x.toDisposable)((()=>{this._customKeyEventHandler=void 0,this.element?.parentNode?.removeChild(this.element)})))}_handleColorEvent(e){if(this._themeService)for(const t of e){let e,n="";switch(t.index){case 256:e="foreground",n="10";break;case 257:e="background",n="11";break;case 258:e="cursor",n="12";break;default:e="ansi",n="4;"+t.index}switch(t.type){case 0:const r=S.color.toColorRGB("ansi"===e?this._themeService.colors.ansi[t.index]:this._themeService.colors[e]);this.coreService.triggerDataEvent(`${O.C0.ESC}]${n};${(0,R.toRgbString)(r)}${O.C1_ESCAPED.ST}`);break;case 1:if("ansi"===e)this._themeService.modifyColors((e=>e.ansi[t.index]=S.channels.toColor(...t.color)));else{const n=e;this._themeService.modifyColors((e=>e[n]=S.channels.toColor(...t.color)))}break;case 2:this._themeService.restoreColor(t.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(e){e?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(N.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(e){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(O.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){return this.textarea?.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(O.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const e=this.buffer.ybase+this.buffer.y,t=this.buffer.lines.get(e);if(!t)return;const n=Math.min(this.buffer.x,this.cols-1),r=this._renderService.dimensions.css.cell.height,i=t.getWidth(n),o=this._renderService.dimensions.css.cell.width*i,a=this.buffer.y*this._renderService.dimensions.css.cell.height,s=n*this._renderService.dimensions.css.cell.width;this.textarea.style.left=s+"px",this.textarea.style.top=a+"px",this.textarea.style.width=o+"px",this.textarea.style.height=r+"px",this.textarea.style.lineHeight=r+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,i.addDisposableDomListener)(this.element,"copy",(e=>{this.hasSelection()&&(0,r.copyHandler)(e,this._selectionService)})));const e=e=>(0,r.handlePasteEvent)(e,this.textarea,this.coreService,this.optionsService);this.register((0,i.addDisposableDomListener)(this.textarea,"paste",e)),this.register((0,i.addDisposableDomListener)(this.element,"paste",e)),E.isFirefox?this.register((0,i.addDisposableDomListener)(this.element,"mousedown",(e=>{2===e.button&&(0,r.rightClickHandler)(e,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,i.addDisposableDomListener)(this.element,"contextmenu",(e=>{(0,r.rightClickHandler)(e,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),E.isLinux&&this.register((0,i.addDisposableDomListener)(this.element,"auxclick",(e=>{1===e.button&&(0,r.moveTextAreaUnderMouseCursor)(e,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,i.addDisposableDomListener)(this.textarea,"keyup",(e=>this._keyUp(e)),!0)),this.register((0,i.addDisposableDomListener)(this.textarea,"keydown",(e=>this._keyDown(e)),!0)),this.register((0,i.addDisposableDomListener)(this.textarea,"keypress",(e=>this._keyPress(e)),!0)),this.register((0,i.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,i.addDisposableDomListener)(this.textarea,"compositionupdate",(e=>this._compositionHelper.compositionupdate(e)))),this.register((0,i.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,i.addDisposableDomListener)(this.textarea,"input",(e=>this._inputEvent(e)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(e){if(!e)throw new Error("Terminal requires a parent element.");if(e.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this.element?.ownerDocument.defaultView&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=e.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),e.appendChild(this.element);const t=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),t.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,i.addDisposableDomListener)(this.screenElement,"mousemove",(e=>this.updateCursorStyle(e)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),t.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",a.promptLabel),E.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(m.CoreBrowserService,this.textarea,e.ownerDocument.defaultView??window,this._document??"undefined"!=typeof window?window.document:null)),this._instantiationService.setService(y.ICoreBrowserService,this._coreBrowserService),this.register((0,i.addDisposableDomListener)(this.textarea,"focus",(e=>this._handleTextAreaFocus(e)))),this.register((0,i.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(f.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(y.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(_.ThemeService),this._instantiationService.setService(y.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(p.CharacterJoinerService),this._instantiationService.setService(y.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(v.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(y.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((e=>this._onRender.fire(e)))),this.onResize((e=>this._renderService.resize(e.cols,e.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(d.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(g.MouseService),this._instantiationService.setService(y.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(o.Linkifier,this.screenElement)),this.element.appendChild(t);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(l.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((e=>this.scrollLines(e.amount,e.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(b.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(y.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((e=>this.scrollLines(e.amount,e.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((e=>this._renderService.handleSelectionChanged(e.start,e.end,e.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((e=>{this.textarea.value=e,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((e=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,i.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(c.BufferDecorationRenderer,this.screenElement)),this.register((0,i.addDisposableDomListener)(this.element,"mousedown",(e=>this._selectionService.handleMouseDown(e)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(N.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(e=>this._handleScreenReaderModeOptionChange(e)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(u.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(e=>{!this._overviewRulerRenderer&&e&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(u.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(h.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const e=this,t=this.element;function n(t){const n=e._mouseService.getMouseReportCoords(t,e.screenElement);if(!n)return!1;let r,i;switch(t.overrideType||t.type){case"mousemove":i=32,void 0===t.buttons?(r=3,void 0!==t.button&&(r=t.button<3?t.button:3)):r=1&t.buttons?0:4&t.buttons?1:2&t.buttons?2:3;break;case"mouseup":i=0,r=t.button<3?t.button:3;break;case"mousedown":i=1,r=t.button<3?t.button:3;break;case"wheel":if(e._customWheelEventHandler&&!1===e._customWheelEventHandler(t))return!1;if(0===e.viewport.getLinesScrolled(t))return!1;i=t.deltaY<0?0:1,r=4;break;default:return!1}return!(void 0===i||void 0===r||r>4)&&e.coreMouseService.triggerMouseEvent({col:n.col,row:n.row,x:n.x,y:n.y,button:r,action:i,ctrl:t.ctrlKey,alt:t.altKey,shift:t.shiftKey})}const r={mouseup:null,wheel:null,mousedrag:null,mousemove:null},o={mouseup:e=>(n(e),e.buttons||(this._document.removeEventListener("mouseup",r.mouseup),r.mousedrag&&this._document.removeEventListener("mousemove",r.mousedrag)),this.cancel(e)),wheel:e=>(n(e),this.cancel(e,!0)),mousedrag:e=>{e.buttons&&n(e)},mousemove:e=>{e.buttons||n(e)}};this.register(this.coreMouseService.onProtocolChange((e=>{e?("debug"===this.optionsService.rawOptions.logLevel&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(e)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&e?r.mousemove||(t.addEventListener("mousemove",o.mousemove),r.mousemove=o.mousemove):(t.removeEventListener("mousemove",r.mousemove),r.mousemove=null),16&e?r.wheel||(t.addEventListener("wheel",o.wheel,{passive:!1}),r.wheel=o.wheel):(t.removeEventListener("wheel",r.wheel),r.wheel=null),2&e?r.mouseup||(r.mouseup=o.mouseup):(this._document.removeEventListener("mouseup",r.mouseup),r.mouseup=null),4&e?r.mousedrag||(r.mousedrag=o.mousedrag):(this._document.removeEventListener("mousemove",r.mousedrag),r.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,i.addDisposableDomListener)(t,"mousedown",(e=>{if(e.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(e))return n(e),r.mouseup&&this._document.addEventListener("mouseup",r.mouseup),r.mousedrag&&this._document.addEventListener("mousemove",r.mousedrag),this.cancel(e)}))),this.register((0,i.addDisposableDomListener)(t,"wheel",(e=>{if(!r.wheel){if(this._customWheelEventHandler&&!1===this._customWheelEventHandler(e))return!1;if(!this.buffer.hasScrollback){const t=this.viewport.getLinesScrolled(e);if(0===t)return;const n=O.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(e.deltaY<0?"A":"B");let r="";for(let e=0;e<Math.abs(t);e++)r+=n;return this.coreService.triggerDataEvent(r,!0),this.cancel(e,!0)}return this.viewport.handleWheel(e)?this.cancel(e):void 0}}),{passive:!1})),this.register((0,i.addDisposableDomListener)(t,"touchstart",(e=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(e),this.cancel(e)}),{passive:!0})),this.register((0,i.addDisposableDomListener)(t,"touchmove",(e=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(e)?void 0:this.cancel(e)}),{passive:!1}))}refresh(e,t){this._renderService?.refreshRows(e,t)}updateCursorStyle(e){this._selectionService?.shouldColumnSelect(e)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;1===n?(super.scrollLines(e,t,n),this.refresh(0,this.rows-1)):this.viewport?.scrollLines(e)}paste(e){(0,r.paste)(e,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(e){this._customKeyEventHandler=e}attachCustomWheelEventHandler(e){this._customWheelEventHandler=e}registerLinkProvider(e){return this._linkProviderService.registerLinkProvider(e)}registerCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const t=this._characterJoinerService.register(e);return this.refresh(0,this.rows-1),t}deregisterCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(e)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(e){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+e)}registerDecoration(e){return this._decorationService.registerDecoration(e)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(e,t,n){this._selectionService.setSelection(e,t,n)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){this._selectionService?.clearSelection()}selectAll(){this._selectionService?.selectAll()}selectLines(e,t){this._selectionService?.selectLines(e,t)}_keyDown(e){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&!1===this._customKeyEventHandler(e))return!1;const t=this.browser.isMac&&this.options.macOptionIsMeta&&e.altKey;if(!t&&!this._compositionHelper.keydown(e))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;t||"Dead"!==e.key&&"AltGraph"!==e.key||(this._unprocessedDeadKey=!0);const n=(0,$.evaluateKeyboardEvent)(e,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(e),3===n.type||2===n.type){const t=this.rows-1;return this.scrollLines(2===n.type?-t:t),this.cancel(e,!0)}return 1===n.type&&this.selectAll(),!!this._isThirdLevelShift(this.browser,e)||(n.cancel&&this.cancel(e,!0),!n.key||!!(e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&1===e.key.length&&e.key.charCodeAt(0)>=65&&e.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(n.key!==O.C0.ETX&&n.key!==O.C0.CR||(this.textarea.value=""),this._onKey.fire({key:n.key,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(n.key,!0),!this.optionsService.rawOptions.screenReaderMode||e.altKey||e.ctrlKey?this.cancel(e,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(e,t){const n=e.isMac&&!this.options.macOptionIsMeta&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.isWindows&&t.altKey&&t.ctrlKey&&!t.metaKey||e.isWindows&&t.getModifierState("AltGraph");return"keypress"===t.type?n:n&&(!t.keyCode||t.keyCode>47)}_keyUp(e){this._keyDownSeen=!1,this._customKeyEventHandler&&!1===this._customKeyEventHandler(e)||(function(e){return 16===e.keyCode||17===e.keyCode||18===e.keyCode}(e)||this.focus(),this.updateCursorStyle(e),this._keyPressHandled=!1)}_keyPress(e){let t;if(this._keyPressHandled=!1,this._keyDownHandled)return!1;if(this._customKeyEventHandler&&!1===this._customKeyEventHandler(e))return!1;if(this.cancel(e),e.charCode)t=e.charCode;else if(null===e.which||void 0===e.which)t=e.keyCode;else{if(0===e.which||0===e.charCode)return!1;t=e.which}return!(!t||(e.altKey||e.ctrlKey||e.metaKey)&&!this._isThirdLevelShift(this.browser,e)||(t=String.fromCharCode(t),this._onKey.fire({key:t,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(t,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(e){if(e.data&&"insertText"===e.inputType&&(!e.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const t=e.data;return this.coreService.triggerDataEvent(t,!0),this.cancel(e),!0}return!1}resize(e,t){e!==this.cols||t!==this.rows?super.resize(e,t):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(e,t){this._charSizeService?.measure(),this.viewport?.syncScrollArea(!0)}clear(){if(0!==this.buffer.ybase||0!==this.buffer.y){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let e=1;e<this.rows;e++)this.buffer.lines.push(this.buffer.getBlankLine(k.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),this.viewport?.reset(),this.refresh(0,this.rows-1)}}reset(){this.options.rows=this.rows,this.options.cols=this.cols;const e=this._customKeyEventHandler;this._setup(),super.reset(),this._selectionService?.reset(),this._decorationService.reset(),this.viewport?.reset(),this._customKeyEventHandler=e,this.refresh(0,this.rows-1)}clearTextureAtlas(){this._renderService?.clearTextureAtlas()}_reportFocus(){this.element?.classList.contains("focus")?this.coreService.triggerDataEvent(O.C0.ESC+"[I"):this.coreService.triggerDataEvent(O.C0.ESC+"[O")}_reportWindowsOptions(e){if(this._renderService)switch(e){case P.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const e=this._renderService.dimensions.css.canvas.width.toFixed(0),t=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${O.C0.ESC}[4;${t};${e}t`);break;case P.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const n=this._renderService.dimensions.css.cell.width.toFixed(0),r=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${O.C0.ESC}[6;${r};${n}t`)}}cancel(e,t){if(this.options.cancelEvents||t)return e.preventDefault(),e.stopPropagation(),!1}}t.Terminal=T},9924:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TimeBasedDebouncer=void 0,t.TimeBasedDebouncer=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;this._renderCallback=e,this._debounceThresholdMS=t,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(e,t,n){this._rowCount=n,e=void 0!==e?e:0,t=void 0!==t?t:this._rowCount-1,this._rowStart=void 0!==this._rowStart?Math.min(this._rowStart,e):e,this._rowEnd=void 0!==this._rowEnd?Math.max(this._rowEnd,t):t;const r=Date.now();if(r-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=r,this._innerRefresh();else if(!this._additionalRefreshRequested){const e=r-this._lastRefreshMs,t=this._debounceThresholdMS-e;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),t)}}_innerRefresh(){if(void 0===this._rowStart||void 0===this._rowEnd||void 0===this._rowCount)return;const e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t)}}},1680:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.Viewport=void 0;const o=n(3656),a=n(4725),s=n(8460),l=n(844),c=n(2585);let u=t.Viewport=class extends l.Disposable{constructor(e,t,n,r,i,a,l,c){super(),this._viewportElement=e,this._scrollArea=t,this._bufferService=n,this._optionsService=r,this._charSizeService=i,this._renderService=a,this._coreBrowserService=l,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new s.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,o.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((e=>this._activeBuffer=e.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((e=>this._renderDimensions=e))),this._handleThemeChange(c.colors),this.register(c.onChangeColors((e=>this._handleThemeChange(e)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(e){this._viewportElement.style.backgroundColor=e.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(e){if(e)return this._innerRefresh(),void(null!==this._refreshAnimationFrame&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));null===this._refreshAnimationFrame&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const e=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==e&&(this._lastRecordedBufferHeight=e,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const e=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==e&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=e),this._refreshAnimationFrame=null}syncScrollArea(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(e);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(e)}_handleScroll(e){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const t=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:t,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||-1===this._smoothScrollState.origin||-1===this._smoothScrollState.target)return;const e=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(e*(this._smoothScrollState.target-this._smoothScrollState.origin)),e<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(e,t){const n=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(t<0&&0!==this._viewportElement.scrollTop||t>0&&n<this._lastRecordedBufferHeight)||(e.cancelable&&e.preventDefault(),!1)}handleWheel(e){const t=this._getPixelsScrolled(e);return 0!==t&&(this._optionsService.rawOptions.smoothScrollDuration?(this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,-1===this._smoothScrollState.target?this._smoothScrollState.target=this._viewportElement.scrollTop+t:this._smoothScrollState.target+=t,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=t,this._bubbleScroll(e,t))}scrollLines(e){if(0!==e)if(this._optionsService.rawOptions.smoothScrollDuration){const t=e*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+t,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:e,suppressScrollEvent:!1})}_getPixelsScrolled(e){if(0===e.deltaY||e.shiftKey)return 0;let t=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_LINE?t*=this._currentRowHeight:e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(t*=this._currentRowHeight*this._bufferService.rows),t}getBufferElements(e,t){let n,r="";const i=[],o=t??this._bufferService.buffer.lines.length,a=this._bufferService.buffer.lines;for(let s=e;s<o;s++){const e=a.get(s);if(!e)continue;const t=a.get(s+1)?.isWrapped;if(r+=e.translateToString(!t),!t||s===a.length-1){const e=document.createElement("div");e.textContent=r,i.push(e),r.length>0&&(n=e),r=""}}return{bufferElements:i,cursorElement:n}}getLinesScrolled(e){if(0===e.deltaY||e.shiftKey)return 0;let t=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(t/=this._currentRowHeight+0,this._wheelPartialScroll+=t,t=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(t*=this._bufferService.rows),t}_applyScrollModifier(e,t){const n=this._optionsService.rawOptions.fastScrollModifier;return"alt"===n&&t.altKey||"ctrl"===n&&t.ctrlKey||"shift"===n&&t.shiftKey?e*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:e*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(e){this._lastTouchY=e.touches[0].pageY}handleTouchMove(e){const t=this._lastTouchY-e.touches[0].pageY;return this._lastTouchY=e.touches[0].pageY,0!==t&&(this._viewportElement.scrollTop+=t,this._bubbleScroll(e,t))}};t.Viewport=u=r([i(2,c.IBufferService),i(3,c.IOptionsService),i(4,a.ICharSizeService),i(5,a.IRenderService),i(6,a.ICoreBrowserService),i(7,a.IThemeService)],u)},3107:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.BufferDecorationRenderer=void 0;const o=n(4725),a=n(844),s=n(2585);let l=t.BufferDecorationRenderer=class extends a.Disposable{constructor(e,t,n,r,i){super(),this._screenElement=e,this._bufferService=t,this._coreBrowserService=n,this._decorationService=r,this._renderService=i,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt}))),this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh()))),this.register(this._decorationService.onDecorationRemoved((e=>this._removeDecoration(e)))),this.register((0,a.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){void 0===this._animationFrame&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const e of this._decorationService.decorations)this._renderDecoration(e);this._dimensionsChanged=!1}_renderDecoration(e){this._refreshStyle(e),this._dimensionsChanged&&this._refreshXPosition(e)}_createElement(e){const t=this._coreBrowserService.mainDocument.createElement("div");t.classList.add("xterm-decoration"),t.classList.toggle("xterm-decoration-top-layer","top"===e?.options?.layer),t.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,t.style.height=(e.options.height||1)*this._renderService.dimensions.css.cell.height+"px",t.style.top=(e.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",t.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const n=e.options.x??0;return n&&n>this._bufferService.cols&&(t.style.display="none"),this._refreshXPosition(e,t),t}_refreshStyle(e){const t=e.marker.line-this._bufferService.buffers.active.ydisp;if(t<0||t>=this._bufferService.rows)e.element&&(e.element.style.display="none",e.onRenderEmitter.fire(e.element));else{let n=this._decorationElements.get(e);n||(n=this._createElement(e),e.element=n,this._decorationElements.set(e,n),this._container.appendChild(n),e.onDispose((()=>{this._decorationElements.delete(e),n.remove()}))),n.style.top=t*this._renderService.dimensions.css.cell.height+"px",n.style.display=this._altBufferIsActive?"none":"block",e.onRenderEmitter.fire(n)}}_refreshXPosition(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.element;if(!t)return;const n=e.options.x??0;"right"===(e.options.anchor||"left")?t.style.right=n?n*this._renderService.dimensions.css.cell.width+"px":"":t.style.left=n?n*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(e){this._decorationElements.get(e)?.remove(),this._decorationElements.delete(e),e.dispose()}};t.BufferDecorationRenderer=l=r([i(1,s.IBufferService),i(2,o.ICoreBrowserService),i(3,s.IDecorationService),i(4,o.IRenderService)],l)},5871:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ColorZoneStore=void 0,t.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(e){if(e.options.overviewRulerOptions){for(const t of this._zones)if(t.color===e.options.overviewRulerOptions.color&&t.position===e.options.overviewRulerOptions.position){if(this._lineIntersectsZone(t,e.marker.line))return;if(this._lineAdjacentToZone(t,e.marker.line,e.options.overviewRulerOptions.position))return void this._addLineToZone(t,e.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=e.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=e.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=e.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=e.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:e.options.overviewRulerOptions.color,position:e.options.overviewRulerOptions.position,startBufferLine:e.marker.line,endBufferLine:e.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(e){this._linePadding=e}_lineIntersectsZone(e,t){return t>=e.startBufferLine&&t<=e.endBufferLine}_lineAdjacentToZone(e,t,n){return t>=e.startBufferLine-this._linePadding[n||"full"]&&t<=e.endBufferLine+this._linePadding[n||"full"]}_addLineToZone(e,t){e.startBufferLine=Math.min(e.startBufferLine,t),e.endBufferLine=Math.max(e.endBufferLine,t)}}},5744:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.OverviewRulerRenderer=void 0;const o=n(5871),a=n(4725),s=n(844),l=n(2585),c={full:0,left:0,center:0,right:0},u={full:0,left:0,center:0,right:0},d={full:0,left:0,center:0,right:0};let h=t.OverviewRulerRenderer=class extends s.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(e,t,n,r,i,a,l){super(),this._viewportElement=e,this._screenElement=t,this._bufferService=n,this._decorationService=r,this._renderService=i,this._optionsService=a,this._coreBrowserService=l,this._colorZoneStore=new o.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),this._viewportElement.parentElement?.insertBefore(this._canvas,this._viewportElement);const c=this._canvas.getContext("2d");if(!c)throw new Error("Ctx cannot be null");this._ctx=c,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,s.toDisposable)((()=>{this._canvas?.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const e=Math.floor(this._canvas.width/3),t=Math.ceil(this._canvas.width/3);u.full=this._canvas.width,u.left=e,u.center=t,u.right=e,this._refreshDrawHeightConstants(),d.full=0,d.left=0,d.center=u.left,d.right=u.left+u.center}_refreshDrawHeightConstants(){c.full=Math.round(2*this._coreBrowserService.dpr);const e=this._canvas.height/this._bufferService.buffer.lines.length,t=Math.round(Math.max(Math.min(e,12),6)*this._coreBrowserService.dpr);c.left=t,c.center=t,c.right=t}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const t of this._decorationService.decorations)this._colorZoneStore.addDecoration(t);this._ctx.lineWidth=1;const e=this._colorZoneStore.zones;for(const t of e)"full"!==t.position&&this._renderColorZone(t);for(const t of e)"full"===t.position&&this._renderColorZone(t);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(e){this._ctx.fillStyle=e.color,this._ctx.fillRect(d[e.position||"full"],Math.round((this._canvas.height-1)*(e.startBufferLine/this._bufferService.buffers.active.lines.length)-c[e.position||"full"]/2),u[e.position||"full"],Math.round((this._canvas.height-1)*((e.endBufferLine-e.startBufferLine)/this._bufferService.buffers.active.lines.length)+c[e.position||"full"]))}_queueRefresh(e,t){this._shouldUpdateDimensions=e||this._shouldUpdateDimensions,this._shouldUpdateAnchor=t||this._shouldUpdateAnchor,void 0===this._animationFrame&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};t.OverviewRulerRenderer=h=r([i(2,l.IBufferService),i(3,l.IDecorationService),i(4,a.IRenderService),i(5,l.IOptionsService),i(6,a.ICoreBrowserService)],h)},2950:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CompositionHelper=void 0;const o=n(4725),a=n(2585),s=n(2584);let l=t.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(e,t,n,r,i,o){this._textarea=e,this._compositionView=t,this._bufferService=n,this._optionsService=r,this._coreService=i,this._renderService=o,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(e){this._compositionView.textContent=e.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(e){if(this._isComposing||this._isSendingComposition){if(229===e.keyCode)return!1;if(16===e.keyCode||17===e.keyCode||18===e.keyCode)return!1;this._finalizeComposition(!1)}return 229!==e.keyCode||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(e){if(this._compositionView.classList.remove("active"),this._isComposing=!1,e){const e={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let t;this._isSendingComposition=!1,e.start+=this._dataAlreadySent.length,t=this._isComposing?this._textarea.value.substring(e.start,e.end):this._textarea.value.substring(e.start),t.length>0&&this._coreService.triggerDataEvent(t,!0)}}),0)}else{this._isSendingComposition=!1;const e=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(e,!0)}}_handleAnyTextareaChanges(){const e=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const t=this._textarea.value,n=t.replace(e,"");this._dataAlreadySent=n,t.length>e.length?this._coreService.triggerDataEvent(n,!0):t.length<e.length?this._coreService.triggerDataEvent(`${s.C0.DEL}`,!0):t.length===e.length&&t!==e&&this._coreService.triggerDataEvent(t,!0)}}),0)}updateCompositionElements(e){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const e=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),t=this._renderService.dimensions.css.cell.height,n=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,r=e*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=r+"px",this._compositionView.style.top=n+"px",this._compositionView.style.height=t+"px",this._compositionView.style.lineHeight=t+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const i=this._compositionView.getBoundingClientRect();this._textarea.style.left=r+"px",this._textarea.style.top=n+"px",this._textarea.style.width=Math.max(i.width,1)+"px",this._textarea.style.height=Math.max(i.height,1)+"px",this._textarea.style.lineHeight=i.height+"px"}e||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};t.CompositionHelper=l=r([i(2,a.IBufferService),i(3,a.IOptionsService),i(4,a.ICoreService),i(5,o.IRenderService)],l)},9806:(e,t)=>{function n(e,t,n){const r=n.getBoundingClientRect(),i=e.getComputedStyle(n),o=parseInt(i.getPropertyValue("padding-left")),a=parseInt(i.getPropertyValue("padding-top"));return[t.clientX-r.left-o,t.clientY-r.top-a]}Object.defineProperty(t,"__esModule",{value:!0}),t.getCoords=t.getCoordsRelativeToElement=void 0,t.getCoordsRelativeToElement=n,t.getCoords=function(e,t,r,i,o,a,s,l,c){if(!a)return;const u=n(e,t,r);return u?(u[0]=Math.ceil((u[0]+(c?s/2:0))/s),u[1]=Math.ceil(u[1]/l),u[0]=Math.min(Math.max(u[0],1),i+(c?1:0)),u[1]=Math.min(Math.max(u[1],1),o),u):void 0}},9504:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.moveToCellSequence=void 0;const r=n(2584);function i(e,t,n,r){const i=e-o(e,n),s=t-o(t,n),u=Math.abs(i-s)-function(e,t,n){let r=0;const i=e-o(e,n),s=t-o(t,n);for(let o=0;o<Math.abs(i-s);o++){const s="A"===a(e,t)?-1:1,l=n.buffer.lines.get(i+s*o);l?.isWrapped&&r++}return r}(e,t,n);return c(u,l(a(e,t),r))}function o(e,t){let n=0,r=t.buffer.lines.get(e),i=r?.isWrapped;for(;i&&e>=0&&e<t.rows;)n++,r=t.buffer.lines.get(--e),i=r?.isWrapped;return n}function a(e,t){return e>t?"A":"B"}function s(e,t,n,r,i,o){let a=e,s=t,l="";for(;a!==n||s!==r;)a+=i?1:-1,i&&a>o.cols-1?(l+=o.buffer.translateBufferLineToString(s,!1,e,a),a=0,e=0,s++):!i&&a<0&&(l+=o.buffer.translateBufferLineToString(s,!1,0,e+1),a=o.cols-1,e=a,s--);return l+o.buffer.translateBufferLineToString(s,!1,e,a)}function l(e,t){const n=t?"O":"[";return r.C0.ESC+n+e}function c(e,t){e=Math.floor(e);let n="";for(let r=0;r<e;r++)n+=t;return n}t.moveToCellSequence=function(e,t,n,r){const a=n.buffer.x,u=n.buffer.y;if(!n.buffer.hasScrollback)return function(e,t,n,r,a,u){return 0===i(t,r,a,u).length?"":c(s(e,t,e,t-o(t,a),!1,a).length,l("D",u))}(a,u,0,t,n,r)+i(u,t,n,r)+function(e,t,n,r,a,u){let d;d=i(t,r,a,u).length>0?r-o(r,a):t;const h=r,f=function(e,t,n,r,a,s){let l;return l=i(n,r,a,s).length>0?r-o(r,a):t,e<n&&l<=r||e>=n&&l<r?"C":"D"}(e,t,n,r,a,u);return c(s(e,d,n,h,"C"===f,a).length,l(f,u))}(a,u,e,t,n,r);let d;if(u===t)return d=a>e?"D":"C",c(Math.abs(a-e),l(d,r));d=u>t?"D":"C";const h=Math.abs(u-t);return c(function(e,t){return t.cols-e}(u>t?e:a,n)+(h-1)*n.cols+1+((u>t?a:e)-1),l(d,r))}},1296:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DomRenderer=void 0;const o=n(3787),a=n(2550),s=n(2223),l=n(6171),c=n(6052),u=n(4725),d=n(8055),h=n(8460),f=n(844),p=n(2585),m="xterm-dom-renderer-owner-",g="xterm-rows",v="xterm-fg-",b="xterm-bg-",y="xterm-focus",_="xterm-selection";let S=1,w=t.DomRenderer=class extends f.Disposable{constructor(e,t,n,r,i,s,u,d,p,v,b,y,w){super(),this._terminal=e,this._document=t,this._element=n,this._screenElement=r,this._viewportElement=i,this._helperContainer=s,this._linkifier2=u,this._charSizeService=p,this._optionsService=v,this._bufferService=b,this._coreBrowserService=y,this._themeService=w,this._terminalClass=S++,this._rowElements=[],this._selectionRenderModel=(0,c.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new h.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(g),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(_),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,l.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((e=>this._injectCss(e)))),this._injectCss(this._themeService.colors),this._rowFactory=d.createInstance(o.DomRendererRowFactory,document),this._element.classList.add(m+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((e=>this._handleLinkHover(e)))),this.register(this._linkifier2.onHideLinkUnderline((e=>this._handleLinkLeave(e)))),this.register((0,f.toDisposable)((()=>{this._element.classList.remove(m+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new a.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const e=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*e,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*e),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/e),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/e),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const n of this._rowElements)n.style.width=`${this.dimensions.css.canvas.width}px`,n.style.height=`${this.dimensions.css.cell.height}px`,n.style.lineHeight=`${this.dimensions.css.cell.height}px`,n.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const t=`${this._terminalSelector} .${g} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=t,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(e){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let t=`${this._terminalSelector} .${g} { color: ${e.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;t+=`${this._terminalSelector} .${g} .xterm-dim { color: ${d.color.multiplyOpacity(e.foreground,.5).css};}`,t+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const n=`blink_underline_${this._terminalClass}`,r=`blink_bar_${this._terminalClass}`,i=`blink_block_${this._terminalClass}`;t+=`@keyframes ${n} { 50% { border-bottom-style: hidden; }}`,t+=`@keyframes ${r} { 50% { box-shadow: none; }}`,t+=`@keyframes ${i} { 0% { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css}; } 50% { background-color: inherit; color: ${e.cursor.css}; }}`,t+=`${this._terminalSelector} .${g}.${y} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${n} 1s step-end infinite;}${this._terminalSelector} .${g}.${y} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${r} 1s step-end infinite;}${this._terminalSelector} .${g}.${y} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${i} 1s step-end infinite;}${this._terminalSelector} .${g} .xterm-cursor.xterm-cursor-block { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css};}${this._terminalSelector} .${g} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${e.cursor.css} !important; color: ${e.cursorAccent.css} !important;}${this._terminalSelector} .${g} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${e.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${g} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${e.cursor.css} inset;}${this._terminalSelector} .${g} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${e.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,t+=`${this._terminalSelector} .${_} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${_} div { position: absolute; background-color: ${e.selectionBackgroundOpaque.css};}${this._terminalSelector} .${_} div { position: absolute; background-color: ${e.selectionInactiveBackgroundOpaque.css};}`;for(const[o,a]of e.ansi.entries())t+=`${this._terminalSelector} .${v}${o} { color: ${a.css}; }${this._terminalSelector} .${v}${o}.xterm-dim { color: ${d.color.multiplyOpacity(a,.5).css}; }${this._terminalSelector} .${b}${o} { background-color: ${a.css}; }`;t+=`${this._terminalSelector} .${v}${s.INVERTED_DEFAULT_COLOR} { color: ${d.color.opaque(e.background).css}; }${this._terminalSelector} .${v}${s.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${d.color.multiplyOpacity(d.color.opaque(e.background),.5).css}; }${this._terminalSelector} .${b}${s.INVERTED_DEFAULT_COLOR} { background-color: ${e.foreground.css}; }`,this._themeStyleElement.textContent=t}_setDefaultSpacing(){const e=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${e}px`,this._rowFactory.defaultSpacing=e}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(e,t){for(let n=this._rowElements.length;n<=t;n++){const e=this._document.createElement("div");this._rowContainer.appendChild(e),this._rowElements.push(e)}for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(e,t){this._refreshRowElements(e,t),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(y),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(y),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(e,t,n){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(e,t,n),this.renderRows(0,this._bufferService.rows-1),!e||!t)return;this._selectionRenderModel.update(this._terminal,e,t,n);const r=this._selectionRenderModel.viewportStartRow,i=this._selectionRenderModel.viewportEndRow,o=this._selectionRenderModel.viewportCappedStartRow,a=this._selectionRenderModel.viewportCappedEndRow;if(o>=this._bufferService.rows||a<0)return;const s=this._document.createDocumentFragment();if(n){const n=e[0]>t[0];s.appendChild(this._createSelectionElement(o,n?t[0]:e[0],n?e[0]:t[0],a-o+1))}else{const n=r===o?e[0]:0,l=o===i?t[0]:this._bufferService.cols;s.appendChild(this._createSelectionElement(o,n,l));const c=a-o-1;if(s.appendChild(this._createSelectionElement(o+1,0,this._bufferService.cols,c)),o!==a){const e=i===a?t[0]:this._bufferService.cols;s.appendChild(this._createSelectionElement(a,0,e))}}this._selectionContainer.appendChild(s)}_createSelectionElement(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const i=this._document.createElement("div"),o=t*this.dimensions.css.cell.width;let a=this.dimensions.css.cell.width*(n-t);return o+a>this.dimensions.css.canvas.width&&(a=this.dimensions.css.canvas.width-o),i.style.height=r*this.dimensions.css.cell.height+"px",i.style.top=e*this.dimensions.css.cell.height+"px",i.style.left=`${o}px`,i.style.width=`${a}px`,i}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const e of this._rowElements)e.replaceChildren()}renderRows(e,t){const n=this._bufferService.buffer,r=n.ybase+n.y,i=Math.min(n.x,this._bufferService.cols-1),o=this._optionsService.rawOptions.cursorBlink,a=this._optionsService.rawOptions.cursorStyle,s=this._optionsService.rawOptions.cursorInactiveStyle;for(let l=e;l<=t;l++){const e=l+n.ydisp,t=this._rowElements[l],c=n.lines.get(e);if(!t||!c)break;t.replaceChildren(...this._rowFactory.createRow(c,e,e===r,a,s,i,o,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${m}${this._terminalClass}`}_handleLinkHover(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!0)}_handleLinkLeave(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!1)}_setCellUnderline(e,t,n,r,i,o){n<0&&(e=0),r<0&&(t=0);const a=this._bufferService.rows-1;n=Math.max(Math.min(n,a),0),r=Math.max(Math.min(r,a),0),i=Math.min(i,this._bufferService.cols);const s=this._bufferService.buffer,l=s.ybase+s.y,c=Math.min(s.x,i-1),u=this._optionsService.rawOptions.cursorBlink,d=this._optionsService.rawOptions.cursorStyle,h=this._optionsService.rawOptions.cursorInactiveStyle;for(let f=n;f<=r;++f){const a=f+s.ydisp,p=this._rowElements[f],m=s.lines.get(a);if(!p||!m)break;p.replaceChildren(...this._rowFactory.createRow(m,a,a===l,d,h,c,u,this.dimensions.css.cell.width,this._widthCache,o?f===n?e:0:-1,o?(f===r?t:i)-1:-1))}}};t.DomRenderer=w=r([i(7,p.IInstantiationService),i(8,u.ICharSizeService),i(9,p.IOptionsService),i(10,p.IBufferService),i(11,u.ICoreBrowserService),i(12,u.IThemeService)],w)},3787:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DomRendererRowFactory=void 0;const o=n(2223),a=n(643),s=n(511),l=n(2585),c=n(8055),u=n(4725),d=n(4269),h=n(6171),f=n(3734);let p=t.DomRendererRowFactory=class{constructor(e,t,n,r,i,o,a){this._document=e,this._characterJoinerService=t,this._optionsService=n,this._coreBrowserService=r,this._coreService=i,this._decorationService=o,this._themeService=a,this._workCell=new s.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(e,t,n){this._selectionStart=e,this._selectionEnd=t,this._columnSelectMode=n}createRow(e,t,n,r,i,s,l,u,h,p,g){const v=[],b=this._characterJoinerService.getJoinedCharacters(t),y=this._themeService.colors;let _,S=e.getNoBgTrimmedLength();n&&S<s+1&&(S=s+1);let w=0,C="",x=0,E=0,k=0,O=!1,$=0,R=!1,I=0;const M=[],P=-1!==p&&-1!==g;for(let N=0;N<S;N++){e.loadCell(N,this._workCell);let S=this._workCell.getWidth();if(0===S)continue;let L=!1,T=N,D=this._workCell;if(b.length>0&&N===b[0][0]){L=!0;const t=b.shift();D=new d.JoinedCellData(this._workCell,e.translateToString(!0,t[0],t[1]),t[1]-t[0]),T=t[1]-1,S=D.getWidth()}const A=this._isCellInSelection(N,t),B=n&&N===s,j=P&&N>=p&&N<=g;let z=!1;this._decorationService.forEachDecorationAtCell(N,t,void 0,(e=>{z=!0}));let H=D.getChars()||a.WHITESPACE_CELL_CHAR;if(" "===H&&(D.isUnderline()||D.isOverline())&&(H="\xa0"),I=S*u-h.get(H,D.isBold(),D.isItalic()),_){if(w&&(A&&R||!A&&!R&&D.bg===x)&&(A&&R&&y.selectionForeground||D.fg===E)&&D.extended.ext===k&&j===O&&I===$&&!B&&!L&&!z){D.isInvisible()?C+=a.WHITESPACE_CELL_CHAR:C+=H,w++;continue}w&&(_.textContent=C),_=this._document.createElement("span"),w=0,C=""}else _=this._document.createElement("span");if(x=D.bg,E=D.fg,k=D.extended.ext,O=j,$=I,R=A,L&&s>=N&&s<=T&&(s=N),!this._coreService.isCursorHidden&&B&&this._coreService.isCursorInitialized)if(M.push("xterm-cursor"),this._coreBrowserService.isFocused)l&&M.push("xterm-cursor-blink"),M.push("bar"===r?"xterm-cursor-bar":"underline"===r?"xterm-cursor-underline":"xterm-cursor-block");else if(i)switch(i){case"outline":M.push("xterm-cursor-outline");break;case"block":M.push("xterm-cursor-block");break;case"bar":M.push("xterm-cursor-bar");break;case"underline":M.push("xterm-cursor-underline")}if(D.isBold()&&M.push("xterm-bold"),D.isItalic()&&M.push("xterm-italic"),D.isDim()&&M.push("xterm-dim"),C=D.isInvisible()?a.WHITESPACE_CELL_CHAR:D.getChars()||a.WHITESPACE_CELL_CHAR,D.isUnderline()&&(M.push(`xterm-underline-${D.extended.underlineStyle}`)," "===C&&(C="\xa0"),!D.isUnderlineColorDefault()))if(D.isUnderlineColorRGB())_.style.textDecorationColor=`rgb(${f.AttributeData.toColorRGB(D.getUnderlineColor()).join(",")})`;else{let e=D.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&D.isBold()&&e<8&&(e+=8),_.style.textDecorationColor=y.ansi[e].css}D.isOverline()&&(M.push("xterm-overline")," "===C&&(C="\xa0")),D.isStrikethrough()&&M.push("xterm-strikethrough"),j&&(_.style.textDecoration="underline");let F=D.getFgColor(),W=D.getFgColorMode(),K=D.getBgColor(),V=D.getBgColorMode();const U=!!D.isInverse();if(U){const e=F;F=K,K=e;const t=W;W=V,V=t}let q,X,G,Y=!1;switch(this._decorationService.forEachDecorationAtCell(N,t,void 0,(e=>{"top"!==e.options.layer&&Y||(e.backgroundColorRGB&&(V=50331648,K=e.backgroundColorRGB.rgba>>8&16777215,q=e.backgroundColorRGB),e.foregroundColorRGB&&(W=50331648,F=e.foregroundColorRGB.rgba>>8&16777215,X=e.foregroundColorRGB),Y="top"===e.options.layer)})),!Y&&A&&(q=this._coreBrowserService.isFocused?y.selectionBackgroundOpaque:y.selectionInactiveBackgroundOpaque,K=q.rgba>>8&16777215,V=50331648,Y=!0,y.selectionForeground&&(W=50331648,F=y.selectionForeground.rgba>>8&16777215,X=y.selectionForeground)),Y&&M.push("xterm-decoration-top"),V){case 16777216:case 33554432:G=y.ansi[K],M.push(`xterm-bg-${K}`);break;case 50331648:G=c.channels.toColor(K>>16,K>>8&255,255&K),this._addStyle(_,`background-color:#${m((K>>>0).toString(16),"0",6)}`);break;default:U?(G=y.foreground,M.push(`xterm-bg-${o.INVERTED_DEFAULT_COLOR}`)):G=y.background}switch(q||D.isDim()&&(q=c.color.multiplyOpacity(G,.5)),W){case 16777216:case 33554432:D.isBold()&&F<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(F+=8),this._applyMinimumContrast(_,G,y.ansi[F],D,q,void 0)||M.push(`xterm-fg-${F}`);break;case 50331648:const e=c.channels.toColor(F>>16&255,F>>8&255,255&F);this._applyMinimumContrast(_,G,e,D,q,X)||this._addStyle(_,`color:#${m(F.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(_,G,y.foreground,D,q,X)||U&&M.push(`xterm-fg-${o.INVERTED_DEFAULT_COLOR}`)}M.length&&(_.className=M.join(" "),M.length=0),B||L||z?_.textContent=C:w++,I!==this.defaultSpacing&&(_.style.letterSpacing=`${I}px`),v.push(_),N=T}return _&&w&&(_.textContent=C),v}_applyMinimumContrast(e,t,n,r,i,o){if(1===this._optionsService.rawOptions.minimumContrastRatio||(0,h.treatGlyphAsBackgroundColor)(r.getCode()))return!1;const a=this._getContrastCache(r);let s;if(i||o||(s=a.getColor(t.rgba,n.rgba)),void 0===s){const e=this._optionsService.rawOptions.minimumContrastRatio/(r.isDim()?2:1);s=c.color.ensureContrastRatio(i||t,o||n,e),a.setColor((i||t).rgba,(o||n).rgba,s??null)}return!!s&&(this._addStyle(e,`color:${s.css}`),!0)}_getContrastCache(e){return e.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(e,t){e.setAttribute("style",`${e.getAttribute("style")||""}${t};`)}_isCellInSelection(e,t){const n=this._selectionStart,r=this._selectionEnd;return!(!n||!r)&&(this._columnSelectMode?n[0]<=r[0]?e>=n[0]&&t>=n[1]&&e<r[0]&&t<=r[1]:e<n[0]&&t>=n[1]&&e>=r[0]&&t<=r[1]:t>n[1]&&t<r[1]||n[1]===r[1]&&t===n[1]&&e>=n[0]&&e<r[0]||n[1]<r[1]&&t===r[1]&&e<r[0]||n[1]<r[1]&&t===n[1]&&e>=n[0])}};function m(e,t,n){for(;e.length<n;)e=t+e;return e}t.DomRendererRowFactory=p=r([i(1,u.ICharacterJoinerService),i(2,l.IOptionsService),i(3,u.ICoreBrowserService),i(4,l.ICoreService),i(5,l.IDecorationService),i(6,u.IThemeService)],p)},2550:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WidthCache=void 0,t.WidthCache=class{constructor(e,t){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=e.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const n=e.createElement("span");n.classList.add("xterm-char-measure-element");const r=e.createElement("span");r.classList.add("xterm-char-measure-element"),r.style.fontWeight="bold";const i=e.createElement("span");i.classList.add("xterm-char-measure-element"),i.style.fontStyle="italic";const o=e.createElement("span");o.classList.add("xterm-char-measure-element"),o.style.fontWeight="bold",o.style.fontStyle="italic",this._measureElements=[n,r,i,o],this._container.appendChild(n),this._container.appendChild(r),this._container.appendChild(i),this._container.appendChild(o),t.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(e,t,n,r){e===this._font&&t===this._fontSize&&n===this._weight&&r===this._weightBold||(this._font=e,this._fontSize=t,this._weight=n,this._weightBold=r,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${n}`,this._measureElements[1].style.fontWeight=`${r}`,this._measureElements[2].style.fontWeight=`${n}`,this._measureElements[3].style.fontWeight=`${r}`,this.clear())}get(e,t,n){let r=0;if(!t&&!n&&1===e.length&&(r=e.charCodeAt(0))<256){if(-9999!==this._flat[r])return this._flat[r];const t=this._measure(e,0);return t>0&&(this._flat[r]=t),t}let i=e;t&&(i+="B"),n&&(i+="I");let o=this._holey.get(i);if(void 0===o){let r=0;t&&(r|=1),n&&(r|=2),o=this._measure(e,r),o>0&&this._holey.set(i,o)}return o}_measure(e,t){const n=this._measureElements[t];return n.textContent=e.repeat(32),n.offsetWidth/32}}},2223:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TEXT_BASELINE=t.DIM_OPACITY=t.INVERTED_DEFAULT_COLOR=void 0;const r=n(6114);t.INVERTED_DEFAULT_COLOR=257,t.DIM_OPACITY=.5,t.TEXT_BASELINE=r.isFirefox||r.isLegacyEdge?"bottom":"ideographic"},6171:(e,t)=>{function n(e){return 57508<=e&&e<=57558}function r(e){return e>=128512&&e<=128591||e>=127744&&e<=128511||e>=128640&&e<=128767||e>=9728&&e<=9983||e>=9984&&e<=10175||e>=65024&&e<=65039||e>=129280&&e<=129535||e>=127462&&e<=127487}Object.defineProperty(t,"__esModule",{value:!0}),t.computeNextVariantOffset=t.createRenderDimensions=t.treatGlyphAsBackgroundColor=t.allowRescaling=t.isEmoji=t.isRestrictedPowerlineGlyph=t.isPowerlineGlyph=t.throwIfFalsy=void 0,t.throwIfFalsy=function(e){if(!e)throw new Error("value must not be falsy");return e},t.isPowerlineGlyph=n,t.isRestrictedPowerlineGlyph=function(e){return 57520<=e&&e<=57527},t.isEmoji=r,t.allowRescaling=function(e,t,i,o){return 1===t&&i>Math.ceil(1.5*o)&&void 0!==e&&e>255&&!r(e)&&!n(e)&&!function(e){return 57344<=e&&e<=63743}(e)},t.treatGlyphAsBackgroundColor=function(e){return n(e)||function(e){return 9472<=e&&e<=9631}(e)},t.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},t.computeNextVariantOffset=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return(e-(2*Math.round(t)-n))%(2*Math.round(t))}},6052:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createSelectionRenderModel=void 0;class n{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.selectionStart=t,this.selectionEnd=n,!t||!n||t[0]===n[0]&&t[1]===n[1])return void this.clear();const i=e.buffers.active.ydisp,o=t[1]-i,a=n[1]-i,s=Math.max(o,0),l=Math.min(a,e.rows-1);s>=e.rows||l<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=r,this.viewportStartRow=o,this.viewportEndRow=a,this.viewportCappedStartRow=s,this.viewportCappedEndRow=l,this.startCol=t[0],this.endCol=n[0])}isCellSelected(e,t,n){return!!this.hasSelection&&(n-=e.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?t>=this.startCol&&n>=this.viewportCappedStartRow&&t<this.endCol&&n<=this.viewportCappedEndRow:t<this.startCol&&n>=this.viewportCappedStartRow&&t>=this.endCol&&n<=this.viewportCappedEndRow:n>this.viewportStartRow&&n<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&n===this.viewportStartRow&&t>=this.startCol&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&n===this.viewportEndRow&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&n===this.viewportStartRow&&t>=this.startCol)}}t.createSelectionRenderModel=function(){return new n}},456:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionModel=void 0,t.SelectionModel=class{constructor(e){this._bufferService=e,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?e%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)-1]:[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[e,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[Math.max(e,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const e=this.selectionStart,t=this.selectionEnd;return!(!e||!t)&&(e[1]>t[1]||e[1]===t[1]&&e[0]>t[0])}handleTrim(e){return this.selectionStart&&(this.selectionStart[1]-=e),this.selectionEnd&&(this.selectionEnd[1]-=e),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CharSizeService=void 0;const o=n(2585),a=n(8460),s=n(844);let l=t.CharSizeService=class extends s.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(e,t,n){super(),this._optionsService=n,this.width=0,this.height=0,this._onCharSizeChange=this.register(new a.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new d(this._optionsService))}catch{this._measureStrategy=this.register(new u(e,t,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const e=this._measureStrategy.measure();e.width===this.width&&e.height===this.height||(this.width=e.width,this.height=e.height,this._onCharSizeChange.fire())}};t.CharSizeService=l=r([i(2,o.IOptionsService)],l);class c extends s.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(e,t){void 0!==e&&e>0&&void 0!==t&&t>0&&(this._result.width=e,this._result.height=t)}}class u extends c{constructor(e,t,n){super(),this._document=e,this._parentElement=t,this._optionsService=n,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class d extends c{constructor(e){super(),this._optionsService=e,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const t=this._ctx.measureText("W");if(!("width"in t&&"fontBoundingBoxAscent"in t&&"fontBoundingBoxDescent"in t))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const e=this._ctx.measureText("W");return this._validateAndSet(e.width,e.fontBoundingBoxAscent+e.fontBoundingBoxDescent),this._result}}},4269:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CharacterJoinerService=t.JoinedCellData=void 0;const o=n(3734),a=n(643),s=n(511),l=n(2585);class c extends o.AttributeData{constructor(e,t,n){super(),this.content=0,this.combinedData="",this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=n}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}t.JoinedCellData=c;let u=t.CharacterJoinerService=class e{constructor(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new s.CellData}register(e){const t={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(t),t.id}deregister(e){for(let t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===e)return this._characterJoiners.splice(t,1),!0;return!1}getJoinedCharacters(e){if(0===this._characterJoiners.length)return[];const t=this._bufferService.buffer.lines.get(e);if(!t||0===t.length)return[];const n=[],r=t.translateToString(!0);let i=0,o=0,s=0,l=t.getFg(0),c=t.getBg(0);for(let u=0;u<t.getTrimmedLength();u++)if(t.loadCell(u,this._workCell),0!==this._workCell.getWidth()){if(this._workCell.fg!==l||this._workCell.bg!==c){if(u-i>1){const e=this._getJoinedRanges(r,s,o,t,i);for(let t=0;t<e.length;t++)n.push(e[t])}i=u,s=o,l=this._workCell.fg,c=this._workCell.bg}o+=this._workCell.getChars().length||a.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-i>1){const e=this._getJoinedRanges(r,s,o,t,i);for(let t=0;t<e.length;t++)n.push(e[t])}return n}_getJoinedRanges(t,n,r,i,o){const a=t.substring(n,r);let s=[];try{s=this._characterJoiners[0].handler(a)}catch(e){console.error(e)}for(let l=1;l<this._characterJoiners.length;l++)try{const t=this._characterJoiners[l].handler(a);for(let n=0;n<t.length;n++)e._mergeRanges(s,t[n])}catch(e){console.error(e)}return this._stringRangesToCellRanges(s,i,o),s}_stringRangesToCellRanges(e,t,n){let r=0,i=!1,o=0,s=e[r];if(s){for(let l=n;l<this._bufferService.cols;l++){const n=t.getWidth(l),c=t.getString(l).length||a.WHITESPACE_CELL_CHAR.length;if(0!==n){if(!i&&s[0]<=o&&(s[0]=l,i=!0),s[1]<=o){if(s[1]=l,s=e[++r],!s)break;s[0]<=o?(s[0]=l,i=!0):i=!1}o+=c}}s&&(s[1]=this._bufferService.cols)}}static _mergeRanges(e,t){let n=!1;for(let r=0;r<e.length;r++){const i=e[r];if(n){if(t[1]<=i[0])return e[r-1][1]=t[1],e;if(t[1]<=i[1])return e[r-1][1]=Math.max(t[1],i[1]),e.splice(r,1),e;e.splice(r,1),r--}else{if(t[1]<=i[0])return e.splice(r,0,t),e;if(t[1]<=i[1])return i[0]=Math.min(t[0],i[0]),e;t[0]<i[1]&&(i[0]=Math.min(t[0],i[0]),n=!0)}}return n?e[e.length-1][1]=t[1]:e.push(t),e}};t.CharacterJoinerService=u=r([i(0,l.IBufferService)],u)},5114:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CoreBrowserService=void 0;const r=n(844),i=n(8460),o=n(3656);class a extends r.Disposable{constructor(e,t,n){super(),this._textarea=e,this._window=t,this.mainDocument=n,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new s(this._window),this._onDprChange=this.register(new i.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new i.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((e=>this._screenDprMonitor.setWindow(e)))),this.register((0,i.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(e){this._window!==e&&(this._window=e,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return void 0===this._cachedIsFocused&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}t.CoreBrowserService=a;class s extends r.Disposable{constructor(e){super(),this._parentWindow=e,this._windowResizeListener=this.register(new r.MutableDisposable),this._onDprChange=this.register(new i.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,r.toDisposable)((()=>this.clearListener())))}setWindow(e){this._parentWindow=e,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,o.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){this._outerListener&&(this._resolutionMediaMatchList?.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LinkProviderService=void 0;const r=n(844);class i extends r.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,r.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(e){return this.linkProviders.push(e),{dispose:()=>{const t=this.linkProviders.indexOf(e);-1!==t&&this.linkProviders.splice(t,1)}}}}t.LinkProviderService=i},8934:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.MouseService=void 0;const o=n(4725),a=n(9806);let s=t.MouseService=class{constructor(e,t){this._renderService=e,this._charSizeService=t}getCoords(e,t,n,r,i){return(0,a.getCoords)(window,e,t,n,r,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,i)}getMouseReportCoords(e,t){const n=(0,a.getCoordsRelativeToElement)(window,e,t);if(this._charSizeService.hasValidSize)return n[0]=Math.min(Math.max(n[0],0),this._renderService.dimensions.css.canvas.width-1),n[1]=Math.min(Math.max(n[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(n[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(n[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(n[0]),y:Math.floor(n[1])}}};t.MouseService=s=r([i(0,o.IRenderService),i(1,o.ICharSizeService)],s)},3230:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RenderService=void 0;const o=n(6193),a=n(4725),s=n(8460),l=n(844),c=n(7226),u=n(2585);let d=t.RenderService=class extends l.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(e,t,n,r,i,a,u,d){super(),this._rowCount=e,this._charSizeService=r,this._renderer=this.register(new l.MutableDisposable),this._pausedResizeTask=new c.DebouncedIdleTask,this._observerDisposable=this.register(new l.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new s.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new s.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new s.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new s.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new o.RenderDebouncer(((e,t)=>this._renderRows(e,t)),u),this.register(this._renderDebouncer),this.register(u.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(a.onResize((()=>this._fullRefresh()))),this.register(a.buffers.onBufferActivate((()=>this._renderer.value?.clear()))),this.register(n.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(i.onDecorationRegistered((()=>this._fullRefresh()))),this.register(i.onDecorationRemoved((()=>this._fullRefresh()))),this.register(n.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(a.cols,a.rows),this._fullRefresh()}))),this.register(n.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(a.buffer.y,a.buffer.y,!0)))),this.register(d.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(u.window,t),this.register(u.onWindowChange((e=>this._registerIntersectionObserver(e,t))))}_registerIntersectionObserver(e,t){if("IntersectionObserver"in e){const n=new e.IntersectionObserver((e=>this._handleIntersectionChange(e[e.length-1])),{threshold:0});n.observe(t),this._observerDisposable.value=(0,l.toDisposable)((()=>n.disconnect()))}}_handleIntersectionChange(e){this._isPaused=void 0===e.isIntersecting?0===e.intersectionRatio:!e.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this._isPaused?this._needsFullRefresh=!0:(n||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(e,t,this._rowCount))}_renderRows(e,t){this._renderer.value&&(e=Math.min(e,this._rowCount-1),t=Math.min(t,this._rowCount-1),this._renderer.value.renderRows(e,t),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:e,end:t}),this._onRender.fire({start:e,end:t}),this._isNextRenderRedrawOnly=!0)}resize(e,t){this._rowCount=t,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(e){this._renderer.value=e,this._renderer.value&&(this._renderer.value.onRequestRedraw((e=>this.refreshRows(e.start,e.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(e){return this._renderDebouncer.addRefreshCallback(e)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){this._renderer.value&&(this._renderer.value.clearTextureAtlas?.(),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(e,t){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>this._renderer.value?.handleResize(e,t))):this._renderer.value.handleResize(e,t),this._fullRefresh())}handleCharSizeChanged(){this._renderer.value?.handleCharSizeChanged()}handleBlur(){this._renderer.value?.handleBlur()}handleFocus(){this._renderer.value?.handleFocus()}handleSelectionChanged(e,t,n){this._selectionState.start=e,this._selectionState.end=t,this._selectionState.columnSelectMode=n,this._renderer.value?.handleSelectionChanged(e,t,n)}handleCursorMove(){this._renderer.value?.handleCursorMove()}clear(){this._renderer.value?.clear()}};t.RenderService=d=r([i(2,u.IOptionsService),i(3,a.ICharSizeService),i(4,u.IDecorationService),i(5,u.IBufferService),i(6,a.ICoreBrowserService),i(7,a.IThemeService)],d)},9312:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionService=void 0;const o=n(9806),a=n(9504),s=n(456),l=n(4725),c=n(8460),u=n(844),d=n(6114),h=n(4841),f=n(511),p=n(2585),m=String.fromCharCode(160),g=new RegExp(m,"g");let v=t.SelectionService=class extends u.Disposable{constructor(e,t,n,r,i,o,a,l,d){super(),this._element=e,this._screenElement=t,this._linkifier=n,this._bufferService=r,this._coreService=i,this._mouseService=o,this._optionsService=a,this._renderService=l,this._coreBrowserService=d,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new f.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new c.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new c.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new c.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new c.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=e=>this._handleMouseMove(e),this._mouseUpListener=e=>this._handleMouseUp(e),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((e=>this._handleTrim(e))),this.register(this._bufferService.buffers.onBufferActivate((e=>this._handleBufferActivate(e)))),this.enable(),this._model=new s.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,u.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;return!(!e||!t||e[0]===t[0]&&e[1]===t[1])}get selectionText(){const e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;if(!e||!t)return"";const n=this._bufferService.buffer,r=[];if(3===this._activeSelectionMode){if(e[0]===t[0])return"";const i=e[0]<t[0]?e[0]:t[0],o=e[0]<t[0]?t[0]:e[0];for(let a=e[1];a<=t[1];a++){const e=n.translateBufferLineToString(a,!0,i,o);r.push(e)}}else{const i=e[1]===t[1]?t[0]:void 0;r.push(n.translateBufferLineToString(e[1],!0,e[0],i));for(let o=e[1]+1;o<=t[1]-1;o++){const e=n.lines.get(o),t=n.translateBufferLineToString(o,!0);e?.isWrapped?r[r.length-1]+=t:r.push(t)}if(e[1]!==t[1]){const e=n.lines.get(t[1]),i=n.translateBufferLineToString(t[1],!0,0,t[0]);e&&e.isWrapped?r[r.length-1]+=i:r.push(i)}}return r.map((e=>e.replace(g," "))).join(d.isWindows?"\r\n":"\n")}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(e){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),d.isLinux&&e&&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:3===this._activeSelectionMode})}_isClickInSelection(e){const t=this._getMouseBufferCoords(e),n=this._model.finalSelectionStart,r=this._model.finalSelectionEnd;return!!(n&&r&&t)&&this._areCoordsInSelection(t,n,r)}isCellInSelection(e,t){const n=this._model.finalSelectionStart,r=this._model.finalSelectionEnd;return!(!n||!r)&&this._areCoordsInSelection([e,t],n,r)}_areCoordsInSelection(e,t,n){return e[1]>t[1]&&e[1]<n[1]||t[1]===n[1]&&e[1]===t[1]&&e[0]>=t[0]&&e[0]<n[0]||t[1]<n[1]&&e[1]===n[1]&&e[0]<n[0]||t[1]<n[1]&&e[1]===t[1]&&e[0]>=t[0]}_selectWordAtCursor(e,t){const n=this._linkifier.currentLink?.link?.range;if(n)return this._model.selectionStart=[n.start.x-1,n.start.y-1],this._model.selectionStartLength=(0,h.getRangeLength)(n,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const r=this._getMouseBufferCoords(e);return!!r&&(this._selectWordAt(r,t),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(e,t){this._model.clearSelection(),e=Math.max(e,0),t=Math.min(t,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,e],this._model.selectionEnd=[this._bufferService.cols,t],this.refresh(),this._onSelectionChange.fire()}_handleTrim(e){this._model.handleTrim(e)&&this.refresh()}_getMouseBufferCoords(e){const t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(t)return t[0]--,t[1]--,t[1]+=this._bufferService.buffer.ydisp,t}_getMouseEventScrollAmount(e){let t=(0,o.getCoordsRelativeToElement)(this._coreBrowserService.window,e,this._screenElement)[1];const n=this._renderService.dimensions.css.canvas.height;return t>=0&&t<=n?0:(t>n&&(t-=n),t=Math.min(Math.max(t,-50),50),t/=50,t/Math.abs(t)+Math.round(14*t))}shouldForceSelection(e){return d.isMac?e.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:e.shiftKey}handleMouseDown(e){if(this._mouseDownTimeStamp=e.timeStamp,(2!==e.button||!this.hasSelection)&&0===e.button){if(!this._enabled){if(!this.shouldForceSelection(e))return;e.stopPropagation()}e.preventDefault(),this._dragScrollAmount=0,this._enabled&&e.shiftKey?this._handleIncrementalClick(e):1===e.detail?this._handleSingleClick(e):2===e.detail?this._handleDoubleClick(e):3===e.detail&&this._handleTripleClick(e),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(e){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(e))}_handleSingleClick(e){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(e)?3:0,this._model.selectionStart=this._getMouseBufferCoords(e),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const t=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);t&&t.length!==this._model.selectionStart[0]&&0===t.hasWidth(this._model.selectionStart[0])&&this._model.selectionStart[0]++}_handleDoubleClick(e){this._selectWordAtCursor(e,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(e){const t=this._getMouseBufferCoords(e);t&&(this._activeSelectionMode=2,this._selectLineAt(t[1]))}shouldColumnSelect(e){return e.altKey&&!(d.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(e){if(e.stopImmediatePropagation(),!this._model.selectionStart)return;const t=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(e),!this._model.selectionEnd)return void this.refresh(!0);2===this._activeSelectionMode?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:1===this._activeSelectionMode&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(e),3!==this._activeSelectionMode&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const n=this._bufferService.buffer;if(this._model.selectionEnd[1]<n.lines.length){const e=n.lines.get(this._model.selectionEnd[1]);e&&0===e.hasWidth(this._model.selectionEnd[0])&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}t&&t[0]===this._model.selectionEnd[0]&&t[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});const e=this._bufferService.buffer;this._dragScrollAmount>0?(3!==this._activeSelectionMode&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(e.ydisp+this._bufferService.rows,e.lines.length-1)):(3!==this._activeSelectionMode&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=e.ydisp),this.refresh()}}_handleMouseUp(e){const t=e.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&t<500&&e.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const t=this._mouseService.getCoords(e,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(t&&void 0!==t[0]&&void 0!==t[1]){const e=(0,a.moveToCellSequence)(t[0]-1,t[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(e,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd,n=!(!e||!t||e[0]===t[0]&&e[1]===t[1]);n?e&&t&&(this._oldSelectionStart&&this._oldSelectionEnd&&e[0]===this._oldSelectionStart[0]&&e[1]===this._oldSelectionStart[1]&&t[0]===this._oldSelectionEnd[0]&&t[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(e,t,n)):this._oldHasSelection&&this._fireOnSelectionChange(e,t,n)}_fireOnSelectionChange(e,t,n){this._oldSelectionStart=e,this._oldSelectionEnd=t,this._oldHasSelection=n,this._onSelectionChange.fire()}_handleBufferActivate(e){this.clearSelection(),this._trimListener.dispose(),this._trimListener=e.activeBuffer.lines.onTrim((e=>this._handleTrim(e)))}_convertViewportColToCharacterIndex(e,t){let n=t;for(let r=0;t>=r;r++){const i=e.loadCell(r,this._workCell).getChars().length;0===this._workCell.getWidth()?n--:i>1&&t!==r&&(n+=i-1)}return n}setSelection(e,t,n){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[e,t],this._model.selectionStartLength=n,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(e){this._isClickInSelection(e)||(this._selectWordAtCursor(e,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(e[0]>=this._bufferService.cols)return;const i=this._bufferService.buffer,o=i.lines.get(e[1]);if(!o)return;const a=i.translateBufferLineToString(e[1],!1);let s=this._convertViewportColToCharacterIndex(o,e[0]),l=s;const c=e[0]-s;let u=0,d=0,h=0,f=0;if(" "===a.charAt(s)){for(;s>0&&" "===a.charAt(s-1);)s--;for(;l<a.length&&" "===a.charAt(l+1);)l++}else{let t=e[0],n=e[0];0===o.getWidth(t)&&(u++,t--),2===o.getWidth(n)&&(d++,n++);const r=o.getString(n).length;for(r>1&&(f+=r-1,l+=r-1);t>0&&s>0&&!this._isCharWordSeparator(o.loadCell(t-1,this._workCell));){o.loadCell(t-1,this._workCell);const e=this._workCell.getChars().length;0===this._workCell.getWidth()?(u++,t--):e>1&&(h+=e-1,s-=e-1),s--,t--}for(;n<o.length&&l+1<a.length&&!this._isCharWordSeparator(o.loadCell(n+1,this._workCell));){o.loadCell(n+1,this._workCell);const e=this._workCell.getChars().length;2===this._workCell.getWidth()?(d++,n++):e>1&&(f+=e-1,l+=e-1),l++,n++}}l++;let p=s+c-u+h,m=Math.min(this._bufferService.cols,l-s+u+d-h-f);if(t||""!==a.slice(s,l).trim()){if(n&&0===p&&32!==o.getCodePoint(0)){const t=i.lines.get(e[1]-1);if(t&&o.isWrapped&&32!==t.getCodePoint(this._bufferService.cols-1)){const t=this._getWordAt([this._bufferService.cols-1,e[1]-1],!1,!0,!1);if(t){const e=this._bufferService.cols-t.start;p-=e,m+=e}}}if(r&&p+m===this._bufferService.cols&&32!==o.getCodePoint(this._bufferService.cols-1)){const t=i.lines.get(e[1]+1);if(t?.isWrapped&&32!==t.getCodePoint(0)){const t=this._getWordAt([0,e[1]+1],!1,!1,!0);t&&(m+=t.length)}}return{start:p,length:m}}}_selectWordAt(e,t){const n=this._getWordAt(e,t);if(n){for(;n.start<0;)n.start+=this._bufferService.cols,e[1]--;this._model.selectionStart=[n.start,e[1]],this._model.selectionStartLength=n.length}}_selectToWordAt(e){const t=this._getWordAt(e,!0);if(t){let n=e[1];for(;t.start<0;)t.start+=this._bufferService.cols,n--;if(!this._model.areSelectionValuesReversed())for(;t.start+t.length>this._bufferService.cols;)t.length-=this._bufferService.cols,n++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?t.start:t.start+t.length,n]}}_isCharWordSeparator(e){return 0!==e.getWidth()&&this._optionsService.rawOptions.wordSeparator.indexOf(e.getChars())>=0}_selectLineAt(e){const t=this._bufferService.buffer.getWrappedRangeForLine(e),n={start:{x:0,y:t.first},end:{x:this._bufferService.cols-1,y:t.last}};this._model.selectionStart=[0,t.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,h.getRangeLength)(n,this._bufferService.cols)}};t.SelectionService=v=r([i(3,p.IBufferService),i(4,p.ICoreService),i(5,l.IMouseService),i(6,p.IOptionsService),i(7,l.IRenderService),i(8,l.ICoreBrowserService)],v)},4725:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ILinkProviderService=t.IThemeService=t.ICharacterJoinerService=t.ISelectionService=t.IRenderService=t.IMouseService=t.ICoreBrowserService=t.ICharSizeService=void 0;const r=n(8343);t.ICharSizeService=(0,r.createDecorator)("CharSizeService"),t.ICoreBrowserService=(0,r.createDecorator)("CoreBrowserService"),t.IMouseService=(0,r.createDecorator)("MouseService"),t.IRenderService=(0,r.createDecorator)("RenderService"),t.ISelectionService=(0,r.createDecorator)("SelectionService"),t.ICharacterJoinerService=(0,r.createDecorator)("CharacterJoinerService"),t.IThemeService=(0,r.createDecorator)("ThemeService"),t.ILinkProviderService=(0,r.createDecorator)("LinkProviderService")},6731:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ThemeService=t.DEFAULT_ANSI_COLORS=void 0;const o=n(7239),a=n(8055),s=n(8460),l=n(844),c=n(2585),u=a.css.toColor("#ffffff"),d=a.css.toColor("#000000"),h=a.css.toColor("#ffffff"),f=a.css.toColor("#000000"),p={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};t.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const e=[a.css.toColor("#2e3436"),a.css.toColor("#cc0000"),a.css.toColor("#4e9a06"),a.css.toColor("#c4a000"),a.css.toColor("#3465a4"),a.css.toColor("#75507b"),a.css.toColor("#06989a"),a.css.toColor("#d3d7cf"),a.css.toColor("#555753"),a.css.toColor("#ef2929"),a.css.toColor("#8ae234"),a.css.toColor("#fce94f"),a.css.toColor("#729fcf"),a.css.toColor("#ad7fa8"),a.css.toColor("#34e2e2"),a.css.toColor("#eeeeec")],t=[0,95,135,175,215,255];for(let n=0;n<216;n++){const r=t[n/36%6|0],i=t[n/6%6|0],o=t[n%6];e.push({css:a.channels.toCss(r,i,o),rgba:a.channels.toRgba(r,i,o)})}for(let n=0;n<24;n++){const t=8+10*n;e.push({css:a.channels.toCss(t,t,t),rgba:a.channels.toRgba(t,t,t)})}return e})());let m=t.ThemeService=class extends l.Disposable{get colors(){return this._colors}constructor(e){super(),this._optionsService=e,this._contrastCache=new o.ColorContrastCache,this._halfContrastCache=new o.ColorContrastCache,this._onChangeColors=this.register(new s.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:u,background:d,cursor:h,cursorAccent:f,selectionForeground:void 0,selectionBackgroundTransparent:p,selectionBackgroundOpaque:a.color.blend(d,p),selectionInactiveBackgroundTransparent:p,selectionInactiveBackgroundOpaque:a.color.blend(d,p),ansi:t.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 e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=this._colors;if(n.foreground=g(e.foreground,u),n.background=g(e.background,d),n.cursor=g(e.cursor,h),n.cursorAccent=g(e.cursorAccent,f),n.selectionBackgroundTransparent=g(e.selectionBackground,p),n.selectionBackgroundOpaque=a.color.blend(n.background,n.selectionBackgroundTransparent),n.selectionInactiveBackgroundTransparent=g(e.selectionInactiveBackground,n.selectionBackgroundTransparent),n.selectionInactiveBackgroundOpaque=a.color.blend(n.background,n.selectionInactiveBackgroundTransparent),n.selectionForeground=e.selectionForeground?g(e.selectionForeground,a.NULL_COLOR):void 0,n.selectionForeground===a.NULL_COLOR&&(n.selectionForeground=void 0),a.color.isOpaque(n.selectionBackgroundTransparent)){const e=.3;n.selectionBackgroundTransparent=a.color.opacity(n.selectionBackgroundTransparent,e)}if(a.color.isOpaque(n.selectionInactiveBackgroundTransparent)){const e=.3;n.selectionInactiveBackgroundTransparent=a.color.opacity(n.selectionInactiveBackgroundTransparent,e)}if(n.ansi=t.DEFAULT_ANSI_COLORS.slice(),n.ansi[0]=g(e.black,t.DEFAULT_ANSI_COLORS[0]),n.ansi[1]=g(e.red,t.DEFAULT_ANSI_COLORS[1]),n.ansi[2]=g(e.green,t.DEFAULT_ANSI_COLORS[2]),n.ansi[3]=g(e.yellow,t.DEFAULT_ANSI_COLORS[3]),n.ansi[4]=g(e.blue,t.DEFAULT_ANSI_COLORS[4]),n.ansi[5]=g(e.magenta,t.DEFAULT_ANSI_COLORS[5]),n.ansi[6]=g(e.cyan,t.DEFAULT_ANSI_COLORS[6]),n.ansi[7]=g(e.white,t.DEFAULT_ANSI_COLORS[7]),n.ansi[8]=g(e.brightBlack,t.DEFAULT_ANSI_COLORS[8]),n.ansi[9]=g(e.brightRed,t.DEFAULT_ANSI_COLORS[9]),n.ansi[10]=g(e.brightGreen,t.DEFAULT_ANSI_COLORS[10]),n.ansi[11]=g(e.brightYellow,t.DEFAULT_ANSI_COLORS[11]),n.ansi[12]=g(e.brightBlue,t.DEFAULT_ANSI_COLORS[12]),n.ansi[13]=g(e.brightMagenta,t.DEFAULT_ANSI_COLORS[13]),n.ansi[14]=g(e.brightCyan,t.DEFAULT_ANSI_COLORS[14]),n.ansi[15]=g(e.brightWhite,t.DEFAULT_ANSI_COLORS[15]),e.extendedAnsi){const r=Math.min(n.ansi.length-16,e.extendedAnsi.length);for(let i=0;i<r;i++)n.ansi[i+16]=g(e.extendedAnsi[i],t.DEFAULT_ANSI_COLORS[i+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(e){this._restoreColor(e),this._onChangeColors.fire(this.colors)}_restoreColor(e){if(void 0!==e)switch(e){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[e]=this._restoreColors.ansi[e]}else for(let t=0;t<this._restoreColors.ansi.length;++t)this._colors.ansi[t]=this._restoreColors.ansi[t]}modifyColors(e){e(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 g(e,t){if(void 0!==e)try{return a.css.toColor(e)}catch{}return t}t.ThemeService=m=r([i(0,c.IOptionsService)],m)},6349:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CircularList=void 0;const r=n(8460),i=n(844);class o extends i.Disposable{constructor(e){super(),this._maxLength=e,this.onDeleteEmitter=this.register(new r.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new r.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new r.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(e){if(this._maxLength===e)return;const t=new Array(e);for(let n=0;n<Math.min(e,this.length);n++)t[n]=this._array[this._getCyclicIndex(n)];this._array=t,this._maxLength=e,this._startIndex=0}get length(){return this._length}set length(e){if(e>this._length)for(let t=this._length;t<e;t++)this._array[t]=void 0;this._length=e}get(e){return this._array[this._getCyclicIndex(e)]}set(e,t){this._array[this._getCyclicIndex(e)]=t}push(e){this._array[this._getCyclicIndex(this._length)]=e,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(e,t){if(t){for(let n=e;n<this._length-t;n++)this._array[this._getCyclicIndex(n)]=this._array[this._getCyclicIndex(n+t)];this._length-=t,this.onDeleteEmitter.fire({index:e,amount:t})}for(let n=this._length-1;n>=e;n--)this._array[this._getCyclicIndex(n+(arguments.length<=2?0:arguments.length-2))]=this._array[this._getCyclicIndex(n)];for(let n=0;n<(arguments.length<=2?0:arguments.length-2);n++)this._array[this._getCyclicIndex(e+n)]=n+2<2||arguments.length<=n+2?void 0:arguments[n+2];if((arguments.length<=2?0:arguments.length-2)&&this.onInsertEmitter.fire({index:e,amount:arguments.length<=2?0:arguments.length-2}),this._length+(arguments.length<=2?0:arguments.length-2)>this._maxLength){const e=this._length+(arguments.length<=2?0:arguments.length-2)-this._maxLength;this._startIndex+=e,this._length=this._maxLength,this.onTrimEmitter.fire(e)}else this._length+=arguments.length<=2?0:arguments.length-2}trimStart(e){e>this._length&&(e=this._length),this._startIndex+=e,this._length-=e,this.onTrimEmitter.fire(e)}shiftElements(e,t,n){if(!(t<=0)){if(e<0||e>=this._length)throw new Error("start argument out of range");if(e+n<0)throw new Error("Cannot shift elements in list beyond index 0");if(n>0){for(let i=t-1;i>=0;i--)this.set(e+i+n,this.get(e+i));const r=e+t+n-this._length;if(r>0)for(this._length+=r;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let r=0;r<t;r++)this.set(e+r+n,this.get(e+r))}}_getCyclicIndex(e){return(this._startIndex+e)%this._maxLength}}t.CircularList=o},1439:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.clone=void 0,t.clone=function e(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if("object"!=typeof t)return t;const r=Array.isArray(t)?[]:{};for(const i in t)r[i]=n<=1?t[i]:t[i]&&e(t[i],n-1);return r}},8055:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.contrastRatio=t.toPaddedHex=t.rgba=t.rgb=t.css=t.color=t.channels=t.NULL_COLOR=void 0;let n=0,r=0,i=0,o=0;var a,s,l,c,u;function d(e){const t=e.toString(16);return t.length<2?"0"+t:t}function h(e,t){return e<t?(t+.05)/(e+.05):(e+.05)/(t+.05)}t.NULL_COLOR={css:"#00000000",rgba:0},function(e){e.toCss=function(e,t,n,r){return void 0!==r?`#${d(e)}${d(t)}${d(n)}${d(r)}`:`#${d(e)}${d(t)}${d(n)}`},e.toRgba=function(e,t,n){return(e<<24|t<<16|n<<8|(arguments.length>3&&void 0!==arguments[3]?arguments[3]:255))>>>0},e.toColor=function(t,n,r,i){return{css:e.toCss(t,n,r,i),rgba:e.toRgba(t,n,r,i)}}}(a||(t.channels=a={})),function(e){function t(e,t){return o=Math.round(255*t),[n,r,i]=u.toChannels(e.rgba),{css:a.toCss(n,r,i,o),rgba:a.toRgba(n,r,i,o)}}e.blend=function(e,t){if(o=(255&t.rgba)/255,1===o)return{css:t.css,rgba:t.rgba};const s=t.rgba>>24&255,l=t.rgba>>16&255,c=t.rgba>>8&255,u=e.rgba>>24&255,d=e.rgba>>16&255,h=e.rgba>>8&255;return n=u+Math.round((s-u)*o),r=d+Math.round((l-d)*o),i=h+Math.round((c-h)*o),{css:a.toCss(n,r,i),rgba:a.toRgba(n,r,i)}},e.isOpaque=function(e){return 255==(255&e.rgba)},e.ensureContrastRatio=function(e,t,n){const r=u.ensureContrastRatio(e.rgba,t.rgba,n);if(r)return a.toColor(r>>24&255,r>>16&255,r>>8&255)},e.opaque=function(e){const t=(255|e.rgba)>>>0;return[n,r,i]=u.toChannels(t),{css:a.toCss(n,r,i),rgba:t}},e.opacity=t,e.multiplyOpacity=function(e,n){return o=255&e.rgba,t(e,o*n/255)},e.toColorRGB=function(e){return[e.rgba>>24&255,e.rgba>>16&255,e.rgba>>8&255]}}(s||(t.color=s={})),function(e){let t,s;try{const e=document.createElement("canvas");e.width=1,e.height=1;const n=e.getContext("2d",{willReadFrequently:!0});n&&(t=n,t.globalCompositeOperation="copy",s=t.createLinearGradient(0,0,1,1))}catch{}e.toColor=function(e){if(e.match(/#[\da-f]{3,8}/i))switch(e.length){case 4:return n=parseInt(e.slice(1,2).repeat(2),16),r=parseInt(e.slice(2,3).repeat(2),16),i=parseInt(e.slice(3,4).repeat(2),16),a.toColor(n,r,i);case 5:return n=parseInt(e.slice(1,2).repeat(2),16),r=parseInt(e.slice(2,3).repeat(2),16),i=parseInt(e.slice(3,4).repeat(2),16),o=parseInt(e.slice(4,5).repeat(2),16),a.toColor(n,r,i,o);case 7:return{css:e,rgba:(parseInt(e.slice(1),16)<<8|255)>>>0};case 9:return{css:e,rgba:parseInt(e.slice(1),16)>>>0}}const l=e.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(l)return n=parseInt(l[1]),r=parseInt(l[2]),i=parseInt(l[3]),o=Math.round(255*(void 0===l[5]?1:parseFloat(l[5]))),a.toColor(n,r,i,o);if(!t||!s)throw new Error("css.toColor: Unsupported css format");if(t.fillStyle=s,t.fillStyle=e,"string"!=typeof t.fillStyle)throw new Error("css.toColor: Unsupported css format");if(t.fillRect(0,0,1,1),[n,r,i,o]=t.getImageData(0,0,1,1).data,255!==o)throw new Error("css.toColor: Unsupported css format");return{rgba:a.toRgba(n,r,i,o),css:e}}}(l||(t.css=l={})),function(e){function t(e,t,n){const r=e/255,i=t/255,o=n/255;return.2126*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))+.7152*(i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4))+.0722*(o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4))}e.relativeLuminance=function(e){return t(e>>16&255,e>>8&255,255&e)},e.relativeLuminance2=t}(c||(t.rgb=c={})),function(e){function t(e,t,n){const r=e>>24&255,i=e>>16&255,o=e>>8&255;let a=t>>24&255,s=t>>16&255,l=t>>8&255,u=h(c.relativeLuminance2(a,s,l),c.relativeLuminance2(r,i,o));for(;u<n&&(a>0||s>0||l>0);)a-=Math.max(0,Math.ceil(.1*a)),s-=Math.max(0,Math.ceil(.1*s)),l-=Math.max(0,Math.ceil(.1*l)),u=h(c.relativeLuminance2(a,s,l),c.relativeLuminance2(r,i,o));return(a<<24|s<<16|l<<8|255)>>>0}function s(e,t,n){const r=e>>24&255,i=e>>16&255,o=e>>8&255;let a=t>>24&255,s=t>>16&255,l=t>>8&255,u=h(c.relativeLuminance2(a,s,l),c.relativeLuminance2(r,i,o));for(;u<n&&(a<255||s<255||l<255);)a=Math.min(255,a+Math.ceil(.1*(255-a))),s=Math.min(255,s+Math.ceil(.1*(255-s))),l=Math.min(255,l+Math.ceil(.1*(255-l))),u=h(c.relativeLuminance2(a,s,l),c.relativeLuminance2(r,i,o));return(a<<24|s<<16|l<<8|255)>>>0}e.blend=function(e,t){if(o=(255&t)/255,1===o)return t;const s=t>>24&255,l=t>>16&255,c=t>>8&255,u=e>>24&255,d=e>>16&255,h=e>>8&255;return n=u+Math.round((s-u)*o),r=d+Math.round((l-d)*o),i=h+Math.round((c-h)*o),a.toRgba(n,r,i)},e.ensureContrastRatio=function(e,n,r){const i=c.relativeLuminance(e>>8),o=c.relativeLuminance(n>>8);if(h(i,o)<r){if(o<i){const o=t(e,n,r),a=h(i,c.relativeLuminance(o>>8));if(a<r){const t=s(e,n,r);return a>h(i,c.relativeLuminance(t>>8))?o:t}return o}const a=s(e,n,r),l=h(i,c.relativeLuminance(a>>8));if(l<r){const o=t(e,n,r);return l>h(i,c.relativeLuminance(o>>8))?a:o}return a}},e.reduceLuminance=t,e.increaseLuminance=s,e.toChannels=function(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]}}(u||(t.rgba=u={})),t.toPaddedHex=d,t.contrastRatio=h},8969:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CoreTerminal=void 0;const r=n(844),i=n(2585),o=n(4348),a=n(7866),s=n(744),l=n(7302),c=n(6975),u=n(8460),d=n(1753),h=n(1480),f=n(7994),p=n(9282),m=n(5435),g=n(5981),v=n(2660);let b=!1;class y extends r.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new u.EventEmitter),this._onScroll.event((e=>{this._onScrollApi?.fire(e.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(e){for(const t in e)this.optionsService.options[t]=e[t]}constructor(e){super(),this._windowsWrappingHeuristics=this.register(new r.MutableDisposable),this._onBinary=this.register(new u.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new u.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new u.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new u.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new u.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new u.EventEmitter),this._instantiationService=new o.InstantiationService,this.optionsService=this.register(new l.OptionsService(e)),this._instantiationService.setService(i.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(s.BufferService)),this._instantiationService.setService(i.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(a.LogService)),this._instantiationService.setService(i.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(c.CoreService)),this._instantiationService.setService(i.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(d.CoreMouseService)),this._instantiationService.setService(i.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(h.UnicodeService)),this._instantiationService.setService(i.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(f.CharsetService),this._instantiationService.setService(i.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(v.OscLinkService),this._instantiationService.setService(i.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new m.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,u.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,u.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,u.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,u.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 g.WriteBuffer(((e,t)=>this._inputHandler.parse(e,t)))),this.register((0,u.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(e,t){this._writeBuffer.write(e,t)}writeSync(e,t){this._logService.logLevel<=i.LogLevelEnum.WARN&&!b&&(this._logService.warn("writeSync is unreliable and will be removed soon."),b=!0),this._writeBuffer.writeSync(e,t)}input(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.coreService.triggerDataEvent(e,t)}resize(e,t){isNaN(e)||isNaN(t)||(e=Math.max(e,s.MINIMUM_COLS),t=Math.max(t,s.MINIMUM_ROWS),this._bufferService.resize(e,t))}scroll(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._bufferService.scroll(e,t)}scrollLines(e,t,n){this._bufferService.scrollLines(e,t,n)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){const t=e-this._bufferService.buffer.ydisp;0!==t&&this.scrollLines(t)}registerEscHandler(e,t){return this._inputHandler.registerEscHandler(e,t)}registerDcsHandler(e,t){return this._inputHandler.registerDcsHandler(e,t)}registerCsiHandler(e,t){return this._inputHandler.registerCsiHandler(e,t)}registerOscHandler(e,t){return this._inputHandler.registerOscHandler(e,t)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let e=!1;const t=this.optionsService.rawOptions.windowsPty;t&&void 0!==t.buildNumber&&void 0!==t.buildNumber?e=!!("conpty"===t.backend&&t.buildNumber<21376):this.optionsService.rawOptions.windowsMode&&(e=!0),e?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const e=[];e.push(this.onLineFeed(p.updateWindowsModeWrappedState.bind(null,this._bufferService))),e.push(this.registerCsiHandler({final:"H"},(()=>((0,p.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,r.toDisposable)((()=>{for(const t of e)t.dispose()}))}}}t.CoreTerminal=y},8460:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.runAndSubscribe=t.forwardEvent=t.EventEmitter=void 0,t.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=e=>(this._listeners.push(e),{dispose:()=>{if(!this._disposed)for(let t=0;t<this._listeners.length;t++)if(this._listeners[t]===e)return void this._listeners.splice(t,1)}})),this._event}fire(e,t){const n=[];for(let r=0;r<this._listeners.length;r++)n.push(this._listeners[r]);for(let r=0;r<n.length;r++)n[r].call(void 0,e,t)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},t.forwardEvent=function(e,t){return e((e=>t.fire(e)))},t.runAndSubscribe=function(e,t){return t(void 0),e((e=>t(e)))}},5435:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.InputHandler=t.WindowsOptionsReportType=void 0;const o=n(2584),a=n(7116),s=n(2015),l=n(844),c=n(482),u=n(8437),d=n(8460),h=n(643),f=n(511),p=n(3734),m=n(2585),g=n(1480),v=n(6242),b=n(6351),y=n(5941),_={"(":0,")":1,"*":2,"+":3,"-":1,".":2},S=131072;function w(e,t){if(e>24)return t.setWinLines||!1;switch(e){case 1:return!!t.restoreWin;case 2:return!!t.minimizeWin;case 3:return!!t.setWinPosition;case 4:return!!t.setWinSizePixels;case 5:return!!t.raiseWin;case 6:return!!t.lowerWin;case 7:return!!t.refreshWin;case 8:return!!t.setWinSizeChars;case 9:return!!t.maximizeWin;case 10:return!!t.fullscreenWin;case 11:return!!t.getWinState;case 13:return!!t.getWinPosition;case 14:return!!t.getWinSizePixels;case 15:return!!t.getScreenSizePixels;case 16:return!!t.getCellSizePixels;case 18:return!!t.getWinSizeChars;case 19:return!!t.getScreenSizeChars;case 20:return!!t.getIconTitle;case 21:return!!t.getWinTitle;case 22:return!!t.pushTitle;case 23:return!!t.popTitle;case 24:return!!t.setWinLines}return!1}var C;!function(e){e[e.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",e[e.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"}(C||(t.WindowsOptionsReportType=C={}));let x=0;class E extends l.Disposable{getAttrData(){return this._curAttrData}constructor(e,t,n,r,i,l,h,p){let m=arguments.length>8&&void 0!==arguments[8]?arguments[8]:new s.EscapeSequenceParser;super(),this._bufferService=e,this._charsetService=t,this._coreService=n,this._logService=r,this._optionsService=i,this._oscLinkService=l,this._coreMouseService=h,this._unicodeService=p,this._parser=m,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new c.StringToUtf32,this._utf8Decoder=new c.Utf8ToUtf32,this._workCell=new f.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=u.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=u.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new d.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new d.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new d.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new d.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new d.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new d.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new d.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new d.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new d.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new d.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new d.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new d.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new d.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 k(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((e=>this._activeBuffer=e.activeBuffer))),this._parser.setCsiHandlerFallback(((e,t)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(e),params:t.toArray()})})),this._parser.setEscHandlerFallback((e=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(e)})})),this._parser.setExecuteHandlerFallback((e=>{this._logService.debug("Unknown EXECUTE code: ",{code:e})})),this._parser.setOscHandlerFallback(((e,t,n)=>{this._logService.debug("Unknown OSC code: ",{identifier:e,action:t,data:n})})),this._parser.setDcsHandlerFallback(((e,t,n)=>{"HOOK"===t&&(n=n.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(e),action:t,payload:n})})),this._parser.setPrintHandler(((e,t,n)=>this.print(e,t,n))),this._parser.registerCsiHandler({final:"@"},(e=>this.insertChars(e))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(e=>this.scrollLeft(e))),this._parser.registerCsiHandler({final:"A"},(e=>this.cursorUp(e))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(e=>this.scrollRight(e))),this._parser.registerCsiHandler({final:"B"},(e=>this.cursorDown(e))),this._parser.registerCsiHandler({final:"C"},(e=>this.cursorForward(e))),this._parser.registerCsiHandler({final:"D"},(e=>this.cursorBackward(e))),this._parser.registerCsiHandler({final:"E"},(e=>this.cursorNextLine(e))),this._parser.registerCsiHandler({final:"F"},(e=>this.cursorPrecedingLine(e))),this._parser.registerCsiHandler({final:"G"},(e=>this.cursorCharAbsolute(e))),this._parser.registerCsiHandler({final:"H"},(e=>this.cursorPosition(e))),this._parser.registerCsiHandler({final:"I"},(e=>this.cursorForwardTab(e))),this._parser.registerCsiHandler({final:"J"},(e=>this.eraseInDisplay(e,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(e=>this.eraseInDisplay(e,!0))),this._parser.registerCsiHandler({final:"K"},(e=>this.eraseInLine(e,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(e=>this.eraseInLine(e,!0))),this._parser.registerCsiHandler({final:"L"},(e=>this.insertLines(e))),this._parser.registerCsiHandler({final:"M"},(e=>this.deleteLines(e))),this._parser.registerCsiHandler({final:"P"},(e=>this.deleteChars(e))),this._parser.registerCsiHandler({final:"S"},(e=>this.scrollUp(e))),this._parser.registerCsiHandler({final:"T"},(e=>this.scrollDown(e))),this._parser.registerCsiHandler({final:"X"},(e=>this.eraseChars(e))),this._parser.registerCsiHandler({final:"Z"},(e=>this.cursorBackwardTab(e))),this._parser.registerCsiHandler({final:"`"},(e=>this.charPosAbsolute(e))),this._parser.registerCsiHandler({final:"a"},(e=>this.hPositionRelative(e))),this._parser.registerCsiHandler({final:"b"},(e=>this.repeatPrecedingCharacter(e))),this._parser.registerCsiHandler({final:"c"},(e=>this.sendDeviceAttributesPrimary(e))),this._parser.registerCsiHandler({prefix:">",final:"c"},(e=>this.sendDeviceAttributesSecondary(e))),this._parser.registerCsiHandler({final:"d"},(e=>this.linePosAbsolute(e))),this._parser.registerCsiHandler({final:"e"},(e=>this.vPositionRelative(e))),this._parser.registerCsiHandler({final:"f"},(e=>this.hVPosition(e))),this._parser.registerCsiHandler({final:"g"},(e=>this.tabClear(e))),this._parser.registerCsiHandler({final:"h"},(e=>this.setMode(e))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(e=>this.setModePrivate(e))),this._parser.registerCsiHandler({final:"l"},(e=>this.resetMode(e))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(e=>this.resetModePrivate(e))),this._parser.registerCsiHandler({final:"m"},(e=>this.charAttributes(e))),this._parser.registerCsiHandler({final:"n"},(e=>this.deviceStatus(e))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(e=>this.deviceStatusPrivate(e))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(e=>this.softReset(e))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(e=>this.setCursorStyle(e))),this._parser.registerCsiHandler({final:"r"},(e=>this.setScrollRegion(e))),this._parser.registerCsiHandler({final:"s"},(e=>this.saveCursor(e))),this._parser.registerCsiHandler({final:"t"},(e=>this.windowOptions(e))),this._parser.registerCsiHandler({final:"u"},(e=>this.restoreCursor(e))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(e=>this.insertColumns(e))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(e=>this.deleteColumns(e))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(e=>this.selectProtected(e))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(e=>this.requestMode(e,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(e=>this.requestMode(e,!1))),this._parser.setExecuteHandler(o.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(o.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(o.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(o.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(o.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(o.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(o.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(o.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(o.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(o.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(o.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(o.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new v.OscHandler((e=>(this.setTitle(e),this.setIconName(e),!0)))),this._parser.registerOscHandler(1,new v.OscHandler((e=>this.setIconName(e)))),this._parser.registerOscHandler(2,new v.OscHandler((e=>this.setTitle(e)))),this._parser.registerOscHandler(4,new v.OscHandler((e=>this.setOrReportIndexedColor(e)))),this._parser.registerOscHandler(8,new v.OscHandler((e=>this.setHyperlink(e)))),this._parser.registerOscHandler(10,new v.OscHandler((e=>this.setOrReportFgColor(e)))),this._parser.registerOscHandler(11,new v.OscHandler((e=>this.setOrReportBgColor(e)))),this._parser.registerOscHandler(12,new v.OscHandler((e=>this.setOrReportCursorColor(e)))),this._parser.registerOscHandler(104,new v.OscHandler((e=>this.restoreIndexedColor(e)))),this._parser.registerOscHandler(110,new v.OscHandler((e=>this.restoreFgColor(e)))),this._parser.registerOscHandler(111,new v.OscHandler((e=>this.restoreBgColor(e)))),this._parser.registerOscHandler(112,new v.OscHandler((e=>this.restoreCursorColor(e)))),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(const o in a.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:o},(()=>this.selectCharset("("+o))),this._parser.registerEscHandler({intermediates:")",final:o},(()=>this.selectCharset(")"+o))),this._parser.registerEscHandler({intermediates:"*",final:o},(()=>this.selectCharset("*"+o))),this._parser.registerEscHandler({intermediates:"+",final:o},(()=>this.selectCharset("+"+o))),this._parser.registerEscHandler({intermediates:"-",final:o},(()=>this.selectCharset("-"+o))),this._parser.registerEscHandler({intermediates:".",final:o},(()=>this.selectCharset("."+o))),this._parser.registerEscHandler({intermediates:"/",final:o},(()=>this.selectCharset("/"+o)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((e=>(this._logService.error("Parsing error: ",e),e))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new b.DcsHandler(((e,t)=>this.requestStatusString(e,t))))}_preserveStack(e,t,n,r){this._parseStack.paused=!0,this._parseStack.cursorStartX=e,this._parseStack.cursorStartY=t,this._parseStack.decodedLength=n,this._parseStack.position=r}_logSlowResolvingAsync(e){this._logService.logLevel<=m.LogLevelEnum.WARN&&Promise.race([e,new Promise(((e,t)=>setTimeout((()=>t("#SLOW_TIMEOUT")),5e3)))]).catch((e=>{if("#SLOW_TIMEOUT"!==e)throw e;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(e,t){let n,r=this._activeBuffer.x,i=this._activeBuffer.y,o=0;const a=this._parseStack.paused;if(a){if(n=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,t))return this._logSlowResolvingAsync(n),n;r=this._parseStack.cursorStartX,i=this._parseStack.cursorStartY,this._parseStack.paused=!1,e.length>S&&(o=this._parseStack.position+S)}if(this._logService.logLevel<=m.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+("string"==typeof e?` "${e}"`:` "${Array.prototype.map.call(e,(e=>String.fromCharCode(e))).join("")}"`),"string"==typeof e?e.split("").map((e=>e.charCodeAt(0))):e),this._parseBuffer.length<e.length&&this._parseBuffer.length<S&&(this._parseBuffer=new Uint32Array(Math.min(e.length,S))),a||this._dirtyRowTracker.clearRange(),e.length>S)for(let c=o;c<e.length;c+=S){const t=c+S<e.length?c+S:e.length,o="string"==typeof e?this._stringDecoder.decode(e.substring(c,t),this._parseBuffer):this._utf8Decoder.decode(e.subarray(c,t),this._parseBuffer);if(n=this._parser.parse(this._parseBuffer,o))return this._preserveStack(r,i,o,c),this._logSlowResolvingAsync(n),n}else if(!a){const t="string"==typeof e?this._stringDecoder.decode(e,this._parseBuffer):this._utf8Decoder.decode(e,this._parseBuffer);if(n=this._parser.parse(this._parseBuffer,t))return this._preserveStack(r,i,t,0),this._logSlowResolvingAsync(n),n}this._activeBuffer.x===r&&this._activeBuffer.y===i||this._onCursorMove.fire();const s=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),l=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);l<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(l,this._bufferService.rows-1),Math.min(s,this._bufferService.rows-1))}print(e,t,n){let r,i;const o=this._charsetService.charset,a=this._optionsService.rawOptions.screenReaderMode,s=this._bufferService.cols,l=this._coreService.decPrivateModes.wraparound,d=this._coreService.modes.insertMode,f=this._curAttrData;let p=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&n-t>0&&2===p.getWidth(this._activeBuffer.x-1)&&p.setCellFromCodepoint(this._activeBuffer.x-1,0,1,f);let m=this._parser.precedingJoinState;for(let v=t;v<n;++v){if(r=e[v],r<127&&o){const e=o[String.fromCharCode(r)];e&&(r=e.charCodeAt(0))}const t=this._unicodeService.charProperties(r,m);i=g.UnicodeService.extractWidth(t);const n=g.UnicodeService.extractShouldJoin(t),b=n?g.UnicodeService.extractWidth(m):0;if(m=t,a&&this._onA11yChar.fire((0,c.stringFromCodePoint)(r)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+i-b>s)if(l){const e=p;let t=this._activeBuffer.x-b;for(this._activeBuffer.x=b,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),p=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),b>0&&p instanceof u.BufferLine&&p.copyCellsFrom(e,t,0,b,!1);t<s;)e.setCellFromCodepoint(t++,0,1,f)}else if(this._activeBuffer.x=s-1,2===i)continue;if(n&&this._activeBuffer.x){const e=p.getWidth(this._activeBuffer.x-1)?1:2;p.addCodepointToCell(this._activeBuffer.x-e,r,i);for(let t=i-b;--t>=0;)p.setCellFromCodepoint(this._activeBuffer.x++,0,0,f)}else if(d&&(p.insertCells(this._activeBuffer.x,i-b,this._activeBuffer.getNullCell(f)),2===p.getWidth(s-1)&&p.setCellFromCodepoint(s-1,h.NULL_CELL_CODE,h.NULL_CELL_WIDTH,f)),p.setCellFromCodepoint(this._activeBuffer.x++,r,i,f),i>0)for(;--i;)p.setCellFromCodepoint(this._activeBuffer.x++,0,0,f)}this._parser.precedingJoinState=m,this._activeBuffer.x<s&&n-t>0&&0===p.getWidth(this._activeBuffer.x)&&!p.hasContent(this._activeBuffer.x)&&p.setCellFromCodepoint(this._activeBuffer.x,0,1,f),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(e,t){return"t"!==e.final||e.prefix||e.intermediates?this._parser.registerCsiHandler(e,t):this._parser.registerCsiHandler(e,(e=>!w(e.params[0],this._optionsService.rawOptions.windowOptions)||t(e)))}registerDcsHandler(e,t){return this._parser.registerDcsHandler(e,new b.DcsHandler(t))}registerEscHandler(e,t){return this._parser.registerEscHandler(e,t)}registerOscHandler(e,t){return this._parser.registerOscHandler(e,new v.OscHandler(t))}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(0===this._activeBuffer.x&&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;const e=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);e.hasWidth(this._activeBuffer.x)&&!e.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const e=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-e),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._bufferService.cols-1;this._activeBuffer.x=Math.min(e,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(e,t){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=e,this._activeBuffer.y=this._activeBuffer.scrollTop+t):(this._activeBuffer.x=e,this._activeBuffer.y=t),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(e,t){this._restrictCursor(),this._setCursor(this._activeBuffer.x+e,this._activeBuffer.y+t)}cursorUp(e){const t=this._activeBuffer.y-this._activeBuffer.scrollTop;return t>=0?this._moveCursor(0,-Math.min(t,e.params[0]||1)):this._moveCursor(0,-(e.params[0]||1)),!0}cursorDown(e){const t=this._activeBuffer.scrollBottom-this._activeBuffer.y;return t>=0?this._moveCursor(0,Math.min(t,e.params[0]||1)):this._moveCursor(0,e.params[0]||1),!0}cursorForward(e){return this._moveCursor(e.params[0]||1,0),!0}cursorBackward(e){return this._moveCursor(-(e.params[0]||1),0),!0}cursorNextLine(e){return this.cursorDown(e),this._activeBuffer.x=0,!0}cursorPrecedingLine(e){return this.cursorUp(e),this._activeBuffer.x=0,!0}cursorCharAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(e){return this._setCursor(e.length>=2?(e.params[1]||1)-1:0,(e.params[0]||1)-1),!0}charPosAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(e){return this._moveCursor(e.params[0]||1,0),!0}linePosAbsolute(e){return this._setCursor(this._activeBuffer.x,(e.params[0]||1)-1),!0}vPositionRelative(e){return this._moveCursor(0,e.params[0]||1),!0}hVPosition(e){return this.cursorPosition(e),!0}tabClear(e){const t=e.params[0];return 0===t?delete this._activeBuffer.tabs[this._activeBuffer.x]:3===t&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(e){const t=e.params[0];return 1===t&&(this._curAttrData.bg|=536870912),2!==t&&0!==t||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const o=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);o.replaceCells(t,n,this._activeBuffer.getNullCell(this._eraseAttrData()),i),r&&(o.isWrapped=!1)}_resetBufferLine(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);n&&(n.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),t),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+e),n.isWrapped=!1)}eraseInDisplay(e){let t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];switch(this._restrictCursor(this._bufferService.cols),e.params[0]){case 0:for(t=this._activeBuffer.y,this._dirtyRowTracker.markDirty(t),this._eraseInBufferLine(t++,this._activeBuffer.x,this._bufferService.cols,0===this._activeBuffer.x,n);t<this._bufferService.rows;t++)this._resetBufferLine(t,n);this._dirtyRowTracker.markDirty(t);break;case 1:for(t=this._activeBuffer.y,this._dirtyRowTracker.markDirty(t),this._eraseInBufferLine(t,0,this._activeBuffer.x+1,!0,n),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(t+1).isWrapped=!1);t--;)this._resetBufferLine(t,n);this._dirtyRowTracker.markDirty(0);break;case 2:for(t=this._bufferService.rows,this._dirtyRowTracker.markDirty(t-1);t--;)this._resetBufferLine(t,n);this._dirtyRowTracker.markDirty(0);break;case 3:const e=this._activeBuffer.lines.length-this._bufferService.rows;e>0&&(this._activeBuffer.lines.trimStart(e),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-e,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-e,0),this._onScroll.fire(0))}return!0}eraseInLine(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];switch(this._restrictCursor(this._bufferService.cols),e.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,0===this._activeBuffer.x,t);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,t);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,t)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const n=this._activeBuffer.ybase+this._activeBuffer.y,r=this._bufferService.rows-1-this._activeBuffer.scrollBottom,i=this._bufferService.rows-1+this._activeBuffer.ybase-r+1;for(;t--;)this._activeBuffer.lines.splice(i-1,1),this._activeBuffer.lines.splice(n,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const n=this._activeBuffer.ybase+this._activeBuffer.y;let r;for(r=this._bufferService.rows-1-this._activeBuffer.scrollBottom,r=this._bufferService.rows-1+this._activeBuffer.ybase-r;t--;)this._activeBuffer.lines.splice(n,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}insertChars(e){this._restrictCursor();const t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.insertCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(e){this._restrictCursor();const t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.deleteCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(e){let t=e.params[0]||1;for(;t--;)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(e){let t=e.params[0]||1;for(;t--;)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(u.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const t=e.params[0]||1;for(let n=this._activeBuffer.scrollTop;n<=this._activeBuffer.scrollBottom;++n){const e=this._activeBuffer.lines.get(this._activeBuffer.ybase+n);e.deleteCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),e.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const t=e.params[0]||1;for(let n=this._activeBuffer.scrollTop;n<=this._activeBuffer.scrollBottom;++n){const e=this._activeBuffer.lines.get(this._activeBuffer.ybase+n);e.insertCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),e.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const t=e.params[0]||1;for(let n=this._activeBuffer.scrollTop;n<=this._activeBuffer.scrollBottom;++n){const e=this._activeBuffer.lines.get(this._activeBuffer.ybase+n);e.insertCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),e.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const t=e.params[0]||1;for(let n=this._activeBuffer.scrollTop;n<=this._activeBuffer.scrollBottom;++n){const e=this._activeBuffer.lines.get(this._activeBuffer.ybase+n);e.deleteCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),e.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(e){this._restrictCursor();const t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(e.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(e){const t=this._parser.precedingJoinState;if(!t)return!0;const n=e.params[0]||1,r=g.UnicodeService.extractWidth(t),i=this._activeBuffer.x-r,o=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(i),a=new Uint32Array(o.length*n);let s=0;for(let c=0;c<o.length;){const e=o.codePointAt(c)||0;a[s++]=e,c+=e>65535?2:1}let l=s;for(let c=1;c<n;++c)a.copyWithin(l,0,s),l+=s;return this.print(a,0,l),!0}sendDeviceAttributesPrimary(e){return e.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(o.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(o.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(e){return e.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(o.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(o.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(e.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(o.C0.ESC+"[>83;40003;0c")),!0}_is(e){return 0===(this._optionsService.rawOptions.termName+"").indexOf(e)}setMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,a.DEFAULT_CHARSET),this._charsetService.setgCharset(1,a.DEFAULT_CHARSET),this._charsetService.setgCharset(2,a.DEFAULT_CHARSET),this._charsetService.setgCharset(3,a.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(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){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(),1049===e.params[t]&&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(e,t){const n=this._coreService.decPrivateModes,{activeProtocol:r,activeEncoding:i}=this._coreMouseService,a=this._coreService,{buffers:s,cols:l}=this._bufferService,{active:c,alt:u}=s,d=this._optionsService.rawOptions,h=e=>e?1:2,f=e.params[0];return p=f,m=t?2===f?4:4===f?h(a.modes.insertMode):12===f?3:20===f?h(d.convertEol):0:1===f?h(n.applicationCursorKeys):3===f?d.windowOptions.setWinLines?80===l?2:132===l?1:0:0:6===f?h(n.origin):7===f?h(n.wraparound):8===f?3:9===f?h("X10"===r):12===f?h(d.cursorBlink):25===f?h(!a.isCursorHidden):45===f?h(n.reverseWraparound):66===f?h(n.applicationKeypad):67===f?4:1e3===f?h("VT200"===r):1002===f?h("DRAG"===r):1003===f?h("ANY"===r):1004===f?h(n.sendFocus):1005===f?4:1006===f?h("SGR"===i):1015===f?4:1016===f?h("SGR_PIXELS"===i):1048===f?1:47===f||1047===f||1049===f?h(c===u):2004===f?h(n.bracketedPasteMode):0,a.triggerDataEvent(`${o.C0.ESC}[${t?"":"?"}${p};${m}$y`),!0;var p,m}_updateAttrColor(e,t,n,r,i){return 2===t?(e|=50331648,e&=-16777216,e|=p.AttributeData.fromColorRGB([n,r,i])):5===t&&(e&=-50331904,e|=33554432|255&n),e}_extractColor(e,t,n){const r=[0,0,-1,0,0,0];let i=0,o=0;do{if(r[o+i]=e.params[t+o],e.hasSubParams(t+o)){const n=e.getSubParams(t+o);let a=0;do{5===r[1]&&(i=1),r[o+a+1+i]=n[a]}while(++a<n.length&&a+o+1+i<r.length);break}if(5===r[1]&&o+i>=2||2===r[1]&&o+i>=5)break;r[1]&&(i=1)}while(++o+t<e.length&&o+i<r.length);for(let a=2;a<r.length;++a)-1===r[a]&&(r[a]=0);switch(r[0]){case 38:n.fg=this._updateAttrColor(n.fg,r[1],r[3],r[4],r[5]);break;case 48:n.bg=this._updateAttrColor(n.bg,r[1],r[3],r[4],r[5]);break;case 58:n.extended=n.extended.clone(),n.extended.underlineColor=this._updateAttrColor(n.extended.underlineColor,r[1],r[3],r[4],r[5])}return o}_processUnderline(e,t){t.extended=t.extended.clone(),(!~e||e>5)&&(e=1),t.extended.underlineStyle=e,t.fg|=268435456,0===e&&(t.fg&=-268435457),t.updateExtended()}_processSGR0(e){e.fg=u.DEFAULT_ATTR_DATA.fg,e.bg=u.DEFAULT_ATTR_DATA.bg,e.extended=e.extended.clone(),e.extended.underlineStyle=0,e.extended.underlineColor&=-67108864,e.updateExtended()}charAttributes(e){if(1===e.length&&0===e.params[0])return this._processSGR0(this._curAttrData),!0;const t=e.length;let n;const r=this._curAttrData;for(let i=0;i<t;i++)n=e.params[i],n>=30&&n<=37?(r.fg&=-50331904,r.fg|=16777216|n-30):n>=40&&n<=47?(r.bg&=-50331904,r.bg|=16777216|n-40):n>=90&&n<=97?(r.fg&=-50331904,r.fg|=16777224|n-90):n>=100&&n<=107?(r.bg&=-50331904,r.bg|=16777224|n-100):0===n?this._processSGR0(r):1===n?r.fg|=134217728:3===n?r.bg|=67108864:4===n?(r.fg|=268435456,this._processUnderline(e.hasSubParams(i)?e.getSubParams(i)[0]:1,r)):5===n?r.fg|=536870912:7===n?r.fg|=67108864:8===n?r.fg|=1073741824:9===n?r.fg|=2147483648:2===n?r.bg|=134217728:21===n?this._processUnderline(2,r):22===n?(r.fg&=-134217729,r.bg&=-134217729):23===n?r.bg&=-67108865:24===n?(r.fg&=-268435457,this._processUnderline(0,r)):25===n?r.fg&=-536870913:27===n?r.fg&=-67108865:28===n?r.fg&=-1073741825:29===n?r.fg&=2147483647:39===n?(r.fg&=-67108864,r.fg|=16777215&u.DEFAULT_ATTR_DATA.fg):49===n?(r.bg&=-67108864,r.bg|=16777215&u.DEFAULT_ATTR_DATA.bg):38===n||48===n||58===n?i+=this._extractColor(e,i,r):53===n?r.bg|=1073741824:55===n?r.bg&=-1073741825:59===n?(r.extended=r.extended.clone(),r.extended.underlineColor=-1,r.updateExtended()):100===n?(r.fg&=-67108864,r.fg|=16777215&u.DEFAULT_ATTR_DATA.fg,r.bg&=-67108864,r.bg|=16777215&u.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",n);return!0}deviceStatus(e){switch(e.params[0]){case 5:this._coreService.triggerDataEvent(`${o.C0.ESC}[0n`);break;case 6:const e=this._activeBuffer.y+1,t=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${o.C0.ESC}[${e};${t}R`)}return!0}deviceStatusPrivate(e){if(6===e.params[0]){const e=this._activeBuffer.y+1,t=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${o.C0.ESC}[?${e};${t}R`)}return!0}softReset(e){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=u.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(e){const t=e.params[0]||1;switch(t){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"}const n=t%2==1;return this._optionsService.options.cursorBlink=n,!0}setScrollRegion(e){const t=e.params[0]||1;let n;return(e.length<2||(n=e.params[1])>this._bufferService.rows||0===n)&&(n=this._bufferService.rows),n>t&&(this._activeBuffer.scrollTop=t-1,this._activeBuffer.scrollBottom=n-1,this._setCursor(0,0)),!0}windowOptions(e){if(!w(e.params[0],this._optionsService.rawOptions.windowOptions))return!0;const t=e.length>1?e.params[1]:0;switch(e.params[0]){case 14:2!==t&&this._onRequestWindowsOptionsReport.fire(C.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(C.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${o.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:0!==t&&2!==t||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),0!==t&&1!==t||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:0!==t&&2!==t||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),0!==t&&1!==t||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(e){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(e){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(e){return this._windowTitle=e,this._onTitleChange.fire(e),!0}setIconName(e){return this._iconName=e,!0}setOrReportIndexedColor(e){const t=[],n=e.split(";");for(;n.length>1;){const e=n.shift(),r=n.shift();if(/^\d+$/.exec(e)){const n=parseInt(e);if(O(n))if("?"===r)t.push({type:0,index:n});else{const e=(0,y.parseColor)(r);e&&t.push({type:1,index:n,color:e})}}}return t.length&&this._onColor.fire(t),!0}setHyperlink(e){const t=e.split(";");return!(t.length<2)&&(t[1]?this._createHyperlink(t[0],t[1]):!t[0]&&this._finishHyperlink())}_createHyperlink(e,t){this._getCurrentLinkId()&&this._finishHyperlink();const n=e.split(":");let r;const i=n.findIndex((e=>e.startsWith("id=")));return-1!==i&&(r=n[i].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:r,uri:t}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(e,t){const n=e.split(";");for(let r=0;r<n.length&&!(t>=this._specialColors.length);++r,++t)if("?"===n[r])this._onColor.fire([{type:0,index:this._specialColors[t]}]);else{const e=(0,y.parseColor)(n[r]);e&&this._onColor.fire([{type:1,index:this._specialColors[t],color:e}])}return!0}setOrReportFgColor(e){return this._setOrReportSpecialColor(e,0)}setOrReportBgColor(e){return this._setOrReportSpecialColor(e,1)}setOrReportCursorColor(e){return this._setOrReportSpecialColor(e,2)}restoreIndexedColor(e){if(!e)return this._onColor.fire([{type:2}]),!0;const t=[],n=e.split(";");for(let r=0;r<n.length;++r)if(/^\d+$/.exec(n[r])){const e=parseInt(n[r]);O(e)&&t.push({type:2,index:e})}return t.length&&this._onColor.fire(t),!0}restoreFgColor(e){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(e){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(e){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,a.DEFAULT_CHARSET),!0}selectCharset(e){return 2!==e.length?(this.selectDefaultCharset(),!0):("/"===e[0]||this._charsetService.setgCharset(_[e[0]],a.CHARSETS[e[1]]||a.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){const e=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,e,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=u.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=u.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(e){return this._charsetService.setgLevel(e),!0}screenAlignmentPattern(){const e=new f.CellData;e.content=1<<22|"E".charCodeAt(0),e.fg=this._curAttrData.fg,e.bg=this._curAttrData.bg,this._setCursor(0,0);for(let t=0;t<this._bufferService.rows;++t){const n=this._activeBuffer.ybase+this._activeBuffer.y+t,r=this._activeBuffer.lines.get(n);r&&(r.fill(e),r.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(e,t){const n=this._bufferService.buffer,r=this._optionsService.rawOptions;return(e=>(this._coreService.triggerDataEvent(`${o.C0.ESC}${e}${o.C0.ESC}\\`),!0))('"q'===e?`P1$r${this._curAttrData.isProtected()?1:0}"q`:'"p'===e?'P1$r61;1"p':"r"===e?`P1$r${n.scrollTop+1};${n.scrollBottom+1}r`:"m"===e?"P1$r0m":" q"===e?`P1$r${{block:2,underline:4,bar:6}[r.cursorStyle]-(r.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(e,t){this._dirtyRowTracker.markRangeDirty(e,t)}}t.InputHandler=E;let k=class{constructor(e){this._bufferService=e,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(e){e<this.start?this.start=e:e>this.end&&(this.end=e)}markRangeDirty(e,t){e>t&&(x=e,e=t,t=x),e<this.start&&(this.start=e),t>this.end&&(this.end=t)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function O(e){return 0<=e&&e<256}k=r([i(0,m.IBufferService)],k)},844:(e,t)=>{function n(e){for(const t of e)t.dispose();e.length=0}Object.defineProperty(t,"__esModule",{value:!0}),t.getDisposeArrayDisposable=t.disposeArray=t.toDisposable=t.MutableDisposable=t.Disposable=void 0,t.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const e of this._disposables)e.dispose();this._disposables.length=0}register(e){return this._disposables.push(e),e}unregister(e){const t=this._disposables.indexOf(e);-1!==t&&this._disposables.splice(t,1)}},t.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,this._value?.dispose(),this._value=void 0}},t.toDisposable=function(e){return{dispose:e}},t.disposeArray=n,t.getDisposeArrayDisposable=function(e){return{dispose:()=>n(e)}}},1505:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FourKeyMap=t.TwoKeyMap=void 0;class n{constructor(){this._data={}}set(e,t,n){this._data[e]||(this._data[e]={}),this._data[e][t]=n}get(e,t){return this._data[e]?this._data[e][t]:void 0}clear(){this._data={}}}t.TwoKeyMap=n,t.FourKeyMap=class{constructor(){this._data=new n}set(e,t,r,i,o){this._data.get(e,t)||this._data.set(e,t,new n),this._data.get(e,t).set(r,i,o)}get(e,t,n,r){return this._data.get(e,t)?.get(n,r)}clear(){this._data.clear()}}},6114:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isChromeOS=t.isLinux=t.isWindows=t.isIphone=t.isIpad=t.isMac=t.getSafariVersion=t.isSafari=t.isLegacyEdge=t.isFirefox=t.isNode=void 0,t.isNode="undefined"!=typeof process&&"title"in process;const n=t.isNode?"node":navigator.userAgent,r=t.isNode?"node":navigator.platform;t.isFirefox=n.includes("Firefox"),t.isLegacyEdge=n.includes("Edge"),t.isSafari=/^((?!chrome|android).)*safari/i.test(n),t.getSafariVersion=function(){if(!t.isSafari)return 0;const e=n.match(/Version\/(\d+)/);return null===e||e.length<2?0:parseInt(e[1])},t.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(r),t.isIpad="iPad"===r,t.isIphone="iPhone"===r,t.isWindows=["Windows","Win16","Win32","WinCE"].includes(r),t.isLinux=r.indexOf("Linux")>=0,t.isChromeOS=/\bCrOS\b/.test(n)},6106:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SortedList=void 0;let n=0;t.SortedList=class{constructor(e){this._getKey=e,this._array=[]}clear(){this._array.length=0}insert(e){0!==this._array.length?(n=this._search(this._getKey(e)),this._array.splice(n,0,e)):this._array.push(e)}delete(e){if(0===this._array.length)return!1;const t=this._getKey(e);if(void 0===t)return!1;if(n=this._search(t),-1===n)return!1;if(this._getKey(this._array[n])!==t)return!1;do{if(this._array[n]===e)return this._array.splice(n,1),!0}while(++n<this._array.length&&this._getKey(this._array[n])===t);return!1}*getKeyIterator(e){if(0!==this._array.length&&(n=this._search(e),!(n<0||n>=this._array.length)&&this._getKey(this._array[n])===e))do{yield this._array[n]}while(++n<this._array.length&&this._getKey(this._array[n])===e)}forEachByKey(e,t){if(0!==this._array.length&&(n=this._search(e),!(n<0||n>=this._array.length)&&this._getKey(this._array[n])===e))do{t(this._array[n])}while(++n<this._array.length&&this._getKey(this._array[n])===e)}values(){return[...this._array].values()}_search(e){let t=0,n=this._array.length-1;for(;n>=t;){let r=t+n>>1;const i=this._getKey(this._array[r]);if(i>e)n=r-1;else{if(!(i<e)){for(;r>0&&this._getKey(this._array[r-1])===e;)r--;return r}t=r+1}}return t}}},7226:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DebouncedIdleTask=t.IdleTaskQueue=t.PriorityTaskQueue=void 0;const r=n(6114);class i{constructor(){this._tasks=[],this._i=0}enqueue(e){this._tasks.push(e),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(e){this._idleCallback=void 0;let t=0,n=0,r=e.timeRemaining(),i=0;for(;this._i<this._tasks.length;){if(t=Date.now(),this._tasks[this._i]()||this._i++,t=Math.max(1,Date.now()-t),n=Math.max(t,n),i=e.timeRemaining(),1.5*n>i)return r-t<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(r-t))}ms`),void this._start();r=i}this.clear()}}class o extends i{_requestCallback(e){return setTimeout((()=>e(this._createDeadline(16))))}_cancelCallback(e){clearTimeout(e)}_createDeadline(e){const t=Date.now()+e;return{timeRemaining:()=>Math.max(0,t-Date.now())}}}t.PriorityTaskQueue=o,t.IdleTaskQueue=!r.isNode&&"requestIdleCallback"in window?class extends i{_requestCallback(e){return requestIdleCallback(e)}_cancelCallback(e){cancelIdleCallback(e)}}:o,t.DebouncedIdleTask=class{constructor(){this._queue=new t.IdleTaskQueue}set(e){this._queue.clear(),this._queue.enqueue(e)}flush(){this._queue.flush()}}},9282:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.updateWindowsModeWrappedState=void 0;const r=n(643);t.updateWindowsModeWrappedState=function(e){const t=e.buffer.lines.get(e.buffer.ybase+e.buffer.y-1),n=t?.get(e.cols-1),i=e.buffer.lines.get(e.buffer.ybase+e.buffer.y);i&&n&&(i.isWrapped=n[r.CHAR_DATA_CODE_INDEX]!==r.NULL_CELL_CODE&&n[r.CHAR_DATA_CODE_INDEX]!==r.WHITESPACE_CELL_CODE)}},3734:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ExtendedAttrs=t.AttributeData=void 0;class n{constructor(){this.fg=0,this.bg=0,this.extended=new r}static toColorRGB(e){return[e>>>16&255,e>>>8&255,255&e]}static fromColorRGB(e){return(255&e[0])<<16|(255&e[1])<<8|255&e[2]}clone(){const e=new n;return e.fg=this.fg,e.bg=this.bg,e.extended=this.extended.clone(),e}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&0!==this.extended.underlineStyle?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==(50331648&this.fg)}isBgRGB(){return 50331648==(50331648&this.bg)}isFgPalette(){return 16777216==(50331648&this.fg)||33554432==(50331648&this.fg)}isBgPalette(){return 16777216==(50331648&this.bg)||33554432==(50331648&this.bg)}isFgDefault(){return 0==(50331648&this.fg)}isBgDefault(){return 0==(50331648&this.bg)}isAttributeDefault(){return 0===this.fg&&0===this.bg}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==(50331648&this.extended.underlineColor):this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?16777216==(50331648&this.extended.underlineColor)||33554432==(50331648&this.extended.underlineColor):this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?0==(50331648&this.extended.underlineColor):this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}t.AttributeData=n;class r{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(e){this._ext=e}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(e){this._ext&=-469762049,this._ext|=e<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(e){this._ext&=-67108864,this._ext|=67108863&e}get urlId(){return this._urlId}set urlId(e){this._urlId=e}get underlineVariantOffset(){const e=(3758096384&this._ext)>>29;return e<0?4294967288^e:e}set underlineVariantOffset(e){this._ext&=536870911,this._ext|=e<<29&3758096384}constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._ext=0,this._urlId=0,this._ext=e,this._urlId=t}clone(){return new r(this._ext,this._urlId)}isEmpty(){return 0===this.underlineStyle&&0===this._urlId}}t.ExtendedAttrs=r},9092:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Buffer=t.MAX_BUFFER_SIZE=void 0;const r=n(6349),i=n(7226),o=n(3734),a=n(8437),s=n(4634),l=n(511),c=n(643),u=n(4863),d=n(7116);t.MAX_BUFFER_SIZE=4294967295,t.Buffer=class{constructor(e,t,n){this._hasScrollback=e,this._optionsService=t,this._bufferService=n,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=a.DEFAULT_ATTR_DATA.clone(),this.savedCharset=d.DEFAULT_CHARSET,this.markers=[],this._nullCell=l.CellData.fromCharData([0,c.NULL_CELL_CHAR,c.NULL_CELL_WIDTH,c.NULL_CELL_CODE]),this._whitespaceCell=l.CellData.fromCharData([0,c.WHITESPACE_CELL_CHAR,c.WHITESPACE_CELL_WIDTH,c.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new i.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new r.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(e){return e?(this._nullCell.fg=e.fg,this._nullCell.bg=e.bg,this._nullCell.extended=e.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new o.ExtendedAttrs),this._nullCell}getWhitespaceCell(e){return e?(this._whitespaceCell.fg=e.fg,this._whitespaceCell.bg=e.bg,this._whitespaceCell.extended=e.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new o.ExtendedAttrs),this._whitespaceCell}getBlankLine(e,t){return new a.BufferLine(this._bufferService.cols,this.getNullCell(e),t)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const e=this.ybase+this.y-this.ydisp;return e>=0&&e<this._rows}_getCorrectBufferLength(e){if(!this._hasScrollback)return e;const n=e+this._optionsService.rawOptions.scrollback;return n>t.MAX_BUFFER_SIZE?t.MAX_BUFFER_SIZE:n}fillViewportRows(e){if(0===this.lines.length){void 0===e&&(e=a.DEFAULT_ATTR_DATA);let t=this._rows;for(;t--;)this.lines.push(this.getBlankLine(e))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new r.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(e,t){const n=this.getNullCell(a.DEFAULT_ATTR_DATA);let r=0;const i=this._getCorrectBufferLength(t);if(i>this.lines.maxLength&&(this.lines.maxLength=i),this.lines.length>0){if(this._cols<e)for(let t=0;t<this.lines.length;t++)r+=+this.lines.get(t).resize(e,n);let o=0;if(this._rows<t)for(let r=this._rows;r<t;r++)this.lines.length<t+this.ybase&&(this._optionsService.rawOptions.windowsMode||void 0!==this._optionsService.rawOptions.windowsPty.backend||void 0!==this._optionsService.rawOptions.windowsPty.buildNumber?this.lines.push(new a.BufferLine(e,n)):this.ybase>0&&this.lines.length<=this.ybase+this.y+o+1?(this.ybase--,o++,this.ydisp>0&&this.ydisp--):this.lines.push(new a.BufferLine(e,n)));else for(let e=this._rows;e>t;e--)this.lines.length>t+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(i<this.lines.maxLength){const e=this.lines.length-i;e>0&&(this.lines.trimStart(e),this.ybase=Math.max(this.ybase-e,0),this.ydisp=Math.max(this.ydisp-e,0),this.savedY=Math.max(this.savedY-e,0)),this.lines.maxLength=i}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,t-1),o&&(this.y+=o),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=t-1,this._isReflowEnabled&&(this._reflow(e,t),this._cols>e))for(let o=0;o<this.lines.length;o++)r+=+this.lines.get(o).resize(e,n);this._cols=e,this._rows=t,this._memoryCleanupQueue.clear(),r>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let e=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,e=!1);let t=0;for(;this._memoryCleanupPosition<this.lines.length;)if(t+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),t>100)return!0;return e}get _isReflowEnabled(){const e=this._optionsService.rawOptions.windowsPty;return e&&e.buildNumber?this._hasScrollback&&"conpty"===e.backend&&e.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(e,t){this._cols!==e&&(e>this._cols?this._reflowLarger(e,t):this._reflowSmaller(e,t))}_reflowLarger(e,t){const n=(0,s.reflowLargerGetLinesToRemove)(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(a.DEFAULT_ATTR_DATA));if(n.length>0){const r=(0,s.reflowLargerCreateNewLayout)(this.lines,n);(0,s.reflowLargerApplyNewLayout)(this.lines,r.layout),this._reflowLargerAdjustViewport(e,t,r.countRemoved)}}_reflowLargerAdjustViewport(e,t,n){const r=this.getNullCell(a.DEFAULT_ATTR_DATA);let i=n;for(;i-- >0;)0===this.ybase?(this.y>0&&this.y--,this.lines.length<t&&this.lines.push(new a.BufferLine(e,r))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-n,0)}_reflowSmaller(e,t){const n=this.getNullCell(a.DEFAULT_ATTR_DATA),r=[];let i=0;for(let o=this.lines.length-1;o>=0;o--){let l=this.lines.get(o);if(!l||!l.isWrapped&&l.getTrimmedLength()<=e)continue;const c=[l];for(;l.isWrapped&&o>0;)l=this.lines.get(--o),c.unshift(l);const u=this.ybase+this.y;if(u>=o&&u<o+c.length)continue;const d=c[c.length-1].getTrimmedLength(),h=(0,s.reflowSmallerGetNewLineLengths)(c,this._cols,e),f=h.length-c.length;let p;p=0===this.ybase&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+f):Math.max(0,this.lines.length-this.lines.maxLength+f);const m=[];for(let e=0;e<f;e++){const e=this.getBlankLine(a.DEFAULT_ATTR_DATA,!0);m.push(e)}m.length>0&&(r.push({start:o+c.length+i,newLines:m}),i+=m.length),c.push(...m);let g=h.length-1,v=h[g];0===v&&(g--,v=h[g]);let b=c.length-f-1,y=d;for(;b>=0;){const e=Math.min(y,v);if(void 0===c[g])break;if(c[g].copyCellsFrom(c[b],y-e,v-e,e,!0),v-=e,0===v&&(g--,v=h[g]),y-=e,0===y){b--;const e=Math.max(b,0);y=(0,s.getWrappedLineTrimmedLength)(c,e,this._cols)}}for(let t=0;t<c.length;t++)h[t]<e&&c[t].setCell(h[t],n);let _=f-p;for(;_-- >0;)0===this.ybase?this.y<t-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+i)-t&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+f,this.ybase+t-1)}if(r.length>0){const e=[],t=[];for(let r=0;r<this.lines.length;r++)t.push(this.lines.get(r));const n=this.lines.length;let o=n-1,a=0,s=r[a];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+i);let l=0;for(let d=Math.min(this.lines.maxLength-1,n+i-1);d>=0;d--)if(s&&s.start>o+l){for(let e=s.newLines.length-1;e>=0;e--)this.lines.set(d--,s.newLines[e]);d++,e.push({index:o+1,amount:s.newLines.length}),l+=s.newLines.length,s=r[++a]}else this.lines.set(d,t[o--]);let c=0;for(let r=e.length-1;r>=0;r--)e[r].index+=c,this.lines.onInsertEmitter.fire(e[r]),c+=e[r].amount;const u=Math.max(0,n+i-this.lines.maxLength);u>0&&this.lines.onTrimEmitter.fire(u)}}translateBufferLineToString(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0;const i=this.lines.get(e);return i?i.translateToString(t,n,r):""}getWrappedRangeForLine(e){let t=e,n=e;for(;t>0&&this.lines.get(t).isWrapped;)t--;for(;n+1<this.lines.length&&this.lines.get(n+1).isWrapped;)n++;return{first:t,last:n}}setupTabStops(e){for(null!=e?this.tabs[e]||(e=this.prevStop(e)):(this.tabs={},e=0);e<this._cols;e+=this._optionsService.rawOptions.tabStopWidth)this.tabs[e]=!0}prevStop(e){for(null==e&&(e=this.x);!this.tabs[--e]&&e>0;);return e>=this._cols?this._cols-1:e<0?0:e}nextStop(e){for(null==e&&(e=this.x);!this.tabs[++e]&&e<this._cols;);return e>=this._cols?this._cols-1:e<0?0:e}clearMarkers(e){this._isClearing=!0;for(let t=0;t<this.markers.length;t++)this.markers[t].line===e&&(this.markers[t].dispose(),this.markers.splice(t--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let e=0;e<this.markers.length;e++)this.markers[e].dispose(),this.markers.splice(e--,1);this._isClearing=!1}addMarker(e){const t=new u.Marker(e);return this.markers.push(t),t.register(this.lines.onTrim((e=>{t.line-=e,t.line<0&&t.dispose()}))),t.register(this.lines.onInsert((e=>{t.line>=e.index&&(t.line+=e.amount)}))),t.register(this.lines.onDelete((e=>{t.line>=e.index&&t.line<e.index+e.amount&&t.dispose(),t.line>e.index&&(t.line-=e.amount)}))),t.register(t.onDispose((()=>this._removeMarker(t)))),t}_removeMarker(e){this._isClearing||this.markers.splice(this.markers.indexOf(e),1)}}},8437:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BufferLine=t.DEFAULT_ATTR_DATA=void 0;const r=n(3734),i=n(511),o=n(643),a=n(482);t.DEFAULT_ATTR_DATA=Object.freeze(new r.AttributeData);let s=0;class l{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.isWrapped=n,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*e);const r=t||i.CellData.fromCharData([0,o.NULL_CELL_CHAR,o.NULL_CELL_WIDTH,o.NULL_CELL_CODE]);for(let i=0;i<e;++i)this.setCell(i,r);this.length=e}get(e){const t=this._data[3*e+0],n=2097151&t;return[this._data[3*e+1],2097152&t?this._combined[e]:n?(0,a.stringFromCodePoint)(n):"",t>>22,2097152&t?this._combined[e].charCodeAt(this._combined[e].length-1):n]}set(e,t){this._data[3*e+1]=t[o.CHAR_DATA_ATTR_INDEX],t[o.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[e]=t[1],this._data[3*e+0]=2097152|e|t[o.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*e+0]=t[o.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|t[o.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(e){return this._data[3*e+0]>>22}hasWidth(e){return 12582912&this._data[3*e+0]}getFg(e){return this._data[3*e+1]}getBg(e){return this._data[3*e+2]}hasContent(e){return 4194303&this._data[3*e+0]}getCodePoint(e){const t=this._data[3*e+0];return 2097152&t?this._combined[e].charCodeAt(this._combined[e].length-1):2097151&t}isCombined(e){return 2097152&this._data[3*e+0]}getString(e){const t=this._data[3*e+0];return 2097152&t?this._combined[e]:2097151&t?(0,a.stringFromCodePoint)(2097151&t):""}isProtected(e){return 536870912&this._data[3*e+2]}loadCell(e,t){return s=3*e,t.content=this._data[s+0],t.fg=this._data[s+1],t.bg=this._data[s+2],2097152&t.content&&(t.combinedData=this._combined[e]),268435456&t.bg&&(t.extended=this._extendedAttrs[e]),t}setCell(e,t){2097152&t.content&&(this._combined[e]=t.combinedData),268435456&t.bg&&(this._extendedAttrs[e]=t.extended),this._data[3*e+0]=t.content,this._data[3*e+1]=t.fg,this._data[3*e+2]=t.bg}setCellFromCodepoint(e,t,n,r){268435456&r.bg&&(this._extendedAttrs[e]=r.extended),this._data[3*e+0]=t|n<<22,this._data[3*e+1]=r.fg,this._data[3*e+2]=r.bg}addCodepointToCell(e,t,n){let r=this._data[3*e+0];2097152&r?this._combined[e]+=(0,a.stringFromCodePoint)(t):2097151&r?(this._combined[e]=(0,a.stringFromCodePoint)(2097151&r)+(0,a.stringFromCodePoint)(t),r&=-2097152,r|=2097152):r=t|1<<22,n&&(r&=-12582913,r|=n<<22),this._data[3*e+0]=r}insertCells(e,t,n){if((e%=this.length)&&2===this.getWidth(e-1)&&this.setCellFromCodepoint(e-1,0,1,n),t<this.length-e){const r=new i.CellData;for(let n=this.length-e-t-1;n>=0;--n)this.setCell(e+t+n,this.loadCell(e+n,r));for(let i=0;i<t;++i)this.setCell(e+i,n)}else for(let r=e;r<this.length;++r)this.setCell(r,n);2===this.getWidth(this.length-1)&&this.setCellFromCodepoint(this.length-1,0,1,n)}deleteCells(e,t,n){if(e%=this.length,t<this.length-e){const r=new i.CellData;for(let n=0;n<this.length-e-t;++n)this.setCell(e+n,this.loadCell(e+t+n,r));for(let e=this.length-t;e<this.length;++e)this.setCell(e,n)}else for(let r=e;r<this.length;++r)this.setCell(r,n);e&&2===this.getWidth(e-1)&&this.setCellFromCodepoint(e-1,0,1,n),0!==this.getWidth(e)||this.hasContent(e)||this.setCellFromCodepoint(e,0,1,n)}replaceCells(e,t,n){if(arguments.length>3&&void 0!==arguments[3]&&arguments[3])for(e&&2===this.getWidth(e-1)&&!this.isProtected(e-1)&&this.setCellFromCodepoint(e-1,0,1,n),t<this.length&&2===this.getWidth(t-1)&&!this.isProtected(t)&&this.setCellFromCodepoint(t,0,1,n);e<t&&e<this.length;)this.isProtected(e)||this.setCell(e,n),e++;else for(e&&2===this.getWidth(e-1)&&this.setCellFromCodepoint(e-1,0,1,n),t<this.length&&2===this.getWidth(t-1)&&this.setCellFromCodepoint(t,0,1,n);e<t&&e<this.length;)this.setCell(e++,n)}resize(e,t){if(e===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const n=3*e;if(e>this.length){if(this._data.buffer.byteLength>=4*n)this._data=new Uint32Array(this._data.buffer,0,n);else{const e=new Uint32Array(n);e.set(this._data),this._data=e}for(let n=this.length;n<e;++n)this.setCell(n,t)}else{this._data=this._data.subarray(0,n);const t=Object.keys(this._combined);for(let n=0;n<t.length;n++){const r=parseInt(t[n],10);r>=e&&delete this._combined[r]}const r=Object.keys(this._extendedAttrs);for(let n=0;n<r.length;n++){const t=parseInt(r[n],10);t>=e&&delete this._extendedAttrs[t]}}return this.length=e,4*n*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const e=new Uint32Array(this._data.length);return e.set(this._data),this._data=e,1}return 0}fill(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])for(let t=0;t<this.length;++t)this.isProtected(t)||this.setCell(t,e);else{this._combined={},this._extendedAttrs={};for(let t=0;t<this.length;++t)this.setCell(t,e)}}copyFrom(e){this.length!==e.length?this._data=new Uint32Array(e._data):this._data.set(e._data),this.length=e.length,this._combined={};for(const t in e._combined)this._combined[t]=e._combined[t];this._extendedAttrs={};for(const t in e._extendedAttrs)this._extendedAttrs[t]=e._extendedAttrs[t];this.isWrapped=e.isWrapped}clone(){const e=new l(0);e._data=new Uint32Array(this._data),e.length=this.length;for(const t in this._combined)e._combined[t]=this._combined[t];for(const t in this._extendedAttrs)e._extendedAttrs[t]=this._extendedAttrs[t];return e.isWrapped=this.isWrapped,e}getTrimmedLength(){for(let e=this.length-1;e>=0;--e)if(4194303&this._data[3*e+0])return e+(this._data[3*e+0]>>22);return 0}getNoBgTrimmedLength(){for(let e=this.length-1;e>=0;--e)if(4194303&this._data[3*e+0]||50331648&this._data[3*e+2])return e+(this._data[3*e+0]>>22);return 0}copyCellsFrom(e,t,n,r,i){const o=e._data;if(i)for(let s=r-1;s>=0;s--){for(let e=0;e<3;e++)this._data[3*(n+s)+e]=o[3*(t+s)+e];268435456&o[3*(t+s)+2]&&(this._extendedAttrs[n+s]=e._extendedAttrs[t+s])}else for(let s=0;s<r;s++){for(let e=0;e<3;e++)this._data[3*(n+s)+e]=o[3*(t+s)+e];268435456&o[3*(t+s)+2]&&(this._extendedAttrs[n+s]=e._extendedAttrs[t+s])}const a=Object.keys(e._combined);for(let s=0;s<a.length;s++){const r=parseInt(a[s],10);r>=t&&(this._combined[r-t+n]=e._combined[r])}}translateToString(e,t,n,r){t=t??0,n=n??this.length,e&&(n=Math.min(n,this.getTrimmedLength())),r&&(r.length=0);let i="";for(;t<n;){const e=this._data[3*t+0],n=2097151&e,s=2097152&e?this._combined[t]:n?(0,a.stringFromCodePoint)(n):o.WHITESPACE_CELL_CHAR;if(i+=s,r)for(let i=0;i<s.length;++i)r.push(t);t+=e>>22||1}return r&&r.push(t),i}}t.BufferLine=l},4841:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getRangeLength=void 0,t.getRangeLength=function(e,t){if(e.start.y>e.end.y)throw new Error(`Buffer range end (${e.end.x}, ${e.end.y}) cannot be before start (${e.start.x}, ${e.start.y})`);return t*(e.end.y-e.start.y)+(e.end.x-e.start.x+1)}},4634:(e,t)=>{function n(e,t,n){if(t===e.length-1)return e[t].getTrimmedLength();const r=!e[t].hasContent(n-1)&&1===e[t].getWidth(n-1),i=2===e[t+1].getWidth(0);return r&&i?n-1:n}Object.defineProperty(t,"__esModule",{value:!0}),t.getWrappedLineTrimmedLength=t.reflowSmallerGetNewLineLengths=t.reflowLargerApplyNewLayout=t.reflowLargerCreateNewLayout=t.reflowLargerGetLinesToRemove=void 0,t.reflowLargerGetLinesToRemove=function(e,t,r,i,o){const a=[];for(let s=0;s<e.length-1;s++){let l=s,c=e.get(++l);if(!c.isWrapped)continue;const u=[e.get(s)];for(;l<e.length&&c.isWrapped;)u.push(c),c=e.get(++l);if(i>=s&&i<l){s+=u.length-1;continue}let d=0,h=n(u,d,t),f=1,p=0;for(;f<u.length;){const e=n(u,f,t),i=e-p,a=r-h,s=Math.min(i,a);u[d].copyCellsFrom(u[f],p,h,s,!1),h+=s,h===r&&(d++,h=0),p+=s,p===e&&(f++,p=0),0===h&&0!==d&&2===u[d-1].getWidth(r-1)&&(u[d].copyCellsFrom(u[d-1],r-1,h++,1,!1),u[d-1].setCell(r-1,o))}u[d].replaceCells(h,r,o);let m=0;for(let e=u.length-1;e>0&&(e>d||0===u[e].getTrimmedLength());e--)m++;m>0&&(a.push(s+u.length-m),a.push(m)),s+=u.length-1}return a},t.reflowLargerCreateNewLayout=function(e,t){const n=[];let r=0,i=t[r],o=0;for(let a=0;a<e.length;a++)if(i===a){const n=t[++r];e.onDeleteEmitter.fire({index:a-o,amount:n}),a+=n-1,o+=n,i=t[++r]}else n.push(a);return{layout:n,countRemoved:o}},t.reflowLargerApplyNewLayout=function(e,t){const n=[];for(let r=0;r<t.length;r++)n.push(e.get(t[r]));for(let r=0;r<n.length;r++)e.set(r,n[r]);e.length=t.length},t.reflowSmallerGetNewLineLengths=function(e,t,r){const i=[],o=e.map(((r,i)=>n(e,i,t))).reduce(((e,t)=>e+t));let a=0,s=0,l=0;for(;l<o;){if(o-l<r){i.push(o-l);break}a+=r;const c=n(e,s,t);a>c&&(a-=c,s++);const u=2===e[s].getWidth(a-1);u&&a--;const d=u?r-1:r;i.push(d),l+=d}return i},t.getWrappedLineTrimmedLength=n},5295:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BufferSet=void 0;const r=n(8460),i=n(844),o=n(9092);class a extends i.Disposable{constructor(e,t){super(),this._optionsService=e,this._bufferService=t,this._onBufferActivate=this.register(new r.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 o.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new o.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(e){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(e),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(e,t){this._normal.resize(e,t),this._alt.resize(e,t),this.setupTabStops(e)}setupTabStops(e){this._normal.setupTabStops(e),this._alt.setupTabStops(e)}}t.BufferSet=a},511:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CellData=void 0;const r=n(482),i=n(643),o=n(3734);class a extends o.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new o.ExtendedAttrs,this.combinedData=""}static fromCharData(e){const t=new a;return t.setFromCharData(e),t}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,r.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(e){this.fg=e[i.CHAR_DATA_ATTR_INDEX],this.bg=0;let t=!1;if(e[i.CHAR_DATA_CHAR_INDEX].length>2)t=!0;else if(2===e[i.CHAR_DATA_CHAR_INDEX].length){const n=e[i.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=n&&n<=56319){const r=e[i.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=r&&r<=57343?this.content=1024*(n-55296)+r-56320+65536|e[i.CHAR_DATA_WIDTH_INDEX]<<22:t=!0}else t=!0}else this.content=e[i.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|e[i.CHAR_DATA_WIDTH_INDEX]<<22;t&&(this.combinedData=e[i.CHAR_DATA_CHAR_INDEX],this.content=2097152|e[i.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}t.CellData=a},643:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WHITESPACE_CELL_CODE=t.WHITESPACE_CELL_WIDTH=t.WHITESPACE_CELL_CHAR=t.NULL_CELL_CODE=t.NULL_CELL_WIDTH=t.NULL_CELL_CHAR=t.CHAR_DATA_CODE_INDEX=t.CHAR_DATA_WIDTH_INDEX=t.CHAR_DATA_CHAR_INDEX=t.CHAR_DATA_ATTR_INDEX=t.DEFAULT_EXT=t.DEFAULT_ATTR=t.DEFAULT_COLOR=void 0,t.DEFAULT_COLOR=0,t.DEFAULT_ATTR=256|t.DEFAULT_COLOR<<9,t.DEFAULT_EXT=0,t.CHAR_DATA_ATTR_INDEX=0,t.CHAR_DATA_CHAR_INDEX=1,t.CHAR_DATA_WIDTH_INDEX=2,t.CHAR_DATA_CODE_INDEX=3,t.NULL_CELL_CHAR="",t.NULL_CELL_WIDTH=1,t.NULL_CELL_CODE=0,t.WHITESPACE_CELL_CHAR=" ",t.WHITESPACE_CELL_WIDTH=1,t.WHITESPACE_CELL_CODE=32},4863:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Marker=void 0;const r=n(8460),i=n(844);class o{get id(){return this._id}constructor(e){this.line=e,this.isDisposed=!1,this._disposables=[],this._id=o._nextId++,this._onDispose=this.register(new r.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,i.disposeArray)(this._disposables),this._disposables.length=0)}register(e){return this._disposables.push(e),e}}t.Marker=o,o._nextId=1},7116:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_CHARSET=t.CHARSETS=void 0,t.CHARSETS={},t.DEFAULT_CHARSET=t.CHARSETS.B,t.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"},t.CHARSETS.A={"#":"\xa3"},t.CHARSETS.B=void 0,t.CHARSETS[4]={"#":"\xa3","@":"\xbe","[":"ij","\\":"\xbd","]":"|","{":"\xa8","|":"f","}":"\xbc","~":"\xb4"},t.CHARSETS.C=t.CHARSETS[5]={"[":"\xc4","\\":"\xd6","]":"\xc5","^":"\xdc","`":"\xe9","{":"\xe4","|":"\xf6","}":"\xe5","~":"\xfc"},t.CHARSETS.R={"#":"\xa3","@":"\xe0","[":"\xb0","\\":"\xe7","]":"\xa7","{":"\xe9","|":"\xf9","}":"\xe8","~":"\xa8"},t.CHARSETS.Q={"@":"\xe0","[":"\xe2","\\":"\xe7","]":"\xea","^":"\xee","`":"\xf4","{":"\xe9","|":"\xf9","}":"\xe8","~":"\xfb"},t.CHARSETS.K={"@":"\xa7","[":"\xc4","\\":"\xd6","]":"\xdc","{":"\xe4","|":"\xf6","}":"\xfc","~":"\xdf"},t.CHARSETS.Y={"#":"\xa3","@":"\xa7","[":"\xb0","\\":"\xe7","]":"\xe9","`":"\xf9","{":"\xe0","|":"\xf2","}":"\xe8","~":"\xec"},t.CHARSETS.E=t.CHARSETS[6]={"@":"\xc4","[":"\xc6","\\":"\xd8","]":"\xc5","^":"\xdc","`":"\xe4","{":"\xe6","|":"\xf8","}":"\xe5","~":"\xfc"},t.CHARSETS.Z={"#":"\xa3","@":"\xa7","[":"\xa1","\\":"\xd1","]":"\xbf","{":"\xb0","|":"\xf1","}":"\xe7"},t.CHARSETS.H=t.CHARSETS[7]={"@":"\xc9","[":"\xc4","\\":"\xd6","]":"\xc5","^":"\xdc","`":"\xe9","{":"\xe4","|":"\xf6","}":"\xe5","~":"\xfc"},t.CHARSETS["="]={"#":"\xf9","@":"\xe0","[":"\xe9","\\":"\xe7","]":"\xea","^":"\xee",_:"\xe8","`":"\xf4","{":"\xe4","|":"\xf6","}":"\xfc","~":"\xfb"}},2584:(e,t)=>{var n,r,i;Object.defineProperty(t,"__esModule",{value:!0}),t.C1_ESCAPED=t.C1=t.C0=void 0,function(e){e.NUL="\0",e.SOH="\x01",e.STX="\x02",e.ETX="\x03",e.EOT="\x04",e.ENQ="\x05",e.ACK="\x06",e.BEL="\x07",e.BS="\b",e.HT="\t",e.LF="\n",e.VT="\v",e.FF="\f",e.CR="\r",e.SO="\x0e",e.SI="\x0f",e.DLE="\x10",e.DC1="\x11",e.DC2="\x12",e.DC3="\x13",e.DC4="\x14",e.NAK="\x15",e.SYN="\x16",e.ETB="\x17",e.CAN="\x18",e.EM="\x19",e.SUB="\x1a",e.ESC="\x1b",e.FS="\x1c",e.GS="\x1d",e.RS="\x1e",e.US="\x1f",e.SP=" ",e.DEL="\x7f"}(n||(t.C0=n={})),function(e){e.PAD="\x80",e.HOP="\x81",e.BPH="\x82",e.NBH="\x83",e.IND="\x84",e.NEL="\x85",e.SSA="\x86",e.ESA="\x87",e.HTS="\x88",e.HTJ="\x89",e.VTS="\x8a",e.PLD="\x8b",e.PLU="\x8c",e.RI="\x8d",e.SS2="\x8e",e.SS3="\x8f",e.DCS="\x90",e.PU1="\x91",e.PU2="\x92",e.STS="\x93",e.CCH="\x94",e.MW="\x95",e.SPA="\x96",e.EPA="\x97",e.SOS="\x98",e.SGCI="\x99",e.SCI="\x9a",e.CSI="\x9b",e.ST="\x9c",e.OSC="\x9d",e.PM="\x9e",e.APC="\x9f"}(r||(t.C1=r={})),function(e){e.ST=`${n.ESC}\\`}(i||(t.C1_ESCAPED=i={}))},7399:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.evaluateKeyboardEvent=void 0;const r=n(2584),i={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:["'",'"']};t.evaluateKeyboardEvent=function(e,t,n,o){const a={type:0,cancel:!1,key:void 0},s=(e.shiftKey?1:0)|(e.altKey?2:0)|(e.ctrlKey?4:0)|(e.metaKey?8:0);switch(e.keyCode){case 0:"UIKeyInputUpArrow"===e.key?a.key=t?r.C0.ESC+"OA":r.C0.ESC+"[A":"UIKeyInputLeftArrow"===e.key?a.key=t?r.C0.ESC+"OD":r.C0.ESC+"[D":"UIKeyInputRightArrow"===e.key?a.key=t?r.C0.ESC+"OC":r.C0.ESC+"[C":"UIKeyInputDownArrow"===e.key&&(a.key=t?r.C0.ESC+"OB":r.C0.ESC+"[B");break;case 8:a.key=e.ctrlKey?"\b":r.C0.DEL,e.altKey&&(a.key=r.C0.ESC+a.key);break;case 9:if(e.shiftKey){a.key=r.C0.ESC+"[Z";break}a.key=r.C0.HT,a.cancel=!0;break;case 13:a.key=e.altKey?r.C0.ESC+r.C0.CR:r.C0.CR,a.cancel=!0;break;case 27:a.key=r.C0.ESC,e.altKey&&(a.key=r.C0.ESC+r.C0.ESC),a.cancel=!0;break;case 37:if(e.metaKey)break;s?(a.key=r.C0.ESC+"[1;"+(s+1)+"D",a.key===r.C0.ESC+"[1;3D"&&(a.key=r.C0.ESC+(n?"b":"[1;5D"))):a.key=t?r.C0.ESC+"OD":r.C0.ESC+"[D";break;case 39:if(e.metaKey)break;s?(a.key=r.C0.ESC+"[1;"+(s+1)+"C",a.key===r.C0.ESC+"[1;3C"&&(a.key=r.C0.ESC+(n?"f":"[1;5C"))):a.key=t?r.C0.ESC+"OC":r.C0.ESC+"[C";break;case 38:if(e.metaKey)break;s?(a.key=r.C0.ESC+"[1;"+(s+1)+"A",n||a.key!==r.C0.ESC+"[1;3A"||(a.key=r.C0.ESC+"[1;5A")):a.key=t?r.C0.ESC+"OA":r.C0.ESC+"[A";break;case 40:if(e.metaKey)break;s?(a.key=r.C0.ESC+"[1;"+(s+1)+"B",n||a.key!==r.C0.ESC+"[1;3B"||(a.key=r.C0.ESC+"[1;5B")):a.key=t?r.C0.ESC+"OB":r.C0.ESC+"[B";break;case 45:e.shiftKey||e.ctrlKey||(a.key=r.C0.ESC+"[2~");break;case 46:a.key=s?r.C0.ESC+"[3;"+(s+1)+"~":r.C0.ESC+"[3~";break;case 36:a.key=s?r.C0.ESC+"[1;"+(s+1)+"H":t?r.C0.ESC+"OH":r.C0.ESC+"[H";break;case 35:a.key=s?r.C0.ESC+"[1;"+(s+1)+"F":t?r.C0.ESC+"OF":r.C0.ESC+"[F";break;case 33:e.shiftKey?a.type=2:e.ctrlKey?a.key=r.C0.ESC+"[5;"+(s+1)+"~":a.key=r.C0.ESC+"[5~";break;case 34:e.shiftKey?a.type=3:e.ctrlKey?a.key=r.C0.ESC+"[6;"+(s+1)+"~":a.key=r.C0.ESC+"[6~";break;case 112:a.key=s?r.C0.ESC+"[1;"+(s+1)+"P":r.C0.ESC+"OP";break;case 113:a.key=s?r.C0.ESC+"[1;"+(s+1)+"Q":r.C0.ESC+"OQ";break;case 114:a.key=s?r.C0.ESC+"[1;"+(s+1)+"R":r.C0.ESC+"OR";break;case 115:a.key=s?r.C0.ESC+"[1;"+(s+1)+"S":r.C0.ESC+"OS";break;case 116:a.key=s?r.C0.ESC+"[15;"+(s+1)+"~":r.C0.ESC+"[15~";break;case 117:a.key=s?r.C0.ESC+"[17;"+(s+1)+"~":r.C0.ESC+"[17~";break;case 118:a.key=s?r.C0.ESC+"[18;"+(s+1)+"~":r.C0.ESC+"[18~";break;case 119:a.key=s?r.C0.ESC+"[19;"+(s+1)+"~":r.C0.ESC+"[19~";break;case 120:a.key=s?r.C0.ESC+"[20;"+(s+1)+"~":r.C0.ESC+"[20~";break;case 121:a.key=s?r.C0.ESC+"[21;"+(s+1)+"~":r.C0.ESC+"[21~";break;case 122:a.key=s?r.C0.ESC+"[23;"+(s+1)+"~":r.C0.ESC+"[23~";break;case 123:a.key=s?r.C0.ESC+"[24;"+(s+1)+"~":r.C0.ESC+"[24~";break;default:if(!e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)if(n&&!o||!e.altKey||e.metaKey)!n||e.altKey||e.ctrlKey||e.shiftKey||!e.metaKey?e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.keyCode>=48&&1===e.key.length?a.key=e.key:e.key&&e.ctrlKey&&("_"===e.key&&(a.key=r.C0.US),"@"===e.key&&(a.key=r.C0.NUL)):65===e.keyCode&&(a.type=1);else{const t=i[e.keyCode],n=t?.[e.shiftKey?1:0];if(n)a.key=r.C0.ESC+n;else if(e.keyCode>=65&&e.keyCode<=90){const t=e.ctrlKey?e.keyCode-64:e.keyCode+32;let n=String.fromCharCode(t);e.shiftKey&&(n=n.toUpperCase()),a.key=r.C0.ESC+n}else if(32===e.keyCode)a.key=r.C0.ESC+(e.ctrlKey?r.C0.NUL:" ");else if("Dead"===e.key&&e.code.startsWith("Key")){let t=e.code.slice(3,4);e.shiftKey||(t=t.toLowerCase()),a.key=r.C0.ESC+t,a.cancel=!0}}else e.keyCode>=65&&e.keyCode<=90?a.key=String.fromCharCode(e.keyCode-64):32===e.keyCode?a.key=r.C0.NUL:e.keyCode>=51&&e.keyCode<=55?a.key=String.fromCharCode(e.keyCode-51+27):56===e.keyCode?a.key=r.C0.DEL:219===e.keyCode?a.key=r.C0.ESC:220===e.keyCode?a.key=r.C0.FS:221===e.keyCode&&(a.key=r.C0.GS)}return a}},482:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Utf8ToUtf32=t.StringToUtf32=t.utf32ToString=t.stringFromCodePoint=void 0,t.stringFromCodePoint=function(e){return e>65535?(e-=65536,String.fromCharCode(55296+(e>>10))+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)},t.utf32ToString=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r="";for(let i=t;i<n;++i){let t=e[i];t>65535?(t-=65536,r+=String.fromCharCode(55296+(t>>10))+String.fromCharCode(t%1024+56320)):r+=String.fromCharCode(t)}return r},t.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){const n=e.length;if(!n)return 0;let r=0,i=0;if(this._interim){const n=e.charCodeAt(i++);56320<=n&&n<=57343?t[r++]=1024*(this._interim-55296)+n-56320+65536:(t[r++]=this._interim,t[r++]=n),this._interim=0}for(let o=i;o<n;++o){const i=e.charCodeAt(o);if(55296<=i&&i<=56319){if(++o>=n)return this._interim=i,r;const a=e.charCodeAt(o);56320<=a&&a<=57343?t[r++]=1024*(i-55296)+a-56320+65536:(t[r++]=i,t[r++]=a)}else 65279!==i&&(t[r++]=i)}return r}},t.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){const n=e.length;if(!n)return 0;let r,i,o,a,s=0,l=0,c=0;if(this.interim[0]){let r=!1,i=this.interim[0];i&=192==(224&i)?31:224==(240&i)?15:7;let o,a=0;for(;(o=63&this.interim[++a])&&a<4;)i<<=6,i|=o;const l=192==(224&this.interim[0])?2:224==(240&this.interim[0])?3:4,u=l-a;for(;c<u;){if(c>=n)return 0;if(o=e[c++],128!=(192&o)){c--,r=!0;break}this.interim[a++]=o,i<<=6,i|=63&o}r||(2===l?i<128?c--:t[s++]=i:3===l?i<2048||i>=55296&&i<=57343||65279===i||(t[s++]=i):i<65536||i>1114111||(t[s++]=i)),this.interim.fill(0)}const u=n-4;let d=c;for(;d<n;){for(;!(!(d<u)||128&(r=e[d])||128&(i=e[d+1])||128&(o=e[d+2])||128&(a=e[d+3]));)t[s++]=r,t[s++]=i,t[s++]=o,t[s++]=a,d+=4;if(r=e[d++],r<128)t[s++]=r;else if(192==(224&r)){if(d>=n)return this.interim[0]=r,s;if(i=e[d++],128!=(192&i)){d--;continue}if(l=(31&r)<<6|63&i,l<128){d--;continue}t[s++]=l}else if(224==(240&r)){if(d>=n)return this.interim[0]=r,s;if(i=e[d++],128!=(192&i)){d--;continue}if(d>=n)return this.interim[0]=r,this.interim[1]=i,s;if(o=e[d++],128!=(192&o)){d--;continue}if(l=(15&r)<<12|(63&i)<<6|63&o,l<2048||l>=55296&&l<=57343||65279===l)continue;t[s++]=l}else if(240==(248&r)){if(d>=n)return this.interim[0]=r,s;if(i=e[d++],128!=(192&i)){d--;continue}if(d>=n)return this.interim[0]=r,this.interim[1]=i,s;if(o=e[d++],128!=(192&o)){d--;continue}if(d>=n)return this.interim[0]=r,this.interim[1]=i,this.interim[2]=o,s;if(a=e[d++],128!=(192&a)){d--;continue}if(l=(7&r)<<18|(63&i)<<12|(63&o)<<6|63&a,l<65536||l>1114111)continue;t[s++]=l}}return s}}},225:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UnicodeV6=void 0;const r=n(1480),i=[[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]],o=[[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]];let a;t.UnicodeV6=class{constructor(){if(this.version="6",!a){a=new Uint8Array(65536),a.fill(1),a[0]=0,a.fill(0,1,32),a.fill(0,127,160),a.fill(2,4352,4448),a[9001]=2,a[9002]=2,a.fill(2,11904,42192),a[12351]=1,a.fill(2,44032,55204),a.fill(2,63744,64256),a.fill(2,65040,65050),a.fill(2,65072,65136),a.fill(2,65280,65377),a.fill(2,65504,65511);for(let e=0;e<i.length;++e)a.fill(0,i[e][0],i[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?a[e]:function(e,t){let n,r=0,i=t.length-1;if(e<t[0][0]||e>t[i][1])return!1;for(;i>=r;)if(n=r+i>>1,e>t[n][1])r=n+1;else{if(!(e<t[n][0]))return!0;i=n-1}return!1}(e,o)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,t){let n=this.wcwidth(e),i=0===n&&0!==t;if(i){const e=r.UnicodeService.extractWidth(t);0===e?i=!1:e>n&&(n=e)}return r.UnicodeService.createPropertyValue(0,n,i)}}},5981:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WriteBuffer=void 0;const r=n(8460),i=n(844);class o extends i.Disposable{constructor(e){super(),this._action=e,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new r.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(e,t){if(void 0!==t&&this._syncCalls>t)return void(this._syncCalls=0);if(this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let n;for(this._isSyncWriting=!0;n=this._writeBuffer.shift();){this._action(n);const e=this._callbacks.shift();e&&e()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(e,t){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+=e.length,this._writeBuffer.push(e),this._callbacks.push(t),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t)}_innerWrite(){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const n=this._writeBuffer[this._bufferOffset],r=this._action(n,e);if(r){const e=e=>Date.now()-t>=12?setTimeout((()=>this._innerWrite(0,e))):this._innerWrite(t,e);return void r.catch((e=>(queueMicrotask((()=>{throw e})),Promise.resolve(!1)))).then(e)}const i=this._callbacks[this._bufferOffset];if(i&&i(),this._bufferOffset++,this._pendingData-=n.length,Date.now()-t>=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()}}t.WriteBuffer=o},5941:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toRgbString=t.parseColor=void 0;const n=/^([\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})$/,r=/^[\da-f]+$/;function i(e,t){const n=e.toString(16),r=n.length<2?"0"+n:n;switch(t){case 4:return n[0];case 8:return r;case 12:return(r+r).slice(0,3);default:return r+r}}t.parseColor=function(e){if(!e)return;let t=e.toLowerCase();if(0===t.indexOf("rgb:")){t=t.slice(4);const e=n.exec(t);if(e){const t=e[1]?15:e[4]?255:e[7]?4095:65535;return[Math.round(parseInt(e[1]||e[4]||e[7]||e[10],16)/t*255),Math.round(parseInt(e[2]||e[5]||e[8]||e[11],16)/t*255),Math.round(parseInt(e[3]||e[6]||e[9]||e[12],16)/t*255)]}}else if(0===t.indexOf("#")&&(t=t.slice(1),r.exec(t)&&[3,6,9,12].includes(t.length))){const e=t.length/3,n=[0,0,0];for(let r=0;r<3;++r){const i=parseInt(t.slice(e*r,e*r+e),16);n[r]=1===e?i<<4:2===e?i:3===e?i>>4:i>>8}return n}},t.toRgbString=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16;const[n,r,o]=e;return`rgb:${i(n,t)}/${i(r,t)}/${i(o,t)}`}},5770:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PAYLOAD_LIMIT=void 0,t.PAYLOAD_LIMIT=1e7},6351:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DcsHandler=t.DcsParser=void 0;const r=n(482),i=n(8742),o=n(5770),a=[];t.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=a,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=a}registerHandler(e,t){void 0===this._handlers[e]&&(this._handlers[e]=[]);const n=this._handlers[e];return n.push(t),{dispose:()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}reset(){if(this._active.length)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].unhook(!1);this._stack.paused=!1,this._active=a,this._ident=0}hook(e,t){if(this.reset(),this._ident=e,this._active=this._handlers[e]||a,this._active.length)for(let n=this._active.length-1;n>=0;n--)this._active[n].hook(t);else this._handlerFb(this._ident,"HOOK",t)}put(e,t,n){if(this._active.length)for(let r=this._active.length-1;r>=0;r--)this._active[r].put(e,t,n);else this._handlerFb(this._ident,"PUT",(0,r.utf32ToString)(e,t,n))}unhook(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this._active.length){let n=!1,r=this._active.length-1,i=!1;if(this._stack.paused&&(r=this._stack.loopPosition-1,n=t,i=this._stack.fallThrough,this._stack.paused=!1),!i&&!1===n){for(;r>=0&&(n=this._active[r].unhook(e),!0!==n);r--)if(n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!1,n;r--}for(;r>=0;r--)if(n=this._active[r].unhook(!1),n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!0,n}else this._handlerFb(this._ident,"UNHOOK",e);this._active=a,this._ident=0}};const s=new i.Params;s.addParam(0),t.DcsHandler=class{constructor(e){this._handler=e,this._data="",this._params=s,this._hitLimit=!1}hook(e){this._params=e.length>1||e.params[0]?e.clone():s,this._data="",this._hitLimit=!1}put(e,t,n){this._hitLimit||(this._data+=(0,r.utf32ToString)(e,t,n),this._data.length>o.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data,this._params),t instanceof Promise))return t.then((e=>(this._params=s,this._data="",this._hitLimit=!1,e)));return this._params=s,this._data="",this._hitLimit=!1,t}}},2015:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EscapeSequenceParser=t.VT500_TRANSITION_TABLE=t.TransitionTable=void 0;const r=n(844),i=n(8742),o=n(6242),a=n(6351);class s{constructor(e){this.table=new Uint8Array(e)}setDefault(e,t){this.table.fill(e<<4|t)}add(e,t,n,r){this.table[t<<8|e]=n<<4|r}addMany(e,t,n,r){for(let i=0;i<e.length;i++)this.table[t<<8|e[i]]=n<<4|r}}t.TransitionTable=s;const l=160;t.VT500_TRANSITION_TABLE=function(){const e=new s(4095),t=Array.apply(null,Array(256)).map(((e,t)=>t)),n=(e,n)=>t.slice(e,n),r=n(32,127),i=n(0,24);i.push(25),i.push.apply(i,n(28,32));const o=n(0,14);let a;for(a in e.setDefault(1,0),e.addMany(r,0,2,0),o)e.addMany([24,26,153,154],a,3,0),e.addMany(n(128,144),a,3,0),e.addMany(n(144,152),a,3,0),e.add(156,a,0,0),e.add(27,a,11,1),e.add(157,a,4,8),e.addMany([152,158,159],a,0,7),e.add(155,a,11,3),e.add(144,a,11,9);return e.addMany(i,0,3,0),e.addMany(i,1,3,1),e.add(127,1,0,1),e.addMany(i,8,0,8),e.addMany(i,3,3,3),e.add(127,3,0,3),e.addMany(i,4,3,4),e.add(127,4,0,4),e.addMany(i,6,3,6),e.addMany(i,5,3,5),e.add(127,5,0,5),e.addMany(i,2,3,2),e.add(127,2,0,2),e.add(93,1,4,8),e.addMany(r,8,5,8),e.add(127,8,5,8),e.addMany([156,27,24,26,7],8,6,0),e.addMany(n(28,32),8,0,8),e.addMany([88,94,95],1,0,7),e.addMany(r,7,0,7),e.addMany(i,7,0,7),e.add(156,7,0,0),e.add(127,7,0,7),e.add(91,1,11,3),e.addMany(n(64,127),3,7,0),e.addMany(n(48,60),3,8,4),e.addMany([60,61,62,63],3,9,4),e.addMany(n(48,60),4,8,4),e.addMany(n(64,127),4,7,0),e.addMany([60,61,62,63],4,0,6),e.addMany(n(32,64),6,0,6),e.add(127,6,0,6),e.addMany(n(64,127),6,0,0),e.addMany(n(32,48),3,9,5),e.addMany(n(32,48),5,9,5),e.addMany(n(48,64),5,0,6),e.addMany(n(64,127),5,7,0),e.addMany(n(32,48),4,9,5),e.addMany(n(32,48),1,9,2),e.addMany(n(32,48),2,9,2),e.addMany(n(48,127),2,10,0),e.addMany(n(48,80),1,10,0),e.addMany(n(81,88),1,10,0),e.addMany([89,90,92],1,10,0),e.addMany(n(96,127),1,10,0),e.add(80,1,11,9),e.addMany(i,9,0,9),e.add(127,9,0,9),e.addMany(n(28,32),9,0,9),e.addMany(n(32,48),9,9,12),e.addMany(n(48,60),9,8,10),e.addMany([60,61,62,63],9,9,10),e.addMany(i,11,0,11),e.addMany(n(32,128),11,0,11),e.addMany(n(28,32),11,0,11),e.addMany(i,10,0,10),e.add(127,10,0,10),e.addMany(n(28,32),10,0,10),e.addMany(n(48,60),10,8,10),e.addMany([60,61,62,63],10,0,11),e.addMany(n(32,48),10,9,12),e.addMany(i,12,0,12),e.add(127,12,0,12),e.addMany(n(28,32),12,0,12),e.addMany(n(32,48),12,9,12),e.addMany(n(48,64),12,0,11),e.addMany(n(64,127),12,12,13),e.addMany(n(64,127),10,12,13),e.addMany(n(64,127),9,12,13),e.addMany(i,13,13,13),e.addMany(r,13,13,13),e.add(127,13,0,13),e.addMany([27,156,24,26],13,14,0),e.add(l,0,2,0),e.add(l,8,5,8),e.add(l,6,0,6),e.add(l,11,0,11),e.add(l,13,13,13),e}();class c extends r.Disposable{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.VT500_TRANSITION_TABLE;super(),this._transitions=e,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new i.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(e,t,n)=>{},this._executeHandlerFb=e=>{},this._csiHandlerFb=(e,t)=>{},this._escHandlerFb=e=>{},this._errorHandlerFb=e=>e,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,r.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new o.OscParser),this._dcsParser=this.register(new a.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[64,126],n=0;if(e.prefix){if(e.prefix.length>1)throw new Error("only one byte as prefix supported");if(n=e.prefix.charCodeAt(0),n&&60>n||n>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(e.intermediates){if(e.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let t=0;t<e.intermediates.length;++t){const r=e.intermediates.charCodeAt(t);if(32>r||r>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");n<<=8,n|=r}}if(1!==e.final.length)throw new Error("final must be a single byte");const r=e.final.charCodeAt(0);if(t[0]>r||r>t[1])throw new Error(`final must be in range ${t[0]} .. ${t[1]}`);return n<<=8,n|=r,n}identToString(e){const t=[];for(;e;)t.push(String.fromCharCode(255&e)),e>>=8;return t.reverse().join("")}setPrintHandler(e){this._printHandler=e}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(e,t){const n=this._identifier(e,[48,126]);void 0===this._escHandlers[n]&&(this._escHandlers[n]=[]);const r=this._escHandlers[n];return r.push(t),{dispose:()=>{const e=r.indexOf(t);-1!==e&&r.splice(e,1)}}}clearEscHandler(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]}setEscHandlerFallback(e){this._escHandlerFb=e}setExecuteHandler(e,t){this._executeHandlers[e.charCodeAt(0)]=t}clearExecuteHandler(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]}setExecuteHandlerFallback(e){this._executeHandlerFb=e}registerCsiHandler(e,t){const n=this._identifier(e);void 0===this._csiHandlers[n]&&(this._csiHandlers[n]=[]);const r=this._csiHandlers[n];return r.push(t),{dispose:()=>{const e=r.indexOf(t);-1!==e&&r.splice(e,1)}}}clearCsiHandler(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]}setCsiHandlerFallback(e){this._csiHandlerFb=e}registerDcsHandler(e,t){return this._dcsParser.registerHandler(this._identifier(e),t)}clearDcsHandler(e){this._dcsParser.clearHandler(this._identifier(e))}setDcsHandlerFallback(e){this._dcsParser.setHandlerFallback(e)}registerOscHandler(e,t){return this._oscParser.registerHandler(e,t)}clearOscHandler(e){this._oscParser.clearHandler(e)}setOscHandlerFallback(e){this._oscParser.setHandlerFallback(e)}setErrorHandler(e){this._errorHandler=e}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,0!==this._parseStack.state&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(e,t,n,r,i){this._parseStack.state=e,this._parseStack.handlers=t,this._parseStack.handlerPos=n,this._parseStack.transition=r,this._parseStack.chunkPos=i}parse(e,t,n){let r,i=0,o=0,a=0;if(this._parseStack.state)if(2===this._parseStack.state)this._parseStack.state=0,a=this._parseStack.chunkPos+1;else{if(void 0===n||1===this._parseStack.state)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const t=this._parseStack.handlers;let o=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(!1===n&&o>-1)for(;o>=0&&(r=t[o](this._params),!0!==r);o--)if(r instanceof Promise)return this._parseStack.handlerPos=o,r;this._parseStack.handlers=[];break;case 4:if(!1===n&&o>-1)for(;o>=0&&(r=t[o](),!0!==r);o--)if(r instanceof Promise)return this._parseStack.handlerPos=o,r;this._parseStack.handlers=[];break;case 6:if(i=e[this._parseStack.chunkPos],r=this._dcsParser.unhook(24!==i&&26!==i,n),r)return r;27===i&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(i=e[this._parseStack.chunkPos],r=this._oscParser.end(24!==i&&26!==i,n),r)return r;27===i&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,a=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let s=a;s<t;++s){switch(i=e[s],o=this._transitions.table[this.currentState<<8|(i<160?i:l)],o>>4){case 2:for(let r=s+1;;++r){if(r>=t||(i=e[r])<32||i>126&&i<l){this._printHandler(e,s,r),s=r-1;break}if(++r>=t||(i=e[r])<32||i>126&&i<l){this._printHandler(e,s,r),s=r-1;break}if(++r>=t||(i=e[r])<32||i>126&&i<l){this._printHandler(e,s,r),s=r-1;break}if(++r>=t||(i=e[r])<32||i>126&&i<l){this._printHandler(e,s,r),s=r-1;break}}break;case 3:this._executeHandlers[i]?this._executeHandlers[i]():this._executeHandlerFb(i),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:s,code:i,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const n=this._csiHandlers[this._collect<<8|i];let a=n?n.length-1:-1;for(;a>=0&&(r=n[a](this._params),!0!==r);a--)if(r instanceof Promise)return this._preserveStack(3,n,a,o,s),r;a<0&&this._csiHandlerFb(this._collect<<8|i,this._params),this.precedingJoinState=0;break;case 8:do{switch(i){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(i-48)}}while(++s<t&&(i=e[s])>47&&i<60);s--;break;case 9:this._collect<<=8,this._collect|=i;break;case 10:const c=this._escHandlers[this._collect<<8|i];let u=c?c.length-1:-1;for(;u>=0&&(r=c[u](),!0!==r);u--)if(r instanceof Promise)return this._preserveStack(4,c,u,o,s),r;u<0&&this._escHandlerFb(this._collect<<8|i),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|i,this._params);break;case 13:for(let r=s+1;;++r)if(r>=t||24===(i=e[r])||26===i||27===i||i>127&&i<l){this._dcsParser.put(e,s,r),s=r-1;break}break;case 14:if(r=this._dcsParser.unhook(24!==i&&26!==i),r)return this._preserveStack(6,[],0,o,s),r;27===i&&(o|=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 r=s+1;;r++)if(r>=t||(i=e[r])<32||i>127&&i<l){this._oscParser.put(e,s,r),s=r-1;break}break;case 6:if(r=this._oscParser.end(24!==i&&26!==i),r)return this._preserveStack(5,[],0,o,s),r;27===i&&(o|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&o}}}t.EscapeSequenceParser=c},6242:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OscHandler=t.OscParser=void 0;const r=n(5770),i=n(482),o=[];t.OscParser=class{constructor(){this._state=0,this._active=o,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(e,t){void 0===this._handlers[e]&&(this._handlers[e]=[]);const n=this._handlers[e];return n.push(t),{dispose:()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=o}reset(){if(2===this._state)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].end(!1);this._stack.paused=!1,this._active=o,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||o,this._active.length)for(let e=this._active.length-1;e>=0;e--)this._active[e].start();else this._handlerFb(this._id,"START")}_put(e,t,n){if(this._active.length)for(let r=this._active.length-1;r>=0;r--)this._active[r].put(e,t,n);else this._handlerFb(this._id,"PUT",(0,i.utf32ToString)(e,t,n))}start(){this.reset(),this._state=1}put(e,t,n){if(3!==this._state){if(1===this._state)for(;t<n;){const n=e[t++];if(59===n){this._state=2,this._start();break}if(n<48||57<n)return void(this._state=3);-1===this._id&&(this._id=0),this._id=10*this._id+n-48}2===this._state&&n-t>0&&this._put(e,t,n)}}end(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(0!==this._state){if(3!==this._state)if(1===this._state&&this._start(),this._active.length){let n=!1,r=this._active.length-1,i=!1;if(this._stack.paused&&(r=this._stack.loopPosition-1,n=t,i=this._stack.fallThrough,this._stack.paused=!1),!i&&!1===n){for(;r>=0&&(n=this._active[r].end(e),!0!==n);r--)if(n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!1,n;r--}for(;r>=0;r--)if(n=this._active[r].end(!1),n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!0,n}else this._handlerFb(this._id,"END",e);this._active=o,this._id=-1,this._state=0}}},t.OscHandler=class{constructor(e){this._handler=e,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(e,t,n){this._hitLimit||(this._data+=(0,i.utf32ToString)(e,t,n),this._data.length>r.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data),t instanceof Promise))return t.then((e=>(this._data="",this._hitLimit=!1,e)));return this._data="",this._hitLimit=!1,t}}},8742:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Params=void 0;const n=2147483647;class r{static fromArray(e){const t=new r;if(!e.length)return t;for(let n=Array.isArray(e[0])?1:0;n<e.length;++n){const r=e[n];if(Array.isArray(r))for(let e=0;e<r.length;++e)t.addSubParam(r[e]);else t.addParam(r)}return t}constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:32,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:32;if(this.maxLength=e,this.maxSubParamsLength=t,t>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(e),this.length=0,this._subParams=new Int32Array(t),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(e),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const e=new r(this.maxLength,this.maxSubParamsLength);return e.params.set(this.params),e.length=this.length,e._subParams.set(this._subParams),e._subParamsLength=this._subParamsLength,e._subParamsIdx.set(this._subParamsIdx),e._rejectDigits=this._rejectDigits,e._rejectSubDigits=this._rejectSubDigits,e._digitIsSub=this._digitIsSub,e}toArray(){const e=[];for(let t=0;t<this.length;++t){e.push(this.params[t]);const n=this._subParamsIdx[t]>>8,r=255&this._subParamsIdx[t];r-n>0&&e.push(Array.prototype.slice.call(this._subParams,n,r))}return e}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(e){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(e<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=e>n?n:e}}addSubParam(e){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(e<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=e>n?n:e,this._subParamsIdx[this.length-1]++}}hasSubParams(e){return(255&this._subParamsIdx[e])-(this._subParamsIdx[e]>>8)>0}getSubParams(e){const t=this._subParamsIdx[e]>>8,n=255&this._subParamsIdx[e];return n-t>0?this._subParams.subarray(t,n):null}getSubParamsAll(){const e={};for(let t=0;t<this.length;++t){const n=this._subParamsIdx[t]>>8,r=255&this._subParamsIdx[t];r-n>0&&(e[t]=this._subParams.slice(n,r))}return e}addDigit(e){let t;if(this._rejectDigits||!(t=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const r=this._digitIsSub?this._subParams:this.params,i=r[t-1];r[t-1]=~i?Math.min(10*i+e,n):e}}t.Params=r},5741:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AddonManager=void 0,t.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let e=this._addons.length-1;e>=0;e--)this._addons[e].instance.dispose()}loadAddon(e,t){const n={instance:t,dispose:t.dispose,isDisposed:!1};this._addons.push(n),t.dispose=()=>this._wrappedAddonDispose(n),t.activate(e)}_wrappedAddonDispose(e){if(e.isDisposed)return;let t=-1;for(let n=0;n<this._addons.length;n++)if(this._addons[n]===e){t=n;break}if(-1===t)throw new Error("Could not dispose an addon that has not been loaded");e.isDisposed=!0,e.dispose.apply(e.instance),this._addons.splice(t,1)}}},8771:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BufferApiView=void 0;const r=n(3785),i=n(511);t.BufferApiView=class{constructor(e,t){this._buffer=e,this.type=t}init(e){return this._buffer=e,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(e){const t=this._buffer.lines.get(e);if(t)return new r.BufferLineApiView(t)}getNullCell(){return new i.CellData}}},3785:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BufferLineApiView=void 0;const r=n(511);t.BufferLineApiView=class{constructor(e){this._line=e}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(e,t){if(!(e<0||e>=this._line.length))return t?(this._line.loadCell(e,t),t):this._line.loadCell(e,new r.CellData)}translateToString(e,t,n){return this._line.translateToString(e,t,n)}}},8285:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BufferNamespaceApi=void 0;const r=n(8771),i=n(8460),o=n(844);class a extends o.Disposable{constructor(e){super(),this._core=e,this._onBufferChange=this.register(new i.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new r.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new r.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)}}t.BufferNamespaceApi=a},7975:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ParserApi=void 0,t.ParserApi=class{constructor(e){this._core=e}registerCsiHandler(e,t){return this._core.registerCsiHandler(e,(e=>t(e.toArray())))}addCsiHandler(e,t){return this.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._core.registerDcsHandler(e,((e,n)=>t(e,n.toArray())))}addDcsHandler(e,t){return this.registerDcsHandler(e,t)}registerEscHandler(e,t){return this._core.registerEscHandler(e,t)}addEscHandler(e,t){return this.registerEscHandler(e,t)}registerOscHandler(e,t){return this._core.registerOscHandler(e,t)}addOscHandler(e,t){return this.registerOscHandler(e,t)}}},7090:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UnicodeApi=void 0,t.UnicodeApi=class{constructor(e){this._core=e}register(e){this._core.unicodeService.register(e)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(e){this._core.unicodeService.activeVersion=e}}},744:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.BufferService=t.MINIMUM_ROWS=t.MINIMUM_COLS=void 0;const o=n(8460),a=n(844),s=n(5295),l=n(2585);t.MINIMUM_COLS=2,t.MINIMUM_ROWS=1;let c=t.BufferService=class extends a.Disposable{get buffer(){return this.buffers.active}constructor(e){super(),this.isUserScrolling=!1,this._onResize=this.register(new o.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new o.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(e.rawOptions.cols||0,t.MINIMUM_COLS),this.rows=Math.max(e.rawOptions.rows||0,t.MINIMUM_ROWS),this.buffers=this.register(new s.BufferSet(e,this))}resize(e,t){this.cols=e,this.rows=t,this.buffers.resize(e,t),this._onResize.fire({cols:e,rows:t})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=this.buffer;let r;r=this._cachedBlankLine,r&&r.length===this.cols&&r.getFg(0)===e.fg&&r.getBg(0)===e.bg||(r=n.getBlankLine(e,t),this._cachedBlankLine=r),r.isWrapped=t;const i=n.ybase+n.scrollTop,o=n.ybase+n.scrollBottom;if(0===n.scrollTop){const e=n.lines.isFull;o===n.lines.length-1?e?n.lines.recycle().copyFrom(r):n.lines.push(r.clone()):n.lines.splice(o+1,0,r.clone()),e?this.isUserScrolling&&(n.ydisp=Math.max(n.ydisp-1,0)):(n.ybase++,this.isUserScrolling||n.ydisp++)}else{const e=o-i+1;n.lines.shiftElements(i+1,e-1,-1),n.lines.set(o,r.clone())}this.isUserScrolling||(n.ydisp=n.ybase),this._onScroll.fire(n.ydisp)}scrollLines(e,t,n){const r=this.buffer;if(e<0){if(0===r.ydisp)return;this.isUserScrolling=!0}else e+r.ydisp>=r.ybase&&(this.isUserScrolling=!1);const i=r.ydisp;r.ydisp=Math.max(Math.min(r.ydisp+e,r.ybase),0),i!==r.ydisp&&(t||this._onScroll.fire(r.ydisp))}};t.BufferService=c=r([i(0,l.IOptionsService)],c)},7994:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CharsetService=void 0,t.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(e){this.glevel=e,this.charset=this._charsets[e]}setgCharset(e,t){this._charsets[e]=t,this.glevel===e&&(this.charset=t)}}},1753:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CoreMouseService=void 0;const o=n(2585),a=n(8460),s=n(844),l={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:e=>4!==e.button&&1===e.action&&(e.ctrl=!1,e.alt=!1,e.shift=!1,!0)},VT200:{events:19,restrict:e=>32!==e.action},DRAG:{events:23,restrict:e=>32!==e.action||3!==e.button},ANY:{events:31,restrict:e=>!0}};function c(e,t){let n=(e.ctrl?16:0)|(e.shift?4:0)|(e.alt?8:0);return 4===e.button?(n|=64,n|=e.action):(n|=3&e.button,4&e.button&&(n|=64),8&e.button&&(n|=128),32===e.action?n|=32:0!==e.action||t||(n|=3)),n}const u=String.fromCharCode,d={DEFAULT:e=>{const t=[c(e,!1)+32,e.col+32,e.row+32];return t[0]>255||t[1]>255||t[2]>255?"":`\x1b[M${u(t[0])}${u(t[1])}${u(t[2])}`},SGR:e=>{const t=0===e.action&&4!==e.button?"m":"M";return`\x1b[<${c(e,!0)};${e.col};${e.row}${t}`},SGR_PIXELS:e=>{const t=0===e.action&&4!==e.button?"m":"M";return`\x1b[<${c(e,!0)};${e.x};${e.y}${t}`}};let h=t.CoreMouseService=class extends s.Disposable{constructor(e,t){super(),this._bufferService=e,this._coreService=t,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new a.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const n of Object.keys(l))this.addProtocol(n,l[n]);for(const n of Object.keys(d))this.addEncoding(n,d[n]);this.reset()}addProtocol(e,t){this._protocols[e]=t}addEncoding(e,t){this._encodings[e]=t}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return 0!==this._protocols[this._activeProtocol].events}set activeProtocol(e){if(!this._protocols[e])throw new Error(`unknown protocol "${e}"`);this._activeProtocol=e,this._onProtocolChange.fire(this._protocols[e].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(e){if(!this._encodings[e])throw new Error(`unknown encoding "${e}"`);this._activeEncoding=e}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(e){if(e.col<0||e.col>=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows)return!1;if(4===e.button&&32===e.action)return!1;if(3===e.button&&32!==e.action)return!1;if(4!==e.button&&(2===e.action||3===e.action))return!1;if(e.col++,e.row++,32===e.action&&this._lastEvent&&this._equalEvents(this._lastEvent,e,"SGR_PIXELS"===this._activeEncoding))return!1;if(!this._protocols[this._activeProtocol].restrict(e))return!1;const t=this._encodings[this._activeEncoding](e);return t&&("DEFAULT"===this._activeEncoding?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0}explainEvents(e){return{down:!!(1&e),up:!!(2&e),drag:!!(4&e),move:!!(8&e),wheel:!!(16&e)}}_equalEvents(e,t,n){if(n){if(e.x!==t.x)return!1;if(e.y!==t.y)return!1}else{if(e.col!==t.col)return!1;if(e.row!==t.row)return!1}return e.button===t.button&&e.action===t.action&&e.ctrl===t.ctrl&&e.alt===t.alt&&e.shift===t.shift}};t.CoreMouseService=h=r([i(0,o.IBufferService),i(1,o.ICoreService)],h)},6975:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CoreService=void 0;const o=n(1439),a=n(8460),s=n(844),l=n(2585),c=Object.freeze({insertMode:!1}),u=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let d=t.CoreService=class extends s.Disposable{constructor(e,t,n){super(),this._bufferService=e,this._logService=t,this._optionsService=n,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new a.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new a.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new a.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new a.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,o.clone)(c),this.decPrivateModes=(0,o.clone)(u)}reset(){this.modes=(0,o.clone)(c),this.decPrivateModes=(0,o.clone)(u)}triggerDataEvent(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this._optionsService.rawOptions.disableStdin)return;const n=this._bufferService.buffer;t&&this._optionsService.rawOptions.scrollOnUserInput&&n.ybase!==n.ydisp&&this._onRequestScrollToBottom.fire(),t&&this._onUserInput.fire(),this._logService.debug(`sending data "${e}"`,(()=>e.split("").map((e=>e.charCodeAt(0))))),this._onData.fire(e)}triggerBinaryEvent(e){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${e}"`,(()=>e.split("").map((e=>e.charCodeAt(0))))),this._onBinary.fire(e))}};t.CoreService=d=r([i(0,l.IBufferService),i(1,l.ILogService),i(2,l.IOptionsService)],d)},9074:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DecorationService=void 0;const r=n(8055),i=n(8460),o=n(844),a=n(6106);let s=0,l=0;class c extends o.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new a.SortedList((e=>e?.marker.line)),this._onDecorationRegistered=this.register(new i.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new i.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,o.toDisposable)((()=>this.reset())))}registerDecoration(e){if(e.marker.isDisposed)return;const t=new u(e);if(t){const e=t.marker.onDispose((()=>t.dispose()));t.onDispose((()=>{t&&(this._decorations.delete(t)&&this._onDecorationRemoved.fire(t),e.dispose())})),this._decorations.insert(t),this._onDecorationRegistered.fire(t)}return t}reset(){for(const e of this._decorations.values())e.dispose();this._decorations.clear()}*getDecorationsAtCell(e,t,n){let r=0,i=0;for(const o of this._decorations.getKeyIterator(t))r=o.options.x??0,i=r+(o.options.width??1),e>=r&&e<i&&(!n||(o.options.layer??"bottom")===n)&&(yield o)}forEachDecorationAtCell(e,t,n,r){this._decorations.forEachByKey(t,(t=>{s=t.options.x??0,l=s+(t.options.width??1),e>=s&&e<l&&(!n||(t.options.layer??"bottom")===n)&&r(t)}))}}t.DecorationService=c;class u extends o.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return null===this._cachedBg&&(this.options.backgroundColor?this._cachedBg=r.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return null===this._cachedFg&&(this.options.foregroundColor?this._cachedFg=r.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(e){super(),this.options=e,this.onRenderEmitter=this.register(new i.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new i.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=e.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InstantiationService=t.ServiceCollection=void 0;const r=n(2585),i=n(8343);class o{constructor(){this._entries=new Map;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(const[r,i]of t)this.set(r,i)}set(e,t){const n=this._entries.get(e);return this._entries.set(e,t),n}forEach(e){for(const[t,n]of this._entries.entries())e(t,n)}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}}t.ServiceCollection=o,t.InstantiationService=class{constructor(){this._services=new o,this._services.set(r.IInstantiationService,this)}setService(e,t){this._services.set(e,t)}getService(e){return this._services.get(e)}createInstance(e){const t=(0,i.getServiceDependencies)(e).sort(((e,t)=>e.index-t.index)),n=[];for(const i of t){const t=this._services.get(i.id);if(!t)throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${i.id}.`);n.push(t)}for(var r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];const s=t.length>0?t[0].index:o.length;if(o.length!==s)throw new Error(`[createInstance] First service dependency of ${e.name} at position ${s+1} conflicts with ${o.length} static arguments`);return new e(...[...o,...n])}}},7866:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.traceCall=t.setTraceLogger=t.LogService=void 0;const o=n(844),a=n(2585),s={trace:a.LogLevelEnum.TRACE,debug:a.LogLevelEnum.DEBUG,info:a.LogLevelEnum.INFO,warn:a.LogLevelEnum.WARN,error:a.LogLevelEnum.ERROR,off:a.LogLevelEnum.OFF};let l,c=t.LogService=class extends o.Disposable{get logLevel(){return this._logLevel}constructor(e){super(),this._optionsService=e,this._logLevel=a.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),l=this}_updateLogLevel(){this._logLevel=s[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;t<e.length;t++)"function"==typeof e[t]&&(e[t]=e[t]())}_log(e,t,n){this._evalLazyOptionalParams(n),e.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+t,...n)}trace(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this._logLevel<=a.LogLevelEnum.TRACE&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,e,n)}debug(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this._logLevel<=a.LogLevelEnum.DEBUG&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,e,n)}info(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this._logLevel<=a.LogLevelEnum.INFO&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,e,n)}warn(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this._logLevel<=a.LogLevelEnum.WARN&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,e,n)}error(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this._logLevel<=a.LogLevelEnum.ERROR&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,e,n)}};t.LogService=c=r([i(0,a.IOptionsService)],c),t.setTraceLogger=function(e){l=e},t.traceCall=function(e,t,n){if("function"!=typeof n.value)throw new Error("not supported");const r=n.value;n.value=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(l.logLevel!==a.LogLevelEnum.TRACE)return r.apply(this,t);l.trace(`GlyphRenderer#${r.name}(${t.map((e=>JSON.stringify(e))).join(", ")})`);const i=r.apply(this,t);return l.trace(`GlyphRenderer#${r.name} return`,i),i}}},7302:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OptionsService=t.DEFAULT_OPTIONS=void 0;const r=n(8460),i=n(844),o=n(6114);t.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:o.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const a=["normal","bold","100","200","300","400","500","600","700","800","900"];class s extends i.Disposable{constructor(e){super(),this._onOptionChange=this.register(new r.EventEmitter),this.onOptionChange=this._onOptionChange.event;const n={...t.DEFAULT_OPTIONS};for(const t in e)if(t in n)try{const r=e[t];n[t]=this._sanitizeAndValidateOption(t,r)}catch(e){console.error(e)}this.rawOptions=n,this.options={...n},this._setupOptions(),this.register((0,i.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(e,t){return this.onOptionChange((n=>{n===e&&t(this.rawOptions[e])}))}onMultipleOptionChange(e,t){return this.onOptionChange((n=>{-1!==e.indexOf(n)&&t()}))}_setupOptions(){const e=e=>{if(!(e in t.DEFAULT_OPTIONS))throw new Error(`No option with key "${e}"`);return this.rawOptions[e]},n=(e,n)=>{if(!(e in t.DEFAULT_OPTIONS))throw new Error(`No option with key "${e}"`);n=this._sanitizeAndValidateOption(e,n),this.rawOptions[e]!==n&&(this.rawOptions[e]=n,this._onOptionChange.fire(e))};for(const t in this.rawOptions){const r={get:e.bind(this,t),set:n.bind(this,t)};Object.defineProperty(this.options,t,r)}}_sanitizeAndValidateOption(e,n){switch(e){case"cursorStyle":if(n||(n=t.DEFAULT_OPTIONS[e]),!function(e){return"block"===e||"underline"===e||"bar"===e}(n))throw new Error(`"${n}" is not a valid value for ${e}`);break;case"wordSeparator":n||(n=t.DEFAULT_OPTIONS[e]);break;case"fontWeight":case"fontWeightBold":if("number"==typeof n&&1<=n&&n<=1e3)break;n=a.includes(n)?n:t.DEFAULT_OPTIONS[e];break;case"cursorWidth":n=Math.floor(n);case"lineHeight":case"tabStopWidth":if(n<1)throw new Error(`${e} cannot be less than 1, value: ${n}`);break;case"minimumContrastRatio":n=Math.max(1,Math.min(21,Math.round(10*n)/10));break;case"scrollback":if((n=Math.min(n,4294967295))<0)throw new Error(`${e} cannot be less than 0, value: ${n}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(n<=0)throw new Error(`${e} cannot be less than or equal to 0, value: ${n}`);break;case"rows":case"cols":if(!n&&0!==n)throw new Error(`${e} must be numeric, value: ${n}`);break;case"windowsPty":n=n??{}}return n}}t.OptionsService=s},2660:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.OscLinkService=void 0;const o=n(2585);let a=t.OscLinkService=class{constructor(e){this._bufferService=e,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(e){const t=this._bufferService.buffer;if(void 0===e.id){const n=t.addMarker(t.ybase+t.y),r={data:e,id:this._nextId++,lines:[n]};return n.onDispose((()=>this._removeMarkerFromLink(r,n))),this._dataByLinkId.set(r.id,r),r.id}const n=e,r=this._getEntryIdKey(n),i=this._entriesWithId.get(r);if(i)return this.addLineToLink(i.id,t.ybase+t.y),i.id;const o=t.addMarker(t.ybase+t.y),a={id:this._nextId++,key:this._getEntryIdKey(n),data:n,lines:[o]};return o.onDispose((()=>this._removeMarkerFromLink(a,o))),this._entriesWithId.set(a.key,a),this._dataByLinkId.set(a.id,a),a.id}addLineToLink(e,t){const n=this._dataByLinkId.get(e);if(n&&n.lines.every((e=>e.line!==t))){const e=this._bufferService.buffer.addMarker(t);n.lines.push(e),e.onDispose((()=>this._removeMarkerFromLink(n,e)))}}getLinkData(e){return this._dataByLinkId.get(e)?.data}_getEntryIdKey(e){return`${e.id};;${e.uri}`}_removeMarkerFromLink(e,t){const n=e.lines.indexOf(t);-1!==n&&(e.lines.splice(n,1),0===e.lines.length&&(void 0!==e.data.id&&this._entriesWithId.delete(e.key),this._dataByLinkId.delete(e.id)))}};t.OscLinkService=a=r([i(0,o.IBufferService)],a)},8343:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createDecorator=t.getServiceDependencies=t.serviceRegistry=void 0;const n="di$target",r="di$dependencies";t.serviceRegistry=new Map,t.getServiceDependencies=function(e){return e[r]||[]},t.createDecorator=function(e){if(t.serviceRegistry.has(e))return t.serviceRegistry.get(e);const i=function(e,t,o){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");!function(e,t,i){t[n]===t?t[r].push({id:e,index:i}):(t[r]=[{id:e,index:i}],t[n]=t)}(i,e,o)};return i.toString=()=>e,t.serviceRegistry.set(e,i),i}},2585:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IDecorationService=t.IUnicodeService=t.IOscLinkService=t.IOptionsService=t.ILogService=t.LogLevelEnum=t.IInstantiationService=t.ICharsetService=t.ICoreService=t.ICoreMouseService=t.IBufferService=void 0;const r=n(8343);var i;t.IBufferService=(0,r.createDecorator)("BufferService"),t.ICoreMouseService=(0,r.createDecorator)("CoreMouseService"),t.ICoreService=(0,r.createDecorator)("CoreService"),t.ICharsetService=(0,r.createDecorator)("CharsetService"),t.IInstantiationService=(0,r.createDecorator)("InstantiationService"),function(e){e[e.TRACE=0]="TRACE",e[e.DEBUG=1]="DEBUG",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.OFF=5]="OFF"}(i||(t.LogLevelEnum=i={})),t.ILogService=(0,r.createDecorator)("LogService"),t.IOptionsService=(0,r.createDecorator)("OptionsService"),t.IOscLinkService=(0,r.createDecorator)("OscLinkService"),t.IUnicodeService=(0,r.createDecorator)("UnicodeService"),t.IDecorationService=(0,r.createDecorator)("DecorationService")},1480:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UnicodeService=void 0;const r=n(8460),i=n(225);class o{static extractShouldJoin(e){return 0!=(1&e)}static extractWidth(e){return e>>1&3}static extractCharKind(e){return e>>3}static createPropertyValue(e,t){return(16777215&e)<<3|(3&t)<<1|(arguments.length>2&&void 0!==arguments[2]&&arguments[2]?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new r.EventEmitter,this.onChange=this._onChange.event;const e=new i.UnicodeV6;this.register(e),this._active=e.version,this._activeProvider=e}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(e){if(!this._providers[e])throw new Error(`unknown Unicode version "${e}"`);this._active=e,this._activeProvider=this._providers[e],this._onChange.fire(e)}register(e){this._providers[e.version]=e}wcwidth(e){return this._activeProvider.wcwidth(e)}getStringCellWidth(e){let t=0,n=0;const r=e.length;for(let i=0;i<r;++i){let a=e.charCodeAt(i);if(55296<=a&&a<=56319){if(++i>=r)return t+this.wcwidth(a);const n=e.charCodeAt(i);56320<=n&&n<=57343?a=1024*(a-55296)+n-56320+65536:t+=this.wcwidth(n)}const s=this.charProperties(a,n);let l=o.extractWidth(s);o.extractShouldJoin(s)&&(l-=o.extractWidth(n)),t+=l,n=s}return t}charProperties(e,t){return this._activeProvider.charProperties(e,t)}}t.UnicodeService=o}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}var r={};return(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.Terminal=void 0;const t=n(9042),i=n(3236),o=n(844),a=n(5741),s=n(8285),l=n(7975),c=n(7090),u=["cols","rows"];class d extends o.Disposable{constructor(e){super(),this._core=this.register(new i.Terminal(e)),this._addonManager=this.register(new a.AddonManager),this._publicOptions={...this._core.options};const t=e=>this._core.options[e],n=(e,t)=>{this._checkReadonlyOptions(e),this._core.options[e]=t};for(const r in this._core.options){const e={get:t.bind(this,r),set:n.bind(this,r)};Object.defineProperty(this._publicOptions,r,e)}}_checkReadonlyOptions(e){if(u.includes(e))throw new Error(`Option "${e}" 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 l.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new c.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 s.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const e=this._core.coreService.decPrivateModes;let t="none";switch(this._core.coreMouseService.activeProtocol){case"X10":t="x10";break;case"VT200":t="vt200";break;case"DRAG":t="drag";break;case"ANY":t="any"}return{applicationCursorKeysMode:e.applicationCursorKeys,applicationKeypadMode:e.applicationKeypad,bracketedPasteMode:e.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:t,originMode:e.origin,reverseWraparoundMode:e.reverseWraparound,sendFocusMode:e.sendFocus,wraparoundMode:e.wraparound}}get options(){return this._publicOptions}set options(e){for(const t in e)this._publicOptions[t]=e[t]}blur(){this._core.blur()}focus(){this._core.focus()}input(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this._core.input(e,t)}resize(e,t){this._verifyIntegers(e,t),this._core.resize(e,t)}open(e){this._core.open(e)}attachCustomKeyEventHandler(e){this._core.attachCustomKeyEventHandler(e)}attachCustomWheelEventHandler(e){this._core.attachCustomWheelEventHandler(e)}registerLinkProvider(e){return this._core.registerLinkProvider(e)}registerCharacterJoiner(e){return this._checkProposedApi(),this._core.registerCharacterJoiner(e)}deregisterCharacterJoiner(e){this._checkProposedApi(),this._core.deregisterCharacterJoiner(e)}registerMarker(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this._verifyIntegers(e),this._core.registerMarker(e)}registerDecoration(e){return this._checkProposedApi(),this._verifyPositiveIntegers(e.x??0,e.width??0,e.height??0),this._core.registerDecoration(e)}hasSelection(){return this._core.hasSelection()}select(e,t,n){this._verifyIntegers(e,t,n),this._core.select(e,t,n)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(e,t){this._verifyIntegers(e,t),this._core.selectLines(e,t)}dispose(){super.dispose()}scrollLines(e){this._verifyIntegers(e),this._core.scrollLines(e)}scrollPages(e){this._verifyIntegers(e),this._core.scrollPages(e)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(e){this._verifyIntegers(e),this._core.scrollToLine(e)}clear(){this._core.clear()}write(e,t){this._core.write(e,t)}writeln(e,t){this._core.write(e),this._core.write("\r\n",t)}paste(e){this._core.paste(e)}refresh(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(e){this._addonManager.loadAddon(this,e)}static get strings(){return t}_verifyIntegers(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(const r of t)if(r===1/0||isNaN(r)||r%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(const r of t)if(r&&(r===1/0||isNaN(r)||r%1!=0||r<0))throw new Error("This API only accepts positive integers")}}e.Terminal=d})(),r})(),e.exports=t()},123:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(e,i){for(var o,a,s=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l<arguments.length;l++){for(var c in o=Object(arguments[l]))n.call(o,c)&&(s[c]=o[c]);if(t){a=t(o);for(var u=0;u<a.length;u++)r.call(o,a[u])&&(s[a[u]]=o[a[u]])}}return s}},497:(e,t,n)=>{"use strict";var r=n(218);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},173:(e,t,n)=>{e.exports=n(497)()},218:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},132:(e,t)=>{"use strict";var n,r=Symbol.for("react.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen");function v(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case o:case s:case a:case h:case f:return e;default:switch(e=e&&e.$$typeof){case u:case c:case d:case m:case p:case l:return e;default:return t}}case i:return t}}}n=Symbol.for("react.module.reference"),t.ForwardRef=d,t.isFragment=function(e){return v(e)===o},t.isMemo=function(e){return v(e)===p}},816:(e,t,n)=>{"use strict";e.exports=n(132)},730:(e,t,n)=>{"use strict";var r=n(43),i=n(853);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,s={};function l(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(s[e]=t,e=0;e<t.length;e++)a.add(t[e])}var u=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),d=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,f={},p={};function m(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){g[e]=new m(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];g[t]=new m(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){g[e]=new m(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){g[e]=new m(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){g[e]=new m(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){g[e]=new m(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){g[e]=new m(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){g[e]=new m(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){g[e]=new m(e,5,!1,e.toLowerCase(),null,!1,!1)}));var v=/[\-:]([a-z])/g;function b(e){return e[1].toUpperCase()}function y(e,t,n,r){var i=g.hasOwnProperty(t)?g[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!d.call(p,e)||!d.call(f,e)&&(h.test(e)?p[e]=!0:(f[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(v,b);g[t]=new m(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(v,b);g[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(v,b);g[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)})),g.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)}));var _=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,S=Symbol.for("react.element"),w=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),k=Symbol.for("react.provider"),O=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),P=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var N=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var L=Symbol.iterator;function T(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=L&&e[L]||e["@@iterator"])?e:null}var D,A=Object.assign;function B(e){if(void 0===D)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);D=t&&t[1]||""}return"\n"+D+e}var j=!1;function z(e,t){if(!e||j)return"";j=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&"string"===typeof c.stack){for(var i=c.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s]){var l="\n"+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=a&&0<=s);break}}}finally{j=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?B(e):""}function H(e){switch(e.tag){case 5:return B(e.type);case 16:return B("Lazy");case 13:return B("Suspense");case 19:return B("SuspenseList");case 0:case 2:case 15:return e=z(e.type,!1);case 11:return e=z(e.type.render,!1);case 1:return e=z(e.type,!0);default:return""}}function F(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case C:return"Fragment";case w:return"Portal";case E:return"Profiler";case x:return"StrictMode";case R:return"Suspense";case I:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case O:return(e.displayName||"Context")+".Consumer";case k:return(e._context.displayName||"Context")+".Provider";case $:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case M:return null!==(t=e.displayName||null)?t:F(e.type)||"Memo";case P:t=e._payload,e=e._init;try{return F(e(t))}catch(n){}}return null}function W(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return F(t);case 8:return t===x?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t}return null}function K(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function V(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function U(e){e._valueTracker||(e._valueTracker=function(e){var t=V(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function q(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=V(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function X(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function G(e,t){var n=t.checked;return A({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Y(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=K(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Q(e,t){null!=(t=t.checked)&&y(e,"checked",t,!1)}function J(e,t){Q(e,t);var n=K(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,K(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Z(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&X(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+K(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(o(91));return A({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ie(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(o(92));if(te(n)){if(1<n.length)throw Error(o(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:K(n)}}function oe(e,t){var n=K(t.value),r=K(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ae(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function se(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?se(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ce,ue,de=(ue=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ce=ce||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ce.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ue(e,t)}))}:ue);function he(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var fe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pe=["Webkit","ms","Moz","O"];function me(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||fe.hasOwnProperty(e)&&fe[e]?(""+t).trim():t+"px"}function ge(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=me(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(fe).forEach((function(e){pe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fe[t]=fe[e]}))}));var ve=A({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function be(e,t){if(t){if(ve[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(o(62))}}function ye(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var _e=null;function Se(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var we=null,Ce=null,xe=null;function Ee(e){if(e=yi(e)){if("function"!==typeof we)throw Error(o(280));var t=e.stateNode;t&&(t=Si(t),we(e.stateNode,e.type,t))}}function ke(e){Ce?xe?xe.push(e):xe=[e]:Ce=e}function Oe(){if(Ce){var e=Ce,t=xe;if(xe=Ce=null,Ee(e),t)for(e=0;e<t.length;e++)Ee(t[e])}}function $e(e,t){return e(t)}function Re(){}var Ie=!1;function Me(e,t,n){if(Ie)return e(t,n);Ie=!0;try{return $e(e,t,n)}finally{Ie=!1,(null!==Ce||null!==xe)&&(Re(),Oe())}}function Pe(e,t){var n=e.stateNode;if(null===n)return null;var r=Si(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(o(231,t,typeof n));return n}var Ne=!1;if(u)try{var Le={};Object.defineProperty(Le,"passive",{get:function(){Ne=!0}}),window.addEventListener("test",Le,Le),window.removeEventListener("test",Le,Le)}catch(ue){Ne=!1}function Te(e,t,n,r,i,o,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var De=!1,Ae=null,Be=!1,je=null,ze={onError:function(e){De=!0,Ae=e}};function He(e,t,n,r,i,o,a,s,l){De=!1,Ae=null,Te.apply(ze,arguments)}function Fe(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function We(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Ke(e){if(Fe(e)!==e)throw Error(o(188))}function Ve(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Fe(e)))throw Error(o(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(r=i.return)){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return Ke(i),e;if(a===r)return Ke(i),t;a=a.sibling}throw Error(o(188))}if(n.return!==r.return)n=i,r=a;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=a;break}if(l===r){s=!0,r=i,n=a;break}l=l.sibling}if(!s){for(l=a.child;l;){if(l===n){s=!0,n=a,r=i;break}if(l===r){s=!0,r=a,n=i;break}l=l.sibling}if(!s)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(3!==n.tag)throw Error(o(188));return n.stateNode.current===n?e:t}(e))?Ue(e):null}function Ue(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Ue(e);if(null!==t)return t;e=e.sibling}return null}var qe=i.unstable_scheduleCallback,Xe=i.unstable_cancelCallback,Ge=i.unstable_shouldYield,Ye=i.unstable_requestPaint,Qe=i.unstable_now,Je=i.unstable_getCurrentPriorityLevel,Ze=i.unstable_ImmediatePriority,et=i.unstable_UserBlockingPriority,tt=i.unstable_NormalPriority,nt=i.unstable_LowPriority,rt=i.unstable_IdlePriority,it=null,ot=null;var at=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(st(e)/lt|0)|0},st=Math.log,lt=Math.LN2;var ct=64,ut=4194304;function dt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ht(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~i;0!==s?r=dt(s):0!==(o&=a)&&(r=dt(o))}else 0!==(a=n&~i)?r=dt(a):0!==o&&(r=dt(o));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&0!==(4194240&o)))return t;if(0!==(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-at(t)),r|=e[n],t&=~i;return r}function ft(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function pt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function mt(){var e=ct;return 0===(4194240&(ct<<=1))&&(ct=64),e}function gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function vt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-at(t)]=n}function bt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-at(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var yt=0;function _t(e){return 1<(e&=-e)?4<e?0!==(268435455&e)?16:536870912:4:1}var St,wt,Ct,xt,Et,kt=!1,Ot=[],$t=null,Rt=null,It=null,Mt=new Map,Pt=new Map,Nt=[],Lt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Tt(e,t){switch(e){case"focusin":case"focusout":$t=null;break;case"dragenter":case"dragleave":Rt=null;break;case"mouseover":case"mouseout":It=null;break;case"pointerover":case"pointerout":Mt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pt.delete(t.pointerId)}}function Dt(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==t&&(null!==(t=yi(t))&&wt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function At(e){var t=bi(e.target);if(null!==t){var n=Fe(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=We(n)))return e.blockedOn=t,void Et(e.priority,(function(){Ct(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Bt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Gt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=yi(n))&&wt(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);_e=r,n.target.dispatchEvent(r),_e=null,t.shift()}return!0}function jt(e,t,n){Bt(e)&&n.delete(t)}function zt(){kt=!1,null!==$t&&Bt($t)&&($t=null),null!==Rt&&Bt(Rt)&&(Rt=null),null!==It&&Bt(It)&&(It=null),Mt.forEach(jt),Pt.forEach(jt)}function Ht(e,t){e.blockedOn===t&&(e.blockedOn=null,kt||(kt=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,zt)))}function Ft(e){function t(t){return Ht(t,e)}if(0<Ot.length){Ht(Ot[0],e);for(var n=1;n<Ot.length;n++){var r=Ot[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==$t&&Ht($t,e),null!==Rt&&Ht(Rt,e),null!==It&&Ht(It,e),Mt.forEach(t),Pt.forEach(t),n=0;n<Nt.length;n++)(r=Nt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Nt.length&&null===(n=Nt[0]).blockedOn;)At(n),null===n.blockedOn&&Nt.shift()}var Wt=_.ReactCurrentBatchConfig,Kt=!0;function Vt(e,t,n,r){var i=yt,o=Wt.transition;Wt.transition=null;try{yt=1,qt(e,t,n,r)}finally{yt=i,Wt.transition=o}}function Ut(e,t,n,r){var i=yt,o=Wt.transition;Wt.transition=null;try{yt=4,qt(e,t,n,r)}finally{yt=i,Wt.transition=o}}function qt(e,t,n,r){if(Kt){var i=Gt(e,t,n,r);if(null===i)Kr(e,t,r,Xt,n),Tt(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return $t=Dt($t,e,t,n,r,i),!0;case"dragenter":return Rt=Dt(Rt,e,t,n,r,i),!0;case"mouseover":return It=Dt(It,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Mt.set(o,Dt(Mt.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Pt.set(o,Dt(Pt.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Tt(e,r),4&t&&-1<Lt.indexOf(e)){for(;null!==i;){var o=yi(i);if(null!==o&&St(o),null===(o=Gt(e,t,n,r))&&Kr(e,t,r,Xt,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else Kr(e,t,r,null,n)}}var Xt=null;function Gt(e,t,n,r){if(Xt=null,null!==(e=bi(e=Se(r))))if(null===(t=Fe(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=We(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Xt=e,null}function Yt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Je()){case Ze:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Qt=null,Jt=null,Zt=null;function en(){if(Zt)return Zt;var e,t,n=Jt,r=n.length,i="value"in Qt?Qt.value:Qt.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return Zt=i.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function on(e){function t(t,n,r,i,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return A(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var an,sn,ln,cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},un=on(cn),dn=A({},cn,{view:0,detail:0}),hn=on(dn),fn=A({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:En,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ln&&(ln&&"mousemove"===e.type?(an=e.screenX-ln.screenX,sn=e.screenY-ln.screenY):sn=an=0,ln=e),an)},movementY:function(e){return"movementY"in e?e.movementY:sn}}),pn=on(fn),mn=on(A({},fn,{dataTransfer:0})),gn=on(A({},dn,{relatedTarget:0})),vn=on(A({},cn,{animationName:0,elapsedTime:0,pseudoElement:0})),bn=A({},cn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),yn=on(bn),_n=on(A({},cn,{data:0})),Sn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Cn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Cn[e])&&!!t[e]}function En(){return xn}var kn=A({},dn,{key:function(e){if(e.key){var t=Sn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?wn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:En,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),On=on(kn),$n=on(A({},fn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Rn=on(A({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:En})),In=on(A({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Mn=A({},fn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Pn=on(Mn),Nn=[9,13,27,32],Ln=u&&"CompositionEvent"in window,Tn=null;u&&"documentMode"in document&&(Tn=document.documentMode);var Dn=u&&"TextEvent"in window&&!Tn,An=u&&(!Ln||Tn&&8<Tn&&11>=Tn),Bn=String.fromCharCode(32),jn=!1;function zn(e,t){switch(e){case"keyup":return-1!==Nn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Fn=!1;var Wn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Kn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Wn[e.type]:"textarea"===t}function Vn(e,t,n,r){ke(r),0<(t=Ur(t,"onChange")).length&&(n=new un("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Un=null,qn=null;function Xn(e){Br(e,0)}function Gn(e){if(q(_i(e)))return e}function Yn(e,t){if("change"===e)return t}var Qn=!1;if(u){var Jn;if(u){var Zn="oninput"in document;if(!Zn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Zn="function"===typeof er.oninput}Jn=Zn}else Jn=!1;Qn=Jn&&(!document.documentMode||9<document.documentMode)}function tr(){Un&&(Un.detachEvent("onpropertychange",nr),qn=Un=null)}function nr(e){if("value"===e.propertyName&&Gn(qn)){var t=[];Vn(t,qn,e,Se(e)),Me(Xn,t)}}function rr(e,t,n){"focusin"===e?(tr(),qn=n,(Un=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Gn(qn)}function or(e,t){if("click"===e)return Gn(t)}function ar(e,t){if("input"===e||"change"===e)return Gn(t)}var sr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t};function lr(e,t){if(sr(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!d.call(t,i)||!sr(e[i],t[i]))return!1}return!0}function cr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ur(e,t){var n,r=cr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=cr(r)}}function dr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function hr(){for(var e=window,t=X();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=X((e=t.contentWindow).document)}return t}function fr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function pr(e){var t=hr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dr(n.ownerDocument.documentElement,n)){if(null!==r&&fr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=ur(n,o);var a=ur(n,r);i&&a&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"===typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var mr=u&&"documentMode"in document&&11>=document.documentMode,gr=null,vr=null,br=null,yr=!1;function _r(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;yr||null==gr||gr!==X(r)||("selectionStart"in(r=gr)&&fr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},br&&lr(br,r)||(br=r,0<(r=Ur(vr,"onSelect")).length&&(t=new un("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gr)))}function Sr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var wr={animationend:Sr("Animation","AnimationEnd"),animationiteration:Sr("Animation","AnimationIteration"),animationstart:Sr("Animation","AnimationStart"),transitionend:Sr("Transition","TransitionEnd")},Cr={},xr={};function Er(e){if(Cr[e])return Cr[e];if(!wr[e])return e;var t,n=wr[e];for(t in n)if(n.hasOwnProperty(t)&&t in xr)return Cr[e]=n[t];return e}u&&(xr=document.createElement("div").style,"AnimationEvent"in window||(delete wr.animationend.animation,delete wr.animationiteration.animation,delete wr.animationstart.animation),"TransitionEvent"in window||delete wr.transitionend.transition);var kr=Er("animationend"),Or=Er("animationiteration"),$r=Er("animationstart"),Rr=Er("transitionend"),Ir=new Map,Mr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Pr(e,t){Ir.set(e,t),l(t,[e])}for(var Nr=0;Nr<Mr.length;Nr++){var Lr=Mr[Nr];Pr(Lr.toLowerCase(),"on"+(Lr[0].toUpperCase()+Lr.slice(1)))}Pr(kr,"onAnimationEnd"),Pr(Or,"onAnimationIteration"),Pr($r,"onAnimationStart"),Pr("dblclick","onDoubleClick"),Pr("focusin","onFocus"),Pr("focusout","onBlur"),Pr(Rr,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Tr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Dr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Tr));function Ar(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,a,s,l,c){if(He.apply(this,arguments),De){if(!De)throw Error(o(198));var u=Ae;De=!1,Ae=null,Be||(Be=!0,je=u)}}(r,t,void 0,e),e.currentTarget=null}function Br(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;Ar(i,s,c),o=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,c=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;Ar(i,s,c),o=l}}}if(Be)throw e=je,Be=!1,je=null,e}function jr(e,t){var n=t[mi];void 0===n&&(n=t[mi]=new Set);var r=e+"__bubble";n.has(r)||(Wr(t,e,2,!1),n.add(r))}function zr(e,t,n){var r=0;t&&(r|=4),Wr(n,e,r,t)}var Hr="_reactListening"+Math.random().toString(36).slice(2);function Fr(e){if(!e[Hr]){e[Hr]=!0,a.forEach((function(t){"selectionchange"!==t&&(Dr.has(t)||zr(t,!1,e),zr(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Hr]||(t[Hr]=!0,zr("selectionchange",!1,t))}}function Wr(e,t,n,r){switch(Yt(t)){case 1:var i=Vt;break;case 4:i=Ut;break;default:i=qt}n=i.bind(null,t,n,e),i=void 0,!Ne||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Kr(e,t,n,r,i){var o=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=bi(s)))return;if(5===(l=a.tag)||6===l){r=o=a;continue e}s=s.parentNode}}r=r.return}Me((function(){var r=o,i=Se(n),a=[];e:{var s=Ir.get(e);if(void 0!==s){var l=un,c=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":l=On;break;case"focusin":c="focus",l=gn;break;case"focusout":c="blur",l=gn;break;case"beforeblur":case"afterblur":l=gn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=pn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=mn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Rn;break;case kr:case Or:case $r:l=vn;break;case Rr:l=In;break;case"scroll":l=hn;break;case"wheel":l=Pn;break;case"copy":case"cut":case"paste":l=yn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=$n}var u=0!==(4&t),d=!u&&"scroll"===e,h=u?null!==s?s+"Capture":null:s;u=[];for(var f,p=r;null!==p;){var m=(f=p).stateNode;if(5===f.tag&&null!==m&&(f=m,null!==h&&(null!=(m=Pe(p,h))&&u.push(Vr(p,m,f)))),d)break;p=p.return}0<u.length&&(s=new l(s,c,null,n,i),a.push({event:s,listeners:u}))}}if(0===(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===_e||!(c=n.relatedTarget||n.fromElement)||!bi(c)&&!c[pi])&&(l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?bi(c):null)&&(c!==(d=Fe(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=pn,m="onMouseLeave",h="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(u=$n,m="onPointerLeave",h="onPointerEnter",p="pointer"),d=null==l?s:_i(l),f=null==c?s:_i(c),(s=new u(m,p+"leave",l,n,i)).target=d,s.relatedTarget=f,m=null,bi(i)===r&&((u=new u(h,p+"enter",c,n,i)).target=f,u.relatedTarget=d,m=u),d=m,l&&c)e:{for(h=c,p=0,f=u=l;f;f=qr(f))p++;for(f=0,m=h;m;m=qr(m))f++;for(;0<p-f;)u=qr(u),p--;for(;0<f-p;)h=qr(h),f--;for(;p--;){if(u===h||null!==h&&u===h.alternate)break e;u=qr(u),h=qr(h)}u=null}else u=null;null!==l&&Xr(a,s,l,u,!1),null!==c&&null!==d&&Xr(a,d,c,u,!0)}if("select"===(l=(s=r?_i(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=Yn;else if(Kn(s))if(Qn)g=ar;else{g=ir;var v=rr}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=or);switch(g&&(g=g(e,r))?Vn(a,g,n,i):(v&&v(e,s,r),"focusout"===e&&(v=s._wrapperState)&&v.controlled&&"number"===s.type&&ee(s,"number",s.value)),v=r?_i(r):window,e){case"focusin":(Kn(v)||"true"===v.contentEditable)&&(gr=v,vr=r,br=null);break;case"focusout":br=vr=gr=null;break;case"mousedown":yr=!0;break;case"contextmenu":case"mouseup":case"dragend":yr=!1,_r(a,n,i);break;case"selectionchange":if(mr)break;case"keydown":case"keyup":_r(a,n,i)}var b;if(Ln)e:{switch(e){case"compositionstart":var y="onCompositionStart";break e;case"compositionend":y="onCompositionEnd";break e;case"compositionupdate":y="onCompositionUpdate";break e}y=void 0}else Fn?zn(e,n)&&(y="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(y="onCompositionStart");y&&(An&&"ko"!==n.locale&&(Fn||"onCompositionStart"!==y?"onCompositionEnd"===y&&Fn&&(b=en()):(Jt="value"in(Qt=i)?Qt.value:Qt.textContent,Fn=!0)),0<(v=Ur(r,y)).length&&(y=new _n(y,e,null,n,i),a.push({event:y,listeners:v}),b?y.data=b:null!==(b=Hn(n))&&(y.data=b))),(b=Dn?function(e,t){switch(e){case"compositionend":return Hn(t);case"keypress":return 32!==t.which?null:(jn=!0,Bn);case"textInput":return(e=t.data)===Bn&&jn?null:e;default:return null}}(e,n):function(e,t){if(Fn)return"compositionend"===e||!Ln&&zn(e,t)?(e=en(),Zt=Jt=Qt=null,Fn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return An&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Ur(r,"onBeforeInput")).length&&(i=new _n("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=b))}Br(a,t)}))}function Vr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ur(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=Pe(e,n))&&r.unshift(Vr(e,o,i)),null!=(o=Pe(e,t))&&r.push(Vr(e,o,i))),e=e.return}return r}function qr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Xr(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,i?null!=(l=Pe(n,o))&&a.unshift(Vr(n,l,s)):i||null!=(l=Pe(n,o))&&a.push(Vr(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var Gr=/\r\n?/g,Yr=/\u0000|\uFFFD/g;function Qr(e){return("string"===typeof e?e:""+e).replace(Gr,"\n").replace(Yr,"")}function Jr(e,t,n){if(t=Qr(t),Qr(e)!==t&&n)throw Error(o(425))}function Zr(){}var ei=null,ti=null;function ni(e,t){return"textarea"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ri="function"===typeof setTimeout?setTimeout:void 0,ii="function"===typeof clearTimeout?clearTimeout:void 0,oi="function"===typeof Promise?Promise:void 0,ai="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof oi?function(e){return oi.resolve(null).then(e).catch(si)}:ri;function si(e){setTimeout((function(){throw e}))}function li(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void Ft(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);Ft(t)}function ci(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function ui(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var di=Math.random().toString(36).slice(2),hi="__reactFiber$"+di,fi="__reactProps$"+di,pi="__reactContainer$"+di,mi="__reactEvents$"+di,gi="__reactListeners$"+di,vi="__reactHandles$"+di;function bi(e){var t=e[hi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pi]||n[hi]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ui(e);null!==e;){if(n=e[hi])return n;e=ui(e)}return t}n=(e=n).parentNode}return null}function yi(e){return!(e=e[hi]||e[pi])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function _i(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(o(33))}function Si(e){return e[fi]||null}var wi=[],Ci=-1;function xi(e){return{current:e}}function Ei(e){0>Ci||(e.current=wi[Ci],wi[Ci]=null,Ci--)}function ki(e,t){Ci++,wi[Ci]=e.current,e.current=t}var Oi={},$i=xi(Oi),Ri=xi(!1),Ii=Oi;function Mi(e,t){var n=e.type.contextTypes;if(!n)return Oi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Pi(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Ni(){Ei(Ri),Ei($i)}function Li(e,t,n){if($i.current!==Oi)throw Error(o(168));ki($i,t),ki(Ri,n)}function Ti(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(o(108,W(e)||"Unknown",i));return A({},n,r)}function Di(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Oi,Ii=$i.current,ki($i,e),ki(Ri,Ri.current),!0}function Ai(e,t,n){var r=e.stateNode;if(!r)throw Error(o(169));n?(e=Ti(e,t,Ii),r.__reactInternalMemoizedMergedChildContext=e,Ei(Ri),Ei($i),ki($i,e)):Ei(Ri),ki(Ri,n)}var Bi=null,ji=!1,zi=!1;function Hi(e){null===Bi?Bi=[e]:Bi.push(e)}function Fi(){if(!zi&&null!==Bi){zi=!0;var e=0,t=yt;try{var n=Bi;for(yt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Bi=null,ji=!1}catch(i){throw null!==Bi&&(Bi=Bi.slice(e+1)),qe(Ze,Fi),i}finally{yt=t,zi=!1}}return null}var Wi=[],Ki=0,Vi=null,Ui=0,qi=[],Xi=0,Gi=null,Yi=1,Qi="";function Ji(e,t){Wi[Ki++]=Ui,Wi[Ki++]=Vi,Vi=e,Ui=t}function Zi(e,t,n){qi[Xi++]=Yi,qi[Xi++]=Qi,qi[Xi++]=Gi,Gi=e;var r=Yi;e=Qi;var i=32-at(r)-1;r&=~(1<<i),n+=1;var o=32-at(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Yi=1<<32-at(t)+i|n<<i|r,Qi=o+e}else Yi=1<<o|n<<i|r,Qi=e}function eo(e){null!==e.return&&(Ji(e,1),Zi(e,1,0))}function to(e){for(;e===Vi;)Vi=Wi[--Ki],Wi[Ki]=null,Ui=Wi[--Ki],Wi[Ki]=null;for(;e===Gi;)Gi=qi[--Xi],qi[Xi]=null,Qi=qi[--Xi],qi[Xi]=null,Yi=qi[--Xi],qi[Xi]=null}var no=null,ro=null,io=!1,oo=null;function ao(e,t){var n=Mc(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function so(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,no=e,ro=ci(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,no=e,ro=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Gi?{id:Yi,overflow:Qi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Mc(18,null,null,0)).stateNode=t,n.return=e,e.child=n,no=e,ro=null,!0);default:return!1}}function lo(e){return 0!==(1&e.mode)&&0===(128&e.flags)}function co(e){if(io){var t=ro;if(t){var n=t;if(!so(e,t)){if(lo(e))throw Error(o(418));t=ci(n.nextSibling);var r=no;t&&so(e,t)?ao(r,n):(e.flags=-4097&e.flags|2,io=!1,no=e)}}else{if(lo(e))throw Error(o(418));e.flags=-4097&e.flags|2,io=!1,no=e}}}function uo(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;no=e}function ho(e){if(e!==no)return!1;if(!io)return uo(e),io=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ni(e.type,e.memoizedProps)),t&&(t=ro)){if(lo(e))throw fo(),Error(o(418));for(;t;)ao(e,t),t=ci(t.nextSibling)}if(uo(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){ro=ci(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}ro=null}}else ro=no?ci(e.stateNode.nextSibling):null;return!0}function fo(){for(var e=ro;e;)e=ci(e.nextSibling)}function po(){ro=no=null,io=!1}function mo(e){null===oo?oo=[e]:oo.push(e)}var go=_.ReactCurrentBatchConfig;function vo(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(o(309));var r=n.stateNode}if(!r)throw Error(o(147,e));var i=r,a=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=i.refs;null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!==typeof e)throw Error(o(284));if(!n._owner)throw Error(o(290,e))}return e}function bo(e,t){throw e=Object.prototype.toString.call(t),Error(o(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function yo(e){return(0,e._init)(e._payload)}function _o(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Nc(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Ac(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){var o=n.type;return o===C?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"===typeof o&&null!==o&&o.$$typeof===P&&yo(o)===t.type)?((r=i(t,n.props)).ref=vo(e,t,n),r.return=e,r):((r=Lc(n.type,n.key,n.props,null,e.mode,r)).ref=vo(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Bc(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function d(e,t,n,r,o){return null===t||7!==t.tag?((t=Tc(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n){if("string"===typeof t&&""!==t||"number"===typeof t)return(t=Ac(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case S:return(n=Lc(t.type,t.key,t.props,null,e.mode,n)).ref=vo(e,null,t),n.return=e,n;case w:return(t=Bc(t,e.mode,n)).return=e,t;case P:return h(e,(0,t._init)(t._payload),n)}if(te(t)||T(t))return(t=Tc(t,e.mode,n,null)).return=e,t;bo(e,t)}return null}function f(e,t,n,r){var i=null!==t?t.key:null;if("string"===typeof n&&""!==n||"number"===typeof n)return null!==i?null:l(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case S:return n.key===i?c(e,t,n,r):null;case w:return n.key===i?u(e,t,n,r):null;case P:return f(e,t,(i=n._init)(n._payload),r)}if(te(n)||T(n))return null!==i?null:d(e,t,n,r,null);bo(e,n)}return null}function p(e,t,n,r,i){if("string"===typeof r&&""!==r||"number"===typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case S:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case w:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case P:return p(e,t,n,(0,r._init)(r._payload),i)}if(te(r)||T(r))return d(t,e=e.get(n)||null,r,i,null);bo(t,r)}return null}function m(i,o,s,l){for(var c=null,u=null,d=o,m=o=0,g=null;null!==d&&m<s.length;m++){d.index>m?(g=d,d=null):g=d.sibling;var v=f(i,d,s[m],l);if(null===v){null===d&&(d=g);break}e&&d&&null===v.alternate&&t(i,d),o=a(v,o,m),null===u?c=v:u.sibling=v,u=v,d=g}if(m===s.length)return n(i,d),io&&Ji(i,m),c;if(null===d){for(;m<s.length;m++)null!==(d=h(i,s[m],l))&&(o=a(d,o,m),null===u?c=d:u.sibling=d,u=d);return io&&Ji(i,m),c}for(d=r(i,d);m<s.length;m++)null!==(g=p(d,i,m,s[m],l))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),o=a(g,o,m),null===u?c=g:u.sibling=g,u=g);return e&&d.forEach((function(e){return t(i,e)})),io&&Ji(i,m),c}function g(i,s,l,c){var u=T(l);if("function"!==typeof u)throw Error(o(150));if(null==(l=u.call(l)))throw Error(o(151));for(var d=u=null,m=s,g=s=0,v=null,b=l.next();null!==m&&!b.done;g++,b=l.next()){m.index>g?(v=m,m=null):v=m.sibling;var y=f(i,m,b.value,c);if(null===y){null===m&&(m=v);break}e&&m&&null===y.alternate&&t(i,m),s=a(y,s,g),null===d?u=y:d.sibling=y,d=y,m=v}if(b.done)return n(i,m),io&&Ji(i,g),u;if(null===m){for(;!b.done;g++,b=l.next())null!==(b=h(i,b.value,c))&&(s=a(b,s,g),null===d?u=b:d.sibling=b,d=b);return io&&Ji(i,g),u}for(m=r(i,m);!b.done;g++,b=l.next())null!==(b=p(m,i,g,b.value,c))&&(e&&null!==b.alternate&&m.delete(null===b.key?g:b.key),s=a(b,s,g),null===d?u=b:d.sibling=b,d=b);return e&&m.forEach((function(e){return t(i,e)})),io&&Ji(i,g),u}return function e(r,o,a,l){if("object"===typeof a&&null!==a&&a.type===C&&null===a.key&&(a=a.props.children),"object"===typeof a&&null!==a){switch(a.$$typeof){case S:e:{for(var c=a.key,u=o;null!==u;){if(u.key===c){if((c=a.type)===C){if(7===u.tag){n(r,u.sibling),(o=i(u,a.props.children)).return=r,r=o;break e}}else if(u.elementType===c||"object"===typeof c&&null!==c&&c.$$typeof===P&&yo(c)===u.type){n(r,u.sibling),(o=i(u,a.props)).ref=vo(r,u,a),o.return=r,r=o;break e}n(r,u);break}t(r,u),u=u.sibling}a.type===C?((o=Tc(a.props.children,r.mode,l,a.key)).return=r,r=o):((l=Lc(a.type,a.key,a.props,null,r.mode,l)).ref=vo(r,o,a),l.return=r,r=l)}return s(r);case w:e:{for(u=a.key;null!==o;){if(o.key===u){if(4===o.tag&&o.stateNode.containerInfo===a.containerInfo&&o.stateNode.implementation===a.implementation){n(r,o.sibling),(o=i(o,a.children||[])).return=r,r=o;break e}n(r,o);break}t(r,o),o=o.sibling}(o=Bc(a,r.mode,l)).return=r,r=o}return s(r);case P:return e(r,o,(u=a._init)(a._payload),l)}if(te(a))return m(r,o,a,l);if(T(a))return g(r,o,a,l);bo(r,a)}return"string"===typeof a&&""!==a||"number"===typeof a?(a=""+a,null!==o&&6===o.tag?(n(r,o.sibling),(o=i(o,a)).return=r,r=o):(n(r,o),(o=Ac(a,r.mode,l)).return=r,r=o),s(r)):n(r,o)}}var So=_o(!0),wo=_o(!1),Co=xi(null),xo=null,Eo=null,ko=null;function Oo(){ko=Eo=xo=null}function $o(e){var t=Co.current;Ei(Co),e._currentValue=t}function Ro(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Io(e,t){xo=e,ko=Eo=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(ys=!0),e.firstContext=null)}function Mo(e){var t=e._currentValue;if(ko!==e)if(e={context:e,memoizedValue:t,next:null},null===Eo){if(null===xo)throw Error(o(308));Eo=e,xo.dependencies={lanes:0,firstContext:e}}else Eo=Eo.next=e;return t}var Po=null;function No(e){null===Po?Po=[e]:Po.push(e)}function Lo(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,No(t)):(n.next=i.next,i.next=n),t.interleaved=n,To(e,r)}function To(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Do=!1;function Ao(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Bo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function jo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function zo(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!==(2&$l)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,To(e,n)}return null===(i=r.interleaved)?(t.next=t,No(r)):(t.next=i.next,i.next=t),r.interleaved=t,To(e,n)}function Ho(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,bt(e,n)}}function Fo(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Wo(e,t,n,r){var i=e.updateQueue;Do=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var l=s,c=l.next;l.next=null,null===a?o=c:a.next=c,a=l;var u=e.alternate;null!==u&&((s=(u=u.updateQueue).lastBaseUpdate)!==a&&(null===s?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l))}if(null!==o){var d=i.baseState;for(a=0,u=c=l=null,s=o;;){var h=s.lane,f=s.eventTime;if((r&h)===h){null!==u&&(u=u.next={eventTime:f,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=e,m=s;switch(h=t,f=n,m.tag){case 1:if("function"===typeof(p=m.payload)){d=p.call(f,d,h);break e}d=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null===(h="function"===typeof(p=m.payload)?p.call(f,d,h):p)||void 0===h)break e;d=A({},d,h);break e;case 2:Do=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(h=i.effects)?i.effects=[s]:h.push(s))}else f={eventTime:f,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(c=u=f,l=d):u=u.next=f,a|=h;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(h=s).next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}if(null===u&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,null!==(t=i.shared.interleaved)){i=t;do{a|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);Dl|=a,e.lanes=a,e.memoizedState=d}}function Ko(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!==typeof i)throw Error(o(191,i));i.call(r)}}}var Vo={},Uo=xi(Vo),qo=xi(Vo),Xo=xi(Vo);function Go(e){if(e===Vo)throw Error(o(174));return e}function Yo(e,t){switch(ki(Xo,t),ki(qo,e),ki(Uo,Vo),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:le(null,"");break;default:t=le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Ei(Uo),ki(Uo,t)}function Qo(){Ei(Uo),Ei(qo),Ei(Xo)}function Jo(e){Go(Xo.current);var t=Go(Uo.current),n=le(t,e.type);t!==n&&(ki(qo,e),ki(Uo,n))}function Zo(e){qo.current===e&&(Ei(Uo),Ei(qo))}var ea=xi(0);function ta(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var na=[];function ra(){for(var e=0;e<na.length;e++)na[e]._workInProgressVersionPrimary=null;na.length=0}var ia=_.ReactCurrentDispatcher,oa=_.ReactCurrentBatchConfig,aa=0,sa=null,la=null,ca=null,ua=!1,da=!1,ha=0,fa=0;function pa(){throw Error(o(321))}function ma(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!sr(e[n],t[n]))return!1;return!0}function ga(e,t,n,r,i,a){if(aa=a,sa=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ia.current=null===e||null===e.memoizedState?Za:es,e=n(r,i),da){a=0;do{if(da=!1,ha=0,25<=a)throw Error(o(301));a+=1,ca=la=null,t.updateQueue=null,ia.current=ts,e=n(r,i)}while(da)}if(ia.current=Ja,t=null!==la&&null!==la.next,aa=0,ca=la=sa=null,ua=!1,t)throw Error(o(300));return e}function va(){var e=0!==ha;return ha=0,e}function ba(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ca?sa.memoizedState=ca=e:ca=ca.next=e,ca}function ya(){if(null===la){var e=sa.alternate;e=null!==e?e.memoizedState:null}else e=la.next;var t=null===ca?sa.memoizedState:ca.next;if(null!==t)ca=t,la=e;else{if(null===e)throw Error(o(310));e={memoizedState:(la=e).memoizedState,baseState:la.baseState,baseQueue:la.baseQueue,queue:la.queue,next:null},null===ca?sa.memoizedState=ca=e:ca=ca.next=e}return ca}function _a(e,t){return"function"===typeof t?t(e):t}function Sa(e){var t=ya(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=la,i=r.baseQueue,a=n.pending;if(null!==a){if(null!==i){var s=i.next;i.next=a.next,a.next=s}r.baseQueue=i=a,n.pending=null}if(null!==i){a=i.next,r=r.baseState;var l=s=null,c=null,u=a;do{var d=u.lane;if((aa&d)===d)null!==c&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===c?(l=c=h,s=r):c=c.next=h,sa.lanes|=d,Dl|=d}u=u.next}while(null!==u&&u!==a);null===c?s=r:c.next=l,sr(r,t.memoizedState)||(ys=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=c,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{a=i.lane,sa.lanes|=a,Dl|=a,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function wa(e){var t=ya(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{a=e(a,s.action),s=s.next}while(s!==i);sr(a,t.memoizedState)||(ys=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function Ca(){}function xa(e,t){var n=sa,r=ya(),i=t(),a=!sr(r.memoizedState,i);if(a&&(r.memoizedState=i,ys=!0),r=r.queue,Da(Oa.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||null!==ca&&1&ca.memoizedState.tag){if(n.flags|=2048,Ma(9,ka.bind(null,n,r,i,t),void 0,null),null===Rl)throw Error(o(349));0!==(30&aa)||Ea(n,t,i)}return i}function Ea(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=sa.updateQueue)?(t={lastEffect:null,stores:null},sa.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function ka(e,t,n,r){t.value=n,t.getSnapshot=r,$a(t)&&Ra(e)}function Oa(e,t,n){return n((function(){$a(t)&&Ra(e)}))}function $a(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!sr(e,n)}catch(r){return!0}}function Ra(e){var t=To(e,1);null!==t&&nc(t,e,1,-1)}function Ia(e){var t=ba();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:e},t.queue=e,e=e.dispatch=Xa.bind(null,sa,e),[t.memoizedState,e]}function Ma(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=sa.updateQueue)?(t={lastEffect:null,stores:null},sa.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Pa(){return ya().memoizedState}function Na(e,t,n,r){var i=ba();sa.flags|=e,i.memoizedState=Ma(1|t,n,void 0,void 0===r?null:r)}function La(e,t,n,r){var i=ya();r=void 0===r?null:r;var o=void 0;if(null!==la){var a=la.memoizedState;if(o=a.destroy,null!==r&&ma(r,a.deps))return void(i.memoizedState=Ma(t,n,o,r))}sa.flags|=e,i.memoizedState=Ma(1|t,n,o,r)}function Ta(e,t){return Na(8390656,8,e,t)}function Da(e,t){return La(2048,8,e,t)}function Aa(e,t){return La(4,2,e,t)}function Ba(e,t){return La(4,4,e,t)}function ja(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function za(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,La(4,4,ja.bind(null,t,e),n)}function Ha(){}function Fa(e,t){var n=ya();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ma(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Wa(e,t){var n=ya();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ma(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ka(e,t,n){return 0===(21&aa)?(e.baseState&&(e.baseState=!1,ys=!0),e.memoizedState=n):(sr(n,t)||(n=mt(),sa.lanes|=n,Dl|=n,e.baseState=!0),t)}function Va(e,t){var n=yt;yt=0!==n&&4>n?n:4,e(!0);var r=oa.transition;oa.transition={};try{e(!1),t()}finally{yt=n,oa.transition=r}}function Ua(){return ya().memoizedState}function qa(e,t,n){var r=tc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ga(e))Ya(t,n);else if(null!==(n=Lo(e,t,n,r))){nc(n,e,r,ec()),Qa(n,t,r)}}function Xa(e,t,n){var r=tc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ga(e))Ya(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,sr(s,a)){var l=t.interleaved;return null===l?(i.next=i,No(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(c){}null!==(n=Lo(e,t,i,r))&&(nc(n,e,r,i=ec()),Qa(n,t,r))}}function Ga(e){var t=e.alternate;return e===sa||null!==t&&t===sa}function Ya(e,t){da=ua=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Qa(e,t,n){if(0!==(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,bt(e,n)}}var Ja={readContext:Mo,useCallback:pa,useContext:pa,useEffect:pa,useImperativeHandle:pa,useInsertionEffect:pa,useLayoutEffect:pa,useMemo:pa,useReducer:pa,useRef:pa,useState:pa,useDebugValue:pa,useDeferredValue:pa,useTransition:pa,useMutableSource:pa,useSyncExternalStore:pa,useId:pa,unstable_isNewReconciler:!1},Za={readContext:Mo,useCallback:function(e,t){return ba().memoizedState=[e,void 0===t?null:t],e},useContext:Mo,useEffect:Ta,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Na(4194308,4,ja.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Na(4194308,4,e,t)},useInsertionEffect:function(e,t){return Na(4,2,e,t)},useMemo:function(e,t){var n=ba();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ba();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=qa.bind(null,sa,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},ba().memoizedState=e},useState:Ia,useDebugValue:Ha,useDeferredValue:function(e){return ba().memoizedState=e},useTransition:function(){var e=Ia(!1),t=e[0];return e=Va.bind(null,e[1]),ba().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=sa,i=ba();if(io){if(void 0===n)throw Error(o(407));n=n()}else{if(n=t(),null===Rl)throw Error(o(349));0!==(30&aa)||Ea(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,Ta(Oa.bind(null,r,a,e),[e]),r.flags|=2048,Ma(9,ka.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=ba(),t=Rl.identifierPrefix;if(io){var n=Qi;t=":"+t+"R"+(n=(Yi&~(1<<32-at(Yi)-1)).toString(32)+n),0<(n=ha++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=fa++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},es={readContext:Mo,useCallback:Fa,useContext:Mo,useEffect:Da,useImperativeHandle:za,useInsertionEffect:Aa,useLayoutEffect:Ba,useMemo:Wa,useReducer:Sa,useRef:Pa,useState:function(){return Sa(_a)},useDebugValue:Ha,useDeferredValue:function(e){return Ka(ya(),la.memoizedState,e)},useTransition:function(){return[Sa(_a)[0],ya().memoizedState]},useMutableSource:Ca,useSyncExternalStore:xa,useId:Ua,unstable_isNewReconciler:!1},ts={readContext:Mo,useCallback:Fa,useContext:Mo,useEffect:Da,useImperativeHandle:za,useInsertionEffect:Aa,useLayoutEffect:Ba,useMemo:Wa,useReducer:wa,useRef:Pa,useState:function(){return wa(_a)},useDebugValue:Ha,useDeferredValue:function(e){var t=ya();return null===la?t.memoizedState=e:Ka(t,la.memoizedState,e)},useTransition:function(){return[wa(_a)[0],ya().memoizedState]},useMutableSource:Ca,useSyncExternalStore:xa,useId:Ua,unstable_isNewReconciler:!1};function ns(e,t){if(e&&e.defaultProps){for(var n in t=A({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function rs(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:A({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var is={isMounted:function(e){return!!(e=e._reactInternals)&&Fe(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ec(),i=tc(e),o=jo(r,i);o.payload=t,void 0!==n&&null!==n&&(o.callback=n),null!==(t=zo(e,o,i))&&(nc(t,e,i,r),Ho(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ec(),i=tc(e),o=jo(r,i);o.tag=1,o.payload=t,void 0!==n&&null!==n&&(o.callback=n),null!==(t=zo(e,o,i))&&(nc(t,e,i,r),Ho(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ec(),r=tc(e),i=jo(n,r);i.tag=2,void 0!==t&&null!==t&&(i.callback=t),null!==(t=zo(e,i,r))&&(nc(t,e,r,n),Ho(t,e,r))}};function os(e,t,n,r,i,o,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!lr(n,r)||!lr(i,o))}function as(e,t,n){var r=!1,i=Oi,o=t.contextType;return"object"===typeof o&&null!==o?o=Mo(o):(i=Pi(t)?Ii:$i.current,o=(r=null!==(r=t.contextTypes)&&void 0!==r)?Mi(e,i):Oi),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=is,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function ss(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&is.enqueueReplaceState(t,t.state,null)}function ls(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Ao(e);var o=t.contextType;"object"===typeof o&&null!==o?i.context=Mo(o):(o=Pi(t)?Ii:$i.current,i.context=Mi(e,o)),i.state=e.memoizedState,"function"===typeof(o=t.getDerivedStateFromProps)&&(rs(e,t,o,n),i.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(t=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&is.enqueueReplaceState(i,i.state,null),Wo(e,n,i,r),i.state=e.memoizedState),"function"===typeof i.componentDidMount&&(e.flags|=4194308)}function cs(e,t){try{var n="",r=t;do{n+=H(r),r=r.return}while(r);var i=n}catch(o){i="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:i,digest:null}}function us(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function ds(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var hs="function"===typeof WeakMap?WeakMap:Map;function fs(e,t,n){(n=jo(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Kl||(Kl=!0,Vl=r),ds(0,t)},n}function ps(e,t,n){(n=jo(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){ds(0,t)}}var o=e.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(n.callback=function(){ds(0,t),"function"!==typeof r&&(null===Ul?Ul=new Set([this]):Ul.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function ms(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new hs;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Ec.bind(null,e,t,n),t.then(e,e))}function gs(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function vs(e,t,n,r,i){return 0===(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=jo(-1,1)).tag=2,zo(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var bs=_.ReactCurrentOwner,ys=!1;function _s(e,t,n,r){t.child=null===e?wo(t,null,n,r):So(t,e.child,n,r)}function Ss(e,t,n,r,i){n=n.render;var o=t.ref;return Io(t,i),r=ga(e,t,n,r,o,i),n=va(),null===e||ys?(io&&n&&eo(t),t.flags|=1,_s(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ks(e,t,i))}function ws(e,t,n,r,i){if(null===e){var o=n.type;return"function"!==typeof o||Pc(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Lc(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Cs(e,t,o,r,i))}if(o=e.child,0===(e.lanes&i)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:lr)(a,r)&&e.ref===t.ref)return Ks(e,t,i)}return t.flags|=1,(e=Nc(o,r)).ref=t.ref,e.return=t,t.child=e}function Cs(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(lr(o,r)&&e.ref===t.ref){if(ys=!1,t.pendingProps=r=o,0===(e.lanes&i))return t.lanes=e.lanes,Ks(e,t,i);0!==(131072&e.flags)&&(ys=!0)}}return ks(e,t,n,r,i)}function xs(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0===(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ki(Nl,Pl),Pl|=n;else{if(0===(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ki(Nl,Pl),Pl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,ki(Nl,Pl),Pl|=r}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,ki(Nl,Pl),Pl|=r;return _s(e,t,i,n),t.child}function Es(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ks(e,t,n,r,i){var o=Pi(n)?Ii:$i.current;return o=Mi(t,o),Io(t,i),n=ga(e,t,n,r,o,i),r=va(),null===e||ys?(io&&r&&eo(t),t.flags|=1,_s(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ks(e,t,i))}function Os(e,t,n,r,i){if(Pi(n)){var o=!0;Di(t)}else o=!1;if(Io(t,i),null===t.stateNode)Ws(e,t),as(t,n,r),ls(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;"object"===typeof c&&null!==c?c=Mo(c):c=Mi(t,c=Pi(n)?Ii:$i.current);var u=n.getDerivedStateFromProps,d="function"===typeof u||"function"===typeof a.getSnapshotBeforeUpdate;d||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||l!==c)&&ss(t,a,r,c),Do=!1;var h=t.memoizedState;a.state=h,Wo(t,r,a,i),l=t.memoizedState,s!==r||h!==l||Ri.current||Do?("function"===typeof u&&(rs(t,n,u,r),l=t.memoizedState),(s=Do||os(t,n,s,r,h,l,c))?(d||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.flags|=4194308)):("function"===typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):("function"===typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Bo(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:ns(t.type,s),a.props=c,d=t.pendingProps,h=a.context,"object"===typeof(l=n.contextType)&&null!==l?l=Mo(l):l=Mi(t,l=Pi(n)?Ii:$i.current);var f=n.getDerivedStateFromProps;(u="function"===typeof f||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==d||h!==l)&&ss(t,a,r,l),Do=!1,h=t.memoizedState,a.state=h,Wo(t,r,a,i);var p=t.memoizedState;s!==d||h!==p||Ri.current||Do?("function"===typeof f&&(rs(t,n,f,r),p=t.memoizedState),(c=Do||os(t,n,c,r,h,p,l)||!1)?(u||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,l),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,l)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=l,r=c):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return $s(e,t,n,r,o,i)}function $s(e,t,n,r,i,o){Es(e,t);var a=0!==(128&t.flags);if(!r&&!a)return i&&Ai(t,n,!1),Ks(e,t,o);r=t.stateNode,bs.current=t;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=So(t,e.child,null,o),t.child=So(t,null,s,o)):_s(e,t,s,o),t.memoizedState=r.state,i&&Ai(t,n,!0),t.child}function Rs(e){var t=e.stateNode;t.pendingContext?Li(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Li(0,t.context,!1),Yo(e,t.containerInfo)}function Is(e,t,n,r,i){return po(),mo(i),t.flags|=256,_s(e,t,n,r),t.child}var Ms,Ps,Ns,Ls,Ts={dehydrated:null,treeContext:null,retryLane:0};function Ds(e){return{baseLanes:e,cachePool:null,transitions:null}}function As(e,t,n){var r,i=t.pendingProps,a=ea.current,s=!1,l=0!==(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!==(2&a)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),ki(ea,1&a),null===e)return co(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0===(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(l=i.children,e=i.fallback,s?(i=t.mode,s=t.child,l={mode:"hidden",children:l},0===(1&i)&&null!==s?(s.childLanes=0,s.pendingProps=l):s=Dc(l,i,0,null),e=Tc(e,i,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Ds(n),t.memoizedState=Ts,e):Bs(t,l));if(null!==(a=e.memoizedState)&&null!==(r=a.dehydrated))return function(e,t,n,r,i,a,s){if(n)return 256&t.flags?(t.flags&=-257,js(e,t,s,r=us(Error(o(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=r.fallback,i=t.mode,r=Dc({mode:"visible",children:r.children},i,0,null),(a=Tc(a,i,s,null)).flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,0!==(1&t.mode)&&So(t,e.child,null,s),t.child.memoizedState=Ds(s),t.memoizedState=Ts,a);if(0===(1&t.mode))return js(e,t,s,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var l=r.dgst;return r=l,js(e,t,s,r=us(a=Error(o(419)),r,void 0))}if(l=0!==(s&e.childLanes),ys||l){if(null!==(r=Rl)){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!==(i&(r.suspendedLanes|s))?0:i)&&i!==a.retryLane&&(a.retryLane=i,To(e,i),nc(r,e,i,-1))}return mc(),js(e,t,s,r=us(Error(o(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Oc.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,ro=ci(i.nextSibling),no=t,io=!0,oo=null,null!==e&&(qi[Xi++]=Yi,qi[Xi++]=Qi,qi[Xi++]=Gi,Yi=e.id,Qi=e.overflow,Gi=t),t=Bs(t,r.children),t.flags|=4096,t)}(e,t,l,i,r,a,n);if(s){s=i.fallback,l=t.mode,r=(a=e.child).sibling;var c={mode:"hidden",children:i.children};return 0===(1&l)&&t.child!==a?((i=t.child).childLanes=0,i.pendingProps=c,t.deletions=null):(i=Nc(a,c)).subtreeFlags=14680064&a.subtreeFlags,null!==r?s=Nc(r,s):(s=Tc(s,l,n,null)).flags|=2,s.return=t,i.return=t,i.sibling=s,t.child=i,i=s,s=t.child,l=null===(l=e.child.memoizedState)?Ds(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=Ts,i}return e=(s=e.child).sibling,i=Nc(s,{mode:"visible",children:i.children}),0===(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function Bs(e,t){return(t=Dc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function js(e,t,n,r){return null!==r&&mo(r),So(t,e.child,null,n),(e=Bs(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function zs(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Ro(e.return,t,n)}function Hs(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Fs(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(_s(e,t,r.children,n),0!==(2&(r=ea.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&zs(e,n,t);else if(19===e.tag)zs(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ki(ea,r),0===(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===ta(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Hs(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===ta(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Hs(t,!0,n,null,o);break;case"together":Hs(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ws(e,t){0===(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ks(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Dl|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=Nc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Nc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Vs(e,t){if(!io)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Us(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function qs(e,t,n){var r=t.pendingProps;switch(to(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Us(t),null;case 1:case 17:return Pi(t.type)&&Ni(),Us(t),null;case 3:return r=t.stateNode,Qo(),Ei(Ri),Ei($i),ra(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(ho(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==oo&&(ac(oo),oo=null))),Ps(e,t),Us(t),null;case 5:Zo(t);var i=Go(Xo.current);if(n=t.type,null!==e&&null!=t.stateNode)Ns(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(o(166));return Us(t),null}if(e=Go(Uo.current),ho(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[hi]=t,r[fi]=a,e=0!==(1&t.mode),n){case"dialog":jr("cancel",r),jr("close",r);break;case"iframe":case"object":case"embed":jr("load",r);break;case"video":case"audio":for(i=0;i<Tr.length;i++)jr(Tr[i],r);break;case"source":jr("error",r);break;case"img":case"image":case"link":jr("error",r),jr("load",r);break;case"details":jr("toggle",r);break;case"input":Y(r,a),jr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},jr("invalid",r);break;case"textarea":ie(r,a),jr("invalid",r)}for(var l in be(n,a),i=null,a)if(a.hasOwnProperty(l)){var c=a[l];"children"===l?"string"===typeof c?r.textContent!==c&&(!0!==a.suppressHydrationWarning&&Jr(r.textContent,c,e),i=["children",c]):"number"===typeof c&&r.textContent!==""+c&&(!0!==a.suppressHydrationWarning&&Jr(r.textContent,c,e),i=["children",""+c]):s.hasOwnProperty(l)&&null!=c&&"onScroll"===l&&jr("scroll",r)}switch(n){case"input":U(r),Z(r,a,!0);break;case"textarea":U(r),ae(r);break;case"select":case"option":break;default:"function"===typeof a.onClick&&(r.onclick=Zr)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{l=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=se(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[hi]=t,e[fi]=r,Ms(e,t,!1,!1),t.stateNode=e;e:{switch(l=ye(n,r),n){case"dialog":jr("cancel",e),jr("close",e),i=r;break;case"iframe":case"object":case"embed":jr("load",e),i=r;break;case"video":case"audio":for(i=0;i<Tr.length;i++)jr(Tr[i],e);i=r;break;case"source":jr("error",e),i=r;break;case"img":case"image":case"link":jr("error",e),jr("load",e),i=r;break;case"details":jr("toggle",e),i=r;break;case"input":Y(e,r),i=G(e,r),jr("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=A({},r,{value:void 0}),jr("invalid",e);break;case"textarea":ie(e,r),i=re(e,r),jr("invalid",e)}for(a in be(n,i),c=i)if(c.hasOwnProperty(a)){var u=c[a];"style"===a?ge(e,u):"dangerouslySetInnerHTML"===a?null!=(u=u?u.__html:void 0)&&de(e,u):"children"===a?"string"===typeof u?("textarea"!==n||""!==u)&&he(e,u):"number"===typeof u&&he(e,""+u):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(s.hasOwnProperty(a)?null!=u&&"onScroll"===a&&jr("scroll",e):null!=u&&y(e,a,u,l))}switch(n){case"input":U(e),Z(e,r,!1);break;case"textarea":U(e),ae(e);break;case"option":null!=r.value&&e.setAttribute("value",""+K(r.value));break;case"select":e.multiple=!!r.multiple,null!=(a=r.value)?ne(e,!!r.multiple,a,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof i.onClick&&(e.onclick=Zr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Us(t),null;case 6:if(e&&null!=t.stateNode)Ls(e,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(o(166));if(n=Go(Xo.current),Go(Uo.current),ho(t)){if(r=t.stateNode,n=t.memoizedProps,r[hi]=t,(a=r.nodeValue!==n)&&null!==(e=no))switch(e.tag){case 3:Jr(r.nodeValue,n,0!==(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Jr(r.nodeValue,n,0!==(1&e.mode))}a&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[hi]=t,t.stateNode=r}return Us(t),null;case 13:if(Ei(ea),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(io&&null!==ro&&0!==(1&t.mode)&&0===(128&t.flags))fo(),po(),t.flags|=98560,a=!1;else if(a=ho(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(o(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(o(317));a[hi]=t}else po(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Us(t),a=!1}else null!==oo&&(ac(oo),oo=null),a=!0;if(!a)return 65536&t.flags?t:null}return 0!==(128&t.flags)?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!==(1&t.mode)&&(null===e||0!==(1&ea.current)?0===Ll&&(Ll=3):mc())),null!==t.updateQueue&&(t.flags|=4),Us(t),null);case 4:return Qo(),Ps(e,t),null===e&&Fr(t.stateNode.containerInfo),Us(t),null;case 10:return $o(t.type._context),Us(t),null;case 19:if(Ei(ea),null===(a=t.memoizedState))return Us(t),null;if(r=0!==(128&t.flags),null===(l=a.rendering))if(r)Vs(a,!1);else{if(0!==Ll||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(l=ta(e))){for(t.flags|=128,Vs(a,!1),null!==(r=l.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(a=n).flags&=14680066,null===(l=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=l.childLanes,a.lanes=l.lanes,a.child=l.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=l.memoizedProps,a.memoizedState=l.memoizedState,a.updateQueue=l.updateQueue,a.type=l.type,e=l.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ki(ea,1&ea.current|2),t.child}e=e.sibling}null!==a.tail&&Qe()>Fl&&(t.flags|=128,r=!0,Vs(a,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ta(l))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Vs(a,!0),null===a.tail&&"hidden"===a.tailMode&&!l.alternate&&!io)return Us(t),null}else 2*Qe()-a.renderingStartTime>Fl&&1073741824!==n&&(t.flags|=128,r=!0,Vs(a,!1),t.lanes=4194304);a.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=a.last)?n.sibling=l:t.child=l,a.last=l)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Qe(),t.sibling=null,n=ea.current,ki(ea,r?1&n|2:1&n),t):(Us(t),null);case 22:case 23:return dc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!==(1&t.mode)?0!==(1073741824&Pl)&&(Us(t),6&t.subtreeFlags&&(t.flags|=8192)):Us(t),null;case 24:case 25:return null}throw Error(o(156,t.tag))}function Xs(e,t){switch(to(t),t.tag){case 1:return Pi(t.type)&&Ni(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Qo(),Ei(Ri),Ei($i),ra(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Zo(t),null;case 13:if(Ei(ea),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));po()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Ei(ea),null;case 4:return Qo(),null;case 10:return $o(t.type._context),null;case 22:case 23:return dc(),null;default:return null}}Ms=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ps=function(){},Ns=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Go(Uo.current);var o,a=null;switch(n){case"input":i=G(e,i),r=G(e,r),a=[];break;case"select":i=A({},i,{value:void 0}),r=A({},r,{value:void 0}),a=[];break;case"textarea":i=re(e,i),r=re(e,r),a=[];break;default:"function"!==typeof i.onClick&&"function"===typeof r.onClick&&(e.onclick=Zr)}for(u in be(n,r),n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&null!=i[u])if("style"===u){var l=i[u];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(s.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in r){var c=r[u];if(l=null!=i?i[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(null!=c||null!=l))if("style"===u)if(l){for(o in l)!l.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&l[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(a||(a=[]),a.push(u,n)),n=c;else"dangerouslySetInnerHTML"===u?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(a=a||[]).push(u,c)):"children"===u?"string"!==typeof c&&"number"!==typeof c||(a=a||[]).push(u,""+c):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(s.hasOwnProperty(u)?(null!=c&&"onScroll"===u&&jr("scroll",e),a||l===c||(a=[])):(a=a||[]).push(u,c))}n&&(a=a||[]).push("style",n);var u=a;(t.updateQueue=u)&&(t.flags|=4)}},Ls=function(e,t,n,r){n!==r&&(t.flags|=4)};var Gs=!1,Ys=!1,Qs="function"===typeof WeakSet?WeakSet:Set,Js=null;function Zs(e,t){var n=e.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(r){xc(e,t,r)}else n.current=null}function el(e,t,n){try{n()}catch(r){xc(e,t,r)}}var tl=!1;function nl(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&el(t,n,o)}i=i.next}while(i!==r)}}function rl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function il(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"===typeof t?t(e):t.current=e}}function ol(e){var t=e.alternate;null!==t&&(e.alternate=null,ol(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[hi],delete t[fi],delete t[mi],delete t[gi],delete t[vi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function al(e){return 5===e.tag||3===e.tag||4===e.tag}function sl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||al(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ll(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Zr));else if(4!==r&&null!==(e=e.child))for(ll(e,t,n),e=e.sibling;null!==e;)ll(e,t,n),e=e.sibling}function cl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(cl(e,t,n),e=e.sibling;null!==e;)cl(e,t,n),e=e.sibling}var ul=null,dl=!1;function hl(e,t,n){for(n=n.child;null!==n;)fl(e,t,n),n=n.sibling}function fl(e,t,n){if(ot&&"function"===typeof ot.onCommitFiberUnmount)try{ot.onCommitFiberUnmount(it,n)}catch(s){}switch(n.tag){case 5:Ys||Zs(n,t);case 6:var r=ul,i=dl;ul=null,hl(e,t,n),dl=i,null!==(ul=r)&&(dl?(e=ul,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):ul.removeChild(n.stateNode));break;case 18:null!==ul&&(dl?(e=ul,n=n.stateNode,8===e.nodeType?li(e.parentNode,n):1===e.nodeType&&li(e,n),Ft(e)):li(ul,n.stateNode));break;case 4:r=ul,i=dl,ul=n.stateNode.containerInfo,dl=!0,hl(e,t,n),ul=r,dl=i;break;case 0:case 11:case 14:case 15:if(!Ys&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,void 0!==a&&(0!==(2&o)||0!==(4&o))&&el(n,t,a),i=i.next}while(i!==r)}hl(e,t,n);break;case 1:if(!Ys&&(Zs(n,t),"function"===typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){xc(n,t,s)}hl(e,t,n);break;case 21:hl(e,t,n);break;case 22:1&n.mode?(Ys=(r=Ys)||null!==n.memoizedState,hl(e,t,n),Ys=r):hl(e,t,n);break;default:hl(e,t,n)}}function pl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Qs),t.forEach((function(t){var r=$c.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function ml(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var a=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 5:ul=l.stateNode,dl=!1;break e;case 3:case 4:ul=l.stateNode.containerInfo,dl=!0;break e}l=l.return}if(null===ul)throw Error(o(160));fl(a,s,i),ul=null,dl=!1;var c=i.alternate;null!==c&&(c.return=null),i.return=null}catch(u){xc(i,t,u)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)gl(t,e),t=t.sibling}function gl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ml(t,e),vl(e),4&r){try{nl(3,e,e.return),rl(3,e)}catch(g){xc(e,e.return,g)}try{nl(5,e,e.return)}catch(g){xc(e,e.return,g)}}break;case 1:ml(t,e),vl(e),512&r&&null!==n&&Zs(n,n.return);break;case 5:if(ml(t,e),vl(e),512&r&&null!==n&&Zs(n,n.return),32&e.flags){var i=e.stateNode;try{he(i,"")}catch(g){xc(e,e.return,g)}}if(4&r&&null!=(i=e.stateNode)){var a=e.memoizedProps,s=null!==n?n.memoizedProps:a,l=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===l&&"radio"===a.type&&null!=a.name&&Q(i,a),ye(l,s);var u=ye(l,a);for(s=0;s<c.length;s+=2){var d=c[s],h=c[s+1];"style"===d?ge(i,h):"dangerouslySetInnerHTML"===d?de(i,h):"children"===d?he(i,h):y(i,d,h,u)}switch(l){case"input":J(i,a);break;case"textarea":oe(i,a);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var p=a.value;null!=p?ne(i,!!a.multiple,p,!1):f!==!!a.multiple&&(null!=a.defaultValue?ne(i,!!a.multiple,a.defaultValue,!0):ne(i,!!a.multiple,a.multiple?[]:"",!1))}i[fi]=a}catch(g){xc(e,e.return,g)}}break;case 6:if(ml(t,e),vl(e),4&r){if(null===e.stateNode)throw Error(o(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(g){xc(e,e.return,g)}}break;case 3:if(ml(t,e),vl(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Ft(t.containerInfo)}catch(g){xc(e,e.return,g)}break;case 4:default:ml(t,e),vl(e);break;case 13:ml(t,e),vl(e),8192&(i=e.child).flags&&(a=null!==i.memoizedState,i.stateNode.isHidden=a,!a||null!==i.alternate&&null!==i.alternate.memoizedState||(Hl=Qe())),4&r&&pl(e);break;case 22:if(d=null!==n&&null!==n.memoizedState,1&e.mode?(Ys=(u=Ys)||d,ml(t,e),Ys=u):ml(t,e),vl(e),8192&r){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!d&&0!==(1&e.mode))for(Js=e,d=e.child;null!==d;){for(h=Js=d;null!==Js;){switch(p=(f=Js).child,f.tag){case 0:case 11:case 14:case 15:nl(4,f,f.return);break;case 1:Zs(f,f.return);var m=f.stateNode;if("function"===typeof m.componentWillUnmount){r=f,n=f.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(g){xc(r,n,g)}}break;case 5:Zs(f,f.return);break;case 22:if(null!==f.memoizedState){Sl(h);continue}}null!==p?(p.return=f,Js=p):Sl(h)}d=d.sibling}e:for(d=null,h=e;;){if(5===h.tag){if(null===d){d=h;try{i=h.stateNode,u?"function"===typeof(a=i.style).setProperty?a.setProperty("display","none","important"):a.display="none":(l=h.stateNode,s=void 0!==(c=h.memoizedProps.style)&&null!==c&&c.hasOwnProperty("display")?c.display:null,l.style.display=me("display",s))}catch(g){xc(e,e.return,g)}}}else if(6===h.tag){if(null===d)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(g){xc(e,e.return,g)}}else if((22!==h.tag&&23!==h.tag||null===h.memoizedState||h===e)&&null!==h.child){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;null===h.sibling;){if(null===h.return||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:ml(t,e),vl(e),4&r&&pl(e);case 21:}}function vl(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(al(n)){var r=n;break e}n=n.return}throw Error(o(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(he(i,""),r.flags&=-33),cl(e,sl(e),i);break;case 3:case 4:var a=r.stateNode.containerInfo;ll(e,sl(e),a);break;default:throw Error(o(161))}}catch(s){xc(e,e.return,s)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function bl(e,t,n){Js=e,yl(e,t,n)}function yl(e,t,n){for(var r=0!==(1&e.mode);null!==Js;){var i=Js,o=i.child;if(22===i.tag&&r){var a=null!==i.memoizedState||Gs;if(!a){var s=i.alternate,l=null!==s&&null!==s.memoizedState||Ys;s=Gs;var c=Ys;if(Gs=a,(Ys=l)&&!c)for(Js=i;null!==Js;)l=(a=Js).child,22===a.tag&&null!==a.memoizedState?wl(i):null!==l?(l.return=a,Js=l):wl(i);for(;null!==o;)Js=o,yl(o,t,n),o=o.sibling;Js=i,Gs=s,Ys=c}_l(e)}else 0!==(8772&i.subtreeFlags)&&null!==o?(o.return=i,Js=o):_l(e)}}function _l(e){for(;null!==Js;){var t=Js;if(0!==(8772&t.flags)){var n=t.alternate;try{if(0!==(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Ys||rl(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Ys)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:ns(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&Ko(t,a,r);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Ko(t,s,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var d=u.memoizedState;if(null!==d){var h=d.dehydrated;null!==h&&Ft(h)}}}break;default:throw Error(o(163))}Ys||512&t.flags&&il(t)}catch(f){xc(t,t.return,f)}}if(t===e){Js=null;break}if(null!==(n=t.sibling)){n.return=t.return,Js=n;break}Js=t.return}}function Sl(e){for(;null!==Js;){var t=Js;if(t===e){Js=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Js=n;break}Js=t.return}}function wl(e){for(;null!==Js;){var t=Js;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{rl(4,t)}catch(l){xc(t,n,l)}break;case 1:var r=t.stateNode;if("function"===typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(l){xc(t,i,l)}}var o=t.return;try{il(t)}catch(l){xc(t,o,l)}break;case 5:var a=t.return;try{il(t)}catch(l){xc(t,a,l)}}}catch(l){xc(t,t.return,l)}if(t===e){Js=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Js=s;break}Js=t.return}}var Cl,xl=Math.ceil,El=_.ReactCurrentDispatcher,kl=_.ReactCurrentOwner,Ol=_.ReactCurrentBatchConfig,$l=0,Rl=null,Il=null,Ml=0,Pl=0,Nl=xi(0),Ll=0,Tl=null,Dl=0,Al=0,Bl=0,jl=null,zl=null,Hl=0,Fl=1/0,Wl=null,Kl=!1,Vl=null,Ul=null,ql=!1,Xl=null,Gl=0,Yl=0,Ql=null,Jl=-1,Zl=0;function ec(){return 0!==(6&$l)?Qe():-1!==Jl?Jl:Jl=Qe()}function tc(e){return 0===(1&e.mode)?1:0!==(2&$l)&&0!==Ml?Ml&-Ml:null!==go.transition?(0===Zl&&(Zl=mt()),Zl):0!==(e=yt)?e:e=void 0===(e=window.event)?16:Yt(e.type)}function nc(e,t,n,r){if(50<Yl)throw Yl=0,Ql=null,Error(o(185));vt(e,n,r),0!==(2&$l)&&e===Rl||(e===Rl&&(0===(2&$l)&&(Al|=n),4===Ll&&sc(e,Ml)),rc(e,r),1===n&&0===$l&&0===(1&t.mode)&&(Fl=Qe()+500,ji&&Fi()))}function rc(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-at(o),s=1<<a,l=i[a];-1===l?0!==(s&n)&&0===(s&r)||(i[a]=ft(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}(e,t);var r=ht(e,e===Rl?Ml:0);if(0===r)null!==n&&Xe(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Xe(n),1===t)0===e.tag?function(e){ji=!0,Hi(e)}(lc.bind(null,e)):Hi(lc.bind(null,e)),ai((function(){0===(6&$l)&&Fi()})),n=null;else{switch(_t(r)){case 1:n=Ze;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Rc(n,ic.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ic(e,t){if(Jl=-1,Zl=0,0!==(6&$l))throw Error(o(327));var n=e.callbackNode;if(wc()&&e.callbackNode!==n)return null;var r=ht(e,e===Rl?Ml:0);if(0===r)return null;if(0!==(30&r)||0!==(r&e.expiredLanes)||t)t=gc(e,r);else{t=r;var i=$l;$l|=2;var a=pc();for(Rl===e&&Ml===t||(Wl=null,Fl=Qe()+500,hc(e,t));;)try{bc();break}catch(l){fc(e,l)}Oo(),El.current=a,$l=i,null!==Il?t=0:(Rl=null,Ml=0,t=Ll)}if(0!==t){if(2===t&&(0!==(i=pt(e))&&(r=i,t=oc(e,i))),1===t)throw n=Tl,hc(e,0),sc(e,r),rc(e,Qe()),n;if(6===t)sc(e,r);else{if(i=e.current.alternate,0===(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!sr(o(),i))return!1}catch(s){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)&&(2===(t=gc(e,r))&&(0!==(a=pt(e))&&(r=a,t=oc(e,a))),1===t))throw n=Tl,hc(e,0),sc(e,r),rc(e,Qe()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(o(345));case 2:case 5:Sc(e,zl,Wl);break;case 3:if(sc(e,r),(130023424&r)===r&&10<(t=Hl+500-Qe())){if(0!==ht(e,0))break;if(((i=e.suspendedLanes)&r)!==r){ec(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ri(Sc.bind(null,e,zl,Wl),t);break}Sc(e,zl,Wl);break;case 4:if(sc(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-at(r);a=1<<s,(s=t[s])>i&&(i=s),r&=~a}if(r=i,10<(r=(120>(r=Qe()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*xl(r/1960))-r)){e.timeoutHandle=ri(Sc.bind(null,e,zl,Wl),r);break}Sc(e,zl,Wl);break;default:throw Error(o(329))}}}return rc(e,Qe()),e.callbackNode===n?ic.bind(null,e):null}function oc(e,t){var n=jl;return e.current.memoizedState.isDehydrated&&(hc(e,t).flags|=256),2!==(e=gc(e,t))&&(t=zl,zl=n,null!==t&&ac(t)),e}function ac(e){null===zl?zl=e:zl.push.apply(zl,e)}function sc(e,t){for(t&=~Bl,t&=~Al,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-at(t),r=1<<n;e[n]=-1,t&=~r}}function lc(e){if(0!==(6&$l))throw Error(o(327));wc();var t=ht(e,0);if(0===(1&t))return rc(e,Qe()),null;var n=gc(e,t);if(0!==e.tag&&2===n){var r=pt(e);0!==r&&(t=r,n=oc(e,r))}if(1===n)throw n=Tl,hc(e,0),sc(e,t),rc(e,Qe()),n;if(6===n)throw Error(o(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Sc(e,zl,Wl),rc(e,Qe()),null}function cc(e,t){var n=$l;$l|=1;try{return e(t)}finally{0===($l=n)&&(Fl=Qe()+500,ji&&Fi())}}function uc(e){null!==Xl&&0===Xl.tag&&0===(6&$l)&&wc();var t=$l;$l|=1;var n=Ol.transition,r=yt;try{if(Ol.transition=null,yt=1,e)return e()}finally{yt=r,Ol.transition=n,0===(6&($l=t))&&Fi()}}function dc(){Pl=Nl.current,Ei(Nl)}function hc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ii(n)),null!==Il)for(n=Il.return;null!==n;){var r=n;switch(to(r),r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&Ni();break;case 3:Qo(),Ei(Ri),Ei($i),ra();break;case 5:Zo(r);break;case 4:Qo();break;case 13:case 19:Ei(ea);break;case 10:$o(r.type._context);break;case 22:case 23:dc()}n=n.return}if(Rl=e,Il=e=Nc(e.current,null),Ml=Pl=t,Ll=0,Tl=null,Bl=Al=Dl=0,zl=jl=null,null!==Po){for(t=0;t<Po.length;t++)if(null!==(r=(n=Po[t]).interleaved)){n.interleaved=null;var i=r.next,o=n.pending;if(null!==o){var a=o.next;o.next=i,r.next=a}n.pending=r}Po=null}return e}function fc(e,t){for(;;){var n=Il;try{if(Oo(),ia.current=Ja,ua){for(var r=sa.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}ua=!1}if(aa=0,ca=la=sa=null,da=!1,ha=0,kl.current=null,null===n||null===n.return){Ll=1,Tl=t,Il=null;break}e:{var a=e,s=n.return,l=n,c=t;if(t=Ml,l.flags|=32768,null!==c&&"object"===typeof c&&"function"===typeof c.then){var u=c,d=l,h=d.tag;if(0===(1&d.mode)&&(0===h||11===h||15===h)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=gs(s);if(null!==p){p.flags&=-257,vs(p,s,l,0,t),1&p.mode&&ms(a,u,t),c=u;var m=(t=p).updateQueue;if(null===m){var g=new Set;g.add(c),t.updateQueue=g}else m.add(c);break e}if(0===(1&t)){ms(a,u,t),mc();break e}c=Error(o(426))}else if(io&&1&l.mode){var v=gs(s);if(null!==v){0===(65536&v.flags)&&(v.flags|=256),vs(v,s,l,0,t),mo(cs(c,l));break e}}a=c=cs(c,l),4!==Ll&&(Ll=2),null===jl?jl=[a]:jl.push(a),a=s;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,Fo(a,fs(0,c,t));break e;case 1:l=c;var b=a.type,y=a.stateNode;if(0===(128&a.flags)&&("function"===typeof b.getDerivedStateFromError||null!==y&&"function"===typeof y.componentDidCatch&&(null===Ul||!Ul.has(y)))){a.flags|=65536,t&=-t,a.lanes|=t,Fo(a,ps(a,l,t));break e}}a=a.return}while(null!==a)}_c(n)}catch(_){t=_,Il===n&&null!==n&&(Il=n=n.return);continue}break}}function pc(){var e=El.current;return El.current=Ja,null===e?Ja:e}function mc(){0!==Ll&&3!==Ll&&2!==Ll||(Ll=4),null===Rl||0===(268435455&Dl)&&0===(268435455&Al)||sc(Rl,Ml)}function gc(e,t){var n=$l;$l|=2;var r=pc();for(Rl===e&&Ml===t||(Wl=null,hc(e,t));;)try{vc();break}catch(i){fc(e,i)}if(Oo(),$l=n,El.current=r,null!==Il)throw Error(o(261));return Rl=null,Ml=0,Ll}function vc(){for(;null!==Il;)yc(Il)}function bc(){for(;null!==Il&&!Ge();)yc(Il)}function yc(e){var t=Cl(e.alternate,e,Pl);e.memoizedProps=e.pendingProps,null===t?_c(e):Il=t,kl.current=null}function _c(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(32768&t.flags)){if(null!==(n=qs(n,t,Pl)))return void(Il=n)}else{if(null!==(n=Xs(n,t)))return n.flags&=32767,void(Il=n);if(null===e)return Ll=6,void(Il=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Il=t);Il=t=e}while(null!==t);0===Ll&&(Ll=5)}function Sc(e,t,n){var r=yt,i=Ol.transition;try{Ol.transition=null,yt=1,function(e,t,n,r){do{wc()}while(null!==Xl);if(0!==(6&$l))throw Error(o(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-at(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}(e,a),e===Rl&&(Il=Rl=null,Ml=0),0===(2064&n.subtreeFlags)&&0===(2064&n.flags)||ql||(ql=!0,Rc(tt,(function(){return wc(),null}))),a=0!==(15990&n.flags),0!==(15990&n.subtreeFlags)||a){a=Ol.transition,Ol.transition=null;var s=yt;yt=1;var l=$l;$l|=4,kl.current=null,function(e,t){if(ei=Kt,fr(e=hr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch(S){n=null;break e}var s=0,l=-1,c=-1,u=0,d=0,h=e,f=null;t:for(;;){for(var p;h!==n||0!==i&&3!==h.nodeType||(l=s+i),h!==a||0!==r&&3!==h.nodeType||(c=s+r),3===h.nodeType&&(s+=h.nodeValue.length),null!==(p=h.firstChild);)f=h,h=p;for(;;){if(h===e)break t;if(f===n&&++u===i&&(l=s),f===a&&++d===r&&(c=s),null!==(p=h.nextSibling))break;f=(h=f).parentNode}h=p}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(ti={focusedElem:e,selectionRange:n},Kt=!1,Js=t;null!==Js;)if(e=(t=Js).child,0!==(1028&t.subtreeFlags)&&null!==e)e.return=t,Js=e;else for(;null!==Js;){t=Js;try{var m=t.alternate;if(0!==(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==m){var g=m.memoizedProps,v=m.memoizedState,b=t.stateNode,y=b.getSnapshotBeforeUpdate(t.elementType===t.type?g:ns(t.type,g),v);b.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var _=t.stateNode.containerInfo;1===_.nodeType?_.textContent="":9===_.nodeType&&_.documentElement&&_.removeChild(_.documentElement);break;default:throw Error(o(163))}}catch(S){xc(t,t.return,S)}if(null!==(e=t.sibling)){e.return=t.return,Js=e;break}Js=t.return}m=tl,tl=!1}(e,n),gl(n,e),pr(ti),Kt=!!ei,ti=ei=null,e.current=n,bl(n,e,i),Ye(),$l=l,yt=s,Ol.transition=a}else e.current=n;if(ql&&(ql=!1,Xl=e,Gl=i),a=e.pendingLanes,0===a&&(Ul=null),function(e){if(ot&&"function"===typeof ot.onCommitFiberRoot)try{ot.onCommitFiberRoot(it,e,void 0,128===(128&e.current.flags))}catch(t){}}(n.stateNode),rc(e,Qe()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Kl)throw Kl=!1,e=Vl,Vl=null,e;0!==(1&Gl)&&0!==e.tag&&wc(),a=e.pendingLanes,0!==(1&a)?e===Ql?Yl++:(Yl=0,Ql=e):Yl=0,Fi()}(e,t,n,r)}finally{Ol.transition=i,yt=r}return null}function wc(){if(null!==Xl){var e=_t(Gl),t=Ol.transition,n=yt;try{if(Ol.transition=null,yt=16>e?16:e,null===Xl)var r=!1;else{if(e=Xl,Xl=null,Gl=0,0!==(6&$l))throw Error(o(331));var i=$l;for($l|=4,Js=e.current;null!==Js;){var a=Js,s=a.child;if(0!==(16&Js.flags)){var l=a.deletions;if(null!==l){for(var c=0;c<l.length;c++){var u=l[c];for(Js=u;null!==Js;){var d=Js;switch(d.tag){case 0:case 11:case 15:nl(8,d,a)}var h=d.child;if(null!==h)h.return=d,Js=h;else for(;null!==Js;){var f=(d=Js).sibling,p=d.return;if(ol(d),d===u){Js=null;break}if(null!==f){f.return=p,Js=f;break}Js=p}}}var m=a.alternate;if(null!==m){var g=m.child;if(null!==g){m.child=null;do{var v=g.sibling;g.sibling=null,g=v}while(null!==g)}}Js=a}}if(0!==(2064&a.subtreeFlags)&&null!==s)s.return=a,Js=s;else e:for(;null!==Js;){if(0!==(2048&(a=Js).flags))switch(a.tag){case 0:case 11:case 15:nl(9,a,a.return)}var b=a.sibling;if(null!==b){b.return=a.return,Js=b;break e}Js=a.return}}var y=e.current;for(Js=y;null!==Js;){var _=(s=Js).child;if(0!==(2064&s.subtreeFlags)&&null!==_)_.return=s,Js=_;else e:for(s=y;null!==Js;){if(0!==(2048&(l=Js).flags))try{switch(l.tag){case 0:case 11:case 15:rl(9,l)}}catch(w){xc(l,l.return,w)}if(l===s){Js=null;break e}var S=l.sibling;if(null!==S){S.return=l.return,Js=S;break e}Js=l.return}}if($l=i,Fi(),ot&&"function"===typeof ot.onPostCommitFiberRoot)try{ot.onPostCommitFiberRoot(it,e)}catch(w){}r=!0}return r}finally{yt=n,Ol.transition=t}}return!1}function Cc(e,t,n){e=zo(e,t=fs(0,t=cs(n,t),1),1),t=ec(),null!==e&&(vt(e,1,t),rc(e,t))}function xc(e,t,n){if(3===e.tag)Cc(e,e,n);else for(;null!==t;){if(3===t.tag){Cc(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Ul||!Ul.has(r))){t=zo(t,e=ps(t,e=cs(n,e),1),1),e=ec(),null!==t&&(vt(t,1,e),rc(t,e));break}}t=t.return}}function Ec(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=ec(),e.pingedLanes|=e.suspendedLanes&n,Rl===e&&(Ml&n)===n&&(4===Ll||3===Ll&&(130023424&Ml)===Ml&&500>Qe()-Hl?hc(e,0):Bl|=n),rc(e,t)}function kc(e,t){0===t&&(0===(1&e.mode)?t=1:(t=ut,0===(130023424&(ut<<=1))&&(ut=4194304)));var n=ec();null!==(e=To(e,t))&&(vt(e,t,n),rc(e,n))}function Oc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),kc(e,n)}function $c(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(o(314))}null!==r&&r.delete(t),kc(e,n)}function Rc(e,t){return qe(e,t)}function Ic(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Mc(e,t,n,r){return new Ic(e,t,n,r)}function Pc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Nc(e,t){var n=e.alternate;return null===n?((n=Mc(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Lc(e,t,n,r,i,a){var s=2;if(r=e,"function"===typeof e)Pc(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case C:return Tc(n.children,i,a,t);case x:s=8,i|=8;break;case E:return(e=Mc(12,n,t,2|i)).elementType=E,e.lanes=a,e;case R:return(e=Mc(13,n,t,i)).elementType=R,e.lanes=a,e;case I:return(e=Mc(19,n,t,i)).elementType=I,e.lanes=a,e;case N:return Dc(n,i,a,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case k:s=10;break e;case O:s=9;break e;case $:s=11;break e;case M:s=14;break e;case P:s=16,r=null;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Mc(s,n,t,i)).elementType=e,t.type=r,t.lanes=a,t}function Tc(e,t,n,r){return(e=Mc(7,e,r,t)).lanes=n,e}function Dc(e,t,n,r){return(e=Mc(22,e,r,t)).elementType=N,e.lanes=n,e.stateNode={isHidden:!1},e}function Ac(e,t,n){return(e=Mc(6,e,null,t)).lanes=n,e}function Bc(e,t,n){return(t=Mc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function jc(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gt(0),this.expirationTimes=gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function zc(e,t,n,r,i,o,a,s,l){return e=new jc(e,t,n,s,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Mc(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ao(o),e}function Hc(e){if(!e)return Oi;e:{if(Fe(e=e._reactInternals)!==e||1!==e.tag)throw Error(o(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Pi(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(o(171))}if(1===e.tag){var n=e.type;if(Pi(n))return Ti(e,n,t)}return t}function Fc(e,t,n,r,i,o,a,s,l){return(e=zc(n,r,!0,e,0,o,0,s,l)).context=Hc(null),n=e.current,(o=jo(r=ec(),i=tc(n))).callback=void 0!==t&&null!==t?t:null,zo(n,o,i),e.current.lanes=i,vt(e,i,r),rc(e,r),e}function Wc(e,t,n,r){var i=t.current,o=ec(),a=tc(i);return n=Hc(n),null===t.context?t.context=n:t.pendingContext=n,(t=jo(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=zo(i,t,a))&&(nc(e,i,a,o),Ho(e,i,a)),a}function Kc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Vc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Uc(e,t){Vc(e,t),(e=e.alternate)&&Vc(e,t)}Cl=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ri.current)ys=!0;else{if(0===(e.lanes&n)&&0===(128&t.flags))return ys=!1,function(e,t,n){switch(t.tag){case 3:Rs(t),po();break;case 5:Jo(t);break;case 1:Pi(t.type)&&Di(t);break;case 4:Yo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;ki(Co,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(ki(ea,1&ea.current),t.flags|=128,null):0!==(n&t.child.childLanes)?As(e,t,n):(ki(ea,1&ea.current),null!==(e=Ks(e,t,n))?e.sibling:null);ki(ea,1&ea.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(128&e.flags)){if(r)return Fs(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),ki(ea,ea.current),r)break;return null;case 22:case 23:return t.lanes=0,xs(e,t,n)}return Ks(e,t,n)}(e,t,n);ys=0!==(131072&e.flags)}else ys=!1,io&&0!==(1048576&t.flags)&&Zi(t,Ui,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ws(e,t),e=t.pendingProps;var i=Mi(t,$i.current);Io(t,n),i=ga(null,t,r,e,i,n);var a=va();return t.flags|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Pi(r)?(a=!0,Di(t)):a=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Ao(t),i.updater=is,t.stateNode=i,i._reactInternals=t,ls(t,r,e,n),t=$s(null,t,r,!0,a,n)):(t.tag=0,io&&a&&eo(t),_s(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ws(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"===typeof e)return Pc(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===$)return 11;if(e===M)return 14}return 2}(r),e=ns(r,e),i){case 0:t=ks(null,t,r,e,n);break e;case 1:t=Os(null,t,r,e,n);break e;case 11:t=Ss(null,t,r,e,n);break e;case 14:t=ws(null,t,r,ns(r.type,e),n);break e}throw Error(o(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,ks(e,t,r,i=t.elementType===r?i:ns(r,i),n);case 1:return r=t.type,i=t.pendingProps,Os(e,t,r,i=t.elementType===r?i:ns(r,i),n);case 3:e:{if(Rs(t),null===e)throw Error(o(387));r=t.pendingProps,i=(a=t.memoizedState).element,Bo(e,t),Wo(t,r,null,n);var s=t.memoizedState;if(r=s.element,a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=Is(e,t,r,n,i=cs(Error(o(423)),t));break e}if(r!==i){t=Is(e,t,r,n,i=cs(Error(o(424)),t));break e}for(ro=ci(t.stateNode.containerInfo.firstChild),no=t,io=!0,oo=null,n=wo(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(po(),r===i){t=Ks(e,t,n);break e}_s(e,t,r,n)}t=t.child}return t;case 5:return Jo(t),null===e&&co(t),r=t.type,i=t.pendingProps,a=null!==e?e.memoizedProps:null,s=i.children,ni(r,i)?s=null:null!==a&&ni(r,a)&&(t.flags|=32),Es(e,t),_s(e,t,s,n),t.child;case 6:return null===e&&co(t),null;case 13:return As(e,t,n);case 4:return Yo(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=So(t,null,r,n):_s(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,Ss(e,t,r,i=t.elementType===r?i:ns(r,i),n);case 7:return _s(e,t,t.pendingProps,n),t.child;case 8:case 12:return _s(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,s=i.value,ki(Co,r._currentValue),r._currentValue=s,null!==a)if(sr(a.value,s)){if(a.children===i.children&&!Ri.current){t=Ks(e,t,n);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var l=a.dependencies;if(null!==l){s=a.child;for(var c=l.firstContext;null!==c;){if(c.context===r){if(1===a.tag){(c=jo(-1,n&-n)).tag=2;var u=a.updateQueue;if(null!==u){var d=(u=u.shared).pending;null===d?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}a.lanes|=n,null!==(c=a.alternate)&&(c.lanes|=n),Ro(a.return,n,t),l.lanes|=n;break}c=c.next}}else if(10===a.tag)s=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(s=a.return))throw Error(o(341));s.lanes|=n,null!==(l=s.alternate)&&(l.lanes|=n),Ro(s,n,t),s=a.sibling}else s=a.child;if(null!==s)s.return=a;else for(s=a;null!==s;){if(s===t){s=null;break}if(null!==(a=s.sibling)){a.return=s.return,s=a;break}s=s.return}a=s}_s(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Io(t,n),r=r(i=Mo(i)),t.flags|=1,_s(e,t,r,n),t.child;case 14:return i=ns(r=t.type,t.pendingProps),ws(e,t,r,i=ns(r.type,i),n);case 15:return Cs(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ns(r,i),Ws(e,t),t.tag=1,Pi(r)?(e=!0,Di(t)):e=!1,Io(t,n),as(t,r,i),ls(t,r,i,n),$s(null,t,r,!0,e,n);case 19:return Fs(e,t,n);case 22:return xs(e,t,n)}throw Error(o(156,t.tag))};var qc="function"===typeof reportError?reportError:function(e){console.error(e)};function Xc(e){this._internalRoot=e}function Gc(e){this._internalRoot=e}function Yc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Qc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Jc(){}function Zc(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if("function"===typeof i){var s=i;i=function(){var e=Kc(a);s.call(e)}}Wc(t,a,e,i)}else a=function(e,t,n,r,i){if(i){if("function"===typeof r){var o=r;r=function(){var e=Kc(a);o.call(e)}}var a=Fc(t,r,e,0,null,!1,0,"",Jc);return e._reactRootContainer=a,e[pi]=a.current,Fr(8===e.nodeType?e.parentNode:e),uc(),a}for(;i=e.lastChild;)e.removeChild(i);if("function"===typeof r){var s=r;r=function(){var e=Kc(l);s.call(e)}}var l=zc(e,0,!1,null,0,!1,0,"",Jc);return e._reactRootContainer=l,e[pi]=l.current,Fr(8===e.nodeType?e.parentNode:e),uc((function(){Wc(t,l,n,r)})),l}(n,t,e,i,r);return Kc(a)}Gc.prototype.render=Xc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(o(409));Wc(e,t,null,null)},Gc.prototype.unmount=Xc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;uc((function(){Wc(null,e,null,null)})),t[pi]=null}},Gc.prototype.unstable_scheduleHydration=function(e){if(e){var t=xt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Nt.length&&0!==t&&t<Nt[n].priority;n++);Nt.splice(n,0,e),0===n&&At(e)}},St=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dt(t.pendingLanes);0!==n&&(bt(t,1|n),rc(t,Qe()),0===(6&$l)&&(Fl=Qe()+500,Fi()))}break;case 13:uc((function(){var t=To(e,1);if(null!==t){var n=ec();nc(t,e,1,n)}})),Uc(e,1)}},wt=function(e){if(13===e.tag){var t=To(e,134217728);if(null!==t)nc(t,e,134217728,ec());Uc(e,134217728)}},Ct=function(e){if(13===e.tag){var t=tc(e),n=To(e,t);if(null!==n)nc(n,e,t,ec());Uc(e,t)}},xt=function(){return yt},Et=function(e,t){var n=yt;try{return yt=e,t()}finally{yt=n}},we=function(e,t,n){switch(t){case"input":if(J(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Si(r);if(!i)throw Error(o(90));q(r),J(r,i)}}}break;case"textarea":oe(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},$e=cc,Re=uc;var eu={usingClientEntryPoint:!1,Events:[yi,_i,Si,ke,Oe,cc]},tu={findFiberByHostInstance:bi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},nu={bundleType:tu.bundleType,version:tu.version,rendererPackageName:tu.rendererPackageName,rendererConfig:tu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ve(e))?null:e.stateNode},findFiberByHostInstance:tu.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var ru=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ru.isDisabled&&ru.supportsFiber)try{it=ru.inject(nu),ot=ru}catch(ue){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=eu,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Yc(t))throw Error(o(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:w,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Yc(e))throw Error(o(299));var n=!1,r="",i=qc;return null!==t&&void 0!==t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=zc(e,1,!1,null,0,n,0,r,i),e[pi]=t.current,Fr(8===e.nodeType?e.parentNode:e),new Xc(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(o(188));throw e=Object.keys(e).join(","),Error(o(268,e))}return e=null===(e=Ve(t))?null:e.stateNode},t.flushSync=function(e){return uc(e)},t.hydrate=function(e,t,n){if(!Qc(t))throw Error(o(200));return Zc(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Yc(e))throw Error(o(405));var r=null!=n&&n.hydratedSources||null,i=!1,a="",s=qc;if(null!==n&&void 0!==n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),t=Fc(t,null,e,1,null!=n?n:null,i,0,a,s),e[pi]=t.current,Fr(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Gc(t)},t.render=function(e,t,n){if(!Qc(t))throw Error(o(200));return Zc(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Qc(e))throw Error(o(40));return!!e._reactRootContainer&&(uc((function(){Zc(null,null,e,!1,(function(){e._reactRootContainer=null,e[pi]=null}))})),!0)},t.unstable_batchedUpdates=cc,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Qc(n))throw Error(o(200));if(null==e||void 0===e._reactInternals)throw Error(o(38));return Zc(e,t,n,!1,r)},t.version="18.3.1-next-f1338f8080-20240426"},391:(e,t,n)=>{"use strict";var r=n(950);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},950:(e,t,n)=>{"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(730)},153:(e,t,n)=>{"use strict";var r=n(43),i=Symbol.for("react.element"),o=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,o={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!l.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:i,type:e,key:c,ref:u,props:o,_owner:s.current}}t.Fragment=o,t.jsx=c,t.jsxs=c},202:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),f=Symbol.iterator;var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,g={};function v(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||p}function b(){}function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||p}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},b.prototype=v.prototype;var _=y.prototype=new b;_.constructor=y,m(_,v.prototype),_.isPureReactComponent=!0;var S=Array.isArray,w=Object.prototype.hasOwnProperty,C={current:null},x={key:!0,ref:!0,__self:!0,__source:!0};function E(e,t,r){var i,o={},a=null,s=null;if(null!=t)for(i in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)w.call(t,i)&&!x.hasOwnProperty(i)&&(o[i]=t[i]);var l=arguments.length-2;if(1===l)o.children=r;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];o.children=c}if(e&&e.defaultProps)for(i in l=e.defaultProps)void 0===o[i]&&(o[i]=l[i]);return{$$typeof:n,type:e,key:a,ref:s,props:o,_owner:C.current}}function k(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var O=/\/+/g;function $(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function R(e,t,i,o,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l=!1;if(null===e)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case n:case r:l=!0}}if(l)return a=a(l=e),e=""===o?"."+$(l,0):o,S(a)?(i="",null!=e&&(i=e.replace(O,"$&/")+"/"),R(a,t,i,"",(function(e){return e}))):null!=a&&(k(a)&&(a=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,i+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(O,"$&/")+"/")+e)),t.push(a)),1;if(l=0,o=""===o?".":o+":",S(e))for(var c=0;c<e.length;c++){var u=o+$(s=e[c],c);l+=R(s,t,i,u,a)}else if(u=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=f&&e[f]||e["@@iterator"])?e:null}(e),"function"===typeof u)for(e=u.call(e),c=0;!(s=e.next()).done;)l+=R(s=s.value,t,i,u=o+$(s,c++),a);else if("object"===s)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function I(e,t,n){if(null==e)return e;var r=[],i=0;return R(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function M(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var P={current:null},N={transition:null},L={ReactCurrentDispatcher:P,ReactCurrentBatchConfig:N,ReactCurrentOwner:C};function T(){throw Error("act(...) is not supported in production builds of React.")}t.Children={map:I,forEach:function(e,t,n){I(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return I(e,(function(){t++})),t},toArray:function(e){return I(e,(function(e){return e}))||[]},only:function(e){if(!k(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=v,t.Fragment=i,t.Profiler=a,t.PureComponent=y,t.StrictMode=o,t.Suspense=u,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=L,t.act=T,t.cloneElement=function(e,t,r){if(null===e||void 0===e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=m({},e.props),o=e.key,a=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,s=C.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)w.call(t,c)&&!x.hasOwnProperty(c)&&(i[c]=void 0===t[c]&&void 0!==l?l[c]:t[c])}var c=arguments.length-2;if(1===c)i.children=r;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];i.children=l}return{$$typeof:n,type:e.type,key:o,ref:a,props:i,_owner:s}},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},t.createElement=E,t.createFactory=function(e){var t=E.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=k,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:M}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=N.transition;N.transition={};try{e()}finally{N.transition=t}},t.unstable_act=T,t.useCallback=function(e,t){return P.current.useCallback(e,t)},t.useContext=function(e){return P.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return P.current.useDeferredValue(e)},t.useEffect=function(e,t){return P.current.useEffect(e,t)},t.useId=function(){return P.current.useId()},t.useImperativeHandle=function(e,t,n){return P.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return P.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return P.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return P.current.useMemo(e,t)},t.useReducer=function(e,t,n){return P.current.useReducer(e,t,n)},t.useRef=function(e){return P.current.useRef(e)},t.useState=function(e){return P.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return P.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return P.current.useTransition()},t.version="18.3.1"},43:(e,t,n)=>{"use strict";e.exports=n(202)},579:(e,t,n)=>{"use strict";e.exports=n(153)},234:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<o(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,a=i>>>1;r<a;){var s=2*(r+1)-1,l=e[s],c=s+1,u=e[c];if(0>o(l,n))c<i&&0>o(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else{if(!(c<i&&0>o(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var c=[],u=[],d=1,h=null,f=3,p=!1,m=!1,g=!1,v="function"===typeof setTimeout?setTimeout:null,b="function"===typeof clearTimeout?clearTimeout:null,y="undefined"!==typeof setImmediate?setImmediate:null;function _(e){for(var t=r(u);null!==t;){if(null===t.callback)i(u);else{if(!(t.startTime<=e))break;i(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function S(e){if(g=!1,_(e),!m)if(null!==r(c))m=!0,N(w);else{var t=r(u);null!==t&&L(S,t.startTime-e)}}function w(e,n){m=!1,g&&(g=!1,b(k),k=-1),p=!0;var o=f;try{for(_(n),h=r(c);null!==h&&(!(h.expirationTime>n)||e&&!R());){var a=h.callback;if("function"===typeof a){h.callback=null,f=h.priorityLevel;var s=a(h.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?h.callback=s:h===r(c)&&i(c),_(n)}else i(c);h=r(c)}if(null!==h)var l=!0;else{var d=r(u);null!==d&&L(S,d.startTime-n),l=!1}return l}finally{h=null,f=o,p=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var C,x=!1,E=null,k=-1,O=5,$=-1;function R(){return!(t.unstable_now()-$<O)}function I(){if(null!==E){var e=t.unstable_now();$=e;var n=!0;try{n=E(!0,e)}finally{n?C():(x=!1,E=null)}}else x=!1}if("function"===typeof y)C=function(){y(I)};else if("undefined"!==typeof MessageChannel){var M=new MessageChannel,P=M.port2;M.port1.onmessage=I,C=function(){P.postMessage(null)}}else C=function(){v(I,0)};function N(e){E=e,x||(x=!0,C())}function L(e,n){k=v((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){m||p||(m=!0,N(w))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},t.unstable_scheduleCallback=function(e,i,o){var a=t.unstable_now();switch("object"===typeof o&&null!==o?o="number"===typeof(o=o.delay)&&0<o?a+o:a:o=a,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:d++,callback:i,priorityLevel:e,startTime:o,expirationTime:s=o+s,sortIndex:-1},o>a?(e.sortIndex=o,n(u,e),null===r(c)&&e===r(u)&&(g?(b(k),k=-1):g=!0,L(S,o-a))):(e.sortIndex=s,n(c,e),m||p||(m=!0,N(w))),e},t.unstable_shouldYield=R,t.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}},853:(e,t,n)=>{"use strict";e.exports=n(234)},139:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,o(n)))}return e}function o(e){if("string"===typeof e||"number"===typeof e)return e;if("object"!==typeof e)return"";if(Array.isArray(e))return i.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=a(t,n));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.m=e,n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,i){if(1&i&&(r=this(r)),8&i)return r;if("object"===typeof r&&r){if(4&i&&r.__esModule)return r;if(16&i&&"function"===typeof r.then)return r}var o=Object.create(null);n.r(o);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&i&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>r[e]));return a.default=()=>r,n.d(o,a),o}})(),n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,r)=>(n.f[r](e,t),t)),[])),n.u=e=>"static/js/"+e+".8ab44547.chunk.js",n.miniCssF=e=>{},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="frontend:";n.l=(r,i,o,a)=>{if(e[r])e[r].push(i);else{var s,l;if(void 0!==o)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var d=c[u];if(d.getAttribute("src")==r||d.getAttribute("data-webpack")==t+o){s=d;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,n.nc&&s.setAttribute("nonce",n.nc),s.setAttribute("data-webpack",t+o),s.src=r),e[r]=[i];var h=(t,n)=>{s.onerror=s.onload=null,clearTimeout(f);var i=e[r];if(delete e[r],s.parentNode&&s.parentNode.removeChild(s),i&&i.forEach((e=>e(n))),t)return t(n)},f=setTimeout(h.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=h.bind(null,s.onerror),s.onload=h.bind(null,s.onload),l&&document.head.appendChild(s)}}})(),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="/",(()=>{var e={792:0};n.f.j=(t,r)=>{var i=n.o(e,t)?e[t]:void 0;if(0!==i)if(i)r.push(i[2]);else{var o=new Promise(((n,r)=>i=e[t]=[n,r]));r.push(i[2]=o);var a=n.p+n.u(t),s=new Error;n.l(a,(r=>{if(n.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var o=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+o+": "+a+")",s.name="ChunkLoadError",s.type=o,s.request=a,i[1](s)}}),"chunk-"+t,t)}};var t=(t,r)=>{var i,o,a=r[0],s=r[1],l=r[2],c=0;if(a.some((t=>0!==e[t]))){for(i in s)n.o(s,i)&&(n.m[i]=s[i]);if(l)l(n)}for(t&&t(r);c<a.length;c++)o=a[c],n.o(e,o)&&e[o]&&e[o][0](),e[o]=0},r=self.webpackChunkfrontend=self.webpackChunkfrontend||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),(()=>{"use strict";var e=n(43),t=n.t(e,2),r=n(391);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function h(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return i.length>=e.length?e.apply(this,i):function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return t.apply(n,[].concat(i,r))}}}function f(e){return{}.toString.call(e).includes("Object")}function p(e){return"function"===typeof e}var m=h((function(e,t){throw new Error(e[t]||e.default)}))({initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"}),g={changes:function(e,t){return f(t)||m("changeType"),Object.keys(t).some((function(t){return n=e,r=t,!Object.prototype.hasOwnProperty.call(n,r);var n,r}))&&m("changeField"),t},selector:function(e){p(e)||m("selectorType")},handler:function(e){p(e)||f(e)||m("handlerType"),f(e)&&Object.values(e).some((function(e){return!p(e)}))&&m("handlersType")},initial:function(e){var t;e||m("initialIsRequired"),f(e)||m("initialType"),t=e,Object.keys(t).length||m("initialContent")}};function v(e,t){return p(t)?t(e.current):t}function b(e,t){return e.current=d(d({},e.current),t),t}function y(e,t,n){return p(t)?t(e.current):Object.keys(n).forEach((function(n){var r;return null===(r=t[n])||void 0===r?void 0:r.call(t,e.current[n])})),n}const _={create:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};g.initial(e),g.handler(t);var n={current:e},r=h(y)(n,t),i=h(b)(n),o=h(g.changes)(e),a=h(v)(n);return[function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e};return g.selector(e),e(n.current)},function(e){!function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduceRight((function(e,t){return t(e)}),e)}}(r,i,o,a)(e)}]}};const S={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs"}};const w=function(e){return{}.toString.call(e).includes("Object")};var C={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:"Deprecation warning!\n You are using deprecated way of configuration.\n\n Instead of using\n monaco.config({ urls: { monacoBase: '...' } })\n use\n monaco.config({ paths: { vs: '...' } })\n\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\n "},x=function(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return i.length>=e.length?e.apply(this,i):function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return t.apply(n,[].concat(i,r))}}}((function(e,t){throw new Error(e[t]||e.default)}))(C);const E={config:function(e){return e||x("configIsRequired"),w(e)||x("configType"),e.urls?(console.warn(C.deprecation),{paths:{vs:e.urls.monacoBase}}):e}};const k=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduceRight((function(e,t){return t(e)}),e)}};const O=function e(t,n){return Object.keys(n).forEach((function(r){n[r]instanceof Object&&t[r]&&Object.assign(n[r],e(t[r],n[r]))})),a(a({},t),n)};var $={type:"cancelation",msg:"operation is manually canceled"};const R=function(e){var t=!1,n=new Promise((function(n,r){e.then((function(e){return t?r($):n(e)})),e.catch(r)}));return n.cancel=function(){return t=!0},n};var I,M,P=_.create({config:S,isInitialized:!1,resolve:null,reject:null,monaco:null}),N=(M=2,function(e){if(Array.isArray(e))return e}(I=P)||function(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(I,M)||function(e,t){if(e){if("string"===typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(I,M)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),L=N[0],T=N[1];function D(e){return document.body.appendChild(e)}function A(e){var t=L((function(e){return{config:e.config,reject:e.reject}})),n=function(e){var t=document.createElement("script");return e&&(t.src=e),t}("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function B(){var e=L((function(e){return{config:e.config,resolve:e.resolve,reject:e.reject}})),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],(function(t){j(t),e.resolve(t)}),(function(t){e.reject(t)}))}function j(e){L().monaco||T({monaco:e})}var z=new Promise((function(e,t){return T({resolve:e,reject:t})}));const H={config:function(e){var t=E.config(e),n=t.monaco,r=s(t,["monaco"]);T((function(e){return{config:O(e.config,r),monaco:n}}))},init:function(){var e=L((function(e){return{monaco:e.monaco,isInitialized:e.isInitialized,resolve:e.resolve}}));if(!e.isInitialized){if(T({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),R(z);if(window.monaco&&window.monaco.editor)return j(window.monaco),e.resolve(window.monaco),R(z);k(D,A)(B)}return R(z)},__getMonacoInstance:function(){return L((function(e){return e.monaco}))}};var F={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},W={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}};var K=function(t){let{children:n}=t;return e.createElement("div",{style:W.container},n)};var V=function(t){let{width:n,height:r,isEditorReady:i,loading:o,_ref:a,className:s,wrapperProps:l}=t;return e.createElement("section",{style:{...F.wrapper,width:n,height:r},...l},!i&&e.createElement(K,null,o),e.createElement("div",{ref:a,style:{...F.fullWidth,...!i&&F.hide},className:s}))},U=(0,e.memo)(V);var q=function(t){(0,e.useEffect)(t,[])};var X=function(t,n){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=(0,e.useRef)(!0);(0,e.useEffect)(i.current||!r?()=>{i.current=!1}:t,n)};function G(){}function Y(e,t,n,r){return function(e,t){return e.editor.getModel(Q(e,t))}(e,r)||function(e,t,n,r){return e.editor.createModel(t,n,r?Q(e,r):void 0)}(e,t,n,r)}function Q(e,t){return e.Uri.parse(t)}var J=function(t){let{original:n,modified:r,language:i,originalLanguage:o,modifiedLanguage:a,originalModelPath:s,modifiedModelPath:l,keepCurrentOriginalModel:c=!1,keepCurrentModifiedModel:u=!1,theme:d="light",loading:h="Loading...",options:f={},height:p="100%",width:m="100%",className:g,wrapperProps:v={},beforeMount:b=G,onMount:y=G}=t,[_,S]=(0,e.useState)(!1),[w,C]=(0,e.useState)(!0),x=(0,e.useRef)(null),E=(0,e.useRef)(null),k=(0,e.useRef)(null),O=(0,e.useRef)(y),$=(0,e.useRef)(b),R=(0,e.useRef)(!1);q((()=>{let e=H.init();return e.then((e=>(E.current=e)&&C(!1))).catch((e=>"cancelation"!==e?.type&&console.error("Monaco initialization: error:",e))),()=>x.current?function(){let e=x.current?.getModel();c||e?.original?.dispose(),u||e?.modified?.dispose(),x.current?.dispose()}():e.cancel()})),X((()=>{if(x.current&&E.current){let e=x.current.getOriginalEditor(),t=Y(E.current,n||"",o||i||"text",s||"");t!==e.getModel()&&e.setModel(t)}}),[s],_),X((()=>{if(x.current&&E.current){let e=x.current.getModifiedEditor(),t=Y(E.current,r||"",a||i||"text",l||"");t!==e.getModel()&&e.setModel(t)}}),[l],_),X((()=>{let e=x.current.getModifiedEditor();e.getOption(E.current.editor.EditorOption.readOnly)?e.setValue(r||""):r!==e.getValue()&&(e.executeEdits("",[{range:e.getModel().getFullModelRange(),text:r||"",forceMoveMarkers:!0}]),e.pushUndoStop())}),[r],_),X((()=>{x.current?.getModel()?.original.setValue(n||"")}),[n],_),X((()=>{let{original:e,modified:t}=x.current.getModel();E.current.editor.setModelLanguage(e,o||i||"text"),E.current.editor.setModelLanguage(t,a||i||"text")}),[i,o,a],_),X((()=>{E.current?.editor.setTheme(d)}),[d],_),X((()=>{x.current?.updateOptions(f)}),[f],_);let I=(0,e.useCallback)((()=>{if(!E.current)return;$.current(E.current);let e=Y(E.current,n||"",o||i||"text",s||""),t=Y(E.current,r||"",a||i||"text",l||"");x.current?.setModel({original:e,modified:t})}),[i,r,a,n,o,s,l]),M=(0,e.useCallback)((()=>{!R.current&&k.current&&(x.current=E.current.editor.createDiffEditor(k.current,{automaticLayout:!0,...f}),I(),E.current?.editor.setTheme(d),S(!0),R.current=!0)}),[f,d,I]);return(0,e.useEffect)((()=>{_&&O.current(x.current,E.current)}),[_]),(0,e.useEffect)((()=>{!w&&!_&&M()}),[w,_,M]),e.createElement(U,{width:m,height:p,isEditorReady:_,loading:h,_ref:k,className:g,wrapperProps:v})};(0,e.memo)(J);var Z=function(t){let n=(0,e.useRef)();return(0,e.useEffect)((()=>{n.current=t}),[t]),n.current},ee=new Map;var te=function(t){let{defaultValue:n,defaultLanguage:r,defaultPath:i,value:o,language:a,path:s,theme:l="light",line:c,loading:u="Loading...",options:d={},overrideServices:h={},saveViewState:f=!0,keepCurrentModel:p=!1,width:m="100%",height:g="100%",className:v,wrapperProps:b={},beforeMount:y=G,onMount:_=G,onChange:S,onValidate:w=G}=t,[C,x]=(0,e.useState)(!1),[E,k]=(0,e.useState)(!0),O=(0,e.useRef)(null),$=(0,e.useRef)(null),R=(0,e.useRef)(null),I=(0,e.useRef)(_),M=(0,e.useRef)(y),P=(0,e.useRef)(),N=(0,e.useRef)(o),L=Z(s),T=(0,e.useRef)(!1),D=(0,e.useRef)(!1);q((()=>{let e=H.init();return e.then((e=>(O.current=e)&&k(!1))).catch((e=>"cancelation"!==e?.type&&console.error("Monaco initialization: error:",e))),()=>$.current?(P.current?.dispose(),p?f&&ee.set(s,$.current.saveViewState()):$.current.getModel()?.dispose(),void $.current.dispose()):e.cancel()})),X((()=>{let e=Y(O.current,n||o||"",r||a||"",s||i||"");e!==$.current?.getModel()&&(f&&ee.set(L,$.current?.saveViewState()),$.current?.setModel(e),f&&$.current?.restoreViewState(ee.get(s)))}),[s],C),X((()=>{$.current?.updateOptions(d)}),[d],C),X((()=>{!$.current||void 0===o||($.current.getOption(O.current.editor.EditorOption.readOnly)?$.current.setValue(o):o!==$.current.getValue()&&(D.current=!0,$.current.executeEdits("",[{range:$.current.getModel().getFullModelRange(),text:o,forceMoveMarkers:!0}]),$.current.pushUndoStop(),D.current=!1))}),[o],C),X((()=>{let e=$.current?.getModel();e&&a&&O.current?.editor.setModelLanguage(e,a)}),[a],C),X((()=>{void 0!==c&&$.current?.revealLine(c)}),[c],C),X((()=>{O.current?.editor.setTheme(l)}),[l],C);let A=(0,e.useCallback)((()=>{if(R.current&&O.current&&!T.current){M.current(O.current);let e=s||i,t=Y(O.current,o||n||"",r||a||"",e||"");$.current=O.current?.editor.create(R.current,{model:t,automaticLayout:!0,...d},h),f&&$.current.restoreViewState(ee.get(e)),O.current.editor.setTheme(l),void 0!==c&&$.current.revealLine(c),x(!0),T.current=!0}}),[n,r,i,o,a,s,d,h,f,l,c]);return(0,e.useEffect)((()=>{C&&I.current($.current,O.current)}),[C]),(0,e.useEffect)((()=>{!E&&!C&&A()}),[E,C,A]),N.current=o,(0,e.useEffect)((()=>{C&&S&&(P.current?.dispose(),P.current=$.current?.onDidChangeModelContent((e=>{D.current||S($.current.getValue(),e)})))}),[C,S]),(0,e.useEffect)((()=>{if(C){let e=O.current.editor.onDidChangeMarkers((e=>{let t=$.current.getModel()?.uri;if(t&&e.find((e=>e.path===t.path))){let e=O.current.editor.getModelMarkers({resource:t});w?.(e)}}));return()=>{e?.dispose()}}return()=>{}}),[C,w]),e.createElement(U,{width:m,height:g,isEditorReady:C,loading:u,_ref:R,className:v,wrapperProps:b})},ne=(0,e.memo)(te),re=ne;function ie(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function oe(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function ae(e,t){if(e){if("string"==typeof e)return ie(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ie(e,t):void 0}}function se(e){return function(e){if(Array.isArray(e))return ie(e)}(e)||oe(e)||ae(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function le(e){return le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},le(e)}function ce(){ce=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof v?t:v,a=Object.create(o.prototype),s=new I(r||[]);return i(a,"_invoke",{value:k(e,n,s)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var h="suspendedStart",f="suspendedYield",p="executing",m="completed",g={};function v(){}function b(){}function y(){}var _={};c(_,a,(function(){return this}));var S=Object.getPrototypeOf,w=S&&S(S(M([])));w&&w!==n&&r.call(w,a)&&(_=w);var C=y.prototype=v.prototype=Object.create(_);function x(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function n(i,o,a,s){var l=d(e[i],e,o);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==le(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function k(t,n,r){var i=h;return function(o,a){if(i===p)throw Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var l=O(s,r);if(l){if(l===g)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var c=d(t,n,r);if("normal"===c.type){if(i=r.done?m:f,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=m,r.method="throw",r.arg=c.arg)}}}function O(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=d(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function $(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach($,this),this.reset(!0)}function M(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(le(t)+" is not iterable")}return b.prototype=y,i(C,"constructor",{value:y,configurable:!0}),i(y,"constructor",{value:b,configurable:!0}),b.displayName=c(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,c(e,l,"GeneratorFunction")),e.prototype=Object.create(C),e},t.awrap=function(e){return{__await:e}},x(E.prototype),c(E.prototype,s,(function(){return this})),t.AsyncIterator=E,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new E(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},x(C),c(C,l,"Generator"),c(C,a,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=M,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(R),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),R(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;R(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:M(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function ue(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function de(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){ue(o,r,i,a,s,"next",e)}function s(e){ue(o,r,i,a,s,"throw",e)}a(void 0)}))}}function he(e){var t=function(e,t){if("object"!=le(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=le(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==le(t)?t:t+""}function fe(e,t,n){return(t=he(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function me(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pe(Object(n),!0).forEach((function(t){fe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ge,ve=n(950),be=me({},n.t(ve,2)),ye=be.version,_e=be.render,Se=be.unmountComponentAtNode;try{Number((ye||"").split(".")[0])>=18&&(ge=be.createRoot)}catch(rI){}function we(e){var t=be.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&"object"===le(t)&&(t.usingClientEntryPoint=e)}var Ce="__rc_react_root__";function xe(e,t){ge?function(e,t){we(!0);var n=t[Ce]||ge(t);we(!1),n.render(e),t[Ce]=n}(e,t):function(e,t){_e(e,t)}(e,t)}function Ee(e){return ke.apply(this,arguments)}function ke(){return(ke=de(ce().mark((function e(t){return ce().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve().then((function(){var e;null===(e=t[Ce])||void 0===e||e.unmount(),delete t[Ce]})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Oe(e){Se(e)}function $e(e){return Re.apply(this,arguments)}function Re(){return(Re=de(ce().mark((function e(t){return ce().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===ge){e.next=2;break}return e.abrupt("return",Ee(t));case 2:Oe(t);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}const Ie=e.createContext({}),Me="ant",Pe="anticon",Ne=["outlined","borderless","filled"],Le=e.createContext({getPrefixCls:(e,t)=>t||(e?`${Me}-${e}`:Me),iconPrefixCls:Pe}),{Consumer:Te}=Le;function De(e){if(Array.isArray(e))return e}function Ae(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Be(e,t){return De(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||ae(e,t)||Ae()}const je=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)};function ze(){return!("undefined"===typeof window||!window.document||!window.document.createElement)}function He(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}var Fe="data-rc-order",We="data-rc-priority",Ke=new Map;function Ve(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).mark;return e?e.startsWith("data-")?e:"data-".concat(e):"rc-util-key"}function Ue(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function qe(e){return Array.from((Ke.get(e)||e).children).filter((function(e){return"STYLE"===e.tagName}))}function Xe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!ze())return null;var n=t.csp,r=t.prepend,i=t.priority,o=void 0===i?0:i,a=function(e){return"queue"===e?"prependQueue":e?"prepend":"append"}(r),s="prependQueue"===a,l=document.createElement("style");l.setAttribute(Fe,a),s&&o&&l.setAttribute(We,"".concat(o)),null!==n&&void 0!==n&&n.nonce&&(l.nonce=null===n||void 0===n?void 0:n.nonce),l.innerHTML=e;var c=Ue(t),u=c.firstChild;if(r){if(s){var d=(t.styles||qe(c)).filter((function(e){if(!["prepend","prependQueue"].includes(e.getAttribute(Fe)))return!1;var t=Number(e.getAttribute(We)||0);return o>=t}));if(d.length)return c.insertBefore(l,d[d.length-1].nextSibling),l}c.insertBefore(l,u)}else c.appendChild(l);return l}function Ge(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Ue(t);return(t.styles||qe(n)).find((function(n){return n.getAttribute(Ve(t))===e}))}function Ye(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Ge(e,t);n&&Ue(t).removeChild(n)}function Qe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Ue(n),i=qe(r),o=me(me({},n),{},{styles:i});!function(e,t){var n=Ke.get(e);if(!n||!He(document,n)){var r=Xe("",t),i=r.parentNode;Ke.set(e,i),e.removeChild(r)}}(r,o);var a=Ge(t,o);if(a){var s,l,c;if(null!==(s=o.csp)&&void 0!==s&&s.nonce&&a.nonce!==(null===(l=o.csp)||void 0===l?void 0:l.nonce))a.nonce=null===(c=o.csp)||void 0===c?void 0:c.nonce;return a.innerHTML!==e&&(a.innerHTML=e),a}var u=Xe(e,o);return u.setAttribute(Ve(o),t),u}function Je(t,n,r){var i=e.useRef({});return"value"in i.current&&!r(i.current.condition,n)||(i.current.value=t(),i.current.condition=n),i.current.value}var Ze={},et=[];function tt(e,t){}function nt(e,t){}function rt(e,t,n){t||Ze[n]||(e(!1,n),Ze[n]=!0)}function it(e,t){rt(tt,e,t)}it.preMessage=function(e){et.push(e)},it.resetWarned=function(){Ze={}},it.noteOnce=function(e,t){rt(nt,e,t)};const ot=it;const at=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=new Set;return function e(t,i){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=r.has(t);if(ot(!a,"Warning: There may be circular references"),a)return!1;if(t===i)return!0;if(n&&o>1)return!1;r.add(t);var s=o+1;if(Array.isArray(t)){if(!Array.isArray(i)||t.length!==i.length)return!1;for(var l=0;l<t.length;l++)if(!e(t[l],i[l],s))return!1;return!0}if(t&&i&&"object"===le(t)&&"object"===le(i)){var c=Object.keys(t);return c.length===Object.keys(i).length&&c.every((function(n){return e(t[n],i[n],s)}))}return!1}(e,t)};function st(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,he(r.key),r)}}function ct(e,t,n){return t&<(e.prototype,t),n&<(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ut(e){return e.join("%")}const dt=function(){function e(t){st(this,e),fe(this,"instanceId",void 0),fe(this,"cache",new Map),this.instanceId=t}return ct(e,[{key:"get",value:function(e){return this.opGet(ut(e))}},{key:"opGet",value:function(e){return this.cache.get(e)||null}},{key:"update",value:function(e,t){return this.opUpdate(ut(e),t)}},{key:"opUpdate",value:function(e,t){var n=t(this.cache.get(e));null===n?this.cache.delete(e):this.cache.set(e,n)}}]),e}();var ht="data-token-hash",ft="data-css-hash",pt="__cssinjs_instance__";function mt(){var e=Math.random().toString(12).slice(2);if("undefined"!==typeof document&&document.head&&document.body){var t=document.body.querySelectorAll("style[".concat(ft,"]"))||[],n=document.head.firstChild;Array.from(t).forEach((function(t){t[pt]=t[pt]||e,t[pt]===e&&document.head.insertBefore(t,n)}));var r={};Array.from(document.querySelectorAll("style[".concat(ft,"]"))).forEach((function(t){var n,i=t.getAttribute(ft);r[i]?t[pt]===e&&(null===(n=t.parentNode)||void 0===n||n.removeChild(t)):r[i]=!0}))}return new dt(e)}var gt=e.createContext({hashPriority:"low",cache:mt(),defaultCache:!0});const vt=gt;var bt="CALC_UNIT";new RegExp(bt,"g");var yt=function(){function e(){st(this,e),fe(this,"cache",void 0),fe(this,"keys",void 0),fe(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return ct(e,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i={map:this.cache};return e.forEach((function(e){var t;i?i=null===(t=i)||void 0===t||null===(t=t.map)||void 0===t?void 0:t.get(e):i=void 0})),null!==(t=i)&&void 0!==t&&t.value&&r&&(i.value[1]=this.cacheCallTimes++),null===(n=i)||void 0===n?void 0:n.value}},{key:"get",value:function(e){var t;return null===(t=this.internalGet(e,!0))||void 0===t?void 0:t[0]}},{key:"has",value:function(e){return!!this.internalGet(e)}},{key:"set",value:function(t,n){var r=this;if(!this.has(t)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var i=this.keys.reduce((function(e,t){var n=Be(e,2)[1];return r.internalGet(t)[1]<n?[t,r.internalGet(t)[1]]:e}),[this.keys[0],this.cacheCallTimes]),o=Be(i,1)[0];this.delete(o)}this.keys.push(t)}var a=this.cache;t.forEach((function(e,i){if(i===t.length-1)a.set(e,{value:[n,r.cacheCallTimes++]});else{var o=a.get(e);o?o.map||(o.map=new Map):a.set(e,{map:new Map}),a=a.get(e).map}}))}},{key:"deleteByPath",value:function(e,t){var n,r=e.get(t[0]);if(1===t.length)return r.map?e.set(t[0],{map:r.map}):e.delete(t[0]),null===(n=r.value)||void 0===n?void 0:n[0];var i=this.deleteByPath(r.map,t.slice(1));return r.map&&0!==r.map.size||r.value||e.delete(t[0]),i}},{key:"delete",value:function(e){if(this.has(e))return this.keys=this.keys.filter((function(t){return!function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,e)})),this.deleteByPath(this.cache,e)}}]),e}();fe(yt,"MAX_CACHE_SIZE",20),fe(yt,"MAX_CACHE_OFFSET",5);var _t=0,St=function(){function e(t){st(this,e),fe(this,"derivatives",void 0),fe(this,"id",void 0),this.derivatives=Array.isArray(t)?t:[t],this.id=_t,0===t.length&&t.length,_t+=1}return ct(e,[{key:"getDerivativeToken",value:function(e){return this.derivatives.reduce((function(t,n){return n(e,t)}),void 0)}}]),e}(),wt=new yt;function Ct(e){var t=Array.isArray(e)?e:[e];return wt.has(t)||wt.set(t,new St(t)),wt.get(t)}var xt=new WeakMap,Et={};var kt=new WeakMap;function Ot(e){var t=kt.get(e)||"";return t||(Object.keys(e).forEach((function(n){var r=e[n];t+=n,r instanceof St?t+=r.id:r&&"object"===le(r)?t+=Ot(r):t+=r})),t=je(t),kt.set(e,t)),t}function $t(e,t){return je("".concat(t,"_").concat(Ot(e)))}"random-".concat(Date.now(),"-").concat(Math.random()).replace(/\./g,"");var Rt=ze();function It(e){return"number"===typeof e?"".concat(e,"px"):e}function Mt(e,t,n){var r;if(arguments.length>4&&void 0!==arguments[4]&&arguments[4])return e;var i=me(me({},arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}),{},(fe(r={},ht,t),fe(r,ft,n),r)),o=Object.keys(i).map((function(e){var t=i[e];return t?"".concat(e,'="').concat(t,'"'):null})).filter((function(e){return e})).join(" ");return"<style ".concat(o,">").concat(e,"</style>")}var Pt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"--".concat(t?"".concat(t,"-"):"").concat(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase()},Nt=function(e,t,n){return Object.keys(e).length?".".concat(t).concat(null!==n&&void 0!==n&&n.scope?".".concat(n.scope):"","{").concat(Object.entries(e).map((function(e){var t=Be(e,2),n=t[0],r=t[1];return"".concat(n,":").concat(r,";")})).join(""),"}"):""},Lt=function(e,t,n){var r={},i={};return Object.entries(e).forEach((function(e){var t,o,a=Be(e,2),s=a[0],l=a[1];if(null!==n&&void 0!==n&&null!==(t=n.preserve)&&void 0!==t&&t[s])i[s]=l;else if(("string"===typeof l||"number"===typeof l)&&(null===n||void 0===n||null===(o=n.ignore)||void 0===o||!o[s])){var c,u=Pt(s,null===n||void 0===n?void 0:n.prefix);r[u]="number"!==typeof l||null!==n&&void 0!==n&&null!==(c=n.unitless)&&void 0!==c&&c[s]?String(l):"".concat(l,"px"),i[s]="var(".concat(u,")")}})),[i,Nt(r,t,{scope:null===n||void 0===n?void 0:n.scope})]},Tt=ze()?e.useLayoutEffect:e.useEffect,Dt=function(t,n){var r=e.useRef(!0);Tt((function(){return t(r.current)}),n),Tt((function(){return r.current=!1,function(){r.current=!0}}),[])},At=function(e,t){Dt((function(t){if(!t)return e()}),t)};const Bt=Dt;var jt=me({},t).useInsertionEffect;const zt=jt?function(e,t,n){return jt((function(){return e(),t()}),n)}:function(t,n,r){e.useMemo(t,r),Bt((function(){return n(!0)}),r)};const Ht="undefined"!==typeof me({},t).useInsertionEffect?function(t){var n=[],r=!1;return e.useEffect((function(){return r=!1,function(){r=!0,n.length&&n.forEach((function(e){return e()}))}}),t),function(e){r||n.push(e)}}:function(){return function(e){e()}};const Ft=function(){return!1};function Wt(t,n,r,i,o){var a=e.useContext(vt).cache,s=ut([t].concat(se(n))),l=Ht([s]),c=(Ft(),function(e){a.opUpdate(s,(function(t){var n=Be(t||[void 0,void 0],2),i=n[0];var o=[void 0===i?0:i,n[1]||r()];return e?e(o):o}))});e.useMemo((function(){c()}),[s]);var u=a.opGet(s)[1];return zt((function(){null===o||void 0===o||o(u)}),(function(e){return c((function(t){var n=Be(t,2),r=n[0],i=n[1];return e&&0===r&&(null===o||void 0===o||o(u)),[r+1,i]})),function(){a.opUpdate(s,(function(t){var n=Be(t||[],2),r=n[0],o=void 0===r?0:r,c=n[1];return 0===o-1?(l((function(){!e&&a.opGet(s)||null===i||void 0===i||i(c,!1)})),null):[o-1,c]}))}}),[s]),u}var Kt={},Vt=new Map;function Ut(e,t){Vt.set(e,(Vt.get(e)||0)-1);var n=Array.from(Vt.keys()),r=n.filter((function(e){return(Vt.get(e)||0)<=0}));n.length-r.length>0&&r.forEach((function(e){!function(e,t){"undefined"!==typeof document&&document.querySelectorAll("style[".concat(ht,'="').concat(e,'"]')).forEach((function(e){var n;e[pt]===t&&(null===(n=e.parentNode)||void 0===n||n.removeChild(e))}))}(e,t),Vt.delete(e)}))}var qt="token";function Xt(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=(0,e.useContext)(vt),o=i.cache.instanceId,a=i.container,s=r.salt,l=void 0===s?"":s,c=r.override,u=void 0===c?Kt:c,d=r.formatToken,h=r.getComputedToken,f=r.cssVar,p=function(e,t){for(var n=xt,r=0;r<t.length;r+=1){var i=t[r];n.has(i)||n.set(i,new WeakMap),n=n.get(i)}return n.has(Et)||n.set(Et,e()),n.get(Et)}((function(){return Object.assign.apply(Object,[{}].concat(se(n)))}),n),m=Ot(p),g=Ot(u),v=f?Ot(f):"",b=Wt(qt,[l,t.id,m,g,v],(function(){var e,n=h?h(p,u,t):function(e,t,n,r){var i=me(me({},n.getDerivativeToken(e)),t);return r&&(i=r(i)),i}(p,u,t,d),r=me({},n),i="";if(f){var o=Be(Lt(n,f.key,{prefix:f.prefix,ignore:f.ignore,unitless:f.unitless,preserve:f.preserve}),2);n=o[0],i=o[1]}var a=$t(n,l);n._tokenKey=a,r._tokenKey=$t(r,l);var s=null!==(e=null===f||void 0===f?void 0:f.key)&&void 0!==e?e:a;n._themeKey=s,function(e){Vt.set(e,(Vt.get(e)||0)+1)}(s);var c="".concat("css","-").concat(je(a));return n._hashId=c,[n,c,r,i,(null===f||void 0===f?void 0:f.key)||""]}),(function(e){Ut(e[0]._themeKey,o)}),(function(e){var t=Be(e,4),n=t[0],r=t[3];if(f&&r){var i=Qe(r,je("css-variables-".concat(n._themeKey)),{mark:ft,prepend:"queue",attachTo:a,priority:-999});i[pt]=o,i.setAttribute(ht,n._themeKey)}}));return b}function Gt(){return Gt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gt.apply(null,arguments)}const Yt={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var Qt="comm",Jt="rule",Zt="decl",en=Math.abs,tn=String.fromCharCode;Object.assign;function nn(e){return e.trim()}function rn(e,t,n){return e.replace(t,n)}function on(e,t,n){return e.indexOf(t,n)}function an(e,t){return 0|e.charCodeAt(t)}function sn(e,t,n){return e.slice(t,n)}function ln(e){return e.length}function cn(e,t){return t.push(e),e}function un(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function dn(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case Zt:return e.return=e.return||e.value;case Qt:return"";case"@keyframes":return e.return=e.value+"{"+un(e.children,r)+"}";case Jt:if(!ln(e.value=e.props.join(",")))return""}return ln(n=un(e.children,r))?e.return=e.value+"{"+n+"}":""}var hn=1,fn=1,pn=0,mn=0,gn=0,vn="";function bn(e,t,n,r,i,o,a,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:hn,column:fn,length:a,return:"",siblings:s}}function yn(){return gn=mn<pn?an(vn,mn++):0,fn++,10===gn&&(fn=1,hn++),gn}function _n(){return an(vn,mn)}function Sn(){return mn}function wn(e,t){return sn(vn,e,t)}function Cn(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function xn(e){return hn=fn=1,pn=ln(vn=e),mn=0,[]}function En(e){return vn="",e}function kn(e){return nn(wn(mn-1,Rn(91===e?e+2:40===e?e+1:e)))}function On(e){for(;(gn=_n())&&gn<33;)yn();return Cn(e)>2||Cn(gn)>3?"":" "}function $n(e,t){for(;--t&&yn()&&!(gn<48||gn>102||gn>57&&gn<65||gn>70&&gn<97););return wn(e,Sn()+(t<6&&32==_n()&&32==yn()))}function Rn(e){for(;yn();)switch(gn){case e:return mn;case 34:case 39:34!==e&&39!==e&&Rn(gn);break;case 40:41===e&&Rn(e);break;case 92:yn()}return mn}function In(e,t){for(;yn()&&e+gn!==57&&(e+gn!==84||47!==_n()););return"/*"+wn(t,mn-1)+"*"+tn(47===e?e:yn())}function Mn(e){for(;!Cn(_n());)yn();return wn(e,mn)}function Pn(e){return En(Nn("",null,null,null,[""],e=xn(e),0,[0],e))}function Nn(e,t,n,r,i,o,a,s,l){for(var c=0,u=0,d=a,h=0,f=0,p=0,m=1,g=1,v=1,b=0,y="",_=i,S=o,w=r,C=y;g;)switch(p=b,b=yn()){case 40:if(108!=p&&58==an(C,d-1)){-1!=on(C+=rn(kn(b),"&","&\f"),"&\f",en(c?s[c-1]:0))&&(v=-1);break}case 34:case 39:case 91:C+=kn(b);break;case 9:case 10:case 13:case 32:C+=On(p);break;case 92:C+=$n(Sn()-1,7);continue;case 47:switch(_n()){case 42:case 47:cn(Tn(In(yn(),Sn()),t,n,l),l),5!=Cn(p||1)&&5!=Cn(_n()||1)||!ln(C)||" "===sn(C,-1,void 0)||(C+=" ");break;default:C+="/"}break;case 123*m:s[c++]=ln(C)*v;case 125*m:case 59:case 0:switch(b){case 0:case 125:g=0;case 59+u:-1==v&&(C=rn(C,/\f/g,"")),f>0&&(ln(C)-d||0===m&&47===p)&&cn(f>32?Dn(C+";",r,n,d-1,l):Dn(rn(C," ","")+";",r,n,d-2,l),l);break;case 59:C+=";";default:if(cn(w=Ln(C,t,n,c,u,i,s,y,_=[],S=[],d,o),o),123===b)if(0===u)Nn(C,t,w,w,_,o,d,s,S);else switch(99===h&&110===an(C,3)?100:h){case 100:case 108:case 109:case 115:Nn(e,w,w,r&&cn(Ln(e,w,w,0,0,i,s,y,i,_=[],d,S),S),i,S,d,s,r?_:S);break;default:Nn(C,w,w,w,[""],S,0,s,S)}}c=u=f=0,m=v=1,y=C="",d=a;break;case 58:d=1+ln(C),f=p;default:if(m<1)if(123==b)--m;else if(125==b&&0==m++&&125==(gn=mn>0?an(vn,--mn):0,fn--,10===gn&&(fn=1,hn--),gn))continue;switch(C+=tn(b),b*m){case 38:v=u>0?1:(C+="\f",-1);break;case 44:s[c++]=(ln(C)-1)*v,v=1;break;case 64:45===_n()&&(C+=kn(yn())),h=_n(),u=d=ln(y=C+=Mn(Sn())),b++;break;case 45:45===p&&2==ln(C)&&(m=0)}}return o}function Ln(e,t,n,r,i,o,a,s,l,c,u,d){for(var h=i-1,f=0===i?o:[""],p=function(e){return e.length}(f),m=0,g=0,v=0;m<r;++m)for(var b=0,y=sn(e,h+1,h=en(g=a[m])),_=e;b<p;++b)(_=nn(g>0?f[b]+" "+y:rn(y,/&\f/g,f[b])))&&(l[v++]=_);return bn(e,t,n,0===i?Jt:s,l,c,u,d)}function Tn(e,t,n,r){return bn(e,t,n,Qt,tn(gn),sn(e,2,-2),0,r)}function Dn(e,t,n,r,i){return bn(e,t,n,Zt,sn(e,0,r),sn(e,r+1,-1),r,i)}var An,Bn="data-ant-cssinjs-cache-path",jn="_FILE_STYLE__";var zn=!0;function Hn(e){return function(){if(!An&&(An={},ze())){var e=document.createElement("div");e.className=Bn,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);var t=getComputedStyle(e).content||"";(t=t.replace(/^"/,"").replace(/"$/,"")).split(";").forEach((function(e){var t=Be(e.split(":"),2),n=t[0],r=t[1];An[n]=r}));var n,r=document.querySelector("style[".concat(Bn,"]"));r&&(zn=!1,null===(n=r.parentNode)||void 0===n||n.removeChild(r)),document.body.removeChild(e)}}(),!!An[e]}var Fn="_multi_value_";function Wn(e){return un(Pn(e),dn).replace(/\{%%%\:[^;];}/g,";")}function Kn(e,t,n){if(!t)return e;var r=".".concat(t),i="low"===n?":where(".concat(r,")"):r;return e.split(",").map((function(e){var t,n=e.trim().split(/\s+/),r=n[0]||"",o=(null===(t=r.match(/^\w+/))||void 0===t?void 0:t[0])||"";return[r="".concat(o).concat(i).concat(r.slice(o.length))].concat(se(n.slice(1))).join(" ")})).join(",")}var Vn=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{root:!0,parentSelectors:[]},i=r.root,o=r.injectHash,a=r.parentSelectors,s=n.hashId,l=n.layer,c=(n.path,n.hashPriority),u=n.transformers,d=void 0===u?[]:u,h=(n.linters,""),f={};function p(t){var r=t.getName(s);if(!f[r]){var i=Be(e(t.style,n,{root:!1,parentSelectors:a}),1)[0];f[r]="@keyframes ".concat(t.getName(s)).concat(i)}}var m=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.forEach((function(t){Array.isArray(t)?e(t,n):t&&n.push(t)})),n}(Array.isArray(t)?t:[t]);return m.forEach((function(t){var r="string"!==typeof t||i?t:{};if("string"===typeof r)h+="".concat(r,"\n");else if(r._keyframe)p(r);else{var l=d.reduce((function(e,t){var n;return(null===t||void 0===t||null===(n=t.visit)||void 0===n?void 0:n.call(t,e))||e}),r);Object.keys(l).forEach((function(t){var r=l[t];if("object"!==le(r)||!r||"animationName"===t&&r._keyframe||function(e){return"object"===le(e)&&e&&("_skip_check_"in e||Fn in e)}(r)){var u;function S(e,t){var n=e.replace(/[A-Z]/g,(function(e){return"-".concat(e.toLowerCase())})),r=t;Yt[e]||"number"!==typeof r||0===r||(r="".concat(r,"px")),"animationName"===e&&null!==t&&void 0!==t&&t._keyframe&&(p(t),r=t.getName(s)),h+="".concat(n,":").concat(r,";")}var d=null!==(u=null===r||void 0===r?void 0:r.value)&&void 0!==u?u:r;"object"===le(r)&&null!==r&&void 0!==r&&r[Fn]&&Array.isArray(d)?d.forEach((function(e){S(t,e)})):S(t,d)}else{var m=!1,g=t.trim(),v=!1;(i||o)&&s?g.startsWith("@")?m=!0:g=Kn("&"===g?"":t,s,c):!i||s||"&"!==g&&""!==g||(g="",v=!0);var b=Be(e(r,n,{root:v,injectHash:m,parentSelectors:[].concat(se(a),[g])}),2),y=b[0],_=b[1];f=me(me({},f),_),h+="".concat(g).concat(y)}}))}})),i?l&&(h="@layer ".concat(l.name," {").concat(h,"}"),l.dependencies&&(f["@layer ".concat(l.name)]=l.dependencies.map((function(e){return"@layer ".concat(e,", ").concat(l.name,";")})).join("\n"))):h="{".concat(h,"}"),[h,f]};function Un(e,t){return je("".concat(e.join("%")).concat(t))}function qn(){return null}var Xn="style";function Gn(t,n){var r=t.token,i=t.path,o=t.hashId,a=t.layer,s=t.nonce,l=t.clientOnly,c=t.order,u=void 0===c?0:c,d=e.useContext(vt),h=d.autoClear,f=(d.mock,d.defaultCache),p=d.hashPriority,m=d.container,g=d.ssrInline,v=d.transformers,b=d.linters,y=d.cache,_=d.layer,S=r._tokenKey,w=[S];_&&w.push("layer"),w.push.apply(w,se(i));var C=Rt;var x=Wt(Xn,w,(function(){var e=w.join("|");if(Hn(e)){var t=function(e){var t=An[e],n=null;if(t&&ze())if(zn)n=jn;else{var r=document.querySelector("style[".concat(ft,'="').concat(An[e],'"]'));r?n=r.innerHTML:delete An[e]}return[n,t]}(e),r=Be(t,2),s=r[0],c=r[1];if(s)return[s,S,c,{},l,u]}var d=n(),h=Be(Vn(d,{hashId:o,hashPriority:p,layer:_?a:void 0,path:i.join("-"),transformers:v,linters:b}),2),f=h[0],m=h[1],g=Wn(f),y=Un(w,g);return[g,S,y,m,l,u]}),(function(e,t){var n=Be(e,3)[2];(t||h)&&Rt&&Ye(n,{mark:ft})}),(function(e){var t=Be(e,4),n=t[0],r=(t[1],t[2]),i=t[3];if(C&&n!==jn){var o={mark:ft,prepend:!_&&"queue",attachTo:m,priority:u},a="function"===typeof s?s():s;a&&(o.csp={nonce:a});var l=[],c=[];Object.keys(i).forEach((function(e){e.startsWith("@layer")?l.push(e):c.push(e)})),l.forEach((function(e){Qe(Wn(i[e]),"_layer-".concat(e),me(me({},o),{},{prepend:!0}))}));var d=Qe(n,r,o);d[pt]=y.instanceId,d.setAttribute(ht,S),c.forEach((function(e){Qe(Wn(i[e]),"_effect-".concat(e),o)}))}})),E=Be(x,3),k=E[0],O=E[1],$=E[2];return function(t){var n,r;g&&!C&&f?n=e.createElement("style",Gt({},(fe(r={},ht,O),fe(r,ft,$),r),{dangerouslySetInnerHTML:{__html:k}})):n=e.createElement(qn,null);return e.createElement(e.Fragment,null,n,t)}}var Yn="cssVar";const Qn=function(t,n){var r=t.key,i=t.prefix,o=t.unitless,a=t.ignore,s=t.token,l=t.scope,c=void 0===l?"":l,u=(0,e.useContext)(vt),d=u.cache.instanceId,h=u.container,f=s._tokenKey,p=[].concat(se(t.path),[r,c,f]);return Wt(Yn,p,(function(){var e=n(),t=Be(Lt(e,r,{prefix:i,unitless:o,ignore:a,scope:c}),2),s=t[0],l=t[1];return[s,l,Un(p,l),r]}),(function(e){var t=Be(e,3)[2];Rt&&Ye(t,{mark:ft})}),(function(e){var t=Be(e,3),n=t[1],i=t[2];if(n){var o=Qe(n,i,{mark:ft,prepend:"queue",attachTo:h,priority:-999});o[pt]=d,o.setAttribute(ht,r)}}))};var Jn;fe(Jn={},Xn,(function(e,t,n){var r=Be(e,6),i=r[0],o=r[1],a=r[2],s=r[3],l=r[4],c=r[5],u=(n||{}).plain;if(l)return null;var d=i,h={"data-rc-order":"prependQueue","data-rc-priority":"".concat(c)};return d=Mt(i,o,a,h,u),s&&Object.keys(s).forEach((function(e){if(!t[e]){t[e]=!0;var n=Mt(Wn(s[e]),o,"_effect-".concat(e),h,u);e.startsWith("@layer")?d=n+d:d+=n}})),[c,a,d]})),fe(Jn,qt,(function(e,t,n){var r=Be(e,5),i=r[2],o=r[3],a=r[4],s=(n||{}).plain;if(!o)return null;var l=i._tokenKey;return[-999,l,Mt(o,a,l,{"data-rc-order":"prependQueue","data-rc-priority":"".concat(-999)},s)]})),fe(Jn,Yn,(function(e,t,n){var r=Be(e,4),i=r[1],o=r[2],a=r[3],s=(n||{}).plain;if(!i)return null;return[-999,o,Mt(i,a,o,{"data-rc-order":"prependQueue","data-rc-priority":"".concat(-999)},s)]}));const Zn=function(){function e(t,n){st(this,e),fe(this,"name",void 0),fe(this,"style",void 0),fe(this,"_keyframe",!0),this.name=t,this.style=n}return ct(e,[{key:"getName",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e?"".concat(e,"-").concat(this.name):this.name}}]),e}();function er(e){return e.notSplit=!0,e}er(["borderTop","borderBottom"]),er(["borderTop"]),er(["borderBottom"]),er(["borderLeft","borderRight"]),er(["borderLeft"]),er(["borderRight"]);const tr=(0,e.createContext)({});function nr(e){return De(e)||oe(e)||ae(e)||Ae()}function rr(e,t){for(var n=e,r=0;r<t.length;r+=1){if(null===n||void 0===n)return;n=n[t[r]]}return n}function ir(e,t,n,r){if(!t.length)return n;var i,o=nr(t),a=o[0],s=o.slice(1);return i=e||"number"!==typeof a?Array.isArray(e)?se(e):me({},e):[],r&&void 0===n&&1===s.length?delete i[a][s[0]]:i[a]=ir(i[a],s,n,r),i}function or(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return t.length&&r&&void 0===n&&!rr(e,t.slice(0,-1))?e:ir(e,t,n,r)}function ar(e){return Array.isArray(e)?[]:{}}var sr="undefined"===typeof Reflect?Object.keys:Reflect.ownKeys;function lr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=ar(t[0]);return t.forEach((function(e){!function t(n,i){var o,a=new Set(i),s=rr(e,n),l=Array.isArray(s);if(l||"object"===le(o=s)&&null!==o&&Object.getPrototypeOf(o)===Object.prototype){if(!a.has(s)){a.add(s);var c=rr(r,n);l?r=or(r,n,[]):c&&"object"===le(c)||(r=or(r,n,ar(s))),sr(s).forEach((function(e){t([].concat(se(n),[e]),a)}))}}else r=or(r,n,s)}([])})),r}function cr(){}const ur=e.createContext({}),dr=()=>{const e=()=>{};return e.deprecated=cr,e},hr=(0,e.createContext)(void 0);const fr={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"};const pr=me(me({},{yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0}),{},{locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",dateFormat:"M/D/YYYY",dateTimeFormat:"M/D/YYYY HH:mm:ss",previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"}),mr={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},gr={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},pr),timePickerLocale:Object.assign({},mr)},vr="${label} is not a valid ${type}",br={locale:"en",Pagination:fr,DatePicker:gr,TimePicker:mr,Calendar:gr,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:vr,method:vr,array:vr,object:vr,number:vr,date:vr,boolean:vr,integer:vr,float:vr,regexp:vr,email:vr,url:vr,hex:vr},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}};let yr=Object.assign({},br.Modal),_r=[];const Sr=()=>_r.reduce(((e,t)=>Object.assign(Object.assign({},e),t)),br.Modal);function wr(){return yr}const Cr=(0,e.createContext)(void 0);const xr=t=>{const{locale:n={},children:r,_ANT_MARK__:i}=t;e.useEffect((()=>{const e=function(e){if(e){const t=Object.assign({},e);return _r.push(t),yr=Sr(),()=>{_r=_r.filter((e=>e!==t)),yr=Sr()}}yr=Object.assign({},br.Modal)}(null===n||void 0===n?void 0:n.Modal);return e}),[n]);const o=e.useMemo((()=>Object.assign(Object.assign({},n),{exist:!0})),[n]);return e.createElement(Cr.Provider,{value:o},r)};function Er(e,t){(function(e){return"string"===typeof e&&-1!==e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"===typeof e&&-1!==e.indexOf("%")}(e);return e=360===t?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:e=360===t?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function kr(e){return Math.min(1,Math.max(0,e))}function Or(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function $r(e){return e<=1?"".concat(100*Number(e),"%"):e}function Rr(e){return 1===e.length?"0"+e:String(e)}function Ir(e,t,n){e=Er(e,255),t=Er(t,255),n=Er(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t<n?6:0);break;case t:o=(n-e)/l+2;break;case n:o=(e-t)/l+4}o/=6}return{h:o,s:a,l:s}}function Mr(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*n*(t-e):n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Pr(e,t,n){e=Er(e,255),t=Er(t,255),n=Er(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=0===r?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t<n?6:0);break;case t:o=(n-e)/s+2;break;case n:o=(e-t)/s+4}o/=6}return{h:o,s:l,v:a}}function Nr(e,t,n,r){var i=[Rr(Math.round(e).toString(16)),Rr(Math.round(t).toString(16)),Rr(Math.round(n).toString(16))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function Lr(e){return Math.round(255*parseFloat(e)).toString(16)}function Tr(e){return Dr(e)/255}function Dr(e){return parseInt(e,16)}var Ar={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Br(e){var t,n,r,i={r:0,g:0,b:0},o=1,a=null,s=null,l=null,c=!1,u=!1;return"string"===typeof e&&(e=function(e){if(e=e.trim().toLowerCase(),0===e.length)return!1;var t=!1;if(Ar[e])e=Ar[e],t=!0;else if("transparent"===e)return{r:0,g:0,b:0,a:0,format:"name"};var n=Fr.rgb.exec(e);if(n)return{r:n[1],g:n[2],b:n[3]};if(n=Fr.rgba.exec(e),n)return{r:n[1],g:n[2],b:n[3],a:n[4]};if(n=Fr.hsl.exec(e),n)return{h:n[1],s:n[2],l:n[3]};if(n=Fr.hsla.exec(e),n)return{h:n[1],s:n[2],l:n[3],a:n[4]};if(n=Fr.hsv.exec(e),n)return{h:n[1],s:n[2],v:n[3]};if(n=Fr.hsva.exec(e),n)return{h:n[1],s:n[2],v:n[3],a:n[4]};if(n=Fr.hex8.exec(e),n)return{r:Dr(n[1]),g:Dr(n[2]),b:Dr(n[3]),a:Tr(n[4]),format:t?"name":"hex8"};if(n=Fr.hex6.exec(e),n)return{r:Dr(n[1]),g:Dr(n[2]),b:Dr(n[3]),format:t?"name":"hex"};if(n=Fr.hex4.exec(e),n)return{r:Dr(n[1]+n[1]),g:Dr(n[2]+n[2]),b:Dr(n[3]+n[3]),a:Tr(n[4]+n[4]),format:t?"name":"hex8"};if(n=Fr.hex3.exec(e),n)return{r:Dr(n[1]+n[1]),g:Dr(n[2]+n[2]),b:Dr(n[3]+n[3]),format:t?"name":"hex"};return!1}(e)),"object"===typeof e&&(Wr(e.r)&&Wr(e.g)&&Wr(e.b)?(t=e.r,n=e.g,r=e.b,i={r:255*Er(t,255),g:255*Er(n,255),b:255*Er(r,255)},c=!0,u="%"===String(e.r).substr(-1)?"prgb":"rgb"):Wr(e.h)&&Wr(e.s)&&Wr(e.v)?(a=$r(e.s),s=$r(e.v),i=function(e,t,n){e=6*Er(e,360),t=Er(t,100),n=Er(n,100);var r=Math.floor(e),i=e-r,o=n*(1-t),a=n*(1-i*t),s=n*(1-(1-i)*t),l=r%6;return{r:255*[n,a,o,o,s,n][l],g:255*[s,n,n,a,o,o][l],b:255*[o,o,s,n,n,a][l]}}(e.h,a,s),c=!0,u="hsv"):Wr(e.h)&&Wr(e.s)&&Wr(e.l)&&(a=$r(e.s),l=$r(e.l),i=function(e,t,n){var r,i,o;if(e=Er(e,360),t=Er(t,100),n=Er(n,100),0===t)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=Mr(s,a,e+1/3),i=Mr(s,a,e),o=Mr(s,a,e-1/3)}return{r:255*r,g:255*i,b:255*o}}(e.h,a,l),c=!0,u="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(o=e.a)),o=Or(o),{ok:c,format:e.format||u,r:Math.min(255,Math.max(i.r,0)),g:Math.min(255,Math.max(i.g,0)),b:Math.min(255,Math.max(i.b,0)),a:o}}var jr="(?:".concat("[-\\+]?\\d*\\.\\d+%?",")|(?:").concat("[-\\+]?\\d+%?",")"),zr="[\\s|\\(]+(".concat(jr,")[,|\\s]+(").concat(jr,")[,|\\s]+(").concat(jr,")\\s*\\)?"),Hr="[\\s|\\(]+(".concat(jr,")[,|\\s]+(").concat(jr,")[,|\\s]+(").concat(jr,")[,|\\s]+(").concat(jr,")\\s*\\)?"),Fr={CSS_UNIT:new RegExp(jr),rgb:new RegExp("rgb"+zr),rgba:new RegExp("rgba"+Hr),hsl:new RegExp("hsl"+zr),hsla:new RegExp("hsla"+Hr),hsv:new RegExp("hsv"+zr),hsva:new RegExp("hsva"+Hr),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Wr(e){return Boolean(Fr.CSS_UNIT.exec(String(e)))}var Kr=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function Vr(e){var t=Pr(e.r,e.g,e.b);return{h:360*t.h,s:t.s,v:t.v}}function Ur(e){var t=e.r,n=e.g,r=e.b;return"#".concat(Nr(t,n,r,!1))}function qr(e,t,n){var r;return(r=Math.round(e.h)>=60&&Math.round(e.h)<=240?n?Math.round(e.h)-2*t:Math.round(e.h)+2*t:n?Math.round(e.h)+2*t:Math.round(e.h)-2*t)<0?r+=360:r>=360&&(r-=360),r}function Xr(e,t,n){return 0===e.h&&0===e.s?e.s:((r=n?e.s-.16*t:4===t?e.s+.16:e.s+.05*t)>1&&(r=1),n&&5===t&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2)));var r}function Gr(e,t,n){var r;return(r=n?e.v+.05*t:e.v-.15*t)>1&&(r=1),Number(r.toFixed(2))}function Yr(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=Br(e),i=5;i>0;i-=1){var o=Vr(r),a=Ur(Br({h:qr(o,i,!0),s:Xr(o,i,!0),v:Gr(o,i,!0)}));n.push(a)}n.push(Ur(r));for(var s=1;s<=4;s+=1){var l=Vr(r),c=Ur(Br({h:qr(l,s),s:Xr(l,s),v:Gr(l,s)}));n.push(c)}return"dark"===t.theme?Kr.map((function(e){var r=e.index,i=e.opacity;return Ur(function(e,t,n){var r=n/100;return{r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b}}(Br(t.backgroundColor||"#141414"),Br(n[r]),100*i))})):n}var Qr={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Jr=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];Jr.primary=Jr[5];var Zr=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];Zr.primary=Zr[5];var ei=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];ei.primary=ei[5];var ti=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];ti.primary=ti[5];var ni=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];ni.primary=ni[5];var ri=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];ri.primary=ri[5];var ii=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];ii.primary=ii[5];var oi=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];oi.primary=oi[5];var ai=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];ai.primary=ai[5];var si=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];si.primary=si[5];var li=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];li.primary=li[5];var ci=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];ci.primary=ci[5];var ui=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];ui.primary=ui[5];var di={red:Jr,volcano:Zr,orange:ei,gold:ti,yellow:ni,lime:ri,green:ii,cyan:oi,blue:ai,geekblue:si,purple:li,magenta:ci,grey:ui},hi=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];hi.primary=hi[5];var fi=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];fi.primary=fi[5];var pi=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];pi.primary=pi[5];var mi=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];mi.primary=mi[5];var gi=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];gi.primary=gi[5];var vi=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];vi.primary=vi[5];var bi=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];bi.primary=bi[5];var yi=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];yi.primary=yi[5];var _i=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];_i.primary=_i[5];var Si=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];Si.primary=Si[5];var wi=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];wi.primary=wi[5];var Ci=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];Ci.primary=Ci[5];var xi=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];xi.primary=xi[5];const Ei={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},ki=Object.assign(Object.assign({},Ei),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,\n'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',\n'Noto Color Emoji'",fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0});var Oi=function(){function e(t,n){var r;if(void 0===t&&(t=""),void 0===n&&(n={}),t instanceof e)return t;"number"===typeof t&&(t=function(e){return{r:e>>16,g:(65280&e)>>8,b:255&e}}(t)),this.originalInput=t;var i=Br(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=null!==(r=n.format)&&void 0!==r?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},e.prototype.getLuminance=function(){var e=this.toRgb(),t=e.r/255,n=e.g/255,r=e.b/255;return.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(e){return this.a=Or(e),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){return 0===this.toHsl().s},e.prototype.toHsv=function(){var e=Pr(this.r,this.g,this.b);return{h:360*e.h,s:e.s,v:e.v,a:this.a}},e.prototype.toHsvString=function(){var e=Pr(this.r,this.g,this.b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.v);return 1===this.a?"hsv(".concat(t,", ").concat(n,"%, ").concat(r,"%)"):"hsva(".concat(t,", ").concat(n,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var e=Ir(this.r,this.g,this.b);return{h:360*e.h,s:e.s,l:e.l,a:this.a}},e.prototype.toHslString=function(){var e=Ir(this.r,this.g,this.b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.l);return 1===this.a?"hsl(".concat(t,", ").concat(n,"%, ").concat(r,"%)"):"hsla(".concat(t,", ").concat(n,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(e){return void 0===e&&(e=!1),Nr(this.r,this.g,this.b,e)},e.prototype.toHexString=function(e){return void 0===e&&(e=!1),"#"+this.toHex(e)},e.prototype.toHex8=function(e){return void 0===e&&(e=!1),function(e,t,n,r,i){var o=[Rr(Math.round(e).toString(16)),Rr(Math.round(t).toString(16)),Rr(Math.round(n).toString(16)),Rr(Lr(r))];return i&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))&&o[3].startsWith(o[3].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}(this.r,this.g,this.b,this.a,e)},e.prototype.toHex8String=function(e){return void 0===e&&(e=!1),"#"+this.toHex8(e)},e.prototype.toHexShortString=function(e){return void 0===e&&(e=!1),1===this.a?this.toHexString(e):this.toHex8String(e)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var e=Math.round(this.r),t=Math.round(this.g),n=Math.round(this.b);return 1===this.a?"rgb(".concat(e,", ").concat(t,", ").concat(n,")"):"rgba(".concat(e,", ").concat(t,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var e=function(e){return"".concat(Math.round(100*Er(e,255)),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var e=function(e){return Math.round(100*Er(e,255))};return 1===this.a?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(0===this.a)return"transparent";if(this.a<1)return!1;for(var e="#"+Nr(this.r,this.g,this.b,!1),t=0,n=Object.entries(Ar);t<n.length;t++){var r=n[t],i=r[0];if(e===r[1])return i}return!1},e.prototype.toString=function(e){var t=Boolean(e);e=null!==e&&void 0!==e?e:this.format;var n=!1,r=this.a<1&&this.a>=0;return t||!r||!e.startsWith("hex")&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this.a?this.toName():this.toRgbString()},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=kr(n.l),new e(n)},e.prototype.brighten=function(t){void 0===t&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-t/100*255))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-t/100*255))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-t/100*255))),new e(n)},e.prototype.darken=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=kr(n.l),new e(n)},e.prototype.tint=function(e){return void 0===e&&(e=10),this.mix("white",e)},e.prototype.shade=function(e){return void 0===e&&(e=10),this.mix("black",e)},e.prototype.desaturate=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=kr(n.s),new e(n)},e.prototype.saturate=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=kr(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){void 0===n&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100;return new e({r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a})},e.prototype.analogous=function(t,n){void 0===t&&(t=6),void 0===n&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){void 0===t&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb(),i=n.a+r.a*(1-n.a);return new e({r:(n.r*n.a+r.r*r.a*(1-n.a))/i,g:(n.g*n.a+r.g*r.a*(1-n.a))/i,b:(n.b*n.a+r.b*r.a*(1-n.a))/i,a:i})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;a<t;a++)i.push(new e({h:(r+a*o)%360,s:n.s,l:n.l}));return i},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();const $i=e=>{let t=e,n=e,r=e,i=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?n=4:e<8&&e>=7?n=5:e<14&&e>=8?n=6:e<16&&e>=14?n=7:e>=16&&(n=8),e<6&&e>=2?r=1:e>=6&&(r=2),e>4&&e<8?i=4:e>=8&&(i=6),{borderRadius:e,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:i}};const Ri=e=>{const{controlHeight:t}=e;return{controlHeightSM:.75*t,controlHeightXS:.5*t,controlHeightLG:1.25*t}};function Ii(e){return(e+8)/e}const Mi=e=>{const t=function(e){const t=new Array(10).fill(null).map(((t,n)=>{const r=n-1,i=e*Math.pow(Math.E,r/5),o=n>1?Math.floor(i):Math.ceil(i);return 2*Math.floor(o/2)}));return t[1]=e,t.map((e=>({size:e,lineHeight:Ii(e)})))}(e),n=t.map((e=>e.size)),r=t.map((e=>e.lineHeight)),i=n[1],o=n[0],a=n[2],s=r[1],l=r[0],c=r[2];return{fontSizeSM:o,fontSize:i,fontSizeLG:a,fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:s,lineHeightLG:c,lineHeightSM:l,fontHeight:Math.round(s*i),fontHeightLG:Math.round(c*a),fontHeightSM:Math.round(l*o),lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}};const Pi=(e,t)=>new Oi(e).setAlpha(t).toRgbString(),Ni=(e,t)=>new Oi(e).darken(t).toHexString(),Li=e=>{const t=Yr(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},Ti=(e,t)=>{const n=e||"#fff",r=t||"#000";return{colorBgBase:n,colorTextBase:r,colorText:Pi(r,.88),colorTextSecondary:Pi(r,.65),colorTextTertiary:Pi(r,.45),colorTextQuaternary:Pi(r,.25),colorFill:Pi(r,.15),colorFillSecondary:Pi(r,.06),colorFillTertiary:Pi(r,.04),colorFillQuaternary:Pi(r,.02),colorBgSolid:Pi(r,1),colorBgSolidHover:Pi(r,.75),colorBgSolidActive:Pi(r,.95),colorBgLayout:Ni(n,4),colorBgContainer:Ni(n,0),colorBgElevated:Ni(n,0),colorBgSpotlight:Pi(r,.85),colorBgBlur:"transparent",colorBorder:Ni(n,15),colorBorderSecondary:Ni(n,6)}};const Di=Ct((function(e){Qr.pink=Qr.magenta,di.pink=di.magenta;const t=Object.keys(Ei).map((t=>{const n=e[t]===Qr[t]?di[t]:Yr(e[t]);return new Array(10).fill(1).reduce(((e,r,i)=>(e[`${t}-${i+1}`]=n[i],e[`${t}${i+1}`]=n[i],e)),{})})).reduce(((e,t)=>e=Object.assign(Object.assign({},e),t)),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),t),function(e,t){let{generateColorPalettes:n,generateNeutralColorPalettes:r}=t;const{colorSuccess:i,colorWarning:o,colorError:a,colorInfo:s,colorPrimary:l,colorBgBase:c,colorTextBase:u}=e,d=n(l),h=n(i),f=n(o),p=n(a),m=n(s),g=r(c,u),v=n(e.colorLink||e.colorInfo),b=new Oi(p[1]).mix(new Oi(p[3]),50).toHexString();return Object.assign(Object.assign({},g),{colorPrimaryBg:d[1],colorPrimaryBgHover:d[2],colorPrimaryBorder:d[3],colorPrimaryBorderHover:d[4],colorPrimaryHover:d[5],colorPrimary:d[6],colorPrimaryActive:d[7],colorPrimaryTextHover:d[8],colorPrimaryText:d[9],colorPrimaryTextActive:d[10],colorSuccessBg:h[1],colorSuccessBgHover:h[2],colorSuccessBorder:h[3],colorSuccessBorderHover:h[4],colorSuccessHover:h[4],colorSuccess:h[6],colorSuccessActive:h[7],colorSuccessTextHover:h[8],colorSuccessText:h[9],colorSuccessTextActive:h[10],colorErrorBg:p[1],colorErrorBgHover:p[2],colorErrorBgFilledHover:b,colorErrorBgActive:p[3],colorErrorBorder:p[3],colorErrorBorderHover:p[4],colorErrorHover:p[5],colorError:p[6],colorErrorActive:p[7],colorErrorTextHover:p[8],colorErrorText:p[9],colorErrorTextActive:p[10],colorWarningBg:f[1],colorWarningBgHover:f[2],colorWarningBorder:f[3],colorWarningBorderHover:f[4],colorWarningHover:f[4],colorWarning:f[6],colorWarningActive:f[7],colorWarningTextHover:f[8],colorWarningText:f[9],colorWarningTextActive:f[10],colorInfoBg:m[1],colorInfoBgHover:m[2],colorInfoBorder:m[3],colorInfoBorderHover:m[4],colorInfoHover:m[4],colorInfo:m[6],colorInfoActive:m[7],colorInfoTextHover:m[8],colorInfoText:m[9],colorInfoTextActive:m[10],colorLinkHover:v[4],colorLink:v[6],colorLinkActive:v[7],colorBgMask:new Oi("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"})}(e,{generateColorPalettes:Li,generateNeutralColorPalettes:Ti})),Mi(e.fontSize)),function(e){const{sizeUnit:t,sizeStep:n}=e;return{sizeXXL:t*(n+8),sizeXL:t*(n+4),sizeLG:t*(n+2),sizeMD:t*(n+1),sizeMS:t*n,size:t*n,sizeSM:t*(n-1),sizeXS:t*(n-2),sizeXXS:t*(n-3)}}(e)),Ri(e)),function(e){const{motionUnit:t,motionBase:n,borderRadius:r,lineWidth:i}=e;return Object.assign({motionDurationFast:`${(n+t).toFixed(1)}s`,motionDurationMid:`${(n+2*t).toFixed(1)}s`,motionDurationSlow:`${(n+3*t).toFixed(1)}s`,lineWidthBold:i+1},$i(r))}(e))})),Ai={token:ki,override:{override:ki},hashed:!0},Bi=e.createContext(Ai),ji=`-ant-${Date.now()}-${Math.random()}`;function zi(e,t){const n=function(e,t){const n={},r=(e,t)=>{let n=e.clone();return n=(null===t||void 0===t?void 0:t(n))||n,n.toRgbString()},i=(e,t)=>{const i=new Oi(e),o=Yr(i.toRgbString());n[`${t}-color`]=r(i),n[`${t}-color-disabled`]=o[1],n[`${t}-color-hover`]=o[4],n[`${t}-color-active`]=o[6],n[`${t}-color-outline`]=i.clone().setAlpha(.2).toRgbString(),n[`${t}-color-deprecated-bg`]=o[0],n[`${t}-color-deprecated-border`]=o[2]};if(t.primaryColor){i(t.primaryColor,"primary");const e=new Oi(t.primaryColor),o=Yr(e.toRgbString());o.forEach(((e,t)=>{n[`primary-${t+1}`]=e})),n["primary-color-deprecated-l-35"]=r(e,(e=>e.lighten(35))),n["primary-color-deprecated-l-20"]=r(e,(e=>e.lighten(20))),n["primary-color-deprecated-t-20"]=r(e,(e=>e.tint(20))),n["primary-color-deprecated-t-50"]=r(e,(e=>e.tint(50))),n["primary-color-deprecated-f-12"]=r(e,(e=>e.setAlpha(.12*e.getAlpha())));const a=new Oi(o[0]);n["primary-color-active-deprecated-f-30"]=r(a,(e=>e.setAlpha(.3*e.getAlpha()))),n["primary-color-active-deprecated-d-02"]=r(a,(e=>e.darken(2)))}return t.successColor&&i(t.successColor,"success"),t.warningColor&&i(t.warningColor,"warning"),t.errorColor&&i(t.errorColor,"error"),t.infoColor&&i(t.infoColor,"info"),`\n :root {\n ${Object.keys(n).map((t=>`--${e}-${t}: ${n[t]};`)).join("\n")}\n }\n `.trim()}(e,t);ze()&&Qe(n,`${ji}-dynamic-theme`)}const Hi=e.createContext(!1),Fi=t=>{let{children:n,disabled:r}=t;const i=e.useContext(Hi);return e.createElement(Hi.Provider,{value:null!==r&&void 0!==r?r:i},n)},Wi=Hi,Ki=e.createContext(void 0),Vi=t=>{let{children:n,size:r}=t;const i=e.useContext(Ki);return e.createElement(Ki.Provider,{value:r||i},n)},Ui=Ki;const qi=function(){return{componentDisabled:(0,e.useContext)(Wi),componentSize:(0,e.useContext)(Ui)}},Xi=Object.assign({},t),{useId:Gi}=Xi,Yi="undefined"===typeof Gi?()=>"":Gi;var Qi=n(139),Ji=n.n(Qi);function Zi(e){return e instanceof HTMLElement||e instanceof SVGElement}function eo(e){return e&&"object"===le(e)&&Zi(e.nativeElement)?e.nativeElement:Zi(e)?e:null}function to(t){var n,r=eo(t);return r||(t instanceof e.Component?null===(n=ve.findDOMNode)||void 0===n?void 0:n.call(ve,t):null)}var no=n(816),ro=function(e,t){"function"===typeof e?e(t):"object"===le(e)&&e&&"current"in e&&(e.current=t)},io=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.filter(Boolean);return r.length<=1?r[0]:function(e){t.forEach((function(t){ro(t,e)}))}},oo=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Je((function(){return io.apply(void 0,t)}),t,(function(e,t){return e.length!==t.length||e.every((function(e,n){return e!==t[n]}))}))},ao=function(e){var t,n,r=(0,no.isMemo)(e)?e.type.type:e.type;return!!("function"!==typeof r||null!==(t=r.prototype)&&void 0!==t&&t.render||r.$$typeof===no.ForwardRef)&&!!("function"!==typeof e||null!==(n=e.prototype)&&void 0!==n&&n.render||e.$$typeof===no.ForwardRef)};function so(t){return(0,e.isValidElement)(t)&&!(0,no.isFragment)(t)}Number(e.version.split(".")[0]);function lo(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var co=["children"],uo=e.createContext({});function ho(t){var n=t.children,r=lo(t,co);return e.createElement(uo.Provider,{value:r},n)}function fo(e,t){return fo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},fo(e,t)}function po(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fo(e,t)}function mo(e){return mo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},mo(e)}function go(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(go=function(){return!!e})()}function vo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bo(e){var t=go();return function(){var n,r=mo(e);if(t){var i=mo(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==le(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return vo(e)}(this,n)}}const yo=function(e){po(n,e);var t=bo(n);function n(){return st(this,n),t.apply(this,arguments)}return ct(n,[{key:"render",value:function(){return this.props.children}}]),n}(e.Component);function _o(t){var n=e.useRef();n.current=t;var r=e.useCallback((function(){for(var e,t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return null===(e=n.current)||void 0===e?void 0:e.call.apply(e,[n].concat(r))}),[]);return r}function So(t){var n=e.useRef(!1),r=Be(e.useState(t),2),i=r[0],o=r[1];return e.useEffect((function(){return n.current=!1,function(){n.current=!0}}),[]),[i,function(e,t){t&&n.current||o(e)}]}function wo(e){return void 0!==e}function Co(e,t){var n=t||{},r=n.defaultValue,i=n.value,o=n.onChange,a=n.postState,s=Be(So((function(){return wo(i)?i:wo(r)?"function"===typeof r?r():r:"function"===typeof e?e():e})),2),l=s[0],c=s[1],u=void 0!==i?i:l,d=a?a(u):u,h=_o(o),f=Be(So([u]),2),p=f[0],m=f[1];return At((function(){var e=p[0];l!==e&&h(l,e)}),[p]),At((function(){wo(i)||c(i)}),[i]),[d,_o((function(e,t){c(e,t),m([u],t)}))]}var xo="none",Eo="appear",ko="enter",Oo="leave",$o="none",Ro="prepare",Io="start",Mo="active",Po="end",No="prepared";function Lo(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}var To=function(e,t){var n={animationend:Lo("Animation","AnimationEnd"),transitionend:Lo("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}(ze(),"undefined"!==typeof window?window:{}),Do={};if(ze()){var Ao=document.createElement("div");Do=Ao.style}var Bo={};function jo(e){if(Bo[e])return Bo[e];var t=To[e];if(t)for(var n=Object.keys(t),r=n.length,i=0;i<r;i+=1){var o=n[i];if(Object.prototype.hasOwnProperty.call(t,o)&&o in Do)return Bo[e]=t[o],Bo[e]}return""}var zo=jo("animationend"),Ho=jo("transitionend"),Fo=!(!zo||!Ho),Wo=zo||"animationend",Ko=Ho||"transitionend";function Vo(e,t){return e?"object"===le(e)?e[t.replace(/-\w/g,(function(e){return e[1].toUpperCase()}))]:"".concat(e,"-").concat(t):null}const Uo=ze()?e.useLayoutEffect:e.useEffect;var qo=function(e){return+setTimeout(e,16)},Xo=function(e){return clearTimeout(e)};"undefined"!==typeof window&&"requestAnimationFrame"in window&&(qo=function(e){return window.requestAnimationFrame(e)},Xo=function(e){return window.cancelAnimationFrame(e)});var Go=0,Yo=new Map;function Qo(e){Yo.delete(e)}var Jo=function(e){var t=Go+=1;return function n(r){if(0===r)Qo(t),e();else{var i=qo((function(){n(r-1)}));Yo.set(t,i)}}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),t};Jo.cancel=function(e){var t=Yo.get(e);return Qo(e),Xo(t)};const Zo=Jo;var ea=[Ro,Io,Mo,Po],ta=[Ro,No],na=!1;function ra(e){return e===Mo||e===Po}const ia=function(t,n,r){var i=Be(So($o),2),o=i[0],a=i[1],s=function(){var t=e.useRef(null);function n(){Zo.cancel(t.current)}return e.useEffect((function(){return function(){n()}}),[]),[function e(r){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;n();var o=Zo((function(){i<=1?r({isCanceled:function(){return o!==t.current}}):e(r,i-1)}));t.current=o},n]}(),l=Be(s,2),c=l[0],u=l[1];var d=n?ta:ea;return Uo((function(){if(o!==$o&&o!==Po){var e=d.indexOf(o),t=d[e+1],n=r(o);n===na?a(t,!0):t&&c((function(e){function r(){e.isCanceled()||a(t,!0)}!0===n?r():Promise.resolve(n).then(r)}))}}),[t,o]),e.useEffect((function(){return function(){u()}}),[]),[function(){a(Ro,!0)},o]};function oa(t,n,r,i){var o=i.motionEnter,a=void 0===o||o,s=i.motionAppear,l=void 0===s||s,c=i.motionLeave,u=void 0===c||c,d=i.motionDeadline,h=i.motionLeaveImmediately,f=i.onAppearPrepare,p=i.onEnterPrepare,m=i.onLeavePrepare,g=i.onAppearStart,v=i.onEnterStart,b=i.onLeaveStart,y=i.onAppearActive,_=i.onEnterActive,S=i.onLeaveActive,w=i.onAppearEnd,C=i.onEnterEnd,x=i.onLeaveEnd,E=i.onVisibleChanged,k=Be(So(),2),O=k[0],$=k[1],R=function(t){var n=Be(e.useReducer((function(e){return e+1}),0),2)[1],r=e.useRef(t);return[_o((function(){return r.current})),_o((function(e){r.current="function"===typeof e?e(r.current):e,n()}))]}(xo),I=Be(R,2),M=I[0],P=I[1],N=Be(So(null),2),L=N[0],T=N[1],D=M(),A=(0,e.useRef)(!1),B=(0,e.useRef)(null);function j(){return r()}var z=(0,e.useRef)(!1);function H(){P(xo),T(null,!0)}var F=_o((function(e){var t=M();if(t!==xo){var n=j();if(!e||e.deadline||e.target===n){var r,i=z.current;t===Eo&&i?r=null===w||void 0===w?void 0:w(n,e):t===ko&&i?r=null===C||void 0===C?void 0:C(n,e):t===Oo&&i&&(r=null===x||void 0===x?void 0:x(n,e)),i&&!1!==r&&H()}}})),W=function(t){var n=(0,e.useRef)();function r(e){e&&(e.removeEventListener(Ko,t),e.removeEventListener(Wo,t))}return e.useEffect((function(){return function(){r(n.current)}}),[]),[function(e){n.current&&n.current!==e&&r(n.current),e&&e!==n.current&&(e.addEventListener(Ko,t),e.addEventListener(Wo,t),n.current=e)},r]}(F),K=Be(W,1)[0],V=function(e){switch(e){case Eo:return fe(fe(fe({},Ro,f),Io,g),Mo,y);case ko:return fe(fe(fe({},Ro,p),Io,v),Mo,_);case Oo:return fe(fe(fe({},Ro,m),Io,b),Mo,S);default:return{}}},U=e.useMemo((function(){return V(D)}),[D]),q=Be(ia(D,!t,(function(e){if(e===Ro){var t=U[Ro];return t?t(j()):na}var n;G in U&&T((null===(n=U[G])||void 0===n?void 0:n.call(U,j(),null))||null);return G===Mo&&D!==xo&&(K(j()),d>0&&(clearTimeout(B.current),B.current=setTimeout((function(){F({deadline:!0})}),d))),G===No&&H(),true})),2),X=q[0],G=q[1],Y=ra(G);z.current=Y,Uo((function(){$(n);var e,r=A.current;A.current=!0,!r&&n&&l&&(e=Eo),r&&n&&a&&(e=ko),(r&&!n&&u||!r&&h&&!n&&u)&&(e=Oo);var i=V(e);e&&(t||i[Ro])?(P(e),X()):P(xo)}),[n]),(0,e.useEffect)((function(){(D===Eo&&!l||D===ko&&!a||D===Oo&&!u)&&P(xo)}),[l,a,u]),(0,e.useEffect)((function(){return function(){A.current=!1,clearTimeout(B.current)}}),[]);var Q=e.useRef(!1);(0,e.useEffect)((function(){O&&(Q.current=!0),void 0!==O&&D===xo&&((Q.current||O)&&(null===E||void 0===E||E(O)),Q.current=!0)}),[O,D]);var J=L;return U[Ro]&&G===Io&&(J=me({transition:"none"},J)),[D,G,J,null!==O&&void 0!==O?O:n]}const aa=function(t){var n=t;"object"===le(t)&&(n=t.transitionSupport);var r=e.forwardRef((function(t,r){var i=t.visible,o=void 0===i||i,a=t.removeOnLeave,s=void 0===a||a,l=t.forceRender,c=t.children,u=t.motionName,d=t.leavedClassName,h=t.eventProps,f=function(e,t){return!(!e.motionName||!n||!1===t)}(t,e.useContext(uo).motion),p=(0,e.useRef)(),m=(0,e.useRef)();var g=Be(oa(f,o,(function(){try{return p.current instanceof HTMLElement?p.current:to(m.current)}catch(rI){return null}}),t),4),v=g[0],b=g[1],y=g[2],_=g[3],S=e.useRef(_);_&&(S.current=!0);var w,C=e.useCallback((function(e){p.current=e,ro(r,e)}),[r]),x=me(me({},h),{},{visible:o});if(c)if(v===xo)w=_?c(me({},x),C):!s&&S.current&&d?c(me(me({},x),{},{className:d}),C):l||!s&&!d?c(me(me({},x),{},{style:{display:"none"}}),C):null;else{var E;b===Ro?E="prepare":ra(b)?E="active":b===Io&&(E="start");var k=Vo(u,"".concat(v,"-").concat(E));w=c(me(me({},x),{},{className:Ji()(Vo(u,v),fe(fe({},k,k&&E),u,"string"===typeof u)),style:y}),C)}else w=null;e.isValidElement(w)&&ao(w)&&(w.ref||(w=e.cloneElement(w,{ref:C})));return e.createElement(yo,{ref:m},w)}));return r.displayName="CSSMotion",r}(Fo);var sa="add",la="keep",ca="remove",ua="removed";function da(e){var t;return me(me({},t=e&&"object"===le(e)&&"key"in e?e:{key:e}),{},{key:String(t.key)})}function ha(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(da)}var fa=["component","children","onVisibleChanged","onAllRemoved"],pa=["status"],ma=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];const ga=function(){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:aa,n=function(n){po(i,n);var r=bo(i);function i(){var e;st(this,i);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return fe(vo(e=r.call.apply(r,[this].concat(n))),"state",{keyEntities:[]}),fe(vo(e),"removeKey",(function(t){e.setState((function(e){return{keyEntities:e.keyEntities.map((function(e){return e.key!==t?e:me(me({},e),{},{status:ua})}))}}),(function(){0===e.state.keyEntities.filter((function(e){return e.status!==ua})).length&&e.props.onAllRemoved&&e.props.onAllRemoved()}))})),e}return ct(i,[{key:"render",value:function(){var n=this,r=this.state.keyEntities,i=this.props,o=i.component,a=i.children,s=i.onVisibleChanged,l=(i.onAllRemoved,lo(i,fa)),c=o||e.Fragment,u={};return ma.forEach((function(e){u[e]=l[e],delete l[e]})),delete l.keys,e.createElement(c,l,r.map((function(r,i){var o=r.status,l=lo(r,pa),c=o===sa||o===la;return e.createElement(t,Gt({},u,{key:l.key,visible:c,eventProps:l,onVisibleChanged:function(e){null===s||void 0===s||s(e,{key:l.key}),e||n.removeKey(l.key)}}),(function(e,t){return a(me(me({},e),{},{index:i}),t)}))})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.keys,r=t.keyEntities,i=ha(n),o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=0,i=t.length,o=ha(e),a=ha(t);o.forEach((function(e){for(var t=!1,o=r;o<i;o+=1){var s=a[o];if(s.key===e.key){r<o&&(n=n.concat(a.slice(r,o).map((function(e){return me(me({},e),{},{status:sa})}))),r=o),n.push(me(me({},s),{},{status:la})),r+=1,t=!0;break}}t||n.push(me(me({},e),{},{status:ca}))})),r<i&&(n=n.concat(a.slice(r).map((function(e){return me(me({},e),{},{status:sa})}))));var s={};return n.forEach((function(e){var t=e.key;s[t]=(s[t]||0)+1})),Object.keys(s).filter((function(e){return s[e]>1})).forEach((function(e){(n=n.filter((function(t){var n=t.key,r=t.status;return n!==e||r!==ca}))).forEach((function(t){t.key===e&&(t.status=la)}))})),n}(r,i);return{keyEntities:o.filter((function(e){var t=r.find((function(t){var n=t.key;return e.key===n}));return!t||t.status!==ua||e.status!==ca}))}}}]),i}(e.Component);return fe(n,"defaultProps",{component:"div"}),n}(Fo),va=aa;function ba(e){return e>=0&&e<=255}const ya=function(e,t){const{r:n,g:r,b:i,a:o}=new Oi(e).toRgb();if(o<1)return e;const{r:a,g:s,b:l}=new Oi(t).toRgb();for(let c=.01;c<=1;c+=.01){const e=Math.round((n-a*(1-c))/c),t=Math.round((r-s*(1-c))/c),o=Math.round((i-l*(1-c))/c);if(ba(e)&&ba(t)&&ba(o))return new Oi({r:e,g:t,b:o,a:Math.round(100*c)/100}).toRgbString()}return new Oi({r:n,g:r,b:i,a:1}).toRgbString()};var _a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Sa(e){const{override:t}=e,n=_a(e,["override"]),r=Object.assign({},t);Object.keys(ki).forEach((e=>{delete r[e]}));const i=Object.assign(Object.assign({},n),r),o=1200,a=1600;if(!1===i.motion){const e="0s";i.motionDurationFast=e,i.motionDurationMid=e,i.motionDurationSlow=e}return Object.assign(Object.assign(Object.assign({},i),{colorFillContent:i.colorFillSecondary,colorFillContentHover:i.colorFill,colorFillAlter:i.colorFillQuaternary,colorBgContainerDisabled:i.colorFillTertiary,colorBorderBg:i.colorBgContainer,colorSplit:ya(i.colorBorderSecondary,i.colorBgContainer),colorTextPlaceholder:i.colorTextQuaternary,colorTextDisabled:i.colorTextQuaternary,colorTextHeading:i.colorText,colorTextLabel:i.colorTextSecondary,colorTextDescription:i.colorTextTertiary,colorTextLightSolid:i.colorWhite,colorHighlight:i.colorError,colorBgTextHover:i.colorFillSecondary,colorBgTextActive:i.colorFill,colorIcon:i.colorTextTertiary,colorIconHover:i.colorText,colorErrorOutline:ya(i.colorErrorBg,i.colorBgContainer),colorWarningOutline:ya(i.colorWarningBg,i.colorBgContainer),fontSizeIcon:i.fontSizeSM,lineWidthFocus:3*i.lineWidth,lineWidth:i.lineWidth,controlOutlineWidth:2*i.lineWidth,controlInteractiveSize:i.controlHeight/2,controlItemBgHover:i.colorFillTertiary,controlItemBgActive:i.colorPrimaryBg,controlItemBgActiveHover:i.colorPrimaryBgHover,controlItemBgActiveDisabled:i.colorFill,controlTmpOutline:i.colorFillQuaternary,controlOutline:ya(i.colorPrimaryBg,i.colorBgContainer),lineType:i.lineType,borderRadius:i.borderRadius,borderRadiusXS:i.borderRadiusXS,borderRadiusSM:i.borderRadiusSM,borderRadiusLG:i.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:i.sizeXXS,paddingXS:i.sizeXS,paddingSM:i.sizeSM,padding:i.size,paddingMD:i.sizeMD,paddingLG:i.sizeLG,paddingXL:i.sizeXL,paddingContentHorizontalLG:i.sizeLG,paddingContentVerticalLG:i.sizeMS,paddingContentHorizontal:i.sizeMS,paddingContentVertical:i.sizeSM,paddingContentHorizontalSM:i.size,paddingContentVerticalSM:i.sizeXS,marginXXS:i.sizeXXS,marginXS:i.sizeXS,marginSM:i.sizeSM,margin:i.size,marginMD:i.sizeMD,marginLG:i.sizeLG,marginXL:i.sizeXL,marginXXL:i.sizeXXL,boxShadow:"\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowSecondary:"\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowTertiary:"\n 0 1px 2px 0 rgba(0, 0, 0, 0.03),\n 0 1px 6px -1px rgba(0, 0, 0, 0.02),\n 0 2px 4px 0 rgba(0, 0, 0, 0.02)\n ",screenXS:480,screenXSMin:480,screenXSMax:575,screenSM:576,screenSMMin:576,screenSMMax:767,screenMD:768,screenMDMin:768,screenMDMax:991,screenLG:992,screenLGMin:992,screenLGMax:1199,screenXL:o,screenXLMin:o,screenXLMax:1599,screenXXL:a,screenXXLMin:a,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:`\n 0 1px 2px -2px ${new Oi("rgba(0, 0, 0, 0.16)").toRgbString()},\n 0 3px 6px 0 ${new Oi("rgba(0, 0, 0, 0.12)").toRgbString()},\n 0 5px 12px 4px ${new Oi("rgba(0, 0, 0, 0.09)").toRgbString()}\n `,boxShadowDrawerRight:"\n -6px 0 16px 0 rgba(0, 0, 0, 0.08),\n -3px 0 6px -4px rgba(0, 0, 0, 0.12),\n -9px 0 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowDrawerLeft:"\n 6px 0 16px 0 rgba(0, 0, 0, 0.08),\n 3px 0 6px -4px rgba(0, 0, 0, 0.12),\n 9px 0 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowDrawerUp:"\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowDrawerDown:"\n 0 -6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 -3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 -9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),r)}var wa=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const Ca={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},xa={size:!0,sizeSM:!0,sizeLG:!0,sizeMD:!0,sizeXS:!0,sizeXXS:!0,sizeMS:!0,sizeXL:!0,sizeXXL:!0,sizeUnit:!0,sizeStep:!0,motionBase:!0,motionUnit:!0},Ea={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},ka=(e,t,n)=>{const r=n.getDerivativeToken(e),{override:i}=t,o=wa(t,["override"]);let a=Object.assign(Object.assign({},r),{override:i});return a=Sa(a),o&&Object.entries(o).forEach((e=>{let[t,n]=e;const{theme:r}=n,i=wa(n,["theme"]);let o=i;r&&(o=ka(Object.assign(Object.assign({},a),i),{override:i},r)),a[t]=o})),a};function Oa(){const{token:t,hashed:n,theme:r,override:i,cssVar:o}=e.useContext(Bi),a=`5.22.1-${n||""}`,s=r||Di,[l,c,u]=Xt(s,[ki,t],{salt:a,override:i,getComputedToken:ka,formatToken:Sa,cssVar:o&&{prefix:o.prefix,key:o.key,unitless:Ca,ignore:xa,preserve:Ea}});return[s,u,n?c:"",l,o]}function $a(t){const{children:n}=t,[,r]=Oa(),{motion:i}=r,o=e.useRef(!1);return o.current=o.current||!1===i,o.current?e.createElement(ho,{motion:i},n):n}const Ra=()=>null,Ia={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},Ma=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:t?"inherit":e.fontFamily}},Pa=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active, &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),Na=e=>({outline:`${It(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:1,transition:"outline-offset 0s, outline 0s"}),La=e=>({"&:focus-visible":Object.assign({},Na(e))}),Ta=e=>Object.assign(Object.assign({color:e.colorLink,textDecoration:e.linkDecoration,outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,border:0,padding:0,background:"none",userSelect:"none"},La(e)),{"&:focus, &:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive}}),Da=(e,t)=>{const[n,r]=Oa();return Gn({theme:n,token:r,hashId:"",path:["ant-design-icons",e],nonce:()=>null===t||void 0===t?void 0:t.nonce,layer:{name:"antd"}},(()=>[{[`.${e}`]:Object.assign(Object.assign({},{display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),{[`.${e} .${e}-icon`]:{display:"block"}})}]))};var Aa=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const Ba=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let ja,za,Ha,Fa;function Wa(){return ja||Me}function Ka(){return za||Pe}const Va=()=>({getPrefixCls:(e,t)=>t||(e?`${Wa()}-${e}`:Wa()),getIconPrefixCls:Ka,getRootPrefixCls:()=>ja||Wa(),getTheme:()=>Ha,holderRender:Fa}),Ua=t=>{const{children:n,csp:r,autoInsertSpaceInButton:i,alert:o,anchor:a,form:s,locale:l,componentSize:c,direction:u,space:d,splitter:h,virtual:f,dropdownMatchSelectWidth:p,popupMatchSelectWidth:m,popupOverflow:g,legacyLocale:v,parentContext:b,iconPrefixCls:y,theme:_,componentDisabled:S,segmented:w,statistic:C,spin:x,calendar:E,carousel:k,cascader:O,collapse:$,typography:R,checkbox:I,descriptions:M,divider:P,drawer:N,skeleton:L,steps:T,image:D,layout:A,list:B,mentions:j,modal:z,progress:H,result:F,slider:W,breadcrumb:K,menu:V,pagination:U,input:q,textArea:X,empty:G,badge:Y,radio:Q,rate:J,switch:Z,transfer:ee,avatar:te,message:ne,tag:re,table:ie,card:oe,tabs:ae,timeline:se,timePicker:le,upload:ce,notification:ue,tree:de,colorPicker:he,datePicker:fe,rangePicker:pe,flex:me,wave:ge,dropdown:ve,warning:be,tour:ye,floatButtonGroup:_e,variant:Se,inputNumber:we,treeSelect:Ce}=t,xe=e.useCallback(((e,n)=>{const{prefixCls:r}=t;if(n)return n;const i=r||b.getPrefixCls("");return e?`${i}-${e}`:i}),[b.getPrefixCls,t.prefixCls]),Ee=y||b.iconPrefixCls||Pe,ke=r||b.csp;Da(Ee,ke);const Oe=function(e,t,n){var r;dr("ConfigProvider");const i=e||{},o=!1!==i.inherit&&t?t:Object.assign(Object.assign({},Ai),{hashed:null!==(r=null===t||void 0===t?void 0:t.hashed)&&void 0!==r?r:Ai.hashed,cssVar:null===t||void 0===t?void 0:t.cssVar}),a=Yi();return Je((()=>{var r,s;if(!e)return t;const l=Object.assign({},o.components);Object.keys(e.components||{}).forEach((t=>{l[t]=Object.assign(Object.assign({},l[t]),e.components[t])}));const c=`css-var-${a.replace(/:/g,"")}`,u=(null!==(r=i.cssVar)&&void 0!==r?r:o.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:null===n||void 0===n?void 0:n.prefixCls},"object"===typeof o.cssVar?o.cssVar:{}),"object"===typeof i.cssVar?i.cssVar:{}),{key:"object"===typeof i.cssVar&&(null===(s=i.cssVar)||void 0===s?void 0:s.key)||c});return Object.assign(Object.assign(Object.assign({},o),i),{token:Object.assign(Object.assign({},o.token),i.token),components:l,cssVar:u})}),[i,o],((e,t)=>e.some(((e,n)=>{const r=t[n];return!at(e,r,!0)}))))}(_,b.theme,{prefixCls:xe("")});const $e={csp:ke,autoInsertSpaceInButton:i,alert:o,anchor:a,locale:l||v,direction:u,space:d,splitter:h,virtual:f,popupMatchSelectWidth:null!==m&&void 0!==m?m:p,popupOverflow:g,getPrefixCls:xe,iconPrefixCls:Ee,theme:Oe,segmented:w,statistic:C,spin:x,calendar:E,carousel:k,cascader:O,collapse:$,typography:R,checkbox:I,descriptions:M,divider:P,drawer:N,skeleton:L,steps:T,image:D,input:q,textArea:X,layout:A,list:B,mentions:j,modal:z,progress:H,result:F,slider:W,breadcrumb:K,menu:V,pagination:U,empty:G,badge:Y,radio:Q,rate:J,switch:Z,transfer:ee,avatar:te,message:ne,tag:re,table:ie,card:oe,tabs:ae,timeline:se,timePicker:le,upload:ce,notification:ue,tree:de,colorPicker:he,datePicker:fe,rangePicker:pe,flex:me,wave:ge,dropdown:ve,warning:be,tour:ye,floatButtonGroup:_e,variant:Se,inputNumber:we,treeSelect:Ce};const Re=Object.assign({},b);Object.keys($e).forEach((e=>{void 0!==$e[e]&&(Re[e]=$e[e])})),Ba.forEach((e=>{const n=t[e];n&&(Re[e]=n)})),"undefined"!==typeof i&&(Re.button=Object.assign({autoInsertSpace:i},Re.button));const Ie=Je((()=>Re),Re,((e,t)=>{const n=Object.keys(e),r=Object.keys(t);return n.length!==r.length||n.some((n=>e[n]!==t[n]))})),Me=e.useMemo((()=>({prefixCls:Ee,csp:ke})),[Ee,ke]);let Ne=e.createElement(e.Fragment,null,e.createElement(Ra,{dropdownMatchSelectWidth:p}),n);const Te=e.useMemo((()=>{var e,t,n,r;return lr((null===(e=br.Form)||void 0===e?void 0:e.defaultValidateMessages)||{},(null===(n=null===(t=Ie.locale)||void 0===t?void 0:t.Form)||void 0===n?void 0:n.defaultValidateMessages)||{},(null===(r=Ie.form)||void 0===r?void 0:r.validateMessages)||{},(null===s||void 0===s?void 0:s.validateMessages)||{})}),[Ie,null===s||void 0===s?void 0:s.validateMessages]);Object.keys(Te).length>0&&(Ne=e.createElement(hr.Provider,{value:Te},Ne)),l&&(Ne=e.createElement(xr,{locale:l,_ANT_MARK__:"internalMark"},Ne)),(Ee||ke)&&(Ne=e.createElement(tr.Provider,{value:Me},Ne)),c&&(Ne=e.createElement(Vi,{size:c},Ne)),Ne=e.createElement($a,null,Ne);const De=e.useMemo((()=>{const e=Oe||{},{algorithm:t,token:n,components:r,cssVar:i}=e,o=Aa(e,["algorithm","token","components","cssVar"]),a=t&&(!Array.isArray(t)||t.length>0)?Ct(t):Di,s={};Object.entries(r||{}).forEach((e=>{let[t,n]=e;const r=Object.assign({},n);"algorithm"in r&&(!0===r.algorithm?r.theme=a:(Array.isArray(r.algorithm)||"function"===typeof r.algorithm)&&(r.theme=Ct(r.algorithm)),delete r.algorithm),s[t]=r}));const l=Object.assign(Object.assign({},ki),n);return Object.assign(Object.assign({},o),{theme:a,token:l,components:s,override:Object.assign({override:l},s),cssVar:i})}),[Oe]);return _&&(Ne=e.createElement(Bi.Provider,{value:De},Ne)),Ie.warning&&(Ne=e.createElement(ur.Provider,{value:Ie.warning},Ne)),void 0!==S&&(Ne=e.createElement(Fi,{disabled:S},Ne)),e.createElement(Le.Provider,{value:Ie},Ne)},qa=t=>{const n=e.useContext(Le),r=e.useContext(Cr);return e.createElement(Ua,Object.assign({parentContext:n,legacyLocale:r},t))};qa.ConfigContext=Le,qa.SizeContext=Ui,qa.config=e=>{const{prefixCls:t,iconPrefixCls:n,theme:r,holderRender:i}=e;void 0!==t&&(ja=t),void 0!==n&&(za=n),"holderRender"in e&&(Fa=i),r&&(!function(e){return Object.keys(e).some((e=>e.endsWith("Color")))}(r)?Ha=r:zi(Wa(),r))},qa.useConfig=qi,Object.defineProperty(qa,"SizeContext",{get:()=>Ui});const Xa=qa;const Ga={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};function Ya(e){var t;return null===e||void 0===e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}function Qa(e){return function(e){return Ya(e)instanceof ShadowRoot}(e)?Ya(e):null}function Ja(e){return"object"===le(e)&&"string"===typeof e.name&&"string"===typeof e.theme&&("object"===le(e.icon)||"function"===typeof e.icon)}function Za(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,n){var r,i=e[n];if("class"===n)t.className=i,delete t.class;else delete t[n],t[(r=n,r.replace(/-(.)/g,(function(e,t){return t.toUpperCase()})))]=i;return t}),{})}function es(t,n,r){return r?e.createElement(t.tag,me(me({key:n},Za(t.attrs)),r),(t.children||[]).map((function(e,r){return es(e,"".concat(n,"-").concat(t.tag,"-").concat(r))}))):e.createElement(t.tag,me({key:n},Za(t.attrs)),(t.children||[]).map((function(e,r){return es(e,"".concat(n,"-").concat(t.tag,"-").concat(r))})))}function ts(e){return Yr(e)[0]}function ns(e){return e?Array.isArray(e)?e:[e]:[]}var rs=["icon","className","onClick","style","primaryColor","secondaryColor"],is={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};var os=function(t){var n,r,i=t.icon,o=t.className,a=t.onClick,s=t.style,l=t.primaryColor,c=t.secondaryColor,u=lo(t,rs),d=e.useRef(),h=is;if(l&&(h={primaryColor:l,secondaryColor:c||ts(l)}),function(t){var n=(0,e.useContext)(tr),r=n.csp,i=n.prefixCls,o="\n.anticon {\n display: inline-flex;\n align-items: center;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";i&&(o=o.replace(/anticon/g,i)),(0,e.useEffect)((function(){var e=Qa(t.current);Qe(o,"@ant-design-icons",{prepend:!0,csp:r,attachTo:e})}),[])}(d),n=Ja(i),r="icon should be icon definiton, but got ".concat(i),ot(n,"[@ant-design/icons] ".concat(r)),!Ja(i))return null;var f=i;return f&&"function"===typeof f.icon&&(f=me(me({},f),{},{icon:f.icon(h.primaryColor,h.secondaryColor)})),es(f.icon,"svg-".concat(f.name),me(me({className:o,onClick:a,style:s,"data-icon":f.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},u),{},{ref:d}))};os.displayName="IconReact",os.getTwoToneColors=function(){return me({},is)},os.setTwoToneColors=function(e){var t=e.primaryColor,n=e.secondaryColor;is.primaryColor=t,is.secondaryColor=n||ts(t),is.calculated=!!n};const as=os;function ss(e){var t=Be(ns(e),2),n=t[0],r=t[1];return as.setTwoToneColors({primaryColor:n,secondaryColor:r})}var ls=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];ss(ai.primary);var cs=e.forwardRef((function(t,n){var r=t.className,i=t.icon,o=t.spin,a=t.rotate,s=t.tabIndex,l=t.onClick,c=t.twoToneColor,u=lo(t,ls),d=e.useContext(tr),h=d.prefixCls,f=void 0===h?"anticon":h,p=d.rootClassName,m=Ji()(p,f,fe(fe({},"".concat(f,"-").concat(i.name),!!i.name),"".concat(f,"-spin"),!!o||"loading"===i.name),r),g=s;void 0===g&&l&&(g=-1);var v=a?{msTransform:"rotate(".concat(a,"deg)"),transform:"rotate(".concat(a,"deg)")}:void 0,b=Be(ns(c),2),y=b[0],_=b[1];return e.createElement("span",Gt({role:"img","aria-label":i.name},u,{ref:n,tabIndex:g,onClick:l,className:m}),e.createElement(as,{icon:i,primaryColor:y,secondaryColor:_,style:v}))}));cs.displayName="AntdIcon",cs.getTwoToneColor=function(){var e=as.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor},cs.setTwoToneColor=ss;const us=cs;var ds=function(t,n){return e.createElement(us,Gt({},t,{ref:n,icon:Ga}))};const hs=e.forwardRef(ds);const fs={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"};var ps=function(t,n){return e.createElement(us,Gt({},t,{ref:n,icon:fs}))};const ms=e.forwardRef(ps);const gs={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"};var vs=function(t,n){return e.createElement(us,Gt({},t,{ref:n,icon:gs}))};const bs=e.forwardRef(vs);const ys={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"};var _s=function(t,n){return e.createElement(us,Gt({},t,{ref:n,icon:ys}))};const Ss=e.forwardRef(_s);const ws={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};var Cs=function(t,n){return e.createElement(us,Gt({},t,{ref:n,icon:ws}))};const xs=e.forwardRef(Cs);var Es={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=Es.F1&&t<=Es.F12)return!1;switch(t){case Es.ALT:case Es.CAPS_LOCK:case Es.CONTEXT_MENU:case Es.CTRL:case Es.DOWN:case Es.END:case Es.ESC:case Es.HOME:case Es.INSERT:case Es.LEFT:case Es.MAC_FF_META:case Es.META:case Es.NUMLOCK:case Es.NUM_CENTER:case Es.PAGE_DOWN:case Es.PAGE_UP:case Es.PAUSE:case Es.PRINT_SCREEN:case Es.RIGHT:case Es.SHIFT:case Es.UP:case Es.WIN_KEY:case Es.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=Es.ZERO&&e<=Es.NINE)return!0;if(e>=Es.NUM_ZERO&&e<=Es.NUM_MULTIPLY)return!0;if(e>=Es.A&&e<=Es.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case Es.SPACE:case Es.QUESTION_MARK:case Es.NUM_PLUS:case Es.NUM_MINUS:case Es.NUM_PERIOD:case Es.NUM_DIVISION:case Es.SEMICOLON:case Es.DASH:case Es.EQUALS:case Es.COMMA:case Es.PERIOD:case Es.SLASH:case Es.APOSTROPHE:case Es.SINGLE_QUOTE:case Es.OPEN_SQUARE_BRACKET:case Es.BACKSLASH:case Es.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};const ks=Es;var Os="".concat("accept acceptCharset accessKey action allowFullScreen allowTransparency\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\n charSet checked classID className colSpan cols content contentEditable contextMenu\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\n mediaGroup method min minLength multiple muted name noValidate nonce open\n optimum pattern placeholder poster preload radioGroup readOnly rel required\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\n summary tabIndex target title type useMap value width wmode wrap"," ").concat("onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError").split(/[\s\n]+/);function $s(e,t){return 0===e.indexOf(t)}function Rs(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t=!1===n?{aria:!0,data:!0,attr:!0}:!0===n?{aria:!0}:me({},n);var r={};return Object.keys(e).forEach((function(n){(t.aria&&("role"===n||$s(n,"aria-"))||t.data&&$s(n,"data-")||t.attr&&Os.includes(n))&&(r[n]=e[n])})),r}const Is=e.forwardRef((function(t,n){var r=t.prefixCls,i=t.style,o=t.className,a=t.duration,s=void 0===a?4.5:a,l=t.showProgress,c=t.pauseOnHover,u=void 0===c||c,d=t.eventKey,h=t.content,f=t.closable,p=t.closeIcon,m=void 0===p?"x":p,g=t.props,v=t.onClick,b=t.onNoticeClose,y=t.times,_=t.hovering,S=Be(e.useState(!1),2),w=S[0],C=S[1],x=Be(e.useState(0),2),E=x[0],k=x[1],O=Be(e.useState(0),2),$=O[0],R=O[1],I=_||w,M=s>0&&l,P=function(){b(d)};e.useEffect((function(){if(!I&&s>0){var e=Date.now()-$,t=setTimeout((function(){P()}),1e3*s-$);return function(){u&&clearTimeout(t),R(Date.now()-e)}}}),[s,I,y]),e.useEffect((function(){if(!I&&M&&(u||0===$)){var e,t=performance.now();return function n(){cancelAnimationFrame(e),e=requestAnimationFrame((function(e){var r=e+$-t,i=Math.min(r/(1e3*s),1);k(100*i),i<1&&n()}))}(),function(){u&&cancelAnimationFrame(e)}}}),[s,$,I,M,y]);var N=e.useMemo((function(){return"object"===le(f)&&null!==f?f:f?{closeIcon:m}:{}}),[f,m]),L=Rs(N,!0),T=100-(!E||E<0?0:E>100?100:E),D="".concat(r,"-notice");return e.createElement("div",Gt({},g,{ref:n,className:Ji()(D,o,fe({},"".concat(D,"-closable"),f)),style:i,onMouseEnter:function(e){var t;C(!0),null===g||void 0===g||null===(t=g.onMouseEnter)||void 0===t||t.call(g,e)},onMouseLeave:function(e){var t;C(!1),null===g||void 0===g||null===(t=g.onMouseLeave)||void 0===t||t.call(g,e)},onClick:v}),e.createElement("div",{className:"".concat(D,"-content")},h),f&&e.createElement("a",Gt({tabIndex:0,className:"".concat(D,"-close"),onKeyDown:function(e){"Enter"!==e.key&&"Enter"!==e.code&&e.keyCode!==ks.ENTER||P()},"aria-label":"Close"},L,{onClick:function(e){e.preventDefault(),e.stopPropagation(),P()}}),N.closeIcon),M&&e.createElement("progress",{className:"".concat(D,"-progress"),max:"100",value:T},T+"%"))}));var Ms=e.createContext({});const Ps=function(t){var n=t.children,r=t.classNames;return e.createElement(Ms.Provider,{value:{classNames:r}},n)};const Ns=function(e){var t,n,r,i={offset:8,threshold:3,gap:16};e&&"object"===le(e)&&(i.offset=null!==(t=e.offset)&&void 0!==t?t:8,i.threshold=null!==(n=e.threshold)&&void 0!==n?n:3,i.gap=null!==(r=e.gap)&&void 0!==r?r:16);return[!!e,i]};var Ls=["className","style","classNames","styles"];const Ts=function(t){var n=t.configList,r=t.placement,i=t.prefixCls,o=t.className,a=t.style,s=t.motion,l=t.onAllNoticeRemoved,c=t.onNoticeClose,u=t.stack,d=(0,e.useContext)(Ms).classNames,h=(0,e.useRef)({}),f=Be((0,e.useState)(null),2),p=f[0],m=f[1],g=Be((0,e.useState)([]),2),v=g[0],b=g[1],y=n.map((function(e){return{config:e,key:String(e.key)}})),_=Be(Ns(u),2),S=_[0],w=_[1],C=w.offset,x=w.threshold,E=w.gap,k=S&&(v.length>0||y.length<=x),O="function"===typeof s?s(r):s;return(0,e.useEffect)((function(){S&&v.length>1&&b((function(e){return e.filter((function(e){return y.some((function(t){var n=t.key;return e===n}))}))}))}),[v,y,S]),(0,e.useEffect)((function(){var e,t;S&&h.current[null===(e=y[y.length-1])||void 0===e?void 0:e.key]&&m(h.current[null===(t=y[y.length-1])||void 0===t?void 0:t.key])}),[y,S]),e.createElement(ga,Gt({key:r,className:Ji()(i,"".concat(i,"-").concat(r),null===d||void 0===d?void 0:d.list,o,fe(fe({},"".concat(i,"-stack"),!!S),"".concat(i,"-stack-expanded"),k)),style:a,keys:y,motionAppear:!0},O,{onAllRemoved:function(){l(r)}}),(function(t,n){var o=t.config,a=t.className,s=t.style,l=t.index,u=o,f=u.key,m=u.times,g=String(f),_=o,w=_.className,x=_.style,O=_.classNames,$=_.styles,R=lo(_,Ls),I=y.findIndex((function(e){return e.key===g})),M={};if(S){var P=y.length-1-(I>-1?I:l-1),N="top"===r||"bottom"===r?"-50%":"0";if(P>0){var L,T,D;M.height=k?null===(L=h.current[g])||void 0===L?void 0:L.offsetHeight:null===p||void 0===p?void 0:p.offsetHeight;for(var A=0,B=0;B<P;B++){var j;A+=(null===(j=h.current[y[y.length-1-B].key])||void 0===j?void 0:j.offsetHeight)+E}var z=(k?A:P*C)*(r.startsWith("top")?1:-1),H=!k&&null!==p&&void 0!==p&&p.offsetWidth&&null!==(T=h.current[g])&&void 0!==T&&T.offsetWidth?((null===p||void 0===p?void 0:p.offsetWidth)-2*C*(P<3?P:3))/(null===(D=h.current[g])||void 0===D?void 0:D.offsetWidth):1;M.transform="translate3d(".concat(N,", ").concat(z,"px, 0) scaleX(").concat(H,")")}else M.transform="translate3d(".concat(N,", 0, 0)")}return e.createElement("div",{ref:n,className:Ji()("".concat(i,"-notice-wrapper"),a,null===O||void 0===O?void 0:O.wrapper),style:me(me(me({},s),M),null===$||void 0===$?void 0:$.wrapper),onMouseEnter:function(){return b((function(e){return e.includes(g)?e:[].concat(se(e),[g])}))},onMouseLeave:function(){return b((function(e){return e.filter((function(e){return e!==g}))}))}},e.createElement(Is,Gt({},R,{ref:function(e){I>-1?h.current[g]=e:delete h.current[g]},prefixCls:i,classNames:O,styles:$,className:Ji()(w,null===d||void 0===d?void 0:d.notice),style:x,times:m,key:f,eventKey:f,onNoticeClose:c,hovering:S&&v.length>0})))}))};const Ds=e.forwardRef((function(t,n){var r=t.prefixCls,i=void 0===r?"rc-notification":r,o=t.container,a=t.motion,s=t.maxCount,l=t.className,c=t.style,u=t.onAllRemoved,d=t.stack,h=t.renderNotifications,f=Be(e.useState([]),2),p=f[0],m=f[1],g=function(e){var t,n=p.find((function(t){return t.key===e}));null===n||void 0===n||null===(t=n.onClose)||void 0===t||t.call(n),m((function(t){return t.filter((function(t){return t.key!==e}))}))};e.useImperativeHandle(n,(function(){return{open:function(e){m((function(t){var n,r=se(t),i=r.findIndex((function(t){return t.key===e.key})),o=me({},e);i>=0?(o.times=((null===(n=t[i])||void 0===n?void 0:n.times)||0)+1,r[i]=o):(o.times=0,r.push(o));return s>0&&r.length>s&&(r=r.slice(-s)),r}))},close:function(e){g(e)},destroy:function(){m([])}}}));var v=Be(e.useState({}),2),b=v[0],y=v[1];e.useEffect((function(){var e={};p.forEach((function(t){var n=t.placement,r=void 0===n?"topRight":n;r&&(e[r]=e[r]||[],e[r].push(t))})),Object.keys(b).forEach((function(t){e[t]=e[t]||[]})),y(e)}),[p]);var _=function(e){y((function(t){var n=me({},t);return(n[e]||[]).length||delete n[e],n}))},S=e.useRef(!1);if(e.useEffect((function(){Object.keys(b).length>0?S.current=!0:S.current&&(null===u||void 0===u||u(),S.current=!1)}),[b]),!o)return null;var w=Object.keys(b);return(0,ve.createPortal)(e.createElement(e.Fragment,null,w.map((function(t){var n=b[t],r=e.createElement(Ts,{key:t,configList:n,placement:t,prefixCls:i,className:null===l||void 0===l?void 0:l(t),style:null===c||void 0===c?void 0:c(t),motion:a,onNoticeClose:g,onAllNoticeRemoved:_,stack:d});return h?h(r,{prefixCls:i,key:t}):r}))),o)}));var As=["getContainer","motion","prefixCls","maxCount","className","style","onAllRemoved","stack","renderNotifications"],Bs=function(){return document.body},js=0;function zs(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.getContainer,r=void 0===n?Bs:n,i=t.motion,o=t.prefixCls,a=t.maxCount,s=t.className,l=t.style,c=t.onAllRemoved,u=t.stack,d=t.renderNotifications,h=lo(t,As),f=Be(e.useState(),2),p=f[0],m=f[1],g=e.useRef(),v=e.createElement(Ds,{container:p,ref:g,prefixCls:o,motion:i,maxCount:a,className:s,style:l,onAllRemoved:c,stack:u,renderNotifications:d}),b=Be(e.useState([]),2),y=b[0],_=b[1],S=e.useMemo((function(){return{open:function(e){var t=function(){for(var e={},t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){t&&Object.keys(t).forEach((function(n){var r=t[n];void 0!==r&&(e[n]=r)}))})),e}(h,e);null!==t.key&&void 0!==t.key||(t.key="rc-notification-".concat(js),js+=1),_((function(e){return[].concat(se(e),[{type:"open",config:t}])}))},close:function(e){_((function(t){return[].concat(se(t),[{type:"close",key:e}])}))},destroy:function(){_((function(e){return[].concat(se(e),[{type:"destroy"}])}))}}}),[]);return e.useEffect((function(){m(r())})),e.useEffect((function(){g.current&&y.length&&(y.forEach((function(e){switch(e.type){case"open":g.current.open(e.config);break;case"close":g.current.close(e.key);break;case"destroy":g.current.destroy()}})),_((function(e){return e.filter((function(e){return!y.includes(e)}))})))}),[y]),[S,v]}const Hs=e=>{const[,,,,t]=Oa();return t?`${e}-css-var`:""};const Fs=e.createContext(void 0),Ws=100,Ks=1e3,Vs={Modal:Ws,Drawer:Ws,Popover:Ws,Popconfirm:Ws,Tooltip:Ws,Tour:Ws,FloatButton:Ws},Us={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1};const qs=(t,n)=>{const[,r]=Oa(),i=e.useContext(Fs),o=t in Vs;let a;if(void 0!==n)a=[n,n];else{let e=null!==i&&void 0!==i?i:0;e+=o?(i?0:r.zIndexPopupBase)+Vs[t]:Us[t],a=[void 0===i?n:e,e]}return a};const Xs=ct((function e(){st(this,e)}));var Gs="CALC_UNIT",Ys=new RegExp(Gs,"g");function Qs(e){return"number"===typeof e?"".concat(e).concat(Gs):e}var Js=function(e){po(n,e);var t=bo(n);function n(e,r){var i;st(this,n),fe(vo(i=t.call(this)),"result",""),fe(vo(i),"unitlessCssVar",void 0),fe(vo(i),"lowPriority",void 0);var o=le(e);return i.unitlessCssVar=r,e instanceof n?i.result="(".concat(e.result,")"):"number"===o?i.result=Qs(e):"string"===o&&(i.result=e),i}return ct(n,[{key:"add",value:function(e){return e instanceof n?this.result="".concat(this.result," + ").concat(e.getResult()):"number"!==typeof e&&"string"!==typeof e||(this.result="".concat(this.result," + ").concat(Qs(e))),this.lowPriority=!0,this}},{key:"sub",value:function(e){return e instanceof n?this.result="".concat(this.result," - ").concat(e.getResult()):"number"!==typeof e&&"string"!==typeof e||(this.result="".concat(this.result," - ").concat(Qs(e))),this.lowPriority=!0,this}},{key:"mul",value:function(e){return this.lowPriority&&(this.result="(".concat(this.result,")")),e instanceof n?this.result="".concat(this.result," * ").concat(e.getResult(!0)):"number"!==typeof e&&"string"!==typeof e||(this.result="".concat(this.result," * ").concat(e)),this.lowPriority=!1,this}},{key:"div",value:function(e){return this.lowPriority&&(this.result="(".concat(this.result,")")),e instanceof n?this.result="".concat(this.result," / ").concat(e.getResult(!0)):"number"!==typeof e&&"string"!==typeof e||(this.result="".concat(this.result," / ").concat(e)),this.lowPriority=!1,this}},{key:"getResult",value:function(e){return this.lowPriority||e?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(e){var t=this,n=(e||{}).unit,r=!0;return"boolean"===typeof n?r=n:Array.from(this.unitlessCssVar).some((function(e){return t.result.includes(e)}))&&(r=!1),this.result=this.result.replace(Ys,r?"px":""),"undefined"!==typeof this.lowPriority?"calc(".concat(this.result,")"):this.result}}]),n}(Xs);const Zs=function(e){po(n,e);var t=bo(n);function n(e){var r;return st(this,n),fe(vo(r=t.call(this)),"result",0),e instanceof n?r.result=e.result:"number"===typeof e&&(r.result=e),r}return ct(n,[{key:"add",value:function(e){return e instanceof n?this.result+=e.result:"number"===typeof e&&(this.result+=e),this}},{key:"sub",value:function(e){return e instanceof n?this.result-=e.result:"number"===typeof e&&(this.result-=e),this}},{key:"mul",value:function(e){return e instanceof n?this.result*=e.result:"number"===typeof e&&(this.result*=e),this}},{key:"div",value:function(e){return e instanceof n?this.result/=e.result:"number"===typeof e&&(this.result/=e),this}},{key:"equal",value:function(){return this.result}}]),n}(Xs);const el=function(e,t){var n="css"===e?Js:Zs;return function(e){return new n(e,t)}};const tl=function(e,t){return"".concat([t,e.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-"))};const nl=function(e,t,n,r){var i=me({},t[e]);null!==r&&void 0!==r&&r.deprecatedTokens&&r.deprecatedTokens.forEach((function(e){var t,n=Be(e,2),r=n[0],o=n[1];(null!==i&&void 0!==i&&i[r]||null!==i&&void 0!==i&&i[o])&&(null!==(t=i[o])&&void 0!==t||(i[o]=null===i||void 0===i?void 0:i[r]))}));var o=me(me({},n),i);return Object.keys(o).forEach((function(e){o[e]===t[e]&&delete o[e]})),o};var rl="undefined"!==typeof CSSINJS_STATISTIC,il=!0;function ol(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!rl)return Object.assign.apply(Object,[{}].concat(t));il=!1;var r={};return t.forEach((function(e){"object"===le(e)&&Object.keys(e).forEach((function(t){Object.defineProperty(r,t,{configurable:!0,enumerable:!0,get:function(){return e[t]}})}))})),il=!0,r}var al={};function sl(){}const ll=function(e){var t,n=e,r=sl;return rl&&"undefined"!==typeof Proxy&&(t=new Set,n=new Proxy(e,{get:function(e,n){var r;il&&(null===(r=t)||void 0===r||r.add(n));return e[n]}}),r=function(e,n){var r;al[e]={global:Array.from(t),component:me(me({},null===(r=al[e])||void 0===r?void 0:r.component),n)}}),{token:n,keys:t,flush:r}};const cl=function(e,t,n){var r;return"function"===typeof n?n(ol(t,null!==(r=t[e])&&void 0!==r?r:{})):null!==n&&void 0!==n?n:{}};const ul=function(e){return"js"===e?{max:Math.max,min:Math.min}:{max:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"max(".concat(t.map((function(e){return It(e)})).join(","),")")},min:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"min(".concat(t.map((function(e){return It(e)})).join(","),")")}}};var dl=new(function(){function e(){st(this,e),fe(this,"map",new Map),fe(this,"objectIDMap",new WeakMap),fe(this,"nextID",0),fe(this,"lastAccessBeat",new Map),fe(this,"accessBeat",0)}return ct(e,[{key:"set",value:function(e,t){this.clear();var n=this.getCompositeKey(e);this.map.set(n,t),this.lastAccessBeat.set(n,Date.now())}},{key:"get",value:function(e){var t=this.getCompositeKey(e),n=this.map.get(t);return this.lastAccessBeat.set(t,Date.now()),this.accessBeat+=1,n}},{key:"getCompositeKey",value:function(e){var t=this;return e.map((function(e){return e&&"object"===le(e)?"obj_".concat(t.getObjectID(e)):"".concat(le(e),"_").concat(e)})).join("|")}},{key:"getObjectID",value:function(e){if(this.objectIDMap.has(e))return this.objectIDMap.get(e);var t=this.nextID;return this.objectIDMap.set(e,t),this.nextID+=1,t}},{key:"clear",value:function(){var e=this;if(this.accessBeat>1e4){var t=Date.now();this.lastAccessBeat.forEach((function(n,r){t-n>6e5&&(e.map.delete(r),e.lastAccessBeat.delete(r))})),this.accessBeat=0}}}]),e}());const hl=function(t,n){return e.useMemo((function(){var e=dl.get(n);if(e)return e;var r=t();return dl.set(n,r),r}),n)};const fl=function(){return{}};const pl=function(t){var n=t.useCSP,r=void 0===n?fl:n,i=t.useToken,o=t.usePrefix,a=t.getResetStyles,s=t.getCommonStyle,l=t.getCompUnitless;function c(e,n,l){var c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},u=Array.isArray(e)?e:[e,e],d=Be(u,1)[0],h=u.join("-"),f=t.layer||{name:"antd"};return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,u=i(),p=u.theme,m=u.realToken,g=u.hashId,v=u.token,b=u.cssVar,y=o(),_=y.rootPrefixCls,S=y.iconPrefixCls,w=r(),C=b?"css":"js",x=hl((function(){var e=new Set;return b&&Object.keys(c.unitless||{}).forEach((function(t){e.add(Pt(t,b.prefix)),e.add(Pt(t,tl(d,b.prefix)))})),el(C,e)}),[C,d,null===b||void 0===b?void 0:b.prefix]),E=ul(C),k=E.max,O=E.min,$={theme:p,token:v,hashId:g,nonce:function(){return w.nonce},clientOnly:c.clientOnly,layer:f,order:c.order||-999};return Gn(me(me({},$),{},{clientOnly:!1,path:["Shared",_]}),(function(){return"function"===typeof a?a(v):[]})),[Gn(me(me({},$),{},{path:[h,e,S]}),(function(){if(!1===c.injectStyle)return[];var r=ll(v),i=r.token,o=r.flush,a=cl(d,m,l),u=".".concat(e),h=nl(d,m,a,{deprecatedTokens:c.deprecatedTokens});b&&a&&"object"===le(a)&&Object.keys(a).forEach((function(e){a[e]="var(".concat(Pt(e,tl(d,b.prefix)),")")}));var f=ol(i,{componentCls:u,prefixCls:e,iconCls:".".concat(S),antCls:".".concat(_),calc:x,max:k,min:O},b?a:h),p=n(f,{hashId:g,prefixCls:e,rootPrefixCls:_,iconPrefixCls:S});o(d,h);var y="function"===typeof s?s(f,e,t,c.resetFont):null;return[!1===c.resetStyle?null:y,p]})),g]}}return{genStyleHooks:function(t,n,r,o){var a=Array.isArray(t)?t[0]:t;function s(e){return"".concat(String(a)).concat(e.slice(0,1).toUpperCase()).concat(e.slice(1))}var u=(null===o||void 0===o?void 0:o.unitless)||{},d=me(me({},"function"===typeof l?l(t):{}),{},fe({},s("zIndexPopup"),!0));Object.keys(u).forEach((function(e){d[s(e)]=u[e]}));var h=me(me({},o),{},{unitless:d,prefixToken:s}),f=c(t,n,r,h),p=function(t,n,r){var o=r.unitless,a=r.injectStyle,s=void 0===a||a,l=r.prefixToken,c=r.ignore,u=function(e){var a=e.rootCls,s=e.cssVar,u=void 0===s?{}:s,d=i().realToken;return Qn({path:[t],prefix:u.prefix,key:u.key,unitless:o,ignore:c,token:d,scope:a},(function(){var e=cl(t,d,n),i=nl(t,d,e,{deprecatedTokens:null===r||void 0===r?void 0:r.deprecatedTokens});return Object.keys(e).forEach((function(e){i[l(e)]=i[e],delete i[e]})),i})),null},d=function(n){var r=i().cssVar;return[function(i){return s&&r?e.createElement(e.Fragment,null,e.createElement(u,{rootCls:n,cssVar:r,component:t}),i):i},null===r||void 0===r?void 0:r.key]};return d}(a,r,h);return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=Be(f(e,t),2)[1],r=Be(p(t),2);return[r[0],n,r[1]]}},genSubStyleComponent:function(e,t,n){var r=c(e,t,n,me({resetStyle:!1,order:-998},arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}));return function(e){var t=e.prefixCls,n=e.rootCls;return r(t,void 0===n?t:n),null}},genComponentStyleHook:c}},{genStyleHooks:ml,genComponentStyleHook:gl,genSubStyleComponent:vl}=pl({usePrefix:()=>{const{getPrefixCls:t,iconPrefixCls:n}=(0,e.useContext)(Le);return{rootPrefixCls:t(),iconPrefixCls:n}},useToken:()=>{const[e,t,n,r,i]=Oa();return{theme:e,realToken:t,hashId:n,token:r,cssVar:i}},useCSP:()=>{const{csp:t,iconPrefixCls:n}=(0,e.useContext)(Le);return Da(n,t),null!==t&&void 0!==t?t:{}},getResetStyles:e=>[{"&":Pa(e)}],getCommonStyle:(e,t,n,r)=>{const i=`[class^="${t}"], [class*=" ${t}"]`,o=n?`.${n}`:i,a={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let s={};return!1!==r&&(s={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[o]:Object.assign(Object.assign(Object.assign({},s),a),{[i]:a})}},getCompUnitless:()=>Ca}),bl=e=>{const{componentCls:t,iconCls:n,boxShadow:r,colorText:i,colorSuccess:o,colorError:a,colorWarning:s,colorInfo:l,fontSizeLG:c,motionEaseInOutCirc:u,motionDurationSlow:d,marginXS:h,paddingXS:f,borderRadiusLG:p,zIndexPopup:m,contentPadding:g,contentBg:v}=e,b=`${t}-notice`,y=new Zn("MessageMoveIn",{"0%":{padding:0,transform:"translateY(-100%)",opacity:0},"100%":{padding:f,transform:"translateY(0)",opacity:1}}),_=new Zn("MessageMoveOut",{"0%":{maxHeight:e.height,padding:f,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}}),S={padding:f,textAlign:"center",[`${t}-custom-content`]:{display:"flex",alignItems:"center"},[`${t}-custom-content > ${n}`]:{marginInlineEnd:h,fontSize:c},[`${b}-content`]:{display:"inline-block",padding:g,background:v,borderRadius:p,boxShadow:r,pointerEvents:"all"},[`${t}-success > ${n}`]:{color:o},[`${t}-error > ${n}`]:{color:a},[`${t}-warning > ${n}`]:{color:s},[`${t}-info > ${n},\n ${t}-loading > ${n}`]:{color:l}};return[{[t]:Object.assign(Object.assign({},Ma(e)),{color:i,position:"fixed",top:h,width:"100%",pointerEvents:"none",zIndex:m,[`${t}-move-up`]:{animationFillMode:"forwards"},[`\n ${t}-move-up-appear,\n ${t}-move-up-enter\n `]:{animationName:y,animationDuration:d,animationPlayState:"paused",animationTimingFunction:u},[`\n ${t}-move-up-appear${t}-move-up-appear-active,\n ${t}-move-up-enter${t}-move-up-enter-active\n `]:{animationPlayState:"running"},[`${t}-move-up-leave`]:{animationName:_,animationDuration:d,animationPlayState:"paused",animationTimingFunction:u},[`${t}-move-up-leave${t}-move-up-leave-active`]:{animationPlayState:"running"},"&-rtl":{direction:"rtl",span:{direction:"rtl"}}})},{[t]:{[`${b}-wrapper`]:Object.assign({},S)}},{[`${t}-notice-pure-panel`]:Object.assign(Object.assign({},S),{padding:0,textAlign:"start"})}]},yl=ml("Message",(e=>{const t=ol(e,{height:150});return[bl(t)]}),(e=>({zIndexPopup:e.zIndexPopupBase+Ks+10,contentBg:e.colorBgElevated,contentPadding:`${(e.controlHeightLG-e.fontSize*e.lineHeight)/2}px ${e.paddingSM}px`})));var _l=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const Sl={info:e.createElement(Ss,null),success:e.createElement(hs,null),error:e.createElement(ms,null),warning:e.createElement(bs,null),loading:e.createElement(xs,null)},wl=t=>{let{prefixCls:n,type:r,icon:i,children:o}=t;return e.createElement("div",{className:Ji()(`${n}-custom-content`,`${n}-${r}`)},i||Sl[r],e.createElement("span",null,o))},Cl=t=>{const{prefixCls:n,className:r,type:i,icon:o,content:a}=t,s=_l(t,["prefixCls","className","type","icon","content"]),{getPrefixCls:l}=e.useContext(Le),c=n||l("message"),u=Hs(c),[d,h,f]=yl(c,u);return d(e.createElement(Is,Object.assign({},s,{prefixCls:c,className:Ji()(r,h,`${c}-notice-pure-panel`,f,u),eventKey:"pure",duration:null,content:e.createElement(wl,{prefixCls:c,type:i,icon:o},a)})))};const xl={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"};var El=function(t,n){return e.createElement(us,Gt({},t,{ref:n,icon:xl}))};const kl=e.forwardRef(El);function Ol(e){let t;const n=new Promise((n=>{t=e((()=>{n(!0)}))})),r=()=>{null===t||void 0===t||t()};return r.then=(e,t)=>n.then(e,t),r.promise=n,r}var $l=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const Rl=3,Il=t=>{let{children:n,prefixCls:r}=t;const i=Hs(r),[o,a,s]=yl(r,i);return o(e.createElement(Ps,{classNames:{list:Ji()(a,s,i)}},n))},Ml=(t,n)=>{let{prefixCls:r,key:i}=n;return e.createElement(Il,{prefixCls:r,key:i},t)},Pl=e.forwardRef(((t,n)=>{const{top:r,prefixCls:i,getContainer:o,maxCount:a,duration:s=Rl,rtl:l,transitionName:c,onAllRemoved:u}=t,{getPrefixCls:d,getPopupContainer:h,message:f,direction:p}=e.useContext(Le),m=i||d("message"),g=e.createElement("span",{className:`${m}-close-x`},e.createElement(kl,{className:`${m}-close-icon`})),[v,b]=zs({prefixCls:m,style:()=>({left:"50%",transform:"translateX(-50%)",top:null!==r&&void 0!==r?r:8}),className:()=>Ji()({[`${m}-rtl`]:null!==l&&void 0!==l?l:"rtl"===p}),motion:()=>function(e,t){return{motionName:null!==t&&void 0!==t?t:`${e}-move-up`}}(m,c),closable:!1,closeIcon:g,duration:s,getContainer:()=>(null===o||void 0===o?void 0:o())||(null===h||void 0===h?void 0:h())||document.body,maxCount:a,onAllRemoved:u,renderNotifications:Ml});return e.useImperativeHandle(n,(()=>Object.assign(Object.assign({},v),{prefixCls:m,message:f}))),b}));let Nl=0;function Ll(t){const n=e.useRef(null);dr("Message");return[e.useMemo((()=>{const t=e=>{var t;null===(t=n.current)||void 0===t||t.close(e)},r=r=>{if(!n.current){const e=()=>{};return e.then=()=>{},e}const{open:i,prefixCls:o,message:a}=n.current,s=`${o}-notice`,{content:l,icon:c,type:u,key:d,className:h,style:f,onClose:p}=r,m=$l(r,["content","icon","type","key","className","style","onClose"]);let g=d;return void 0!==g&&null!==g||(Nl+=1,g=`antd-message-${Nl}`),Ol((n=>(i(Object.assign(Object.assign({},m),{key:g,content:e.createElement(wl,{prefixCls:o,type:u,icon:c},l),placement:"top",className:Ji()(u&&`${s}-${u}`,h,null===a||void 0===a?void 0:a.className),style:Object.assign(Object.assign({},null===a||void 0===a?void 0:a.style),f),onClose:()=>{null===p||void 0===p||p(),n()}})),()=>{t(g)})))},i={open:r,destroy:e=>{var r;void 0!==e?t(e):null===(r=n.current)||void 0===r||r.destroy()}};return["info","success","warning","error","loading"].forEach((e=>{i[e]=(t,n,i)=>{let o,a,s;o=t&&"object"===typeof t&&"content"in t?t:{content:t},"function"===typeof n?s=n:(a=n,s=i);const l=Object.assign(Object.assign({onClose:s,duration:a},o),{type:e});return r(l)}})),i}),[]),e.createElement(Pl,Object.assign({key:"message-holder"},t,{ref:n}))]}let Tl=null,Dl=e=>e(),Al=[],Bl={};function jl(){const{getContainer:e,duration:t,rtl:n,maxCount:r,top:i}=Bl,o=(null===e||void 0===e?void 0:e())||document.body;return{getContainer:()=>o,duration:t,rtl:n,maxCount:r,top:i}}const zl=e.forwardRef(((t,n)=>{const{messageConfig:r,sync:i}=t,{getPrefixCls:o}=(0,e.useContext)(Le),a=Bl.prefixCls||o("message"),s=(0,e.useContext)(Ie),[l,c]=Ll(Object.assign(Object.assign(Object.assign({},r),{prefixCls:a}),s.message));return e.useImperativeHandle(n,(()=>{const e=Object.assign({},l);return Object.keys(e).forEach((t=>{e[t]=function(){return i(),l[t].apply(l,arguments)}})),{instance:e,sync:i}})),c})),Hl=e.forwardRef(((t,n)=>{const[r,i]=e.useState(jl),o=()=>{i(jl)};e.useEffect(o,[]);const a=Va(),s=a.getRootPrefixCls(),l=a.getIconPrefixCls(),c=a.getTheme(),u=e.createElement(zl,{ref:n,sync:o,messageConfig:r});return e.createElement(Xa,{prefixCls:s,iconPrefixCls:l,theme:c},a.holderRender?a.holderRender(u):u)}));function Fl(){if(!Tl){const t=document.createDocumentFragment(),n={fragment:t};return Tl=n,void Dl((()=>{xe(e.createElement(Hl,{ref:e=>{const{instance:t,sync:r}=e||{};Promise.resolve().then((()=>{!n.instance&&t&&(n.instance=t,n.sync=r,Fl())}))}}),t)}))}Tl.instance&&(Al.forEach((e=>{const{type:t,skipped:n}=e;if(!n)switch(t){case"open":Dl((()=>{const t=Tl.instance.open(Object.assign(Object.assign({},Bl),e.config));null===t||void 0===t||t.then(e.resolve),e.setCloseFn(t)}));break;case"destroy":Dl((()=>{null===Tl||void 0===Tl||Tl.instance.destroy(e.key)}));break;default:Dl((()=>{var n;const r=(n=Tl.instance)[t].apply(n,se(e.args));null===r||void 0===r||r.then(e.resolve),e.setCloseFn(r)}))}})),Al=[])}const Wl={open:function(e){const t=Ol((t=>{let n;const r={type:"open",config:e,resolve:t,setCloseFn:e=>{n=e}};return Al.push(r),()=>{n?Dl((()=>{n()})):r.skipped=!0}}));return Fl(),t},destroy:e=>{Al.push({type:"destroy",key:e}),Fl()},config:function(e){Bl=Object.assign(Object.assign({},Bl),e),Dl((()=>{var e;null===(e=null===Tl||void 0===Tl?void 0:Tl.sync)||void 0===e||e.call(Tl)}))},useMessage:function(e){return Ll(e)},_InternalPanelDoNotUseOrYouWillBeFired:Cl};["success","info","warning","error","loading"].forEach((e=>{Wl[e]=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){Va();const n=Ol((n=>{let r;const i={type:e,args:t,resolve:n,setCloseFn:e=>{r=e}};return Al.push(i),()=>{r?Dl((()=>{r()})):i.skipped=!0}}));return Fl(),n}(e,n)}}));const Kl=Wl;var Vl=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],Ul=e.forwardRef((function(t,n){var r,i=t.prefixCls,o=void 0===i?"rc-switch":i,a=t.className,s=t.checked,l=t.defaultChecked,c=t.disabled,u=t.loadingIcon,d=t.checkedChildren,h=t.unCheckedChildren,f=t.onClick,p=t.onChange,m=t.onKeyDown,g=lo(t,Vl),v=Be(Co(!1,{value:s,defaultValue:l}),2),b=v[0],y=v[1];function _(e,t){var n=b;return c||(y(n=e),null===p||void 0===p||p(n,t)),n}var S=Ji()(o,a,(fe(r={},"".concat(o,"-checked"),b),fe(r,"".concat(o,"-disabled"),c),r));return e.createElement("button",Gt({},g,{type:"button",role:"switch","aria-checked":b,disabled:c,className:S,ref:n,onKeyDown:function(e){e.which===ks.LEFT?_(!1,e):e.which===ks.RIGHT&&_(!0,e),null===m||void 0===m||m(e)},onClick:function(e){var t=_(!b,e);null===f||void 0===f||f(t,e)}}),u,e.createElement("span",{className:"".concat(o,"-inner")},e.createElement("span",{className:"".concat(o,"-inner-checked")},d),e.createElement("span",{className:"".concat(o,"-inner-unchecked")},h)))}));Ul.displayName="Switch";const ql=Ul,Xl=function(e){if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox(),n=t.width,r=t.height;if(n||r)return!0}if(e.getBoundingClientRect){var i=e.getBoundingClientRect(),o=i.width,a=i.height;if(o||a)return!0}}return!1};function Gl(t){return t&&e.isValidElement(t)&&t.type===e.Fragment}function Yl(t,n){return((t,n,r)=>e.isValidElement(t)?e.cloneElement(t,"function"===typeof r?r(t.props||{}):r):n)(t,t,n)}const Ql=e=>{const{componentCls:t,colorPrimary:n}=e;return{[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${n})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${e.motionEaseOutCirc}`,`opacity 2s ${e.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:[`box-shadow ${e.motionDurationSlow} ${e.motionEaseInOut}`,`opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`].join(",")}}}}},Jl=gl("Wave",(e=>[Ql(e)])),Zl=`${Me}-wave-target`;function ec(e){return e&&"#fff"!==e&&"#ffffff"!==e&&"rgb(255, 255, 255)"!==e&&"rgba(255, 255, 255, 1)"!==e&&!/rgba\((?:\d*, ){3}0\)/.test(e)&&"transparent"!==e}function tc(e){return Number.isNaN(e)?0:e}const nc=t=>{const{className:n,target:r,component:i}=t,o=e.useRef(null),[a,s]=e.useState(null),[l,c]=e.useState([]),[u,d]=e.useState(0),[h,f]=e.useState(0),[p,m]=e.useState(0),[g,v]=e.useState(0),[b,y]=e.useState(!1),_={left:u,top:h,width:p,height:g,borderRadius:l.map((e=>`${e}px`)).join(" ")};function S(){const e=getComputedStyle(r);s(function(e){const{borderTopColor:t,borderColor:n,backgroundColor:r}=getComputedStyle(e);return ec(t)?t:ec(n)?n:ec(r)?r:null}(r));const t="static"===e.position,{borderLeftWidth:n,borderTopWidth:i}=e;d(t?r.offsetLeft:tc(-parseFloat(n))),f(t?r.offsetTop:tc(-parseFloat(i))),m(r.offsetWidth),v(r.offsetHeight);const{borderTopLeftRadius:o,borderTopRightRadius:a,borderBottomLeftRadius:l,borderBottomRightRadius:u}=e;c([o,a,u,l].map((e=>tc(parseFloat(e)))))}if(a&&(_["--wave-color"]=a),e.useEffect((()=>{if(r){const e=Zo((()=>{S(),y(!0)}));let t;return"undefined"!==typeof ResizeObserver&&(t=new ResizeObserver(S),t.observe(r)),()=>{Zo.cancel(e),null===t||void 0===t||t.disconnect()}}}),[]),!b)return null;const w=("Checkbox"===i||"Radio"===i)&&(null===r||void 0===r?void 0:r.classList.contains(Zl));return e.createElement(va,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(e,t)=>{var n;if(t.deadline||"opacity"===t.propertyName){const e=null===(n=o.current)||void 0===n?void 0:n.parentElement;$e(e).then((()=>{null===e||void 0===e||e.remove()}))}return!1}},((t,r)=>{let{className:i}=t;return e.createElement("div",{ref:io(o,r),className:Ji()(n,i,{"wave-quick":w}),style:_})}))},rc=(t,n)=>{var r;const{component:i}=n;if("Checkbox"===i&&!(null===(r=t.querySelector("input"))||void 0===r?void 0:r.checked))return;const o=document.createElement("div");o.style.position="absolute",o.style.left="0px",o.style.top="0px",null===t||void 0===t||t.insertBefore(o,null===t||void 0===t?void 0:t.firstChild),xe(e.createElement(nc,Object.assign({},n,{target:t})),o)},ic=(t,n,r)=>{const{wave:i}=e.useContext(Le),[,o,a]=Oa(),s=_o((e=>{const s=t.current;if((null===i||void 0===i?void 0:i.disabled)||!s)return;const l=s.querySelector(`.${Zl}`)||s,{showEffect:c}=i||{};(c||rc)(l,{className:n,token:o,component:r,event:e,hashId:a})})),l=e.useRef();return e=>{Zo.cancel(l.current),l.current=Zo((()=>{s(e)}))}};const oc=t=>{const{children:n,disabled:r,component:i}=t,{getPrefixCls:o}=(0,e.useContext)(Le),a=(0,e.useRef)(null),s=o("wave"),[,l]=Jl(s),c=ic(a,Ji()(s,l),i);if(e.useEffect((()=>{const e=a.current;if(!e||1!==e.nodeType||r)return;const t=t=>{!Xl(t.target)||!e.getAttribute||e.getAttribute("disabled")||e.disabled||e.className.includes("disabled")||e.className.includes("-leave")||c(t)};return e.addEventListener("click",t,!0),()=>{e.removeEventListener("click",t,!0)}}),[r]),!e.isValidElement(n))return null!==n&&void 0!==n?n:null;return Yl(n,{ref:ao(n)?io(n.ref,a):a})},ac=t=>{const n=e.useContext(Ui);return e.useMemo((()=>t?"string"===typeof t?null!==t&&void 0!==t?t:n:t instanceof Function?t(n):n:n),[t,n])},sc=e=>{const{componentCls:t,trackHeightSM:n,trackPadding:r,trackMinWidthSM:i,innerMinMarginSM:o,innerMaxMarginSM:a,handleSizeSM:s,calc:l}=e,c=`${t}-inner`,u=It(l(s).add(l(r).mul(2)).equal()),d=It(l(a).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:i,height:n,lineHeight:It(n),[`${t}-inner`]:{paddingInlineStart:a,paddingInlineEnd:o,[`${c}-checked, ${c}-unchecked`]:{minHeight:n},[`${c}-checked`]:{marginInlineStart:`calc(-100% + ${u} - ${d})`,marginInlineEnd:`calc(100% - ${u} + ${d})`},[`${c}-unchecked`]:{marginTop:l(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:s,height:s},[`${t}-loading-icon`]:{top:l(l(s).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:o,paddingInlineEnd:a,[`${c}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${c}-unchecked`]:{marginInlineStart:`calc(100% - ${u} + ${d})`,marginInlineEnd:`calc(-100% + ${u} - ${d})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${It(l(s).add(r).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${c}`]:{[`${c}-unchecked`]:{marginInlineStart:l(e.marginXXS).div(2).equal(),marginInlineEnd:l(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${c}`]:{[`${c}-checked`]:{marginInlineStart:l(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:l(e.marginXXS).div(2).equal()}}}}}}},lc=e=>{const{componentCls:t,handleSize:n,calc:r}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:r(r(n).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}},cc=e=>{const{componentCls:t,trackPadding:n,handleBg:r,handleShadow:i,handleSize:o,calc:a}=e,s=`${t}-handle`;return{[t]:{[s]:{position:"absolute",top:n,insetInlineStart:n,width:o,height:o,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:r,borderRadius:a(o).div(2).equal(),boxShadow:i,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${s}`]:{insetInlineStart:`calc(100% - ${It(a(o).add(n).equal())})`},[`&:not(${t}-disabled):active`]:{[`${s}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${s}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},uc=e=>{const{componentCls:t,trackHeight:n,trackPadding:r,innerMinMargin:i,innerMaxMargin:o,handleSize:a,calc:s}=e,l=`${t}-inner`,c=It(s(a).add(s(r).mul(2)).equal()),u=It(s(o).mul(2).equal());return{[t]:{[l]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:o,paddingInlineEnd:i,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${l}-checked, ${l}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:n},[`${l}-checked`]:{marginInlineStart:`calc(-100% + ${c} - ${u})`,marginInlineEnd:`calc(100% - ${c} + ${u})`},[`${l}-unchecked`]:{marginTop:s(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${l}`]:{paddingInlineStart:i,paddingInlineEnd:o,[`${l}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${l}-unchecked`]:{marginInlineStart:`calc(100% - ${c} + ${u})`,marginInlineEnd:`calc(-100% + ${c} - ${u})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${l}`]:{[`${l}-unchecked`]:{marginInlineStart:s(r).mul(2).equal(),marginInlineEnd:s(r).mul(-1).mul(2).equal()}},[`&${t}-checked ${l}`]:{[`${l}-checked`]:{marginInlineStart:s(r).mul(-1).mul(2).equal(),marginInlineEnd:s(r).mul(2).equal()}}}}}},dc=e=>{const{componentCls:t,trackHeight:n,trackMinWidth:r}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},Ma(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:r,height:n,lineHeight:It(n),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary}}),La(e)),{[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}})}},hc=ml("Switch",(e=>{const t=ol(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[dc(t),uc(t),cc(t),lc(t),sc(t)]}),(e=>{const{fontSize:t,lineHeight:n,controlHeight:r,colorWhite:i}=e,o=t*n,a=r/2,s=o-4,l=a-4;return{trackHeight:o,trackHeightSM:a,trackMinWidth:2*s+8,trackMinWidthSM:2*l+4,trackPadding:2,handleBg:i,handleSize:s,handleSizeSM:l,handleShadow:`0 2px 4px 0 ${new Oi("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:s/2,innerMaxMargin:s+2+4,innerMinMarginSM:l/2,innerMaxMarginSM:l+2+4}}));var fc=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const pc=e.forwardRef(((t,n)=>{const{prefixCls:r,size:i,disabled:o,loading:a,className:s,rootClassName:l,style:c,checked:u,value:d,defaultChecked:h,defaultValue:f,onChange:p}=t,m=fc(t,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[g,v]=Co(!1,{value:null!==u&&void 0!==u?u:d,defaultValue:null!==h&&void 0!==h?h:f}),{getPrefixCls:b,direction:y,switch:_}=e.useContext(Le),S=e.useContext(Wi),w=(null!==o&&void 0!==o?o:S)||a,C=b("switch",r),x=e.createElement("div",{className:`${C}-handle`},a&&e.createElement(xs,{className:`${C}-loading-icon`})),[E,k,O]=hc(C),$=ac(i),R=Ji()(null===_||void 0===_?void 0:_.className,{[`${C}-small`]:"small"===$,[`${C}-loading`]:a,[`${C}-rtl`]:"rtl"===y},s,l,k,O),I=Object.assign(Object.assign({},null===_||void 0===_?void 0:_.style),c);return E(e.createElement(oc,{component:"Switch"},e.createElement(ql,Object.assign({},m,{checked:g,onChange:function(){v(arguments.length<=0?void 0:arguments[0]),null===p||void 0===p||p.apply(void 0,arguments)},prefixCls:C,className:R,style:I,disabled:w,ref:n,loadingIcon:x}))))}));pc.__ANT_SWITCH=!0;const mc=pc;function gc(t){var n=t.children,r=t.prefixCls,i=t.id,o=t.overlayInnerStyle,a=t.className,s=t.style;return e.createElement("div",{className:Ji()("".concat(r,"-content"),a),style:s},e.createElement("div",{className:"".concat(r,"-inner"),id:i,role:"tooltip",style:o},"function"===typeof n?n():n))}const vc=e.createContext(null);var bc,yc=[];function _c(e){var t="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),n=document.createElement("div");n.id=t;var r,i,o=n.style;if(o.position="absolute",o.left="0",o.top="0",o.width="100px",o.height="100px",o.overflow="scroll",e){var a=getComputedStyle(e);o.scrollbarColor=a.scrollbarColor,o.scrollbarWidth=a.scrollbarWidth;var s=getComputedStyle(e,"::-webkit-scrollbar"),l=parseInt(s.width,10),c=parseInt(s.height,10);try{var u=l?"width: ".concat(s.width,";"):"",d=c?"height: ".concat(s.height,";"):"";Qe("\n#".concat(t,"::-webkit-scrollbar {\n").concat(u,"\n").concat(d,"\n}"),t)}catch(rI){console.error(rI),r=l,i=c}}document.body.appendChild(n);var h=e&&r&&!isNaN(r)?r:n.offsetWidth-n.clientWidth,f=e&&i&&!isNaN(i)?i:n.offsetHeight-n.clientHeight;return document.body.removeChild(n),Ye(t),{width:h,height:f}}function Sc(e){return"undefined"===typeof document?0:((e||void 0===bc)&&(bc=_c()),bc.width)}function wc(e){return"undefined"!==typeof document&&e&&e instanceof Element?_c(e):{width:0,height:0}}var Cc="rc-util-locker-".concat(Date.now()),xc=0;function Ec(t){var n=!!t,r=Be(e.useState((function(){return xc+=1,"".concat(Cc,"_").concat(xc)})),1)[0];Bt((function(){if(n){var e=wc(document.body).width,t=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth;Qe("\nhtml body {\n overflow-y: hidden;\n ".concat(t?"width: calc(100% - ".concat(e,"px);"):"","\n}"),r)}else Ye(r);return function(){Ye(r)}}),[n,r])}var kc=!1;var Oc=function(e){return!1!==e&&(ze()&&e?"string"===typeof e?document.querySelector(e):"function"===typeof e?e():e:null)};const $c=e.forwardRef((function(t,n){var r=t.open,i=t.autoLock,o=t.getContainer,a=(t.debug,t.autoDestroy),s=void 0===a||a,l=t.children,c=Be(e.useState(r),2),u=c[0],d=c[1],h=u||r;e.useEffect((function(){(s||r)&&d(r)}),[r,s]);var f=Be(e.useState((function(){return Oc(o)})),2),p=f[0],m=f[1];e.useEffect((function(){var e=Oc(o);m(null!==e&&void 0!==e?e:null)}));var g=function(t){var n=Be(e.useState((function(){return ze()?document.createElement("div"):null})),1)[0],r=e.useRef(!1),i=e.useContext(vc),o=Be(e.useState(yc),2),a=o[0],s=o[1],l=i||(r.current?void 0:function(e){s((function(t){return[e].concat(se(t))}))});function c(){n.parentElement||document.body.appendChild(n),r.current=!0}function u(){var e;null===(e=n.parentElement)||void 0===e||e.removeChild(n),r.current=!1}return Bt((function(){return t?i?i(c):c():u(),u}),[t]),Bt((function(){a.length&&(a.forEach((function(e){return e()})),s(yc))}),[a]),[n,l]}(h&&!p),v=Be(g,2),b=v[0],y=v[1],_=null!==p&&void 0!==p?p:b;Ec(i&&r&&ze()&&(_===b||_===document.body));var S=null;l&&ao(l)&&n&&(S=l.ref);var w=oo(S,n);if(!h||!ze()||void 0===p)return null;var C,x=!1===_||("boolean"===typeof C&&(kc=C),kc),E=l;return n&&(E=e.cloneElement(l,{ref:w})),e.createElement(vc.Provider,{value:y},x?E:(0,ve.createPortal)(E,_))}));function Rc(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[];return e.Children.forEach(t,(function(e){(void 0!==e&&null!==e||n.keepEmpty)&&(Array.isArray(e)?r=r.concat(Rc(e)):(0,no.isFragment)(e)&&e.props?r=r.concat(Rc(e.props.children,n)):r.push(e))})),r}var Ic=e.createContext(null);var Mc=function(){if("undefined"!==typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];e.call(t,i[1],i[0])}},t}()}(),Pc="undefined"!==typeof window&&"undefined"!==typeof document&&window.document===document,Nc="undefined"!==typeof n.g&&n.g.Math===Math?n.g:"undefined"!==typeof self&&self.Math===Math?self:"undefined"!==typeof window&&window.Math===Math?window:Function("return this")(),Lc="function"===typeof requestAnimationFrame?requestAnimationFrame.bind(Nc):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var Tc=["top","right","bottom","left","width","height","size","weight"],Dc="undefined"!==typeof MutationObserver,Ac=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,i=0;function o(){n&&(n=!1,e()),r&&s()}function a(){Lc(o)}function s(){var e=Date.now();if(n){if(e-i<2)return;r=!0}else n=!0,r=!1,setTimeout(a,t);i=e}return s}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){Pc&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Dc?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){Pc&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;Tc.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),Bc=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},jc=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||Nc},zc=Uc(0,0,0,0);function Hc(e){return parseFloat(e)||0}function Fc(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+Hc(e["border-"+n+"-width"])}),0)}function Wc(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return zc;var r=jc(e).getComputedStyle(e),i=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],o=e["padding-"+i];t[i]=Hc(o)}return t}(r),o=i.left+i.right,a=i.top+i.bottom,s=Hc(r.width),l=Hc(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==t&&(s-=Fc(r,"left","right")+o),Math.round(l+a)!==n&&(l-=Fc(r,"top","bottom")+a)),!function(e){return e===jc(e).document.documentElement}(e)){var c=Math.round(s+o)-t,u=Math.round(l+a)-n;1!==Math.abs(c)&&(s-=c),1!==Math.abs(u)&&(l-=u)}return Uc(i.left,i.top,s,l)}var Kc="undefined"!==typeof SVGGraphicsElement?function(e){return e instanceof jc(e).SVGGraphicsElement}:function(e){return e instanceof jc(e).SVGElement&&"function"===typeof e.getBBox};function Vc(e){return Pc?Kc(e)?function(e){var t=e.getBBox();return Uc(0,0,t.width,t.height)}(e):Wc(e):zc}function Uc(e,t,n,r){return{x:e,y:t,width:n,height:r}}var qc=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Uc(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=Vc(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),Xc=function(e,t){var n=function(e){var t=e.x,n=e.y,r=e.width,i=e.height,o="undefined"!==typeof DOMRectReadOnly?DOMRectReadOnly:Object,a=Object.create(o.prototype);return Bc(a,{x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:i+n,left:t}),a}(t);Bc(this,{target:e,contentRect:n})},Gc=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new Mc,"function"!==typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(e instanceof jc(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new qc(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(e instanceof jc(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new Xc(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),Yc="undefined"!==typeof WeakMap?new WeakMap:new Mc,Qc=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=Ac.getInstance(),r=new Gc(t,n,this);Yc.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){Qc.prototype[e]=function(){var t;return(t=Yc.get(this))[e].apply(t,arguments)}}));const Jc="undefined"!==typeof Nc.ResizeObserver?Nc.ResizeObserver:Qc;var Zc=new Map;var eu=new Jc((function(e){e.forEach((function(e){var t,n=e.target;null===(t=Zc.get(n))||void 0===t||t.forEach((function(e){return e(n)}))}))}));var tu=function(e){po(n,e);var t=bo(n);function n(){return st(this,n),t.apply(this,arguments)}return ct(n,[{key:"render",value:function(){return this.props.children}}]),n}(e.Component);function nu(t,n){var r=t.children,i=t.disabled,o=e.useRef(null),a=e.useRef(null),s=e.useContext(Ic),l="function"===typeof r,c=l?r(o):r,u=e.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),d=!l&&e.isValidElement(c)&&ao(c),h=d?c.ref:null,f=oo(h,o),p=function(){var e;return to(o.current)||(o.current&&"object"===le(o.current)?to(null===(e=o.current)||void 0===e?void 0:e.nativeElement):null)||to(a.current)};e.useImperativeHandle(n,(function(){return p()}));var m=e.useRef(t);m.current=t;var g=e.useCallback((function(e){var t=m.current,n=t.onResize,r=t.data,i=e.getBoundingClientRect(),o=i.width,a=i.height,l=e.offsetWidth,c=e.offsetHeight,d=Math.floor(o),h=Math.floor(a);if(u.current.width!==d||u.current.height!==h||u.current.offsetWidth!==l||u.current.offsetHeight!==c){var f={width:d,height:h,offsetWidth:l,offsetHeight:c};u.current=f;var p=l===Math.round(o)?o:l,g=c===Math.round(a)?a:c,v=me(me({},f),{},{offsetWidth:p,offsetHeight:g});null===s||void 0===s||s(v,e,r),n&&Promise.resolve().then((function(){n(v,e)}))}}),[]);return e.useEffect((function(){var e,t,n=p();return n&&!i&&(e=n,t=g,Zc.has(e)||(Zc.set(e,new Set),eu.observe(e)),Zc.get(e).add(t)),function(){return function(e,t){Zc.has(e)&&(Zc.get(e).delete(t),Zc.get(e).size||(eu.unobserve(e),Zc.delete(e)))}(n,g)}}),[o.current,i]),e.createElement(tu,{ref:a},d?e.cloneElement(c,{ref:f}):c)}const ru=e.forwardRef(nu);function iu(t,n){var r=t.children;return("function"===typeof r?[r]:Rc(r)).map((function(r,i){var o=(null===r||void 0===r?void 0:r.key)||"".concat("rc-observer-key","-").concat(i);return e.createElement(ru,Gt({},t,{key:o,ref:0===i?n:void 0}),r)}))}var ou=e.forwardRef(iu);ou.Collection=function(t){var n=t.children,r=t.onBatchResize,i=e.useRef(0),o=e.useRef([]),a=e.useContext(Ic),s=e.useCallback((function(e,t,n){i.current+=1;var s=i.current;o.current.push({size:e,element:t,data:n}),Promise.resolve().then((function(){s===i.current&&(null===r||void 0===r||r(o.current),o.current=[])})),null===a||void 0===a||a(e,t,n)}),[r,a]);return e.createElement(Ic.Provider,{value:s},n)};const au=ou;var su=0;var lu=me({},t).useId;const cu=lu?function(e){var t=lu();return e||t}:function(t){var n=Be(e.useState("ssr-id"),2),r=n[0],i=n[1];return e.useEffect((function(){var e=su;su+=1,i("rc_unique_".concat(e))}),[]),t||r},uu=function(){if("undefined"===typeof navigator||"undefined"===typeof window)return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(null===e||void 0===e?void 0:e.substr(0,4))};function du(t){var n=t.prefixCls,r=t.align,i=t.arrow,o=t.arrowPos,a=i||{},s=a.className,l=a.content,c=o.x,u=void 0===c?0:c,d=o.y,h=void 0===d?0:d,f=e.useRef();if(!r||!r.points)return null;var p={position:"absolute"};if(!1!==r.autoArrow){var m=r.points[0],g=r.points[1],v=m[0],b=m[1],y=g[0],_=g[1];v!==y&&["t","b"].includes(v)?"t"===v?p.top=0:p.bottom=0:p.top=h,b!==_&&["l","r"].includes(b)?"l"===b?p.left=0:p.right=0:p.left=u}return e.createElement("div",{ref:f,className:Ji()("".concat(n,"-arrow"),s),style:p},l)}function hu(t){var n=t.prefixCls,r=t.open,i=t.zIndex,o=t.mask,a=t.motion;return o?e.createElement(va,Gt({},a,{motionAppear:!0,visible:r,removeOnLeave:!0}),(function(t){var r=t.className;return e.createElement("div",{style:{zIndex:i},className:Ji()("".concat(n,"-mask"),r)})})):null}const fu=e.memo((function(e){return e.children}),(function(e,t){return t.cache}));const pu=e.forwardRef((function(t,n){var r=t.popup,i=t.className,o=t.prefixCls,a=t.style,s=t.target,l=t.onVisibleChanged,c=t.open,u=t.keepDom,d=t.fresh,h=t.onClick,f=t.mask,p=t.arrow,m=t.arrowPos,g=t.align,v=t.motion,b=t.maskMotion,y=t.forceRender,_=t.getPopupContainer,S=t.autoDestroy,w=t.portal,C=t.zIndex,x=t.onMouseEnter,E=t.onMouseLeave,k=t.onPointerEnter,O=t.onPointerDownCapture,$=t.ready,R=t.offsetX,I=t.offsetY,M=t.offsetR,P=t.offsetB,N=t.onAlign,L=t.onPrepare,T=t.stretch,D=t.targetWidth,A=t.targetHeight,B="function"===typeof r?r():r,j=c||u,z=(null===_||void 0===_?void 0:_.length)>0,H=Be(e.useState(!_||!z),2),F=H[0],W=H[1];if(Bt((function(){!F&&z&&s&&W(!0)}),[F,z,s]),!F)return null;var K="auto",V={left:"-1000vw",top:"-1000vh",right:K,bottom:K};if($||!c){var U,q=g.points,X=g.dynamicInset||(null===(U=g._experimental)||void 0===U?void 0:U.dynamicInset),G=X&&"r"===q[0][1],Y=X&&"b"===q[0][0];G?(V.right=M,V.left=K):(V.left=R,V.right=K),Y?(V.bottom=P,V.top=K):(V.top=I,V.bottom=K)}var Q={};return T&&(T.includes("height")&&A?Q.height=A:T.includes("minHeight")&&A&&(Q.minHeight=A),T.includes("width")&&D?Q.width=D:T.includes("minWidth")&&D&&(Q.minWidth=D)),c||(Q.pointerEvents="none"),e.createElement(w,{open:y||j,getContainer:_&&function(){return _(s)},autoDestroy:S},e.createElement(hu,{prefixCls:o,open:c,zIndex:C,mask:f,motion:b}),e.createElement(au,{onResize:N,disabled:!c},(function(t){return e.createElement(va,Gt({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:y,leavedClassName:"".concat(o,"-hidden")},v,{onAppearPrepare:L,onEnterPrepare:L,visible:c,onVisibleChanged:function(e){var t;null===v||void 0===v||null===(t=v.onVisibleChanged)||void 0===t||t.call(v,e),l(e)}}),(function(r,s){var l=r.className,u=r.style,f=Ji()(o,l,i);return e.createElement("div",{ref:io(t,n,s),className:f,style:me(me(me(me({"--arrow-x":"".concat(m.x||0,"px"),"--arrow-y":"".concat(m.y||0,"px")},V),Q),u),{},{boxSizing:"border-box",zIndex:C},a),onMouseEnter:x,onMouseLeave:E,onPointerEnter:k,onClick:h,onPointerDownCapture:O},p&&e.createElement(du,{prefixCls:o,arrow:p,arrowPos:m,align:g}),e.createElement(fu,{cache:!c&&!d},B))}))})))}));const mu=e.forwardRef((function(t,n){var r=t.children,i=t.getTriggerDOMNode,o=ao(r),a=e.useCallback((function(e){ro(n,i?i(e):e)}),[i]),s=oo(a,r.ref);return o?e.cloneElement(r,{ref:s}):r}));const gu=e.createContext(null);function vu(e){return e?Array.isArray(e)?e:[e]:[]}function bu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(arguments.length>2?arguments[2]:void 0)?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function yu(e,t,n,r){return t||(n?{motionName:"".concat(e,"-").concat(n)}:r?{motionName:r}:null)}function _u(e){return e.ownerDocument.defaultView}function Su(e){for(var t=[],n=null===e||void 0===e?void 0:e.parentElement,r=["hidden","scroll","clip","auto"];n;){var i=_u(n).getComputedStyle(n);[i.overflowX,i.overflowY,i.overflow].some((function(e){return r.includes(e)}))&&t.push(n),n=n.parentElement}return t}function wu(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Number.isNaN(e)?t:e}function Cu(e){return wu(parseFloat(e),0)}function xu(e,t){var n=me({},e);return(t||[]).forEach((function(e){if(!(e instanceof HTMLBodyElement||e instanceof HTMLHtmlElement)){var t=_u(e).getComputedStyle(e),r=t.overflow,i=t.overflowClipMargin,o=t.borderTopWidth,a=t.borderBottomWidth,s=t.borderLeftWidth,l=t.borderRightWidth,c=e.getBoundingClientRect(),u=e.offsetHeight,d=e.clientHeight,h=e.offsetWidth,f=e.clientWidth,p=Cu(o),m=Cu(a),g=Cu(s),v=Cu(l),b=wu(Math.round(c.width/h*1e3)/1e3),y=wu(Math.round(c.height/u*1e3)/1e3),_=(h-f-g-v)*b,S=(u-d-p-m)*y,w=p*y,C=m*y,x=g*b,E=v*b,k=0,O=0;if("clip"===r){var $=Cu(i);k=$*b,O=$*y}var R=c.x+x-k,I=c.y+w-O,M=R+c.width+2*k-x-E-_,P=I+c.height+2*O-w-C-S;n.left=Math.max(n.left,R),n.top=Math.max(n.top,I),n.right=Math.min(n.right,M),n.bottom=Math.min(n.bottom,P)}})),n}function Eu(e){var t="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),n=t.match(/^(.*)\%$/);return n?e*(parseFloat(n[1])/100):parseFloat(t)}function ku(e,t){var n=Be(t||[],2),r=n[0],i=n[1];return[Eu(e.width,r),Eu(e.height,i)]}function Ou(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return[e[0],e[1]]}function $u(e,t){var n,r=t[0],i=t[1];return n="t"===r?e.y:"b"===r?e.y+e.height:e.y+e.height/2,{x:"l"===i?e.x:"r"===i?e.x+e.width:e.x+e.width/2,y:n}}function Ru(e,t){var n={t:"b",b:"t",l:"r",r:"l"};return e.map((function(e,r){return r===t?n[e]||"c":e})).join("")}var Iu=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];const Mu=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$c,n=e.forwardRef((function(n,r){var i=n.prefixCls,o=void 0===i?"rc-trigger-popup":i,a=n.children,s=n.action,l=void 0===s?"hover":s,c=n.showAction,u=n.hideAction,d=n.popupVisible,h=n.defaultPopupVisible,f=n.onPopupVisibleChange,p=n.afterPopupVisibleChange,m=n.mouseEnterDelay,g=n.mouseLeaveDelay,v=void 0===g?.1:g,b=n.focusDelay,y=n.blurDelay,_=n.mask,S=n.maskClosable,w=void 0===S||S,C=n.getPopupContainer,x=n.forceRender,E=n.autoDestroy,k=n.destroyPopupOnHide,O=n.popup,$=n.popupClassName,R=n.popupStyle,I=n.popupPlacement,M=n.builtinPlacements,P=void 0===M?{}:M,N=n.popupAlign,L=n.zIndex,T=n.stretch,D=n.getPopupClassNameFromAlign,A=n.fresh,B=n.alignPoint,j=n.onPopupClick,z=n.onPopupAlign,H=n.arrow,F=n.popupMotion,W=n.maskMotion,K=n.popupTransitionName,V=n.popupAnimation,U=n.maskTransitionName,q=n.maskAnimation,X=n.className,G=n.getTriggerDOMNode,Y=lo(n,Iu),Q=E||k||!1,J=Be(e.useState(!1),2),Z=J[0],ee=J[1];Bt((function(){ee(uu())}),[]);var te=e.useRef({}),ne=e.useContext(gu),re=e.useMemo((function(){return{registerSubPopup:function(e,t){te.current[e]=t,null===ne||void 0===ne||ne.registerSubPopup(e,t)}}}),[ne]),ie=cu(),oe=Be(e.useState(null),2),ae=oe[0],le=oe[1],ce=e.useRef(null),ue=_o((function(e){ce.current=e,Zi(e)&&ae!==e&&le(e),null===ne||void 0===ne||ne.registerSubPopup(ie,e)})),de=Be(e.useState(null),2),he=de[0],fe=de[1],pe=e.useRef(null),ge=_o((function(e){Zi(e)&&he!==e&&(fe(e),pe.current=e)})),ve=e.Children.only(a),be=(null===ve||void 0===ve?void 0:ve.props)||{},ye={},_e=_o((function(e){var t,n,r=he;return(null===r||void 0===r?void 0:r.contains(e))||(null===(t=Qa(r))||void 0===t?void 0:t.host)===e||e===r||(null===ae||void 0===ae?void 0:ae.contains(e))||(null===(n=Qa(ae))||void 0===n?void 0:n.host)===e||e===ae||Object.values(te.current).some((function(t){return(null===t||void 0===t?void 0:t.contains(e))||e===t}))})),Se=yu(o,F,V,K),we=yu(o,W,q,U),Ce=Be(e.useState(h||!1),2),xe=Ce[0],Ee=Ce[1],ke=null!==d&&void 0!==d?d:xe,Oe=_o((function(e){void 0===d&&Ee(e)}));Bt((function(){Ee(d||!1)}),[d]);var $e=e.useRef(ke);$e.current=ke;var Re=e.useRef([]);Re.current=[];var Ie=_o((function(e){var t;Oe(e),(null!==(t=Re.current[Re.current.length-1])&&void 0!==t?t:ke)!==e&&(Re.current.push(e),null===f||void 0===f||f(e))})),Me=e.useRef(),Pe=function(){clearTimeout(Me.current)},Ne=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;Pe(),0===t?Ie(e):Me.current=setTimeout((function(){Ie(e)}),1e3*t)};e.useEffect((function(){return Pe}),[]);var Le=Be(e.useState(!1),2),Te=Le[0],De=Le[1];Bt((function(e){e&&!ke||De(!0)}),[ke]);var Ae=Be(e.useState(null),2),je=Ae[0],ze=Ae[1],He=Be(e.useState(null),2),Fe=He[0],We=He[1],Ke=function(e){We([e.clientX,e.clientY])},Ve=function(t,n,r,i,o,a,s){var l=Be(e.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:o[i]||{}}),2),c=l[0],u=l[1],d=e.useRef(0),h=e.useMemo((function(){return n?Su(n):[]}),[n]),f=e.useRef({});t||(f.current={});var p=_o((function(){if(n&&r&&t){var e,l,c,d,p,m=n,g=m.ownerDocument,v=_u(m).getComputedStyle(m),b=v.width,y=v.height,_=v.position,S=m.style.left,w=m.style.top,C=m.style.right,x=m.style.bottom,E=m.style.overflow,k=me(me({},o[i]),a),O=g.createElement("div");if(null===(e=m.parentElement)||void 0===e||e.appendChild(O),O.style.left="".concat(m.offsetLeft,"px"),O.style.top="".concat(m.offsetTop,"px"),O.style.position=_,O.style.height="".concat(m.offsetHeight,"px"),O.style.width="".concat(m.offsetWidth,"px"),m.style.left="0",m.style.top="0",m.style.right="auto",m.style.bottom="auto",m.style.overflow="hidden",Array.isArray(r))p={x:r[0],y:r[1],width:0,height:0};else{var $,R,I=r.getBoundingClientRect();I.x=null!==($=I.x)&&void 0!==$?$:I.left,I.y=null!==(R=I.y)&&void 0!==R?R:I.top,p={x:I.x,y:I.y,width:I.width,height:I.height}}var M=m.getBoundingClientRect();M.x=null!==(l=M.x)&&void 0!==l?l:M.left,M.y=null!==(c=M.y)&&void 0!==c?c:M.top;var P=g.documentElement,N=P.clientWidth,L=P.clientHeight,T=P.scrollWidth,D=P.scrollHeight,A=P.scrollTop,B=P.scrollLeft,j=M.height,z=M.width,H=p.height,F=p.width,W={left:0,top:0,right:N,bottom:L},K={left:-B,top:-A,right:T-B,bottom:D-A},V=k.htmlRegion,U="visible",q="visibleFirst";"scroll"!==V&&V!==q&&(V=U);var X=V===q,G=xu(K,h),Y=xu(W,h),Q=V===U?Y:G,J=X?Y:Q;m.style.left="auto",m.style.top="auto",m.style.right="0",m.style.bottom="0";var Z=m.getBoundingClientRect();m.style.left=S,m.style.top=w,m.style.right=C,m.style.bottom=x,m.style.overflow=E,null===(d=m.parentElement)||void 0===d||d.removeChild(O);var ee=wu(Math.round(z/parseFloat(b)*1e3)/1e3),te=wu(Math.round(j/parseFloat(y)*1e3)/1e3);if(0===ee||0===te||Zi(r)&&!Xl(r))return;var ne=k.offset,re=k.targetOffset,ie=Be(ku(M,ne),2),oe=ie[0],ae=ie[1],se=Be(ku(p,re),2),le=se[0],ce=se[1];p.x-=le,p.y-=ce;var ue=Be(k.points||[],2),de=ue[0],he=Ou(ue[1]),fe=Ou(de),pe=$u(p,he),ge=$u(M,fe),ve=me({},k),be=pe.x-ge.x+oe,ye=pe.y-ge.y+ae;function ft(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Q,r=M.x+e,i=M.y+t,o=r+z,a=i+j,s=Math.max(r,n.left),l=Math.max(i,n.top),c=Math.min(o,n.right),u=Math.min(a,n.bottom);return Math.max(0,(c-s)*(u-l))}var _e,Se,we,Ce,xe=ft(be,ye),Ee=ft(be,ye,Y),ke=$u(p,["t","l"]),Oe=$u(M,["t","l"]),$e=$u(p,["b","r"]),Re=$u(M,["b","r"]),Ie=k.overflow||{},Me=Ie.adjustX,Pe=Ie.adjustY,Ne=Ie.shiftX,Le=Ie.shiftY,Te=function(e){return"boolean"===typeof e?e:e>=0};function pt(){_e=M.y+ye,Se=_e+j,we=M.x+be,Ce=we+z}pt();var De=Te(Pe),Ae=fe[0]===he[0];if(De&&"t"===fe[0]&&(Se>J.bottom||f.current.bt)){var je=ye;Ae?je-=j-H:je=ke.y-Re.y-ae;var ze=ft(be,je),He=ft(be,je,Y);ze>xe||ze===xe&&(!X||He>=Ee)?(f.current.bt=!0,ye=je,ae=-ae,ve.points=[Ru(fe,0),Ru(he,0)]):f.current.bt=!1}if(De&&"b"===fe[0]&&(_e<J.top||f.current.tb)){var Fe=ye;Ae?Fe+=j-H:Fe=$e.y-Oe.y-ae;var We=ft(be,Fe),Ke=ft(be,Fe,Y);We>xe||We===xe&&(!X||Ke>=Ee)?(f.current.tb=!0,ye=Fe,ae=-ae,ve.points=[Ru(fe,0),Ru(he,0)]):f.current.tb=!1}var Ve=Te(Me),Ue=fe[1]===he[1];if(Ve&&"l"===fe[1]&&(Ce>J.right||f.current.rl)){var qe=be;Ue?qe-=z-F:qe=ke.x-Re.x-oe;var Xe=ft(qe,ye),Ge=ft(qe,ye,Y);Xe>xe||Xe===xe&&(!X||Ge>=Ee)?(f.current.rl=!0,be=qe,oe=-oe,ve.points=[Ru(fe,1),Ru(he,1)]):f.current.rl=!1}if(Ve&&"r"===fe[1]&&(we<J.left||f.current.lr)){var Ye=be;Ue?Ye+=z-F:Ye=$e.x-Oe.x-oe;var Qe=ft(Ye,ye),Je=ft(Ye,ye,Y);Qe>xe||Qe===xe&&(!X||Je>=Ee)?(f.current.lr=!0,be=Ye,oe=-oe,ve.points=[Ru(fe,1),Ru(he,1)]):f.current.lr=!1}pt();var Ze=!0===Ne?0:Ne;"number"===typeof Ze&&(we<Y.left&&(be-=we-Y.left-oe,p.x+F<Y.left+Ze&&(be+=p.x-Y.left+F-Ze)),Ce>Y.right&&(be-=Ce-Y.right-oe,p.x>Y.right-Ze&&(be+=p.x-Y.right+Ze)));var et=!0===Le?0:Le;"number"===typeof et&&(_e<Y.top&&(ye-=_e-Y.top-ae,p.y+H<Y.top+et&&(ye+=p.y-Y.top+H-et)),Se>Y.bottom&&(ye-=Se-Y.bottom-ae,p.y>Y.bottom-et&&(ye+=p.y-Y.bottom+et)));var tt=M.x+be,nt=tt+z,rt=M.y+ye,it=rt+j,ot=p.x,at=ot+F,st=p.y,lt=st+H,ct=(Math.max(tt,ot)+Math.min(nt,at))/2-tt,ut=(Math.max(rt,st)+Math.min(it,lt))/2-rt;null===s||void 0===s||s(n,ve);var dt=Z.right-M.x-(be+M.width),ht=Z.bottom-M.y-(ye+M.height);1===ee&&(be=Math.round(be),dt=Math.round(dt)),1===te&&(ye=Math.round(ye),ht=Math.round(ht)),u({ready:!0,offsetX:be/ee,offsetY:ye/te,offsetR:dt/ee,offsetB:ht/te,arrowX:ct/ee,arrowY:ut/te,scaleX:ee,scaleY:te,align:ve})}})),m=function(){u((function(e){return me(me({},e),{},{ready:!1})}))};return Bt(m,[i]),Bt((function(){t||m()}),[t]),[c.ready,c.offsetX,c.offsetY,c.offsetR,c.offsetB,c.arrowX,c.arrowY,c.scaleX,c.scaleY,c.align,function(){d.current+=1;var e=d.current;Promise.resolve().then((function(){d.current===e&&p()}))}]}(ke,ae,B&&null!==Fe?Fe:he,I,P,N,z),Ue=Be(Ve,11),qe=Ue[0],Xe=Ue[1],Ge=Ue[2],Ye=Ue[3],Qe=Ue[4],Je=Ue[5],Ze=Ue[6],et=Ue[7],tt=Ue[8],nt=Ue[9],rt=Ue[10],it=function(t,n,r,i){return e.useMemo((function(){var e=vu(null!==r&&void 0!==r?r:n),o=vu(null!==i&&void 0!==i?i:n),a=new Set(e),s=new Set(o);return t&&(a.has("hover")&&(a.delete("hover"),a.add("click")),s.has("hover")&&(s.delete("hover"),s.add("click"))),[a,s]}),[t,n,r,i])}(Z,l,c,u),ot=Be(it,2),at=ot[0],st=ot[1],lt=at.has("click"),ct=st.has("click")||st.has("contextMenu"),ut=_o((function(){Te||rt()}));!function(e,t,n,r,i){Bt((function(){if(e&&t&&n){var o=n,a=Su(t),s=Su(o),l=_u(o),c=new Set([l].concat(se(a),se(s)));function u(){r(),i()}return c.forEach((function(e){e.addEventListener("scroll",u,{passive:!0})})),l.addEventListener("resize",u,{passive:!0}),r(),function(){c.forEach((function(e){e.removeEventListener("scroll",u),l.removeEventListener("resize",u)}))}}}),[e,t,n])}(ke,he,ae,ut,(function(){$e.current&&B&&ct&&Ne(!1)})),Bt((function(){ut()}),[Fe,I]),Bt((function(){!ke||null!==P&&void 0!==P&&P[I]||ut()}),[JSON.stringify(N)]);var dt=e.useMemo((function(){var e=function(e,t,n,r){for(var i=n.points,o=Object.keys(e),a=0;a<o.length;a+=1){var s,l=o[a];if(bu(null===(s=e[l])||void 0===s?void 0:s.points,i,r))return"".concat(t,"-placement-").concat(l)}return""}(P,o,nt,B);return Ji()(e,null===D||void 0===D?void 0:D(nt))}),[nt,D,P,o,B]);e.useImperativeHandle(r,(function(){return{nativeElement:pe.current,popupElement:ce.current,forceAlign:ut}}));var ht=Be(e.useState(0),2),ft=ht[0],pt=ht[1],mt=Be(e.useState(0),2),gt=mt[0],vt=mt[1],bt=function(){if(T&&he){var e=he.getBoundingClientRect();pt(e.width),vt(e.height)}};function yt(e,t,n,r){ye[e]=function(i){var o;null===r||void 0===r||r(i),Ne(t,n);for(var a=arguments.length,s=new Array(a>1?a-1:0),l=1;l<a;l++)s[l-1]=arguments[l];null===(o=be[e])||void 0===o||o.call.apply(o,[be,i].concat(s))}}Bt((function(){je&&(rt(),je(),ze(null))}),[je]),(lt||ct)&&(ye.onClick=function(e){var t;$e.current&&ct?Ne(!1):!$e.current&<&&(Ke(e),Ne(!0));for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];null===(t=be.onClick)||void 0===t||t.call.apply(t,[be,e].concat(r))});var _t,St,wt=function(t,n,r,i,o,a,s,l){var c=e.useRef(t);c.current=t;var u=e.useRef(!1);return e.useEffect((function(){if(n&&i&&(!o||a)){var e=function(){u.current=!1},t=function(e){var t;!c.current||s((null===(t=e.composedPath)||void 0===t||null===(t=t.call(e))||void 0===t?void 0:t[0])||e.target)||u.current||l(!1)},d=_u(i);d.addEventListener("pointerdown",e,!0),d.addEventListener("mousedown",t,!0),d.addEventListener("contextmenu",t,!0);var h=Qa(r);return h&&(h.addEventListener("mousedown",t,!0),h.addEventListener("contextmenu",t,!0)),function(){d.removeEventListener("pointerdown",e,!0),d.removeEventListener("mousedown",t,!0),d.removeEventListener("contextmenu",t,!0),h&&(h.removeEventListener("mousedown",t,!0),h.removeEventListener("contextmenu",t,!0))}}}),[n,r,i,o,a]),function(){u.current=!0}}(ke,ct,he,ae,_,w,_e,Ne),Ct=at.has("hover"),xt=st.has("hover");Ct&&(yt("onMouseEnter",!0,m,(function(e){Ke(e)})),yt("onPointerEnter",!0,m,(function(e){Ke(e)})),_t=function(e){(ke||Te)&&null!==ae&&void 0!==ae&&ae.contains(e.target)&&Ne(!0,m)},B&&(ye.onMouseMove=function(e){var t;null===(t=be.onMouseMove)||void 0===t||t.call(be,e)})),xt&&(yt("onMouseLeave",!1,v),yt("onPointerLeave",!1,v),St=function(){Ne(!1,v)}),at.has("focus")&&yt("onFocus",!0,b),st.has("focus")&&yt("onBlur",!1,y),at.has("contextMenu")&&(ye.onContextMenu=function(e){var t;$e.current&&st.has("contextMenu")?Ne(!1):(Ke(e),Ne(!0)),e.preventDefault();for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];null===(t=be.onContextMenu)||void 0===t||t.call.apply(t,[be,e].concat(r))}),X&&(ye.className=Ji()(be.className,X));var Et=me(me({},be),ye),kt={};["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"].forEach((function(e){Y[e]&&(kt[e]=function(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];null===(t=Et[e])||void 0===t||t.call.apply(t,[Et].concat(r)),Y[e].apply(Y,r)})}));var Ot=e.cloneElement(ve,me(me({},Et),kt)),$t={x:Je,y:Ze},Rt=H?me({},!0!==H?H:{}):null;return e.createElement(e.Fragment,null,e.createElement(au,{disabled:!ke,ref:ge,onResize:function(){bt(),ut()}},e.createElement(mu,{getTriggerDOMNode:G},Ot)),e.createElement(gu.Provider,{value:re},e.createElement(pu,{portal:t,ref:ue,prefixCls:o,popup:O,className:Ji()($,dt),style:R,target:he,onMouseEnter:_t,onMouseLeave:St,onPointerEnter:_t,zIndex:L,open:ke,keepDom:Te,fresh:A,onClick:j,onPointerDownCapture:wt,mask:_,motion:Se,maskMotion:we,onVisibleChanged:function(e){De(!1),rt(),null===p||void 0===p||p(e)},onPrepare:function(){return new Promise((function(e){bt(),ze((function(){return e}))}))},forceRender:x,autoDestroy:Q,getPopupContainer:C,align:nt,arrow:Rt,arrowPos:$t,ready:qe,offsetX:Xe,offsetY:Ge,offsetR:Ye,offsetB:Qe,onAlign:ut,stretch:T,targetWidth:ft/et,targetHeight:gt/tt})))}));return n}($c);var Pu={shiftX:64,adjustY:1},Nu={adjustX:1,shiftY:!0},Lu=[0,0],Tu={left:{points:["cr","cl"],overflow:Nu,offset:[-4,0],targetOffset:Lu},right:{points:["cl","cr"],overflow:Nu,offset:[4,0],targetOffset:Lu},top:{points:["bc","tc"],overflow:Pu,offset:[0,-4],targetOffset:Lu},bottom:{points:["tc","bc"],overflow:Pu,offset:[0,4],targetOffset:Lu},topLeft:{points:["bl","tl"],overflow:Pu,offset:[0,-4],targetOffset:Lu},leftTop:{points:["tr","tl"],overflow:Nu,offset:[-4,0],targetOffset:Lu},topRight:{points:["br","tr"],overflow:Pu,offset:[0,-4],targetOffset:Lu},rightTop:{points:["tl","tr"],overflow:Nu,offset:[4,0],targetOffset:Lu},bottomRight:{points:["tr","br"],overflow:Pu,offset:[0,4],targetOffset:Lu},rightBottom:{points:["bl","br"],overflow:Nu,offset:[4,0],targetOffset:Lu},bottomLeft:{points:["tl","bl"],overflow:Pu,offset:[0,4],targetOffset:Lu},leftBottom:{points:["br","bl"],overflow:Nu,offset:[-4,0],targetOffset:Lu}};var Du=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"],Au=function(t,n){var r=t.overlayClassName,i=t.trigger,o=void 0===i?["hover"]:i,a=t.mouseEnterDelay,s=void 0===a?0:a,l=t.mouseLeaveDelay,c=void 0===l?.1:l,u=t.overlayStyle,d=t.prefixCls,h=void 0===d?"rc-tooltip":d,f=t.children,p=t.onVisibleChange,m=t.afterVisibleChange,g=t.transitionName,v=t.animation,b=t.motion,y=t.placement,_=void 0===y?"right":y,S=t.align,w=void 0===S?{}:S,C=t.destroyTooltipOnHide,x=void 0!==C&&C,E=t.defaultVisible,k=t.getTooltipContainer,O=t.overlayInnerStyle,$=(t.arrowContent,t.overlay),R=t.id,I=t.showArrow,M=void 0===I||I,P=lo(t,Du),N=(0,e.useRef)(null);(0,e.useImperativeHandle)(n,(function(){return N.current}));var L=me({},P);"visible"in t&&(L.popupVisible=t.visible);return e.createElement(Mu,Gt({popupClassName:r,prefixCls:h,popup:function(){return e.createElement(gc,{key:"content",prefixCls:h,id:R,overlayInnerStyle:O},$)},action:o,builtinPlacements:Tu,popupPlacement:_,ref:N,popupAlign:w,getPopupContainer:k,onPopupVisibleChange:p,afterPopupVisibleChange:m,popupTransitionName:g,popupAnimation:v,popupMotion:b,defaultPopupVisible:E,autoDestroy:x,mouseLeaveDelay:c,popupStyle:u,mouseEnterDelay:s,arrow:M},L),f)};const Bu=(0,e.forwardRef)(Au);var ju="RC_FORM_INTERNAL_HOOKS",zu=function(){ot(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")};const Hu=e.createContext({getFieldValue:zu,getFieldsValue:zu,getFieldError:zu,getFieldWarning:zu,getFieldsError:zu,isFieldsTouched:zu,isFieldTouched:zu,isFieldValidating:zu,isFieldsValidating:zu,resetFields:zu,setFields:zu,setFieldValue:zu,setFieldsValue:zu,validateFields:zu,submit:zu,getInternalHooks:function(){return zu(),{dispatch:zu,initEntityValue:zu,registerField:zu,useSubscribe:zu,setInitialValues:zu,destroyForm:zu,setCallbacks:zu,registerWatch:zu,getFields:zu,setValidateMessages:zu,setPreserve:zu,getInitialValue:zu}}});const Fu=e.createContext(null);function Wu(e){return void 0===e||null===e?[]:Array.isArray(e)?e:[e]}function Ku(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var Vu=Ku();function Uu(e){var t="function"==typeof Map?new Map:void 0;return Uu=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(go())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&fo(i,n.prototype),i}(e,arguments,mo(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),fo(n,e)},Uu(e)}var qu=/%[sdj%]/g;function Xu(e){if(!e||!e.length)return null;var t={};return e.forEach((function(e){var n=e.field;t[n]=t[n]||[],t[n].push(e)})),t}function Gu(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=0,o=n.length;return"function"===typeof e?e.apply(null,n):"string"===typeof e?e.replace(qu,(function(e){if("%%"===e)return"%";if(i>=o)return e;switch(e){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch(t){return"[Circular]"}break;default:return e}})):e}function Yu(e,t){return void 0===e||null===e||(!("array"!==t||!Array.isArray(e)||e.length)||!(!function(e){return"string"===e||"url"===e||"hex"===e||"email"===e||"date"===e||"pattern"===e}(t)||"string"!==typeof e||e))}function Qu(e,t,n){var r=0,i=e.length;!function o(a){if(a&&a.length)n(a);else{var s=r;r+=1,s<i?t(e[s],o):n([])}}([])}var Ju=function(e){po(n,e);var t=bo(n);function n(e,r){var i;return st(this,n),fe(vo(i=t.call(this,"Async Validation Error")),"errors",void 0),fe(vo(i),"fields",void 0),i.errors=e,i.fields=r,i}return ct(n)}(Uu(Error));function Zu(e,t,n,r,i){if(t.first){var o=new Promise((function(t,o){var a=function(e){var t=[];return Object.keys(e).forEach((function(n){t.push.apply(t,se(e[n]||[]))})),t}(e);Qu(a,n,(function(e){return r(e),e.length?o(new Ju(e,Xu(e))):t(i)}))}));return o.catch((function(e){return e})),o}var a=!0===t.firstFields?Object.keys(e):t.firstFields||[],s=Object.keys(e),l=s.length,c=0,u=[],d=new Promise((function(t,o){var d=function(e){if(u.push.apply(u,e),++c===l)return r(u),u.length?o(new Ju(u,Xu(u))):t(i)};s.length||(r(u),t(i)),s.forEach((function(t){var r=e[t];-1!==a.indexOf(t)?Qu(r,n,d):function(e,t,n){var r=[],i=0,o=e.length;function a(e){r.push.apply(r,se(e||[])),++i===o&&n(r)}e.forEach((function(e){t(e,a)}))}(r,n,d)}))}));return d.catch((function(e){return e})),d}function ed(e,t){return function(n){var r,i;return r=e.fullFields?function(e,t){for(var n=e,r=0;r<t.length;r++){if(void 0==n)return n;n=n[t[r]]}return n}(t,e.fullFields):t[n.field||e.fullField],(i=n)&&void 0!==i.message?(n.field=n.field||e.fullField,n.fieldValue=r,n):{message:"function"===typeof n?n():n,fieldValue:r,field:n.field||e.fullField}}}function td(e,t){if(t)for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];"object"===le(r)&&"object"===le(e[n])?e[n]=me(me({},e[n]),r):e[n]=r}return e}var nd="enum";const rd=function(e,t,n,r,i){var o="number"===typeof e.len,a="number"===typeof e.min,s="number"===typeof e.max,l=t,c=null,u="number"===typeof t,d="string"===typeof t,h=Array.isArray(t);if(u?c="number":d?c="string":h&&(c="array"),!c)return!1;h&&(l=t.length),d&&(l=t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length),o?l!==e.len&&r.push(Gu(i.messages[c].len,e.fullField,e.len)):a&&!s&&l<e.min?r.push(Gu(i.messages[c].min,e.fullField,e.min)):s&&!a&&l>e.max?r.push(Gu(i.messages[c].max,e.fullField,e.max)):a&&s&&(l<e.min||l>e.max)&&r.push(Gu(i.messages[c].range,e.fullField,e.min,e.max))};const id=function(e,t,n,r,i,o){!e.required||n.hasOwnProperty(e.field)&&!Yu(t,o||e.type)||r.push(Gu(i.messages.required,e.fullField))};var od;var ad=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,sd=/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i,ld={integer:function(e){return ld.number(e)&&parseInt(e,10)===e},float:function(e){return ld.number(e)&&!ld.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(rI){return!1}},date:function(e){return"function"===typeof e.getTime&&"function"===typeof e.getMonth&&"function"===typeof e.getYear&&!isNaN(e.getTime())},number:function(e){return!isNaN(e)&&"number"===typeof e},object:function(e){return"object"===le(e)&&!ld.array(e)},method:function(e){return"function"===typeof e},email:function(e){return"string"===typeof e&&e.length<=320&&!!e.match(ad)},url:function(e){return"string"===typeof e&&e.length<=2048&&!!e.match(function(){if(od)return od;var e="[a-fA-F\\d:]",t=function(t){return t&&t.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(e,")|(?<=").concat(e,")(?=\\s|$))"):""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",i=["(?:".concat(r,":){7}(?:").concat(r,"|:)"),"(?:".concat(r,":){6}(?:").concat(n,"|:").concat(r,"|:)"),"(?:".concat(r,":){5}(?::").concat(n,"|(?::").concat(r,"){1,2}|:)"),"(?:".concat(r,":){4}(?:(?::").concat(r,"){0,1}:").concat(n,"|(?::").concat(r,"){1,3}|:)"),"(?:".concat(r,":){3}(?:(?::").concat(r,"){0,2}:").concat(n,"|(?::").concat(r,"){1,4}|:)"),"(?:".concat(r,":){2}(?:(?::").concat(r,"){0,3}:").concat(n,"|(?::").concat(r,"){1,5}|:)"),"(?:".concat(r,":){1}(?:(?::").concat(r,"){0,4}:").concat(n,"|(?::").concat(r,"){1,6}|:)"),"(?::(?:(?::".concat(r,"){0,5}:").concat(n,"|(?::").concat(r,"){1,7}|:))")],o="(?:".concat(i.join("|"),")").concat("(?:%[0-9a-zA-Z]{1,})?"),a=new RegExp("(?:^".concat(n,"$)|(?:^").concat(o,"$)")),s=new RegExp("^".concat(n,"$")),l=new RegExp("^".concat(o,"$")),c=function(e){return e&&e.exact?a:new RegExp("(?:".concat(t(e)).concat(n).concat(t(e),")|(?:").concat(t(e)).concat(o).concat(t(e),")"),"g")};c.v4=function(e){return e&&e.exact?s:new RegExp("".concat(t(e)).concat(n).concat(t(e)),"g")},c.v6=function(e){return e&&e.exact?l:new RegExp("".concat(t(e)).concat(o).concat(t(e)),"g")};var u=c.v4().source,d=c.v6().source,h="(?:".concat("(?:(?:[a-z]+:)?//)","|www\\.)").concat("(?:\\S+(?::\\S*)?@)?","(?:localhost|").concat(u,"|").concat(d,"|").concat("(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)").concat("(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*").concat("(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",")").concat("(?::\\d{2,5})?").concat('(?:[/?#][^\\s"]*)?');return od=new RegExp("(?:^".concat(h,"$)"),"i")}())},hex:function(e){return"string"===typeof e&&!!e.match(sd)}};const cd=function(e,t,n,r,i){if(e.required&&void 0===t)id(e,t,n,r,i);else{var o=e.type;["integer","float","array","regexp","object","method","email","number","date","url","hex"].indexOf(o)>-1?ld[o](t)||r.push(Gu(i.messages.types[o],e.fullField,e.type)):o&&le(t)!==e.type&&r.push(Gu(i.messages.types[o],e.fullField,e.type))}};const ud={required:id,whitespace:function(e,t,n,r,i){(/^\s+$/.test(t)||""===t)&&r.push(Gu(i.messages.whitespace,e.fullField))},type:cd,range:rd,enum:function(e,t,n,r,i){e[nd]=Array.isArray(e[nd])?e[nd]:[],-1===e[nd].indexOf(t)&&r.push(Gu(i.messages[nd],e.fullField,e[nd].join(", ")))},pattern:function(e,t,n,r,i){if(e.pattern)if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||r.push(Gu(i.messages.pattern.mismatch,e.fullField,t,e.pattern));else if("string"===typeof e.pattern){new RegExp(e.pattern).test(t)||r.push(Gu(i.messages.pattern.mismatch,e.fullField,t,e.pattern))}}};const dd=function(e,t,n,r,i){var o=e.type,a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Yu(t,o)&&!e.required)return n();ud.required(e,t,r,a,i,o),Yu(t,o)||ud.type(e,t,r,a,i)}n(a)},hd={string:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Yu(t,"string")&&!e.required)return n();ud.required(e,t,r,o,i,"string"),Yu(t,"string")||(ud.type(e,t,r,o,i),ud.range(e,t,r,o,i),ud.pattern(e,t,r,o,i),!0===e.whitespace&&ud.whitespace(e,t,r,o,i))}n(o)},method:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Yu(t)&&!e.required)return n();ud.required(e,t,r,o,i),void 0!==t&&ud.type(e,t,r,o,i)}n(o)},number:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(""===t&&(t=void 0),Yu(t)&&!e.required)return n();ud.required(e,t,r,o,i),void 0!==t&&(ud.type(e,t,r,o,i),ud.range(e,t,r,o,i))}n(o)},boolean:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Yu(t)&&!e.required)return n();ud.required(e,t,r,o,i),void 0!==t&&ud.type(e,t,r,o,i)}n(o)},regexp:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Yu(t)&&!e.required)return n();ud.required(e,t,r,o,i),Yu(t)||ud.type(e,t,r,o,i)}n(o)},integer:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Yu(t)&&!e.required)return n();ud.required(e,t,r,o,i),void 0!==t&&(ud.type(e,t,r,o,i),ud.range(e,t,r,o,i))}n(o)},float:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Yu(t)&&!e.required)return n();ud.required(e,t,r,o,i),void 0!==t&&(ud.type(e,t,r,o,i),ud.range(e,t,r,o,i))}n(o)},array:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if((void 0===t||null===t)&&!e.required)return n();ud.required(e,t,r,o,i,"array"),void 0!==t&&null!==t&&(ud.type(e,t,r,o,i),ud.range(e,t,r,o,i))}n(o)},object:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Yu(t)&&!e.required)return n();ud.required(e,t,r,o,i),void 0!==t&&ud.type(e,t,r,o,i)}n(o)},enum:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Yu(t)&&!e.required)return n();ud.required(e,t,r,o,i),void 0!==t&&ud.enum(e,t,r,o,i)}n(o)},pattern:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Yu(t,"string")&&!e.required)return n();ud.required(e,t,r,o,i),Yu(t,"string")||ud.pattern(e,t,r,o,i)}n(o)},date:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Yu(t,"date")&&!e.required)return n();var a;if(ud.required(e,t,r,o,i),!Yu(t,"date"))a=t instanceof Date?t:new Date(t),ud.type(e,a,r,o,i),a&&ud.range(e,a.getTime(),r,o,i)}n(o)},url:dd,hex:dd,email:dd,required:function(e,t,n,r,i){var o=[],a=Array.isArray(t)?"array":le(t);ud.required(e,t,r,o,i,a),n(o)},any:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Yu(t)&&!e.required)return n();ud.required(e,t,r,o,i)}n(o)}};var fd=function(){function e(t){st(this,e),fe(this,"rules",null),fe(this,"_messages",Vu),this.define(t)}return ct(e,[{key:"define",value:function(e){var t=this;if(!e)throw new Error("Cannot configure a schema with no rules");if("object"!==le(e)||Array.isArray(e))throw new Error("Rules must be an object");this.rules={},Object.keys(e).forEach((function(n){var r=e[n];t.rules[n]=Array.isArray(r)?r:[r]}))}},{key:"messages",value:function(e){return e&&(this._messages=td(Ku(),e)),this._messages}},{key:"validate",value:function(t){var n=this,r=t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if("function"===typeof i&&(o=i,i={}),!this.rules||0===Object.keys(this.rules).length)return o&&o(null,r),Promise.resolve(r);if(i.messages){var a=this.messages();a===Vu&&(a=Ku()),td(a,i.messages),i.messages=a}else i.messages=this.messages();var s={};(i.keys||Object.keys(this.rules)).forEach((function(e){var i=n.rules[e],o=r[e];i.forEach((function(i){var a=i;"function"===typeof a.transform&&(r===t&&(r=me({},r)),void 0!==(o=r[e]=a.transform(o))&&null!==o&&(a.type=a.type||(Array.isArray(o)?"array":le(o)))),(a="function"===typeof a?{validator:a}:me({},a)).validator=n.getValidationMethod(a),a.validator&&(a.field=e,a.fullField=a.fullField||e,a.type=n.getType(a),s[e]=s[e]||[],s[e].push({rule:a,value:o,source:r,field:e}))}))}));var l={};return Zu(s,i,(function(t,n){var o,a=t.rule,s=("object"===a.type||"array"===a.type)&&("object"===le(a.fields)||"object"===le(a.defaultField));function c(e,t){return me(me({},t),{},{fullField:"".concat(a.fullField,".").concat(e),fullFields:a.fullFields?[].concat(se(a.fullFields),[e]):[e]})}function u(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],u=Array.isArray(o)?o:[o];!i.suppressWarning&&u.length&&e.warning("async-validator:",u),u.length&&void 0!==a.message&&(u=[].concat(a.message));var d=u.map(ed(a,r));if(i.first&&d.length)return l[a.field]=1,n(d);if(s){if(a.required&&!t.value)return void 0!==a.message?d=[].concat(a.message).map(ed(a,r)):i.error&&(d=[i.error(a,Gu(i.messages.required,a.field))]),n(d);var h={};a.defaultField&&Object.keys(t.value).map((function(e){h[e]=a.defaultField})),h=me(me({},h),t.rule.fields);var f={};Object.keys(h).forEach((function(e){var t=h[e],n=Array.isArray(t)?t:[t];f[e]=n.map(c.bind(null,e))}));var p=new e(f);p.messages(i.messages),t.rule.options&&(t.rule.options.messages=i.messages,t.rule.options.error=i.error),p.validate(t.value,t.rule.options||i,(function(e){var t=[];d&&d.length&&t.push.apply(t,se(d)),e&&e.length&&t.push.apply(t,se(e)),n(t.length?t:null)}))}else n(d)}if(s=s&&(a.required||!a.required&&t.value),a.field=t.field,a.asyncValidator)o=a.asyncValidator(a,t.value,u,t.source,i);else if(a.validator){try{o=a.validator(a,t.value,u,t.source,i)}catch(f){var d,h;null===(d=(h=console).error)||void 0===d||d.call(h,f),i.suppressValidatorError||setTimeout((function(){throw f}),0),u(f.message)}!0===o?u():!1===o?u("function"===typeof a.message?a.message(a.fullField||a.field):a.message||"".concat(a.fullField||a.field," fails")):o instanceof Array?u(o):o instanceof Error&&u(o.message)}o&&o.then&&o.then((function(){return u()}),(function(e){return u(e)}))}),(function(e){!function(e){var t=[],n={};function i(e){var n;Array.isArray(e)?t=(n=t).concat.apply(n,se(e)):t.push(e)}for(var a=0;a<e.length;a++)i(e[a]);t.length?(n=Xu(t),o(t,n)):o(null,r)}(e)}),r)}},{key:"getType",value:function(e){if(void 0===e.type&&e.pattern instanceof RegExp&&(e.type="pattern"),"function"!==typeof e.validator&&e.type&&!hd.hasOwnProperty(e.type))throw new Error(Gu("Unknown rule type %s",e.type));return e.type||"string"}},{key:"getValidationMethod",value:function(e){if("function"===typeof e.validator)return e.validator;var t=Object.keys(e),n=t.indexOf("message");return-1!==n&&t.splice(n,1),1===t.length&&"required"===t[0]?hd.required:hd[this.getType(e)]||void 0}}]),e}();fe(fd,"register",(function(e,t){if("function"!==typeof t)throw new Error("Cannot register a validator by type, validator is not a function");hd[e]=t})),fe(fd,"warning",(function(){})),fe(fd,"messages",Vu),fe(fd,"validators",hd);var pd="'${name}' is not a valid ${type}",md={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:pd,method:pd,array:pd,object:pd,number:pd,date:pd,boolean:pd,integer:pd,float:pd,regexp:pd,email:pd,url:pd,hex:pd},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},gd=fd;function vd(e,t){return e.replace(/\\?\$\{\w+\}/g,(function(e){if(e.startsWith("\\"))return e.slice(1);var n=e.slice(2,-1);return t[n]}))}var bd="CODE_LOGIC_ERROR";function yd(e,t,n,r,i){return _d.apply(this,arguments)}function _d(){return _d=de(ce().mark((function t(n,r,i,o,a){var s,l,c,u,d,h,f,p,m;return ce().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return delete(s=me({},i)).ruleIndex,gd.warning=function(){},s.validator&&(l=s.validator,s.validator=function(){try{return l.apply(void 0,arguments)}catch(e){return console.error(e),Promise.reject(bd)}}),c=null,s&&"array"===s.type&&s.defaultField&&(c=s.defaultField,delete s.defaultField),u=new gd(fe({},n,[s])),d=lr(md,o.validateMessages),u.messages(d),h=[],t.prev=10,t.next=13,Promise.resolve(u.validate(fe({},n,r),me({},o)));case 13:t.next=18;break;case 15:t.prev=15,t.t0=t.catch(10),t.t0.errors&&(h=t.t0.errors.map((function(t,n){var r=t.message,i=r===bd?d.default:r;return e.isValidElement(i)?e.cloneElement(i,{key:"error_".concat(n)}):i})));case 18:if(h.length||!c){t.next=23;break}return t.next=21,Promise.all(r.map((function(e,t){return yd("".concat(n,".").concat(t),e,c,o,a)})));case 21:return f=t.sent,t.abrupt("return",f.reduce((function(e,t){return[].concat(se(e),se(t))}),[]));case 23:return p=me(me({},i),{},{name:n,enum:(i.enum||[]).join(", ")},a),m=h.map((function(e){return"string"===typeof e?vd(e,p):e})),t.abrupt("return",m);case 26:case"end":return t.stop()}}),t,null,[[10,15]])}))),_d.apply(this,arguments)}function Sd(e,t,n,r,i,o){var a,s=e.join("."),l=n.map((function(e,t){var n=e.validator,r=me(me({},e),{},{ruleIndex:t});return n&&(r.validator=function(e,t,r){var i=!1,o=n(e,t,(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Promise.resolve().then((function(){ot(!i,"Your validator function has already return a promise. `callback` will be ignored."),i||r.apply(void 0,t)}))}));i=o&&"function"===typeof o.then&&"function"===typeof o.catch,ot(i,"`callback` is deprecated. Please return a promise instead."),i&&o.then((function(){r()})).catch((function(e){r(e||" ")}))}),r})).sort((function(e,t){var n=e.warningOnly,r=e.ruleIndex,i=t.warningOnly,o=t.ruleIndex;return!!n===!!i?r-o:n?1:-1}));if(!0===i)a=new Promise(function(){var e=de(ce().mark((function e(n,i){var a,c,u;return ce().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=0;case 1:if(!(a<l.length)){e.next=12;break}return c=l[a],e.next=5,yd(s,t,c,r,o);case 5:if(!(u=e.sent).length){e.next=9;break}return i([{errors:u,rule:c}]),e.abrupt("return");case 9:a+=1,e.next=1;break;case 12:n([]);case 13:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}());else{var c=l.map((function(e){return yd(s,t,e,r,o).then((function(t){return{errors:t,rule:e}}))}));a=(i?function(e){return Cd.apply(this,arguments)}(c):function(e){return wd.apply(this,arguments)}(c)).then((function(e){return Promise.reject(e)}))}return a.catch((function(e){return e})),a}function wd(){return(wd=de(ce().mark((function e(t){return ce().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.all(t).then((function(e){var t;return(t=[]).concat.apply(t,se(e))})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Cd(){return(Cd=de(ce().mark((function e(t){var n;return ce().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=0,e.abrupt("return",new Promise((function(e){t.forEach((function(r){r.then((function(r){r.errors.length&&e([r]),(n+=1)===t.length&&e([])}))}))})));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function xd(e){return Wu(e)}function Ed(e,t){var n={};return t.forEach((function(t){var r=rr(e,t);n=or(n,t,r)})),n}function kd(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e&&e.some((function(e){return Od(t,e,n)}))}function Od(e,t){return!(!e||!t)&&(!(!(arguments.length>2&&void 0!==arguments[2]&&arguments[2])&&e.length!==t.length)&&t.every((function(t,n){return e[n]===t})))}function $d(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&"object"===le(t.target)&&e in t.target?t.target[e]:t}function Rd(e,t,n){var r=e.length;if(t<0||t>=r||n<0||n>=r)return e;var i=e[t],o=t-n;return o>0?[].concat(se(e.slice(0,n)),[i],se(e.slice(n,t)),se(e.slice(t+1,r))):o<0?[].concat(se(e.slice(0,t)),se(e.slice(t+1,n+1)),[i],se(e.slice(n+1,r))):e}var Id=["name"],Md=[];function Pd(e,t,n,r,i,o){return"function"===typeof e?e(t,n,"source"in o?{source:o.source}:{}):r!==i}var Nd=function(t){po(r,t);var n=bo(r);function r(t){var i;(st(this,r),fe(vo(i=n.call(this,t)),"state",{resetCount:0}),fe(vo(i),"cancelRegisterFunc",null),fe(vo(i),"mounted",!1),fe(vo(i),"touched",!1),fe(vo(i),"dirty",!1),fe(vo(i),"validatePromise",void 0),fe(vo(i),"prevValidating",void 0),fe(vo(i),"errors",Md),fe(vo(i),"warnings",Md),fe(vo(i),"cancelRegister",(function(){var e=i.props,t=e.preserve,n=e.isListField,r=e.name;i.cancelRegisterFunc&&i.cancelRegisterFunc(n,t,xd(r)),i.cancelRegisterFunc=null})),fe(vo(i),"getNamePath",(function(){var e=i.props,t=e.name,n=e.fieldContext.prefixName;return void 0!==t?[].concat(se(void 0===n?[]:n),se(t)):[]})),fe(vo(i),"getRules",(function(){var e=i.props,t=e.rules,n=void 0===t?[]:t,r=e.fieldContext;return n.map((function(e){return"function"===typeof e?e(r):e}))})),fe(vo(i),"refresh",(function(){i.mounted&&i.setState((function(e){return{resetCount:e.resetCount+1}}))})),fe(vo(i),"metaCache",null),fe(vo(i),"triggerMetaEvent",(function(e){var t=i.props.onMetaChange;if(t){var n=me(me({},i.getMeta()),{},{destroy:e});at(i.metaCache,n)||t(n),i.metaCache=n}else i.metaCache=null})),fe(vo(i),"onStoreChange",(function(e,t,n){var r=i.props,o=r.shouldUpdate,a=r.dependencies,s=void 0===a?[]:a,l=r.onReset,c=n.store,u=i.getNamePath(),d=i.getValue(e),h=i.getValue(c),f=t&&kd(t,u);switch("valueUpdate"!==n.type||"external"!==n.source||at(d,h)||(i.touched=!0,i.dirty=!0,i.validatePromise=null,i.errors=Md,i.warnings=Md,i.triggerMetaEvent()),n.type){case"reset":if(!t||f)return i.touched=!1,i.dirty=!1,i.validatePromise=void 0,i.errors=Md,i.warnings=Md,i.triggerMetaEvent(),null===l||void 0===l||l(),void i.refresh();break;case"remove":if(o&&Pd(o,e,c,d,h,n))return void i.reRender();break;case"setField":var p=n.data;if(f)return"touched"in p&&(i.touched=p.touched),"validating"in p&&!("originRCField"in p)&&(i.validatePromise=p.validating?Promise.resolve([]):null),"errors"in p&&(i.errors=p.errors||Md),"warnings"in p&&(i.warnings=p.warnings||Md),i.dirty=!0,i.triggerMetaEvent(),void i.reRender();if("value"in p&&kd(t,u,!0))return void i.reRender();if(o&&!u.length&&Pd(o,e,c,d,h,n))return void i.reRender();break;case"dependenciesUpdate":if(s.map(xd).some((function(e){return kd(n.relatedFields,e)})))return void i.reRender();break;default:if(f||(!s.length||u.length||o)&&Pd(o,e,c,d,h,n))return void i.reRender()}!0===o&&i.reRender()})),fe(vo(i),"validateRules",(function(e){var t=i.getNamePath(),n=i.getValue(),r=e||{},o=r.triggerName,a=r.validateOnly,s=void 0!==a&&a,l=Promise.resolve().then(de(ce().mark((function r(){var a,s,c,u,d,h,f;return ce().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(i.mounted){r.next=2;break}return r.abrupt("return",[]);case 2:if(a=i.props,s=a.validateFirst,c=void 0!==s&&s,u=a.messageVariables,d=a.validateDebounce,h=i.getRules(),o&&(h=h.filter((function(e){return e})).filter((function(e){var t=e.validateTrigger;return!t||Wu(t).includes(o)}))),!d||!o){r.next=10;break}return r.next=8,new Promise((function(e){setTimeout(e,d)}));case 8:if(i.validatePromise===l){r.next=10;break}return r.abrupt("return",[]);case 10:return(f=Sd(t,n,h,e,c,u)).catch((function(e){return e})).then((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Md;if(i.validatePromise===l){var t;i.validatePromise=null;var n=[],r=[];null===(t=e.forEach)||void 0===t||t.call(e,(function(e){var t=e.rule.warningOnly,i=e.errors,o=void 0===i?Md:i;t?r.push.apply(r,se(o)):n.push.apply(n,se(o))})),i.errors=n,i.warnings=r,i.triggerMetaEvent(),i.reRender()}})),r.abrupt("return",f);case 13:case"end":return r.stop()}}),r)}))));return s||(i.validatePromise=l,i.dirty=!0,i.errors=Md,i.warnings=Md,i.triggerMetaEvent(),i.reRender()),l})),fe(vo(i),"isFieldValidating",(function(){return!!i.validatePromise})),fe(vo(i),"isFieldTouched",(function(){return i.touched})),fe(vo(i),"isFieldDirty",(function(){return!(!i.dirty&&void 0===i.props.initialValue)||void 0!==(0,i.props.fieldContext.getInternalHooks(ju).getInitialValue)(i.getNamePath())})),fe(vo(i),"getErrors",(function(){return i.errors})),fe(vo(i),"getWarnings",(function(){return i.warnings})),fe(vo(i),"isListField",(function(){return i.props.isListField})),fe(vo(i),"isList",(function(){return i.props.isList})),fe(vo(i),"isPreserve",(function(){return i.props.preserve})),fe(vo(i),"getMeta",(function(){return i.prevValidating=i.isFieldValidating(),{touched:i.isFieldTouched(),validating:i.prevValidating,errors:i.errors,warnings:i.warnings,name:i.getNamePath(),validated:null===i.validatePromise}})),fe(vo(i),"getOnlyChild",(function(t){if("function"===typeof t){var n=i.getMeta();return me(me({},i.getOnlyChild(t(i.getControlled(),n,i.props.fieldContext))),{},{isFunction:!0})}var r=Rc(t);return 1===r.length&&e.isValidElement(r[0])?{child:r[0],isFunction:!1}:{child:r,isFunction:!1}})),fe(vo(i),"getValue",(function(e){var t=i.props.fieldContext.getFieldsValue,n=i.getNamePath();return rr(e||t(!0),n)})),fe(vo(i),"getControlled",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=i.props,n=t.name,r=t.trigger,o=t.validateTrigger,a=t.getValueFromEvent,s=t.normalize,l=t.valuePropName,c=t.getValueProps,u=t.fieldContext,d=void 0!==o?o:u.validateTrigger,h=i.getNamePath(),f=u.getInternalHooks,p=u.getFieldsValue,m=f(ju).dispatch,g=i.getValue(),v=c||function(e){return fe({},l,e)},b=e[r],y=void 0!==n?v(g):{};var _=me(me({},e),y);return _[r]=function(){var e;i.touched=!0,i.dirty=!0,i.triggerMetaEvent();for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e=a?a.apply(void 0,n):$d.apply(void 0,[l].concat(n)),s&&(e=s(e,g,p(!0))),e!==g&&m({type:"updateValue",namePath:h,value:e}),b&&b.apply(void 0,n)},Wu(d||[]).forEach((function(e){var t=_[e];_[e]=function(){t&&t.apply(void 0,arguments);var n=i.props.rules;n&&n.length&&m({type:"validateField",namePath:h,triggerName:e})}})),_})),t.fieldContext)&&(0,(0,t.fieldContext.getInternalHooks)(ju).initEntityValue)(vo(i));return i}return ct(r,[{key:"componentDidMount",value:function(){var e=this.props,t=e.shouldUpdate,n=e.fieldContext;if(this.mounted=!0,n){var r=(0,n.getInternalHooks)(ju).registerField;this.cancelRegisterFunc=r(this)}!0===t&&this.reRender()}},{key:"componentWillUnmount",value:function(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}},{key:"reRender",value:function(){this.mounted&&this.forceUpdate()}},{key:"render",value:function(){var t,n=this.state.resetCount,r=this.props.children,i=this.getOnlyChild(r),o=i.child;return i.isFunction?t=o:e.isValidElement(o)?t=e.cloneElement(o,this.getControlled(o.props)):(ot(!o,"`children` of Field is not validate ReactElement."),t=o),e.createElement(e.Fragment,{key:n},t)}}]),r}(e.Component);fe(Nd,"contextType",Hu),fe(Nd,"defaultProps",{trigger:"onChange",valuePropName:"value"});const Ld=function(t){var n=t.name,r=lo(t,Id),i=e.useContext(Hu),o=e.useContext(Fu),a=void 0!==n?xd(n):void 0,s="keep";return r.isListField||(s="_".concat((a||[]).join("_"))),e.createElement(Nd,Gt({key:s,name:a,isListField:!!o},r,{fieldContext:i}))};const Td=function(t){var n=t.name,r=t.initialValue,i=t.children,o=t.rules,a=t.validateTrigger,s=t.isListField,l=e.useContext(Hu),c=e.useContext(Fu),u=e.useRef({keys:[],id:0}).current,d=e.useMemo((function(){var e=xd(l.prefixName)||[];return[].concat(se(e),se(xd(n)))}),[l.prefixName,n]),h=e.useMemo((function(){return me(me({},l),{},{prefixName:d})}),[l,d]),f=e.useMemo((function(){return{getKey:function(e){var t=d.length,n=e[t];return[u.keys[n],e.slice(t+1)]}}}),[d]);return"function"!==typeof i?(ot(!1,"Form.List only accepts function as children."),null):e.createElement(Fu.Provider,{value:f},e.createElement(Hu.Provider,{value:h},e.createElement(Ld,{name:[],shouldUpdate:function(e,t,n){return"internal"!==n.source&&e!==t},rules:o,validateTrigger:a,initialValue:r,isList:!0,isListField:null!==s&&void 0!==s?s:!!c},(function(e,t){var n=e.value,r=void 0===n?[]:n,o=e.onChange,a=l.getFieldValue,s=function(){return a(d||[])||[]},c={add:function(e,t){var n=s();t>=0&&t<=n.length?(u.keys=[].concat(se(u.keys.slice(0,t)),[u.id],se(u.keys.slice(t))),o([].concat(se(n.slice(0,t)),[e],se(n.slice(t))))):(u.keys=[].concat(se(u.keys),[u.id]),o([].concat(se(n),[e]))),u.id+=1},remove:function(e){var t=s(),n=new Set(Array.isArray(e)?e:[e]);n.size<=0||(u.keys=u.keys.filter((function(e,t){return!n.has(t)})),o(t.filter((function(e,t){return!n.has(t)}))))},move:function(e,t){if(e!==t){var n=s();e<0||e>=n.length||t<0||t>=n.length||(u.keys=Rd(u.keys,e,t),o(Rd(n,e,t)))}}},h=r||[];return Array.isArray(h)||(h=[]),i(h.map((function(e,t){var n=u.keys[t];return void 0===n&&(u.keys[t]=u.id,n=u.keys[t],u.id+=1),{name:t,key:n,isListField:!0}})),c,t)}))))};var Dd="__@field_split__";function Ad(e){return e.map((function(e){return"".concat(le(e),":").concat(e)})).join(Dd)}const Bd=function(){function e(){st(this,e),fe(this,"kvs",new Map)}return ct(e,[{key:"set",value:function(e,t){this.kvs.set(Ad(e),t)}},{key:"get",value:function(e){return this.kvs.get(Ad(e))}},{key:"update",value:function(e,t){var n=t(this.get(e));n?this.set(e,n):this.delete(e)}},{key:"delete",value:function(e){this.kvs.delete(Ad(e))}},{key:"map",value:function(e){return se(this.kvs.entries()).map((function(t){var n=Be(t,2),r=n[0],i=n[1],o=r.split(Dd);return e({key:o.map((function(e){var t=Be(e.match(/^([^:]*):(.*)$/),3),n=t[1],r=t[2];return"number"===n?Number(r):r})),value:i})}))}},{key:"toJSON",value:function(){var e={};return this.map((function(t){var n=t.key,r=t.value;return e[n.join(".")]=r,null})),e}}]),e}();var jd=["name"],zd=ct((function e(t){var n=this;st(this,e),fe(this,"formHooked",!1),fe(this,"forceRootUpdate",void 0),fe(this,"subscribable",!0),fe(this,"store",{}),fe(this,"fieldEntities",[]),fe(this,"initialValues",{}),fe(this,"callbacks",{}),fe(this,"validateMessages",null),fe(this,"preserve",null),fe(this,"lastValidatePromise",null),fe(this,"getForm",(function(){return{getFieldValue:n.getFieldValue,getFieldsValue:n.getFieldsValue,getFieldError:n.getFieldError,getFieldWarning:n.getFieldWarning,getFieldsError:n.getFieldsError,isFieldsTouched:n.isFieldsTouched,isFieldTouched:n.isFieldTouched,isFieldValidating:n.isFieldValidating,isFieldsValidating:n.isFieldsValidating,resetFields:n.resetFields,setFields:n.setFields,setFieldValue:n.setFieldValue,setFieldsValue:n.setFieldsValue,validateFields:n.validateFields,submit:n.submit,_init:!0,getInternalHooks:n.getInternalHooks}})),fe(this,"getInternalHooks",(function(e){return e===ju?(n.formHooked=!0,{dispatch:n.dispatch,initEntityValue:n.initEntityValue,registerField:n.registerField,useSubscribe:n.useSubscribe,setInitialValues:n.setInitialValues,destroyForm:n.destroyForm,setCallbacks:n.setCallbacks,setValidateMessages:n.setValidateMessages,getFields:n.getFields,setPreserve:n.setPreserve,getInitialValue:n.getInitialValue,registerWatch:n.registerWatch}):(ot(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)})),fe(this,"useSubscribe",(function(e){n.subscribable=e})),fe(this,"prevWithoutPreserves",null),fe(this,"setInitialValues",(function(e,t){if(n.initialValues=e||{},t){var r,i=lr(e,n.store);null===(r=n.prevWithoutPreserves)||void 0===r||r.map((function(t){var n=t.key;i=or(i,n,rr(e,n))})),n.prevWithoutPreserves=null,n.updateStore(i)}})),fe(this,"destroyForm",(function(e){if(e)n.updateStore({});else{var t=new Bd;n.getFieldEntities(!0).forEach((function(e){n.isMergedPreserve(e.isPreserve())||t.set(e.getNamePath(),!0)})),n.prevWithoutPreserves=t}})),fe(this,"getInitialValue",(function(e){var t=rr(n.initialValues,e);return e.length?lr(t):t})),fe(this,"setCallbacks",(function(e){n.callbacks=e})),fe(this,"setValidateMessages",(function(e){n.validateMessages=e})),fe(this,"setPreserve",(function(e){n.preserve=e})),fe(this,"watchList",[]),fe(this,"registerWatch",(function(e){return n.watchList.push(e),function(){n.watchList=n.watchList.filter((function(t){return t!==e}))}})),fe(this,"notifyWatch",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(n.watchList.length){var t=n.getFieldsValue(),r=n.getFieldsValue(!0);n.watchList.forEach((function(n){n(t,r,e)}))}})),fe(this,"timeoutId",null),fe(this,"warningUnhooked",(function(){0})),fe(this,"updateStore",(function(e){n.store=e})),fe(this,"getFieldEntities",(function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?n.fieldEntities.filter((function(e){return e.getNamePath().length})):n.fieldEntities})),fe(this,"getFieldsMap",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=new Bd;return n.getFieldEntities(e).forEach((function(e){var n=e.getNamePath();t.set(n,e)})),t})),fe(this,"getFieldEntitiesForNamePathList",(function(e){if(!e)return n.getFieldEntities(!0);var t=n.getFieldsMap(!0);return e.map((function(e){var n=xd(e);return t.get(n)||{INVALIDATE_NAME_PATH:xd(e)}}))})),fe(this,"getFieldsValue",(function(e,t){var r,i,o;if(n.warningUnhooked(),!0===e||Array.isArray(e)?(r=e,i=t):e&&"object"===le(e)&&(o=e.strict,i=e.filter),!0===r&&!i)return n.store;var a=n.getFieldEntitiesForNamePathList(Array.isArray(r)?r:null),s=[];return a.forEach((function(e){var t,n,a,l,c="INVALIDATE_NAME_PATH"in e?e.INVALIDATE_NAME_PATH:e.getNamePath();if(o){if(null!==(a=(l=e).isList)&&void 0!==a&&a.call(l))return}else if(!r&&null!==(t=(n=e).isListField)&&void 0!==t&&t.call(n))return;if(i){var u="getMeta"in e?e.getMeta():null;i(u)&&s.push(c)}else s.push(c)})),Ed(n.store,s.map(xd))})),fe(this,"getFieldValue",(function(e){n.warningUnhooked();var t=xd(e);return rr(n.store,t)})),fe(this,"getFieldsError",(function(e){return n.warningUnhooked(),n.getFieldEntitiesForNamePathList(e).map((function(t,n){return t&&!("INVALIDATE_NAME_PATH"in t)?{name:t.getNamePath(),errors:t.getErrors(),warnings:t.getWarnings()}:{name:xd(e[n]),errors:[],warnings:[]}}))})),fe(this,"getFieldError",(function(e){n.warningUnhooked();var t=xd(e);return n.getFieldsError([t])[0].errors})),fe(this,"getFieldWarning",(function(e){n.warningUnhooked();var t=xd(e);return n.getFieldsError([t])[0].warnings})),fe(this,"isFieldsTouched",(function(){n.warningUnhooked();for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i,o=t[0],a=t[1],s=!1;0===t.length?i=null:1===t.length?Array.isArray(o)?(i=o.map(xd),s=!1):(i=null,s=o):(i=o.map(xd),s=a);var l=n.getFieldEntities(!0),c=function(e){return e.isFieldTouched()};if(!i)return s?l.every((function(e){return c(e)||e.isList()})):l.some(c);var u=new Bd;i.forEach((function(e){u.set(e,[])})),l.forEach((function(e){var t=e.getNamePath();i.forEach((function(n){n.every((function(e,n){return t[n]===e}))&&u.update(n,(function(t){return[].concat(se(t),[e])}))}))}));var d=function(e){return e.some(c)},h=u.map((function(e){return e.value}));return s?h.every(d):h.some(d)})),fe(this,"isFieldTouched",(function(e){return n.warningUnhooked(),n.isFieldsTouched([e])})),fe(this,"isFieldsValidating",(function(e){n.warningUnhooked();var t=n.getFieldEntities();if(!e)return t.some((function(e){return e.isFieldValidating()}));var r=e.map(xd);return t.some((function(e){var t=e.getNamePath();return kd(r,t)&&e.isFieldValidating()}))})),fe(this,"isFieldValidating",(function(e){return n.warningUnhooked(),n.isFieldsValidating([e])})),fe(this,"resetWithFieldInitialValue",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new Bd,r=n.getFieldEntities(!0);r.forEach((function(e){var n=e.props.initialValue,r=e.getNamePath();if(void 0!==n){var i=t.get(r)||new Set;i.add({entity:e,value:n}),t.set(r,i)}}));var i;e.entities?i=e.entities:e.namePathList?(i=[],e.namePathList.forEach((function(e){var n,r=t.get(e);r&&(n=i).push.apply(n,se(se(r).map((function(e){return e.entity}))))}))):i=r,i.forEach((function(r){if(void 0!==r.props.initialValue){var i=r.getNamePath();if(void 0!==n.getInitialValue(i))ot(!1,"Form already set 'initialValues' with path '".concat(i.join("."),"'. Field can not overwrite it."));else{var o=t.get(i);if(o&&o.size>1)ot(!1,"Multiple Field with path '".concat(i.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(o){var a=n.getFieldValue(i);r.isListField()||e.skipExist&&void 0!==a||n.updateStore(or(n.store,i,se(o)[0].value))}}}}))})),fe(this,"resetFields",(function(e){n.warningUnhooked();var t=n.store;if(!e)return n.updateStore(lr(n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(t,null,{type:"reset"}),void n.notifyWatch();var r=e.map(xd);r.forEach((function(e){var t=n.getInitialValue(e);n.updateStore(or(n.store,e,t))})),n.resetWithFieldInitialValue({namePathList:r}),n.notifyObservers(t,r,{type:"reset"}),n.notifyWatch(r)})),fe(this,"setFields",(function(e){n.warningUnhooked();var t=n.store,r=[];e.forEach((function(e){var i=e.name,o=lo(e,jd),a=xd(i);r.push(a),"value"in o&&n.updateStore(or(n.store,a,o.value)),n.notifyObservers(t,[a],{type:"setField",data:e})})),n.notifyWatch(r)})),fe(this,"getFields",(function(){return n.getFieldEntities(!0).map((function(e){var t=e.getNamePath(),r=me(me({},e.getMeta()),{},{name:t,value:n.getFieldValue(t)});return Object.defineProperty(r,"originRCField",{value:!0}),r}))})),fe(this,"initEntityValue",(function(e){var t=e.props.initialValue;if(void 0!==t){var r=e.getNamePath();void 0===rr(n.store,r)&&n.updateStore(or(n.store,r,t))}})),fe(this,"isMergedPreserve",(function(e){var t=void 0!==e?e:n.preserve;return null===t||void 0===t||t})),fe(this,"registerField",(function(e){n.fieldEntities.push(e);var t=e.getNamePath();if(n.notifyWatch([t]),void 0!==e.props.initialValue){var r=n.store;n.resetWithFieldInitialValue({entities:[e],skipExist:!0}),n.notifyObservers(r,[e.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(r,i){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(n.fieldEntities=n.fieldEntities.filter((function(t){return t!==e})),!n.isMergedPreserve(i)&&(!r||o.length>1)){var a=r?void 0:n.getInitialValue(t);if(t.length&&n.getFieldValue(t)!==a&&n.fieldEntities.every((function(e){return!Od(e.getNamePath(),t)}))){var s=n.store;n.updateStore(or(s,t,a,!0)),n.notifyObservers(s,[t],{type:"remove"}),n.triggerDependenciesUpdate(s,t)}}n.notifyWatch([t])}})),fe(this,"dispatch",(function(e){switch(e.type){case"updateValue":var t=e.namePath,r=e.value;n.updateValue(t,r);break;case"validateField":var i=e.namePath,o=e.triggerName;n.validateFields([i],{triggerName:o})}})),fe(this,"notifyObservers",(function(e,t,r){if(n.subscribable){var i=me(me({},r),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach((function(n){(0,n.onStoreChange)(e,t,i)}))}else n.forceRootUpdate()})),fe(this,"triggerDependenciesUpdate",(function(e,t){var r=n.getDependencyChildrenFields(t);return r.length&&n.validateFields(r),n.notifyObservers(e,r,{type:"dependenciesUpdate",relatedFields:[t].concat(se(r))}),r})),fe(this,"updateValue",(function(e,t){var r=xd(e),i=n.store;n.updateStore(or(n.store,r,t)),n.notifyObservers(i,[r],{type:"valueUpdate",source:"internal"}),n.notifyWatch([r]);var o=n.triggerDependenciesUpdate(i,r),a=n.callbacks.onValuesChange;a&&a(Ed(n.store,[r]),n.getFieldsValue());n.triggerOnFieldsChange([r].concat(se(o)))})),fe(this,"setFieldsValue",(function(e){n.warningUnhooked();var t=n.store;if(e){var r=lr(n.store,e);n.updateStore(r)}n.notifyObservers(t,null,{type:"valueUpdate",source:"external"}),n.notifyWatch()})),fe(this,"setFieldValue",(function(e,t){n.setFields([{name:e,value:t}])})),fe(this,"getDependencyChildrenFields",(function(e){var t=new Set,r=[],i=new Bd;n.getFieldEntities().forEach((function(e){(e.props.dependencies||[]).forEach((function(t){var n=xd(t);i.update(n,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Set;return t.add(e),t}))}))}));return function e(n){(i.get(n)||new Set).forEach((function(n){if(!t.has(n)){t.add(n);var i=n.getNamePath();n.isFieldDirty()&&i.length&&(r.push(i),e(i))}}))}(e),r})),fe(this,"triggerOnFieldsChange",(function(e,t){var r=n.callbacks.onFieldsChange;if(r){var i=n.getFields();if(t){var o=new Bd;t.forEach((function(e){var t=e.name,n=e.errors;o.set(t,n)})),i.forEach((function(e){e.errors=o.get(e.name)||e.errors}))}var a=i.filter((function(t){var n=t.name;return kd(e,n)}));a.length&&r(a,i)}})),fe(this,"validateFields",(function(e,t){var r,i;n.warningUnhooked(),Array.isArray(e)||"string"===typeof e||"string"===typeof t?(r=e,i=t):i=e;var o=!!r,a=o?r.map(xd):[],s=[],l=String(Date.now()),c=new Set,u=i||{},d=u.recursive,h=u.dirty;n.getFieldEntities(!0).forEach((function(e){if(o||a.push(e.getNamePath()),e.props.rules&&e.props.rules.length&&(!h||e.isFieldDirty())){var t=e.getNamePath();if(c.add(t.join(l)),!o||kd(a,t,d)){var r=e.validateRules(me({validateMessages:me(me({},md),n.validateMessages)},i));s.push(r.then((function(){return{name:t,errors:[],warnings:[]}})).catch((function(e){var n,r=[],i=[];return null===(n=e.forEach)||void 0===n||n.call(e,(function(e){var t=e.rule.warningOnly,n=e.errors;t?i.push.apply(i,se(n)):r.push.apply(r,se(n))})),r.length?Promise.reject({name:t,errors:r,warnings:i}):{name:t,errors:r,warnings:i}})))}}}));var f=function(e){var t=!1,n=e.length,r=[];return e.length?new Promise((function(i,o){e.forEach((function(e,a){e.catch((function(e){return t=!0,e})).then((function(e){n-=1,r[a]=e,n>0||(t&&o(r),i(r))}))}))})):Promise.resolve([])}(s);n.lastValidatePromise=f,f.catch((function(e){return e})).then((function(e){var t=e.map((function(e){return e.name}));n.notifyObservers(n.store,t,{type:"validateFinish"}),n.triggerOnFieldsChange(t,e)}));var p=f.then((function(){return n.lastValidatePromise===f?Promise.resolve(n.getFieldsValue(a)):Promise.reject([])})).catch((function(e){var t=e.filter((function(e){return e&&e.errors.length}));return Promise.reject({values:n.getFieldsValue(a),errorFields:t,outOfDate:n.lastValidatePromise!==f})}));p.catch((function(e){return e}));var m=a.filter((function(e){return c.has(e.join(l))}));return n.triggerOnFieldsChange(m),p})),fe(this,"submit",(function(){n.warningUnhooked(),n.validateFields().then((function(e){var t=n.callbacks.onFinish;if(t)try{t(e)}catch(r){console.error(r)}})).catch((function(e){var t=n.callbacks.onFinishFailed;t&&t(e)}))})),this.forceRootUpdate=t}));const Hd=function(t){var n=e.useRef(),r=Be(e.useState({}),2)[1];if(!n.current)if(t)n.current=t;else{var i=new zd((function(){r({})}));n.current=i.getForm()}return[n.current]};var Fd=e.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}});const Wd=Fd;var Kd=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"];const Vd=function(t,n){var r=t.name,i=t.initialValues,o=t.fields,a=t.form,s=t.preserve,l=t.children,c=t.component,u=void 0===c?"form":c,d=t.validateMessages,h=t.validateTrigger,f=void 0===h?"onChange":h,p=t.onValuesChange,m=t.onFieldsChange,g=t.onFinish,v=t.onFinishFailed,b=t.clearOnDestroy,y=lo(t,Kd),_=e.useRef(null),S=e.useContext(Wd),w=Be(Hd(a),1)[0],C=w.getInternalHooks(ju),x=C.useSubscribe,E=C.setInitialValues,k=C.setCallbacks,O=C.setValidateMessages,$=C.setPreserve,R=C.destroyForm;e.useImperativeHandle(n,(function(){return me(me({},w),{},{nativeElement:_.current})})),e.useEffect((function(){return S.registerForm(r,w),function(){S.unregisterForm(r)}}),[S,w,r]),O(me(me({},S.validateMessages),d)),k({onValuesChange:p,onFieldsChange:function(e){if(S.triggerFormChange(r,e),m){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];m.apply(void 0,[e].concat(n))}},onFinish:function(e){S.triggerFormFinish(r,e),g&&g(e)},onFinishFailed:v}),$(s);var I,M=e.useRef(null);E(i,!M.current),M.current||(M.current=!0),e.useEffect((function(){return function(){return R(b)}}),[]);var P="function"===typeof l;P?I=l(w.getFieldsValue(!0),w):I=l;x(!P);var N=e.useRef();e.useEffect((function(){(function(e,t){if(e===t)return!0;if(!e&&t||e&&!t)return!1;if(!e||!t||"object"!==le(e)||"object"!==le(t))return!1;var n=Object.keys(e),r=Object.keys(t);return se(new Set([].concat(n,r))).every((function(n){var r=e[n],i=t[n];return"function"===typeof r&&"function"===typeof i||r===i}))})(N.current||[],o||[])||w.setFields(o||[]),N.current=o}),[o,w]);var L=e.useMemo((function(){return me(me({},w),{},{validateTrigger:f})}),[w,f]),T=e.createElement(Fu.Provider,{value:null},e.createElement(Hu.Provider,{value:L},I));return!1===u?T:e.createElement(u,Gt({},y,{ref:_,onSubmit:function(e){e.preventDefault(),e.stopPropagation(),w.submit()},onReset:function(e){var t;e.preventDefault(),w.resetFields(),null===(t=y.onReset)||void 0===t||t.call(y,e)}}),T)};function Ud(e){try{return JSON.stringify(e)}catch(t){return Math.random()}}var qd=function(){};const Xd=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],o=n[1],a=void 0===o?{}:o,s=function(e){return e&&!!e._init}(a)?{form:a}:a,l=s.form,c=Be((0,e.useState)(),2),u=c[0],d=c[1],h=(0,e.useMemo)((function(){return Ud(u)}),[u]),f=(0,e.useRef)(h);f.current=h;var p=(0,e.useContext)(Hu),m=l||p,g=m&&m._init,v=xd(i),b=(0,e.useRef)(v);return b.current=v,qd(v),(0,e.useEffect)((function(){if(g){var e=m.getFieldsValue,t=(0,m.getInternalHooks)(ju).registerWatch,n=function(e,t){var n=s.preserve?t:e;return"function"===typeof i?i(n):rr(n,b.current)},r=t((function(e,t){var r=n(e,t),i=Ud(r);f.current!==i&&(f.current=i,d(r))})),o=n(e(),e(!0));return u!==o&&d(o),r}}),[g]),u};var Gd=e.forwardRef(Vd);Gd.FormProvider=function(t){var n=t.validateMessages,r=t.onFormChange,i=t.onFormFinish,o=t.children,a=e.useContext(Fd),s=e.useRef({});return e.createElement(Fd.Provider,{value:me(me({},a),{},{validateMessages:me(me({},a.validateMessages),n),triggerFormChange:function(e,t){r&&r(e,{changedFields:t,forms:s.current}),a.triggerFormChange(e,t)},triggerFormFinish:function(e,t){i&&i(e,{values:t,forms:s.current}),a.triggerFormFinish(e,t)},registerForm:function(e,t){e&&(s.current=me(me({},s.current),{},fe({},e,t))),a.registerForm(e,t)},unregisterForm:function(e){var t=me({},s.current);delete t[e],s.current=t,a.unregisterForm(e)}})},o)},Gd.Field=Ld,Gd.List=Td,Gd.useForm=Hd,Gd.useWatch=Xd;const Yd=e.createContext({});const Qd=t=>{let{children:n,status:r,override:i}=t;const o=(0,e.useContext)(Yd),a=(0,e.useMemo)((()=>{const e=Object.assign({},o);return i&&delete e.isFormItemInput,r&&(delete e.status,delete e.hasFeedback,delete e.feedbackIcon),e}),[r,i,o]);return e.createElement(Yd.Provider,{value:a},n)},Jd=(0,e.createContext)(void 0),Zd=e=>{const{componentCls:t}=e;return{[t]:{"&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"}}}},eh=e=>{const{componentCls:t,antCls:n}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item:empty`]:{display:"none"},[`${t}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:"block"}}}},th=e=>{const{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},nh=ml("Space",(e=>{const t=ol(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[eh(t),th(t),Zd(t)]}),(()=>({})),{resetStyle:!1});var rh=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const ih=e.createContext(null),oh=(t,n)=>{const r=e.useContext(ih),i=e.useMemo((()=>{if(!r)return"";const{compactDirection:e,isFirstItem:i,isLastItem:o}=r,a="vertical"===e?"-vertical-":"-";return Ji()(`${t}-compact${a}item`,{[`${t}-compact${a}first-item`]:i,[`${t}-compact${a}last-item`]:o,[`${t}-compact${a}item-rtl`]:"rtl"===n})}),[t,n,r]);return{compactSize:null===r||void 0===r?void 0:r.compactSize,compactDirection:null===r||void 0===r?void 0:r.compactDirection,compactItemClassnames:i}},ah=t=>{let{children:n}=t;return e.createElement(ih.Provider,{value:null},n)},sh=t=>{var{children:n}=t,r=rh(t,["children"]);return e.createElement(ih.Provider,{value:r},n)},lh=t=>{const{getPrefixCls:n,direction:r}=e.useContext(Le),{size:i,direction:o,block:a,prefixCls:s,className:l,rootClassName:c,children:u}=t,d=rh(t,["size","direction","block","prefixCls","className","rootClassName","children"]),h=ac((e=>null!==i&&void 0!==i?i:e)),f=n("space-compact",s),[p,m]=nh(f),g=Ji()(f,m,{[`${f}-rtl`]:"rtl"===r,[`${f}-block`]:a,[`${f}-vertical`]:"vertical"===o},l,c),v=e.useContext(ih),b=Rc(u),y=e.useMemo((()=>b.map(((t,n)=>{const r=(null===t||void 0===t?void 0:t.key)||`${f}-item-${n}`;return e.createElement(sh,{key:r,compactSize:h,compactDirection:o,isFirstItem:0===n&&(!v||(null===v||void 0===v?void 0:v.isFirstItem)),isLastItem:n===b.length-1&&(!v||(null===v||void 0===v?void 0:v.isLastItem))},t)}))),[i,b,v]);return 0===b.length?null:p(e.createElement("div",Object.assign({className:g},d),y))},ch=t=>{const{space:n,form:r,children:i}=t;if(void 0===i||null===i)return null;let o=i;return r&&(o=e.createElement(Qd,{override:!0,status:!0},o)),n&&(o=e.createElement(ah,null,o)),o},uh=()=>({height:0,opacity:0}),dh=e=>{const{scrollHeight:t}=e;return{height:t,opacity:1}},hh=e=>({height:e?e.offsetHeight:0}),fh=(e,t)=>!0===(null===t||void 0===t?void 0:t.deadline)||"height"===t.propertyName,ph=(e,t,n)=>void 0!==n?n:`${e}-${t}`,mh=function(){return{motionName:`${arguments.length>0&&void 0!==arguments[0]?arguments[0]:Me}-motion-collapse`,onAppearStart:uh,onEnterStart:uh,onAppearActive:dh,onEnterActive:dh,onLeaveStart:hh,onLeaveActive:uh,onAppearEnd:fh,onEnterEnd:fh,onLeaveEnd:fh,motionDeadline:500}};function gh(e){const{sizePopupArrow:t,borderRadiusXS:n,borderRadiusOuter:r}=e,i=t/2,o=i,a=1*r/Math.sqrt(2),s=i-r*(1-1/Math.sqrt(2)),l=i-n*(1/Math.sqrt(2)),c=r*(Math.sqrt(2)-1)+n*(1/Math.sqrt(2)),u=2*i-l,d=c,h=2*i-a,f=s,p=2*i-0,m=o,g=i*Math.sqrt(2)+r*(Math.sqrt(2)-2),v=r*(Math.sqrt(2)-1);return{arrowShadowWidth:g,arrowPath:`path('M 0 ${o} A ${r} ${r} 0 0 0 ${a} ${s} L ${l} ${c} A ${n} ${n} 0 0 1 ${u} ${d} L ${h} ${f} A ${r} ${r} 0 0 0 ${p} ${m} Z')`,arrowPolygon:`polygon(${v}px 100%, 50% ${v}px, ${2*i-v}px 100%, ${v}px 100%)`}}const vh=(e,t,n)=>{const{sizePopupArrow:r,arrowPolygon:i,arrowPath:o,arrowShadowWidth:a,borderRadiusXS:s,calc:l}=e;return{pointerEvents:"none",width:r,height:r,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:r,height:l(r).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[i,o]},content:'""'},"&::after":{content:'""',position:"absolute",width:a,height:a,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${It(s)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:n,zIndex:0,background:"transparent"}}};function bh(e){const{contentRadius:t,limitVerticalRadius:n}=e,r=t>12?t+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?8:r}}function yh(e,t){return e?t:{}}function _h(e,t,n){const{componentCls:r,boxShadowPopoverArrow:i,arrowOffsetVertical:o,arrowOffsetHorizontal:a}=e,{arrowDistance:s=0,arrowPlacement:l={left:!0,right:!0,top:!0,bottom:!0}}=n||{};return{[r]:Object.assign(Object.assign(Object.assign(Object.assign({[`${r}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},vh(e,t,i)),{"&:before":{background:t}})]},yh(!!l.top,{[[`&-placement-top > ${r}-arrow`,`&-placement-topLeft > ${r}-arrow`,`&-placement-topRight > ${r}-arrow`].join(",")]:{bottom:s,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":a,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${It(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),yh(!!l.bottom,{[[`&-placement-bottom > ${r}-arrow`,`&-placement-bottomLeft > ${r}-arrow`,`&-placement-bottomRight > ${r}-arrow`].join(",")]:{top:s,transform:"translateY(-100%)"},[`&-placement-bottom > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":a,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${It(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),yh(!!l.left,{[[`&-placement-left > ${r}-arrow`,`&-placement-leftTop > ${r}-arrow`,`&-placement-leftBottom > ${r}-arrow`].join(",")]:{right:{_skip_check_:!0,value:s},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${r}-arrow`]:{top:o},[`&-placement-leftBottom > ${r}-arrow`]:{bottom:o}})),yh(!!l.right,{[[`&-placement-right > ${r}-arrow`,`&-placement-rightTop > ${r}-arrow`,`&-placement-rightBottom > ${r}-arrow`].join(",")]:{left:{_skip_check_:!0,value:s},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${r}-arrow`]:{top:o},[`&-placement-rightBottom > ${r}-arrow`]:{bottom:o}}))}}const Sh={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},wh={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},Ch=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function xh(e){const{arrowWidth:t,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:i,borderRadius:o,visibleFirst:a}=e,s=t/2,l={};return Object.keys(Sh).forEach((e=>{const c=r&&wh[e]||Sh[e],u=Object.assign(Object.assign({},c),{offset:[0,0],dynamicInset:!0});switch(l[e]=u,Ch.has(e)&&(u.autoArrow=!1),e){case"top":case"topLeft":case"topRight":u.offset[1]=-s-i;break;case"bottom":case"bottomLeft":case"bottomRight":u.offset[1]=s+i;break;case"left":case"leftTop":case"leftBottom":u.offset[0]=-s-i;break;case"right":case"rightTop":case"rightBottom":u.offset[0]=s+i}const d=bh({contentRadius:o,limitVerticalRadius:!0});if(r)switch(e){case"topLeft":case"bottomLeft":u.offset[0]=-d.arrowOffsetHorizontal-s;break;case"topRight":case"bottomRight":u.offset[0]=d.arrowOffsetHorizontal+s;break;case"leftTop":case"rightTop":u.offset[1]=2*-d.arrowOffsetHorizontal+s;break;case"leftBottom":case"rightBottom":u.offset[1]=2*d.arrowOffsetHorizontal-s}u.overflow=function(e,t,n,r){if(!1===r)return{adjustX:!1,adjustY:!1};const i=r&&"object"===typeof r?r:{},o={};switch(e){case"top":case"bottom":o.shiftX=2*t.arrowOffsetHorizontal+n,o.shiftY=!0,o.adjustY=!0;break;case"left":case"right":o.shiftY=2*t.arrowOffsetVertical+n,o.shiftX=!0,o.adjustX=!0}const a=Object.assign(Object.assign({},o),i);return a.shiftX||(a.adjustX=!0),a.shiftY||(a.adjustY=!0),a}(e,d,t,n),a&&(u.htmlRegion="visibleFirst")})),l}const Eh=e=>({animationDuration:e,animationFillMode:"both"}),kh=e=>({animationDuration:e,animationFillMode:"both"}),Oh=function(e,t,n,r){const i=arguments.length>4&&void 0!==arguments[4]&&arguments[4]?"&":"";return{[`\n ${i}${e}-enter,\n ${i}${e}-appear\n `]:Object.assign(Object.assign({},Eh(r)),{animationPlayState:"paused"}),[`${i}${e}-leave`]:Object.assign(Object.assign({},kh(r)),{animationPlayState:"paused"}),[`\n ${i}${e}-enter${e}-enter-active,\n ${i}${e}-appear${e}-appear-active\n `]:{animationName:t,animationPlayState:"running"},[`${i}${e}-leave${e}-leave-active`]:{animationName:n,animationPlayState:"running",pointerEvents:"none"}}},$h=new Zn("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),Rh=new Zn("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),Ih=new Zn("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),Mh=new Zn("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),Ph=new Zn("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),Nh=new Zn("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),Lh={zoom:{inKeyframes:$h,outKeyframes:Rh},"zoom-big":{inKeyframes:Ih,outKeyframes:Mh},"zoom-big-fast":{inKeyframes:Ih,outKeyframes:Mh},"zoom-left":{inKeyframes:new Zn("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),outKeyframes:new Zn("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}})},"zoom-right":{inKeyframes:new Zn("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),outKeyframes:new Zn("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}})},"zoom-up":{inKeyframes:Ph,outKeyframes:Nh},"zoom-down":{inKeyframes:new Zn("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),outKeyframes:new Zn("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}})}},Th=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:i,outKeyframes:o}=Lh[t];return[Oh(r,i,o,"zoom-big-fast"===t?e.motionDurationFast:e.motionDurationMid),{[`\n ${r}-enter,\n ${r}-appear\n `]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},Dh=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];function Ah(e,t){return Dh.reduce(((n,r)=>{const i=e[`${r}1`],o=e[`${r}3`],a=e[`${r}6`],s=e[`${r}7`];return Object.assign(Object.assign({},n),t(r,{lightColor:i,lightBorderColor:o,darkColor:a,textColor:s}))}),{})}const Bh=e=>{const{componentCls:t,tooltipMaxWidth:n,tooltipColor:r,tooltipBg:i,tooltipBorderRadius:o,zIndexPopup:a,controlHeight:s,boxShadowSecondary:l,paddingSM:c,paddingXS:u}=e;return[{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},Ma(e)),{position:"absolute",zIndex:a,display:"block",width:"max-content",maxWidth:n,visibility:"visible","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"&-hidden":{display:"none"},"--antd-arrow-background-color":i,[`${t}-inner`]:{minWidth:"1em",minHeight:s,padding:`${It(e.calc(c).div(2).equal())} ${It(u)}`,color:r,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:i,borderRadius:o,boxShadow:l,boxSizing:"border-box"},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${t}-inner`]:{borderRadius:e.min(o,8)}},[`${t}-content`]:{position:"relative"}}),Ah(e,((e,n)=>{let{darkColor:r}=n;return{[`&${t}-${e}`]:{[`${t}-inner`]:{backgroundColor:r},[`${t}-arrow`]:{"--antd-arrow-background-color":r}}}}))),{"&-rtl":{direction:"rtl"}})},_h(e,"var(--antd-arrow-background-color)"),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}}]},jh=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+70},bh({contentRadius:e.borderRadius,limitVerticalRadius:!0})),gh(ol(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))),zh=function(e){return ml("Tooltip",(e=>{const{borderRadius:t,colorTextLightSolid:n,colorBgSpotlight:r}=e,i=ol(e,{tooltipMaxWidth:250,tooltipColor:n,tooltipBorderRadius:t,tooltipBg:r});return[Bh(i),Th(e,"zoom-big-fast")]}),jh,{resetStyle:!1,injectStyle:!(arguments.length>1&&void 0!==arguments[1])||arguments[1]})(e)},Hh=Dh.map((e=>`${e}-inverse`));function Fh(e,t){const n=function(e){return arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?Dh.includes(e):[].concat(se(Hh),se(Dh)).includes(e)}(t),r=Ji()({[`${e}-${t}`]:t&&n}),i={},o={};return t&&!n&&(i.background=t,o["--antd-arrow-background-color"]=t),{className:r,overlayStyle:i,arrowStyle:o}}const Wh=t=>{const{prefixCls:n,className:r,placement:i="top",title:o,color:a,overlayInnerStyle:s}=t,{getPrefixCls:l}=e.useContext(Le),c=l("tooltip",n),[u,d,h]=zh(c),f=Fh(c,a),p=f.arrowStyle,m=Object.assign(Object.assign({},s),f.overlayStyle),g=Ji()(d,h,c,`${c}-pure`,`${c}-placement-${i}`,r,f.className);return u(e.createElement("div",{className:g,style:p},e.createElement("div",{className:`${c}-arrow`}),e.createElement(gc,Object.assign({},t,{className:d,prefixCls:c,overlayInnerStyle:m}),o)))};var Kh=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const Vh=e.forwardRef(((t,n)=>{var r,i;const{prefixCls:o,openClassName:a,getTooltipContainer:s,overlayClassName:l,color:c,overlayInnerStyle:u,children:d,afterOpenChange:h,afterVisibleChange:f,destroyTooltipOnHide:p,arrow:m=!0,title:g,overlay:v,builtinPlacements:b,arrowPointAtCenter:y=!1,autoAdjustOverflow:_=!0}=t,S=!!m,[,w]=Oa(),{getPopupContainer:C,getPrefixCls:x,direction:E}=e.useContext(Le),k=dr("Tooltip"),O=e.useRef(null),$=()=>{var e;null===(e=O.current)||void 0===e||e.forceAlign()};e.useImperativeHandle(n,(()=>{var e;return{forceAlign:$,forcePopupAlign:()=>{k.deprecated(!1,"forcePopupAlign","forceAlign"),$()},nativeElement:null===(e=O.current)||void 0===e?void 0:e.nativeElement}}));const[R,I]=Co(!1,{value:null!==(r=t.open)&&void 0!==r?r:t.visible,defaultValue:null!==(i=t.defaultOpen)&&void 0!==i?i:t.defaultVisible}),M=!g&&!v&&0!==g,P=e.useMemo((()=>{var e,t;let n=y;return"object"===typeof m&&(n=null!==(t=null!==(e=m.pointAtCenter)&&void 0!==e?e:m.arrowPointAtCenter)&&void 0!==t?t:y),b||xh({arrowPointAtCenter:n,autoAdjustOverflow:_,arrowWidth:S?w.sizePopupArrow:0,borderRadius:w.borderRadius,offset:w.marginXXS,visibleFirst:!0})}),[y,m,b,w]),N=e.useMemo((()=>0===g?g:v||g||""),[v,g]),L=e.createElement(ch,{space:!0},"function"===typeof N?N():N),{getPopupContainer:T,placement:D="top",mouseEnterDelay:A=.1,mouseLeaveDelay:B=.1,overlayStyle:j,rootClassName:z}=t,H=Kh(t,["getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName"]),F=x("tooltip",o),W=x(),K=t["data-popover-inject"];let V=R;"open"in t||"visible"in t||!M||(V=!1);const U=e.isValidElement(d)&&!Gl(d)?d:e.createElement("span",null,d),q=U.props,X=q.className&&"string"!==typeof q.className?q.className:Ji()(q.className,a||`${F}-open`),[G,Y,Q]=zh(F,!K),J=Fh(F,c),Z=J.arrowStyle,ee=Object.assign(Object.assign({},u),J.overlayStyle),te=Ji()(l,{[`${F}-rtl`]:"rtl"===E},J.className,z,Y,Q),[ne,re]=qs("Tooltip",H.zIndex),ie=e.createElement(Bu,Object.assign({},H,{zIndex:ne,showArrow:S,placement:D,mouseEnterDelay:A,mouseLeaveDelay:B,prefixCls:F,overlayClassName:te,overlayStyle:Object.assign(Object.assign({},Z),j),getTooltipContainer:T||s||C,ref:O,builtinPlacements:P,overlay:L,visible:V,onVisibleChange:e=>{var n,r;I(!M&&e),M||(null===(n=t.onOpenChange)||void 0===n||n.call(t,e),null===(r=t.onVisibleChange)||void 0===r||r.call(t,e))},afterVisibleChange:null!==h&&void 0!==h?h:f,overlayInnerStyle:ee,arrowContent:e.createElement("span",{className:`${F}-arrow-content`}),motion:{motionName:ph(W,"zoom-big-fast",t.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!p}),V?Yl(U,{className:X}):U);return G(e.createElement(Fs.Provider,{value:re},ie))}));Vh._InternalPanelDoNotUseOrYouWillBeFired=Wh;const Uh=Vh;const qh=function(t){var n=t.className,r=t.customizeIcon,i=t.customizeIconProps,o=t.children,a=t.onMouseDown,s=t.onClick,l="function"===typeof r?r(i):r;return e.createElement("span",{className:n,onMouseDown:function(e){e.preventDefault(),null===a||void 0===a||a(e)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:s,"aria-hidden":!0},void 0!==l?l:e.createElement("span",{className:Ji()(n.split(/\s+/).map((function(e){return"".concat(e,"-icon")})))},o))};var Xh=e.createContext(null);function Gh(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250,n=e.useRef(null),r=e.useRef(null);return e.useEffect((function(){return function(){window.clearTimeout(r.current)}}),[]),[function(){return n.current},function(e){(e||null===n.current)&&(n.current=e),window.clearTimeout(r.current),r.current=window.setTimeout((function(){n.current=null}),t)}]}var Yh=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Qh=void 0;function Jh(t,n){var r=t.prefixCls,i=t.invalidate,o=t.item,a=t.renderItem,s=t.responsive,l=t.responsiveDisabled,c=t.registerSize,u=t.itemKey,d=t.className,h=t.style,f=t.children,p=t.display,m=t.order,g=t.component,v=void 0===g?"div":g,b=lo(t,Yh),y=s&&!p;function _(e){c(u,e)}e.useEffect((function(){return function(){_(null)}}),[]);var S,w=a&&o!==Qh?a(o):f;i||(S={opacity:y?0:1,height:y?0:Qh,overflowY:y?"hidden":Qh,order:s?m:Qh,pointerEvents:y?"none":Qh,position:y?"absolute":Qh});var C={};y&&(C["aria-hidden"]=!0);var x=e.createElement(v,Gt({className:Ji()(!i&&r,d),style:me(me({},S),h)},C,b,{ref:n}),w);return s&&(x=e.createElement(au,{onResize:function(e){_(e.offsetWidth)},disabled:l},x)),x}var Zh=e.forwardRef(Jh);Zh.displayName="Item";const ef=Zh;function tf(){var t=e.useRef(null);return function(e){t.current||(t.current=[],function(e){if("undefined"===typeof MessageChannel)Zo(e);else{var t=new MessageChannel;t.port1.onmessage=function(){return e()},t.port2.postMessage(void 0)}}((function(){(0,ve.unstable_batchedUpdates)((function(){t.current.forEach((function(e){e()})),t.current=null}))}))),t.current.push(e)}}function nf(t,n){var r=Be(e.useState(n),2),i=r[0],o=r[1];return[i,_o((function(e){t((function(){o(e)}))}))]}var rf=e.createContext(null),of=["component"],af=["className"],sf=["className"],lf=function(t,n){var r=e.useContext(rf);if(!r){var i=t.component,o=void 0===i?"div":i,a=lo(t,of);return e.createElement(o,Gt({},a,{ref:n}))}var s=r.className,l=lo(r,af),c=t.className,u=lo(t,sf);return e.createElement(rf.Provider,{value:null},e.createElement(ef,Gt({ref:n,className:Ji()(s,c)},l,u)))},cf=e.forwardRef(lf);cf.displayName="RawItem";const uf=cf;var df=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],hf="responsive",ff="invalidate";function pf(e){return"+ ".concat(e.length," ...")}function mf(t,n){var r=t.prefixCls,i=void 0===r?"rc-overflow":r,o=t.data,a=void 0===o?[]:o,s=t.renderItem,l=t.renderRawItem,c=t.itemKey,u=t.itemWidth,d=void 0===u?10:u,h=t.ssr,f=t.style,p=t.className,m=t.maxCount,g=t.renderRest,v=t.renderRawRest,b=t.suffix,y=t.component,_=void 0===y?"div":y,S=t.itemComponent,w=t.onVisibleChange,C=lo(t,df),x="full"===h,E=tf(),k=Be(nf(E,null),2),O=k[0],$=k[1],R=O||0,I=Be(nf(E,new Map),2),M=I[0],P=I[1],N=Be(nf(E,0),2),L=N[0],T=N[1],D=Be(nf(E,0),2),A=D[0],B=D[1],j=Be(nf(E,0),2),z=j[0],H=j[1],F=Be((0,e.useState)(null),2),W=F[0],K=F[1],V=Be((0,e.useState)(null),2),U=V[0],q=V[1],X=e.useMemo((function(){return null===U&&x?Number.MAX_SAFE_INTEGER:U||0}),[U,O]),G=Be((0,e.useState)(!1),2),Y=G[0],Q=G[1],J="".concat(i,"-item"),Z=Math.max(L,A),ee=m===hf,te=a.length&&ee,ne=m===ff,re=te||"number"===typeof m&&a.length>m,ie=(0,e.useMemo)((function(){var e=a;return te?e=null===O&&x?a:a.slice(0,Math.min(a.length,R/d)):"number"===typeof m&&(e=a.slice(0,m)),e}),[a,d,O,m,te]),oe=(0,e.useMemo)((function(){return te?a.slice(X+1):a.slice(ie.length)}),[a,ie,te,X]),ae=(0,e.useCallback)((function(e,t){var n;return"function"===typeof c?c(e):null!==(n=c&&(null===e||void 0===e?void 0:e[c]))&&void 0!==n?n:t}),[c]),se=(0,e.useCallback)(s||function(e){return e},[s]);function le(e,t,n){(U!==e||void 0!==t&&t!==W)&&(q(e),n||(Q(e<a.length-1),null===w||void 0===w||w(e)),void 0!==t&&K(t))}function ce(e,t){P((function(n){var r=new Map(n);return null===t?r.delete(e):r.set(e,t),r}))}function ue(e){return M.get(ae(ie[e],e))}Bt((function(){if(R&&"number"===typeof Z&&ie){var e=z,t=ie.length,n=t-1;if(!t)return void le(0,null);for(var r=0;r<t;r+=1){var i=ue(r);if(x&&(i=i||0),void 0===i){le(r-1,void 0,!0);break}if(e+=i,0===n&&e<=R||r===n-1&&e+ue(n)<=R){le(n,null);break}if(e+Z>R){le(r-1,e-i-z+A);break}}b&&ue(0)+z>R&&K(null)}}),[R,M,A,z,ae,ie]);var de=Y&&!!oe.length,he={};null!==W&&te&&(he={position:"absolute",left:W,top:0});var fe,pe={prefixCls:J,responsive:te,component:S,invalidate:ne},ge=l?function(t,n){var r=ae(t,n);return e.createElement(rf.Provider,{key:r,value:me(me({},pe),{},{order:n,item:t,itemKey:r,registerSize:ce,display:n<=X})},l(t,n))}:function(t,n){var r=ae(t,n);return e.createElement(ef,Gt({},pe,{order:n,key:r,item:t,renderItem:se,itemKey:r,registerSize:ce,display:n<=X}))},ve={order:de?X:Number.MAX_SAFE_INTEGER,className:"".concat(J,"-rest"),registerSize:function(e,t){B(t),T(A)},display:de};if(v)v&&(fe=e.createElement(rf.Provider,{value:me(me({},pe),ve)},v(oe)));else{var be=g||pf;fe=e.createElement(ef,Gt({},pe,ve),"function"===typeof be?be(oe):be)}var ye=e.createElement(_,Gt({className:Ji()(!ne&&i,p),style:f,ref:n},C),ie.map(ge),re?fe:null,b&&e.createElement(ef,Gt({},pe,{responsive:ee,responsiveDisabled:!te,order:X,className:"".concat(J,"-suffix"),registerSize:function(e,t){H(t)},display:!0,style:he}),b));return ee&&(ye=e.createElement(au,{onResize:function(e,t){$(t.clientWidth)},disabled:!te},ye)),ye}var gf=e.forwardRef(mf);gf.displayName="Overflow",gf.Item=uf,gf.RESPONSIVE=hf,gf.INVALIDATE=ff;const vf=gf;var bf=function(t,n){var r,i=t.prefixCls,o=t.id,a=t.inputElement,s=t.disabled,l=t.tabIndex,c=t.autoFocus,u=t.autoComplete,d=t.editable,h=t.activeDescendantId,f=t.value,p=t.maxLength,m=t.onKeyDown,g=t.onMouseDown,v=t.onChange,b=t.onPaste,y=t.onCompositionStart,_=t.onCompositionEnd,S=t.open,w=t.attrs,C=a||e.createElement("input",null),x=C,E=x.ref,k=x.props,O=k.onKeyDown,$=k.onChange,R=k.onMouseDown,I=k.onCompositionStart,M=k.onCompositionEnd,P=k.style;return C.props,C=e.cloneElement(C,me(me(me({type:"search"},k),{},{id:o,ref:io(n,E),disabled:s,tabIndex:l,autoComplete:u||"off",autoFocus:c,className:Ji()("".concat(i,"-selection-search-input"),null===(r=C)||void 0===r||null===(r=r.props)||void 0===r?void 0:r.className),role:"combobox","aria-expanded":S||!1,"aria-haspopup":"listbox","aria-owns":"".concat(o,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(o,"_list"),"aria-activedescendant":S?h:void 0},w),{},{value:d?f:"",maxLength:p,readOnly:!d,unselectable:d?null:"on",style:me(me({},P),{},{opacity:d?null:0}),onKeyDown:function(e){m(e),O&&O(e)},onMouseDown:function(e){g(e),R&&R(e)},onChange:function(e){v(e),$&&$(e)},onCompositionStart:function(e){y(e),I&&I(e)},onCompositionEnd:function(e){_(e),M&&M(e)},onPaste:b}))};const yf=e.forwardRef(bf);function _f(e){return Array.isArray(e)?e:void 0!==e?[e]:[]}var Sf="undefined"!==typeof window&&window.document&&window.document.documentElement;function wf(e){return["string","number"].includes(le(e))}function Cf(e){var t=void 0;return e&&(wf(e.title)?t=e.title.toString():wf(e.label)&&(t=e.label.toString())),t}function xf(e){var t;return null!==(t=e.key)&&void 0!==t?t:e.value}var Ef=function(e){e.preventDefault(),e.stopPropagation()};const kf=function(t){var n,r,i=t.id,o=t.prefixCls,a=t.values,s=t.open,l=t.searchValue,c=t.autoClearSearchValue,u=t.inputRef,d=t.placeholder,h=t.disabled,f=t.mode,p=t.showSearch,m=t.autoFocus,g=t.autoComplete,v=t.activeDescendantId,b=t.tabIndex,y=t.removeIcon,_=t.maxTagCount,S=t.maxTagTextLength,w=t.maxTagPlaceholder,C=void 0===w?function(e){return"+ ".concat(e.length," ...")}:w,x=t.tagRender,E=t.onToggleOpen,k=t.onRemove,O=t.onInputChange,$=t.onInputPaste,R=t.onInputKeyDown,I=t.onInputMouseDown,M=t.onInputCompositionStart,P=t.onInputCompositionEnd,N=e.useRef(null),L=Be((0,e.useState)(0),2),T=L[0],D=L[1],A=Be((0,e.useState)(!1),2),B=A[0],j=A[1],z="".concat(o,"-selection"),H=s||"multiple"===f&&!1===c||"tags"===f?l:"",F="tags"===f||"multiple"===f&&!1===c||p&&(s||B);n=function(){D(N.current.scrollWidth)},r=[H],Sf?e.useLayoutEffect(n,r):e.useEffect(n,r);var W=function(t,n,r,i,o){return e.createElement("span",{title:Cf(t),className:Ji()("".concat(z,"-item"),fe({},"".concat(z,"-item-disabled"),r))},e.createElement("span",{className:"".concat(z,"-item-content")},n),i&&e.createElement(qh,{className:"".concat(z,"-item-remove"),onMouseDown:Ef,onClick:o,customizeIcon:y},"\xd7"))},K=function(t,n,r,i,o,a){return e.createElement("span",{onMouseDown:function(e){Ef(e),E(!s)}},x({label:n,value:t,disabled:r,closable:i,onClose:o,isMaxTag:!!a}))},V=e.createElement("div",{className:"".concat(z,"-search"),style:{width:T},onFocus:function(){j(!0)},onBlur:function(){j(!1)}},e.createElement(yf,{ref:u,open:s,prefixCls:o,id:i,inputElement:null,disabled:h,autoFocus:m,autoComplete:g,editable:F,activeDescendantId:v,value:H,onKeyDown:R,onMouseDown:I,onChange:O,onPaste:$,onCompositionStart:M,onCompositionEnd:P,tabIndex:b,attrs:Rs(t,!0)}),e.createElement("span",{ref:N,className:"".concat(z,"-search-mirror"),"aria-hidden":!0},H,"\xa0")),U=e.createElement(vf,{prefixCls:"".concat(z,"-overflow"),data:a,renderItem:function(e){var t=e.disabled,n=e.label,r=e.value,i=!h&&!t,o=n;if("number"===typeof S&&("string"===typeof n||"number"===typeof n)){var a=String(o);a.length>S&&(o="".concat(a.slice(0,S),"..."))}var s=function(t){t&&t.stopPropagation(),k(e)};return"function"===typeof x?K(r,o,t,i,s):W(e,o,t,i,s)},renderRest:function(e){var t="function"===typeof C?C(e):C;return"function"===typeof x?K(void 0,t,!1,!1,void 0,!0):W({title:t},t,!1)},suffix:V,itemKey:xf,maxCount:_});return e.createElement("span",{className:"".concat(z,"-wrap")},U,!a.length&&!H&&e.createElement("span",{className:"".concat(z,"-placeholder")},d))};const Of=function(t){var n=t.inputElement,r=t.prefixCls,i=t.id,o=t.inputRef,a=t.disabled,s=t.autoFocus,l=t.autoComplete,c=t.activeDescendantId,u=t.mode,d=t.open,h=t.values,f=t.placeholder,p=t.tabIndex,m=t.showSearch,g=t.searchValue,v=t.activeValue,b=t.maxLength,y=t.onInputKeyDown,_=t.onInputMouseDown,S=t.onInputChange,w=t.onInputPaste,C=t.onInputCompositionStart,x=t.onInputCompositionEnd,E=t.title,k=Be(e.useState(!1),2),O=k[0],$=k[1],R="combobox"===u,I=R||m,M=h[0],P=g||"";R&&v&&!O&&(P=v),e.useEffect((function(){R&&$(!1)}),[R,v]);var N=!("combobox"!==u&&!d&&!m)&&!!P,L=void 0===E?Cf(M):E,T=e.useMemo((function(){return M?null:e.createElement("span",{className:"".concat(r,"-selection-placeholder"),style:N?{visibility:"hidden"}:void 0},f)}),[M,N,f,r]);return e.createElement("span",{className:"".concat(r,"-selection-wrap")},e.createElement("span",{className:"".concat(r,"-selection-search")},e.createElement(yf,{ref:o,prefixCls:r,id:i,open:d,inputElement:n,disabled:a,autoFocus:s,autoComplete:l,editable:I,activeDescendantId:c,value:P,onKeyDown:y,onMouseDown:_,onChange:function(e){$(!0),S(e)},onPaste:w,onCompositionStart:C,onCompositionEnd:x,tabIndex:p,attrs:Rs(t,!0),maxLength:R?b:void 0})),!R&&M?e.createElement("span",{className:"".concat(r,"-selection-item"),title:L,style:N?{visibility:"hidden"}:void 0},M.label):null,T)};var $f=function(t,n){var r=(0,e.useRef)(null),i=(0,e.useRef)(!1),o=t.prefixCls,a=t.open,s=t.mode,l=t.showSearch,c=t.tokenWithEnter,u=t.disabled,d=t.prefix,h=t.autoClearSearchValue,f=t.onSearch,p=t.onSearchSubmit,m=t.onToggleOpen,g=t.onInputKeyDown,v=t.domRef;e.useImperativeHandle(n,(function(){return{focus:function(e){r.current.focus(e)},blur:function(){r.current.blur()}}}));var b=Be(Gh(0),2),y=b[0],_=b[1],S=(0,e.useRef)(null),w=function(e){!1!==f(e,!0,i.current)&&m(!0)},C={inputRef:r,onInputKeyDown:function(e){var t,n=e.which,o=r.current instanceof HTMLTextAreaElement;(o||!a||n!==ks.UP&&n!==ks.DOWN||e.preventDefault(),g&&g(e),n!==ks.ENTER||"tags"!==s||i.current||a||null===p||void 0===p||p(e.target.value),o&&!a&&~[ks.UP,ks.DOWN,ks.LEFT,ks.RIGHT].indexOf(n))||(t=n,[ks.ESC,ks.SHIFT,ks.BACKSPACE,ks.TAB,ks.WIN_KEY,ks.ALT,ks.META,ks.WIN_KEY_RIGHT,ks.CTRL,ks.SEMICOLON,ks.EQUALS,ks.CAPS_LOCK,ks.CONTEXT_MENU,ks.F1,ks.F2,ks.F3,ks.F4,ks.F5,ks.F6,ks.F7,ks.F8,ks.F9,ks.F10,ks.F11,ks.F12].includes(t)||m(!0))},onInputMouseDown:function(){_(!0)},onInputChange:function(e){var t=e.target.value;if(c&&S.current&&/[\r\n]/.test(S.current)){var n=S.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");t=t.replace(n,S.current)}S.current=null,w(t)},onInputPaste:function(e){var t=e.clipboardData,n=null===t||void 0===t?void 0:t.getData("text");S.current=n||""},onInputCompositionStart:function(){i.current=!0},onInputCompositionEnd:function(e){i.current=!1,"combobox"!==s&&w(e.target.value)}},x="multiple"===s||"tags"===s?e.createElement(kf,Gt({},t,C)):e.createElement(Of,Gt({},t,C));return e.createElement("div",{ref:v,className:"".concat(o,"-selector"),onClick:function(e){e.target!==r.current&&(void 0!==document.body.style.msTouchAction?setTimeout((function(){r.current.focus()})):r.current.focus())},onMouseDown:function(e){var t=y();e.target===r.current||t||"combobox"===s&&u||e.preventDefault(),("combobox"===s||l&&t)&&a||(a&&!1!==h&&f("",!0,!1),m())}},d&&e.createElement("div",{className:"".concat(o,"-prefix")},d),x)};const Rf=e.forwardRef($f);var If=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Mf=function(t,n){var r=t.prefixCls,i=(t.disabled,t.visible),o=t.children,a=t.popupElement,s=t.animation,l=t.transitionName,c=t.dropdownStyle,u=t.dropdownClassName,d=t.direction,h=void 0===d?"ltr":d,f=t.placement,p=t.builtinPlacements,m=t.dropdownMatchSelectWidth,g=t.dropdownRender,v=t.dropdownAlign,b=t.getPopupContainer,y=t.empty,_=t.getTriggerDOMNode,S=t.onPopupVisibleChange,w=t.onPopupMouseEnter,C=lo(t,If),x="".concat(r,"-dropdown"),E=a;g&&(E=g(a));var k=e.useMemo((function(){return p||function(e){var t=!0===e?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"}}}(m)}),[p,m]),O=s?"".concat(x,"-").concat(s):l,$="number"===typeof m,R=e.useMemo((function(){return $?null:!1===m?"minWidth":"width"}),[m,$]),I=c;$&&(I=me(me({},I),{},{width:m}));var M=e.useRef(null);return e.useImperativeHandle(n,(function(){return{getPopupElement:function(){var e;return null===(e=M.current)||void 0===e?void 0:e.popupElement}}})),e.createElement(Mu,Gt({},C,{showAction:S?["click"]:[],hideAction:S?["click"]:[],popupPlacement:f||("rtl"===h?"bottomRight":"bottomLeft"),builtinPlacements:k,prefixCls:x,popupTransitionName:O,popup:e.createElement("div",{onMouseEnter:w},E),ref:M,stretch:R,popupAlign:v,popupVisible:i,getPopupContainer:b,popupClassName:Ji()(u,fe({},"".concat(x,"-empty"),y)),popupStyle:I,getTriggerDOMNode:_,onPopupVisibleChange:S}),o)};const Pf=e.forwardRef(Mf);function Nf(e,t){var n,r=e.key;return"value"in e&&(n=e.value),null!==r&&void 0!==r?r:void 0!==n?n:"rc-index-key-".concat(t)}function Lf(e){return"undefined"!==typeof e&&!Number.isNaN(e)}function Tf(e,t){var n=e||{},r=n.label||(t?"children":"label");return{label:r,value:n.value||"value",options:n.options||"options",groupLabel:n.groupLabel||r}}function Df(e){var t=me({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return ot(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}const Af=e.createContext(null);function Bf(t){var n=t.visible,r=t.values;if(!n)return null;return e.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(r.slice(0,50).map((function(e){var t=e.label,n=e.value;return["number","string"].includes(le(t))?t:n})).join(", ")),r.length>50?", ...":null)}var jf=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],zf=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Hf=function(e){return"tags"===e||"multiple"===e},Ff=e.forwardRef((function(t,n){var r,i=t.id,o=t.prefixCls,a=t.className,s=t.showSearch,l=t.tagRender,c=t.direction,u=t.omitDomProps,d=t.displayValues,h=t.onDisplayValuesChange,f=t.emptyOptions,p=t.notFoundContent,m=void 0===p?"Not Found":p,g=t.onClear,v=t.mode,b=t.disabled,y=t.loading,_=t.getInputElement,S=t.getRawInputElement,w=t.open,C=t.defaultOpen,x=t.onDropdownVisibleChange,E=t.activeValue,k=t.onActiveValueChange,O=t.activeDescendantId,$=t.searchValue,R=t.autoClearSearchValue,I=t.onSearch,M=t.onSearchSplit,P=t.tokenSeparators,N=t.allowClear,L=t.prefix,T=t.suffixIcon,D=t.clearIcon,A=t.OptionList,B=t.animation,j=t.transitionName,z=t.dropdownStyle,H=t.dropdownClassName,F=t.dropdownMatchSelectWidth,W=t.dropdownRender,K=t.dropdownAlign,V=t.placement,U=t.builtinPlacements,q=t.getPopupContainer,X=t.showAction,G=void 0===X?[]:X,Y=t.onFocus,Q=t.onBlur,J=t.onKeyUp,Z=t.onKeyDown,ee=t.onMouseDown,te=lo(t,jf),ne=Hf(v),re=(void 0!==s?s:ne)||"combobox"===v,ie=me({},te);zf.forEach((function(e){delete ie[e]})),null===u||void 0===u||u.forEach((function(e){delete ie[e]}));var oe=Be(e.useState(!1),2),ae=oe[0],ce=oe[1];e.useEffect((function(){ce(uu())}),[]);var ue=e.useRef(null),de=e.useRef(null),he=e.useRef(null),pe=e.useRef(null),ge=e.useRef(null),ve=e.useRef(!1),be=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,n=Be(e.useState(!1),2),r=n[0],i=n[1],o=e.useRef(null),a=function(){window.clearTimeout(o.current)};return e.useEffect((function(){return a}),[]),[r,function(e,n){a(),o.current=window.setTimeout((function(){i(e),n&&n()}),t)},a]}(),ye=Be(be,3),_e=ye[0],Se=ye[1],we=ye[2];e.useImperativeHandle(n,(function(){var e,t;return{focus:null===(e=pe.current)||void 0===e?void 0:e.focus,blur:null===(t=pe.current)||void 0===t?void 0:t.blur,scrollTo:function(e){var t;return null===(t=ge.current)||void 0===t?void 0:t.scrollTo(e)},nativeElement:ue.current||de.current}}));var Ce=e.useMemo((function(){var e;if("combobox"!==v)return $;var t=null===(e=d[0])||void 0===e?void 0:e.value;return"string"===typeof t||"number"===typeof t?String(t):""}),[$,v,d]),xe="combobox"===v&&"function"===typeof _&&_()||null,Ee="function"===typeof S&&S(),ke=oo(de,null===Ee||void 0===Ee||null===(r=Ee.props)||void 0===r?void 0:r.ref),Oe=Be(e.useState(!1),2),$e=Oe[0],Re=Oe[1];Bt((function(){Re(!0)}),[]);var Ie=Be(Co(!1,{defaultValue:C,value:w}),2),Me=Ie[0],Pe=Ie[1],Ne=!!$e&&Me,Le=!m&&f;(b||Le&&Ne&&"combobox"===v)&&(Ne=!1);var Te=!Le&&Ne,De=e.useCallback((function(e){var t=void 0!==e?e:!Ne;b||(Pe(t),Ne!==t&&(null===x||void 0===x||x(t)))}),[b,Ne,Pe,x]),Ae=e.useMemo((function(){return(P||[]).some((function(e){return["\n","\r\n"].includes(e)}))}),[P]),je=e.useContext(Af)||{},ze=je.maxCount,He=je.rawValues,Fe=function(e,t,n){if(!(ne&&Lf(ze)&&(null===He||void 0===He?void 0:He.size)>=ze)){var r=!0,i=e;null===k||void 0===k||k(null);var o=function(e,t,n){if(!t||!t.length)return null;var r=!1,i=function e(t,n){var i=nr(n),o=i[0],a=i.slice(1);if(!o)return[t];var s=t.split(o);return r=r||s.length>1,s.reduce((function(t,n){return[].concat(se(t),se(e(n,a)))}),[]).filter(Boolean)}(e,t);return r?"undefined"!==typeof n?i.slice(0,n):i:null}(e,P,Lf(ze)?ze-He.size:void 0),a=n?null:o;return"combobox"!==v&&a&&(i="",null===M||void 0===M||M(a),De(!1),r=!1),I&&Ce!==i&&I(i,{source:t?"typing":"effect"}),r}};e.useEffect((function(){Ne||ne||"combobox"===v||Fe("",!1,!1)}),[Ne]),e.useEffect((function(){Me&&b&&Pe(!1),b&&!ve.current&&Se(!1)}),[b]);var We=Be(Gh(),2),Ke=We[0],Ve=We[1],Ue=e.useRef(!1),qe=e.useRef(!1),Xe=[];e.useEffect((function(){return function(){Xe.forEach((function(e){return clearTimeout(e)})),Xe.splice(0,Xe.length)}}),[]);var Ge,Ye=Be(e.useState({}),2)[1];Ee&&(Ge=function(e){De(e)}),function(t,n,r,i){var o=e.useRef(null);o.current={open:n,triggerOpen:r,customizedTrigger:i},e.useEffect((function(){function e(e){var n;if(null===(n=o.current)||void 0===n||!n.customizedTrigger){var r=e.target;r.shadowRoot&&e.composed&&(r=e.composedPath()[0]||r),o.current.open&&t().filter((function(e){return e})).every((function(e){return!e.contains(r)&&e!==r}))&&o.current.triggerOpen(!1)}}return window.addEventListener("mousedown",e),function(){return window.removeEventListener("mousedown",e)}}),[])}((function(){var e;return[ue.current,null===(e=he.current)||void 0===e?void 0:e.getPopupElement()]}),Te,De,!!Ee);var Qe,Je=e.useMemo((function(){return me(me({},t),{},{notFoundContent:m,open:Ne,triggerOpen:Te,id:i,showSearch:re,multiple:ne,toggleOpen:De})}),[t,m,Te,Ne,i,re,ne,De]),Ze=!!T||y;Ze&&(Qe=e.createElement(qh,{className:Ji()("".concat(o,"-arrow"),fe({},"".concat(o,"-arrow-loading"),y)),customizeIcon:T,customizeIconProps:{loading:y,searchValue:Ce,open:Ne,focused:_e,showSearch:re}}));var et,tt=function(t,n,r,i,o){var a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0,c=e.useMemo((function(){return"object"===le(i)?i.clearIcon:o||void 0}),[i,o]);return{allowClear:e.useMemo((function(){return!(a||!i||!r.length&&!s||"combobox"===l&&""===s)}),[i,a,r.length,s,l]),clearIcon:e.createElement(qh,{className:"".concat(t,"-clear"),onMouseDown:n,customizeIcon:c},"\xd7")}}(o,(function(){var e;null===g||void 0===g||g(),null===(e=pe.current)||void 0===e||e.focus(),h([],{type:"clear",values:d}),Fe("",!1,!1)}),d,N,D,b,Ce,v),nt=tt.allowClear,rt=tt.clearIcon,it=e.createElement(A,{ref:ge}),ot=Ji()(o,a,fe(fe(fe(fe(fe(fe(fe(fe(fe(fe({},"".concat(o,"-focused"),_e),"".concat(o,"-multiple"),ne),"".concat(o,"-single"),!ne),"".concat(o,"-allow-clear"),N),"".concat(o,"-show-arrow"),Ze),"".concat(o,"-disabled"),b),"".concat(o,"-loading"),y),"".concat(o,"-open"),Ne),"".concat(o,"-customize-input"),xe),"".concat(o,"-show-search"),re)),at=e.createElement(Pf,{ref:he,disabled:b,prefixCls:o,visible:Te,popupElement:it,animation:B,transitionName:j,dropdownStyle:z,dropdownClassName:H,direction:c,dropdownMatchSelectWidth:F,dropdownRender:W,dropdownAlign:K,placement:V,builtinPlacements:U,getPopupContainer:q,empty:f,getTriggerDOMNode:function(e){return de.current||e},onPopupVisibleChange:Ge,onPopupMouseEnter:function(){Ye({})}},Ee?e.cloneElement(Ee,{ref:ke}):e.createElement(Rf,Gt({},t,{domRef:de,prefixCls:o,inputElement:xe,ref:pe,id:i,prefix:L,showSearch:re,autoClearSearchValue:R,mode:v,activeDescendantId:O,tagRender:l,values:d,open:Ne,onToggleOpen:De,activeValue:E,searchValue:Ce,onSearch:Fe,onSearchSubmit:function(e){e&&e.trim()&&I(e,{source:"submit"})},onRemove:function(e){var t=d.filter((function(t){return t!==e}));h(t,{type:"remove",values:[e]})},tokenWithEnter:Ae})));return et=Ee?at:e.createElement("div",Gt({className:ot},ie,{ref:ue,onMouseDown:function(e){var t,n=e.target,r=null===(t=he.current)||void 0===t?void 0:t.getPopupElement();if(r&&r.contains(n)){var i=setTimeout((function(){var e,t=Xe.indexOf(i);-1!==t&&Xe.splice(t,1),we(),ae||r.contains(document.activeElement)||null===(e=pe.current)||void 0===e||e.focus()}));Xe.push(i)}for(var o=arguments.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];null===ee||void 0===ee||ee.apply(void 0,[e].concat(a))},onKeyDown:function(e){var t,n=Ke(),r=e.key,i="Enter"===r;if(i&&("combobox"!==v&&e.preventDefault(),Ne||De(!0)),Ve(!!Ce),"Backspace"===r&&!n&&ne&&!Ce&&d.length){for(var o=se(d),a=null,s=o.length-1;s>=0;s-=1){var l=o[s];if(!l.disabled){o.splice(s,1),a=l;break}}a&&h(o,{type:"remove",values:[a]})}for(var c=arguments.length,u=new Array(c>1?c-1:0),f=1;f<c;f++)u[f-1]=arguments[f];!Ne||i&&Ue.current||null===(t=ge.current)||void 0===t||t.onKeyDown.apply(t,[e].concat(u)),i&&(Ue.current=!0),null===Z||void 0===Z||Z.apply(void 0,[e].concat(u))},onKeyUp:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i;Ne&&(null===(i=ge.current)||void 0===i||i.onKeyUp.apply(i,[e].concat(n))),"Enter"===e.key&&(Ue.current=!1),null===J||void 0===J||J.apply(void 0,[e].concat(n))},onFocus:function(){Se(!0),b||(Y&&!qe.current&&Y.apply(void 0,arguments),G.includes("focus")&&De(!0)),qe.current=!0},onBlur:function(){ve.current=!0,Se(!1,(function(){qe.current=!1,ve.current=!1,De(!1)})),b||(Ce&&("tags"===v?I(Ce,{source:"submit"}):"multiple"===v&&I("",{source:"blur"})),Q&&Q.apply(void 0,arguments))}}),e.createElement(Bf,{visible:_e&&!Ne,values:d}),at,Qe,nt&&rt),e.createElement(Xh.Provider,{value:Je},et)}));const Wf=Ff;var Kf=function(){return null};Kf.isSelectOptGroup=!0;const Vf=Kf;var Uf=function(){return null};Uf.isSelectOption=!0;const qf=Uf;function Xf(e,t){var n=Object.assign({},e);return Array.isArray(t)&&t.forEach((function(e){delete n[e]})),n}var Gf=e.forwardRef((function(t,n){var r=t.height,i=t.offsetY,o=t.offsetX,a=t.children,s=t.prefixCls,l=t.onInnerResize,c=t.innerProps,u=t.rtl,d=t.extra,h={},f={display:"flex",flexDirection:"column"};return void 0!==i&&(h={height:r,position:"relative",overflow:"hidden"},f=me(me({},f),{},fe(fe(fe(fe(fe({transform:"translateY(".concat(i,"px)")},u?"marginRight":"marginLeft",-o),"position","absolute"),"left",0),"right",0),"top",0))),e.createElement("div",{style:h},e.createElement(au,{onResize:function(e){e.offsetHeight&&l&&l()}},e.createElement("div",Gt({style:f,className:Ji()(fe({},"".concat(s,"-holder-inner"),s)),ref:n},c),a,d)))}));Gf.displayName="Filler";const Yf=Gf;function Qf(t){var n=t.children,r=t.setRef,i=e.useCallback((function(e){r(e)}),[]);return e.cloneElement(n,{ref:i})}function Jf(t,n,r){var i=Be(e.useState(t),2),o=i[0],a=i[1],s=Be(e.useState(null),2),l=s[0],c=s[1];return e.useEffect((function(){var e=function(e,t,n){var r,i,o=e.length,a=t.length;if(0===o&&0===a)return null;o<a?(r=e,i=t):(r=t,i=e);var s={__EMPTY_ITEM__:!0};function l(e){return void 0!==e?n(e):s}for(var c=null,u=1!==Math.abs(o-a),d=0;d<i.length;d+=1){var h=l(r[d]);if(h!==l(i[d])){c=d,u=u||h!==l(i[d+1]);break}}return null===c?null:{index:c,multiple:u}}(o||[],t||[],n);void 0!==(null===e||void 0===e?void 0:e.index)&&(null===r||void 0===r||r(e.index),c(t[e.index])),a(t)}),[t]),[l]}const Zf="object"===("undefined"===typeof navigator?"undefined":le(navigator))&&/Firefox/i.test(navigator.userAgent),ep=function(t,n,r,i){var o=(0,e.useRef)(!1),a=(0,e.useRef)(null);var s=(0,e.useRef)({top:t,bottom:n,left:r,right:i});return s.current.top=t,s.current.bottom=n,s.current.left=r,s.current.right=i,function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e?t<0&&s.current.left||t>0&&s.current.right:t<0&&s.current.top||t>0&&s.current.bottom;return n&&r?(clearTimeout(a.current),o.current=!1):r&&!o.current||(clearTimeout(a.current),o.current=!0,a.current=setTimeout((function(){o.current=!1}),50)),!o.current&&r}};function tp(t,n,r,i,o,a,s){var l=(0,e.useRef)(0),c=(0,e.useRef)(null),u=(0,e.useRef)(null),d=(0,e.useRef)(!1),h=ep(n,r,i,o);var f=(0,e.useRef)(null),p=(0,e.useRef)(null);return[function(e){if(t){Zo.cancel(p.current),p.current=Zo((function(){f.current=null}),2);var n=e.deltaX,r=e.deltaY,i=e.shiftKey,o=n,m=r;("sx"===f.current||!f.current&&i&&r&&!n)&&(o=r,m=0,f.current="sx");var g=Math.abs(o),v=Math.abs(m);null===f.current&&(f.current=a&&g>v?"x":"y"),"y"===f.current?function(e,t){if(Zo.cancel(c.current),!h(!1,t)){var n=e;n._virtualHandled||(n._virtualHandled=!0,l.current+=t,u.current=t,Zf||n.preventDefault(),c.current=Zo((function(){var e=d.current?10:1;s(l.current*e,!1),l.current=0})))}}(e,m):function(e,t){s(t,!0),Zf||e.preventDefault()}(e,o)}},function(e){t&&(d.current=e.detail===u.current)}]}const np=function(){function e(){st(this,e),fe(this,"maps",void 0),fe(this,"id",0),this.maps=Object.create(null)}return ct(e,[{key:"set",value:function(e,t){this.maps[e]=t,this.id+=1}},{key:"get",value:function(e){return this.maps[e]}}]),e}();function rp(e){var t=parseFloat(e);return isNaN(t)?0:t}var ip=14/15;function op(e,t){return("touches"in e?e.touches[0]:e)[t?"pageX":"pageY"]}const ap=e.forwardRef((function(t,n){var r=t.prefixCls,i=t.rtl,o=t.scrollOffset,a=t.scrollRange,s=t.onStartMove,l=t.onStopMove,c=t.onScroll,u=t.horizontal,d=t.spinSize,h=t.containerSize,f=t.style,p=t.thumbStyle,m=Be(e.useState(!1),2),g=m[0],v=m[1],b=Be(e.useState(null),2),y=b[0],_=b[1],S=Be(e.useState(null),2),w=S[0],C=S[1],x=!i,E=e.useRef(),k=e.useRef(),O=Be(e.useState(!1),2),$=O[0],R=O[1],I=e.useRef(),M=function(){clearTimeout(I.current),R(!0),I.current=setTimeout((function(){R(!1)}),3e3)},P=a-h||0,N=h-d||0,L=e.useMemo((function(){return 0===o||0===P?0:o/P*N}),[o,P,N]),T=e.useRef({top:L,dragging:g,pageY:y,startTop:w});T.current={top:L,dragging:g,pageY:y,startTop:w};var D=function(e){v(!0),_(op(e,u)),C(T.current.top),s(),e.stopPropagation(),e.preventDefault()};e.useEffect((function(){var e=function(e){e.preventDefault()},t=E.current,n=k.current;return t.addEventListener("touchstart",e,{passive:!1}),n.addEventListener("touchstart",D,{passive:!1}),function(){t.removeEventListener("touchstart",e),n.removeEventListener("touchstart",D)}}),[]);var A=e.useRef();A.current=P;var B=e.useRef();B.current=N,e.useEffect((function(){if(g){var e,t=function(t){var n=T.current,r=n.dragging,i=n.pageY,o=n.startTop;Zo.cancel(e);var a=E.current.getBoundingClientRect(),s=h/(u?a.width:a.height);if(r){var l=(op(t,u)-i)*s,d=o;!x&&u?d-=l:d+=l;var f=A.current,p=B.current,m=p?d/p:0,g=Math.ceil(m*f);g=Math.max(g,0),g=Math.min(g,f),e=Zo((function(){c(g,u)}))}},n=function(){v(!1),l()};return window.addEventListener("mousemove",t,{passive:!0}),window.addEventListener("touchmove",t,{passive:!0}),window.addEventListener("mouseup",n,{passive:!0}),window.addEventListener("touchend",n,{passive:!0}),function(){window.removeEventListener("mousemove",t),window.removeEventListener("touchmove",t),window.removeEventListener("mouseup",n),window.removeEventListener("touchend",n),Zo.cancel(e)}}}),[g]),e.useEffect((function(){return M(),function(){clearTimeout(I.current)}}),[o]),e.useImperativeHandle(n,(function(){return{delayHidden:M}}));var j="".concat(r,"-scrollbar"),z={position:"absolute",visibility:$?null:"hidden"},H={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return u?(z.height=8,z.left=0,z.right=0,z.bottom=0,H.height="100%",H.width=d,x?H.left=L:H.right=L):(z.width=8,z.top=0,z.bottom=0,x?z.right=0:z.left=0,H.width="100%",H.height=d,H.top=L),e.createElement("div",{ref:E,className:Ji()(j,fe(fe(fe({},"".concat(j,"-horizontal"),u),"".concat(j,"-vertical"),!u),"".concat(j,"-visible"),$)),style:me(me({},z),f),onMouseDown:function(e){e.stopPropagation(),e.preventDefault()},onMouseMove:M},e.createElement("div",{ref:k,className:Ji()("".concat(j,"-thumb"),fe({},"".concat(j,"-thumb-moving"),g)),style:me(me({},H),p),onMouseDown:D}))}));function sp(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=e/(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)*e;return isNaN(t)&&(t=0),t=Math.max(t,20),Math.floor(t)}var lp=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],cp=[],up={overflowY:"auto",overflowAnchor:"none"};function dp(t,n){var r=t.prefixCls,i=void 0===r?"rc-virtual-list":r,o=t.className,a=t.height,s=t.itemHeight,l=t.fullHeight,c=void 0===l||l,u=t.style,d=t.data,h=t.children,f=t.itemKey,p=t.virtual,m=t.direction,g=t.scrollWidth,v=t.component,b=void 0===v?"div":v,y=t.onScroll,_=t.onVirtualScroll,S=t.onVisibleChange,w=t.innerProps,C=t.extraRender,x=t.styles,E=lo(t,lp),k=e.useCallback((function(e){return"function"===typeof f?f(e):null===e||void 0===e?void 0:e[f]}),[f]),O=function(t,n,r){var i=Be(e.useState(0),2),o=i[0],a=i[1],s=(0,e.useRef)(new Map),l=(0,e.useRef)(new np),c=(0,e.useRef)();function u(){Zo.cancel(c.current)}function d(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];u();var t=function(){s.current.forEach((function(e,t){if(e&&e.offsetParent){var n=to(e),r=n.offsetHeight,i=getComputedStyle(n),o=i.marginTop,a=i.marginBottom,s=r+rp(o)+rp(a);l.current.get(t)!==s&&l.current.set(t,s)}})),a((function(e){return e+1}))};e?t():c.current=Zo(t)}return(0,e.useEffect)((function(){return u}),[]),[function(e,i){var o=t(e),a=s.current.get(o);i?(s.current.set(o,i),d()):s.current.delete(o),!a!==!i&&(i?null===n||void 0===n||n(e):null===r||void 0===r||r(e))},d,l.current,o]}(k,null,null),$=Be(O,4),R=$[0],I=$[1],M=$[2],P=$[3],N=!(!1===p||!a||!s),L=e.useMemo((function(){return Object.values(M.maps).reduce((function(e,t){return e+t}),0)}),[M.id,M.maps]),T=N&&d&&(Math.max(s*d.length,L)>a||!!g),D="rtl"===m,A=Ji()(i,fe({},"".concat(i,"-rtl"),D),o),B=d||cp,j=(0,e.useRef)(),z=(0,e.useRef)(),H=(0,e.useRef)(),F=Be((0,e.useState)(0),2),W=F[0],K=F[1],V=Be((0,e.useState)(0),2),U=V[0],q=V[1],X=Be((0,e.useState)(!1),2),G=X[0],Y=X[1],Q=function(){Y(!0)},J=function(){Y(!1)},Z={getKey:k};function ee(e){K((function(t){var n=function(e){var t=e;Number.isNaN(Se.current)||(t=Math.min(t,Se.current));return t=Math.max(t,0),t}("function"===typeof e?e(t):e);return j.current.scrollTop=n,n}))}var te=(0,e.useRef)({start:0,end:B.length}),ne=(0,e.useRef)(),re=Be(Jf(B,k),1)[0];ne.current=re;var ie=e.useMemo((function(){if(!N)return{scrollHeight:void 0,start:0,end:B.length-1,offset:void 0};var e;if(!T)return{scrollHeight:(null===(e=z.current)||void 0===e?void 0:e.offsetHeight)||0,start:0,end:B.length-1,offset:void 0};for(var t,n,r,i=0,o=B.length,l=0;l<o;l+=1){var c=B[l],u=k(c),d=M.get(u),h=i+(void 0===d?s:d);h>=W&&void 0===t&&(t=l,n=i),h>W+a&&void 0===r&&(r=l),i=h}return void 0===t&&(t=0,n=0,r=Math.ceil(a/s)),void 0===r&&(r=B.length-1),{scrollHeight:i,start:t,end:r=Math.min(r+1,B.length-1),offset:n}}),[T,N,W,B,P,a]),oe=ie.scrollHeight,ae=ie.start,se=ie.end,ce=ie.offset;te.current.start=ae,te.current.end=se;var ue=Be(e.useState({width:0,height:a}),2),de=ue[0],he=ue[1],pe=(0,e.useRef)(),ge=(0,e.useRef)(),be=e.useMemo((function(){return sp(de.width,g)}),[de.width,g]),ye=e.useMemo((function(){return sp(de.height,oe)}),[de.height,oe]),_e=oe-a,Se=(0,e.useRef)(_e);Se.current=_e;var we=W<=0,Ce=W>=_e,xe=U<=0,Ee=U>=g,ke=ep(we,Ce,xe,Ee),Oe=function(){return{x:D?-U:U,y:W}},$e=(0,e.useRef)(Oe()),Re=_o((function(e){if(_){var t=me(me({},Oe()),e);$e.current.x===t.x&&$e.current.y===t.y||(_(t),$e.current=t)}}));function Ie(e,t){var n=e;t?((0,ve.flushSync)((function(){q(n)})),Re()):ee(n)}var Me=function(e){var t=e,n=g?g-de.width:0;return t=Math.max(t,0),t=Math.min(t,n)},Pe=_o((function(e,t){t?((0,ve.flushSync)((function(){q((function(t){return Me(t+(D?-e:e))}))})),Re()):ee((function(t){return t+e}))})),Ne=Be(tp(N,we,Ce,xe,Ee,!!g,Pe),2),Le=Ne[0],Te=Ne[1];!function(t,n,r){var i,o=(0,e.useRef)(!1),a=(0,e.useRef)(0),s=(0,e.useRef)(0),l=(0,e.useRef)(null),c=(0,e.useRef)(null),u=function(e){if(o.current){var t=Math.ceil(e.touches[0].pageX),n=Math.ceil(e.touches[0].pageY),i=a.current-t,l=s.current-n,u=Math.abs(i)>Math.abs(l);u?a.current=t:s.current=n;var d=r(u,u?i:l,!1,e);d&&e.preventDefault(),clearInterval(c.current),d&&(c.current=setInterval((function(){u?i*=ip:l*=ip;var e=Math.floor(u?i:l);(!r(u,e,!0)||Math.abs(e)<=.1)&&clearInterval(c.current)}),16))}},d=function(){o.current=!1,i()},h=function(e){i(),1!==e.touches.length||o.current||(o.current=!0,a.current=Math.ceil(e.touches[0].pageX),s.current=Math.ceil(e.touches[0].pageY),l.current=e.target,l.current.addEventListener("touchmove",u,{passive:!1}),l.current.addEventListener("touchend",d,{passive:!0}))};i=function(){l.current&&(l.current.removeEventListener("touchmove",u),l.current.removeEventListener("touchend",d))},Bt((function(){return t&&n.current.addEventListener("touchstart",h,{passive:!0}),function(){var e;null===(e=n.current)||void 0===e||e.removeEventListener("touchstart",h),i(),clearInterval(c.current)}}),[t])}(N,j,(function(e,t,n,r){var i=r;return!ke(e,t,n)&&((!i||!i._virtualHandled)&&(i&&(i._virtualHandled=!0),Le({preventDefault:function(){},deltaX:e?t:0,deltaY:e?0:t}),!0))})),Bt((function(){function e(e){var t=we&&e.detail<0,n=Ce&&e.detail>0;!N||t||n||e.preventDefault()}var t=j.current;return t.addEventListener("wheel",Le,{passive:!1}),t.addEventListener("DOMMouseScroll",Te,{passive:!0}),t.addEventListener("MozMousePixelScroll",e,{passive:!1}),function(){t.removeEventListener("wheel",Le),t.removeEventListener("DOMMouseScroll",Te),t.removeEventListener("MozMousePixelScroll",e)}}),[N,we,Ce]),Bt((function(){if(g){var e=Me(U);q(e),Re({x:e})}}),[de.width,g]);var De=function(){var e,t;null===(e=pe.current)||void 0===e||e.delayHidden(),null===(t=ge.current)||void 0===t||t.delayHidden()},Ae=function(t,n,r,i,o,a,s,l){var c=e.useRef(),u=Be(e.useState(null),2),d=u[0],h=u[1];return Bt((function(){if(d&&d.times<10){if(!t.current)return void h((function(e){return me({},e)}));a();var e=d.targetAlign,l=d.originAlign,c=d.index,u=d.offset,f=t.current.clientHeight,p=!1,m=e,g=null;if(f){for(var v=e||l,b=0,y=0,_=0,S=Math.min(n.length-1,c),w=0;w<=S;w+=1){var C=o(n[w]);y=b;var x=r.get(C);b=_=y+(void 0===x?i:x)}for(var E="top"===v?u:f-u,k=S;k>=0;k-=1){var O=o(n[k]),$=r.get(O);if(void 0===$){p=!0;break}if((E-=$)<=0)break}switch(v){case"top":g=y-u;break;case"bottom":g=_-f+u;break;default:var R=t.current.scrollTop;y<R?m="top":_>R+f&&(m="bottom")}null!==g&&s(g),g!==d.lastTop&&(p=!0)}p&&h(me(me({},d),{},{times:d.times+1,targetAlign:m,lastTop:g}))}}),[d,t.current]),function(e){if(null!==e&&void 0!==e){if(Zo.cancel(c.current),"number"===typeof e)s(e);else if(e&&"object"===le(e)){var t,r=e.align;t="index"in e?e.index:n.findIndex((function(t){return o(t)===e.key}));var i=e.offset;h({times:0,index:t,offset:void 0===i?0:i,originAlign:r})}}else l()}}(j,B,M,s,k,(function(){return I(!0)}),ee,De);e.useImperativeHandle(n,(function(){return{nativeElement:H.current,getScrollInfo:Oe,scrollTo:function(e){var t;(t=e)&&"object"===le(t)&&("left"in t||"top"in t)?(void 0!==e.left&&q(Me(e.left)),Ae(e.top)):Ae(e)}}})),Bt((function(){if(S){var e=B.slice(ae,se+1);S(e,B)}}),[ae,se,B]);var je=function(t,n,r,i){var o=Be(e.useMemo((function(){return[new Map,[]]}),[t,r.id,i]),2),a=o[0],s=o[1];return function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,l=a.get(e),c=a.get(o);if(void 0===l||void 0===c)for(var u=t.length,d=s.length;d<u;d+=1){var h,f=t[d],p=n(f);a.set(p,d);var m=null!==(h=r.get(p))&&void 0!==h?h:i;if(s[d]=(s[d-1]||0)+m,p===e&&(l=d),p===o&&(c=d),void 0!==l&&void 0!==c)break}return{top:s[l-1]||0,bottom:s[c]}}}(B,k,M,s),ze=null===C||void 0===C?void 0:C({start:ae,end:se,virtual:T,offsetX:U,offsetY:ce,rtl:D,getSize:je}),He=function(t,n,r,i,o,a,s,l){var c=l.getKey;return t.slice(n,r+1).map((function(t,r){var l=s(t,n+r,{style:{width:i},offsetX:o}),u=c(t);return e.createElement(Qf,{key:u,setRef:function(e){return a(t,e)}},l)}))}(B,ae,se,g,U,R,h,Z),Fe=null;a&&(Fe=me(fe({},c?"height":"maxHeight",a),up),N&&(Fe.overflowY="hidden",g&&(Fe.overflowX="hidden"),G&&(Fe.pointerEvents="none")));var We={};return D&&(We.dir="rtl"),e.createElement("div",Gt({ref:H,style:me(me({},u),{},{position:"relative"}),className:A},We,E),e.createElement(au,{onResize:function(e){he({width:e.offsetWidth,height:e.offsetHeight})}},e.createElement(b,{className:"".concat(i,"-holder"),style:Fe,ref:j,onScroll:function(e){var t=e.currentTarget.scrollTop;t!==W&&ee(t),null===y||void 0===y||y(e),Re()},onMouseEnter:De},e.createElement(Yf,{prefixCls:i,height:oe,offsetX:U,offsetY:ce,scrollWidth:g,onInnerResize:I,ref:z,innerProps:w,rtl:D,extra:ze},He))),T&&oe>a&&e.createElement(ap,{ref:pe,prefixCls:i,scrollOffset:W,scrollRange:oe,rtl:D,onScroll:Ie,onStartMove:Q,onStopMove:J,spinSize:ye,containerSize:de.height,style:null===x||void 0===x?void 0:x.verticalScrollBar,thumbStyle:null===x||void 0===x?void 0:x.verticalScrollBarThumb}),T&&g>de.width&&e.createElement(ap,{ref:ge,prefixCls:i,scrollOffset:U,scrollRange:g,rtl:D,onScroll:Ie,onStartMove:Q,onStopMove:J,spinSize:be,containerSize:de.width,horizontal:!0,style:null===x||void 0===x?void 0:x.horizontalScrollBar,thumbStyle:null===x||void 0===x?void 0:x.horizontalScrollBarThumb}))}var hp=e.forwardRef(dp);hp.displayName="List";const fp=hp;var pp=["disabled","title","children","style","className"];function mp(e){return"string"===typeof e||"number"===typeof e}var gp=function(t,n){var r=e.useContext(Xh),i=r.prefixCls,o=r.id,a=r.open,s=r.multiple,l=r.mode,c=r.searchValue,u=r.toggleOpen,d=r.notFoundContent,h=r.onPopupScroll,f=e.useContext(Af),p=f.maxCount,m=f.flattenOptions,g=f.onActiveValue,v=f.defaultActiveFirstOption,b=f.onSelect,y=f.menuItemSelectedIcon,_=f.rawValues,S=f.fieldNames,w=f.virtual,C=f.direction,x=f.listHeight,E=f.listItemHeight,k=f.optionRender,O="".concat(i,"-item"),$=Je((function(){return m}),[a,m],(function(e,t){return t[0]&&e[1]!==t[1]})),R=e.useRef(null),I=e.useMemo((function(){return s&&Lf(p)&&(null===_||void 0===_?void 0:_.size)>=p}),[s,p,null===_||void 0===_?void 0:_.size]),M=function(e){e.preventDefault()},P=function(e){var t;null===(t=R.current)||void 0===t||t.scrollTo("number"===typeof e?{index:e}:e)},N=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=$.length,r=0;r<n;r+=1){var i=(e+r*t+n)%n,o=$[i]||{},a=o.group,s=o.data;if(!a&&(null===s||void 0===s||!s.disabled)&&!I)return i}return-1},L=Be(e.useState((function(){return N(0)})),2),T=L[0],D=L[1],A=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];D(e);var n={source:t?"keyboard":"mouse"},r=$[e];r?g(r.value,e,n):g(null,-1,n)};(0,e.useEffect)((function(){A(!1!==v?N(0):-1)}),[$.length,c]);var B=e.useCallback((function(e){return"combobox"!==l&&_.has(e)}),[l,se(_).toString(),_.size]),j=e.useCallback((function(e){return"combobox"===l?String(e).toLowerCase()===c.toLowerCase():_.has(e)}),[l,c,se(_).toString(),_.size]);(0,e.useEffect)((function(){var e,t=setTimeout((function(){if(!s&&a&&1===_.size){var e=Array.from(_)[0],t=$.findIndex((function(t){return t.data.value===e}));-1!==t&&(A(t),P(t))}}));a&&(null===(e=R.current)||void 0===e||e.scrollTo(void 0));return function(){return clearTimeout(t)}}),[a,c]);var z=function(e){void 0!==e&&b(e,{selected:!_.has(e)}),s||u(!1)};if(e.useImperativeHandle(n,(function(){return{onKeyDown:function(e){var t=e.which,n=e.ctrlKey;switch(t){case ks.N:case ks.P:case ks.UP:case ks.DOWN:var r=0;if(t===ks.UP?r=-1:t===ks.DOWN?r=1:/(mac\sos|macintosh)/i.test(navigator.appVersion)&&n&&(t===ks.N?r=1:t===ks.P&&(r=-1)),0!==r){var i=N(T+r,r);P(i),A(i,!0)}break;case ks.TAB:case ks.ENTER:var o,s=$[T];!s||null!==s&&void 0!==s&&null!==(o=s.data)&&void 0!==o&&o.disabled||I?z(void 0):z(s.value),a&&e.preventDefault();break;case ks.ESC:u(!1),a&&e.stopPropagation()}},onKeyUp:function(){},scrollTo:function(e){P(e)}}})),0===$.length)return e.createElement("div",{role:"listbox",id:"".concat(o,"_list"),className:"".concat(O,"-empty"),onMouseDown:M},d);var H=Object.keys(S).map((function(e){return S[e]})),F=function(e){return e.label};function W(e,t){return{role:e.group?"presentation":"option",id:"".concat(o,"_list_").concat(t)}}var K=function(t){var n=$[t];if(!n)return null;var r=n.data||{},i=r.value,o=n.group,a=Rs(r,!0),s=F(n);return n?e.createElement("div",Gt({"aria-label":"string"!==typeof s||o?null:s},a,{key:t},W(n,t),{"aria-selected":j(i)}),i):null},V={role:"listbox",id:"".concat(o,"_list")};return e.createElement(e.Fragment,null,w&&e.createElement("div",Gt({},V,{style:{height:0,width:0,overflow:"hidden"}}),K(T-1),K(T),K(T+1)),e.createElement(fp,{itemKey:"key",ref:R,data:$,height:x,itemHeight:E,fullHeight:!1,onMouseDown:M,onScroll:h,virtual:w,direction:C,innerProps:w?null:V},(function(t,n){var r=t.group,i=t.groupOption,o=t.data,a=t.label,s=t.value,l=o.key;if(r){var c,u=null!==(c=o.title)&&void 0!==c?c:mp(a)?a.toString():void 0;return e.createElement("div",{className:Ji()(O,"".concat(O,"-group"),o.className),title:u},void 0!==a?a:l)}var d=o.disabled,h=o.title,f=(o.children,o.style),p=o.className,m=Xf(lo(o,pp),H),g=B(s),v=d||!g&&I,b="".concat(O,"-option"),_=Ji()(O,b,p,fe(fe(fe(fe({},"".concat(b,"-grouped"),i),"".concat(b,"-active"),T===n&&!v),"".concat(b,"-disabled"),v),"".concat(b,"-selected"),g)),S=F(t),C=!y||"function"===typeof y||g,x="number"===typeof S?S:S||s,E=mp(x)?x.toString():void 0;return void 0!==h&&(E=h),e.createElement("div",Gt({},Rs(m),w?{}:W(t,n),{"aria-selected":j(s),className:_,title:E,onMouseMove:function(){T===n||v||A(n)},onClick:function(){v||z(s)},style:f}),e.createElement("div",{className:"".concat(b,"-content")},"function"===typeof k?k(t,{index:n}):x),e.isValidElement(y)||g,C&&e.createElement(qh,{className:"".concat(O,"-option-state"),customizeIcon:y,customizeIconProps:{value:s,disabled:v,isSelected:g}},g?"\u2713":null))})))};const vp=e.forwardRef(gp);function bp(e,t){return _f(e).join("").toUpperCase().includes(t)}var yp=0,_p=ze();function Sp(t){var n=Be(e.useState(),2),r=n[0],i=n[1];return e.useEffect((function(){i("rc_select_".concat(function(){var e;return _p?(e=yp,yp+=1):e="TEST_OR_SSR",e}()))}),[]),t||r}var wp=["children","value"],Cp=["children"];function xp(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Rc(t).map((function(t,r){if(!e.isValidElement(t)||!t.type)return null;var i=t,o=i.type.isSelectOptGroup,a=i.key,s=i.props,l=s.children,c=lo(s,Cp);return n||!o?function(e){var t=e,n=t.key,r=t.props,i=r.children,o=r.value;return me({key:n,value:void 0!==o?o:n,children:i},lo(r,wp))}(t):me(me({key:"__RC_SELECT_GRP__".concat(null===a?r:a,"__"),label:a},c),{},{options:xp(l)})})).filter((function(e){return e}))}const Ep=function(t,n,r,i,o){return e.useMemo((function(){var e=t;!t&&(e=xp(n));var a=new Map,s=new Map,l=function(e,t,n){n&&"string"===typeof n&&e.set(t[n],t)};return function e(t){for(var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],c=0;c<t.length;c+=1){var u=t[c];!u[r.options]||n?(a.set(u[r.value],u),l(s,u,r.label),l(s,u,i),l(s,u,o)):e(u[r.options],!0)}}(e),{options:e,valueOptions:a,labelOptions:s}}),[t,n,r,i,o])};function kp(t){var n=e.useRef();n.current=t;var r=e.useCallback((function(){return n.current.apply(n,arguments)}),[]);return r}var Op=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],$p=["inputValue"];var Rp=e.forwardRef((function(t,n){var r=t.id,i=t.mode,o=t.prefixCls,a=void 0===o?"rc-select":o,s=t.backfill,l=t.fieldNames,c=t.inputValue,u=t.searchValue,d=t.onSearch,h=t.autoClearSearchValue,f=void 0===h||h,p=t.onSelect,m=t.onDeselect,g=t.dropdownMatchSelectWidth,v=void 0===g||g,b=t.filterOption,y=t.filterSort,_=t.optionFilterProp,S=t.optionLabelProp,w=t.options,C=t.optionRender,x=t.children,E=t.defaultActiveFirstOption,k=t.menuItemSelectedIcon,O=t.virtual,$=t.direction,R=t.listHeight,I=void 0===R?200:R,M=t.listItemHeight,P=void 0===M?20:M,N=t.labelRender,L=t.value,T=t.defaultValue,D=t.labelInValue,A=t.onChange,B=t.maxCount,j=lo(t,Op),z=Sp(r),H=Hf(i),F=!(w||!x),W=e.useMemo((function(){return(void 0!==b||"combobox"!==i)&&b}),[b,i]),K=e.useMemo((function(){return Tf(l,F)}),[JSON.stringify(l),F]),V=Be(Co("",{value:void 0!==u?u:c,postState:function(e){return e||""}}),2),U=V[0],q=V[1],X=Ep(w,x,K,_,S),G=X.valueOptions,Y=X.labelOptions,Q=X.options,J=e.useCallback((function(e){return _f(e).map((function(e){var t,n,r,i,o,a;(function(e){return!e||"object"!==le(e)})(e)?t=e:(r=e.key,n=e.label,t=null!==(a=e.value)&&void 0!==a?a:r);var s,l=G.get(t);l&&(void 0===n&&(n=null===l||void 0===l?void 0:l[S||K.label]),void 0===r&&(r=null!==(s=null===l||void 0===l?void 0:l.key)&&void 0!==s?s:t),i=null===l||void 0===l?void 0:l.disabled,o=null===l||void 0===l?void 0:l.title);return{label:n,value:t,key:r,disabled:i,title:o}}))}),[K,S,G]),Z=Be(Co(T,{value:L}),2),ee=Z[0],te=Z[1],ne=e.useMemo((function(){var e,t=J(H&&null===ee?[]:ee);return"combobox"===i&&function(e){return!e&&0!==e}(null===(e=t[0])||void 0===e?void 0:e.value)?[]:t}),[ee,J,i,H]),re=function(t,n){var r=e.useRef({values:new Map,options:new Map});return[e.useMemo((function(){var e=r.current,i=e.values,o=e.options,a=t.map((function(e){var t;return void 0===e.label?me(me({},e),{},{label:null===(t=i.get(e.value))||void 0===t?void 0:t.label}):e})),s=new Map,l=new Map;return a.forEach((function(e){s.set(e.value,e),l.set(e.value,n.get(e.value)||o.get(e.value))})),r.current.values=s,r.current.options=l,a}),[t,n]),e.useCallback((function(e){return n.get(e)||r.current.options.get(e)}),[n])]}(ne,G),ie=Be(re,2),oe=ie[0],ae=ie[1],ce=e.useMemo((function(){if(!i&&1===oe.length){var e=oe[0];if(null===e.value&&(null===e.label||void 0===e.label))return[]}return oe.map((function(e){var t;return me(me({},e),{},{label:null!==(t="function"===typeof N?N(e):e.label)&&void 0!==t?t:e.value})}))}),[i,oe,N]),ue=e.useMemo((function(){return new Set(oe.map((function(e){return e.value})))}),[oe]);e.useEffect((function(){if("combobox"===i){var e,t=null===(e=oe[0])||void 0===e?void 0:e.value;q(function(e){return void 0!==e&&null!==e}(t)?String(t):"")}}),[oe]);var de=kp((function(e,t){var n=null!==t&&void 0!==t?t:e;return fe(fe({},K.value,e),K.label,n)})),he=function(t,n,r,i,o){return e.useMemo((function(){if(!r||!1===i)return t;var e=n.options,a=n.label,s=n.value,l=[],c="function"===typeof i,u=r.toUpperCase(),d=c?i:function(t,n){return o?bp(n[o],u):n[e]?bp(n["children"!==a?a:"label"],u):bp(n[s],u)},h=c?function(e){return Df(e)}:function(e){return e};return t.forEach((function(t){if(t[e])if(d(r,h(t)))l.push(t);else{var n=t[e].filter((function(e){return d(r,h(e))}));n.length&&l.push(me(me({},t),{},fe({},e,n)))}else d(r,h(t))&&l.push(t)})),l}),[t,i,o,r,n])}(e.useMemo((function(){if("tags"!==i)return Q;var e=se(Q);return se(oe).sort((function(e,t){return e.value<t.value?-1:1})).forEach((function(t){var n=t.value;(function(e){return G.has(e)})(n)||e.push(de(n,t.label))})),e}),[de,Q,G,oe,i]),K,U,W,_),pe=e.useMemo((function(){return"tags"!==i||!U||he.some((function(e){return e[_||"value"]===U}))||he.some((function(e){return e[K.value]===U}))?he:[de(U)].concat(se(he))}),[de,_,i,he,U,K]),ge=function e(t){return se(t).sort((function(e,t){return y(e,t,{searchValue:U})})).map((function(t){return Array.isArray(t.options)?me(me({},t),{},{options:t.options.length>0?e(t.options):t.options}):t}))},ve=e.useMemo((function(){return y?ge(pe):pe}),[pe,y,U]),be=e.useMemo((function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.fieldNames,r=t.childrenAsData,i=[],o=Tf(n,!1),a=o.label,s=o.value,l=o.options,c=o.groupLabel;return function e(t,n){Array.isArray(t)&&t.forEach((function(t){if(n||!(l in t)){var o=t[s];i.push({key:Nf(t,i.length),groupOption:n,data:t,label:t[a],value:o})}else{var u=t[c];void 0===u&&r&&(u=t.label),i.push({key:Nf(t,i.length),group:!0,data:t,label:u}),e(t[l],!0)}}))}(e,!1),i}(ve,{fieldNames:K,childrenAsData:F})}),[ve,K,F]),ye=function(e){var t=J(e);if(te(t),A&&(t.length!==oe.length||t.some((function(e,t){var n;return(null===(n=oe[t])||void 0===n?void 0:n.value)!==(null===e||void 0===e?void 0:e.value)})))){var n=D?t:t.map((function(e){return e.value})),r=t.map((function(e){return Df(ae(e.value))}));A(H?n:n[0],H?r:r[0])}},_e=Be(e.useState(null),2),Se=_e[0],we=_e[1],Ce=Be(e.useState(0),2),xe=Ce[0],Ee=Ce[1],ke=void 0!==E?E:"combobox"!==i,Oe=e.useCallback((function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).source,r=void 0===n?"keyboard":n;Ee(t),s&&"combobox"===i&&null!==e&&"keyboard"===r&&we(String(e))}),[s,i]),$e=function(e,t,n){var r=function(){var t,n=ae(e);return[D?{label:null===n||void 0===n?void 0:n[K.label],value:e,key:null!==(t=null===n||void 0===n?void 0:n.key)&&void 0!==t?t:e}:e,Df(n)]};if(t&&p){var i=Be(r(),2),o=i[0],a=i[1];p(o,a)}else if(!t&&m&&"clear"!==n){var s=Be(r(),2),l=s[0],c=s[1];m(l,c)}},Re=kp((function(e,t){var n,r=!H||t.selected;n=r?H?[].concat(se(oe),[e]):[e]:oe.filter((function(t){return t.value!==e})),ye(n),$e(e,r),"combobox"===i?we(""):Hf&&!f||(q(""),we(""))})),Ie=e.useMemo((function(){var e=!1!==O&&!1!==v;return me(me({},X),{},{flattenOptions:be,onActiveValue:Oe,defaultActiveFirstOption:ke,onSelect:Re,menuItemSelectedIcon:k,rawValues:ue,fieldNames:K,virtual:e,direction:$,listHeight:I,listItemHeight:P,childrenAsData:F,maxCount:B,optionRender:C})}),[B,X,be,Oe,ke,Re,k,ue,K,O,v,$,I,P,F,C]);return e.createElement(Af.Provider,{value:Ie},e.createElement(Wf,Gt({},j,{id:z,prefixCls:a,ref:n,omitDomProps:$p,mode:i,displayValues:ce,onDisplayValuesChange:function(e,t){ye(e);var n=t.type,r=t.values;"remove"!==n&&"clear"!==n||r.forEach((function(e){$e(e.value,!1,n)}))},direction:$,searchValue:U,onSearch:function(e,t){if(q(e),we(null),"submit"!==t.source)"blur"!==t.source&&("combobox"===i&&ye(e),null===d||void 0===d||d(e));else{var n=(e||"").trim();if(n){var r=Array.from(new Set([].concat(se(ue),[n])));ye(r),$e(n,!0),q("")}}},autoClearSearchValue:f,onSearchSplit:function(e){var t=e;"tags"!==i&&(t=e.map((function(e){var t=Y.get(e);return null===t||void 0===t?void 0:t.value})).filter((function(e){return void 0!==e})));var n=Array.from(new Set([].concat(se(ue),se(t))));ye(n),n.forEach((function(e){$e(e,!0)}))},dropdownMatchSelectWidth:v,OptionList:vp,emptyOptions:!be.length,activeValue:Se,activeDescendantId:"".concat(z,"_list_").concat(xe)})))}));Rp.Option=qf,Rp.OptGroup=Vf;const Ip=Rp;function Mp(t){return n=>e.createElement(Xa,{theme:{token:{motion:!1,zIndexPopupBase:0}}},e.createElement(t,Object.assign({},n)))}const Pp=(t,n,r,i)=>Mp((o=>{const{prefixCls:a,style:s}=o,l=e.useRef(null),[c,u]=e.useState(0),[d,h]=e.useState(0),[f,p]=Co(!1,{value:o.open}),{getPrefixCls:m}=e.useContext(Le),g=m(n||"select",a);e.useEffect((()=>{if(p(!0),"undefined"!==typeof ResizeObserver){const e=new ResizeObserver((e=>{const t=e[0].target;u(t.offsetHeight+8),h(t.offsetWidth)})),t=setInterval((()=>{var n;const i=r?`.${r(g)}`:`.${g}-dropdown`,o=null===(n=l.current)||void 0===n?void 0:n.querySelector(i);o&&(clearInterval(t),e.observe(o))}),10);return()=>{clearInterval(t),e.disconnect()}}}),[]);let v=Object.assign(Object.assign({},o),{style:Object.assign(Object.assign({},s),{margin:0}),open:f,visible:f,getPopupContainer:()=>l.current});i&&(v=i(v));const b={paddingBottom:c,position:"relative",minWidth:d};return e.createElement("div",{ref:l,style:b},e.createElement(t,Object.assign({},v)))}));function Np(e,t,n){return Ji()({[`${e}-status-success`]:"success"===t,[`${e}-status-warning`]:"warning"===t,[`${e}-status-error`]:"error"===t,[`${e}-status-validating`]:"validating"===t,[`${e}-has-feedback`]:n})}const Lp=(e,t)=>t||e,Tp=(t,n)=>{const r=e.useContext(Cr);return[e.useMemo((()=>{var e;const i=n||br[t],o=null!==(e=null===r||void 0===r?void 0:r[t])&&void 0!==e?e:{};return Object.assign(Object.assign({},"function"===typeof i?i():i),o||{})}),[t,n,r]),e.useMemo((()=>{const e=null===r||void 0===r?void 0:r.locale;return(null===r||void 0===r?void 0:r.exist)&&!e?br.locale:e}),[r])]};const Dp=()=>{const[,t]=Oa(),[n]=Tp("Empty"),r=new Oi(t.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return e.createElement("svg",{style:r,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},e.createElement("title",null,(null===n||void 0===n?void 0:n.description)||"Empty"),e.createElement("g",{fill:"none",fillRule:"evenodd"},e.createElement("g",{transform:"translate(24 31.67)"},e.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),e.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),e.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),e.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),e.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),e.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),e.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},e.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),e.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))};const Ap=()=>{const[,t]=Oa(),[n]=Tp("Empty"),{colorFill:r,colorFillTertiary:i,colorFillQuaternary:o,colorBgContainer:a}=t,{borderColor:s,shadowColor:l,contentColor:c}=(0,e.useMemo)((()=>({borderColor:new Oi(r).onBackground(a).toHexShortString(),shadowColor:new Oi(i).onBackground(a).toHexShortString(),contentColor:new Oi(o).onBackground(a).toHexShortString()})),[r,i,o,a]);return e.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},e.createElement("title",null,(null===n||void 0===n?void 0:n.description)||"Empty"),e.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},e.createElement("ellipse",{fill:l,cx:"32",cy:"33",rx:"32",ry:"7"}),e.createElement("g",{fillRule:"nonzero",stroke:s},e.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),e.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:c}))))},Bp=e=>{const{componentCls:t,margin:n,marginXS:r,marginXL:i,fontSize:o,lineHeight:a}=e;return{[t]:{marginInline:r,fontSize:o,lineHeight:a,textAlign:"center",[`${t}-image`]:{height:e.emptyImgHeight,marginBottom:r,opacity:e.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${t}-description`]:{color:e.colorTextDescription},[`${t}-footer`]:{marginTop:n},"&-normal":{marginBlock:i,color:e.colorTextDescription,[`${t}-description`]:{color:e.colorTextDescription},[`${t}-image`]:{height:e.emptyImgHeightMD}},"&-small":{marginBlock:r,color:e.colorTextDescription,[`${t}-image`]:{height:e.emptyImgHeightSM}}}}},jp=ml("Empty",(e=>{const{componentCls:t,controlHeightLG:n,calc:r}=e,i=ol(e,{emptyImgCls:`${t}-img`,emptyImgHeight:r(n).mul(2.5).equal(),emptyImgHeightMD:n,emptyImgHeightSM:r(n).mul(.875).equal()});return[Bp(i)]}));var zp=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const Hp=e.createElement(Dp,null),Fp=e.createElement(Ap,null),Wp=t=>{var{className:n,rootClassName:r,prefixCls:i,image:o=Hp,description:a,children:s,imageStyle:l,style:c}=t,u=zp(t,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:d,direction:h,empty:f}=e.useContext(Le),p=d("empty",i),[m,g,v]=jp(p),[b]=Tp("Empty"),y="undefined"!==typeof a?a:null===b||void 0===b?void 0:b.description,_="string"===typeof y?y:"empty";let S=null;return S="string"===typeof o?e.createElement("img",{alt:_,src:o}):o,m(e.createElement("div",Object.assign({className:Ji()(g,v,p,null===f||void 0===f?void 0:f.className,{[`${p}-normal`]:o===Fp,[`${p}-rtl`]:"rtl"===h},n,r),style:Object.assign(Object.assign({},null===f||void 0===f?void 0:f.style),c)},u),e.createElement("div",{className:`${p}-image`,style:l},S),y&&e.createElement("div",{className:`${p}-description`},y),s&&e.createElement("div",{className:`${p}-footer`},s)))};Wp.PRESENTED_IMAGE_DEFAULT=Hp,Wp.PRESENTED_IMAGE_SIMPLE=Fp;const Kp=Wp,Vp=t=>{const{componentName:n}=t,{getPrefixCls:r}=(0,e.useContext)(Le),i=r("empty");switch(n){case"Table":case"List":return e.createElement(Kp,{image:Kp.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return e.createElement(Kp,{image:Kp.PRESENTED_IMAGE_SIMPLE,className:`${i}-small`});case"Table.filter":return null;default:return e.createElement(Kp,null)}},Up=function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;var i,o;const{variant:a,[t]:s}=(0,e.useContext)(Le),l=(0,e.useContext)(Jd),c=null===s||void 0===s?void 0:s.variant;let u;u="undefined"!==typeof n?n:!1===r?"borderless":null!==(o=null!==(i=null!==l&&void 0!==l?l:c)&&void 0!==i?i:a)&&void 0!==o?o:"outlined";return[u,Ne.includes(u)]};const qp=function(e,t){return e||(e=>{const t={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:"scroll"===e?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},t),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},t),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},t),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},t),{points:["br","tr"],offset:[0,-4]})}})(t)};function Xp(e,t,n){const{focusElCls:r,focus:i,borderElCls:o}=n,a=o?"> *":"",s=["hover",i?"focus":null,"active"].filter(Boolean).map((e=>`&:${e} ${a}`)).join(",");return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},"&-item":Object.assign(Object.assign({[s]:{zIndex:2}},r?{[`&${r}`]:{zIndex:2}}:{}),{[`&[disabled] ${a}`]:{zIndex:0}})}}function Gp(e,t,n){const{borderElCls:r}=n,i=r?`> ${r}`:"";return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${i}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${i}, &${e}-sm ${i}, &${e}-lg ${i}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${i}, &${e}-sm ${i}, &${e}-lg ${i}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function Yp(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{focus:!0};const{componentCls:n}=e,r=`${n}-compact`;return{[r]:Object.assign(Object.assign({},Xp(e,r,t)),Gp(n,r,t))}}const Qp=new Zn("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),Jp=new Zn("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),Zp=new Zn("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),em=new Zn("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),tm=new Zn("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),nm=new Zn("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),rm=new Zn("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),im=new Zn("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),om={"slide-up":{inKeyframes:Qp,outKeyframes:Jp},"slide-down":{inKeyframes:Zp,outKeyframes:em},"slide-left":{inKeyframes:tm,outKeyframes:nm},"slide-right":{inKeyframes:rm,outKeyframes:im}},am=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:i,outKeyframes:o}=om[t];return[Oh(r,i,o,e.motionDurationMid),{[`\n ${r}-enter,\n ${r}-appear\n `]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:e.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInQuint}}]},sm=new Zn("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),lm=new Zn("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),cm=new Zn("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),um=new Zn("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),dm=new Zn("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),hm=new Zn("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),fm={"move-up":{inKeyframes:new Zn("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),outKeyframes:new Zn("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}})},"move-down":{inKeyframes:sm,outKeyframes:lm},"move-left":{inKeyframes:cm,outKeyframes:um},"move-right":{inKeyframes:dm,outKeyframes:hm}},pm=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:i,outKeyframes:o}=fm[t];return[Oh(r,i,o,e.motionDurationMid),{[`\n ${r}-enter,\n ${r}-appear\n `]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},mm=e=>{const{optionHeight:t,optionFontSize:n,optionLineHeight:r,optionPadding:i}=e;return{position:"relative",display:"block",minHeight:t,padding:i,color:e.colorText,fontWeight:"normal",fontSize:n,lineHeight:r,boxSizing:"border-box"}},gm=e=>{const{antCls:t,componentCls:n}=e,r=`${n}-item`,i=`&${t}-slide-up-enter${t}-slide-up-enter-active`,o=`&${t}-slide-up-appear${t}-slide-up-appear-active`,a=`&${t}-slide-up-leave${t}-slide-up-leave-active`,s=`${n}-dropdown-placement-`;return[{[`${n}-dropdown`]:Object.assign(Object.assign({},Ma(e)),{position:"absolute",top:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",padding:e.paddingXXS,overflow:"hidden",fontSize:e.fontSize,fontVariant:"initial",backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,[`\n ${i}${s}bottomLeft,\n ${o}${s}bottomLeft\n `]:{animationName:Qp},[`\n ${i}${s}topLeft,\n ${o}${s}topLeft,\n ${i}${s}topRight,\n ${o}${s}topRight\n `]:{animationName:Zp},[`${a}${s}bottomLeft`]:{animationName:Jp},[`\n ${a}${s}topLeft,\n ${a}${s}topRight\n `]:{animationName:em},"&-hidden":{display:"none"},[r]:Object.assign(Object.assign({},mm(e)),{cursor:"pointer",transition:`background ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},Ia),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${r}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected:not(${r}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${r}-option-state`]:{color:e.colorPrimary},[`&:has(+ ${r}-option-selected:not(${r}-option-disabled))`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${r}-option-selected:not(${r}-option-disabled)`]:{borderStartStartRadius:0,borderStartEndRadius:0}}},"&-disabled":{[`&${r}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Object.assign(Object.assign({},mm(e)),{color:e.colorTextDisabled})}),"&-rtl":{direction:"rtl"}})},am(e,"slide-up"),am(e,"slide-down"),pm(e,"move-up"),pm(e,"move-down")]},vm=e=>{const{componentCls:t,iconCls:n,borderRadiusSM:r,motionDurationSlow:i,paddingXS:o,multipleItemColorDisabled:a,multipleItemBorderColorDisabled:s,colorIcon:l,colorIconHover:c,INTERNAL_FIXED_ITEM_MARGIN:u}=e,d=`${t}-selection-overflow`;return{[d]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"},[`${t}-selection-item`]:{display:"flex",alignSelf:"center",flex:"none",boxSizing:"border-box",maxWidth:"100%",marginBlock:u,borderRadius:r,cursor:"default",transition:`font-size ${i}, line-height ${i}, height ${i}`,marginInlineEnd:e.calc(u).mul(2).equal(),paddingInlineStart:o,paddingInlineEnd:e.calc(o).div(2).equal(),[`${t}-disabled&`]:{color:a,borderColor:s,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:e.calc(o).div(2).equal(),overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},{display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),{display:"inline-flex",alignItems:"center",color:l,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${n}`]:{verticalAlign:"-0.2em"},"&:hover":{color:c}})}}}},bm=(e,t)=>{const{componentCls:n,INTERNAL_FIXED_ITEM_MARGIN:r}=e,i=`${n}-selection-overflow`,o=e.multipleSelectItemHeight,a=(e=>{const{multipleSelectItemHeight:t,selectHeight:n,lineWidth:r}=e;return e.calc(n).sub(t).div(2).sub(r).equal()})(e),s=t?`${n}-${t}`:"",l=(e=>{const{multipleSelectItemHeight:t,paddingXXS:n,lineWidth:r,INTERNAL_FIXED_ITEM_MARGIN:i}=e,o=e.max(e.calc(n).sub(r).equal(),0);return{basePadding:o,containerPadding:e.max(e.calc(o).sub(i).equal(),0),itemHeight:It(t),itemLineHeight:It(e.calc(t).sub(e.calc(e.lineWidth).mul(2)).equal())}})(e);return{[`${n}-multiple${s}`]:Object.assign(Object.assign({},vm(e)),{[`${n}-selector`]:{display:"flex",alignItems:"center",width:"100%",height:"100%",paddingInline:l.basePadding,paddingBlock:l.containerPadding,borderRadius:e.borderRadius,[`${n}-disabled&`]:{background:e.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${It(r)} 0`,lineHeight:It(o),visibility:"hidden",content:'"\\a0"'}},[`${n}-selection-wrap`]:{width:"100%",overflow:"hidden"},[`${n}-selection-item`]:{height:l.itemHeight,lineHeight:It(l.itemLineHeight)},[`${i}-item + ${i}-item`]:{[`${n}-selection-search`]:{marginInlineStart:0}},[`${i}-item-suffix`]:{height:"100%"},[`${n}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(a).equal(),"\n &-input,\n &-mirror\n ":{height:o,fontFamily:e.fontFamily,lineHeight:It(o),transition:`all ${e.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${n}-selection-placeholder`]:{position:"absolute",top:"50%",insetInlineStart:e.inputPaddingHorizontalBase,insetInlineEnd:e.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${e.motionDurationSlow}`},[`${n}-prefix`]:{height:l.itemHeight,lineHeight:It(l.itemLineHeight),marginInlineStart:`calc(${It(e.inputPaddingHorizontalBase)} - ${It(l.basePadding)})`,marginInlineEnd:e.selectAffixPadding}})}};function ym(e,t){const{componentCls:n}=e,r=t?`${n}-${t}`:"",i={[`${n}-multiple${r}`]:{fontSize:e.fontSize,[`${n}-selector`]:{[`${n}-show-search&`]:{cursor:"text"}},[`\n &${n}-show-arrow ${n}-selector,\n &${n}-allow-clear ${n}-selector\n `]:{paddingInlineEnd:e.calc(e.fontSizeIcon).add(e.controlPaddingHorizontal).equal()}}};return[bm(e,t),i]}const _m=e=>{const{componentCls:t}=e,n=ol(e,{selectHeight:e.controlHeightSM,multipleSelectItemHeight:e.multipleItemHeightSM,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS}),r=ol(e,{fontSize:e.fontSizeLG,selectHeight:e.controlHeightLG,multipleSelectItemHeight:e.multipleItemHeightLG,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius});return[ym(e),ym(n,"sm"),{[`${t}-multiple${t}-sm`]:{[`${t}-selection-placeholder`]:{insetInline:e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal()},[`${t}-selection-search`]:{marginInlineStart:2}}},ym(r,"lg")]};function Sm(e,t){const{componentCls:n,inputPaddingHorizontalBase:r,borderRadius:i,selectAffixPadding:o}=e,a=e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),s=t?`${n}-${t}`:"";return{[`${n}-single${s}`]:{fontSize:e.fontSize,height:e.controlHeight,[`${n}-selector`]:Object.assign(Object.assign({},Ma(e,!0)),{display:"flex",borderRadius:i,flex:"1 1 auto",[`${n}-selection-wrap`]:{display:"flex",width:"100%",position:"relative"},[`${n}-selection-search`]:{position:"absolute",inset:0,width:"100%","&-input":{width:"100%",WebkitAppearance:"textfield"}},[`\n ${n}-selection-item,\n ${n}-selection-placeholder,\n ${n}-prefix\n `]:{display:"block",padding:0,lineHeight:It(a),transition:`all ${e.motionDurationSlow}, visibility 0s`,alignSelf:"center"},[`${n}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[`${n}-prefix`]:{marginInlineEnd:o},[["&:after",`${n}-selection-item:empty:after`,`${n}-selection-placeholder:empty:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`\n &${n}-show-arrow ${n}-selection-item,\n &${n}-show-arrow ${n}-selection-search,\n &${n}-show-arrow ${n}-selection-placeholder\n `]:{paddingInlineEnd:e.showArrowPaddingInlineEnd},[`&${n}-open ${n}-selection-item`]:{color:e.colorTextPlaceholder},[`&:not(${n}-customize-input)`]:{[`${n}-selector`]:{width:"100%",height:"100%",padding:`0 ${It(r)}`,[`${n}-selection-search-input`]:{height:a},"&:after":{lineHeight:It(a)}}},[`&${n}-customize-input`]:{[`${n}-selector`]:{"&:after":{display:"none"},[`${n}-selection-search`]:{position:"static",width:"100%"},[`${n}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${It(r)}`,"&:after":{display:"none"}}}}}}}function wm(e){const{componentCls:t}=e,n=e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal();return[Sm(e),Sm(ol(e,{controlHeight:e.controlHeightSM,borderRadius:e.borderRadiusSM}),"sm"),{[`${t}-single${t}-sm`]:{[`&:not(${t}-customize-input)`]:{[`${t}-selector`]:{padding:`0 ${It(n)}`},[`&${t}-show-arrow ${t}-selection-search`]:{insetInlineEnd:e.calc(n).add(e.calc(e.fontSize).mul(1.5)).equal()},[`\n &${t}-show-arrow ${t}-selection-item,\n &${t}-show-arrow ${t}-selection-placeholder\n `]:{paddingInlineEnd:e.calc(e.fontSize).mul(1.5).equal()}}}},Sm(ol(e,{controlHeight:e.singleItemHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG}),"lg")]}const Cm=(e,t)=>{const{componentCls:n,antCls:r,controlOutlineWidth:i}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{border:`${It(e.lineWidth)} ${e.lineType} ${t.borderColor}`,background:e.selectorBg},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{borderColor:t.hoverBorderHover},[`${n}-focused& ${n}-selector`]:{borderColor:t.activeBorderColor,boxShadow:`0 0 0 ${It(i)} ${t.activeOutlineColor}`,outline:0}}}},xm=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},Cm(e,t))}),Em=e=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},Cm(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor})),xm(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline})),xm(e,{status:"warning",borderColor:e.colorWarning,hoverBorderHover:e.colorWarningHover,activeBorderColor:e.colorWarning,activeOutlineColor:e.colorWarningOutline})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${It(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}})}),km=(e,t)=>{const{componentCls:n,antCls:r}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{background:t.bg,border:`${It(e.lineWidth)} ${e.lineType} transparent`,color:t.color},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{background:t.hoverBg},[`${n}-focused& ${n}-selector`]:{background:e.selectorBg,borderColor:t.activeBorderColor,outline:0}}}},Om=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},km(e,t))}),$m=e=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},km(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,color:e.colorText})),Om(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,color:e.colorError})),Om(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{borderColor:e.colorBorder,background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.colorBgContainer,border:`${It(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}})}),Rm=e=>({"&-borderless":{[`${e.componentCls}-selector`]:{background:"transparent",borderColor:"transparent"},[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${It(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`},[`&${e.componentCls}-status-error`]:{[`${e.componentCls}-selection-item`]:{color:e.colorError}},[`&${e.componentCls}-status-warning`]:{[`${e.componentCls}-selection-item`]:{color:e.colorWarning}}}}),Im=e=>({[e.componentCls]:Object.assign(Object.assign(Object.assign({},Em(e)),$m(e)),Rm(e))}),Mm=e=>{const{componentCls:t}=e;return{position:"relative",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,input:{cursor:"pointer"},[`${t}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit",height:"100%"}},[`${t}-disabled&`]:{cursor:"not-allowed",input:{cursor:"not-allowed"}}}},Pm=e=>{const{componentCls:t}=e;return{[`${t}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none",fontFamily:"inherit","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},Nm=e=>{const{antCls:t,componentCls:n,inputPaddingHorizontalBase:r,iconCls:i}=e;return{[n]:Object.assign(Object.assign({},Ma(e)),{position:"relative",display:"inline-flex",cursor:"pointer",[`&:not(${n}-customize-input) ${n}-selector`]:Object.assign(Object.assign({},Mm(e)),Pm(e)),[`${n}-selection-item`]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},Ia),{[`> ${t}-typography`]:{display:"inline"}}),[`${n}-selection-placeholder`]:Object.assign(Object.assign({},Ia),{flex:1,color:e.colorTextPlaceholder,pointerEvents:"none"}),[`${n}-arrow`]:Object.assign(Object.assign({},{display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",transition:`opacity ${e.motionDurationSlow} ease`,[i]:{verticalAlign:"top",transition:`transform ${e.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${n}-suffix)`]:{pointerEvents:"auto"}},[`${n}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${n}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,zIndex:1,display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:`color ${e.motionDurationMid} ease, opacity ${e.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:e.colorTextTertiary}},[`&:hover ${n}-clear`]:{opacity:1,background:e.colorBgBase,borderRadius:"50%"}}),[`${n}-has-feedback`]:{[`${n}-clear`]:{insetInlineEnd:e.calc(r).add(e.fontSize).add(e.paddingXS).equal()}}}},Lm=e=>{const{componentCls:t}=e;return[{[t]:{[`&${t}-in-form-item`]:{width:"100%"}}},Nm(e),wm(e),_m(e),gm(e),{[`${t}-rtl`]:{direction:"rtl"}},Yp(e,{borderElCls:`${t}-selector`,focusElCls:`${t}-focused`})]},Tm=ml("Select",((e,t)=>{let{rootPrefixCls:n}=t;const r=ol(e,{rootPrefixCls:n,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(1).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[Lm(r),Im(r)]}),(e=>{const{fontSize:t,lineHeight:n,lineWidth:r,controlHeight:i,controlHeightSM:o,controlHeightLG:a,paddingXXS:s,controlPaddingHorizontal:l,zIndexPopupBase:c,colorText:u,fontWeightStrong:d,controlItemBgActive:h,controlItemBgHover:f,colorBgContainer:p,colorFillSecondary:m,colorBgContainerDisabled:g,colorTextDisabled:v,colorPrimaryHover:b,colorPrimary:y,controlOutline:_}=e,S=2*s,w=2*r,C=Math.min(i-S,i-w),x=Math.min(o-S,o-w),E=Math.min(a-S,a-w);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(s/2),zIndexPopup:c+50,optionSelectedColor:u,optionSelectedFontWeight:d,optionSelectedBg:h,optionActiveBg:f,optionPadding:`${(i-t*n)/2}px ${l}px`,optionFontSize:t,optionLineHeight:n,optionHeight:i,selectorBg:p,clearBg:p,singleItemHeightLG:a,multipleItemBg:m,multipleItemBorderColor:"transparent",multipleItemHeight:C,multipleItemHeightSM:x,multipleItemHeightLG:E,multipleSelectorBgDisabled:g,multipleItemColorDisabled:v,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(1.25*e.fontSize),hoverBorderColor:b,activeBorderColor:y,activeOutlineColor:_,selectAffixPadding:s}}),{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});const Dm={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"};var Am=function(t,n){return e.createElement(us,Gt({},t,{ref:n,icon:Dm}))};const Bm=e.forwardRef(Am);const jm={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"};var zm=function(t,n){return e.createElement(us,Gt({},t,{ref:n,icon:jm}))};const Hm=e.forwardRef(zm);const Fm={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"};var Wm=function(t,n){return e.createElement(us,Gt({},t,{ref:n,icon:Fm}))};const Km=e.forwardRef(Wm);var Vm=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const Um="SECRET_COMBOBOX_MODE_DO_NOT_USE",qm=(t,n)=>{var r;const{prefixCls:i,bordered:o,className:a,rootClassName:s,getPopupContainer:l,popupClassName:c,dropdownClassName:u,listHeight:d=256,placement:h,listItemHeight:f,size:p,disabled:m,notFoundContent:g,status:v,builtinPlacements:b,dropdownMatchSelectWidth:y,popupMatchSelectWidth:_,direction:S,style:w,allowClear:C,variant:x,dropdownStyle:E,transitionName:k,tagRender:O,maxCount:$,prefix:R}=t,I=Vm(t,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount","prefix"]),{getPopupContainer:M,getPrefixCls:P,renderEmpty:N,direction:L,virtual:T,popupMatchSelectWidth:D,popupOverflow:A,select:B}=e.useContext(Le),[,j]=Oa(),z=null!==f&&void 0!==f?f:null===j||void 0===j?void 0:j.controlHeight,H=P("select",i),F=P(),W=null!==S&&void 0!==S?S:L,{compactSize:K,compactItemClassnames:V}=oh(H,W),[U,q]=Up("select",x,o),X=Hs(H),[G,Y,Q]=Tm(H,X),J=e.useMemo((()=>{const{mode:e}=t;if("combobox"!==e)return e===Um?"combobox":e}),[t.mode]),Z="multiple"===J||"tags"===J,ee=function(e,t){return void 0!==t?t:null!==e}(t.suffixIcon,t.showArrow),te=null!==(r=null!==_&&void 0!==_?_:y)&&void 0!==r?r:D,{status:ne,hasFeedback:re,isFormItemInput:ie,feedbackIcon:oe}=e.useContext(Yd),ae=Lp(ne,v);let se;se=void 0!==g?g:"combobox"===J?null:(null===N||void 0===N?void 0:N("Select"))||e.createElement(Vp,{componentName:"Select"});const{suffixIcon:le,itemIcon:ce,removeIcon:ue,clearIcon:de}=function(t){let{suffixIcon:n,clearIcon:r,menuItemSelectedIcon:i,removeIcon:o,loading:a,multiple:s,hasFeedback:l,prefixCls:c,showSuffixIcon:u,feedbackIcon:d,showArrow:h,componentName:f}=t;const p=null!==r&&void 0!==r?r:e.createElement(ms,null),m=t=>null!==n||l||h?e.createElement(e.Fragment,null,!1!==u&&t,l&&d):null;let g=null;if(void 0!==n)g=m(n);else if(a)g=m(e.createElement(xs,{spin:!0}));else{const t=`${c}-suffix`;g=n=>{let{open:r,showSearch:i}=n;return m(r&&i?e.createElement(Km,{className:t}):e.createElement(Hm,{className:t}))}}let v=null;v=void 0!==i?i:s?e.createElement(Bm,null):null;let b=null;return b=void 0!==o?o:e.createElement(kl,null),{clearIcon:p,suffixIcon:g,itemIcon:v,removeIcon:b}}(Object.assign(Object.assign({},I),{multiple:Z,hasFeedback:re,feedbackIcon:oe,showSuffixIcon:ee,prefixCls:H,componentName:"Select"})),he=!0===C?{clearIcon:de}:C,fe=Xf(I,["suffixIcon","itemIcon"]),pe=Ji()(c||u,{[`${H}-dropdown-${W}`]:"rtl"===W},s,Q,X,Y),me=ac((e=>{var t;return null!==(t=null!==p&&void 0!==p?p:K)&&void 0!==t?t:e})),ge=e.useContext(Wi),ve=null!==m&&void 0!==m?m:ge,be=Ji()({[`${H}-lg`]:"large"===me,[`${H}-sm`]:"small"===me,[`${H}-rtl`]:"rtl"===W,[`${H}-${U}`]:q,[`${H}-in-form-item`]:ie},Np(H,ae,re),V,null===B||void 0===B?void 0:B.className,a,s,Q,X,Y),ye=e.useMemo((()=>void 0!==h?h:"rtl"===W?"bottomRight":"bottomLeft"),[h,W]);const[_e]=qs("SelectLike",null===E||void 0===E?void 0:E.zIndex);return G(e.createElement(Ip,Object.assign({ref:n,virtual:T,showSearch:null===B||void 0===B?void 0:B.showSearch},fe,{style:Object.assign(Object.assign({},null===B||void 0===B?void 0:B.style),w),dropdownMatchSelectWidth:te,transitionName:ph(F,"slide-up",k),builtinPlacements:qp(b,A),listHeight:d,listItemHeight:z,mode:J,prefixCls:H,placement:ye,direction:W,prefix:R,suffixIcon:le,menuItemSelectedIcon:ce,removeIcon:ue,allowClear:he,notFoundContent:se,className:be,getPopupContainer:l||M,dropdownClassName:pe,disabled:ve,dropdownStyle:Object.assign(Object.assign({},E),{zIndex:_e}),maxCount:Z?$:void 0,tagRender:Z?O:void 0})))};const Xm=e.forwardRef(qm),Gm=Pp(Xm);Xm.SECRET_COMBOBOX_MODE_DO_NOT_USE=Um,Xm.Option=qf,Xm.OptGroup=Vf,Xm._InternalPanelDoNotUseOrYouWillBeFired=Gm;const Ym=Xm;const Qm={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M511.4 124C290.5 124.3 112 303 112 523.9c0 128 60.2 242 153.8 315.2l-37.5 48c-4.1 5.3-.3 13 6.3 12.9l167-.8c5.2 0 9-4.9 7.7-9.9L369.8 727a8 8 0 00-14.1-3L315 776.1c-10.2-8-20-16.7-29.3-26a318.64 318.64 0 01-68.6-101.7C200.4 609 192 567.1 192 523.9s8.4-85.1 25.1-124.5c16.1-38.1 39.2-72.3 68.6-101.7 29.4-29.4 63.6-52.5 101.7-68.6C426.9 212.4 468.8 204 512 204s85.1 8.4 124.5 25.1c38.1 16.1 72.3 39.2 101.7 68.6 29.4 29.4 52.5 63.6 68.6 101.7 16.7 39.4 25.1 81.3 25.1 124.5s-8.4 85.1-25.1 124.5a318.64 318.64 0 01-68.6 101.7c-7.5 7.5-15.3 14.5-23.4 21.2a7.93 7.93 0 00-1.2 11.1l39.4 50.5c2.8 3.5 7.9 4.1 11.4 1.3C854.5 760.8 912 649.1 912 523.9c0-221.1-179.4-400.2-400.6-399.9z"}}]},name:"undo",theme:"outlined"};var Jm=function(t,n){return e.createElement(us,Gt({},t,{ref:n,icon:Qm}))};const Zm=e.forwardRef(Jm);var eg=n(579);const tg=t=>{let{setPreviewFiles:n,setRequestId:r,setActivePanel:i,setClipboardContent:o,clipboardContent:a}=t;const[s,l]=(0,e.useState)([]),[c,u]=(0,e.useState)([]),[d,h]=(0,e.useState)(!1),[f,p]=(0,e.useState)([]),[m,g]=(0,e.useState)({human_as_model:!1,skip_build_index:!0,project_type:"py",extra_conf:{},available_keys:[]}),[v,b]=(0,e.useState)(!1),y=(0,e.useRef)(null),_=(0,e.useRef)(null),[S,w]=(0,e.useState)(!0),[C,x]=(0,e.useState)(!1),[E,k]=(0,e.useState)(!1);(0,e.useEffect)((()=>{E&&(P(),k(!1))}),[E]),(0,e.useEffect)((()=>{fetch("/api/conf").then((e=>e.json())).then((e=>{const{human_as_model:t,skip_build_index:n,project_type:r,...i}=e.conf;g({human_as_model:"true"===t,skip_build_index:"true"===n,project_type:r,extra_conf:i,available_keys:[]})})).catch((e=>{console.error("Error fetching config:",e),Kl.error("Failed to fetch configuration")}))}),[]),(0,e.useEffect)((()=>{fetch("/api/conf/keys").then((e=>e.json())).then((e=>{g((t=>({...t,available_keys:e.keys})))})).catch((e=>{console.error("Error fetching configuration keys:",e),Kl.error("Failed to fetch configuration keys")}))}),[]);const O=async(e,t)=>{try{if(!(await fetch("/api/conf",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({[e]:String(t)})})).ok)throw new Error("Failed to update configuration");g((n=>({...n,[e]:t}))),Kl.success("Configuration updated successfully")}catch(n){console.error("Error updating config:",n),Kl.error("Failed to update configuration")}},[$,R]=(0,e.useState)(null);(0,e.useEffect)((()=>{(async()=>{try{const e=await fetch("/api/file-groups");if(!e.ok)throw new Error("Failed to fetch file groups");const t=await e.json();u(t.groups)}catch(e){console.error("Failed to load file groups")}})()}),[]);const I=e=>{const t={id:Date.now().toString(),role:"bot",content:e,timestamp:Date.now()};return l((e=>[...e,t])),t.id},M=(e,t)=>{l((n=>n.map((n=>n.id===e?{...n,status:t}:n))))},P=async()=>{var e,t,s;const c=null===(e=y.current)||void 0===e||null===(t=e.getValue())||void 0===t?void 0:t.trim();if(!c)return void Kl.warning("Please enter a message");const u=(e=>{const t={id:Date.now().toString(),role:"user",content:e,status:"sending",timestamp:Date.now()};return l((e=>[...e,t])),t.id})(c);if(null===(s=y.current)||void 0===s||s.setValue(""),"\u786e\u8ba4"===c.trim()&&$){M(u,"sent");const{requestId:e,eventData:t}=$,n=JSON.stringify({value:a});return await fetch("/api/event/response",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({request_id:e,event:t,response:n})}),R(null),void console.log("Response event:",JSON.stringify({request_id:e,event:t,response:n}))}b(!0);try{const e=S?"/api/coding":"/api/chat",t=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:c})});if(!t.ok)throw new Error("Failed to send message");const a=await t.json();if(a.request_id)if(r(a.request_id),M(u,"sent"),S){const{final_status:e,content:t}=await(async e=>{let t="completed",r="";for(;;){try{const a=await fetch("/api/event/get",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({request_id:e})});if(!a.ok)throw new Error("Failed to fetch events");const s=await a.json();if(!s){await new Promise((e=>setTimeout(e,1e3)));continue}console.log("Received event:",s);const l=async t=>{console.log("Response event:",t),await fetch("/api/event/response",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({request_id:e,event:s,response:t})})};if("code_start"===s.event_type&&await l("proceed"),"code_end"===s.event_type){await l("proceed");break}if("code_error"===s.event_type){await l("proceed"),t="failed",r=s.data;break}if("code_merge_result"===s.event_type){await l("proceed");const e=JSON.parse(s.data);console.log("Received code blocks:",e);const t=e.map((e=>({path:e.file_path,content:`<<<<<<< SEARCH\n${e.old_block}\n=======\n${e.new_block}\n>>>>>>> REPLACE`})));n(t),i("preview")}if("code_human_as_model"===s.event_type){const t=JSON.parse(s.data);i("clipboard"),o(t.instruction),R({requestId:e,eventData:s}),I("\u8bf7\u590d\u5236\u53f3\u4fa7\u7684\u6587\u672c,\u7136\u540e\u5c06\u7ed3\u679c\u590d\u5236\u9ecf\u8d34\u4f1a\u53f3\u4fa7\u3002\u9ecf\u8d34\u5b8c\u8bf7\u56de\u590d '\u786e\u8ba4'"),b(!1)}}catch(a){t="failed",r="Error polling events: "+a,console.error("Error polling events:",a);break}await new Promise((e=>setTimeout(e,1e3)))}return{final_status:t,content:r}})(a.request_id);"completed"===e?(I("\u4ee3\u7801\u4fee\u6539\u5b8c\u6210\u3002\u8bf7\u67e5\u770b\u53f3\u4fa7\u4fee\u6539\u9884\u89c8\u9762\u677f\u3002\u5982\u679c\u4e0d\u6ee1\u610f\uff0c\u5728\u53d1\u9001\u6309\u94ae\u5de6\u4fa7\u70b9\u51fb\u64a4\u9500\u6700\u8fd1\u4fee\u6539"),r("")):(I("\u4ee3\u7801\u4fee\u6539\u5931\u8d25\uff1a"+t),r(""))}else{const e=I("");await(async(e,t)=>{let n="",r="running";for(;"running"===r;)try{const a=await fetch(`/api/result/${e}`);if(!a.ok){r="failed";break}const s=await a.json();if(r=s.status,m.human_as_model&&!S){if("value"in s.result&&Array.isArray(s.result.value)){const e=s.result.value.join("");e!==n&&(n+=e)}if("completed"===r){i("clipboard"),o(n),t("\u56e0\u4e3a\u4f60\u5f00\u542f\u4e86 human as model\uff0c\u4f60\u53ef\u4ee5\u62f7\u8d1d\u53f3\u4fa7\u9ecf\u8d34\u677f\u5185\u5bb9\u5230\u4efb\u610fweb\u7248\u672c\u5927\u6a21\u578b\u91cc\u83b7\u5f97\u7ed3\u679c");break}"running"===r&&await new Promise((e=>setTimeout(e,1e3)));continue}if("value"in s.result&&Array.isArray(s.result.value)){const e=s.result.value.join("");e!==n&&(n=e,t(n))}else"value"in s.result&&"string"===typeof s.result.value&&s.result.value!==n&&(n=s.result.value,t(n));if("completed"===r)break;"running"===r&&await new Promise((e=>setTimeout(e,1e3)))}catch(a){console.error("Error polling result:",a),r="failed"}return{text:n,status:r}})(a.request_id,(t=>{""===t&&(t="typing..."),l((n=>n.map((n=>n.id===e?{...n,content:t}:n))))}))}}catch(d){console.error("Error sending message:",d),Kl.error("Failed to send message"),M(u,"error"),I("Sorry, there was an error processing your request. Please try again.")}finally{b(!1)}};return(0,eg.jsxs)("div",{className:"flex flex-col h-full",children:[(0,eg.jsx)("div",{className:"flex-1 overflow-y-auto p-4 bg-gray-900",children:(0,eg.jsxs)("div",{className:"space-y-4",children:[s.map((e=>(0,eg.jsx)("div",{className:"flex "+("user"===e.role?"justify-end":"justify-start"),children:(0,eg.jsxs)("div",{className:"max-w-[80%] rounded-lg p-2 relative group text-sm "+("user"===e.role?"bg-blue-600 text-white":"bg-gray-800 text-gray-300"),children:[(0,eg.jsx)("div",{className:"break-words text-sm",children:e.content}),"sending"===e.status&&(0,eg.jsxs)("div",{className:"flex items-center text-xs text-gray-400 mt-1",children:[(0,eg.jsx)("div",{className:"mr-1",children:"sending"}),(0,eg.jsx)("div",{className:"animate-bounce",children:"\u2022"}),(0,eg.jsx)("div",{className:"animate-bounce delay-100",children:"\u2022"}),(0,eg.jsx)("div",{className:"animate-bounce delay-200",children:"\u2022"})]}),"sent"===e.status&&(0,eg.jsx)("div",{className:"text-xs text-green-400 mt-1",children:"\u2713 sent"}),"error"===e.status&&(0,eg.jsxs)("div",{className:"flex items-center text-xs text-red-400 mt-1",children:[(0,eg.jsx)("span",{className:"mr-1",children:"\u26a0"}),"failed to send"]})]})}))),(0,eg.jsx)("div",{ref:_})]})}),(0,eg.jsxs)("div",{className:"bg-gray-800 border-t border-gray-700",children:[(0,eg.jsxs)("div",{className:"px-4 pt-2",children:[(0,eg.jsxs)("div",{className:"space-y-2",children:[(0,eg.jsxs)("div",{className:"flex items-center justify-between",children:[(0,eg.jsx)("span",{className:"text-gray-300 text-sm font-semibold",children:"Settings & Groups"}),(0,eg.jsx)(mc,{size:"small",checked:d,onChange:h,className:"ml-2"})]}),(0,eg.jsxs)("div",{className:"text-gray-400 text-xs",children:["Press ",0===navigator.platform.indexOf("Mac")?"\u2318":"Ctrl"," + P to maximize/minimize input area"]})]}),d&&(0,eg.jsxs)("div",{className:"space-y-2 mb-2",children:[(0,eg.jsxs)("div",{className:"flex items-center justify-between",children:[(0,eg.jsx)(Uh,{title:"Enable to let human act as the model",children:(0,eg.jsx)("span",{className:"text-gray-300 text-xs",children:"Human As Model"})}),(0,eg.jsx)(mc,{size:"small",checked:m.human_as_model,onChange:e=>O("human_as_model",e)})]}),(0,eg.jsxs)("div",{className:"flex items-center justify-between",children:[(0,eg.jsx)(Uh,{title:"Skip building index for better performance",children:(0,eg.jsx)("span",{className:"text-gray-300 text-xs",children:"Skip Build Index"})}),(0,eg.jsx)(mc,{size:"small",checked:m.skip_build_index,onChange:e=>O("skip_build_index",e)})]}),(0,eg.jsxs)("div",{className:"flex items-center justify-between",children:[(0,eg.jsx)(Uh,{title:"Filter files by extensions (e.g. .py,.ts)",children:(0,eg.jsx)("span",{className:"text-gray-300 text-xs",children:"Project Type"})}),(0,eg.jsx)(Ym,{mode:"tags",size:"small",style:{width:"60%"},placeholder:"e.g. .py,.ts",value:m.project_type?m.project_type.split(","):[],onChange:e=>O("project_type",e.join(",")),className:"custom-select",tokenSeparators:[","],children:[".py",".ts",".tsx",".js",".jsx"].map((e=>(0,eg.jsx)(Ym.Option,{value:e,children:e},e)))})]}),(0,eg.jsxs)("div",{className:"space-y-2 mt-2",children:[(0,eg.jsxs)("div",{className:"flex items-center justify-between",children:[(0,eg.jsx)("span",{className:"text-gray-300 text-xs font-medium",children:"Custom Configuration"}),(0,eg.jsx)("button",{onClick:()=>{const e={...m.extra_conf};e[`custom_key_${Object.keys(m.extra_conf).length}`]="",g((t=>({...t,extra_conf:e})))},className:"px-2 py-1 text-xs bg-blue-600 text-white rounded hover:bg-blue-700 transition-colors",children:"Add Config"})]}),(0,eg.jsx)("div",{className:"space-y-2",children:Object.entries(m.extra_conf).map(((e,t)=>{let[n,r]=e;return(0,eg.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,eg.jsx)(Ym,{showSearch:!0,size:"small",value:n,style:{width:"40%"},placeholder:"Key",className:"custom-select",onChange:e=>{const t={...m.extra_conf};delete t[n],t[e]=r,g((e=>({...e,extra_conf:t})))},optionLabelProp:"label",children:m.available_keys.map((e=>(0,eg.jsx)(Ym.Option,{value:e.key,label:e.key,children:(0,eg.jsx)(Uh,{title:`Type: ${e.type}${e.description?`\nDescription: ${e.description}`:""}`,children:(0,eg.jsxs)("div",{className:"flex justify-between items-center",children:[(0,eg.jsx)("span",{children:e.key}),(0,eg.jsx)("span",{className:"text-gray-400 text-xs",children:e.type})]})})},e.key)))}),(0,eg.jsx)("input",{type:"text",value:r,onChange:e=>{const t={...m.extra_conf};t[n]=e.target.value,g((e=>({...e,extra_conf:t})))},onBlur:()=>{n&&""!==m.extra_conf[n]&&O(n,m.extra_conf[n])},className:"flex-1 bg-gray-700 text-white text-sm rounded px-2 py-1 border border-gray-600 focus:border-blue-500 focus:outline-none",placeholder:"Value"}),(0,eg.jsx)("button",{onClick:async()=>{try{if(!(await fetch(`/api/conf/${n}`,{method:"DELETE"})).ok)throw new Error("Failed to delete configuration");const e={...m.extra_conf};delete e[n],g((t=>({...t,extra_conf:e}))),Kl.success("Configuration deleted successfully")}catch(e){console.error("Error deleting configuration:",e),Kl.error("Failed to delete configuration")}},className:"p-1 text-gray-400 hover:text-red-500 transition-colors",children:(0,eg.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,eg.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},t)}))})]})]}),(0,eg.jsxs)("div",{className:"px-4",children:[(0,eg.jsx)("div",{className:"h-[1px] bg-gray-700/50 my-3"}),(0,eg.jsx)(Ym,{mode:"multiple",style:{width:"100%"},placeholder:"Select file groups to work with",value:f,onChange:e=>{console.log("Selected groups:",e),p(e),fetch("/api/file-groups/switch",{method:"POST",body:JSON.stringify({group_names:e})})},optionLabelProp:"label",className:"custom-select",children:c.map((e=>(0,eg.jsx)(Ym.Option,{value:e.name,label:e.name,children:(0,eg.jsxs)("div",{className:"flex justify-between items-center",children:[(0,eg.jsx)("span",{children:e.name}),(0,eg.jsxs)("span",{className:"text-gray-400 text-xs",children:[e.files.length," files"]})]})},e.name)))})]})]}),(0,eg.jsxs)("div",{className:"p-4 flex flex-col space-y-2 "+(C?"fixed inset-0 z-50 bg-gray-800":""),children:[(0,eg.jsx)("div",{className:`flex-1 ${C?"h-full":"min-h-[180px]"} border border-gray-700 rounded-lg overflow-hidden`,children:(0,eg.jsx)(ne,{height:C?"100vh":"180px",defaultLanguage:"markdown",theme:"vs-dark",onMount:(e,t)=>{y.current=e,e.addCommand(t.KeyMod.CtrlCmd|t.KeyCode.KeyP,(()=>{x((e=>!e))})),e.addCommand(t.KeyMod.CtrlCmd|t.KeyCode.Enter,(()=>{k(!0)})),t.languages.registerCompletionItemProvider("markdown",{triggerCharacters:["@"],provideCompletionItems:async(e,n)=>{const r=e.getValueInRange({startLineNumber:n.lineNumber,startColumn:1,endLineNumber:n.lineNumber,endColumn:n.column}),i=e.getWordUntilPosition(n),o=r.charAt(i.startColumn-2),a=r.charAt(i.startColumn-3),s=i.word;if(console.log("prefix:",o,"word:",s),"@"===o&&"@"===a){const e=s,n=await fetch(`/api/completions/symbols?name=${encodeURIComponent(e)}`);return{suggestions:(await n.json()).completions.map((e=>({label:e.display,kind:t.languages.CompletionItemKind.Function,insertText:e.path,detail:"",documentation:`Location: ${e.path}`}))),incomplete:!0}}if("@"===o){const e=s,n=await fetch(`/api/completions/files?name=${encodeURIComponent(e)}`);return{suggestions:(await n.json()).completions.map((e=>({label:e.display,kind:t.languages.CompletionItemKind.File,insertText:e.path,detail:"",documentation:`Location: ${e.location}`}))),incomplete:!0}}return{suggestions:[]}}})},options:{minimap:{enabled:!1},scrollBeyondLastLine:!1,wordWrap:"on",lineNumbers:"off",folding:!1,contextmenu:!1,fontFamily:"monospace",fontSize:14,lineHeight:1.5,padding:{top:8,bottom:8},suggestOnTriggerCharacters:!0,quickSuggestions:!0,acceptSuggestionOnEnter:"smart",overviewRulerLanes:0,overviewRulerBorder:!1,fixedOverflowWidgets:!0,suggest:{insertMode:"replace",snippetsPreventQuickSuggestions:!1}}})}),(0,eg.jsxs)("div",{className:"flex items-center justify-between mt-2 gap-2",children:[(0,eg.jsxs)("div",{className:"flex items-center gap-2",children:[(0,eg.jsxs)("div",{className:"text-xs text-gray-400",children:["Press ",0===navigator.platform.indexOf("Mac")?"\u2318":"Ctrl"," + Enter to send"]}),(0,eg.jsx)("div",{className:"flex items-center gap-1",children:(0,eg.jsx)(mc,{size:"small",checked:S,onChange:w,checkedChildren:"Write",unCheckedChildren:"Chat",className:"bg-gray-600"})})]}),(0,eg.jsxs)("div",{className:"flex items-center gap-2",children:[(0,eg.jsx)("button",{className:"flex items-center p-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-gray-500 focus:ring-offset-2 focus:ring-offset-gray-900 transition-colors shadow-lg shadow-gray-500/20",onClick:async()=>{try{const e=await fetch("/api/revert",{method:"POST"});if(!e.ok)throw new Error("Failed to revert changes");await e.json();Kl.success("Changes reverted successfully"),n([]),i("code")}catch(e){Kl.error("Failed to revert changes"),console.error("Error reverting changes:",e)}},title:"\u64a4\u9500\u6700\u8fd1\u4e00\u6b21\u63d0\u4ea4",children:(0,eg.jsx)(Zm,{style:{fontSize:"18px"}})}),(0,eg.jsx)("button",{className:"flex items-center px-4 py-2 bg-indigo-600 text-sm text-white rounded-md font-medium hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 focus:ring-offset-gray-900 transition-colors disabled:opacity-50 disabled:cursor-not-allowed shadow-lg shadow-indigo-500/20",onClick:P,disabled:v,children:v?(0,eg.jsxs)(eg.Fragment,{children:[(0,eg.jsxs)("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,eg.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,eg.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Sending..."]}):"Send"})]})]})]})]})]})};var ng=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const rg=e.createContext(void 0),ig=t=>{const{getPrefixCls:n,direction:r}=e.useContext(Le),{prefixCls:i,size:o,className:a}=t,s=ng(t,["prefixCls","size","className"]),l=n("btn-group",i),[,,c]=Oa();let u="";switch(o){case"large":u="lg";break;case"small":u="sm"}const d=Ji()(l,{[`${l}-${u}`]:u,[`${l}-rtl`]:"rtl"===r},a,c);return e.createElement(rg.Provider,{value:o},e.createElement("div",Object.assign({},s,{className:d})))},og=/^[\u4E00-\u9FA5]{2}$/,ag=og.test.bind(og);function sg(e){return"danger"===e?{danger:!0}:{type:e}}function lg(e){return"string"===typeof e}function cg(e){return"text"===e||"link"===e}function ug(t,n){let r=!1;const i=[];return e.Children.forEach(t,(e=>{const t=typeof e,n="string"===t||"number"===t;if(r&&n){const t=i.length-1,n=i[t];i[t]=`${n}${e}`}else i.push(e);r=n})),e.Children.map(i,(t=>function(t,n){if(null===t||void 0===t)return;const r=n?" ":"";return"string"!==typeof t&&"number"!==typeof t&&lg(t.type)&&ag(t.props.children)?Yl(t,{children:t.props.children.split("").join(r)}):lg(t)?ag(t)?e.createElement("span",null,t.split("").join(r)):e.createElement("span",null,t):Gl(t)?e.createElement("span",null,t):t}(t,n)))}const dg=(0,e.forwardRef)(((t,n)=>{const{className:r,style:i,children:o,prefixCls:a}=t,s=Ji()(`${a}-icon`,r);return e.createElement("span",{ref:n,className:s,style:i},o)})),hg=(0,e.forwardRef)(((t,n)=>{const{prefixCls:r,className:i,style:o,iconClassName:a}=t,s=Ji()(`${r}-loading-icon`,i);return e.createElement(dg,{prefixCls:r,className:s,style:o,ref:n},e.createElement(xs,{className:a}))})),fg=()=>({width:0,opacity:0,transform:"scale(0)"}),pg=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"}),mg=t=>{const{prefixCls:n,loading:r,existIcon:i,className:o,style:a}=t,s=!!r;return i?e.createElement(hg,{prefixCls:n,className:o,style:a}):e.createElement(va,{visible:s,motionName:`${n}-loading-icon-motion`,motionLeave:s,removeOnLeave:!0,onAppearStart:fg,onAppearActive:pg,onEnterStart:fg,onEnterActive:pg,onLeaveStart:pg,onLeaveActive:fg},((t,r)=>{let{className:i,style:s}=t;return e.createElement(hg,{prefixCls:n,className:o,style:Object.assign(Object.assign({},a),s),ref:r,iconClassName:i})}))},gg=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),vg=e=>{const{componentCls:t,fontSize:n,lineWidth:r,groupBorderColor:i,colorErrorHover:o}=e;return{[`${t}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:e.calc(r).mul(-1).equal(),[`&, & > ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:"relative",zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${t}-icon-only`]:{fontSize:n}},gg(`${t}-primary`,i),gg(`${t}-danger`,o)]}},bg=Math.round;function yg(e,t){const n=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map((e=>parseFloat(e)));for(let i=0;i<3;i+=1)r[i]=t(r[i]||0,n[i]||"",i);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const _g=(e,t,n)=>0===n?e:e/100;function Sg(e,t){const n=t||255;return e>n?n:e<0?0:e}class wg{constructor(e){function t(t){return t[0]in e&&t[1]in e&&t[2]in e}if(fe(this,"isValid",!0),fe(this,"r",0),fe(this,"g",0),fe(this,"b",0),fe(this,"a",1),fe(this,"_h",void 0),fe(this,"_s",void 0),fe(this,"_l",void 0),fe(this,"_v",void 0),fe(this,"_max",void 0),fe(this,"_min",void 0),fe(this,"_brightness",void 0),e)if("string"===typeof e){const n=e.trim();function r(e){return n.startsWith(e)}/^#?[A-F\d]{3,8}$/i.test(n)?this.fromHexString(n):r("rgb")?this.fromRgbString(n):r("hsl")?this.fromHslString(n):(r("hsv")||r("hsb"))&&this.fromHsvString(n)}else if(e instanceof wg)this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this._h=e._h,this._s=e._s,this._l=e._l,this._v=e._v;else if(t("rgb"))this.r=Sg(e.r),this.g=Sg(e.g),this.b=Sg(e.b),this.a="number"===typeof e.a?Sg(e.a,1):1;else if(t("hsl"))this.fromHsl(e);else{if(!t("hsv"))throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(e));this.fromHsv(e)}else;}setR(e){return this._sc("r",e)}setG(e){return this._sc("g",e)}setB(e){return this._sc("b",e)}setA(e){return this._sc("a",e,1)}setHue(e){const t=this.toHsv();return t.h=e,this._c(t)}getLuminance(){function e(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}return.2126*e(this.r)+.7152*e(this.g)+.0722*e(this.b)}getHue(){if("undefined"===typeof this._h){const e=this.getMax()-this.getMin();this._h=0===e?0:bg(60*(this.r===this.getMax()?(this.g-this.b)/e+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/e+2:(this.r-this.g)/e+4))}return this._h}getSaturation(){if("undefined"===typeof this._s){const e=this.getMax()-this.getMin();this._s=0===e?0:e/this.getMax()}return this._s}getLightness(){return"undefined"===typeof this._l&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return"undefined"===typeof this._v&&(this._v=this.getMax()/255),this._v}getBrightness(){return"undefined"===typeof this._brightness&&(this._brightness=(299*this.r+587*this.g+114*this.b)/1e3),this._brightness}darken(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;const t=this.getHue(),n=this.getSaturation();let r=this.getLightness()-e/100;return r<0&&(r=0),this._c({h:t,s:n,l:r,a:this.a})}lighten(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;const t=this.getHue(),n=this.getSaturation();let r=this.getLightness()+e/100;return r>1&&(r=1),this._c({h:t,s:n,l:r,a:this.a})}mix(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;const n=this._c(e),r=t/100,i=e=>(n[e]-this[e])*r+this[e],o={r:bg(i("r")),g:bg(i("g")),b:bg(i("b")),a:bg(100*i("a"))/100};return this._c(o)}tint(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return this.mix({r:255,g:255,b:255,a:1},e)}shade(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return this.mix({r:0,g:0,b:0,a:1},e)}onBackground(e){const t=this._c(e),n=this.a+t.a*(1-this.a),r=e=>bg((this[e]*this.a+t[e]*t.a*(1-this.a))/n);return this._c({r:r("r"),g:r("g"),b:r("b"),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}clone(){return this._c(this)}toHexString(){let e="#";const t=(this.r||0).toString(16);e+=2===t.length?t:"0"+t;const n=(this.g||0).toString(16);e+=2===n.length?n:"0"+n;const r=(this.b||0).toString(16);if(e+=2===r.length?r:"0"+r,"number"===typeof this.a&&this.a>=0&&this.a<1){const t=bg(255*this.a).toString(16);e+=2===t.length?t:"0"+t}return e}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const e=this.getHue(),t=bg(100*this.getSaturation()),n=bg(100*this.getLightness());return 1!==this.a?`hsla(${e},${t}%,${n}%,${this.a})`:`hsl(${e},${t}%,${n}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return 1!==this.a?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(e,t,n){const r=this.clone();return r[e]=Sg(t,n),r}_c(e){return new this.constructor(e)}getMax(){return"undefined"===typeof this._max&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return"undefined"===typeof this._min&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(e){const t=e.replace("#","");function n(e,n){return parseInt(t[e]+t[n||e],16)}t.length<6?(this.r=n(0),this.g=n(1),this.b=n(2),this.a=t[3]?n(3)/255:1):(this.r=n(0,1),this.g=n(2,3),this.b=n(4,5),this.a=t[6]?n(6,7)/255:1)}fromHsl(e){let{h:t,s:n,l:r,a:i}=e;if(this._h=t%360,this._s=n,this._l=r,this.a="number"===typeof i?i:1,n<=0){const e=bg(255*r);this.r=e,this.g=e,this.b=e}let o=0,a=0,s=0;const l=t/60,c=(1-Math.abs(2*r-1))*n,u=c*(1-Math.abs(l%2-1));l>=0&&l<1?(o=c,a=u):l>=1&&l<2?(o=u,a=c):l>=2&&l<3?(a=c,s=u):l>=3&&l<4?(a=u,s=c):l>=4&&l<5?(o=u,s=c):l>=5&&l<6&&(o=c,s=u);const d=r-c/2;this.r=bg(255*(o+d)),this.g=bg(255*(a+d)),this.b=bg(255*(s+d))}fromHsv(e){let{h:t,s:n,v:r,a:i}=e;this._h=t%360,this._s=n,this._v=r,this.a="number"===typeof i?i:1;const o=bg(255*r);if(this.r=o,this.g=o,this.b=o,n<=0)return;const a=t/60,s=Math.floor(a),l=a-s,c=bg(r*(1-n)*255),u=bg(r*(1-n*l)*255),d=bg(r*(1-n*(1-l))*255);switch(s){case 0:this.g=d,this.b=c;break;case 1:this.r=u,this.b=c;break;case 2:this.r=c,this.b=d;break;case 3:this.r=c,this.g=u;break;case 4:this.r=d,this.g=c;break;default:this.g=c,this.b=u}}fromHsvString(e){const t=yg(e,_g);this.fromHsv({h:t[0],s:t[1],v:t[2],a:t[3]})}fromHslString(e){const t=yg(e,_g);this.fromHsl({h:t[0],s:t[1],l:t[2],a:t[3]})}fromRgbString(e){const t=yg(e,((e,t)=>t.includes("%")?bg(e/100*255):e));this.r=t[0],this.g=t[1],this.b=t[2],this.a=t[3]}}var Cg=["b"],xg=["v"],Eg=function(e){return Math.round(Number(e||0))},kg=function(e){po(n,e);var t=bo(n);function n(e){return st(this,n),t.call(this,function(e){if(e instanceof wg)return e;if(e&&"object"===le(e)&&"h"in e&&"b"in e){var t=e,n=t.b;return me(me({},lo(t,Cg)),{},{v:n})}return"string"===typeof e&&/hsb/.test(e)?e.replace(/hsb/,"hsv"):e}(e))}return ct(n,[{key:"toHsbString",value:function(){var e=this.toHsb(),t=Eg(100*e.s),n=Eg(100*e.b),r=Eg(e.h),i=e.a,o="hsb(".concat(r,", ").concat(t,"%, ").concat(n,"%)"),a="hsba(".concat(r,", ").concat(t,"%, ").concat(n,"%, ").concat(i.toFixed(0===i?0:2),")");return 1===i?o:a}},{key:"toHsb",value:function(){var e=this.toHsv(),t=e.v;return me(me({},lo(e,xg)),{},{b:t,a:this.a})}}]),n}(wg),Og=function(e){return e instanceof kg?e:new kg(e)};Og("#1677ff");let $g=function(){return ct((function e(t){var n;if(st(this,e),this.cleared=!1,t instanceof e)return this.metaColor=t.metaColor.clone(),this.colors=null===(n=t.colors)||void 0===n?void 0:n.map((t=>({color:new e(t.color),percent:t.percent}))),void(this.cleared=t.cleared);const r=Array.isArray(t);r&&t.length?(this.colors=t.map((t=>{let{color:n,percent:r}=t;return{color:new e(n),percent:r}})),this.metaColor=new kg(this.colors[0].color.metaColor)):this.metaColor=new kg(r?"":t),(!t||r&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}),[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return e=this.toHexString(),t=this.metaColor.a<1,e?((e,t)=>(null===e||void 0===e?void 0:e.replace(/[^\w/]/g,"").slice(0,t?8:6))||"")(e,t):"";var e,t}},{key:"toHexString",value:function(){return this.metaColor.toHexString()}},{key:"toRgb",value:function(){return this.metaColor.toRgb()}},{key:"toRgbString",value:function(){return this.metaColor.toRgbString()}},{key:"isGradient",value:function(){return!!this.colors&&!this.cleared}},{key:"getColors",value:function(){return this.colors||[{color:this,percent:0}]}},{key:"toCssString",value:function(){const{colors:e}=this;if(e){return`linear-gradient(90deg, ${e.map((e=>`${e.color.toRgbString()} ${e.percent}%`)).join(", ")})`}return this.metaColor.toRgbString()}},{key:"equals",value:function(e){return!(!e||this.isGradient()!==e.isGradient())&&(this.isGradient()?this.colors.length===e.colors.length&&this.colors.every(((t,n)=>{const r=e.colors[n];return t.percent===r.percent&&t.color.equals(r.color)})):this.toHexString()===e.toHexString())}}])}();const Rg=(e,t)=>{const{r:n,g:r,b:i,a:o}=e.toRgb(),a=new kg(e.toRgbString()).onBackground(t).toHsv();return o<=.5?a.v>.5:.299*n+.587*r+.114*i>192},Ig=e=>{const{paddingInline:t,onlyIconSize:n,paddingBlock:r}=e;return ol(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:r,buttonIconOnlyFontSize:n})},Mg=e=>{var t,n,r,i,o,a;const s=null!==(t=e.contentFontSize)&&void 0!==t?t:e.fontSize,l=null!==(n=e.contentFontSizeSM)&&void 0!==n?n:e.fontSize,c=null!==(r=e.contentFontSizeLG)&&void 0!==r?r:e.fontSizeLG,u=null!==(i=e.contentLineHeight)&&void 0!==i?i:Ii(s),d=null!==(o=e.contentLineHeightSM)&&void 0!==o?o:Ii(l),h=null!==(a=e.contentLineHeightLG)&&void 0!==a?a:Ii(c),f=Rg(new $g(e.colorBgSolid),"#fff")?"#000":"#fff";return{fontWeight:400,defaultShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,primaryShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,dangerShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorder,defaultGhostColor:e.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:e.fontSizeLG,onlyIconSizeSM:e.fontSizeLG-2,onlyIconSizeLG:e.fontSizeLG+2,groupBorderColor:e.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:e.colorText,textTextHoverColor:e.colorText,textTextActiveColor:e.colorText,textHoverBg:e.colorFillTertiary,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,solidTextColor:f,contentFontSize:s,contentFontSizeSM:l,contentFontSizeLG:c,contentLineHeight:u,contentLineHeightSM:d,contentLineHeightLG:h,paddingBlock:Math.max((e.controlHeight-s*u)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-l*d)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-c*h)/2-e.lineWidth,0)}},Pg=e=>{const{componentCls:t,iconCls:n,fontWeight:r}=e;return{[t]:{outline:"none",position:"relative",display:"inline-flex",gap:e.marginXS,alignItems:"center",justifyContent:"center",fontWeight:r,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",background:"transparent",border:`${It(e.lineWidth)} ${e.lineType} transparent`,cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",color:e.colorText,"&:disabled > *":{pointerEvents:"none"},"> span":{display:"inline-block"},[`${t}-icon`]:{lineHeight:1},"> a":{color:"currentColor"},"&:not(:disabled)":Object.assign({},La(e)),[`&${t}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${t}-two-chinese-chars > *:not(${n})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},"&-icon-end":{flexDirection:"row-reverse"}}}},Ng=(e,t,n)=>({[`&:not(:disabled):not(${e}-disabled)`]:{"&:hover":t,"&:active":n}}),Lg=e=>({minWidth:e.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),Tg=e=>({borderRadius:e.controlHeight,paddingInlineStart:e.calc(e.controlHeight).div(2).equal(),paddingInlineEnd:e.calc(e.controlHeight).div(2).equal()}),Dg=e=>({cursor:"not-allowed",borderColor:e.borderColorDisabled,color:e.colorTextDisabled,background:e.colorBgContainerDisabled,boxShadow:"none"}),Ag=(e,t,n,r,i,o,a,s)=>({[`&${e}-background-ghost`]:Object.assign(Object.assign({color:n||void 0,background:t,borderColor:r||void 0,boxShadow:"none"},Ng(e,Object.assign({background:t},a),Object.assign({background:t},s))),{"&:disabled":{cursor:"not-allowed",color:i||void 0,borderColor:o||void 0}})}),Bg=e=>({[`&:disabled, &${e.componentCls}-disabled`]:Object.assign({},Dg(e))}),jg=e=>({[`&:disabled, &${e.componentCls}-disabled`]:{cursor:"not-allowed",color:e.colorTextDisabled}}),zg=(e,t,n,r)=>{const i=r&&["link","text"].includes(r)?jg:Bg;return Object.assign(Object.assign({},i(e)),Ng(e.componentCls,t,n))},Hg=(e,t,n,r,i)=>({[`&${e.componentCls}-variant-solid`]:Object.assign({color:t,background:n},zg(e,r,i))}),Fg=(e,t,n,r,i)=>({[`&${e.componentCls}-variant-outlined, &${e.componentCls}-variant-dashed`]:Object.assign({borderColor:t,background:n},zg(e,r,i))}),Wg=e=>({[`&${e.componentCls}-variant-dashed`]:{borderStyle:"dashed"}}),Kg=(e,t,n,r)=>({[`&${e.componentCls}-variant-filled`]:Object.assign({boxShadow:"none",background:t},zg(e,n,r))}),Vg=(e,t,n,r,i)=>({[`&${e.componentCls}-variant-${n}`]:Object.assign({color:t,boxShadow:"none"},zg(e,r,i,n))}),Ug=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.defaultColor,boxShadow:e.defaultShadow},Hg(e,e.solidTextColor,e.colorBgSolid,{background:e.colorBgSolidHover},{background:e.colorBgSolidActive})),Wg(e)),Kg(e,e.colorFillTertiary,{background:e.colorFillSecondary},{background:e.colorFill})),Vg(e,e.textTextColor,"link",{color:e.colorLinkHover,background:e.linkHoverBg},{color:e.colorLinkActive})),Ag(e.componentCls,e.ghostBg,e.defaultGhostColor,e.defaultGhostBorderColor,e.colorTextDisabled,e.colorBorder)),qg=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorPrimary,boxShadow:e.primaryShadow},Fg(e,e.colorPrimary,e.colorBgContainer,{color:e.colorPrimaryTextHover,borderColor:e.colorPrimaryHover,background:e.colorBgContainer},{color:e.colorPrimaryTextActive,borderColor:e.colorPrimaryActive,background:e.colorBgContainer})),Wg(e)),Kg(e,e.colorPrimaryBg,{background:e.colorPrimaryBgHover},{background:e.colorPrimaryBorder})),Vg(e,e.colorLink,"text",{color:e.colorPrimaryTextHover,background:e.colorPrimaryBg},{color:e.colorPrimaryTextActive,background:e.colorPrimaryBorder})),Ag(e.componentCls,e.ghostBg,e.colorPrimary,e.colorPrimary,e.colorTextDisabled,e.colorBorder,{color:e.colorPrimaryHover,borderColor:e.colorPrimaryHover},{color:e.colorPrimaryActive,borderColor:e.colorPrimaryActive})),Xg=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorError,boxShadow:e.dangerShadow},Hg(e,e.dangerColor,e.colorError,{background:e.colorErrorHover},{background:e.colorErrorActive})),Fg(e,e.colorError,e.colorBgContainer,{color:e.colorErrorHover,borderColor:e.colorErrorBorderHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),Wg(e)),Kg(e,e.colorErrorBg,{background:e.colorErrorBgFilledHover},{background:e.colorErrorBgActive})),Vg(e,e.colorError,"text",{color:e.colorErrorHover,background:e.colorErrorBg},{color:e.colorErrorHover,background:e.colorErrorBgActive})),Vg(e,e.colorError,"link",{color:e.colorErrorHover},{color:e.colorErrorActive})),Ag(e.componentCls,e.ghostBg,e.colorError,e.colorError,e.colorTextDisabled,e.colorBorder,{color:e.colorErrorHover,borderColor:e.colorErrorHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),Gg=e=>{const{componentCls:t}=e;return{[`${t}-color-default`]:Ug(e),[`${t}-color-primary`]:qg(e),[`${t}-color-dangerous`]:Xg(e)}},Yg=e=>Object.assign(Object.assign(Object.assign(Object.assign({},Fg(e,e.defaultBorderColor,e.defaultBg,{color:e.defaultHoverColor,borderColor:e.defaultHoverBorderColor,background:e.defaultHoverBg},{color:e.defaultActiveColor,borderColor:e.defaultActiveBorderColor,background:e.defaultActiveBg})),Vg(e,e.textTextColor,"text",{color:e.textTextHoverColor,background:e.textHoverBg},{color:e.textTextActiveColor,background:e.colorBgTextActive})),Hg(e,e.primaryColor,e.colorPrimary,{background:e.colorPrimaryHover,color:e.primaryColor},{background:e.colorPrimaryActive,color:e.primaryColor})),Vg(e,e.colorLink,"link",{color:e.colorLinkHover,background:e.linkHoverBg},{color:e.colorLinkActive})),Qg=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const{componentCls:n,controlHeight:r,fontSize:i,lineHeight:o,borderRadius:a,buttonPaddingHorizontal:s,iconCls:l,buttonPaddingVertical:c}=e,u=`${n}-icon-only`;return[{[t]:{fontSize:i,lineHeight:o,height:r,padding:`${It(c)} ${It(s)}`,borderRadius:a,[`&${u}`]:{width:r,paddingInline:0,[`&${n}-compact-item`]:{flex:"none"},[`&${n}-round`]:{width:"auto"},[l]:{fontSize:e.buttonIconOnlyFontSize}},[`&${n}-loading`]:{opacity:e.opacityLoading,cursor:"default"},[`${n}-loading-icon`]:{transition:`width ${e.motionDurationSlow} ${e.motionEaseInOut}, opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`}}},{[`${n}${n}-circle${t}`]:Lg(e)},{[`${n}${n}-round${t}`]:Tg(e)}]},Jg=e=>{const t=ol(e,{fontSize:e.contentFontSize,lineHeight:e.contentLineHeight});return Qg(t,e.componentCls)},Zg=e=>{const t=ol(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,lineHeight:e.contentLineHeightSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:e.paddingBlockSM,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM});return Qg(t,`${e.componentCls}-sm`)},ev=e=>{const t=ol(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,lineHeight:e.contentLineHeightLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:e.paddingBlockLG,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG});return Qg(t,`${e.componentCls}-lg`)},tv=e=>{const{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},nv=ml("Button",(e=>{const t=Ig(e);return[Pg(t),Jg(t),Zg(t),ev(t),tv(t),Gg(t),Yg(t),vg(t)]}),Mg,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function rv(e,t){return{[`&-item:not(${t}-last-item)`]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},"&-item":{"&:hover,&:focus,&:active":{zIndex:2},"&[disabled]":{zIndex:0}}}}function iv(e){const t=`${e.componentCls}-compact-vertical`;return{[t]:Object.assign(Object.assign({},rv(e,t)),(n=e.componentCls,r=t,{[`&-item:not(${r}-first-item):not(${r}-last-item)`]:{borderRadius:0},[`&-item${r}-first-item:not(${r}-last-item)`]:{[`&, &${n}-sm, &${n}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${r}-last-item:not(${r}-first-item)`]:{[`&, &${n}-sm, &${n}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}))};var n,r}const ov=e=>{const{componentCls:t,calc:n}=e;return{[t]:{[`&-compact-item${t}-primary`]:{[`&:not([disabled]) + ${t}-compact-item${t}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:n(e.lineWidth).mul(-1).equal(),insetInlineStart:n(e.lineWidth).mul(-1).equal(),display:"inline-block",width:e.lineWidth,height:`calc(100% + ${It(e.lineWidth)} * 2)`,backgroundColor:e.colorPrimaryHover,content:'""'}}},"&-compact-vertical-item":{[`&${t}-primary`]:{[`&:not([disabled]) + ${t}-compact-vertical-item${t}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:n(e.lineWidth).mul(-1).equal(),insetInlineStart:n(e.lineWidth).mul(-1).equal(),display:"inline-block",width:`calc(100% + ${It(e.lineWidth)} * 2)`,height:e.lineWidth,backgroundColor:e.colorPrimaryHover,content:'""'}}}}}}},av=vl(["Button","compact"],(e=>{const t=Ig(e);return[Yp(t),iv(t),ov(t)]}),Mg);var sv=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const lv={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["primary","link"],text:["default","text"]},cv=e.forwardRef(((t,n)=>{var r,i,o,a;const{loading:s=!1,prefixCls:l,color:c,variant:u,type:d,danger:h=!1,shape:f="default",size:p,styles:m,disabled:g,className:v,rootClassName:b,children:y,icon:_,iconPosition:S="start",ghost:w=!1,block:C=!1,htmlType:x="button",classNames:E,style:k={},autoInsertSpace:O}=t,$=sv(t,["loading","prefixCls","color","variant","type","danger","shape","size","styles","disabled","className","rootClassName","children","icon","iconPosition","ghost","block","htmlType","classNames","style","autoInsertSpace"]),R=d||"default",[I,M]=(0,e.useMemo)((()=>{if(c&&u)return[c,u];const e=lv[R]||[];return h?["danger",e[1]]:e}),[d,c,u,h]),P="danger"===I?"dangerous":I,{getPrefixCls:N,direction:L,button:T}=(0,e.useContext)(Le),D=null===(r=null!==O&&void 0!==O?O:null===T||void 0===T?void 0:T.autoInsertSpace)||void 0===r||r,A=N("btn",l),[B,j,z]=nv(A),H=(0,e.useContext)(Wi),F=null!==g&&void 0!==g?g:H,W=(0,e.useContext)(rg),K=(0,e.useMemo)((()=>function(e){if("object"===typeof e&&e){let t=null===e||void 0===e?void 0:e.delay;return t=Number.isNaN(t)||"number"!==typeof t?0:t,{loading:t<=0,delay:t}}return{loading:!!e,delay:0}}(s)),[s]),[V,U]=(0,e.useState)(K.loading),[q,X]=(0,e.useState)(!1),G=io(n,(0,e.createRef)()),Y=1===e.Children.count(y)&&!_&&!cg(M);(0,e.useEffect)((()=>{let e=null;return K.delay>0?e=setTimeout((()=>{e=null,U(!0)}),K.delay):U(K.loading),function(){e&&(clearTimeout(e),e=null)}}),[K]),(0,e.useEffect)((()=>{if(!G||!G.current||!D)return;const e=G.current.textContent;Y&&ag(e)?q||X(!0):q&&X(!1)}),[G]);const Q=e.useCallback((e=>{var n;V||F?e.preventDefault():null===(n=t.onClick)||void 0===n||n.call(t,e)}),[t.onClick,V,F]);const{compactSize:J,compactItemClassnames:Z}=oh(A,L),ee={large:"lg",small:"sm",middle:void 0},te=ac((e=>{var t,n;return null!==(n=null!==(t=null!==p&&void 0!==p?p:J)&&void 0!==t?t:W)&&void 0!==n?n:e})),ne=te&&null!==(i=ee[te])&&void 0!==i?i:"",re=V?"loading":_,ie=Xf($,["navigate"]),oe=Ji()(A,j,z,{[`${A}-${f}`]:"default"!==f&&f,[`${A}-${R}`]:R,[`${A}-dangerous`]:h,[`${A}-color-${P}`]:P,[`${A}-variant-${M}`]:M,[`${A}-${ne}`]:ne,[`${A}-icon-only`]:!y&&0!==y&&!!re,[`${A}-background-ghost`]:w&&!cg(M),[`${A}-loading`]:V,[`${A}-two-chinese-chars`]:q&&D&&!V,[`${A}-block`]:C,[`${A}-rtl`]:"rtl"===L,[`${A}-icon-end`]:"end"===S},Z,v,b,null===T||void 0===T?void 0:T.className),ae=Object.assign(Object.assign({},null===T||void 0===T?void 0:T.style),k),se=Ji()(null===E||void 0===E?void 0:E.icon,null===(o=null===T||void 0===T?void 0:T.classNames)||void 0===o?void 0:o.icon),le=Object.assign(Object.assign({},(null===m||void 0===m?void 0:m.icon)||{}),(null===(a=null===T||void 0===T?void 0:T.styles)||void 0===a?void 0:a.icon)||{}),ce=_&&!V?e.createElement(dg,{prefixCls:A,className:se,style:le},_):e.createElement(mg,{existIcon:!!_,prefixCls:A,loading:V}),ue=y||0===y?ug(y,Y&&D):null;if(void 0!==ie.href)return B(e.createElement("a",Object.assign({},ie,{className:Ji()(oe,{[`${A}-disabled`]:F}),href:F?void 0:ie.href,style:ae,onClick:Q,ref:G,tabIndex:F?-1:0}),ce,ue));let de=e.createElement("button",Object.assign({},$,{type:x,className:oe,style:ae,onClick:Q,disabled:F,ref:G}),ce,ue,!!Z&&e.createElement(av,{key:"compact",prefixCls:A}));return cg(M)||(de=e.createElement(oc,{component:"Button",disabled:V},de)),B(de)}));cv.Group=ig,cv.__ANT_BUTTON=!0;const uv=cv;function dv(e){return!!(null===e||void 0===e?void 0:e.then)}const hv=t=>{const{type:n,children:r,prefixCls:i,buttonProps:o,close:a,autoFocus:s,emitEvent:l,isSilent:c,quitOnNullishReturnValue:u,actionFn:d}=t,h=e.useRef(!1),f=e.useRef(null),[p,m]=So(!1),g=function(){null===a||void 0===a||a.apply(void 0,arguments)};e.useEffect((()=>{let e=null;return s&&(e=setTimeout((()=>{var e;null===(e=f.current)||void 0===e||e.focus()}))),()=>{e&&clearTimeout(e)}}),[]);return e.createElement(uv,Object.assign({},sg(n),{onClick:e=>{if(h.current)return;if(h.current=!0,!d)return void g();let t;if(l){if(t=d(e),u&&!dv(t))return h.current=!1,void g(e)}else if(d.length)t=d(a),h.current=!1;else if(t=d(),!dv(t))return void g();(e=>{dv(e)&&(m(!0),e.then((function(){m(!1,!0),g.apply(void 0,arguments),h.current=!1}),(e=>{if(m(!1,!0),h.current=!1,!(null===c||void 0===c?void 0:c()))return Promise.reject(e)})))})(t)},loading:p,prefixCls:i},o,{ref:f}),r)},fv=e.createContext({}),{Provider:pv}=fv,mv=()=>{const{autoFocusButton:t,cancelButtonProps:n,cancelTextLocale:r,isSilent:i,mergedOkCancel:o,rootPrefixCls:a,close:s,onCancel:l,onConfirm:c}=(0,e.useContext)(fv);return o?e.createElement(hv,{isSilent:i,actionFn:l,close:function(){null===s||void 0===s||s.apply(void 0,arguments),null===c||void 0===c||c(!1)},autoFocus:"cancel"===t,buttonProps:n,prefixCls:`${a}-btn`},r):null},gv=()=>{const{autoFocusButton:t,close:n,isSilent:r,okButtonProps:i,rootPrefixCls:o,okTextLocale:a,okType:s,onConfirm:l,onOk:c}=(0,e.useContext)(fv);return e.createElement(hv,{isSilent:r,type:s||"primary",actionFn:c,close:function(){null===n||void 0===n||n.apply(void 0,arguments),null===l||void 0===l||l(!0)},autoFocus:"ok"===t,buttonProps:i,prefixCls:`${o}-btn`},a)};var vv=e.createContext({});function bv(e,t,n){var r=t;return!r&&n&&(r="".concat(e,"-").concat(n)),r}function yv(e,t){var n=e["page".concat(t?"Y":"X","Offset")],r="scroll".concat(t?"Top":"Left");if("number"!==typeof n){var i=e.document;"number"!==typeof(n=i.documentElement[r])&&(n=i.body[r])}return n}const _v=e.memo((function(e){return e.children}),(function(e,t){return!t.shouldUpdate}));var Sv={width:0,height:0,overflow:"hidden",outline:"none"},wv={outline:"none"};const Cv=e.forwardRef((function(t,n){var r=t.prefixCls,i=t.className,o=t.style,a=t.title,s=t.ariaId,l=t.footer,c=t.closable,u=t.closeIcon,d=t.onClose,h=t.children,f=t.bodyStyle,p=t.bodyProps,m=t.modalRender,g=t.onMouseDown,v=t.onMouseUp,b=t.holderRef,y=t.visible,_=t.forceRender,S=t.width,w=t.height,C=t.classNames,x=t.styles,E=e.useContext(vv).panel,k=oo(b,E),O=(0,e.useRef)(),$=(0,e.useRef)();e.useImperativeHandle(n,(function(){return{focus:function(){var e;null===(e=O.current)||void 0===e||e.focus({preventScroll:!0})},changeActive:function(e){var t=document.activeElement;e&&t===$.current?O.current.focus({preventScroll:!0}):e||t!==O.current||$.current.focus({preventScroll:!0})}}}));var R={};void 0!==S&&(R.width=S),void 0!==w&&(R.height=w);var I=l?e.createElement("div",{className:Ji()("".concat(r,"-footer"),null===C||void 0===C?void 0:C.footer),style:me({},null===x||void 0===x?void 0:x.footer)},l):null,M=a?e.createElement("div",{className:Ji()("".concat(r,"-header"),null===C||void 0===C?void 0:C.header),style:me({},null===x||void 0===x?void 0:x.header)},e.createElement("div",{className:"".concat(r,"-title"),id:s},a)):null,P=(0,e.useMemo)((function(){return"object"===le(c)&&null!==c?c:c?{closeIcon:null!==u&&void 0!==u?u:e.createElement("span",{className:"".concat(r,"-close-x")})}:{}}),[c,u,r]),N=Rs(P,!0),L="object"===le(c)&&c.disabled,T=c?e.createElement("button",Gt({type:"button",onClick:d,"aria-label":"Close"},N,{className:"".concat(r,"-close"),disabled:L}),P.closeIcon):null,D=e.createElement("div",{className:Ji()("".concat(r,"-content"),null===C||void 0===C?void 0:C.content),style:null===x||void 0===x?void 0:x.content},T,M,e.createElement("div",Gt({className:Ji()("".concat(r,"-body"),null===C||void 0===C?void 0:C.body),style:me(me({},f),null===x||void 0===x?void 0:x.body)},p),h),I);return e.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":a?s:null,"aria-modal":"true",ref:k,style:me(me({},o),R),className:Ji()(r,i),onMouseDown:g,onMouseUp:v},e.createElement("div",{ref:O,tabIndex:0,style:wv},e.createElement(_v,{shouldUpdate:y||_},m?m(D):D)),e.createElement("div",{tabIndex:0,ref:$,style:Sv}))}));var xv=e.forwardRef((function(t,n){var r=t.prefixCls,i=t.title,o=t.style,a=t.className,s=t.visible,l=t.forceRender,c=t.destroyOnClose,u=t.motionName,d=t.ariaId,h=t.onVisibleChanged,f=t.mousePosition,p=(0,e.useRef)(),m=Be(e.useState(),2),g=m[0],v=m[1],b={};function y(){var e=function(e){var t=e.getBoundingClientRect(),n={left:t.left,top:t.top},r=e.ownerDocument,i=r.defaultView||r.parentWindow;return n.left+=yv(i),n.top+=yv(i,!0),n}(p.current);v(f&&(f.x||f.y)?"".concat(f.x-e.left,"px ").concat(f.y-e.top,"px"):"")}return g&&(b.transformOrigin=g),e.createElement(va,{visible:s,onVisibleChanged:h,onAppearPrepare:y,onEnterPrepare:y,forceRender:l,motionName:u,removeOnLeave:c,ref:p},(function(s,l){var c=s.className,u=s.style;return e.createElement(Cv,Gt({},t,{ref:n,title:i,ariaId:d,prefixCls:r,holderRef:l,style:me(me(me({},u),o),b),className:Ji()(a,c)}))}))}));xv.displayName="Content";const Ev=xv;const kv=function(t){var n=t.prefixCls,r=t.style,i=t.visible,o=t.maskProps,a=t.motionName,s=t.className;return e.createElement(va,{key:"mask",visible:i,motionName:a,leavedClassName:"".concat(n,"-mask-hidden")},(function(t,i){var a=t.className,l=t.style;return e.createElement("div",Gt({ref:i,style:me(me({},l),r),className:Ji()("".concat(n,"-mask"),a,s)},o))}))};const Ov=function(t){var n=t.prefixCls,r=void 0===n?"rc-dialog":n,i=t.zIndex,o=t.visible,a=void 0!==o&&o,s=t.keyboard,l=void 0===s||s,c=t.focusTriggerAfterClose,u=void 0===c||c,d=t.wrapStyle,h=t.wrapClassName,f=t.wrapProps,p=t.onClose,m=t.afterOpenChange,g=t.afterClose,v=t.transitionName,b=t.animation,y=t.closable,_=void 0===y||y,S=t.mask,w=void 0===S||S,C=t.maskTransitionName,x=t.maskAnimation,E=t.maskClosable,k=void 0===E||E,O=t.maskStyle,$=t.maskProps,R=t.rootClassName,I=t.classNames,M=t.styles;var P=(0,e.useRef)(),N=(0,e.useRef)(),L=(0,e.useRef)(),T=Be(e.useState(a),2),D=T[0],A=T[1],B=cu();function j(e){null===p||void 0===p||p(e)}var z=(0,e.useRef)(!1),H=(0,e.useRef)(),F=null;k&&(F=function(e){z.current?z.current=!1:N.current===e.target&&j(e)}),(0,e.useEffect)((function(){a&&(A(!0),He(N.current,document.activeElement)||(P.current=document.activeElement))}),[a]),(0,e.useEffect)((function(){return function(){clearTimeout(H.current)}}),[]);var W=me(me(me({zIndex:i},d),null===M||void 0===M?void 0:M.wrapper),{},{display:D?null:"none"});return e.createElement("div",Gt({className:Ji()("".concat(r,"-root"),R)},Rs(t,{data:!0})),e.createElement(kv,{prefixCls:r,visible:w&&a,motionName:bv(r,C,x),style:me(me({zIndex:i},O),null===M||void 0===M?void 0:M.mask),maskProps:$,className:null===I||void 0===I?void 0:I.mask}),e.createElement("div",Gt({tabIndex:-1,onKeyDown:function(e){if(l&&e.keyCode===ks.ESC)return e.stopPropagation(),void j(e);a&&e.keyCode===ks.TAB&&L.current.changeActive(!e.shiftKey)},className:Ji()("".concat(r,"-wrap"),h,null===I||void 0===I?void 0:I.wrapper),ref:N,onClick:F,style:W},f),e.createElement(Ev,Gt({},t,{onMouseDown:function(){clearTimeout(H.current),z.current=!0},onMouseUp:function(){H.current=setTimeout((function(){z.current=!1}))},ref:L,closable:_,ariaId:B,prefixCls:r,visible:a&&D,onClose:j,onVisibleChanged:function(e){if(e)!function(){var e;He(N.current,document.activeElement)||null===(e=L.current)||void 0===e||e.focus()}();else{if(A(!1),w&&P.current&&u){try{P.current.focus({preventScroll:!0})}catch(rI){}P.current=null}D&&(null===g||void 0===g||g())}null===m||void 0===m||m(e)},motionName:bv(r,v,b)}))))};var $v=function(t){var n=t.visible,r=t.getContainer,i=t.forceRender,o=t.destroyOnClose,a=void 0!==o&&o,s=t.afterClose,l=t.panelRef,c=Be(e.useState(n),2),u=c[0],d=c[1],h=e.useMemo((function(){return{panel:l}}),[l]);return e.useEffect((function(){n&&d(!0)}),[n]),i||!a||u?e.createElement(vv.Provider,{value:h},e.createElement($c,{open:n||i||u,autoDestroy:!1,getContainer:r,autoLock:n||u},e.createElement(Ov,Gt({},t,{destroyOnClose:a,afterClose:function(){null===s||void 0===s||s(),d(!1)}})))):null};$v.displayName="Dialog";const Rv=$v;function Iv(e){if(e)return{closable:e.closable,closeIcon:e.closeIcon}}function Mv(t){const{closable:n,closeIcon:r}=t||{};return e.useMemo((()=>{if(!n&&(!1===n||!1===r||null===r))return!1;if(void 0===n&&void 0===r)return null;let e={closeIcon:"boolean"!==typeof r&&null!==r?r:void 0};return n&&"object"===typeof n&&(e=Object.assign(Object.assign({},e),n)),e}),[n,r])}function Pv(){const e={};for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((t=>{t&&Object.keys(t).forEach((n=>{void 0!==t[n]&&(e[n]=t[n])}))})),e}const Nv={};const Lv=t=>{const{prefixCls:n,className:r,style:i,size:o,shape:a}=t,s=Ji()({[`${n}-lg`]:"large"===o,[`${n}-sm`]:"small"===o}),l=Ji()({[`${n}-circle`]:"circle"===a,[`${n}-square`]:"square"===a,[`${n}-round`]:"round"===a}),c=e.useMemo((()=>"number"===typeof o?{width:o,height:o,lineHeight:`${o}px`}:{}),[o]);return e.createElement("span",{className:Ji()(n,s,l,r),style:Object.assign(Object.assign({},c),i)})},Tv=new Zn("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),Dv=e=>({height:e,lineHeight:It(e)}),Av=e=>Object.assign({width:e},Dv(e)),Bv=e=>({background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:Tv,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),jv=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},Dv(e)),zv=e=>{const{skeletonAvatarCls:t,gradientFromColor:n,controlHeight:r,controlHeightLG:i,controlHeightSM:o}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:n},Av(r)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},Av(i)),[`${t}${t}-sm`]:Object.assign({},Av(o))}},Hv=e=>{const{controlHeight:t,borderRadiusSM:n,skeletonInputCls:r,controlHeightLG:i,controlHeightSM:o,gradientFromColor:a,calc:s}=e;return{[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:a,borderRadius:n},jv(t,s)),[`${r}-lg`]:Object.assign({},jv(i,s)),[`${r}-sm`]:Object.assign({},jv(o,s))}},Fv=e=>Object.assign({width:e},Dv(e)),Wv=e=>{const{skeletonImageCls:t,imageSizeBase:n,gradientFromColor:r,borderRadiusSM:i,calc:o}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:r,borderRadius:i},Fv(o(n).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},Fv(n)),{maxWidth:o(n).mul(4).equal(),maxHeight:o(n).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}},Kv=(e,t,n)=>{const{skeletonButtonCls:r}=e;return{[`${n}${r}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${n}${r}-round`]:{borderRadius:t}}},Vv=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},Dv(e)),Uv=e=>{const{borderRadiusSM:t,skeletonButtonCls:n,controlHeight:r,controlHeightLG:i,controlHeightSM:o,gradientFromColor:a,calc:s}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:a,borderRadius:t,width:s(r).mul(2).equal(),minWidth:s(r).mul(2).equal()},Vv(r,s))},Kv(e,r,n)),{[`${n}-lg`]:Object.assign({},Vv(i,s))}),Kv(e,i,`${n}-lg`)),{[`${n}-sm`]:Object.assign({},Vv(o,s))}),Kv(e,o,`${n}-sm`))},qv=e=>{const{componentCls:t,skeletonAvatarCls:n,skeletonTitleCls:r,skeletonParagraphCls:i,skeletonButtonCls:o,skeletonInputCls:a,skeletonImageCls:s,controlHeight:l,controlHeightLG:c,controlHeightSM:u,gradientFromColor:d,padding:h,marginSM:f,borderRadius:p,titleHeight:m,blockRadius:g,paragraphLiHeight:v,controlHeightXS:b,paragraphMarginTop:y}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:h,verticalAlign:"top",[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:d},Av(l)),[`${n}-circle`]:{borderRadius:"50%"},[`${n}-lg`]:Object.assign({},Av(c)),[`${n}-sm`]:Object.assign({},Av(u))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[r]:{width:"100%",height:m,background:d,borderRadius:g,[`+ ${i}`]:{marginBlockStart:u}},[i]:{padding:0,"> li":{width:"100%",height:v,listStyle:"none",background:d,borderRadius:g,"+ li":{marginBlockStart:b}}},[`${i}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${r}, ${i} > li`]:{borderRadius:p}}},[`${t}-with-avatar ${t}-content`]:{[r]:{marginBlockStart:f,[`+ ${i}`]:{marginBlockStart:y}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},Uv(e)),zv(e)),Hv(e)),Wv(e)),[`${t}${t}-block`]:{width:"100%",[o]:{width:"100%"},[a]:{width:"100%"}},[`${t}${t}-active`]:{[`\n ${r},\n ${i} > li,\n ${n},\n ${o},\n ${a},\n ${s}\n `]:Object.assign({},Bv(e))}}},Xv=ml("Skeleton",(e=>{const{componentCls:t,calc:n}=e,r=ol(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:n(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[qv(r)]}),(e=>{const{colorFillContent:t,colorFill:n}=e;return{color:t,colorGradientEnd:n,gradientFromColor:t,gradientToColor:n,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}}),{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),Gv=t=>{const{prefixCls:n,className:r,rootClassName:i,active:o,shape:a="circle",size:s="default"}=t,{getPrefixCls:l}=e.useContext(Le),c=l("skeleton",n),[u,d,h]=Xv(c),f=Xf(t,["prefixCls","className"]),p=Ji()(c,`${c}-element`,{[`${c}-active`]:o},r,i,d,h);return u(e.createElement("div",{className:p},e.createElement(Lv,Object.assign({prefixCls:`${c}-avatar`,shape:a,size:s},f))))},Yv=t=>{const{prefixCls:n,className:r,rootClassName:i,style:o,active:a}=t,{getPrefixCls:s}=e.useContext(Le),l=s("skeleton",n),[c,u,d]=Xv(l),h=Ji()(l,`${l}-element`,{[`${l}-active`]:a},r,i,u,d);return c(e.createElement("div",{className:h},e.createElement("div",{className:Ji()(`${l}-image`,r),style:o},e.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${l}-image-svg`},e.createElement("title",null,"Image placeholder"),e.createElement("path",{d:"M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z",className:`${l}-image-path`})))))},Qv=t=>{const{prefixCls:n,className:r,rootClassName:i,active:o,block:a,size:s="default"}=t,{getPrefixCls:l}=e.useContext(Le),c=l("skeleton",n),[u,d,h]=Xv(c),f=Xf(t,["prefixCls"]),p=Ji()(c,`${c}-element`,{[`${c}-active`]:o,[`${c}-block`]:a},r,i,d,h);return u(e.createElement("div",{className:p},e.createElement(Lv,Object.assign({prefixCls:`${c}-input`,size:s},f))))},Jv=t=>{const{prefixCls:n,className:r,rootClassName:i,style:o,active:a,children:s}=t,{getPrefixCls:l}=e.useContext(Le),c=l("skeleton",n),[u,d,h]=Xv(c),f=Ji()(c,`${c}-element`,{[`${c}-active`]:a},d,r,i,h);return u(e.createElement("div",{className:f},e.createElement("div",{className:Ji()(`${c}-image`,r),style:o},s)))},Zv=(e,t)=>{const{width:n,rows:r=2}=t;return Array.isArray(n)?n[e]:r-1===e?n:void 0},eb=t=>{const{prefixCls:n,className:r,style:i,rows:o}=t,a=se(new Array(o)).map(((n,r)=>e.createElement("li",{key:r,style:{width:Zv(r,t)}})));return e.createElement("ul",{className:Ji()(n,r),style:i},a)},tb=t=>{let{prefixCls:n,className:r,width:i,style:o}=t;return e.createElement("h3",{className:Ji()(n,r),style:Object.assign({width:i},o)})};function nb(e){return e&&"object"===typeof e?e:{}}const rb=t=>{const{prefixCls:n,loading:r,className:i,rootClassName:o,style:a,children:s,avatar:l=!1,title:c=!0,paragraph:u=!0,active:d,round:h}=t,{getPrefixCls:f,direction:p,skeleton:m}=e.useContext(Le),g=f("skeleton",n),[v,b,y]=Xv(g);if(r||!("loading"in t)){const t=!!l,n=!!c,r=!!u;let s,f;if(t){const t=Object.assign(Object.assign({prefixCls:`${g}-avatar`},function(e,t){return e&&!t?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}(n,r)),nb(l));s=e.createElement("div",{className:`${g}-header`},e.createElement(Lv,Object.assign({},t)))}if(n||r){let i,o;if(n){const n=Object.assign(Object.assign({prefixCls:`${g}-title`},function(e,t){return!e&&t?{width:"38%"}:e&&t?{width:"50%"}:{}}(t,r)),nb(c));i=e.createElement(tb,Object.assign({},n))}if(r){const r=Object.assign(Object.assign({prefixCls:`${g}-paragraph`},function(e,t){const n={};return e&&t||(n.width="61%"),n.rows=!e&&t?3:2,n}(t,n)),nb(u));o=e.createElement(eb,Object.assign({},r))}f=e.createElement("div",{className:`${g}-content`},i,o)}const _=Ji()(g,{[`${g}-with-avatar`]:t,[`${g}-active`]:d,[`${g}-rtl`]:"rtl"===p,[`${g}-round`]:h},null===m||void 0===m?void 0:m.className,i,o,b,y);return v(e.createElement("div",{className:_,style:Object.assign(Object.assign({},null===m||void 0===m?void 0:m.style),a)},s,f))}return null!==s&&void 0!==s?s:null};rb.Button=t=>{const{prefixCls:n,className:r,rootClassName:i,active:o,block:a=!1,size:s="default"}=t,{getPrefixCls:l}=e.useContext(Le),c=l("skeleton",n),[u,d,h]=Xv(c),f=Xf(t,["prefixCls"]),p=Ji()(c,`${c}-element`,{[`${c}-active`]:o,[`${c}-block`]:a},r,i,d,h);return u(e.createElement("div",{className:p},e.createElement(Lv,Object.assign({prefixCls:`${c}-button`,size:s},f))))},rb.Avatar=Gv,rb.Input=Qv,rb.Image=Yv,rb.Node=Jv;const ib=rb;function ob(){}const ab=e.createContext({add:ob,remove:ob});const sb=()=>{const{cancelButtonProps:t,cancelTextLocale:n,onCancel:r}=(0,e.useContext)(fv);return e.createElement(uv,Object.assign({onClick:r},t),n)},lb=()=>{const{confirmLoading:t,okButtonProps:n,okType:r,okTextLocale:i,onOk:o}=(0,e.useContext)(fv);return e.createElement(uv,Object.assign({},sg(r),{loading:t,onClick:o},n),i)};function cb(t,n){return e.createElement("span",{className:`${t}-close-x`},n||e.createElement(kl,{className:`${t}-close-icon`}))}const ub=t=>{const{okText:n,okType:r="primary",cancelText:i,confirmLoading:o,onOk:a,onCancel:s,okButtonProps:l,cancelButtonProps:c,footer:u}=t,[d]=Tp("Modal",wr()),h={confirmLoading:o,okButtonProps:l,cancelButtonProps:c,okTextLocale:n||(null===d||void 0===d?void 0:d.okText),cancelTextLocale:i||(null===d||void 0===d?void 0:d.cancelText),okType:r,onOk:a,onCancel:s},f=e.useMemo((()=>h),se(Object.values(h)));let p;return"function"===typeof u||"undefined"===typeof u?(p=e.createElement(e.Fragment,null,e.createElement(sb,null),e.createElement(lb,null)),"function"===typeof u&&(p=u(p,{OkBtn:lb,CancelBtn:sb})),p=e.createElement(pv,{value:f},p)):p=u,e.createElement(Fi,{disabled:!1},p)},db=new Zn("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),hb=new Zn("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),fb=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{antCls:n}=e,r=`${n}-fade`,i=t?"&":"";return[Oh(r,db,hb,e.motionDurationMid,t),{[`\n ${i}${r}-enter,\n ${i}${r}-appear\n `]:{opacity:0,animationTimingFunction:"linear"},[`${i}${r}-leave`]:{animationTimingFunction:"linear"}}]};function pb(e){return{position:e,inset:0}}const mb=e=>{const{componentCls:t,antCls:n}=e;return[{[`${t}-root`]:{[`${t}${n}-zoom-enter, ${t}${n}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:e.motionDurationSlow,userSelect:"none"},[`${t}${n}-zoom-leave ${t}-content`]:{pointerEvents:"none"},[`${t}-mask`]:Object.assign(Object.assign({},pb("fixed")),{zIndex:e.zIndexPopupBase,height:"100%",backgroundColor:e.colorBgMask,pointerEvents:"none",[`${t}-hidden`]:{display:"none"}}),[`${t}-wrap`]:Object.assign(Object.assign({},pb("fixed")),{zIndex:e.zIndexPopupBase,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})}},{[`${t}-root`]:fb(e)}]},gb=e=>{const{componentCls:t}=e;return[{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl"},[`${t}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[t]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${e.screenSMMax}px)`]:{[t]:{maxWidth:"calc(100vw - 16px)",margin:`${It(e.marginXS)} auto`},[`${t}-centered`]:{[t]:{flex:1}}}}},{[t]:Object.assign(Object.assign({},Ma(e)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${It(e.calc(e.margin).mul(2).equal())})`,margin:"0 auto",paddingBottom:e.paddingLG,[`${t}-title`]:{margin:0,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.titleFontSize,lineHeight:e.titleLineHeight,wordWrap:"break-word"},[`${t}-content`]:{position:"relative",backgroundColor:e.contentBg,backgroundClip:"padding-box",border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadow,pointerEvents:"auto",padding:e.contentPadding},[`${t}-close`]:Object.assign({position:"absolute",top:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),insetInlineEnd:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),zIndex:e.calc(e.zIndexPopupBase).add(10).equal(),padding:0,color:e.modalCloseIconColor,fontWeight:e.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:e.borderRadiusSM,width:e.modalCloseBtnSize,height:e.modalCloseBtnSize,border:0,outline:0,cursor:"pointer",transition:`color ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,"&-x":{display:"flex",fontSize:e.fontSizeLG,fontStyle:"normal",lineHeight:It(e.modalCloseBtnSize),justifyContent:"center",textTransform:"none",textRendering:"auto"},"&:disabled":{pointerEvents:"none"},"&:hover":{color:e.modalCloseIconHoverColor,backgroundColor:e.colorBgTextHover,textDecoration:"none"},"&:active":{backgroundColor:e.colorBgTextActive}},La(e)),[`${t}-header`]:{color:e.colorText,background:e.headerBg,borderRadius:`${It(e.borderRadiusLG)} ${It(e.borderRadiusLG)} 0 0`,marginBottom:e.headerMarginBottom,padding:e.headerPadding,borderBottom:e.headerBorderBottom},[`${t}-body`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,wordWrap:"break-word",padding:e.bodyPadding,[`${t}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",margin:`${It(e.margin)} auto`}},[`${t}-footer`]:{textAlign:"end",background:e.footerBg,marginTop:e.footerMarginTop,padding:e.footerPadding,borderTop:e.footerBorderTop,borderRadius:e.footerBorderRadius,[`> ${e.antCls}-btn + ${e.antCls}-btn`]:{marginInlineStart:e.marginXS}},[`${t}-open`]:{overflow:"hidden"}})},{[`${t}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${t}-content,\n ${t}-body,\n ${t}-confirm-body-wrapper`]:{display:"flex",flexDirection:"column",flex:"auto"},[`${t}-confirm-body`]:{marginBottom:"auto"}}}]},vb=e=>{const{componentCls:t}=e;return{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl",[`${t}-confirm-body`]:{direction:"rtl"}}}}},bb=e=>{const t=e.padding,n=e.fontSizeHeading5,r=e.lineHeightHeading5;return ol(e,{modalHeaderHeight:e.calc(e.calc(r).mul(n).equal()).add(e.calc(t).mul(2).equal()).equal(),modalFooterBorderColorSplit:e.colorSplit,modalFooterBorderStyle:e.lineType,modalFooterBorderWidth:e.lineWidth,modalCloseIconColor:e.colorIcon,modalCloseIconHoverColor:e.colorIconHover,modalCloseBtnSize:e.controlHeight,modalConfirmIconSize:e.fontHeight,modalTitleHeight:e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()})},yb=e=>({footerBg:"transparent",headerBg:e.colorBgElevated,titleLineHeight:e.lineHeightHeading5,titleFontSize:e.fontSizeHeading5,contentBg:e.colorBgElevated,titleColor:e.colorTextHeading,contentPadding:e.wireframe?0:`${It(e.paddingMD)} ${It(e.paddingContentHorizontalLG)}`,headerPadding:e.wireframe?`${It(e.padding)} ${It(e.paddingLG)}`:0,headerBorderBottom:e.wireframe?`${It(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",headerMarginBottom:e.wireframe?0:e.marginXS,bodyPadding:e.wireframe?e.paddingLG:0,footerPadding:e.wireframe?`${It(e.paddingXS)} ${It(e.padding)}`:0,footerBorderTop:e.wireframe?`${It(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",footerBorderRadius:e.wireframe?`0 0 ${It(e.borderRadiusLG)} ${It(e.borderRadiusLG)}`:0,footerMarginTop:e.wireframe?0:e.marginSM,confirmBodyPadding:e.wireframe?`${It(2*e.padding)} ${It(2*e.padding)} ${It(e.paddingLG)}`:0,confirmIconMarginInlineEnd:e.wireframe?e.margin:e.marginSM,confirmBtnsMarginTop:e.wireframe?e.marginLG:e.marginSM}),_b=ml("Modal",(e=>{const t=bb(e);return[gb(t),vb(t),mb(t),Th(t,"zoom")]}),yb,{unitless:{titleLineHeight:!0}});var Sb=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};let wb;const Cb=e=>{wb={x:e.pageX,y:e.pageY},setTimeout((()=>{wb=null}),100)};ze()&&window.document.documentElement&&document.documentElement.addEventListener("click",Cb,!0);const xb=t=>{var n;const{getPopupContainer:r,getPrefixCls:i,direction:o,modal:a}=e.useContext(Le),s=e=>{const{onCancel:n}=t;null===n||void 0===n||n(e)};const{prefixCls:l,className:c,rootClassName:u,open:d,wrapClassName:h,centered:f,getContainer:p,focusTriggerAfterClose:m=!0,style:g,visible:v,width:b=520,footer:y,classNames:_,styles:S,children:w,loading:C}=t,x=Sb(t,["prefixCls","className","rootClassName","open","wrapClassName","centered","getContainer","focusTriggerAfterClose","style","visible","width","footer","classNames","styles","children","loading"]),E=i("modal",l),k=i(),O=Hs(E),[$,R,I]=_b(E,O),M=Ji()(h,{[`${E}-centered`]:!!f,[`${E}-wrap-rtl`]:"rtl"===o}),P=null===y||C?null:e.createElement(ub,Object.assign({},t,{onOk:e=>{const{onOk:n}=t;null===n||void 0===n||n(e)},onCancel:s})),[N,L,T]=function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Nv;const i=Mv(t),o=Mv(n),a="boolean"!==typeof i&&!!(null===i||void 0===i?void 0:i.disabled),s=e.useMemo((()=>Object.assign({closeIcon:e.createElement(kl,null)},r)),[r]),l=e.useMemo((()=>!1!==i&&(i?Pv(s,o,i):!1!==o&&(o?Pv(s,o):!!s.closable&&s))),[i,o,s]);return e.useMemo((()=>{if(!1===l)return[!1,null,a];const{closeIconRender:t}=s,{closeIcon:n}=l;let r=n;if(null!==r&&void 0!==r){t&&(r=t(n));const i=Rs(l,!0);Object.keys(i).length&&(r=e.isValidElement(r)?e.cloneElement(r,i):e.createElement("span",Object.assign({},i),r))}return[!0,r,a]}),[l,s])}(Iv(t),Iv(a),{closable:!0,closeIcon:e.createElement(kl,{className:`${E}-close-icon`}),closeIconRender:e=>cb(E,e)}),D=function(t){const n=e.useContext(ab),r=e.useRef();return _o((e=>{if(e){const i=t?e.querySelector(t):e;n.add(i),r.current=i}else n.remove(r.current)}))}(`.${E}-content`),[A,B]=qs("Modal",x.zIndex);return $(e.createElement(ch,{form:!0,space:!0},e.createElement(Fs.Provider,{value:B},e.createElement(Rv,Object.assign({width:b},x,{zIndex:A,getContainer:void 0===p?r:p,prefixCls:E,rootClassName:Ji()(R,u,I,O),footer:P,visible:null!==d&&void 0!==d?d:v,mousePosition:null!==(n=x.mousePosition)&&void 0!==n?n:wb,onClose:s,closable:N?{disabled:T,closeIcon:L}:N,closeIcon:L,focusTriggerAfterClose:m,transitionName:ph(k,"zoom",t.transitionName),maskTransitionName:ph(k,"fade",t.maskTransitionName),className:Ji()(R,c,null===a||void 0===a?void 0:a.className),style:Object.assign(Object.assign({},null===a||void 0===a?void 0:a.style),g),classNames:Object.assign(Object.assign(Object.assign({},null===a||void 0===a?void 0:a.classNames),_),{wrapper:Ji()(M,null===_||void 0===_?void 0:_.wrapper)}),styles:Object.assign(Object.assign({},null===a||void 0===a?void 0:a.styles),S),panelRef:D}),C?e.createElement(ib,{active:!0,title:!1,paragraph:{rows:4},className:`${E}-body-skeleton`}):w))))},Eb=e=>{const{componentCls:t,titleFontSize:n,titleLineHeight:r,modalConfirmIconSize:i,fontSize:o,lineHeight:a,modalTitleHeight:s,fontHeight:l,confirmBodyPadding:c}=e,u=`${t}-confirm`;return{[u]:{"&-rtl":{direction:"rtl"},[`${e.antCls}-modal-header`]:{display:"none"},[`${u}-body-wrapper`]:Object.assign({},{"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),[`&${t} ${t}-body`]:{padding:c},[`${u}-body`]:{display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${e.iconCls}`]:{flex:"none",fontSize:i,marginInlineEnd:e.confirmIconMarginInlineEnd,marginTop:e.calc(e.calc(l).sub(i).equal()).div(2).equal()},[`&-has-title > ${e.iconCls}`]:{marginTop:e.calc(e.calc(s).sub(i).equal()).div(2).equal()}},[`${u}-paragraph`]:{display:"flex",flexDirection:"column",flex:"auto",rowGap:e.marginXS},[`${e.iconCls} + ${u}-paragraph`]:{maxWidth:`calc(100% - ${It(e.calc(e.modalConfirmIconSize).add(e.marginSM).equal())})`},[`${u}-title`]:{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:n,lineHeight:r},[`${u}-content`]:{color:e.colorText,fontSize:o,lineHeight:a},[`${u}-btns`]:{textAlign:"end",marginTop:e.confirmBtnsMarginTop,[`${e.antCls}-btn + ${e.antCls}-btn`]:{marginBottom:0,marginInlineStart:e.marginXS}}},[`${u}-error ${u}-body > ${e.iconCls}`]:{color:e.colorError},[`${u}-warning ${u}-body > ${e.iconCls},\n ${u}-confirm ${u}-body > ${e.iconCls}`]:{color:e.colorWarning},[`${u}-info ${u}-body > ${e.iconCls}`]:{color:e.colorInfo},[`${u}-success ${u}-body > ${e.iconCls}`]:{color:e.colorSuccess}}},kb=vl(["Modal","confirm"],(e=>{const t=bb(e);return[Eb(t)]}),yb,{order:-1e3});var Ob=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function $b(t){const{prefixCls:n,icon:r,okText:i,cancelText:o,confirmPrefixCls:a,type:s,okCancel:l,footer:c,locale:u}=t,d=Ob(t,["prefixCls","icon","okText","cancelText","confirmPrefixCls","type","okCancel","footer","locale"]);let h=r;if(!r&&null!==r)switch(s){case"info":h=e.createElement(Ss,null);break;case"success":h=e.createElement(hs,null);break;case"error":h=e.createElement(ms,null);break;default:h=e.createElement(bs,null)}const f=null!==l&&void 0!==l?l:"confirm"===s,p=null!==t.autoFocusButton&&(t.autoFocusButton||"ok"),[m]=Tp("Modal"),g=u||m,v=i||(f?null===g||void 0===g?void 0:g.okText:null===g||void 0===g?void 0:g.justOkText),b=o||(null===g||void 0===g?void 0:g.cancelText),y=Object.assign({autoFocusButton:p,cancelTextLocale:b,okTextLocale:v,mergedOkCancel:f},d),_=e.useMemo((()=>y),se(Object.values(y))),S=e.createElement(e.Fragment,null,e.createElement(mv,null),e.createElement(gv,null)),w=void 0!==t.title&&null!==t.title,C=`${a}-body`;return e.createElement("div",{className:`${a}-body-wrapper`},e.createElement("div",{className:Ji()(C,{[`${C}-has-title`]:w})},h,e.createElement("div",{className:`${a}-paragraph`},w&&e.createElement("span",{className:`${a}-title`},t.title),e.createElement("div",{className:`${a}-content`},t.content))),void 0===c||"function"===typeof c?e.createElement(pv,{value:_},e.createElement("div",{className:`${a}-btns`},"function"===typeof c?c(S,{OkBtn:gv,CancelBtn:mv}):S)):c,e.createElement(kb,{prefixCls:n}))}const Rb=t=>{const{close:n,zIndex:r,afterClose:i,open:o,keyboard:a,centered:s,getContainer:l,maskStyle:c,direction:u,prefixCls:d,wrapClassName:h,rootPrefixCls:f,bodyStyle:p,closable:m=!1,closeIcon:g,modalRender:v,focusTriggerAfterClose:b,onConfirm:y,styles:_}=t;const S=`${d}-confirm`,w=t.width||416,C=t.style||{},x=void 0===t.mask||t.mask,E=void 0!==t.maskClosable&&t.maskClosable,k=Ji()(S,`${S}-${t.type}`,{[`${S}-rtl`]:"rtl"===u},t.className),[,O]=Oa(),$=e.useMemo((()=>void 0!==r?r:O.zIndexPopupBase+Ks),[r,O]);return e.createElement(xb,{prefixCls:d,className:k,wrapClassName:Ji()({[`${S}-centered`]:!!t.centered},h),onCancel:()=>{null===n||void 0===n||n({triggerCancel:!0}),null===y||void 0===y||y(!1)},open:o,title:"",footer:null,transitionName:ph(f||"","zoom",t.transitionName),maskTransitionName:ph(f||"","fade",t.maskTransitionName),mask:x,maskClosable:E,style:C,styles:Object.assign({body:p,mask:c},_),width:w,zIndex:$,afterClose:i,keyboard:a,centered:s,getContainer:l,closable:m,closeIcon:g,modalRender:v,focusTriggerAfterClose:b},e.createElement($b,Object.assign({},t,{confirmPrefixCls:S})))};const Ib=t=>{const{rootPrefixCls:n,iconPrefixCls:r,direction:i,theme:o}=t;return e.createElement(Xa,{prefixCls:n,iconPrefixCls:r,direction:i,theme:o},e.createElement(Rb,Object.assign({},t)))},Mb=[];let Pb="";function Nb(){return Pb}const Lb=t=>{var n,r;const{prefixCls:i,getContainer:o,direction:a}=t,s=wr(),l=(0,e.useContext)(Le),c=Nb()||l.getPrefixCls(),u=i||`${c}-modal`;let d=o;return!1===d&&(d=void 0),e.createElement(Ib,Object.assign({},t,{rootPrefixCls:c,prefixCls:u,iconPrefixCls:l.iconPrefixCls,theme:l.theme,direction:null!==a&&void 0!==a?a:l.direction,locale:null!==(r=null===(n=l.locale)||void 0===n?void 0:n.Modal)&&void 0!==r?r:s,getContainer:d}))};function Tb(t){const n=Va();const r=document.createDocumentFragment();let i,o=Object.assign(Object.assign({},t),{close:l,open:!0});function a(){for(var e,n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];var a;i.some((e=>null===e||void 0===e?void 0:e.triggerCancel))&&(null===(e=t.onCancel)||void 0===e||(a=e).call.apply(a,[t,()=>{}].concat(se(i.slice(1)))));for(let t=0;t<Mb.length;t++){if(Mb[t]===l){Mb.splice(t,1);break}}$e(r)}function s(t){clearTimeout(i),i=setTimeout((()=>{const i=n.getPrefixCls(void 0,Nb()),o=n.getIconPrefixCls(),a=n.getTheme(),s=e.createElement(Lb,Object.assign({},t));xe(e.createElement(Xa,{prefixCls:i,iconPrefixCls:o,theme:a},n.holderRender?n.holderRender(s):s),r)}))}function l(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];o=Object.assign(Object.assign({},o),{open:!1,afterClose:()=>{"function"===typeof t.afterClose&&t.afterClose(),a.apply(this,n)}}),o.visible&&delete o.visible,s(o)}return s(o),Mb.push(l),{destroy:l,update:function(e){o="function"===typeof e?e(o):Object.assign(Object.assign({},o),e),s(o)}}}function Db(e){return Object.assign(Object.assign({},e),{type:"warning"})}function Ab(e){return Object.assign(Object.assign({},e),{type:"info"})}function Bb(e){return Object.assign(Object.assign({},e),{type:"success"})}function jb(e){return Object.assign(Object.assign({},e),{type:"error"})}function zb(e){return Object.assign(Object.assign({},e),{type:"confirm"})}var Hb=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const Fb=Mp((t=>{const{prefixCls:n,className:r,closeIcon:i,closable:o,type:a,title:s,children:l,footer:c}=t,u=Hb(t,["prefixCls","className","closeIcon","closable","type","title","children","footer"]),{getPrefixCls:d}=e.useContext(Le),h=d(),f=n||d("modal"),p=Hs(h),[m,g,v]=_b(f,p),b=`${f}-confirm`;let y={};return y=a?{closable:null!==o&&void 0!==o&&o,title:"",footer:"",children:e.createElement($b,Object.assign({},t,{prefixCls:f,confirmPrefixCls:b,rootPrefixCls:h,content:l}))}:{closable:null===o||void 0===o||o,title:s,footer:null!==c&&e.createElement(ub,Object.assign({},t)),children:l},m(e.createElement(Cv,Object.assign({prefixCls:f,className:Ji()(g,`${f}-pure-panel`,a&&b,a&&`${b}-${a}`,r,v,p)},u,{closeIcon:cb(f,i),closable:o},y)))}));var Wb=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const Kb=(t,n)=>{var r,{afterClose:i,config:o}=t,a=Wb(t,["afterClose","config"]);const[s,l]=e.useState(!0),[c,u]=e.useState(o),{direction:d,getPrefixCls:h}=e.useContext(Le),f=h("modal"),p=h(),m=function(){var e;l(!1);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i;n.some((e=>null===e||void 0===e?void 0:e.triggerCancel))&&(null===(e=c.onCancel)||void 0===e||(i=e).call.apply(i,[c,()=>{}].concat(se(n.slice(1)))))};e.useImperativeHandle(n,(()=>({destroy:m,update:e=>{u((t=>Object.assign(Object.assign({},t),e)))}})));const g=null!==(r=c.okCancel)&&void 0!==r?r:"confirm"===c.type,[v]=Tp("Modal",br.Modal);return e.createElement(Ib,Object.assign({prefixCls:f,rootPrefixCls:p},c,{close:m,open:s,afterClose:()=>{var e;i(),null===(e=c.afterClose)||void 0===e||e.call(c)},okText:c.okText||(g?null===v||void 0===v?void 0:v.okText:null===v||void 0===v?void 0:v.justOkText),direction:c.direction||d,cancelText:c.cancelText||(null===v||void 0===v?void 0:v.cancelText)},a))},Vb=e.forwardRef(Kb);let Ub=0;const qb=e.memo(e.forwardRef(((t,n)=>{const[r,i]=function(){const[t,n]=e.useState([]);return[t,e.useCallback((e=>(n((t=>[].concat(se(t),[e]))),()=>{n((t=>t.filter((t=>t!==e))))})),[])]}();return e.useImperativeHandle(n,(()=>({patchElement:i})),[]),e.createElement(e.Fragment,null,r)})));const Xb=function(){const t=e.useRef(null),[n,r]=e.useState([]);e.useEffect((()=>{if(n.length){se(n).forEach((e=>{e()})),r([])}}),[n]);const i=e.useCallback((n=>function(i){var o;Ub+=1;const a=e.createRef();let s;const l=new Promise((e=>{s=e}));let c,u=!1;const d=e.createElement(Vb,{key:`modal-${Ub}`,config:n(i),ref:a,afterClose:()=>{null===c||void 0===c||c()},isSilent:()=>u,onConfirm:e=>{s(e)}});c=null===(o=t.current)||void 0===o?void 0:o.patchElement(d),c&&Mb.push(c);const h={destroy:()=>{function e(){var e;null===(e=a.current)||void 0===e||e.destroy()}a.current?e():r((t=>[].concat(se(t),[e])))},update:e=>{function t(){var t;null===(t=a.current)||void 0===t||t.update(e)}a.current?t():r((e=>[].concat(se(e),[t])))},then:e=>(u=!0,l.then(e))};return h}),[]);return[e.useMemo((()=>({info:i(Ab),success:i(Bb),error:i(jb),warning:i(Db),confirm:i(zb)})),[]),e.createElement(qb,{key:"modal-holder",ref:t})]};function Gb(e){return Tb(Db(e))}const Yb=xb;Yb.useModal=Xb,Yb.info=function(e){return Tb(Ab(e))},Yb.success=function(e){return Tb(Bb(e))},Yb.error=function(e){return Tb(jb(e))},Yb.warning=Gb,Yb.warn=Gb,Yb.confirm=function(e){return Tb(zb(e))},Yb.destroyAll=function(){for(;Mb.length;){const e=Mb.pop();e&&e()}},Yb.config=function(e){let{rootPrefixCls:t}=e;Pb=t},Yb._InternalPanelDoNotUseOrYouWillBeFired=Fb;const Qb=Yb;const Jb={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};var Zb=function(t,n){return e.createElement(us,Gt({},t,{ref:n,icon:Jb}))};const ey=e.forwardRef(Zb);var ty=ks.ESC,ny=ks.TAB;const ry=(0,e.forwardRef)((function(t,n){var r=t.overlay,i=t.arrow,o=t.prefixCls,a=(0,e.useMemo)((function(){return"function"===typeof r?r():r}),[r]),s=io(n,null===a||void 0===a?void 0:a.ref);return e.createElement(e.Fragment,null,i&&e.createElement("div",{className:"".concat(o,"-arrow")}),e.cloneElement(a,{ref:ao(a)?s:void 0}))}));var iy={adjustX:1,adjustY:1},oy=[0,0];const ay={topLeft:{points:["bl","tl"],overflow:iy,offset:[0,-4],targetOffset:oy},top:{points:["bc","tc"],overflow:iy,offset:[0,-4],targetOffset:oy},topRight:{points:["br","tr"],overflow:iy,offset:[0,-4],targetOffset:oy},bottomLeft:{points:["tl","bl"],overflow:iy,offset:[0,4],targetOffset:oy},bottom:{points:["tc","bc"],overflow:iy,offset:[0,4],targetOffset:oy},bottomRight:{points:["tr","br"],overflow:iy,offset:[0,4],targetOffset:oy}};var sy=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function ly(t,n){var r,i=t.arrow,o=void 0!==i&&i,a=t.prefixCls,s=void 0===a?"rc-dropdown":a,l=t.transitionName,c=t.animation,u=t.align,d=t.placement,h=void 0===d?"bottomLeft":d,f=t.placements,p=void 0===f?ay:f,m=t.getPopupContainer,g=t.showAction,v=t.hideAction,b=t.overlayClassName,y=t.overlayStyle,_=t.visible,S=t.trigger,w=void 0===S?["hover"]:S,C=t.autoFocus,x=t.overlay,E=t.children,k=t.onVisibleChange,O=lo(t,sy),$=Be(e.useState(),2),R=$[0],I=$[1],M="visible"in t?_:R,P=e.useRef(null),N=e.useRef(null),L=e.useRef(null);e.useImperativeHandle(n,(function(){return P.current}));var T=function(e){I(e),null===k||void 0===k||k(e)};!function(t){var n=t.visible,r=t.triggerRef,i=t.onVisibleChange,o=t.autoFocus,a=t.overlayRef,s=e.useRef(!1),l=function(){var e,t;n&&(null===(e=r.current)||void 0===e||null===(t=e.focus)||void 0===t||t.call(e),null===i||void 0===i||i(!1))},c=function(){var e;return!(null===(e=a.current)||void 0===e||!e.focus)&&(a.current.focus(),s.current=!0,!0)},u=function(e){switch(e.keyCode){case ty:l();break;case ny:var t=!1;s.current||(t=c()),t?e.preventDefault():l()}};e.useEffect((function(){return n?(window.addEventListener("keydown",u),o&&Zo(c,3),function(){window.removeEventListener("keydown",u),s.current=!1}):function(){s.current=!1}}),[n])}({visible:M,triggerRef:L,onVisibleChange:T,autoFocus:C,overlayRef:N});var D=function(){return e.createElement(ry,{ref:N,overlay:x,prefixCls:s,arrow:o})},A=e.cloneElement(E,{className:Ji()(null===(r=E.props)||void 0===r?void 0:r.className,M&&function(){var e=t.openClassName;return void 0!==e?e:"".concat(s,"-open")}()),ref:ao(E)?io(L,E.ref):void 0}),B=v;return B||-1===w.indexOf("contextMenu")||(B=["click"]),e.createElement(Mu,Gt({builtinPlacements:p},O,{prefixCls:s,ref:P,popupClassName:Ji()(b,fe({},"".concat(s,"-show-arrow"),o)),popupStyle:y,action:w,showAction:g,hideAction:B,popupPlacement:h,popupAlign:u,popupTransitionName:l,popupAnimation:c,popupVisible:M,stretch:function(){var e=t.minOverlayWidthMatchTrigger,n=t.alignPoint;return"minOverlayWidthMatchTrigger"in t?e:!n}()?"minWidth":"",popup:"function"===typeof x?D:D(),onPopupVisibleChange:T,onPopupClick:function(e){var n=t.onOverlayClick;I(!1),n&&n(e)},getPopupContainer:m}),A)}const cy=e.forwardRef(ly);var uy=e.createContext(null);function dy(e,t){return void 0===e?null:"".concat(e,"-").concat(t)}function hy(t){return dy(e.useContext(uy),t)}var fy=["children","locked"],py=e.createContext(null);function my(t){var n=t.children,r=t.locked,i=lo(t,fy),o=e.useContext(py),a=Je((function(){return function(e,t){var n=me({},e);return Object.keys(t).forEach((function(e){var r=t[e];void 0!==r&&(n[e]=r)})),n}(o,i)}),[o,i],(function(e,t){return!r&&(e[0]!==t[0]||!at(e[1],t[1],!0))}));return e.createElement(py.Provider,{value:a},n)}var gy=[],vy=e.createContext(null);function by(){return e.useContext(vy)}var yy=e.createContext(gy);function _y(t){var n=e.useContext(yy);return e.useMemo((function(){return void 0!==t?[].concat(se(n),[t]):n}),[n,t])}var Sy=e.createContext(null);const wy=e.createContext({});function Cy(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(Xl(e)){var n=e.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(n)||e.isContentEditable||"a"===n&&!!e.getAttribute("href"),i=e.getAttribute("tabindex"),o=Number(i),a=null;return i&&!Number.isNaN(o)?a=o:r&&null===a&&(a=0),r&&e.disabled&&(a=null),null!==a&&(a>=0||t&&a<0)}return!1}function xy(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=se(e.querySelectorAll("*")).filter((function(e){return Cy(e,t)}));return Cy(e,t)&&n.unshift(e),n}var Ey=ks.LEFT,ky=ks.RIGHT,Oy=ks.UP,$y=ks.DOWN,Ry=ks.ENTER,Iy=ks.ESC,My=ks.HOME,Py=ks.END,Ny=[Oy,$y,Ey,ky];function Ly(e,t){return xy(e,!0).filter((function(e){return t.has(e)}))}function Ty(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(!e)return null;var i=Ly(e,t),o=i.length,a=i.findIndex((function(e){return n===e}));return r<0?-1===a?a=o-1:a-=1:r>0&&(a+=1),i[a=(a+o)%o]}var Dy=function(e,t){var n=new Set,r=new Map,i=new Map;return e.forEach((function(e){var o=document.querySelector("[data-menu-id='".concat(dy(t,e),"']"));o&&(n.add(o),i.set(o,e),r.set(e,o))})),{elements:n,key2element:r,element2key:i}};function Ay(t,n,r,i,o,a,s,l,c,u){var d=e.useRef(),h=e.useRef();h.current=n;var f=function(){Zo.cancel(d.current)};return e.useEffect((function(){return function(){f()}}),[]),function(e){var p=e.which;if([].concat(Ny,[Ry,Iy,My,Py]).includes(p)){var m=a(),g=Dy(m,i),v=g,b=v.elements,y=v.key2element,_=v.element2key,S=function(e,t){for(var n=e||document.activeElement;n;){if(t.has(n))return n;n=n.parentElement}return null}(y.get(n),b),w=_.get(S),C=function(e,t,n,r){var i,o="prev",a="next",s="children",l="parent";if("inline"===e&&r===Ry)return{inlineTrigger:!0};var c=fe(fe({},Oy,o),$y,a),u=fe(fe(fe(fe({},Ey,n?a:o),ky,n?o:a),$y,s),Ry,s),d=fe(fe(fe(fe(fe(fe({},Oy,o),$y,a),Ry,s),Iy,l),Ey,n?s:l),ky,n?l:s);switch(null===(i={inline:c,horizontal:u,vertical:d,inlineSub:c,horizontalSub:d,verticalSub:d}["".concat(e).concat(t?"":"Sub")])||void 0===i?void 0:i[r]){case o:return{offset:-1,sibling:!0};case a:return{offset:1,sibling:!0};case l:return{offset:-1,sibling:!1};case s:return{offset:1,sibling:!1};default:return null}}(t,1===s(w,!0).length,r,p);if(!C&&p!==My&&p!==Py)return;(Ny.includes(p)||[My,Py].includes(p))&&e.preventDefault();var x=function(e){if(e){var t=e,n=e.querySelector("a");null!==n&&void 0!==n&&n.getAttribute("href")&&(t=n);var r=_.get(e);l(r),f(),d.current=Zo((function(){h.current===r&&t.focus()}))}};if([My,Py].includes(p)||C.sibling||!S){var E,k,O=Ly(E=S&&"inline"!==t?function(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}(S):o.current,b);k=p===My?O[0]:p===Py?O[O.length-1]:Ty(E,b,S,C.offset),x(k)}else if(C.inlineTrigger)c(w);else if(C.offset>0)c(w,!0),f(),d.current=Zo((function(){g=Dy(m,i);var e=S.getAttribute("aria-controls"),t=Ty(document.getElementById(e),g.elements);x(t)}),5);else if(C.offset<0){var $=s(w,!0),R=$[$.length-2],I=y.get(R);c(R,!1),x(I)}}null===u||void 0===u||u(e)}}var By="__RC_UTIL_PATH_SPLIT__",jy=function(e){return e.join(By)},zy="rc-menu-more";function Hy(){var t=Be(e.useState({}),2)[1],n=(0,e.useRef)(new Map),r=(0,e.useRef)(new Map),i=Be(e.useState([]),2),o=i[0],a=i[1],s=(0,e.useRef)(0),l=(0,e.useRef)(!1),c=(0,e.useCallback)((function(e,i){var o=jy(i);r.current.set(o,e),n.current.set(e,o),s.current+=1;var a,c=s.current;a=function(){c===s.current&&(l.current||t({}))},Promise.resolve().then(a)}),[]),u=(0,e.useCallback)((function(e,t){var i=jy(t);r.current.delete(i),n.current.delete(e)}),[]),d=(0,e.useCallback)((function(e){a(e)}),[]),h=(0,e.useCallback)((function(e,t){var r=n.current.get(e)||"",i=r.split(By);return t&&o.includes(i[0])&&i.unshift(zy),i}),[o]),f=(0,e.useCallback)((function(e,t){return e.filter((function(e){return void 0!==e})).some((function(e){return h(e,!0).includes(t)}))}),[h]),p=(0,e.useCallback)((function(e){var t="".concat(n.current.get(e)).concat(By),i=new Set;return se(r.current.keys()).forEach((function(e){e.startsWith(t)&&i.add(r.current.get(e))})),i}),[]);return e.useEffect((function(){return function(){l.current=!0}}),[]),{registerPath:c,unregisterPath:u,refreshOverflowKeys:d,isSubPathKey:f,getKeyPath:h,getKeys:function(){var e=se(n.current.keys());return o.length&&e.push(zy),e},getSubPathKeys:p}}function Fy(t){var n=e.useRef(t);n.current=t;var r=e.useCallback((function(){for(var e,t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return null===(e=n.current)||void 0===e?void 0:e.call.apply(e,[n].concat(r))}),[]);return t?r:void 0}var Wy=Math.random().toFixed(5).toString().slice(2),Ky=0;function Vy(t,n,r,i){var o=e.useContext(py),a=o.activeKey,s=o.onActive,l=o.onInactive,c={active:a===t};return n||(c.onMouseEnter=function(e){null===r||void 0===r||r({key:t,domEvent:e}),s(t)},c.onMouseLeave=function(e){null===i||void 0===i||i({key:t,domEvent:e}),l(t)}),c}function Uy(t){var n=e.useContext(py),r=n.mode,i=n.rtl,o=n.inlineIndent;if("inline"!==r)return null;return i?{paddingRight:t*o}:{paddingLeft:t*o}}function qy(t){var n,r=t.icon,i=t.props,o=t.children;return null===r||!1===r?null:("function"===typeof r?n=e.createElement(r,me({},i)):"boolean"!==typeof r&&(n=r),n||o||null)}var Xy=["item"];function Gy(e){var t=e.item,n=lo(e,Xy);return Object.defineProperty(n,"item",{get:function(){return ot(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),t}}),n}var Yy=["title","attribute","elementRef"],Qy=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],Jy=["active"],Zy=function(t){po(r,t);var n=bo(r);function r(){return st(this,r),n.apply(this,arguments)}return ct(r,[{key:"render",value:function(){var t=this.props,n=t.title,r=t.attribute,i=t.elementRef,o=Xf(lo(t,Yy),["eventKey","popupClassName","popupOffset","onTitleClick"]);return ot(!r,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),e.createElement(vf.Item,Gt({},r,{title:"string"===typeof n?n:void 0},o,{ref:i}))}}]),r}(e.Component),e_=e.forwardRef((function(t,n){var r=t.style,i=t.className,o=t.eventKey,a=(t.warnKey,t.disabled),s=t.itemIcon,l=t.children,c=t.role,u=t.onMouseEnter,d=t.onMouseLeave,h=t.onClick,f=t.onKeyDown,p=t.onFocus,m=lo(t,Qy),g=hy(o),v=e.useContext(py),b=v.prefixCls,y=v.onItemClick,_=v.disabled,S=v.overflowDisabled,w=v.itemIcon,C=v.selectedKeys,x=v.onActive,E=e.useContext(wy)._internalRenderMenuItem,k="".concat(b,"-item"),O=e.useRef(),$=e.useRef(),R=_||a,I=oo(n,$),M=_y(o);var P=function(e){return{key:o,keyPath:se(M).reverse(),item:O.current,domEvent:e}},N=s||w,L=Vy(o,R,u,d),T=L.active,D=lo(L,Jy),A=C.includes(o),B=Uy(M.length),j={};"option"===t.role&&(j["aria-selected"]=A);var z=e.createElement(Zy,Gt({ref:O,elementRef:I,role:null===c?"none":c||"menuitem",tabIndex:a?null:-1,"data-menu-id":S&&g?null:g},Xf(m,["extra"]),D,j,{component:"li","aria-disabled":a,style:me(me({},B),r),className:Ji()(k,fe(fe(fe({},"".concat(k,"-active"),T),"".concat(k,"-selected"),A),"".concat(k,"-disabled"),R),i),onClick:function(e){if(!R){var t=P(e);null===h||void 0===h||h(Gy(t)),y(t)}},onKeyDown:function(e){if(null===f||void 0===f||f(e),e.which===ks.ENTER){var t=P(e);null===h||void 0===h||h(Gy(t)),y(t)}},onFocus:function(e){x(o),null===p||void 0===p||p(e)}}),l,e.createElement(qy,{props:me(me({},t),{},{isSelected:A}),icon:N}));return E&&(z=E(z,t,{selected:A})),z}));function t_(t,n){var r=t.eventKey,i=by(),o=_y(r);return e.useEffect((function(){if(i)return i.registerPath(r,o),function(){i.unregisterPath(r,o)}}),[o]),i?null:e.createElement(e_,Gt({},t,{ref:n}))}const n_=e.forwardRef(t_);var r_=["className","children"],i_=function(t,n){var r=t.className,i=t.children,o=lo(t,r_),a=e.useContext(py),s=a.prefixCls,l=a.mode,c=a.rtl;return e.createElement("ul",Gt({className:Ji()(s,c&&"".concat(s,"-rtl"),"".concat(s,"-sub"),"".concat(s,"-").concat("inline"===l?"inline":"vertical"),r),role:"menu"},o,{"data-menu-list":!0,ref:n}),i)},o_=e.forwardRef(i_);o_.displayName="SubMenuList";const a_=o_;function s_(t,n){return Rc(t).map((function(t,r){if(e.isValidElement(t)){var i,o,a=t.key,s=null!==(i=null===(o=t.props)||void 0===o?void 0:o.eventKey)&&void 0!==i?i:a;(null===s||void 0===s)&&(s="tmp_key-".concat([].concat(se(n),[r]).join("-")));var l={key:s,eventKey:s};return e.cloneElement(t,l)}return t}))}var l_={adjustX:1,adjustY:1},c_={topLeft:{points:["bl","tl"],overflow:l_},topRight:{points:["br","tr"],overflow:l_},bottomLeft:{points:["tl","bl"],overflow:l_},bottomRight:{points:["tr","br"],overflow:l_},leftTop:{points:["tr","tl"],overflow:l_},leftBottom:{points:["br","bl"],overflow:l_},rightTop:{points:["tl","tr"],overflow:l_},rightBottom:{points:["bl","br"],overflow:l_}},u_={topLeft:{points:["bl","tl"],overflow:l_},topRight:{points:["br","tr"],overflow:l_},bottomLeft:{points:["tl","bl"],overflow:l_},bottomRight:{points:["tr","br"],overflow:l_},rightTop:{points:["tr","tl"],overflow:l_},rightBottom:{points:["br","bl"],overflow:l_},leftTop:{points:["tl","tr"],overflow:l_},leftBottom:{points:["bl","br"],overflow:l_}};function d_(e,t,n){return t||(n?n[e]||n.other:void 0)}var h_={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function f_(t){var n=t.prefixCls,r=t.visible,i=t.children,o=t.popup,a=t.popupStyle,s=t.popupClassName,l=t.popupOffset,c=t.disabled,u=t.mode,d=t.onVisibleChange,h=e.useContext(py),f=h.getPopupContainer,p=h.rtl,m=h.subMenuOpenDelay,g=h.subMenuCloseDelay,v=h.builtinPlacements,b=h.triggerSubMenuAction,y=h.forceSubMenuRender,_=h.rootClassName,S=h.motion,w=h.defaultMotions,C=Be(e.useState(!1),2),x=C[0],E=C[1],k=me(me({},p?u_:c_),v),O=h_[u],$=d_(u,S,w),R=e.useRef($);"inline"!==u&&(R.current=$);var I=me(me({},R.current),{},{leavedClassName:"".concat(n,"-hidden"),removeOnLeave:!1,motionAppear:!0}),M=e.useRef();return e.useEffect((function(){return M.current=Zo((function(){E(r)})),function(){Zo.cancel(M.current)}}),[r]),e.createElement(Mu,{prefixCls:n,popupClassName:Ji()("".concat(n,"-popup"),fe({},"".concat(n,"-rtl"),p),s,_),stretch:"horizontal"===u?"minWidth":null,getPopupContainer:f,builtinPlacements:k,popupPlacement:O,popupVisible:x,popup:o,popupStyle:a,popupAlign:l&&{offset:l},action:c?[]:[b],mouseEnterDelay:m,mouseLeaveDelay:g,onPopupVisibleChange:d,forceRender:y,popupMotion:I,fresh:!0},i)}function p_(t){var n=t.id,r=t.open,i=t.keyPath,o=t.children,a="inline",s=e.useContext(py),l=s.prefixCls,c=s.forceSubMenuRender,u=s.motion,d=s.defaultMotions,h=s.mode,f=e.useRef(!1);f.current=h===a;var p=Be(e.useState(!f.current),2),m=p[0],g=p[1],v=!!f.current&&r;e.useEffect((function(){f.current&&g(!1)}),[h]);var b=me({},d_(a,u,d));i.length>1&&(b.motionAppear=!1);var y=b.onVisibleChanged;return b.onVisibleChanged=function(e){return f.current||e||g(!0),null===y||void 0===y?void 0:y(e)},m?null:e.createElement(my,{mode:a,locked:!f.current},e.createElement(va,Gt({visible:v},b,{forceRender:c,removeOnLeave:!1,leavedClassName:"".concat(l,"-hidden")}),(function(t){var r=t.className,i=t.style;return e.createElement(a_,{id:n,className:r,style:i},o)})))}var m_=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],g_=["active"],v_=e.forwardRef((function(t,n){var r=t.style,i=t.className,o=t.title,a=t.eventKey,s=(t.warnKey,t.disabled),l=t.internalPopupClose,c=t.children,u=t.itemIcon,d=t.expandIcon,h=t.popupClassName,f=t.popupOffset,p=t.popupStyle,m=t.onClick,g=t.onMouseEnter,v=t.onMouseLeave,b=t.onTitleClick,y=t.onTitleMouseEnter,_=t.onTitleMouseLeave,S=lo(t,m_),w=hy(a),C=e.useContext(py),x=C.prefixCls,E=C.mode,k=C.openKeys,O=C.disabled,$=C.overflowDisabled,R=C.activeKey,I=C.selectedKeys,M=C.itemIcon,P=C.expandIcon,N=C.onItemClick,L=C.onOpenChange,T=C.onActive,D=e.useContext(wy)._internalRenderSubMenuItem,A=e.useContext(Sy).isSubPathKey,B=_y(),j="".concat(x,"-submenu"),z=O||s,H=e.useRef(),F=e.useRef();var W=null!==u&&void 0!==u?u:M,K=null!==d&&void 0!==d?d:P,V=k.includes(a),U=!$&&V,q=A(I,a),X=Vy(a,z,y,_),G=X.active,Y=lo(X,g_),Q=Be(e.useState(!1),2),J=Q[0],Z=Q[1],ee=function(e){z||Z(e)},te=e.useMemo((function(){return G||"inline"!==E&&(J||A([R],a))}),[E,G,R,J,a,A]),ne=Uy(B.length),re=Fy((function(e){null===m||void 0===m||m(Gy(e)),N(e)})),ie=w&&"".concat(w,"-popup"),oe=e.createElement("div",Gt({role:"menuitem",style:ne,className:"".concat(j,"-title"),tabIndex:z?null:-1,ref:H,title:"string"===typeof o?o:null,"data-menu-id":$&&w?null:w,"aria-expanded":U,"aria-haspopup":!0,"aria-controls":ie,"aria-disabled":z,onClick:function(e){z||(null===b||void 0===b||b({key:a,domEvent:e}),"inline"===E&&L(a,!V))},onFocus:function(){T(a)}},Y),o,e.createElement(qy,{icon:"horizontal"!==E?K:void 0,props:me(me({},t),{},{isOpen:U,isSubMenu:!0})},e.createElement("i",{className:"".concat(j,"-arrow")}))),ae=e.useRef(E);if("inline"!==E&&B.length>1?ae.current="vertical":ae.current=E,!$){var se=ae.current;oe=e.createElement(f_,{mode:se,prefixCls:j,visible:!l&&U&&"inline"!==E,popupClassName:h,popupOffset:f,popupStyle:p,popup:e.createElement(my,{mode:"horizontal"===se?"vertical":se},e.createElement(a_,{id:ie,ref:F},c)),disabled:z,onVisibleChange:function(e){"inline"!==E&&L(a,e)}},oe)}var le=e.createElement(vf.Item,Gt({ref:n,role:"none"},S,{component:"li",style:r,className:Ji()(j,"".concat(j,"-").concat(E),i,fe(fe(fe(fe({},"".concat(j,"-open"),U),"".concat(j,"-active"),te),"".concat(j,"-selected"),q),"".concat(j,"-disabled"),z)),onMouseEnter:function(e){ee(!0),null===g||void 0===g||g({key:a,domEvent:e})},onMouseLeave:function(e){ee(!1),null===v||void 0===v||v({key:a,domEvent:e})}}),oe,!$&&e.createElement(p_,{id:ie,open:U,keyPath:B},c));return D&&(le=D(le,t,{selected:q,active:te,open:U,disabled:z})),e.createElement(my,{onItemClick:re,mode:"horizontal"===E?"vertical":E,itemIcon:W,expandIcon:K},le)}));const b_=e.forwardRef((function(t,n){var r,i=t.eventKey,o=t.children,a=_y(i),s=s_(o,a),l=by();return e.useEffect((function(){if(l)return l.registerPath(i,a),function(){l.unregisterPath(i,a)}}),[a]),r=l?s:e.createElement(v_,Gt({ref:n},t),s),e.createElement(yy.Provider,{value:a},r)}));function y_(t){var n=t.className,r=t.style,i=e.useContext(py).prefixCls;return by()?null:e.createElement("li",{role:"separator",className:Ji()("".concat(i,"-item-divider"),n),style:r})}var __=["className","title","eventKey","children"],S_=e.forwardRef((function(t,n){var r=t.className,i=t.title,o=(t.eventKey,t.children),a=lo(t,__),s=e.useContext(py).prefixCls,l="".concat(s,"-item-group");return e.createElement("li",Gt({ref:n,role:"presentation"},a,{onClick:function(e){return e.stopPropagation()},className:Ji()(l,r)}),e.createElement("div",{role:"presentation",className:"".concat(l,"-title"),title:"string"===typeof i?i:void 0},i),e.createElement("ul",{role:"group",className:"".concat(l,"-list")},o))}));const w_=e.forwardRef((function(t,n){var r=t.eventKey,i=s_(t.children,_y(r));return by()?i:e.createElement(S_,Gt({ref:n},Xf(t,["warnKey"])),i)}));var C_=["label","children","key","type","extra"];function x_(t,n,r){var i=n.item,o=n.group,a=n.submenu,s=n.divider;return(t||[]).map((function(t,l){if(t&&"object"===le(t)){var c=t,u=c.label,d=c.children,h=c.key,f=c.type,p=c.extra,m=lo(c,C_),g=null!==h&&void 0!==h?h:"tmp-".concat(l);return d||"group"===f?"group"===f?e.createElement(o,Gt({key:g},m,{title:u}),x_(d,n,r)):e.createElement(a,Gt({key:g},m,{title:u}),x_(d,n,r)):"divider"===f?e.createElement(s,Gt({key:g},m)):e.createElement(i,Gt({key:g},m,{extra:p}),u,(!!p||0===p)&&e.createElement("span",{className:"".concat(r,"-item-extra")},p))}return null})).filter((function(e){return e}))}function E_(e,t,n,r,i){var o=e,a=me({divider:y_,item:n_,group:w_,submenu:b_},r);return t&&(o=x_(t,a,i)),s_(o,n)}var k_=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem","_internalComponents"],O_=[];var $_=e.forwardRef((function(t,n){var r,i=t,o=i.prefixCls,a=void 0===o?"rc-menu":o,s=i.rootClassName,l=i.style,c=i.className,u=i.tabIndex,d=void 0===u?0:u,h=i.items,f=i.children,p=i.direction,m=i.id,g=i.mode,v=void 0===g?"vertical":g,b=i.inlineCollapsed,y=i.disabled,_=i.disabledOverflow,S=i.subMenuOpenDelay,w=void 0===S?.1:S,C=i.subMenuCloseDelay,x=void 0===C?.1:C,E=i.forceSubMenuRender,k=i.defaultOpenKeys,O=i.openKeys,$=i.activeKey,R=i.defaultActiveFirst,I=i.selectable,M=void 0===I||I,P=i.multiple,N=void 0!==P&&P,L=i.defaultSelectedKeys,T=i.selectedKeys,D=i.onSelect,A=i.onDeselect,B=i.inlineIndent,j=void 0===B?24:B,z=i.motion,H=i.defaultMotions,F=i.triggerSubMenuAction,W=void 0===F?"hover":F,K=i.builtinPlacements,V=i.itemIcon,U=i.expandIcon,q=i.overflowedIndicator,X=void 0===q?"...":q,G=i.overflowedIndicatorPopupClassName,Y=i.getPopupContainer,Q=i.onClick,J=i.onOpenChange,Z=i.onKeyDown,ee=(i.openAnimation,i.openTransitionName,i._internalRenderMenuItem),te=i._internalRenderSubMenuItem,ne=i._internalComponents,re=lo(i,k_),ie=Be(e.useMemo((function(){return[E_(f,h,O_,ne,a),E_(f,h,O_,{},a)]}),[f,h,ne]),2),oe=ie[0],ae=ie[1],le=Be(e.useState(!1),2),ce=le[0],ue=le[1],de=e.useRef(),he=function(t){var n=Be(Co(t,{value:t}),2),r=n[0],i=n[1];return e.useEffect((function(){Ky+=1;var e="".concat(Wy,"-").concat(Ky);i("rc-menu-uuid-".concat(e))}),[]),r}(m),pe="rtl"===p;var ge=Be(Co(k,{value:O,postState:function(e){return e||O_}}),2),be=ge[0],ye=ge[1],_e=function(e){function t(){ye(e),null===J||void 0===J||J(e)}arguments.length>1&&void 0!==arguments[1]&&arguments[1]?(0,ve.flushSync)(t):t()},Se=Be(e.useState(be),2),we=Se[0],Ce=Se[1],xe=e.useRef(!1),Ee=Be(e.useMemo((function(){return"inline"!==v&&"vertical"!==v||!b?[v,!1]:["vertical",b]}),[v,b]),2),ke=Ee[0],Oe=Ee[1],$e="inline"===ke,Re=Be(e.useState(ke),2),Ie=Re[0],Me=Re[1],Pe=Be(e.useState(Oe),2),Ne=Pe[0],Le=Pe[1];e.useEffect((function(){Me(ke),Le(Oe),xe.current&&($e?ye(we):_e(O_))}),[ke,Oe]);var Te=Be(e.useState(0),2),De=Te[0],Ae=Te[1],je=De>=oe.length-1||"horizontal"!==Ie||_;e.useEffect((function(){$e&&Ce(be)}),[be]),e.useEffect((function(){return xe.current=!0,function(){xe.current=!1}}),[]);var ze=Hy(),He=ze.registerPath,Fe=ze.unregisterPath,We=ze.refreshOverflowKeys,Ke=ze.isSubPathKey,Ve=ze.getKeyPath,Ue=ze.getKeys,qe=ze.getSubPathKeys,Xe=e.useMemo((function(){return{registerPath:He,unregisterPath:Fe}}),[He,Fe]),Ge=e.useMemo((function(){return{isSubPathKey:Ke}}),[Ke]);e.useEffect((function(){We(je?O_:oe.slice(De+1).map((function(e){return e.key})))}),[De,je]);var Ye=Be(Co($||R&&(null===(r=oe[0])||void 0===r?void 0:r.key),{value:$}),2),Qe=Ye[0],Je=Ye[1],Ze=Fy((function(e){Je(e)})),et=Fy((function(){Je(void 0)}));(0,e.useImperativeHandle)(n,(function(){return{list:de.current,focus:function(e){var t,n,r=Ue(),i=Dy(r,he),o=i.elements,a=i.key2element,s=i.element2key,l=Ly(de.current,o),c=null!==Qe&&void 0!==Qe?Qe:l[0]?s.get(l[0]):null===(t=oe.find((function(e){return!e.props.disabled})))||void 0===t?void 0:t.key,u=a.get(c);c&&u&&(null===u||void 0===u||null===(n=u.focus)||void 0===n||n.call(u,e))}}}));var tt=Be(Co(L||[],{value:T,postState:function(e){return Array.isArray(e)?e:null===e||void 0===e?O_:[e]}}),2),nt=tt[0],rt=tt[1],it=Fy((function(e){null===Q||void 0===Q||Q(Gy(e)),function(e){if(M){var t,n=e.key,r=nt.includes(n);t=N?r?nt.filter((function(e){return e!==n})):[].concat(se(nt),[n]):[n],rt(t);var i=me(me({},e),{},{selectedKeys:t});r?null===A||void 0===A||A(i):null===D||void 0===D||D(i)}!N&&be.length&&"inline"!==Ie&&_e(O_)}(e)})),ot=Fy((function(e,t){var n=be.filter((function(t){return t!==e}));if(t)n.push(e);else if("inline"!==Ie){var r=qe(e);n=n.filter((function(e){return!r.has(e)}))}at(be,n,!0)||_e(n,!0)})),st=Ay(Ie,Qe,pe,he,de,Ue,Ve,Je,(function(e,t){var n=null!==t&&void 0!==t?t:!be.includes(e);ot(e,n)}),Z);e.useEffect((function(){ue(!0)}),[]);var lt=e.useMemo((function(){return{_internalRenderMenuItem:ee,_internalRenderSubMenuItem:te}}),[ee,te]),ct="horizontal"!==Ie||_?oe:oe.map((function(t,n){return e.createElement(my,{key:t.key,overflowDisabled:n>De},t)})),ut=e.createElement(vf,Gt({id:m,ref:de,prefixCls:"".concat(a,"-overflow"),component:"ul",itemComponent:n_,className:Ji()(a,"".concat(a,"-root"),"".concat(a,"-").concat(Ie),c,fe(fe({},"".concat(a,"-inline-collapsed"),Ne),"".concat(a,"-rtl"),pe),s),dir:p,style:l,role:"menu",tabIndex:d,data:ct,renderRawItem:function(e){return e},renderRawRest:function(t){var n=t.length,r=n?oe.slice(-n):null;return e.createElement(b_,{eventKey:zy,title:X,disabled:je,internalPopupClose:0===n,popupClassName:G},r)},maxCount:"horizontal"!==Ie||_?vf.INVALIDATE:vf.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(e){Ae(e)},onKeyDown:st},re));return e.createElement(wy.Provider,{value:lt},e.createElement(uy.Provider,{value:he},e.createElement(my,{prefixCls:a,rootClassName:s,mode:Ie,openKeys:be,rtl:pe,disabled:y,motion:ce?z:null,defaultMotions:ce?H:null,activeKey:Qe,onActive:Ze,onInactive:et,selectedKeys:nt,inlineIndent:j,subMenuOpenDelay:w,subMenuCloseDelay:x,forceSubMenuRender:E,builtinPlacements:K,triggerSubMenuAction:W,getPopupContainer:Y,itemIcon:V,expandIcon:U,onItemClick:it,onOpenChange:ot},e.createElement(Sy.Provider,{value:Ge},ut),e.createElement("div",{style:{display:"none"},"aria-hidden":!0},e.createElement(vy.Provider,{value:Xe},ae)))))}));$_.Item=n_,$_.SubMenu=b_,$_.ItemGroup=w_,$_.Divider=y_;const R_=$_;const I_=e.createContext({});(()=>{let e=0})();const M_={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"};var P_=function(t,n){return e.createElement(us,Gt({},t,{ref:n,icon:M_}))};const N_=e.forwardRef(P_),L_=(0,e.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var T_=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const D_=t=>{const{prefixCls:n,className:r,dashed:i}=t,o=T_(t,["prefixCls","className","dashed"]),{getPrefixCls:a}=e.useContext(Le),s=a("menu",n),l=Ji()({[`${s}-item-divider-dashed`]:!!i},r);return e.createElement(y_,Object.assign({className:l},o))},A_=t=>{var n;const{className:r,children:i,icon:o,title:a,danger:s,extra:l}=t,{prefixCls:c,firstLevel:u,direction:d,disableMenuItemTitleTooltip:h,inlineCollapsed:f}=e.useContext(L_),{siderCollapsed:p}=e.useContext(I_);let m=a;"undefined"===typeof a?m=u?i:"":!1===a&&(m="");const g={title:m};p||f||(g.title=null,g.open=!1);const v=Rc(i).length;let b=e.createElement(n_,Object.assign({},Xf(t,["title","icon","danger"]),{className:Ji()({[`${c}-item-danger`]:s,[`${c}-item-only-child`]:1===(o?v+1:v)},r),title:"string"===typeof a?a:void 0}),Yl(o,{className:Ji()(e.isValidElement(o)?null===(n=o.props)||void 0===n?void 0:n.className:"",`${c}-item-icon`)}),(t=>{const n=null===i||void 0===i?void 0:i[0],r=e.createElement("span",{className:Ji()(`${c}-title-content`,{[`${c}-title-content-with-extra`]:!!l||0===l})},i);return(!o||e.isValidElement(i)&&"span"===i.type)&&i&&t&&u&&"string"===typeof n?e.createElement("div",{className:`${c}-inline-collapsed-noicon`},n.charAt(0)):r})(f));return h||(b=e.createElement(Uh,Object.assign({},g,{placement:"rtl"===d?"left":"right",overlayClassName:`${c}-inline-collapsed-tooltip`}),b)),b};var B_=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const j_=e.createContext(null),z_=e.forwardRef(((t,n)=>{const{children:r}=t,i=B_(t,["children"]),o=e.useContext(j_),a=e.useMemo((()=>Object.assign(Object.assign({},o),i)),[o,i.prefixCls,i.mode,i.selectable,i.rootClassName]),s=so(l=r)&&ao(l);var l;const c=oo(n,s?r.ref:null);return e.createElement(j_.Provider,{value:a},e.createElement(ch,{space:!0},s?e.cloneElement(r,{ref:c}):r))})),H_=j_,F_=e=>({[e.componentCls]:{[`${e.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},\n opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}},[`${e.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},\n opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}}}),W_=e=>{const{componentCls:t,motionDurationSlow:n,horizontalLineHeight:r,colorSplit:i,lineWidth:o,lineType:a,itemPaddingInline:s}=e;return{[`${t}-horizontal`]:{lineHeight:r,border:0,borderBottom:`${It(o)} ${a} ${i}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${t}-item, ${t}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:s},[`> ${t}-item:hover,\n > ${t}-item-active,\n > ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${t}-item, ${t}-submenu-title`]:{transition:[`border-color ${n}`,`background ${n}`].join(",")},[`${t}-submenu-arrow`]:{display:"none"}}}},K_=e=>{let{componentCls:t,menuArrowOffset:n,calc:r}=e;return{[`${t}-rtl`]:{direction:"rtl"},[`${t}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${t}-rtl${t}-vertical,\n ${t}-submenu-rtl ${t}-vertical`]:{[`${t}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${It(r(n).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${It(n)})`}}}}},V_=e=>Object.assign({},Na(e)),U_=(e,t)=>{const{componentCls:n,itemColor:r,itemSelectedColor:i,groupTitleColor:o,itemBg:a,subMenuItemBg:s,itemSelectedBg:l,activeBarHeight:c,activeBarWidth:u,activeBarBorderWidth:d,motionDurationSlow:h,motionEaseInOut:f,motionEaseOut:p,itemPaddingInline:m,motionDurationMid:g,itemHoverColor:v,lineType:b,colorSplit:y,itemDisabledColor:_,dangerItemColor:S,dangerItemHoverColor:w,dangerItemSelectedColor:C,dangerItemActiveBg:x,dangerItemSelectedBg:E,popupBg:k,itemHoverBg:O,itemActiveBg:$,menuSubMenuBg:R,horizontalItemSelectedColor:I,horizontalItemSelectedBg:M,horizontalItemBorderRadius:P,horizontalItemHoverBg:N}=e;return{[`${n}-${t}, ${n}-${t} > ${n}`]:{color:r,background:a,[`&${n}-root:focus-visible`]:Object.assign({},V_(e)),[`${n}-item`]:{"&-group-title, &-extra":{color:o}},[`${n}-submenu-selected`]:{[`> ${n}-submenu-title`]:{color:i}},[`${n}-item, ${n}-submenu-title`]:{color:r,[`&:not(${n}-item-disabled):focus-visible`]:Object.assign({},V_(e))},[`${n}-item-disabled, ${n}-submenu-disabled`]:{color:`${_} !important`},[`${n}-item:not(${n}-item-selected):not(${n}-submenu-selected)`]:{[`&:hover, > ${n}-submenu-title:hover`]:{color:v}},[`&:not(${n}-horizontal)`]:{[`${n}-item:not(${n}-item-selected)`]:{"&:hover":{backgroundColor:O},"&:active":{backgroundColor:$}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:O},"&:active":{backgroundColor:$}}},[`${n}-item-danger`]:{color:S,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:w}},[`&${n}-item:active`]:{background:x}},[`${n}-item a`]:{"&, &:hover":{color:"inherit"}},[`${n}-item-selected`]:{color:i,[`&${n}-item-danger`]:{color:C},"a, a:hover":{color:"inherit"}},[`& ${n}-item-selected`]:{backgroundColor:l,[`&${n}-item-danger`]:{backgroundColor:E}},[`&${n}-submenu > ${n}`]:{backgroundColor:R},[`&${n}-popup > ${n}`]:{backgroundColor:k},[`&${n}-submenu-popup > ${n}`]:{backgroundColor:k},[`&${n}-horizontal`]:Object.assign(Object.assign({},"dark"===t?{borderBottom:0}:{}),{[`> ${n}-item, > ${n}-submenu`]:{top:d,marginTop:e.calc(d).mul(-1).equal(),marginBottom:0,borderRadius:P,"&::after":{position:"absolute",insetInline:m,bottom:0,borderBottom:`${It(c)} solid transparent`,transition:`border-color ${h} ${f}`,content:'""'},"&:hover, &-active, &-open":{background:N,"&::after":{borderBottomWidth:c,borderBottomColor:I}},"&-selected":{color:I,backgroundColor:M,"&:hover":{backgroundColor:M},"&::after":{borderBottomWidth:c,borderBottomColor:I}}}}),[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${It(d)} ${b} ${y}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:s},[`${n}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${It(u)} solid ${i}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${g} ${p}`,`opacity ${g} ${p}`].join(","),content:'""'},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:C}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${g} ${f}`,`opacity ${g} ${f}`].join(",")}}}}}},q_=e=>{const{componentCls:t,itemHeight:n,itemMarginInline:r,padding:i,menuArrowSize:o,marginXS:a,itemMarginBlock:s,itemWidth:l,itemPaddingInline:c}=e,u=e.calc(o).add(i).add(a).equal();return{[`${t}-item`]:{position:"relative",overflow:"hidden"},[`${t}-item, ${t}-submenu-title`]:{height:n,lineHeight:It(n),paddingInline:c,overflow:"hidden",textOverflow:"ellipsis",marginInline:r,marginBlock:s,width:l},[`> ${t}-item,\n > ${t}-submenu > ${t}-submenu-title`]:{height:n,lineHeight:It(n)},[`${t}-item-group-list ${t}-submenu-title,\n ${t}-submenu-title`]:{paddingInlineEnd:u}}},X_=e=>{const{componentCls:t,iconCls:n,itemHeight:r,colorTextLightSolid:i,dropdownWidth:o,controlHeightLG:a,motionEaseOut:s,paddingXL:l,itemMarginInline:c,fontSizeLG:u,motionDurationFast:d,motionDurationSlow:h,paddingXS:f,boxShadowSecondary:p,collapsedWidth:m,collapsedIconSize:g}=e,v={height:r,lineHeight:It(r),listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":Object.assign({[`&${t}-root`]:{boxShadow:"none"}},q_(e))},[`${t}-submenu-popup`]:{[`${t}-vertical`]:Object.assign(Object.assign({},q_(e)),{boxShadow:p})}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:o,maxHeight:`calc(100vh - ${It(e.calc(a).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${t}-inline`]:{width:"100%",[`&${t}-root`]:{[`${t}-item, ${t}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${h}`,`background ${h}`,`padding ${d} ${s}`].join(","),[`> ${t}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${t}-sub${t}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${t}-submenu > ${t}-submenu-title`]:v,[`& ${t}-item-group-title`]:{paddingInlineStart:l}},[`${t}-item`]:v}},{[`${t}-inline-collapsed`]:{width:m,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{[`> ${t}-inline-collapsed-noicon`]:{fontSize:u,textAlign:"center"}}},[`> ${t}-item,\n > ${t}-item-group > ${t}-item-group-list > ${t}-item,\n > ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title,\n > ${t}-submenu > ${t}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${It(e.calc(u).div(2).equal())} - ${It(c)})`,textOverflow:"clip",[`\n ${t}-submenu-arrow,\n ${t}-submenu-expand-icon\n `]:{opacity:0},[`${t}-item-icon, ${n}`]:{margin:0,fontSize:g,lineHeight:It(r),"+ span":{display:"inline-block",opacity:0}}},[`${t}-item-icon, ${n}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${t}-item-icon, ${n}`]:{display:"none"},"a, a:hover":{color:i}},[`${t}-item-group-title`]:Object.assign(Object.assign({},Ia),{paddingInline:f})}}]},G_=e=>{const{componentCls:t,motionDurationSlow:n,motionDurationMid:r,motionEaseInOut:i,motionEaseOut:o,iconCls:a,iconSize:s,iconMarginInlineEnd:l}=e;return{[`${t}-item, ${t}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${n}`,`background ${n}`,`padding calc(${n} + 0.1s) ${i}`].join(","),[`${t}-item-icon, ${a}`]:{minWidth:s,fontSize:s,transition:[`font-size ${r} ${o}`,`margin ${n} ${i}`,`color ${n}`].join(","),"+ span":{marginInlineStart:l,opacity:1,transition:[`opacity ${n} ${i}`,`margin ${n}`,`color ${n}`].join(",")}},[`${t}-item-icon`]:Object.assign({},{display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),[`&${t}-item-only-child`]:{[`> ${a}, > ${t}-item-icon`]:{marginInlineEnd:0}}},[`${t}-item-disabled, ${t}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${t}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},Y_=e=>{const{componentCls:t,motionDurationSlow:n,motionEaseInOut:r,borderRadius:i,menuArrowSize:o,menuArrowOffset:a}=e;return{[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:o,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${n} ${r}, opacity ${n}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(o).mul(.6).equal(),height:e.calc(o).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:i,transition:[`background ${n} ${r}`,`transform ${n} ${r}`,`top ${n} ${r}`,`color ${n} ${r}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${It(e.calc(a).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${It(a)})`}}}}},Q_=e=>{const{antCls:t,componentCls:n,fontSize:r,motionDurationSlow:i,motionDurationMid:o,motionEaseInOut:a,paddingXS:s,padding:l,colorSplit:c,lineWidth:u,zIndexPopup:d,borderRadiusLG:h,subMenuItemBorderRadius:f,menuArrowSize:p,menuArrowOffset:m,lineType:g,groupTitleLineHeight:v,groupTitleFontSize:b}=e;return[{"":{[n]:Object.assign(Object.assign({},{"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),{"&-hidden":{display:"none"}})},[`${n}-submenu-hidden`]:{display:"none"}},{[n]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ma(e)),{"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),{marginBottom:0,paddingInlineStart:0,fontSize:r,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${i} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${n}-item`]:{flex:"none"}},[`${n}-item, ${n}-submenu, ${n}-submenu-title`]:{borderRadius:e.itemBorderRadius},[`${n}-item-group-title`]:{padding:`${It(s)} ${It(l)}`,fontSize:b,lineHeight:v,transition:`all ${i}`},[`&-horizontal ${n}-submenu`]:{transition:[`border-color ${i} ${a}`,`background ${i} ${a}`].join(",")},[`${n}-submenu, ${n}-submenu-inline`]:{transition:[`border-color ${i} ${a}`,`background ${i} ${a}`,`padding ${o} ${a}`].join(",")},[`${n}-submenu ${n}-sub`]:{cursor:"initial",transition:[`background ${i} ${a}`,`padding ${i} ${a}`].join(",")},[`${n}-title-content`]:{transition:`color ${i}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${t}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${n}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:e.padding,fontSize:e.fontSizeSM}},[`${n}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${n}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:c,borderStyle:g,borderWidth:0,borderTopWidth:u,marginBlock:u,padding:0,"&-dashed":{borderStyle:"dashed"}}}),G_(e)),{[`${n}-item-group`]:{[`${n}-item-group-list`]:{margin:0,padding:0,[`${n}-item, ${n}-submenu-title`]:{paddingInline:`${It(e.calc(r).mul(2).equal())} ${It(l)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:d,borderRadius:h,boxShadow:"none",transformOrigin:"0 0",[`&${n}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${n}`]:Object.assign(Object.assign(Object.assign({borderRadius:h},G_(e)),Y_(e)),{[`${n}-item, ${n}-submenu > ${n}-submenu-title`]:{borderRadius:f},[`${n}-submenu-title::after`]:{transition:`transform ${i} ${a}`}})},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:e.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:e.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:e.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:e.paddingXS}}}),Y_(e)),{[`&-inline-collapsed ${n}-submenu-arrow,\n &-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${It(m)})`},"&::after":{transform:`rotate(45deg) translateX(${It(e.calc(m).mul(-1).equal())})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(${It(e.calc(p).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${It(e.calc(m).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${It(m)})`}}})},{[`${t}-layout-header`]:{[n]:{lineHeight:"inherit"}}}]},J_=e=>{var t,n,r;const{colorPrimary:i,colorError:o,colorTextDisabled:a,colorErrorBg:s,colorText:l,colorTextDescription:c,colorBgContainer:u,colorFillAlter:d,colorFillContent:h,lineWidth:f,lineWidthBold:p,controlItemBgActive:m,colorBgTextHover:g,controlHeightLG:v,lineHeight:b,colorBgElevated:y,marginXXS:_,padding:S,fontSize:w,controlHeightSM:C,fontSizeLG:x,colorTextLightSolid:E,colorErrorHover:k}=e,O=null!==(t=e.activeBarWidth)&&void 0!==t?t:0,$=null!==(n=e.activeBarBorderWidth)&&void 0!==n?n:f,R=null!==(r=e.itemMarginInline)&&void 0!==r?r:e.marginXXS,I=new Oi(E).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:l,itemColor:l,colorItemTextHover:l,itemHoverColor:l,colorItemTextHoverHorizontal:i,horizontalItemHoverColor:i,colorGroupTitle:c,groupTitleColor:c,colorItemTextSelected:i,itemSelectedColor:i,colorItemTextSelectedHorizontal:i,horizontalItemSelectedColor:i,colorItemBg:u,itemBg:u,colorItemBgHover:g,itemHoverBg:g,colorItemBgActive:h,itemActiveBg:m,colorSubItemBg:d,subMenuItemBg:d,colorItemBgSelected:m,itemSelectedBg:m,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:O,colorActiveBarHeight:p,activeBarHeight:p,colorActiveBarBorderSize:f,activeBarBorderWidth:$,colorItemTextDisabled:a,itemDisabledColor:a,colorDangerItemText:o,dangerItemColor:o,colorDangerItemTextHover:o,dangerItemHoverColor:o,colorDangerItemTextSelected:o,dangerItemSelectedColor:o,colorDangerItemBgActive:s,dangerItemActiveBg:s,colorDangerItemBgSelected:s,dangerItemSelectedBg:s,itemMarginInline:R,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:v,groupTitleLineHeight:b,collapsedWidth:2*v,popupBg:y,itemMarginBlock:_,itemPaddingInline:S,horizontalLineHeight:1.15*v+"px",iconSize:w,iconMarginInlineEnd:C-w,collapsedIconSize:x,groupTitleFontSize:w,darkItemDisabledColor:new Oi(E).setAlpha(.25).toRgbString(),darkItemColor:I,darkDangerItemColor:o,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:E,darkItemSelectedBg:i,darkDangerItemSelectedBg:o,darkItemHoverBg:"transparent",darkGroupTitleColor:I,darkItemHoverColor:E,darkDangerItemHoverColor:k,darkDangerItemSelectedColor:E,darkDangerItemActiveBg:o,itemWidth:O?`calc(100% + ${$}px)`:`calc(100% - ${2*R}px)`}},Z_=t=>{var n;const{popupClassName:r,icon:i,title:o,theme:a}=t,s=e.useContext(L_),{prefixCls:l,inlineCollapsed:c,theme:u}=s,d=_y();let h;if(i){const t=e.isValidElement(o)&&"span"===o.type;h=e.createElement(e.Fragment,null,Yl(i,{className:Ji()(e.isValidElement(i)?null===(n=i.props)||void 0===n?void 0:n.className:"",`${l}-item-icon`)}),t?o:e.createElement("span",{className:`${l}-title-content`},o))}else h=c&&!d.length&&o&&"string"===typeof o?e.createElement("div",{className:`${l}-inline-collapsed-noicon`},o.charAt(0)):e.createElement("span",{className:`${l}-title-content`},o);const f=e.useMemo((()=>Object.assign(Object.assign({},s),{firstLevel:!1})),[s]),[p]=qs("Menu");return e.createElement(L_.Provider,{value:f},e.createElement(b_,Object.assign({},Xf(t,["icon"]),{title:h,popupClassName:Ji()(l,r,`${l}-${a||u}`),popupStyle:Object.assign({zIndex:p},t.popupStyle)})))};var eS=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function tS(e){return null===e||!1===e}const nS={item:A_,submenu:Z_,divider:D_},rS=(0,e.forwardRef)(((t,n)=>{var r;const i=e.useContext(H_),o=i||{},{getPrefixCls:a,getPopupContainer:s,direction:l,menu:c}=e.useContext(Le),u=a(),{prefixCls:d,className:h,style:f,theme:p="light",expandIcon:m,_internalDisableMenuItemTitleTooltip:g,inlineCollapsed:v,siderCollapsed:b,rootClassName:y,mode:_,selectable:S,onClick:w,overflowedIndicatorPopupClassName:C}=t,x=Xf(eS(t,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),["collapsedWidth"]);null===(r=o.validator)||void 0===r||r.call(o,{mode:_});const E=_o((function(){var e;null===w||void 0===w||w.apply(void 0,arguments),null===(e=o.onClick)||void 0===e||e.call(o)})),k=o.mode||_,O=null!==S&&void 0!==S?S:o.selectable,$=e.useMemo((()=>void 0!==b?b:v),[v,b]),R={horizontal:{motionName:`${u}-slide-up`},inline:mh(u),other:{motionName:`${u}-zoom-big`}},I=a("menu",d||o.prefixCls),M=Hs(I),[P,N,L]=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return ml("Menu",(e=>{const{colorBgElevated:t,controlHeightLG:n,fontSize:r,darkItemColor:i,darkDangerItemColor:o,darkItemBg:a,darkSubMenuItemBg:s,darkItemSelectedColor:l,darkItemSelectedBg:c,darkDangerItemSelectedBg:u,darkItemHoverBg:d,darkGroupTitleColor:h,darkItemHoverColor:f,darkItemDisabledColor:p,darkDangerItemHoverColor:m,darkDangerItemSelectedColor:g,darkDangerItemActiveBg:v,popupBg:b,darkPopupBg:y}=e,_=e.calc(r).div(7).mul(5).equal(),S=ol(e,{menuArrowSize:_,menuHorizontalHeight:e.calc(n).mul(1.15).equal(),menuArrowOffset:e.calc(_).mul(.25).equal(),menuSubMenuBg:t,calc:e.calc,popupBg:b}),w=ol(S,{itemColor:i,itemHoverColor:f,groupTitleColor:h,itemSelectedColor:l,itemBg:a,popupBg:y,subMenuItemBg:s,itemActiveBg:"transparent",itemSelectedBg:c,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:d,itemDisabledColor:p,dangerItemColor:o,dangerItemHoverColor:m,dangerItemSelectedColor:g,dangerItemActiveBg:v,dangerItemSelectedBg:u,menuSubMenuBg:s,horizontalItemSelectedColor:l,horizontalItemSelectedBg:c});return[Q_(S),W_(S),X_(S),U_(S,"light"),U_(w,"dark"),K_(S),F_(S),am(S,"slide-up"),am(S,"slide-down"),Th(S,"zoom-big")]}),J_,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:!(arguments.length>2&&void 0!==arguments[2])||arguments[2],unitless:{groupTitleLineHeight:!0}})(e,t)}(I,M,!i),T=Ji()(`${I}-${p}`,null===c||void 0===c?void 0:c.className,h),D=e.useMemo((()=>{var t,n;if("function"===typeof m||tS(m))return m||null;if("function"===typeof o.expandIcon||tS(o.expandIcon))return o.expandIcon||null;if("function"===typeof(null===c||void 0===c?void 0:c.expandIcon)||tS(null===c||void 0===c?void 0:c.expandIcon))return(null===c||void 0===c?void 0:c.expandIcon)||null;const r=null!==(t=null!==m&&void 0!==m?m:null===o||void 0===o?void 0:o.expandIcon)&&void 0!==t?t:null===c||void 0===c?void 0:c.expandIcon;return Yl(r,{className:Ji()(`${I}-submenu-expand-icon`,e.isValidElement(r)?null===(n=r.props)||void 0===n?void 0:n.className:void 0)})}),[m,null===o||void 0===o?void 0:o.expandIcon,null===c||void 0===c?void 0:c.expandIcon,I]),A=e.useMemo((()=>({prefixCls:I,inlineCollapsed:$||!1,direction:l,firstLevel:!0,theme:p,mode:k,disableMenuItemTitleTooltip:g})),[I,$,l,g,p]);return P(e.createElement(H_.Provider,{value:null},e.createElement(L_.Provider,{value:A},e.createElement(R_,Object.assign({getPopupContainer:s,overflowedIndicator:e.createElement(N_,null),overflowedIndicatorPopupClassName:Ji()(I,`${I}-${p}`,C),mode:k,selectable:O,onClick:E},x,{inlineCollapsed:$,style:Object.assign(Object.assign({},null===c||void 0===c?void 0:c.style),f),className:T,prefixCls:I,direction:l,defaultMotions:R,expandIcon:D,ref:n,rootClassName:Ji()(y,N,o.rootClassName,L,M),_internalComponents:nS})))))})),iS=(0,e.forwardRef)(((t,n)=>{const r=(0,e.useRef)(null),i=e.useContext(I_);return(0,e.useImperativeHandle)(n,(()=>({menu:r.current,focus:e=>{var t;null===(t=r.current)||void 0===t||t.focus(e)}}))),e.createElement(rS,Object.assign({ref:r},t,i))}));iS.Item=A_,iS.SubMenu=Z_,iS.Divider=D_,iS.ItemGroup=w_;const oS=iS,aS=e=>{const{componentCls:t,menuCls:n,colorError:r,colorTextLightSolid:i}=e,o=`${n}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${n} ${o}`]:{[`&${o}-danger:not(${o}-disabled)`]:{color:r,"&:hover":{color:i,backgroundColor:r}}}}}},sS=e=>{const{componentCls:t,menuCls:n,zIndexPopup:r,dropdownArrowDistance:i,sizePopupArrow:o,antCls:a,iconCls:s,motionDurationMid:l,paddingBlock:c,fontSize:u,dropdownEdgeChildPadding:d,colorTextDisabled:h,fontSizeIcon:f,controlPaddingHorizontal:p,colorBgElevated:m}=e;return[{[t]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:r,display:"block","&::before":{position:"absolute",insetBlock:e.calc(o).div(2).sub(i).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${a}-btn`]:{[`& > ${s}-down, & > ${a}-btn-icon > ${s}-down`]:{fontSize:f}},[`${t}-wrap`]:{position:"relative",[`${a}-btn > ${s}-down`]:{fontSize:f},[`${s}-down::before`]:{transition:`transform ${l}`}},[`${t}-wrap-open`]:{[`${s}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottomLeft,\n &${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottomLeft,\n &${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottom,\n &${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottom,\n &${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottomRight,\n &${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:Qp},[`&${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-topLeft,\n &${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-topLeft,\n &${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-top,\n &${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-top,\n &${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-topRight,\n &${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-topRight`]:{animationName:Zp},[`&${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottomLeft,\n &${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottom,\n &${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:Jp},[`&${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-topLeft,\n &${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-top,\n &${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-topRight`]:{animationName:em}}},_h(e,m,{arrowPlacement:{top:!0,bottom:!0}}),{[`${t} ${n}`]:{position:"relative",margin:0},[`${n}-submenu-popup`]:{position:"absolute",zIndex:r,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${t}, ${t}-menu-submenu`]:Object.assign(Object.assign({},Ma(e)),{[n]:Object.assign(Object.assign({padding:d,listStyleType:"none",backgroundColor:m,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},La(e)),{"&:empty":{padding:0,boxShadow:"none"},[`${n}-item-group-title`]:{padding:`${It(c)} ${It(p)}`,color:e.colorTextDescription,transition:`all ${l}`},[`${n}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${n}-item-icon`]:{minWidth:u,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${n}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${l}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${n}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:"auto",fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${n}-item, ${n}-submenu-title`]:Object.assign(Object.assign({display:"flex",margin:0,padding:`${It(c)} ${It(p)}`,color:e.colorText,fontWeight:"normal",fontSize:u,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${l}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},La(e)),{"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:h,cursor:"not-allowed","&:hover":{color:h,backgroundColor:m,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${It(e.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:e.colorTextDescription,fontSize:f,fontStyle:"normal"}}}),[`${n}-item-group-list`]:{margin:`0 ${It(e.marginXS)}`,padding:0,listStyle:"none"},[`${n}-submenu-title`]:{paddingInlineEnd:e.calc(p).add(e.fontSizeSM).equal()},[`${n}-submenu-vertical`]:{position:"relative"},[`${n}-submenu${n}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:h,backgroundColor:m,cursor:"not-allowed"}},[`${n}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}})})},[am(e,"slide-up"),am(e,"slide-down"),pm(e,"move-up"),pm(e,"move-down"),Th(e,"zoom-big")]]},lS=ml("Dropdown",(e=>{const{marginXXS:t,sizePopupArrow:n,paddingXXS:r,componentCls:i}=e,o=ol(e,{menuCls:`${i}-menu`,dropdownArrowDistance:e.calc(n).div(2).add(t).equal(),dropdownEdgeChildPadding:r});return[sS(o),aS(o)]}),(e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2},bh({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0})),gh(e))),{resetStyle:!1}),cS=t=>{var n;const{menu:r,arrow:i,prefixCls:o,children:a,trigger:s,disabled:l,dropdownRender:c,getPopupContainer:u,overlayClassName:d,rootClassName:h,overlayStyle:f,open:p,onOpenChange:m,visible:g,onVisibleChange:v,mouseEnterDelay:b=.15,mouseLeaveDelay:y=.1,autoAdjustOverflow:_=!0,placement:S="",overlay:w,transitionName:C}=t,{getPopupContainer:x,getPrefixCls:E,direction:k,dropdown:O}=e.useContext(Le);dr("Dropdown");const $=e.useMemo((()=>{const e=E();return void 0!==C?C:S.includes("top")?`${e}-slide-down`:`${e}-slide-up`}),[E,S,C]),R=e.useMemo((()=>S?S.includes("Center")?S.slice(0,S.indexOf("Center")):S:"rtl"===k?"bottomRight":"bottomLeft"),[S,k]);const I=E("dropdown",o),M=Hs(I),[P,N,L]=lS(I,M),[,T]=Oa(),D=e.Children.only(a),A=Yl(D,{className:Ji()(`${I}-trigger`,{[`${I}-rtl`]:"rtl"===k},D.props.className),disabled:null!==(n=D.props.disabled)&&void 0!==n?n:l}),B=l?[]:s,j=!!(null===B||void 0===B?void 0:B.includes("contextMenu")),[z,H]=Co(!1,{value:null!==p&&void 0!==p?p:g}),F=_o((e=>{null===m||void 0===m||m(e,{source:"trigger"}),null===v||void 0===v||v(e),H(e)})),W=Ji()(d,h,N,L,M,null===O||void 0===O?void 0:O.className,{[`${I}-rtl`]:"rtl"===k}),K=xh({arrowPointAtCenter:"object"===typeof i&&i.pointAtCenter,autoAdjustOverflow:_,offset:T.marginXXS,arrowWidth:i?T.sizePopupArrow:0,borderRadius:T.borderRadius}),V=e.useCallback((()=>{(null===r||void 0===r?void 0:r.selectable)&&(null===r||void 0===r?void 0:r.multiple)||(null===m||void 0===m||m(!1,{source:"menu"}),H(!1))}),[null===r||void 0===r?void 0:r.selectable,null===r||void 0===r?void 0:r.multiple]),[U,q]=qs("Dropdown",null===f||void 0===f?void 0:f.zIndex);let X=e.createElement(cy,Object.assign({alignPoint:j},Xf(t,["rootClassName"]),{mouseEnterDelay:b,mouseLeaveDelay:y,visible:z,builtinPlacements:K,arrow:!!i,overlayClassName:W,prefixCls:I,getPopupContainer:u||x,transitionName:$,trigger:B,overlay:()=>{let t;return t=(null===r||void 0===r?void 0:r.items)?e.createElement(oS,Object.assign({},r)):"function"===typeof w?w():w,c&&(t=c(t)),t=e.Children.only("string"===typeof t?e.createElement("span",null,t):t),e.createElement(z_,{prefixCls:`${I}-menu`,rootClassName:Ji()(L,M),expandIcon:e.createElement("span",{className:`${I}-menu-submenu-arrow`},e.createElement(ey,{className:`${I}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:V,validator:e=>{let{mode:t}=e}},t)},placement:R,onVisibleChange:F,overlayStyle:Object.assign(Object.assign(Object.assign({},null===O||void 0===O?void 0:O.style),f),{zIndex:U})}),A);return U&&(X=e.createElement(Fs.Provider,{value:q},X)),P(X)};const uS=Pp(cS,"dropdown",(e=>e),(function(e){return Object.assign(Object.assign({},e),{align:{overflow:{adjustX:!1,adjustY:!1}}})}));cS._InternalPanelDoNotUseOrYouWillBeFired=t=>e.createElement(uS,Object.assign({},t),e.createElement("span",null));const dS=cS;function hS(e){return["small","middle","large"].includes(e)}function fS(e){return!!e&&("number"===typeof e&&!Number.isNaN(e))}const pS=e.createContext({latestIndex:0}),mS=pS.Provider,gS=t=>{let{className:n,index:r,children:i,split:o,style:a}=t;const{latestIndex:s}=e.useContext(pS);return null===i||void 0===i?null:e.createElement(e.Fragment,null,e.createElement("div",{className:n,style:a},i),r<s&&o&&e.createElement("span",{className:`${n}-split`},o))};var vS=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const bS=e.forwardRef(((t,n)=>{var r,i,o;const{getPrefixCls:a,space:s,direction:l}=e.useContext(Le),{size:c=(null!==(r=null===s||void 0===s?void 0:s.size)&&void 0!==r?r:"small"),align:u,className:d,rootClassName:h,children:f,direction:p="horizontal",prefixCls:m,split:g,style:v,wrap:b=!1,classNames:y,styles:_}=t,S=vS(t,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[w,C]=Array.isArray(c)?c:[c,c],x=hS(C),E=hS(w),k=fS(C),O=fS(w),$=Rc(f,{keepEmpty:!0}),R=void 0===u&&"horizontal"===p?"center":u,I=a("space",m),[M,P,N]=nh(I),L=Ji()(I,null===s||void 0===s?void 0:s.className,P,`${I}-${p}`,{[`${I}-rtl`]:"rtl"===l,[`${I}-align-${R}`]:R,[`${I}-gap-row-${C}`]:x,[`${I}-gap-col-${w}`]:E},d,h,N),T=Ji()(`${I}-item`,null!==(i=null===y||void 0===y?void 0:y.item)&&void 0!==i?i:null===(o=null===s||void 0===s?void 0:s.classNames)||void 0===o?void 0:o.item);let D=0;const A=$.map(((t,n)=>{var r,i;null!==t&&void 0!==t&&(D=n);const o=(null===t||void 0===t?void 0:t.key)||`${T}-${n}`;return e.createElement(gS,{className:T,key:o,index:n,split:g,style:null!==(r=null===_||void 0===_?void 0:_.item)&&void 0!==r?r:null===(i=null===s||void 0===s?void 0:s.styles)||void 0===i?void 0:i.item},t)})),B=e.useMemo((()=>({latestIndex:D})),[D]);if(0===$.length)return null;const j={};return b&&(j.flexWrap="wrap"),!E&&O&&(j.columnGap=w),!x&&k&&(j.rowGap=C),M(e.createElement("div",Object.assign({ref:n,className:L,style:Object.assign(Object.assign(Object.assign({},j),null===s||void 0===s?void 0:s.style),v)},S),e.createElement(mS,{value:B},A)))})),yS=bS;yS.Compact=lh;const _S=yS;var SS=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const wS=t=>{const{getPopupContainer:n,getPrefixCls:r,direction:i}=e.useContext(Le),{prefixCls:o,type:a="default",danger:s,disabled:l,loading:c,onClick:u,htmlType:d,children:h,className:f,menu:p,arrow:m,autoFocus:g,overlay:v,trigger:b,align:y,open:_,onOpenChange:S,placement:w,getPopupContainer:C,href:x,icon:E=e.createElement(N_,null),title:k,buttonsRender:O=e=>e,mouseEnterDelay:$,mouseLeaveDelay:R,overlayClassName:I,overlayStyle:M,destroyPopupOnHide:P,dropdownRender:N}=t,L=SS(t,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","dropdownRender"]),T=r("dropdown",o),D=`${T}-button`,A={menu:p,arrow:m,autoFocus:g,align:y,disabled:l,trigger:l?[]:b,onOpenChange:S,getPopupContainer:C||n,mouseEnterDelay:$,mouseLeaveDelay:R,overlayClassName:I,overlayStyle:M,destroyPopupOnHide:P,dropdownRender:N},{compactSize:B,compactItemClassnames:j}=oh(T,i),z=Ji()(D,j,f);"overlay"in t&&(A.overlay=v),"open"in t&&(A.open=_),A.placement="placement"in t?w:"rtl"===i?"bottomLeft":"bottomRight";const H=e.createElement(uv,{type:a,danger:s,disabled:l,loading:c,onClick:u,htmlType:d,href:x,title:k},h),F=e.createElement(uv,{type:a,danger:s,icon:E}),[W,K]=O([H,F]);return e.createElement(_S.Compact,Object.assign({className:z,size:B,block:!0},L),W,e.createElement(dS,Object.assign({},A),K))};wS.__ANT_BUTTON=!0;const CS=wS,xS=dS;xS.Button=CS;const ES=xS;var kS=e.createContext(null);function OS(e){if(null==e)throw new TypeError("Cannot destructure "+e)}var $S=function(t){for(var n=t.prefixCls,r=t.level,i=t.isStart,o=t.isEnd,a="".concat(n,"-indent-unit"),s=[],l=0;l<r;l+=1)s.push(e.createElement("span",{key:l,className:Ji()(a,fe(fe({},"".concat(a,"-start"),i[l]),"".concat(a,"-end"),o[l]))}));return e.createElement("span",{"aria-hidden":"true",className:"".concat(n,"-indent")},s)};const RS=e.memo($S);function IS(e,t){return e[t]}var MS=["children"];function PS(e,t){return"".concat(e,"-").concat(t)}function NS(e,t){return null!==e&&void 0!==e?e:t}function LS(e){var t=e||{},n=t.title||"title";return{title:n,_title:t._title||[n],key:t.key||"key",children:t.children||"children"}}function TS(e){return function e(t){return Rc(t).map((function(t){if(!function(e){return e&&e.type&&e.type.isTreeNode}(t))return ot(!t,"Tree/TreeNode can only accept TreeNode as children."),null;var n=t.key,r=t.props,i=r.children,o=me({key:n},lo(r,MS)),a=e(i);return a.length&&(o.children=a),o})).filter((function(e){return e}))}(e)}function DS(e,t,n){var r=LS(n),i=r._title,o=r.key,a=r.children,s=new Set(!0===t?[]:t),l=[];return function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return n.map((function(c,u){for(var d,h=PS(r?r.pos:"0",u),f=NS(c[o],h),p=0;p<i.length;p+=1){var m=i[p];if(void 0!==c[m]){d=c[m];break}}var g=Object.assign(Xf(c,[].concat(se(i),[o,a])),{title:d,key:f,parent:r,pos:h,children:null,data:c,isStart:[].concat(se(r?r.isStart:[]),[0===u]),isEnd:[].concat(se(r?r.isEnd:[]),[u===n.length-1])});return l.push(g),!0===t||s.has(f)?g.children=e(c[a]||[],g):g.children=[],g}))}(e),l}function AS(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.initWrapper,r=t.processEntity,i=t.onProcessFinished,o=t.externalGetKey,a=t.childrenPropName,s=t.fieldNames,l=o||(arguments.length>2?arguments[2]:void 0),c={},u={},d={posEntities:c,keyEntities:u};return n&&(d=n(d)||d),function(e,t,n){var r,i=("object"===le(n)?n:{externalGetKey:n})||{},o=i.childrenPropName,a=i.externalGetKey,s=LS(i.fieldNames),l=s.key,c=s.children,u=o||c;a?"string"===typeof a?r=function(e){return e[a]}:"function"===typeof a&&(r=function(e){return a(e)}):r=function(e,t){return NS(e[l],t)},function n(i,o,a,s){var l=i?i[u]:e,c=i?PS(a.pos,o):"0",d=i?[].concat(se(s),[i]):[];if(i){var h=r(i,c),f={node:i,index:o,pos:c,key:h,parentPos:a.node?a.pos:null,level:a.level+1,nodes:d};t(f)}l&&l.forEach((function(e,t){n(e,t,{node:i,pos:c,level:a?a.level+1:-1},d)}))}(null)}(e,(function(e){var t=e.node,n=e.index,i=e.pos,o=e.key,a=e.parentPos,s=e.level,l={node:t,nodes:e.nodes,index:n,key:o,pos:i,level:s},h=NS(o,i);c[i]=l,u[h]=l,l.parent=c[a],l.parent&&(l.parent.children=l.parent.children||[],l.parent.children.push(l)),r&&r(l,d)}),{externalGetKey:l,childrenPropName:a,fieldNames:s}),i&&i(d),d}function BS(e,t){var n=t.expandedKeys,r=t.selectedKeys,i=t.loadedKeys,o=t.loadingKeys,a=t.checkedKeys,s=t.halfCheckedKeys,l=t.dragOverNodeKey,c=t.dropPosition,u=IS(t.keyEntities,e);return{eventKey:e,expanded:-1!==n.indexOf(e),selected:-1!==r.indexOf(e),loaded:-1!==i.indexOf(e),loading:-1!==o.indexOf(e),checked:-1!==a.indexOf(e),halfChecked:-1!==s.indexOf(e),pos:String(u?u.pos:""),dragOver:l===e&&0===c,dragOverGapTop:l===e&&-1===c,dragOverGapBottom:l===e&&1===c}}function jS(e){var t=e.data,n=e.expanded,r=e.selected,i=e.checked,o=e.loaded,a=e.loading,s=e.halfChecked,l=e.dragOver,c=e.dragOverGapTop,u=e.dragOverGapBottom,d=e.pos,h=e.active,f=e.eventKey,p=me(me({},t),{},{expanded:n,selected:r,checked:i,loaded:o,loading:a,halfChecked:s,dragOver:l,dragOverGapTop:c,dragOverGapBottom:u,pos:d,active:h,key:f});return"props"in p||Object.defineProperty(p,"props",{get:function(){return ot(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),p}var zS=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],HS="open",FS="close",WS=function(t){po(r,t);var n=bo(r);function r(){var t;st(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return fe(vo(t=n.call.apply(n,[this].concat(o))),"state",{dragNodeHighlight:!1}),fe(vo(t),"selectHandle",void 0),fe(vo(t),"cacheIndent",void 0),fe(vo(t),"onSelectorClick",(function(e){(0,t.props.context.onNodeClick)(e,jS(t.props)),t.isSelectable()?t.onSelect(e):t.onCheck(e)})),fe(vo(t),"onSelectorDoubleClick",(function(e){(0,t.props.context.onNodeDoubleClick)(e,jS(t.props))})),fe(vo(t),"onSelect",(function(e){t.isDisabled()||(0,t.props.context.onNodeSelect)(e,jS(t.props))})),fe(vo(t),"onCheck",(function(e){if(!t.isDisabled()){var n=t.props,r=n.disableCheckbox,i=n.checked,o=t.props.context.onNodeCheck;if(t.isCheckable()&&!r){var a=!i;o(e,jS(t.props),a)}}})),fe(vo(t),"onMouseEnter",(function(e){(0,t.props.context.onNodeMouseEnter)(e,jS(t.props))})),fe(vo(t),"onMouseLeave",(function(e){(0,t.props.context.onNodeMouseLeave)(e,jS(t.props))})),fe(vo(t),"onContextMenu",(function(e){(0,t.props.context.onNodeContextMenu)(e,jS(t.props))})),fe(vo(t),"onDragStart",(function(e){var n=t.props.context.onNodeDragStart;e.stopPropagation(),t.setState({dragNodeHighlight:!0}),n(e,vo(t));try{e.dataTransfer.setData("text/plain","")}catch(r){}})),fe(vo(t),"onDragEnter",(function(e){var n=t.props.context.onNodeDragEnter;e.preventDefault(),e.stopPropagation(),n(e,vo(t))})),fe(vo(t),"onDragOver",(function(e){var n=t.props.context.onNodeDragOver;e.preventDefault(),e.stopPropagation(),n(e,vo(t))})),fe(vo(t),"onDragLeave",(function(e){var n=t.props.context.onNodeDragLeave;e.stopPropagation(),n(e,vo(t))})),fe(vo(t),"onDragEnd",(function(e){var n=t.props.context.onNodeDragEnd;e.stopPropagation(),t.setState({dragNodeHighlight:!1}),n(e,vo(t))})),fe(vo(t),"onDrop",(function(e){var n=t.props.context.onNodeDrop;e.preventDefault(),e.stopPropagation(),t.setState({dragNodeHighlight:!1}),n(e,vo(t))})),fe(vo(t),"onExpand",(function(e){var n=t.props,r=n.loading,i=n.context.onNodeExpand;r||i(e,jS(t.props))})),fe(vo(t),"setSelectHandle",(function(e){t.selectHandle=e})),fe(vo(t),"getNodeState",(function(){var e=t.props.expanded;return t.isLeaf()?null:e?HS:FS})),fe(vo(t),"hasChildren",(function(){var e=t.props.eventKey;return!!((IS(t.props.context.keyEntities,e)||{}).children||[]).length})),fe(vo(t),"isLeaf",(function(){var e=t.props,n=e.isLeaf,r=e.loaded,i=t.props.context.loadData,o=t.hasChildren();return!1!==n&&(n||!i&&!o||i&&r&&!o)})),fe(vo(t),"isDisabled",(function(){var e=t.props.disabled;return!(!t.props.context.disabled&&!e)})),fe(vo(t),"isCheckable",(function(){var e=t.props.checkable,n=t.props.context.checkable;return!(!n||!1===e)&&n})),fe(vo(t),"syncLoadData",(function(e){var n=e.expanded,r=e.loading,i=e.loaded,o=t.props.context,a=o.loadData,s=o.onNodeLoad;r||a&&n&&!t.isLeaf()&&!i&&s(jS(t.props))})),fe(vo(t),"isDraggable",(function(){var e=t.props,n=e.data,r=e.context.draggable;return!(!r||r.nodeDraggable&&!r.nodeDraggable(n))})),fe(vo(t),"renderDragHandler",(function(){var n=t.props.context,r=n.draggable,i=n.prefixCls;return null!==r&&void 0!==r&&r.icon?e.createElement("span",{className:"".concat(i,"-draggable-icon")},r.icon):null})),fe(vo(t),"renderSwitcherIconDom",(function(e){var n=t.props.switcherIcon,r=t.props.context.switcherIcon,i=n||r;return"function"===typeof i?i(me(me({},t.props),{},{isLeaf:e})):i})),fe(vo(t),"renderSwitcher",(function(){var n=t.props.expanded,r=t.props.context.prefixCls;if(t.isLeaf()){var i=t.renderSwitcherIconDom(!0);return!1!==i?e.createElement("span",{className:Ji()("".concat(r,"-switcher"),"".concat(r,"-switcher-noop"))},i):null}var o=Ji()("".concat(r,"-switcher"),"".concat(r,"-switcher_").concat(n?HS:FS)),a=t.renderSwitcherIconDom(!1);return!1!==a?e.createElement("span",{onClick:t.onExpand,className:o},a):null})),fe(vo(t),"renderCheckbox",(function(){var n=t.props,r=n.checked,i=n.halfChecked,o=n.disableCheckbox,a=t.props.context.prefixCls,s=t.isDisabled(),l=t.isCheckable();if(!l)return null;var c="boolean"!==typeof l?l:null;return e.createElement("span",{className:Ji()("".concat(a,"-checkbox"),r&&"".concat(a,"-checkbox-checked"),!r&&i&&"".concat(a,"-checkbox-indeterminate"),(s||o)&&"".concat(a,"-checkbox-disabled")),onClick:t.onCheck},c)})),fe(vo(t),"renderIcon",(function(){var n=t.props.loading,r=t.props.context.prefixCls;return e.createElement("span",{className:Ji()("".concat(r,"-iconEle"),"".concat(r,"-icon__").concat(t.getNodeState()||"docu"),n&&"".concat(r,"-icon_loading"))})})),fe(vo(t),"renderSelector",(function(){var n,r,i=t.state.dragNodeHighlight,o=t.props,a=o.title,s=void 0===a?"---":a,l=o.selected,c=o.icon,u=o.loading,d=o.data,h=t.props.context,f=h.prefixCls,p=h.showIcon,m=h.icon,g=h.loadData,v=h.titleRender,b=t.isDisabled(),y="".concat(f,"-node-content-wrapper");if(p){var _=c||m;n=_?e.createElement("span",{className:Ji()("".concat(f,"-iconEle"),"".concat(f,"-icon__customize"))},"function"===typeof _?_(t.props):_):t.renderIcon()}else g&&u&&(n=t.renderIcon());r="function"===typeof s?s(d):v?v(d):s;var S=e.createElement("span",{className:"".concat(f,"-title")},r);return e.createElement("span",{ref:t.setSelectHandle,title:"string"===typeof s?s:"",className:Ji()("".concat(y),"".concat(y,"-").concat(t.getNodeState()||"normal"),!b&&(l||i)&&"".concat(f,"-node-selected")),onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,onContextMenu:t.onContextMenu,onClick:t.onSelectorClick,onDoubleClick:t.onSelectorDoubleClick},n,S,t.renderDropIndicator())})),fe(vo(t),"renderDropIndicator",(function(){var e=t.props,n=e.disabled,r=e.eventKey,i=t.props.context,o=i.draggable,a=i.dropLevelOffset,s=i.dropPosition,l=i.prefixCls,c=i.indent,u=i.dropIndicatorRender,d=i.dragOverNodeKey,h=i.direction,f=!n&&!!o&&d===r,p=null!==c&&void 0!==c?c:t.cacheIndent;return t.cacheIndent=c,f?u({dropPosition:s,dropLevelOffset:a,indent:p,prefixCls:l,direction:h}):null})),t}return ct(r,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var e=this.props.selectable,t=this.props.context.selectable;return"boolean"===typeof e?e:t}},{key:"render",value:function(){var t,n=this.props,r=n.eventKey,i=n.className,o=n.style,a=n.dragOver,s=n.dragOverGapTop,l=n.dragOverGapBottom,c=n.isLeaf,u=n.isStart,d=n.isEnd,h=n.expanded,f=n.selected,p=n.checked,m=n.halfChecked,g=n.loading,v=n.domRef,b=n.active,y=(n.data,n.onMouseMove),_=n.selectable,S=lo(n,zS),w=this.props.context,C=w.prefixCls,x=w.filterTreeNode,E=w.keyEntities,k=w.dropContainerKey,O=w.dropTargetKey,$=w.draggingNodeKey,R=this.isDisabled(),I=Rs(S,{aria:!0,data:!0}),M=(IS(E,r)||{}).level,P=d[d.length-1],N=this.isDraggable(),L=!R&&N,T=$===r,D=void 0!==_?{"aria-selected":!!_}:void 0;return e.createElement("div",Gt({ref:v,className:Ji()(i,"".concat(C,"-treenode"),(t={},fe(fe(fe(fe(fe(fe(fe(fe(fe(fe(t,"".concat(C,"-treenode-disabled"),R),"".concat(C,"-treenode-switcher-").concat(h?"open":"close"),!c),"".concat(C,"-treenode-checkbox-checked"),p),"".concat(C,"-treenode-checkbox-indeterminate"),m),"".concat(C,"-treenode-selected"),f),"".concat(C,"-treenode-loading"),g),"".concat(C,"-treenode-active"),b),"".concat(C,"-treenode-leaf-last"),P),"".concat(C,"-treenode-draggable"),N),"dragging",T),fe(fe(fe(fe(fe(fe(t,"drop-target",O===r),"drop-container",k===r),"drag-over",!R&&a),"drag-over-gap-top",!R&&s),"drag-over-gap-bottom",!R&&l),"filter-node",x&&x(jS(this.props))))),style:o,draggable:L,"aria-grabbed":T,onDragStart:L?this.onDragStart:void 0,onDragEnter:N?this.onDragEnter:void 0,onDragOver:N?this.onDragOver:void 0,onDragLeave:N?this.onDragLeave:void 0,onDrop:N?this.onDrop:void 0,onDragEnd:N?this.onDragEnd:void 0,onMouseMove:y},D,I),e.createElement(RS,{prefixCls:C,level:M,isStart:u,isEnd:d}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),r}(e.Component),KS=function(t){return e.createElement(kS.Consumer,null,(function(n){return e.createElement(WS,Gt({},t,{context:n}))}))};KS.displayName="TreeNode",KS.isTreeNode=1;const VS=KS;var US=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],qS=function(t,n){var r=t.className,i=t.style,o=t.motion,a=t.motionNodes,s=t.motionType,l=t.onMotionStart,c=t.onMotionEnd,u=t.active,d=t.treeNodeRequiredProps,h=lo(t,US),f=Be(e.useState(!0),2),p=f[0],m=f[1],g=e.useContext(kS).prefixCls,v=a&&"hide"!==s;Bt((function(){a&&v!==p&&m(v)}),[a]);var b=e.useRef(!1),y=function(){a&&!b.current&&(b.current=!0,c())};!function(t,n){var r=Be(e.useState(!1),2),i=r[0],o=r[1];Bt((function(){if(i)return t(),function(){n()}}),[i]),Bt((function(){return o(!0),function(){o(!1)}}),[])}((function(){a&&l()}),y);return a?e.createElement(va,Gt({ref:n,visible:p},o,{motionAppear:"show"===s,onVisibleChanged:function(e){v===e&&y()}}),(function(t,n){var r=t.className,i=t.style;return e.createElement("div",{ref:n,className:Ji()("".concat(g,"-treenode-motion"),r),style:i},a.map((function(t){var n=Object.assign({},(OS(t.data),t.data)),r=t.title,i=t.key,o=t.isStart,a=t.isEnd;delete n.children;var s=BS(i,d);return e.createElement(VS,Gt({},n,s,{title:r,active:u,data:t.data,key:i,isStart:o,isEnd:a}))})))})):e.createElement(VS,Gt({domRef:n,className:r,style:i},h,{active:u}))};qS.displayName="MotionTreeNode";const XS=e.forwardRef(qS);function GS(e,t,n){var r=e.findIndex((function(e){return e.key===n})),i=e[r+1],o=t.findIndex((function(e){return e.key===n}));if(i){var a=t.findIndex((function(e){return e.key===i.key}));return t.slice(o+1,a)}return t.slice(o+1)}var YS=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],QS={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},JS=function(){},ZS="RC_TREE_MOTION_".concat(Math.random()),ew={key:ZS},tw={key:ZS,level:0,index:0,pos:"0",node:ew,nodes:[ew]},nw={parent:null,children:[],pos:tw.pos,data:ew,title:null,key:ZS,isStart:[],isEnd:[]};function rw(e,t,n,r){return!1!==t&&n?e.slice(0,Math.ceil(n/r)+1):e}function iw(e){return NS(e.key,e.pos)}var ow=e.forwardRef((function(t,n){var r=t.prefixCls,i=t.data,o=(t.selectable,t.checkable,t.expandedKeys),a=t.selectedKeys,s=t.checkedKeys,l=t.loadedKeys,c=t.loadingKeys,u=t.halfCheckedKeys,d=t.keyEntities,h=t.disabled,f=t.dragging,p=t.dragOverNodeKey,m=t.dropPosition,g=t.motion,v=t.height,b=t.itemHeight,y=t.virtual,_=t.focusable,S=t.activeItem,w=t.focused,C=t.tabIndex,x=t.onKeyDown,E=t.onFocus,k=t.onBlur,O=t.onActiveChange,$=t.onListChangeStart,R=t.onListChangeEnd,I=lo(t,YS),M=e.useRef(null),P=e.useRef(null);e.useImperativeHandle(n,(function(){return{scrollTo:function(e){M.current.scrollTo(e)},getIndentWidth:function(){return P.current.offsetWidth}}}));var N=Be(e.useState(o),2),L=N[0],T=N[1],D=Be(e.useState(i),2),A=D[0],B=D[1],j=Be(e.useState(i),2),z=j[0],H=j[1],F=Be(e.useState([]),2),W=F[0],K=F[1],V=Be(e.useState(null),2),U=V[0],q=V[1],X=e.useRef(i);function G(){var e=X.current;B(e),H(e),K([]),q(null),R()}X.current=i,Bt((function(){T(o);var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.length,r=t.length;if(1!==Math.abs(n-r))return{add:!1,key:null};function i(e,t){var n=new Map;e.forEach((function(e){n.set(e,!0)}));var r=t.filter((function(e){return!n.has(e)}));return 1===r.length?r[0]:null}return n<r?{add:!0,key:i(e,t)}:{add:!1,key:i(t,e)}}(L,o);if(null!==e.key)if(e.add){var t=A.findIndex((function(t){return t.key===e.key})),n=rw(GS(A,i,e.key),y,v,b),r=A.slice();r.splice(t+1,0,nw),H(r),K(n),q("show")}else{var a=i.findIndex((function(t){return t.key===e.key})),s=rw(GS(i,A,e.key),y,v,b),l=i.slice();l.splice(a+1,0,nw),H(l),K(s),q("hide")}else A!==i&&(B(i),H(i))}),[o,i]),e.useEffect((function(){f||G()}),[f]);var Y=g?z:i,Q={expandedKeys:o,selectedKeys:a,loadedKeys:l,loadingKeys:c,checkedKeys:s,halfCheckedKeys:u,dragOverNodeKey:p,dropPosition:m,keyEntities:d};return e.createElement(e.Fragment,null,w&&S&&e.createElement("span",{style:QS,"aria-live":"assertive"},function(e){for(var t=String(e.data.key),n=e;n.parent;)n=n.parent,t="".concat(n.data.key," > ").concat(t);return t}(S)),e.createElement("div",null,e.createElement("input",{style:QS,disabled:!1===_||h,tabIndex:!1!==_?C:null,onKeyDown:x,onFocus:E,onBlur:k,value:"",onChange:JS,"aria-label":"for screen reader"})),e.createElement("div",{className:"".concat(r,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},e.createElement("div",{className:"".concat(r,"-indent")},e.createElement("div",{ref:P,className:"".concat(r,"-indent-unit")}))),e.createElement(fp,Gt({},I,{data:Y,itemKey:iw,height:v,fullHeight:!1,virtual:y,itemHeight:b,prefixCls:"".concat(r,"-list"),ref:M,onVisibleChange:function(e){e.every((function(e){return iw(e)!==ZS}))&&G()}}),(function(t){var n=t.pos,r=Object.assign({},(OS(t.data),t.data)),i=t.title,o=t.key,a=t.isStart,s=t.isEnd,l=NS(o,n);delete r.key,delete r.children;var c=BS(l,Q);return e.createElement(XS,Gt({},r,c,{title:i,active:!!S&&o===S.key,pos:n,data:t.data,isStart:a,isEnd:s,motion:g,motionNodes:o===ZS?W:null,motionType:U,onMotionStart:$,onMotionEnd:G,treeNodeRequiredProps:Q,onMouseMove:function(){O(null)}}))})))}));ow.displayName="NodeList";const aw=ow;function sw(e,t){if(!e)return[];var n=e.slice(),r=n.indexOf(t);return r>=0&&n.splice(r,1),n}function lw(e,t){var n=(e||[]).slice();return-1===n.indexOf(t)&&n.push(t),n}function cw(e){return e.split("-")}function uw(e,t){var n=[];return function e(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(t){var r=t.key,i=t.children;n.push(r),e(i)}))}(IS(t,e).children),n}function dw(e){if(e.parent){var t=cw(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function hw(e,t,n,r,i,o,a,s,l,c){var u,d=e.clientX,h=e.clientY,f=e.target.getBoundingClientRect(),p=f.top,m=f.height,g=(("rtl"===c?-1:1)*(((null===i||void 0===i?void 0:i.x)||0)-d)-12)/r,v=l.filter((function(e){var t;return null===(t=s[e])||void 0===t||null===(t=t.children)||void 0===t?void 0:t.length})),b=IS(s,n.props.eventKey);if(h<p+m/2){var y=a.findIndex((function(e){return e.key===b.key})),_=a[y<=0?0:y-1].key;b=IS(s,_)}var S=b.key,w=b,C=b.key,x=0,E=0;if(!v.includes(S))for(var k=0;k<g&&dw(b);k+=1)b=b.parent,E+=1;var O=t.props.data,$=b.node,R=!0;return function(e){var t=cw(e.pos);return 0===Number(t[t.length-1])}(b)&&0===b.level&&h<p+m/2&&o({dragNode:O,dropNode:$,dropPosition:-1})&&b.key===n.props.eventKey?x=-1:(w.children||[]).length&&v.includes(C)?o({dragNode:O,dropNode:$,dropPosition:0})?x=0:R=!1:0===E?g>-1.5?o({dragNode:O,dropNode:$,dropPosition:1})?x=1:R=!1:o({dragNode:O,dropNode:$,dropPosition:0})?x=0:o({dragNode:O,dropNode:$,dropPosition:1})?x=1:R=!1:o({dragNode:O,dropNode:$,dropPosition:1})?x=1:R=!1,{dropPosition:x,dropLevelOffset:E,dropTargetKey:b.key,dropTargetPos:b.pos,dragOverNodeKey:C,dropContainerKey:0===x?null:(null===(u=b.parent)||void 0===u?void 0:u.key)||null,dropAllowed:R}}function fw(e,t){if(e)return t.multiple?e.slice():e.length?[e[0]]:e}function pw(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else{if("object"!==le(e))return ot(!1,"`checkedKeys` is not an array or an object"),null;t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0}}return t}function mw(e,t){var n=new Set;function r(e){if(!n.has(e)){var i=IS(t,e);if(i){n.add(e);var o=i.parent;i.node.disabled||o&&r(o.key)}}}return(e||[]).forEach((function(e){r(e)})),se(n)}function gw(e,t){var n=new Set;return e.forEach((function(e){t.has(e)||n.add(e)})),n}function vw(e){var t=e||{},n=t.disabled,r=t.disableCheckbox,i=t.checkable;return!(!n&&!r)||!1===i}function bw(e,t,n,r){var i,o=[];i=r||vw;var a,s=new Set(e.filter((function(e){var t=!!IS(n,e);return t||o.push(e),t}))),l=new Map,c=0;return Object.keys(n).forEach((function(e){var t=n[e],r=t.level,i=l.get(r);i||(i=new Set,l.set(r,i)),i.add(t),c=Math.max(c,r)})),ot(!o.length,"Tree missing follow keys: ".concat(o.slice(0,100).map((function(e){return"'".concat(e,"'")})).join(", "))),a=!0===t?function(e,t,n,r){for(var i=new Set(e),o=new Set,a=0;a<=n;a+=1)(t.get(a)||new Set).forEach((function(e){var t=e.key,n=e.node,o=e.children,a=void 0===o?[]:o;i.has(t)&&!r(n)&&a.filter((function(e){return!r(e.node)})).forEach((function(e){i.add(e.key)}))}));for(var s=new Set,l=n;l>=0;l-=1)(t.get(l)||new Set).forEach((function(e){var t=e.parent,n=e.node;if(!r(n)&&e.parent&&!s.has(e.parent.key))if(r(e.parent.node))s.add(t.key);else{var a=!0,l=!1;(t.children||[]).filter((function(e){return!r(e.node)})).forEach((function(e){var t=e.key,n=i.has(t);a&&!n&&(a=!1),l||!n&&!o.has(t)||(l=!0)})),a&&i.add(t.key),l&&o.add(t.key),s.add(t.key)}}));return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(gw(o,i))}}(s,l,c,i):function(e,t,n,r,i){for(var o=new Set(e),a=new Set(t),s=0;s<=r;s+=1)(n.get(s)||new Set).forEach((function(e){var t=e.key,n=e.node,r=e.children,s=void 0===r?[]:r;o.has(t)||a.has(t)||i(n)||s.filter((function(e){return!i(e.node)})).forEach((function(e){o.delete(e.key)}))}));a=new Set;for(var l=new Set,c=r;c>=0;c-=1)(n.get(c)||new Set).forEach((function(e){var t=e.parent,n=e.node;if(!i(n)&&e.parent&&!l.has(e.parent.key))if(i(e.parent.node))l.add(t.key);else{var r=!0,s=!1;(t.children||[]).filter((function(e){return!i(e.node)})).forEach((function(e){var t=e.key,n=o.has(t);r&&!n&&(r=!1),s||!n&&!a.has(t)||(s=!0)})),r||o.delete(t.key),s&&a.add(t.key),l.add(t.key)}}));return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(gw(a,o))}}(s,t.halfCheckedKeys,l,c,i),a}var yw=function(t){po(r,t);var n=bo(r);function r(){var t;st(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return fe(vo(t=n.call.apply(n,[this].concat(o))),"destroyed",!1),fe(vo(t),"delayedDragEnterLogic",void 0),fe(vo(t),"loadingRetryTimes",{}),fe(vo(t),"state",{keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:LS()}),fe(vo(t),"dragStartMousePosition",null),fe(vo(t),"dragNode",void 0),fe(vo(t),"currentMouseOverDroppableNodeKey",null),fe(vo(t),"listRef",e.createRef()),fe(vo(t),"onNodeDragStart",(function(e,n){var r=t.state,i=r.expandedKeys,o=r.keyEntities,a=t.props.onDragStart,s=n.props.eventKey;t.dragNode=n,t.dragStartMousePosition={x:e.clientX,y:e.clientY};var l=sw(i,s);t.setState({draggingNodeKey:s,dragChildrenKeys:uw(s,o),indent:t.listRef.current.getIndentWidth()}),t.setExpandedKeys(l),window.addEventListener("dragend",t.onWindowDragEnd),null===a||void 0===a||a({event:e,node:jS(n.props)})})),fe(vo(t),"onNodeDragEnter",(function(e,n){var r=t.state,i=r.expandedKeys,o=r.keyEntities,a=r.dragChildrenKeys,s=r.flattenNodes,l=r.indent,c=t.props,u=c.onDragEnter,d=c.onExpand,h=c.allowDrop,f=c.direction,p=n.props,m=p.pos,g=p.eventKey,v=vo(t).dragNode;if(t.currentMouseOverDroppableNodeKey!==g&&(t.currentMouseOverDroppableNodeKey=g),v){var b=hw(e,v,n,l,t.dragStartMousePosition,h,s,o,i,f),y=b.dropPosition,_=b.dropLevelOffset,S=b.dropTargetKey,w=b.dropContainerKey,C=b.dropTargetPos,x=b.dropAllowed,E=b.dragOverNodeKey;-1===a.indexOf(S)&&x?(t.delayedDragEnterLogic||(t.delayedDragEnterLogic={}),Object.keys(t.delayedDragEnterLogic).forEach((function(e){clearTimeout(t.delayedDragEnterLogic[e])})),v.props.eventKey!==n.props.eventKey&&(e.persist(),t.delayedDragEnterLogic[m]=window.setTimeout((function(){if(null!==t.state.draggingNodeKey){var r=se(i),a=IS(o,n.props.eventKey);a&&(a.children||[]).length&&(r=lw(i,n.props.eventKey)),t.props.hasOwnProperty("expandedKeys")||t.setExpandedKeys(r),null===d||void 0===d||d(r,{node:jS(n.props),expanded:!0,nativeEvent:e.nativeEvent})}}),800)),v.props.eventKey!==S||0!==_?(t.setState({dragOverNodeKey:E,dropPosition:y,dropLevelOffset:_,dropTargetKey:S,dropContainerKey:w,dropTargetPos:C,dropAllowed:x}),null===u||void 0===u||u({event:e,node:jS(n.props),expandedKeys:i})):t.resetDragState()):t.resetDragState()}else t.resetDragState()})),fe(vo(t),"onNodeDragOver",(function(e,n){var r=t.state,i=r.dragChildrenKeys,o=r.flattenNodes,a=r.keyEntities,s=r.expandedKeys,l=r.indent,c=t.props,u=c.onDragOver,d=c.allowDrop,h=c.direction,f=vo(t).dragNode;if(f){var p=hw(e,f,n,l,t.dragStartMousePosition,d,o,a,s,h),m=p.dropPosition,g=p.dropLevelOffset,v=p.dropTargetKey,b=p.dropContainerKey,y=p.dropAllowed,_=p.dropTargetPos,S=p.dragOverNodeKey;-1===i.indexOf(v)&&y&&(f.props.eventKey===v&&0===g?null===t.state.dropPosition&&null===t.state.dropLevelOffset&&null===t.state.dropTargetKey&&null===t.state.dropContainerKey&&null===t.state.dropTargetPos&&!1===t.state.dropAllowed&&null===t.state.dragOverNodeKey||t.resetDragState():m===t.state.dropPosition&&g===t.state.dropLevelOffset&&v===t.state.dropTargetKey&&b===t.state.dropContainerKey&&_===t.state.dropTargetPos&&y===t.state.dropAllowed&&S===t.state.dragOverNodeKey||t.setState({dropPosition:m,dropLevelOffset:g,dropTargetKey:v,dropContainerKey:b,dropTargetPos:_,dropAllowed:y,dragOverNodeKey:S}),null===u||void 0===u||u({event:e,node:jS(n.props)}))}})),fe(vo(t),"onNodeDragLeave",(function(e,n){t.currentMouseOverDroppableNodeKey!==n.props.eventKey||e.currentTarget.contains(e.relatedTarget)||(t.resetDragState(),t.currentMouseOverDroppableNodeKey=null);var r=t.props.onDragLeave;null===r||void 0===r||r({event:e,node:jS(n.props)})})),fe(vo(t),"onWindowDragEnd",(function(e){t.onNodeDragEnd(e,null,!0),window.removeEventListener("dragend",t.onWindowDragEnd)})),fe(vo(t),"onNodeDragEnd",(function(e,n){var r=t.props.onDragEnd;t.setState({dragOverNodeKey:null}),t.cleanDragState(),null===r||void 0===r||r({event:e,node:jS(n.props)}),t.dragNode=null,window.removeEventListener("dragend",t.onWindowDragEnd)})),fe(vo(t),"onNodeDrop",(function(e,n){var r,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=t.state,a=o.dragChildrenKeys,s=o.dropPosition,l=o.dropTargetKey,c=o.dropTargetPos;if(o.dropAllowed){var u=t.props.onDrop;if(t.setState({dragOverNodeKey:null}),t.cleanDragState(),null!==l){var d=me(me({},BS(l,t.getTreeNodeRequiredProps())),{},{active:(null===(r=t.getActiveItem())||void 0===r?void 0:r.key)===l,data:IS(t.state.keyEntities,l).node}),h=-1!==a.indexOf(l);ot(!h,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var f=cw(c),p={event:e,node:jS(d),dragNode:t.dragNode?jS(t.dragNode.props):null,dragNodesKeys:[t.dragNode.props.eventKey].concat(a),dropToGap:0!==s,dropPosition:s+Number(f[f.length-1])};i||null===u||void 0===u||u(p),t.dragNode=null}}})),fe(vo(t),"cleanDragState",(function(){null!==t.state.draggingNodeKey&&t.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),t.dragStartMousePosition=null,t.currentMouseOverDroppableNodeKey=null})),fe(vo(t),"triggerExpandActionExpand",(function(e,n){var r=t.state,i=r.expandedKeys,o=r.flattenNodes,a=n.expanded,s=n.key;if(!(n.isLeaf||e.shiftKey||e.metaKey||e.ctrlKey)){var l=o.filter((function(e){return e.key===s}))[0],c=jS(me(me({},BS(s,t.getTreeNodeRequiredProps())),{},{data:l.data}));t.setExpandedKeys(a?sw(i,s):lw(i,s)),t.onNodeExpand(e,c)}})),fe(vo(t),"onNodeClick",(function(e,n){var r=t.props,i=r.onClick;"click"===r.expandAction&&t.triggerExpandActionExpand(e,n),null===i||void 0===i||i(e,n)})),fe(vo(t),"onNodeDoubleClick",(function(e,n){var r=t.props,i=r.onDoubleClick;"doubleClick"===r.expandAction&&t.triggerExpandActionExpand(e,n),null===i||void 0===i||i(e,n)})),fe(vo(t),"onNodeSelect",(function(e,n){var r=t.state.selectedKeys,i=t.state,o=i.keyEntities,a=i.fieldNames,s=t.props,l=s.onSelect,c=s.multiple,u=n.selected,d=n[a.key],h=!u,f=(r=h?c?lw(r,d):[d]:sw(r,d)).map((function(e){var t=IS(o,e);return t?t.node:null})).filter((function(e){return e}));t.setUncontrolledState({selectedKeys:r}),null===l||void 0===l||l(r,{event:"select",selected:h,node:n,selectedNodes:f,nativeEvent:e.nativeEvent})})),fe(vo(t),"onNodeCheck",(function(e,n,r){var i,o=t.state,a=o.keyEntities,s=o.checkedKeys,l=o.halfCheckedKeys,c=t.props,u=c.checkStrictly,d=c.onCheck,h=n.key,f={event:"check",node:n,checked:r,nativeEvent:e.nativeEvent};if(u){var p=r?lw(s,h):sw(s,h);i={checked:p,halfChecked:sw(l,h)},f.checkedNodes=p.map((function(e){return IS(a,e)})).filter((function(e){return e})).map((function(e){return e.node})),t.setUncontrolledState({checkedKeys:p})}else{var m=bw([].concat(se(s),[h]),!0,a),g=m.checkedKeys,v=m.halfCheckedKeys;if(!r){var b=new Set(g);b.delete(h);var y=bw(Array.from(b),{checked:!1,halfCheckedKeys:v},a);g=y.checkedKeys,v=y.halfCheckedKeys}i=g,f.checkedNodes=[],f.checkedNodesPositions=[],f.halfCheckedKeys=v,g.forEach((function(e){var t=IS(a,e);if(t){var n=t.node,r=t.pos;f.checkedNodes.push(n),f.checkedNodesPositions.push({node:n,pos:r})}})),t.setUncontrolledState({checkedKeys:g},!1,{halfCheckedKeys:v})}null===d||void 0===d||d(i,f)})),fe(vo(t),"onNodeLoad",(function(e){var n,r=e.key,i=IS(t.state.keyEntities,r);if(null===i||void 0===i||null===(n=i.children)||void 0===n||!n.length){var o=new Promise((function(n,i){t.setState((function(o){var a=o.loadedKeys,s=void 0===a?[]:a,l=o.loadingKeys,c=void 0===l?[]:l,u=t.props,d=u.loadData,h=u.onLoad;return d&&-1===s.indexOf(r)&&-1===c.indexOf(r)?(d(e).then((function(){var i=lw(t.state.loadedKeys,r);null===h||void 0===h||h(i,{event:"load",node:e}),t.setUncontrolledState({loadedKeys:i}),t.setState((function(e){return{loadingKeys:sw(e.loadingKeys,r)}})),n()})).catch((function(e){if(t.setState((function(e){return{loadingKeys:sw(e.loadingKeys,r)}})),t.loadingRetryTimes[r]=(t.loadingRetryTimes[r]||0)+1,t.loadingRetryTimes[r]>=10){var o=t.state.loadedKeys;ot(!1,"Retry for `loadData` many times but still failed. No more retry."),t.setUncontrolledState({loadedKeys:lw(o,r)}),n()}i(e)})),{loadingKeys:lw(c,r)}):null}))}));return o.catch((function(){})),o}})),fe(vo(t),"onNodeMouseEnter",(function(e,n){var r=t.props.onMouseEnter;null===r||void 0===r||r({event:e,node:n})})),fe(vo(t),"onNodeMouseLeave",(function(e,n){var r=t.props.onMouseLeave;null===r||void 0===r||r({event:e,node:n})})),fe(vo(t),"onNodeContextMenu",(function(e,n){var r=t.props.onRightClick;r&&(e.preventDefault(),r({event:e,node:n}))})),fe(vo(t),"onFocus",(function(){var e=t.props.onFocus;t.setState({focused:!0});for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];null===e||void 0===e||e.apply(void 0,r)})),fe(vo(t),"onBlur",(function(){var e=t.props.onBlur;t.setState({focused:!1}),t.onActiveChange(null);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];null===e||void 0===e||e.apply(void 0,r)})),fe(vo(t),"getTreeNodeRequiredProps",(function(){var e=t.state;return{expandedKeys:e.expandedKeys||[],selectedKeys:e.selectedKeys||[],loadedKeys:e.loadedKeys||[],loadingKeys:e.loadingKeys||[],checkedKeys:e.checkedKeys||[],halfCheckedKeys:e.halfCheckedKeys||[],dragOverNodeKey:e.dragOverNodeKey,dropPosition:e.dropPosition,keyEntities:e.keyEntities}})),fe(vo(t),"setExpandedKeys",(function(e){var n=t.state,r=DS(n.treeData,e,n.fieldNames);t.setUncontrolledState({expandedKeys:e,flattenNodes:r},!0)})),fe(vo(t),"onNodeExpand",(function(e,n){var r=t.state.expandedKeys,i=t.state,o=i.listChanging,a=i.fieldNames,s=t.props,l=s.onExpand,c=s.loadData,u=n.expanded,d=n[a.key];if(!o){var h=r.indexOf(d),f=!u;if(ot(u&&-1!==h||!u&&-1===h,"Expand state not sync with index check"),r=f?lw(r,d):sw(r,d),t.setExpandedKeys(r),null===l||void 0===l||l(r,{node:n,expanded:f,nativeEvent:e.nativeEvent}),f&&c){var p=t.onNodeLoad(n);p&&p.then((function(){var e=DS(t.state.treeData,r,a);t.setUncontrolledState({flattenNodes:e})})).catch((function(){var e=sw(t.state.expandedKeys,d);t.setExpandedKeys(e)}))}}})),fe(vo(t),"onListChangeStart",(function(){t.setUncontrolledState({listChanging:!0})})),fe(vo(t),"onListChangeEnd",(function(){setTimeout((function(){t.setUncontrolledState({listChanging:!1})}))})),fe(vo(t),"onActiveChange",(function(e){var n=t.state.activeKey,r=t.props,i=r.onActiveChange,o=r.itemScrollOffset,a=void 0===o?0:o;n!==e&&(t.setState({activeKey:e}),null!==e&&t.scrollTo({key:e,offset:a}),null===i||void 0===i||i(e))})),fe(vo(t),"getActiveItem",(function(){var e=t.state,n=e.activeKey,r=e.flattenNodes;return null===n?null:r.find((function(e){return e.key===n}))||null})),fe(vo(t),"offsetActiveKey",(function(e){var n=t.state,r=n.flattenNodes,i=n.activeKey,o=r.findIndex((function(e){return e.key===i}));-1===o&&e<0&&(o=r.length);var a=r[o=(o+e+r.length)%r.length];if(a){var s=a.key;t.onActiveChange(s)}else t.onActiveChange(null)})),fe(vo(t),"onKeyDown",(function(e){var n=t.state,r=n.activeKey,i=n.expandedKeys,o=n.checkedKeys,a=n.fieldNames,s=t.props,l=s.onKeyDown,c=s.checkable,u=s.selectable;switch(e.which){case ks.UP:t.offsetActiveKey(-1),e.preventDefault();break;case ks.DOWN:t.offsetActiveKey(1),e.preventDefault()}var d=t.getActiveItem();if(d&&d.data){var h=t.getTreeNodeRequiredProps(),f=!1===d.data.isLeaf||!!(d.data[a.children]||[]).length,p=jS(me(me({},BS(r,h)),{},{data:d.data,active:!0}));switch(e.which){case ks.LEFT:f&&i.includes(r)?t.onNodeExpand({},p):d.parent&&t.onActiveChange(d.parent.key),e.preventDefault();break;case ks.RIGHT:f&&!i.includes(r)?t.onNodeExpand({},p):d.children&&d.children.length&&t.onActiveChange(d.children[0].key),e.preventDefault();break;case ks.ENTER:case ks.SPACE:!c||p.disabled||!1===p.checkable||p.disableCheckbox?c||!u||p.disabled||!1===p.selectable||t.onNodeSelect({},p):t.onNodeCheck({},p,!o.includes(r))}}null===l||void 0===l||l(e)})),fe(vo(t),"setUncontrolledState",(function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t.destroyed){var i=!1,o=!0,a={};Object.keys(e).forEach((function(n){t.props.hasOwnProperty(n)?o=!1:(i=!0,a[n]=e[n])})),!i||n&&!o||t.setState(me(me({},a),r))}})),fe(vo(t),"scrollTo",(function(e){t.listRef.current.scrollTo(e)})),t}return ct(r,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var e=this.props,t=e.activeKey,n=e.itemScrollOffset,r=void 0===n?0:n;void 0!==t&&t!==this.state.activeKey&&(this.setState({activeKey:t}),null!==t&&this.scrollTo({key:t,offset:r}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var t,n=this.state,r=n.focused,i=n.flattenNodes,o=n.keyEntities,a=n.draggingNodeKey,s=n.activeKey,l=n.dropLevelOffset,c=n.dropContainerKey,u=n.dropTargetKey,d=n.dropPosition,h=n.dragOverNodeKey,f=n.indent,p=this.props,m=p.prefixCls,g=p.className,v=p.style,b=p.showLine,y=p.focusable,_=p.tabIndex,S=void 0===_?0:_,w=p.selectable,C=p.showIcon,x=p.icon,E=p.switcherIcon,k=p.draggable,O=p.checkable,$=p.checkStrictly,R=p.disabled,I=p.motion,M=p.loadData,P=p.filterTreeNode,N=p.height,L=p.itemHeight,T=p.virtual,D=p.titleRender,A=p.dropIndicatorRender,B=p.onContextMenu,j=p.onScroll,z=p.direction,H=p.rootClassName,F=p.rootStyle,W=Rs(this.props,{aria:!0,data:!0});return k&&(t="object"===le(k)?k:"function"===typeof k?{nodeDraggable:k}:{}),e.createElement(kS.Provider,{value:{prefixCls:m,selectable:w,showIcon:C,icon:x,switcherIcon:E,draggable:t,draggingNodeKey:a,checkable:O,checkStrictly:$,disabled:R,keyEntities:o,dropLevelOffset:l,dropContainerKey:c,dropTargetKey:u,dropPosition:d,dragOverNodeKey:h,indent:f,direction:z,dropIndicatorRender:A,loadData:M,filterTreeNode:P,titleRender:D,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop}},e.createElement("div",{role:"tree",className:Ji()(m,g,H,fe(fe(fe({},"".concat(m,"-show-line"),b),"".concat(m,"-focused"),r),"".concat(m,"-active-focused"),null!==s)),style:F},e.createElement(aw,Gt({ref:this.listRef,prefixCls:m,style:v,data:i,disabled:R,selectable:w,checkable:!!O,motion:I,dragging:null!==a,height:N,itemHeight:L,virtual:T,focusable:y,focused:r,tabIndex:S,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:B,onScroll:j},this.getTreeNodeRequiredProps(),W))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n,r=t.prevProps,i={prevProps:e};function o(t){return!r&&e.hasOwnProperty(t)||r&&r[t]!==e[t]}var a=t.fieldNames;if(o("fieldNames")&&(a=LS(e.fieldNames),i.fieldNames=a),o("treeData")?n=e.treeData:o("children")&&(ot(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),n=TS(e.children)),n){i.treeData=n;var s=AS(n,{fieldNames:a});i.keyEntities=me(fe({},ZS,tw),s.keyEntities)}var l,c=i.keyEntities||t.keyEntities;if(o("expandedKeys")||r&&o("autoExpandParent"))i.expandedKeys=e.autoExpandParent||!r&&e.defaultExpandParent?mw(e.expandedKeys,c):e.expandedKeys;else if(!r&&e.defaultExpandAll){var u=me({},c);delete u[ZS];var d=[];Object.keys(u).forEach((function(e){var t=u[e];t.children&&t.children.length&&d.push(t.key)})),i.expandedKeys=d}else!r&&e.defaultExpandedKeys&&(i.expandedKeys=e.autoExpandParent||e.defaultExpandParent?mw(e.defaultExpandedKeys,c):e.defaultExpandedKeys);if(i.expandedKeys||delete i.expandedKeys,n||i.expandedKeys){var h=DS(n||t.treeData,i.expandedKeys||t.expandedKeys,a);i.flattenNodes=h}if((e.selectable&&(o("selectedKeys")?i.selectedKeys=fw(e.selectedKeys,e):!r&&e.defaultSelectedKeys&&(i.selectedKeys=fw(e.defaultSelectedKeys,e))),e.checkable)&&(o("checkedKeys")?l=pw(e.checkedKeys)||{}:!r&&e.defaultCheckedKeys?l=pw(e.defaultCheckedKeys)||{}:n&&(l=pw(e.checkedKeys)||{checkedKeys:t.checkedKeys,halfCheckedKeys:t.halfCheckedKeys}),l)){var f=l,p=f.checkedKeys,m=void 0===p?[]:p,g=f.halfCheckedKeys,v=void 0===g?[]:g;if(!e.checkStrictly){var b=bw(m,!0,c);m=b.checkedKeys,v=b.halfCheckedKeys}i.checkedKeys=m,i.halfCheckedKeys=v}return o("loadedKeys")&&(i.loadedKeys=e.loadedKeys),i}}]),r}(e.Component);fe(yw,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:function(t){var n=t.dropPosition,r=t.dropLevelOffset,i=t.indent,o={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(n){case-1:o.top=0,o.left=-r*i;break;case 1:o.bottom=0,o.left=-r*i;break;case 0:o.bottom=0,o.left=i}return e.createElement("div",{style:o})},allowDrop:function(){return!0},expandAction:!1}),fe(yw,"TreeNode",VS);const _w=yw;const Sw={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"};var ww=function(t,n){return e.createElement(us,Gt({},t,{ref:n,icon:Sw}))};const Cw=e.forwardRef(ww);const xw={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"};var Ew=function(t,n){return e.createElement(us,Gt({},t,{ref:n,icon:xw}))};const kw=e.forwardRef(Ew);const Ow={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"};var $w=function(t,n){return e.createElement(us,Gt({},t,{ref:n,icon:Ow}))};const Rw=e.forwardRef($w);const Iw={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"};var Mw=function(t,n){return e.createElement(us,Gt({},t,{ref:n,icon:Iw}))};const Pw=e.forwardRef(Mw),Nw=e=>{const{checkboxCls:t}=e,n=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},Ma(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[n]:Object.assign(Object.assign({},Ma(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${n}`]:{marginInlineStart:0},[`&${n}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[t]:Object.assign(Object.assign({},Ma(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:e.borderRadiusSM,alignSelf:"center",[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:Object.assign({},Na(e))},[`${t}-inner`]:{boxSizing:"border-box",display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${It(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:e.calc(e.checkboxSize).div(14).mul(5).equal(),height:e.calc(e.checkboxSize).div(14).mul(8).equal(),border:`${It(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[`\n ${n}:not(${n}-disabled),\n ${t}:not(${t}-disabled)\n `]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${n}:not(${n}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}}},[`\n ${n}-checked:not(${n}-disabled),\n ${t}-checked:not(${t}-disabled)\n `]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[t]:{"&-indeterminate":{[`${t}-inner`]:{backgroundColor:`${e.colorBgContainer} !important`,borderColor:`${e.colorBorder} !important`,"&:after":{top:"50%",insetInlineStart:"50%",width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}},[`&:hover ${t}-inner`]:{backgroundColor:`${e.colorBgContainer} !important`,borderColor:`${e.colorPrimary} !important`}}}},{[`${n}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]};function Lw(e,t){const n=ol(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});return[Nw(n)]}const Tw=ml("Checkbox",((e,t)=>{let{prefixCls:n}=t;return[Lw(n,e)]})),Dw=e=>{let{treeCls:t,treeNodeCls:n,directoryNodeSelectedBg:r,directoryNodeSelectedColor:i,motionDurationMid:o,borderRadius:a,controlItemBgHover:s}=e;return{[`${t}${t}-directory ${n}`]:{[`${t}-node-content-wrapper`]:{position:"static",[`> *:not(${t}-drop-indicator)`]:{position:"relative"},"&:hover":{background:"transparent"},"&:before":{position:"absolute",inset:0,transition:`background-color ${o}`,content:'""',borderRadius:a},"&:hover:before":{background:s}},[`${t}-switcher`]:{marginInlineEnd:0},"&-selected":{[`${t}-switcher, ${t}-draggable-icon`]:{color:i,zIndex:1},[`${t}-node-content-wrapper`]:{color:i,background:"transparent","&:before, &:hover:before":{background:r}}}}}},Aw=new Zn("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),Bw=(e,t)=>({[`.${e}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${t.motionDurationSlow}`}}}),jw=(e,t)=>({[`.${e}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:t.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${It(t.lineWidthBold)} solid ${t.colorPrimary}`,borderRadius:"50%",content:'""'}}}),zw=(e,t)=>{const{treeCls:n,treeNodeCls:r,treeNodePadding:i,titleHeight:o,indentSize:a,nodeSelectedBg:s,nodeHoverBg:l,colorTextQuaternary:c}=t,u=t.marginXXS;return{[n]:Object.assign(Object.assign({},Ma(t)),{background:t.colorBgContainer,borderRadius:t.borderRadius,transition:`background-color ${t.motionDurationSlow}`,"&-rtl":{direction:"rtl"},[`&${n}-rtl ${n}-switcher_close ${n}-switcher-icon svg`]:{transform:"rotate(90deg)"},[`&-focused:not(:hover):not(${n}-active-focused)`]:Object.assign({},Na(t)),[`${n}-list-holder-inner`]:{alignItems:"flex-start"},[`&${n}-block-node`]:{[`${n}-list-holder-inner`]:{alignItems:"stretch",[`${n}-node-content-wrapper`]:{flex:"auto"},[`${r}.dragging:after`]:{position:"absolute",inset:0,border:`1px solid ${t.colorPrimary}`,opacity:0,animationName:Aw,animationDuration:t.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none",borderRadius:t.borderRadius}}},[r]:{display:"flex",alignItems:"flex-start",marginBottom:i,lineHeight:It(o),position:"relative","&:before":{content:'""',position:"absolute",zIndex:1,insetInlineStart:0,width:"100%",top:"100%",height:i},[`&-disabled ${n}-node-content-wrapper`]:{color:t.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}},[`&:not(${r}-disabled)`]:{[`${n}-node-content-wrapper`]:{"&:hover":{color:t.nodeHoverColor}}},[`&-active ${n}-node-content-wrapper`]:{background:t.controlItemBgHover},[`&:not(${r}-disabled).filter-node ${n}-title`]:{color:t.colorPrimary,fontWeight:500},"&-draggable":{cursor:"grab",[`${n}-draggable-icon`]:{flexShrink:0,width:o,textAlign:"center",visibility:"visible",color:c},[`&${r}-disabled ${n}-draggable-icon`]:{visibility:"hidden"}}},[`${n}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:a}},[`${n}-draggable-icon`]:{visibility:"hidden"},[`${n}-switcher`]:Object.assign(Object.assign({},Bw(e,t)),{position:"relative",flex:"none",alignSelf:"stretch",width:o,margin:0,textAlign:"center",cursor:"pointer",userSelect:"none",transition:`all ${t.motionDurationSlow}`,marginInlineEnd:t.calc(t.calc(o).sub(t.controlInteractiveSize)).div(2).equal(),"&-noop":{cursor:"unset"},"&:before":{pointerEvents:"none",content:'""',width:o,height:o,position:"absolute",left:{_skip_check_:!0,value:0},top:0,borderRadius:t.borderRadius,transition:`all ${t.motionDurationSlow}`},[`&:not(${n}-switcher-noop):hover:before`]:{backgroundColor:t.colorBgTextHover},[`&_close ${n}-switcher-icon svg`]:{transform:"rotate(-90deg)"},"&-loading-icon":{color:t.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(o).div(2).equal(),bottom:t.calc(i).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:t.calc(t.calc(o).div(2).equal()).mul(.8).equal(),height:t.calc(o).div(2).equal(),borderBottom:`1px solid ${t.colorBorder}`,content:'""'}}}),[`${n}-checkbox`]:{top:"initial",marginInlineEnd:u,alignSelf:"flex-start",marginTop:t.marginXXS},[`${n}-node-content-wrapper`]:Object.assign(Object.assign({position:"relative",minHeight:o,paddingBlock:0,paddingInline:t.paddingXS,background:"transparent",borderRadius:t.borderRadius,cursor:"pointer",transition:`all ${t.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`},jw(e,t)),{"&:hover":{backgroundColor:l},[`&${n}-node-selected`]:{color:t.nodeSelectedColor,backgroundColor:s},[`${n}-iconEle`]:{display:"inline-block",width:o,height:o,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}}),[`${n}-unselectable ${n}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${r}.drop-container > [draggable]`]:{boxShadow:`0 0 0 2px ${t.colorPrimary}`},"&-show-line":{[`${n}-indent-unit`]:{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(o).div(2).equal(),bottom:t.calc(i).mul(-1).equal(),borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&-end:before":{display:"none"}},[`${n}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${r}-leaf-last ${n}-switcher-leaf-line:before`]:{top:"auto !important",bottom:"auto !important",height:`${It(t.calc(o).div(2).equal())} !important`}})}},Hw=(e,t)=>{const n=`.${e}`,r=`${n}-treenode`,i=t.calc(t.paddingXS).div(2).equal(),o=ol(t,{treeCls:n,treeNodeCls:r,treeNodePadding:i});return[zw(e,o),Dw(o)]},Fw=ml("Tree",((e,t)=>{let{prefixCls:n}=t;return[{[e.componentCls]:Lw(`${n}-checkbox`,e)},Hw(n,e),F_(e)]}),(e=>{const{colorTextLightSolid:t,colorPrimary:n}=e;return Object.assign(Object.assign({},(e=>{const{controlHeightSM:t,controlItemBgHover:n,controlItemBgActive:r}=e;return{titleHeight:t,indentSize:t,nodeHoverBg:n,nodeHoverColor:e.colorText,nodeSelectedBg:r,nodeSelectedColor:e.colorText}})(e)),{directoryNodeSelectedColor:t,directoryNodeSelectedBg:n})}));const Ww=function(t){const{dropPosition:n,dropLevelOffset:r,prefixCls:i,indent:o,direction:a="ltr"}=t,s="ltr"===a?"left":"right",l="ltr"===a?"right":"left",c={[s]:-r*o+4,[l]:0};switch(n){case-1:c.top=-3;break;case 1:c.bottom=-3;break;default:c.bottom=-3,c[s]=o+4}return e.createElement("div",{style:c,className:`${i}-drop-indicator`})};const Kw={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"};var Vw=function(t,n){return e.createElement(us,Gt({},t,{ref:n,icon:Kw}))};const Uw=e.forwardRef(Vw);const qw={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"};var Xw=function(t,n){return e.createElement(us,Gt({},t,{ref:n,icon:qw}))};const Gw=e.forwardRef(Xw);const Yw={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"};var Qw=function(t,n){return e.createElement(us,Gt({},t,{ref:n,icon:Yw}))};const Jw=e.forwardRef(Qw),Zw=t=>{const{prefixCls:n,switcherIcon:r,treeNodeProps:i,showLine:o,switcherLoadingIcon:a}=t,{isLeaf:s,expanded:l,loading:c}=i;if(c)return e.isValidElement(a)?a:e.createElement(xs,{className:`${n}-switcher-loading-icon`});let u;if(o&&"object"===typeof o&&(u=o.showLeafIcon),s){if(!o)return null;if("boolean"!==typeof u&&u){const t="function"===typeof u?u(i):u,r=`${n}-switcher-line-custom-icon`;return e.isValidElement(t)?Yl(t,{className:Ji()(t.props.className||"",r)}):t}return u?e.createElement(Cw,{className:`${n}-switcher-line-icon`}):e.createElement("span",{className:`${n}-switcher-leaf-line`})}const d=`${n}-switcher-icon`,h="function"===typeof r?r(i):r;return e.isValidElement(h)?Yl(h,{className:Ji()(h.props.className||"",d)}):void 0!==h?h:o?l?e.createElement(Gw,{className:`${n}-switcher-line-icon`}):e.createElement(Jw,{className:`${n}-switcher-line-icon`}):e.createElement(Uw,{className:d})};const eC=e.forwardRef(((t,n)=>{var r;const{getPrefixCls:i,direction:o,virtual:a,tree:s}=e.useContext(Le),{prefixCls:l,className:c,showIcon:u=!1,showLine:d,switcherIcon:h,switcherLoadingIcon:f,blockNode:p=!1,children:m,checkable:g=!1,selectable:v=!0,draggable:b,motion:y,style:_}=t,S=i("tree",l),w=i(),C=null!==y&&void 0!==y?y:Object.assign(Object.assign({},mh(w)),{motionAppear:!1}),x=Object.assign(Object.assign({},t),{checkable:g,selectable:v,showIcon:u,motion:C,blockNode:p,showLine:Boolean(d),dropIndicatorRender:Ww}),[E,k,O]=Fw(S),[,$]=Oa(),R=$.paddingXS/2+((null===(r=$.Tree)||void 0===r?void 0:r.titleHeight)||$.controlHeightSM),I=e.useMemo((()=>{if(!b)return!1;let t={};switch(typeof b){case"function":t.nodeDraggable=b;break;case"object":t=Object.assign({},b)}return!1!==t.icon&&(t.icon=t.icon||e.createElement(Pw,null)),t}),[b]);return E(e.createElement(_w,Object.assign({itemHeight:R,ref:n,virtual:a},x,{style:Object.assign(Object.assign({},null===s||void 0===s?void 0:s.style),_),prefixCls:S,className:Ji()({[`${S}-icon-hide`]:!u,[`${S}-block-node`]:p,[`${S}-unselectable`]:!v,[`${S}-rtl`]:"rtl"===o},null===s||void 0===s?void 0:s.className,c,k,O),direction:o,checkable:g?e.createElement("span",{className:`${S}-checkbox-inner`}):g,selectable:v,switcherIcon:t=>e.createElement(Zw,{prefixCls:S,switcherIcon:h,switcherLoadingIcon:f,treeNodeProps:t,showLine:d}),draggable:I}),m))}));function tC(e,t,n){const{key:r,children:i}=n;e.forEach((function(e){const o=e[r],a=e[i];!1!==t(o,e)&&tC(a||[],t,n)}))}function nC(e){let{treeData:t,expandedKeys:n,startKey:r,endKey:i,fieldNames:o}=e;const a=[];let s=0;if(r&&r===i)return[r];if(!r||!i)return[];return tC(t,(e=>{if(2===s)return!1;if(function(e){return e===r||e===i}(e)){if(a.push(e),0===s)s=1;else if(1===s)return s=2,!1}else 1===s&&a.push(e);return n.includes(e)}),LS(o)),a}function rC(e,t,n){const r=se(t),i=[];return tC(e,((e,t)=>{const n=r.indexOf(e);return-1!==n&&(i.push(t),r.splice(n,1)),!!r.length}),LS(n)),i}var iC=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function oC(t){const{isLeaf:n,expanded:r}=t;return n?e.createElement(Cw,null):r?e.createElement(kw,null):e.createElement(Rw,null)}function aC(e){let{treeData:t,children:n}=e;return t||TS(n)}const sC=(t,n)=>{var{defaultExpandAll:r,defaultExpandParent:i,defaultExpandedKeys:o}=t,a=iC(t,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const s=e.useRef(),l=e.useRef(),[c,u]=e.useState(a.selectedKeys||a.defaultSelectedKeys||[]),[d,h]=e.useState((()=>(()=>{const{keyEntities:e}=AS(aC(a));let t;return t=r?Object.keys(e):i?mw(a.expandedKeys||o||[],e):a.expandedKeys||o||[],t})()));e.useEffect((()=>{"selectedKeys"in a&&u(a.selectedKeys)}),[a.selectedKeys]),e.useEffect((()=>{"expandedKeys"in a&&h(a.expandedKeys)}),[a.expandedKeys]);const{getPrefixCls:f,direction:p}=e.useContext(Le),{prefixCls:m,className:g,showIcon:v=!0,expandAction:b="click"}=a,y=iC(a,["prefixCls","className","showIcon","expandAction"]),_=f("tree",m),S=Ji()(`${_}-directory`,{[`${_}-directory-rtl`]:"rtl"===p},g);return e.createElement(eC,Object.assign({icon:oC,ref:n,blockNode:!0},y,{showIcon:v,expandAction:b,prefixCls:_,className:S,expandedKeys:d,selectedKeys:c,onSelect:(e,t)=>{var n;const{multiple:r,fieldNames:i}=a,{node:o,nativeEvent:c}=t,{key:h=""}=o,f=aC(a),p=Object.assign(Object.assign({},t),{selected:!0}),m=(null===c||void 0===c?void 0:c.ctrlKey)||(null===c||void 0===c?void 0:c.metaKey),g=null===c||void 0===c?void 0:c.shiftKey;let v;r&&m?(v=e,s.current=h,l.current=v,p.selectedNodes=rC(f,v,i)):r&&g?(v=Array.from(new Set([].concat(se(l.current||[]),se(nC({treeData:f,expandedKeys:d,startKey:h,endKey:s.current,fieldNames:i}))))),p.selectedNodes=rC(f,v,i)):(v=[h],s.current=h,l.current=v,p.selectedNodes=rC(f,v,i)),null===(n=a.onSelect)||void 0===n||n.call(a,v,p),"selectedKeys"in a||u(v)},onExpand:(e,t)=>{var n;return"expandedKeys"in a||h(e),null===(n=a.onExpand)||void 0===n?void 0:n.call(a,e,t)}}))};const lC=e.forwardRef(sC),cC=eC;cC.DirectoryTree=lC,cC.TreeNode=VS;const uC=cC;const dC={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};var hC=function(t,n){return e.createElement(us,Gt({},t,{ref:n,icon:dC}))};const fC=e.forwardRef(hC);function pC(e){var t;if(!e)return"plaintext";const n=null===(t=e.split(".").pop())||void 0===t?void 0:t.toLowerCase();return n?e.toLowerCase().endsWith("dockerfile")?"dockerfile":e.toLowerCase().endsWith("makefile")?"makefile":{ts:"typescript",tsx:"typescript",js:"javascript",jsx:"javascript",html:"html",htm:"html",css:"css",scss:"scss",less:"less",json:"json",xml:"xml",svg:"xml",py:"python",java:"java",c:"c",cpp:"cpp",h:"cpp",hpp:"cpp",cs:"csharp",go:"go",rs:"rust",php:"php",rb:"ruby",swift:"swift",kt:"kotlin",scala:"scala",sh:"shell",bash:"shell",zsh:"shell",fish:"shell",yml:"yaml",yaml:"yaml",toml:"toml",ini:"ini",conf:"plaintext",config:"plaintext",md:"markdown",markdown:"markdown",txt:"plaintext",sql:"sql",dockerfile:"dockerfile",dockerignore:"plaintext",gitignore:"plaintext",env:"plaintext"}[n]||"plaintext":"plaintext"}const mC=()=>{const[t,n]=(0,e.useState)(null),[r,i]=(0,e.useState)("// Select a file to edit"),[o,a]=(0,e.useState)([]),[s,l]=(0,e.useState)(!1),[c,u]=(0,e.useState)(!1);(0,e.useEffect)((()=>{(async()=>{try{const e=await fetch("/api/files");if(!e.ok)throw new Error("Failed to fetch file tree");const t=await e.json(),n=e=>{const t=e.isLeaf;return{title:e.title,key:e.key,icon:t?(0,eg.jsx)(Cw,{}):(0,eg.jsx)(Rw,{}),children:e.children?e.children.map(n):void 0,isLeaf:t}};a(t.tree.map(n))}catch(e){console.error("Error fetching file tree:",e)}})()}),[]);const[d,h]=(0,e.useState)(null),f=[{key:"delete",icon:(0,eg.jsx)(fC,{}),label:"Delete",danger:!0,onClick:()=>{d&&Qb.confirm({title:"Delete Confirmation",content:`Are you sure you want to delete ${d.title}?`,okText:"Yes",okType:"danger",cancelText:"No",onOk(){(async e=>{try{if(!(await fetch(`/api/files/${e.key}`,{method:"DELETE"})).ok)throw new Error("Failed to delete");Kl.success(`Successfully deleted ${e.title}`);const t=await fetch("/api/files");if(t.ok){const e=await t.json(),n=e=>{const t=e.isLeaf;return{title:e.title,key:e.key,icon:t?(0,eg.jsx)(Cw,{}):(0,eg.jsx)(Rw,{}),children:e.children?e.children.map(n):void 0,isLeaf:t}};a(e.tree.map(n))}}catch(t){Kl.error("Failed to delete file/directory"),console.error("Error:",t)}})(d)}})}}];return(0,eg.jsxs)("div",{className:"flex flex-col h-full",children:[(0,eg.jsx)("div",{className:"bg-gray-800 p-2 border-b border-gray-700",children:(0,eg.jsxs)("div",{className:"flex items-center justify-between",children:[(0,eg.jsxs)("div",{className:"flex items-center gap-2",children:[(0,eg.jsx)("button",{onClick:async()=>{if(!s){l(!0);try{const e=await fetch("/api/files");if(!e.ok)throw new Error("Failed to fetch file tree");const t=await e.json(),n=e=>{const t=e.isLeaf;return{title:e.title,key:e.key,icon:t?(0,eg.jsx)(Cw,{}):(0,eg.jsx)(Rw,{}),children:e.children?e.children.map(n):void 0,isLeaf:t}};a(t.tree.map(n)),Kl.success("Refreshed file tree successfully")}catch(e){Kl.error("Failed to refresh file tree"),console.error("Error fetching file tree:",e)}finally{l(!1)}}},className:"text-gray-400 hover:text-white transition-colors",children:s?(0,eg.jsxs)("svg",{className:"w-4 h-4 animate-spin",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,eg.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,eg.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):(0,eg.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,eg.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}),(0,eg.jsx)("span",{className:"text-white text-sm",children:t||"No file selected"})]}),t&&(0,eg.jsxs)("button",{onClick:async()=>{if(t&&!c)try{u(!0);if(!(await fetch(`/api/file/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:r})})).ok)throw new Error("Failed to save file");Kl.success("File saved successfully")}catch(e){console.error("Error saving file:",e),Kl.error("Failed to save file")}finally{u(!1)}},disabled:!r,className:"px-3 py-1.5 bg-blue-600 text-sm text-white rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-gray-900 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2 shadow-sm",children:[(0,eg.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,eg.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-3m-1 4l-3 3m0 0l-3-3m3 3V4"})}),"Save"]})]})}),(0,eg.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,eg.jsxs)("div",{className:"h-full flex",children:[(0,eg.jsx)("div",{className:"w-64 bg-gray-900 border-r border-gray-700 overflow-y-auto p-2",children:(0,eg.jsx)(ES,{menu:{items:f},trigger:["contextMenu"],children:(0,eg.jsx)(uC,{showIcon:!0,defaultExpandAll:!0,onSelect:async(e,t)=>{const r=e[0];if(r&&t.node.isLeaf){n(r);try{const e=await fetch(`/api/file/${r}`);if(!e.ok)throw new Error("Failed to fetch file content");const t=await e.json();i(t.content)}catch(o){console.error("Error fetching file content:",o),i("// Error loading file content")}}},onRightClick:e=>{let{event:t,node:n}=e;t.preventDefault(),h(n)},treeData:o,className:"bg-gray-900 text-gray-300"})})}),(0,eg.jsx)("div",{className:"flex-1 bg-gray-900",children:(0,eg.jsx)(re,{height:"100%",defaultLanguage:"plaintext",language:pC(t||""),theme:"vs-dark",value:r,onChange:e=>i(e||""),options:{minimap:{enabled:!0},fontSize:14,lineNumbers:"on",folding:!0,automaticLayout:!0}})})]})})]})};var gC={},vC="rc-table-internal-hook";function bC(t){var n=e.createContext(void 0);return{Context:n,Provider:function(t){var r=t.value,i=t.children,o=e.useRef(r);o.current=r;var a=Be(e.useState((function(){return{getValue:function(){return o.current},listeners:new Set}})),1)[0];return Bt((function(){(0,ve.unstable_batchedUpdates)((function(){a.listeners.forEach((function(e){e(r)}))}))}),[r]),e.createElement(n.Provider,{value:a},i)},defaultValue:t}}function yC(t,n){var r=_o("function"===typeof n?n:function(e){if(void 0===n)return e;if(!Array.isArray(n))return e[n];var t={};return n.forEach((function(n){t[n]=e[n]})),t}),i=e.useContext(null===t||void 0===t?void 0:t.Context),o=i||{},a=o.listeners,s=o.getValue,l=e.useRef();l.current=r(i?s():null===t||void 0===t?void 0:t.defaultValue);var c=Be(e.useState({}),2)[1];return Bt((function(){if(i)return a.add(e),function(){a.delete(e)};function e(e){var t=r(e);at(l.current,t,!0)||c({})}}),[i]),l.current}function _C(){var t=e.createContext(null);function n(){return e.useContext(t)}return{makeImmutable:function(r,i){var o=ao(r),a=function(a,s){var l=o?{ref:s}:{},c=e.useRef(0),u=e.useRef(a);return null!==n()?e.createElement(r,Gt({},a,l)):(i&&!i(u.current,a)||(c.current+=1),u.current=a,e.createElement(t.Provider,{value:c.current},e.createElement(r,Gt({},a,l))))};return o?e.forwardRef(a):a},responseImmutable:function(t,r){var i=ao(t),o=function(r,o){var a=i?{ref:o}:{};return n(),e.createElement(t,Gt({},r,a))};return i?e.memo(e.forwardRef(o),r):e.memo(o,r)},useImmutableMark:n}}var SC=_C(),wC=(SC.makeImmutable,SC.responseImmutable,SC.useImmutableMark,_C()),CC=wC.makeImmutable,xC=wC.responseImmutable,EC=wC.useImmutableMark;const kC=bC();const OC=e.createContext({renderWithProps:!1});function $C(e){var t=[],n={};return e.forEach((function(e){for(var r=e||{},i=r.key,o=r.dataIndex,a=i||function(e){return void 0===e||null===e?[]:Array.isArray(e)?e:[e]}(o).join("-")||"RC_TABLE_KEY";n[a];)a="".concat(a,"_next");n[a]=!0,t.push(a)})),t}function RC(e){return null!==e&&void 0!==e}function IC(t,n,r,i,o,a){var s=e.useContext(OC);return Je((function(){if(RC(i))return[i];var a,l=null===n||void 0===n||""===n?[]:Array.isArray(n)?n:[n],c=rr(t,l),u=c,d=void 0;if(o){var h=o(c,t,r);!(a=h)||"object"!==le(a)||Array.isArray(a)||e.isValidElement(a)?u=h:(u=h.children,d=h.props,s.renderWithProps=!0)}return[u,d]}),[EC(),t,i,n,o,r],(function(e,t){if(a){var n=Be(e,2)[1],r=Be(t,2)[1];return a(r,n)}return!!s.renderWithProps||!at(e,t,!0)}))}function MC(t){var n,r,i,o,a,s,l,c;var u=t.component,d=t.children,h=t.ellipsis,f=t.scope,p=t.prefixCls,m=t.className,g=t.align,v=t.record,b=t.render,y=t.dataIndex,_=t.renderIndex,S=t.shouldCellUpdate,w=t.index,C=t.rowType,x=t.colSpan,E=t.rowSpan,k=t.fixLeft,O=t.fixRight,$=t.firstFixLeft,R=t.lastFixLeft,I=t.firstFixRight,M=t.lastFixRight,P=t.appendNode,N=t.additionalProps,L=void 0===N?{}:N,T=t.isSticky,D="".concat(p,"-cell"),A=yC(kC,["supportSticky","allColumnsFixedLeft","rowHoverable"]),B=A.supportSticky,j=A.allColumnsFixedLeft,z=A.rowHoverable,H=Be(IC(v,y,_,d,b,S),2),F=H[0],W=H[1],K={},V="number"===typeof k&&B,U="number"===typeof O&&B;V&&(K.position="sticky",K.left=k),U&&(K.position="sticky",K.right=O);var q=null!==(n=null!==(r=null!==(i=null===W||void 0===W?void 0:W.colSpan)&&void 0!==i?i:L.colSpan)&&void 0!==r?r:x)&&void 0!==n?n:1,X=null!==(o=null!==(a=null!==(s=null===W||void 0===W?void 0:W.rowSpan)&&void 0!==s?s:L.rowSpan)&&void 0!==a?a:E)&&void 0!==o?o:1,G=function(e,t){return yC(kC,(function(n){var r,i,o,a;return[(r=e,i=t||1,o=n.hoverStartRow,a=n.hoverEndRow,r<=a&&r+i-1>=o),n.onHover]}))}(w,X),Y=Be(G,2),Q=Y[0],J=Y[1],Z=_o((function(e){var t;v&&J(w,w+X-1),null===L||void 0===L||null===(t=L.onMouseEnter)||void 0===t||t.call(L,e)})),ee=_o((function(e){var t;v&&J(-1,-1),null===L||void 0===L||null===(t=L.onMouseLeave)||void 0===t||t.call(L,e)}));if(0===q||0===X)return null;var te=null!==(l=L.title)&&void 0!==l?l:function(t){var n,r=t.ellipsis,i=t.rowType,o=t.children,a=!0===r?{showTitle:!0}:r;return a&&(a.showTitle||"header"===i)&&("string"===typeof o||"number"===typeof o?n=o.toString():e.isValidElement(o)&&"string"===typeof o.props.children&&(n=o.props.children)),n}({rowType:C,ellipsis:h,children:F}),ne=Ji()(D,m,(fe(fe(fe(fe(fe(fe(fe(fe(fe(fe(c={},"".concat(D,"-fix-left"),V&&B),"".concat(D,"-fix-left-first"),$&&B),"".concat(D,"-fix-left-last"),R&&B),"".concat(D,"-fix-left-all"),R&&j&&B),"".concat(D,"-fix-right"),U&&B),"".concat(D,"-fix-right-first"),I&&B),"".concat(D,"-fix-right-last"),M&&B),"".concat(D,"-ellipsis"),h),"".concat(D,"-with-append"),P),"".concat(D,"-fix-sticky"),(V||U)&&T&&B),fe(c,"".concat(D,"-row-hover"),!W&&Q)),L.className,null===W||void 0===W?void 0:W.className),re={};g&&(re.textAlign=g);var ie=me(me(me(me({},K),L.style),re),null===W||void 0===W?void 0:W.style),oe=F;return"object"!==le(oe)||Array.isArray(oe)||e.isValidElement(oe)||(oe=null),h&&(R||I)&&(oe=e.createElement("span",{className:"".concat(D,"-content")},oe)),e.createElement(u,Gt({},W,L,{className:ne,style:ie,title:te,scope:f,onMouseEnter:z?Z:void 0,onMouseLeave:z?ee:void 0,colSpan:1!==q?q:null,rowSpan:1!==X?X:null}),P,oe)}const PC=e.memo(MC);function NC(e,t,n,r,i){var o,a,s=n[e]||{},l=n[t]||{};"left"===s.fixed?o=r.left["rtl"===i?t:e]:"right"===l.fixed&&(a=r.right["rtl"===i?e:t]);var c=!1,u=!1,d=!1,h=!1,f=n[t+1],p=n[e-1],m=f&&!f.fixed||p&&!p.fixed||n.every((function(e){return"left"===e.fixed}));if("rtl"===i){if(void 0!==o)h=!(p&&"left"===p.fixed)&&m;else if(void 0!==a){d=!(f&&"right"===f.fixed)&&m}}else if(void 0!==o){c=!(f&&"left"===f.fixed)&&m}else if(void 0!==a){u=!(p&&"right"===p.fixed)&&m}return{fixLeft:o,fixRight:a,lastFixLeft:c,firstFixRight:u,lastFixRight:d,firstFixLeft:h,isSticky:r.isSticky}}const LC=e.createContext({});var TC=["children"];function DC(e){return e.children}DC.Row=function(t){var n=t.children,r=lo(t,TC);return e.createElement("tr",r,n)},DC.Cell=function(t){var n=t.className,r=t.index,i=t.children,o=t.colSpan,a=void 0===o?1:o,s=t.rowSpan,l=t.align,c=yC(kC,["prefixCls","direction"]),u=c.prefixCls,d=c.direction,h=e.useContext(LC),f=h.scrollColumnIndex,p=h.stickyOffsets,m=r+a-1+1===f?a+1:a,g=NC(r,r+m-1,h.flattenColumns,p,d);return e.createElement(PC,Gt({className:n,index:r,component:"td",prefixCls:u,record:null,dataIndex:null,align:l,colSpan:m,rowSpan:s,render:function(){return i}},g))};const AC=DC;const BC=xC((function(t){var n=t.children,r=t.stickyOffsets,i=t.flattenColumns,o=yC(kC,"prefixCls"),a=i.length-1,s=i[a],l=e.useMemo((function(){return{stickyOffsets:r,flattenColumns:i,scrollColumnIndex:null!==s&&void 0!==s&&s.scrollbar?a:null}}),[s,i,a,r]);return e.createElement(LC.Provider,{value:l},e.createElement("tfoot",{className:"".concat(o,"-summary")},n))}));var jC=AC,zC=function(e){if(ze()&&window.document.documentElement){var t=Array.isArray(e)?e:[e],n=window.document.documentElement;return t.some((function(e){return e in n.style}))}return!1};function HC(e,t){return Array.isArray(e)||void 0===t?zC(e):function(e,t){if(!zC(e))return!1;var n=document.createElement("div"),r=n.style[e];return n.style[e]=t,n.style[e]!==r}(e,t)}function FC(e,t,n,r,i,o,a){e.push({record:t,indent:n,index:a});var s=o(t),l=null===i||void 0===i?void 0:i.has(s);if(t&&Array.isArray(t[r])&&l)for(var c=0;c<t[r].length;c+=1)FC(e,t[r][c],n+1,r,i,o,c)}function WC(t,n,r,i){var o=e.useMemo((function(){if(null!==r&&void 0!==r&&r.size){for(var e=[],o=0;o<(null===t||void 0===t?void 0:t.length);o+=1){FC(e,t[o],0,n,r,i,o)}return e}return null===t||void 0===t?void 0:t.map((function(e,t){return{record:e,indent:0,index:t}}))}),[t,n,r,i]);return o}function KC(e,t,n,r){var i,o=yC(kC,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),a=o.flattenColumns,s=o.expandableType,l=o.expandedKeys,c=o.childrenColumnName,u=o.onTriggerExpand,d=o.rowExpandable,h=o.onRow,f=o.expandRowByClick,p=o.rowClassName,m="nest"===s,g="row"===s&&(!d||d(e)),v=g||m,b=l&&l.has(t),y=c&&e&&e[c],_=_o(u),S=null===h||void 0===h?void 0:h(e,n),w=null===S||void 0===S?void 0:S.onClick;"string"===typeof p?i=p:"function"===typeof p&&(i=p(e,n,r));var C=$C(a);return me(me({},o),{},{columnsKey:C,nestExpandable:m,expanded:b,hasNestChildren:y,record:e,onTriggerExpand:_,rowSupportExpand:g,expandable:v,rowProps:me(me({},S),{},{className:Ji()(i,null===S||void 0===S?void 0:S.className),onClick:function(t){f&&v&&u(e,t);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];null===w||void 0===w||w.apply(void 0,[t].concat(r))}})})}const VC=function(t){var n=t.prefixCls,r=t.children,i=t.component,o=t.cellComponent,a=t.className,s=t.expanded,l=t.colSpan,c=t.isEmpty,u=yC(kC,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),d=u.scrollbarSize,h=u.fixHeader,f=u.fixColumn,p=u.componentWidth,m=u.horizonScroll,g=r;return(c?m&&p:f)&&(g=e.createElement("div",{style:{width:p-(h&&!c?d:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(n,"-expanded-row-fixed")},g)),e.createElement(i,{className:a,style:{display:s?null:"none"}},e.createElement(PC,{component:o,prefixCls:n,colSpan:l},g))};function UC(t){var n=t.prefixCls,r=t.record,i=t.onExpand,o=t.expanded,a=t.expandable,s="".concat(n,"-row-expand-icon");if(!a)return e.createElement("span",{className:Ji()(s,"".concat(n,"-row-spaced"))});return e.createElement("span",{className:Ji()(s,fe(fe({},"".concat(n,"-row-expanded"),o),"".concat(n,"-row-collapsed"),!o)),onClick:function(e){i(r,e),e.stopPropagation()}})}function qC(e,t,n,r){return"string"===typeof e?e:"function"===typeof e?e(t,n,r):""}function XC(t,n,r,i,o){var a,s,l=t.record,c=t.prefixCls,u=t.columnsKey,d=t.fixedInfoList,h=t.expandIconColumnIndex,f=t.nestExpandable,p=t.indentSize,m=t.expandIcon,g=t.expanded,v=t.hasNestChildren,b=t.onTriggerExpand,y=u[r],_=d[r];return r===(h||0)&&f&&(a=e.createElement(e.Fragment,null,e.createElement("span",{style:{paddingLeft:"".concat(p*i,"px")},className:"".concat(c,"-row-indent indent-level-").concat(i)}),m({prefixCls:c,expanded:g,expandable:v,record:l,onExpand:b}))),n.onCell&&(s=n.onCell(l,o)),{key:y,fixedInfo:_,appendCellNode:a,additionalCellProps:s||{}}}const GC=xC((function(t){var n=t.className,r=t.style,i=t.record,o=t.index,a=t.renderIndex,s=t.rowKey,l=t.indent,c=void 0===l?0:l,u=t.rowComponent,d=t.cellComponent,h=t.scopeCellComponent,f=KC(i,s,o,c),p=f.prefixCls,m=f.flattenColumns,g=f.expandedRowClassName,v=f.expandedRowRender,b=f.rowProps,y=f.expanded,_=f.rowSupportExpand,S=e.useRef(!1);S.current||(S.current=y);var w,C=qC(g,i,o,c),x=e.createElement(u,Gt({},b,{"data-row-key":s,className:Ji()(n,"".concat(p,"-row"),"".concat(p,"-row-level-").concat(c),null===b||void 0===b?void 0:b.className,fe({},C,c>=1)),style:me(me({},r),null===b||void 0===b?void 0:b.style)}),m.map((function(t,n){var r=t.render,s=t.dataIndex,l=t.className,u=XC(f,t,n,c,o),m=u.key,g=u.fixedInfo,v=u.appendCellNode,b=u.additionalCellProps;return e.createElement(PC,Gt({className:l,ellipsis:t.ellipsis,align:t.align,scope:t.rowScope,component:t.rowScope?h:d,prefixCls:p,key:m,record:i,index:o,renderIndex:a,dataIndex:s,render:r,shouldCellUpdate:t.shouldCellUpdate},g,{appendNode:v,additionalProps:b}))})));if(_&&(S.current||y)){var E=v(i,o,c+1,y);w=e.createElement(VC,{expanded:y,className:Ji()("".concat(p,"-expanded-row"),"".concat(p,"-expanded-row-level-").concat(c+1),C),prefixCls:p,component:u,cellComponent:d,colSpan:m.length,isEmpty:!1},E)}return e.createElement(e.Fragment,null,x,w)}));function YC(t){var n=t.columnKey,r=t.onColumnResize,i=e.useRef();return e.useEffect((function(){i.current&&r(n,i.current.offsetWidth)}),[]),e.createElement(au,{data:n},e.createElement("td",{ref:i,style:{padding:0,border:0,height:0}},e.createElement("div",{style:{height:0,overflow:"hidden"}},"\xa0")))}function QC(t){var n=t.prefixCls,r=t.columnsKey,i=t.onColumnResize;return e.createElement("tr",{"aria-hidden":"true",className:"".concat(n,"-measure-row"),style:{height:0,fontSize:0}},e.createElement(au.Collection,{onBatchResize:function(e){e.forEach((function(e){var t=e.data,n=e.size;i(t,n.offsetWidth)}))}},r.map((function(t){return e.createElement(YC,{key:t,columnKey:t,onColumnResize:i})}))))}const JC=xC((function(t){var n,r=t.data,i=t.measureColumnWidth,o=yC(kC,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),a=o.prefixCls,s=o.getComponent,l=o.onColumnResize,c=o.flattenColumns,u=o.getRowKey,d=o.expandedKeys,h=o.childrenColumnName,f=o.emptyNode,p=WC(r,h,d,u),m=e.useRef({renderWithProps:!1}),g=s(["body","wrapper"],"tbody"),v=s(["body","row"],"tr"),b=s(["body","cell"],"td"),y=s(["body","cell"],"th");n=r.length?p.map((function(t,n){var r=t.record,i=t.indent,o=t.index,a=u(r,n);return e.createElement(GC,{key:a,rowKey:a,record:r,index:n,renderIndex:o,rowComponent:v,cellComponent:b,scopeCellComponent:y,getRowKey:u,indent:i})})):e.createElement(VC,{expanded:!0,className:"".concat(a,"-placeholder"),prefixCls:a,component:v,cellComponent:b,colSpan:c.length,isEmpty:!0},f);var _=$C(c);return e.createElement(OC.Provider,{value:m.current},e.createElement(g,{className:"".concat(a,"-tbody")},i&&e.createElement(QC,{prefixCls:a,columnsKey:_,onColumnResize:l}),n))}));var ZC=["expandable"],ex="RC_TABLE_INTERNAL_COL_DEFINE";var tx=["columnType"];const nx=function(t){for(var n=t.colWidths,r=t.columns,i=t.columCount,o=yC(kC,["tableLayout"]).tableLayout,a=[],s=!1,l=(i||r.length)-1;l>=0;l-=1){var c=n[l],u=r&&r[l],d=void 0,h=void 0;if(u&&(d=u[ex],"auto"===o&&(h=u.minWidth)),c||h||d||s){var f=d||{},p=(f.columnType,lo(f,tx));a.unshift(e.createElement("col",Gt({key:l,style:{width:c,minWidth:h}},p))),s=!0}}return e.createElement("colgroup",null,a)};var rx=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];var ix=e.forwardRef((function(t,n){var r=t.className,i=t.noData,o=t.columns,a=t.flattenColumns,s=t.colWidths,l=t.columCount,c=t.stickyOffsets,u=t.direction,d=t.fixHeader,h=t.stickyTopOffset,f=t.stickyBottomOffset,p=t.stickyClassName,m=t.onScroll,g=t.maxContentScroll,v=t.children,b=lo(t,rx),y=yC(kC,["prefixCls","scrollbarSize","isSticky","getComponent"]),_=y.prefixCls,S=y.scrollbarSize,w=y.isSticky,C=(0,y.getComponent)(["header","table"],"table"),x=w&&!d?0:S,E=e.useRef(null),k=e.useCallback((function(e){ro(n,e),ro(E,e)}),[]);e.useEffect((function(){var e;function t(e){var t=e,n=t.currentTarget,r=t.deltaX;r&&(m({currentTarget:n,scrollLeft:n.scrollLeft+r}),e.preventDefault())}return null===(e=E.current)||void 0===e||e.addEventListener("wheel",t,{passive:!1}),function(){var e;null===(e=E.current)||void 0===e||e.removeEventListener("wheel",t)}}),[]);var O=e.useMemo((function(){return a.every((function(e){return e.width}))}),[a]),$=a[a.length-1],R={fixed:$?$.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(_,"-cell-scrollbar")}}},I=(0,e.useMemo)((function(){return x?[].concat(se(o),[R]):o}),[x,o]),M=(0,e.useMemo)((function(){return x?[].concat(se(a),[R]):a}),[x,a]),P=(0,e.useMemo)((function(){var e=c.right,t=c.left;return me(me({},c),{},{left:"rtl"===u?[].concat(se(t.map((function(e){return e+x}))),[0]):t,right:"rtl"===u?e:[].concat(se(e.map((function(e){return e+x}))),[0]),isSticky:w})}),[x,c,w]),N=function(t,n){return(0,e.useMemo)((function(){for(var e=[],r=0;r<n;r+=1){var i=t[r];if(void 0===i)return null;e[r]=i}return e}),[t.join("_"),n])}(s,l);return e.createElement("div",{style:me({overflow:"hidden"},w?{top:h,bottom:f}:{}),ref:k,className:Ji()(r,fe({},p,!!p))},e.createElement(C,{style:{tableLayout:"fixed",visibility:i||N?null:"hidden"}},(!i||!g||O)&&e.createElement(nx,{colWidths:N?[].concat(se(N),[x]):[],columCount:l+1,columns:M}),v(me(me({},b),{},{stickyOffsets:P,columns:I,flattenColumns:M}))))}));const ox=e.memo(ix);const ax=function(t){var n,r=t.cells,i=t.stickyOffsets,o=t.flattenColumns,a=t.rowComponent,s=t.cellComponent,l=t.onHeaderRow,c=t.index,u=yC(kC,["prefixCls","direction"]),d=u.prefixCls,h=u.direction;l&&(n=l(r.map((function(e){return e.column})),c));var f=$C(r.map((function(e){return e.column})));return e.createElement(a,n,r.map((function(t,n){var r,a=t.column,l=NC(t.colStart,t.colEnd,o,i,h);return a&&a.onHeaderCell&&(r=t.column.onHeaderCell(a)),e.createElement(PC,Gt({},t,{scope:a.title?t.colSpan>1?"colgroup":"col":null,ellipsis:a.ellipsis,align:a.align,component:s,prefixCls:d,key:f[n]},l,{additionalProps:r,rowType:"header"}))})))};const sx=xC((function(t){var n=t.stickyOffsets,r=t.columns,i=t.flattenColumns,o=t.onHeaderRow,a=yC(kC,["prefixCls","getComponent"]),s=a.prefixCls,l=a.getComponent,c=e.useMemo((function(){return function(e){var t=[];!function e(n,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t[i]=t[i]||[];var o=r;return n.filter(Boolean).map((function(n){var r={key:n.key,className:n.className||"",children:n.title,column:n,colStart:o},a=1,s=n.children;return s&&s.length>0&&(a=e(s,o,i+1).reduce((function(e,t){return e+t}),0),r.hasSubColumns=!0),"colSpan"in n&&(a=n.colSpan),"rowSpan"in n&&(r.rowSpan=n.rowSpan),r.colSpan=a,r.colEnd=r.colStart+a-1,t[i].push(r),o+=a,a}))}(e,0);for(var n=t.length,r=function(e){t[e].forEach((function(t){"rowSpan"in t||t.hasSubColumns||(t.rowSpan=n-e)}))},i=0;i<n;i+=1)r(i);return t}(r)}),[r]),u=l(["header","wrapper"],"thead"),d=l(["header","row"],"tr"),h=l(["header","cell"],"th");return e.createElement(u,{className:"".concat(s,"-thead")},c.map((function(t,r){return e.createElement(ax,{key:r,flattenColumns:i,cells:t,stickyOffsets:n,rowComponent:d,cellComponent:h,onHeaderRow:o,index:r})})))}));function lx(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"number"===typeof t?t:t.endsWith("%")?e*parseFloat(t)/100:null}var cx=["children"],ux=["fixed"];function dx(t){return Rc(t).filter((function(t){return e.isValidElement(t)})).map((function(e){var t=e.key,n=e.props,r=n.children,i=me({key:t},lo(n,cx));return r&&(i.children=dx(r)),i}))}function hx(e){return e.filter((function(e){return e&&"object"===le(e)&&!e.hidden})).map((function(e){var t=e.children;return t&&t.length>0?me(me({},e),{},{children:hx(t)}):e}))}function fx(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"key";return e.filter((function(e){return e&&"object"===le(e)})).reduce((function(e,n,r){var i=n.fixed,o=!0===i?"left":i,a="".concat(t,"-").concat(r),s=n.children;return s&&s.length>0?[].concat(se(e),se(fx(s,a).map((function(e){return me({fixed:o},e)})))):[].concat(se(e),[me(me({key:a},n),{},{fixed:o})])}),[])}const px=function(t,n){var r=t.prefixCls,i=t.columns,o=t.children,a=t.expandable,s=t.expandedKeys,l=t.columnTitle,c=t.getRowKey,u=t.onTriggerExpand,d=t.expandIcon,h=t.rowExpandable,f=t.expandIconColumnIndex,p=t.direction,m=t.expandRowByClick,g=t.columnWidth,v=t.fixed,b=t.scrollWidth,y=t.clientWidth,_=e.useMemo((function(){return hx((i||dx(o)||[]).slice())}),[i,o]),S=e.useMemo((function(){if(a){var t=_.slice();if(!t.includes(gC)){var n=f||0;n>=0&&t.splice(n,0,gC)}0;var i=t.indexOf(gC);t=t.filter((function(e,t){return e!==gC||t===i}));var o,p=_[i];o="left"!==v&&!v||f?"right"!==v&&!v||f!==_.length?p?p.fixed:null:"right":"left";var b=fe(fe(fe(fe(fe(fe({},ex,{className:"".concat(r,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",l),"fixed",o),"className","".concat(r,"-row-expand-icon-cell")),"width",g),"render",(function(t,n,i){var o=c(n,i),a=s.has(o),l=!h||h(n),f=d({prefixCls:r,expanded:a,expandable:l,record:n,onExpand:u});return m?e.createElement("span",{onClick:function(e){return e.stopPropagation()}},f):f}));return t.map((function(e){return e===gC?b:e}))}return _.filter((function(e){return e!==gC}))}),[a,_,c,s,d,p]),w=e.useMemo((function(){var e=S;return n&&(e=n(e)),e.length||(e=[{render:function(){return null}}]),e}),[n,S,p]),C=e.useMemo((function(){return"rtl"===p?function(e){return e.map((function(e){var t=e.fixed,n=t;return"left"===t?n="right":"right"===t&&(n="left"),me({fixed:n},lo(e,ux))}))}(fx(w)):fx(w)}),[w,p,b]),x=e.useMemo((function(){for(var e=-1,t=C.length-1;t>=0;t-=1){var n=C[t].fixed;if("left"===n||!0===n){e=t;break}}if(e>=0)for(var r=0;r<=e;r+=1){var i=C[r].fixed;if("left"!==i&&!0!==i)return!0}var o=C.findIndex((function(e){return"right"===e.fixed}));if(o>=0)for(var a=o;a<C.length;a+=1){if("right"!==C[a].fixed)return!0}return!1}),[C]),E=Be(function(t,n,r){return e.useMemo((function(){if(n&&n>0){var e=0,i=0;t.forEach((function(t){var r=lx(n,t.width);r?e+=r:i+=1}));var o=Math.max(n,r),a=Math.max(o-e,i),s=i,l=a/i,c=0,u=t.map((function(e){var t=me({},e),r=lx(n,t.width);if(r)t.width=r;else{var i=Math.floor(l);t.width=1===s?a:i,a-=i,s-=1}return c+=t.width,t}));if(c<o){var d=o/c;a=o,u.forEach((function(e,t){var n=Math.floor(e.width*d);e.width=t===u.length-1?a:n,a-=n}))}return[u,Math.max(c,o)]}return[t,n]}),[t,n,r])}(C,b,y),2),k=E[0],O=E[1];return[w,k,O,x]};function mx(t,n,r){var i=function(e){var t,n=e.expandable,r=lo(e,ZC);return!1===(t="expandable"in e?me(me({},r),n):r).showExpandColumn&&(t.expandIconColumnIndex=-1),t}(t),o=i.expandIcon,a=i.expandedRowKeys,s=i.defaultExpandedRowKeys,l=i.defaultExpandAllRows,c=i.expandedRowRender,u=i.onExpand,d=i.onExpandedRowsChange,h=o||UC,f=i.childrenColumnName||"children",p=e.useMemo((function(){return c?"row":!!(t.expandable&&t.internalHooks===vC&&t.expandable.__PARENT_RENDER_ICON__||n.some((function(e){return e&&"object"===le(e)&&e[f]})))&&"nest"}),[!!c,n]),m=e.useState((function(){return s||(l?function(e,t,n){var r=[];return function e(i){(i||[]).forEach((function(i,o){r.push(t(i,o)),e(i[n])}))}(e),r}(n,r,f):[])})),g=Be(m,2),v=g[0],b=g[1],y=e.useMemo((function(){return new Set(a||v||[])}),[a,v]),_=e.useCallback((function(e){var t,i=r(e,n.indexOf(e)),o=y.has(i);o?(y.delete(i),t=se(y)):t=[].concat(se(y),[i]),b(t),u&&u(!o,e),d&&d(t)}),[r,y,n,u,d]);return[i,p,y,h,f,_]}function gx(t){var n=(0,e.useRef)(t),r=Be((0,e.useState)({}),2)[1],i=(0,e.useRef)(null),o=(0,e.useRef)([]);return(0,e.useEffect)((function(){return function(){i.current=null}}),[]),[n.current,function(e){o.current.push(e);var t=Promise.resolve();i.current=t,t.then((function(){if(i.current===t){var e=o.current,a=n.current;o.current=[],e.forEach((function(e){n.current=e(n.current)})),i.current=null,a!==n.current&&r({})}}))}]}var vx=ze()?window:null;const bx=function(t,n,r){var i=(0,e.useMemo)((function(){var e=n.length,i=function(e,r,i){for(var o=[],a=0,s=e;s!==r;s+=i)o.push(a),n[s].fixed&&(a+=t[s]||0);return o},o=i(0,e,1),a=i(e-1,-1,-1).reverse();return"rtl"===r?{left:a,right:o}:{left:o,right:a}}),[t,n,r]);return i};const yx=function(t){var n=t.className,r=t.children;return e.createElement("div",{className:n},r)};function _x(e,t,n,r){var i=ve.unstable_batchedUpdates?function(e){ve.unstable_batchedUpdates(n,e)}:n;return null!==e&&void 0!==e&&e.addEventListener&&e.addEventListener(t,i,r),{remove:function(){null!==e&&void 0!==e&&e.removeEventListener&&e.removeEventListener(t,i,r)}}}function Sx(e){var t=e.getBoundingClientRect(),n=document.documentElement;return{left:t.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}var wx=function(t,n){var r,i,o=t.scrollBodyRef,a=t.onScroll,s=t.offsetScroll,l=t.container,c=yC(kC,"prefixCls"),u=(null===(r=o.current)||void 0===r?void 0:r.scrollWidth)||0,d=(null===(i=o.current)||void 0===i?void 0:i.clientWidth)||0,h=u&&d*(d/u),f=e.useRef(),p=Be(gx({scrollLeft:0,isHiddenScrollBar:!0}),2),m=p[0],g=p[1],v=e.useRef({delta:0,x:0}),b=Be(e.useState(!1),2),y=b[0],_=b[1],S=e.useRef(null);e.useEffect((function(){return function(){Zo.cancel(S.current)}}),[]);var w=function(){_(!1)},C=function(e){var t,n=(e||(null===(t=window)||void 0===t?void 0:t.event)).buttons;if(y&&0!==n){var r=v.current.x+e.pageX-v.current.x-v.current.delta;r<=0&&(r=0),r+h>=d&&(r=d-h),a({scrollLeft:r/d*(u+2)}),v.current.x=e.pageX}else y&&_(!1)},x=function(){S.current=Zo((function(){if(o.current){var e=Sx(o.current).top,t=e+o.current.offsetHeight,n=l===window?document.documentElement.scrollTop+window.innerHeight:Sx(l).top+l.clientHeight;t-Sc()<=n||e>=n-s?g((function(e){return me(me({},e),{},{isHiddenScrollBar:!0})})):g((function(e){return me(me({},e),{},{isHiddenScrollBar:!1})}))}}))},E=function(e){g((function(t){return me(me({},t),{},{scrollLeft:e/u*d||0})}))};return e.useImperativeHandle(n,(function(){return{setScrollLeft:E,checkScrollBarVisible:x}})),e.useEffect((function(){var e=_x(document.body,"mouseup",w,!1),t=_x(document.body,"mousemove",C,!1);return x(),function(){e.remove(),t.remove()}}),[h,y]),e.useEffect((function(){var e=_x(l,"scroll",x,!1),t=_x(window,"resize",x,!1);return function(){e.remove(),t.remove()}}),[l]),e.useEffect((function(){m.isHiddenScrollBar||g((function(e){var t=o.current;return t?me(me({},e),{},{scrollLeft:t.scrollLeft/t.scrollWidth*t.clientWidth}):e}))}),[m.isHiddenScrollBar]),u<=d||!h||m.isHiddenScrollBar?null:e.createElement("div",{style:{height:Sc(),width:d,bottom:s},className:"".concat(c,"-sticky-scroll")},e.createElement("div",{onMouseDown:function(e){e.persist(),v.current.delta=e.pageX-m.scrollLeft,v.current.x=0,_(!0),e.preventDefault()},ref:f,className:Ji()("".concat(c,"-sticky-scroll-bar"),fe({},"".concat(c,"-sticky-scroll-bar-active"),y)),style:{width:"".concat(h,"px"),transform:"translate3d(".concat(m.scrollLeft,"px, 0, 0)")}}))};const Cx=e.forwardRef(wx);const xx=function(e){return null};const Ex=function(e){return null};var kx="rc-table",Ox=[],$x={};function Rx(){return"No Data"}function Ix(t,n){var r=me({rowKey:"key",prefixCls:kx,emptyText:Rx},t),i=r.prefixCls,o=r.className,a=r.rowClassName,s=r.style,l=r.data,c=r.rowKey,u=r.scroll,d=r.tableLayout,h=r.direction,f=r.title,p=r.footer,m=r.summary,g=r.caption,v=r.id,b=r.showHeader,y=r.components,_=r.emptyText,S=r.onRow,w=r.onHeaderRow,C=r.onScroll,x=r.internalHooks,E=r.transformColumns,k=r.internalRefs,O=r.tailor,$=r.getContainerWidth,R=r.sticky,I=r.rowHoverable,M=void 0===I||I,P=l||Ox,N=!!P.length,L=x===vC;var T=e.useCallback((function(e,t){return rr(y,e)||t}),[y]),D=e.useMemo((function(){return"function"===typeof c?c:function(e){return e&&e[c]}}),[c]),A=T(["body"]),B=function(){var t=Be(e.useState(-1),2),n=t[0],r=t[1],i=Be(e.useState(-1),2),o=i[0],a=i[1];return[n,o,e.useCallback((function(e,t){r(e),a(t)}),[])]}(),j=Be(B,3),z=j[0],H=j[1],F=j[2],W=Be(mx(r,P,D),6),K=W[0],V=W[1],U=W[2],q=W[3],X=W[4],G=W[5],Y=null===u||void 0===u?void 0:u.x,Q=Be(e.useState(0),2),J=Q[0],Z=Q[1],ee=Be(px(me(me(me({},r),K),{},{expandable:!!K.expandedRowRender,columnTitle:K.columnTitle,expandedKeys:U,getRowKey:D,onTriggerExpand:G,expandIcon:q,expandIconColumnIndex:K.expandIconColumnIndex,direction:h,scrollWidth:L&&O&&"number"===typeof Y?Y:null,clientWidth:J}),L?E:null),4),te=ee[0],ne=ee[1],re=ee[2],ie=ee[3],oe=null!==re&&void 0!==re?re:Y,ae=e.useMemo((function(){return{columns:te,flattenColumns:ne}}),[te,ne]),se=e.useRef(),ce=e.useRef(),ue=e.useRef(),de=e.useRef();e.useImperativeHandle(n,(function(){return{nativeElement:se.current,scrollTo:function(e){var t,n;if(ue.current instanceof HTMLElement){var r=e.index,i=e.top,o=e.key;if("number"!==typeof(n=i)||Number.isNaN(n)){var a,s=null!==o&&void 0!==o?o:D(P[r]);null===(a=ue.current.querySelector('[data-row-key="'.concat(s,'"]')))||void 0===a||a.scrollIntoView()}else{var l;null===(l=ue.current)||void 0===l||l.scrollTo({top:i})}}else null!==(t=ue.current)&&void 0!==t&&t.scrollTo&&ue.current.scrollTo(e)}}}));var he,pe,ge,ve=e.useRef(),be=Be(e.useState(!1),2),ye=be[0],_e=be[1],Se=Be(e.useState(!1),2),we=Se[0],Ce=Se[1],xe=Be(gx(new Map),2),Ee=xe[0],ke=xe[1],Oe=$C(ne).map((function(e){return Ee.get(e)})),$e=e.useMemo((function(){return Oe}),[Oe.join("_")]),Re=bx($e,ne,h),Ie=u&&RC(u.y),Me=u&&RC(oe)||Boolean(K.fixed),Pe=Me&&ne.some((function(e){return e.fixed})),Ne=e.useRef(),Le=function(t,n){var r="object"===le(t)?t:{},i=r.offsetHeader,o=void 0===i?0:i,a=r.offsetSummary,s=void 0===a?0:a,l=r.offsetScroll,c=void 0===l?0:l,u=r.getContainer,d=(void 0===u?function(){return vx}:u)()||vx,h=!!t;return e.useMemo((function(){return{isSticky:h,stickyClassName:h?"".concat(n,"-sticky-holder"):"",offsetHeader:o,offsetSummary:s,offsetScroll:c,container:d}}),[h,c,o,s,n,d])}(R,i),Te=Le.isSticky,De=Le.offsetHeader,Ae=Le.offsetSummary,je=Le.offsetScroll,ze=Le.stickyClassName,He=Le.container,Fe=e.useMemo((function(){return null===m||void 0===m?void 0:m(P)}),[m,P]),We=(Ie||Te)&&e.isValidElement(Fe)&&Fe.type===AC&&Fe.props.fixed;Ie&&(pe={overflowY:N?"scroll":"auto",maxHeight:u.y}),Me&&(he={overflowX:"auto"},Ie||(pe={overflowY:"hidden"}),ge={width:!0===oe?"auto":oe,minWidth:"100%"});var Ke=e.useCallback((function(e,t){Xl(se.current)&&ke((function(n){if(n.get(e)!==t){var r=new Map(n);return r.set(e,t),r}return n}))}),[]),Ve=Be(function(t){var n=(0,e.useRef)(t||null),r=(0,e.useRef)();function i(){window.clearTimeout(r.current)}return(0,e.useEffect)((function(){return i}),[]),[function(e){n.current=e,i(),r.current=window.setTimeout((function(){n.current=null,r.current=void 0}),100)},function(){return n.current}]}(null),2),Ue=Ve[0],qe=Ve[1];function Xe(e,t){t&&("function"===typeof t?t(e):t.scrollLeft!==e&&(t.scrollLeft=e,t.scrollLeft!==e&&setTimeout((function(){t.scrollLeft=e}),0)))}var Ge=_o((function(e){var t,n=e.currentTarget,r=e.scrollLeft,i="rtl"===h,o="number"===typeof r?r:n.scrollLeft,a=n||$x;qe()&&qe()!==a||(Ue(a),Xe(o,ce.current),Xe(o,ue.current),Xe(o,ve.current),Xe(o,null===(t=Ne.current)||void 0===t?void 0:t.setScrollLeft));var s=n||ce.current;if(s){var l=L&&O&&"number"===typeof oe?oe:s.scrollWidth,c=s.clientWidth;if(l===c)return _e(!1),void Ce(!1);i?(_e(-o<l-c),Ce(-o>0)):(_e(o>0),Ce(o<l-c))}})),Ye=_o((function(e){Ge(e),null===C||void 0===C||C(e)})),Qe=function(){var e;Me&&ue.current?Ge({currentTarget:eo(ue.current),scrollLeft:null===(e=ue.current)||void 0===e?void 0:e.scrollLeft}):(_e(!1),Ce(!1))},Ze=e.useRef(!1);e.useEffect((function(){Ze.current&&Qe()}),[Me,l,te.length]),e.useEffect((function(){Ze.current=!0}),[]);var et=Be(e.useState(0),2),tt=et[0],nt=et[1],rt=Be(e.useState(!0),2),it=rt[0],ot=rt[1];e.useEffect((function(){O&&L||(ue.current instanceof Element?nt(wc(ue.current).width):nt(wc(de.current).width)),ot(HC("position","sticky"))}),[]),e.useEffect((function(){L&&k&&(k.body.current=ue.current)}));var st,lt=e.useCallback((function(t){return e.createElement(e.Fragment,null,e.createElement(sx,t),"top"===We&&e.createElement(BC,t,Fe))}),[We,Fe]),ct=e.useCallback((function(t){return e.createElement(BC,t,Fe)}),[Fe]),ut=T(["table"],"table"),dt=e.useMemo((function(){return d||(Pe?"max-content"===oe?"auto":"fixed":Ie||Te||ne.some((function(e){return e.ellipsis}))?"fixed":"auto")}),[Ie,Pe,ne,d,Te]),ht={colWidths:$e,columCount:ne.length,stickyOffsets:Re,onHeaderRow:w,fixHeader:Ie,scroll:u},ft=e.useMemo((function(){return N?null:"function"===typeof _?_():_}),[N,_]),pt=e.createElement(JC,{data:P,measureColumnWidth:Ie||Me||Te}),mt=e.createElement(nx,{colWidths:ne.map((function(e){return e.width})),columns:ne}),gt=null!==g&&void 0!==g?e.createElement("caption",{className:"".concat(i,"-caption")},g):void 0,vt=Rs(r,{data:!0}),bt=Rs(r,{aria:!0});if(Ie||Te){var yt;"function"===typeof A?(yt=A(P,{scrollbarSize:tt,ref:ue,onScroll:Ge}),ht.colWidths=ne.map((function(e,t){var n=e.width,r=t===ne.length-1?n-tt:n;return"number"!==typeof r||Number.isNaN(r)?0:r}))):yt=e.createElement("div",{style:me(me({},he),pe),onScroll:Ye,ref:ue,className:Ji()("".concat(i,"-body"))},e.createElement(ut,Gt({style:me(me({},ge),{},{tableLayout:dt})},bt),gt,mt,pt,!We&&Fe&&e.createElement(BC,{stickyOffsets:Re,flattenColumns:ne},Fe)));var _t=me(me(me({noData:!P.length,maxContentScroll:Me&&"max-content"===oe},ht),ae),{},{direction:h,stickyClassName:ze,onScroll:Ge});st=e.createElement(e.Fragment,null,!1!==b&&e.createElement(ox,Gt({},_t,{stickyTopOffset:De,className:"".concat(i,"-header"),ref:ce}),lt),yt,We&&"top"!==We&&e.createElement(ox,Gt({},_t,{stickyBottomOffset:Ae,className:"".concat(i,"-summary"),ref:ve}),ct),Te&&ue.current&&ue.current instanceof Element&&e.createElement(Cx,{ref:Ne,offsetScroll:je,scrollBodyRef:ue,onScroll:Ge,container:He}))}else st=e.createElement("div",{style:me(me({},he),pe),className:Ji()("".concat(i,"-content")),onScroll:Ge,ref:ue},e.createElement(ut,Gt({style:me(me({},ge),{},{tableLayout:dt})},bt),gt,mt,!1!==b&&e.createElement(sx,Gt({},ht,ae)),pt,Fe&&e.createElement(BC,{stickyOffsets:Re,flattenColumns:ne},Fe)));var St=e.createElement("div",Gt({className:Ji()(i,o,fe(fe(fe(fe(fe(fe(fe(fe(fe(fe({},"".concat(i,"-rtl"),"rtl"===h),"".concat(i,"-ping-left"),ye),"".concat(i,"-ping-right"),we),"".concat(i,"-layout-fixed"),"fixed"===d),"".concat(i,"-fixed-header"),Ie),"".concat(i,"-fixed-column"),Pe),"".concat(i,"-fixed-column-gapped"),Pe&&ie),"".concat(i,"-scroll-horizontal"),Me),"".concat(i,"-has-fix-left"),ne[0]&&ne[0].fixed),"".concat(i,"-has-fix-right"),ne[ne.length-1]&&"right"===ne[ne.length-1].fixed)),style:s,id:v,ref:se},vt),f&&e.createElement(yx,{className:"".concat(i,"-title")},f(P)),e.createElement("div",{ref:de,className:"".concat(i,"-container")},st),p&&e.createElement(yx,{className:"".concat(i,"-footer")},p(P)));Me&&(St=e.createElement(au,{onResize:function(e){var t,n=e.width;null===(t=Ne.current)||void 0===t||t.checkScrollBarVisible();var r=se.current?se.current.offsetWidth:n;L&&$&&se.current&&(r=$(se.current,r)||r),r!==J&&(Qe(),Z(r))}},St));var wt=function(e,t,n){var r=e.map((function(r,i){return NC(i,i,e,t,n)}));return Je((function(){return r}),[r],(function(e,t){return!at(e,t)}))}(ne,Re,h),Ct=e.useMemo((function(){return{scrollX:oe,prefixCls:i,getComponent:T,scrollbarSize:tt,direction:h,fixedInfoList:wt,isSticky:Te,supportSticky:it,componentWidth:J,fixHeader:Ie,fixColumn:Pe,horizonScroll:Me,tableLayout:dt,rowClassName:a,expandedRowClassName:K.expandedRowClassName,expandIcon:q,expandableType:V,expandRowByClick:K.expandRowByClick,expandedRowRender:K.expandedRowRender,onTriggerExpand:G,expandIconColumnIndex:K.expandIconColumnIndex,indentSize:K.indentSize,allColumnsFixedLeft:ne.every((function(e){return"left"===e.fixed})),emptyNode:ft,columns:te,flattenColumns:ne,onColumnResize:Ke,hoverStartRow:z,hoverEndRow:H,onHover:F,rowExpandable:K.rowExpandable,onRow:S,getRowKey:D,expandedKeys:U,childrenColumnName:X,rowHoverable:M}}),[oe,i,T,tt,h,wt,Te,it,J,Ie,Pe,Me,dt,a,K.expandedRowClassName,q,V,K.expandRowByClick,K.expandedRowRender,G,K.expandIconColumnIndex,K.indentSize,ft,te,ne,Ke,z,H,F,K.rowExpandable,S,D,U,X,M]);return e.createElement(kC.Provider,{value:Ct},St)}var Mx=e.forwardRef(Ix);function Px(e){return CC(Mx,e)}var Nx=Px();Nx.EXPAND_COLUMN=gC,Nx.INTERNAL_HOOKS=vC,Nx.Column=xx,Nx.ColumnGroup=Ex,Nx.Summary=jC;const Lx=Nx;var Tx=bC(null),Dx=bC(null);const Ax=function(t){var n=t.rowInfo,r=t.column,i=t.colIndex,o=t.indent,a=t.index,s=t.component,l=t.renderIndex,c=t.record,u=t.style,d=t.className,h=t.inverse,f=t.getHeight,p=r.render,m=r.dataIndex,g=r.className,v=r.width,b=yC(Dx,["columnsOffset"]).columnsOffset,y=XC(n,r,i,o,a),_=y.key,S=y.fixedInfo,w=y.appendCellNode,C=y.additionalCellProps,x=C.style,E=C.colSpan,k=void 0===E?1:E,O=C.rowSpan,$=void 0===O?1:O,R=function(e,t,n){return n[e+(t||1)]-(n[e]||0)}(i-1,k,b),I=k>1?v-R:0,M=me(me(me({},x),u),{},{flex:"0 0 ".concat(R,"px"),width:"".concat(R,"px"),marginRight:I,pointerEvents:"auto"}),P=e.useMemo((function(){return h?$<=1:0===k||0===$||$>1}),[$,k,h]);P?M.visibility="hidden":h&&(M.height=null===f||void 0===f?void 0:f($));var N=P?function(){return null}:p,L={};return 0!==$&&0!==k||(L.rowSpan=1,L.colSpan=1),e.createElement(PC,Gt({className:Ji()(g,d),ellipsis:r.ellipsis,align:r.align,scope:r.rowScope,component:s,prefixCls:n.prefixCls,key:_,record:c,index:a,renderIndex:l,dataIndex:m,render:N,shouldCellUpdate:r.shouldCellUpdate},S,{appendNode:w,additionalProps:me(me({},C),{},{style:M},L)}))};var Bx=["data","index","className","rowKey","style","extra","getHeight"];const jx=xC(e.forwardRef((function(t,n){var r,i=t.data,o=t.index,a=t.className,s=t.rowKey,l=t.style,c=t.extra,u=t.getHeight,d=lo(t,Bx),h=i.record,f=i.indent,p=i.index,m=yC(kC,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),g=m.scrollX,v=m.flattenColumns,b=m.prefixCls,y=m.fixColumn,_=m.componentWidth,S=yC(Tx,["getComponent"]).getComponent,w=KC(h,s,o,f),C=S(["body","row"],"div"),x=S(["body","cell"],"div"),E=w.rowSupportExpand,k=w.expanded,O=w.rowProps,$=w.expandedRowRender,R=w.expandedRowClassName;if(E&&k){var I=$(h,o,f+1,k),M=qC(R,h,o,f),P={};y&&(P={style:fe({},"--virtual-width","".concat(_,"px"))});var N="".concat(b,"-expanded-row-cell");r=e.createElement(C,{className:Ji()("".concat(b,"-expanded-row"),"".concat(b,"-expanded-row-level-").concat(f+1),M)},e.createElement(PC,{component:x,prefixCls:b,className:Ji()(N,fe({},"".concat(N,"-fixed"),y)),additionalProps:P},I))}var L=me(me({},l),{},{width:g});c&&(L.position="absolute",L.pointerEvents="none");var T=e.createElement(C,Gt({},O,d,{"data-row-key":s,ref:E?null:n,className:Ji()(a,"".concat(b,"-row"),null===O||void 0===O?void 0:O.className,fe({},"".concat(b,"-row-extra"),c)),style:me(me({},L),null===O||void 0===O?void 0:O.style)}),v.map((function(t,n){return e.createElement(Ax,{key:n,component:x,rowInfo:w,column:t,colIndex:n,indent:f,index:o,renderIndex:p,record:h,inverse:c,getHeight:u})})));return E?e.createElement("div",{ref:n},T,r):T})));var zx=e.forwardRef((function(t,n){var r=t.data,i=t.onScroll,o=yC(kC,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),a=o.flattenColumns,s=o.onColumnResize,l=o.getRowKey,c=o.expandedKeys,u=o.prefixCls,d=o.childrenColumnName,h=o.scrollX,f=o.direction,p=yC(Tx),m=p.sticky,g=p.scrollY,v=p.listItemHeight,b=p.getComponent,y=p.onScroll,_=e.useRef(),S=WC(r,d,c,l),w=e.useMemo((function(){var e=0;return a.map((function(t){var n=t.width;return[t.key,n,e+=n]}))}),[a]),C=e.useMemo((function(){return w.map((function(e){return e[2]}))}),[w]);e.useEffect((function(){w.forEach((function(e){var t=Be(e,2),n=t[0],r=t[1];s(n,r)}))}),[w]),e.useImperativeHandle(n,(function(){var e,t={scrollTo:function(e){var t;null===(t=_.current)||void 0===t||t.scrollTo(e)},nativeElement:null===(e=_.current)||void 0===e?void 0:e.nativeElement};return Object.defineProperty(t,"scrollLeft",{get:function(){var e;return(null===(e=_.current)||void 0===e?void 0:e.getScrollInfo().x)||0},set:function(e){var t;null===(t=_.current)||void 0===t||t.scrollTo({left:e})}}),t}));var x=function(e,t){var n,r=null===(n=S[t])||void 0===n?void 0:n.record,i=e.onCell;if(i){var o,a=i(r,t);return null!==(o=null===a||void 0===a?void 0:a.rowSpan)&&void 0!==o?o:1}return 1},E=e.useMemo((function(){return{columnsOffset:C}}),[C]),k="".concat(u,"-tbody"),O=b(["body","wrapper"]),$={};return m&&($.position="sticky",$.bottom=0,"object"===le(m)&&m.offsetScroll&&($.bottom=m.offsetScroll)),e.createElement(Dx.Provider,{value:E},e.createElement(fp,{fullHeight:!1,ref:_,prefixCls:"".concat(k,"-virtual"),styles:{horizontalScrollBar:$},className:k,height:g,itemHeight:v||24,data:S,itemKey:function(e){return l(e.record)},component:O,scrollWidth:h,direction:f,onVirtualScroll:function(e){var t,n=e.x;i({currentTarget:null===(t=_.current)||void 0===t?void 0:t.nativeElement,scrollLeft:n})},onScroll:y,extraRender:function(t){var n=t.start,r=t.end,i=t.getSize,o=t.offsetY;if(r<0)return null;for(var s=a.filter((function(e){return 0===x(e,n)})),c=n,u=function(e){if(!(s=s.filter((function(t){return 0===x(t,e)}))).length)return c=e,1},d=n;d>=0&&!u(d);d-=1);for(var h=a.filter((function(e){return 1!==x(e,r)})),f=r,p=function(e){if(!(h=h.filter((function(t){return 1!==x(t,e)}))).length)return f=Math.max(e-1,r),1},m=r;m<S.length&&!p(m);m+=1);for(var g=[],v=function(e){if(!S[e])return 1;a.some((function(t){return x(t,e)>1}))&&g.push(e)},b=c;b<=f;b+=1)v(b);return g.map((function(t){var n=S[t],r=l(n.record,t),a=i(r);return e.createElement(jx,{key:t,data:n,rowKey:r,index:t,style:{top:-o+a.top},extra:!0,getHeight:function(e){var n=t+e-1,o=l(S[n].record,n),a=i(r,o);return a.bottom-a.top}})}))}},(function(t,n,r){var i=l(t.record,n);return e.createElement(jx,{data:t,rowKey:i,index:n,style:r.style})})))}));const Hx=xC(zx);var Fx=function(t,n){var r=n.ref,i=n.onScroll;return e.createElement(Hx,{ref:r,data:t,onScroll:i})};function Wx(t,n){var r=t.data,i=t.columns,o=t.scroll,a=t.sticky,s=t.prefixCls,l=void 0===s?kx:s,c=t.className,u=t.listItemHeight,d=t.components,h=t.onScroll,f=o||{},p=f.x,m=f.y;"number"!==typeof p&&(p=1),"number"!==typeof m&&(m=500);var g=_o((function(e,t){return rr(d,e)||t})),v=_o(h),b=e.useMemo((function(){return{sticky:a,scrollY:m,listItemHeight:u,getComponent:g,onScroll:v}}),[a,m,u,g,v]);return e.createElement(Tx.Provider,{value:b},e.createElement(Lx,Gt({},t,{className:Ji()(c,"".concat(l,"-virtual")),scroll:me(me({},o),{},{x:p}),components:me(me({},d),{},{body:null!==r&&void 0!==r&&r.length?Fx:void 0}),columns:i,internalHooks:vC,tailor:!0,ref:n})))}var Kx=e.forwardRef(Wx);function Vx(e){return CC(Kx,e)}Vx();const Ux=e=>null,qx=e=>null;var Xx=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"];const Gx=(0,e.forwardRef)((function(t,n){var r=t.prefixCls,i=void 0===r?"rc-checkbox":r,o=t.className,a=t.style,s=t.checked,l=t.disabled,c=t.defaultChecked,u=void 0!==c&&c,d=t.type,h=void 0===d?"checkbox":d,f=t.title,p=t.onChange,m=lo(t,Xx),g=(0,e.useRef)(null),v=(0,e.useRef)(null),b=Be(Co(u,{value:s}),2),y=b[0],_=b[1];(0,e.useImperativeHandle)(n,(function(){return{focus:function(e){var t;null===(t=g.current)||void 0===t||t.focus(e)},blur:function(){var e;null===(e=g.current)||void 0===e||e.blur()},input:g.current,nativeElement:v.current}}));var S=Ji()(i,o,fe(fe({},"".concat(i,"-checked"),y),"".concat(i,"-disabled"),l));return e.createElement("span",{className:S,title:f,style:a,ref:v},e.createElement("input",Gt({},m,{className:"".concat(i,"-input"),ref:g,onChange:function(e){l||("checked"in t||_(e.target.checked),null===p||void 0===p||p({target:me(me({},t),{},{type:h,checked:e.target.checked}),stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},nativeEvent:e.nativeEvent}))},disabled:l,checked:!!y,type:h})),e.createElement("span",{className:"".concat(i,"-inner")}))})),Yx=e.createContext(null);var Qx=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const Jx=(t,n)=>{var r;const{prefixCls:i,className:o,rootClassName:a,children:s,indeterminate:l=!1,style:c,onMouseEnter:u,onMouseLeave:d,skipGroup:h=!1,disabled:f}=t,p=Qx(t,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:m,direction:g,checkbox:v}=e.useContext(Le),b=e.useContext(Yx),{isFormItemInput:y}=e.useContext(Yd),_=e.useContext(Wi),S=null!==(r=(null===b||void 0===b?void 0:b.disabled)||f)&&void 0!==r?r:_,w=e.useRef(p.value),C=e.useRef(null),x=io(n,C);e.useEffect((()=>{null===b||void 0===b||b.registerValue(p.value)}),[]),e.useEffect((()=>{if(!h)return p.value!==w.current&&(null===b||void 0===b||b.cancelValue(w.current),null===b||void 0===b||b.registerValue(p.value),w.current=p.value),()=>null===b||void 0===b?void 0:b.cancelValue(p.value)}),[p.value]),e.useEffect((()=>{var e;(null===(e=C.current)||void 0===e?void 0:e.input)&&(C.current.input.indeterminate=l)}),[l]);const E=m("checkbox",i),k=Hs(E),[O,$,R]=Tw(E,k),I=Object.assign({},p);b&&!h&&(I.onChange=function(){p.onChange&&p.onChange.apply(p,arguments),b.toggleOption&&b.toggleOption({label:s,value:p.value})},I.name=b.name,I.checked=b.value.includes(p.value));const M=Ji()(`${E}-wrapper`,{[`${E}-rtl`]:"rtl"===g,[`${E}-wrapper-checked`]:I.checked,[`${E}-wrapper-disabled`]:S,[`${E}-wrapper-in-form-item`]:y},null===v||void 0===v?void 0:v.className,o,a,R,k,$),P=Ji()({[`${E}-indeterminate`]:l},Zl,$);return O(e.createElement(oc,{component:"Checkbox",disabled:S},e.createElement("label",{className:M,style:Object.assign(Object.assign({},null===v||void 0===v?void 0:v.style),c),onMouseEnter:u,onMouseLeave:d},e.createElement(Gx,Object.assign({},I,{prefixCls:E,className:P,disabled:S,ref:x})),void 0!==s&&e.createElement("span",null,s))))};const Zx=e.forwardRef(Jx);var eE=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const tE=e.forwardRef(((t,n)=>{const{defaultValue:r,children:i,options:o=[],prefixCls:a,className:s,rootClassName:l,style:c,onChange:u}=t,d=eE(t,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:h,direction:f}=e.useContext(Le),[p,m]=e.useState(d.value||r||[]),[g,v]=e.useState([]);e.useEffect((()=>{"value"in d&&m(d.value||[])}),[d.value]);const b=e.useMemo((()=>o.map((e=>"string"===typeof e||"number"===typeof e?{label:e,value:e}:e))),[o]),y=h("checkbox",a),_=`${y}-group`,S=Hs(y),[w,C,x]=Tw(y,S),E=Xf(d,["value","disabled"]),k=o.length?b.map((t=>e.createElement(Zx,{prefixCls:y,key:t.value.toString(),disabled:"disabled"in t?t.disabled:d.disabled,value:t.value,checked:p.includes(t.value),onChange:t.onChange,className:`${_}-item`,style:t.style,title:t.title,id:t.id,required:t.required},t.label))):i,O={toggleOption:e=>{const t=p.indexOf(e.value),n=se(p);-1===t?n.push(e.value):n.splice(t,1),"value"in d||m(n),null===u||void 0===u||u(n.filter((e=>g.includes(e))).sort(((e,t)=>b.findIndex((t=>t.value===e))-b.findIndex((e=>e.value===t)))))},value:p,disabled:d.disabled,name:d.name,registerValue:e=>{v((t=>[].concat(se(t),[e])))},cancelValue:e=>{v((t=>t.filter((t=>t!==e))))}},$=Ji()(_,{[`${_}-rtl`]:"rtl"===f},s,l,x,S,C);return w(e.createElement("div",Object.assign({className:$,style:c},E,{ref:n}),e.createElement(Yx.Provider,{value:O},k)))})),nE=Zx;nE.Group=tE,nE.__ANT_CHECKBOX=!0;const rE=nE,iE=e.createContext(null),oE=iE.Provider,aE=iE,sE=e.createContext(null),lE=sE.Provider,cE=e=>{const{componentCls:t,antCls:n}=e,r=`${t}-group`;return{[r]:Object.assign(Object.assign({},Ma(e)),{display:"inline-block",fontSize:0,[`&${r}-rtl`]:{direction:"rtl"},[`&${r}-block`]:{display:"flex"},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:"none"}})}},uE=e=>{const{componentCls:t,wrapperMarginInlineEnd:n,colorPrimary:r,radioSize:i,motionDurationSlow:o,motionDurationMid:a,motionEaseInOutCirc:s,colorBgContainer:l,colorBorder:c,lineWidth:u,colorBgContainerDisabled:d,colorTextDisabled:h,paddingXS:f,dotColorDisabled:p,lineType:m,radioColor:g,radioBgColor:v,calc:b}=e,y=`${t}-inner`,_=b(i).sub(b(4).mul(2)),S=b(1).mul(i).equal({unit:!0});return{[`${t}-wrapper`]:Object.assign(Object.assign({},Ma(e)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:n,cursor:"pointer",[`&${t}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:e.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},"&-block":{flex:1,justifyContent:"center"},[`${t}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${It(u)} ${m} ${r}`,borderRadius:"50%",visibility:"hidden",opacity:0,content:'""'},[t]:Object.assign(Object.assign({},Ma(e)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${t}-wrapper:hover &,\n &:hover ${y}`]:{borderColor:r},[`${t}-input:focus-visible + ${y}`]:Object.assign({},Na(e)),[`${t}:hover::after, ${t}-wrapper:hover &::after`]:{visibility:"visible"},[`${t}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:S,height:S,marginBlockStart:b(1).mul(i).div(-2).equal({unit:!0}),marginInlineStart:b(1).mul(i).div(-2).equal({unit:!0}),backgroundColor:g,borderBlockStart:0,borderInlineStart:0,borderRadius:S,transform:"scale(0)",opacity:0,transition:`all ${o} ${s}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:S,height:S,backgroundColor:l,borderColor:c,borderStyle:"solid",borderWidth:u,borderRadius:"50%",transition:`all ${a}`},[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${t}-checked`]:{[y]:{borderColor:r,backgroundColor:v,"&::after":{transform:`scale(${e.calc(e.dotSize).div(i).equal()})`,opacity:1,transition:`all ${o} ${s}`}}},[`${t}-disabled`]:{cursor:"not-allowed",[y]:{backgroundColor:d,borderColor:c,cursor:"not-allowed","&::after":{backgroundColor:p}},[`${t}-input`]:{cursor:"not-allowed"},[`${t}-disabled + span`]:{color:h,cursor:"not-allowed"},[`&${t}-checked`]:{[y]:{"&::after":{transform:`scale(${b(_).div(i).equal()})`}}}},[`span${t} + *`]:{paddingInlineStart:f,paddingInlineEnd:f}})}},dE=e=>{const{buttonColor:t,controlHeight:n,componentCls:r,lineWidth:i,lineType:o,colorBorder:a,motionDurationSlow:s,motionDurationMid:l,buttonPaddingInline:c,fontSize:u,buttonBg:d,fontSizeLG:h,controlHeightLG:f,controlHeightSM:p,paddingXS:m,borderRadius:g,borderRadiusSM:v,borderRadiusLG:b,buttonCheckedBg:y,buttonSolidCheckedColor:_,colorTextDisabled:S,colorBgContainerDisabled:w,buttonCheckedBgDisabled:C,buttonCheckedColorDisabled:x,colorPrimary:E,colorPrimaryHover:k,colorPrimaryActive:O,buttonSolidCheckedBg:$,buttonSolidCheckedHoverBg:R,buttonSolidCheckedActiveBg:I,calc:M}=e;return{[`${r}-button-wrapper`]:{position:"relative",display:"inline-block",height:n,margin:0,paddingInline:c,paddingBlock:0,color:t,fontSize:u,lineHeight:It(M(n).sub(M(i).mul(2)).equal()),background:d,border:`${It(i)} ${o} ${a}`,borderBlockStartWidth:M(i).add(.02).equal(),borderInlineStartWidth:0,borderInlineEndWidth:i,cursor:"pointer",transition:[`color ${l}`,`background ${l}`,`box-shadow ${l}`].join(","),a:{color:t},[`> ${r}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:M(i).mul(-1).equal(),insetInlineStart:M(i).mul(-1).equal(),display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:i,paddingInline:0,backgroundColor:a,transition:`background-color ${s}`,content:'""'}},"&:first-child":{borderInlineStart:`${It(i)} ${o} ${a}`,borderStartStartRadius:g,borderEndStartRadius:g},"&:last-child":{borderStartEndRadius:g,borderEndEndRadius:g},"&:first-child:last-child":{borderRadius:g},[`${r}-group-large &`]:{height:f,fontSize:h,lineHeight:It(M(f).sub(M(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:b,borderEndStartRadius:b},"&:last-child":{borderStartEndRadius:b,borderEndEndRadius:b}},[`${r}-group-small &`]:{height:p,paddingInline:M(m).sub(i).equal(),paddingBlock:0,lineHeight:It(M(p).sub(M(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:v,borderEndStartRadius:v},"&:last-child":{borderStartEndRadius:v,borderEndEndRadius:v}},"&:hover":{position:"relative",color:E},"&:has(:focus-visible)":Object.assign({},Na(e)),[`${r}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${r}-button-wrapper-disabled)`]:{zIndex:1,color:E,background:y,borderColor:E,"&::before":{backgroundColor:E},"&:first-child":{borderColor:E},"&:hover":{color:k,borderColor:k,"&::before":{backgroundColor:k}},"&:active":{color:O,borderColor:O,"&::before":{backgroundColor:O}}},[`${r}-group-solid &-checked:not(${r}-button-wrapper-disabled)`]:{color:_,background:$,borderColor:$,"&:hover":{color:_,background:R,borderColor:R},"&:active":{color:_,background:I,borderColor:I}},"&-disabled":{color:S,backgroundColor:w,borderColor:a,cursor:"not-allowed","&:first-child, &:hover":{color:S,backgroundColor:w,borderColor:a}},[`&-disabled${r}-button-wrapper-checked`]:{color:x,backgroundColor:C,borderColor:a,boxShadow:"none"},"&-block":{flex:1,textAlign:"center"}}}},hE=ml("Radio",(e=>{const{controlOutline:t,controlOutlineWidth:n}=e,r=`0 0 0 ${It(n)} ${t}`,i=ol(e,{radioFocusShadow:r,radioButtonFocusShadow:r});return[cE(i),uE(i),dE(i)]}),(e=>{const{wireframe:t,padding:n,marginXS:r,lineWidth:i,fontSizeLG:o,colorText:a,colorBgContainer:s,colorTextDisabled:l,controlItemBgActiveDisabled:c,colorTextLightSolid:u,colorPrimary:d,colorPrimaryHover:h,colorPrimaryActive:f,colorWhite:p}=e;return{radioSize:o,dotSize:t?o-8:o-2*(4+i),dotColorDisabled:l,buttonSolidCheckedColor:u,buttonSolidCheckedBg:d,buttonSolidCheckedHoverBg:h,buttonSolidCheckedActiveBg:f,buttonBg:s,buttonCheckedBg:s,buttonColor:a,buttonCheckedBgDisabled:c,buttonCheckedColorDisabled:l,buttonPaddingInline:n-i,wrapperMarginInlineEnd:r,radioColor:t?d:p,radioBgColor:t?s:d}}),{unitless:{radioSize:!0,dotSize:!0}});var fE=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const pE=(t,n)=>{var r,i;const o=e.useContext(aE),a=e.useContext(sE),{getPrefixCls:s,direction:l,radio:c}=e.useContext(Le),u=e.useRef(null),d=io(n,u),{isFormItemInput:h}=e.useContext(Yd);const f=e=>{var n,r;null===(n=t.onChange)||void 0===n||n.call(t,e),null===(r=null===o||void 0===o?void 0:o.onChange)||void 0===r||r.call(o,e)},{prefixCls:p,className:m,rootClassName:g,children:v,style:b,title:y}=t,_=fE(t,["prefixCls","className","rootClassName","children","style","title"]),S=s("radio",p),w="button"===((null===o||void 0===o?void 0:o.optionType)||a),C=w?`${S}-button`:S,x=Hs(S),[E,k,O]=hE(S,x),$=Object.assign({},_),R=e.useContext(Wi);o&&($.name=o.name,$.onChange=f,$.checked=t.value===o.value,$.disabled=null!==(r=$.disabled)&&void 0!==r?r:o.disabled),$.disabled=null!==(i=$.disabled)&&void 0!==i?i:R;const I=Ji()(`${C}-wrapper`,{[`${C}-wrapper-checked`]:$.checked,[`${C}-wrapper-disabled`]:$.disabled,[`${C}-wrapper-rtl`]:"rtl"===l,[`${C}-wrapper-in-form-item`]:h,[`${C}-wrapper-block`]:!!(null===o||void 0===o?void 0:o.block)},null===c||void 0===c?void 0:c.className,m,g,k,O,x);return E(e.createElement(oc,{component:"Radio",disabled:$.disabled},e.createElement("label",{className:I,style:Object.assign(Object.assign({},null===c||void 0===c?void 0:c.style),b),onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,title:y},e.createElement(Gx,Object.assign({},$,{className:Ji()($.className,{[Zl]:!w}),type:"radio",prefixCls:C,ref:d})),void 0!==v?e.createElement("span",null,v):null)))};const mE=e.forwardRef(pE),gE=e.forwardRef(((t,n)=>{const{getPrefixCls:r,direction:i}=e.useContext(Le),{prefixCls:o,className:a,rootClassName:s,options:l,buttonStyle:c="outline",disabled:u,children:d,size:h,style:f,id:p,optionType:m,name:g,defaultValue:v,value:b,block:y=!1,onChange:_,onMouseEnter:S,onMouseLeave:w,onFocus:C,onBlur:x}=t,[E,k]=Co(v,{value:b}),O=e.useCallback((e=>{const n=E,r=e.target.value;"value"in t||k(r),r!==n&&(null===_||void 0===_||_(e))}),[E,k,_]),$=r("radio",o),R=`${$}-group`,I=Hs($),[M,P,N]=hE($,I);let L=d;l&&l.length>0&&(L=l.map((t=>"string"===typeof t||"number"===typeof t?e.createElement(mE,{key:t.toString(),prefixCls:$,disabled:u,value:t,checked:E===t},t):e.createElement(mE,{key:`radio-group-value-options-${t.value}`,prefixCls:$,disabled:t.disabled||u,value:t.value,checked:E===t.value,title:t.title,style:t.style,id:t.id,required:t.required},t.label))));const T=ac(h),D=Ji()(R,`${R}-${c}`,{[`${R}-${T}`]:T,[`${R}-rtl`]:"rtl"===i,[`${R}-block`]:y},a,s,P,N,I),A=e.useMemo((()=>({onChange:O,value:E,disabled:u,name:g,optionType:m,block:y})),[O,E,u,g,m,y]);return M(e.createElement("div",Object.assign({},Rs(t,{aria:!0,data:!0}),{className:D,style:f,onMouseEnter:S,onMouseLeave:w,onFocus:C,onBlur:x,id:p,ref:n}),e.createElement(oE,{value:A},L)))})),vE=e.memo(gE);var bE=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const yE=(t,n)=>{const{getPrefixCls:r}=e.useContext(Le),{prefixCls:i}=t,o=bE(t,["prefixCls"]),a=r("radio",i);return e.createElement(lE,{value:"button"},e.createElement(mE,Object.assign({prefixCls:a},o,{type:"radio",ref:n})))},_E=e.forwardRef(yE),SE=mE;SE.Button=_E,SE.Group=vE,SE.__ANT_RADIO=!0;const wE=SE,CE={},xE="SELECT_ALL",EE="SELECT_INVERT",kE="SELECT_NONE",OE=[],$E=(e,t)=>{let n=[];return(t||[]).forEach((t=>{n.push(t),t&&"object"===typeof t&&e in t&&(n=[].concat(se(n),se($E(e,t[e]))))})),n},RE=(t,n)=>{const{preserveSelectedRowKeys:r,selectedRowKeys:i,defaultSelectedRowKeys:o,getCheckboxProps:a,onChange:s,onSelect:l,onSelectAll:c,onSelectInvert:u,onSelectNone:d,onSelectMultiple:h,columnWidth:f,type:p,selections:m,fixed:g,renderCell:v,hideSelectAll:b,checkStrictly:y=!0}=n||{},{prefixCls:_,data:S,pageData:w,getRecordByKey:C,getRowKey:x,expandType:E,childrenColumnName:k,locale:O,getPopupContainer:$}=t,R=dr("Table"),[I,M]=function(t){const[n,r]=(0,e.useState)(null);return[(0,e.useCallback)(((e,i,o)=>{const a=null!==n&&void 0!==n?n:e,s=Math.min(a||0,e),l=Math.max(a||0,e),c=i.slice(s,l+1).map((e=>t(e))),u=c.some((e=>!o.has(e))),d=[];return c.forEach((e=>{u?(o.has(e)||d.push(e),o.add(e)):(o.delete(e),d.push(e))})),r(u?l:null),d}),[n]),e=>{r(e)}]}((e=>e)),[P,N]=Co(i||o||OE,{value:i}),L=e.useRef(new Map),T=(0,e.useCallback)((e=>{if(r){const t=new Map;e.forEach((e=>{let n=C(e);!n&&L.current.has(e)&&(n=L.current.get(e)),t.set(e,n)})),L.current=t}}),[C,r]);e.useEffect((()=>{T(P)}),[P]);const D=(0,e.useMemo)((()=>$E(k,w)),[k,w]),{keyEntities:A}=(0,e.useMemo)((()=>{if(y)return{keyEntities:null};let e=S;if(r){const t=new Set(D.map(((e,t)=>x(e,t)))),n=Array.from(L.current).reduce(((e,n)=>{let[r,i]=n;return t.has(r)?e:e.concat(i)}),[]);e=[].concat(se(e),se(n))}return AS(e,{externalGetKey:x,childrenPropName:k})}),[S,x,y,k,r,D]),B=(0,e.useMemo)((()=>{const e=new Map;return D.forEach(((t,n)=>{const r=x(t,n),i=(a?a(t):null)||{};e.set(r,i)})),e}),[D,x,a]),j=(0,e.useCallback)((e=>{var t;return!!(null===(t=B.get(x(e)))||void 0===t?void 0:t.disabled)}),[B,x]),[z,H]=(0,e.useMemo)((()=>{if(y)return[P||[],[]];const{checkedKeys:e,halfCheckedKeys:t}=bw(P,!0,A,j);return[e||[],t]}),[P,y,A,j]),F=(0,e.useMemo)((()=>{const e="radio"===p?z.slice(0,1):z;return new Set(e)}),[z,p]),W=(0,e.useMemo)((()=>"radio"===p?new Set:new Set(H)),[H,p]);e.useEffect((()=>{n||N(OE)}),[!!n]);const K=(0,e.useCallback)(((e,t)=>{let n,i;T(e),r?(n=e,i=e.map((e=>L.current.get(e)))):(n=[],i=[],e.forEach((e=>{const t=C(e);void 0!==t&&(n.push(e),i.push(t))}))),N(n),null===s||void 0===s||s(n,i,{type:t})}),[N,C,s,r]),V=(0,e.useCallback)(((e,t,n,r)=>{if(l){const i=n.map((e=>C(e)));l(C(e),t,i,r)}K(n,"single")}),[l,C,K]),U=(0,e.useMemo)((()=>{if(!m||b)return null;return(!0===m?[xE,EE,kE]:m).map((e=>e===xE?{key:"all",text:O.selectionAll,onSelect(){K(S.map(((e,t)=>x(e,t))).filter((e=>{const t=B.get(e);return!(null===t||void 0===t?void 0:t.disabled)||F.has(e)})),"all")}}:e===EE?{key:"invert",text:O.selectInvert,onSelect(){const e=new Set(F);w.forEach(((t,n)=>{const r=x(t,n),i=B.get(r);(null===i||void 0===i?void 0:i.disabled)||(e.has(r)?e.delete(r):e.add(r))}));const t=Array.from(e);u&&(R.deprecated(!1,"onSelectInvert","onChange"),u(t)),K(t,"invert")}}:e===kE?{key:"none",text:O.selectNone,onSelect(){null===d||void 0===d||d(),K(Array.from(F).filter((e=>{const t=B.get(e);return null===t||void 0===t?void 0:t.disabled})),"none")}}:e)).map((e=>Object.assign(Object.assign({},e),{onSelect:function(){for(var t,n,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];null===(n=e.onSelect)||void 0===n||(t=n).call.apply(t,[e].concat(i)),M(null)}})))}),[m,F,w,x,u,K]);return[(0,e.useCallback)((t=>{var r;if(!n)return t.filter((e=>e!==CE));let i=se(t);const o=new Set(F),a=D.map(x).filter((e=>!B.get(e).disabled)),s=a.every((e=>o.has(e))),l=a.some((e=>o.has(e))),u=()=>{const e=[];s?a.forEach((t=>{o.delete(t),e.push(t)})):a.forEach((t=>{o.has(t)||(o.add(t),e.push(t))}));const t=Array.from(o);null===c||void 0===c||c(!s,t.map((e=>C(e))),e.map((e=>C(e)))),K(t,"all"),M(null)};let d,S,w;if("radio"!==p){let t;if(U){const n={getPopupContainer:$,items:U.map(((e,t)=>{const{key:n,text:r,onSelect:i}=e;return{key:null!==n&&void 0!==n?n:t,onClick:()=>{null===i||void 0===i||i(a)},label:r}}))};t=e.createElement("div",{className:`${_}-selection-extra`},e.createElement(ES,{menu:n,getPopupContainer:$},e.createElement("span",null,e.createElement(Hm,null))))}const n=D.map(((e,t)=>{const n=x(e,t),r=B.get(n)||{};return Object.assign({checked:o.has(n)},r)})).filter((e=>{let{disabled:t}=e;return t})),r=!!n.length&&n.length===D.length,i=r&&n.every((e=>{let{checked:t}=e;return t})),c=r&&n.some((e=>{let{checked:t}=e;return t}));S=e.createElement(rE,{checked:r?i:!!D.length&&s,indeterminate:r?!i&&c:!s&&l,onChange:u,disabled:0===D.length||r,"aria-label":t?"Custom selection":"Select all",skipGroup:!0}),d=!b&&e.createElement("div",{className:`${_}-selection`},S,t)}w="radio"===p?(t,n,r)=>{const i=x(n,r),a=o.has(i);return{node:e.createElement(wE,Object.assign({},B.get(i),{checked:a,onClick:e=>e.stopPropagation(),onChange:e=>{o.has(i)||V(i,!0,[i],e.nativeEvent)}})),checked:a}}:(t,n,r)=>{var i;const s=x(n,r),l=o.has(s),c=W.has(s),u=B.get(s);let d;return d="nest"===E?c:null!==(i=null===u||void 0===u?void 0:u.indeterminate)&&void 0!==i?i:c,{node:e.createElement(rE,Object.assign({},u,{indeterminate:d,checked:l,skipGroup:!0,onClick:e=>e.stopPropagation(),onChange:e=>{let{nativeEvent:t}=e;const{shiftKey:n}=t,r=a.findIndex((e=>e===s)),i=z.some((e=>a.includes(e)));if(n&&y&&i){const e=I(r,a,o),t=Array.from(o);null===h||void 0===h||h(!l,t.map((e=>C(e))),e.map((e=>C(e)))),K(t,"multiple")}else{const e=z;if(y){const n=l?sw(e,s):lw(e,s);V(s,!l,n,t)}else{const n=bw([].concat(se(e),[s]),!0,A,j),{checkedKeys:r,halfCheckedKeys:i}=n;let o=r;if(l){const e=new Set(r);e.delete(s),o=bw(Array.from(e),{checked:!1,halfCheckedKeys:i},A,j).checkedKeys}V(s,!l,o,t)}}M(l?null:r)}})),checked:l}};if(!i.includes(CE))if(0===i.findIndex((e=>{var t;return"EXPAND_COLUMN"===(null===(t=e[ex])||void 0===t?void 0:t.columnType)}))){const[e,...t]=i;i=[e,CE].concat(se(t))}else i=[CE].concat(se(i));const k=i.indexOf(CE);i=i.filter(((e,t)=>e!==CE||t===k));const O=i[k-1],R=i[k+1];let P=g;void 0===P&&(void 0!==(null===R||void 0===R?void 0:R.fixed)?P=R.fixed:void 0!==(null===O||void 0===O?void 0:O.fixed)&&(P=O.fixed)),P&&O&&"EXPAND_COLUMN"===(null===(r=O[ex])||void 0===r?void 0:r.columnType)&&void 0===O.fixed&&(O.fixed=P);const N=Ji()(`${_}-selection-col`,{[`${_}-selection-col-with-dropdown`]:m&&"checkbox"===p}),L={fixed:P,width:f,className:`${_}-selection-column`,title:(null===n||void 0===n?void 0:n.columnTitle)?"function"===typeof n.columnTitle?n.columnTitle(S):n.columnTitle:d,render:(e,t,n)=>{const{node:r,checked:i}=w(e,t,n);return v?v(i,t,n,r):r},onCell:n.onCell,[ex]:{className:N}};return i.map((e=>e===CE?L:e))}),[x,D,n,z,F,W,f,U,E,B,h,V,j]),F]};function IE(t,n){return(0,e.useImperativeHandle)(t,(()=>{const e=n(),{nativeElement:t}=e;return"undefined"!==typeof Proxy?new Proxy(t,{get:(t,n)=>e[n]?e[n]:Reflect.get(t,n)}):(i=e,(r=t)._antProxy=r._antProxy||{},Object.keys(i).forEach((e=>{if(!(e in r._antProxy)){const t=r[e];r._antProxy[e]=t,r[e]=i[e]}})),r);var r,i}))}function ME(e){return null!==e&&void 0!==e&&e===e.window}const PE=e=>{var t,n;if("undefined"===typeof window)return 0;let r=0;return ME(e)?r=e.pageYOffset:e instanceof Document?r=e.documentElement.scrollTop:(e instanceof HTMLElement||e)&&(r=e.scrollTop),e&&!ME(e)&&"number"!==typeof r&&(r=null===(n=(null!==(t=e.ownerDocument)&&void 0!==t?t:e).documentElement)||void 0===n?void 0:n.scrollTop),r};function NE(){const[,t]=e.useReducer((e=>e+1),0);return t}const LE=["xxl","xl","lg","md","sm","xs"];function TE(){const[,t]=Oa(),n=(e=>({xs:`(max-width: ${e.screenXSMax}px)`,sm:`(min-width: ${e.screenSM}px)`,md:`(min-width: ${e.screenMD}px)`,lg:`(min-width: ${e.screenLG}px)`,xl:`(min-width: ${e.screenXL}px)`,xxl:`(min-width: ${e.screenXXL}px)`}))((e=>{const t=e,n=[].concat(LE).reverse();return n.forEach(((e,r)=>{const i=e.toUpperCase(),o=`screen${i}Min`,a=`screen${i}`;if(!(t[o]<=t[a]))throw new Error(`${o}<=${a} fails : !(${t[o]}<=${t[a]})`);if(r<n.length-1){const e=`screen${i}Max`;if(!(t[a]<=t[e]))throw new Error(`${a}<=${e} fails : !(${t[a]}<=${t[e]})`);const o=`screen${n[r+1].toUpperCase()}Min`;if(!(t[e]<=t[o]))throw new Error(`${e}<=${o} fails : !(${t[e]}<=${t[o]})`)}})),e})(t));return e.useMemo((()=>{const e=new Map;let t=-1,r={};return{matchHandlers:{},dispatch:t=>(r=t,e.forEach((e=>e(r))),e.size>=1),subscribe(n){return e.size||this.register(),t+=1,e.set(t,n),n(r),t},unsubscribe(t){e.delete(t),e.size||this.unregister()},unregister(){Object.keys(n).forEach((e=>{const t=n[e],r=this.matchHandlers[t];null===r||void 0===r||r.mql.removeListener(null===r||void 0===r?void 0:r.listener)})),e.clear()},register(){Object.keys(n).forEach((e=>{const t=n[e],i=t=>{let{matches:n}=t;this.dispatch(Object.assign(Object.assign({},r),{[e]:n}))},o=window.matchMedia(t);o.addListener(i),this.matchHandlers[t]={mql:o,listener:i},i(o)}))},responsiveMap:n}}),[t])}const DE=function(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const n=(0,e.useRef)({}),r=NE(),i=TE();return Bt((()=>{const e=i.subscribe((e=>{n.current=e,t&&r()}));return()=>i.unsubscribe(e)}),[]),n.current};const AE={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"};var BE=function(t,n){return e.createElement(us,Gt({},t,{ref:n,icon:AE}))};const jE=e.forwardRef(BE);const zE={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"};var HE=function(t,n){return e.createElement(us,Gt({},t,{ref:n,icon:zE}))};const FE=e.forwardRef(HE);const WE={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};var KE=function(t,n){return e.createElement(us,Gt({},t,{ref:n,icon:WE}))};const VE=e.forwardRef(KE);const UE={items_per_page:"\u6761/\u9875",jump_to:"\u8df3\u81f3",jump_to_confirm:"\u786e\u5b9a",page:"\u9875",prev_page:"\u4e0a\u4e00\u9875",next_page:"\u4e0b\u4e00\u9875",prev_5:"\u5411\u524d 5 \u9875",next_5:"\u5411\u540e 5 \u9875",prev_3:"\u5411\u524d 3 \u9875",next_3:"\u5411\u540e 3 \u9875",page_size:"\u9875\u7801"};var qE=["10","20","50","100"];const XE=function(t){var n=t.pageSizeOptions,r=void 0===n?qE:n,i=t.locale,o=t.changeSize,a=t.pageSize,s=t.goButton,l=t.quickGo,c=t.rootPrefixCls,u=t.selectComponentClass,d=t.selectPrefixCls,h=t.disabled,f=t.buildOptionText,p=t.showSizeChanger,m=Be(e.useState(""),2),g=m[0],v=m[1],b=function(){return!g||Number.isNaN(g)?void 0:Number(g)},y="function"===typeof f?f:function(e){return"".concat(e," ").concat(i.items_per_page)},_=function(e){""!==g&&(e.keyCode!==ks.ENTER&&"click"!==e.type||(v(""),null===l||void 0===l||l(b())))},S="".concat(c,"-options");if(!p&&!l)return null;var w=null,C=null,x=null;if(p&&u){var E="object"===le(p)?p:{},k=E.options,O=E.className,$=k?void 0:(r.some((function(e){return e.toString()===a.toString()}))?r:r.concat([a.toString()]).sort((function(e,t){return(Number.isNaN(Number(e))?0:Number(e))-(Number.isNaN(Number(t))?0:Number(t))}))).map((function(t,n){return e.createElement(u.Option,{key:n,value:t.toString()},y(t))}));w=e.createElement(u,Gt({disabled:h,prefixCls:d,showSearch:!1,optionLabelProp:k?"label":"children",popupMatchSelectWidth:!1,value:(a||r[0]).toString(),getPopupContainer:function(e){return e.parentNode},"aria-label":i.page_size,defaultOpen:!1},"object"===le(p)?p:null,{className:Ji()("".concat(S,"-size-changer"),O),options:k,onChange:function(e,t){var n;null===o||void 0===o||o(Number(e)),"object"===le(p)&&(null===(n=p.onChange)||void 0===n||n.call(p,e,t))}}),$)}return l&&(s&&(x="boolean"===typeof s?e.createElement("button",{type:"button",onClick:_,onKeyUp:_,disabled:h,className:"".concat(S,"-quick-jumper-button")},i.jump_to_confirm):e.createElement("span",{onClick:_,onKeyUp:_},s)),C=e.createElement("div",{className:"".concat(S,"-quick-jumper")},i.jump_to,e.createElement("input",{disabled:h,type:"text",value:g,onChange:function(e){v(e.target.value)},onKeyUp:_,onBlur:function(e){s||""===g||(v(""),e.relatedTarget&&(e.relatedTarget.className.indexOf("".concat(c,"-item-link"))>=0||e.relatedTarget.className.indexOf("".concat(c,"-item"))>=0)||null===l||void 0===l||l(b()))},"aria-label":i.page}),i.page,x)),e.createElement("li",{className:S},w,C)};const GE=function(t){var n=t.rootPrefixCls,r=t.page,i=t.active,o=t.className,a=t.showTitle,s=t.onClick,l=t.onKeyPress,c=t.itemRender,u="".concat(n,"-item"),d=Ji()(u,"".concat(u,"-").concat(r),fe(fe({},"".concat(u,"-active"),i),"".concat(u,"-disabled"),!r),o),h=c(r,"page",e.createElement("a",{rel:"nofollow"},r));return h?e.createElement("li",{title:a?String(r):null,className:d,onClick:function(){s(r)},onKeyDown:function(e){l(e,s,r)},tabIndex:0},h):null};var YE=function(e,t,n){return n};function QE(){}function JE(e){var t=Number(e);return"number"===typeof t&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function ZE(e,t,n){var r="undefined"===typeof e?t:e;return Math.floor((n-1)/r)+1}const ek=function(t){var n=t.prefixCls,r=void 0===n?"rc-pagination":n,i=t.selectPrefixCls,o=void 0===i?"rc-select":i,a=t.className,s=t.selectComponentClass,l=t.current,c=t.defaultCurrent,u=void 0===c?1:c,d=t.total,h=void 0===d?0:d,f=t.pageSize,p=t.defaultPageSize,m=void 0===p?10:p,g=t.onChange,v=void 0===g?QE:g,b=t.hideOnSinglePage,y=t.align,_=t.showPrevNextJumpers,S=void 0===_||_,w=t.showQuickJumper,C=t.showLessItems,x=t.showTitle,E=void 0===x||x,k=t.onShowSizeChange,O=void 0===k?QE:k,$=t.locale,R=void 0===$?UE:$,I=t.style,M=t.totalBoundaryShowSizeChanger,P=void 0===M?50:M,N=t.disabled,L=t.simple,T=t.showTotal,D=t.showSizeChanger,A=void 0===D?h>P:D,B=t.pageSizeOptions,j=t.itemRender,z=void 0===j?YE:j,H=t.jumpPrevIcon,F=t.jumpNextIcon,W=t.prevIcon,K=t.nextIcon,V=e.useRef(null),U=Be(Co(10,{value:f,defaultValue:m}),2),q=U[0],X=U[1],G=Be(Co(1,{value:l,defaultValue:u,postState:function(e){return Math.max(1,Math.min(e,ZE(void 0,q,h)))}}),2),Y=G[0],Q=G[1],J=Be(e.useState(Y),2),Z=J[0],ee=J[1];(0,e.useEffect)((function(){ee(Y)}),[Y]);var te=Math.max(1,Y-(C?3:5)),ne=Math.min(ZE(void 0,q,h),Y+(C?3:5));function re(n,i){var o=n||e.createElement("button",{type:"button","aria-label":i,className:"".concat(r,"-item-link")});return"function"===typeof n&&(o=e.createElement(n,me({},t))),o}function ie(e){var t=e.target.value,n=ZE(void 0,q,h);return""===t?t:Number.isNaN(Number(t))?Z:t>=n?n:Number(t)}var oe=h>q&&w;function ae(e){var t=ie(e);switch(t!==Z&&ee(t),e.keyCode){case ks.ENTER:se(t);break;case ks.UP:se(t-1);break;case ks.DOWN:se(t+1)}}function se(e){if(function(e){return JE(e)&&e!==Y&&JE(h)&&h>0}(e)&&!N){var t=ZE(void 0,q,h),n=e;return e>t?n=t:e<1&&(n=1),n!==Z&&ee(n),Q(n),null===v||void 0===v||v(n,q),n}return Y}var ce=Y>1,ue=Y<ZE(void 0,q,h);function de(){ce&&se(Y-1)}function he(){ue&&se(Y+1)}function pe(){se(te)}function ge(){se(ne)}function ve(e,t){if("Enter"===e.key||e.charCode===ks.ENTER||e.keyCode===ks.ENTER){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];t.apply(void 0,r)}}function be(e){"click"!==e.type&&e.keyCode!==ks.ENTER||se(Z)}var ye=null,_e=Rs(t,{aria:!0,data:!0}),Se=T&&e.createElement("li",{className:"".concat(r,"-total-text")},T(h,[0===h?0:(Y-1)*q+1,Y*q>h?h:Y*q])),we=null,Ce=ZE(void 0,q,h);if(b&&h<=q)return null;var xe=[],Ee={rootPrefixCls:r,onClick:se,onKeyPress:ve,showTitle:E,itemRender:z,page:-1},ke=Y-1>0?Y-1:0,Oe=Y+1<Ce?Y+1:Ce,$e=w&&w.goButton,Re="object"===le(L)?L.readOnly:!L,Ie=$e,Me=null;L&&($e&&(Ie="boolean"===typeof $e?e.createElement("button",{type:"button",onClick:be,onKeyUp:be},R.jump_to_confirm):e.createElement("span",{onClick:be,onKeyUp:be},$e),Ie=e.createElement("li",{title:E?"".concat(R.jump_to).concat(Y,"/").concat(Ce):null,className:"".concat(r,"-simple-pager")},Ie)),Me=e.createElement("li",{title:E?"".concat(Y,"/").concat(Ce):null,className:"".concat(r,"-simple-pager")},Re?Z:e.createElement("input",{type:"text",value:Z,disabled:N,onKeyDown:function(e){e.keyCode!==ks.UP&&e.keyCode!==ks.DOWN||e.preventDefault()},onKeyUp:ae,onChange:ae,onBlur:function(e){se(ie(e))},size:3}),e.createElement("span",{className:"".concat(r,"-slash")},"/"),Ce));var Pe=C?1:2;if(Ce<=3+2*Pe){Ce||xe.push(e.createElement(GE,Gt({},Ee,{key:"noPager",page:1,className:"".concat(r,"-item-disabled")})));for(var Ne=1;Ne<=Ce;Ne+=1)xe.push(e.createElement(GE,Gt({},Ee,{key:Ne,page:Ne,active:Y===Ne})))}else{var Le=C?R.prev_3:R.prev_5,Te=C?R.next_3:R.next_5,De=z(te,"jump-prev",re(H,"prev page")),Ae=z(ne,"jump-next",re(F,"next page"));S&&(ye=De?e.createElement("li",{title:E?Le:null,key:"prev",onClick:pe,tabIndex:0,onKeyDown:function(e){ve(e,pe)},className:Ji()("".concat(r,"-jump-prev"),fe({},"".concat(r,"-jump-prev-custom-icon"),!!H))},De):null,we=Ae?e.createElement("li",{title:E?Te:null,key:"next",onClick:ge,tabIndex:0,onKeyDown:function(e){ve(e,ge)},className:Ji()("".concat(r,"-jump-next"),fe({},"".concat(r,"-jump-next-custom-icon"),!!F))},Ae):null);var je=Math.max(1,Y-Pe),ze=Math.min(Y+Pe,Ce);Y-1<=Pe&&(ze=1+2*Pe),Ce-Y<=Pe&&(je=Ce-2*Pe);for(var He=je;He<=ze;He+=1)xe.push(e.createElement(GE,Gt({},Ee,{key:He,page:He,active:Y===He})));if(Y-1>=2*Pe&&3!==Y&&(xe[0]=e.cloneElement(xe[0],{className:Ji()("".concat(r,"-item-after-jump-prev"),xe[0].props.className)}),xe.unshift(ye)),Ce-Y>=2*Pe&&Y!==Ce-2){var Fe=xe[xe.length-1];xe[xe.length-1]=e.cloneElement(Fe,{className:Ji()("".concat(r,"-item-before-jump-next"),Fe.props.className)}),xe.push(we)}1!==je&&xe.unshift(e.createElement(GE,Gt({},Ee,{key:1,page:1}))),ze!==Ce&&xe.push(e.createElement(GE,Gt({},Ee,{key:Ce,page:Ce})))}var We=function(t){var n=z(t,"prev",re(W,"prev page"));return e.isValidElement(n)?e.cloneElement(n,{disabled:!ce}):n}(ke);if(We){var Ke=!ce||!Ce;We=e.createElement("li",{title:E?R.prev_page:null,onClick:de,tabIndex:Ke?null:0,onKeyDown:function(e){ve(e,de)},className:Ji()("".concat(r,"-prev"),fe({},"".concat(r,"-disabled"),Ke)),"aria-disabled":Ke},We)}var Ve,Ue,qe=function(t){var n=z(t,"next",re(K,"next page"));return e.isValidElement(n)?e.cloneElement(n,{disabled:!ue}):n}(Oe);qe&&(L?(Ve=!ue,Ue=ce?0:null):Ue=(Ve=!ue||!Ce)?null:0,qe=e.createElement("li",{title:E?R.next_page:null,onClick:he,tabIndex:Ue,onKeyDown:function(e){ve(e,he)},className:Ji()("".concat(r,"-next"),fe({},"".concat(r,"-disabled"),Ve)),"aria-disabled":Ve},qe));var Xe=Ji()(r,a,fe(fe(fe(fe(fe({},"".concat(r,"-start"),"start"===y),"".concat(r,"-center"),"center"===y),"".concat(r,"-end"),"end"===y),"".concat(r,"-simple"),L),"".concat(r,"-disabled"),N));return e.createElement("ul",Gt({className:Xe,style:I,ref:V},_e),Se,We,L?Me:xe,qe,e.createElement(XE,{locale:R,rootPrefixCls:r,disabled:N,selectComponentClass:s,selectPrefixCls:o,changeSize:function(e){var t=ZE(e,q,h),n=Y>t&&0!==t?t:Y;X(e),ee(n),null===O||void 0===O||O(Y,e),Q(n),null===v||void 0===v||v(n,e)},pageSize:q,pageSizeOptions:B,quickGo:oe?se:null,goButton:Ie,showSizeChanger:A}))},tk=t=>e.createElement(Ym,Object.assign({},t,{showSearch:!0,size:"small"})),nk=t=>e.createElement(Ym,Object.assign({},t,{showSearch:!0,size:"middle"}));function rk(e){return ol(e,{inputAffixPadding:e.paddingXXS})}tk.Option=Ym.Option,nk.Option=Ym.Option;const ik=e=>{const{controlHeight:t,fontSize:n,lineHeight:r,lineWidth:i,controlHeightSM:o,controlHeightLG:a,fontSizeLG:s,lineHeightLG:l,paddingSM:c,controlPaddingHorizontalSM:u,controlPaddingHorizontal:d,colorFillAlter:h,colorPrimaryHover:f,colorPrimary:p,controlOutlineWidth:m,controlOutline:g,colorErrorOutline:v,colorWarningOutline:b,colorBgContainer:y}=e;return{paddingBlock:Math.max(Math.round((t-n*r)/2*10)/10-i,0),paddingBlockSM:Math.max(Math.round((o-n*r)/2*10)/10-i,0),paddingBlockLG:Math.ceil((a-s*l)/2*10)/10-i,paddingInline:c-i,paddingInlineSM:u-i,paddingInlineLG:d-i,addonBg:h,activeBorderColor:p,hoverBorderColor:f,activeShadow:`0 0 0 ${m}px ${g}`,errorActiveShadow:`0 0 0 ${m}px ${v}`,warningActiveShadow:`0 0 0 ${m}px ${b}`,hoverBg:y,activeBg:y,inputFontSize:n,inputFontSizeLG:s,inputFontSizeSM:n}},ok=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),ak=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},ok(ol(e,{hoverBorderColor:e.colorBorder,hoverBg:e.colorBgContainerDisabled})))}),sk=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,"&:hover":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),lk=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},sk(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),ck=(e,t)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},sk(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},ak(e))}),lk(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),lk(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),uk=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),dk=e=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${It(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},uk(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText})),uk(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:Object.assign({},ak(e))}})}),hk=(e,t)=>{const{componentCls:n}=e;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${n}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${n}-status-error`]:{"&, & input, & textarea":{color:e.colorError}},[`&${n}-status-warning`]:{"&, & input, & textarea":{color:e.colorWarning}}},t)}},fk=(e,t)=>({background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:null===t||void 0===t?void 0:t.inputColor},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}),pk=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},fk(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}})}),mk=(e,t)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},fk(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},ak(e))}),pk(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError})),pk(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning})),t)}),gk=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),vk=e=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary},[`${e.componentCls}-filled:not(:focus):not(:focus-within)`]:{"&:not(:first-child)":{borderInlineStart:`${It(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},"&:not(:last-child)":{borderInlineEnd:`${It(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}}}},gk(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText})),gk(e,{status:"warning",addonBg:e.colorWarningBg,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${It(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${It(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${It(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${It(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${It(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${It(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}})}),bk=e=>{const{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:i}=e;return{padding:`${It(t)} ${It(i)}`,fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:r}},yk=e=>({padding:`${It(e.paddingBlockSM)} ${It(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),_k=e=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${It(e.paddingBlock)} ${It(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`},{"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e.colorTextPlaceholder,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),{"textarea&":{maxWidth:"100%",height:"auto",minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:"bottom",transition:`all ${e.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},bk(e)),"&-sm":Object.assign({},yk(e)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),Sk=e=>{const{componentCls:t,antCls:n}=e;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:Object.assign({},bk(e)),[`&-sm ${t}, &-sm > ${t}-group-addon`]:Object.assign({},yk(e)),[`&-lg ${n}-select-single ${n}-select-selector`]:{height:e.controlHeightLG},[`&-sm ${n}-select-single ${n}-select-selector`]:{height:e.controlHeightSM},[`> ${t}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${It(e.paddingInline)}`,color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${It(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${It(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{[`${n}-select-selector`]:{backgroundColor:"inherit",border:`${It(e.lineWidth)} ${e.lineType} transparent`,boxShadow:"none"}}},[`${n}-cascader-picker`]:{margin:`-9px ${It(e.calc(e.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${n}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[t]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${t}-search-with-button &`]:{zIndex:0}}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${t}-search &`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius}},[`&:not(:first-child), ${t}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:Object.assign(Object.assign({display:"block"},{"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),{[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`\n & > ${t}-affix-wrapper,\n & > ${t}-number-affix-wrapper,\n & > ${n}-picker-range\n `]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderInlineEndWidth:e.lineWidth},[t]:{float:"none"},[`& > ${n}-select > ${n}-select-selector,\n & > ${n}-select-auto-complete ${t},\n & > ${n}-cascader-picker ${t},\n & > ${t}-group-wrapper ${t}`]:{borderInlineEndWidth:e.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${n}-select-focused`]:{zIndex:1},[`& > ${n}-select > ${n}-select-arrow`]:{zIndex:1},[`& > *:first-child,\n & > ${n}-select:first-child > ${n}-select-selector,\n & > ${n}-select-auto-complete:first-child ${t},\n & > ${n}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child,\n & > ${n}-select:last-child > ${n}-select-selector,\n & > ${n}-cascader-picker:last-child ${t},\n & > ${n}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${n}-select-auto-complete ${t}`]:{verticalAlign:"top"},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{borderRadius:0}},[`${t}-group-wrapper:not(:last-child)`]:{[`&${t}-search > ${t}-group`]:{[`& > ${t}-group-addon > ${t}-search-button`]:{borderRadius:0},[`& > ${t}`]:{borderStartStartRadius:e.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:e.borderRadius}}}})}},wk=e=>{const{componentCls:t,controlHeightSM:n,lineWidth:r,calc:i}=e,o=i(n).sub(i(r).mul(2)).sub(16).div(2).equal();return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ma(e)),_k(e)),ck(e)),mk(e)),hk(e)),{'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:n,paddingTop:o,paddingBottom:o}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},Ck=e=>{const{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextTertiary},"&:active":{color:e.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${It(e.inputAffixPadding)}`}}}},xk=e=>{const{componentCls:t,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:i,colorIcon:o,colorIconHover:a,iconCls:s}=e,l=`${t}-affix-wrapper`,c=`${t}-affix-wrapper-disabled`;return{[l]:Object.assign(Object.assign(Object.assign(Object.assign({},_k(e)),{display:"inline-flex",[`&:not(${t}-disabled):hover`]:{zIndex:1,[`${t}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${t}`]:{padding:0},[`> input${t}, > textarea${t}`]:{fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[t]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:r},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n}}}),Ck(e)),{[`${s}${t}-password-icon`]:{color:o,cursor:"pointer",transition:`all ${i}`,"&:hover":{color:a}}}),[c]:{[`${s}${t}-password-icon`]:{color:o,cursor:"not-allowed","&:hover":{color:o}}}}},Ek=e=>{const{componentCls:t,borderRadiusLG:n,borderRadiusSM:r}=e;return{[`${t}-group`]:Object.assign(Object.assign(Object.assign({},Ma(e)),Sk(e)),{"&-rtl":{direction:"rtl"},"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${t}-group-addon`]:{borderRadius:n,fontSize:e.inputFontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:r}}},dk(e)),vk(e)),{[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}}})})}},kk=e=>{const{componentCls:t,antCls:n}=e,r=`${t}-search`;return{[r]:{[t]:{"&:hover, &:focus":{[`+ ${t}-group-addon ${r}-button:not(${n}-btn-primary)`]:{borderInlineStartColor:e.colorPrimaryHover}}},[`${t}-affix-wrapper`]:{height:e.controlHeight,borderRadius:0},[`${t}-lg`]:{lineHeight:e.calc(e.lineHeightLG).sub(2e-4).equal()},[`> ${t}-group`]:{[`> ${t}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${r}-button`]:{marginInlineEnd:-1,paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:"none"},[`${r}-button:not(${n}-btn-primary)`]:{color:e.colorTextDescription,"&:hover":{color:e.colorPrimaryHover},"&:active":{color:e.colorPrimaryActive},[`&${n}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${r}-button`]:{height:e.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${t}-affix-wrapper, ${r}-button`]:{height:e.controlHeightLG}},"&-small":{[`${t}-affix-wrapper, ${r}-button`]:{height:e.controlHeightSM}},"&-rtl":{direction:"rtl"},[`&${t}-compact-item`]:{[`&:not(${t}-compact-last-item)`]:{[`${t}-group-addon`]:{[`${t}-search-button`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderRadius:0}}},[`&:not(${t}-compact-first-item)`]:{[`${t},${t}-affix-wrapper`]:{borderRadius:0}},[`> ${t}-group-addon ${t}-search-button,\n > ${t},\n ${t}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${t}-affix-wrapper-focused`]:{zIndex:2}}}}},Ok=e=>{const{componentCls:t,paddingLG:n}=e,r=`${t}-textarea`;return{[r]:{position:"relative","&-show-count":{[`> ${t}`]:{height:"100%"},[`${t}-data-count`]:{position:"absolute",bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`\n &-allow-clear > ${t},\n &-affix-wrapper${r}-has-feedback ${t}\n `]:{paddingInlineEnd:n},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent","&:focus":{boxShadow:"none !important"}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:"absolute",insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${r}-suffix`]:{position:"absolute",top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},$k=e=>{const{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},Rk=ml("Input",(e=>{const t=ol(e,rk(e));return[wk(t),Ok(t),xk(t),Ek(t),kk(t),$k(t),Yp(t)]}),ik,{resetFont:!1}),Ik=e=>{const{componentCls:t}=e;return{[`${t}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}},[`&${t}-disabled`]:{cursor:"not-allowed",[`${t}-item`]:{cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},a:{color:e.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:e.colorBorder,backgroundColor:e.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:e.itemActiveBgDisabled},a:{color:e.itemActiveColorDisabled}}},[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${t}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${t}-simple-pager`]:{color:e.colorTextDisabled},[`${t}-jump-prev, ${t}-jump-next`]:{[`${t}-item-link-icon`]:{opacity:0},[`${t}-item-ellipsis`]:{opacity:1}}},[`&${t}-simple`]:{[`${t}-prev, ${t}-next`]:{[`&${t}-disabled ${t}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},Mk=e=>{const{componentCls:t}=e;return{[`&${t}-mini ${t}-total-text, &${t}-mini ${t}-simple-pager`]:{height:e.itemSizeSM,lineHeight:It(e.itemSizeSM)},[`&${t}-mini ${t}-item`]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:It(e.calc(e.itemSizeSM).sub(2).equal())},[`&${t}-mini:not(${t}-disabled) ${t}-item:not(${t}-item-active)`]:{backgroundColor:"transparent",borderColor:"transparent","&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}},[`&${t}-mini ${t}-prev, &${t}-mini ${t}-next`]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:It(e.itemSizeSM)},[`&${t}-mini:not(${t}-disabled)`]:{[`${t}-prev, ${t}-next`]:{[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover ${t}-item-link`]:{backgroundColor:"transparent"}}},[`\n &${t}-mini ${t}-prev ${t}-item-link,\n &${t}-mini ${t}-next ${t}-item-link\n `]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:e.itemSizeSM,lineHeight:It(e.itemSizeSM)}},[`&${t}-mini ${t}-jump-prev, &${t}-mini ${t}-jump-next`]:{height:e.itemSizeSM,marginInlineEnd:0,lineHeight:It(e.itemSizeSM)},[`&${t}-mini ${t}-options`]:{marginInlineStart:e.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:e.miniOptionsSizeChangerTop},"&-quick-jumper":{height:e.itemSizeSM,lineHeight:It(e.itemSizeSM),input:Object.assign(Object.assign({},yk(e)),{width:e.paginationMiniQuickJumperInputWidth,height:e.controlHeightSM})}}}},Pk=e=>{const{componentCls:t}=e;return{[`\n &${t}-simple ${t}-prev,\n &${t}-simple ${t}-next\n `]:{height:e.itemSizeSM,lineHeight:It(e.itemSizeSM),verticalAlign:"top",[`${t}-item-link`]:{height:e.itemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},"&::after":{height:e.itemSizeSM,lineHeight:It(e.itemSizeSM)}}},[`&${t}-simple ${t}-simple-pager`]:{display:"inline-block",height:e.itemSizeSM,marginInlineEnd:e.marginXS,input:{boxSizing:"border-box",height:"100%",padding:`0 ${It(e.paginationItemPaddingInline)}`,textAlign:"center",backgroundColor:e.itemInputBg,border:`${It(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadius,outline:"none",transition:`border-color ${e.motionDurationMid}`,color:"inherit","&:hover":{borderColor:e.colorPrimary},"&:focus":{borderColor:e.colorPrimaryHover,boxShadow:`${It(e.inputOutlineOffset)} 0 ${It(e.controlOutlineWidth)} ${e.controlOutline}`},"&[disabled]":{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,cursor:"not-allowed"}}}}},Nk=e=>{const{componentCls:t}=e;return{[`${t}-jump-prev, ${t}-jump-next`]:{outline:0,[`${t}-item-container`]:{position:"relative",[`${t}-item-link-icon`]:{color:e.colorPrimary,fontSize:e.fontSizeSM,opacity:0,transition:`all ${e.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${t}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:e.colorTextDisabled,letterSpacing:e.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:e.paginationEllipsisTextIndent,opacity:1,transition:`all ${e.motionDurationMid}`}},"&:hover":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}}},[`\n ${t}-prev,\n ${t}-jump-prev,\n ${t}-jump-next\n `]:{marginInlineEnd:e.marginXS},[`\n ${t}-prev,\n ${t}-next,\n ${t}-jump-prev,\n ${t}-jump-next\n `]:{display:"inline-block",minWidth:e.itemSize,height:e.itemSize,color:e.colorText,fontFamily:e.fontFamily,lineHeight:It(e.itemSize),textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:e.borderRadius,cursor:"pointer",transition:`all ${e.motionDurationMid}`},[`${t}-prev, ${t}-next`]:{outline:0,button:{color:e.colorText,cursor:"pointer",userSelect:"none"},[`${t}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:e.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${It(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:"none",transition:`all ${e.motionDurationMid}`},[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover`]:{[`${t}-item-link`]:{backgroundColor:"transparent"}}},[`${t}-slash`]:{marginInlineEnd:e.paginationSlashMarginInlineEnd,marginInlineStart:e.paginationSlashMarginInlineStart},[`${t}-options`]:{display:"inline-block",marginInlineStart:e.margin,verticalAlign:"middle","&-size-changer":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:e.controlHeight,marginInlineStart:e.marginXS,lineHeight:It(e.controlHeight),verticalAlign:"top",input:Object.assign(Object.assign(Object.assign({},_k(e)),sk(e,{borderColor:e.colorBorder,hoverBorderColor:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadow:e.activeShadow})),{"&[disabled]":Object.assign({},ak(e)),width:e.calc(e.controlHeightLG).mul(1.25).equal(),height:e.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:e.marginXS,marginInlineEnd:e.marginXS})}}}},Lk=e=>{const{componentCls:t}=e;return{[`${t}-item`]:{display:"inline-block",minWidth:e.itemSize,height:e.itemSize,marginInlineEnd:e.marginXS,fontFamily:e.fontFamily,lineHeight:It(e.calc(e.itemSize).sub(2).equal()),textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:e.itemBg,border:`${It(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${It(e.paginationItemPaddingInline)}`,color:e.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${t}-item-active)`]:{"&:hover":{transition:`all ${e.motionDurationMid}`,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}},"&-active":{fontWeight:e.fontWeightStrong,backgroundColor:e.itemActiveBg,borderColor:e.colorPrimary,a:{color:e.colorPrimary},"&:hover":{borderColor:e.colorPrimaryHover},"&:hover a":{color:e.colorPrimaryHover}}}}},Tk=e=>{const{componentCls:t}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ma(e)),{display:"flex","&-start":{justifyContent:"start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"end"},"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${t}-total-text`]:{display:"inline-block",height:e.itemSize,marginInlineEnd:e.marginXS,lineHeight:It(e.calc(e.itemSize).sub(2).equal()),verticalAlign:"middle"}}),Lk(e)),Nk(e)),Pk(e)),Mk(e)),Ik(e)),{[`@media only screen and (max-width: ${e.screenLG}px)`]:{[`${t}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${e.screenSM}px)`]:{[`${t}-options`]:{display:"none"}}}),[`&${e.componentCls}-rtl`]:{direction:"rtl"}}},Dk=e=>{const{componentCls:t}=e;return{[`${t}:not(${t}-disabled)`]:{[`${t}-item`]:Object.assign({},La(e)),[`${t}-jump-prev, ${t}-jump-next`]:{"&:focus-visible":Object.assign({[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}},Na(e))},[`${t}-prev, ${t}-next`]:{[`&:focus-visible ${t}-item-link`]:Object.assign({},Na(e))}}}},Ak=e=>Object.assign({itemBg:e.colorBgContainer,itemSize:e.controlHeight,itemSizeSM:e.controlHeightSM,itemActiveBg:e.colorBgContainer,itemLinkBg:e.colorBgContainer,itemActiveColorDisabled:e.colorTextDisabled,itemActiveBgDisabled:e.controlItemBgActiveDisabled,itemInputBg:e.colorBgContainer,miniOptionsSizeChangerTop:0},ik(e)),Bk=e=>ol(e,{inputOutlineOffset:0,paginationMiniOptionsMarginInlineStart:e.calc(e.marginXXS).div(2).equal(),paginationMiniQuickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.1).equal(),paginationItemPaddingInline:e.calc(e.marginXXS).mul(1.5).equal(),paginationEllipsisLetterSpacing:e.calc(e.marginXXS).div(2).equal(),paginationSlashMarginInlineStart:e.marginSM,paginationSlashMarginInlineEnd:e.marginSM,paginationEllipsisTextIndent:"0.13em"},rk(e)),jk=ml("Pagination",(e=>{const t=Bk(e);return[Tk(t),Dk(t)]}),Ak),zk=e=>{const{componentCls:t}=e;return{[`${t}${t}-bordered${t}-disabled:not(${t}-mini)`]:{"&, &:hover":{[`${t}-item-link`]:{borderColor:e.colorBorder}},"&:focus-visible":{[`${t}-item-link`]:{borderColor:e.colorBorder}},[`${t}-item, ${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,[`&:hover:not(${t}-item-active)`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,a:{color:e.colorTextDisabled}},[`&${t}-item-active`]:{backgroundColor:e.itemActiveBgDisabled}},[`${t}-prev, ${t}-next`]:{"&:hover button":{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,color:e.colorTextDisabled},[`${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder}}},[`${t}${t}-bordered:not(${t}-mini)`]:{[`${t}-prev, ${t}-next`]:{"&:hover button":{borderColor:e.colorPrimaryHover,backgroundColor:e.itemBg},[`${t}-item-link`]:{backgroundColor:e.itemLinkBg,borderColor:e.colorBorder},[`&:hover ${t}-item-link`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,color:e.colorPrimary},[`&${t}-disabled`]:{[`${t}-item-link`]:{borderColor:e.colorBorder,color:e.colorTextDisabled}}},[`${t}-item`]:{backgroundColor:e.itemBg,border:`${It(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,[`&:hover:not(${t}-item-active)`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,a:{color:e.colorPrimary}},"&-active":{borderColor:e.colorPrimary}}}}},Hk=vl(["Pagination","bordered"],(e=>{const t=Bk(e);return[zk(t)]}),Ak);var Fk=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const Wk=t=>{const{align:n,prefixCls:r,selectPrefixCls:i,className:o,rootClassName:a,style:s,size:l,locale:c,selectComponentClass:u,responsive:d,showSizeChanger:h}=t,f=Fk(t,["align","prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","selectComponentClass","responsive","showSizeChanger"]),{xs:p}=DE(d),[,m]=Oa(),{getPrefixCls:g,direction:v,pagination:b={}}=e.useContext(Le),y=g("pagination",r),[_,S,w]=jk(y),C=null!==h&&void 0!==h?h:b.showSizeChanger,x=e.useMemo((()=>{const t=e.createElement("span",{className:`${y}-item-ellipsis`},"\u2022\u2022\u2022");return{prevIcon:e.createElement("button",{className:`${y}-item-link`,type:"button",tabIndex:-1},"rtl"===v?e.createElement(ey,null):e.createElement(VE,null)),nextIcon:e.createElement("button",{className:`${y}-item-link`,type:"button",tabIndex:-1},"rtl"===v?e.createElement(VE,null):e.createElement(ey,null)),jumpPrevIcon:e.createElement("a",{className:`${y}-item-link`},e.createElement("div",{className:`${y}-item-container`},"rtl"===v?e.createElement(FE,{className:`${y}-item-link-icon`}):e.createElement(jE,{className:`${y}-item-link-icon`}),t)),jumpNextIcon:e.createElement("a",{className:`${y}-item-link`},e.createElement("div",{className:`${y}-item-container`},"rtl"===v?e.createElement(jE,{className:`${y}-item-link-icon`}):e.createElement(FE,{className:`${y}-item-link-icon`}),t))}}),[v,y]),[E]=Tp("Pagination",fr),k=Object.assign(Object.assign({},E),c),O=ac(l),$="small"===O||!(!p||O||!d),R=g("select",i),I=Ji()({[`${y}-${n}`]:!!n,[`${y}-mini`]:$,[`${y}-rtl`]:"rtl"===v,[`${y}-bordered`]:m.wireframe},null===b||void 0===b?void 0:b.className,o,a,S,w),M=Object.assign(Object.assign({},null===b||void 0===b?void 0:b.style),s);return _(e.createElement(e.Fragment,null,m.wireframe&&e.createElement(Hk,{prefixCls:y}),e.createElement(ek,Object.assign({},x,f,{style:M,prefixCls:y,selectPrefixCls:R,className:I,selectComponentClass:u||($?tk:nk),locale:k,showSizeChanger:C}))))};function Kk(e,t,n){var r=(n||{}).atBegin;return function(e,t,n){var r,i=n||{},o=i.noTrailing,a=void 0!==o&&o,s=i.noLeading,l=void 0!==s&&s,c=i.debounceMode,u=void 0===c?void 0:c,d=!1,h=0;function f(){r&&clearTimeout(r)}function p(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];var s=this,c=Date.now()-h;function p(){h=Date.now(),t.apply(s,i)}function m(){r=void 0}d||(l||!u||r||p(),f(),void 0===u&&c>e?l?(h=Date.now(),a||(r=setTimeout(u?m:p,e))):p():!0!==a&&(r=setTimeout(u?m:p,void 0===u?e-c:e)))}return p.cancel=function(e){var t=(e||{}).upcomingOnly,n=void 0!==t&&t;f(),d=!n},p}(e,t,{debounceMode:!1!==(void 0!==r&&r)})}const Vk=80*Math.PI,Uk=t=>{const{dotClassName:n,style:r,hasCircleCls:i}=t;return e.createElement("circle",{className:Ji()(`${n}-circle`,{[`${n}-circle-bg`]:i}),r:40,cx:50,cy:50,strokeWidth:20,style:r})},qk=t=>{let{percent:n,prefixCls:r}=t;const i=`${r}-dot`,o=`${i}-holder`,a=`${o}-hidden`,[s,l]=e.useState(!1);Bt((()=>{0!==n&&l(!0)}),[0!==n]);const c=Math.max(Math.min(n,100),0);if(!s)return null;const u={strokeDashoffset:""+Vk/4,strokeDasharray:`${Vk*c/100} ${Vk*(100-c)/100}`};return e.createElement("span",{className:Ji()(o,`${i}-progress`,c<=0&&a)},e.createElement("svg",{viewBox:"0 0 100 100",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":c},e.createElement(Uk,{dotClassName:i,hasCircleCls:!0}),e.createElement(Uk,{dotClassName:i,style:u})))};function Xk(t){const{prefixCls:n,percent:r=0}=t,i=`${n}-dot`,o=`${i}-holder`,a=`${o}-hidden`;return e.createElement(e.Fragment,null,e.createElement("span",{className:Ji()(o,r>0&&a)},e.createElement("span",{className:Ji()(i,`${n}-dot-spin`)},[1,2,3,4].map((t=>e.createElement("i",{className:`${n}-dot-item`,key:t}))))),e.createElement(qk,{prefixCls:n,percent:r}))}function Gk(t){const{prefixCls:n,indicator:r,percent:i}=t,o=`${n}-dot`;return r&&e.isValidElement(r)?Yl(r,{className:Ji()(r.props.className,o),percent:i}):e.createElement(Xk,{prefixCls:n,percent:i})}const Yk=new Zn("antSpinMove",{to:{opacity:1}}),Qk=new Zn("antRotate",{to:{transform:"rotate(405deg)"}}),Jk=e=>{const{componentCls:t,calc:n}=e;return{[t]:Object.assign(Object.assign({},Ma(e)),{position:"absolute",display:"none",color:e.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,"&-spinning":{position:"relative",display:"inline-block",opacity:1},[`${t}-text`]:{fontSize:e.fontSize,paddingTop:n(n(e.dotSize).sub(e.fontSize)).div(2).add(2).equal()},"&-fullscreen":{position:"fixed",width:"100vw",height:"100vh",backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,inset:0,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center",opacity:0,visibility:"hidden",transition:`all ${e.motionDurationMid}`,"&-show":{opacity:1,visibility:"visible"},[t]:{[`${t}-dot-holder`]:{color:e.colorWhite},[`${t}-text`]:{color:e.colorTextLightSolid}}},"&-nested-loading":{position:"relative",[`> div > ${t}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:e.contentHeight,[`${t}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:n(e.dotSize).mul(-1).div(2).equal()},[`${t}-text`]:{position:"absolute",top:"50%",width:"100%",textShadow:`0 1px 2px ${e.colorBgContainer}`},[`&${t}-show-text ${t}-dot`]:{marginTop:n(e.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${t}-dot`]:{margin:n(e.dotSizeSM).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:n(n(e.dotSizeSM).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:n(e.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${t}-dot`]:{margin:n(e.dotSizeLG).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:n(n(e.dotSizeLG).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:n(e.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},[`${t}-container`]:{position:"relative",transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${t}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:e.spinDotDefault},[`${t}-dot-holder`]:{width:"1em",height:"1em",fontSize:e.dotSize,display:"inline-block",transition:`transform ${e.motionDurationSlow} ease, opacity ${e.motionDurationSlow} ease`,transformOrigin:"50% 50%",lineHeight:1,color:e.colorPrimary,"&-hidden":{transform:"scale(0.3)",opacity:0}},[`${t}-dot-progress`]:{position:"absolute",top:"50%",transform:"translate(-50%, -50%)",insetInlineStart:"50%"},[`${t}-dot`]:{position:"relative",display:"inline-block",fontSize:e.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:n(e.dotSize).sub(n(e.marginXXS).div(2)).div(2).equal(),height:n(e.dotSize).sub(n(e.marginXXS).div(2)).div(2).equal(),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:Yk,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:"0s"},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:Qk,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map((t=>`${t} ${e.motionDurationSlow} ease`)).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:e.colorFillSecondary}},[`&-sm ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeSM}},[`&-sm ${t}-dot-holder`]:{i:{width:n(n(e.dotSizeSM).sub(n(e.marginXXS).div(2))).div(2).equal(),height:n(n(e.dotSizeSM).sub(n(e.marginXXS).div(2))).div(2).equal()}},[`&-lg ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeLG}},[`&-lg ${t}-dot-holder`]:{i:{width:n(n(e.dotSizeLG).sub(e.marginXXS)).div(2).equal(),height:n(n(e.dotSizeLG).sub(e.marginXXS)).div(2).equal()}},[`&${t}-show-text ${t}-text`]:{display:"block"}})}},Zk=ml("Spin",(e=>{const t=ol(e,{spinDotDefault:e.colorTextDescription});return[Jk(t)]}),(e=>{const{controlHeightLG:t,controlHeight:n}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:.35*t,dotSizeLG:n}})),eO=[[30,.05],[70,.03],[96,.01]];var tO=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};let nO;const rO=t=>{var n;const{prefixCls:r,spinning:i=!0,delay:o=0,className:a,rootClassName:s,size:l="default",tip:c,wrapperClassName:u,style:d,children:h,fullscreen:f=!1,indicator:p,percent:m}=t,g=tO(t,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:v,direction:b,spin:y}=e.useContext(Le),_=v("spin",r),[S,w,C]=Zk(_),[x,E]=e.useState((()=>i&&!function(e,t){return!!e&&!!t&&!isNaN(Number(t))}(i,o))),k=function(t,n){const[r,i]=e.useState(0),o=e.useRef(),a="auto"===n;return e.useEffect((()=>(a&&t&&(i(0),o.current=setInterval((()=>{i((e=>{const t=100-e;for(let n=0;n<eO.length;n+=1){const[r,i]=eO[n];if(e<=r)return e+t*i}return e}))}),200)),()=>{clearInterval(o.current)})),[a,t]),a?r:n}(x,m);e.useEffect((()=>{if(i){const e=Kk(o,(()=>{E(!0)}));return e(),()=>{var t;null===(t=null===e||void 0===e?void 0:e.cancel)||void 0===t||t.call(e)}}E(!1)}),[o,i]);const O=e.useMemo((()=>"undefined"!==typeof h&&!f),[h,f]);const $=Ji()(_,null===y||void 0===y?void 0:y.className,{[`${_}-sm`]:"small"===l,[`${_}-lg`]:"large"===l,[`${_}-spinning`]:x,[`${_}-show-text`]:!!c,[`${_}-rtl`]:"rtl"===b},a,!f&&s,w,C),R=Ji()(`${_}-container`,{[`${_}-blur`]:x}),I=null!==(n=null!==p&&void 0!==p?p:null===y||void 0===y?void 0:y.indicator)&&void 0!==n?n:nO,M=Object.assign(Object.assign({},null===y||void 0===y?void 0:y.style),d),P=e.createElement("div",Object.assign({},g,{style:M,className:$,"aria-live":"polite","aria-busy":x}),e.createElement(Gk,{prefixCls:_,indicator:I,percent:k}),c&&(O||f)?e.createElement("div",{className:`${_}-text`},c):null);return S(O?e.createElement("div",Object.assign({},g,{className:Ji()(`${_}-nested-loading`,u,w,C)}),x&&e.createElement("div",{key:"loading"},P),e.createElement("div",{className:R,key:"container"},h)):f?e.createElement("div",{className:Ji()(`${_}-fullscreen`,{[`${_}-fullscreen-show`]:x},s,w,C)},P):P)};rO.setDefaultIndicator=e=>{nO=e};const iO=rO;const oO=function(t){return n=>{const{prefixCls:r,onExpand:i,record:o,expanded:a,expandable:s}=n,l=`${r}-row-expand-icon`;return e.createElement("button",{type:"button",onClick:e=>{i(o,e),e.stopPropagation()},className:Ji()(l,{[`${l}-spaced`]:!s,[`${l}-expanded`]:s&&a,[`${l}-collapsed`]:s&&!a}),"aria-label":a?t.collapse:t.expand,"aria-expanded":a})}};const aO=(e,t)=>"key"in e&&void 0!==e.key&&null!==e.key?e.key:e.dataIndex?Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex:t;function sO(e,t){return t?`${t}-${e}`:`${e}`}const lO=(e,t)=>"function"===typeof e?e(t):e;const cO={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}}]},name:"filter",theme:"filled"};var uO=function(t,n){return e.createElement(us,Gt({},t,{ref:n,icon:cO}))};const dO=e.forwardRef(uO),hO=function(){const e=Object.assign({},arguments.length<=0?void 0:arguments[0]);for(let t=1;t<arguments.length;t++){const n=t<0||arguments.length<=t?void 0:arguments[t];n&&Object.keys(n).forEach((t=>{const r=n[t];void 0!==r&&(e[t]=r)}))}return e};const fO=t=>{const{getPrefixCls:n,direction:r}=(0,e.useContext)(Le),{prefixCls:i,className:o}=t,a=n("input-group",i),s=n("input"),[l,c]=Rk(s),u=Ji()(a,{[`${a}-lg`]:"large"===t.size,[`${a}-sm`]:"small"===t.size,[`${a}-compact`]:t.compact,[`${a}-rtl`]:"rtl"===r},c,o),d=(0,e.useContext)(Yd),h=(0,e.useMemo)((()=>Object.assign(Object.assign({},d),{isFormItemInput:!1})),[d]);return l(e.createElement("span",{className:u,style:t.style,onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,onFocus:t.onFocus,onBlur:t.onBlur},e.createElement(Yd.Provider,{value:h},t.children)))};function pO(e,t,n){var r=t.cloneNode(!0),i=Object.create(e,{target:{value:r},currentTarget:{value:r}});return r.value=n,"number"===typeof t.selectionStart&&"number"===typeof t.selectionEnd&&(r.selectionStart=t.selectionStart,r.selectionEnd=t.selectionEnd),r.setSelectionRange=function(){t.setSelectionRange.apply(t,arguments)},i}function mO(e,t,n,r){if(n){var i=t;"click"!==t.type?"file"===e.type||void 0===r?n(i):n(i=pO(t,e,r)):n(i=pO(t,e,""))}}function gO(e,t){if(e){e.focus(t);var n=(t||{}).cursor;if(n){var r=e.value.length;switch(n){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(r,r);break;default:e.setSelectionRange(0,r)}}}}const vO=e.forwardRef((function(t,n){var r,i,o=t.inputElement,a=t.children,s=t.prefixCls,l=t.prefix,c=t.suffix,u=t.addonBefore,d=t.addonAfter,h=t.className,f=t.style,p=t.disabled,m=t.readOnly,g=t.focused,v=t.triggerFocus,b=t.allowClear,y=t.value,_=t.handleReset,S=t.hidden,w=t.classes,C=t.classNames,x=t.dataAttrs,E=t.styles,k=t.components,O=t.onClear,$=null!==a&&void 0!==a?a:o,R=(null===k||void 0===k?void 0:k.affixWrapper)||"span",I=(null===k||void 0===k?void 0:k.groupWrapper)||"span",M=(null===k||void 0===k?void 0:k.wrapper)||"span",P=(null===k||void 0===k?void 0:k.groupAddon)||"span",N=(0,e.useRef)(null),L=function(e){return!!(e.prefix||e.suffix||e.allowClear)}(t),T=(0,e.cloneElement)($,{value:y,className:Ji()($.props.className,!L&&(null===C||void 0===C?void 0:C.variant))||null}),D=(0,e.useRef)(null);if(e.useImperativeHandle(n,(function(){return{nativeElement:D.current||N.current}})),L){var A=null;if(b){var B=!p&&!m&&y,j="".concat(s,"-clear-icon"),z="object"===le(b)&&null!==b&&void 0!==b&&b.clearIcon?b.clearIcon:"\u2716";A=e.createElement("span",{onClick:function(e){null===_||void 0===_||_(e),null===O||void 0===O||O()},onMouseDown:function(e){return e.preventDefault()},className:Ji()(j,fe(fe({},"".concat(j,"-hidden"),!B),"".concat(j,"-has-suffix"),!!c)),role:"button",tabIndex:-1},z)}var H="".concat(s,"-affix-wrapper"),F=Ji()(H,fe(fe(fe(fe(fe({},"".concat(s,"-disabled"),p),"".concat(H,"-disabled"),p),"".concat(H,"-focused"),g),"".concat(H,"-readonly"),m),"".concat(H,"-input-with-clear-btn"),c&&b&&y),null===w||void 0===w?void 0:w.affixWrapper,null===C||void 0===C?void 0:C.affixWrapper,null===C||void 0===C?void 0:C.variant),W=(c||b)&&e.createElement("span",{className:Ji()("".concat(s,"-suffix"),null===C||void 0===C?void 0:C.suffix),style:null===E||void 0===E?void 0:E.suffix},A,c);T=e.createElement(R,Gt({className:F,style:null===E||void 0===E?void 0:E.affixWrapper,onClick:function(e){var t;null!==(t=N.current)&&void 0!==t&&t.contains(e.target)&&(null===v||void 0===v||v())}},null===x||void 0===x?void 0:x.affixWrapper,{ref:N}),l&&e.createElement("span",{className:Ji()("".concat(s,"-prefix"),null===C||void 0===C?void 0:C.prefix),style:null===E||void 0===E?void 0:E.prefix},l),T,W)}if(function(e){return!(!e.addonBefore&&!e.addonAfter)}(t)){var K="".concat(s,"-group"),V="".concat(K,"-addon"),U="".concat(K,"-wrapper"),q=Ji()("".concat(s,"-wrapper"),K,null===w||void 0===w?void 0:w.wrapper,null===C||void 0===C?void 0:C.wrapper),X=Ji()(U,fe({},"".concat(U,"-disabled"),p),null===w||void 0===w?void 0:w.group,null===C||void 0===C?void 0:C.groupWrapper);T=e.createElement(I,{className:X,ref:D},e.createElement(M,{className:q},u&&e.createElement(P,{className:V},u),T,d&&e.createElement(P,{className:V},d)))}return e.cloneElement(T,{className:Ji()(null===(r=T.props)||void 0===r?void 0:r.className,h)||null,style:me(me({},null===(i=T.props)||void 0===i?void 0:i.style),f),hidden:S})}));var bO=["show"];function yO(t,n){return e.useMemo((function(){var e={};n&&(e.show="object"===le(n)&&n.formatter?n.formatter:!!n);var r=e=me(me({},e),t),i=r.show,o=lo(r,bO);return me(me({},o),{},{show:!!i,showFormatter:"function"===typeof i?i:void 0,strategy:o.strategy||function(e){return e.length}})}),[t,n])}var _O=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"];const SO=(0,e.forwardRef)((function(t,n){var r=t.autoComplete,i=t.onChange,o=t.onFocus,a=t.onBlur,s=t.onPressEnter,l=t.onKeyDown,c=t.onKeyUp,u=t.prefixCls,d=void 0===u?"rc-input":u,h=t.disabled,f=t.htmlSize,p=t.className,m=t.maxLength,g=t.suffix,v=t.showCount,b=t.count,y=t.type,_=void 0===y?"text":y,S=t.classes,w=t.classNames,C=t.styles,x=t.onCompositionStart,E=t.onCompositionEnd,k=lo(t,_O),O=Be((0,e.useState)(!1),2),$=O[0],R=O[1],I=(0,e.useRef)(!1),M=(0,e.useRef)(!1),P=(0,e.useRef)(null),N=(0,e.useRef)(null),L=function(e){P.current&&gO(P.current,e)},T=Be(Co(t.defaultValue,{value:t.value}),2),D=T[0],A=T[1],B=void 0===D||null===D?"":String(D),j=Be((0,e.useState)(null),2),z=j[0],H=j[1],F=yO(b,v),W=F.max||m,K=F.strategy(B),V=!!W&&K>W;(0,e.useImperativeHandle)(n,(function(){var e;return{focus:L,blur:function(){var e;null===(e=P.current)||void 0===e||e.blur()},setSelectionRange:function(e,t,n){var r;null===(r=P.current)||void 0===r||r.setSelectionRange(e,t,n)},select:function(){var e;null===(e=P.current)||void 0===e||e.select()},input:P.current,nativeElement:(null===(e=N.current)||void 0===e?void 0:e.nativeElement)||P.current}})),(0,e.useEffect)((function(){R((function(e){return(!e||!h)&&e}))}),[h]);var U=function(e,t,n){var r,o,a=t;if(!I.current&&F.exceedFormatter&&F.max&&F.strategy(t)>F.max)t!==(a=F.exceedFormatter(t,{max:F.max}))&&H([(null===(r=P.current)||void 0===r?void 0:r.selectionStart)||0,(null===(o=P.current)||void 0===o?void 0:o.selectionEnd)||0]);else if("compositionEnd"===n.source)return;A(a),P.current&&mO(P.current,e,i,a)};(0,e.useEffect)((function(){var e;z&&(null===(e=P.current)||void 0===e||e.setSelectionRange.apply(e,se(z)))}),[z]);var q=function(e){U(e,e.target.value,{source:"change"})},X=function(e){I.current=!1,U(e,e.currentTarget.value,{source:"compositionEnd"}),null===E||void 0===E||E(e)},G=function(e){s&&"Enter"===e.key&&!M.current&&(M.current=!0,s(e)),null===l||void 0===l||l(e)},Y=function(e){"Enter"===e.key&&(M.current=!1),null===c||void 0===c||c(e)},Q=function(e){R(!0),null===o||void 0===o||o(e)},J=function(e){R(!1),null===a||void 0===a||a(e)},Z=V&&"".concat(d,"-out-of-range");return e.createElement(vO,Gt({},k,{prefixCls:d,className:Ji()(p,Z),handleReset:function(e){A(""),L(),P.current&&mO(P.current,e,i)},value:B,focused:$,triggerFocus:L,suffix:function(){var t=Number(W)>0;if(g||F.show){var n=F.showFormatter?F.showFormatter({value:B,count:K,maxLength:W}):"".concat(K).concat(t?" / ".concat(W):"");return e.createElement(e.Fragment,null,F.show&&e.createElement("span",{className:Ji()("".concat(d,"-show-count-suffix"),fe({},"".concat(d,"-show-count-has-suffix"),!!g),null===w||void 0===w?void 0:w.count),style:me({},null===C||void 0===C?void 0:C.count)},n),g)}return null}(),disabled:h,classes:S,classNames:w,styles:C}),function(){var n=Xf(t,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return e.createElement("input",Gt({autoComplete:r},n,{onChange:q,onFocus:Q,onBlur:J,onKeyDown:G,onKeyUp:Y,className:Ji()(d,fe({},"".concat(d,"-disabled"),h),null===w||void 0===w?void 0:w.input),style:null===C||void 0===C?void 0:C.input,ref:P,size:f,type:_,onCompositionStart:function(e){I.current=!0,null===x||void 0===x||x(e)},onCompositionEnd:X}))}())})),wO=t=>{let n;return"object"===typeof t&&(null===t||void 0===t?void 0:t.clearIcon)?n=t:t&&(n={clearIcon:e.createElement(ms,null)}),n};function CO(t,n){const r=(0,e.useRef)([]),i=()=>{r.current.push(setTimeout((()=>{var e,n,r,i;(null===(e=t.current)||void 0===e?void 0:e.input)&&"password"===(null===(n=t.current)||void 0===n?void 0:n.input.getAttribute("type"))&&(null===(r=t.current)||void 0===r?void 0:r.input.hasAttribute("value"))&&(null===(i=t.current)||void 0===i||i.input.removeAttribute("value"))})))};return(0,e.useEffect)((()=>(n&&i(),()=>r.current.forEach((e=>{e&&clearTimeout(e)})))),[]),i}var xO=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const EO=(0,e.forwardRef)(((t,n)=>{var r;const{prefixCls:i,bordered:o=!0,status:a,size:s,disabled:l,onBlur:c,onFocus:u,suffix:d,allowClear:h,addonAfter:f,addonBefore:p,className:m,style:g,styles:v,rootClassName:b,onChange:y,classNames:_,variant:S}=t,w=xO(t,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]);const{getPrefixCls:C,direction:x,input:E}=e.useContext(Le),k=C("input",i),O=(0,e.useRef)(null),$=Hs(k),[R,I,M]=Rk(k,$),{compactSize:P,compactItemClassnames:N}=oh(k,x),L=ac((e=>{var t;return null!==(t=null!==s&&void 0!==s?s:P)&&void 0!==t?t:e})),T=e.useContext(Wi),D=null!==l&&void 0!==l?l:T,{status:A,hasFeedback:B,feedbackIcon:j}=(0,e.useContext)(Yd),z=Lp(A,a),H=function(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}(t)||!!B;(0,e.useRef)(H);const F=CO(O,!0),W=(B||d)&&e.createElement(e.Fragment,null,d,B&&j),K=wO(null!==h&&void 0!==h?h:null===E||void 0===E?void 0:E.allowClear),[V,U]=Up("input",S,o);return R(e.createElement(SO,Object.assign({ref:io(n,O),prefixCls:k,autoComplete:null===E||void 0===E?void 0:E.autoComplete},w,{disabled:D,onBlur:e=>{F(),null===c||void 0===c||c(e)},onFocus:e=>{F(),null===u||void 0===u||u(e)},style:Object.assign(Object.assign({},null===E||void 0===E?void 0:E.style),g),styles:Object.assign(Object.assign({},null===E||void 0===E?void 0:E.styles),v),suffix:W,allowClear:K,className:Ji()(m,b,M,$,N,null===E||void 0===E?void 0:E.className),onChange:e=>{F(),null===y||void 0===y||y(e)},addonBefore:p&&e.createElement(ch,{form:!0,space:!0},p),addonAfter:f&&e.createElement(ch,{form:!0,space:!0},f),classNames:Object.assign(Object.assign(Object.assign({},_),null===E||void 0===E?void 0:E.classNames),{input:Ji()({[`${k}-sm`]:"small"===L,[`${k}-lg`]:"large"===L,[`${k}-rtl`]:"rtl"===x},null===_||void 0===_?void 0:_.input,null===(r=null===E||void 0===E?void 0:E.classNames)||void 0===r?void 0:r.input,I),variant:Ji()({[`${k}-${V}`]:U},Np(k,z)),affixWrapper:Ji()({[`${k}-affix-wrapper-sm`]:"small"===L,[`${k}-affix-wrapper-lg`]:"large"===L,[`${k}-affix-wrapper-rtl`]:"rtl"===x},I),wrapper:Ji()({[`${k}-group-rtl`]:"rtl"===x},I),groupWrapper:Ji()({[`${k}-group-wrapper-sm`]:"small"===L,[`${k}-group-wrapper-lg`]:"large"===L,[`${k}-group-wrapper-rtl`]:"rtl"===x,[`${k}-group-wrapper-${V}`]:U},Np(`${k}-group-wrapper`,z,B),I)})})))})),kO=e=>{const{componentCls:t,paddingXS:n}=e;return{[t]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:n,"&-rtl":{direction:"rtl"},[`${t}-input`]:{textAlign:"center",paddingInline:e.paddingXXS},[`&${t}-sm ${t}-input`]:{paddingInline:e.calc(e.paddingXXS).div(2).equal()},[`&${t}-lg ${t}-input`]:{paddingInline:e.paddingXS}}}},OO=ml(["Input","OTP"],(e=>{const t=ol(e,rk(e));return[kO(t)]}),ik);var $O=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const RO=e.forwardRef(((t,n)=>{const{value:r,onChange:i,onActiveChange:o,index:a,mask:s}=t,l=$O(t,["value","onChange","onActiveChange","index","mask"]),c=r&&"string"===typeof s?s:r,u=e.useRef(null);e.useImperativeHandle(n,(()=>u.current));const d=()=>{Zo((()=>{var e;const t=null===(e=u.current)||void 0===e?void 0:e.input;document.activeElement===t&&t&&t.select()}))};return e.createElement(EO,Object.assign({type:!0===s?"password":"text"},l,{ref:u,value:c,onInput:e=>{i(a,e.target.value)},onFocus:d,onKeyDown:e=>{const{key:t,ctrlKey:n,metaKey:r}=e;"ArrowLeft"===t?o(a-1):"ArrowRight"===t?o(a+1):"z"===t&&(n||r)&&e.preventDefault(),d()},onKeyUp:e=>{"Backspace"!==e.key||r||o(a-1),d()},onMouseDown:d,onMouseUp:d}))}));var IO=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function MO(e){return(e||"").split("")}const PO=e.forwardRef(((t,n)=>{const{prefixCls:r,length:i=6,size:o,defaultValue:a,value:s,onChange:l,formatter:c,variant:u,disabled:d,status:h,autoFocus:f,mask:p,type:m,onInput:g,inputMode:v}=t,b=IO(t,["prefixCls","length","size","defaultValue","value","onChange","formatter","variant","disabled","status","autoFocus","mask","type","onInput","inputMode"]);const{getPrefixCls:y,direction:_}=e.useContext(Le),S=y("otp",r),w=Rs(b,{aria:!0,data:!0,attr:!0}),C=Hs(S),[x,E,k]=OO(S,C),O=ac((e=>null!==o&&void 0!==o?o:e)),$=e.useContext(Yd),R=Lp($.status,h),I=e.useMemo((()=>Object.assign(Object.assign({},$),{status:R,hasFeedback:!1,feedbackIcon:null})),[$,R]),M=e.useRef(null),P=e.useRef({});e.useImperativeHandle(n,(()=>({focus:()=>{var e;null===(e=P.current[0])||void 0===e||e.focus()},blur:()=>{var e;for(let t=0;t<i;t+=1)null===(e=P.current[t])||void 0===e||e.blur()},nativeElement:M.current})));const N=e=>c?c(e):e,[L,T]=e.useState(MO(N(a||"")));e.useEffect((()=>{void 0!==s&&T(MO(s))}),[s]);const D=_o((e=>{T(e),g&&g(e),l&&e.length===i&&e.every((e=>e))&&e.some(((e,t)=>L[t]!==e))&&l(e.join(""))})),A=_o(((e,t)=>{let n=se(L);for(let i=0;i<e;i+=1)n[i]||(n[i]="");t.length<=1?n[e]=t:n=n.slice(0,e).concat(MO(t)),n=n.slice(0,i);for(let i=n.length-1;i>=0&&!n[i];i-=1)n.pop();const r=N(n.map((e=>e||" ")).join(""));return n=MO(r).map(((e,t)=>" "!==e||n[t]?e:n[t])),n})),B=(e,t)=>{var n;const r=A(e,t),o=Math.min(e+t.length,i-1);o!==e&&(null===(n=P.current[o])||void 0===n||n.focus()),D(r)},j=e=>{var t;null===(t=P.current[e])||void 0===t||t.focus()},z={variant:u,disabled:d,status:R,mask:p,type:m,inputMode:v};return x(e.createElement("div",Object.assign({},w,{ref:M,className:Ji()(S,{[`${S}-sm`]:"small"===O,[`${S}-lg`]:"large"===O,[`${S}-rtl`]:"rtl"===_},k,E)}),e.createElement(Yd.Provider,{value:I},Array.from({length:i}).map(((t,n)=>{const r=`otp-${n}`,i=L[n]||"";return e.createElement(RO,Object.assign({ref:e=>{P.current[n]=e},key:r,index:n,size:O,htmlSize:1,className:`${S}-input`,onChange:B,value:i,onActiveChange:j,autoFocus:0===n&&f},z))})))))})),NO=PO;const LO={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"};var TO=function(t,n){return e.createElement(us,Gt({},t,{ref:n,icon:LO}))};const DO=e.forwardRef(TO);const AO={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"};var BO=function(t,n){return e.createElement(us,Gt({},t,{ref:n,icon:AO}))};const jO=e.forwardRef(BO);var zO=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const HO=t=>t?e.createElement(jO,null):e.createElement(DO,null),FO={click:"onClick",hover:"onMouseOver"};const WO=e.forwardRef(((t,n)=>{const{disabled:r,action:i="click",visibilityToggle:o=!0,iconRender:a=HO}=t,s=e.useContext(Wi),l=null!==r&&void 0!==r?r:s,c="object"===typeof o&&void 0!==o.visible,[u,d]=(0,e.useState)((()=>!!c&&o.visible)),h=(0,e.useRef)(null);e.useEffect((()=>{c&&d(o.visible)}),[c,o]);const f=CO(h),p=()=>{l||(u&&f(),d((e=>{var t;const n=!e;return"object"===typeof o&&(null===(t=o.onVisibleChange)||void 0===t||t.call(o,n)),n})))},{className:m,prefixCls:g,inputPrefixCls:v,size:b}=t,y=zO(t,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:_}=e.useContext(Le),S=_("input",v),w=_("input-password",g),C=o&&(t=>{const n=FO[i]||"",r=a(u),o={[n]:p,className:`${t}-icon`,key:"passwordIcon",onMouseDown:e=>{e.preventDefault()},onMouseUp:e=>{e.preventDefault()}};return e.cloneElement(e.isValidElement(r)?r:e.createElement("span",null,r),o)})(w),x=Ji()(w,m,{[`${w}-${b}`]:!!b}),E=Object.assign(Object.assign({},Xf(y,["suffix","iconRender","visibilityToggle"])),{type:u?"text":"password",className:x,prefixCls:S,suffix:C});return b&&(E.size=b),e.createElement(EO,Object.assign({ref:io(n,h)},E))}));var KO=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const VO=e.forwardRef(((t,n)=>{const{prefixCls:r,inputPrefixCls:i,className:o,size:a,suffix:s,enterButton:l=!1,addonAfter:c,loading:u,disabled:d,onSearch:h,onChange:f,onCompositionStart:p,onCompositionEnd:m}=t,g=KO(t,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:v,direction:b}=e.useContext(Le),y=e.useRef(!1),_=v("input-search",r),S=v("input",i),{compactSize:w}=oh(_,b),C=ac((e=>{var t;return null!==(t=null!==a&&void 0!==a?a:w)&&void 0!==t?t:e})),x=e.useRef(null),E=e=>{var t;document.activeElement===(null===(t=x.current)||void 0===t?void 0:t.input)&&e.preventDefault()},k=e=>{var t,n;h&&h(null===(n=null===(t=x.current)||void 0===t?void 0:t.input)||void 0===n?void 0:n.value,e,{source:"input"})},O="boolean"===typeof l?e.createElement(Km,null):null,$=`${_}-button`;let R;const I=l||{},M=I.type&&!0===I.type.__ANT_BUTTON;R=M||"button"===I.type?Yl(I,Object.assign({onMouseDown:E,onClick:e=>{var t,n;null===(n=null===(t=null===I||void 0===I?void 0:I.props)||void 0===t?void 0:t.onClick)||void 0===n||n.call(t,e),k(e)},key:"enterButton"},M?{className:$,size:C}:{})):e.createElement(uv,{className:$,type:l?"primary":void 0,size:C,disabled:d,key:"enterButton",onMouseDown:E,onClick:k,loading:u,icon:O},l),c&&(R=[R,Yl(c,{key:"addonAfter"})]);const P=Ji()(_,{[`${_}-rtl`]:"rtl"===b,[`${_}-${C}`]:!!C,[`${_}-with-button`]:!!l},o);return e.createElement(EO,Object.assign({ref:io(x,n),onPressEnter:e=>{y.current||u||k(e)}},g,{size:C,onCompositionStart:e=>{y.current=!0,null===p||void 0===p||p(e)},onCompositionEnd:e=>{y.current=!1,null===m||void 0===m||m(e)},prefixCls:S,addonAfter:R,suffix:s,onChange:e=>{(null===e||void 0===e?void 0:e.target)&&"click"===e.type&&h&&h(e.target.value,e,{source:"clear"}),null===f||void 0===f||f(e)},className:P,disabled:d}))}));var UO,qO=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],XO={};function GO(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;UO||((UO=document.createElement("textarea")).setAttribute("tab-index","-1"),UO.setAttribute("aria-hidden","true"),UO.setAttribute("name","hiddenTextarea"),document.body.appendChild(UO)),e.getAttribute("wrap")?UO.setAttribute("wrap",e.getAttribute("wrap")):UO.removeAttribute("wrap");var i=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&XO[n])return XO[n];var r=window.getComputedStyle(e),i=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),o=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),a=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),s={sizingStyle:qO.map((function(e){return"".concat(e,":").concat(r.getPropertyValue(e))})).join(";"),paddingSize:o,borderSize:a,boxSizing:i};return t&&n&&(XO[n]=s),s}(e,t),o=i.paddingSize,a=i.borderSize,s=i.boxSizing,l=i.sizingStyle;UO.setAttribute("style","".concat(l,";").concat("\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important;\n pointer-events: none !important;\n")),UO.value=e.value||e.placeholder||"";var c,u=void 0,d=void 0,h=UO.scrollHeight;if("border-box"===s?h+=a:"content-box"===s&&(h-=o),null!==n||null!==r){UO.value=" ";var f=UO.scrollHeight-o;null!==n&&(u=f*n,"border-box"===s&&(u=u+o+a),h=Math.max(u,h)),null!==r&&(d=f*r,"border-box"===s&&(d=d+o+a),c=h>d?"":"hidden",h=Math.min(d,h))}var p={height:h,overflowY:c,resize:"none"};return u&&(p.minHeight=u),d&&(p.maxHeight=d),p}var YO=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"];const QO=e.forwardRef((function(t,n){var r=t,i=r.prefixCls,o=r.defaultValue,a=r.value,s=r.autoSize,l=r.onResize,c=r.className,u=r.style,d=r.disabled,h=r.onChange,f=(r.onInternalAutoSize,lo(r,YO)),p=Be(Co(o,{value:a,postState:function(e){return null!==e&&void 0!==e?e:""}}),2),m=p[0],g=p[1],v=e.useRef();e.useImperativeHandle(n,(function(){return{textArea:v.current}}));var b=Be(e.useMemo((function(){return s&&"object"===le(s)?[s.minRows,s.maxRows]:[]}),[s]),2),y=b[0],_=b[1],S=!!s,w=Be(e.useState(2),2),C=w[0],x=w[1],E=Be(e.useState(),2),k=E[0],O=E[1],$=function(){x(0)};Bt((function(){S&&$()}),[a,y,_,S]),Bt((function(){if(0===C)x(1);else if(1===C){var e=GO(v.current,!1,y,_);x(2),O(e)}else!function(){try{if(document.activeElement===v.current){var e=v.current,t=e.selectionStart,n=e.selectionEnd,r=e.scrollTop;v.current.setSelectionRange(t,n),v.current.scrollTop=r}}catch(rI){}}()}),[C]);var R=e.useRef(),I=function(){Zo.cancel(R.current)};e.useEffect((function(){return I}),[]);var M=S?k:null,P=me(me({},u),M);return 0!==C&&1!==C||(P.overflowY="hidden",P.overflowX="hidden"),e.createElement(au,{onResize:function(e){2===C&&(null===l||void 0===l||l(e),s&&(I(),R.current=Zo((function(){$()}))))},disabled:!(s||l)},e.createElement("textarea",Gt({},f,{ref:v,style:P,className:Ji()(i,c,fe({},"".concat(i,"-disabled"),d)),disabled:d,value:m,onChange:function(e){g(e.target.value),null===h||void 0===h||h(e)}})))}));var JO=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"];const ZO=e.forwardRef((function(t,n){var r,i=t.defaultValue,o=t.value,a=t.onFocus,s=t.onBlur,l=t.onChange,c=t.allowClear,u=t.maxLength,d=t.onCompositionStart,h=t.onCompositionEnd,f=t.suffix,p=t.prefixCls,m=void 0===p?"rc-textarea":p,g=t.showCount,v=t.count,b=t.className,y=t.style,_=t.disabled,S=t.hidden,w=t.classNames,C=t.styles,x=t.onResize,E=t.onClear,k=t.onPressEnter,O=t.readOnly,$=t.autoSize,R=t.onKeyDown,I=lo(t,JO),M=Be(Co(i,{value:o,defaultValue:i}),2),P=M[0],N=M[1],L=void 0===P||null===P?"":String(P),T=Be(e.useState(!1),2),D=T[0],A=T[1],B=e.useRef(!1),j=Be(e.useState(null),2),z=j[0],H=j[1],F=(0,e.useRef)(null),W=(0,e.useRef)(null),K=function(){var e;return null===(e=W.current)||void 0===e?void 0:e.textArea},V=function(){K().focus()};(0,e.useImperativeHandle)(n,(function(){var e;return{resizableTextArea:W.current,focus:V,blur:function(){K().blur()},nativeElement:(null===(e=F.current)||void 0===e?void 0:e.nativeElement)||K()}})),(0,e.useEffect)((function(){A((function(e){return!_&&e}))}),[_]);var U=Be(e.useState(null),2),q=U[0],X=U[1];e.useEffect((function(){var e;q&&(e=K()).setSelectionRange.apply(e,se(q))}),[q]);var G,Y=yO(v,g),Q=null!==(r=Y.max)&&void 0!==r?r:u,J=Number(Q)>0,Z=Y.strategy(L),ee=!!Q&&Z>Q,te=function(e,t){var n=t;!B.current&&Y.exceedFormatter&&Y.max&&Y.strategy(t)>Y.max&&t!==(n=Y.exceedFormatter(t,{max:Y.max}))&&X([K().selectionStart||0,K().selectionEnd||0]),N(n),mO(e.currentTarget,e,l,n)},ne=f;Y.show&&(G=Y.showFormatter?Y.showFormatter({value:L,count:Z,maxLength:Q}):"".concat(Z).concat(J?" / ".concat(Q):""),ne=e.createElement(e.Fragment,null,ne,e.createElement("span",{className:Ji()("".concat(m,"-data-count"),null===w||void 0===w?void 0:w.count),style:null===C||void 0===C?void 0:C.count},G)));var re=!$&&!g&&!c;return e.createElement(vO,{ref:F,value:L,allowClear:c,handleReset:function(e){N(""),V(),mO(K(),e,l)},suffix:ne,prefixCls:m,classNames:me(me({},w),{},{affixWrapper:Ji()(null===w||void 0===w?void 0:w.affixWrapper,fe(fe({},"".concat(m,"-show-count"),g),"".concat(m,"-textarea-allow-clear"),c))}),disabled:_,focused:D,className:Ji()(b,ee&&"".concat(m,"-out-of-range")),style:me(me({},y),z&&!re?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":"string"===typeof G?G:void 0}},hidden:S,readOnly:O,onClear:E},e.createElement(QO,Gt({},I,{autoSize:$,maxLength:u,onKeyDown:function(e){"Enter"===e.key&&k&&k(e),null===R||void 0===R||R(e)},onChange:function(e){te(e,e.target.value)},onFocus:function(e){A(!0),null===a||void 0===a||a(e)},onBlur:function(e){A(!1),null===s||void 0===s||s(e)},onCompositionStart:function(e){B.current=!0,null===d||void 0===d||d(e)},onCompositionEnd:function(e){B.current=!1,te(e,e.currentTarget.value),null===h||void 0===h||h(e)},className:Ji()(null===w||void 0===w?void 0:w.textarea),style:me(me({},null===C||void 0===C?void 0:C.textarea),{},{resize:null===y||void 0===y?void 0:y.resize}),disabled:_,prefixCls:m,onResize:function(e){var t;null===x||void 0===x||x(e),null!==(t=K())&&void 0!==t&&t.style.height&&H(!0)},ref:W,readOnly:O})))}));var e$=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const t$=(0,e.forwardRef)(((t,n)=>{var r,i;const{prefixCls:o,bordered:a=!0,size:s,disabled:l,status:c,allowClear:u,classNames:d,rootClassName:h,className:f,style:p,styles:m,variant:g}=t,v=e$(t,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant"]);const{getPrefixCls:b,direction:y,textArea:_}=e.useContext(Le),S=ac(s),w=e.useContext(Wi),C=null!==l&&void 0!==l?l:w,{status:x,hasFeedback:E,feedbackIcon:k}=e.useContext(Yd),O=Lp(x,c),$=e.useRef(null);e.useImperativeHandle(n,(()=>{var e;return{resizableTextArea:null===(e=$.current)||void 0===e?void 0:e.resizableTextArea,focus:e=>{var t,n;gO(null===(n=null===(t=$.current)||void 0===t?void 0:t.resizableTextArea)||void 0===n?void 0:n.textArea,e)},blur:()=>{var e;return null===(e=$.current)||void 0===e?void 0:e.blur()}}}));const R=b("input",o),I=Hs(R),[M,P,N]=Rk(R,I),[L,T]=Up("textArea",g,a),D=wO(null!==u&&void 0!==u?u:null===_||void 0===_?void 0:_.allowClear);return M(e.createElement(ZO,Object.assign({autoComplete:null===_||void 0===_?void 0:_.autoComplete},v,{style:Object.assign(Object.assign({},null===_||void 0===_?void 0:_.style),p),styles:Object.assign(Object.assign({},null===_||void 0===_?void 0:_.styles),m),disabled:C,allowClear:D,className:Ji()(N,I,f,h,null===_||void 0===_?void 0:_.className),classNames:Object.assign(Object.assign(Object.assign({},d),null===_||void 0===_?void 0:_.classNames),{textarea:Ji()({[`${R}-sm`]:"small"===S,[`${R}-lg`]:"large"===S},P,null===d||void 0===d?void 0:d.textarea,null===(r=null===_||void 0===_?void 0:_.classNames)||void 0===r?void 0:r.textarea),variant:Ji()({[`${R}-${L}`]:T},Np(R,O)),affixWrapper:Ji()(`${R}-textarea-affix-wrapper`,{[`${R}-affix-wrapper-rtl`]:"rtl"===y,[`${R}-affix-wrapper-sm`]:"small"===S,[`${R}-affix-wrapper-lg`]:"large"===S,[`${R}-textarea-show-count`]:t.showCount||(null===(i=t.count)||void 0===i?void 0:i.show)},P)}),prefixCls:R,suffix:E&&e.createElement("span",{className:`${R}-textarea-suffix`},k),ref:$})))})),n$=EO;n$.Group=fO,n$.Search=VO,n$.TextArea=t$,n$.Password=WO,n$.OTP=NO;const r$=n$,i$=t=>{const{value:n,filterSearch:r,tablePrefixCls:i,locale:o,onChange:a}=t;return r?e.createElement("div",{className:`${i}-filter-dropdown-search`},e.createElement(r$,{prefix:e.createElement(Km,null),placeholder:o.filterSearchPlaceholder,onChange:a,value:n,htmlSize:1,className:`${i}-filter-dropdown-search-input`})):null},o$=e=>{const{keyCode:t}=e;t===ks.ENTER&&e.stopPropagation()};const a$=e.forwardRef(((t,n)=>e.createElement("div",{className:t.className,onClick:e=>e.stopPropagation(),onKeyDown:o$,ref:n},t.children)));function s$(e){let t=[];return(e||[]).forEach((e=>{let{value:n,children:r}=e;t.push(n),r&&(t=[].concat(se(t),se(s$(r))))})),t}function l$(e,t){return("string"===typeof t||"number"===typeof t)&&(null===t||void 0===t?void 0:t.toString().toLowerCase().includes(e.trim().toLowerCase()))}function c$(t){let{filters:n,prefixCls:r,filteredKeys:i,filterMultiple:o,searchValue:a,filterSearch:s}=t;return n.map(((t,n)=>{const l=String(t.value);if(t.children)return{key:l||n,label:t.text,popupClassName:`${r}-dropdown-submenu`,children:c$({filters:t.children,prefixCls:r,filteredKeys:i,filterMultiple:o,searchValue:a,filterSearch:s})};const c=o?rE:wE,u={key:void 0!==t.value?l:n,label:e.createElement(e.Fragment,null,e.createElement(c,{checked:i.includes(l)}),e.createElement("span",null,t.text))};return a.trim()?"function"===typeof s?s(a,t)?u:null:l$(a,t.text)?u:null:u}))}function u$(e){return e||[]}const d$=t=>{var n,r,i,o;const{tablePrefixCls:a,prefixCls:s,column:l,dropdownPrefixCls:c,columnKey:u,filterOnClose:d,filterMultiple:h,filterMode:f="menu",filterSearch:p=!1,filterState:m,triggerFilter:g,locale:v,children:b,getPopupContainer:y,rootClassName:_}=t,{filterResetToDefaultFilteredValue:S,defaultFilteredValue:w,filterDropdownProps:C={},filterDropdownOpen:x,filterDropdownVisible:E,onFilterDropdownVisibleChange:k,onFilterDropdownOpenChange:O}=l,[$,R]=e.useState(!1),I=!(!m||!(null===(n=m.filteredKeys)||void 0===n?void 0:n.length)&&!m.forceFiltered),M=e=>{var t;R(e),null===(t=C.onOpenChange)||void 0===t||t.call(C,e),null===O||void 0===O||O(e),null===k||void 0===k||k(e)};const P=null!==(o=null!==(i=null!==(r=C.open)&&void 0!==r?r:x)&&void 0!==i?i:E)&&void 0!==o?o:$,N=null===m||void 0===m?void 0:m.filteredKeys,[L,T]=function(t){const n=e.useRef(t),r=NE();return[()=>n.current,e=>{n.current=e,r()}]}(u$(N)),D=e=>{let{selectedKeys:t}=e;T(t)},A=(e,t)=>{let{node:n,checked:r}=t;D(h?{selectedKeys:e}:{selectedKeys:r&&n.key?[n.key]:[]})};e.useEffect((()=>{$&&D({selectedKeys:u$(N)})}),[N]);const[B,j]=e.useState([]),z=e=>{j(e)},[H,F]=e.useState(""),W=e=>{const{value:t}=e.target;F(t)};e.useEffect((()=>{$||F("")}),[$]);const K=e=>{const t=(null===e||void 0===e?void 0:e.length)?e:null;return null!==t||m&&m.filteredKeys?at(t,null===m||void 0===m?void 0:m.filteredKeys,!0)?null:void g({column:l,key:u,filteredKeys:t}):null},V=()=>{M(!1),K(L())},U=function(){let{confirm:e,closeDropdown:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{confirm:!1,closeDropdown:!1};e&&K([]),t&&M(!1),F(""),T(S?(w||[]).map((e=>String(e))):[])},q=function(){let{closeDropdown:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{closeDropdown:!0};e&&M(!1),K(L())},X=Ji()({[`${c}-menu-without-submenu`]:(G=l.filters||[],!G.some((e=>{let{children:t}=e;return t})))});var G;const Y=e=>{if(e.target.checked){const e=s$(null===l||void 0===l?void 0:l.filters).map((e=>String(e)));T(e)}else T([])},Q=e=>{let{filters:t}=e;return(t||[]).map(((e,t)=>{const n=String(e.value),r={title:e.text,key:void 0!==e.value?n:String(t)};return e.children&&(r.children=Q({filters:e.children})),r}))},J=e=>{var t;return Object.assign(Object.assign({},e),{text:e.title,value:e.key,children:(null===(t=e.children)||void 0===t?void 0:t.map((e=>J(e))))||[]})};let Z;const{direction:ee,renderEmpty:te}=e.useContext(Le);if("function"===typeof l.filterDropdown)Z=l.filterDropdown({prefixCls:`${c}-custom`,setSelectedKeys:e=>D({selectedKeys:e}),selectedKeys:L(),confirm:q,clearFilters:U,filters:l.filters,visible:P,close:()=>{M(!1)}});else if(l.filterDropdown)Z=l.filterDropdown;else{const t=L()||[],n=()=>{var n;const r=null!==(n=null===te||void 0===te?void 0:te("Table.filter"))&&void 0!==n?n:e.createElement(Kp,{image:Kp.PRESENTED_IMAGE_SIMPLE,description:v.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}});if(0===(l.filters||[]).length)return r;if("tree"===f)return e.createElement(e.Fragment,null,e.createElement(i$,{filterSearch:p,value:H,onChange:W,tablePrefixCls:a,locale:v}),e.createElement("div",{className:`${a}-filter-dropdown-tree`},h?e.createElement(rE,{checked:t.length===s$(l.filters).length,indeterminate:t.length>0&&t.length<s$(l.filters).length,className:`${a}-filter-dropdown-checkall`,onChange:Y},v.filterCheckall):null,e.createElement(uC,{checkable:!0,selectable:!1,blockNode:!0,multiple:h,checkStrictly:!h,className:`${c}-menu`,onCheck:A,checkedKeys:t,selectedKeys:t,showIcon:!1,treeData:Q({filters:l.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:H.trim()?e=>"function"===typeof p?p(H,J(e)):l$(H,e.title):void 0})));const i=c$({filters:l.filters||[],filterSearch:p,prefixCls:s,filteredKeys:L(),filterMultiple:h,searchValue:H}),o=i.every((e=>null===e));return e.createElement(e.Fragment,null,e.createElement(i$,{filterSearch:p,value:H,onChange:W,tablePrefixCls:a,locale:v}),o?r:e.createElement(oS,{selectable:!0,multiple:h,prefixCls:`${c}-menu`,className:X,onSelect:D,onDeselect:D,selectedKeys:t,getPopupContainer:y,openKeys:B,onOpenChange:z,items:i}))},r=()=>S?at((w||[]).map((e=>String(e))),t,!0):0===t.length;Z=e.createElement(e.Fragment,null,n(),e.createElement("div",{className:`${s}-dropdown-btns`},e.createElement(uv,{type:"link",size:"small",disabled:r(),onClick:()=>U()},v.filterReset),e.createElement(uv,{type:"primary",size:"small",onClick:V},v.filterConfirm)))}l.filterDropdown&&(Z=e.createElement(z_,{selectable:void 0},Z)),Z=e.createElement(a$,{className:`${s}-dropdown`},Z);const ne=hO({trigger:["click"],placement:"rtl"===ee?"bottomLeft":"bottomRight",children:(()=>{let t;return t="function"===typeof l.filterIcon?l.filterIcon(I):l.filterIcon?l.filterIcon:e.createElement(dO,null),e.createElement("span",{role:"button",tabIndex:-1,className:Ji()(`${s}-trigger`,{active:I}),onClick:e=>{e.stopPropagation()}},t)})(),getPopupContainer:y},Object.assign(Object.assign({},C),{rootClassName:Ji()(_,C.rootClassName),open:P,onOpenChange:(e,t)=>{"trigger"===t.source&&(e&&void 0!==N&&T(u$(N)),M(e),e||l.filterDropdown||!d||V())},dropdownRender:()=>"function"===typeof(null===C||void 0===C?void 0:C.dropdownRender)?C.dropdownRender(Z):Z}));return e.createElement("div",{className:`${s}-column`},e.createElement("span",{className:`${a}-column-title`},b),e.createElement(ES,Object.assign({},ne)))},h$=(e,t,n)=>{let r=[];return(e||[]).forEach(((e,i)=>{var o;const a=sO(i,n);if(e.filters||"filterDropdown"in e||"onFilter"in e)if("filteredValue"in e){let t=e.filteredValue;"filterDropdown"in e||(t=null!==(o=null===t||void 0===t?void 0:t.map(String))&&void 0!==o?o:t),r.push({column:e,key:aO(e,a),filteredKeys:t,forceFiltered:e.filtered})}else r.push({column:e,key:aO(e,a),filteredKeys:t&&e.defaultFilteredValue?e.defaultFilteredValue:void 0,forceFiltered:e.filtered});"children"in e&&(r=[].concat(se(r),se(h$(e.children,t,a))))})),r};function f$(t,n,r,i,o,a,s,l,c){return r.map(((r,u)=>{const d=sO(u,l),{filterOnClose:h=!0,filterMultiple:f=!0,filterMode:p,filterSearch:m}=r;let g=r;if(g.filters||g.filterDropdown){const l=aO(g,d),u=i.find((e=>{let{key:t}=e;return l===t}));g=Object.assign(Object.assign({},g),{title:i=>e.createElement(d$,{tablePrefixCls:t,prefixCls:`${t}-filter`,dropdownPrefixCls:n,column:g,columnKey:l,filterState:u,filterOnClose:h,filterMultiple:f,filterMode:p,filterSearch:m,triggerFilter:a,locale:o,getPopupContainer:s,rootClassName:c},lO(r.title,i))})}return"children"in g&&(g=Object.assign(Object.assign({},g),{children:f$(t,n,g.children,i,o,a,s,d,c)})),g}))}const p$=e=>{const t={};return e.forEach((e=>{let{key:n,filteredKeys:r,column:i}=e;const o=n,{filters:a,filterDropdown:s}=i;if(s)t[o]=r||null;else if(Array.isArray(r)){const e=s$(a);t[o]=e.filter((e=>r.includes(String(e))))}else t[o]=null})),t},m$=(e,t,n)=>t.reduce(((e,r)=>{const{column:{onFilter:i,filters:o},filteredKeys:a}=r;return i&&a&&a.length?e.map((e=>Object.assign({},e))).filter((e=>a.some((r=>{const a=s$(o),s=a.findIndex((e=>String(e)===String(r))),l=-1!==s?a[s]:r;return e[n]&&(e[n]=m$(e[n],t,n)),i(l,e)})))):e}),e),g$=e=>e.flatMap((e=>"children"in e?[e].concat(se(g$(e.children||[]))):[e])),v$=t=>{const{prefixCls:n,dropdownPrefixCls:r,mergedColumns:i,onFilterChange:o,getPopupContainer:a,locale:s,rootClassName:l}=t,c=(dr("Table"),e.useMemo((()=>g$(i||[])),[i])),[u,d]=e.useState((()=>h$(c,!0))),h=e.useMemo((()=>{const e=h$(c,!1);if(0===e.length)return e;let t=!0,n=!0;if(e.forEach((e=>{let{filteredKeys:r}=e;void 0!==r?t=!1:n=!1})),t){const e=(c||[]).map(((e,t)=>aO(e,sO(t))));return u.filter((t=>{let{key:n}=t;return e.includes(n)})).map((t=>{const n=c[e.findIndex((e=>e===t.key))];return Object.assign(Object.assign({},t),{column:Object.assign(Object.assign({},t.column),n),forceFiltered:n.filtered})}))}return e}),[c,u]),f=e.useMemo((()=>p$(h)),[h]),p=e=>{const t=h.filter((t=>{let{key:n}=t;return n!==e.key}));t.push(e),d(t),o(p$(t),t)};return[e=>f$(n,r,e,h,s,p,a,void 0,l),h,f]},b$=(t,n,r)=>{const i=e.useRef({});return[function(e){var o;if(!i.current||i.current.data!==t||i.current.childrenColumnName!==n||i.current.getRowKey!==r){const a=new Map;function s(e){e.forEach(((e,t)=>{const i=r(e,t);a.set(i,e),e&&"object"===typeof e&&n in e&&s(e[n]||[])}))}s(t),i.current={data:t,childrenColumnName:n,kvMap:a,getRowKey:r}}return null===(o=i.current.kvMap)||void 0===o?void 0:o.get(e)}]};var y$=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const _$=10;const S$=function(t,n,r){const i=r&&"object"===typeof r?r:{},{total:o=0}=i,a=y$(i,["total"]),[s,l]=(0,e.useState)((()=>({current:"defaultCurrent"in a?a.defaultCurrent:1,pageSize:"defaultPageSize"in a?a.defaultPageSize:_$}))),c=hO(s,a,{total:o>0?o:t}),u=Math.ceil((o||t)/c.pageSize);c.current>u&&(c.current=u||1);const d=(e,t)=>{l({current:null!==e&&void 0!==e?e:1,pageSize:t||c.pageSize})};return!1===r?[{},()=>{}]:[Object.assign(Object.assign({},c),{onChange:(e,t)=>{var i;r&&(null===(i=r.onChange)||void 0===i||i.call(r,e,t)),d(e,t),n(e,t||(null===c||void 0===c?void 0:c.pageSize))}}),d]};const w$={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"};var C$=function(t,n){return e.createElement(us,Gt({},t,{ref:n,icon:w$}))};const x$=e.forwardRef(C$);const E$={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}}]},name:"caret-up",theme:"outlined"};var k$=function(t,n){return e.createElement(us,Gt({},t,{ref:n,icon:E$}))};const O$=e.forwardRef(k$),$$="ascend",R$="descend",I$=e=>"object"===typeof e.sorter&&"number"===typeof e.sorter.multiple&&e.sorter.multiple,M$=e=>"function"===typeof e?e:!(!e||"object"!==typeof e||!e.compare)&&e.compare,P$=(e,t,n)=>{let r=[];const i=(e,t)=>{r.push({column:e,key:aO(e,t),multiplePriority:I$(e),sortOrder:e.sortOrder})};return(e||[]).forEach(((e,o)=>{const a=sO(o,n);e.children?("sortOrder"in e&&i(e,a),r=[].concat(se(r),se(P$(e.children,t,a)))):e.sorter&&("sortOrder"in e?i(e,a):t&&e.defaultSortOrder&&r.push({column:e,key:aO(e,a),multiplePriority:I$(e),sortOrder:e.defaultSortOrder}))})),r},N$=(t,n,r,i,o,a,s,l)=>(n||[]).map(((n,c)=>{const u=sO(c,l);let d=n;if(d.sorter){const l=d.sortDirections||o,c=void 0===d.showSorterTooltip?s:d.showSorterTooltip,h=aO(d,u),f=r.find((e=>{let{key:t}=e;return t===h})),p=f?f.sortOrder:null,m=((e,t)=>t?e[e.indexOf(t)+1]:e[0])(l,p);let g;if(n.sortIcon)g=n.sortIcon({sortOrder:p});else{const n=l.includes($$)&&e.createElement(O$,{className:Ji()(`${t}-column-sorter-up`,{active:p===$$})}),r=l.includes(R$)&&e.createElement(x$,{className:Ji()(`${t}-column-sorter-down`,{active:p===R$})});g=e.createElement("span",{className:Ji()(`${t}-column-sorter`,{[`${t}-column-sorter-full`]:!(!n||!r)})},e.createElement("span",{className:`${t}-column-sorter-inner`,"aria-hidden":"true"},n,r))}const{cancelSort:v,triggerAsc:b,triggerDesc:y}=a||{};let _=v;m===R$?_=y:m===$$&&(_=b);const S="object"===typeof c?Object.assign({title:_},c):{title:_};d=Object.assign(Object.assign({},d),{className:Ji()(d.className,{[`${t}-column-sort`]:p}),title:r=>{const i=`${t}-column-sorters`,o=e.createElement("span",{className:`${t}-column-title`},lO(n.title,r)),a=e.createElement("div",{className:i},o,g);return c?"boolean"!==typeof c&&"sorter-icon"===(null===c||void 0===c?void 0:c.target)?e.createElement("div",{className:`${i} ${t}-column-sorters-tooltip-target-sorter`},o,e.createElement(Uh,Object.assign({},S),g)):e.createElement(Uh,Object.assign({},S),a):a},onHeaderCell:e=>{var r;const o=(null===(r=n.onHeaderCell)||void 0===r?void 0:r.call(n,e))||{},a=o.onClick,s=o.onKeyDown;o.onClick=e=>{i({column:n,key:h,sortOrder:m,multiplePriority:I$(n)}),null===a||void 0===a||a(e)},o.onKeyDown=e=>{e.keyCode===ks.ENTER&&(i({column:n,key:h,sortOrder:m,multiplePriority:I$(n)}),null===s||void 0===s||s(e))};const l=((e,t)=>{const n=lO(e,t);return"[object Object]"===Object.prototype.toString.call(n)?"":n})(n.title,{}),c=null===l||void 0===l?void 0:l.toString();return p?o["aria-sort"]="ascend"===p?"ascending":"descending":o["aria-label"]=c||"",o.className=Ji()(o.className,`${t}-column-has-sorters`),o.tabIndex=0,n.ellipsis&&(o.title=(null!==l&&void 0!==l?l:"").toString()),o}})}return"children"in d&&(d=Object.assign(Object.assign({},d),{children:N$(t,d.children,r,i,o,a,s,u)})),d})),L$=e=>{const{column:t,sortOrder:n}=e;return{column:t,order:n,field:t.dataIndex,columnKey:t.key}},T$=e=>{const t=e.filter((e=>{let{sortOrder:t}=e;return t})).map(L$);if(0===t.length&&e.length){const t=e.length-1;return Object.assign(Object.assign({},L$(e[t])),{column:void 0,order:void 0,field:void 0,columnKey:void 0})}return t.length<=1?t[0]||{}:t},D$=(e,t,n)=>{const r=t.slice().sort(((e,t)=>t.multiplePriority-e.multiplePriority)),i=e.slice(),o=r.filter((e=>{let{column:{sorter:t},sortOrder:n}=e;return M$(t)&&n}));return o.length?i.sort(((e,t)=>{for(let n=0;n<o.length;n+=1){const r=o[n],{column:{sorter:i},sortOrder:a}=r,s=M$(i);if(s&&a){const n=s(e,t,a);if(0!==n)return a===$$?n:-n}}return 0})).map((e=>{const r=e[n];return r?Object.assign(Object.assign({},e),{[n]:D$(r,t,n)}):e})):i},A$=t=>{const{prefixCls:n,mergedColumns:r,sortDirections:i,tableLocale:o,showSorterTooltip:a,onSorterChange:s}=t,[l,c]=e.useState(P$(r,!0)),u=(e,t)=>{const n=[];return e.forEach(((e,r)=>{const i=sO(r,t);if(n.push(aO(e,i)),Array.isArray(e.children)){const t=u(e.children,i);n.push.apply(n,se(t))}})),n},d=e.useMemo((()=>{let e=!0;const t=P$(r,!1);if(!t.length){const e=u(r);return l.filter((t=>{let{key:n}=t;return e.includes(n)}))}const n=[];function i(t){e?n.push(t):n.push(Object.assign(Object.assign({},t),{sortOrder:null}))}let o=null;return t.forEach((t=>{null===o?(i(t),t.sortOrder&&(!1===t.multiplePriority?e=!1:o=!0)):(o&&!1!==t.multiplePriority||(e=!1),i(t))})),n}),[r,l]),h=e.useMemo((()=>{var e,t;const n=d.map((e=>{let{column:t,sortOrder:n}=e;return{column:t,order:n}}));return{sortColumns:n,sortColumn:null===(e=n[0])||void 0===e?void 0:e.column,sortOrder:null===(t=n[0])||void 0===t?void 0:t.order}}),[d]),f=e=>{let t;t=!1!==e.multiplePriority&&d.length&&!1!==d[0].multiplePriority?[].concat(se(d.filter((t=>{let{key:n}=t;return n!==e.key}))),[e]):[e],c(t),s(T$(t),t)};return[e=>N$(n,e,d,f,i,o,a),d,h,()=>T$(d)]},B$=(e,t)=>e.map((e=>{const n=Object.assign({},e);return n.title=lO(e.title,t),"children"in n&&(n.children=B$(n.children,t)),n})),j$=t=>[e.useCallback((e=>B$(e,t)),[t])],z$=Px(((e,t)=>{const{_renderTimes:n}=e,{_renderTimes:r}=t;return n!==r})),H$=Vx(((e,t)=>{const{_renderTimes:n}=e,{_renderTimes:r}=t;return n!==r})),F$=e=>{const{componentCls:t,lineWidth:n,lineType:r,tableBorderColor:i,tableHeaderBg:o,tablePaddingVertical:a,tablePaddingHorizontal:s,calc:l}=e,c=`${It(n)} ${r} ${i}`,u=(e,r,i)=>({[`&${t}-${e}`]:{[`> ${t}-container`]:{[`> ${t}-content, > ${t}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${t}-expanded-row-fixed`]:{margin:`${It(l(r).mul(-1).equal())}\n ${It(l(l(i).add(n)).mul(-1).equal())}`}}}}}});return{[`${t}-wrapper`]:{[`${t}${t}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${t}-title`]:{border:c,borderBottom:0},[`> ${t}-container`]:{borderInlineStart:c,borderTop:c,[`\n > ${t}-content,\n > ${t}-header,\n > ${t}-body,\n > ${t}-summary\n `]:{"> table":{"\n > thead > tr > th,\n > thead > tr > td,\n > tbody > tr > th,\n > tbody > tr > td,\n > tfoot > tr > th,\n > tfoot > tr > td\n ":{borderInlineEnd:c},"> thead":{"> tr:not(:last-child) > th":{borderBottom:c},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${t}-cell-fix-right-first::after`]:{borderInlineEnd:c}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${t}-expanded-row-fixed`]:{margin:`${It(l(a).mul(-1).equal())} ${It(l(l(s).add(n)).mul(-1).equal())}`,"&::after":{position:"absolute",top:0,insetInlineEnd:n,bottom:0,borderInlineEnd:c,content:'""'}}}}}},[`&${t}-scroll-horizontal`]:{[`> ${t}-container > ${t}-body`]:{"> table > tbody":{[`\n > tr${t}-expanded-row,\n > tr${t}-placeholder\n `]:{"> th, > td":{borderInlineEnd:0}}}}}},u("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle)),u("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall)),{[`> ${t}-footer`]:{border:c,borderTop:0}}),[`${t}-cell`]:{[`${t}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${It(n)} 0 ${It(n)} ${o}`}},[`${t}-bordered ${t}-cell-scrollbar`]:{borderInlineEnd:c}}}},W$=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-cell-ellipsis`]:Object.assign(Object.assign({},Ia),{wordBreak:"keep-all",[`\n &${t}-cell-fix-left-last,\n &${t}-cell-fix-right-first\n `]:{overflow:"visible",[`${t}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${t}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},K$=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-tbody > tr${t}-placeholder`]:{textAlign:"center",color:e.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:e.colorBgContainer}}}}},V$=e=>{const{componentCls:t,antCls:n,motionDurationSlow:r,lineWidth:i,paddingXS:o,lineType:a,tableBorderColor:s,tableExpandIconBg:l,tableExpandColumnWidth:c,borderRadius:u,tablePaddingVertical:d,tablePaddingHorizontal:h,tableExpandedRowBg:f,paddingXXS:p,expandIconMarginTop:m,expandIconSize:g,expandIconHalfInner:v,expandIconScale:b,calc:y}=e,_=`${It(i)} ${a} ${s}`,S=y(p).sub(i).equal();return{[`${t}-wrapper`]:{[`${t}-expand-icon-col`]:{width:c},[`${t}-row-expand-icon-cell`]:{textAlign:"center",[`${t}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${t}-row-indent`]:{height:1,float:"left"},[`${t}-row-expand-icon`]:Object.assign(Object.assign({},Ta(e)),{position:"relative",float:"left",width:g,height:g,color:"inherit",lineHeight:It(g),background:l,border:_,borderRadius:u,transform:`scale(${b})`,"&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${r} ease-out`,content:'""'},"&::before":{top:v,insetInlineEnd:S,insetInlineStart:S,height:i},"&::after":{top:S,bottom:S,insetInlineStart:v,width:i,transform:"rotate(90deg)"},"&-collapsed::before":{transform:"rotate(-180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"},"&-spaced":{"&::before, &::after":{display:"none",content:"none"},background:"transparent",border:0,visibility:"hidden"}}),[`${t}-row-indent + ${t}-row-expand-icon`]:{marginTop:m,marginInlineEnd:o},[`tr${t}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:f}},[`${n}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"100%"}}},[`${t}-expanded-row-fixed`]:{position:"relative",margin:`${It(y(d).mul(-1).equal())} ${It(y(h).mul(-1).equal())}`,padding:`${It(d)} ${It(h)}`}}}},U$=e=>{const{componentCls:t,antCls:n,iconCls:r,tableFilterDropdownWidth:i,tableFilterDropdownSearchWidth:o,paddingXXS:a,paddingXS:s,colorText:l,lineWidth:c,lineType:u,tableBorderColor:d,headerIconColor:h,fontSizeSM:f,tablePaddingHorizontal:p,borderRadius:m,motionDurationSlow:g,colorTextDescription:v,colorPrimary:b,tableHeaderFilterActiveBg:y,colorTextDisabled:_,tableFilterDropdownBg:S,tableFilterDropdownHeight:w,controlItemBgHover:C,controlItemBgActive:x,boxShadowSecondary:E,filterDropdownMenuBg:k,calc:O}=e,$=`${n}-dropdown`,R=`${t}-filter-dropdown`,I=`${n}-tree`,M=`${It(c)} ${u} ${d}`;return[{[`${t}-wrapper`]:{[`${t}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${t}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:O(a).mul(-1).equal(),marginInline:`${It(a)} ${It(O(p).div(2).mul(-1).equal())}`,padding:`0 ${It(a)}`,color:h,fontSize:f,borderRadius:m,cursor:"pointer",transition:`all ${g}`,"&:hover":{color:v,background:y},"&.active":{color:b}}}},{[`${n}-dropdown`]:{[R]:Object.assign(Object.assign({},Ma(e)),{minWidth:i,backgroundColor:S,borderRadius:m,boxShadow:E,overflow:"hidden",[`${$}-menu`]:{maxHeight:w,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:k,"&:empty::after":{display:"block",padding:`${It(s)} 0`,color:_,fontSize:f,textAlign:"center",content:'"Not Found"'}},[`${R}-tree`]:{paddingBlock:`${It(s)} 0`,paddingInline:s,[I]:{padding:0},[`${I}-treenode ${I}-node-content-wrapper:hover`]:{backgroundColor:C},[`${I}-treenode-checkbox-checked ${I}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:x}}},[`${R}-search`]:{padding:s,borderBottom:M,"&-input":{input:{minWidth:o},[r]:{color:_}}},[`${R}-checkall`]:{width:"100%",marginBottom:a,marginInlineStart:a},[`${R}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${It(O(s).sub(c).equal())} ${It(s)}`,overflow:"hidden",borderTop:M}})}},{[`${n}-dropdown ${R}, ${R}-submenu`]:{[`${n}-checkbox-wrapper + span`]:{paddingInlineStart:s,color:l},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},q$=e=>{const{componentCls:t,lineWidth:n,colorSplit:r,motionDurationSlow:i,zIndexTableFixed:o,tableBg:a,zIndexTableSticky:s,calc:l}=e,c=r;return{[`${t}-wrapper`]:{[`\n ${t}-cell-fix-left,\n ${t}-cell-fix-right\n `]:{position:"sticky !important",zIndex:o,background:a},[`\n ${t}-cell-fix-left-first::after,\n ${t}-cell-fix-left-last::after\n `]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:l(n).mul(-1).equal(),width:30,transform:"translateX(100%)",transition:`box-shadow ${i}`,content:'""',pointerEvents:"none"},[`${t}-cell-fix-left-all::after`]:{display:"none"},[`\n ${t}-cell-fix-right-first::after,\n ${t}-cell-fix-right-last::after\n `]:{position:"absolute",top:0,bottom:l(n).mul(-1).equal(),left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${i}`,content:'""',pointerEvents:"none"},[`${t}-container`]:{position:"relative","&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:l(s).add(1).equal({unit:!1}),width:30,transition:`box-shadow ${i}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${t}-ping-left`]:{[`&:not(${t}-has-fix-left) ${t}-container::before`]:{boxShadow:`inset 10px 0 8px -8px ${c}`},[`\n ${t}-cell-fix-left-first::after,\n ${t}-cell-fix-left-last::after\n `]:{boxShadow:`inset 10px 0 8px -8px ${c}`},[`${t}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${t}-ping-right`]:{[`&:not(${t}-has-fix-right) ${t}-container::after`]:{boxShadow:`inset -10px 0 8px -8px ${c}`},[`\n ${t}-cell-fix-right-first::after,\n ${t}-cell-fix-right-last::after\n `]:{boxShadow:`inset -10px 0 8px -8px ${c}`}},[`${t}-fixed-column-gapped`]:{[`\n ${t}-cell-fix-left-first::after,\n ${t}-cell-fix-left-last::after,\n ${t}-cell-fix-right-first::after,\n ${t}-cell-fix-right-last::after\n `]:{boxShadow:"none"}}}}},X$=e=>{const{componentCls:t,antCls:n,margin:r}=e;return{[`${t}-wrapper`]:{[`${t}-pagination${n}-pagination`]:{margin:`${It(r)} 0`},[`${t}-pagination`]:{display:"flex",flexWrap:"wrap",rowGap:e.paddingXS,"> *":{flex:"none"},"&-left":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-right":{justifyContent:"flex-end"}}}}},G$=e=>{const{componentCls:t,tableRadius:n}=e;return{[`${t}-wrapper`]:{[t]:{[`${t}-title, ${t}-header`]:{borderRadius:`${It(n)} ${It(n)} 0 0`},[`${t}-title + ${t}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${t}-header, table`]:{borderRadius:0},"table > thead > tr:first-child":{"th:first-child, th:last-child, td:first-child, td:last-child":{borderRadius:0}}},"&-container":{borderStartStartRadius:n,borderStartEndRadius:n,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:n},"> *:last-child":{borderStartEndRadius:n}}},"&-footer":{borderRadius:`0 0 ${It(n)} ${It(n)}`}}}}},Y$=e=>{const{componentCls:t}=e;return{[`${t}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${t}-pagination-left`]:{justifyContent:"flex-end"},[`${t}-pagination-right`]:{justifyContent:"flex-start"},[`${t}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${t}-container`]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},[`${t}-row-indent`]:{float:"right"}}}}},Q$=e=>{const{componentCls:t,antCls:n,iconCls:r,fontSizeIcon:i,padding:o,paddingXS:a,headerIconColor:s,headerIconHoverColor:l,tableSelectionColumnWidth:c,tableSelectedRowBg:u,tableSelectedRowHoverBg:d,tableRowHoverBg:h,tablePaddingHorizontal:f,calc:p}=e;return{[`${t}-wrapper`]:{[`${t}-selection-col`]:{width:c,[`&${t}-selection-col-with-dropdown`]:{width:p(c).add(i).add(p(o).div(4)).equal()}},[`${t}-bordered ${t}-selection-col`]:{width:p(c).add(p(a).mul(2)).equal(),[`&${t}-selection-col-with-dropdown`]:{width:p(c).add(i).add(p(o).div(4)).add(p(a).mul(2)).equal()}},[`\n table tr th${t}-selection-column,\n table tr td${t}-selection-column,\n ${t}-selection-column\n `]:{paddingInlineEnd:e.paddingXS,paddingInlineStart:e.paddingXS,textAlign:"center",[`${n}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${t}-selection-column${t}-cell-fix-left`]:{zIndex:p(e.zIndexTableFixed).add(1).equal({unit:!1})},[`table tr th${t}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${t}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${t}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:It(p(f).div(4).equal()),[r]:{color:s,fontSize:i,verticalAlign:"baseline","&:hover":{color:l}}},[`${t}-tbody`]:{[`${t}-row`]:{[`&${t}-row-selected`]:{[`> ${t}-cell`]:{background:u,"&-row-hover":{background:d}}},[`> ${t}-cell-row-hover`]:{background:h}}}}}},J$=e=>{const{componentCls:t,tableExpandColumnWidth:n,calc:r}=e,i=(e,i,o,a)=>({[`${t}${t}-${e}`]:{fontSize:a,[`\n ${t}-title,\n ${t}-footer,\n ${t}-cell,\n ${t}-thead > tr > th,\n ${t}-tbody > tr > th,\n ${t}-tbody > tr > td,\n tfoot > tr > th,\n tfoot > tr > td\n `]:{padding:`${It(i)} ${It(o)}`},[`${t}-filter-trigger`]:{marginInlineEnd:It(r(o).div(2).mul(-1).equal())},[`${t}-expanded-row-fixed`]:{margin:`${It(r(i).mul(-1).equal())} ${It(r(o).mul(-1).equal())}`},[`${t}-tbody`]:{[`${t}-wrapper:only-child ${t}`]:{marginBlock:It(r(i).mul(-1).equal()),marginInline:`${It(r(n).sub(o).equal())} ${It(r(o).mul(-1).equal())}`}},[`${t}-selection-extra`]:{paddingInlineStart:It(r(o).div(4).equal())}}});return{[`${t}-wrapper`]:Object.assign(Object.assign({},i("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle,e.tableFontSizeMiddle)),i("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall,e.tableFontSizeSmall))}},Z$=e=>{const{componentCls:t,marginXXS:n,fontSizeIcon:r,headerIconColor:i,headerIconHoverColor:o}=e;return{[`${t}-wrapper`]:{[`${t}-thead th${t}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}, left 0s`,"&:hover":{background:e.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:e.colorPrimary},[`\n &${t}-cell-fix-left:hover,\n &${t}-cell-fix-right:hover\n `]:{background:e.tableFixedHeaderSortActiveBg}},[`${t}-thead th${t}-column-sort`]:{background:e.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${t}-column-sort`]:{background:e.tableBodySortBg},[`${t}-column-title`]:{position:"relative",zIndex:1,flex:1},[`${t}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${t}-column-sorters-tooltip-target-sorter`]:{"&::after":{content:"none"}},[`${t}-column-sorter`]:{marginInlineStart:n,color:i,fontSize:0,transition:`color ${e.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:r,"&.active":{color:e.colorPrimary}},[`${t}-column-sorter-up + ${t}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${t}-column-sorters:hover ${t}-column-sorter`]:{color:o}}}},eR=e=>{const{componentCls:t,opacityLoading:n,tableScrollThumbBg:r,tableScrollThumbBgHover:i,tableScrollThumbSize:o,tableScrollBg:a,zIndexTableSticky:s,stickyScrollBarBorderRadius:l,lineWidth:c,lineType:u,tableBorderColor:d}=e,h=`${It(c)} ${u} ${d}`;return{[`${t}-wrapper`]:{[`${t}-sticky`]:{"&-holder":{position:"sticky",zIndex:s,background:e.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${It(o)} !important`,zIndex:s,display:"flex",alignItems:"center",background:a,borderTop:h,opacity:n,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:o,backgroundColor:r,borderRadius:l,transition:`all ${e.motionDurationSlow}, transform none`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:i}}}}}}},tR=e=>{const{componentCls:t,lineWidth:n,tableBorderColor:r,calc:i}=e,o=`${It(n)} ${e.lineType} ${r}`;return{[`${t}-wrapper`]:{[`${t}-summary`]:{position:"relative",zIndex:e.zIndexTableFixed,background:e.tableBg,"> tr":{"> th, > td":{borderBottom:o}}},[`div${t}-summary`]:{boxShadow:`0 ${It(i(n).mul(-1).equal())} 0 ${r}`}}}},nR=e=>{const{componentCls:t,motionDurationMid:n,lineWidth:r,lineType:i,tableBorderColor:o,calc:a}=e,s=`${It(r)} ${i} ${o}`,l=`${t}-expanded-row-cell`;return{[`${t}-wrapper`]:{[`${t}-tbody-virtual`]:{[`${t}-tbody-virtual-holder-inner`]:{[`\n & > ${t}-row, \n & > div:not(${t}-row) > ${t}-row\n `]:{display:"flex",boxSizing:"border-box",width:"100%"}},[`${t}-cell`]:{borderBottom:s,transition:`background ${n}`},[`${t}-expanded-row`]:{[`${l}${l}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${It(r)})`,borderInlineEnd:"none"}}},[`${t}-bordered`]:{[`${t}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:s,position:"absolute"},[`${t}-cell`]:{borderInlineEnd:s,[`&${t}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:a(r).mul(-1).equal(),borderInlineStart:s}}},[`&${t}-virtual`]:{[`${t}-placeholder ${t}-cell`]:{borderInlineEnd:s,borderBottom:s}}}}}},rR=e=>{const{componentCls:t,fontWeightStrong:n,tablePaddingVertical:r,tablePaddingHorizontal:i,tableExpandColumnWidth:o,lineWidth:a,lineType:s,tableBorderColor:l,tableFontSize:c,tableBg:u,tableRadius:d,tableHeaderTextColor:h,motionDurationMid:f,tableHeaderBg:p,tableHeaderCellSplitColor:m,tableFooterTextColor:g,tableFooterBg:v,calc:b}=e,y=`${It(a)} ${s} ${l}`;return{[`${t}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%"},{"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),{[t]:Object.assign(Object.assign({},Ma(e)),{fontSize:c,background:u,borderRadius:`${It(d)} ${It(d)} 0 0`,scrollbarColor:`${e.tableScrollThumbBg} ${e.tableScrollBg}`}),table:{width:"100%",textAlign:"start",borderRadius:`${It(d)} ${It(d)} 0 0`,borderCollapse:"separate",borderSpacing:0},[`\n ${t}-cell,\n ${t}-thead > tr > th,\n ${t}-tbody > tr > th,\n ${t}-tbody > tr > td,\n tfoot > tr > th,\n tfoot > tr > td\n `]:{position:"relative",padding:`${It(r)} ${It(i)}`,overflowWrap:"break-word"},[`${t}-title`]:{padding:`${It(r)} ${It(i)}`},[`${t}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:h,fontWeight:n,textAlign:"start",background:p,borderBottom:y,transition:`background ${f} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${t}-selection-column):not(${t}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:m,transform:"translateY(-50%)",transition:`background-color ${f}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${t}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${f}, border-color ${f}`,borderBottom:y,[`\n > ${t}-wrapper:only-child,\n > ${t}-expanded-row-fixed > ${t}-wrapper:only-child\n `]:{[t]:{marginBlock:It(b(r).mul(-1).equal()),marginInline:`${It(b(o).sub(i).equal())}\n ${It(b(i).mul(-1).equal())}`,[`${t}-tbody > tr:last-child > td`]:{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:h,fontWeight:n,textAlign:"start",background:p,borderBottom:y,transition:`background ${f} ease`}}},[`${t}-footer`]:{padding:`${It(r)} ${It(i)}`,color:g,background:v}})}},iR=ml("Table",(e=>{const{colorTextHeading:t,colorSplit:n,colorBgContainer:r,controlInteractiveSize:i,headerBg:o,headerColor:a,headerSortActiveBg:s,headerSortHoverBg:l,bodySortBg:c,rowHoverBg:u,rowSelectedBg:d,rowSelectedHoverBg:h,rowExpandedBg:f,cellPaddingBlock:p,cellPaddingInline:m,cellPaddingBlockMD:g,cellPaddingInlineMD:v,cellPaddingBlockSM:b,cellPaddingInlineSM:y,borderColor:_,footerBg:S,footerColor:w,headerBorderRadius:C,cellFontSize:x,cellFontSizeMD:E,cellFontSizeSM:k,headerSplitColor:O,fixedHeaderSortActiveBg:$,headerFilterHoverBg:R,filterDropdownBg:I,expandIconBg:M,selectionColumnWidth:P,stickyScrollBarBg:N,calc:L}=e,T=ol(e,{tableFontSize:x,tableBg:r,tableRadius:C,tablePaddingVertical:p,tablePaddingHorizontal:m,tablePaddingVerticalMiddle:g,tablePaddingHorizontalMiddle:v,tablePaddingVerticalSmall:b,tablePaddingHorizontalSmall:y,tableBorderColor:_,tableHeaderTextColor:a,tableHeaderBg:o,tableFooterTextColor:w,tableFooterBg:S,tableHeaderCellSplitColor:O,tableHeaderSortBg:s,tableHeaderSortHoverBg:l,tableBodySortBg:c,tableFixedHeaderSortActiveBg:$,tableHeaderFilterActiveBg:R,tableFilterDropdownBg:I,tableRowHoverBg:u,tableSelectedRowBg:d,tableSelectedRowHoverBg:h,zIndexTableFixed:2,zIndexTableSticky:L(2).add(1).equal({unit:!1}),tableFontSizeMiddle:E,tableFontSizeSmall:k,tableSelectionColumnWidth:P,tableExpandIconBg:M,tableExpandColumnWidth:L(i).add(L(e.padding).mul(2)).equal(),tableExpandedRowBg:f,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:N,tableScrollThumbBgHover:t,tableScrollBg:n});return[rR(T),X$(T),tR(T),Z$(T),U$(T),F$(T),G$(T),V$(T),tR(T),K$(T),Q$(T),q$(T),eR(T),W$(T),J$(T),Y$(T),nR(T)]}),(e=>{const{colorFillAlter:t,colorBgContainer:n,colorTextHeading:r,colorFillSecondary:i,colorFillContent:o,controlItemBgActive:a,controlItemBgActiveHover:s,padding:l,paddingSM:c,paddingXS:u,colorBorderSecondary:d,borderRadiusLG:h,controlHeight:f,colorTextPlaceholder:p,fontSize:m,fontSizeSM:g,lineHeight:v,lineWidth:b,colorIcon:y,colorIconHover:_,opacityLoading:S,controlInteractiveSize:w}=e,C=new Oi(i).onBackground(n).toHexShortString(),x=new Oi(o).onBackground(n).toHexShortString(),E=new Oi(t).onBackground(n).toHexShortString(),k=new Oi(y),O=new Oi(_),$=w/2-b,R=2*$+3*b;return{headerBg:E,headerColor:r,headerSortActiveBg:C,headerSortHoverBg:x,bodySortBg:E,rowHoverBg:E,rowSelectedBg:a,rowSelectedHoverBg:s,rowExpandedBg:t,cellPaddingBlock:l,cellPaddingInline:l,cellPaddingBlockMD:c,cellPaddingInlineMD:u,cellPaddingBlockSM:u,cellPaddingInlineSM:u,borderColor:d,headerBorderRadius:h,footerBg:E,footerColor:r,cellFontSize:m,cellFontSizeMD:m,cellFontSizeSM:m,headerSplitColor:d,fixedHeaderSortActiveBg:C,headerFilterHoverBg:o,filterDropdownMenuBg:n,filterDropdownBg:n,expandIconBg:n,selectionColumnWidth:f,stickyScrollBarBg:p,stickyScrollBarBorderRadius:100,expandIconMarginTop:(m*v-3*b)/2-Math.ceil((1.4*g-3*b)/2),headerIconColor:k.clone().setAlpha(k.getAlpha()*S).toRgbString(),headerIconHoverColor:O.clone().setAlpha(O.getAlpha()*S).toRgbString(),expandIconHalfInner:$,expandIconSize:R,expandIconScale:w/R}}),{unitless:{expandIconScale:!0}}),oR=[],aR=(t,n)=>{var r,i;const{prefixCls:o,className:a,rootClassName:s,style:l,size:c,bordered:u,dropdownPrefixCls:d,dataSource:h,pagination:f,rowSelection:p,rowKey:m="key",rowClassName:g,columns:v,children:b,childrenColumnName:y,onChange:_,getPopupContainer:S,loading:w,expandIcon:C,expandable:x,expandedRowRender:E,expandIconColumnIndex:k,indentSize:O,scroll:$,sortDirections:R,locale:I,showSorterTooltip:M={target:"full-header"},virtual:P}=t;dr("Table");const N=e.useMemo((()=>v||dx(b)),[v,b]),L=e.useMemo((()=>N.some((e=>e.responsive))),[N]),T=DE(L),D=e.useMemo((()=>{const e=new Set(Object.keys(T).filter((e=>T[e])));return N.filter((t=>!t.responsive||t.responsive.some((t=>e.has(t)))))}),[N,T]),A=Xf(t,["className","style","columns"]),{locale:B=br,direction:j,table:z,renderEmpty:H,getPrefixCls:F,getPopupContainer:W}=e.useContext(Le),K=ac(c),V=Object.assign(Object.assign({},B.Table),I),U=h||oR,q=F("table",o),X=F("dropdown",d),[,G]=Oa(),Y=Hs(q),[Q,J,Z]=iR(q,Y),ee=Object.assign(Object.assign({childrenColumnName:y,expandIconColumnIndex:k},x),{expandIcon:null!==(r=null===x||void 0===x?void 0:x.expandIcon)&&void 0!==r?r:null===(i=null===z||void 0===z?void 0:z.expandable)||void 0===i?void 0:i.expandIcon}),{childrenColumnName:te="children"}=ee,ne=e.useMemo((()=>U.some((e=>null===e||void 0===e?void 0:e[te]))?"nest":E||(null===x||void 0===x?void 0:x.expandedRowRender)?"row":null),[U]),re={body:e.useRef()},ie=function(e){return(t,n)=>{const r=t.querySelector(`.${e}-container`);let i=n;if(r){const e=getComputedStyle(r);i=n-parseInt(e.borderLeftWidth,10)-parseInt(e.borderRightWidth,10)}return i}}(q),oe=e.useRef(null),ae=e.useRef(null);IE(n,(()=>Object.assign(Object.assign({},ae.current),{nativeElement:oe.current})));const se=e.useMemo((()=>"function"===typeof m?m:e=>null===e||void 0===e?void 0:e[m]),[m]),[le]=b$(U,te,se),ce={},ue=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];var r,i,o,a;const s=Object.assign(Object.assign({},ce),e);n&&(null===(r=ce.resetPagination)||void 0===r||r.call(ce),(null===(i=s.pagination)||void 0===i?void 0:i.current)&&(s.pagination.current=1),f&&(null===(o=f.onChange)||void 0===o||o.call(f,1,null===(a=s.pagination)||void 0===a?void 0:a.pageSize))),$&&!1!==$.scrollToFirstRowOnChange&&re.body.current&&function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{getContainer:n=()=>window,callback:r,duration:i=450}=t,o=n(),a=PE(o),s=Date.now(),l=()=>{const t=Date.now()-s,n=function(e,t,n,r){const i=n-t;return(e/=r/2)<1?i/2*e*e*e+t:i/2*((e-=2)*e*e+2)+t}(t>i?i:t,a,e,i);ME(o)?o.scrollTo(window.pageXOffset,n):o instanceof Document||"HTMLDocument"===o.constructor.name?o.documentElement.scrollTop=n:o.scrollTop=n,t<i?Zo(l):"function"===typeof r&&r()};Zo(l)}(0,{getContainer:()=>re.body.current}),null===_||void 0===_||_(s.pagination,s.filters,s.sorter,{currentDataSource:m$(D$(U,s.sorterStates,te),s.filterStates,te),action:t})},[de,he,fe,pe]=A$({prefixCls:q,mergedColumns:D,onSorterChange:(e,t)=>{ue({sorter:e,sorterStates:t},"sort",!1)},sortDirections:R||["ascend","descend"],tableLocale:V,showSorterTooltip:M}),me=e.useMemo((()=>D$(U,he,te)),[U,he]);ce.sorter=pe(),ce.sorterStates=he;const[ge,ve,be]=v$({prefixCls:q,locale:V,dropdownPrefixCls:X,mergedColumns:D,onFilterChange:(e,t)=>{ue({filters:e,filterStates:t},"filter",!0)},getPopupContainer:S||W,rootClassName:Ji()(s,Y)}),ye=m$(me,ve,te);ce.filters=be,ce.filterStates=ve;const _e=e.useMemo((()=>{const e={};return Object.keys(be).forEach((t=>{null!==be[t]&&(e[t]=be[t])})),Object.assign(Object.assign({},fe),{filters:e})}),[fe,be]),[Se]=j$(_e),[we,Ce]=S$(ye.length,((e,t)=>{ue({pagination:Object.assign(Object.assign({},ce.pagination),{current:e,pageSize:t})},"paginate")}),f);ce.pagination=!1===f?{}:function(e,t){const n={current:e.current,pageSize:e.pageSize},r=t&&"object"===typeof t?t:{};return Object.keys(r).forEach((t=>{const r=e[t];"function"!==typeof r&&(n[t]=r)})),n}(we,f),ce.resetPagination=Ce;const xe=e.useMemo((()=>{if(!1===f||!we.pageSize)return ye;const{current:e=1,total:t,pageSize:n=_$}=we;return ye.length<t?ye.length>n?ye.slice((e-1)*n,e*n):ye:ye.slice((e-1)*n,e*n)}),[!!f,ye,null===we||void 0===we?void 0:we.current,null===we||void 0===we?void 0:we.pageSize,null===we||void 0===we?void 0:we.total]),[Ee,ke]=RE({prefixCls:q,data:ye,pageData:xe,getRowKey:se,getRecordByKey:le,expandType:ne,childrenColumnName:te,locale:V,getPopupContainer:S||W},p);ee.__PARENT_RENDER_ICON__=ee.expandIcon,ee.expandIcon=ee.expandIcon||C||oO(V),"nest"===ne&&void 0===ee.expandIconColumnIndex?ee.expandIconColumnIndex=p?1:0:ee.expandIconColumnIndex>0&&p&&(ee.expandIconColumnIndex-=1),"number"!==typeof ee.indentSize&&(ee.indentSize="number"===typeof O?O:15);const Oe=e.useCallback((e=>Se(Ee(ge(de(e))))),[de,ge,Ee]);let $e,Re,Ie;if(!1!==f&&(null===we||void 0===we?void 0:we.total)){let t;t=we.size?we.size:"small"===K||"middle"===K?"small":void 0;const n=n=>e.createElement(Wk,Object.assign({},we,{className:Ji()(`${q}-pagination ${q}-pagination-${n}`,we.className),size:t})),r="rtl"===j?"left":"right",{position:i}=we;if(null!==i&&Array.isArray(i)){const e=i.find((e=>e.includes("top"))),t=i.find((e=>e.includes("bottom"))),o=i.every((e=>"none"===`${e}`));e||t||o||(Re=n(r)),e&&($e=n(e.toLowerCase().replace("top",""))),t&&(Re=n(t.toLowerCase().replace("bottom","")))}else Re=n(r)}"boolean"===typeof w?Ie={spinning:w}:"object"===typeof w&&(Ie=Object.assign({spinning:!0},w));const Me=Ji()(Z,Y,`${q}-wrapper`,null===z||void 0===z?void 0:z.className,{[`${q}-wrapper-rtl`]:"rtl"===j},a,s,J),Pe=Object.assign(Object.assign({},null===z||void 0===z?void 0:z.style),l),Ne="undefined"!==typeof(null===I||void 0===I?void 0:I.emptyText)?I.emptyText:(null===H||void 0===H?void 0:H("Table"))||e.createElement(Vp,{componentName:"Table"}),Te=P?H$:z$,De={},Ae=e.useMemo((()=>{const{fontSize:e,lineHeight:t,padding:n,paddingXS:r,paddingSM:i}=G,o=Math.floor(e*t);switch(K){case"large":return 2*n+o;case"small":return 2*r+o;default:return 2*i+o}}),[G,K]);return P&&(De.listItemHeight=Ae),Q(e.createElement("div",{ref:oe,className:Me,style:Pe},e.createElement(iO,Object.assign({spinning:!1},Ie),$e,e.createElement(Te,Object.assign({},De,A,{ref:ae,columns:D,direction:j,expandable:ee,prefixCls:q,className:Ji()({[`${q}-middle`]:"middle"===K,[`${q}-small`]:"small"===K,[`${q}-bordered`]:u,[`${q}-empty`]:0===U.length},Z,Y,J),data:xe,rowKey:se,rowClassName:(e,t,n)=>{let r;return r="function"===typeof g?Ji()(g(e,t,n)):Ji()(g),Ji()({[`${q}-row-selected`]:ke.has(se(e,t))},r)},emptyText:Ne,internalHooks:vC,internalRefs:re,transformColumns:Oe,getContainerWidth:ie})),Re)))},sR=e.forwardRef(aR),lR=(t,n)=>{const r=e.useRef(0);return r.current+=1,e.createElement(sR,Object.assign({},t,{ref:n,_renderTimes:r.current}))},cR=e.forwardRef(lR);cR.SELECTION_COLUMN=CE,cR.EXPAND_COLUMN=gC,cR.SELECTION_ALL=xE,cR.SELECTION_INVERT=EE,cR.SELECTION_NONE=kE,cR.Column=Ux,cR.ColumnGroup=qx,cR.Summary=jC;const uR=cR;const dR={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};var hR=function(t,n){return e.createElement(us,Gt({},t,{ref:n,icon:dR}))};const fR=e.forwardRef(hR),pR=()=>{const[t,n]=(0,e.useState)([]),[r,i]=(0,e.useState)(null),[o,a]=(0,e.useState)(null),[s,l]=(0,e.useState)(""),[c,u]=(0,e.useState)([]),[d,h]=(0,e.useState)([]),[f,p]=(0,e.useState)([]),[m,g]=(0,e.useState)(!1),[v,b]=(0,e.useState)(""),[y,_]=(0,e.useState)(""),[S,w]=(0,e.useState)(!1),[C,x]=(0,e.useState)(""),E=async()=>{try{const e=await fetch("/api/file-groups");if(!e.ok)throw new Error("Failed to fetch file groups");const t=await e.json();n(t.groups)}catch(e){Kl.error("Failed to load file groups")}};(0,e.useEffect)((()=>{E(),(async()=>{try{const e=await fetch("/api/files");if(!e.ok)throw new Error("Failed to fetch file tree");const t=await e.json();u(t.tree),h(t.tree)}catch(e){Kl.error("Failed to load file tree")}})()}),[]);const k=async e=>{try{const t=await fetch(`/api/file/${e}`);if(!t.ok)throw new Error("Failed to fetch file content");const n=await t.json();a(e),l(n.content)}catch(t){Kl.error("Failed to load file content")}};return(0,eg.jsxs)("div",{className:"flex flex-col h-full",children:[(0,eg.jsx)("div",{className:"bg-gray-800 p-2 border-b border-gray-700",children:(0,eg.jsxs)("div",{className:"flex justify-between items-center",children:[(0,eg.jsx)("h2",{className:"text-white text-lg font-semibold",children:"File Groups"}),(0,eg.jsx)(uv,{type:"primary",icon:(0,eg.jsx)(fR,{}),onClick:()=>g(!0),children:"New Group"})]})}),(0,eg.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,eg.jsxs)("div",{className:"h-full flex",children:[(0,eg.jsx)("div",{className:"w-60 bg-gray-900 border-r border-gray-700 overflow-y-auto p-4",children:(0,eg.jsx)(uR,{dataSource:t,rowKey:"name",rowClassName:e=>e.name===(null===r||void 0===r?void 0:r.name)?"bg-blue-600":"bg-gray-800",onRow:e=>({onClick:()=>i(e),className:"cursor-pointer hover:bg-gray-700"}),className:"dark-mode-table",size:"small",pagination:!1,columns:[{title:"Group",dataIndex:"name",key:"name",render:(e,t)=>(0,eg.jsxs)("div",{className:"flex justify-between items-center",children:[(0,eg.jsx)("span",{className:"text-white font-medium",children:e}),(0,eg.jsx)("span",{className:"text-gray-500 text-xs",children:t.files.length})]})},{title:"Action",key:"action",width:40,render:(e,t)=>(0,eg.jsx)(uv,{type:"text",danger:!0,icon:(0,eg.jsx)(fC,{}),onClick:e=>{e.stopPropagation(),(async e=>{try{if(!(await fetch(`/api/file-groups/${e}`,{method:"DELETE"})).ok)throw new Error("Failed to delete group");Kl.success("Group deleted successfully"),E(),(null===r||void 0===r?void 0:r.name)===e&&i(null)}catch(t){Kl.error("Failed to delete group")}})(t.name)}})}]})}),(0,eg.jsx)("div",{className:"w-80 bg-gray-900 border-r border-gray-700 overflow-y-auto p-4",children:r?(0,eg.jsxs)("div",{className:"space-y-4",children:[(0,eg.jsxs)("div",{className:"space-y-4",children:[(0,eg.jsxs)("div",{className:"flex justify-between items-center",children:[(0,eg.jsx)("h3",{className:"text-white font-medium text-lg",children:r.name}),(0,eg.jsx)(uv,{type:"primary",size:"small",onClick:async()=>{if(S)try{await fetch(`/api/file-groups/${r.name}/files`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({description:C})}),r.description=C}catch(e){Kl.error("Failed to update description")}w(!S),x(r.description||"")},children:S?"Save Description":"Edit Description"})]}),S?(0,eg.jsx)("div",{className:"h-48",children:(0,eg.jsx)(re,{height:"100%",defaultLanguage:"markdown",theme:"vs-dark",value:C,onChange:e=>x(e||""),options:{minimap:{enabled:!1},fontSize:14,lineNumbers:"off",wordWrap:"on",automaticLayout:!0}})}):(0,eg.jsx)("p",{className:"text-gray-400 text-sm",children:r.description||"No description"})]}),(0,eg.jsxs)("div",{children:[(0,eg.jsxs)("h4",{className:"text-white font-medium mb-2",children:["Files (",r.files.length,")"]}),(0,eg.jsx)(uR,{dataSource:r.files.map((e=>({path:e}))),rowKey:"path",showHeader:!1,columns:[{title:"Path",dataIndex:"path",key:"path",render:e=>(0,eg.jsx)("span",{className:"text-gray-300 cursor-pointer",onDoubleClick:t=>{t.stopPropagation(),k(e)},children:e})},{title:"Action",key:"action",width:40,render:(e,t)=>{let{path:n}=t;return(0,eg.jsx)(fC,{className:"text-red-400 cursor-pointer hover:text-red-500",onClick:e=>{e.stopPropagation(),(async(e,t)=>{try{if(!(await fetch(`/api/file-groups/${e}/files`,{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:[t]})})).ok)throw new Error("Failed to remove file");if(Kl.success("File removed successfully"),E(),r){const e=(await(await fetch("/api/file-groups")).json()).groups.find((e=>e.name===r.name));e&&i(e)}}catch(n){Kl.error("Failed to remove file")}})(r.name,n)}})}}],pagination:!1,size:"small",className:"dark-mode-table"})]})]}):(0,eg.jsx)("div",{className:"text-gray-400 text-center mt-4",children:"Select a group to view details"})}),(0,eg.jsx)("div",{className:"w-64 bg-gray-900 border-r border-gray-700 overflow-y-auto",children:(0,eg.jsxs)("div",{className:"p-2",children:[(0,eg.jsxs)("div",{className:"space-y-4",children:[(0,eg.jsx)(r$,{prefix:(0,eg.jsx)(Km,{className:"text-gray-400"}),placeholder:"Filter files by path...",className:"custom-input",onChange:e=>{const t=e.target.value.toLowerCase();if(!t)return void h(c);const n=e=>e.reduce(((e,t)=>(t.isLeaf?e.push(t):t.children&&e.push(...n(t.children)),e)),[]),r=n(c).filter((e=>e.key.toString().toLowerCase().includes(t))).map((e=>({...e,title:e.key})));h(r)}}),r&&(0,eg.jsxs)("div",{className:"flex space-x-2",children:[(0,eg.jsxs)(uv,{type:"primary",onClick:async()=>{if(r&&0!==f.length)try{if(0===f.length)return void Kl.info("No files selected (directories are ignored)");const e=await fetch(`/api/file-groups/${r.name}/files`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:f})});if(!e.ok)throw new Error("Failed to add files");if(Kl.success("Files added successfully"),E(),p([]),e.ok&&(E(),r)){const e=(await(await fetch("/api/file-groups")).json()).groups.find((e=>e.name===r.name));e&&i(e)}}catch(e){Kl.error("Failed to add files")}},disabled:0===f.length,icon:(0,eg.jsx)(fR,{}),block:!0,children:["Add Selected (",f.length,")"]}),(0,eg.jsx)(uv,{onClick:()=>{const e=(e=>{const t=[],n=e=>{e.isLeaf?t.push(e.key):e.children&&e.children.forEach(n)};return e.forEach(n),t})(d);p(e)},icon:(0,eg.jsx)(Bm,{}),title:"Select All Filtered Files"})]})]}),(0,eg.jsx)("div",{className:"mt-4",children:(0,eg.jsx)(uC,{checkable:!0,treeData:d,checkedKeys:f,onCheck:e=>p(e),onDoubleClick:(e,t)=>{t.isLeaf&&k(t.key)},className:"bg-gray-900 text-gray-300"})})]})}),(0,eg.jsx)("div",{className:"flex-1 bg-gray-900",children:(0,eg.jsx)(re,{height:"100%",defaultLanguage:"plaintext",language:pC(o||""),theme:"vs-dark",value:s,options:{readOnly:!0,minimap:{enabled:!0},fontSize:14,lineNumbers:"on",folding:!0,automaticLayout:!0}})})]})}),(0,eg.jsx)(Qb,{title:"Create New Group",open:m,onOk:async()=>{try{if(!(await fetch("/api/file-groups",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:v,description:y})})).ok)throw new Error("Failed to create group");Kl.success("Group created successfully"),g(!1),b(""),_(""),E()}catch(e){Kl.error("Failed to create group")}},onCancel:()=>g(!1),okButtonProps:{disabled:!v.trim()},children:(0,eg.jsxs)("div",{className:"space-y-4",children:[(0,eg.jsxs)("div",{children:[(0,eg.jsx)("label",{className:"block text-sm font-medium text-gray-700",children:"Group Name"}),(0,eg.jsx)(r$,{value:v,onChange:e=>b(e.target.value),placeholder:"Enter group name"})]}),(0,eg.jsxs)("div",{children:[(0,eg.jsx)("label",{className:"block text-sm font-medium text-gray-700",children:"Description"}),(0,eg.jsx)(r$.TextArea,{value:y,onChange:e=>_(e.target.value),placeholder:"Enter group description",rows:4})]})]})})]})};var mR=n(69),gR=n(77),vR=n(933),bR=n(585);const yR=()=>{const t=(0,e.useRef)(null),n=(0,e.useRef)(null),r=(0,e.useRef)(null),i=(0,e.useRef)(),o=(0,e.useRef)();return(0,e.useEffect)((()=>{if(!t.current)return;const e=new mR.Terminal({cursorBlink:!0,fontSize:14,fontFamily:'Menlo, Monaco, "Courier New", monospace',theme:{background:"#1e1e1e",foreground:"#d4d4d4"},rows:24,cols:80}),a=new gR.FitAddon,s=new vR.WebLinksAddon,l=new bR.SearchAddon;e.loadAddon(a),e.loadAddon(s),e.loadAddon(l),e.open(t.current),setTimeout((()=>{a.fit()}),0);const c=new WebSocket("ws://localhost:8007/ws/terminal");r.current=c,c.onopen=()=>{e.writeln("Connected to terminal backend");const t=()=>{var t;if(o.current&&clearInterval(o.current),(null===(t=r.current)||void 0===t?void 0:t.readyState)===WebSocket.CLOSED){e.writeln("\r\nConnection lost. Attempting to reconnect...");const t=new WebSocket("ws://localhost:8007/ws/terminal");r.current=t,t.onopen=c.onopen,t.onmessage=c.onmessage,t.onclose=c.onclose,t.onerror=c.onerror}};o.current&&clearInterval(o.current),o.current=setInterval((()=>{if(c.readyState===WebSocket.OPEN)try{c.send(JSON.stringify({type:"heartbeat"}))}catch(e){console.error("Failed to send heartbeat:",e),t()}}),5e3);try{c.send(JSON.stringify({type:"resize",cols:e.cols,rows:e.rows}))}catch(n){console.error("Failed to send initial size:",n),e.writeln("\r\nFailed to initialize terminal size")}},c.onmessage=t=>{try{const n=t.data;if("string"===typeof n)try{if("heartbeat"===JSON.parse(n).type)return}catch{e.write(n)}else if(n instanceof Blob){const t=new FileReader;t.onload=()=>{e.write(t.result)},t.readAsText(n)}}catch(n){console.error("Error writing to terminal:",n),e.writeln("\r\nError writing to terminal: "+n)}},c.onerror=t=>{console.error("WebSocket error:",t),e.writeln("\r\nWebSocket error: "+t)},c.onclose=t=>{o.current&&clearInterval(o.current),e.writeln(`\r\nConnection closed. Code: ${t.code}, Reason: ${t.reason}`),t.wasClean||(e.writeln("\r\nWebSocket closed unexpectedly. Reconnecting..."),i.current=setTimeout((()=>{var e;if((null===(e=r.current)||void 0===e?void 0:e.readyState)===WebSocket.CLOSED){const e=new WebSocket("ws://localhost:8007/ws/terminal");r.current=e,e.onopen=c.onopen,e.onmessage=c.onmessage,e.onclose=c.onclose,e.onerror=c.onerror}}),3e3))},e.onData((e=>{var t;(null===(t=r.current)||void 0===t?void 0:t.readyState)===WebSocket.OPEN&&r.current.send(e)}));const u=()=>{var t;a.fit(),(null===(t=r.current)||void 0===t?void 0:t.readyState)===WebSocket.OPEN&&r.current.send(JSON.stringify({type:"resize",cols:e.cols,rows:e.rows}))};return window.addEventListener("resize",u),n.current=e,()=>{i.current&&clearTimeout(i.current),o.current&&clearInterval(o.current),r.current&&(r.current.close(),r.current=null),n.current&&(n.current.dispose(),n.current=null),window.removeEventListener("resize",u)}}),[]),(0,eg.jsx)("div",{className:"h-full w-full bg-[#1e1e1e]",children:(0,eg.jsx)("div",{ref:t,className:"h-full"})})},_R=e.memo(yR);var SR=n(173),wR=n.n(SR),CR="undefined"!==typeof window?window:null,xR=null===CR,ER=xR?void 0:CR.document,kR="addEventListener",OR="removeEventListener",$R="getBoundingClientRect",RR="_a",IR="_b",MR="_c",PR="horizontal",NR=function(){return!1},LR=xR?"calc":["","-webkit-","-moz-","-o-"].filter((function(e){var t=ER.createElement("div");return t.style.cssText="width:"+e+"calc(9px)",!!t.style.length})).shift()+"calc",TR=function(e){return"string"===typeof e||e instanceof String},DR=function(e){if(TR(e)){var t=ER.querySelector(e);if(!t)throw new Error("Selector "+e+" did not match a DOM element");return t}return e},AR=function(e,t,n){var r=e[t];return void 0!==r?r:n},BR=function(e,t,n,r){if(t){if("end"===r)return 0;if("center"===r)return e/2}else if(n){if("start"===r)return 0;if("center"===r)return e/2}return e},jR=function(e,t){var n=ER.createElement("div");return n.className="gutter gutter-"+t,n},zR=function(e,t,n){var r={};return TR(t)?r[e]=t:r[e]=LR+"("+t+"% - "+n+"px)",r},HR=function(e,t){var n;return(n={})[e]=t+"px",n};const FR=function(e,t){if(void 0===t&&(t={}),xR)return{};var n,r,i,o,a,s,l=e;Array.from&&(l=Array.from(l));var c=DR(l[0]).parentNode,u=getComputedStyle?getComputedStyle(c):null,d=u?u.flexDirection:null,h=AR(t,"sizes")||l.map((function(){return 100/l.length})),f=AR(t,"minSize",100),p=Array.isArray(f)?f:l.map((function(){return f})),m=AR(t,"maxSize",1/0),g=Array.isArray(m)?m:l.map((function(){return m})),v=AR(t,"expandToMin",!1),b=AR(t,"gutterSize",10),y=AR(t,"gutterAlign","center"),_=AR(t,"snapOffset",30),S=Array.isArray(_)?_:l.map((function(){return _})),w=AR(t,"dragInterval",1),C=AR(t,"direction",PR),x=AR(t,"cursor",C===PR?"col-resize":"row-resize"),E=AR(t,"gutter",jR),k=AR(t,"elementStyle",zR),O=AR(t,"gutterStyle",HR);function $(e,t,r,i){var o=k(n,t,r,i);Object.keys(o).forEach((function(t){e.style[t]=o[t]}))}function R(){return s.map((function(e){return e.size}))}function I(e){return"touches"in e?e.touches[0][r]:e[r]}function M(e){var t=s[this.a],n=s[this.b],r=t.size+n.size;t.size=e/this.size*r,n.size=r-e/this.size*r,$(t.element,t.size,this[IR],t.i),$(n.element,n.size,this[MR],n.i)}function P(e){var n,r=s[this.a],i=s[this.b];this.dragging&&(n=I(e)-this.start+(this[IR]-this.dragOffset),w>1&&(n=Math.round(n/w)*w),n<=r.minSize+r.snapOffset+this[IR]?n=r.minSize+this[IR]:n>=this.size-(i.minSize+i.snapOffset+this[MR])&&(n=this.size-(i.minSize+this[MR])),n>=r.maxSize-r.snapOffset+this[IR]?n=r.maxSize+this[IR]:n<=this.size-(i.maxSize-i.snapOffset+this[MR])&&(n=this.size-(i.maxSize+this[MR])),M.call(this,n),AR(t,"onDrag",NR)(R()))}function N(){var e=s[this.a].element,t=s[this.b].element,r=e[$R](),a=t[$R]();this.size=r[n]+a[n]+this[IR]+this[MR],this.start=r[i],this.end=r[o]}function L(e){var t=function(e){if(!getComputedStyle)return null;var t=getComputedStyle(e);if(!t)return null;var n=e[a];return 0===n?null:n-=C===PR?parseFloat(t.paddingLeft)+parseFloat(t.paddingRight):parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)}(c);if(null===t)return e;if(p.reduce((function(e,t){return e+t}),0)>t)return e;var n=0,r=[],i=e.map((function(i,o){var a=t*i/100,s=BR(b,0===o,o===e.length-1,y),l=p[o]+s;return a<l?(n+=l-a,r.push(0),l):(r.push(a-l),a)}));return 0===n?e:i.map((function(e,i){var o=e;if(n>0&&r[i]-n>0){var a=Math.min(n,r[i]-n);n-=a,o=e-a}return o/t*100}))}function T(){var e=this,n=s[e.a].element,r=s[e.b].element;e.dragging&&AR(t,"onDragEnd",NR)(R()),e.dragging=!1,CR[OR]("mouseup",e.stop),CR[OR]("touchend",e.stop),CR[OR]("touchcancel",e.stop),CR[OR]("mousemove",e.move),CR[OR]("touchmove",e.move),e.stop=null,e.move=null,n[OR]("selectstart",NR),n[OR]("dragstart",NR),r[OR]("selectstart",NR),r[OR]("dragstart",NR),n.style.userSelect="",n.style.webkitUserSelect="",n.style.MozUserSelect="",n.style.pointerEvents="",r.style.userSelect="",r.style.webkitUserSelect="",r.style.MozUserSelect="",r.style.pointerEvents="",e.gutter.style.cursor="",e.parent.style.cursor="",ER.body.style.cursor=""}function D(e){if(!("button"in e)||0===e.button){var n=this,r=s[n.a].element,i=s[n.b].element;n.dragging||AR(t,"onDragStart",NR)(R()),e.preventDefault(),n.dragging=!0,n.move=P.bind(n),n.stop=T.bind(n),CR[kR]("mouseup",n.stop),CR[kR]("touchend",n.stop),CR[kR]("touchcancel",n.stop),CR[kR]("mousemove",n.move),CR[kR]("touchmove",n.move),r[kR]("selectstart",NR),r[kR]("dragstart",NR),i[kR]("selectstart",NR),i[kR]("dragstart",NR),r.style.userSelect="none",r.style.webkitUserSelect="none",r.style.MozUserSelect="none",r.style.pointerEvents="none",i.style.userSelect="none",i.style.webkitUserSelect="none",i.style.MozUserSelect="none",i.style.pointerEvents="none",n.gutter.style.cursor=x,n.parent.style.cursor=x,ER.body.style.cursor=x,N.call(n),n.dragOffset=I(e)-n.end}}C===PR?(n="width",r="clientX",i="left",o="right",a="clientWidth"):"vertical"===C&&(n="height",r="clientY",i="top",o="bottom",a="clientHeight"),h=L(h);var A=[];function B(e){var t=e.i===A.length,n=t?A[e.i-1]:A[e.i];N.call(n);var r=t?n.size-e.minSize-n[MR]:e.minSize+n[IR];M.call(n,r)}return s=l.map((function(e,t){var r,i={element:DR(e),size:h[t],minSize:p[t],maxSize:g[t],snapOffset:S[t],i:t};if(t>0&&((r={a:t-1,b:t,dragging:!1,direction:C,parent:c})[IR]=BR(b,t-1===0,!1,y),r[MR]=BR(b,!1,t===l.length-1,y),"row-reverse"===d||"column-reverse"===d)){var o=r.a;r.a=r.b,r.b=o}if(t>0){var a=E(t,C,i.element);!function(e,t,r){var i=O(n,t,r);Object.keys(i).forEach((function(t){e.style[t]=i[t]}))}(a,b,t),r[RR]=D.bind(r),a[kR]("mousedown",r[RR]),a[kR]("touchstart",r[RR]),c.insertBefore(a,i.element),r.gutter=a}return $(i.element,i.size,BR(b,0===t,t===l.length-1,y),t),t>0&&A.push(r),i})),s.forEach((function(e){var t=e.element[$R]()[n];t<e.minSize&&(v?B(e):e.minSize=t)})),{setSizes:function(e){var t=L(e);t.forEach((function(e,n){if(n>0){var r=A[n-1],i=s[r.a],o=s[r.b];i.size=t[n-1],o.size=e,$(i.element,i.size,r[IR],i.i),$(o.element,o.size,r[MR],o.i)}}))},getSizes:R,collapse:function(e){B(s[e])},destroy:function(e,t){A.forEach((function(r){if(!0!==t?r.parent.removeChild(r.gutter):(r.gutter[OR]("mousedown",r[RR]),r.gutter[OR]("touchstart",r[RR])),!0!==e){var i=k(n,r.a.size,r[IR]);Object.keys(i).forEach((function(e){s[r.a].element.style[e]="",s[r.b].element.style[e]=""}))}}))},parent:c,pairs:A}};function WR(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===t.indexOf(r)&&(n[r]=e[r]);return n}var KR=function(t){function n(){t.apply(this,arguments)}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.componentDidMount=function(){var e=this.props;e.children;var t=e.gutter,n=WR(e,["children","gutter"]);n.gutter=function(e,n){var r;return t?r=t(e,n):(r=document.createElement("div")).className="gutter gutter-"+n,r.__isSplitGutter=!0,r},this.split=FR(this.parent.children,n)},n.prototype.componentDidUpdate=function(e){var t=this,n=this.props;n.children;var r=n.minSize,i=n.sizes,o=n.collapsed,a=WR(n,["children","minSize","sizes","collapsed"]),s=e.minSize,l=e.sizes,c=e.collapsed,u=["maxSize","expandToMin","gutterSize","gutterAlign","snapOffset","dragInterval","direction","cursor"].map((function(n){return t.props[n]!==e[n]})).reduce((function(e,t){return e||t}),!1);if(Array.isArray(r)&&Array.isArray(s)){var d=!1;r.forEach((function(e,t){d=d||e!==s[t]})),u=u||d}else u=!(!Array.isArray(r)&&!Array.isArray(s))||(u||r!==s);if(u)a.minSize=r,a.sizes=i||this.split.getSizes(),this.split.destroy(!0,!0),a.gutter=function(e,t,n){return n.previousSibling},this.split=FR(Array.from(this.parent.children).filter((function(e){return!e.__isSplitGutter})),a);else if(i){var h=!1;i.forEach((function(e,t){h=h||e!==l[t]})),h&&this.split.setSizes(this.props.sizes)}Number.isInteger(o)&&(o!==c||u)&&this.split.collapse(o)},n.prototype.componentWillUnmount=function(){this.split.destroy(),delete this.split},n.prototype.render=function(){var t=this,n=this.props;n.sizes,n.minSize,n.maxSize,n.expandToMin,n.gutterSize,n.gutterAlign,n.snapOffset,n.dragInterval,n.direction,n.cursor,n.gutter,n.elementStyle,n.gutterStyle,n.onDrag,n.onDragStart,n.onDragEnd,n.collapsed;var r=n.children,i=WR(n,["sizes","minSize","maxSize","expandToMin","gutterSize","gutterAlign","snapOffset","dragInterval","direction","cursor","gutter","elementStyle","gutterStyle","onDrag","onDragStart","onDragEnd","collapsed","children"]);return e.createElement("div",Object.assign({},{ref:function(e){t.parent=e}},i),r)},n}(e.Component);KR.propTypes={sizes:wR().arrayOf(wR().number),minSize:wR().oneOfType([wR().number,wR().arrayOf(wR().number)]),maxSize:wR().oneOfType([wR().number,wR().arrayOf(wR().number)]),expandToMin:wR().bool,gutterSize:wR().number,gutterAlign:wR().string,snapOffset:wR().oneOfType([wR().number,wR().arrayOf(wR().number)]),dragInterval:wR().number,direction:wR().string,cursor:wR().string,gutter:wR().func,elementStyle:wR().func,gutterStyle:wR().func,onDrag:wR().func,onDragStart:wR().func,onDragEnd:wR().func,collapsed:wR().number,children:wR().arrayOf(wR().element)},KR.defaultProps={sizes:void 0,minSize:void 0,maxSize:void 0,expandToMin:void 0,gutterSize:void 0,gutterAlign:void 0,snapOffset:void 0,dragInterval:void 0,direction:void 0,cursor:void 0,gutter:void 0,elementStyle:void 0,gutterStyle:void 0,onDrag:void 0,onDragStart:void 0,onDragEnd:void 0,collapsed:void 0,children:void 0};const VR=KR;const UR={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"};var qR=function(t,n){return e.createElement(us,Gt({},t,{ref:n,icon:UR}))};const XR=e.forwardRef(qR),GR=()=>{const[t,n]=(0,e.useState)([{id:"1",name:"Terminal 1"}]),[r,i]=(0,e.useState)("1"),[o,a]=(0,e.useState)(!1),s=(e,r)=>{n(t.map((t=>t.id===e?{...t,name:r}:t)))};return(0,eg.jsxs)(VR,{className:"flex h-full",sizes:[80,20],minSize:[400,150],gutterSize:4,cursor:"col-resize",children:[(0,eg.jsx)("div",{className:"h-full",children:t.map((e=>(0,eg.jsx)("div",{className:"h-full "+(r===e.id?"block":"hidden"),children:(0,eg.jsx)(_R,{})},e.id)))}),(0,eg.jsxs)("div",{className:"bg-gray-900 flex flex-col",children:[(0,eg.jsx)("div",{className:"p-2 border-b border-gray-700",children:(0,eg.jsx)("div",{className:"flex items-center justify-between",children:(0,eg.jsxs)("div",{className:"flex items-center gap-1",children:[(0,eg.jsx)(Uh,{title:"New Terminal",children:(0,eg.jsx)("button",{onClick:()=>{const e=String(t.length+1);n([...t,{id:e,name:`Terminal ${e}`}]),i(e)},className:"p-1 text-gray-400 hover:text-white rounded hover:bg-gray-700",children:(0,eg.jsx)(fR,{style:{fontSize:"14px"}})})}),(0,eg.jsx)(Uh,{title:"Terminal Settings",children:(0,eg.jsx)("button",{onClick:()=>a(!0),className:"p-1 text-gray-400 hover:text-white rounded hover:bg-gray-700",children:(0,eg.jsx)(XR,{style:{fontSize:"14px"}})})})]})})}),(0,eg.jsx)("div",{className:"flex-1 overflow-y-auto",children:t.map((e=>(0,eg.jsxs)("div",{className:"group flex items-center justify-between px-3 py-2 cursor-pointer \n "+(r===e.id?"bg-gray-700 text-white":"text-gray-400 hover:bg-gray-800"),onClick:()=>i(e.id),children:[(0,eg.jsx)("input",{className:"text-sm truncate bg-transparent outline-none w-full "+(r===e.id?"text-white":"text-gray-400"),value:e.name,onDoubleClick:e=>e.target.select(),onChange:t=>s(e.id,t.target.value),onBlur:t=>{t.target.value.trim()||s(e.id,`Terminal ${e.id}`)}}),t.length>1&&(0,eg.jsx)("button",{onClick:o=>{o.stopPropagation(),(e=>{if(t.length>1){const o=t.filter((t=>t.id!==e));n(o),r===e&&i(o[0].id)}})(e.id)},className:"p-1 rounded hover:bg-gray-600 \n "+(r===e.id?"text-gray-300":"invisible group-hover:visible"),children:(0,eg.jsx)(fC,{style:{fontSize:"12px"}})})]},e.id)))})]}),(0,eg.jsx)(Qb,{title:"Terminal Settings",open:o,onCancel:()=>a(!1),footer:null,className:"dark-theme-modal",children:(0,eg.jsxs)("div",{className:"p-4 space-y-4",children:[(0,eg.jsxs)("div",{children:[(0,eg.jsx)("h3",{className:"text-sm font-medium text-gray-300 mb-2",children:"Shell Configuration"}),(0,eg.jsxs)("select",{className:"w-full bg-gray-800 text-gray-300 border border-gray-700 rounded px-3 py-2",children:[(0,eg.jsx)("option",{value:"bash",children:"Bash"}),(0,eg.jsx)("option",{value:"zsh",children:"Zsh"}),(0,eg.jsx)("option",{value:"powershell",children:"PowerShell"})]})]}),(0,eg.jsxs)("div",{children:[(0,eg.jsx)("h3",{className:"text-sm font-medium text-gray-300 mb-2",children:"Font Size"}),(0,eg.jsx)("input",{type:"number",className:"w-full bg-gray-800 text-gray-300 border border-gray-700 rounded px-3 py-2",defaultValue:14,min:8,max:24})]})]})})]})},YR=t=>{let{requestId:n}=t;const[r,i]=(0,e.useState)([]);return(0,e.useEffect)((()=>{const e=setInterval((async()=>{if(n)try{const e=await fetch(`/api/output/${n}`),t=await e.json();t.logs&&i((e=>[...e,...t.logs]))}catch(e){console.error("Error fetching logs:",e)}}),1e3);return()=>clearInterval(e)}),[n]),(0,eg.jsx)("div",{className:"p-2 text-gray-300 font-mono text-sm whitespace-pre-wrap overflow-auto h-full bg-[#1e1e1e]",children:r.map(((e,t)=>(0,eg.jsx)("div",{children:e},t)))})};var QR=n(123),JR=n.n(QR);const ZR=t=>{let{url:n,allowFullScreen:r,position:i,display:o,height:a,width:s,overflow:l,styles:c,onLoad:u,onMouseOver:d,onMouseOut:h,scrolling:f,id:p,frameBorder:m,ariaHidden:g,sandbox:v,allow:b,className:y,title:_,ariaLabel:S,ariaLabelledby:w,name:C,target:x,loading:E,importance:k,referrerpolicy:O,allowpaymentrequest:$,src:R,key:I}=t;const M=JR()({src:R||n,target:x||null,style:{position:i||null,display:o||"initial",overflow:l||null},scrolling:f||null,allowpaymentrequest:$||null,importance:k||null,sandbox:v&&[...v].join(" ")||null,loading:E||null,styles:c||null,name:C||null,className:y||null,allowFullScreen:"allowFullScreen",referrerpolicy:O||null,title:_||null,allow:b||null,id:p||null,"aria-labelledby":w||null,"aria-hidden":g||null,"aria-label":S||null,width:s||null,height:a||null,onLoad:u||null,onMouseOver:d||null,onMouseOut:h||null,key:I||"iframe"});let P=Object.create(null);for(let e of Object.keys(M))null!=M[e]&&(P[e]=M[e]);for(let e of Object.keys(P.style))null==P.style[e]&&delete P.style[e];if(P.styles)for(let e of Object.keys(P.styles))P.styles.hasOwnProperty(e)&&(P.style[e]=P.styles[e]),Object.keys(P.styles).pop()==e&&delete P.styles;if(r)if("allow"in P){const e=P.allow.replace("fullscreen","");P.allow=`fullscreen ${e.trim()}`.trim()}else P.allow="fullscreen";return m>=0&&(P.style.hasOwnProperty("border")||(P.style.border=m)),e.createElement("iframe",Object.assign({},P))},eI=t=>{let{files:n}=t;const[r,i]=e.useState(0),[o,a]=e.useState(!1),[s,l]=e.useState("http://127.0.0.1:3000"),[c,u]=e.useState(!1),[d,h]=e.useState(!1);(0,e.useEffect)((()=>{a(!0)}),[]);return(0,eg.jsx)("div",{className:"flex flex-col h-full",children:(0,eg.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,eg.jsxs)(VR,{className:"split-container",sizes:d?[10,90]:[50,50],minSize:d?[50,200]:[200,200],gutterSize:8,snapOffset:30,dragInterval:1,direction:"horizontal",cursor:"col-resize",style:{display:"flex",flexDirection:"row",height:"100%"},children:[(0,eg.jsxs)("div",{className:"flex flex-col relative "+(d?"w-[50px]":""),children:[(0,eg.jsx)("button",{onClick:()=>h(!d),className:"absolute -right-4 top-1/2 transform -translate-y-1/2 z-10 bg-gray-700 rounded-full p-1 hover:bg-gray-600 transition-colors",children:d?(0,eg.jsx)(ey,{}):(0,eg.jsx)(VE,{})}),0===n.length?(0,eg.jsx)("div",{className:"w-full flex items-center justify-center text-gray-400",children:"No changes to preview"}):(0,eg.jsxs)(eg.Fragment,{children:[(0,eg.jsx)("div",{className:"flex bg-gray-800",children:n.map(((e,t)=>(0,eg.jsx)("button",{className:"px-4 py-2 text-sm "+(t===r?"bg-gray-700 text-white":"text-gray-300"),onClick:()=>i(t),children:e.path},e.path)))}),(0,eg.jsx)("div",{className:"flex-1",children:(0,eg.jsx)(re,{height:"100%",language:pC(n[r].path),theme:"vs-dark",value:n[r].content,options:{readOnly:!0,minimap:{enabled:!0},fontSize:14,lineNumbers:"on",folding:!0,automaticLayout:!0}})})]})]}),(0,eg.jsxs)("div",{className:"flex flex-col border-l border-gray-700",children:[(0,eg.jsx)("div",{className:"p-2 bg-gray-800",children:(0,eg.jsxs)("div",{className:"flex items-center px-2 py-1 bg-gray-900 rounded-lg border "+(c?"border-blue-500":"border-gray-700"),children:[(0,eg.jsx)("div",{className:"flex items-center px-2 text-gray-400",children:(0,eg.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,eg.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})})}),(0,eg.jsx)("input",{type:"url",value:s,onChange:e=>{l(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),a(!1),setTimeout((()=>a(!0)),100))},onFocus:()=>u(!0),onBlur:()=>u(!1),className:"flex-1 px-2 py-1 bg-transparent text-white text-sm focus:outline-none",placeholder:"Enter URL to preview"}),(0,eg.jsx)("button",{onClick:()=>{a(!1),setTimeout((()=>a(!0)),100)},className:"px-2 text-gray-400 hover:text-white",children:(0,eg.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,eg.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})})]})}),(0,eg.jsx)("div",{className:"flex-1",children:o?(0,eg.jsx)(ZR,{url:s,width:"100%",height:"100%",className:"border-0",display:"block",position:"relative",allowFullScreen:!0}):(0,eg.jsx)("div",{className:"h-full flex items-center justify-center text-gray-400",children:"Enter a URL above to preview web content"})})]})]})})})},tI=()=>{const[t,n]=(0,e.useState)("code"),[r,i]=(0,e.useState)("terminal"),[o,a]=(0,e.useState)(""),[s,l]=(0,e.useState)(""),[c,u]=(0,e.useState)([]),[d,h]=(0,e.useState)("");return(0,e.useEffect)((()=>{fetch("/api/project-path").then((e=>e.json())).then((e=>{const t=e.project_path,n=t?t.split("/").pop():"";l(n)})).catch((e=>console.error("Error fetching project path:",e)))}),[]),(0,eg.jsxs)("div",{className:"h-screen flex bg-gray-900",children:[(0,eg.jsxs)("div",{className:"w-96 border-r border-gray-700 flex flex-col",children:[(0,eg.jsx)("div",{className:"bg-gray-800 p-3 border-b border-gray-700 flex items-center justify-between",children:(0,eg.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,eg.jsx)("span",{className:"text-indigo-500 font-bold text-lg",children:"Auto-Coder"}),(0,eg.jsx)("span",{className:"text-gray-400",children:"|"}),(0,eg.jsxs)("div",{className:"flex items-center",children:[(0,eg.jsx)("span",{className:"text-gray-400 text-sm mr-1",children:" Current Project:"}),(0,eg.jsx)("span",{className:"text-gray-200 text-sm font-medium",children:s||"No Project Selected"})]})]})}),(0,eg.jsx)(tg,{setPreviewFiles:u,setActivePanel:n,setClipboardContent:a,clipboardContent:o,setRequestId:h})]}),(0,eg.jsxs)(VR,{className:"flex-1 flex flex-col",direction:"vertical",sizes:[75,25],minSize:[200,100],gutterSize:8,snapOffset:30,dragInterval:1,cursor:"row-resize",style:{display:"flex",flexDirection:"column"},children:[(0,eg.jsxs)("div",{className:"flex flex-col overflow-hidden",children:[(0,eg.jsx)("div",{className:"bg-gray-800 p-2 border-b border-gray-700",children:(0,eg.jsxs)("div",{className:"flex space-x-2",children:[(0,eg.jsxs)("button",{className:`px-4 py-2.5 rounded-lg text-sm font-medium transition-all duration-300 \n ${"code"===t?"bg-gradient-to-r from-blue-500 to-indigo-600 text-white shadow-md shadow-blue-500/20 hover:shadow-lg hover:shadow-blue-500/30 hover:from-blue-600 hover:to-indigo-700 transform hover:-translate-y-0.5":"bg-gray-800/60 text-gray-400 hover:bg-gray-700/80 hover:text-white hover:shadow-sm"} flex items-center space-x-2`,onClick:()=>n("code"),children:[(0,eg.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,eg.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"})}),(0,eg.jsx)("span",{children:"Code Editor"})]}),(0,eg.jsxs)("button",{className:`px-4 py-2.5 rounded-lg text-sm font-medium transition-all duration-300 \n ${"filegroup"===t?"bg-gradient-to-r from-blue-500 to-indigo-600 text-white shadow-md shadow-blue-500/20 hover:shadow-lg hover:shadow-blue-500/30 hover:from-blue-600 hover:to-indigo-700 transform hover:-translate-y-0.5":"bg-gray-800/60 text-gray-400 hover:bg-gray-700/80 hover:text-white hover:shadow-sm"} flex items-center space-x-2`,onClick:()=>n("filegroup"),children:[(0,eg.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,eg.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})}),(0,eg.jsx)("span",{children:"File Groups"})]}),(0,eg.jsxs)("button",{className:`px-4 py-2.5 rounded-lg text-sm font-medium transition-all duration-300 \n ${"preview"===t?"bg-gradient-to-r from-blue-500 to-indigo-600 text-white shadow-md shadow-blue-500/20 hover:shadow-lg hover:shadow-blue-500/30 hover:from-blue-600 hover:to-indigo-700 transform hover:-translate-y-0.5":"bg-gray-800/60 text-gray-400 hover:bg-gray-700/80 hover:text-white hover:shadow-sm"} flex items-center space-x-2`,onClick:()=>n("preview"),children:[(0,eg.jsxs)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,eg.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),(0,eg.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]}),(0,eg.jsx)("span",{children:"Preview Changes"})]}),(0,eg.jsxs)("button",{className:`px-4 py-2.5 rounded-lg text-sm font-medium transition-all duration-300 \n ${"clipboard"===t?"bg-gradient-to-r from-blue-500 to-indigo-600 text-white shadow-md shadow-blue-500/20 hover:shadow-lg hover:shadow-blue-500/30 hover:from-blue-600 hover:to-indigo-700 transform hover:-translate-y-0.5":"bg-gray-800/60 text-gray-400 hover:bg-gray-700/80 hover:text-white hover:shadow-sm"} flex items-center space-x-2`,onClick:()=>n("clipboard"),children:[(0,eg.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,eg.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})}),(0,eg.jsx)("span",{children:"Clipboard"})]})]})}),(0,eg.jsxs)("div",{className:"flex-1 overflow-hidden",children:[(0,eg.jsx)("div",{className:"h-full "+("code"===t?"block":"hidden"),children:(0,eg.jsx)(mC,{})}),(0,eg.jsx)("div",{className:"h-full "+("filegroup"===t?"block":"hidden"),children:(0,eg.jsx)(pR,{})}),(0,eg.jsx)("div",{className:"h-full "+("clipboard"===t?"block":"hidden"),children:(0,eg.jsx)("div",{className:"h-full p-4",children:(0,eg.jsx)(ne,{theme:"vs-dark",height:"100%",value:o,onChange:e=>a(e||""),defaultLanguage:"plaintext",options:{minimap:{enabled:!1},fontSize:14,lineNumbers:"on",wordWrap:"on",automaticLayout:!0}})})}),(0,eg.jsx)("div",{className:"h-full "+("preview"===t?"block":"hidden"),children:(0,eg.jsx)(eI,{files:c})})]})]}),(0,eg.jsxs)("div",{className:"border-t border-gray-700 flex flex-col overflow-hidden",children:[(0,eg.jsx)("div",{className:"bg-[#1f1f1f] border-b border-gray-700 px-2",children:(0,eg.jsx)("div",{className:"flex items-center gap-1",children:["Output","Terminal"].map(((e,t)=>(0,eg.jsx)("button",{className:"px-3 py-1.5 text-sm rounded-t transition-colors "+(r===e.toLowerCase()?"text-white bg-[#2d2d2d]":"text-gray-400 hover:text-white"),onClick:()=>i(e.toLowerCase()),children:e},e)))})}),(0,eg.jsxs)("div",{className:"flex-1 bg-[#2d2d2d] overflow-auto",children:[(0,eg.jsx)("div",{className:"h-full "+("output"===r?"block":"hidden"),children:(0,eg.jsx)(YR,{requestId:d})}),(0,eg.jsx)("div",{className:"h-full "+("terminal"===r?"block":"hidden"),children:(0,eg.jsx)(GR,{})})]})]})]})]})},nI=e=>{e&&e instanceof Function&&n.e(453).then(n.bind(n,453)).then((t=>{let{getCLS:n,getFID:r,getFCP:i,getLCP:o,getTTFB:a}=t;n(e),r(e),i(e),o(e),a(e)}))};r.createRoot(document.getElementById("root")).render((0,eg.jsx)(e.StrictMode,{children:(0,eg.jsx)(tI,{})})),nI()})()})();
|
3
|
+
//# sourceMappingURL=main.17ff65df.js.map
|