PageSourceSearch

https://anfin.vn/_next/static/chunks/pages/app/portfolio-254a3f3adf18a1b0.js

js anfin.vn collected 2026-09-24 10:11:28 UTC 14,033 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8493],{8851:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/app/portfolio",function(){return t(28074)}])},62912:function(e,n,t){"use strict";t.d(n,{Z:function(){return a}});var i=t(85893),r=t(45111),s=t(29217),o=t(2734),l=t(15861),c=t(51233),x=t(15017),d=t(49635);let a=e=>{let{percentage:n}=e,t=(0,o.Z)();return"number"!=typeof n?(0,i.jsx)(l.Z,{fontWeight:700,fontSize:14,color:"#D7A52E",children:"--"}):(0,i.jsxs)(c.Z,{direction:"row",justifyContent:"center",alignItems:"center",sx:{borderRadius:"4px",backgroundColor:u(n),p:t.spacing(.5,1)},children:[h(n),(0,i.jsxs)(l.Z,{fontWeight:700,fontSize:14,color:j(n),children:[Number((0,d.uf)(n,x.YN)).toFixed(2),"%"]})]})},h=e=>e>0?(0,i.jsx)(s.Z,{sx:{color:j(e),fontSize:20}}):e<0?(0,i.jsx)(r.Z,{sx:{color:j(e),fontSize:20}}):(0,i.jsx)(i.Fragment,{}),j=e=>e>0?"#27AE60":e<0?"#E85151":"#D7A52E",u=e=>e>0?"#E9F7EF":e<0?"#FFEEEE":"#FDF8EB"},45540:function(e,n,t){"use strict";t.d(n,{Ti:function(){return b},Wx:function(){return p},YW:function(){return Z},bi:function(){return g}});var i=t(85893),r=t(78066),s=t(76172),o=t(48317),l=t(91290),c=t(90948),x=t(53252),d=t(15861),a=t(27110),h=t(2734),j=t(80822),u=t(93946);let g=(0,c.ZP)(x.Z)(e=>{let{theme:n}=e;return{textAlign:"center",borderBottom:"1px solid #E8EAEE",padding:n.spacing(2,1)}}),p=(0,c.ZP)(d.Z)({fontWeight:700,fontSize:14,color:"#6B83B9"}),b=(0,c.ZP)(x.Z)(e=>{let{theme:n}=e;return{textAlign:"center",borderBottom:"1px solid #E8EAEE",padding:n.spacing(2,1)}}),Z=e=>{let{count:n,page:t,handleChangePage:r,colSpan:s}=e;return(0,i.jsx)(a.Z,{colSpan:s,count:n,rowsPerPage:10,rowsPerPageOptions:[],page:t,onPageChange:(e,n)=>r(n),ActionsComponent:f})};function f(e){let n=(0,h.Z)(),{count:t,page:c,rowsPerPage:x,onPageChange:d}=e,a=e=>{d(e,0)},g=e=>{d(e,c-1)},p=e=>{d(e,c+1)},b=e=>{d(e,Math.max(0,Math.ceil(t/x)-1))};return(0,i.jsxs)(j.Z,{sx:{flexShrink:0},children:[(0,i.jsx)(u.Z,{onClick:a,disabled:0===c,"aria-label":"first page",children:"rtl"===n.direction?(0,i.jsx)(l.Z,{}):(0,i.jsx)(r.Z,{})}),(0,i.jsx)(u.Z,{onClick:g,disabled:0===c,"aria-label":"previous page",children:"rtl"===n.direction?(0,i.jsx)(o.Z,{}):(0,i.jsx)(s.Z,{})}),(0,i.jsx)(u.Z,{onClick:p,disabled:c>=Math.ceil(t/x)-1,"aria-label":"next page",children:"rtl"===n.direction?(0,i.jsx)(s.Z,{}):(0,i.jsx)(o.Z,{})}),(0,i.jsx)(u.Z,{onClick:b,disabled:c>=Math.ceil(t/x)-1,"aria-label":"last page",children:"rtl"===n.direction?(0,i.jsx)(r.Z,{}):(0,i.jsx)(l.Z,{})})]})}},26771:function(e,n,t){"use strict";t.d(n,{n:function(){return g}});var i=t(85893),r=t(73313),s=t(40044),o=t(15861);let l=e=>{let{category:n,onChangeCategory:t,options:l}=e;return(0,i.jsx)(r.Z,{value:n,onChange:t,sx:{backgroundColor:"#F5F7FB",display:{xs:"none",sm:"none",md:"block"},"& .MuiTabs-indicator":{display:"none"}},children:l.map(e=>(0,i.jsx)(s.Z,{value:e.option,label:(0,i.jsx)(o.Z,{fontWeight:e.option===n?700:400,fontSize:18,color:"#224696",sx:{textTransform:"none"},children:e.label})},e.label))})};var c=t(90948),x=t(591),d=t(47120);let a=(0,c.ZP)(x.Z)(e=>{let{theme:n}=e;return{margin:n.spacing(3,2),"& .MuiToggleButtonGroup-grouped":{border:0,"&.Mui-disabled":{border:0},"&.Mui-selected":{backgroundColor:"#224696","&:hover":{backgroundColor:"#224696"}},"&:not(:first-of-type)":{borderRadius:n.spacing(.5)},"&:first-of-type":{borderRadius:n.spacing(.5)}}}}),h=(0,c.ZP)(d.Z)(e=>{let{theme:n}=e;return{padding:n.spacing(1,2),marginRight:n.spacing(2),borderRadius:"4px","&:hover":{backgroundColor:"#224696","& .MuiTypography-root":{color:"#FFFFFF"}}}}),j=(0,c.ZP)(o.Z,{shouldForwardProp:e=>"isSelected"!==e})(e=>{let{isSelected:n}=e;return{textTransform:"none",fontSize:16,fontWeight:n?700:600,color:n?"#FFFFFF":"#6B6B6B"}}),u=e=>{let{category:n,onChangeCategory:t,options:r}=e;
1return(0,i.jsx)(a,{exclusive:!0,value:n,onChange:t,sx:{display:{xs:"block",sm:"block",md:"none"}},children:r.map((e,t)=>(0,i.jsx)(h,{value:e.option,"aria-label":e.label,children:(0,i.jsx)(j,{isSelected:e.option===n,children:e.label})},t))})},g=e=>{let{category:n,options:t,onChangeCategoryOnDesktop:r,onChangeCategoryOnMobile:s}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l,{category:n,onChangeCategory:r,options:t}),(0,i.jsx)(u,{category:n,onChangeCategory:s,options:t})]})}},69429:function(e,n,t){"use strict";t.d(n,{Z:function(){return C}});var i=t(85893),r=t(90948),s=t(80822),o=t(2734),l=t(15861),c=t(51233),x=t(5152),d=t.n(x),a=t(11163),h=t(67294),j=t(21816),u=t(56137),g=t(67030),p=t(76755),b=t(42496),Z=t(64458),f=t(72329),m=t(36470);let k=d()(()=>Promise.resolve().then(t.bind(t,36470)).then(e=>e.MainHeader),{loadableGenerated:{webpack:()=>[36470]}}),y=d()(()=>Promise.all([t.e(4564),t.e(7918),t.e(1535),t.e(6693),t.e(6720),t.e(7022)]).then(t.bind(t,67022)).then(e=>e.AppHeader),{loadableGenerated:{webpack:()=>[67022]}}),S=(0,r.ZP)(s.Z)({position:"absolute",width:"100%",height:"100%",background:"rgba(255, 255, 255, 0.4)",backdropFilter:"blur(15px)",zIndex:2,display:"flex",alignItems:"center",justifyContent:"center"}),P=(0,r.ZP)("main")(e=>{let{theme:n}=e;return{overflow:"auto",width:"100%",marginTop:"".concat(m.MAIN_DESKTOP_HEADER_HEIGHT,"px"),[n.breakpoints.down("md")]:{marginTop:"".concat(m.MAIN_DESKTOP_HEADER_HEIGHT,"px")}}});function C(e){let{children:n,sx:t,hasDownloadingApp:r=!1,hasFooter:x=!1,keepAppHeaderForGuest:d=!1}=e,{user:m}=(0,b.a)(),C=(0,o.Z)(),F=(0,a.useRouter)(),{modalLoginRegister:v}=(0,Z.Pb)(),E=F.pathname.startsWith("/app"),[T,N]=(0,h.useState)(!1),[W,w]=(0,h.useState)("login"),B=()=>{N(!0),w("login")},_=()=>{N(!0),w("register")};return(0,i.jsxs)(s.Z,{sx:{position:"relative"},children:[(0,i.jsx)(S,{sx:{display:v[g.Od.LOGINREGISTER]?"flex":"none"},children:T?(0,i.jsx)(j.vF,{tabName:W}):(0,i.jsxs)(s.Z,{sx:{textAlign:"center",fontWeight:"700"},children:["Bạn cần",(0,i.jsx)(l.Z,{sx:{color:"#2491DD",margin:"0px 5px",fontWeight:"bolder",":hover":{textDecoration:"underline"}},onClick:()=>B(),children:"đăng nhập"}),"hoặc",(0,i.jsx)(l.Z,{sx:{color:"#2491DD",margin:"0px 5px",fontWeight:"bolder",":hover":{textDecoration:"underline"}},onClick:()=>_(),children:"đăng k\xfd"}),(0,i.jsx)("br",{}),"t\xe0i khoản Anfin để sử dụng t\xednh năng n\xe0y."]})}),(0,i.jsxs)(c.Z,{sx:{minHeight:1,display:"flex",width:"100%",pl:{md:E?"".concat(u.y,"px"):0}},children:[m||d?(0,i.jsx)(y,{}):(0,i.jsx)(k,{}),(0,i.jsxs)(P,{sx:t,children:[(0,i.jsx)(s.Z,{sx:{p:{xs:C.spacing(0,2,1,2),sm:C.spacing(0,2,1,3)}},children:n}),(0,i.jsxs)("footer",{children:[r&&(0,i.jsx)(p.default,{}),x&&(0,i.jsx)(f.MainFooter,{})]})]})]})]})}},28074:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return J}});var i=t(85893),r=t(67294),s=t(84970),o=t(5666),l=t(65141),c=t(54336),x=t(90948),d=t(15861),a=t(72882),h=t(7906),j=t(53184),u=t(53816),g=t(53252),p=t(295),b=t(2734),Z=t(51233),f=t(69417),m=t(7528),k=t(62912),y=t(45540),S=t(15017),P=t(67030),C=t(36075),F=t(42496),v=t(64458),E=t(49635);let T=(0,x.ZP)(d.Z)({fontWeight:510,fontSize:16,color:"#21273B"}),N=e=>{let{stockBalances:n,ownedStockPrices:t}=e;return(0,i.jsx)(a.Z,{children:(0,i.jsxs)(h.Z,{sx:{backgroundColor:"#FFFFFF"},children:[(0,i.jsx)(j.Z,{children:(0,i.jsxs)(u.Z,{children:[(0,i.jsx)(g.Z,{children:(0,i.jsx)(y.Wx,{children:"T\xe0i sản"})}),(0,i.jsx)(g.Z,{}),(0,i.jsx)(y.bi,{children:(0,i.jsx)(y.Wx,{children:"L\xe3i/lỗ"})}),(0,i.jsx)(y.bi,{children:(0,i.jsx)(y.Wx,{children:"Tổng l\xe3i/lỗ"})}),(0,i.jsx)(y.bi,{children:(0,i.jsx)(y.Wx,{children:"Gi\xe1 vốn TB"})}),(0,i.jsx)(y.bi,{children:(0,i.jsx)(y.Wx,{children:"Gi\xe1 thị trường"})}),(0,i.jsx)(y.bi,{children:(0,i.jsx)(y.Wx,{children:"Vốn ban đầu"})}),(0,i.jsx)(y.bi,{children:(0,i.jsx)(y.Wx,{children:"Gi\xe1 trị hiện tại"})}),(0,i.jsx)(y.bi,{children:(0,i.jsx)(y.Wx,{children:"Số lượng CP"})}),(0,i.jsx)(y.bi,{children:(0,i.jsx)(y.Wx,{children:"SLCP khả dụng"})}),(0,i.jsx)(y.bi,{children:(0,i.jsx)(y.Wx,{children:"SLCP chờ về"})})]})}),(0,i.jsx)(p.Z,{children:n.map((e,n)=>(0,i.jsx)(W,{balance:e,ownedStockPrices:t},n))})]})})},W=e=>{let{balance:n,ownedStockPrices:t}=e,{user:r}=(0,F.a)(),s=(0,b.Z)(),{changeCanOpenDrawer:o}=(0,v.Pb)(),l=e=>{o(P.Od.TRADING,!0,{initTicker:e}),(0,C.Z)("web_portfolio_trade_button",null==r?void 0:r.userFS.uid,e)},x=t[n.stockSymbol]?Math.floor(n.quantity*t[n.stockSymbol]):0;return(0,i.jsxs)(u.Z,{children:[(0,i.jsx)(g.Z,{children:(0,i.jsxs)(Z.Z,{direction:"row",spacing:1,children:[(0,i.jsx)(m.Z,{symbol:n.stockSymbol,width:24,height:24}),(0,i.jsx)(d.Z,{fontWeight:700,fontSize:16,children:n.stockSymbol})]})}),(0,i.jsx)(g.Z,{children:(0,i.jsx)(f.Z,{disableElevation:!0,variant:"contained",sx:{backgroundColor:"#F3F7F9",borderRadius:"8px",display:"flex","&:hover":{backgroundColor:"#F3F7F9"},p:s.spacing(.5,1)},startIcon:(0,i.jsx)(c.Z,{fontSize:"small",sx:{color:"#224696"}}),onClick:()=>l(n.stockSymbol),children:(0,i.jsx)(d.Z,{fontWeight:510,fontSize:14,color:"#224696",sx:{textTransform:"none"},children:"Giao dịch"})})}),(0,i.jsx)(y.Ti,{children:(0,i.jsx)(k.Z,{percentage:x?(x-n.totalCost)/n.totalCost*100:S.YN})}),(0,i.jsx)(y.Ti,{children:(0,i.jsx)(T,{children:(0,E.uf)(x-n.totalCost,S.YN)})}),(0,i.jsx)(y.Ti,{children:(0,i.jsx)(T,{children:(0,E.uf)(n.avgCost,S.YN)})}),(0,i.jsx)(y.Ti,{children:(0,i.jsx)(T,{children:(0,E.uf)(t[n.stockSymbol],S.YN)})}),(0,i.jsx)(y.Ti,{children:(0,i.jsx)(T,{children:(0,E.uf)(n.totalCost,S.YN)})}),(0,i.jsx)(y.Ti,{children:(0,i.jsx)(T,{children:(0,E.uf)(x,S.YN)})}),(0,i.jsx)(y.Ti,{children:(0,i.jsx)(T,{children:(0,E.uf)(n.quantity,S.YN)})}),(0,i.jsx)(y.Ti,{children:(0,i.jsx)(T,{children:(0,E.uf)(n.avQty,S.YN)})}),(0,i.jsx)(y.Ti,{children:(0,i.jsx)(T,{children:(0,E.uf)(n.quantity-n.avQty,S.YN)})})]})};var w=t(86886),B=t(67358),_=t(38895),Y=t(22797);let G=(0,x.ZP)(d.Z)({fontWeight:590,fontSize:14,color:"#657188",textAlign:"center"}),z=(0,x.ZP)(d.Z)({fontWeight:590,fontSize:15,color:"#21273B"}
1),A=(0,x.ZP)(w.ZP)({display:"flex",alignItems:"center",justifyContent:"center"}),I=(0,x.ZP)(d.Z)({fontWeight:400,fontSize:13,color:"rgba(33, 39, 59, 0.7)"}),M=(0,x.ZP)(d.Z)({fontWeight:590,fontSize:15,color:"#21273B"}),D=(0,x.ZP)(B.Z)({borderRadius:"6px",boxShadow:"2px 2px 4px 2px rgba(107, 117, 133, 0.08)"}),R=(0,x.ZP)(w.ZP)(e=>{let{theme:n}=e;return{[n.breakpoints.down("md")]:{paddingBottom:"14%"}}}),O=e=>{let{stockBalances:n,ownedStockPrices:t}=e;return(0,i.jsxs)(R,{container:!0,sx:{backgroundColor:"#F5F7FB",px:2,pb:2},children:[(0,i.jsx)(A,{item:!0,xs:3,children:(0,i.jsx)(G,{children:"T\xe0i sản"})}),(0,i.jsx)(A,{item:!0,xs:3,children:(0,i.jsx)(G,{children:"Gi\xe1 vốn TB"})}),(0,i.jsx)(A,{item:!0,xs:3,children:(0,i.jsx)(G,{children:"Thị trường"})}),(0,i.jsx)(A,{item:!0,xs:3,children:(0,i.jsx)(G,{align:"center",children:"L\xe3i/lỗ"})}),n.map((e,n)=>(0,i.jsx)(H,{balance:e,ownedStockPrices:t},n))]})},H=e=>{let{balance:n,ownedStockPrices:t}=e,r=t[n.stockSymbol]?Math.floor(n.quantity*t[n.stockSymbol]):0;return(0,i.jsx)(w.ZP,{item:!0,xs:12,sx:{my:1},children:(0,i.jsxs)(D,{disableGutters:!0,children:[(0,i.jsxs)(_.Z,{sx:{borderBottom:"1px solid #F0F0F0"},children:[(0,i.jsx)(w.ZP,{item:!0,xs:3,sx:{display:"flex",alignItems:"center"},children:(0,i.jsxs)(Z.Z,{direction:"row",spacing:1,alignItems:"center",children:[(0,i.jsx)(m.Z,{symbol:n.stockSymbol,width:24,height:24}),(0,i.jsx)(d.Z,{fontWeight:700,fontSize:16,children:n.stockSymbol})]})}),(0,i.jsx)(A,{item:!0,xs:3,children:(0,i.jsx)(z,{children:(0,E.uf)(n.avgCost,S.YN)})}),(0,i.jsx)(A,{item:!0,xs:3,children:(0,i.jsx)(z,{children:(0,E.uf)(t[n.stockSymbol],S.YN)})}),(0,i.jsx)(w.ZP,{item:!0,xs:3,children:(0,i.jsx)(k.Z,{percentage:r?(r-n.totalCost)/n.totalCost*100:S.YN})})]}),(0,i.jsx)(Y.Z,{sx:{py:1},children:(0,i.jsxs)(w.ZP,{container:!0,spacing:1,children:[(0,i.jsx)(w.ZP,{item:!0,xs:6,children:(0,i.jsxs)(Z.Z,{children:[(0,i.jsx)(I,{children:"Vốn ban đầu"}),(0,i.jsx)(M,{children:(0,E.uf)(n.totalCost,S.YN)})]})}),(0,i.jsx)(w.ZP,{item:!0,xs:6,children:(0,i.jsxs)(Z.Z,{children:[(0,i.jsx)(I,{children:"Số lượng CP"}),(0,i.jsx)(M,{children:(0,E.uf)(n.quantity,S.YN)})]})}),(0,i.jsx)(w.ZP,{item:!0,xs:6,children:(0,i.jsxs)(Z.Z,{children:[(0,i.jsx)(I,{children:"Gi\xe1 trị hiện tại"}),(0,i.jsx)(M,{children:(0,E.uf)(n.quantity*t[n.stockSymbol],S.YN)})]})}),(0,i.jsx)(w.ZP,{item:!0,xs:6,children:(0,i.jsxs)(Z.Z,{children:[(0,i.jsx)(I,{children:"SLCP khả dụng"}),(0,i.jsx)(M,{children:(0,E.uf)(n.avQty,S.YN)})]})}),(0,i.jsx)(w.ZP,{item:!0,xs:6,children:(0,i.jsxs)(Z.Z,{children:[(0,i.jsx)(I,{children:"Tổng l\xe3i/lỗ"}),(0,i.jsx)(M,{children:(0,E.uf)(n.quantity*t[n.stockSymbol]-n.totalCost,S.YN)})]})}),(0,i.jsx)(w.ZP,{item:!0,xs:6,children:(0,i.jsxs)(Z.Z,{children:[(0,i.jsx)(I,{children:"SLCP chờ về"}),(0,i.jsx)(M,{children:(0,E.uf)(n.quantity-n.avQty,S.YN)})]})})]})})]})})},L=e=>{let{stockBalances:n}=e,t=(0,l.Z)(),r=n?n.map(e=>e.stockSymbol):[],s=(0,o.h1)(r),c={};return(n&&n.forEach(e=>{c[e.stockSymbol]=s[e.stockSymbol]?s[e.stockSymbol].matchedPrice:0}),n)?t?(0,i.jsx)(N,{stockBalances:n,ownedStockPrices:c}):(0,i.jsx)(O,{stockBalances:n,ownedStockPrices:c}):(0,i.jsx)(i.Fragment,{})};var q=t(26771),Q=t(12205),K=t(69429),V=t(33767),X=t(92292);let $=()=>{var e;let n=(0,o.nG)(),[t,l]=(0,r.useState)(V.B.STOCK),{changeModalLoginRegister:c}=(0,v.Pb)(),{user:x}=(0,F.a)();(0,r.useEffect)(()=>{c(P.Od.LOGINREGISTER,!x)},[x]);let d=(e,n)=>{null!==n&&l(n)},a=n.filter(e=>e.stockInfo.type===t);return(0,i.jsxs)(K.Z,{sx:{backgroundColor:"#F5F7FB",height:{xs:"calc(100vh - 56px)",sm:"calc(100vh - 65px)"}},children:[(0,i.jsx)(q.n,{category:t,options:Q.$d,onChangeCategoryOnDesktop:d,onChangeCategoryOnMobile:d}),a.length?(0,i.jsx)(L,{stockBalances:a}):(0,i.jsx)(s.u,{msg:"Bạn chưa sở hữu ".concat(null===(e=Q.$d.find(e=>e.option===t))||void 0===e?void 0:e.label)})]})};$.getLayout=function(e){return(0,i.jsx)(X.P,{children:e})};var J=$}},function(e){e.O(0,[9774,4885,6779,3601,9043,4564,6951,321,7918,277,1535,4932,4347,9089,6693,7316,5675,2179,5191,8609,6720,4769,7358,2292,1816,2888,179],function(){return e(e.s=8851)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.