PageSourceSearch

https://app.fxreplay.com/en-US/chunk-S5XP27NA.js

js fxreplay.com collected 2026-09-28 13:12:15 UTC 11,205 bytes, 2 lines download raw bytes

1import{a as ie}from"./chunk-IZF6TGDW.js";import{c as te,d as pe}from"./chunk-MAZBDLKU.js";import{Ia as me,ea as J,fa as ee}from"./chunk-7SCSY353.js";import"./chunk-DM2WJI7V.js";import"./chunk-MQKBZEUO.js";import{J as G,eb as he}from"./chunk-7B2ME75F.js";import"./chunk-GFPJAXF7.js";import"./chunk-XMBSURAR.js";import"./chunk-AKMSSEA4.js";import"./chunk-AB5PPLTZ.js";import"./chunk-UY5GCZTJ.js";import"./chunk-QJYAE2SI.js";import"./chunk-BOKSQJRP.js";import"./chunk-W37QGNJ6.js";import{B as ue,p as q,s as X,u as Z}from"./chunk-XHQE522X.js";import"./chunk-OBE6JURV.js";import"./chunk-XD2TRYBX.js";import"./chunk-6SNUEE23.js";import"./chunk-37NPXYUO.js";import"./chunk-XKFHS3Z7.js";import"./chunk-QE7WWD4G.js";import{Ba as d,Dc as c,Ec as o,Fc as x,Fd as g,Gb as m,Gd as K,Hd as y,Id as Y,J as j,Jc as F,M as D,Oa as A,Pa as L,Vc as V,Zb as z,aa as v,bd as Q,cd as W,ce as B,dc as _,dd as H,eb as $,f,h as E,id as u,jd as b,ma as S,qa as R,ra as ce,va as N,yc as T}from"./chunk-WAB4DCKC.js";import"./chunk-3V22ZI3B.js";import"./chunk-HIOGLTKM.js";import"./chunk-SOFZNMYS.js";import{a as w,b as C}from"./chunk-PXW2ANAV.js";ue();B();he();me();R();var ne=["1S","5S","10S","15S","30S","1","2","3","5","10","15","30","60","120","240"],I={name:"EURUSD",description:"Euro / US Dollar",type:"forex",session:"24x7",timezone:"Etc/UTC",exchange:"FX",listed_exchange:"FX",format:"price",pricescale:1e5,minmov:1,has_intraday:!0,has_seconds:!0,seconds_multipliers:["1","5","10","15","30"],supported_resolutions:ne,ticker:"EURUSD"},O=6e4,U=1e3;function re(r){let s=r;if(s.endsWith("S")){let e=parseInt(s,10);return isNaN(e)?U:e*U}let t=parseInt(s,10);return isNaN(t)?O:t*O}function se(r,s){let t=new Map;for(let e of r){let n=Math.floor(e.time/s)*s,i=t.get(n);i?(i.high=Math.max(i.high,e.high),i.low=Math.min(i.low,e.low),i.close=e.close,i.volume=(i.volume??0)+e.volume):t.set(n,{time:n,open:e.open,high:e.high,low:e.low,close:e.close,volume:e.volume})}return Array.from(t.values()).sort((e,n)=>e.time-n.time)}function ge(r){for(let s=1;s<r.length;s++)r[s]=C(w({},r[s]),{open:r[s-1].close});return r}var M=class{constructor(s){this.simService=s,this.subscriptions=new Map,this.partialBar=null,this.activeBucketMs=O,this.lastBucketClose=null}onReady(s){setTimeout(()=>s({supported_resolutions:ne,supports_time:!1}))}searchSymbols(s,t,e,n){n([{symbol:"EURUSD",description:I.description,exchange:I.exchange,ticker:"EURUSD",type:"forex"}])}resolveSymbol(s,t,e){setTimeout(()=>t(I))}getBars(s,t,e,n,i){let a=re(t),h=this.simService.currentBarMs,l=h>0?Math.min(e.to*1e3,h):e.to*1e3,p;if(e.countBack&&e.countBack>0){let P=Math.max(1,Math.ceil(a/U)),k=e.countBack*P,le=this.simService.getLastNBarsUpTo(k,l);p=se(le,a).slice(-e.countBack)}else{let P=e.from*1e3,k=this.simService.getBarsInRange(P,l);p=se(k,a)}if(p.length===0){n([],{noData:!0});return}n(ge(p),{noData:!1})}subscribeBars(s,t,e,n){this.partialBar=null,this.lastBucketClose=null,this.activeBucketMs=re(t);let i=this.simService.tick$.subscribe(a=>{let h=Math.floor(a.time/this.activeBucketMs)*this.activeBucketMs;!this.partialBar||this.partialBar.time!==h?(this.partialBar&&(this.lastBucketClose=this.partialBar.close),this.partialBar={time:h,open:this.lastBucketClose??a.open,high:a.high,low:a.low,close:a.close,volume:a.volume}):this.partialBar=C(w({},this.partialBar),{high:Math.max(this.partialBar.high,a.high),low:Math.min(this.partialBar.low,a.low),close:a.close,volume:(this.partialBar.volume??0)+a.volume}),e(this.partialBar)});this.subscriptions.set(n,i)}unsubscribeBars(s){this.subscriptions.get(s)?.unsubscribe(),this.subscriptions.delete(s)}destroy(){this.subscriptions.forEach(s=>s.unsubscribe()),this.subscriptions.clear()}};B();pe();R();ce();B();var be=1e3,fe=3,ae=300,oe=(()=>{class r{constructor(){this.azureFunctions=d(te),this.allBars=[],this.cursorIndex=-1,this.timerSub=null,this.tickSubject=ne
1w f,this.barsSubject=new E([]),this.isPlayingSubject=new E(!1),this.tick$=this.tickSubject.asObservable(),this.bars$=this.barsSubject.asObservable(),this.isPlaying$=this.isPlayingSubject.asObservable()}get currentBarMs(){return this.cursorIndex>=0?this.allBars[this.cursorIndex]?.time??0:0}get currentBar(){return this.cursorIndex>=0?this.allBars[this.cursorIndex]??null:null}get isLoaded(){return this.allBars.length>0}ngOnDestroy(){this.timerSub?.unsubscribe(),this.tickSubject.complete(),this.barsSubject.complete(),this.isPlayingSubject.complete()}loadAndStart(){if(this.barsSubject.value.length>0)return this.cursorIndex=Math.max(0,this.allBars.length-ae),this.startTimer(),this.barsSubject.pipe(v(i=>i.length>0));let t=Date.now(),n={pair:"EURUSD",timeframe:"1S",from:t-fe*24*60*60*1e3,to:t,currentDate:t,limit:6e3};return this.azureFunctions.getPairZipOpt(n).pipe(v()).subscribe({next:i=>{if(!i||i.length===0)return;let h=i.map(l=>({time:l[0],open:l[1],high:l[2],low:l[3],close:l[4],volume:l[5]??0})).filter(l=>!isNaN(l.time)&&l.time>0).sort((l,p)=>l.time-p.time);this.allBars.length=0,this.allBars.push(...h),this.barsSubject.next([...this.allBars]),this.cursorIndex=Math.max(0,this.allBars.length-ae),this.startTimer()},error:i=>{console.error("API request failed:",i)}}),this.barsSubject.pipe(v(i=>i.length>0))}play(){this.isPlayingSubject.value||this.startTimer()}pause(){this.timerSub?.unsubscribe(),this.timerSub=null,this.isPlayingSubject.next(!1)}getBarsInRange(t,e){if(this.allBars.length===0||this.cursorIndex<0)return[];let n=this.allBars[this.cursorIndex]?.time??0;return n===0?[]:this.allBars.filter(i=>i.time>=t&&i.time<=e&&i.time<=n)}getLastNBarsUpTo(t,e){if(this.allBars.length===0||this.cursorIndex<0)return[];let n=this.allBars[this.cursorIndex]?.time??0,i=Math.min(e,n);return this.allBars.filter(h=>h.time<=i).slice(-t)}startTimer(){this.timerSub?.unsubscribe(),this.isPlayingSubject.next(!0),this.timerSub=j(be).pipe(D(()=>this.cursorIndex<this.allBars.length-1)).subscribe(()=>{this.cursorIndex++;let t=this.allBars[this.cursorIndex];t&&this.tickSubject.next(t),this.cursorIndex>=this.allBars.length-1&&this.pause()})}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=N({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();B();var ve=["chartContainer"];function Se(r,s){r&1&&x(0,"i",7)}function _e(r,s){r&1&&x(0,"i",8)}function xe(r,s){if(r&1&&(c(0,"div",9)(1,"span",12),u(2,"Close"),o(),c(3,"span",13),u(4),g(5,"number"),o(),c(6,"span",12),u(7,"High"),o(),c(8,"span",14),u(9),g(10,"number"),o(),c(11,"span",12),u(12,"Low"),o(),c(13,"span",15),u(14),g(15,"number"),o(),c(16,"span",16),u(17),g(18,"date"),o()()),r&2){let t=s;m(4),b(y(5,4,t.close,"1.2-2")),m(5),b(y(10,7,t.high,"1.2-2")),m(5),b(y(15,10,t.low,"1.2-2")),m(3),b(Y(18,13,t.time,"MMM d, HH:mm","UTC"))}}function ye(r,s){r&1&&(c(0,"span",10),u(1,"Loading EURUSD 1-min data\u2026"),o())}var ze=(()=>{class r{constructor(){this.simService=d(oe),this.themeService=d(G),this.currentBar=$(null),this.isPlaying$=this.simService.isPlaying$,this.tvWidget=null,this.datafeed=null,this.broker=null,this.unsubscribe$=new f}ngAfterViewInit(){this.simService.tick$.pipe(S(this.unsubscribe$)).subscribe(t=>{this.currentBar.set(t),this.broker?.updatePrice(t.close)}),this.simService.loadAndStart().pipe(S(this.unsubscribe$)).subscribe(()=>{this.initChart()})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete(),this.simService.pause(),this.datafeed?.destroy(),this.tvWidget?.remove()}togglePlayback(){this.simService.isLoaded&&this.simService.currentBarMs>0&&this.simService.isPlaying$.pipe(S(this.unsubscribe$)).subscribe(t=>{t?this.simService.pause():this.simService.play()}).unsubscribe()}initChart(){this.datafeed=new M(this.simService);let t=this.themeService.loadThemeLocalStorage();J.then(()=>{this.tvWidget=new ee({container:this.chartContainerRef.nativeElement,library_path:"/assets/tradingView/charting_library/",datafeed:this.datafeed,symbol:"EURUSD",interval:"1",autosize:!0,theme:t?"dark":"light",locale:"en",disabled_features:["header_saveload","use_localstorage_for_settings"],enabled_features:["seconds_resolution"],broker_factory:e=>(this.broker=new ie(e),this.broker)})})}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275cmp=z({type:r,selectors:[["fxr-paper-trading-3-page"]],viewQuery:function(e,n){if(e&1&&Q(ve,7),e&2){let i;
1W(i=H())&&(n.chartContainerRef=i.first)}},decls:16,vars:4,consts:[["chartContainer",""],[1,"paper-trading-page"],[1,"price-header"],[1,"pair-label"],[1,"badge","badge--broker"],[1,"badge","badge--sim"],[1,"play-btn",3,"click"],[1,"pi","pi-pause"],[1,"pi","pi-play"],[1,"price-values"],[1,"connecting-label"],[1,"chart-container"],[1,"price-label"],[1,"close-value"],[1,"high-value"],[1,"low-value"],[1,"sim-time"]],template:function(e,n){if(e&1){let i=F();c(0,"div",1)(1,"div",2)(2,"span",3),u(3,"EURUSD"),o(),c(4,"span",4),u(5,"Broker API"),o(),c(6,"span",5),u(7,"Sim"),o(),c(8,"button",6),V("click",function(){return A(i),L(n.togglePlayback())}),_(9,Se,1,0,"i",7),g(10,"async"),_(11,_e,1,0,"i",8),o(),_(12,xe,19,17,"div",9)(13,ye,2,0,"span",10),o(),x(14,"div",11,0),o()}if(e&2){let i;m(9),T(K(10,2,n.isPlaying$)?9:11),m(3),T((i=n.currentBar())?12:13,i)}},dependencies:[q,Z,X],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%;width:100%}.paper-trading-page[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;width:100%}.price-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;padding:.75rem 1.25rem;border-bottom:1px solid var(--surface-border);background:var(--surface-card);flex-shrink:0}.pair-label[_ngcontent-%COMP%]{font-size:1rem;font-weight:600;color:var(--text-color);letter-spacing:.04em}.badge[_ngcontent-%COMP%]{font-size:.65rem;font-weight:600;padding:.15rem .45rem;border-radius:4px;background:var(--surface-border);color:#fff;text-transform:uppercase;letter-spacing:.06em}.badge--broker[_ngcontent-%COMP%]{background:var(--purple-500)}.badge--sim[_ngcontent-%COMP%]{background:var(--orange-500)}.price-values[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.price-label[_ngcontent-%COMP%]{font-size:.75rem;color:var(--text-color-secondary);text-transform:uppercase;letter-spacing:.05em}.close-value[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;font-variant-numeric:tabular-nums;color:var(--green-500)}.high-value[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;font-variant-numeric:tabular-nums;color:var(--green-400)}.low-value[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;font-variant-numeric:tabular-nums;color:var(--red-400)}.connecting-label[_ngcontent-%COMP%]{font-size:.85rem;color:var(--text-color-secondary);font-style:italic}
1.sim-time[_ngcontent-%COMP%]{font-size:.78rem;color:var(--text-color-secondary);font-variant-numeric:tabular-nums;margin-left:.25rem}.play-btn[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:none;border-radius:50%;background:var(--surface-ground);color:var(--text-color);cursor:pointer;transition:background .15s}.play-btn[_ngcontent-%COMP%]:hover{background:var(--surface-hover)}.chart-container[_ngcontent-%COMP%]{flex:1;min-height:0}"]})}}return r})();export{ze as PaperTrading3PageComponent};
2/**i18n:facfb7209ecb8085950926ad65c416b90384854654f0e600c7c5e8d8d04b2d2b*/

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.