@rsdoctor/client 1.5.10 → 1.5.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/diff.html +1 -1
- package/dist/index.html +1 -1
- package/dist/resource/js/142.350290ccb0.js +112 -0
- package/dist/resource/js/26.1c2637e740.js +399 -0
- package/dist/resource/js/494.345d38694e.js +1 -0
- package/dist/resource/js/713.4a558b34df.js +2 -0
- package/dist/resource/js/ant-design-0.c6142e8905.js +124 -0
- package/dist/resource/js/ant-design-1.dcacdda382.js +262 -0
- package/dist/resource/js/ant-design-2.10fadcad30.js +133 -0
- package/dist/resource/js/ant-design-3.2fdffb4a35.js +128 -0
- package/dist/resource/js/ant-design-4.7ff8d78249.js +190 -0
- package/dist/resource/js/ant-design-icons.f0e8a5e979.js +57 -0
- package/dist/resource/js/{diff.55f1533174.js → diff.73c9bbb75f.js} +2 -2
- package/dist/resource/js/index.7980e1096f.js +91 -0
- package/dist/resource/js/rc-0.50becc7474.js +1 -0
- package/dist/resource/js/rc-1.b43035e064.js +1 -0
- package/dist/resource/js/react.7c49fb5914.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +11 -11
- package/dist/resource/js/181.202c32f28e.js +0 -1
- package/dist/resource/js/630.d98cf14f77.js +0 -112
- package/dist/resource/js/681.2f02a25876.js +0 -2
- package/dist/resource/js/70.b88e2c49cf.js +0 -343
- package/dist/resource/js/ant-design-0.423dc49a53.js +0 -124
- package/dist/resource/js/ant-design-1.3da9e5560d.js +0 -262
- package/dist/resource/js/ant-design-2.f4524a4f5e.js +0 -90
- package/dist/resource/js/ant-design-3.864d7e37fa.js +0 -106
- package/dist/resource/js/ant-design-4.a51fff4025.js +0 -255
- package/dist/resource/js/ant-design-icons.6d735fb087.js +0 -1
- package/dist/resource/js/index.f83e52ca10.js +0 -91
- package/dist/resource/js/rc-0.6e1040359f.js +0 -1
- package/dist/resource/js/rc-1.f953c6a3e4.js +0 -1
- package/dist/resource/js/react.a376b049da.js +0 -1
- /package/dist/resource/css/{630.63628dfed2.css → 142.63628dfed2.css} +0 -0
package/dist/diff.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><title>Rsdoctor</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><script defer src="./resource/js/react.
|
|
1
|
+
<!DOCTYPE html><html><head><title>Rsdoctor</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><script defer src="./resource/js/react.7c49fb5914.js"></script><script defer src="./resource/js/713.4a558b34df.js"></script><script defer src="./resource/js/26.1c2637e740.js"></script><script defer src="./resource/js/142.350290ccb0.js"></script><script defer src="./resource/js/diff.73c9bbb75f.js"></script><link href="./resource/css/142.63628dfed2.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
|
package/dist/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><title>Rsdoctor</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><script defer src="./resource/js/react.
|
|
1
|
+
<!DOCTYPE html><html><head><title>Rsdoctor</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><script defer src="./resource/js/react.7c49fb5914.js"></script><script defer src="./resource/js/rc-0.50becc7474.js"></script><script defer src="./resource/js/rc-1.b43035e064.js"></script><script defer src="./resource/js/ant-design-0.c6142e8905.js"></script><script defer src="./resource/js/ant-design-1.dcacdda382.js"></script><script defer src="./resource/js/ant-design-2.10fadcad30.js"></script><script defer src="./resource/js/ant-design-3.2fdffb4a35.js"></script><script defer src="./resource/js/ant-design-4.7ff8d78249.js"></script><script defer src="./resource/js/ant-design-icons.f0e8a5e979.js"></script><script defer src="./resource/js/713.4a558b34df.js"></script><script defer src="./resource/js/494.345d38694e.js"></script><script defer src="./resource/js/142.350290ccb0.js"></script><script defer src="./resource/js/index.7980e1096f.js"></script><link href="./resource/css/142.63628dfed2.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";(self.rspackChunk_rsdoctor_client=self.rspackChunk_rsdoctor_client||[]).push([[142],{78103(){},82370(){},24328(){},41857(){},27968(){},92758(){},33594(){},50104(){},40907(){},70857(){},63366(){},84121(){},23787(){},16311(){},84362(){},26011(){},2618(){},72228(){},76864(){},71303(){},33279(){},1145(e,t,r){r.d(t,{A:()=>A});var s=r(27080),n=r(14023),i=r(29861),l=r(47903),a=r(57490),o=r(64254),d=r(78195),c=r(11034),u=r(89654),h=r(44443),p=r(30720),x=r(46198),m=r(27348),f=r(26184),g=r(40623);let{jK:j,Sx:y}=n,A=e=>{let{router:t,renderFailState:r,extraContent:A}=e,[v,b]=(0,m.useState)(j.Success),[w,C]=(0,m.useState)({...a.s.viewMode}),[S,k]=(0,m.useState)(),[N,M]=(0,m.useState)(a.s.theme);return v===n.jK.Fail?r?(0,s.jsx)(s.Fragment,{children:r()}):(0,s.jsxs)(o.A,{direction:"vertical",style:{padding:14},children:[(0,s.jsx)(d.A.Text,{strong:!0,style:{fontSize:16},children:"load json file of Rsdoctor failed."}),(0,s.jsxs)(d.A.Text,{children:["try to use ",(0,s.jsx)(d.A.Text,{keyboard:!0,children:"command + r"})," to refresh page."]}),null,(0,s.jsx)(c.A,{}),(0,s.jsx)(o.A,{direction:"vertical",style:{width:"100%"},children:(0,s.jsxs)(d.A.Text,{style:{fontSize:16},children:["you can",(0,s.jsx)(d.A.Text,{strong:!0,style:{fontSize:"inherit"},children:"upload a file"}),"in the area below to analyze your project."]})}),(0,s.jsx)(c.A,{})]}):(0,s.jsx)(g.I9,{children:(0,s.jsx)(a.Q.Provider,{value:{...a.s,theme:N,setTheme:e=>{M(e),(0,l.setThemeToStorage)(e)},pageState:v,json:S,viewMode:w,setManifest:k,setPageState:b,setViewMode(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],r={...w,...e};C(r),t&&(0,l.setViewModeToStorage)(r)}},children:(0,s.jsx)(a.Q.Consumer,{children:e=>(0,s.jsx)(u.Ay,{locale:(0,l.getLocale)(e.locale),theme:{algorithm:N===y.Dark?h.A.darkAlgorithm:h.A.defaultAlgorithm,token:{padding:16,colorText:"rgba(0, 0, 0, 0.85)",fontFamily:"var(--font-family-code)"}},children:(0,s.jsx)(i.PE,{children:(0,s.jsxs)(s.Fragment,{children:[A,(0,s.jsx)(f.tH,{FallbackComponent:e=>{let{error:t,resetErrorBoundary:r}=e;return(0,s.jsx)(p.Ay,{status:"error",title:"Sorry, something went wrong.",extra:(0,s.jsx)(x.Ay,{type:"primary",onClick:r,loading:v===j.Pending,children:"Reload"}),children:(0,s.jsxs)(d.A.Paragraph,{children:[(0,s.jsx)(d.A.Title,{level:3,children:"Error Stack"}),(0,s.jsx)("pre",{children:t.stack||t.message})]})})},onReset:()=>{window.location.reload()},children:t})]})})})})})})}},18977(e,t,r){r.d(t,{A:()=>n});var s=r(27080);r(27348);let n=e=>(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",fillRule:"evenodd",style:{flex:"none",lineHeight:1},viewBox:"0 0 24 24",...e,children:(0,s.jsx)("path",{d:"M22.106 5.68 12.5.135a1 1 0 0 0-.998 0L1.893 5.68a.84.84 0 0 0-.419.726v11.186c0 .3.16.577.42.727l9.607 5.547a1 1 0 0 0 .998 0l9.608-5.547a.84.84 0 0 0 .42-.727V6.407a.84.84 0 0 0-.42-.726zm-.603 1.176L12.228 22.92c-.063.108-.228.064-.228-.061V12.34a.59.59 0 0 0-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264 0 .428.286.296.514"})})},41419(e,t,r){r.d(t,{A:()=>n});var s=r(27080);r(27348);let n=e=>(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",style:{flex:"none",lineHeight:1},viewBox:"0 0 24 24",...e,children:(0,s.jsx)("path",{fill:"#32F08C",d:"M24 20.541H3.428v-3.426H0V3.4h24v17.14zM3.428 17.115h17.144V6.827H3.428zm8.573-5.196-2.425 2.424-2.424-2.424 2.424-2.424zm6.857-.001-2.424 2.423-2.425-2.423 2.425-2.425z"})})},39729(e,t,r){r.d(t,{A:()=>n});var s=r(27080);r(27348);let n=e=>(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:100,height:100,fill:"none",viewBox:"0 0 100 100",...e,children:[(0,s.jsx)("mask",{id:"vscode_svg__a",width:100,height:100,x:0,y:0,"mask-type":"alpha",maskUnits:"userSpaceOnUse",children:(0,s.jsx)("path",{fill:"#fff",fillRule:"evenodd",d:"M70.912 99.317a6.22 6.22 0 0 0 4.96-.19l20.589-9.907A6.25 6.25 0 0 0 100 83.587V16.413a6.25 6.25 0 0 0-3.54-5.632L75.874.874a6.23 6.23 0 0 0-7.104 1.21L29.355 38.04 12.187 25.01a4.16 4.16 0 0 0-5.318.236l-5.506 5.009a4.17 4.17 0 0 0-.004 6.162L16.247 50 1.36 63.583a4.17 4.17 0 0 0 .004 6.162l5.506 5.01a4.16 4.16 0 0 0 5.318.236l17.168-13.032L68.77 97.917a6.2 6.2 0 0 0 2.143 1.4M75.015 27.3 45.11 50l29.906 22.701z",clipRule:"evenodd"})}),(0,s.jsxs)("g",{mask:"url(#vscode_svg__a)",children:[(0,s.jsx)("path",{fill:"#0065A9",d:"M96.461 10.796 75.857.876a6.23 6.23 0 0 0-7.107 1.207l-67.451 61.5a4.167 4.167 0 0 0 .004 6.162l5.51 5.009a4.17 4.17 0 0 0 5.32.236l81.228-61.62c2.725-2.067 6.639-.124 6.639 3.297v-.24a6.25 6.25 0 0 0-3.539-5.63"}),(0,s.jsx)("g",{filter:"url(#vscode_svg__b)",children:(0,s.jsx)("path",{fill:"#007ACC",d:"m96.461 89.204-20.604 9.92a6.23 6.23 0 0 1-7.107-1.207l-67.451-61.5a4.167 4.167 0 0 1 .004-6.162l5.51-5.009a4.17 4.17 0 0 1 5.32-.236l81.228 61.62c2.725 2.067 6.639.124 6.639-3.297v.24a6.25 6.25 0 0 1-3.539 5.63"})}),(0,s.jsx)("g",{filter:"url(#vscode_svg__c)",children:(0,s.jsx)("path",{fill:"#1F9CF0",d:"M75.858 99.126a6.23 6.23 0 0 1-7.108-1.21c2.306 2.307 6.25.674 6.25-2.588V4.672c0-3.262-3.944-4.895-6.25-2.589a6.23 6.23 0 0 1 7.108-1.21l20.6 9.908A6.25 6.25 0 0 1 100 16.413v67.174a6.25 6.25 0 0 1-3.541 5.633z"})}),(0,s.jsx)("path",{fill:"url(#vscode_svg__d)",fillRule:"evenodd",d:"M70.851 99.317a6.22 6.22 0 0 0 4.96-.19L96.4 89.22a6.25 6.25 0 0 0 3.54-5.633V16.413a6.25 6.25 0 0 0-3.54-5.632L75.812.874a6.23 6.23 0 0 0-7.104 1.21L29.294 38.04 12.126 25.01a4.16 4.16 0 0 0-5.317.236l-5.507 5.009a4.17 4.17 0 0 0-.004 6.162L16.186 50 1.298 63.583a4.17 4.17 0 0 0 .004 6.162l5.507 5.009a4.16 4.16 0 0 0 5.317.236L29.294 61.96l39.414 35.958a6.2 6.2 0 0 0 2.143 1.4M74.954 27.3 45.048 50l29.906 22.701z",clipRule:"evenodd",opacity:.25,style:{mixBlendMode:"overlay"}})]}),(0,s.jsxs)("defs",{children:[(0,s.jsxs)("filter",{id:"vscode_svg__b",width:116.727,height:92.246,x:-8.394,y:15.829,colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[(0,s.jsx)("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),(0,s.jsx)("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),(0,s.jsx)("feOffset",{}),(0,s.jsx)("feGaussianBlur",{stdDeviation:4.167}),(0,s.jsx)("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"}),(0,s.jsx)("feBlend",{in2:"BackgroundImageFix",mode:"overlay",result:"effect1_dropShadow"}),(0,s.jsx)("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})]}),(0,s.jsxs)("filter",{id:"vscode_svg__c",width:47.917,height:116.151,x:60.417,y:-8.076,colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[(0,s.jsx)("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),(0,s.jsx)("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),(0,s.jsx)("feOffset",{}),(0,s.jsx)("feGaussianBlur",{stdDeviation:4.167}),(0,s.jsx)("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"}),(0,s.jsx)("feBlend",{in2:"BackgroundImageFix",mode:"overlay",result:"effect1_dropShadow"}),(0,s.jsx)("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})]}),(0,s.jsxs)("linearGradient",{id:"vscode_svg__d",x1:49.939,x2:49.939,y1:.258,y2:99.742,gradientUnits:"userSpaceOnUse",children:[(0,s.jsx)("stop",{stopColor:"#fff"}),(0,s.jsx)("stop",{offset:1,stopColor:"#fff",stopOpacity:0})]})]})]})},58250(e,t,r){r.d(t,{ZZ:()=>E,aM:()=>N,rU:()=>M});var s=r(27080),n=r(25294),i=r(87884),l=r(62227),a=r(78195),o=r(39646),d=r(85730),c=r(8587),u=r(64254),h=r(11034),p=r(58924),x=r(98670),m=r(46198),f=r(29166),g=r(19054),j=r(28516),y=r(9999),A=r(47903),v=r(93685),b=r(6662),w=r(14023),C=r(98705),S=r(95869),k=r(15722);let N=e=>{let{data:t}=e;return(0,s.jsx)(n.A,{gutter:w.or.BasePadding,wrap:!1,align:"top",children:(0,s.jsx)(i.A,{style:{height:"100%",width:"100%"},children:t.length?(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(l.A,{style:{marginTop:"20px"},children:t.map((e,r)=>{let{dependency:n,module:i,relativePath:o}=e,{statements:d}=n,{start:c}=d?.[0]?.position?i.isPreferSource?d[0].position.source:d[0].position.transformed:{start:{line:0,column:0}},u=`${o}:${c.line}:${c.column||1}`;return(0,s.jsx)(l.A.Item,{style:{cursor:"default"},children:(0,s.jsxs)(a.A.Text,{children:[(0,s.jsxs)("div",{className:"filePath-UF3inH",children:[u,(0,s.jsx)(a.A.Paragraph,{copyable:{text:o},style:{position:"relative",top:"7px"}})]}),r!==t.length-1?(0,s.jsx)(g.A,{className:"arrow-VrZOco"}):null]})},u)})})}):(0,s.jsx)(o.A,{description:"This package no dependencies"})})})},M=(0,S.eN)({Component:N,api:k.hp.ServerAPI.API.GetPackageRelationAlertDetails,responsePropName:"data"}),E=e=>{let{data:t,getPackageRelationContentComponent:r}=e,{level:n,code:i,packages:l}=t,o=(0,A.useRuleIndexNavigate)(i,t.link),g=(0,f.x)(l,e=>e.targetSize.sourceSize),S=(0,A.formatSize)(g),{xs:N,lg:M,xxl:E}=d.Ay.useBreakpoint(),{name:T}=l.find(e=>!!e.target.name).target,R=l.map(e=>e.target.version);return(0,s.jsx)(c.A,{showIcon:!N,message:(0,s.jsxs)(u.A,{wrap:!0,split:N?null:(0,s.jsx)(h.A,{type:"vertical"}),align:"center",children:[(0,s.jsxs)(u.A,{wrap:!1,children:[(0,s.jsx)(a.A.Text,{code:!0,strong:!0,onClick:o,style:{cursor:"pointer"},children:(0,s.jsx)("a",{children:i})}),(0,s.jsx)(a.A.Text,{strong:!0,children:k.jO.RuleErrorMap[i]?.title||t.title})]}),(0,s.jsxs)(a.A.Paragraph,{ellipsis:{rows:1},style:{marginBottom:0},children:[(0,s.jsx)(a.A.Text,{strong:!0,code:!0,children:T}),(0,s.jsxs)(a.A.Text,{strong:!0,children:[" ",t.packages.length]}),(0,s.jsx)(a.A.Text,{children:" versions was found"})]}),(0,s.jsx)(C.Ex,{label:"total size",value:S,type:"error",tooltip:`total size of ${t.packages.length} versions is ${S}`})]}),description:(0,s.jsx)(u.A,{direction:"vertical",wrap:!1,children:t.packages.map(e=>{let{target:t,targetSize:r}=e,n=(0,A.formatSize)(r.sourceSize),i=r.parsedSize?(0,A.formatSize)(r.parsedSize):null,l=`${t.name}@${t.version}`;return(0,s.jsxs)(u.A,{style:{wordBreak:"break-all"},align:"center",split:N?null:(0,s.jsx)(h.A,{type:"vertical"}),wrap:!0,children:[(0,s.jsxs)(u.A,{wrap:!1,children:[(0,s.jsx)(a.A.Text,{style:{marginLeft:4},children:"└"}),(0,s.jsx)(C.Ex,{label:t.name,value:`v${t.version}`,tooltip:l})]}),(0,s.jsxs)(u.A,{children:[(0,s.jsx)(C.Ex,{label:(0,s.jsxs)("div",{color:"rgb(255, 255, 255)",children:["Source Size ",(0,s.jsx)(j.A,{})]}),value:n,tooltip:`The bundle size of "${l}" is ${n}, this is source size.`,type:"error"}),(0,s.jsx)(C.Ex,{label:"Bundled size",value:i||"CONCATENATED",tooltip:`The bundle size of "${l}" is ${n}, this is after bundled, concatenated module cannot get bundled size. `,type:"error"})]}),(0,s.jsx)(a.A.Paragraph,{style:{marginBottom:0,width:E?"40rem":M?"30rem":"20rem"},copyable:{text:t.root},ellipsis:{rows:1,expandable:!0,symbol:(0,s.jsx)(y.A,{}),tooltip:t.root},code:!0,children:t.root})]},t.version)})}),type:"warn"===n?"info":n,action:(0,s.jsxs)(s.Fragment,{children:[l&&l.length>0?(0,s.jsx)(v.hX,{text:"Show Relations",buttonProps:{size:"small"},drawerProps:{title:t.title,width:"60%"},children:(0,s.jsxs)(u.A,{direction:"vertical",className:"alert-space",children:[(0,s.jsxs)(u.A,{style:{marginBottom:w.or.BasePadding/2},children:[(0,s.jsx)(b.h,{text:T,upperFirst:!1}),(0,s.jsx)(a.A.Text,{strong:!0,children:R.length}),(0,s.jsx)(a.A.Text,{children:" versions was found: "}),R.map(e=>(0,s.jsx)(a.A.Text,{strong:!0,code:!0,children:e},e))]}),(0,s.jsx)(p.A,{type:"card",size:"middle",className:"tabs-space",defaultActiveKey:R[0],items:l.map(e=>{let{target:n,targetSize:i}=e;return{label:(0,s.jsxs)(u.A,{children:[(0,s.jsx)(a.A.Text,{children:`${T}@${n.version}`}),(0,s.jsx)(x.A,{color:w.Q1.Red,children:(0,A.formatSize)(i.sourceSize)})]}),key:`${n.root}${n.name}${n.version}`,children:r({data:t,package:e})}})})]})}):null,(0,s.jsx)(h.A,{type:"vertical"}),(0,s.jsx)(m.Ay,{type:"link",onClick:o,size:"small",icon:(0,s.jsx)(j.A,{})})]})})}},17599(e,t,r){r.d(t,{J:()=>eh});var s=r(27080),n=r(98670),i=r(39646),l=r(58924),a=r(24184),o=r(78195),d=r(46198),c=r(3968),u=r(27348);let h=e=>(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e,children:[(0,s.jsx)("rect",{width:16,height:16,fill:"#FFF2E8",rx:2}),(0,s.jsx)("path",{fill:"#FA541C",d:"M13.21 4.026a.5.5 0 0 0-.5-.5H3.29a.5.5 0 0 0-.5.5v1.316a.5.5 0 0 0 .5.5h9.42a.5.5 0 0 0 .5-.5zM13.21 7.342a.5.5 0 0 0-.5-.5H3.29a.5.5 0 0 0-.5.5v1.316a.5.5 0 0 0 .5.5h9.42a.5.5 0 0 0 .5-.5zM13.21 10.658a.5.5 0 0 0-.5-.5H3.29a.5.5 0 0 0-.5.5v1.316a.5.5 0 0 0 .5.5h9.42a.5.5 0 0 0 .5-.5z"})]}),p=e=>(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e,children:[(0,s.jsx)("rect",{width:16,height:16,fill:"#F6FFED",rx:2}),(0,s.jsx)("path",{fill:"#52C41A",fillRule:"evenodd",d:"M4.586 6.172a.853.853 0 0 0-.853.854v5.12c0 .472.382.854.853.854h6.828a.853.853 0 0 0 .853-.854v-5.12a.853.853 0 0 0-.853-.854H9.707V7.88a1.707 1.707 0 1 1-3.414 0V6.172z",clipRule:"evenodd"}),(0,s.jsx)("path",{fill:"#52C41A",d:"M7.147 4.466a.853.853 0 1 1 1.707 0V7.88a.853.853 0 0 1-1.707 0z"}),(0,s.jsx)("path",{fill:"#52C41A",d:"m8 3 2.217 2.304H5.783z"})]}),x=e=>(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e,children:[(0,s.jsx)("rect",{width:16,height:16,fill:"#FFF1F0",rx:2}),(0,s.jsx)("path",{fill:"#FF5658",fillRule:"evenodd",d:"M13 8A5 5 0 1 1 3 8a5 5 0 0 1 10 0M9.768 6.232a.5.5 0 0 1 0 .707L8.708 8l1.06 1.06a.5.5 0 0 1-.707.708L8 8.708l-1.062 1.06a.5.5 0 0 1-.707-.707L7.293 8l-1.06-1.062a.5.5 0 0 1 .706-.707L8 7.293l1.06-1.06a.5.5 0 0 1 .708 0",clipRule:"evenodd"})]});var m=r(47903);let f="box-yCgd0f",g="title-OR484p",j="content-iOwxYc",{Text:y}=o.A,A=e=>{let{data:t}=e;return t.map(e=>{let{code:t,link:r,error:n}=e,{source:i,output:l}=n||{},a=i?.path?`${i?.path}:${i?.line}:${i?.column}`:null,o=l?.path?`${l?.path}:${l?.line}:${l?.column}`:`There's no source map for this error. Possible reasons are as follows:
|
|
2
|
+
1. It might come from a third-party library without source map.
|
|
3
|
+
2. If this is your business source code, source map should be enabled in your build config.
|
|
4
|
+
`,u=(0,m.useRuleIndexNavigate)(t,r);return(0,s.jsxs)("div",{className:"container-iQTvf7",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:g,children:"Source"}),(0,s.jsxs)("div",{className:f,children:[(0,s.jsx)(c.A,{component:h}),(0,s.jsx)(y,{ellipsis:{tooltip:a},className:`${j} e2e-ecma-source`,children:a})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:g,children:"Output"}),(0,s.jsxs)("div",{className:f,children:[(0,s.jsx)(c.A,{component:p}),(0,s.jsx)(y,{ellipsis:{tooltip:o},className:`${j} e2e-ecma-output`,children:o})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:g,children:"Error"}),(0,s.jsxs)("div",{className:f,children:[(0,s.jsx)(c.A,{component:x}),(0,s.jsx)(y,{ellipsis:{tooltip:e.description},className:`${j} e2e-ecma-error`,children:e.description})]})]}),(0,s.jsx)(d.Ay,{onClick:u,type:"link",children:"more"})]})})};var v=r(96905),b=r(57126),w=r(11034),C=r(64254),S=r(75647),k=r(29166),N=r(93685),M=r(6662),E=r(14023);let T=e=>(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e,children:[(0,s.jsx)("rect",{width:16,height:16,fill:"#FFF7E6",rx:2}),(0,s.jsx)("path",{fill:"#F2793D",fillRule:"evenodd",d:"M11.377 5.186h1.488L10.973 3H5.027L3.135 5.186h1.488l.87-1.005h5.015z",clipRule:"evenodd"}),(0,s.jsx)("path",{fill:"#F2793D",fillRule:"evenodd",d:"M3.676 4.82h8.648c.299 0 .54.243.54.545v7.09a.543.543 0 0 1-.54.545H3.676a.543.543 0 0 1-.54-.545v-7.09c0-.302.241-.546.54-.546m2.702 1.77a.54.54 0 0 0 0 1.082h3.244a.54.54 0 1 0 0-1.081z",clipRule:"evenodd"})]}),R=e=>(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e,children:[(0,s.jsx)("rect",{width:16,height:16,fill:"#FFF7E6",rx:2}),(0,s.jsx)("path",{fill:"#F2793D",d:"M3 7V5c0-1.105 2.239-2 5-2s5 .895 5 2v2c0 1.105-2.239 2-5 2s-5-.895-5-2"}),(0,s.jsx)("path",{fill:"#F2793D",d:"M8 10c2.761 0 5-.895 5-2v1c0 1.105-2.239 2-5 2s-5-.895-5-2V8c0 1.105 2.239 2 5 2"}),(0,s.jsx)("path",{fill:"#F2793D",d:"M8 12c2.761 0 5-.895 5-2v1c0 1.105-2.239 2-5 2s-5-.895-5-2v-1c0 1.105 2.239 2 5 2"})]});var z=r(30371);let L=e=>(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e,children:[(0,s.jsx)("rect",{width:16,height:16,fill:"#E6F7FF",rx:2}),(0,s.jsx)("g",{clipPath:"url(#version_svg__a)",children:(0,s.jsx)("path",{fill:"#3874F6",d:"M13.438 9.875a.6.6 0 0 0-.216.043h-.002l-.002.002L8 12.079l-5.217-2.16H2.78l-.002-.001a.562.562 0 0 0-.43 1.039l5.432 2.248.002.001.003.001a.56.56 0 0 0 .43 0h.003l.002-.002 5.433-2.248a.563.563 0 0 0-.216-1.082M2.348 6.082 7.78 8.33l.003.001.002.001a.56.56 0 0 0 .43 0h.003l.002-.002 5.433-2.248a.563.563 0 0 0 0-1.04L8.22 2.796l-.002-.001-.003-.001a.56.56 0 0 0-.43 0h-.003l-.002.002-5.433 2.248a.563.563 0 0 0 0 1.039m11.09 1.355a.6.6 0 0 0-.216.043l-.002.001-.002.001L8 9.642l-5.217-2.16H2.78l-.002-.002a.563.563 0 0 0-.43 1.04l5.432 2.248h.002l.003.002a.56.56 0 0 0 .43 0l.003-.001.002-.001 5.433-2.248a.563.563 0 0 0-.216-1.083"})}),(0,s.jsx)("defs",{children:(0,s.jsx)("clipPath",{id:"version_svg__a",children:(0,s.jsx)("path",{fill:"#fff",d:"M2 2h12v12H2z"})})})]}),P="collapseContainer-RlFMpI",D="collapseChild-WWZD3z",B="attribute-bDSZ0z",I="iconContainer-qPzCrR",F="data-po89g7",O="pkgName-vA16cZ";var $=r(39729),_=r(18977),G=r(41419),W=r(9396);let q=e=>{let{title:t,description:r,extra:n}=e;return(0,s.jsxs)("div",{className:"label-XufLCq",children:[(0,s.jsxs)("div",{className:"labelContent-nkrbEg",children:[(0,s.jsx)("div",{children:t}),(0,s.jsx)("div",{children:r})]}),(0,s.jsx)("div",{children:n})]})},U=e=>{let{file:t}=e;return(0,s.jsxs)(C.A,{size:4,style:{marginLeft:8,flexShrink:0,marginTop:5},children:[(0,s.jsx)(b.A,{title:"Open in VSCode",children:(0,s.jsx)($.A,{style:{width:16,height:16,cursor:"pointer"},onClick:e=>{e.stopPropagation(),(0,W.jk)({file:t})}})}),(0,s.jsx)(b.A,{title:"Open in Cursor",children:(0,s.jsx)(_.A,{style:{width:16,height:16,cursor:"pointer"},onClick:e=>{e.stopPropagation(),(0,W.L2)({file:t})}})}),(0,s.jsx)(b.A,{title:"Open in Trae",children:(0,s.jsx)(G.A,{style:{width:16,height:16,cursor:"pointer"},onClick:e=>{e.stopPropagation(),(0,W.bX)({file:t})}})})]})},{Paragraph:V,Text:H}=o.A,{innerWidth:K}=window,Q=e=>{let{data:t,extraData:r}=e,i=t.map(e=>{let{packages:t}=e;return{totalSize:(0,k.x)(t,e=>e.targetSize.sourceSize),data:e}}).sort((e,t)=>t.totalSize-e.totalSize).map(e=>{let{data:t,totalSize:i}=e,{packages:a}=t,d=(0,m.formatSize)(i),{name:u}=a.find(e=>!!e.target.name).target,h=a.map(e=>e.target.version);return{key:u,label:(0,s.jsx)(q,{title:(0,s.jsx)(n.A,{style:{backgroundColor:"#EAEDF1",borderRadius:"2px"},children:(0,s.jsx)("span",{className:O,children:u})}),description:`${a.length} versions was found`,extra:(0,s.jsxs)("div",{className:"extraContainer-Zf1u14",children:[(0,s.jsxs)("div",{className:I,children:[(0,s.jsx)(c.A,{style:{fontSize:"18px"},component:z.A}),(0,s.jsx)("span",{className:F,children:d})]}),a&&a.length>0?(0,s.jsx)(N.hX,{text:"Show Relations",buttonProps:{size:"small"},drawerProps:{title:t.title,width:"60%"},children:(0,s.jsxs)(C.A,{direction:"vertical",className:"alert-space",style:{width:"100%"},children:[(0,s.jsxs)(C.A,{style:{marginBottom:E.or.BasePadding/2,width:"100%"},children:[(0,s.jsx)(M.h,{text:(0,s.jsx)(n.A,{style:{backgroundColor:"#EAEDF1"},children:u}),upperFirst:!1}),(0,s.jsx)(o.A.Text,{strong:!0,children:h.length}),(0,s.jsx)(o.A.Text,{children:" versions found"})]}),(0,s.jsx)(l.A,{size:"middle",items:a.map(e=>{let{target:i,targetSize:l}=e;return{label:(0,s.jsxs)(C.A,{className:"drawerLabelTitle-bDwhFt",children:[(0,s.jsxs)("div",{children:["v",i.version]}),(0,s.jsx)(n.A,{className:"drawerLabelSize-gzchzs",children:(0,m.formatSize)(l.sourceSize)})]}),key:`${i.root}${i.name}${i.version}`,children:r.getPackageRelationContentComponent({data:t,package:e})}})})]})}):null]})}),children:(0,s.jsx)(()=>a.map((e,t)=>{let r=e.target.version,n=e.target.root,i=(0,m.formatSize)(e.targetSize.sourceSize),l=e.targetSize.parsedSize?(0,m.formatSize)(e.targetSize.parsedSize):null;return(0,s.jsxs)("div",{className:P,children:[(0,s.jsx)(v.h,{style:{backgroundColor:"#fff"},title:(0,s.jsx)(H,{style:{width:K>1500?900:700},ellipsis:{tooltip:n},children:n}),description:(0,s.jsxs)("div",{className:D,children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:B,children:"Version"}),(0,s.jsxs)("div",{className:I,children:[(0,s.jsx)(c.A,{style:{fontSize:"18px"},component:L}),(0,s.jsxs)("span",{className:F,children:["v",r]})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:B,children:"Source size"}),(0,s.jsxs)("div",{className:I,children:[(0,s.jsx)(c.A,{style:{fontSize:"18px"},component:R}),(0,s.jsx)("span",{className:F,children:i})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:B,children:"Bundle size"}),(0,s.jsxs)("div",{className:I,children:[(0,s.jsx)(c.A,{style:{fontSize:"18px"},component:T}),(0,s.jsx)(b.A,{title:`The bundle size of "${u}" is ${i}, this is after bundled, concatenated module cannot get bundled size. `,children:(0,s.jsx)("span",{className:F,children:l||"CONCATENATED"})})]})]})]}),icon:(0,s.jsx)(V,{style:{position:"relative",top:"-10px"},copyable:{text:n}})}),t!==a.length-1?(0,s.jsx)(w.A,{style:{margin:"10px 0"}}):null]})}),{})}});return(0,s.jsx)(S.A,{style:{width:"100%"},defaultActiveKey:["E1001"],items:i})},Z=e=>{let{data:t}=e;return t.map(e=>{let{code:t,link:r,description:n}=e,i=(0,m.useRuleIndexNavigate)(t,r);return(0,s.jsx)(v.A,{style:{background:"#fff"},description:(0,s.jsx)("div",{className:"description-h4sYv3",children:n||""}),icon:(0,s.jsx)(d.Ay,{onClick:()=>i,type:"link",children:"more"})})})},{Text:J}=o.A,{innerWidth:Y}=window,X=e=>{let{data:t}=e,r=t.map(e=>{let{package:t,chunks:r}=e;return{key:`${t.name}@${t.version}`,label:(0,s.jsx)(q,{title:(0,s.jsx)(n.A,{style:{backgroundColor:"#EAEDF1",borderRadius:"2px"},children:(0,s.jsx)("span",{className:O,children:`${t.name}@${t.version}`})}),description:"has duplicates bundled into multiple chunks."}),children:(0,s.jsx)(()=>r.map(e=>{let{chunks:t,module:r}=e;return(0,s.jsx)("div",{className:P,children:(0,s.jsx)(v.h,{style:{backgroundColor:"#fff"},title:(0,s.jsxs)(C.A,{children:[(0,s.jsx)(c.A,{style:{fontSize:"18px"},component:z.A}),(0,s.jsxs)(J,{style:{width:Y>1500?900:700},children:["Module:"," ",(0,s.jsx)(J,{style:{fontSize:12,color:"rgba(28, 31, 35, 0.6)",fontWeight:300},children:r.path})]})]}),description:(0,s.jsx)("div",{className:D,children:t.map(e=>(0,s.jsxs)("div",{style:{display:"flex"},children:[(0,s.jsx)("div",{className:B,children:"Chunk"}),(0,s.jsx)("div",{className:I,children:(0,s.jsx)("span",{className:F,children:e.name})})]}))})})})}),{})}});return(0,s.jsx)(S.A,{style:{width:"100%"},defaultActiveKey:["E1005"],items:r})};var ee=r(28108);let{Text:et}=o.A,{innerWidth:er}=window,es=e=>{let{data:t,extraData:r}=e,{cwd:i}=r,l=t.map(e=>{let{module:t,initialChunks:r,asyncChunks:l}=e,a=(0,ee.Zb)(t.path,i);return{key:a,label:(0,s.jsx)(q,{title:(0,s.jsx)(n.A,{style:{backgroundColor:"#EAEDF1",borderRadius:"2px"},children:(0,s.jsx)("span",{className:O,children:a})}),description:"is included in both initial and async chunks."}),children:(0,s.jsx)(()=>(0,s.jsx)("div",{className:P,children:(0,s.jsx)(v.h,{style:{backgroundColor:"#fff"},title:(0,s.jsxs)(C.A,{children:[(0,s.jsx)(c.A,{style:{fontSize:"18px"},component:z.A}),(0,s.jsxs)(et,{style:{width:er>1500?900:700},children:["Module:"," ",(0,s.jsx)(et,{style:{fontSize:12,color:"rgba(28, 31, 35, 0.6)",fontWeight:300},children:a})]})]}),description:(0,s.jsxs)("div",{className:D,children:[r.length>0&&(0,s.jsxs)("div",{style:{marginBottom:16},children:[(0,s.jsx)("div",{style:{marginBottom:8,fontWeight:500,color:"rgba(28, 31, 35, 0.85)"},children:"Initial Chunks:"}),r.map(e=>(0,s.jsxs)("div",{style:{display:"flex",marginBottom:4},children:[(0,s.jsx)("div",{className:B,children:"Chunk"}),(0,s.jsx)("div",{className:I,children:(0,s.jsx)("span",{className:F,children:e.name||`chunk-${e.id}`})})]},e.id))]}),l.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{style:{marginBottom:8,fontWeight:500,color:"rgba(28, 31, 35, 0.85)"},children:"Async Chunks:"}),l.map(e=>(0,s.jsxs)("div",{style:{display:"flex",marginBottom:4},children:[(0,s.jsx)("div",{className:B,children:"Chunk"}),(0,s.jsx)("div",{className:I,children:(0,s.jsx)("span",{className:F,children:e.name||`(no chunk name, ChunkId: ${e.id})`})})]},e.id))]})]})})}),{})}});return(0,s.jsx)(S.A,{style:{width:"100%"},defaultActiveKey:l.map(e=>e.key),items:l})},{Text:en}=o.A,{innerWidth:ei}=window,el=e=>{let{data:t,extraData:r}=e,{cwd:i}=r,l=t.map(e=>{let{module:t,connections:r}=e,l=(0,ee.Zb)(t.path,i);return{key:l,label:(0,s.jsx)(q,{title:(0,s.jsx)(C.A,{size:4,align:"center",children:(0,s.jsx)(n.A,{style:{backgroundColor:"#EAEDF1",borderRadius:"2px"},children:(0,s.jsx)("span",{className:O,children:l})})}),description:`is only imported for its side effects by ${new Set(r.map(e=>e.originModule)).size} importer(s).`}),children:(0,s.jsx)(()=>(0,s.jsx)("div",{className:P,children:(0,s.jsx)(v.h,{style:{backgroundColor:"#fff"},title:(0,s.jsxs)(C.A,{align:"center",children:[(0,s.jsx)(c.A,{style:{fontSize:"18px"},component:z.A}),(0,s.jsxs)(en,{style:{width:ei>1500?900:700},children:["Module:"," ",(0,s.jsx)(en,{style:{fontSize:12,color:"rgba(28, 31, 35, 0.6)",fontWeight:300},children:l})]}),(0,s.jsx)(U,{file:t.path})]}),description:(0,s.jsxs)("div",{className:D,children:[(0,s.jsx)("div",{style:{marginBottom:8,fontWeight:500,color:"rgba(28, 31, 35, 0.85)"},children:"Side-Effects-Only Importers:"}),r.map((e,t)=>(0,s.jsxs)("div",{style:{display:"flex",marginBottom:4},children:[(0,s.jsx)("div",{className:B,children:"Import"}),(0,s.jsxs)("div",{className:I,children:[(0,s.jsx)("span",{className:F,children:e.userRequest}),(0,s.jsx)(n.A,{style:{marginLeft:8,backgroundColor:"#EAEDF1",borderRadius:"2px",fontSize:11},children:e.dependencyType})]})]},t))]})})}),{})}});return(0,s.jsx)(S.A,{style:{width:"100%"},defaultActiveKey:l.map(e=>e.key),items:l})},{innerWidth:ea}=window,eo=e=>{let{data:t,extraData:r}=e,{cwd:i}=r,l=new Map;for(let e of t){let t=e.requiredModule.path;l.has(t)||l.set(t,{requiredPath:t,issuers:[]}),l.get(t).issuers.push({issuerPath:e.issuerModule.path,request:e.request})}let a=Array.from(l.values()).map(e=>{let t=(0,ee.Zb)(e.requiredPath,i),r=e.issuers.length;return{key:t,label:(0,s.jsx)(q,{title:(0,s.jsx)(C.A,{size:4,align:"center",children:(0,s.jsx)(n.A,{style:{backgroundColor:"#EAEDF1",borderRadius:"2px"},children:(0,s.jsx)("span",{className:O,children:t})})}),description:`cannot be tree-shaken — required via CJS \`require()\` by ${r} caller(s).`}),children:(0,s.jsx)(()=>(0,s.jsx)("div",{className:P,children:(0,s.jsx)(v.h,{style:{backgroundColor:"#fff"},title:(0,s.jsxs)(C.A,{align:"center",children:[(0,s.jsx)("span",{style:{fontSize:13,fontWeight:500,color:"rgba(28, 31, 35, 0.85)"},children:"Required Module:"}),(0,s.jsx)("span",{style:{fontSize:12,color:"rgba(28, 31, 35, 0.6)",fontWeight:300,maxWidth:ea>1500?900:700,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"inline-block"},children:t})]}),description:(0,s.jsxs)("div",{className:D,children:[(0,s.jsx)("div",{style:{marginBottom:8,fontWeight:500,color:"rgba(28, 31, 35, 0.85)"},children:"CJS Require Callers:"}),e.issuers.map((e,t)=>(0,s.jsxs)("div",{style:{display:"flex",marginBottom:4,alignItems:"center"},children:[(0,s.jsx)("div",{className:B,children:"require"}),(0,s.jsxs)("div",{className:I,children:[(0,s.jsx)("span",{className:F,children:(0,ee.Zb)(e.issuerPath,i)}),(0,s.jsx)(n.A,{style:{marginLeft:8,backgroundColor:"#EAEDF1",borderRadius:"2px",fontSize:11,fontFamily:"Menlo"},children:`require('${e.request}')`}),(0,s.jsx)(U,{file:e.issuerPath})]})]},t))]})})}),{})}});return(0,s.jsx)(S.A,{style:{width:"100%"},defaultActiveKey:a.map(e=>e.key),items:a})};function ed(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:60;if(e.length<=t)return e;let r=Math.floor((t-3)/2);return`${e.slice(0,r)}...${e.slice(-r)}`}let{Text:ec}=o.A,eu=e=>{let{data:t,extraData:r}=e,{cwd:i}=r,l=t.map(e=>{let{packageName:t,packageVersion:r,esmEntry:l,resolvedModule:a,issuers:o}=e,d=(0,ee.Zb)(a.path,i),c=(0,ee.Zb)(l,i);return{key:`${t}::${a.path}`,label:(0,s.jsx)(q,{title:(0,s.jsx)(C.A,{size:4,align:"center",children:(0,s.jsx)(n.A,{style:{backgroundColor:"#EAEDF1",borderRadius:"2px"},children:(0,s.jsx)("span",{className:O,children:`${t}@${r}`})})}),description:`has an ESM entry but was resolved to CJS by ${o.length} importer(s).`}),children:(0,s.jsx)(()=>(0,s.jsx)("div",{className:P,children:(0,s.jsx)(v.h,{style:{backgroundColor:"#fff"},title:(0,s.jsxs)(C.A,{align:"center",wrap:!0,children:[(0,s.jsx)(ec,{strong:!0,style:{fontSize:13},children:"Package:"}),(0,s.jsx)(n.A,{style:{fontFamily:"Menlo",backgroundColor:"#EAEDF1",borderRadius:"2px"},children:`${t}@${r}`})]}),description:(0,s.jsxs)("div",{className:D,style:{flexDirection:"column",paddingTop:16},children:[(0,s.jsxs)("div",{style:{display:"flex",marginBottom:8,alignItems:"center"},children:[(0,s.jsx)("div",{className:B,style:{color:"#52c41a",minWidth:100},children:(0,s.jsx)(n.A,{style:{backgroundColor:"#f6ffed",borderColor:"#b7eb8f",color:"#389e0d",borderRadius:"2px"},children:"ESM Entry"})}),(0,s.jsxs)("div",{className:I,children:[(0,s.jsx)(b.A,{title:c,children:(0,s.jsx)("span",{className:F,children:ed(c)})}),(0,s.jsx)(n.A,{style:{marginLeft:8,backgroundColor:"#f6ffed",borderColor:"#b7eb8f",color:"#389e0d",borderRadius:"2px",fontSize:11},children:"declared in package.json"})]})]}),(0,s.jsxs)("div",{style:{display:"flex",marginBottom:16,alignItems:"center"},children:[(0,s.jsx)("div",{className:B,style:{color:"#ff4d4f",minWidth:100},children:(0,s.jsx)(n.A,{style:{backgroundColor:"#fff7e6",borderColor:"#ffd591",color:"#d46b08",borderRadius:"2px"},children:"CJS Resolved"})}),(0,s.jsxs)("div",{className:I,children:[(0,s.jsx)(b.A,{title:d,children:(0,s.jsx)("span",{className:F,children:ed(d)})}),(0,s.jsx)(n.A,{style:{marginLeft:8,backgroundColor:"#fff1f0",borderColor:"#ffa39e",color:"#cf1322",borderRadius:"2px",fontSize:11},children:"actually bundled"})]})]}),(0,s.jsx)(S.A,{size:"small",ghost:!0,items:[{key:"issuers",label:(0,s.jsx)("span",{style:{fontWeight:500,color:"rgba(28, 31, 35, 0.85)"},children:`ESM Importers (${o.length})`}),children:o.map((e,t)=>(0,s.jsxs)("div",{style:{display:"flex",marginBottom:4,alignItems:"center"},children:[(0,s.jsx)("div",{className:B,children:"import"}),(0,s.jsxs)("div",{className:I,children:[(0,s.jsx)("span",{className:F,children:(0,ee.Zb)(e.path,i)}),(0,s.jsx)(n.A,{style:{marginLeft:8,backgroundColor:"#EAEDF1",borderRadius:"2px",fontSize:11,fontFamily:"Menlo"},children:`'${e.request}'`})]})]},t))}]})]})})}),{})}});return(0,s.jsx)(S.A,{style:{width:"100%"},defaultActiveKey:l.map(e=>e.key),items:l})},eh=e=>{let{title:t,dataSource:r,extraData:o}=e,d=["E1001","E1002","E1003","E1004","E1005","E1006","E1007","E1008","E1009"].find(e=>r.some(t=>t.code===e))??"E1001",[c,h]=(0,u.useState)(d),p=[{key:"E1001",label:"Duplicate Packages",data:[]},{key:"E1002",label:"Cross Chunks Package",data:[]},{key:"E1003",label:"Loader Performance Optimization",data:[]},{key:"E1004",label:"ECMA Version Check",data:[]},{key:"E1005",label:"Default Import Check",data:[]},{key:"E1006",label:"Module Mixed Chunks",data:[]},{key:"E1007",label:"Tree Shaking Side Effects Only",data:[]},{key:"E1008",label:"CJS Require Cannot Tree-Shake",data:[]},{key:"E1009",label:"ESM Import Resolved to CJS",data:[]}];r.forEach(e=>{let t=p.find(t=>t.key===e.code)?.data;t?.push(e)}),p.sort((e,t)=>(t.data.length>0)-(e.data.length>0));let x=p.map(e=>{let t,r,l=c===e.key?{border:"1px solid #91D5FF",backgroundColor:"#E6F7FF"}:{},d=c===e.key?{color:"#1890FF"}:{};switch(e.key){case"E1001":t=(0,s.jsx)(Q,{data:e.data,extraData:o});break;case"E1002":t=(0,s.jsx)(X,{data:e.data,extraData:o});break;case"E1003":case"E1005":t=(0,s.jsx)(Z,{data:e.data});break;case"E1004":r=(0,s.jsx)("span",{children:"No ECMA Version Check Rules were found. Please refer to 「https://rsdoctor.rs/guide/usage/rule-config」."}),t=(0,s.jsx)(A,{data:e.data});break;case"E1006":t=(0,s.jsx)(es,{data:e.data,extraData:o});break;case"E1007":t=(0,s.jsx)(el,{data:e.data,extraData:o});break;case"E1008":t=(0,s.jsx)(eo,{data:e.data,extraData:o});break;case"E1009":t=(0,s.jsx)(eu,{data:e.data,extraData:o});break;default:t=null}return e.data.length||(t=(0,s.jsx)(i.A,{description:r,image:i.A.PRESENTED_IMAGE_SIMPLE})),{key:e.key,label:(0,s.jsx)(()=>(0,s.jsx)(v.A,{style:{backgroundColor:"transparent",paddingLeft:0,paddingRight:0,width:"100%"},title:(0,s.jsx)("span",{className:"labelTitle-tjSCQ_",children:e.label}),description:(0,s.jsxs)("div",{className:"labelDescription-kB74lb",children:[(0,s.jsx)("span",{children:e.data.length}),(0,s.jsx)(n.A,{style:{fontFamily:"Menlo",borderRadius:"2px",...l},children:(0,s.jsx)("span",{style:{...d},children:e.key})})]})}),{}),children:(0,s.jsx)(a.Zp,{className:"card-HNTMcZ",type:"inner",title:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.A,{style:{fontFamily:"Menlo",fontWeight:"700",fontSize:"13px",backgroundColor:"#EAEDF1",borderRadius:"2px"},children:e.key}),(0,s.jsx)("span",{children:e.label})]}),children:t})}});return(0,s.jsx)(a.Zp,{style:{width:"100%",borderRadius:"12px"},children:(0,s.jsxs)("div",{className:"container-TWzmhb",children:[(0,s.jsx)("div",{className:"title-gD67_A",children:t}),r.length?(0,s.jsx)(l.A,{onChange:h,tabBarGutter:10,type:"card",defaultActiveKey:p[0]?.key??"E1001",items:x}):(0,s.jsx)("div",{style:{minHeight:"480px",display:"flex",justifyContent:"center",alignItems:"center"},children:(0,s.jsx)(i.A,{description:"No Bundle Alerts Data",image:i.A.PRESENTED_IMAGE_SIMPLE})})]})})}},20112(e,t,r){var s=r(27080),n=r(27348),i=r(15722),l=r(47903),a=r(17599),o=r(95869),d=r(14023),c=r(58250);(0,o.eN)({api:i.hp.ServerAPI.API.GetProjectInfo,responsePropName:"project",Component:e=>{let{filter:t,project:r}=e,{root:i,errors:o}=r,u=(0,l.useCompileAlertsByErrors)(o),{setCompileAlertsViewMode:h,viewMode:p,setViewMode:x}=(0,l.useViewMode)(),m=t?u.filter(t):u;return(0,n.useEffect)(()=>{(0,l.hasViewModeFromStorage)()||x({compileAlerts:u.length>=5?d.nE.Group:d.nE.List},!1)},[]),(0,s.jsx)(a.J,{title:"Compile Alerts",dataSource:m,extraData:{cwd:i,getPackageRelationContentComponent:e=>(0,s.jsx)(c.rU,{body:{id:e.data.id,target:e.package.target},cwd:i})},viewMode:p.compileAlerts,setViewMode:h,cwd:i})}})},49073(e,t,r){r.d(t,{EJ:()=>S});var s=r(27080),n=r(27348),i=r(15722),l=r(78195),a=r(25294),o=r(46198),d=r(87884),c=r(75647),u=r(98670),h=r(8587),p=r(5877),x=r(36842),m=r(71859),f=r(12149),g=r(8592),j=r(30118),y=r(51874),A=r.n(y),v=r(95869),b=r(14023);function w(e){let t=0,r=0;e.forEach(e=>{"warn"===e.level?t++:r++});let n=0!==t&&0!==r?"problems":0===t?"errors":"warns";return{title:`${e.length} compiled ${n}`,detail:(0,s.jsxs)(l.A.Text,{strong:!0,style:{color:"#fff",marginBottom:0},children:[(0,s.jsx)(l.A.Text,{style:{color:"inherit",fontSize:16},children:"Compiled with"}),(0,s.jsxs)(l.A.Text,{strong:!0,style:{color:b.Q1.Red,fontSize:16},children:[" ",r," ",1===r?"error":"errors"," "]}),(0,s.jsx)(l.A.Text,{style:{color:"inherit",fontSize:16},children:"and"}),(0,s.jsxs)(l.A.Text,{strong:!0,style:{color:b.Q1.Yellow,fontSize:16},children:[" ",t," ",1===t?"warning":"warnings"]})]}),warns:t,errors:r}}r(59695);let C=e=>{let{alerts:t=[],open:r,onClose:i}=e;return t.length?(0,s.jsxs)(j.default,{visible:r,onClose:()=>i(),style:{width:"100%",height:"100%",margin:0,zIndex:1e3},closable:!1,modalRender:e=>n.cloneElement(e,{style:{background:"rgba(0, 0, 0, 0.7)",color:"#fff",height:"100%",overflow:"scroll",borderRadius:0}}),children:[(0,s.jsxs)(a.A,{justify:"space-between",align:"middle",children:[w(t).detail,(0,s.jsx)(o.Ay,{onClick:()=>i(),type:"text",style:{color:"#fff"},size:"large",icon:(0,s.jsx)(x.A,{})})]}),(0,s.jsx)(a.A,{gutter:[0,b.or.BasePadding],children:t.map(e=>(0,s.jsx)(d.A,{span:24,style:{whiteSpace:"pre-wrap",lineHeight:"16px",fontSize:14},children:(0,s.jsx)(c.A,{ghost:!0,style:{background:"#000"},defaultActiveKey:[e.id],expandIcon:e=>e.isActive?(0,s.jsx)(m.A,{style:{color:"#fff"}}):(0,s.jsx)(f.A,{style:{color:"#fff"}}),children:(0,s.jsx)(c.A.Panel,{header:(0,s.jsxs)("div",{style:{color:"#fff"},children:["warn"===e.level?(0,s.jsx)(u.A,{color:b.Q1.Yellow,children:"WARNING"}):(0,s.jsx)(u.A,{color:b.Q1.Red,children:"ERROR"}),(0,s.jsx)(A(),{children:e.description||e.title})]}),children:(0,s.jsx)("div",{style:{color:"#fff"},children:(0,s.jsx)(A(),{children:e.stack})})},e.id)})},e.id))})]}):null},S=(0,v.eN)({api:i.hp.ServerAPI.API.GetOverlayAlerts,Component:e=>{let{alerts:t=[]}=e;if(!t.length)return null;let[r,i]=(0,n.useState)(!1);return(0,s.jsxs)("div",{className:"container-t1WME9",children:[(0,s.jsx)("div",{onClick:()=>i(!r),className:"badgeContainer-K7EgOu",children:(0,s.jsx)(p.A,{count:t.length,size:"small",children:(0,s.jsx)(g.A,{style:{fontSize:15}})})}),(0,s.jsx)(C,{alerts:t,open:r,onClose:()=>i(!1)})]})},responsePropName:"alerts",fallbackComponent:()=>null});(0,v.eN)({api:i.hp.ServerAPI.API.GetOverlayAlerts,Component:e=>{let{alerts:t=[],defaultOpen:r=t.length>0}=e;if(!t.length)return null;let[i,l]=(0,n.useState)(r);return(0,s.jsxs)(n.Fragment,{children:[(0,s.jsx)(h.A,{banner:!0,message:n.cloneElement(w(t).detail,{style:{color:"#000"}}),icon:(0,s.jsx)(g.A,{}),action:(0,s.jsx)(o.Ay,{onClick:()=>l(!0),size:"small",children:"More"})}),(0,s.jsx)(C,{alerts:t,open:i,onClose:()=>l(!1)})]})},responsePropName:"alerts",fallbackComponent:()=>null})},98705(e,t,r){r.d(t,{Ex:()=>l});var s=r(27080),n=r(57126);r(27348);let i={default:"linear-gradient(to bottom, #3ea2ff 0%, #0072db 100%)",success:"linear-gradient(to bottom, #6cf42a 0%, #52C41A 100%)",warn:"linear-gradient(to bottom, #ffc100 0%, #f59025 100%)",error:"linear-gradient(to bottom, rgb(250 127 22), #FF4D4F 100%)"},l=e=>{let{label:t,value:r,type:l="default",tooltip:a}=e,o={height:"100%",lineHeight:"22px",width:"auto",display:"inline-block",boxSizing:"border-box",padding:"0 6px",color:"#fff",fontSize:12,textAlign:"center",verticalAlign:"middle"},d=(0,s.jsxs)("div",{style:{height:22,margin:0,padding:0,boxSizing:"border-box",borderRadius:4,fontSize:0,whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",display:"flex",justifyContent:"flex-start",alignItems:"center"},children:[(0,s.jsx)("div",{style:{...o,borderTopLeftRadius:4,borderBottomLeftRadius:4,background:"linear-gradient(to bottom, #525252a3 0%, #1F1F1F 100%)"},children:t}),(0,s.jsx)("div",{style:{...o,borderTopRightRadius:4,borderBottomRightRadius:4,overflow:"hidden",textOverflow:"ellipsis",background:i[l]||i.default},children:r})]});return a?(0,s.jsx)(n.A,{title:!0===a?r:a,placement:"topLeft",children:d}):d}},6785(e,t,r){r.d(t,{QE:()=>m,aq:()=>g,vh:()=>x});var s=r(27080),n=r(15722),i=r(78195),l=r(64254),a=r(57126),o=r(23307),d=r(71513),c=r(27348),u=r(47903),h=r(14023),p=r(17830);let x=e=>{let{baseline:t,current:r,...n}=e,i=d.TS.diffSize(t,r);return(0,s.jsx)(m,{...n,...i})},m=e=>{let{percent:t,state:r,fontSize:l=14}=e,a=+t.toFixed(2);if(a>0){let e=`${a}`;if(r===n.Kj.RsdoctorClientDiffState.Up)return(0,s.jsxs)(i.A.Text,{strong:!0,style:{fontSize:l,color:h.Q1.Red},children:["+",e,"%"]});if(r===n.Kj.RsdoctorClientDiffState.Down)return(0,s.jsxs)(i.A.Text,{strong:!0,style:{fontSize:l,color:h.Q1.Green},children:["-",e,"%"]})}return null},f=e=>{let{data:t,formatter:r}=e,{percent:n,state:o,size:d}=t,{baseline:c,current:h}=d,p=r?r(c,"baseline"):(0,u.formatSize)(c),x=r?r(h,"current"):(0,u.formatSize)(h);return(0,s.jsx)(l.A,{align:"start",children:(0,s.jsxs)(l.A,{direction:"vertical",style:{textAlign:"left"},children:[(0,s.jsxs)(l.A,{children:[(0,s.jsx)(i.A.Text,{style:{fontSize:10,color:"inherit"},keyboard:!0,children:"Current"}),(0,s.jsx)(a.A,{title:"number"==typeof x||"string"==typeof x?`Value of Current is ${x}`:void 0,children:(0,s.jsx)(i.A.Text,{style:{fontSize:16,color:"inherit"},strong:!0,children:x})}),(0,s.jsx)(m,{percent:n,state:o})]}),(0,s.jsxs)(l.A,{children:[(0,s.jsx)(i.A.Text,{style:{fontSize:10,color:"inherit"},keyboard:!0,children:"Baseline"}),(0,s.jsx)(a.A,{title:"number"==typeof p||"string"==typeof p?`Value of Baseline is ${p}`:void 0,children:(0,s.jsx)(i.A.Text,{style:{fontSize:14},type:"secondary",children:p})})]})]})})},g=e=>{let{titles:t,datas:r,formatter:n,showPercentInTitle:a}=e,[d,u]=(0,c.useState)(0);return(0,s.jsx)(p.j,{title:t.length>1?(0,s.jsx)(o.A,{defaultValue:t[d],options:a?t.map((e,t)=>{let n=r[t];return{label:(0,s.jsxs)(l.A,{children:[(0,s.jsx)(i.A.Text,{children:e}),(0,s.jsx)(m,{percent:n.percent,state:n.state})]}),value:e}}):t,onChange:e=>{u(t.indexOf(e))},size:"small",style:{transition:"transform 0.3s ease"},value:t[d]||t[0]}):t[d],value:(0,s.jsx)(f,{data:r[d],formatter:n}),statisticProps:{style:{textAlign:"left"}}})}},24184(e,t,r){r.d(t,{Zp:()=>d});var s=r(27080),n=r(27348),i=r(62751),l=r(81308),a=r(34424),o=r(64254);r(6785);let d=e=>{let{collapsable:t=!1,children:r,title:d,dividerStyle:c,defaultCollapsed:u=!1,...h}=e,[p,x]=(0,n.useState)(u);return d&&t?(0,s.jsx)(a.A,{style:{borderRadius:"12px"},...h,title:(0,s.jsxs)(o.A,{style:{fontSize:"inherit"},children:[(0,s.jsx)("div",{style:{cursor:"pointer"},onClick:()=>x(!p),children:p?(0,s.jsx)(i.A,{}):(0,s.jsx)(l.A,{})}),d]}),children:p?null:r}):(0,s.jsx)(a.A,{style:{borderRadius:"12px"},title:d,...h,children:r})}},17830(e,t,r){r.d(t,{j:()=>i});var s=r(27080),n=r(86766);let i=e=>{let{title:t,value:r,statisticProps:i,boxProps:l}=e;return(0,s.jsx)("div",{className:"statistic-card",...l,children:(0,s.jsx)(n.A,{title:(0,s.jsx)("div",{className:"statistic-card-title",children:t}),valueRender:()=>r,valueStyle:{fontSize:24},...i})})}},31376(e,t,r){r.d(t,{n:()=>j});var s=r(27080),n=r(27348),i=r(53829),l=r(36473),a=r(15774),o=r(41522),d=r(8390),c=r(10017),u=r(34633),h=r(78631),p=r(65925),x=r(80286),m=r.n(x),f=r(43847),g=r(72270);let j=(0,n.memo)(e=>{let{loaderData:t,pluginsData:r,formatterFn:x,chartType:j=g.wx.Normal,exts:y=null}=e,A=[],v=[],[b,w]=(0,n.useState)({});return l.Y([d.a,c.a,u.a,h.a,p.a]),(0,n.useEffect)(()=>{if(!t)return;let e=[];t.forEach(t=>{e.unshift(t.n+" total"),e.unshift(t.n)}),t.forEach(function(t,r){if(A.push({name:t.n+" total",value:[e.indexOf(t.n+" total"),t.s,t.e,t.e-t.s],itemStyle:{normal:{color:g.dK[Math.floor(27*Math.random())],opacity:.25}}}),t?.c)for(let r=0;r<t?.c?.length;r++)A.push({name:t.n,value:[e.indexOf(t.n),t.c[r].s,t.c[r].e,t.c[r].e-t.c[r].s],itemStyle:{normal:{color:g.dK[Math.floor(27*Math.random())],opacity:.25}},ext:t.c[r].ext})}),v=e.map((e,t)=>t%2!=0?e.replace(" total",""):"")},[t]),(0,n.useEffect)(()=>{if(!r)return;let e=(0,f.$)(r,e=>e.pid);Object.keys(e).reverse().forEach(function(t,r){e[t].forEach((e,t)=>{A.push({name:String(e.pid),value:[r,e.args.s,e.args.e,e.args.e-e.args.s],itemStyle:{normal:{color:g.dK[Math.floor(27*Math.random())],opacity:.25}},ext:e})}),v.push(String(t.charAt(0).toUpperCase()+t.slice(1)))})},[r]),(0,n.useEffect)(()=>{w({tooltip:{formatter:e=>x(e)},dataZoom:[{type:"slider",filterMode:"weakFilter",showDataShadow:!1,top:-10},{type:"inside",filterMode:"weakFilter"}],grid:{top:10,left:0,bottom:10,right:0,height:v.length>(j===g.wx.Loader?6:3)?"auto":60*v.length,containLabel:!0},xAxis:{interval:y?.endTimestamp&&y?.startTimestamp?Math.floor((y.endTimestamp-y.startTimestamp)/8):null,position:"top",splitLine:{show:!0},scale:!0,axisLine:{show:!1},axisLabel:{formatter:e=>m()(e).format("HH:mm:ss:SSS")}},yAxis:{type:"category",splitLine:{show:!1},axisLabel:{inside:!0,lineHeight:20,width:100,fontSize:12,color:"#000",verticalAlign:"bottom"},axisLine:{show:!1},axisTick:{show:!1},data:v},series:[{type:"custom",renderItem:function(e,t){let r=t.value(0),s=t.coord([t.value(1),r]),n=t.coord([t.value(2),r]),i=.3*t.size([0,1])[1],l=a.clipRectByRect({x:s[0],y:j===g.wx.Loader?s[1]-(r%2!=0?0:2*i):s[1],width:n[0]-s[0]||5,height:i},{x:e.coordSys.x,y:e.coordSys.y,width:e.coordSys.width,height:e.coordSys.height});return l&&{type:"rect",transition:["shape"],shape:l,style:t.style(),enterFrom:{style:{opacity:0},x:0}}},itemStyle:{opacity:.8},encode:{x:[1,2],y:0},data:A}]})},[t,r,y]),(0,s.jsx)(i.A,{option:b,echarts:o,style:{width:"100%",minHeight:j===g.wx.Loader?"500px":j===g.wx.Minify?"100px":"200px",maxHeight:j===g.wx.Minify?"100px":"1000px",border:"1px solid #eee",borderRadius:"10px"}})})},77354(e,t,r){r.d(t,{z:()=>m});var s=r(27080),n=r(27348),i=r(43847),l=r(39646);r(24328);var a=r(23137),o=r(47311),d=r(28108),c=r(31376),u=r(57838),h=r(72270);let p=0,x=0,m=e=>{let{loaders:t,cwd:r}=e,{isDark:m}=(0,a.DP)(),f=(0,n.useRef)(null),[g,j]=(0,n.useState)([]),y=(0,u.Wy)(g,200),A=(0,n.useMemo)(()=>(0,i.$)(t,e=>e.loader),[t]),v=(0,n.useCallback)(e=>{let{name:s,data:n}=e,i=s.replace(" total","");return n?.ext?(0,u.Bq)(n.ext):(0,u.iv)(i,t,r)},[]);return(0,n.useEffect)(()=>{j(Object.keys(A).map(e=>{let t=A[e]||[],{start:s,end:n}=(0,o.xr)(t);return(s<p||0===p)&&(p=s),(n>x||0===x)&&(x=n),{p:e,n:e,s:s,e:n,c:t.map(t=>({p:e,n:(0,d.Zb)(t.resource,r),s:t.startAt,e:t.endAt,ext:t}))}}))},[A]),(0,s.jsx)(s.Fragment,{children:g?.length?(0,s.jsx)("div",{className:["loader-chart-container",m?"loader-chart-container_dark":""].join(" ").trim(),ref:f,style:{width:"100%"},children:(0,s.jsx)(c.n,{loaderData:y,formatterFn:v,chartType:h.wx.Loader,exts:{startTimestamp:p,endTimestamp:x}})}):(0,s.jsx)(l.A,{})})}},20717(e,t,r){r.d(t,{A:()=>s});let s={title:"title-BZ9xk1"}},65390(e,t,r){r.d(t,{h:()=>v,C:()=>A});var s=r(27080);r(27348);var n=r(44443),i=r(64254),l=r(12149),a=r(70263),o=r(31100),d=r(37993),c=r(67491);let u=e=>(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:14,fill:"none",viewBox:"0 0 12 14",...e,children:[(0,s.jsx)("path",{fill:"#FAAD14",d:"M11.409 3.51 8.046.146A.5.5 0 0 0 7.693 0H1.056a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 .5.5h10a.5.5 0 0 0 .5-.5V3.864a.5.5 0 0 0-.147-.355M7.462 1.152l2.94 2.94h-2.94zm2.969 11.722H1.68V1.125h4.718V4.5a.656.656 0 0 0 .657.656h3.375z"}),(0,s.jsx)("path",{fill:"#FAAD14",d:"M6.927 9.651h.888a1.6 1.6 0 0 1-.24.775q-.211.339-.592.528-.377.19-.908.19a1.9 1.9 0 0 1-.745-.142 1.6 1.6 0 0 1-.564-.416 1.9 1.9 0 0 1-.354-.653 2.8 2.8 0 0 1-.121-.858v-.3q0-.474.124-.858.128-.386.362-.656.238-.27.567-.415.33-.146.737-.146.54 0 .911.196.375.195.58.54.206.345.249.784H6.93a1.15 1.15 0 0 0-.104-.442.6.6 0 0 0-.27-.276 1 1 0 0 0-.475-.095.86.86 0 0 0-.39.083.7.7 0 0 0-.278.252 1.3 1.3 0 0 0-.17.428q-.053.255-.053.6v.305q0 .335.05.591.051.251.155.428a.7.7 0 0 0 .273.26.9.9 0 0 0 .407.087q.28 0 .46-.09a.6.6 0 0 0 .276-.263q.098-.176.116-.437"}),(0,s.jsx)("path",{fill:"#FFF1B8",fillRule:"evenodd",d:"M6.4 1.125V4.5a.656.656 0 0 0 .656.656h3.375v7.719H1.68V1.125zm1.415 8.526h-.888q-.017.261-.116.437a.6.6 0 0 1-.276.264q-.18.09-.46.089a.9.9 0 0 1-.407-.086.7.7 0 0 1-.273-.261q-.104-.176-.154-.428a3 3 0 0 1-.05-.59v-.307q0-.345.053-.6.056-.258.169-.427a.7.7 0 0 1 .279-.252.86.86 0 0 1 .389-.083q.297 0 .475.095a.6.6 0 0 1 .27.276q.09.18.104.442h.89a1.8 1.8 0 0 0-.249-.784q-.205-.345-.579-.54-.37-.195-.911-.196-.407 0-.737.146-.33.145-.567.415-.234.27-.362.656a2.8 2.8 0 0 0-.124.858v.3q0 .476.121.858.122.383.354.653.234.27.564.416.33.143.745.143.531 0 .908-.19.38-.19.591-.529a1.6 1.6 0 0 0 .24-.775",clipRule:"evenodd"})]}),h=e=>(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:14,fill:"none",viewBox:"0 0 12 14",...e,children:[(0,s.jsx)("path",{fill:"#722ED1",d:"M6.076 7.58a.356.356 0 0 1 .646.299l-1.576 3.414a.356.356 0 0 1-.646-.298zM7.198 8.135a.356.356 0 0 0 0 .503l.8.799-.8.8a.356.356 0 1 0 .503.502l1.05-1.05a.356.356 0 0 0 0-.503l-1.05-1.05a.356.356 0 0 0-.503 0M4.024 8.135a.356.356 0 0 1 0 .503l-.799.799.8.8a.356.356 0 1 1-.504.502l-1.05-1.05a.356.356 0 0 1 0-.503l1.05-1.05a.356.356 0 0 1 .503 0"}),(0,s.jsx)("path",{fill:"#EFDBFF",fillRule:"evenodd",d:"M5.955 1.125V4.5a.656.656 0 0 0 .656.656h3.375v7.719h-8.75V1.125zm.121 6.456a.356.356 0 1 1 .646.298l-1.576 3.414a.356.356 0 1 1-.646-.298zm1.122.554a.356.356 0 0 0 0 .503l.8.799-.8.8a.356.356 0 1 0 .503.502l1.05-1.05a.356.356 0 0 0 0-.503l-1.05-1.05a.356.356 0 0 0-.503 0m-3.174.503a.356.356 0 1 0-.503-.503l-1.05 1.05a.356.356 0 0 0 0 .503l1.05 1.05a.355.355 0 1 0 .503-.502l-.799-.799z",clipRule:"evenodd"}),(0,s.jsx)("path",{fill:"#722ED1",d:"M10.964 3.51 7.602.146A.5.5 0 0 0 7.249 0H.61a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 .5.5h10a.5.5 0 0 0 .5-.5V3.864a.5.5 0 0 0-.147-.355M7.017 1.152l2.941 2.94h-2.94zm2.97 11.722h-8.75V1.125h4.718V4.5a.656.656 0 0 0 .656.656h3.375z"})]}),p=e=>(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:14,fill:"none",viewBox:"0 0 12 14",...e,children:[(0,s.jsx)("path",{fill:"#E6F7FF",d:"M6.733 4.5V1.125h-4.72v11.75h8.75V5.156H7.39a.656.656 0 0 1-.656-.656m-2.094.781a.625.625 0 1 1 0 1.25.625.625 0 0 1 0-1.25m4.625 4.594H3.515a.125.125 0 0 1-.098-.202l1.56-1.987a.125.125 0 0 1 .196 0l.642.819 1.216-1.55a.126.126 0 0 1 .199 0l2.132 2.718a.125.125 0 0 1-.098.202"}),(0,s.jsx)("path",{fill:"#1890FF",d:"M11.742 3.51 8.38.146A.5.5 0 0 0 8.026 0H1.39a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 .5.5h10a.5.5 0 0 0 .5-.5V3.864a.5.5 0 0 0-.147-.355M7.795 1.152l2.94 2.94h-2.94zm2.969 11.722h-8.75V1.125h4.719V4.5a.656.656 0 0 0 .656.656h3.375z"}),(0,s.jsx)("path",{fill:"#1890FF",d:"m7.031 6.955-1.215 1.55-.643-.82a.125.125 0 0 0-.196 0l-1.56 1.988a.125.125 0 0 0 .099.202h5.748c.105 0 .163-.12.098-.202L7.23 6.955a.127.127 0 0 0-.199 0M4.014 5.906a.625.625 0 1 0 1.25 0 .625.625 0 0 0-1.25 0"})]}),x=e=>(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:14,fill:"none",viewBox:"0 0 12 14",...e,children:[(0,s.jsx)("path",{fill:"#E6F7FF",fillRule:"evenodd",d:"M6.177 1.125V4.5a.656.656 0 0 0 .656.656h3.375v7.719h-8.75V1.125zm1.806 8.7q.03.081.03.183a.411.411 0 0 1-.26.388.8.8 0 0 1-.333.057q-.166 0-.307-.034a.7.7 0 0 1-.24-.11.5.5 0 0 1-.153-.197.7.7 0 0 1-.055-.3H5.88q0 .321.133.555.132.234.354.386.225.15.497.226.275.073.555.073.313 0 .565-.07.254-.07.435-.206.183-.135.279-.33a1 1 0 0 0 .096-.443q0-.235-.08-.42a1 1 0 0 0-.24-.33 1.7 1.7 0 0 0-.396-.263 3.5 3.5 0 0 0-.544-.211 3 3 0 0 1-.326-.118 1.3 1.3 0 0 1-.237-.127.5.5 0 0 1-.146-.146.33.33 0 0 1-.047-.174q0-.129.068-.23a.45.45 0 0 1 .203-.164.8.8 0 0 1 .339-.062q.21 0 .349.073a.48.48 0 0 1 .208.2q.07.125.07.292h.777q0-.339-.175-.602a1.17 1.17 0 0 0-.484-.414 1.7 1.7 0 0 0-.732-.15q-.307 0-.565.075-.255.075-.443.216a1 1 0 0 0-.292.333.9.9 0 0 0-.104.43q0 .244.1.43.1.184.275.325.178.138.406.242.232.104.49.188.232.072.378.14a1 1 0 0 1 .226.138q.08.068.11.152M4.595 7.209v2.628q0 .195-.063.33a.46.46 0 0 1-.17.206.47.47 0 0 1-.257.07.6.6 0 0 1-.263-.051.36.36 0 0 1-.17-.175.8.8 0 0 1-.057-.33h-.783q0 .398.164.658.164.258.45.383t.659.125q.36 0 .646-.146.289-.146.456-.416.166-.274.166-.654V7.208z",clipRule:"evenodd"}),(0,s.jsx)("path",{fill:"#1890FF",d:"M8.014 10.008a.5.5 0 0 0-.031-.182.34.34 0 0 0-.11-.152 1 1 0 0 0-.226-.138 3 3 0 0 0-.378-.14 5 5 0 0 1-.49-.188 2 2 0 0 1-.406-.242 1.1 1.1 0 0 1-.276-.325.9.9 0 0 1-.099-.43q0-.237.104-.43a1 1 0 0 1 .292-.333q.188-.141.443-.216.258-.075.565-.076.42 0 .732.151.312.152.484.414.175.264.175.602h-.776a.6.6 0 0 0-.07-.292.48.48 0 0 0-.21-.2.74.74 0 0 0-.348-.073.8.8 0 0 0-.339.062.45.45 0 0 0-.203.164.4.4 0 0 0-.067.23q0 .096.046.174.05.078.146.146t.237.127q.14.06.326.118.31.093.544.21.237.118.396.264a1 1 0 0 1 .24.33q.08.185.08.42a1 1 0 0 1-.096.442.9.9 0 0 1-.279.331q-.181.135-.435.206a2.1 2.1 0 0 1-.565.07q-.28 0-.555-.073a1.7 1.7 0 0 1-.497-.226q-.222-.152-.354-.386a1.1 1.1 0 0 1-.133-.555h.784q0 .178.055.3a.5.5 0 0 0 .153.198q.102.075.24.11.14.033.307.033.204 0 .333-.057a.41.41 0 0 0 .26-.388M4.595 9.836V7.208h.778v2.628q0 .38-.166.654-.167.27-.456.416a1.4 1.4 0 0 1-.646.146q-.372 0-.659-.125a1 1 0 0 1-.45-.383q-.164-.26-.164-.659h.783q0 .21.058.331a.36.36 0 0 0 .169.175q.109.052.263.052a.47.47 0 0 0 .258-.07.46.46 0 0 0 .17-.206q.061-.135.062-.331"}),(0,s.jsx)("path",{fill:"#1890FF",d:"M11.186 3.51 7.824.146A.5.5 0 0 0 7.47 0H.833a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 .5.5h10a.5.5 0 0 0 .5-.5V3.864a.5.5 0 0 0-.147-.355M7.24 1.152l2.94 2.94H7.24zm2.968 11.722h-8.75V1.125h4.72V4.5a.656.656 0 0 0 .655.656h3.375z"})]}),m=e=>(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:14,fill:"none",viewBox:"0 0 12 14",...e,children:[(0,s.jsx)("path",{fill:"#F0F0F0",d:"M6.288 4.5V1.125H1.57v11.75h8.75V5.156H6.944a.656.656 0 0 1-.656-.656m-.344 6.625a.5.5 0 1 1 0-.999.5.5 0 0 1 0 .999m1.72-3.569c.01.702-.465 1.32-1.162 1.546a.22.22 0 0 0-.151.207V9.5c0 .086-.07.156-.157.156h-.5a.157.157 0 0 1-.156-.156V9a.65.65 0 0 1 .542-.627c.443-.057.77-.4.77-.795 0-.439-.402-.805-.906-.805-.503 0-.906.366-.906.807a.15.15 0 0 1-.153.147H4.38a.15.15 0 0 1-.153-.149c0-.897.783-1.62 1.742-1.61.926.013 1.683.721 1.695 1.588"}),(0,s.jsx)("path",{fill:"#8C8C8C",d:"M11.298 3.51 7.935.148A.5.5 0 0 0 7.58 0H.944a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 .5.5h10a.5.5 0 0 0 .5-.5V3.864a.5.5 0 0 0-.146-.353M7.35 1.154l2.94 2.94h-2.94zm2.968 11.722H1.57V1.125h4.72V4.5a.656.656 0 0 0 .655.656h3.375z"}),(0,s.jsx)("path",{fill:"#8C8C8C",d:"M5.444 10.625a.5.5 0 1 0 1 0 .5.5 0 0 0-1 0M4.226 7.578a.15.15 0 0 0 .153.149h.506a.15.15 0 0 0 .153-.147c0-.44.403-.807.906-.807.504 0 .907.366.907.805 0 .395-.328.738-.77.795A.65.65 0 0 0 5.537 9v.5c0 .086.07.156.156.156h.5c.086 0 .157-.07.157-.156v-.19a.22.22 0 0 1 .151-.208c.697-.225 1.172-.844 1.161-1.546-.012-.867-.769-1.575-1.695-1.587-.96-.011-1.742.712-1.742 1.61"})]});var f=r(47903),g=r(13078),j=r.n(g);let{useToken:y}=n.A;function A(e){let t=function(e){switch(j().extname(e).slice(1).toLowerCase()){case"js":case"jsx":case"ts":case"mjs":case"cjs":case"mts":case"cts":return(0,s.jsx)(x,{});case"tsx":default:return(0,s.jsx)(m,{});case"css":case"scss":case"sass":case"less":case"styl":case"stylus":return(0,s.jsx)(u,{});case"html":return(0,s.jsx)(h,{});case"png":case"jpg":case"jpeg":case"gif":case"svg":case"bmp":case"webp":case"ico":case"apng":case"avif":case"tif":case"tiff":case"jfif":case"pjpeg":case"pjp":return(0,s.jsx)(p,{})}}(e);return(0,s.jsx)("div",{className:"file-icon",children:t})}let v=e=>{let{isDark:t}=(0,f.useTheme)(),{token:r}=y(),n=t?r.colorWhite:r.colorText,u={fontSize:r.fontSize};return(0,s.jsx)(c.default,{checkable:!1,selectable:!0,switcherIcon:e=>{let{data:t,expanded:r}=e;return t?.children?(0,s.jsxs)(i.A,{style:{color:n},children:[(0,s.jsx)(l.A,{twoToneColor:n,className:`file-tree-switcher-arrow ${r?"file-tree-switcher-arrow-expand":""}`,style:u}),r?(0,s.jsx)(a.A,{}):(0,s.jsx)(o.A,{})]}):t?.key&&"string"==typeof t.key?A(t.key):(0,s.jsx)(d.A,{})},expandAction:"click",...e})}},1821(e,t,r){r.d(t,{E:()=>o});var s=r(27080),n=r(27348),i=r(65773),l=r(46198),a=r(78195);let o=e=>{let t,{icon:r,label:o,labelStyle:d={},placeholder:c,onChange:u,style:h,className:p,width:x,delay:m=300}=e,[f,g]=(0,n.useState)(""),j={width:120,...d},y=(0,n.useRef)(null);return(0,n.useEffect)(()=>{u(f)},[f]),(0,s.jsxs)(i.A.Group,{compact:!0,style:h,className:p,children:[o||r?(0,s.jsxs)(l.Ay,{style:j,onClick:()=>{y&&y.current&&y.current.focus()},children:[r||null,(0,s.jsx)(a.A.Text,{children:o})]}):null,(0,s.jsx)(i.A,{ref:y,allowClear:!0,defaultValue:f,style:{width:x?x-120:250},placeholder:c,onChange:e=>{t&&clearTimeout(t);let r=e.target.value.trim();t=setTimeout(()=>{g(r)},m)}})]})}},20934(e,t,r){r.d(t,{A:()=>s});let s={text:"text-QI6k9S"}},5326(e,t,r){r.d(t,{P:()=>q});var s=r(27080),n=r(27348),i=r(69632),l=r(49085),a=r(14023),o=r(17180),d=r(25294),c=r(87884),u=r(23144),h=r(47903),p=r(11123),x=r(11034),m=r(64254),f=r(78195),g=r(88059),j=r(30371),y=r(3968);let A=()=>{let[e,t]=(0,n.useState)(""),[r,i]=(0,n.useState)([]);return((0,n.useEffect)(()=>{(0,h.fetchManifest)().then(e=>{let{name:r,series:s}=e;r&&t(r),s&&s.length>0&&i(s)})},[]),e.length<=0||r.length<=0)?(0,s.jsx)(s.Fragment,{}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(x.A,{type:"vertical",style:{margin:"0 24px"}}),(0,s.jsxs)(m.A,{children:[(0,s.jsx)(y.A,{style:{fontSize:"18px"},component:j.A}),(0,s.jsx)(f.A,{children:"Compiler"}),(0,s.jsx)(g.A,{className:"builder-selector",defaultValue:e,bordered:!1,style:{minWidth:100},onChange:e=>{let t=r.find(t=>t.name===e);t&&(t.origin?location.href=(0,h.changeOrigin)(t.origin):console.error("No RsdoctorManifestSeriesData.origin"))},children:r.map((e,t)=>(0,s.jsx)(g.A.Option,{value:e.name,className:"builder-selector-option-item",children:e.name},t))})]})]})};var v=r(15565),b=r(18150),w=r(52051),C=r(4311),S=r(81188),k=r(15722),N=r(36122),M=r(66349),E=r(95869);let T=e=>(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:13,height:12,fill:"none",viewBox:"0 0 13 12",...e,children:[(0,s.jsx)("rect",{width:12,height:9.333,x:.396,y:.167,fill:"#0079FF",rx:1}),(0,s.jsx)("path",{fill:"#fff",fillRule:"evenodd",d:"M3.563 3.5c.276 0 .5.214.5.478v3.044a.49.49 0 0 1-.5.478.49.49 0 0 1-.5-.478V3.978a.49.49 0 0 1 .5-.478M6.396 1.833c.276 0 .5.214.5.479v4.71a.49.49 0 0 1-.5.478.49.49 0 0 1-.5-.478v-4.71a.49.49 0 0 1 .5-.479M9.23 4.833c.275 0 .5.214.5.479v1.71a.49.49 0 0 1-.5.478.49.49 0 0 1-.5-.478v-1.71a.49.49 0 0 1 .5-.479",clipRule:"evenodd"}),(0,s.jsx)("rect",{width:6,height:1.333,x:3.396,y:10.5,fill:"#0079FF",fillOpacity:.5,rx:.667})]}),R=e=>(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:13,height:12,fill:"none",viewBox:"0 0 13 12",...e,children:[(0,s.jsx)("rect",{width:12,height:9.333,x:.396,y:.167,fill:"#0079FF",rx:1}),(0,s.jsx)("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",d:"M4.023 6.212 2.676 5.014l1.347-1.199M8.752 6.212l1.347-1.198-1.347-1.199M5.742 7.014l1.362-4"}),(0,s.jsx)("rect",{width:6,height:1.333,x:3.396,y:10.5,fill:"#0079FF",fillOpacity:.5,rx:.667})]}),z=e=>(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:14,fill:"none",viewBox:"0 0 12 14",...e,children:[(0,s.jsx)("path",{fill:"#0079FF",fillRule:"evenodd",d:"M6.329.788A1 1 0 0 0 5.35.8L.466 3.62l5.36 2.83 5.327-3.044zm-.993 12.777V7.322L.063 4.54v5.404a1 1 0 0 0 .5.866z",clipRule:"evenodd"}),(0,s.jsx)("path",{fill:"#0079FF",fillOpacity:.5,fillRule:"evenodd",d:"M5.354.8H5.35L.546 3.576l.017-.01L5.336.81zm-.018 12.765V7.322L.063 4.54l5.273 2.783zm1-6.254 5.265-3.009q.009.064.009.13v5.511a1 1 0 0 1-.5.866l-4.774 2.756z",clipRule:"evenodd"})]});var L=r(75524);let P="Compile Analysis";var D=r(76464);let B={overall:(0,s.jsx)(e=>(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:13,height:12,fill:"none",viewBox:"0 0 13 12",...e,children:[(0,s.jsx)("rect",{width:12,height:9.333,x:.615,y:.167,fill:"#5E6673",rx:1}),(0,s.jsx)("path",{fill:"#fff",fillRule:"evenodd",d:"M3.781 3.5c.277 0 .5.214.5.478v3.044a.49.49 0 0 1-.5.478.49.49 0 0 1-.5-.478V3.978a.49.49 0 0 1 .5-.478M6.615 1.833c.276 0 .5.214.5.479v4.71a.49.49 0 0 1-.5.478.49.49 0 0 1-.5-.478v-4.71a.49.49 0 0 1 .5-.479M9.448 4.833c.276 0 .5.214.5.479v1.71a.49.49 0 0 1-.5.478.49.49 0 0 1-.5-.478v-1.71a.49.49 0 0 1 .5-.479",clipRule:"evenodd"}),(0,s.jsx)("rect",{width:6,height:1.333,x:3.615,y:10.5,fill:"#5E6673",fillOpacity:.5,rx:.667})]}),{}),webpack:(0,s.jsx)(e=>(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:13,height:12,fill:"none",viewBox:"0 0 13 12",...e,children:[(0,s.jsx)("rect",{width:12,height:9.333,x:.615,y:.167,fill:"#5E6673",rx:1}),(0,s.jsx)("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",d:"M4.241 6.212 2.895 5.014 4.24 3.815M8.97 6.212l1.347-1.198-1.346-1.199M5.96 7.014l1.363-4"}),(0,s.jsx)("rect",{width:6,height:1.333,x:3.615,y:10.5,fill:"#5E6673",fillOpacity:.5,rx:.667})]}),{}),bundle:(0,s.jsx)(e=>(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:14,fill:"none",viewBox:"0 0 12 14",...e,children:[(0,s.jsx)("path",{fill:"#5E6673",fillRule:"evenodd",d:"M6.44.672a1 1 0 0 0-.977.013L.578 3.505l5.36 2.83 5.327-3.044zm-.992 12.777V7.206L.175 4.423v5.404a1 1 0 0 0 .5.866z",clipRule:"evenodd"}),(0,s.jsx)("path",{fill:"#5E6673",fillOpacity:.5,fillRule:"evenodd",d:"m5.466.683-.003.002L.658 3.459l.017-.01L5.448.693zM5.448 13.45V7.206L.175 4.423l5.273 2.783zm1-6.254 5.265-3.009q.009.064.009.13v5.511a1 1 0 0 1-.5.866L6.448 13.45z",clipRule:"evenodd"})]}),{})},I=(0,E.eN)({api:k.hp.ServerAPI.API.GetClientRoutes,responsePropName:"routes",Component:e=>{let{t}=(0,h.useI18n)(),{pathname:r}=(0,M.zy)(),i=(0,M.Zp)(),[l,o]=(0,n.useState)(B),{routes:d}=e,c=(0,h.getEnableRoutesFromUrlQuery)(),u=d&&d.length>0?d:c||[];(0,n.useEffect)(()=>{r.includes("webpack")?o({...B,webpack:(0,s.jsx)(R,{})}):r.includes("overall")||"/"===r?o({...B,overall:(0,s.jsx)(T,{})}):r.includes("bundle")&&o({...B,bundle:(0,s.jsx)(z,{})})},[r]);let p={color:"rgba(96, 102, 114)"},x=[];u.includes(k._8.RsdoctorManifestClientRoutes.Overall)&&x.push({label:t(D.U),key:D.w,icon:l.overall,children:[],onTitleClick(e){i(e.key)}}),(0,h.hasCompile)(u)&&x.push({label:t(P),key:P,icon:l.webpack,children:[u.includes(k._8.RsdoctorManifestClientRoutes.WebpackLoaders)&&{label:t(L.pI.UU),key:L.pI.wE,icon:(0,s.jsx)(v.A,{style:p})},u.includes(k._8.RsdoctorManifestClientRoutes.WebpackLoaders)&&{label:t(L.hK.UU),key:L.hK.wE,icon:(0,s.jsx)(b.A,{style:p})},u.includes(k._8.RsdoctorManifestClientRoutes.ModuleResolve)&&{label:t(L.dn.UU),key:L.dn.wE,icon:(0,s.jsx)(w.A,{style:p})},u.includes(k._8.RsdoctorManifestClientRoutes.WebpackPlugins)&&{label:t(L.FO.UU),key:L.FO.wE,icon:(0,s.jsx)(C.A,{style:p})}].filter(e=>!!e)}),(0,h.hasBundle)(u)&&x.push({label:t(L._y.UU),key:L._y.UU,icon:l.bundle,children:[],onTitleClick(){i(L._y.wE)}});let m=(0,s.jsx)(N.A,{items:x,mode:"horizontal",onClick:e=>{e.keyPath.includes("builder-switcher")||i(e.key)},disabledOverflow:!0,overflowedIndicator:(0,s.jsx)(S.A,{}),style:{height:a.or.NavBarHeight,lineHeight:`${a.or.NavBarHeight}px`,minWidth:0,justifyContent:"flex-end",...e.style},selectedKeys:["/"===r?D.w:r]},u.join(""));return(0,s.jsx)("div",{style:{marginLeft:"30px"},children:m})},fallbackComponent:()=>null,showSkeleton:!1}),F=e=>{let{enableRoutes:t}=e,{i18n:r}=(0,h.useI18n)(),n=(0,M.Zp)(),{isLight:l}=(0,h.useTheme)(),x=[{value:a.TM.Cn,label:"中文"},{value:a.TM.En,label:"English"}];return(0,s.jsx)(i.A.Header,{style:{height:a.or.NavBarHeight,padding:0,paddingLeft:a.or.BasePadding,paddingRight:a.or.BasePadding,position:"fixed",zIndex:999,width:"100%",backgroundColor:l?"#fff":"#141414",transition:"none"},children:(0,s.jsxs)(d.A,{justify:"space-between",align:"middle",style:{height:a.or.NavBarHeight},wrap:!1,children:[(0,s.jsx)(c.A,{style:{height:a.or.NavBarHeight,lineHeight:`${a.or.NavBarHeight+2}px`},children:(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",height:"100%"},children:[(0,s.jsx)("img",{src:"https://assets.rspack.rs/rsdoctor/rsdoctor-title-logo.png",className:"rsdoctor-logo",alt:"logo",onClick:()=>{location.hash.includes(k.Kj.RsdoctorClientRoutes.Uploader)&&location.pathname.includes("/preview")?location.href="http://rsdoctor.rs":n(k.Kj.RsdoctorClientRoutes.Home)}}),(0,s.jsx)(A,{})]})}),(0,s.jsx)(I,{style:{transition:"none"}},t?JSON.stringify(t):"default"),(0,s.jsx)(c.A,{flex:1,children:(0,s.jsxs)(d.A,{align:"middle",justify:"end",style:{height:a.or.NavBarHeight},wrap:!1,gutter:[a.or.BasePadding/3,0],children:[(0,s.jsx)(c.A,{children:(0,s.jsx)(p.EJ,{})}),(0,s.jsx)(c.A,{children:(0,s.jsx)(u.A,{overlayStyle:{zIndex:1e3},menu:{items:x.map(e=>({label:e.label,key:e.value,onClick(){r.changeLanguage(e.value)}})),selectedKeys:[r.language]},children:(0,s.jsx)(o.A,{className:"header-icon",style:{display:"inline-block",fontSize:20,textAlign:"center",verticalAlign:"middle",cursor:"pointer",width:30,transition:"all 0.3s ease"}})})})]})})]})})};var O=r(60377);let $=(0,E.eN)({api:k.hp.ServerAPI.APIExtends.GetCompileProgress,responsePropName:"progress",Component:e=>{let{progress:t}=e;if(!t)return null;let{percentage:r=1,message:n}=t;if(r>=1)return null;let i=+(100*r).toFixed(1);return(0,s.jsx)(d.A,{wrap:!0,style:{width:"100%",position:"fixed",top:a.or.NavBarHeight,left:1,zIndex:99},children:(0,s.jsx)(c.A,{span:Math.min(Math.floor(24*r),24),children:(0,s.jsx)(O.A,{percent:100,status:"active",size:"small",format:()=>(0,s.jsx)(f.A.Text,{style:{fontSize:12},type:"secondary",children:`${i}% ${n}`})})})})},fallbackComponent:()=>null,showSkeleton:!1});var _=r(57490),G=r(58530);let W=e=>{let{name:t}=e;return(0,n.useEffect)(()=>{t?document.title=`Rsdoctor - ${t}`:document.title="Rsdoctor"},[t]),null},q=e=>{let t=(0,h.useLocale)(),{i18n:r}=(0,h.useI18n)(),{children:o}=e,d=(0,h.useUrlQuery)(),[c,u]=(0,n.useState)(()=>(0,h.getEnableRoutesFromUrlQuery)()||void 0);(0,n.useEffect)(()=>{let e=t;if(!(0,h.getFirstVisitFromStorage)()){(0,h.setFirstVisitToStorage)("1");let t=window.navigator.language.split("-")[0],r=(0,h.getLanguage)(t);Object.values(a.TM).includes(r)&&(e=r)}r.language!==e&&r.changeLanguage(e)},[t]),(0,n.useEffect)(()=>{u((0,h.getEnableRoutesFromUrlQuery)()||void 0)},[d]);let p=(0,n.useContext)(_.Q);return(0,s.jsx)(E.zW,{api:k.hp.ServerAPI.API.GetProjectInfo,showSkeleton:!1,children:e=>(0,s.jsx)(G.h.Provider,{value:{project:e},children:(0,s.jsxs)(i.A,{children:[(0,s.jsx)(W,{name:e?.name}),p.embedded?null:(0,s.jsx)(F,{enableRoutes:c}),(0,s.jsx)($,{}),(0,s.jsxs)(i.A.Content,{style:{height:"100%",minHeight:"100vh",padding:a.or.BasePadding,marginTop:p.embedded?0:a.or.NavBarHeight,background:""},children:[o,(0,s.jsx)(l.A.BackTop,{})]})]})})})}},25699(e,t,r){r.d(t,{h:()=>G});var s=r(27080),n=r(36842),i=r(15722),l=r(11034),a=r(98670),o=r(64254),d=r(57126),c=r(78195),u=r(91915),h=r(73226),p=r(25294),x=r(87884),m=r(34424),f=r(95818),g=r(10006),j=r(38763),y=r(27348),A=r(14023),v=r(47903),b=r(65390),w=r(24197),C=r(95869),S=r(91470),k=r(39646),N=r(62227),M=r(58924),E=r(80286),T=r.n(E);let R=e=>(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:12,fill:"none",viewBox:"0 0 10 12",...e,children:[(0,s.jsx)("path",{fill:"#FAAD14",fillRule:"evenodd",d:"M3.151 7.98h-1.85a.925.925 0 0 1-.924-.925V1.508c0-.511.414-.925.925-.925h7.396c.511 0 .925.414.925.925v5.547c0 .51-.414.924-.925.924H6.85V6.13a1.85 1.85 0 0 0-3.698 0z",clipRule:"evenodd"}),(0,s.jsx)("path",{fill:"#FAAD14",d:"M4.076 9.829a.925.925 0 0 0 1.849 0V6.13a.925.925 0 0 0-1.85 0z"}),(0,s.jsx)("path",{fill:"#FAAD14",d:"M5 11.416 7.402 8.92H2.598z"})]}),z=e=>(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e,children:[(0,s.jsx)("rect",{width:16,height:16,fill:"#F6FFED",rx:2}),(0,s.jsx)("path",{fill:"#52C41A",fillRule:"evenodd",d:"M4.302 6.02a.925.925 0 0 0-.925.925v5.547c0 .51.414.925.925.925h7.396c.511 0 .925-.414.925-.925V6.945a.925.925 0 0 0-.925-.925zm5.547 0H6.151v1.85a1.85 1.85 0 0 0 3.698 0z",clipRule:"evenodd"}),(0,s.jsx)("path",{fill:"#52C41A",d:"M7.076 4.171a.925.925 0 0 1 1.849 0V7.87a.925.925 0 0 1-1.85 0z"}),(0,s.jsx)("path",{fill:"#52C41A",d:"m8 2.584 2.402 2.496H5.598z"})]}),L=e=>(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:14,height:14,fill:"none",viewBox:"0 0 14 14",...e,children:(0,s.jsx)("path",{fill:"#2994FF",d:"M7 10.736 1.7 6.589a.125.125 0 0 0-.201.098v1.208c0 .077.036.15.095.197l5.097 3.989a.5.5 0 0 0 .617 0l5.095-3.99a.25.25 0 0 0 .096-.196V6.687a.125.125 0 0 0-.202-.098zm0-4.75L1.7 1.839a.125.125 0 0 0-.201.098v1.208c0 .077.036.15.095.197L6.692 7.33a.5.5 0 0 0 .617 0l5.095-3.99a.25.25 0 0 0 .096-.196V1.937a.125.125 0 0 0-.202-.098z"})});var P=r(3730),D=r(24184),B=r(9396),I=r(6662),F=r(32269);let O=e=>{let{loader:t,resource:r,cwd:n}=e;return(0,s.jsx)(D.Zp,{title:"Loader Details",style:{border:"none"},extra:(0,s.jsx)(a.A,{icon:(0,s.jsx)(S.A,{}),color:"default",children:T()(t.startAt).format("YYYY-MM-DD HH:mm:ss")}),children:(0,s.jsxs)(o.A,{direction:"vertical",style:{width:"100%"},children:[t.isPitch?(0,s.jsx)(c.A.Text,{code:!0,children:"pitch"}):null,(0,s.jsxs)(h.A,{size:"large",bordered:!0,children:[(0,s.jsxs)(h.A.Item,{children:[(0,s.jsx)(c.A.Text,{strong:!0,children:"File Path"}),(0,s.jsx)("div",{children:(0,v.beautifyPath)(r.path,n)})]}),(0,s.jsxs)(h.A.Item,{children:[(0,s.jsx)(c.A.Text,{strong:!0,children:"Resource Path"}),(0,s.jsx)(B.hZ,{cwd:n,url:r.path,loc:"",disabled:!0})]}),(0,s.jsxs)(h.A.Item,{children:[(0,s.jsx)(c.A.Text,{strong:!0,children:"Resource Query"}),(0,s.jsx)("div",{children:r.queryRaw||"-"})]}),(0,s.jsxs)(h.A.Item,{children:[(0,s.jsx)(c.A.Text,{strong:!0,children:"Duration"}),(0,s.jsx)("div",{children:(0,v.formatCosts)(t.costs)})]}),(0,s.jsxs)(h.A.Item,{children:[(0,s.jsx)(c.A.Text,{strong:!0,children:"Loader"}),(0,s.jsx)("div",{children:(0,s.jsx)(c.A.Text,{code:!0,children:t.loader})})]}),(0,s.jsxs)(h.A.Item,{children:[(0,s.jsx)(c.A.Text,{strong:!0,children:"Loader Index"}),(0,s.jsx)("div",{children:`${t.loaderIndex}`})]}),(0,s.jsxs)(h.A.Item,{children:[(0,s.jsx)(c.A.Text,{strong:!0,children:"Loader Path"}),(0,s.jsx)(B.hZ,{cwd:n,url:t.path,loc:"",disabled:!0})]}),(0,s.jsxs)(h.A.Item,{children:[(0,s.jsx)("div",{style:{width:180},children:(0,s.jsx)(c.A.Text,{strong:!0,children:"Options"})}),(0,s.jsx)(l.A,{type:"vertical"}),(0,s.jsx)(c.A.Paragraph,{ellipsis:{rows:2,expandable:!0,symbol:"more"},copyable:!0,children:JSON.stringify(t.options||"-")})]})]})]})})},$=e=>{let{loader:t,resource:r,isLight:n,codeData:i}=e,l=t.errors&&t.errors.length,a=i?.input||"",o=i?.output||"";return(0,s.jsx)("div",{style:{height:"100%"},children:l?(0,s.jsxs)(x.A,{span:24,style:{height:"53%",minHeight:400},children:[(0,s.jsx)("div",{style:{padding:A.or.BasePadding,borderTop:`1px solid ${n?"#f0f0f0":"rgba(253, 253, 253, 0.12)"}`,borderBottom:`1px solid ${n?"#f0f0f0":"rgba(253, 253, 253, 0.12)"}`},children:(0,s.jsx)(I.h,{text:`the error stack of [${t.loader}] ${t.isPitch?"pitch":""}`})}),(0,s.jsx)("div",{style:{height:"90%"},children:(0,s.jsx)(P.Cv,{code:t.errors[0].message,lang:"javascript"})})]}):(0,s.jsxs)(x.A,{span:24,style:{height:"53%",minHeight:400},children:[(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",padding:A.or.BasePadding,borderBottom:`1px solid ${n?"#f0f0f0":"rgba(253, 253, 253, 0.12)"}`},children:[(0,s.jsx)(I.h,{text:(0,s.jsxs)(s.Fragment,{children:[`the result of [${t.loader}] ${t.isPitch?"pitch":""}`,!t.isPitch&&(0,s.jsxs)("span",{style:{fontWeight:400},children:["(",(0,s.jsx)(R,{style:{verticalAlign:"middle",margin:"0 2px"}}),"Input ⟷",(0,s.jsx)(z,{style:{verticalAlign:"middle",position:"relative",top:-2}}),"Output)"]})]})}),(0,s.jsx)("div",{style:{flex:1}})]}),t.isPitch?o?(0,s.jsx)("div",{style:{height:"90%"},children:(0,s.jsx)(P.Cv,{isEmbed:!0,code:o,filePath:r.path})}):(0,s.jsx)(k.A,{description:"No loader result. If you use the Brief Mode, there will not have loader results."}):(0,s.jsx)("div",{style:{minHeight:"700px"},children:(0,s.jsx)("div",{style:{height:"40rem",overflow:"hidden"},children:o||a?(0,s.jsx)(P.Mh,{isEmbed:!0,original:a,modified:o||"",originalFilePath:r.path,modifiedFilePath:r.path}):(0,s.jsx)(k.A,{description:"No loader result. If you use the Brief Mode, there will not have loader results."})})})]})})},_=e=>{let{data:t,cwd:r,index:n}=e,{loaders:l,resource:u}=t,[h,m]=(0,y.useState)(n||0),{theme:f}=(0,v.useTheme)(),g="light"===f,j=l[h],[b,w]=(0,y.useState)("loaderDetails"),k=(0,y.useCallback)(e=>{w(e)},[]);return(0,s.jsxs)(p.A,{className:F.A.executions,style:{height:"100%"},children:[(0,s.jsx)(x.A,{span:5,style:{borderRight:g?"1px solid #f0f0f0":void 0,padding:A.or.BasePadding},children:(0,s.jsxs)(o.A,{direction:"vertical",style:{width:"100%"},children:[(0,s.jsx)(I.h,{text:"Executions"}),(0,s.jsx)(N.A,{mode:"left",style:{marginTop:A.or.BasePadding},children:l.map((e,t,r)=>{let{loader:n,isPitch:i}=e,l=(0,v.formatCosts)(e.costs);return(0,s.jsxs)(N.A.Item,{dot:i?(0,s.jsx)(a.A,{style:{marginLeft:1,fontWeight:500},children:"pitch"}):(0,s.jsx)(S.A,{}),style:{paddingBottom:10,textAlign:"center"},children:[(0,s.jsx)(p.A,{align:"middle",justify:"space-between",gutter:[0,10],children:(0,s.jsx)(x.A,{span:24,className:F.A.timeline,children:(0,s.jsx)(d.A,{title:n,trigger:"hover",children:(0,s.jsxs)("div",{className:`${F.A.box} ${h===t?F.A.selected:""}`,onClick:()=>{m(t)},style:{textAlign:"left"},children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(c.A.Text,{style:{color:"#000"},children:l.match(/[0-9]*\.?[0-9]+/g)?.[0]})," ",(0,s.jsx)(c.A.Text,{style:{color:"rgba(0,0,0,0.45)"},children:l.match(/[a-zA-Z]+/g)})]}),(0,s.jsx)(c.A.Text,{style:{color:"rgba(0,0,0,0.65)"},className:F.A.loader,children:n})]})})})}),t===r.length-1?null:(0,s.jsx)("div",{style:{paddingTop:10},children:(0,s.jsx)(L,{})})]},t)})})]})}),(0,s.jsx)(x.A,{span:19,style:{height:"100%"},children:(0,s.jsx)(M.A,{type:"card",defaultActiveKey:"loaderDetails",activeKey:b,items:[{label:"Loader Props",key:"loaderProps",children:(0,s.jsx)(O,{loader:j,resource:u,cwd:r})},{label:"Loader Details",key:"loaderDetails",children:"loaderDetails"===b?(0,s.jsx)(C.zW,{api:i.hp.ServerAPI.API.GetLoaderFileInputAndOutput,body:{file:u.path,loader:j.loader,loaderIndex:j.loaderIndex},showSkeleton:!1,children:e=>(0,s.jsx)($,{loader:j,resource:u,isLight:g,codeData:e})}):null}],onChange:k})})]})},G=e=>{let{cwd:t,filetree:r}=e,[S,k]=(0,y.useState)(!1),[N,M]=(0,y.useState)(""),[E,T]=(0,y.useState)(0),[R,z]=(0,y.useState)(null),L=(0,y.useMemo)(()=>r.filter(t=>t.loaders.some(r=>(0,v.filterLoader)(t.path,r.loader,e.filename,e.loaders,t.layer,e?.layer))),[e.filename,e.loaders,e.layer]),P="__RESOURCEPATH__",D=(0,y.useMemo)(()=>(0,v.createFileStructures)({files:L.map(e=>e.path),cwd:t,fileTitle(e,t){let{loaders:i,layer:p}=r.find(t=>t.path===e),x=[];return i.forEach((e,t)=>t>3&&x.push(e)),(0,s.jsxs)("div",{style:{wordBreak:"break-all",display:"flex",cursor:"pointer"},onClick:()=>{T(0),M(e),k(!0)},children:[(0,s.jsx)("div",{className:F.A.box,children:(0,s.jsx)("div",{className:F.A.keywords,children:(0,s.jsx)(w.i,{text:t.replace(/\[.*?\]/g,""),keyword:""})})}),(0,s.jsx)("div",{className:F.A.dividerDiv,style:{flex:1},children:(0,s.jsx)(l.A,{className:F.A.divider,dashed:!0})}),p&&(0,s.jsx)(a.A,{color:"cyan",bordered:!1,children:p}),(0,s.jsxs)(o.A,{children:[i.slice(0,3).map((t,r)=>{let i=t.errors&&t.errors.length,a=`${e}_${t.loader}_${r}`;if(r<=3)return(0,s.jsx)(d.A,{title:t.path,children:(0,s.jsxs)(c.A.Text,{className:F.A.textBox,style:{color:i?"#f50":"inherit"},onClick:t=>{t.stopPropagation(),M(e),T(r),k(!0)},children:[(0,s.jsx)(c.A.Text,{className:F.A.text,ellipsis:!0,children:t.loader.match(/([^/]+-loader)/g)?.[0]||t.loader}),(0,s.jsx)(l.A,{type:"vertical"}),i?(0,s.jsx)(n.A,{}):(0,s.jsx)(c.A.Text,{className:F.A.text,children:(0,v.formatCosts)(t.costs)})]})},a)}),x?.length?(0,s.jsx)(u.A,{content:(0,s.jsx)(h.A,{dataSource:x,renderItem:(t,r)=>{let n=t.errors&&t.errors.length,i=`${e}_${t.loader}_${r+3}`;return(0,s.jsx)(h.A.Item,{children:(0,s.jsx)(d.A,{title:t.path,children:(0,s.jsx)("div",{style:{paddingBottom:5},children:(0,s.jsxs)(c.A.Text,{className:F.A.textBox,style:{color:n?"#f50":"inherit"},onClick:t=>{t.stopPropagation(),M(e),T(r),k(!0)},children:[(0,s.jsx)(c.A.Text,{className:F.A.text,ellipsis:!0,children:t.loader.match(/([^/]+-loader)/g)?.[0]||t.loader}),(0,s.jsx)(l.A,{type:"vertical"}),(0,s.jsx)(c.A.Text,{className:F.A.text,children:(0,v.formatCosts)(t.costs)})]})})},i)})}}),children:(0,s.jsx)("div",{className:F.A.textBox,children:(0,s.jsx)(c.A.Text,{children:"···"})})}):(0,s.jsx)(s.Fragment,{})]})]})},dirTitle:(e,t)=>(0,s.jsx)("div",{style:{display:"flex",cursor:"pointer"},children:(0,s.jsx)(w.i,{text:t,keyword:""})})}),[L]);return(0,s.jsxs)(p.A,{style:{width:"100%",marginLeft:0},gutter:A.or.BasePadding,children:[(0,s.jsx)(x.A,{span:24,children:(0,s.jsxs)(m.A,{title:(0,s.jsxs)(o.A,{children:[(0,s.jsx)(c.A.Text,{strong:!0,children:"Files"}),(0,s.jsxs)(c.A.Text,{style:{fontSize:12,fontWeight:400,color:"#1C1F2399",opacity:.6},children:["Total Files: ",L.length]})]}),bodyStyle:{overflow:"auto",maxHeight:800,minHeight:"40rem",padding:14},children:[(0,s.jsx)(b.h,{defaultExpandedKeys:(0,v.mapFileKey)(D,L.length>=100?3:4,e=>!((0,j.J)(e,P).indexOf("/node_modules/")>-1)),treeData:D,onSelect:(e,t)=>{t.node.isLeaf||z(t.node)},selectedKeys:R?[R.key]:void 0,expandAction:"click"},`${e.loaders.join("|")}_${e.filename}`),(0,s.jsx)(f.A,{open:S,onClose:()=>k(!1),maskClosable:!0,width:A.Y7,zIndex:999,bodyStyle:{padding:0},children:S?(0,s.jsx)(C.zW,{api:i.hp.ServerAPI.API.GetLoaderFileDetails,body:{path:N},children:e=>(0,s.jsx)(_,{data:e,cwd:t,index:E})}):null})]})}),(0,s.jsx)(f.A,{open:!!R,onClose:()=>z(null),maskClosable:!0,width:A.Y7,zIndex:999,bodyStyle:{padding:0},children:R&&(0,s.jsx)(p.A,{children:(0,s.jsx)(x.A,{span:24,children:(0,s.jsx)(m.A,{title:(0,s.jsx)(d.A,{title:y.cloneElement(R.title,{style:{color:"#fff"}}),children:(0,s.jsxs)(c.A.Text,{children:["Statistics of",R.title]})}),children:(0,s.jsx)(C.zW,{api:i.hp.ServerAPI.API.GetLoaderFolderStatistics,body:{folder:R[P]},children:e=>(0,s.jsx)(g.A,{style:{width:"100%",maxHeight:800,height:"40rem",overflowY:"scroll",wordBreak:"break-all"},pagination:!1,bordered:!0,rowKey:e=>e.loader,columns:[{title:"Loader Name",dataIndex:"loader"},{title:"Files",dataIndex:"files"},{title:"Total Duration",dataIndex:"costs",render:e=>(0,s.jsx)(c.A.Text,{strong:!0,children:(0,v.formatCosts)(e)}),sorter:(e,t)=>e.costs-t.costs,defaultSortOrder:"descend",sortDirections:["descend","ascend"]}],dataSource:e})})})})})})]})}},32269(e,t,r){r.d(t,{A:()=>s});let s={loaderAnalysis:"loaderAnalysis-h6mG3n",dividerDiv:"dividerDiv-hrfVKQ",divider:"divider-hnPRxv",box:"box-lFdvrG",keyword:"keyword-UO64w1",textBox:"textBox-sVZZ_A",text:"text-omPvlh",space:"space-qT5CaN",executions:"executions-uZxmQC",timeline:"timeline-wMFXyU",loader:"loader-PHR4ca",selected:"selected-wUMOH3"}},95869(e,t,r){r.d(t,{eN:()=>n.e,ug:()=>s.u,zW:()=>n.z});var s=r(2431),n=r(72373)},9396(e,t,r){r.d(t,{hZ:()=>x,L2:()=>c,bX:()=>u,jk:()=>d});var s=r(27080),n=r(78195),i=r(13078),l=r.n(i),a=r(71513);async function o(e,t,r,s,n){let i=`${e}:${t}:${r}`;try{let e="u">typeof window&&window.location?.origin?window.location.origin:"",t=`${e}/__open-in-editor?file=${encodeURIComponent(i)}&editor=${s}`;(await fetch(t,{method:"GET"})).ok||n()}catch{n()}}function d(e){let{file:t,line:r=1,column:s=1,windowId:n}=e,i={windowId:n},l=Object.keys(i).map(e=>{let t=i[e];return a.AP.isNil(t)||""===t?null:`${e}=${t}`}).filter(Boolean).join("&");o(t,r,s,"code",()=>{let e=`vscode://file/${t}:${r}:${s}`;l&&(e+=`?${l}`),window.open(e)})}function c(e){let{file:t,line:r=1,column:s=1}=e;o(t,r,s,"cursor",()=>{window.open(`cursor://file/${t}:${r}:${s}`)})}function u(e){let{file:t,line:r=1,column:s=1}=e;o(t,r,s,"trae",()=>{window.open(`trae://file/${t}:${r}:${s}`)})}r(27348),r(39729);var h=r(47903);let p=+Date.now().toString().slice(-4)+1e3,x=e=>{let t,r,{cwd:i,url:a,loc:o,windowId:c=p,label:u,disabled:x,code:m=!1}=e,f=l().resolve(i,(t=a.split(" "),r="",1===t.length?[r]=t:[r]=t.filter(e=>l().isAbsolute(e)||e.startsWith("./")),r||a)),{line:g,columnStart:j}=function(e){if(!e)return{line:1,column:1};let[t,r=""]=e.split(":"),[s=1,n]=r.split("-");return{line:t,columnStart:s,columnEnd:n||s}}(o);return(0,s.jsxs)("span",{style:{wordBreak:"break-all"},children:[(0,s.jsx)(n.A.Text,{copyable:{text:f},children:(0,s.jsxs)(n.A.Text,{code:m,onClick:()=>{x||d({file:f,line:g,column:j,windowId:c})},style:{cursor:x?"revert":"pointer"},children:[u||(0,h.getShortPath)(a),o?`:${o}`:""]})}),(0,s.jsx)("div",{style:{display:"inline-block"}})]})}},44704(e,t,r){r.d(t,{F:()=>y});var s=r(27080),n=r(27348),i=r(65773),l=r(46198),a=r(78195),o=r(88059),d=r(25294),c=r(87884),u=r(97488),h=r(70494),p=r(1821),x=r(14023),m=r(95869),f=r(15722);let g=e=>{let{style:t,onChange:r,loaderNames:d}=e,[c,h]=(0,n.useState)([]);return(0,s.jsxs)(i.A.Group,{compact:!0,style:t,children:[(0,s.jsxs)(l.Ay,{style:{width:120},children:[(0,s.jsx)(u.A,{}),(0,s.jsx)(a.A.Text,{children:"Loaders"})]}),(0,s.jsx)(o.A,{mode:"multiple",allowClear:!0,defaultValue:c,className:"loader-select",style:{width:300},popupMatchSelectWidth:300,placeholder:"select loaders",onChange:e=>{h(e),r(e)},children:d.map(e=>(0,s.jsx)(o.A.Option,{label:e,value:e,children:e},e))})]})},j=e=>{let{onChange:t,layers:r}=e,[d,c]=(0,n.useState)("");return(0,s.jsxs)(i.A.Group,{compact:!0,children:[(0,s.jsxs)(l.Ay,{style:{width:120},children:[(0,s.jsx)(u.A,{}),(0,s.jsx)(a.A.Text,{children:"Layers"})]}),(0,s.jsx)(o.A,{allowClear:!0,className:"layer-select",style:{width:150},defaultValue:d,placeholder:"select layer",onChange:e=>{c(e),t(e)},children:r?.length?r?.map(e=>(0,s.jsx)(o.A.Option,{label:e,value:e,children:e},e)):(0,s.jsx)(s.Fragment,{})})]})},y=e=>{let{onChange:t,loaderNames:r}=e,[i,l]=(0,n.useState)([]),[a,o]=(0,n.useState)(""),[u,y]=(0,n.useState)("");return(0,n.useEffect)(()=>{t({loaders:i,filename:a,layer:u})},[i,a,u]),(0,s.jsxs)(d.A,{style:{marginBottom:x.or.BasePadding,marginLeft:10},children:[(0,s.jsx)(c.A,{children:(0,s.jsx)(g,{loaderNames:r,style:{marginRight:x.or.BasePadding},onChange:e=>{l(e)}})}),(0,s.jsx)(c.A,{children:(0,s.jsx)(p.E,{icon:(0,s.jsx)(h.A,{}),style:{marginRight:x.or.BasePadding},label:"Filename",placeholder:"search filename by keyword",onChange:e=>{o(e)}})}),(0,s.jsx)(c.A,{children:(0,s.jsx)(m.zW,{api:f.hp.ServerAPI.API.GetLayers,children:e=>e.length?(0,s.jsx)(j,{layers:e,onChange:e=>{y(e)}}):(0,s.jsx)(s.Fragment,{})})})]})}},93685(e,t,r){r.d(t,{P6:()=>A,hX:()=>v});var s=r(27080),n=r(46373),i=r(46198),l=r(95818),a=r(27348),o=r(57126),d=r(64254),c=r(78195),u=r(25294),h=r(87884),p=r(15722),x=r(62058),m=r(71513),f=r(14023),g=r(58250),j=r(95869);let y=e=>{let{duplicatePackages:t=[],cwd:r,children:n,...i}=e;return(0,s.jsx)(v,{...i,buttonStyle:{fontSize:"inherit",...i.buttonStyle},buttonProps:{type:"text",...i.buttonProps},text:(0,s.jsx)(o.A,{title:"Click to show the details of duplicate packages",children:(0,s.jsxs)(d.A,{style:{fontSize:"inherit"},children:[(0,s.jsx)(c.A.Text,{strong:!0,style:{fontSize:"inherit",color:"inherit",...i.textStyle},children:t.length}),(0,s.jsx)(x.A,{})]})}),drawerProps:{title:"Duplicate Packages Viewer",...i.drawerProps},children:(0,s.jsx)(u.A,{gutter:[f.or.BasePadding,f.or.BasePadding],children:t.map((e,t)=>(0,s.jsx)(h.A,{span:24,children:(0,s.jsx)(g.ZZ,{data:e,cwd:r,getPackageRelationContentComponent:n})},t))})})},A=e=>{let{moduleGraph:t,...r}=e;return(0,s.jsx)(y,{...r,children:e=>(0,s.jsx)(j.zW,{api:p.hp.ServerAPI.API.GetModuleCodeByModuleIds,body:{moduleIds:t.modules.map(e=>e.id)},children:n=>(0,s.jsx)(g.aM,{data:m.Wh.getPackageRelationAlertDetails(t.modules,t.dependencies,r.cwd,e.package.dependencies,n),cwd:r.cwd})})})},v=e=>{let[t,r]=(0,a.useState)(!1);return(0,s.jsxs)("div",{onClick:e=>e.stopPropagation(),...e.containerProps,children:[e.button?(0,s.jsx)("div",{onClick:()=>r(!t),children:e.button}):e.text?(0,s.jsx)(i.Ay,{type:"link",...e.buttonProps,onClick:()=>r(!t),style:{padding:0,...e.buttonStyle},children:e.text}):(0,s.jsx)(n.A,{style:{fontSize:14,padding:0},onClick:()=>r(!t)}),(0,s.jsx)(l.A,{maskClosable:!0,zIndex:999,width:"60%",...e.drawerProps,open:t,onClose:()=>r(!1),destroyOnClose:!0,children:e.children})]})}},6662(e,t,r){r.d(t,{h:()=>l});var s=r(27080);r(27348);var n=r(78195),i=r(32660);let l=e=>{let{upperFirst:t=!0,fontSize:r=16,text:l,hash:a}=e,o="string"==typeof l&&t?(0,i.Z)(l):l;return(0,s.jsx)(n.A.Text,{style:{fontSize:r},strong:!0,children:a?(0,s.jsx)("a",{href:a,id:a.replace(/^#/,""),style:{color:"inherit"},children:o}):o})}},11467(e,t,r){r.d(t,{Cv:()=>c});var s=r(27080),n=r(59857),i=r(70851),l=r(27348),a=r(20980),o=r(24553),d=r(71513);function c(e){let{className:t,style:r,code:c="",lang:u,filePath:h="",defaultLine:p,ranges:x,isEmbed:m=!1,headerVisible:f=!0,isLightTheme:g=!0,formatOnMount:j=!1}=e,y=(0,l.useRef)(void 0),A=(0,l.useRef)(void 0),v=(0,l.useMemo)(()=>u||(0,a.rZ)(h)||"plaintext",[u,h]),[b,w]=(0,l.useState)(!0),C=(0,l.useMemo)(()=>(0,a.$N)({wordWrap:b?"on":"off"}),[b]),S=(0,l.useCallback)((e,t)=>{y.current=e,A.current=t,(0,a.sK)(e,t,x),d.AP.isNumber(p)&&setTimeout(()=>{e.revealLine(p)}),j&&setTimeout(()=>{e.getAction("editor.action.formatDocument")?.run()},0)},[x,p,j]);return(0,l.useEffect)(()=>()=>{y.current?.setModel(null)},[]),(0,s.jsxs)("div",{className:(0,i.A)("monaco-component","code-viewer","code-viewer-H7hGrZ",m&&"embed-tjljOS",t),style:r,children:[f&&!!h&&(0,s.jsxs)("div",{className:"header-qejtwX",children:[(0,s.jsx)("div",{children:(0,a.WP)(h)}),(0,s.jsx)("div",{style:{flex:1}}),(0,s.jsx)("div",{children:(0,s.jsx)(o.A,{className:"text-T29bd1",title:"side-by-side",checked:b,onChange:e=>{w(e.target.checked)},children:"word-wrap"})})]}),(0,s.jsx)("div",{className:(0,i.A)("content-EVSW1C","editor-wrap"),children:(0,s.jsx)(n.KE,{theme:g?"vs-light":"vs-dark",language:v,value:c,options:C,onMount:S})})]})}r(63674)},20980(e,t,r){r.d(t,{$N:()=>l,WP:()=>a,XX:()=>i,qK:()=>o,rZ:()=>n,sK:()=>d});var s=r(13078);function n(e){if(!e)return"";let t=function(e){if(!e)return"";try{if(!e.startsWith("data:"))return"";let{mimeType:t}=function(e){if(!e.startsWith("data:"))throw Error("输入不是有效的 Data URL");let t=e.substring(5),r=t.indexOf(",");if(-1===r)throw Error("无效的 Data URL 格式: 缺少数据分隔符");let s=t.substring(0,r),n=t.substring(r+1),i="",l="",a=!1,o=s.split(";");o.length>0&&(i=o[0]||"text/plain");for(let e=1;e<o.length;e++){let t=o[e];"base64"===t?a=!0:t.startsWith("charset=")&&(l=t.substring(8))}return{mimeType:i,charset:l,isBase64:a,data:n}}(e);switch(t){case"text/javascript":return"javascript";case"text/html":return"html";case"text/css":return"css";case"text/plain":return"text";case"application/json":return"json";default:return""}}catch(e){return console.error("解析 data 协议文件格式失败::",e),""}}(e);if(t)return t;try{let t=(0,s.extname)(e).slice(1);switch(t){case"js":case"cjs":case"mjs":case"jsx":return"javascript";case"ts":case"tsx":return"typescript";case"md":return"markdown";default:return t}}catch{return""}}let i={readOnly:!0,domReadOnly:!0,fontSize:14,tabSize:2,lineHeight:24,renderValidationDecorations:"off",hideCursorInOverviewRuler:!0,smoothScrolling:!0,wordWrap:"on",colorDecorators:!0,codeLens:!1,cursorWidth:0,minimap:{enabled:!1},contextmenu:!1,gotoLocation:{multiple:"goto",multipleDefinitions:"goto",multipleTypeDefinitions:"goto",multipleDeclarations:"goto",multipleImplementations:"goto",multipleReferences:"goto"},hover:{enabled:!1},links:!1};function l(e){return{...structuredClone(i),...e}}function a(e){return e?e.startsWith("data:")?"data":e.split("/").at(-1)||"":""}function o(e,t){let{start:r,end:s}=e,{line:n=1,column:i=0}=r;return new t(n,i+1,s?.line??n,(s?.column??9999)+1)}function d(e,t,r){if(!r||0===r.length)return;let s=r.map(e=>({range:o(e,t.Range),options:{inlineClassName:"file-inline-decoration"}}));e.deltaDecorations([],s),setTimeout(()=>{e.revealLine(s[0].range.startLineNumber)})}},3730(e,t,r){r.d(t,{Cv:()=>s.Cv,Mh:()=>u});var s=r(11467),n=r(27080),i=r(59857),l=r(24553),a=r(70851),o=r(27348),d=r(20980);let c={...structuredClone(d.XX),readOnly:!0,originalEditable:!1,renderSideBySide:!0,renderSideBySideInlineBreakpoint:1,renderIndicators:!0,definitionLinkOpensInPeek:!1,domReadOnly:!0,minimap:{enabled:!1},diffWordWrap:"on",folding:!1,lineNumbersMinChars:3,renderLineHighlight:"none",matchBrackets:"never",diffAlgorithm:"advanced",ignoreTrimWhitespace:!0,renderOverviewRuler:!0,renderLineHighlightOnlyWhenFocus:!0,smoothScrolling:!0,letterSpacing:.5};function u(e){let{className:t,style:r,original:s="",modified:u="",originalFilePath:h="",modifiedFilePath:p="",originalLang:x,modifiedLang:m,isEmbed:f=!1,isLightTheme:g=!0,headerVisible:j=!0}=e,[y,A]=(0,o.useState)(!0),v=(0,o.useRef)(void 0),b=(0,o.useMemo)(()=>x||(0,d.rZ)(h)||"plaintext",[x,h]),w=(0,o.useMemo)(()=>m||(0,d.rZ)(p)||"plaintext",[m,p]),C=(0,o.useMemo)(()=>{var e;return e={renderSideBySide:y},{...structuredClone(c),...e}},[y]),S=(0,o.useCallback)(e=>{v.current=e},[]);return(0,o.useEffect)(()=>()=>{v.current?.setModel(null)},[]),(0,n.jsxs)("div",{className:(0,a.A)("monaco-component","diff-viewer","diff-viewer-CczjmT",f&&"embed-VNMDA8",t),style:r,children:[j&&(0,n.jsxs)("div",{className:"header-VBdMD0",children:[(0,n.jsx)("div",{children:(0,d.WP)(h)}),(0,n.jsx)("div",{style:{flex:1}}),(0,n.jsx)("div",{children:(0,n.jsx)(l.A,{className:"text-Pi6YdN",title:"side-by-side",checked:y,onChange:e=>{A(e.target.checked)},children:"side-by-side"})})]}),(0,n.jsx)("div",{className:(0,a.A)("content-BsfSuD","editor-wrap"),children:(0,n.jsx)(i.zC,{theme:g?"vs-light":"vs-dark",originalLanguage:b,modifiedLanguage:w,original:s,modified:u,width:"100%",options:C,onMount:S})})]})}},57490(e,t,r){r.d(t,{Q:()=>a,s:()=>l});var s=r(27348),n=r(36757),i=r(14023);let l={locale:(0,n.U)(),theme:(0,n.DT)(),pageState:i.jK.Pending,viewMode:(0,n.oi)(),json:{},setTheme(){},setManifest(){},setPageState(e){},setViewMode(){}},a=(0,s.createContext)({...l})},14023(e,t,r){r.d(t,{Q1:()=>f,Sx:()=>c,TM:()=>x,Y7:()=>g,jK:()=>u,nE:()=>p,nl:()=>h,or:()=>m});var s,n,i,l,a,o,d,c=((s={}).Light="light",s.Dark="dark",s),u=((n={})[n.Success=0]="Success",n[n.Pending=1]="Pending",n[n.Fail=2]="Fail",n),h=((i={})[i.Success=0]="Success",i[i.Pending=1]="Pending",i[i.Updating=2]="Updating",i[i.Fail=3]="Fail",i),p=((l={}).List="list",l.Group="group",l),x=((a={}).Cn="cn",a.En="en",a),m=((o={})[o.BasePadding=20]="BasePadding",o[o.BaseBorderRadius=8]="BaseBorderRadius",o[o.NavBarHeight=54]="NavBarHeight",o),f=((d={}).Red="#e17055",d.Green="#52c41a",d.Yellow="#faad14",d.Blue="#1677ff",d);let g="u"<typeof window?0:.85*window.innerWidth>=1100?.85*window.innerWidth:1100},99877(e,t,r){r.d(t,{YW:()=>ey,wE:()=>ej});var s,n,i=r(27080),l=r(27348),a=r(49085),o=r(57126),d=r(64254),c=r(34424),u=r(78195),h=r(11034),p=r(46198),x=r(19650),m=r(58924),f=r(28516),g=r(45964),j=r(15722),y=r(14023),A=r(25294),v=r(87884),b=r(6785),w=r(47903),C=r(93685),S=r(39646),k=r(88059),N=r(10006),M=r(92230),E=r(29166),T=r(98670),R=r(70494),z=r(1821),L=r(7205),P=r(23307),D=r(3730);let B=e=>{let{file:t,data:r}=e,[s,n]=(0,l.useState)(r[0].group),a=r.find(e=>e.group===s);return(0,i.jsxs)(A.A,{wrap:!0,gutter:[y.or.BasePadding,y.or.BasePadding],style:{height:"100%",alignContent:"flex-start"},children:[r.length>1?(0,i.jsx)(v.A,{span:24,children:(0,i.jsx)(P.A,{value:s,options:r.map(e=>e.group),onChange:e=>n(e)})}):null,a?(0,i.jsxs)(l.Fragment,{children:[(0,i.jsx)(v.A,{span:24,children:(0,i.jsxs)(u.A.Text,{strong:!0,children:[a.baselineTitle||"Baseline"," ⟷"," ",a.currentTitle||"Current"]})}),(0,i.jsx)(v.A,{span:24,children:(0,i.jsx)(D.Mh,{originalFilePath:t,modifiedFilePath:t,original:a.baseline||"",modified:a.current||""})})]},s):null]})},I=e=>{let{text:t="View Changes",...r}=e;return(0,i.jsx)(C.hX,{text:t,buttonProps:{size:"small",icon:(0,i.jsx)(L.A,{})},drawerProps:{destroyOnClose:!0,title:`Content diff for "${r.file}"`},children:(0,i.jsx)(B,{...r})})};var F=((s={}).New="New",s.Changed="Changed",s.Deleted="Deleted",s.NotChanged="Not Changed",s),O=((n={}).Name="Sorted by Name",n.Size="Sorted by Size",n.Delta="Sorted by Delta",n),$=r(98705),_=r(35635),G=r(65773),W=r(32660);let q=(e,t,r,s)=>(0,i.jsx)(i.Fragment,{children:t-e==0?(0,i.jsx)(i.Fragment,{}):(0,i.jsxs)(u.A.Text,{strong:!0,style:{color:r===j.Kj.RsdoctorClientDiffState.Up?y.Q1.Red:y.Q1.Green,...s},children:[r===j.Kj.RsdoctorClientDiffState.Up?"+":"-",(0,w.formatSize)(Math.abs(t-e))]})});var U=r(71513);let V=/[a-fA-F0-9]{20,}/,H=(e,t,r)=>{let s=r?(e,r)=>(e.current?.size[t]||0)-(e.baseline?.size[t]||0)-(r.current?.size[t]||0)+(r.baseline?.size[t]||0):(r,s)=>(r[e]?.size[t]||0)-(s[e]?.size[t]||0);return{width:200,sorter:(e,t)=>s(e,t),render:(r,s)=>{if(!s[e])return"-";let n=s[e].size[t];return(0,i.jsxs)(d.A,{children:[(0,i.jsx)(u.A.Text,{children:(0,w.formatSize)(n)}),"current"===e?q(s.baseline?.size[t]||0,n,(s.baseline?.size[t]||0)>n?j.Kj.RsdoctorClientDiffState.Down:j.Kj.RsdoctorClientDiffState.Up):null]})}}},K=(e,t,r)=>{let[s,n]=(0,l.useState)(!1),a="baseline"===e;return{title:()=>{let s=a?t:r,n=(0,W.Z)(e),l=U.TS.diffSize(t,r);return(0,i.jsxs)("div",{children:[(0,i.jsx)(u.A.Text,{children:n}),(0,i.jsx)(h.A,{type:"vertical"}),(0,i.jsx)(o.A,{title:(0,i.jsxs)(d.A,{direction:"vertical",children:[(0,i.jsxs)(u.A.Text,{style:{color:"inherit"},children:[n," modules is ",s]}),a?null:(0,i.jsxs)(u.A.Text,{style:{color:"inherit"},children:["Percent is ",(0,w.formatPercent)(l.percent)]})]}),children:(0,i.jsxs)(d.A,{children:[(0,i.jsx)(u.A.Text,{type:"secondary",style:{fontSize:10,fontWeight:400},children:s}),(0,i.jsx)(f.A,{})]})})]})},children:[{title:"Source Size",...H(e,"sourceSize",s)},{title:"Parsed Size",defaultSortOrder:a?void 0:"descend",...H(e,"parsedSize",s)}],filterSearch:!0,filters:[{text:"Show Changed",value:F.NotChanged},{text:"Show All",value:"All"}],onFilter:(e,t)=>(e===F.NotChanged?n(!0):n(!1),e!==F.NotChanged||Z(t)!==e)}},Q=e=>{let{data:t,baseline:r,current:s}=e,{modules:n}=r.moduleGraph,{modules:a}=s.moduleGraph,{chunks:c}=r.chunkGraph,{chunks:x}=s.chunkGraph,m=r.root,g=s.root,[j,A]=(0,l.useState)(""),v=(0,l.useRef)(null),b=(e,t)=>{t(),A(e[0])},C="__is_baseline__",S=(0,l.useMemo)(()=>t.baseline?U.TS.getModulesByAsset(t.baseline,c,n).map(e=>({...e,[C]:!0})).filter(e=>!e.concatenationModules?.length):[],[t,r]),k=(0,l.useMemo)(()=>t.current?U.TS.getModulesByAsset(t.current,x,a).map(e=>({...e,[C]:!1})).filter(e=>!e.concatenationModules?.length):[],[t,s]),M=e=>(0,w.beautifyModulePath)(e.path,e.__is_baseline__?m:g),E=(0,l.useMemo)(()=>{let e=[...S,...k],t=new Map;return e.forEach(e=>{let r=e.webpackId?.replace(V,"")||e.path?.replace(V,""),s=t.get(r);s||(s={path:r}),e[C]?s.baseline=e:s.current=e,t.set(r,s)}),[...t.values()]},[S,k,j]),{bModulesCount:R,cModulesCount:z,totalCount:L}=(0,l.useMemo)(()=>{let e=e=>M(e).alias.indexOf(j)>-1,t=E.filter(e=>e.baseline),r=E.filter(e=>e.current),s=E.length;return j&&(t=t.filter(e),r=r.filter(e),s=E.filter(e).length),{bModulesCount:t.length,cModulesCount:r.length,totalCount:s}},[E,j]);return(0,i.jsx)(N.A,{dataSource:E,rowKey:e=>e.path,size:"small",pagination:{size:"small"},bordered:!0,scroll:{x:1500},columns:[{fixed:"left",title:()=>(0,i.jsxs)("div",{children:[(0,i.jsxs)(u.A.Text,{children:["Modules of ",`"${t.alias}"`]}),(0,i.jsx)(h.A,{type:"vertical"}),(0,i.jsxs)(o.A,{title:(0,i.jsxs)(d.A,{direction:"vertical",children:[(0,i.jsxs)(u.A.Text,{style:{color:"inherit"},children:["filtered modules: ",L]}),(0,i.jsxs)(u.A.Text,{style:{color:"inherit"},children:["total modules: ",E.length]})]}),children:[(0,i.jsxs)(u.A.Text,{type:"secondary",style:{fontSize:10,fontWeight:400,marginRight:4},children:[L,"/",E.length]}),(0,i.jsx)(f.A,{})]})]}),filterDropdown(e){let{setSelectedKeys:t,selectedKeys:r,confirm:s,clearFilters:n}=e;return(0,i.jsxs)("div",{style:{padding:8},onKeyDown:e=>e.stopPropagation(),children:[(0,i.jsx)(G.A,{ref:v,placeholder:"Search by file name",value:r[0],onChange:e=>t(e.target.value?[e.target.value]:[]),onPressEnter:()=>b(r,s),style:{marginBottom:8,display:"block"}}),(0,i.jsxs)(d.A,{children:[(0,i.jsx)(p.Ay,{type:"primary",onClick:()=>b(r,s),icon:(0,i.jsx)(_.A,{}),size:"small",style:{width:90},children:"Search"}),(0,i.jsx)(p.Ay,{onClick:()=>{n&&(n(),A("")),t([]),b([],s)},size:"small",style:{width:90},children:"Reset"})]})]})},filterSearch:!0,filterIcon:e=>(0,i.jsxs)(d.A,{children:[(0,i.jsx)(u.A.Text,{type:j?void 0:"secondary",style:{fontWeight:400},children:j||"Search by file name"}),(0,i.jsx)(_.A,{style:{color:e?y.Q1.Blue:void 0}})]}),onFilterDropdownOpenChange:e=>{e&&setTimeout(()=>v.current?.focus(),100)},onFilter:(e,t)=>M(t).alias.indexOf(e)>-1,render:(e,t)=>{let{alias:r,inNodeModules:s}=M(t);return(0,i.jsxs)(d.A,{children:[(0,i.jsx)(o.A,{title:t.path,children:(0,i.jsx)(u.A.Text,{copyable:{text:t.path},children:r})}),s?(0,i.jsx)(T.A,{color:"warning",children:"node_modules"}):null,(0,i.jsx)(J,{type:Z(t)})]})}},K("current",R,z),K("baseline",R,z),{title:"Actions",width:200,render:(e,t)=>(0,i.jsx)(d.A,{direction:"vertical",style:{maxWidth:170},children:(0,i.jsx)(I,{text:"View Changes",file:t.path,data:[{baseline:r.moduleCodeMap[t.baseline?.id]?.source,current:s.moduleCodeMap[t.current?.id]?.source,group:"Source"},{baseline:r.moduleCodeMap[t.baseline?.id]?.transformed,current:s.moduleCodeMap[t.current?.id]?.transformed,group:"Transformed Source"},{baseline:r.moduleCodeMap[t.baseline?.id]?.parsedSource,current:s.moduleCodeMap[t.current?.id]?.parsedSource,group:"Parsed Source"}]})})}]})};function Z(e){if(e.baseline&&!e.current)return F.Deleted;if(!e.baseline&&e.current)return F.New;if(e.baseline&&e.current)return e.baseline.size.sourceSize===e.current.size.sourceSize&&e.baseline.size.parsedSize===e.current.size.parsedSize?F.NotChanged:F.Changed;throw Error("Update Type not match")}let J=e=>{let{type:t}=e;return t===F.NotChanged?(0,i.jsx)(o.A,{title:"It hasn't changed between Baseline and Current",children:(0,i.jsx)(T.A,{color:"success",children:"Not Changed"})}):t===F.Changed?(0,i.jsx)(o.A,{title:"It has been changed between Baseline and Current",children:(0,i.jsx)(T.A,{color:"warning",children:"Changed"})}):t===F.New?(0,i.jsx)(o.A,{title:"It is created in Current",children:(0,i.jsx)(T.A,{color:"error",children:"New"})}):t===F.Deleted?(0,i.jsx)(o.A,{title:"It has been deleted in Current",children:(0,i.jsx)(T.A,{color:"error",children:"Deleted"})}):null},Y=e=>{let{baseline:t,current:r}=e,s=(0,l.useMemo)(()=>(0,w.useUniqModules)(t.moduleGraph.modules),[t]),n=(0,l.useMemo)(()=>(0,w.useUniqModules)(r.moduleGraph.modules),[r]),a=t.chunkGraph.chunks,c=r.chunkGraph.chunks,p=t.root,x=r.root,[m,g]=(0,l.useState)(),[j,b]=(0,l.useState)([]),C=(0,l.useMemo)(()=>{let e={};return s.forEach(t=>{let r=t.webpackId?.replace(V,"")||t.path?.replace(V,"");e[r]?console.warn("[Baseline Module Exists]: ",t,e):e[r]={path:r,baseline:t}}),n.forEach(t=>{let r=t.webpackId?.replace(V,"")||t.path?.replace(V,"");e[r]||(e[r]={path:r}),e[r].current=t}),Object.values(e)},[s,n]),S=(0,l.useMemo)(()=>{let e=C.slice();return m&&(e=e.filter(e=>e.path.indexOf(m)>-1)),j.length&&(e=e.filter(e=>j.includes(Z(e)))),e},[C,m,j]),{bFilteredModulesLength:E,cFilteredModulesLength:L}=(0,l.useMemo)(()=>({bFilteredModulesLength:S.filter(e=>e.baseline).length,cFilteredModulesLength:S.filter(e=>e.current).length}),[S]);return(0,i.jsxs)(A.A,{gutter:[y.or.BasePadding,y.or.BasePadding],children:[(0,i.jsx)(v.A,{span:24,children:(0,i.jsxs)(d.A,{wrap:!0,children:[(0,i.jsx)(z.E,{icon:(0,i.jsx)(R.A,{}),label:"",labelStyle:{width:45},placeholder:"Search by name",onChange:e=>{g(e)}}),(0,i.jsx)(k.A,{mode:"multiple",placeholder:"Filter by changed type",style:{width:200},options:Object.values(F).map(e=>({label:e,value:e})),allowClear:!0,onChange:e=>{b(e)}})]})}),(0,i.jsx)(v.A,{span:24,children:(0,i.jsx)(N.A,{bordered:!0,sticky:{offsetHeader:54},pagination:{pageSize:20,size:"small"},scroll:{x:1700},dataSource:S,rowKey:e=>e.path,columns:[{fixed:"left",title:(0,i.jsxs)(o.A,{title:(0,i.jsxs)(d.A,{direction:"vertical",children:[(0,i.jsxs)(u.A.Text,{style:{color:"inherit"},children:["filtered modules is ",S.length," (Current & Baseline)"]}),(0,i.jsxs)(u.A.Text,{style:{color:"inherit"},children:["total modules is ",C.length," (Current & Baseline)"]})]}),children:[(0,i.jsx)(u.A.Text,{strong:!0,children:"Modules"}),(0,i.jsx)(h.A,{type:"vertical"}),(0,i.jsxs)(u.A.Text,{type:"secondary",style:{fontSize:10,fontWeight:400,marginRight:4},children:[S.length,"/",C.length]}),(0,i.jsx)(f.A,{})]}),render:(e,t)=>{let{alias:r,inNodeModules:s}=(0,w.beautifyModulePath)(t.path,t.baseline?p:x);return(0,i.jsxs)(d.A,{children:[(0,i.jsx)(o.A,{title:t.path,children:(0,i.jsx)(u.A.Text,{copyable:{text:t.path},children:r})}),(0,i.jsx)(J,{type:Z(t)}),s?(0,i.jsx)(T.A,{color:"warning",children:"node_modules"}):null]})}},K("current",E,L),K("baseline",E,L),{title:"in Assets",render:(e,t)=>{let r=[],s=[];return(t.current&&U.TS.getChunksByModule(t.current,c).forEach(e=>e.assets.forEach(e=>s.push(e))),t.baseline&&U.TS.getChunksByModule(t.baseline,a).forEach(e=>e.assets.forEach(e=>r.push(e))),r.length||s.length)?(0,i.jsxs)(d.A,{direction:"vertical",children:[(0,M.s)(s).filter(Boolean).map(e=>(0,i.jsx)($.Ex,{label:"Current",value:e},`c_${e}`)),(0,M.s)(r).filter(Boolean).map(e=>(0,i.jsx)($.Ex,{label:"Baseline",value:e},`b_${e}`))]}):null}},{title:"Actions",width:200,render:(e,s)=>{let n=Z(s)===F.Changed;return(0,i.jsxs)(d.A,{direction:"vertical",style:{maxWidth:170},children:[n?(0,i.jsx)(I,{text:"View Changes",file:s.path,data:[{baseline:t.moduleCodeMap[s.baseline?.id]?.source,current:r.moduleCodeMap[s.current?.id]?.source,group:"Source"},{baseline:t.moduleCodeMap[s.baseline?.id]?.transformed,current:r.moduleCodeMap[s.current?.id]?.transformed,group:"Transformed Source"},{baseline:t.moduleCodeMap[s.baseline?.id]?.parsedSource,current:r.moduleCodeMap[s.current?.id]?.parsedSource,group:"Parsed Source"}]}):null,s?.current?(0,i.jsx)(I,{text:"Current Result Viewer",file:s.path,data:[{baseline:r.moduleCodeMap[s.current.id]?.source,current:r.moduleCodeMap[s.current.id]?.transformed,baselineTitle:"Current Source",currentTitle:"Current Transformed Source",group:"Transformed Source"},{baseline:r.moduleCodeMap[s.current.id]?.source,current:r.moduleCodeMap[s.current.id]?.parsedSource,baselineTitle:"Current Source",currentTitle:"Current Parsed Source",group:"Parsed Source"}]}):null]})}}]})})]})},X=e=>e.baseline&&e.current?e.baseline.map(e=>e.version).sort().join()===e.current.map(e=>e.version).sort().join()?F.NotChanged:F.Changed:e.baseline||e.current?e.baseline&&!e.current?F.Deleted:F.New:F.NotChanged,ee=e=>X(e)!==F.NotChanged,et=e=>{let{dataSource:t}=e,{newCount:r,deleteCount:s,changedCount:n}=(0,l.useMemo)(()=>({newCount:t.filter(e=>e.updateType===F.New).length,deleteCount:t.filter(e=>e.updateType===F.Deleted).length,changedCount:t.filter(e=>e.updateType===F.Changed).length}),[t]);return(0,i.jsxs)(d.A,{children:[(0,i.jsx)($.Ex,{label:"New",value:r,type:r>0?"error":"default",tooltip:`Current has ${r} packages which not found in Baseline`}),(0,i.jsx)($.Ex,{label:"Deleted",value:s,type:s>0?"error":"default",tooltip:`Current delete ${s} packages than Baseline`}),(0,i.jsx)($.Ex,{label:"Changed",value:n,type:n>0?"error":"default",tooltip:`Current has ${n} changed packages than Baseline`})]})},er=e=>{let{baseline:t,current:r}=e,{packages:s=[]}=t||{},{packages:n=[]}=r||{},i={},l=(e,t)=>{i[e.name]||(i[e.name]={name:e.name,updateType:F.NotChanged}),i[e.name][t]||(i[e.name][t]=[]),i[e.name][t].push(e)};s.forEach(e=>l(e,"baseline")),n.forEach(e=>l(e,"current"));let a=[],o=[];return Object.values(i).forEach(e=>{ee(e)?a.push(e):o.push(e)}),a.concat(o).map(e=>({...e,updateType:X(e)}))},es=e=>{let{baseline:t,current:r}=e,{packages:s=[]}=t||{},{packages:n=[]}=r||{};if(!s.length&&!n.length)return(0,i.jsx)(S.A,{});let a=(0,l.useMemo)(()=>(0,M.s)(s.concat(n).map(e=>e.name)),[s,n]),[c,p]=(0,l.useState)([]),[x,m]=(0,l.useState)([]),f=(0,l.useMemo)(()=>er({baseline:t,current:r}),[t,r]),g=(0,l.useMemo)(()=>f.filter(e=>x.length?x.indexOf(e.updateType)>-1:!c.length||c.indexOf(e.name)>-1),[f,c,x]);return(0,i.jsxs)(A.A,{gutter:[y.or.BasePadding,y.or.BasePadding],children:[(0,i.jsx)(v.A,{span:24,style:{marginTop:16},children:(0,i.jsxs)(d.A,{wrap:!0,children:[(0,i.jsx)(k.A,{mode:"multiple",placeholder:"Filter by package names",style:{width:400},options:a.map(e=>{let t=f.find(t=>t.name===e);return t&&ee(t)?{label:(0,i.jsxs)(d.A,{children:[(0,i.jsx)(u.A.Text,{children:e}),(0,i.jsx)(J,{type:X(t)})]}),value:e}:{label:e,value:e}}),allowClear:!0,onChange:e=>{p(e)}}),(0,i.jsx)(k.A,{mode:"multiple",placeholder:"Filter by changed type",style:{width:200},options:Object.values(F).map(e=>({label:e,value:e})),allowClear:!0,onChange:e=>{m(e)}})]})}),(0,i.jsx)(v.A,{span:24,children:(0,i.jsx)(N.A,{bordered:!0,sticky:{offsetHeader:54},pagination:{pageSize:20,size:"small"},dataSource:g,rowKey:e=>e.name,columns:[{title:()=>(0,i.jsxs)(d.A,{children:[(0,i.jsx)(u.A.Text,{children:"Package Name"}),(0,i.jsx)(h.A,{type:"vertical"}),(0,i.jsx)(o.A,{title:`Filtered Package Count is ${g.length}, Total Package Count is ${f.length}`,children:(0,i.jsxs)(u.A.Text,{type:"secondary",style:{fontSize:10,fontWeight:400},children:[g.length," / ",f.length]})})]}),render:(e,t)=>t.updateType!==F.NotChanged?(0,i.jsxs)(d.A,{children:[(0,i.jsx)(u.A.Text,{children:t.name}),(0,i.jsx)(J,{type:t.updateType})]}):t.name},{title:()=>(0,i.jsxs)(d.A,{children:[(0,i.jsx)(u.A.Text,{children:"Current"}),(0,i.jsx)(h.A,{type:"vertical"}),(0,i.jsx)(et,{dataSource:f})]}),children:[{title:"Version",render:(e,t)=>t.current?(0,i.jsx)(d.A,{direction:"vertical",children:t.current.map(e=>(0,i.jsx)($.Ex,{label:"version",value:e.version,tooltip:e.root,type:t.updateType===F.Deleted?"error":t.updateType===F.Changed?"warn":"default"},e.version))}):null},{title:"Parsed Size",render:(e,t)=>{let r=(0,E.x)(t.current,e=>e.size.parsedSize),s=()=>(0,i.jsx)(b.vh,{baseline:(0,E.x)(t.baseline,e=>e.size.parsedSize),current:r});return t.current?(0,i.jsxs)(d.A,{children:[(0,i.jsx)(u.A.Text,{strong:t.updateType!==F.NotChanged,children:(0,w.formatSize)(r)}),(0,i.jsx)(s,{})]}):(0,i.jsx)(s,{})}}]},{title:"Baseline",children:[{title:"Version",render:(e,t)=>t.baseline?(0,i.jsx)(d.A,{direction:"vertical",children:t.baseline.map(e=>(0,i.jsx)($.Ex,{label:"version",value:e.version,tooltip:e.root,type:t.updateType===F.Deleted?"error":t.updateType===F.Changed?"warn":"default"},e.version))}):null},{title:"Parsed Size",render:(e,t)=>{if(t.baseline){let e=(0,E.x)(t.baseline,e=>e.size.parsedSize);return(0,i.jsx)(u.A.Text,{children:(0,w.formatSize)(e)})}return null}}]}]})})]})},en=e=>{let{baseline:t,current:r,assetsDiffResult:s}=e,n=(0,w.useUniqModules)(t.moduleGraph.modules),l=(0,w.useUniqModules)(r.moduleGraph.modules),a=(0,w.useDuplicatePackagesByErrors)(t.errors),o=(0,w.useDuplicatePackagesByErrors)(r.errors),c=(0,w.useModuleGraph)(t.moduleGraph),h=(0,w.useModuleGraph)(r.moduleGraph),p=t.root,x=r.root,m=er({baseline:t.packageGraph,current:r.packageGraph}),f=[{title:["Bundle Size"],value:[s.all.total]},{title:["Total JS","Initial JS"],value:[s.js.total,s.js.initial]},{title:["Total CSS","Initial CSS"],value:[s.css.total,s.css.initial]},{title:["Images","Fonts","Media"],value:[s.imgs.total,s.fonts.total,s.media.total]},{title:["HTML"],value:[s.html.total]},{title:["Others"],value:[s.others.total]}];return(0,i.jsxs)(A.A,{gutter:[y.or.BasePadding,y.or.BasePadding],wrap:!0,style:{marginBottom:y.or.BasePadding},children:[f.map(e=>(0,i.jsx)(v.A,{style:{minWidth:335},children:(0,i.jsx)(b.aq,{titles:e.title,datas:e.value,showPercentInTitle:!0})},e.title.join(","))),(0,i.jsx)(v.A,{style:{minWidth:335},children:(0,i.jsx)(b.aq,{titles:["Duplicate Packages"],datas:[{size:{baseline:a.length,current:o.length},count:{baseline:a.length,current:o.length},percent:0,state:j.Kj.RsdoctorClientDiffState.Equal}],formatter:(e,s)=>(0,i.jsx)(C.P6,{duplicatePackages:"baseline"===s?a:o,moduleGraph:"baseline"===s?c:h,cwd:"baseline"===s?p:x,buttonProps:{size:"small"},moduleCodeMap:"baseline"===s?t.moduleCodeMap:r.moduleCodeMap})})}),(0,i.jsx)(v.A,{style:{minWidth:335},children:(0,i.jsx)(b.aq,{titles:["Modules"],datas:[{size:{baseline:n.length,current:l.length},count:{baseline:n.length,current:l.length},percent:0,state:j.Kj.RsdoctorClientDiffState.Equal}],formatter:(e,t)=>{if("baseline"===t)return e;let r=U.TS.diffSize(n.length,l.length);return(0,i.jsxs)(d.A,{style:{fontSize:"inherit"},children:[(0,i.jsx)(u.A.Text,{style:{fontSize:"inherit"},children:e}),(0,i.jsx)(b.QE,{...r})]})}})}),(0,i.jsx)(v.A,{style:{minWidth:335},children:(0,i.jsx)(b.aq,{titles:[(0,i.jsxs)(d.A,{children:[(0,i.jsx)(u.A.Text,{style:{color:"inherit"},children:"Packages"}),(0,i.jsx)(et,{dataSource:m})]},"0")],datas:[{size:{baseline:m.filter(e=>e.baseline).length,current:m.filter(e=>e.current).length},count:{baseline:m.filter(e=>e.baseline).length,current:m.filter(e=>e.current).length},percent:0,state:j.Kj.RsdoctorClientDiffState.Equal}],formatter:(e,t)=>"baseline"===t?e:(0,i.jsx)(d.A,{children:e})})})]})},ei=e=>{let{assetsDiffResult:t}=e,r=[{type:"JS",data:t.js},{type:"CSS",data:t.css},{type:"Imgs",data:t.imgs},{type:"Fonts",data:t.fonts},{type:"Media",data:t.media},{type:"HTML",data:t.html},{type:"Others",data:t.others}];return(0,i.jsx)(N.A,{bordered:!0,pagination:!1,dataSource:r,rowKey:e=>e.type,style:{marginTop:y.or.BasePadding-y.or.BasePadding/4},columns:[{title:"File Type",dataIndex:"type",key:"type",render:e=>(0,i.jsx)(u.A.Text,{strong:!0,children:e})},{title:"Size",dataIndex:"data",key:"size",children:[{title:"Current",dataIndex:"data",key:"csize",render:e=>{let t=(0,i.jsxs)(l.Fragment,{children:[(0,i.jsx)(u.A.Text,{strong:!0,children:(0,w.formatSize)(e.total.size.current)}),(0,i.jsx)(b.QE,{percent:e.total.percent,state:e.total.state}),q(e.total.size.baseline,e.total.size.current,e.total.state)]});return e.initial?(0,i.jsxs)(d.A,{direction:"vertical",children:[(0,i.jsxs)(d.A,{children:[(0,i.jsx)(T.A,{color:y.Q1.Blue,children:"Total"}),t]}),(0,i.jsxs)(d.A,{children:[(0,i.jsx)(T.A,{color:y.Q1.Blue,children:"Initial"}),(0,i.jsx)(u.A.Text,{strong:!0,children:(0,w.formatSize)(e.initial.size.current)}),(0,i.jsx)(b.QE,{percent:e.initial.percent,state:e.initial.state}),q(e.initial.size.baseline,e.initial.size.current,e.initial.state)]})]}):(0,i.jsx)(d.A,{children:t})}},{title:"Baseline",dataIndex:"data",key:"bsize",render:e=>{let t=(0,i.jsx)(u.A.Text,{children:(0,w.formatSize)(e.total.size.baseline)});return e.initial?(0,i.jsxs)(d.A,{direction:"vertical",children:[(0,i.jsxs)(d.A,{children:[(0,i.jsx)(T.A,{color:y.Q1.Blue,children:"Total"}),t]}),(0,i.jsxs)(d.A,{children:[(0,i.jsx)(T.A,{color:y.Q1.Blue,children:"Initial"}),(0,i.jsx)(u.A.Text,{children:(0,w.formatSize)(e.initial.size.baseline)})]})]}):t}}]},{title:"Count",dataIndex:"data",key:"count",children:[{title:"Current",dataIndex:"data",key:"ccount",render:e=>{let t=(0,i.jsx)(u.A.Text,{strong:!0,children:e.total.count.current});return e.initial?(0,i.jsxs)(d.A,{direction:"vertical",children:[(0,i.jsxs)(d.A,{children:[(0,i.jsx)(T.A,{color:y.Q1.Blue,children:"Total"}),t]}),(0,i.jsxs)(d.A,{children:[(0,i.jsx)(T.A,{color:y.Q1.Blue,children:"Initial"}),(0,i.jsx)(u.A.Text,{strong:!0,children:e.initial.count.current})]})]}):(0,i.jsx)(d.A,{children:t})}},{title:"Baseline",dataIndex:"data",key:"bcount",render:e=>{let t=(0,i.jsx)(u.A.Text,{children:e.total.count.baseline});return e.initial?(0,i.jsxs)(d.A,{direction:"vertical",children:[(0,i.jsxs)(d.A,{children:[(0,i.jsx)(T.A,{color:y.Q1.Blue,children:"Total"}),t]}),(0,i.jsxs)(d.A,{children:[(0,i.jsx)(T.A,{color:y.Q1.Blue,children:"Initial"}),(0,i.jsx)(u.A.Text,{children:e.initial.count.baseline})]})]}):(0,i.jsx)(d.A,{children:t})}}]}]})};var el=r(18108),ea=r(38980),eo=r(9145),ed=r(6711),ec=r(84830);let eu={JS:j.YM.JSExtensions,CSS:[j.YM.CSSExtension],HTML:[j.YM.HtmlExtension],Imgs:j.YM.ImgExtensions,Fonts:j.YM.FontExtensions,Media:j.YM.MediaExtensions,Others:[]},eh=Object.values(eu).flat(),ep=e=>{let{data:t}=e,r=(0,i.jsxs)(d.A,{children:[(0,i.jsx)(u.A.Text,{strong:!0,children:t.alias}),(0,i.jsx)(o.A,{title:(0,i.jsxs)(d.A,{style:{color:"inherit"},direction:"vertical",children:[t.current?(0,i.jsxs)(u.A.Text,{style:{color:"inherit"},children:["Current realpath: ",t.current.path]}):null,t.baseline?(0,i.jsxs)(u.A.Text,{style:{color:"inherit"},children:["Baseline realpath: ",t.baseline.path]}):null]}),children:(0,i.jsx)(f.A,{})})]});return t.baseline&&!t.current?(0,i.jsxs)(d.A,{children:[(0,i.jsx)(el.A,{style:{color:y.Q1.Red}}),r]}):!t.baseline&&t.current?(0,i.jsxs)(d.A,{children:[(0,i.jsx)(ea.A,{style:{color:y.Q1.Green}}),r]}):t.baseline&&t.current?(0,i.jsxs)(d.A,{children:[(0,i.jsx)(eo.A,{style:{color:y.Q1.Yellow}}),r]}):r},ex=e=>{let{baseline:t,current:r,outputFilename:s}=e,[n,a]=(0,l.useState)(),[c,x]=(0,l.useState)([]),[m,g]=(0,l.useState)([]),[C,S]=(0,l.useState)(O.Size),[M,L]=(0,l.useState)(null),[P,D]=(0,l.useState)(null),{assets:B}=t.chunkGraph,{assets:$}=r.chunkGraph,_=(0,l.useMemo)(()=>{let e={};return M&&P?e.choose={alias:`${M}
|
|
5
|
+
${P}`,current:$.find(e=>e.path===P),baseline:B.find(e=>e.path===M)}:(B.forEach(t=>{let r=U.TS.formatAssetName(t.path,s);e[r]?console.warn("[Baseline Asset Exists]: ",t,e):e[r]={alias:r,baseline:t}}),$.forEach(t=>{let r=U.TS.formatAssetName(t.path,s);e[r]||(e[r]={alias:r}),e[r].current=t})),Object.values(e)},[B,$,M,P]),G=(0,l.useMemo)(()=>{let e=_.slice();if(n&&(e=e.filter(e=>e.alias.indexOf(n)>-1)),c.length){let t=c.map(e=>eu[e]).flat(),r=c.indexOf("Others")>-1;e=e.filter(e=>{let s=e.baseline||e.current;return!!U.TS.isAssetMatchExtensions(s,t)||!!r&&!U.TS.isAssetMatchExtensions(s,eh)})}if(m.length&&(e=e.filter(e=>e.baseline&&!e.current?m.includes(F.Deleted):!e.baseline&&e.current?m.includes(F.New):!!e.baseline&&!!e.current&&(e.baseline.size===e.current.size?m.includes(F.NotChanged):m.includes(F.Changed)))),C)if(C===O.Name)e.sort((e,t)=>e.alias.localeCompare(t.alias));else{let{prev:n,others:i}=e.reduce((e,t)=>(t.current?t.baseline?e.prev.unshift(t):e.prev.push(t):e.others.push(t),e),{prev:[],others:[]});e=[...n.sort((e,n)=>{if(n.current&&e.current){if(C===O.Delta){let{percent:i}=U.TS.diffAssetsByExtensions(t.chunkGraph,r.chunkGraph,t=>U.TS.formatAssetName(t.path,s)===e.alias),{percent:l}=U.TS.diffAssetsByExtensions(t.chunkGraph,r.chunkGraph,e=>U.TS.formatAssetName(e.path,s)===n.alias);return l-i}return n.current.size-e.current.size}return -1}),...i]}return e},[_,n,c,m,C]),W=(0,l.useMemo)(()=>(0,E.x)(G,e=>e.current?e.current.size:0)||0,[G]),V=(0,l.useMemo)(()=>(0,E.x)(G,e=>e.baseline?e.baseline.size:0)||0,[G]);return(0,i.jsxs)(A.A,{gutter:[y.or.BasePadding,y.or.BasePadding],children:[(0,i.jsxs)(v.A,{span:24,children:[(0,i.jsxs)(d.A,{wrap:!0,children:[(0,i.jsx)(z.E,{icon:(0,i.jsx)(R.A,{}),label:"",labelStyle:{width:45},placeholder:"Search by file name",onChange:e=>{a(e)}}),(0,i.jsx)(k.A,{mode:"multiple",placeholder:"Filter by file type",style:{width:250},options:Object.keys(eu).map(e=>({label:e,value:e})),allowClear:!0,onChange:e=>{x(e)}}),(0,i.jsx)(k.A,{mode:"multiple",placeholder:"Filter by file changed type",style:{width:200},options:Object.values(F).map(e=>({label:e,value:e})),allowClear:!0,onChange:e=>{g(e)}}),(0,i.jsx)(k.A,{suffixIcon:(0,i.jsx)(ed.A,{}),options:Object.values(O).map(e=>({label:e,value:e})),value:C,onChange:e=>{S(e)}})]}),(0,i.jsxs)(A.A,{style:{marginTop:10},gutter:[6,6],children:[(0,i.jsx)(v.A,{children:(0,i.jsx)(p.Ay,{children:"Select Baseline Asset and Current Asset to Diff "})}),(0,i.jsx)(v.A,{children:(0,i.jsx)(k.A,{allowClear:!0,placeholder:"select baseline assets",showSearch:!0,style:{width:300},options:Object.values(t.chunkGraph.assets).map(e=>({label:e.path,value:e.path})),onChange:e=>L(e)})}),(0,i.jsx)(v.A,{children:(0,i.jsx)(k.A,{allowClear:!0,placeholder:"select current assets",showSearch:!0,style:{width:300},options:Object.values(r.chunkGraph.assets).map(e=>({label:e.path,value:e.path})),onChange:e=>D(e)})})]})]}),(0,i.jsx)(v.A,{span:24,children:(0,i.jsx)(N.A,{bordered:!0,sticky:{offsetHeader:54},pagination:{pageSize:20,size:"small"},dataSource:G,rowKey:e=>e.alias,expandable:{expandedRowRender:e=>(0,i.jsx)("div",{style:{margin:y.or.BasePadding/3},children:(0,i.jsx)(Q,{data:e,baseline:t,current:r})}),columnTitle:(0,i.jsx)(o.A,{title:"Click to expand row to see the modules which the chunk contains",placement:"left",children:(0,i.jsx)(ec.A,{style:{cursor:"pointer"}})})},columns:[{title:(0,i.jsxs)(o.A,{title:(0,i.jsxs)(d.A,{direction:"vertical",children:[(0,i.jsxs)(u.A.Text,{style:{color:"inherit"},children:["filtered assets is ",G.length]}),(0,i.jsxs)(u.A.Text,{style:{color:"inherit"},children:["total assets is ",_.length]})]}),children:[(0,i.jsx)(u.A.Text,{strong:!0,children:"Assets"}),(0,i.jsx)(h.A,{type:"vertical"}),(0,i.jsxs)(u.A.Text,{type:"secondary",style:{fontSize:10,fontWeight:400,marginRight:4},children:[G.length,"/",_.length]}),(0,i.jsx)(f.A,{})]}),render:(e,t)=>(0,i.jsx)(ep,{data:t})},{title:()=>{let e=(0,w.formatSize)(W),t=U.TS.diffSize(V,W);return(0,i.jsxs)(o.A,{title:`Current size is ${e}, Delta is ${(0,w.formatPercent)(t.percent)}`,children:[(0,i.jsx)(u.A.Text,{strong:!0,children:"Current"}),(0,i.jsx)(h.A,{type:"vertical"}),(0,i.jsxs)(u.A.Text,{style:{fontSize:10,fontWeight:400,marginRight:4},children:[(0,i.jsx)(u.A.Text,{style:{fontSize:"inherit",marginRight:8},children:e}),(0,i.jsx)(b.vh,{fontSize:"inherit",baseline:V,current:W}),q(V,W,V>W?j.Kj.RsdoctorClientDiffState.Down:j.Kj.RsdoctorClientDiffState.Up,{fontSize:10,fontWeight:400,marginLeft:4})]}),(0,i.jsx)(f.A,{})]})},render:(e,n)=>{if(n.current){let{percent:e,state:l}=U.TS.diffAssetsByExtensions(t.chunkGraph,r.chunkGraph,e=>U.TS.formatAssetName(e.path,s)===n.alias),a=U.TS.isInitialAsset(n.current,r.chunkGraph.chunks);return(0,i.jsxs)(d.A,{children:[(0,i.jsx)(u.A.Text,{children:(0,w.formatSize)(n.current.size)}),(0,i.jsx)(b.QE,{percent:e,state:l}),a?(0,i.jsx)(T.A,{color:y.Q1.Blue,children:"initial"}):null]})}return"-"}},{title:()=>{let e=(0,w.formatSize)(V);return(0,i.jsxs)(o.A,{title:`Baseline size is ${e}`,children:[(0,i.jsx)(u.A.Text,{strong:!0,children:"Baseline"}),(0,i.jsx)(h.A,{type:"vertical"}),(0,i.jsx)(u.A.Text,{style:{fontSize:10,fontWeight:400,marginRight:4},children:e}),(0,i.jsx)(f.A,{})]})},render:(e,r)=>{if(r.baseline){let e=U.TS.isInitialAsset(r.baseline,t.chunkGraph.chunks);return(0,i.jsxs)(d.A,{children:[(0,i.jsx)(u.A.Text,{children:(0,w.formatSize)(r.baseline.size)}),e?(0,i.jsx)(T.A,{color:y.Q1.Blue,children:"initial"}):null]})}return"-"}},{title:"Actions",key:"actions",render:(e,t)=>(0,i.jsx)(I,{file:t.alias,data:[{baseline:t.baseline?.content,current:t.current?.content,group:"assets"}]})}]})})]})};var em=r(95869);let ef=e=>{let{api:t,body:r,children:s,manifests:n}=e,l=(0,w.useUrlQuery)(),a=window[j.YM.WINDOW_RSDOCTOR_TAG];if(a?.baseline&&a?.current){let e=JSON.parse(U.oG.decompressText(a.baseline)),t=JSON.parse(U.oG.decompressText(a.current));return(0,i.jsx)(i.Fragment,{children:s(e,t)})}if(n?.length)return(0,i.jsx)(i.Fragment,{children:s(n[0].data,n[1].data)});let[o,d]=l[j.Kj.RsdoctorClientUrlQuery.BundleDiffFiles]?.split(",")||[];return(0,i.jsx)(em.zW,{api:t,body:r,manifestLoader:o?()=>(0,w.fetchManifest)(o):void 0,children:e=>(0,i.jsx)(em.zW,{api:t,body:r,manifestLoader:d?()=>(0,w.fetchManifest)(d):void 0,children:t=>s(e,t)})})},eg=e=>{let{manifests:t}=e;return(0,l.useEffect)(()=>{console.log("BundleDiff Manifests: ",t)},[t]),(0,i.jsx)(ef,{api:j.hp.ServerAPI.API.GetBundleDiffSummary,manifests:t,children:(e,t)=>{let r=e.chunkGraph===t.chunkGraph,s=e.chunkGraph,n=r?s:t.chunkGraph,l=U.TS.getAssetsDiffResult(s,n);return(0,i.jsxs)("div",{children:[(0,i.jsxs)(a.A.Group,{children:[(0,i.jsx)(o.A,{placement:"leftBottom",title:(0,i.jsx)(d.A,{direction:"vertical",children:[{title:"Baseline",data:e},{title:"Current",data:t}].map(e=>{let{title:t,data:r}=e;return(0,i.jsx)(c.A,{size:"small",children:(0,i.jsxs)(d.A,{direction:"vertical",children:[(0,i.jsx)(u.A.Text,{strong:!0,children:t}),(0,i.jsxs)(d.A,{style:{fontSize:10},children:[(0,i.jsx)(u.A.Text,{style:{fontSize:"inherit",width:30,display:"inline-block"},children:"Hash"}),(0,i.jsx)(h.A,{type:"vertical"}),(0,i.jsx)(u.A.Text,{type:"secondary",style:{fontSize:"inherit"},children:r.hash||"-"})]}),r.cloudManifestUrl?(0,i.jsx)(p.Ay,{type:"link",size:"small",style:{padding:0,fontSize:10},onClick:()=>window.open(r.cloudManifestUrl),children:"Open File"}):null]})},t)})}),children:(0,i.jsx)(a.A,{icon:(0,i.jsx)(f.A,{})})}),(0,i.jsx)(x.A,{title:(0,i.jsxs)(u.A.Text,{children:["Are you sure to",(0,i.jsx)(u.A.Text,{strong:!0,children:" re-upload "}),"json files for bundle diff?"]}),onConfirm:()=>{},okText:"Yes",cancelText:"Cancel",placement:"topLeft",trigger:"hover",children:(0,i.jsx)(a.A,{icon:(0,i.jsx)(g.A,{})})}),(0,i.jsx)(a.A.BackTop,{})]}),(0,i.jsx)(en,{baseline:e,current:t,onlyBaseline:r,assetsDiffResult:l}),(0,i.jsx)(m.A,{defaultActiveKey:"Overview",tabBarStyle:{marginBottom:y.or.BasePadding/3},items:[{label:"Overview",key:"Overview",children:(0,i.jsx)(ei,{assetsDiffResult:l})},{label:"Assets",key:"Assets",children:(0,i.jsx)(ex,{outputFilename:e.outputFilename,baseline:e,current:t})},{label:"Modules",key:"Modules",children:(0,i.jsx)(Y,{baseline:e,current:t,onlyBaseline:r,assetsDiffResult:l})},{label:"Packages",key:"Packages",children:(0,i.jsx)(es,{baseline:e.packageGraph,current:t.packageGraph})}].map(e=>({...e,label:(0,i.jsx)(u.A.Text,{strong:!0,children:e.label})}))})]})}})},ej=j.Kj.RsdoctorClientRoutes.BundleDiff,ey=()=>(0,i.jsx)(eg,{manifests:[]})},91986(e,t,r){r.d(t,{B:()=>y});var s=r(27080),n=r(28516),i=r(2175),l=r(59857),a=r(34424),o=r(57126),d=r(64254),c=r(78195),u=r(13078),h=r.n(u),p=r(27348),x=r(20980),m=r(86070),f=r(3612),g=r(57792);let j=(0,x.$N)();function y(e){let{module:t,moduleGraph:r,ranges:u,toLine:y,setEditorData:A,source:v}=e,b=(0,p.useRef)(void 0),w=(0,p.useRef)([]),C=(0,p.useRef)([]),S=(0,p.useRef)(void 0),k=(0,p.useRef)(!1),[N,M]=(0,p.useState)("");return((0,p.useEffect)(()=>{let{isPreferSource:e}=t;k.current=!0,M(v.source||e?v.source:v.transformed),setTimeout(()=>{C.current=b.current?.getModel()?.deltaDecorations(C.current,(0,g.L1)(t,r))??[]},200)},[t,v]),(0,p.useEffect)(()=>{function e(){let e=b.current?.getModel();e&&(w.current=e.deltaDecorations(w.current,u.map(e=>({range:(0,x.qK)(e,f.Q),options:{stickiness:1,inlineClassName:"tree-shaking-statement-side-effect",isWholeLine:!1,showIfCollapsed:!0}}))),b.current&&"number"==typeof y&&S.current!==y&&(S.current=y,b.current.revealLine(y,0)))}k?setTimeout(e,300):e(),k.current=!1},[u,y]),(0,p.useEffect)(()=>{let e=e=>{let t=(0,m.U1)(e.target);if(t){let e=r.getModuleById(t.module);e&&A(e,[t.range],t.range.start.line)}};return document.body.addEventListener("click",e),()=>{document.body.removeEventListener("click",e)}},[]),t)?(0,s.jsx)(a.A,{title:(0,s.jsx)(o.A,{title:t.path,children:(0,s.jsxs)(d.A,{children:[(0,s.jsx)(c.A.Text,{children:h().basename(t.path)}),(0,s.jsx)(n.A,{})]})}),className:"tree-shaking-editor",children:(0,s.jsx)(l.Ay,{theme:"vs-dark",language:(0,x.rZ)(t.path),value:N,loading:(0,s.jsx)(i.A,{style:{fontSize:30}}),options:j,onMount:e=>{b.current=e}})}):(0,s.jsx)("div",{children:"请选择要查看的模块"})}},86070(e,t,r){function s(e,t,r){return`<a data-href="data-module=${e}&data-range=${encodeURIComponent(JSON.stringify(t))}">${r}</a>`}function n(e){if("a"!==e.tagName.toLocaleLowerCase())return;let t=e.getAttribute("data-href")??"",r={module:-1,range:{start:{line:1,column:0},end:{line:1,column:0}}};for(let e of t.split("&")){let[t,s]=e.split("=");if("data-module"===t){r.module=Number.parseInt(s,10);continue}"data-range"===t&&(r.range=JSON.parse(decodeURIComponent(s)))}return r}r.d(t,{U1:()=>n,mJ:()=>s})},3612(e,t,r){function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,{Q:()=>n});class n{isEmpty(){return n.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return n.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumber<e.startLineNumber)&&!(t.lineNumber>e.endLineNumber)&&(t.lineNumber!==e.startLineNumber||!(t.column<e.startColumn))&&(t.lineNumber!==e.endLineNumber||!(t.column>e.endColumn))}static strictContainsPosition(e,t){return!(t.lineNumber<e.startLineNumber)&&!(t.lineNumber>e.endLineNumber)&&(t.lineNumber!==e.startLineNumber||!(t.column<=e.startColumn))&&(t.lineNumber!==e.endLineNumber||!(t.column>=e.endColumn))}containsRange(e){return n.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumber<e.startLineNumber)&&!(t.endLineNumber<e.startLineNumber)&&!(t.startLineNumber>e.endLineNumber)&&!(t.endLineNumber>e.endLineNumber)&&(t.startLineNumber!==e.startLineNumber||!(t.startColumn<e.startColumn))&&(t.endLineNumber!==e.endLineNumber||!(t.endColumn>e.endColumn))}strictContainsRange(e){return n.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumber<e.startLineNumber)&&!(t.endLineNumber<e.startLineNumber)&&!(t.startLineNumber>e.endLineNumber)&&!(t.endLineNumber>e.endLineNumber)&&(t.startLineNumber!==e.startLineNumber||!(t.startColumn<=e.startColumn))&&(t.endLineNumber!==e.endLineNumber||!(t.endColumn>=e.endColumn))}plusRange(e){return n.plusRange(this,e)}static plusRange(e,t){let r,s,i,l;return t.startLineNumber<e.startLineNumber?(r=t.startLineNumber,s=t.startColumn):t.startLineNumber===e.startLineNumber?(r=t.startLineNumber,s=Math.min(t.startColumn,e.startColumn)):(r=e.startLineNumber,s=e.startColumn),t.endLineNumber>e.endLineNumber?(i=t.endLineNumber,l=t.endColumn):t.endLineNumber===e.endLineNumber?(i=t.endLineNumber,l=Math.max(t.endColumn,e.endColumn)):(i=e.endLineNumber,l=e.endColumn),new n(r,s,i,l)}intersectRanges(e){return n.intersectRanges(this,e)}static intersectRanges(e,t){let r=e.startLineNumber,s=e.startColumn,i=e.endLineNumber,l=e.endColumn,a=t.startLineNumber,o=t.startColumn,d=t.endLineNumber,c=t.endColumn;return(r<a?(r=a,s=o):r===a&&(s=Math.max(s,o)),i>d?(i=d,l=c):i===d&&(l=Math.min(l,c)),r>i||r===i&&s>l)?null:new n(r,s,i,l)}equalsRange(e){return n.equalsRange(this,e)}static equalsRange(e,t){return!e&&!t||!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return n.getEndPosition(this)}static getEndPosition(e){return new i(e.endLineNumber,e.endColumn)}getStartPosition(){return n.getStartPosition(this)}static getStartPosition(e){return new i(e.startLineNumber,e.startColumn)}toString(){return`[${this.startLineNumber},${this.startColumn} -> ${this.endLineNumber},${this.endColumn}]`}setEndPosition(e,t){return new n(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new n(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return n.collapseToStart(this)}static collapseToStart(e){return new n(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return n.collapseToEnd(this)}static collapseToEnd(e){return new n(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new n(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}static fromPositions(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return new n(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new n(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn}static areIntersectingOrTouching(e,t){return!(e.endLineNumber<t.startLineNumber)&&(e.endLineNumber!==t.startLineNumber||!(e.endColumn<t.startColumn))&&!(t.endLineNumber<e.startLineNumber)&&(t.endLineNumber!==e.startLineNumber||!(t.endColumn<e.startColumn))}static areIntersecting(e,t){return!(e.endLineNumber<t.startLineNumber)&&(e.endLineNumber!==t.startLineNumber||!(e.endColumn<=t.startColumn))&&!(t.endLineNumber<e.startLineNumber)&&(t.endLineNumber!==e.startLineNumber||!(t.endColumn<=e.startColumn))}static compareRangesUsingStarts(e,t){if(e&&t){let r=0|e.startLineNumber,s=0|t.startLineNumber;if(r===s){let r=0|e.startColumn,s=0|t.startColumn;if(r===s){let r=0|e.endLineNumber,s=0|t.endLineNumber;return r===s?(0|e.endColumn)-(0|t.endColumn):r-s}return r-s}return r-s}return!!e-!!t}static compareRangesUsingEnds(e,t){if(e.endLineNumber===t.endLineNumber)return e.endColumn===t.endColumn?e.startLineNumber===t.startLineNumber?e.startColumn-t.startColumn:e.startLineNumber-t.startLineNumber:e.endColumn-t.endColumn;return e.endLineNumber-t.endLineNumber}static spansMultipleLines(e){return e.endLineNumber>e.startLineNumber}toJSON(){return this}constructor(e,t,r,n){s(this,"startLineNumber",void 0),s(this,"startColumn",void 0),s(this,"endLineNumber",void 0),s(this,"endColumn",void 0),e>r||e===r&&t>n?(this.startLineNumber=r,this.startColumn=n,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=r,this.endColumn=n)}}class i{with(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.lineNumber,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.column;return e===this.lineNumber&&t===this.column?this:new i(e,t)}delta(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.with(this.lineNumber+e,this.column+t)}equals(e){return i.equals(this,e)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return i.isBefore(this,e)}static isBefore(e,t){return e.lineNumber<t.lineNumber||!(t.lineNumber<e.lineNumber)&&e.column<t.column}isBeforeOrEqual(e){return i.isBeforeOrEqual(this,e)}static isBeforeOrEqual(e,t){return e.lineNumber<t.lineNumber||!(t.lineNumber<e.lineNumber)&&e.column<=t.column}static compare(e,t){let r=0|e.lineNumber,s=0|t.lineNumber;return r===s?(0|e.column)-(0|t.column):r-s}clone(){return new i(this.lineNumber,this.column)}toString(){return`(${this.lineNumber},${this.column})`}static lift(e){return new i(e.lineNumber,e.column)}static isIPosition(e){return e&&"number"==typeof e.lineNumber&&"number"==typeof e.column}toJSON(){return{lineNumber:this.lineNumber,column:this.column}}constructor(e,t){s(this,"lineNumber",void 0),s(this,"column",void 0),this.lineNumber=e,this.column=t}}},85309(e,t,r){r.d(t,{$:()=>l});var s=r(27080),n=r(34424),i=r(39646);function l(){return(0,s.jsx)(n.A,{title:"Tree Shaking Analysis",bodyStyle:{paddingTop:0},className:"tree-shaking-page",children:(0,s.jsx)(i.A,{style:{marginTop:30}})})}},84407(e,t,r){r.d(t,{oK:()=>b});var s=r(27080),n=r(57126),i=r(46198),l=r(65773),a=r(64254),o=r(78195),d=r(11034),c=r(10006),u=r(35635),h=r(27348),p=r(67085),x=r.n(p),m=r(24184),f=r(57792),g=r(47903);function j(e,t){if(!e)return(0,s.jsx)("div",{children:"Can not find declaration."});let{module:r}=e,l=r.isPreferSource?e.position.source:e.position.transformed;return(0,s.jsx)(n.A,{title:`${r.path}, line ${l.start.line}`,children:(0,s.jsx)(i.Ay,{type:"link",onClick:()=>t(r,[l],l.start.line),children:"Move To"})})}function y(e){let[t,r]=(0,h.useState)(""),[n,o]=(0,h.useState)(""),d=(0,h.useRef)(null),c=(e,t,s)=>{t(),r(e[0]),o(s)};return{filterDropdown:t=>{let{setSelectedKeys:n,selectedKeys:o,confirm:h,clearFilters:p,close:x}=t;return(0,s.jsxs)("div",{style:{padding:8},onKeyDown:e=>e.stopPropagation(),children:[(0,s.jsx)(l.A,{ref:d,placeholder:`Search ${e}`,value:o[0],onChange:e=>n(e.target.value?[e.target.value]:[]),onPressEnter:()=>c(o,h,e),style:{marginBottom:8,display:"block"}}),(0,s.jsxs)(a.A,{children:[(0,s.jsx)(i.Ay,{type:"primary",onClick:()=>c(o,h,e),icon:(0,s.jsx)(u.A,{}),size:"small",style:{width:90},children:"Search"}),(0,s.jsx)(i.Ay,{onClick:()=>p&&void(p(),r("")),size:"small",style:{width:90},children:"Reset"}),(0,s.jsx)(i.Ay,{type:"link",size:"small",onClick:x,children:"close"})]})]})},filterIcon:e=>(0,s.jsx)(u.A,{style:{color:e?"#1890ff":void 0}}),onFilter:(t,r)=>r[e].toString().toLowerCase().includes(t.toLowerCase()),render:r=>n===e?(0,s.jsx)(x(),{highlightStyle:{backgroundColor:"#ffc069",padding:0},searchWords:[t],autoEscape:!0,textToHighlight:r?r.toString():""}):r}}let A=e=>{let{module:t,moduleGraph:r,setEditorData:l}=e,u=(0,h.useMemo)(()=>r.getModuleGraphModule(t).getSideEffects(),[t]),p=u.map((e,r)=>{let{variable:s,name:n,identifier:i}=e;return{key:r,name:n,identifier:t.isPreferSource?i.position.source:i.position.transformed,declaration:s?.identifier}}).sort((e,t)=>e.name===t.name?e.identifier.start.line>t.identifier.start.line?1:-1:e.name>t.name?1:-1).reduce((e,t)=>{let r=e[e.length-1];return r&&r.name===t.name?(r.children||(r.children=[]),r.children.push(t)):e.push(t),e},[]),x=[{title:"Name",dataIndex:"name",key:"name",align:"center",...y("name")},{title:"SideEffect",dataIndex:"identifier",key:"identifier",align:"center",render:e=>(0,s.jsx)(n.A,{title:`Current File line ${e.start.line}`,children:(0,s.jsx)(i.Ay,{type:"link",onClick:()=>l(t,[e],e.start.line),children:"Move To"})})},{title:"Declaration",dataIndex:"declaration",key:"declaration",align:"center",render:e=>j(e,l)}],f=(0,s.jsx)(h.Fragment,{children:(0,s.jsxs)(a.A,{style:{fontWeight:400},children:["Import",(0,s.jsx)(o.A.Text,{strong:!0,children:p.length}),"variables",(0,s.jsx)(d.A,{type:"vertical"}),(0,s.jsx)(o.A.Text,{strong:!0,children:u.length}),"sideEffects"]})});return(0,s.jsx)(m.Zp,{style:{marginBottom:10},title:f,className:"tree-shaking-export-table",children:(0,s.jsx)(c.A,{size:"small",dataSource:p,columns:x,pagination:!1,scroll:{y:600}})})},v=e=>{let{module:t,moduleGraph:r,setEditorData:l}=e,u=(0,h.useMemo)(()=>r.getModuleGraphModule(t).getExports(),[t]),p=u.filter(e=>0===e.getSideEffects().length),x=(0,s.jsxs)(h.Fragment,{children:[(0,s.jsxs)(a.A,{style:{fontWeight:400},children:["Export",(0,s.jsx)(o.A.Text,{strong:!0,children:u.length})]}),u.length>0?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.A,{type:"vertical"}),(0,s.jsxs)(o.A.Text,{style:{fontWeight:400},code:!0,children:[(0,s.jsx)(o.A.Text,{children:"Unused"}),(0,s.jsx)(d.A,{type:"vertical"}),(0,s.jsx)(o.A.Text,{strong:!0,children:p.length})]}),(0,s.jsx)(d.A,{type:"vertical"}),(0,s.jsxs)(o.A.Text,{style:{fontWeight:400},code:!0,children:[(0,s.jsx)(o.A.Text,{children:"Used"}),(0,s.jsx)(d.A,{type:"vertical"}),(0,s.jsx)(o.A.Text,{strong:!0,children:u.length-p.length})]})]}):""]}),A=u.map((e,t)=>{let{variable:r}=e;return{key:t,name:e.name,declaration:r?.identifier,used:e.getSideEffects().map(e=>{let{module:t,identifier:r}=e,s=t?.isPreferSource?r.position.source:r.position.transformed;if(t&&s)return{module:t,range:s}}).filter(g.isDef)}}),v=[{title:"Name",dataIndex:"name",key:"name",align:"center",...y("name")},{title:"Declaration",dataIndex:"declaration",key:"declaration",align:"center",render:e=>j(e,l)},{title:"Info",dataIndex:"used",key:"used",align:"center",sorter:(e,t)=>e.used.length-t.used.length,sortDirections:["descend","ascend"],render:e=>(0,s.jsxs)("span",{children:["Used ",e.length," times"]})}];return(0,s.jsx)(m.Zp,{title:x,className:"tree-shaking-export-table",children:(0,s.jsx)(c.A,{size:"small",dataSource:A,columns:v,pagination:!1,scroll:{y:600},expandable:{expandedRowRender:e=>(0,s.jsxs)("div",{className:"tree-shaking-side-effect-list",children:[(0,s.jsx)(o.A.Text,{children:"List of SideEffect:"}),e.used.map(e=>{let{module:t,range:r}=e;return(0,s.jsx)(n.A,{title:`${t.path}:${r.start.line}`,children:(0,s.jsx)(i.Ay,{className:"tree-shaking-side-effect-list-item",type:"link",onClick:()=>{l(t,[r],r.start.line)},children:`${(0,f.jx)(t.path)}:${r.start.line}`})},t.id)})]}),rowExpandable:e=>e.used.length>0}})})},b=e=>"side-effect"===e.kind?(0,s.jsx)(A,{...e}):(0,s.jsx)(v,{...e})},57792(e,t,r){r.d(t,{EV:()=>g,L1:()=>A,jx:()=>y,ut:()=>j});var s=r(27080),n=r(98485),i=r(64254),l=r(98670),a=r(38763),o=r(12030),d=r(13078),c=r.n(d),u=r(27348),h=r(20980),p=r(24197),x=r(47903),m=r(86070),f=r(3612);function g(e,t,r,a,o,d){return(0,u.useMemo)(()=>(0,x.createFileStructures)({files:e.map(e=>e.path),cwd:d,fileTitle(e,r){let a=t.getModules().find(t=>t.path===e&&t.kind===n.nV.kind.Normal),d=t.getModuleGraphModule(a),c=d.getExports().filter(e=>0===e.getSideEffects().length);return(0,s.jsxs)(i.A,{style:{wordBreak:"break-all"},children:[(0,s.jsx)(p.i,{text:r,keyword:e,onClick:()=>o(e)}),d.dynamic?(0,s.jsx)(l.A,{color:"cyan",children:"dynamic"}):"",c.length>0?(0,s.jsxs)(l.A,{color:"green",children:[c.length," Unused"]}):""]})}}),[r,a])}function j(e){return(0,x.mapFileKey)(e,3,e=>!((0,a.J)(e,"__RESOURCEPATH__").indexOf("/node_modules/")>-1))}function y(e){let t="",r=e;for(let e=0;e<3;e++)t=t?`${c().basename(r)}/${t}`:c().basename(r),r=c().dirname(r);return`...${t}`}function A(e,t){let r=t.getModuleGraphModule(e).getOwnExports(),s=r.map(e=>e.variable).filter(e=>!!e);if(0===r.length&&0===s.length)return[];let{isPreferSource:n}=e;return s.map(e=>{let t=n?e.identifier.position.source:e.identifier.position.transformed,r=t&&(0,h.qK)(t,f.Q);if(t&&r)return{range:r,options:{stickiness:1,inlineClassName:"tree-shaking-statement-declaration-identifier",isWholeLine:!1,showIfCollapsed:!0,hoverMessage:{supportHtml:!0,supportThemeIcons:!0,isTrusted:!0,value:function(e){let t=e.getExportInfo();if(!t)return"Can not find SideEffect info.";let r=t.getSideEffects();if(0===r.length)return"Have no sideEffect.";let s=`Used **${r.length}** times:
|
|
6
|
+
|
|
7
|
+
<div data-code="tree-shaking-hover">
|
|
8
|
+
<li>`;for(let e of r){if(!e)continue;let{identifier:t,module:r}=e;if(!r)continue;let{id:n,isPreferSource:i}=r,l=t.getLineCode();s+=`
|
|
9
|
+
<ol>
|
|
10
|
+
${(0,m.mJ)(n,i?t.position.source:t.position.transformed,function(e,t){let{path:r,isPreferSource:s}=t,n=s?e.position.source.start:e.position.transformed.start,i=`:${n.line??1}:${n.column??0}`;return r.length<=30?`${r}${i}`:`...${r.substring(r.length-30)}${i}`}(t,r))}
|
|
11
|
+
${l?`<pre>${(0,o.i)(l)}</pre>`:""}
|
|
12
|
+
</ol>`}return s+"\n</li></div>"}(e)}}}}).filter(e=>!!e)}},53529(e,t,r){r.d(t,{V:()=>f});var s=r(15722),n=r(27348),i=r(71513),l=r(38763);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class o{get(e){if(this.manifest)return this.manifest[e]}getData(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"data",r=this.get(t);if(r)return r[e]}getKeys(e){return e.split(".")}joinKeys(e){return e.join(".")}dispose(){this.disposed=!0}limit(e,t){if(this.pool.has(e))return this.pool.get(e);let r=t().finally(()=>this.pool.delete(e));return this.pool.set(e,r),r}log(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];console.log(`[${this.constructor.name}]`,...t)}async loadManifest(){return this.manifest}constructor(e){a(this,"manifest",void 0),a(this,"pool",void 0),a(this,"loader",void 0),a(this,"disposed",void 0),a(this,"shardingDataMap",void 0),this.manifest=e,this.pool=new Map,this.disposed=!1,this.shardingDataMap=new Map,this.loader=new i.B_.APIDataLoader(this),console.log("[DataLoader] isLocal: ",this.isLocal())}}var d=r(67485);class c extends o{isLocal(){return!0}async loadData(e){return this.limit(e,async()=>{let[t,...r]=this.getKeys(e),n=this.getData(t);if(!n)return;let a=n;if(i._8.isShardingData(a)){if(!this.shardingDataMap.has(e)){let t=new Promise(t=>{(0,d.O)().emit(s.hp.ServerAPI.API.LoadDataByKey,{key:e},e=>{t(e.res)})});this.shardingDataMap.set(e,t)}return a=await this.shardingDataMap.get(e),this.shardingDataMap.delete(e),a}return r.length>0?(0,l.J)(a,this.joinKeys(r)):a})}async loadAPI(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];let[s,n]=t,i=n?`${s}_${JSON.stringify(n)}`:`${s}`,l=this.get("__SOCKET__PORT__")??"";return this.limit(i,async()=>new Promise(e=>{(0,d.O)(l).emit(s,n,t=>{e(t.res)})}))}dispose(){super.dispose(),this.events.forEach((e,t)=>{e.forEach(e=>{this.removeOnDataUpdate(t,e)}),e.clear()}),this.events.clear()}onDataUpdate(e,t){this.events.has(e)||this.events.set(e,new Set),this.events.get(e).has(t)||(this.events.get(e).add(t),(0,d.O)().on(e,t))}removeOnDataUpdate(e,t){(0,d.O)().off(e,t),this.events.get(e).delete(t)}constructor(...e){super(...e),function(e,t,r){t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(this,"events",new Map)}}var u=r(25109);class h extends o{isLocal(){return!1}async loadData(e){return this.limit(e,async()=>{let[t,...r]=this.getKeys(e),s=this.getData(t,"cloudData");if(!s)return;let n=s;if(i._8.isShardingData(n)){if(!this.shardingDataMap.has(t)){let r=i._8.fetchShardingData(n,u.fZ).catch(t=>{throw this.log("loadData error: ",n,e),t});this.shardingDataMap.set(t,r)}n=await this.shardingDataMap.get(t)}return r.length>0?(0,l.J)(n,this.joinKeys(r)):n})}async loadAPI(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];let[s,n]=t,i=n?`${s}_${JSON.stringify(n)}`:`${s}`;return this.limit(i,async()=>this.loader.loadAPI(...t))}dispose(){super.dispose()}onDataUpdate(){}removeOnDataUpdate(){}}r(36757),r(14023);class p extends o{isLocal(){return!1}async loadData(e){console.log(`[loadData]-[key]: ${e}`);let[t]=this.getKeys(e);console.log(`[loadData]-[scope]: ${t}`);let r=this.getData(t);if(!r)return;let s=r;if(!this.shardingDataMap.has(t)){let e=this.parseData(s);this.shardingDataMap.set(t,Promise.resolve(e))}return await this.shardingDataMap.get(t)}getData(e){return console.log(`[getData]-[scope]: ${e}`),window[s.YM.WINDOW_RSDOCTOR_TAG][e]}parseData(e){if("object"==typeof e&&null!==e||"string"!=typeof e)return e;try{return JSON.parse(i.oG.decompressText(e))}catch{return e}}async loadAPI(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.loader.loadAPI(...t)}dispose(){super.dispose()}onDataUpdate(){}removeOnDataUpdate(){}}let x=new WeakMap;async function m(e){try{if(e.__LOCAL__SERVER__)return console.log("[LocalServerDataLoader]"),new c(e)}catch{console.log("[DataLoader] fallback to RemoteDataLoader")}return new h(e)}function f(e){let[t,r]=(0,n.useState)(void 0);return(0,n.useEffect)(()=>{window[s.YM.WINDOW_RSDOCTOR_TAG]&&(console.log("[brief mode]"),r(new p({data:[]})))},[]),(0,n.useEffect)(()=>{if(e){if(!x.has(e)){let t=m(e);x.set(e,t)}x.get(e).then(e=>{r(e)})}},[e]),{loader:t}}},91118(e,t,r){var s=r(25205),n=r(89488),i=r(36757);s.Ay.use(n.r9).init({lng:(0,i.U)(),resources:{en:{translations:{Overall:"Overall","Compile Analysis":"Compile Analysis","Bundle Alerts":"Bundle Alerts","Help Center":"Help Center",LoadersAnalysis:"Loaders Analysis","Loaders Timeline":"Loaders Timeline","Loaders Analysis":"Loaders Analysis","Rsdoctor Introduction":"Rsdoctor Introduction","Compilation Alerts":"Compilation Alerts","Plugins Analysis":"Plugins Analysis",PluginsAnalysis:"Plugins Analysis",ModuleResolve:"Module Resolve","Bundle Analysis":"Bundle Analysis",BundleSize:"Bundle Size",ViewBundleSize:"View Bundle Size","Module Graph":"Module Graph",TreeShaking:"Tree Shaking","Rule Index":"Rule Index",Resources:"Resources","Project Overall":"Project Overall","Compile Overall":"Compile Overall","Bundle Overall":"Bundle Overall","Expand Omitted":"By default, the reasons tree collapses to the middle of the module introduced by a third party. Click on this icon to view the full tree diagram","Concatenated Tag":"Concatenated Module,hover can display the name of the concatenated main module. Note: the bundled size of the concatenated module is zero, possibly because it is aggregated into the main module.","the file content not changed after transpiled by this loader":"the file content not changed after transpiled by this loader","Output Assets List":"Output Assets List","filter the output assets which size is greater than the input value":"filter the output assets which size is greater than the input value","filter the modules which size is greater than the input value":"filter the modules which size is greater than the input value","After Compile":"After Compile","After Bundle":"After Bundle",CodeModeExplain:"In lite mode or pure stats.json upload, only source code.",DuplicatePakCodeExplain:"There is no code, when in the case of pure stats.json.",AsyncLoaderInfo:"For async loaders, the time cost of each loader is not accurate. For example: mini-css-extract-plugin's loader.",Details:"Details",Expand:"Expand",Collapse:"Collapse"}},cn:{translations:{Overall:"概览","Compile Analysis":"编译分析","Bundle Alerts":"编译预警","Help Center":"帮助中心","Rsdoctor Introduction":"Rsdoctor 介绍","Compilation Alerts":"编译预警","Plugins Analysis":"Plugins 分析",LoadersAnalysis:"Loaders 分析","Loaders Timeline":"Loaders 概览","Loaders Analysis":"Loaders 分析",PluginsAnalysis:"Plugins 分析",ModuleResolve:"Module Resolve 分析","Bundle Analysis":"产物分析",BundleSize:"产物体积分析",ViewBundleSize:"查看包大小","Module Graph":"Module Graph",TreeShaking:"Tree Shaking","Rule Index":"错误索引信息",Resources:"资源","Project Overall":"项目信息概览","Compile Overall":"编译数据概览","Bundle Overall":"产物数据概览","Expand Omitted":" reasons 树会默认折叠中间的第三方引入的模块,点击这个图标可以查看完整树图","Concatenated Tag":"串联模块,hover 上去可以显示聚合成的主模块名称。注:聚合模块 bundled size 为零,有可能是因为被聚合到了主模块中。","the file content not changed after transpiled by this loader":"该文件内容在 loader 处理前后没有发生变化","Output Assets List":"产物文件列表","filter the output assets which size is greater than the input value":"筛选大小大于输入值的产物文件","filter the modules which size is greater than the input value":"筛选大小大于输入值的模块","After Compile":"编译后","After Bundle":"打包后",CodeModeExplain:"Lite 模式下或纯 stats.json 上传的情况下只有 source code.",DuplicatePakCodeExplain:"纯 stats.json 输入的情况下没有代码,可使用 Rsdoctor 插件参与构建会有对应代码。",AsyncLoaderInfo:"对于异步 loader,单个 loader 的耗时可能不准确。例如:mini-css-extract-plugin 的 loader。",Details:"详情",Expand:"展开",Collapse:"收起"}}},fallbackLng:{"zh-CN":["cn"],default:["en"]},debug:!1,ns:["translations"],defaultNS:"translations",keySeparator:!1,interpolation:{escapeValue:!1}})},47311(e,t,r){r.d(t,{ak:()=>i,xr:()=>s});let{findLoaderTotalTiming:s,getLoaderCosts:n}=r(71513).aH;function i(e,t,r,s,n,i){return!(r&&-1===e.indexOf(r)||n&&i&&n!==i||s?.length&&!s.includes(t))}},23137(e,t,r){r.d(t,{DP:()=>o,Ym:()=>a,an:()=>d,mB:()=>c});var s=r(27348),n=r(98485),i=r(57490),l=r(14023);function a(){return(0,s.useContext)(i.Q).locale}function o(){let{theme:e,setTheme:t}=(0,s.useContext)(i.Q),r=e===l.Sx.Dark;return{theme:e,setTheme:t,isDark:r,isLight:!r}}function d(){let{viewMode:e,setViewMode:t}=(0,s.useContext)(i.Q),{bundleAlerts:r,compileAlerts:n}=e;return{viewMode:e,setViewMode:t,setCompileAlertsViewMode(e){t({compileAlerts:e})},setBundleAlertsViewMode(e){t({bundleAlerts:e})},isCompileList:n===l.nE.List,isBundleList:r===l.nE.List}}function c(e){return(0,s.useMemo)(()=>n.dh.fromData(e),[e])}r(25109)},25109(e,t,r){r.d(t,{Cj:()=>c,fZ:()=>a});var s=r(15722),n=r(71513);r(14023);var i=r(48805);async function l(e,t){return(await n.Fp.fetchWithTimeout(e,{timeout:t})).text()}async function a(e){return n.s0.isUrl(e)?l(e,999999):e}async function o(e){let t=await l(e,3e4);if("string"==typeof t){let e=t.trim();t=/^<!doctype html\b/i.test(e)||/^<html\b/i.test(e)?{}:JSON.parse(t)}return t}r(36757);let d=new Map;async function c(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:((e=window[s._8.RsdoctorManifestClientConstant.WindowPropertyForManifestUrl]?window[s._8.RsdoctorManifestClientConstant.WindowPropertyForManifestUrl]:(0,i.kJ)())||(e=s.hp.ServerAPI.API.Manifest),e);return d.has(t)||d.set(t,o(t).catch(e=>{throw d.delete(t),e})),await d.get(t)}},81256(e,t,r){r.d(t,{c:()=>n,r:()=>i});var s=r(15722);function n(e){return e.includes(s._8.RsdoctorManifestClientRoutes.WebpackLoaders)||e.includes(s._8.RsdoctorManifestClientRoutes.ModuleResolve)||e.includes(s._8.RsdoctorManifestClientRoutes.WebpackPlugins)}function i(e){return e.includes(s._8.RsdoctorManifestClientRoutes.BundleSize)||e.includes(s._8.RsdoctorManifestClientRoutes.ModuleGraph)||e.includes(s._8.RsdoctorManifestClientRoutes.TreeShaking)}},93733(e,t,r){function s(e){return e>=1e9?`${(e/1e9).toFixed(2)} GB`:e>=1e6?`${(e/1e6).toFixed(2)} MB`:e>=1e3?`${(e/1e3).toFixed(2)} KB`:e>1?`${e} bytes`:1===e?`${e} byte`:"0 bytes"}function n(e){return`${+e.toFixed(2)}%`}r.d(t,{X:()=>s,l:()=>n})},67485(e,t,r){r.d(t,{O:()=>o});var s=r(43562);let n=new Map,i=location.protocol.includes("https")?"wss":"ws",l=`${i}://${location.host}`,a=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;function o(e){let t=function(e){let{port:t,protocol:r,hostname:s}=e;if("u">typeof URL){let e=new URL("http://localhost");return e.port=String(t),e.hostname=s,e.protocol=location.protocol.includes("https")?"wss":"ws",a.test(s)||s.includes("localhost")?e.toString():`${r}//${s}`}let n=-1===r.indexOf(":")?":":"";return`${r}${n}//${s}:${t}`}({port:e,hostname:location.hostname,protocol:location.protocol});return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l;if(!n.has(e)){let t=(0,s.io)(e,{});t.on("connect",()=>{console.log(`Socket Connect ${e}`)}),n.set(e,t)}return n.get(e)}(e?t:l)}},36757(e,t,r){r.d(t,{DT:()=>l,Kv:()=>a,R7:()=>p,U:()=>o,XX:()=>d,Yh:()=>x,ZI:()=>u,it:()=>h,oi:()=>c});var s=r(14023);function n(e){return window.localStorage.getItem(`__RSDOCTOR__STORAGE__${e}`)}function i(e,t){try{return window.localStorage.setItem(`__RSDOCTOR__STORAGE__${e}`,t),!0}catch(e){return console.error(e),!1}}function l(){return n("THEME")||s.Sx.Light}function a(e){i("THEME",e)}function o(){return n("LOCALE")||s.TM.En}function d(e){i("LOCALE",e)}function c(){let e={bundleAlerts:s.nE.List,compileAlerts:s.nE.List};try{let t=n("VIEWMODE");if(t)return JSON.parse(t)||e;return e}catch{return e}}function u(e){i("VIEWMODE",JSON.stringify(e))}function h(){return!!n("VIEWMODE")}function p(){return n("FIRST_VISIT")}function x(e){i("FIRST_VISIT",e)}},61005(e,t,r){r.d(t,{a4:()=>i});let{toFixedDigits:s,getUnit:n,formatCosts:i}=r(71513).gX},74038(){function e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class t{setup(){this.worker.onmessage=e=>{let{data:t}=e;if(this.callbacks.has(t.id)){let e=this.callbacks.get(t.id);this.callbacks.delete(t.id),e(t.data)}}}createEventId(){return`${Date.now()}_${++this.timer}`}emit(e,t){var r;let s=this.createEventId();return this.callbacks.set(s,t),r={id:s,data:e},this.worker.postMessage(r),{abort:()=>this.callbacks.delete(s)}}dispose(){this.worker.terminate()}constructor(t){e(this,"worker",void 0),e(this,"timer",void 0),e(this,"callbacks",void 0),this.worker=t,this.timer=0,this.callbacks=new Map,this.setup()}}new class{detectWorker(e){if(this._workerMap.has(e))return this._workerMap.get(e);let r=new t(e());return this._workerMap.set(e,r),r}constructor(){!function(e,t,r){t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(this,"_workerMap",new WeakMap)}}},15722(e,t,r){r.d(t,{Kj:()=>v,YM:()=>b,_8:()=>k,hp:()=>M,jO:()=>N});var s,n,i,l,a,o,d,c,u,h,p,x,m,f,g,j,y,A={};A.d=(e,t)=>{for(var r in t)A.o(t,r)&&!A.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},A.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),A.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},A.r({});var v={};A.r(v),A.d(v,{RsdoctorClientDiffState:()=>Y,RsdoctorClientRoutes:()=>J,RsdoctorClientUrlQuery:()=>Z}),A.r({}),A.r({});var b={};A.r(b),A.d(b,{BundleExtension:()=>ee,CSSExtension:()=>er,FontExtensions:()=>el,HtmlExtension:()=>es,ImgExtensions:()=>en,JSExtension:()=>X,JSExtensions:()=>et,MapExtensions:()=>ea,MediaExtensions:()=>ei,RsdoctorClientUrl:()=>ef,RsdoctorMonitorDocBId:()=>ex,RsdoctorMonitorNodeBId:()=>eh,RsdoctorMonitorWebBId:()=>ep,RsdoctorOutputFolder:()=>eo,RsdoctorOutputManifest:()=>ed,RsdoctorOutputManifestPath:()=>ec,RsdoctorProcessEnvDebugKey:()=>em,StatsFilePath:()=>eu,WINDOW_RSDOCTOR_TAG:()=>eg});var w={};A.r(w),A.d(w,{ErrorLevel:()=>z}),A.r({});var C={};A.r(C),A.d(C,{Severity:()=>z});var S={};A.r(S),A.d(S,{LogLevel:()=>L});var k={};A.r(k),A.d(k,{RsdoctorManifestClientConstant:()=>R,RsdoctorManifestClientRoutes:()=>T}),A.r({}),A.r({});var N={};A.r(N),A.d(N,{RsdoctorRuleClientConstant:()=>Q,RuleErrorMap:()=>K,RuleMessageCategory:()=>H,RuleMessageCodeEnumerated:()=>V});var M={};A.r(M),A.d(M,{DependencyKind:()=>P,IMode:()=>$,ModuleKind:()=>D,ServerAPI:()=>E,StatementKind:()=>O,ToDataType:()=>B});var E={};A.r(E),A.d(E,{API:()=>I,APIExtends:()=>F}),A.r({});var T=((s={}).Overall="Overall",s.WebpackLoaders="Compile.WebpackLoaders",s.ModuleResolve="Compile.ModuleResolve",s.WebpackPlugins="Compile.WebpackPlugins",s.BundleSize="Bundle.BundleSize",s.ModuleGraph="Bundle.ModuleGraph",s.TreeShaking="Bundle.TreeShaking",s),R=((n={}).WindowPropertyForManifestUrl="__DEVTOOLS_MANIFEST_URL__",n),z=((i={})[i.Ignore=0]="Ignore",i[i.Warn=1]="Warn",i[i.Error=2]="Error",i),L=((l={})[l.Silent=0]="Silent",l[l.Error=1]="Error",l[l.Warning=2]="Warning",l[l.Info=3]="Info",l[l.Debug=4]="Debug",l[l.Verbose=5]="Verbose",l),P=((a={})[a.Unknown=0]="Unknown",a[a.ImportStatement=1]="ImportStatement",a[a.DynamicImport=2]="DynamicImport",a[a.RequireCall=3]="RequireCall",a[a.AMDRequire=4]="AMDRequire",a),D=((o={})[o.Normal=0]="Normal",o[o.Concatenation=1]="Concatenation",o),B=((d={})[d.NoCode=0]="NoCode",d[d.Normal=1]="Normal",d[d.NoSource=2]="NoSource",d[d.NoSourceAndAssets=3]="NoSourceAndAssets",d[d.All=4]="All",d),I=((c={}).ApplyErrorFix="/api/apply/error/fix",c.Env="/api/env",c.EntryHtml="/index.html",c.Manifest="/api/manifest.json",c.LoadDataByKey="/api/data/key",c.SendAPIDataToClient="/api/socket/send",c.GetProjectInfo="/api/project/info",c.GetClientRoutes="/api/routes",c.ReportLoader="/api/loader/report",c.GetLoaderNames="/api/loader/names",c.GetLoaderChartData="/api/loader/chart/data",c.GetLoaderFileTree="/api/loader/filetree",c.GetLoaderFileDetails="/api/loader/file",c.GetLoaderFolderStatistics="/api/loader/folder/statics",c.GetLoaderFileFirstInput="/api/loader/input",c.GetLoaderFileInputAndOutput="/api/loader/inputandoutput",c.GetDirectoriesLoaders="/api/loader/directories",c.ReportSourceMap="/api/sourcemap/report",c.GetResolverFileTree="/api/resolver/filetree",c.GetResolverFileDetails="/api/resolver/file",c.GetPluginSummary="/api/plugins/summary",c.GetPluginData="/api/plugins/data",c.GetSummaryBundles="/api/graph/bundles/summary",c.GetChunkGraph="/api/graph/chunks/graph",c.GetAssetsSummary="/api/graph/assets/summary",c.GetAssetDetails="/api/graph/asset/details",c.GetChunksByModuleId="/api/graph/chunk/module",c.GetModuleDetails="/api/graph/module/details",c.GetModulesByModuleIds="/api/graph/modules/ids",c.GetEntryPoints="/api/graph/entrypoints",c.GetModuleCodeByModuleId="/api/graph/module/code",c.GetModuleCodeByModuleIds="/api/graph/module/codes",c.GetAllModuleGraph="/api/graph/module/all",c.GetAllChunkGraph="/api/graph/chunk/all",c.GetLayers="/api/graph/layers",c.GetSearchModules="/api/search/modules",c.GetSearchModuleInChunk="/api/search/chunk/modules",c.GetAllModuleGraphFilter="/api/graph/module/filter",c.GetModuleByName="/api/graph/module/name",c.GetModuleIssuerPath="/api/graph/module/issuer_path",c.GetPackageInfo="/api/package/info",c.GetPackageDependency="/api/package/dependency",c.GetPackageRelationAlertDetails="/api/alerts/details/package/relation",c.GetOverlayAlerts="/api/alerts/overlay",c.GetBundleAlerts="/api/alerts/bundle",c.BundleDiffManifest="/api/bundle_diff/manifest.json",c.GetBundleDiffSummary="/api/bundle_diff/summary",c.GetChunkGraphAI="/api/graph/chunks/graph/ai",c.GetChunkByIdAI="/api/graph/chunk/id/ai",c),F=((u={}).GetCompileProgress="/api/progress",u),O=((h={})[h.ImportDefault=100]="ImportDefault",h[h.ImportNamed=101]="ImportNamed",h[h.ImportDefaultWithNamed=102]="ImportDefaultWithNamed",h[h.ImportDefaultWithNamespace=103]="ImportDefaultWithNamespace",h[h.ImportNamespace=104]="ImportNamespace",h[h.ImportSideEffect=105]="ImportSideEffect",h[h.ImportDynamic=106]="ImportDynamic",h[h.ExportDeclaration=200]="ExportDeclaration",h[h.ExportList=201]="ExportList",h[h.ExportDefault=202]="ExportDefault",h[h.ExportAggregating=203]="ExportAggregating",h[h.ExportNamespace=204]="ExportNamespace",h[h.RequireCall=300]="RequireCall",h[h.RequireName=301]="RequireName",h[h.RequireExports=302]="RequireExports",h[h.RequireExportAggregating=303]="RequireExportAggregating",h[h.RequireExportName=304]="RequireExportName",h[h.Unknown=999]="Unknown",h),$=((p={}).brief="brief",p.lite="lite",p.normal="normal",p);let _={code:"E1001",title:"Duplicate Packages",type:"markdown",category:"bundle",description:`
|
|
13
|
+
#### Description
|
|
14
|
+
|
|
15
|
+
There is a same name package which is bundled in multiple versions in your application.
|
|
16
|
+
|
|
17
|
+
This negatively impacts the bundle size of your application.
|
|
18
|
+
|
|
19
|
+
#### General Solution
|
|
20
|
+
|
|
21
|
+
Add an entry in \`resolve.alias\` to configure Webpack to route any package references to a single specified path.
|
|
22
|
+
|
|
23
|
+
For example, if \`lodash\` is duplicated in your bundle, the following configuration would make all Lodash imports refer to the \`lodash\` instance found at \`./node_modules/lodash\`:
|
|
24
|
+
|
|
25
|
+
\`\`\`js
|
|
26
|
+
{
|
|
27
|
+
alias: {
|
|
28
|
+
lodash: path.resolve(__dirname, 'node_modules/lodash')
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
\`\`\`
|
|
32
|
+
`},G={code:"E1002",title:"Cross Chunks Packages",type:"markdown",category:"bundle",description:`
|
|
33
|
+
#### Description
|
|
34
|
+
|
|
35
|
+
There is a package with the same version that is duplicated across different chunks in your application. This redundancy increases the overall bundle size, which is not optimal for performance.
|
|
36
|
+
|
|
37
|
+
#### General Solution
|
|
38
|
+
|
|
39
|
+
To address this issue, you can use Rspack's **SplitChunksPlugin** to extract common dependencies into a separate chunk. This ensures that the same package is not duplicated across multiple chunks, thereby reducing the bundle size.
|
|
40
|
+
|
|
41
|
+
For example, if **lodash** is being duplicated across different chunks, you can configure the **optimization.splitChunks** option in your Webpack configuration to extract **lodash** into a separate chunk:
|
|
42
|
+
|
|
43
|
+
\`\`\`
|
|
44
|
+
module.exports = {
|
|
45
|
+
optimization: {
|
|
46
|
+
splitChunks: {
|
|
47
|
+
cacheGroups: {
|
|
48
|
+
commons: {
|
|
49
|
+
test: /[\\/]node_modules[\\/]lodash[\\/]/,
|
|
50
|
+
name: 'lodash',
|
|
51
|
+
chunks: 'all',
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
\`\`\`
|
|
58
|
+
|
|
59
|
+
This configuration will automatically split out common dependencies (including those from \`node_modules\`) into separate chunks, ensuring that no package is duplicated across different chunks.
|
|
60
|
+
`},W={code:"E1003",title:"Loader Performance Optimization",type:"markdown",category:"compile",description:`
|
|
61
|
+
#### Description
|
|
62
|
+
|
|
63
|
+
Usually the slow compile of most projects is due to the slow execution of the loaders.
|
|
64
|
+
|
|
65
|
+
And the loaders always pre-process many unnecessary files, such as \`node_modules files\` and \`already compiled files\`.
|
|
66
|
+
|
|
67
|
+
#### General Solution
|
|
68
|
+
|
|
69
|
+
Set \`exclude\` to the \`module.rules\` of webpack configuration for target loader.
|
|
70
|
+
|
|
71
|
+
For example, if \`node_modules/lodash\` is processed by the \`babel-loader\` that make the compile slowly:
|
|
72
|
+
|
|
73
|
+
\`\`\`
|
|
74
|
+
{
|
|
75
|
+
module: {
|
|
76
|
+
rules: [
|
|
77
|
+
{
|
|
78
|
+
test: /\\.js$/,
|
|
79
|
+
use: 'babel-loader',
|
|
80
|
+
exclude: [
|
|
81
|
+
/node_modules\\/lodash/
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
\`\`\`
|
|
88
|
+
`},q={code:"E1004",title:"ECMA Version Check",type:"markdown",category:"bundle",description:`
|
|
89
|
+
#### Description
|
|
90
|
+
|
|
91
|
+
Detect if there is a newer version of ECMA syntax in the js bundle file
|
|
92
|
+
`},U={code:"E1005",title:"Default Import Check",type:"markdown",category:"compile",description:`
|
|
93
|
+
#### Description
|
|
94
|
+
|
|
95
|
+
Usually webpack will automatically compatible different modules that has different types, but in a special case, the operation of compatibility will fail.
|
|
96
|
+
That is, when you use \`Default Import\` to import a cjs module, and this cjs module do not have the compatible statement, such as \`exports.default = \`.
|
|
97
|
+
|
|
98
|
+
#### General Solution
|
|
99
|
+
|
|
100
|
+
1. for cjs module, write a \`exports.default = \` statement for default export.
|
|
101
|
+
2. use \`Namespace Import\` for import the cjs module.
|
|
102
|
+
|
|
103
|
+
For example, for the package \`htmlparser2@7.2.0\`:
|
|
104
|
+
|
|
105
|
+
\`\`\`ts
|
|
106
|
+
// you should use this
|
|
107
|
+
import * as Parser from 'htmlparser2';
|
|
108
|
+
|
|
109
|
+
// can not use this
|
|
110
|
+
import Parser from 'htmlparser2';
|
|
111
|
+
\`\`\`
|
|
112
|
+
`};var V=((x={}).Extend="EXTEND",x.Overlay="OVERLAY",x),H=((m={}).Compile="compile",m.Bundle="bundle",m.EMO="emo",m);let K={E1001:_,E1002:G,E1003:W,E1004:q,E1005:U,E1006:{code:"E1006",title:"Module Mixed Chunks",type:"markdown",category:"bundle",description:"\n#### Description\n\nWhen a module is included in both **initial chunks** and **async chunks**, the same module code is bundled into multiple chunks, increasing output size and potentially affecting first-screen load and cache efficiency.\n\n- **Initial chunks**: Chunks loaded with the main entry (e.g. entry points, synchronous `import` in the main bundle).\n- **Async chunks**: Chunks loaded on demand via dynamic `import()` or similar.\n\nIn the **Module Mixed Chunks** tab of Bundle Alerts, each entry shows the module path, **Initial Chunks** list, and **Async Chunks** list so you can locate duplicated modules.\n\n#### Common Causes\n\n- **Same module referenced in two ways**: The module is both synchronously imported in the main bundle or entry and dynamically `import()`ed elsewhere, so the bundler emits it in both initial and async chunks.\n- **A file is both an entry and an async chunk**: e.g. a utility module is configured as an entry and also `import()`ed in app code, so it appears in the entry's initial chunk and in a dynamically loaded async chunk.\n- **splitChunks overlapping with entry**: A path is split into an async chunk via `splitChunks` / `chunkSplit`, but that path is also an entry or a main-bundle dependency, leading to mixed chunk types.\n\n#### General Solution\n\n1. **Use a single import style**: Prefer one way to reference a module—either all synchronous imports (initial) or all dynamic `import()` (async). Avoid the same file being both synchronously imported in the main bundle and dynamically imported elsewhere.\n2. **Review entry vs dynamic loading**: If a file is both an entry and part of an async chunk, remove one of those usages or extract it into a single shared chunk via build config so both initial and async chunks reference it instead of duplicating it.\n3. **Adjust splitChunks**: Check rules for that module path in `optimization.splitChunks` (Rspack/Webpack) or `performance.chunkSplit` (Rsbuild), and avoid the same module being split into both initial and async chunks. Use `chunks: 'async'` or `chunks: 'initial'` where appropriate, or control which chunk type it goes into via `cacheGroups` and `test` / `chunks`.\n4. **Trace dependencies**: From the reported module path and chunk list, search the codebase for references to that module, distinguish sync vs dynamic imports, then converge to a single chunk type or extract a common chunk.\n"},E1007:{code:"E1007",title:"Tree Shaking Side Effects Only",type:"markdown",category:"bundle",description:"\n#### Description\n\nThis rule detects modules that are pulled in and bundled solely due to side effects. This is often caused by unintended tree-shaking failures (e.g. missing or incorrect `\"sideEffects\"` field in `package.json`, or non-tree-shakeable import patterns), resulting in the entire module being bundled even though none of its exports are used.\n\n#### Common Causes\n\n- The package's `package.json` is missing `\"sideEffects\": false` (or incorrectly set to `true`), preventing the bundler from pruning unused exports.\n- An import statement like `import 'some-module'` or `import './styles.css'` is being treated as a side-effect-only import, but the intended use was to consume exports.\n- Barrel files (index files that re-export many things) cause the whole module to be kept alive when only a side-effect import is present.\n\n#### General Solution\n\n1. **Audit import statements**: Make sure you are actually importing and using named exports from this module. Replace bare side-effect imports with explicit named imports when you intend to use the module's exports.\n2. **Set `\"sideEffects\"` correctly**: In the module's `package.json`, set `\"sideEffects\": false` if the module has no global side effects, so the bundler can safely tree-shake unused exports.\n3. **Avoid unintended side-effect imports**: Remove or convert `import 'module'` patterns to explicit `import { foo } from 'module'` patterns where the exports are needed.\n"},E1008:{code:"E1008",title:"CJS Require Cannot Tree-Shake",type:"markdown",category:"bundle",description:"\n#### Description\n\nThis rule detects `require()` calls that use the **CJS Require** dependency type, which prevents tree-shaking of the required module. Unlike `require('module').property` (CJS Full Require), a bare `require('module')` call forces the entire module to be bundled because the bundler cannot statically determine which exports are used.\n\n#### Common Causes\n\n- Using `const mod = require('some-module')` instead of destructuring at the require site.\n- Dynamically accessing properties of the required module at runtime rather than statically.\n\n#### General Solution\n\n1. **Use destructured require**: Replace `const mod = require('A')` with `const { foo } = require('A')` (CJS Full Require) so the bundler can track which exports are used.\n2. **Migrate to ESM**: Use `import { foo } from 'A'` to enable full tree-shaking support.\n3. **Use require with property access**: Replace `const mod = require('A'); mod.foo()` with `const foo = require('A').foo` to allow partial tree-shaking.\n"},E1009:{code:"E1009",title:"ESM Import Resolved to CJS",type:"markdown",category:"bundle",description:'\n#### Description\n\nThis rule detects cases where a package provides both **ESM** and **CJS** formats (via the `module` field or `exports["."]["import"]` in `package.json`), but the bundler resolved the ESM `import` statement to the **CJS** entry instead.\n\nThis prevents tree-shaking of the package, leading to larger bundle sizes than necessary.\n\n#### Common Causes\n\n- The bundler\'s `resolve.mainFields` does not include `module`, so it falls back to `main` (CJS).\n- The `resolve.conditionNames` does not include `import`, so `exports` conditions are resolved as `require`.\n- The package uses `exports` field but the bundler version does not support conditional exports.\n\n#### General Solution\n\n1. **Add `module` to `resolve.mainFields`**: Ensure your bundler config includes `"module"` before `"main"`.\n2. **Add `import` to `resolve.conditionNames`**: For packages using the `exports` field, ensure the `import` condition is listed.\n3. **Check bundler version**: Older versions of webpack/rspack may not support `exports` conditional resolution. Upgrade if necessary.\n'}};var Q=((f={}).UrlQueryForErrorCode="code",f),Z=((g={}).BundleDiffFiles="__bundle_files__",g.ManifestFile="manifest",g.EnableRoutes="enableRoutes",g),J=((j={}).Home="/",j.Overall="/overall",j.WebpackLoaderOverall="/webpack/loaders/overall",j.WebpackLoaderAnalysis="/webpack/loaders/analysis",j.ModuleResolve="/module/resolve",j.WebpackPlugins="/webpack/plugins",j.BundleSize="/bundle/size",j.ModuleAnalyze="/module/analyze",j.TreeShaking="/treeshaking",j.BundleDiff="/resources/bundle/diff",j.RuleIndex="/resources/rules",j.Uploader="/resources/uploader",j.EmoCheck="/emo/check",j),Y=((y={}).Equal="-",y.Up="UP",y.Down="DOWN",y);let X=".js",ee=".bundle",et=[X,ee],er=".css",es=".html",en=[".png",".jpg",".svg",".webp",".jpeg",".gif",".bmp"],ei=[".mp3",".mp4",".avi",".wav",".flv",".mov",".mpg",".mpeg"],el=[".ttf",".fnt",".fon",".otf",".woff",".woff2"],ea=[".js.map",".css.map",".ts.map",".LICENSE.txt"],eo=".rsdoctor",ed="manifest.json",ec=`${eo}/${ed}`,eu="dist/stats.json",eh="Rsdoctor",ep="Rsdoctor-Client",ex="Rsdoctor-Doc",em="rsdoctor",ef="",eg="__RSDOCTOR__"},98219(e,t,r){r.d(t,{Q:()=>s});var s={};s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},20645(e,t,r){r.d(t,{AP:()=>n,HV:()=>d,Im:()=>o,oE:()=>c});var s=r(98219),n={};function i(e){return void 0===e}function l(e){return"number"==typeof e&&!Number.isNaN(e)}function a(e){return"object"==typeof e&&null!==e}function o(e){return null==e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length}function d(e){return e[e.length-1]}function c(e){return e.filter(e=>null!=e||!e)}function u(e){return null==e}s.Q.r(n),s.Q.d(n,{compact:()=>c,isEmpty:()=>o,isNil:()=>u,isNumber:()=>l,isObject:()=>a,isPlainObject:()=>h,isString:()=>p,isUndefined:()=>i,last:()=>d,pick:()=>x});let h=e=>null!==e&&"object"==typeof e&&Object.getPrototypeOf(e)===Object.prototype,p=e=>"string"==typeof e||!!e&&"object"==typeof e&&!Array.isArray(e)&&"[object String]"===({}).toString.call(e);function x(e,t){let r={};for(let s=0;s<t.length;s++){let n=t[s];Object.hasOwn(e,n)&&(r[n]=e[n])}return r}},98900(e,t,r){r.d(t,{PZ:()=>u,kB:()=>c,vF:()=>o});var s=r(97142),n=r.n(s),i=r(89276),l=r(15722),a=r(85409);let o=(0,i.h)();o.override({log:e=>{console.log(`${n().green("[RSDOCTOR LOG]")} ${e}`)},info:e=>{console.log(`${n().yellow("[RSDOCTOR INFO]")} ${e}`)},warn:e=>{console.warn(`${n().yellow("[RSDOCTOR WARN]")} ${e}`)},start:e=>{console.log(`${n().green("[RSDOCTOR START]")} ${e}`)},ready:e=>{console.log(`${n().green("[RSDOCTOR READY]")} ${e}`)},error:e=>{console.error(`${n().red("[RSDOCTOR ERROR]")} ${e}`)},success:e=>{console.error(`${n().green("[RSDOCTOR SUCCESS]")} ${e}`)},debug:e=>{a.env.DEBUG&&console.log(`${n().blue("[RSDOCTOR DEBUG]")} ${e}`)}});let d=new Map;function c(e){a.env.DEBUG!==l.YM.RsdoctorProcessEnvDebugKey||d.has(e)||d.set(e,Date.now())}function u(e){if(a.env.DEBUG!==l.YM.RsdoctorProcessEnvDebugKey)return;let t=d.get(e);if(null==t)return void i.vF.debug(`Timer '${e}' does not exist.`);let r=Date.now()-t;i.vF.debug(`Timer '${e}' ended: ${r}ms`),d.delete(e)}},50902(){},3710(){},39980(){}}]);
|