PageSourceSearch

https://musaffa.com/chunk-H5C3Z27K.js

js musaffa.com collected 2026-10-01 10:44:54 UTC 17,003 bytes, 1 lines download raw bytes

1import{a as it}from"./chunk-UFEOTD5P.js";import"./chunk-PWXSD3EV.js";import"./chunk-YFORCPWA.js";import"./chunk-ZNOUA343.js";import{a as Q}from"./chunk-LTMRHLBQ.js";import{a as tt}from"./chunk-IX2A7TOB.js";import"./chunk-NAZ4PF4A.js";import"./chunk-SGDTQMFD.js";import"./chunk-HHC5HONI.js";import"./chunk-MXCN3KER.js";import"./chunk-2E7VHFVZ.js";import"./chunk-RYEACL6S.js";import"./chunk-F2AP4GBC.js";import"./chunk-XKEGXYVQ.js";import"./chunk-HJT47KQS.js";import{b as Z}from"./chunk-AQ5U3F36.js";import"./chunk-XI5DGGJG.js";import{i as Y}from"./chunk-CCZ3LMBU.js";import"./chunk-NYIAP4V5.js";import"./chunk-WHU4XXSE.js";import"./chunk-T24IL6KT.js";import"./chunk-BG7GAKBZ.js";import"./chunk-CKJXIJEW.js";import"./chunk-YHD3BR2N.js";import"./chunk-4VQTCAIV.js";import"./chunk-3PRPTJWC.js";import"./chunk-LWZUGXUT.js";import"./chunk-A2MKP65J.js";import"./chunk-XW3NSGMD.js";import"./chunk-G4TFELEL.js";import{a as X}from"./chunk-D64IOGBB.js";import"./chunk-MZ2STWLI.js";import"./chunk-GIESURDE.js";import"./chunk-POB67RW2.js";import"./chunk-II5GPNB3.js";import"./chunk-ZECDOFAJ.js";import"./chunk-KYQEO6VJ.js";import"./chunk-YSH2LEMW.js";import"./chunk-44OM7VNA.js";import{a as K}from"./chunk-2LZT3LEG.js";import"./chunk-N6B7OEUW.js";import"./chunk-DQWB4FDF.js";import"./chunk-MG2LTBTI.js";import"./chunk-UETGTCDH.js";import"./chunk-QW2NOPLV.js";import"./chunk-OMW2IVBQ.js";import"./chunk-XLM57HOT.js";import{a as et}from"./chunk-7WMAZ4BZ.js";import"./chunk-PN5AYVQ6.js";import"./chunk-MEP7XRVN.js";import"./chunk-LBCANGR5.js";import"./chunk-KCEJCXJZ.js";import"./chunk-TT3S2UTA.js";import{g as q}from"./chunk-RTGIJOJ3.js";import"./chunk-N4VJFAAV.js";import"./chunk-RRMHS6G2.js";import"./chunk-BQVREACV.js";import"./chunk-WXLVEQ4T.js";import{e as U,g as N,h as G,i as J}from"./chunk-I335Z6VX.js";import"./chunk-YYKWFEMG.js";import"./chunk-D2N3WVHQ.js";import"./chunk-OP5LXOJA.js";import"./chunk-ARD6OICO.js";import{e as nt}from"./chunk-LLSQBFJI.js";import"./chunk-RH7YKMCI.js";import"./chunk-2P2IIG2U.js";import"./chunk-J3TYBNDU.js";import"./chunk-4QCSDQDN.js";import"./chunk-W3MH5BOT.js";import"./chunk-GUQT3FOM.js";import{Aa as T,Dc as B,Eb as a,Ec as R,Jc as j,Lb as c,N as O,Qc as F,S as k,Sc as g,Ub as E,de as V,e as x,ea as I,fa as p,fd as h,gd as b,hd as W,pc as C,rc as f,sb as D,t as P,tc as A,uc as z,vc as $,w as M,wc as _,wd as v,xc as r,ya as L,yc as o,za as H,zc as m}from"./chunk-H5RMQNTW.js";import"./chunk-EU2KAMEK.js";import{a as S,b as w}from"./chunk-YNC7RVHT.js";var st=i=>["/trending-halal-stocks/",i],ct=i=>({country:i});function lt(i,u){if(i&1){let t=j();r(0,"button",10),F("click",function(){L(t);let n=g();return H(n.openCountriesPopup())}),m(1,"img",11),r(2,"span",12),h(3),o(),T(),r(4,"svg",13),m(5,"path",14),o()()}if(i&2){let t=g();a(),_("src","/assets/flags/1x1/"+t.selectedCountry.toLowerCase()+".svg",D),a(2),b(t.selectedCountry)}}function dt(i,u){if(i&1&&(r(0,"li")(1,"a",15)(2,"span"),h(3),o()()()),i&2){let t=u.$implicit,e=g();a(),_("routerLink",v(3,st,t.id))("queryParams",v(5,ct,e.selectedCountry)),a(2),b(t.title)}}function pt(i,u){if(i&1&&(r(0,"article",7)(1,"h2",16),h(2),o(),r(3,"p",17),h(4),o()()),i&2){let t=g();a(2),b(t.currentHalalStock?.title),a(2),W(" ",t.currentHalalStock?.description," ")}}function ht(i,u){if(i&1&&(r(0,"div",8),m(1,"app-dynamic-table",18),o()),i&2){let t=g();a(),_("columns",t.tableColumns)("data",t.trendingHalalStocks)("dataCount",t.totalStocksCount)("page",t.page)("isDataLoading",t.stocksLoading)("showResetButton",t.trueValue)("isSortingEnabled",t.trueValue)("sortColumn",t.sortColumn)("showCompliance",!0)("sortOrder",t.sortOrder)("type",t.dataType)("shouldShowCountAndActiveFilters",!1)("showCta",!t.canReadTrendingStocks)}}function gt(i,u){i&1&&(r(0,"section",9)(1,"p",19),h(2,"No Data Available"),o()())}var ut=["id","name","logo","sharia_compliance","ranking_v2","currency","currentPrice","priceChange1DPercent","52WeekHigh","52WeekLow"],Lt=(()=>{class i{constructor(t,e,n,s,l,d,y,ot,at,rt){this.router=t,this.route=e,this.countryService=n,this.stockFilterService=s,this.halalCollectionSerive=l,this.cdr=d,this.auth=y,this.permissionStore=ot,this.accessControlService=at,this.seoService=rt,this.destroy$=new x,this.trendingHalalStockLinks=[{id:"most_active",title:"Most Active",description:"Stay on top of the market by knowing which stocks are being actively traded today. Monitor the stocks that are seeing the highest trading volumes and gain insights into market trends."},{id:"most_popular",title:"Most Popular",description:"Explore the stocks that have gained significant attention and popularity among investors. Find out what makes these stocks appealing and stay informed about their market trends."},{id:"top_gainers",title:"Top Gainers",description:"Discover the stocks that have shown the highest price appreciation in the market. Identify potential investment opportunities and stay informed about the factors driving their growth."},{id:"top_losers",title:"Top Losers",description:"Stay informed about the stocks that have experienced the most significant price declines. Analyze the reasons behind their poor performance and make informed decisions about your investments."},{id:"52_week_high",title:"52 Week High",description:"Strike while the iron is hot with investments at the 52 week high."}
1,{id:"52_week_low",title:"52 Week Low",description:"Keep a watchful eye on investments at the 52 week low and grab a bargain before they bounce back."}],this.currentPathId="",this.selectedCountry="US",this.stocksLoading=!0,this.trendingHalalStocks=[],this.isDataAvailable=!0,this.areBucketsVisible=!1,this.dataType="stock",this.usdMarketCap="usdMarketCap",this.desc="desc",this.trueValue=!0,this.sortColumn=this.usdMarketCap,this.sortOrder=this.desc,this.totalStocksCount=0,this.page=1,this.pageSize=15,this.bucketIdMap=new Map,this.isLoggedIn=!1,this.canReadTrendingStocks=!1,this.canReadStockComplianceRating=!1,this.tableColumns=[{header:"Compliance",key:"sharia_compliance",type:"undefined",sortable:!1},{header:"Halal Rating",key:"ranking_v2",type:"undefined",sortable:!0},{header:"Price",key:"currentPrice",type:"amount",sortable:!0},{header:"1 Day Change",key:"priceChange1DPercent",type:"percent",showPositiveNegative:!0,sortable:!0},{header:"52-Week High",key:"52WeekHigh",type:"amount",sortable:!0},{header:"52-Week Low",key:"52WeekLow",type:"amount",sortable:!0}],this.pool=[]}ngOnInit(){this.getBucketId().then(()=>{let t=this.countryService.selectedCountry$.pipe(k(),p(this.destroy$)),e=this.route.params.pipe(k((s,l)=>JSON.stringify(s)===JSON.stringify(l)),p(this.destroy$)),n=this.route.queryParams.pipe(k((s,l)=>JSON.stringify(s)===JSON.stringify(l)),p(this.destroy$));M([t,e,n]).pipe(O(50),I(async([s,l,d])=>{this.currentPathId=l.id,this.currentHalalStock=this.trendingHalalStockLinks.find(y=>y.id===this.currentPathId),this.currentPathId&&this.seoService.updateCanonicalUrl(`https://musaffa.com/trending-halal-stocks/${this.currentPathId}/`),this.currentHalalStock&&(this.seoService.updateTitle(`Halal ${this.currentHalalStock.title} Stocks | Musaffa`),this.seoService.updateDescription(this.currentHalalStock.description)),this.handleCountrySelection(s,d),this.sortColumn=d.sortBy??this.usdMarketCap,this.sortOrder=d.sortOrder??this.desc,this.page=Number(d.page)||1,this.trendingHalalStocks=[],this.isDataAvailable=!0,this.stocksLoading=!0,this.cdr.detectChanges(),await this.get
1StockCollectionData(this.currentPathId)}),p(this.destroy$)).subscribe()}),this.permissionStore.select(({permissions:t})=>t.permissions).pipe(p(this.destroy$)).subscribe(t=>{this.isLoggedIn=!!this.auth.getUserId(),this.canReadTrendingStocks=t.trending_halal_stocks,this.canReadStockComplianceRating=t.stock_halal_rating})}handleCountrySelection(t,e){e.country?(this.selectedCountry=e.country,t.countryCode!==this.selectedCountry&&this.countryService.setSelectedCountryByCode(this.selectedCountry)):(this.selectedCountry=t.countryCode,this.updateUrlWithCountry(this.selectedCountry))}updateUrlWithCountry(t){this.router.navigate([],{relativeTo:this.route,queryParams:{country:t},queryParamsHandling:"merge",replaceUrl:!0})}async getBucketId(){try{let t=await this.halalCollectionSerive.getSymbolsByBucketId(["id","bucket_name"]);this.pool=t.hits.map(e=>e.document),this.bucketIdMap.clear(),this.pool.forEach(e=>{this.bucketIdMap.set(e.bucket_name,e.id)}),this.updateStockLinks()}catch(t){console.error("Failed to get bucket IDs:",t)}}updateStockLinks(){let t=new Set(this.trendingHalalStockLinks.map(e=>e.title.toLowerCase()));this.pool.forEach(e=>{let n=e.bucket_name;this.findMatchingLink(n)||this.trendingHalalStockLinks.push({id:this.slugify(n),title:n,description:`Top performing halal stocks in the ${n} category.`})})}findMatchingLink(t){let e=t.toLowerCase().replace(/[^a-z0-9]/g,"");return this.trendingHalalStockLinks.find(n=>n.title.toLowerCase().replace(/[^a-z0-9]/g,"").includes(e)||e.includes(n.title.toLowerCase().replace(/[^a-z0-9]/g,"")))}slugify(t){return t.toLowerCase().replace(/ /g,"_").replace(/[^\w-]+/g,"")}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}openCountriesPopup(){this.stockFilterService.openCountriesPopup(),this.countryService.selectedCountry$.pipe(p(this.destroy$)).subscribe(t=>{this.updateUrlWithCountry(t.countryCode)})}async getBucketSymbols(t){let e=[];try{let n=await P(this.halalCollectionSerive.getBucketCollectionSymbols(this.selectedCountry,t,this.page,e,this.pageSize,this.sortColumn,this.sortOrder==="desc"?"desc":"asc",ut)),s=n.itemsArray||[];this.totalStocksCount=n.totalCount,this.isDataAvailable=this.totalStocksCount>0,this.trendingHalalStocks=s.map((l,d)=>w(S({},l),{ticker:l.id,locked:!this.canReadTrendingStocks&&!(this.page===1&&d<3)})),this.cdr.detectChanges()}catch(n){console.error("Failed to fetch symbols",n),this.isDataAvailable=!1}}async getStockCollectionData(t){try{this.stocksLoading=!0;let e;switch(t){case"most_active":e=this.bucketIdMap.get("Most Active");break;case"most_popular":e=this.bucketIdMap.get("Most Popular");break;case"top_gainers":e=this.bucketIdMap.get("Top Gainers");break;case"top_losers":e=this.bucketIdMap.get("Top Losers");break;case"52_week_high":e=this.bucketIdMap.get("52 Week High");break;case"52_week_low":e=this.bucketIdMap.get("52 Week Low");break}if(!e){let n=this.pool.find(s=>this.slugify(s.bucket_name)===t);n&&(e=n.id,this.currentHalalStock||(this.currentHalalStock={id:t,title:n.bucket_name,description:`Explored focused halal stocks in the ${n.bucket_name} category.`}))}return e?await this.getBucketSymbols(e):(console.warn(`No collectionId found for tabId: ${t}`),this.isDataAvailable=!1,[])}catch(e){return console.error(e),this.isDataAvailable=!1,[]}finally{this.stocksLoading=!1}}toggleBucketsVisibility(){this.areBucketsVisible=!this.areBucketsVisible}openCountriesyPopup(){this.countryService.openFilterByCountriesPopup()}getCurrentIdDescription(t){return this.trendingHalalStockLinks.find(e=>e.id===t)}static{this.\u0275fac=function(e){return new(e||i)(c(N),c(U),c(X),c(Y),c(Q),c(V),c(nt),c(q),c(K),c(et))}}static{this.\u0275cmp=E({type:i,selectors:[["app-trending-halal-stocks-page"]],decls:15,vars:3,consts:[[1,"bg-white","py-4","py-lg-5"],[1,"container"],[1,"d-flex","align-items-start","mb-3","mb-lg-4","justify-content-between"],[1,"main-heading"],["type","button",1,"btn","border","d-flex","align-items-center","shadow-none","gap-1","gap-lg-2","rounded-pill","country-filter-btn"],[1,"pb-4"],[1,"stock__listing"],[1,"disclaimer-card"],[1,"min-width-zero","table_section","container"],[1,"no-data-section","d-flex","align-items-center","justify-content-center"],["type","button",1,"btn","border","d-flex","align-items-center","shadow-none","gap-1","gap-lg-2","rounded-pill","country-filter-btn",3,"click"],["alt","","width","20px","height","20px",1,"bg-light","border","rounded-circle",3,"src"],[1,"fw-500"],["height","10px","width","10px","viewBox","0 0 512 512","xmlns","http://www.w3.org/2000/svg",1,"chevron-svg","flex-shrink-0"],["fill","currentColor","d","M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"],["routerLinkActive","active",1,"btn","tab-button","fw-
1500","shadow-none",3,"routerLink","queryParams"],[1,"fw-600"],[1,"mb-0"],[3,"columns","data","dataCount","page","isDataLoading","showResetButton","isSortingEnabled","sortColumn","showCompliance","sortOrder","type","shouldShowCountAndActiveFilters","showCta"],[1,"mb-0","fw-600"]],template:function(e,n){e&1&&(r(0,"main",0)(1,"header",1)(2,"div",2)(3,"h1",3),h(4," Trending Halal Stocks "),C(5,lt,6,2,"button",4),o(),m(6,"app-share-links-popup"),o(),r(7,"div",5),B(8),r(9,"ul",6),z(10,dt,4,7,"li",null,A),o(),R(),o(),C(12,pt,5,2,"article",7),o(),C(13,ht,2,13,"div",8)(14,gt,3,0,"section",9),o()),e&2&&(a(5),f(n.selectedCountry?5:-1),a(5),$(n.trendingHalalStockLinks),a(2),f(n.currentHalalStock?12:-1),a(),f(n.isDataAvailable?13:14))},dependencies:[it,J,G,tt,Z],styles:['.main-heading[_ngcontent-%COMP%]{display:flex;align-items:center;gap:25px}.table_section[_ngcontent-%COMP%]{padding:48px}.unlock-btn-container[_ngcontent-%COMP%]{height:50px;display:flex;align-items:center;justify-content:center;border-bottom:1px solid #f1f1f1}.disclaimer-card[_ngcontent-%COMP%]{background-color:#f4f4f4;border-radius:.5rem;padding:1rem}@media(min-width:992px){.disclaimer-card[_ngcontent-%COMP%]{padding:1.25rem}}.disclaimer-card[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{color:#212529;font-size:clamp(1.125rem,1.037rem + .3756vw,1.375rem);margin-bottom:.5rem}.disclaimer-card[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:#434b53;font-size:clamp(.875rem,.831rem + .1878vw,1rem);line-height:1.4}nav[_ngcontent-%COMP%]   .nav-ul[_ngcontent-%COMP%]{position:relative;display:flex;overflow:auto;scroll-snap-type:x mandatory;width:100%;border-bottom:1px solid #D7E0EC;scrollbar-width:none;-ms-overflow-style:none;z-index:2}@media(min-width:768px){nav[_ngcontent-%COMP%]   .nav-ul[_ngcontent-%COMP%]{gap:1rem}}@media(min-width:992px){nav[_ngcontent-%COMP%]   .nav-ul[_ngcontent-%COMP%]{border-top:0;gap:1rem;box-shadow:none}}nav[_ngcontent-%COMP%]   .nav-ul[_ngcontent-%COMP%]::-webkit-scrollbar{width:0;height:0}nav[_ngcontent-%COMP%]   .nav-ul[_ngcontent-%COMP%]   .tab-button[_ngcontent-%COMP%]{position:relative;background-color:transparent;border-radius:0;line-height:1;color:#343434;padding:.875rem 1rem;z-index:5;font-size:.875rem}@media(min-width:768px){nav[_ngcontent-%COMP%]   .nav-ul[_ngcontent-%COMP%]   .tab-button[_ngcontent-%COMP%]{font-size:1rem;padding:1rem 1.5rem}}nav[_ngcontent-%COMP%]   .nav-ul[_ngcontent-%COMP%]   .tab-button.active[_ngcontent-%COMP%]{background-image:linear-gradient(90deg,#2aa4be,#1dae50);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}nav[_ngcontent-%COMP%]   .nav-ul[_ngcontent-%COMP%]   .tab-button.active[_ngcontent-%COMP%]:before{content:"";position:absolute;width:100%;height:2px;left:0;bottom:-1px;background-image:linear-gradient(90deg,#2aa4be,#1dae50)}.stock__listing[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-start;gap:16px;flex-wrap:wrap;list-style:none;padding:0;margin-top:0}.stock__listing[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{list-style-type:none;margin-top:10px}.stock__listing[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{display:flex;align-items:center;padding:10px 20px;gap:12px;background:#f4f4f4;color:#162544;font-size:15px;font-weight:600;text-decoration:none;border-radius:30px;box-shadow:0 4px 20px #0000001a}.stock__listing[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]   .stock__icon[_ngcontent-%COMP%]{width:42px;height:42px;background:#fff;border-radius:50%;display:flex;align-items:center;justify-content:center}.stock__listing[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]   .stock__icon[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:24px;height:24px}.stock__listing[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   a.active[_ngcontent-%COMP%]{background:#162544;color:#fff}@media(min-width:1200px){.stock__listing[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{font-size:18px}}.no-data-section[_ngcontent-%COMP%]{min-height:calc(100vh - 6rem)}@media(min-width:992px){.no-data-section[_ngcontent-%COMP%]{min-height:calc(100vh - 12.5rem)}}.no-data-section[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:1rem}@media(min-width:992px){.no-data-section[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:2rem}}.resp-slider-item[_ngcontent-%COMP%]{border:none!important}@media(max-width:767px){.stock__listing[_ngcontent-%COMP%]{flex-wrap:nowrap;overflow-x:auto}.stock__listing[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{white-space:nowrap;font-size:14px!important}.stock__listing[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.country-filter-btn[_ngcontent-%COMP%]{min-width:80px;margin-bottom:22px;margin-right:12px}}'],changeDetection:1})}}return i})();export{Lt as TrendingHalalStocksPageComponent};

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.