buddy-workbench 0.1.108 → 0.1.109

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.
@@ -64,7 +64,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
64
64
  `);else if($._keyframe)y($);else{var E=p.reduce(function(k,O){var N;return(O==null||(N=O.visit)===null||N===void 0?void 0:N.call(O,k))||k},$);Object.keys(E).forEach(function(k){var O=E[k];if(Rt(O)==="object"&&O&&(k!=="animationName"||!O._keyframe)&&!g_(O)){var N=!1,R=k.trim(),j=!1;(a||o)&&s?R.startsWith("@")?N=!0:R==="&"?R=Zj("",s,f):R=Zj(k,s,f):a&&!s&&(R==="&"||R==="")&&(R="",j=!0);var I=e(O,n,{root:j,injectHash:N,parentSelectors:[].concat(Ge(l),[R])}),M=ye(I,2),P=M[0],A=M[1];v=me(me({},v),A),g+="".concat(R).concat(P)}else{let L=function(D,F){var V=D.replace(/[A-Z]/g,function(B){return"-".concat(B.toLowerCase())}),q=F;!GL[D]&&typeof q=="number"&&q!==0&&(q="".concat(q,"px")),D==="animationName"&&F!==null&&F!==void 0&&F._keyframe&&(y(F),q=F.getName(s)),g+="".concat(V,":").concat(q,";")};var H,T=(H=O==null?void 0:O.value)!==null&&H!==void 0?H:O;Rt(O)==="object"&&O!==null&&O!==void 0&&O[pR]&&Array.isArray(T)?T.forEach(function(D){L(k,D)}):L(k,T)}})}}),a?d&&(g&&(g="@layer ".concat(d.name," {").concat(g,"}")),d.dependencies&&(v["@layer ".concat(d.name)]=d.dependencies.map(function(S){return"@layer ".concat(S,", ").concat(d.name,";")}).join(`
65
65
  `))):g="{".concat(g,"}"),[g,v]};function gR(e,t){return Tm("".concat(e.join("%")).concat(t))}function b_(){return null}var vR="style";function oC(e,t){var n=e.token,r=e.path,a=e.hashId,o=e.layer,l=e.nonce,s=e.clientOnly,d=e.order,f=d===void 0?0:d,h=i.useContext(oh),p=h.autoClear;h.mock;var g=h.defaultCache,v=h.hashPriority,y=h.container,C=h.ssrInline,x=h.transformers,S=h.linters,$=h.cache,E=h.layer,k=n._tokenKey,O=[k];E&&O.push("layer"),O.push.apply(O,Ge(r));var N=tC,R=YS(vR,O,function(){var A=O.join("|");if(m_(A)){var H=h_(A),T=ye(H,2),L=T[0],D=T[1];if(L)return[L,k,D,{},s,f]}var F=t(),V=v_(F,{hashId:a,hashPriority:v,layer:E?o:void 0,path:r.join("-"),transformers:x,linters:S}),q=ye(V,2),B=q[0],U=q[1],K=Rg(B),_=gR(O,K);return[K,k,_,U,s,f]},function(A,H){var T=ye(A,3),L=T[2];(H||p)&&tC&&Pm(L,{mark:xi,attachTo:y})},function(A){var H=ye(A,4),T=H[0];H[1];var L=H[2],D=H[3];if(N&&T!==mR){var F={mark:xi,prepend:E?!1:"queue",attachTo:y,priority:f},V=typeof l=="function"?l():l;V&&(F.csp={nonce:V});var q=[],B=[];Object.keys(D).forEach(function(K){K.startsWith("@layer")?q.push(K):B.push(K)}),q.forEach(function(K){Cl(Rg(D[K]),"_layer-".concat(K),me(me({},F),{},{prepend:!0}))});var U=Cl(T,L,F);U[ps]=$.instanceId,U.setAttribute(md,k),B.forEach(function(K){Cl(Rg(D[K]),"_effect-".concat(K),F)})}}),j=ye(R,3),I=j[0],M=j[1],P=j[2];return function(A){var H;return!C||N||!g?H=i.createElement(b_,null):H=i.createElement("style",Me({},se(se({},md,M),xi,P),{dangerouslySetInnerHTML:{__html:I}})),i.createElement(i.Fragment,null,H,A)}}var y_=function(t,n,r){var a=ye(t,6),o=a[0],l=a[1],s=a[2],d=a[3],f=a[4],h=a[5],p=r||{},g=p.plain;if(f)return null;var v=o,y={"data-rc-order":"prependQueue","data-rc-priority":"".concat(h)};return v=nv(o,l,s,y,g),d&&Object.keys(d).forEach(function(C){if(!n[C]){n[C]=!0;var x=Rg(d[C]),S=nv(x,l,"_effect-".concat(C),y,g);C.startsWith("@layer")?v=S+v:v+=S}}),[h,s,v]},bR="cssVar",x_=function(t,n){var r=t.key,a=t.prefix,o=t.unitless,l=t.ignore,s=t.token,d=t.scope,f=d===void 0?"":d,h=i.useContext(oh),p=h.cache.instanceId,g=h.container,v=s._tokenKey,y=[].concat(Ge(t.path),[r,f,v]),C=YS(bR,y,function(){var x=n(),S=iR(x,r,{prefix:a,unitless:o,ignore:l,scope:f}),$=ye(S,2),E=$[0],k=$[1],O=gR(y,k);return[E,k,O,r]},function(x){var S=ye(x,3),$=S[2];tC&&Pm($,{mark:xi,attachTo:g})},function(x){var S=ye(x,3),$=S[1],E=S[2];if($){var k=Cl($,E,{mark:xi,prepend:"queue",attachTo:g,priority:-999});k[ps]=p,k.setAttribute(md,r)}});return C},C_=function(t,n,r){var a=ye(t,4),o=a[1],l=a[2],s=a[3],d=r||{},f=d.plain;if(!o)return null;var h=-999,p={"data-rc-order":"prependQueue","data-rc-priority":"".concat(h)},g=nv(o,s,l,p,f);return[h,l,g]};se(se(se({},vR,y_),lR,KL),bR,C_);var sn=(function(){function e(t,n){Mr(this,e),se(this,"name",void 0),se(this,"style",void 0),se(this,"_keyframe",!0),this.name=t,this.style=n}return Tr(e,[{key:"getName",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return n?"".concat(n,"-").concat(this.name):this.name}}]),e})();function Tu(e){return e.notSplit=!0,e}Tu(["borderTop","borderBottom"]),Tu(["borderTop"]),Tu(["borderBottom"]),Tu(["borderLeft","borderRight"]),Tu(["borderLeft"]),Tu(["borderRight"]);var QS=i.createContext({});function yR(e){return eR(e)||Yk(e)||qS(e)||tR()}function eo(e,t){for(var n=e,r=0;r<t.length;r+=1){if(n==null)return;n=n[t[r]]}return n}function xR(e,t,n,r){if(!t.length)return n;var a=yR(t),o=a[0],l=a.slice(1),s;return!e&&typeof o=="number"?s=[]:Array.isArray(e)?s=Ge(e):s=me({},e),r&&n===void 0&&l.length===1?delete s[o][l[0]]:s[o]=xR(s[o],l,n,r),s}function ri(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return t.length&&r&&n===void 0&&!eo(e,t.slice(0,-1))?e:xR(e,t,n,r)}function S_(e){return Rt(e)==="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function e3(e){return Array.isArray(e)?[]:{}}var w_=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function Qu(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=e3(t[0]);return t.forEach(function(a){function o(l,s){var d=new Set(s),f=eo(a,l),h=Array.isArray(f);if(h||S_(f)){if(!d.has(f)){d.add(f);var p=eo(r,l);h?r=ri(r,l,[]):(!p||Rt(p)!=="object")&&(r=ri(r,l,e3(f))),w_(f).forEach(function(g){o([].concat(Ge(l),[g]),d)})}}else r=ri(r,l,f)}o([])}),r}function $_(){}const E_=i.createContext({}),Qi=()=>{const e=()=>{};return e.deprecated=$_,e},CR=i.createContext(void 0);var SR={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"},j_={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},N_=me(me({},j_),{},{locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",week:"Week",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"});const wR={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},rv={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"]},N_),timePickerLocale:Object.assign({},wR)},Oo="${label} is not a valid ${type}",ci={locale:"en",Pagination:SR,DatePicker:rv,TimePicker:wR,Calendar:rv,global:{placeholder:"Please select",close:"Close"},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:Oo,method:Oo,array:Oo,object:Oo,number:Oo,date:Oo,boolean:Oo,integer:Oo,float:Oo,regexp:Oo,email:Oo,url:Oo,hex:Oo},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 Ig=Object.assign({},ci.Modal),Mg=[];const t3=()=>Mg.reduce((e,t)=>Object.assign(Object.assign({},e),t),ci.Modal);function O_(e){if(e){const t=Object.assign({},e);return Mg.push(t),Ig=t3(),()=>{Mg=Mg.filter(n=>n!==t),Ig=t3()}}Ig=Object.assign({},ci.Modal)}function $R(){return Ig}const ZS=i.createContext(void 0),ro=(e,t)=>{const n=i.useContext(ZS),r=i.useMemo(()=>{var o;const l=t||ci[e],s=(o=n==null?void 0:n[e])!==null&&o!==void 0?o:{};return Object.assign(Object.assign({},typeof l=="function"?l():l),s||{})},[e,t,n]),a=i.useMemo(()=>{const o=n==null?void 0:n.locale;return n!=null&&n.exist&&!o?ci.locale:o},[n]);return[r,a]},k_="internalMark",R_=e=>{const{locale:t={},children:n,_ANT_MARK__:r}=e;i.useEffect(()=>O_(t==null?void 0:t.Modal),[t]);const a=i.useMemo(()=>Object.assign(Object.assign({},t),{exist:!0}),[t]);return i.createElement(ZS.Provider,{value:a},n)},ER={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"},zm=Object.assign(Object.assign({},ER),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
66
66
  'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
67
- '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}),ja=Math.round;function r1(e,t){const n=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map(a=>parseFloat(a));for(let a=0;a<3;a+=1)r[a]=t(r[a]||0,n[a]||"",a);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const n3=(e,t,n)=>n===0?e:e/100;function _f(e,t){const n=t||255;return e>n?n:e<0?0:e}class gn{constructor(t){se(this,"isValid",!0),se(this,"r",0),se(this,"g",0),se(this,"b",0),se(this,"a",1),se(this,"_h",void 0),se(this,"_s",void 0),se(this,"_l",void 0),se(this,"_v",void 0),se(this,"_max",void 0),se(this,"_min",void 0),se(this,"_brightness",void 0);function n(r){return r[0]in t&&r[1]in t&&r[2]in t}if(t)if(typeof t=="string"){let a=function(o){return r.startsWith(o)};const r=t.trim();/^#?[A-F\d]{3,8}$/i.test(r)?this.fromHexString(r):a("rgb")?this.fromRgbString(r):a("hsl")?this.fromHslString(r):(a("hsv")||a("hsb"))&&this.fromHsvString(r)}else if(t instanceof gn)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(n("rgb"))this.r=_f(t.r),this.g=_f(t.g),this.b=_f(t.b),this.a=typeof t.a=="number"?_f(t.a,1):1;else if(n("hsl"))this.fromHsl(t);else if(n("hsv"))this.fromHsv(t);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t))}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){const n=this.toHsv();return n.h=t,this._c(n)}getLuminance(){function t(o){const l=o/255;return l<=.03928?l/12.92:Math.pow((l+.055)/1.055,2.4)}const n=t(this.r),r=t(this.g),a=t(this.b);return .2126*n+.7152*r+.0722*a}getHue(){if(typeof this._h>"u"){const t=this.getMax()-this.getMin();t===0?this._h=0:this._h=ja(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/t+2:(this.r-this.g)/t+4))}return this._h}getSaturation(){if(typeof this._s>"u"){const t=this.getMax()-this.getMin();t===0?this._s=0:this._s=t/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(t=10){const n=this.getHue(),r=this.getSaturation();let a=this.getLightness()-t/100;return a<0&&(a=0),this._c({h:n,s:r,l:a,a:this.a})}lighten(t=10){const n=this.getHue(),r=this.getSaturation();let a=this.getLightness()+t/100;return a>1&&(a=1),this._c({h:n,s:r,l:a,a:this.a})}mix(t,n=50){const r=this._c(t),a=n/100,o=s=>(r[s]-this[s])*a+this[s],l={r:ja(o("r")),g:ja(o("g")),b:ja(o("b")),a:ja(o("a")*100)/100};return this._c(l)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){const n=this._c(t),r=this.a+n.a*(1-this.a),a=o=>ja((this[o]*this.a+n[o]*n.a*(1-this.a))/r);return this._c({r:a("r"),g:a("g"),b:a("b"),a:r})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#";const n=(this.r||0).toString(16);t+=n.length===2?n:"0"+n;const r=(this.g||0).toString(16);t+=r.length===2?r:"0"+r;const a=(this.b||0).toString(16);if(t+=a.length===2?a:"0"+a,typeof this.a=="number"&&this.a>=0&&this.a<1){const o=ja(this.a*255).toString(16);t+=o.length===2?o:"0"+o}return t}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),n=ja(this.getSaturation()*100),r=ja(this.getLightness()*100);return this.a!==1?`hsla(${t},${n}%,${r}%,${this.a})`:`hsl(${t},${n}%,${r}%)`}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 this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,n,r){const a=this.clone();return a[t]=_f(n,r),a}_c(t){return new this.constructor(t)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){const n=t.replace("#","");function r(a,o){return parseInt(n[a]+n[o||a],16)}n.length<6?(this.r=r(0),this.g=r(1),this.b=r(2),this.a=n[3]?r(3)/255:1):(this.r=r(0,1),this.g=r(2,3),this.b=r(4,5),this.a=n[6]?r(6,7)/255:1)}fromHsl({h:t,s:n,l:r,a}){if(this._h=t%360,this._s=n,this._l=r,this.a=typeof a=="number"?a:1,n<=0){const g=ja(r*255);this.r=g,this.g=g,this.b=g}let o=0,l=0,s=0;const d=t/60,f=(1-Math.abs(2*r-1))*n,h=f*(1-Math.abs(d%2-1));d>=0&&d<1?(o=f,l=h):d>=1&&d<2?(o=h,l=f):d>=2&&d<3?(l=f,s=h):d>=3&&d<4?(l=h,s=f):d>=4&&d<5?(o=h,s=f):d>=5&&d<6&&(o=f,s=h);const p=r-f/2;this.r=ja((o+p)*255),this.g=ja((l+p)*255),this.b=ja((s+p)*255)}fromHsv({h:t,s:n,v:r,a}){this._h=t%360,this._s=n,this._v=r,this.a=typeof a=="number"?a:1;const o=ja(r*255);if(this.r=o,this.g=o,this.b=o,n<=0)return;const l=t/60,s=Math.floor(l),d=l-s,f=ja(r*(1-n)*255),h=ja(r*(1-n*d)*255),p=ja(r*(1-n*(1-d))*255);switch(s){case 0:this.g=p,this.b=f;break;case 1:this.r=h,this.b=f;break;case 2:this.r=f,this.b=p;break;case 3:this.r=f,this.g=h;break;case 4:this.r=p,this.g=f;break;case 5:default:this.g=f,this.b=h;break}}fromHsvString(t){const n=r1(t,n3);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]})}fromHslString(t){const n=r1(t,n3);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]})}fromRgbString(t){const n=r1(t,(r,a)=>a.includes("%")?ja(r/100*255):r);this.r=n[0],this.g=n[1],this.b=n[2],this.a=n[3]}}var Fp=2,r3=.16,I_=.05,M_=.05,T_=.15,jR=5,NR=4,P_=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function a3(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-Fp*t:Math.round(e.h)+Fp*t:r=n?Math.round(e.h)+Fp*t:Math.round(e.h)-Fp*t,r<0?r+=360:r>=360&&(r-=360),r}function o3(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-r3*t:t===NR?r=e.s+r3:r=e.s+I_*t,r>1&&(r=1),n&&t===jR&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(r*100)/100}function i3(e,t,n){var r;return n?r=e.v+M_*t:r=e.v-T_*t,r=Math.max(0,Math.min(1,r)),Math.round(r*100)/100}function Am(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=new gn(e),a=r.toHsv(),o=jR;o>0;o-=1){var l=new gn({h:a3(a,o,!0),s:o3(a,o,!0),v:i3(a,o,!0)});n.push(l)}n.push(r);for(var s=1;s<=NR;s+=1){var d=new gn({h:a3(a,s),s:o3(a,s),v:i3(a,s)});n.push(d)}return t.theme==="dark"?P_.map(function(f){var h=f.index,p=f.amount;return new gn(t.backgroundColor||"#141414").mix(n[h],p).toHexString()}):n.map(function(f){return f.toHexString()})}var od={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"},iC=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];iC.primary=iC[5];var lC=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];lC.primary=lC[5];var sC=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];sC.primary=sC[5];var av=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];av.primary=av[5];var cC=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];cC.primary=cC[5];var uC=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];uC.primary=uC[5];var dC=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];dC.primary=dC[5];var fC=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];fC.primary=fC[5];var gd=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];gd.primary=gd[5];var mC=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];mC.primary=mC[5];var hC=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];hC.primary=hC[5];var pC=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];pC.primary=pC[5];var gC=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];gC.primary=gC[5];var a1={red:iC,volcano:lC,orange:sC,gold:av,yellow:cC,lime:uC,green:dC,cyan:fC,blue:gd,geekblue:mC,purple:hC,magenta:pC,grey:gC};function D_(e,{generateColorPalettes:t,generateNeutralColorPalettes:n}){const{colorSuccess:r,colorWarning:a,colorError:o,colorInfo:l,colorPrimary:s,colorBgBase:d,colorTextBase:f}=e,h=t(s),p=t(r),g=t(a),v=t(o),y=t(l),C=n(d,f),x=e.colorLink||e.colorInfo,S=t(x),$=new gn(v[1]).mix(new gn(v[3]),50).toHexString();return Object.assign(Object.assign({},C),{colorPrimaryBg:h[1],colorPrimaryBgHover:h[2],colorPrimaryBorder:h[3],colorPrimaryBorderHover:h[4],colorPrimaryHover:h[5],colorPrimary:h[6],colorPrimaryActive:h[7],colorPrimaryTextHover:h[8],colorPrimaryText:h[9],colorPrimaryTextActive:h[10],colorSuccessBg:p[1],colorSuccessBgHover:p[2],colorSuccessBorder:p[3],colorSuccessBorderHover:p[4],colorSuccessHover:p[4],colorSuccess:p[6],colorSuccessActive:p[7],colorSuccessTextHover:p[8],colorSuccessText:p[9],colorSuccessTextActive:p[10],colorErrorBg:v[1],colorErrorBgHover:v[2],colorErrorBgFilledHover:$,colorErrorBgActive:v[3],colorErrorBorder:v[3],colorErrorBorderHover:v[4],colorErrorHover:v[5],colorError:v[6],colorErrorActive:v[7],colorErrorTextHover:v[8],colorErrorText:v[9],colorErrorTextActive:v[10],colorWarningBg:g[1],colorWarningBgHover:g[2],colorWarningBorder:g[3],colorWarningBorderHover:g[4],colorWarningHover:g[4],colorWarning:g[6],colorWarningActive:g[7],colorWarningTextHover:g[8],colorWarningText:g[9],colorWarningTextActive:g[10],colorInfoBg:y[1],colorInfoBgHover:y[2],colorInfoBorder:y[3],colorInfoBorderHover:y[4],colorInfoHover:y[4],colorInfo:y[6],colorInfoActive:y[7],colorInfoTextHover:y[8],colorInfoText:y[9],colorInfoTextActive:y[10],colorLinkHover:S[4],colorLink:S[6],colorLinkActive:S[7],colorBgMask:new gn("#000").setA(.45).toRgbString(),colorWhite:"#fff"})}const z_=e=>{let t=e,n=e,r=e,a=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?a=4:e>=8&&(a=6),{borderRadius:e,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:a}};function A_(e){const{motionUnit:t,motionBase:n,borderRadius:r,lineWidth:a}=e;return Object.assign({motionDurationFast:`${(n+t).toFixed(1)}s`,motionDurationMid:`${(n+t*2).toFixed(1)}s`,motionDurationSlow:`${(n+t*3).toFixed(1)}s`,lineWidthBold:a+1},z_(r))}const L_=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}};function Tg(e){return(e+8)/e}function __(e){const t=Array.from({length:10}).map((n,r)=>{const a=r-1,o=e*Math.pow(Math.E,a/5),l=r>1?Math.floor(o):Math.ceil(o);return Math.floor(l/2)*2});return t[1]=e,t.map(n=>({size:n,lineHeight:Tg(n)}))}const B_=e=>{const t=__(e),n=t.map(h=>h.size),r=t.map(h=>h.lineHeight),a=n[1],o=n[0],l=n[2],s=r[1],d=r[0],f=r[2];return{fontSizeSM:o,fontSize:a,fontSizeLG:l,fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:s,lineHeightLG:f,lineHeightSM:d,fontHeight:Math.round(s*a),fontHeightLG:Math.round(f*l),fontHeightSM:Math.round(d*o),lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}};function F_(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)}}const Qo=(e,t)=>new gn(e).setA(t).toRgbString(),Bf=(e,t)=>new gn(e).darken(t).toHexString(),H_=e=>{const t=Am(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]}},V_=(e,t)=>{const n=e||"#fff",r=t||"#000";return{colorBgBase:n,colorTextBase:r,colorText:Qo(r,.88),colorTextSecondary:Qo(r,.65),colorTextTertiary:Qo(r,.45),colorTextQuaternary:Qo(r,.25),colorFill:Qo(r,.15),colorFillSecondary:Qo(r,.06),colorFillTertiary:Qo(r,.04),colorFillQuaternary:Qo(r,.02),colorBgSolid:Qo(r,1),colorBgSolidHover:Qo(r,.75),colorBgSolidActive:Qo(r,.95),colorBgLayout:Bf(n,4),colorBgContainer:Bf(n,0),colorBgElevated:Bf(n,0),colorBgSpotlight:Qo(r,.85),colorBgBlur:"transparent",colorBorder:Bf(n,15),colorBorderSecondary:Bf(n,6)}};function W_(e){od.pink=od.magenta,a1.pink=a1.magenta;const t=Object.keys(ER).map(n=>{const r=e[n]===od[n]?a1[n]:Am(e[n]);return Array.from({length:10},()=>1).reduce((a,o,l)=>(a[`${n}-${l+1}`]=r[l],a[`${n}${l+1}`]=r[l],a),{})}).reduce((n,r)=>(n=Object.assign(Object.assign({},n),r),n),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),t),D_(e,{generateColorPalettes:H_,generateNeutralColorPalettes:V_})),B_(e.fontSize)),F_(e)),L_(e)),A_(e))}const OR=eC(W_),vC={token:zm,override:{override:zm},hashed:!0},kR=we.createContext(vC),Lm="ant",Fv="anticon",U_=["outlined","borderless","filled","underlined"],q_=(e,t)=>t||(e?`${Lm}-${e}`:Lm),Tt=i.createContext({getPrefixCls:q_,iconPrefixCls:Fv}),{Consumer:Bwe}=Tt,l3={};function pr(e){const t=i.useContext(Tt),{getPrefixCls:n,direction:r,getPopupContainer:a}=t,o=t[e];return Object.assign(Object.assign({classNames:l3,styles:l3},o),{getPrefixCls:n,direction:r,getPopupContainer:a})}const K_=`-ant-${Date.now()}-${Math.random()}`;function G_(e,t){const n={},r=(l,s)=>{let d=l.clone();return d=(s==null?void 0:s(d))||d,d.toRgbString()},a=(l,s)=>{const d=new gn(l),f=Am(d.toRgbString());n[`${s}-color`]=r(d),n[`${s}-color-disabled`]=f[1],n[`${s}-color-hover`]=f[4],n[`${s}-color-active`]=f[6],n[`${s}-color-outline`]=d.clone().setA(.2).toRgbString(),n[`${s}-color-deprecated-bg`]=f[0],n[`${s}-color-deprecated-border`]=f[2]};if(t.primaryColor){a(t.primaryColor,"primary");const l=new gn(t.primaryColor),s=Am(l.toRgbString());s.forEach((f,h)=>{n[`primary-${h+1}`]=f}),n["primary-color-deprecated-l-35"]=r(l,f=>f.lighten(35)),n["primary-color-deprecated-l-20"]=r(l,f=>f.lighten(20)),n["primary-color-deprecated-t-20"]=r(l,f=>f.tint(20)),n["primary-color-deprecated-t-50"]=r(l,f=>f.tint(50)),n["primary-color-deprecated-f-12"]=r(l,f=>f.setA(f.a*.12));const d=new gn(s[0]);n["primary-color-active-deprecated-f-30"]=r(d,f=>f.setA(f.a*.3)),n["primary-color-active-deprecated-d-02"]=r(d,f=>f.darken(2))}return t.successColor&&a(t.successColor,"success"),t.warningColor&&a(t.warningColor,"warning"),t.errorColor&&a(t.errorColor,"error"),t.infoColor&&a(t.infoColor,"info"),`
67
+ '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}),ja=Math.round;function r1(e,t){const n=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map(a=>parseFloat(a));for(let a=0;a<3;a+=1)r[a]=t(r[a]||0,n[a]||"",a);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const n3=(e,t,n)=>n===0?e:e/100;function _f(e,t){const n=t||255;return e>n?n:e<0?0:e}class gn{constructor(t){se(this,"isValid",!0),se(this,"r",0),se(this,"g",0),se(this,"b",0),se(this,"a",1),se(this,"_h",void 0),se(this,"_s",void 0),se(this,"_l",void 0),se(this,"_v",void 0),se(this,"_max",void 0),se(this,"_min",void 0),se(this,"_brightness",void 0);function n(r){return r[0]in t&&r[1]in t&&r[2]in t}if(t)if(typeof t=="string"){let a=function(o){return r.startsWith(o)};const r=t.trim();/^#?[A-F\d]{3,8}$/i.test(r)?this.fromHexString(r):a("rgb")?this.fromRgbString(r):a("hsl")?this.fromHslString(r):(a("hsv")||a("hsb"))&&this.fromHsvString(r)}else if(t instanceof gn)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(n("rgb"))this.r=_f(t.r),this.g=_f(t.g),this.b=_f(t.b),this.a=typeof t.a=="number"?_f(t.a,1):1;else if(n("hsl"))this.fromHsl(t);else if(n("hsv"))this.fromHsv(t);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t))}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){const n=this.toHsv();return n.h=t,this._c(n)}getLuminance(){function t(o){const l=o/255;return l<=.03928?l/12.92:Math.pow((l+.055)/1.055,2.4)}const n=t(this.r),r=t(this.g),a=t(this.b);return .2126*n+.7152*r+.0722*a}getHue(){if(typeof this._h>"u"){const t=this.getMax()-this.getMin();t===0?this._h=0:this._h=ja(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/t+2:(this.r-this.g)/t+4))}return this._h}getSaturation(){if(typeof this._s>"u"){const t=this.getMax()-this.getMin();t===0?this._s=0:this._s=t/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(t=10){const n=this.getHue(),r=this.getSaturation();let a=this.getLightness()-t/100;return a<0&&(a=0),this._c({h:n,s:r,l:a,a:this.a})}lighten(t=10){const n=this.getHue(),r=this.getSaturation();let a=this.getLightness()+t/100;return a>1&&(a=1),this._c({h:n,s:r,l:a,a:this.a})}mix(t,n=50){const r=this._c(t),a=n/100,o=s=>(r[s]-this[s])*a+this[s],l={r:ja(o("r")),g:ja(o("g")),b:ja(o("b")),a:ja(o("a")*100)/100};return this._c(l)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){const n=this._c(t),r=this.a+n.a*(1-this.a),a=o=>ja((this[o]*this.a+n[o]*n.a*(1-this.a))/r);return this._c({r:a("r"),g:a("g"),b:a("b"),a:r})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#";const n=(this.r||0).toString(16);t+=n.length===2?n:"0"+n;const r=(this.g||0).toString(16);t+=r.length===2?r:"0"+r;const a=(this.b||0).toString(16);if(t+=a.length===2?a:"0"+a,typeof this.a=="number"&&this.a>=0&&this.a<1){const o=ja(this.a*255).toString(16);t+=o.length===2?o:"0"+o}return t}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),n=ja(this.getSaturation()*100),r=ja(this.getLightness()*100);return this.a!==1?`hsla(${t},${n}%,${r}%,${this.a})`:`hsl(${t},${n}%,${r}%)`}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 this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,n,r){const a=this.clone();return a[t]=_f(n,r),a}_c(t){return new this.constructor(t)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){const n=t.replace("#","");function r(a,o){return parseInt(n[a]+n[o||a],16)}n.length<6?(this.r=r(0),this.g=r(1),this.b=r(2),this.a=n[3]?r(3)/255:1):(this.r=r(0,1),this.g=r(2,3),this.b=r(4,5),this.a=n[6]?r(6,7)/255:1)}fromHsl({h:t,s:n,l:r,a}){if(this._h=t%360,this._s=n,this._l=r,this.a=typeof a=="number"?a:1,n<=0){const g=ja(r*255);this.r=g,this.g=g,this.b=g}let o=0,l=0,s=0;const d=t/60,f=(1-Math.abs(2*r-1))*n,h=f*(1-Math.abs(d%2-1));d>=0&&d<1?(o=f,l=h):d>=1&&d<2?(o=h,l=f):d>=2&&d<3?(l=f,s=h):d>=3&&d<4?(l=h,s=f):d>=4&&d<5?(o=h,s=f):d>=5&&d<6&&(o=f,s=h);const p=r-f/2;this.r=ja((o+p)*255),this.g=ja((l+p)*255),this.b=ja((s+p)*255)}fromHsv({h:t,s:n,v:r,a}){this._h=t%360,this._s=n,this._v=r,this.a=typeof a=="number"?a:1;const o=ja(r*255);if(this.r=o,this.g=o,this.b=o,n<=0)return;const l=t/60,s=Math.floor(l),d=l-s,f=ja(r*(1-n)*255),h=ja(r*(1-n*d)*255),p=ja(r*(1-n*(1-d))*255);switch(s){case 0:this.g=p,this.b=f;break;case 1:this.r=h,this.b=f;break;case 2:this.r=f,this.b=p;break;case 3:this.r=f,this.g=h;break;case 4:this.r=p,this.g=f;break;case 5:default:this.g=f,this.b=h;break}}fromHsvString(t){const n=r1(t,n3);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]})}fromHslString(t){const n=r1(t,n3);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]})}fromRgbString(t){const n=r1(t,(r,a)=>a.includes("%")?ja(r/100*255):r);this.r=n[0],this.g=n[1],this.b=n[2],this.a=n[3]}}var Fp=2,r3=.16,I_=.05,M_=.05,T_=.15,jR=5,NR=4,P_=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function a3(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-Fp*t:Math.round(e.h)+Fp*t:r=n?Math.round(e.h)+Fp*t:Math.round(e.h)-Fp*t,r<0?r+=360:r>=360&&(r-=360),r}function o3(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-r3*t:t===NR?r=e.s+r3:r=e.s+I_*t,r>1&&(r=1),n&&t===jR&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(r*100)/100}function i3(e,t,n){var r;return n?r=e.v+M_*t:r=e.v-T_*t,r=Math.max(0,Math.min(1,r)),Math.round(r*100)/100}function Am(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=new gn(e),a=r.toHsv(),o=jR;o>0;o-=1){var l=new gn({h:a3(a,o,!0),s:o3(a,o,!0),v:i3(a,o,!0)});n.push(l)}n.push(r);for(var s=1;s<=NR;s+=1){var d=new gn({h:a3(a,s),s:o3(a,s),v:i3(a,s)});n.push(d)}return t.theme==="dark"?P_.map(function(f){var h=f.index,p=f.amount;return new gn(t.backgroundColor||"#141414").mix(n[h],p).toHexString()}):n.map(function(f){return f.toHexString()})}var od={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"},iC=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];iC.primary=iC[5];var lC=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];lC.primary=lC[5];var sC=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];sC.primary=sC[5];var av=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];av.primary=av[5];var cC=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];cC.primary=cC[5];var uC=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];uC.primary=uC[5];var dC=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];dC.primary=dC[5];var fC=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];fC.primary=fC[5];var gd=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];gd.primary=gd[5];var mC=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];mC.primary=mC[5];var hC=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];hC.primary=hC[5];var pC=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];pC.primary=pC[5];var gC=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];gC.primary=gC[5];var a1={red:iC,volcano:lC,orange:sC,gold:av,yellow:cC,lime:uC,green:dC,cyan:fC,blue:gd,geekblue:mC,purple:hC,magenta:pC,grey:gC};function D_(e,{generateColorPalettes:t,generateNeutralColorPalettes:n}){const{colorSuccess:r,colorWarning:a,colorError:o,colorInfo:l,colorPrimary:s,colorBgBase:d,colorTextBase:f}=e,h=t(s),p=t(r),g=t(a),v=t(o),y=t(l),C=n(d,f),x=e.colorLink||e.colorInfo,S=t(x),$=new gn(v[1]).mix(new gn(v[3]),50).toHexString();return Object.assign(Object.assign({},C),{colorPrimaryBg:h[1],colorPrimaryBgHover:h[2],colorPrimaryBorder:h[3],colorPrimaryBorderHover:h[4],colorPrimaryHover:h[5],colorPrimary:h[6],colorPrimaryActive:h[7],colorPrimaryTextHover:h[8],colorPrimaryText:h[9],colorPrimaryTextActive:h[10],colorSuccessBg:p[1],colorSuccessBgHover:p[2],colorSuccessBorder:p[3],colorSuccessBorderHover:p[4],colorSuccessHover:p[4],colorSuccess:p[6],colorSuccessActive:p[7],colorSuccessTextHover:p[8],colorSuccessText:p[9],colorSuccessTextActive:p[10],colorErrorBg:v[1],colorErrorBgHover:v[2],colorErrorBgFilledHover:$,colorErrorBgActive:v[3],colorErrorBorder:v[3],colorErrorBorderHover:v[4],colorErrorHover:v[5],colorError:v[6],colorErrorActive:v[7],colorErrorTextHover:v[8],colorErrorText:v[9],colorErrorTextActive:v[10],colorWarningBg:g[1],colorWarningBgHover:g[2],colorWarningBorder:g[3],colorWarningBorderHover:g[4],colorWarningHover:g[4],colorWarning:g[6],colorWarningActive:g[7],colorWarningTextHover:g[8],colorWarningText:g[9],colorWarningTextActive:g[10],colorInfoBg:y[1],colorInfoBgHover:y[2],colorInfoBorder:y[3],colorInfoBorderHover:y[4],colorInfoHover:y[4],colorInfo:y[6],colorInfoActive:y[7],colorInfoTextHover:y[8],colorInfoText:y[9],colorInfoTextActive:y[10],colorLinkHover:S[4],colorLink:S[6],colorLinkActive:S[7],colorBgMask:new gn("#000").setA(.45).toRgbString(),colorWhite:"#fff"})}const z_=e=>{let t=e,n=e,r=e,a=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?a=4:e>=8&&(a=6),{borderRadius:e,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:a}};function A_(e){const{motionUnit:t,motionBase:n,borderRadius:r,lineWidth:a}=e;return Object.assign({motionDurationFast:`${(n+t).toFixed(1)}s`,motionDurationMid:`${(n+t*2).toFixed(1)}s`,motionDurationSlow:`${(n+t*3).toFixed(1)}s`,lineWidthBold:a+1},z_(r))}const L_=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}};function Tg(e){return(e+8)/e}function __(e){const t=Array.from({length:10}).map((n,r)=>{const a=r-1,o=e*Math.pow(Math.E,a/5),l=r>1?Math.floor(o):Math.ceil(o);return Math.floor(l/2)*2});return t[1]=e,t.map(n=>({size:n,lineHeight:Tg(n)}))}const B_=e=>{const t=__(e),n=t.map(h=>h.size),r=t.map(h=>h.lineHeight),a=n[1],o=n[0],l=n[2],s=r[1],d=r[0],f=r[2];return{fontSizeSM:o,fontSize:a,fontSizeLG:l,fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:s,lineHeightLG:f,lineHeightSM:d,fontHeight:Math.round(s*a),fontHeightLG:Math.round(f*l),fontHeightSM:Math.round(d*o),lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}};function F_(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)}}const Qo=(e,t)=>new gn(e).setA(t).toRgbString(),Bf=(e,t)=>new gn(e).darken(t).toHexString(),H_=e=>{const t=Am(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]}},V_=(e,t)=>{const n=e||"#fff",r=t||"#000";return{colorBgBase:n,colorTextBase:r,colorText:Qo(r,.88),colorTextSecondary:Qo(r,.65),colorTextTertiary:Qo(r,.45),colorTextQuaternary:Qo(r,.25),colorFill:Qo(r,.15),colorFillSecondary:Qo(r,.06),colorFillTertiary:Qo(r,.04),colorFillQuaternary:Qo(r,.02),colorBgSolid:Qo(r,1),colorBgSolidHover:Qo(r,.75),colorBgSolidActive:Qo(r,.95),colorBgLayout:Bf(n,4),colorBgContainer:Bf(n,0),colorBgElevated:Bf(n,0),colorBgSpotlight:Qo(r,.85),colorBgBlur:"transparent",colorBorder:Bf(n,15),colorBorderSecondary:Bf(n,6)}};function W_(e){od.pink=od.magenta,a1.pink=a1.magenta;const t=Object.keys(ER).map(n=>{const r=e[n]===od[n]?a1[n]:Am(e[n]);return Array.from({length:10},()=>1).reduce((a,o,l)=>(a[`${n}-${l+1}`]=r[l],a[`${n}${l+1}`]=r[l],a),{})}).reduce((n,r)=>(n=Object.assign(Object.assign({},n),r),n),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),t),D_(e,{generateColorPalettes:H_,generateNeutralColorPalettes:V_})),B_(e.fontSize)),F_(e)),L_(e)),A_(e))}const OR=eC(W_),vC={token:zm,override:{override:zm},hashed:!0},kR=we.createContext(vC),Lm="ant",Fv="anticon",U_=["outlined","borderless","filled","underlined"],q_=(e,t)=>t||(e?`${Lm}-${e}`:Lm),Tt=i.createContext({getPrefixCls:q_,iconPrefixCls:Fv}),{Consumer:Vwe}=Tt,l3={};function pr(e){const t=i.useContext(Tt),{getPrefixCls:n,direction:r,getPopupContainer:a}=t,o=t[e];return Object.assign(Object.assign({classNames:l3,styles:l3},o),{getPrefixCls:n,direction:r,getPopupContainer:a})}const K_=`-ant-${Date.now()}-${Math.random()}`;function G_(e,t){const n={},r=(l,s)=>{let d=l.clone();return d=(s==null?void 0:s(d))||d,d.toRgbString()},a=(l,s)=>{const d=new gn(l),f=Am(d.toRgbString());n[`${s}-color`]=r(d),n[`${s}-color-disabled`]=f[1],n[`${s}-color-hover`]=f[4],n[`${s}-color-active`]=f[6],n[`${s}-color-outline`]=d.clone().setA(.2).toRgbString(),n[`${s}-color-deprecated-bg`]=f[0],n[`${s}-color-deprecated-border`]=f[2]};if(t.primaryColor){a(t.primaryColor,"primary");const l=new gn(t.primaryColor),s=Am(l.toRgbString());s.forEach((f,h)=>{n[`primary-${h+1}`]=f}),n["primary-color-deprecated-l-35"]=r(l,f=>f.lighten(35)),n["primary-color-deprecated-l-20"]=r(l,f=>f.lighten(20)),n["primary-color-deprecated-t-20"]=r(l,f=>f.tint(20)),n["primary-color-deprecated-t-50"]=r(l,f=>f.tint(50)),n["primary-color-deprecated-f-12"]=r(l,f=>f.setA(f.a*.12));const d=new gn(s[0]);n["primary-color-active-deprecated-f-30"]=r(d,f=>f.setA(f.a*.3)),n["primary-color-active-deprecated-d-02"]=r(d,f=>f.darken(2))}return t.successColor&&a(t.successColor,"success"),t.warningColor&&a(t.warningColor,"warning"),t.errorColor&&a(t.errorColor,"error"),t.infoColor&&a(t.infoColor,"info"),`
68
68
  :root {
69
69
  ${Object.keys(n).map(l=>`--${e}-${l}: ${n[l]};`).join(`
70
70
  `)}
@@ -493,7 +493,7 @@ html body {
493
493
  ${n}-eye,
494
494
  ${n}-download,
495
495
  ${n}-delete
496
- `]:{zIndex:10,width:r,margin:`0 ${de(e.marginXXS)}`,fontSize:r,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,color:a,"&:hover":{color:a},svg:{verticalAlign:"baseline"}}},[`${s}-thumbnail, ${s}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${s}-name`]:{display:"none",textAlign:"center"},[`${s}-file + ${s}-name`]:{position:"absolute",bottom:e.margin,display:"block",width:`calc(100% - ${de(o(e.paddingXS).mul(2).equal())})`},[`${s}-uploading`]:{[`&${s}`]:{backgroundColor:e.colorFillAlter},[`&::before, ${n}-eye, ${n}-download, ${n}-delete`]:{display:"none"}},[`${s}-progress`]:{bottom:e.marginXL,width:`calc(100% - ${de(o(e.paddingXS).mul(2).equal())})`,paddingInlineStart:0}}}),[`${t}-wrapper${t}-picture-circle-wrapper`]:{[`${t}${t}-select`]:{borderRadius:"50%"}}}},Cfe=e=>{const{componentCls:t}=e;return{[`${t}-rtl`]:{direction:"rtl"}}},Sfe=e=>{const{componentCls:t,colorTextDisabled:n}=e;return{[`${t}-wrapper`]:Object.assign(Object.assign({},xn(e)),{[t]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${t}-select`]:{display:"inline-block"},[`${t}-hidden`]:{display:"none"},[`${t}-disabled`]:{color:n,cursor:"not-allowed"}})}},wfe=e=>({actionsColor:e.colorIcon,pictureCardSize:e.controlHeightLG*2.55}),$fe=dn("Upload",e=>{const{fontSizeHeading3:t,fontHeight:n,lineWidth:r,pictureCardSize:a,calc:o}=e,l=an(e,{uploadThumbnailSize:o(t).mul(2).equal(),uploadProgressOffset:o(o(n).div(2)).add(r).equal(),uploadPicCardSize:a});return[Sfe(l),gfe(l),yfe(l),xfe(l),vfe(l),bfe(l),Cfe(l),ch(l)]},wfe);var Efe={icon:function(t,n){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:n}},{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.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:t}}]}},name:"file",theme:"twotone"},jfe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Efe}))},Nfe=i.forwardRef(jfe),Ofe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"},kfe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Ofe}))},Rfe=i.forwardRef(kfe),Ife={icon:function(t,n){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:t}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:n}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:n}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:n}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:t}}]}},name:"picture",theme:"twotone"},Mfe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Ife}))},Tfe=i.forwardRef(Mfe);function fg(e){return Object.assign(Object.assign({},e),{lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate,name:e.name,size:e.size,type:e.type,uid:e.uid,percent:0,originFileObj:e})}function mg(e,t){const n=Ge(t),r=n.findIndex(({uid:a})=>a===e.uid);return r===-1?n.push(e):n[r]=e,n}function cx(e,t){const n=e.uid!==void 0?"uid":"name";return t.filter(r=>r[n]===e[n])[0]}function Pfe(e,t){const n=e.uid!==void 0?"uid":"name",r=t.filter(a=>a[n]!==e[n]);return r.length===t.length?null:r}const Dfe=(e="")=>{const t=e.split("/"),r=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(r)||[""])[0]},wP=e=>e.indexOf("image/")===0,zfe=e=>{if(e.type&&!e.thumbUrl)return wP(e.type);const t=e.thumbUrl||e.url||"",n=Dfe(t);return/^data:image\//.test(t)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(n)?!0:!(/^data:/.test(t)||n)},as=200;function Afe(e){return new Promise(t=>{if(!e.type||!wP(e.type)){t("");return}const n=document.createElement("canvas");n.width=as,n.height=as,n.style.cssText=`position: fixed; left: 0; top: 0; width: ${as}px; height: ${as}px; z-index: 9999; display: none;`,document.body.appendChild(n);const r=n.getContext("2d"),a=new Image;if(a.onload=()=>{const{width:o,height:l}=a;let s=as,d=as,f=0,h=0;o>l?(d=l*(as/o),h=-(d-s)/2):(s=o*(as/l),f=-(s-d)/2),r.drawImage(a,f,h,s,d);const p=n.toDataURL();document.body.removeChild(n),window.URL.revokeObjectURL(a.src),t(p)},a.crossOrigin="anonymous",e.type.startsWith("image/svg+xml")){const o=new FileReader;o.onload=()=>{o.result&&typeof o.result=="string"&&(a.src=o.result)},o.readAsDataURL(e)}else if(e.type.startsWith("image/gif")){const o=new FileReader;o.onload=()=>{o.result&&t(o.result)},o.readAsDataURL(e)}else a.src=window.URL.createObjectURL(e)})}var Lfe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},_fe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Lfe}))},Ol=i.forwardRef(_fe);const Bfe=i.forwardRef(({prefixCls:e,className:t,style:n,locale:r,listType:a,file:o,items:l,progress:s,iconRender:d,actionIconRender:f,itemRender:h,isImgUrl:p,showPreviewIcon:g,showRemoveIcon:v,showDownloadIcon:y,previewIcon:C,removeIcon:x,downloadIcon:S,extra:$,onPreview:E,onDownload:k,onClose:O},N)=>{var R,j;const{status:I}=o,[M,P]=i.useState(I);i.useEffect(()=>{I!=="removed"&&P(I)},[I]);const[A,H]=i.useState(!1);i.useEffect(()=>{const ee=setTimeout(()=>{H(!0)},300);return()=>{clearTimeout(ee)}},[]);const T=d(o);let L=i.createElement("div",{className:`${e}-icon`},T);if(a==="picture"||a==="picture-card"||a==="picture-circle")if(M==="uploading"||!o.thumbUrl&&!o.url){const ee=pe(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:M!=="uploading"});L=i.createElement("div",{className:ee},T)}else{const ee=p!=null&&p(o)?i.createElement("img",{src:o.thumbUrl||o.url,alt:o.name,className:`${e}-list-item-image`,crossOrigin:o.crossOrigin}):T,Q=pe(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:p&&!p(o)});L=i.createElement("a",{className:Q,onClick:ae=>E(o,ae),href:o.url||o.thumbUrl,target:"_blank",rel:"noopener noreferrer"},ee)}const D=pe(`${e}-list-item`,`${e}-list-item-${M}`),F=typeof o.linkProps=="string"?JSON.parse(o.linkProps):o.linkProps,V=(typeof v=="function"?v(o):v)?f((typeof x=="function"?x(o):x)||i.createElement(Yn,null),()=>O(o),e,r.removeFile,!0):null,q=(typeof y=="function"?y(o):y)&&M==="done"?f((typeof S=="function"?S(o):S)||i.createElement(Ol,null),()=>k(o),e,r.downloadFile):null,B=a!=="picture-card"&&a!=="picture-circle"&&i.createElement("span",{key:"download-delete",className:pe(`${e}-list-item-actions`,{picture:a==="picture"})},q,V),U=typeof $=="function"?$(o):$,K=U&&i.createElement("span",{className:`${e}-list-item-extra`},U),_=pe(`${e}-list-item-name`),G=o.url?i.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:_,title:o.name},F,{href:o.url,onClick:ee=>E(o,ee)}),o.name,K):i.createElement("span",{key:"view",className:_,onClick:ee=>E(o,ee),title:o.name},o.name,K),X=(typeof g=="function"?g(o):g)&&(o.url||o.thumbUrl)?i.createElement("a",{href:o.url||o.thumbUrl,target:"_blank",rel:"noopener noreferrer",onClick:ee=>E(o,ee),title:r.previewFile},typeof C=="function"?C(o):C||i.createElement(Hd,null)):null,Y=(a==="picture-card"||a==="picture-circle")&&M!=="uploading"&&i.createElement("span",{className:`${e}-list-item-actions`},X,M==="done"&&q,V),{getPrefixCls:le}=i.useContext(Tt),oe=le(),ue=i.createElement("div",{className:D},L,G,B,Y,A&&i.createElement(ea,{motionName:`${oe}-fade`,visible:M==="uploading",motionDeadline:2e3},({className:ee})=>{const Q="percent"in o?i.createElement(Nh,Object.assign({type:"line",percent:o.percent,"aria-label":o["aria-label"],"aria-labelledby":o["aria-labelledby"]},s)):null;return i.createElement("div",{className:pe(`${e}-list-item-progress`,ee)},Q)})),ne=o.response&&typeof o.response=="string"?o.response:((R=o.error)===null||R===void 0?void 0:R.statusText)||((j=o.error)===null||j===void 0?void 0:j.message)||r.uploadError,te=M==="error"?i.createElement(vn,{title:ne,getPopupContainer:ee=>ee.parentNode},ue):ue;return i.createElement("div",{className:pe(`${e}-list-item-container`,t),style:n,ref:N},h?h(te,o,l,{download:k.bind(null,o),preview:E.bind(null,o),remove:O.bind(null,o)}):te)}),Ffe=(e,t)=>{const{listType:n="text",previewFile:r=Afe,onPreview:a,onDownload:o,onRemove:l,locale:s,iconRender:d,isImageUrl:f=zfe,prefixCls:h,items:p=[],showPreviewIcon:g=!0,showRemoveIcon:v=!0,showDownloadIcon:y=!1,removeIcon:C,previewIcon:x,downloadIcon:S,extra:$,progress:E={size:[-1,2],showInfo:!1},appendAction:k,appendActionVisible:O=!0,itemRender:N,disabled:R}=e,[,j]=iw(),[I,M]=i.useState(!1),P=["picture-card","picture-circle"].includes(n);i.useEffect(()=>{n.startsWith("picture")&&(p||[]).forEach(_=>{!(_.originFileObj instanceof File||_.originFileObj instanceof Blob)||_.thumbUrl!==void 0||(_.thumbUrl="",r==null||r(_.originFileObj).then(G=>{_.thumbUrl=G||"",j()}))})},[n,p,r]),i.useEffect(()=>{M(!0)},[]);const A=(_,G)=>{if(a)return G==null||G.preventDefault(),a(_)},H=_=>{typeof o=="function"?o(_):_.url&&window.open(_.url)},T=_=>{l==null||l(_)},L=_=>{if(d)return d(_,n);const G=_.status==="uploading";if(n.startsWith("picture")){const X=n==="picture"?i.createElement(zo,null):s.uploading,Y=f!=null&&f(_)?i.createElement(Tfe,null):i.createElement(Nfe,null);return G?X:Y}return G?i.createElement(zo,null):i.createElement(Rfe,null)},D=(_,G,X,Y,le)=>{const oe={type:"text",size:"small",title:Y,onClick:ue=>{var ne,te;G(),i.isValidElement(_)&&((te=(ne=_.props).onClick)===null||te===void 0||te.call(ne,ue))},className:`${X}-list-item-action`,disabled:le?R:!1};return i.isValidElement(_)?i.createElement(Re,Object.assign({},oe,{icon:qr(_,Object.assign(Object.assign({},_.props),{onClick:()=>{}}))})):i.createElement(Re,Object.assign({},oe),i.createElement("span",null,_))};i.useImperativeHandle(t,()=>({handlePreview:A,handleDownload:H}));const{getPrefixCls:F}=i.useContext(Tt),V=F("upload",h),q=F(),B=pe(`${V}-list`,`${V}-list-${n}`),U=i.useMemo(()=>An(bd(q),["onAppearEnd","onEnterEnd","onLeaveEnd"]),[q]),K=Object.assign(Object.assign({},P?{}:U),{motionDeadline:2e3,motionName:`${V}-${P?"animate-inline":"animate"}`,keys:Ge(p.map(_=>({key:_.uid,file:_}))),motionAppear:I});return i.createElement("div",{className:B},i.createElement(rw,Object.assign({},K,{component:!1}),({key:_,file:G,className:X,style:Y})=>i.createElement(Bfe,{key:_,locale:s,prefixCls:V,className:X,style:Y,file:G,items:p,progress:E,listType:n,isImgUrl:f,showPreviewIcon:g,showRemoveIcon:v,showDownloadIcon:y,removeIcon:C,previewIcon:x,downloadIcon:S,extra:$,iconRender:L,actionIconRender:D,itemRender:N,onPreview:A,onDownload:H,onClose:T})),k&&i.createElement(ea,Object.assign({},K,{visible:O,forceRender:!0}),({className:_,style:G})=>qr(k,X=>({className:pe(X.className,_),style:Object.assign(Object.assign(Object.assign({},G),{pointerEvents:_?"none":void 0}),X.style)}))))},Hfe=i.forwardRef(Ffe);var Vfe=function(e,t,n,r){function a(o){return o instanceof n?o:new n(function(l){l(o)})}return new(n||(n=Promise))(function(o,l){function s(h){try{f(r.next(h))}catch(p){l(p)}}function d(h){try{f(r.throw(h))}catch(p){l(p)}}function f(h){h.done?o(h.value):a(h.value).then(s,d)}f((r=r.apply(e,[])).next())})};const dm=`__LIST_IGNORE_${Date.now()}__`,Wfe=(e,t)=>{const n=pr("upload"),{fileList:r,defaultFileList:a,onRemove:o,showUploadList:l=!0,listType:s="text",onPreview:d,onDownload:f,onChange:h,onDrop:p,previewFile:g,disabled:v,locale:y,iconRender:C,isImageUrl:x,progress:S,prefixCls:$,className:E,type:k="select",children:O,style:N,itemRender:R,maxCount:j,data:I={},multiple:M=!1,hasControlInside:P=!0,action:A="",accept:H="",supportServerRender:T=!0,rootClassName:L}=e,D=i.useContext(va),F=v??D,V=e.customRequest||n.customRequest,[q,B]=En(a||[],{value:r,postState:xe=>xe??[]}),[U,K]=i.useState("drop"),_=i.useRef(null),G=i.useRef(null);i.useMemo(()=>{const xe=Date.now();(r||[]).forEach((Pe,He)=>{!Pe.uid&&!Object.isFrozen(Pe)&&(Pe.uid=`__AUTO__${xe}_${He}__`)})},[r]);const X=(xe,Pe,He)=>{let ke=Ge(Pe),We=!1;j===1?ke=ke.slice(-1):j&&(We=ke.length>j,ke=ke.slice(0,j)),ii.flushSync(()=>{B(ke)});const st={file:xe,fileList:ke};He&&(st.event=He),(!We||xe.status==="removed"||ke.some(Je=>Je.uid===xe.uid))&&ii.flushSync(()=>{h==null||h(st)})},Y=(xe,Pe)=>Vfe(void 0,void 0,void 0,function*(){const{beforeUpload:He,transformFile:ke}=e;let We=xe;if(He){const st=yield He(xe,Pe);if(st===!1)return!1;if(delete xe[dm],st===dm)return Object.defineProperty(xe,dm,{value:!0,configurable:!0}),!1;typeof st=="object"&&st&&(We=st)}return ke&&(We=yield ke(We)),We}),le=xe=>{const Pe=xe.filter(We=>!We.file[dm]);if(!Pe.length)return;const He=Pe.map(We=>fg(We.file));let ke=Ge(q);He.forEach(We=>{ke=mg(We,ke)}),He.forEach((We,st)=>{let Je=We;if(Pe[st].parsedFile)We.status="uploading";else{const{originFileObj:Fe}=We;let Qe;try{Qe=new File([Fe],Fe.name,{type:Fe.type})}catch{Qe=new Blob([Fe],{type:Fe.type}),Qe.name=Fe.name,Qe.lastModifiedDate=new Date,Qe.lastModified=new Date().getTime()}Qe.uid=We.uid,Je=Qe}X(Je,ke)})},oe=(xe,Pe,He)=>{try{typeof xe=="string"&&(xe=JSON.parse(xe))}catch{}if(!cx(Pe,q))return;const ke=fg(Pe);ke.status="done",ke.percent=100,ke.response=xe,ke.xhr=He;const We=mg(ke,q);X(ke,We)},ue=(xe,Pe)=>{if(!cx(Pe,q))return;const He=fg(Pe);He.status="uploading",He.percent=xe.percent;const ke=mg(He,q);X(He,ke,xe)},ne=(xe,Pe,He)=>{if(!cx(He,q))return;const ke=fg(He);ke.error=xe,ke.response=Pe,ke.status="error";const We=mg(ke,q);X(ke,We)},te=xe=>{let Pe;Promise.resolve(typeof o=="function"?o(xe):o).then(He=>{var ke;if(He===!1)return;const We=Pfe(xe,q);We&&(Pe=Object.assign(Object.assign({},xe),{status:"removed"}),q==null||q.forEach(st=>{const Je=Pe.uid!==void 0?"uid":"name";st[Je]===Pe[Je]&&!Object.isFrozen(st)&&(st.status="removed")}),(ke=_.current)===null||ke===void 0||ke.abort(Pe),X(Pe,We))})},ee=xe=>{K(xe.type),xe.type==="drop"&&(p==null||p(xe))};i.useImperativeHandle(t,()=>({onBatchStart:le,onSuccess:oe,onProgress:ue,onError:ne,fileList:q,upload:_.current,nativeElement:G.current}));const{getPrefixCls:Q,direction:ae,upload:fe}=i.useContext(Tt),J=Q("upload",$),Z=Object.assign(Object.assign({onBatchStart:le,onError:ne,onProgress:ue,onSuccess:oe},e),{customRequest:V,data:I,multiple:M,action:A,accept:H,supportServerRender:T,prefixCls:J,disabled:F,beforeUpload:Y,onChange:void 0,hasControlInside:P});delete Z.className,delete Z.style,(!O||F)&&delete Z.id;const he=`${J}-wrapper`,[$e,Ie,re]=$fe(J,he),[ce]=ro("Upload",ci.Upload),{showRemoveIcon:ve,showPreviewIcon:be,showDownloadIcon:Ce,removeIcon:ge,previewIcon:Oe,downloadIcon:Ee,extra:De}=typeof l=="boolean"?{}:l,Ae=typeof ve>"u"?!F:ve,Be=(xe,Pe)=>l?i.createElement(Hfe,{prefixCls:J,listType:s,items:q,previewFile:g,onPreview:d,onDownload:f,onRemove:te,showRemoveIcon:Ae,showPreviewIcon:be,showDownloadIcon:Ce,removeIcon:ge,previewIcon:Oe,downloadIcon:Ee,iconRender:C,extra:De,locale:Object.assign(Object.assign({},ce),y),isImageUrl:x,progress:S,appendAction:xe,appendActionVisible:Pe,itemRender:R,disabled:F}):xe,ze=pe(he,E,L,Ie,re,fe==null?void 0:fe.className,{[`${J}-rtl`]:ae==="rtl",[`${J}-picture-card-wrapper`]:s==="picture-card",[`${J}-picture-circle-wrapper`]:s==="picture-circle"}),qe=Object.assign(Object.assign({},fe==null?void 0:fe.style),N);if(k==="drag"){const xe=pe(Ie,J,`${J}-drag`,{[`${J}-drag-uploading`]:q.some(Pe=>Pe.status==="uploading"),[`${J}-drag-hover`]:U==="dragover",[`${J}-disabled`]:F,[`${J}-rtl`]:ae==="rtl"});return $e(i.createElement("span",{className:ze,ref:G},i.createElement("div",{className:xe,style:qe,onDrop:ee,onDragOver:ee,onDragLeave:ee},i.createElement(ES,Object.assign({},Z,{ref:_,className:`${J}-btn`}),i.createElement("div",{className:`${J}-drag-container`},O))),Be()))}const _e=pe(J,`${J}-select`,{[`${J}-disabled`]:F,[`${J}-hidden`]:!O}),Ne=i.createElement("div",{className:_e,style:qe},i.createElement(ES,Object.assign({},Z,{ref:_})));return $e(s==="picture-card"||s==="picture-circle"?i.createElement("span",{className:ze,ref:G},Be(Ne,!!O)):i.createElement("span",{className:ze,ref:G},Ne,Be()))},$P=i.forwardRef(Wfe);var Ufe=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(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const qfe=i.forwardRef((e,t)=>{const{style:n,height:r,hasControlInside:a=!1,children:o}=e,l=Ufe(e,["style","height","hasControlInside","children"]),s=Object.assign(Object.assign({},n),{height:r});return i.createElement($P,Object.assign({ref:t,hasControlInside:a},l,{style:s,type:"drag"}),o)}),Rh=$P;Rh.Dragger=qfe;Rh.LIST_IGNORE=dm;var Kfe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M193 796c0 17.7 14.3 32 32 32h574c17.7 0 32-14.3 32-32V563c0-176.2-142.8-319-319-319S193 386.8 193 563v233zm72-233c0-136.4 110.6-247 247-247s247 110.6 247 247v193H404V585c0-5.5-4.5-10-10-10h-44c-5.5 0-10 4.5-10 10v171h-75V563zm-48.1-252.5l39.6-39.6c3.1-3.1 3.1-8.2 0-11.3l-67.9-67.9a8.03 8.03 0 00-11.3 0l-39.6 39.6a8.03 8.03 0 000 11.3l67.9 67.9c3.1 3.1 8.1 3.1 11.3 0zm669.6-79.2l-39.6-39.6a8.03 8.03 0 00-11.3 0l-67.9 67.9a8.03 8.03 0 000 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l67.9-67.9c3.1-3.2 3.1-8.2 0-11.3zM832 892H192c-17.7 0-32 14.3-32 32v24c0 4.4 3.6 8 8 8h688c4.4 0 8-3.6 8-8v-24c0-17.7-14.3-32-32-32zM484 180h56c4.4 0 8-3.6 8-8V76c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v96c0 4.4 3.6 8 8 8z"}}]},name:"alert",theme:"outlined"},Gfe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Kfe}))},Ed=i.forwardRef(Gfe),Xfe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908 640H804V488c0-4.4-3.6-8-8-8H548v-96h108c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16H368c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h108v96H228c-4.4 0-8 3.6-8 8v152H116c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16H292v-88h440v88H620c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16zm-564 76v168H176V716h168zm84-408V140h168v168H428zm420 576H680V716h168v168z"}}]},name:"apartment",theme:"outlined"},Yfe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Xfe}))},Jfe=i.forwardRef(Yfe),Qfe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M917.7 148.8l-42.4-42.4c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-76.1 76.1a199.27 199.27 0 00-112.1-34.3c-51.2 0-102.4 19.5-141.5 58.6L432.3 308.7a8.03 8.03 0 000 11.3L704 591.7c1.6 1.6 3.6 2.3 5.7 2.3 2 0 4.1-.8 5.7-2.3l101.9-101.9c68.9-69 77-175.7 24.3-253.5l76.1-76.1c3.1-3.2 3.1-8.3 0-11.4zM769.1 441.7l-59.4 59.4-186.8-186.8 59.4-59.4c24.9-24.9 58.1-38.7 93.4-38.7 35.3 0 68.4 13.7 93.4 38.7 24.9 24.9 38.7 58.1 38.7 93.4 0 35.3-13.8 68.4-38.7 93.4zm-190.2 105a8.03 8.03 0 00-11.3 0L501 613.3 410.7 523l66.7-66.7c3.1-3.1 3.1-8.2 0-11.3L441 408.6a8.03 8.03 0 00-11.3 0L363 475.3l-43-43a7.85 7.85 0 00-5.7-2.3c-2 0-4.1.8-5.7 2.3L206.8 534.2c-68.9 69-77 175.7-24.3 253.5l-76.1 76.1a8.03 8.03 0 000 11.3l42.4 42.4c1.6 1.6 3.6 2.3 5.7 2.3s4.1-.8 5.7-2.3l76.1-76.1c33.7 22.9 72.9 34.3 112.1 34.3 51.2 0 102.4-19.5 141.5-58.6l101.9-101.9c3.1-3.1 3.1-8.2 0-11.3l-43-43 66.7-66.7c3.1-3.1 3.1-8.2 0-11.3l-36.6-36.2zM441.7 769.1a131.32 131.32 0 01-93.4 38.7c-35.3 0-68.4-13.7-93.4-38.7a131.32 131.32 0 01-38.7-93.4c0-35.3 13.7-68.4 38.7-93.4l59.4-59.4 186.8 186.8-59.4 59.4z"}}]},name:"api",theme:"outlined"},Zfe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Qfe}))},eme=i.forwardRef(Zfe),tme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z"}}]},name:"appstore",theme:"outlined"},nme=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:tme}))},EP=i.forwardRef(nme),rme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z"}}]},name:"arrow-down",theme:"outlined"},ame=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:rme}))},ome=i.forwardRef(ame),ime={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"},lme=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:ime}))},Is=i.forwardRef(lme),sme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M869 487.8L491.2 159.9c-2.9-2.5-6.6-3.9-10.5-3.9h-88.5c-7.4 0-10.8 9.2-5.2 14l350.2 304H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h585.1L386.9 854c-5.6 4.9-2.2 14 5.2 14h91.5c1.9 0 3.8-.7 5.2-2L869 536.2a32.07 32.07 0 000-48.4z"}}]},name:"arrow-right",theme:"outlined"},cme=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:sme}))},jc=i.forwardRef(cme),ume={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 545.5L536.1 163a31.96 31.96 0 00-48.3 0L156 545.5a7.97 7.97 0 006 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z"}}]},name:"arrow-up",theme:"outlined"},dme=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:ume}))},fme=i.forwardRef(dme),mme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M816 768h-24V428c0-141.1-104.3-257.7-240-277.1V112c0-22.1-17.9-40-40-40s-40 17.9-40 40v38.9c-135.7 19.4-240 136-240 277.1v340h-24c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h216c0 61.8 50.2 112 112 112s112-50.2 112-112h216c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM512 888c-26.5 0-48-21.5-48-48h96c0 26.5-21.5 48-48 48zM304 768V428c0-55.6 21.6-107.8 60.9-147.1S456.4 220 512 220c55.6 0 107.8 21.6 147.1 60.9S720 372.4 720 428v340H304z"}}]},name:"bell",theme:"outlined"},hme=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:mme}))},jP=i.forwardRef(hme),pme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M740 161c-61.8 0-112 50.2-112 112 0 50.1 33.1 92.6 78.5 106.9v95.9L320 602.4V318.1c44.2-15 76-56.9 76-106.1 0-61.8-50.2-112-112-112s-112 50.2-112 112c0 49.2 31.8 91 76 106.1V706c-44.2 15-76 56.9-76 106.1 0 61.8 50.2 112 112 112s112-50.2 112-112c0-49.2-31.8-91-76-106.1v-27.8l423.5-138.7a50.52 50.52 0 0034.9-48.2V378.2c42.9-15.8 73.6-57 73.6-105.2 0-61.8-50.2-112-112-112zm-504 51a48.01 48.01 0 0196 0 48.01 48.01 0 01-96 0zm96 600a48.01 48.01 0 01-96 0 48.01 48.01 0 0196 0zm408-491a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"branches",theme:"outlined"},gme=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:pme}))},Mc=i.forwardRef(gme),vme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M304 280h56c4.4 0 8-3.6 8-8 0-28.3 5.9-53.2 17.1-73.5 10.6-19.4 26-34.8 45.4-45.4C450.9 142 475.7 136 504 136h16c28.3 0 53.2 5.9 73.5 17.1 19.4 10.6 34.8 26 45.4 45.4C650 218.9 656 243.7 656 272c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-40-8.8-76.7-25.9-108.1a184.31 184.31 0 00-74-74C596.7 72.8 560 64 520 64h-16c-40 0-76.7 8.8-108.1 25.9a184.31 184.31 0 00-74 74C304.8 195.3 296 232 296 272c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M940 512H792V412c76.8 0 139-62.2 139-139 0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8a63 63 0 01-63 63H232a63 63 0 01-63-63c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 76.8 62.2 139 139 139v100H84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h148v96c0 6.5.2 13 .7 19.3C164.1 728.6 116 796.7 116 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-44.2 23.9-82.9 59.6-103.7a273 273 0 0022.7 49c24.3 41.5 59 76.2 100.5 100.5S460.5 960 512 960s99.8-13.9 141.3-38.2a281.38 281.38 0 00123.2-149.5A120 120 0 01836 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-79.3-48.1-147.4-116.7-176.7.4-6.4.7-12.8.7-19.3v-96h148c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM716 680c0 36.8-9.7 72-27.8 102.9-17.7 30.3-43 55.6-73.3 73.3C584 874.3 548.8 884 512 884s-72-9.7-102.9-27.8c-30.3-17.7-55.6-43-73.3-73.3A202.75 202.75 0 01308 680V412h408v268z"}}]},name:"bug",theme:"outlined"},bme=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:vme}))},Gm=i.forwardRef(bme),yme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M632 888H392c-4.4 0-8 3.6-8 8v32c0 17.7 14.3 32 32 32h192c17.7 0 32-14.3 32-32v-32c0-4.4-3.6-8-8-8zM512 64c-181.1 0-328 146.9-328 328 0 121.4 66 227.4 164 284.1V792c0 17.7 14.3 32 32 32h264c17.7 0 32-14.3 32-32V676.1c98-56.7 164-162.7 164-284.1 0-181.1-146.9-328-328-328zm127.9 549.8L604 634.6V752H420V634.6l-35.9-20.8C305.4 568.3 256 484.5 256 392c0-141.4 114.6-256 256-256s256 114.6 256 256c0 92.5-49.4 176.3-128.1 221.8z"}}]},name:"bulb",theme:"outlined"},xme=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:yme}))},ux=i.forwardRef(xme),Cme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"},Sme=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Cme}))},Ri=i.forwardRef(Sme),wme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M433.1 657.7a31.8 31.8 0 0051.7 0l210.6-292c3.8-5.3 0-12.7-6.5-12.7H642c-10.2 0-19.9 4.9-25.9 13.3L459 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H315c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.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:"check-square",theme:"outlined"},$me=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:wme}))},Bc=i.forwardRef($me),Eme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 512.3v-.3c0-229.8-186.2-416-416-416S96 282.2 96 512v.4c0 229.8 186.2 416 416 416s416-186.2 416-416v-.3.2zm-6.7-74.6l.6 3.3-.6-3.3zM676.7 638.2c53.5-82.2 52.5-189.4-11.1-263.7l162.4-8.4c20.5 44.4 32 93.8 32 145.9 0 185.2-144.6 336.6-327.1 347.4l143.8-221.2zM512 652.3c-77.5 0-140.2-62.7-140.2-140.2 0-77.7 62.7-140.2 140.2-140.2S652.2 434.5 652.2 512 589.5 652.3 512 652.3zm369.2-331.7l-3-5.7 3 5.7zM512 164c121.3 0 228.2 62.1 290.4 156.2l-263.6-13.9c-97.5-5.7-190.2 49.2-222.3 141.1L227.8 311c63.1-88.9 166.9-147 284.2-147zM102.5 585.8c26 145 127.1 264 261.6 315.1C229.6 850 128.5 731 102.5 585.8zM164 512c0-55.9 13.2-108.7 36.6-155.5l119.7 235.4c44.1 86.7 137.4 139.7 234 121.6l-74 145.1C302.9 842.5 164 693.5 164 512zm324.7 415.4c4 .2 8 .4 12 .5-4-.2-8-.3-12-.5z"}}]},name:"chrome",theme:"outlined"},jme=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Eme}))},Nme=i.forwardRef(jme),Ome={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M899.1 869.6l-53-305.6H864c14.4 0 26-11.6 26-26V346c0-14.4-11.6-26-26-26H618V138c0-14.4-11.6-26-26-26H432c-14.4 0-26 11.6-26 26v182H160c-14.4 0-26 11.6-26 26v192c0 14.4 11.6 26 26 26h17.9l-53 305.6a25.95 25.95 0 0025.6 30.4h723c1.5 0 3-.1 4.4-.4a25.88 25.88 0 0021.2-30zM204 390h272V182h72v208h272v104H204V390zm468 440V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H416V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H202.8l45.1-260H776l45.1 260H672z"}}]},name:"clear",theme:"outlined"},kme=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Ome}))},NP=i.forwardRef(kme),Rme={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 64zm176.5 585.7l-28.6 39a7.99 7.99 0 01-11.2 1.7L483.3 569.8a7.92 7.92 0 01-3.3-6.5V288c0-4.4 3.6-8 8-8h48.1c4.4 0 8 3.6 8 8v247.5l142.6 103.1c3.6 2.5 4.4 7.5 1.8 11.1z"}}]},name:"clock-circle",theme:"filled"},Ime=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Rme}))},Mme=i.forwardRef(Ime),Tme={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 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z"}}]},name:"close-circle",theme:"outlined"},Pme=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Tme}))},tO=i.forwardRef(Pme),Dme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M624 706.3h-74.1V464c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v242.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.7a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9z"}},{tag:"path",attrs:{d:"M811.4 366.7C765.6 245.9 648.9 160 512.2 160S258.8 245.8 213 366.6C127.3 389.1 64 467.2 64 560c0 110.5 89.5 200 199.9 200H304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8h-40.1c-33.7 0-65.4-13.4-89-37.7-23.5-24.2-36-56.8-34.9-90.6.9-26.4 9.9-51.2 26.2-72.1 16.7-21.3 40.1-36.8 66.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0152.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10C846.1 454.5 884 503.8 884 560c0 33.1-12.9 64.3-36.3 87.7a123.07 123.07 0 01-87.6 36.3H720c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h40.1C870.5 760 960 670.5 960 560c0-92.7-63.1-170.7-148.6-193.3z"}}]},name:"cloud-download",theme:"outlined"},zme=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Dme}))},Ame=i.forwardRef(zme),Lme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 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:"code",theme:"outlined"},_me=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Lme}))},Oa=i.forwardRef(_me),Bme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M573 421c-23.1 0-41 17.9-41 40s17.9 40 41 40c21.1 0 39-17.9 39-40s-17.9-40-39-40zm-280 0c-23.1 0-41 17.9-41 40s17.9 40 41 40c21.1 0 39-17.9 39-40s-17.9-40-39-40z"}},{tag:"path",attrs:{d:"M894 345a343.92 343.92 0 00-189-130v.1c-17.1-19-36.4-36.5-58-52.1-163.7-119-393.5-82.7-513 81-96.3 133-92.2 311.9 6 439l.8 132.6c0 3.2.5 6.4 1.5 9.4a31.95 31.95 0 0040.1 20.9L309 806c33.5 11.9 68.1 18.7 102.5 20.6l-.5.4c89.1 64.9 205.9 84.4 313 49l127.1 41.4c3.2 1 6.5 1.6 9.9 1.6 17.7 0 32-14.3 32-32V753c88.1-119.6 90.4-284.9 1-408zM323 735l-12-5-99 31-1-104-8-9c-84.6-103.2-90.2-251.9-11-361 96.4-132.2 281.2-161.4 413-66 132.2 96.1 161.5 280.6 66 412-80.1 109.9-223.5 150.5-348 102zm505-17l-8 10 1 104-98-33-12 5c-56 20.8-115.7 22.5-171 7l-.2-.1A367.31 367.31 0 00729 676c76.4-105.3 88.8-237.6 44.4-350.4l.6.4c23 16.5 44.1 37.1 62 62 72.6 99.6 68.5 235.2-8 330z"}},{tag:"path",attrs:{d:"M433 421c-23.1 0-41 17.9-41 40s17.9 40 41 40c21.1 0 39-17.9 39-40s-17.9-40-39-40z"}}]},name:"comment",theme:"outlined"},Fme=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Bme}))},dx=i.forwardRef(Fme),Hme={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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm198.4-588.1a32 32 0 00-24.5.5L414.9 415 296.4 686c-3.6 8.2-3.6 17.5 0 25.7 3.4 7.8 9.7 13.9 17.7 17 3.8 1.5 7.7 2.2 11.7 2.2 4.4 0 8.7-.9 12.8-2.7l271-118.6 118.5-271a32.06 32.06 0 00-17.7-42.7zM576.8 534.4l26.2 26.2-42.4 42.4-26.2-26.2L380 644.4 447.5 490 422 464.4l42.4-42.4 25.5 25.5L644.4 380l-67.6 154.4zM464.4 422L422 464.4l25.5 25.6 86.9 86.8 26.2 26.2 42.4-42.4-26.2-26.2-86.8-86.9z"}}]},name:"compass",theme:"outlined"},Vme=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Hme}))},Wme=i.forwardRef(Vme),Ume={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M326 664H104c-8.8 0-16 7.2-16 16v48c0 8.8 7.2 16 16 16h174v176c0 8.8 7.2 16 16 16h48c8.8 0 16-7.2 16-16V696c0-17.7-14.3-32-32-32zm16-576h-48c-8.8 0-16 7.2-16 16v176H104c-8.8 0-16 7.2-16 16v48c0 8.8 7.2 16 16 16h222c17.7 0 32-14.3 32-32V104c0-8.8-7.2-16-16-16zm578 576H698c-17.7 0-32 14.3-32 32v224c0 8.8 7.2 16 16 16h48c8.8 0 16-7.2 16-16V744h174c8.8 0 16-7.2 16-16v-48c0-8.8-7.2-16-16-16zm0-384H746V104c0-8.8-7.2-16-16-16h-48c-8.8 0-16 7.2-16 16v224c0 17.7 14.3 32 32 32h222c8.8 0 16-7.2 16-16v-48c0-8.8-7.2-16-16-16z"}}]},name:"compress",theme:"outlined"},qme=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Ume}))},jS=i.forwardRef(qme),Kme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 128c-212.1 0-384 171.9-384 384v360c0 13.3 10.7 24 24 24h184c35.3 0 64-28.7 64-64V624c0-35.3-28.7-64-64-64H200v-48c0-172.3 139.7-312 312-312s312 139.7 312 312v48H688c-35.3 0-64 28.7-64 64v208c0 35.3 28.7 64 64 64h184c13.3 0 24-10.7 24-24V512c0-212.1-171.9-384-384-384zM328 632v192H200V632h128zm496 192H696V632h128v192z"}}]},name:"customer-service",theme:"outlined"},Gme=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Kme}))},Xme=i.forwardRef(Gme),Yme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"database",theme:"outlined"},Jme=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Yme}))},Qme=i.forwardRef(Jme),Zme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 140H96c-17.7 0-32 14.3-32 32v496c0 17.7 14.3 32 32 32h380v112H304c-8.8 0-16 7.2-16 16v48c0 4.4 3.6 8 8 8h432c4.4 0 8-3.6 8-8v-48c0-8.8-7.2-16-16-16H548V700h380c17.7 0 32-14.3 32-32V172c0-17.7-14.3-32-32-32zm-40 488H136V212h752v416z"}}]},name:"desktop",theme:"outlined"},ehe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Zme}))},the=i.forwardRef(ehe),nhe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 289.1a362.49 362.49 0 00-79.9-115.7 370.83 370.83 0 00-118.2-77.8C610.7 76.6 562.1 67 512 67c-50.1 0-98.7 9.6-144.5 28.5-44.3 18.3-84 44.5-118.2 77.8A363.6 363.6 0 00169.4 289c-19.5 45-29.4 92.8-29.4 142 0 70.6 16.9 140.9 50.1 208.7 26.7 54.5 64 107.6 111 158.1 80.3 86.2 164.5 138.9 188.4 153a43.9 43.9 0 0022.4 6.1c7.8 0 15.5-2 22.4-6.1 23.9-14.1 108.1-66.8 188.4-153 47-50.4 84.3-103.6 111-158.1C867.1 572 884 501.8 884 431.1c0-49.2-9.9-97-29.4-142zM512 880.2c-65.9-41.9-300-207.8-300-449.1 0-77.9 31.1-151.1 87.6-206.3C356.3 169.5 431.7 139 512 139s155.7 30.5 212.4 85.9C780.9 280 812 353.2 812 431.1c0 241.3-234.1 407.2-300 449.1zm0-617.2c-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 551c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 439c0-29.9 11.7-58 32.8-79.2C454 338.6 482.1 327 512 327c29.9 0 58 11.6 79.2 32.8C612.4 381 624 409.1 624 439c0 29.9-11.6 58-32.8 79.2z"}}]},name:"environment",theme:"outlined"},rhe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:nhe}))},ahe=i.forwardRef(rhe),ohe={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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},ihe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:ohe}))},Xm=i.forwardRef(ihe),lhe={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM770.87 199.13l-52.2-52.2a8.01 8.01 0 014.7-13.6l179.4-21c5.1-.6 9.5 3.7 8.9 8.9l-21 179.4c-.8 6.6-8.9 9.4-13.6 4.7l-52.4-52.4-256.2 256.2a8.03 8.03 0 01-11.3 0l-42.4-42.4a8.03 8.03 0 010-11.3l256.1-256.3z"}}]},name:"export",theme:"outlined"},she=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:lhe}))},z0=i.forwardRef(she),che={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M553.1 509.1l-77.8 99.2-41.1-52.4a8 8 0 00-12.6 0l-99.8 127.2a7.98 7.98 0 006.3 12.9H696c6.7 0 10.4-7.7 6.3-12.9l-136.5-174a8.1 8.1 0 00-12.7 0zM360 442a40 40 0 1080 0 40 40 0 10-80 0zm494.6-153.4L639.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-image",theme:"outlined"},uhe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:che}))},Kg=i.forwardRef(uhe),dhe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M688 312v-48c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8zm-392 88c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zm144 452H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h272c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm445.7 51.5l-93.3-93.3C814.7 780.7 828 743.9 828 704c0-97.2-78.8-176-176-176s-176 78.8-176 176 78.8 176 176 176c35.8 0 69-10.7 96.8-29l94.7 94.7c1.6 1.6 3.6 2.3 5.6 2.3s4.1-.8 5.6-2.3l31-31a7.9 7.9 0 000-11.2zM652 816c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"file-search",theme:"outlined"},fhe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:dhe}))},A0=i.forwardRef(fhe),mhe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M296 392h64v64h-64zm0 190v160h128V582h-64v-62h-64v62zm80 48v64h-32v-64h32zm-16-302h64v64h-64zm-64-64h64v64h-64zm64 192h64v64h-64zm0-256h64v64h-64zm494.6 88.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 562H232V136h64v64h64v-64h174v216a42 42 0 0042 42h216v494z"}}]},name:"file-zip",theme:"outlined"},hhe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:mhe}))},nO=i.forwardRef(hhe),phe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z"}}]},name:"filter",theme:"outlined"},ghe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:phe}))},vhe=i.forwardRef(ghe),bhe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M484 443.1V528h-84.5c-4.1 0-7.5 3.1-7.5 7v42c0 3.8 3.4 7 7.5 7H484v84.9c0 3.9 3.2 7.1 7 7.1h42c3.9 0 7-3.2 7-7.1V584h84.5c4.1 0 7.5-3.2 7.5-7v-42c0-3.9-3.4-7-7.5-7H540v-84.9c0-3.9-3.1-7.1-7-7.1h-42c-3.8 0-7 3.2-7 7.1zm396-144.7H521L403.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-add",theme:"outlined"},yhe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:bhe}))},xhe=i.forwardRef(yhe),Che={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M840 192h-56v-72c0-13.3-10.7-24-24-24H168c-13.3 0-24 10.7-24 24v272c0 13.3 10.7 24 24 24h592c13.3 0 24-10.7 24-24V256h32v200H465c-22.1 0-40 17.9-40 40v136h-44c-4.4 0-8 3.6-8 8v228c0 .6.1 1.3.2 1.9A83.99 83.99 0 00457 960c46.4 0 84-37.6 84-84 0-2.1-.1-4.1-.2-6.1.1-.6.2-1.2.2-1.9V640c0-4.4-3.6-8-8-8h-44V520h351c22.1 0 40-17.9 40-40V232c0-22.1-17.9-40-40-40zM720 352H208V160h512v192zM477 876c0 11-9 20-20 20s-20-9-20-20V696h40v180z"}}]},name:"format-painter",theme:"outlined"},She=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Che}))},whe=i.forwardRef(She),$he={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M391 240.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L200 146.3a8.03 8.03 0 00-11.3 0l-42.4 42.3a8.03 8.03 0 000 11.3L280 333.6l-43.9 43.9a8.01 8.01 0 004.7 13.6L401 410c5.1.6 9.5-3.7 8.9-8.9L391 240.9zm10.1 373.2L240.8 633c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L146.3 824a8.03 8.03 0 000 11.3l42.4 42.3c3.1 3.1 8.2 3.1 11.3 0L333.7 744l43.7 43.7A8.01 8.01 0 00391 783l18.9-160.1c.6-5.1-3.7-9.4-8.8-8.8zm221.8-204.2L783.2 391c6.6-.8 9.4-8.9 4.7-13.6L744 333.6 877.7 200c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.3a8.03 8.03 0 00-11.3 0L690.3 279.9l-43.7-43.7a8.01 8.01 0 00-13.6 4.7L614.1 401c-.6 5.2 3.7 9.5 8.8 8.9zM744 690.4l43.9-43.9a8.01 8.01 0 00-4.7-13.6L623 614c-5.1-.6-9.5 3.7-8.9 8.9L633 783.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L824 877.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L744 690.4z"}}]},name:"fullscreen-exit",theme:"outlined"},Ehe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:$he}))},OP=i.forwardRef(Ehe),jhe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M290 236.4l43.9-43.9a8.01 8.01 0 00-4.7-13.6L169 160c-5.1-.6-9.5 3.7-8.9 8.9L179 329.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L370 423.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L290 236.4zm352.7 187.3c3.1 3.1 8.2 3.1 11.3 0l133.7-133.6 43.7 43.7a8.01 8.01 0 0013.6-4.7L863.9 169c.6-5.1-3.7-9.5-8.9-8.9L694.8 179c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L600.3 370a8.03 8.03 0 000 11.3l42.4 42.4zM845 694.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L654 600.3a8.03 8.03 0 00-11.3 0l-42.4 42.3a8.03 8.03 0 000 11.3L734 787.6l-43.9 43.9a8.01 8.01 0 004.7 13.6L855 864c5.1.6 9.5-3.7 8.9-8.9L845 694.9zm-463.7-94.6a8.03 8.03 0 00-11.3 0L236.3 733.9l-43.7-43.7a8.01 8.01 0 00-13.6 4.7L160.1 855c-.6 5.1 3.7 9.5 8.9 8.9L329.2 845c6.6-.8 9.4-8.9 4.7-13.6L290 787.6 423.7 654c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.4z"}}]},name:"fullscreen",theme:"outlined"},Nhe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:jhe}))},kP=i.forwardRef(Nhe),Ohe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M312.1 591.5c3.1 3.1 8.2 3.1 11.3 0l101.8-101.8 86.1 86.2c3.1 3.1 8.2 3.1 11.3 0l226.3-226.5c3.1-3.1 3.1-8.2 0-11.3l-36.8-36.8a8.03 8.03 0 00-11.3 0L517 485.3l-86.1-86.2a8.03 8.03 0 00-11.3 0L275.3 543.4a8.03 8.03 0 000 11.3l36.8 36.8z"}},{tag:"path",attrs:{d:"M904 160H548V96c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H120c-17.7 0-32 14.3-32 32v520c0 17.7 14.3 32 32 32h356.4v32L311.6 884.1a7.92 7.92 0 00-2.3 11l30.3 47.2v.1c2.4 3.7 7.4 4.7 11.1 2.3L512 838.9l161.3 105.8c3.7 2.4 8.7 1.4 11.1-2.3v-.1l30.3-47.2a8 8 0 00-2.3-11L548 776.3V744h356c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 512H160V232h704v440z"}}]},name:"fund-projection-screen",theme:"outlined"},khe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Ohe}))},Rhe=i.forwardRef(khe),Ihe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M511.6 76.3C264.3 76.2 64 276.4 64 523.5 64 718.9 189.3 885 363.8 946c23.5 5.9 19.9-10.8 19.9-22.2v-77.5c-135.7 15.9-141.2-73.9-150.3-88.9C215 726 171.5 718 184.5 703c30.9-15.9 62.4 4 98.9 57.9 26.4 39.1 77.9 32.5 104 26 5.7-23.5 17.9-44.5 34.7-60.8-140.6-25.2-199.2-111-199.2-213 0-49.5 16.3-95 48.3-131.7-20.4-60.5 1.9-112.3 4.9-120 58.1-5.2 118.5 41.6 123.2 45.3 33-8.9 70.7-13.6 112.9-13.6 42.4 0 80.2 4.9 113.5 13.9 11.3-8.6 67.3-48.8 121.3-43.9 2.9 7.7 24.7 58.3 5.5 118 32.4 36.8 48.9 82.7 48.9 132.3 0 102.2-59 188.1-200 212.9a127.5 127.5 0 0138.1 91v112.5c.8 9 0 17.9 15 17.9 177.1-59.7 304.6-227 304.6-424.1 0-247.2-200.4-447.3-447.5-447.3z"}}]},name:"github",theme:"outlined"},Mhe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Ihe}))},The=i.forwardRef(Mhe),Phe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M913.9 552.2L805 181.4v-.1c-7.6-22.9-25.7-36.5-48.3-36.5-23.4 0-42.5 13.5-49.7 35.2l-71.4 213H388.8l-71.4-213c-7.2-21.7-26.3-35.2-49.7-35.2-23.1 0-42.5 14.8-48.4 36.6L110.5 552.2c-4.4 14.7 1.2 31.4 13.5 40.7l368.5 276.4c2.6 3.6 6.2 6.3 10.4 7.8l8.6 6.4 8.5-6.4c4.9-1.7 9-4.7 11.9-8.9l368.4-275.4c12.4-9.2 18-25.9 13.6-40.6zM751.7 193.4c1-1.8 2.9-1.9 3.5-1.9 1.1 0 2.5.3 3.4 3L818 394.3H684.5l67.2-200.9zm-487.4 1c.9-2.6 2.3-2.9 3.4-2.9 2.7 0 2.9.1 3.4 1.7l67.3 201.2H206.5l57.8-200zM158.8 558.7l28.2-97.3 202.4 270.2-230.6-172.9zm73.9-116.4h122.1l90.8 284.3-212.9-284.3zM512.9 776L405.7 442.3H620L512.9 776zm157.9-333.7h119.5L580 723.1l90.8-280.8zm-40.7 293.9l207.3-276.7 29.5 99.2-236.8 177.5z"}}]},name:"gitlab",theme:"outlined"},Dhe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Phe}))},wv=i.forwardRef(Dhe),zhe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z"}}]},name:"global",theme:"outlined"},Ahe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:zhe}))},Kd=i.forwardRef(Ahe),Lhe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM496 208H312c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 544h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H312c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm328 244a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"hdd",theme:"outlined"},_he=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Lhe}))},Bhe=i.forwardRef(_he),Fhe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M536.1 273H488c-4.4 0-8 3.6-8 8v275.3c0 2.6 1.2 5 3.3 6.5l165.3 120.7c3.6 2.6 8.6 1.9 11.2-1.7l28.6-39c2.7-3.7 1.9-8.7-1.7-11.2L544.1 528.5V281c0-4.4-3.6-8-8-8zm219.8 75.2l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3L752.9 334.1a8 8 0 003 14.1zm167.7 301.1l-56.7-19.5a8 8 0 00-10.1 4.8c-1.9 5.1-3.9 10.1-6 15.1-17.8 42.1-43.3 80-75.9 112.5a353 353 0 01-112.5 75.9 352.18 352.18 0 01-137.7 27.8c-47.8 0-94.1-9.3-137.7-27.8a353 353 0 01-112.5-75.9c-32.5-32.5-58-70.4-75.9-112.5A353.44 353.44 0 01171 512c0-47.8 9.3-94.2 27.8-137.8 17.8-42.1 43.3-80 75.9-112.5a353 353 0 01112.5-75.9C430.6 167.3 477 158 524.8 158s94.1 9.3 137.7 27.8A353 353 0 01775 261.7c10.2 10.3 19.8 21 28.6 32.3l59.8-46.8C784.7 146.6 662.2 81.9 524.6 82 285 82.1 92.6 276.7 95 516.4 97.4 751.9 288.9 942 524.8 942c185.5 0 343.5-117.6 403.7-282.3 1.5-4.2-.7-8.9-4.9-10.4z"}}]},name:"history",theme:"outlined"},Hhe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Fhe}))},RP=i.forwardRef(Hhe),Vhe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M946.5 505L560.1 118.8l-25.9-25.9a31.5 31.5 0 00-44.4 0L77.5 505a63.9 63.9 0 00-18.8 46c.4 35.2 29.7 63.3 64.9 63.3h42.5V940h691.8V614.3h43.4c17.1 0 33.2-6.7 45.3-18.8a63.6 63.6 0 0018.7-45.3c0-17-6.7-33.1-18.8-45.2zM568 868H456V664h112v204zm217.9-325.7V868H632V640c0-22.1-17.9-40-40-40H432c-22.1 0-40 17.9-40 40v228H238.1V542.3h-96l370-369.7 23.1 23.1L882 542.3h-96.1z"}}]},name:"home",theme:"outlined"},Whe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Vhe}))},Ym=i.forwardRef(Whe),Uhe={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM653.3 424.6l52.2 52.2a8.01 8.01 0 01-4.7 13.6l-179.4 21c-5.1.6-9.5-3.7-8.9-8.9l21-179.4c.8-6.6 8.9-9.4 13.6-4.7l52.4 52.4 256.2-256.2c3.1-3.1 8.2-3.1 11.3 0l42.4 42.4c3.1 3.1 3.1 8.2 0 11.3L653.3 424.6z"}}]},name:"import",theme:"outlined"},qhe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Uhe}))},E2=i.forwardRef(qhe),Khe={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M885.2 446.3l-.2-.8-112.2-285.1c-5-16.1-19.9-27.2-36.8-27.2H281.2c-17 0-32.1 11.3-36.9 27.6L139.4 443l-.3.7-.2.8c-1.3 4.9-1.7 9.9-1 14.8-.1 1.6-.2 3.2-.2 4.8V830a60.9 60.9 0 0060.8 60.8h627.2c33.5 0 60.8-27.3 60.9-60.8V464.1c0-1.3 0-2.6-.1-3.7.4-4.9 0-9.6-1.3-14.1zm-295.8-43l-.3 15.7c-.8 44.9-31.8 75.1-77.1 75.1-22.1 0-41.1-7.1-54.8-20.6S436 441.2 435.6 419l-.3-15.7H229.5L309 210h399.2l81.7 193.3H589.4zm-375 76.8h157.3c24.3 57.1 76 90.8 140.4 90.8 33.7 0 65-9.4 90.3-27.2 22.2-15.6 39.5-37.4 50.7-63.6h156.5V814H214.4V480.1z"}}]},name:"inbox",theme:"outlined"},Ghe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Khe}))},Jm=i.forwardRef(Ghe),Xhe={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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"},Yhe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Xhe}))},L0=i.forwardRef(Yhe),Jhe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M608 112c-167.9 0-304 136.1-304 304 0 70.3 23.9 135 63.9 186.5L255.8 713.6l-62.3-62.3a8.19 8.19 0 00-11.4 0l-39.8 39.8a8.19 8.19 0 000 11.4l62.3 62.3-44.9 44.9-62.3-62.3a8.19 8.19 0 00-11.4 0l-39.8 39.8a8.19 8.19 0 000 11.4l110.3 111.2c3.1 3.1 8.2 3.1 11.3 0l253.6-253.6A304.1 304.1 0 00608 720c167.9 0 304-136.1 304-304S775.9 112 608 112m161.2 465.2C726.2 620.3 668.9 644 608 644s-118.2-23.7-161.2-66.8C403.7 534.2 380 476.9 380 416s23.7-118.2 66.8-161.2c43-43.1 100.3-66.8 161.2-66.8s118.2 23.7 161.2 66.8c43.1 43 66.8 100.3 66.8 161.2s-23.7 118.2-66.8 161.2"}}]},name:"key",theme:"outlined"},Qhe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Jhe}))},Zhe=i.forwardRef(Qhe),epe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M574 665.4a8.03 8.03 0 00-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 00-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 000 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 000 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 00-11.3 0L372.3 598.7a8.03 8.03 0 000 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z"}}]},name:"link",theme:"outlined"},tpe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:epe}))},qi=i.forwardRef(tpe),npe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z"}}]},name:"mail",theme:"outlined"},rpe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:npe}))},ape=i.forwardRef(rpe),ope={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 000 13.8z"}}]},name:"menu-fold",theme:"outlined"},ipe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:ope}))},lpe=i.forwardRef(ipe),spe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 000-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0014.4 7z"}}]},name:"menu-unfold",theme:"outlined"},cpe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:spe}))},upe=i.forwardRef(cpe),dpe={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M489.5 111.66c30.65-1.8 45.98 36.44 22.58 56.33A243.35 243.35 0 00426 354c0 134.76 109.24 244 244 244 72.58 0 139.9-31.83 186.01-86.08 19.87-23.38 58.07-8.1 56.34 22.53C900.4 745.82 725.15 912 512.5 912 291.31 912 112 732.69 112 511.5c0-211.39 164.29-386.02 374.2-399.65l.2-.01zm-81.15 79.75l-4.11 1.36C271.1 237.94 176 364.09 176 511.5 176 697.34 326.66 848 512.5 848c148.28 0 274.94-96.2 319.45-230.41l.63-1.93-.11.07a307.06 307.06 0 01-159.73 46.26L670 662c-170.1 0-308-137.9-308-308 0-58.6 16.48-114.54 46.27-162.47z"}}]},name:"moon",theme:"outlined"},fpe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:dpe}))},mpe=i.forwardRef(fpe),hpe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M456 231a56 56 0 10112 0 56 56 0 10-112 0zm0 280a56 56 0 10112 0 56 56 0 10-112 0zm0 280a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"more",theme:"outlined"},ppe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:hpe}))},Gg=i.forwardRef(ppe),gpe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M843.5 737.4c-12.4-75.2-79.2-129.1-155.3-125.4S550.9 676 546 752c-153.5-4.8-208-40.7-199.1-113.7 3.3-27.3 19.8-41.9 50.1-49 18.4-4.3 38.8-4.9 57.3-3.2 1.7.2 3.5.3 5.2.5 11.3 2.7 22.8 5 34.3 6.8 34.1 5.6 68.8 8.4 101.8 6.6 92.8-5 156-45.9 159.2-132.7 3.1-84.1-54.7-143.7-147.9-183.6-29.9-12.8-61.6-22.7-93.3-30.2-14.3-3.4-26.3-5.7-35.2-7.2-7.9-75.9-71.5-133.8-147.8-134.4-76.3-.6-140.9 56.1-150.1 131.9s40 146.3 114.2 163.9c74.2 17.6 149.9-23.3 175.7-95.1 9.4 1.7 18.7 3.6 28 5.8 28.2 6.6 56.4 15.4 82.4 26.6 70.7 30.2 109.3 70.1 107.5 119.9-1.6 44.6-33.6 65.2-96.2 68.6-27.5 1.5-57.6-.9-87.3-5.8-8.3-1.4-15.9-2.8-22.6-4.3-3.9-.8-6.6-1.5-7.8-1.8l-3.1-.6c-2.2-.3-5.9-.8-10.7-1.3-25-2.3-52.1-1.5-78.5 4.6-55.2 12.9-93.9 47.2-101.1 105.8-15.7 126.2 78.6 184.7 276 188.9 29.1 70.4 106.4 107.9 179.6 87 73.3-20.9 119.3-93.4 106.9-168.6zM329.1 345.2a83.3 83.3 0 11.01-166.61 83.3 83.3 0 01-.01 166.61zM695.6 845a83.3 83.3 0 11.01-166.61A83.3 83.3 0 01695.6 845z"}}]},name:"node-index",theme:"outlined"},vpe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:gpe}))},rO=i.forwardRef(vpe),bpe={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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm-88-532h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8zm224 0h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8z"}}]},name:"pause-circle",theme:"outlined"},ype=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:bpe}))},xpe=i.forwardRef(ype),Cpe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2zM304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z"}}]},name:"picture",theme:"outlined"},Spe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Cpe}))},aO=i.forwardRef(Spe),wpe={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 64zm144.1 454.9L437.7 677.8a8.02 8.02 0 01-12.7-6.5V353.7a8 8 0 0112.7-6.5L656.1 506a7.9 7.9 0 010 12.9z"}}]},name:"play-circle",theme:"filled"},$pe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:wpe}))},Epe=i.forwardRef($pe),jpe={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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M719.4 499.1l-296.1-215A15.9 15.9 0 00398 297v430c0 13.1 14.8 20.5 25.3 12.9l296.1-215a15.9 15.9 0 000-25.8zm-257.6 134V390.9L628.5 512 461.8 633.1z"}}]},name:"play-circle",theme:"outlined"},Npe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:jpe}))},Fc=i.forwardRef(Npe),Ope={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M280 752h80c4.4 0 8-3.6 8-8V280c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8zm192-280h80c4.4 0 8-3.6 8-8V280c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8v184c0 4.4 3.6 8 8 8zm192 72h80c4.4 0 8-3.6 8-8V280c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8v256c0 4.4 3.6 8 8 8zm216-432H144c-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:"project",theme:"outlined"},kpe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Ope}))},Qm=i.forwardRef(kpe),Rpe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M758.2 839.1C851.8 765.9 912 651.9 912 523.9 912 303 733.5 124.3 512.6 124 291.4 123.7 112 302.8 112 523.9c0 125.2 57.5 236.9 147.6 310.2 3.5 2.8 8.6 2.2 11.4-1.3l39.4-50.5c2.7-3.4 2.1-8.3-1.2-11.1-8.1-6.6-15.9-13.7-23.4-21.2a318.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-9.3 9.3-19.1 18-29.3 26L668.2 724a8 8 0 00-14.1 3l-39.6 162.2c-1.2 5 2.6 9.9 7.7 9.9l167 .8c6.7 0 10.5-7.7 6.3-12.9l-37.3-47.9z"}}]},name:"redo",theme:"outlined"},Ipe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Rpe}))},Mpe=i.forwardRef(Ipe),Tpe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 328a60 60 0 10120 0 60 60 0 10-120 0zM852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-32 660H204V128h616v596zM604 328a60 60 0 10120 0 60 60 0 10-120 0zm250.2 556H169.8c-16.5 0-29.8 14.3-29.8 32v36c0 4.4 3.3 8 7.4 8h729.1c4.1 0 7.4-3.6 7.4-8v-36c.1-17.7-13.2-32-29.7-32zM664 508H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"robot",theme:"outlined"},Ppe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Tpe}))},Dpe=i.forwardRef(Ppe),zpe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 736c0-111.6-65.4-208-160-252.9V317.3c0-15.1-5.3-29.7-15.1-41.2L536.5 95.4C530.1 87.8 521 84 512 84s-18.1 3.8-24.5 11.4L335.1 276.1a63.97 63.97 0 00-15.1 41.2v165.8C225.4 528 160 624.4 160 736h156.5c-2.3 7.2-3.5 15-3.5 23.8 0 22.1 7.6 43.7 21.4 60.8a97.2 97.2 0 0043.1 30.6c23.1 54 75.6 88.8 134.5 88.8 29.1 0 57.3-8.6 81.4-24.8 23.6-15.8 41.9-37.9 53-64a97 97 0 0043.1-30.5 97.52 97.52 0 0021.4-60.8c0-8.4-1.1-16.4-3.1-23.8H864zM762.3 621.4c9.4 14.6 17 30.3 22.5 46.6H700V558.7a211.6 211.6 0 0162.3 62.7zM388 483.1V318.8l124-147 124 147V668H388V483.1zM239.2 668c5.5-16.3 13.1-32 22.5-46.6 16.3-25.2 37.5-46.5 62.3-62.7V668h-84.8zm388.9 116.2c-5.2 3-11.2 4.2-17.1 3.4l-19.5-2.4-2.8 19.4c-5.4 37.9-38.4 66.5-76.7 66.5-38.3 0-71.3-28.6-76.7-66.5l-2.8-19.5-19.5 2.5a27.7 27.7 0 01-17.1-3.5c-8.7-5-14.1-14.3-14.1-24.4 0-10.6 5.9-19.4 14.6-23.8h231.3c8.8 4.5 14.6 13.3 14.6 23.8-.1 10.2-5.5 19.6-14.2 24.5zM464 400a48 48 0 1096 0 48 48 0 10-96 0z"}}]},name:"rocket",theme:"outlined"},Ape=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:zpe}))},Lo=i.forwardRef(Ape),Lpe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zm-405.8-201c-3-4.1-7.8-6.6-13-6.6H336c-6.5 0-10.3 7.4-6.5 12.7l126.4 174a16.1 16.1 0 0026 0l212.6-292.7c3.8-5.3 0-12.7-6.5-12.7h-55.2c-5.1 0-10 2.5-13 6.6L468.9 542.4l-64.7-89.1z"}}]},name:"safety-certificate",theme:"outlined"},_pe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Lpe}))},j2=i.forwardRef(_pe),Bpe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z"}}]},name:"save",theme:"outlined"},Fpe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Bpe}))},N2=i.forwardRef(Fpe),Hpe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M136 384h56c4.4 0 8-3.6 8-8V200h176c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H196c-37.6 0-68 30.4-68 68v180c0 4.4 3.6 8 8 8zm512-184h176v176c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V196c0-37.6-30.4-68-68-68H648c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zM376 824H200V648c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v180c0 37.6 30.4 68 68 68h180c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm512-184h-56c-4.4 0-8 3.6-8 8v176H648c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h180c37.6 0 68-30.4 68-68V648c0-4.4-3.6-8-8-8zm16-164H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},name:"scan",theme:"outlined"},Vpe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Hpe}))},oO=i.forwardRef(Vpe),Wpe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2a15.99 15.99 0 00-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z"}}]},name:"send",theme:"outlined"},Upe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Wpe}))},Hc=i.forwardRef(Upe),qpe={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"},Kpe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:qpe}))},Ms=i.forwardRef(Kpe),Gpe={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 64zm0 820c-205.4 0-372-166.6-372-372 0-89 31.3-170.8 83.5-234.8l523.3 523.3C682.8 852.7 601 884 512 884zm288.5-137.2L277.2 223.5C341.2 171.3 423 140 512 140c205.4 0 372 166.6 372 372 0 89-31.3 170.8-83.5 234.8z"}}]},name:"stop",theme:"outlined"},Xpe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Gpe}))},$v=i.forwardRef(Xpe),Ype={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M548 818v126a16 16 0 01-16 16h-40a16 16 0 01-16-16V818c15.85 1.64 27.84 2.46 36 2.46 8.15 0 20.16-.82 36-2.46m205.25-115.66l89.1 89.1a16 16 0 010 22.62l-28.29 28.29a16 16 0 01-22.62 0l-89.1-89.1c12.37-10.04 21.43-17.95 27.2-23.71 5.76-5.77 13.67-14.84 23.71-27.2m-482.5 0c10.04 12.36 17.95 21.43 23.71 27.2 5.77 5.76 14.84 13.67 27.2 23.71l-89.1 89.1a16 16 0 01-22.62 0l-28.29-28.29a16 16 0 010-22.63zM512 278c129.24 0 234 104.77 234 234S641.24 746 512 746 278 641.24 278 512s104.77-234 234-234m0 72c-89.47 0-162 72.53-162 162s72.53 162 162 162 162-72.53 162-162-72.53-162-162-162M206 476c-1.64 15.85-2.46 27.84-2.46 36 0 8.15.82 20.16 2.46 36H80a16 16 0 01-16-16v-40a16 16 0 0116-16zm738 0a16 16 0 0116 16v40a16 16 0 01-16 16H818c1.64-15.85 2.46-27.84 2.46-36 0-8.15-.82-20.16-2.46-36zM814.06 180.65l28.29 28.29a16 16 0 010 22.63l-89.1 89.09c-10.04-12.37-17.95-21.43-23.71-27.2-5.77-5.76-14.84-13.67-27.2-23.71l89.1-89.1a16 16 0 0122.62 0m-581.5 0l89.1 89.1c-12.37 10.04-21.43 17.95-27.2 23.71-5.76 5.77-13.67 14.84-23.71 27.2l-89.1-89.1a16 16 0 010-22.62l28.29-28.29a16 16 0 0122.62 0M532 64a16 16 0 0116 16v126c-15.85-1.64-27.84-2.46-36-2.46-8.15 0-20.16.82-36 2.46V80a16 16 0 0116-16z"}}]},name:"sun",theme:"outlined"},Jpe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Ype}))},iO=i.forwardRef(Jpe),Qpe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z"}}]},name:"sync",theme:"outlined"},Zpe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Qpe}))},Zm=i.forwardRef(Zpe),ege={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z"}}]},name:"thunderbolt",theme:"outlined"},tge=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:ege}))},IP=i.forwardRef(tge),nge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M876.6 239.5c-.5-.9-1.2-1.8-2-2.5-5-5-13.1-5-18.1 0L684.2 409.3l-67.9-67.9L788.7 169c.8-.8 1.4-1.6 2-2.5 3.6-6.1 1.6-13.9-4.5-17.5-98.2-58-226.8-44.7-311.3 39.7-67 67-89.2 162-66.5 247.4l-293 293c-3 3-2.8 7.9.3 11l169.7 169.7c3.1 3.1 8.1 3.3 11 .3l292.9-292.9c85.5 22.8 180.5.7 247.6-66.4 84.4-84.5 97.7-213.1 39.7-311.3zM786 499.8c-58.1 58.1-145.3 69.3-214.6 33.6l-8.8 8.8-.1-.1-274 274.1-79.2-79.2 230.1-230.1s0 .1.1.1l52.8-52.8c-35.7-69.3-24.5-156.5 33.6-214.6a184.2 184.2 0 01144-53.5L537 318.9a32.05 32.05 0 000 45.3l124.5 124.5a32.05 32.05 0 0045.3 0l132.8-132.8c3.7 51.8-14.4 104.8-53.6 143.9z"}}]},name:"tool",theme:"outlined"},rge=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:nge}))},O2=i.forwardRef(rge),age={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"},oge=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:age}))},MP=i.forwardRef(oge),ige={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"},lge=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:ige}))},Ev=i.forwardRef(lge),sge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 302.3L784 376V224c0-35.3-28.7-64-64-64H128c-35.3 0-64 28.7-64 64v576c0 35.3 28.7 64 64 64h592c35.3 0 64-28.7 64-64V648l128 73.7c21.3 12.3 48-3.1 48-27.6V330c0-24.6-26.7-40-48-27.7zM712 792H136V232h576v560zm176-167l-104-59.8V458.9L888 399v226zM208 360h112c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H208c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}}]},name:"video-camera",theme:"outlined"},cge=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:sge}))},uge=i.forwardRef(cge),dge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 720a48 48 0 1096 0 48 48 0 10-96 0zm16-304v184c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V416c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8zm475.7 440l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zm-783.5-27.9L512 239.9l339.8 588.2H172.2z"}}]},name:"warning",theme:"outlined"},fge=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:dge}))},TP=i.forwardRef(fge);const mge="0.1.108",Wu={version:mge};async function tt(e,t){const n=await fetch(e,t);if(!n.ok)throw new Error((await n.json().catch(()=>({}))).error||"Something went wrong. Please try again.");return n.status===204?null:n.json()}const Pr={list:()=>tt("/api/launchers"),running:()=>tt("/api/launchers/running"),create:e=>tt("/api/launchers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),update:(e,t)=>tt(`/api/launchers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),remove:e=>tt(`/api/launchers/${e}`,{method:"DELETE"}),start:e=>tt(`/api/launchers/${e}/start`,{method:"POST"}),openTerminal:e=>tt(`/api/launchers/${e}/open-terminal`,{method:"POST"}),run:(e,t)=>tt(`/api/launchers/${e}/scripts/${t}/run`,{method:"POST"}),runInstall:e=>tt(`/api/launchers/${e}/install/run`,{method:"POST"}),stop:async(e,t)=>{try{return await tt(`/api/launchers/${e}/stop`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({scriptId:t})})}catch{return tt(`/api/launchers/${e}/scripts/${encodeURIComponent(t)}/stop`,{method:"POST"})}},logs:(e,t)=>tt(`/api/launchers/${e}/scripts/${t}/logs`),errorLogs:(e,t)=>tt(`/api/launchers/${e}/scripts/${t}/logs/error`),clearLogs:(e,t)=>tt(`/api/launchers/${e}/scripts/${encodeURIComponent(t)}/logs`,{method:"DELETE"}),packageScripts:e=>tt(`/api/launchers/${e}/package-scripts`),runPackageScript:(e,t)=>tt(`/api/launchers/${e}/package-scripts/${encodeURIComponent(t)}/run`,{method:"POST"}),packageScriptLogs:(e,t)=>tt(`/api/launchers/${e}/package-scripts/${encodeURIComponent(t)}/logs`),packageScriptErrorLogs:(e,t)=>tt(`/api/launchers/${e}/package-scripts/${encodeURIComponent(t)}/logs/error`),clearPackageScriptLogs:(e,t)=>tt(`/api/launchers/${e}/package-scripts/${encodeURIComponent(t)}/logs`,{method:"DELETE"})},lO={get:()=>tt("/api/overview"),notifications:()=>tt("/api/overview/notifications")},hge={list:()=>tt("/api/plugins")},Bi={list:e=>tt(`/api/clipboard${e?`?date=${encodeURIComponent(e)}`:""}`),search:e=>tt(`/api/clipboard/search?q=${encodeURIComponent(e)}`),tagged:()=>tt("/api/clipboard/tagged"),remove:(e,t)=>tt(`/api/clipboard/${encodeURIComponent(e)}/${encodeURIComponent(t)}`,{method:"DELETE"}),uploadImage:e=>tt("/api/clipboard/image",{method:"POST",headers:{"Content-Type":e.type||"image/png"},body:e}),updateTags:(e,t,n)=>tt(`/api/clipboard/${encodeURIComponent(e)}/${encodeURIComponent(t)}/tags`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tags:n})}),copied:(e,t)=>tt(`/api/clipboard/${encodeURIComponent(e)}/${encodeURIComponent(t)}/copied`,{method:"POST"}),copyImage:(e,t)=>tt(`/api/clipboard/${encodeURIComponent(e)}/${encodeURIComponent(t)}/copy-image`,{method:"POST"})},gl={list:()=>tt("/api/group-tasks"),catalog:()=>tt("/api/group-tasks/catalog"),create:e=>tt("/api/group-tasks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),update:(e,t)=>tt(`/api/group-tasks/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),remove:e=>tt(`/api/group-tasks/${e}`,{method:"DELETE"}),start:e=>tt(`/api/group-tasks/${e}/start`,{method:"POST"}),stop:e=>tt(`/api/group-tasks/${e}/stop`,{method:"POST"})},fx={list:()=>tt("/api/port-diagnostics"),get:e=>tt(`/api/port-diagnostics/${encodeURIComponent(e)}`),kill:(e,t)=>tt("/api/port-diagnostics/kill",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({port:e,pid:t})})},PP={open:e=>tt("/api/settings/open-url",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e})}),openPath:(e,t="")=>tt("/api/settings/open-editor",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e,location:t})}),openFolder:e=>tt("/api/settings/open-folder",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e})})},Xn={status:()=>tt("/api/settings"),devConfigurations:()=>tt("/api/settings/dev-configurations"),selectDirectory:()=>tt("/api/settings/select-directory",{method:"POST"}),selectFile:()=>tt("/api/settings/select-file",{method:"POST"}),openDataDir:()=>tt("/api/settings/open-data-dir",{method:"POST"}),openFolder:e=>tt("/api/settings/open-folder",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e})}),revealFolder:e=>tt("/api/settings/reveal-folder",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e})}),saveDomain:e=>tt("/api/settings/domain",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({domain:e})}),saveAiApiHost:e=>tt("/api/settings/ai-api-host",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({aiApiHost:e})}),saveJiraIssuePrefix:e=>tt("/api/settings/jira-issue-prefix",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({jiraIssuePrefix:e})}),saveDefaultEditor:e=>tt("/api/settings/default-editor",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({defaultEditor:e})}),saveDefaultBrowser:e=>tt("/api/settings/default-browser",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({defaultBrowser:e})}),saveTheme:e=>tt("/api/settings/theme",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({theme:e})}),saveDevConfigurations:e=>tt("/api/settings/dev-configurations",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),saveAccessToken:(e,t)=>tt(`/api/settings/${encodeURIComponent(e)}-access-token`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:t})}),saveClipboardEnabled:e=>tt("/api/settings/clipboard-enabled",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:e})}),saveClipboardImageEnabled:e=>tt("/api/settings/clipboard-image-enabled",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:e})}),saveClipboardDeduplicateMinutes:e=>tt("/api/settings/clipboard-deduplicate-minutes",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({minutes:e})})},sO={status:(e=!1)=>tt(`/api/updates${e?"?refresh=1":""}`),selfUpdate:(e="latest")=>tt("/api/updates/self-update",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({version:e})})},pge={install:e=>tt("/api/settings/dev-configurations/nvm/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({version:e})})},xc={manage:(e,t)=>tt(`/api/settings/dev-configurations/npm/${encodeURIComponent(e)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({packageName:t})}),versions:e=>tt("/api/settings/dev-configurations/npm/versions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({packageName:e})}),useSuggestedPrefix:()=>tt("/api/settings/dev-configurations/npm/use-prefix-suggestion",{method:"POST"})};xc.search=e=>tt("/api/settings/dev-configurations/npm/search",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:e})});const mx={stats:()=>tt("/api/data-backup/stats"),export:async()=>{var r;const e=await fetch("/api/data-backup/export");if(!e.ok)throw new Error((await e.json().catch(()=>({}))).error||"Unable to export data backup.");const n=((r=(e.headers.get("Content-Disposition")||"").match(/filename="([^"]+)"/))==null?void 0:r[1])||"devbuddy-data-backup.tar.gz";return{blob:await e.blob(),filename:n}},import:e=>tt("/api/data-backup/import",{method:"POST",headers:{"Content-Type":"application/gzip"},body:e})},Sm={get:()=>tt("/api/presentations"),save:e=>tt("/api/presentations",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({plans:e})}),setActive:e=>tt("/api/presentations/active",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({plan:e})})},ic={check:e=>tt("/api/pr-review/check",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prLink:e})}),aiReview:e=>tt(`/api/pr-review/ai-review/${encodeURIComponent(e)}`),rules:()=>tt("/api/pr-review/rules"),saveRules:(e,t,n)=>tt("/api/pr-review/rules",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({rules:e,customRules:t,fileFilters:n})}),myPrs:()=>tt("/api/pr-review/my-prs"),reviewPrs:()=>tt("/api/pr-review/review-prs"),comment:e=>tt("/api/pr-review/comment",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})},hg={load:e=>tt("/api/pr-conflicts/load",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prUrl:e})}),myConflicts:()=>tt("/api/pr-conflicts/my-conflicts"),resolve:e=>tt("/api/pr-conflicts/resolve",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),checkBranch:e=>tt("/api/pr-conflicts/check-branch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})},Ba={list:()=>tt("/api/jira-filters"),create:e=>tt("/api/jira-filters",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),update:(e,t)=>tt(`/api/jira-filters/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),remove:e=>tt(`/api/jira-filters/${e}`,{method:"DELETE"}),issues:e=>tt(`/api/jira-filters/${e}/issues`),cloneIssue:e=>tt("/api/jira-filters/issues/clone",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),templates:{list:()=>tt("/api/jira-filters/templates"),create:e=>tt("/api/jira-filters/templates",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),update:(e,t)=>tt(`/api/jira-filters/templates/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),remove:e=>tt(`/api/jira-filters/templates/${e}`,{method:"DELETE"})},recentlyCreated:()=>tt("/api/jira-filters/recently-created"),recentlyCommented:()=>tt("/api/jira-filters/recently-commented"),recentlyMentioned:()=>tt("/api/jira-filters/recently-mentioned"),recentlyUpdated:()=>tt("/api/jira-filters/recently-updated")},Ha={list:()=>tt("/api/todos"),create:e=>tt("/api/todos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),update:(e,t)=>tt(`/api/todos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),remove:e=>tt(`/api/todos/${e}`,{method:"DELETE"}),archive:e=>tt(`/api/todos/${e}/archive`,{method:"POST"}),unarchive:e=>tt(`/api/todos/${e}/unarchive`,{method:"POST"}),batch:(e,t)=>tt("/api/todos/batch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,ids:t})})},os={list:()=>tt("/api/memos"),listImages:()=>tt("/api/memos/images"),uploadImage:e=>tt("/api/memos/images",{method:"POST",headers:{"Content-Type":e.type||"image/png"},body:e}),create:e=>tt("/api/memos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),update:(e,t)=>tt(`/api/memos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),remove:e=>tt(`/api/memos/${e}`,{method:"DELETE"}),removeImage:e=>tt(`/api/memos/images/${encodeURIComponent(e)}`,{method:"DELETE"})},Wi={list:()=>tt("/api/mind-maps"),get:e=>tt(`/api/mind-maps/${encodeURIComponent(e)}`),resolveJiraIssue:e=>tt("/api/mind-maps/jira-issues/resolve",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({input:e})}),create:e=>tt("/api/mind-maps",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),update:(e,t)=>tt(`/api/mind-maps/${encodeURIComponent(e)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),remove:e=>tt(`/api/mind-maps/${encodeURIComponent(e)}`,{method:"DELETE"})},Cc={list:()=>tt("/api/static-pages"),create:e=>tt("/api/static-pages",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),update:(e,t)=>tt(`/api/static-pages/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),remove:e=>tt(`/api/static-pages/${e}`,{method:"DELETE"})},Nc={list:()=>tt("/api/errors"),log:e=>tt("/api/errors",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),clear:()=>tt("/api/errors",{method:"DELETE"}),remove:e=>tt(`/api/errors/${e}`,{method:"DELETE"})},is={getData:()=>tt("/api/postman"),importCollection:e=>tt("/api/postman/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({collectionJson:e})}),createCollection:e=>tt("/api/postman/collections",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),updateCollection:(e,t)=>tt(`/api/postman/collections/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),deleteCollection:e=>tt(`/api/postman/collections/${e}`,{method:"DELETE"}),saveEnvironments:e=>tt("/api/postman/environments",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),sendRequest:e=>tt("/api/postman/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})},hx={status:()=>tt("/api/bookmark-sync/status"),preview:e=>tt(`/api/bookmark-sync/preview?mode=${encodeURIComponent(e)}`),sync:e=>tt("/api/bookmark-sync/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:e})})},fm={scan:e=>tt("/api/file-organizer/scan",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),execute:e=>tt("/api/file-organizer/execute",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),getHistory:()=>tt("/api/file-organizer/history"),undo:e=>tt("/api/file-organizer/undo",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:e})}),browse:e=>tt("/api/file-organizer/browse",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e})})},vl={listApps:()=>tt("/api/branch-sync/apps"),createApp:e=>tt("/api/branch-sync/apps",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),updateApp:(e,t)=>tt(`/api/branch-sync/apps/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),deleteApp:e=>tt(`/api/branch-sync/apps/${e}`,{method:"DELETE"}),check:e=>tt("/api/branch-sync/check",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({app:e})}),createPr:e=>tt("/api/branch-sync/create-pr",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),createBranch:e=>tt("/api/branch-sync/create-branch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),getBranches:e=>tt(`/api/branch-sync/branches?repo=${encodeURIComponent(e)}`)},Kf={repositories:e=>tt(`/api/branch-health/repositories?workspaceDir=${encodeURIComponent(e)}`),history:()=>tt("/api/branch-health/history"),scan:e=>tt("/api/branch-health/scan",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({folder:e})}),preflight:(e,t)=>tt("/api/branch-health/preflight",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({folder:e,branch:t})}),remove:(e,t,n)=>tt("/api/branch-health/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({folder:e,branch:t,...n})})},mo={config:()=>tt("/api/package-upgrade/config"),dependencyScan:()=>tt("/api/package-upgrade/dependency-scan"),dependencyRepositories:()=>tt("/api/package-upgrade/dependency-repositories"),saveDependencyRepositories:e=>tt("/api/package-upgrade/dependency-repositories",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({directories:e})}),saveConfig:e=>tt("/api/package-upgrade/config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspaceDir:e})}),addRepo:e=>tt("/api/package-upgrade/repos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),packageNames:e=>tt("/api/package-upgrade/repos/packages",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({repoIds:e})}),branches:e=>tt("/api/package-upgrade/repos/branches",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({repoIds:e})}),cloneRepo:e=>tt(`/api/package-upgrade/repos/${e}/clone`,{method:"POST"}),removeRepo:e=>tt(`/api/package-upgrade/repos/${e}`,{method:"DELETE"}),createTask:e=>tt("/api/package-upgrade/tasks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})},gge="modulepreload",vge=function(e){return"/"+e},cO={},Vc=function(t,n,r){let a=Promise.resolve();if(n&&n.length>0){let l=function(f){return Promise.all(f.map(h=>Promise.resolve(h).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),d=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));a=l(n.map(f=>{if(f=vge(f),f in cO)return;cO[f]=!0;const h=f.endsWith(".css"),p=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${p}`))return;const g=document.createElement("link");if(g.rel=h?"stylesheet":gge,h||(g.as="script"),g.crossOrigin="",g.href=f,d&&g.setAttribute("nonce",d),document.head.appendChild(g),h)return new Promise((v,y)=>{g.addEventListener("load",v),g.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${f}`)))})}))}function o(l){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=l,window.dispatchEvent(s),!s.defaultPrevented)throw l}return a.then(l=>{for(const s of l||[])s.status==="rejected"&&o(s.reason);return t().catch(o)})};async function DP(e,t,n){const r=URL.createObjectURL(e);try{const a=await new Promise((f,h)=>{const p=new Image;p.onload=()=>f(p),p.onerror=()=>h(new Error("Unable to read this image. Please choose a valid image file.")),p.src=r}),o=document.createElement("canvas"),l=Math.max(a.naturalWidth,a.naturalHeight);let s=1;t&&(s=t/l),n!=null&&n>0&&n<=100&&(s=s*(n/100)),o.width=Math.max(1,Math.round(a.naturalWidth*s)),o.height=Math.max(1,Math.round(a.naturalHeight*s));const d=o.getContext("2d",{willReadFrequently:!0});return d.drawImage(a,0,0,o.width,o.height),{imageData:d.getImageData(0,0,o.width,o.height),width:o.width,height:o.height}}finally{URL.revokeObjectURL(r)}}async function bge(e,t={}){const{quality:n=75,progressive:r=!0,optimizeCoding:a=!0,autoSubsample:o=!0}=t,[{encode:l},{imageData:s}]=await Promise.all([Vc(()=>import("./index-_vMuByUV.js"),[]),DP(e)]),d=await l(s,{quality:n,progressive:r,optimize_coding:a,auto_subsample:o}),f=new Blob([d],{type:"image/jpeg"}),h=(e.name||"clipboard-image.png").replace(/\.[^.]+$/,"")+".jpg";return new File([f],h,{type:"image/jpeg"})}const{Paragraph:yge,Text:xge,Title:Cge}=wn;function Xr({actions:e,className:t="",copyClassName:n="",description:r,descriptionClassName:a="",eyebrow:o="WORKBENCH",title:l,titleClassName:s="",titlePrefix:d,titleSuffix:f,titleRowClassName:h=""}){const p=c.jsx(Cge,{className:s||void 0,level:2,children:l});return c.jsxs("header",{className:["page-header","workspace-page-header",t].filter(Boolean).join(" "),children:[c.jsxs("div",{className:n||void 0,children:[c.jsx(xge,{className:"workspace-page-eyebrow",children:o}),d||f?c.jsxs("div",{className:h||void 0,children:[d,p,f]}):p,r?c.jsx(yge,{className:["workspace-page-description",a].filter(Boolean).join(" "),type:"secondary",children:r}):null]}),e||null]})}const uO=[{value:"chrome",label:"Google Chrome"},{value:"edge",label:"Microsoft Edge"},{value:"safari",label:"Safari"}];function Sge(e=!0){return e?uO:uO.filter(t=>t.value!=="safari")}function hr(e){e&&PP.open(e).catch(()=>{window.open(e,"_blank")})}function _0(e,t){if(!e||!t)return"";const n=e.replace(/^https?:\/\//,"").replace(/\/+$/,"");return`https://${n.startsWith("jira.")?n:`jira.${n}`}/browse/${t.toUpperCase()}`}function wge(e,t){if(!t)return"";if(!e)return`https://jira.example.com/issues/?filter=${encodeURIComponent(t)}`;const n=e.replace(/^https?:\/\//i,"").replace(/\/+$/,"");return`https://${n.includes("jira")||n.includes(".atlassian.net")?n:`jira.${n}`}/issues/?filter=${encodeURIComponent(t)}`}const{Text:lc}=wn,Uu=()=>new Intl.DateTimeFormat("en-CA").format(new Date),$ge=[{value:0,label:"No deduplication (0 min)"},{value:5,label:"5 minutes"},{value:15,label:"15 minutes"},{value:30,label:"30 minutes"},{value:60,label:"1 hour (Default)"},{value:120,label:"2 hours"},{value:360,label:"6 hours"},{value:720,label:"12 hours"},{value:1440,label:"24 hours"}];function Ege({value:e,domain:t,jiraIssuePrefix:n}){const r=[],a=/\[[^\]]+\]\(https?:\/\/[^\s)]+\)|https?:\/\/[^\s]+/g;let o=0;const l=(n||"").split(/[\s,]+/).filter(Boolean).map(f=>f.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),s=l.length>0&&t?new RegExp(`\\b(?:${l.join("|")})-[a-zA-Z0-9]{1,10}\\b`,"gi"):null,d=(f,h)=>{if(!s||!t)return f;const p=[];let g=0;s.lastIndex=0;for(const v of f.matchAll(s)){v.index>g&&p.push(f.slice(g,v.index));const y=v[0],C=_0(t,y);p.push(c.jsx("a",{href:C,target:"_blank",rel:"noreferrer",onClick:x=>{x.preventDefault(),hr(C)},children:y},`${h}-${v.index}`)),g=v.index+y.length}return g<f.length&&p.push(f.slice(g)),p};for(const f of e.matchAll(a)){f.index>o&&r.push(...d(e.slice(o,f.index),`txt-${f.index}`));const h=f[0].match(/^\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)$/);if(h)r.push(c.jsx("a",{href:h[2],target:"_blank",rel:"noreferrer",onClick:p=>{p.preventDefault(),hr(h[2])},children:h[1]},f.index));else{const p=f[0].replace(/[),.;:!?]+$/,"");r.push(c.jsx("a",{href:p,target:"_blank",rel:"noreferrer",onClick:g=>{g.preventDefault(),hr(p)},children:p},f.index)),f[0].length>p.length&&r.push(f[0].slice(p.length))}o=f.index+f[0].length}return o<e.length&&r.push(...d(e.slice(o),"txt-end")),r}const dO=e=>e.text||e.preview||"",fO=e=>`/api/clipboard/image/${encodeURIComponent(e)}`;async function jge(e){if(e.type==="image/png")return e;const t=URL.createObjectURL(e);try{const n=await new Promise((o,l)=>{const s=new window.Image;s.onload=()=>o(s),s.onerror=()=>l(new Error("Unable to decode clipboard image.")),s.src=t}),r=document.createElement("canvas");r.width=n.naturalWidth,r.height=n.naturalHeight;const a=r.getContext("2d");if(!a)throw new Error("Image canvas is unavailable.");return a.drawImage(n,0,0),await new Promise((o,l)=>{r.toBlob(s=>{s?o(s):l(new Error("Unable to encode clipboard image as PNG."))},"image/png")})}finally{URL.revokeObjectURL(t)}}function qu(e,t,n){const r=e.trim();if(!r)return!1;if(t==="account")return r.length<=20&&(/^[AT]\d+/i.test(r)||/\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b/i.test(r)||/\b(?:account|username|user\s*name|login|帐号|账号|用户名)\s*[:=]/i.test(r));if(t==="id")return/^[a-zA-Z0-9]+-[a-zA-Z0-9]+-[a-zA-Z0-9]+-[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*$/i.test(r);if(t==="url")return/^https?:\/\/[^\s]+$/i.test(r);if(t==="json"){if(r.startsWith("{")&&r.endsWith("}")||r.startsWith("[")&&r.endsWith("]"))try{return JSON.parse(r),!0}catch{return!1}return!1}if(t==="jira"){const a=(n||"").split(/[\s,]+/).filter(Boolean).map(o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"));return a.length>0?new RegExp(`\\b(?:${a.join("|")})-[a-zA-Z0-9]{1,10}\\b`,"i").test(r):/\b[A-Z]{2,10}-[a-zA-Z0-9]{1,10}\b/i.test(r)}return!0}function Nge({children:e}){const t=i.useRef(null),[n,r]=i.useState(!1);return i.useEffect(()=>{const a=t.current;if(!a)return;const o=()=>{r(a.scrollTop+a.clientHeight<a.scrollHeight-1)};o(),a.addEventListener("scroll",o,{passive:!0});const l=typeof ResizeObserver<"u"?new ResizeObserver(o):null;return l==null||l.observe(a),()=>{a.removeEventListener("scroll",o),l==null||l.disconnect()}},[e]),c.jsxs("div",{className:`clipboard-preview-wrap${n?" has-more":""}`,children:[c.jsx("pre",{ref:t,className:"clipboard-preview",children:e}),c.jsx("span",{className:"clipboard-preview-fade","aria-hidden":"true"})]})}function Oge(){const{message:e}=Br.useApp(),[t,n]=i.useState(()=>{const re=localStorage.getItem("buddy_clipboard_enabled");return re!==null?re==="true":!0}),[r,a]=i.useState(!0),[o,l]=i.useState([]),[s,d]=i.useState(Uu()),[f,h]=i.useState([]),[p,g]=i.useState([]),[v,y]=i.useState(null),[C,x]=i.useState(""),[S,$]=i.useState("all"),[E,k]=i.useState(null),[O,N]=i.useState(!1),[R,j]=i.useState(""),[I,M]=i.useState(""),[P,A]=i.useState([]),[H,T]=i.useState(!1),[L,D]=i.useState(""),[F,V]=i.useState(""),[q,B]=i.useState(60),[U,K]=i.useState(!1),[_,G]=i.useState(!0);i.useEffect(()=>{Xn.status().then(re=>{if(re){if(re.isMac!==void 0&&K(re.isMac),re.clipboardEnabled!==void 0){const ce=re.clipboardEnabled!==!1;n(ce),localStorage.setItem("buddy_clipboard_enabled",String(ce))}re.clipboardImageEnabled!==void 0&&G(re.clipboardImageEnabled!==!1),re.clipboardDeduplicateMinutes!==void 0&&B(re.clipboardDeduplicateMinutes),re.domain&&D(re.domain),re.jiraIssuePrefix&&V(re.jiraIssuePrefix)}}).catch(()=>{}).finally(()=>a(!1))},[]);const X=async re=>{n(re),localStorage.setItem("buddy_clipboard_enabled",String(re));try{const ve=(await Xn.saveClipboardEnabled(re)).clipboardEnabled!==!1;n(ve),localStorage.setItem("buddy_clipboard_enabled",String(ve)),e.success(re?"Clipboard history enabled":"Clipboard history disabled")}catch(ce){e.error(ce.message)}},Y=async re=>{G(re);try{const ce=await Xn.saveClipboardImageEnabled(re);ce&&ce.clipboardImageEnabled!==void 0&&G(ce.clipboardImageEnabled!==!1),e.success(re?"Image clipboard monitoring enabled":"Image clipboard monitoring disabled")}catch(ce){e.error(ce.message)}},le=async re=>{B(re);try{await Xn.saveClipboardDeduplicateMinutes(re),e.success("Duplicate filter window updated.")}catch(ce){e.error(ce.message)}};i.useEffect(()=>{const re=I.trim();if(!re){A([]),T(!1);return}let ce=!1,ve=null;const be=Date.now();T(!0);const Ce=setTimeout(async()=>{try{const ge=await Bi.search(re);ce||A(ge.items||[])}catch(ge){ce||e.error(ge.message)}finally{const ge=Math.max(0,500-(Date.now()-be));ve=setTimeout(()=>{ce||T(!1)},ge)}},250);return()=>{ce=!0,clearTimeout(Ce),ve&&clearTimeout(ve)}},[I]);const oe=async re=>{try{const[ce,ve]=await Promise.all([Bi.list(re),Bi.tagged().catch(()=>({items:[]}))]);l(ce.dates),h(ce.items),g(ve.items||[])}catch(ce){e.error(ce.message)}},ue=async(re,ce)=>{const ve=(ce||"").trim();if(!ve)return;const be=re.tags||[];if(be.includes(ve)){y(null);return}const Ce=[...be,ve],ge=re.date||s;try{await Bi.updateTags(ge,re.id,Ce),h(Oe=>Oe.map(Ee=>Ee.id===re.id?{...Ee,tags:Ce}:Ee)),A(Oe=>Oe.map(Ee=>Ee.id===re.id?{...Ee,tags:Ce}:Ee)),g(Oe=>Oe.some(De=>De.id===re.id)?Oe.map(De=>De.id===re.id?{...De,tags:Ce}:De):[{...re,tags:Ce,date:ge},...Oe]),e.success("Tag added")}catch(Oe){e.error(Oe.message)}finally{y(null),x("")}},ne=async(re,ce)=>{const be=(re.tags||[]).filter(ge=>ge!==ce),Ce=re.date||s;try{await Bi.updateTags(Ce,re.id,be),h(ge=>ge.map(Oe=>Oe.id===re.id?{...Oe,tags:be}:Oe)),A(ge=>ge.map(Oe=>Oe.id===re.id?{...Oe,tags:be}:Oe)),g(ge=>be.length===0?ge.filter(Oe=>Oe.id!==re.id):ge.map(Oe=>Oe.id===re.id?{...Oe,tags:be}:Oe)),e.success("Tag removed")}catch(ge){e.error(ge.message)}},te=i.useRef(Uu());i.useEffect(()=>{if(!t)return;const re=()=>{const Ce=Uu();if(Ce!==te.current){const ge=te.current;if(te.current=Ce,s===ge)return d(Ce),!0}return!1};re()||oe(s);const ve=()=>{re()||oe(s)};window.addEventListener("visibilitychange",ve),window.addEventListener("focus",ve);let be=null;return s===Uu()&&(be=setInterval(()=>{document.visibilityState==="visible"&&oe(s)},3e3)),()=>{window.removeEventListener("visibilitychange",ve),window.removeEventListener("focus",ve),be&&clearInterval(be)}},[s,t]);const ee=async re=>{const ce=typeof re=="object"?re:{id:re},ve=ce.date||s;try{await Bi.remove(ve,ce.id),A(be=>be.filter(Ce=>Ce.id!==ce.id)),await oe(s),e.success("Clipboard entry deleted.")}catch(be){e.error(be.message)}},Q=async re=>{var ve;const ce=re.date||s;if(re.imageFile)try{if(!((ve=navigator.clipboard)!=null&&ve.write)||typeof window.ClipboardItem>"u")throw new Error("Image clipboard is not supported by this browser.");await Bi.copied(ce,re.id);const be=await fetch(fO(re.imageFile));if(!be.ok)throw new Error("Unable to load image.");const Ce=await jge(await be.blob());try{await navigator.clipboard.write([new ClipboardItem({"image/png":Ce})])}catch(ge){await Bi.copyImage(ce,re.id).catch(()=>{throw ge})}k(re.id),setTimeout(()=>{k(ge=>ge===re.id?null:ge)},1e3)}catch(be){e.error("Failed to copy image: "+be.message)}else navigator.clipboard.writeText(re.text||re.preview),Bi.copied(ce,re.id).catch(()=>{}),k(re.id),setTimeout(()=>{k(be=>be===re.id?null:be)},1e3)},ae=i.useMemo(()=>[...new Set([Uu(),...o,s])],[o,s]);i.useEffect(()=>{if(!t)return;const re=ce=>{const ve=document.activeElement;if(ve&&(ve.tagName==="INPUT"||ve.tagName==="TEXTAREA"||ve.isContentEditable||ve.closest(".clipboard-tabs")))return;const be=[...ae].sort(),Ce=be.indexOf(s);ce.key==="ArrowLeft"?Ce>0&&d(be[Ce-1]):ce.key==="ArrowRight"&&Ce<be.length-1&&Ce!==-1&&d(be[Ce+1])};return window.addEventListener("keydown",re),()=>window.removeEventListener("keydown",re)},[ae,s,t]),i.useEffect(()=>{if(!t)return;const re=async ce=>{var Ce;const ve=document.activeElement;if(ve&&(ve.tagName==="INPUT"||ve.tagName==="TEXTAREA"||ve.isContentEditable))return;const be=(Ce=ce.clipboardData)==null?void 0:Ce.items;if(be){for(const ge of be)if(ge.type.startsWith("image/")){const Oe=ge.getAsFile();if(Oe){try{e.loading({content:"Compressing and saving image from paste…",key:"paste-upload",duration:0});const Ee=await bge(Oe);await Bi.uploadImage(Ee);const De=Uu();d(De),await oe(De),e.success({content:"Image pasted and saved to history!",key:"paste-upload"})}catch(Ee){e.error({content:"Failed to save pasted image: "+Ee.message,key:"paste-upload"})}break}}}};return window.addEventListener("paste",re),()=>window.removeEventListener("paste",re)},[s,t]);const fe=ae.reduce((re,ce)=>{var ge;const[ve,be,Ce]=ce.split("-");return re[ve]||(re[ve]={}),(ge=re[ve])[be]||(ge[be]=[]),re[ve][be].includes(Ce)||re[ve][be].push(Ce),re},{}),J=Object.entries(fe).sort(([re],[ce])=>ce.localeCompare(re)).map(([re,ce])=>({value:re,label:re,children:Object.entries(ce).sort(([ve],[be])=>be.localeCompare(ve)).map(([ve,be])=>({value:ve,label:ve,children:be.sort().reverse().map(Ce=>({value:Ce,label:Ce}))}))})),Z=I.trim(),he=i.useMemo(()=>S==="tagged"?p:S==="all"?f:S==="image"?f.filter(re=>!!re.imageFile):f.filter(re=>!re.imageFile&&qu(dO(re),S,F)),[S,f,p,F]),$e=i.useMemo(()=>{const re={all:f.length,tagged:p.length,jira:0,account:0,id:0,url:0,json:0,image:0};for(const ve of f)if(ve.imageFile)re.image++;else{const be=dO(ve);qu(be,"jira",F)&&re.jira++,qu(be,"account")&&re.account++,qu(be,"id")&&re.id++,qu(be,"url")&&re.url++,qu(be,"json")&&re.json++}const ce=[{key:"all",label:`All (${re.all})`},{key:"tagged",label:`Tagged (${re.tagged})`},{key:"jira",label:`Jira (${re.jira})`},{key:"account",label:`Account (${re.account})`},{key:"id",label:`ID (${re.id})`},{key:"url",label:`Url (${re.url})`},{key:"json",label:`JSON (${re.json})`}];return U&&ce.push({key:"image",label:`Img (${re.image})`}),ce},[f,p,F,U]);i.useEffect(()=>{!U&&S==="image"&&$("all")},[U,S]);const Ie=(re,ce=!1)=>{const ve=re.date||s,be=`/api/clipboard/${encodeURIComponent(ve)}/${encodeURIComponent(re.id)}`,Ce=new Date(re.createdAt).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1});return c.jsxs(Pt,{size:"small",className:"clipboard-item",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"clipboard-item-meta",children:[c.jsx(lc,{type:"secondary",children:Ce}),(ce||re.date&&re.date!==s)&&c.jsx(wt,{style:{margin:0},children:ve}),(re.tags||[]).map(ge=>c.jsx(wt,{color:"purple",closable:!0,onClose:Oe=>{Oe.preventDefault(),ne(re,ge)},style:{margin:0},children:ge},ge)),c.jsx(Ow,{content:c.jsxs(it.Compact,{style:{width:200},children:[c.jsx($t,{size:"small",placeholder:"Tag name",value:C,onChange:ge=>x(ge.target.value),onPressEnter:()=>ue(re,C)}),c.jsx(Re,{size:"small",type:"primary",onClick:()=>ue(re,C),children:"Add"})]}),title:"Add Tag",trigger:"click",open:v===re.id,onOpenChange:ge=>{y(ge?re.id:null),x("")},children:c.jsxs(wt,{style:{cursor:"pointer",borderStyle:"dashed",margin:0},children:[c.jsx(nr,{})," Tag"]})})]}),re.imageFile?c.jsx("div",{className:"clipboard-image-wrap",children:c.jsx(c2,{src:fO(re.imageFile),alt:"Clipboard entry",className:"clipboard-image",preview:!0,onError:()=>e.error("Unable to load clipboard image.")})}):c.jsxs(c.Fragment,{children:[c.jsx(Nge,{children:c.jsx(Ege,{value:re.preview||re.text,domain:L,jiraIssuePrefix:F})}),re.contentFile&&c.jsxs("span",{className:"clipboard-original",children:[c.jsx("a",{href:be,target:"_blank",rel:"noreferrer",children:"View original content"}),c.jsxs("a",{href:re.editorUrl,children:["Open in ",re.editorName||"editor"]})]})]})]}),c.jsxs("span",{className:"clipboard-actions",children:[c.jsx(vn,{title:E===re.id?"Copied!":"Copy",children:c.jsx(Re,{type:"text",icon:E===re.id?c.jsx(jl,{style:{color:"#52c41a"}}):c.jsx(vo,{}),onClick:()=>Q(re)})}),c.jsx(vn,{title:"Delete",children:c.jsx(Re,{type:"text",danger:!0,icon:c.jsx(Yn,{}),onClick:()=>ee(re)})})]})]},`${ve}-${re.id}`)};return c.jsxs("div",{className:"clipboard-page",children:[c.jsx(Xr,{titleSuffix:c.jsx(Re,{"aria-label":"Search clipboard history",disabled:!t||r,icon:c.jsx(yo,{}),onClick:()=>N(!0),type:"text"}),titleRowClassName:"clipboard-title-row",actions:c.jsxs("div",{className:"clipboard-controls",children:[c.jsxs(it,{size:16,align:"center",children:[c.jsx(ki,{loading:r,checked:t,onChange:X,checkedChildren:"On",unCheckedChildren:"Off"}),c.jsx(Rl,{className:"clipboard-picker",disabled:!t||r,options:J,value:s.split("-"),onChange:re=>(re==null?void 0:re.length)===3&&d(re.join("-")),placeholder:"Select date"})]}),c.jsxs("div",{className:"clipboard-settings",children:[c.jsxs("div",{className:"clipboard-setting-row",children:[c.jsx(lc,{type:"secondary",className:"clipboard-setting-label",children:"Deduplicate filter:"}),c.jsx(In,{size:"small",disabled:!t||r,value:q,onChange:le,className:"clipboard-deduplicate-select",options:$ge})]}),U&&c.jsxs("div",{className:"clipboard-setting-row",children:[c.jsx(lc,{type:"secondary",className:"clipboard-setting-label",children:"Monitor image clipboard:"}),c.jsx(ki,{size:"small",disabled:!t||r,checked:_,onChange:Y,checkedChildren:"On",unCheckedChildren:"Off"})]})]})]}),description:"Saved locally and archived by date.",title:"Clipboard History"}),t?c.jsxs(c.Fragment,{children:[c.jsx(Ka,{className:"clipboard-tabs",activeKey:S,onChange:re=>{$(re),requestAnimationFrame(()=>{var ce;return(ce=document.activeElement)==null?void 0:ce.blur()})},onKeyDown:re=>{var ce;["ArrowLeft","ArrowRight"].includes(re.key)&&(re.preventDefault(),(ce=document.activeElement)==null||ce.blur())},items:$e}),he.length?c.jsx("div",{className:"clipboard-list",children:he.map(re=>Ie(re))}):c.jsx(qt,{description:`No ${S==="all"?"clipboard entries":`${S==="id"?"ID":S} entries`}${S==="tagged"?".":` for ${s}.`}`})]}):c.jsx(Pt,{className:"clipboard-disabled-card",children:c.jsx(qt,{image:c.jsx($v,{style:{fontSize:48,color:"#9ca3af"}}),description:c.jsxs("div",{className:"clipboard-disabled-copy",children:[c.jsx(lc,{strong:!0,className:"clipboard-disabled-title",children:"Clipboard history is disabled"}),c.jsx(lc,{type:"secondary",children:"Turn on the switch in the top-right corner to start capturing and viewing history."})]})})}),c.jsxs(bn,{open:O,title:"Search Clipboard History",footer:null,width:760,onCancel:()=>N(!1),children:[c.jsxs("div",{className:"clipboard-search-control",children:[c.jsx($t,{allowClear:!0,autoFocus:!0,className:"clipboard-search-field",placeholder:"Search all clipboard history",value:R,onChange:re=>{const ce=re.target.value;j(ce),ce||(M(""),A([]))},onPressEnter:()=>{const re=R.trim();re!==Z&&A([]),M(re)}}),c.jsx(Re,{className:"clipboard-search-button",loading:H,onClick:()=>{const re=R.trim();re!==Z&&A([]),M(re)},type:"primary",children:"Search"})]}),Z&&!H&&c.jsxs(lc,{type:"secondary",className:"clipboard-search-summary",children:[P.length," result",P.length===1?"":"s"," for “",Z,"”"]}),Z?H?c.jsx(za,{active:!0,className:"clipboard-search-loading",paragraph:{rows:4}}):P.length?c.jsx("div",{className:"clipboard-search-results clipboard-list",children:P.map(re=>Ie(re,!0))}):c.jsx(qt,{className:"clipboard-search-empty",description:`No results for “${Z}”.`}):c.jsx(lc,{type:"secondary",className:"clipboard-search-hint",children:"Search across all clipboard history."})]}),c.jsx(Ls.BackTop,{visibilityHeight:240})]})}const zP=[{value:"vscode",label:"VS Code"},{value:"devin",label:"Devin"},{value:"idea",label:"IntelliJ IDEA"}];function AP(e="vscode"){const t=zP.find(n=>n.value===e);return t?t.label:"VS Code"}function LP(e="vscode",t="",n="",r={}){if(!t)return"";const a=typeof r=="boolean"?r:!!(r!=null&&r.newWindow);let o="",l="";if(n){const s=n.split(":").filter(Boolean);s[0]&&(o=s[0]),s[1]&&(l=s[1])}if(e==="idea"){let s=`idea://open?file=${encodeURIComponent(t)}`;return o&&(s+=`&line=${o}`),l&&(s+=`&column=${l}`),s}return e==="devin"?`devin://file${encodeURI(t)}${n}`:a?`vscode://vscode.open-folder${encodeURI(t)}?forceNewWindow=true`:`vscode://file${encodeURI(t)}${n}`}const{Text:px}=wn;function kge({tasks:e,running:t,onCreate:n,onEdit:r,onStart:a,onStop:o,onRemove:l}){const s=[{title:"Name",dataIndex:"name",render:d=>c.jsx(px,{strong:!0,children:d})},{title:"Scripts",dataIndex:"items",width:110,render:d=>c.jsxs(px,{type:"secondary",children:[d.length," scripts"]})},{title:"Actions",width:236,render:(d,f)=>{const h=f.items.every(p=>t.has(`${p.launcherId}:${p.scriptId}`));return c.jsxs(it,{children:[c.jsx(Re,{size:"small",danger:h,icon:h?c.jsx($v,{}):c.jsx(Fc,{}),onClick:()=>h?o(f):a(f),children:h?"Stop":"Start"}),c.jsx(Re,{size:"small",onClick:()=>r(f),children:"Edit"}),c.jsx(Re,{size:"small",danger:!0,icon:c.jsx(Yn,{}),onClick:()=>l(f),children:"Delete"})]})}}];return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"group-task-header",children:[c.jsx(px,{type:"secondary",children:"Start selected scripts across multiple services."}),c.jsx(Re,{type:"primary",icon:c.jsx(nr,{}),onClick:n,children:"Add quick launch"})]}),e.length?c.jsx(rr,{className:"group-task-table",rowKey:"id",dataSource:e,columns:s,pagination:!1,size:"small"}):c.jsx(qt,{description:"No quick launches yet.",className:"group-task-empty"})]})}function jd({open:e,initialPath:t="~",onCancel:n,onSelect:r,title:a="Browse Directory",selectionType:o="directory"}){const{message:l}=Br.useApp(),[s,d]=i.useState(t),[f,h]=i.useState(null),[p,g]=i.useState(!1),v=async y=>{g(!0);try{const C=await fm.browse(y||"~");h(C),d(C.currentPath)}catch(C){l.error(C.message||"Failed to read directory")}finally{g(!1)}};return i.useEffect(()=>{e&&v(t||"~")},[e,t]),c.jsx(bn,{title:a,open:e,onCancel:n,footer:null,width:640,destroyOnClose:!0,children:c.jsxs(lr,{spinning:p,children:[c.jsx("div",{className:"file-browser-path-row",children:c.jsx($t,{value:s,onChange:y=>d(y.target.value),onPressEnter:()=>v(s),addonAfter:c.jsx(Re,{size:"small",type:"text",onClick:()=>v(s),children:"Go"})})}),f&&c.jsxs("div",{children:[c.jsx("div",{className:"file-browser-parent-row",children:c.jsxs(Re,{size:"small",onClick:()=>v(f.parentPath),disabled:f.currentPath===f.parentPath,children:[c.jsx(Is,{}),"Parent Directory"]})}),c.jsx("div",{className:"file-browser-list",children:f.subdirectories.length===0&&(o!=="file"||(f.files||[]).length===0)?c.jsx("div",{className:"file-browser-empty",children:"No items found"}):c.jsxs(c.Fragment,{children:[f.subdirectories.map(y=>c.jsxs("div",{className:"file-browser-item",onClick:()=>v(y.fullPath),children:[c.jsxs("span",{children:[c.jsx(Lr,{className:"file-browser-icon"}),y.name]}),o==="directory"&&c.jsx(Re,{size:"small",type:"link",onClick:C=>{C.stopPropagation(),r(y.fullPath)},children:"Select Folder"})]},y.fullPath)),o==="file"&&(f.files||[]).map(y=>c.jsxs("div",{className:"file-browser-item",onClick:()=>r(y.fullPath),children:[c.jsxs("span",{children:[c.jsx(Rs,{className:"file-browser-icon"}),y.name]}),c.jsx(Re,{size:"small",type:"link",onClick:C=>{C.stopPropagation(),r(y.fullPath)},children:"Select File"})]},y.fullPath))]})}),o==="directory"&&c.jsx("div",{className:"file-browser-confirm-row",children:c.jsxs(Re,{type:"primary",onClick:()=>r(f.currentPath),children:["Confirm Path: ",f.currentPath]})})]})]})})}const{Text:sc}=wn,Gf=(e,t)=>`${e}:${t}`,Rge=()=>c.jsx("div",{style:{width:"0.8em",height:"0.8em",backgroundColor:"rgba(0,0,0,0.88)"}});function Ige({form:e,editing:t,executor:n,running:r,errorCounts:a={},packageScripts:o,onRun:l,onRunInstall:s,onRunPackage:d,onStop:f,onLogs:h,onPackageLogs:p}){const g=!!(t&&[...r].some(C=>C.startsWith(`${t.id}:`))),[v,y]=i.useState(()=>g);return i.useEffect(()=>{g&&y(!0)},[t==null?void 0:t.id]),i.useEffect(()=>{g||y(!1)},[g]),c.jsx(yt.List,{name:"scripts",children:(C,{add:x,remove:S})=>{const $=["npm","pnpm","yarn"].includes(n)?{id:"install",name:"Install",command:`${n} install${n==="npm"?" --legacy-peer-deps":""}`}:null,E=[...C.map(N=>({...N,key:`custom-${N.key}`,kind:"custom"})),...$?[{key:"install",kind:"install",script:$}]:[],...(o||[]).map(N=>({key:`package-${N.id}`,kind:"package",script:N}))],k=v?E.filter(N=>{const R=N.kind==="custom"?e.getFieldValue(["scripts",N.name]):N.script;return t&&(R==null?void 0:R.id)&&r.has(Gf(t.id,R.id))}):E,O=[{title:"Source",width:100,render:(N,R)=>c.jsx(wt,{color:R.kind==="package"?"purple":R.kind==="install"?"green":"default",children:R.kind==="package"?"Package":R.kind==="install"?"Executor":"Custom"})},{title:"Script name",width:200,render:(N,R)=>{var P;const j=R.kind==="custom"?e.getFieldValue(["scripts",R.name]):R.script,I=(j==null?void 0:j.name)===e.getFieldValue("startCommand"),M=t&&(j==null?void 0:j.id)&&r.has(Gf(t.id,j.id));return c.jsxs(it,{direction:"vertical",size:1,style:{width:"100%"},children:[R.kind!=="custom"||M?c.jsxs(it,{size:4,children:[c.jsx(sc,{strong:!0,children:(j==null?void 0:j.name)||((P=R.script)==null?void 0:P.name)}),I&&c.jsx(Lo,{className:"start-script-icon"})]}):c.jsx(yt.Item,{noStyle:!0,name:[R.name,"name"],rules:[{required:!0,message:"Required"}],children:c.jsx($t,{placeholder:"serve",allowClear:!0,suffix:I?c.jsx(Lo,{className:"start-script-icon"}):null})}),M&&c.jsx(ia,{status:"success",text:c.jsx(sc,{type:"secondary",style:{fontSize:11},children:"running"})})]})}},{title:"Command",render:(N,R)=>{const j=R.kind==="custom"?e.getFieldValue(["scripts",R.name]):R.script,I=t&&(j==null?void 0:j.id)&&r.has(Gf(t.id,j.id));return R.kind==="package"?c.jsxs(it,{direction:"vertical",size:0,children:[c.jsxs(sc,{code:!0,children:[n," run ",R.script.name]}),c.jsx(sc,{type:"secondary",style:{fontSize:12},children:R.script.command})]}):R.kind==="install"?c.jsx(sc,{code:!0,children:R.script.command}):I?c.jsx(sc,{code:!0,children:j==null?void 0:j.command}):c.jsx(yt.Item,{noStyle:!0,name:[R.name,"command"],rules:[{required:!0,message:"Required"}],children:c.jsx($t,{placeholder:"npm run dev",allowClear:!0})})}},{title:"Actions",width:132,render:(N,R)=>{const j=R.kind==="custom"?e.getFieldValue(["scripts",R.name]):R.script,I=t&&(j==null?void 0:j.id)&&r.has(Gf(t.id,j.id)),M=t&&(j!=null&&j.id)&&a[Gf(t.id,j.id)]||0;return c.jsxs(it,{size:2,children:[t&&c.jsx(vn,{title:I?"Stop":"Start",children:c.jsx(Re,{type:"text",danger:I,icon:I?c.jsx(Rge,{}):c.jsx(Epe,{}),onClick:()=>I?f(j):R.kind==="package"?d(j):R.kind==="install"?s(j):l(j),disabled:!(j!=null&&j.id)})}),c.jsx(vn,{title:"Logs",children:c.jsx(ia,{count:M,size:"small",offset:[-2,2],children:c.jsx(Re,{type:"text",icon:c.jsx(Pi,{}),onClick:()=>R.kind==="package"?p(j):h(j),disabled:!t||!(j!=null&&j.id)})})}),R.kind==="custom"&&!I&&c.jsx(vn,{title:"Remove",children:c.jsx(Re,{type:"text",danger:!0,icon:c.jsx(Yn,{}),onClick:()=>S(R.name)})})]})}}];return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"script-header",children:[c.jsx(wh,{orientation:"left",children:"Scripts"}),c.jsxs(it,{size:"middle",align:"center",children:[c.jsxs("label",{className:"script-running-filter",children:[c.jsx(ki,{size:"small",checked:v,onChange:y,disabled:!t}),c.jsx(sc,{type:"secondary",className:"script-running-filter-label",children:"Show running only"})]}),c.jsx(Re,{icon:c.jsx(nr,{}),onClick:()=>{y(!1),x({name:"",command:""})},children:"Add script"})]})]}),c.jsx(rr,{size:"small",rowKey:"key",pagination:!1,loading:o===null,dataSource:k,columns:O})]})}})}const Mge=e=>c.jsx("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"currentColor",style:{verticalAlign:"-0.125em",...e.style},...e,children:c.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M.75 2.5a.75.75 0 01.742-.647h21.016a.75.75 0 01.742.853l-2.622 17.5a.75.75 0 01-.742.644H4.114a.75.75 0 01-.742-.644L.75 2.5zm13.1 11.2h-3.7l-.76-3.8h5.22l-.76 3.8z"})});function Tge(e){if(!e)return null;const t=e.toLowerCase();return t.includes("bitbucket")?c.jsx(Mge,{style:{color:"#2584FF"}}):t.includes("github")?c.jsx(The,{style:{color:"#24292e"}}):t.includes("gitlab")?c.jsx(wv,{style:{color:"#fc6d26"}}):c.jsx(Kd,{className:"repo-generic-icon"})}function _P({repoUrl:e,style:t}){if(!e)return null;const n=Tge(e);return n?c.jsx(vn,{title:"Open repository in browser",children:c.jsx(Re,{className:"repo-icon-button",type:"text",size:"small",icon:n,onClick:r=>{r.preventDefault(),r.stopPropagation(),hr(e)},style:t})}):null}const Pge=()=>({alias:"",folder:"",groupName:"",executor:"npm",startCommand:void 0,scripts:[]});function Dge({open:e,editing:t,groups:n,running:r,errorCounts:a={},onCancel:o,onSave:l,onRun:s,onRunInstall:d,onRunPackage:f,onStop:h,onLogs:p,onDelete:g}){const{message:v,modal:y}=Br.useApp(),[C]=yt.useForm(),[x,S]=i.useState(null),[$,E]=i.useState(!1),k=j=>{if(j&&(C.setFieldValue("folder",j),!C.getFieldValue("alias"))){const M=j.split(/[/\\]/).filter(Boolean);M.length>0&&C.setFieldValue("alias",M[M.length-1])}E(!1)},O=async()=>{const j=String(C.getFieldValue("folder")||"").trim();if(!j){v.warning("Set a project folder first.");return}try{await Xn.openFolder(j)}catch(I){v.error(I.message)}},N=()=>{y.confirm({title:"Delete Service",content:`Are you sure you want to delete service "${t==null?void 0:t.alias}"?`,okText:"Delete",okButtonProps:{type:"primary",danger:!0},cancelText:"Cancel",onOk:async()=>{try{await g(t)}catch(j){v.error(j.message)}}})};i.useEffect(()=>{e&&(C.resetFields(),C.setFieldsValue(t?{...t,startCommand:t.startCommand||void 0,scripts:t.scripts}:Pge()),S(t?null:[]),t&&Pr.packageScripts(t.id).then(j=>S(j.scripts)).catch(()=>S([])))},[e,t,C]);const R=async()=>{try{const j=(C.getFieldValue("scripts")||[]).filter(P=>{var A,H;return((A=P==null?void 0:P.name)==null?void 0:A.trim())||((H=P==null?void 0:P.command)==null?void 0:H.trim())});C.setFieldValue("scripts",j);const I=await C.validateFields(["alias","folder","groupName","startCommand"]),M={...C.getFieldsValue(!0),...I,scripts:j};await l(M)}catch(j){if(j!=null&&j.errorFields)return;v.error(j.message)}};return c.jsxs(bn,{title:t?c.jsxs(it,{align:"center",size:6,children:[c.jsxs("span",{children:["Service details · ",t.alias]}),c.jsx(_P,{repoUrl:t.repoUrl})]}):"Add service",open:e,onCancel:o,onOk:R,okText:t?"Save":"Save service",width:860,destroyOnClose:!0,footer:c.jsxs("div",{className:"service-modal-footer",children:[t?c.jsx(Re,{type:"primary",danger:!0,onClick:N,children:"Delete service"}):c.jsx("div",{}),c.jsxs(it,{children:[c.jsx(Re,{onClick:o,children:"Cancel"}),c.jsx(Re,{type:"primary",onClick:R,children:t?"Save":"Save service"})]})]}),children:[c.jsxs(yt,{form:C,layout:"vertical",children:[c.jsx(Qv,{className:"service-config",defaultActiveKey:t?[]:["configuration"],items:[{key:"configuration",label:"Service configuration",children:c.jsxs(Ao,{gutter:[16,0],children:[c.jsx(Bn,{xs:24,sm:12,children:c.jsx(yt.Item,{label:"Name",name:"alias",rules:[{required:!0}],children:c.jsx($t,{placeholder:"Service name",allowClear:!0})})}),c.jsx(Bn,{xs:24,sm:12,children:c.jsx(yt.Item,{label:"Project folder",name:"folder",rules:[{required:!0}],children:c.jsx($t,{prefix:c.jsx(Re,{type:"text",htmlType:"button",icon:c.jsx(Lr,{}),onClick:O,"aria-label":"Open project folder",title:"Open project folder",style:{color:"#8c8c8c",padding:"0 4px"}}),suffix:c.jsx(Re,{type:"text",size:"small",icon:c.jsx(Lr,{}),onClick:()=>E(!0),style:{fontSize:12,padding:"0 4px"},children:"Browse"}),placeholder:"Project folder path",allowClear:!0})})}),c.jsx(Bn,{xs:24,sm:8,children:c.jsx(yt.Item,{label:"Group",name:"groupName",children:c.jsx(xd,{options:n.map(j=>({value:j})),placeholder:"Group name",allowClear:!0})})}),c.jsx(Bn,{xs:24,sm:8,children:c.jsx(yt.Item,{label:"Executor",name:"executor",rules:[{required:!0}],children:c.jsx(xd,{options:["npm","pnpm","yarn"].map(j=>({value:j})),placeholder:"npm",allowClear:!0})})}),c.jsx(Bn,{xs:24,sm:8,children:c.jsx(yt.Item,{noStyle:!0,shouldUpdate:(j,I)=>j.scripts!==I.scripts,children:()=>{const j=(C.getFieldValue("scripts")||[]).map(P=>P==null?void 0:P.name).filter(Boolean),I=(x||[]).map(P=>P.name),M=[...new Set([...j,...I])].map(P=>({label:P,value:P}));return c.jsx(yt.Item,{label:"Start script name",name:"startCommand",children:c.jsx(In,{placeholder:"Select start script",allowClear:!0,options:M})})}})})]})}]}),c.jsx(yt.Item,{noStyle:!0,shouldUpdate:(j,I)=>j.executor!==I.executor||j.startCommand!==I.startCommand||j.scripts!==I.scripts,children:()=>c.jsx(Ige,{form:C,editing:t,executor:C.getFieldValue("executor")||"npm",running:r,errorCounts:a,packageScripts:x,onRun:j=>s(t,j),onRunInstall:()=>d(t),onRunPackage:j=>f(t,j),onStop:j=>h(t,j.id),onLogs:j=>p(t,j),onPackageLogs:j=>p(t,j,!0)})})]}),c.jsx(jd,{open:$,initialPath:C.getFieldValue("folder")||"~",onCancel:()=>E(!1),onSelect:k,title:"Select Project Directory"})]})}const{Text:zge}=wn;function Age({open:e,editingGroupTask:t,groupCatalog:n,onCancel:r,onSave:a}){const{message:o}=Br.useApp(),[l]=yt.useForm();i.useEffect(()=>{e&&(l.resetFields(),l.setFieldsValue({name:(t==null?void 0:t.name)||"",items:(t==null?void 0:t.items.map(f=>`${f.launcherId}|${f.scriptId}`))||[]}))},[e,t,l]);const s=i.useMemo(()=>Object.entries(n.reduce((f,h)=>{const p=h.groupName||"Ungrouped";return(f[p]||(f[p]=[])).push(h),f},{})).sort(([f],[h])=>f.localeCompare(h)).map(([f,h])=>({key:f,label:f,children:c.jsx("div",{className:"group-task-projects",children:h.map(p=>c.jsx(Pt,{size:"small",title:p.alias,children:c.jsx(it,{direction:"vertical",children:p.scripts.map(g=>c.jsxs(sr,{value:`${p.id}|${g.id}`,children:[g.name," ",c.jsxs(zge,{type:"secondary",children:["(",g.source,")"]})]},g.id))})},p.id))})})),[n]),d=async()=>{try{const f=await l.validateFields(),h={name:f.name,items:f.items.map(p=>{const[g,v]=p.split("|");return{launcherId:g,scriptId:v}})};await a(h)}catch(f){f!=null&&f.errorFields||o.error(f.message)}};return c.jsx(bn,{title:t?`Edit quick launch · ${t.name}`:"Add quick launch",open:e,onCancel:r,onOk:d,okText:t?"Save changes":"Save quick launch",width:760,destroyOnClose:!0,children:c.jsxs(yt,{form:l,layout:"vertical",children:[c.jsx(yt.Item,{label:"Name",name:"name",rules:[{required:!0}],children:c.jsx($t,{placeholder:"Start local stack",allowClear:!0})}),c.jsx(yt.Item,{label:"Scripts",name:"items",rules:[{required:!0,message:"Select at least one script."}],children:c.jsx(sr.Group,{className:"group-task-selector",children:c.jsx(Ka,{items:s})})})]})})}const mO={30:"ansi-black",31:"ansi-red",32:"ansi-green",33:"ansi-yellow",34:"ansi-blue",35:"ansi-magenta",36:"ansi-cyan",37:"ansi-white",90:"ansi-gray",91:"ansi-red",92:"ansi-green",93:"ansi-yellow",94:"ansi-blue",95:"ansi-magenta",96:"ansi-cyan",97:"ansi-white"};function NS({value:e,editor:t}){const[n,r]=i.useState(t||"vscode"),[a,o]=i.useState(""),[l,s]=i.useState("");i.useEffect(()=>{t&&r(t),Xn.status().then(p=>{p!=null&&p.defaultEditor&&!t&&r(p.defaultEditor),p!=null&&p.domain&&o(p.domain),p!=null&&p.jiraIssuePrefix&&s(p.jiraIssuePrefix)}).catch(()=>{})},[t]);const d=(l||"").split(/[\s,]+/).filter(Boolean).map(p=>p.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),f=d.length>0&&a?new RegExp(`\\b(?:${d.join("|")})-[a-zA-Z0-9]{1,10}\\b`,"gi"):null,h=(p,g)=>{let v="";const y=($,E)=>$.split(/(\u001b\[[0-9;]*m)/g).map((O,N)=>{const R=O.match(/^\u001b\[([0-9;]*)m$/);if(R){const I=R[1].split(";").map(Number);return v=I.includes(0)?"":mO[I.find(M=>mO[M])]||v,null}if(!O)return null;const j=v||(/\b(error|failed|fatal|exception|TS\d{4,5})\b/i.test(O)?"log-error":/\b(warn|warning)\b/i.test(O)?"log-warning":/\b(success|ready|started|listening)\b/i.test(O)?"log-success":"");return c.jsx("span",{className:j,children:O},`${E}-${N}`)}),C=/(https?:\/\/(?:[^\s<>'"`]|\u001b\[[0-9;]*m)+|\/(?:(?:[^\s:(),;!?]|\u001b\[[0-9;]*m)+\/)*(?:[^\s:(),;!?]|\u001b\[[0-9;]*m)+(?::(?:\d+|\u001b\[[0-9;]*m)+(?::(?:\d+|\u001b\[[0-9;]*m)+)?)?)/g,x=f&&f.test(p);return!p.includes("http")&&!p.includes("/")&&!x?y(p,`${g}-0`):p.split(C).map(($,E)=>{if(!$)return null;const k=`${g}-${E}`;if(/^https?:\/\//.test($.replace(/\u001b\[[0-9;]*m/g,""))){const N=$.replace(/\u001b\[[0-9;]*m/g,""),R=N.replace(/[),.;:!?]+$/,""),j=N.slice(R.length);return c.jsxs("span",{children:[c.jsx("a",{className:"log-link",href:R,target:"_blank",rel:"noreferrer",onClick:I=>{I.preventDefault(),hr(R)},children:y($.slice(0,$.length-j.length),`${k}-url`)}),j&&y(j,`${k}-suf`)]},k)}const O=$.replace(/\u001b\[[0-9;]*m/g,"");if(O.startsWith("/")){const[,N,R=""]=O.match(/^(.*?)(:\d+(?::\d+)?)?$/)||[];if(N){const j=LP(n,N,R);return c.jsx("a",{className:"log-link",href:j,target:"_blank",rel:"noreferrer",title:`Open in ${AP(n)}`,children:y($,k)},k)}}if(f&&a&&(f.lastIndex=0,f.test(O))){const N=[];let R=0;f.lastIndex=0;for(const j of O.matchAll(f)){j.index>R&&N.push(y(O.slice(R,j.index),`${k}-sub-${j.index}`));const I=j[0],M=_0(a,I);N.push(c.jsx("a",{className:"log-link",href:M,target:"_blank",rel:"noreferrer",onClick:P=>{P.preventDefault(),hr(M)},children:I},`${k}-jira-${j.index}`)),R=j.index+I.length}return R<O.length&&N.push(y(O.slice(R),`${k}-sub-end`)),c.jsx("span",{children:N},k)}return y($,k)})};return c.jsx("div",{className:"log-output",role:"log",children:e.split(`
496
+ `]:{zIndex:10,width:r,margin:`0 ${de(e.marginXXS)}`,fontSize:r,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,color:a,"&:hover":{color:a},svg:{verticalAlign:"baseline"}}},[`${s}-thumbnail, ${s}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${s}-name`]:{display:"none",textAlign:"center"},[`${s}-file + ${s}-name`]:{position:"absolute",bottom:e.margin,display:"block",width:`calc(100% - ${de(o(e.paddingXS).mul(2).equal())})`},[`${s}-uploading`]:{[`&${s}`]:{backgroundColor:e.colorFillAlter},[`&::before, ${n}-eye, ${n}-download, ${n}-delete`]:{display:"none"}},[`${s}-progress`]:{bottom:e.marginXL,width:`calc(100% - ${de(o(e.paddingXS).mul(2).equal())})`,paddingInlineStart:0}}}),[`${t}-wrapper${t}-picture-circle-wrapper`]:{[`${t}${t}-select`]:{borderRadius:"50%"}}}},Cfe=e=>{const{componentCls:t}=e;return{[`${t}-rtl`]:{direction:"rtl"}}},Sfe=e=>{const{componentCls:t,colorTextDisabled:n}=e;return{[`${t}-wrapper`]:Object.assign(Object.assign({},xn(e)),{[t]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${t}-select`]:{display:"inline-block"},[`${t}-hidden`]:{display:"none"},[`${t}-disabled`]:{color:n,cursor:"not-allowed"}})}},wfe=e=>({actionsColor:e.colorIcon,pictureCardSize:e.controlHeightLG*2.55}),$fe=dn("Upload",e=>{const{fontSizeHeading3:t,fontHeight:n,lineWidth:r,pictureCardSize:a,calc:o}=e,l=an(e,{uploadThumbnailSize:o(t).mul(2).equal(),uploadProgressOffset:o(o(n).div(2)).add(r).equal(),uploadPicCardSize:a});return[Sfe(l),gfe(l),yfe(l),xfe(l),vfe(l),bfe(l),Cfe(l),ch(l)]},wfe);var Efe={icon:function(t,n){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:n}},{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.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:t}}]}},name:"file",theme:"twotone"},jfe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Efe}))},Nfe=i.forwardRef(jfe),Ofe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"},kfe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Ofe}))},Rfe=i.forwardRef(kfe),Ife={icon:function(t,n){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:t}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:n}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:n}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:n}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:t}}]}},name:"picture",theme:"twotone"},Mfe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Ife}))},Tfe=i.forwardRef(Mfe);function fg(e){return Object.assign(Object.assign({},e),{lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate,name:e.name,size:e.size,type:e.type,uid:e.uid,percent:0,originFileObj:e})}function mg(e,t){const n=Ge(t),r=n.findIndex(({uid:a})=>a===e.uid);return r===-1?n.push(e):n[r]=e,n}function cx(e,t){const n=e.uid!==void 0?"uid":"name";return t.filter(r=>r[n]===e[n])[0]}function Pfe(e,t){const n=e.uid!==void 0?"uid":"name",r=t.filter(a=>a[n]!==e[n]);return r.length===t.length?null:r}const Dfe=(e="")=>{const t=e.split("/"),r=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(r)||[""])[0]},wP=e=>e.indexOf("image/")===0,zfe=e=>{if(e.type&&!e.thumbUrl)return wP(e.type);const t=e.thumbUrl||e.url||"",n=Dfe(t);return/^data:image\//.test(t)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(n)?!0:!(/^data:/.test(t)||n)},as=200;function Afe(e){return new Promise(t=>{if(!e.type||!wP(e.type)){t("");return}const n=document.createElement("canvas");n.width=as,n.height=as,n.style.cssText=`position: fixed; left: 0; top: 0; width: ${as}px; height: ${as}px; z-index: 9999; display: none;`,document.body.appendChild(n);const r=n.getContext("2d"),a=new Image;if(a.onload=()=>{const{width:o,height:l}=a;let s=as,d=as,f=0,h=0;o>l?(d=l*(as/o),h=-(d-s)/2):(s=o*(as/l),f=-(s-d)/2),r.drawImage(a,f,h,s,d);const p=n.toDataURL();document.body.removeChild(n),window.URL.revokeObjectURL(a.src),t(p)},a.crossOrigin="anonymous",e.type.startsWith("image/svg+xml")){const o=new FileReader;o.onload=()=>{o.result&&typeof o.result=="string"&&(a.src=o.result)},o.readAsDataURL(e)}else if(e.type.startsWith("image/gif")){const o=new FileReader;o.onload=()=>{o.result&&t(o.result)},o.readAsDataURL(e)}else a.src=window.URL.createObjectURL(e)})}var Lfe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},_fe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Lfe}))},Ol=i.forwardRef(_fe);const Bfe=i.forwardRef(({prefixCls:e,className:t,style:n,locale:r,listType:a,file:o,items:l,progress:s,iconRender:d,actionIconRender:f,itemRender:h,isImgUrl:p,showPreviewIcon:g,showRemoveIcon:v,showDownloadIcon:y,previewIcon:C,removeIcon:x,downloadIcon:S,extra:$,onPreview:E,onDownload:k,onClose:O},N)=>{var R,j;const{status:I}=o,[M,P]=i.useState(I);i.useEffect(()=>{I!=="removed"&&P(I)},[I]);const[A,H]=i.useState(!1);i.useEffect(()=>{const ee=setTimeout(()=>{H(!0)},300);return()=>{clearTimeout(ee)}},[]);const T=d(o);let L=i.createElement("div",{className:`${e}-icon`},T);if(a==="picture"||a==="picture-card"||a==="picture-circle")if(M==="uploading"||!o.thumbUrl&&!o.url){const ee=pe(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:M!=="uploading"});L=i.createElement("div",{className:ee},T)}else{const ee=p!=null&&p(o)?i.createElement("img",{src:o.thumbUrl||o.url,alt:o.name,className:`${e}-list-item-image`,crossOrigin:o.crossOrigin}):T,Q=pe(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:p&&!p(o)});L=i.createElement("a",{className:Q,onClick:ae=>E(o,ae),href:o.url||o.thumbUrl,target:"_blank",rel:"noopener noreferrer"},ee)}const D=pe(`${e}-list-item`,`${e}-list-item-${M}`),F=typeof o.linkProps=="string"?JSON.parse(o.linkProps):o.linkProps,V=(typeof v=="function"?v(o):v)?f((typeof x=="function"?x(o):x)||i.createElement(Yn,null),()=>O(o),e,r.removeFile,!0):null,q=(typeof y=="function"?y(o):y)&&M==="done"?f((typeof S=="function"?S(o):S)||i.createElement(Ol,null),()=>k(o),e,r.downloadFile):null,B=a!=="picture-card"&&a!=="picture-circle"&&i.createElement("span",{key:"download-delete",className:pe(`${e}-list-item-actions`,{picture:a==="picture"})},q,V),U=typeof $=="function"?$(o):$,K=U&&i.createElement("span",{className:`${e}-list-item-extra`},U),_=pe(`${e}-list-item-name`),G=o.url?i.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:_,title:o.name},F,{href:o.url,onClick:ee=>E(o,ee)}),o.name,K):i.createElement("span",{key:"view",className:_,onClick:ee=>E(o,ee),title:o.name},o.name,K),X=(typeof g=="function"?g(o):g)&&(o.url||o.thumbUrl)?i.createElement("a",{href:o.url||o.thumbUrl,target:"_blank",rel:"noopener noreferrer",onClick:ee=>E(o,ee),title:r.previewFile},typeof C=="function"?C(o):C||i.createElement(Hd,null)):null,Y=(a==="picture-card"||a==="picture-circle")&&M!=="uploading"&&i.createElement("span",{className:`${e}-list-item-actions`},X,M==="done"&&q,V),{getPrefixCls:le}=i.useContext(Tt),oe=le(),ue=i.createElement("div",{className:D},L,G,B,Y,A&&i.createElement(ea,{motionName:`${oe}-fade`,visible:M==="uploading",motionDeadline:2e3},({className:ee})=>{const Q="percent"in o?i.createElement(Nh,Object.assign({type:"line",percent:o.percent,"aria-label":o["aria-label"],"aria-labelledby":o["aria-labelledby"]},s)):null;return i.createElement("div",{className:pe(`${e}-list-item-progress`,ee)},Q)})),ne=o.response&&typeof o.response=="string"?o.response:((R=o.error)===null||R===void 0?void 0:R.statusText)||((j=o.error)===null||j===void 0?void 0:j.message)||r.uploadError,te=M==="error"?i.createElement(vn,{title:ne,getPopupContainer:ee=>ee.parentNode},ue):ue;return i.createElement("div",{className:pe(`${e}-list-item-container`,t),style:n,ref:N},h?h(te,o,l,{download:k.bind(null,o),preview:E.bind(null,o),remove:O.bind(null,o)}):te)}),Ffe=(e,t)=>{const{listType:n="text",previewFile:r=Afe,onPreview:a,onDownload:o,onRemove:l,locale:s,iconRender:d,isImageUrl:f=zfe,prefixCls:h,items:p=[],showPreviewIcon:g=!0,showRemoveIcon:v=!0,showDownloadIcon:y=!1,removeIcon:C,previewIcon:x,downloadIcon:S,extra:$,progress:E={size:[-1,2],showInfo:!1},appendAction:k,appendActionVisible:O=!0,itemRender:N,disabled:R}=e,[,j]=iw(),[I,M]=i.useState(!1),P=["picture-card","picture-circle"].includes(n);i.useEffect(()=>{n.startsWith("picture")&&(p||[]).forEach(_=>{!(_.originFileObj instanceof File||_.originFileObj instanceof Blob)||_.thumbUrl!==void 0||(_.thumbUrl="",r==null||r(_.originFileObj).then(G=>{_.thumbUrl=G||"",j()}))})},[n,p,r]),i.useEffect(()=>{M(!0)},[]);const A=(_,G)=>{if(a)return G==null||G.preventDefault(),a(_)},H=_=>{typeof o=="function"?o(_):_.url&&window.open(_.url)},T=_=>{l==null||l(_)},L=_=>{if(d)return d(_,n);const G=_.status==="uploading";if(n.startsWith("picture")){const X=n==="picture"?i.createElement(zo,null):s.uploading,Y=f!=null&&f(_)?i.createElement(Tfe,null):i.createElement(Nfe,null);return G?X:Y}return G?i.createElement(zo,null):i.createElement(Rfe,null)},D=(_,G,X,Y,le)=>{const oe={type:"text",size:"small",title:Y,onClick:ue=>{var ne,te;G(),i.isValidElement(_)&&((te=(ne=_.props).onClick)===null||te===void 0||te.call(ne,ue))},className:`${X}-list-item-action`,disabled:le?R:!1};return i.isValidElement(_)?i.createElement(Re,Object.assign({},oe,{icon:qr(_,Object.assign(Object.assign({},_.props),{onClick:()=>{}}))})):i.createElement(Re,Object.assign({},oe),i.createElement("span",null,_))};i.useImperativeHandle(t,()=>({handlePreview:A,handleDownload:H}));const{getPrefixCls:F}=i.useContext(Tt),V=F("upload",h),q=F(),B=pe(`${V}-list`,`${V}-list-${n}`),U=i.useMemo(()=>An(bd(q),["onAppearEnd","onEnterEnd","onLeaveEnd"]),[q]),K=Object.assign(Object.assign({},P?{}:U),{motionDeadline:2e3,motionName:`${V}-${P?"animate-inline":"animate"}`,keys:Ge(p.map(_=>({key:_.uid,file:_}))),motionAppear:I});return i.createElement("div",{className:B},i.createElement(rw,Object.assign({},K,{component:!1}),({key:_,file:G,className:X,style:Y})=>i.createElement(Bfe,{key:_,locale:s,prefixCls:V,className:X,style:Y,file:G,items:p,progress:E,listType:n,isImgUrl:f,showPreviewIcon:g,showRemoveIcon:v,showDownloadIcon:y,removeIcon:C,previewIcon:x,downloadIcon:S,extra:$,iconRender:L,actionIconRender:D,itemRender:N,onPreview:A,onDownload:H,onClose:T})),k&&i.createElement(ea,Object.assign({},K,{visible:O,forceRender:!0}),({className:_,style:G})=>qr(k,X=>({className:pe(X.className,_),style:Object.assign(Object.assign(Object.assign({},G),{pointerEvents:_?"none":void 0}),X.style)}))))},Hfe=i.forwardRef(Ffe);var Vfe=function(e,t,n,r){function a(o){return o instanceof n?o:new n(function(l){l(o)})}return new(n||(n=Promise))(function(o,l){function s(h){try{f(r.next(h))}catch(p){l(p)}}function d(h){try{f(r.throw(h))}catch(p){l(p)}}function f(h){h.done?o(h.value):a(h.value).then(s,d)}f((r=r.apply(e,[])).next())})};const dm=`__LIST_IGNORE_${Date.now()}__`,Wfe=(e,t)=>{const n=pr("upload"),{fileList:r,defaultFileList:a,onRemove:o,showUploadList:l=!0,listType:s="text",onPreview:d,onDownload:f,onChange:h,onDrop:p,previewFile:g,disabled:v,locale:y,iconRender:C,isImageUrl:x,progress:S,prefixCls:$,className:E,type:k="select",children:O,style:N,itemRender:R,maxCount:j,data:I={},multiple:M=!1,hasControlInside:P=!0,action:A="",accept:H="",supportServerRender:T=!0,rootClassName:L}=e,D=i.useContext(va),F=v??D,V=e.customRequest||n.customRequest,[q,B]=En(a||[],{value:r,postState:xe=>xe??[]}),[U,K]=i.useState("drop"),_=i.useRef(null),G=i.useRef(null);i.useMemo(()=>{const xe=Date.now();(r||[]).forEach((Pe,He)=>{!Pe.uid&&!Object.isFrozen(Pe)&&(Pe.uid=`__AUTO__${xe}_${He}__`)})},[r]);const X=(xe,Pe,He)=>{let ke=Ge(Pe),We=!1;j===1?ke=ke.slice(-1):j&&(We=ke.length>j,ke=ke.slice(0,j)),ii.flushSync(()=>{B(ke)});const st={file:xe,fileList:ke};He&&(st.event=He),(!We||xe.status==="removed"||ke.some(Je=>Je.uid===xe.uid))&&ii.flushSync(()=>{h==null||h(st)})},Y=(xe,Pe)=>Vfe(void 0,void 0,void 0,function*(){const{beforeUpload:He,transformFile:ke}=e;let We=xe;if(He){const st=yield He(xe,Pe);if(st===!1)return!1;if(delete xe[dm],st===dm)return Object.defineProperty(xe,dm,{value:!0,configurable:!0}),!1;typeof st=="object"&&st&&(We=st)}return ke&&(We=yield ke(We)),We}),le=xe=>{const Pe=xe.filter(We=>!We.file[dm]);if(!Pe.length)return;const He=Pe.map(We=>fg(We.file));let ke=Ge(q);He.forEach(We=>{ke=mg(We,ke)}),He.forEach((We,st)=>{let Je=We;if(Pe[st].parsedFile)We.status="uploading";else{const{originFileObj:Fe}=We;let Qe;try{Qe=new File([Fe],Fe.name,{type:Fe.type})}catch{Qe=new Blob([Fe],{type:Fe.type}),Qe.name=Fe.name,Qe.lastModifiedDate=new Date,Qe.lastModified=new Date().getTime()}Qe.uid=We.uid,Je=Qe}X(Je,ke)})},oe=(xe,Pe,He)=>{try{typeof xe=="string"&&(xe=JSON.parse(xe))}catch{}if(!cx(Pe,q))return;const ke=fg(Pe);ke.status="done",ke.percent=100,ke.response=xe,ke.xhr=He;const We=mg(ke,q);X(ke,We)},ue=(xe,Pe)=>{if(!cx(Pe,q))return;const He=fg(Pe);He.status="uploading",He.percent=xe.percent;const ke=mg(He,q);X(He,ke,xe)},ne=(xe,Pe,He)=>{if(!cx(He,q))return;const ke=fg(He);ke.error=xe,ke.response=Pe,ke.status="error";const We=mg(ke,q);X(ke,We)},te=xe=>{let Pe;Promise.resolve(typeof o=="function"?o(xe):o).then(He=>{var ke;if(He===!1)return;const We=Pfe(xe,q);We&&(Pe=Object.assign(Object.assign({},xe),{status:"removed"}),q==null||q.forEach(st=>{const Je=Pe.uid!==void 0?"uid":"name";st[Je]===Pe[Je]&&!Object.isFrozen(st)&&(st.status="removed")}),(ke=_.current)===null||ke===void 0||ke.abort(Pe),X(Pe,We))})},ee=xe=>{K(xe.type),xe.type==="drop"&&(p==null||p(xe))};i.useImperativeHandle(t,()=>({onBatchStart:le,onSuccess:oe,onProgress:ue,onError:ne,fileList:q,upload:_.current,nativeElement:G.current}));const{getPrefixCls:Q,direction:ae,upload:fe}=i.useContext(Tt),J=Q("upload",$),Z=Object.assign(Object.assign({onBatchStart:le,onError:ne,onProgress:ue,onSuccess:oe},e),{customRequest:V,data:I,multiple:M,action:A,accept:H,supportServerRender:T,prefixCls:J,disabled:F,beforeUpload:Y,onChange:void 0,hasControlInside:P});delete Z.className,delete Z.style,(!O||F)&&delete Z.id;const he=`${J}-wrapper`,[$e,Ie,re]=$fe(J,he),[ce]=ro("Upload",ci.Upload),{showRemoveIcon:ve,showPreviewIcon:be,showDownloadIcon:Ce,removeIcon:ge,previewIcon:Oe,downloadIcon:Ee,extra:De}=typeof l=="boolean"?{}:l,Ae=typeof ve>"u"?!F:ve,Be=(xe,Pe)=>l?i.createElement(Hfe,{prefixCls:J,listType:s,items:q,previewFile:g,onPreview:d,onDownload:f,onRemove:te,showRemoveIcon:Ae,showPreviewIcon:be,showDownloadIcon:Ce,removeIcon:ge,previewIcon:Oe,downloadIcon:Ee,iconRender:C,extra:De,locale:Object.assign(Object.assign({},ce),y),isImageUrl:x,progress:S,appendAction:xe,appendActionVisible:Pe,itemRender:R,disabled:F}):xe,ze=pe(he,E,L,Ie,re,fe==null?void 0:fe.className,{[`${J}-rtl`]:ae==="rtl",[`${J}-picture-card-wrapper`]:s==="picture-card",[`${J}-picture-circle-wrapper`]:s==="picture-circle"}),qe=Object.assign(Object.assign({},fe==null?void 0:fe.style),N);if(k==="drag"){const xe=pe(Ie,J,`${J}-drag`,{[`${J}-drag-uploading`]:q.some(Pe=>Pe.status==="uploading"),[`${J}-drag-hover`]:U==="dragover",[`${J}-disabled`]:F,[`${J}-rtl`]:ae==="rtl"});return $e(i.createElement("span",{className:ze,ref:G},i.createElement("div",{className:xe,style:qe,onDrop:ee,onDragOver:ee,onDragLeave:ee},i.createElement(ES,Object.assign({},Z,{ref:_,className:`${J}-btn`}),i.createElement("div",{className:`${J}-drag-container`},O))),Be()))}const _e=pe(J,`${J}-select`,{[`${J}-disabled`]:F,[`${J}-hidden`]:!O}),Ne=i.createElement("div",{className:_e,style:qe},i.createElement(ES,Object.assign({},Z,{ref:_})));return $e(s==="picture-card"||s==="picture-circle"?i.createElement("span",{className:ze,ref:G},Be(Ne,!!O)):i.createElement("span",{className:ze,ref:G},Ne,Be()))},$P=i.forwardRef(Wfe);var Ufe=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(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const qfe=i.forwardRef((e,t)=>{const{style:n,height:r,hasControlInside:a=!1,children:o}=e,l=Ufe(e,["style","height","hasControlInside","children"]),s=Object.assign(Object.assign({},n),{height:r});return i.createElement($P,Object.assign({ref:t,hasControlInside:a},l,{style:s,type:"drag"}),o)}),Rh=$P;Rh.Dragger=qfe;Rh.LIST_IGNORE=dm;var Kfe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M193 796c0 17.7 14.3 32 32 32h574c17.7 0 32-14.3 32-32V563c0-176.2-142.8-319-319-319S193 386.8 193 563v233zm72-233c0-136.4 110.6-247 247-247s247 110.6 247 247v193H404V585c0-5.5-4.5-10-10-10h-44c-5.5 0-10 4.5-10 10v171h-75V563zm-48.1-252.5l39.6-39.6c3.1-3.1 3.1-8.2 0-11.3l-67.9-67.9a8.03 8.03 0 00-11.3 0l-39.6 39.6a8.03 8.03 0 000 11.3l67.9 67.9c3.1 3.1 8.1 3.1 11.3 0zm669.6-79.2l-39.6-39.6a8.03 8.03 0 00-11.3 0l-67.9 67.9a8.03 8.03 0 000 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l67.9-67.9c3.1-3.2 3.1-8.2 0-11.3zM832 892H192c-17.7 0-32 14.3-32 32v24c0 4.4 3.6 8 8 8h688c4.4 0 8-3.6 8-8v-24c0-17.7-14.3-32-32-32zM484 180h56c4.4 0 8-3.6 8-8V76c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v96c0 4.4 3.6 8 8 8z"}}]},name:"alert",theme:"outlined"},Gfe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Kfe}))},Ed=i.forwardRef(Gfe),Xfe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908 640H804V488c0-4.4-3.6-8-8-8H548v-96h108c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16H368c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h108v96H228c-4.4 0-8 3.6-8 8v152H116c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16H292v-88h440v88H620c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16zm-564 76v168H176V716h168zm84-408V140h168v168H428zm420 576H680V716h168v168z"}}]},name:"apartment",theme:"outlined"},Yfe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Xfe}))},Jfe=i.forwardRef(Yfe),Qfe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M917.7 148.8l-42.4-42.4c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-76.1 76.1a199.27 199.27 0 00-112.1-34.3c-51.2 0-102.4 19.5-141.5 58.6L432.3 308.7a8.03 8.03 0 000 11.3L704 591.7c1.6 1.6 3.6 2.3 5.7 2.3 2 0 4.1-.8 5.7-2.3l101.9-101.9c68.9-69 77-175.7 24.3-253.5l76.1-76.1c3.1-3.2 3.1-8.3 0-11.4zM769.1 441.7l-59.4 59.4-186.8-186.8 59.4-59.4c24.9-24.9 58.1-38.7 93.4-38.7 35.3 0 68.4 13.7 93.4 38.7 24.9 24.9 38.7 58.1 38.7 93.4 0 35.3-13.8 68.4-38.7 93.4zm-190.2 105a8.03 8.03 0 00-11.3 0L501 613.3 410.7 523l66.7-66.7c3.1-3.1 3.1-8.2 0-11.3L441 408.6a8.03 8.03 0 00-11.3 0L363 475.3l-43-43a7.85 7.85 0 00-5.7-2.3c-2 0-4.1.8-5.7 2.3L206.8 534.2c-68.9 69-77 175.7-24.3 253.5l-76.1 76.1a8.03 8.03 0 000 11.3l42.4 42.4c1.6 1.6 3.6 2.3 5.7 2.3s4.1-.8 5.7-2.3l76.1-76.1c33.7 22.9 72.9 34.3 112.1 34.3 51.2 0 102.4-19.5 141.5-58.6l101.9-101.9c3.1-3.1 3.1-8.2 0-11.3l-43-43 66.7-66.7c3.1-3.1 3.1-8.2 0-11.3l-36.6-36.2zM441.7 769.1a131.32 131.32 0 01-93.4 38.7c-35.3 0-68.4-13.7-93.4-38.7a131.32 131.32 0 01-38.7-93.4c0-35.3 13.7-68.4 38.7-93.4l59.4-59.4 186.8 186.8-59.4 59.4z"}}]},name:"api",theme:"outlined"},Zfe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Qfe}))},eme=i.forwardRef(Zfe),tme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z"}}]},name:"appstore",theme:"outlined"},nme=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:tme}))},EP=i.forwardRef(nme),rme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z"}}]},name:"arrow-down",theme:"outlined"},ame=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:rme}))},ome=i.forwardRef(ame),ime={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"},lme=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:ime}))},Is=i.forwardRef(lme),sme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M869 487.8L491.2 159.9c-2.9-2.5-6.6-3.9-10.5-3.9h-88.5c-7.4 0-10.8 9.2-5.2 14l350.2 304H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h585.1L386.9 854c-5.6 4.9-2.2 14 5.2 14h91.5c1.9 0 3.8-.7 5.2-2L869 536.2a32.07 32.07 0 000-48.4z"}}]},name:"arrow-right",theme:"outlined"},cme=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:sme}))},jc=i.forwardRef(cme),ume={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 545.5L536.1 163a31.96 31.96 0 00-48.3 0L156 545.5a7.97 7.97 0 006 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z"}}]},name:"arrow-up",theme:"outlined"},dme=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:ume}))},fme=i.forwardRef(dme),mme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M816 768h-24V428c0-141.1-104.3-257.7-240-277.1V112c0-22.1-17.9-40-40-40s-40 17.9-40 40v38.9c-135.7 19.4-240 136-240 277.1v340h-24c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h216c0 61.8 50.2 112 112 112s112-50.2 112-112h216c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM512 888c-26.5 0-48-21.5-48-48h96c0 26.5-21.5 48-48 48zM304 768V428c0-55.6 21.6-107.8 60.9-147.1S456.4 220 512 220c55.6 0 107.8 21.6 147.1 60.9S720 372.4 720 428v340H304z"}}]},name:"bell",theme:"outlined"},hme=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:mme}))},jP=i.forwardRef(hme),pme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M740 161c-61.8 0-112 50.2-112 112 0 50.1 33.1 92.6 78.5 106.9v95.9L320 602.4V318.1c44.2-15 76-56.9 76-106.1 0-61.8-50.2-112-112-112s-112 50.2-112 112c0 49.2 31.8 91 76 106.1V706c-44.2 15-76 56.9-76 106.1 0 61.8 50.2 112 112 112s112-50.2 112-112c0-49.2-31.8-91-76-106.1v-27.8l423.5-138.7a50.52 50.52 0 0034.9-48.2V378.2c42.9-15.8 73.6-57 73.6-105.2 0-61.8-50.2-112-112-112zm-504 51a48.01 48.01 0 0196 0 48.01 48.01 0 01-96 0zm96 600a48.01 48.01 0 01-96 0 48.01 48.01 0 0196 0zm408-491a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"branches",theme:"outlined"},gme=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:pme}))},Mc=i.forwardRef(gme),vme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M304 280h56c4.4 0 8-3.6 8-8 0-28.3 5.9-53.2 17.1-73.5 10.6-19.4 26-34.8 45.4-45.4C450.9 142 475.7 136 504 136h16c28.3 0 53.2 5.9 73.5 17.1 19.4 10.6 34.8 26 45.4 45.4C650 218.9 656 243.7 656 272c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-40-8.8-76.7-25.9-108.1a184.31 184.31 0 00-74-74C596.7 72.8 560 64 520 64h-16c-40 0-76.7 8.8-108.1 25.9a184.31 184.31 0 00-74 74C304.8 195.3 296 232 296 272c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M940 512H792V412c76.8 0 139-62.2 139-139 0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8a63 63 0 01-63 63H232a63 63 0 01-63-63c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 76.8 62.2 139 139 139v100H84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h148v96c0 6.5.2 13 .7 19.3C164.1 728.6 116 796.7 116 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-44.2 23.9-82.9 59.6-103.7a273 273 0 0022.7 49c24.3 41.5 59 76.2 100.5 100.5S460.5 960 512 960s99.8-13.9 141.3-38.2a281.38 281.38 0 00123.2-149.5A120 120 0 01836 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-79.3-48.1-147.4-116.7-176.7.4-6.4.7-12.8.7-19.3v-96h148c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM716 680c0 36.8-9.7 72-27.8 102.9-17.7 30.3-43 55.6-73.3 73.3C584 874.3 548.8 884 512 884s-72-9.7-102.9-27.8c-30.3-17.7-55.6-43-73.3-73.3A202.75 202.75 0 01308 680V412h408v268z"}}]},name:"bug",theme:"outlined"},bme=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:vme}))},Gm=i.forwardRef(bme),yme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M632 888H392c-4.4 0-8 3.6-8 8v32c0 17.7 14.3 32 32 32h192c17.7 0 32-14.3 32-32v-32c0-4.4-3.6-8-8-8zM512 64c-181.1 0-328 146.9-328 328 0 121.4 66 227.4 164 284.1V792c0 17.7 14.3 32 32 32h264c17.7 0 32-14.3 32-32V676.1c98-56.7 164-162.7 164-284.1 0-181.1-146.9-328-328-328zm127.9 549.8L604 634.6V752H420V634.6l-35.9-20.8C305.4 568.3 256 484.5 256 392c0-141.4 114.6-256 256-256s256 114.6 256 256c0 92.5-49.4 176.3-128.1 221.8z"}}]},name:"bulb",theme:"outlined"},xme=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:yme}))},ux=i.forwardRef(xme),Cme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"},Sme=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Cme}))},Ri=i.forwardRef(Sme),wme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M433.1 657.7a31.8 31.8 0 0051.7 0l210.6-292c3.8-5.3 0-12.7-6.5-12.7H642c-10.2 0-19.9 4.9-25.9 13.3L459 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H315c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.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:"check-square",theme:"outlined"},$me=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:wme}))},Bc=i.forwardRef($me),Eme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 512.3v-.3c0-229.8-186.2-416-416-416S96 282.2 96 512v.4c0 229.8 186.2 416 416 416s416-186.2 416-416v-.3.2zm-6.7-74.6l.6 3.3-.6-3.3zM676.7 638.2c53.5-82.2 52.5-189.4-11.1-263.7l162.4-8.4c20.5 44.4 32 93.8 32 145.9 0 185.2-144.6 336.6-327.1 347.4l143.8-221.2zM512 652.3c-77.5 0-140.2-62.7-140.2-140.2 0-77.7 62.7-140.2 140.2-140.2S652.2 434.5 652.2 512 589.5 652.3 512 652.3zm369.2-331.7l-3-5.7 3 5.7zM512 164c121.3 0 228.2 62.1 290.4 156.2l-263.6-13.9c-97.5-5.7-190.2 49.2-222.3 141.1L227.8 311c63.1-88.9 166.9-147 284.2-147zM102.5 585.8c26 145 127.1 264 261.6 315.1C229.6 850 128.5 731 102.5 585.8zM164 512c0-55.9 13.2-108.7 36.6-155.5l119.7 235.4c44.1 86.7 137.4 139.7 234 121.6l-74 145.1C302.9 842.5 164 693.5 164 512zm324.7 415.4c4 .2 8 .4 12 .5-4-.2-8-.3-12-.5z"}}]},name:"chrome",theme:"outlined"},jme=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Eme}))},Nme=i.forwardRef(jme),Ome={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M899.1 869.6l-53-305.6H864c14.4 0 26-11.6 26-26V346c0-14.4-11.6-26-26-26H618V138c0-14.4-11.6-26-26-26H432c-14.4 0-26 11.6-26 26v182H160c-14.4 0-26 11.6-26 26v192c0 14.4 11.6 26 26 26h17.9l-53 305.6a25.95 25.95 0 0025.6 30.4h723c1.5 0 3-.1 4.4-.4a25.88 25.88 0 0021.2-30zM204 390h272V182h72v208h272v104H204V390zm468 440V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H416V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H202.8l45.1-260H776l45.1 260H672z"}}]},name:"clear",theme:"outlined"},kme=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Ome}))},NP=i.forwardRef(kme),Rme={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 64zm176.5 585.7l-28.6 39a7.99 7.99 0 01-11.2 1.7L483.3 569.8a7.92 7.92 0 01-3.3-6.5V288c0-4.4 3.6-8 8-8h48.1c4.4 0 8 3.6 8 8v247.5l142.6 103.1c3.6 2.5 4.4 7.5 1.8 11.1z"}}]},name:"clock-circle",theme:"filled"},Ime=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Rme}))},Mme=i.forwardRef(Ime),Tme={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 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z"}}]},name:"close-circle",theme:"outlined"},Pme=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Tme}))},tO=i.forwardRef(Pme),Dme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M624 706.3h-74.1V464c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v242.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.7a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9z"}},{tag:"path",attrs:{d:"M811.4 366.7C765.6 245.9 648.9 160 512.2 160S258.8 245.8 213 366.6C127.3 389.1 64 467.2 64 560c0 110.5 89.5 200 199.9 200H304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8h-40.1c-33.7 0-65.4-13.4-89-37.7-23.5-24.2-36-56.8-34.9-90.6.9-26.4 9.9-51.2 26.2-72.1 16.7-21.3 40.1-36.8 66.1-43.7l37.9-9.9 13.9-36.6c8.6-22.8 20.6-44.1 35.7-63.4a245.6 245.6 0 0152.4-49.9c41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.2c19.9 14 37.5 30.8 52.4 49.9 15.1 19.3 27.1 40.7 35.7 63.4l13.8 36.5 37.8 10C846.1 454.5 884 503.8 884 560c0 33.1-12.9 64.3-36.3 87.7a123.07 123.07 0 01-87.6 36.3H720c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h40.1C870.5 760 960 670.5 960 560c0-92.7-63.1-170.7-148.6-193.3z"}}]},name:"cloud-download",theme:"outlined"},zme=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Dme}))},Ame=i.forwardRef(zme),Lme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 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:"code",theme:"outlined"},_me=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Lme}))},Oa=i.forwardRef(_me),Bme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M573 421c-23.1 0-41 17.9-41 40s17.9 40 41 40c21.1 0 39-17.9 39-40s-17.9-40-39-40zm-280 0c-23.1 0-41 17.9-41 40s17.9 40 41 40c21.1 0 39-17.9 39-40s-17.9-40-39-40z"}},{tag:"path",attrs:{d:"M894 345a343.92 343.92 0 00-189-130v.1c-17.1-19-36.4-36.5-58-52.1-163.7-119-393.5-82.7-513 81-96.3 133-92.2 311.9 6 439l.8 132.6c0 3.2.5 6.4 1.5 9.4a31.95 31.95 0 0040.1 20.9L309 806c33.5 11.9 68.1 18.7 102.5 20.6l-.5.4c89.1 64.9 205.9 84.4 313 49l127.1 41.4c3.2 1 6.5 1.6 9.9 1.6 17.7 0 32-14.3 32-32V753c88.1-119.6 90.4-284.9 1-408zM323 735l-12-5-99 31-1-104-8-9c-84.6-103.2-90.2-251.9-11-361 96.4-132.2 281.2-161.4 413-66 132.2 96.1 161.5 280.6 66 412-80.1 109.9-223.5 150.5-348 102zm505-17l-8 10 1 104-98-33-12 5c-56 20.8-115.7 22.5-171 7l-.2-.1A367.31 367.31 0 00729 676c76.4-105.3 88.8-237.6 44.4-350.4l.6.4c23 16.5 44.1 37.1 62 62 72.6 99.6 68.5 235.2-8 330z"}},{tag:"path",attrs:{d:"M433 421c-23.1 0-41 17.9-41 40s17.9 40 41 40c21.1 0 39-17.9 39-40s-17.9-40-39-40z"}}]},name:"comment",theme:"outlined"},Fme=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Bme}))},dx=i.forwardRef(Fme),Hme={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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm198.4-588.1a32 32 0 00-24.5.5L414.9 415 296.4 686c-3.6 8.2-3.6 17.5 0 25.7 3.4 7.8 9.7 13.9 17.7 17 3.8 1.5 7.7 2.2 11.7 2.2 4.4 0 8.7-.9 12.8-2.7l271-118.6 118.5-271a32.06 32.06 0 00-17.7-42.7zM576.8 534.4l26.2 26.2-42.4 42.4-26.2-26.2L380 644.4 447.5 490 422 464.4l42.4-42.4 25.5 25.5L644.4 380l-67.6 154.4zM464.4 422L422 464.4l25.5 25.6 86.9 86.8 26.2 26.2 42.4-42.4-26.2-26.2-86.8-86.9z"}}]},name:"compass",theme:"outlined"},Vme=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Hme}))},Wme=i.forwardRef(Vme),Ume={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M326 664H104c-8.8 0-16 7.2-16 16v48c0 8.8 7.2 16 16 16h174v176c0 8.8 7.2 16 16 16h48c8.8 0 16-7.2 16-16V696c0-17.7-14.3-32-32-32zm16-576h-48c-8.8 0-16 7.2-16 16v176H104c-8.8 0-16 7.2-16 16v48c0 8.8 7.2 16 16 16h222c17.7 0 32-14.3 32-32V104c0-8.8-7.2-16-16-16zm578 576H698c-17.7 0-32 14.3-32 32v224c0 8.8 7.2 16 16 16h48c8.8 0 16-7.2 16-16V744h174c8.8 0 16-7.2 16-16v-48c0-8.8-7.2-16-16-16zm0-384H746V104c0-8.8-7.2-16-16-16h-48c-8.8 0-16 7.2-16 16v224c0 17.7 14.3 32 32 32h222c8.8 0 16-7.2 16-16v-48c0-8.8-7.2-16-16-16z"}}]},name:"compress",theme:"outlined"},qme=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Ume}))},jS=i.forwardRef(qme),Kme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 128c-212.1 0-384 171.9-384 384v360c0 13.3 10.7 24 24 24h184c35.3 0 64-28.7 64-64V624c0-35.3-28.7-64-64-64H200v-48c0-172.3 139.7-312 312-312s312 139.7 312 312v48H688c-35.3 0-64 28.7-64 64v208c0 35.3 28.7 64 64 64h184c13.3 0 24-10.7 24-24V512c0-212.1-171.9-384-384-384zM328 632v192H200V632h128zm496 192H696V632h128v192z"}}]},name:"customer-service",theme:"outlined"},Gme=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Kme}))},Xme=i.forwardRef(Gme),Yme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"database",theme:"outlined"},Jme=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Yme}))},Qme=i.forwardRef(Jme),Zme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 140H96c-17.7 0-32 14.3-32 32v496c0 17.7 14.3 32 32 32h380v112H304c-8.8 0-16 7.2-16 16v48c0 4.4 3.6 8 8 8h432c4.4 0 8-3.6 8-8v-48c0-8.8-7.2-16-16-16H548V700h380c17.7 0 32-14.3 32-32V172c0-17.7-14.3-32-32-32zm-40 488H136V212h752v416z"}}]},name:"desktop",theme:"outlined"},ehe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Zme}))},the=i.forwardRef(ehe),nhe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 289.1a362.49 362.49 0 00-79.9-115.7 370.83 370.83 0 00-118.2-77.8C610.7 76.6 562.1 67 512 67c-50.1 0-98.7 9.6-144.5 28.5-44.3 18.3-84 44.5-118.2 77.8A363.6 363.6 0 00169.4 289c-19.5 45-29.4 92.8-29.4 142 0 70.6 16.9 140.9 50.1 208.7 26.7 54.5 64 107.6 111 158.1 80.3 86.2 164.5 138.9 188.4 153a43.9 43.9 0 0022.4 6.1c7.8 0 15.5-2 22.4-6.1 23.9-14.1 108.1-66.8 188.4-153 47-50.4 84.3-103.6 111-158.1C867.1 572 884 501.8 884 431.1c0-49.2-9.9-97-29.4-142zM512 880.2c-65.9-41.9-300-207.8-300-449.1 0-77.9 31.1-151.1 87.6-206.3C356.3 169.5 431.7 139 512 139s155.7 30.5 212.4 85.9C780.9 280 812 353.2 812 431.1c0 241.3-234.1 407.2-300 449.1zm0-617.2c-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 551c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 439c0-29.9 11.7-58 32.8-79.2C454 338.6 482.1 327 512 327c29.9 0 58 11.6 79.2 32.8C612.4 381 624 409.1 624 439c0 29.9-11.6 58-32.8 79.2z"}}]},name:"environment",theme:"outlined"},rhe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:nhe}))},ahe=i.forwardRef(rhe),ohe={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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},ihe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:ohe}))},Xm=i.forwardRef(ihe),lhe={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM770.87 199.13l-52.2-52.2a8.01 8.01 0 014.7-13.6l179.4-21c5.1-.6 9.5 3.7 8.9 8.9l-21 179.4c-.8 6.6-8.9 9.4-13.6 4.7l-52.4-52.4-256.2 256.2a8.03 8.03 0 01-11.3 0l-42.4-42.4a8.03 8.03 0 010-11.3l256.1-256.3z"}}]},name:"export",theme:"outlined"},she=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:lhe}))},z0=i.forwardRef(she),che={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M553.1 509.1l-77.8 99.2-41.1-52.4a8 8 0 00-12.6 0l-99.8 127.2a7.98 7.98 0 006.3 12.9H696c6.7 0 10.4-7.7 6.3-12.9l-136.5-174a8.1 8.1 0 00-12.7 0zM360 442a40 40 0 1080 0 40 40 0 10-80 0zm494.6-153.4L639.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-image",theme:"outlined"},uhe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:che}))},Kg=i.forwardRef(uhe),dhe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M688 312v-48c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8zm-392 88c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zm144 452H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h272c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm445.7 51.5l-93.3-93.3C814.7 780.7 828 743.9 828 704c0-97.2-78.8-176-176-176s-176 78.8-176 176 78.8 176 176 176c35.8 0 69-10.7 96.8-29l94.7 94.7c1.6 1.6 3.6 2.3 5.6 2.3s4.1-.8 5.6-2.3l31-31a7.9 7.9 0 000-11.2zM652 816c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"file-search",theme:"outlined"},fhe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:dhe}))},A0=i.forwardRef(fhe),mhe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M296 392h64v64h-64zm0 190v160h128V582h-64v-62h-64v62zm80 48v64h-32v-64h32zm-16-302h64v64h-64zm-64-64h64v64h-64zm64 192h64v64h-64zm0-256h64v64h-64zm494.6 88.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 562H232V136h64v64h64v-64h174v216a42 42 0 0042 42h216v494z"}}]},name:"file-zip",theme:"outlined"},hhe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:mhe}))},nO=i.forwardRef(hhe),phe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z"}}]},name:"filter",theme:"outlined"},ghe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:phe}))},vhe=i.forwardRef(ghe),bhe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M484 443.1V528h-84.5c-4.1 0-7.5 3.1-7.5 7v42c0 3.8 3.4 7 7.5 7H484v84.9c0 3.9 3.2 7.1 7 7.1h42c3.9 0 7-3.2 7-7.1V584h84.5c4.1 0 7.5-3.2 7.5-7v-42c0-3.9-3.4-7-7.5-7H540v-84.9c0-3.9-3.1-7.1-7-7.1h-42c-3.8 0-7 3.2-7 7.1zm396-144.7H521L403.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-add",theme:"outlined"},yhe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:bhe}))},xhe=i.forwardRef(yhe),Che={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M840 192h-56v-72c0-13.3-10.7-24-24-24H168c-13.3 0-24 10.7-24 24v272c0 13.3 10.7 24 24 24h592c13.3 0 24-10.7 24-24V256h32v200H465c-22.1 0-40 17.9-40 40v136h-44c-4.4 0-8 3.6-8 8v228c0 .6.1 1.3.2 1.9A83.99 83.99 0 00457 960c46.4 0 84-37.6 84-84 0-2.1-.1-4.1-.2-6.1.1-.6.2-1.2.2-1.9V640c0-4.4-3.6-8-8-8h-44V520h351c22.1 0 40-17.9 40-40V232c0-22.1-17.9-40-40-40zM720 352H208V160h512v192zM477 876c0 11-9 20-20 20s-20-9-20-20V696h40v180z"}}]},name:"format-painter",theme:"outlined"},She=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Che}))},whe=i.forwardRef(She),$he={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M391 240.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L200 146.3a8.03 8.03 0 00-11.3 0l-42.4 42.3a8.03 8.03 0 000 11.3L280 333.6l-43.9 43.9a8.01 8.01 0 004.7 13.6L401 410c5.1.6 9.5-3.7 8.9-8.9L391 240.9zm10.1 373.2L240.8 633c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L146.3 824a8.03 8.03 0 000 11.3l42.4 42.3c3.1 3.1 8.2 3.1 11.3 0L333.7 744l43.7 43.7A8.01 8.01 0 00391 783l18.9-160.1c.6-5.1-3.7-9.4-8.8-8.8zm221.8-204.2L783.2 391c6.6-.8 9.4-8.9 4.7-13.6L744 333.6 877.7 200c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.3a8.03 8.03 0 00-11.3 0L690.3 279.9l-43.7-43.7a8.01 8.01 0 00-13.6 4.7L614.1 401c-.6 5.2 3.7 9.5 8.8 8.9zM744 690.4l43.9-43.9a8.01 8.01 0 00-4.7-13.6L623 614c-5.1-.6-9.5 3.7-8.9 8.9L633 783.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L824 877.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L744 690.4z"}}]},name:"fullscreen-exit",theme:"outlined"},Ehe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:$he}))},OP=i.forwardRef(Ehe),jhe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M290 236.4l43.9-43.9a8.01 8.01 0 00-4.7-13.6L169 160c-5.1-.6-9.5 3.7-8.9 8.9L179 329.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L370 423.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L290 236.4zm352.7 187.3c3.1 3.1 8.2 3.1 11.3 0l133.7-133.6 43.7 43.7a8.01 8.01 0 0013.6-4.7L863.9 169c.6-5.1-3.7-9.5-8.9-8.9L694.8 179c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L600.3 370a8.03 8.03 0 000 11.3l42.4 42.4zM845 694.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L654 600.3a8.03 8.03 0 00-11.3 0l-42.4 42.3a8.03 8.03 0 000 11.3L734 787.6l-43.9 43.9a8.01 8.01 0 004.7 13.6L855 864c5.1.6 9.5-3.7 8.9-8.9L845 694.9zm-463.7-94.6a8.03 8.03 0 00-11.3 0L236.3 733.9l-43.7-43.7a8.01 8.01 0 00-13.6 4.7L160.1 855c-.6 5.1 3.7 9.5 8.9 8.9L329.2 845c6.6-.8 9.4-8.9 4.7-13.6L290 787.6 423.7 654c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.4z"}}]},name:"fullscreen",theme:"outlined"},Nhe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:jhe}))},kP=i.forwardRef(Nhe),Ohe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M312.1 591.5c3.1 3.1 8.2 3.1 11.3 0l101.8-101.8 86.1 86.2c3.1 3.1 8.2 3.1 11.3 0l226.3-226.5c3.1-3.1 3.1-8.2 0-11.3l-36.8-36.8a8.03 8.03 0 00-11.3 0L517 485.3l-86.1-86.2a8.03 8.03 0 00-11.3 0L275.3 543.4a8.03 8.03 0 000 11.3l36.8 36.8z"}},{tag:"path",attrs:{d:"M904 160H548V96c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H120c-17.7 0-32 14.3-32 32v520c0 17.7 14.3 32 32 32h356.4v32L311.6 884.1a7.92 7.92 0 00-2.3 11l30.3 47.2v.1c2.4 3.7 7.4 4.7 11.1 2.3L512 838.9l161.3 105.8c3.7 2.4 8.7 1.4 11.1-2.3v-.1l30.3-47.2a8 8 0 00-2.3-11L548 776.3V744h356c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 512H160V232h704v440z"}}]},name:"fund-projection-screen",theme:"outlined"},khe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Ohe}))},Rhe=i.forwardRef(khe),Ihe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M511.6 76.3C264.3 76.2 64 276.4 64 523.5 64 718.9 189.3 885 363.8 946c23.5 5.9 19.9-10.8 19.9-22.2v-77.5c-135.7 15.9-141.2-73.9-150.3-88.9C215 726 171.5 718 184.5 703c30.9-15.9 62.4 4 98.9 57.9 26.4 39.1 77.9 32.5 104 26 5.7-23.5 17.9-44.5 34.7-60.8-140.6-25.2-199.2-111-199.2-213 0-49.5 16.3-95 48.3-131.7-20.4-60.5 1.9-112.3 4.9-120 58.1-5.2 118.5 41.6 123.2 45.3 33-8.9 70.7-13.6 112.9-13.6 42.4 0 80.2 4.9 113.5 13.9 11.3-8.6 67.3-48.8 121.3-43.9 2.9 7.7 24.7 58.3 5.5 118 32.4 36.8 48.9 82.7 48.9 132.3 0 102.2-59 188.1-200 212.9a127.5 127.5 0 0138.1 91v112.5c.8 9 0 17.9 15 17.9 177.1-59.7 304.6-227 304.6-424.1 0-247.2-200.4-447.3-447.5-447.3z"}}]},name:"github",theme:"outlined"},Mhe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Ihe}))},The=i.forwardRef(Mhe),Phe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M913.9 552.2L805 181.4v-.1c-7.6-22.9-25.7-36.5-48.3-36.5-23.4 0-42.5 13.5-49.7 35.2l-71.4 213H388.8l-71.4-213c-7.2-21.7-26.3-35.2-49.7-35.2-23.1 0-42.5 14.8-48.4 36.6L110.5 552.2c-4.4 14.7 1.2 31.4 13.5 40.7l368.5 276.4c2.6 3.6 6.2 6.3 10.4 7.8l8.6 6.4 8.5-6.4c4.9-1.7 9-4.7 11.9-8.9l368.4-275.4c12.4-9.2 18-25.9 13.6-40.6zM751.7 193.4c1-1.8 2.9-1.9 3.5-1.9 1.1 0 2.5.3 3.4 3L818 394.3H684.5l67.2-200.9zm-487.4 1c.9-2.6 2.3-2.9 3.4-2.9 2.7 0 2.9.1 3.4 1.7l67.3 201.2H206.5l57.8-200zM158.8 558.7l28.2-97.3 202.4 270.2-230.6-172.9zm73.9-116.4h122.1l90.8 284.3-212.9-284.3zM512.9 776L405.7 442.3H620L512.9 776zm157.9-333.7h119.5L580 723.1l90.8-280.8zm-40.7 293.9l207.3-276.7 29.5 99.2-236.8 177.5z"}}]},name:"gitlab",theme:"outlined"},Dhe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Phe}))},wv=i.forwardRef(Dhe),zhe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z"}}]},name:"global",theme:"outlined"},Ahe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:zhe}))},Kd=i.forwardRef(Ahe),Lhe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM496 208H312c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 544h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H312c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm328 244a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"hdd",theme:"outlined"},_he=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Lhe}))},Bhe=i.forwardRef(_he),Fhe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M536.1 273H488c-4.4 0-8 3.6-8 8v275.3c0 2.6 1.2 5 3.3 6.5l165.3 120.7c3.6 2.6 8.6 1.9 11.2-1.7l28.6-39c2.7-3.7 1.9-8.7-1.7-11.2L544.1 528.5V281c0-4.4-3.6-8-8-8zm219.8 75.2l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3L752.9 334.1a8 8 0 003 14.1zm167.7 301.1l-56.7-19.5a8 8 0 00-10.1 4.8c-1.9 5.1-3.9 10.1-6 15.1-17.8 42.1-43.3 80-75.9 112.5a353 353 0 01-112.5 75.9 352.18 352.18 0 01-137.7 27.8c-47.8 0-94.1-9.3-137.7-27.8a353 353 0 01-112.5-75.9c-32.5-32.5-58-70.4-75.9-112.5A353.44 353.44 0 01171 512c0-47.8 9.3-94.2 27.8-137.8 17.8-42.1 43.3-80 75.9-112.5a353 353 0 01112.5-75.9C430.6 167.3 477 158 524.8 158s94.1 9.3 137.7 27.8A353 353 0 01775 261.7c10.2 10.3 19.8 21 28.6 32.3l59.8-46.8C784.7 146.6 662.2 81.9 524.6 82 285 82.1 92.6 276.7 95 516.4 97.4 751.9 288.9 942 524.8 942c185.5 0 343.5-117.6 403.7-282.3 1.5-4.2-.7-8.9-4.9-10.4z"}}]},name:"history",theme:"outlined"},Hhe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Fhe}))},RP=i.forwardRef(Hhe),Vhe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M946.5 505L560.1 118.8l-25.9-25.9a31.5 31.5 0 00-44.4 0L77.5 505a63.9 63.9 0 00-18.8 46c.4 35.2 29.7 63.3 64.9 63.3h42.5V940h691.8V614.3h43.4c17.1 0 33.2-6.7 45.3-18.8a63.6 63.6 0 0018.7-45.3c0-17-6.7-33.1-18.8-45.2zM568 868H456V664h112v204zm217.9-325.7V868H632V640c0-22.1-17.9-40-40-40H432c-22.1 0-40 17.9-40 40v228H238.1V542.3h-96l370-369.7 23.1 23.1L882 542.3h-96.1z"}}]},name:"home",theme:"outlined"},Whe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Vhe}))},Ym=i.forwardRef(Whe),Uhe={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM653.3 424.6l52.2 52.2a8.01 8.01 0 01-4.7 13.6l-179.4 21c-5.1.6-9.5-3.7-8.9-8.9l21-179.4c.8-6.6 8.9-9.4 13.6-4.7l52.4 52.4 256.2-256.2c3.1-3.1 8.2-3.1 11.3 0l42.4 42.4c3.1 3.1 3.1 8.2 0 11.3L653.3 424.6z"}}]},name:"import",theme:"outlined"},qhe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Uhe}))},E2=i.forwardRef(qhe),Khe={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M885.2 446.3l-.2-.8-112.2-285.1c-5-16.1-19.9-27.2-36.8-27.2H281.2c-17 0-32.1 11.3-36.9 27.6L139.4 443l-.3.7-.2.8c-1.3 4.9-1.7 9.9-1 14.8-.1 1.6-.2 3.2-.2 4.8V830a60.9 60.9 0 0060.8 60.8h627.2c33.5 0 60.8-27.3 60.9-60.8V464.1c0-1.3 0-2.6-.1-3.7.4-4.9 0-9.6-1.3-14.1zm-295.8-43l-.3 15.7c-.8 44.9-31.8 75.1-77.1 75.1-22.1 0-41.1-7.1-54.8-20.6S436 441.2 435.6 419l-.3-15.7H229.5L309 210h399.2l81.7 193.3H589.4zm-375 76.8h157.3c24.3 57.1 76 90.8 140.4 90.8 33.7 0 65-9.4 90.3-27.2 22.2-15.6 39.5-37.4 50.7-63.6h156.5V814H214.4V480.1z"}}]},name:"inbox",theme:"outlined"},Ghe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Khe}))},Jm=i.forwardRef(Ghe),Xhe={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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"},Yhe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Xhe}))},L0=i.forwardRef(Yhe),Jhe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M608 112c-167.9 0-304 136.1-304 304 0 70.3 23.9 135 63.9 186.5L255.8 713.6l-62.3-62.3a8.19 8.19 0 00-11.4 0l-39.8 39.8a8.19 8.19 0 000 11.4l62.3 62.3-44.9 44.9-62.3-62.3a8.19 8.19 0 00-11.4 0l-39.8 39.8a8.19 8.19 0 000 11.4l110.3 111.2c3.1 3.1 8.2 3.1 11.3 0l253.6-253.6A304.1 304.1 0 00608 720c167.9 0 304-136.1 304-304S775.9 112 608 112m161.2 465.2C726.2 620.3 668.9 644 608 644s-118.2-23.7-161.2-66.8C403.7 534.2 380 476.9 380 416s23.7-118.2 66.8-161.2c43-43.1 100.3-66.8 161.2-66.8s118.2 23.7 161.2 66.8c43.1 43 66.8 100.3 66.8 161.2s-23.7 118.2-66.8 161.2"}}]},name:"key",theme:"outlined"},Qhe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Jhe}))},Zhe=i.forwardRef(Qhe),epe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M574 665.4a8.03 8.03 0 00-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 00-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 000 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 000 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 00-11.3 0L372.3 598.7a8.03 8.03 0 000 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z"}}]},name:"link",theme:"outlined"},tpe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:epe}))},qi=i.forwardRef(tpe),npe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z"}}]},name:"mail",theme:"outlined"},rpe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:npe}))},ape=i.forwardRef(rpe),ope={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 000 13.8z"}}]},name:"menu-fold",theme:"outlined"},ipe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:ope}))},lpe=i.forwardRef(ipe),spe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 000-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0014.4 7z"}}]},name:"menu-unfold",theme:"outlined"},cpe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:spe}))},upe=i.forwardRef(cpe),dpe={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M489.5 111.66c30.65-1.8 45.98 36.44 22.58 56.33A243.35 243.35 0 00426 354c0 134.76 109.24 244 244 244 72.58 0 139.9-31.83 186.01-86.08 19.87-23.38 58.07-8.1 56.34 22.53C900.4 745.82 725.15 912 512.5 912 291.31 912 112 732.69 112 511.5c0-211.39 164.29-386.02 374.2-399.65l.2-.01zm-81.15 79.75l-4.11 1.36C271.1 237.94 176 364.09 176 511.5 176 697.34 326.66 848 512.5 848c148.28 0 274.94-96.2 319.45-230.41l.63-1.93-.11.07a307.06 307.06 0 01-159.73 46.26L670 662c-170.1 0-308-137.9-308-308 0-58.6 16.48-114.54 46.27-162.47z"}}]},name:"moon",theme:"outlined"},fpe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:dpe}))},mpe=i.forwardRef(fpe),hpe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M456 231a56 56 0 10112 0 56 56 0 10-112 0zm0 280a56 56 0 10112 0 56 56 0 10-112 0zm0 280a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"more",theme:"outlined"},ppe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:hpe}))},Gg=i.forwardRef(ppe),gpe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M843.5 737.4c-12.4-75.2-79.2-129.1-155.3-125.4S550.9 676 546 752c-153.5-4.8-208-40.7-199.1-113.7 3.3-27.3 19.8-41.9 50.1-49 18.4-4.3 38.8-4.9 57.3-3.2 1.7.2 3.5.3 5.2.5 11.3 2.7 22.8 5 34.3 6.8 34.1 5.6 68.8 8.4 101.8 6.6 92.8-5 156-45.9 159.2-132.7 3.1-84.1-54.7-143.7-147.9-183.6-29.9-12.8-61.6-22.7-93.3-30.2-14.3-3.4-26.3-5.7-35.2-7.2-7.9-75.9-71.5-133.8-147.8-134.4-76.3-.6-140.9 56.1-150.1 131.9s40 146.3 114.2 163.9c74.2 17.6 149.9-23.3 175.7-95.1 9.4 1.7 18.7 3.6 28 5.8 28.2 6.6 56.4 15.4 82.4 26.6 70.7 30.2 109.3 70.1 107.5 119.9-1.6 44.6-33.6 65.2-96.2 68.6-27.5 1.5-57.6-.9-87.3-5.8-8.3-1.4-15.9-2.8-22.6-4.3-3.9-.8-6.6-1.5-7.8-1.8l-3.1-.6c-2.2-.3-5.9-.8-10.7-1.3-25-2.3-52.1-1.5-78.5 4.6-55.2 12.9-93.9 47.2-101.1 105.8-15.7 126.2 78.6 184.7 276 188.9 29.1 70.4 106.4 107.9 179.6 87 73.3-20.9 119.3-93.4 106.9-168.6zM329.1 345.2a83.3 83.3 0 11.01-166.61 83.3 83.3 0 01-.01 166.61zM695.6 845a83.3 83.3 0 11.01-166.61A83.3 83.3 0 01695.6 845z"}}]},name:"node-index",theme:"outlined"},vpe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:gpe}))},rO=i.forwardRef(vpe),bpe={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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm-88-532h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8zm224 0h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8z"}}]},name:"pause-circle",theme:"outlined"},ype=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:bpe}))},xpe=i.forwardRef(ype),Cpe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2zM304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z"}}]},name:"picture",theme:"outlined"},Spe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Cpe}))},aO=i.forwardRef(Spe),wpe={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 64zm144.1 454.9L437.7 677.8a8.02 8.02 0 01-12.7-6.5V353.7a8 8 0 0112.7-6.5L656.1 506a7.9 7.9 0 010 12.9z"}}]},name:"play-circle",theme:"filled"},$pe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:wpe}))},Epe=i.forwardRef($pe),jpe={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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M719.4 499.1l-296.1-215A15.9 15.9 0 00398 297v430c0 13.1 14.8 20.5 25.3 12.9l296.1-215a15.9 15.9 0 000-25.8zm-257.6 134V390.9L628.5 512 461.8 633.1z"}}]},name:"play-circle",theme:"outlined"},Npe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:jpe}))},Fc=i.forwardRef(Npe),Ope={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M280 752h80c4.4 0 8-3.6 8-8V280c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8zm192-280h80c4.4 0 8-3.6 8-8V280c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8v184c0 4.4 3.6 8 8 8zm192 72h80c4.4 0 8-3.6 8-8V280c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8v256c0 4.4 3.6 8 8 8zm216-432H144c-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:"project",theme:"outlined"},kpe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Ope}))},Qm=i.forwardRef(kpe),Rpe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M758.2 839.1C851.8 765.9 912 651.9 912 523.9 912 303 733.5 124.3 512.6 124 291.4 123.7 112 302.8 112 523.9c0 125.2 57.5 236.9 147.6 310.2 3.5 2.8 8.6 2.2 11.4-1.3l39.4-50.5c2.7-3.4 2.1-8.3-1.2-11.1-8.1-6.6-15.9-13.7-23.4-21.2a318.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-9.3 9.3-19.1 18-29.3 26L668.2 724a8 8 0 00-14.1 3l-39.6 162.2c-1.2 5 2.6 9.9 7.7 9.9l167 .8c6.7 0 10.5-7.7 6.3-12.9l-37.3-47.9z"}}]},name:"redo",theme:"outlined"},Ipe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Rpe}))},Mpe=i.forwardRef(Ipe),Tpe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 328a60 60 0 10120 0 60 60 0 10-120 0zM852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-32 660H204V128h616v596zM604 328a60 60 0 10120 0 60 60 0 10-120 0zm250.2 556H169.8c-16.5 0-29.8 14.3-29.8 32v36c0 4.4 3.3 8 7.4 8h729.1c4.1 0 7.4-3.6 7.4-8v-36c.1-17.7-13.2-32-29.7-32zM664 508H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"robot",theme:"outlined"},Ppe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Tpe}))},Dpe=i.forwardRef(Ppe),zpe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 736c0-111.6-65.4-208-160-252.9V317.3c0-15.1-5.3-29.7-15.1-41.2L536.5 95.4C530.1 87.8 521 84 512 84s-18.1 3.8-24.5 11.4L335.1 276.1a63.97 63.97 0 00-15.1 41.2v165.8C225.4 528 160 624.4 160 736h156.5c-2.3 7.2-3.5 15-3.5 23.8 0 22.1 7.6 43.7 21.4 60.8a97.2 97.2 0 0043.1 30.6c23.1 54 75.6 88.8 134.5 88.8 29.1 0 57.3-8.6 81.4-24.8 23.6-15.8 41.9-37.9 53-64a97 97 0 0043.1-30.5 97.52 97.52 0 0021.4-60.8c0-8.4-1.1-16.4-3.1-23.8H864zM762.3 621.4c9.4 14.6 17 30.3 22.5 46.6H700V558.7a211.6 211.6 0 0162.3 62.7zM388 483.1V318.8l124-147 124 147V668H388V483.1zM239.2 668c5.5-16.3 13.1-32 22.5-46.6 16.3-25.2 37.5-46.5 62.3-62.7V668h-84.8zm388.9 116.2c-5.2 3-11.2 4.2-17.1 3.4l-19.5-2.4-2.8 19.4c-5.4 37.9-38.4 66.5-76.7 66.5-38.3 0-71.3-28.6-76.7-66.5l-2.8-19.5-19.5 2.5a27.7 27.7 0 01-17.1-3.5c-8.7-5-14.1-14.3-14.1-24.4 0-10.6 5.9-19.4 14.6-23.8h231.3c8.8 4.5 14.6 13.3 14.6 23.8-.1 10.2-5.5 19.6-14.2 24.5zM464 400a48 48 0 1096 0 48 48 0 10-96 0z"}}]},name:"rocket",theme:"outlined"},Ape=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:zpe}))},Lo=i.forwardRef(Ape),Lpe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zm-405.8-201c-3-4.1-7.8-6.6-13-6.6H336c-6.5 0-10.3 7.4-6.5 12.7l126.4 174a16.1 16.1 0 0026 0l212.6-292.7c3.8-5.3 0-12.7-6.5-12.7h-55.2c-5.1 0-10 2.5-13 6.6L468.9 542.4l-64.7-89.1z"}}]},name:"safety-certificate",theme:"outlined"},_pe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Lpe}))},j2=i.forwardRef(_pe),Bpe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z"}}]},name:"save",theme:"outlined"},Fpe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Bpe}))},N2=i.forwardRef(Fpe),Hpe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M136 384h56c4.4 0 8-3.6 8-8V200h176c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H196c-37.6 0-68 30.4-68 68v180c0 4.4 3.6 8 8 8zm512-184h176v176c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V196c0-37.6-30.4-68-68-68H648c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zM376 824H200V648c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v180c0 37.6 30.4 68 68 68h180c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm512-184h-56c-4.4 0-8 3.6-8 8v176H648c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h180c37.6 0 68-30.4 68-68V648c0-4.4-3.6-8-8-8zm16-164H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},name:"scan",theme:"outlined"},Vpe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Hpe}))},oO=i.forwardRef(Vpe),Wpe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2a15.99 15.99 0 00-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z"}}]},name:"send",theme:"outlined"},Upe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Wpe}))},Hc=i.forwardRef(Upe),qpe={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"},Kpe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:qpe}))},Ms=i.forwardRef(Kpe),Gpe={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 64zm0 820c-205.4 0-372-166.6-372-372 0-89 31.3-170.8 83.5-234.8l523.3 523.3C682.8 852.7 601 884 512 884zm288.5-137.2L277.2 223.5C341.2 171.3 423 140 512 140c205.4 0 372 166.6 372 372 0 89-31.3 170.8-83.5 234.8z"}}]},name:"stop",theme:"outlined"},Xpe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Gpe}))},$v=i.forwardRef(Xpe),Ype={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M548 818v126a16 16 0 01-16 16h-40a16 16 0 01-16-16V818c15.85 1.64 27.84 2.46 36 2.46 8.15 0 20.16-.82 36-2.46m205.25-115.66l89.1 89.1a16 16 0 010 22.62l-28.29 28.29a16 16 0 01-22.62 0l-89.1-89.1c12.37-10.04 21.43-17.95 27.2-23.71 5.76-5.77 13.67-14.84 23.71-27.2m-482.5 0c10.04 12.36 17.95 21.43 23.71 27.2 5.77 5.76 14.84 13.67 27.2 23.71l-89.1 89.1a16 16 0 01-22.62 0l-28.29-28.29a16 16 0 010-22.63zM512 278c129.24 0 234 104.77 234 234S641.24 746 512 746 278 641.24 278 512s104.77-234 234-234m0 72c-89.47 0-162 72.53-162 162s72.53 162 162 162 162-72.53 162-162-72.53-162-162-162M206 476c-1.64 15.85-2.46 27.84-2.46 36 0 8.15.82 20.16 2.46 36H80a16 16 0 01-16-16v-40a16 16 0 0116-16zm738 0a16 16 0 0116 16v40a16 16 0 01-16 16H818c1.64-15.85 2.46-27.84 2.46-36 0-8.15-.82-20.16-2.46-36zM814.06 180.65l28.29 28.29a16 16 0 010 22.63l-89.1 89.09c-10.04-12.37-17.95-21.43-23.71-27.2-5.77-5.76-14.84-13.67-27.2-23.71l89.1-89.1a16 16 0 0122.62 0m-581.5 0l89.1 89.1c-12.37 10.04-21.43 17.95-27.2 23.71-5.76 5.77-13.67 14.84-23.71 27.2l-89.1-89.1a16 16 0 010-22.62l28.29-28.29a16 16 0 0122.62 0M532 64a16 16 0 0116 16v126c-15.85-1.64-27.84-2.46-36-2.46-8.15 0-20.16.82-36 2.46V80a16 16 0 0116-16z"}}]},name:"sun",theme:"outlined"},Jpe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Ype}))},iO=i.forwardRef(Jpe),Qpe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z"}}]},name:"sync",theme:"outlined"},Zpe=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:Qpe}))},Zm=i.forwardRef(Zpe),ege={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z"}}]},name:"thunderbolt",theme:"outlined"},tge=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:ege}))},IP=i.forwardRef(tge),nge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M876.6 239.5c-.5-.9-1.2-1.8-2-2.5-5-5-13.1-5-18.1 0L684.2 409.3l-67.9-67.9L788.7 169c.8-.8 1.4-1.6 2-2.5 3.6-6.1 1.6-13.9-4.5-17.5-98.2-58-226.8-44.7-311.3 39.7-67 67-89.2 162-66.5 247.4l-293 293c-3 3-2.8 7.9.3 11l169.7 169.7c3.1 3.1 8.1 3.3 11 .3l292.9-292.9c85.5 22.8 180.5.7 247.6-66.4 84.4-84.5 97.7-213.1 39.7-311.3zM786 499.8c-58.1 58.1-145.3 69.3-214.6 33.6l-8.8 8.8-.1-.1-274 274.1-79.2-79.2 230.1-230.1s0 .1.1.1l52.8-52.8c-35.7-69.3-24.5-156.5 33.6-214.6a184.2 184.2 0 01144-53.5L537 318.9a32.05 32.05 0 000 45.3l124.5 124.5a32.05 32.05 0 0045.3 0l132.8-132.8c3.7 51.8-14.4 104.8-53.6 143.9z"}}]},name:"tool",theme:"outlined"},rge=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:nge}))},O2=i.forwardRef(rge),age={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"},oge=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:age}))},MP=i.forwardRef(oge),ige={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"},lge=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:ige}))},Ev=i.forwardRef(lge),sge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 302.3L784 376V224c0-35.3-28.7-64-64-64H128c-35.3 0-64 28.7-64 64v576c0 35.3 28.7 64 64 64h592c35.3 0 64-28.7 64-64V648l128 73.7c21.3 12.3 48-3.1 48-27.6V330c0-24.6-26.7-40-48-27.7zM712 792H136V232h576v560zm176-167l-104-59.8V458.9L888 399v226zM208 360h112c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H208c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}}]},name:"video-camera",theme:"outlined"},cge=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:sge}))},uge=i.forwardRef(cge),dge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 720a48 48 0 1096 0 48 48 0 10-96 0zm16-304v184c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V416c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8zm475.7 440l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zm-783.5-27.9L512 239.9l339.8 588.2H172.2z"}}]},name:"warning",theme:"outlined"},fge=function(t,n){return i.createElement(ft,Me({},t,{ref:n,icon:dge}))},TP=i.forwardRef(fge);const mge="0.1.109",Wu={version:mge};async function tt(e,t){const n=await fetch(e,t);if(!n.ok)throw new Error((await n.json().catch(()=>({}))).error||"Something went wrong. Please try again.");return n.status===204?null:n.json()}const Pr={list:()=>tt("/api/launchers"),running:()=>tt("/api/launchers/running"),create:e=>tt("/api/launchers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),update:(e,t)=>tt(`/api/launchers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),remove:e=>tt(`/api/launchers/${e}`,{method:"DELETE"}),start:e=>tt(`/api/launchers/${e}/start`,{method:"POST"}),openTerminal:e=>tt(`/api/launchers/${e}/open-terminal`,{method:"POST"}),run:(e,t)=>tt(`/api/launchers/${e}/scripts/${t}/run`,{method:"POST"}),runInstall:e=>tt(`/api/launchers/${e}/install/run`,{method:"POST"}),stop:async(e,t)=>{try{return await tt(`/api/launchers/${e}/stop`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({scriptId:t})})}catch{return tt(`/api/launchers/${e}/scripts/${encodeURIComponent(t)}/stop`,{method:"POST"})}},logs:(e,t)=>tt(`/api/launchers/${e}/scripts/${t}/logs`),errorLogs:(e,t)=>tt(`/api/launchers/${e}/scripts/${t}/logs/error`),clearLogs:(e,t)=>tt(`/api/launchers/${e}/scripts/${encodeURIComponent(t)}/logs`,{method:"DELETE"}),packageScripts:e=>tt(`/api/launchers/${e}/package-scripts`),runPackageScript:(e,t)=>tt(`/api/launchers/${e}/package-scripts/${encodeURIComponent(t)}/run`,{method:"POST"}),packageScriptLogs:(e,t)=>tt(`/api/launchers/${e}/package-scripts/${encodeURIComponent(t)}/logs`),packageScriptErrorLogs:(e,t)=>tt(`/api/launchers/${e}/package-scripts/${encodeURIComponent(t)}/logs/error`),clearPackageScriptLogs:(e,t)=>tt(`/api/launchers/${e}/package-scripts/${encodeURIComponent(t)}/logs`,{method:"DELETE"})},lO={get:()=>tt("/api/overview"),notifications:()=>tt("/api/overview/notifications")},hge={list:()=>tt("/api/plugins")},Bi={list:e=>tt(`/api/clipboard${e?`?date=${encodeURIComponent(e)}`:""}`),search:e=>tt(`/api/clipboard/search?q=${encodeURIComponent(e)}`),tagged:()=>tt("/api/clipboard/tagged"),remove:(e,t)=>tt(`/api/clipboard/${encodeURIComponent(e)}/${encodeURIComponent(t)}`,{method:"DELETE"}),uploadImage:e=>tt("/api/clipboard/image",{method:"POST",headers:{"Content-Type":e.type||"image/png"},body:e}),updateTags:(e,t,n)=>tt(`/api/clipboard/${encodeURIComponent(e)}/${encodeURIComponent(t)}/tags`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tags:n})}),copied:(e,t)=>tt(`/api/clipboard/${encodeURIComponent(e)}/${encodeURIComponent(t)}/copied`,{method:"POST"}),copyImage:(e,t)=>tt(`/api/clipboard/${encodeURIComponent(e)}/${encodeURIComponent(t)}/copy-image`,{method:"POST"})},gl={list:()=>tt("/api/group-tasks"),catalog:()=>tt("/api/group-tasks/catalog"),create:e=>tt("/api/group-tasks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),update:(e,t)=>tt(`/api/group-tasks/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),remove:e=>tt(`/api/group-tasks/${e}`,{method:"DELETE"}),start:e=>tt(`/api/group-tasks/${e}/start`,{method:"POST"}),stop:e=>tt(`/api/group-tasks/${e}/stop`,{method:"POST"})},fx={list:()=>tt("/api/port-diagnostics"),get:e=>tt(`/api/port-diagnostics/${encodeURIComponent(e)}`),kill:(e,t)=>tt("/api/port-diagnostics/kill",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({port:e,pid:t})})},PP={open:e=>tt("/api/settings/open-url",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e})}),openPath:(e,t="")=>tt("/api/settings/open-editor",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e,location:t})}),openFolder:e=>tt("/api/settings/open-folder",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e})})},Xn={status:()=>tt("/api/settings"),devConfigurations:()=>tt("/api/settings/dev-configurations"),selectDirectory:()=>tt("/api/settings/select-directory",{method:"POST"}),selectFile:()=>tt("/api/settings/select-file",{method:"POST"}),openDataDir:()=>tt("/api/settings/open-data-dir",{method:"POST"}),openFolder:e=>tt("/api/settings/open-folder",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e})}),revealFolder:e=>tt("/api/settings/reveal-folder",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e})}),saveDomain:e=>tt("/api/settings/domain",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({domain:e})}),saveAiApiHost:e=>tt("/api/settings/ai-api-host",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({aiApiHost:e})}),saveJiraIssuePrefix:e=>tt("/api/settings/jira-issue-prefix",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({jiraIssuePrefix:e})}),saveDefaultEditor:e=>tt("/api/settings/default-editor",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({defaultEditor:e})}),saveDefaultBrowser:e=>tt("/api/settings/default-browser",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({defaultBrowser:e})}),saveTheme:e=>tt("/api/settings/theme",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({theme:e})}),saveDevConfigurations:e=>tt("/api/settings/dev-configurations",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),saveAccessToken:(e,t)=>tt(`/api/settings/${encodeURIComponent(e)}-access-token`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:t})}),saveClipboardEnabled:e=>tt("/api/settings/clipboard-enabled",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:e})}),saveClipboardImageEnabled:e=>tt("/api/settings/clipboard-image-enabled",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:e})}),saveClipboardDeduplicateMinutes:e=>tt("/api/settings/clipboard-deduplicate-minutes",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({minutes:e})})},sO={status:(e=!1)=>tt(`/api/updates${e?"?refresh=1":""}`),selfUpdate:(e="latest")=>tt("/api/updates/self-update",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({version:e})})},pge={install:e=>tt("/api/settings/dev-configurations/nvm/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({version:e})})},xc={manage:(e,t)=>tt(`/api/settings/dev-configurations/npm/${encodeURIComponent(e)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({packageName:t})}),versions:e=>tt("/api/settings/dev-configurations/npm/versions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({packageName:e})}),useSuggestedPrefix:()=>tt("/api/settings/dev-configurations/npm/use-prefix-suggestion",{method:"POST"})};xc.search=e=>tt("/api/settings/dev-configurations/npm/search",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:e})});const mx={stats:()=>tt("/api/data-backup/stats"),export:async()=>{var r;const e=await fetch("/api/data-backup/export");if(!e.ok)throw new Error((await e.json().catch(()=>({}))).error||"Unable to export data backup.");const n=((r=(e.headers.get("Content-Disposition")||"").match(/filename="([^"]+)"/))==null?void 0:r[1])||"devbuddy-data-backup.tar.gz";return{blob:await e.blob(),filename:n}},import:e=>tt("/api/data-backup/import",{method:"POST",headers:{"Content-Type":"application/gzip"},body:e})},Sm={get:()=>tt("/api/presentations"),save:e=>tt("/api/presentations",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({plans:e})}),setActive:e=>tt("/api/presentations/active",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({plan:e})})},ic={check:e=>tt("/api/pr-review/check",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prLink:e})}),aiReview:e=>tt(`/api/pr-review/ai-review/${encodeURIComponent(e)}`),rules:()=>tt("/api/pr-review/rules"),saveRules:(e,t,n)=>tt("/api/pr-review/rules",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({rules:e,customRules:t,fileFilters:n})}),myPrs:()=>tt("/api/pr-review/my-prs"),reviewPrs:()=>tt("/api/pr-review/review-prs"),comment:e=>tt("/api/pr-review/comment",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})},hg={load:e=>tt("/api/pr-conflicts/load",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prUrl:e})}),myConflicts:()=>tt("/api/pr-conflicts/my-conflicts"),resolve:e=>tt("/api/pr-conflicts/resolve",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),checkBranch:e=>tt("/api/pr-conflicts/check-branch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})},Ba={list:()=>tt("/api/jira-filters"),create:e=>tt("/api/jira-filters",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),update:(e,t)=>tt(`/api/jira-filters/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),remove:e=>tt(`/api/jira-filters/${e}`,{method:"DELETE"}),issues:e=>tt(`/api/jira-filters/${e}/issues`),cloneIssue:e=>tt("/api/jira-filters/issues/clone",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),templates:{list:()=>tt("/api/jira-filters/templates"),create:e=>tt("/api/jira-filters/templates",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),update:(e,t)=>tt(`/api/jira-filters/templates/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),remove:e=>tt(`/api/jira-filters/templates/${e}`,{method:"DELETE"})},recentlyCreated:()=>tt("/api/jira-filters/recently-created"),recentlyCommented:()=>tt("/api/jira-filters/recently-commented"),recentlyMentioned:()=>tt("/api/jira-filters/recently-mentioned"),recentlyUpdated:()=>tt("/api/jira-filters/recently-updated")},Ha={list:()=>tt("/api/todos"),create:e=>tt("/api/todos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),update:(e,t)=>tt(`/api/todos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),remove:e=>tt(`/api/todos/${e}`,{method:"DELETE"}),archive:e=>tt(`/api/todos/${e}/archive`,{method:"POST"}),unarchive:e=>tt(`/api/todos/${e}/unarchive`,{method:"POST"}),batch:(e,t)=>tt("/api/todos/batch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,ids:t})})},os={list:()=>tt("/api/memos"),listImages:()=>tt("/api/memos/images"),uploadImage:e=>tt("/api/memos/images",{method:"POST",headers:{"Content-Type":e.type||"image/png"},body:e}),create:e=>tt("/api/memos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),update:(e,t)=>tt(`/api/memos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),remove:e=>tt(`/api/memos/${e}`,{method:"DELETE"}),removeImage:e=>tt(`/api/memos/images/${encodeURIComponent(e)}`,{method:"DELETE"})},Wi={list:()=>tt("/api/mind-maps"),get:e=>tt(`/api/mind-maps/${encodeURIComponent(e)}`),resolveJiraIssue:e=>tt("/api/mind-maps/jira-issues/resolve",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({input:e})}),create:e=>tt("/api/mind-maps",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),update:(e,t)=>tt(`/api/mind-maps/${encodeURIComponent(e)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),remove:e=>tt(`/api/mind-maps/${encodeURIComponent(e)}`,{method:"DELETE"})},Cc={list:()=>tt("/api/static-pages"),create:e=>tt("/api/static-pages",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),update:(e,t)=>tt(`/api/static-pages/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),remove:e=>tt(`/api/static-pages/${e}`,{method:"DELETE"})},Nc={list:()=>tt("/api/errors"),log:e=>tt("/api/errors",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),clear:()=>tt("/api/errors",{method:"DELETE"}),remove:e=>tt(`/api/errors/${e}`,{method:"DELETE"})},is={getData:()=>tt("/api/postman"),importCollection:e=>tt("/api/postman/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({collectionJson:e})}),createCollection:e=>tt("/api/postman/collections",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),updateCollection:(e,t)=>tt(`/api/postman/collections/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),deleteCollection:e=>tt(`/api/postman/collections/${e}`,{method:"DELETE"}),saveEnvironments:e=>tt("/api/postman/environments",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),sendRequest:e=>tt("/api/postman/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})},hx={status:()=>tt("/api/bookmark-sync/status"),preview:e=>tt(`/api/bookmark-sync/preview?mode=${encodeURIComponent(e)}`),sync:e=>tt("/api/bookmark-sync/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:e})})},fm={scan:e=>tt("/api/file-organizer/scan",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),execute:e=>tt("/api/file-organizer/execute",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),getHistory:()=>tt("/api/file-organizer/history"),undo:e=>tt("/api/file-organizer/undo",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:e})}),browse:e=>tt("/api/file-organizer/browse",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e})})},vl={listApps:()=>tt("/api/branch-sync/apps"),createApp:e=>tt("/api/branch-sync/apps",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),updateApp:(e,t)=>tt(`/api/branch-sync/apps/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),deleteApp:e=>tt(`/api/branch-sync/apps/${e}`,{method:"DELETE"}),check:e=>tt("/api/branch-sync/check",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({app:e})}),createPr:e=>tt("/api/branch-sync/create-pr",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),createBranch:e=>tt("/api/branch-sync/create-branch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),getBranches:e=>tt(`/api/branch-sync/branches?repo=${encodeURIComponent(e)}`)},Kf={repositories:e=>tt(`/api/branch-health/repositories?workspaceDir=${encodeURIComponent(e)}`),history:()=>tt("/api/branch-health/history"),scan:e=>tt("/api/branch-health/scan",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({folder:e})}),preflight:(e,t)=>tt("/api/branch-health/preflight",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({folder:e,branch:t})}),remove:(e,t,n)=>tt("/api/branch-health/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({folder:e,branch:t,...n})})},mo={config:()=>tt("/api/package-upgrade/config"),dependencyScan:()=>tt("/api/package-upgrade/dependency-scan"),dependencyRepositories:()=>tt("/api/package-upgrade/dependency-repositories"),saveDependencyRepositories:e=>tt("/api/package-upgrade/dependency-repositories",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({directories:e})}),saveConfig:e=>tt("/api/package-upgrade/config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspaceDir:e})}),addRepo:e=>tt("/api/package-upgrade/repos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),packageNames:e=>tt("/api/package-upgrade/repos/packages",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({repoIds:e})}),branches:e=>tt("/api/package-upgrade/repos/branches",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({repoIds:e})}),cloneRepo:e=>tt(`/api/package-upgrade/repos/${e}/clone`,{method:"POST"}),removeRepo:e=>tt(`/api/package-upgrade/repos/${e}`,{method:"DELETE"}),createTask:e=>tt("/api/package-upgrade/tasks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})},gge="modulepreload",vge=function(e){return"/"+e},cO={},Vc=function(t,n,r){let a=Promise.resolve();if(n&&n.length>0){let l=function(f){return Promise.all(f.map(h=>Promise.resolve(h).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),d=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));a=l(n.map(f=>{if(f=vge(f),f in cO)return;cO[f]=!0;const h=f.endsWith(".css"),p=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${p}`))return;const g=document.createElement("link");if(g.rel=h?"stylesheet":gge,h||(g.as="script"),g.crossOrigin="",g.href=f,d&&g.setAttribute("nonce",d),document.head.appendChild(g),h)return new Promise((v,y)=>{g.addEventListener("load",v),g.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${f}`)))})}))}function o(l){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=l,window.dispatchEvent(s),!s.defaultPrevented)throw l}return a.then(l=>{for(const s of l||[])s.status==="rejected"&&o(s.reason);return t().catch(o)})};async function DP(e,t,n){const r=URL.createObjectURL(e);try{const a=await new Promise((f,h)=>{const p=new Image;p.onload=()=>f(p),p.onerror=()=>h(new Error("Unable to read this image. Please choose a valid image file.")),p.src=r}),o=document.createElement("canvas"),l=Math.max(a.naturalWidth,a.naturalHeight);let s=1;t&&(s=t/l),n!=null&&n>0&&n<=100&&(s=s*(n/100)),o.width=Math.max(1,Math.round(a.naturalWidth*s)),o.height=Math.max(1,Math.round(a.naturalHeight*s));const d=o.getContext("2d",{willReadFrequently:!0});return d.drawImage(a,0,0,o.width,o.height),{imageData:d.getImageData(0,0,o.width,o.height),width:o.width,height:o.height}}finally{URL.revokeObjectURL(r)}}async function bge(e,t={}){const{quality:n=75,progressive:r=!0,optimizeCoding:a=!0,autoSubsample:o=!0}=t,[{encode:l},{imageData:s}]=await Promise.all([Vc(()=>import("./index-_vMuByUV.js"),[]),DP(e)]),d=await l(s,{quality:n,progressive:r,optimize_coding:a,auto_subsample:o}),f=new Blob([d],{type:"image/jpeg"}),h=(e.name||"clipboard-image.png").replace(/\.[^.]+$/,"")+".jpg";return new File([f],h,{type:"image/jpeg"})}const{Paragraph:yge,Text:xge,Title:Cge}=wn;function Xr({actions:e,className:t="",copyClassName:n="",description:r,descriptionClassName:a="",eyebrow:o="WORKBENCH",title:l,titleClassName:s="",titlePrefix:d,titleSuffix:f,titleRowClassName:h=""}){const p=c.jsx(Cge,{className:s||void 0,level:2,children:l});return c.jsxs("header",{className:["page-header","workspace-page-header",t].filter(Boolean).join(" "),children:[c.jsxs("div",{className:n||void 0,children:[c.jsx(xge,{className:"workspace-page-eyebrow",children:o}),d||f?c.jsxs("div",{className:h||void 0,children:[d,p,f]}):p,r?c.jsx(yge,{className:["workspace-page-description",a].filter(Boolean).join(" "),type:"secondary",children:r}):null]}),e||null]})}const uO=[{value:"chrome",label:"Google Chrome"},{value:"edge",label:"Microsoft Edge"},{value:"safari",label:"Safari"}];function Sge(e=!0){return e?uO:uO.filter(t=>t.value!=="safari")}function hr(e){e&&PP.open(e).catch(()=>{window.open(e,"_blank")})}function _0(e,t){if(!e||!t)return"";const n=e.replace(/^https?:\/\//,"").replace(/\/+$/,"");return`https://${n.startsWith("jira.")?n:`jira.${n}`}/browse/${t.toUpperCase()}`}function wge(e,t){if(!t)return"";if(!e)return`https://jira.example.com/issues/?filter=${encodeURIComponent(t)}`;const n=e.replace(/^https?:\/\//i,"").replace(/\/+$/,"");return`https://${n.includes("jira")||n.includes(".atlassian.net")?n:`jira.${n}`}/issues/?filter=${encodeURIComponent(t)}`}const{Text:lc}=wn,Uu=()=>new Intl.DateTimeFormat("en-CA").format(new Date),$ge=[{value:0,label:"No deduplication (0 min)"},{value:5,label:"5 minutes"},{value:15,label:"15 minutes"},{value:30,label:"30 minutes"},{value:60,label:"1 hour (Default)"},{value:120,label:"2 hours"},{value:360,label:"6 hours"},{value:720,label:"12 hours"},{value:1440,label:"24 hours"}];function Ege({value:e,domain:t,jiraIssuePrefix:n}){const r=[],a=/\[[^\]]+\]\(https?:\/\/[^\s)]+\)|https?:\/\/[^\s]+/g;let o=0;const l=(n||"").split(/[\s,]+/).filter(Boolean).map(f=>f.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),s=l.length>0&&t?new RegExp(`\\b(?:${l.join("|")})-[a-zA-Z0-9]{1,10}\\b`,"gi"):null,d=(f,h)=>{if(!s||!t)return f;const p=[];let g=0;s.lastIndex=0;for(const v of f.matchAll(s)){v.index>g&&p.push(f.slice(g,v.index));const y=v[0],C=_0(t,y);p.push(c.jsx("a",{href:C,target:"_blank",rel:"noreferrer",onClick:x=>{x.preventDefault(),hr(C)},children:y},`${h}-${v.index}`)),g=v.index+y.length}return g<f.length&&p.push(f.slice(g)),p};for(const f of e.matchAll(a)){f.index>o&&r.push(...d(e.slice(o,f.index),`txt-${f.index}`));const h=f[0].match(/^\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)$/);if(h)r.push(c.jsx("a",{href:h[2],target:"_blank",rel:"noreferrer",onClick:p=>{p.preventDefault(),hr(h[2])},children:h[1]},f.index));else{const p=f[0].replace(/[),.;:!?]+$/,"");r.push(c.jsx("a",{href:p,target:"_blank",rel:"noreferrer",onClick:g=>{g.preventDefault(),hr(p)},children:p},f.index)),f[0].length>p.length&&r.push(f[0].slice(p.length))}o=f.index+f[0].length}return o<e.length&&r.push(...d(e.slice(o),"txt-end")),r}const dO=e=>e.text||e.preview||"",fO=e=>`/api/clipboard/image/${encodeURIComponent(e)}`;async function jge(e){if(e.type==="image/png")return e;const t=URL.createObjectURL(e);try{const n=await new Promise((o,l)=>{const s=new window.Image;s.onload=()=>o(s),s.onerror=()=>l(new Error("Unable to decode clipboard image.")),s.src=t}),r=document.createElement("canvas");r.width=n.naturalWidth,r.height=n.naturalHeight;const a=r.getContext("2d");if(!a)throw new Error("Image canvas is unavailable.");return a.drawImage(n,0,0),await new Promise((o,l)=>{r.toBlob(s=>{s?o(s):l(new Error("Unable to encode clipboard image as PNG."))},"image/png")})}finally{URL.revokeObjectURL(t)}}function qu(e,t,n){const r=e.trim();if(!r)return!1;if(t==="account")return r.length<=20&&(/^[AT]\d+/i.test(r)||/\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b/i.test(r)||/\b(?:account|username|user\s*name|login|帐号|账号|用户名)\s*[:=]/i.test(r));if(t==="id")return/^[a-zA-Z0-9]+-[a-zA-Z0-9]+-[a-zA-Z0-9]+-[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*$/i.test(r);if(t==="url")return/^https?:\/\/[^\s]+$/i.test(r);if(t==="json"){if(r.startsWith("{")&&r.endsWith("}")||r.startsWith("[")&&r.endsWith("]"))try{return JSON.parse(r),!0}catch{return!1}return!1}if(t==="jira"){const a=(n||"").split(/[\s,]+/).filter(Boolean).map(o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"));return a.length>0?new RegExp(`\\b(?:${a.join("|")})-[a-zA-Z0-9]{1,10}\\b`,"i").test(r):/\b[A-Z]{2,10}-[a-zA-Z0-9]{1,10}\b/i.test(r)}return!0}function Nge({children:e}){const t=i.useRef(null),[n,r]=i.useState(!1);return i.useEffect(()=>{const a=t.current;if(!a)return;const o=()=>{r(a.scrollTop+a.clientHeight<a.scrollHeight-1)};o(),a.addEventListener("scroll",o,{passive:!0});const l=typeof ResizeObserver<"u"?new ResizeObserver(o):null;return l==null||l.observe(a),()=>{a.removeEventListener("scroll",o),l==null||l.disconnect()}},[e]),c.jsxs("div",{className:`clipboard-preview-wrap${n?" has-more":""}`,children:[c.jsx("pre",{ref:t,className:"clipboard-preview",children:e}),c.jsx("span",{className:"clipboard-preview-fade","aria-hidden":"true"})]})}function Oge(){const{message:e}=Br.useApp(),[t,n]=i.useState(()=>{const re=localStorage.getItem("buddy_clipboard_enabled");return re!==null?re==="true":!0}),[r,a]=i.useState(!0),[o,l]=i.useState([]),[s,d]=i.useState(Uu()),[f,h]=i.useState([]),[p,g]=i.useState([]),[v,y]=i.useState(null),[C,x]=i.useState(""),[S,$]=i.useState("all"),[E,k]=i.useState(null),[O,N]=i.useState(!1),[R,j]=i.useState(""),[I,M]=i.useState(""),[P,A]=i.useState([]),[H,T]=i.useState(!1),[L,D]=i.useState(""),[F,V]=i.useState(""),[q,B]=i.useState(60),[U,K]=i.useState(!1),[_,G]=i.useState(!0);i.useEffect(()=>{Xn.status().then(re=>{if(re){if(re.isMac!==void 0&&K(re.isMac),re.clipboardEnabled!==void 0){const ce=re.clipboardEnabled!==!1;n(ce),localStorage.setItem("buddy_clipboard_enabled",String(ce))}re.clipboardImageEnabled!==void 0&&G(re.clipboardImageEnabled!==!1),re.clipboardDeduplicateMinutes!==void 0&&B(re.clipboardDeduplicateMinutes),re.domain&&D(re.domain),re.jiraIssuePrefix&&V(re.jiraIssuePrefix)}}).catch(()=>{}).finally(()=>a(!1))},[]);const X=async re=>{n(re),localStorage.setItem("buddy_clipboard_enabled",String(re));try{const ve=(await Xn.saveClipboardEnabled(re)).clipboardEnabled!==!1;n(ve),localStorage.setItem("buddy_clipboard_enabled",String(ve)),e.success(re?"Clipboard history enabled":"Clipboard history disabled")}catch(ce){e.error(ce.message)}},Y=async re=>{G(re);try{const ce=await Xn.saveClipboardImageEnabled(re);ce&&ce.clipboardImageEnabled!==void 0&&G(ce.clipboardImageEnabled!==!1),e.success(re?"Image clipboard monitoring enabled":"Image clipboard monitoring disabled")}catch(ce){e.error(ce.message)}},le=async re=>{B(re);try{await Xn.saveClipboardDeduplicateMinutes(re),e.success("Duplicate filter window updated.")}catch(ce){e.error(ce.message)}};i.useEffect(()=>{const re=I.trim();if(!re){A([]),T(!1);return}let ce=!1,ve=null;const be=Date.now();T(!0);const Ce=setTimeout(async()=>{try{const ge=await Bi.search(re);ce||A(ge.items||[])}catch(ge){ce||e.error(ge.message)}finally{const ge=Math.max(0,500-(Date.now()-be));ve=setTimeout(()=>{ce||T(!1)},ge)}},250);return()=>{ce=!0,clearTimeout(Ce),ve&&clearTimeout(ve)}},[I]);const oe=async re=>{try{const[ce,ve]=await Promise.all([Bi.list(re),Bi.tagged().catch(()=>({items:[]}))]);l(ce.dates),h(ce.items),g(ve.items||[])}catch(ce){e.error(ce.message)}},ue=async(re,ce)=>{const ve=(ce||"").trim();if(!ve)return;const be=re.tags||[];if(be.includes(ve)){y(null);return}const Ce=[...be,ve],ge=re.date||s;try{await Bi.updateTags(ge,re.id,Ce),h(Oe=>Oe.map(Ee=>Ee.id===re.id?{...Ee,tags:Ce}:Ee)),A(Oe=>Oe.map(Ee=>Ee.id===re.id?{...Ee,tags:Ce}:Ee)),g(Oe=>Oe.some(De=>De.id===re.id)?Oe.map(De=>De.id===re.id?{...De,tags:Ce}:De):[{...re,tags:Ce,date:ge},...Oe]),e.success("Tag added")}catch(Oe){e.error(Oe.message)}finally{y(null),x("")}},ne=async(re,ce)=>{const be=(re.tags||[]).filter(ge=>ge!==ce),Ce=re.date||s;try{await Bi.updateTags(Ce,re.id,be),h(ge=>ge.map(Oe=>Oe.id===re.id?{...Oe,tags:be}:Oe)),A(ge=>ge.map(Oe=>Oe.id===re.id?{...Oe,tags:be}:Oe)),g(ge=>be.length===0?ge.filter(Oe=>Oe.id!==re.id):ge.map(Oe=>Oe.id===re.id?{...Oe,tags:be}:Oe)),e.success("Tag removed")}catch(ge){e.error(ge.message)}},te=i.useRef(Uu());i.useEffect(()=>{if(!t)return;const re=()=>{const Ce=Uu();if(Ce!==te.current){const ge=te.current;if(te.current=Ce,s===ge)return d(Ce),!0}return!1};re()||oe(s);const ve=()=>{re()||oe(s)};window.addEventListener("visibilitychange",ve),window.addEventListener("focus",ve);let be=null;return s===Uu()&&(be=setInterval(()=>{document.visibilityState==="visible"&&oe(s)},3e3)),()=>{window.removeEventListener("visibilitychange",ve),window.removeEventListener("focus",ve),be&&clearInterval(be)}},[s,t]);const ee=async re=>{const ce=typeof re=="object"?re:{id:re},ve=ce.date||s;try{await Bi.remove(ve,ce.id),A(be=>be.filter(Ce=>Ce.id!==ce.id)),await oe(s),e.success("Clipboard entry deleted.")}catch(be){e.error(be.message)}},Q=async re=>{var ve;const ce=re.date||s;if(re.imageFile)try{if(!((ve=navigator.clipboard)!=null&&ve.write)||typeof window.ClipboardItem>"u")throw new Error("Image clipboard is not supported by this browser.");await Bi.copied(ce,re.id);const be=await fetch(fO(re.imageFile));if(!be.ok)throw new Error("Unable to load image.");const Ce=await jge(await be.blob());try{await navigator.clipboard.write([new ClipboardItem({"image/png":Ce})])}catch(ge){await Bi.copyImage(ce,re.id).catch(()=>{throw ge})}k(re.id),setTimeout(()=>{k(ge=>ge===re.id?null:ge)},1e3)}catch(be){e.error("Failed to copy image: "+be.message)}else navigator.clipboard.writeText(re.text||re.preview),Bi.copied(ce,re.id).catch(()=>{}),k(re.id),setTimeout(()=>{k(be=>be===re.id?null:be)},1e3)},ae=i.useMemo(()=>[...new Set([Uu(),...o,s])],[o,s]);i.useEffect(()=>{if(!t)return;const re=ce=>{const ve=document.activeElement;if(ve&&(ve.tagName==="INPUT"||ve.tagName==="TEXTAREA"||ve.isContentEditable||ve.closest(".clipboard-tabs")))return;const be=[...ae].sort(),Ce=be.indexOf(s);ce.key==="ArrowLeft"?Ce>0&&d(be[Ce-1]):ce.key==="ArrowRight"&&Ce<be.length-1&&Ce!==-1&&d(be[Ce+1])};return window.addEventListener("keydown",re),()=>window.removeEventListener("keydown",re)},[ae,s,t]),i.useEffect(()=>{if(!t)return;const re=async ce=>{var Ce;const ve=document.activeElement;if(ve&&(ve.tagName==="INPUT"||ve.tagName==="TEXTAREA"||ve.isContentEditable))return;const be=(Ce=ce.clipboardData)==null?void 0:Ce.items;if(be){for(const ge of be)if(ge.type.startsWith("image/")){const Oe=ge.getAsFile();if(Oe){try{e.loading({content:"Compressing and saving image from paste…",key:"paste-upload",duration:0});const Ee=await bge(Oe);await Bi.uploadImage(Ee);const De=Uu();d(De),await oe(De),e.success({content:"Image pasted and saved to history!",key:"paste-upload"})}catch(Ee){e.error({content:"Failed to save pasted image: "+Ee.message,key:"paste-upload"})}break}}}};return window.addEventListener("paste",re),()=>window.removeEventListener("paste",re)},[s,t]);const fe=ae.reduce((re,ce)=>{var ge;const[ve,be,Ce]=ce.split("-");return re[ve]||(re[ve]={}),(ge=re[ve])[be]||(ge[be]=[]),re[ve][be].includes(Ce)||re[ve][be].push(Ce),re},{}),J=Object.entries(fe).sort(([re],[ce])=>ce.localeCompare(re)).map(([re,ce])=>({value:re,label:re,children:Object.entries(ce).sort(([ve],[be])=>be.localeCompare(ve)).map(([ve,be])=>({value:ve,label:ve,children:be.sort().reverse().map(Ce=>({value:Ce,label:Ce}))}))})),Z=I.trim(),he=i.useMemo(()=>S==="tagged"?p:S==="all"?f:S==="image"?f.filter(re=>!!re.imageFile):f.filter(re=>!re.imageFile&&qu(dO(re),S,F)),[S,f,p,F]),$e=i.useMemo(()=>{const re={all:f.length,tagged:p.length,jira:0,account:0,id:0,url:0,json:0,image:0};for(const ve of f)if(ve.imageFile)re.image++;else{const be=dO(ve);qu(be,"jira",F)&&re.jira++,qu(be,"account")&&re.account++,qu(be,"id")&&re.id++,qu(be,"url")&&re.url++,qu(be,"json")&&re.json++}const ce=[{key:"all",label:`All (${re.all})`},{key:"tagged",label:`Tagged (${re.tagged})`},{key:"jira",label:`Jira (${re.jira})`},{key:"account",label:`Account (${re.account})`},{key:"id",label:`ID (${re.id})`},{key:"url",label:`Url (${re.url})`},{key:"json",label:`JSON (${re.json})`}];return U&&ce.push({key:"image",label:`Img (${re.image})`}),ce},[f,p,F,U]);i.useEffect(()=>{!U&&S==="image"&&$("all")},[U,S]);const Ie=(re,ce=!1)=>{const ve=re.date||s,be=`/api/clipboard/${encodeURIComponent(ve)}/${encodeURIComponent(re.id)}`,Ce=new Date(re.createdAt).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1});return c.jsxs(Pt,{size:"small",className:"clipboard-item",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"clipboard-item-meta",children:[c.jsx(lc,{type:"secondary",children:Ce}),(ce||re.date&&re.date!==s)&&c.jsx(wt,{style:{margin:0},children:ve}),(re.tags||[]).map(ge=>c.jsx(wt,{color:"purple",closable:!0,onClose:Oe=>{Oe.preventDefault(),ne(re,ge)},style:{margin:0},children:ge},ge)),c.jsx(Ow,{content:c.jsxs(it.Compact,{style:{width:200},children:[c.jsx($t,{size:"small",placeholder:"Tag name",value:C,onChange:ge=>x(ge.target.value),onPressEnter:()=>ue(re,C)}),c.jsx(Re,{size:"small",type:"primary",onClick:()=>ue(re,C),children:"Add"})]}),title:"Add Tag",trigger:"click",open:v===re.id,onOpenChange:ge=>{y(ge?re.id:null),x("")},children:c.jsxs(wt,{style:{cursor:"pointer",borderStyle:"dashed",margin:0},children:[c.jsx(nr,{})," Tag"]})})]}),re.imageFile?c.jsx("div",{className:"clipboard-image-wrap",children:c.jsx(c2,{src:fO(re.imageFile),alt:"Clipboard entry",className:"clipboard-image",preview:!0,onError:()=>e.error("Unable to load clipboard image.")})}):c.jsxs(c.Fragment,{children:[c.jsx(Nge,{children:c.jsx(Ege,{value:re.preview||re.text,domain:L,jiraIssuePrefix:F})}),re.contentFile&&c.jsxs("span",{className:"clipboard-original",children:[c.jsx("a",{href:be,target:"_blank",rel:"noreferrer",children:"View original content"}),c.jsxs("a",{href:re.editorUrl,children:["Open in ",re.editorName||"editor"]})]})]})]}),c.jsxs("span",{className:"clipboard-actions",children:[c.jsx(vn,{title:E===re.id?"Copied!":"Copy",children:c.jsx(Re,{type:"text",icon:E===re.id?c.jsx(jl,{style:{color:"#52c41a"}}):c.jsx(vo,{}),onClick:()=>Q(re)})}),c.jsx(vn,{title:"Delete",children:c.jsx(Re,{type:"text",danger:!0,icon:c.jsx(Yn,{}),onClick:()=>ee(re)})})]})]},`${ve}-${re.id}`)};return c.jsxs("div",{className:"clipboard-page",children:[c.jsx(Xr,{titleSuffix:c.jsx(Re,{"aria-label":"Search clipboard history",disabled:!t||r,icon:c.jsx(yo,{}),onClick:()=>N(!0),type:"text"}),titleRowClassName:"clipboard-title-row",actions:c.jsxs("div",{className:"clipboard-controls",children:[c.jsxs(it,{size:16,align:"center",children:[c.jsx(ki,{loading:r,checked:t,onChange:X,checkedChildren:"On",unCheckedChildren:"Off"}),c.jsx(Rl,{className:"clipboard-picker",disabled:!t||r,options:J,value:s.split("-"),onChange:re=>(re==null?void 0:re.length)===3&&d(re.join("-")),placeholder:"Select date"})]}),c.jsxs("div",{className:"clipboard-settings",children:[c.jsxs("div",{className:"clipboard-setting-row",children:[c.jsx(lc,{type:"secondary",className:"clipboard-setting-label",children:"Deduplicate filter:"}),c.jsx(In,{size:"small",disabled:!t||r,value:q,onChange:le,className:"clipboard-deduplicate-select",options:$ge})]}),U&&c.jsxs("div",{className:"clipboard-setting-row",children:[c.jsx(lc,{type:"secondary",className:"clipboard-setting-label",children:"Monitor image clipboard:"}),c.jsx(ki,{size:"small",disabled:!t||r,checked:_,onChange:Y,checkedChildren:"On",unCheckedChildren:"Off"})]})]})]}),description:"Saved locally and archived by date.",title:"Clipboard History"}),t?c.jsxs(c.Fragment,{children:[c.jsx(Ka,{className:"clipboard-tabs",activeKey:S,onChange:re=>{$(re),requestAnimationFrame(()=>{var ce;return(ce=document.activeElement)==null?void 0:ce.blur()})},onKeyDown:re=>{var ce;["ArrowLeft","ArrowRight"].includes(re.key)&&(re.preventDefault(),(ce=document.activeElement)==null||ce.blur())},items:$e}),he.length?c.jsx("div",{className:"clipboard-list",children:he.map(re=>Ie(re))}):c.jsx(qt,{description:`No ${S==="all"?"clipboard entries":`${S==="id"?"ID":S} entries`}${S==="tagged"?".":` for ${s}.`}`})]}):c.jsx(Pt,{className:"clipboard-disabled-card",children:c.jsx(qt,{image:c.jsx($v,{style:{fontSize:48,color:"#9ca3af"}}),description:c.jsxs("div",{className:"clipboard-disabled-copy",children:[c.jsx(lc,{strong:!0,className:"clipboard-disabled-title",children:"Clipboard history is disabled"}),c.jsx(lc,{type:"secondary",children:"Turn on the switch in the top-right corner to start capturing and viewing history."})]})})}),c.jsxs(bn,{open:O,title:"Search Clipboard History",footer:null,width:760,onCancel:()=>N(!1),children:[c.jsxs("div",{className:"clipboard-search-control",children:[c.jsx($t,{allowClear:!0,autoFocus:!0,className:"clipboard-search-field",placeholder:"Search all clipboard history",value:R,onChange:re=>{const ce=re.target.value;j(ce),ce||(M(""),A([]))},onPressEnter:()=>{const re=R.trim();re!==Z&&A([]),M(re)}}),c.jsx(Re,{className:"clipboard-search-button",loading:H,onClick:()=>{const re=R.trim();re!==Z&&A([]),M(re)},type:"primary",children:"Search"})]}),Z&&!H&&c.jsxs(lc,{type:"secondary",className:"clipboard-search-summary",children:[P.length," result",P.length===1?"":"s"," for “",Z,"”"]}),Z?H?c.jsx(za,{active:!0,className:"clipboard-search-loading",paragraph:{rows:4}}):P.length?c.jsx("div",{className:"clipboard-search-results clipboard-list",children:P.map(re=>Ie(re,!0))}):c.jsx(qt,{className:"clipboard-search-empty",description:`No results for “${Z}”.`}):c.jsx(lc,{type:"secondary",className:"clipboard-search-hint",children:"Search across all clipboard history."})]}),c.jsx(Ls.BackTop,{visibilityHeight:240})]})}const zP=[{value:"vscode",label:"VS Code"},{value:"devin",label:"Devin"},{value:"idea",label:"IntelliJ IDEA"}];function AP(e="vscode"){const t=zP.find(n=>n.value===e);return t?t.label:"VS Code"}function LP(e="vscode",t="",n="",r={}){if(!t)return"";const a=typeof r=="boolean"?r:!!(r!=null&&r.newWindow);let o="",l="";if(n){const s=n.split(":").filter(Boolean);s[0]&&(o=s[0]),s[1]&&(l=s[1])}if(e==="idea"){let s=`idea://open?file=${encodeURIComponent(t)}`;return o&&(s+=`&line=${o}`),l&&(s+=`&column=${l}`),s}return e==="devin"?`devin://file${encodeURI(t)}${n}`:a?`vscode://vscode.open-folder${encodeURI(t)}?forceNewWindow=true`:`vscode://file${encodeURI(t)}${n}`}const{Text:px}=wn;function kge({tasks:e,running:t,onCreate:n,onEdit:r,onStart:a,onStop:o,onRemove:l}){const s=[{title:"Name",dataIndex:"name",render:d=>c.jsx(px,{strong:!0,children:d})},{title:"Scripts",dataIndex:"items",width:110,render:d=>c.jsxs(px,{type:"secondary",children:[d.length," scripts"]})},{title:"Actions",width:236,render:(d,f)=>{const h=f.items.every(p=>t.has(`${p.launcherId}:${p.scriptId}`));return c.jsxs(it,{children:[c.jsx(Re,{size:"small",danger:h,icon:h?c.jsx($v,{}):c.jsx(Fc,{}),onClick:()=>h?o(f):a(f),children:h?"Stop":"Start"}),c.jsx(Re,{size:"small",onClick:()=>r(f),children:"Edit"}),c.jsx(Re,{size:"small",danger:!0,icon:c.jsx(Yn,{}),onClick:()=>l(f),children:"Delete"})]})}}];return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"group-task-header",children:[c.jsx(px,{type:"secondary",children:"Start selected scripts across multiple services."}),c.jsx(Re,{type:"primary",icon:c.jsx(nr,{}),onClick:n,children:"Add quick launch"})]}),e.length?c.jsx(rr,{className:"group-task-table",rowKey:"id",dataSource:e,columns:s,pagination:!1,size:"small"}):c.jsx(qt,{description:"No quick launches yet.",className:"group-task-empty"})]})}function jd({open:e,initialPath:t="~",onCancel:n,onSelect:r,title:a="Browse Directory",selectionType:o="directory"}){const{message:l}=Br.useApp(),[s,d]=i.useState(t),[f,h]=i.useState(null),[p,g]=i.useState(!1),v=async y=>{g(!0);try{const C=await fm.browse(y||"~");h(C),d(C.currentPath)}catch(C){l.error(C.message||"Failed to read directory")}finally{g(!1)}};return i.useEffect(()=>{e&&v(t||"~")},[e,t]),c.jsx(bn,{title:a,open:e,onCancel:n,footer:null,width:640,destroyOnClose:!0,children:c.jsxs(lr,{spinning:p,children:[c.jsx("div",{className:"file-browser-path-row",children:c.jsx($t,{value:s,onChange:y=>d(y.target.value),onPressEnter:()=>v(s),addonAfter:c.jsx(Re,{size:"small",type:"text",onClick:()=>v(s),children:"Go"})})}),f&&c.jsxs("div",{children:[c.jsx("div",{className:"file-browser-parent-row",children:c.jsxs(Re,{size:"small",onClick:()=>v(f.parentPath),disabled:f.currentPath===f.parentPath,children:[c.jsx(Is,{}),"Parent Directory"]})}),c.jsx("div",{className:"file-browser-list",children:f.subdirectories.length===0&&(o!=="file"||(f.files||[]).length===0)?c.jsx("div",{className:"file-browser-empty",children:"No items found"}):c.jsxs(c.Fragment,{children:[f.subdirectories.map(y=>c.jsxs("div",{className:"file-browser-item",onClick:()=>v(y.fullPath),children:[c.jsxs("span",{children:[c.jsx(Lr,{className:"file-browser-icon"}),y.name]}),o==="directory"&&c.jsx(Re,{size:"small",type:"link",onClick:C=>{C.stopPropagation(),r(y.fullPath)},children:"Select Folder"})]},y.fullPath)),o==="file"&&(f.files||[]).map(y=>c.jsxs("div",{className:"file-browser-item",onClick:()=>r(y.fullPath),children:[c.jsxs("span",{children:[c.jsx(Rs,{className:"file-browser-icon"}),y.name]}),c.jsx(Re,{size:"small",type:"link",onClick:C=>{C.stopPropagation(),r(y.fullPath)},children:"Select File"})]},y.fullPath))]})}),o==="directory"&&c.jsx("div",{className:"file-browser-confirm-row",children:c.jsxs(Re,{type:"primary",onClick:()=>r(f.currentPath),children:["Confirm Path: ",f.currentPath]})})]})]})})}const{Text:sc}=wn,Gf=(e,t)=>`${e}:${t}`,Rge=()=>c.jsx("div",{style:{width:"0.8em",height:"0.8em",backgroundColor:"rgba(0,0,0,0.88)"}});function Ige({form:e,editing:t,executor:n,running:r,errorCounts:a={},packageScripts:o,onRun:l,onRunInstall:s,onRunPackage:d,onStop:f,onLogs:h,onPackageLogs:p}){const g=!!(t&&[...r].some(C=>C.startsWith(`${t.id}:`))),[v,y]=i.useState(()=>g);return i.useEffect(()=>{g&&y(!0)},[t==null?void 0:t.id]),i.useEffect(()=>{g||y(!1)},[g]),c.jsx(yt.List,{name:"scripts",children:(C,{add:x,remove:S})=>{const $=["npm","pnpm","yarn"].includes(n)?{id:"install",name:"Install",command:`${n} install${n==="npm"?" --legacy-peer-deps":""}`}:null,E=[...C.map(N=>({...N,key:`custom-${N.key}`,kind:"custom"})),...$?[{key:"install",kind:"install",script:$}]:[],...(o||[]).map(N=>({key:`package-${N.id}`,kind:"package",script:N}))],k=v?E.filter(N=>{const R=N.kind==="custom"?e.getFieldValue(["scripts",N.name]):N.script;return t&&(R==null?void 0:R.id)&&r.has(Gf(t.id,R.id))}):E,O=[{title:"Source",width:100,render:(N,R)=>c.jsx(wt,{color:R.kind==="package"?"purple":R.kind==="install"?"green":"default",children:R.kind==="package"?"Package":R.kind==="install"?"Executor":"Custom"})},{title:"Script name",width:200,render:(N,R)=>{var P;const j=R.kind==="custom"?e.getFieldValue(["scripts",R.name]):R.script,I=(j==null?void 0:j.name)===e.getFieldValue("startCommand"),M=t&&(j==null?void 0:j.id)&&r.has(Gf(t.id,j.id));return c.jsxs(it,{direction:"vertical",size:1,style:{width:"100%"},children:[R.kind!=="custom"||M?c.jsxs(it,{size:4,children:[c.jsx(sc,{strong:!0,children:(j==null?void 0:j.name)||((P=R.script)==null?void 0:P.name)}),I&&c.jsx(Lo,{className:"start-script-icon"})]}):c.jsx(yt.Item,{noStyle:!0,name:[R.name,"name"],rules:[{required:!0,message:"Required"}],children:c.jsx($t,{placeholder:"serve",allowClear:!0,suffix:I?c.jsx(Lo,{className:"start-script-icon"}):null})}),M&&c.jsx(ia,{status:"success",text:c.jsx(sc,{type:"secondary",style:{fontSize:11},children:"running"})})]})}},{title:"Command",render:(N,R)=>{const j=R.kind==="custom"?e.getFieldValue(["scripts",R.name]):R.script,I=t&&(j==null?void 0:j.id)&&r.has(Gf(t.id,j.id));return R.kind==="package"?c.jsxs(it,{direction:"vertical",size:0,children:[c.jsxs(sc,{code:!0,children:[n," run ",R.script.name]}),c.jsx(sc,{type:"secondary",style:{fontSize:12},children:R.script.command})]}):R.kind==="install"?c.jsx(sc,{code:!0,children:R.script.command}):I?c.jsx(sc,{code:!0,children:j==null?void 0:j.command}):c.jsx(yt.Item,{noStyle:!0,name:[R.name,"command"],rules:[{required:!0,message:"Required"}],children:c.jsx($t,{placeholder:"npm run dev",allowClear:!0})})}},{title:"Actions",width:132,render:(N,R)=>{const j=R.kind==="custom"?e.getFieldValue(["scripts",R.name]):R.script,I=t&&(j==null?void 0:j.id)&&r.has(Gf(t.id,j.id)),M=t&&(j!=null&&j.id)&&a[Gf(t.id,j.id)]||0;return c.jsxs(it,{size:2,children:[t&&c.jsx(vn,{title:I?"Stop":"Start",children:c.jsx(Re,{type:"text",danger:I,icon:I?c.jsx(Rge,{}):c.jsx(Epe,{}),onClick:()=>I?f(j):R.kind==="package"?d(j):R.kind==="install"?s(j):l(j),disabled:!(j!=null&&j.id)})}),c.jsx(vn,{title:"Logs",children:c.jsx(ia,{count:M,size:"small",offset:[-2,2],children:c.jsx(Re,{type:"text",icon:c.jsx(Pi,{}),onClick:()=>R.kind==="package"?p(j):h(j),disabled:!t||!(j!=null&&j.id)})})}),R.kind==="custom"&&!I&&c.jsx(vn,{title:"Remove",children:c.jsx(Re,{type:"text",danger:!0,icon:c.jsx(Yn,{}),onClick:()=>S(R.name)})})]})}}];return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"script-header",children:[c.jsx(wh,{orientation:"left",children:"Scripts"}),c.jsxs(it,{size:"middle",align:"center",children:[c.jsxs("label",{className:"script-running-filter",children:[c.jsx(ki,{size:"small",checked:v,onChange:y,disabled:!t}),c.jsx(sc,{type:"secondary",className:"script-running-filter-label",children:"Show running only"})]}),c.jsx(Re,{icon:c.jsx(nr,{}),onClick:()=>{y(!1),x({name:"",command:""})},children:"Add script"})]})]}),c.jsx(rr,{size:"small",rowKey:"key",pagination:!1,loading:o===null,dataSource:k,columns:O})]})}})}const Mge=e=>c.jsx("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"currentColor",style:{verticalAlign:"-0.125em",...e.style},...e,children:c.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M.75 2.5a.75.75 0 01.742-.647h21.016a.75.75 0 01.742.853l-2.622 17.5a.75.75 0 01-.742.644H4.114a.75.75 0 01-.742-.644L.75 2.5zm13.1 11.2h-3.7l-.76-3.8h5.22l-.76 3.8z"})});function Tge(e){if(!e)return null;const t=e.toLowerCase();return t.includes("bitbucket")?c.jsx(Mge,{style:{color:"#2584FF"}}):t.includes("github")?c.jsx(The,{style:{color:"#24292e"}}):t.includes("gitlab")?c.jsx(wv,{style:{color:"#fc6d26"}}):c.jsx(Kd,{className:"repo-generic-icon"})}function _P({repoUrl:e,style:t}){if(!e)return null;const n=Tge(e);return n?c.jsx(vn,{title:"Open repository in browser",children:c.jsx(Re,{className:"repo-icon-button",type:"text",size:"small",icon:n,onClick:r=>{r.preventDefault(),r.stopPropagation(),hr(e)},style:t})}):null}const Pge=()=>({alias:"",folder:"",groupName:"",executor:"npm",startCommand:void 0,scripts:[]});function Dge({open:e,editing:t,groups:n,running:r,errorCounts:a={},onCancel:o,onSave:l,onRun:s,onRunInstall:d,onRunPackage:f,onStop:h,onLogs:p,onDelete:g}){const{message:v,modal:y}=Br.useApp(),[C]=yt.useForm(),[x,S]=i.useState(null),[$,E]=i.useState(!1),k=j=>{if(j&&(C.setFieldValue("folder",j),!C.getFieldValue("alias"))){const M=j.split(/[/\\]/).filter(Boolean);M.length>0&&C.setFieldValue("alias",M[M.length-1])}E(!1)},O=async()=>{const j=String(C.getFieldValue("folder")||"").trim();if(!j){v.warning("Set a project folder first.");return}try{await Xn.openFolder(j)}catch(I){v.error(I.message)}},N=()=>{y.confirm({title:"Delete Service",content:`Are you sure you want to delete service "${t==null?void 0:t.alias}"?`,okText:"Delete",okButtonProps:{type:"primary",danger:!0},cancelText:"Cancel",onOk:async()=>{try{await g(t)}catch(j){v.error(j.message)}}})};i.useEffect(()=>{e&&(C.resetFields(),C.setFieldsValue(t?{...t,startCommand:t.startCommand||void 0,scripts:t.scripts}:Pge()),S(t?null:[]),t&&Pr.packageScripts(t.id).then(j=>S(j.scripts)).catch(()=>S([])))},[e,t,C]);const R=async()=>{try{const j=(C.getFieldValue("scripts")||[]).filter(P=>{var A,H;return((A=P==null?void 0:P.name)==null?void 0:A.trim())||((H=P==null?void 0:P.command)==null?void 0:H.trim())});C.setFieldValue("scripts",j);const I=await C.validateFields(["alias","folder","groupName","startCommand"]),M={...C.getFieldsValue(!0),...I,scripts:j};await l(M)}catch(j){if(j!=null&&j.errorFields)return;v.error(j.message)}};return c.jsxs(bn,{title:t?c.jsxs(it,{align:"center",size:6,children:[c.jsxs("span",{children:["Service details · ",t.alias]}),c.jsx(_P,{repoUrl:t.repoUrl})]}):"Add service",open:e,onCancel:o,onOk:R,okText:t?"Save":"Save service",width:860,destroyOnClose:!0,footer:c.jsxs("div",{className:"service-modal-footer",children:[t?c.jsx(Re,{type:"primary",danger:!0,onClick:N,children:"Delete service"}):c.jsx("div",{}),c.jsxs(it,{children:[c.jsx(Re,{onClick:o,children:"Cancel"}),c.jsx(Re,{type:"primary",onClick:R,children:t?"Save":"Save service"})]})]}),children:[c.jsxs(yt,{form:C,layout:"vertical",children:[c.jsx(Qv,{className:"service-config",defaultActiveKey:t?[]:["configuration"],items:[{key:"configuration",label:"Service configuration",children:c.jsxs(Ao,{gutter:[16,0],children:[c.jsx(Bn,{xs:24,sm:12,children:c.jsx(yt.Item,{label:"Name",name:"alias",rules:[{required:!0}],children:c.jsx($t,{placeholder:"Service name",allowClear:!0})})}),c.jsx(Bn,{xs:24,sm:12,children:c.jsx(yt.Item,{label:"Project folder",name:"folder",rules:[{required:!0}],children:c.jsx($t,{prefix:c.jsx(Re,{type:"text",htmlType:"button",icon:c.jsx(Lr,{}),onClick:O,"aria-label":"Open project folder",title:"Open project folder",style:{color:"#8c8c8c",padding:"0 4px"}}),suffix:c.jsx(Re,{type:"text",size:"small",icon:c.jsx(Lr,{}),onClick:()=>E(!0),style:{fontSize:12,padding:"0 4px"},children:"Browse"}),placeholder:"Project folder path",allowClear:!0})})}),c.jsx(Bn,{xs:24,sm:8,children:c.jsx(yt.Item,{label:"Group",name:"groupName",children:c.jsx(xd,{options:n.map(j=>({value:j})),placeholder:"Group name",allowClear:!0})})}),c.jsx(Bn,{xs:24,sm:8,children:c.jsx(yt.Item,{label:"Executor",name:"executor",rules:[{required:!0}],children:c.jsx(xd,{options:["npm","pnpm","yarn"].map(j=>({value:j})),placeholder:"npm",allowClear:!0})})}),c.jsx(Bn,{xs:24,sm:8,children:c.jsx(yt.Item,{noStyle:!0,shouldUpdate:(j,I)=>j.scripts!==I.scripts,children:()=>{const j=(C.getFieldValue("scripts")||[]).map(P=>P==null?void 0:P.name).filter(Boolean),I=(x||[]).map(P=>P.name),M=[...new Set([...j,...I])].map(P=>({label:P,value:P}));return c.jsx(yt.Item,{label:"Start script name",name:"startCommand",children:c.jsx(In,{placeholder:"Select start script",allowClear:!0,options:M})})}})})]})}]}),c.jsx(yt.Item,{noStyle:!0,shouldUpdate:(j,I)=>j.executor!==I.executor||j.startCommand!==I.startCommand||j.scripts!==I.scripts,children:()=>c.jsx(Ige,{form:C,editing:t,executor:C.getFieldValue("executor")||"npm",running:r,errorCounts:a,packageScripts:x,onRun:j=>s(t,j),onRunInstall:()=>d(t),onRunPackage:j=>f(t,j),onStop:j=>h(t,j.id),onLogs:j=>p(t,j),onPackageLogs:j=>p(t,j,!0)})})]}),c.jsx(jd,{open:$,initialPath:C.getFieldValue("folder")||"~",onCancel:()=>E(!1),onSelect:k,title:"Select Project Directory"})]})}const{Text:zge}=wn;function Age({open:e,editingGroupTask:t,groupCatalog:n,onCancel:r,onSave:a}){const{message:o}=Br.useApp(),[l]=yt.useForm();i.useEffect(()=>{e&&(l.resetFields(),l.setFieldsValue({name:(t==null?void 0:t.name)||"",items:(t==null?void 0:t.items.map(f=>`${f.launcherId}|${f.scriptId}`))||[]}))},[e,t,l]);const s=i.useMemo(()=>Object.entries(n.reduce((f,h)=>{const p=h.groupName||"Ungrouped";return(f[p]||(f[p]=[])).push(h),f},{})).sort(([f],[h])=>f.localeCompare(h)).map(([f,h])=>({key:f,label:f,children:c.jsx("div",{className:"group-task-projects",children:h.map(p=>c.jsx(Pt,{size:"small",title:p.alias,children:c.jsx(it,{direction:"vertical",children:p.scripts.map(g=>c.jsxs(sr,{value:`${p.id}|${g.id}`,children:[g.name," ",c.jsxs(zge,{type:"secondary",children:["(",g.source,")"]})]},g.id))})},p.id))})})),[n]),d=async()=>{try{const f=await l.validateFields(),h={name:f.name,items:f.items.map(p=>{const[g,v]=p.split("|");return{launcherId:g,scriptId:v}})};await a(h)}catch(f){f!=null&&f.errorFields||o.error(f.message)}};return c.jsx(bn,{title:t?`Edit quick launch · ${t.name}`:"Add quick launch",open:e,onCancel:r,onOk:d,okText:t?"Save changes":"Save quick launch",width:760,destroyOnClose:!0,children:c.jsxs(yt,{form:l,layout:"vertical",children:[c.jsx(yt.Item,{label:"Name",name:"name",rules:[{required:!0}],children:c.jsx($t,{placeholder:"Start local stack",allowClear:!0})}),c.jsx(yt.Item,{label:"Scripts",name:"items",rules:[{required:!0,message:"Select at least one script."}],children:c.jsx(sr.Group,{className:"group-task-selector",children:c.jsx(Ka,{items:s})})})]})})}const mO={30:"ansi-black",31:"ansi-red",32:"ansi-green",33:"ansi-yellow",34:"ansi-blue",35:"ansi-magenta",36:"ansi-cyan",37:"ansi-white",90:"ansi-gray",91:"ansi-red",92:"ansi-green",93:"ansi-yellow",94:"ansi-blue",95:"ansi-magenta",96:"ansi-cyan",97:"ansi-white"};function NS({value:e,editor:t}){const[n,r]=i.useState(t||"vscode"),[a,o]=i.useState(""),[l,s]=i.useState("");i.useEffect(()=>{t&&r(t),Xn.status().then(p=>{p!=null&&p.defaultEditor&&!t&&r(p.defaultEditor),p!=null&&p.domain&&o(p.domain),p!=null&&p.jiraIssuePrefix&&s(p.jiraIssuePrefix)}).catch(()=>{})},[t]);const d=(l||"").split(/[\s,]+/).filter(Boolean).map(p=>p.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),f=d.length>0&&a?new RegExp(`\\b(?:${d.join("|")})-[a-zA-Z0-9]{1,10}\\b`,"gi"):null,h=(p,g)=>{let v="";const y=($,E)=>$.split(/(\u001b\[[0-9;]*m)/g).map((O,N)=>{const R=O.match(/^\u001b\[([0-9;]*)m$/);if(R){const I=R[1].split(";").map(Number);return v=I.includes(0)?"":mO[I.find(M=>mO[M])]||v,null}if(!O)return null;const j=v||(/\b(error|failed|fatal|exception|TS\d{4,5})\b/i.test(O)?"log-error":/\b(warn|warning)\b/i.test(O)?"log-warning":/\b(success|ready|started|listening)\b/i.test(O)?"log-success":"");return c.jsx("span",{className:j,children:O},`${E}-${N}`)}),C=/(https?:\/\/(?:[^\s<>'"`]|\u001b\[[0-9;]*m)+|\/(?:(?:[^\s:(),;!?]|\u001b\[[0-9;]*m)+\/)*(?:[^\s:(),;!?]|\u001b\[[0-9;]*m)+(?::(?:\d+|\u001b\[[0-9;]*m)+(?::(?:\d+|\u001b\[[0-9;]*m)+)?)?)/g,x=f&&f.test(p);return!p.includes("http")&&!p.includes("/")&&!x?y(p,`${g}-0`):p.split(C).map(($,E)=>{if(!$)return null;const k=`${g}-${E}`;if(/^https?:\/\//.test($.replace(/\u001b\[[0-9;]*m/g,""))){const N=$.replace(/\u001b\[[0-9;]*m/g,""),R=N.replace(/[),.;:!?]+$/,""),j=N.slice(R.length);return c.jsxs("span",{children:[c.jsx("a",{className:"log-link",href:R,target:"_blank",rel:"noreferrer",onClick:I=>{I.preventDefault(),hr(R)},children:y($.slice(0,$.length-j.length),`${k}-url`)}),j&&y(j,`${k}-suf`)]},k)}const O=$.replace(/\u001b\[[0-9;]*m/g,"");if(O.startsWith("/")){const[,N,R=""]=O.match(/^(.*?)(:\d+(?::\d+)?)?$/)||[];if(N){const j=LP(n,N,R);return c.jsx("a",{className:"log-link",href:j,target:"_blank",rel:"noreferrer",title:`Open in ${AP(n)}`,children:y($,k)},k)}}if(f&&a&&(f.lastIndex=0,f.test(O))){const N=[];let R=0;f.lastIndex=0;for(const j of O.matchAll(f)){j.index>R&&N.push(y(O.slice(R,j.index),`${k}-sub-${j.index}`));const I=j[0],M=_0(a,I);N.push(c.jsx("a",{className:"log-link",href:M,target:"_blank",rel:"noreferrer",onClick:P=>{P.preventDefault(),hr(M)},children:I},`${k}-jira-${j.index}`)),R=j.index+I.length}return R<O.length&&N.push(y(O.slice(R),`${k}-sub-end`)),c.jsx("span",{children:N},k)}return y($,k)})};return c.jsx("div",{className:"log-output",role:"log",children:e.split(`
497
497
  `).map((p,g)=>c.jsx("div",{className:"log-line",children:c.jsx("code",{children:h(p,g)})},g))})}function Lge({open:e,logTarget:t,onCancel:n}){var d;const[r,a]=i.useState("output"),[o,l]=i.useState("");i.useEffect(()=>{e&&(a("output"),l("Loading…"))},[e,t]),i.useEffect(()=>{if(!e||!t)return;const f=async()=>{try{const p=t.package?r==="error"?await Pr.packageScriptErrorLogs(t.launcher.id,t.script.name):await Pr.packageScriptLogs(t.launcher.id,t.script.name):r==="error"?await Pr.errorLogs(t.launcher.id,t.script.id):await Pr.logs(t.launcher.id,t.script.id);l(p.log||(r==="error"?"No error logs yet.":"No logs yet."))}catch(p){l(p.message)}};f();const h=setInterval(f,1e3);return()=>clearInterval(h)},[e,t,r]);const s=async()=>{if(t)try{t.package?await Pr.clearPackageScriptLogs(t.launcher.id,t.script.name):await Pr.clearLogs(t.launcher.id,t.script.id),l(r==="error"?"No error logs yet.":"No logs yet.")}catch{}};return c.jsx(bn,{title:t?`${(d=t.launcher)!=null&&d.alias?`${t.launcher.alias} / `:""}${t.script.name} · Logs`:"Logs",open:e,onCancel:n,footer:null,width:1080,zIndex:1200,children:c.jsx(Ka,{activeKey:r,onChange:a,tabBarExtraContent:t&&c.jsxs(it,{children:[c.jsx(Re,{icon:c.jsx(NP,{}),onClick:s,children:"Clear log"}),c.jsx(Re,{icon:c.jsx(Kd,{}),onClick:()=>{const f=t.package?`#/logs/${t.launcher.id}/pkg/${encodeURIComponent(t.script.name)}`:`#/logs/${t.launcher.id}/${encodeURIComponent(t.script.id)}`;window.open(f,"_blank")},children:"Open in new tab"})]}),items:[{key:"output",label:"Logs",children:c.jsx(NS,{value:o})},{key:"error",label:"Error logs",children:c.jsx(NS,{value:o})}]})})}const{Text:_ge}=wn,Bge=(e,t)=>{const n=e.scripts.find(r=>r.id===t);return n?n.name:t==="install"?"Install":t.startsWith("package:")?t.slice(8):t};function Fge({launchers:e,running:t,errorCounts:n={},refresh:r,loading:a}){const{message:o}=Br.useApp(),[l,s]=i.useState("all"),[d,f]=i.useState([]),[h,p]=i.useState([]),[g,v]=i.useState(!1),[y,C]=i.useState(!1),[x,S]=i.useState(null),[$,E]=i.useState(!1),[k,O]=i.useState(null),[N,R]=i.useState(!1),[j,I]=i.useState(null),[M,P]=i.useState("vscode"),A=i.useRef(null);i.useEffect(()=>{gl.list().then(f).catch(ee=>o.error(ee.message)),Xn.status().then(ee=>{ee!=null&&ee.defaultEditor&&P(ee.defaultEditor)}).catch(()=>{})},[]);const H=i.useMemo(()=>[...new Set(e.map(ee=>ee.groupName).filter(Boolean))].sort((ee,Q)=>ee.localeCompare(Q)),[e]),T=l==="all"?e:e.filter(ee=>ee.groupName===l);i.useLayoutEffect(()=>{var Q;[...((Q=A.current)==null?void 0:Q.querySelectorAll("[tabindex]"))||[],...document.querySelectorAll(".launcher-table, .launcher-table [tabindex]")].forEach(ae=>{document.activeElement===ae&&ae.blur(),ae.tabIndex=-1})},[l,H,e.length]);const L=(ee=null)=>{O(ee),E(!0)},D=async ee=>{if(k){const Q=await Pr.update(k.id,ee);O(Q)}else await Pr.create(ee),E(!1);o.success("Saved"),await r()},F=async ee=>{try{const Q=[...t].filter(ae=>ae.startsWith(`${ee.id}:`));if(Q.length>0){const ae=Q.map(fe=>fe.slice(`${ee.id}:`.length));await Promise.all(ae.map(fe=>Pr.stop(ee.id,fe)))}await Pr.remove(ee.id),E(!1),o.success("Deleted"),await r()}catch(Q){o.error(Q.message)}},V=async(ee,Q)=>{try{await Pr.run(ee.id,Q.id),await r()}catch(ae){o.error(ae.message)}},q=async ee=>{try{await Pr.runInstall(ee.id),await r()}catch(Q){o.error(Q.message)}},B=async(ee,Q)=>{try{await Pr.runPackageScript(ee.id,Q.name),await r()}catch(ae){o.error(ae.message)}},U=(ee,Q,ae=!1)=>{I({launcher:ee,script:Q,package:ae}),R(!0)},K=async ee=>{try{await Pr.start(ee.id),await r()}catch(Q){o.warning(Q.message)}},_=async ee=>{try{await Pr.openTerminal(ee.id)}catch(Q){o.error(Q.message)}},G=async(ee,Q)=>{try{await Pr.stop(ee.id,Q),await r()}catch(ae){await r(),o.error(ae.message)}},X=async(ee,Q)=>{try{await Promise.all(Q.map(ae=>Pr.stop(ee.id,ae))),await r()}catch(ae){await r(),o.error(ae.message)}},Y=async(ee=null)=>{if(S(ee),C(!0),!h.length)try{p(await gl.catalog())}catch(Q){o.error(Q.message)}},le=async ee=>{x?await gl.update(x.id,ee):await gl.create(ee),C(!1),f(await gl.list())},oe=async ee=>{const Q=`group-task-${ee.id}`;o.loading({content:`Starting ${ee.name}…`,key:Q,duration:0});try{const ae=await gl.start(ee.id),fe=ae.results.filter(J=>J.error);fe.length?o.warning({content:`${ae.results.length-fe.length} started, ${fe.length} failed.`,key:Q}):o.success({content:`${ae.results.length} scripts started.`,key:Q}),await r()}catch(ae){o.error({content:ae.message,key:Q})}},ue=async ee=>{const Q=`group-task-${ee.id}`;o.loading({content:`Stopping ${ee.name}…`,key:Q,duration:0});try{const fe=(await gl.stop(ee.id)).results.filter(J=>J.ok).length;o.success({content:`${fe} scripts stopped.`,key:Q}),await r()}catch(ae){o.error({content:ae.message,key:Q})}},ne=async ee=>{try{await gl.remove(ee.id),f(await gl.list())}catch(Q){o.error(Q.message)}},te=[{title:"Service",dataIndex:"alias",render:(ee,Q)=>c.jsxs(it,{size:8,align:"center",children:[c.jsx(Re,{type:"text",size:"small",className:"launcher-terminal-button",icon:c.jsx(Oa,{}),"aria-label":`Open terminal in ${Q.folder}`,title:`Open Terminal in ${Q.folder}`,onClick:ae=>{ae.stopPropagation(),_(Q)}}),c.jsx("a",{href:LP(M,Q.folder,"",{newWindow:!0}),title:`Open ${Q.folder} in ${AP(M)}`,onClick:ae=>{ae.preventDefault(),ae.stopPropagation(),PP.openPath(Q.folder)},className:"launcher-service-link",children:ee}),c.jsx(_P,{repoUrl:Q.repoUrl}),Q.branch&&c.jsx(_ge,{code:!0,className:"launcher-branch",children:Q.branch})]})},{title:"Scripts",width:170,align:"center",render:(ee,Q)=>{const ae=[...t].filter($e=>$e.startsWith(`${Q.id}:`)),fe=ae.map($e=>Bge(Q,$e.slice(`${Q.id}:`.length))),J=Q.scripts.length+(Q.packageScriptCount||0),Z=Object.entries(n).filter(([$e])=>$e.startsWith(`${Q.id}:`)).reduce(($e,[,Ie])=>$e+(Ie||0),0),he=c.jsx(ia,{status:ae.length?"success":"default",text:`${ae.length} / ${J} running`});return c.jsxs(it,{size:8,children:[c.jsxs("span",{className:"launcher-running-status",children:[he,fe.length>0&&c.jsx("span",{className:"launcher-running-tooltip",children:fe.map(($e,Ie)=>c.jsxs("span",{children:["• ",$e]},`${$e}-${Ie}`))})]}),Z>0&&c.jsx(ia,{count:Z,overflowCount:999,style:{backgroundColor:"#ff4d4f"}})]})}},{title:"Action",width:108,align:"center",render:(ee,Q)=>{const ae=[...t].filter(J=>J.startsWith(`${Q.id}:`)),fe=ae.length>0;return c.jsx(Re,{size:"small",type:fe?"default":"primary",danger:fe,icon:fe?c.jsx($v,{}):c.jsx(Fc,{}),onClick:J=>{J.stopPropagation(),fe?X(Q,ae.map(Z=>Z.slice(`${Q.id}:`.length))):K(Q)},children:fe?"Stop":"Start"})}}];return c.jsxs(c.Fragment,{children:[c.jsx(Xr,{actions:c.jsxs(it,{children:[c.jsx(Re,{onClick:()=>v(!0),children:"Quick Launch"}),c.jsx(Re,{type:"primary",icon:c.jsx(nr,{}),onClick:()=>L(),children:"Add service"})]}),description:"Manage and run local project scripts.",title:"Launcher"}),a?c.jsx("div",{className:"launcher-loading",children:c.jsx(lr,{size:"large"})}):e.length?c.jsxs(c.Fragment,{children:[d.length>0&&c.jsx("div",{className:"quick-launch-bar",children:c.jsxs(it,{wrap:!0,size:"middle",children:[c.jsx("span",{className:"quick-launch-label",children:"Quick Launch:"}),d.map(ee=>{const Q=ee.items.every(ae=>t.has(`${ae.launcherId}:${ae.scriptId}`));return c.jsxs(Re,{type:Q?"default":"primary",danger:Q,icon:Q?c.jsx($v,{}):c.jsx(Fc,{}),onClick:()=>Q?ue(ee):oe(ee),children:[Q?"Stop":"Start"," ",ee.name]},ee.id)})]})}),c.jsx("div",{ref:A,children:c.jsx(Ka,{activeKey:l,onChange:s,className:"group-tabs",items:[{key:"all",label:`All (${e.length})`},...H.map(ee=>({key:ee,label:`${ee} (${e.filter(Q=>Q.groupName===ee).length})`}))]})}),T.length?c.jsx(rr,{className:"launcher-table",rowKey:"id",dataSource:T,columns:te,pagination:!1,onRow:ee=>({onClick:()=>L(ee)})}):c.jsx(qt,{description:"No services in this group."})]}):c.jsx(qt,{description:"No services yet"}),c.jsx(Dge,{open:$,editing:k,groups:H,running:t,errorCounts:n,onCancel:()=>E(!1),onSave:D,onRun:V,onRunInstall:q,onRunPackage:B,onStop:G,onLogs:U,onDelete:F}),c.jsx(bn,{title:"Quick Launch",open:g,onCancel:()=>v(!1),footer:null,width:760,destroyOnClose:!0,children:c.jsx(kge,{tasks:d,running:t,onCreate:()=>Y(),onEdit:Y,onStart:oe,onStop:ue,onRemove:ne})}),c.jsx(Age,{open:y,editingGroupTask:x,groupCatalog:h,onCancel:()=>C(!1),onSave:le}),c.jsx(Lge,{open:N,logTarget:j,onCancel:()=>R(!1)})]})}const{Text:bl}=wn;function Hge({refreshLaunchers:e}){const[t,n]=i.useState([]),[r,a]=i.useState(!1),[o,l]=i.useState(null),[s,d]=i.useState(!1),[f,h]=i.useState(!1),[p,g]=i.useState(null),v=async()=>{a(!0);try{n((await fx.list()).ports)}catch(S){Jt.error(S.message)}finally{a(!1)}};i.useEffect(()=>{v()},[]);const y=async()=>{if(o){d(!0);try{const S=(await fx.get(o)).process;g(S),h(!0)}catch(S){Jt.error(S.message)}finally{d(!1)}}},C=async({port:S,pid:$})=>{try{await fx.kill(S,$),Jt.success(`Process on port ${S} was killed.`),await v(),e&&await e()}catch(E){Jt.error(E.message)}},x=[{title:"Port",dataIndex:"port",width:100,align:"center",onHeaderCell:()=>({className:"port-diagnostic-header-center"}),render:S=>c.jsx(bl,{code:!0,children:S})},{title:"Last used",dataIndex:"launcher",render:(S,$)=>c.jsxs(it,{direction:"vertical",size:0,children:[c.jsx(bl,{strong:!0,children:S}),c.jsx(bl,{type:"secondary",children:$.script})]})},{title:"Process",dataIndex:"command",render:(S,$)=>c.jsxs(it,{direction:"vertical",size:0,children:[c.jsx(bl,{code:!0,children:$.currentCommand||S}),c.jsxs(bl,{type:"secondary",children:["PID ",$.currentPid||$.pid]})]})},{title:"Status",width:170,align:"center",onHeaderCell:()=>({className:"port-diagnostic-header-center"}),render:(S,$)=>$.ghost?c.jsx(wt,{color:"error",children:"Ghost process"}):$.listening?c.jsx(wt,{color:"success",children:"Script running"}):$.reused?c.jsx(wt,{color:"warning",children:"Port reused"}):c.jsx(wt,{children:"Port released"})},{title:"Action",width:100,align:"center",onHeaderCell:()=>({className:"port-diagnostic-header-center"}),render:(S,$)=>$.listening||$.reused?c.jsx(la,{title:`Kill process on port ${$.port}?`,description:"The process currently listening on this port will be stopped.",okText:"Kill",okButtonProps:{danger:!0},onConfirm:()=>C({port:$.port,pid:$.currentPid}),children:c.jsx(Re,{type:"primary",danger:!0,icon:c.jsx(Yn,{}),children:"Kill"})}):c.jsx(Re,{type:"primary",danger:!0,disabled:!0,icon:c.jsx(Yn,{}),children:"Kill"})}];return c.jsxs("div",{className:"port-diagnostic-page",children:[c.jsx(Xr,{actions:c.jsx(Re,{icon:c.jsx(go,{}),onClick:v,loading:r,children:"Refresh"}),description:"Every port observed while a recent Launcher script was running. Ghost processes still listen after their script has stopped.",title:"Port Diagnostic"}),c.jsxs(Pt,{className:"port-manual-query",size:"small",children:[c.jsxs(it,{wrap:!0,children:[c.jsx(bl,{strong:!0,children:"Query port"}),c.jsx(Wm,{min:1,max:65535,controls:!1,value:o,onChange:l,onPressEnter:y,placeholder:"e.g. 3000"}),c.jsx(Re,{type:"primary",onClick:y,loading:s,disabled:!o,children:"Query"})]}),f&&c.jsx("div",{className:"port-query-result",children:p?c.jsxs(it,{wrap:!0,children:[c.jsx(wt,{color:"success",children:"Listening"}),c.jsxs(bl,{code:!0,children:["PID ",p.pid]}),c.jsx(bl,{code:!0,children:p.command}),c.jsx(la,{title:`Kill process on port ${p.port}?`,description:"The process currently listening on this port will be stopped.",okText:"Kill",okButtonProps:{danger:!0},onConfirm:()=>C(p),children:c.jsx(Re,{type:"primary",danger:!0,icon:c.jsx(Yn,{}),children:"Kill"})})]}):c.jsxs(bl,{type:"secondary",children:["No process is listening on port ",o,"."]})})]}),c.jsx(rr,{className:"port-diagnostic-table",rowKey:S=>`${S.startedAt}-${S.port}-${S.pid}`,loading:r,dataSource:t,columns:x,pagination:!1,locale:{emptyText:c.jsx(qt,{description:"No ports have been observed from Launcher scripts yet."})}})]})}const{Title:pi,Paragraph:gi,Text:zn}=wn,Xg=[{id:"bitbucket",label:"Bitbucket"},{id:"jira",label:"Jira"},{id:"confluence",label:"Confluence"}],Xf=(e=0)=>{if(e===0)return"0 B";const t=["B","KB","MB","GB","TB"],n=Math.min(Math.floor(Math.log(e)/Math.log(1024)),t.length-1);return`${(e/1024**n).toFixed(n===0?0:1)} ${t[n]}`},hO=e=>{const t=String((e==null?void 0:e.url)||"").trim().replace(/\/+$/,"");return t==="/pages/welcome"||t==="/pages/welcome/index.html"},wm=["domain","aiApiHost","jiraIssuePrefix","defaultEditor","defaultBrowser",...Xg.map(({id:e})=>e)],gx=(e={})=>Object.fromEntries(wm.map(t=>[t,String(e[t]??"")])),Vge=(e,t)=>wm.filter(n=>String(e[n]??"")!==String(t[n]??"")).length;function Wge({theme:e,onThemeChange:t,onStaticPagesChange:n}){var Be,ze,qe,_e;const[r]=yt.useForm(),[a]=yt.useForm(),[o,l]=i.useState({}),[s,d]=i.useState(!1),[f,h]=i.useState(!1),[p,g]=i.useState(0),[v,y]=i.useState(null),[C,x]=i.useState(!0),[S,$]=i.useState(!1),[E,k]=i.useState(!1),[O,N]=i.useState(!1),[R,j]=i.useState(null),[I,M]=i.useState(!1),[P,A]=i.useState(""),[H,T]=i.useState(!1),[L,D]=i.useState(!1),F=i.useRef(null),V=i.useRef({}),[q,B]=i.useState([]),[U,K]=i.useState(!1),[_,G]=i.useState(!1),[X,Y]=i.useState(null),[le,oe]=i.useState(!1),[ue,ne]=i.useState(null),te=async()=>{try{await Xn.openDataDir()}catch(Ne){Jt.error(Ne.message)}},ee=async()=>{if(P)try{await Xn.openFolder(P)}catch(Ne){Jt.error(Ne.message)}},Q=async Ne=>{const xe=String(Ne||"").trim();if(xe){T(!0);try{const Pe=await mo.saveConfig(xe);A(Pe.workspaceDir||xe),D(!1),Jt.success("Workspace directory saved.")}catch(Pe){Jt.error(Pe.message)}finally{T(!1)}}},ae=async Ne=>{t==null||t(Ne);try{const xe=await Xn.saveTheme(Ne);l(Pe=>({...Pe,...xe}))}catch(xe){t==null||t(e),Jt.error(xe.message)}},fe=async()=>{x(!0);try{y(await mx.stats())}catch(Ne){Jt.error(Ne.message)}finally{x(!1)}},J=async()=>{k(!0);try{const{blob:Ne,filename:xe}=await mx.export(),Pe=URL.createObjectURL(Ne),He=document.createElement("a");He.href=Pe,He.download=xe,document.body.appendChild(He),He.click(),He.remove(),setTimeout(()=>URL.revokeObjectURL(Pe),1e3),Jt.success("Data backup exported.")}catch(Ne){Jt.error(Ne.message)}finally{k(!1)}},Z=Ne=>{const[xe]=Ne.target.files||[];Ne.target.value="",xe&&(M(!1),j(xe))},he=async()=>{if(R){N(!0);try{const Ne=await mx.import(R);y(Ne),M(!0)}catch(Ne){Jt.error(Ne.message)}finally{N(!1)}}},$e=async()=>{try{const Ne=await Cc.list();B(Ne)}catch(Ne){Jt.error(Ne.message)}finally{K(!0)}},Ie=()=>{g(Vge(r.getFieldsValue(wm),V.current)),h(!1)};i.useEffect(()=>{Xn.status().then(Ne=>{l(Ne);const xe={domain:Ne.domain,aiApiHost:Ne.aiApiHost||"",jiraIssuePrefix:Ne.jiraIssuePrefix||"",defaultEditor:Ne.defaultEditor||"vscode",defaultBrowser:Ne.defaultBrowser||"chrome"};r.setFieldsValue(xe),V.current=gx(xe),g(0)}).catch(Ne=>Jt.error(Ne.message)),mo.config().then(Ne=>A(Ne.workspaceDir||"")).catch(()=>{}),$e(),fe()},[r]);const re=Ne=>o[`${Ne}TokenConfigured`],ce=async()=>{try{await r.validateFields(["domain","aiApiHost"]),d(!0);const Ne=r.getFieldsValue();if(Ne.domain!=null){const xe=await Xn.saveDomain(Ne.domain);l(Pe=>({...Pe,...xe})),r.setFieldValue("domain",xe.domain)}if(Ne.aiApiHost!=null){const xe=await Xn.saveAiApiHost(Ne.aiApiHost);l(Pe=>({...Pe,...xe})),r.setFieldValue("aiApiHost",xe.aiApiHost)}if(Ne.jiraIssuePrefix!=null){const xe=await Xn.saveJiraIssuePrefix(Ne.jiraIssuePrefix);l(Pe=>({...Pe,...xe})),r.setFieldValue("jiraIssuePrefix",xe.jiraIssuePrefix)}if(Ne.defaultEditor!=null){const xe=await Xn.saveDefaultEditor(Ne.defaultEditor);l(Pe=>({...Pe,...xe})),r.setFieldValue("defaultEditor",xe.defaultEditor)}if(Ne.defaultBrowser!=null){const xe=await Xn.saveDefaultBrowser(Ne.defaultBrowser);l(Pe=>({...Pe,...xe})),r.setFieldValue("defaultBrowser",xe.defaultBrowser)}for(const{id:xe}of Xg)if(Ne[xe]){const Pe=await Xn.saveAccessToken(xe,Ne[xe]);l(He=>({...He,...Pe})),r.resetFields([xe])}V.current=gx(r.getFieldsValue(wm)),g(0),d(!1),h(!0),setTimeout(()=>h(!1),1500)}catch(Ne){d(!1),Ne!=null&&Ne.errorFields||Jt.error(Ne.message)}},ve=async Ne=>{try{const xe=await Xn.saveAccessToken(Ne,"");l(xe),r.resetFields([Ne]),V.current=gx(r.getFieldsValue(wm)),g(0),Jt.success(`${Xg.find(Pe=>Pe.id===Ne).label} Access Token removed.`)}catch(xe){Jt.error(xe.message)}},be=()=>{Y(null),a.resetFields(),G(!0)},Ce=async()=>{const Ne="/pages/welcome";if(q.some(hO)){Jt.info("The test demo page is already added.");return}try{await Cc.create({name:"Welcome Demo",url:Ne}),Jt.success("Test demo page added."),await $e(),n==null||n()}catch(xe){Jt.error(xe.message)}},ge=Ne=>{Y(Ne),a.setFieldsValue({name:Ne.name,url:Ne.url}),G(!0)},Oe=async Ne=>{try{await Cc.remove(Ne),Jt.success("Static page deleted."),await $e(),n==null||n()}catch(xe){Jt.error(xe.message)}},Ee=async()=>{try{const Ne=await a.validateFields();oe(!0),X?(await Cc.update(X.id,Ne),Jt.success("Static page updated.")):(await Cc.create(Ne),Jt.success("Static page created.")),oe(!1),G(!1),await $e(),n==null||n()}catch(Ne){oe(!1),Ne!=null&&Ne.errorFields||Jt.error(Ne.message)}},De=Ne=>{var Pe,He;const xe=Ne.target.closest('a[href^="#settings-"]');if(xe){if(Ne.preventDefault(),xe.getAttribute("href")==="#settings-dev-configurations"){(Pe=document.querySelector(".page"))==null||Pe.scrollTo({top:0,behavior:"smooth"});return}(He=document.getElementById(xe.getAttribute("href").slice(1)))==null||He.scrollIntoView({behavior:"smooth",block:"start"})}},Ae=[{id:"settings-dev-configurations",label:"Dev Configurations"},{id:"settings-error-logs",label:"Error Logs"},{id:"settings-appearance",label:"Appearance"},{id:"settings-default-applications",label:"Default Applications"},{id:"settings-workspace-directory",label:"Workspace Directory"},{id:"settings-data-directory",label:"Data Directory"},{id:"settings-static-pages",label:"Static Pages"},{id:"settings-access-tokens",label:"Access Tokens & Domain"}];return c.jsxs("div",{className:"settings-page",children:[c.jsx(Xr,{actions:c.jsx(Re,{type:"primary",color:f?"green":"primary",variant:"solid",icon:f?c.jsx(jl,{}):null,disabled:!f&&(s||p===0),loading:!f&&s,onClick:ce,children:f?"Saved":p?`Save (${p})`:"Save"}),className:"settings-page-header",description:"Customize DevBuddy, manage integrations, and maintain your workspace data.",title:"Settings"}),c.jsxs("div",{className:"settings-layout",children:[c.jsx("nav",{className:"settings-section-nav","aria-label":"Settings sections",onClick:De,children:Ae.map((Ne,xe)=>{const Pe=ue==null?99:Math.abs(xe-ue),He=ue==null?12:Math.max(12,52-Pe*10),ke=ue===xe;return c.jsxs("a",{href:`#${Ne.id}`,"aria-label":Ne.label,className:ke?"is-active":"",style:{"--nav-width":`${He}px`},onMouseEnter:()=>ne(xe),onMouseLeave:()=>ne(null),onFocus:()=>ne(xe),onBlur:()=>ne(null),children:[c.jsx("span",{className:`settings-section-nav-preview ${ke?"is-visible":""}`,children:Ne.label}),Ne.label]},Ne.id)})}),c.jsxs("div",{className:"settings-content",children:[c.jsx(Pt,{id:"settings-dev-configurations",className:"settings-card settings-card-spaced settings-dev-config-entry",children:c.jsxs("div",{className:"settings-title settings-title-actions",children:[c.jsx("div",{className:"settings-icon-wrap",children:c.jsx(O2,{className:"settings-icon"})}),c.jsxs("div",{className:"settings-title-copy",children:[c.jsx(pi,{level:4,children:"Dev Configurations"}),c.jsx(gi,{type:"secondary",children:"Read and update your system-level npm and Git configuration, including Git SSH key settings."})]}),c.jsx(Re,{onClick:()=>{window.location.hash="#/dev-configurations"},children:"Open"})]})}),c.jsx(Pt,{id:"settings-error-logs",className:"settings-card settings-card-spaced settings-dev-config-entry",children:c.jsxs("div",{className:"settings-title settings-title-actions",children:[c.jsx("div",{className:"settings-icon-wrap",children:c.jsx(Ed,{className:"settings-icon"})}),c.jsxs("div",{className:"settings-title-copy",children:[c.jsx(pi,{level:4,children:"Error Logs"}),c.jsx(gi,{type:"secondary",children:"Review application, launcher, and frontend errors captured by DevBuddy."})]}),c.jsx(Re,{onClick:()=>{window.location.hash="#/errors"},children:"Open"})]})}),c.jsxs(yt,{form:r,layout:"vertical",onValuesChange:Ie,children:[c.jsxs(Pt,{id:"settings-appearance",className:"settings-card settings-card-spaced",children:[c.jsxs("div",{className:"settings-title",children:[c.jsx("div",{className:"settings-icon-wrap",children:c.jsx(iO,{className:"settings-icon"})}),c.jsxs("div",{children:[c.jsx(pi,{level:4,children:"Appearance"}),c.jsx(gi,{type:"secondary",children:"Choose how DevBuddy looks. Theme changes are applied and saved immediately."})]})]}),c.jsxs("div",{className:"settings-appearance-row",children:[c.jsxs("div",{children:[c.jsx(zn,{strong:!0,children:"Theme"}),c.jsx(zn,{type:"secondary",className:"settings-appearance-hint",children:"Use the original dark navigation or the new bright workspace."})]}),c.jsx($h,{"aria-label":"Application theme",value:e,onChange:ae,options:[{label:"Dark",value:"dark",icon:c.jsx(mpe,{})},{label:"Light",value:"light",icon:c.jsx(iO,{})}]})]})]}),c.jsxs(Pt,{id:"settings-default-applications",className:"settings-card settings-card-spaced",children:[c.jsxs("div",{className:"settings-title",children:[c.jsx("div",{className:"settings-icon-wrap",children:c.jsx(Oa,{className:"settings-icon"})}),c.jsxs("div",{children:[c.jsx(pi,{level:4,children:"Default Applications"}),c.jsx(gi,{type:"secondary",children:"Choose your preferred editor and browser to open files, folders, and links."})]})]}),c.jsxs("div",{className:"token-settings-form",children:[c.jsxs("div",{className:"token-row",children:[c.jsxs("div",{className:"token-row-info",children:[c.jsx(zn,{strong:!0,className:"token-row-name",children:"Default Editor"}),c.jsx(zn,{type:"secondary",className:"token-row-hint",children:"VS Code, Devin, or IntelliJ IDEA"})]}),c.jsx(yt.Item,{name:"defaultEditor",children:c.jsx(In,{options:zP,className:"settings-app-select"})})]}),c.jsxs("div",{className:"token-row",children:[c.jsxs("div",{className:"token-row-info",children:[c.jsx(zn,{strong:!0,className:"token-row-name",children:"Default Browser"}),c.jsx(zn,{type:"secondary",className:"token-row-hint",children:"Choose your default browser"})]}),c.jsx(yt.Item,{name:"defaultBrowser",className:"settings-form-item-flush",children:c.jsx(In,{options:Sge(o.isMac!==!1),className:"settings-app-select"})})]})]})]}),c.jsxs(Pt,{id:"settings-workspace-directory",className:"settings-card settings-card-spaced",children:[c.jsxs("div",{className:"settings-title",children:[c.jsx("div",{className:"settings-icon-wrap",children:c.jsx(Lr,{className:"settings-icon"})}),c.jsxs("div",{children:[c.jsx(pi,{level:4,children:"Workspace Directory"}),c.jsx(gi,{type:"secondary",children:"Local workspace used by Package Upgrade and repository workflows."})]})]}),c.jsxs("div",{className:"token-row",children:[c.jsxs("div",{className:"token-row-info",children:[c.jsx(zn,{strong:!0,className:"token-row-name",children:"Workspace Path"}),c.jsx(zn,{type:"secondary",className:"token-row-hint",children:"Choose the local directory that contains your repositories"})]}),c.jsx("div",{className:"settings-data-path",children:c.jsxs(it.Compact,{className:"directory-path-control",children:[c.jsx($t,{value:P,readOnly:!0,placeholder:"Not configured",prefix:c.jsx(Re,{type:"text",icon:c.jsx(Lr,{}),onClick:ee,disabled:!P||H,"aria-label":"Open workspace directory",title:"Open workspace directory"})}),c.jsx(Re,{onClick:()=>D(!0),loading:H,children:"Browse"})]})})]})]}),c.jsx(jd,{open:L,initialPath:P||"~",onCancel:()=>D(!1),onSelect:Q,title:"Select Workspace Directory"}),c.jsxs(Pt,{id:"settings-data-directory",className:"settings-card settings-card-spaced",children:[c.jsxs("div",{className:"settings-title",children:[c.jsx("div",{className:"settings-icon-wrap",children:c.jsx(Lr,{className:"settings-icon"})}),c.jsxs("div",{children:[c.jsx(pi,{level:4,children:"Data Directory"}),c.jsx(gi,{type:"secondary",children:"Local directory where settings, logs, and application data are stored."})]})]}),c.jsxs("div",{className:"token-settings-form",children:[c.jsxs("div",{className:"token-row",children:[c.jsxs("div",{className:"token-row-info",children:[c.jsx(zn,{strong:!0,className:"token-row-name",children:"Data Storage Path"}),c.jsx(zn,{type:"secondary",className:"token-row-hint",children:"Directory location on your file system"})]}),c.jsx("div",{className:"settings-data-path",children:c.jsx(it.Compact,{className:"directory-path-control directory-path-control-readonly",children:c.jsx($t,{value:o.dataDir||"",readOnly:!0,prefix:c.jsx(Re,{type:"text",icon:c.jsx(Lr,{}),onClick:te,disabled:!o.dataDir,"aria-label":"Open data directory",title:"Open data directory"})})})})]}),c.jsxs("div",{className:"token-row",children:[c.jsxs("div",{className:"token-row-info",children:[c.jsx(zn,{strong:!0,className:"token-row-name",children:"Storage Usage"}),c.jsx(zn,{type:"secondary",className:"token-row-hint",children:"Total size and file count inside the data directory"})]}),c.jsxs("div",{className:"settings-data-usage",children:[c.jsx(Qme,{}),c.jsx(zn,{strong:!0,children:C?"Calculating…":Xf(v==null?void 0:v.sizeBytes)}),!C&&c.jsxs(zn,{type:"secondary",children:["· ",(v==null?void 0:v.fileCount)||0," files"]}),c.jsx(Re,{type:"link",size:"small",onClick:()=>$(!0),children:"Details"}),c.jsx(Re,{type:"link",size:"small",onClick:fe,loading:C,children:"Refresh"})]})]}),c.jsxs("div",{className:"token-row",children:[c.jsxs("div",{className:"token-row-info",children:[c.jsx(zn,{strong:!0,className:"token-row-name",children:"Backup & Restore"}),c.jsx(zn,{type:"secondary",className:"token-row-hint",children:"Includes settings, access tokens, logs, clipboard files, and other local data"})]}),c.jsxs("div",{className:"settings-backup-actions",children:[c.jsx(Re,{icon:c.jsx(Ol,{}),loading:E,onClick:J,children:"Export Backup"}),c.jsx(Re,{icon:c.jsx(Ev,{}),loading:O,onClick:()=>{var Ne;return(Ne=F.current)==null?void 0:Ne.click()},children:"Import Backup"}),c.jsx("input",{ref:F,className:"settings-backup-input",hidden:!0,type:"file",accept:".tar.gz,.tgz,application/gzip",onChange:Z})]})]})]})]}),c.jsx(bn,{title:I?"Backup restored":"Import data backup?",open:!!R,onCancel:()=>!O&&(j(null),M(!1)),onOk:()=>I?window.location.reload():he(),okText:I?"Reload DevBuddy":"Import Backup",okButtonProps:{danger:!I,loading:O},cancelText:"Cancel",closable:!O,maskClosable:!O,children:c.jsx("div",{className:"settings-import-confirm",children:I?c.jsxs("div",{className:"settings-import-complete",children:[c.jsx(jl,{className:"settings-import-complete-icon"}),c.jsx(pi,{level:4,children:"Import completed successfully"}),c.jsx(gi,{children:"Backup data has been restored. Reload DevBuddy to apply the restored settings and files."}),c.jsxs(zn,{type:"secondary",children:[(v==null?void 0:v.importedFiles)||0," files imported."]})]}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"settings-import-file-summary",children:[c.jsx(zn,{type:"secondary",children:"Selected file"}),c.jsx(zn,{strong:!0,children:R==null?void 0:R.name}),c.jsx(zn,{type:"secondary",children:Xf((R==null?void 0:R.size)||0)})]}),c.jsx(gi,{children:"This backup will be restored into the data directory. Matching files will be overwritten, while other existing files will be kept."}),c.jsx(zn,{type:"warning",children:"Restart DevBuddy after importing so all restored settings take effect."})]})})}),c.jsxs(Pt,{id:"settings-static-pages",className:"settings-card settings-card-spaced",children:[c.jsxs("div",{className:"settings-title settings-title-actions",children:[c.jsx("div",{className:"settings-icon-wrap",children:c.jsx(Kd,{className:"settings-icon"})}),c.jsxs("div",{className:"settings-title-copy",children:[c.jsx(pi,{level:4,children:"Static Pages"}),c.jsxs(gi,{type:"secondary",children:["Configure static pages (configuration saved in data/static-pages.json). Static page files can be placed in pages/ or data/pages/ directory or use external URLs."," ",U&&!q.some(hO)&&c.jsx("a",{href:"#add-test-demo",onClick:Ne=>{Ne.preventDefault(),Ce()},children:"Add test demo"})]})]}),c.jsx(Re,{type:"primary",icon:c.jsx(nr,{}),onClick:be,children:"Add Static Page"})]}),c.jsx(rr,{dataSource:q,rowKey:"id",pagination:!1,size:"middle",columns:[{title:"Page Name",dataIndex:"name",key:"name",width:200},{title:"URL",dataIndex:"url",key:"url",render:Ne=>c.jsx("a",{href:Ne,target:"_blank",rel:"noreferrer",children:Ne})},{title:c.jsx("div",{className:"settings-action-column-title",children:"Action"}),key:"action",width:140,align:"right",render:(Ne,xe)=>c.jsxs(it,{children:[c.jsx(Re,{type:"link",size:"small",icon:c.jsx(oi,{}),onClick:()=>ge(xe),children:"Edit"}),c.jsx(la,{title:"Delete static page?",description:"Are you sure you want to delete this page?",onConfirm:()=>Oe(xe.id),okText:"Yes",cancelText:"No",children:c.jsx(Re,{type:"link",danger:!0,size:"small",icon:c.jsx(Yn,{}),children:"Delete"})})]})}]})]}),c.jsxs(Pt,{id:"settings-access-tokens",className:"settings-card",children:[c.jsxs("div",{className:"settings-title",children:[c.jsx("div",{className:"settings-icon-wrap",children:c.jsx(Zhe,{className:"settings-icon"})}),c.jsxs("div",{children:[c.jsx(pi,{level:4,children:"Access Tokens & Domain"}),c.jsx(gi,{type:"secondary",children:"Tokens are stored locally and are never shown again."})]})]}),c.jsxs("div",{className:"token-settings-form",children:[c.jsxs("div",{className:"token-row",children:[c.jsxs("div",{className:"token-row-info",children:[c.jsx(zn,{strong:!0,className:"token-row-name",children:"Domain"}),c.jsx(zn,{type:"secondary",className:"token-row-hint",children:"e.g. abc.com"})]}),c.jsx(yt.Item,{name:"domain",rules:[{pattern:/^([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,message:"Enter a valid domain, e.g. abc.com"}],children:c.jsx($t,{placeholder:"abc.com",allowClear:!0})})]}),c.jsxs("div",{className:"token-row",children:[c.jsxs("div",{className:"token-row-info",children:[c.jsx(zn,{strong:!0,className:"token-row-name",children:"AI API Host"}),c.jsx(zn,{type:"secondary",className:"token-row-hint",children:"e.g. https://api.openai.com/v1"})]}),c.jsx(yt.Item,{name:"aiApiHost",rules:[{validator:(Ne,xe)=>{if(!xe)return Promise.resolve();try{const Pe=new URL(xe);if(!["http:","https:"].includes(Pe.protocol)||!Pe.host)throw new Error;return Promise.resolve()}catch{return Promise.reject(new Error("Enter a valid HTTP(S) API host."))}}}],children:c.jsx($t,{placeholder:"https://api.openai.com/v1",allowClear:!0})})]}),c.jsxs("div",{className:"token-row",children:[c.jsxs("div",{className:"token-row-info",children:[c.jsx(zn,{strong:!0,className:"token-row-name",children:"Jira Issue Prefix"}),c.jsx(zn,{type:"secondary",className:"token-row-hint",children:"e.g. PROJ"})]}),c.jsx(yt.Item,{name:"jiraIssuePrefix",children:c.jsx($t,{placeholder:"PROJ",allowClear:!0})})]}),Xg.map(({id:Ne,label:xe})=>c.jsxs("div",{className:`token-row ${re(Ne)?"is-configured":""}`,children:[c.jsxs("div",{className:"token-row-info",children:[c.jsxs("div",{className:"token-row-name-line",children:[c.jsx(zn,{strong:!0,className:"token-row-name",children:xe}),re(Ne)&&c.jsx(wt,{color:"success",closable:!0,onClose:Pe=>{Pe.preventDefault(),ve(Ne)},className:"token-row-tag",children:"Configured"})]}),c.jsxs(zn,{type:"secondary",className:"token-row-hint",children:[xe," API access token"]})]}),c.jsx(yt.Item,{name:Ne,children:c.jsx($t.Password,{placeholder:re(Ne)?"Enter new token to replace":"Paste access token",autoComplete:"off",allowClear:!0})})]},Ne))]})]})]})]})]}),c.jsxs(bn,{className:"settings-storage-modal",title:"Storage Usage Details",open:S,onCancel:()=>$(!1),width:760,footer:[c.jsx(Re,{onClick:fe,loading:C,children:"Refresh Analysis"},"refresh"),c.jsx(Re,{type:"primary",onClick:()=>$(!1),children:"Close"},"close")],children:[c.jsx(gi,{type:"secondary",className:"settings-storage-description",children:"Size analysis for the DevBuddy data directory, grouped by top-level folder."}),c.jsxs("div",{className:"settings-storage-summary",children:[c.jsxs("div",{children:[c.jsx(zn,{type:"secondary",children:"Total size"}),c.jsx(zn,{strong:!0,children:C?"—":Xf(v==null?void 0:v.sizeBytes)})]}),c.jsxs("div",{children:[c.jsx(zn,{type:"secondary",children:"Files"}),c.jsx(zn,{strong:!0,children:C?"—":((v==null?void 0:v.fileCount)||0).toLocaleString()})]}),c.jsxs("div",{children:[c.jsx(zn,{type:"secondary",children:"Storage groups"}),c.jsx(zn,{strong:!0,children:C?"—":(((Be=v==null?void 0:v.breakdown)==null?void 0:Be.length)||0).toLocaleString()})]})]}),c.jsx(pi,{level:5,className:"settings-storage-section-title",children:"Breakdown"}),!C&&!((ze=v==null?void 0:v.breakdown)!=null&&ze.length)?c.jsx(qt,{image:qt.PRESENTED_IMAGE_SIMPLE,description:"The data directory is empty"}):c.jsx(rr,{className:"settings-storage-table",dataSource:(v==null?void 0:v.breakdown)||[],rowKey:"path",loading:C,pagination:!1,size:"small",scroll:((qe=v==null?void 0:v.breakdown)==null?void 0:qe.length)>6?{y:260}:void 0,columns:[{title:"Location",dataIndex:"name",key:"name",render:(Ne,xe)=>c.jsxs("span",{className:"settings-storage-location",children:[xe.path==="."?c.jsx(Rs,{}):c.jsx(Cm,{}),c.jsx(zn,{strong:!0,children:Ne})]})},{title:"Usage",key:"usage",width:250,render:(Ne,xe)=>{const Pe=v!=null&&v.sizeBytes?xe.sizeBytes/v.sizeBytes*100:0;return c.jsxs("div",{className:"settings-storage-usage-cell",children:[c.jsx(Nh,{percent:Pe,showInfo:!1,size:"small"}),c.jsxs(zn,{type:"secondary",children:[Pe<.1&&Pe>0?"<0.1":Pe.toFixed(1),"%"]})]})}},{title:"Size",dataIndex:"sizeBytes",key:"sizeBytes",width:90,align:"right",render:Xf},{title:"Files",dataIndex:"fileCount",key:"fileCount",width:75,align:"right",render:Ne=>Ne.toLocaleString()}]}),!!((_e=v==null?void 0:v.largestFiles)!=null&&_e.length)&&c.jsxs(c.Fragment,{children:[c.jsx(pi,{level:5,className:"settings-storage-section-title",children:"Largest files"}),c.jsx("div",{className:"settings-largest-files",children:v.largestFiles.map(Ne=>c.jsxs("div",{className:"settings-largest-file",children:[c.jsxs("span",{children:[c.jsx(Rs,{}),c.jsx(zn,{ellipsis:{tooltip:Ne.path},children:Ne.path})]}),c.jsx(zn,{strong:!0,children:Xf(Ne.sizeBytes)})]},Ne.path))})]})]}),c.jsx(bn,{title:X?"Edit Static Page":"Add Static Page",open:_,onOk:Ee,onCancel:()=>G(!1),okText:"Save",confirmLoading:le,destroyOnClose:!0,children:c.jsxs(yt,{form:a,layout:"vertical",className:"settings-page-modal-form",children:[c.jsx(yt.Item,{name:"name",label:"Page Name",rules:[{required:!0,message:"Please enter page name"}],children:c.jsx($t,{placeholder:"e.g. test name"})}),c.jsx(yt.Item,{name:"url",label:"URL",extra:"Local pages in pages/ or data/pages/ directory can be accessed via /pages/<path> or /data/pages/<path>",rules:[{required:!0,message:"Please enter page URL"}],children:c.jsx($t,{placeholder:"e.g. /pages/welcome/index.html or https://example.com"})})]})})]})}const{Paragraph:pg,Text:Ur}=wn,cc={npm:{prefix:"",registry:"https://registry.npmjs.org/",strictSsl:!0,cache:"",proxy:"",httpsProxy:""},git:{name:"",email:"",sshKey:""},nvm:{defaultVersion:""}};function Uge(e){const t=String(e||"").replace(/^v/,""),[n="",r=""]=t.split(".");return[n,`${n}.${r}`,e]}function qge(e=[]){const t=new Map;return e.forEach(n=>{const r=typeof n=="string"?n:n.version,a=typeof n=="string"?"":n.publishedAt,[o="",l=""]=String(r).replace(/^v/,"").split(".");t.has(o)||t.set(o,new Map);const s=t.get(o),d=`${o}.${l}`;s.has(d)||s.set(d,[]),s.get(d).push({label:c.jsxs("span",{className:"npm-version-option",children:[c.jsx("span",{children:r}),a&&c.jsx("span",{className:"npm-version-published",children:new Date(a).toLocaleDateString()})]}),value:r})}),[...t.entries()].map(([n,r])=>({label:`v${n}`,value:n,children:[...r.entries()].map(([a,o])=>({label:a,value:a,children:o}))}))}function Kge(){var Je;const{message:e}=Br.useApp(),[t]=yt.useForm(),[n,r]=i.useState(!0),[a,o]=i.useState(!1),[l,s]=i.useState(!1),[d,f]=i.useState(!1),[h,p]=i.useState({nodeVersion:"",npmVersion:""}),[g,v]=i.useState({installed:!1,currentVersion:"",defaultVersion:"",nvmDir:"",nodeJsMirror:"",installedVersions:[]}),[y,C]=i.useState(""),[x,S]=i.useState(!1),[$,E]=i.useState([]),[k,O]=i.useState(!1),[N,R]=i.useState(!1),[j,I]=i.useState(""),[M,P]=i.useState(""),[A,H]=i.useState([]),[T,L]=i.useState(!1),[D,F]=i.useState(!1),[V,q]=i.useState(null),[B,U]=i.useState(""),[K,_]=i.useState([]),[G,X]=i.useState([]),[Y,le]=i.useState(!1),[oe,ue]=i.useState(""),[ne,te]=i.useState(!1),[ee,Q]=i.useState(null),[ae,fe]=i.useState("~"),[J,Z]=i.useState(!1),[he,$e]=i.useState("npm");i.useEffect(()=>{Xn.devConfigurations().then(Fe=>{var Qe,je,Le,et,Te;v(Fe.nvm||cc.nvm),E(((Qe=Fe.npm)==null?void 0:Qe.globalPackages)||[]),p({nodeVersion:((je=Fe.npm)==null?void 0:je.nodeVersion)||"",npmVersion:((Le=Fe.npm)==null?void 0:Le.npmVersion)||""}),t.setFieldsValue({npm:{...cc.npm,...Fe.npm},git:{...cc.git,...Fe.git},nvm:{defaultVersion:((et=Fe.nvm)==null?void 0:et.defaultVersion)||"",nodeJsMirror:((Te=Fe.nvm)==null?void 0:Te.nodeJsMirror)||""}})}).catch(Fe=>Jt.error(Fe.message)).finally(()=>r(!1))},[t]);const Ie=async()=>{try{await t.validateFields();const Qe=t.getFieldsValue(!0)[he]||{},je={section:he,[he]:{...cc[he],...Qe}};o(!0);const Le=await Xn.saveDevConfigurations(je);t.setFieldsValue(Le),Le.nvm&&v(Le.nvm),f(!0),window.setTimeout(()=>f(!1),1500)}catch(Fe){Fe!=null&&Fe.errorFields||Jt.error(Fe.message)}finally{o(!1)}},re=async()=>{if(y.trim()){S(!0);try{const Fe=await pge.install(y.trim());v(Fe),C(""),Jt.success(`Installed Node.js ${Fe.currentVersion||y.trim()}.`)}catch(Fe){Jt.error(Fe.message)}finally{S(!1)}}},ce=async()=>{var Fe,Qe,je,Le,et;O(!0);try{const Te=await Xn.devConfigurations();E(((Fe=Te.npm)==null?void 0:Fe.globalPackages)||[]),p({nodeVersion:((Qe=Te.npm)==null?void 0:Qe.nodeVersion)||"",npmVersion:((je=Te.npm)==null?void 0:je.npmVersion)||""}),Te.nvm&&v(Te.nvm),t.setFieldsValue({npm:{...cc.npm,...Te.npm},git:{...cc.git,...Te.git},nvm:{defaultVersion:((Le=Te.nvm)==null?void 0:Le.defaultVersion)||"",nodeJsMirror:((et=Te.nvm)==null?void 0:et.nodeJsMirror)||""}})}catch(Te){Jt.error(Te.message)}finally{O(!1)}},ve=async(Fe,Qe)=>{I(`${Fe}:${Qe}`);try{await xc.manage(Fe,Qe),await ce(),e.success(`${Qe} ${Fe==="uninstall"?"uninstalled":"upgraded"}.`)}catch(je){Jt.error(je.message)}finally{I("")}},be=async()=>{if(M.trim()){F(!0);try{H(await xc.search(M.trim())),L(!1)}catch(Fe){Jt.error(Fe.message)}finally{F(!1)}}},Ce=async()=>{if(V){te(!0);try{const Fe=B.trim()?`${V.name}@${B.trim()}`:V.name;await xc.manage("install",Fe),await ce(),q(null),H([]),P(""),e.success(`${Fe} installed.`)}catch(Fe){Jt.error(Fe.message)}finally{te(!1)}}},ge=async Fe=>{var Qe;le(!0),ue(Fe.name);try{const je=await xc.versions(Fe.name),Le=je.length?je:Fe.version?[{version:Fe.version,publishedAt:""}]:[],et=Fe.version||((Qe=Le[0])==null?void 0:Qe.version)||"";X(Le),U(et),_(Uge(et)),q(Fe)}catch(je){Jt.error(je.message)}finally{le(!1),ue("")}},Oe=Fe=>{fe(t.getFieldValue(["npm",Fe])||"~"),Q(Fe)},Ee=Fe=>{ee&&t.setFieldValue(["npm",ee],Fe),Q(null)},De=Fe=>{t.setFieldValue(["git","sshKey"],Fe),f(!1),Z(!1)},Ae=async Fe=>{const Qe=String(t.getFieldValue(["npm",Fe])||"").trim();if(!Qe){e.info(`Select a ${Fe} directory first.`);return}try{await Xn.openFolder(Qe)}catch(je){e.error(je.message)}},Be=async()=>{s(!0);try{const Fe=await xc.useSuggestedPrefix();t.setFieldValue(["npm","prefix"],Fe.prefix),f(!1),e.success(`NPM prefix set to ${Fe.prefix}.`)}catch(Fe){e.error(Fe.message)}finally{s(!1)}},ze=async Fe=>{const Qe=String(Fe.directory||"").trim();if(!Qe){e.error("Package directory is unavailable.");return}try{await Xn.revealFolder(Qe)}catch(je){e.error(je.message)}},qe=async Fe=>{try{await navigator.clipboard.writeText(Fe),e.success(`${Fe} copied.`)}catch(Qe){e.error(Qe.message||"Could not copy package name.")}},_e=Fe=>{t.setFieldValue(["npm",Fe],cc.npm[Fe]),f(!1)},Ne=(Fe,Qe)=>c.jsxs("span",{className:"npm-field-label",children:[c.jsx("span",{children:Fe}),c.jsx(Re,{type:"link",size:"small",htmlType:"button",className:"npm-reset-button",onClick:()=>_e(Qe),children:"Reset"})]}),xe=[{title:"Package",dataIndex:"name",key:"name",render:(Fe,Qe)=>c.jsxs(it,{size:4,children:[c.jsx(Re,{type:"text",className:"npm-package-name-button",title:"Copy package name","aria-label":`Copy ${Fe} package name`,onClick:()=>qe(Fe),children:c.jsx(Ur,{code:!0,children:Fe})}),c.jsx(vn,{title:Qe.directory?"Open package directory":"Package directory unavailable",children:c.jsx(Re,{type:"text",className:"npm-package-folder-button",icon:c.jsx(Lr,{}),disabled:!Qe.directory,"aria-label":`Open ${Fe} package directory`,onClick:()=>ze(Qe)})})]})},{title:"Version",dataIndex:"version",key:"version",render:Fe=>c.jsx(wt,{children:Fe||"unknown"})},{title:"Actions",key:"actions",align:"right",render:(Fe,Qe)=>c.jsx("div",{className:"npm-package-actions",children:c.jsx(la,{title:`Uninstall ${Qe.name}?`,onConfirm:()=>ve("uninstall",Qe.name),okText:"Uninstall",okButtonProps:{danger:!0},children:c.jsx(Re,{type:"primary",danger:!0,size:"small",loading:j===`uninstall:${Qe.name}`,children:"Uninstall"})})})}],Pe=c.jsxs(Pt,{className:"dev-config-card",bordered:!1,children:[c.jsxs("div",{className:"dev-config-section-heading",children:[c.jsx("div",{className:"dev-config-icon npm-icon",children:c.jsx(Oa,{})}),c.jsxs("div",{children:[c.jsx(Ur,{strong:!0,children:"NPM configuration"}),c.jsx(pg,{type:"secondary",children:"Set the defaults used by npm when installing and publishing packages."})]})]}),c.jsxs("div",{className:"npm-runtime-status",children:[c.jsxs("div",{children:[c.jsx(Ur,{type:"secondary",children:"Current Node.js"}),c.jsx(Ur,{strong:!0,children:h.nodeVersion||"—"})]}),c.jsxs("div",{children:[c.jsx(Ur,{type:"secondary",children:"Current npm"}),c.jsx(Ur,{strong:!0,children:h.npmVersion||"—"})]})]}),c.jsxs("div",{className:"dev-config-grid",children:[c.jsx(yt.Item,{label:c.jsxs("span",{className:"npm-field-label",children:[c.jsx("span",{children:"Prefix"}),c.jsx(Re,{type:"link",size:"small",htmlType:"button",className:"npm-reset-button",onClick:()=>_e("prefix"),children:"Reset"}),c.jsx(Re,{type:"link",size:"small",htmlType:"button",className:"npm-reset-button",loading:l,onClick:Be,children:"Use suggestion"})]}),name:["npm","prefix"],extra:"Global package installation directory.",children:c.jsx($t,{className:"npm-directory-input",prefix:c.jsx(Re,{htmlType:"button",type:"text",className:"npm-directory-picker",icon:c.jsx(Lr,{}),onClick:()=>Ae("prefix"),"aria-label":"Open Prefix Directory",title:"Open Prefix Directory"}),allowClear:!0,readOnly:!0,placeholder:"/usr/local",addonAfter:c.jsx(Re,{htmlType:"button",type:"text",onClick:()=>Oe("prefix"),children:"Browse"})})}),c.jsx(yt.Item,{label:Ne("Registry","registry"),name:["npm","registry"],rules:[{type:"url",warningOnly:!0}],children:c.jsx($t,{placeholder:"https://registry.npmjs.org/"})}),c.jsx(yt.Item,{label:Ne("Cache","cache"),name:["npm","cache"],extra:"Leave blank to use npm's default cache location.",children:c.jsx($t,{className:"npm-directory-input",prefix:c.jsx(Re,{htmlType:"button",type:"text",className:"npm-directory-picker",icon:c.jsx(Lr,{}),onClick:()=>Ae("cache"),"aria-label":"Open Cache Directory",title:"Open Cache Directory"}),allowClear:!0,readOnly:!0,placeholder:"~/.npm",addonAfter:c.jsx(Re,{htmlType:"button",type:"text",onClick:()=>Oe("cache"),children:"Browse"})})}),c.jsx(yt.Item,{label:Ne("Proxy","proxy"),name:["npm","proxy"],children:c.jsx($t,{placeholder:"http://proxy.example.com:8080"})}),c.jsx(yt.Item,{label:Ne("HTTPS Proxy","httpsProxy"),name:["npm","httpsProxy"],children:c.jsx($t,{placeholder:"http://proxy.example.com:8080"})}),c.jsx(yt.Item,{label:"Strict SSL",name:["npm","strictSsl"],valuePropName:"checked",extra:"Verify SSL certificates when connecting to the registry.",children:c.jsx(ki,{})})]}),c.jsx("div",{className:"npm-global-packages",children:c.jsxs("div",{className:"npm-global-packages-heading",children:[c.jsxs("div",{children:[c.jsx(Ur,{strong:!0,children:"Global packages"}),c.jsx(pg,{type:"secondary",children:"Manage packages installed globally by the system npm."})]}),c.jsxs(Re,{icon:c.jsx(go,{}),loading:k,onClick:()=>{R(!0),ce()},children:["Manage (",$.length,")"]})]})})]}),He=c.jsxs(Pt,{className:"dev-config-card",bordered:!1,children:[c.jsxs("div",{className:"dev-config-section-heading",children:[c.jsx("div",{className:"dev-config-icon git-icon",children:c.jsx(wv,{})}),c.jsxs("div",{children:[c.jsx(Ur,{strong:!0,children:"GIT identity"}),c.jsx(pg,{type:"secondary",children:"Configure the author identity Git uses for new commits."})]})]}),c.jsxs("div",{className:"dev-config-grid git-grid",children:[c.jsx(yt.Item,{label:"Name",name:["git","name"],children:c.jsx($t,{placeholder:"Ada Lovelace"})}),c.jsx(yt.Item,{label:"Email",name:["git","email"],rules:[{type:"email",warningOnly:!0}],children:c.jsx($t,{placeholder:"ada@example.com"})}),c.jsx(yt.Item,{className:"git-ssh-key",label:"SSH Key",name:["git","sshKey"],extra:"Enter a path directly or choose a private key file.",children:c.jsx($t,{className:"npm-directory-input",placeholder:"~/.ssh/id_ed25519",prefix:c.jsx(Re,{htmlType:"button",type:"text",className:"npm-directory-picker",icon:c.jsx(Rs,{}),"aria-label":"Select SSH Key File",onClick:()=>Z(!0)})})})]})]}),ke=c.jsxs(Pt,{className:"dev-config-card",bordered:!1,children:[c.jsxs("div",{className:"dev-config-section-heading",children:[c.jsx("div",{className:"dev-config-icon nvm-icon",children:c.jsx(Oa,{})}),c.jsxs("div",{children:[c.jsx(Ur,{strong:!0,children:"NVM configuration"}),c.jsx(pg,{type:"secondary",children:"Manage Node.js versions through the system NVM installation."})]})]}),c.jsxs("div",{className:"nvm-status-grid",children:[c.jsxs("div",{children:[c.jsx(Ur,{type:"secondary",children:"NVM version"}),c.jsx(Ur,{strong:!0,children:g.version||"—"})]}),c.jsxs("div",{children:[c.jsx(Ur,{type:"secondary",children:"Current using version"}),c.jsx(Ur,{strong:!0,children:g.currentVersion||"—"})]}),c.jsxs("div",{children:[c.jsx(Ur,{type:"secondary",children:"NVM directory"}),c.jsx(Ur,{strong:!0,children:g.nvmDir||"—"})]})]}),c.jsxs("div",{className:"dev-config-grid nvm-grid",children:[c.jsx(yt.Item,{label:"Node.js download mirror",name:["nvm","nodeJsMirror"],extra:"Saved as NVM_NODEJS_ORG_MIRROR in your shell profile.",children:c.jsx($t,{placeholder:"https://nodejs.org/dist"})}),c.jsx(yt.Item,{label:"Default Node.js version",name:["nvm","defaultVersion"],extra:"Applied through nvm alias default when you save.",children:c.jsx($t,{placeholder:"20"})}),c.jsx(yt.Item,{label:"Install Node.js version",extra:"Examples: 20, 20.11.1, lts/*",children:c.jsx($t,{value:y,onChange:Fe=>C(Fe.target.value),addonAfter:c.jsx(Re,{type:"link",loading:x,onClick:re,children:"Install"}),placeholder:"22"})})]}),c.jsxs("div",{className:"nvm-installed-versions",children:[c.jsx(Ur,{type:"secondary",children:"Installed versions"}),c.jsx("div",{children:(Je=g.installedVersions)!=null&&Je.length?g.installedVersions.map(Fe=>c.jsx(wt,{children:Fe},Fe)):c.jsx(Ur,{type:"secondary",children:"None found"})})]})]}),We=c.jsxs(bn,{title:"Global packages",open:N,onCancel:()=>!j&&!ne&&R(!1),footer:null,width:760,children:[c.jsxs("div",{className:"npm-install-row",children:[c.jsx($t,{value:M,onChange:Fe=>P(Fe.target.value),onPressEnter:be,placeholder:"Search npm packages"}),c.jsx(Re,{type:"primary",loading:D,disabled:!M.trim(),onClick:be,children:"Search"}),c.jsx(Re,{icon:c.jsx(go,{}),loading:k,onClick:ce,children:"Refresh"})]}),A.length>0&&c.jsxs(c.Fragment,{children:[c.jsx(Ur,{strong:!0,children:"Search results"}),c.jsx(rr,{className:"npm-search-results",rowKey:"name",size:"small",dataSource:T?A:A.slice(0,5),pagination:!1,columns:[{title:"Package",dataIndex:"name",render:Fe=>c.jsx(Ur,{code:!0,children:Fe})},{title:"Version",dataIndex:"version"},{title:"Description",dataIndex:"description",ellipsis:!0},{title:"",key:"install",align:"right",render:(Fe,Qe)=>c.jsx(Re,{size:"small",type:"primary",loading:Y&&Qe.name===oe,onClick:()=>ge(Qe),children:"Install"})}]}),A.length>5&&c.jsx(Re,{className:"npm-show-more",type:"link",onClick:()=>L(Fe=>!Fe),children:T?"Show fewer":`Show more (${A.length-5})`}),c.jsx(wh,{})]}),c.jsx(rr,{className:"npm-global-package-table",rowKey:"name",size:"small",loading:k,dataSource:$,columns:xe,pagination:!1,locale:{emptyText:"No global packages found."}})]}),st=c.jsx(bn,{className:"npm-install-confirm-modal",width:560,title:"Install global package?",open:!!V,onCancel:()=>!ne&&q(null),onOk:Ce,okText:ne?"Installing…":"Install",confirmLoading:ne,closable:!ne,maskClosable:!ne,children:ne?c.jsxs("div",{className:"npm-install-progress",children:[c.jsx(lr,{}),c.jsxs(Ur,{children:["Installing ",c.jsxs("strong",{children:[V==null?void 0:V.name,B?`@${B}`:""]})," globally with npm…"]}),c.jsx(Ur,{type:"secondary",children:"This may take a moment. The package list will refresh when it finishes."})]}):c.jsxs("div",{className:"npm-install-confirm",children:[c.jsx(Ur,{children:"Choose the version to install:"}),c.jsx(Rl,{className:"npm-version-select",popupClassName:"npm-version-picker",value:K,onChange:Fe=>{const Qe=Fe||[];_(Qe),U(Qe.length?Qe[Qe.length-1]:"")},options:qge(G),placeholder:"Select a version",expandTrigger:"hover",displayRender:Fe=>Fe.length?Fe[Fe.length-1]:""}),c.jsx(Ur,{type:"secondary",children:"Versions are grouped by major and minor release. Publish dates are shown on the patch version."})]})});return c.jsxs("div",{className:"dev-configurations-page",children:[c.jsx(Xr,{actions:c.jsx(Re,{type:"primary",icon:d?c.jsx(jl,{}):null,loading:!d&&a,onClick:Ie,children:d?"Saved":"Save"}),description:"Read and update the system-level npm and Git configuration used across your development workflow.",eyebrow:"DEVELOPMENT",title:"Dev Configurations"}),c.jsx(lr,{spinning:n,tip:"Loading system configuration…",children:c.jsx(yt,{form:t,layout:"vertical",children:c.jsx(Ka,{activeKey:he,onChange:$e,items:[{key:"npm",label:"NPM",icon:c.jsx(Oa,{}),children:c.jsxs(c.Fragment,{children:[Pe,We,st]})},{key:"git",label:"GIT",icon:c.jsx(wv,{}),children:He},{key:"nvm",label:"NVM",icon:c.jsx(Oa,{}),disabled:!g.installed,children:ke}]})})}),c.jsx(jd,{open:!!ee,initialPath:ae,onCancel:()=>Q(null),onSelect:Ee,title:"Select Project Directory"}),c.jsx(jd,{open:J,initialPath:"~",onCancel:()=>Z(!1),onSelect:De,selectionType:"file",title:"Select SSH Key File"})]})}const{Title:Gge,Text:Po,Paragraph:Xge}=wn,{Dragger:Yge}=Rh,pO=(e=0)=>{if(!e)return"0 B";const t=["B","KB","MB","GB"],n=Math.min(Math.floor(Math.log(e)/Math.log(1024)),t.length-1);return`${(e/1024**n).toFixed(n?1:0)} ${t[n]}`},Jge=e=>({file:e,name:e.name||"clipboard-image.png",url:URL.createObjectURL(e),size:e.size});function Qge(){const[e,t]=i.useState(null),[n,r]=i.useState(null),[a,o]=i.useState(75),[l,s]=i.useState(!0),[d,f]=i.useState(!0),[h,p]=i.useState(!0),[g,v]=i.useState(2),[y,C]=i.useState(!1),[x,S]=i.useState(null),[$,E]=i.useState(100),[k,O]=i.useState(!1),[N,R]=i.useState(!1),[j,I]=Jt.useMessage(),M=i.useRef(null),P=i.useRef(null),A=B=>{var U;(U=B.current)!=null&&U.url&&URL.revokeObjectURL(B.current.url)},H=B=>{var K;if(!((K=B==null?void 0:B.type)!=null&&K.startsWith("image/")))return j.error("Please choose an image file."),!1;A(M),A(P);const U=Jge(B);return M.current=U,P.current=null,t(U),r(null),F(B),!1},T=B=>{var U;return[...((U=B.dataTransfer)==null?void 0:U.types)||[]].includes("Files")},L=B=>{var K;B.preventDefault(),R(!1);const U=[...((K=B.dataTransfer)==null?void 0:K.files)||[]].find(_=>_.type.startsWith("image/"));U?H(U):j.error("Drop an image file to compress it.")};i.useEffect(()=>()=>{A(M),A(P)},[]),i.useEffect(()=>{const B=U=>{var G;const K=[...((G=U.clipboardData)==null?void 0:G.items)||[]].find(X=>X.type.startsWith("image/"));if(!K)return;U.preventDefault();const _=K.getAsFile();_&&(H(new File([_],`clipboard-${Date.now()}.${_.type.split("/")[1]||"png"}`,{type:_.type})),j.success("Image read from clipboard."))};return window.addEventListener("paste",B),()=>window.removeEventListener("paste",B)},[j]);const D=async()=>{var B;try{if(!((B=navigator.clipboard)!=null&&B.read))throw new Error("Direct clipboard reading is unavailable. Paste an image with ⌘ / Ctrl + V instead.");const U=await navigator.clipboard.read();for(const K of U){const _=K.types.find(G=>G.startsWith("image/"));if(_){const G=await K.getType(_);H(new File([G],`clipboard-${Date.now()}.${_.split("/")[1]||"png"}`,{type:_})),j.success("Image read from clipboard.");return}}throw new Error("No image was found in the clipboard.")}catch(U){j.warning(U.message||"Unable to read an image from the clipboard.")}},F=async(B=e==null?void 0:e.file)=>{if(B){O(!0);try{const[{encode:U},{imageData:K,width:_,height:G}]=await Promise.all([Vc(()=>import("./index-_vMuByUV.js"),[]),DP(B,x,$)]),X=await U(K,{quality:a,progressive:l,optimize_coding:d,auto_subsample:h,chroma_subsample:g,trellis_multipass:y});A(P);const Y=new Blob([X],{type:"image/jpeg"}),le={url:URL.createObjectURL(Y),size:Y.size,width:_,height:G};P.current=le,r(le),j.success("MozJPEG compression complete.")}catch(U){j.error(U.message||"Image compression failed.")}finally{O(!1)}}},V=()=>{if(!n)return;const B=e.name.replace(/\.[^.]+$/,"")||"image",U=document.createElement("a");U.href=n.url,U.download=`${B}-mozjpeg.jpg`,U.click()},q=n&&e?Math.round((1-n.size/e.size)*100):null;return c.jsxs(c.Fragment,{children:[I,c.jsxs("div",{className:`squoosh-page ${N?"is-file-dragging":""}`,onDragOver:B=>{T(B)&&(B.preventDefault(),R(!0))},onDragLeave:B=>{B.currentTarget===B.target&&R(!1)},onDrop:L,children:[c.jsx(Xr,{actions:c.jsxs(it,{children:[c.jsx(Re,{icon:c.jsx(vo,{}),onClick:D,children:"Read clipboard"}),c.jsx(Re,{type:"primary",icon:c.jsx(jS,{}),onClick:()=>F(),disabled:!e,loading:k,children:"Compress"})]}),description:"Compress JPEG images locally while balancing visual quality and file size.",title:"Image compression"}),c.jsxs("div",{className:"squoosh-studio",children:[c.jsxs("div",{className:"squoosh-preview-area",children:[c.jsx(gO,{title:"Original",detail:e?`${pO(e.size)} · ${e.name}`:"Choose an image to begin",children:e?c.jsx(vO,{label:"Original image",image:e.url}):c.jsxs(Yge,{accept:"image/*",multiple:!1,showUploadList:!1,beforeUpload:H,className:"image-dropzone",children:[c.jsx("p",{className:"ant-upload-drag-icon",children:c.jsx(Jm,{})}),c.jsx("p",{className:"ant-upload-text",children:"Drop an image or click to choose"}),c.jsx("p",{className:"ant-upload-hint",children:"Or paste an image with ⌘ / Ctrl + V."})]})}),c.jsx(gO,{title:"MozJPEG output",detail:n?`${pO(n.size)} · ${n.width} × ${n.height}`:"Waiting for compression",action:n&&c.jsx(Re,{type:"primary",size:"small",icon:c.jsx(Ol,{}),onClick:V,children:"Download"}),children:k?c.jsx("div",{className:"image-loading",children:c.jsx(lr,{tip:"Compressing…"})}):n?c.jsxs(c.Fragment,{children:[c.jsx(vO,{label:"Compressed JPEG",image:n.url}),q!==null&&c.jsx("div",{className:`compression-saving ${q>0?"is-saving":""}`,children:q>0?`${q}% smaller`:"No size reduction at current settings."})]}):c.jsx(qt,{image:qt.PRESENTED_IMAGE_SIMPLE,description:"Compressed preview"})})]}),c.jsxs("aside",{className:"squoosh-settings",children:[c.jsxs("div",{className:"settings-heading",children:[c.jsx(Po,{children:"ENCODER"}),c.jsx(Gge,{level:4,children:"MozJPEG"}),c.jsx(Xge,{children:"Fine-tune output size and image quality."})]}),c.jsxs("div",{className:"option-row",children:[c.jsxs("div",{children:[c.jsx(Po,{strong:!0,children:"Quality"}),c.jsx("br",{}),c.jsx(Po,{type:"secondary",children:"Higher values preserve more detail."})]}),c.jsx(wt,{color:"purple",children:a})]}),c.jsx(wne,{min:1,max:100,value:a,onChange:o,tooltip:{formatter:B=>`${B}`}}),c.jsxs("div",{className:"option-select",children:[c.jsxs("div",{children:[c.jsx(Po,{strong:!0,children:"Long edge"}),c.jsx("br",{}),c.jsx(Po,{type:"secondary",children:"Scale the longest edge to this value. Never crops the image."})]}),c.jsx(Wm,{min:1,max:16384,value:x,onChange:S,placeholder:"Original",addonAfter:"px"})]}),c.jsxs("div",{className:"option-select",children:[c.jsxs("div",{children:[c.jsx(Po,{strong:!0,children:"Scale"}),c.jsx("br",{}),c.jsx(Po,{type:"secondary",children:"Scale the image by percentage."})]}),c.jsx(Wm,{min:1,max:100,value:$,onChange:E,placeholder:"100",addonAfter:"%",allowClear:!0})]}),c.jsx(gg,{label:"Progressive JPEG",description:"Display a low-detail preview while loading.",checked:l,onChange:s}),c.jsx(gg,{label:"Optimize coding",description:"Reduce size without changing image quality.",checked:d,onChange:f}),c.jsx(Qv,{ghost:!0,className:"advanced-options",items:[{key:"advanced",label:"Advanced settings",children:c.jsxs(c.Fragment,{children:[c.jsx(gg,{label:"Automatic chroma subsampling",description:"Pick sampling based on the image content.",checked:h,onChange:p}),c.jsxs("div",{className:"option-select",children:[c.jsxs("div",{children:[c.jsx(Po,{strong:!0,children:"Chroma subsampling"}),c.jsx("br",{}),c.jsx(Po,{type:"secondary",children:"Enabled when automatic mode is off."})]}),c.jsx(In,{disabled:h,value:g,onChange:v,options:[{value:0,label:"4:4:4 (colour detail)"},{value:1,label:"4:2:2 (balanced)"},{value:2,label:"4:2:0 (smaller file)"}]})]}),c.jsx(gg,{label:"Trellis multi-pass",description:"Further size reduction with a longer encode time.",checked:y,onChange:C})]})}]}),c.jsx(Re,{type:"primary",size:"large",block:!0,icon:c.jsx(jS,{}),onClick:()=>F(),disabled:!e,loading:k,children:"Compress image"})]})]})]})]})}function gO({title:e,detail:t,action:n,children:r}){return c.jsxs("div",{className:"preview-pane",children:[c.jsxs("header",{children:[c.jsxs("div",{children:[c.jsx(Po,{children:e}),c.jsx("span",{children:t})]}),n]}),c.jsx("div",{className:"preview-canvas",children:r})]})}function gg({label:e,description:t,checked:n,onChange:r}){return c.jsxs("div",{className:"option-switch",children:[c.jsxs("div",{children:[c.jsx(Po,{strong:!0,children:e}),c.jsx("br",{}),c.jsx(Po,{type:"secondary",children:t})]}),c.jsx(ki,{checked:n,onChange:r})]})}function vO({label:e,image:t,metadata:n}){return c.jsxs("div",{className:"image-panel",children:[c.jsx("img",{src:t,alt:e}),n&&c.jsx("div",{className:"image-panel-meta",children:c.jsx(Po,{type:"secondary",children:n})})]})}const{Paragraph:Zge,Text:Cr}=wn;function eve({prs:e,selectedPrKeys:t,onToggleSelectPr:n,onSelectPr:r}){return e.length===0?c.jsx(qt,{className:"pr-review-empty",description:"No open pull requests found."}):c.jsx("div",{className:"pr-review-list",children:e.map(a=>{var d,f,h,p,g,v,y,C,x;const o=a.reviewUrl||"",l=a.reviewUrl||a.id,s=t.includes(l);return c.jsx(Pt,{size:"small",hoverable:!0,className:`pr-review-list-item ${s?"is-selected":""}`,onClick:S=>{S.target.closest('.ant-checkbox-wrapper, .ant-checkbox, input[type="checkbox"]')||o&&r(o)},children:c.jsxs("div",{className:"pr-review-list-row",children:[c.jsxs("div",{className:"pr-review-list-primary",children:[c.jsx(sr,{checked:s,onChange:S=>{S.stopPropagation(),n(l)},onClick:S=>S.stopPropagation()}),c.jsxs("div",{className:"pr-review-list-copy",children:[c.jsxs(it,{size:8,wrap:!0,children:[c.jsxs(Cr,{strong:!0,className:"pr-review-list-title",children:["#",a.id," ",a.title]}),a.draft&&c.jsx(wt,{color:"gold",children:"Draft"})]}),c.jsxs("div",{className:"pr-review-list-meta",children:[c.jsxs(Cr,{type:"secondary",style:{fontWeight:500},children:[(h=(f=(d=a.fromRef)==null?void 0:d.repository)==null?void 0:f.project)==null?void 0:h.key," / ",(g=(p=a.fromRef)==null?void 0:p.repository)==null?void 0:g.slug]}),c.jsx("span",{className:"pr-review-list-separator",children:"|"}),c.jsx(wt,{size:"small",className:"pr-review-branch-tag",children:(v=a.fromRef)==null?void 0:v.displayId}),c.jsx(jc,{style:{fontSize:"10px"}}),c.jsx(wt,{size:"small",className:"pr-review-branch-tag",children:(y=a.toRef)==null?void 0:y.displayId}),c.jsx("span",{className:"pr-review-list-separator",children:"|"}),c.jsxs("span",{children:["Author: ",c.jsx("strong",{children:(x=(C=a.author)==null?void 0:C.user)==null?void 0:x.displayName})]}),c.jsx("span",{className:"pr-review-list-separator",children:"|"}),c.jsxs("span",{children:["Updated: ",new Date(a.updatedDate).toLocaleDateString()]})]})]})]}),c.jsxs(it,{size:8,children:[c.jsx(Re,{size:"small",icon:c.jsx(qi,{}),onClick:S=>{S.stopPropagation(),o&&hr(o)},children:"Open"}),c.jsx(Re,{type:"primary",size:"small",onClick:S=>{S.stopPropagation(),o&&r(o)},children:"Review"})]})]})},l)})})}function bO(){const e=window.location.hash||"";if(e.includes("#/pr-review/detail")){const t=e.indexOf("?");if(t!==-1)return new URLSearchParams(e.slice(t)).get("url")||""}return""}function tve(e){if(!e)return"";let t=String(e||"").trim();t=t.replace(/^```(?:markdown|md|json)?\s*/i,"").replace(/\s*```$/i,"").trim();const n=/^\{?\s*\\?"?summary\\?"?\s*:\s*\\?"?/i;n.test(t)&&(t=t.replace(n,""),t=t.replace(/\\?"\s*,?\s*\\?"?findings\\?"?\s*:\s*\[[\s\S]*$/i,""),t=t.replace(/\\?"\s*\}?\s*$/i,""),t=t.replace(/\\n/g,`
498
498
  `).replace(/\\"/g,'"').replace(/\\\\/g,"\\").trim());const r=S=>String(S).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"),a=S=>r(S).replace(/`([^`]+)`/g,'<code class="pr-review-md-inline-code">$1</code>').replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>").replace(/__([^_]+)__/g,"<strong>$1</strong>").replace(/(^|[^*])\*([^*]+)\*([^*]|$)/g,"$1<em>$2</em>$3").replace(/(^|[^_])_([^_]+)_([^_]|$)/g,"$1<em>$2</em>$3").replace(/~~([^~]+)~~/g,"<del>$1</del>").replace(/\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)/g,'<a href="$2" target="_blank" rel="noreferrer">$1</a>'),o=e.split(/\r?\n/),l=[];let s=!1,d="",f=[],h=!1,p=!1,g=!1,v=[];const y=()=>{if(v.length===0)return;const[S,...$]=v;let E='<div class="pr-review-md-table-wrapper"><table class="pr-review-md-table">';S&&(E+=`<thead><tr>${S.map(k=>`<th>${k}</th>`).join("")}</tr></thead>`),$.length>0&&(E+=`<tbody>${$.map(k=>`<tr>${k.map(O=>`<td>${O}</td>`).join("")}</tr>`).join("")}</tbody>`),E+="</table></div>",l.push(E),v=[]},C=()=>{h&&(l.push("</ul>"),h=!1),p&&(l.push("</ol>"),p=!1)},x=()=>{g&&(l.push("</blockquote>"),g=!1)};for(let S=0;S<o.length;S++){const $=o[S],E=$.trim();if(E.startsWith("```")){s?(l.push(`<pre class="pr-review-md-code-block"><code class="language-${r(d)}">${f.map(r).join(`
499
499
  `)}</code></pre>`),s=!1,d="",f=[]):(C(),x(),y(),s=!0,d=E.slice(3).trim(),f=[]);continue}if(s){f.push($);continue}if(E.startsWith("|")&&E.endsWith("|")){if(C(),x(),/^\|[\s\-:|]+\|$/.test(E))continue;const N=E.slice(1,-1).split("|").map(R=>a(R.trim()));v.push(N);continue}else y();if(/^(?:---|\*\*\*|___)\s*$/.test(E)){C(),x(),l.push('<hr class="pr-review-md-hr" />');continue}if(/^#{1,6}\s+/.test(E)){C(),x();const N=E.match(/^(#{1,6})\s+/)[1].length,R=a(E.replace(/^#{1,6}\s+/,""));l.push(`<h${N} class="pr-review-md-heading pr-review-md-h${N}">${R}</h${N}>`);continue}if(E.startsWith(">")){C(),g||(l.push('<blockquote class="pr-review-md-blockquote">'),g=!0);const N=a(E.replace(/^>\s*/,""));l.push(`<p>${N}</p>`);continue}else x();const k=E.match(/^[-*]\s+(.*)$/);if(k){p&&(l.push("</ol>"),p=!1),h||(l.push('<ul class="pr-review-md-ul">'),h=!0),l.push(`<li>${a(k[1])}</li>`);continue}const O=E.match(/^(\d+)\.\s+(.*)$/);if(O){h&&(l.push("</ul>"),h=!1),p||(l.push('<ol class="pr-review-md-ol">'),p=!0),l.push(`<li>${a(O[2])}</li>`);continue}C(),E&&l.push(`<p class="pr-review-md-p">${a(E)}</p>`)}return s&&l.push(`<pre class="pr-review-md-code-block"><code>${f.map(r).join(`
@@ -562,7 +562,7 @@ ${N.details||""}`;navigator.clipboard.writeText(R),g(N.id),setTimeout(()=>{g(j=>
562
562
 
563
563
  ## 01. Opening · 3 min
564
564
 
565
- What should the audience take away?`,rows:18,value:g})]}),c.jsxs("section",{className:"presentation-brief",children:[c.jsxs("div",{className:"presentation-brief-main",children:[c.jsxs("div",{className:"presentation-brief-fields",children:[c.jsxs("label",{children:[c.jsx("span",{children:"Presentation title"}),c.jsx($t,{onChange:V=>k({title:V.target.value}),value:a.title})]}),c.jsxs("label",{children:[c.jsx("span",{children:"Subtitle / promise"}),c.jsx($t,{onChange:V=>k({subtitle:V.target.value}),value:a.subtitle})]}),c.jsxs("label",{children:[c.jsx("span",{children:"Presenter"}),c.jsx($t,{onChange:V=>k({presenter:V.target.value}),value:a.presenter})]}),c.jsxs("label",{children:[c.jsx("span",{children:"Planned date"}),c.jsx(eu,{allowClear:!0,format:"MMM D, YYYY",onChange:V=>k({plannedDate:V?V.format("YYYY-MM-DD"):""}),value:a.plannedDate?Ca(a.plannedDate):null})]})]}),c.jsxs("div",{className:"presentation-brief-options",children:[c.jsxs("div",{className:"presentation-display-option presentation-theme-option",children:[c.jsxs("span",{children:[c.jsx("strong",{children:"Audience theme"}),c.jsx("small",{children:"Audience view appearance"})]}),c.jsx($h,{onChange:V=>k({audienceTheme:V}),options:[{label:"Light",value:"light"},{label:"Dark",value:"dark"}],size:"small",value:a.audienceTheme})]}),c.jsxs("label",{className:"presentation-display-option",children:[c.jsxs("span",{children:[c.jsx("strong",{children:"Show time boxes"}),c.jsx("small",{children:"Audience view · all sections"})]}),c.jsx(ki,{"aria-label":"Show time boxes for all sections in the audience view",checked:a.showTimeBoxes,onChange:V=>k({showTimeBoxes:V}),size:"small"})]}),c.jsxs("label",{className:"presentation-display-option",children:[c.jsxs("span",{children:[c.jsx("strong",{children:"Show DevBuddy logo"}),c.jsx("small",{children:"Audience view header"})]}),c.jsx(ki,{"aria-label":"Show DevBuddy logo in the audience view",checked:a.showAudienceLogo,onChange:V=>k({showAudienceLogo:V}),size:"small"})]})]})]}),c.jsx("div",{className:"presentation-brief-side",children:c.jsxs("div",{className:"presentation-brief-stats",children:[c.jsxs("div",{children:[c.jsx("strong",{children:a.sections.length}),c.jsx("span",{children:"sections"})]}),c.jsxs("div",{children:[c.jsx("strong",{children:S}),c.jsx("span",{children:"minutes"})]}),c.jsxs("div",{children:[c.jsxs("strong",{children:[$,"%"]}),c.jsx("span",{children:"progress"})]})]})})]}),c.jsxs("div",{className:"presentation-progress-strip",children:[c.jsxs("div",{children:[c.jsx("span",{children:"Current section"}),c.jsx("strong",{children:x.title})]}),c.jsx(Nh,{percent:$,showInfo:!1}),c.jsxs(ys,{children:[a.activeIndex+1," of ",a.sections.length]})]}),c.jsxs("div",{className:"presentation-workspace",children:[c.jsx(y0e,{onAdd:N,onDelete:j,onMove:R,onSelect:V=>k({activeIndex:V}),plan:a}),c.jsx(x0e,{index:a.activeIndex,onChange:O,section:x,total:a.sections.length}),c.jsx(C0e,{now:l,onAddNote:A,onNext:()=>P(1),onPrevious:()=>P(-1),onResetTimer:M,onToggleTimer:I,plan:a})]})]})}function w0e(){const{message:e}=Br.useApp(),[t,n]=i.useState(BO),r=i.useRef(!1),[a,o]=i.useState(null),[l,s]=i.useState(!1),[d,f]=i.useState("");i.useEffect(()=>{let g=!1;return(async()=>{try{const y=await Sm.get();if(g)return;if(Array.isArray(y.plans)&&y.plans.length>0)n(y.plans.map(Ki));else{const C=BO();n(C),await Sm.save(C)}r.current=!0}catch{r.current=!0}})(),()=>{g=!0}},[]),i.useEffect(()=>{r.current&&Sm.save(t)},[t]);const h=t.find(g=>g.id===a);if(h)return c.jsx(S0e,{initialPlan:h,onBack:()=>o(null),onPlanChange:g=>{n(v=>v.map(y=>y.id===g.id?g:y))}},h.id);const p=()=>{const g=v0e(d);n(v=>[g,...v]),f(""),s(!1),o(g.id)};return c.jsxs("div",{className:"presentation-page presentation-library-page",children:[c.jsx(Xr,{actions:c.jsx(Re,{icon:c.jsx(nr,{}),onClick:()=>s(!0),type:"primary",children:"Add presentation"}),className:"presentation-header presentation-library-header",copyClassName:"presentation-header-copy",description:"Plan the story, prepare your speaker console, and keep every presentation ready to run.",title:"Presentations"}),t.length>0?c.jsx("div",{className:"presentation-library-grid",children:t.map(g=>{const v=g.sections.reduce((C,x)=>C+x.duration,0),y=R2(g);return c.jsxs("div",{className:"presentation-library-item-wrapper",children:[c.jsxs("button",{className:"presentation-library-item",onClick:()=>o(g.id),type:"button",children:[c.jsx("span",{className:"presentation-library-icon",children:c.jsx(Pi,{})}),c.jsxs("span",{className:"presentation-library-item-copy",children:[c.jsx("span",{className:"presentation-library-item-topline",children:c.jsx("strong",{children:g.title})}),c.jsx("span",{className:"presentation-library-subtitle",children:g.subtitle||"No subtitle yet"})]}),c.jsxs("span",{className:"presentation-library-progress",children:[c.jsx("i",{children:c.jsx("b",{style:{width:`${y}%`}})}),c.jsxs("em",{children:[y,"%"]})]}),c.jsxs("span",{className:"presentation-library-meta",children:[c.jsxs("span",{children:[g.sections.length," sections"]}),c.jsxs("span",{children:[v," min"]}),g.plannedDate&&c.jsx("span",{children:qP(g.plannedDate)}),c.jsxs("span",{children:["Updated ",new Date(g.updatedAt||Date.now()).toLocaleDateString()]})]})]}),c.jsx(la,{cancelText:"Cancel",description:"This presentation and its quick captures will be permanently removed.",okButtonProps:{danger:!0},okText:"Delete",onConfirm:()=>{n(C=>C.filter(x=>x.id!==g.id)),e.success("Presentation deleted.")},title:`Delete “${g.title||"Untitled presentation"}”?`,children:c.jsx(Re,{"aria-label":`Delete ${g.title||"presentation"}`,className:"presentation-library-delete",danger:!0,icon:c.jsx(Yn,{}),size:"small",type:"text"})})]},g.id)})}):c.jsx(Pt,{className:"presentation-library-empty",children:c.jsx(qt,{description:"No presentations yet",image:qt.PRESENTED_IMAGE_SIMPLE,children:c.jsx(Re,{icon:c.jsx(nr,{}),onClick:()=>s(!0),type:"primary",children:"Add presentation"})})}),c.jsx(bn,{okButtonProps:{disabled:!d.trim()},okText:"Create presentation",onCancel:()=>{s(!1),f("")},onOk:p,open:l,title:"New presentation",children:c.jsxs("label",{className:"presentation-create-field",children:[c.jsx("span",{children:"Presentation title"}),c.jsx($t,{autoFocus:!0,onChange:g=>f(g.target.value),onPressEnter:()=>{d.trim()&&p()},placeholder:"e.g. Q3 product strategy",value:d})]})})]})}function $0e(){const[e,t]=i.useState(()=>Ki(ws)),[n,r]=i.useState(Date.now()),[a,o]=i.useState(!!document.fullscreenElement),l=i.useRef(null);i.useEffect(()=>{Sm.get().then(g=>{g.activePlan&&t(Ki(g.activePlan))}).catch(()=>{});const p="BroadcastChannel"in window?new BroadcastChannel(UP):null;return p&&(p.onmessage=g=>t(Ki(g.data))),()=>{p==null||p.close()}},[]),i.useEffect(()=>{const p=window.setInterval(()=>r(Date.now()),1e3);return()=>window.clearInterval(p)},[]),i.useEffect(()=>{const p=()=>o(!!document.fullscreenElement);return document.addEventListener("fullscreenchange",p),()=>document.removeEventListener("fullscreenchange",p)},[]);const s=e.sections[e.activeIndex],d=R2(e),f=k2(e,n),h=async()=>{var p,g,v;try{document.fullscreenElement?await((p=document.exitFullscreen)==null?void 0:p.call(document)):await((v=(g=l.current)==null?void 0:g.requestFullscreen)==null?void 0:v.call(g))}catch{}};return c.jsxs("main",{className:`presentation-audience is-${e.audienceTheme} ${a?"is-fullscreen":""}`,ref:l,children:[c.jsx("div",{className:"presentation-audience-orb audience-orb-one"}),c.jsx("div",{className:"presentation-audience-orb audience-orb-two"}),c.jsxs("header",{className:"presentation-audience-header",children:[e.showAudienceLogo?c.jsxs("div",{className:"presentation-audience-brand",children:[c.jsx("span",{children:"✦"}),c.jsx("strong",{children:"DevBuddy"}),c.jsx("i",{}),c.jsx("span",{children:"Presentation"})]}):c.jsxs("div",{className:"presentation-audience-section-label",children:["SECTION ",String(e.activeIndex+1).padStart(2,"0")]}),c.jsxs("div",{className:"presentation-audience-status",children:[c.jsxs("span",{className:e.timer.running?"is-live":"",children:[c.jsx("i",{})," ",e.timer.running?"LIVE":"PAUSED"]}),c.jsx("strong",{children:Qg(f)}),c.jsx(Re,{"aria-label":a?"Exit full screen":"Enter full screen",icon:a?c.jsx(OP,{}):c.jsx(kP,{}),onClick:h,shape:"circle",type:"text"})]})]}),c.jsxs("section",{className:"presentation-audience-stage",children:[(e.showAudienceLogo||e.showTimeBoxes)&&c.jsxs("div",{className:"presentation-audience-kicker",children:[e.showAudienceLogo&&c.jsxs("span",{children:["SECTION ",String(e.activeIndex+1).padStart(2,"0")]}),e.showAudienceLogo&&e.showTimeBoxes&&c.jsx("i",{}),e.showTimeBoxes&&c.jsxs("span",{children:[s.duration," MIN"]})]}),c.jsx("h1",{children:s.title}),c.jsx(b0e,{source:s.summary})]}),c.jsx("section",{className:"presentation-audience-footer",children:c.jsxs("div",{className:"presentation-audience-plan",children:[c.jsxs("div",{className:"presentation-audience-plan-heading",children:[c.jsxs("div",{children:[c.jsx("span",{children:e.title}),c.jsx("small",{children:[e.subtitle,e.presenter,qP(e.plannedDate)].filter(Boolean).join(" · ")})]}),c.jsxs("strong",{children:[d,"%"]})]}),c.jsx("div",{className:"presentation-audience-progress",children:c.jsx("i",{style:{width:`${d}%`}})}),c.jsx("div",{className:"presentation-audience-outline",children:e.sections.map((p,g)=>c.jsxs("div",{className:`${g===e.activeIndex?"is-active":""} ${g<e.activeIndex?"is-complete":""}`,children:[c.jsx("span",{children:g<e.activeIndex?c.jsx(Ii,{}):String(g+1).padStart(2,"0")}),c.jsx("strong",{children:p.title})]},p.id))})]})})]})}const{Text:Nx,Title:Fwe}=wn,E0e=`{
565
+ What should the audience take away?`,rows:18,value:g})]}),c.jsxs("section",{className:"presentation-brief",children:[c.jsxs("div",{className:"presentation-brief-main",children:[c.jsxs("div",{className:"presentation-brief-fields",children:[c.jsxs("label",{children:[c.jsx("span",{children:"Presentation title"}),c.jsx($t,{onChange:V=>k({title:V.target.value}),value:a.title})]}),c.jsxs("label",{children:[c.jsx("span",{children:"Subtitle / promise"}),c.jsx($t,{onChange:V=>k({subtitle:V.target.value}),value:a.subtitle})]}),c.jsxs("label",{children:[c.jsx("span",{children:"Presenter"}),c.jsx($t,{onChange:V=>k({presenter:V.target.value}),value:a.presenter})]}),c.jsxs("label",{children:[c.jsx("span",{children:"Planned date"}),c.jsx(eu,{allowClear:!0,format:"MMM D, YYYY",onChange:V=>k({plannedDate:V?V.format("YYYY-MM-DD"):""}),value:a.plannedDate?Ca(a.plannedDate):null})]})]}),c.jsxs("div",{className:"presentation-brief-options",children:[c.jsxs("div",{className:"presentation-display-option presentation-theme-option",children:[c.jsxs("span",{children:[c.jsx("strong",{children:"Audience theme"}),c.jsx("small",{children:"Audience view appearance"})]}),c.jsx($h,{onChange:V=>k({audienceTheme:V}),options:[{label:"Light",value:"light"},{label:"Dark",value:"dark"}],size:"small",value:a.audienceTheme})]}),c.jsxs("label",{className:"presentation-display-option",children:[c.jsxs("span",{children:[c.jsx("strong",{children:"Show time boxes"}),c.jsx("small",{children:"Audience view · all sections"})]}),c.jsx(ki,{"aria-label":"Show time boxes for all sections in the audience view",checked:a.showTimeBoxes,onChange:V=>k({showTimeBoxes:V}),size:"small"})]}),c.jsxs("label",{className:"presentation-display-option",children:[c.jsxs("span",{children:[c.jsx("strong",{children:"Show DevBuddy logo"}),c.jsx("small",{children:"Audience view header"})]}),c.jsx(ki,{"aria-label":"Show DevBuddy logo in the audience view",checked:a.showAudienceLogo,onChange:V=>k({showAudienceLogo:V}),size:"small"})]})]})]}),c.jsx("div",{className:"presentation-brief-side",children:c.jsxs("div",{className:"presentation-brief-stats",children:[c.jsxs("div",{children:[c.jsx("strong",{children:a.sections.length}),c.jsx("span",{children:"sections"})]}),c.jsxs("div",{children:[c.jsx("strong",{children:S}),c.jsx("span",{children:"minutes"})]}),c.jsxs("div",{children:[c.jsxs("strong",{children:[$,"%"]}),c.jsx("span",{children:"progress"})]})]})})]}),c.jsxs("div",{className:"presentation-progress-strip",children:[c.jsxs("div",{children:[c.jsx("span",{children:"Current section"}),c.jsx("strong",{children:x.title})]}),c.jsx(Nh,{percent:$,showInfo:!1}),c.jsxs(ys,{children:[a.activeIndex+1," of ",a.sections.length]})]}),c.jsxs("div",{className:"presentation-workspace",children:[c.jsx(y0e,{onAdd:N,onDelete:j,onMove:R,onSelect:V=>k({activeIndex:V}),plan:a}),c.jsx(x0e,{index:a.activeIndex,onChange:O,section:x,total:a.sections.length}),c.jsx(C0e,{now:l,onAddNote:A,onNext:()=>P(1),onPrevious:()=>P(-1),onResetTimer:M,onToggleTimer:I,plan:a})]})]})}function w0e(){const{message:e}=Br.useApp(),[t,n]=i.useState(BO),r=i.useRef(!1),[a,o]=i.useState(null),[l,s]=i.useState(!1),[d,f]=i.useState("");i.useEffect(()=>{let g=!1;return(async()=>{try{const y=await Sm.get();if(g)return;if(Array.isArray(y.plans)&&y.plans.length>0)n(y.plans.map(Ki));else{const C=BO();n(C),await Sm.save(C)}r.current=!0}catch{r.current=!0}})(),()=>{g=!0}},[]),i.useEffect(()=>{r.current&&Sm.save(t)},[t]);const h=t.find(g=>g.id===a);if(h)return c.jsx(S0e,{initialPlan:h,onBack:()=>o(null),onPlanChange:g=>{n(v=>v.map(y=>y.id===g.id?g:y))}},h.id);const p=()=>{const g=v0e(d);n(v=>[g,...v]),f(""),s(!1),o(g.id)};return c.jsxs("div",{className:"presentation-page presentation-library-page",children:[c.jsx(Xr,{actions:c.jsx(Re,{icon:c.jsx(nr,{}),onClick:()=>s(!0),type:"primary",children:"Add presentation"}),className:"presentation-header presentation-library-header",copyClassName:"presentation-header-copy",description:"Plan the story, prepare your speaker console, and keep every presentation ready to run.",title:"Presentations"}),t.length>0?c.jsx("div",{className:"presentation-library-grid",children:t.map(g=>{const v=g.sections.reduce((C,x)=>C+x.duration,0),y=R2(g);return c.jsxs("div",{className:"presentation-library-item-wrapper",children:[c.jsxs("button",{className:"presentation-library-item",onClick:()=>o(g.id),type:"button",children:[c.jsx("span",{className:"presentation-library-icon",children:c.jsx(Pi,{})}),c.jsxs("span",{className:"presentation-library-item-copy",children:[c.jsx("span",{className:"presentation-library-item-topline",children:c.jsx("strong",{children:g.title})}),c.jsx("span",{className:"presentation-library-subtitle",children:g.subtitle||"No subtitle yet"})]}),c.jsxs("span",{className:"presentation-library-progress",children:[c.jsx("i",{children:c.jsx("b",{style:{width:`${y}%`}})}),c.jsxs("em",{children:[y,"%"]})]}),c.jsxs("span",{className:"presentation-library-meta",children:[c.jsxs("span",{children:[g.sections.length," sections"]}),c.jsxs("span",{children:[v," min"]}),g.plannedDate&&c.jsx("span",{children:qP(g.plannedDate)}),c.jsxs("span",{children:["Updated ",new Date(g.updatedAt||Date.now()).toLocaleDateString()]})]})]}),c.jsx(la,{cancelText:"Cancel",description:"This presentation and its quick captures will be permanently removed.",okButtonProps:{danger:!0},okText:"Delete",onConfirm:()=>{n(C=>C.filter(x=>x.id!==g.id)),e.success("Presentation deleted.")},title:`Delete “${g.title||"Untitled presentation"}”?`,children:c.jsx(Re,{"aria-label":`Delete ${g.title||"presentation"}`,className:"presentation-library-delete",danger:!0,icon:c.jsx(Yn,{}),size:"small",type:"text"})})]},g.id)})}):c.jsx(Pt,{className:"presentation-library-empty",children:c.jsx(qt,{description:"No presentations yet",image:qt.PRESENTED_IMAGE_SIMPLE,children:c.jsx(Re,{icon:c.jsx(nr,{}),onClick:()=>s(!0),type:"primary",children:"Add presentation"})})}),c.jsx(bn,{okButtonProps:{disabled:!d.trim()},okText:"Create presentation",onCancel:()=>{s(!1),f("")},onOk:p,open:l,title:"New presentation",children:c.jsxs("label",{className:"presentation-create-field",children:[c.jsx("span",{children:"Presentation title"}),c.jsx($t,{autoFocus:!0,onChange:g=>f(g.target.value),onPressEnter:()=>{d.trim()&&p()},placeholder:"e.g. Q3 product strategy",value:d})]})})]})}function $0e(){const[e,t]=i.useState(()=>Ki(ws)),[n,r]=i.useState(Date.now()),[a,o]=i.useState(!!document.fullscreenElement),l=i.useRef(null);i.useEffect(()=>{Sm.get().then(g=>{g.activePlan&&t(Ki(g.activePlan))}).catch(()=>{});const p="BroadcastChannel"in window?new BroadcastChannel(UP):null;return p&&(p.onmessage=g=>t(Ki(g.data))),()=>{p==null||p.close()}},[]),i.useEffect(()=>{const p=window.setInterval(()=>r(Date.now()),1e3);return()=>window.clearInterval(p)},[]),i.useEffect(()=>{const p=()=>o(!!document.fullscreenElement);return document.addEventListener("fullscreenchange",p),()=>document.removeEventListener("fullscreenchange",p)},[]);const s=e.sections[e.activeIndex],d=R2(e),f=k2(e,n),h=async()=>{var p,g,v;try{document.fullscreenElement?await((p=document.exitFullscreen)==null?void 0:p.call(document)):await((v=(g=l.current)==null?void 0:g.requestFullscreen)==null?void 0:v.call(g))}catch{}};return c.jsxs("main",{className:`presentation-audience is-${e.audienceTheme} ${a?"is-fullscreen":""}`,ref:l,children:[c.jsx("div",{className:"presentation-audience-orb audience-orb-one"}),c.jsx("div",{className:"presentation-audience-orb audience-orb-two"}),c.jsxs("header",{className:"presentation-audience-header",children:[e.showAudienceLogo?c.jsxs("div",{className:"presentation-audience-brand",children:[c.jsx("span",{children:"✦"}),c.jsx("strong",{children:"DevBuddy"}),c.jsx("i",{}),c.jsx("span",{children:"Presentation"})]}):c.jsxs("div",{className:"presentation-audience-section-label",children:["SECTION ",String(e.activeIndex+1).padStart(2,"0")]}),c.jsxs("div",{className:"presentation-audience-status",children:[c.jsxs("span",{className:e.timer.running?"is-live":"",children:[c.jsx("i",{})," ",e.timer.running?"LIVE":"PAUSED"]}),c.jsx("strong",{children:Qg(f)}),c.jsx(Re,{"aria-label":a?"Exit full screen":"Enter full screen",icon:a?c.jsx(OP,{}):c.jsx(kP,{}),onClick:h,shape:"circle",type:"text"})]})]}),c.jsxs("section",{className:"presentation-audience-stage",children:[(e.showAudienceLogo||e.showTimeBoxes)&&c.jsxs("div",{className:"presentation-audience-kicker",children:[e.showAudienceLogo&&c.jsxs("span",{children:["SECTION ",String(e.activeIndex+1).padStart(2,"0")]}),e.showAudienceLogo&&e.showTimeBoxes&&c.jsx("i",{}),e.showTimeBoxes&&c.jsxs("span",{children:[s.duration," MIN"]})]}),c.jsx("h1",{children:s.title}),c.jsx(b0e,{source:s.summary})]}),c.jsx("section",{className:"presentation-audience-footer",children:c.jsxs("div",{className:"presentation-audience-plan",children:[c.jsxs("div",{className:"presentation-audience-plan-heading",children:[c.jsxs("div",{children:[c.jsx("span",{children:e.title}),c.jsx("small",{children:[e.subtitle,e.presenter,qP(e.plannedDate)].filter(Boolean).join(" · ")})]}),c.jsxs("strong",{children:[d,"%"]})]}),c.jsx("div",{className:"presentation-audience-progress",children:c.jsx("i",{style:{width:`${d}%`}})}),c.jsx("div",{className:"presentation-audience-outline",children:e.sections.map((p,g)=>c.jsxs("div",{className:`${g===e.activeIndex?"is-active":""} ${g<e.activeIndex?"is-complete":""}`,children:[c.jsx("span",{children:g<e.activeIndex?c.jsx(Ii,{}):String(g+1).padStart(2,"0")}),c.jsx("strong",{children:p.title})]},p.id))})]})})]})}const{Text:Nx,Title:Wwe}=wn,E0e=`{
566
566
  "user": {
567
567
  "id": 42,
568
568
  "name": "Ada Lovelace",
@@ -609,14 +609,14 @@ ${f.join(`
609
609
  `))+1))}const l="#".repeat(a),s=n.enter("headingAtx"),d=n.enter("phrasing");o.move(l+" ");let f=n.containerPhrasing(e,{before:"# ",after:`
610
610
  `,...o.current()});return/^[\t ]/.test(f)&&(f=nh(f.charCodeAt(0))+f.slice(1)),f=f?l+" "+f:l,n.options.closeAtx&&(f+=" "+l),d(),s(),f}DD.peek=qCe;function DD(e){return e.value||""}function qCe(){return"<"}zD.peek=KCe;function zD(e,t,n,r){const a=q2(n),o=a==='"'?"Quote":"Apostrophe",l=n.enter("image");let s=n.enter("label");const d=n.createTracker(r);let f=d.move("![");return f+=d.move(n.safe(e.alt,{before:f,after:"]",...d.current()})),f+=d.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,{before:f,after:">",...d.current()})),f+=d.move(">")):(s=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,{before:f,after:e.title?" ":")",...d.current()}))),s(),e.title&&(s=n.enter(`title${o}`),f+=d.move(" "+a),f+=d.move(n.safe(e.title,{before:f,after:a,...d.current()})),f+=d.move(a),s()),f+=d.move(")"),l(),f}function KCe(){return"!"}AD.peek=GCe;function AD(e,t,n,r){const a=e.referenceType,o=n.enter("imageReference");let l=n.enter("label");const s=n.createTracker(r);let d=s.move("![");const f=n.safe(e.alt,{before:d,after:"]",...s.current()});d+=s.move(f+"]["),l();const h=n.stack;n.stack=[],l=n.enter("reference");const p=n.safe(n.associationId(e),{before:d,after:"]",...s.current()});return l(),n.stack=h,o(),a==="full"||!f||f!==p?d+=s.move(p+"]"):a==="shortcut"?d=d.slice(0,-1):d+=s.move("]"),d}function GCe(){return"!"}LD.peek=XCe;function LD(e,t,n){let r=e.value||"",a="`",o=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(r);)a+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const l=n.unsafe[o],s=n.compilePattern(l);let d;if(l.atBreak)for(;d=s.exec(r);){let f=d.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(d.index+1)}}return a+r+a}function XCe(){return"`"}function _D(e,t){const n=A2(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}BD.peek=YCe;function BD(e,t,n,r){const a=q2(n),o=a==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let s,d;if(_D(e,n)){const h=n.stack;n.stack=[],s=n.enter("autolink");let p=l.move("<");return p+=l.move(n.containerPhrasing(e,{before:p,after:">",...l.current()})),p+=l.move(">"),s(),n.stack=h,p}s=n.enter("link"),d=n.enter("label");let f=l.move("[");return f+=l.move(n.containerPhrasing(e,{before:f,after:"](",...l.current()})),f+=l.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),f+=l.move("<"),f+=l.move(n.safe(e.url,{before:f,after:">",...l.current()})),f+=l.move(">")):(d=n.enter("destinationRaw"),f+=l.move(n.safe(e.url,{before:f,after:e.title?" ":")",...l.current()}))),d(),e.title&&(d=n.enter(`title${o}`),f+=l.move(" "+a),f+=l.move(n.safe(e.title,{before:f,after:a,...l.current()})),f+=l.move(a),d()),f+=l.move(")"),s(),f}function YCe(e,t,n){return _D(e,n)?"<":"["}FD.peek=JCe;function FD(e,t,n,r){const a=e.referenceType,o=n.enter("linkReference");let l=n.enter("label");const s=n.createTracker(r);let d=s.move("[");const f=n.containerPhrasing(e,{before:d,after:"]",...s.current()});d+=s.move(f+"]["),l();const h=n.stack;n.stack=[],l=n.enter("reference");const p=n.safe(n.associationId(e),{before:d,after:"]",...s.current()});return l(),n.stack=h,o(),a==="full"||!f||f!==p?d+=s.move(p+"]"):a==="shortcut"?d=d.slice(0,-1):d+=s.move("]"),d}function JCe(){return"["}function K2(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function QCe(e){const t=K2(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function ZCe(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function HD(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function eSe(e,t,n,r){const a=n.enter("list"),o=n.bulletCurrent;let l=e.ordered?ZCe(n):K2(n);const s=e.ordered?l==="."?")":".":QCe(n);let d=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&h&&(!h.children||!h.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(d=!0),HD(n)===l&&h){let p=-1;for(;++p<e.children.length;){const g=e.children[p];if(g&&g.type==="listItem"&&g.children&&g.children[0]&&g.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(l=s),n.bulletCurrent=l;const f=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=o,a(),f}function tSe(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function nSe(e,t,n,r){const a=tSe(n);let o=n.bulletCurrent||K2(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let l=o.length+1;(a==="tab"||a==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const s=n.createTracker(r);s.move(o+" ".repeat(l-o.length)),s.shift(l);const d=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,s.current()),h);return d(),f;function h(p,g,v){return g?(v?"":" ".repeat(l))+p:(v?o:o+" ".repeat(l-o.length))+p}}function rSe(e,t,n,r){const a=n.enter("paragraph"),o=n.enter("phrasing"),l=n.containerPhrasing(e,r);return o(),a(),l}const aSe=V0(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function oSe(e,t,n,r){return(e.children.some(function(l){return aSe(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function iSe(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}VD.peek=lSe;function VD(e,t,n,r){const a=iSe(n),o=n.enter("strong"),l=n.createTracker(r),s=l.move(a+a);let d=l.move(n.containerPhrasing(e,{after:a,before:s,...l.current()}));const f=d.charCodeAt(0),h=Tv(r.before.charCodeAt(r.before.length-1),f,a);h.inside&&(d=nh(f)+d.slice(1));const p=d.charCodeAt(d.length-1),g=Tv(r.after.charCodeAt(0),p,a);g.inside&&(d=d.slice(0,-1)+nh(p));const v=l.move(a+a);return o(),n.attentionEncodeSurroundingInfo={after:g.outside,before:h.outside},s+d+v}function lSe(e,t,n){return n.options.strong||"*"}function sSe(e,t,n,r){return n.safe(e.value,r)}function cSe(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function uSe(e,t,n){const r=(HD(n)+(n.options.ruleSpaces?" ":"")).repeat(cSe(n));return n.options.ruleSpaces?r.slice(0,-1):r}const WD={blockquote:TCe,break:Ok,code:_Ce,definition:FCe,emphasis:PD,hardBreak:Ok,heading:UCe,html:DD,image:zD,imageReference:AD,inlineCode:LD,link:BD,linkReference:FD,list:eSe,listItem:nSe,paragraph:rSe,root:oSe,strong:VD,text:sSe,thematicBreak:uSe};function dSe(){return{enter:{table:fSe,tableData:kk,tableHeader:kk,tableRow:hSe},exit:{codeText:pSe,table:mSe,tableData:Ux,tableHeader:Ux,tableRow:Ux}}}function fSe(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function mSe(e){this.exit(e),this.data.inTable=void 0}function hSe(e){this.enter({type:"tableRow",children:[]},e)}function Ux(e){this.exit(e)}function kk(e){this.enter({type:"tableCell",children:[]},e)}function pSe(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,gSe));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function gSe(e,t){return t==="|"?t:e}function vSe(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,a=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
611
611
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:g,table:l,tableCell:d,tableRow:s}};function l(v,y,C,x){return f(h(v,C,x),v.align)}function s(v,y,C,x){const S=p(v,C,x),$=f([S]);return $.slice(0,$.indexOf(`
612
- `))}function d(v,y,C,x){const S=C.enter("tableCell"),$=C.enter("phrasing"),E=C.containerPhrasing(v,{...x,before:o,after:o});return $(),S(),E}function f(v,y){return ICe(v,{align:y,alignDelimiters:r,padding:n,stringLength:a})}function h(v,y,C){const x=v.children;let S=-1;const $=[],E=y.enter("table");for(;++S<x.length;)$[S]=p(x[S],y,C);return E(),$}function p(v,y,C){const x=v.children;let S=-1;const $=[],E=y.enter("tableRow");for(;++S<x.length;)$[S]=d(x[S],v,y,C);return E(),$}function g(v,y,C){let x=WD.inlineCode(v,y,C);return C.stack.includes("tableCell")&&(x=x.replace(/\|/g,"\\$&")),x}}function bSe(){return{exit:{taskListCheckValueChecked:Rk,taskListCheckValueUnchecked:Rk,paragraph:xSe}}}function ySe(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:CSe}}}function Rk(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function xSe(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const a=t.children;let o=-1,l;for(;++o<a.length;){const s=a[o];if(s.type==="paragraph"){l=s;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function CSe(e,t,n,r){const a=e.children[0],o=typeof e.checked=="boolean"&&a&&a.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);o&&s.move(l);let d=WD.listItem(e,t,n,{...r,...s.current()});return o&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(h){return h+l}}function SSe(){return[eCe(),CCe(),ECe(),dSe(),bSe()]}function wSe(e){return{extensions:[tCe(),SCe(e),jCe(),vSe(e),ySe()]}}const $Se={tokenize:RSe,partial:!0},UD={tokenize:ISe,partial:!0},qD={tokenize:MSe,partial:!0},KD={tokenize:TSe,partial:!0},ESe={tokenize:PSe,partial:!0},GD={name:"wwwAutolink",tokenize:OSe,previous:YD},XD={name:"protocolAutolink",tokenize:kSe,previous:JD},Il={name:"emailAutolink",tokenize:NSe,previous:QD},Zi={};function jSe(){return{text:Zi}}let fc=48;for(;fc<123;)Zi[fc]=Il,fc++,fc===58?fc=65:fc===91&&(fc=97);Zi[43]=Il;Zi[45]=Il;Zi[46]=Il;Zi[95]=Il;Zi[72]=[Il,XD];Zi[104]=[Il,XD];Zi[87]=[Il,GD];Zi[119]=[Il,GD];function NSe(e,t,n){const r=this;let a,o;return l;function l(p){return!HS(p)||!QD.call(r,r.previous)||G2(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(p))}function s(p){return HS(p)?(e.consume(p),s):p===64?(e.consume(p),d):n(p)}function d(p){return p===46?e.check(ESe,h,f)(p):p===45||p===95||Ua(p)?(o=!0,e.consume(p),d):h(p)}function f(p){return e.consume(p),a=!0,d}function h(p){return o&&a&&Za(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function OSe(e,t,n){const r=this;return a;function a(l){return l!==87&&l!==119||!YD.call(r,r.previous)||G2(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check($Se,e.attempt(UD,e.attempt(qD,o),n),n)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function kSe(e,t,n){const r=this;let a="",o=!1;return l;function l(p){return(p===72||p===104)&&JD.call(r,r.previous)&&!G2(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(p),e.consume(p),s):n(p)}function s(p){if(Za(p)&&a.length<5)return a+=String.fromCodePoint(p),e.consume(p),s;if(p===58){const g=a.toLowerCase();if(g==="http"||g==="https")return e.consume(p),d}return n(p)}function d(p){return p===47?(e.consume(p),o?f:(o=!0,d)):n(p)}function f(p){return p===null||Rv(p)||Ir(p)||Wc(p)||B0(p)?n(p):e.attempt(UD,e.attempt(qD,h),n)(p)}function h(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function RSe(e,t,n){let r=0;return a;function a(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),a):l===46&&r===3?(e.consume(l),o):n(l)}function o(l){return l===null?n(l):t(l)}}function ISe(e,t,n){let r,a,o;return l;function l(f){return f===46||f===95?e.check(KD,d,s)(f):f===null||Ir(f)||Wc(f)||f!==45&&B0(f)?d(f):(o=!0,e.consume(f),l)}function s(f){return f===95?r=!0:(a=r,r=void 0),e.consume(f),l}function d(f){return a||r||!o?n(f):t(f)}}function MSe(e,t){let n=0,r=0;return a;function a(l){return l===40?(n++,e.consume(l),a):l===41&&r<n?o(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(KD,t,o)(l):l===null||Ir(l)||Wc(l)?t(l):(e.consume(l),a)}function o(l){return l===41&&r++,e.consume(l),a}}function TSe(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),o):s===93?(e.consume(s),a):s===60||s===null||Ir(s)||Wc(s)?t(s):n(s)}function a(s){return s===null||s===40||s===91||Ir(s)||Wc(s)?t(s):r(s)}function o(s){return Za(s)?l(s):n(s)}function l(s){return s===59?(e.consume(s),r):Za(s)?(e.consume(s),l):n(s)}}function PSe(e,t,n){return r;function r(o){return e.consume(o),a}function a(o){return Ua(o)?n(o):t(o)}}function YD(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ir(e)}function JD(e){return!Za(e)}function QD(e){return!(e===47||HS(e))}function HS(e){return e===43||e===45||e===46||e===95||Ua(e)}function G2(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const DSe={tokenize:VSe,partial:!0};function zSe(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:BSe,continuation:{tokenize:FSe},exit:HSe}},text:{91:{name:"gfmFootnoteCall",tokenize:_Se},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:ASe,resolveTo:LSe}}}}function ASe(e,t,n){const r=this;let a=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;a--;){const d=r.events[a][1];if(d.type==="labelImage"){l=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return s;function s(d){if(!l||!l._balanced)return n(d);const f=$i(r.sliceSerialize({start:l.end,end:r.now()}));return f.codePointAt(0)!==94||!o.includes(f.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function LSe(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function _Se(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return s;function s(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),d}function d(p){return p!==94?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(p){if(o>999||p===93&&!l||p===null||p===91||Ir(p))return n(p);if(p===93){e.exit("chunkString");const g=e.exit("gfmFootnoteCallString");return a.includes($i(r.sliceSerialize(g)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return Ir(p)||(l=!0),o++,e.consume(p),p===92?h:f}function h(p){return p===91||p===92||p===93?(e.consume(p),o++,f):f(p)}}function BSe(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,s;return d;function d(y){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(y){return y===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(y)}function h(y){if(l>999||y===93&&!s||y===null||y===91||Ir(y))return n(y);if(y===93){e.exit("chunkString");const C=e.exit("gfmFootnoteDefinitionLabelString");return o=$i(r.sliceSerialize(C)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),g}return Ir(y)||(s=!0),l++,e.consume(y),y===92?p:h}function p(y){return y===91||y===92||y===93?(e.consume(y),l++,h):h(y)}function g(y){return y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),a.includes(o)||a.push(o),er(e,v,"gfmFootnoteDefinitionWhitespace")):n(y)}function v(y){return t(y)}}function FSe(e,t,n){return e.check(Mh,t,e.attempt(DSe,t,n))}function HSe(e){e.exit("gfmFootnoteDefinition")}function VSe(e,t,n){const r=this;return er(e,a,"gfmFootnoteDefinitionIndent",5);function a(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(o):n(o)}}function WSe(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:a};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function a(l,s){let d=-1;for(;++d<l.length;)if(l[d][0]==="enter"&&l[d][1].type==="strikethroughSequenceTemporary"&&l[d][1]._close){let f=d;for(;f--;)if(l[f][0]==="exit"&&l[f][1].type==="strikethroughSequenceTemporary"&&l[f][1]._open&&l[d][1].end.offset-l[d][1].start.offset===l[f][1].end.offset-l[f][1].start.offset){l[d][1].type="strikethroughSequence",l[f][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},l[f][1].start),end:Object.assign({},l[d][1].end)},p={type:"strikethroughText",start:Object.assign({},l[f][1].end),end:Object.assign({},l[d][1].start)},g=[["enter",h,s],["enter",l[f][1],s],["exit",l[f][1],s],["enter",p,s]],v=s.parser.constructs.insideSpan.null;v&&_o(g,g.length,0,F0(v,l.slice(f+1,d),s)),_o(g,g.length,0,[["exit",p,s],["enter",l[d][1],s],["exit",l[d][1],s],["exit",h,s]]),_o(l,f-1,d-f+3,g),d=f+g.length-2;break}}for(d=-1;++d<l.length;)l[d][1].type==="strikethroughSequenceTemporary"&&(l[d][1].type="data");return l}function o(l,s,d){const f=this.previous,h=this.events;let p=0;return g;function g(y){return f===126&&h[h.length-1][1].type!=="characterEscape"?d(y):(l.enter("strikethroughSequenceTemporary"),v(y))}function v(y){const C=Nd(f);if(y===126)return p>1?d(y):(l.consume(y),p++,v);if(p<2&&!n)return d(y);const x=l.exit("strikethroughSequenceTemporary"),S=Nd(y);return x._open=!S||S===2&&!!C,x._close=!C||C===2&&!!S,s(y)}}}class USe{constructor(){this.map=[],this.index=new Map}add(t,n,r){qSe(this,t,n,r)}consume(t){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let a=r.pop();for(;a;){for(const o of a)t.push(o);a=r.pop()}this.map.length=0,this.index.clear()}}function qSe(e,t,n,r){if(n===0&&r.length===0)return;const a=e.index.get(t);if(a){a[1]+=n,a[2].push(...r);return}const o=[t,n,r];e.map.push(o),e.index.set(t,o)}function KSe(e,t){let n=!1;const r=[];for(;t<e.length;){const a=e[t];if(n){if(a[0]==="enter")a[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(a[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(a[1].type==="tableDelimiterRow")break}else a[0]==="enter"&&a[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function GSe(){return{flow:{null:{name:"table",tokenize:XSe,resolveAll:YSe}}}}function XSe(e,t,n){const r=this;let a=0,o=0,l;return s;function s(M){let P=r.events.length-1;for(;P>-1;){const{type:T}=r.events[P][1];if(T==="lineEnding"||T==="linePrefix")P--;else break}const A=P>-1?r.events[P][1].type:null,H=A==="tableHead"||A==="tableRow"?N:d;return H===N&&r.parser.lazy[r.now().line]?n(M):H(M)}function d(M){return e.enter("tableHead"),e.enter("tableRow"),f(M)}function f(M){return M===124||(l=!0,o+=1),h(M)}function h(M){return M===null?n(M):hn(M)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),v):n(M):Fn(M)?er(e,h,"whitespace")(M):(o+=1,l&&(l=!1,a+=1),M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),l=!0,h):(e.enter("data"),p(M)))}function p(M){return M===null||M===124||Ir(M)?(e.exit("data"),h(M)):(e.consume(M),M===92?g:p)}function g(M){return M===92||M===124?(e.consume(M),p):p(M)}function v(M){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(M):(e.enter("tableDelimiterRow"),l=!1,Fn(M)?er(e,y,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):y(M))}function y(M){return M===45||M===58?x(M):M===124?(l=!0,e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),C):O(M)}function C(M){return Fn(M)?er(e,x,"whitespace")(M):x(M)}function x(M){return M===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),S):M===45?(o+=1,S(M)):M===null||hn(M)?k(M):O(M)}function S(M){return M===45?(e.enter("tableDelimiterFiller"),$(M)):O(M)}function $(M){return M===45?(e.consume(M),$):M===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),E):(e.exit("tableDelimiterFiller"),E(M))}function E(M){return Fn(M)?er(e,k,"whitespace")(M):k(M)}function k(M){return M===124?y(M):M===null||hn(M)?!l||a!==o?O(M):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(M)):O(M)}function O(M){return n(M)}function N(M){return e.enter("tableRow"),R(M)}function R(M){return M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),R):M===null||hn(M)?(e.exit("tableRow"),t(M)):Fn(M)?er(e,R,"whitespace")(M):(e.enter("data"),j(M))}function j(M){return M===null||M===124||Ir(M)?(e.exit("data"),R(M)):(e.consume(M),M===92?I:j)}function I(M){return M===92||M===124?(e.consume(M),j):j(M)}}function YSe(e,t){let n=-1,r=!0,a=0,o=[0,0,0,0],l=[0,0,0,0],s=!1,d=0,f,h,p;const g=new USe;for(;++n<e.length;){const v=e[n],y=v[1];v[0]==="enter"?y.type==="tableHead"?(s=!1,d!==0&&(Ik(g,t,d,f,h),h=void 0,d=0),f={type:"table",start:Object.assign({},y.start),end:Object.assign({},y.end)},g.add(n,0,[["enter",f,t]])):y.type==="tableRow"||y.type==="tableDelimiterRow"?(r=!0,p=void 0,o=[0,0,0,0],l=[0,n+1,0,0],s&&(s=!1,h={type:"tableBody",start:Object.assign({},y.start),end:Object.assign({},y.end)},g.add(n,0,[["enter",h,t]])),a=y.type==="tableDelimiterRow"?2:h?3:1):a&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],p=wg(g,t,o,a,void 0,p),o=[0,0,0,0]),l[2]=n)):y.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],p=wg(g,t,o,a,void 0,p)),o=l,l=[o[1],n,0,0])):y.type==="tableHead"?(s=!0,d=n):y.type==="tableRow"||y.type==="tableDelimiterRow"?(d=n,o[1]!==0?(l[0]=l[1],p=wg(g,t,o,a,n,p)):l[1]!==0&&(p=wg(g,t,l,a,n,p)),a=0):a&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")&&(l[3]=n)}for(d!==0&&Ik(g,t,d,f,h),g.consume(t.events),n=-1;++n<t.events.length;){const v=t.events[n];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=KSe(t.events,n))}return e}function wg(e,t,n,r,a,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(o.end=Object.assign({},Ju(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const d=Ju(t.events,n[1]);if(o={type:l,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const f=Ju(t.events,n[2]),h=Ju(t.events,n[3]),p={type:s,start:Object.assign({},f),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",p,t]]),r!==2){const g=t.events[n[2]],v=t.events[n[3]];if(g[1].end=Object.assign({},v[1].end),g[1].type="chunkText",g[1].contentType="text",n[3]>n[2]+1){const y=n[2]+1,C=n[3]-n[2]-1;e.add(y,C,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return a!==void 0&&(o.end=Object.assign({},Ju(t.events,a)),e.add(a,0,[["exit",o,t]]),o=void 0),o}function Ik(e,t,n,r,a){const o=[],l=Ju(t.events,n);a&&(a.end=Object.assign({},l),o.push(["exit",a,t])),r.end=Object.assign({},l),o.push(["exit",r,t]),e.add(n+1,0,o)}function Ju(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const JSe={name:"tasklistCheck",tokenize:ZSe};function QSe(){return{text:{91:JSe}}}function ZSe(e,t,n){const r=this;return a;function a(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),o)}function o(d){return Ir(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),l):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),l):n(d)}function l(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(d)}function s(d){return hn(d)?t(d):Fn(d)?e.check({tokenize:ewe},t,n)(d):n(d)}}function ewe(e,t,n){return er(e,r,"whitespace");function r(a){return a===null?n(a):t(a)}}function twe(e){return sD([jSe(),zSe(),WSe(e),GSe(),QSe()])}const nwe={};function rwe(e){const t=this,n=e||nwe,r=t.data(),a=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);a.push(twe(n)),o.push(SSe()),l.push(wSe(n))}const Mk=e=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(new Date(e)),awe=e=>{if(!e)return"0 B";const t=["B","KB","MB"],n=Math.min(Math.floor(Math.log(e)/Math.log(1024)),t.length-1);return`${(e/1024**n).toFixed(n?1:0)} ${t[n]}`},mc="__new_memo__",rm=e=>JSON.stringify({title:e.title||"",content:e.content||"",tags:e.tags||[]});function owe({content:e}){return c.jsx("div",{className:"markdown-body",children:c.jsx(Wxe,{remarkPlugins:[rwe],components:{a:({href:t,children:n,...r})=>c.jsx("a",{href:t,target:/^https?:\/\//i.test(t||"")?"_blank":void 0,rel:/^https?:\/\//i.test(t||"")?"noreferrer":void 0,...r,children:n}),img:({src:t,alt:n,...r})=>c.jsx("img",{src:t,alt:n||"",loading:"lazy",...r})},children:e||"*Nothing to preview yet*"})})}function iwe(){const{message:e}=Br.useApp(),[t,n]=i.useState([]),[r,a]=i.useState(null),[o,l]=i.useState({title:"",content:"",tags:[]}),[s,d]=i.useState(""),[f,h]=i.useState("all"),[p,g]=i.useState("preview"),[v,y]=i.useState(!0),[C,x]=i.useState(!1),[S,$]=i.useState(!1),[E,k]=i.useState([]),[O,N]=i.useState(!1),[R,j]=i.useState(!1),[I,M]=i.useState({}),[P,A]=i.useState(""),H=i.useRef(!1),T=i.useRef(null),L=i.useRef(null),D=i.useRef(null),F=i.useRef({start:0,end:0}),V=i.useRef(""),q=async()=>{try{const Z=await os.list();n(Z),Z[0]&&(a(Z[0].id),l(Z[0]),V.current=rm(Z[0]))}catch(Z){e.error(Z.message)}finally{y(!1)}},B=async(Z=!0)=>{Z&&N(!0);try{k(await os.listImages())}catch(he){e.error(he.message)}finally{Z&&N(!1)}},U=()=>{$(!0),B()},K=(Z,he)=>{const{naturalWidth:$e,naturalHeight:Ie}=he.currentTarget;!$e||!Ie||M(re=>{const ce=re[Z];return(ce==null?void 0:ce.width)===$e&&(ce==null?void 0:ce.height)===Ie?re:{...re,[Z]:{width:$e,height:Ie}}})};i.useEffect(()=>{const Z=E.filter(he=>!I[he.filename]).map(he=>{const $e=new window.Image;return $e.onload=()=>K(he.filename,{currentTarget:$e}),$e.src=he.url,$e});return()=>Z.forEach(he=>{he.onload=null})},[E,I]),i.useEffect(()=>{q()},[]),i.useEffect(()=>{const Z=he=>{(he.metaKey||he.ctrlKey)&&he.key==="s"&&(he.preventDefault(),le())};return window.addEventListener("keydown",Z),()=>window.removeEventListener("keydown",Z)});const _=i.useMemo(()=>[...new Set(t.flatMap(Z=>Z.tags||[]))],[t]),G=t.filter(Z=>{var he;return(f==="all"||((he=Z.tags)==null?void 0:he.includes(f)))&&(!s||`${Z.title} ${Z.content}`.toLowerCase().includes(s.toLowerCase()))}),X=Z=>{a(Z.id),l(Z),V.current=rm(Z)},Y=()=>{const Z={id:mc,title:"",content:"",tags:[],updatedAt:new Date().toISOString()};n(he=>[Z,...he.filter($e=>$e.id!==mc)]),a(mc),l(Z),V.current=rm(Z),g("edit"),requestAnimationFrame(()=>{var he;return(he=T.current)==null?void 0:he.focus()})};async function le(Z=!1){if(H.current)return;if(!o.title.trim()&&!o.content.trim()){Z||e.warning("Add some content first");return}H.current=!0;const he=Date.now();x(!0);try{const $e={...o,tags:o.tagsInput??o.tags},Ie=!r||r===mc,re=Ie?await os.create($e):await os.update(r,$e);n(ce=>Ie?[re,...ce.filter(ve=>ve.id!==mc)]:ce.map(ve=>ve.id===re.id?re:ve)),a(re.id),l(re),V.current=rm(re),Z||e.success("Memo saved")}catch($e){Z||e.error($e.message)}finally{await new Promise($e=>setTimeout($e,Math.max(0,500-(Date.now()-he)))),H.current=!1,x(!1)}}const oe=Z=>{F.current={start:Z.currentTarget.selectionStart,end:Z.currentTarget.selectionEnd}},ue=Z=>{var Ae,Be;const he=(Be=(Ae=L.current)==null?void 0:Ae.resizableTextArea)==null?void 0:Be.textArea,$e=o.content||"",Ie=he?{start:he.selectionStart,end:he.selectionEnd}:F.current,re=Math.max(0,Math.min(Ie.start,$e.length)),ce=Math.max(re,Math.min(Ie.end,$e.length)),ve=$e.slice(0,re),be=$e.slice(ce),Ce=ve&&!ve.endsWith(`
612
+ `))}function d(v,y,C,x){const S=C.enter("tableCell"),$=C.enter("phrasing"),E=C.containerPhrasing(v,{...x,before:o,after:o});return $(),S(),E}function f(v,y){return ICe(v,{align:y,alignDelimiters:r,padding:n,stringLength:a})}function h(v,y,C){const x=v.children;let S=-1;const $=[],E=y.enter("table");for(;++S<x.length;)$[S]=p(x[S],y,C);return E(),$}function p(v,y,C){const x=v.children;let S=-1;const $=[],E=y.enter("tableRow");for(;++S<x.length;)$[S]=d(x[S],v,y,C);return E(),$}function g(v,y,C){let x=WD.inlineCode(v,y,C);return C.stack.includes("tableCell")&&(x=x.replace(/\|/g,"\\$&")),x}}function bSe(){return{exit:{taskListCheckValueChecked:Rk,taskListCheckValueUnchecked:Rk,paragraph:xSe}}}function ySe(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:CSe}}}function Rk(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function xSe(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const a=t.children;let o=-1,l;for(;++o<a.length;){const s=a[o];if(s.type==="paragraph"){l=s;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function CSe(e,t,n,r){const a=e.children[0],o=typeof e.checked=="boolean"&&a&&a.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);o&&s.move(l);let d=WD.listItem(e,t,n,{...r,...s.current()});return o&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(h){return h+l}}function SSe(){return[eCe(),CCe(),ECe(),dSe(),bSe()]}function wSe(e){return{extensions:[tCe(),SCe(e),jCe(),vSe(e),ySe()]}}const $Se={tokenize:RSe,partial:!0},UD={tokenize:ISe,partial:!0},qD={tokenize:MSe,partial:!0},KD={tokenize:TSe,partial:!0},ESe={tokenize:PSe,partial:!0},GD={name:"wwwAutolink",tokenize:OSe,previous:YD},XD={name:"protocolAutolink",tokenize:kSe,previous:JD},Il={name:"emailAutolink",tokenize:NSe,previous:QD},Zi={};function jSe(){return{text:Zi}}let fc=48;for(;fc<123;)Zi[fc]=Il,fc++,fc===58?fc=65:fc===91&&(fc=97);Zi[43]=Il;Zi[45]=Il;Zi[46]=Il;Zi[95]=Il;Zi[72]=[Il,XD];Zi[104]=[Il,XD];Zi[87]=[Il,GD];Zi[119]=[Il,GD];function NSe(e,t,n){const r=this;let a,o;return l;function l(p){return!HS(p)||!QD.call(r,r.previous)||G2(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(p))}function s(p){return HS(p)?(e.consume(p),s):p===64?(e.consume(p),d):n(p)}function d(p){return p===46?e.check(ESe,h,f)(p):p===45||p===95||Ua(p)?(o=!0,e.consume(p),d):h(p)}function f(p){return e.consume(p),a=!0,d}function h(p){return o&&a&&Za(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function OSe(e,t,n){const r=this;return a;function a(l){return l!==87&&l!==119||!YD.call(r,r.previous)||G2(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check($Se,e.attempt(UD,e.attempt(qD,o),n),n)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function kSe(e,t,n){const r=this;let a="",o=!1;return l;function l(p){return(p===72||p===104)&&JD.call(r,r.previous)&&!G2(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(p),e.consume(p),s):n(p)}function s(p){if(Za(p)&&a.length<5)return a+=String.fromCodePoint(p),e.consume(p),s;if(p===58){const g=a.toLowerCase();if(g==="http"||g==="https")return e.consume(p),d}return n(p)}function d(p){return p===47?(e.consume(p),o?f:(o=!0,d)):n(p)}function f(p){return p===null||Rv(p)||Ir(p)||Wc(p)||B0(p)?n(p):e.attempt(UD,e.attempt(qD,h),n)(p)}function h(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function RSe(e,t,n){let r=0;return a;function a(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),a):l===46&&r===3?(e.consume(l),o):n(l)}function o(l){return l===null?n(l):t(l)}}function ISe(e,t,n){let r,a,o;return l;function l(f){return f===46||f===95?e.check(KD,d,s)(f):f===null||Ir(f)||Wc(f)||f!==45&&B0(f)?d(f):(o=!0,e.consume(f),l)}function s(f){return f===95?r=!0:(a=r,r=void 0),e.consume(f),l}function d(f){return a||r||!o?n(f):t(f)}}function MSe(e,t){let n=0,r=0;return a;function a(l){return l===40?(n++,e.consume(l),a):l===41&&r<n?o(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(KD,t,o)(l):l===null||Ir(l)||Wc(l)?t(l):(e.consume(l),a)}function o(l){return l===41&&r++,e.consume(l),a}}function TSe(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),o):s===93?(e.consume(s),a):s===60||s===null||Ir(s)||Wc(s)?t(s):n(s)}function a(s){return s===null||s===40||s===91||Ir(s)||Wc(s)?t(s):r(s)}function o(s){return Za(s)?l(s):n(s)}function l(s){return s===59?(e.consume(s),r):Za(s)?(e.consume(s),l):n(s)}}function PSe(e,t,n){return r;function r(o){return e.consume(o),a}function a(o){return Ua(o)?n(o):t(o)}}function YD(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ir(e)}function JD(e){return!Za(e)}function QD(e){return!(e===47||HS(e))}function HS(e){return e===43||e===45||e===46||e===95||Ua(e)}function G2(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const DSe={tokenize:VSe,partial:!0};function zSe(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:BSe,continuation:{tokenize:FSe},exit:HSe}},text:{91:{name:"gfmFootnoteCall",tokenize:_Se},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:ASe,resolveTo:LSe}}}}function ASe(e,t,n){const r=this;let a=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;a--;){const d=r.events[a][1];if(d.type==="labelImage"){l=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return s;function s(d){if(!l||!l._balanced)return n(d);const f=$i(r.sliceSerialize({start:l.end,end:r.now()}));return f.codePointAt(0)!==94||!o.includes(f.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function LSe(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function _Se(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return s;function s(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),d}function d(p){return p!==94?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(p){if(o>999||p===93&&!l||p===null||p===91||Ir(p))return n(p);if(p===93){e.exit("chunkString");const g=e.exit("gfmFootnoteCallString");return a.includes($i(r.sliceSerialize(g)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return Ir(p)||(l=!0),o++,e.consume(p),p===92?h:f}function h(p){return p===91||p===92||p===93?(e.consume(p),o++,f):f(p)}}function BSe(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,s;return d;function d(y){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(y){return y===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(y)}function h(y){if(l>999||y===93&&!s||y===null||y===91||Ir(y))return n(y);if(y===93){e.exit("chunkString");const C=e.exit("gfmFootnoteDefinitionLabelString");return o=$i(r.sliceSerialize(C)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),g}return Ir(y)||(s=!0),l++,e.consume(y),y===92?p:h}function p(y){return y===91||y===92||y===93?(e.consume(y),l++,h):h(y)}function g(y){return y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),a.includes(o)||a.push(o),er(e,v,"gfmFootnoteDefinitionWhitespace")):n(y)}function v(y){return t(y)}}function FSe(e,t,n){return e.check(Mh,t,e.attempt(DSe,t,n))}function HSe(e){e.exit("gfmFootnoteDefinition")}function VSe(e,t,n){const r=this;return er(e,a,"gfmFootnoteDefinitionIndent",5);function a(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(o):n(o)}}function WSe(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:a};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function a(l,s){let d=-1;for(;++d<l.length;)if(l[d][0]==="enter"&&l[d][1].type==="strikethroughSequenceTemporary"&&l[d][1]._close){let f=d;for(;f--;)if(l[f][0]==="exit"&&l[f][1].type==="strikethroughSequenceTemporary"&&l[f][1]._open&&l[d][1].end.offset-l[d][1].start.offset===l[f][1].end.offset-l[f][1].start.offset){l[d][1].type="strikethroughSequence",l[f][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},l[f][1].start),end:Object.assign({},l[d][1].end)},p={type:"strikethroughText",start:Object.assign({},l[f][1].end),end:Object.assign({},l[d][1].start)},g=[["enter",h,s],["enter",l[f][1],s],["exit",l[f][1],s],["enter",p,s]],v=s.parser.constructs.insideSpan.null;v&&_o(g,g.length,0,F0(v,l.slice(f+1,d),s)),_o(g,g.length,0,[["exit",p,s],["enter",l[d][1],s],["exit",l[d][1],s],["exit",h,s]]),_o(l,f-1,d-f+3,g),d=f+g.length-2;break}}for(d=-1;++d<l.length;)l[d][1].type==="strikethroughSequenceTemporary"&&(l[d][1].type="data");return l}function o(l,s,d){const f=this.previous,h=this.events;let p=0;return g;function g(y){return f===126&&h[h.length-1][1].type!=="characterEscape"?d(y):(l.enter("strikethroughSequenceTemporary"),v(y))}function v(y){const C=Nd(f);if(y===126)return p>1?d(y):(l.consume(y),p++,v);if(p<2&&!n)return d(y);const x=l.exit("strikethroughSequenceTemporary"),S=Nd(y);return x._open=!S||S===2&&!!C,x._close=!C||C===2&&!!S,s(y)}}}class USe{constructor(){this.map=[],this.index=new Map}add(t,n,r){qSe(this,t,n,r)}consume(t){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let a=r.pop();for(;a;){for(const o of a)t.push(o);a=r.pop()}this.map.length=0,this.index.clear()}}function qSe(e,t,n,r){if(n===0&&r.length===0)return;const a=e.index.get(t);if(a){a[1]+=n,a[2].push(...r);return}const o=[t,n,r];e.map.push(o),e.index.set(t,o)}function KSe(e,t){let n=!1;const r=[];for(;t<e.length;){const a=e[t];if(n){if(a[0]==="enter")a[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(a[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(a[1].type==="tableDelimiterRow")break}else a[0]==="enter"&&a[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function GSe(){return{flow:{null:{name:"table",tokenize:XSe,resolveAll:YSe}}}}function XSe(e,t,n){const r=this;let a=0,o=0,l;return s;function s(M){let P=r.events.length-1;for(;P>-1;){const{type:T}=r.events[P][1];if(T==="lineEnding"||T==="linePrefix")P--;else break}const A=P>-1?r.events[P][1].type:null,H=A==="tableHead"||A==="tableRow"?N:d;return H===N&&r.parser.lazy[r.now().line]?n(M):H(M)}function d(M){return e.enter("tableHead"),e.enter("tableRow"),f(M)}function f(M){return M===124||(l=!0,o+=1),h(M)}function h(M){return M===null?n(M):hn(M)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),v):n(M):Fn(M)?er(e,h,"whitespace")(M):(o+=1,l&&(l=!1,a+=1),M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),l=!0,h):(e.enter("data"),p(M)))}function p(M){return M===null||M===124||Ir(M)?(e.exit("data"),h(M)):(e.consume(M),M===92?g:p)}function g(M){return M===92||M===124?(e.consume(M),p):p(M)}function v(M){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(M):(e.enter("tableDelimiterRow"),l=!1,Fn(M)?er(e,y,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):y(M))}function y(M){return M===45||M===58?x(M):M===124?(l=!0,e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),C):O(M)}function C(M){return Fn(M)?er(e,x,"whitespace")(M):x(M)}function x(M){return M===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),S):M===45?(o+=1,S(M)):M===null||hn(M)?k(M):O(M)}function S(M){return M===45?(e.enter("tableDelimiterFiller"),$(M)):O(M)}function $(M){return M===45?(e.consume(M),$):M===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),E):(e.exit("tableDelimiterFiller"),E(M))}function E(M){return Fn(M)?er(e,k,"whitespace")(M):k(M)}function k(M){return M===124?y(M):M===null||hn(M)?!l||a!==o?O(M):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(M)):O(M)}function O(M){return n(M)}function N(M){return e.enter("tableRow"),R(M)}function R(M){return M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),R):M===null||hn(M)?(e.exit("tableRow"),t(M)):Fn(M)?er(e,R,"whitespace")(M):(e.enter("data"),j(M))}function j(M){return M===null||M===124||Ir(M)?(e.exit("data"),R(M)):(e.consume(M),M===92?I:j)}function I(M){return M===92||M===124?(e.consume(M),j):j(M)}}function YSe(e,t){let n=-1,r=!0,a=0,o=[0,0,0,0],l=[0,0,0,0],s=!1,d=0,f,h,p;const g=new USe;for(;++n<e.length;){const v=e[n],y=v[1];v[0]==="enter"?y.type==="tableHead"?(s=!1,d!==0&&(Ik(g,t,d,f,h),h=void 0,d=0),f={type:"table",start:Object.assign({},y.start),end:Object.assign({},y.end)},g.add(n,0,[["enter",f,t]])):y.type==="tableRow"||y.type==="tableDelimiterRow"?(r=!0,p=void 0,o=[0,0,0,0],l=[0,n+1,0,0],s&&(s=!1,h={type:"tableBody",start:Object.assign({},y.start),end:Object.assign({},y.end)},g.add(n,0,[["enter",h,t]])),a=y.type==="tableDelimiterRow"?2:h?3:1):a&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],p=wg(g,t,o,a,void 0,p),o=[0,0,0,0]),l[2]=n)):y.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],p=wg(g,t,o,a,void 0,p)),o=l,l=[o[1],n,0,0])):y.type==="tableHead"?(s=!0,d=n):y.type==="tableRow"||y.type==="tableDelimiterRow"?(d=n,o[1]!==0?(l[0]=l[1],p=wg(g,t,o,a,n,p)):l[1]!==0&&(p=wg(g,t,l,a,n,p)),a=0):a&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")&&(l[3]=n)}for(d!==0&&Ik(g,t,d,f,h),g.consume(t.events),n=-1;++n<t.events.length;){const v=t.events[n];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=KSe(t.events,n))}return e}function wg(e,t,n,r,a,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(o.end=Object.assign({},Ju(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const d=Ju(t.events,n[1]);if(o={type:l,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const f=Ju(t.events,n[2]),h=Ju(t.events,n[3]),p={type:s,start:Object.assign({},f),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",p,t]]),r!==2){const g=t.events[n[2]],v=t.events[n[3]];if(g[1].end=Object.assign({},v[1].end),g[1].type="chunkText",g[1].contentType="text",n[3]>n[2]+1){const y=n[2]+1,C=n[3]-n[2]-1;e.add(y,C,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return a!==void 0&&(o.end=Object.assign({},Ju(t.events,a)),e.add(a,0,[["exit",o,t]]),o=void 0),o}function Ik(e,t,n,r,a){const o=[],l=Ju(t.events,n);a&&(a.end=Object.assign({},l),o.push(["exit",a,t])),r.end=Object.assign({},l),o.push(["exit",r,t]),e.add(n+1,0,o)}function Ju(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const JSe={name:"tasklistCheck",tokenize:ZSe};function QSe(){return{text:{91:JSe}}}function ZSe(e,t,n){const r=this;return a;function a(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),o)}function o(d){return Ir(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),l):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),l):n(d)}function l(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(d)}function s(d){return hn(d)?t(d):Fn(d)?e.check({tokenize:ewe},t,n)(d):n(d)}}function ewe(e,t,n){return er(e,r,"whitespace");function r(a){return a===null?n(a):t(a)}}function twe(e){return sD([jSe(),zSe(),WSe(e),GSe(),QSe()])}const nwe={};function rwe(e){const t=this,n=e||nwe,r=t.data(),a=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);a.push(twe(n)),o.push(SSe()),l.push(wSe(n))}const Mk=e=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(new Date(e)),awe=e=>{if(!e)return"0 B";const t=["B","KB","MB"],n=Math.min(Math.floor(Math.log(e)/Math.log(1024)),t.length-1);return`${(e/1024**n).toFixed(n?1:0)} ${t[n]}`},mc="__new_memo__",rm=e=>JSON.stringify({title:e.title||"",content:e.content||"",tags:e.tags||[]});function owe(e,t){if(!(t!=null&&t.startsWith("#")))return;let n;try{n=decodeURIComponent(t.slice(1))}catch{return}const r=e.currentTarget.closest(".memo-preview"),a=[...(r==null?void 0:r.querySelectorAll("[id]"))||[]].find(l=>l.id===n);if(!r||!a)return;e.preventDefault();const o=a.getBoundingClientRect().top-r.getBoundingClientRect().top+r.scrollTop;r.scrollTo({top:o,behavior:"smooth"})}const iwe=[rwe],lwe={a:({href:e,children:t,...n})=>c.jsx("a",{href:e,target:/^https?:\/\//i.test(e||"")?"_blank":void 0,rel:/^https?:\/\//i.test(e||"")?"noreferrer":void 0,onClick:r=>owe(r,e),...n,children:t}),img:({src:e,alt:t,...n})=>c.jsx("img",{src:e,alt:t||"",loading:"lazy",...n})},swe=i.memo(function({content:t,title:n}){return c.jsxs("div",{className:"markdown-body",children:[(n==null?void 0:n.trim())&&c.jsx("h1",{className:"memo-preview-title",children:n}),c.jsx(Wxe,{remarkPlugins:iwe,components:lwe,children:t||"*Nothing to preview yet*"})]})});function cwe(){const{message:e}=Br.useApp(),[t,n]=i.useState([]),[r,a]=i.useState(null),[o,l]=i.useState({title:"",content:"",tags:[]}),[s,d]=i.useState(""),[f,h]=i.useState("all"),[p,g]=i.useState("preview"),[v,y]=i.useState(!0),[C,x]=i.useState(!1),[S,$]=i.useState(!1),[E,k]=i.useState([]),[O,N]=i.useState(!1),[R,j]=i.useState(!1),[I,M]=i.useState({}),[P,A]=i.useState(""),H=i.useRef(!1),T=i.useRef(null),L=i.useRef(null),D=i.useRef(null),F=i.useRef({start:0,end:0}),V=i.useRef(""),q=async()=>{try{const Z=await os.list();n(Z),Z[0]&&(a(Z[0].id),l(Z[0]),V.current=rm(Z[0]))}catch(Z){e.error(Z.message)}finally{y(!1)}},B=async(Z=!0)=>{Z&&N(!0);try{k(await os.listImages())}catch(he){e.error(he.message)}finally{Z&&N(!1)}},U=()=>{$(!0),B()},K=(Z,he)=>{const{naturalWidth:$e,naturalHeight:Ie}=he.currentTarget;!$e||!Ie||M(re=>{const ce=re[Z];return(ce==null?void 0:ce.width)===$e&&(ce==null?void 0:ce.height)===Ie?re:{...re,[Z]:{width:$e,height:Ie}}})};i.useEffect(()=>{const Z=E.filter(he=>!I[he.filename]).map(he=>{const $e=new window.Image;return $e.onload=()=>K(he.filename,{currentTarget:$e}),$e.src=he.url,$e});return()=>Z.forEach(he=>{he.onload=null})},[E,I]),i.useEffect(()=>{q()},[]),i.useEffect(()=>{const Z=he=>{(he.metaKey||he.ctrlKey)&&he.key==="s"&&(he.preventDefault(),le())};return window.addEventListener("keydown",Z),()=>window.removeEventListener("keydown",Z)});const _=i.useMemo(()=>[...new Set(t.flatMap(Z=>Z.tags||[]))],[t]),G=t.filter(Z=>{var he;return(f==="all"||((he=Z.tags)==null?void 0:he.includes(f)))&&(!s||`${Z.title} ${Z.content}`.toLowerCase().includes(s.toLowerCase()))}),X=Z=>{a(Z.id),l(Z),V.current=rm(Z)},Y=()=>{const Z={id:mc,title:"",content:"",tags:[],updatedAt:new Date().toISOString()};n(he=>[Z,...he.filter($e=>$e.id!==mc)]),a(mc),l(Z),V.current=rm(Z),g("edit"),requestAnimationFrame(()=>{var he;return(he=T.current)==null?void 0:he.focus()})};async function le(Z=!1){if(H.current)return;if(!o.title.trim()&&!o.content.trim()){Z||e.warning("Add some content first");return}H.current=!0;const he=Date.now();x(!0);try{const $e={...o,tags:o.tagsInput??o.tags},Ie=!r||r===mc,re=Ie?await os.create($e):await os.update(r,$e);n(ce=>Ie?[re,...ce.filter(ve=>ve.id!==mc)]:ce.map(ve=>ve.id===re.id?re:ve)),a(re.id),l(re),V.current=rm(re),Z||e.success("Memo saved")}catch($e){Z||e.error($e.message)}finally{await new Promise($e=>setTimeout($e,Math.max(0,500-(Date.now()-he)))),H.current=!1,x(!1)}}const oe=Z=>{F.current={start:Z.currentTarget.selectionStart,end:Z.currentTarget.selectionEnd}},ue=Z=>{var Ae,Be;const he=(Be=(Ae=L.current)==null?void 0:Ae.resizableTextArea)==null?void 0:Be.textArea,$e=o.content||"",Ie=he?{start:he.selectionStart,end:he.selectionEnd}:F.current,re=Math.max(0,Math.min(Ie.start,$e.length)),ce=Math.max(re,Math.min(Ie.end,$e.length)),ve=$e.slice(0,re),be=$e.slice(ce),Ce=ve&&!ve.endsWith(`
613
613
  `)?`
614
614
 
615
615
  `:"",ge=be&&!be.startsWith(`
616
616
  `)?`
617
617
 
618
- `:"",Oe=`${Ce}${Z}${ge}`,Ee=`${ve}${Oe}${be}`;l(ze=>({...ze,content:Ee}));const De=re+Oe.length;F.current={start:De,end:De},requestAnimationFrame(()=>{var qe,_e;const ze=(_e=(qe=L.current)==null?void 0:qe.resizableTextArea)==null?void 0:_e.textArea;ze==null||ze.focus(),ze==null||ze.setSelectionRange(De,De)})},ne=async Z=>{var $e;if(!(($e=Z==null?void 0:Z.type)!=null&&$e.startsWith("image/")))return;if(Z.size>10*1024*1024){e.error("Images must be 10 MB or smaller.");return}const he="memo-image-upload";e.loading({content:"Uploading image…",key:he,duration:0});try{const Ie=await os.uploadImage(Z),re=(Z.name||"Image").replace(/\.[^.]+$/,"").replace(/[\[\]\r\n]/g," ").trim()||"Image";ue(`![${re}](${Ie.url})`),S&&B(),e.success({content:"Image inserted",key:he})}catch(Ie){e.error({content:Ie.message,key:he})}},te=async Z=>{var he;if((he=Z==null?void 0:Z.type)!=null&&he.startsWith("image/")){if(Z.size>10*1024*1024){e.error("Images must be 10 MB or smaller.");return}j(!0);try{await os.uploadImage(Z),await B(!1),e.success("Image uploaded")}catch($e){e.error($e.message)}finally{j(!1)}}},ee=Z=>{const[he]=Z.target.files||[];Z.target.value="",ne(he)},Q=Z=>{var $e;const he=[...(($e=Z.clipboardData)==null?void 0:$e.files)||[]].find(Ie=>{var re;return(re=Ie.type)==null?void 0:re.startsWith("image/")});he&&(Z.preventDefault(),ne(he))},ae=async Z=>{try{await navigator.clipboard.writeText(`![${Z.filename}](${Z.url})`),e.success("Image Markdown copied")}catch(he){e.error(he.message||"Could not copy image Markdown.")}},fe=async Z=>{A(Z.filename);try{await os.removeImage(Z.filename),k(he=>he.filter($e=>$e.filename!==Z.filename)),M(he=>{const $e={...he};return delete $e[Z.filename],$e}),e.success("Deleted successfully")}catch(he){e.error(he.message)}finally{A("")}};i.useEffect(()=>{if(p!=="edit")return;const Z=setInterval(()=>{rm(o)!==V.current&&le(!0)},3e3);return()=>clearInterval(Z)},[p,o,r]);async function J(){if(r){if(r===mc){n(Z=>Z.filter(he=>he.id!==mc)),Y();return}try{await os.remove(r);const Z=t.filter(he=>he.id!==r);n(Z),Z[0]?X(Z[0]):Y(),e.success("Memo deleted")}catch(Z){e.error(Z.message)}}}return v?c.jsx("div",{className:"memos-loading",children:c.jsx(lr,{})}):c.jsxs("div",{className:"memos-page",children:[c.jsx(Xr,{actions:c.jsx(Re,{icon:c.jsx(Kg,{}),onClick:U,children:"Image library"}),description:"Capture ideas and keep your thinking light.",eyebrow:"PERSONAL KNOWLEDGE",title:"Memos"}),c.jsxs("div",{className:"memos-shell",children:[c.jsxs("aside",{className:"memos-list-panel",children:[c.jsxs("div",{className:"memos-list-title",children:[c.jsxs("span",{children:["All notes ",c.jsx("b",{children:t.length})]}),c.jsx(Re,{type:"text",icon:c.jsx(nr,{}),onClick:Y})]}),c.jsx($t,{allowClear:!0,prefix:c.jsx(yo,{}),placeholder:"Search memos...",value:s,onChange:Z=>d(Z.target.value)}),c.jsxs("div",{className:"memo-tags",children:[c.jsx("button",{className:f==="all"?"active":"",onClick:()=>h("all"),children:"All notes"}),_.map(Z=>c.jsxs("button",{className:f===Z?"active":"",onClick:()=>h(Z),children:["#",Z]},Z))]}),c.jsx("div",{className:"memo-items",children:G.length?G.map(Z=>c.jsxs("button",{className:`memo-item ${Z.id===r?"selected":""}`,onClick:()=>X(Z),children:[c.jsx("strong",{children:Z.title||"Untitled memo"}),c.jsx("span",{children:Z.content.replace(/[#*`\n]/g," ").trim()||"No content yet"}),c.jsx("small",{children:Mk(Z.updatedAt)})]},Z.id)):c.jsx(qt,{image:qt.PRESENTED_IMAGE_SIMPLE,description:"No memos found"})})]}),c.jsxs("main",{className:"memo-editor-panel",children:[c.jsxs("div",{className:"memo-toolbar",children:[c.jsx($h,{className:"memo-mode","aria-label":"Memo view mode",value:p,onChange:g,options:[{value:"edit",label:c.jsx(oi,{"aria-label":"Edit"})},{value:"preview",label:c.jsx(Hd,{"aria-label":"Preview"})},{value:"split",label:c.jsx("span",{"aria-label":"Split",children:"↔"})}]}),c.jsxs("div",{className:"memo-toolbar-actions",children:[c.jsx("input",{ref:D,className:"memo-image-input",type:"file",accept:"image/png,image/jpeg,image/gif,image/webp",onChange:ee}),p!=="preview"&&c.jsx(vn,{title:"Insert image",children:c.jsx(Re,{"aria-label":"Insert image",type:"text",icon:c.jsx(Kg,{}),onClick:()=>{var Z;return(Z=D.current)==null?void 0:Z.click()}})}),c.jsx(la,{title:"Delete this memo?",onConfirm:J,disabled:!r,children:c.jsx(Re,{danger:!0,type:"text",icon:c.jsx(Yn,{}),disabled:!r})}),c.jsxs(Re,{type:"primary",icon:c.jsx(N2,{}),loading:C,onClick:le,children:["Save ",c.jsx("span",{className:"save-hint",children:"⌘S"})]})]})]}),c.jsxs("div",{className:`memo-workspace view-${p}`,children:[c.jsxs("section",{className:"memo-edit",children:[c.jsx($t,{ref:T,className:"memo-title-input",bordered:!1,placeholder:"Memo title",value:o.title,onChange:Z=>l({...o,title:Z.target.value})}),c.jsx($t.TextArea,{ref:L,className:"memo-content-input",bordered:!1,placeholder:"Start writing in Markdown...",value:o.content,onChange:Z=>l({...o,content:Z.target.value}),onSelect:oe,onClick:oe,onKeyUp:oe,onPaste:Q,autoSize:{minRows:18}})]}),c.jsxs("section",{className:"memo-preview",children:[c.jsx("div",{className:"preview-label",children:"PREVIEW"}),c.jsx(owe,{content:o.content})]})]}),c.jsxs("div",{className:"memo-footer",children:[c.jsx("span",{children:"Markdown supported · Paste or insert images"}),c.jsxs("span",{children:[o.content.length," characters"]}),c.jsx(In,{className:"memo-footer-tags",mode:"tags",bordered:!1,open:!1,suffixIcon:null,prefix:"#",placeholder:"Add tags",tokenSeparators:[","],value:o.tags||[],onChange:Z=>l({...o,tags:Z.map(he=>he.trim().toLowerCase()).filter(Boolean)})})]})]}),c.jsx(bn,{className:"memo-image-library-modal",title:c.jsxs(it,{size:8,children:[c.jsx(Kg,{}),c.jsx("span",{children:"Uploaded images"}),c.jsx(wt,{children:E.length}),c.jsx(Rh,{accept:"image/png,image/jpeg,image/gif,image/webp",beforeUpload:Z=>(te(Z),!1),showUploadList:!1,children:c.jsx(Re,{size:"small",icon:c.jsx(Ev,{}),loading:R,children:"Upload image"})})]}),open:S,onCancel:()=>$(!1),footer:null,width:780,children:O?c.jsx("div",{className:"memo-image-library-loading",children:c.jsx(lr,{})}):E.length?c.jsx("div",{className:"memo-image-grid",children:E.map(Z=>{const he=I[Z.filename];return c.jsxs("div",{className:"memo-image-card",children:[c.jsx(c2,{src:Z.url,alt:Z.filename,preview:{mask:c.jsx("span",{children:"Preview"})}}),c.jsxs("div",{className:"memo-image-card-copy",children:[c.jsx(wn.Text,{ellipsis:{tooltip:Z.filename},title:Z.filename,children:Z.filename}),c.jsxs(wn.Text,{type:"secondary",children:[awe(Z.size)," · ",Mk(Z.updatedAt)]}),c.jsxs("div",{className:"memo-image-card-usage",children:[he&&c.jsxs(wn.Text,{type:"secondary",children:[he.width," × ",he.height," px"]}),c.jsx(wn.Text,{type:"secondary",children:Z.usedBy.length?`Used in ${Z.usedBy.length} memo${Z.usedBy.length>1?"s":""}`:"Not used"})]}),c.jsxs(it,{size:4,children:[c.jsx(Re,{size:"small",type:"text",icon:c.jsx(vo,{}),onClick:()=>ae(Z),children:"Copy Markdown"}),c.jsx(la,{title:"Delete this image?",description:Z.usedBy.length?"This image is still used by a memo.":void 0,disabled:!!Z.usedBy.length||P===Z.filename,onConfirm:()=>fe(Z),children:c.jsx(Re,{size:"small",type:"text",danger:!0,icon:c.jsx(Yn,{}),disabled:!!Z.usedBy.length,loading:P===Z.filename,children:"Delete"})})]})]})]},Z.filename)})}):c.jsx(qt,{description:"No uploaded images yet"})})]})]})}const xs=(e="node")=>`${e}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,ZD=(e,t="Untitled idea")=>{const n=String((e==null?void 0:e.edgeLabel)||"").trim();return{id:String((e==null?void 0:e.id)||xs()),text:String((e==null?void 0:e.text)??(e==null?void 0:e.label)??t),edgeLabel:n||void 0,color:(e==null?void 0:e.color)||void 0,autoWidth:(e==null?void 0:e.autoWidth)!==!1,collapsed:!!(e!=null&&e.collapsed),tested:!!(e!=null&&e.tested),notes:e!=null&&e.notes?String(e.notes):void 0,jiraKeys:Array.isArray(e==null?void 0:e.jiraKeys)?[...new Set(e.jiraKeys.map(r=>String(r).trim().toUpperCase()).filter(Boolean))]:void 0,position:e!=null&&e.position&&Number.isFinite(Number(e.position.x))&&Number.isFinite(Number(e.position.y))?{x:Number(e.position.x),y:Number(e.position.y)}:void 0,children:Array.isArray(e==null?void 0:e.children)?e.children.map(r=>ZD(r)):[]}},X2=(e,t="Untitled mind map")=>{var l;const n=(e==null?void 0:e.root)||((l=e==null?void 0:e.data)==null?void 0:l.root)||e,r=String((e==null?void 0:e.title)||(n==null?void 0:n.text)||t).trim()||t,a=ZD(n,r),o=new Date().toISOString();return{id:String((e==null?void 0:e.id)||xs("map")),title:r,layout:"left-to-right",createdAt:(e==null?void 0:e.createdAt)||new Date().toISOString(),updatedAt:(e==null?void 0:e.updatedAt)||o,jiraIssues:Array.isArray(e==null?void 0:e.jiraIssues)?e.jiraIssues.map(s=>({id:String((s==null?void 0:s.id)||(s==null?void 0:s.key)||"").trim(),key:String((s==null?void 0:s.key)||"").trim().toUpperCase(),summary:String((s==null?void 0:s.summary)||"").trim(),url:typeof(s==null?void 0:s.url)=="string"?s.url.trim():""})).filter(s=>s.id&&s.key):[],root:{...a,text:a.text||r}}},lwe=e=>{const t=String(e||"").trim();if(!t)return null;const n=t.match(/(?:\/browse\/|\b)([A-Z][A-Z0-9_]*-\d+)\b/i);if(!n)return null;const r=n[1].toUpperCase(),a=/^https?:\/\//i.test(t);return{key:r,url:a?t:""}},swe=(e="Untitled mind map")=>{const t=new Date().toISOString();return{id:xs("map"),title:e,layout:"left-to-right",createdAt:t,updatedAt:t,root:{id:xs(),text:e,color:"#6555e8",children:[{id:xs(),text:"First idea",color:"#4f8edb",children:[]},{id:xs(),text:"Second idea",color:"#36a269",children:[]}]}}},Y2=e=>1+(e.children||[]).reduce((t,n)=>t+Y2(n),0),ud=(e,t)=>{if(!e)return null;if(e.id===t)return e;for(const n of e.children||[]){const r=ud(n,t);if(r)return r}return null},rh=(e,t)=>{var n;if(!((n=e==null?void 0:e.children)!=null&&n.length))return null;if(e.children.some(r=>r.id===t))return e;for(const r of e.children){const a=rh(r,t);if(a)return a}return null},dd=(e,t,n)=>e.id===t?n(e):{...e,children:(e.children||[]).map(r=>dd(r,t,n))},U0=(e,t)=>({...e,children:(e.children||[]).filter(n=>n.id!==t).map(n=>U0(n,t))}),cwe=(e,t,n)=>{let r=!1;const a=o=>{if(r)return o;const l=o.children||[],s=l.findIndex(d=>d.id===t);return s>=0?(r=!0,{...o,children:[...l.slice(0,s+1),n,...l.slice(s+1)]}):{...o,children:l.map(a)}};return a(e)},uwe=(e,t)=>{var l;const n=rh(e,t),r=n?rh(e,n.id):null,a=(l=n==null?void 0:n.children)==null?void 0:l.find(s=>s.id===t);if(!n||!r||!a)return e;const o=U0(e,t);return dd(o,r.id,s=>{const d=(s.children||[]).findIndex(f=>f.id===n.id);return d<0?s:{...s,children:[...s.children.slice(0,d+1),a,...s.children.slice(d+1)]}})},Tk=(e,t,n)=>{const r=ud(e,t);if(!r||!ud(e,n)||t===n||ud(r,n))return e;const a=U0(e,t);return dd(a,n,o=>({...o,children:[...o.children||[],r]}))},e9=e=>{const t=[`# ${e.title}`],n=(r,a)=>{r.id!==e.root.id&&t.push(`${"#".repeat(Math.min(a+1,6))} ${r.text}`),(r.children||[]).forEach(o=>n(o,a+1))};return n(e.root,0),`${t.join(`
618
+ `:"",Oe=`${Ce}${Z}${ge}`,Ee=`${ve}${Oe}${be}`;l(ze=>({...ze,content:Ee}));const De=re+Oe.length;F.current={start:De,end:De},requestAnimationFrame(()=>{var qe,_e;const ze=(_e=(qe=L.current)==null?void 0:qe.resizableTextArea)==null?void 0:_e.textArea;ze==null||ze.focus(),ze==null||ze.setSelectionRange(De,De)})},ne=async Z=>{var $e;if(!(($e=Z==null?void 0:Z.type)!=null&&$e.startsWith("image/")))return;if(Z.size>10*1024*1024){e.error("Images must be 10 MB or smaller.");return}const he="memo-image-upload";e.loading({content:"Uploading image…",key:he,duration:0});try{const Ie=await os.uploadImage(Z),re=(Z.name||"Image").replace(/\.[^.]+$/,"").replace(/[\[\]\r\n]/g," ").trim()||"Image";ue(`![${re}](${Ie.url})`),S&&B(),e.success({content:"Image inserted",key:he})}catch(Ie){e.error({content:Ie.message,key:he})}},te=async Z=>{var he;if((he=Z==null?void 0:Z.type)!=null&&he.startsWith("image/")){if(Z.size>10*1024*1024){e.error("Images must be 10 MB or smaller.");return}j(!0);try{await os.uploadImage(Z),await B(!1),e.success("Image uploaded")}catch($e){e.error($e.message)}finally{j(!1)}}},ee=Z=>{const[he]=Z.target.files||[];Z.target.value="",ne(he)},Q=Z=>{var $e;const he=[...(($e=Z.clipboardData)==null?void 0:$e.files)||[]].find(Ie=>{var re;return(re=Ie.type)==null?void 0:re.startsWith("image/")});he&&(Z.preventDefault(),ne(he))},ae=async Z=>{try{await navigator.clipboard.writeText(`![${Z.filename}](${Z.url})`),e.success("Image Markdown copied")}catch(he){e.error(he.message||"Could not copy image Markdown.")}},fe=async Z=>{A(Z.filename);try{await os.removeImage(Z.filename),k(he=>he.filter($e=>$e.filename!==Z.filename)),M(he=>{const $e={...he};return delete $e[Z.filename],$e}),e.success("Deleted successfully")}catch(he){e.error(he.message)}finally{A("")}};i.useEffect(()=>{if(p!=="edit")return;const Z=setInterval(()=>{rm(o)!==V.current&&le(!0)},3e3);return()=>clearInterval(Z)},[p,o,r]);async function J(){if(r){if(r===mc){n(Z=>Z.filter(he=>he.id!==mc)),Y();return}try{await os.remove(r);const Z=t.filter(he=>he.id!==r);n(Z),Z[0]?X(Z[0]):Y(),e.success("Memo deleted")}catch(Z){e.error(Z.message)}}}return v?c.jsx("div",{className:"memos-loading",children:c.jsx(lr,{})}):c.jsxs("div",{className:"memos-page",children:[c.jsx(Xr,{actions:c.jsx(Re,{icon:c.jsx(Kg,{}),onClick:U,children:"Image library"}),description:"Capture ideas and keep your thinking light.",eyebrow:"PERSONAL KNOWLEDGE",title:"Memos"}),c.jsxs("div",{className:"memos-shell",children:[c.jsxs("aside",{className:"memos-list-panel",children:[c.jsxs("div",{className:"memos-list-title",children:[c.jsxs("span",{children:["All notes ",c.jsx("b",{children:t.length})]}),c.jsx(Re,{type:"text",icon:c.jsx(nr,{}),onClick:Y})]}),c.jsx($t,{allowClear:!0,prefix:c.jsx(yo,{}),placeholder:"Search memos...",value:s,onChange:Z=>d(Z.target.value)}),c.jsxs("div",{className:"memo-tags",children:[c.jsx("button",{className:f==="all"?"active":"",onClick:()=>h("all"),children:"All notes"}),_.map(Z=>c.jsxs("button",{className:f===Z?"active":"",onClick:()=>h(Z),children:["#",Z]},Z))]}),c.jsx("div",{className:"memo-items",children:G.length?G.map(Z=>c.jsxs("button",{className:`memo-item ${Z.id===r?"selected":""}`,onClick:()=>X(Z),children:[c.jsx("strong",{children:Z.title||"Untitled memo"}),c.jsx("span",{children:Z.content.replace(/[#*`\n]/g," ").trim()||"No content yet"}),c.jsx("small",{children:Mk(Z.updatedAt)})]},Z.id)):c.jsx(qt,{image:qt.PRESENTED_IMAGE_SIMPLE,description:"No memos found"})})]}),c.jsxs("main",{className:"memo-editor-panel",children:[c.jsxs("div",{className:"memo-toolbar",children:[c.jsx($h,{className:"memo-mode","aria-label":"Memo view mode",value:p,onChange:g,options:[{value:"edit",label:c.jsx(oi,{"aria-label":"Edit"})},{value:"preview",label:c.jsx(Hd,{"aria-label":"Preview"})},{value:"split",label:c.jsx("span",{"aria-label":"Split",children:"↔"})}]}),c.jsxs("div",{className:"memo-toolbar-actions",children:[c.jsx("input",{ref:D,className:"memo-image-input",type:"file",accept:"image/png,image/jpeg,image/gif,image/webp",onChange:ee}),p!=="preview"&&c.jsx(vn,{title:"Insert image",children:c.jsx(Re,{"aria-label":"Insert image",type:"text",icon:c.jsx(Kg,{}),onClick:()=>{var Z;return(Z=D.current)==null?void 0:Z.click()}})}),c.jsx(la,{title:"Delete this memo?",onConfirm:J,disabled:!r,children:c.jsx(Re,{danger:!0,type:"text",icon:c.jsx(Yn,{}),disabled:!r})}),c.jsxs(Re,{type:"primary",icon:c.jsx(N2,{}),loading:C,onClick:le,children:["Save ",c.jsx("span",{className:"save-hint",children:"⌘S"})]})]})]}),c.jsxs("div",{className:`memo-workspace view-${p}`,children:[c.jsxs("section",{className:"memo-edit",children:[c.jsx($t,{ref:T,className:"memo-title-input",bordered:!1,placeholder:"Memo title",value:o.title,onChange:Z=>l({...o,title:Z.target.value})}),c.jsx($t.TextArea,{ref:L,className:"memo-content-input",bordered:!1,placeholder:"Start writing in Markdown...",value:o.content,onChange:Z=>l({...o,content:Z.target.value}),onSelect:oe,onClick:oe,onKeyUp:oe,onPaste:Q,autoSize:{minRows:18}})]}),c.jsx("section",{className:"memo-preview",children:c.jsx(swe,{title:o.title,content:o.content})})]}),c.jsxs("div",{className:"memo-footer",children:[c.jsx("span",{children:"Markdown supported · Paste or insert images"}),c.jsxs("span",{children:[o.content.length," characters"]}),c.jsx(In,{className:"memo-footer-tags",mode:"tags",bordered:!1,open:!1,suffixIcon:null,prefix:"#",placeholder:"Add tags",tokenSeparators:[","],value:o.tags||[],onChange:Z=>l({...o,tags:Z.map(he=>he.trim().toLowerCase()).filter(Boolean)})})]})]}),c.jsx(bn,{className:"memo-image-library-modal",title:c.jsxs(it,{size:8,children:[c.jsx(Kg,{}),c.jsx("span",{children:"Uploaded images"}),c.jsx(wt,{children:E.length}),c.jsx(Rh,{accept:"image/png,image/jpeg,image/gif,image/webp",beforeUpload:Z=>(te(Z),!1),showUploadList:!1,children:c.jsx(Re,{size:"small",icon:c.jsx(Ev,{}),loading:R,children:"Upload image"})})]}),open:S,onCancel:()=>$(!1),footer:null,width:780,children:O?c.jsx("div",{className:"memo-image-library-loading",children:c.jsx(lr,{})}):E.length?c.jsx("div",{className:"memo-image-grid",children:E.map(Z=>{const he=I[Z.filename];return c.jsxs("div",{className:"memo-image-card",children:[c.jsx(c2,{src:Z.url,alt:Z.filename,preview:{mask:c.jsx("span",{children:"Preview"})}}),c.jsxs("div",{className:"memo-image-card-copy",children:[c.jsx(wn.Text,{ellipsis:{tooltip:Z.filename},title:Z.filename,children:Z.filename}),c.jsxs(wn.Text,{type:"secondary",children:[awe(Z.size)," · ",Mk(Z.updatedAt)]}),c.jsxs("div",{className:"memo-image-card-usage",children:[he&&c.jsxs(wn.Text,{type:"secondary",children:[he.width," × ",he.height," px"]}),c.jsx(wn.Text,{type:"secondary",children:Z.usedBy.length?`Used in ${Z.usedBy.length} memo${Z.usedBy.length>1?"s":""}`:"Not used"})]}),c.jsxs(it,{size:4,children:[c.jsx(Re,{size:"small",type:"text",icon:c.jsx(vo,{}),onClick:()=>ae(Z),children:"Copy Markdown"}),c.jsx(la,{title:"Delete this image?",description:Z.usedBy.length?"This image is still used by a memo.":void 0,disabled:!!Z.usedBy.length||P===Z.filename,onConfirm:()=>fe(Z),children:c.jsx(Re,{size:"small",type:"text",danger:!0,icon:c.jsx(Yn,{}),disabled:!!Z.usedBy.length,loading:P===Z.filename,children:"Delete"})})]})]})]},Z.filename)})}):c.jsx(qt,{description:"No uploaded images yet"})})]})]})}const xs=(e="node")=>`${e}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,ZD=(e,t="Untitled idea")=>{const n=String((e==null?void 0:e.edgeLabel)||"").trim();return{id:String((e==null?void 0:e.id)||xs()),text:String((e==null?void 0:e.text)??(e==null?void 0:e.label)??t),edgeLabel:n||void 0,color:(e==null?void 0:e.color)||void 0,autoWidth:(e==null?void 0:e.autoWidth)!==!1,collapsed:!!(e!=null&&e.collapsed),tested:!!(e!=null&&e.tested),notes:e!=null&&e.notes?String(e.notes):void 0,jiraKeys:Array.isArray(e==null?void 0:e.jiraKeys)?[...new Set(e.jiraKeys.map(r=>String(r).trim().toUpperCase()).filter(Boolean))]:void 0,position:e!=null&&e.position&&Number.isFinite(Number(e.position.x))&&Number.isFinite(Number(e.position.y))?{x:Number(e.position.x),y:Number(e.position.y)}:void 0,children:Array.isArray(e==null?void 0:e.children)?e.children.map(r=>ZD(r)):[]}},X2=(e,t="Untitled mind map")=>{var l;const n=(e==null?void 0:e.root)||((l=e==null?void 0:e.data)==null?void 0:l.root)||e,r=String((e==null?void 0:e.title)||(n==null?void 0:n.text)||t).trim()||t,a=ZD(n,r),o=new Date().toISOString();return{id:String((e==null?void 0:e.id)||xs("map")),title:r,layout:"left-to-right",createdAt:(e==null?void 0:e.createdAt)||new Date().toISOString(),updatedAt:(e==null?void 0:e.updatedAt)||o,jiraIssues:Array.isArray(e==null?void 0:e.jiraIssues)?e.jiraIssues.map(s=>({id:String((s==null?void 0:s.id)||(s==null?void 0:s.key)||"").trim(),key:String((s==null?void 0:s.key)||"").trim().toUpperCase(),summary:String((s==null?void 0:s.summary)||"").trim(),url:typeof(s==null?void 0:s.url)=="string"?s.url.trim():""})).filter(s=>s.id&&s.key):[],root:{...a,text:a.text||r}}},uwe=e=>{const t=String(e||"").trim();if(!t)return null;const n=t.match(/(?:\/browse\/|\b)([A-Z][A-Z0-9_]*-\d+)\b/i);if(!n)return null;const r=n[1].toUpperCase(),a=/^https?:\/\//i.test(t);return{key:r,url:a?t:""}},dwe=(e="Untitled mind map")=>{const t=new Date().toISOString();return{id:xs("map"),title:e,layout:"left-to-right",createdAt:t,updatedAt:t,root:{id:xs(),text:e,color:"#6555e8",children:[{id:xs(),text:"First idea",color:"#4f8edb",children:[]},{id:xs(),text:"Second idea",color:"#36a269",children:[]}]}}},Y2=e=>1+(e.children||[]).reduce((t,n)=>t+Y2(n),0),ud=(e,t)=>{if(!e)return null;if(e.id===t)return e;for(const n of e.children||[]){const r=ud(n,t);if(r)return r}return null},rh=(e,t)=>{var n;if(!((n=e==null?void 0:e.children)!=null&&n.length))return null;if(e.children.some(r=>r.id===t))return e;for(const r of e.children){const a=rh(r,t);if(a)return a}return null},dd=(e,t,n)=>e.id===t?n(e):{...e,children:(e.children||[]).map(r=>dd(r,t,n))},U0=(e,t)=>({...e,children:(e.children||[]).filter(n=>n.id!==t).map(n=>U0(n,t))}),fwe=(e,t,n)=>{let r=!1;const a=o=>{if(r)return o;const l=o.children||[],s=l.findIndex(d=>d.id===t);return s>=0?(r=!0,{...o,children:[...l.slice(0,s+1),n,...l.slice(s+1)]}):{...o,children:l.map(a)}};return a(e)},mwe=(e,t)=>{var l;const n=rh(e,t),r=n?rh(e,n.id):null,a=(l=n==null?void 0:n.children)==null?void 0:l.find(s=>s.id===t);if(!n||!r||!a)return e;const o=U0(e,t);return dd(o,r.id,s=>{const d=(s.children||[]).findIndex(f=>f.id===n.id);return d<0?s:{...s,children:[...s.children.slice(0,d+1),a,...s.children.slice(d+1)]}})},Tk=(e,t,n)=>{const r=ud(e,t);if(!r||!ud(e,n)||t===n||ud(r,n))return e;const a=U0(e,t);return dd(a,n,o=>({...o,children:[...o.children||[],r]}))},e9=e=>{const t=[`# ${e.title}`],n=(r,a)=>{r.id!==e.root.id&&t.push(`${"#".repeat(Math.min(a+1,6))} ${r.text}`),(r.children||[]).forEach(o=>n(o,a+1))};return n(e.root,0),`${t.join(`
619
619
  `)}
620
- `},t9=(e,t="Imported mind map")=>{var s,d,f;const r=e.split(/\r?\n/).filter(h=>h.trim()).map(h=>({line:h,match:h.match(/^(#{1,6})\s+(.+?)\s*$/)})).filter(({match:h})=>h),a=((f=(d=(s=r[0])==null?void 0:s.match)==null?void 0:d[2])==null?void 0:f.trim())||t,o={id:xs(),text:a,children:[]},l=[{depth:0,node:o}];return r.slice(1).forEach(({match:h})=>{var y;const p=h[1].length,g={id:xs(),text:h[2].trim(),children:[]};for(;l.length&&l[l.length-1].depth>=p;)l.pop();(((y=l[l.length-1])==null?void 0:y.node)||o).children.push(g),l.push({depth:p,node:g})}),X2({title:a,root:o})},Oc=(e,t,n="application/json")=>{const r=typeof Blob<"u"&&t instanceof Blob?t:new Blob([t],{type:n}),a=URL.createObjectURL(r),o=document.createElement("a");o.href=a,o.download=e,document.body.appendChild(o),o.click(),o.remove(),URL.revokeObjectURL(a)},dwe=e=>{const t=new Date(e);return Number.isNaN(t.getTime())?"Recently updated":new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",year:"numeric"}).format(t)},{Title:n9,Text:r9}=wn,$g=e=>e.replace(/\.(xmind|json|md|markdown|txt)$/i,"").replace(/[-_]+/g," ").trim()||"Imported mind map";function fwe({map:e}){const t=["#6555e8","#4f8edb","#36a269","#d98a34"];return c.jsxs("div",{className:"mind-map-mini-preview","aria-hidden":"true",children:[c.jsx("div",{className:"mind-map-mini-root",style:{background:e.root.color||t[0]},children:c.jsx("span",{className:"mind-map-mini-root-text",children:e.root.text})}),c.jsx("div",{className:"mind-map-mini-branches",children:(e.root.children||[]).slice(0,4).map((n,r)=>c.jsxs("div",{className:"mind-map-mini-branch",children:[c.jsx("span",{className:"mind-map-mini-line"}),c.jsx("span",{className:"mind-map-mini-node",style:{borderColor:n.color||t[r%t.length]},children:n.text})]},n.id))})]})}function mwe({map:e,index:t,onOpen:n,onDelete:r,onExport:a}){const o=[{key:"xmind",icon:c.jsx(Ol,{}),label:"Export XMind"},{key:"json",icon:c.jsx(Ol,{}),label:"Export JSON"},{key:"markdown",icon:c.jsx(Pi,{}),label:"Export Markdown"},{type:"divider"},{key:"delete",danger:!0,icon:c.jsx(Yn,{}),label:"Delete map"}],l=({key:s,domEvent:d})=>{d==null||d.stopPropagation(),s==="delete"&&r(e),(s==="xmind"||s==="json"||s==="markdown")&&a(e,s)};return c.jsxs(Pt,{className:`mind-map-card ${t===0?"is-featured":""}`,hoverable:!0,onClick:()=>n(e.id),onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),n(e.id))},role:"button",tabIndex:0,children:[c.jsxs("div",{className:"mind-map-card-topline",children:[c.jsx(wt,{className:"mind-map-card-type",children:"MIND MAP"}),c.jsx(wl,{menu:{items:o,onClick:l},trigger:["click"],children:c.jsx(Re,{"aria-label":`Actions for ${e.title}`,className:"mind-map-card-menu",icon:c.jsx(Gg,{}),onClick:s=>s.stopPropagation(),type:"text"})})]}),c.jsx(fwe,{map:e}),c.jsxs("div",{className:"mind-map-card-content",children:[c.jsxs("div",{className:"mind-map-card-title-row",children:[c.jsx(n9,{ellipsis:{rows:1,tooltip:e.title},level:3,children:e.title}),c.jsx(oi,{className:"mind-map-card-edit"})]}),c.jsxs("div",{className:"mind-map-card-meta-row",children:[c.jsxs(r9,{className:"mind-map-card-meta",children:[Y2(e.root)," nodes ",c.jsx("span",{children:"·"})," Updated ",dwe(e.updatedAt)]}),c.jsxs("span",{className:"mind-map-card-open",children:["Open map ",c.jsx("span",{"aria-hidden":"true",children:"→"})]})]})]})]})}function hwe({onNavigate:e}){const{message:t,modal:n}=Br.useApp(),[r,a]=i.useState([]),[o,l]=i.useState(!0),[s,d]=i.useState(""),f=i.useRef(null),h=async()=>{try{a(await Wi.list())}catch($){t.error(`Could not load mind maps: ${$.message||"unknown error"}`)}finally{l(!1)}};i.useEffect(()=>{h()},[]);const p=i.useMemo(()=>{const $=s.trim().toLowerCase();return $?r.filter(E=>`${E.title} ${E.root.text}`.toLowerCase().includes($)):r},[r,s]),g=()=>h(),v=$=>e(`mind-maps/${encodeURIComponent($)}`),y=async()=>{try{const $=await Wi.create(swe());a(E=>[$,...E]),v($.id)}catch($){t.error(`Could not create mind map: ${$.message||"unknown error"}`)}},C=async($,E)=>{try{if(E==="xmind"){const{mindMapToXmindBlob:k}=await Vc(async()=>{const{mindMapToXmindBlob:N}=await import("./xmindAdapter-D7oFEf8y.js");return{mindMapToXmindBlob:N}},[]),O=await k($);Oc(`${$.title||"mind-map"}.xmind`,O,"application/octet-stream"),t.success("XMind exported");return}if(E==="markdown"){Oc(`${$.title||"mind-map"}.md`,e9($),"text/markdown;charset=utf-8"),t.success("Markdown exported");return}Oc(`${$.title||"mind-map"}.json`,`${JSON.stringify($,null,2)}
621
- `,"application/json;charset=utf-8"),t.success("JSON exported")}catch(k){t.error(`Could not export this map: ${k.message||"unknown error"}`)}},x=$=>{n.confirm({title:"Delete this mind map?",content:`“${$.title}” will be removed from workspace data.`,okText:"Delete",okButtonProps:{danger:!0},cancelText:"Cancel",onOk:async()=>{await Wi.remove($.id),await g(),t.success("Mind map deleted")}})},S=async $=>{var k;const E=(k=$.target.files)==null?void 0:k[0];if($.target.value="",!!E)try{const O=E.name.toLowerCase().endsWith(".xmind"),N=O?null:await E.text(),R=E.name.toLowerCase().endsWith(".json"),j=O?await(async()=>{const{xmindBlobToMindMap:M}=await Vc(async()=>{const{xmindBlobToMindMap:P}=await import("./xmindAdapter-D7oFEf8y.js");return{xmindBlobToMindMap:P}},[]);return M(await E.arrayBuffer(),$g(E.name))})():R?X2(JSON.parse(N),$g(E.name)):t9(N,$g(E.name)),I=await Wi.create({...j,title:j.title||$g(E.name)});a(M=>[I,...M]),t.success(`${O?"XMind":R?"JSON":"Markdown"} imported`),v(I.id)}catch(O){t.error(`Could not import this file: ${O.message||"invalid format"}`)}};return c.jsxs("div",{className:"mind-map-page",children:[c.jsx(Xr,{actions:c.jsxs(it,{className:"mind-map-page-actions",size:10,children:[c.jsx("input",{ref:f,accept:".xmind,.json,.md,.markdown,.txt",className:"mind-map-hidden-input",onChange:S,type:"file"}),c.jsx(Re,{icon:c.jsx(Ev,{}),onClick:()=>{var $;return($=f.current)==null?void 0:$.click()},children:"Import"}),c.jsx(Re,{icon:c.jsx(nr,{}),onClick:y,type:"primary",children:"New mind map"})]}),description:"Turn scattered thoughts into a clear visual plan.",eyebrow:"PLAN & REVIEW",title:"Mind maps"}),c.jsxs("div",{className:"mind-map-list-summary",children:[c.jsxs("div",{children:[c.jsx(n9,{level:2,children:"Your workspace"}),c.jsxs(r9,{type:"secondary",children:[r.length," ",r.length===1?"map":"maps"," saved locally"]})]}),c.jsx($t,{allowClear:!0,className:"mind-map-search",onChange:$=>d($.target.value),placeholder:"Search maps...",prefix:c.jsx(yo,{}),value:s})]}),o?c.jsx("div",{className:"mind-map-loading",children:c.jsx("span",{children:"Loading mind maps..."})}):p.length?c.jsx("div",{className:"mind-map-card-grid",children:p.map(($,E)=>c.jsx(mwe,{index:E,map:$,onDelete:x,onExport:C,onOpen:v},$.id))}):c.jsx(Pt,{className:"mind-map-empty-card",children:c.jsx(qt,{description:s?"No maps match your search.":"No mind maps yet.",children:!s&&c.jsx(Re,{icon:c.jsx(nr,{}),onClick:y,type:"primary",children:"Create your first map"})})}),c.jsxs("div",{className:"mind-map-import-hint",children:[c.jsx(Ev,{})," ",c.jsx("span",{children:"Import XMind, JSON, or Markdown. Export XMind to continue editing in XMind."})]})]})}const Eg=40,pwe=8192,Pk=e=>String(e??"").replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&apos;"),Sc=(e,t)=>{const n=e.getBoundingClientRect();return{left:n.left-t.left,top:n.top-t.top,right:n.right-t.left,bottom:n.bottom-t.top,width:n.width,height:n.height}},Om=(e,t=0)=>{const n=Number.parseFloat(e);return Number.isFinite(n)?n:t},gwe=(e,t)=>{const n=e.nodeValue||"",r=new Map;let a=0;for(const o of n){const l=o.length;t.setStart(e,a),t.setEnd(e,a+l),a+=l;const s=t.getBoundingClientRect();if(!s.height)continue;const d=Math.round(s.top*2)/2,f=r.get(d)||{top:d,x:s.left,text:""};f.x=Math.min(f.x,s.left),f.text+=o,r.set(d,f)}return[...r.values()].sort((o,l)=>o.top-l.top)},vwe=(e,t)=>{var s;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),r=document.createRange(),a=document.createElement("canvas").getContext("2d"),o=[];let l=n.nextNode();for(;l;){const d=l.parentElement;if(!(d!=null&&d.closest(".mind-map-collapse"))&&((s=l.nodeValue)!=null&&s.trim())){const f=getComputedStyle(d),h=gwe(l,r),p=Om(f.fontSize,12),g=f.lineHeight==="normal"?p*1.2:Om(f.lineHeight,p*1.2),v=`${f.fontStyle} ${f.fontWeight} ${p}px ${f.fontFamily}`;a.font=v;const y=a.measureText("Mg"),C=y.fontBoundingBoxAscent||y.actualBoundingBoxAscent||p*.8,x=y.fontBoundingBoxDescent||y.actualBoundingBoxDescent||p*.2,S=Math.max(0,(g-C-x)/2)+C,$=Sc(d,t),E=getComputedStyle(d),k=["hidden","clip"].includes(E.overflowX)||["hidden","clip"].includes(E.overflowY)||E.textOverflow==="ellipsis";h.forEach(O=>{O.text&&o.push({text:O.text,x:O.x-t.left,y:O.top-t.top+S,font:`${f.fontStyle} ${f.fontWeight} ${p}px ${f.fontFamily}`,color:f.color,letterSpacing:f.letterSpacing,opacity:Om(f.opacity,1),clip:k?$:null})})}l=n.nextNode()}return o},bwe=(e,t)=>{const n=Sc(e,t),r=getComputedStyle(e),a=r.backgroundColor==="rgba(0, 0, 0, 0)"?"none":r.backgroundColor,o=Om(r.borderTopWidth),l=r.borderTopStyle==="none"||o===0?"none":r.borderTopColor,s=Math.min(Om(r.borderTopLeftRadius),n.width/2,n.height/2);return`<rect x="${n.left}" y="${n.top}" width="${n.width}" height="${n.height}" rx="${s}" fill="${Pk(a)}" stroke="${Pk(l)}" stroke-width="${o}"/>`},ywe=e=>{const t=e.getBoundingClientRect(),n=[],r=(o,l,s,d,f)=>{n.push(`<line x1="${o}" y1="${l}" x2="${s}" y2="${d}" stroke="${f}" stroke-width="1.5" stroke-linecap="round"/>`)};return[...e.querySelectorAll(".mind-map-ltr-children")].forEach(o=>{const l=Sc(o,t),d=[...o.children].filter(v=>v.classList.contains("mind-map-ltr-branch")).map(v=>({branch:v,row:v.querySelector(":scope > .mind-map-ltr-node-row"),node:v.querySelector(":scope > .mind-map-ltr-node-row > [data-mind-map-node]")})).filter(({row:v,node:y})=>v&&y);if(!d.length)return;const f=l.left,p=d.map(({row:v})=>Sc(v,t)).map(v=>v.top+v.height/2),g=o.classList.contains("is-comment-children")?"#9da9b6":"#c6cada";if(p.length>1&&r(f,p[0],f,p[p.length-1],g),d.forEach(({branch:v,node:y},C)=>{const x=Sc(y,t),S=v.classList.contains("is-comment-branch")?"#9da9b6":g;r(f,p[C],x.left,p[C],S)}),o.classList.contains("mind-map-ltr-root-children")){const v=e.querySelector(".mind-map-ltr-root-column > [data-mind-map-node]");if(v){const y=Sc(v,t);r(y.right,y.top+y.height/2,f,y.top+y.height/2,g)}}else{const v=o.parentElement,y=v==null?void 0:v.querySelector(":scope > .mind-map-ltr-node-row > [data-mind-map-node]");if(y){const C=Sc(y,t),x=v.classList.contains("is-comment-branch")?"#9da9b6":g;r(C.right,C.top+C.height/2,f,C.top+C.height/2,x)}}}),n.join("")},xwe=(e,t)=>{const n=e.getBoundingClientRect(),r=Math.floor(t.left-n.left-Eg),a=Math.floor(t.top-n.top-Eg),o=Math.ceil(t.right-t.left+Eg*2),l=Math.ceil(t.bottom-t.top+Eg*2),s=[...e.querySelectorAll(".mind-map-root-node, .mind-map-node, .mind-map-node-jira-tag")].map(h=>bwe(h,n)).join(""),d=vwe(e,n);return{svg:`<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${l}" viewBox="${r} ${a} ${o} ${l}"><rect x="${r}" y="${a}" width="${o}" height="${l}" fill="#ffffff"/>${ywe(e)}${s}</svg>`,width:o,height:l,left:r,top:a,text:d}},Cwe=async e=>{var p;if(!e)throw new Error("Mind map canvas is not ready.");const t=[...e.querySelectorAll("[data-mind-map-node], .mind-map-canvas-empty")];if(!t.length)throw new Error("Mind map canvas is empty.");(p=document.fonts)!=null&&p.ready&&await document.fonts.ready;const n=t.reduce((g,v)=>{const y=v.getBoundingClientRect();return{left:Math.min(g.left,y.left),top:Math.min(g.top,y.top),right:Math.max(g.right,y.right),bottom:Math.max(g.bottom,y.bottom)}},{left:1/0,top:1/0,right:-1/0,bottom:-1/0}),{svg:r,width:a,height:o,left:l,top:s,text:d}=xwe(e,n),f=new Image,h=URL.createObjectURL(new Blob([r],{type:"image/svg+xml;charset=utf-8"}));try{await new Promise((S,$)=>{f.onload=S,f.onerror=()=>$(new Error("Could not render the mind map image.")),f.src=h});const g=Math.min(2,pwe/Math.max(a,o)),v=document.createElement("canvas");v.width=Math.max(1,Math.round(a*g)),v.height=Math.max(1,Math.round(o*g));const y=v.getContext("2d");if(!y)throw new Error("Canvas is unavailable.");y.fillStyle="#ffffff",y.fillRect(0,0,v.width,v.height),y.drawImage(f,0,0,v.width,v.height),y.save(),y.scale(g,g),d.forEach(S=>{y.save(),y.font=S.font,y.fillStyle=S.color,y.globalAlpha=S.opacity,"letterSpacing"in y&&S.letterSpacing&&S.letterSpacing!=="normal"&&(y.letterSpacing=S.letterSpacing),S.clip&&(y.beginPath(),y.rect(S.clip.left-l,S.clip.top-s,S.clip.width,S.clip.height),y.clip()),y.textBaseline="alphabetic",y.fillText(S.text,S.x-l,S.y-s),y.restore()}),y.restore();const{encode:C}=await Vc(async()=>{const{encode:S}=await import("./index-_vMuByUV.js");return{encode:S}},[]),x=await C(y.getImageData(0,0,v.width,v.height),{quality:75,progressive:!0,optimize_coding:!0,auto_subsample:!0});return new Blob([x],{type:"image/jpeg"})}finally{URL.revokeObjectURL(h)}},{Text:To,Title:Dk}=wn,Pv=["#4f8edb","#36a269","#d98a34","#c05a83","#8a70c5"],Swe=3200,wwe=2200,cs=1600,$we=380,q0=e=>String((e==null?void 0:e.text)||"").trimStart().startsWith("#"),Ewe=e=>{var n;const t=e instanceof HTMLElement?e:null;return!!(t!=null&&t.isContentEditable||(n=t==null?void 0:t.closest)!=null&&n.call(t,'input, textarea, select, [contenteditable="true"]'))},a9=e=>e.reduce((t,n)=>{const r=String(n.edgeLabel||"").trim();return r?Math.max(t,Math.min(160,Math.max(72,r.length*7+16))):t},16),VS=(e,t,n=!1)=>({...e,collapsed:n?!1:t,children:(e.children||[]).map(r=>VS(r,t))}),o9=(e,t,n=!1)=>{const r=n||q0(e);return{...e,tested:r?!1:t,children:(e.children||[]).map(a=>o9(a,t,r))}},i9=(e,t)=>({...e,jiraKeys:(e.jiraKeys||[]).filter(n=>n!==t),children:(e.children||[]).map(n=>i9(n,t))}),l9=(e,t)=>{t.add(e.id),(e.children||[]).forEach(n=>l9(n,t))},s9=(e,t)=>t.has(e.id)?null:{label:e.text||"Untitled idea",value:e.id,children:(e.children||[]).map(n=>s9(n,t)).filter(Boolean)},c9=(e,t,n=[])=>{const r=[...n,e.id];if(e.id===t)return r;for(const a of e.children||[]){const o=c9(a,t,r);if(o)return o}return null},qx=e=>e.replace(/\.(xmind|json|md|markdown|txt)$/i,"").replace(/[-_]+/g," ").trim()||"Imported mind map",u9=(e,t,n=!1)=>{if(!e)return!1;const r=n||q0(e);return e.id===t?r:(e.children||[]).some(a=>u9(a,t,r))};function d9({node:e,jiraIssues:t}){const n=(e.jiraKeys||[]).map(r=>t.find(a=>a.key===r)||{key:r});return n.length?c.jsx("span",{className:"mind-map-node-jira-tags","aria-label":"Jira tags",children:n.map(r=>c.jsx("span",{className:"mind-map-node-jira-tag",title:r.summary||r.key,children:r.key},r.key))}):null}function f9({node:e,depth:t=0,selectedId:n,onSelect:r,onToggle:a,jiraIssues:o,commented:l=!1}){const s=e.color||Pv[t%Pv.length],d=e.children||[],f=q0(e),h=l||f,p=a9(d);return c.jsxs("div",{className:`mind-map-ltr-branch depth-${Math.min(t,4)}${h?" is-comment-branch":""}${f?" is-comment-marker":""}`,children:[c.jsxs("div",{className:"mind-map-ltr-node-row",children:[e.edgeLabel&&c.jsx("span",{className:"mind-map-ltr-edge-label",title:e.edgeLabel,children:e.edgeLabel}),c.jsxs("button",{className:`mind-map-node ${n===e.id?"is-selected":""} ${e.tested&&!h?"is-tested":""}${e.autoWidth===!1?" is-auto-width-disabled":""}${h?" is-comment":""}${f?" is-comment-marker":""}`,onClick:()=>r(e.id),"data-mind-map-node":e.id,style:{"--node-color":s},type:"button",children:[c.jsxs("span",{className:"mind-map-node-main",children:[c.jsx("span",{className:"mind-map-node-text",children:e.text||"Untitled idea"}),d.length>0&&c.jsx("span",{className:"mind-map-node-count",children:d.length})]}),c.jsx(d9,{jiraIssues:o,node:e})]}),d.length>0&&c.jsxs("button",{"aria-label":e.collapsed?"Expand branch":"Collapse branch",className:"mind-map-collapse",onClick:()=>a(e.id),type:"button",children:[c.jsx("span",{className:`mind-map-collapse-symbol ${e.collapsed?"is-visible":""}`,children:"+"}),c.jsx("span",{className:`mind-map-collapse-symbol ${e.collapsed?"":"is-visible"}`,children:"−"})]})]}),!e.collapsed&&d.length>0&&c.jsx("div",{className:`mind-map-ltr-children${h?" is-comment-children":""}`,style:{"--mind-map-ltr-node-inset":`${p}px`},children:d.map(g=>c.jsx(f9,{depth:t+1,node:g,onSelect:r,onToggle:a,selectedId:n,jiraIssues:o,commented:h},g.id))})]})}const m9=i.forwardRef(function({map:t,selectedId:n,onSelect:r,onToggle:a,jiraIssues:o,fitContent:l=!1},s){const d=t.root,f=d.children||[],h=d.color||"#6555e8",p=q0(d);return c.jsxs("div",{className:"mind-map-ltr-diagram",ref:s,style:l?{minWidth:0,minHeight:0,margin:0}:void 0,children:[c.jsx("div",{className:"mind-map-ltr-root-column",children:c.jsxs("button",{className:`mind-map-root-node ${n===d.id?"is-selected":""} ${d.tested&&!p?"is-tested":""}${d.autoWidth===!1?" is-auto-width-disabled":""}${p?" is-comment is-comment-marker":""}`,"data-mind-map-node":d.id,onClick:()=>r(d.id),style:{"--node-color":h},type:"button",children:[c.jsx("span",{className:"mind-map-root-text",children:d.text||"Untitled idea"}),c.jsxs("span",{className:"mind-map-root-count",children:[Y2(d)-1," connected ideas"]}),c.jsx(d9,{jiraIssues:o,node:d})]})}),!d.collapsed&&f.length>0&&c.jsx("div",{className:`mind-map-ltr-children mind-map-ltr-root-children${p?" is-comment-children":""}`,style:{"--mind-map-ltr-node-inset":`${a9(f)}px`},children:f.map(g=>c.jsx(f9,{node:g,onSelect:r,onToggle:a,selectedId:n,jiraIssues:o,commented:p},g.id))}),!f.length&&c.jsx("div",{className:"mind-map-canvas-empty",children:c.jsx(To,{type:"secondary",children:"Add a branch from the inspector to start mapping this idea."})})]})}),jwe=i.forwardRef(function({map:t},n){const r=i.useRef(null);return i.useLayoutEffect(()=>{const a=r.current;if(!a)return;const o=1;a.querySelectorAll(".mind-map-ltr-children").forEach(l=>{const s=[...l.children].map(v=>v.querySelector(":scope > .mind-map-ltr-node-row")).filter(Boolean);if(!s.length)return;const d=l.getBoundingClientRect(),f=s[0].getBoundingClientRect(),h=s[s.length-1].getBoundingClientRect(),p=(f.top+f.bottom)/2,g=(h.top+h.bottom)/2;l.style.setProperty("--mind-map-connector-top",`${Math.max(0,(p-d.top)/o)}px`),l.style.setProperty("--mind-map-connector-height",`${Math.max(0,(g-p)/o)}px`)})},[t]),c.jsx("div",{"aria-hidden":"true",className:"mind-map-export-offscreen",inert:"",children:c.jsx("div",{className:"mind-map-canvas-stage is-left-to-right mind-map-export-render",ref:n,style:{width:"max-content",height:"auto",padding:0,margin:0,zoom:1},children:c.jsx(m9,{fitContent:!0,jiraIssues:t.jiraIssues||[],map:t,onSelect:()=>{},onToggle:()=>{},ref:r,selectedId:null})})})}),Nwe=i.forwardRef(function({map:t,selectedId:n,zoom:r,resetViewToken:a,recenterLayoutToken:o,isPanning:l,onCanvasPointerDown:s,onCanvasPointerMove:d,onCanvasPointerUp:f,onSelect:h,onToggle:p,onZoomChange:g,jiraIssues:v},y){const C=i.useRef(null),x=i.useRef(null),S=i.useRef(r),$=i.useRef({meta:!1,ctrl:!1}),E=i.useRef(new Map),k=i.useRef(0),O=i.useRef(0),N=i.useRef(!1),R=i.useRef(o);S.current=r;const j=(T,L,D,F)=>{const V=T.querySelector(".mind-map-canvas-stage"),q=T.getBoundingClientRect(),B=V==null?void 0:V.getBoundingClientRect();return{fromZoom:L,toZoom:null,x:D,y:F,stageX:B?(q.left+D-B.left)/L:null,stageY:B?(q.top+F-B.top)/L:null}};i.useImperativeHandle(y,()=>({zoomAt(T){const L=C.current,D=S.current;!L||T===D||(x.current=j(L,D,L.clientWidth/2,L.clientHeight/2),x.current.toZoom=T,S.current=T,g(T))}}),[g]);const I=T=>{const L=T.target instanceof Element?T.target:null,D=L==null?void 0:L.closest("button[data-mind-map-node]");L!=null&&L.closest("button")&&!D||s(T,(D==null?void 0:D.dataset.mindMapNode)||null)},M=(T=null)=>{const L=C.current;if(!L)return;const D=[...L.querySelectorAll("[data-mind-map-node]")],F=L.querySelector(".mind-map-root-node");if(!D.length||!F)return;const V=L.getBoundingClientRect(),q=D.reduce((fe,J)=>{const Z=(T==null?void 0:T.get(J.dataset.mindMapNode))||J.getBoundingClientRect();return{left:Math.min(fe.left,Z.left),top:Math.min(fe.top,Z.top),right:Math.max(fe.right,Z.right),bottom:Math.max(fe.bottom,Z.bottom)}},{left:1/0,top:1/0,right:-1/0,bottom:-1/0}),B=(q.left+q.right)/2,U=(q.top+q.bottom)/2,K=(T==null?void 0:T.get(F.dataset.mindMapNode))||F.getBoundingClientRect();let _=L.scrollLeft+B-V.left-L.clientWidth/2,G=L.scrollTop+U-V.top-L.clientHeight/2;const X=_-L.scrollLeft,Y=G-L.scrollTop,le=K.left-X,oe=K.right-X,ue=K.top-Y,ne=K.bottom-Y,te=V.left+24,ee=V.right-24,Q=V.top+24,ae=V.bottom-24;oe<te&&(_+=oe-te),le>ee&&(_+=le-ee),ne<Q&&(G+=ne-Q),ue>ae&&(G+=ue-ae),L.scrollLeft=Math.max(0,Math.min(_,L.scrollWidth-L.clientWidth)),L.scrollTop=Math.max(0,Math.min(G,L.scrollHeight-L.clientHeight))},P=()=>{const T=C.current;if(!T)return;const L=S.current||1;T.querySelectorAll(".mind-map-ltr-children").forEach(D=>{const F=[...D.children].map(_=>_.querySelector(":scope > .mind-map-ltr-node-row")).filter(Boolean);if(!F.length)return;const V=D.getBoundingClientRect(),q=F[0].getBoundingClientRect(),B=F[F.length-1].getBoundingClientRect(),U=(q.top+q.bottom)/2,K=(B.top+B.bottom)/2;D.style.setProperty("--mind-map-connector-top",`${Math.max(0,(U-V.top)/L)}px`),D.style.setProperty("--mind-map-connector-height",`${Math.max(0,(K-U)/L)}px`)})},A=()=>{const T=C.current;!T||N.current||(E.current=new Map([...T.querySelectorAll("[data-mind-map-node]")].map(L=>[L.dataset.mindMapNode,L.getBoundingClientRect()])))};i.useLayoutEffect(()=>{P()},[t,r]),i.useLayoutEffect(()=>{M()},[t.id]),i.useLayoutEffect(()=>{const T=C.current;if(!T)return;const L=o!==R.current;R.current=o;const D=[...T.querySelectorAll("[data-mind-map-node]")],F=new Map(D.map(X=>[X.dataset.mindMapNode,X.getBoundingClientRect()])),V=E.current,q=new Map(D.map(X=>{const Y=X.dataset.mindMapNode;return[Y,X.style.transform?F.get(Y):V.get(Y)||F.get(Y)]}));cancelAnimationFrame(k.current),k.current=0,window.clearTimeout(O.current),O.current=0,N.current=!1,D.forEach(X=>{X.style.transition="none",X.style.transform="",X.style.opacity=""}),T.offsetHeight;const B=new Map(D.map(X=>[X.dataset.mindMapNode,X.getBoundingClientRect()]));let U=B;if(L&&(N.current=!0,M(B),U=new Map(D.map(X=>[X.dataset.mindMapNode,X.getBoundingClientRect()]))),!V.size){N.current=!1,E.current=U;return}const K=new Map(D.map(X=>{const Y=X.dataset.mindMapNode,le=q.get(Y),oe=B.get(Y);return[Y,le&&oe?{x:(le.left-oe.left)/(S.current||1),y:(le.top-oe.top)/(S.current||1)}:null]})),_=[...K.values()].filter(X=>X&&(Math.abs(X.x)>=1||Math.abs(X.y)>=1));if(!(_.length<=40&&_.every(X=>Math.max(Math.abs(X.x),Math.abs(X.y))<=900))){N.current=!1,E.current=U;return}return N.current=_.length>0,D.forEach(X=>{const Y=q.get(X.dataset.mindMapNode),le=B.get(X.dataset.mindMapNode);if(!Y||!le){X.style.opacity="1";return}const oe=K.get(X.dataset.mindMapNode),ue=oe.x,ne=oe.y;Math.abs(ue)<1&&Math.abs(ne)<1||(X.style.transition="none",X.style.transform=`translate(${ue}px, ${ne}px)`)}),D.forEach(X=>void X.offsetWidth),k.current=requestAnimationFrame(()=>{D.forEach(X=>{const Y=q.get(X.dataset.mindMapNode);X.style.transition="transform 380ms cubic-bezier(.22, 1, .36, 1), opacity 220ms ease",X.style.transform="",Y||(X.style.opacity="1")}),k.current=0,O.current=window.setTimeout(()=>{N.current=!1,A(),O.current=0},$we+16)}),E.current=U,()=>{cancelAnimationFrame(k.current),k.current=0,window.clearTimeout(O.current),O.current=0,N.current=!1}},[t]),i.useLayoutEffect(()=>{const T=C.current,L=x.current;if(!T||!L||L.toZoom!==r)return;const D=T.getBoundingClientRect(),F=T.querySelector(".mind-map-canvas-stage"),V=F==null?void 0:F.getBoundingClientRect(),q=L.stageX===null||!V?cs+(L.x+T.scrollLeft-cs)*(r/L.fromZoom)-L.x:T.scrollLeft+V.left+L.stageX*r-(D.left+L.x),B=L.stageY===null||!V?cs+(L.y+T.scrollTop-cs)*(r/L.fromZoom)-L.y:T.scrollTop+V.top+L.stageY*r-(D.top+L.y);T.scrollLeft=Math.max(0,Math.min(q,T.scrollWidth-T.clientWidth)),T.scrollTop=Math.max(0,Math.min(B,T.scrollHeight-T.clientHeight)),x.current=null},[r]),i.useLayoutEffect(()=>{if(a===0)return;const T=requestAnimationFrame(()=>M());return()=>cancelAnimationFrame(T)},[a]),i.useEffect(()=>{const T=F=>{F.key==="Meta"&&($.current.meta=!0),F.key==="Control"&&($.current.ctrl=!0)},L=F=>{F.key==="Meta"&&($.current.meta=!1),F.key==="Control"&&($.current.ctrl=!1)},D=()=>{$.current={meta:!1,ctrl:!1}};return window.addEventListener("keydown",T),window.addEventListener("keyup",L),window.addEventListener("blur",D),()=>{window.removeEventListener("keydown",T),window.removeEventListener("keyup",L),window.removeEventListener("blur",D)}},[]);const H=i.useCallback(T=>{var _,G;const L=C.current;if(!L||!L.contains(T.target))return;const D=T.metaKey||((_=T.getModifierState)==null?void 0:_.call(T,"Meta"))||$.current.meta,F=T.ctrlKey||((G=T.getModifierState)==null?void 0:G.call(T,"Control"))||$.current.ctrl;if(!D&&!F||!T.deltaY)return;T.preventDefault(),T.returnValue=!1,T.stopPropagation();const V=L.getBoundingClientRect(),q=S.current,B=T.deltaMode===1?T.deltaY*16:T.deltaY,U=Math.min(Math.abs(B),48)*Math.sign(B),K=Math.max(.5,Math.min(2,Number((q*Math.pow(1.1,-U/24)).toFixed(3))));K!==q&&(x.current=j(L,q,T.clientX-V.left,T.clientY-V.top),x.current.toZoom=K,S.current=K,g(K))},[g]);return i.useEffect(()=>(window.addEventListener("wheel",H,{capture:!0,passive:!1}),()=>window.removeEventListener("wheel",H,{capture:!0})),[H]),c.jsx("div",{className:`mind-map-canvas-scroll ${l?"is-panning":""}`,ref:C,onPointerCancel:f,onPointerDown:I,onPointerMove:d,onPointerUp:f,onScroll:A,children:c.jsx("div",{className:"mind-map-canvas-world",style:{height:`${wwe*r+cs*2}px`,width:`${Swe*r+cs*2}px`},children:c.jsx("div",{className:"mind-map-canvas-stage is-left-to-right",style:{marginLeft:`${cs}px`,marginTop:`${cs}px`,zoom:r},children:c.jsx(m9,{jiraIssues:v,map:t,onSelect:h,onToggle:p,selectedId:n})})})})});function Owe({mindMapId:e,onNavigate:t}){const{message:n}=Br.useApp(),r=i.useRef(null),[a,o]=i.useState(null),[l,s]=i.useState(null),[d,f]=i.useState(null),[h,p]=i.useState(""),[g,v]=i.useState(!0),[y,C]=i.useState(1),[x,S]=i.useState(0),[$,E]=i.useState(0),[k,O]=i.useState(!1),[N,R]=i.useState(!1),[j,I]=i.useState(""),[M,P]=i.useState(!1),[A,H]=i.useState(""),[T,L]=i.useState(!1),[D,F]=i.useState(!1),[V,q]=i.useState([]),[B,U]=i.useState(!1),[K,_]=i.useState(!1),G=i.useRef(null),X=i.useRef(null),Y=i.useRef(null),le=i.useRef(null),oe=i.useRef(!1),ue=i.useRef(null),ne=i.useRef(Promise.resolve());i.useEffect(()=>{let je=!0;return v(!0),o(null),f(null),U(!1),Wi.get(e).then(Le=>{je&&(o(Le),p(Le.title||""),C(1),S(0),O(!1),G.current=null)}).catch(Le=>{je&&n.error(`Could not load mind map: ${Le.message||"unknown error"}`)}).finally(()=>{je&&v(!1)}),()=>{je=!1}},[e]),i.useEffect(()=>{a&&d&&!ud(a.root,d)&&f(null)},[a,d]),i.useEffect(()=>{var je,Le;oe.current&&(oe.current=!1,(Le=(je=le.current)==null?void 0:je.focus)==null||Le.call(je))},[d]),i.useEffect(()=>{if(!K)return;const je=Le=>{Le.key==="Escape"&&_(!1)};return window.addEventListener("keydown",je),()=>window.removeEventListener("keydown",je)},[K]);const te=i.useMemo(()=>d?ud(a==null?void 0:a.root,d):null,[a,d]),ee=i.useMemo(()=>u9(a==null?void 0:a.root,d),[a,d]),Q=i.useMemo(()=>rh(a==null?void 0:a.root,d),[a,d]),ae=(a==null?void 0:a.jiraIssues)||[],fe=i.useMemo(()=>{const je=new Set,Le=et=>{((et==null?void 0:et.jiraKeys)||[]).forEach(Te=>je.add(Te)),((et==null?void 0:et.children)||[]).forEach(Le)};return Le(a==null?void 0:a.root),je},[a]),J=i.useMemo(()=>((te==null?void 0:te.jiraKeys)||[]).map(je=>ae.find(Le=>Le.key===je)||{key:je,summary:"Summary unavailable",url:""}),[ae,te]),Z=i.useMemo(()=>{if(!a||!te||!Q)return[];const je=new Set;l9(te,je);const Le=s9(a.root,je);return Le?[Le]:[]},[a,te,Q]),he=je=>{if(!a)return;const Le={...je(a),updatedAt:new Date().toISOString()};o(Le),ne.current=ne.current.catch(()=>{}).then(()=>Wi.update(Le.id,Le)).catch(()=>new Promise((et,Te)=>{window.setTimeout(()=>{Wi.update(Le.id,Le).then(et).catch(Te)},120)})).catch(et=>n.error(`Could not save mind map: ${et.message||"unknown error"}`))},$e=()=>{const je=h.trim()||"Untitled mind map";p(je),he(Le=>({...Le,title:je,root:Le.root.text===Le.title?{...Le.root,text:je}:Le.root}))},Ie=je=>{te&&he(Le=>({...Le,root:dd(Le.root,te.id,et=>({...et,...je}))}))},re=()=>{if(!te||ee)return;const je=!te.tested;he(Le=>({...Le,root:dd(Le.root,te.id,et=>o9(et,je))}))},ce=(je=0)=>({id:`node-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,7)}`,text:"New idea",color:Pv[je%Pv.length],tested:!1,children:[]}),ve=()=>{if(!te)return;const je=ce((te.children||[]).length);Ie({children:[...te.children||[],je],collapsed:!1}),oe.current=!0,f(je.id)},be=()=>{if(!te||!Q){ve();return}const je=ce(Q.children.findIndex(Le=>Le.id===te.id)+1);he(Le=>({...Le,root:cwe(Le.root,te.id,je)})),oe.current=!0,f(je.id)},Ce=()=>{!te||!Q||!rh(a==null?void 0:a.root,Q.id)||he(je=>({...je,root:uwe(je.root,te.id)}))};i.useEffect(()=>{const je=Le=>{if(!(!a||!te||Le.defaultPrevented||Le.isComposing||Le.repeat)&&!(Le.altKey||Le.ctrlKey||Le.metaKey)&&!(Le.key!=="Enter"&&Le.key!=="Tab")&&!(Le.key==="Enter"&&Ewe(Le.target))){if(Le.key==="Tab"){const et=document.querySelector(".mind-map-inspector-card"),Te=(et==null?void 0:et.matches(":hover"))||!1,Ue=Le.target instanceof Element&&!!Le.target.closest(".mind-map-inspector-card");if(Te&&!Ue)return}if(Le.preventDefault(),Le.key==="Tab"){Le.shiftKey?Ce():ve();return}be()}};return window.addEventListener("keydown",je),()=>window.removeEventListener("keydown",je)},[a,te,Q]);const ge=()=>{if(!te||!Q)return;const je=Q.id;he(Le=>({...Le,root:U0(Le.root,te.id)})),f(je),n.success("Idea removed")},Oe=()=>{Q&&(q(c9(a.root,Q.id)||[]),F(!0))},Ee=()=>{const je=V[V.length-1];if(!te||!Q||!je)return;if(Tk(a.root,te.id,je)===a.root){n.error("Please choose another valid parent node.");return}he(et=>({...et,root:Tk(et.root,te.id,je)})),F(!1),n.success(`Moved “${te.text||"idea"}” successfully.`)},De=()=>{R(!0)},Ae=async()=>{const je=lwe(j);if(!je){n.error("Enter a Jira No such as PROJ-123 or a Jira issue link.");return}P(!0);try{const Le=await Wi.resolveJiraIssue(j);if(ae.some(et=>et.key===Le.key)){n.info(`${Le.key} is already in this map.`);return}he(et=>({...et,jiraIssues:[...et.jiraIssues||[],Le]})),I(""),n.success(`${Le.key} added to this map.`)}catch(Le){n.error(Le.message||`Could not load ${je.key} from Jira.`)}finally{P(!1)}},Be=je=>{he(Le=>({...Le,jiraIssues:(Le.jiraIssues||[]).filter(et=>et.key!==je),root:i9(Le.root,je)}))},ze=async je=>{H(je.key);try{const Le=await Wi.resolveJiraIssue(je.key);he(et=>({...et,jiraIssues:(et.jiraIssues||[]).map(Te=>Te.key===je.key?{...Te,summary:Le.summary,url:Le.url||Te.url}:Te)})),n.success(`${je.key} summary refreshed`)}catch(Le){n.error(Le.message||`Could not refresh ${je.key}.`)}finally{H("")}},qe=je=>{Ie({jiraKeys:((te==null?void 0:te.jiraKeys)||[]).filter(Le=>Le!==je)})},_e=je=>{je&&(f(je),U(!0))},Ne=(je,Le)=>{var Te;if(je.button!==0)return;const et=je.currentTarget;et&&(je.preventDefault(),(Te=et.setPointerCapture)==null||Te.call(et,je.pointerId),G.current={canvas:et,pointerId:je.pointerId,startX:je.clientX,startY:je.clientY,startScrollLeft:et.scrollLeft,startScrollTop:et.scrollTop,nodeId:Le,moved:!1},Le&&_e(Le),O(!0))},xe=je=>{const Le=G.current;if(!Le||Le.pointerId!==je.pointerId)return;const et=Le.canvas||je.currentTarget;!Le.moved&&Math.hypot(je.clientX-Le.startX,je.clientY-Le.startY)<3||(Le.moved=!0,et.scrollLeft=Le.startScrollLeft-(je.clientX-Le.startX),et.scrollTop=Le.startScrollTop-(je.clientY-Le.startY))},Pe=je=>{var et,Te,Ue,ct;const Le=G.current;!Le||je.pointerId!==void 0&&Le.pointerId!==je.pointerId||(!Le.moved&&!Le.nodeId&&U(!1),(Te=(et=Le.canvas)==null?void 0:et.releasePointerCapture)==null||Te.call(et,Le.pointerId),(ct=(Ue=je.currentTarget)==null?void 0:Ue.releasePointerCapture)==null||ct.call(Ue,Le.pointerId),G.current=null,O(!1))};i.useEffect(()=>{const je=Le=>Pe(Le);return window.addEventListener("pointerup",je),window.addEventListener("pointercancel",je),window.addEventListener("blur",je),()=>{window.removeEventListener("pointerup",je),window.removeEventListener("pointercancel",je),window.removeEventListener("blur",je)}},[]);const He=je=>{he(Le=>({...Le,root:dd(Le.root,je,et=>({...et,collapsed:!et.collapsed}))}))},ke=(je,Le=!1)=>{he(et=>({...et,root:VS(et.root,je,!0)})),Le&&E(et=>et+1)},We=async je=>{var Le;if(a)try{if(je==="xmind"){const{mindMapToXmindBlob:et}=await Vc(async()=>{const{mindMapToXmindBlob:Ue}=await import("./xmindAdapter-D7oFEf8y.js");return{mindMapToXmindBlob:Ue}},[]),Te=await et(a);Oc(`${a.title||"mind-map"}.xmind`,Te,"application/octet-stream"),n.success("XMind exported");return}if(je==="markdown"){Oc(`${a.title||"mind-map"}.md`,e9(a),"text/markdown;charset=utf-8"),n.success("Markdown exported");return}if(je==="jpg"){(Le=document.fonts)!=null&&Le.ready&&await document.fonts.ready,s({...a,root:VS(a.root,!1,!0)}),await new Promise(et=>requestAnimationFrame(()=>requestAnimationFrame(et)));try{const et=await Cwe(Y.current);Oc(`${a.title||"mind-map"}.jpg`,et,"image/jpeg"),n.success("JPG exported")}finally{s(null)}return}Oc(`${a.title||"mind-map"}.json`,`${JSON.stringify(a,null,2)}
622
- `,"application/json;charset=utf-8"),n.success("JSON exported")}catch(et){n.error(`Could not export this map: ${et.message||"unknown error"}`)}},st=async je=>{var et;const Le=(et=je.target.files)==null?void 0:et[0];if(je.target.value="",!(!Le||!a))try{const Te=Le.name.toLowerCase().endsWith(".xmind"),Ue=Te?null:await Le.text(),ct=Le.name.toLowerCase().endsWith(".json"),rt=Te?await(async()=>{const{xmindBlobToMindMap:ot}=await Vc(async()=>{const{xmindBlobToMindMap:ht}=await import("./xmindAdapter-D7oFEf8y.js");return{xmindBlobToMindMap:ht}},[]);return ot(await Le.arrayBuffer(),qx(Le.name))})():ct?X2(JSON.parse(Ue),qx(Le.name)):t9(Ue,qx(Le.name)),Xe={...rt,id:a.id,title:rt.title||a.title,createdAt:a.createdAt,updatedAt:new Date().toISOString()};await ne.current.catch(()=>{});const Ze=await Wi.update(a.id,Xe);o(Ze),_e(Xe.root.id),p(Ze.title),n.success(`${Te?"XMind":ct?"JSON":"Markdown"} imported into this map`)}catch(Te){n.error(`Could not import this file: ${Te.message||"invalid format"}`)}},Je=async()=>{if(a!=null&&a.filePath)try{await Xn.openFolder(a.filePath)}catch(je){n.error(`Could not open map folder: ${je.message||"unknown error"}`)}},Fe=async()=>{if(a!=null&&a.filePath)try{await navigator.clipboard.writeText(a.filePath),n.success("Mind map file path copied")}catch(je){n.error(`Could not copy file path: ${je.message||"clipboard unavailable"}`)}};if(g)return c.jsx("div",{className:"mind-map-missing",children:c.jsx(lr,{tip:"Loading mind map..."})});if(!a)return c.jsxs("div",{className:"mind-map-missing",children:[c.jsx(qt,{description:"This mind map could not be found."}),c.jsx(Re,{onClick:()=>t("mind-maps"),children:"Back to mind maps"})]});const Qe=B&&!!d;return c.jsxs("div",{className:`mind-map-detail-page${K?" is-canvas-fullscreen":""}`,children:[c.jsxs("div",{className:"mind-map-detail-toolbar",children:[c.jsxs("div",{className:"mind-map-detail-heading",children:[c.jsx(Re,{"aria-label":"Back to mind maps",className:"mind-map-back-button",icon:c.jsx(Is,{}),onClick:()=>t("mind-maps"),type:"text"}),c.jsx("div",{className:"mind-map-breadcrumbs",children:c.jsx("button",{onClick:()=>t("mind-maps"),type:"button",children:"Mind maps"})}),c.jsx($t,{"aria-label":"Mind map title",className:"mind-map-title-input",onBlur:$e,onChange:je=>p(je.target.value),onPressEnter:je=>je.currentTarget.blur(),value:h})]}),c.jsxs(it,{className:"mind-map-detail-actions",size:8,children:[c.jsx("input",{ref:r,accept:".xmind,.json,.md,.markdown,.txt",className:"mind-map-hidden-input",onChange:st,type:"file"}),c.jsx(Re,{icon:c.jsx(E2,{}),onClick:()=>{var je;return(je=r.current)==null?void 0:je.click()},children:"Import"}),c.jsx(wl,{menu:{items:[{key:"xmind",icon:c.jsx(rO,{}),label:"Export XMind"},{key:"jpg",icon:c.jsx(Kg,{}),label:"Export JPG"},{key:"json",icon:c.jsx(Oa,{}),label:"Export JSON"},{key:"markdown",icon:c.jsx(Pi,{}),label:"Export Markdown"}],onClick:({key:je})=>We(je)},trigger:["click"],children:c.jsx(Re,{icon:c.jsx(Ol,{}),children:"Export"})}),c.jsx(Re,{"aria-label":"Mind map settings",icon:c.jsx(Ms,{}),onClick:De,children:"Settings"}),c.jsx(Re,{icon:c.jsx(N2,{}),onClick:()=>n.success("All changes saved to the data file"),children:"Save"})]})]}),c.jsxs("div",{className:`mind-map-detail-layout${Qe?"":" is-inspector-collapsed"}`,children:[c.jsxs(Pt,{className:"mind-map-canvas-card",styles:{body:{padding:0}},children:[c.jsxs("div",{className:"mind-map-canvas-header",children:[c.jsxs("div",{className:"mind-map-canvas-heading",children:[c.jsx(To,{className:"mind-map-eyebrow",children:"CANVAS"}),c.jsxs("div",{className:"mind-map-canvas-title-row",children:[c.jsx(Dk,{level:3,children:"Map canvas"}),c.jsx(To,{className:"mind-map-canvas-tip",type:"secondary",children:"Tip: keep each branch short and concrete."})]})]}),c.jsxs(it,{className:"mind-map-canvas-controls",size:12,children:[c.jsx(Re,{"aria-label":K?"Exit canvas full screen":"Enter canvas full screen",icon:K?c.jsx(OP,{}):c.jsx(kP,{}),onClick:()=>{_(je=>!je),S(je=>je+1)},type:"text"}),c.jsx(Re,{"aria-label":Qe?"Collapse inspector":"Show inspector",className:"mind-map-inspector-control",icon:Qe?c.jsx(lpe,{}):c.jsx(upe,{}),onClick:()=>U(je=>!je),type:"text"}),c.jsxs(it,{className:"mind-map-tree-actions",size:4,children:[c.jsx(Re,{icon:c.jsx(dP,{}),onClick:()=>ke(!1),children:"Expand all"}),c.jsx(Re,{icon:c.jsx(uP,{}),onClick:()=>ke(!0,!0),children:"Collapse all"})]}),c.jsxs(it,{className:"mind-map-zoom-control",size:4,children:[c.jsx(Re,{"aria-label":"Zoom out",disabled:y<=.5,icon:c.jsx(j7,{}),onClick:()=>{var je;return(je=X.current)==null?void 0:je.zoomAt(Math.max(.5,Number((y-.1).toFixed(2))))},type:"text"}),c.jsxs("button",{"aria-label":"Reset canvas view",className:"mind-map-zoom-label",onClick:()=>{C(1),S(je=>je+1)},type:"button",children:[Math.round(y*100),"%"]}),c.jsx(Re,{"aria-label":"Zoom in",disabled:y>=2,icon:c.jsx(E7,{}),onClick:()=>{var je;return(je=X.current)==null?void 0:je.zoomAt(Math.min(2,Number((y+.1).toFixed(2))))},type:"text"})]})]})]}),c.jsx(Nwe,{ref:X,isPanning:k,map:a,onCanvasPointerDown:Ne,onCanvasPointerMove:xe,onCanvasPointerUp:Pe,onSelect:_e,onToggle:He,onZoomChange:C,recenterLayoutToken:$,resetViewToken:x,selectedId:d,zoom:y,jiraIssues:ae}),c.jsx("div",{className:"mind-map-canvas-footer",children:c.jsxs(To,{type:"secondary",children:[c.jsx("span",{className:"mind-map-key",children:"⌘"})," Click to select ",c.jsx("span",{className:"mind-map-footer-dot",children:"·"})," ",c.jsx("span",{className:"mind-map-key",children:"Enter"})," sibling ",c.jsx("span",{className:"mind-map-footer-dot",children:"·"})," ",c.jsx("span",{className:"mind-map-key",children:"Tab"})," child ",c.jsx("span",{className:"mind-map-footer-dot",children:"·"})," Drag canvas to pan ",c.jsx("span",{className:"mind-map-footer-dot",children:"·"})," ⌘ + Scroll to zoom ",c.jsx("span",{className:"mind-map-footer-dot",children:"·"})," Changes save automatically"]})})]}),c.jsx(Pt,{className:"mind-map-inspector-card",children:c.jsxs("div",{className:"mind-map-inspector-shell",children:[c.jsxs("div",{className:"mind-map-inspector-header",children:[c.jsxs("div",{children:[c.jsx(To,{className:"mind-map-eyebrow",children:"INSPECTOR"}),c.jsxs("div",{className:"mind-map-inspector-title-row",children:[c.jsx(Dk,{level:3,children:"Selected idea"}),(te==null?void 0:te.id)===a.root.id?c.jsx(wt,{color:"purple",children:"Root"}):null,ee?c.jsx(wt,{className:"mind-map-comment-tag",children:"Comment"}):null]})]}),(te==null?void 0:te.id)!==a.root.id&&c.jsx(la,{cancelText:"Cancel",description:"This will also remove all child ideas.",okButtonProps:{danger:!0},okText:"Delete",onConfirm:ge,placement:"topRight",title:"Delete this idea?",children:c.jsx(Re,{"aria-label":"Delete selected idea",className:"mind-map-inline-delete",danger:!0,icon:c.jsx(Yn,{}),type:"text"})})]}),c.jsx("div",{className:"mind-map-inspector-content",children:te&&c.jsxs("div",{className:"mind-map-inspector-fields",children:[c.jsxs("section",{className:"mind-map-inspector-section",children:[c.jsx("div",{className:"mind-map-inspector-section-title",children:"Content"}),c.jsxs("div",{className:"mind-map-idea-label-row",children:[c.jsx("label",{className:"mind-map-field-label",htmlFor:"mind-map-node-text",children:"Idea"}),c.jsxs("div",{className:"mind-map-auto-width-field",children:[c.jsx(vn,{title:"When off, text wraps only at manual line breaks.",placement:"top",children:c.jsx("span",{className:"mind-map-auto-width-label",children:"Auto width"})}),c.jsx(ki,{"aria-label":"Auto width",checked:te.autoWidth!==!1,onChange:je=>Ie({autoWidth:je}),size:"small"})]})]}),c.jsx($t.TextArea,{autoSize:{minRows:2,maxRows:8},className:"mind-map-idea-input",id:"mind-map-node-text",onChange:je=>Ie({text:je.target.value}),placeholder:"Name this idea",ref:le,value:te.text}),Q&&c.jsxs(c.Fragment,{children:[c.jsx("label",{className:"mind-map-field-label",htmlFor:"mind-map-node-edge-label",children:"Line label"}),c.jsx($t,{id:"mind-map-node-edge-label",onChange:je=>Ie({edgeLabel:je.target.value||void 0}),placeholder:"Label this connection",value:te.edgeLabel||""})]}),c.jsx("label",{className:"mind-map-field-label",htmlFor:"mind-map-node-notes",children:"Notes"}),c.jsx($t.TextArea,{autoSize:{minRows:4,maxRows:8},id:"mind-map-node-notes",onChange:je=>Ie({notes:je.target.value}),placeholder:"Add a note or a prompt...",value:te.notes||""})]}),!ee&&c.jsxs("section",{className:"mind-map-inspector-section",children:[c.jsx("div",{className:"mind-map-inspector-section-title",children:"Test status"}),c.jsxs("div",{className:"mind-map-tested-field",children:[c.jsxs("div",{children:[c.jsx("span",{className:"mind-map-field-label",children:"Tested"}),c.jsx(To,{type:"secondary",children:"Updates this node and all child nodes."})]}),c.jsxs("div",{className:"mind-map-tested-control",children:[c.jsx("span",{className:"mind-map-tested-state",children:te.tested?"Tested":"Pending"}),c.jsx(ki,{checked:!!te.tested,onChange:re})]})]})]}),c.jsxs("section",{className:"mind-map-inspector-section",children:[c.jsx("div",{className:"mind-map-inspector-section-title",children:"Jira"}),J.length>0&&c.jsx("div",{"aria-label":"Selected Jira issues",className:"mind-map-selected-jira-list",children:J.map(je=>c.jsxs("div",{className:"mind-map-selected-jira-item",children:[c.jsxs("button",{className:"mind-map-selected-jira-open",disabled:!je.url,onClick:()=>hr(je.url),title:je.url?"Open in Jira":"Jira link unavailable",type:"button",children:[c.jsx(wt,{color:"blue",children:je.key}),c.jsx("span",{className:"mind-map-selected-jira-summary",children:je.summary||"Summary unavailable"}),je.url&&c.jsx(qi,{})]}),c.jsx("button",{"aria-label":`Untag ${je.key}`,className:"mind-map-selected-jira-untag",onClick:()=>qe(je.key),title:`Untag ${je.key}`,type:"button",children:c.jsx(Vo,{})})]},je.key))}),c.jsx(In,{allowClear:!0,"aria-label":"Jira tags",className:"mind-map-node-jira-select",filterOption:(je,Le)=>`${(Le==null?void 0:Le.value)||""} ${(Le==null?void 0:Le.summary)||""}`.toLowerCase().includes(je.toLowerCase()),id:"mind-map-node-jira",mode:"multiple",onChange:je=>{Ie({jiraKeys:je}),L(!1),requestAnimationFrame(()=>{var Le,et;return(et=(Le=ue.current)==null?void 0:Le.blur)==null?void 0:et.call(Le)})},options:ae.map(je=>({label:c.jsxs("div",{className:"mind-map-jira-select-option",children:[c.jsx("span",{className:"mind-map-jira-select-option-key",children:je.key}),c.jsx("span",{className:"mind-map-jira-select-option-summary",children:je.summary||"Summary unavailable"})]}),summary:je.summary||"",value:je.key})),maxTagCount:0,maxTagPlaceholder:"Select Jira issues",onOpenChange:L,placeholder:ae.length?"Select Jira issues":"Add Jira issues in Settings",showSearch:!0,open:T,ref:ue,value:te.jiraKeys||[]})]})]})}),c.jsxs("div",{className:"mind-map-inspector-actions",children:[c.jsx(vn,{title:"Add a child idea (Tab)",children:c.jsx(Re,{block:!0,className:"mind-map-add-child",icon:c.jsx(nr,{}),onClick:ve,type:"primary",children:"Add child idea"})}),Q&&c.jsx(Re,{block:!0,className:"mind-map-move-button",icon:c.jsx(rO,{}),onClick:Oe,children:"Move idea"})]})]})})]}),c.jsxs(o2,{className:"mind-map-settings-drawer",onClose:()=>R(!1),open:N,title:"Mind map settings",width:520,children:[c.jsxs("div",{className:"mind-map-settings-section",children:[c.jsx(To,{className:"mind-map-settings-section-title",children:"File location"}),c.jsx(To,{className:"mind-map-settings-description",children:"This mind map is stored locally in the following file."}),c.jsxs(it.Compact,{block:!0,className:"mind-map-file-location-row",children:[c.jsxs("div",{className:`mind-map-file-location-display${a.filePath?"":" is-unavailable"}`,title:a.filePath||"File location unavailable",children:[c.jsx(Re,{"aria-label":"Open mind map folder",className:"mind-map-file-location-folder",disabled:!a.filePath,icon:c.jsx(Lr,{}),onClick:Je,type:"text"}),c.jsx(To,{className:"mind-map-file-location-path",children:a.filePath||"File location unavailable"})]}),c.jsx(Re,{disabled:!a.filePath,icon:c.jsx(vo,{}),onClick:Fe,children:"Copy"})]})]}),c.jsxs("div",{className:"mind-map-settings-section",children:[c.jsx(To,{className:"mind-map-settings-section-title",children:"Jira issues"}),c.jsx(To,{className:"mind-map-settings-description",children:"Add issues to this map by Jira No or a Jira issue link, then tag them from the selected node inspector."}),c.jsxs(it.Compact,{block:!0,className:"mind-map-jira-add-row",children:[c.jsx($t,{onChange:je=>I(je.target.value),onPressEnter:Ae,placeholder:"PROJ-123 or https://.../browse/PROJ-123",value:j}),c.jsx(Re,{loading:M,onClick:Ae,type:"primary",children:"Add"})]}),c.jsx("div",{className:"mind-map-jira-list",children:ae.length?ae.map(je=>c.jsxs("div",{className:`mind-map-jira-list-item ${je.url?"is-clickable":""} ${fe.has(je.key)?"is-tagged":""}`,onClick:()=>je.url&&hr(je.url),onKeyDown:Le=>{Le.target!==Le.currentTarget||!je.url||(Le.key==="Enter"||Le.key===" ")&&(Le.preventDefault(),hr(je.url))},role:je.url?"link":void 0,tabIndex:je.url?0:void 0,children:[c.jsx("div",{className:"mind-map-jira-list-item-main",children:c.jsxs("div",{className:"mind-map-jira-list-item-title",children:[c.jsx(wt,{color:"blue",children:je.key}),c.jsx(To,{ellipsis:{tooltip:!0},children:je.summary||"Summary unavailable"})]})}),c.jsxs("div",{className:"mind-map-jira-list-item-delete",onClick:Le=>Le.stopPropagation(),children:[c.jsx(Re,{"aria-label":`Refresh summary for ${je.key}`,className:"mind-map-jira-refresh",disabled:!!A,icon:c.jsx(go,{spin:A===je.key}),onClick:()=>void ze(je),title:`Refresh summary for ${je.key}`,type:"text"}),c.jsx(la,{cancelText:"Cancel",description:"Existing node tags for this issue will also be removed.",okButtonProps:{danger:!0},okText:"Remove",onConfirm:()=>Be(je.key),placement:"left",title:`Remove ${je.key}?`,children:c.jsx(Re,{"aria-label":`Remove ${je.key}`,danger:!0,icon:c.jsx(Yn,{}),type:"text"})})]})]},je.id||je.key)):c.jsx(qt,{className:"mind-map-jira-empty",description:"No Jira issues added yet.",image:qt.PRESENTED_IMAGE_SIMPLE})})]})]}),c.jsxs(bn,{cancelText:"Cancel",okText:"Move",onCancel:()=>F(!1),onOk:Ee,open:D,title:`Move “${(te==null?void 0:te.text)||"idea"}”`,children:[c.jsx(To,{type:"secondary",children:"Choose the node that should become the new parent. The entire subtree will move with it."}),c.jsx(Rl,{changeOnSelect:!0,className:"mind-map-move-select",onChange:q,options:Z,placeholder:"Select a parent node",showSearch:!0,value:V})]}),l&&c.jsx(jwe,{map:l,ref:Y})]})}async function kwe(e,t={}){if(typeof window>"u"||!("Notification"in window)||Notification.permission!=="granted")return!1;const n={body:"",icon:"/devbuddy-192.png",tag:`devbuddy-notification-${Date.now()}`,...t};try{if("serviceWorker"in navigator){const r=await navigator.serviceWorker.ready;if(r.active)return r.active.postMessage({type:"SHOW_NOTIFICATION",title:e,...n}),!0}return new Notification(e,n),!0}catch{return!1}}const{Content:Rwe,Sider:Iwe}=Os,{Title:zk,Text:hc}=wn,Ak={dark:"#6555e8",light:"#dbeafe"},Mwe="var(--db-font-sans)",Twe=(e,t)=>{var r;const n=(r=e==null?void 0:e.scripts)==null?void 0:r.find(a=>a.id===t);return n?n.name:t==="install"?"Install":t.startsWith("package:")?t.slice(8):t},Pwe=(e,t)=>{const[n,...r]=String(t).split(":"),a=r.join(":"),o=e.find(l=>String(l.id)===n);return`${(o==null?void 0:o.alias)||(o==null?void 0:o.folder)||"Launcher"} · ${Twe(o,a)}`},h9=["overview","launcher","clipboard","ports","image-compress","json-to-typescript","jira-filters","todo-list","memos","mind-maps","postman","bookmark-sync","file-organizer","branch-sync","branch-health","package-upgrade","package-versions","presentation-plan","presentation-view","settings","dev-configurations","errors"],p9=e=>{if(e==="mind-maps"||e==="mind-maps/")return{page:"mind-maps",mindMapId:null};if(e.startsWith("mind-maps/")){const t=e.slice(10).split("?")[0];return t?{page:"mind-maps",mindMapId:decodeURIComponent(t)}:null}return null},Dwe=()=>{const t=(window.location.hash||"#/overview").slice(2),n=p9(t);return n||(t.startsWith("plugin:")?{page:"plugin",pluginId:t.slice(7)}:t.startsWith("static:")?{page:"static-page",staticId:t.slice(7)}:t.startsWith("logs/")?{page:"logs",pluginId:null}:["todo-list/archived","todo-archived"].includes(t)?{page:"todo-archived",pluginId:null}:t.startsWith("pr-review")?{page:"pr-review",pluginId:null}:t==="pr-conflicts"||t.startsWith("pr-conflicts?")?{page:"pr-conflicts",pluginId:null}:t.startsWith("pr-conflict")?{page:"pr-conflict",pluginId:null}:t.startsWith("branch-sync")?{page:"branch-sync",pluginId:null}:t.startsWith("branch-health")?{page:"branch-health",pluginId:null}:t==="home"?{page:"overview",pluginId:null}:h9.includes(t)?{page:t,pluginId:null}:{page:"overview",pluginId:null})};function zwe({theme:e,onThemeChange:t}){var Oe;const{message:n}=Br.useApp(),r=Dwe(),[a,o]=i.useState([]),[l,s]=i.useState(new Set),[d,f]=i.useState({}),[h,p]=i.useState([]),[g,v]=i.useState(!0),[y,C]=i.useState(null),[x,S]=i.useState(!1),[$,E]=i.useState(!1),[k,O]=i.useState([]),[N,R]=i.useState([]),[j,I]=i.useState(r.page),[M,P]=i.useState(r.mindMapId||null),[A,H]=i.useState(()=>{var Ee;return((Ee=window.matchMedia)==null?void 0:Ee.call(window,"(max-width: 991.98px)").matches)??!1}),[T,L]=i.useState(null),[D,F]=i.useState(!1),[V,q]=i.useState(!1),[B,U]=i.useState(""),[K,_]=i.useState(null),[G,X]=i.useState(!1),Y=i.useRef(null),le=i.useRef(new Map),oe=i.useRef(null),[ue,ne]=i.useState(r.pluginId?{id:r.pluginId,name:"Plugin"}:null),[te,ee]=i.useState(null),[Q,ae]=i.useState(""),fe=async({showLoading:Ee=!1}={})=>{Ee&&v(!0);try{const[De,Ae,Be]=await Promise.all([Pr.list(),Pr.running(),Nc.list().catch(()=>[])]);o(De),p(Array.isArray(Be)?Be:[]),Array.isArray(Ae)?(s(new Set(Ae)),f({})):(s(new Set((Ae==null?void 0:Ae.running)||[])),f((Ae==null?void 0:Ae.errorCounts)||{})),S(!0),C(null),E(!0)}catch(De){C((De==null?void 0:De.message)||"Unable to load service and runtime data."),E(!1)}finally{Ee&&v(!1)}};i.useEffect(()=>{const Ee=async()=>{try{const[Ae,Be]=await Promise.all([Pr.running(),Nc.list().catch(()=>[])]);Array.isArray(Ae)?(s(new Set(Ae)),f({})):(s(new Set((Ae==null?void 0:Ae.running)||[])),f((Ae==null?void 0:Ae.errorCounts)||{})),Array.isArray(Be)&&p(Be)}catch{}},De=setInterval(()=>{Ee()},5e3);return()=>clearInterval(De)},[]),i.useEffect(()=>{if(!x)return;const Ee=Object.fromEntries(Object.entries(d).map(([ke,We])=>[ke,Number(We)||0])),De=(Array.isArray(h)?h:[]).filter(ke=>{var We;return(We=ke==null?void 0:ke.source)==null?void 0:We.startsWith("Launcher")}),Ae=new Set(De.map(ke=>ke.id).filter(Boolean)),Be=Y.current;if(!Be){Y.current={counts:Ee,ids:Ae};return}const ze=Object.entries(Ee).filter(([ke,We])=>We>(Be.counts[ke]||0)).map(([ke,We])=>({key:ke,delta:We-(Be.counts[ke]||0),count:We})),qe=De.filter(ke=>ke.id&&!Be.ids.has(ke.id));Y.current={counts:Ee,ids:Ae};const _e=[...ze.map(ke=>({dedupeKey:ke.key,label:Pwe(a,ke.key),count:ke.delta})),...qe.map(ke=>({dedupeKey:ke.source,label:`${ke.source.replace(/^Launcher:\s*/,"")} · ${ke.message||"Script error"}`,count:1}))],Ne=Date.now(),xe=_e.filter(ke=>{const We=le.current.get(ke.dedupeKey)||0;return Ne-We<1e4?!1:(le.current.set(ke.dedupeKey,Ne),!0)});if(xe.length===0)return;const Pe=xe.reduce((ke,We)=>ke+We.count,0),He=xe.slice(0,3).map(ke=>ke.label).join(";");kwe(Pe===1?"Launcher script error":`Launcher: ${Pe} new script errors`,{body:He||"A Launcher script reported a new error."})},[d,h,x,a]);const J=async(Ee=!1)=>{F(!0);try{L(await sO.status(Ee))}catch{L(De=>De||{currentVersion:Wu.version,latestVersion:Wu.version,updateAvailable:!1,releases:[],sourceUnavailable:!0})}finally{F(!1)}},Z=()=>fe({showLoading:!0}),he=()=>{_(null),X(!0)},$e=()=>{const Ee=K==null?void 0:K.success;X(!1),Ee&&window.location.reload()},Ie=async(Ee="latest")=>{q(!0),U(Ee),_(null);try{const De=await sO.selfUpdate(Ee);_({success:!0,message:De.message}),L(Ae=>Ae&&{...Ae,currentVersion:Ee==="latest"?Ae.latestVersion:Ee,updateAvailable:Ee==="latest"?!1:Ee!==Ae.latestVersion})}catch(De){_({success:!1,message:De.message||"DevBuddy could not be updated."})}finally{q(!1)}},re=async Ee=>{if(Ee){ae("Loading plugin…");try{ae(Ee.view?await(await fetch(Ee.view)).text():"This plugin does not provide a view yet.")}catch{ae("Failed to load the plugin view.")}}};i.useEffect(()=>{Promise.all([fe({showLoading:!0}),hge.list().then(O),Cc.list().then(R)]).catch(Ee=>n.error(Ee.message)),J()},[]),i.useEffect(()=>{const Ee=()=>{const Ae=(window.location.hash||"#/overview").slice(2),Be=p9(Ae);if(Be){ne(null),ee(null),I("mind-maps"),P(Be.mindMapId);return}if(Ae.startsWith("plugin:")){const ze=Ae.slice(7),qe=k.find(_e=>_e.id===ze);qe?(ee(null),I("plugin"),P(null),ne(qe),re(qe)):k.length>0&&(window.location.hash="#/overview")}else if(Ae.startsWith("static:")){const ze=Ae.slice(7),qe=N.find(_e=>String(_e.id)===String(ze));qe?(ne(null),I("static-page"),P(null),ee(qe)):N.length>0&&(window.location.hash="#/overview")}else Ae.startsWith("logs/")?(ne(null),ee(null),I("logs"),P(null)):["todo-list/archived","todo-archived"].includes(Ae)?(ne(null),ee(null),I("todo-archived"),P(null)):Ae.startsWith("pr-review")?(ne(null),ee(null),I("pr-review"),P(null)):Ae==="pr-conflicts"||Ae.startsWith("pr-conflicts?")?(ne(null),ee(null),I("pr-conflicts"),P(null)):Ae.startsWith("pr-conflict")?(ne(null),ee(null),I("pr-conflict"),P(null)):Ae.startsWith("branch-sync")?(ne(null),ee(null),I("branch-sync"),P(null)):Ae.startsWith("branch-health")?(ne(null),ee(null),I("branch-health"),P(null)):Ae==="home"||h9.includes(Ae)?(ne(null),ee(null),I(Ae==="home"?"overview":Ae),P(null)):window.location.hash="#/overview"};return window.addEventListener("hashchange",Ee),window.location.hash?Ee():window.location.hash="#/overview",()=>window.removeEventListener("hashchange",Ee)},[k,N]),i.useEffect(()=>{const Ee=Ae=>{var Be;(Ae.error||Ae.message)&&Nc.log({source:"Frontend",message:Ae.message||"Uncaught JavaScript Error",details:((Be=Ae.error)==null?void 0:Be.stack)||`${Ae.filename}:${Ae.lineno}:${Ae.colno}`}).catch(()=>{})},De=Ae=>{var Be,ze;Nc.log({source:"Frontend (Promise)",message:((Be=Ae.reason)==null?void 0:Be.message)||String(Ae.reason||"Unhandled Promise Rejection"),details:((ze=Ae.reason)==null?void 0:ze.stack)||String(Ae.reason)}).catch(()=>{})};return window.addEventListener("error",Ee),window.addEventListener("unhandledrejection",De),()=>{window.removeEventListener("error",Ee),window.removeEventListener("unhandledrejection",De)}},[]),i.useLayoutEffect(()=>{var Ee;(Ee=document.querySelector(".page"))==null||Ee.scrollTo({top:0,left:0,behavior:"auto"}),j==="overview"&&oe.current&&(oe.current.scrollTop=0,oe.current.scrollLeft=0)},[j,M,ue==null?void 0:ue.id,te==null?void 0:te.id]);const ce=()=>{oe.current&&(oe.current.scrollTop=0,oe.current.scrollLeft=0)};i.useEffect(()=>{const Ee=De=>{(De.metaKey||De.ctrlKey)&&De.shiftKey&&(De.key==="r"||De.key==="R"||De.code==="KeyR")&&(De.preventDefault(),De.stopPropagation())};return window.addEventListener("keydown",Ee,!0),()=>window.removeEventListener("keydown",Ee,!0)},[]),i.useEffect(()=>{if(g||!["overview","launcher","ports"].includes(j))return;const Ee=setInterval(()=>{fe()},2e3);return()=>clearInterval(Ee)},[j,g]);const ve=i.useMemo(()=>{const Ee=[...k.map(De=>({key:`plugin:${De.id}`,icon:c.jsx("span",{"aria-hidden":"true",children:De.icon||"✦"}),label:De.name||De.id})),...N.map(De=>({key:`static:${De.id}`,icon:c.jsx(Kd,{}),label:De.name}))];return[{type:"group",label:"Run & Observe",children:[{key:"launcher",icon:c.jsx(Lo,{}),label:"Launcher"},{key:"clipboard",icon:c.jsx(vo,{}),label:"Clipboard"},{key:"ports",icon:c.jsx(O2,{}),label:"Port Diagnostic"}]},{type:"group",label:"Plan & Review",children:[{key:"todo-list",icon:c.jsx(Bc,{}),label:"To-Do"},{key:"memos",icon:c.jsx(Pi,{}),label:"Memos"},{key:"mind-maps",icon:c.jsx(ux,{}),label:"Mind Maps"},{key:"pr-review",icon:c.jsx(A0,{}),label:"PR Review"},{key:"pr-conflicts",icon:c.jsx(wv,{}),label:"Resolve Conflicts"},{key:"jira-filters",icon:c.jsx(vhe,{}),label:"Jira Workspace"},{key:"presentation-plan",icon:c.jsx(Rhe,{}),label:"Presentations"},{key:"branch-sync",icon:c.jsx(Mc,{}),label:"Branch Sync"},{key:"branch-health",icon:c.jsx(j2,{}),label:"Branch Health"},{key:"package-upgrade",icon:c.jsx(IP,{}),label:"Package Upgrade"},{key:"package-versions",icon:c.jsx(Jfe,{}),label:"Package Versions"}]},{type:"group",label:"Utilities",children:[{key:"postman",icon:c.jsx(Hc,{}),label:"Postman"},{key:"image-compress",icon:c.jsx(jS,{}),label:"Image compression"},{key:"json-to-typescript",icon:c.jsx(Oa,{}),label:"JSON to TypeScript"},{key:"bookmark-sync",icon:c.jsx(Zm,{}),label:"Bookmark Sync"},{key:"file-organizer",icon:c.jsx(Lr,{}),label:"Folder Organizer"}]},...Ee.length>0?[{type:"group",label:"Extensions",children:Ee}]:[]]},[k,N]),be=({key:Ee})=>{window.location.hash=`#/${Ee}`},Ce=ue?`plugin:${ue.id}`:te?`static:${te.id}`:j==="todo-archived"?"todo-list":["pr-conflicts","pr-conflict"].includes(j)?"pr-conflicts":j,ge=y&&!(g&&!x)?c.jsx(Or,{type:x?"warning":"error",showIcon:!0,message:x?"Service status may be out of date":"Unable to load services",description:y,action:c.jsx(Re,{size:"small",loading:g,onClick:Z,children:"Retry"}),className:"launcher-data-notice"}):null;return j==="logs"?c.jsx($ve,{}):j==="presentation-view"?c.jsx($0e,{}):c.jsxs(Os,{className:"workbench",children:[c.jsxs(Iwe,{"aria-label":"DevBuddy navigation",breakpoint:"lg",className:"sidebar",collapsed:A,collapsedWidth:64,collapsible:!0,onBreakpoint:H,onCollapse:H,width:240,children:[c.jsxs("div",{className:"brand-row",children:[c.jsxs("a",{className:"brand",href:"#/overview","aria-current":j==="overview"?"page":void 0,"aria-label":`Go to Overview — DevBuddy version ${Wu.version}`,onClick:ce,children:[c.jsx("span",{className:`brand-mark ${$?"":"is-offline"}`,"aria-hidden":"true",children:"✦"}),c.jsx("span",{className:"brand-name",children:"DevBuddy"}),c.jsxs("span",{className:"brand-version",children:["v",Wu.version]})]}),!A&&c.jsx(vn,{title:T!=null&&T.updateAvailable?`Update available: v${T.latestVersion}`:"View Change Log",children:c.jsx(ia,{dot:!!(T!=null&&T.updateAvailable),color:"#f5b942",offset:[-2,3],children:c.jsx(Re,{"aria-label":T!=null&&T.updateAvailable?`Update available: version ${T.latestVersion}`:"View Change Log",className:`sidebar-update-button ${T!=null&&T.updateAvailable?"has-update":""}`,icon:c.jsx(ux,{}),loading:D&&!T,onClick:he,type:"text"})})})]}),c.jsx("nav",{ref:oe,className:"sidebar-nav","aria-label":"Main navigation",children:c.jsx(js,{theme:e==="light"?"light":"dark",mode:"inline",tabIndex:-1,selectedKeys:[Ce],items:ve,onClick:be})}),c.jsx("div",{className:"sidebar-bottom",children:c.jsx("div",{className:"sidebar-bottom-inner",children:c.jsx("nav",{"aria-label":"Settings navigation",children:c.jsx(js,{className:"sidebar-settings-menu",theme:e==="light"?"light":"dark",mode:"inline",tabIndex:-1,selectedKeys:["settings","errors"].includes(j)?[j]:[],items:[{key:"settings",icon:c.jsx(Ms,{}),label:"Settings"}],onClick:be})})})})]}),c.jsx(Os,{children:c.jsx(Rwe,{className:`page ${["static-page","postman"].includes(j)?"is-static-page":""} ${["overview","postman","static-page"].includes(j)?"":"is-workspace-content"} ${j==="mind-maps"&&M?"is-mind-map-detail":""} ${j==="presentation-plan"?"is-presentation-plan":""} ${j==="json-to-typescript"?"is-json-to-typescript":""} ${j==="memos"?"is-memos":""}`,children:ue?c.jsxs(c.Fragment,{children:[c.jsx(hc,{type:"secondary",children:"PLUGIN"}),c.jsx(zk,{level:2,children:ue.name}),c.jsx(Pt,{children:c.jsx("div",{dangerouslySetInnerHTML:{__html:Q}})})]}):j==="static-page"&&te?c.jsx("div",{className:"static-page-container",children:c.jsx("iframe",{src:te.url,title:te.name,className:"static-page-iframe"})}):j==="image-compress"?c.jsx(Qge,{}):j==="json-to-typescript"?c.jsx(R0e,{}):j==="mind-maps"?M?c.jsx(Owe,{mindMapId:M,onNavigate:Ee=>{window.location.hash=`#/${Ee}`}}):c.jsx(hwe,{onNavigate:Ee=>{window.location.hash=`#/${Ee}`}}):j==="overview"?c.jsx(u0e,{launchers:a,running:l,errorCounts:d,errorLogs:h,plugins:k,staticPages:N,loading:g,error:y,hasLoaded:x,onRetry:Z,onNavigate:Ee=>{window.location.hash=`#/${Ee}`}}):j==="clipboard"?c.jsx(Oge,{}):j==="ports"?c.jsx(Hge,{refreshLaunchers:fe}):j==="pr-review"?c.jsx(nve,{}):j==="pr-conflicts"?c.jsx(xO,{listOnly:!0},"pr-conflicts"):j==="pr-conflict"?c.jsx(xO,{},"pr-conflict"):j==="jira-filters"?c.jsx(fve,{}):j==="todo-list"?c.jsx(bve,{}):j==="memos"?c.jsx(iwe,{}):j==="todo-archived"?c.jsx(Cve,{}):j==="presentation-plan"?c.jsx(w0e,{}):j==="postman"?c.jsx(Ave,{}):j==="bookmark-sync"?c.jsx(Lve,{}):j==="file-organizer"?c.jsx(Bve,{}):j==="branch-sync"?c.jsx(Fve,{}):j==="branch-health"?c.jsx(qve,{}):j==="package-upgrade"?c.jsx(Gve,{}):j==="package-versions"?c.jsx(Yve,{}):j==="errors"?c.jsx(Eve,{}):j==="settings"?c.jsx(Wge,{theme:e,onThemeChange:t,onStaticPagesChange:()=>Cc.list().then(R)}):j==="dev-configurations"?c.jsx(Kge,{}):c.jsxs(c.Fragment,{children:[ge,(g||x||!y)&&c.jsx(Fge,{launchers:a,running:l,errorCounts:d,refresh:fe,loading:g&&!x})]})})}),c.jsx(bn,{className:"changelog-modal",footer:[(T==null?void 0:T.updateAvailable)&&!(K!=null&&K.success)&&c.jsx(Re,{type:"primary",loading:V&&B==="latest",onClick:()=>Ie(),children:"Update now"},"update"),c.jsx(Re,{disabled:V,loading:D,onClick:()=>J(!0),children:"Check again"},"refresh"),c.jsx(Re,{type:"primary",disabled:V,onClick:$e,children:K!=null&&K.success?"Close & reload":"Close"},"close")],onCancel:$e,closable:!V,maskClosable:!V,open:G,title:c.jsxs("div",{className:"changelog-title",children:[c.jsx("span",{className:`changelog-bulb ${T!=null&&T.updateAvailable?"has-update":""}`,children:c.jsx(ux,{})}),c.jsx("span",{children:"Updates"})]}),width:680,children:D&&!T?c.jsx("div",{className:"changelog-loading",children:c.jsx(lr,{})}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"changelog-version-row",children:[c.jsxs("div",{children:[c.jsx(hc,{type:"secondary",children:"Installed"}),c.jsxs(hc,{strong:!0,children:["v",(T==null?void 0:T.currentVersion)||Wu.version]})]}),c.jsxs("div",{children:[c.jsx(hc,{type:"secondary",children:"Latest"}),c.jsxs(hc,{strong:!0,children:["v",(T==null?void 0:T.latestVersion)||Wu.version]})]}),c.jsx(wt,{color:T!=null&&T.updateAvailable?"gold":"green",children:T!=null&&T.updateAvailable?"Update available":"Up to date"})]}),(T==null?void 0:T.sourceUnavailable)&&c.jsx(Or,{className:"changelog-source-alert",message:"Could not reach the configured npm registry. Showing locally available release notes.",showIcon:!0,type:"info"}),K&&c.jsx(Or,{className:"changelog-source-alert",description:K.message,message:K.success?"DevBuddy updated successfully":"DevBuddy update failed",showIcon:!0,type:K.success?"success":"error"}),c.jsx("div",{className:"changelog-release-list",children:(Oe=T==null?void 0:T.releases)!=null&&Oe.length?T.releases.slice(0,5).map(Ee=>c.jsxs("section",{className:"changelog-release",children:[c.jsxs("div",{className:"changelog-release-heading",children:[c.jsxs("div",{className:"changelog-release-title",children:[c.jsxs(wt,{className:"changelog-release-version",children:["v",Ee.version]}),c.jsx(zk,{level:4,children:Ee.name})]}),c.jsxs("div",{className:"changelog-release-actions",children:[Ee.publishedAt&&c.jsx(hc,{type:"secondary",children:new Date(Ee.publishedAt).toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1})}),c.jsx(Re,{size:"small",type:Ee.version===(T==null?void 0:T.latestVersion)?"primary":"default",disabled:V||Ee.version===(T==null?void 0:T.currentVersion),loading:V&&B===Ee.version,onClick:()=>Ie(Ee.version),children:Ee.version===(T==null?void 0:T.currentVersion)?"Installed":"Install"})]})]}),c.jsx(hc,{className:"changelog-release-notes",children:Ee.notes||"Published to the configured npm registry."})]},`${Ee.version}-${Ee.publishedAt||""}`)):c.jsx(qt,{description:"No published release notes yet.",image:qt.PRESENTED_IMAGE_SIMPLE})})]})})]})}function Awe(){const[e,t]=i.useState(()=>document.documentElement.dataset.theme||localStorage.getItem("devbuddy-theme")||"dark");return i.useEffect(()=>{Xn.status().then(n=>{const r=n.theme==="light"?"light":"dark";t(r),localStorage.setItem("devbuddy-theme",r)}).catch(()=>{})},[]),i.useLayoutEffect(()=>{var n;document.documentElement.dataset.theme=e,localStorage.setItem("devbuddy-theme",e),(n=document.querySelector('meta[name="theme-color"]'))==null||n.setAttribute("content",Ak[e]||Ak.dark)},[e]),i.useLayoutEffect(()=>{const n=()=>{document.querySelectorAll('[role="tab"], [role="tabpanel"]').forEach(o=>{document.activeElement===o&&o.blur(),o.tabIndex!==-1&&(o.tabIndex=-1)})};n();const r=new MutationObserver(n),a=o=>{var l,s;(s=(l=o.target).matches)!=null&&s.call(l,'[role="tab"], [role="tabpanel"]')&&o.target.blur()};return document.addEventListener("focusin",a,!0),r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["tabindex"]}),()=>{r.disconnect(),document.removeEventListener("focusin",a,!0)}},[]),c.jsx(di,{theme:{token:{fontFamily:Mwe,borderRadius:10,colorBgLayout:e==="light"?"#f7f8fc":"#f4f5fa",colorInfo:e==="light"?"#2e83d2":"#6555e8",colorLink:e==="light"?"#2e83d2":"#5b4cc4",colorLinkActive:e==="light"?"#2474bd":"#5143c2",colorLinkHover:e==="light"?"#4593d8":"#7669ee",colorPrimary:e==="light"?"#2e83d2":"#6555e8",colorPrimaryActive:e==="light"?"#2474bd":"#5143c2",colorPrimaryHover:e==="light"?"#4593d8":"#7669ee",controlOutline:e==="light"?"rgba(46, 131, 210, .2)":"rgba(101, 85, 232, .22)",colorTextSecondary:"#667085"},components:{Layout:{bodyBg:e==="light"?"#f7f8fc":"#f4f5fa",siderBg:e==="light"?"#ffffff":"#171c2b",triggerBg:e==="light"?"#f8f9fc":"#101522",triggerColor:e==="light"?"#667085":"#c9ced8"},Menu:{darkItemBg:"#171c2b",darkItemSelectedBg:"#6555e8",darkSubMenuItemBg:"#171c2b",itemSelectedBg:"#eeecff",itemSelectedColor:"#5143c2"}}},children:c.jsx(Br,{children:c.jsx(zwe,{theme:e,onThemeChange:t})})})}const Lwe=/Macintosh|Mac OS X|iPhone|iPad/i.test(navigator.userAgent);document.documentElement.dataset.platform=Lwe?"mac":"other";const _we=jA.createRoot(document.getElementById("app"));_we.render(c.jsx(Awe,{}));"serviceWorker"in navigator&&window.addEventListener("load",()=>{navigator.serviceWorker.register("/sw.js",{updateViaCache:"none"}).catch(e=>{console.warn("DevBuddy service worker registration failed:",e)})});requestAnimationFrame(()=>{requestAnimationFrame(()=>{window.setTimeout(()=>{const e=document.getElementById("app-splash");e&&(e.classList.add("is-hidden"),window.setTimeout(()=>e.remove(),700))},700)})});export{Fo as g,X2 as n};
620
+ `},t9=(e,t="Imported mind map")=>{var s,d,f;const r=e.split(/\r?\n/).filter(h=>h.trim()).map(h=>({line:h,match:h.match(/^(#{1,6})\s+(.+?)\s*$/)})).filter(({match:h})=>h),a=((f=(d=(s=r[0])==null?void 0:s.match)==null?void 0:d[2])==null?void 0:f.trim())||t,o={id:xs(),text:a,children:[]},l=[{depth:0,node:o}];return r.slice(1).forEach(({match:h})=>{var y;const p=h[1].length,g={id:xs(),text:h[2].trim(),children:[]};for(;l.length&&l[l.length-1].depth>=p;)l.pop();(((y=l[l.length-1])==null?void 0:y.node)||o).children.push(g),l.push({depth:p,node:g})}),X2({title:a,root:o})},Oc=(e,t,n="application/json")=>{const r=typeof Blob<"u"&&t instanceof Blob?t:new Blob([t],{type:n}),a=URL.createObjectURL(r),o=document.createElement("a");o.href=a,o.download=e,document.body.appendChild(o),o.click(),o.remove(),URL.revokeObjectURL(a)},hwe=e=>{const t=new Date(e);return Number.isNaN(t.getTime())?"Recently updated":new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",year:"numeric"}).format(t)},{Title:n9,Text:r9}=wn,$g=e=>e.replace(/\.(xmind|json|md|markdown|txt)$/i,"").replace(/[-_]+/g," ").trim()||"Imported mind map";function pwe({map:e}){const t=["#6555e8","#4f8edb","#36a269","#d98a34"];return c.jsxs("div",{className:"mind-map-mini-preview","aria-hidden":"true",children:[c.jsx("div",{className:"mind-map-mini-root",style:{background:e.root.color||t[0]},children:c.jsx("span",{className:"mind-map-mini-root-text",children:e.root.text})}),c.jsx("div",{className:"mind-map-mini-branches",children:(e.root.children||[]).slice(0,4).map((n,r)=>c.jsxs("div",{className:"mind-map-mini-branch",children:[c.jsx("span",{className:"mind-map-mini-line"}),c.jsx("span",{className:"mind-map-mini-node",style:{borderColor:n.color||t[r%t.length]},children:n.text})]},n.id))})]})}function gwe({map:e,index:t,onOpen:n,onDelete:r,onExport:a}){const o=[{key:"xmind",icon:c.jsx(Ol,{}),label:"Export XMind"},{key:"json",icon:c.jsx(Ol,{}),label:"Export JSON"},{key:"markdown",icon:c.jsx(Pi,{}),label:"Export Markdown"},{type:"divider"},{key:"delete",danger:!0,icon:c.jsx(Yn,{}),label:"Delete map"}],l=({key:s,domEvent:d})=>{d==null||d.stopPropagation(),s==="delete"&&r(e),(s==="xmind"||s==="json"||s==="markdown")&&a(e,s)};return c.jsxs(Pt,{className:`mind-map-card ${t===0?"is-featured":""}`,hoverable:!0,onClick:()=>n(e.id),onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),n(e.id))},role:"button",tabIndex:0,children:[c.jsxs("div",{className:"mind-map-card-topline",children:[c.jsx(wt,{className:"mind-map-card-type",children:"MIND MAP"}),c.jsx(wl,{menu:{items:o,onClick:l},trigger:["click"],children:c.jsx(Re,{"aria-label":`Actions for ${e.title}`,className:"mind-map-card-menu",icon:c.jsx(Gg,{}),onClick:s=>s.stopPropagation(),type:"text"})})]}),c.jsx(pwe,{map:e}),c.jsxs("div",{className:"mind-map-card-content",children:[c.jsxs("div",{className:"mind-map-card-title-row",children:[c.jsx(n9,{ellipsis:{rows:1,tooltip:e.title},level:3,children:e.title}),c.jsx(oi,{className:"mind-map-card-edit"})]}),c.jsxs("div",{className:"mind-map-card-meta-row",children:[c.jsxs(r9,{className:"mind-map-card-meta",children:[Y2(e.root)," nodes ",c.jsx("span",{children:"·"})," Updated ",hwe(e.updatedAt)]}),c.jsxs("span",{className:"mind-map-card-open",children:["Open map ",c.jsx("span",{"aria-hidden":"true",children:"→"})]})]})]})]})}function vwe({onNavigate:e}){const{message:t,modal:n}=Br.useApp(),[r,a]=i.useState([]),[o,l]=i.useState(!0),[s,d]=i.useState(""),f=i.useRef(null),h=async()=>{try{a(await Wi.list())}catch($){t.error(`Could not load mind maps: ${$.message||"unknown error"}`)}finally{l(!1)}};i.useEffect(()=>{h()},[]);const p=i.useMemo(()=>{const $=s.trim().toLowerCase();return $?r.filter(E=>`${E.title} ${E.root.text}`.toLowerCase().includes($)):r},[r,s]),g=()=>h(),v=$=>e(`mind-maps/${encodeURIComponent($)}`),y=async()=>{try{const $=await Wi.create(dwe());a(E=>[$,...E]),v($.id)}catch($){t.error(`Could not create mind map: ${$.message||"unknown error"}`)}},C=async($,E)=>{try{if(E==="xmind"){const{mindMapToXmindBlob:k}=await Vc(async()=>{const{mindMapToXmindBlob:N}=await import("./xmindAdapter-BdZT81CQ.js");return{mindMapToXmindBlob:N}},[]),O=await k($);Oc(`${$.title||"mind-map"}.xmind`,O,"application/octet-stream"),t.success("XMind exported");return}if(E==="markdown"){Oc(`${$.title||"mind-map"}.md`,e9($),"text/markdown;charset=utf-8"),t.success("Markdown exported");return}Oc(`${$.title||"mind-map"}.json`,`${JSON.stringify($,null,2)}
621
+ `,"application/json;charset=utf-8"),t.success("JSON exported")}catch(k){t.error(`Could not export this map: ${k.message||"unknown error"}`)}},x=$=>{n.confirm({title:"Delete this mind map?",content:`“${$.title}” will be removed from workspace data.`,okText:"Delete",okButtonProps:{danger:!0},cancelText:"Cancel",onOk:async()=>{await Wi.remove($.id),await g(),t.success("Mind map deleted")}})},S=async $=>{var k;const E=(k=$.target.files)==null?void 0:k[0];if($.target.value="",!!E)try{const O=E.name.toLowerCase().endsWith(".xmind"),N=O?null:await E.text(),R=E.name.toLowerCase().endsWith(".json"),j=O?await(async()=>{const{xmindBlobToMindMap:M}=await Vc(async()=>{const{xmindBlobToMindMap:P}=await import("./xmindAdapter-BdZT81CQ.js");return{xmindBlobToMindMap:P}},[]);return M(await E.arrayBuffer(),$g(E.name))})():R?X2(JSON.parse(N),$g(E.name)):t9(N,$g(E.name)),I=await Wi.create({...j,title:j.title||$g(E.name)});a(M=>[I,...M]),t.success(`${O?"XMind":R?"JSON":"Markdown"} imported`),v(I.id)}catch(O){t.error(`Could not import this file: ${O.message||"invalid format"}`)}};return c.jsxs("div",{className:"mind-map-page",children:[c.jsx(Xr,{actions:c.jsxs(it,{className:"mind-map-page-actions",size:10,children:[c.jsx("input",{ref:f,accept:".xmind,.json,.md,.markdown,.txt",className:"mind-map-hidden-input",onChange:S,type:"file"}),c.jsx(Re,{icon:c.jsx(Ev,{}),onClick:()=>{var $;return($=f.current)==null?void 0:$.click()},children:"Import"}),c.jsx(Re,{icon:c.jsx(nr,{}),onClick:y,type:"primary",children:"New mind map"})]}),description:"Turn scattered thoughts into a clear visual plan.",eyebrow:"PLAN & REVIEW",title:"Mind maps"}),c.jsxs("div",{className:"mind-map-list-summary",children:[c.jsxs("div",{children:[c.jsx(n9,{level:2,children:"Your workspace"}),c.jsxs(r9,{type:"secondary",children:[r.length," ",r.length===1?"map":"maps"," saved locally"]})]}),c.jsx($t,{allowClear:!0,className:"mind-map-search",onChange:$=>d($.target.value),placeholder:"Search maps...",prefix:c.jsx(yo,{}),value:s})]}),o?c.jsx("div",{className:"mind-map-loading",children:c.jsx("span",{children:"Loading mind maps..."})}):p.length?c.jsx("div",{className:"mind-map-card-grid",children:p.map(($,E)=>c.jsx(gwe,{index:E,map:$,onDelete:x,onExport:C,onOpen:v},$.id))}):c.jsx(Pt,{className:"mind-map-empty-card",children:c.jsx(qt,{description:s?"No maps match your search.":"No mind maps yet.",children:!s&&c.jsx(Re,{icon:c.jsx(nr,{}),onClick:y,type:"primary",children:"Create your first map"})})}),c.jsxs("div",{className:"mind-map-import-hint",children:[c.jsx(Ev,{})," ",c.jsx("span",{children:"Import XMind, JSON, or Markdown. Export XMind to continue editing in XMind."})]})]})}const Eg=40,bwe=8192,Pk=e=>String(e??"").replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&apos;"),Sc=(e,t)=>{const n=e.getBoundingClientRect();return{left:n.left-t.left,top:n.top-t.top,right:n.right-t.left,bottom:n.bottom-t.top,width:n.width,height:n.height}},Om=(e,t=0)=>{const n=Number.parseFloat(e);return Number.isFinite(n)?n:t},ywe=(e,t)=>{const n=e.nodeValue||"",r=new Map;let a=0;for(const o of n){const l=o.length;t.setStart(e,a),t.setEnd(e,a+l),a+=l;const s=t.getBoundingClientRect();if(!s.height)continue;const d=Math.round(s.top*2)/2,f=r.get(d)||{top:d,x:s.left,text:""};f.x=Math.min(f.x,s.left),f.text+=o,r.set(d,f)}return[...r.values()].sort((o,l)=>o.top-l.top)},xwe=(e,t)=>{var s;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),r=document.createRange(),a=document.createElement("canvas").getContext("2d"),o=[];let l=n.nextNode();for(;l;){const d=l.parentElement;if(!(d!=null&&d.closest(".mind-map-collapse"))&&((s=l.nodeValue)!=null&&s.trim())){const f=getComputedStyle(d),h=ywe(l,r),p=Om(f.fontSize,12),g=f.lineHeight==="normal"?p*1.2:Om(f.lineHeight,p*1.2),v=`${f.fontStyle} ${f.fontWeight} ${p}px ${f.fontFamily}`;a.font=v;const y=a.measureText("Mg"),C=y.fontBoundingBoxAscent||y.actualBoundingBoxAscent||p*.8,x=y.fontBoundingBoxDescent||y.actualBoundingBoxDescent||p*.2,S=Math.max(0,(g-C-x)/2)+C,$=Sc(d,t),E=getComputedStyle(d),k=["hidden","clip"].includes(E.overflowX)||["hidden","clip"].includes(E.overflowY)||E.textOverflow==="ellipsis";h.forEach(O=>{O.text&&o.push({text:O.text,x:O.x-t.left,y:O.top-t.top+S,font:`${f.fontStyle} ${f.fontWeight} ${p}px ${f.fontFamily}`,color:f.color,letterSpacing:f.letterSpacing,opacity:Om(f.opacity,1),clip:k?$:null})})}l=n.nextNode()}return o},Cwe=(e,t)=>{const n=Sc(e,t),r=getComputedStyle(e),a=r.backgroundColor==="rgba(0, 0, 0, 0)"?"none":r.backgroundColor,o=Om(r.borderTopWidth),l=r.borderTopStyle==="none"||o===0?"none":r.borderTopColor,s=Math.min(Om(r.borderTopLeftRadius),n.width/2,n.height/2);return`<rect x="${n.left}" y="${n.top}" width="${n.width}" height="${n.height}" rx="${s}" fill="${Pk(a)}" stroke="${Pk(l)}" stroke-width="${o}"/>`},Swe=e=>{const t=e.getBoundingClientRect(),n=[],r=(o,l,s,d,f)=>{n.push(`<line x1="${o}" y1="${l}" x2="${s}" y2="${d}" stroke="${f}" stroke-width="1.5" stroke-linecap="round"/>`)};return[...e.querySelectorAll(".mind-map-ltr-children")].forEach(o=>{const l=Sc(o,t),d=[...o.children].filter(v=>v.classList.contains("mind-map-ltr-branch")).map(v=>({branch:v,row:v.querySelector(":scope > .mind-map-ltr-node-row"),node:v.querySelector(":scope > .mind-map-ltr-node-row > [data-mind-map-node]")})).filter(({row:v,node:y})=>v&&y);if(!d.length)return;const f=l.left,p=d.map(({row:v})=>Sc(v,t)).map(v=>v.top+v.height/2),g=o.classList.contains("is-comment-children")?"#9da9b6":"#c6cada";if(p.length>1&&r(f,p[0],f,p[p.length-1],g),d.forEach(({branch:v,node:y},C)=>{const x=Sc(y,t),S=v.classList.contains("is-comment-branch")?"#9da9b6":g;r(f,p[C],x.left,p[C],S)}),o.classList.contains("mind-map-ltr-root-children")){const v=e.querySelector(".mind-map-ltr-root-column > [data-mind-map-node]");if(v){const y=Sc(v,t);r(y.right,y.top+y.height/2,f,y.top+y.height/2,g)}}else{const v=o.parentElement,y=v==null?void 0:v.querySelector(":scope > .mind-map-ltr-node-row > [data-mind-map-node]");if(y){const C=Sc(y,t),x=v.classList.contains("is-comment-branch")?"#9da9b6":g;r(C.right,C.top+C.height/2,f,C.top+C.height/2,x)}}}),n.join("")},wwe=(e,t)=>{const n=e.getBoundingClientRect(),r=Math.floor(t.left-n.left-Eg),a=Math.floor(t.top-n.top-Eg),o=Math.ceil(t.right-t.left+Eg*2),l=Math.ceil(t.bottom-t.top+Eg*2),s=[...e.querySelectorAll(".mind-map-root-node, .mind-map-node, .mind-map-node-jira-tag")].map(h=>Cwe(h,n)).join(""),d=xwe(e,n);return{svg:`<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${l}" viewBox="${r} ${a} ${o} ${l}"><rect x="${r}" y="${a}" width="${o}" height="${l}" fill="#ffffff"/>${Swe(e)}${s}</svg>`,width:o,height:l,left:r,top:a,text:d}},$we=async e=>{var p;if(!e)throw new Error("Mind map canvas is not ready.");const t=[...e.querySelectorAll("[data-mind-map-node], .mind-map-canvas-empty")];if(!t.length)throw new Error("Mind map canvas is empty.");(p=document.fonts)!=null&&p.ready&&await document.fonts.ready;const n=t.reduce((g,v)=>{const y=v.getBoundingClientRect();return{left:Math.min(g.left,y.left),top:Math.min(g.top,y.top),right:Math.max(g.right,y.right),bottom:Math.max(g.bottom,y.bottom)}},{left:1/0,top:1/0,right:-1/0,bottom:-1/0}),{svg:r,width:a,height:o,left:l,top:s,text:d}=wwe(e,n),f=new Image,h=URL.createObjectURL(new Blob([r],{type:"image/svg+xml;charset=utf-8"}));try{await new Promise((S,$)=>{f.onload=S,f.onerror=()=>$(new Error("Could not render the mind map image.")),f.src=h});const g=Math.min(2,bwe/Math.max(a,o)),v=document.createElement("canvas");v.width=Math.max(1,Math.round(a*g)),v.height=Math.max(1,Math.round(o*g));const y=v.getContext("2d");if(!y)throw new Error("Canvas is unavailable.");y.fillStyle="#ffffff",y.fillRect(0,0,v.width,v.height),y.drawImage(f,0,0,v.width,v.height),y.save(),y.scale(g,g),d.forEach(S=>{y.save(),y.font=S.font,y.fillStyle=S.color,y.globalAlpha=S.opacity,"letterSpacing"in y&&S.letterSpacing&&S.letterSpacing!=="normal"&&(y.letterSpacing=S.letterSpacing),S.clip&&(y.beginPath(),y.rect(S.clip.left-l,S.clip.top-s,S.clip.width,S.clip.height),y.clip()),y.textBaseline="alphabetic",y.fillText(S.text,S.x-l,S.y-s),y.restore()}),y.restore();const{encode:C}=await Vc(async()=>{const{encode:S}=await import("./index-_vMuByUV.js");return{encode:S}},[]),x=await C(y.getImageData(0,0,v.width,v.height),{quality:75,progressive:!0,optimize_coding:!0,auto_subsample:!0});return new Blob([x],{type:"image/jpeg"})}finally{URL.revokeObjectURL(h)}},{Text:To,Title:Dk}=wn,Pv=["#4f8edb","#36a269","#d98a34","#c05a83","#8a70c5"],Ewe=3200,jwe=2200,cs=1600,Nwe=380,q0=e=>String((e==null?void 0:e.text)||"").trimStart().startsWith("#"),Owe=e=>{var n;const t=e instanceof HTMLElement?e:null;return!!(t!=null&&t.isContentEditable||(n=t==null?void 0:t.closest)!=null&&n.call(t,'input, textarea, select, [contenteditable="true"]'))},a9=e=>e.reduce((t,n)=>{const r=String(n.edgeLabel||"").trim();return r?Math.max(t,Math.min(160,Math.max(72,r.length*7+16))):t},16),VS=(e,t,n=!1)=>({...e,collapsed:n?!1:t,children:(e.children||[]).map(r=>VS(r,t))}),o9=(e,t,n=!1)=>{const r=n||q0(e);return{...e,tested:r?!1:t,children:(e.children||[]).map(a=>o9(a,t,r))}},i9=(e,t)=>({...e,jiraKeys:(e.jiraKeys||[]).filter(n=>n!==t),children:(e.children||[]).map(n=>i9(n,t))}),l9=(e,t)=>{t.add(e.id),(e.children||[]).forEach(n=>l9(n,t))},s9=(e,t)=>t.has(e.id)?null:{label:e.text||"Untitled idea",value:e.id,children:(e.children||[]).map(n=>s9(n,t)).filter(Boolean)},c9=(e,t,n=[])=>{const r=[...n,e.id];if(e.id===t)return r;for(const a of e.children||[]){const o=c9(a,t,r);if(o)return o}return null},qx=e=>e.replace(/\.(xmind|json|md|markdown|txt)$/i,"").replace(/[-_]+/g," ").trim()||"Imported mind map",u9=(e,t,n=!1)=>{if(!e)return!1;const r=n||q0(e);return e.id===t?r:(e.children||[]).some(a=>u9(a,t,r))};function d9({node:e,jiraIssues:t}){const n=(e.jiraKeys||[]).map(r=>t.find(a=>a.key===r)||{key:r});return n.length?c.jsx("span",{className:"mind-map-node-jira-tags","aria-label":"Jira tags",children:n.map(r=>c.jsx("span",{className:"mind-map-node-jira-tag",title:r.summary||r.key,children:r.key},r.key))}):null}function f9({node:e,depth:t=0,selectedId:n,onSelect:r,onToggle:a,jiraIssues:o,commented:l=!1}){const s=e.color||Pv[t%Pv.length],d=e.children||[],f=q0(e),h=l||f,p=a9(d);return c.jsxs("div",{className:`mind-map-ltr-branch depth-${Math.min(t,4)}${h?" is-comment-branch":""}${f?" is-comment-marker":""}`,children:[c.jsxs("div",{className:"mind-map-ltr-node-row",children:[e.edgeLabel&&c.jsx("span",{className:"mind-map-ltr-edge-label",title:e.edgeLabel,children:e.edgeLabel}),c.jsxs("button",{className:`mind-map-node ${n===e.id?"is-selected":""} ${e.tested&&!h?"is-tested":""}${e.autoWidth===!1?" is-auto-width-disabled":""}${h?" is-comment":""}${f?" is-comment-marker":""}`,onClick:()=>r(e.id),"data-mind-map-node":e.id,style:{"--node-color":s},type:"button",children:[c.jsxs("span",{className:"mind-map-node-main",children:[c.jsx("span",{className:"mind-map-node-text",children:e.text||"Untitled idea"}),d.length>0&&c.jsx("span",{className:"mind-map-node-count",children:d.length})]}),c.jsx(d9,{jiraIssues:o,node:e})]}),d.length>0&&c.jsxs("button",{"aria-label":e.collapsed?"Expand branch":"Collapse branch",className:"mind-map-collapse",onClick:()=>a(e.id),type:"button",children:[c.jsx("span",{className:`mind-map-collapse-symbol ${e.collapsed?"is-visible":""}`,children:"+"}),c.jsx("span",{className:`mind-map-collapse-symbol ${e.collapsed?"":"is-visible"}`,children:"−"})]})]}),!e.collapsed&&d.length>0&&c.jsx("div",{className:`mind-map-ltr-children${h?" is-comment-children":""}`,style:{"--mind-map-ltr-node-inset":`${p}px`},children:d.map(g=>c.jsx(f9,{depth:t+1,node:g,onSelect:r,onToggle:a,selectedId:n,jiraIssues:o,commented:h},g.id))})]})}const m9=i.forwardRef(function({map:t,selectedId:n,onSelect:r,onToggle:a,jiraIssues:o,fitContent:l=!1},s){const d=t.root,f=d.children||[],h=d.color||"#6555e8",p=q0(d);return c.jsxs("div",{className:"mind-map-ltr-diagram",ref:s,style:l?{minWidth:0,minHeight:0,margin:0}:void 0,children:[c.jsx("div",{className:"mind-map-ltr-root-column",children:c.jsxs("button",{className:`mind-map-root-node ${n===d.id?"is-selected":""} ${d.tested&&!p?"is-tested":""}${d.autoWidth===!1?" is-auto-width-disabled":""}${p?" is-comment is-comment-marker":""}`,"data-mind-map-node":d.id,onClick:()=>r(d.id),style:{"--node-color":h},type:"button",children:[c.jsx("span",{className:"mind-map-root-text",children:d.text||"Untitled idea"}),c.jsxs("span",{className:"mind-map-root-count",children:[Y2(d)-1," connected ideas"]}),c.jsx(d9,{jiraIssues:o,node:d})]})}),!d.collapsed&&f.length>0&&c.jsx("div",{className:`mind-map-ltr-children mind-map-ltr-root-children${p?" is-comment-children":""}`,style:{"--mind-map-ltr-node-inset":`${a9(f)}px`},children:f.map(g=>c.jsx(f9,{node:g,onSelect:r,onToggle:a,selectedId:n,jiraIssues:o,commented:p},g.id))}),!f.length&&c.jsx("div",{className:"mind-map-canvas-empty",children:c.jsx(To,{type:"secondary",children:"Add a branch from the inspector to start mapping this idea."})})]})}),kwe=i.forwardRef(function({map:t},n){const r=i.useRef(null);return i.useLayoutEffect(()=>{const a=r.current;if(!a)return;const o=1;a.querySelectorAll(".mind-map-ltr-children").forEach(l=>{const s=[...l.children].map(v=>v.querySelector(":scope > .mind-map-ltr-node-row")).filter(Boolean);if(!s.length)return;const d=l.getBoundingClientRect(),f=s[0].getBoundingClientRect(),h=s[s.length-1].getBoundingClientRect(),p=(f.top+f.bottom)/2,g=(h.top+h.bottom)/2;l.style.setProperty("--mind-map-connector-top",`${Math.max(0,(p-d.top)/o)}px`),l.style.setProperty("--mind-map-connector-height",`${Math.max(0,(g-p)/o)}px`)})},[t]),c.jsx("div",{"aria-hidden":"true",className:"mind-map-export-offscreen",inert:"",children:c.jsx("div",{className:"mind-map-canvas-stage is-left-to-right mind-map-export-render",ref:n,style:{width:"max-content",height:"auto",padding:0,margin:0,zoom:1},children:c.jsx(m9,{fitContent:!0,jiraIssues:t.jiraIssues||[],map:t,onSelect:()=>{},onToggle:()=>{},ref:r,selectedId:null})})})}),Rwe=i.forwardRef(function({map:t,selectedId:n,zoom:r,resetViewToken:a,recenterLayoutToken:o,isPanning:l,onCanvasPointerDown:s,onCanvasPointerMove:d,onCanvasPointerUp:f,onSelect:h,onToggle:p,onZoomChange:g,jiraIssues:v},y){const C=i.useRef(null),x=i.useRef(null),S=i.useRef(r),$=i.useRef({meta:!1,ctrl:!1}),E=i.useRef(new Map),k=i.useRef(0),O=i.useRef(0),N=i.useRef(!1),R=i.useRef(o);S.current=r;const j=(T,L,D,F)=>{const V=T.querySelector(".mind-map-canvas-stage"),q=T.getBoundingClientRect(),B=V==null?void 0:V.getBoundingClientRect();return{fromZoom:L,toZoom:null,x:D,y:F,stageX:B?(q.left+D-B.left)/L:null,stageY:B?(q.top+F-B.top)/L:null}};i.useImperativeHandle(y,()=>({zoomAt(T){const L=C.current,D=S.current;!L||T===D||(x.current=j(L,D,L.clientWidth/2,L.clientHeight/2),x.current.toZoom=T,S.current=T,g(T))}}),[g]);const I=T=>{const L=T.target instanceof Element?T.target:null,D=L==null?void 0:L.closest("button[data-mind-map-node]");L!=null&&L.closest("button")&&!D||s(T,(D==null?void 0:D.dataset.mindMapNode)||null)},M=(T=null)=>{const L=C.current;if(!L)return;const D=[...L.querySelectorAll("[data-mind-map-node]")],F=L.querySelector(".mind-map-root-node");if(!D.length||!F)return;const V=L.getBoundingClientRect(),q=D.reduce((fe,J)=>{const Z=(T==null?void 0:T.get(J.dataset.mindMapNode))||J.getBoundingClientRect();return{left:Math.min(fe.left,Z.left),top:Math.min(fe.top,Z.top),right:Math.max(fe.right,Z.right),bottom:Math.max(fe.bottom,Z.bottom)}},{left:1/0,top:1/0,right:-1/0,bottom:-1/0}),B=(q.left+q.right)/2,U=(q.top+q.bottom)/2,K=(T==null?void 0:T.get(F.dataset.mindMapNode))||F.getBoundingClientRect();let _=L.scrollLeft+B-V.left-L.clientWidth/2,G=L.scrollTop+U-V.top-L.clientHeight/2;const X=_-L.scrollLeft,Y=G-L.scrollTop,le=K.left-X,oe=K.right-X,ue=K.top-Y,ne=K.bottom-Y,te=V.left+24,ee=V.right-24,Q=V.top+24,ae=V.bottom-24;oe<te&&(_+=oe-te),le>ee&&(_+=le-ee),ne<Q&&(G+=ne-Q),ue>ae&&(G+=ue-ae),L.scrollLeft=Math.max(0,Math.min(_,L.scrollWidth-L.clientWidth)),L.scrollTop=Math.max(0,Math.min(G,L.scrollHeight-L.clientHeight))},P=()=>{const T=C.current;if(!T)return;const L=S.current||1;T.querySelectorAll(".mind-map-ltr-children").forEach(D=>{const F=[...D.children].map(_=>_.querySelector(":scope > .mind-map-ltr-node-row")).filter(Boolean);if(!F.length)return;const V=D.getBoundingClientRect(),q=F[0].getBoundingClientRect(),B=F[F.length-1].getBoundingClientRect(),U=(q.top+q.bottom)/2,K=(B.top+B.bottom)/2;D.style.setProperty("--mind-map-connector-top",`${Math.max(0,(U-V.top)/L)}px`),D.style.setProperty("--mind-map-connector-height",`${Math.max(0,(K-U)/L)}px`)})},A=()=>{const T=C.current;!T||N.current||(E.current=new Map([...T.querySelectorAll("[data-mind-map-node]")].map(L=>[L.dataset.mindMapNode,L.getBoundingClientRect()])))};i.useLayoutEffect(()=>{P()},[t,r]),i.useLayoutEffect(()=>{M()},[t.id]),i.useLayoutEffect(()=>{const T=C.current;if(!T)return;const L=o!==R.current;R.current=o;const D=[...T.querySelectorAll("[data-mind-map-node]")],F=new Map(D.map(X=>[X.dataset.mindMapNode,X.getBoundingClientRect()])),V=E.current,q=new Map(D.map(X=>{const Y=X.dataset.mindMapNode;return[Y,X.style.transform?F.get(Y):V.get(Y)||F.get(Y)]}));cancelAnimationFrame(k.current),k.current=0,window.clearTimeout(O.current),O.current=0,N.current=!1,D.forEach(X=>{X.style.transition="none",X.style.transform="",X.style.opacity=""}),T.offsetHeight;const B=new Map(D.map(X=>[X.dataset.mindMapNode,X.getBoundingClientRect()]));let U=B;if(L&&(N.current=!0,M(B),U=new Map(D.map(X=>[X.dataset.mindMapNode,X.getBoundingClientRect()]))),!V.size){N.current=!1,E.current=U;return}const K=new Map(D.map(X=>{const Y=X.dataset.mindMapNode,le=q.get(Y),oe=B.get(Y);return[Y,le&&oe?{x:(le.left-oe.left)/(S.current||1),y:(le.top-oe.top)/(S.current||1)}:null]})),_=[...K.values()].filter(X=>X&&(Math.abs(X.x)>=1||Math.abs(X.y)>=1));if(!(_.length<=40&&_.every(X=>Math.max(Math.abs(X.x),Math.abs(X.y))<=900))){N.current=!1,E.current=U;return}return N.current=_.length>0,D.forEach(X=>{const Y=q.get(X.dataset.mindMapNode),le=B.get(X.dataset.mindMapNode);if(!Y||!le){X.style.opacity="1";return}const oe=K.get(X.dataset.mindMapNode),ue=oe.x,ne=oe.y;Math.abs(ue)<1&&Math.abs(ne)<1||(X.style.transition="none",X.style.transform=`translate(${ue}px, ${ne}px)`)}),D.forEach(X=>void X.offsetWidth),k.current=requestAnimationFrame(()=>{D.forEach(X=>{const Y=q.get(X.dataset.mindMapNode);X.style.transition="transform 380ms cubic-bezier(.22, 1, .36, 1), opacity 220ms ease",X.style.transform="",Y||(X.style.opacity="1")}),k.current=0,O.current=window.setTimeout(()=>{N.current=!1,A(),O.current=0},Nwe+16)}),E.current=U,()=>{cancelAnimationFrame(k.current),k.current=0,window.clearTimeout(O.current),O.current=0,N.current=!1}},[t]),i.useLayoutEffect(()=>{const T=C.current,L=x.current;if(!T||!L||L.toZoom!==r)return;const D=T.getBoundingClientRect(),F=T.querySelector(".mind-map-canvas-stage"),V=F==null?void 0:F.getBoundingClientRect(),q=L.stageX===null||!V?cs+(L.x+T.scrollLeft-cs)*(r/L.fromZoom)-L.x:T.scrollLeft+V.left+L.stageX*r-(D.left+L.x),B=L.stageY===null||!V?cs+(L.y+T.scrollTop-cs)*(r/L.fromZoom)-L.y:T.scrollTop+V.top+L.stageY*r-(D.top+L.y);T.scrollLeft=Math.max(0,Math.min(q,T.scrollWidth-T.clientWidth)),T.scrollTop=Math.max(0,Math.min(B,T.scrollHeight-T.clientHeight)),x.current=null},[r]),i.useLayoutEffect(()=>{if(a===0)return;const T=requestAnimationFrame(()=>M());return()=>cancelAnimationFrame(T)},[a]),i.useEffect(()=>{const T=F=>{F.key==="Meta"&&($.current.meta=!0),F.key==="Control"&&($.current.ctrl=!0)},L=F=>{F.key==="Meta"&&($.current.meta=!1),F.key==="Control"&&($.current.ctrl=!1)},D=()=>{$.current={meta:!1,ctrl:!1}};return window.addEventListener("keydown",T),window.addEventListener("keyup",L),window.addEventListener("blur",D),()=>{window.removeEventListener("keydown",T),window.removeEventListener("keyup",L),window.removeEventListener("blur",D)}},[]);const H=i.useCallback(T=>{var _,G;const L=C.current;if(!L||!L.contains(T.target))return;const D=T.metaKey||((_=T.getModifierState)==null?void 0:_.call(T,"Meta"))||$.current.meta,F=T.ctrlKey||((G=T.getModifierState)==null?void 0:G.call(T,"Control"))||$.current.ctrl;if(!D&&!F||!T.deltaY)return;T.preventDefault(),T.returnValue=!1,T.stopPropagation();const V=L.getBoundingClientRect(),q=S.current,B=T.deltaMode===1?T.deltaY*16:T.deltaY,U=Math.min(Math.abs(B),48)*Math.sign(B),K=Math.max(.5,Math.min(2,Number((q*Math.pow(1.1,-U/24)).toFixed(3))));K!==q&&(x.current=j(L,q,T.clientX-V.left,T.clientY-V.top),x.current.toZoom=K,S.current=K,g(K))},[g]);return i.useEffect(()=>(window.addEventListener("wheel",H,{capture:!0,passive:!1}),()=>window.removeEventListener("wheel",H,{capture:!0})),[H]),c.jsx("div",{className:`mind-map-canvas-scroll ${l?"is-panning":""}`,ref:C,onPointerCancel:f,onPointerDown:I,onPointerMove:d,onPointerUp:f,onScroll:A,children:c.jsx("div",{className:"mind-map-canvas-world",style:{height:`${jwe*r+cs*2}px`,width:`${Ewe*r+cs*2}px`},children:c.jsx("div",{className:"mind-map-canvas-stage is-left-to-right",style:{marginLeft:`${cs}px`,marginTop:`${cs}px`,zoom:r},children:c.jsx(m9,{jiraIssues:v,map:t,onSelect:h,onToggle:p,selectedId:n})})})})});function Iwe({mindMapId:e,onNavigate:t}){const{message:n}=Br.useApp(),r=i.useRef(null),[a,o]=i.useState(null),[l,s]=i.useState(null),[d,f]=i.useState(null),[h,p]=i.useState(""),[g,v]=i.useState(!0),[y,C]=i.useState(1),[x,S]=i.useState(0),[$,E]=i.useState(0),[k,O]=i.useState(!1),[N,R]=i.useState(!1),[j,I]=i.useState(""),[M,P]=i.useState(!1),[A,H]=i.useState(""),[T,L]=i.useState(!1),[D,F]=i.useState(!1),[V,q]=i.useState([]),[B,U]=i.useState(!1),[K,_]=i.useState(!1),G=i.useRef(null),X=i.useRef(null),Y=i.useRef(null),le=i.useRef(null),oe=i.useRef(!1),ue=i.useRef(null),ne=i.useRef(Promise.resolve());i.useEffect(()=>{let je=!0;return v(!0),o(null),f(null),U(!1),Wi.get(e).then(Le=>{je&&(o(Le),p(Le.title||""),C(1),S(0),O(!1),G.current=null)}).catch(Le=>{je&&n.error(`Could not load mind map: ${Le.message||"unknown error"}`)}).finally(()=>{je&&v(!1)}),()=>{je=!1}},[e]),i.useEffect(()=>{a&&d&&!ud(a.root,d)&&f(null)},[a,d]),i.useEffect(()=>{var je,Le;oe.current&&(oe.current=!1,(Le=(je=le.current)==null?void 0:je.focus)==null||Le.call(je))},[d]),i.useEffect(()=>{if(!K)return;const je=Le=>{Le.key==="Escape"&&_(!1)};return window.addEventListener("keydown",je),()=>window.removeEventListener("keydown",je)},[K]);const te=i.useMemo(()=>d?ud(a==null?void 0:a.root,d):null,[a,d]),ee=i.useMemo(()=>u9(a==null?void 0:a.root,d),[a,d]),Q=i.useMemo(()=>rh(a==null?void 0:a.root,d),[a,d]),ae=(a==null?void 0:a.jiraIssues)||[],fe=i.useMemo(()=>{const je=new Set,Le=et=>{((et==null?void 0:et.jiraKeys)||[]).forEach(Te=>je.add(Te)),((et==null?void 0:et.children)||[]).forEach(Le)};return Le(a==null?void 0:a.root),je},[a]),J=i.useMemo(()=>((te==null?void 0:te.jiraKeys)||[]).map(je=>ae.find(Le=>Le.key===je)||{key:je,summary:"Summary unavailable",url:""}),[ae,te]),Z=i.useMemo(()=>{if(!a||!te||!Q)return[];const je=new Set;l9(te,je);const Le=s9(a.root,je);return Le?[Le]:[]},[a,te,Q]),he=je=>{if(!a)return;const Le={...je(a),updatedAt:new Date().toISOString()};o(Le),ne.current=ne.current.catch(()=>{}).then(()=>Wi.update(Le.id,Le)).catch(()=>new Promise((et,Te)=>{window.setTimeout(()=>{Wi.update(Le.id,Le).then(et).catch(Te)},120)})).catch(et=>n.error(`Could not save mind map: ${et.message||"unknown error"}`))},$e=()=>{const je=h.trim()||"Untitled mind map";p(je),he(Le=>({...Le,title:je,root:Le.root.text===Le.title?{...Le.root,text:je}:Le.root}))},Ie=je=>{te&&he(Le=>({...Le,root:dd(Le.root,te.id,et=>({...et,...je}))}))},re=()=>{if(!te||ee)return;const je=!te.tested;he(Le=>({...Le,root:dd(Le.root,te.id,et=>o9(et,je))}))},ce=(je=0)=>({id:`node-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,7)}`,text:"New idea",color:Pv[je%Pv.length],tested:!1,children:[]}),ve=()=>{if(!te)return;const je=ce((te.children||[]).length);Ie({children:[...te.children||[],je],collapsed:!1}),oe.current=!0,f(je.id)},be=()=>{if(!te||!Q){ve();return}const je=ce(Q.children.findIndex(Le=>Le.id===te.id)+1);he(Le=>({...Le,root:fwe(Le.root,te.id,je)})),oe.current=!0,f(je.id)},Ce=()=>{!te||!Q||!rh(a==null?void 0:a.root,Q.id)||he(je=>({...je,root:mwe(je.root,te.id)}))};i.useEffect(()=>{const je=Le=>{if(!(!a||!te||Le.defaultPrevented||Le.isComposing||Le.repeat)&&!(Le.altKey||Le.ctrlKey||Le.metaKey)&&!(Le.key!=="Enter"&&Le.key!=="Tab")&&!(Le.key==="Enter"&&Owe(Le.target))){if(Le.key==="Tab"){const et=document.querySelector(".mind-map-inspector-card"),Te=(et==null?void 0:et.matches(":hover"))||!1,Ue=Le.target instanceof Element&&!!Le.target.closest(".mind-map-inspector-card");if(Te&&!Ue)return}if(Le.preventDefault(),Le.key==="Tab"){Le.shiftKey?Ce():ve();return}be()}};return window.addEventListener("keydown",je),()=>window.removeEventListener("keydown",je)},[a,te,Q]);const ge=()=>{if(!te||!Q)return;const je=Q.id;he(Le=>({...Le,root:U0(Le.root,te.id)})),f(je),n.success("Idea removed")},Oe=()=>{Q&&(q(c9(a.root,Q.id)||[]),F(!0))},Ee=()=>{const je=V[V.length-1];if(!te||!Q||!je)return;if(Tk(a.root,te.id,je)===a.root){n.error("Please choose another valid parent node.");return}he(et=>({...et,root:Tk(et.root,te.id,je)})),F(!1),n.success(`Moved “${te.text||"idea"}” successfully.`)},De=()=>{R(!0)},Ae=async()=>{const je=uwe(j);if(!je){n.error("Enter a Jira No such as PROJ-123 or a Jira issue link.");return}P(!0);try{const Le=await Wi.resolveJiraIssue(j);if(ae.some(et=>et.key===Le.key)){n.info(`${Le.key} is already in this map.`);return}he(et=>({...et,jiraIssues:[...et.jiraIssues||[],Le]})),I(""),n.success(`${Le.key} added to this map.`)}catch(Le){n.error(Le.message||`Could not load ${je.key} from Jira.`)}finally{P(!1)}},Be=je=>{he(Le=>({...Le,jiraIssues:(Le.jiraIssues||[]).filter(et=>et.key!==je),root:i9(Le.root,je)}))},ze=async je=>{H(je.key);try{const Le=await Wi.resolveJiraIssue(je.key);he(et=>({...et,jiraIssues:(et.jiraIssues||[]).map(Te=>Te.key===je.key?{...Te,summary:Le.summary,url:Le.url||Te.url}:Te)})),n.success(`${je.key} summary refreshed`)}catch(Le){n.error(Le.message||`Could not refresh ${je.key}.`)}finally{H("")}},qe=je=>{Ie({jiraKeys:((te==null?void 0:te.jiraKeys)||[]).filter(Le=>Le!==je)})},_e=je=>{je&&(f(je),U(!0))},Ne=(je,Le)=>{var Te;if(je.button!==0)return;const et=je.currentTarget;et&&(je.preventDefault(),(Te=et.setPointerCapture)==null||Te.call(et,je.pointerId),G.current={canvas:et,pointerId:je.pointerId,startX:je.clientX,startY:je.clientY,startScrollLeft:et.scrollLeft,startScrollTop:et.scrollTop,nodeId:Le,moved:!1},Le&&_e(Le),O(!0))},xe=je=>{const Le=G.current;if(!Le||Le.pointerId!==je.pointerId)return;const et=Le.canvas||je.currentTarget;!Le.moved&&Math.hypot(je.clientX-Le.startX,je.clientY-Le.startY)<3||(Le.moved=!0,et.scrollLeft=Le.startScrollLeft-(je.clientX-Le.startX),et.scrollTop=Le.startScrollTop-(je.clientY-Le.startY))},Pe=je=>{var et,Te,Ue,ct;const Le=G.current;!Le||je.pointerId!==void 0&&Le.pointerId!==je.pointerId||(!Le.moved&&!Le.nodeId&&U(!1),(Te=(et=Le.canvas)==null?void 0:et.releasePointerCapture)==null||Te.call(et,Le.pointerId),(ct=(Ue=je.currentTarget)==null?void 0:Ue.releasePointerCapture)==null||ct.call(Ue,Le.pointerId),G.current=null,O(!1))};i.useEffect(()=>{const je=Le=>Pe(Le);return window.addEventListener("pointerup",je),window.addEventListener("pointercancel",je),window.addEventListener("blur",je),()=>{window.removeEventListener("pointerup",je),window.removeEventListener("pointercancel",je),window.removeEventListener("blur",je)}},[]);const He=je=>{he(Le=>({...Le,root:dd(Le.root,je,et=>({...et,collapsed:!et.collapsed}))}))},ke=(je,Le=!1)=>{he(et=>({...et,root:VS(et.root,je,!0)})),Le&&E(et=>et+1)},We=async je=>{var Le;if(a)try{if(je==="xmind"){const{mindMapToXmindBlob:et}=await Vc(async()=>{const{mindMapToXmindBlob:Ue}=await import("./xmindAdapter-BdZT81CQ.js");return{mindMapToXmindBlob:Ue}},[]),Te=await et(a);Oc(`${a.title||"mind-map"}.xmind`,Te,"application/octet-stream"),n.success("XMind exported");return}if(je==="markdown"){Oc(`${a.title||"mind-map"}.md`,e9(a),"text/markdown;charset=utf-8"),n.success("Markdown exported");return}if(je==="jpg"){(Le=document.fonts)!=null&&Le.ready&&await document.fonts.ready,s({...a,root:VS(a.root,!1,!0)}),await new Promise(et=>requestAnimationFrame(()=>requestAnimationFrame(et)));try{const et=await $we(Y.current);Oc(`${a.title||"mind-map"}.jpg`,et,"image/jpeg"),n.success("JPG exported")}finally{s(null)}return}Oc(`${a.title||"mind-map"}.json`,`${JSON.stringify(a,null,2)}
622
+ `,"application/json;charset=utf-8"),n.success("JSON exported")}catch(et){n.error(`Could not export this map: ${et.message||"unknown error"}`)}},st=async je=>{var et;const Le=(et=je.target.files)==null?void 0:et[0];if(je.target.value="",!(!Le||!a))try{const Te=Le.name.toLowerCase().endsWith(".xmind"),Ue=Te?null:await Le.text(),ct=Le.name.toLowerCase().endsWith(".json"),rt=Te?await(async()=>{const{xmindBlobToMindMap:ot}=await Vc(async()=>{const{xmindBlobToMindMap:ht}=await import("./xmindAdapter-BdZT81CQ.js");return{xmindBlobToMindMap:ht}},[]);return ot(await Le.arrayBuffer(),qx(Le.name))})():ct?X2(JSON.parse(Ue),qx(Le.name)):t9(Ue,qx(Le.name)),Xe={...rt,id:a.id,title:rt.title||a.title,createdAt:a.createdAt,updatedAt:new Date().toISOString()};await ne.current.catch(()=>{});const Ze=await Wi.update(a.id,Xe);o(Ze),_e(Xe.root.id),p(Ze.title),n.success(`${Te?"XMind":ct?"JSON":"Markdown"} imported into this map`)}catch(Te){n.error(`Could not import this file: ${Te.message||"invalid format"}`)}},Je=async()=>{if(a!=null&&a.filePath)try{await Xn.openFolder(a.filePath)}catch(je){n.error(`Could not open map folder: ${je.message||"unknown error"}`)}},Fe=async()=>{if(a!=null&&a.filePath)try{await navigator.clipboard.writeText(a.filePath),n.success("Mind map file path copied")}catch(je){n.error(`Could not copy file path: ${je.message||"clipboard unavailable"}`)}};if(g)return c.jsx("div",{className:"mind-map-missing",children:c.jsx(lr,{tip:"Loading mind map..."})});if(!a)return c.jsxs("div",{className:"mind-map-missing",children:[c.jsx(qt,{description:"This mind map could not be found."}),c.jsx(Re,{onClick:()=>t("mind-maps"),children:"Back to mind maps"})]});const Qe=B&&!!d;return c.jsxs("div",{className:`mind-map-detail-page${K?" is-canvas-fullscreen":""}`,children:[c.jsxs("div",{className:"mind-map-detail-toolbar",children:[c.jsxs("div",{className:"mind-map-detail-heading",children:[c.jsx(Re,{"aria-label":"Back to mind maps",className:"mind-map-back-button",icon:c.jsx(Is,{}),onClick:()=>t("mind-maps"),type:"text"}),c.jsx("div",{className:"mind-map-breadcrumbs",children:c.jsx("button",{onClick:()=>t("mind-maps"),type:"button",children:"Mind maps"})}),c.jsx($t,{"aria-label":"Mind map title",className:"mind-map-title-input",onBlur:$e,onChange:je=>p(je.target.value),onPressEnter:je=>je.currentTarget.blur(),value:h})]}),c.jsxs(it,{className:"mind-map-detail-actions",size:8,children:[c.jsx("input",{ref:r,accept:".xmind,.json,.md,.markdown,.txt",className:"mind-map-hidden-input",onChange:st,type:"file"}),c.jsx(Re,{icon:c.jsx(E2,{}),onClick:()=>{var je;return(je=r.current)==null?void 0:je.click()},children:"Import"}),c.jsx(wl,{menu:{items:[{key:"xmind",icon:c.jsx(rO,{}),label:"Export XMind"},{key:"jpg",icon:c.jsx(Kg,{}),label:"Export JPG"},{key:"json",icon:c.jsx(Oa,{}),label:"Export JSON"},{key:"markdown",icon:c.jsx(Pi,{}),label:"Export Markdown"}],onClick:({key:je})=>We(je)},trigger:["click"],children:c.jsx(Re,{icon:c.jsx(Ol,{}),children:"Export"})}),c.jsx(Re,{"aria-label":"Mind map settings",icon:c.jsx(Ms,{}),onClick:De,children:"Settings"}),c.jsx(Re,{icon:c.jsx(N2,{}),onClick:()=>n.success("All changes saved to the data file"),children:"Save"})]})]}),c.jsxs("div",{className:`mind-map-detail-layout${Qe?"":" is-inspector-collapsed"}`,children:[c.jsxs(Pt,{className:"mind-map-canvas-card",styles:{body:{padding:0}},children:[c.jsxs("div",{className:"mind-map-canvas-header",children:[c.jsxs("div",{className:"mind-map-canvas-heading",children:[c.jsx(To,{className:"mind-map-eyebrow",children:"CANVAS"}),c.jsxs("div",{className:"mind-map-canvas-title-row",children:[c.jsx(Dk,{level:3,children:"Map canvas"}),c.jsx(To,{className:"mind-map-canvas-tip",type:"secondary",children:"Tip: keep each branch short and concrete."})]})]}),c.jsxs(it,{className:"mind-map-canvas-controls",size:12,children:[c.jsx(Re,{"aria-label":K?"Exit canvas full screen":"Enter canvas full screen",icon:K?c.jsx(OP,{}):c.jsx(kP,{}),onClick:()=>{_(je=>!je),S(je=>je+1)},type:"text"}),c.jsx(Re,{"aria-label":Qe?"Collapse inspector":"Show inspector",className:"mind-map-inspector-control",icon:Qe?c.jsx(lpe,{}):c.jsx(upe,{}),onClick:()=>U(je=>!je),type:"text"}),c.jsxs(it,{className:"mind-map-tree-actions",size:4,children:[c.jsx(Re,{icon:c.jsx(dP,{}),onClick:()=>ke(!1),children:"Expand all"}),c.jsx(Re,{icon:c.jsx(uP,{}),onClick:()=>ke(!0,!0),children:"Collapse all"})]}),c.jsxs(it,{className:"mind-map-zoom-control",size:4,children:[c.jsx(Re,{"aria-label":"Zoom out",disabled:y<=.5,icon:c.jsx(j7,{}),onClick:()=>{var je;return(je=X.current)==null?void 0:je.zoomAt(Math.max(.5,Number((y-.1).toFixed(2))))},type:"text"}),c.jsxs("button",{"aria-label":"Reset canvas view",className:"mind-map-zoom-label",onClick:()=>{C(1),S(je=>je+1)},type:"button",children:[Math.round(y*100),"%"]}),c.jsx(Re,{"aria-label":"Zoom in",disabled:y>=2,icon:c.jsx(E7,{}),onClick:()=>{var je;return(je=X.current)==null?void 0:je.zoomAt(Math.min(2,Number((y+.1).toFixed(2))))},type:"text"})]})]})]}),c.jsx(Rwe,{ref:X,isPanning:k,map:a,onCanvasPointerDown:Ne,onCanvasPointerMove:xe,onCanvasPointerUp:Pe,onSelect:_e,onToggle:He,onZoomChange:C,recenterLayoutToken:$,resetViewToken:x,selectedId:d,zoom:y,jiraIssues:ae}),c.jsx("div",{className:"mind-map-canvas-footer",children:c.jsxs(To,{type:"secondary",children:[c.jsx("span",{className:"mind-map-key",children:"⌘"})," Click to select ",c.jsx("span",{className:"mind-map-footer-dot",children:"·"})," ",c.jsx("span",{className:"mind-map-key",children:"Enter"})," sibling ",c.jsx("span",{className:"mind-map-footer-dot",children:"·"})," ",c.jsx("span",{className:"mind-map-key",children:"Tab"})," child ",c.jsx("span",{className:"mind-map-footer-dot",children:"·"})," Drag canvas to pan ",c.jsx("span",{className:"mind-map-footer-dot",children:"·"})," ⌘ + Scroll to zoom ",c.jsx("span",{className:"mind-map-footer-dot",children:"·"})," Changes save automatically"]})})]}),c.jsx(Pt,{className:"mind-map-inspector-card",children:c.jsxs("div",{className:"mind-map-inspector-shell",children:[c.jsxs("div",{className:"mind-map-inspector-header",children:[c.jsxs("div",{children:[c.jsx(To,{className:"mind-map-eyebrow",children:"INSPECTOR"}),c.jsxs("div",{className:"mind-map-inspector-title-row",children:[c.jsx(Dk,{level:3,children:"Selected idea"}),(te==null?void 0:te.id)===a.root.id?c.jsx(wt,{color:"purple",children:"Root"}):null,ee?c.jsx(wt,{className:"mind-map-comment-tag",children:"Comment"}):null]})]}),(te==null?void 0:te.id)!==a.root.id&&c.jsx(la,{cancelText:"Cancel",description:"This will also remove all child ideas.",okButtonProps:{danger:!0},okText:"Delete",onConfirm:ge,placement:"topRight",title:"Delete this idea?",children:c.jsx(Re,{"aria-label":"Delete selected idea",className:"mind-map-inline-delete",danger:!0,icon:c.jsx(Yn,{}),type:"text"})})]}),c.jsx("div",{className:"mind-map-inspector-content",children:te&&c.jsxs("div",{className:"mind-map-inspector-fields",children:[c.jsxs("section",{className:"mind-map-inspector-section",children:[c.jsx("div",{className:"mind-map-inspector-section-title",children:"Content"}),c.jsxs("div",{className:"mind-map-idea-label-row",children:[c.jsx("label",{className:"mind-map-field-label",htmlFor:"mind-map-node-text",children:"Idea"}),c.jsxs("div",{className:"mind-map-auto-width-field",children:[c.jsx(vn,{title:"When off, text wraps only at manual line breaks.",placement:"top",children:c.jsx("span",{className:"mind-map-auto-width-label",children:"Auto width"})}),c.jsx(ki,{"aria-label":"Auto width",checked:te.autoWidth!==!1,onChange:je=>Ie({autoWidth:je}),size:"small"})]})]}),c.jsx($t.TextArea,{autoSize:{minRows:2,maxRows:8},className:"mind-map-idea-input",id:"mind-map-node-text",onChange:je=>Ie({text:je.target.value}),placeholder:"Name this idea",ref:le,value:te.text}),Q&&c.jsxs(c.Fragment,{children:[c.jsx("label",{className:"mind-map-field-label",htmlFor:"mind-map-node-edge-label",children:"Line label"}),c.jsx($t,{id:"mind-map-node-edge-label",onChange:je=>Ie({edgeLabel:je.target.value||void 0}),placeholder:"Label this connection",value:te.edgeLabel||""})]}),c.jsx("label",{className:"mind-map-field-label",htmlFor:"mind-map-node-notes",children:"Notes"}),c.jsx($t.TextArea,{autoSize:{minRows:4,maxRows:8},id:"mind-map-node-notes",onChange:je=>Ie({notes:je.target.value}),placeholder:"Add a note or a prompt...",value:te.notes||""})]}),!ee&&c.jsxs("section",{className:"mind-map-inspector-section",children:[c.jsx("div",{className:"mind-map-inspector-section-title",children:"Test status"}),c.jsxs("div",{className:"mind-map-tested-field",children:[c.jsxs("div",{children:[c.jsx("span",{className:"mind-map-field-label",children:"Tested"}),c.jsx(To,{type:"secondary",children:"Updates this node and all child nodes."})]}),c.jsxs("div",{className:"mind-map-tested-control",children:[c.jsx("span",{className:"mind-map-tested-state",children:te.tested?"Tested":"Pending"}),c.jsx(ki,{checked:!!te.tested,onChange:re})]})]})]}),c.jsxs("section",{className:"mind-map-inspector-section",children:[c.jsx("div",{className:"mind-map-inspector-section-title",children:"Jira"}),J.length>0&&c.jsx("div",{"aria-label":"Selected Jira issues",className:"mind-map-selected-jira-list",children:J.map(je=>c.jsxs("div",{className:"mind-map-selected-jira-item",children:[c.jsxs("button",{className:"mind-map-selected-jira-open",disabled:!je.url,onClick:()=>hr(je.url),title:je.url?"Open in Jira":"Jira link unavailable",type:"button",children:[c.jsx(wt,{color:"blue",children:je.key}),c.jsx("span",{className:"mind-map-selected-jira-summary",children:je.summary||"Summary unavailable"}),je.url&&c.jsx(qi,{})]}),c.jsx("button",{"aria-label":`Untag ${je.key}`,className:"mind-map-selected-jira-untag",onClick:()=>qe(je.key),title:`Untag ${je.key}`,type:"button",children:c.jsx(Vo,{})})]},je.key))}),c.jsx(In,{allowClear:!0,"aria-label":"Jira tags",className:"mind-map-node-jira-select",filterOption:(je,Le)=>`${(Le==null?void 0:Le.value)||""} ${(Le==null?void 0:Le.summary)||""}`.toLowerCase().includes(je.toLowerCase()),id:"mind-map-node-jira",mode:"multiple",onChange:je=>{Ie({jiraKeys:je}),L(!1),requestAnimationFrame(()=>{var Le,et;return(et=(Le=ue.current)==null?void 0:Le.blur)==null?void 0:et.call(Le)})},options:ae.map(je=>({label:c.jsxs("div",{className:"mind-map-jira-select-option",children:[c.jsx("span",{className:"mind-map-jira-select-option-key",children:je.key}),c.jsx("span",{className:"mind-map-jira-select-option-summary",children:je.summary||"Summary unavailable"})]}),summary:je.summary||"",value:je.key})),maxTagCount:0,maxTagPlaceholder:"Select Jira issues",onOpenChange:L,placeholder:ae.length?"Select Jira issues":"Add Jira issues in Settings",showSearch:!0,open:T,ref:ue,value:te.jiraKeys||[]})]})]})}),c.jsxs("div",{className:"mind-map-inspector-actions",children:[c.jsx(vn,{title:"Add a child idea (Tab)",children:c.jsx(Re,{block:!0,className:"mind-map-add-child",icon:c.jsx(nr,{}),onClick:ve,type:"primary",children:"Add child idea"})}),Q&&c.jsx(Re,{block:!0,className:"mind-map-move-button",icon:c.jsx(rO,{}),onClick:Oe,children:"Move idea"})]})]})})]}),c.jsxs(o2,{className:"mind-map-settings-drawer",onClose:()=>R(!1),open:N,title:"Mind map settings",width:520,children:[c.jsxs("div",{className:"mind-map-settings-section",children:[c.jsx(To,{className:"mind-map-settings-section-title",children:"File location"}),c.jsx(To,{className:"mind-map-settings-description",children:"This mind map is stored locally in the following file."}),c.jsxs(it.Compact,{block:!0,className:"mind-map-file-location-row",children:[c.jsxs("div",{className:`mind-map-file-location-display${a.filePath?"":" is-unavailable"}`,title:a.filePath||"File location unavailable",children:[c.jsx(Re,{"aria-label":"Open mind map folder",className:"mind-map-file-location-folder",disabled:!a.filePath,icon:c.jsx(Lr,{}),onClick:Je,type:"text"}),c.jsx(To,{className:"mind-map-file-location-path",children:a.filePath||"File location unavailable"})]}),c.jsx(Re,{disabled:!a.filePath,icon:c.jsx(vo,{}),onClick:Fe,children:"Copy"})]})]}),c.jsxs("div",{className:"mind-map-settings-section",children:[c.jsx(To,{className:"mind-map-settings-section-title",children:"Jira issues"}),c.jsx(To,{className:"mind-map-settings-description",children:"Add issues to this map by Jira No or a Jira issue link, then tag them from the selected node inspector."}),c.jsxs(it.Compact,{block:!0,className:"mind-map-jira-add-row",children:[c.jsx($t,{onChange:je=>I(je.target.value),onPressEnter:Ae,placeholder:"PROJ-123 or https://.../browse/PROJ-123",value:j}),c.jsx(Re,{loading:M,onClick:Ae,type:"primary",children:"Add"})]}),c.jsx("div",{className:"mind-map-jira-list",children:ae.length?ae.map(je=>c.jsxs("div",{className:`mind-map-jira-list-item ${je.url?"is-clickable":""} ${fe.has(je.key)?"is-tagged":""}`,onClick:()=>je.url&&hr(je.url),onKeyDown:Le=>{Le.target!==Le.currentTarget||!je.url||(Le.key==="Enter"||Le.key===" ")&&(Le.preventDefault(),hr(je.url))},role:je.url?"link":void 0,tabIndex:je.url?0:void 0,children:[c.jsx("div",{className:"mind-map-jira-list-item-main",children:c.jsxs("div",{className:"mind-map-jira-list-item-title",children:[c.jsx(wt,{color:"blue",children:je.key}),c.jsx(To,{ellipsis:{tooltip:!0},children:je.summary||"Summary unavailable"})]})}),c.jsxs("div",{className:"mind-map-jira-list-item-delete",onClick:Le=>Le.stopPropagation(),children:[c.jsx(Re,{"aria-label":`Refresh summary for ${je.key}`,className:"mind-map-jira-refresh",disabled:!!A,icon:c.jsx(go,{spin:A===je.key}),onClick:()=>void ze(je),title:`Refresh summary for ${je.key}`,type:"text"}),c.jsx(la,{cancelText:"Cancel",description:"Existing node tags for this issue will also be removed.",okButtonProps:{danger:!0},okText:"Remove",onConfirm:()=>Be(je.key),placement:"left",title:`Remove ${je.key}?`,children:c.jsx(Re,{"aria-label":`Remove ${je.key}`,danger:!0,icon:c.jsx(Yn,{}),type:"text"})})]})]},je.id||je.key)):c.jsx(qt,{className:"mind-map-jira-empty",description:"No Jira issues added yet.",image:qt.PRESENTED_IMAGE_SIMPLE})})]})]}),c.jsxs(bn,{cancelText:"Cancel",okText:"Move",onCancel:()=>F(!1),onOk:Ee,open:D,title:`Move “${(te==null?void 0:te.text)||"idea"}”`,children:[c.jsx(To,{type:"secondary",children:"Choose the node that should become the new parent. The entire subtree will move with it."}),c.jsx(Rl,{changeOnSelect:!0,className:"mind-map-move-select",onChange:q,options:Z,placeholder:"Select a parent node",showSearch:!0,value:V})]}),l&&c.jsx(kwe,{map:l,ref:Y})]})}async function Mwe(e,t={}){if(typeof window>"u"||!("Notification"in window)||Notification.permission!=="granted")return!1;const n={body:"",icon:"/devbuddy-192.png",tag:`devbuddy-notification-${Date.now()}`,...t};try{if("serviceWorker"in navigator){const r=await navigator.serviceWorker.ready;if(r.active)return r.active.postMessage({type:"SHOW_NOTIFICATION",title:e,...n}),!0}return new Notification(e,n),!0}catch{return!1}}const{Content:Twe,Sider:Pwe}=Os,{Title:zk,Text:hc}=wn,Ak={dark:"#6555e8",light:"#dbeafe"},Dwe="var(--db-font-sans)",zwe=(e,t)=>{var r;const n=(r=e==null?void 0:e.scripts)==null?void 0:r.find(a=>a.id===t);return n?n.name:t==="install"?"Install":t.startsWith("package:")?t.slice(8):t},Awe=(e,t)=>{const[n,...r]=String(t).split(":"),a=r.join(":"),o=e.find(l=>String(l.id)===n);return`${(o==null?void 0:o.alias)||(o==null?void 0:o.folder)||"Launcher"} · ${zwe(o,a)}`},h9=["overview","launcher","clipboard","ports","image-compress","json-to-typescript","jira-filters","todo-list","memos","mind-maps","postman","bookmark-sync","file-organizer","branch-sync","branch-health","package-upgrade","package-versions","presentation-plan","presentation-view","settings","dev-configurations","errors"],p9=e=>{if(e==="mind-maps"||e==="mind-maps/")return{page:"mind-maps",mindMapId:null};if(e.startsWith("mind-maps/")){const t=e.slice(10).split("?")[0];return t?{page:"mind-maps",mindMapId:decodeURIComponent(t)}:null}return null},Lwe=()=>{const t=(window.location.hash||"#/overview").slice(2),n=p9(t);return n||(t.startsWith("plugin:")?{page:"plugin",pluginId:t.slice(7)}:t.startsWith("static:")?{page:"static-page",staticId:t.slice(7)}:t.startsWith("logs/")?{page:"logs",pluginId:null}:["todo-list/archived","todo-archived"].includes(t)?{page:"todo-archived",pluginId:null}:t.startsWith("pr-review")?{page:"pr-review",pluginId:null}:t==="pr-conflicts"||t.startsWith("pr-conflicts?")?{page:"pr-conflicts",pluginId:null}:t.startsWith("pr-conflict")?{page:"pr-conflict",pluginId:null}:t.startsWith("branch-sync")?{page:"branch-sync",pluginId:null}:t.startsWith("branch-health")?{page:"branch-health",pluginId:null}:t==="home"?{page:"overview",pluginId:null}:h9.includes(t)?{page:t,pluginId:null}:{page:"overview",pluginId:null})};function _we({theme:e,onThemeChange:t}){var Oe;const{message:n}=Br.useApp(),r=Lwe(),[a,o]=i.useState([]),[l,s]=i.useState(new Set),[d,f]=i.useState({}),[h,p]=i.useState([]),[g,v]=i.useState(!0),[y,C]=i.useState(null),[x,S]=i.useState(!1),[$,E]=i.useState(!1),[k,O]=i.useState([]),[N,R]=i.useState([]),[j,I]=i.useState(r.page),[M,P]=i.useState(r.mindMapId||null),[A,H]=i.useState(()=>{var Ee;return((Ee=window.matchMedia)==null?void 0:Ee.call(window,"(max-width: 991.98px)").matches)??!1}),[T,L]=i.useState(null),[D,F]=i.useState(!1),[V,q]=i.useState(!1),[B,U]=i.useState(""),[K,_]=i.useState(null),[G,X]=i.useState(!1),Y=i.useRef(null),le=i.useRef(new Map),oe=i.useRef(null),[ue,ne]=i.useState(r.pluginId?{id:r.pluginId,name:"Plugin"}:null),[te,ee]=i.useState(null),[Q,ae]=i.useState(""),fe=async({showLoading:Ee=!1}={})=>{Ee&&v(!0);try{const[De,Ae,Be]=await Promise.all([Pr.list(),Pr.running(),Nc.list().catch(()=>[])]);o(De),p(Array.isArray(Be)?Be:[]),Array.isArray(Ae)?(s(new Set(Ae)),f({})):(s(new Set((Ae==null?void 0:Ae.running)||[])),f((Ae==null?void 0:Ae.errorCounts)||{})),S(!0),C(null),E(!0)}catch(De){C((De==null?void 0:De.message)||"Unable to load service and runtime data."),E(!1)}finally{Ee&&v(!1)}};i.useEffect(()=>{const Ee=async()=>{try{const[Ae,Be]=await Promise.all([Pr.running(),Nc.list().catch(()=>[])]);Array.isArray(Ae)?(s(new Set(Ae)),f({})):(s(new Set((Ae==null?void 0:Ae.running)||[])),f((Ae==null?void 0:Ae.errorCounts)||{})),Array.isArray(Be)&&p(Be)}catch{}},De=setInterval(()=>{Ee()},5e3);return()=>clearInterval(De)},[]),i.useEffect(()=>{if(!x)return;const Ee=Object.fromEntries(Object.entries(d).map(([ke,We])=>[ke,Number(We)||0])),De=(Array.isArray(h)?h:[]).filter(ke=>{var We;return(We=ke==null?void 0:ke.source)==null?void 0:We.startsWith("Launcher")}),Ae=new Set(De.map(ke=>ke.id).filter(Boolean)),Be=Y.current;if(!Be){Y.current={counts:Ee,ids:Ae};return}const ze=Object.entries(Ee).filter(([ke,We])=>We>(Be.counts[ke]||0)).map(([ke,We])=>({key:ke,delta:We-(Be.counts[ke]||0),count:We})),qe=De.filter(ke=>ke.id&&!Be.ids.has(ke.id));Y.current={counts:Ee,ids:Ae};const _e=[...ze.map(ke=>({dedupeKey:ke.key,label:Awe(a,ke.key),count:ke.delta})),...qe.map(ke=>({dedupeKey:ke.source,label:`${ke.source.replace(/^Launcher:\s*/,"")} · ${ke.message||"Script error"}`,count:1}))],Ne=Date.now(),xe=_e.filter(ke=>{const We=le.current.get(ke.dedupeKey)||0;return Ne-We<1e4?!1:(le.current.set(ke.dedupeKey,Ne),!0)});if(xe.length===0)return;const Pe=xe.reduce((ke,We)=>ke+We.count,0),He=xe.slice(0,3).map(ke=>ke.label).join(";");Mwe(Pe===1?"Launcher script error":`Launcher: ${Pe} new script errors`,{body:He||"A Launcher script reported a new error."})},[d,h,x,a]);const J=async(Ee=!1)=>{F(!0);try{L(await sO.status(Ee))}catch{L(De=>De||{currentVersion:Wu.version,latestVersion:Wu.version,updateAvailable:!1,releases:[],sourceUnavailable:!0})}finally{F(!1)}},Z=()=>fe({showLoading:!0}),he=()=>{_(null),X(!0)},$e=()=>{const Ee=K==null?void 0:K.success;X(!1),Ee&&window.location.reload()},Ie=async(Ee="latest")=>{q(!0),U(Ee),_(null);try{const De=await sO.selfUpdate(Ee);_({success:!0,message:De.message}),L(Ae=>Ae&&{...Ae,currentVersion:Ee==="latest"?Ae.latestVersion:Ee,updateAvailable:Ee==="latest"?!1:Ee!==Ae.latestVersion})}catch(De){_({success:!1,message:De.message||"DevBuddy could not be updated."})}finally{q(!1)}},re=async Ee=>{if(Ee){ae("Loading plugin…");try{ae(Ee.view?await(await fetch(Ee.view)).text():"This plugin does not provide a view yet.")}catch{ae("Failed to load the plugin view.")}}};i.useEffect(()=>{Promise.all([fe({showLoading:!0}),hge.list().then(O),Cc.list().then(R)]).catch(Ee=>n.error(Ee.message)),J()},[]),i.useEffect(()=>{const Ee=()=>{const Ae=(window.location.hash||"#/overview").slice(2),Be=p9(Ae);if(Be){ne(null),ee(null),I("mind-maps"),P(Be.mindMapId);return}if(Ae.startsWith("plugin:")){const ze=Ae.slice(7),qe=k.find(_e=>_e.id===ze);qe?(ee(null),I("plugin"),P(null),ne(qe),re(qe)):k.length>0&&(window.location.hash="#/overview")}else if(Ae.startsWith("static:")){const ze=Ae.slice(7),qe=N.find(_e=>String(_e.id)===String(ze));qe?(ne(null),I("static-page"),P(null),ee(qe)):N.length>0&&(window.location.hash="#/overview")}else Ae.startsWith("logs/")?(ne(null),ee(null),I("logs"),P(null)):["todo-list/archived","todo-archived"].includes(Ae)?(ne(null),ee(null),I("todo-archived"),P(null)):Ae.startsWith("pr-review")?(ne(null),ee(null),I("pr-review"),P(null)):Ae==="pr-conflicts"||Ae.startsWith("pr-conflicts?")?(ne(null),ee(null),I("pr-conflicts"),P(null)):Ae.startsWith("pr-conflict")?(ne(null),ee(null),I("pr-conflict"),P(null)):Ae.startsWith("branch-sync")?(ne(null),ee(null),I("branch-sync"),P(null)):Ae.startsWith("branch-health")?(ne(null),ee(null),I("branch-health"),P(null)):Ae==="home"||h9.includes(Ae)?(ne(null),ee(null),I(Ae==="home"?"overview":Ae),P(null)):window.location.hash="#/overview"};return window.addEventListener("hashchange",Ee),window.location.hash?Ee():window.location.hash="#/overview",()=>window.removeEventListener("hashchange",Ee)},[k,N]),i.useEffect(()=>{const Ee=Ae=>{var Be;(Ae.error||Ae.message)&&Nc.log({source:"Frontend",message:Ae.message||"Uncaught JavaScript Error",details:((Be=Ae.error)==null?void 0:Be.stack)||`${Ae.filename}:${Ae.lineno}:${Ae.colno}`}).catch(()=>{})},De=Ae=>{var Be,ze;Nc.log({source:"Frontend (Promise)",message:((Be=Ae.reason)==null?void 0:Be.message)||String(Ae.reason||"Unhandled Promise Rejection"),details:((ze=Ae.reason)==null?void 0:ze.stack)||String(Ae.reason)}).catch(()=>{})};return window.addEventListener("error",Ee),window.addEventListener("unhandledrejection",De),()=>{window.removeEventListener("error",Ee),window.removeEventListener("unhandledrejection",De)}},[]),i.useLayoutEffect(()=>{var Ee;(Ee=document.querySelector(".page"))==null||Ee.scrollTo({top:0,left:0,behavior:"auto"}),j==="overview"&&oe.current&&(oe.current.scrollTop=0,oe.current.scrollLeft=0)},[j,M,ue==null?void 0:ue.id,te==null?void 0:te.id]);const ce=()=>{oe.current&&(oe.current.scrollTop=0,oe.current.scrollLeft=0)};i.useEffect(()=>{const Ee=De=>{(De.metaKey||De.ctrlKey)&&De.shiftKey&&(De.key==="r"||De.key==="R"||De.code==="KeyR")&&(De.preventDefault(),De.stopPropagation())};return window.addEventListener("keydown",Ee,!0),()=>window.removeEventListener("keydown",Ee,!0)},[]),i.useEffect(()=>{if(g||!["overview","launcher","ports"].includes(j))return;const Ee=setInterval(()=>{fe()},2e3);return()=>clearInterval(Ee)},[j,g]);const ve=i.useMemo(()=>{const Ee=[...k.map(De=>({key:`plugin:${De.id}`,icon:c.jsx("span",{"aria-hidden":"true",children:De.icon||"✦"}),label:De.name||De.id})),...N.map(De=>({key:`static:${De.id}`,icon:c.jsx(Kd,{}),label:De.name}))];return[{type:"group",label:"Run & Observe",children:[{key:"launcher",icon:c.jsx(Lo,{}),label:"Launcher"},{key:"clipboard",icon:c.jsx(vo,{}),label:"Clipboard"},{key:"ports",icon:c.jsx(O2,{}),label:"Port Diagnostic"}]},{type:"group",label:"Plan & Review",children:[{key:"todo-list",icon:c.jsx(Bc,{}),label:"To-Do"},{key:"memos",icon:c.jsx(Pi,{}),label:"Memos"},{key:"mind-maps",icon:c.jsx(ux,{}),label:"Mind Maps"},{key:"pr-review",icon:c.jsx(A0,{}),label:"PR Review"},{key:"pr-conflicts",icon:c.jsx(wv,{}),label:"Resolve Conflicts"},{key:"jira-filters",icon:c.jsx(vhe,{}),label:"Jira Workspace"},{key:"presentation-plan",icon:c.jsx(Rhe,{}),label:"Presentations"},{key:"branch-sync",icon:c.jsx(Mc,{}),label:"Branch Sync"},{key:"branch-health",icon:c.jsx(j2,{}),label:"Branch Health"},{key:"package-upgrade",icon:c.jsx(IP,{}),label:"Package Upgrade"},{key:"package-versions",icon:c.jsx(Jfe,{}),label:"Package Versions"}]},{type:"group",label:"Utilities",children:[{key:"postman",icon:c.jsx(Hc,{}),label:"Postman"},{key:"image-compress",icon:c.jsx(jS,{}),label:"Image compression"},{key:"json-to-typescript",icon:c.jsx(Oa,{}),label:"JSON to TypeScript"},{key:"bookmark-sync",icon:c.jsx(Zm,{}),label:"Bookmark Sync"},{key:"file-organizer",icon:c.jsx(Lr,{}),label:"Folder Organizer"}]},...Ee.length>0?[{type:"group",label:"Extensions",children:Ee}]:[]]},[k,N]),be=({key:Ee})=>{window.location.hash=`#/${Ee}`},Ce=ue?`plugin:${ue.id}`:te?`static:${te.id}`:j==="todo-archived"?"todo-list":["pr-conflicts","pr-conflict"].includes(j)?"pr-conflicts":j,ge=y&&!(g&&!x)?c.jsx(Or,{type:x?"warning":"error",showIcon:!0,message:x?"Service status may be out of date":"Unable to load services",description:y,action:c.jsx(Re,{size:"small",loading:g,onClick:Z,children:"Retry"}),className:"launcher-data-notice"}):null;return j==="logs"?c.jsx($ve,{}):j==="presentation-view"?c.jsx($0e,{}):c.jsxs(Os,{className:"workbench",children:[c.jsxs(Pwe,{"aria-label":"DevBuddy navigation",breakpoint:"lg",className:"sidebar",collapsed:A,collapsedWidth:64,collapsible:!0,onBreakpoint:H,onCollapse:H,width:240,children:[c.jsxs("div",{className:"brand-row",children:[c.jsxs("a",{className:"brand",href:"#/overview","aria-current":j==="overview"?"page":void 0,"aria-label":`Go to Overview — DevBuddy version ${Wu.version}`,onClick:ce,children:[c.jsx("span",{className:`brand-mark ${$?"":"is-offline"}`,"aria-hidden":"true",children:"✦"}),c.jsx("span",{className:"brand-name",children:"DevBuddy"}),c.jsxs("span",{className:"brand-version",children:["v",Wu.version]})]}),!A&&c.jsx(vn,{title:T!=null&&T.updateAvailable?`Update available: v${T.latestVersion}`:"View Change Log",children:c.jsx(ia,{dot:!!(T!=null&&T.updateAvailable),color:"#f5b942",offset:[-2,3],children:c.jsx(Re,{"aria-label":T!=null&&T.updateAvailable?`Update available: version ${T.latestVersion}`:"View Change Log",className:`sidebar-update-button ${T!=null&&T.updateAvailable?"has-update":""}`,icon:c.jsx(ux,{}),loading:D&&!T,onClick:he,type:"text"})})})]}),c.jsx("nav",{ref:oe,className:"sidebar-nav","aria-label":"Main navigation",children:c.jsx(js,{theme:e==="light"?"light":"dark",mode:"inline",tabIndex:-1,selectedKeys:[Ce],items:ve,onClick:be})}),c.jsx("div",{className:"sidebar-bottom",children:c.jsx("div",{className:"sidebar-bottom-inner",children:c.jsx("nav",{"aria-label":"Settings navigation",children:c.jsx(js,{className:"sidebar-settings-menu",theme:e==="light"?"light":"dark",mode:"inline",tabIndex:-1,selectedKeys:["settings","errors"].includes(j)?[j]:[],items:[{key:"settings",icon:c.jsx(Ms,{}),label:"Settings"}],onClick:be})})})})]}),c.jsx(Os,{children:c.jsx(Twe,{className:`page ${["static-page","postman"].includes(j)?"is-static-page":""} ${["overview","postman","static-page"].includes(j)?"":"is-workspace-content"} ${j==="mind-maps"&&M?"is-mind-map-detail":""} ${j==="presentation-plan"?"is-presentation-plan":""} ${j==="json-to-typescript"?"is-json-to-typescript":""} ${j==="memos"?"is-memos":""}`,children:ue?c.jsxs(c.Fragment,{children:[c.jsx(hc,{type:"secondary",children:"PLUGIN"}),c.jsx(zk,{level:2,children:ue.name}),c.jsx(Pt,{children:c.jsx("div",{dangerouslySetInnerHTML:{__html:Q}})})]}):j==="static-page"&&te?c.jsx("div",{className:"static-page-container",children:c.jsx("iframe",{src:te.url,title:te.name,className:"static-page-iframe"})}):j==="image-compress"?c.jsx(Qge,{}):j==="json-to-typescript"?c.jsx(R0e,{}):j==="mind-maps"?M?c.jsx(Iwe,{mindMapId:M,onNavigate:Ee=>{window.location.hash=`#/${Ee}`}}):c.jsx(vwe,{onNavigate:Ee=>{window.location.hash=`#/${Ee}`}}):j==="overview"?c.jsx(u0e,{launchers:a,running:l,errorCounts:d,errorLogs:h,plugins:k,staticPages:N,loading:g,error:y,hasLoaded:x,onRetry:Z,onNavigate:Ee=>{window.location.hash=`#/${Ee}`}}):j==="clipboard"?c.jsx(Oge,{}):j==="ports"?c.jsx(Hge,{refreshLaunchers:fe}):j==="pr-review"?c.jsx(nve,{}):j==="pr-conflicts"?c.jsx(xO,{listOnly:!0},"pr-conflicts"):j==="pr-conflict"?c.jsx(xO,{},"pr-conflict"):j==="jira-filters"?c.jsx(fve,{}):j==="todo-list"?c.jsx(bve,{}):j==="memos"?c.jsx(cwe,{}):j==="todo-archived"?c.jsx(Cve,{}):j==="presentation-plan"?c.jsx(w0e,{}):j==="postman"?c.jsx(Ave,{}):j==="bookmark-sync"?c.jsx(Lve,{}):j==="file-organizer"?c.jsx(Bve,{}):j==="branch-sync"?c.jsx(Fve,{}):j==="branch-health"?c.jsx(qve,{}):j==="package-upgrade"?c.jsx(Gve,{}):j==="package-versions"?c.jsx(Yve,{}):j==="errors"?c.jsx(Eve,{}):j==="settings"?c.jsx(Wge,{theme:e,onThemeChange:t,onStaticPagesChange:()=>Cc.list().then(R)}):j==="dev-configurations"?c.jsx(Kge,{}):c.jsxs(c.Fragment,{children:[ge,(g||x||!y)&&c.jsx(Fge,{launchers:a,running:l,errorCounts:d,refresh:fe,loading:g&&!x})]})})}),c.jsx(bn,{className:"changelog-modal",footer:[(T==null?void 0:T.updateAvailable)&&!(K!=null&&K.success)&&c.jsx(Re,{type:"primary",loading:V&&B==="latest",onClick:()=>Ie(),children:"Update now"},"update"),c.jsx(Re,{disabled:V,loading:D,onClick:()=>J(!0),children:"Check again"},"refresh"),c.jsx(Re,{type:"primary",disabled:V,onClick:$e,children:K!=null&&K.success?"Close & reload":"Close"},"close")],onCancel:$e,closable:!V,maskClosable:!V,open:G,title:c.jsxs("div",{className:"changelog-title",children:[c.jsx("span",{className:`changelog-bulb ${T!=null&&T.updateAvailable?"has-update":""}`,children:c.jsx(ux,{})}),c.jsx("span",{children:"Updates"})]}),width:680,children:D&&!T?c.jsx("div",{className:"changelog-loading",children:c.jsx(lr,{})}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"changelog-version-row",children:[c.jsxs("div",{children:[c.jsx(hc,{type:"secondary",children:"Installed"}),c.jsxs(hc,{strong:!0,children:["v",(T==null?void 0:T.currentVersion)||Wu.version]})]}),c.jsxs("div",{children:[c.jsx(hc,{type:"secondary",children:"Latest"}),c.jsxs(hc,{strong:!0,children:["v",(T==null?void 0:T.latestVersion)||Wu.version]})]}),c.jsx(wt,{color:T!=null&&T.updateAvailable?"gold":"green",children:T!=null&&T.updateAvailable?"Update available":"Up to date"})]}),(T==null?void 0:T.sourceUnavailable)&&c.jsx(Or,{className:"changelog-source-alert",message:"Could not reach the configured npm registry. Showing locally available release notes.",showIcon:!0,type:"info"}),K&&c.jsx(Or,{className:"changelog-source-alert",description:K.message,message:K.success?"DevBuddy updated successfully":"DevBuddy update failed",showIcon:!0,type:K.success?"success":"error"}),c.jsx("div",{className:"changelog-release-list",children:(Oe=T==null?void 0:T.releases)!=null&&Oe.length?T.releases.slice(0,5).map(Ee=>c.jsxs("section",{className:"changelog-release",children:[c.jsxs("div",{className:"changelog-release-heading",children:[c.jsxs("div",{className:"changelog-release-title",children:[c.jsxs(wt,{className:"changelog-release-version",children:["v",Ee.version]}),c.jsx(zk,{level:4,children:Ee.name})]}),c.jsxs("div",{className:"changelog-release-actions",children:[Ee.publishedAt&&c.jsx(hc,{type:"secondary",children:new Date(Ee.publishedAt).toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1})}),c.jsx(Re,{size:"small",type:Ee.version===(T==null?void 0:T.latestVersion)?"primary":"default",disabled:V||Ee.version===(T==null?void 0:T.currentVersion),loading:V&&B===Ee.version,onClick:()=>Ie(Ee.version),children:Ee.version===(T==null?void 0:T.currentVersion)?"Installed":"Install"})]})]}),c.jsx(hc,{className:"changelog-release-notes",children:Ee.notes||"Published to the configured npm registry."})]},`${Ee.version}-${Ee.publishedAt||""}`)):c.jsx(qt,{description:"No published release notes yet.",image:qt.PRESENTED_IMAGE_SIMPLE})})]})})]})}function Bwe(){const[e,t]=i.useState(()=>document.documentElement.dataset.theme||localStorage.getItem("devbuddy-theme")||"dark");return i.useEffect(()=>{Xn.status().then(n=>{const r=n.theme==="light"?"light":"dark";t(r),localStorage.setItem("devbuddy-theme",r)}).catch(()=>{})},[]),i.useLayoutEffect(()=>{var n;document.documentElement.dataset.theme=e,localStorage.setItem("devbuddy-theme",e),(n=document.querySelector('meta[name="theme-color"]'))==null||n.setAttribute("content",Ak[e]||Ak.dark)},[e]),i.useLayoutEffect(()=>{const n=()=>{document.querySelectorAll('[role="tab"], [role="tabpanel"]').forEach(o=>{document.activeElement===o&&o.blur(),o.tabIndex!==-1&&(o.tabIndex=-1)})};n();const r=new MutationObserver(n),a=o=>{var l,s;(s=(l=o.target).matches)!=null&&s.call(l,'[role="tab"], [role="tabpanel"]')&&o.target.blur()};return document.addEventListener("focusin",a,!0),r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["tabindex"]}),()=>{r.disconnect(),document.removeEventListener("focusin",a,!0)}},[]),c.jsx(di,{theme:{token:{fontFamily:Dwe,borderRadius:10,colorBgLayout:e==="light"?"#f7f8fc":"#f4f5fa",colorInfo:e==="light"?"#2e83d2":"#6555e8",colorLink:e==="light"?"#2e83d2":"#5b4cc4",colorLinkActive:e==="light"?"#2474bd":"#5143c2",colorLinkHover:e==="light"?"#4593d8":"#7669ee",colorPrimary:e==="light"?"#2e83d2":"#6555e8",colorPrimaryActive:e==="light"?"#2474bd":"#5143c2",colorPrimaryHover:e==="light"?"#4593d8":"#7669ee",controlOutline:e==="light"?"rgba(46, 131, 210, .2)":"rgba(101, 85, 232, .22)",colorTextSecondary:"#667085"},components:{Layout:{bodyBg:e==="light"?"#f7f8fc":"#f4f5fa",siderBg:e==="light"?"#ffffff":"#171c2b",triggerBg:e==="light"?"#f8f9fc":"#101522",triggerColor:e==="light"?"#667085":"#c9ced8"},Menu:{darkItemBg:"#171c2b",darkItemSelectedBg:"#6555e8",darkSubMenuItemBg:"#171c2b",itemSelectedBg:"#eeecff",itemSelectedColor:"#5143c2"}}},children:c.jsx(Br,{children:c.jsx(_we,{theme:e,onThemeChange:t})})})}const Fwe=/Macintosh|Mac OS X|iPhone|iPad/i.test(navigator.userAgent);document.documentElement.dataset.platform=Fwe?"mac":"other";const Hwe=jA.createRoot(document.getElementById("app"));Hwe.render(c.jsx(Bwe,{}));"serviceWorker"in navigator&&window.addEventListener("load",()=>{navigator.serviceWorker.register("/sw.js",{updateViaCache:"none"}).catch(e=>{console.warn("DevBuddy service worker registration failed:",e)})});requestAnimationFrame(()=>{requestAnimationFrame(()=>{window.setTimeout(()=>{const e=document.getElementById("app-splash");e&&(e.classList.add("is-hidden"),window.setTimeout(()=>e.remove(),700))},700)})});export{Fo as g,X2 as n};