ctscicmarketscom.ctwebcloud.com Open in urlscan Pro
2606:4700:20::681a:a97  Public Scan

URL: https://ctscicmarketscom.ctwebcloud.com/bundle/trader-root-0a76fd8c7b740fa8a602.js
Submission: On September 13 via manual from FR — Scanned from FR

Form analysis 0 forms found in the DOM

Text Content

(self.webpackChunkctrader_web=self.webpackChunkctrader_web||[]).push([[206],{55424:(e,t,s)=>{var i={"./barImage1.png":65465,"./barImage1_big.png":89846,"./barImage2.png":31480,"./barImage2_big.png":16540,"./barImage3.png":40640,"./barImage3_big.png":38720,"./barImage4.png":92934,"./barImage4_big.png":75091,"./barImage5.png":62789,"./barImage5_big.png":84048,"./barImage6.png":46637,"./barImage6_big.png":59659,"./lcg/barImage1.png":98255,"./lcg/barImage1_big.png":77538,"./lcg/barImage2.png":96818,"./lcg/barImage2_big.png":55419,"./lcg/barImage3.png":74608,"./lcg/barImage3_big.png":70496,"./lcg/barImage4.png":87919,"./lcg/barImage4_big.png":17389,"./lcg/barImage5.png":42643,"./lcg/barImage5_big.png":8428,"./lcg/barImage6.png":58012,"./lcg/barImage6_big.png":31201};function o(e){var t=n(e);return s(t)}function n(e){if(!s.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}o.keys=function(){return Object.keys(i)},o.resolve=n,e.exports=o,o.id=55424},81146:(e,t,s)=>{"use strict";s.r(t),s.d(t,{AppRoot:()=>aB});var i=s(85893),o=s(67294),n=s(69880),a=s(5977),r=s(75879),l=s.n(r),d=s(70378),c=s(8166),u=s(71383),h=s(51359),g=s(97959),p=s(33565);const b=l()([(0,u.$)(c.H).data.isLcg()],(e=>e?p.Uf:p.IR))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),v=l()([(0,u.$)(g.C).isMainMenuVisible(),(0,u.$)(g.C).mainMenuWidth(),b],((e,t,s)=>e?null!=t?t:s:p.ME))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var m=s(58852);const j=l()([(0,u.$)(c.H).data.isLcg(),(0,u.$)(c.H).data.ctNetUrl(),(0,u.$)(m.Z).copy.isEnabled(),(0,u.$)(g.C).isMainMenuVisible(),v],((e,t,s,i,o)=>({isLcg:e,ctNetUrl:t,isCopyEnabled:s,isMainMenuVisible:i,mainMenuWidth:o})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var x=s(4285),y=s(38562),S=s(89085),f=s(99436),O=s(75368),C=s(88046);function k(e){switch(e){case C.tQ.balanceIsEmptyAndHookIsActive:case C.tQ.balanceIsEmpty:case C.tQ.equityIsLowAndHookIsActive:case C.tQ.equityIsLow:case C.tQ.marginIsLowAndHookIsActive:case C.tQ.marginIsLow:return C.ZK.openDeposit;case C.tQ.kycStatusIsDraftAndHookIsActive:case C.tQ.kycStatusIsDraft:case C.tQ.kycStatusIsSubmittedAndHookIsActive:case C.tQ.kycStatusIsSubmitted:case C.tQ.kycStatusIsRevisionRequiredAndHookIsActive:case C.tQ.kycStatusIsRevisionRequired:return C.ZK.openActivate;case C.tQ.switchToLiveAndHookIsActive:case C.tQ.switchToLive:return C.ZK.switchToLive;default:return C.ZK.none}}var I=s(90398),L=s(27549);const w=e=>e.accountHook;var T=s(64264);const D=l()([(0,u.$)(w).data.type(),(0,u.$)(w).data.endTimestamp(),I.Z],((e,t,s)=>e===T.P.FreeTradesPeriod&&s<t))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),P=l()([D,(0,u.$)(w).data.endTimestamp(),I.Z],((e,t,s)=>e?function(e,t){if(t<e){const s=e-t;return`${(0,L.B)(Math.floor(s/864e5))}d : ${(0,L.B)(Math.floor(s%864e5/36e5))}h : ${(0,L.B)(Math.floor(s%36e5/6e4))}m : ${(0,L.B)(Math.floor(s%6e4/1e3))}s`}return""}(t,s):void 0))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var N=s(18542),A=s(67893);const B=e=>e.fluidOnBoardingRibbon,M=l()([(0,u.$)(B).accountBalanceState(),(0,u.$)(B).isLowEquityClosed(),D],((e,t,s)=>{switch(e){case C.FR.balanceIsEmpty:return s?C.tQ.balanceIsEmptyAndHookIsActive:C.tQ.balanceIsEmpty;case C.FR.equityIsLow:return t?C.tQ.none:s?C.tQ.equityIsLowAndHookIsActive:C.tQ.equityIsLow;case C.FR.marginIsLow:return s?C.tQ.marginIsLowAndHookIsActive:C.tQ.marginIsLow;default:return C.tQ.none}}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var $=s(7485);const E=l()([(0,u.$)($.S).live(),(0,u.$)(B).isDemoClosed(),(0,u.$)(c.H).data.isKawase()],((e,t,s)=>!s||!(e||!t)||void 0===e))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),F=l()([E,(0,u.$)($.S).live(),(0,u.$)(N.BA).data.status(),D,M],((e,t,s,i,o)=>{if(e)return C.tQ.none;if(!1===t)return i?C.tQ.switchToLiveAndHookIsActive:C.tQ.switchToLive;switch(s){case A.aW.KYC_STATUS_REJECTED:return C.tQ.kycStatusIsRejected;case A.aW.KYC_STATUS_DRAFT:return i?C.tQ.kycStatusIsDraftAndHookIsActive:C.tQ.kycStatusIsDraft;case A.aW.KYC_STATUS_REVISION_REQUIRED:return i?C.tQ.kycStatusIsRevisionRequiredAndHookIsActive:C.tQ.kycStatusIsRevisionRequired;case A.aW.KYC_STATUS_SUBMITTED:return i?C.tQ.kycStatusIsSubmittedAndHookIsActive:C.tQ.kycStatusIsSubmitted;case A.aW.KYC_STATUS_VALIDATED:return o;default:return C.tQ.none}}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));function R(e){switch(e){case C.tQ.balanceIsEmpty:case C.tQ.balanceIsEmptyAndHookIsActive:case C.tQ.equityIsLow:case C.tQ.equityIsLowAndHookIsActive:case C.tQ.marginIsLow:case C.tQ.marginIsLowAndHookIsActive:case C.tQ.kycStatusIsSubmitted:case C.tQ.kycStatusIsSubmittedAndHookIsActive:return C.kq.blue;case C.tQ.kycStatusIsDraft:case C.tQ.kycStatusIsDraftAndHookIsActive:case C.tQ.switchToLive:case C.tQ.switchToLiveAndHookIsActive:return C.kq.green;case C.tQ.kycStatusIsRevisionRequired:case C.tQ.kycStatusIsRevisionRequiredAndHookIsActive:return C.kq.orange;case C.tQ.kycStatusIsRejected:return C.kq.red;default:return C.kq.transparent}}var W=s(40091),H=s(97065);const z=l()([F,P,E,I.Z],((e,t,s,i)=>{const{text:o,buttonText:n}=function(e){return{[C.tQ.switchToLiveAndHookIsActive]:{text:`${(0,O.L)("Free trades expire in")}: `,buttonText:(0,O.L)("Switch to Live")},[C.tQ.switchToLive]:{text:void 0,buttonText:(0,O.L)("Switch to Live")},[C.tQ.balanceIsEmptyAndHookIsActive]:{text:`${(0,O.L)("Free trades expire in")}: `,buttonText:(0,O.L)("Deposit now to start trading")},[C.tQ.balanceIsEmpty]:{text:void 0,buttonText:(0,O.L)("Deposit now to start trading")},[C.tQ.equityIsLowAndHookIsActive]:{text:(0,O.L)("Your equity is running low. Free trades expire in: "),buttonText:(0,O.L)("Deposit Now")},[C.tQ.equityIsLow]:{text:(0,O.L)("Your equity is running low"),buttonText:(0,O.L)("Deposit Now")},[C.tQ.marginIsLowAndHookIsActive]:{text:(0,O.L)("Your margin is low, deposit now to avoid being stopped out. Free trades expire in: "),buttonText:(0,O.L)("Deposit Now")},[C.tQ.marginIsLow]:{text:(0,O.L)("Your margin is low, deposit now to avoid being stopped out"),buttonText:(0,O.L)("Deposit Now")},[C.tQ.kycStatusIsDraftAndHookIsActive]:{text:`${(0,O.L)("Free trades expire in")}: `,buttonText:(0,O.L)("Activate Account")},[C.tQ.kycStatusIsDraft]:{text:void 0,buttonText:(0,O.L)("Activate Account")},[C.tQ.kycStatusIsSubmittedAndHookIsActive]:{text:`${(0,O.L)("Free trades expire in")}: `,buttonText:(0,O.L)("Activate Account")},[C.tQ.kycStatusIsSubmitted]:{text:(0,O.L)("Account is being reviewed"),buttonText:void 0},[C.tQ.kycStatusIsRevisionRequiredAndHookIsActive]:{text:`${(0,O.L)("Some fields in your profile require attention.")} ${(0,O.L)("Free trades expire in")}: `,buttonText:(0,O.L)("Activate Account")},[C.tQ.kycStatusIsRevisionRequired]:{text:(0,O.L)("Some fields in your profile require attention."),buttonText:(0,O.L)("Activate Account")},[C.tQ.kycStatusIsRejected]:{text:void 0,buttonText:void 0},[C.tQ.none]:{text:void 0,buttonText:void 0}}[e]}(e),a=e===C.tQ.switchToLive&&!(0,W.b)(i,(()=>{const e=parseInt(sessionStorage.getItem(H.fy),10);if(Number.isFinite(e))return e})(),H.Es);return{text:o,buttonText:n,actionType:k(e),backgroundColor:R(e),isHidden:e===C.tQ.none||a,isHookActive:void 0!==t,isDisabled:s,timerText:t}}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var J=s(13518),Q=s(81176),_=s(41296),q=s(80803),X=s(81996),V=s(65201),Z=s(54738),U=s(96935),K=s(39091),Y=s(81803),G=s(53621);const ee=e=>{const{foregroundColor:t}=e.theme.palette.semantic;return{root:{fill:t.primary2,position:"absolute",right:10}}};var te=s(42983),se=s(83069),ie=s(35394),oe=s(70162),ne=s(69903);const ae=l()([(0,u.$)($.S).live(),(0,u.$)(B).accountBalanceState(),F,I.Z],((e,t,s,i)=>({isLowEquity:k(s)===C.ZK.openDeposit&&t===C.FR.equityIsLow,isLive:e,ribbonState:s,currentTime:i})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var re=s(40169);const le=(0,o.memo)((()=>{const e=(0,re.I0)(),{isLowEquity:t,isLive:s,ribbonState:n,currentTime:a}=(0,ne.v)(ae),{rules:r}=(0,te.X)(ee,{}),l=(0,o.useCallback)((()=>{var i;s?t&&e(U.G.updateLowEquity({isClosed:!0})):e(U.G.closeDemo()),n===C.tQ.switchToLive&&(i=a,sessionStorage.setItem(H.fy,String(i)))}),[e,s,t,a,n]);return(!s||t)&&(0,i.jsx)(se.J,{source:ie.Y.cross,size:oe.J.Medium,onClick:l,extend:{root:r.root}},void 0)}));var de=s(24155);class ce extends o.Component{constructor(){super(...arguments),this.onClick=()=>{const{actionType:e,track:t,openKycDialog:s,openDepositAction:i,switchToLiveAccount:o}=this.props;e===C.ZK.openActivate?(t({name:y.T2.KycOpened,params:{openFrom:y.mq.Ribbon}}),s()):e===C.ZK.openDeposit?(t({name:y.T2.KycOpened,params:{openFrom:y.mq.Ribbon}}),i({operation:K.D.Deposit,analyticsOpenFrom:y.mq.Ribbon})):e===C.ZK.switchToLive&&(t({name:y.T2.SwitchToLiveBadgeClicked}),o())}}render(){const{isDisabled:e}=this.props;return e?null:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(G.v,{},void 0),(0,i.jsx)(de.a,{},void 0),this.renderContent()]},void 0)}renderContent(){const{isHidden:e,text:t,timerText:s,styles:o}=this.props;return e?null:(0,i.jsxs)("div",Object.assign({className:o.container},{children:[(0,i.jsxs)("div",Object.assign({className:o.content},{children:[t&&(0,i.jsx)("div",Object.assign({className:o.text},{children:t}),void 0),s&&(0,i.jsx)("div",Object.assign({className:o.timer},{children:s}),void 0),this.renderButton()]}),void 0),(0,i.jsx)(le,{},void 0)]}),void 0)}renderButton(){const{buttonText:e,styles:t}=this.props;return e?(0,i.jsx)("div",Object.assign({className:t.button,onClick:this.onClick},{children:e}),void 0):null}}const ue=(0,n.$)(z,{openDepositAction:Y.h.show,openKycDialog:f.G.open,switchToLiveAccount:U.G.switchToLiveAccount,track:S.m.track})((0,x.Z)((e=>{const t=(0,J.p)("ribbonElement");return{container:Object.assign(Object.assign({},(0,Q.O)({color:e.backgroundColor})),{display:"flex",justifyContent:"center",position:"relative"}),content:{display:"flex",justifyContent:"center",nested:{[`> .${t}`]:{marginRight:32},[`> .${t}:last-child`]:{marginRight:0}}},text:(0,_.g)(t,(()=>Object.assign(Object.assign({},(0,q.e)(12,0)),{color:"#fff"}))),timer:(0,_.g)(t,(()=>Object.assign(Object.assign({},(0,q.e)(12,0)),{color:"#fff",fontWeight:"bold"}))),button:(0,_.g)(t,(()=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({minWidth:"120px"},(0,X.o)(5,25)),(0,q.e)(Z.W0,0)),{color:"#fff",border:"1px solid #fff"}),(0,V.E)(Z.q0)),{textAlign:"center",":hover":Object.assign(Object.assign({},(0,Q.O)({color:"#fff"})),{color:"#11a1ff",cursor:"pointer"})})))}}))(ce));var he=s(74304),ge=s(33933),pe=s(27692),be=s(33145),ve=s(76847),me=s(91586),je=s(97605),xe=s(81811),ye=s(40383),Se=s(18760),fe=s(30991),Oe=s(41425),Ce=s(30866),ke=s(17066),Ie=s(18277),Le=s(98928),we=s(44148),Te=s(77089),De=s(32360),Pe=s(35625);const Ne=l()([(0,u.$)(c.H).data.isLcg(),Pe.C,(0,u.$)(c.H).data.immutableSimplifiedName(),(0,u.$)(c.H).data.brokerId(),(0,u.$)(we.w).isDefaultTradingUnits(),(0,u.$)(we.w).defaultTradingUnits(),(0,u.$)(Te.y).isDefaultTradingUnits(),(0,u.$)(Te.y).defaultTradingUnits(),Le.P],((e,t,s,i,o,n,a,r,l)=>({brokerName:s,brokerId:i,isSpreadBettingLike:t,assetClassList:l.filter((t=>(0,De.a)(t.name,e))),isDefaultTradingUnits:o||a,defaultTradingUnits:n||r})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var Ae=s(95035),Be=s(71878),Me=s(56426);const $e=l()([(0,u.$)(c.H).data.immutableSimplifiedName(),(0,u.$)(c.H).data.brokerId(),(0,u.$)(Be.r).name(),Me.A],((e,t,s,i)=>({brokerName:e,brokerId:t,assetClassName:s,currentTradingUnit:i})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().assetClassId()}));var Ee=s(15369);const Fe=(0,x.Z)((()=>({root:{width:90},radio:{},label:{}})))(Ee.Y);var Re=s(14441),We=s(11197),He=s(88930),ze=s(38982);class Je extends o.Component{constructor(){super(...arguments),this.onChange=e=>{const{brokerName:t,brokerId:s,assetClassId:i,assetClassName:o,setTradingUnits:n}=this.props;n({brokerName:t,brokerId:s,assetClassName:o,assetClassId:i,tradingUnits:e})}}render(){const{disabled:e,assetClassName:t,currentTradingUnit:s,testId:o}=this.props;return(0,i.jsxs)(ge.X,Object.assign({marginBottom:2*Z.W0},{children:[(0,i.jsx)(Re.b,Object.assign({flexBasis:"50%"},{children:(0,i.jsx)(We.H,Object.assign({textColor:He.d.Primary},{children:t}),void 0)}),void 0),(0,i.jsx)(Re.b,Object.assign({justifyContent:"flex-end"},{children:(0,i.jsxs)(Ce.E,Object.assign({value:s,layout:ke.a.Horizontal,disabled:e,onChange:this.onChange,testId:o},{children:[(0,i.jsx)(Fe,Object.assign({value:Oe.E.Units,testId:"units"},{children:(0,O.L)("Units")}),void 0),(0,i.jsx)(Fe,Object.assign({value:Oe.E.Lots,testId:"lots"},{children:(0,O.L)("Lots")}),void 0)]}),void 0)}),void 0)]}),void 0)}}const Qe=(0,n.$)($e,{setTradingUnits:ze.x.setTradingUnits})(Je);var _e=s(46792),qe=s(61443),Xe=s(34285),Ve=s(19366);class Ze extends o.Component{constructor(){super(...arguments),this.onChangeDefaultUnit=e=>{const{brokerName:t,brokerId:s,setDefaultTradingUnits:i}=this.props;i({brokerName:t,brokerId:s,defaultTradingUnits:e})},this.onChangeUnitsPerAsset=e=>{const{brokerName:t,brokerId:s,toggleDefaultTradingUnits:i}=this.props;i({brokerName:t,brokerId:s,isDefaultTradingUnits:!e})}}render(){const{isSpreadBettingLike:e,rules:t,styles:s}=this.props;return e?(0,i.jsx)(ge.X,{children:(0,O.L)("Asset settings are not allowed for spread-betting accounts.")},void 0):(0,i.jsx)("div",Object.assign({className:s.root},{children:(0,i.jsx)(qe.X,Object.assign({scrollBackgroundLayout:Xe.c.AllTransparent,extend:{root:t.scrollBlock(this.props)}},{children:(0,i.jsx)("div",Object.assign({style:{maxWidth:380}},{children:this.renderContent()}),void 0)}),void 0)}),void 0)}renderContent(){const{assetClassList:e,isDefaultTradingUnits:t,defaultTradingUnits:s}=this.props;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(_e.w,{children:(0,i.jsx)(ge.X,{children:(0,O.L)("Please note that changes will be applied immediately")},void 0)},void 0),(0,i.jsx)(_e.w,{children:(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(Re.b,Object.assign({flexBasis:"50%"},{children:(0,O.L)("Default Asset trading units")}),void 0),(0,i.jsx)(Re.b,Object.assign({justifyContent:"flex-end"},{children:(0,i.jsxs)(Ce.E,Object.assign({value:s,layout:ke.a.Horizontal,disabled:!t,onChange:this.onChangeDefaultUnit,testId:"trading-units-select"},{children:[(0,i.jsx)(Fe,Object.assign({value:Oe.E.Units,testId:"units"},{children:(0,O.L)("Units")}),void 0),(0,i.jsx)(Fe,Object.assign({value:Oe.E.Lots,testId:"lots"},{children:(0,O.L)("Lots")}),void 0)]}),void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(ge.X,Object.assign({marginBottom:2*Z.W0},{children:(0,i.jsx)(Ie.J,Object.assign({checked:!t,onChange:this.onChangeUnitsPerAsset,testId:"units-per-asset-checkbox"},{children:(0,i.jsx)("span",{children:(0,O.L)("Set units per asset class")},void 0)}),void 0)}),void 0),e.map((e=>(0,i.jsx)(Qe,{assetClassId:e.id,disabled:t,testId:`${(0,Ve.Z)(e.name)}-checkbox`},e.id)))]},void 0)}}const Ue=(0,n.$)(Ne,{setDefaultTradingUnits:ze.x.setDefaultTradingUnits,toggleDefaultTradingUnits:ze.x.toggleDefaultTradingUnits})((0,x.Z)((()=>({root:{flexGrow:1},scrollBlock:Object.assign({height:556},(0,X.o)(0))})))(Ze));var Ke=s(11661),Ye=s(83274),Ge=s(82290);const et=l()([(0,u.$)($.S).traderLogin(),(0,u.$)($.S).environment(),(0,u.$)(m.Z).info.plantId(),(0,u.$)(Ke.W).url(),(0,u.$)(Ke.W).ipaddr(),(0,u.$)(Ye.Y).fixProxyList(),(0,u.$)(m.Z).fixApi(),(0,Ae.P)().textPortKey()],((e,t,s,i,o,n,a,r)=>{var l,d;const c=n.find((e=>e.envs.some((e=>e.env_name===t))));return{traderLogin:e,environment:t,plantId:s,hostname:null!==(l=null==c?void 0:c.hostname)&&void 0!==l?l:(0,Ge.e)(i).host,ipAddress:null!==(d=null==c?void 0:c.ipaddr)&&void 0!==d?d:o,textPort:a[r]}}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().textPortKey()}));var tt=s(68929),st=s(54311);const it={price:{sslPort:"5211",senderSubId:"QUOTE"},trade:{sslPort:"5212",senderSubId:"TRADE"},targetCompId:"cServer"},ot={SPECIFICATIONS:`${st.Xp}/fix`,NETTED:`${st.Xp}/getting-started/accounts#types`,HEDGED:`${st.Xp}/getting-started/accounts#types`};class nt extends o.Component{render(){const{title:e,styles:t,testId:s}=this.props;return(0,i.jsxs)("div",Object.assign({className:t.root},{children:[(0,i.jsxs)("div",Object.assign({className:t.header},{children:[(0,i.jsx)("div",{children:e},void 0),(0,i.jsx)("div",{children:(0,i.jsx)(tt.b,Object.assign({text:this.getText(),testId:s},{children:(0,O.L)("Copy to Clipboard")}),void 0)},void 0)]}),void 0),(0,i.jsx)("div",Object.assign({className:t.content},{children:this.getText()}),void 0)]}),void 0)}getText(){const{traderLogin:e,environment:t,plantId:s,hostname:i,ipAddress:o,sslPort:n,textPort:a,senderSubId:r}=this.props;return`${o?(0,O.L)("Host name"):(0,O.L)("Address")}: ${i}\n`+(o?`${(0,O.L)("(Current IP address {0} can be changed without notice)",o)}\n`:"")+`${(0,O.L)("Port")}: ${(0,O.L)("{0} (SSL), {1} (Plain text).",n,a)}\n`+`${(0,O.L)("Password")}: ${(0,O.L)("(a/c {0} password)",e)}\n`+`${(0,O.L)("SenderCompID")}: ${t}.${s}.${e}\n`+`${(0,O.L)("TargetCompID")}: ${it.targetCompId}\n`+`${(0,O.L)("SenderSubID")}: ${r}`}}const at=(0,n.$)(et)((0,x.Z)((e=>{const{backgroundColor:t}=e.theme.palette.semantic;return{root:{paddingBottom:16},header:{display:"flex",justifyContent:"space-between",alignItems:"center",paddingBottom:Z.W0},content:Object.assign(Object.assign(Object.assign({whiteSpace:"pre-line"},(0,Q.O)({color:t.primaryNormal})),(0,V.E)(Z.q0)),(0,X.o)(Z.W0))}}))(nt));var rt=s(63101),lt=s(92551);const dt=(0,lt.a)({productName:rt.i})(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var ct=s(68860),ut=s(51604),ht=s(10802);const gt=(0,lt.a)({password:(0,u.$)(ht.f).password(),editing:(0,u.$)(ht.f).editing()})(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var pt=s(3862),bt=s(92302),vt=s(83936);const mt=(0,o.memo)((()=>{const{password:e,editing:t}=(0,ne.v)(gt),s=(0,re.I0)(),n=(0,o.useCallback)((()=>{s(pt.C.changeEditing({editing:!0}))}),[s]),a=(0,o.useCallback)((()=>{s(pt.C.submit())}),[s]),r=(0,o.useCallback)((e=>{s(pt.C.changePassword({password:e}))}),[s]);(0,o.useEffect)((()=>()=>{s(pt.C.reset())}),[s]);const l=(0,vt.u)(e),d=(0,bt.A)(e);return t?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ge.X,{children:(0,i.jsx)(ct.U,{value:e,error:l,onChange:r},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsx)(ut.K,Object.assign({onClick:a,title:d,disabled:void 0!==d},{children:(0,O.L)("Ok")}),void 0)},void 0)]},void 0):(0,i.jsx)(ge.X,{children:(0,i.jsx)(ut.K,Object.assign({onClick:n,testId:"change-password"},{children:(0,O.L)("Change Password")}),void 0)},void 0)}));class jt extends o.Component{constructor(){super(...arguments),this.renderNote=()=>{const{productName:e,styles:t}=this.props;return(0,i.jsxs)("div",Object.assign({className:t.note},{children:[`${(0,O.L)("Note: {0} is available in both",e)} `,(0,i.jsx)("a",Object.assign({href:ot.NETTED,target:"_blank",className:t.fixApiLink},{children:(0,O.L)("Netted")}),void 0),` ${(0,O.L)("and")} `,(0,i.jsx)("a",Object.assign({href:ot.HEDGED,target:"_blank",className:t.fixApiLink},{children:(0,O.L)("Hedged")}),void 0),` ${(0,O.L)("accounts")}.`,(0,O.L)("You may want to request a Netted account type from your broker for aggregate position trading.")]}),void 0)}}render(){const{styles:e}=this.props,{price:t,trade:s}=it;return(0,i.jsxs)("div",Object.assign({className:e.root},{children:[(0,i.jsxs)(ge.X,{children:[`${(0,O.L)("You can find specifications and code samples here")} - `,(0,i.jsx)("a",Object.assign({href:ot.SPECIFICATIONS,target:"_blank",className:e.fixApiLink},{children:(0,O.L)("FIX API help")}),void 0)]},void 0),(0,i.jsx)(at,{title:(0,O.L)("Price Connection"),textPortKey:"tradingPort",testId:"price-connection",sslPort:t.sslPort,senderSubId:t.senderSubId},void 0),(0,i.jsx)(at,{title:(0,O.L)("Trade Connection"),textPortKey:"marketDataPort",testId:"trade-connection",sslPort:s.sslPort,senderSubId:s.senderSubId},void 0),(0,i.jsx)(mt,{},void 0),this.renderNote()]}),void 0)}}const xt=(0,n.$)(dt)((0,x.Z)((e=>{const{foregroundColor:t}=e.theme.palette.semantic;return{root:{flexGrow:1,display:"flex",flexDirection:"column"},fixApiLink:{color:t.primary2},note:{alignSelf:"flex-end",marginTop:"auto"}}}))(jt));var yt=s(13048),St=s(42335),ft=s(82164),Ot=s(93718),Ct=s(14953),kt=s(57776),It=s(4375),Lt=s(93882),wt=s(89165);class Tt extends o.Component{render(){const{title:e,caption:t,onCancel:s,onConfirm:o,children:n,styles:a,rules:r}=this.props;return(0,i.jsxs)(wt.u,Object.assign({placement:"bottom-end",open:!0,wide:!0},{children:[n,(0,i.jsxs)("div",Object.assign({className:a.root},{children:[(0,i.jsx)("div",Object.assign({className:a.title},{children:e}),void 0),(0,i.jsx)("div",{children:t},void 0),(0,i.jsxs)("div",Object.assign({className:a.buttons},{children:[(0,i.jsx)(It.L,Object.assign({type:Lt.L.submit,onClick:s,testId:"cancel",extend:{root:r.cancelButton(this.props)}},{children:(0,O.L)("Cancel")}),void 0),(0,i.jsx)(ut.K,Object.assign({wide:!0,type:Lt.L.submit,onClick:o,testId:"submit",extend:{root:r.okButton(this.props)}},{children:(0,O.L)("Ok")}),void 0)]}),void 0)]}),void 0)]}),void 0)}}const Dt=(0,x.Z)((()=>({root:{maxWidth:400},title:{fontWeight:"bold",marginBottom:Z.W0},buttons:{display:"flex",marginTop:Z.W0},cancelButton:{flexGrow:1,flexBasis:"50%",marginRight:Z.W0},okButton:{flexGrow:1,flexBasis:"50%"}})))(Tt),Pt=l()([(0,u.$)(g.C).isActiveSymbolPanelVisible(),(0,u.$)(g.C).isTradewatchPanelVisible(),(0,u.$)(g.C).isMainMenuVisible()],((e,t,s)=>({isActiveSymbolPanelVisible:e,isTradewatchPanelVisible:t,isMainMenuVisible:s})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var Nt=s(71097),At=s(28746),Bt=s(65367);class Mt extends o.Component{constructor(){super(...arguments),this.changeActiveSymbolPanelVisibility=()=>{const{toggleActiveSymbolPanel:e}=this.props;e({})},this.changeTradeWatchPanelVisibility=()=>{const{toggleTradeWatchPanel:e}=this.props;e({})},this.changeMainMenuVisibility=()=>{const{toggleMainMenu:e}=this.props;e({})}}render(){const{isActiveSymbolPanelVisible:e,isTradewatchPanelVisible:t,isMainMenuVisible:s}=this.props;return(0,i.jsxs)(ge.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(Re.b,Object.assign({flexBasis:"30%",alignItems:"flex-start"},{children:(0,O.L)("Layout Mode")}),void 0),(0,i.jsx)(Re.b,{children:(0,i.jsxs)(At.s,{children:[(0,i.jsx)(Ie.J,Object.assign({checked:s,onChange:this.changeMainMenuVisibility,testId:"main-menu-checkbox"},{children:`${(0,O.L)("Main Menu")} (${(0,O.L)("Left")})`}),void 0),(0,i.jsx)(Bt.I,{},void 0),(0,i.jsx)(Ie.J,Object.assign({checked:e,onChange:this.changeActiveSymbolPanelVisibility,testId:"active-symbol-panel-checkbox"},{children:`${(0,O.L)("Active Symbol Panel")} (${(0,O.L)("Right")})`}),void 0),(0,i.jsx)(Bt.I,{},void 0),(0,i.jsx)(Ie.J,Object.assign({checked:t,onChange:this.changeTradeWatchPanelVisibility,testId:"trade-watch-checkbox"},{children:`${(0,O.L)("TradeWatch")} (${(0,O.L)("Bottom")})`}),void 0)]},void 0)},void 0)]}),void 0)}}const $t=(0,n.$)(Pt,{toggleActiveSymbolPanel:Nt.m.toggleActiveSymbolPanelVisibility,toggleTradeWatchPanel:Nt.m.toggleTradeWatchPanelVisibility,toggleMainMenu:Nt.m.toggleMainMenuVisibility})(Mt);var Et;!function(e){e.On="On",e.Off="Off"}(Et||(Et={}));var Ft=s(50976),Rt=s(46648),Wt=s(20824),Ht=s(2970);const zt=l()([Rt.t,Wt.k,(0,u.$)(Ht.q).isEnabled(),(0,u.$)(Ft.r).locale()],((e,t,s,i)=>({palette:e,fontName:t,locale:i,isAudioEnabled:s})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var Jt=s(91024),Qt=s(50137),_t=s(67251),qt=s(21316),Xt=s(71533);const Vt=l()([(0,u.$)(Xt.m).data.isAccountNumberShown(),(0,u.$)(Xt.m).data.isAccountNameShown(),(0,u.$)(Xt.m).data.isAccountBalanceShown()],((e,t,s)=>({isAccountNumberShown:e,isAccountNameShown:t,isAccountBalanceShown:s})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var Zt=s(38567),Ut=s(6691),Kt=s(88995);class Yt extends o.Component{constructor(){super(...arguments),this.onAccountNumberChange=e=>{const{update:t,set:s,tag:i}=this.props;t(e?{isAccountNumberShown:e,isAccountNameShown:!1}:{isAccountNumberShown:e}),s(),i({label:Ut.BN.PrivacySettingsAccountNumber,params:{value:Kt.y.toGtmAvailability(e)}})},this.onAccountNameChange=e=>{const{update:t,set:s,tag:i}=this.props;t(e?{isAccountNameShown:e,isAccountNumberShown:!1}:{isAccountNameShown:e}),s(),i({label:Ut.BN.PrivacySettingsAccountName,params:{value:Kt.y.toGtmAvailability(e)}})},this.onAccountBalanceChange=e=>{const{update:t,set:s,tag:i}=this.props;t({isAccountBalanceShown:e}),s(),i({label:Ut.BN.PrivacySettingsAccountBalance,params:{value:Kt.y.toGtmAvailability(e)}})}}render(){const{isAccountNumberShown:e,isAccountNameShown:t,isAccountBalanceShown:s}=this.props;return(0,i.jsxs)(At.s,{children:[(0,i.jsx)(Ie.J,Object.assign({checked:e,onChange:this.onAccountNumberChange,title:e?void 0:(0,O.L)("Only one option, either the account name or the account number, can be displayed at a time"),testId:"account-number-checkbox"},{children:(0,O.L)("Show account number")}),void 0),(0,i.jsx)(Bt.I,{},void 0),(0,i.jsx)(Ie.J,Object.assign({checked:t,onChange:this.onAccountNameChange,title:t?void 0:(0,O.L)("Only one option, either the account name or the account number, can be displayed at a time"),testId:"account-name-checkbox"},{children:(0,O.L)("Show account name")}),void 0),(0,i.jsx)(Bt.I,{},void 0),(0,i.jsx)(Ie.J,Object.assign({checked:s,onChange:this.onAccountBalanceChange,testId:"account-balance-checkbox"},{children:(0,O.L)("Show account balance")}),void 0)]},void 0)}}const Gt=(0,n.$)(Vt,{set:Zt.Y.set,update:Zt.Y.update,tag:S.m.tag})(Yt);var es=s(21962),ts=s(3130);const ss=l()([(0,u.$)(ts.g).data.isMarketWatchEnabled(),(0,u.$)(ts.g).data.isTradeWatchEnabled(),(0,u.$)(ts.g).data.isActiveSymbolPanelEnabled()],((e,t,s)=>({isMarketWatchEnabled:e,isTradeWatchEnabled:t,isActiveSymbolPanelEnabled:s})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var is=s(99631);class os extends o.Component{constructor(){super(...arguments),this.onMarketWatchChange=e=>{const{update:t,set:s,tag:i}=this.props;t({isMarketWatchEnabled:e}),s(),i({label:Ut.BN.ActiveChartSettingsMarketWatch,params:{value:Kt.y.toGtmAvailability(e)}})},this.onTradeWatchChange=e=>{const{update:t,set:s,tag:i}=this.props;t({isTradeWatchEnabled:e}),s(),i({label:Ut.BN.ActiveChartSettingsTradeWatch,params:{value:Kt.y.toGtmAvailability(e)}})},this.onActiveSymbolPanelChange=e=>{const{update:t,set:s,tag:i}=this.props;t({isActiveSymbolPanelEnabled:e}),s(),i({label:Ut.BN.ActiveChartSettingsActiveSymbolPanel,params:{value:Kt.y.toGtmAvailability(e)}})}}render(){const{isMarketWatchEnabled:e,isTradeWatchEnabled:t,isActiveSymbolPanelEnabled:s}=this.props;return(0,i.jsxs)(At.s,{children:[(0,i.jsx)(Ie.J,Object.assign({checked:e,onChange:this.onMarketWatchChange,testId:"market-watch-symbol-checkbox"},{children:(0,O.L)("Symbol in MarketWatch opens in Active Chart")}),void 0),(0,i.jsx)(Bt.I,{},void 0),(0,i.jsx)(Ie.J,Object.assign({checked:t,onChange:this.onTradeWatchChange,testId:"trade-watch-symbol-checkbox"},{children:(0,O.L)("Symbol in TradeWatch opens in Active Chart")}),void 0),(0,i.jsx)(Bt.I,{},void 0),(0,i.jsx)(Ie.J,Object.assign({checked:s,onChange:this.onActiveSymbolPanelChange,testId:"sync-active-chart-checkbox"},{children:(0,O.L)("Sync Active Chart with the Active Symbol Panel")}),void 0)]},void 0)}}const ns=(0,n.$)(ss,{set:is.z.set,update:is.z.update,tag:S.m.tag})(os);class as extends o.Component{constructor(e){super(e),this.onChangeAudio=e=>{const{setAudioEnabled:t}=this.props;t(e===Et.On)},this.onChangePalette=e=>{const{setPalette:t}=this.props;t(e)},this.onChangeFontName=e=>{const{setFontSize:t}=this.props;t(e)},this.getLocaleOption=e=>(0,i.jsx)(Ot.a,{option:e},void 0),this.onChangeLocale=e=>{this.setState({newLocale:e})},this.onCancelLocale=()=>{const{locale:e}=this.props;this.setState({newLocale:e})},this.onApplyLocale=()=>{const{locale:e,changeLocale:t}=this.props,{newLocale:s}=this.state;s!==e&&t(s)};const{locale:t}=e;this.state={newLocale:t}}componentDidUpdate(e){const{locale:t}=this.props;e.locale!==t&&this.setState({newLocale:t})}render(){const{fontName:e,palette:t,isAudioEnabled:s,styles:o}=this.props,n=[{themeName:Qt.CT.Dark,title:(0,O.L)("Dark")},{themeName:Qt.CT.Light,title:(0,O.L)("Light")}].map((e=>({value:e.themeName,label:e.title}))),a=(0,_t.U)().map((e=>({value:e.showName,label:e.title}))),r=[{value:Et.On,label:(0,O.L)("On")},{value:Et.Off,label:(0,O.L)("Off")}];return(0,i.jsxs)("div",Object.assign({className:o.root},{children:[(0,i.jsx)(_e.w,{children:(0,i.jsx)(ge.X,{children:(0,O.L)("Please note that changes will be applied immediately")},void 0)},void 0),this.renderLanguageSelect(),(0,i.jsx)(Bt.I,{},void 0),(0,i.jsx)(_e.w,{children:(0,i.jsxs)(ge.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(Re.b,Object.assign({flexBasis:"30%"},{children:(0,O.L)("Sounds")}),void 0),(0,i.jsx)(Re.b,{children:(0,i.jsx)(Ct.P,{options:r,value:s?Et.On:Et.Off,onChange:this.onChangeAudio,testId:"sounds-select"},void 0)},void 0)]}),void 0)},void 0),(0,i.jsxs)(ge.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(Re.b,Object.assign({flexBasis:"30%"},{children:(0,O.L)("Color Theme")}),void 0),(0,i.jsx)(Re.b,{children:(0,i.jsx)(Ct.P,{options:n,value:t,onChange:this.onChangePalette,testId:"color-theme-select"},void 0)},void 0)]}),void 0),(0,i.jsx)(Bt.I,{},void 0),(0,i.jsx)(_e.w,{children:(0,i.jsx)($t,{},void 0)},void 0),(0,i.jsx)(_e.w,{children:(0,i.jsxs)(ge.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(Re.b,Object.assign({flexBasis:"30%"},{children:(0,O.L)("Font Size")}),void 0),(0,i.jsx)(Re.b,{children:(0,i.jsx)(Ct.P,{options:a,value:e,onChange:this.onChangeFontName,testId:"font-size-select"},void 0)},void 0)]}),void 0)},void 0),(0,i.jsx)(_e.w,{children:(0,i.jsxs)(ge.X,Object.assign({alignItems:"flex-start",justifyContent:"space-between"},{children:[(0,i.jsx)(Re.b,Object.assign({flexBasis:"30%",alignItems:"flex-start"},{children:(0,i.jsxs)(Re.b,Object.assign({alignItems:"center"},{children:[(0,i.jsx)(We.H,{children:(0,O.L)("Privacy")},void 0),(0,i.jsx)(es.q,{},void 0),(0,i.jsx)(kt.n,Object.assign({source:ie.Y.info},{children:(0,O.L)("Account details in the top right corner")}),void 0)]}),void 0)}),void 0),(0,i.jsx)(Re.b,{children:(0,i.jsx)(Gt,{},void 0)},void 0)]}),void 0)},void 0),(0,i.jsx)(_e.w,{children:(0,i.jsxs)(ge.X,Object.assign({alignItems:"flex-start",justifyContent:"space-between"},{children:[(0,i.jsx)(Re.b,Object.assign({flexBasis:"30%",alignItems:"flex-start"},{children:(0,i.jsx)(Re.b,Object.assign({alignItems:"center"},{children:(0,O.L)("Active Chart")}),void 0)}),void 0),(0,i.jsx)(Re.b,{children:(0,i.jsx)(ns,{},void 0)},void 0)]}),void 0)},void 0)]}),void 0)}getOptions(){return{availableLocales:(0,yt.u)()}}renderLanguageSelect(){return(0,i.jsxs)(ge.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(Re.b,Object.assign({flexBasis:"30%"},{children:(0,O.L)("Language")}),void 0),(0,i.jsx)(Re.b,{children:this.renderLanguageContent()},void 0)]}),void 0)}renderLanguageContent(){const{locale:e}=this.props,{newLocale:t}=this.state,s=e!==t,o=St.af[t];return s?(0,i.jsx)(Dt,Object.assign({title:(0,O.L)("Change Language to '{0}'",o),caption:(0,O.L)("Language change will take effect when the page reloads"),onCancel:this.onCancelLocale,onConfirm:this.onApplyLocale},{children:this.renderLocaleSelect()}),void 0):this.renderLocaleSelect()}renderLocaleSelect(){const{newLocale:e}=this.state,t=(0,yt.u)();return(0,i.jsx)(Ct.P,{options:t,value:e,disabled:!e,renderOption:this.getLocaleOption,onChange:this.onChangeLocale,testId:"language-select"},void 0)}}const rs=(0,n.$)(zt,{setAudioEnabled:Jt.K.setEnabled,changeLocale:ft._.changeLocale,setPalette:qt.c.setPalette,setFontSize:qt.c.setFontSize})((0,x.Z)((()=>({root:{flexGrow:1}})))(as));var ls=s(95259),ds=s(51217);const cs=l()([(0,u.$)(ds.K).mouseOverInfo(),(0,u.$)(c.H).data.isLcg()],((e,t)=>void 0===e?t:e))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),us=l()([(0,u.$)(ds.K).dailyChangeVisible(),cs,(0,u.$)(c.H).data.isLcg()],((e,t,s)=>({isDailyChangeVisible:e,mouseOverInfo:t,isLcg:s})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var hs=s(74805);class gs extends o.Component{constructor(){super(...arguments),this.onDailyChangeVisibleChange=e=>{const{toggleDailyChangeVisibility:t}=this.props;t({isVisible:e===ls.c.Visible})},this.onChangeMouseOverInfo=()=>{const{toggleMouseOverInfo:e}=this.props;e({})}}render(){const{isDailyChangeVisible:e,mouseOverInfo:t,isLcg:s,styles:o}=this.props,n=e?ls.c.Visible:ls.c.Hidden;return(0,i.jsxs)("div",Object.assign({className:o.root},{children:[(0,i.jsx)(_e.w,{children:(0,i.jsx)(ge.X,{children:(0,O.L)("Please note that changes will be applied immediately")},void 0)},void 0),(0,i.jsxs)(ge.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(Re.b,Object.assign({flexBasis:"30%"},{children:(0,O.L)("Daily Change")}),void 0),(0,i.jsx)(Re.b,{children:(0,i.jsx)(Ct.P,{options:this.getDailyChangeList(),value:n,onChange:this.onDailyChangeVisibleChange,testId:"daily-change"},void 0)},void 0)]}),void 0),s&&(0,i.jsxs)(ge.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(Re.b,Object.assign({flexBasis:"30%"},{children:(0,O.L)("Info Mouseover")}),void 0),(0,i.jsx)(Re.b,{children:(0,i.jsx)(Ie.J,Object.assign({checked:t,onChange:this.onChangeMouseOverInfo},{children:(0,i.jsx)("span",{children:(0,O.L)("Info Mouseover")},void 0)}),void 0)},void 0)]}),void 0)]}),void 0)}getDailyChangeList(){return[{value:ls.c.Visible,label:(0,O.L)("On")},{value:ls.c.Hidden,label:(0,O.L)("Off")}]}}const ps=(0,n.$)(us,{toggleDailyChangeVisibility:hs.t.toggleDailyChangeVisibility,toggleMouseOverInfo:hs.t.toggleMouseOverInfo})((0,x.Z)((()=>({root:{flexGrow:1}})))(gs));var bs=s(18986),vs=s(16603);function ms(e){switch(e){case bs.ED.ShowAll:return(0,O.L)("Show All");case bs.ED.ShowLastOnly:return(0,O.L)("Show Last Only");case bs.ED.ShowErrorsOnly:return(0,O.L)("Show Errors Only");case bs.ED.Off:return(0,O.L)("Off");default:return(0,vs.N)(e)}}var js=s(4415),xs=s(65506);const ys=(0,lt.a)({productAppName:rt.i,mode:(0,u.$)(xs.V).mode()})(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class Ss extends o.Component{constructor(){super(...arguments),this.onChange=e=>{const{setMode:t}=this.props;t(e)}}render(){const{mode:e,styles:t}=this.props;return(0,i.jsxs)("div",Object.assign({className:t.root},{children:[(0,i.jsx)(_e.w,{children:(0,i.jsx)(ge.X,{children:(0,O.L)("Please note that changes will be applied immediately")},void 0)},void 0),(0,i.jsxs)(ge.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(Re.b,Object.assign({flexBasis:"50%"},{children:(0,O.L)("Application Notifications")}),void 0),(0,i.jsx)(Re.b,{children:(0,i.jsx)(Ct.P,{options:this.getOptions(),value:e,onChange:this.onChange,testId:"application-notifications"},void 0)},void 0)]}),void 0)]}),void 0)}getOptions(){return[{value:bs.ED.ShowAll,label:ms(bs.ED.ShowAll)},{value:bs.ED.ShowErrorsOnly,label:ms(bs.ED.ShowErrorsOnly)},{value:bs.ED.ShowLastOnly,label:ms(bs.ED.ShowLastOnly)},{value:bs.ED.Off,label:ms(bs.ED.Off)}]}}const fs=(0,n.$)(ys,{setMode:js.X.setMode})((0,x.Z)((()=>({root:{flexGrow:1}})))(Ss));var Os,Cs=s(9079);!function(e){e.DisabledByBroker="DisabledByBroker",e.DisabledByTrading="DisabledByTrading",e.DisabledByHistory="DisabledByHistory",e.ChangeCurrencyDisabled="ChangeCurrencyDisabled",e.ChangeLeverageDisabled="ChangeLeverageDisabled",e.ChangeAccountTypeDisabled="ChangeAccountTypeDisabled"}(Os||(Os={}));var ks=s(85598),Is=s(36762),Ls=s(48938),ws=s(45890);const Ts=l()([(0,u.$)(c.H).data.disableAccountPropertiesChange(),(0,u.$)(ks.k).networkStatus(),(0,u.$)(Ls.e).networkStatus(),ws.r,Is.G],((e,t,s,i,o)=>e?Os.DisabledByBroker:t!==Cs.I.Done||s!==Cs.I.Done||i.length>0||o.length>0?Os.DisabledByTrading:void 0))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var Ds=s(30786),Ps=s(83030),Ns=s(18459),As=s(54865);const Bs=l()([Ps.f,(0,u.$)($.S).traderLogin(),(0,u.$)($.S).plantId()],((e,t,s)=>{const i=Ns.P.accountIdToDomain({traderLogin:t,plantId:s});return(0,As.s)(e,i)}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var Ms=s(53214);const $s=e=>e.accountAttributes,Es=(0,lt.a)({accountId:(0,u.$)($.S).traderLogin(),currentLeverage:(0,u.$)($.S).leverage(),currentAccountType:(0,u.$)($.S).accountType(),currentAccountName:(0,u.$)($.S).accountName(),depositCurrency:(0,u.$)($.S).depositCurrency(),currentDepositAssetId:(0,u.$)(Ms.C).assetId()})(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),Fs=l()([(0,u.$)($s).networkStatus(),(0,u.$)(m.Z).copy.isEnabled(),(0,u.$)(Ds.g).networkStatus()],((e,t,s)=>{const i=t&&s===Cs.I.Started;return{isLoading:e===Cs.I.Started||i,isFailed:e===Cs.I.Failed}}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),Rs=l()([Es,Ts,Fs,(0,u.$)(m.Z).copy.isEnabled(),Bs],((e,t,s)=>Object.assign(Object.assign(Object.assign({},e),s),{formStatus:t})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));function Ws(e){switch(e){case Os.DisabledByBroker:return(0,O.L)("Changing of account properties is disabled for this broker");case Os.DisabledByTrading:return(0,O.L)("Please close all opened positions and pending orders to enable changing properties of your trading account, except for the Account Name");case Os.DisabledByHistory:return(0,O.L)("Account must not have any history to change Deposit Asset");case Os.ChangeCurrencyDisabled:return(0,O.L)("Changing currency is disabled for this account");case Os.ChangeLeverageDisabled:return(0,O.L)("Changing leverage is disabled for this account");case Os.ChangeAccountTypeDisabled:return(0,O.L)("Changing account type is disabled for this account");default:return""}}var Hs=s(15720),zs=s(42952),Js=s(62867);const Qs=l()([(0,u.$)((e=>e.currency)).data()],(e=>e))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var _s=s(14224),qs=s(99938),Xs=s(44370);const Vs=(0,_s.X)((0,u.$)($.S).brokerName(),d.mr).chain((e=>(0,qs.t)(Xs.N,{brokerName:e},d.iN))).build();var Zs=s(23509);const Us=(0,_s.X)((0,u.$)($.S).brokerName(),d.mr).chain((e=>(0,qs.t)(Zs.w,{brokerName:e},d.iN))).build(),Ks=l()([(0,u.$)($.S).live(),Qs,(0,u.$)(Vs).AllowedDepositCurrencies(),(0,u.$)(Us).AllowedDepositCurrencies(),(0,u.$)(Ms.C).assetId(),(0,u.$)(Ms.C).displayName()],((e,t,s,i,o,n)=>{const a=e?s:i,r=t.filter((e=>a.includes(e.code)));return o&&n&&r.push({currencyId:o,code:n}),(0,Js.l)(r,"currencyId")}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var Ys=s(48037),Gs=s(54621),ei=s(19772);const ti=l()([Pe.C,Ts,(0,u.$)(ei.c).settings.ChangingAccountProperties.Currency(),(0,u.$)(Ys.C).networkStatus(),Gs.M],((e,t,s,i,o)=>e?Os.ChangeCurrencyDisabled:t||(s?i!==Cs.I.Done||o.length>0?Os.DisabledByHistory:void 0:Os.ChangeCurrencyDisabled)))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),si=l()([(0,u.$)($s).networkStatus(),(0,u.$)($s).isCurrencyFailed(),(0,u.$)(m.Z).copy.isEnabled(),(0,u.$)(Ds.g).networkStatus()],((e,t,s,i)=>{const o=s&&i===Cs.I.Started;return{isLoading:e===Cs.I.Started||o,isCurrencyFailed:t}}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),ii=l()([ti,si,Ks],((e,t,s)=>Object.assign(Object.assign({},t),{currencyStatus:e,currencyList:s})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var oi=s(53360),ni=s(70623);class ai extends o.Component{constructor(){super(...arguments),this.onChange=e=>{const{onCurrencyChange:t}=this.props;t((0,oi.J)(e))}}render(){return(0,i.jsxs)(ge.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(Re.b,Object.assign({flexBasis:"30%"},{children:(0,O.L)("Currency")}),void 0),(0,i.jsx)(Re.b,{children:this.renderSelect()},void 0)]}),void 0)}renderSelect(){const{isLoading:e,currencyId:t,currencyStatus:s,isCurrencyFailed:o}=this.props,n=o?(0,O.L)("Deposit currency change has not been applied"):void 0;return Ws(s)?(0,i.jsxs)(zs.b,Object.assign({wide:!0},{children:[(0,i.jsx)(ni.m,{options:this.getCurrencyList(),value:null==t?void 0:t.toString(),error:n,disabled:Boolean(s)||e,onChange:this.onChange,testId:"currency-select"},void 0),Ws(s)]}),void 0):(0,i.jsx)(ni.m,{options:this.getCurrencyList(),value:null==t?void 0:t.toString(),error:n,disabled:Boolean(s)||e,wide:!0,onChange:this.onChange,testId:"currency-select"},void 0)}getCurrencyList(){const{currencyList:e}=this.props;return e.map((e=>({value:e.currencyId.toString(),label:e.code})))}}const ri=(0,n.$)(ii)(ai);var li=s(61282);const di=(0,_s.X)((0,u.$)($.S).brokerName(),d.mr).chain((e=>(0,qs.t)(li.U,{brokerName:e},d.iN))).build(),ci=l()([di,(0,u.$)($.S).live(),(0,u.$)($.S).maxLeverage()],((e,t,s)=>t?e.filter((e=>e<=s)):e))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),ui=l()([Pe.C,Ts,(0,u.$)(ei.c).settings.ChangingAccountProperties.Leverage()],((e,t,s)=>e?Os.ChangeLeverageDisabled:t||(s?void 0:Os.ChangeLeverageDisabled)))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),hi=l()([(0,u.$)($s).networkStatus(),(0,u.$)($s).isLeverageFailed(),(0,u.$)(m.Z).copy.isEnabled(),(0,u.$)(Ds.g).networkStatus()],((e,t,s,i)=>{const o=s&&i===Cs.I.Started;return{isLoading:e===Cs.I.Started||o,isLeverageFailed:t}}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),gi=l()([ui,hi,ci],((e,t,s)=>Object.assign(Object.assign({},t),{leverageStatus:e,leverageList:s})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var pi=s(82471);class bi extends o.Component{constructor(){super(...arguments),this.onChange=e=>{const{onLeverageChange:t}=this.props;t((0,oi.J)(e))}}render(){return(0,i.jsxs)(ge.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(Re.b,Object.assign({flexBasis:"30%"},{children:(0,O.L)("Leverage")}),void 0),(0,i.jsx)(Re.b,{children:this.renderSelect()},void 0)]}),void 0)}renderSelect(){const{isLoading:e,leverage:t,leverageStatus:s,isLeverageFailed:o}=this.props,n=o?(0,O.L)("Leverage change has not been applied"):void 0;return Ws(s)?(0,i.jsxs)(zs.b,Object.assign({wide:!0},{children:[(0,i.jsx)(ni.m,{options:this.getLeverageList(),value:t.toString(),error:n,disabled:Boolean(s)||e,onChange:this.onChange,testId:"leverage-select"},void 0),Ws(s)]}),void 0):(0,i.jsx)(ni.m,{options:this.getLeverageList(),value:t.toString(),error:n,disabled:Boolean(s)||e,wide:!0,onChange:this.onChange,testId:"leverage-select"},void 0)}getLeverageList(){const{leverageList:e}=this.props;return e.map((e=>{var t;return{value:e.toString(),label:null!==(t=(0,pi.Q)(e))&&void 0!==t?t:(0,O.L)("n/a")}}))}}const vi=(0,n.$)(gi)(bi);var mi=s(9570);const ji=l()([(0,u.$)($.S).live(),(0,u.$)($.S).accountType(),(0,u.$)(ei.c).settings.ChangingAccountProperties.AccountType(),(0,u.$)(ei.c).settings.CreateLiveAccount.AllowedAccountTypes(),(0,u.$)(ei.c).settings.CreateDemoAccount.AllowedAccountTypes()],((e,t,s,i,o)=>{if(!s)return[t];let n;switch(e?i:o){case"Hedged":n=[mi.Qm.Hedged];break;case"HedgedAndNetted":n=[mi.Qm.Hedged,mi.Qm.Netted];break;case"Netted":n=[mi.Qm.Netted];break;default:n=[]}return[...new Set([t,...n])]}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),xi=l()([Pe.C,Ts,ji],((e,t,s)=>e?Os.ChangeAccountTypeDisabled:t||(s.length<2?Os.ChangeAccountTypeDisabled:void 0)))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),yi=l()([(0,u.$)($s).networkStatus(),(0,u.$)(Ds.g).networkStatus(),(0,u.$)($s).isAccountTypeFailed(),xi,ji,(0,u.$)(m.Z).copy.isEnabled(),Bs,(0,u.$)($.S).isFakeSpreadBetting()],((e,t,s,i,o,n,a,r)=>{const l=t===Cs.I.Started;return{isLoading:e===Cs.I.Started,isStrategyLoading:l,isAccountTypeFailed:s,accountTypeStatus:i,accountTypeList:o,isCopyEnabled:n,isCurrentAccountProvider:a,isFakeSpreadBetting:r}}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var Si=s(88292),fi=s(78325),Oi=s(22327);const Ci=(0,o.memo)((e=>{const{accountType:t,onCancelSubmit:s,onConfirmSubmit:n,onAccountTypeChange:a}=e,{isLoading:r,isStrategyLoading:l,isCopyEnabled:d,accountTypeList:c,isFakeSpreadBetting:u,isAccountTypeFailed:h,accountTypeStatus:g,isCurrentAccountProvider:p}=(0,ne.v)(yi),[b,v]=(0,o.useState)(!1),{t:m}=(0,Oi.$)(),j=(0,o.useMemo)((()=>b&&!l&&p),[b,l,p]),x=(0,o.useMemo)((()=>c.map((e=>({value:e,label:(0,Si.x)(e,u)})))),[c,u]),y=(0,o.useMemo)((()=>h?m("Account type change has not been applied"):void 0),[h,m]),S=(0,o.useMemo)((()=>Ws(g)),[g]),f=(0,o.useCallback)((e=>{a(e),d&&t!==mi.Qm.Netted&&e===mi.Qm.Netted&&v(!0)}),[d,t,a]),O=(0,o.useMemo)((()=>{const e=Boolean(g)||r||l||j;return(0,i.jsx)(ni.m,{options:x,value:t,error:y,wide:!0,disabled:e,onChange:f,testId:"account-type-select"},void 0)}),[x,t,y,g,r,l,j,f]),C=(0,o.useMemo)((()=>S?(0,i.jsxs)(zs.b,Object.assign({wide:!0},{children:[O,Ws(g)]}),void 0):(0,i.jsx)(i.Fragment,{children:O},void 0)),[S,O,g]),k=(0,o.useCallback)((()=>{v(!1),s()}),[v,s]),I=(0,o.useCallback)((()=>{v(!1),n()}),[v,n]);return(0,i.jsxs)(i.Fragment,{children:[b&&(0,i.jsx)(fi.j,{},void 0),(0,i.jsxs)(ge.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(Re.b,Object.assign({flexBasis:"30%"},{children:m("Account Type")}),void 0),(0,i.jsx)(Re.b,{children:j?(0,i.jsx)(Dt,Object.assign({title:m('Change Account Type to "Netting"'),caption:m("This account is providing strategy. The strategy will be deleted since Netting accounts are not allowed to provide strategies. Are you sure you want to proceed?"),onCancel:k,onConfirm:I},{children:C}),void 0):(0,i.jsx)(i.Fragment,{children:C},void 0)},void 0)]}),void 0)]},void 0)}));var ki=s(61823),Ii=s(54622);class Li extends o.Component{constructor(e){super(e),this.getAccountNameError=()=>{const{accountName:e}=this.state;return""===e.trim()&&""!==e?(0,O.L)("Account Name cannot consist of spaces only"):(null==e?void 0:e.length)>200?(0,O.L)("This field length must be less than or equal to {0} characters long",200):void 0},this.onCurrencyChange=e=>{const{cleanAttributesErrors:t}=this.props;this.setState({currencyId:e},(()=>{t()}))},this.onLeverageChange=e=>{const{cleanAttributesErrors:t}=this.props;this.setState({leverage:e},(()=>{t()}))},this.onAccountTypeChange=e=>{const{cleanAttributesErrors:t}=this.props;this.setState({accountType:e},(()=>{t()}))},this.onAccountNameChange=e=>{const{cleanAttributesErrors:t}=this.props;this.setState({accountName:e},(()=>{t()}))},this.onCancelSubmit=()=>{const{currentLeverage:e,currentDepositAssetId:t,currentAccountType:s}=this.props;this.setState({currencyId:t,leverage:e,accountType:s})},this.onConfirmSubmit=()=>{this.onSubmit()},this.onSubmit=()=>{const{currentAccountType:e,currentDepositAssetId:t,currentLeverage:s,currentAccountName:i,changeAttributes:o}=this.props,{currencyId:n,leverage:a,accountType:r,accountName:l}=this.state,d=null==l?void 0:l.trim();this.setState({accountName:d}),o({assetId:null!=n?n:t,leverage:null!=a?a:s,accountType:null!=r?r:e,accountName:null!=d?d:i})};const{currentAccountName:t}=e;this.state={currencyId:void 0,leverage:void 0,accountType:void 0,accountName:null!=t?t:""}}render(){const{styles:e}=this.props;return(0,i.jsx)("div",Object.assign({className:e.root},{children:this.renderContent()}),void 0)}renderContent(){const{isLoading:e,formStatus:t,isFailed:s,accountId:o,depositCurrency:n,currentAccountType:a,currentDepositAssetId:r,currentLeverage:l,currentAccountName:d}=this.props,{currencyId:c,leverage:u,accountType:h,accountName:g}=this.state;if(!o)return(0,i.jsx)(ge.X,{children:(0,O.L)("Please sign in to your trading account")},void 0);const p=void 0!==c&&c!==r||void 0!==u&&u!==l||void 0!==h&&h!==a||void 0!==g&&g!==d,b=this.getAccountNameError();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Ii.L,{assetName:n},void 0),(0,i.jsx)(_e.w,{children:(0,i.jsx)(ge.X,Object.assign({testId:"disable-title"},{children:Ws(t)}),void 0)},void 0),(0,i.jsxs)(_e.w,{children:[(0,i.jsxs)(ge.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(Re.b,Object.assign({flexBasis:"30%"},{children:(0,O.L)("Account Number")}),void 0),(0,i.jsx)(Re.b,{children:(0,i.jsx)(Hs.I,{value:String(o),readonly:!0,testId:"account-number"},void 0)},void 0)]}),void 0),(0,i.jsx)(ri,{currencyId:null!=c?c:r,onCurrencyChange:this.onCurrencyChange},void 0),(0,i.jsx)(vi,{leverage:null!=u?u:l,onLeverageChange:this.onLeverageChange},void 0),(0,i.jsx)(Ci,{accountType:null!=h?h:a,onAccountTypeChange:this.onAccountTypeChange,onCancelSubmit:this.onCancelSubmit,onConfirmSubmit:this.onConfirmSubmit},void 0),(0,i.jsxs)(ge.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(Re.b,Object.assign({flexBasis:"30%"},{children:(0,O.L)("Account Name")}),void 0),(0,i.jsx)(Re.b,Object.assign({testId:"account-name"},{children:(0,i.jsx)(ct.U,{onChange:this.onAccountNameChange,value:null!=g?g:d,placeholder:(0,O.L)("Enter custom account name"),error:b,wide:!0},void 0)}),void 0)]}),void 0)]},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsx)(ut.K,Object.assign({wide:!0,disabled:!p||e||Boolean(b),type:Lt.L.submit,onClick:this.onSubmit,testId:"submit"},{children:(0,O.L)("Apply")}),void 0)},void 0),s&&(0,i.jsx)(ge.X,{children:(0,i.jsx)(We.H,Object.assign({textColor:He.d.Error,isMultiLine:!0},{children:(0,O.L)("Changes have not been applied")}),void 0)},void 0)]},void 0)}}const wi=(0,n.$)(Rs,{changeAttributes:ki.F.change,cleanAttributesErrors:ki.F.clean})((0,x.Z)((()=>({root:{position:"relative",flexGrow:1}})))(Li));var Ti=s(43202);class Di extends o.Component{render(){return(0,i.jsx)(Ti.G,{},void 0)}}const Pi=Di;var Ni=s(46411),Ai=s(42571),Bi=s(93137);class Mi extends o.Component{render(){const{isFn:e,isCtrl:t,isAlt:s,isShift:o,children:n,styles:a}=this.props;return(0,i.jsxs)("div",Object.assign({className:a.root},{children:[e&&(0,i.jsxs)(i.Fragment,{children:["Fn",(0,i.jsx)("div",Object.assign({className:a.plus},{children:"+"}),void 0)]},void 0),t&&(0,i.jsxs)(i.Fragment,{children:[(0,Ni.E)(),(0,i.jsx)("div",Object.assign({className:a.plus},{children:"+"}),void 0)]},void 0),s&&(0,i.jsxs)(i.Fragment,{children:[(0,Ai.ad)()?"⌥":"Alt",(0,i.jsx)("div",Object.assign({className:a.plus},{children:"+"}),void 0)]},void 0),o&&(0,i.jsxs)(i.Fragment,{children:[(0,Bi.g)(),(0,i.jsx)("div",Object.assign({className:a.plus},{children:"+"}),void 0)]},void 0),n]}),void 0)}}const $i=(0,x.Z)((e=>{const{backgroundColor:t}=e.theme.palette.semantic;return{root:Object.assign(Object.assign(Object.assign(Object.assign({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",width:115,flexShrink:0,flexWrap:"wrap",alignSelf:"stretch"},(0,Q.O)({color:t.primaryNormal})),(0,V.E)(Z.q0)),(0,X.o)(Z.W0)),{marginRight:2*Z.W0,whiteSpace:"nowrap",overflow:"hidden"}),plus:{marginLeft:Z.W0,marginRight:Z.W0}}}))(Mi);var Ei=s(42151);const Fi=l()([(0,u.$)(c.H).data.isLcg()],(e=>({isLcg:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class Ri extends o.Component{render(){const{rules:e}=this.props;return(0,i.jsx)(At.s,{children:(0,i.jsxs)(qe.X,Object.assign({scrollBackgroundLayout:Xe.c.AllTransparent,extend:{root:e.root(this.props)}},{children:[(0,i.jsx)(_e.w,{children:this.renderGeneral()},void 0),(0,i.jsx)(_e.w,{children:this.renderChart()},void 0)]}),void 0)},void 0)}renderGeneral(){const{isLcg:e}=this.props;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ge.X,{children:(0,i.jsx)(Ei.X,{children:(0,O.L)("General")},void 0)},void 0),!e&&(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,{children:"F1"},void 0),(0,O.L)("Help Center")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,{children:"F2"},void 0),(0,O.L)("Switch between chart modes")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,{children:"F3"},void 0),(0,O.L)("Switch layout")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,{children:"F4"},void 0),st.Xp.replace("https://","")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,{children:"F9"},void 0),(0,O.L)("New Order Screen")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,{children:"F10"},void 0),(0,O.L)("Sounds On/Off")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,Object.assign({isShift:(0,Ai.ad)()},{children:"F11"}),void 0),(0,O.L)("Toggle Full Screen")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,Object.assign({isShift:!0},{children:"Q"}),void 0),(0,O.L)("Show/Hide Main Menu")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,Object.assign({isShift:!0},{children:"W"}),void 0),(0,O.L)("Show/Hide TradeWatch")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,Object.assign({isShift:!0},{children:"E"}),void 0),(0,O.L)("Show/Hide Active Symbol Panel")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,Object.assign({isCtrl:!0},{children:"Right"}),void 0),(0,O.L)("Switch to the next chart")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,Object.assign({isCtrl:!0},{children:"Left"}),void 0),(0,O.L)("Switch to the previous chart")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,Object.assign({isCtrl:!0},{children:"F"}),void 0),(0,O.L)("Search in All Symbols")]},void 0)},void 0)]},void 0)}renderChart(){const{isLcg:e}=this.props;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ge.X,{children:(0,i.jsx)(Ei.X,{children:(0,O.L)("Chart")},void 0)},void 0),(0,i.jsxs)(_e.w,{children:[(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,{children:"Left Arrow"},void 0),(0,O.L)("Scroll left (2 trendbars)")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,{children:"Right Arrow"},void 0),(0,O.L)("Scroll right (2 trendbars)")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,{children:"Page Up"},void 0),(0,O.L)("Fast scrolling to the left")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,{children:"Page Down"},void 0),(0,O.L)("Fast scrolling to the right")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,{children:"Home"},void 0),(0,O.L)("Scroll to the beggining of the chart")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,{children:"End"},void 0),(0,O.L)("Scroll to the end of the chart")]},void 0)},void 0)]},void 0),(0,i.jsxs)(_e.w,{children:[(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,{children:"+"},void 0),(0,O.L)("Zoom In")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,{children:"-"},void 0),(0,O.L)("Zoom Out")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,Object.assign({isCtrl:!0},{children:"Mouse Wheel"}),void 0),(0,O.L)("Zoom In / Zoom Out")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,{children:"Up Arrow"},void 0),(0,O.L)("Switch to next favorite timeframe")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,{children:"Down Arrow"},void 0),(0,O.L)("Switch to previous favorite timeframe")]},void 0)},void 0)]},void 0),(0,i.jsxs)(_e.w,{children:[(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,Object.assign({isCtrl:!0},{children:"A"}),void 0),(0,O.L)("Select all chart objects on chart")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,Object.assign({isCtrl:!0},{children:"C"}),void 0),(0,O.L)("Copy selected chart objects to clipboard")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,Object.assign({isCtrl:!0},{children:"V"}),void 0),(0,O.L)("Paste chart objects from clipboard")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,Object.assign({isCtrl:!0},{children:"X"}),void 0),(0,O.L)("Cut selected chart objects")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,{children:(0,Ai.ad)()?"Backspace":"Delete"},void 0),(0,O.L)("Delete selected objects")]},void 0)},void 0)]},void 0),(0,i.jsxs)(_e.w,{children:[(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,Object.assign({isCtrl:!0},{children:"Click"}),void 0),(0,O.L)("Add object to selection (Multiple selection)")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,Object.assign({isCtrl:!0},{children:"Drag object"}),void 0),(0,O.L)("Duplicate Object")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,Object.assign({isCtrl:!0},{children:"Draw"}),void 0),(0,O.L)("Hold Ctrl to continue drawing")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,Object.assign({isShift:!0},{children:"Line"}),void 0),(0,O.L)("Draw a line at an angle multiple of 45")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,Object.assign({isShift:!0},{children:"Rectangle"}),void 0),(0,O.L)("Draw square")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,Object.assign({isShift:!0},{children:"Ellipse"}),void 0),(0,O.L)("Draw circle")]},void 0)},void 0)]},void 0),(0,i.jsxs)(_e.w,{children:[(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,Object.assign({isFn:(0,Ai.G6)(),isCtrl:!0},{children:"H"}),void 0),(0,O.L)("Hide/Show all objects")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,Object.assign({isCtrl:!0},{children:"D"}),void 0),(0,O.L)("Manage Drawings on the chart")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,Object.assign({isCtrl:!0},{children:"I"}),void 0),(0,O.L)("Manage Indicators on the chart")]},void 0)},void 0)]},void 0),(0,i.jsxs)(_e.w,{children:[(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,Object.assign({isAlt:!0},{children:"1"}),void 0),(0,O.L)("Bar Chart")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,Object.assign({isAlt:!0},{children:"2"}),void 0),(0,O.L)("Candlestick Chart")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,Object.assign({isAlt:!0},{children:"3"}),void 0),(0,O.L)("Line Chart")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,Object.assign({isAlt:!0},{children:"4"}),void 0),(0,O.L)("Dots Chart")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,Object.assign({isAlt:!0},{children:"5"}),void 0),(0,O.L)("Area Chart")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,Object.assign({isAlt:!0},{children:"6"}),void 0),(0,O.L)("HLC Chart")]},void 0)},void 0)]},void 0),(0,i.jsxs)(_e.w,{children:[(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,Object.assign({isCtrl:!0},{children:"S"}),void 0),(0,O.L)("Enable/Disable Market Snapshot")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,Object.assign({isShift:!0},{children:(0,Ai.ad)()?"C":"C, MMB"}),void 0),(0,Ai.ad)()?(0,O.L)("Enable/Disable Crosshair"):(0,O.L)("Enable/Disable Crosshair (MMB always available)")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,Object.assign({isShift:!0},{children:"S"}),void 0),(0,O.L)("Enable/Disable Synchronize Crosshair")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,Object.assign({isCtrl:!0},{children:"G"}),void 0),(0,O.L)("Show/Hide Grid")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,Object.assign({isCtrl:!0},{children:"K"}),void 0),(0,O.L)("Show Ask")]},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,Object.assign({isCtrl:!0},{children:"B"}),void 0),(0,O.L)("Show Bid")]},void 0)},void 0),!e&&(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,i.jsx)($i,Object.assign({isCtrl:!0,isShift:!0},{children:"S"}),void 0),(0,O.L)("Chartshot of active chart")]},void 0)},void 0)]},void 0)]},void 0)}}const Wi=(0,n.$)(Fi)((0,x.Z)((()=>({root:{flexGrow:1}})))(Ri));var Hi=s(47007),zi=s(64860),Ji=s(64559);const Qi=(0,lt.a)({accountId:(0,u.$)($.S).traderLogin(),isIdActive:zi.Mg,marginStopOut:Hi.X,marginCallValidByType:Ji.y,isLcg:(0,u.$)(c.H).data.isLcg()})(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var _i=s(58558);const qi=l()([(0,u.$)(Ye.Y).idState()],(e=>({isConnected:e===_i.e.CONNECTED})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var Xi=s(21189);class Vi extends o.Component{constructor(){super(...arguments),this.handleClickActivation=()=>{const{sendConfirmationEmail:e}=this.props;e()}}render(){const{isConnected:e}=this.props;return(0,i.jsxs)(_e.w,{children:[(0,i.jsx)(ge.X,{children:(0,i.jsx)(ut.K,Object.assign({wide:!0,type:Lt.L.submit,onClick:this.handleClickActivation,disabled:!e,testId:"resend-confirmation-link"},{children:(0,O.L)("Resend confirmation link")}),void 0)},void 0),!e&&(0,i.jsx)(ge.X,{children:(0,O.L)("Establishing connection...")},void 0)]},void 0)}}const Zi=(0,n.$)(qi,{sendConfirmationEmail:Xi.I.sendConfirmationEmail})(Vi),Ui=l()([(0,u.$)(c.H).data.isLcg(),(0,u.$)(zi.pu).email(),zi.Mg],((e,t,s)=>!(e||void 0!==t&&s)))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var Ki=s(94070),Yi=s(93167);const Gi=l()([(0,u.$)(Yi.F).networkStatus(),(0,Ae.P)().type()],((e,t)=>e[t]))(Object.assign({keySelector:(0,Ae.P)().type()},(0,d.jo)())),eo=(0,lt.a)({checked:(0,u.$)(Ki.s).sendEmail(),disabled:Ui,error:(0,u.$)(Gi).message()})(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().type()}));var to=s(49520),so=s(93269);class io extends o.PureComponent{render(){const{checked:e,indeterminate:t,size:s,title:o,disabled:n,readonly:a,backgroundKind:r,uncheckedChevronColor:l,checkboxIcon:d,onChange:c,error:u,children:h,rules:g,testId:p}=this.props;return(0,i.jsx)(so.c,Object.assign({error:u,disabled:n},{children:(0,i.jsx)(Ie.J,Object.assign({checked:e,indeterminate:t,size:s,title:o,disabled:n,readonly:a,backgroundKind:r,uncheckedChevronColor:l,checkboxIcon:d,onChange:c,testId:p,extend:{label:g.label(this.props)}},{children:h}),void 0)}),void 0)}}const oo=(0,x.Z)((e=>{const{disabled:t,error:s}=e,{foregroundColor:i}=e.theme.palette.semantic,o={color:i.error};return{label:Boolean(s)&&!t?o:{}}}))(io);class no extends o.Component{constructor(){super(...arguments),this.handleChange=e=>{const{type:t,updateEmailNotification:s}=this.props;s({notificationType:t,sendEmail:e})}}render(){const{checked:e,disabled:t,error:s,label:o}=this.props;return(0,i.jsx)(oo,Object.assign({checked:e,error:s,disabled:t,onChange:this.handleChange,testId:(0,Ve.Z)(o)},{children:o}),void 0)}}const ao=(0,n.$)(eo,{updateEmailNotification:to.R.update})(no),ro=(0,lt.a)({checked:(0,u.$)($.S).sendOwnStatement(),disabled:Ui,error:(0,u.$)((e=>e.accountAttributes)).networkError()})(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var lo=s(57718);class co extends o.Component{constructor(){super(...arguments),this.handleChange=e=>{const{changeOwnStatement:t}=this.props;t({ownStatement:e})}}render(){const{checked:e,disabled:t,error:s}=this.props;return(0,i.jsx)(oo,Object.assign({checked:e,error:s,disabled:t,onChange:this.handleChange,testId:"email-statements"},{children:(0,O.L)("Email Statements")}),void 0)}}const uo=(0,n.$)(ro,{changeOwnStatement:lo.W.change})(co);var ho=s(2258),go=s(596),po=s(588),bo=s(99310);const vo=l()([po.L,(0,u.$)(c.H).data.isLcg(),zi.Mg,(0,u.$)(zi.pu).sendMarketingNewsletters(),(0,u.$)(c.H).data.notificationManagerShowConfigureLink(),bo.D],((e,t,s,i,o,n)=>({cTraderIdName:e,configUrl:`${n}my/settings/notifications`,isHidden:t,isDisabled:!s,isNewsletterChecked:i,isNotificationEnabled:o})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var mo=s(59784),jo=s(97023),xo=s(97467);class yo extends o.Component{constructor(){super(...arguments),this.navigateToConfig=()=>{const{configUrl:e}=this.props;window.open(e,"_blank")},this.onChange=e=>{const{subscribe:t}=this.props;t(e)}}render(){const{isHidden:e,isNewsletterChecked:t,isDisabled:s,styles:o}=this.props;return e?null:(0,i.jsxs)("div",Object.assign({className:o.root},{children:[(0,i.jsx)(ge.X,Object.assign({marginBottom:0},{children:(0,i.jsx)(mo.A,{children:(0,O.L)("cTID Email Alerts and Notifications")},void 0)}),void 0),(0,i.jsx)(jo.D,{marginBottom:2*Z.W0},void 0),(0,i.jsxs)(_e.w,{children:[(0,i.jsx)(ge.X,{children:(0,i.jsx)(Ie.J,Object.assign({checked:t,onChange:this.onChange,disabled:s,testId:"newsletter-mailing"},{children:(0,O.L)("Subscribe for Newsletter mailing")}),void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsx)(ao,{type:xo.tI.NOTIFICATION_CTID_LOGIN,label:(0,O.L)("Notification on login")},void 0)},void 0)]},void 0),this.renderConfigLinkGroup()]}),void 0)}renderConfigLinkGroup(){const{rules:e,cTraderIdName:t,isDisabled:s,isNotificationEnabled:o}=this.props;return s||!o?null:(0,i.jsxs)(ge.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(Re.b,{children:`${t} ${(0,O.L)("Notifications")}`},void 0),(0,i.jsx)(Re.b,{children:(0,i.jsxs)(go.z,Object.assign({type:Lt.L.button,onClick:this.navigateToConfig,testId:"configure-notifications",extend:{root:e.configureButton(this.props),content:e.configureButtonContent(this.props)}},{children:[(0,i.jsx)("span",{children:(0,O.L)("Configure")},void 0),(0,i.jsx)(se.J,{source:ie.Y.ext,size:oe.J.ExtraSmall,extend:{root:e.configureButtonIcon(this.props)}},void 0)]}),void 0)},void 0)]}),void 0)}}const So=(0,n.$)(vo,{subscribe:ho.B.subscribe})((0,x.Z)((e=>{const t=e.theme.palette.semantic,{buttonBackgroundColor:s,foregroundColor:i}=t;return{root:{},configureButton:{width:120,height:21,color:i.primary2,fill:i.primary2,position:"relative",lineHeight:"unset",display:"flex",alignItems:"center",justifyContent:"center"},configureButtonContent:Object.assign(Object.assign({},(0,Q.O)({color:s.secondaryNormal})),{nested:{":hover":Object.assign({},(0,Q.O)({color:s.secondaryHover}))}}),configureButtonIcon:{display:"inline-flex",marginLeft:5,height:"auto"}}}))(yo)),fo=(0,lt.a)({idProductName:po.L,email:(0,u.$)(zi.pu).email(),isIdActive:zi.Mg,isHidden:(0,u.$)(c.H).data.isLcg()})(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class Oo extends o.Component{render(){const{isHidden:e,styles:t}=this.props;return e?null:(0,i.jsx)("div",Object.assign({className:t.root},{children:this.getDescription()}),void 0)}getDescription(){const{idProductName:e,email:t,isIdActive:s}=this.props;return void 0===t?(0,O.L)("Log in to your {0} to make changes",e):s?`${e} ${(0,O.L)("Email")}: ${t}. ${(0,O.L)("Please note that changes will be applied immediately")}`:(0,O.L)("Email Alerts will be disabled because your email {0} is not confirmed yet.",t)}}const Co=(0,n.$)(fo)((0,x.Z)((()=>({root:{alignSelf:"flex-end",marginTop:"auto"}})))(Oo));var ko=s(49839),Io=s(33650);const Lo=l()([Ui,(0,u.$)(Ki.s).sendEmail()],((e,t)=>e||!t))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().type()}));var wo=s(17226);const To=l()([(0,u.$)(wo.S).networkStatus(),(0,Ae.P)().type()],((e,t)=>e[t]))(Object.assign({keySelector:(0,Ae.P)().type()},(0,d.jo)())),Do=l()([(0,u.$)(To).message(),(0,u.$)(Gi).message()],((e,t)=>e||t))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().type()})),Po=(0,lt.a)({checked:(0,u.$)(Ki.s).sendEmail(),checkBoxDisabled:Ui,selectDisabled:Lo,selectedValue:(0,u.$)(ko.L).marginLevelThreshold(),networkError:Do,marginStopOut:Hi.X,isSelectedValueValid:Io.d})(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().type()}));var No=s(34430),Ao=s(93782);const Bo=[50,40,30,20,15,10,8,6,5,4,3.5,3,2.5,2,1.9,1.8,1.7,1.6,1.5,1.4,1.3,1.2,1.1,1,.9,.8,.7,.6,.5,.4,.3];function Mo(e,t){const s=(0,Ao.g)(e);return s===t?`${s}% (${(0,O.L)("Stop Out")})`:100===s?`${s}% (${(0,O.L)("Trading Restricted")})`:`${String(s)}%`}var $o=s(36700);class Eo extends o.Component{constructor(){super(...arguments),this.handleCheckboxChange=e=>{const{type:t,updateEmailNotification:s}=this.props;s({notificationType:t,sendEmail:e})},this.handleSelectChange=e=>{const{type:t,updateMarginCall:s}=this.props;s({notificationType:t,marginLevelThreshold:(0,oi.J)(e)})}}render(){const{checked:e,selectDisabled:t,checkBoxDisabled:s,label:o,selectedValue:n}=this.props,a=this.getError();return(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexGrow:0},{children:(0,i.jsx)(Ie.J,Object.assign({checked:e,disabled:s,onChange:this.handleCheckboxChange,testId:`${(0,Ve.Z)(o)}-checkbox`},{children:(0,i.jsx)("span",{children:o},void 0)}),void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({flexBasis:180},{children:(0,i.jsx)(ni.m,{options:this.getOptionList(),value:null==n?void 0:n.toString(),error:a,disabled:t,onChange:this.handleSelectChange,testId:`${(0,Ve.Z)(o)}-input`},void 0)}),void 0)]},void 0)}getOptionList(){const{marginStopOut:e}=this.props;return this.getMarginValues().map((t=>({value:t.toString(),label:Mo(t,e)})))}getMarginValues(){const{marginStopOut:e}=this.props;return[...new Set([...Bo,(0,$o.FY)(e)])].sort(((e,t)=>e-t))}getError(){const{networkError:e,isSelectedValueValid:t}=this.props;return t?e:(0,O.L)("Value is already selected. Please select different one.")}}const Fo=(0,n.$)(Po,{updateEmailNotification:to.R.update,updateMarginCall:No.s.update})((0,x.Z)((()=>({marginCallSelect:{width:180}})))(Eo));class Ro extends o.Component{render(){const{accountId:e,isIdActive:t,isLcg:s,styles:o}=this.props,n=!t&&!s;return(0,i.jsxs)("div",Object.assign({className:o.root},{children:[n&&(0,i.jsx)(Zi,{},void 0),(0,i.jsx)(_e.w,{children:(0,i.jsxs)(ge.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(Re.b,Object.assign({flexBasis:"30%"},{children:(0,O.L)("Account Number")}),void 0),(0,i.jsx)(Re.b,{children:(0,i.jsx)(Hs.I,{value:String(e),readonly:!0,testId:"account-number"},void 0)},void 0)]}),void 0)},void 0),this.renderNotifications(),this.renderMarginLevels(),!s&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ao,{type:xo.tI.NOTIFICATION_DEPOSIT_WITHDRAW,label:(0,O.L)("Deposit/Withdrawal")},void 0),(0,i.jsx)(Bt.I,{},void 0)]},void 0),(0,i.jsx)(_e.w,{children:(0,i.jsx)(ge.X,{children:(0,i.jsx)(uo,{},void 0)},void 0)},void 0),(0,i.jsx)(So,{},void 0),(0,i.jsx)(Co,{},void 0)]}),void 0)}renderNotifications(){const{marginStopOut:e}=this.props,t=[[xo.tI.NOTIFICATION_TAKE_PROFIT_ORDER_FILLED,(0,O.L)("Take Profit")],[xo.tI.NOTIFICATION_STOP_LOSS_ORDER_FILLED,(0,O.L)("Stop Loss")],[xo.tI.NOTIFICATION_PENDING_ORDER_FILLED,(0,O.L)("Pending Order Filled")],[xo.tI.NOTIFICATION_STOP_OUT_LEVEL,`${(0,O.L)("Smart Stop Out")} (${e}%)`]];return(0,i.jsx)(_e.w,{children:t.map((([e,t])=>(0,i.jsx)(ge.X,{children:(0,i.jsx)(ao,{type:e,label:t},void 0)},e)))},void 0)}renderMarginLevels(){const e=[[xo.tI.NOTIFICATION_MARGIN_LEVEL_THRESHOLD_1,`${(0,O.L)("Custom Margin Call")} #1`],[xo.tI.NOTIFICATION_MARGIN_LEVEL_THRESHOLD_2,`${(0,O.L)("Custom Margin Call")} #2`],[xo.tI.NOTIFICATION_MARGIN_LEVEL_THRESHOLD_3,`${(0,O.L)("Custom Margin Call")} #3`]];return(0,i.jsxs)(_e.w,{children:[e.map((([e,t])=>(0,i.jsx)(Fo,{type:e,label:t},e))),this.renderMarginLevelValidation()]},void 0)}renderMarginLevelValidation(){const{marginCallValidByType:e}=this.props;return e[xo.tI.NOTIFICATION_MARGIN_LEVEL_THRESHOLD_1]&&e[xo.tI.NOTIFICATION_MARGIN_LEVEL_THRESHOLD_2]&&e[xo.tI.NOTIFICATION_MARGIN_LEVEL_THRESHOLD_3]?null:(0,i.jsx)(ge.X,{children:(0,i.jsx)(We.H,Object.assign({textColor:He.d.Error,isMultiLine:!0},{children:(0,O.L)("Value is already selected. Please select different one.")}),void 0)},void 0)}}const Wo=(0,n.$)(Qi)((0,x.Z)((()=>({root:{flexGrow:1,display:"flex",flexDirection:"column"}})))(Ro));var Ho=s(15215),zo=s(5890);const Jo=(0,_s.X)((0,u.$)($.S).accountId(),d.mr).chain((e=>(0,qs.t)(zo.i,{accountId:e},d.iN))).build(),Qo=l()([(0,u.$)($.S).accountId(),Jo],((e,t)=>({accountId:e,investorPassword:t})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var _o=s(57448),qo=s(24530),Xo=s(77863),Vo=s(75039),Zo=s(35122),Uo=s(5799);const Ko=l()([(0,u.$)($.S).accountId(),Jo,(0,u.$)(Uo.q).networkStatus()],((e,t,s)=>({isLoading:s!==Cs.I.Done&&s!==Cs.I.Failed,accountId:e,investorPassword:t})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),Yo=(0,o.memo)((()=>{const{isLoading:e,accountId:t,investorPassword:s}=(0,ne.v)(Ko,{}),n=(0,re.I0)(),a=(0,o.useCallback)((()=>{n(Vo.M.open(t))}),[n,t]),{link:r,embedCode:l}=(0,o.useMemo)((()=>{const e=`${window.location.origin}/profiles/${s}`;return{link:e,embedCode:`<iframe src="${e}" frameborder="none" style="width: 100%; height: 100%;"></iframe>`}}),[s]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ge.X,{children:(0,i.jsx)(Re.b,{children:`${(0,O.L)("Link")}:`},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsx)(Hs.I,{value:r,readonly:!0},void 0)},void 0),(0,i.jsx)(Bt.I,{height:2*Z.W0},void 0),(0,i.jsxs)(ge.X,Object.assign({justifyContent:"flex-end"},{children:[(0,i.jsx)(Re.b,Object.assign({flexBasis:"25%"},{children:(0,i.jsx)(tt.b,Object.assign({wide:!0,text:`${r}`},{children:(0,O.L)("Copy Link")}),void 0)}),void 0),(0,i.jsx)(es.q,{width:2*Z.W0},void 0),(0,i.jsx)(Re.b,Object.assign({flexBasis:"25%"},{children:(0,i.jsx)(qo.z,Object.assign({wide:!0,type:Lt.L.submit,onClick:a,disabled:e},{children:(0,O.L)("Revoke Access")}),void 0)}),void 0)]}),void 0),(0,i.jsx)(Bt.I,{height:2*Z.W0},void 0),(0,i.jsx)(ge.X,{children:`${(0,O.L)("Embeddable code")}:`},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsx)(Xo.K,{disabled:!0,value:l,extend:{root:{minHeight:50}}},void 0)},void 0),(0,i.jsx)(Bt.I,{height:2*Z.W0},void 0),(0,i.jsx)(ge.X,Object.assign({justifyContent:"flex-end"},{children:(0,i.jsx)(Re.b,Object.assign({flexBasis:"25%"},{children:(0,i.jsx)(tt.b,Object.assign({text:l,wide:!0},{children:(0,O.L)("Copy")}),void 0)}),void 0)}),void 0),(0,i.jsx)(Zo.p,{},void 0)]},void 0)}));var Go=s(59009);const en=l()([(0,u.$)($.S).accountId(),(0,u.$)(Uo.q).networkStatus()],((e,t)=>({accountId:e,isLoading:t!==Cs.I.Done&&t!==Cs.I.Failed})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),tn=(0,o.memo)((()=>{const{accountId:e,isLoading:t}=(0,ne.v)(en),s=(0,re.I0)(),n=(0,o.useCallback)((()=>{s(Go.T.create(e))}),[s,e]);return(0,i.jsx)(ge.X,{children:(0,i.jsx)(ut.K,Object.assign({wide:!0,type:Lt.L.submit,onClick:n,disabled:t},{children:(0,O.L)("Create Link")}),void 0)},void 0)})),sn=(0,o.memo)((()=>{const{accountId:e,investorPassword:t}=(0,ne.v)(Qo,{});return(0,i.jsxs)(_e.w,{children:[(0,i.jsx)(_o.d,{accountId:e},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsx)(Re.b,{children:(0,O.L)("Share your accounts trader statistics with everyone who has a link. Or embed statistics to your web page")},void 0)},void 0),(0,i.jsx)(Bt.I,{height:2*Z.W0},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsx)(Re.b,{children:(0,O.L)("Account Number")},void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsx)(Hs.I,{value:e,readonly:!0},void 0)},void 0),(0,i.jsx)(Bt.I,{height:2*Z.W0},void 0),t?(0,i.jsx)(Yo,{},void 0):(0,i.jsx)(tn,{},void 0)]},void 0)}));var on=s(40629),nn=s(28917);const an=e=>e.sharedAccess,rn=l()([(0,u.$)($.S).traderLogin(),(0,u.$)($.S).sharedWith(),(0,u.$)($.S).ctidTraderAccountId(),(0,u.$)(an).networkStatus(),(0,u.$)(an).errorCode()],((e,t,s,i,o)=>({accountId:e,sharedWith:t,ctidTraderAccountId:s,networkStatus:i,errorCode:o,isLoading:i===Cs.I.Started})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var ln=s(34864),dn=s(48540);const cn=(0,o.memo)((()=>{const{accountId:e,sharedWith:t,ctidTraderAccountId:s,isLoading:n,errorCode:a}=(0,ne.v)(rn),{t:r}=(0,on.q)(),l=(0,re.I0)(),[d,c]=(0,o.useState)("");(0,o.useEffect)((()=>()=>{l(ln.N.reset())}),[l]);const u=(0,o.useCallback)((()=>{l(ln.N.share({ctidTraderAccountId:s,shareWith:d}))}),[s,d,l]),h=(0,o.useCallback)((()=>{l(ln.N.revoke({ctidTraderAccountId:s}))}),[s,l]),g=(0,o.useCallback)((e=>{a&&l(ln.N.reset()),c(e)}),[c,a,l]),p=(e=>{const{t}=(0,on.q)();return(0,o.useMemo)((()=>{switch(e){case dn.yQ.TraderAccountNotFound:return t("Account not found");case dn.yQ.NotFound:return t("No user found for this email / cTrader ID.");case void 0:return;default:return t("Unknown error")}}),[e,t])})(a);return(0,i.jsxs)("div",{children:[(0,i.jsx)(_e.w,{children:(0,i.jsx)(ge.X,Object.assign({testId:"disable-title"},{children:r("Share access to your trading account with another person (cTrader ID). Shared account will appear with another person in the account list under Accounts Shared With You sections. You and another person can stop sharing at any time.")}),void 0)},void 0),(0,i.jsxs)(_e.w,{children:[(0,i.jsx)(ge.X,Object.assign({justifyContent:"space-between"},{children:(0,i.jsx)(Re.b,{children:r("Account Number")},void 0)}),void 0),(0,i.jsx)(ge.X,{children:(0,i.jsx)(Re.b,{children:(0,i.jsx)(Hs.I,{value:String(e),readonly:!0,testId:"account-number"},void 0)},void 0)},void 0),t?(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(Re.b,{children:(0,i.jsx)(ct.U,{value:t,readonly:!0,testId:"share-access-input",wide:!0,error:void 0},void 0)},void 0),(0,i.jsx)(Re.b,Object.assign({flexGrow:0},{children:(0,i.jsx)(qo.z,Object.assign({testId:"revoke-access-button",onClick:h},{children:r("Revoke Access")}),void 0)}),void 0)]},void 0):(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(Re.b,{children:(0,i.jsx)(ct.U,{value:d,onChange:g,testId:"share-access-input",error:void 0,placeholder:r("Enter email or cTrader ID"),wide:!0,disabled:n},void 0)},void 0),(0,i.jsx)(Re.b,Object.assign({flexGrow:0,flexBasis:"20%"},{children:n?(0,i.jsx)(nn.f,{children:r("Sharing")},void 0):(0,i.jsx)(ut.K,Object.assign({testId:"share-access-button",onClick:u},{children:r("Share Access")}),void 0)}),void 0)]},void 0),p&&(0,i.jsx)(ge.X,Object.assign({testId:"error-message"},{children:(0,i.jsx)(We.H,Object.assign({textColor:He.d.Error,isMultiLine:!0},{children:p}),void 0)}),void 0)]},void 0)]},void 0)}));var un=s(98514),hn=s(24664);const gn=e=>e.settingsDialog;var pn=s(53165);const bn=l()([(0,u.$)(gn).isShown(),(0,u.$)(gn).page(),rt.i,(0,u.$)(m.Z).fixApi.isEnabled(),(0,u.$)($.S).traderLogin(),(0,u.$)($.S).accountType(),(0,u.$)($.S).isFakeSpreadBetting(),pn.O,(0,u.$)(hn.r).activeWorkspace(),(0,u.$)(m.Z).investorAccess.isEnabled()],((e,t,s,i,o,n,a,r,l,d)=>({accountId:o,accountType:n,isFakeSpreadBetting:a,isShown:e,settingsPage:t,productName:s,fixApiAvailable:i,windowSize:r,activeWorkspaceName:l,assetsAvailable:!0,isInvestorAccessEnabled:d})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var vn=s(58779),mn=s(63324);class jn extends o.Component{constructor(){super(...arguments),this.onSelectPage=(e,t)=>{const{open:s}=this.props;s(t)},this.onClose=()=>{const{close:e}=this.props;e()}}render(){const{isShown:e,productName:t,styles:s,settingsPage:o}=this.props;if(!e)return null;const n=function(e){const{accountId:t,accountType:s,isFakeSpreadBetting:i,isInvestorAccessEnabled:o}=e,n=e.fixApiAvailable?{[Ho.I.Advanced]:{title:(0,O.L)("Advanced"),pages:{[Ho.b.AdvancedFixApi]:{title:(0,O.L)("FIX API"),description:(0,O.L)("FIX API (a/c {0} {1})",t,(0,Si.x)(s,i)),icon:ie.Y.fixApi,component:xt,testId:"fix-api"}}}}:{},a=(0,fe.h1)(e.activeWorkspaceName),r=e.assetsAvailable?{[Ho.b.ApplicationAssets]:{title:(0,O.L)("Assets"),description:a((0,O.L)("Assets")),icon:ie.Y.assets,component:Ue,testId:"assets"}}:void 0;return Object.assign({[Ho.I.Account]:{title:(0,O.L)("Account"),pages:Object.assign(Object.assign({[Ho.b.AccountProperties]:{title:(0,O.L)("Properties"),description:(0,O.L)("Trading Account Properties"),icon:ie.Y.properties,component:wi,testId:"properties"},[Ho.b.AccountEmailAlerts]:{title:(0,O.L)("Email Alerts"),description:(0,O.L)("Trading Account Email Alerts"),icon:ie.Y.emailAlerts,component:Wo,testId:"email"}},un.im?{[Ho.b.SharedAccess]:{title:(0,O.L)("Shared Access"),description:(0,O.L)("Shared Access"),icon:ie.Y.sharedAccess,component:cn,testId:"shared-access"}}:{}),o?{[Ho.b.InvestorAccess]:{title:(0,O.L)("Investor Access"),description:(0,O.L)("Investor Access"),icon:ie.Y.share,component:sn,testId:"investor-access"}}:{})},[Ho.I.Application]:{title:(0,O.L)("Application"),pages:Object.assign(Object.assign({[Ho.b.ApplicationProperties]:{title:(0,O.L)("General"),icon:ie.Y.general,component:rs,testId:"general"}},r),{[Ho.b.ApplicationMarketWatch]:{title:(0,O.L)("Market Watch"),description:a((0,O.L)("Market Watch")),icon:ie.Y.marketWatch,component:ps,testId:"market-watch"},[Ho.b.ApplicationNotification]:{title:(0,O.L)("Notifications"),description:a((0,O.L)("Notifications")),icon:ie.Y.notifications,component:fs,testId:"notification"},[Ho.b.ApplicationQuickTrade]:{title:(0,O.L)("QuickTrade"),description:a((0,O.L)("QuickTrade Mode")),icon:ie.Y.quickTrade,component:Pi,testId:"quick-trade"},[Ho.b.ApplicationHotKeys]:{title:(0,O.L)("Hotkeys"),description:(0,O.L)("Hotkeys"),icon:ie.Y.hotKeys,component:Wi,testId:"hotkeys"}})}},n)}(this.props),a=function(e,t){return Object.values(e).map((e=>e.pages)).reduce(((e,t)=>Object.assign(Object.assign({},e),t)),{})[t]}(n,o),r=a.component;return(0,i.jsxs)(ye.M,Object.assign({title:`${(0,O.L)("Settings")} - ${t}`,onClose:this.onClose,width:570,height:680,testId:"settings-dialog"},{children:[(0,i.jsx)(Se.N,{groups:n,activePage:o,onSelectPage:this.onSelectPage},void 0),(0,i.jsxs)("div",Object.assign({className:s.root},{children:[(0,i.jsx)(ge.X,Object.assign({marginBottom:0},{children:(0,i.jsx)(mo.A,{children:a.description||a.title},void 0)}),void 0),(0,i.jsx)(jo.D,{marginBottom:2*Z.W0},void 0),(0,i.jsx)("div",Object.assign({className:s.pageContent},{children:(0,i.jsx)(r,{},void 0)}),void 0)]}),void 0)]}),void 0)}}const xn=(0,n.$)(bn,{open:mn.z.open,close:mn.z.close})((0,x.Z)((e=>{const{backgroundColor:t}=e.theme.palette.semantic;return{root:Object.assign(Object.assign({},(0,vn.f)(1)),{display:"flex",flexDirection:"column"}),leftColumn:{},pageRoot:Object.assign(Object.assign({},(0,Q.O)({color:t.secondaryNormal})),{display:"flex",flexDirection:"column"}),pageContent:{flexGrow:1,display:"flex"}}}))(jn));var yn=s(84985),Sn=s(74212),fn=s(68904);const On=l()([(0,qs.t)(fn.l,{imageName:"notification.png"},d.iN)],(e=>({notificationImage:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class Cn extends o.Component{constructor(){super(...arguments),this.state={isHidding:!1},this.onBodyClick=()=>{const{clickCallback:e}=this.props;e&&e()},this.onClose=()=>{const{notifyKey:e,hideNotification:t}=this.props,{isHidding:s}=this.state;s||(this.unbindCloseTimer(),t(e))},this.hide=()=>{const{notifyKey:e,hideNotification:t}=this.props;this.setState({isHidding:!0}),window.setTimeout((()=>{t(e)}),1e3)}}componentDidMount(){const{status:e}=this.props;e!==bs.Ez.Waiting&&this.bindCloseTimer()}componentDidUpdate(e){const{status:t}=this.props;t!==e.status&&t!==bs.Ez.Waiting&&(this.unbindCloseTimer(),this.bindCloseTimer())}componentWillUnmount(){this.unbindCloseTimer()}render(){const{status:e,title:t,content:s,styles:o,rules:n}=this.props,{isHidding:a}=this.state;return(0,i.jsxs)("div",Object.assign({className:a?o.hiddingRoot:o.root,onClick:this.onBodyClick},{children:[(0,i.jsx)("div",{className:o.logo},void 0),(0,i.jsxs)("div",Object.assign({className:o.body},{children:[(0,i.jsxs)("div",Object.assign({className:o.title},{children:[(0,i.jsx)("div",Object.assign({className:o.message},{children:(0,i.jsx)(yn.h,{text:t,status:e},void 0)}),void 0),(0,i.jsx)(se.J,{source:ie.Y.cross,size:oe.J.Control,onClick:this.onClose,extend:{root:n.closeIcon(this.props)}},void 0)]}),void 0),(0,i.jsx)("div",Object.assign({className:o.text},{children:s}),void 0)]}),void 0)]}),void 0)}bindCloseTimer(){this.hideTimeout=window.setTimeout((()=>{this.hide()}),Sn.G)}unbindCloseTimer(){window.clearTimeout(this.hideTimeout)}}const kn=(0,n.$)(On,{hideNotification:js.X.hide})((0,x.Z)((e=>{const{notificationImage:t}=e,{backgroundColor:s,foregroundColor:i}=e.theme.palette.semantic,o=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({position:"relative",right:0,display:"flex",flexDirection:"row",alignItems:"flex-start"},(0,Q.O)({color:s.notificationNormal})),{color:i.primary2,border:"1px solid rgba(0, 0, 0, 0.2)",minHeight:69}),(0,V.E)(Z.q0)),(0,X.o)(Z.W0)),{width:"100%",cursor:"default",overflow:"hidden",transition:"opacity 1s",marginBottom:Z.W0,nested:{":last-child":{marginBottom:0}}});return{root:Object.assign({},o),hiddingRoot:Object.assign(Object.assign({},o),{opacity:1}),logo:Object.assign({height:60,flexBasis:80},(0,Q.O)({image:`url(${t})`,repeat:"no-repeat",positionX:0,positionY:0})),body:Object.assign(Object.assign({},(0,vn.f)(1)),{overflow:"hidden"}),title:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:Z.W0},message:{display:"flex",flexDirection:"row",alignItems:"center",fontWeight:"bold"},text:{wordWrap:"break-word"},closeIcon:{justifyContent:"flex-end",fill:i.primary2}}}))(Cn));var In=s(74722);const Ln=l()([In.A,(0,u.$)(xs.V).mode(),(0,u.$)(Ye.Y).isAppActive()],((e,t,s)=>t!==bs.ED.Off&&s?t===bs.ED.ShowErrorsOnly?{notificationList:e.filter((e=>e.status===bs.Ez.Error))}:{notificationList:e}:{notificationList:[]}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class wn extends o.Component{render(){const{styles:e}=this.props;return(0,i.jsx)("div",Object.assign({className:e.root},{children:this.renderList()}),void 0)}renderList(){const{notificationList:e}=this.props;return e.map((e=>(0,i.jsx)(kn,Object.assign({},e,{notifyKey:e.key}),e.key)))}}const Tn=(0,n.$)(Ln)((0,x.Z)((()=>({root:Object.assign(Object.assign({position:"fixed",top:Z.W0,right:Z.W0,width:365},(0,Q.O)({color:"transparent"})),{zIndex:9999})})))(wn));var Dn=s(17882);const Pn=e=>e.helpCenterDialog,Nn=l()([(0,u.$)(Pn).isShown(),(0,u.$)(Pn).page(),rt.i],((e,t,s)=>({isShown:e,helpCenterPage:t,productName:s})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var An=s(36596),Bn=s(7424),Mn=s(1610);const $n=(0,x.Z)((e=>{const{foregroundColor:t,buttonBackgroundColor:s}=e.theme.palette.semantic;return{root:{},content:Object.assign({},(0,Mn.d)(e,{foregroundColorNormal:t.primary1,foregroundColorDisabled:t.primary1Disabled,backgroundColorNormal:s.positiveNormal,backgroundColorHover:s.positiveHover,backgroundColorDisabled:s.positiveDisabled})),text:{}}}))(Bn.Q),En=185,Fn=(0,o.memo)((()=>(0,i.jsxs)(ge.X,Object.assign({testId:"help-center-page",marginTop:4*Z.W0},{children:[(0,i.jsxs)(At.s,Object.assign({flexBasis:En},{children:[(0,i.jsx)(ge.X,Object.assign({marginBottom:2*Z.W0},{children:(0,i.jsx)(Bn.Q,Object.assign({title:"cTrader Desktop",to:`${st.Xp}/ctrader`,wide:!0,testId:"ctrader-desktop-link"},{children:"cTrader Desktop"}),void 0)}),void 0),(0,i.jsx)(ge.X,Object.assign({marginBottom:2*Z.W0},{children:(0,i.jsx)(Bn.Q,Object.assign({title:"cTrader Web",to:`${st.Xp}/ctrader-web`,wide:!0,testId:"ctrader-web-link"},{children:"cTrader Web"}),void 0)}),void 0),(0,i.jsx)(ge.X,Object.assign({marginBottom:2*Z.W0},{children:(0,i.jsx)(Bn.Q,Object.assign({title:"cTrader Mobile (Android)",to:`${st.Xp}/ctrader-mobile-android`,wide:!0,testId:"ctrader-android-link"},{children:"cTrader Mobile (Android)"}),void 0)}),void 0),(0,i.jsx)(ge.X,Object.assign({marginBottom:2*Z.W0},{children:(0,i.jsx)(Bn.Q,Object.assign({title:"cTrader Mobile (iOS)",to:`${st.Xp}/ctrader-mobile-ios`,wide:!0,testId:"ctrader-ios-link"},{children:"cTrader Mobile (iOS)"}),void 0)}),void 0),(0,i.jsx)(ge.X,Object.assign({marginBottom:2*Z.W0},{children:(0,i.jsx)(Bn.Q,Object.assign({title:"cTrader Copy",to:`${st.Xp}/ctrader-copy`,wide:!0,testId:"ctrader-copy-link"},{children:"cTrader Copy"}),void 0)}),void 0),(0,i.jsx)(ge.X,Object.assign({marginBottom:2*Z.W0},{children:(0,i.jsx)(Bn.Q,Object.assign({title:"cTrader Automate",to:`${st.Xp}/ctrader-automate`,wide:!0,testId:"ctrader-automate-link"},{children:"cTrader Automate"}),void 0)}),void 0),(0,i.jsx)(ge.X,{children:(0,i.jsx)(Bn.Q,Object.assign({title:"cTrader Analyze",to:`${st.Xp}/ctrader-analyze`,wide:!0,testId:"ctrader-analyze-link"},{children:"cTrader Analyze"}),void 0)},void 0),(0,i.jsx)(Bt.I,{height:4*Z.W0},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsx)($n,Object.assign({title:(0,O.L)("Video Library"),to:`${st.Xp}/video-library`,wide:!0,testId:"video-library-link"},{children:(0,O.L)("Video Library")}),void 0)},void 0)]}),void 0),(0,i.jsxs)(At.s,Object.assign({flexBasis:En,marginLeft:6*Z.W0},{children:[(0,i.jsx)(ge.X,Object.assign({marginBottom:2*Z.W0},{children:(0,i.jsx)(Bn.Q,Object.assign({title:"cTrader ID (cTID)",to:`${st.Xp}/ctrader-id/general`,wide:!0,testId:"ctrader-id-link"},{children:"cTrader ID (cTID)"}),void 0)}),void 0),(0,i.jsx)(ge.X,Object.assign({marginBottom:2*Z.W0},{children:(0,i.jsx)(Bn.Q,Object.assign({title:(0,O.L)("Bonuses"),to:`${st.Xp}/bonuses`,wide:!0,testId:"bonuses-link"},{children:(0,O.L)("Bonuses")}),void 0)}),void 0),(0,i.jsx)(ge.X,Object.assign({marginBottom:2*Z.W0},{children:(0,i.jsx)(Bn.Q,Object.assign({title:(0,O.L)("Partner Center"),to:`${st.Xp}/partners/becoming`,wide:!0,testId:"partner-center-link"},{children:(0,O.L)("Partner Center")}),void 0)}),void 0),(0,i.jsx)(ge.X,Object.assign({marginBottom:2*Z.W0},{children:(0,i.jsx)(Bn.Q,Object.assign({title:(0,O.L)("FIX API"),to:`${st.Xp}/fix`,wide:!0,testId:"fix-api-link"},{children:(0,O.L)("FIX API")}),void 0)}),void 0)]}),void 0)]}),void 0)));var Rn=s(77388);const Wn=(0,pe.f)((()=>s.e(879).then(s.bind(s,88866)).then((({WhatsNewDialogContent:e})=>e))));class Hn extends o.Component{render(){const{rules:e}=this.props;return(0,i.jsx)(Wn,{tabMode:Rn.H.RadioSwitch,extend:{body:e.whatsNewBody,content:e.whatsNewContent}},void 0)}}const zn=(0,x.Z)((()=>({whatsNewBody:{paddingLeft:0,marginBottom:0},whatsNewContent:{paddingRight:0}})))(Hn),Jn=(0,lt.a)({isFeaturedBrokersEnabled:(0,u.$)(c.H).data.isFeaturedBrokersEnabled()})(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class Qn extends o.Component{render(){const{isFeaturedBrokersEnabled:e}=this.props;return(0,i.jsx)(ge.X,Object.assign({marginTop:4*Z.W0},{children:(0,i.jsxs)(At.s,Object.assign({flexBasis:En},{children:[(0,i.jsx)(ge.X,Object.assign({marginBottom:2*Z.W0},{children:(0,i.jsx)(Bn.Q,Object.assign({title:(0,O.L)("Forum"),to:`${st.Vx}forum`,wide:!0,testId:"forum-link"},{children:(0,O.L)("Forum")}),void 0)}),void 0),(0,i.jsx)(ge.X,Object.assign({marginBottom:2*Z.W0},{children:(0,i.jsx)(Bn.Q,Object.assign({title:(0,O.L)("Telegram Chat"),to:"https://t.me/cTrader_Official",wide:!0,testId:"telegram-link"},{children:(0,O.L)("Telegram Chat")}),void 0)}),void 0),(0,i.jsx)(ge.X,Object.assign({marginBottom:2*Z.W0},{children:(0,i.jsx)(Bn.Q,Object.assign({title:(0,O.L)("Indicators"),to:`${st.Vx}algos/indicators`,wide:!0,testId:"indicators-link"},{children:(0,O.L)("Indicators")}),void 0)}),void 0),(0,i.jsx)(ge.X,Object.assign({marginBottom:2*Z.W0},{children:(0,i.jsx)(Bn.Q,Object.assign({title:"cBots",to:`${st.Vx}algos/cbots`,wide:!0,testId:"cbots-link"},{children:"cBots"}),void 0)}),void 0),(0,i.jsx)(ge.X,Object.assign({marginBottom:2*Z.W0},{children:(0,i.jsx)(Bn.Q,Object.assign({title:(0,O.L)("Freelance"),to:`${st.Vx}jobs`,wide:!0,testId:"freelance-link"},{children:(0,O.L)("Freelance")}),void 0)}),void 0),e&&(0,i.jsx)(ge.X,Object.assign({marginBottom:2*Z.W0},{children:(0,i.jsx)(Bn.Q,Object.assign({title:(0,O.L)("Partners"),to:`${st.Vx}featured-brokers`,wide:!0,testId:"partners-link"},{children:(0,O.L)("Partners")}),void 0)}),void 0),(0,i.jsx)(ge.X,Object.assign({marginBottom:2*Z.W0},{children:(0,i.jsx)(Bn.Q,Object.assign({title:"API",to:`${st.Vx}api/reference`,wide:!0,testId:"api-link"},{children:"API"}),void 0)}),void 0),(0,i.jsx)(ge.X,Object.assign({marginBottom:2*Z.W0},{children:(0,i.jsx)(Bn.Q,Object.assign({title:(0,O.L)("Suggestions"),to:`${st.Vx}forum/suggestions`,wide:!0,testId:"suggestions-link"},{children:(0,O.L)("Suggestions")}),void 0)}),void 0)]}),void 0)}),void 0)}}const _n=(0,n.$)(Jn)(Qn),qn=(0,o.memo)((()=>(0,i.jsxs)(At.s,Object.assign({marginTop:4*Z.W0},{children:[(0,i.jsx)(ge.X,Object.assign({marginBottom:4*Z.W0},{children:(0,i.jsxs)(At.s,Object.assign({flexBasis:En},{children:[(0,i.jsx)(ge.X,Object.assign({marginBottom:2*Z.W0},{children:(0,i.jsx)(Bn.Q,Object.assign({title:"API Reference 2.0",to:`${st.KD}open_api_2`,wide:!0,testId:"api-reference-link"},{children:"API Reference 2.0"}),void 0)}),void 0),(0,i.jsx)(ge.X,{children:(0,i.jsx)(Bn.Q,Object.assign({title:(0,O.L)("Examples"),to:`${st.KD}open_api_2/example_projects`,wide:!0,testId:"examples-link"},{children:(0,O.L)("Examples")}),void 0)},void 0)]}),void 0)}),void 0),(0,i.jsx)(ge.X,Object.assign({marginBottom:4*Z.W0},{children:(0,i.jsxs)(At.s,Object.assign({flexBasis:En},{children:[(0,i.jsx)(ge.X,Object.assign({marginBottom:2*Z.W0},{children:(0,i.jsx)(Bn.Q,Object.assign({title:(0,O.L)("Terms of Use"),to:`${st.KD}terms-of-use`,wide:!0,testId:"term-of-use-link"},{children:(0,O.L)("Terms of Use")}),void 0)}),void 0),(0,i.jsx)(ge.X,{children:(0,i.jsx)(Bn.Q,Object.assign({title:(0,O.L)("Privacy Policy"),to:`${st.KD}Privacy-Policy`,wide:!0,testId:"privacy-policy-link"},{children:(0,O.L)("Privacy Policy")}),void 0)},void 0)]}),void 0)}),void 0),(0,i.jsx)(ge.X,Object.assign({marginBottom:4*Z.W0},{children:(0,i.jsxs)(At.s,Object.assign({flexBasis:En},{children:[(0,i.jsx)(ge.X,Object.assign({marginBottom:2*Z.W0},{children:(0,i.jsx)(Bn.Q,Object.assign({title:(0,O.L)("Tutorials"),to:`${st.KD}open_api_2/getting_started_v2`,wide:!0,testId:"tutorials-link"},{children:(0,O.L)("Tutorials")}),void 0)}),void 0),(0,i.jsx)(ge.X,{children:(0,i.jsx)(Bn.Q,Object.assign({title:"FAQ",to:`${st.KD}frequently-asked-questions`,wide:!0,testId:"faq-link"},{children:"FAQ"}),void 0)},void 0)]}),void 0)}),void 0)]}),void 0)));class Xn extends o.Component{render(){const{title:e,children:t,styles:s}=this.props;return(0,i.jsxs)("div",Object.assign({className:s.root},{children:[e&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",Object.assign({className:s.title},{children:e}),void 0),(0,i.jsx)(jo.D,{marginBottom:3*Z.W0},void 0)]},void 0),(0,i.jsx)("div",Object.assign({className:s.content},{children:t}),void 0)]}),void 0)}}const Vn=(0,x.Z)((()=>({root:{display:"flex",overflow:"hidden",flexDirection:"column",marginTop:4*Z.W0},title:{fontWeight:"bold"},content:{display:"flex",overflow:"hidden"}})))(Xn);class Zn extends o.Component{render(){const{children:e,styles:t}=this.props;return(0,i.jsx)("div",Object.assign({className:t.content},{children:e}),void 0)}}const Un=(0,x.Z)((e=>{const{width:t}=e;return{content:{flexGrow:0,flexShrink:0,flexBasis:t,display:"flex",overflow:"hidden",flexDirection:"column",marginRight:6*Z.W0}}}))(Zn);class Kn extends o.Component{render(){const{children:e,styles:t}=this.props;return(0,i.jsx)("div",Object.assign({className:t.content},{children:e}),void 0)}}const Yn=(0,x.Z)((()=>({content:{display:"flex",overflow:"hidden",flexDirection:"column",marginBottom:2*Z.W0}})))(Kn),Gn=(0,lt.a)({ctNetUrl:(0,u.$)(c.H).data.ctNetUrl(),ctIosUrl:(0,u.$)(c.H).data.ctIosUrl(),ctAndroidUrl:(0,u.$)(c.H).data.ctAndroidUrl()})(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class ea extends o.Component{render(){const{ctNetUrl:e,ctIosUrl:t,ctAndroidUrl:s,rules:o}=this.props;return e||t||s?(0,i.jsx)(Vn,Object.assign({title:(0,O.L)("Other Applications")},{children:(0,i.jsxs)(Un,Object.assign({width:En},{children:[e&&(0,i.jsx)(Yn,{children:(0,i.jsxs)(Bn.Q,Object.assign({title:"cTrader (Windows)",to:e,wide:!0,testId:"ctrader-windows-link"},{children:[(0,i.jsx)(se.J,{source:ie.Y.windows,size:oe.J.Control,extend:{root:o.icon(this.props)}},void 0),"cTrader (Windows)"]}),void 0)},void 0),e&&(0,i.jsx)(Yn,{children:(0,i.jsxs)(Bn.Q,Object.assign({title:"cTrader Automate",to:e,wide:!0,testId:"ctrader-automate-link"},{children:[(0,i.jsx)(se.J,{source:ie.Y.bot,size:oe.J.Control,extend:{root:o.icon(this.props)}},void 0),"cTrader Automate"]}),void 0)},void 0),t&&(0,i.jsx)(Yn,{children:(0,i.jsxs)(Bn.Q,Object.assign({title:"cTrader Mobile (iOS)",to:t,wide:!0,testId:"ctrader-ios-link"},{children:[(0,i.jsx)(se.J,{source:ie.Y.ios,size:oe.J.Control,extend:{root:o.icon(this.props)}},void 0),"cTrader Mobile (iOS)"]}),void 0)},void 0),s&&(0,i.jsx)(Yn,{children:(0,i.jsxs)(Bn.Q,Object.assign({title:"cTrader Mobile (Android)",to:s,wide:!0,testId:"ctrader-android-link"},{children:[(0,i.jsx)(se.J,{source:ie.Y.android,size:oe.J.Control,extend:{root:o.icon(this.props)}},void 0),"cTrader Mobile (Android)"]}),void 0)},void 0)]}),void 0)}),void 0):null}}const ta=(0,n.$)(Gn)((0,x.Z)((()=>({icon:{marginRight:Z.W0}})))(ea)),sa=(0,lt.a)({marketWatchUrl:(0,u.$)(m.Z).marketWatch.url()})(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class ia extends o.Component{render(){const{marketWatchUrl:e}=this.props;return e?(0,i.jsx)(Vn,Object.assign({title:(0,O.L)("Widgets")},{children:(0,i.jsx)(Un,Object.assign({width:En},{children:e&&(0,i.jsx)(Yn,{children:(0,i.jsx)(Bn.Q,Object.assign({title:(0,O.L)("MarketWatch"),to:e,wide:!0,testId:"marketwatch-link"},{children:(0,O.L)("MarketWatch")}),void 0)},void 0)}),void 0)}),void 0):null}}const oa=(0,n.$)(sa)(ia);class na extends o.Component{render(){return(0,i.jsxs)(Vn,Object.assign({title:(0,O.L)("Partners")},{children:[(0,i.jsx)(Un,Object.assign({width:En},{children:(0,i.jsx)(Yn,{children:(0,i.jsx)(Bn.Q,Object.assign({title:(0,O.L)("2cAlgo Converter"),to:"http://2calgo.com/",wide:!0,testId:"to-calgo-converter-link"},{children:(0,O.L)("2cAlgo Converter")}),void 0)},void 0)}),void 0),(0,i.jsx)(Un,Object.assign({width:En},{children:(0,i.jsx)(Yn,{children:(0,i.jsx)(Bn.Q,Object.assign({title:(0,O.L)("cAlgo Consultants"),to:"https://ctdn.com/consultants/",wide:!0,testId:"calgo-consultant-link"},{children:(0,O.L)("cAlgo Consultants")}),void 0)},void 0)}),void 0)]}),void 0)}}const aa=na;class ra extends o.Component{render(){const{rules:e}=this.props,t={root:e.icon};return(0,i.jsxs)(Vn,Object.assign({title:(0,O.L)("Social Media")},{children:[(0,i.jsxs)(Un,Object.assign({width:En},{children:[(0,i.jsx)(Yn,{children:(0,i.jsxs)(Bn.Q,Object.assign({title:"cTrader on YouTube",to:"https://www.youtube.com/user/ctrader",wide:!0,testId:"youtube-link"},{children:[(0,i.jsx)(se.J,{source:ie.Y.youtube,size:oe.J.Control,extend:t},void 0),"cTrader on YouTube"]}),void 0)},void 0),(0,i.jsx)(Yn,{children:(0,i.jsxs)(Bn.Q,Object.assign({title:"cTrader on LinkedIn",to:"https://www.linkedin.com/company/2576819",wide:!0,testId:"linkedin-link"},{children:[(0,i.jsx)(se.J,{source:ie.Y.linkedin,size:oe.J.Control,extend:t},void 0),"cTrader on LinkedIn"]}),void 0)},void 0)]}),void 0),(0,i.jsxs)(Un,Object.assign({width:En},{children:[(0,i.jsx)(Yn,{children:(0,i.jsxs)(Bn.Q,Object.assign({title:"cTrader on Facebook",to:"https://www.facebook.com/spotware",wide:!0,testId:"facebook-link"},{children:[(0,i.jsx)(se.J,{source:ie.Y.facebook,size:oe.J.Control,extend:t},void 0),"cTrader on Facebook"]}),void 0)},void 0),(0,i.jsx)(Yn,{children:(0,i.jsxs)(Bn.Q,Object.assign({title:"cTrader on Twitter",to:"https://twitter.com/cTrader",wide:!0,testId:"twitter-link"},{children:[(0,i.jsx)(se.J,{source:ie.Y.twitter,size:oe.J.Control,extend:t},void 0),"cTrader on Twitter"]}),void 0)},void 0)]}),void 0)]}),void 0)}}const la=(0,x.Z)((()=>({icon:{marginRight:Z.W0}})))(ra),da=l()([(0,u.$)(ei.c).settings.Links.AdditionalLinksMenu(),(0,u.$)(ei.c).settings.Links.AdditionalLinksMenu.Link1.IsEnabled(),(0,u.$)(ei.c).settings.Links.AdditionalLinksMenu.IsEnabled(),(0,u.$)(ei.c).settings.Links.AdditionalLinksMenu.Link1.Name(),(0,u.$)(ei.c).settings.Links.AdditionalLinksMenu.Link1.Url(),(0,u.$)(ei.c).settings.Links.AdditionalLinksMenu.Link2.IsEnabled(),(0,u.$)(ei.c).settings.Links.AdditionalLinksMenu.Link2.Name(),(0,u.$)(ei.c).settings.Links.AdditionalLinksMenu.Link2.Url(),(0,u.$)(ei.c).settings.Links.AdditionalLinksMenu.Link3.IsEnabled(),(0,u.$)(ei.c).settings.Links.AdditionalLinksMenu.Link3.Name(),(0,u.$)(ei.c).settings.Links.AdditionalLinksMenu.Link3.Url(),(0,u.$)(ei.c).settings.Links.AdditionalLinksMenu.GroupName()],((e,t,s,i,o,n,a,r,l,d,c,u)=>{const h=[];if(void 0===e)return h;const g=[];return t?(s&&g.push({label:i,url:o}),n&&g.push({label:a,url:r}),l&&g.push({label:d,url:c}),g.length&&h.push({title:u,links:g}),h):h}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),ca=(0,lt.a)({additionalLinks:da})(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class ua extends o.Component{render(){const{additionalLinks:e}=this.props;return e.length?(0,i.jsx)(i.Fragment,{children:e.map(((e,t)=>this.renderButtonSection(e,t)))},void 0):null}renderButtonSection(e,t){const{title:s,links:o}=e,n=[],a=[];for(let e=0;e<o.length;e++)e%2==0?n.push(o[e]):a.push(o[e]);const r=[n,a];return(0,i.jsx)(Vn,Object.assign({title:s},{children:r.map(((e,t)=>(0,i.jsx)(Un,Object.assign({width:En},{children:e.map(((e,t)=>(0,i.jsx)(Yn,{children:(0,i.jsx)(Bn.Q,Object.assign({title:e.label,to:e.url,wide:!0},{children:e.label}),void 0)},t)))}),t)))}),t)}}const ha=(0,n.$)(ca)(ua);class ga extends o.Component{render(){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ta,{},void 0),(0,i.jsx)(la,{},void 0),(0,i.jsx)(oa,{},void 0),(0,i.jsx)(aa,{},void 0),(0,i.jsx)(ha,{},void 0)]},void 0)}}const pa=ga,ba=(0,lt.a)({productName:rt.i,tel:(0,u.$)(ei.c).settings.ContactInformation.ContactPhone(),fax:(0,u.$)(ei.c).settings.ContactInformation.ContactFax(),web:(0,u.$)(ei.c).settings.ContactInformation.ContactWeb(),email:(0,u.$)(ei.c).settings.ContactInformation.ContactEmail(),helpIsEnabled:(0,u.$)(ei.c).settings.Links.AdditionalHelpMenu.IsEnabled(),helpName:(0,u.$)(ei.c).settings.Links.AdditionalHelpMenu.HelpName(),helpUrl:(0,u.$)(ei.c).settings.Links.AdditionalHelpMenu.HelpUrl()})(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class va extends o.Component{render(){const{productName:e,tel:t,fax:s,web:o,email:n,helpIsEnabled:a,helpName:r,helpUrl:l,styles:d}=this.props;return(0,i.jsxs)("div",{children:[(0,i.jsx)("div",Object.assign({className:d.title},{children:e}),void 0),(0,i.jsxs)("div",Object.assign({className:d.info},{children:[(0,i.jsxs)("div",Object.assign({className:d.infoTitle},{children:[t&&(0,i.jsx)("div",{children:"Tel:"},void 0),s&&(0,i.jsx)("div",{children:"Fax:"},void 0),o&&(0,i.jsx)("div",{children:"Web:"},void 0),n&&(0,i.jsx)("div",{children:"Email:"},void 0),a&&(0,i.jsx)("div",{children:`${r}:`},void 0)]}),void 0),(0,i.jsxs)("div",{children:[t&&(0,i.jsx)("div",{children:t},void 0),s&&(0,i.jsx)("div",{children:s},void 0),o&&(0,i.jsx)("div",{children:(0,i.jsx)("a",Object.assign({href:o,target:"_blank"},{children:o}),void 0)},void 0),n&&(0,i.jsx)("div",{children:(0,i.jsx)("a",Object.assign({href:`mailto:${n}`,target:"_blank"},{children:n}),void 0)},void 0),a&&(0,i.jsx)("div",{children:(0,i.jsx)("a",Object.assign({href:l,target:"_blank"},{children:l}),void 0)},void 0)]},void 0)]}),void 0),(0,i.jsx)("div",Object.assign({className:d.powered},{children:(0,i.jsx)("a",Object.assign({href:"https://www.spotware.com",target:"_blank"},{children:(0,i.jsx)(se.J,{width:155,height:60,source:ie.Y.poweredBy,title:"Spotware"},void 0)}),void 0)}),void 0)]},void 0)}}const ma=(0,n.$)(ba)((0,x.Z)((e=>{const{foregroundColor:t}=e.theme.palette.semantic;return{title:{fontSize:32,fontWeight:"bold",marginTop:6*Z.W0},info:{display:"flex",overflow:"hidden",marginTop:8*Z.W0,"& a":{color:t.link,outline:"none"}},infoTitle:{flexGrow:0,flexShrink:0,flexBasis:55,marginRight:6*Z.W0,whiteSpace:"nowrap"},powered:{display:"flex",overflow:"hidden",marginTop:70,marginLeft:-15,"& a":{outline:"none",fill:t.primary2}}}}))(va));class ja extends o.Component{render(){const{styles:e}=this.props;return(0,i.jsxs)("div",Object.assign({className:e.root},{children:[(0,i.jsx)("div",Object.assign({className:e.powered},{children:(0,i.jsx)("a",Object.assign({href:"https://www.spotware.com",target:"_blank"},{children:(0,i.jsx)(se.J,{width:155,height:60,source:ie.Y.poweredBy,title:"Spotware"},void 0)}),void 0)}),void 0),(0,i.jsx)("div",Object.assign({className:e.version},{children:`${(0,O.L)("Version")} 4.3.0-patch2`}),void 0),(0,i.jsx)("div",{className:e.content},void 0),(0,i.jsx)(Vn,{children:(0,i.jsx)(Un,{children:(0,i.jsx)(Yn,{children:(0,i.jsx)(Bn.Q,Object.assign({title:(0,O.L)("Terms of Service"),to:"https://ctrader.com/eula/",wide:!0,testId:"terms-of-service-link"},{children:(0,O.L)("Terms of Service")}),void 0)},void 0)},void 0)},void 0),(0,i.jsxs)("div",Object.assign({className:e.copyright},{children:[(0,i.jsx)("div",{children:`© 2010-${(new Date).getFullYear()} cTrader Ltd. All rights reserved.`},void 0),(0,i.jsx)("div",{children:"cTrader is a registered trademark of cTrader Ltd."},void 0),(0,i.jsx)("div",{children:"cTrader®, Spotware®"},void 0)]}),void 0),(0,i.jsx)(jo.D,{marginTop:2*Z.W0,marginBottom:3*Z.W0},void 0),(0,i.jsxs)("div",Object.assign({className:e.awards},{children:[(0,i.jsx)(se.J,{source:ie.Y.awardCertIso,width:75,height:80},void 0),(0,i.jsx)(se.J,{source:ie.Y.awardIsae,width:75,height:40},void 0),(0,i.jsx)(se.J,{source:ie.Y.awardUkas,width:59,height:80},void 0),(0,i.jsx)(se.J,{source:ie.Y.awardFix,width:90,height:80},void 0),(0,i.jsx)(se.J,{source:ie.Y.awardFm,width:59,height:80},void 0)]}),void 0)]}),void 0)}}const xa=(0,x.Z)((e=>{const{foregroundColor:t}=e.theme.palette.semantic;return{root:{flexGrow:1,flexShrink:1,display:"flex",overflow:"hidden",flexDirection:"column"},powered:{display:"flex",overflow:"hidden",marginTop:4*Z.W0,marginLeft:-15,"& a":{outline:"none",fill:t.primary2}},version:{marginTop:2*Z.W0},content:{flexGrow:1,flexShrink:1},copyright:{marginTop:4*Z.W0},awards:{display:"flex",overflow:"hidden",justifyContent:"space-between",fill:t.primary2}}}))(ja);class ya extends o.Component{constructor(){super(...arguments),this.onSelectPage=(e,t)=>{const{open:s}=this.props;s(t)},this.onClose=()=>{const{close:e}=this.props;e()}}render(){const{isShown:e,helpCenterPage:t,productName:s,styles:o}=this.props;if(!e)return null;const n={default:{title:void 0,pages:{[An.Z.HelpCenterPage]:{title:(0,O.L)("Help Center"),component:Fn,testId:"help-center"},[An.Z.WhatsNewPage]:{title:(0,O.L)("What's New"),component:zn,testId:"what-is-new"},[An.Z.CTraderDotComPage]:{title:"cTrader.com",component:_n,testId:"ctrader-dot-com"},[An.Z.OpenApiPage]:{title:(0,O.L)("Open API"),component:qn,testId:"open-api"},[An.Z.UsefulLinksPage]:{title:(0,O.L)("Useful Links"),component:pa,testId:"useful-links"},[An.Z.ContactPage]:{title:(0,O.L)("Contact"),component:ma,testId:"contact"},[An.Z.AboutPage]:{title:(0,O.L)("About"),component:xa,testId:"about"}}}},a=function(e,t){return Object.values(e).map((e=>e.pages)).reduce(((e,t)=>Object.assign(Object.assign({},e),t)),{})[t]}(n,t),r=a.component;return(0,i.jsxs)(ye.M,Object.assign({title:`${(0,O.L)("Help")} - ${s}`,onClose:this.onClose,width:760,height:680,testId:"help-center-dialog"},{children:[(0,i.jsx)(Se.N,{groups:n,activePage:t,onSelectPage:this.onSelectPage},void 0),(0,i.jsxs)("div",Object.assign({className:o.root},{children:[(0,i.jsx)(ge.X,Object.assign({marginBottom:0},{children:(0,i.jsx)(mo.A,{children:a.title},void 0)}),void 0),(0,i.jsx)(jo.D,{marginBottom:2*Z.W0},void 0),(0,i.jsx)("div",Object.assign({className:o.pageContent},{children:(0,i.jsx)(r,{},void 0)}),void 0)]}),void 0)]}),void 0)}}const Sa=(0,n.$)(Nn,{open:Dn.A.open,close:Dn.A.close})((0,x.Z)((()=>({root:Object.assign(Object.assign({},(0,vn.f)(1)),{display:"flex",flexDirection:"column",overflow:"hidden"}),pageContent:{flexGrow:1,display:"flex",flexDirection:"column",overflow:"hidden"}})))(ya));var fa=s(76314),Oa=s(4864);const Ca=l()([(0,u.$)(Oa.t).isShown()],(e=>({isShown:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),ka=l()([(0,u.$)($.S).live()],(e=>({isLive:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var Ia=s(16011),La=s(30454),wa=s(3673);const Ta=e=>{const{foregroundColor:t}=e.theme.palette.semantic;return{root:{color:t.link,textDecoration:"none"}}},Da=e=>{const{href:t,target:s,children:o}=e,{css:n}=(0,te.X)(Ta,{});return(0,i.jsx)("a",Object.assign({className:n.root(),href:t,target:s},{children:o}),void 0)};Da.defaultProps={target:"_blank"};const Pa=(0,o.memo)(Da),Na=l()([rt.i],(e=>({productName:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class Aa extends o.Component{render(){const{productName:e}=this.props;return(0,i.jsx)(ge.X,{children:(0,i.jsxs)("div",{children:[(0,O.L)("You can learn more about the {0} IB Program by watching",e)," ",(0,i.jsx)(Pa,Object.assign({href:"https://www.youtube.com/watch?v=ptHxu7aZ6Vo"},{children:(0,O.L)("this video")}),void 0)," ",(0,O.L)("or by visiting our")," ",(0,i.jsx)(Pa,Object.assign({href:`${st.Xp}/ctrader/ib-center`},{children:(0,O.L)("Help Center")}),void 0)]},void 0)},void 0)}}const Ba=(0,n.$)(Na)(Aa);var Ma=s(46168);const $a=(0,o.memo)((()=>{const e=(0,re.I0)(),t=(0,o.useCallback)((()=>{e(Ia.G.open({tab:La.e.Live})),e(S.m.track({name:y.T2.AccountWindowOpened,params:{method:y.Zq.PartnerCenter}})),e(wa.y.close())}),[e]),s=(0,o.useCallback)((()=>{e(Ma.I.open({})),e(S.m.track({name:y.T2.AccountWindowOpened,params:{method:y.Zq.PartnerCenter}})),e(wa.y.close())}),[e]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ge.X,{children:(0,O.L)("IB Status can be given to live accounts only.")},void 0),(0,i.jsx)(Bt.I,{},void 0),(0,i.jsx)(ge.X,{children:(0,O.L)("Please sign in with your live account or open a new one.")},void 0),(0,i.jsx)(Bt.I,{},void 0),(0,i.jsx)(Ba,{},void 0),(0,i.jsx)(Bt.I,{},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsx)(ut.K,Object.assign({wide:!0,onClick:t},{children:(0,O.L)("Open Live Account")}),void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsx)(ut.K,Object.assign({wide:!0,onClick:s},{children:(0,O.L)("Login into your Live Account")}),void 0)},void 0)]},void 0)})),Ea=l()([(0,u.$)((e=>e.becomePartner)).data(),(0,u.$)($.S).traderLogin()],((e,t)=>e[t]))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var Fa=s(42959);const Ra=l()([rt.i,(0,u.$)($.S).traderLogin(),(0,u.$)(Fa.a).IntroducingBrokers.EnablePartnerAgreement(),Ea,(0,u.$)(Fa.a).IntroducingBrokers.PartnerAgreementUrl(),(0,u.$)(Fa.a).Jurisdiction.Id()],((e,t,s,i,o,n)=>({productName:e,traderLogin:t,isAgreementEnabled:s,isRequested:i,agreementUrl:o,jurisdictionId:n})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var Wa=s(70936);const Ha=(0,o.memo)((()=>{const{traderLogin:e,isAgreementEnabled:t,isRequested:s,agreementUrl:n,jurisdictionId:a}=(0,ne.v)(Ra),r=(0,re.I0)(),[l,d]=(0,o.useState)(!1),[c,u]=(0,o.useState)(!t),h=(0,o.useCallback)((()=>{r(wa.y.close())}),[r]),g=(0,o.useCallback)((()=>{r(Wa.H.send()),d(!0)}),[r]),p=(0,o.useCallback)((e=>{u(e)}),[]);return s?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ge.X,{children:(0,O.L)("Request for account {0} was sent. Please await a confirmation",e)},void 0),(0,i.jsx)(Bt.I,{},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsx)(ut.K,Object.assign({wide:!0,onClick:h},{children:(0,O.L)("Ok")}),void 0)},void 0)]},void 0):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ge.X,{children:(0,O.L)("Obtaining IB status will give you access to IB Center.")},void 0),(0,i.jsx)(Bt.I,{},void 0),(0,i.jsx)(Ba,{},void 0),t&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Bt.I,{},void 0),(0,i.jsxs)(Ie.J,Object.assign({checked:c,onChange:p},{children:[(0,O.L)("I accept the")," ",(0,i.jsx)(Pa,Object.assign({href:`${n}?jurisdictionId=${a}`},{children:(0,O.L)("Terms of IB agreement")}),void 0)]}),void 0),(0,i.jsx)(Bt.I,{},void 0)]},void 0),(0,i.jsx)(Bt.I,{},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsx)(ut.K,Object.assign({wide:!0,disabled:l||!c,onClick:g},{children:(0,O.L)("Request IB Status")}),void 0)},void 0)]},void 0)}));class za extends o.Component{render(){const{isLive:e}=this.props;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(mo.A,{children:(0,O.L)("Become an IB")},void 0),(0,i.jsx)(Bt.I,{},void 0),e?(0,i.jsx)(Ha,{},void 0):(0,i.jsx)($a,{},void 0)]},void 0)}}const Ja=(0,n.$)(ka)(za);class Qa extends o.Component{constructor(){super(...arguments),this.onClose=()=>{const{close:e}=this.props;e()}}render(){const{isShown:e}=this.props;return e?(0,i.jsx)(fa.V,Object.assign({title:(0,O.L)("Become an IB"),width:300,onClose:this.onClose},{children:(0,i.jsx)(Ja,{},void 0)}),void 0):null}}const _a=(0,n.$)(Ca,{close:wa.y.close})(Qa);var qa=s(88801);const Xa=e=>e.partnerDialog,Va=l()([(0,u.$)(Xa).isShown(),(0,u.$)(Xa).width(),(0,u.$)(Xa).height(),(0,u.$)(Xa).top(),(0,u.$)(Xa).left()],((e,t,s,i,o)=>({isShown:e,width:t,height:s,top:i,left:o})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var Za=s(38708);const Ua=l()([(0,u.$)($.S).live(),Za.T],((e,t)=>({isLive:e,fromTimestamp:t.from,toTimestamp:t.to})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var Ka=s(4792),Ya=s(78641),Ga=s(97914),er=s(3973);const tr=1e6;function sr(e){const t=e/100,s=t%tr,i=(t-s)/tr;if(t>=10*tr)return i.toString();if(0===s)return i.toString();const o=(2,("000000"+s.toString().split(".")[0]).slice(-6).replace(new RegExp("^(0*)([1-9]{1,2})(.*)$"),"$1$2"));return`${i.toString()}.${o}`}var ir=s(3288);class or extends Ka.y{constructor(e){super(),this.state=e,this.$container.addClass(`b-ib-rank-progress ${e.extraClass}`),this.render()}render(){const{rank:e}=this.state,t=this.state.currentVolume>=e.volume,s=Math.max(e.volume-this.state.currentVolume,0);this.$container.html(`\n            <div class="${t?"b-ib-rank-progress__reached-mark":"b-ib-rank-progress__not-reached-mark"}"></div>\n                ${t?(0,er.X)((0,O.L)("Achieved")):`+${sr(s)}m`}\n            </div>`)}}class nr extends Ka.y{constructor(e){super(),this.views=[],this.state=e,this.$container.addClass("b-ib-rank-info-popup b-ib-rank-info-popup_is-hidden"),this.render()}showAtPosition(e){let t,s;this.state=e,this.render(),this.$container.removeClass("b-ib-rank-info-popup_is-hidden"),1===this.state.rankNumber?(t=-10,s=15):5===this.state.rankNumber?(t=-89,s=93):6===this.state.rankNumber?(t=-277,s=282):(t=-25,s=30),this.$container.css({left:t}),this.$container.find(".b-ib-rank-info-popup__tail").css({left:s})}hide(){return this.$container.addClass("b-ib-rank-info-popup_is-hidden"),this}destroy(){super.destroy(),this.destroyViews()}destroyViews(){this.views.forEach((e=>{e.destroy()})),this.views=[]}render(){const{rank:e}=this.state,{currentVolume:t}=this.state,s=this.state.currentVolume>=e.volume,i=Math.max(e.volume-this.state.currentVolume,0);this.destroyViews(),this.$container.html(`\n            <div class="b-ib-rank-info-popup__tail"></div>\n            <div class="b-ib-rank-info-popup__left-to-reach-container">\n            </div>\n            <div class="b-ib-rank-info-popup__pre-title">\n                ${(0,er.X)((0,O.L)("Next month's"))}\n            </div>\n            <div class="b-ib-rank-info-popup__title">\n                <div class="b-ib-rank-info-popup__title-text">\n                    ${(0,O.L)("Rank")}\n                </div>\n                <div class="b-ib-rank-info-popup__rank-number\n                        ${s?"b-ib-rank-info-popup__rank-number_is-reached":""}">\n                    ${this.state.rankNumber}\n                </div>\n                <div class="b-ib-rank-info-popup__title-text">\n                    ${(0,er.X)(e.name)}\n                </div>\n            </div>\n            <div class="b-ib-rank-info-popup__hr"></div>\n            <div class="b-ib-rank-info-popup__description-item">\n                <div class="b-ib-rank-info-popup__description-name">\n                    ${(0,O.L)("Group Volume required for this rank")}:\n                </div>\n                <div class="b-ib-rank-info-popup__description-value">\n                    ${ir.qY} ${sr(e.volume)}m\n                </div>\n            </div>\n            <div class="b-ib-rank-info-popup__description-item">\n                <div class="b-ib-rank-info-popup__description-name">\n                    ${(0,O.L)("Group Volume needed to achieve this rank")}:\n                </div>\n                <div class="b-ib-rank-info-popup__description-value">\n                    ${ir.qY} ${sr(i)}m\n                </div>\n            </div>\n            <div class="b-ib-rank-info-popup__hr"></div>\n            <div class="b-ib-rank-info-popup__description-item">\n                <div class="b-ib-rank-info-popup__description-name">\n                    ${(0,O.L)("Your Commission")}:\n                </div>\n                <div class="b-ib-rank-info-popup__description-value">\n                    ${100-e.brokerPercentage-e.parentIbPercentage}%\n                </div>\n            </div>\n            <div class="b-ib-rank-info-popup__description-item">\n                <div class="b-ib-rank-info-popup__description-name">\n                    ${(0,O.L)("Broker Commission")}:\n                </div>\n                <div class="b-ib-rank-info-popup__description-value">\n                    ${e.brokerPercentage}%\n                </div>\n            </div>\n            <div class="b-ib-rank-info-popup__description-item">\n                <div class="b-ib-rank-info-popup__description-name">\n                    ${(0,O.L)("Parent IB Commission")}:\n                </div>\n                <div class="b-ib-rank-info-popup__description-value">\n                    ${e.parentIbPercentage}%\n                </div>\n            </div>\n            `);const o=new or({currentVolume:t,extraClass:"b-ib-rank-info-popup__left-to-reach",rank:e});this.$container.find(".b-ib-rank-info-popup__left-to-reach-container").append(o.$container),this.views.push(o)}}class ar extends Ka.y{constructor(e){super(),this.state=e,this.$container.addClass(`b-ib-rank-circle${e.isFilled?" b-ib-rank-circle_is-filled":""}${e.extraClass?` ${e.extraClass}`:""}`),this.render()}render(){const{rank:e}=this.state;this.$container.html(`\n            <div class="b-ib-rank-circle__number">\n                ${this.state.rankNumber}\n            </div>\n            <div class="b-ib-rank-circle__hr"></div>\n            <div class="b-ib-rank-circle__percent">\n                ${100-e.brokerPercentage-e.parentIbPercentage}%\n            </div>\n        `)}}var rr=s(56025),lr=s(83505),dr=s(19755);class cr extends Ka.y{constructor(e){super(e),this.rankList=[],this.monthlyVolumeInUsd=0,this.rankInfoPopups=[],this.$container.addClass("b-ib-progress-bar"),this.render(),(0,Ga.H)().getObservableForSelector((0,u.$)(rr.K).data.rankList([])).pipe((0,lr.R)(this.destroy$)).subscribe((e=>{this.rankList=e,this.render()})),(0,Ga.H)().getObservableForSelector((0,u.$)(rr.K).data.monthlyVolumeInUsd()).pipe((0,lr.R)(this.destroy$)).subscribe((e=>{this.monthlyVolumeInUsd=e,this.render()}))}unloadViews(){this.rankInfoPopups.forEach((e=>{e.destroy()})),this.rankInfoPopups=[]}render(){this.unloadViews(),this.$container.html(`<div class="b-ib-progress-bar__container">\n            <div class="b-ib-progress-bar__gap"></div>\n            ${this.rankList.map(((e,t)=>{const s=0!==t,i=s&&this.monthlyVolumeInUsd>this.rankList[t-1].volume&&this.monthlyVolumeInUsd<e.volume,o=s?(this.monthlyVolumeInUsd-this.rankList[t-1].volume)/(e.volume-this.rankList[t-1].volume)*100:0,n=this.monthlyVolumeInUsd>=e.volume;return`${s?`<div class="b-ib-progress-bar__between-ranks ${n?"b-ib-progress-bar__between-ranks_is-overflowed":""}">\n                        <div class="b-ib-progress-bar__progress-container">\n                            <div class="b-ib-progress-bar__progress"\n                                style="left: ${i?o-100:-100}%"\n                                ></div>\n                        </div>\n                    </div>`:""}<div class="b-ib-progress-bar__rank-container">\n                    <div class="b-ib-progress-bar__rank">\n                        <div class="b-ib-progress-bar__rank-title">\n                            ${(0,er.X)(e.name)}\n                        </div>\n                    </div>\n                </div>\n                `})).join("")}\n            <div class="b-ib-progress-bar__gap"></div>\n            </div>`);const e=this.$container.find(".b-ib-progress-bar__rank-container");this.rankList.forEach(((t,s)=>{const i=new ar({rank:t,isFilled:this.monthlyVolumeInUsd>=t.volume,extraClass:"b-ib-progress-bar__rank-circle",rankNumber:s+1});e.find(".b-ib-progress-bar__rank").eq(s).append(i.$container);const o=new nr({rank:t,rankNumber:s+1,currentVolume:this.monthlyVolumeInUsd});e.eq(s).append(o.$container),this.rankInfoPopups.push(o)})),e.each(((e,t)=>{dr(t).on("mouseenter",(()=>{this.rankInfoPopups[e].showAtPosition({rank:this.rankList[e],rankNumber:e+1,currentVolume:this.monthlyVolumeInUsd})})).on("mouseleave",(()=>{this.rankInfoPopups[e].hide()}))}))}}class ur extends Ya.n{}const hr=(0,Ya.l)(cr,ur);var gr,pr=s(44214),br=s(23414),vr=s(80122),mr=s(9238),jr=s(15),xr=s(70504);!function(e){e.id="id",e.time="time",e.type="type",e.amount="amount",e.note="note"}(gr||(gr={}));var yr=s(32086),Sr=s(40801),fr=s(16436),Or=s(68008);const Cr=e=>e.partnerTransactionTable;var kr=s(37992),Ir=s(93724),Lr=s(87444),wr=s(4323);const Tr=l()([Gs.M,(0,u.$)(Cr).type()],((e,t)=>{const s=[...[...e].filter((e=>Lr.$.some((t=>t===e.operationType))))].sort(((e,t)=>e.changeBalanceTimestamp-t.changeBalanceTimestamp));return t===wr.d.Deposit?s.filter((e=>(0,kr.R)(e.delta))):t===wr.d.Withdrawal?s.filter((e=>(0,Ir.R)(e.delta))):s}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var Dr=s(88354);const Pr=l()([(0,u.$)(Cr).search()],(e=>e.trim()))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),Nr=l()([(0,u.$)(Ys.C).networkStatus(),(0,u.$)(c.H).data.isLcg(),Tr,Pr,(0,u.$)(Cr).tableState(),Dr.C],((e,t,s,i,o,n)=>({isLoading:e!==Cs.I.Done,isLcg:t,transactionList:s,search:i,tableState:o,timeOffset:n})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var Ar=s(54991);const Br=l()([(0,u.$)(Ys.C).networkStatus(),(0,u.$)(Cr).search(),(0,u.$)(Cr).type()],((e,t,s)=>({isLoading:e!==Cs.I.Done,search:t,type:s})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class Mr extends o.Component{constructor(){super(...arguments),this.onSearchChange=e=>{const{setSearch:t}=this.props;t(e)},this.onSearchClear=()=>{const{setSearch:e}=this.props;e("")},this.onChangeType=e=>{const{setType:t}=this.props;t(e)}}render(){const{isLoading:e,search:t,type:s,styles:o,rules:n}=this.props;return(0,i.jsx)("div",Object.assign({className:o.root},{children:(0,i.jsxs)("div",Object.assign({className:o.left},{children:[(0,i.jsx)(Ar.M,{value:t,disabled:e,onChange:this.onSearchChange,onClear:this.onSearchClear,extend:{root:n.search(this.props)}},void 0),(0,i.jsx)(es.q,{},void 0),(0,i.jsx)(Ct.P,{options:this.getTransactionTypeList(),value:s,disabled:e,maxWidth:115,onChange:this.onChangeType},void 0)]}),void 0)}),void 0)}getTransactionTypeList(){return[{label:`${(0,O.L)("All Transactions")} (${(0,O.L)("Default")})`,value:wr.d.All},{label:(0,O.L)("Deposits"),value:wr.d.Deposit},{label:(0,O.L)("Withdrawals"),value:wr.d.Withdrawal}]}}const $r=(0,n.$)(Br,{setSearch:mr.U.setSearch,setType:mr.U.setType})((0,x.Z)((()=>({root:{display:"flex",flexDirection:"row",flexShrink:0,justifyContent:"space-between",marginBottom:Z.W0,overflow:"hidden"},left:{flexGrow:1,display:"flex",flexDirection:"row",overflow:"hidden"},right:{display:"flex",flexDirection:"row",overflow:"hidden",marginLeft:Z.W0},search:{maxWidth:180}})))(Mr));var Er=s(77191),Fr=s(42454),Rr=s(13930),Wr=s(65823);const Hr=l()([Rr.r,Wr.k],((e,t)=>({deposit:e,withdrawal:t})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class zr extends o.Component{render(){const{deposit:e,withdrawal:t,styles:s}=this.props;return(0,i.jsx)("div",Object.assign({className:s.root},{children:(0,i.jsxs)("div",Object.assign({className:s.right},{children:[(0,i.jsx)("div",{children:`${(0,O.L)("Deposit")}:`},void 0),(0,i.jsx)("div",Object.assign({className:s.number},{children:(0,i.jsx)(Or.M,{value:e},void 0)}),void 0),(0,i.jsx)(es.q,{},void 0),(0,i.jsx)("div",{children:`${(0,O.L)("Withdrawal")}:`},void 0),(0,i.jsx)("div",Object.assign({className:s.number},{children:(0,i.jsx)(Or.M,{value:t},void 0)}),void 0)]}),void 0)}),void 0)}}const Jr=(0,n.$)(Hr)((0,x.Z)((e=>{const{foregroundColor:t}=e.theme.palette.semantic;return{root:Object.assign({display:"flex",flexDirection:"row",flexShrink:0,justifyContent:"flex-end"},(0,X.o)(Z.W0)),right:{display:"flex",flexDirection:"row"},number:{marginLeft:Z.W0,color:t.secondary}}}))(zr));class Qr extends o.Component{constructor(){super(...arguments),this.getColumns=(0,Fr.Z)(((e,t)=>function(e,t){return[{id:gr.id,sorting:e?yr.a.DESC:yr.a.ASC,Header:()=>(0,O.L)("ID"),title:(0,O.L)("Transaction ID"),accessor:e=>e.transactionId,formatter:e=>`TID${e}`},{id:gr.time,Header:()=>`${(0,O.L)("Time")} (${(0,jr.M)(t)})`,title:`${(0,O.L)("Time")} (${(0,jr.M)(t)})`,accessor:e=>e.changeBalanceTimestamp,formatter:e=>(0,xr.H)(e,t)},{id:gr.type,Header:()=>(0,O.L)("Type"),title:(0,O.L)("Type"),accessor:e=>(0,Sr.r)(e.operationType,e.delta)},{id:gr.amount,Header:()=>(0,i.jsx)(fr.v,{children:({displayName:e})=>`${(0,O.L)("Amount")} (${e})`},void 0),title:(0,O.L)("Amount"),accessor:e=>e.delta,Cell:e=>(0,i.jsx)(Or.M,{value:e},void 0)},{id:gr.note,Header:()=>(0,O.L)("Note"),title:(0,O.L)("Note"),accessor:e=>{var t;return null!==(t=e.comment)&&void 0!==t?t:e.externalNote}}]}(e,t)),((e,t)=>`${e}:${t}`)),this.keyAccessor=e=>e.transactionId,this.onTableStateChange=e=>{const{changeState:t}=this.props;t(e)}}render(){const{isLoading:e,isLcg:t,transactionList:s,search:o,tableState:n,timeOffset:a,styles:r}=this.props;return(0,i.jsxs)(At.s,{children:[(0,i.jsx)($r,{},void 0),(0,i.jsxs)("div",Object.assign({className:r.table},{children:[(0,i.jsx)(Er.i,{id:"TransactionTable",isLoading:e,data:s,search:o,columns:this.getColumns(t,a),keyAccessor:this.keyAccessor,tableState:n,onTableStateChange:this.onTableStateChange},void 0),(0,i.jsx)(Jr,{},void 0)]}),void 0)]},void 0)}}const _r=(0,n.$)(Nr,{changeState:mr.U.changeState})((0,x.Z)((e=>{const{backgroundColor:t}=e.theme.palette.semantic;return{table:Object.assign(Object.assign(Object.assign({position:"relative",flexGrow:1,display:"flex",flexDirection:"column"},(0,Q.O)({color:t.primaryNormal})),{overflow:"hidden"}),(0,V.E)(Z.q0))}}))(Qr));var qr=s(94394),Xr=s(40869),Vr=s(20099),Zr=s(64871),Ur=s(77016);const Kr=l()([(0,u.$)(Ur.s).networkStatus(),(0,u.$)(Xr.W).search(),(0,u.$)(Xr.W).period(),Vr.e,Zr.J,(0,u.$)($.S).registrationTimestamp(),Za.T],((e,t,s,i,o,n,a)=>({isLoading:e!==Cs.I.Done,search:t,period:s,startDate:n,fromDate:i,toDate:o,startTimestamp:a.from,endTimestamp:a.to})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var Yr=s(66140),Gr=s(95150),el=s(19878);class tl extends o.Component{constructor(){super(...arguments),this.onSearchChange=e=>{const{setSearch:t}=this.props;t(e)},this.onSearchClear=()=>{const{setSearch:e}=this.props;e("")},this.onKindChange=e=>{const{setPeriod:t}=this.props;t({kind:e})},this.onPeriodChange=e=>{const{setPeriod:t}=this.props;t({period:e})},this.onFromDateChange=e=>{const{setPeriod:t}=this.props;t({fromDate:e})},this.onToDateChange=e=>{const{setPeriod:t}=this.props;t({toDate:e})},this.onRefreshClick=()=>{const{startTimestamp:e,endTimestamp:t,load:s}=this.props;s({from:e,to:t})},this.onExportClick=()=>{const{exportData:e}=this.props;e()}}render(){const{isLoading:e,search:t,period:s,startDate:o,fromDate:n,toDate:a,styles:r,rules:l}=this.props;return(0,i.jsxs)("div",Object.assign({className:r.root},{children:[(0,i.jsxs)("div",Object.assign({className:r.left},{children:[(0,i.jsx)(Ar.M,{value:t,disabled:e,onChange:this.onSearchChange,onClear:this.onSearchClear,extend:{root:l.search(this.props)}},void 0),(0,i.jsx)(es.q,{},void 0),(0,i.jsx)(Yr.$,{label:`${(0,O.L)("Period")}:`,startDate:o,kind:s.kind,period:s.period,fromDate:n,toDate:a,onKindChange:this.onKindChange,onPeriodChange:this.onPeriodChange,onFromDateChange:this.onFromDateChange,onToDateChange:this.onToDateChange},void 0)]}),void 0),(0,i.jsxs)("div",Object.assign({className:r.right},{children:[(0,i.jsx)(ut.K,Object.assign({onClick:this.onRefreshClick},{children:(0,O.L)("Run Report")}),void 0),(0,i.jsx)(es.q,{},void 0),(0,i.jsx)(ut.K,Object.assign({onClick:this.onExportClick},{children:(0,O.L)("Export to Excel")}),void 0)]}),void 0)]}),void 0)}}const sl=(0,n.$)(Kr,{setSearch:Gr.E.setSearch,setPeriod:Gr.E.setPeriod,load:el._.loadList,exportData:Gr.E.exportData})((0,x.Z)((()=>({root:{display:"flex",flexDirection:"row",flexShrink:0,justifyContent:"space-between",marginBottom:Z.W0,overflow:"hidden"},left:{flexGrow:1,display:"flex",flexDirection:"row",overflow:"hidden"},right:{display:"flex",flexDirection:"row",overflow:"hidden",marginLeft:Z.W0},search:{maxWidth:130}})))(tl));var il=s(47286);const ol=l()([(0,u.$)(Xr.W).search()],(e=>e.trim()))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),nl=l()([(0,u.$)(Ur.s).networkStatus(),il.U,ol,(0,u.$)(Xr.W).tableState(),Dr.C,(0,u.$)($.S).depositCurrency()],((e,t,s,i,o,n)=>({isLoading:e!==Cs.I.Done,dealList:t,search:s,tableState:i,timeOffset:o,depositCurrency:n})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var al=s(23689),rl=s(93302),ll=s.n(rl),dl=s(38274),cl=s(44251),ul=s(51308);const hl=(0,_s.X)(dl.O,d.mr).chain((e=>(0,cl.H)(e.map((e=>(0,qs.t)(ul.V,{dealId:e.dealId},d.iN))))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})))).map((e=>e.reduce(((e,t)=>e.plus(t)),new(ll())(0)).abs())).build();var gl=s(77631);const pl=(0,_s.X)(dl.O,d.mr).chain((e=>(0,cl.H)(e.map((e=>(0,qs.t)(gl.x,{dealId:e.dealId},d.iN))))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})))).map((e=>e.reduce(((e,t)=>e.plus(t)),new(ll())(0)).abs())).build();var bl=s(90150);const vl=(0,_s.X)(dl.O,d.mr).chain((e=>(0,cl.H)(e.map((e=>(0,qs.t)(bl.b,{dealId:e.dealId},d.iN))))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})))).map((e=>e.reduce(((e,t)=>e.plus(t)),new(ll())(0)).abs())).build();var ml=s(74440);const jl=(0,_s.X)(dl.O,d.mr).chain((e=>(0,cl.H)(e.map((e=>(0,qs.t)(ml.V,{dealId:e.dealId},d.iN))))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})))).map((e=>e.reduce(((e,t)=>e.plus(t)),new(ll())(0)).abs().times(-1))).build();var xl=s(43130);const yl=(0,_s.X)(dl.O,d.mr).chain((e=>(0,cl.H)(e.map((e=>(0,qs.t)(xl.$,{dealId:e.dealId},d.iN))))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})))).map((e=>e.reduce(((e,t)=>e.plus(t)),new(ll())(0)).abs())).build();var Sl=s(18008);const fl=(0,_s.X)(dl.O,d.mr).chain((e=>(0,cl.H)(e.map((e=>(0,qs.t)(Sl.W,{dealId:e.dealId},d.iN))))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})))).map((e=>e.reduce(((e,t)=>e.plus(t)),new(ll())(0)).abs())).build(),Ol=l()([hl,pl,vl,jl,yl,fl],((e,t,s,i,o,n)=>({totalBrokerCommission:e,totalClientCommission:t,totalMarkupRevenue:s,totalRebate:i,totalCredited:o,totalCommission:n})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var Cl=s(8850),kl=s(74054);class Il extends o.Component{render(){const{totalBrokerCommission:e,totalClientCommission:t,totalMarkupRevenue:s,totalRebate:o,totalCredited:n,totalCommission:a,styles:r}=this.props;return(0,i.jsxs)(ge.X,{children:[(0,i.jsxs)("div",Object.assign({className:r.item},{children:[(0,i.jsx)(Cl.O,Object.assign({textColor:He.d.Secondary},{children:(0,O.L)("Total Commission Paid by Broker")}),void 0),(0,i.jsx)(jo.D,{},void 0),(0,i.jsx)(kl.H,{children:(0,i.jsx)(Or.M,{value:e,prefix:!0},void 0)},void 0)]}),void 0),(0,i.jsxs)("div",Object.assign({className:r.item},{children:[(0,i.jsx)(Cl.O,Object.assign({textColor:He.d.Secondary},{children:(0,O.L)("Total Commission Paid by Client")}),void 0),(0,i.jsx)(jo.D,{},void 0),(0,i.jsx)(kl.H,{children:(0,i.jsx)(Or.M,{value:t,prefix:!0},void 0)},void 0)]}),void 0),(0,i.jsxs)("div",Object.assign({className:r.item},{children:[(0,i.jsx)(Cl.O,Object.assign({textColor:He.d.Secondary},{children:(0,O.L)("Total Markup Revenue")}),void 0),(0,i.jsx)(jo.D,{},void 0),(0,i.jsx)(kl.H,{children:(0,i.jsx)(Or.M,{value:s,prefix:!0},void 0)},void 0)]}),void 0),(0,i.jsxs)("div",Object.assign({className:r.item},{children:[(0,i.jsx)(Cl.O,Object.assign({textColor:He.d.Secondary},{children:(0,O.L)("Total Rebates Paid")}),void 0),(0,i.jsx)(jo.D,{},void 0),(0,i.jsx)(kl.H,{children:(0,i.jsx)(Or.M,{value:o,prefix:!0},void 0)},void 0)]}),void 0),(0,i.jsxs)("div",Object.assign({className:r.item},{children:[(0,i.jsx)(Cl.O,Object.assign({textColor:He.d.Secondary},{children:(0,O.L)("Total for Period (to be credited)")}),void 0),(0,i.jsx)(jo.D,{},void 0),(0,i.jsx)(kl.H,{children:(0,i.jsx)(Or.M,{value:n,prefix:!0},void 0)},void 0)]}),void 0),(0,i.jsxs)("div",Object.assign({className:r.item},{children:[(0,i.jsx)(Cl.O,Object.assign({textColor:He.d.Secondary},{children:(0,O.L)("Total for Period (credited)")}),void 0),(0,i.jsx)(jo.D,{},void 0),(0,i.jsx)(kl.H,{children:(0,i.jsx)(Or.M,{value:a,prefix:!0},void 0)},void 0)]}),void 0)]},void 0)}}const Ll=(0,n.$)(Ol)((0,x.Z)((e=>{const{backgroundColor:t}=e.theme.palette.semantic;return{item:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({display:"flex",flexDirection:"column"},(0,Q.O)({color:t.tertiaryNormal})),(0,V.E)(Z.q0)),{width:"25%"}),(0,X.o)(Z.W0)),{marginLeft:Z.W0,whiteSpace:"nowrap",textAlign:"center",overflow:"hidden",nested:{":first-child":{marginLeft:0}}})}}))(Il));class wl extends o.Component{constructor(){super(...arguments),this.getColumns=(0,Fr.Z)(((e,t)=>(0,qr.V)(e,t)),((e,t)=>`${e}:${t}`)),this.keyAccessor=e=>e.dealId,this.onTableStateChange=e=>{const{changeState:t}=this.props;t(e)}}render(){const{isLoading:e,dealList:t,search:s,tableState:o,timeOffset:n,depositCurrency:a}=this.props,r=t.map((e=>e.symbolId));return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(At.s,{children:[r.map(((e,t)=>(0,i.jsx)(al.i,{symbolId:e},t))),(0,i.jsx)(sl,{},void 0),(0,i.jsx)(Er.i,{id:"DealTable",isLoading:e,data:t,search:s,columns:this.getColumns(n,a),keyAccessor:this.keyAccessor,tableState:o,onTableStateChange:this.onTableStateChange},void 0),(0,i.jsx)(Bt.I,{},void 0),(0,i.jsx)(Ll,{},void 0)]},void 0)},void 0)}}const Tl=(0,n.$)(nl,{changeState:Gr.E.changeState})(wl);var Dl=s(85416),Pl=s(71738),Nl=s(90159),Al=s(9533),Bl=s(79662),Ml=s(7009);const $l=l()([(0,u.$)(Bl.V).networkStatus(),Ml.G,(0,u.$)(Al.$).tableState(),Dr.C,(0,u.$)(Fa.a).IntroducingBrokers.EnableGiveBonus()],((e,t,s,i,o)=>({isLoading:e!==Cs.I.Done,accountList:t,tableState:s,timeOffset:i,giveBonusEnabled:o})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),El=l()([(0,u.$)(Bl.V).networkStatus()],(e=>({isLoading:e!==Cs.I.Done})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var Fl=s(52353),Rl=s(65120);const Wl=e=>e.linkGenerator,Hl=l()([(0,u.$)(Wl).locale(),(0,u.$)(Ft.r).locale()],((e,t)=>null!=e?e:t))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),zl=l()([(0,u.$)(Wl).showCtId()],(e=>null!=e&&e))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),Jl=l()([(0,u.$)(Wl).traderId(),(0,u.$)($.S).traderId()],((e,t)=>null!=e?e:t))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var Ql=s(91431);const _l=l()([(0,u.$)(m.Z).partnerCenter.destinationList([])],(e=>{const[t]=e;return t}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),ql=l()([(0,u.$)(Wl).destination(),(0,u.$)(Wl).customDestination(),_l],((e,t,s)=>{var i;return e===Ql.m?t:e||(null!==(i=null==s?void 0:s.url)&&void 0!==i?i:"")}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));function Xl(e){return e.startsWith("http:")||e.startsWith("https:")?e:`https://${e}`}var Vl=s(52567),Zl=s(12328);const Ul=l()([(0,u.$)(m.Z).partnerCenter.referralUrl(),(0,u.$)(c.H).data.immutableSimplifiedName(),(0,u.$)(m.Z).info.plantId(),(0,u.$)($.S).environment(),Jl,Hl,ql,zl],((e,t,s,i,o,n,a,r)=>{const l={url:Xl(a),lang:n,ctid:r,brokerName:t,ibPlantId:s,ibEnvironmentName:i,ibTraderId:o};return(0,Vl.K)({host:e,search:(0,Zl.A)(l)})}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),Kl=l()([rt.i,Ul],((e,t)=>({productName:e,link:t})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var Yl=s(43641);const Gl=l()([(0,u.$)(Wl).destination(),_l],((e,t)=>{var s;return null!==(s=null!=e?e:null==t?void 0:t.url)&&void 0!==s?s:""}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var ed=s(64276);const td=l()([(0,u.$)(m.Z).partnerCenter.destinationList([]),ed.P,Gl,ql,Jl,Hl,zl],((e,t,s,i,o,n,a)=>({brokerLinkList:e,accountList:t.filter((e=>e.live)),destination:s,url:i,traderId:o,locale:n,idLinkShown:a})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var sd=s(69875);const id=e=>{const{isIdLinkShown:t}=e,{tooltip:s,buttonBackgroundColor:i,foregroundColor:o}=e.theme.palette.semantic,n=(0,J.p)(sd.x);return{menu:Object.assign({width:200},(0,X.o)(Z.W0)),title:{marginBottom:Z.W0},destination:{position:"relative",paddingLeft:29},linkIcon:{position:"absolute",top:0,left:4,fill:o.primary2,alignItems:"flex-start"},account:{paddingLeft:29},ctid:{position:"relative",display:"flex",flexDirection:"row",alignItems:"center"},ctidIcon:{fill:o.primary2,marginLeft:Z.W0,marginRight:Z.W0},ctidText:{marginRight:Z.W0},idLinkContent:Object.assign(Object.assign(Object.assign(Object.assign({},(0,X.o)(0,Z.W0)),{color:t?o.primary2:o.negative}),(0,Q.O)({color:s.backgroundColor})),{nested:{":hover":Object.assign({},(0,Q.O)({color:s.backgroundColor})),[`:hover .${n}`]:Object.assign({},(0,Q.O)({color:i.tertiaryHover}))}}),idLinkControl:Object.assign({},(0,Q.O)({color:i.tertiaryNormal}))}};var od=s(90191),nd=s(14041),ad=s(30715);class rd extends o.Component{constructor(){super(...arguments),this.getOption=e=>(0,i.jsx)(Ot.a,{option:e},void 0),this.handleChange=e=>{const{locale:t,onChange:s}=this.props;e!==t&&s(e)}}render(){const{locale:e,rules:t}=this.props,s=(0,yt.u)();return(0,i.jsx)(ad.w,{options:s,value:e,onChange:this.handleChange,renderOption:this.getOption,extend:{selectedOption:t.optionListBoxItem(this.props),option:t.optionListBoxItem(this.props)}},void 0)}}const ld=(0,x.Z)((()=>({optionListBoxItem:Object.assign(Object.assign({},(0,X.o)(Z.W0)),{marginBottom:3,nested:{":last-child":{marginBottom:0}}})})))(rd);class dd extends o.Component{constructor(){super(...arguments),this.renderElement=()=>()=>{const{locale:e}=this.props;return(0,i.jsx)(ld,{locale:e,onChange:this.handleLocaleChanged},void 0)},this.handleLocaleChanged=e=>{const{onChange:t}=this.props;t(e)}}render(){const{locale:e,rules:t}=this.props;return(0,i.jsxs)(od.Z,Object.assign({icon:nd.b$[e],extend:{iconElementWrapper:t.contextMenuItemIconElementWrapper(this.props)}},{children:[St.af[e],this.renderElement()]}),void 0)}}const cd=(0,x.Z)((()=>({contextMenuItemIconElementWrapper:{width:"17px",height:"13px",lineHeight:"13px"}})))(dd);var ud=s(9265),hd=s(39323),gd=s(2727);const pd=(0,o.memo)((e=>{const{children:t}=e,s=t,n=(0,re.I0)(),{brokerLinkList:a,accountList:r,destination:l,url:d,traderId:c,locale:u,idLinkShown:h}=(0,ne.v)(td),[g,p]=(0,o.useState)(h),{css:b,rules:v}=(0,te.X)(id,{isIdLinkShown:g}),[m,j]=(0,o.useState)(!1),x=(0,o.useCallback)((()=>{j(!0)}),[j]),y=(0,o.useCallback)((()=>{j(!1)}),[j]),S=(0,o.useMemo)((()=>[...a.map((e=>({label:e.name,value:e.url}))),{label:(0,O.L)("Other"),value:Ql.m}]),[a]),f=(0,o.useMemo)((()=>r.map((e=>({value:e.traderId.toString(),label:`${e.traderLogin} (${e.depositCurrency})`})))),[r]),C=l===Ql.m,k=function(e){try{const t=new URL(Xl(e));return!t.host.includes(".")||t.host.startsWith(".")||t.host.endsWith(".")?(0,O.L)("Invalid URL"):void 0}catch(e){return(0,O.L)("Invalid URL")}}(d),I=C?(0,O.L)("Please enter URL"):"",L=(0,o.useCallback)((e=>{n(ud.S.update({destination:e}))}),[n]),w=(0,o.useCallback)((e=>{n(ud.S.update({customDestination:e}))}),[n]),T=(0,o.useCallback)((e=>{n(ud.S.update({traderId:(0,oi.J)(e)}))}),[n]),D=(0,o.useCallback)((e=>{n(ud.S.update({locale:e}))}),[n]),P=g?(0,O.L)("On"):(0,O.L)("Off"),N=(0,o.useCallback)((()=>{p((e=>!e))}),[]);(0,o.useLayoutEffect)((()=>{n(ud.S.update({showCtId:g}))}),[n,g]);const A=(0,o.useCallback)((()=>(0,i.jsxs)("div",Object.assign({className:b.menu()},{children:[(0,i.jsxs)("div",Object.assign({className:b.destination()},{children:[(0,i.jsx)(se.J,{source:ie.Y.link,width:oe.J.Medium,height:oe.J.Medium,extend:{root:v.linkIcon}},void 0),(0,i.jsx)("div",Object.assign({className:b.title()},{children:`${(0,O.L)("Destination URL")}:`}),void 0),(0,i.jsx)(Ct.P,{options:S,value:l,onChange:L},void 0),(0,i.jsx)(Bt.I,{},void 0),(0,i.jsx)(ct.U,{value:d,error:k,readonly:!C,placeholder:I,onChange:w},void 0)]}),void 0),(0,i.jsx)(jo.D,{},void 0),(0,i.jsxs)("div",Object.assign({className:b.account()},{children:[(0,i.jsx)("div",Object.assign({className:b.title()},{children:`${(0,O.L)("Select Account")}:`}),void 0),(0,i.jsx)(Ct.P,{options:f,value:c.toString(),onChange:T},void 0)]}),void 0),(0,i.jsx)(jo.D,{},void 0),(0,i.jsx)("div",{children:(0,i.jsx)(cd,{locale:u,onChange:D},void 0)},void 0),(0,i.jsx)(jo.D,{},void 0),(0,i.jsxs)("div",Object.assign({className:b.ctid()},{children:[(0,i.jsx)(se.J,{source:ie.Y.signIn,size:oe.J.Medium,extend:{root:v.ctidIcon}},void 0),(0,i.jsx)("div",Object.assign({className:b.ctidText()},{children:`${(0,O.L)("Show {0} Sign In","cTID")}:`}),void 0),(0,i.jsxs)(zs.b,{children:[(0,i.jsx)(gd.Z,Object.assign({value:g,onClick:N,extend:{content:v.idLinkContent,control:v.idLinkControl}},{children:P}),void 0),(0,O.L)("Show user's {0}","cTID")]},void 0)]}),void 0)]}),void 0)),[b,v,S,l,L,d,k,C,I,w,f,c,T,u,D,g,P,N]);return(0,i.jsxs)(hd.v,Object.assign({placement:"bottom-start",open:m,onOpen:x,onClose:y},{children:[s({isOpen:m}),A]}),void 0)})),bd=(0,o.memo)((()=>{const e=(0,o.useCallback)((e=>{const{isOpen:t}=e;return(0,i.jsx)(Yl.h,{iconSource:ie.Y.settings,backgroundType:Qt.Eo.Secondary,forceHovered:t},void 0)}),[]);return(0,i.jsx)(pd,{children:e},void 0)}));var vd=s(1050);const md=l()([Ul],(e=>({link:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class jd extends o.Component{render(){const{link:e,track:t}=this.props;return(0,i.jsx)(vd.j,Object.assign({text:e},{children:(e,s)=>e?(0,i.jsx)(Yl.h,{iconSource:ie.Y.checkmark,backgroundType:Qt.Eo.Secondary,size:oe.J.Medium,disabled:!0},void 0):(0,i.jsx)(Yl.h,{iconSource:ie.Y.copyToClipboard,backgroundType:Qt.Eo.Secondary,size:oe.J.Medium,onClick:()=>{s(),t({name:y.T2.ShareLinkCopied})}},void 0)}),void 0)}}const xd=(0,n.$)(md,{track:S.m.track})(jd);class yd extends o.Component{render(){const{productName:e,link:t}=this.props;return(0,i.jsxs)(ge.X,{children:[(0,i.jsx)("div",{children:(0,O.L)("Your {0} IB Link",e)},void 0),(0,i.jsx)(es.q,{},void 0),(0,i.jsx)(Hs.I,{value:t,readonly:!0},void 0),(0,i.jsx)(es.q,{},void 0),(0,i.jsx)(xd,{},void 0),(0,i.jsx)(es.q,{},void 0),(0,i.jsx)(bd,{},void 0)]},void 0)}}const Sd=(0,n.$)(Kl)(yd);class fd extends o.Component{constructor(){super(...arguments),this.onRefreshClick=()=>{const{loadPartner:e,loadAccountList:t}=this.props;e(),t()},this.onExportClick=()=>{const{exportData:e}=this.props;e()}}render(){const{styles:e}=this.props;return(0,i.jsxs)("div",Object.assign({className:e.root},{children:[(0,i.jsx)("div",Object.assign({className:e.left},{children:(0,i.jsx)(Sd,{},void 0)}),void 0),(0,i.jsxs)("div",Object.assign({className:e.right},{children:[(0,i.jsx)(ut.K,Object.assign({onClick:this.onRefreshClick},{children:(0,O.L)("Refresh")}),void 0),(0,i.jsx)(es.q,{},void 0),(0,i.jsx)(ut.K,Object.assign({onClick:this.onExportClick},{children:(0,O.L)("Export to Excel")}),void 0)]}),void 0)]}),void 0)}}const Od=(0,n.$)(El,{loadPartner:Fl.K.load,loadAccountList:Rl.i.loadList,exportData:Dl.y.exportData})((0,x.Z)((()=>({root:{display:"flex",flexDirection:"row",flexShrink:0,justifyContent:"space-between",marginBottom:Z.W0,overflow:"hidden"},left:{flexGrow:1,display:"flex",flexDirection:"row",overflow:"hidden"},right:{display:"flex",flexDirection:"row",overflow:"hidden",marginLeft:Z.W0},search:{flexGrow:1,width:"auto",height:"100%",maxWidth:180},type:{flexGrow:1,marginLeft:Z.W0,maxWidth:115}})))(fd)),Cd=l()([(0,u.$)(rr.K).data.rankList([]),(0,u.$)(rr.K).data.rankId()],((e,t)=>e.find((e=>e.id===t))))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),kd=l()([Ml.G],(e=>e.reduce(((e,t)=>e+t.monthlyVolumeInUsd),0)))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),Id=l()([Ml.G],(e=>e.reduce(((e,t)=>void 0!==t.groupMonthlyVolumeInUsd?e+t.groupMonthlyVolumeInUsd:e),0)))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),Ld=l()([(0,u.$)(rr.K).data.monthlyVolumeInUsd(),kd,Id],((e,t,s)=>e+t+s))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),wd=l()([(0,u.$)(rr.K).data.rankList([]),Ld],((e,t)=>{let s;return e.forEach((e=>{t>=e.volume&&(s=e)})),s}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),Td=l()([Ml.G],(e=>{let t=0,s=0;return e.forEach((e=>{void 0!==e.groupMonthlyVolumeInUsd?s++:t++})),{accountCount:t,subAccountCount:s}}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class Dd extends Ka.y{constructor(){super({className:"b-ib-accounts-clients-counts"}),this.accountCount=0,this.subAccountCount=0,this.render(),(0,Ga.H)().getObservableForSelector(Td).pipe((0,lr.R)(this.destroy$)).subscribe((e=>{this.accountCount=e.accountCount,this.subAccountCount=e.subAccountCount,this.render()}))}render(){this.$container.html(`\n            <div class="b-ib-accounts-clients-counts__total">\n                ${this.accountCount+this.subAccountCount}\n            </div>\n            <table class="b-ib-accounts-clients-counts__table">\n                <tr class="b-ib-accounts-clients-counts__row">\n                    <td class="b-ib-accounts-clients-counts__key">\n                        ${(0,er.X)((0,O.L)("Clients:"))}\n                    </td>\n                    <td class="b-ib-accounts-clients-counts__value">\n                        ${this.accountCount}\n                    </td>\n                </tr>\n                <tr class="b-ib-accounts-clients-counts__row">\n                    <td class="b-ib-accounts-clients-counts__key">\n                        ${(0,er.X)((0,O.L)("Sub-IBs:"))}\n                    </td>\n                    <td class="b-ib-accounts-clients-counts__value">\n                        ${this.subAccountCount}\n                    </td>\n                </tr>\n            </table>\n        `)}}class Pd extends Ka.y{constructor(e){super(),this.state=e,this.$container.addClass(`b-ib-rank-circle${e.isFilled?" b-ib-rank-circle_is-filled":""}${e.extraClass?` ${e.extraClass}`:""}`),this.render()}render(){const{rank:e}=this.state;this.$container.html(`\n            <div class="b-ib-rank-circle__number">\n                ${this.state.rankNumber}\n            </div>\n            <div class="b-ib-rank-circle__hr"></div>\n            <div class="b-ib-rank-circle__percent">\n                ${100-e.brokerPercentage-e.parentIbPercentage}%\n            </div>\n        `)}}class Nd extends Ka.y{constructor(e){super({className:"b-ib-current-rank-month"+(e.extraClass?` ${e.extraClass}`:"")}),this.render(),(0,Ga.H)().getObservableForSelector(Cd).pipe((0,lr.R)(this.destroy$)).subscribe((e=>{this.currentRank=e,this.render()}))}render(){this.$container.html(`\n            <div class="b-ib-current-rank-month__circle">\n            </div>\n            <div class="b-ib-current-rank-month__label">\n                ${(0,er.X)((0,O.L)("Based on previous month's Group Volume"))}\n            </div>\n        `),this.currentRank&&this.$container.find(".b-ib-current-rank-month__circle").append(new Pd({rankNumber:this.currentRank.index+1,isFilled:!0,rank:this.currentRank}).$container)}}class Ad extends Ka.y{constructor(e){super(),this.state=e,this.$container.addClass(`b-ib-rank-progress ${e.extraClass}`),this.render()}render(){const{rank:e}=this.state,t=this.state.currentVolume>=e.volume,s=Math.max(e.volume-this.state.currentVolume,0);this.$container.html(`\n            <div class="${t?"b-ib-rank-progress__reached-mark":"b-ib-rank-progress__not-reached-mark"}"></div>\n                ${t?(0,er.X)((0,O.L)("Achieved")):`+${sr(s)}m`}\n            </div>`)}}class Bd extends Ka.y{constructor(e){super({className:"b-ib-footer-ranks-list"+(e.extraClass?` ${e.extraClass}`:"")}),this.rankList=[],this.totalPartnerVolume=0,this.render(),(0,Ga.H)().getObservableForSelector((0,u.$)(rr.K).data.rankList([])).pipe((0,lr.R)(this.destroy$)).subscribe((e=>{this.rankList=e,this.render()})),(0,Ga.H)().getObservableForSelector(Ld).pipe((0,lr.R)(this.destroy$)).subscribe((e=>{this.totalPartnerVolume=e,this.render()})),(0,Ga.H)().getObservableForSelector(wd).pipe((0,lr.R)(this.destroy$)).subscribe((e=>{this.nextRank=e,this.render()}))}render(){this.$container.html(`\n            <div class="b-ib-footer-ranks-list__rank-circle">\n            </div>\n            <div class="b-ib-footer-ranks-list__list">\n            ${this.rankList.map(((e,t)=>`<div class="b-ib-footer-ranks-list__rank">\n                    <div class="b-ib-footer-ranks-list__rank-title">\n                        ${(0,er.X)((0,O.L)("Rank"))} ${t+1}\n                        (${e.name})\n                    </div>\n                    <div class="b-ib-footer-ranks-list__rank-progress">\n                    </div>\n                </div>`)).join("")}\n            </div>\n        `),this.nextRank&&this.$container.find(".b-ib-footer-ranks-list__rank-circle").append(new Pd({rankNumber:this.nextRank.index+1,isFilled:!0,rank:this.nextRank}).$container);const e=this.$container.find(".b-ib-footer-ranks-list__rank-progress");this.rankList.forEach(((t,s)=>{e.eq(s).append(new Ad({currentVolume:this.totalPartnerVolume,rank:t,extraClass:""}).$container)}))}}var Md=s(41044),$d=s(30704);const Ed=[$d.i.BalanceDepositIBCommission,$d.i.BalanceDepositIBSharedPercentageFromSubIB,$d.i.BalanceDepositIBSharedPercentageFromBroker,$d.i.BalanceWithdrawIBSharedPercentageToBroker,$d.i.BalanceWithdrawIBSharedPercentageToBroker],Fd=l()([Gs.M],(e=>e.filter((e=>{return t=e.operationType,Ed.indexOf(t)>-1;var t})).reduce(((e,t)=>e.plus(t.delta)),new(ll())(0))))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class Rd extends Ka.y{constructor(){super({className:"b-ib-footer-group-volume"}),this.depositDigits=0,this.depositDisplayName="",this.monthlyVolumeInUsd=0,this.partnerAccountsMonthlyVolumeInUsd=0,this.partnerSubAccountsMonthlyVolumeInUsd=0,this.totalPartnerCommission=new(ll())(0),this.totalPartnerVolume=0,this.render(),(0,Ga.H)().getObservableForSelector((0,u.$)(Ms.C).digits()).pipe((0,lr.R)(this.destroy$)).subscribe((e=>{this.depositDigits=e,this.render()})),(0,Ga.H)().getObservableForSelector((0,u.$)(Ms.C).displayName()).pipe((0,lr.R)(this.destroy$)).subscribe((e=>{this.depositDisplayName=e,this.render()})),(0,Ga.H)().getObservableForSelector((0,u.$)(rr.K).data.monthlyVolumeInUsd()).pipe((0,lr.R)(this.destroy$)).subscribe((e=>{this.monthlyVolumeInUsd=e,this.render()})),(0,Ga.H)().getObservableForSelector(kd).pipe((0,lr.R)(this.destroy$)).subscribe((e=>{this.partnerAccountsMonthlyVolumeInUsd=e,this.render()})),(0,Ga.H)().getObservableForSelector(Id).pipe((0,lr.R)(this.destroy$)).subscribe((e=>{this.partnerSubAccountsMonthlyVolumeInUsd=e,this.render()})),(0,Ga.H)().getObservableForSelector(Fd).pipe((0,lr.R)(this.destroy$)).subscribe((e=>{this.totalPartnerCommission=e,this.render()})),(0,Ga.H)().getObservableForSelector(Ld).pipe((0,lr.R)(this.destroy$)).subscribe((e=>{this.totalPartnerVolume=e,this.render()}))}render(){this.$container.html(`\n            <div class="b-ib-footer-group-volume__total">\n                ${ir.qY} ${sr(this.totalPartnerVolume)}m\n            </div>\n            <table class="b-ib-footer-group-volume__table">\n                <tr class="b-ib-footer-group-volume__row">\n                    <td class="b-ib-footer-group-volume__key">\n                        ${(0,er.X)(`${(0,O.L)("Your Volume")}:`)}\n                    </td>\n                    <td class="b-ib-footer-group-volume__value">\n                        ${ir.qY} ${sr(this.monthlyVolumeInUsd)}m\n                    </td>\n                </tr>\n                <tr class="b-ib-footer-group-volume__row">\n                    <td class="b-ib-footer-group-volume__key">\n                        ${(0,er.X)((0,O.L)("Client Volume:"))}\n                    </td>\n                    <td class="b-ib-footer-group-volume__value">\n                        ${ir.qY} ${sr(this.partnerAccountsMonthlyVolumeInUsd)}m\n                    </td>\n                </tr>\n                <tr class="b-ib-footer-group-volume__row">\n                    <td class="b-ib-footer-group-volume__key">\n                        ${(0,er.X)(`${(0,O.L)("Sub-IB Volume")}:`)}\n                    </td>\n                    <td class="b-ib-footer-group-volume__value">\n                        ${ir.qY} ${sr(this.partnerSubAccountsMonthlyVolumeInUsd)}m\n                    </td>\n                </tr>\n                <tr class="b-ib-footer-group-volume__row">\n                    <td class="b-ib-footer-group-volume__key">\n                        ${(0,er.X)(`${(0,O.L)("Net IB Commissions")}:`)}\n                    </td>\n                    <td class="b-ib-footer-group-volume__value">\n                        ${(0,Md.x)(this.depositDigits,this.depositDisplayName,!0)(this.totalPartnerCommission)}\n                    </td>\n                </tr>\n            </table>\n        `)}}class Wd extends Ka.y{constructor(e){super(Object.assign(Object.assign({},e),{className:"b-ib-accounts-footer"})),this.render(),(0,Ga.H)().getObservableForSelector(Cd).pipe((0,lr.R)(this.destroy$)).subscribe((e=>{this.currentRank=e,this.render()})),(0,Ga.H)().getObservableForSelector(wd).pipe((0,lr.R)(this.destroy$)).subscribe((e=>{this.nextRank=e,this.render()}))}render(){this.$container.html(`\n            <div class="b-ib-accounts-footer__item">\n                <div class="b-ib-accounts-footer__item-title">\n                    ${(0,er.X)((0,O.L)("Total Clients"))}\n                </div>\n                <div class="b-ib-accounts-footer__item-hr"></div>\n                <div class="b-ib-accounts-footer__item-content">\n                </div>\n            </div>\n            <div class="b-ib-accounts-footer__item">\n                <div class="b-ib-accounts-footer__item-title">\n                    ${(0,er.X)((0,O.L)("Rank (This Month)"))}\n                </div>\n                <div class="b-ib-accounts-footer__item-hr"></div>\n                <div class="b-ib-accounts-footer__item-content\n                    b-ib-accounts-footer__item-content_is-stretched">\n                </div>\n            </div>\n            <div class="b-ib-accounts-footer__item">\n                <div class="b-ib-accounts-footer__item-title">\n                    ${(0,er.X)((0,O.L)("Rank (Next Month)"))}\n                </div>\n                <div class="b-ib-accounts-footer__item-hr"></div>\n                <div class="b-ib-accounts-footer__item-content\n                    b-ib-accounts-footer__item-content_is-stretched">\n                </div>\n            </div>\n            <div class="b-ib-accounts-footer__item">\n                <div class="b-ib-accounts-footer__item-title">\n                    ${(0,er.X)((0,O.L)("Total Group Volume"))}\n                </div>\n                <div class="b-ib-accounts-footer__item-hr"></div>\n                <div class="b-ib-accounts-footer__item-content">\n                </div>\n            </div>\n        `);const e=this.$container.find(".b-ib-accounts-footer__item-content");e.eq(0).append((new Dd).$container),this.currentRank&&e.eq(1).append(new Nd({extraClass:"b-ib-accounts-footer__item-flex-grow"}).$container),this.nextRank&&e.eq(2).append(new Bd({extraClass:"b-ib-accounts-footer__item-flex-grow"}).$container),e.eq(3).append((new Rd).$container)}}class Hd extends Ya.n{}const zd=(0,Ya.l)(Wd,Hd);var Jd=s(63378);class Qd extends o.Component{constructor(){super(...arguments),this.onClick=()=>{const{login:e,open:t}=this.props;t({login:e})}}render(){return(0,i.jsx)(ut.K,Object.assign({wide:!0,onClick:this.onClick},{children:(0,O.L)("Give Bonus")}),void 0)}}const _d=(0,n.$)(void 0,{open:Jd.e.open})(Qd);var qd=s(41543);const Xd=l()([(0,u.$)(qd.U).traderId(),(0,u.$)(qd.U).rebateRate()],((e,t)=>({traderId:e,rebate:t})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().login()}));var Vd=s(42647),Zd=s(97067);class Ud extends o.Component{constructor(e){super(e),this.onChange=e=>{this.setState({currentRebate:e})},this.onApply=()=>{const{login:e,update:t}=this.props,{currentRebate:s}=this.state;t({login:e,rebateRate:(0,oi.J)(s)})};const{rebate:t}=e;this.state={currentRebate:null==t?void 0:t.toFixed()}}render(){const{currentRebate:e}=this.state,{rebate:t}=this.props,s=function(e){const t=(0,Zd.m)(e);if(void 0!==t)return t;if((0,$o.y6)(e)>0)return(0,O.L)("Max {0} decimal digits allowed",0);const s=(0,oi.J)(e);return s<0?(0,O.L)("Rebate should be more than {0}",0):s>100?(0,O.L)("Rebate should be less than {0}",100):void 0}(e),o=(0,oi.J)(e)!==t;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Vd.z,{value:e,error:s,step:"1",onChange:this.onChange},void 0),(0,i.jsx)(es.q,{},void 0),(0,i.jsx)(ut.K,Object.assign({disabled:!o||void 0!==s,onClick:this.onApply},{children:(0,O.L)("Apply Rebate")}),void 0)]},void 0)}}const Kd=(0,n.$)(Xd,{update:Rl.i.updateRebate})(Ud);class Yd extends o.Component{constructor(){super(...arguments),this.getColumns=(0,Fr.Z)(((e,t,s,o)=>[...(0,Pl.z)(e),{id:Nl.O.rebate,basis:210,fixed:!0,Header:()=>(0,i.jsx)("div",Object.assign({className:o},{children:(0,O.L)("Rebate, %")}),void 0),Cell:(e,t,o)=>(0,i.jsx)("div",Object.assign({className:s},{children:(0,i.jsx)(Kd,{login:o},void 0)}),void 0)},...t?[{id:Nl.O.giveBonus,basis:105,fixed:!0,Cell:(e,t,o)=>(0,i.jsx)("div",Object.assign({className:s},{children:(0,i.jsx)(_d,{login:o},void 0)}),void 0)}]:[]]),((e,t)=>`${e}:${t}`)),this.keyAccessor=e=>e.login,this.onTableStateChange=e=>{const{changeState:t}=this.props;t(e)}}render(){const{isLoading:e,accountList:t,tableState:s,timeOffset:o,giveBonusEnabled:n,styles:a}=this.props;return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(At.s,{children:[(0,i.jsx)(Od,{},void 0),(0,i.jsx)(Er.i,{id:"PartnerAccountTable",isLoading:e,data:t,columns:this.getColumns(o,n,a.rightButton,a.rebateHeader),keyAccessor:this.keyAccessor,tableState:s,onTableStateChange:this.onTableStateChange},void 0),(0,i.jsx)(Bt.I,{},void 0),(0,i.jsx)(zd,{},void 0)]},void 0)},void 0)}}const Gd=(0,n.$)($l,{changeState:Dl.y.changeState})((0,x.Z)((()=>({rightButton:{flexGrow:1,display:"flex",flexDirection:"row",paddingLeft:Z.W0,paddingRight:Z.W0},rebateHeader:{width:135}})))(Yd));var ec=s(60757);const tc=(0,o.memo)((()=>((()=>{const e=(0,re.I0)();(0,o.useEffect)((()=>(e(Fl.K.subscribe([ec.g])),()=>{e(Fl.K.unsubscribe([ec.g]))})),[e])})(),null)));var sc=s(98045);const ic=(0,o.memo)((()=>((()=>{const e=(0,re.I0)();(0,o.useEffect)((()=>(e(Rl.i.subscribeList([sc.a])),()=>{e(Rl.i.unsubscribeList([sc.a]))})),[e])})(),null)));var oc=s(46119);const nc=(0,o.memo)((e=>{const{from:t,to:s}=e;var i;return i=[{from:t,to:s}],(0,oc.x)(i,el._.subscribeList,el._.unsubscribeList),null}));class ac extends o.Component{render(){const{fromTimestamp:e,toTimestamp:t}=this.props;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(tc,{},void 0),(0,i.jsx)(ic,{},void 0),(0,i.jsx)(nc,{from:e,to:t},void 0),(0,i.jsxs)(At.s,{children:[(0,i.jsx)(hr,{},void 0),(0,i.jsx)(Bt.I,{},void 0),(0,i.jsxs)(pr.n,{children:[(0,i.jsx)(br.O,Object.assign({id:"accounts",label:(0,O.L)("IB Accounts"),align:vr.K.left},{children:(0,i.jsx)(Gd,{},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({id:"history",label:(0,O.L)("IB History"),align:vr.K.left},{children:(0,i.jsx)(Tl,{},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({id:"transactions",label:(0,O.L)("IB Transactions"),align:vr.K.left},{children:(0,i.jsx)(_r,{},void 0)}),void 0)]},void 0)]},void 0)]},void 0)}}const rc=(0,n.$)(Ua)(ac);var lc=s(32097),dc=s(47894);class cc extends o.Component{constructor(){super(...arguments),this.onClose=()=>{const{close:e}=this.props;e()},this.onResized=(e,t)=>{const{setDimension:s}=this.props;s({width:e,height:t})},this.onMoved=(e,t)=>{const{setPosition:s}=this.props;s({top:e,left:t})}}render(){const{isShown:e,width:t,height:s,top:o,left:n}=this.props;return e?(0,i.jsx)(fa.V,Object.assign({title:(0,O.L)("IB Center"),onClose:this.onClose,contentBackground:qa.r.Primary,isResizable:!0,width:t,height:s,top:o,left:n,minWidth:dc.Z.width,minHeight:dc.Z.height,onResized:this.onResized,onMoved:this.onMoved,extend:{body:Object.assign({display:"flex"},(0,X.o)(Z.W0))}},{children:(0,i.jsx)(rc,{},void 0)}),void 0):null}}const uc=(0,n.$)(Va,{close:lc.u.close,setDimension:lc.u.setDimension,setPosition:lc.u.setPosition})(cc),hc=e=>e.giveBonusDialog,gc=l()([(0,u.$)(hc).isShown(),(0,u.$)(hc).login()],((e,t)=>({isShown:e,login:t})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var pc=s(5957),bc=s(72832),vc=s(77218);const mc=(0,_s.X)((0,u.$)(qd.U).depositCurrency(),d.mr).chain((e=>(0,qs.t)(bc.R,{assetName:(0,vc.e)(e)},d.iN))).build();var jc=s(57650);const xc=(0,_s.X)((0,lt.a)({partnerDepositAssetId:(0,u.$)(mc).assetId(),depositAssetId:(0,u.$)(Ms.C).assetId()})(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().login()})),d.mr).chain((({partnerDepositAssetId:e,depositAssetId:t})=>(0,qs.t)(jc.e,{fromAssetId:t,toAssetId:e},d.iN))).build(),yc=l()([(0,u.$)(qd.U).depositCurrency(),(0,u.$)(mc).digits(),pc.M,xc],((e,t,s,i)=>({depositCurrency:e,depositCurrencyDigits:t,minBonus:new(ll())(10).pow(-t),maxBonus:void 0!==i?null==s?void 0:s.mul(i):void 0})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().login()}));var Sc=s(61392),fc=s(76042),Oc=s(67142);const Cc=(0,_s.X)((0,u.$)(hc).login(),d.mr).chain((e=>(0,qs.t)(qd.U,{login:e}))).build(),kc=(0,_s.X)((0,u.$)(hc).login(),d.mr).chain((e=>(0,qs.t)(mc,{login:e}))).build(),Ic=l()([(0,u.$)(Ms.C).assetId(),(0,u.$)($.S).depositCurrency(),(0,u.$)(Cc).depositCurrency(),(0,u.$)(kc).assetId()],((e,t,s,i)=>({currentAccountDepositAssetId:e,currentAccountDepositAssetName:t,partnerAccountDepositAssetName:s,partnerAccountDepositAssetId:i})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),Lc=(0,o.memo)((()=>((()=>{const{currentAccountDepositAssetId:e,currentAccountDepositAssetName:t,partnerAccountDepositAssetName:s,partnerAccountDepositAssetId:i}=(0,ne.v)(Ic);(0,Oc.Q)([t,s]),(0,fc.Z)(void 0!==e&&void 0!==i?[{fromAssetId:e,toAssetId:i}]:[])})(),null)));class wc extends o.Component{constructor(e){super(e),this.onChange=e=>{this.setState({amount:e})},this.onSubmit=()=>{const{login:e,give:t,close:s}=this.props,{amount:i}=this.state;t({login:e,amount:(0,oi.J)(i)}),s()},this.onCancel=()=>{const{close:e}=this.props;e()};const{minBonus:t}=e;this.state={amount:t.toFixed()}}render(){const{login:e,minBonus:t,maxBonus:s,depositCurrency:o,depositCurrencyDigits:n}=this.props,{amount:a}=this.state,r=function(e,t,s,i){const o=(0,Zd.m)(e);if(void 0!==o)return o;if((0,$o.y6)(e)>t)return(0,O.L)("Max {0} decimal digits allowed",t);const n=new(ll())((0,oi.J)(e));return n.lt(s)?(0,O.L)("Amount should be more than {0} or equal",(0,Md.x)(t)(s)):i&&n.gt(i)?(0,O.L)("The amount you entered exceeds your current balance."):void 0}(a,n,t,s);return(0,i.jsxs)(At.s,{children:[(0,i.jsx)(Lc,{},void 0),(0,i.jsx)(mo.A,{children:(0,O.L)("Bonus for Account {0}",e)},void 0),(0,i.jsx)(jo.D,{marginTop:2*Z.W0,marginBottom:2*Z.W0},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(Re.b,{children:[(0,O.L)("Give Bonus"),(0,i.jsx)(es.q,{},void 0),(0,i.jsx)(Vd.z,{value:a,error:r,step:t.toString(),onChange:this.onChange},void 0),(0,i.jsx)(es.q,{},void 0),o]},void 0)},void 0),(0,i.jsx)(Bt.I,{},void 0),void 0!==r&&(0,i.jsx)(ge.X,{children:(0,i.jsx)(We.H,Object.assign({textColor:He.d.Error},{children:r}),void 0)},void 0),(0,i.jsx)(Bt.I,{height:2*Z.W0},void 0),(0,i.jsx)(ge.X,{children:(0,O.L)("Important: if bonus is convertible into Balance, then each USD which will be converted into Balance will be deducted from you.")},void 0),(0,i.jsx)(Bt.I,{height:3*Z.W0},void 0),(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(Re.b,{children:(0,i.jsx)(ut.K,Object.assign({wide:!0,disabled:void 0!==r,onClick:this.onSubmit},{children:(0,O.L)("Give Bonus")}),void 0)},void 0),(0,i.jsx)(Re.b,{children:(0,i.jsx)(Sc.U,Object.assign({wide:!0,onClick:this.onCancel},{children:(0,O.L)("Cancel")}),void 0)},void 0)]},void 0)]},void 0)}}const Tc=(0,n.$)(yc,{give:Rl.i.giveBonus,close:Jd.e.close})(wc);class Dc extends o.Component{constructor(){super(...arguments),this.onClose=()=>{const{close:e}=this.props;e()}}render(){const{isShown:e,login:t}=this.props;return e?(0,i.jsx)(fa.V,Object.assign({title:(0,O.L)("Bonus for Account {0}",t),width:400,onClose:this.onClose,extend:{body:Object.assign({},(0,X.o)(Z.W0))}},{children:(0,i.jsx)(Tc,{login:t},void 0)}),void 0):null}}const Pc=(0,n.$)(gc,{close:Jd.e.close})(Dc);var Nc=s(89473);const Ac=l()([(0,u.$)(Nc.f).isOnline(),(0,u.$)(Ye.Y).idAuthorized(),(0,u.$)(Ye.Y).serverAuthorized(),(0,u.$)(Ye.Y).isPlannedDisconnect(),rt.i,(0,u.$)(Ye.Y).isAppActive()],((e,t,s,i,o,n)=>({isShown:n&&(!e||!t||!s&&!i),isOnline:e,idAuthorized:t,serverAuthorized:s,productName:o})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),Bc=(0,o.memo)((()=>{const{isShown:e,isOnline:t,idAuthorized:s,serverAuthorized:n,productName:a}=(0,ne.v)(Ac),r=(0,o.useMemo)((()=>t?a:(0,O.L)("Connection failure")),[t,a]),l=(0,o.useMemo)((()=>t?s&&n?(0,O.L)("An error occurred. Please, try again later or contact support."):(0,O.L)("Failed to connect. Trying to establish connection..."):(0,O.L)("An error occurred. Please check your internet connection.")),[t,s,n]),d=(0,o.useCallback)((()=>{window.location.reload()}),[]);return e&&(0,i.jsx)(fa.V,Object.assign({title:r,width:450,height:80,extend:{body:{display:"flex"}}},{children:(0,i.jsxs)(ge.X,Object.assign({flexShrink:1,flexGrow:1,alignItems:"center"},{children:[(0,i.jsx)(At.s,{children:l},void 0),(0,i.jsx)(At.s,Object.assign({flexShrink:0},{children:(0,i.jsx)(ut.K,Object.assign({onClick:d},{children:(0,O.L)("Reload")}),void 0)}),void 0)]}),void 0)}),void 0)}));var Mc=s(95393);const $c=l()([(0,u.$)(Mc.E).data()],(e=>Object.values(e).filter((e=>e.triggerTimestamp)).sort(((e,t)=>e.triggerTimestamp-t.triggerTimestamp))))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),Ec=l()([$c],(e=>({priceAlertTriggeredList:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var Fc=s(76199),Rc=s(8519),Wc=s(14706);const Hc=(0,_s.X)((0,u.$)($.S).brokerName(),d.mr).chain((e=>(0,qs.t)(Wc.F,{brokerName:e},d.iN))).build();var zc=s(77585),Jc=s(28494);const Qc=l()([(0,u.$)($.S).traderLogin(),(0,u.$)($.S).live(),(0,u.$)(Hc).brokerTitleShort(),(0,u.$)(c.H).data.isLcg(),(0,u.$)(zc.h).symbolId(),(0,u.$)(zc.h).name(),(0,u.$)(zc.h).digits(),(0,u.$)(Jc.T).quoteType(),(0,u.$)(Jc.T).condition(),(0,u.$)(Jc.T).alertMessage(),(0,u.$)(Jc.T).price()],((e,t,s,i,o,n,a,r,l,d,c)=>({traderLogin:e,isLive:t,shortBrokerTitle:s,isLcg:i,symbolId:o,symbolName:n,digits:a,quoteType:r,condition:l,alertMessage:d,price:c})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().priceAlertId()}));var _c=s(46382),qc=s(92481),Xc=s(53893),Vc=s(85173),Zc=s(29480),Uc=s(10136),Kc=s(44202);const Yc=(0,o.memo)((e=>{const{priceAlertId:t}=e,{traderLogin:s,isLive:n,shortBrokerTitle:a,isLcg:r,symbolId:l,symbolName:d,digits:c,quoteType:u,condition:h,alertMessage:g,price:p}=(0,ne.v)(Qc,{priceAlertId:t}),b=n?(0,O.L)("Live"):(0,O.L)("Demo"),v=r||void 0===a?(0,O.L)("Price Alert (A/c {0}, {1})",s,b):(0,O.L)("Price Alert ({0}, A/c {1}, {2})",a,s,b),m=(0,re.I0)(),j=(0,o.useCallback)((()=>{m(Xc.$.removeDone({priceAlertId:t}))}),[t,m]),x=(0,o.useCallback)((()=>{m(Xc.$.removeDone({priceAlertId:t})),m(Uc.L.open({type:Kc.k.TradeDialog,tradeType:Zc.YL.NewPosition,symbolId:l}))}),[t,l,m]);return(0,i.jsxs)(At.s,{children:[(0,i.jsx)(ge.X,Object.assign({marginBottom:3*Z.W0},{children:(0,i.jsx)(Cl.O,{children:v},void 0)}),void 0),(0,i.jsxs)(ge.X,Object.assign({justifyContent:"space-between",marginBottom:2*Z.W0},{children:[(0,i.jsx)(Re.b,{children:(0,O.L)("The price your requested to be alerted at, was reached.")},void 0),(0,i.jsx)(Re.b,Object.assign({marginLeft:3*Z.W0},{children:(0,i.jsxs)(_c.h,Object.assign({onClick:x},{children:[(0,i.jsx)(se.J,{source:ie.Y.newOrder,size:oe.J.Medium},void 0),(0,O.L)("Create New Order")]}),void 0)}),void 0)]}),void 0),(0,i.jsx)(ge.X,Object.assign({marginBottom:2*Z.W0},{children:(0,i.jsx)(Fc.z,Object.assign({paddingTop:Z.W0,paddingRight:Z.W0,paddingBottom:Z.W0,paddingLeft:Z.W0},{children:(0,i.jsxs)(ge.X,{children:[(0,i.jsxs)(At.s,Object.assign({flexBasis:80},{children:[(0,i.jsx)(ge.X,{children:`${(0,O.L)("Symbol")}:`},void 0),(0,i.jsx)(ge.X,{children:`${(0,O.L)("Price")}:`},void 0),(0,i.jsx)(ge.X,{children:`${(0,O.L)("Condition")}:`},void 0),(0,i.jsx)(ge.X,{children:`${(0,O.L)("Message")}:`},void 0)]}),void 0),(0,i.jsxs)(At.s,{children:[(0,i.jsx)(ge.X,{children:d},void 0),(0,i.jsx)(ge.X,{children:(0,Rc.T4)(c)(p)},void 0),(0,i.jsx)(ge.X,{children:(0,Vc.$)(u,h)},void 0),(0,i.jsx)(ge.X,{children:g},void 0)]},void 0)]},void 0)}),void 0)}),void 0),(0,i.jsx)(ge.X,Object.assign({alignItems:"stretch",minHeight:19},{children:(0,i.jsx)(qc.t,Object.assign({isStretch:!0,onClick:j},{children:(0,i.jsx)(Re.b,Object.assign({justifyContent:"center",alignItems:"center"},{children:(0,O.L)("OK")}),void 0)}),void 0)}),void 0)]},void 0)})),Gc=(0,o.memo)((e=>{const{priceAlertId:t,isModal:s,offsetTop:n,offsetLeft:a}=e,r=(0,re.I0)(),l=(0,o.useCallback)((()=>{r(Xc.$.removeDone({priceAlertId:t}))}),[t,r]);return(0,i.jsx)(fa.V,Object.assign({title:(0,O.L)("Price Alert"),isModal:s,offsetLeft:a,offsetTop:n,onClose:l},{children:(0,i.jsx)(Yc,{priceAlertId:t},void 0)}),void 0)})),eu=(0,o.memo)((()=>{const{priceAlertTriggeredList:e}=(0,ne.v)(Ec);return(0,i.jsx)(i.Fragment,{children:e.map(((e,t)=>(0,i.jsx)(Gc,{isModal:0===t,priceAlertId:e.id,offsetLeft:20*t,offsetTop:20*t},e.id)))},void 0)}));var tu=s(18045);const su=l()([(0,u.$)(tu.d).isShown(),rt.i],((e,t)=>({isShown:e,productName:t})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var iu=s(71121);const ou=e=>{const{height:t}=e;return{root:{height:t,overflow:"auto"}}};var nu=s(75745),au=s(96160);const ru=l()([(0,u.$)(c.H).data.lcgUrlDepositFrameToken(),Rt.t,(0,u.$)(au.T).fontSizeIndex(),(0,u.$)(Ft.r).locale(),(0,u.$)(tu.d).token(),(0,u.$)(tu.d).width(),(0,u.$)(tu.d).height(),(0,u.$)(pn.O).height()],((e,t,s,i,o,n,a,r)=>{const l=r-.1*r;return{isLoading:!o,url:(0,nu.c)(e,{palette:t,fontSize:s,locale:i,addClasses:!0,token:o}),width:n,height:a,maxHeight:l}}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var lu=s(53048);const du=(0,o.memo)((()=>{const{isLoading:e,url:t,width:s,height:o,maxHeight:n}=(0,ne.v)(ru),{css:a}=(0,te.X)(ou,{height:Math.min(o,n)});return e?(0,i.jsx)("div",Object.assign({style:{height:o,width:s},className:a.root()},{children:(0,i.jsx)(lu.h,{},void 0)}),void 0):(0,i.jsx)("div",Object.assign({className:a.root()},{children:(0,i.jsx)("iframe",{height:`${o}px`,width:`${s}px`,frameBorder:0,src:t},void 0)}),void 0)})),cu=(0,o.memo)((()=>{const{isShown:e,productName:t}=(0,ne.v)(su),s=(0,re.I0)(),n=(0,o.useCallback)((()=>{s(iu.b.close())}),[s]);return e?(0,i.jsxs)(ye.M,Object.assign({title:`${(0,O.L)("Pay Online")} - ${t}`,onClose:n},{children:[(0,i.jsx)(i.Fragment,{},void 0),(0,i.jsx)(du,{},void 0)]}),void 0):null})),uu=e=>e.kawaseFundsDialog;var hu=s(45596);const gu=l()([(0,u.$)(uu).isShown(),(0,u.$)(uu).tab(),(0,u.$)(uu).analyticsOpenFrom(),rt.i,hu.g],((e,t,s,i,o)=>({isShown:e,tab:t,analyticsOpenFrom:s,productName:i,isLiveAccountAuthorized:o})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var pu=s(26907);var bu=s(58365);const vu=()=>({container:{width:"100%",height:"100%",border:"none"}});var mu=s(72478),ju=s(61098),xu=s(87161);const yu=l()([(0,Ae.P)().url(),(0,Ae.P)().token(),zi.pu,(0,u.$)($.S).groupId(),(0,u.$)($.S).traderLogin(),(0,u.$)(Ms.C).displayName(),(0,u.$)(Ft.r).locale(),Rt.t,(0,u.$)(N.BA).data.status(),N.Ee,(0,u.$)(Fa.v).data.Jurisdiction.Id()],((e,t,s,i,o,n,a,r,l,d,c)=>{if(void 0===e)return void console.assert(!1,"base url is undefined, but it is required parameter for construct payment url");const u=r===Qt.CT.Dark?"dark":"light",h=ju.Q.statusToProto(l),g=Object.assign(Object.assign({},void 0!==t?{token:t}:{}),{userId:s.userId,email:s.email,account:o,currency:n,groupId:i,kycStatus:h,firstName:d.firstName,lastName:d.surname,country:d.country,address:d.streetAddress,city:d.city,zipCode:d.zip,phoneNumber:d.phone,jurisdiction:c,device:"web",language:a,theme:u});return Object.entries(g).reduce(((e,[t,s])=>(0,mu.jX)(e,t,String(s))),e)}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,xu.q)((0,Ae.P)().url(),(0,Ae.P)().token())})),Su=(0,_s.X)((0,u.$)(ei.c).settings.FundsManagement.DepositWireTransfer.OpenWebPageUrl(),d.mr).chain((e=>(0,qs.t)(yu,{url:e}))).build(),fu=l()([Su],(e=>({url:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().token()}));var Ou=s(95651);const Cu=l()([(0,u.$)((e=>e.idCreateInAppOneTimeToken)).data(),(0,Ae.P)().key()],((e,t)=>{var s;return null!==(s=e[t])&&void 0!==s?s:{token:void 0,networkStatus:Cs.I.None}}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().key()})),ku=e=>{const t=(0,re.I0)(),s=(0,ne.v)(Cu,{key:e});return(0,o.useEffect)((()=>(t(Ou.$.load({key:e})),()=>{t(Ou.$.remove({key:e}))})),[e,t]),s};var Iu;!function(e){e.KawaseDeposit="KawaseDeposit",e.KawaseWithdraw="KawaseWithdraw"}(Iu||(Iu={}));const Lu=(0,o.memo)((()=>{const{css:e}=(0,te.X)(vu,{}),{token:t,networkStatus:s}=ku(Iu.KawaseDeposit),{url:o}=(0,ne.v)(fu,{token:t});return(s===Cs.I.Done||s===Cs.I.Failed)&&(0,i.jsx)("iframe",{src:o,className:e.container()},void 0)})),wu=()=>({container:{width:"100%",height:"100%",border:"none"}}),Tu=(0,_s.X)((0,u.$)(ei.c).settings.FundsManagement.RequestWithdrawal.Url(),d.mr).chain((e=>(0,qs.t)(yu,{url:e}))).build(),Du=l()([Tu],(e=>({url:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().token()})),Pu=(0,o.memo)((()=>{const{css:e}=(0,te.X)(wu,{}),{token:t,networkStatus:s}=ku(Iu.KawaseWithdraw),{url:o}=(0,ne.v)(Du,{token:t});return(s===Cs.I.Done||s===Cs.I.Failed)&&(0,i.jsx)("iframe",{src:o,className:e.container()},void 0)})),Nu=(0,o.memo)((()=>{const{isShown:e,productName:t,analyticsOpenFrom:s,tab:n}=(0,ne.v)(gu),a=(0,re.I0)(),r=(0,o.useCallback)((()=>{a(pu.u.close())}),[a]),l=(0,o.useCallback)(((e,t)=>{const i=bu.X[t];void 0!==i&&a(pu.u.open({tab:i,analyticsOpenFrom:s}))}),[s,a]),d={default:{title:void 0,pages:{[bu.X.Deposit]:{title:(0,O.L)("Deposit"),component:Lu},[bu.X.Withdrawal]:{title:(0,O.L)("Withdrawal"),component:Pu}}}},c=d.default.pages[n],u=c.component;return e?(0,i.jsxs)(ye.M,Object.assign({title:`${c.title} - ${t}`,width:860,height:710,onClose:r},{children:[(0,i.jsx)(Se.N,{groups:d,activePage:n,onSelectPage:l},void 0),(0,i.jsx)(u,{},void 0)]}),void 0):null})),Au=e=>e.defaultFundsDialog,Bu=l()([(0,u.$)(Au).isShown(),(0,u.$)(Au).tab(),(0,u.$)(Au).analyticsOpenFrom(),rt.i],((e,t,s,i)=>({isShown:e,tab:t,analyticsOpenFrom:s,productName:i})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var Mu=s(36345);var $u=s(36876);const Eu=l()([po.L],(e=>({idProductName:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),Fu=(0,o.memo)((()=>{const{idProductName:e}=(0,ne.v)(Eu),t=(0,re.I0)(),s=(0,o.useCallback)((()=>{t(Mu.G.close()),t(Ma.I.open({})),t(S.m.track({name:y.T2.AccountWindowOpened,params:{method:y.Zq.DepositDialog}}))}),[t]),n=(0,o.useCallback)((()=>{t(Mu.G.close()),t(Ia.G.open({tab:La.e.Live})),t(S.m.track({name:y.T2.AccountWindowOpened,params:{method:y.Zq.DepositDialog}}))}),[t]);return(0,i.jsxs)(At.s,Object.assign({alignItems:"stretch",justifyContent:"center"},{children:[(0,i.jsx)(ge.X,Object.assign({marginBottom:2*Z.W0,justifyContent:"center"},{children:(0,O.L)("Login to your Live trading account and your {0} to manage your funds",e)}),void 0),(0,i.jsx)(ge.X,Object.assign({minHeight:19,marginBottom:2*Z.W0},{children:(0,i.jsx)(qc.t,Object.assign({isStretch:!0,onClick:s},{children:(0,i.jsx)(Re.b,Object.assign({justifyContent:"center",alignItems:"center"},{children:(0,O.L)("Log in to your Live trading account")}),void 0)}),void 0)}),void 0),(0,i.jsx)(ge.X,Object.assign({minHeight:19,marginBottom:2*Z.W0},{children:(0,i.jsx)(qc.t,Object.assign({isStretch:!0,onClick:n},{children:(0,i.jsx)(Re.b,Object.assign({justifyContent:"center",alignItems:"center"},{children:(0,O.L)("Open Live Account")}),void 0)}),void 0)}),void 0)]}),void 0)})),Ru=(0,o.memo)((()=>{const{isShown:e,productName:t,analyticsOpenFrom:s,tab:n}=(0,ne.v)(Bu),a=(0,re.I0)(),r=(0,o.useCallback)((()=>{a(Mu.G.close())}),[a]),l=(0,o.useCallback)(((e,t)=>{const i=$u.v[t];void 0!==i&&a(Mu.G.open({tab:i,analyticsOpenFrom:s}))}),[s,a]),d={default:{title:void 0,pages:{[$u.v.Deposit]:{title:(0,O.L)("Deposit"),component:Fu},[$u.v.Withdrawal]:{title:(0,O.L)("Withdrawal"),component:Fu}}}},c=d.default.pages[n],u=c.component;return e?(0,i.jsxs)(ye.M,Object.assign({title:`${c.title} - ${t}`,width:860,height:710,onClose:r},{children:[(0,i.jsx)(Se.N,{groups:d,activePage:n,onSelectPage:l},void 0),(0,i.jsx)(u,{},void 0)]}),void 0):null}));var Wu=s(49603);const Hu=l()([(0,u.$)((e=>e.agreementDialog)).isShown()],(e=>({isShown:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class zu extends o.Component{constructor(){super(...arguments),this.onClick=()=>{const{save:e,set:t,close:s}=this.props;e(),t(!0),s({type:Kc.k.AgreementDialog})}}render(){const{isShown:e,styles:t,rules:s}=this.props;return e?(0,i.jsxs)(fa.V,Object.assign({title:(0,O.L)("Important Notice"),testId:"important-notice",extend:{container:s.dialogContainer(this.props),overlay:s.dialogOverlay(this.props)}},{children:[(0,i.jsx)("div",Object.assign({className:t.title},{children:(0,O.L)("Our EULA for {0} has been Updated","cTrader")}),void 0),(0,i.jsx)("div",{className:t.content,dangerouslySetInnerHTML:{__html:(0,O.L)("We would like to inform that our End-User License Agreement for {0} has been updated. Please familiarize yourself by following this {1}link{2}. We encourage you to carefully review this policy.","cTrader",'<a href="https://spotware.com/eula/" target="_blank">',"</a>")}},void 0),(0,i.jsx)(ut.K,Object.assign({onClick:this.onClick,extend:{root:s.button(this.props)},testId:"button"},{children:(0,O.L)("Acknowledge & Continue")}),void 0)]}),void 0):null}}const Ju=(0,n.$)(Hu,{save:Wu.L.set,set:Wu.L.update,close:Uc.L.close})((0,x.Z)((e=>{const{title:t}=e.theme.font.semantic,{foregroundColor:s}=e.theme.palette.semantic;return{root:{},title:{fontSize:t.primary,marginBottom:15},content:{marginBottom:20,nested:{"> a":{color:s.link,outline:"none"}}},button:{width:"100%"},dialogContainer:{width:450},dialogOverlay:{opacity:.65}}}))(zu));var Qu=s(66457);const _u=l()([(0,u.$)((e=>e.copyWasEnabledDialog)).isShown(),rt.i],((e,t)=>({isShown:e,brokerProductName:t})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var qu=s(87505),Xu=s(58278);class Vu extends o.Component{constructor(){super(...arguments),this.onClose=()=>{const{set:e,close:t}=this.props;e(),t()}}render(){const{isShown:e,brokerProductName:t,styles:s,rules:o}=this.props;if(!e)return null;const n=(0,O.L)("{0} Copy Now in {1}","cTrader",t);return(0,i.jsxs)(fa.V,Object.assign({title:n,onClose:this.onClose,extend:{header:o.dialogHeader(this.props),body:o.dialogBody(this.props)}},{children:[(0,i.jsxs)("div",Object.assign({className:s.content},{children:[(0,i.jsx)("div",Object.assign({className:s.title},{children:n}),void 0),(0,i.jsx)("div",Object.assign({className:s.caption},{children:(0,O.L)("{0} Copy is now available as a fully integrated feature of {1}. You can start using it either as an Investor or a Strategy Provider.","cTrader",t)}),void 0),(0,i.jsx)(ut.K,Object.assign({onClick:this.onClose,extend:{root:o.button(this.props)}},{children:(0,O.L)("OK")}),void 0)]}),void 0),(0,i.jsx)("div",{className:s.image},void 0)]}),void 0)}}const Zu=(0,n.$)(_u,{set:Xu.s.set,close:qu.Q.close})((0,x.Z)((e=>{const{backgroundColor:t}=e.theme.palette.semantic,{title:i}=e.theme.font.semantic;return{root:{},dialogContainer:Object.assign({},(0,V.E)(0)),dialogHeader:{display:"none"},dialogBody:Object.assign(Object.assign(Object.assign({display:"flex"},(0,X.o)(0,0,0,15)),(0,Q.O)({color:t.primaryNormal})),{width:500}),content:{display:"flex",flexDirection:"column",paddingTop:14,paddingBottom:12},image:Object.assign(Object.assign({},(0,Q.O)({image:`url('${s(64409)}')`,size:"cover",repeat:"no-repeat"})),{width:250,height:"auto",flexShrink:0}),title:{fontSize:i.secondary,fontWeight:"bold",marginBottom:2*Z.W0},caption:{flexGrow:1,marginBottom:2*Z.W0},button:{width:193}}}))(Vu)),Uu=l()([(0,u.$)((e=>e.jurisdictionDialog)).isShown(),(0,u.$)(m.Z).info.title(),rt.i],((e,t,s)=>({isShown:e,brokerName:t,brokerProductName:s})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class Ku extends o.Component{constructor(){super(...arguments),this.onClick=()=>{window.location.reload()}}render(){const{isShown:e,brokerName:t,brokerProductName:s,styles:o,rules:n}=this.props;return e?(0,i.jsx)(fa.V,Object.assign({title:`${(0,O.L)("Jurisdiction has been changed")} - ${t}`,extend:{container:n.dialogContainer(this.props)}},{children:(0,i.jsxs)("div",Object.assign({className:o.root},{children:[(0,i.jsx)("div",Object.assign({className:o.header},{children:(0,O.L)("Jurisdiction has been changed")}),void 0),(0,i.jsx)("div",Object.assign({className:o.body},{children:(0,O.L)("Your Jurisdiction has been changed. Please refresh {0} or re-login to your cTID in order to complete Jurisdiction change",s)}),void 0),(0,i.jsx)(ut.K,Object.assign({onClick:this.onClick},{children:(0,O.L)("Refresh")}),void 0)]}),void 0)}),void 0):null}}const Yu=(0,n.$)(Uu)((0,x.Z)((()=>({root:{display:"flex",flexDirection:"column"},header:{marginBottom:15,fontSize:20},body:{marginBottom:30},dialogContainer:{width:350}})))(Ku)),Gu=l()([(0,u.$)(N.BA).contentType(),(0,u.$)(N.BA).customParams(),(0,u.$)(N.BA).data.status()],((e,t,s)=>({contentType:e,customParams:t,status:s})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var eh=s(73935),th=s(70655),sh=s(45990);const ih=e=>Object.assign(Object.assign(Object.assign(Object.assign({},(0,X.o)(10,40)),{fontWeight:"bold"}),(0,V.E)(5)),{nested:{":active":{borderColor:e.customParams.uploadFileButtonColor},":hover":{cursor:"pointer"},mobile:{fontSize:"14px"}},color:e.customParams.uploadFileButtonTextColor});class oh extends o.Component{render(){const e=this.props,{rules:t,styles:s}=e,o=(0,th._T)(e,["rules","styles"]);return(0,i.jsx)(go.z,Object.assign({},o,{extend:{root:t.root(this.props),content:t.content(this.props)}}),void 0)}}const nh=(0,x.Z)((e=>{const{foregroundColor:t,backgroundColor:s}=sh.Rp,i=(0,Mn.d)(e,{foregroundColorNormal:t.primaryForAccentBackground,foregroundColorDisabled:t.primaryForAccentBackgroundDisabled,backgroundColorNormal:s.secondaryNormal,backgroundColorHover:s.secondaryHover,backgroundColorDisabled:s.secondaryDisabled,fontSize:14});return{root:{height:"auto"},content:(0,_.g)((()=>ih(e)),(()=>i))}}))(oh),ah=(0,x.Z)((()=>({root:{},content:Object.assign(Object.assign({},(0,X.o)(Z.W0,5*Z.W0)),(0,V.E)(Z.q0))})))(nh);var rh=s(54170),lh=s(46125);const dh=l()([N.Wt,(0,u.$)(N.BA).data.status(),(0,u.$)(N.BA).brokerEmail(),(0,u.$)(lh.I).localizedExplanation.defaultExplanation(),(0,u.$)(lh.I).localizedExplanation.byLanguage(),(0,u.$)(N.BA).customParams(),(0,u.$)(Ft.r).locale()],((e,t,s,i,o,n,a)=>{var r;return{isEditable:e,status:t,brokerEmail:s,localizedExplanation:null!==(r=o[a])&&void 0!==r?r:i,customParams:n}}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));function ch(e){switch(e){case A.aW.KYC_STATUS_SUBMITTED:return(0,O.L)("Form Submitted");case A.aW.KYC_STATUS_VALIDATED:return(0,O.L)("Account Activated!");case A.aW.KYC_STATUS_REJECTED:return(0,O.L)("Account Rejected");default:return(0,O.L)("Activate Account")}}function uh(e,t,s){switch(e){case A.aW.KYC_STATUS_SUBMITTED:return`${(0,O.L)("Your account verification request is being processed.")}\n${(0,O.L)("We will notify you of its status via email as soon as possible.")}`;case A.aW.KYC_STATUS_VALIDATED:return(0,O.L)("Thank you for your patience. Your account is activated and ready to Trade!");case A.aW.KYC_STATUS_REJECTED:return(0,i.jsxs)("span",{children:[`${(0,O.L)("We are not allowed to activate your account due to strict regulation guidelines.")}\nL('If you believe there was a mistake, please contact us at') `,(0,i.jsx)("a",Object.assign({href:`mailto:${t}`},{children:t}),void 0)]},void 0);default:return s}}class hh extends o.Component{constructor(){super(...arguments),this.onSkipAndContinue=()=>{const{skipAndContinue:e}=this.props;e()}}render(){const{status:e,brokerEmail:t,customParams:s,localizedExplanation:o,styles:n}=this.props,a=!s.skipAndContinue;return(0,i.jsxs)("div",Object.assign({className:n.container},{children:[(0,i.jsx)("div",Object.assign({className:n.title},{children:ch(e)}),void 0),(0,i.jsxs)("div",Object.assign({className:n.descriptionContainer},{children:[(0,i.jsx)("div",Object.assign({className:n.description},{children:uh(e,t,o)}),void 0),(0,i.jsx)("div",Object.assign({className:n.buttons,hidden:a},{children:(0,i.jsx)(ah,Object.assign({type:Lt.L.button,customParams:s,onClick:this.onSkipAndContinue},{children:(0,O.L)("Continue to platform")}),void 0)}),void 0)]}),void 0)]}),void 0)}}const gh=(0,n.$)(dh,{skipAndContinue:rh.m.skipAndContinue})((0,x.Z)((e=>{const{isEditable:t,customParams:s}=e;return{container:{paddingTop:30,paddingBottom:t?10:30,paddingLeft:24,paddingRight:24,color:s.textColor,display:"flex",flexDirection:"column",nested:{mobile:{paddingTop:60}}},title:{fontSize:24},descriptionContainer:{display:"flex",flexDirection:"row"},description:{fontSize:14,justifyContent:"flex-start",whiteSpace:"pre-line"},buttons:{justifyContent:"flex-end",whiteSpace:"nowrap",marginLeft:20,cursor:"pointer",nested:{mobile:{position:"absolute",top:10,right:12}}}}}))(hh));class ph extends o.Component{render(){const{children:e,styles:t}=this.props;return(0,i.jsx)("div",Object.assign({className:t.root},{children:e}),void 0)}}const bh=(0,x.Z)((()=>({root:{display:"flex",flexDirection:"column",height:"100%",width:"100%"}})))(ph),vh={spacing:12,wideSpacing:18};class mh extends o.Component{render(){const{children:e,styles:t}=this.props;return(0,i.jsx)("div",Object.assign({className:t.root},{children:e}),void 0)}}const jh=(0,x.Z)((e=>{const{selected:t}=e;return{root:Object.assign({display:"flex",flexDirection:"column",height:"100%"},t?(0,vn.f)(1):(0,vn.f)(0,0,6*vh.spacing))}}))(mh);var xh=s(53915);class yh extends o.Component{render(){const{children:e,styles:t}=this.props;return(0,i.jsx)("div",Object.assign({className:t.root},{children:e}),void 0)}}const Sh=(0,x.Z)((e=>{const{spacing:t,wideSpacing:s}=vh;return{root:{marginLeft:t,marginBottom:t/2,paddingLeft:s,minHeight:2.5*t,borderLeftWidth:1,borderLeftColor:xh.uY.lightColor,borderLeftStyle:"solid",color:e.customParams.textColor,borderTop:"none"}}}))(yh);var fh=s(50739);const Oh=l()([(0,u.$)(N.BA).customParams()],(e=>({customParams:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class Ch extends o.Component{render(){const{children:e,styles:t}=this.props;return(0,i.jsx)("div",Object.assign({className:t.root},{children:e}),void 0)}}const kh=(0,n.$)(Oh)((0,x.Z)((e=>{const{type:t,disabled:s,customParams:i}=e;let o;return o=t!==fh.P.Error||s?t!==fh.P.Warning||s?i.textColor:i.textWarningColor:i.textErrorColor,{root:{display:"flex",minHeight:17,overflow:"hidden",color:null!=o?o:"inherit",opacity:s?sh.Rp.disabledOpacity:1}}}))(Ch));var Ih,Lh=s(59628);function wh(e,t){switch(e){case fh.P.Success:return t.customParams.stepsBulletSuccessTextColor;case fh.P.Error:return t.customParams.stepsBulletErrorTextColor;case fh.P.Warning:return t.customParams.stepsBulletWarningTextColor;case fh.P.None:default:return t.customParams.stepsBulletDefaultTextColor}}function Th(e){const{type:t,size:s,figure:i}=e,o={position:"absolute",top:0,right:0,bottom:0,left:0,zIndex:-1};switch(i){case Ih.triangle:return Object.assign(Object.assign(Object.assign(Object.assign({},o),{top:-2,width:0,height:0,borderStyle:"solid",borderColor:`transparent transparent ${Dh(t,e)} transparent`}),(0,Q.O)({color:"transparent"})),{borderLeftWidth:s/2,borderRightWidth:s/2,borderBottomWidth:.866*s});case Ih.circle:return Object.assign(Object.assign(Object.assign(Object.assign({},o),(0,V.E)("100%")),(0,Q.O)({color:Dh(t,e)})),{width:s,height:s});default:return o}}function Dh(e,t){let s;switch(e){case fh.P.Success:s=t.customParams.stepsBulletSuccessBackgroundColor;break;case fh.P.Error:s=t.customParams.stepsBulletErrorBackgroundColor;break;case fh.P.Warning:s=t.customParams.stepsBulletWarningBackgroundColor;break;case fh.P.None:default:s=t.customParams.stepsBulletDefaultBackgroundColor}return s}!function(e){e[e.circle=0]="circle",e[e.triangle=1]="triangle"}(Ih||(Ih={}));class Ph extends o.Component{render(){const{styles:e,children:t}=this.props;return(0,i.jsxs)("div",Object.assign({className:e.root},{children:[(0,i.jsx)("div",{className:e.figure},void 0),t]}),void 0)}}Ph.defaultProps={className:"",type:fh.P.None};const Nh=(0,x.Z)((e=>({root:{position:"relative",zIndex:1,color:xh.uY.whiteColor},figure:Th(e)})))(Ph);class Ah extends o.Component{render(){const{size:e,source:t,type:s,customParams:o}=this.props;let n;switch(s){case fh.P.Success:n=o.stepsBulletSuccessTextColor;break;case fh.P.Error:n=o.stepsBulletErrorTextColor;break;case fh.P.Warning:n=o.stepsBulletWarningTextColor;break;case fh.P.None:default:n=o.stepsBulletDefaultTextColor||xh.uY.whiteColor}return(0,i.jsx)(se.J,{size:e,source:t,extend:{root:{fill:n}}},void 0)}}const Bh=Ah;class Mh extends o.Component{render(){const{panelNumber:e,styles:t,status:s,customParams:o,rules:n}=this.props,a=25;switch(s){case fh.P.Success:return(0,i.jsx)(Nh,Object.assign({type:fh.P.Success,figure:Ih.circle,size:a,customParams:o,extend:{root:n.root(this.props)}},{children:(0,i.jsx)(Bh,{size:a,source:ie.Y.stepCheckmark,type:fh.P.Success,customParams:o},void 0)}),void 0);case fh.P.Warning:return(0,i.jsx)(Nh,Object.assign({type:fh.P.Warning,figure:Ih.circle,size:a,customParams:o,extend:{root:n.root(this.props)}},{children:(0,i.jsx)(Bh,{size:a,source:ie.Y.stepCheckmark,type:fh.P.Warning,customParams:o},void 0)}),void 0);case fh.P.Error:return(0,i.jsx)(Nh,Object.assign({type:fh.P.Error,figure:Ih.triangle,size:a,customParams:o,extend:{root:n.root(this.props)}},{children:(0,i.jsx)(Bh,{size:a,source:ie.Y.stepAttention,type:fh.P.Error,customParams:o},void 0)}),void 0);default:return(0,i.jsx)(Nh,Object.assign({type:fh.P.None,figure:Ih.circle,size:a,customParams:o,extend:{root:n.root(this.props)}},{children:(0,i.jsx)("div",Object.assign({className:t.number},{children:e}),void 0)}),void 0)}}}const $h=(0,x.Z)((e=>{const{status:t}=e,{spacing:s}=vh;return{root:Object.assign({width:2*s+1,height:2*s+1},(0,q.e)(4,vh.wideSpacing,0,0)),number:{textAlign:"center",lineHeight:(0,Lh.a)(2*s+1),color:wh(t,e)}}}))(Mh);class Eh extends o.Component{render(){const{title:e,styles:t,panelNumber:s,status:o,statusMessage:n,onClick:a,customParams:r}=this.props,l=o===fh.P.Error||o===fh.P.Warning;return(0,i.jsxs)("div",Object.assign({className:t.root,onClick:a?a.bind(null,s):null},{children:[(0,i.jsx)($h,{panelNumber:s,status:o,customParams:r},void 0),(0,i.jsxs)("span",Object.assign({className:t.titleContainer},{children:[(0,i.jsx)("span",Object.assign({className:t.title},{children:e}),void 0),(0,i.jsx)(kh,Object.assign({type:o},{children:l?n:null}),void 0)]}),void 0)]}),void 0)}}const Fh=(0,x.Z)((e=>({root:{display:"flex",alignItems:"flex-start",marginBottom:vh.spacing,color:"inherit",cursor:"pointer"},titleContainer:{display:"flex",flexDirection:"column",position:"relative",marginLeft:20},title:{fontSize:"24px",color:e.customParams.textColor}})))(Eh);class Rh extends o.Component{constructor(){super(...arguments),this.onPanelChangeFactory=e=>()=>{const{onPanelChange:t,panels:s}=this.props,i=s.findIndex((t=>t.id===e)),o=s[i-1];o&&o.status!==fh.P.Success||t(e)}}render(){return(0,i.jsx)(bh,{children:this.renderPanels()},void 0)}renderPanels(){const{selectedPanelId:e,customParams:t,panels:s}=this.props;return s.map(((s,o)=>{const n=o+1,a=s.id===e;return(0,i.jsxs)(jh,Object.assign({selected:a},{children:[(0,i.jsx)(Fh,{onClick:this.onPanelChangeFactory(s.id),panelNumber:n,status:s.status,statusMessage:s.statusMessage,title:s.header,customParams:t},void 0),(0,i.jsx)(Sh,Object.assign({customParams:t},{children:a&&s.body}),void 0)]}),o)}))}}Rh.defaultProps={onPanelChange:()=>{}};const Wh=(0,x.Z)((e=>({root:{position:"fixed",zIndex:500,left:0,top:0,right:0,bottom:0,display:"flex",justifyContent:"center",alignItems:"center",nested:{mobile:{width:"100%",height:"100%"}}},container:Object.assign(Object.assign({overflow:"hidden",position:"relative"},(0,Q.O)({color:e.customParams.backgroundColor})),{border:"rgba(0, 0, 0, 0.2) 1px solid",nested:{mobile:{width:"100%",height:"100%"}}}),close:{position:"absolute",top:10,right:20,zIndex:1,fontSize:20,cursor:"pointer"}})))(Rh),Hh=l()([(0,u.$)(N.BA).customParams()],(e=>({customParams:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class zh extends o.Component{render(){const e=this.props,{rules:t,styles:s}=e,o=(0,th._T)(e,["rules","styles"]);return(0,i.jsx)(go.z,Object.assign({},o,{extend:{root:t.root(this.props),content:t.content(this.props)}}),void 0)}}const Jh=(0,n.$)(Hh)((0,x.Z)((e=>{const{buttonTextColor:t,buttonColor:s}=e.customParams,i=(0,Mn.d)(e,{foregroundColorNormal:t,foregroundColorDisabled:(0,sh.qs)(t),backgroundColorNormal:s,backgroundColorHover:(0,sh.Ry)(s),backgroundColorDisabled:(0,sh.qs)(s),fontSize:14});return{root:{height:"auto"},content:(0,_.g)((()=>ih(e)),(()=>i))}}))(zh));class Qh extends o.Component{render(){const{children:e,styles:t,hidden:s=!1}=this.props;return!s&&(0,i.jsx)("div",Object.assign({className:t.root},{children:e}),void 0)}}const _h=(0,x.Z)((()=>({root:Object.assign(Object.assign({display:"flex"},(0,q.e)(0,-15)),{nested:{mobile:{flexDirection:"column"}}})})))(Qh);class qh extends o.Component{render(){const{children:e,rules:t}=this.props;return(0,i.jsx)(_h,Object.assign({extend:{root:t.root}},{children:e}),void 0)}}const Xh=(0,x.Z)((()=>({root:Object.assign({justifyContent:"flex-end",alignItems:"flex-end"},(0,q.e)(0))})))(qh),Vh=(0,x.Z)((()=>({root:{nested:{mobile:{alignItems:"stretch",paddingLeft:45,marginTop:20}}}})))(Xh);var Zh=s(19781),Uh=s(88074),Kh=s(68908),Yh=s(37966),Gh=s(43887),eg=s(6073);const tg=l()([N.BA,(0,u.$)(lh.I).settings(),Zh.Y,Kh.t,Uh.z,eg.V,(0,u.$)(Ft.r).locale()],((e,t,s,i,o,n,a)=>{const r=((e,t,s)=>[e,t].every((e=>e.panelStatus===fh.P.Success))&&(s===fh.P.Success||s===fh.P.Warning))(s,i,o),l=[A.aW.KYC_STATUS_SUBMITTED,A.aW.KYC_STATUS_VALIDATED].includes(e.data.status),d=(0,Yh.x)(t,s,i,o);return{locale:a,currentForm:(0,Gh.E)(d,e.form),finishDialogType:n,brokerName:e.data.brokerName,brokerEmail:e.brokerEmail,isAllFormsValid:r,kycDisabled:l,submitNetworkStatus:e.networkStatuses.submit,customParams:e.customParams,visiblePanels:d}}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var sg=s(30381),ig=s.n(sg);class og extends o.Component{render(){const{disabled:e,text:t,type:s,styles:o}=this.props,n=e?"":t;return(0,i.jsx)("div",Object.assign({className:o.root},{children:(0,i.jsx)(kh,Object.assign({type:s},{children:n}),void 0)}),void 0)}}const ng=(0,x.Z)((()=>({root:{display:"flex",height:32,overflow:"hidden"}})))(og);class ag extends o.Component{render(){const{label:e,fieldName:t,disabled:s,error:o,warning:n,offMessage:a,styles:r,children:l,customParams:d}=this.props,c=o?fh.P.Error:fh.P.None,u=o?fh.P.Error:n?fh.P.Warning:fh.P.None;return(0,i.jsxs)("div",Object.assign({className:r.root},{children:[(0,i.jsx)("label",Object.assign({className:r.title,htmlFor:t},{children:(0,i.jsx)(kh,Object.assign({type:c,disabled:s},{children:e}),void 0)}),void 0),(0,i.jsx)("div",Object.assign({className:r.control},{children:l}),void 0),!a&&(0,i.jsx)(ng,{type:u,disabled:s,text:o||n,customParams:d},void 0)]}),void 0)}}const rg=(0,x.Z)((e=>{const{disabled:t}=e;return{root:Object.assign(Object.assign({},(0,X.o)(10,15)),{flexGrow:1,display:"flex",flexDirection:"column"}),title:Object.assign(Object.assign({},(0,vn.f)(1)),{cursor:t?"not-allowed":"auto"}),control:{marginBottom:5,opacity:t?sh.Rp.disabledOpacity:1},messageText:{}}}))(ag);var lg=s(50485);class dg extends o.Component{render(){const e=this.props,{customParams:t,styles:s,rules:o}=e,n=(0,th._T)(e,["customParams","styles","rules"]);return(0,i.jsx)(Ct.P,Object.assign({},n,{extend:{root:o.root(this.props),placeholder:o.placeholder(this.props),arrow:o.arrow(this.props),arrowHover:o.arrowHover(this.props),arrowOpen:o.arrowOpen(this.props),popper:o.popper(this.props),option:o.option(this.props),selectedOption:o.selectedOption(this.props)}}),void 0)}}const cg=(0,x.Z)((e=>{const{disabled:t,options:s,value:i}=e,{foregroundColor:o,backgroundColor:n}=sh.Rp,a=Object.assign(Object.assign({fontSize:16,fontFamily:"Arimo, Arial, sans-serif"},(0,X.o)(8)),{color:o.darkColor,nested:{":hover":Object.assign({},(0,Q.O)({color:n.whiteGray})),":last-child":{borderBottomRightRadius:0,borderBottomLeftRadius:0}}}),r=Object.assign(Object.assign({},a),(0,Q.O)({color:n.whiteGray})),l=""===i||!s.find((e=>e.value===i));return{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({display:"flex"},(0,X.o)(10,0)),(0,V.E)(0)),{borderBottomWidth:1,borderBottomStyle:"solid",borderColor:e.customParams.placeholderColor,color:e.customParams.textColor,outline:"none"}),(0,Q.O)({color:"transparent"})),{nested:{":hover":Object.assign({},(0,Q.O)({color:"transparent"})),":focus":Object.assign(Object.assign({},(0,Q.O)({color:"transparent"})),{boxShadow:"none"})}}),placeholder:Object.assign(Object.assign({},lg.aF),{fontSize:16,color:t||l?e.customParams.placeholderColor:e.customParams.textColor}),arrow:{borderTopWidth:6,borderTopStyle:"solid",borderTopColor:(0,sh.Ry)(e.customParams.textColor)},arrowHover:{borderTopWidth:6,borderTopStyle:"solid",borderTopColor:e.customParams.textColor},arrowOpen:{borderBottomWidth:6,borderBottomStyle:"solid",borderBottomColor:(0,sh.Ry)(e.customParams.textColor)},popper:Object.assign({},(0,Q.O)({color:n.white})),option:a,selectedOption:r}}))(dg);var ug=s(89140),hg=s(12592);function gg(e,t){const s=[];for(let i=ig()(e).year();i<=ig()(t).year();i++)s.push(i);return s.map((e=>({label:e.toString(),value:e.toString()})))}function pg(){return(0,ug.x)().map((e=>({label:(0,hg.W)(e),value:(e-1).toString()})))}function bg(e,t){const s=ig()().year((0,oi.J)(t)).month((0,oi.J)(e)).daysInMonth(),i=[];for(let e=1;e<=s;e++)i.push(e);return i.map((e=>({label:e.toString(),value:e.toString()})))}function vg(e){const{day:t,month:s,year:i}=e;return ig()({year:(0,oi.J)(i),month:(0,oi.J)(s),date:(0,oi.J)(t)})}function mg(e,t,s){const i=(0,Zd.m)(e.year);if(void 0!==i)return i;const o=(0,Zd.m)(e.month);if(void 0!==o)return o;const n=(0,Zd.m)(e.day);if(void 0!==n)return n;const a=(0,oi.J)(e.year);return vg(e).isValid()?a<=t?(0,O.L)("Year should be more than {0}",t):a>s?(0,O.L)("Year should be less than {0}",s):void 0:(0,O.L)("This field must be valid date")}class jg extends o.Component{render(){const{styles:e,children:t}=this.props;return(0,i.jsx)("div",Object.assign({className:e.root},{children:t}),void 0)}}const xg=(0,x.Z)((e=>{const{type:t,disabled:s}=e;return{root:Object.assign(Object.assign({display:"flex",flexDirection:"column",flexGrow:1,minWidth:0},(0,Q.O)({color:t===fh.P.Warning?sh.Rp.backgroundColor.warning:"transparent"})),{opacity:s?sh.Rp.disabledOpacity:1})}}))(jg);class yg extends o.Component{constructor(e){super(e),this.onChangeDay=e=>{this.onChange({day:e})},this.onChangeMonth=e=>{this.onChange({month:e})},this.onChangeYear=e=>{this.onChange({year:e})},this.onChange=e=>{const{fieldName:t,minDate:s,maxDate:i,onChange:o}=this.props,n=Object.assign(Object.assign({},this.state),e),{year:a,month:r}=n;this.setState(Object.assign(Object.assign({},n),{yearList:gg(s,i),monthList:pg(),dayList:bg(r,a)})),o(this.getValue(n),t)};const t=function(e){if(void 0!==e&&""!==e){const t=ig()(e);if(t.isValid())return t}return ig()().subtract(35,"years").endOf("day")}(e.value),s=t.year(),i=t.month(),o=t.date();this.state={year:s.toString(),yearList:gg(e.minDate,e.maxDate),month:i.toString(),monthList:pg(),day:o.toString(),dayList:bg(i.toString(),s.toString())}}componentDidMount(){const{value:e,onChange:t,fieldName:s}=this.props;void 0===e&&t(this.getValue(this.state),s)}render(){const{error:e,minDate:t,maxDate:s,styles:o,warning:n,disabled:a,label:r,fieldName:l,offMessage:d,customParams:c}=this.props,{yearList:u,year:h,monthList:g,month:p,dayList:b,day:v}=this.state,m=mg(this.state,t,s),j=null!=e?e:m,x=j?fh.P.None:n?fh.P.Warning:fh.P.None;return(0,i.jsx)(xg,Object.assign({type:x},{children:(0,i.jsx)(rg,Object.assign({label:r,fieldName:l,disabled:a,error:j,warning:n,offMessage:d,customParams:c},{children:(0,i.jsxs)("div",Object.assign({className:o.root},{children:[(0,i.jsx)("div",Object.assign({className:o.sideInput},{children:(0,i.jsx)(cg,{options:b,value:v,disabled:a,onChange:this.onChangeDay,customParams:c},void 0)}),void 0),(0,i.jsx)("div",Object.assign({className:o.middleInput},{children:(0,i.jsx)(cg,{options:g,value:p,placeholder:(0,O.L)("Month"),disabled:a,onChange:this.onChangeMonth,customParams:c},void 0)}),void 0),(0,i.jsx)("div",Object.assign({className:o.sideInput},{children:(0,i.jsx)(cg,{options:u,value:h,disabled:a,onChange:this.onChangeYear,customParams:c},void 0)}),void 0)]}),void 0)}),void 0)}),void 0)}getValue(e){const{minDate:t,maxDate:s}=this.props;if(void 0!==mg(e,t,s))return`${e.year}-${e.month}-${e.day}`;const i=vg(e);return!i.isValid()||i.diff(s,"days")>0?`${e.year}-${e.month}-${e.day}`:i.format()}}const Sg=(0,x.Z)((()=>({root:{display:"flex"},sideInput:{flexBasis:"25%",marginRight:15,nested:{":last-child":{marginRight:0}}},middleInput:{flexBasis:"50%",marginRight:15}})))(yg);class fg extends o.Component{render(){const{children:e,styles:t}=this.props;return(0,i.jsx)("div",Object.assign({className:t.root},{children:e}),void 0)}}const Og=(0,x.Z)((()=>({root:{display:"grid",gridTemplateColumns:"50% 50%",alignItems:"stretch",nested:{mobile:{gridTemplateColumns:"100%"}}}})))(fg);var Cg=s(62742);class kg extends o.Component{render(){const e=this.props,{rules:t}=e,s=(0,th._T)(e,["rules"]);return(0,i.jsx)(Hs.I,Object.assign({},s,{extend:{root:t.root(this.props),input:t.input(this.props)}}),void 0)}}const Ig=(0,x.Z)((e=>{const{disabled:t}=e,s=e.customParams.placeholderColor;return{root:Object.assign(Object.assign({},(0,Q.O)({color:"transparent"})),{nested:{":hover":Object.assign({},(0,Q.O)({color:"transparent"})),":focus":Object.assign({},(0,Q.O)({color:"transparent"}))}}),input:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,X.o)(10,0)),{fontSize:16}),(0,Q.O)({color:"transparent"})),(0,V.E)(0)),(0,Cg.C)(1,s,Qt.KV.Bottom)),{color:e.customParams.textColor,outline:"none",nested:{"::placeholder":{color:e.customParams.placeholderColor}}})}}))(kg);class Lg extends o.Component{render(){const{value:e,label:t,placeholder:s,disabled:o,error:n,warning:a,offMessage:r,onBlur:l,onChange:d,customParams:c}=this.props,u=n?fh.P.None:a?fh.P.Warning:fh.P.None;return(0,i.jsx)(xg,Object.assign({type:u},{children:(0,i.jsx)(rg,Object.assign({label:t,disabled:o,error:n,warning:a,offMessage:r,customParams:c},{children:(0,i.jsx)(Ig,{placeholder:s||t,value:e,disabled:o,onBlur:l,onChange:d,customParams:c},void 0)}),void 0)}),void 0)}}const wg=Lg;class Tg extends o.Component{render(){const{label:e,options:t,value:s,placeholder:o,disabled:n,error:a,warning:r,onChange:l,offMessage:d,customParams:c}=this.props,u=a?fh.P.None:r?fh.P.Warning:fh.P.None;return(0,i.jsx)(xg,Object.assign({type:u},{children:(0,i.jsx)(rg,Object.assign({label:e,disabled:n,error:a,warning:r,offMessage:d,customParams:c},{children:(0,i.jsx)(cg,{options:t,value:s,placeholder:o||e,disabled:n,onChange:l,customParams:c},void 0)}),void 0)}),void 0)}}const Dg=Tg,Pg=(0,x.Z)((()=>({root:{display:"flex",alignItems:"center",marginLeft:20,nested:{":first-child":{marginLeft:0}}},radio:{width:"29px",height:"24px",display:"none",nested:{":after":{display:"none"}}},label:{color:"inherit",display:"flex",flexDirection:"column"}})))(Ee.Y),Ng=(0,x.Z)((()=>({root:{display:"flex",flexDirection:"column"},title:{marginBottom:10,color:"inherit",fontWeight:"bold"},radioBlock:{display:"flex",marginBottom:10},radio:{textAlign:"center"}})))(Ce.E);var Ag=s(84183),Bg=s(69163);const Mg=e=>e.trim();class $g extends o.Component{constructor(){super(...arguments),this.onSubmit=()=>{const{data:e,onSubmit:t,kycUpdate:s,track:i}=this.props;s({key:A.Qz.Details,data:e,dirty:{}}),t&&t(),i({name:y.T2.KycStep1})},this.handleChange=(e,t=(e=>e))=>s=>{this.onChange(t(s),e)},this.onChange=(e,t)=>{const{originalData:s,kycUpdate:i}=this.props;s[t]!==e&&i({key:A.Qz.Details,data:{[t]:e},dirty:{[t]:!0}})},this.handleChangeTemp=e=>t=>{this.onChangeTemp(t,e)},this.onChangeTemp=(e,t)=>{const{kycUpdateTemp:s}=this.props;s({key:A.Qz.Details,data:{[t]:e},dirty:{[t]:!0}})},this.highlightFields=()=>{const{kycUpdateTemp:e}=this.props;e({key:A.Qz.Details,data:{},dirty:Bg.Ie.reduce(((e,t)=>Object.assign(Object.assign({},e),{[t]:!0})),{})})},this.canContinue=()=>{const{panelStatus:e}=this.props;return e===fh.P.Success},this.onContinueClick=()=>{const{panelStatus:e}=this.props;e!==fh.P.Warning&&(this.canContinue()?this.onSubmit():this.highlightFields())},this.makeInputGroup=(e,t)=>{var s,o;const{data:n,errors:a,warnings:r,customParams:l}=this.props;return(0,i.jsx)(wg,{value:n[e],error:null===(s=a.find((t=>t.field===e)))||void 0===s?void 0:s.text,warning:null===(o=r.find((t=>t.field===e)))||void 0===o?void 0:o.text,disabled:(0,Zh.Z)(n),label:t,onChange:this.handleChangeTemp(e),onBlur:this.handleChange(e,Mg),customParams:l},void 0)},this.handleChangeCountry=e=>{const{changeCountry:t}=this.props,s=e;this.onChange(s,Bg.bE.Country),t(s)}}render(){var e,t,s,o;const{data:n,errors:a,warnings:r,customParams:l}=this.props;return(0,i.jsxs)("div",{children:[(0,i.jsxs)(Og,{children:[this.makeInputGroup(Bg.bE.FirstName,(0,O.L)("First Name")),this.makeInputGroup(Bg.bE.Surname,(0,O.L)("Last Name")),(0,i.jsx)(Sg,{value:n.dateOfBirth,error:null===(e=a.find((e=>e.field===Bg.bE.DateOfBirth)))||void 0===e?void 0:e.text,warning:null===(t=r.find((e=>e.field===Bg.bE.DateOfBirth)))||void 0===t?void 0:t.text,disabled:(0,Zh.Z)(n),minDate:ig()().year(1900).valueOf(),maxDate:ig()().valueOf(),fieldName:Bg.bE.DateOfBirth,label:(0,O.L)("Date of birth"),onChange:this.onChange,customParams:l},void 0),(0,i.jsx)(Dg,{options:this.getCountryList(),value:n.country,error:null===(s=a.find((e=>e.field===Bg.bE.Country)))||void 0===s?void 0:s.text,warning:null===(o=r.find((e=>e.field===Bg.bE.Country)))||void 0===o?void 0:o.text,disabled:(0,Zh.Z)(n),label:(0,O.L)("Country"),onChange:this.handleChangeCountry,customParams:l},void 0),this.makeInputGroup(Bg.bE.Phone,(0,O.L)("Phone")),this.makeInputGroup(Bg.bE.StreetAddress,(0,O.L)("Street Address")),this.makeInputGroup(Bg.bE.City,(0,O.L)("City")),this.makeInputGroup(Bg.bE.Zip,(0,O.L)("Zip / Postal code"))]},void 0),this.getCitizenForTaxPurposeBlock(),(0,i.jsx)(Xh,{children:(0,i.jsx)(Jh,Object.assign({type:Lt.L.submit,disabled:!this.canContinue(),allowClickByDisabled:!0,onClick:this.onContinueClick},{children:(0,O.L)("Continue")}),void 0)},void 0)]},void 0)}getCountryList(){const{isKawase:e}=this.props;return function(e){const t=e?["KP","LY","PS","SY","US","UM"]:["US","UM"];return Ag.n.filter((e=>-1===t.indexOf(e.alpha2Code)))}(e).map((e=>({value:e.alpha2Code,label:e.name})))}getCitizenForTaxPurposeBlock(){var e,t,s;const{data:o,errors:n,warnings:a,styles:r,customParams:l}=this.props,d=Object.assign(Object.assign({},o),{isUsCitizenForTaxPurpose:null!==(e=o.isUsCitizenForTaxPurpose)&&void 0!==e?e:xo.w7.COMMON_ANSWERS_NO}),c=[{value:xo.w7.COMMON_ANSWERS_NO,text:(0,O.L)("No"),infoMessage:""},{value:xo.w7.COMMON_ANSWERS_YES,text:(0,O.L)("Yes"),infoMessage:(0,O.L)("Please note that we do not offer our services to US citizens.")}],u=c.map((e=>{const t=l.placeholderColor,s=e.value===d.isUsCitizenForTaxPurpose,o=(0,i.jsx)(se.J,{extend:{root:{fill:t}},size:26,source:ie.Y.radioButtonChecked},void 0),n=(0,i.jsx)(se.J,{extend:{root:{fill:t}},size:26,source:ie.Y.radioButtonUnchecked},void 0),a=s?o:n;return(0,i.jsxs)(Pg,Object.assign({value:e.value},{children:[a,e.text]}),e.value)})),h=Object.values(c).find((e=>e.value===d.isUsCitizenForTaxPurpose)),g=null===(t=n.find((e=>e.field===Bg.bE.IsUsCitizenForTaxPurpose)))||void 0===t?void 0:t.text,p=null===(s=a.find((e=>e.field===Bg.bE.IsUsCitizenForTaxPurpose)))||void 0===s?void 0:s.text,b=g?fh.P.None:p?fh.P.Warning:fh.P.None;return(0,i.jsx)(xg,Object.assign({type:b},{children:(0,i.jsxs)(rg,Object.assign({error:g,warning:p,customParams:l},{children:[(0,i.jsx)(Ng,Object.assign({value:d.isUsCitizenForTaxPurpose,title:(0,O.L)("Are you a US citizen for tax purposes?"),onChange:this.handleChange(Bg.bE.IsUsCitizenForTaxPurpose)},{children:u}),void 0),(0,i.jsx)("div",Object.assign({className:r.radioInfoMessage},{children:h?h.infoMessage:null}),void 0)]}),void 0)}),void 0)}}const Eg=(0,n.$)(Zh.Y,{kycUpdate:rh.m.update,kycUpdateTemp:rh.m.updateTemp,changeCountry:rh.m.changeCountry,track:S.m.track})((0,x.Z)((e=>({radioInfoMessage:{height:20,color:e.customParams.textColor}})))($g));var Fg=s(94184),Rg=s.n(Fg);class Wg extends o.Component{render(){const{children:e,styles:t,className:s="",size:o=1,offPadding:n}=this.props,a=Rg()({[t.root]:!0,[s]:Boolean(s),[t.offPadding]:n});return(0,i.jsx)("div",Object.assign({className:a,style:{flex:o}},{children:e}),void 0)}}const Hg=(0,x.Z)((()=>({root:Object.assign(Object.assign({},(0,X.o)(2*Z.W0,3*Z.W0)),{minWidth:0}),offPadding:Object.assign({},(0,X.o)(0))})))(Wg),zg=(0,lt.a)({resultScore:Kh.s,customParams:(0,u.$)(N.BA).customParams()})(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class Jg extends o.Component{constructor(){super(...arguments),this.onNoClick=()=>{const{openDialogDemoAccount:e}=this.props;e()},this.onYesClick=()=>{const{displayDialog:e}=this.props;e(A.up.None)}}render(){const{styles:e}=this.props,{noteText:t,declarationText:s}=this.getTexts();return(0,i.jsxs)("div",Object.assign({className:e.root},{children:[(0,i.jsxs)(Hg,Object.assign({className:e.body},{children:[t&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("h1",{children:(0,O.L)("Please note")},void 0),(0,i.jsx)("p",{children:t},void 0)]},void 0),s&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("h1",{children:(0,O.L)("Declaration")},void 0),(0,i.jsx)("p",{children:s},void 0)]},void 0)]}),void 0),(0,i.jsxs)(Xh,{children:[this.renderOpenDemoAccountButton(),this.renderYesContinueButton()]},void 0)]}),void 0)}getTexts(){const{resultScore:e}=this.props;return e>=0&&e<=30?{noteText:(0,O.L)("Based on the appropriateness test, it seems that you have none or insufficient experience in trading CFDs, therefore your Live account will not be enabled for trading. We recommend that you start trading on a Demo account first, in order to familiarise yourself with CFDs and the risks involved in trading. You may request for your Live account to be enabled 6 months after your registration date. If you need any further information or assistance please do not hesitate to contact us."),declarationText:(0,O.L)("I understand that live trading of CFDs is not appropriate for me but l wish to proceed with my application")}:e>=31&&e<=60?{noteText:(0,O.L)("Based on the appropriateness test, it seems that you have insufficient experience in trading CFDs. We recommend that you start trading on a Demo account first, in order to familiarise yourself with CFDs and the risks involved in trading. If you still wish to trade on your Live account, please note that this will be subject to leverage restrictions and your account leverage will be set to 1:25."),declarationText:(0,O.L)("I understand that live trading of CFDs is not appropriate for me but l wish to proceed with my application")}:{noteText:null,declarationText:null}}renderOpenDemoAccountButton(){const{type:e,customParams:t}=this.props;return e!==A.tJ.Embed&&(0,i.jsx)(nh,Object.assign({type:Lt.L.button,onClick:this.onNoClick,customParams:t},{children:(0,O.L)("No, Open Demo Account")}),void 0)}renderYesContinueButton(){const{rules:e}=this.props;return(0,i.jsx)(Jh,Object.assign({type:Lt.L.button,onClick:this.onYesClick,extend:{root:e.confirm(this.props)}},{children:(0,O.L)("Yes, Continue")}),void 0)}}const Qg=(0,n.$)(zg,{displayDialog:rh.m.displayDialog,openDialogDemoAccount:rh.m.openDemoAccount})((0,x.Z)((()=>({root:Object.assign({},(0,X.o)(20)),body:Object.assign(Object.assign({},(0,X.o)(0)),{marginBottom:40}),confirm:{marginLeft:20}})))(Jg));var _g=s(53685);const qg=l()([(0,u.$)(lh.I).termsAndConditionsLinks(),(0,u.$)(c.H).data.kycAgreementLinks([])],((e,t)=>0===e.length?{links:t.map((e=>({link:e.link,text:e.text})))}:{links:e}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),Xg=l()([(0,u.$)(N.BA).customParams()],(e=>({customParams:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class Vg extends o.Component{constructor(e){super(e),this.onChange=e=>{const{onChange:t,fieldName:s}=this.props,{checked:i}=e.target;this.setState({checked:i}),t&&t(i,s)};const{checked:t}=e;this.state={checked:t}}render(){const{fieldName:e,children:t,rules:s,styles:o}=this.props,{checked:n}=this.state,a=n?(0,i.jsx)(se.J,{size:24,source:this.getCheckboxSelected(),extend:{root:s.icon(this.props)}},void 0):(0,i.jsx)(se.J,{size:24,source:this.getCheckboxDeselected(),extend:{root:s.icon(this.props)}},void 0);return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("label",Object.assign({className:o.label},{children:[(0,i.jsx)("input",{className:o.originalInput,type:"checkbox",checked:n,name:e,onChange:this.onChange},void 0),(0,i.jsx)("div",Object.assign({className:o.checkbox},{children:a}),void 0),(0,i.jsx)(kh,Object.assign({type:fh.P.None},{children:t}),void 0)]}),void 0)},void 0)}getCheckboxSelected(){return s(17067)}getCheckboxDeselected(){return s(35384)}}Vg.defaultProps={checked:!1};const Zg=(0,n.$)(Xg)((0,x.Z)((e=>{const{customParams:t}=e,s="25px";return{label:{display:"flex",alignItems:"center",marginBottom:"5px",cursor:"pointer"},originalInput:Object.assign(Object.assign({overflow:"hidden"},(0,q.e)(0)),{height:0,width:0,opacity:0}),checkbox:{marginRight:"5px",marginLeft:"-3px",width:s,height:s},icon:{fill:t.placeholderColor}}}))(Vg));class Ug extends o.Component{render(){const{styles:e,links:t}=this.props,s=t.map(((s,o)=>(0,i.jsxs)("span",{children:[(0,i.jsx)("a",Object.assign({className:e.link,target:"_blank",href:s.link},{children:s.text}),void 0),t.length!==o+1&&(0,i.jsx)("span",{children:", "},void 0)]},o)));return(0,i.jsx)("div",{children:s},void 0)}}const Kg=(0,x.Z)((e=>({link:{color:e.color,nested:{":visited":{borderColor:(0,sh.Ry)(e.color)}}}})))(Ug);class Yg extends o.Component{constructor(){super(...arguments),this.onChange=(e,t)=>{const{kycUpdate:s,brokerName:i,formKey:o}=this.props;s({key:o,data:{brokerName:i,[t]:e},dirty:{[t]:!0}})}}render(){const{userAgreement:e,customParams:t,links:s}=this.props;return(0,i.jsx)("div",{children:(0,i.jsx)(_h,{children:(0,i.jsxs)(Hg,{children:[(0,i.jsx)(Zg,Object.assign({fieldName:"userAgreement",checked:e,onChange:this.onChange},{children:(0,O.L)("By ticking this box, you declare that you have carefully read and accept the:")}),void 0),(0,i.jsx)(Kg,{links:s,color:t.linkColor},void 0)]},void 0)},void 0)},void 0)}}const Gg=(0,n.$)(qg,{kycUpdate:rh.m.update})(Yg);var ep=s(75875),tp=s(9680),sp=s(88601);class ip extends o.Component{constructor(){super(...arguments),this.onFilesUploaded=(e,t)=>{const{onSelectFileError:s,onSelectFileSuccess:i}=this.props;if(t.length>0)return void s(t[0]);const o=e[0],n=new FileReader;n.onload=e=>{const t=e.target.result;i(o,t)},n.readAsDataURL(o)}}render(){const{visible:e,className:t,maxSize:s,multiple:o,disabled:n,accept:a,onClick:r}=this.props,l="profile-management-upload-button",d=Rg()({[l]:!0,[t]:!0,[`${l}_disabled`]:n}),c=n?this.renderButton():(0,i.jsx)(sp.Z,Object.assign({className:`${l}__drop`,maxSize:s,accept:a,multiple:o,onClick:r,onDrop:this.onFilesUploaded},{children:this.renderButton()}),void 0);return e&&(0,i.jsx)("div",Object.assign({className:d},{children:c}),void 0)}renderButton(){const{disabled:e,customParams:t}=this.props;return(0,i.jsx)(ah,Object.assign({type:Lt.L.button,disabled:e,customParams:t},{children:`${(0,O.L)("Upload File")}...`}),void 0)}}ip.defaultProps={accept:"",disabled:!1,className:"",multiple:!1,onSelectFileError:()=>null,onSelectFileSuccess:()=>null};const op=ip,np=()=>({"0%":{left:"-35%",right:"100%"},"60%":{left:"100%",right:"-90%"},"100%":{left:"100%",right:"-90%"}}),ap=()=>({"0%":{left:"-200%",right:"100%"},"60%":{left:"107%",right:"-8%"},"100%":{left:"107%",right:"-8%"}}),rp=e=>{const{renderer:t}=e,s=t.renderKeyframe(np,void 0),i=t.renderKeyframe(ap,void 0),o=Object.assign(Object.assign({content:'""',position:"absolute"},(0,Q.O)({color:"inherit"})),{top:0,left:0,bottom:0,willChange:"left, right"});return{root:Object.assign(Object.assign(Object.assign({position:"relative",height:4,width:"100%"},(0,Q.O)({color:"#73B794",clip:"padding-box"})),(0,V.E)(Z.q0)),{overflow:"hidden"}),indeterminate:Object.assign(Object.assign({},(0,Q.O)({color:"#00843B"})),{nested:{":before":Object.assign(Object.assign({},o),{animationName:s,animationDuration:"2.1s",animationTimingFunction:"cubic-bezier(0.65, 0.815, 0.735, 0.395)",animationIterationCount:"infinite"}),":after":Object.assign(Object.assign({},o),{animationName:i,animationDuration:"2.1s",animationTimingFunction:"cubic-bezier(0.165, 0.84, 0.44, 1)",animationIterationCount:"infinite",animationDelay:"1.15s"})}})}},lp=(0,o.memo)((e=>{const{extend:t={}}=e,{css:s}=(0,te.X)(rp,{extend:t});return(0,i.jsx)("div",Object.assign({className:s.root()},{children:(0,i.jsx)("div",{className:s.indeterminate()},void 0)}),void 0)}));class dp extends o.Component{render(){const{documents:e,styles:t}=this.props;if(0===e.length)return null;const s=e.map((e=>({id:e.documentId,name:e.documentDisplayName,isLoading:void 0===e.documentValid,isNew:e.isNew,isValid:e.documentValid})));return(0,i.jsx)("div",{children:s.map((e=>(0,i.jsxs)("div",Object.assign({className:t.file},{children:[(0,i.jsx)("span",Object.assign({className:t.fileName},{children:(0,O.L)("File: {0}",e.name)}),void 0),this.getDocumentStatus(e)]}),e.id)))},void 0)}getDocumentStatus(e){const{customParams:t,rules:s}=this.props;if(e.isLoading)return(0,i.jsx)(lp,{extend:{root:s.fileStatus(this.props)}},void 0);const o=t.stepsBulletSuccessBackgroundColor,n=(0,i.jsx)(se.J,{size:17,extend:{root:{fill:o}},source:ie.Y.filesSuccess},void 0),a=(0,i.jsx)(se.J,{size:17,extend:{root:{fill:o}},source:ie.Y.filesReview},void 0);return e.isValid?n:a}}const cp=(0,x.Z)((()=>({file:{display:"flex",alignItems:"center",fontStyle:"italic"},fileName:Object.assign({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},(0,vn.f)(1)),fileStatus:{marginLeft:"5px",width:"75px"}})))(dp),up=l()([(0,u.$)(N.BA).customParams()],(e=>({customParams:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));function hp(e){return e===xo.ZM.DOCUMENT_TYPE_ID||e===xo.ZM.DOCUMENT_TYPE_ADDRESS}class gp extends o.Component{constructor(){super(...arguments),this.onClick=()=>{const{documentType:e,setType:t,setDocumentTab:s}=this.props;t(A.u_.DocsExample),s(function(e){switch(e){case xo.ZM.DOCUMENT_TYPE_ID:return A.k7.Id;case xo.ZM.DOCUMENT_TYPE_ADDRESS:return A.k7.Residence;default:return A.k7.Id}}(e))}}render(){const{documentType:e,styles:t}=this.props,{title:s,description:o}=function(e){switch(e){case xo.ZM.DOCUMENT_TYPE_ID:return{title:(0,O.L)("ID or passport"),description:(0,O.L)("A coloured copy of your national ID card (both sides) or your passport with an expiration date of no earlier than 6 months.")};case xo.ZM.DOCUMENT_TYPE_ADDRESS:return{title:(0,O.L)("Proof of Residence"),description:(0,O.L)("A utility bill, bank statement or stamped letter from your financial institution issued within the last 6 months, with your name and address clearly visible.")};case xo.ZM.DOCUMENT_TYPE_OTHER:return{title:(0,O.L)("Additional Documents"),description:(0,O.L)("Attach additional documents if needed")};case xo.ZM.DOCUMENT_TYPE_CARD:return{title:"",description:""};default:return null}}(e);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",Object.assign({className:t.header},{children:[(0,i.jsx)("div",{children:s},void 0),hp(e)&&(0,i.jsx)(se.J,{size:oe.J.Medium,source:ie.Y.info,onClick:this.onClick},void 0)]}),void 0),(0,i.jsx)("div",Object.assign({className:t.description},{children:o}),void 0)]},void 0)}}const pp=(0,n.$)(up,{setType:rh.m.setContentType,setDocumentTab:rh.m.setDocumentTab})((0,x.Z)((e=>{const{customParams:t}=e;return{header:{display:"flex",flexDirection:"row",justifyContent:"space-between",fontSize:"18px",color:t.textColor,marginBottom:2*Z.W0},description:{textAlign:"justify",color:t.placeholderColor,marginBottom:2*Z.W0}}}))(gp)),bp=l()([_g.Ws,_g.jx,(0,Ae.P)().documentType()],((e,t,s)=>{const i=e.filter((e=>e.type===s)),o=i.some(tp.PD);return{documents:i,errors:t.filter((e=>e.type===s)),warning:o}}))(Object.assign({keySelector:(0,Ae.P)().documentType()},(0,d.jo)())),vp=l()([(0,u.$)(N.BA).brokerEmail(),(0,u.$)(N.BA).data.brokerName(),(0,u.$)(N.BA).customParams(),bp],((e,t,s,i)=>{var o;const{documents:n,warning:a,errors:r}=i;return{brokerEmail:e,brokerName:t,customParams:s,documents:n,warning:a,errorType:null===(o=r[0])||void 0===o?void 0:o.errorType}}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().documentType()}));class mp extends o.Component{constructor(){super(...arguments),this.onSelectFileError=e=>{const{documentType:t,uploadDocumentFailed:s}=this.props;s({documentId:(new Date).getTime(),errorType:e.size>=10*ep.w?A._8.MaxSize:A._8.WrongExtension,type:t,documentDisplayName:e.name})},this.onUploadButtonClick=()=>{const{uploadDocumentClearErrors:e}=this.props;e()},this.onSelectFileSuccess=(e,t)=>{const{brokerName:s,documentType:i,uploadDocument:o}=this.props;var n,a;o({content:(n=t,null!==(a=n.split(",").pop())&&void 0!==a?a:""),documentId:(new Date).getTime(),type:i,documentDisplayName:e.name,brokerName:s})},this.getErrorMessage=()=>{const{errorType:e}=this.props;switch(e){case A._8.Server:return this.getServerErrorMessage();case A._8.MaxSize:return this.getFileSizeErrorMessage();case A._8.WrongExtension:return this.getFileExtensionErrorMessage();default:return null}}}render(){const{disabled:e,accept:t,customParams:s,blocked:o,styles:n}=this.props;return(0,i.jsxs)("div",Object.assign({className:n.root},{children:[(0,i.jsx)("div",Object.assign({className:n.listContainer},{children:this.renderList()}),void 0),(0,i.jsxs)("div",Object.assign({className:n.buttonContainer},{children:[(0,i.jsx)(op,{visible:!o,disabled:e,accept:t,maxSize:10*ep.w,onSelectFileError:this.onSelectFileError,onSelectFileSuccess:this.onSelectFileSuccess,onClick:this.onUploadButtonClick,customParams:s},void 0),(0,i.jsx)("div",Object.assign({className:n.buttonDescription},{children:(0,O.L)("File size limit {0}MB",10)}),void 0)]}),void 0)]}),void 0)}renderList(){const{documents:e,warning:t,customParams:s,documentType:o,styles:n}=this.props,a=(0,tp.OW)(e),r=(0,tp.Uk)(e),l=this.getErrorMessage(),d=a.length>0&&(Boolean(l)||r.length>0),c=t?fh.P.Warning:fh.P.None;return(0,i.jsx)(xg,Object.assign({type:c},{children:(0,i.jsxs)("div",Object.assign({className:n.filesContainer},{children:[(0,i.jsx)(pp,{documentType:o},void 0),(0,i.jsx)(cp,{customParams:s,documents:a},void 0),d&&(0,i.jsx)(jo.D,{},void 0),(0,i.jsxs)("div",{children:[(0,i.jsx)(cp,{documents:r,customParams:s},void 0),(0,i.jsxs)("div",Object.assign({className:n.error},{children:[(0,i.jsx)(kh,Object.assign({type:fh.P.Error},{children:l}),void 0),Boolean(l)&&this.renderErrorIcon(s.stepsBulletErrorBackgroundColor)]}),void 0)]},void 0),(0,i.jsx)(kh,Object.assign({type:fh.P.Warning},{children:t&&(0,O.L)("Please upload a valid document")}),void 0)]}),void 0)}),void 0)}renderErrorIcon(e){return(0,i.jsx)(se.J,{size:17,source:ie.Y.filesReview,extend:{root:{fill:e}}},void 0)}getServerErrorMessage(){const{brokerEmail:e}=this.props,t=e?(0,O.L)("Please contact us at {0}",e):"";return(0,O.L)("File upload error. {0}",t)}getFileSizeErrorMessage(){return(0,O.L)("That file size exceeds the {0}MB limit.",10)}getFileExtensionErrorMessage(){return(0,O.L)("That file has incorrect extension.")}}const jp=(0,n.$)(vp,{uploadDocument:rh.m.uploadDocument,uploadDocumentFailed:rh.m.uploadDocumentFailed,uploadDocumentClearErrors:rh.m.uploadDocumentClearErrors})((0,x.Z)((e=>({root:{display:"flex",flexDirection:"column"},listContainer:{flexGrow:1},error:{display:"flex",justifyContent:"space-between",minHeight:"17px",fontStyle:"italic"},underButton:Object.assign({},(0,X.o)(10,15)),filesContainer:Object.assign({},(0,X.o)(15,15,0,15)),buttonContainer:Object.assign(Object.assign({alignSelf:"start",display:"flex",flexDirection:"column",alignItems:"center"},(0,X.o)(10,15)),{float:"left"}),buttonDescription:Object.assign(Object.assign({},(0,X.o)(5,0)),{color:e.customParams.placeholderColor})})))(mp));var xp=s(64623);const yp=l()([_g.Ws,xp.C],((e,t)=>({allowedDocumentTypes:t,isDisabled:e.length>=15})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class Sp extends o.Component{render(){const{isDisabled:e,blocked:t,allowedDocumentTypes:s}=this.props;return(0,i.jsx)(Og,{children:s.map((s=>(0,i.jsx)(jp,{documentType:s,blocked:t,disabled:e,accept:"image/tiff,image/png,image/jpeg,image/gif,image/bmp,application/pdf"},s)))},void 0)}}const fp=(0,n.$)(yp)(Sp);class Op extends o.Component{constructor(){super(...arguments),this.renderCancelButton=()=>{const{customParams:e}=this.props;return(0,i.jsx)(nh,Object.assign({type:Lt.L.button,onClick:this.onGoBackClick,customParams:e},{children:(0,O.L)("Go Back")}),void 0)},this.renderYesContinueButton=()=>{const{rules:e,userAgreement:t}=this.props;return(0,i.jsx)(Jh,Object.assign({disabled:!t,type:Lt.L.button,onClick:this.onYesContinue,extend:{root:e.confirmButton(this.props)}},{children:(0,O.L)("OK, Skip Uploading Documents")}),void 0)},this.onYesContinue=()=>{const{skipDocuments:e}=this.props;e()},this.onGoBackClick=()=>{const{displayDialog:e}=this.props;e(A.up.None)}}render(){const{styles:e}=this.props;return(0,i.jsxs)("div",Object.assign({className:e.root},{children:[(0,i.jsxs)("div",Object.assign({className:e.body},{children:[(0,i.jsx)("p",{children:(0,O.L)("You are about to skip uploading the proof of ID and residence documents. Trading for your account will be enabled and you will be able to trade immediately.")},void 0),(0,O.L)('Please note that you must provide us with these documents promptly, or your account will be deactivated and the balance of your account will be returned using the same method of deposit. You may upload your documents at any time by clicking the "Activate account" button.')]}),void 0),(0,i.jsxs)(Xh,{children:[this.renderCancelButton(),this.renderYesContinueButton()]},void 0)]}),void 0)}}const Cp=(0,n.$)(void 0,{skipDocuments:rh.m.skipDocuments,displayDialog:rh.m.displayDialog})((0,x.Z)((()=>({root:Object.assign(Object.assign({},(0,X.o)(4*Z.W0)),{marginBottom:4*Z.W0}),body:Object.assign(Object.assign({},(0,X.o)(0)),{marginBottom:2*Z.W0}),confirmButton:{marginLeft:4*Z.W0}})))(Op));class kp extends o.Component{constructor(){super(...arguments),this.formKey=A.Qz.Finish,this.renderInfoText=()=>(0,i.jsx)(_h,{children:(0,i.jsx)(Hg,{children:(0,i.jsx)("div",{children:`*${(0,O.L)("Residents of some jurisdictions may be asked to provide certified true copies of identification documents prior account approval.")}`},void 0)},void 0)},void 0),this.renderDescriptionBlock=()=>{const{skipDocumentsButtonDisabled:e,skipDocumentsIsApproved:t,skipDocumentsIsVisible:s,styles:o}=this.props,n=!s;let a=(0,O.L)("To complete your account activation, please provide us with a valid proof of ID and residence. Once we review them, we will notify you if your application has been approved.");return s&&(a+=` ${(0,O.L)("You are eligible to skip this step")}`),t&&(a=`${(0,O.L)("Trading for all your trading accounts has been enabled.")}\n${(0,O.L)('You can provide your proof of ID and residence documents at any time by pressing any of the "Activate Account" buttons. Please provide the requested documents as soon as possible.')}`),(0,i.jsxs)("div",Object.assign({className:o.descriptionBlock},{children:[(0,i.jsx)(_h,{children:(0,i.jsx)(Hg,Object.assign({className:o.description},{children:a}),void 0)},void 0),(0,i.jsx)(_h,Object.assign({hidden:n},{children:(0,i.jsx)(Hg,{children:(0,i.jsx)(Jh,Object.assign({type:Lt.L.button,onClick:this.showSkipDocumentsConfirmDialog,disabled:e},{children:(0,O.L)("Skip this Step")}),void 0)},void 0)}),void 0)]}),void 0)},this.showSkipDocumentsConfirmDialog=()=>{const{displayDialog:e}=this.props;e(A.up.SkipDocumentsConfirm)}}render(){const{type:e,dialogType:t,userAgreement:s,blocked:o,brokerName:n,customParams:a,termsAndConditionVisible:r,styles:l}=this.props,d=r?(0,i.jsx)(Gg,{formKey:this.formKey,userAgreement:s,brokerName:n,customParams:a},void 0):null;switch(t){case A.up.AppropriatenessConfirm:return(0,i.jsx)(Qg,{type:e},void 0);case A.up.SkipDocumentsConfirm:return(0,i.jsxs)("div",Object.assign({className:l.root},{children:[(0,i.jsx)(Cp,{userAgreement:s,customParams:a},void 0),d,this.renderInfoText()]}),void 0);default:return(0,i.jsxs)("div",Object.assign({className:l.root},{children:[this.renderDescriptionBlock(),(0,i.jsx)(fp,{blocked:o},void 0),d,this.renderInfoText()]}),void 0)}}}const Ip=(0,n.$)(_g.KF,{displayDialog:rh.m.displayDialog})((0,x.Z)((e=>({root:Object.assign({},(0,q.e)(0,15)),description:{fontSize:14,whiteSpace:"pre-line"},descriptionBlock:Object.assign(Object.assign(Object.assign({},(0,X.o)(5,15)),(0,q.e)(0,-15)),(0,Q.O)({color:e.skipDocumentsIsAvailable?"white":"inherit"}))})))(kp));var Lp=s(2976),wp=s(77073),Tp=s(30548),Dp=s(59664);const Pp=l()([(0,u.$)(N.BA).forms[A.Qz.Questionnaire](),(0,u.$)(N.BA).customParams(),(0,u.$)(lh.I).settings(),(0,Ae.P)().fieldName()],((e,t,s,i)=>{var o,n,a;const{data:r,dirty:l}=e,{errors:d,warnings:c}=(0,Tp.G)(r,s),u=(0,wp.Oq)(d,l),h=(0,wp.ft)(c,l);return{value:null===(o=r[i])||void 0===o?void 0:o.toString(),error:null===(n=u.find((e=>e.field===i)))||void 0===n?void 0:n.text,warning:null===(a=h.find((e=>e.field===i)))||void 0===a?void 0:a.text,visible:(0,Dp.N)(s,i),customParams:t}}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().fieldName()})),Np=(0,n.$)(Pp)((e=>{const{visible:t,fieldName:s,label:o,onChange:n,disabled:a,tooltipText:r}=e,{value:l,warning:d,error:c,customParams:u}=e,[h,...g]=(0,Lp.t)()[s];return t?(0,i.jsxs)(zs.b,{children:[(0,i.jsx)(Dg,{options:g,value:l,disabled:a,error:c,warning:d,label:o,placeholder:h.label,onChange:n,customParams:u},void 0),r]},void 0):null}));var Ap=s(26379);class Bp extends o.Component{constructor(){super(...arguments),this.onSubmit=()=>{const{data:e,onSubmit:t,kycUpdate:s,track:i}=this.props;s({key:A.Qz.Questionnaire,data:e,dirty:{}}),t&&t(),i({name:y.T2.KycStep2})},this.handleChange=e=>t=>{this.onChange(t,e)},this.onChange=(e,t)=>{const{kycUpdate:s}=this.props;s({key:A.Qz.Questionnaire,data:{[t]:e},dirty:{[t]:!0}})},this.handleChangeTemp=e=>t=>{this.onChangeTemp(t,e)},this.onChangeTemp=(e,t)=>{const{kycUpdateTemp:s}=this.props;s({key:A.Qz.Questionnaire,data:{[t]:e},dirty:{[t]:!0}})},this.highlightFields=()=>{const{kycUpdateTemp:e}=this.props;e({key:A.Qz.Questionnaire,data:{},dirty:Ap.dR.reduce(((e,t)=>Object.assign(Object.assign({},e),{[t]:!0})),{})})},this.canContinue=()=>{const{panelStatus:e}=this.props;return e===fh.P.Success},this.onContinueClick=()=>{const{panelStatus:e}=this.props;e!==fh.P.Warning&&(this.canContinue()?this.onSubmit():this.highlightFields())},this.isEmploymentAreaVisible=()=>{const{data:e}=this.props;return e.employmentStatus===xo.XW.EMPLOYMENT_EMPLOYED}}render(){return(0,i.jsxs)("div",{children:[(0,i.jsxs)(Og,{children:[(0,i.jsx)(Np,{fieldName:"maritalStatusQuestion",label:(0,O.L)("What is your Marital Status?"),onChange:this.handleChange("maritalStatusQuestion")},void 0),(0,i.jsx)(Np,{fieldName:"levelOfEducation",label:(0,O.L)("What is your Level of Education?"),onChange:this.handleChange("levelOfEducation")},void 0),(0,i.jsx)(Np,{fieldName:"employmentStatus",label:(0,O.L)("What is your Employment Status?"),onChange:this.handleChange("employmentStatus")},void 0),(0,i.jsx)(Np,{fieldName:"employmentArea",label:(0,O.L)("Which sector does your current or former profession belong to?"),onChange:this.handleChange("employmentArea"),disabled:!this.isEmploymentAreaVisible()},void 0),(0,i.jsx)(Np,{fieldName:"amountOfTradesQuestion",label:(0,O.L)("How many trades have you executed in the following instruments? Exchange Traded Derivatives (e.g. Warrants, Futures, Options)"),onChange:this.handleChange("amountOfTradesQuestion")},void 0),(0,i.jsx)(Np,{fieldName:"periodOfExecutionQuestion",label:(0,O.L)("Over what period did you execute these trades?"),onChange:this.handleChange("periodOfExecutionQuestion")},void 0),(0,i.jsx)(Np,{fieldName:"sOQuestion",label:(0,O.L)("The market is moving against your position. Your CFD position will close automatically if your margin level reaches stop-out level."),onChange:this.handleChange("sOQuestion")},void 0),(0,i.jsx)(Np,{fieldName:"relevantEducationQuestion",label:(0,O.L)("Do you have any prior education, professional qualifications or knowledge relevant to the products offered by us?"),onChange:this.handleChange("relevantEducationQuestion")},void 0),(0,i.jsx)(Np,{fieldName:"marginQuestion",label:(0,O.L)("What would be the required margin for 1 Lot (100,000) EUR/USD, if your leverage is 1:100?"),onChange:this.handleChange("marginQuestion")},void 0),(0,i.jsx)(Np,{fieldName:"maximumVolumeQuestion",label:(0,O.L)("When you make a deposit of € 1,000 and the instrument leverage is 1:30, what is the maximum leveraged amount you can trade with?"),onChange:this.handleChange("maximumVolumeQuestion")},void 0),(0,i.jsx)(Np,{fieldName:"leverageQuestion",label:(0,O.L)("Trading CFDs with high leverage means that you could take a larger position and increase your profit potential but it can also magnify your potential for losses."),onChange:this.handleChange("leverageQuestion")},void 0),(0,i.jsx)(Np,{fieldName:"sourceOfIncome",label:(0,O.L)("What is your main source of income?"),onChange:this.handleChange("sourceOfIncome")},void 0),(0,i.jsx)(Np,{fieldName:"annualIncome",label:(0,O.L)("What is your estimated annual income, including assets*?"),onChange:this.handleChange("annualIncome"),tooltipText:(0,O.L)("* Assets can be any liquid assets, investments, real property etc.")},void 0),(0,i.jsx)(Np,{fieldName:"totalEstimatedNetWorth",label:(0,O.L)("What is your total estimated Net Worth?"),onChange:this.handleChange("totalEstimatedNetWorth")},void 0),(0,i.jsx)(Np,{fieldName:"expectedDepositQuestion",label:(0,O.L)("What is the amount that you expect to deposit in the next 12 months?"),onChange:this.handleChange("expectedDepositQuestion")},void 0),(0,i.jsx)(Np,{fieldName:"financialCommitmentsQuestion",label:(0,O.L)("What are your regular financial commitments?"),onChange:this.handleChange("financialCommitmentsQuestion")},void 0),(0,i.jsx)(Np,{fieldName:"tradingPurposeQuestion",label:(0,O.L)("What is your main trading purpose?"),onChange:this.handleChange("tradingPurposeQuestion")},void 0),(0,i.jsx)(Np,{fieldName:"riskLosingQuestion",label:(0,O.L)("How much of your money to be used for trading in Contracts for Differences (CFDs) can you accept to risk losing?"),onChange:this.handleChange("riskLosingQuestion")},void 0),(0,i.jsx)(Np,{fieldName:"holdInvestmentQuestion",label:(0,O.L)("How long on average do you expect to hold an investment for?"),onChange:this.handleChange("holdInvestmentQuestion")},void 0)]},void 0),(0,i.jsx)(Xh,{children:(0,i.jsx)(Jh,Object.assign({type:Lt.L.submit,disabled:!this.canContinue(),allowClickByDisabled:!0,onClick:this.onContinueClick},{children:(0,O.L)("Continue")}),void 0)},void 0)]},void 0)}}const Mp=(0,n.$)(Kh.t,{kycUpdate:rh.m.update,kycUpdateTemp:rh.m.updateTemp,track:S.m.track})(Bp);class $p extends o.Component{constructor(){super(...arguments),this.getPanel=e=>{const{type:t,kycDisabled:s}=this.props;switch(e.id){case A.Qz.Details:return Object.assign(Object.assign({},e),{statusMessage:(0,O.L)("Please review this section"),header:(0,O.L)("Details"),body:(0,i.jsx)(Eg,{blocked:s,onSubmit:this.nextPanel},void 0)});case A.Qz.Questionnaire:return Object.assign(Object.assign({},e),{statusMessage:(0,O.L)("Please review this section"),header:(0,O.L)("Questionnaire"),body:(0,i.jsx)(Mp,{blocked:s,onSubmit:this.nextPanel},void 0)});case A.Qz.Finish:return Object.assign(Object.assign({},e),{statusMessage:(0,O.L)("Please review this section"),header:(0,O.L)("Finish"),body:(0,i.jsx)(Ip,{type:t,blocked:s},void 0)});default:return(0,vs.N)(e.id)}},this.renderActivationError=()=>{const{styles:e,brokerEmail:t,submitNetworkStatus:s}=this.props;return s===Cs.I.Failed?(0,i.jsx)("div",Object.assign({className:e.activationFail},{children:(0,O.L)("An unknown error has occurred. Please try again or contact us at {0}",t)}),void 0):null},this.onPanelChange=e=>{const{setForm:t,onPanelChange:s}=this.props;t(e),s()},this.onActivateProfile=()=>{const{brokerName:e,submit:t,track:s}=this.props;t({brokerName:e}),s({name:y.T2.KycSubmitted})},this.nextPanel=()=>{const{currentForm:e}=this.props,t=this.getPanels(),s=t.findIndex((t=>e===t.id)),i=t[s+1];i&&this.onPanelChange(i.id)}}componentDidMount(){const{currentForm:e}=this.props;this.onPanelChange(e)}componentWillUnmount(){this.onPanelChange(void 0)}render(){const{currentForm:e,customParams:t,styles:s}=this.props;return(0,i.jsxs)("div",Object.assign({className:s.root},{children:[(0,i.jsx)(Wh,{onPanelChange:this.onPanelChange,selectedPanelId:e,panels:this.getPanels(),customParams:t},void 0),(0,i.jsxs)(Vh,{children:[this.renderActivationError(),this.renderActivateButton()]},void 0)]}),void 0)}getPanels(){const{visiblePanels:e}=this.props;return e.map(this.getPanel)}renderActivateButton(){const{kycDisabled:e,isAllFormsValid:t,finishDialogType:s}=this.props;return s!==A.up.AppropriatenessConfirm&&s!==A.up.SkipDocumentsConfirm?(0,i.jsx)(Jh,Object.assign({type:Lt.L.button,disabled:!t||e,onClick:this.onActivateProfile},{children:(0,O.L)("Activate Account")}),void 0):null}}const Ep=(0,n.$)(tg,{setForm:rh.m.setForm,submit:rh.m.submit,track:S.m.track})((0,x.Z)((e=>{const{spacing:t}=vh;return{root:Object.assign(Object.assign({},(0,vn.f)(1)),{display:"flex",flexDirection:"column"}),activationFail:{marginRight:2*t,color:e.customParams.textErrorColor},activationButton:{minWidth:200}}}))($p)),Fp=l()([(0,u.$)(N.BA).customParams()],(e=>({customImages:e.footerImages&&Array.isArray(e.footerImages)&&3===e.footerImages.length?e.footerImages:[]})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class Rp extends o.Component{render(){const{type:e,customImages:t,styles:o,rules:n}=this.props,a=e===A.tJ.Inline?[s(80773),s(43546),s(42727)]:t;return(0,i.jsx)(_h,Object.assign({extend:{root:n.root(this.props)}},{children:a.map(((e,t)=>(0,i.jsx)("img",{className:o.image,src:e},t)))}),void 0)}}const Wp=(0,n.$)(Fp)((0,x.Z)((()=>({root:{justifyContent:"center",nested:{mobile:{flexDirection:"row",marginTop:"20px"}}},image:Object.assign(Object.assign({},(0,q.e)(10)),{width:180,height:"100%",textAlign:"center",borderRight:`1px solid ${sh.Rp.foregroundColor.lightColor}`,nested:{":last-child":{border:0},mobile:Object.assign({width:"31%"},(0,q.e)(0))}})})))(Rp)),Hp=l()([N.BA,N.Wt,(0,u.$)(Ft.r).locale()],((e,t,s)=>({locale:s,isLoading:e.networkStatuses.sync===Cs.I.Started||e.networkStatuses.sync===Cs.I.None,isEditable:t,customParams:e.customParams})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class zp extends o.Component{constructor(){super(...arguments),this.saveBodyRef=e=>{this.bodyContainer=e},this.onPanelChange=()=>{const e=(0,eh.findDOMNode)(this.bodyContainer);e&&(e.scrollTop=0)}}render(){const{styles:e}=this.props;return(0,i.jsx)("div",Object.assign({className:e.root},{children:this.renderContent()}),void 0)}renderContent(){const{isLoading:e,isEditable:t,styles:s}=this.props;return e?(0,i.jsx)(lu.h,{isLoading:!0},void 0):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(gh,{},void 0),t&&(0,i.jsxs)("div",Object.assign({className:s.body,ref:this.saveBodyRef},{children:[(0,i.jsx)(Ep,{type:A.tJ.Inline,onPanelChange:this.onPanelChange},void 0),(0,i.jsx)(Wp,{type:A.tJ.Inline},void 0)]}),void 0)]},void 0)}}const Jp=(0,n.$)(Hp)((0,x.Z)((e=>({root:Object.assign(Object.assign({display:"flex",flexDirection:"column",flexGrow:1},(0,X.o)(2)),{color:e.customParams.textColor,fontSize:12,height:"100%",overflow:"hidden",nested:{mobile:{width:"100%",height:"100%"}}}),body:Object.assign(Object.assign(Object.assign({},(0,vn.f)(1)),(0,X.o)(24)),{overflow:"auto"})})))(zp)),Qp=l()([(0,u.$)(N.BA).customParams()],(e=>({customParams:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class _p extends o.Component{render(){const{onClick:e,styles:t}=this.props;return(0,i.jsx)("div",Object.assign({className:t.root,onClick:e},{children:"×"}),void 0)}}const qp=(0,n.$)(Qp)((0,x.Z)((e=>({root:{position:"absolute",top:10,right:20,zIndex:1,fontSize:20,cursor:"pointer",color:e.customParams.textColor}})))(_p)),Xp=l()([(0,u.$)(N.BA).documentTab(),xp.C,(0,u.$)(N.BA).customParams()],((e,t,s)=>({documentTab:e,allowedDocumentTypes:t,customParams:s})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));function Vp(e){return s(6524)(`./${e}.png`)}const Zp={id:Vp("id"),passport:Vp("passport")};class Up extends o.Component{render(){const{styles:e}=this.props;return(0,i.jsxs)("div",Object.assign({className:e.root},{children:[(0,i.jsx)("div",Object.assign({className:e.title},{children:(0,O.L)("Acceptable documents")}),void 0),(0,i.jsxs)("div",Object.assign({className:e.types},{children:[(0,i.jsxs)("div",Object.assign({className:e.type},{children:[(0,i.jsx)("div",Object.assign({className:e.typeTitle},{children:(0,O.L)("Passport")}),void 0),(0,i.jsx)("div",Object.assign({className:e.image},{children:(0,i.jsx)("img",{className:e.imageSource,src:Zp.passport},void 0)}),void 0)]}),void 0),(0,i.jsxs)("div",Object.assign({className:e.type},{children:[(0,i.jsx)("div",Object.assign({className:e.typeTitle},{children:(0,O.L)("ID card")}),void 0),(0,i.jsx)("div",Object.assign({className:e.image},{children:(0,i.jsx)("img",{className:e.imageSource,src:Zp.id},void 0)}),void 0)]}),void 0)]}),void 0),(0,i.jsx)("div",Object.assign({className:e.descriptionTitle},{children:`${(0,O.L)("The documents need to clearly display")}:`}),void 0),(0,i.jsxs)("div",Object.assign({className:e.description},{children:[(0,i.jsx)("div",{children:`- ${(0,O.L)("Full name")}`},void 0),(0,i.jsx)("div",{children:`- ${(0,O.L)("Photo")}`},void 0),(0,i.jsx)("div",{children:`- ${(0,O.L)("Date of birth")}`},void 0),(0,i.jsx)("div",{children:`- ${(0,O.L)("Expiry date")}`},void 0),(0,i.jsx)("div",{children:`- ${(0,O.L)("Document number")}`},void 0),(0,i.jsx)("div",{children:`- ${(0,O.L)("Signature")}`},void 0)]}),void 0),(0,i.jsxs)("div",Object.assign({className:e.note},{children:[(0,i.jsx)("div",Object.assign({className:e.noteTitle},{children:`${(0,O.L)("Notes")}:`}),void 0),`- ${(0,O.L)("Expiration date should be no earlier than 6 months")}`]}),void 0)]}),void 0)}}const Kp=(0,x.Z)((e=>{const{title:t,body:s}=e.theme.font.semantic;return{root:Object.assign(Object.assign({},(0,vn.f)(1)),{display:"flex",flexDirection:"column",paddingTop:30,paddingBottom:30,overflow:"auto"}),title:{textAlign:"center",fontSize:t.secondary,paddingBottom:30},types:{display:"flex",flexDirection:"row",marginBottom:30},type:{display:"flex",flexDirection:"column",flexBasis:"50%",alignItems:"center"},typeTitle:{textAlign:"center",fontSize:t.secondary,paddingBottom:20},image:{width:310},imageSource:{width:"100%"},descriptionTitle:{fontSize:t.secondary,textAlign:"center",marginBottom:10},description:{display:"flex",flexDirection:"row",justifyContent:"space-between",fontSize:s.secondary,paddingLeft:60,paddingRight:60,marginBottom:10},note:{display:"flex",flexDirection:"column",alignItems:"center",fontSize:s.secondary},noteTitle:{fontSize:s.secondary,fontWeight:"bold"}}}))(Up);function Yp(e){return s(82032)(`./${e}.png`)}const Gp={utilityBill:Yp("utility_bill"),bankStatement:Yp("bank_statement"),bankLetter:Yp("bank_letter"),governmentCorrespondence:Yp("government_correspondence")};class eb extends o.Component{render(){const{styles:e}=this.props;return(0,i.jsxs)("div",Object.assign({className:e.root},{children:[(0,i.jsx)("div",Object.assign({className:e.title},{children:(0,O.L)("Acceptable documents")}),void 0),(0,i.jsxs)("div",Object.assign({className:e.types},{children:[(0,i.jsxs)("div",Object.assign({className:e.type},{children:[(0,i.jsx)("div",Object.assign({className:e.typeTitle},{children:(0,O.L)("Utility bill")}),void 0),(0,i.jsx)("div",Object.assign({className:e.typeDescription},{children:`(${(0,O.L)("heating, electricity, water, cable, landline telephone, sewer, gas, etc.")})`}),void 0),(0,i.jsx)("div",Object.assign({className:e.image},{children:(0,i.jsx)("img",{className:e.imageSource,src:Gp.utilityBill},void 0)}),void 0)]}),void 0),(0,i.jsxs)("div",Object.assign({className:e.type},{children:[(0,i.jsx)("div",Object.assign({className:e.typeTitle},{children:(0,O.L)("Statement from financial institution")}),void 0),(0,i.jsx)("div",Object.assign({className:e.typeDescription},{children:`(${(0,O.L)("bank, credit/debit card, mortgage, insurance, investments")})`}),void 0),(0,i.jsx)("div",Object.assign({className:e.image},{children:(0,i.jsx)("img",{className:e.imageSource,src:Gp.bankStatement},void 0)}),void 0)]}),void 0)]}),void 0),(0,i.jsxs)("div",Object.assign({className:e.types},{children:[(0,i.jsxs)("div",Object.assign({className:e.type},{children:[(0,i.jsx)("div",Object.assign({className:e.typeTitle},{children:(0,O.L)("Signed & stamped letter from financial institution")}),void 0),(0,i.jsx)("div",{className:e.typeDescription},void 0),(0,i.jsx)("div",Object.assign({className:e.image},{children:(0,i.jsx)("img",{className:e.imageSource,src:Gp.bankLetter},void 0)}),void 0)]}),void 0),(0,i.jsxs)("div",Object.assign({className:e.type},{children:[(0,i.jsx)("div",Object.assign({className:e.typeTitle},{children:(0,O.L)("Government-issued correspondence")}),void 0),(0,i.jsx)("div",Object.assign({className:e.typeDescription},{children:`(${(0,O.L)("tax documents, court documents, etc.")})`}),void 0),(0,i.jsx)("div",Object.assign({className:e.image},{children:(0,i.jsx)("img",{className:e.imageSource,src:Gp.governmentCorrespondence},void 0)}),void 0)]}),void 0)]}),void 0),(0,i.jsx)("div",Object.assign({className:e.descriptionTitle},{children:`${(0,O.L)("The documents need to clearly display")}:`}),void 0),(0,i.jsxs)("div",Object.assign({className:e.description},{children:[(0,i.jsx)("div",{children:`- ${(0,O.L)("Full name")}`},void 0),(0,i.jsx)("div",{children:`- ${(0,O.L)("Issue date")}`},void 0),(0,i.jsx)("div",{children:`- ${(0,O.L)("Full address including postal code")}`},void 0),(0,i.jsx)("div",{children:`- ${(0,O.L)("Official stamp (if applicable)")}`},void 0),(0,i.jsx)("div",{children:`- ${(0,O.L)("Logo of issuing organisation")}`},void 0)]}),void 0),(0,i.jsxs)("div",Object.assign({className:e.note},{children:[(0,i.jsx)("div",Object.assign({className:e.noteTitle},{children:`${(0,O.L)("Notes")}:`}),void 0),`- ${(0,O.L)("The document's issue date should be within the last 3 months")}`]}),void 0)]}),void 0)}}const tb=(0,x.Z)((e=>{const{title:t,body:s}=e.theme.font.semantic;return{root:Object.assign(Object.assign({},(0,vn.f)(1)),{display:"flex",flexDirection:"column",paddingTop:30,paddingBottom:30,overflow:"auto"}),title:{textAlign:"center",fontSize:t.secondary,paddingBottom:30},types:{display:"flex",flexDirection:"row",marginBottom:30},type:{display:"flex",flexDirection:"column",flexBasis:"50%",alignItems:"center"},typeTitle:{textAlign:"center",fontSize:t.secondary,paddingBottom:Z.W0},typeDescription:{textAlign:"center",fontSize:s.tertiary,paddingBottom:20},image:{width:310},imageSource:{width:"100%"},descriptionTitle:{fontSize:t.secondary,textAlign:"center",marginBottom:10},description:{display:"flex",flexDirection:"row",justifyContent:"space-between",fontSize:s.secondary,paddingLeft:10,paddingRight:10,marginBottom:10},note:{display:"flex",flexDirection:"column",alignItems:"center",fontSize:s.secondary},noteTitle:{fontSize:s.secondary,fontWeight:"bold"}}}))(eb);function sb(e){return s(76034)(`./${e}.png`)}const ib={flat:sb("flat"),notFlat:sb("not_flat"),normal:sb("normal"),cropped:sb("cropped"),blurry:sb("blurry"),covered:sb("covered")};class ob extends o.Component{render(){const{styles:e}=this.props;return(0,i.jsxs)("div",Object.assign({className:e.root},{children:[(0,i.jsx)("div",Object.assign({className:e.title},{children:(0,O.L)("Acceptable documents")}),void 0),(0,i.jsx)("div",Object.assign({className:e.groupTitle},{children:(0,O.L)("Positioned flat")}),void 0),(0,i.jsxs)("div",Object.assign({className:e.types},{children:[(0,i.jsx)("div",Object.assign({className:e.type},{children:(0,i.jsx)("div",Object.assign({className:e.image},{children:(0,i.jsx)("img",{className:e.imageSource,src:ib.flat},void 0)}),void 0)}),void 0),(0,i.jsx)("div",Object.assign({className:e.type},{children:(0,i.jsx)("div",Object.assign({className:e.image},{children:(0,i.jsx)("img",{className:e.imageSource,src:ib.notFlat},void 0)}),void 0)}),void 0)]}),void 0),(0,i.jsx)(jo.D,{marginTop:3*Z.W0,marginBottom:3*Z.W0},void 0),(0,i.jsx)("div",Object.assign({className:e.groupTitle},{children:(0,O.L)("Not cropped")}),void 0),(0,i.jsxs)("div",Object.assign({className:e.types},{children:[(0,i.jsx)("div",Object.assign({className:e.type},{children:(0,i.jsx)("div",Object.assign({className:e.image},{children:(0,i.jsx)("img",{className:e.imageSource,src:ib.normal},void 0)}),void 0)}),void 0),(0,i.jsx)("div",Object.assign({className:e.type},{children:(0,i.jsx)("div",Object.assign({className:e.image},{children:(0,i.jsx)("img",{className:e.imageSource,src:ib.cropped},void 0)}),void 0)}),void 0)]}),void 0),(0,i.jsx)(jo.D,{marginTop:3*Z.W0,marginBottom:3*Z.W0},void 0),(0,i.jsx)("div",Object.assign({className:e.groupTitle},{children:(0,O.L)("Not blurry")}),void 0),(0,i.jsxs)("div",Object.assign({className:e.types},{children:[(0,i.jsx)("div",Object.assign({className:e.type},{children:(0,i.jsx)("div",Object.assign({className:e.image},{children:(0,i.jsx)("img",{className:e.imageSource,src:ib.normal},void 0)}),void 0)}),void 0),(0,i.jsx)("div",Object.assign({className:e.type},{children:(0,i.jsx)("div",Object.assign({className:e.image},{children:(0,i.jsx)("img",{className:e.imageSource,src:ib.blurry},void 0)}),void 0)}),void 0)]}),void 0),(0,i.jsx)(jo.D,{marginTop:3*Z.W0,marginBottom:3*Z.W0},void 0),(0,i.jsx)("div",Object.assign({className:e.groupTitle},{children:(0,O.L)("Not covered by other items")}),void 0),(0,i.jsxs)("div",Object.assign({className:e.types},{children:[(0,i.jsx)("div",Object.assign({className:e.type},{children:(0,i.jsx)("div",Object.assign({className:e.image},{children:(0,i.jsx)("img",{className:e.imageSource,src:ib.normal},void 0)}),void 0)}),void 0),(0,i.jsx)("div",Object.assign({className:e.type},{children:(0,i.jsx)("div",Object.assign({className:e.image},{children:(0,i.jsx)("img",{className:e.imageSource,src:ib.covered},void 0)}),void 0)}),void 0)]}),void 0)]}),void 0)}}const nb=(0,x.Z)((e=>{const{title:t,body:s}=e.theme.font.semantic;return{root:Object.assign(Object.assign({},(0,vn.f)(1)),{display:"flex",flexDirection:"column",paddingTop:30,paddingBottom:30,overflow:"auto"}),title:{textAlign:"center",fontSize:t.secondary,paddingBottom:30},groupTitle:{textAlign:"center",fontSize:s.tertiary,paddingBottom:30},types:{display:"flex",flexDirection:"row",marginBottom:30},type:{display:"flex",flexDirection:"column",flexBasis:"50%",alignItems:"center"},image:{width:310},imageSource:{width:"100%"}}}))(ob),ab=l()([(0,u.$)(N.BA).customParams()],(e=>({customParams:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class rb extends o.Component{render(){const e=this.props,{children:t,rules:s}=e,o=(0,th._T)(e,["children","rules"]);return(0,i.jsx)(pr.n,Object.assign({},o,{extend:{root:s.root(this.props),head:s.head(this.props),body:s.body(this.props),headElement:s.headElement(this.props),selectedHeadElement:s.selectedHeadElement(this.props)}},{children:t}),void 0)}}const lb=(0,n.$)(ab)((0,x.Z)((e=>{const{customParams:t}=e,{body:s}=e.theme.font.semantic;return{root:Object.assign({},(0,vn.f)(1)),head:{justifyContent:"center"},body:Object.assign(Object.assign({},(0,Q.O)({color:t.backgroundColor})),{color:t.textColor,borderBottomLeftRadius:0,borderBottomRightRadius:0,borderTopWidth:1,borderTopStyle:"solid",borderTopColor:"#cccccc"}),headElement:Object.assign(Object.assign(Object.assign(Object.assign({},(0,Q.O)({color:t.backgroundColor})),{color:t.textColor,opacity:.5,borderTopLeftRadius:0,borderTopRightRadius:0,borderTopWidth:1,borderTopStyle:"solid",borderTopColor:"#cccccc",borderRightWidth:1,borderRightStyle:"solid",borderRightColor:"#cccccc",fontSize:s.tertiary}),(0,X.o)(2*Z.W0,6*Z.W0)),{marginRight:0,nested:{":first-child":{borderLeftWidth:1,borderLeftStyle:"solid",borderLeftColor:"#cccccc"},":hover":Object.assign(Object.assign({},(0,Q.O)({color:t.backgroundColor})),{color:t.textColor})}}),selectedHeadElement:{fontWeight:"bold",opacity:1,nested:{":hover":Object.assign(Object.assign({},(0,Q.O)({color:t.backgroundColor})),{color:t.textColor})}}}}))(rb)),db=l()([rt.i,N.Wt,(0,u.$)(N.BA).customParams()],((e,t,s)=>({productName:e,isEditable:t,customParams:s})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class cb extends o.Component{render(){const{productName:e,styles:t}=this.props;return(0,i.jsxs)("div",Object.assign({className:t.container},{children:[(0,i.jsx)("div",Object.assign({className:t.title},{children:(0,O.L)("Verification Documents")}),void 0),(0,i.jsx)("div",Object.assign({className:t.descriptionContainer},{children:(0,i.jsx)("div",Object.assign({className:t.description},{children:(0,O.L)("As required by our Regulators, in order to activate your account, you will need to upload some verification documents on {0}, as per below:",e)}),void 0)}),void 0)]}),void 0)}}const ub=(0,n.$)(db)((0,x.Z)((e=>{const{customParams:t}=e;return{container:Object.assign(Object.assign({},(0,X.o)(30,24,10)),{color:t.textColor,display:"flex",flexDirection:"column",nested:{mobile:{paddingTop:60}}}),title:{fontSize:24},descriptionContainer:{display:"flex",flexDirection:"row"},description:{fontSize:14,justifyContent:"flex-start",whiteSpace:"pre-line"}}}))(cb));class hb extends o.Component{constructor(){super(...arguments),this.onChangeTab=e=>{const{setDocumentTab:t}=this.props;t(e)},this.onClose=()=>{const{setType:e}=this.props;e(A.u_.Form)}}componentDidMount(){const{track:e}=this.props;e({name:y.T2.KycDocsOpened})}render(){const{documentTab:e,allowedDocumentTypes:t,styles:s}=this.props,o=t.includes(xo.ZM.DOCUMENT_TYPE_ID),n=t.includes(xo.ZM.DOCUMENT_TYPE_ADDRESS);return(0,i.jsxs)("div",Object.assign({className:s.root},{children:[(0,i.jsx)(qp,{onClick:this.onClose},void 0),(0,i.jsx)(ub,{},void 0),(0,i.jsx)("div",Object.assign({className:s.body},{children:(0,i.jsxs)(lb,Object.assign({selected:e,onChange:this.onChangeTab},{children:[o&&(0,i.jsx)(br.O,Object.assign({id:A.k7.Id,label:(0,O.L)("Proof of ID")},{children:(0,i.jsx)(Kp,{},void 0)}),void 0),n&&(0,i.jsx)(br.O,Object.assign({id:A.k7.Residence,label:(0,O.L)("Proof of Residence")},{children:(0,i.jsx)(tb,{},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({id:A.k7.Specification,label:(0,O.L)("Attachment Specifications")},{children:(0,i.jsx)(nb,{},void 0)}),void 0)]}),void 0)}),void 0)]}),void 0)}}const gb=(0,n.$)(Xp,{track:S.m.track,setType:rh.m.setContentType,setDocumentTab:rh.m.setDocumentTab})((0,x.Z)((()=>({root:Object.assign(Object.assign({position:"relative"},(0,vn.f)(1)),{display:"flex",flexDirection:"column",height:"100%"}),body:{overflow:"auto"}})))(hb));class pb extends o.Component{constructor(){super(...arguments),this.onClose=()=>{const{close:e}=this.props;e()}}render(){const{styles:e}=this.props;return(0,i.jsx)("div",Object.assign({className:e.root},{children:this.renderContent()}),void 0)}renderContent(){const{contentType:e}=this.props;return e===A.u_.Form?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(qp,{onClick:this.onClose},void 0),(0,i.jsx)(Jp,{},void 0)]},void 0):e===A.u_.DocsExample?(0,i.jsx)(gb,{},void 0):null}}const bb=(0,n.$)(Gu,{close:f.G.close})((0,x.Z)((e=>{const{customParams:t}=e;return{root:Object.assign(Object.assign({position:"relative",display:"flex",flexGrow:1},(0,Q.O)({color:t.backgroundColor})),{border:"#cccccc 1px solid",height:"100%",overflow:"hidden",nested:{mobile:{width:"100%",height:"100%"}}})}}))(pb)),vb=l()([(0,u.$)((e=>e.kycDialog)).isShown()],(e=>({isShown:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class mb extends o.Component{render(){const{isShown:e,rules:t}=this.props;return e?(0,i.jsx)(fa.V,Object.assign({title:"",extend:{header:t.header(this.props),body:t.body(this.props),container:t.dialogContainer(this.props)}},{children:(0,i.jsx)(bb,{},void 0)}),void 0):null}}const jb=(0,n.$)(vb)((0,x.Z)((()=>({header:Object.assign({},(0,X.o)(0)),body:Object.assign({display:"flex"},(0,X.o)(0)),dialogContainer:{minWidth:700,maxWidth:770,maxHeight:700}})))(mb)),xb=e=>e.marketChartIndicatorDialog,yb=(0,s(50969).d)(),Sb=(0,_s.X)((0,u.$)(xb).indicatorId()).chain((e=>(0,qs.t)(yb,{indicatorId:e}))).build();var fb=s(70625);const Ob=l()([(0,u.$)(xb).isShown(),(0,u.$)(xb).indicatorType(),(0,u.$)(xb).indicatorId(),(0,u.$)(xb).chartId(),(0,u.$)(Sb).type()],((e,t,s,i,o)=>{const n=null!=t?t:o;return{isShown:e,indicatorType:n,chartId:i,indicatorId:s,activePage:n?(0,fb._)(n):void 0}}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var Cb=s(55922),kb=s(1940),Ib=s(1452),Lb=s(5161),wb=s(917);function Tb(e){switch(e){case wb.U.Trend:return(0,O.L)("Trend");case wb.U.Oscillators:return(0,O.L)("Oscillators");case wb.U.Volatility:return(0,O.L)("Volatility");case wb.U.Volume:return(0,O.L)("Volume");case wb.U.Other:return(0,O.L)("Other");default:return(0,vs.N)(e)}}function Db(e){return{default:{title:void 0,pages:Object.keys(kb.cV).reduce(((t,s)=>{const i=s;return Object.assign(Object.assign({},t),{[i]:{title:Tb(i),description:Tb(i),disabled:e}})}),{})}}}const Pb=(0,o.memo)((e=>{const{label:t,value:s,error:o,step:n,onChange:a}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ge.X,Object.assign({marginBottom:2},{children:t}),void 0),(0,i.jsx)(Vd.z,{value:s,error:o,step:n,onChange:a},void 0)]},void 0)}));function Nb(e,t){const{min:s,max:i,digits:o}=t,n=(0,Zd.m)(e);if(void 0!==n)return n;if(void 0!==o&&(0,$o.y6)(e)>o)return(0,O.L)("Max {0} decimal digits allowed",o);const a=(0,oi.J)(e);return void 0!==s&&a<s?(0,O.L)("Value must be greater than {0} or equal",s):void 0!==i&&a>i?(0,O.L)("Value must be less than {0} or equal",i):void 0}var Ab=s(95560),Bb=s(85952),Mb=s(59532),$b=s(1399),Eb=s(44586);const Fb=l()([(0,u.$)(xb).chartId()],(e=>({chartId:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),Rb=()=>{const{chartId:e}=(0,ne.v)(Fb);return e},Wb=l()([(0,u.$)(xb).indicatorId()],(e=>({indicatorId:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),Hb=()=>{const{indicatorId:e}=(0,ne.v)(Wb);return e};var zb;!function(e){e.Lines="Lines",e.Levels="Levels",e.TimeFrames="TimeFrames"}(zb||(zb={}));const Jb=e=>{const{backgroundColor:t}=e.theme.palette.semantic;return{root:{flexGrow:1,display:"flex",height:130,marginBottom:Z.W0},tabBar:{flexGrow:1},tabBarBody:Object.assign({},(0,X.o)(0)),headTab:Object.assign({},(0,Q.O)({color:t.secondaryNormal})),activeHeadTab:Object.assign({},(0,Q.O)({color:t.tertiaryNormal}))}},Qb=(0,o.memo)((e=>{const{children:t}=e,{css:s,rules:o}=(0,te.X)(Jb,{});return(0,i.jsx)("div",Object.assign({className:s.root()},{children:(0,i.jsx)(pr.n,Object.assign({extend:{root:o.tabBar,body:o.tabBarBody,headElement:o.headTab,selectedHeadElement:o.activeHeadTab}},{children:t}),void 0)}),void 0)})),_b=(0,o.memo)((e=>{const{children:t,testId:s}=e,[o,n,a]=t;return(0,i.jsxs)(At.s,Object.assign({testId:null!=s?s:"column",justifyContent:"space-between"},{children:[(0,i.jsx)(ge.X,{children:(0,i.jsx)(At.s,Object.assign({testId:"inputs"},{children:o}),void 0)},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(At.s,{children:[(0,i.jsx)(ge.X,Object.assign({testId:"tabs"},{children:n}),void 0),(0,i.jsx)(ge.X,{children:a},void 0)]},void 0)},void 0)]}),void 0)})),qb=(0,o.memo)((e=>{const{disabled:t,onSubmit:s,onReset:o}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(At.s,Object.assign({testId:"submit"},{children:(0,i.jsx)(ut.K,Object.assign({disabled:t,wide:!0,onClick:s},{children:(0,O.L)("Ok")}),void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"reset"},{children:(0,i.jsx)(Sc.U,Object.assign({wide:!0,onClick:o},{children:(0,O.L)("Reset")}),void 0)}),void 0)]},void 0)})),Xb=e=>{const{backgroundColor:t}=e.theme.palette.semantic;return{root:Object.assign(Object.assign({flexGrow:1,display:"flex",flexDirection:"column",alignItems:"flex-start",borderBottomLeftRadius:Z.q0,borderBottomRightRadius:Z.q0},(0,X.o)(Z.W0)),(0,Q.O)({color:t.tertiaryNormal})),scroll:{width:"100%"}}};var Vb=s(75504),Zb=s(35197),Ub=s(97987),Kb=s(2070);const Yb=(0,o.memo)((e=>{const{style:t,onChange:s}=e,{theme:n}=(0,Kb.S)(),a=(0,o.useCallback)((e=>{const{backgroundColor:t}=n.palette.semantic;return(0,i.jsx)("svg",Object.assign({width:"100%",height:7},{children:(0,i.jsx)("line",{x1:0,x2:"100%",y1:"50%",y2:"50%",stroke:(0,Zb.k)(t.primaryNormal),strokeWidth:1,strokeDasharray:e.value},void 0)}),void 0)}),[n]),r=(0,o.useCallback)((e=>{s(e)}),[s]);return(0,i.jsx)(Ct.P,{testId:"style",options:(0,Ub.g)(),value:t,renderOption:a,onChange:r,autoWidthElement:!1},void 0)}));var Gb=s(33270);const ev=(0,o.memo)((e=>{const{width:t,onChange:s}=e,{theme:n}=(0,Kb.S)(),a=(0,o.useCallback)((e=>{const{backgroundColor:t}=n.palette.semantic;return(0,i.jsx)("svg",Object.assign({width:"100%",height:7},{children:(0,i.jsx)("line",{x1:0,x2:"100%",y1:"50%",y2:"50%",stroke:(0,Zb.k)(t.primaryNormal),strokeWidth:e.value},void 0)}),void 0)}),[n]),r=(0,o.useCallback)((e=>{s((0,oi.J)(e))}),[s]);return(0,i.jsx)(Ct.P,{testId:"thickness",options:(0,Gb.K)(),value:t.toString(),renderOption:a,onChange:r,autoWidthElement:!1},void 0)})),tv=()=>({root:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:0},dropdown:{paddingLeft:0,paddingRight:0}});var sv=s(97577),iv=s(88525),ov=s(77980),nv=s(58689),av=s(95385);const rv=(0,o.memo)((e=>{const{color:t,onChange:s}=e,{hex:n,opacity:a}=(0,sv.C)(t),{css:r,rules:l}=(0,te.X)(tv,{}),[d,c]=(0,o.useState)(!1),u=(0,o.useCallback)((()=>{c(!0)}),[c]),h=(0,o.useCallback)((()=>{c(!1)}),[c]),g=(0,o.useCallback)(((e,t)=>{s((0,iv.A)(e,t))}),[s]),p=(0,o.useCallback)((()=>(0,i.jsx)(ov.c,{hex:n,opacity:a,useOpacity:!0,onChange:g},void 0)),[n,a,g]);return(0,i.jsx)("div",Object.assign({className:r.root()},{children:(0,i.jsxs)(av.L,Object.assign({placement:"bottom-start",arrow:!1,open:d,onOpen:u,onClose:h,extend:{root:l.dropdown}},{children:[(0,i.jsx)(nv.t,{isClickEffectDisabled:!0,testId:"context-color-control",hex:n,opacity:a,size:oe.J.Medium},void 0),p]}),void 0)}),void 0)})),lv=(0,o.memo)((e=>{const{line:t,onChange:s}=e,n=(0,o.useCallback)((e=>{s(Object.assign(Object.assign({},t),{active:e}))}),[t,s]),a=(0,o.useCallback)((e=>{s(Object.assign(Object.assign({},t),{style:e}))}),[t,s]),r=(0,o.useCallback)((e=>{s(Object.assign(Object.assign({},t),{width:e}))}),[t,s]),l=(0,o.useCallback)((e=>{s(Object.assign(Object.assign({},t),{color:e}))}),[t,s]);return(0,i.jsxs)(ge.X,Object.assign({testId:"line",alignItems:"center"},{children:[(0,i.jsx)(Re.b,Object.assign({flexBasis:"auto"},{children:(0,i.jsx)(Ie.J,Object.assign({testId:"line-visibility-checkbox",checked:t.active,onChange:n},{children:t.id}),void 0)}),void 0),(0,i.jsxs)(Re.b,Object.assign({marginLeft:0},{children:[void 0!==t.style&&(0,i.jsx)(Re.b,Object.assign({testId:"style-control"},{children:(0,i.jsx)(Yb,{style:t.style,onChange:a},void 0)}),void 0),(0,i.jsx)(Re.b,Object.assign({testId:"thickness-control"},{children:(0,i.jsx)(ev,{width:t.width,onChange:r},void 0)}),void 0)]}),void 0),(0,i.jsx)(Re.b,Object.assign({flexBasis:"auto"},{children:(0,i.jsx)(rv,{color:t.color,onChange:l},void 0)}),void 0)]}),void 0)})),dv=(0,o.memo)((e=>{const{lines:t,onChange:s}=e,{css:n,rules:a}=(0,te.X)(Xb,{}),r=(0,o.useCallback)((e=>i=>{s(Object.assign(Object.assign({},t),{[e]:i}))}),[s,t]),l=(0,o.useMemo)((()=>Object.entries(t).map((([e,t])=>(0,i.jsx)(lv,{line:t,onChange:r(e)},e)))),[t,r]);return(0,i.jsx)(Vb.W,{children:(0,i.jsx)("div",Object.assign({className:n.root()},{children:(0,i.jsx)(qe.X,Object.assign({autoHeight:!0,scrollBackgroundLayout:Xe.c.AllTransparent,extend:{root:a.scroll}},{children:l}),void 0)}),void 0)},void 0)})),cv=e=>{const{backgroundColor:t}=e.theme.palette.semantic;return{root:Object.assign(Object.assign({flexGrow:1,display:"flex",flexDirection:"column",alignItems:"flex-start",borderBottomLeftRadius:Z.q0,borderBottomRightRadius:Z.q0},(0,X.o)(Z.W0)),(0,Q.O)({color:t.tertiaryNormal})),scroll:{width:"100%"}}},uv=(0,o.memo)((e=>{const{width:t,onChange:s}=e,{theme:n}=(0,Kb.S)(),a=(0,o.useCallback)((e=>{const{backgroundColor:t}=n.palette.semantic;return(0,i.jsx)("svg",Object.assign({width:60,height:7},{children:(0,i.jsx)("line",{x1:0,x2:"100%",y1:"50%",y2:"50%",stroke:(0,Zb.k)(t.primaryNormal),strokeWidth:e.value},void 0)}),void 0)}),[n]),r=(0,o.useCallback)((e=>{s((0,oi.J)(e))}),[s]);return(0,i.jsx)(Ct.P,{options:(0,Gb.K)(),value:t.toString(),renderOption:a,onChange:r},void 0)})),hv=()=>({root:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:0},dropdown:{paddingLeft:0,paddingRight:0}}),gv=(0,o.memo)((e=>{const{color:t,onChange:s}=e,{hex:n,opacity:a}=(0,sv.C)(t),{css:r,rules:l}=(0,te.X)(hv,{}),[d,c]=(0,o.useState)(!1),u=(0,o.useCallback)((()=>{c(!0)}),[c]),h=(0,o.useCallback)((()=>{c(!1)}),[c]),g=(0,o.useCallback)(((e,t)=>{s((0,iv.A)(e,t))}),[s]),p=(0,o.useCallback)((()=>(0,i.jsx)(ov.c,{hex:n,opacity:a,useOpacity:!0,onChange:g},void 0)),[n,a,g]);return(0,i.jsx)("div",Object.assign({className:r.root()},{children:(0,i.jsxs)(av.L,Object.assign({placement:"bottom-start",arrow:!1,open:d,onOpen:u,onClose:h,extend:{root:l.dropdown}},{children:[(0,i.jsx)(nv.t,{isClickEffectDisabled:!0,testId:"context-color-control",hex:n,opacity:a,size:oe.J.Medium},void 0),p]}),void 0)}),void 0)})),pv=(0,o.memo)((e=>{var t;const{level:s,onChange:n,onRemove:a}=e,[r,l]=(0,o.useState)(null===(t=s.value)||void 0===t?void 0:t.toString()),d=(0,o.useCallback)((e=>{n(Object.assign(Object.assign({},s),{active:e}))}),[s,n]),c=(0,o.useCallback)((e=>{l(e),void 0===(0,Zd.m)(e)&&n(Object.assign(Object.assign({},s),{value:(0,oi.J)(e)}))}),[s,n]),u=(0,o.useCallback)((e=>{n(Object.assign(Object.assign({},s),{width:e}))}),[s,n]),h=(0,o.useCallback)((e=>{n(Object.assign(Object.assign({},s),{color:e}))}),[s,n]),g=(0,o.useCallback)((()=>{a(s)}),[s,a]);return(0,i.jsxs)(ge.X,Object.assign({testId:"level",alignItems:"center"},{children:[(0,i.jsx)(Ie.J,{testId:"level-visibility-checkbox",checked:s.active,onChange:d},void 0),(0,i.jsx)(es.q,{},void 0),(0,i.jsx)("div",{children:(0,i.jsx)(Vd.z,{value:r,error:(0,Zd.m)(r),step:"1",onChange:c},void 0)},void 0),(0,i.jsx)(es.q,{},void 0),(0,i.jsx)("div",{children:(0,i.jsx)(uv,{width:s.width,onChange:u},void 0)},void 0),(0,i.jsx)(es.q,{},void 0),(0,i.jsx)(gv,{color:s.color,onChange:h},void 0),(0,i.jsx)(es.q,{},void 0),(0,i.jsx)(Yl.h,{testId:"close-level",iconSource:ie.Y.cross,size:oe.J.Small,onClick:g},void 0)]}),void 0)})),bv=(0,o.memo)((e=>{const{onClick:t}=e;return(0,i.jsx)(Sc.U,Object.assign({wide:!0,onClick:t},{children:(0,i.jsx)(se.J,{source:ie.Y.plus,size:oe.J.Small},void 0)}),void 0)})),vv=(0,o.memo)((e=>{const{levels:t,onChange:s}=e,{css:n,rules:a}=(0,te.X)(cv,{}),r=(0,o.useCallback)((e=>{s(Object.assign(Object.assign({},t),{[e.id]:e}))}),[s,t]),l=(0,o.useCallback)((()=>{const e=(0,Eb.Z)();s(Object.assign(Object.assign({},t),{[e]:Object.assign(Object.assign({},kb.XK),{id:e})}))}),[s,t]),d=(0,o.useCallback)((e=>{const i=Object.entries(t).filter((([t])=>t!==e.id));s(Object.fromEntries(i))}),[s,t]),c=(0,o.useMemo)((()=>Object.entries(t).map((([e,t])=>(0,i.jsx)(pv,{level:t,onChange:r,onRemove:d},e)))),[t,r,d]);return(0,i.jsx)(Vb.W,{children:(0,i.jsxs)("div",Object.assign({className:n.root()},{children:[Object.keys(t).length>0&&(0,i.jsx)(qe.X,Object.assign({autoHeight:!0,scrollBackgroundLayout:Xe.c.AllTransparent,extend:{root:a.scroll}},{children:c}),void 0),(0,i.jsx)(ge.X,Object.assign({testId:"add-new-level",alignItems:"center",justifyContent:"center",extend:{root:{width:"100%"}}},{children:(0,i.jsx)(bv,{onClick:l},void 0)}),void 0)]}),void 0)},void 0)})),mv=Ab.sr.default.toString(),jv=(0,o.memo)((()=>{var e,t,s,n;const a=Rb(),r=Hb(),l=(0,Bb.d)(r),[d,c]=(0,o.useState)(null!==(t=null===(e=l.limitMove)||void 0===e?void 0:e.toString())&&void 0!==t?t:mv),[u,h]=(0,o.useState)(null!==(s=l.lines)&&void 0!==s?s:Ab.Pc),[g,p]=(0,o.useState)(null!==(n=l.levels)&&void 0!==n?n:Ab.Fc),b=(0,re.I0)(),v=(0,o.useMemo)((()=>Nb(d,Ab.sr)),[d]),m=(0,o.useCallback)((e=>{c(e),r&&b(Mb.Q.update({indicatorId:r,type:$b.J.AccumulativeSwingIndex,limitMove:(0,oi.J)(e)}))}),[r,c,b]),j=(0,o.useCallback)((e=>{h(e),r&&b(Mb.Q.update({indicatorId:r,type:$b.J.AccumulativeSwingIndex,lines:e}))}),[r,h,b]),x=(0,o.useCallback)((e=>{p(e),r&&b(Mb.Q.update({indicatorId:r,type:$b.J.AccumulativeSwingIndex,levels:e}))}),[b,p,r]),y=Boolean(v),S=(0,o.useCallback)((()=>{r||b(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:a,type:$b.J.AccumulativeSwingIndex,limitMove:(0,oi.J)(d),lines:u,levels:g,heightRatio:kb.dl,yStretch:kb.FQ})),b(Cb.d.close())}),[r,b,a,d,u,g]),f=(0,o.useCallback)((()=>{c(mv),h(Ab.Pc),r&&b(Mb.Q.update({indicatorId:r,type:$b.J.AccumulativeSwingIndex,limitMove:(0,oi.J)(mv),lines:Ab.Pc}))}),[r,b]);return(0,i.jsxs)(_b,Object.assign({testId:"accumulative-swing-index"},{children:[(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({testId:"limit-move-value",flexBasis:"50%"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Limit Move Value"),value:d,step:Ab.sr.step.toString(),error:v,onChange:m},void 0)}),void 0),(0,i.jsx)(At.s,{},void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:u,onChange:j},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:g,onChange:x},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:y,onSubmit:S,onReset:f},void 0)},void 0)]}),void 0)}));var xv=s(64370);const yv=xv.B_.default.toString(),Sv=(0,o.memo)((()=>{var e,t,s,n;const a=Rb(),r=Hb(),l=(0,Bb.d)(r),[d,c]=(0,o.useState)(null!==(t=null===(e=l.periodCount)||void 0===e?void 0:e.toString())&&void 0!==t?t:yv),[u,h]=(0,o.useState)(null!==(s=l.lines)&&void 0!==s?s:xv.X8),[g,p]=(0,o.useState)(null!==(n=l.levels)&&void 0!==n?n:xv.sz),b=(0,re.I0)(),v=(0,o.useMemo)((()=>Nb(d,xv.B_)),[d]),m=(0,o.useCallback)((e=>{c(e),r&&b(Mb.Q.update({indicatorId:r,type:$b.J.Aroon,periodCount:(0,oi.J)(e)}))}),[r,c,b]),j=(0,o.useCallback)((e=>{h(e),r&&b(Mb.Q.update({indicatorId:r,type:$b.J.Aroon,lines:e}))}),[r,h,b]),x=(0,o.useCallback)((e=>{p(e),r&&b(Mb.Q.update({indicatorId:r,type:$b.J.Aroon,levels:e}))}),[b,p,r]),y=Boolean(v),S=(0,o.useCallback)((()=>{r||b(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:a,type:$b.J.Aroon,periodCount:(0,oi.J)(d),lines:u,levels:g,heightRatio:kb.dl,yStretch:kb.FQ})),b(Cb.d.close())}),[r,b,a,d,u,g]),f=(0,o.useCallback)((()=>{c(yv),h(xv.X8),r&&b(Mb.Q.update({indicatorId:r,type:$b.J.Aroon,periodCount:(0,oi.J)(yv),lines:xv.X8}))}),[r,b]);return(0,i.jsxs)(_b,Object.assign({testId:"aroon"},{children:[(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({testId:"periods",flexBasis:"50%"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:d,step:xv.B_.step.toString(),error:v,onChange:m},void 0)}),void 0),(0,i.jsx)(At.s,{},void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:u,onChange:j},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:g,onChange:x},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:y,onSubmit:S,onReset:f},void 0)},void 0)]}),void 0)}));var fv=s(54349);const Ov=fv.cS.default.toString(),Cv=(0,o.memo)((()=>{var e,t,s,n;const a=Rb(),r=Hb(),l=(0,Bb.d)(r),[d,c]=(0,o.useState)(null!==(t=null===(e=l.periodCount)||void 0===e?void 0:e.toString())&&void 0!==t?t:Ov),[u,h]=(0,o.useState)(null!==(s=l.lines)&&void 0!==s?s:fv.yT),[g,p]=(0,o.useState)(null!==(n=l.levels)&&void 0!==n?n:fv.ht),b=(0,re.I0)(),v=(0,o.useMemo)((()=>Nb(d,fv.cS)),[d]),m=(0,o.useCallback)((e=>{c(e),r&&b(Mb.Q.update({indicatorId:r,type:$b.J.DirectionalMovementSystem,periodCount:(0,oi.J)(e)}))}),[r,c,b]),j=(0,o.useCallback)((e=>{h(e),r&&b(Mb.Q.update({indicatorId:r,type:$b.J.DirectionalMovementSystem,lines:e}))}),[r,h,b]),x=(0,o.useCallback)((e=>{p(e),r&&b(Mb.Q.update({indicatorId:r,type:$b.J.DirectionalMovementSystem,levels:e}))}),[b,p,r]),y=Boolean(v),S=(0,o.useCallback)((()=>{r||b(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:a,type:$b.J.DirectionalMovementSystem,periodCount:(0,oi.J)(d),lines:u,levels:g,heightRatio:kb.dl,yStretch:kb.FQ})),b(Cb.d.close())}),[r,b,a,d,u,g]),f=(0,o.useCallback)((()=>{c(Ov),h(fv.yT),r&&b(Mb.Q.update({indicatorId:r,type:$b.J.DirectionalMovementSystem,periodCount:(0,oi.J)(Ov),lines:fv.yT}))}),[r,b]);return(0,i.jsxs)(_b,Object.assign({testId:"directional-movement-system"},{children:[(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({testId:"periods",flexBasis:"50%"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:d,step:fv.cS.step.toString(),error:v,onChange:m},void 0)}),void 0),(0,i.jsx)(At.s,{},void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:u,onChange:j},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:g,onChange:x},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:y,onSubmit:S,onReset:f},void 0)},void 0)]}),void 0)}));var kv=s(42306);const Iv=e=>{const{backgroundColor:t}=e.theme.palette.semantic;return{root:Object.assign(Object.assign({flexGrow:1,display:"flex",borderBottomLeftRadius:Z.q0,borderBottomRightRadius:Z.q0},(0,X.o)(Z.W0)),(0,Q.O)({color:t.tertiaryNormal}))}},Lv=()=>({root:{flexGrow:1,display:"flex",flexDirection:"row"},periods:{display:"flex",flexDirection:"row",flexWrap:"wrap"},column:{display:"flex",flexDirection:"column",marginRight:Z.W0,":last-child":{marginRight:0}},checkbox:{flexBasis:"30%",marginBottom:Z.W0},label:{whiteSpace:"nowrap"}});var wv=s(19073),Tv=s(86997);const Dv=(0,o.memo)((e=>{const{periods:t,onChange:s}=e,{css:n,rules:a}=(0,te.X)(Lv,{}),r=(0,o.useCallback)((e=>i=>{const o=[...t];i?o.push(e):o.splice(o.findIndex((t=>t===e)),1),s(o)}),[t,s]),l=[...Object.values(wv.NQ),...Object.values(wv.hR)];return(0,i.jsx)("div",Object.assign({className:n.root()},{children:(0,i.jsx)(qe.X,Object.assign({autoHeight:!0,scrollBackgroundLayout:Xe.c.AllTransparent},{children:(0,i.jsx)("div",Object.assign({className:n.periods()},{children:l.map((e=>(0,i.jsx)(Ie.J,Object.assign({checked:t.some((t=>t===e)),onChange:r(e),extend:{root:a.checkbox,label:a.label}},{children:(0,Tv.r)(e).title}),`period${e}`)))}),void 0)}),void 0)}),void 0)})),Pv=(0,o.memo)((e=>{const{periods:t,onChange:s}=e,{css:o}=(0,te.X)(Iv,{});return(0,i.jsx)("div",Object.assign({className:o.root()},{children:(0,i.jsx)(Vb.W,{children:(0,i.jsx)(Dv,{periods:t,onChange:s},void 0)},void 0)}),void 0)})),Nv=(0,o.memo)((e=>{const{options:t,label:s,value:o,onChange:n}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ge.X,Object.assign({marginBottom:2},{children:s}),void 0),(0,i.jsx)(ni.m,{options:t,value:o,error:void 0,onChange:n},void 0)]},void 0)})),Av=kv.IY.default,Bv=kv.UT.default.toString(),Mv=kv.hh.default.toString(),$v=(0,o.memo)((()=>{var e,t,s,n,a,r,l;const d=Rb(),c=Hb(),u=(0,Bb.d)(c),[h,g]=(0,o.useState)(null!==(e=u.source)&&void 0!==e?e:Av),[p,b]=(0,o.useState)(null!==(s=null===(t=u.periodCount)||void 0===t?void 0:t.toString())&&void 0!==s?s:Bv),[v,m]=(0,o.useState)(null!==(a=null===(n=u.shift)||void 0===n?void 0:n.toString())&&void 0!==a?a:Mv),[j,x]=(0,o.useState)(null!==(r=u.lines)&&void 0!==r?r:kv.od),[y,S]=(0,o.useState)(null!==(l=u.periods)&&void 0!==l?l:kb.zF),f=(0,re.I0)(),C=(0,o.useMemo)((()=>Nb(p,kv.UT)),[p]),k=(0,o.useMemo)((()=>Nb(v,kv.hh)),[v]),I=(0,o.useCallback)((e=>{g(e),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.ExponentialMovingAverage,source:e}))}),[c,g,f]),L=(0,o.useCallback)((e=>{b(e),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.ExponentialMovingAverage,periodCount:(0,oi.J)(e)}))}),[c,b,f]),w=(0,o.useCallback)((e=>{m(e),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.ExponentialMovingAverage,shift:(0,oi.J)(e)}))}),[c,m,f]),T=(0,o.useCallback)((e=>{x(e),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.ExponentialMovingAverage,lines:e}))}),[c,x,f]),D=(0,o.useCallback)((e=>{S(e),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.ExponentialMovingAverage,periods:e}))}),[c,S,f]),P=Boolean(C)||Boolean(k),N=(0,o.useCallback)((()=>{c||f(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:d,type:$b.J.ExponentialMovingAverage,source:h,periodCount:(0,oi.J)(p),shift:(0,oi.J)(v),lines:j,periods:y})),f(Cb.d.close())}),[c,f,d,h,p,v,j,y]),A=(0,o.useCallback)((()=>{g(Av),b(Bv),m(Mv),x(kv.od),S(kb.zF),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.ExponentialMovingAverage,source:Av,periodCount:(0,oi.J)(Bv),shift:(0,oi.J)(Mv),lines:kv.od,periods:kb.zF}))}),[c,m,f]);return(0,i.jsxs)(_b,Object.assign({testId:"exponential-moving-average"},{children:[(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({testId:"source",flexBasis:"50%"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("Source"),options:kb.yT,value:h,onChange:I},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:p,step:kv.UT.step.toString(),error:C,onChange:L},void 0)}),void 0)]},void 0),(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({testId:"shift",flexBasis:"50%"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Shift"),value:v,step:kv.hh.step.toString(),error:k,onChange:w},void 0)}),void 0),(0,i.jsx)(At.s,{},void 0)]},void 0)]},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:j,onChange:T},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"time-frames",id:zb.TimeFrames,label:(0,O.L)("Time Frames"),align:vr.K.left},{children:(0,i.jsx)(Pv,{periods:y,onChange:D},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:P,onSubmit:N,onReset:A},void 0)},void 0)]}),void 0)}));var Ev=s(14495);const Fv=Ev.QN.default.toString(),Rv=(0,o.memo)((()=>{var e,t,s,n;const a=Rb(),r=Hb(),l=(0,Bb.d)(r),[d,c]=(0,o.useState)(null!==(t=null===(e=l.shift)||void 0===e?void 0:e.toString())&&void 0!==t?t:Fv),[u,h]=(0,o.useState)(null!==(s=l.lines)&&void 0!==s?s:Ev.E5),[g,p]=(0,o.useState)(null!==(n=l.periods)&&void 0!==n?n:kb.zF),b=(0,re.I0)(),v=(0,o.useMemo)((()=>Nb(d,Ev.QN)),[d]),m=(0,o.useCallback)((e=>{c(e),r&&b(Mb.Q.update({indicatorId:r,type:$b.J.Median,shift:(0,oi.J)(e)}))}),[r,c,b]),j=(0,o.useCallback)((e=>{h(e),r&&b(Mb.Q.update({indicatorId:r,type:$b.J.Median,lines:e}))}),[r,h,b]),x=(0,o.useCallback)((e=>{p(e),r&&b(Mb.Q.update({indicatorId:r,type:$b.J.Median,periods:e}))}),[r,p,b]),y=Boolean(v),S=(0,o.useCallback)((()=>{r||b(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:a,type:$b.J.Median,shift:(0,oi.J)(d),lines:u,periods:g})),b(Cb.d.close())}),[r,b,a,d,u,g]),f=(0,o.useCallback)((()=>{c(Fv),h(Ev.E5),p(kb.zF),r&&b(Mb.Q.update({indicatorId:r,type:$b.J.Median,shift:(0,oi.J)(Fv),lines:Ev.E5,periods:kb.zF}))}),[r,c,b]);return(0,i.jsxs)(_b,Object.assign({testId:"median"},{children:[(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({testId:"shift",flexBasis:"50%"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Shift"),value:d,step:Ev.QN.step.toString(),error:v,onChange:m},void 0)}),void 0),(0,i.jsx)(At.s,{},void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:u,onChange:j},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"time-frames",id:zb.TimeFrames,label:(0,O.L)("Time Frames"),align:vr.K.left},{children:(0,i.jsx)(Pv,{periods:g,onChange:x},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:y,onSubmit:S,onReset:f},void 0)},void 0)]}),void 0)}));var Wv=s(51241);const Hv=Wv.YE.default.toString(),zv=Wv.gh.default.toString(),Jv=Wv.R.default.toString(),Qv=(0,o.memo)((()=>{var e,t,s,n,a,r,l,d;const c=Rb(),u=Hb(),h=(0,Bb.d)(u),[g,p]=(0,o.useState)(null!==(t=null===(e=h.minAf)||void 0===e?void 0:e.toString())&&void 0!==t?t:Hv),[b,v]=(0,o.useState)(null!==(n=null===(s=h.maxAf)||void 0===s?void 0:s.toString())&&void 0!==n?n:zv),[m,j]=(0,o.useState)(null!==(r=null===(a=h.shift)||void 0===a?void 0:a.toString())&&void 0!==r?r:Jv),[x,y]=(0,o.useState)(null!==(l=h.lines)&&void 0!==l?l:Wv.uz),[S,f]=(0,o.useState)(null!==(d=h.periods)&&void 0!==d?d:kb.zF),C=(0,re.I0)(),k=(0,o.useMemo)((()=>Nb(g,Wv.YE)),[g]),I=(0,o.useMemo)((()=>Nb(b,Wv.gh)),[b]),L=(0,o.useMemo)((()=>Nb(m,Wv.R)),[m]),w=(0,o.useCallback)((e=>{p(e),u&&C(Mb.Q.update({indicatorId:u,type:$b.J.ParabolicSar,minAf:(0,oi.J)(e)}))}),[u,p,C]),T=(0,o.useCallback)((e=>{v(e),u&&C(Mb.Q.update({indicatorId:u,type:$b.J.ParabolicSar,maxAf:(0,oi.J)(e)}))}),[u,v,C]),D=(0,o.useCallback)((e=>{j(e),u&&C(Mb.Q.update({indicatorId:u,type:$b.J.ParabolicSar,shift:(0,oi.J)(e)}))}),[u,j,C]),P=(0,o.useCallback)((e=>{y(e),u&&C(Mb.Q.update({indicatorId:u,type:$b.J.ParabolicSar,lines:e}))}),[u,y,C]),N=(0,o.useCallback)((e=>{f(e),u&&C(Mb.Q.update({indicatorId:u,type:$b.J.ParabolicSar,periods:e}))}),[u,f,C]),A=Boolean(k)||Boolean(I)||Boolean(L),B=(0,o.useCallback)((()=>{u||C(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:c,type:$b.J.ParabolicSar,minAf:(0,oi.J)(g),maxAf:(0,oi.J)(b),shift:(0,oi.J)(m),lines:x,periods:S})),C(Cb.d.close())}),[u,C,c,b,g,m,x,S]),M=(0,o.useCallback)((()=>{p(Hv),v(zv),j(Jv),y(Wv.uz),f(kb.zF),u&&C(Mb.Q.update({indicatorId:u,type:$b.J.ParabolicSar,minAf:(0,oi.J)(Hv),maxAf:(0,oi.J)(zv),shift:(0,oi.J)(Jv),lines:Wv.uz,periods:kb.zF}))}),[u,j,C]);return(0,i.jsxs)(_b,Object.assign({testId:"parabolic-sar"},{children:[(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({testId:"min-af",flexBasis:"50%"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Min AF"),value:g,step:Wv.YE.step.toString(),error:k,onChange:w},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"max-af"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Max AF"),value:b,step:Wv.gh.step.toString(),error:I,onChange:T},void 0)}),void 0)]},void 0),(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"shift"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Shift"),value:m,step:Wv.R.step.toString(),error:L,onChange:D},void 0)}),void 0),(0,i.jsx)(At.s,{},void 0)]},void 0)]},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:x,onChange:P},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"time-frames",id:zb.TimeFrames,label:(0,O.L)("Time Frames"),align:vr.K.left},{children:(0,i.jsx)(Pv,{periods:S,onChange:N},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:A,onSubmit:B,onReset:M},void 0)},void 0)]}),void 0)}));var _v=s(83685);const qv=_v.W8.default,Xv=_v.eF.default.toString(),Vv=_v.co.default.toString(),Zv=(0,o.memo)((()=>{var e,t,s,n,a,r,l;const d=Rb(),c=Hb(),u=(0,Bb.d)(c),[h,g]=(0,o.useState)(null!==(e=u.source)&&void 0!==e?e:qv),[p,b]=(0,o.useState)(null!==(s=null===(t=u.periodCount)||void 0===t?void 0:t.toString())&&void 0!==s?s:Xv),[v,m]=(0,o.useState)(null!==(a=null===(n=u.shift)||void 0===n?void 0:n.toString())&&void 0!==a?a:Vv),[j,x]=(0,o.useState)(null!==(r=u.lines)&&void 0!==r?r:_v.BO),[y,S]=(0,o.useState)(null!==(l=u.periods)&&void 0!==l?l:kb.zF),f=(0,re.I0)(),C=(0,o.useMemo)((()=>Nb(p,_v.eF)),[p]),k=(0,o.useMemo)((()=>Nb(v,_v.co)),[v]),I=(0,o.useCallback)((e=>{g(e),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.SimpleMovingAverage,source:e}))}),[c,g,f]),L=(0,o.useCallback)((e=>{b(e),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.SimpleMovingAverage,periodCount:(0,oi.J)(e)}))}),[c,b,f]),w=(0,o.useCallback)((e=>{m(e),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.SimpleMovingAverage,shift:(0,oi.J)(e)}))}),[c,m,f]),T=(0,o.useCallback)((e=>{x(e),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.SimpleMovingAverage,lines:e}))}),[c,x,f]),D=(0,o.useCallback)((e=>{S(e),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.SimpleMovingAverage,periods:e}))}),[c,S,f]),P=Boolean(C)||Boolean(k),N=(0,o.useCallback)((()=>{c||f(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:d,type:$b.J.SimpleMovingAverage,source:h,periodCount:(0,oi.J)(p),shift:(0,oi.J)(v),lines:j,periods:y})),f(Cb.d.close())}),[c,f,d,h,p,v,j,y]),A=(0,o.useCallback)((()=>{g(qv),b(Xv),m(Vv),x(_v.BO),S(kb.zF),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.SimpleMovingAverage,source:qv,periodCount:(0,oi.J)(Xv),shift:(0,oi.J)(Vv),lines:_v.BO,periods:kb.zF}))}),[c,m,f]);return(0,i.jsxs)(_b,Object.assign({testId:"simple-moving-average"},{children:[(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({testId:"source",flexBasis:"50%"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("Source"),options:kb.yT,value:h,onChange:I},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:p,step:_v.eF.step.toString(),error:C,onChange:L},void 0)}),void 0)]},void 0),(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({testId:"shift",flexBasis:"50%"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Shift"),value:v,step:_v.co.step.toString(),error:k,onChange:w},void 0)}),void 0),(0,i.jsx)(At.s,{},void 0)]},void 0)]},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:j,onChange:T},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"time-frames",id:zb.TimeFrames,label:(0,O.L)("Time Frames"),align:vr.K.left},{children:(0,i.jsx)(Pv,{periods:y,onChange:D},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:P,onSubmit:N,onReset:A},void 0)},void 0)]}),void 0)}));var Uv=s(23109);const Kv=Uv.t6.default.toString(),Yv=Uv.uk.default.toString(),Gv=Uv._.default.toString(),em=(0,o.memo)((()=>{var e,t,s,n,a,r,l,d;const c=Rb(),u=Hb(),h=(0,Bb.d)(u),[g,p]=(0,o.useState)(null!==(t=null===(e=h.periodCount)||void 0===e?void 0:e.toString())&&void 0!==t?t:Kv),[b,v]=(0,o.useState)(null!==(n=null===(s=h.multiplier)||void 0===s?void 0:s.toString())&&void 0!==n?n:Yv),[m,j]=(0,o.useState)(null!==(r=null===(a=h.shift)||void 0===a?void 0:a.toString())&&void 0!==r?r:Gv),[x,y]=(0,o.useState)(null!==(l=h.lines)&&void 0!==l?l:Uv.ph),[S,f]=(0,o.useState)(null!==(d=h.periods)&&void 0!==d?d:kb.zF),C=(0,re.I0)(),k=(0,o.useMemo)((()=>Nb(g,Uv.t6)),[g]),I=(0,o.useMemo)((()=>Nb(b,Uv.uk)),[b]),L=(0,o.useMemo)((()=>Nb(m,Uv._)),[m]),w=(0,o.useCallback)((e=>{p(e),u&&C(Mb.Q.update({indicatorId:u,type:$b.J.SuperTrend,periodCount:(0,oi.J)(e)}))}),[u,p,C]),T=(0,o.useCallback)((e=>{v(e),u&&C(Mb.Q.update({indicatorId:u,type:$b.J.SuperTrend,multiplier:(0,oi.J)(e)}))}),[u,v,C]),D=(0,o.useCallback)((e=>{j(e),u&&C(Mb.Q.update({indicatorId:u,type:$b.J.SuperTrend,shift:(0,oi.J)(e)}))}),[u,j,C]),P=(0,o.useCallback)((e=>{y(e),u&&C(Mb.Q.update({indicatorId:u,type:$b.J.SuperTrend,lines:e}))}),[u,y,C]),N=(0,o.useCallback)((e=>{f(e),u&&C(Mb.Q.update({indicatorId:u,type:$b.J.SuperTrend,periods:e}))}),[u,f,C]),A=Boolean(k)||Boolean(I)||Boolean(L),B=(0,o.useCallback)((()=>{u||C(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:c,type:$b.J.SuperTrend,periodCount:(0,oi.J)(g),multiplier:(0,oi.J)(b),shift:(0,oi.J)(m),lines:x,periods:S})),C(Cb.d.close())}),[u,C,c,b,g,m,x,S]),M=(0,o.useCallback)((()=>{p(Kv),v(Yv),j(Gv),y(Uv.ph),f(kb.zF),u&&C(Mb.Q.update({indicatorId:u,type:$b.J.SuperTrend,periodCount:(0,oi.J)(Kv),multiplier:(0,oi.J)(Yv),shift:(0,oi.J)(Gv),lines:Uv.ph,periods:kb.zF}))}),[u,j,C]);return(0,i.jsxs)(_b,Object.assign({testId:"supertrend"},{children:[(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({testId:"periods",flexBasis:"50%"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:g,step:Uv.t6.step.toString(),error:k,onChange:w},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"multiplier"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Multiplier"),value:b,step:Uv.uk.step.toString(),error:I,onChange:T},void 0)}),void 0)]},void 0),(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({testId:"shift",flexBasis:"50%"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Shift"),value:m,step:Uv._.step.toString(),error:L,onChange:D},void 0)}),void 0),(0,i.jsx)(At.s,{},void 0)]},void 0)]},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:x,onChange:P},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"time-frames",id:zb.TimeFrames,label:(0,O.L)("Time Frames"),align:vr.K.left},{children:(0,i.jsx)(Pv,{periods:S,onChange:N},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:A,onSubmit:B,onReset:M},void 0)},void 0)]}),void 0)}));var tm=s(10463);const sm=tm.Si.default,im=tm.f8.default.toString(),om=tm.hU.default.toString(),nm=(0,o.memo)((()=>{var e,t,s,n,a,r,l;const d=Rb(),c=Hb(),u=(0,Bb.d)(c),[h,g]=(0,o.useState)(null!==(e=u.source)&&void 0!==e?e:sm),[p,b]=(0,o.useState)(null!==(s=null===(t=u.periodCount)||void 0===t?void 0:t.toString())&&void 0!==s?s:im),[v,m]=(0,o.useState)(null!==(a=null===(n=u.shift)||void 0===n?void 0:n.toString())&&void 0!==a?a:om),[j,x]=(0,o.useState)(null!==(r=u.lines)&&void 0!==r?r:tm.aS),[y,S]=(0,o.useState)(null!==(l=u.periods)&&void 0!==l?l:kb.zF),f=(0,re.I0)(),C=(0,o.useMemo)((()=>Nb(p,tm.f8)),[p]),k=(0,o.useMemo)((()=>Nb(v,tm.hU)),[v]),I=(0,o.useCallback)((e=>{g(e),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.TimeSeriesMovingAverage,source:e}))}),[c,g,f]),L=(0,o.useCallback)((e=>{b(e),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.TimeSeriesMovingAverage,periodCount:(0,oi.J)(e)}))}),[c,b,f]),w=(0,o.useCallback)((e=>{m(e),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.TimeSeriesMovingAverage,shift:(0,oi.J)(e)}))}),[c,m,f]),T=(0,o.useCallback)((e=>{x(e),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.TimeSeriesMovingAverage,lines:e}))}),[c,x,f]),D=(0,o.useCallback)((e=>{S(e),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.TimeSeriesMovingAverage,periods:e}))}),[c,S,f]),P=Boolean(C)||Boolean(k),N=(0,o.useCallback)((()=>{c||f(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:d,type:$b.J.TimeSeriesMovingAverage,source:h,periodCount:(0,oi.J)(p),shift:(0,oi.J)(v),lines:j,periods:y})),f(Cb.d.close())}),[c,f,d,h,p,v,j,y]),A=(0,o.useCallback)((()=>{g(sm),b(im),m(om),x(tm.aS),S(kb.zF),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.TimeSeriesMovingAverage,source:sm,periodCount:(0,oi.J)(im),shift:(0,oi.J)(om),lines:tm.aS,periods:kb.zF}))}),[c,m,f]);return(0,i.jsxs)(_b,Object.assign({testId:"time-series-moving-average"},{children:[(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({testId:"source",flexBasis:"50%"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("Source"),options:kb.yT,value:h,onChange:I},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:p,step:tm.f8.step.toString(),error:C,onChange:L},void 0)}),void 0)]},void 0),(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({testId:"shift",flexBasis:"50%"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Shift"),value:v,step:tm.hU.step.toString(),error:k,onChange:w},void 0)}),void 0),(0,i.jsx)(At.s,{},void 0)]},void 0)]},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:j,onChange:T},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"time-frames",id:zb.TimeFrames,label:(0,O.L)("Time Frames"),align:vr.K.left},{children:(0,i.jsx)(Pv,{periods:y,onChange:D},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:P,onSubmit:N,onReset:A},void 0)},void 0)]}),void 0)}));var am=s(20559);const rm=am.sR.default,lm=am.vR.default.toString(),dm=am.qk.default.toString(),cm=(0,o.memo)((()=>{var e,t,s,n,a,r,l;const d=Rb(),c=Hb(),u=(0,Bb.d)(c),[h,g]=(0,o.useState)(null!==(e=u.source)&&void 0!==e?e:rm),[p,b]=(0,o.useState)(null!==(s=null===(t=u.periodCount)||void 0===t?void 0:t.toString())&&void 0!==s?s:lm),[v,m]=(0,o.useState)(null!==(a=null===(n=u.shift)||void 0===n?void 0:n.toString())&&void 0!==a?a:dm),[j,x]=(0,o.useState)(null!==(r=u.lines)&&void 0!==r?r:am.qM),[y,S]=(0,o.useState)(null!==(l=u.periods)&&void 0!==l?l:kb.zF),f=(0,re.I0)(),C=(0,o.useMemo)((()=>Nb(p,am.vR)),[p]),k=(0,o.useMemo)((()=>Nb(v,am.qk)),[v]),I=(0,o.useCallback)((e=>{g(e),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.TriangularMovingAverage,source:e}))}),[c,g,f]),L=(0,o.useCallback)((e=>{b(e),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.TriangularMovingAverage,periodCount:(0,oi.J)(e)}))}),[c,b,f]),w=(0,o.useCallback)((e=>{m(e),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.TriangularMovingAverage,shift:(0,oi.J)(e)}))}),[c,m,f]),T=(0,o.useCallback)((e=>{x(e),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.TriangularMovingAverage,lines:e}))}),[c,x,f]),D=(0,o.useCallback)((e=>{S(e),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.TriangularMovingAverage,periods:e}))}),[c,S,f]),P=Boolean(C)||Boolean(k),N=(0,o.useCallback)((()=>{c||f(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:d,type:$b.J.TriangularMovingAverage,source:h,periodCount:(0,oi.J)(p),shift:(0,oi.J)(v),lines:j,periods:y})),f(Cb.d.close())}),[c,f,d,h,p,v,j,y]),A=(0,o.useCallback)((()=>{g(rm),b(lm),m(dm),x(am.qM),S(kb.zF),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.TriangularMovingAverage,source:rm,periodCount:(0,oi.J)(lm),shift:(0,oi.J)(dm),lines:am.qM,periods:kb.zF}))}),[c,m,f]);return(0,i.jsxs)(_b,Object.assign({testId:"triangular-moving-average"},{children:[(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({testId:"source",flexBasis:"50%"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("Source"),options:kb.yT,value:h,onChange:I},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:p,step:am.vR.step.toString(),error:C,onChange:L},void 0)}),void 0)]},void 0),(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({testId:"shift",flexBasis:"50%"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Shift"),value:v,step:am.qk.step.toString(),error:k,onChange:w},void 0)}),void 0),(0,i.jsx)(At.s,{},void 0)]},void 0)]},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:j,onChange:T},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"time-frames",id:zb.TimeFrames,label:(0,O.L)("Time Frames"),align:vr.K.left},{children:(0,i.jsx)(Pv,{periods:y,onChange:D},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:P,onSubmit:N,onReset:A},void 0)},void 0)]}),void 0)}));var um=s(59810);const hm=um.yl.default,gm=um.Xw.default.toString(),pm=um.z0.default.toString(),bm=(0,o.memo)((()=>{var e,t,s,n,a,r,l;const d=Rb(),c=Hb(),u=(0,Bb.d)(c),[h,g]=(0,o.useState)(null!==(e=u.source)&&void 0!==e?e:hm),[p,b]=(0,o.useState)(null!==(s=null===(t=u.periodCount)||void 0===t?void 0:t.toString())&&void 0!==s?s:gm),[v,m]=(0,o.useState)(null!==(a=null===(n=u.shift)||void 0===n?void 0:n.toString())&&void 0!==a?a:pm),[j,x]=(0,o.useState)(null!==(r=u.lines)&&void 0!==r?r:um.h7),[y,S]=(0,o.useState)(null!==(l=u.periods)&&void 0!==l?l:kb.zF),f=(0,re.I0)(),C=(0,o.useMemo)((()=>Nb(p,um.Xw)),[p]),k=(0,o.useMemo)((()=>Nb(v,um.z0)),[v]),I=(0,o.useCallback)((e=>{g(e),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.WeightedMovingAverage,source:e}))}),[c,g,f]),L=(0,o.useCallback)((e=>{b(e),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.WeightedMovingAverage,periodCount:(0,oi.J)(e)}))}),[c,b,f]),w=(0,o.useCallback)((e=>{m(e),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.WeightedMovingAverage,shift:(0,oi.J)(e)}))}),[c,m,f]),T=(0,o.useCallback)((e=>{x(e),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.WeightedMovingAverage,lines:e}))}),[c,x,f]),D=(0,o.useCallback)((e=>{S(e),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.WeightedMovingAverage,periods:e}))}),[c,S,f]),P=Boolean(C)||Boolean(k),N=(0,o.useCallback)((()=>{c||f(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:d,type:$b.J.WeightedMovingAverage,source:h,periodCount:(0,oi.J)(p),shift:(0,oi.J)(v),lines:j,periods:y})),f(Cb.d.close())}),[c,f,d,h,p,v,j,y]),A=(0,o.useCallback)((()=>{g(hm),b(gm),m(pm),x(um.h7),S(kb.zF),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.WeightedMovingAverage,source:hm,periodCount:(0,oi.J)(gm),shift:(0,oi.J)(pm),lines:um.h7,periods:kb.zF}))}),[c,m,f]);return(0,i.jsxs)(_b,Object.assign({testId:"weighted-moving-average"},{children:[(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"source"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("Source"),options:kb.yT,value:h,onChange:I},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:p,step:um.Xw.step.toString(),error:C,onChange:L},void 0)}),void 0)]},void 0),(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"shift"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Shift"),value:v,step:um.z0.step.toString(),error:k,onChange:w},void 0)}),void 0),(0,i.jsx)(At.s,{},void 0)]},void 0)]},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:j,onChange:T},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"time-frames",id:zb.TimeFrames,label:(0,O.L)("Time Frames"),align:vr.K.left},{children:(0,i.jsx)(Pv,{periods:y,onChange:D},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:P,onSubmit:N,onReset:A},void 0)},void 0)]}),void 0)}));var vm=s(68085);const mm=vm.nM.default,jm=vm.gy.default.toString(),xm=vm._V.default.toString(),ym=(0,o.memo)((()=>{var e,t,s,n,a,r,l;const d=Rb(),c=Hb(),u=(0,Bb.d)(c),[h,g]=(0,o.useState)(null!==(e=u.source)&&void 0!==e?e:mm),[p,b]=(0,o.useState)(null!==(s=null===(t=u.periodCount)||void 0===t?void 0:t.toString())&&void 0!==s?s:jm),[v,m]=(0,o.useState)(null!==(a=null===(n=u.shift)||void 0===n?void 0:n.toString())&&void 0!==a?a:xm),[j,x]=(0,o.useState)(null!==(r=u.lines)&&void 0!==r?r:vm.J),[y,S]=(0,o.useState)(null!==(l=u.periods)&&void 0!==l?l:kb.zF),f=(0,re.I0)(),C=(0,o.useMemo)((()=>Nb(p,vm.gy)),[p]),k=(0,o.useMemo)((()=>Nb(v,vm._V)),[v]),I=(0,o.useCallback)((e=>{g(e),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.WellesWilderSmoothing,source:e}))}),[c,g,f]),L=(0,o.useCallback)((e=>{b(e),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.WellesWilderSmoothing,periodCount:(0,oi.J)(e)}))}),[c,b,f]),w=(0,o.useCallback)((e=>{m(e),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.WellesWilderSmoothing,shift:(0,oi.J)(e)}))}),[c,m,f]),T=(0,o.useCallback)((e=>{x(e),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.WellesWilderSmoothing,lines:e}))}),[c,x,f]),D=(0,o.useCallback)((e=>{S(e),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.WellesWilderSmoothing,periods:e}))}),[c,S,f]),P=Boolean(C)||Boolean(k),N=(0,o.useCallback)((()=>{c||f(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:d,type:$b.J.WellesWilderSmoothing,source:h,periodCount:(0,oi.J)(p),shift:(0,oi.J)(v),lines:j,periods:y})),f(Cb.d.close())}),[c,f,d,h,p,v,j,y]),A=(0,o.useCallback)((()=>{g(mm),b(jm),m(xm),x(vm.J),S(kb.zF),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.WellesWilderSmoothing,source:mm,periodCount:(0,oi.J)(jm),shift:(0,oi.J)(xm),lines:vm.J,periods:kb.zF}))}),[c,m,f]);return(0,i.jsxs)(_b,Object.assign({testId:"welles-wilder-smoothing"},{children:[(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"source"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("Source"),options:kb.yT,value:h,onChange:I},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:p,step:vm.gy.step.toString(),error:C,onChange:L},void 0)}),void 0)]},void 0),(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"shift"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Shift"),value:v,step:vm._V.step.toString(),error:k,onChange:w},void 0)}),void 0),(0,i.jsx)(At.s,{},void 0)]},void 0)]},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:j,onChange:T},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"time-frames",id:zb.TimeFrames,label:(0,O.L)("Time Frames"),align:vr.K.left},{children:(0,i.jsx)(Pv,{periods:y,onChange:D},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:P,onSubmit:N,onReset:A},void 0)},void 0)]}),void 0)}));var Sm=s(61656);const fm=Sm.Fe.default.toString(),Om=(0,o.memo)((()=>{var e,t,s,n;const a=Rb(),r=Hb(),l=(0,Bb.d)(r),[d,c]=(0,o.useState)(null!==(t=null===(e=l.periodCount)||void 0===e?void 0:e.toString())&&void 0!==t?t:fm),[u,h]=(0,o.useState)(null!==(s=l.lines)&&void 0!==s?s:Sm.Sd),[g,p]=(0,o.useState)(null!==(n=l.levels)&&void 0!==n?n:Sm.Eo),b=(0,re.I0)(),v=(0,o.useMemo)((()=>Nb(d,Sm.Fe)),[d]),m=(0,o.useCallback)((e=>{c(e),r&&b(Mb.Q.update({indicatorId:r,type:$b.J.AverageDirectionalMovementIndexRating,periodCount:(0,oi.J)(e)}))}),[r,c,b]),j=(0,o.useCallback)((e=>{h(e),r&&b(Mb.Q.update({indicatorId:r,type:$b.J.AverageDirectionalMovementIndexRating,lines:e}))}),[r,h,b]),x=(0,o.useCallback)((e=>{p(e),r&&b(Mb.Q.update({indicatorId:r,type:$b.J.AverageDirectionalMovementIndexRating,levels:e}))}),[b,p,r]),y=Boolean(v),S=(0,o.useCallback)((()=>{r||b(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:a,type:$b.J.AverageDirectionalMovementIndexRating,periodCount:(0,oi.J)(d),lines:u,levels:g,heightRatio:kb.dl,yStretch:kb.FQ})),b(Cb.d.close())}),[r,b,a,d,u,g]),f=(0,o.useCallback)((()=>{c(fm),h(Sm.Sd),r&&b(Mb.Q.update({indicatorId:r,type:$b.J.AverageDirectionalMovementIndexRating,periodCount:(0,oi.J)(fm),lines:Sm.Sd}))}),[r,b]);return(0,i.jsxs)(_b,Object.assign({testId:"average-directional-movement-index-rating"},{children:[(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({testId:"periods",flexBasis:"50%"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:d,step:Sm.Fe.step.toString(),error:v,onChange:m},void 0)}),void 0),(0,i.jsx)(At.s,{},void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:u,onChange:j},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:g,onChange:x},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:y,onSubmit:S,onReset:f},void 0)},void 0)]}),void 0)}));var Cm=s(49202);const km=Cm.nt.default,Im=Cm.km.default.toString(),Lm=Cm.G0.default.toString(),wm=(0,o.memo)((()=>{var e,t,s,n,a,r,l;const d=Rb(),c=Hb(),u=(0,Bb.d)(c),[h,g]=(0,o.useState)(null!==(e=u.source)&&void 0!==e?e:km),[p,b]=(0,o.useState)(null!==(s=null===(t=u.periodCount)||void 0===t?void 0:t.toString())&&void 0!==s?s:Im),[v,m]=(0,o.useState)(null!==(a=null===(n=u.shift)||void 0===n?void 0:n.toString())&&void 0!==a?a:Lm),[j,x]=(0,o.useState)(null!==(r=u.lines)&&void 0!==r?r:Cm.Rr),[y,S]=(0,o.useState)(null!==(l=u.periods)&&void 0!==l?l:kb.zF),f=(0,re.I0)(),C=(0,o.useMemo)((()=>Nb(p,Cm.km)),[p]),k=(0,o.useMemo)((()=>Nb(v,Cm.G0)),[v]),I=(0,o.useCallback)((e=>{g(e),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.HullMovingAverage,source:e}))}),[c,g,f]),L=(0,o.useCallback)((e=>{b(e),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.HullMovingAverage,periodCount:(0,oi.J)(e)}))}),[c,b,f]),w=(0,o.useCallback)((e=>{m(e),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.HullMovingAverage,shift:(0,oi.J)(e)}))}),[c,m,f]),T=(0,o.useCallback)((e=>{x(e),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.HullMovingAverage,lines:e}))}),[c,x,f]),D=(0,o.useCallback)((e=>{S(e),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.HullMovingAverage,periods:e}))}),[c,S,f]),P=Boolean(C)||Boolean(k),N=(0,o.useCallback)((()=>{c||f(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:d,type:$b.J.HullMovingAverage,source:h,periodCount:(0,oi.J)(p),shift:(0,oi.J)(v),lines:j,periods:y})),f(Cb.d.close())}),[c,f,d,h,p,v,j,y]),A=(0,o.useCallback)((()=>{g(km),b(Im),m(Lm),x(Cm.Rr),S(kb.zF),c&&f(Mb.Q.update({indicatorId:c,type:$b.J.HullMovingAverage,source:km,periodCount:(0,oi.J)(Im),shift:(0,oi.J)(Lm),lines:Cm.Rr,periods:kb.zF}))}),[c,m,f]);return(0,i.jsxs)(_b,Object.assign({testId:"hull-moving-average"},{children:[(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({testId:"source",flexBasis:"50%"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("Source"),options:kb.yT,value:h,onChange:I},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:p,step:Cm.km.step.toString(),error:C,onChange:L},void 0)}),void 0)]},void 0),(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({testId:"shift",flexBasis:"50%"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Shift"),value:v,step:Cm.G0.step.toString(),error:k,onChange:w},void 0)}),void 0),(0,i.jsx)(At.s,{},void 0)]},void 0)]},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:j,onChange:T},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"time-frames",id:zb.TimeFrames,label:(0,O.L)("Time Frames"),align:vr.K.left},{children:(0,i.jsx)(Pv,{periods:y,onChange:D},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:P,onSubmit:N,onReset:A},void 0)},void 0)]}),void 0)}));var Tm=s(44234),Dm=s(66229);const Pm=Tm.nT.default.toString(),Nm=Tm.zU.default.toString(),Am=(0,o.memo)((()=>{var e,t,s,n,a,r;const l=Rb(),d=Hb(),c=(0,Bb.d)(d),[u,h]=(0,o.useState)(null!==(t=null===(e=c.periodCount)||void 0===e?void 0:e.toString())&&void 0!==t?t:Pm),[g,p]=(0,o.useState)(null!==(n=null===(s=c.shift)||void 0===s?void 0:s.toString())&&void 0!==n?n:Nm),[b,v]=(0,o.useState)(null!==(a=c.lines)&&void 0!==a?a:Tm.kl),[m,j]=(0,o.useState)(null!==(r=c.levels)&&void 0!==r?r:Tm.e4),x=(0,re.I0)(),y=(0,o.useMemo)((()=>Nb(u,Tm.nT)),[u]),S=(0,o.useMemo)((()=>Nb(g,Tm.zU)),[g]),f=(0,o.useCallback)((e=>{h(e),d&&x(Mb.Q.update({indicatorId:d,type:Dm.l.CommodityChannelIndex,periodCount:(0,oi.J)(e)}))}),[d,h,x]),C=(0,o.useCallback)((e=>{p(e),d&&x(Mb.Q.update({indicatorId:d,type:Dm.l.CommodityChannelIndex,shift:(0,oi.J)(e)}))}),[d,p,x]),k=(0,o.useCallback)((e=>{v(e),d&&x(Mb.Q.update({indicatorId:d,type:Dm.l.CommodityChannelIndex,lines:e}))}),[d,v,x]),I=(0,o.useCallback)((e=>{j(e),d&&x(Mb.Q.update({indicatorId:d,type:Dm.l.CommodityChannelIndex,levels:e}))}),[x,j,d]),L=Boolean(y),w=(0,o.useCallback)((()=>{d||x(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:l,type:Dm.l.CommodityChannelIndex,periodCount:(0,oi.J)(u),shift:(0,oi.J)(g),lines:b,levels:m,heightRatio:kb.dl,yStretch:kb.FQ})),x(Cb.d.close())}),[d,x,l,g,u,b,m]),T=(0,o.useCallback)((()=>{h(Pm),p(Nm),v(Tm.kl),d&&x(Mb.Q.update({indicatorId:d,type:Dm.l.CommodityChannelIndex,periodCount:(0,oi.J)(Pm),shift:(0,oi.J)(Nm),lines:Tm.kl,levels:Tm.e4}))}),[d,x]);return(0,i.jsxs)(_b,Object.assign({testId:"commodity-channel-index"},{children:[(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:u,step:Tm.nT.step.toString(),error:y,onChange:f},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"shift"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Shift"),value:g,step:Tm.zU.step.toString(),error:S,onChange:C},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:b,onChange:k},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:m,onChange:I},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:L,onSubmit:w,onReset:T},void 0)},void 0)]}),void 0)}));var Bm=s(92706);const Mm=Bm.DV.default.toString(),$m=(0,o.memo)((()=>{var e,t,s,n;const a=Rb(),r=Hb(),l=(0,Bb.d)(r),[d,c]=(0,o.useState)(null!==(t=null===(e=l.alpha)||void 0===e?void 0:e.toString())&&void 0!==t?t:Mm),[u,h]=(0,o.useState)(null!==(s=l.lines)&&void 0!==s?s:Bm.E),[g,p]=(0,o.useState)(null!==(n=l.levels)&&void 0!==n?n:Bm._r),b=(0,re.I0)(),v=(0,o.useMemo)((()=>Nb(d,Bm.DV)),[d]),m=(0,o.useCallback)((e=>{c(e),r&&b(Mb.Q.update({indicatorId:r,type:Dm.l.CyberCycle,alpha:(0,oi.J)(e)}))}),[r,c,b]),j=(0,o.useCallback)((e=>{h(e),r&&b(Mb.Q.update({indicatorId:r,type:Dm.l.CyberCycle,lines:e}))}),[r,h,b]),x=(0,o.useCallback)((e=>{p(e),r&&b(Mb.Q.update({indicatorId:r,type:Dm.l.CyberCycle,levels:e}))}),[b,p,r]),y=Boolean(v),S=(0,o.useCallback)((()=>{r||b(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:a,type:Dm.l.CyberCycle,alpha:(0,oi.J)(d),lines:u,levels:g,heightRatio:kb.dl,yStretch:kb.FQ})),b(Cb.d.close())}),[r,b,a,d,u,g]),f=(0,o.useCallback)((()=>{c(Mm),h(Bm.E),r&&b(Mb.Q.update({indicatorId:r,type:Dm.l.CyberCycle,alpha:(0,oi.J)(Mm),lines:Bm.E}))}),[r,b]);return(0,i.jsxs)(_b,Object.assign({testId:"cyber-cycle"},{children:[(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:d,step:Bm.DV.step.toString(),error:v,onChange:m},void 0)}),void 0),(0,i.jsx)(At.s,{},void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:u,onChange:j},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:g,onChange:x},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:y,onSubmit:S,onReset:f},void 0)},void 0)]}),void 0)}));var Em=s(27560);const Fm=Em._s.default,Rm=Em.hZ.default.toString(),Wm=Em.LI.default,Hm=(0,o.memo)((()=>{var e,t,s,n,a,r;const l=Rb(),d=Hb(),c=(0,Bb.d)(d),[u,h]=(0,o.useState)(null!==(e=c.source)&&void 0!==e?e:Fm),[g,p]=(0,o.useState)(null!==(s=null===(t=c.periodCount)||void 0===t?void 0:t.toString())&&void 0!==s?s:Rm),[b,v]=(0,o.useState)(null!==(n=c.maType)&&void 0!==n?n:Wm),[m,j]=(0,o.useState)(null!==(a=c.lines)&&void 0!==a?a:Em.q4),[x,y]=(0,o.useState)(null!==(r=c.levels)&&void 0!==r?r:Em.B4),S=(0,re.I0)(),f=(0,o.useMemo)((()=>Nb(g,Em.hZ)),[g]),C=(0,o.useCallback)((e=>{h(e),d&&S(Mb.Q.update({indicatorId:d,type:Dm.l.DetrendedPriceOscillator,source:e}))}),[d,h,S]),k=(0,o.useCallback)((e=>{p(e),d&&S(Mb.Q.update({indicatorId:d,type:Dm.l.DetrendedPriceOscillator,periodCount:(0,oi.J)(e)}))}),[d,p,S]),I=(0,o.useCallback)((e=>{v(e),d&&S(Mb.Q.update({indicatorId:d,type:Dm.l.DetrendedPriceOscillator,maType:e}))}),[d,v,S]),L=(0,o.useCallback)((e=>{j(e),d&&S(Mb.Q.update({indicatorId:d,type:Dm.l.DetrendedPriceOscillator,lines:e}))}),[d,j,S]),w=(0,o.useCallback)((e=>{y(e),d&&S(Mb.Q.update({indicatorId:d,type:Dm.l.DetrendedPriceOscillator,levels:e}))}),[S,y,d]),T=Boolean(f),D=(0,o.useCallback)((()=>{d||S(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:l,type:Dm.l.DetrendedPriceOscillator,source:u,periodCount:(0,oi.J)(g),maType:b,lines:m,levels:x,heightRatio:kb.dl,yStretch:kb.FQ})),S(Cb.d.close())}),[d,S,l,g,b,u,m,x]),P=(0,o.useCallback)((()=>{h(Fm),p(Rm),v(Wm),j(Em.q4),d&&S(Mb.Q.update({indicatorId:d,type:Dm.l.DetrendedPriceOscillator,source:Fm,periodCount:(0,oi.J)(Rm),maType:Wm,lines:Em.q4}))}),[d,S]);return(0,i.jsxs)(_b,Object.assign({testId:"detrended-price-oscillator"},{children:[(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"source"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("Source"),options:kb.yT,value:u,onChange:C},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:g,step:Em.hZ.step.toString(),error:f,onChange:k},void 0)}),void 0)]},void 0),(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"ma-type"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("MA Type"),options:kb.T4,value:b,onChange:I},void 0)}),void 0),(0,i.jsx)(At.s,{},void 0)]},void 0)]},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:m,onChange:L},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:x,onChange:w},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:T,onSubmit:D,onReset:P},void 0)},void 0)]}),void 0)}));var zm=s(13379);const Jm=zm.xz.default,Qm=zm.FE.default.toString(),_m=(0,o.memo)((()=>{var e,t,s,n,a;const r=Rb(),l=Hb(),d=(0,Bb.d)(l),[c,u]=(0,o.useState)(null!==(e=d.source)&&void 0!==e?e:Jm),[h,g]=(0,o.useState)(null!==(s=null===(t=d.periodCount)||void 0===t?void 0:t.toString())&&void 0!==s?s:Qm),[p,b]=(0,o.useState)(null!==(n=d.lines)&&void 0!==n?n:zm.Wd),[v,m]=(0,o.useState)(null!==(a=d.levels)&&void 0!==a?a:zm.jq),j=(0,re.I0)(),x=(0,o.useMemo)((()=>Nb(h,zm.FE)),[h]),y=(0,o.useCallback)((e=>{u(e),l&&j(Mb.Q.update({indicatorId:l,type:Dm.l.LinearRegressionRSquared,source:e}))}),[l,u,j]),S=(0,o.useCallback)((e=>{g(e),l&&j(Mb.Q.update({indicatorId:l,type:Dm.l.LinearRegressionRSquared,periodCount:(0,oi.J)(e)}))}),[l,g,j]),f=(0,o.useCallback)((e=>{b(e),l&&j(Mb.Q.update({indicatorId:l,type:Dm.l.LinearRegressionRSquared,lines:e}))}),[l,b,j]),C=(0,o.useCallback)((e=>{m(e),l&&j(Mb.Q.update({indicatorId:l,type:Dm.l.LinearRegressionRSquared,levels:e}))}),[j,m,l]),k=Boolean(x),I=(0,o.useCallback)((()=>{l||j(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:r,type:Dm.l.LinearRegressionRSquared,source:c,periodCount:(0,oi.J)(h),lines:p,levels:v,heightRatio:kb.dl,yStretch:kb.FQ})),j(Cb.d.close())}),[l,j,r,c,h,p,v]),L=(0,o.useCallback)((()=>{u(Jm),g(Qm),b(zm.Wd),l&&j(Mb.Q.update({indicatorId:l,type:Dm.l.LinearRegressionRSquared,source:Jm,periodCount:(0,oi.J)(Qm),lines:zm.Wd}))}),[l,j]);return(0,i.jsxs)(_b,Object.assign({testId:"linear-regression-rsquared"},{children:[(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"source"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("Source"),options:kb.yT,value:c,onChange:y},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:h,step:zm.FE.step.toString(),error:x,onChange:S},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:p,onChange:f},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:v,onChange:C},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:k,onSubmit:I,onReset:L},void 0)},void 0)]}),void 0)}));var qm=s(88012);const Xm=qm.s.default,Vm=qm.bk.default.toString(),Zm=(0,o.memo)((()=>{var e,t,s,n,a;const r=Rb(),l=Hb(),d=(0,Bb.d)(l),[c,u]=(0,o.useState)(null!==(e=d.source)&&void 0!==e?e:Xm),[h,g]=(0,o.useState)(null!==(s=null===(t=d.periodCount)||void 0===t?void 0:t.toString())&&void 0!==s?s:Vm),[p,b]=(0,o.useState)(null!==(n=d.lines)&&void 0!==n?n:qm.PE),[v,m]=(0,o.useState)(null!==(a=d.levels)&&void 0!==a?a:qm.jv),j=(0,re.I0)(),x=(0,o.useMemo)((()=>Nb(h,qm.bk)),[h]),y=(0,o.useCallback)((e=>{u(e),l&&j(Mb.Q.update({indicatorId:l,type:Dm.l.LinearRegressionSlope,source:e}))}),[l,u,j]),S=(0,o.useCallback)((e=>{g(e),l&&j(Mb.Q.update({indicatorId:l,type:Dm.l.LinearRegressionSlope,periodCount:(0,oi.J)(e)}))}),[l,g,j]),f=(0,o.useCallback)((e=>{b(e),l&&j(Mb.Q.update({indicatorId:l,type:Dm.l.LinearRegressionSlope,lines:e}))}),[l,b,j]),C=(0,o.useCallback)((e=>{m(e),l&&j(Mb.Q.update({indicatorId:l,type:Dm.l.LinearRegressionSlope,levels:e}))}),[j,m,l]),k=Boolean(x),I=(0,o.useCallback)((()=>{l||j(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:r,type:Dm.l.LinearRegressionSlope,source:c,periodCount:(0,oi.J)(h),lines:p,levels:v,heightRatio:kb.dl,yStretch:kb.FQ})),j(Cb.d.close())}),[l,j,r,c,h,p,v]),L=(0,o.useCallback)((()=>{u(Xm),g(Vm),b(qm.PE),l&&j(Mb.Q.update({indicatorId:l,type:Dm.l.LinearRegressionSlope,source:Xm,periodCount:(0,oi.J)(Vm),lines:qm.PE}))}),[l,j]);return(0,i.jsxs)(_b,Object.assign({testId:"linear-regression-slope"},{children:[(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"source"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("Source"),options:kb.yT,value:c,onChange:y},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:h,step:qm.bk.step.toString(),error:x,onChange:S},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:p,onChange:f},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:v,onChange:C},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:k,onSubmit:I,onReset:L},void 0)},void 0)]}),void 0)}));var Um=s(51822);const Km=Um.bC.default.toString(),Ym=Um.Eo.default.toString(),Gm=Um.BA.default.toString(),ej=Um.SW.default.toString(),tj=(0,o.memo)((()=>{var e,t,s,n,a,r,l,d,c,u;const h=Rb(),g=Hb(),p=(0,Bb.d)(g),[b,v]=(0,o.useState)(null!==(t=null===(e=p.longCycle)||void 0===e?void 0:e.toString())&&void 0!==t?t:Km),[m,j]=(0,o.useState)(null!==(n=null===(s=p.shortCycle)||void 0===s?void 0:s.toString())&&void 0!==n?n:Ym),[x,y]=(0,o.useState)(null!==(r=null===(a=p.periodCount)||void 0===a?void 0:a.toString())&&void 0!==r?r:Gm),[S,f]=(0,o.useState)(null!==(d=null===(l=p.shift)||void 0===l?void 0:l.toString())&&void 0!==d?d:ej),[C,k]=(0,o.useState)(null!==(c=p.lines)&&void 0!==c?c:Um.K9),[I,L]=(0,o.useState)(null!==(u=p.levels)&&void 0!==u?u:Um.DI),w=(0,re.I0)(),T=(0,o.useMemo)((()=>Nb(b,Um.bC)),[b]),D=(0,o.useMemo)((()=>Nb(m,Um.Eo)),[m]),P=(0,o.useMemo)((()=>Nb(x,Um.BA)),[x]),N=(0,o.useMemo)((()=>Nb(S,Um.SW)),[S]),A=(0,o.useCallback)((e=>{v(e),g&&w(Mb.Q.update({indicatorId:g,type:Dm.l.MacdCrossover,longCycle:(0,oi.J)(e)}))}),[g,v,w]),B=(0,o.useCallback)((e=>{j(e),g&&w(Mb.Q.update({indicatorId:g,type:Dm.l.MacdCrossover,shortCycle:(0,oi.J)(e)}))}),[g,j,w]),M=(0,o.useCallback)((e=>{y(e),g&&w(Mb.Q.update({indicatorId:g,type:Dm.l.MacdCrossover,periodCount:(0,oi.J)(e)}))}),[g,y,w]),$=(0,o.useCallback)((e=>{f(e),g&&w(Mb.Q.update({indicatorId:g,type:Dm.l.MacdCrossover,shift:(0,oi.J)(e)}))}),[g,f,w]),E=(0,o.useCallback)((e=>{k(e),g&&w(Mb.Q.update({indicatorId:g,type:Dm.l.MacdCrossover,lines:e}))}),[g,k,w]),F=(0,o.useCallback)((e=>{L(e),g&&w(Mb.Q.update({indicatorId:g,type:Dm.l.MacdCrossover,levels:e}))}),[w,L,g]),R=Boolean(T)||Boolean(D)||Boolean(P)||Boolean(N),W=(0,o.useCallback)((()=>{g||w(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:h,type:Dm.l.MacdCrossover,longCycle:(0,oi.J)(b),shortCycle:(0,oi.J)(m),periodCount:(0,oi.J)(x),shift:(0,oi.J)(S),lines:C,levels:I,heightRatio:kb.dl,yStretch:kb.FQ})),w(Cb.d.close())}),[g,w,h,b,x,m,S,C,I]),H=(0,o.useCallback)((()=>{v(Km),j(Ym),y(Gm),f(ej),k(Um.K9),g&&w(Mb.Q.update({indicatorId:g,type:Dm.l.MacdCrossover,longCycle:(0,oi.J)(Km),shortCycle:(0,oi.J)(Ym),periodCount:(0,oi.J)(Gm),shift:(0,oi.J)(ej),lines:Um.K9}))}),[g,w]);return(0,i.jsxs)(_b,Object.assign({testId:"macd-crossover"},{children:[(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"long-cycle"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Long Cycle"),value:b,step:Um.bC.step.toString(),error:T,onChange:A},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"short-cycle"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Short Cycle"),value:m,step:Um.Eo.step.toString(),error:D,onChange:B},void 0)}),void 0)]},void 0),(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"signal-periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Signal Periods"),value:x,step:Um.BA.step.toString(),error:P,onChange:M},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"shift"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Shift"),value:S,step:Um.SW.step.toString(),error:N,onChange:$},void 0)}),void 0)]},void 0)]},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:C,onChange:E},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:I,onChange:F},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:R,onSubmit:W,onReset:H},void 0)},void 0)]}),void 0)}));var sj=s(33002);const ij=sj.Lz.default.toString(),oj=sj.uv.default.toString(),nj=sj.s.default.toString(),aj=sj.r2.default.toString(),rj=(0,o.memo)((()=>{var e,t,s,n,a,r,l,d,c,u;const h=Rb(),g=Hb(),p=(0,Bb.d)(g),[b,v]=(0,o.useState)(null!==(t=null===(e=p.longCycle)||void 0===e?void 0:e.toString())&&void 0!==t?t:ij),[m,j]=(0,o.useState)(null!==(n=null===(s=p.shortCycle)||void 0===s?void 0:s.toString())&&void 0!==n?n:oj),[x,y]=(0,o.useState)(null!==(r=null===(a=p.periodCount)||void 0===a?void 0:a.toString())&&void 0!==r?r:nj),[S,f]=(0,o.useState)(null!==(d=null===(l=p.shift)||void 0===l?void 0:l.toString())&&void 0!==d?d:aj),[C,k]=(0,o.useState)(null!==(c=p.lines)&&void 0!==c?c:sj.VI),[I,L]=(0,o.useState)(null!==(u=p.levels)&&void 0!==u?u:sj.mv),w=(0,re.I0)(),T=(0,o.useMemo)((()=>Nb(b,sj.Lz)),[b]),D=(0,o.useMemo)((()=>Nb(m,sj.uv)),[m]),P=(0,o.useMemo)((()=>Nb(x,sj.s)),[x]),N=(0,o.useMemo)((()=>Nb(S,sj.r2)),[S]),A=(0,o.useCallback)((e=>{v(e),g&&w(Mb.Q.update({indicatorId:g,type:Dm.l.MacdHistogram,longCycle:(0,oi.J)(e)}))}),[g,v,w]),B=(0,o.useCallback)((e=>{j(e),g&&w(Mb.Q.update({indicatorId:g,type:Dm.l.MacdHistogram,shortCycle:(0,oi.J)(e)}))}),[g,j,w]),M=(0,o.useCallback)((e=>{y(e),g&&w(Mb.Q.update({indicatorId:g,type:Dm.l.MacdHistogram,periodCount:(0,oi.J)(e)}))}),[g,y,w]),$=(0,o.useCallback)((e=>{f(e),g&&w(Mb.Q.update({indicatorId:g,type:Dm.l.MacdHistogram,shift:(0,oi.J)(e)}))}),[g,f,w]),E=(0,o.useCallback)((e=>{k(e),g&&w(Mb.Q.update({indicatorId:g,type:Dm.l.MacdHistogram,lines:e}))}),[g,k,w]),F=(0,o.useCallback)((e=>{L(e),g&&w(Mb.Q.update({indicatorId:g,type:Dm.l.MacdHistogram,levels:e}))}),[w,L,g]),R=Boolean(T)||Boolean(D)||Boolean(P)||Boolean(N),W=(0,o.useCallback)((()=>{g||w(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:h,type:Dm.l.MacdHistogram,longCycle:(0,oi.J)(b),shortCycle:(0,oi.J)(m),periodCount:(0,oi.J)(x),shift:(0,oi.J)(S),lines:C,levels:I,heightRatio:kb.dl,yStretch:kb.FQ})),w(Cb.d.close())}),[g,w,h,b,x,m,S,C,I]),H=(0,o.useCallback)((()=>{v(ij),j(oj),y(nj),f(aj),k(sj.VI),g&&w(Mb.Q.update({indicatorId:g,type:Dm.l.MacdHistogram,longCycle:(0,oi.J)(ij),shortCycle:(0,oi.J)(oj),periodCount:(0,oi.J)(nj),shift:(0,oi.J)(aj),lines:sj.VI}))}),[g,w]);return(0,i.jsxs)(_b,Object.assign({testId:"macd-histogram"},{children:[(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"long-cycle"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Long Cycle"),value:b,step:sj.Lz.step.toString(),error:T,onChange:A},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"short-cycle"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Short Cycle"),value:m,step:sj.uv.step.toString(),error:D,onChange:B},void 0)}),void 0)]},void 0),(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"signal-periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Signal Periods"),value:x,step:sj.s.step.toString(),error:P,onChange:M},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"shift"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Shift"),value:S,step:sj.r2.step.toString(),error:N,onChange:$},void 0)}),void 0)]},void 0)]},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:C,onChange:E},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:I,onChange:F},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:R,onSubmit:W,onReset:H},void 0)},void 0)]}),void 0)}));var lj=s(4496);const dj=lj.nu.default.toString(),cj=(0,o.memo)((()=>{var e,t,s,n;const a=Rb(),r=Hb(),l=(0,Bb.d)(r),[d,c]=(0,o.useState)(null!==(t=null===(e=l.periodCount)||void 0===e?void 0:e.toString())&&void 0!==t?t:dj),[u,h]=(0,o.useState)(null!==(s=l.lines)&&void 0!==s?s:lj.FE),[g,p]=(0,o.useState)(null!==(n=l.levels)&&void 0!==n?n:lj.oc),b=(0,re.I0)(),v=(0,o.useMemo)((()=>Nb(d,lj.nu)),[d]),m=(0,o.useCallback)((e=>{c(e),r&&b(Mb.Q.update({indicatorId:r,type:Dm.l.MassIndex,periodCount:(0,oi.J)(e)}))}),[r,c,b]),j=(0,o.useCallback)((e=>{h(e),r&&b(Mb.Q.update({indicatorId:r,type:Dm.l.MassIndex,lines:e}))}),[r,h,b]),x=(0,o.useCallback)((e=>{p(e),r&&b(Mb.Q.update({indicatorId:r,type:Dm.l.MassIndex,levels:e}))}),[b,p,r]),y=Boolean(v),S=(0,o.useCallback)((()=>{r||b(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:a,type:Dm.l.MassIndex,periodCount:(0,oi.J)(d),lines:u,levels:g,heightRatio:kb.dl,yStretch:kb.FQ})),b(Cb.d.close())}),[r,b,a,d,u,g]),f=(0,o.useCallback)((()=>{c(dj),h(lj.FE),r&&b(Mb.Q.update({indicatorId:r,type:Dm.l.MassIndex,periodCount:(0,oi.J)(dj),lines:lj.FE,levels:lj.oc}))}),[r,b]);return(0,i.jsxs)(_b,Object.assign({testId:"mass-index"},{children:[(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:d,step:lj.nu.step.toString(),error:v,onChange:m},void 0)}),void 0),(0,i.jsx)(At.s,{},void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:u,onChange:j},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:g,onChange:x},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:y,onSubmit:S,onReset:f},void 0)},void 0)]}),void 0)}));var uj=s(15461);const hj=uj.IX.default,gj=uj.rc.default.toString(),pj=(0,o.memo)((()=>{var e,t,s,n,a;const r=Rb(),l=Hb(),d=(0,Bb.d)(l),[c,u]=(0,o.useState)(null!==(e=d.source)&&void 0!==e?e:hj),[h,g]=(0,o.useState)(null!==(s=null===(t=d.periodCount)||void 0===t?void 0:t.toString())&&void 0!==s?s:gj),[p,b]=(0,o.useState)(null!==(n=d.lines)&&void 0!==n?n:uj.p9),[v,m]=(0,o.useState)(null!==(a=d.levels)&&void 0!==a?a:uj.hU),j=(0,re.I0)(),x=(0,o.useMemo)((()=>Nb(h,uj.rc)),[h]),y=(0,o.useCallback)((e=>{u(e),l&&j(Mb.Q.update({indicatorId:l,type:Dm.l.MomentumOscillator,source:e}))}),[l,u,j]),S=(0,o.useCallback)((e=>{g(e),l&&j(Mb.Q.update({indicatorId:l,type:Dm.l.MomentumOscillator,periodCount:(0,oi.J)(e)}))}),[l,g,j]),f=(0,o.useCallback)((e=>{b(e),l&&j(Mb.Q.update({indicatorId:l,type:Dm.l.MomentumOscillator,lines:e}))}),[l,b,j]),C=(0,o.useCallback)((e=>{m(e),l&&j(Mb.Q.update({indicatorId:l,type:Dm.l.MomentumOscillator,levels:e}))}),[j,m,l]),k=Boolean(x),I=(0,o.useCallback)((()=>{l||j(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:r,type:Dm.l.MomentumOscillator,source:c,periodCount:(0,oi.J)(h),lines:p,levels:v,heightRatio:kb.dl,yStretch:kb.FQ})),j(Cb.d.close())}),[l,j,r,c,h,p,v]),L=(0,o.useCallback)((()=>{u(hj),g(gj),b(uj.p9),l&&j(Mb.Q.update({indicatorId:l,type:Dm.l.MomentumOscillator,source:hj,periodCount:(0,oi.J)(gj),lines:uj.p9}))}),[l,j]);return(0,i.jsxs)(_b,Object.assign({testId:"momentum-oscillator"},{children:[(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"source"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("Source"),options:kb.yT,value:c,onChange:y},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:h,step:uj.rc.step.toString(),error:x,onChange:S},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:p,onChange:f},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:v,onChange:C},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:k,onSubmit:I,onReset:L},void 0)},void 0)]}),void 0)}));var bj=s(16710);const vj=bj.v9.default,mj=bj.E9.default.toString(),jj=bj.z4.default.toString(),xj=bj.TV.default,yj=(0,o.memo)((()=>{var e,t,s,n,a,r,l,d;const c=Rb(),u=Hb(),h=(0,Bb.d)(u),[g,p]=(0,o.useState)(null!==(e=h.source)&&void 0!==e?e:vj),[b,v]=(0,o.useState)(null!==(s=null===(t=h.longCycle)||void 0===t?void 0:t.toString())&&void 0!==s?s:mj),[m,j]=(0,o.useState)(null!==(a=null===(n=h.shortCycle)||void 0===n?void 0:n.toString())&&void 0!==a?a:jj),[x,y]=(0,o.useState)(null!==(r=h.maType)&&void 0!==r?r:xj),[S,f]=(0,o.useState)(null!==(l=h.lines)&&void 0!==l?l:bj.D5),[C,k]=(0,o.useState)(null!==(d=null==h?void 0:h.levels)&&void 0!==d?d:bj._9),I=(0,re.I0)(),L=(0,o.useMemo)((()=>Nb(b,bj.E9)),[b]),w=(0,o.useMemo)((()=>Nb(m,bj.z4)),[m]),T=(0,o.useCallback)((e=>{p(e),u&&I(Mb.Q.update({indicatorId:u,type:Dm.l.PriceOscillator,source:e}))}),[u,p,I]),D=(0,o.useCallback)((e=>{v(e),u&&I(Mb.Q.update({indicatorId:u,type:Dm.l.PriceOscillator,longCycle:(0,oi.J)(e)}))}),[u,v,I]),P=(0,o.useCallback)((e=>{j(e),u&&I(Mb.Q.update({indicatorId:u,type:Dm.l.PriceOscillator,shortCycle:(0,oi.J)(e)}))}),[u,j,I]),N=(0,o.useCallback)((e=>{y(e),u&&I(Mb.Q.update({indicatorId:u,type:Dm.l.PriceOscillator,maType:e}))}),[u,y,I]),A=(0,o.useCallback)((e=>{f(e),u&&I(Mb.Q.update({indicatorId:u,type:Dm.l.PriceOscillator,lines:e}))}),[u,f,I]),B=(0,o.useCallback)((e=>{k(e),u&&I(Mb.Q.update({indicatorId:u,type:Dm.l.PriceOscillator,levels:e}))}),[I,k,u]),M=Boolean(L)||Boolean(w),$=(0,o.useCallback)((()=>{u||I(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:c,type:Dm.l.PriceOscillator,source:g,longCycle:(0,oi.J)(b),shortCycle:(0,oi.J)(m),maType:x,lines:S,levels:C,heightRatio:kb.dl,yStretch:kb.FQ})),I(Cb.d.close())}),[u,I,c,b,m,x,g,S,C]),E=(0,o.useCallback)((()=>{p(vj),v(mj),j(jj),y(xj),f(bj.D5),u&&I(Mb.Q.update({indicatorId:u,type:Dm.l.PriceOscillator,source:vj,longCycle:(0,oi.J)(mj),shortCycle:(0,oi.J)(jj),maType:xj,lines:bj.D5}))}),[u,I]);return(0,i.jsxs)(_b,Object.assign({testId:"price-oscillator"},{children:[(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"source"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("Source"),options:kb.yT,value:g,onChange:T},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"long-cycle"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Long Cycle"),value:b,step:bj.E9.step.toString(),error:L,onChange:D},void 0)}),void 0)]},void 0),(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"short-cycle"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Short Cycle"),value:m,step:bj.z4.step.toString(),error:w,onChange:P},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"ma-type"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("MA Type"),options:kb.T4,value:x,onChange:N},void 0)}),void 0)]},void 0)]},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:S,onChange:A},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:C,onChange:B},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:M,onSubmit:$,onReset:E},void 0)},void 0)]}),void 0)}));var Sj=s(55885);const fj=Sj.fY.default,Oj=Sj.HJ.default.toString(),Cj=(0,o.memo)((()=>{var e,t,s,n,a;const r=Rb(),l=Hb(),d=(0,Bb.d)(l),[c,u]=(0,o.useState)(null!==(e=d.source)&&void 0!==e?e:fj),[h,g]=(0,o.useState)(null!==(s=null===(t=d.periodCount)||void 0===t?void 0:t.toString())&&void 0!==s?s:Oj),[p,b]=(0,o.useState)(null!==(n=d.lines)&&void 0!==n?n:Sj.iN),[v,m]=(0,o.useState)(null!==(a=d.levels)&&void 0!==a?a:Sj.Yp),j=(0,re.I0)(),x=(0,o.useMemo)((()=>Nb(h,Sj.HJ)),[h]),y=(0,o.useCallback)((e=>{u(e),l&&j(Mb.Q.update({indicatorId:l,type:Dm.l.PriceRoc,source:e}))}),[l,u,j]),S=(0,o.useCallback)((e=>{g(e),l&&j(Mb.Q.update({indicatorId:l,type:Dm.l.PriceRoc,periodCount:(0,oi.J)(e)}))}),[l,g,j]),f=(0,o.useCallback)((e=>{b(e),l&&j(Mb.Q.update({indicatorId:l,type:Dm.l.PriceRoc,lines:e}))}),[l,b,j]),C=(0,o.useCallback)((e=>{m(e),l&&j(Mb.Q.update({indicatorId:l,type:Dm.l.PriceRoc,levels:e}))}),[j,m,l]),k=Boolean(x),I=(0,o.useCallback)((()=>{l||j(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:r,type:Dm.l.PriceRoc,source:c,periodCount:(0,oi.J)(h),lines:p,levels:v,heightRatio:kb.dl,yStretch:kb.FQ})),j(Cb.d.close())}),[l,j,r,c,h,p,v]),L=(0,o.useCallback)((()=>{u(fj),g(Oj),b(Sj.iN),l&&j(Mb.Q.update({indicatorId:l,type:Dm.l.PriceRoc,source:fj,periodCount:(0,oi.J)(Oj),lines:Sj.iN}))}),[l,j]);return(0,i.jsxs)(_b,Object.assign({testId:"price-roc"},{children:[(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"source"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("Source"),options:kb.yT,value:c,onChange:y},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:h,step:Sj.HJ.step.toString(),error:x,onChange:S},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:p,onChange:f},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:v,onChange:C},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:k,onSubmit:I,onReset:L},void 0)},void 0)]}),void 0)}));var kj=s(82959);const Ij=kj._H.default,Lj=kj.Tx.default.toString(),wj=kj.uM.default,Tj=(0,o.memo)((()=>{var e,t,s,n,a,r;const l=Rb(),d=Hb(),c=(0,Bb.d)(d),[u,h]=(0,o.useState)(null!==(e=c.source)&&void 0!==e?e:Ij),[g,p]=(0,o.useState)(null!==(s=null===(t=c.levelCount)||void 0===t?void 0:t.toString())&&void 0!==s?s:Lj),[b,v]=(0,o.useState)(null!==(n=c.maType)&&void 0!==n?n:wj),[m,j]=(0,o.useState)(null!==(a=c.lines)&&void 0!==a?a:kj.NA),[x,y]=(0,o.useState)(null!==(r=c.levels)&&void 0!==r?r:kj.C4),S=(0,re.I0)(),f=(0,o.useMemo)((()=>Nb(g,kj.Tx)),[g]),C=(0,o.useCallback)((e=>{h(e),d&&S(Mb.Q.update({indicatorId:d,type:Dm.l.RainbowOscillator,source:e}))}),[d,h,S]),k=(0,o.useCallback)((e=>{p(e),d&&S(Mb.Q.update({indicatorId:d,type:Dm.l.RainbowOscillator,levelCount:(0,oi.J)(e)}))}),[d,p,S]),I=(0,o.useCallback)((e=>{v(e),d&&S(Mb.Q.update({indicatorId:d,type:Dm.l.RainbowOscillator,maType:e}))}),[d,v,S]),L=(0,o.useCallback)((e=>{j(e),d&&S(Mb.Q.update({indicatorId:d,type:Dm.l.RainbowOscillator,lines:e}))}),[d,j,S]),w=(0,o.useCallback)((e=>{y(e),d&&S(Mb.Q.update({indicatorId:d,type:Dm.l.RainbowOscillator,levels:e}))}),[S,y,d]),T=Boolean(f),D=(0,o.useCallback)((()=>{d||S(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:l,type:Dm.l.RainbowOscillator,source:u,levelCount:(0,oi.J)(g),maType:b,lines:m,levels:x,heightRatio:kb.dl,yStretch:kb.FQ})),S(Cb.d.close())}),[d,S,l,g,b,u,m,x]),P=(0,o.useCallback)((()=>{h(Ij),p(Lj),v(wj),j(bj.D5),d&&S(Mb.Q.update({indicatorId:d,type:Dm.l.RainbowOscillator,source:Ij,levelCount:(0,oi.J)(Lj),maType:wj,lines:bj.D5}))}),[d,S]);return(0,i.jsxs)(_b,Object.assign({testId:"rainbow-oscillator"},{children:[(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"source"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("Source"),options:kb.yT,value:u,onChange:C},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"levels"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Levels"),value:g,step:kj.Tx.step.toString(),error:f,onChange:k},void 0)}),void 0)]},void 0),(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"ma-type"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("MA Type"),options:kb.T4,value:b,onChange:I},void 0)}),void 0),(0,i.jsx)(At.s,{},void 0)]},void 0)]},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:m,onChange:L},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:x,onChange:w},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:T,onSubmit:D,onReset:P},void 0)},void 0)]}),void 0)}));var Dj=s(71449);const Pj=Dj.l6.default,Nj=Dj.Xi.default.toString(),Aj=(0,o.memo)((()=>{var e,t,s,n,a;const r=Rb(),l=Hb(),d=(0,Bb.d)(l),[c,u]=(0,o.useState)(null!==(e=d.source)&&void 0!==e?e:Pj),[h,g]=(0,o.useState)(null!==(s=null===(t=d.periodCount)||void 0===t?void 0:t.toString())&&void 0!==s?s:Nj),[p,b]=(0,o.useState)(null!==(n=d.lines)&&void 0!==n?n:Dj.Ti),[v,m]=(0,o.useState)(null!==(a=d.levels)&&void 0!==a?a:Dj.sC),j=(0,re.I0)(),x=(0,o.useMemo)((()=>Nb(h,Dj.Xi)),[h]),y=(0,o.useCallback)((e=>{u(e),l&&j(Mb.Q.update({indicatorId:l,type:Dm.l.RelativeStrengthIndex,source:e}))}),[l,u,j]),S=(0,o.useCallback)((e=>{g(e),l&&j(Mb.Q.update({indicatorId:l,type:Dm.l.RelativeStrengthIndex,periodCount:(0,oi.J)(e)}))}),[l,g,j]),f=(0,o.useCallback)((e=>{b(e),l&&j(Mb.Q.update({indicatorId:l,type:Dm.l.RelativeStrengthIndex,lines:e}))}),[l,b,j]),C=(0,o.useCallback)((e=>{m(e),l&&j(Mb.Q.update({indicatorId:l,type:Dm.l.RelativeStrengthIndex,levels:e}))}),[j,m,l]),k=Boolean(x),I=(0,o.useCallback)((()=>{l||j(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:r,type:Dm.l.RelativeStrengthIndex,source:c,periodCount:(0,oi.J)(h),lines:p,levels:v,heightRatio:kb.dl,yStretch:kb.FQ})),j(Cb.d.close())}),[l,j,r,c,h,p,v]),L=(0,o.useCallback)((()=>{u(Pj),g(Nj),b(Dj.Ti),l&&j(Mb.Q.update({indicatorId:l,type:Dm.l.RelativeStrengthIndex,source:Pj,periodCount:(0,oi.J)(Nj),lines:Dj.Ti}))}),[l,j]);return(0,i.jsxs)(_b,Object.assign({testId:"relative-strength-index"},{children:[(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"source"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("Source"),options:kb.yT,value:c,onChange:y},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:h,step:Dj.Xi.step.toString(),error:x,onChange:S},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:p,onChange:f},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:v,onChange:C},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:k,onSubmit:I,onReset:L},void 0)},void 0)]}),void 0)}));var Bj=s(34759);const Mj=Bj.bS.default.toString(),$j=Bj.wk.default.toString(),Ej=Bj.PI.default.toString(),Fj=Bj.e5.default,Rj=(0,o.memo)((()=>{var e,t,s,n,a,r,l,d,c;const u=Rb(),h=Hb(),g=(0,Bb.d)(h),[p,b]=(0,o.useState)(null!==(t=null===(e=g.slowPeriodCount)||void 0===e?void 0:e.toString())&&void 0!==t?t:Mj),[v,m]=(0,o.useState)(null!==(n=null===(s=g.kSlowing)||void 0===s?void 0:s.toString())&&void 0!==n?n:$j),[j,x]=(0,o.useState)(null!==(r=null===(a=g.fastPeriodCount)||void 0===a?void 0:a.toString())&&void 0!==r?r:Ej),[y,S]=(0,o.useState)(null!==(l=g.maType)&&void 0!==l?l:Fj),[f,C]=(0,o.useState)(null!==(d=g.lines)&&void 0!==d?d:Bj.z8),[k,I]=(0,o.useState)(null!==(c=g.levels)&&void 0!==c?c:Bj.vd),L=(0,re.I0)(),w=(0,o.useMemo)((()=>Nb(p,Bj.bS)),[p]),T=(0,o.useMemo)((()=>Nb(v,Bj.wk)),[v]),D=(0,o.useMemo)((()=>Nb(j,Bj.PI)),[j]),P=(0,o.useCallback)((e=>{b(e),h&&L(Mb.Q.update({indicatorId:h,type:Dm.l.StochasticOscillator,slowPeriodCount:(0,oi.J)(e)}))}),[h,b,L]),N=(0,o.useCallback)((e=>{m(e),h&&L(Mb.Q.update({indicatorId:h,type:Dm.l.StochasticOscillator,kSlowing:(0,oi.J)(e)}))}),[h,m,L]),A=(0,o.useCallback)((e=>{x(e),h&&L(Mb.Q.update({indicatorId:h,type:Dm.l.StochasticOscillator,fastPeriodCount:(0,oi.J)(e)}))}),[h,x,L]),B=(0,o.useCallback)((e=>{S(e),h&&L(Mb.Q.update({indicatorId:h,type:Dm.l.StochasticOscillator,maType:e}))}),[h,S,L]),M=(0,o.useCallback)((e=>{C(e),h&&L(Mb.Q.update({indicatorId:h,type:Dm.l.StochasticOscillator,lines:e}))}),[h,C,L]),$=(0,o.useCallback)((e=>{I(e),h&&L(Mb.Q.update({indicatorId:h,type:Dm.l.StochasticOscillator,levels:e}))}),[L,I,h]),E=Boolean(w)||Boolean(T)||Boolean(D),F=(0,o.useCallback)((()=>{h||L(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:u,type:Dm.l.StochasticOscillator,slowPeriodCount:(0,oi.J)(p),kSlowing:(0,oi.J)(v),fastPeriodCount:(0,oi.J)(j),maType:y,lines:f,levels:k,heightRatio:kb.dl,yStretch:kb.FQ})),L(Cb.d.close())}),[h,L,u,p,j,v,y,f,k]),R=(0,o.useCallback)((()=>{b(Mj),m($j),x(Ej),S(Fj),C(Bj.z8),h&&L(Mb.Q.update({indicatorId:h,type:Dm.l.StochasticOscillator,slowPeriodCount:(0,oi.J)(Mj),kSlowing:(0,oi.J)($j),fastPeriodCount:(0,oi.J)(Ej),maType:Fj,lines:Bj.z8}))}),[h,L]);return(0,i.jsxs)(_b,Object.assign({testId:"stochastic-oscillator"},{children:[(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"k-periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("%K Periods"),value:p,step:Bj.bS.step.toString(),error:w,onChange:P},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"k-slowing"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("%K Slowing"),value:v,step:Bj.wk.step.toString(),error:T,onChange:N},void 0)}),void 0)]},void 0),(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"d-periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("%D Periods"),value:j,step:Bj.PI.step.toString(),error:D,onChange:A},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"ma-type"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("MA Type"),options:kb.T4,value:y,onChange:B},void 0)}),void 0)]},void 0)]},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:f,onChange:M},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:k,onChange:$},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:E,onSubmit:F,onReset:R},void 0)},void 0)]}),void 0)}));var Wj=s(71009);const Hj=Wj.Mk.default,zj=Wj.kj.default.toString(),Jj=(0,o.memo)((()=>{var e,t,s,n,a;const r=Rb(),l=Hb(),d=(0,Bb.d)(l),[c,u]=(0,o.useState)(null!==(e=d.source)&&void 0!==e?e:Hj),[h,g]=(0,o.useState)(null!==(s=null===(t=d.periodCount)||void 0===t?void 0:t.toString())&&void 0!==s?s:zj),[p,b]=(0,o.useState)(null!==(n=d.lines)&&void 0!==n?n:Wj.CC),[v,m]=(0,o.useState)(null!==(a=d.levels)&&void 0!==a?a:Wj.a_),j=(0,re.I0)(),x=(0,o.useMemo)((()=>Nb(h,Wj.kj)),[h]),y=(0,o.useCallback)((e=>{u(e),l&&j(Mb.Q.update({indicatorId:l,type:Dm.l.Trix,source:e}))}),[l,u,j]),S=(0,o.useCallback)((e=>{g(e),l&&j(Mb.Q.update({indicatorId:l,type:Dm.l.Trix,periodCount:(0,oi.J)(e)}))}),[l,g,j]),f=(0,o.useCallback)((e=>{b(e),l&&j(Mb.Q.update({indicatorId:l,type:Dm.l.Trix,lines:e}))}),[l,b,j]),C=(0,o.useCallback)((e=>{m(e),l&&j(Mb.Q.update({indicatorId:l,type:Dm.l.Trix,levels:e}))}),[j,m,l]),k=Boolean(x),I=(0,o.useCallback)((()=>{l||j(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:r,type:Dm.l.Trix,source:c,periodCount:(0,oi.J)(h),lines:p,levels:v,heightRatio:kb.dl,yStretch:kb.FQ})),j(Cb.d.close())}),[l,j,r,c,h,p,v]),L=(0,o.useCallback)((()=>{u(Hj),g(zj),b(Wj.CC),l&&j(Mb.Q.update({indicatorId:l,type:Dm.l.Trix,source:Hj,periodCount:(0,oi.J)(zj),lines:Wj.CC}))}),[l,j]);return(0,i.jsxs)(_b,Object.assign({testId:"trix"},{children:[(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"source"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("Source"),options:kb.yT,value:c,onChange:y},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:h,step:Wj.kj.step.toString(),error:x,onChange:S},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:p,onChange:f},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:v,onChange:C},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:k,onSubmit:I,onReset:L},void 0)},void 0)]}),void 0)}));var Qj=s(91504);const _j=Qj.NN.default.toString(),qj=Qj.h1.default.toString(),Xj=Qj.h$.default.toString(),Vj=(0,o.memo)((()=>{var e,t,s,n,a,r,l,d;const c=Rb(),u=Hb(),h=(0,Bb.d)(u),[g,p]=(0,o.useState)(null!==(t=null===(e=h.cycle1)||void 0===e?void 0:e.toString())&&void 0!==t?t:_j),[b,v]=(0,o.useState)(null!==(n=null===(s=h.cycle2)||void 0===s?void 0:s.toString())&&void 0!==n?n:qj),[m,j]=(0,o.useState)(null!==(r=null===(a=h.cycle3)||void 0===a?void 0:a.toString())&&void 0!==r?r:Xj),[x,y]=(0,o.useState)(null!==(l=h.lines)&&void 0!==l?l:Qj.PX),[S,f]=(0,o.useState)(null!==(d=h.levels)&&void 0!==d?d:Qj.Wd),C=(0,re.I0)(),k=(0,o.useMemo)((()=>Nb(g,Qj.NN)),[g]),I=(0,o.useMemo)((()=>Nb(b,Qj.h1)),[b]),L=(0,o.useMemo)((()=>Nb(m,Qj.h$)),[m]),w=(0,o.useCallback)((e=>{p(e),u&&C(Mb.Q.update({indicatorId:u,type:Dm.l.UltimateOscillator,cycle1:(0,oi.J)(e)}))}),[u,p,C]),T=(0,o.useCallback)((e=>{v(e),u&&C(Mb.Q.update({indicatorId:u,type:Dm.l.UltimateOscillator,cycle2:(0,oi.J)(e)}))}),[u,v,C]),D=(0,o.useCallback)((e=>{j(e),u&&C(Mb.Q.update({indicatorId:u,type:Dm.l.UltimateOscillator,cycle3:(0,oi.J)(e)}))}),[u,j,C]),P=(0,o.useCallback)((e=>{y(e),u&&C(Mb.Q.update({indicatorId:u,type:Dm.l.UltimateOscillator,lines:e}))}),[u,y,C]),N=(0,o.useCallback)((e=>{f(e),u&&C(Mb.Q.update({indicatorId:u,type:Dm.l.UltimateOscillator,levels:e}))}),[C,f,u]),A=Boolean(k)||Boolean(I)||Boolean(L),B=(0,o.useCallback)((()=>{u||C(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:c,type:Dm.l.UltimateOscillator,cycle1:(0,oi.J)(g),cycle2:(0,oi.J)(b),cycle3:(0,oi.J)(m),lines:x,levels:S,heightRatio:kb.dl,yStretch:kb.FQ})),C(Cb.d.close())}),[u,C,c,g,b,m,x,S]),M=(0,o.useCallback)((()=>{p(_j),v(qj),j(Xj),y(Qj.PX),u&&C(Mb.Q.update({indicatorId:u,type:Dm.l.UltimateOscillator,cycle1:(0,oi.J)(_j),cycle2:(0,oi.J)(qj),cycle3:(0,oi.J)(Xj),lines:Qj.PX}))}),[u,C]);return(0,i.jsxs)(_b,Object.assign({testId:"ultimate-oscillator"},{children:[(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"cycle-1"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Cycle1"),value:g,step:Qj.NN.step.toString(),error:k,onChange:w},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"cycle-2"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Cycle2"),value:b,step:Qj.h1.step.toString(),error:I,onChange:T},void 0)}),void 0)]},void 0),(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"cycle-3"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Cycle3"),value:m,step:Qj.h$.step.toString(),error:L,onChange:D},void 0)}),void 0),(0,i.jsx)(At.s,{},void 0)]},void 0)]},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:x,onChange:P},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:S,onChange:N},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:A,onSubmit:B,onReset:M},void 0)},void 0)]}),void 0)}));var Zj=s(11942);const Uj=Zj.$Z.default,Kj=Zj.pB.default.toString(),Yj=Zj.Zw.default.toString(),Gj=Zj.Kg.default,ex=(0,o.memo)((()=>{var e,t,s,n,a,r,l,d;const c=Rb(),u=Hb(),h=(0,Bb.d)(u),[g,p]=(0,o.useState)(null!==(e=h.source)&&void 0!==e?e:Uj),[b,v]=(0,o.useState)(null!==(s=null===(t=h.longCycle)||void 0===t?void 0:t.toString())&&void 0!==s?s:Kj),[m,j]=(0,o.useState)(null!==(a=null===(n=h.shortCycle)||void 0===n?void 0:n.toString())&&void 0!==a?a:Yj),[x,y]=(0,o.useState)(null!==(r=h.maType)&&void 0!==r?r:Gj),[S,f]=(0,o.useState)(null!==(l=h.lines)&&void 0!==l?l:Zj.zB),[C,k]=(0,o.useState)(null!==(d=h.levels)&&void 0!==d?d:Zj.Xx),I=(0,re.I0)(),L=(0,o.useMemo)((()=>Nb(b,Zj.pB)),[b]),w=(0,o.useMemo)((()=>Nb(m,Zj.Zw)),[m]),T=(0,o.useCallback)((e=>{p(e),u&&I(Mb.Q.update({indicatorId:u,type:Dm.l.VerticalHorizontalFilter,source:e}))}),[u,p,I]),D=(0,o.useCallback)((e=>{v(e),u&&I(Mb.Q.update({indicatorId:u,type:Dm.l.VerticalHorizontalFilter,longCycle:(0,oi.J)(e)}))}),[u,v,I]),P=(0,o.useCallback)((e=>{j(e),u&&I(Mb.Q.update({indicatorId:u,type:Dm.l.VerticalHorizontalFilter,shortCycle:(0,oi.J)(e)}))}),[u,j,I]),N=(0,o.useCallback)((e=>{y(e),u&&I(Mb.Q.update({indicatorId:u,type:Dm.l.VerticalHorizontalFilter,maType:e}))}),[u,y,I]),A=(0,o.useCallback)((e=>{f(e),u&&I(Mb.Q.update({indicatorId:u,type:Dm.l.VerticalHorizontalFilter,lines:e}))}),[u,f,I]),B=(0,o.useCallback)((e=>{k(e),u&&I(Mb.Q.update({indicatorId:u,type:Dm.l.VerticalHorizontalFilter,levels:e}))}),[I,k,u]),M=Boolean(L)||Boolean(w),$=(0,o.useCallback)((()=>{u||I(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:c,type:Dm.l.VerticalHorizontalFilter,source:g,longCycle:(0,oi.J)(b),shortCycle:(0,oi.J)(m),maType:x,lines:S,levels:C,heightRatio:kb.dl,yStretch:kb.FQ})),I(Cb.d.close())}),[u,I,c,b,m,x,g,S,C]),E=(0,o.useCallback)((()=>{p(Uj),v(Kj),j(Yj),y(Gj),f(Zj.zB),u&&I(Mb.Q.update({indicatorId:u,type:Dm.l.VerticalHorizontalFilter,source:Uj,longCycle:(0,oi.J)(Kj),shortCycle:(0,oi.J)(Yj),maType:Gj,lines:Zj.zB}))}),[u,I]);return(0,i.jsxs)(_b,Object.assign({testId:"vertical-horizontal-filter"},{children:[(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"source"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("Source"),options:kb.yT,value:g,onChange:T},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"long-cycle"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Long Cycle"),value:b,step:Zj.pB.step.toString(),error:L,onChange:D},void 0)}),void 0)]},void 0),(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"short-cycle"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Short Cycle"),value:m,step:Zj.Zw.step.toString(),error:w,onChange:P},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"ma-type"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("MA Type"),options:kb.T4,value:x,onChange:N},void 0)}),void 0)]},void 0)]},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:S,onChange:A},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:C,onChange:B},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:M,onSubmit:$,onReset:E},void 0)},void 0)]}),void 0)}));var tx=s(76197);const sx=tx.gt.default.toString(),ix=(0,o.memo)((()=>{var e,t,s,n;const a=Rb(),r=Hb(),l=(0,Bb.d)(r),[d,c]=(0,o.useState)(null!==(t=null===(e=l.periodCount)||void 0===e?void 0:e.toString())&&void 0!==t?t:sx),[u,h]=(0,o.useState)(null!==(s=l.lines)&&void 0!==s?s:tx.BN),[g,p]=(0,o.useState)(null!==(n=l.levels)&&void 0!==n?n:tx.E9),b=(0,re.I0)(),v=(0,o.useMemo)((()=>Nb(d,tx.gt)),[d]),m=(0,o.useCallback)((e=>{c(e),r&&b(Mb.Q.update({indicatorId:r,type:Dm.l.WilliamsPctR,periodCount:(0,oi.J)(e)}))}),[r,c,b]),j=(0,o.useCallback)((e=>{h(e),r&&b(Mb.Q.update({indicatorId:r,type:Dm.l.WilliamsPctR,lines:e}))}),[r,h,b]),x=(0,o.useCallback)((e=>{p(e),r&&b(Mb.Q.update({indicatorId:r,type:Dm.l.WilliamsPctR,levels:e}))}),[b,p,r]),y=Boolean(v),S=(0,o.useCallback)((()=>{r||b(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:a,type:Dm.l.WilliamsPctR,periodCount:(0,oi.J)(d),lines:u,levels:g,heightRatio:kb.dl,yStretch:kb.FQ})),b(Cb.d.close())}),[r,b,a,d,u,g]),f=(0,o.useCallback)((()=>{c(sx),h(tx.BN),r&&b(Mb.Q.update({indicatorId:r,type:Dm.l.WilliamsPctR,periodCount:(0,oi.J)(sx),lines:tx.BN}))}),[r,b]);return(0,i.jsxs)(_b,Object.assign({testId:"williams-r"},{children:[(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:d,step:tx.gt.step.toString(),error:v,onChange:m},void 0)}),void 0),(0,i.jsx)(At.s,{},void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:u,onChange:j},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:g,onChange:x},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:y,onSubmit:S,onReset:f},void 0)},void 0)]}),void 0)}));var ox=s(73875);const nx=(0,o.memo)((()=>{var e,t;const s=Rb(),n=Hb(),a=(0,Bb.d)(n),[r,l]=(0,o.useState)(null!==(e=a.lines)&&void 0!==e?e:ox.zV),[d,c]=(0,o.useState)(null!==(t=a.levels)&&void 0!==t?t:ox.Ue),u=(0,re.I0)(),h=(0,o.useCallback)((e=>{l(e),n&&u(Mb.Q.update({indicatorId:n,type:Dm.l.AcceleratorOscillator,lines:e}))}),[n,l,u]),g=(0,o.useCallback)((e=>{c(e),n&&u(Mb.Q.update({indicatorId:n,type:Dm.l.AcceleratorOscillator,levels:e}))}),[u,c,n]),p=(0,o.useCallback)((()=>{n||u(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:s,type:Dm.l.AcceleratorOscillator,lines:r,levels:d,heightRatio:kb.dl,yStretch:kb.FQ})),u(Cb.d.close())}),[n,u,s,r,d]),b=(0,o.useCallback)((()=>{l(ox.zV),n&&u(Mb.Q.update({indicatorId:n,type:Dm.l.AcceleratorOscillator,lines:ox.zV}))}),[n,u]);return(0,i.jsxs)(_b,Object.assign({testId:"accelerator-oscillator"},{children:[(0,i.jsx)(i.Fragment,{},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:r,onChange:h},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:d,onChange:g},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:!1,onSubmit:p,onReset:b},void 0)},void 0)]}),void 0)}));var ax=s(40593);const rx=(0,o.memo)((()=>{var e,t;const s=Rb(),n=Hb(),a=(0,Bb.d)(n),[r,l]=(0,o.useState)(null!==(e=a.lines)&&void 0!==e?e:ax.C7),[d,c]=(0,o.useState)(null!==(t=a.levels)&&void 0!==t?t:ax.fK),u=(0,re.I0)(),h=(0,o.useCallback)((e=>{l(e),n&&u(Mb.Q.update({indicatorId:n,type:Dm.l.AwesomeOscillator,lines:e}))}),[n,l,u]),g=(0,o.useCallback)((e=>{c(e),n&&u(Mb.Q.update({indicatorId:n,type:Dm.l.AwesomeOscillator,levels:e}))}),[u,c,n]),p=(0,o.useCallback)((()=>{n||u(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:s,type:Dm.l.AwesomeOscillator,lines:r,levels:d,heightRatio:kb.dl,yStretch:kb.FQ})),u(Cb.d.close())}),[n,u,s,r,d]),b=(0,o.useCallback)((()=>{l(ax.C7),n&&u(Mb.Q.update({indicatorId:n,type:Dm.l.AwesomeOscillator,lines:ax.C7}))}),[n,u]);return(0,i.jsxs)(_b,Object.assign({testId:"awesome-oscillator"},{children:[(0,i.jsx)(i.Fragment,{},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:r,onChange:h},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:d,onChange:g},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:!1,onSubmit:p,onReset:b},void 0)},void 0)]}),void 0)}));var lx=s(16428),dx=s(20181);const cx=lx.D2.default.toString(),ux=(0,o.memo)((()=>{var e,t,s,n;const a=Rb(),r=Hb(),l=(0,Bb.d)(r),[d,c]=(0,o.useState)(null!==(t=null===(e=l.periodCount)||void 0===e?void 0:e.toString())&&void 0!==t?t:cx),[u,h]=(0,o.useState)(null!==(s=l.lines)&&void 0!==s?s:lx.gk),[g,p]=(0,o.useState)(null!==(n=l.levels)&&void 0!==n?n:lx.UP),b=(0,re.I0)(),v=(0,o.useMemo)((()=>Nb(d,lx.D2)),[d]),m=(0,o.useCallback)((e=>{c(e),r&&b(Mb.Q.update({indicatorId:r,type:dx.B.AverageTrueRange,periodCount:(0,oi.J)(e)}))}),[r,c,b]),j=(0,o.useCallback)((e=>{h(e),r&&b(Mb.Q.update({indicatorId:r,type:dx.B.AverageTrueRange,lines:e}))}),[r,h,b]),x=(0,o.useCallback)((e=>{p(e),r&&b(Mb.Q.update({indicatorId:r,type:dx.B.AverageTrueRange,levels:e}))}),[b,p,r]),y=Boolean(v),S=(0,o.useCallback)((()=>{r||b(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:a,type:dx.B.AverageTrueRange,periodCount:(0,oi.J)(d),lines:u,levels:g,heightRatio:kb.dl,yStretch:kb.FQ})),b(Cb.d.close())}),[r,b,a,d,u,g]),f=(0,o.useCallback)((()=>{c(cx),h(lx.gk),r&&b(Mb.Q.update({indicatorId:r,type:dx.B.AverageTrueRange,periodCount:(0,oi.J)(cx),lines:lx.gk}))}),[r,b]);return(0,i.jsxs)(_b,Object.assign({testId:"average-true-range"},{children:[(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:d,step:lx.D2.step.toString(),error:v,onChange:m},void 0)}),void 0),(0,i.jsx)(At.s,{},void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:u,onChange:j},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:g,onChange:x},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:y,onSubmit:S,onReset:f},void 0)},void 0)]}),void 0)}));var hx=s(72830);const gx=hx.pS.default,px=hx.rK.default.toString(),bx=hx.Wf.default.toString(),vx=hx._N.default.toString(),mx=(0,o.memo)((()=>{var e,t,s,n,a,r,l,d,c;const u=Rb(),h=Hb(),g=(0,Bb.d)(h),[p,b]=(0,o.useState)(null!==(e=g.source)&&void 0!==e?e:gx),[v,m]=(0,o.useState)(null!==(s=null===(t=g.periodCount)||void 0===t?void 0:t.toString())&&void 0!==s?s:px),[j,x]=(0,o.useState)(null!==(a=null===(n=g.deviation)||void 0===n?void 0:n.toString())&&void 0!==a?a:bx),[y,S]=(0,o.useState)(null!==(l=null===(r=g.shift)||void 0===r?void 0:r.toString())&&void 0!==l?l:vx),[f,C]=(0,o.useState)(null!==(d=g.lines)&&void 0!==d?d:hx.zn),[k,I]=(0,o.useState)(null!==(c=g.periods)&&void 0!==c?c:kb.zF),L=(0,re.I0)(),w=(0,o.useMemo)((()=>Nb(v,hx.rK)),[v]),T=(0,o.useMemo)((()=>Nb(j,hx.Wf)),[j]),D=(0,o.useMemo)((()=>Nb(y,hx._N)),[y]),P=(0,o.useCallback)((e=>{b(e),h&&L(Mb.Q.update({indicatorId:h,type:dx.B.BollingerBands,source:e}))}),[h,b,L]),N=(0,o.useCallback)((e=>{m(e),h&&L(Mb.Q.update({indicatorId:h,type:dx.B.BollingerBands,periodCount:(0,oi.J)(e)}))}),[h,m,L]),A=(0,o.useCallback)((e=>{x(e),h&&L(Mb.Q.update({indicatorId:h,type:dx.B.BollingerBands,deviation:(0,oi.J)(e)}))}),[h,x,L]),B=(0,o.useCallback)((e=>{S(e),h&&L(Mb.Q.update({indicatorId:h,type:dx.B.BollingerBands,shift:(0,oi.J)(e)}))}),[h,S,L]),M=(0,o.useCallback)((e=>{C(e),h&&L(Mb.Q.update({indicatorId:h,type:dx.B.BollingerBands,lines:e}))}),[h,C,L]),$=(0,o.useCallback)((e=>{I(e),h&&L(Mb.Q.update({indicatorId:h,type:dx.B.BollingerBands,periods:e}))}),[h,I,L]),E=Boolean(w)||Boolean(T)||Boolean(D),F=(0,o.useCallback)((()=>{h||L(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:u,type:dx.B.BollingerBands,source:p,periodCount:(0,oi.J)(v),deviation:(0,oi.J)(j),shift:(0,oi.J)(y),lines:f,periods:k})),L(Cb.d.close())}),[h,L,u,p,v,j,y,f,k]),R=(0,o.useCallback)((()=>{b(gx),m(px),x(bx),S(vx),C(hx.zn),I(kb.zF),h&&L(Mb.Q.update({indicatorId:h,type:dx.B.BollingerBands,source:gx,periodCount:(0,oi.J)(px),deviation:(0,oi.J)(bx),shift:(0,oi.J)(vx),lines:hx.zn,periods:kb.zF}))}),[h,S,L]);return(0,i.jsxs)(_b,Object.assign({testId:"bollinger-bands"},{children:[(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"source"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("Source"),options:kb.yT,value:p,onChange:P},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:v,step:hx.rK.step.toString(),error:w,onChange:N},void 0)}),void 0)]},void 0),(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"standard-dev"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Standard Dev"),value:j,step:hx.Wf.step.toString(),error:T,onChange:A},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"shift"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Shift"),value:y,step:hx._N.step.toString(),error:D,onChange:B},void 0)}),void 0)]},void 0)]},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:f,onChange:M},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"time-frames",id:zb.TimeFrames,label:(0,O.L)("Time Frames"),align:vr.K.left},{children:(0,i.jsx)(Pv,{periods:k,onChange:$},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:E,onSubmit:F,onReset:R},void 0)},void 0)]}),void 0)}));var jx=s(42550);const xx=jx.uF.default.toString(),yx=jx.dz.default,Sx=jx.yV.default.toString(),fx=(0,o.memo)((()=>{var e,t,s,n,a,r,l,d;const c=Rb(),u=Hb(),h=(0,Bb.d)(u),[g,p]=(0,o.useState)(null!==(t=null===(e=h.periodCount)||void 0===e?void 0:e.toString())&&void 0!==t?t:xx),[b,v]=(0,o.useState)(null!==(n=null===(s=h.maType)||void 0===s?void 0:s.toString())&&void 0!==n?n:yx),[m,j]=(0,o.useState)(null!==(r=null===(a=h.rate)||void 0===a?void 0:a.toString())&&void 0!==r?r:Sx),[x,y]=(0,o.useState)(null!==(l=h.lines)&&void 0!==l?l:jx.zz),[S,f]=(0,o.useState)(null!==(d=h.levels)&&void 0!==d?d:jx.k4),C=(0,re.I0)(),k=(0,o.useMemo)((()=>Nb(g,jx.uF)),[g]),I=(0,o.useMemo)((()=>Nb(m,jx.yV)),[m]),L=(0,o.useCallback)((e=>{p(e),u&&C(Mb.Q.update({indicatorId:u,type:dx.B.ChaikinVolatility,periodCount:(0,oi.J)(e)}))}),[u,p,C]),w=(0,o.useCallback)((e=>{v(e),u&&C(Mb.Q.update({indicatorId:u,type:dx.B.ChaikinVolatility,maType:e}))}),[u,v,C]),T=(0,o.useCallback)((e=>{j(e),u&&C(Mb.Q.update({indicatorId:u,type:dx.B.ChaikinVolatility,rate:(0,oi.J)(e)}))}),[u,j,C]),D=(0,o.useCallback)((e=>{y(e),u&&C(Mb.Q.update({indicatorId:u,type:dx.B.ChaikinVolatility,lines:e}))}),[u,y,C]),P=(0,o.useCallback)((e=>{f(e),u&&C(Mb.Q.update({indicatorId:u,type:dx.B.ChaikinVolatility,levels:e}))}),[C,f,u]),N=Boolean(k),A=(0,o.useCallback)((()=>{u||C(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:c,type:dx.B.ChaikinVolatility,periodCount:(0,oi.J)(g),maType:b,rate:(0,oi.J)(m),lines:x,levels:S,heightRatio:kb.dl,yStretch:kb.FQ})),C(Cb.d.close())}),[u,C,c,m,b,g,x,S]),B=(0,o.useCallback)((()=>{p(xx),v(yx),j(Sx),y(jx.zz),u&&C(Mb.Q.update({indicatorId:u,type:dx.B.ChaikinVolatility,periodCount:(0,oi.J)(xx),maType:yx,rate:(0,oi.J)(Sx),lines:jx.zz}))}),[u,C]);return(0,i.jsxs)(_b,Object.assign({testId:"chaikin-volatility"},{children:[(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:g,step:jx.uF.step.toString(),error:k,onChange:L},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"ma-type"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("MA Type"),options:kb.T4,value:b,onChange:w},void 0)}),void 0)]},void 0),(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"rate-change"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Rate of Change"),value:m,step:jx.yV.step.toString(),error:I,onChange:T},void 0)}),void 0),(0,i.jsx)(At.s,{},void 0)]},void 0)]},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:x,onChange:D},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:S,onChange:P},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:N,onSubmit:A,onReset:B},void 0)},void 0)]}),void 0)}));var Ox=s(84353);const Cx=Ox.jf.default.toString(),kx=Ox.Gb.default.toString(),Ix=(0,o.memo)((()=>{var e,t,s,n,a,r;const l=Rb(),d=Hb(),c=(0,Bb.d)(d),[u,h]=(0,o.useState)(null!==(t=null===(e=c.periodCount)||void 0===e?void 0:e.toString())&&void 0!==t?t:Cx),[g,p]=(0,o.useState)(null!==(n=null===(s=c.shift)||void 0===s?void 0:s.toString())&&void 0!==n?n:kx),[b,v]=(0,o.useState)(null!==(a=c.lines)&&void 0!==a?a:Ox.qx),[m,j]=(0,o.useState)(null!==(r=c.periods)&&void 0!==r?r:kb.zF),x=(0,re.I0)(),y=(0,o.useMemo)((()=>Nb(u,Ox.jf)),[u]),S=(0,o.useMemo)((()=>Nb(g,Ox.Gb)),[g]),f=(0,o.useCallback)((e=>{h(e),d&&x(Mb.Q.update({indicatorId:d,type:dx.B.DonchianChannel,periodCount:(0,oi.J)(e)}))}),[d,h,x]),C=(0,o.useCallback)((e=>{p(e),d&&x(Mb.Q.update({indicatorId:d,type:dx.B.DonchianChannel,shift:(0,oi.J)(e)}))}),[d,p,x]),k=(0,o.useCallback)((e=>{v(e),d&&x(Mb.Q.update({indicatorId:d,type:dx.B.DonchianChannel,lines:e}))}),[d,v,x]),I=(0,o.useCallback)((e=>{j(e),d&&x(Mb.Q.update({indicatorId:d,type:dx.B.DonchianChannel,periods:e}))}),[d,j,x]),L=Boolean(y)||Boolean(S),w=(0,o.useCallback)((()=>{d||x(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:l,type:dx.B.DonchianChannel,periodCount:(0,oi.J)(u),shift:(0,oi.J)(g),lines:b,periods:m})),x(Cb.d.close())}),[d,x,l,u,g,b,m]),T=(0,o.useCallback)((()=>{h(Cx),p(kx),v(Ox.qx),j(kb.zF),d&&x(Mb.Q.update({indicatorId:d,type:dx.B.DonchianChannel,periodCount:(0,oi.J)(Cx),shift:(0,oi.J)(kx),lines:Ox.qx,periods:kb.zF}))}),[d,p,x]);return(0,i.jsxs)(_b,Object.assign({testId:"donchian-channel"},{children:[(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:u,step:Ox.jf.step.toString(),error:y,onChange:f},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"shift"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Shift"),value:g,step:Ox.Gb.step.toString(),error:S,onChange:C},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:b,onChange:k},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"time-frames",id:zb.TimeFrames,label:(0,O.L)("Time Frames"),align:vr.K.left},{children:(0,i.jsx)(Pv,{periods:m,onChange:I},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:L,onSubmit:w,onReset:T},void 0)},void 0)]}),void 0)}));var Lx=s(72957);const wx=Lx.Y2.default.toString(),Tx=(0,o.memo)((()=>{var e,t,s,n;const a=Rb(),r=Hb(),l=(0,Bb.d)(r),[d,c]=(0,o.useState)(null!==(t=null===(e=l.shift)||void 0===e?void 0:e.toString())&&void 0!==t?t:wx),[u,h]=(0,o.useState)(null!==(s=l.lines)&&void 0!==s?s:Lx.NR),[g,p]=(0,o.useState)(null!==(n=l.periods)&&void 0!==n?n:kb.zF),b=(0,re.I0)(),v=(0,o.useMemo)((()=>Nb(d,Lx.Y2)),[d]),m=(0,o.useCallback)((e=>{c(e),r&&b(Mb.Q.update({indicatorId:r,type:dx.B.FractalChaosBands,shift:(0,oi.J)(e)}))}),[r,c,b]),j=(0,o.useCallback)((e=>{h(e),r&&b(Mb.Q.update({indicatorId:r,type:dx.B.FractalChaosBands,lines:e}))}),[r,h,b]),x=(0,o.useCallback)((e=>{p(e),r&&b(Mb.Q.update({indicatorId:r,type:dx.B.FractalChaosBands,periods:e}))}),[r,p,b]),y=Boolean(v),S=(0,o.useCallback)((()=>{r||b(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:a,type:dx.B.FractalChaosBands,shift:(0,oi.J)(d),lines:u,periods:g})),b(Cb.d.close())}),[r,b,a,d,u,g]),f=(0,o.useCallback)((()=>{c(wx),h(Lx.NR),p(kb.zF),r&&b(Mb.Q.update({indicatorId:r,type:dx.B.FractalChaosBands,shift:(0,oi.J)(wx),lines:Lx.NR,periods:kb.zF}))}),[r,c,b]);return(0,i.jsxs)(_b,Object.assign({testId:"fractal-chaos-bands"},{children:[(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"shift"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Shift"),value:d,step:Lx.Y2.step.toString(),error:v,onChange:m},void 0)}),void 0),(0,i.jsx)(At.s,{},void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:u,onChange:j},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"time-frames",id:zb.TimeFrames,label:(0,O.L)("Time Frames"),align:vr.K.left},{children:(0,i.jsx)(Pv,{periods:g,onChange:x},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:y,onSubmit:S,onReset:f},void 0)},void 0)]}),void 0)}));var Dx=s(37329);const Px=Dx.x5.default,Nx=Dx.sr.default.toString(),Ax=Dx.lJ.default.toString(),Bx=Dx.f_.default.toString(),Mx=(0,o.memo)((()=>{var e,t,s,n,a,r,l,d,c;const u=Rb(),h=Hb(),g=(0,Bb.d)(h),[p,b]=(0,o.useState)(null!==(e=g.source)&&void 0!==e?e:Px),[v,m]=(0,o.useState)(null!==(s=null===(t=g.periodCount)||void 0===t?void 0:t.toString())&&void 0!==s?s:Nx),[j,x]=(0,o.useState)(null!==(a=null===(n=g.barHistory)||void 0===n?void 0:n.toString())&&void 0!==a?a:Ax),[y,S]=(0,o.useState)(null!==(l=null===(r=g.deviation)||void 0===r?void 0:r.toString())&&void 0!==l?l:Bx),[f,C]=(0,o.useState)(null!==(d=g.lines)&&void 0!==d?d:Dx.Y1),[k,I]=(0,o.useState)(null!==(c=g.levels)&&void 0!==c?c:Dx.nB),L=(0,re.I0)(),w=(0,o.useMemo)((()=>Nb(v,Dx.sr)),[v]),T=(0,o.useMemo)((()=>Nb(j,Dx.lJ)),[j]),D=(0,o.useMemo)((()=>Nb(y,Dx.f_)),[y]),P=(0,o.useCallback)((e=>{b(e),h&&L(Mb.Q.update({indicatorId:h,type:dx.B.HistoricalVolatility,source:e}))}),[h,b,L]),N=(0,o.useCallback)((e=>{m(e),h&&L(Mb.Q.update({indicatorId:h,type:dx.B.HistoricalVolatility,periodCount:(0,oi.J)(e)}))}),[h,m,L]),A=(0,o.useCallback)((e=>{x(e),h&&L(Mb.Q.update({indicatorId:h,type:dx.B.HistoricalVolatility,barHistory:(0,oi.J)(e)}))}),[h,x,L]),B=(0,o.useCallback)((e=>{S(e),h&&L(Mb.Q.update({indicatorId:h,type:dx.B.HistoricalVolatility,deviation:(0,oi.J)(e)}))}),[h,S,L]),M=(0,o.useCallback)((e=>{C(e),h&&L(Mb.Q.update({indicatorId:h,type:dx.B.HistoricalVolatility,lines:e}))}),[h,C,L]),$=(0,o.useCallback)((e=>{I(e),h&&L(Mb.Q.update({indicatorId:h,type:dx.B.HistoricalVolatility,levels:e}))}),[L,I,h]),E=Boolean(w),F=(0,o.useCallback)((()=>{h||L(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:u,type:dx.B.HistoricalVolatility,source:p,periodCount:(0,oi.J)(v),barHistory:(0,oi.J)(j),deviation:(0,oi.J)(y),lines:f,levels:k,heightRatio:kb.dl,yStretch:kb.FQ})),L(Cb.d.close())}),[h,L,u,p,v,j,y,f,k]),R=(0,o.useCallback)((()=>{b(Px),m(Nx),x(Ax),S(Bx),C(Dx.Y1),h&&L(Mb.Q.update({indicatorId:h,type:dx.B.HistoricalVolatility,source:Px,periodCount:(0,oi.J)(Nx),barHistory:(0,oi.J)(Ax),deviation:(0,oi.J)(Bx),lines:Dx.Y1}))}),[h,L]);return(0,i.jsxs)(_b,Object.assign({testId:"historical-volatility"},{children:[(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"source"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("Source"),options:kb.yT,value:p,onChange:P},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:v,step:Dx.sr.step.toString(),error:w,onChange:N},void 0)}),void 0)]},void 0),(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"bar-history"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Bar History"),value:j,step:Dx.lJ.step.toString(),error:T,onChange:A},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"standard-dev"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Standard Dev"),value:y,step:Dx.f_.step.toString(),error:D,onChange:B},void 0)}),void 0)]},void 0)]},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:f,onChange:M},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:k,onChange:$},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:E,onSubmit:F,onReset:R},void 0)},void 0)]}),void 0)}));var $x=s(12906);const Ex=$x.Lw.default.toString(),Fx=$x.e$.default.toString(),Rx=$x.ah.default,Wx=$x.Ec.default.toString(),Hx=(0,o.memo)((()=>{var e,t,s,n,a,r,l,d,c,u;const h=Rb(),g=Hb(),p=(0,Bb.d)(g),[b,v]=(0,o.useState)(null!==(t=null===(e=p.periodCount)||void 0===e?void 0:e.toString())&&void 0!==t?t:Ex),[m,j]=(0,o.useState)(null!==(n=null===(s=p.distance)||void 0===s?void 0:s.toString())&&void 0!==n?n:Fx),[x,y]=(0,o.useState)(null!==(r=null===(a=p.maType)||void 0===a?void 0:a.toString())&&void 0!==r?r:Rx),[S,f]=(0,o.useState)(null!==(d=null===(l=p.shift)||void 0===l?void 0:l.toString())&&void 0!==d?d:Wx),[C,k]=(0,o.useState)(null!==(c=p.lines)&&void 0!==c?c:$x.PG),[I,L]=(0,o.useState)(null!==(u=p.periods)&&void 0!==u?u:kb.zF),w=(0,re.I0)(),T=(0,o.useMemo)((()=>Nb(b,$x.Lw)),[b]),D=(0,o.useMemo)((()=>Nb(m,$x.e$)),[m]),P=(0,o.useMemo)((()=>Nb(S,$x.Ec)),[S]),N=(0,o.useCallback)((e=>{v(e),g&&w(Mb.Q.update({indicatorId:g,type:dx.B.KeltnerChannels,periodCount:(0,oi.J)(e)}))}),[g,v,w]),A=(0,o.useCallback)((e=>{j(e),g&&w(Mb.Q.update({indicatorId:g,type:dx.B.KeltnerChannels,distance:(0,oi.J)(e)}))}),[g,j,w]),B=(0,o.useCallback)((e=>{y(e),g&&w(Mb.Q.update({indicatorId:g,type:dx.B.KeltnerChannels,maType:e}))}),[g,y,w]),M=(0,o.useCallback)((e=>{f(e),g&&w(Mb.Q.update({indicatorId:g,type:dx.B.KeltnerChannels,shift:(0,oi.J)(e)}))}),[g,f,w]),$=(0,o.useCallback)((e=>{k(e),g&&w(Mb.Q.update({indicatorId:g,type:dx.B.KeltnerChannels,lines:e}))}),[g,k,w]),E=(0,o.useCallback)((e=>{L(e),g&&w(Mb.Q.update({indicatorId:g,type:dx.B.KeltnerChannels,periods:e}))}),[g,L,w]),F=Boolean(T)||Boolean(D)||Boolean(P),R=(0,o.useCallback)((()=>{g||w(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:h,type:dx.B.KeltnerChannels,periodCount:(0,oi.J)(b),distance:(0,oi.J)(m),maType:x,shift:(0,oi.J)(S),lines:C,periods:I})),w(Cb.d.close())}),[g,w,h,S,m,x,b,C,I]),W=(0,o.useCallback)((()=>{v(Ex),j(Fx),y(Rx),f(Wx),k($x.PG),L(kb.zF),g&&w(Mb.Q.update({indicatorId:g,type:dx.B.KeltnerChannels,periodCount:(0,oi.J)(Ex),distance:(0,oi.J)(Fx),maType:Rx,shift:(0,oi.J)(Wx),lines:$x.PG,periods:kb.zF}))}),[g,w]);return(0,i.jsxs)(_b,Object.assign({testId:"keltner-channels"},{children:[(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:b,step:$x.Lw.step.toString(),error:T,onChange:N},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"band-distance"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Band Distance"),value:m,step:$x.e$.step.toString(),error:D,onChange:A},void 0)}),void 0)]},void 0),(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"ma-type"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("MA Type"),options:kb.T4,value:x,onChange:B},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"shift"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Shift"),value:S,step:$x.Ec.step.toString(),error:P,onChange:M},void 0)}),void 0)]},void 0)]},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:C,onChange:$},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"time-frames",id:zb.TimeFrames,label:(0,O.L)("Time Frames"),align:vr.K.left},{children:(0,i.jsx)(Pv,{periods:I,onChange:E},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:F,onSubmit:R,onReset:W},void 0)},void 0)]}),void 0)}));var zx=s(93936);const Jx=zx.U2.default,Qx=zx.kw.default.toString(),_x=zx.cC.default.toString(),qx=(0,o.memo)((()=>{var e,t,s,n,a,r,l;const d=Rb(),c=Hb(),u=(0,Bb.d)(c),[h,g]=(0,o.useState)(null!==(e=u.source)&&void 0!==e?e:Jx),[p,b]=(0,o.useState)(null!==(s=null===(t=u.periodCount)||void 0===t?void 0:t.toString())&&void 0!==s?s:Qx),[v,m]=(0,o.useState)(null!==(a=null===(n=u.shift)||void 0===n?void 0:n.toString())&&void 0!==a?a:_x),[j,x]=(0,o.useState)(null!==(r=u.lines)&&void 0!==r?r:zx.Dm),[y,S]=(0,o.useState)(null!==(l=u.periods)&&void 0!==l?l:kb.zF),f=(0,re.I0)(),C=(0,o.useMemo)((()=>Nb(p,zx.kw)),[p]),k=(0,o.useMemo)((()=>Nb(v,zx.cC)),[v]),I=(0,o.useCallback)((e=>{g(e),c&&f(Mb.Q.update({indicatorId:c,type:dx.B.LinearRegressionForecast,source:e}))}),[c,g,f]),L=(0,o.useCallback)((e=>{b(e),c&&f(Mb.Q.update({indicatorId:c,type:dx.B.LinearRegressionForecast,periodCount:(0,oi.J)(e)}))}),[c,b,f]),w=(0,o.useCallback)((e=>{m(e),c&&f(Mb.Q.update({indicatorId:c,type:dx.B.LinearRegressionForecast,shift:(0,oi.J)(e)}))}),[c,m,f]),T=(0,o.useCallback)((e=>{x(e),c&&f(Mb.Q.update({indicatorId:c,type:dx.B.LinearRegressionForecast,lines:e}))}),[c,x,f]),D=(0,o.useCallback)((e=>{S(e),c&&f(Mb.Q.update({indicatorId:c,type:dx.B.LinearRegressionForecast,periods:e}))}),[c,S,f]),P=Boolean(C)||Boolean(k),N=(0,o.useCallback)((()=>{c||f(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:d,type:dx.B.LinearRegressionForecast,source:h,periodCount:(0,oi.J)(p),shift:(0,oi.J)(v),lines:j,periods:y})),f(Cb.d.close())}),[c,f,d,h,p,v,j,y]),A=(0,o.useCallback)((()=>{g(Jx),b(Qx),m(_x),x(zx.Dm),S(kb.zF),c&&f(Mb.Q.update({indicatorId:c,type:dx.B.LinearRegressionForecast,source:Jx,periodCount:(0,oi.J)(Qx),shift:(0,oi.J)(_x),lines:zx.Dm,periods:kb.zF}))}),[c,m,f]);return(0,i.jsxs)(_b,Object.assign({testId:"linear-regression-forecast"},{children:[(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"source"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("Source"),options:kb.yT,value:h,onChange:I},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:p,step:zx.kw.step.toString(),error:C,onChange:L},void 0)}),void 0)]},void 0),(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"shift"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Shift"),value:v,step:zx.cC.step.toString(),error:k,onChange:w},void 0)}),void 0),(0,i.jsx)(At.s,{},void 0)]},void 0)]},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:j,onChange:T},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"time-frames",id:zb.TimeFrames,label:(0,O.L)("Time Frames"),align:vr.K.left},{children:(0,i.jsx)(Pv,{periods:y,onChange:D},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:P,onSubmit:N,onReset:A},void 0)},void 0)]}),void 0)}));var Xx=s(31036);const Vx=Xx.h6.default,Zx=Xx.rx.default.toString(),Ux=Xx.u_.default.toString(),Kx=(0,o.memo)((()=>{var e,t,s,n,a,r,l;const d=Rb(),c=Hb(),u=(0,Bb.d)(c),[h,g]=(0,o.useState)(null!==(e=u.source)&&void 0!==e?e:Vx),[p,b]=(0,o.useState)(null!==(s=null===(t=u.periodCount)||void 0===t?void 0:t.toString())&&void 0!==s?s:Zx),[v,m]=(0,o.useState)(null!==(a=null===(n=u.shift)||void 0===n?void 0:n.toString())&&void 0!==a?a:Ux),[j,x]=(0,o.useState)(null!==(r=u.lines)&&void 0!==r?r:Xx.LI),[y,S]=(0,o.useState)(null!==(l=u.periods)&&void 0!==l?l:kb.zF),f=(0,re.I0)(),C=(0,o.useMemo)((()=>Nb(p,Xx.rx)),[p]),k=(0,o.useMemo)((()=>Nb(v,Xx.u_)),[v]),I=(0,o.useCallback)((e=>{g(e),c&&f(Mb.Q.update({indicatorId:c,type:dx.B.LinearRegressionIntercept,source:e}))}),[c,g,f]),L=(0,o.useCallback)((e=>{b(e),c&&f(Mb.Q.update({indicatorId:c,type:dx.B.LinearRegressionIntercept,periodCount:(0,oi.J)(e)}))}),[c,b,f]),w=(0,o.useCallback)((e=>{m(e),c&&f(Mb.Q.update({indicatorId:c,type:dx.B.LinearRegressionIntercept,shift:(0,oi.J)(e)}))}),[c,m,f]),T=(0,o.useCallback)((e=>{x(e),c&&f(Mb.Q.update({indicatorId:c,type:dx.B.LinearRegressionIntercept,lines:e}))}),[c,x,f]),D=(0,o.useCallback)((e=>{S(e),c&&f(Mb.Q.update({indicatorId:c,type:dx.B.LinearRegressionIntercept,periods:e}))}),[c,S,f]),P=Boolean(C)||Boolean(k),N=(0,o.useCallback)((()=>{c||f(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:d,type:dx.B.LinearRegressionIntercept,source:h,periodCount:(0,oi.J)(p),shift:(0,oi.J)(v),lines:j,periods:y})),f(Cb.d.close())}),[c,f,d,h,p,v,j,y]),A=(0,o.useCallback)((()=>{g(Vx),b(Zx),m(Ux),x(Xx.LI),S(kb.zF),c&&f(Mb.Q.update({indicatorId:c,type:dx.B.LinearRegressionIntercept,source:Vx,periodCount:(0,oi.J)(Zx),shift:(0,oi.J)(Ux),lines:Xx.LI,periods:kb.zF}))}),[c,m,f]);return(0,i.jsxs)(_b,Object.assign({testId:"linear-regression-intercept"},{children:[(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"source"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("Source"),options:kb.yT,value:h,onChange:I},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:p,step:Xx.rx.step.toString(),error:C,onChange:L},void 0)}),void 0)]},void 0),(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"shift"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Shift"),value:v,step:Xx.u_.step.toString(),error:k,onChange:w},void 0)}),void 0),(0,i.jsx)(At.s,{},void 0)]},void 0)]},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:j,onChange:T},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"time-frames",id:zb.TimeFrames,label:(0,O.L)("Time Frames"),align:vr.K.left},{children:(0,i.jsx)(Pv,{periods:y,onChange:D},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:P,onSubmit:N,onReset:A},void 0)},void 0)]}),void 0)}));var Yx=s(50113);const Gx=Yx.ne.default.toString(),ey=Yx.CP.default.toString(),ty=Yx.yI.default.toString(),sy=Yx.OM.default.toString(),iy=Yx.m6.default.toString(),oy=(0,o.memo)((()=>{var e,t,s,n,a,r,l,d,c,u,h,g;const p=Rb(),b=Hb(),v=(0,Bb.d)(b),[m,j]=(0,o.useState)(null!==(t=null===(e=v.degree)||void 0===e?void 0:e.toString())&&void 0!==t?t:Gx),[x,y]=(0,o.useState)(null!==(n=null===(s=v.periodCount)||void 0===s?void 0:s.toString())&&void 0!==n?n:ey),[S,f]=(0,o.useState)(null!==(r=null===(a=v.deviation1)||void 0===a?void 0:a.toString())&&void 0!==r?r:ty),[C,k]=(0,o.useState)(null!==(d=null===(l=v.deviation2)||void 0===l?void 0:l.toString())&&void 0!==d?d:sy),[I,L]=(0,o.useState)(null!==(u=null===(c=v.shift)||void 0===c?void 0:c.toString())&&void 0!==u?u:iy),[w,T]=(0,o.useState)(null!==(h=v.lines)&&void 0!==h?h:Yx._5),[D,P]=(0,o.useState)(null!==(g=v.periods)&&void 0!==g?g:kb.zF),N=(0,re.I0)(),A=(0,o.useMemo)((()=>Nb(m,Yx.ne)),[m]),B=(0,o.useMemo)((()=>Nb(x,Yx.CP)),[x]),M=(0,o.useMemo)((()=>Nb(S,Yx.yI)),[S]),$=(0,o.useMemo)((()=>Nb(C,Yx.OM)),[C]),E=(0,o.useMemo)((()=>Nb(I,Yx.m6)),[I]),F=(0,o.useCallback)((e=>{j(e),b&&N(Mb.Q.update({indicatorId:b,type:dx.B.PolynomialRegressionChannels,degree:(0,oi.J)(e)}))}),[b,j,N]),R=(0,o.useCallback)((e=>{y(e),b&&N(Mb.Q.update({indicatorId:b,type:dx.B.PolynomialRegressionChannels,periodCount:(0,oi.J)(e)}))}),[b,y,N]),W=(0,o.useCallback)((e=>{f(e),b&&N(Mb.Q.update({indicatorId:b,type:dx.B.PolynomialRegressionChannels,deviation1:(0,oi.J)(e)}))}),[b,f,N]),H=(0,o.useCallback)((e=>{k(e),b&&N(Mb.Q.update({indicatorId:b,type:dx.B.PolynomialRegressionChannels,deviation2:(0,oi.J)(e)}))}),[b,k,N]),z=(0,o.useCallback)((e=>{L(e),b&&N(Mb.Q.update({indicatorId:b,type:dx.B.PolynomialRegressionChannels,shift:(0,oi.J)(e)}))}),[b,L,N]),J=(0,o.useCallback)((e=>{T(e),b&&N(Mb.Q.update({indicatorId:b,type:dx.B.PolynomialRegressionChannels,lines:e}))}),[b,T,N]),Q=(0,o.useCallback)((e=>{P(e),b&&N(Mb.Q.update({indicatorId:b,type:dx.B.PolynomialRegressionChannels,periods:e}))}),[b,P,N]),_=Boolean(A)||Boolean(B)||Boolean(M)||Boolean($)||Boolean(E),q=(0,o.useCallback)((()=>{b||N(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:p,type:dx.B.PolynomialRegressionChannels,degree:(0,oi.J)(m),periodCount:(0,oi.J)(x),deviation1:(0,oi.J)(S),deviation2:(0,oi.J)(C),shift:(0,oi.J)(I),lines:w,periods:D})),N(Cb.d.close())}),[b,N,p,I,m,x,S,C,w,D]),X=(0,o.useCallback)((()=>{j(Gx),y(ey),f(ty),k(sy),L(iy),T(Yx._5),P(kb.zF),b&&N(Mb.Q.update({indicatorId:b,type:dx.B.PolynomialRegressionChannels,degree:(0,oi.J)(Gx),periodCount:(0,oi.J)(ey),deviation1:(0,oi.J)(ty),deviation2:(0,oi.J)(sy),shift:(0,oi.J)(iy),lines:Yx._5,periods:kb.zF}))}),[b,N]);return(0,i.jsxs)(_b,Object.assign({testId:"polynomial-regression-channel"},{children:[(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"degree"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Degree"),value:m,step:Yx.ne.step.toString(),error:A,onChange:F},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:x,step:Yx.CP.step.toString(),error:B,onChange:R},void 0)}),void 0)]},void 0),(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({testId:"standard-deviation-1",flexBasis:"50%"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Standard Deviation 1"),value:S,step:Yx.yI.step.toString(),error:M,onChange:W},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"standard-deviation-2"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Standard Deviation 2"),value:C,step:Yx.OM.step.toString(),error:$,onChange:H},void 0)}),void 0)]},void 0),(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"shift"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Shift"),value:I,step:Yx.m6.step.toString(),error:E,onChange:z},void 0)}),void 0),(0,i.jsx)(At.s,{},void 0)]},void 0)]},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:w,onChange:J},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"time-frames",id:zb.TimeFrames,label:(0,O.L)("Time Frames"),align:vr.K.left},{children:(0,i.jsx)(Pv,{periods:D,onChange:Q},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:_,onSubmit:q,onReset:X},void 0)},void 0)]}),void 0)}));var ny=s(87346);const ay=ny.Tb.default,ry=ny.ZU.default.toString(),ly=ny.oS.default,dy=(0,o.memo)((()=>{var e,t,s,n,a,r;const l=Rb(),d=Hb(),c=(0,Bb.d)(d),[u,h]=(0,o.useState)(null!==(e=c.source)&&void 0!==e?e:ay),[g,p]=(0,o.useState)(null!==(s=null===(t=c.periodCount)||void 0===t?void 0:t.toString())&&void 0!==s?s:ry),[b,v]=(0,o.useState)(null!==(n=c.maType)&&void 0!==n?n:ly),[m,j]=(0,o.useState)(null!==(a=c.lines)&&void 0!==a?a:ny.Nz),[x,y]=(0,o.useState)(null!==(r=c.levels)&&void 0!==r?r:ny.O3),S=(0,re.I0)(),f=(0,o.useMemo)((()=>Nb(g,ny.ZU)),[g]),C=(0,o.useCallback)((e=>{h(e),d&&S(Mb.Q.update({indicatorId:d,type:dx.B.StandardDeviation,source:e}))}),[d,h,S]),k=(0,o.useCallback)((e=>{p(e),d&&S(Mb.Q.update({indicatorId:d,type:dx.B.StandardDeviation,periodCount:(0,oi.J)(e)}))}),[d,p,S]),I=(0,o.useCallback)((e=>{v(e),d&&S(Mb.Q.update({indicatorId:d,type:dx.B.StandardDeviation,maType:e}))}),[d,v,S]),L=(0,o.useCallback)((e=>{j(e),d&&S(Mb.Q.update({indicatorId:d,type:dx.B.StandardDeviation,lines:e}))}),[d,j,S]),w=(0,o.useCallback)((e=>{y(e),d&&S(Mb.Q.update({indicatorId:d,type:dx.B.StandardDeviation,levels:e}))}),[S,y,d]),T=Boolean(f),D=(0,o.useCallback)((()=>{d||S(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:l,type:dx.B.StandardDeviation,source:u,periodCount:(0,oi.J)(g),maType:b,lines:m,levels:x,heightRatio:kb.dl,yStretch:kb.FQ})),S(Cb.d.close())}),[d,S,l,g,b,u,m,x]),P=(0,o.useCallback)((()=>{h(ay),p(ry),v(ly),j(ny.Nz),d&&S(Mb.Q.update({indicatorId:d,type:dx.B.StandardDeviation,source:ay,periodCount:(0,oi.J)(ry),maType:ly,lines:ny.Nz}))}),[d,S]);return(0,i.jsxs)(_b,Object.assign({testId:"standard-deviation"},{children:[(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"source"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("Source"),options:kb.yT,value:u,onChange:C},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:g,step:ny.ZU.step.toString(),error:f,onChange:k},void 0)}),void 0)]},void 0),(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"ma-type"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("MA Type"),options:kb.T4,value:b,onChange:I},void 0)}),void 0),(0,i.jsx)(At.s,{},void 0)]},void 0)]},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:m,onChange:L},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:x,onChange:w},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:T,onSubmit:D,onReset:P},void 0)},void 0)]}),void 0)}));var cy=s(16170);const uy=(0,o.memo)((()=>{var e,t;const s=Rb(),n=Hb(),a=(0,Bb.d)(n),[r,l]=(0,o.useState)(null!==(e=a.lines)&&void 0!==e?e:cy.ey),[d,c]=(0,o.useState)(null!==(t=a.levels)&&void 0!==t?t:cy.Kd),u=(0,re.I0)(),h=(0,o.useCallback)((e=>{l(e),n&&u(Mb.Q.update({indicatorId:n,type:dx.B.TrueRange,lines:e}))}),[n,l,u]),g=(0,o.useCallback)((e=>{c(e),n&&u(Mb.Q.update({indicatorId:n,type:dx.B.TrueRange,levels:e}))}),[u,c,n]),p=(0,o.useCallback)((()=>{n||u(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:s,type:dx.B.TrueRange,lines:r,levels:d,heightRatio:kb.dl,yStretch:kb.FQ})),u(Cb.d.close())}),[n,u,s,r,d]),b=(0,o.useCallback)((()=>{n&&u(Mb.Q.update({indicatorId:n,type:dx.B.TrueRange,lines:cy.ey}))}),[n,u]);return(0,i.jsxs)(_b,Object.assign({testId:"true-range"},{children:[(0,i.jsx)(i.Fragment,{},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:r,onChange:h},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:d,onChange:g},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:!1,onSubmit:p,onReset:b},void 0)},void 0)]}),void 0)}));var hy=s(65415);const gy=(0,o.memo)((()=>{var e,t;const s=Rb(),n=Hb(),a=(0,Bb.d)(n),[r,l]=(0,o.useState)(null!==(e=a.lines)&&void 0!==e?e:hy.$g),[d,c]=(0,o.useState)(null!==(t=a.levels)&&void 0!==t?t:hy.Nw),u=(0,re.I0)(),h=(0,o.useCallback)((e=>{l(e),n&&u(Mb.Q.update({indicatorId:n,type:dx.B.TickVolume,lines:e}))}),[n,l,u]),g=(0,o.useCallback)((e=>{c(e),n&&u(Mb.Q.update({indicatorId:n,type:dx.B.TickVolume,levels:e}))}),[u,c,n]),p=(0,o.useCallback)((()=>{n||u(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:s,type:dx.B.TickVolume,lines:r,levels:d,heightRatio:kb.dl,yStretch:kb.FQ})),u(Cb.d.close())}),[n,u,s,r,d]),b=(0,o.useCallback)((()=>{l(lx.gk),n&&u(Mb.Q.update({indicatorId:n,type:dx.B.TickVolume,lines:lx.gk}))}),[n,u]);return(0,i.jsxs)(_b,Object.assign({testId:"tick-volume"},{children:[(0,i.jsx)(i.Fragment,{},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:r,onChange:h},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:d,onChange:g},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:!1,onSubmit:p,onReset:b},void 0)},void 0)]}),void 0)}));var py=s(9605),by=s(45908);const vy=py.lL.default.toString(),my=py.je.default,jy=py.t_.default.toString(),xy=(0,o.memo)((()=>{var e,t,s,n,a,r,l,d;const c=Rb(),u=Hb(),h=(0,Bb.d)(u),[g,p]=(0,o.useState)(null!==(t=null===(e=h.periodCount)||void 0===e?void 0:e.toString())&&void 0!==t?t:vy),[b,v]=(0,o.useState)(null!==(n=null===(s=h.maType)||void 0===s?void 0:s.toString())&&void 0!==n?n:my),[m,j]=(0,o.useState)(null!==(r=null===(a=h.shift)||void 0===a?void 0:a.toString())&&void 0!==r?r:jy),[x,y]=(0,o.useState)(null!==(l=h.lines)&&void 0!==l?l:py.s9),[S,f]=(0,o.useState)(null!==(d=h.levels)&&void 0!==d?d:py.ds),C=(0,re.I0)(),k=(0,o.useMemo)((()=>Nb(g,py.lL)),[g]),I=(0,o.useMemo)((()=>Nb(m,py.t_)),[m]),L=(0,o.useCallback)((e=>{p(e),u&&C(Mb.Q.update({indicatorId:u,type:by.J.EaseOfMovement,periodCount:(0,oi.J)(e)}))}),[u,p,C]),w=(0,o.useCallback)((e=>{v(e),u&&C(Mb.Q.update({indicatorId:u,type:by.J.EaseOfMovement,maType:e}))}),[u,v,C]),T=(0,o.useCallback)((e=>{j(e),u&&C(Mb.Q.update({indicatorId:u,type:by.J.EaseOfMovement,shift:(0,oi.J)(e)}))}),[u,j,C]),D=(0,o.useCallback)((e=>{y(e),u&&C(Mb.Q.update({indicatorId:u,type:by.J.EaseOfMovement,lines:e}))}),[u,y,C]),P=(0,o.useCallback)((e=>{f(e),u&&C(Mb.Q.update({indicatorId:u,type:by.J.EaseOfMovement,levels:e}))}),[C,f,u]),N=Boolean(k)||Boolean(I),A=(0,o.useCallback)((()=>{u||C(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:c,type:by.J.EaseOfMovement,periodCount:(0,oi.J)(g),maType:b,shift:(0,oi.J)(m),lines:x,levels:S,heightRatio:kb.dl,yStretch:kb.FQ})),C(Cb.d.close())}),[u,C,c,m,b,g,x,S]),B=(0,o.useCallback)((()=>{p(vy),v(my),j(jy),y(py.s9),u&&C(Mb.Q.update({indicatorId:u,type:by.J.EaseOfMovement,periodCount:(0,oi.J)(vy),maType:my,shift:(0,oi.J)(jy),lines:py.s9}))}),[u,C]);return(0,i.jsxs)(_b,Object.assign({testId:"ease-of-movement"},{children:[(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:g,step:py.lL.step.toString(),error:k,onChange:L},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"ma-type"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("MA Type"),options:kb.T4,value:b,onChange:w},void 0)}),void 0)]},void 0),(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"shift"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Shift"),value:m,step:py.t_.step.toString(),error:I,onChange:T},void 0)}),void 0),(0,i.jsx)(At.s,{},void 0)]},void 0)]},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:x,onChange:D},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:S,onChange:P},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:N,onSubmit:A,onReset:B},void 0)},void 0)]}),void 0)}));var yy=s(77105);const Sy=yy.ZU.default.toString(),fy=yy.Yx.default.toString(),Oy=(0,o.memo)((()=>{var e,t,s,n,a,r;const l=Rb(),d=Hb(),c=(0,Bb.d)(d),[u,h]=(0,o.useState)(null!==(t=null===(e=c.periodCount)||void 0===e?void 0:e.toString())&&void 0!==t?t:Sy),[g,p]=(0,o.useState)(null!==(n=null===(s=c.shift)||void 0===s?void 0:s.toString())&&void 0!==n?n:fy),[b,v]=(0,o.useState)(null!==(a=c.lines)&&void 0!==a?a:yy.PR),[m,j]=(0,o.useState)(null!==(r=c.levels)&&void 0!==r?r:yy.XT),x=(0,re.I0)(),y=(0,o.useMemo)((()=>Nb(u,yy.ZU)),[u]),S=(0,o.useMemo)((()=>Nb(g,yy.Yx)),[g]),f=(0,o.useCallback)((e=>{h(e),d&&x(Mb.Q.update({indicatorId:d,type:by.J.MoneyFlowIndex,periodCount:(0,oi.J)(e)}))}),[d,h,x]),C=(0,o.useCallback)((e=>{p(e),d&&x(Mb.Q.update({indicatorId:d,type:by.J.MoneyFlowIndex,shift:(0,oi.J)(e)}))}),[d,p,x]),k=(0,o.useCallback)((e=>{v(e),d&&x(Mb.Q.update({indicatorId:d,type:by.J.MoneyFlowIndex,lines:e}))}),[d,v,x]),I=(0,o.useCallback)((e=>{j(e),d&&x(Mb.Q.update({indicatorId:d,type:by.J.MoneyFlowIndex,levels:e}))}),[x,j,d]),L=Boolean(y),w=(0,o.useCallback)((()=>{d||x(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:l,type:by.J.MoneyFlowIndex,periodCount:(0,oi.J)(u),shift:(0,oi.J)(g),lines:b,levels:m,heightRatio:kb.dl,yStretch:kb.FQ})),x(Cb.d.close())}),[d,x,l,g,u,b,m]),T=(0,o.useCallback)((()=>{h(Sy),p(fy),v(yy.PR),d&&x(Mb.Q.update({indicatorId:d,type:by.J.MoneyFlowIndex,periodCount:(0,oi.J)(Sy),shift:(0,oi.J)(fy),lines:yy.PR}))}),[d,x]);return(0,i.jsxs)(_b,Object.assign({testId:"money-flow-index"},{children:[(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:u,step:yy.ZU.step.toString(),error:y,onChange:f},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"shift"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Shift"),value:g,step:yy.Yx.step.toString(),error:S,onChange:C},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:b,onChange:k},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:m,onChange:I},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:L,onSubmit:w,onReset:T},void 0)},void 0)]}),void 0)}));var Cy=s(56959);const ky=Cy.hT.default,Iy=Cy.J2.default.toString(),Ly=(0,o.memo)((()=>{var e,t,s,n,a;const r=Rb(),l=Hb(),d=(0,Bb.d)(l),[c,u]=(0,o.useState)(null!==(e=d.source)&&void 0!==e?e:ky),[h,g]=(0,o.useState)(null!==(s=null===(t=d.shift)||void 0===t?void 0:t.toString())&&void 0!==s?s:Iy),[p,b]=(0,o.useState)(null!==(n=d.lines)&&void 0!==n?n:Cy.TJ),[v,m]=(0,o.useState)(null!==(a=d.levels)&&void 0!==a?a:Cy.zk),j=(0,re.I0)(),x=(0,o.useMemo)((()=>Nb(h,Cy.J2)),[h]),y=(0,o.useCallback)((e=>{u(e),l&&j(Mb.Q.update({indicatorId:l,type:by.J.NegativeVolumeIndex,source:e}))}),[l,u,j]),S=(0,o.useCallback)((e=>{g(e),l&&j(Mb.Q.update({indicatorId:l,type:by.J.NegativeVolumeIndex,shift:(0,oi.J)(e)}))}),[l,g,j]),f=(0,o.useCallback)((e=>{b(e),l&&j(Mb.Q.update({indicatorId:l,type:by.J.NegativeVolumeIndex,lines:e}))}),[l,b,j]),C=(0,o.useCallback)((e=>{m(e),l&&j(Mb.Q.update({indicatorId:l,type:by.J.NegativeVolumeIndex,levels:e}))}),[j,m,l]),k=Boolean(x),I=(0,o.useCallback)((()=>{l||j(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:r,type:by.J.NegativeVolumeIndex,source:c,shift:(0,oi.J)(h),lines:p,levels:v,heightRatio:kb.dl,yStretch:kb.FQ})),j(Cb.d.close())}),[l,j,r,c,h,p,v]),L=(0,o.useCallback)((()=>{u(ky),g(Iy),b(Cy.TJ),l&&j(Mb.Q.update({indicatorId:l,type:by.J.NegativeVolumeIndex,source:ky,shift:(0,oi.J)(Iy),lines:Cy.TJ}))}),[l,j]);return(0,i.jsxs)(_b,Object.assign({testId:"negative-volume-index"},{children:[(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"source"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("Source"),options:kb.yT,value:c,onChange:y},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"shift"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Shift"),value:h,step:Cy.J2.step.toString(),error:x,onChange:S},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:p,onChange:f},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:v,onChange:C},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:k,onSubmit:I,onReset:L},void 0)},void 0)]}),void 0)}));var wy=s(87299);const Ty=wy.kP.default,Dy=wy.TU.default.toString(),Py=(0,o.memo)((()=>{var e,t,s,n,a;const r=Rb(),l=Hb(),d=(0,Bb.d)(l),[c,u]=(0,o.useState)(null!==(e=d.source)&&void 0!==e?e:Ty),[h,g]=(0,o.useState)(null!==(s=null===(t=d.shift)||void 0===t?void 0:t.toString())&&void 0!==s?s:Dy),[p,b]=(0,o.useState)(null!==(n=d.lines)&&void 0!==n?n:wy.PG),[v,m]=(0,o.useState)(null!==(a=d.levels)&&void 0!==a?a:wy.QO),j=(0,re.I0)(),x=(0,o.useMemo)((()=>Nb(h,wy.TU)),[h]),y=(0,o.useCallback)((e=>{u(e),l&&j(Mb.Q.update({indicatorId:l,type:by.J.OnBalanceVolume,source:e}))}),[l,u,j]),S=(0,o.useCallback)((e=>{g(e),l&&j(Mb.Q.update({indicatorId:l,type:by.J.OnBalanceVolume,shift:(0,oi.J)(e)}))}),[l,g,j]),f=(0,o.useCallback)((e=>{b(e),l&&j(Mb.Q.update({indicatorId:l,type:by.J.OnBalanceVolume,lines:e}))}),[l,b,j]),C=(0,o.useCallback)((e=>{m(e),l&&j(Mb.Q.update({indicatorId:l,type:by.J.OnBalanceVolume,levels:e}))}),[j,m,l]),k=Boolean(x),I=(0,o.useCallback)((()=>{l||j(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:r,type:by.J.OnBalanceVolume,source:c,shift:(0,oi.J)(h),lines:p,levels:v,heightRatio:kb.dl,yStretch:kb.FQ})),j(Cb.d.close())}),[l,j,r,c,h,p,v]),L=(0,o.useCallback)((()=>{u(Ty),g(Dy),b(wy.PG),l&&j(Mb.Q.update({indicatorId:l,type:by.J.OnBalanceVolume,source:Ty,shift:(0,oi.J)(Dy),lines:wy.PG}))}),[l,j]);return(0,i.jsxs)(_b,Object.assign({testId:"on-balance-volume"},{children:[(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"source"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("Source"),options:kb.yT,value:c,onChange:y},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"shift"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Shift"),value:h,step:wy.TU.step.toString(),error:x,onChange:S},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:p,onChange:f},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:v,onChange:C},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:k,onSubmit:I,onReset:L},void 0)},void 0)]}),void 0)}));var Ny=s(10750);const Ay=Ny.FQ.default,By=Ny.yH.default.toString(),My=(0,o.memo)((()=>{var e,t,s,n,a;const r=Rb(),l=Hb(),d=(0,Bb.d)(l),[c,u]=(0,o.useState)(null!==(e=d.source)&&void 0!==e?e:Ay),[h,g]=(0,o.useState)(null!==(s=null===(t=d.shift)||void 0===t?void 0:t.toString())&&void 0!==s?s:By),[p,b]=(0,o.useState)(null!==(n=d.lines)&&void 0!==n?n:Ny.jL),[v,m]=(0,o.useState)(null!==(a=d.levels)&&void 0!==a?a:Ny.SN),j=(0,re.I0)(),x=(0,o.useMemo)((()=>Nb(h,Ny.yH)),[h]),y=(0,o.useCallback)((e=>{u(e),l&&j(Mb.Q.update({indicatorId:l,type:by.J.PositiveVolumeIndex,source:e}))}),[l,u,j]),S=(0,o.useCallback)((e=>{g(e),l&&j(Mb.Q.update({indicatorId:l,type:by.J.PositiveVolumeIndex,shift:(0,oi.J)(e)}))}),[l,g,j]),f=(0,o.useCallback)((e=>{b(e),l&&j(Mb.Q.update({indicatorId:l,type:by.J.PositiveVolumeIndex,lines:e}))}),[l,b,j]),C=(0,o.useCallback)((e=>{m(e),l&&j(Mb.Q.update({indicatorId:l,type:by.J.PositiveVolumeIndex,levels:e}))}),[j,m,l]),k=Boolean(x),I=(0,o.useCallback)((()=>{l||j(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:r,type:by.J.PositiveVolumeIndex,source:c,shift:(0,oi.J)(h),lines:p,levels:v,heightRatio:kb.dl,yStretch:kb.FQ})),j(Cb.d.close())}),[l,j,r,c,h,p,v]),L=(0,o.useCallback)((()=>{u(Ay),g(By),b(Ny.jL),l&&j(Mb.Q.update({indicatorId:l,type:by.J.PositiveVolumeIndex,source:Ay,shift:(0,oi.J)(By),lines:Ny.jL}))}),[l,j]);return(0,i.jsxs)(_b,Object.assign({testId:"positive-volume-index"},{children:[(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"source"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("Source"),options:kb.yT,value:c,onChange:y},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"shift"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Shift"),value:h,step:Ny.yH.step.toString(),error:x,onChange:S},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:p,onChange:f},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:v,onChange:C},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:k,onSubmit:I,onReset:L},void 0)},void 0)]}),void 0)}));var $y=s(49413);const Ey=$y.PX.default,Fy=$y.GC.default.toString(),Ry=(0,o.memo)((()=>{var e,t,s,n,a;const r=Rb(),l=Hb(),d=(0,Bb.d)(l),[c,u]=(0,o.useState)(null!==(e=d.source)&&void 0!==e?e:Ey),[h,g]=(0,o.useState)(null!==(s=null===(t=d.shift)||void 0===t?void 0:t.toString())&&void 0!==s?s:Fy),[p,b]=(0,o.useState)(null!==(n=d.lines)&&void 0!==n?n:$y.QO),[v,m]=(0,o.useState)(null!==(a=d.levels)&&void 0!==a?a:$y.Lc),j=(0,re.I0)(),x=(0,o.useMemo)((()=>Nb(h,$y.GC)),[h]),y=(0,o.useCallback)((e=>{u(e),l&&j(Mb.Q.update({indicatorId:l,type:by.J.PriceVolumeTrend,source:e}))}),[l,u,j]),S=(0,o.useCallback)((e=>{g(e),l&&j(Mb.Q.update({indicatorId:l,type:by.J.PriceVolumeTrend,shift:(0,oi.J)(e)}))}),[l,g,j]),f=(0,o.useCallback)((e=>{b(e),l&&j(Mb.Q.update({indicatorId:l,type:by.J.PriceVolumeTrend,lines:e}))}),[l,b,j]),C=(0,o.useCallback)((e=>{m(e),l&&j(Mb.Q.update({indicatorId:l,type:by.J.PriceVolumeTrend,levels:e}))}),[j,m,l]),k=Boolean(x),I=(0,o.useCallback)((()=>{l||j(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:r,type:by.J.PriceVolumeTrend,source:c,shift:(0,oi.J)(h),lines:p,levels:v,heightRatio:kb.dl,yStretch:kb.FQ})),j(Cb.d.close())}),[l,j,r,c,h,p,v]),L=(0,o.useCallback)((()=>{u(Ey),g(Fy),b($y.QO),l&&j(Mb.Q.update({indicatorId:l,type:by.J.PriceVolumeTrend,source:Ey,shift:(0,oi.J)(Fy),lines:$y.QO}))}),[l,j]);return(0,i.jsxs)(_b,Object.assign({testId:"price-volume-trend"},{children:[(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"source"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("Source"),options:kb.yT,value:c,onChange:y},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"shift"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Shift"),value:h,step:$y.GC.step.toString(),error:x,onChange:S},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:p,onChange:f},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:v,onChange:C},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:k,onSubmit:I,onReset:L},void 0)},void 0)]}),void 0)}));var Wy=s(55095);const Hy=Wy.D8.default,zy=Wy.ub.default.toString(),Jy=(0,o.memo)((()=>{var e,t,s,n,a;const r=Rb(),l=Hb(),d=(0,Bb.d)(l),[c,u]=(0,o.useState)(null!==(e=d.source)&&void 0!==e?e:Hy),[h,g]=(0,o.useState)(null!==(s=null===(t=d.shift)||void 0===t?void 0:t.toString())&&void 0!==s?s:zy),[p,b]=(0,o.useState)(null!==(n=d.lines)&&void 0!==n?n:Wy.aK),[v,m]=(0,o.useState)(null!==(a=d.levels)&&void 0!==a?a:Wy.jO),j=(0,re.I0)(),x=(0,o.useMemo)((()=>Nb(h,Wy.ub)),[h]),y=(0,o.useCallback)((e=>{u(e),l&&j(Mb.Q.update({indicatorId:l,type:by.J.TradeVolumeIndex,source:e}))}),[l,u,j]),S=(0,o.useCallback)((e=>{g(e),l&&j(Mb.Q.update({indicatorId:l,type:by.J.TradeVolumeIndex,shift:(0,oi.J)(e)}))}),[l,g,j]),f=(0,o.useCallback)((e=>{b(e),l&&j(Mb.Q.update({indicatorId:l,type:by.J.TradeVolumeIndex,lines:e}))}),[l,b,j]),C=(0,o.useCallback)((e=>{m(e),l&&j(Mb.Q.update({indicatorId:l,type:by.J.TradeVolumeIndex,levels:e}))}),[j,m,l]),k=Boolean(x),I=(0,o.useCallback)((()=>{l||j(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:r,type:by.J.TradeVolumeIndex,source:c,shift:(0,oi.J)(h),lines:p,levels:v,heightRatio:kb.dl,yStretch:kb.FQ})),j(Cb.d.close())}),[l,j,r,c,h,p,v]),L=(0,o.useCallback)((()=>{u(Hy),g(zy),b(Wy.aK),l&&j(Mb.Q.update({indicatorId:l,type:by.J.TradeVolumeIndex,source:Hy,shift:(0,oi.J)(zy),lines:Wy.aK}))}),[l,j]);return(0,i.jsxs)(_b,Object.assign({testId:"trade-volume-index"},{children:[(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"source"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("Source"),options:kb.yT,value:c,onChange:y},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"shift"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Shift"),value:h,step:Wy.ub.step.toString(),error:x,onChange:S},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:p,onChange:f},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:v,onChange:C},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:k,onSubmit:I,onReset:L},void 0)},void 0)]}),void 0)}));var Qy=s(20956);const _y=Qy.xz.default.toString(),qy=Qy.fG.default.toString(),Xy=Qy.eP.default.toString(),Vy=(0,o.memo)((()=>{var e,t,s,n,a,r,l,d;const c=Rb(),u=Hb(),h=(0,Bb.d)(u),[g,p]=(0,o.useState)(null!==(t=null===(e=h.shortCycle)||void 0===e?void 0:e.toString())&&void 0!==t?t:_y),[b,v]=(0,o.useState)(null!==(n=null===(s=h.longCycle)||void 0===s?void 0:s.toString())&&void 0!==n?n:qy),[m,j]=(0,o.useState)(null!==(r=null===(a=h.shift)||void 0===a?void 0:a.toString())&&void 0!==r?r:Xy),[x,y]=(0,o.useState)(null!==(l=h.lines)&&void 0!==l?l:Qy.pD),[S,f]=(0,o.useState)(null!==(d=h.levels)&&void 0!==d?d:Qy.$c),C=(0,re.I0)(),k=(0,o.useMemo)((()=>Nb(g,Qy.xz)),[g]),I=(0,o.useMemo)((()=>Nb(b,Qy.fG)),[b]),L=(0,o.useMemo)((()=>Nb(m,Qy.eP)),[m]),w=(0,o.useCallback)((e=>{p(e),u&&C(Mb.Q.update({indicatorId:u,type:by.J.VolumeOscillator,shortCycle:(0,oi.J)(e)}))}),[u,p,C]),T=(0,o.useCallback)((e=>{v(e),u&&C(Mb.Q.update({indicatorId:u,type:by.J.VolumeOscillator,longCycle:(0,oi.J)(e)}))}),[u,v,C]),D=(0,o.useCallback)((e=>{j(e),u&&C(Mb.Q.update({indicatorId:u,type:by.J.VolumeOscillator,shift:(0,oi.J)(e)}))}),[u,j,C]),P=(0,o.useCallback)((e=>{y(e),u&&C(Mb.Q.update({indicatorId:u,type:by.J.VolumeOscillator,lines:e}))}),[u,y,C]),N=(0,o.useCallback)((e=>{f(e),u&&C(Mb.Q.update({indicatorId:u,type:by.J.VolumeOscillator,levels:e}))}),[C,f,u]),A=Boolean(k)||Boolean(I)||Boolean(L),B=(0,o.useCallback)((()=>{u||C(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:c,type:by.J.VolumeOscillator,shortCycle:(0,oi.J)(g),longCycle:(0,oi.J)(b),shift:(0,oi.J)(m),lines:x,levels:S,heightRatio:kb.dl,yStretch:kb.FQ})),C(Cb.d.close())}),[u,C,c,g,b,m,x,S]),M=(0,o.useCallback)((()=>{p(_y),v(qy),j(Xy),y(Qy.pD),u&&C(Mb.Q.update({indicatorId:u,type:by.J.VolumeOscillator,shortCycle:(0,oi.J)(_y),longCycle:(0,oi.J)(qy),shift:(0,oi.J)(Xy),lines:Qy.pD}))}),[u,C,p,v,j]);return(0,i.jsxs)(_b,Object.assign({testId:"volume-oscillator"},{children:[(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"short-term"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Short Term"),value:g,step:Qy.xz.step.toString(),error:k,onChange:w},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"long-term"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Long Term"),value:b,step:Qy.fG.step.toString(),error:I,onChange:T},void 0)}),void 0)]},void 0),(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"shift"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Shift"),value:m,step:Qy.eP.step.toString(),error:L,onChange:D},void 0)}),void 0),(0,i.jsx)(At.s,{},void 0)]},void 0)]},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:x,onChange:P},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:S,onChange:N},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:A,onSubmit:B,onReset:M},void 0)},void 0)]}),void 0)}));var Zy=s(76866);const Uy=Zy.yz.default.toString(),Ky=Zy.Rf.default.toString(),Yy=(0,o.memo)((()=>{var e,t,s,n,a,r;const l=Rb(),d=Hb(),c=(0,Bb.d)(d),[u,h]=(0,o.useState)(null!==(t=null===(e=c.periodCount)||void 0===e?void 0:e.toString())&&void 0!==t?t:Uy),[g,p]=(0,o.useState)(null!==(n=null===(s=c.shift)||void 0===s?void 0:s.toString())&&void 0!==n?n:Ky),[b,v]=(0,o.useState)(null!==(a=c.lines)&&void 0!==a?a:Zy.UX),[m,j]=(0,o.useState)(null!==(r=c.levels)&&void 0!==r?r:Zy.Mz),x=(0,re.I0)(),y=(0,o.useMemo)((()=>Nb(u,Zy.yz)),[u]),S=(0,o.useMemo)((()=>Nb(g,Zy.Rf)),[g]),f=(0,o.useCallback)((e=>{h(e),d&&x(Mb.Q.update({indicatorId:d,type:by.J.VolumeROC,periodCount:(0,oi.J)(e)}))}),[d,h,x]),C=(0,o.useCallback)((e=>{p(e),d&&x(Mb.Q.update({indicatorId:d,type:by.J.VolumeROC,shift:(0,oi.J)(e)}))}),[d,p,x]),k=(0,o.useCallback)((e=>{v(e),d&&x(Mb.Q.update({indicatorId:d,type:by.J.VolumeROC,lines:e}))}),[d,v,x]),I=(0,o.useCallback)((e=>{j(e),d&&x(Mb.Q.update({indicatorId:d,type:by.J.VolumeROC,levels:e}))}),[x,j,d]),L=Boolean(y),w=(0,o.useCallback)((()=>{d||x(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:l,type:by.J.VolumeROC,periodCount:(0,oi.J)(u),shift:(0,oi.J)(g),lines:b,levels:m,heightRatio:kb.dl,yStretch:kb.FQ})),x(Cb.d.close())}),[d,x,l,g,u,b,m]),T=(0,o.useCallback)((()=>{h(Uy),p(Ky),v(Zy.UX),d&&x(Mb.Q.update({indicatorId:d,type:by.J.VolumeROC,periodCount:(0,oi.J)(Uy),shift:(0,oi.J)(Ky),lines:Zy.UX}))}),[d,x]);return(0,i.jsxs)(_b,Object.assign({testId:"volume-roc"},{children:[(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:u,step:Zy.yz.step.toString(),error:y,onChange:f},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"shift"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Shift"),value:g,step:Zy.Rf.step.toString(),error:S,onChange:C},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:b,onChange:k},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:m,onChange:I},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:L,onSubmit:w,onReset:T},void 0)},void 0)]}),void 0)}));var Gy=s(46037);const eS=Gy.Tb.default.toString(),tS=(0,o.memo)((()=>{var e,t,s,n;const a=Rb(),r=Hb(),l=(0,Bb.d)(r),[d,c]=(0,o.useState)(null!==(t=null===(e=l.periodCount)||void 0===e?void 0:e.toString())&&void 0!==t?t:eS),[u,h]=(0,o.useState)(null!==(s=l.lines)&&void 0!==s?s:Gy.tn),[g,p]=(0,o.useState)(null!==(n=l.levels)&&void 0!==n?n:Gy.o1),b=(0,re.I0)(),v=(0,o.useMemo)((()=>Nb(d,Gy.Tb)),[d]),m=(0,o.useCallback)((e=>{c(e),r&&b(Mb.Q.update({indicatorId:r,type:by.J.ChaikinMoneyFlow,periodCount:(0,oi.J)(e)}))}),[r,c,b]),j=(0,o.useCallback)((e=>{h(e),r&&b(Mb.Q.update({indicatorId:r,type:by.J.ChaikinMoneyFlow,lines:e}))}),[r,h,b]),x=(0,o.useCallback)((e=>{p(e),r&&b(Mb.Q.update({indicatorId:r,type:by.J.ChaikinMoneyFlow,levels:e}))}),[b,p,r]),y=Boolean(v),S=(0,o.useCallback)((()=>{r||b(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:a,type:by.J.ChaikinMoneyFlow,periodCount:(0,oi.J)(d),lines:u,levels:g,heightRatio:kb.dl,yStretch:kb.FQ})),b(Cb.d.close())}),[r,b,a,d,u,g]),f=(0,o.useCallback)((()=>{c(eS),h(Gy.tn),r&&b(Mb.Q.update({indicatorId:r,type:by.J.ChaikinMoneyFlow,periodCount:(0,oi.J)(eS),lines:Gy.tn,levels:Gy.o1}))}),[r,b]);return(0,i.jsxs)(_b,Object.assign({testId:"chaikin-money-flow"},{children:[(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:d,step:Gy.Tb.step.toString(),error:v,onChange:m},void 0)}),void 0),(0,i.jsx)(At.s,{},void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:u,onChange:j},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:g,onChange:x},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:y,onSubmit:S,onReset:f},void 0)},void 0)]}),void 0)}));var sS=s(42871);const iS=sS.lK.default.toString(),oS=sS.wH.default.toString(),nS=sS.FO.default.toString(),aS=sS.HT.default.toString(),rS=sS.N6.default.toString(),lS=sS.Uk.default.toString(),dS=(0,o.memo)((()=>{var e,t,s,n,a,r,l,d,c,u,h,g,p,b;const v=Rb(),m=Hb(),j=(0,Bb.d)(m),[x,y]=(0,o.useState)(null!==(t=null===(e=j.jawsPeriodCount)||void 0===e?void 0:e.toString())&&void 0!==t?t:iS),[S,f]=(0,o.useState)(null!==(n=null===(s=j.jawsShift)||void 0===s?void 0:s.toString())&&void 0!==n?n:oS),[C,k]=(0,o.useState)(null!==(r=null===(a=j.teethPeriodCount)||void 0===a?void 0:a.toString())&&void 0!==r?r:nS),[I,L]=(0,o.useState)(null!==(d=null===(l=j.teethShift)||void 0===l?void 0:l.toString())&&void 0!==d?d:aS),[w,T]=(0,o.useState)(null!==(u=null===(c=j.lipsPeriodCount)||void 0===c?void 0:c.toString())&&void 0!==u?u:rS),[D,P]=(0,o.useState)(null!==(g=null===(h=j.lipsShift)||void 0===h?void 0:h.toString())&&void 0!==g?g:lS),[N,A]=(0,o.useState)(null!==(p=j.lines)&&void 0!==p?p:sS.c4),[B,M]=(0,o.useState)(null!==(b=j.periods)&&void 0!==b?b:kb.zF),$=(0,re.I0)(),E=(0,o.useMemo)((()=>Nb(x,sS.lK)),[x]),F=(0,o.useMemo)((()=>Nb(S,sS.wH)),[S]),R=(0,o.useMemo)((()=>Nb(C,sS.FO)),[C]),W=(0,o.useMemo)((()=>Nb(I,sS.HT)),[I]),H=(0,o.useMemo)((()=>Nb(w,sS.N6)),[w]),z=(0,o.useMemo)((()=>Nb(D,sS.Uk)),[D]),J=(0,o.useCallback)((e=>{y(e),m&&$(Mb.Q.update({indicatorId:m,type:Ib.d.Alligator,jawsPeriodCount:(0,oi.J)(e)}))}),[m,y,$]),Q=(0,o.useCallback)((e=>{f(e),m&&$(Mb.Q.update({indicatorId:m,type:Ib.d.Alligator,jawsShift:(0,oi.J)(e)}))}),[m,f,$]),_=(0,o.useCallback)((e=>{k(e),m&&$(Mb.Q.update({indicatorId:m,type:Ib.d.Alligator,teethPeriodCount:(0,oi.J)(e)}))}),[m,k,$]),q=(0,o.useCallback)((e=>{L(e),m&&$(Mb.Q.update({indicatorId:m,type:Ib.d.Alligator,teethShift:(0,oi.J)(e)}))}),[m,L,$]),X=(0,o.useCallback)((e=>{T(e),m&&$(Mb.Q.update({indicatorId:m,type:Ib.d.Alligator,lipsPeriodCount:(0,oi.J)(e)}))}),[m,T,$]),V=(0,o.useCallback)((e=>{P(e),m&&$(Mb.Q.update({indicatorId:m,type:Ib.d.Alligator,lipsShift:(0,oi.J)(e)}))}),[m,P,$]),Z=(0,o.useCallback)((e=>{A(e),m&&$(Mb.Q.update({indicatorId:m,type:Ib.d.Alligator,lines:e}))}),[m,A,$]),U=(0,o.useCallback)((e=>{M(e),m&&$(Mb.Q.update({indicatorId:m,type:Ib.d.Alligator,periods:e}))}),[m,M,$]),K=Boolean(E)||Boolean(F)||Boolean(R)||Boolean(W)||Boolean(H)||Boolean(z),Y=(0,o.useCallback)((()=>{m||$(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:v,type:Ib.d.Alligator,jawsPeriodCount:(0,oi.J)(x),jawsShift:(0,oi.J)(S),teethPeriodCount:(0,oi.J)(C),teethShift:(0,oi.J)(I),lipsPeriodCount:(0,oi.J)(w),lipsShift:(0,oi.J)(D),lines:N,periods:B})),$(Cb.d.close())}),[m,$,v,x,S,C,I,w,D,N,B]),G=(0,o.useCallback)((()=>{y(iS),f(oS),k(nS),L(aS),T(rS),P(lS),A(sS.c4),M(kb.zF),m&&$(Mb.Q.update({indicatorId:m,type:Ib.d.Alligator,jawsPeriodCount:(0,oi.J)(iS),jawsShift:(0,oi.J)(oS),teethPeriodCount:(0,oi.J)(iS),teethShift:(0,oi.J)(oS),lipsPeriodCount:(0,oi.J)(iS),lipsShift:(0,oi.J)(oS),lines:sS.c4,periods:kb.zF}))}),[m,$]);return(0,i.jsxs)(_b,Object.assign({testId:"alligator"},{children:[(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"jaws-periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Jaws Periods"),value:x,step:sS.lK.step.toString(),error:E,onChange:J},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"jaws-shift"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Jaws Shift"),value:S,step:sS.wH.step.toString(),error:F,onChange:Q},void 0)}),void 0)]},void 0),(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"teeth-periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Teeth Periods"),value:C,step:sS.FO.step.toString(),error:R,onChange:_},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"teeth-shift"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Teeth Shift"),value:I,step:sS.HT.step.toString(),error:W,onChange:q},void 0)}),void 0)]},void 0),(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"lips-periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Lips Periods"),value:w,step:sS.N6.step.toString(),error:H,onChange:X},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"lips-shift"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Lips Shift"),value:D,step:sS.Uk.step.toString(),error:z,onChange:V},void 0)}),void 0)]},void 0)]},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:N,onChange:Z},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"time-frames",id:zb.TimeFrames,label:(0,O.L)("Time Frames"),align:vr.K.left},{children:(0,i.jsx)(Pv,{periods:B,onChange:U},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:K,onSubmit:Y,onReset:G},void 0)},void 0)]}),void 0)}));var cS=s(16565);const uS=cS.lz.default.toString(),hS=(0,o.memo)((()=>{var e,t,s,n;const a=Rb(),r=Hb(),l=(0,Bb.d)(r),[d,c]=(0,o.useState)(null!==(t=null===(e=l.length)||void 0===e?void 0:e.toString())&&void 0!==t?t:uS),[u,h]=(0,o.useState)(null!==(s=l.lines)&&void 0!==s?s:cS.Ei),[g,p]=(0,o.useState)(null!==(n=l.levels)&&void 0!==n?n:cS.l3),b=(0,re.I0)(),v=(0,o.useMemo)((()=>Nb(d,cS.lz)),[d]),m=(0,o.useCallback)((e=>{c(e),r&&b(Mb.Q.update({indicatorId:r,type:Ib.d.CenterOfGravity,length:(0,oi.J)(e)}))}),[r,c,b]),j=(0,o.useCallback)((e=>{h(e),r&&b(Mb.Q.update({indicatorId:r,type:Ib.d.CenterOfGravity,lines:e}))}),[r,h,b]),x=(0,o.useCallback)((e=>{p(e),r&&b(Mb.Q.update({indicatorId:r,type:Ib.d.CenterOfGravity,levels:e}))}),[b,p,r]),y=Boolean(v),S=(0,o.useCallback)((()=>{r||b(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:a,type:Ib.d.CenterOfGravity,length:(0,oi.J)(d),lines:u,levels:g,heightRatio:kb.dl,yStretch:kb.FQ})),b(Cb.d.close())}),[r,b,a,d,u,g]),f=(0,o.useCallback)((()=>{c(uS),h(cS.Ei),r&&b(Mb.Q.update({indicatorId:r,type:Ib.d.CenterOfGravity,length:(0,oi.J)(uS),lines:cS.Ei}))}),[r,b]);return(0,i.jsxs)(_b,Object.assign({testId:"center-of-gravity"},{children:[(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"length"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Length"),value:d,step:cS.lz.step.toString(),error:v,onChange:m},void 0)}),void 0),(0,i.jsx)(At.s,{},void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:u,onChange:j},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:g,onChange:x},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:y,onSubmit:S,onReset:f},void 0)},void 0)]}),void 0)}));var gS=s(25424);const pS=gS.GZ.default.toString(),bS=gS.Rp.default.toString(),vS=(0,o.memo)((()=>{var e,t,s,n,a,r;const l=Rb(),d=Hb(),c=(0,Bb.d)(d),[u,h]=(0,o.useState)(null!==(t=null===(e=c.periodCount)||void 0===e?void 0:e.toString())&&void 0!==t?t:pS),[g,p]=(0,o.useState)(null!==(n=null===(s=c.shift)||void 0===s?void 0:s.toString())&&void 0!==n?n:bS),[b,v]=(0,o.useState)(null!==(a=c.lines)&&void 0!==a?a:gS.yS),[m,j]=(0,o.useState)(null!==(r=c.periods)&&void 0!==r?r:kb.zF),x=(0,re.I0)(),y=(0,o.useMemo)((()=>Nb(u,gS.GZ)),[u]),S=(0,o.useMemo)((()=>Nb(g,gS.Rp)),[g]),f=(0,o.useCallback)((e=>{h(e),d&&x(Mb.Q.update({indicatorId:d,type:Ib.d.Fractals,periodCount:(0,oi.J)(e)}))}),[d,h,x]),C=(0,o.useCallback)((e=>{p(e),d&&x(Mb.Q.update({indicatorId:d,type:Ib.d.Fractals,shift:(0,oi.J)(e)}))}),[d,p,x]),k=(0,o.useCallback)((e=>{v(e),d&&x(Mb.Q.update({indicatorId:d,type:Ib.d.Fractals,lines:e}))}),[d,v,x]),I=(0,o.useCallback)((e=>{j(e),d&&x(Mb.Q.update({indicatorId:d,type:Ib.d.Fractals,periods:e}))}),[d,j,x]),L=Boolean(y)||Boolean(S),w=(0,o.useCallback)((()=>{d||x(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:l,type:Ib.d.Fractals,periodCount:(0,oi.J)(u),shift:(0,oi.J)(g),lines:b,periods:m})),x(Cb.d.close())}),[d,x,l,u,g,b,m]),T=(0,o.useCallback)((()=>{h(pS),p(bS),v(gS.yS),j(kb.zF),d&&x(Mb.Q.update({indicatorId:d,type:Ib.d.Fractals,periodCount:(0,oi.J)(pS),shift:(0,oi.J)(bS),lines:gS.yS,periods:kb.zF}))}),[d,p,x]);return(0,i.jsxs)(_b,Object.assign({testId:"fractals"},{children:[(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:u,step:gS.GZ.step.toString(),error:y,onChange:f},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"shift"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Shift"),value:g,step:gS.Rp.step.toString(),error:S,onChange:C},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:b,onChange:k},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"time-frames",id:zb.TimeFrames,label:(0,O.L)("Time Frames"),align:vr.K.left},{children:(0,i.jsx)(Pv,{periods:m,onChange:I},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:L,onSubmit:w,onReset:T},void 0)},void 0)]}),void 0)})),mS=(0,o.memo)((()=>null));var jS=s(37713);const xS=(0,o.memo)((()=>{var e,t;const s=Rb(),n=Hb(),a=(0,Bb.d)(n),[r,l]=(0,o.useState)(null!==(e=a.lines)&&void 0!==e?e:jS.R6),[d,c]=(0,o.useState)(null!==(t=a.levels)&&void 0!==t?t:jS.oC),u=(0,re.I0)(),h=(0,o.useCallback)((e=>{l(e),n&&u(Mb.Q.update({indicatorId:n,type:Ib.d.HighMinusLow,lines:e}))}),[n,l,u]),g=(0,o.useCallback)((e=>{c(e),n&&u(Mb.Q.update({indicatorId:n,type:Ib.d.HighMinusLow,levels:e}))}),[u,c,n]),p=(0,o.useCallback)((()=>{n||u(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:s,type:Ib.d.HighMinusLow,lines:r,levels:d,heightRatio:kb.dl,yStretch:kb.FQ})),u(Cb.d.close())}),[n,u,s,r,d]),b=(0,o.useCallback)((()=>{l(jS.R6),n&&u(Mb.Q.update({indicatorId:n,type:Ib.d.HighMinusLow,lines:jS.R6}))}),[n,u]);return(0,i.jsxs)(_b,Object.assign({testId:"high-minus-low"},{children:[(0,i.jsx)(i.Fragment,{},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:r,onChange:h},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:d,onChange:g},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:!1,onSubmit:p,onReset:b},void 0)},void 0)]}),void 0)}));var yS=s(33707);const SS=yS.jy.default.toString(),fS=yS.St.default.toString(),OS=yS.nf.default.toString(),CS=yS._4.default.toString(),kS=(0,o.memo)((()=>{var e,t,s,n,a,r,l,d,c,u;const h=Rb(),g=Hb(),p=(0,Bb.d)(g),[b,v]=(0,o.useState)(null!==(t=null===(e=p.tenkanSenPeriodCount)||void 0===e?void 0:e.toString())&&void 0!==t?t:SS),[m,j]=(0,o.useState)(null!==(n=null===(s=p.kijunSenPeriodCount)||void 0===s?void 0:s.toString())&&void 0!==n?n:fS),[x,y]=(0,o.useState)(null!==(r=null===(a=p.senkouSpanBPeriodCount)||void 0===a?void 0:a.toString())&&void 0!==r?r:fS),[S,f]=(0,o.useState)(null!==(d=null===(l=p.shift)||void 0===l?void 0:l.toString())&&void 0!==d?d:CS),[C,k]=(0,o.useState)(null!==(c=p.lines)&&void 0!==c?c:yS.IA),[I,L]=(0,o.useState)(null!==(u=p.periods)&&void 0!==u?u:kb.zF),w=(0,re.I0)(),T=(0,o.useMemo)((()=>Nb(b,yS.jy)),[b]),D=(0,o.useMemo)((()=>Nb(m,yS.St)),[m]),P=(0,o.useMemo)((()=>Nb(x,yS.nf)),[x]),N=(0,o.useMemo)((()=>Nb(S,yS._4)),[S]),A=(0,o.useCallback)((e=>{v(e),g&&w(Mb.Q.update({indicatorId:g,type:Ib.d.IchimokuKinkoHyo,tenkanSenPeriodCount:(0,oi.J)(e)}))}),[g,v,w]),B=(0,o.useCallback)((e=>{j(e),g&&w(Mb.Q.update({indicatorId:g,type:Ib.d.IchimokuKinkoHyo,kijunSenPeriodCount:(0,oi.J)(e)}))}),[g,j,w]),M=(0,o.useCallback)((e=>{y(e),g&&w(Mb.Q.update({indicatorId:g,type:Ib.d.IchimokuKinkoHyo,kijunSenPeriodCount:(0,oi.J)(e)}))}),[g,y,w]),$=(0,o.useCallback)((e=>{f(e),g&&w(Mb.Q.update({indicatorId:g,type:Ib.d.IchimokuKinkoHyo,shift:(0,oi.J)(e)}))}),[g,f,w]),E=(0,o.useCallback)((e=>{k(e),g&&w(Mb.Q.update({indicatorId:g,type:Ib.d.IchimokuKinkoHyo,lines:e}))}),[g,k,w]),F=(0,o.useCallback)((e=>{L(e),g&&w(Mb.Q.update({indicatorId:g,type:Ib.d.IchimokuKinkoHyo,periods:e}))}),[g,L,w]),R=Boolean(T)||Boolean(D)||Boolean(P)||Boolean(N),W=(0,o.useCallback)((()=>{g||w(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:h,type:Ib.d.IchimokuKinkoHyo,tenkanSenPeriodCount:(0,oi.J)(b),kijunSenPeriodCount:(0,oi.J)(m),senkouSpanBPeriodCount:(0,oi.J)(x),shift:(0,oi.J)(S),lines:C,periods:I})),w(Cb.d.close())}),[g,w,h,m,b,x,S,C,I]),H=(0,o.useCallback)((()=>{v(SS),j(fS),y(OS),f(CS),k(yS.IA),L(kb.zF),g&&w(Mb.Q.update({indicatorId:g,type:Ib.d.IchimokuKinkoHyo,tenkanSenPeriodCount:(0,oi.J)(SS),kijunSenPeriodCount:(0,oi.J)(fS),senkouSpanBPeriodCount:(0,oi.J)(OS),shift:(0,oi.J)(CS),lines:yS.IA,periods:kb.zF}))}),[g,f,w]);return(0,i.jsxs)(_b,Object.assign({testId:"ichimoku-kinko-hyo"},{children:[(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"tenkan-sen-periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Tenkan Sen Periods"),value:b,step:yS.jy.step.toString(),error:T,onChange:A},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"kijun-sen-periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Kijun Sen Periods"),value:m,step:yS.St.step.toString(),error:D,onChange:B},void 0)}),void 0)]},void 0),(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"senkou-span-b-periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Senkou Span B Periods"),value:x,step:yS.nf.step.toString(),error:P,onChange:M},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"shift"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Shift"),value:S,step:yS._4.step.toString(),error:N,onChange:$},void 0)}),void 0)]},void 0)]},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:C,onChange:E},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"time-frames",id:zb.TimeFrames,label:(0,O.L)("Time Frames"),align:vr.K.left},{children:(0,i.jsx)(Pv,{periods:I,onChange:F},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:R,onSubmit:W,onReset:H},void 0)},void 0)]}),void 0)}));var IS=s(62821);const LS=IS.UR.default,wS=IS.eX.default.toString(),TS=(0,o.memo)((()=>{var e,t,s,n,a;const r=Rb(),l=Hb(),d=(0,Bb.d)(l),[c,u]=(0,o.useState)(null!==(e=d.frame)&&void 0!==e?e:LS),[h,g]=(0,o.useState)(null!==(s=null===(t=d.shift)||void 0===t?void 0:t.toString())&&void 0!==s?s:wS),[p,b]=(0,o.useState)(null!==(n=d.lines)&&void 0!==n?n:IS.em),[v,m]=(0,o.useState)(null!==(a=d.periods)&&void 0!==a?a:kb.zF),j=(0,re.I0)(),x=(0,o.useMemo)((()=>Nb(h,IS.eX)),[h]),y=(0,o.useCallback)((e=>{u(e),l&&j(Mb.Q.update({indicatorId:l,type:Ib.d.PivotPoints,frame:e}))}),[l,u,j]),S=(0,o.useCallback)((e=>{g(e),l&&j(Mb.Q.update({indicatorId:l,type:Ib.d.PivotPoints,shift:(0,oi.J)(e)}))}),[l,g,j]),f=(0,o.useCallback)((e=>{b(e),l&&j(Mb.Q.update({indicatorId:l,type:Ib.d.PivotPoints,lines:e}))}),[l,b,j]),C=(0,o.useCallback)((e=>{m(e),l&&j(Mb.Q.update({indicatorId:l,type:Ib.d.PivotPoints,periods:e}))}),[l,m,j]),k=Boolean(x),I=(0,o.useCallback)((()=>{l||j(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:r,type:Ib.d.PivotPoints,frame:c,shift:(0,oi.J)(h),lines:p,periods:v})),j(Cb.d.close())}),[l,j,r,c,h,p,v]),L=(0,o.useCallback)((()=>{u(LS),g(wS),b(IS.em),m(kb.zF),l&&j(Mb.Q.update({indicatorId:l,type:Ib.d.PivotPoints,frame:LS,shift:(0,oi.J)(wS),lines:IS.em,periods:kb.zF}))}),[l,g,j]);return(0,i.jsxs)(_b,Object.assign({testId:"pivot-points"},{children:[(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"frame"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("Frame"),options:kb.QQ,value:c,onChange:y},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"shift"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Shift"),value:h,step:IS.eX.step.toString(),error:x,onChange:S},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:p,onChange:f},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"time-frames",id:zb.TimeFrames,label:(0,O.L)("Time Frames"),align:vr.K.left},{children:(0,i.jsx)(Pv,{periods:v,onChange:C},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:k,onSubmit:I,onReset:L},void 0)},void 0)]}),void 0)}));var DS=s(16521);const PS=DS.YL.default.toString(),NS=(0,o.memo)((()=>{var e,t,s,n;const a=Rb(),r=Hb(),l=(0,Bb.d)(r),[d,c]=(0,o.useState)(null!==(t=null===(e=l.limitMove)||void 0===e?void 0:e.toString())&&void 0!==t?t:PS),[u,h]=(0,o.useState)(null!==(s=l.lines)&&void 0!==s?s:DS.MC),[g,p]=(0,o.useState)(null!==(n=l.levels)&&void 0!==n?n:DS.J9),b=(0,re.I0)(),v=(0,o.useMemo)((()=>Nb(d,DS.YL)),[d]),m=(0,o.useCallback)((e=>{c(e),r&&b(Mb.Q.update({indicatorId:r,type:Ib.d.SwingIndex,limitMove:(0,oi.J)(e)}))}),[r,c,b]),j=(0,o.useCallback)((e=>{h(e),r&&b(Mb.Q.update({indicatorId:r,type:Ib.d.SwingIndex,lines:e}))}),[r,h,b]),x=(0,o.useCallback)((e=>{p(e),r&&b(Mb.Q.update({indicatorId:r,type:Ib.d.SwingIndex,levels:e}))}),[b,p,r]),y=Boolean(v),S=(0,o.useCallback)((()=>{r||b(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:a,type:Ib.d.SwingIndex,limitMove:(0,oi.J)(d),lines:u,levels:g,heightRatio:kb.dl,yStretch:kb.FQ})),b(Cb.d.close())}),[r,b,a,d,u,g]),f=(0,o.useCallback)((()=>{c(PS),h(DS.MC),r&&b(Mb.Q.update({indicatorId:r,type:Ib.d.SwingIndex,limitMove:(0,oi.J)(PS),lines:DS.MC}))}),[r,b]);return(0,i.jsxs)(_b,Object.assign({testId:"swing-index"},{children:[(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"limit-move-value"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Limit Move Value"),value:d,step:DS.YL.step.toString(),error:v,onChange:m},void 0)}),void 0),(0,i.jsx)(At.s,{},void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:u,onChange:j},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:g,onChange:x},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:y,onSubmit:S,onReset:f},void 0)},void 0)]}),void 0)}));var AS=s(16130);const BS=AS.aK.default.toString(),MS=(0,o.memo)((()=>{var e,t,s,n;const a=Rb(),r=Hb(),l=(0,Bb.d)(r),[d,c]=(0,o.useState)(null!==(t=null===(e=l.shift)||void 0===e?void 0:e.toString())&&void 0!==t?t:BS),[u,h]=(0,o.useState)(null!==(s=l.lines)&&void 0!==s?s:AS.fb),[g,p]=(0,o.useState)(null!==(n=l.periods)&&void 0!==n?n:kb.zF),b=(0,re.I0)(),v=(0,o.useMemo)((()=>Nb(d,AS.aK)),[d]),m=(0,o.useCallback)((e=>{c(e),r&&b(Mb.Q.update({indicatorId:r,type:Ib.d.TypicalPrice,shift:(0,oi.J)(e)}))}),[r,c,b]),j=(0,o.useCallback)((e=>{h(e),r&&b(Mb.Q.update({indicatorId:r,type:Ib.d.TypicalPrice,lines:e}))}),[r,h,b]),x=(0,o.useCallback)((e=>{p(e),r&&b(Mb.Q.update({indicatorId:r,type:Ib.d.TypicalPrice,periods:e}))}),[r,p,b]),y=Boolean(v),S=(0,o.useCallback)((()=>{r||b(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:a,type:Ib.d.TypicalPrice,shift:(0,oi.J)(d),lines:u,periods:g})),b(Cb.d.close())}),[r,b,a,d,u,g]),f=(0,o.useCallback)((()=>{c(BS),h(AS.fb),p(kb.zF),r&&b(Mb.Q.update({indicatorId:r,type:Ib.d.TypicalPrice,shift:(0,oi.J)(BS),lines:AS.fb,periods:kb.zF}))}),[r,c,b]);return(0,i.jsxs)(_b,Object.assign({testId:"typical-price"},{children:[(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"shift"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Shift"),value:d,step:AS.aK.step.toString(),error:v,onChange:m},void 0)}),void 0),(0,i.jsx)(At.s,{},void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:u,onChange:j},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"time-frames",id:zb.TimeFrames,label:(0,O.L)("Time Frames"),align:vr.K.left},{children:(0,i.jsx)(Pv,{periods:g,onChange:x},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:y,onSubmit:S,onReset:f},void 0)},void 0)]}),void 0)}));var $S=s(93701);const ES=$S.Im.default,FS=$S.rv.default.toString(),RS=$S.Vt.default.toString(),WS=$S.SE.default.toString(),HS=(0,o.memo)((()=>{var e,t,s,n,a,r,l,d,c;const u=Rb(),h=Hb(),g=(0,Bb.d)(h),[p,b]=(0,o.useState)(null!==(e=g.source)&&void 0!==e?e:ES),[v,m]=(0,o.useState)(null!==(s=null===(t=g.periodCount)||void 0===t?void 0:t.toString())&&void 0!==s?s:FS),[j,x]=(0,o.useState)(null!==(a=null===(n=g.sigma)||void 0===n?void 0:n.toString())&&void 0!==a?a:RS),[y,S]=(0,o.useState)(null!==(l=null===(r=g.shift)||void 0===r?void 0:r.toString())&&void 0!==l?l:WS),[f,C]=(0,o.useState)(null!==(d=g.lines)&&void 0!==d?d:$S.SD),[k,I]=(0,o.useState)(null!==(c=g.periods)&&void 0!==c?c:kb.zF),L=(0,re.I0)(),w=(0,o.useMemo)((()=>Nb(v,$S.rv)),[v]),T=(0,o.useMemo)((()=>Nb(j,$S.Vt)),[j]),D=(0,o.useMemo)((()=>Nb(y,$S.SE)),[y]),P=(0,o.useCallback)((e=>{b(e),h&&L(Mb.Q.update({indicatorId:h,type:Ib.d.VIDYAMovingAverage,source:e}))}),[h,b,L]),N=(0,o.useCallback)((e=>{m(e),h&&L(Mb.Q.update({indicatorId:h,type:Ib.d.VIDYAMovingAverage,periodCount:(0,oi.J)(e)}))}),[h,m,L]),A=(0,o.useCallback)((e=>{x(e),h&&L(Mb.Q.update({indicatorId:h,type:Ib.d.VIDYAMovingAverage,sigma:(0,oi.J)(e)}))}),[h,x,L]),B=(0,o.useCallback)((e=>{S(e),h&&L(Mb.Q.update({indicatorId:h,type:Ib.d.VIDYAMovingAverage,shift:(0,oi.J)(e)}))}),[h,S,L]),M=(0,o.useCallback)((e=>{C(e),h&&L(Mb.Q.update({indicatorId:h,type:Ib.d.VIDYAMovingAverage,lines:e}))}),[h,C,L]),$=(0,o.useCallback)((e=>{I(e),h&&L(Mb.Q.update({indicatorId:h,type:Ib.d.VIDYAMovingAverage,periods:e}))}),[h,I,L]),E=Boolean(w)||Boolean(D),F=(0,o.useCallback)((()=>{h||L(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:u,type:Ib.d.VIDYAMovingAverage,source:p,periodCount:(0,oi.J)(v),sigma:(0,oi.J)(j),shift:(0,oi.J)(y),lines:f,periods:k})),L(Cb.d.close())}),[h,L,u,p,v,y,j,f,k]),R=(0,o.useCallback)((()=>{b(ES),m(FS),x(RS),S(WS),C($S.SD),I(kb.zF),h&&L(Mb.Q.update({indicatorId:h,type:Ib.d.VIDYAMovingAverage,source:ES,periodCount:(0,oi.J)(FS),sigma:(0,oi.J)(RS),shift:(0,oi.J)(WS),lines:$S.SD,periods:kb.zF}))}),[h,S,L]);return(0,i.jsxs)(_b,Object.assign({testId:"vidya"},{children:[(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"source"},{children:(0,i.jsx)(Nv,{label:(0,O.L)("Source"),options:kb.yT,value:p,onChange:P},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"periods"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Periods"),value:v,step:$S.rv.step.toString(),error:w,onChange:N},void 0)}),void 0)]},void 0),(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"sigma"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Sigma"),value:j,step:$S.Vt.step.toString(),error:T,onChange:A},void 0)}),void 0),(0,i.jsx)(At.s,Object.assign({testId:"shift"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Shift"),value:y,step:$S.SE.step.toString(),error:D,onChange:B},void 0)}),void 0)]},void 0)]},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:f,onChange:M},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"time-frames",id:zb.TimeFrames,label:(0,O.L)("Time Frames"),align:vr.K.left},{children:(0,i.jsx)(Pv,{periods:k,onChange:$},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:E,onSubmit:F,onReset:R},void 0)},void 0)]}),void 0)}));var zS=s(95812);const JS=zS.LI.default.toString(),QS=(0,o.memo)((()=>{var e,t,s,n;const a=Rb(),r=Hb(),l=(0,Bb.d)(r),[d,c]=(0,o.useState)(null!==(t=null===(e=l.shift)||void 0===e?void 0:e.toString())&&void 0!==t?t:JS),[u,h]=(0,o.useState)(null!==(s=l.lines)&&void 0!==s?s:zS.C7),[g,p]=(0,o.useState)(null!==(n=l.periods)&&void 0!==n?n:kb.zF),b=(0,re.I0)(),v=(0,o.useMemo)((()=>Nb(d,zS.LI)),[d]),m=(0,o.useCallback)((e=>{c(e),r&&b(Mb.Q.update({indicatorId:r,type:Ib.d.WeightedClose,shift:(0,oi.J)(e)}))}),[r,c,b]),j=(0,o.useCallback)((e=>{h(e),r&&b(Mb.Q.update({indicatorId:r,type:Ib.d.WeightedClose,lines:e}))}),[r,h,b]),x=(0,o.useCallback)((e=>{p(e),r&&b(Mb.Q.update({indicatorId:r,type:Ib.d.WeightedClose,periods:e}))}),[r,p,b]),y=Boolean(v),S=(0,o.useCallback)((()=>{r||b(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:a,type:Ib.d.WeightedClose,shift:(0,oi.J)(d),lines:u,periods:g})),b(Cb.d.close())}),[r,b,a,d,u,g]),f=(0,o.useCallback)((()=>{c(JS),h(zS.C7),p(kb.zF),r&&b(Mb.Q.update({indicatorId:r,type:Ib.d.WeightedClose,shift:(0,oi.J)(JS),lines:zS.C7,periods:kb.zF}))}),[r,c,b]);return(0,i.jsxs)(_b,Object.assign({testId:"weighted-close"},{children:[(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"50%",testId:"shift"},{children:(0,i.jsx)(Pb,{label:(0,O.L)("Shift"),value:d,step:zS.LI.step.toString(),error:v,onChange:m},void 0)}),void 0),(0,i.jsx)(At.s,{},void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:u,onChange:j},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"time-frames",id:zb.TimeFrames,label:(0,O.L)("Time Frames"),align:vr.K.left},{children:(0,i.jsx)(Pv,{periods:g,onChange:x},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:y,onSubmit:S,onReset:f},void 0)},void 0)]}),void 0)}));var _S=s(69930);const qS=(0,o.memo)((()=>{var e,t;const s=Rb(),n=Hb(),a=(0,Bb.d)(n),[r,l]=(0,o.useState)(null!==(e=a.lines)&&void 0!==e?e:_S.tw),[d,c]=(0,o.useState)(null!==(t=a.levels)&&void 0!==t?t:_S.wG),u=(0,re.I0)(),h=(0,o.useCallback)((e=>{l(e),n&&u(Mb.Q.update({indicatorId:n,type:Ib.d.WilliamsAccumulationDistribution,lines:e}))}),[n,l,u]),g=(0,o.useCallback)((e=>{c(e),n&&u(Mb.Q.update({indicatorId:n,type:Ib.d.WilliamsAccumulationDistribution,levels:e}))}),[u,c,n]),p=(0,o.useCallback)((()=>{n||u(Mb.Q.create({indicatorId:(0,Eb.Z)(),chartId:s,type:Ib.d.WilliamsAccumulationDistribution,lines:r,levels:d,heightRatio:kb.dl,yStretch:kb.FQ})),u(Cb.d.close())}),[n,u,s,r,d]),b=(0,o.useCallback)((()=>{l(_S.tw),n&&u(Mb.Q.update({indicatorId:n,type:Ib.d.WilliamsAccumulationDistribution,lines:_S.tw}))}),[n,u]);return(0,i.jsxs)(_b,Object.assign({testId:"williams-accumulation-distribution"},{children:[(0,i.jsx)(i.Fragment,{children:"            "},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(Qb,{children:[(0,i.jsx)(br.O,Object.assign({testId:"lines",id:zb.Lines,label:(0,O.L)("Lines"),align:vr.K.left},{children:(0,i.jsx)(dv,{lines:r,onChange:h},void 0)}),void 0),(0,i.jsx)(br.O,Object.assign({testId:"levels",id:zb.TimeFrames,label:(0,O.L)("Levels"),align:vr.K.left},{children:(0,i.jsx)(vv,{levels:d,onChange:g},void 0)}),void 0)]},void 0)},void 0),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(qb,{disabled:!1,onSubmit:p,onReset:b},void 0)},void 0)]}),void 0)}));class XS extends o.Component{constructor(){super(...arguments),this.onClose=()=>{const{close:e}=this.props;e()},this.onSelectPage=(e,t)=>{const{changeType:s}=this.props,i=t;s(kb.cV[i][0])},this.onChange=e=>{const{changeType:t}=this.props;t(e)}}render(){const{isShown:e,activePage:t,rules:s}=this.props;if(!e)return null;const o=Db().default.pages[t];return(0,i.jsxs)(ye.M,Object.assign({title:o.title,testId:"indicator-dialog",onClose:this.onClose,width:450,height:430,extend:{root:s.dialog(this.props),content:s.dialogContent(this.props)}},{children:[this.renderLeftContent(),this.renderRightContent()]}),void 0)}renderLeftContent(){const{activePage:e,indicatorId:t}=this.props;return(0,i.jsx)(Se.N,{groups:Db(void 0!==t),activePage:e,onSelectPage:this.onSelectPage},void 0)}renderRightContent(){const{activePage:e,styles:t}=this.props,s=Db().default.pages[e].description;return(0,i.jsxs)("div",Object.assign({className:t.root},{children:[(0,i.jsx)(ge.X,{children:(0,i.jsx)(mo.A,{children:s},void 0)},void 0),(0,i.jsxs)("div",Object.assign({className:t.pageContent},{children:[(0,i.jsx)(ge.X,Object.assign({testId:"indicator-name"},{children:this.renderSelect()}),void 0),(0,i.jsx)(ge.X,Object.assign({flexGrow:1},{children:this.renderActiveComponent()}),void 0)]}),void 0)]}),void 0)}renderSelect(){const{indicatorType:e,activePage:t,indicatorId:s}=this.props,o=kb.cV[t].filter((e=>e!==Ib.d.HeikinAshi)).map((e=>({value:e,label:(0,Lb.K)(e)})));return(0,i.jsx)(Ct.P,{testId:"indicator",value:e,options:o,disabled:void 0!==s,onChange:this.onChange},void 0)}renderActiveComponent(){const{indicatorType:e}=this.props,t=function(e){const t=(0,fb._)(e);switch(t){case wb.U.Trend:return function(e){switch(e){case $b.J.Median:return Rv;case $b.J.SimpleMovingAverage:return Zv;case $b.J.HullMovingAverage:return wm;case $b.J.AccumulativeSwingIndex:return jv;case $b.J.Aroon:return Sv;case $b.J.ExponentialMovingAverage:return $v;case $b.J.WellesWilderSmoothing:return ym;case $b.J.DirectionalMovementSystem:return Cv;case $b.J.AverageDirectionalMovementIndexRating:return Om;case $b.J.ParabolicSar:return Qv;case $b.J.SuperTrend:return em;case $b.J.TriangularMovingAverage:return cm;case $b.J.TimeSeriesMovingAverage:return nm;case $b.J.WeightedMovingAverage:return bm;default:return(0,vs.N)(e)}}(e);case wb.U.Oscillators:return function(e){switch(e){case Dm.l.CommodityChannelIndex:return Am;case Dm.l.AcceleratorOscillator:return nx;case Dm.l.AwesomeOscillator:return rx;case Dm.l.CyberCycle:return $m;case Dm.l.DetrendedPriceOscillator:return Hm;case Dm.l.LinearRegressionRSquared:return _m;case Dm.l.LinearRegressionSlope:return Zm;case Dm.l.MacdCrossover:return tj;case Dm.l.MacdHistogram:return rj;case Dm.l.MassIndex:return cj;case Dm.l.MomentumOscillator:return pj;case Dm.l.PriceOscillator:return yj;case Dm.l.PriceRoc:return Cj;case Dm.l.RainbowOscillator:return Tj;case Dm.l.RelativeStrengthIndex:return Aj;case Dm.l.StochasticOscillator:return Rj;case Dm.l.Trix:return Jj;case Dm.l.UltimateOscillator:return Vj;case Dm.l.VerticalHorizontalFilter:return ex;case Dm.l.WilliamsPctR:return ix;default:return(0,vs.N)(e)}}(e);case wb.U.Volatility:return function(e){switch(e){case dx.B.TrueRange:return uy;case dx.B.AverageTrueRange:return ux;case dx.B.LinearRegressionForecast:return qx;case dx.B.BollingerBands:return mx;case dx.B.ChaikinVolatility:return fx;case dx.B.DonchianChannel:return Ix;case dx.B.FractalChaosBands:return Tx;case dx.B.StandardDeviation:return dy;case dx.B.HistoricalVolatility:return Mx;case dx.B.KeltnerChannels:return Hx;case dx.B.LinearRegressionIntercept:return Kx;case dx.B.PolynomialRegressionChannels:return oy;case dx.B.TickVolume:return gy;default:return(0,vs.N)(e)}}(e);case wb.U.Volume:return function(e){switch(e){case by.J.MoneyFlowIndex:return Oy;case by.J.ChaikinMoneyFlow:return tS;case by.J.NegativeVolumeIndex:return Ly;case by.J.EaseOfMovement:return xy;case by.J.OnBalanceVolume:return Py;case by.J.PositiveVolumeIndex:return My;case by.J.PriceVolumeTrend:return Ry;case by.J.TradeVolumeIndex:return Jy;case by.J.VolumeOscillator:return Vy;case by.J.VolumeROC:return Yy;default:return(0,vs.N)(e)}}(e);case wb.U.Other:return function(e){switch(e){case Ib.d.Alligator:return dS;case Ib.d.SwingIndex:return NS;case Ib.d.HighMinusLow:return xS;case Ib.d.TypicalPrice:return MS;case Ib.d.CenterOfGravity:return hS;case Ib.d.Fractals:return vS;case Ib.d.HeikinAshi:return mS;case Ib.d.IchimokuKinkoHyo:return kS;case Ib.d.PivotPoints:return TS;case Ib.d.VIDYAMovingAverage:return HS;case Ib.d.WeightedClose:return QS;case Ib.d.WilliamsAccumulationDistribution:return qS;default:return(0,vs.N)(e)}}(e);default:return(0,vs.N)(t)}}(e);return(0,i.jsx)(t,{},void 0)}}const VS=(0,n.$)(Ob,{changeType:Cb.d.changeType,close:Cb.d.close})((0,x.Z)((()=>({root:{flex:1,display:"flex",flexDirection:"column"},dialog:{position:"relative"},dialogContent:{position:"relative",display:"flex",flexDirection:"column"},pageContent:{flexGrow:1,position:"relative",display:"flex",flexDirection:"column"}})))(XS));var ZS=s(99259);const US=l()([(0,u.$)(ZS.C).isShown()],(e=>({isShown:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var KS=s(99862);const YS=()=>({root:{width:330},button:{width:80},text:{textAlign:"center"}}),GS=(0,o.memo)((()=>{const{isShown:e}=(0,ne.v)(US),t=(0,re.I0)(),{rules:s}=(0,te.X)(YS,{}),n=(0,o.useCallback)((()=>{t(KS.mk.close())}),[t]),a=(0,o.useCallback)((()=>{t(KS.mk.confirm()),t(KS.mk.close())}),[t]);return e?(0,i.jsxs)(fa.V,Object.assign({title:(0,O.L)("Confirm display of all history"),onClose:n,extend:{container:s.root}},{children:[(0,i.jsx)(ge.X,Object.assign({extend:{root:s.text}},{children:(0,O.L)("Are you sure you want to display trades for the whole period of the account’s existence?")}),void 0),(0,i.jsx)(Bt.I,{},void 0),(0,i.jsxs)(ge.X,Object.assign({justifyContent:"space-evenly"},{children:[(0,i.jsx)(ut.K,Object.assign({onClick:a,wide:!0,extend:{root:s.button}},{children:(0,O.L)("Yes")}),void 0),(0,i.jsx)(qo.z,Object.assign({onClick:n,wide:!0,extend:{root:s.button}},{children:(0,O.L)("No")}),void 0)]}),void 0)]}),void 0):null})),ef=(0,o.memo)((()=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Bc,{},void 0),(0,i.jsx)(jb,{},void 0),(0,i.jsx)(Ju,{},void 0),(0,i.jsx)(Qu.D,{},void 0),(0,i.jsx)(Zu,{},void 0),(0,i.jsx)(Yu,{},void 0),(0,i.jsx)(xn,{},void 0),(0,i.jsx)(Sa,{},void 0),(0,i.jsx)(Tn,{},void 0),(0,i.jsx)(eu,{},void 0),(0,i.jsx)(_a,{},void 0),(0,i.jsx)(uc,{},void 0),(0,i.jsx)(Pc,{},void 0),(0,i.jsx)(GS,{},void 0),(0,i.jsx)(cu,{},void 0),(0,i.jsx)(Nu,{},void 0),(0,i.jsx)(Ru,{},void 0),(0,i.jsx)(VS,{},void 0)]},void 0)));var tf=s(56594),sf=s(62627);const of=l()([tf.Z,(0,u.$)(g.C).isMainMenuVisible(),(0,u.$)(c.H).data.ctNetUrl(),(0,u.$)(c.H).data.disableTradeApp(),(0,u.$)(m.Z).copy.isEnabled()],((e,t,s,i,o)=>({isMainMenuVisible:t,isRootApp:e===sf.l.Trader,isAutomateAvailable:Boolean(s),isTraderDisabled:Boolean(i),isCopyEnabled:Boolean(o),isAnalyzeAvailable:!0})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var nf=s(17646);const af=l()([nf.h,(0,u.$)(c.H).data.isLcg(),(0,u.$)(c.H).data.isKawase()],((e,t,s)=>({isFundsManagementDisabled:e,isLcg:t,isKawase:s})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class rf extends o.Component{render(){const{badge:e,rules:t,source:s,size:o,disabled:n,styles:a}=this.props;return(0,i.jsx)(se.J,Object.assign({source:s,size:o,disabled:n,extend:{root:t.root(this.props)}},{children:(0,i.jsx)("span",Object.assign({className:a.badge},{children:e}),void 0)}),void 0)}}const lf=(0,x.Z)((e=>{const{buttonBackgroundColor:t,foregroundColor:s}=e.theme.palette.semantic;return{root:{fill:!0===e.disabled?s.muted1:void 0},badge:Object.assign(Object.assign(Object.assign(Object.assign({position:"absolute",top:0,right:"-25%"},(0,X.o)(0,2)),(0,V.E)(Z.q0)),{color:s.primary1}),(0,Q.O)({color:t.positiveNormal}))}}))(rf);var df=s(36066);const cf=l()([(0,Ae.P)().route(),(0,u.$)(df.U).location.pathname(),(0,u.$)(g.C).isSupplementaryMenuVisible()],((e,t,s)=>{let i;return i=e===he.Z.Copy?function(e){return Boolean((0,a.LX)(e,{path:he.Z.Copy}))}(t):e===t,{isCurrentApp:i,isSupplementaryMenuVisible:s}}))(Object.assign({keySelector:(0,Ae.P)().route()},(0,d.jo)()));var uf=s(47148),hf=s(29346),gf=s(43680),pf=s(83829);const bf=l()([(0,u.$)(pf.M).state(),tf.Z,$.S],((e,t,s)=>({state:e,isVisible:t!==sf.l.Copy,accountId:void 0!==s?Ns.P.accountIdToDomain(s):void 0})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var vf=s(3168),mf=s(67130),jf=s(76656),xf=s(61468);class yf extends o.Component{constructor(){super(...arguments),this.renderElement=()=>()=>{const{styles:e,rules:t}=this.props;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",Object.assign({className:e.icon},{children:(0,i.jsx)(se.J,{source:ie.Y.cross,size:oe.J.Medium,extend:{root:t.closeIcon(this.props)},onClick:this.onClose},void 0)}),void 0),this.renderContent()]},void 0)},this.renderContent=()=>{const{state:e,styles:t}=this.props,s=e===gf.A.VISIBLE_FOR_SUCCESSFUL?(0,O.L)("We've noticed you made a great profit on your account. We invite you to become a Strategy Provider in {0} Copy. Earn even more by letting others copy your strategy for a fee.","cTrader"):(0,O.L)("Discover a large pool of trading strategies to copy or become a Strategy Provider yourself and let others copy your strategy for a fee."),o=e===gf.A.VISIBLE_FOR_SUCCESSFUL?this.renderButtonForSuccessful():this.renderCommonButton();return(0,i.jsxs)("div",Object.assign({className:t.root},{children:[(0,i.jsx)("div",Object.assign({className:t.title},{children:(0,O.L)("Benefit more from successful trading!")}),void 0),(0,i.jsx)(We.H,Object.assign({textColor:He.d.Primary,isMultiLine:!0},{children:s}),void 0),o,(0,i.jsx)("a",Object.assign({className:t.hideLink,onClick:this.onHide},{children:(0,O.L)("Hide and do not show again")}),void 0)]}),void 0)},this.onCopyClick=()=>{const{push:e}=this.props;e(he.Z.Copy)},this.onBecomeClick=()=>{const{accountId:e,pushAccount:t,openEditDialog:s}=this.props;t(e),s({type:mf.W.Create,accountId:e})},this.onClose=()=>{const{close:e}=this.props;e()},this.onHide=e=>{e.stopPropagation();const{setDoNotShow:t,close:s}=this.props;t(),s()}}render(){const{state:e,isVisible:t,children:s,placement:o,offsetX:n,offsetY:a,rules:r}=this.props,l=e!==gf.A.HIDDEN&&t;return(0,i.jsxs)(xf.B,Object.assign({open:l,placement:o,offsetX:n,offsetY:a,extend:{popper:r.popper(this.props)}},{children:[s,this.renderElement()]}),void 0)}renderCommonButton(){const{rules:e}=this.props;return(0,i.jsx)(ut.K,Object.assign({onClick:this.onCopyClick,extend:{root:e.becomeProviderButton(this.props),content:e.becomeProviderButtonContent(this.props)}},{children:(0,O.L)("Launch {0} Copy","cTrader")}),void 0)}renderButtonForSuccessful(){const{rules:e}=this.props;return(0,i.jsx)(ut.K,Object.assign({onClick:this.onBecomeClick,extend:{root:e.becomeProviderButton(this.props),content:e.becomeProviderButtonContent(this.props)}},{children:(0,O.L)("Become a Strategy Provider")}),void 0)}}const Sf=(0,n.$)(bf,{close:hf.c.close,setDoNotShow:hf.c.setDoNotShow,push:uf.n.push,pushAccount:uf.n.pushAccount,openEditDialog:jf.z.open})((0,x.Z)((e=>{const{placement:t}=e,{body:s}=e.theme.font.semantic,{tooltip:i,backgroundColor:o,foregroundColor:n}=e.theme.palette.semantic,a="left-start"===t?{":before":Object.assign(Object.assign({},(0,vf.Ar)(Qt._7.Left,13,o.strokeNormal)),{top:9,left:0,zIndex:1}),":after":Object.assign(Object.assign({},(0,vf.Ar)(Qt._7.Left,12,i.backgroundColor)),{top:10,left:0,zIndex:2})}:{":before":Object.assign(Object.assign({},(0,vf.Ar)(Qt._7.Bottom,14,o.strokeNormal)),{bottom:-28,left:29,zIndex:1}),":after":Object.assign(Object.assign({},(0,vf.Ar)(Qt._7.Bottom,12,i.backgroundColor)),{bottom:-24,left:32,zIndex:2})};return{root:{display:"flex",flexDirection:"column"},popper:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({position:"relative",width:350,display:"flex",flexDirection:"column",alignItems:"flex-start"},(0,X.o)(2*Z.W0,8*Z.W0,3*Z.W0,2*Z.W0)),{overflow:"visible",boxShadow:"none"}),(0,V.E)(Z.q0)),(0,Q.O)({color:i.backgroundColor})),{border:`1px solid ${o.strokeNormal}`,nested:Object.assign({},a)}),icon:{position:"absolute",right:Z.W0,top:Z.W0},closeIcon:{fill:n.secondary},title:{fontSize:s.tertiary,color:n.primary2,fontWeight:"bold",marginBottom:2*Z.W0},becomeProviderButton:{marginTop:3*Z.W0},becomeProviderButtonContent:{width:"auto",flexGrow:0,paddingLeft:6*Z.W0,paddingRight:6*Z.W0},hideLink:{marginTop:3*Z.W0,color:"#00B0FF",textDecoration:"underline"}}}))(yf));var ff=s(88689);class Of extends o.Component{constructor(){super(...arguments),this.onClick=e=>{const{onClick:t,toggleMainMenu:s,push:i,setAppName:o,disabled:n,route:a,isCurrentApp:r}=this.props;e.preventDefault(),n||(t?t():a&&(r?s({}):(i(a),o(function(e){switch(e){case he.Z.Trader:return sf.l.Trader;case he.Z.Copy:return sf.l.Copy;case he.Z.Analyze:return sf.l.Analyze;case he.Z.Automate:return sf.l.Automate;default:return sf.l.Trader}}(a)))))}}render(){const{text:e,isCurrentApp:t,expanded:s,children:o,styles:n,testId:a}=this.props;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",Object.assign({className:n.link,onClick:this.onClick},{children:s?this.renderContent():this.renderTooltip()}),e),t&&s&&o&&(0,i.jsx)("div",Object.assign({className:n.children},{children:o}),void 0)]},void 0)}renderTooltip(){const{placement:e,text:t,styles:s,rules:o}=this.props;return(0,i.jsxs)(zs.b,Object.assign({placement:null!=e?e:"right",placementByCursor:!1,extend:{root:o.tooltip(this.props)}},{children:[this.renderContent(),(0,i.jsx)("div",Object.assign({className:s.tooltipText},{children:t}),void 0)]}),void 0)}renderContent(){const{expanded:e,styles:t}=this.props;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",Object.assign({className:t.icon},{children:this.renderIcon()}),void 0),(0,i.jsxs)("div",Object.assign({className:t.content},{children:[e&&this.renderText(),e&&this.renderMark(),e&&this.renderExternalLink()]}),void 0)]},void 0)}renderIcon(){const{route:e,icon:t,badge:s,disabled:o,expanded:n}=this.props;return e!==he.Z.Copy||n?(0,i.jsx)(lf,{size:20,badge:s,source:t,disabled:o},0):(0,i.jsx)(Sf,Object.assign({placement:"left-start",offsetX:-9,offsetY:20},{children:(0,i.jsx)(lf,{size:20,badge:s,source:t,disabled:o},0)}),void 0)}renderText(){const{route:e,text:t,expanded:s,isSupplementaryMenuVisible:o,styles:n}=this.props;if(e===he.Z.Copy&&s){const e=o?"left-start":"top-start",s=o?-20:-28,a=20;return(0,i.jsx)(Sf,Object.assign({placement:e,offsetX:s,offsetY:a},{children:(0,i.jsx)("div",Object.assign({className:n.text},{children:t}),void 0)}),void 0)}return(0,i.jsx)("div",Object.assign({className:n.text},{children:t}),void 0)}renderMark(){const{mark:e,styles:t}=this.props;return e&&(0,i.jsx)("div",Object.assign({className:t.mark},{children:e}),void 0)}renderExternalLink(){const{isExternalLink:e}=this.props;return e&&(0,i.jsx)(se.J,{source:ie.Y.ext,size:oe.J.ExtraSmall},void 0)}}const Cf=(0,n.$)(cf,{push:uf.n.push,setAppName:ff.E.setName,toggleMainMenu:Nt.m.toggleMainMenuVisibility})((0,x.Z)((e=>{const{markColor:t,route:s,isCurrentApp:i,disabled:o,expanded:n}=e,{buttonBackgroundColor:a,foregroundColor:r,backgroundColor:l}=e.theme.palette.semantic,d=Boolean(s),c=n||i?a.positiveNormal:l.secondaryNormal,u=n?a.positiveHover:l.secondaryHover,h=(0,J.p)("leftMenuIcon"),g=i||!0===o?{}:Object.assign(Object.assign({},(0,Q.O)({color:l.tertiaryHover})),{[`& .${h}`]:Object.assign({},(0,Q.O)({color:d?u:l.tertiaryHover}))}),p=!0===o?{color:r.muted1}:{};return{link:Object.assign(Object.assign({display:"flex",height:39,flexBasis:39,flexShrink:0,alignItems:"center",whiteSpace:"nowrap",fontWeight:i?"bold":"normal",fill:d&&(n||i)?r.primary1:r.primary2},(0,Q.O)({color:i?a.positiveNormal:l.tertiaryNormal})),{color:i?r.primary1:r.primary2,marginBottom:1,overflow:"hidden",nested:{":hover":Object.assign({},g),":last-child":{marginBottom:0}}}),content:Object.assign(Object.assign({},(0,vn.f)(1)),{display:"flex",flexDirection:"row",justifyContent:"space-between",marginLeft:n?14:0,marginRight:n?2*Z.W0:0}),text:Object.assign({},p),mark:Object.assign(Object.assign({},(0,V.E)(Z.q0)),{borderWidth:1,borderStyle:"solid",borderColor:t,color:t,paddingLeft:Z.W0,paddingRight:Z.W0}),children:Object.assign({position:"relative",flexShrink:1,flexGrow:1,display:"flex",flexDirection:"column",overflow:"hidden"},(0,Q.O)({color:l.primaryNormal})),icon:(0,_.g)(h,(()=>Object.assign({display:"flex",height:"100%",paddingLeft:2*Z.W0,paddingRight:2*Z.W0},(0,Q.O)({color:d?c:void 0})))),tooltip:{height:"100%"},tooltipText:{fontWeight:"bold"}}}))(Of));class kf extends o.Component{constructor(){super(...arguments),this.onClickDepositMenuItem=()=>{const{fundsManagementDialogShow:e}=this.props;e({operation:K.D.Deposit,analyticsOpenFrom:y.mq.Menu})},this.onClickWithdrawalMenuItem=()=>{const{fundsManagementDialogShow:e}=this.props;e({operation:K.D.Withdrawal,analyticsOpenFrom:y.mq.Menu})}}render(){const{expanded:e,disabled:t,placement:s,isLcg:o,isKawase:n,isFundsManagementDisabled:a}=this.props;if(o)return(0,i.jsx)(Cf,{icon:ie.Y.deposit,text:(0,O.L)("Deposit"),expanded:e,disabled:t||a,placement:s,onClick:this.onClickDepositMenuItem},void 0);const r=!n;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Cf,{icon:ie.Y.deposit,text:(0,O.L)("Deposit"),expanded:e,disabled:t||a,placement:s,onClick:this.onClickDepositMenuItem,isExternalLink:r,testId:"deposit"},void 0),(0,i.jsx)(Cf,{icon:ie.Y.withdrawal,text:(0,O.L)("Withdrawal"),expanded:e,disabled:t||a,placement:s,onClick:this.onClickWithdrawalMenuItem,isExternalLink:r,testId:"withdrawal"},void 0)]},void 0)}}const If=(0,n.$)(af,{fundsManagementDialogShow:Y.h.show})(kf);var Lf=s(86379);const wf=l()([(0,u.$)(Lf.Z).messages()],(e=>Object.values(e)))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),Tf=l()([wf],(e=>{const t=e.filter((e=>e.isNew)).length;return t>99?"99+":0===t?"":t.toString()}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),Df=l()([(0,u.$)(Lf.Z).isShown(),Tf,(0,u.$)(m.Z).chat.isEnabled(),(0,u.$)(m.Z).chat.url()],((e,t,s,i)=>({isChatOpened:e,chatAmountNewMessages:t,isChatEnabled:s,externalChatUrl:i||void 0})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var Pf=s(66032);class Nf extends o.Component{constructor(){super(...arguments),this.onItemClick=()=>{const{externalChatUrl:e,openChat:t}=this.props;e?this.openExternalChatWindow(e):t()},this.openExternalChatWindow=e=>{const t=`width=475,height=400,left=${(window.screen.width-475)/2+window.screenX},top=${(window.screen.height-400)/2}`;window.open(e,"liveChat",t)}}componentDidMount(){const{loadHistory:e}=this.props;e({newOnly:!0,lastMessages:!1})}render(){const{expanded:e,disabled:t,placement:s,isChatEnabled:o,chatAmountNewMessages:n}=this.props;return o?(0,i.jsx)(Cf,{icon:ie.Y.messages,text:(0,O.L)("Live Chat"),badge:n,expanded:e,disabled:t,placement:s,onClick:this.onItemClick,testId:"live-chat"},void 0):null}}const Af=(0,n.$)(Df,{openChat:Pf.t.open,loadHistory:Pf.t.loadHistory})(Nf),Bf=l()([(0,u.$)(m.Z).chat.isEnabled(),(0,u.$)(c.H).data.isKawase(),(0,u.$)(m.Z).leverageRequest.isEnabled(),(0,u.$)(Lf.Z).isShown()],((e,t,s,i)=>({isShown:e&&t&&s,isChartOpened:i})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class Mf extends o.Component{constructor(){super(...arguments),this.onItemClick=()=>{const{isChartOpened:e,openChat:t,changeMessage:s}=this.props;e||t(),s("Hello! I would like to request higher leverage.")}}render(){const{isShown:e,expanded:t,disabled:s,placement:o}=this.props;return e?(0,i.jsx)(Cf,{icon:ie.Y.leverageChange,text:(0,O.L)("Leverage Change Request"),expanded:t,disabled:s,placement:o,onClick:this.onItemClick},void 0):null}}const $f=(0,n.$)(Bf,{openChat:Pf.t.open,changeMessage:Pf.t.changeMessage})(Mf),Ef=l()([(0,u.$)(Fa.a).IntroducingBrokers.EnablePartnerCenter(),(0,u.$)(c.H).data.disableTradeApp(),(0,u.$)(g.C).isSupplementaryMenuVisible(),(0,u.$)(g.C).isMainMenuVisible(),(0,u.$)(c.H).data.isLcg()],((e,t,s,i,o)=>{const n=i&&s,a=i&&!s;return{isLcg:o,isPartnerCenterEnabled:Boolean(e),isMainMenuVisible:i,isCollapsed:a,isExpanded:n,isTraderDisabled:t}}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var Ff=s(70648);function Rf(e){switch(e){case C.tQ.kycStatusIsSubmittedAndHookIsActive:case C.tQ.kycStatusIsSubmitted:return C.DN.underReview;case C.tQ.kycStatusIsRevisionRequired:case C.tQ.kycStatusIsRevisionRequiredAndHookIsActive:return C.DN.revisionRequired;case C.tQ.kycStatusIsRejected:return C.DN.rejected;default:return}}const Wf=l()([(0,u.$)(N.Ee).status(),Ff.b,F],((e,t,s)=>({isKycStatusApplicable:t,kycStatus:e,mark:Rf(s),markColor:R(s)})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));function Hf(e){switch(e){case C.DN.underReview:return(0,O.L)("under review");case C.DN.revisionRequired:return(0,O.L)("revision required");case C.DN.rejected:return(0,O.L)("rejected");default:return}}class zf extends o.Component{constructor(){super(...arguments),this.onClick=()=>{const{openKycDialog:e,track:t}=this.props;e(),t({name:y.T2.KycOpened,params:{openFrom:y.mq.Menu}})}}render(){const{isKycStatusApplicable:e,expanded:t,disabled:s,placement:o,kycStatus:n,mark:a,markColor:r}=this.props;return e?null:(0,i.jsx)(Cf,{icon:ie.Y.activateAccount,text:(0,O.L)("Activate Account"),mark:Hf(a),markColor:r,expanded:t,disabled:s||n===A.aW.KYC_STATUS_REJECTED,placement:o,onClick:this.onClick},void 0)}}const Jf=(0,n.$)(Wf,{openKycDialog:f.G.open,track:S.m.track})(zf);var Qf=s(22909);class _f extends o.Component{render(){const{children:e,rules:t,styles:s,onToggle:o,collapsed:n,showCollapseButton:a}=this.props;return(0,i.jsxs)(i.Fragment,{children:[a&&(0,i.jsx)(Qf.n,{onClick:o,isCollapsed:n,collapseDirection:"bottom",extend:{root:t.collapseButtonRoot(this.props),iconWrapper:t.collapseButtonIconWrapper(this.props)}},void 0),(0,i.jsx)("nav",Object.assign({className:s.root},{children:e}),void 0)]},void 0)}}const qf=(0,x.Z)((e=>{const{backgroundColor:t}=e.theme.palette.semantic;return{root:{display:"flex",flexDirection:e.collapsed?"row":"column",flexShrink:0,borderTop:`2px solid ${t.tertiaryHover}`},collapseButtonRoot:{height:0,width:"auto",marginRight:Z.W0,justifyContent:"flex-end"},collapseButtonIconWrapper:Object.assign(Object.assign(Object.assign({},(0,V.E)(Z.q0)),(0,Q.O)({color:t.secondaryNormal})),{nested:{":hover":Object.assign({},(0,Q.O)({color:t.secondaryHover}))}})}}))(_f);var Xf=s(41269);const Vf=l()([(0,u.$)(c.H).data.myLcgTitle()],(e=>({myLcgTitle:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var Zf=s(45508);const Uf=(0,o.memo)((e=>{const{expanded:t,disabled:s,placement:n}=e,a=(0,re.I0)(),{myLcgTitle:r}=(0,ne.v)(Vf),l=(0,o.useCallback)((()=>{a(Zf.f.open())}),[a]);return(0,i.jsx)(Cf,{icon:ie.Y.myLcg,text:r,expanded:t,disabled:s,placement:n,onClick:l},void 0)})),Kf=l()([(0,u.$)(c.H).data.myLcgTitle(),(0,u.$)(c.H).data.myLcgTitleAnalysis()],((e,t)=>({myLcgTitle:e,myLcgTitleAnalysis:t})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var Yf=s(68786);const Gf=(0,o.memo)((e=>{const{expanded:t,disabled:s,placement:n}=e,a=(0,re.I0)(),{myLcgTitle:r,myLcgTitleAnalysis:l}=(0,ne.v)(Kf),d=(0,o.useCallback)((()=>{a(Yf.L.open())}),[a]),c=null!=l?l:`${r} ${(0,O.L)("Analysis")}`;return(0,i.jsx)(Cf,{icon:ie.Y.myLcgAnalysis,text:c,expanded:t,disabled:s,placement:n,onClick:d},void 0)}));class eO extends o.Component{constructor(){super(...arguments),this.onToggle=()=>{const{toggleVisibility:e}=this.props;e({})},this.onPartnerCenterClick=()=>{const{openPartnerDialog:e,tag:t}=this.props;e(),t({label:Ut.BN.PartnerCenter})},this.onSettingsClick=()=>{const{openSettingsDialog:e,tag:t}=this.props;e(Ho.b.AccountProperties),t({label:Ut.BN.Settings})},this.onHelpCenterClick=()=>{const{openHelpCenterDialog:e,tag:t}=this.props;e(An.Z.HelpCenterPage),t({label:Ut.BN.HelpCenter})}}render(){const{isLcg:e,isMainMenuVisible:t,isPartnerCenterEnabled:s,isCollapsed:o,isExpanded:n,isTraderDisabled:a}=this.props,r=o?"top-start":"right";return(0,i.jsxs)(qf,Object.assign({showCollapseButton:t,collapsed:o,onToggle:this.onToggle},{children:[e&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Gf,{expanded:n,disabled:a,placement:r},void 0),(0,i.jsx)(Uf,{expanded:n,disabled:a,placement:r},void 0)]},void 0),(0,i.jsx)(Af,{expanded:n,disabled:a,placement:r},void 0),s&&(0,i.jsx)(Cf,{icon:ie.Y.partnerCenter,text:(0,O.L)("Partner Center"),expanded:n,disabled:a,placement:r,onClick:this.onPartnerCenterClick,testId:"partner-center"},void 0),(0,i.jsx)(Jf,{expanded:n,disabled:a,placement:r},void 0),(0,i.jsx)($f,{expanded:n,disabled:a,placement:r},void 0),(0,i.jsx)(If,{expanded:n,disabled:a,placement:r},void 0),(0,i.jsx)(Cf,{icon:ie.Y.settings,text:(0,O.L)("Settings"),expanded:n,disabled:a,placement:r,onClick:this.onSettingsClick,testId:"settings"},void 0),!e&&(0,i.jsx)(Cf,{icon:ie.Y.helpCenter,text:(0,O.L)("Help Center"),expanded:n,disabled:a,placement:r,onClick:this.onHelpCenterClick,testId:"help-center"},void 0)]}),void 0)}}const tO=(0,n.$)(Ef,{openSettingsDialog:mn.z.open,toggleVisibility:Nt.m.toggleSupplementaryMenuVisibility,openPartnerDialog:Xf.O.open,openHelpCenterDialog:Dn.A.open,tag:S.m.tag})(eO),sO=l()([(0,u.$)(g.C).isMainMenuVisible()],(e=>({isMainMenuVisible:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class iO extends o.Component{constructor(){super(...arguments),this.onClick=()=>{const{isMainMenuVisible:e,toggleMainMenu:t,tag:s}=this.props;t({}),s({label:Ut.BN.MainMenuToggler,params:{value:Kt.y.toGtmVisibility(e)}})}}render(){const{styles:e}=this.props;return(0,i.jsx)("div",Object.assign({className:e.root,onClick:this.onClick},{children:(0,i.jsx)(se.J,{size:20,source:ie.Y.hamburger},void 0)}),void 0)}}const oO=(0,n.$)(sO,{toggleMainMenu:Nt.m.toggleMainMenuVisibility,tag:S.m.tag})((0,x.Z)((e=>{const{primary2:t}=e.theme.palette.semantic.foregroundColor;return{root:Object.assign(Object.assign({display:"flex",alignItems:"center",height:40,width:40},(0,X.o)(0,2*Z.W0)),{color:t,fill:t,whiteSpace:"nowrap",textDecoration:"none",cursor:"pointer"})}}))(iO)),nO=l()([(0,u.$)(g.C).isMainMenuVisible()],(e=>({isMainMenuVisible:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class aO extends o.Component{render(){const{isMainMenuVisible:e,children:t,styles:s}=this.props;return(0,i.jsxs)("div",Object.assign({className:s.root},{children:[(0,i.jsx)(oO,{},void 0),e&&(0,i.jsx)("div",Object.assign({className:s.settings},{children:t}),void 0)]}),void 0)}}const rO=(0,n.$)(nO)((0,x.Z)((e=>{const{foregroundColor:t}=e.theme.palette.semantic;return{root:{display:"flex",flexShrink:0,overflow:"hidden",paddingRight:2*Z.W0},settings:{display:"flex",flexShrink:0,flexBasis:165,justifyContent:"space-between",alignItems:"center",marginLeft:"auto",color:t.secondary,fill:t.secondary}}}))(aO));var lO=s(9342);class dO extends o.Component{render(){const{rules:e}=this.props;return(0,i.jsx)(lO.h,Object.assign({},this.props,{isTransparent:!0,extend:e}),void 0)}}const cO=(0,x.Z)((()=>({root:{width:25,height:40}})))(dO);var uO=s(88670),hO=s(12692),gO=s(38592),pO=s(87864),bO=s(55099),vO=s(99111);class mO extends o.PureComponent{constructor(){super(...arguments),this.state={isEnabled:(0,hO.r)()},this.FULL_SCREEN_ANIMATION_DELAY=1e3,this.handleResize=(0,vO.Z)((()=>{this.setState({isEnabled:(0,hO.r)()})}),this.FULL_SCREEN_ANIMATION_DELAY),this.onClick=()=>{const{isEnabled:e}=this.state;e?(0,gO.C)():(0,pO.D)()},this.handleFullScreenChange=()=>{this.setState({isEnabled:(0,hO.r)()})}}componentDidMount(){var e;this.unsubFullScreenChange=(e=this.handleFullScreenChange,bO.j_.forEach((t=>{document.addEventListener(t,e)})),()=>{bO.j_.forEach((t=>{document.removeEventListener(t,e)}))}),window.addEventListener("resize",this.handleResize)}componentWillUnmount(){var e;null===(e=this.unsubFullScreenChange)||void 0===e||e.call(this),this.unsubFullScreenChange=void 0,this.handleResize.cancel(),window.removeEventListener("resize",this.handleResize)}render(){const{isEnabled:e}=this.state,t=e?ie.Y.exitFullScreen:ie.Y.fullScreen;return(0,i.jsxs)(cO,Object.assign({testId:"fullscreen-mode-control",onClick:this.onClick},{children:[(0,i.jsx)(se.J,{size:oe.J.Medium,source:t},void 0),(0,i.jsxs)(Re.b,{children:[(0,O.L)("Fullscreen Mode"),(0,i.jsx)(es.q,{},void 0),(0,i.jsx)(uO.w,Object.assign({isShift:(0,Ai.ad)()},{children:"F11"}),void 0)]},void 0)]}),void 0)}}const jO=mO,xO=l()([Rt.t],(e=>({palette:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class yO extends o.Component{constructor(){super(...arguments),this.onClick=()=>{const{palette:e,setPalette:t,tag:s}=this.props;t(e===Qt.CT.Dark?Qt.CT.Light:Qt.CT.Dark),s({label:Ut.BN.ThemeToggler})}}render(){return(0,i.jsxs)(cO,Object.assign({testId:"theme-control",onClick:this.onClick},{children:[(0,i.jsx)(se.J,{size:oe.J.Medium,source:ie.Y.themeToggle},void 0),(0,O.L)("Switch Colour Theme")]}),void 0)}}const SO=(0,n.$)(xO,{setPalette:qt.c.setPalette,tag:S.m.tag})(yO),fO=l()([(0,u.$)(Ht.q).isEnabled()],(e=>({isEnabled:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class OO extends o.Component{constructor(){super(...arguments),this.onClick=()=>{const{isEnabled:e,setEnabled:t}=this.props;t(!e)}}render(){const{isEnabled:e}=this.props,t=e?ie.Y.soundOn:ie.Y.soundOff,s=e?(0,O.L)("Sounds On"):(0,O.L)("Sounds Off");return(0,i.jsxs)(cO,Object.assign({testId:"sound-control",onClick:this.onClick},{children:[(0,i.jsx)(se.J,{size:oe.J.Medium,source:t},void 0),(0,i.jsxs)(Re.b,{children:[s,(0,i.jsx)(es.q,{},void 0),(0,i.jsx)(uO.w,{children:"F10"},void 0)]},void 0)]}),void 0)}}const CO=(0,n.$)(fO,{setEnabled:Jt.K.setEnabled})(OO),kO=l()([(0,u.$)(Ft.r).locale()],(e=>({locale:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),IO=()=>({icon:{width:oe.J.Medium,height:oe.J.Medium},panel:Object.assign(Object.assign({},(0,X.o)(Z.W0)),{marginBottom:"3px",nested:{":last-child":{marginBottom:0}}})}),LO=(0,o.memo)((()=>{const{locale:e}=(0,ne.v)(kO),t=(0,re.I0)(),{rules:s}=(0,te.X)(IO,{}),[n,a]=(0,o.useState)(!1),[r,l]=(0,o.useState)(!1),d=(0,o.useCallback)((()=>{a(!0)}),[a]),c=(0,o.useCallback)((()=>{a(!1)}),[a]),u=(0,o.useCallback)((e=>{r||(t(ft._.changeLocale(e)),l(!0))}),[t,r]),h=(0,o.useCallback)((()=>(0,i.jsx)("div",{children:(0,i.jsx)(ld,{locale:e,onChange:u,extend:{optionListBoxItem:s.panel}},void 0)},void 0)),[e,u,s]);return(0,i.jsxs)(hd.v,Object.assign({placement:"bottom-start",offsetY:-Z.W0,open:n,onOpen:d,onClose:c},{children:[(0,i.jsxs)(cO,Object.assign({testId:"locale-control",placement:"right",isHovered:n,isClickEffectDisabled:!0},{children:[(0,i.jsx)(se.J,{source:nd.si[e],width:17,height:11,extend:{root:s.icon}},void 0),(0,O.L)("Select Language")]}),void 0),h]}),void 0)}));class wO extends o.Component{render(){const{children:e,styles:t}=this.props;return(0,i.jsx)("div",Object.assign({className:t.root},{children:e}),void 0)}}const TO=(0,x.Z)((()=>({root:{display:"flex",flexDirection:"column",flexShrink:1,flexGrow:1}})))(wO),DO=e=>{const{backgroundColor:t}=e.theme.palette.semantic;return{root:Object.assign({display:"flex",flexGrow:1,flexDirection:"column"},(0,Q.O)({color:t.primaryNormal}))}},PO=()=>({scrollContainer:{flexGrow:1,display:"flex"},scrollRoot:Object.assign({display:"flex",flexGrow:1,flexDirection:"column"},(0,X.o)(0)),scrollContent:Object.assign(Object.assign({},(0,X.o)(0)),{paddingLeft:Z.W0}),scrollTrackVertical:{top:Z.W0,bottom:Z.W0}});var NO=s(21975),AO=s(78067),BO=s(61754),MO=s(70782),$O=s(73846),EO=s(2716);const FO=l()([(0,u.$)(MO.M).networkStatus(),(0,u.$)(ds.K).networkStatus(),(0,u.$)(AO.z).networkStatus(),(0,u.$)($O.r).status(),(0,u.$)(ds.K).data.mode(),BO.v],((e,t,s,i,o,n)=>{const a=n?NO.n.Finder:o;return{isLoading:e!==Cs.I.Done||t!==Cs.I.Done||s!==Cs.I.Done,isPlugVisible:i===EO.O.Missing,mode:a}}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().viewId()}));var RO=s(34566),WO=s(45697),HO=s(111),zO=s(54087),JO=s.n(zO),QO=s(8679),_O=s.n(QO);function qO(){}function XO(e,t,s){return Math.floor(Math.min(t,Math.max(e,s)))}const VO=void 0!==o.createContext&&void 0!==RO.L,ZO=(150,function(e,t){const{x:s,w:i,y:o,h:n}=e,a=Math.min(i/2,150);if(t.x>=s&&t.x<=s+i&&t.y>=o&&t.y<=o+n){if(t.x<s+a)return(t.x-s-a)/a;if(t.x>s+i-a)return-(s+i-t.x-a)/a}return 0});const UO=function(e,t){const{y:s,h:i,x:o,w:n}=e,a=Math.min(i/2,150);if(t.y>=s&&t.y<=s+i&&t.x>=o&&t.x<=o+n){if(t.y<s+a)return(t.y-s-a)/a;if(t.y>s+i-a)return-(s+i-t.y-a)/a}return 0};var KO=s(86605);class YO extends o.Component{constructor(){super(...arguments),this.handleClick=()=>{const{track:e,openCreateWatchlist:t}=this.props;e({name:y.T2.WatchlistCreated,params:{method:y.Zq.WatchlistsPanel}}),t({})}}render(){const{styles:e}=this.props;return(0,i.jsx)("div",Object.assign({className:e.root,onClick:this.handleClick},{children:(0,i.jsx)("span",{children:`+ ${(0,O.L)("Create New Watchlist")}`},void 0)}),void 0)}}const GO=(0,n.$)(null,{openCreateWatchlist:KO.E.open,track:S.m.track},null,{forwardRef:!0})((0,x.Z)((e=>{const{primaryNormal:t,primaryHover:s}=e.theme.palette.semantic.buttonBackgroundColor;return{root:Object.assign(Object.assign({display:"flex",justifyContent:"center",alignItems:"center"},(0,V.E)(Z.q0)),{backgroundColor:t,cursor:"pointer",":hover":{backgroundColor:s},minHeight:29})}}))(YO));var eC,tC;!function(e){e.Above="Above",e.Below="Below",e.Inside="Inside"}(eC||(eC={})),function(e){e.Symbol="Symbol",e.Watchlist="Watchlist"}(tC||(tC={}));var sC=s(93712);const iC=(0,sC.G)([tC.Symbol,tC.Watchlist],{canDrop:()=>!0,hover(e){const{dragHelper:t,index:s}=e;t.setHoverDragIndex(s)},drop(e){const{dragHelper:t}=e;t.drop()}},(e=>({connectDropTarget:e.dropTarget()})));class oC extends o.Component{render(){const{styles:e,connectDropTarget:t}=this.props;return t((0,i.jsx)("div",Object.assign({className:e.root},{children:(0,i.jsx)("span",{children:(0,O.L)("Use '+' button to add symbols to this watchlist.")},void 0)}),void 0))}}oC.defaultProps={connectDropTarget:e=>e};const nC=iC((0,x.Z)((e=>{const{dropSide:t}=e,{foregroundColor:s,backgroundColor:i}=e.theme.palette.semantic,{muted1:o,tertiary:n}=s,a=t===eC.Inside?(0,Cg.C)(2,n):Object.assign(Object.assign({},(0,Cg.C)(1,o)),{borderStyle:"dotted"});return{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({display:"flex",justifyContent:"center",alignItems:"center"},(0,V.E)(Z.q0)),a),{color:o}),(0,X.o)(Z.W0)),{textAlign:"center"}),(0,Q.O)({color:i.primaryNormal})),{nested:Object.assign({},t===eC.Below?{":after":Object.assign({display:"block",position:"absolute",height:2,right:0,left:0,content:'""',bottom:3,zIndex:1},(0,Q.O)({color:s.tertiary}))}:{})})}}))(oC));var aC=s(86193),rC=s(68328),lC=s(90625),dC=s(92971);const cC=(e,t)=>{const s=t.getItem().watchlistId;return e.watchlistId!==dC.U_&&e.watchlistId!==s},uC=(0,sC.G)([tC.Symbol,tC.Watchlist],{hover(e,t){const{index:s}=e;cC(e,t)?e.dragHelper.setHoverDragIndex(s):e.dragHelper.setHoverDragIndex(void 0)},canDrop:cC,drop(e){const{dragHelper:t}=e;t.drop()}},(e=>({connectDropTarget:e.dropTarget()}))),hC=(0,lC.E)(tC.Watchlist,{beginDrag:e=>{const{index:t}=e;return e.dragHelper.setDragIndex(t),{index:t}},endDrag:e=>{e.dragHelper.setDragIndex(void 0)},canDrag:e=>e.dragHelper.isReadyForDrag()},(e=>({connectDragSource:e.dragSource(),connectDragPreview:e.dragPreview()})));var gC=s(23490);const pC=l()([(0,u.$)(gC.G).id(),(0,u.$)(gC.G).name()],((e,t)=>({watchlistName:t,isFixed:e===dC.U_})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().watchlistId()}));var bC=s(67316),vC=s(70216);const mC=l()([(0,u.$)(vC.K).symbolList()],(e=>({symbolList:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,xu.q)((0,Ae.P)().watchlistId(),(0,Ae.P)().viewId())}));var jC=s(18032);const xC=()=>({root:{flexShrink:0}}),yC=(0,o.memo)((e=>{const{rules:t}=(0,te.X)(xC,{});return(0,i.jsx)(_c.h,Object.assign({},e,{isTransparent:!0,extend:{root:t.root}}),void 0)}));var SC=s(76309),fC=s(61945);const OC=e=>{const{symbolPanelHeight:t}=e,s=(0,fC.B)(SC.Ov);return{symbolContainer:{display:"flex",flexDirection:"column",width:SC.Df,height:t,maxHeight:s}}};var CC=s(61205),kC=s(87447),IC=s(70474);const LC=l()([(0,u.$)(CC.t).mode(),BO.v,IC.g],((e,t,s)=>({mode:t?kC.q.Search:e,symbolPanelHeight:s})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().viewId()}));var wC=s(14196),TC=s(67942),DC=s(9330);const PC=(0,o.memo)((e=>{const{viewId:t,withStars:s,selectedSymbolIdList:n,onChange:a,extend:r={}}=e,{mode:l,symbolPanelHeight:d}=(0,ne.v)(LC,{viewId:t}),{css:c}=(0,te.X)(OC,{symbolPanelHeight:d,extend:r}),u=(0,o.useCallback)(((e,o)=>l===kC.q.Search?(0,i.jsx)(DC.u,{viewId:t,height:o,withStars:s,selectedSymbolIdList:n,onChange:a},void 0):(0,i.jsx)(TC.I,{viewId:t,height:o,withStars:s,selectedSymbolIdList:n,onChange:a},void 0)),[a,t,s,n,l]);return(0,i.jsxs)("div",{children:[(0,i.jsx)(wC.D,{viewId:t},void 0),(0,i.jsx)(Bt.I,{height:2*Z.W0},void 0),(0,i.jsx)("div",Object.assign({className:c.symbolContainer()},{children:(0,i.jsx)(je.X,{children:(0,i.jsx)(xe.R,{children:u},void 0)},void 0)}),void 0)]},void 0)}));class NC extends o.Component{constructor(){super(...arguments),this.renderElement=()=>()=>{const{symbolList:e}=this.props,t=e.filter((e=>(0,jC.t)(e))).map((e=>e.symbolId));return(0,i.jsx)(PC,{viewId:"watchlistElementSymbolControl",selectedSymbolIdList:t,withStars:!0,onChange:this.onChangeSymbol},void 0)},this.onChangeSymbol=e=>{const{watchlistId:t,toggleSymbol:s}=this.props;s({watchlistId:t,symbolName:e,analyticsMethod:y.Zq.WatchlistsPanel})}}render(){return(0,i.jsxs)(hd.v,Object.assign({placement:"bottom-start",testId:"watchlist-symbol"},{children:[(0,i.jsxs)(yC,Object.assign({testId:"watchlist-symbol-control"},{children:[(0,i.jsx)(se.J,{source:ie.Y.add,size:oe.J.Medium},void 0),(0,O.L)("Add Symbol to Watchlist")]}),void 0),this.renderElement()]}),void 0)}}const AC=(0,n.$)(mC,{toggleSymbol:bC.U.toggleSymbol,track:S.m.track})(NC);var BC=s(7767),MC=s(21449);const $C=l()([(0,u.$)(vC.K).symbolList()],(e=>({isEmpty:0===e.length,isAllClosed:0===e.filter((e=>e.opened)).length})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,xu.q)((0,Ae.P)().watchlistId(),(0,Ae.P)().viewId())}));class EC extends o.Component{constructor(){super(...arguments),this.onClick=e=>{e.stopPropagation();const{watchlistId:t,isAllClosed:s,isEmpty:i,openAllSymbols:o,closeAllSymbols:n}=this.props;i||(s?o({watchlistId:t}):n({watchlistId:t}))}}render(){const{isEmpty:e,isAllClosed:t}=this.props;return(0,i.jsxs)(yC,Object.assign({isDisabled:e,onClick:this.onClick,testId:"watchlist-toggle-control"},{children:[(0,i.jsx)(se.J,{source:e||t?ie.Y.tiles:ie.Y.list,size:oe.J.Medium},void 0),t?(0,O.L)("Tiles"):(0,O.L)("List")]}),void 0)}}const FC=(0,n.$)($C,{openAllSymbols:MC.n.openAllSymbols,closeAllSymbols:MC.n.closeAllSymbols})(EC);var RC=s(71551),WC=s(12292);const HC=l()([(0,u.$)(vC.K).symbolList()],(e=>({symbolList:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,xu.q)((0,Ae.P)().watchlistId(),(0,Ae.P)().viewId())}));var zC=s(47200),JC=s(57797),QC=s(49376);const _C=(0,o.memo)((e=>{const{watchlistId:t,analyticsMethod:s,hide:n}=e,{symbolList:a}=(0,ne.v)(HC,{watchlistId:t,viewId:BC.an.mainWatchlist}),r=(0,re.I0)(),l=a.length,d=a.filter((e=>e.opened)).length,c=0===l,u=l===d,h=0===d,g=(0,o.useCallback)((()=>{r(JC.S.open({watchlistId:t})),n()}),[r,n,t]),p=(0,o.useCallback)((()=>{r(zC.H.open({watchlistId:t})),n()}),[r,n,t]),b=(0,o.useCallback)((()=>{r(QC.d.open({watchlistId:t})),n()}),[r,n,t]),v=(0,o.useCallback)((()=>{r(MC.n.openAllSymbols({watchlistId:t}))}),[r,t]),m=(0,o.useCallback)((()=>{r(MC.n.closeAllSymbols({watchlistId:t}))}),[r,t]),j=(0,o.useCallback)((()=>{r(mn.z.open(Ho.b.ApplicationMarketWatch))}),[r]),x=(0,o.useCallback)((()=>{r(mn.z.open(Ho.b.ApplicationAssets))}),[r]),y=(0,o.useCallback)((e=>{r(bC.U.toggleSymbol({watchlistId:t,symbolName:e,analyticsMethod:s}))}),[r,t,s]),S=(0,o.useCallback)((e=>()=>{r(bC.U.removeSymbol({watchlistId:t,symbolName:e}))}),[r,t]),f=(0,o.useCallback)((()=>{const e=a.filter((e=>(0,jC.t)(e))).map((e=>e.symbolId));return(0,i.jsx)(PC,{viewId:"watchlistElementSymbolControl",selectedSymbolIdList:e,withStars:!0,onChange:y},void 0)}),[a,y]),C=(0,o.useCallback)((()=>(0,i.jsx)("div",{children:a.map((e=>(0,i.jsx)(od.Z,Object.assign({onClick:S(e.name)},{children:e.name}),e.name)))},void 0)),[a,S]);return(0,i.jsxs)(At.s,Object.assign({testId:"watchlist-context-panel"},{children:[(0,i.jsx)(od.Z,Object.assign({testId:"rename-watchlist",disabled:t===dC.U_,onClick:g},{children:(0,O.L)("Rename Watchlist")}),void 0),(0,i.jsx)(od.Z,Object.assign({testId:"duplicate-watchlist",onClick:p},{children:(0,O.L)("Duplicate Watchlist")}),void 0),(0,i.jsx)(od.Z,Object.assign({testId:"delete-watchlist",disabled:t===dC.U_,onClick:b},{children:(0,O.L)("Delete Watchlist")}),void 0),(0,i.jsx)(jo.D,{},void 0),(0,i.jsx)(od.Z,Object.assign({testId:"expand-all",disabled:c||u,onClick:v},{children:(0,O.L)("Expand All")}),void 0),(0,i.jsx)(od.Z,Object.assign({testId:"collapse-all",disabled:c||h,onClick:m},{children:(0,O.L)("Collapse All")}),void 0),t!==dC.U_&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(jo.D,{},void 0),(0,i.jsxs)(od.Z,Object.assign({testId:"add-symbol"},{children:[(0,O.L)("Add Symbol"),f]}),void 0),a.length>0&&(0,i.jsxs)(od.Z,Object.assign({maxWidthElement:150,testId:"remove-symbol"},{children:[(0,O.L)("Remove Symbol"),C]}),void 0)]},void 0),(0,i.jsx)(jo.D,{},void 0),(0,i.jsx)(od.Z,Object.assign({testId:"watchlist-settings",onClick:j},{children:`${(0,O.L)("Watchlist Settings")}...`}),void 0),(0,i.jsx)(od.Z,Object.assign({testId:"asset-units",onClick:x},{children:`${(0,O.L)("Asset Units")}...`}),void 0)]}),void 0)}));class qC extends o.Component{constructor(){super(...arguments),this.renderWatchlistElement=(e,t)=>s=>{const{hide:o}=s;return(0,i.jsx)(_C,{watchlistId:e,analyticsMethod:t,hide:o},void 0)},this.onClick=()=>{const{watchlistId:e,toggleWatchlist:t}=this.props;t({viewId:BC.an.mainWatchlist,watchlistId:e})}}render(){const{watchlistId:e,watchlistName:t,isFixed:s,collapsed:o,connectDragPreview:n,connectDropTarget:a,styles:r,rules:l}=this.props,d=o?ie.Y.treeCollapsed:ie.Y.treeExpanded;return a(n((0,i.jsx)("div",Object.assign({className:r.root,onClick:this.onClick},{children:(0,i.jsxs)(RC.x,Object.assign({placement:"bottom-start",placementByCursor:!0,testId:"watchlist",extend:{root:l.contextMenu(this.props)}},{children:[(0,i.jsxs)(i.Fragment,{children:[this.renderDragger(),(0,i.jsx)("div",Object.assign({className:r.collapsedIcon},{children:(0,i.jsx)(se.J,{size:15,source:d},void 0)}),void 0),(0,i.jsx)("div",Object.assign({className:r.name},{children:(0,i.jsx)(WC.a,{children:t},void 0)}),void 0),(0,i.jsx)(es.q,{},void 0),(0,i.jsx)(FC,{viewId:BC.an.mainWatchlist,watchlistId:e},void 0),!s&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(es.q,{},void 0),(0,i.jsx)(AC,{viewId:BC.an.mainWatchlist,watchlistId:e},void 0)]},void 0)]},void 0),this.renderWatchlistElement(e,y.Zq.WatchlistPanelContextMenu)]}),void 0)}),void 0)))}renderDragger(){const{isFixed:e,connectDragSource:t}=this.props,s=e?void 0:t;return(0,i.jsx)(aC.b,{orientation:rC.i.Horizontal,title:(0,O.L)("Drag to reorder Watchlist"),disabled:e,connector:s},void 0)}}qC.defaultProps={connectDropTarget:e=>e,connectDragPreview:e=>e,connectDragSource:e=>e};const XC=(0,n.$)(pC,{toggleWatchlist:MC.n.toggleWatchlist},null,{forwardRef:!0})(uC(hC((0,x.Z)((e=>{const{isDragging:t,dropSide:s}=e,{backgroundColor:i,foregroundColor:o}=e.theme.palette.semantic,n={content:'""',position:"absolute",zIndex:1,display:"block"},a=Object.assign(Object.assign(Object.assign(Object.assign({},n),(0,Cg.C)(2,o.tertiary)),(0,V.E)(Z.q0)),{top:0,bottom:0,left:0,right:0}),r=Object.assign(Object.assign(Object.assign({},n),{height:2,right:0,left:0}),(0,Q.O)({color:o.tertiary})),l=Object.assign(Object.assign({},r),{bottom:-4}),d=Object.assign(Object.assign({},r),{top:-4}),c=s===eC.Inside?a:s===eC.Below?l:s===eC.Above?d:Object.assign(Object.assign({},n),{opacity:0}),u=(0,J.p)("watchlistArrowIcon");return{root:Object.assign(Object.assign(Object.assign({display:"block",width:"100%",paddingLeft:Z.W0,paddingRight:Z.W0},(0,V.E)(Z.q0)),(0,Q.O)({color:i.secondaryNormal})),{whiteSpace:"nowrap",opacity:t?.2:1,height:29,nested:{":after":c,[`:hover .${u}`]:{fill:o.primary2}}}),collapsedIcon:(0,_.g)(u,(()=>Object.assign(Object.assign({},(0,vn.f)(0,0,15)),{display:"flex",alignItems:"center",justifyContent:"center",paddingLeft:Z.W0-2,fill:o.secondary}))),name:Object.assign(Object.assign({},(0,vn.f)(0,1,"100%")),{paddingLeft:Z.W0,display:"flex",alignItems:"center",minWidth:0,overflow:"hidden"}),content:Object.assign({},lg.aF),contextMenu:{height:"100%"}}}))(qC)))),VC=l()([ws.r,(0,Ae.P)().symbolId()],((e,t)=>e.filter((e=>e.tradeData.symbolId===t)).length))(Object.assign({keySelector:(0,Ae.P)().symbolId()},(0,d.jo)())),ZC=(0,lt.a)({positionsCount:VC})(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().symbolId()}));var UC=s(4601),KC=s(9267);class YC extends o.Component{render(){const{positionsCount:e}=this.props;return e?(0,i.jsx)(UC.C,Object.assign({type:KC.g.Positive,isSmall:!0},{children:e}),void 0):null}}const GC=(0,n.$)(ZC)(YC);var ek=s(86886),tk=s(82864),sk=s(65185);const ik=l()([(0,u.$)(tk.M).pipPosition(),(0,u.$)(tk.M).digits(),(0,u.$)(sk.G).bid(),(0,u.$)(sk.G).ask(),(0,u.$)(sk.G).bidStatus(),(0,u.$)(sk.G).askStatus(),(0,u.$)(ds.K).dailyChangeVisible()],((e,t,s,i,o,n,a)=>({bidPrice:(0,ek.e)(s,e,t),askPrice:(0,ek.e)(i,e,t),bidStatus:o,askStatus:n,isDailyChangeVisible:a})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().symbolId()}));var ok=s(34802);const nk=e=>{const{askStatus:t,bidStatus:s}=e,{foregroundColor:i}=e.theme.palette.semantic,{positive:o,negative:n,secondary:a}=i,r=e=>e===ok.N.down?n:e===ok.N.up?o:a,l=Object.assign({paddingLeft:Z.W0,display:"flex",justifyContent:"flex-end"},(0,vn.f)(0,0,"60px"));return{change:Object.assign(Object.assign({paddingLeft:Z.W0},(0,vn.f)(0,0,95)),{display:"flex",alignItems:"center",color:a,fontFamily:"arial",whiteSpace:"nowrap",justifyContent:"flex-end"}),bid:Object.assign(Object.assign({},l),{color:r(s)}),ask:Object.assign(Object.assign({},l),{color:r(t)}),priceLabel:{whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",maxWidth:55},bigPriceLabel:{display:"contents",fontFamily:"arial"},smallPriceLabel:{display:"contents",fontFamily:"arial",fontSize:"0.85em",lineHeight:"inherit"}}};var ak=s(66772),rk=s(69111);const lk=(0,o.memo)((e=>{const{withChange:t=!0,symbolId:s}=e,o=(0,ak.x)(ik,e),{askPrice:n,bidPrice:a,isDailyChangeVisible:r}=o,{css:l,rules:d}=(0,te.X)(nk,Object.assign(Object.assign({},e),o));return(0,i.jsxs)(i.Fragment,{children:[t&&r&&(0,i.jsx)(rk.x,{symbolId:s,extend:{root:d.change}},void 0),(0,i.jsx)("div",Object.assign({className:l.bid()},{children:(0,i.jsxs)("div",Object.assign({className:l.priceLabel()},{children:[(0,i.jsx)("span",Object.assign({className:l.bigPriceLabel()},{children:a.big}),void 0),(0,i.jsx)("span",Object.assign({className:l.smallPriceLabel()},{children:a.small}),void 0)]}),void 0)}),void 0),(0,i.jsx)("div",Object.assign({className:l.ask()},{children:(0,i.jsxs)("div",Object.assign({className:l.priceLabel()},{children:[(0,i.jsx)("span",Object.assign({className:l.bigPriceLabel()},{children:n.big}),void 0),(0,i.jsx)("span",Object.assign({className:l.smallPriceLabel()},{children:n.small}),void 0)]}),void 0)}),void 0)]},void 0)}));var dk=s(48727);const ck=(0,sC.G)([tC.Symbol,tC.Watchlist],{hover(e){const{dragHelper:t,watchlistId:s,index:i}=e;s===dC.U_?t.setHoverDragIndex(void 0):t.setHoverDragIndex(i)},canDrop:(e,t)=>{const s=t.getItem(),i=e.watchlistId===dC.U_;return(s.symbolName!==e.symbolName||s.watchlistId!==e.watchlistId)&&!i},drop(e){const{dragHelper:t}=e;t.drop()}},(e=>({connectDropTarget:e.dropTarget()}))),uk=(0,lC.E)(tC.Symbol,{beginDrag:e=>{const{index:t}=e;return e.dragHelper.setDragIndex(t),{index:t}},endDrag:e=>{e.dragHelper.setDragIndex(void 0)},canDrag:e=>e.dragHelper.isReadyForDrag()},(e=>({connectDragSource:e.dragSource(),connectDragPreview:e.dragPreview()}))),hk=(0,dk.Z)(uk,ck);var gk=s(26735),pk=s(72065);const bk=l()([(0,u.$)(tk.M).symbolId(),(0,u.$)(tk.M).hasFullInfo(),(0,u.$)(gk.X).color()],((e,t,s)=>({symbolId:e,hasSymbolFullInfo:t,symbolCategoryColor:s})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().symbolId()})),vk=(0,_s.X)((0,u.$)(pk.e).symbolId(),d.mr).chain((e=>(0,qs.t)(bk,{symbolId:e},d.iN))).build(),mk=l()([vk],(e=>Object.assign({},e)))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().symbolName()})),jk={display:"block",position:"absolute",height:1,right:0,left:0,content:'""'};function xk(e,t){const{foregroundColor:s,backgroundColor:i}=e,o=Object.assign({display:"block",position:"absolute",right:0,left:0,content:'""',height:2,zIndex:1},(0,Q.O)({color:s.tertiary}));switch(t){case eC.Above:return{":before":Object.assign(Object.assign({},o),{top:-2})};case eC.Below:return{":before":Object.assign(Object.assign({},o),{bottom:-1})};default:return{":hover:before":Object.assign(Object.assign(Object.assign({},jk),{top:-1}),(0,Q.O)({color:i.primaryNormal}))}}}const yk=(e,t,s)=>{const{isDragging:i,isAnyDragging:o,isLastCollapsedElement:n,dropSide:a}=e,{backgroundColor:r}=e.theme.palette.semantic;return Object.assign(Object.assign(Object.assign(Object.assign({flexGrow:1,display:"flex",flexDirection:"column",paddingRight:Z.W0,paddingLeft:Z.W0},(0,V.E)(Z.q0)),(0,Q.O)({color:t})),lg.$j),{minWidth:0,opacity:i?.2:1,nested:Object.assign({":hover":o?{}:Object.assign({},(0,Q.O)({color:s})),":not(:hover):after":n?{}:Object.assign(Object.assign(Object.assign({},jk),{bottom:0}),(0,Q.O)({color:r.strokeNormal}))},xk(e.theme.palette.semantic,a))})};class Sk extends o.Component{shouldComponentUpdate(e){const{values:t}=this.props;if(e.values.length!==t.length)return!0;const s=t.length;let i;for(i=0;i!==s;i++)if(t[i]!==e.values[i])return!0;return!1}render(){const{children:e}=this.props;return e}}var fk=s(94844),Ok=s(64253),Ck=s(29867);const kk=l()([(0,u.$)(pk.e).symbolId()],(e=>({symbolId:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().symbolName()}));var Ik=s(36985);const Lk=(0,o.memo)((e=>{const{symbolName:t,watchlistId:s,isOpened:n,hide:a}=e,{symbolId:r}=(0,ne.v)(kk,{symbolName:t}),l=(0,re.I0)(),d=(0,o.useCallback)((()=>void 0===r?null:(0,i.jsx)(Ck.t,{symbolName:t,analyticsMethod:y.Zq.WatchlistPanelContextMenu,hide:a},void 0)),[t,r,a]),c=(0,o.useCallback)((()=>{l(Uc.L.open({type:Kc.k.TradeDialog,tradeType:Zc.YL.NewPosition,symbolId:r})),a()}),[l,r,a]),u=(0,o.useCallback)((e=>{e.stopPropagation(),l(Ik.p.create({symbolId:r})),l(S.m.tag({label:Ut.BN.NewChartButton,params:{method:Ut.CI.WatchlistContextMenu}})),a()}),[l,r,a]),h=(0,o.useCallback)((()=>{l(MC.n.toggleSymbol({viewId:BC.an.mainWatchlist,watchlistId:s,symbolName:t})),a()}),[l,s,t,a]),g=(0,o.useCallback)((()=>{l(bC.U.removeSymbol({watchlistId:s,symbolName:t})),a()}),[l,s,t,a]);return(0,i.jsxs)(At.s,Object.assign({testId:"watchlist-symbol-context-panel"},{children:[(0,i.jsx)(od.Z,Object.assign({testId:"create-new-order",disabled:void 0===r,onClick:c},{children:(0,O.L)("Create New Order")}),void 0),(0,i.jsx)(od.Z,Object.assign({testId:"new-chart",disabled:void 0===r,onClick:u},{children:(0,O.L)("New Chart")}),void 0),(0,i.jsx)(od.Z,Object.assign({testId:"toggle-symbol",disabled:void 0===r,onClick:h},{children:n?(0,O.L)("Collapse"):(0,O.L)("Expand")}),void 0),(0,i.jsx)(jo.D,{},void 0),void 0!==s&&(0,i.jsx)(od.Z,Object.assign({testId:"remove-from-watchlist",disabled:s===dC.U_,onClick:g},{children:(0,O.L)("Remove from this Watchlist")}),void 0),(0,i.jsxs)(od.Z,Object.assign({testId:"add-to-watchlist",disabled:void 0===r},{children:[(0,O.L)("Add to Watchlist"),d]}),void 0)]}),void 0)}));var wk=s(78112);const Tk=l()([(0,u.$)(c.H).data.isLcg(),(0,u.$)(tk.M).symbolId(),cs],((e,t,s)=>({disabled:!e||!t||!s})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().symbolId()})),Dk=(0,o.memo)((e=>{const{symbolId:t,children:s}=e,{disabled:n}=(0,ne.v)(Tk,{symbolId:t}),[a,r]=(0,o.useState)(!1),l=(0,o.useCallback)((()=>{r(!0)}),[r]),d=(0,o.useCallback)((()=>{r(!1)}),[r]),c=(0,o.useMemo)((()=>(0,i.jsx)(wk.E,{symbolId:t},void 0)),[t]);return n?(0,i.jsx)(i.Fragment,{children:s()},void 0):(0,i.jsxs)(wt.u,Object.assign({open:a,placement:"right-start",arrow:!0,maxWidthElement:350},{children:[s(l,d),c]}),void 0)}));class Pk extends o.Component{constructor(){super(...arguments),this.renderElementTarget=()=>(e,t)=>{const{symbolName:s,watchlistId:o,symbolId:n,hasSymbolFullInfo:a,symbolCategoryColor:r,styles:l,theme:d,connectDragPreview:c,connectDropTarget:u}=this.props,h=[n,a,r,s,Object.values(l).join(""),d];return u(c((0,i.jsx)("div",Object.assign({className:l.root,onClick:this.onElementClick},{children:(0,i.jsx)(Sk,Object.assign({values:h},{children:(0,i.jsxs)(RC.x,Object.assign({placement:"bottom-start",placementByCursor:!0,testId:"symbol"},{children:[(0,i.jsxs)("div",Object.assign({className:l.headerRow},{children:[this.renderDragger(),(0,i.jsx)("div",Object.assign({className:l.status},{children:(0,i.jsx)(fk.Z,{symbolId:n},void 0)}),void 0),(0,i.jsxs)("div",Object.assign({onMouseEnter:e,onMouseLeave:t,className:l.name},{children:[this.renderClippedText(s),(0,i.jsx)(es.q,{},void 0),(0,i.jsx)(GC,{symbolId:n},void 0)]}),void 0),(0,i.jsx)(lk,{symbolId:n},void 0)]}),void 0),this.renderCollapsedElement(s,o)]}),void 0)}),void 0)}),void 0)))},this.renderCollapsedElement=(e,t)=>s=>{const{hide:o}=s;return(0,i.jsx)(Lk,{symbolName:e,watchlistId:t,isOpened:!1,hide:o},void 0)},this.onElementClick=()=>{const{symbolId:e,selectElement:t}=this.props;void 0!==e&&t({symbolId:e})}}render(){const{symbolId:e}=this.props;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(al.i,{symbolId:e},void 0),(0,i.jsx)(Ok.B,{symbolId:e},void 0),(0,i.jsx)(Dk,Object.assign({symbolId:e},{children:this.renderElementTarget()}),void 0)]},void 0)}renderClippedText(e){const{styles:t}=this.props;return(0,i.jsx)("span",Object.assign({className:t.clippedText},{children:e}),void 0)}renderDragger(){const{symbolCategoryColor:e,connectDragSource:t}=this.props,s=e?`#${e}`:void 0;return(0,i.jsx)(aC.b,{orientation:rC.i.Horizontal,title:(0,O.L)("Drag to reorder Symbol or pull to another Watchlist"),color:s,connector:t},void 0)}}Pk.defaultProps={connectDropTarget:e=>e,connectDragPreview:e=>e,connectDragSource:e=>e};const Nk=(0,x.Z)((e=>{const{backgroundColor:t}=e.theme.palette.semantic,{primaryNormal:s,primaryHover:i}=t,o={flexBasis:115,flexGrow:1,flexShrink:1,paddingLeft:Z.W0,display:"flex",alignItems:"center",minWidth:0,height:"100%"};return{root:yk(e,s,i),headerRow:{flexGrow:1,display:"flex",flexDirection:"row",alignItems:"center",height:34,maxWidth:"100%"},statusRow:{display:"flex",flexDirection:"row",alignItems:"flex-end",height:20,paddingBottom:Z.W0,boxSizing:"border-box"},status:Object.assign(Object.assign({},(0,vn.f)(0,0,24)),{display:"flex",alignItems:"center",justifyContent:"center"}),name:o,clippedText:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}}))(Pk),Ak=(0,n.$)(mk,{selectElement:hs.t.selectElement},null,{forwardRef:!0})(hk(Nk));var Bk=s(59338),Mk=s(10654),$k=s(45291),Ek=s(34877);const Fk=l()([(0,Ae.P)().tradeSide(),(0,u.$)(Ek.X).quickTradeSellState(),(0,u.$)(Ek.X).quickTradeBuyState(),(0,u.$)(sk.G).bidStatus(),(0,u.$)(sk.G).askStatus()],((e,t,s,i,o)=>{const{isDisabled:n,title:a}=e===Zc.aO.Sell?t:s;return{isDisabled:n,spotStatus:e===Zc.aO.Sell?i:o,title:a}}))(Object.assign({keySelector:(0,xu.q)((0,Ae.P)().tradeSide(),(0,Ae.P)().symbolId())},(0,d.jo)()));var Rk=s(64861),Wk=s(29595),Hk=s(70469);class zk extends o.Component{constructor(){super(...arguments),this.onClick=e=>{const{symbolId:t,size:s,tradeSide:i,quickCreatePosition:o}=this.props;o({eventType:e,ignoreClickCount:!1,symbolId:t,tradeSide:i,size:s,method:y.HF.MarketWatch,analyticsMethod:y.Zq.MarketWatch})}}render(){const{styles:e,hover:t,isDisabled:s,symbolId:o,onMouseEnter:n,onMouseLeave:a,tradeSide:r,title:l,rules:d}=this.props,c=(0,Wk.h)(r);return Zc.aO.Buy,(0,i.jsx)($k.D,Object.assign({onClick:this.onClick,disabled:s,extend:{root:d.root(this.props)}},{children:(0,i.jsxs)(Hk.b,Object.assign({symbolId:o,tradeSide:r,isDisabled:s,isHovered:t,isStretch:!0,isClickEffectDisabled:!0,extend:{backdrop:d.backdrop(this.props)}},{children:[(0,i.jsxs)("div",Object.assign({className:e.content,onMouseEnter:n,onMouseLeave:a},{children:[(0,i.jsx)("div",{children:c},void 0),(0,i.jsx)(se.J,{source:this.getStatusIcon(),size:oe.J.Small},void 0)]}),void 0),l]}),void 0)}),void 0)}getStatusIcon(){const{spotStatus:e}=this.props;return e===ok.N.down?ie.Y.priceFall:e===ok.N.up?ie.Y.priceRise:ie.Y.priceNoChange}}const Jk=(0,Mk.B)(Fk,{quickCreatePosition:Rk.K.quickCreate})((0,x.Z)((()=>({root:Object.assign(Object.assign({display:"flex",overflow:"hidden",position:"relative",fontSize:13},(0,vn.f)(0,1,"25%")),{borderTopLeftRadius:Z.q0,borderTopRightRadius:Z.q0}),backdrop:{borderBottomLeftRadius:0,borderBottomRightRadius:0},content:{display:"flex",flexDirection:"row",flexGrow:1,justifyContent:"space-between",alignItems:"center",paddingLeft:Z.W0,paddingRight:Z.W0}})))(zk)),Qk=l()([(0,Ae.P)().tradeSide(),(0,u.$)(Ek.X).quickTradeSellState(),(0,u.$)(Ek.X).quickTradeBuyState()],((e,t,s)=>{const{isDisabled:i,title:o}=e===Zc.aO.Sell?t:s;return{isDisabled:i,title:o}}))(Object.assign({keySelector:(0,xu.q)((0,Ae.P)().tradeSide(),(0,Ae.P)().symbolId())},(0,d.jo)()));var _k=s(7436),qk=s(39584);class Xk extends o.Component{constructor(){super(...arguments),this.handleClick=e=>{const{symbolId:t,size:s,tradeSide:i,quickCreatePosition:o}=this.props;o({eventType:e,ignoreClickCount:!1,symbolId:t,tradeSide:i,size:s,method:y.HF.MarketWatch,analyticsMethod:y.Zq.MarketWatch})}}render(){const{styles:e,rules:t,tradeSide:s,onMouseEnter:o,onMouseLeave:n,isDisabled:a,title:r,hover:l,symbolId:d,size:c}=this.props,u=s===Zc.aO.Buy?qk.F.Ask:qk.F.Bid;return(0,i.jsx)($k.D,Object.assign({onClick:this.handleClick,disabled:a,extend:{root:t.root(this.props)}},{children:(0,i.jsxs)(Hk.b,Object.assign({symbolId:d,tradeSide:s,isDisabled:a,isHovered:l,isClickEffectDisabled:!0,isStretch:!0,extend:{backdrop:t.backdrop(this.props)}},{children:[(0,i.jsx)("div",Object.assign({className:e.content,onMouseEnter:o,onMouseLeave:n},{children:(0,i.jsx)(_k._,{symbolId:d,size:c,type:u,extend:{big:t.bigPrice(this.props),small:t.smallPrice(this.props)}},void 0)}),void 0),r]}),void 0)}),void 0)}}const Vk=(0,Mk.B)(Qk,{quickCreatePosition:Rk.K.quickCreate})((0,x.Z)((e=>{const{tradeSide:t}=e,s=t===Zc.aO.Sell?{marginRight:Z.W0/2}:{marginLeft:Z.W0/2},i=t===Zc.aO.Sell?Object.assign({},(0,V.E)(0,Z.q0,Z.q0)):Object.assign({},(0,V.E)(Z.q0,0,Z.q0,Z.q0));return{root:Object.assign(Object.assign({display:"flex",flexGrow:0,flexShrink:1,flexBasis:"50%",overflow:"hidden"},i),s),content:Object.assign({display:"flex",overflow:"hidden",flexDirection:"row",alignItems:"baseline",flexGrow:1,justifyContent:t===Zc.aO.Sell?"flex-end":"flex-start"},(0,X.o)(0,Z.W0)),backdrop:Object.assign({},(0,V.E)(0)),bigPrice:{fontSize:22,fontFamily:"arial",fontWeight:300},smallPrice:{fontSize:18,fontFamily:"arial",fontWeight:300}}}))(Xk));class Zk extends o.Component{constructor(){super(...arguments),this.state={sellHover:!1,buyHover:!1},this.onHoverSellProps={onMouseEnter:this.onHover("sellHover",!0),onMouseLeave:this.onHover("sellHover",!1)},this.onHoverBuyProps={onMouseEnter:this.onHover("buyHover",!0),onMouseLeave:this.onHover("buyHover",!1)}}render(){const{children:e,styles:t,symbolId:s,size:o}=this.props,{sellHover:n,buyHover:a}=this.state;return(0,i.jsxs)("div",Object.assign({className:t.root},{children:[(0,i.jsxs)("div",Object.assign({className:t.firstLine},{children:[(0,i.jsx)(Jk,Object.assign({symbolId:s,size:o,tradeSide:Zc.aO.Sell,hover:n},this.onHoverSellProps),void 0),(0,i.jsx)("div",Object.assign({className:t.children},{children:e}),void 0),(0,i.jsx)(Jk,Object.assign({symbolId:s,size:o,tradeSide:Zc.aO.Buy,hover:a},this.onHoverBuyProps),void 0)]}),void 0),(0,i.jsxs)("div",Object.assign({className:t.secondLine},{children:[(0,i.jsx)(Vk,Object.assign({symbolId:s,size:o,tradeSide:Zc.aO.Sell,hover:n},this.onHoverSellProps),void 0),(0,i.jsx)(Vk,Object.assign({symbolId:s,size:o,tradeSide:Zc.aO.Buy,hover:a},this.onHoverBuyProps),void 0)]}),void 0)]}),void 0)}onHover(e,t){return()=>{this.setState((s=>Object.assign(Object.assign({},s),{[e]:t})))}}}const Uk=(0,x.Z)((()=>({root:Object.assign(Object.assign({},(0,vn.f)(0,1,"100%")),{display:"flex",flexDirection:"column",height:"100%",boxSizing:"border-box"}),firstLine:{display:"flex",flexDirection:"row",alignItems:"stretch"},secondLine:{display:"flex",flexDirection:"row",alignItems:"stretch"},children:Object.assign(Object.assign({position:"relative"},(0,vn.f)(0,1,"50%")),{height:"100%",boxSizing:"border-box",paddingLeft:Z.W0,paddingRight:Z.W0,paddingBottom:Z.W0,borderBottomLeftRadius:Z.q0,borderBottomRightRadius:Z.q0})})))(Zk);var Kk=s(31817);const Yk=l()([(0,u.$)(tk.M).digits(),Kk.J],((e,t)=>({digits:e,disabled:void 0!==t})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,xu.q)((0,Ae.P)().price(),(0,Ae.P)().symbolId(),(0,Ae.P)().tradeSide(),(0,Ae.P)().stopTriggerMethod(),(0,Ae.P)().orderType())}));var Gk=s(45362);class eI extends o.Component{constructor(){super(...arguments),this.onClick=e=>{const{symbolId:t,size:s,price:i,tradeSide:o,quickCreateOrder:n}=this.props;n({eventType:e,ignoreClickCount:!1,symbolId:t,orderType:Zc.mr.Limit,tradeSide:o,size:s,price:i,method:y.HF.MarketWatch,analyticsMethod:y.Zq.MarketWatch})}}render(){const{price:e,digits:t,rules:s,disabled:o}=this.props;return(0,i.jsx)($k.D,Object.assign({onClick:this.onClick,disabled:o,extend:{root:s.root(this.props)}},{children:(0,Rc.T4)(t)(e)}),void 0)}}const tI=(0,n.$)(Yk,{quickCreateOrder:Gk.i.quickCreate})((0,x.Z)((e=>{const{disabled:t}=e,{backgroundColor:s,foregroundColor:i}=e.theme.palette.semantic;return{root:Object.assign(Object.assign({display:"flex",alignItems:"center",paddingLeft:Z.W0,height:"100%"},(0,V.E)(Z.q0)),{":hover":Object.assign({},(0,Q.O)({color:s.primaryHover})),color:t?i.muted1:void 0})}}))(eI));var sI=s(899),iI=s(64573);const oI=l()([tk.M,sI.m,sk.G,(0,Ae.P)().tradeSide()],((e,t,s,i)=>{const o=i===Zc.aO.Buy?s.ask:s.bid,n=[];if(!e)return{symbolName:"",options:n};const[a,r]=i===Zc.aO.Buy?[50,250]:[250,50],l=o-r*t;for(let s=o+a*t;s>l;s-=t)n.push((0,iI.FH)(s,e.digits));return{symbolName:e.name,options:n}}))(Object.assign({keySelector:(0,xu.q)((0,Ae.P)().symbolId(),(0,Ae.P)().tradeSide())},(0,d.jo)()));var nI=s(89072);const aI=(0,nI.h1)().trackWidth,rI=e=>{const{tradeSide:t}=e,{foregroundColor:s,backgroundColor:i,buttonBackgroundColor:o}=e.theme.palette.semantic,n=t===Zc.aO.Sell?o.negativeNormal:o.positiveNormal,a=120+2*Z.W0+aI,r=352+2*Z.W0+2*Z.W0;return{content:{display:"flex",flexDirection:"column",width:a},placeholder:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,vn.f)(0,1,"100%")),{display:"flex",justifyContent:"center",alignItems:"center",textTransform:"uppercase"}),(0,X.o)(Z.W0)),(0,V.E)(Z.q0)),{color:s.primary1}),(0,Q.O)({color:n})),prices:{display:"flex",flexDirection:"column",height:r,"& div":{outline:0}},symbolName:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,vn.f)(0,1,"100%")),{display:"flex",justifyContent:"center",alignItems:"center"}),(0,X.o)(Z.W0)),(0,V.E)(Z.q0)),(0,Q.O)({color:i.tertiaryNormal})),scrollStyle:{display:"flex",flexGrow:1,flexDirection:"column",height:"100%"},scrollContentStyle:{paddingLeft:0,paddingRight:0}}};function lI(e,t,s){return{height:t,position:"absolute",left:0,top:e,width:"100%",visibility:s?"visible":"hidden"}}function dI(e,t,s,i){return e.find((e=>e.index===t&&e.itemType===i&&e.isFull===s))}function cI(e,t,s){for(let i=0;i<e.length;i++)if(e[i].itemType===t&&e[i].isFull===s)return{index:i,key:e[i]}}const uI=(0,o.memo)((e=>{const{data:t,scrollTop:s,clientHeight:n,getItemHeight:a,fullRowRenderer:r,lightRowRenderer:l,hasLightVersion:d,getItemType:c,overscrollItemsCount:u,idleScrollTimeout:h=300,testId:g}=e,p=function(e,t){return(0,o.useMemo)((()=>{const s=[];for(let i=0;i<e.length;i++){const o=0===i?0:s[i-1].top+s[i-1].height,n=t(e[i]);s.push({top:o,height:n})}return s}),[e,t])}(t,a),b=function(e,t,s){return(0,o.useMemo)((()=>{for(let i=0;i<t.length;i++)if(s[i].top+s[i].height>=e)return i}),[e,t,s])}(s,t,p),v=function(e,t,s,i){return(0,o.useMemo)((()=>{if(void 0===e)return;const o=t+s;for(let t=e;t<i.length;t++)if(i[t].top>o)return t-1;return i.length-1}),[e,t,s,i])}(b,s,n,p),m=function(e){return(0,o.useMemo)((()=>e.length>0?e[e.length-1].top+e[e.length-1].height:0),[e])}(p),j=function(e,t,s,i,n,a){const[r,l]=(0,o.useState)(!0),d=(0,o.useRef)(s),c=Math.abs(d.current-s)>=i;return(0,o.useEffect)((()=>{c&&a&&l(!1),d.current=s}),[c,s,a]),(0,o.useEffect)((()=>{if(a){const s=window.setTimeout((()=>{void 0!==e&&void 0!==t&&l(!0)}),n);return()=>{window.clearTimeout(s)}}}),[e,t,l,a,n]),!a||!c&&r}(b,v,s,n,h,void 0!==l&&void 0!==d),x=function(e,t,s){return(0,o.useMemo)((()=>void 0!==t&&s?void 0!==e?Math.max(0,e-t):void 0:e),[e,t,s])}(b,u,j),y=function(e,t,s,i){return(0,o.useMemo)((()=>void 0!==s&&i?void 0!==e&&0!==t.length?Math.min(t.length-1,e+s):void 0:e),[e,s,t,i])}(v,t,u,j),S=function(e,t,s,i,n,a,r,l){const[d,c]=(0,o.useState)([]),u=(0,o.useMemo)((()=>{if(void 0===e||void 0===t||void 0===s||void 0===i)return[];const o=new Set(d),c=[];for(let e=s;e<=i;e++){const t=null==l?void 0:l(r[e]),s=n||!a(t),i=dI(d,e,s,t);void 0!==i?o.delete(i):c.push(e)}const u=[...o];let h=[...d],g=!1;for(const e of c){const t=null==l?void 0:l(r[e]),s=n||!a(t),i=cI(u,t,s);if(void 0!==i){u.splice(i.index,1);const t=h.indexOf(i.key);t>-1&&(h[t]=Object.assign(Object.assign({},i.key),{index:e})),g=!0}else h.push({index:e,isFull:s,itemType:t,key:`${s?"full":"light"}-${t}-${(0,Eb.Z)()}`}),g=!0}return void 0!==h.find((e=>e.index>=r.length))&&(h=h.filter((e=>e.index<r.length)),g=!0),g?h:d}),[e,t,s,i,d,n,a,r,l]);return(0,o.useEffect)((()=>{u===d||0===u.length&&0===d.length||c(u)}),[u,d,c]),u}(b,v,x,y,j,d,t,c),f=[];for(const e of S){const s=t[e.index],o=null==c?void 0:c(s),n=j||void 0===d||!d(o),a=e.index>=x&&e.index<=y&&e.itemType===o&&e.isFull===n,u=e.isFull?r:l,{top:h,height:g}=p[e.index],b=u(s,e.index);if(null==b?void 0:b.key)throw new Error("Key is used in RecyclerListView. Keys kill the idea of recycling.");f.push((0,i.jsx)("div",Object.assign({"cache-key":e.key,style:lI(h,g,a)},{children:b}),e.key))}return(0,i.jsx)("div",Object.assign({style:{position:"relative",height:m}},{children:f}),void 0)})),hI=()=>22,gI=(0,o.memo)((e=>{const{tradeSide:t,symbolId:s,size:n}=e,{symbolName:a,options:r}=(0,ne.v)(oI,e),{css:l,rules:d}=(0,te.X)(rI,e),[c,u]=(0,o.useState)(0),h=(0,o.useRef)(),g=t===Zc.aO.Sell?(0,O.L)("Sell Limit"):(0,O.L)("Buy Limit"),p=(0,o.useCallback)((e=>(0,i.jsx)(tI,{symbolId:s,price:e,size:n,tradeSide:t,orderType:Zc.mr.Limit,stopTriggerMethod:Zc.be.Trade},void 0)),[s,n,t]),b=(0,o.useCallback)((e=>{u(e.scrollTop)}),[u]),v=(0,o.useCallback)((()=>{var e;const s=t===Zc.aO.Buy?50:250;null===(e=h.current)||void 0===e||e.scrollTop(22*(s-8))}),[t]),m=(0,o.useCallback)((e=>{h.current=e,v()}),[v]),j=(0,o.useCallback)(((e,t)=>(0,i.jsx)(qe.X,Object.assign({getScroll:m,onScrollMove:b,showHorizontalScroll:!1,extend:{root:d.scrollStyle,content:d.scrollContentStyle}},{children:(0,i.jsx)(uI,{data:r,clientHeight:t,fullRowRenderer:p,getItemHeight:hI,scrollTop:c,overscrollItemsCount:10},void 0)}),void 0)),[r,d,c,b,p,m]);return(0,i.jsxs)("div",Object.assign({className:l.content()},{children:[(0,i.jsx)("div",Object.assign({className:l.placeholder()},{children:g}),void 0),(0,i.jsx)("div",Object.assign({className:l.prices()},{children:(0,i.jsx)(je.X,{children:(0,i.jsx)(xe.R,{children:j},void 0)},void 0)}),void 0),(0,i.jsx)("div",Object.assign({className:l.symbolName()},{children:a}),void 0)]}),void 0)}));var pI=s(37074);class bI extends o.Component{constructor(){super(...arguments),this.renderElement=()=>()=>{const{symbolId:e,size:t,tradeSide:s}=this.props;return(0,i.jsx)(gI,{symbolId:e,size:t,tradeSide:s},void 0)}}render(){const{disabled:e,tradeSide:t,title:s,styles:o,rules:n}=this.props,a=t===Zc.aO.Sell?"bottom-start":"bottom-end";return(0,i.jsx)("div",Object.assign({className:o.root},{children:(0,i.jsxs)(av.L,Object.assign({disabled:e,placement:a,extend:{root:n.dropdown(this.props),popper:n.popper(this.props)}},{children:[(0,i.jsxs)(pI.O,{children:[t===Zc.aO.Sell?(0,O.L)("Sell Limit"):(0,O.L)("Buy Limit"),s]},void 0),this.renderElement()]}),void 0)}),void 0)}}const vI=(0,x.Z)((e=>{const{disabled:t}=e,{primaryNormal:s,primaryHover:i,primaryDisabled:o}=e.theme.palette.semantic.backgroundColor;return{root:{width:"100%",textTransform:"uppercase"},dropdown:Object.assign(Object.assign({width:"100%"},(0,Q.O)({color:t?o:s})),{nested:{":focus":Object.assign({},(0,Q.O)({color:s})),":hover":Object.assign({},(0,Q.O)({color:t?o:i}))}}),popper:Object.assign({},(0,Q.O)({color:s}))}}))(bI);var mI=s(32694),jI=s(57116);const xI=l()([(0,u.$)(tk.M).digits(),(0,u.$)(tk.M).pipPosition(),(0,u.$)(sk.G).low(),(0,u.$)(sk.G).high(),jI.J],((e,t,s,i,o)=>({low:(0,Rc.T4)(e)(s),high:(0,Rc.T4)(e)(i),spreadInPips:(0,Rc.AP)(t,e)((0,mI.Rv)(o,t))})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,xu.q)((0,Ae.P)().symbolId(),(0,Ae.P)().size())}));class yI extends o.Component{render(){const{low:e,high:t,spreadInPips:s,styles:o}=this.props;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",Object.assign({className:o.price},{children:[`${(0,O.L)("L")}: `,e]}),void 0),(0,i.jsxs)("div",Object.assign({className:o.price},{children:[`${(0,O.L)("S")}: `,s]}),void 0),(0,i.jsxs)("div",Object.assign({className:o.price},{children:[`${(0,O.L)("H")}: `,t]}),void 0)]},void 0)}}const SI=(0,n.$)(xI)((0,x.Z)((()=>({price:Object.assign(Object.assign({},(0,vn.f)(0,1,"auto")),{whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"})})))(yI)),fI=(0,sC.G)([tC.Symbol,tC.Watchlist],{hover(e){const{dragHelper:t,watchlistId:s,index:i}=e;s===dC.U_?t.setHoverDragIndex(void 0):t.setHoverDragIndex(i)},canDrop:(e,t)=>{const s=t.getItem(),i=e.watchlistId===dC.U_;return(s.symbolName!==e.symbolName||s.watchlistId!==e.watchlistId)&&!i},drop(e){const{dragHelper:t}=e;t.drop()}},(e=>({connectDropTarget:e.dropTarget()}))),OI=(0,lC.E)(tC.Symbol,{beginDrag:e=>{const{index:t}=e;return e.dragHelper.setDragIndex(t),{index:t}},endDrag:e=>{e.dragHelper.setDragIndex(void 0)},canDrag:e=>e.dragHelper.isReadyForDrag()},(e=>({connectDragSource:e.dragSource(),connectDragPreview:e.dragPreview()}))),CI=(0,dk.Z)(OI,fI);var kI=s(82810);const II=l()([(0,u.$)(tk.M).symbolId(),(0,u.$)(tk.M).hasFullInfo(),(0,u.$)(tk.M).minSize(),(0,u.$)(tk.M).description(),(0,u.$)(gk.X).color(),Ek.X],((e,t,s,i,o,n)=>({symbolId:e,hasSymbolFullInfo:t,symbolMinSize:s,symbolDescription:i,symbolCategoryColor:o,tradingModeStatusData:n})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().symbolId()})),LI=(0,_s.X)((0,u.$)(pk.e).symbolId(),d.mr).chain((e=>(0,qs.t)(II,{symbolId:e},d.iN))).build(),wI=l()([LI,(0,u.$)(c.H).data.isLcg(),kI.x,(0,u.$)(ts.g).data.isMarketWatchEnabled()],((e,t,s,i)=>Object.assign(Object.assign({},e),{isLcg:t,quickTradeType:s,isMarketWatchEnabled:i})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().symbolName()})),TI={display:"block",position:"absolute",height:1,right:0,left:0,content:'""'};function DI(e,t){const{foregroundColor:s,backgroundColor:i}=e,o=Object.assign({display:"block",position:"absolute",right:0,left:0,content:'""',height:2,zIndex:1},(0,Q.O)({color:s.tertiary}));switch(t){case eC.Above:return{":before":Object.assign(Object.assign({},o),{top:-2})};case eC.Below:return{":before":Object.assign(Object.assign({},o),{bottom:-1})};default:return{":hover:before":Object.assign(Object.assign(Object.assign({},TI),{top:-1}),(0,Q.O)({color:i.primaryNormal}))}}}var PI=s(82632),NI=s(25340);class AI extends o.Component{constructor(){super(...arguments),this.state={size:void 0},this.onElementClick=()=>{const{symbolId:e,selectElement:t}=this.props;void 0!==e&&t({symbolId:e})},this.onElementContentClick=e=>{e.stopPropagation()},this.renderExpandedSymbolElement=(e,t)=>s=>{const{hide:o}=s;return(0,i.jsx)(Lk,{symbolName:e,watchlistId:t,isOpened:!0,hide:o},void 0)},this.renderExpandedElement=(e,t)=>s=>{const{hide:o}=s;return(0,i.jsx)(Ck.t,{symbolName:e,analyticsMethod:t,hide:o},void 0)},this.onChartIconClick=()=>{const{addChart:e,symbolId:t}=this.props;e({symbolId:t})},this.onOrderIconClick=()=>{const{symbolId:e,showTradeDialog:t}=this.props;t({type:Kc.k.TradeDialog,tradeType:Zc.YL.NewPosition,symbolId:e})},this.getSizeValue=()=>{const{size:e}=this.state,{symbolMinSize:t}=this.props;return function(e,t){return void 0!==e?e:void 0!==t?t:0}(e,t)},this.onSizeChange=e=>{const{size:t}=this.state;t!==e&&this.setState({size:e})}}componentDidMount(){const{hasSymbolFullInfo:e}=this.props;e&&this.setState({size:this.getSizeValue()})}shouldComponentUpdate(e){const{hasSymbolFullInfo:t}=e;return void 0!==t}componentDidUpdate(e){const{hasSymbolFullInfo:t,symbolMinSize:s}=this.props,{size:i}=this.state,o=e.hasSymbolFullInfo!==t;var n,a;const r=function(e,t,s){return e&&t>s}((n=s,a=e.symbolMinSize,void 0!==n&&(void 0===a||n!==a)),s,i);(o||r)&&this.setState({size:r?s:this.getSizeValue()})}render(){const{isLcg:e,symbolId:t}=this.props;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(al.i,{symbolId:t},void 0),(0,i.jsx)(Ok.B,{symbolId:t},void 0),e&&(0,i.jsx)(NI.c,{symbolId:t},void 0),this.renderOpenedElement()]},void 0)}renderOpenedElement(){const{symbolName:e,watchlistId:t,symbolId:s,hasSymbolFullInfo:o,symbolDescription:n,symbolCategoryColor:a,quickTradeType:r,tradingModeStatusData:l,connectDragPreview:d,connectDropTarget:c,styles:u,rules:h,theme:g}=this.props,p=Object.values(u).join(""),b=this.getSizeValue(),v=[s,o,a,e,p,g,b,r,l],{quickTradeSellLimitState:m,quickTradeBuyLimitState:j}=l;return c(d((0,i.jsx)("div",Object.assign({className:u.openedRoot,onClick:this.onElementClick},{children:(0,i.jsx)(Sk,Object.assign({values:v},{children:(0,i.jsxs)(RC.x,Object.assign({placement:"bottom-start",placementByCursor:!0,wide:!0,testId:"symbol"},{children:[(0,i.jsxs)(At.s,{children:[(0,i.jsxs)("div",Object.assign({className:u.headerRow},{children:[this.renderDragger(),(0,i.jsx)("div",Object.assign({className:u.status},{children:(0,i.jsx)(fk.Z,{symbolId:s},void 0)}),void 0),(0,i.jsxs)("div",Object.assign({className:u.nameOpened},{children:[this.renderClippedText(e),(0,i.jsx)(es.q,{},void 0),(0,i.jsx)(GC,{symbolId:s},void 0)]}),void 0),(0,i.jsxs)("div",Object.assign({className:u.headerIconContainer,onClick:this.onElementContentClick},{children:[(0,i.jsx)("div",Object.assign({className:u.headerIcon},{children:(0,i.jsxs)(hd.v,Object.assign({placement:"bottom-start"},{children:[(0,i.jsxs)(_c.h,{children:[(0,i.jsx)(se.J,{source:ie.Y.star,placement:"top",extend:{root:h.headerIconStyle(this.props)}},void 0),(0,O.L)("Add {0} to your Watchlist",e)]},void 0),this.renderExpandedElement(e,y.Zq.WatchlistPanelContextMenu)]}),void 0)}),void 0),(0,i.jsx)("div",Object.assign({className:u.headerIcon},{children:(0,i.jsxs)(_c.h,Object.assign({onClick:this.onChartIconClick},{children:[(0,i.jsx)(se.J,{source:ie.Y.chart,placement:"top",extend:{root:h.headerIconStyle(this.props)}},void 0),(0,O.L)("Open New {0} Chart",e)]}),void 0)}),void 0),(0,i.jsx)("div",Object.assign({className:u.headerIcon},{children:(0,i.jsxs)(_c.h,Object.assign({onClick:this.onOrderIconClick},{children:[(0,i.jsx)(se.J,{source:ie.Y.newOrder,placement:"top",extend:{root:h.headerIconStyle(this.props)}},void 0),(0,O.L)("Create New Order")]}),void 0)}),void 0)]}),void 0)]}),void 0),(0,i.jsxs)("div",Object.assign({className:u.statusRow,onClick:this.onElementContentClick},{children:[(0,i.jsx)("div",Object.assign({className:u.symbolStatus},{children:(0,i.jsx)("div",Object.assign({className:u.clippedText},{children:null!=n?n:ir.kZ}),void 0)}),void 0),(0,i.jsx)(rk.x,{symbolId:s},void 0)]}),void 0),(0,i.jsxs)("div",Object.assign({className:u.quickTradeRow,onClick:this.onElementContentClick},{children:[(0,i.jsx)("div",Object.assign({className:u.sellBuySelect},{children:(0,i.jsx)(vI,{symbolId:s,size:b,tradeSide:Zc.aO.Sell,title:m.title,disabled:m.isDisabled},void 0)}),void 0),(0,i.jsx)("div",Object.assign({className:u.symbolInfo},{children:(0,i.jsx)(SI,{symbolId:s,size:b},void 0)}),void 0),(0,i.jsx)("div",Object.assign({className:u.sellBuySelect},{children:(0,i.jsx)(vI,{symbolId:s,size:b,tradeSide:Zc.aO.Buy,title:j.title,disabled:j.isDisabled},void 0)}),void 0)]}),void 0),(0,i.jsx)("div",Object.assign({className:u.actionButtonsRow,onClick:this.onElementContentClick},{children:(0,i.jsx)(Uk,Object.assign({symbolId:s,size:b,extend:{children:h.symbolActionButtonChildren(this.props)}},{children:(0,i.jsx)(PI.K,{symbolId:s,volumeOrStake:b,disabled:!o,onChange:this.onSizeChange},void 0)}),void 0)}),void 0),(0,i.jsx)("div",{children:(0,i.jsx)(Bk.b,{symbolId:s},void 0)},void 0)]},void 0),this.renderExpandedSymbolElement(e,t)]}),void 0)}),void 0)}),void 0)))}renderClippedText(e){const{styles:t}=this.props;return(0,i.jsx)("span",Object.assign({className:t.clippedText},{children:e}),void 0)}renderDragger(){const{symbolCategoryColor:e,connectDragSource:t}=this.props,s=e?`#${e}`:void 0;return(0,i.jsx)(aC.b,{orientation:rC.i.Horizontal,title:(0,O.L)("Drag to reorder Symbol or pull to another Watchlist"),color:s,connector:t},void 0)}}AI.defaultProps={connectDropTarget:e=>e,connectDragPreview:e=>e,connectDragSource:e=>e};const BI=(0,x.Z)((e=>{const{buttonBackgroundColor:t,badgeBackgroundColor:s,backgroundColor:i,foregroundColor:o}=e.theme.palette.semantic,{quaternaryNormal:n,quaternaryHover:a,tertiaryNormal:r,tertiaryHover:l}=i,d={flexBasis:115,flexGrow:1,flexShrink:1,paddingLeft:Z.W0,display:"flex",alignItems:"center",minWidth:0,height:"100%"},c=(0,J.p)("symbolActionButtonChildren");return{openedRoot:(0,_.g)((()=>((e,t,s)=>{const{isDragging:i,isAnyDragging:o,dropSide:n}=e,a=(0,J.p)("symbolActionButtonChildren");return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({display:"flex",flexDirection:"column",paddingRight:Z.W0,paddingLeft:Z.W0,paddingBottom:Z.W0},(0,V.E)(Z.q0)),(0,Q.O)({color:t})),{height:153-Z.W0}),lg.$j),{opacity:i?.2:1,nested:Object.assign({[`& .${a}`]:Object.assign({},(0,Q.O)({color:t})),[`:hover .${a}`]:Object.assign({},(0,Q.O)({color:s})),":hover":o?{}:Object.assign({},(0,Q.O)({color:s}))},DI(e.theme.palette.semantic,n))})})(e,r,l))),headerRow:{flexGrow:1,display:"flex",flexDirection:"row",alignItems:"center",height:34,maxWidth:"100%"},statusRow:{display:"flex",flexDirection:"row",alignItems:"flex-end",height:20,paddingBottom:Z.W0,boxSizing:"border-box"},quickTradeRow:{display:"flex",flexDirection:"row",height:24,paddingBottom:Z.W0,justifyContent:"space-between"},status:Object.assign(Object.assign({},(0,vn.f)(0,0,24)),{display:"flex",alignItems:"center",justifyContent:"center"}),name:d,nameOpened:Object.assign(Object.assign({},d),{flexGrow:1}),positionCount:Object.assign(Object.assign(Object.assign({marginLeft:Z.W0,display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"arial",fontSize:"75%",minWidth:13,minHeight:13},(0,V.E)(Z.q0)),{color:o.primary1}),(0,Q.O)({color:s.positive})),headerIconContainer:{display:"flex"},headerIcon:{paddingLeft:Z.W0},headerIconStyle:Object.assign(Object.assign(Object.assign({},(0,V.E)(Z.q0)),(0,Q.O)({color:t.tertiaryNormal})),{nested:{":hover":Object.assign({},(0,Q.O)({color:t.tertiaryHover}))}}),symbolStatus:Object.assign(Object.assign({display:"flex"},(0,vn.f)(0,1,"100%")),{flexDirection:"column",justifyContent:"center",minWidth:0,paddingRight:Z.W0}),sellBuySelect:Object.assign({},(0,vn.f)(0,0,"25%")),sellBuySelectElement:Object.assign(Object.assign({width:"100%"},(0,Q.O)({color:n})),{nested:{":hover":Object.assign({},(0,Q.O)({color:a}))}}),symbolInfo:Object.assign(Object.assign(Object.assign({display:"flex"},(0,vn.f)(1,1,"auto")),{minWidth:0,flexDirection:"row",justifyContent:"space-between",alignItems:"center",boxSizing:"border-box",fontFamily:"arial"}),(0,X.o)(0,Z.W0)),actionButtonsRow:{nested:{"& .volumeSelect:not(.disabled)":Object.assign(Object.assign({},(0,Q.O)({color:n})),{nested:{":hover":Object.assign({},(0,Q.O)({color:a}))}})}},clippedText:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},symbolActionButtonChildren:(0,_.g)(c)}}))(AI),MI=(0,n.$)(wI,{showTradeDialog:Uc.L.open,selectElement:hs.t.selectElement,addChart:Ik.p.create},null,{forwardRef:!0})(CI(BI));var $I;!function(e){e.Watchlist="Watchlist",e.ExpandedSymbol="ExpandedSymbol",e.CollapsedSymbol="CollapsedSymbol",e.EmptyWatchlist="EmptyWatchlist",e.NewWatchlist="NewWatchlist"}($I||($I={}));const EI=(0,o.memo)((()=>{const e=s(12254);return(0,i.jsx)("div",{children:(0,i.jsx)(se.J,{size:oe.J.Medium,source:e},void 0)},void 0)}));class FI extends o.Component{render(){const{symbolName:e,testId:t,styles:s}=this.props;return(0,i.jsxs)("div",Object.assign({className:s.root},{children:[(0,i.jsx)("div",Object.assign({className:s.status},{children:(0,i.jsx)(EI,{},void 0)}),void 0),(0,i.jsxs)("div",Object.assign({className:s.name},{children:[this.renderClippedText(e),(0,i.jsx)(es.q,{},void 0)]}),void 0),(0,i.jsx)("div",Object.assign({className:s.change},{children:ir.kZ}),void 0),(0,i.jsx)("div",Object.assign({className:s.price},{children:ir.kZ}),void 0),(0,i.jsx)("div",Object.assign({className:s.price},{children:ir.kZ}),void 0),(0,i.jsx)(es.q,{},void 0)]}),void 0)}renderClippedText(e){const{styles:t}=this.props;return(0,i.jsx)("span",Object.assign({className:t.clippedText},{children:e}),void 0)}}const RI=(0,x.Z)((e=>{const{isLastCollapsedElement:t,theme:s}=e,{foregroundColor:i,backgroundColor:o}=s.palette.semantic;return{root:{flexGrow:1,display:"flex",flexDirection:"row",alignItems:"center",height:34,maxWidth:"100%",position:"relative",nested:t?{}:{":after":Object.assign({display:"block",position:"absolute",height:1,right:0,left:0,content:'""',bottom:0},(0,Q.O)({color:o.strokeNormal}))}},name:{flexBasis:115,flexGrow:1,flexShrink:1,paddingLeft:Z.W0,display:"flex",alignItems:"center",minWidth:0,height:"100%"},status:Object.assign(Object.assign({},(0,vn.f)(0,0,24)),{display:"flex",alignItems:"center",justifyContent:"center",marginLeft:10}),clippedText:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},change:Object.assign(Object.assign({paddingLeft:Z.W0},(0,vn.f)(0,0,95)),{display:"flex",alignItems:"center",color:i.secondary,fontFamily:"arial",whiteSpace:"nowrap",justifyContent:"flex-end"}),price:{paddingLeft:Z.W0,display:"block",textAlign:"right",width:60,overflow:"hidden",color:i.secondary}}}))(FI);function WI(e){return(null==e?void 0:e.type)===$I.ExpandedSymbol||(null==e?void 0:e.type)===$I.CollapsedSymbol}function HI(e){return e&&e.type===$I.Watchlist}function zI(e){return e&&e.type===$I.EmptyWatchlist}function JI(e,t){let s;for(let i=0;i<e.length;i++){const o=e[i];(HI(o)||WI(o)||zI(o))&&o.watchlistId===t&&(s=i)}return s}function QI(e){const{itemList:t,dragIndex:s,dragHoverIndex:i}=e;if(void 0===s||void 0===i)return;const o=t[s],n=t[i],a=i>s;if(!(HI(r=n)&&r.watchlistId===dC.U_||zI(r)&&r.watchlistId===dC.U_||WI(r)&&r.watchlistId===dC.U_)){var r;if(WI(o)&&WI(n))return{side:a?eC.Below:eC.Above,index:i};if(HI(o)&&HI(n)){if(a){const e=JI(t,n.watchlistId);return{side:eC.Below,index:e}}return{side:eC.Above,index:i}}if(HI(o)&&zI(n))return a?{side:eC.Below,index:i}:{side:eC.Above,index:i-1};if(HI(o)&&WI(n)){if(a){const e=JI(t,n.watchlistId);return{side:eC.Below,index:e}}const e=t.findIndex((e=>HI(e)&&e.watchlistId===n.watchlistId));return{side:eC.Above,index:e}}return WI(o)&&HI(n)?n.collapsed?{side:eC.Inside,index:i}:zI(t[i+1])?{side:eC.Inside,index:i+1}:{side:eC.Below,index:i}:WI(o)&&zI(n)?{side:eC.Inside,index:i}:void 0}}var _I=s(12370);const qI=l()([_I.a],(e=>{const t=[];for(let s=0;s<e.length;s++){const i=e[s];if(t.push({type:$I.Watchlist,watchlistId:i.id,collapsed:i.collapsed}),!i.collapsed)if(i.symbolList.length)for(let e=0;e<i.symbolList.length;e++){const s=i.symbolList[e],o=e===i.symbolList.length-1;if((0,jC.t)(s)&&s.opened)t.push({type:$I.ExpandedSymbol,watchlistId:i.id,symbolName:s.name});else{const n=i.symbolList[e+1],a=o||(0,jC.t)(n)&&n.opened;t.push({type:$I.CollapsedSymbol,watchlistId:i.id,symbolName:s.name,isLastCollapsedElement:a})}}else t.push({type:$I.EmptyWatchlist,watchlistId:i.id})}return t.push({type:$I.NewWatchlist}),t}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().viewId()})),XI=l()([(0,u.$)(g.C).isMainMenuVisible(),qI],((e,t)=>({itemList:e?t:[]})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().viewId()}));class VI extends o.Component{render(){const{symbolName:e,testId:t,styles:s}=this.props;return(0,i.jsx)("div",Object.assign({className:s.root},{children:(0,i.jsxs)(ge.X,{children:[(0,i.jsx)("div",Object.assign({className:s.status},{children:(0,i.jsx)(EI,{},void 0)}),void 0),(0,i.jsx)("div",Object.assign({className:s.name},{children:e}),void 0)]},void 0)}),void 0)}}const ZI=(0,x.Z)((e=>{const{theme:t}=e,{backgroundColor:s,buttonBackgroundColor:i}=t.palette.semantic;return{root:Object.assign(Object.assign(Object.assign(Object.assign({flexGrow:1,display:"flex",flexDirection:"column",height:153-Z.W0,maxWidth:"100%",position:"relative"},(0,Cg.C)(1,s.tertiaryNormal)),(0,V.E)(Z.q0)),(0,X.o)(Z.W0)),{paddingTop:9}),status:Object.assign(Object.assign({},(0,vn.f)(0,0,24)),{display:"flex",alignItems:"center",justifyContent:"center",marginLeft:Z.W0}),name:{marginLeft:7},freeSpace:{flexGrow:1},headerIcon:Object.assign({},(0,Q.O)({color:i.tertiaryNormal}))}}))(VI);function UI(e){const t=(0,re.I0)(),[s,i]=(0,o.useState)(void 0),[n,a]=(0,o.useState)(void 0);return{dragHelper:(0,o.useMemo)((()=>({drop(){const i=function(e){const{dragIndex:t,dragHoverIndex:s,itemList:i}=e;if(void 0===s||void 0===t)return void console.warn("dragHoverObject or dragObject is none");const o=QI({dragHoverIndex:s,dragIndex:t,itemList:i});return void 0!==o?function(e){const{itemList:t,dropPosition:s,dragIndex:i}=e,o=null==s?void 0:s.index;if(void 0===s||void 0===i||void 0===o||i===o)return;const n=t[i],a=t[o],r=function(e,t){if(void 0===e)return;const s=t[e.index];return HI(s)||WI(s)||zI(s)?s.watchlistId:void 0}(s,t),l=s.side;switch(n.type){case $I.Watchlist:if(r===n.watchlistId)return;return bC.U.move({sourceWatchlistId:n.watchlistId,targetWatchlistId:r});case $I.ExpandedSymbol:case $I.CollapsedSymbol:{const e=t.filter((e=>WI(e)&&e.watchlistId===n.watchlistId)).findIndex((e=>WI(e)&&e.symbolName===n.symbolName)),s=t.filter((e=>HI(e))),i=s.findIndex((e=>e.watchlistId===r));let o,d;if(HI(a)||zI(a)){const e=l===eC.Above?-1:0;if(o=s[i+e],!o)throw new Error("Cant drop above first watchlist element");const n=l===eC.Inside||l===eC.Above,a=t.filter((e=>WI(e)&&e.watchlistId===o.watchlistId));d=n?a.length:0}else if(WI(a)){if(![eC.Below,eC.Above].includes(l))throw new Error(`Wrong dropSide: ${l}`);o=s[i],d=t.filter((e=>WI(e)&&e.watchlistId===o.watchlistId)).findIndex((e=>e.symbolName===a.symbolName))}return o.watchlistId!==n.watchlistId||d!==e?bC.U.moveSymbol({sourceWatchlistId:n.watchlistId,targetWatchlistId:o.watchlistId,sourceSymbolPosition:e,targetSymbolPosition:d}):void 0}default:return void console.error(`unknown dragObject.type: ${n.type}`)}}({dragIndex:t,dropPosition:o,itemList:i}):void 0}({dragIndex:s,dragHoverIndex:n,itemList:e});i&&t(i)},isReadyForDrag:()=>void 0===s,setDragIndex(e){void 0!==e?(i(e),a(void 0)):(i(void 0),a(void 0))},setHoverDragIndex(e){a(e)}})),[e,s,n,a,i,t]),dragIndex:s,dragHoverIndex:n}}function KI(e){switch(e.type){case $I.Watchlist:return 33;case $I.EmptyWatchlist:case $I.NewWatchlist:return 34;case $I.ExpandedSymbol:return 153;case $I.CollapsedSymbol:return e.isLastCollapsedElement?34+Z.W0:34;default:return(0,vs.N)(e)}}function YI(e){return e.type}function GI(e){switch(e.type){case $I.CollapsedSymbol:return(0,i.jsx)(RI,{symbolName:e.symbolName,testId:`watchlist-symbol-light-${e.watchlistId}`,isLastCollapsedElement:e.isLastCollapsedElement},void 0);case $I.ExpandedSymbol:return(0,i.jsx)(ZI,{symbolName:e.symbolName,testId:`watchlist-symbol-light-expanded-${e.watchlistId}`},void 0);default:return}}const eL=function(e){class t extends o.Component{constructor(e,t){super(e,t),this.updateScrolling=(0,HO.Z)((e=>{const{horizontalStrength:t,verticalStrength:s}=this.props,{left:i,top:o,width:n,height:a}=this.container.getBoundingClientRect(),r={x:i,y:o,w:n,h:a},l=function(e){return"touchmove"===e.type?{x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY}:{x:e.clientX,y:e.clientY}}(e);this.scaleX=t(r,l),this.scaleY=s(r,l),this.frame||!this.scaleX&&!this.scaleY||this.startScrolling()}),100,{trailing:!1}),this.handleEvent=e=>{this.dragging&&!this.attached&&(this.attach(),this.updateScrolling(e))},this.scaleX=0,this.scaleY=0,this.frame=null,this.attached=!1,this.dragging=!1}componentDidMount(){const{getScrollContainer:e}=this.props,t=(0,eh.findDOMNode)(this.wrappedInstance);this.container=e?e(t):t,this.container.addEventListener("dragover",this.handleEvent),window.document.body.addEventListener("touchmove",this.handleEvent),this.clearMonitorSubscription=this.getDragDropManager().getMonitor().subscribeToStateChange((()=>this.handleMonitorChange()))}componentWillUnmount(){this.container.removeEventListener("dragover",this.handleEvent),window.document.body.removeEventListener("touchmove",this.handleEvent),this.clearMonitorSubscription(),this.stopScrolling()}getDragDropManager(){const{dragDropManager:e}=this.props,{dragDropManager:t}=this.context;return VO?e:t}handleMonitorChange(){const e=this.getDragDropManager().getMonitor().isDragging();!this.dragging&&e?this.dragging=!0:this.dragging&&!e&&(this.dragging=!1,this.stopScrolling())}attach(){this.attached=!0,window.document.body.addEventListener("dragover",this.updateScrolling),window.document.body.addEventListener("touchmove",this.updateScrolling)}detach(){this.attached=!1,window.document.body.removeEventListener("dragover",this.updateScrolling),window.document.body.removeEventListener("touchmove",this.updateScrolling)}startScrolling(){let e=0;const t=()=>{const{scaleX:s,scaleY:i,container:o}=this,{strengthMultiplier:n,onScrollChange:a}=this.props;if(0!==n&&s+i!==0){if(e++%2){const{scrollLeft:e,scrollTop:t,scrollWidth:r,scrollHeight:l,clientWidth:d,clientHeight:c}=o;a(s?o.scrollLeft=XO(0,r-d,e+s*n):e,i?o.scrollTop=XO(0,l-c,t+i*n):t)}this.frame=JO()(t)}else this.stopScrolling()};t()}stopScrolling(){this.detach(),this.scaleX=0,this.scaleY=0,this.frame&&(JO().cancel(this.frame),this.frame=null)}render(){const t=this.props,{strengthMultiplier:s,verticalStrength:o,horizontalStrength:n,onScrollChange:a}=t,r=(0,th._T)(t,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return(0,i.jsx)("div",Object.assign({ref:e=>{this.wrappedInstance=e}},{children:(0,i.jsx)(e,Object.assign({},r),void 0)}),void 0)}}if(t.displayName=`Scrolling(${e.displayName})`,t.propTypes={onScrollChange:WO.func,verticalStrength:WO.func,horizontalStrength:WO.func,strengthMultiplier:WO.number,getScrollContainer:WO.func},t.defaultProps={onScrollChange:qO,verticalStrength:UO,horizontalStrength:ZO,strengthMultiplier:30},t.contextTypes=VO?void 0:{dragDropManager:WO.object},VO){const s=function(e){return function(t){return(0,i.jsx)(RO.L.Consumer,{children:({dragDropManager:s})=>(0,i.jsx)(e,Object.assign({},t,{dragDropManager:s}),void 0)},void 0)}}(t);return _O()(s,e)}return _O()(t,e)}((e=>{const{height:t,scrollTop:s}=e,{itemList:n}=(0,ne.v)(XI,e),{dragHelper:a,dragIndex:r,dragHoverIndex:l}=UI(n),d=(0,o.useCallback)(((e,t)=>{const s=r===t,o=void 0!==r,d=QI({dragHoverIndex:l,dragIndex:r,itemList:n}),c=void 0===d||d.index!==t?void 0:d.side;return function(e){const{item:t,index:s,isDragging:o,dragHelper:n,dropSide:a,isAnyDragging:r}=e;switch(t.type){case $I.Watchlist:return(0,i.jsx)(XC,{index:s,watchlistId:t.watchlistId,collapsed:t.collapsed,dragHelper:n,isDragging:o,dropSide:a},void 0);case $I.CollapsedSymbol:return(0,i.jsx)(Ak,{index:s,watchlistId:t.watchlistId,symbolName:t.symbolName,isLastCollapsedElement:t.isLastCollapsedElement,dragHelper:n,isDragging:o,dropSide:a,isAnyDragging:r},void 0);case $I.ExpandedSymbol:return(0,i.jsx)(MI,{index:s,watchlistId:t.watchlistId,symbolName:t.symbolName,dragHelper:n,isDragging:o,dropSide:a,isAnyDragging:r},void 0);case $I.EmptyWatchlist:return(0,i.jsx)(nC,{index:s,watchlistId:t.watchlistId,dragHelper:n,dropSide:a},void 0);case $I.NewWatchlist:return(0,i.jsx)(GO,{},void 0);default:return(0,vs.N)(t)}}({index:t,item:e,isDragging:s,dragHelper:a,dropSide:c,isAnyDragging:o})}),[n,r,l,a]),c=(0,o.useCallback)((e=>void 0===r&&(e===$I.ExpandedSymbol||e===$I.CollapsedSymbol)),[r]);return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(uI,{data:n,scrollTop:s,clientHeight:t,overscrollItemsCount:10,lightRowRenderer:GI,fullRowRenderer:d,getItemHeight:KI,getItemType:YI,hasLightVersion:c,testId:"watchlist-tree"},void 0)},void 0)}));var tL;!function(e){e.AssetClass="AssetClass",e.SymbolCategory="SymbolCategory",e.Symbol="Symbol"}(tL||(tL={}));var sL=s(68446);const iL=l()([sL.b],(e=>{const t=[];for(let s=0;s<e.length;s++){const i=e[s];if(t.push({type:tL.AssetClass,assetClassId:i.id,expanded:i.expanded}),i.expanded)for(let e=0;e<i.categoryList.length;e++){const s=i.categoryList[e];let o=0;if(s.isDefault||(o=1,t.push({type:tL.SymbolCategory,symbolCategoryId:s.id,expanded:s.expanded,level:o,testId:`category-asset-class-${i.id}`})),(s.expanded||s.isDefault)&&s.symbolList.length)for(let e=0;e<s.symbolList.length;e++){const n=s.symbolList[e],a=0===e,r=e===s.symbolList.length-1;t.push({type:tL.Symbol,symbolName:n.name,level:o,isFirstElement:a,isLastElement:r,testId:`symbol-item-asset-class-${i.id}-category-${s.id}`})}}}return t}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().viewId()})),oL=l()([(0,u.$)(g.C).isMainMenuVisible(),iL],((e,t)=>({itemList:e?t:[]})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().viewId()}));function nL(e,t,s){if(e&&void 0!==s){const e=s.toLowerCase(),i=e.includes("forex")||e.includes("fx");return!t&&i}return!1}const aL=l()([(0,u.$)(c.H).data.isLcg(),Pe.C,(0,u.$)(Be.r).name()],((e,t,s)=>({assetClassName:s,isSettingsIconShown:nL(e,t,s)})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().assetClassId()}));class rL extends o.Component{constructor(){super(...arguments),this.showAssetsSettingsDialog=e=>{e.stopPropagation();const{showSettingsDialog:t}=this.props;t(Ho.b.ApplicationAssets)}}render(){return(0,i.jsxs)(yC,Object.assign({onClick:this.showAssetsSettingsDialog},{children:[(0,i.jsx)(se.J,{size:oe.J.Medium,source:ie.Y.settings},void 0),(0,O.L)("Set units per asset class")]}),void 0)}}const lL=(0,n.$)(void 0,{showSettingsDialog:mn.z.open})(rL);class dL extends o.Component{constructor(){super(...arguments),this.handleClickElement=()=>{const{assetClassId:e,toggleAssetClass:t}=this.props;t({viewId:BC.an.mainWatchlist,assetClassId:e})}}render(){const{assetClassId:e,assetClassName:t,expanded:s,isSettingsIconShown:o,styles:n}=this.props,a=s?ie.Y.treeExpanded:ie.Y.treeCollapsed;return(0,i.jsx)("div",Object.assign({className:n.root,onClick:this.handleClickElement},{children:(0,i.jsxs)("div",Object.assign({className:n.levelShift},{children:[(0,i.jsx)("div",Object.assign({className:n.openIcon},{children:(0,i.jsx)(se.J,{size:oe.J.Small,source:a},void 0)}),void 0),(0,i.jsx)("div",Object.assign({className:n.name},{children:e===BC.F4?(0,O.L)("Popular Markets"):t}),void 0),o&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(es.q,{},void 0),(0,i.jsx)(lL,{},void 0)]},void 0)]}),void 0)}),void 0)}}const cL=(0,n.$)(aL,{toggleAssetClass:MC.n.toggleAssetClass},null,{forwardRef:!0})((0,x.Z)((e=>{const{backgroundColor:t,foregroundColor:s}=e.theme.palette.semantic,i=(0,J.p)("assetClassElement");return{root:{display:"flex",[`:hover .${i}`]:{fill:s.primary2},height:29},levelShift:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({display:"flex"},(0,vn.f)(0,1,"100%")),{overflow:"hidden",alignItems:"center"}),(0,Q.O)({color:t.secondaryNormal})),(0,V.E)(Z.q0)),{paddingLeft:Z.W0,paddingRight:Z.W0}),openIcon:(0,_.g)(i,(()=>Object.assign(Object.assign({},(0,vn.f)(0,0,15)),{display:"flex",alignItems:"center",justifyContent:"center",paddingLeft:Z.W0+4,fill:s.secondary}))),name:Object.assign(Object.assign({},(0,vn.f)(0,1,"100%")),{paddingLeft:Z.W0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"})}}))(dL));var uL=s(36373);const hL=l()([(0,u.$)(c.H).data.isLcg(),Pe.C,(0,u.$)(uL.d).name(),(0,u.$)(uL.d).color()],((e,t,s,i)=>({categoryName:s,categoryColor:i,isSettingsIconShown:nL(e,t,s)})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().symbolCategoryId()}));class gL extends o.Component{constructor(){super(...arguments),this.handleClickElement=()=>{const{symbolCategoryId:e,toggleCategory:t}=this.props;t({viewId:BC.an.mainWatchlist,categoryId:e})}}render(){const{categoryName:e,expanded:t,isSettingsIconShown:s,testId:o,styles:n}=this.props,a=t?ie.Y.treeExpanded:ie.Y.treeCollapsed;return(0,i.jsx)("div",Object.assign({className:n.root,onClick:this.handleClickElement},{children:(0,i.jsxs)("div",Object.assign({className:n.levelShift},{children:[(0,i.jsx)("div",Object.assign({className:n.openIcon},{children:(0,i.jsx)(se.J,{size:oe.J.Small,source:a},void 0)}),void 0),(0,i.jsx)("div",Object.assign({className:n.name},{children:e}),void 0),s&&(0,i.jsx)(lL,{},void 0)]}),void 0)}),void 0)}}const pL=(0,n.$)(hL,{toggleCategory:MC.n.toggleCategory},null,{forwardRef:!0})((0,x.Z)((e=>{const{level:t,categoryColor:s}=e,{backgroundColor:i,foregroundColor:o}=e.theme.palette.semantic,n=(0,J.p)("categoryArrowIcon");return{root:{display:"flex",paddingLeft:20*t,height:29,[`:hover .${n}`]:{fill:s?`#${s}`:o.primary2}},levelShift:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({display:"flex"},(0,vn.f)(0,1,"100%")),{overflow:"hidden",alignItems:"center"}),(0,Q.O)({color:0===t?i.secondaryNormal:i.tertiaryNormal})),(0,V.E)(Z.q0)),{paddingLeft:Z.W0,paddingRight:Z.W0}),openIcon:(0,_.g)(n,(()=>Object.assign(Object.assign({},(0,vn.f)(0,0,15)),{display:"flex",alignItems:"center",justifyContent:"center",paddingLeft:Z.W0+4,fill:s?`#${s}`:o.secondary}))),name:Object.assign(Object.assign({},(0,vn.f)(0,1,"100%")),{paddingLeft:Z.W0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"})}}))(gL));var bL=s(16352);const vL=l()([(0,u.$)(pk.e).symbolId(),bL.T],((e,t)=>({symbolId:e,isSymbolPresentInWatchlist:t})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().symbolName()})),mL={display:"block",position:"absolute",height:1,right:0,left:0,content:'""'},jL=l()([(0,u.$)(pk.e).symbolId()],(e=>({symbolId:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().symbolName()})),xL=(0,o.memo)((e=>{const{symbolName:t,hide:s}=e,{symbolId:n}=(0,ne.v)(jL,{symbolName:t}),a=(0,re.I0)(),r=(0,o.useCallback)((()=>void 0===n?null:(0,i.jsx)(Ck.t,{symbolName:t,analyticsMethod:y.Zq.FinderSymbolContextMenu,hide:s},void 0)),[n,t,s]),l=(0,o.useCallback)((()=>{a(Uc.L.open({type:Kc.k.TradeDialog,tradeType:Zc.YL.NewPosition,symbolId:n})),s()}),[a,n,s]),d=(0,o.useCallback)((e=>{e.stopPropagation(),a(Ik.p.create({symbolId:n})),a(S.m.tag({label:Ut.BN.NewChartButton,params:{method:Ut.CI.FinderContextMenu}})),s()}),[a,n,s]);return(0,i.jsxs)(At.s,Object.assign({testId:"finder-symbol-context-panel"},{children:[(0,i.jsx)(od.Z,Object.assign({testId:"create-new-order",disabled:void 0===n,onClick:l},{children:(0,O.L)("Create New Order")}),void 0),(0,i.jsx)(od.Z,Object.assign({testId:"new-chart",disabled:void 0===n,onClick:d},{children:(0,O.L)("New Chart")}),void 0),(0,i.jsx)(jo.D,{},void 0),(0,i.jsxs)(od.Z,Object.assign({testId:"add-to-watchlist",disabled:void 0===n},{children:[(0,O.L)("Add to Watchlist"),r]}),void 0)]}),void 0)}));class yL extends o.Component{constructor(){super(...arguments),this.renderElementTarget=()=>(e,t)=>{const{symbolId:s,symbolName:o,isSymbolPresentInWatchlist:n,testId:a,rules:r,styles:l}=this.props,d=n?ie.Y.starFilled:ie.Y.starOutline;return(0,i.jsx)("div",Object.assign({className:l.root,onClick:this.onElementClick},{children:(0,i.jsxs)(RC.x,Object.assign({placement:"bottom-start",placementByCursor:!0,wide:!0,testId:"symbol"},{children:[(0,i.jsxs)("div",Object.assign({className:l.levelShift},{children:[(0,i.jsxs)(hd.v,Object.assign({placement:"bottom-start",testId:"add-to-watchlist"},{children:[(0,i.jsx)("div",Object.assign({className:l.present},{children:(0,i.jsx)(_c.h,Object.assign({isTransparent:!0,testId:"add-to-watchlist-control"},{children:(0,i.jsx)(se.J,{source:d,title:(0,O.L)("Add to Watchlist"),placement:"top",extend:{root:r.presentIconStyle(this.props)}},void 0)}),void 0)}),void 0),this.renderAddWatchlistElement(o,y.Zq.FinderAddSymbol)]}),void 0),(0,i.jsx)("div",Object.assign({className:l.status},{children:(0,i.jsx)(fk.Z,{symbolId:s},void 0)}),void 0),(0,i.jsxs)("div",Object.assign({onMouseEnter:e,onMouseLeave:t,className:l.name},{children:[(0,i.jsx)("div",Object.assign({className:l.clippedText},{children:o}),void 0),(0,i.jsx)(es.q,{},void 0),(0,i.jsx)(GC,{symbolId:s},void 0)]}),void 0),(0,i.jsx)(lk,{symbolId:s,withChange:!1},void 0)]}),void 0),this.renderSymbolElement(o)]}),void 0)}),void 0)},this.renderSymbolElement=e=>t=>{const{hide:s}=t;return(0,i.jsx)(xL,{symbolName:e,hide:s},void 0)},this.renderAddWatchlistElement=(e,t)=>s=>{const{hide:o}=s;return(0,i.jsx)(Ck.t,{symbolName:e,analyticsMethod:t,hide:o},void 0)},this.onElementClick=()=>{const{symbolId:e,selectElement:t}=this.props;void 0!==e&&t({symbolId:e})}}render(){const{symbolId:e}=this.props;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(al.i,{symbolId:e},void 0),(0,i.jsx)(Ok.B,{symbolId:e},void 0),(0,i.jsx)(Dk,Object.assign({symbolId:e},{children:this.renderElementTarget()}),void 0)]},void 0)}}const SL=(0,n.$)(vL,{selectElement:hs.t.selectElement},null,{forwardRef:!0})((0,x.Z)((e=>{const{level:t,isLastElement:s}=e,{backgroundColor:i}=e.theme.palette.semantic,o=20*t,n=(0,J.p)("finderSymbolElement");return{root:{flexGrow:1,display:"flex",paddingLeft:o,[`:hover .${n}`]:Object.assign({},(0,Q.O)({color:i.primaryHover})),overflow:"hidden"},levelShift:(0,_.g)(n,(()=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({display:"flex",flexDirection:"row",alignItems:"center"},(0,vn.f)(0,1,"100%")),(0,Q.O)({color:i.primaryNormal})),{height:34}),(0,V.E)(Z.q0)),{paddingLeft:Z.W0,paddingRight:Z.W0,maxWidth:"100%",position:"relative",":hover":Object.assign({},(0,Q.O)({color:i.primaryHover})),":hover:before":Object.assign(Object.assign(Object.assign({},mL),{top:-1}),(0,Q.O)({color:i.primaryNormal}))}),s?{}:{":not(:hover):after":Object.assign(Object.assign(Object.assign({},mL),{bottom:0}),(0,Q.O)({color:i.strokeNormal}))}))),present:Object.assign(Object.assign({},(0,vn.f)(0,0,24)),{display:"flex",alignItems:"center",justifyContent:"center",paddingLeft:Z.W0}),presentIconStyle:Object.assign(Object.assign({},(0,Q.O)({color:"transparent"})),{":hover":Object.assign({},(0,Q.O)({color:"transparent"}))}),status:Object.assign(Object.assign({},(0,vn.f)(0,0,24)),{display:"flex",alignItems:"center",justifyContent:"center",paddingLeft:Z.W0}),name:{flexBasis:115,flexGrow:1,flexShrink:1,paddingLeft:Z.W0,display:"flex",alignItems:"center",minWidth:0,height:"100%"},clippedText:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}}))(yL));class fL extends o.Component{render(){const{symbolName:e,testId:t,styles:s}=this.props;return(0,i.jsxs)("div",Object.assign({className:s.root},{children:[(0,i.jsx)("div",Object.assign({className:s.starIcon},{children:(0,i.jsx)(se.J,{size:oe.J.Medium,source:ie.Y.starOutline},void 0)}),void 0),(0,i.jsx)(EI,{},void 0),(0,i.jsxs)("div",Object.assign({className:s.name},{children:[this.renderClippedText(e),(0,i.jsx)(es.q,{},void 0)]}),void 0),(0,i.jsx)("div",Object.assign({className:s.price},{children:ir.kZ}),void 0),(0,i.jsx)("div",Object.assign({className:s.price},{children:ir.kZ}),void 0),(0,i.jsx)(es.q,{},void 0)]}),void 0)}renderClippedText(e){const{styles:t}=this.props;return(0,i.jsx)("span",Object.assign({className:t.clippedText},{children:e}),void 0)}}const OL=(0,x.Z)((e=>{const{level:t,isLastElement:s,theme:i}=e,{foregroundColor:o,backgroundColor:n}=i.palette.semantic;return{root:{flexGrow:1,display:"flex",flexDirection:"row",alignItems:"center",height:34,maxWidth:"100%",marginLeft:20*t,position:"relative",nested:s?{}:{":after":Object.assign({display:"block",position:"absolute",height:1,right:0,left:0,content:'""',bottom:0},(0,Q.O)({color:n.strokeNormal}))}},name:{flexBasis:115,flexGrow:1,flexShrink:1,paddingLeft:Z.W0,display:"flex",alignItems:"center",minWidth:0,height:"100%"},clippedText:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},starIcon:{fill:o.secondary,marginLeft:10,marginRight:5},price:{paddingLeft:Z.W0,display:"block",textAlign:"right",maxWidth:60,minWidth:60,color:o.secondary}}}))(fL);function CL(e){return e===tL.Symbol}function kL(e){return e.type}function IL(e){if(e.type===tL.Symbol)return(0,i.jsx)(OL,{symbolName:e.symbolName,isLastElement:e.isLastElement,level:e.level,testId:e.testId},void 0)}function LL(e){switch(e.type){case tL.AssetClass:return(0,i.jsx)(cL,{assetClassId:e.assetClassId,expanded:e.expanded},void 0);case tL.SymbolCategory:return(0,i.jsx)(pL,{symbolCategoryId:e.symbolCategoryId,expanded:e.expanded,level:e.level,testId:e.testId},void 0);case tL.Symbol:return(0,i.jsx)(SL,{symbolName:e.symbolName,level:e.level,isFirstElement:e.isFirstElement,isLastElement:e.isLastElement,testId:e.testId},void 0);default:return}}function wL(e){switch(e.type){case tL.AssetClass:case tL.SymbolCategory:return 29+Z.W0;case tL.Symbol:return e.isLastElement?34+Z.W0:34;default:return}}const TL=(0,o.memo)((e=>{const{scrollTop:t,height:s,viewId:o}=e,{itemList:n}=(0,ne.v)(oL,{viewId:o});return(0,i.jsx)(uI,{data:n,scrollTop:t,clientHeight:s,overscrollItemsCount:10,lightRowRenderer:IL,fullRowRenderer:LL,getItemHeight:wL,getItemType:kL,hasLightVersion:CL,testId:"symbol-tree"},void 0)}));var DL=s(6794),PL=s(55319);const NL=l()([(0,u.$)(ds.K).data.mode()],(e=>({mode:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class AL extends o.Component{constructor(){super(...arguments),this.onChange=e=>{const{toggleMode:t}=this.props;t({mode:e})}}render(){const{mode:e,rules:t}=this.props;return(0,i.jsx)(PL.S,{value:e,onChange:this.onChange,stretch:!0,data:this.getOptions(),testId:"market-watch-switch",extend:{root:t.root(this.props),radio:t.radio(this.props)}},void 0)}getOptions(){return[{label:(0,O.L)("Watchlists"),value:NO.n.Watchlists,testId:"watchlists"},{label:(0,O.L)("All Symbols"),value:NO.n.Finder,testId:"finder"}]}}const BL=(0,n.$)(NL,{toggleMode:hs.t.toggleMode})((0,x.Z)((()=>({root:{marginTop:Z.W0,marginBottom:Z.W0},radio:{flexGrow:1,flexShrink:1,flexBasis:"50%"}})))(AL)),ML=(0,nI.h1)().trackWidth,$L=e=>{const{foregroundColor:t,backgroundColor:s}=e.theme.palette.semantic;return{root:{display:"flex",flexDirection:"column",height:"auto",paddingLeft:Z.W0},finderElement:{flexGrow:0,flexShrink:1,flexBasis:"100%",display:"flex",alignItems:"center"},input:Object.assign(Object.assign({},(0,Q.O)({color:s.quaternaryNormal})),{nested:{":hover":Object.assign({},(0,Q.O)({color:s.quaternaryHover}))}}),bidLabel:{flexGrow:0,flexShrink:0,flexBasis:60,paddingLeft:Z.W0,paddingRight:Z.W0,display:"flex",alignItems:"center",justifyContent:"flex-end",color:t.secondary},askLabel:{flexGrow:0,flexShrink:0,flexBasis:60,paddingLeft:Z.W0,paddingRight:Z.W0,display:"flex",alignItems:"center",justifyContent:"flex-end",color:t.secondary},inputSection:{display:"flex",marginBottom:Z.W0,marginRight:ML}}},EL=l()([(0,u.$)(c.H).data.isLcg(),BO.v],((e,t)=>({isLcg:e,filter:t})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().viewId()})),FL=(0,o.memo)((e=>{const{viewId:t}=e,{isLcg:s,filter:n}=(0,ne.v)(EL,{viewId:t}),[a,r]=(0,o.useState)(n),l=(0,re.I0)(),d=(0,o.useCallback)((e=>{r(e),l(MC.n.setFilter({viewId:BC.an.mainWatchlist,filter:e}))}),[l,r]),c=(0,o.useCallback)((()=>{d("")}),[d]),{css:u,rules:h}=(0,te.X)($L,{});return(0,i.jsxs)("div",Object.assign({className:u.root()},{children:[(0,i.jsx)(BL,{},void 0),(0,i.jsxs)("div",Object.assign({className:u.inputSection()},{children:[(0,i.jsx)("div",Object.assign({className:u.finderElement()},{children:(0,i.jsx)(Ar.M,{value:a,placeholder:s?(0,O.L)("Type market name"):(0,O.L)("Type symbol name"),autoFocus:!0,onChange:d,onClear:c,testId:"market-watch-search",extend:{input:h.input}},void 0)}),void 0),(0,i.jsx)("div",Object.assign({className:u.bidLabel()},{children:(0,O.L)("Bid")}),void 0),(0,i.jsx)("div",Object.assign({className:u.askLabel()},{children:(0,O.L)("Ask")}),void 0)]}),void 0)]}),void 0)}));var RL=s(51685);const WL=(0,o.memo)((e=>{const{viewId:t}=e,{isLoading:s,isPlugVisible:n,mode:a}=(0,ne.v)(FO,{viewId:t});(0,DL.C)();const[r,l]=(0,o.useState)({scrollTop:0,clientWidth:0,clientHeight:0}),{css:d,rules:c}=(0,te.X)(PO,{}),u=(0,o.useCallback)((e=>{const{scrollTop:t,clientWidth:s,clientHeight:i}=e;l({scrollTop:t,clientWidth:s,clientHeight:i})}),[l]),h=(0,o.useCallback)(((e,s)=>(0,i.jsxs)(qe.X,Object.assign({onScrollValuesUpdated:u,showHorizontalScroll:!1,autoHeightMin:s,extend:{root:c.scrollRoot,content:c.scrollContent,trackVertical:c.scrollTrackVertical}},{children:[a===NO.n.Watchlists&&(0,i.jsx)(eL,{viewId:t,width:r.clientWidth,height:r.clientHeight,scrollTop:r.scrollTop},void 0),a===NO.n.Finder&&(0,i.jsx)(TL,{viewId:t,width:r.clientWidth,height:r.clientHeight,scrollTop:r.scrollTop},void 0)]}),"watchlistScroll")),[a,t,r,u,c]);return n?(0,i.jsx)(RL.x,{},void 0):s?(0,i.jsx)(lu.h,{},void 0):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(FL,{viewId:BC.an.mainWatchlist},void 0),(0,i.jsx)("div",Object.assign({className:d.scrollContainer()},{children:(0,i.jsx)(je.X,{children:(0,i.jsx)(xe.R,{children:h},void 0)},void 0)}),void 0)]},void 0)}));var HL=s(43796),zL=s(76754);const JL=(0,o.memo)((e=>{const{viewId:t}=e,{css:s}=(0,te.X)(DO,{});return(0,i.jsx)("div",Object.assign({className:s.root(),tabIndex:-1,style:{outline:"none"}},{children:(0,i.jsx)(HL.U,Object.assign({id:zL.DC.MarketWatch},{children:(0,i.jsx)(WL,{viewId:t},void 0)}),void 0)}),void 0)}));var QL=s(22271);const _L=l()([QL.f],(e=>({hideLabels:0===e.filter((e=>void 0!==e.subaccountOf)).length})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var qL=s(39057),XL=s(71640);const VL=l()([(0,u.$)(XL.R).data.showStoppedBySelf(),(0,u.$)(XL.R).data.showStoppedByProvider()],((e,t)=>({showStoppedBySelf:e,showStoppedByProvider:t})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var ZL=s(30151);class UL extends o.Component{constructor(){super(...arguments),this.renderElement=()=>()=>{const{showStoppedBySelf:e,showStoppedByProvider:t}=this.props;return(0,i.jsxs)("div",{children:[(0,i.jsx)(od.Z,Object.assign({disabled:!0,extend:{label:{paddingLeft:Z.W0}},testId:"show-copied-strategies"},{children:(0,O.L)("Show Copied Strategies")}),void 0),(0,i.jsx)(qL.N,Object.assign({checked:!0,disabled:!0,testId:"active"},{children:(0,O.L)("Active")}),void 0),(0,i.jsx)(qL.N,Object.assign({checked:e,onChange:this.onChangeToggleBySelf,testId:"stopped"},{children:(0,O.L)("Stopped")}),void 0),(0,i.jsx)(qL.N,Object.assign({checked:t,onChange:this.onChangeToggleByProvider,testId:"removed-by-provider"},{children:(0,O.L)("Removed by Provider")}),void 0)]},void 0)},this.onChangeToggleBySelf=()=>{const{toggleStoppedBySelf:e}=this.props;e()},this.onChangeToggleByProvider=()=>{const{toggleStoppedByProvider:e}=this.props;e()}}render(){return(0,i.jsxs)(hd.v,Object.assign({placement:"bottom-start"},{children:[(0,i.jsx)(se.J,{source:ie.Y.settings,size:18},void 0),this.renderElement()]}),void 0)}}const KL=(0,n.$)(VL,{toggleStoppedBySelf:ZL.A.toggleStoppedBySelf,toggleStoppedByProvider:ZL.A.toggleStoppedByProvider})(UL);class YL extends o.Component{render(){const{search:e,onChange:t,styles:s,rules:o}=this.props;return(0,i.jsxs)("div",Object.assign({className:s.root},{children:[(0,i.jsx)("div",Object.assign({className:s.searchContainer},{children:(0,i.jsxs)(zs.b,{children:[(0,i.jsx)(Ar.M,{testId:"strategy-search",value:e,onChange:t,onClear:t,extend:{input:o.input(this.props)}},void 0),(0,O.L)("You can filter your accounts list here")]},void 0)}),void 0),(0,i.jsxs)("div",Object.assign({className:s.tableHead},{children:[(0,i.jsx)("div",Object.assign({className:s.equity},{children:(0,i.jsxs)(pI.O,{children:[(0,O.L)("Balance"),(0,O.L)("Current Balance of copy trading account")]},void 0)}),void 0),(0,i.jsx)("div",Object.assign({className:s.roi},{children:(0,i.jsxs)(pI.O,{children:[(0,O.L)("ROI"),(0,O.L)("All Time ROI")]},void 0)}),void 0),(0,i.jsx)("div",Object.assign({className:s.settings},{children:(0,i.jsx)(KL,{},void 0)}),void 0)]}),void 0)]}),void 0)}}const GL=(0,n.$)(_L)((0,x.Z)((e=>{const{isScrollPresent:t}=e,{foregroundColor:s,backgroundColor:i}=e.theme.palette.semantic,o=10*Number(t),n=e.hideLabels?{opacity:0,pointerEvents:"none"}:{};return{root:{display:"flex",alignItems:"center",marginBottom:10},searchContainer:{width:"50%"},input:Object.assign(Object.assign({},(0,Q.O)({color:i.quaternaryNormal})),{nested:{":hover":Object.assign({},(0,Q.O)({color:i.quaternaryHover}))}}),tableHead:{display:"flex",color:s.tertiary,alignItems:"center",flexGrow:1,justifyContent:"flex-end"},equity:Object.assign(Object.assign(Object.assign({marginLeft:15-o},(0,vn.f)(0,0,47)),{justifyContent:"flex-end",display:"flex",minWidth:0}),n),roi:Object.assign(Object.assign(Object.assign({marginLeft:t?20:22},(0,vn.f)(0,0,62)),{justifyContent:"flex-end",display:"flex",minWidth:0}),n),settings:Object.assign(Object.assign({display:"flex",width:"100%",justifyContent:"flex-end"},(0,vn.f)(0,0,32)),{fill:s.secondary,":hover":{fill:s.primary2}})}}))(YL));class ew extends o.Component{constructor(){super(...arguments),this.onClick=()=>{const{openAccountDialog:e,track:t}=this.props;e({tab:La.e.Live}),t({name:y.T2.AccountWindowOpened,params:{method:y.Zq.CopyMenu}})}}render(){const{styles:e}=this.props;return(0,i.jsx)("div",Object.assign({className:e.root,onClick:this.onClick},{children:(0,i.jsx)("span",{children:`+ ${(0,O.L)("Open Live Account")}`},void 0)}),void 0)}}const tw=(0,n.$)(void 0,{openAccountDialog:Ia.G.open,track:S.m.track})((0,x.Z)((e=>{const{primaryNormal:t,primaryHover:s}=e.theme.palette.semantic.buttonBackgroundColor;return{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,X.o)(7,0)),{display:"flex",justifyContent:"center"}),(0,V.E)(Z.q0)),(0,Q.O)({color:t})),{cursor:"pointer",":hover":Object.assign({},(0,Q.O)({color:s}))})}}))(ew));var sw=s(29412),iw=s(94404),ow=s(77909);const nw=l()([(0,u.$)($O.r).networkStatus(),(0,u.$)(iw.q).networkStatus(),(0,u.$)(XL.R).networkStatus(),sw.X,(0,u.$)(ei.c).settings.CreateLiveAccount.AllowCreationOfAdditionalLiveAccounts(),(0,u.$)(c.H).data.isFeaturedBrokersEnabled(),(0,u.$)(XL.R).data()],((e,t,s,i,o,n,a)=>({isLoading:e!==Cs.I.Done||t!==Cs.I.Done||s!==Cs.I.Done,statusList:ow.k.toFollowerStatusList(a),accountList:i.map((e=>({accountId:e.accountId,brokerName:e.brokerName,traderLogin:e.traderLogin,plantId:e.plantId}))),showOpenLiveAccountButton:o||n})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var aw=s(91578);const rw=l()([(0,u.$)(aw.t).strategyId(),(0,u.$)(aw.t).networkError()],((e,t)=>({strategyId:e,isStrategyExist:void 0!==e&&t!==dn.nD.ProviderNotFound})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().accountId()}));var lw=s(62799),dw=s(30365),cw=s(62285),uw=s(56766),hw=s(92);const gw=l()([(0,u.$)(cw.D).live(),(0,u.$)(cw.D).plantId(),uw.q,(0,u.$)(cw.D).traderLogin(),(0,u.$)(cw.D).accountName(),(0,u.$)(cw.D).leverage(),(0,u.$)(cw.D).brokerTitle(),(0,u.$)(cw.D).isFollowingDisabledInGroup(),(0,u.$)(cw.D).isProvidingDisabledInGroup()],((e,t,s,i,o,n,a,r,l)=>({isLive:e,plantId:t,balance:s,traderLogin:i,accountName:o,leverage:n,brokerTitle:a,isFollowingDisabledInGroup:r,isProvidingDisabledInGroup:l})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().accountId()})),pw=l()([gw,(0,u.$)(Xt.m).data.isAccountNameShown(),hw.U,(0,u.$)(aw.t).status(),lw.l,(0,u.$)(aw.t).strategyId(),(0,u.$)(df.U).location.pathname()],((e,t,s,i,o,n,r)=>{const l=void 0!==n?(0,a.Gn)(he.Z.CopyStrategy,{strategyId:n}):void 0;return Object.assign(Object.assign({},e),{isAccountNameShown:t,plantStatus:s,isActive:i===dw.LK.Active,followerAccountIdList:o.map((e=>e.accountId)),isCurrent:l===r,strategyId:n})}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().accountId()}));var bw=s(5875),vw=s(10112),mw=s(40382),jw=s(9648),xw=s(49149);const yw=l()([(0,u.$)(XL.R).data.showStoppedBySelf(),(0,u.$)(XL.R).data.showStoppedByProvider(),(0,u.$)(vw.A).followerStatus(),(0,u.$)(jw.u).status()],((e,t,s,i)=>(0,mw.HD)(i)?t:![xw.z.Stopped,xw.z.Pending].includes(s)||e))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().accountId()}));var Sw=s(27665),fw=s(40756);const Ow=l()([(0,u.$)(vw.A).strategyId(),(0,u.$)(vw.A).strategyProviderName(),uw.q,fw.q,(0,u.$)(vw.A).followerStatus(),yw],((e,t,s,i,o,n)=>({strategyId:e,strategyName:t,equity:s,roi:i,followerStatus:o,isSubAccountVisible:n})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().accountId()})),Cw=l()([Ow,(0,u.$)(jw.u).networkStatus(),(0,u.$)(jw.u).status(),v,Sw.p,(0,u.$)(df.U).location.pathname()],((e,t,s,i,o,n)=>{const a=t!==Cs.I.Done&&t!==Cs.I.Failed;return Object.assign(Object.assign(Object.assign(Object.assign({},e),{isCopyingStrategyLoading:a,isCopyingStrategyDeleted:!a&&(0,mw.HD)(s),isCopyingStrategyStopped:(0,mw.jP)(s)}),function(e){return{isShowRoi:e>350,isShowEquity:e>290}}(i)),{isActive:o===n})}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().accountId()}));var kw=s(7383),Iw=s(54534),Lw=s(3971),ww=s(19071);const Tw=l()([zo.i,(0,u.$)(cw.D).isFollowingDisabledInGroup(),(0,u.$)(vw.A).strategyFollowerId(),(0,u.$)(vw.A).followerStatus(),(0,u.$)(jw.u).strategyId(),(0,u.$)(jw.u).status(),ww.E,(0,u.$)(vw.A).sendOwnStatement(),(0,u.$)(jw.u).status()],((e,t,s,i,o,n,a,r,l)=>({sharingCode:e,isFollowingDisabledInGroup:t,followerId:s,followerStatus:i,strategyId:o,strategyStatus:n,equity:a,isEmailStatementEnabled:r,isAddFunds:(i===xw.z.Started||i===xw.z.CloseOnly)&&l!==dw.LK.Deleted})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().accountId()}));var Dw=s(39185),Pw=s(64896),Nw=s(3746),Aw=s(24399),Bw=s(66334),Mw=s(37395),$w=s(93874),Ew=s(50337);class Fw extends o.Component{constructor(){super(...arguments),this.onAddClick=()=>{const{accountId:e,openAddFundsDialog:t,hide:s}=this.props;t({accountId:e}),s()},this.onRemoveClick=()=>{const{accountId:e,openRemoveFundsDialog:t,hide:s}=this.props;t(e),s()},this.onSetEquityClick=()=>{const{accountId:e,openEquityStopLossDialog:t,hide:s}=this.props;t(e),s()},this.onRestartClick=()=>{const{accountId:e,restart:t,hide:s}=this.props;t({accountId:e}),s()},this.onStopClick=()=>{const{accountId:e,openStopCopyingDialog:t,hide:s}=this.props;t(e),s()},this.onStrategyClick=()=>{const{strategyId:e,pushStrategy:t,hide:s}=this.props;t(e),s()},this.onViewPasswordClick=()=>{const{accountId:e,openInvestorPasswordDialog:t,hide:s}=this.props;t(e),s()},this.onRemovePasswordClick=()=>{const{accountId:e,openRemoveInvestorPasswordDialog:t,hide:s}=this.props;t(e),s()},this.onEmailStatementClick=e=>{const{followerId:t,changeSendOwnStatement:s,hide:i}=this.props;s({followerId:t,sendOwnStatement:e}),i()}}render(){const{accountId:e,sharingCode:t,isFollowingDisabledInGroup:s,followerStatus:o,strategyStatus:n,equity:a,isEmailStatementEnabled:r,rules:l,isAddFunds:d}=this.props;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(_o.d,{accountId:e},void 0),(0,i.jsx)(Bw.v,{accountId:e},void 0),d?(0,i.jsx)(ut.K,Object.assign({onClick:this.onAddClick,disabled:(0,mw.HD)(n),testId:"add-funds",wide:!0,extend:{root:l.button(this.props)}},{children:(0,O.L)("Add Funds")}),void 0):(0,i.jsx)(ut.K,Object.assign({title:s?(0,O.L)("Restart copying is not available for this account. Please contact your broker for details."):void 0,disabled:(0,mw.HD)(n)||n===dw.LK.Stopped||o===xw.z.Pending||!0===s,onClick:this.onRestartClick,testId:"restart-copying",wide:!0,extend:{root:l.button(this.props)}},{children:(0,O.L)("Restart Copying")}),void 0),(0,i.jsx)(od.Z,Object.assign({onClick:this.onRemoveClick,testId:"remove-funds"},{children:(0,O.L)("Remove Funds")}),void 0),(0,i.jsx)(jo.D,{},void 0),(0,i.jsx)(od.Z,Object.assign({disabled:o===xw.z.Stopped||o===xw.z.Pending||void 0===a||a.lte(0)||n===dw.LK.Stopped,onClick:this.onSetEquityClick,testId:"set-equity-stop-loss"},{children:(0,O.L)("Set Equity Stop Loss")}),void 0),d&&(0,i.jsx)(od.Z,Object.assign({onClick:this.onStopClick,testId:"stop-copying"},{children:(0,O.L)("Stop Copying")}),void 0),(0,i.jsx)(jo.D,{},void 0),(0,i.jsx)(od.Z,Object.assign({disabled:(0,mw.HD)(n),onClick:this.onStrategyClick,testId:"open-strategy-page"},{children:(0,O.L)("Open Strategy Page")}),void 0),(0,i.jsx)(jo.D,{},void 0),(0,i.jsx)(od.Z,Object.assign({onClick:this.onViewPasswordClick,testId:"investor-link"},{children:t?(0,O.L)("View Investor Link"):(0,O.L)("Create Investor Link")}),void 0),t&&(0,i.jsx)(od.Z,Object.assign({onClick:this.onRemovePasswordClick,testId:"delete-investor-link"},{children:(0,O.L)("Delete Investor Link")}),void 0),(0,i.jsx)(qL.N,Object.assign({checked:r,onChange:this.onEmailStatementClick,testId:"email-statements"},{children:(0,O.L)("Email Statements")}),void 0)]},void 0)}}const Rw=(0,n.$)(Tw,{pushStrategy:uf.n.pushStrategy,openAddFundsDialog:Mw.K.open,openRemoveFundsDialog:$w.E.open,openEquityStopLossDialog:Aw.O.open,restart:Pw.n.restart,openStopCopyingDialog:Ew.h.open,openInvestorPasswordDialog:Dw.O.open,openRemoveInvestorPasswordDialog:Vo.M.open,changeSendOwnStatement:Nw.r.changeSendOwnStatement})((0,x.Z)((()=>({button:{height:Z.b,marginBottom:Z.W0}})))(Fw));var Ww=s(34647),Hw=s(88732),zw=s(2803),Jw=s(63115);class Qw extends o.Component{constructor(){super(...arguments),this.renderSubAccountElement=e=>t=>{const{accountId:s,rules:o}=this.props,{hide:n}=t;return(0,i.jsxs)(zs.b,Object.assign({extend:{root:o.settingsContext(this.props)}},{children:[(0,i.jsx)(Rw,{accountId:s,hide:n},void 0),e]}),void 0)},this.onClick=e=>{const{accountId:t,pushSubAccount:s}=this.props;e.preventDefault(),e.stopPropagation(),s(t)}}render(){const{strategyId:e}=this.props;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Ww.Q,{strategyId:e},void 0),this.renderContent()]},void 0)}renderContent(){const{accountId:e,strategyId:t,strategyName:s,equity:o,roi:n,followerStatus:a,isCopyingStrategyDeleted:r,isShowEquity:l,isShowRoi:d,isCopyingStrategyStopped:c,isSubAccountVisible:u,styles:h}=this.props;if(!u||void 0===t)return null;const g=r?(0,O.L)("Removed by Provider"):s,p=c||r?void 0:(0,O.L)("The name of the strategy you are following"),b=c||r?void 0:(0,O.L)("Current Equity of copy trading account"),v=c||r?void 0:(0,O.L)("All Time ROI"),m=(0,Hw.l)(a);let j;return c?j=(0,O.L)("The strategy was stopped by provider"):r&&(j=(0,O.L)("The provider has removed the strategy. You can use the cog button above to hide it from your list")),(0,i.jsxs)("div",Object.assign({className:h.root,onClick:this.onClick},{children:[(0,i.jsx)(Iw.Q,{accountId:e},void 0),(0,i.jsx)(Jw.v,{accountId:e},void 0),(0,i.jsxs)(zs.b,Object.assign({wide:!0},{children:[(0,i.jsxs)("div",Object.assign({className:h.content},{children:[(0,i.jsxs)(zs.b,{children:[(0,i.jsx)("div",{className:h.copyingStatus},void 0),m]},void 0),(0,i.jsx)("div",Object.assign({className:h.name},{children:(0,i.jsxs)(pI.O,Object.assign({testId:"name"},{children:[g,p]}),void 0)}),void 0),l&&(0,i.jsx)("div",Object.assign({className:h.equity},{children:(0,i.jsxs)(pI.O,{children:[(0,i.jsx)(Lw.e,{value:o,accountId:e},void 0),b]},void 0)}),void 0),d&&(0,i.jsx)("div",Object.assign({className:h.roi},{children:(0,i.jsxs)(pI.O,{children:[(0,zw.T)(!0)(n),v]},void 0)}),void 0)]}),void 0),j]}),void 0),(0,i.jsx)("div",Object.assign({className:h.settingsContainer},{children:(0,i.jsx)("div",Object.assign({className:h.settings},{children:(0,i.jsxs)(hd.v,Object.assign({testId:"sub-account",placement:"bottom-start"},{children:[(0,i.jsx)(se.J,{source:ie.Y.options,size:18},void 0),this.renderSubAccountElement(j)]}),void 0)}),void 0)}),void 0)]}),void 0)}}const _w=(0,n.$)(Cw,{pushSubAccount:uf.n.pushSubAccount})((0,x.Z)((e=>{const{followerStatus:t,roi:s,isCopyingStrategyLoading:i,isCopyingStrategyStopped:o,isCopyingStrategyDeleted:n,isActive:a}=e,{backgroundColor:r,foregroundColor:l}=e.theme.palette.semantic,d=i||o||n,c=d?l.tertiary:l.primary2,u=d?.5:1;return{root:Object.assign(Object.assign(Object.assign(Object.assign({marginTop:3,display:"flex",flexGrow:1,flexDirection:"row",alignItems:"center",justifyContent:"space-between"},(0,Q.O)({color:a||d?r.primaryHover:r.primaryNormal})),{position:"relative"}),(0,X.o)(9,5)),{paddingRight:0,border:"1px solid transparent",borderTopColor:a?"transparent":r.strokeNormal,nested:{":last-child":{marginBottom:5},":first-child":{borderTopColor:"transparent",marginTop:0},":hover":d?{}:Object.assign(Object.assign(Object.assign({},(0,Q.O)({color:r.primaryHover})),{borderColor:r.primaryHover}),(0,V.E)(Z.q0)),":hover + div":d?{}:{borderTopColor:"transparent"},"& + div":a&&!d?{borderTopColor:"transparent"}:{}}}),content:{display:"flex",flexGrow:1,flexDirection:"row",alignItems:"center",justifyContent:"space-between",overflow:"hidden"},copyingStatus:Object.assign(Object.assign(Object.assign(Object.assign({height:5,width:5,marginRight:10},(0,V.E)("50%")),(0,Q.O)({color:(0,kw.b)(t,e.theme)})),(0,vn.f)(0,0,5)),{opacity:u}),name:Object.assign(Object.assign({},(0,vn.f)(1,0,118)),{display:"flex",overflow:"hidden",color:c}),equity:Object.assign(Object.assign({},(0,vn.f)(0,0,90)),{display:"flex",justifyContent:"flex-end",marginLeft:"auto",whiteSpace:"nowrap",color:c,paddingLeft:Z.W0,overflow:"hidden"}),roi:Object.assign(Object.assign({},(0,vn.f)(0,0,60)),{display:"flex",justifyContent:"flex-end",whiteSpace:"nowrap",color:s>=0?l.positive:l.negative,opacity:u,marginLeft:22}),settingsContainer:Object.assign(Object.assign({display:"flex",width:"100%",justifyContent:"flex-end"},(0,vn.f)(0,0,30)),{zIndex:1}),settings:{marginRight:4,fill:l.secondary,nested:{":hover":{fill:l.primary2}}},settingsContext:{flexDirection:"column"}}}))(Qw));function qw(e){return e?"L":"D"}var Xw=s(62069),Vw=s(2028);const Zw=l()([zo.i,(0,u.$)(aw.t).strategyId(),(0,u.$)(aw.t).status()],((e,t,s)=>({sharingCode:e,strategyId:t,isStopped:s===dw.LK.Stopped})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().accountId()}));var Uw=s(63736),Kw=s(26769),Yw=s(28063);class Gw extends o.Component{constructor(){super(...arguments),this.onRestartClick=()=>{const{strategyId:e,openRestartStrategyDialog:t,hide:s}=this.props;t({strategyId:e}),s()},this.onStopClick=()=>{const{strategyId:e,openStopProvidingDialog:t,hide:s}=this.props;t({strategyId:e}),s()},this.onSettingsClick=()=>{const{accountId:e,openEditDialog:t,hide:s}=this.props;t({type:mf.W.Update,accountId:e}),s()},this.onRemoveClick=()=>{const{strategyId:e,openRemoveStrategyDialog:t,hide:s}=this.props;t({strategyId:e}),s()},this.onViewPasswordClick=()=>{const{accountId:e,openInvestorPasswordDialog:t,hide:s}=this.props;t(e),s()},this.onRemovePasswordClick=()=>{const{accountId:e,openRemoveInvestorPasswordDialog:t,hide:s}=this.props;t(e),s()}}render(){const{accountId:e,sharingCode:t,isStopped:s}=this.props;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(_o.d,{accountId:e},void 0),s?(0,i.jsx)(od.Z,Object.assign({onClick:this.onRestartClick,testId:"restart-providing-strategy"},{children:(0,O.L)("Restart Providing Strategy")}),void 0):(0,i.jsx)(od.Z,Object.assign({onClick:this.onStopClick,testId:"stop-providing-strategy"},{children:(0,O.L)("Stop Providing Strategy")}),void 0),(0,i.jsx)(od.Z,Object.assign({onClick:this.onSettingsClick,testId:"strategy-settings"},{children:(0,O.L)("Strategy Settings")}),void 0),(0,i.jsx)(od.Z,Object.assign({disabled:!s,onClick:this.onRemoveClick,testId:"remove-strategy"},{children:(0,O.L)("Remove Strategy")}),void 0),(0,i.jsx)(jo.D,{},void 0),(0,i.jsx)(od.Z,Object.assign({onClick:this.onViewPasswordClick,testId:"investor-link"},{children:t?(0,O.L)("View Investor Link"):(0,O.L)("Create Investor Link")}),void 0),t&&(0,i.jsx)(od.Z,Object.assign({onClick:this.onRemovePasswordClick,testId:"delete-investor-link"},{children:(0,O.L)("Delete Investor Link")}),void 0)]},void 0)}}const eT=(0,n.$)(Zw,{openRestartStrategyDialog:Uw.u.open,openStopProvidingDialog:Yw.$.open,openEditDialog:jf.z.open,openRemoveStrategyDialog:Kw.v.open,openInvestorPasswordDialog:Dw.O.open,openRemoveInvestorPasswordDialog:Vo.M.open})(Gw);var tT=s(72563);function sT(e){const{isFollowingDisabledInGroup:t,isProvidingDisabledInGroup:s,isAccountNameShown:i,plantStatus:o,accountFullInfo:n}=e;return(t||s)&&o===tT.V.Guest?i?n:void 0:t&&s?(0,O.L)("Copy Trading service is not available for this account. You cannot follow strategies and become a strategy provider. Please contact your broker for details."):t?(0,O.L)("Copy Trading service is limited for this account. You can become a strategy provider, but cannot follow strategies. Please contact your broker for details."):s?(0,O.L)("Copy Trading service is limited for this account. You can follow strategies, but cannot become a strategy provider. Please contact your broker for details."):i?n:void 0}var iT=s(24770);class oT extends o.Component{constructor(){super(...arguments),this.renderStrategyInfo=()=>e=>{var t,s;const{plantStatus:o,traderLogin:n,accountName:a,isAccountNameShown:r,leverage:l,brokerTitle:d,isFollowingDisabledInGroup:c,isProvidingDisabledInGroup:u,styles:h}=this.props,{formattedValue:g}=e,p=(0,iT.I)(r&&a||n,g,null!==(t=(0,pi.Q)(l))&&void 0!==t?t:(0,O.L)("n/a"),d),b=(0,iT.I)(r&&a?`${a} (${n})`:n,g,null!==(s=(0,pi.Q)(l))&&void 0!==s?s:(0,O.L)("n/a"),d),v=sT({isFollowingDisabledInGroup:c,isProvidingDisabledInGroup:u,isAccountNameShown:Boolean(r&&a),plantStatus:o,accountFullInfo:b});return v?(0,i.jsxs)(zs.b,Object.assign({testId:"provider-info",autoWidthElement:!0},{children:[(0,i.jsx)("div",Object.assign({className:h.infoName},{children:p}),void 0),(0,i.jsx)("div",Object.assign({className:h.infoName},{children:v}),void 0)]}),void 0):(0,i.jsx)(WC.a,Object.assign({testId:"provider-info"},{children:p}),void 0)},this.renderProviderElement=()=>e=>{const{accountId:t}=this.props,{hide:s}=e;return(0,i.jsx)(eT,{accountId:t,hide:s},void 0)},this.onClick=()=>{const{strategyId:e,pushStrategy:t}=this.props;t(e)}}render(){const{accountId:e,isLive:t,plantId:s,plantStatus:o,balance:n,followerAccountIdList:a,styles:r}=this.props,l=(0,Xw.o)(o),d=[l.longText,l.tooltipText].join("\n- ");return(0,i.jsxs)("div",Object.assign({onClick:this.onClick},{children:[(0,i.jsx)(Iw.Q,{accountId:e},void 0),(0,i.jsx)(Vw.b,{plantId:s},void 0),(0,i.jsxs)("div",Object.assign({className:r.head},{children:[(0,i.jsx)("div",Object.assign({className:r.accountType},{children:qw(t)}),void 0),(0,i.jsx)("div",Object.assign({className:r.info},{children:(0,i.jsx)(Lw.e,Object.assign({accountId:e,value:n,prefix:!0},{children:this.renderStrategyInfo()}),void 0)}),void 0),(0,i.jsxs)("div",Object.assign({className:r.rightBlock},{children:[this.renderStrategyLabel(),(0,i.jsx)(es.q,{width:2*Z.W0},void 0),l.shortText&&(0,i.jsxs)(zs.b,{children:[(0,i.jsx)("div",Object.assign({className:r.plantStatus},{children:l.shortText}),void 0),d]},void 0),(0,i.jsx)("div",Object.assign({className:r.settings},{children:(0,i.jsxs)(hd.v,Object.assign({placement:"bottom-start",testId:"provider-account"},{children:[(0,i.jsx)(se.J,{source:ie.Y.options,size:18},void 0),this.renderProviderElement()]}),void 0)}),void 0)]}),void 0)]}),void 0),(0,i.jsx)("div",Object.assign({className:r.subAccounts},{children:a.map((e=>(0,i.jsx)(_w,{accountId:e},e)))}),void 0)]}),void 0)}renderStrategyLabel(){const{isActive:e,styles:t}=this.props,s=e?(0,O.L)("The strategy is active"):(0,O.L)("The strategy is not active");return(0,i.jsxs)(zs.b,{children:[(0,i.jsx)("div",Object.assign({className:t.roundedLabelProvider},{children:(0,O.L)("Provider")}),void 0),s]},void 0)}}const nT=(0,n.$)(pw,{pushStrategy:uf.n.pushStrategy})((0,x.Z)((e=>{const{isLive:t,isFollowingDisabledInGroup:s,isProvidingDisabledInGroup:i,isActive:o,isCurrent:n}=e,{account:a,backgroundColor:r,foregroundColor:l}=e.theme.palette.semantic,d=t?a.liveAccountColor:a.demoAccountColor,c=s||i?(0,bw.h)(d,.35):d,u=s||i?l.muted1:o?l.secondary:l.tertiary,h=Object.assign({borderWidth:1,borderStyle:"solid",borderColor:u,color:u,paddingTop:1,paddingLeft:6,paddingRight:6},(0,V.E)(Z.q0)),g=Object.assign(Object.assign({},h),{borderColor:u,color:u});return{head:Object.assign(Object.assign(Object.assign(Object.assign({display:"flex",alignItems:"center"},(0,Q.O)({color:s||i?r.tertiaryDisabled:n?r.secondaryNormal:r.tertiaryNormal})),{":hover":Object.assign({},(0,Q.O)({color:n||s||i?r.secondaryNormal:r.tertiaryHover})),marginBottom:Z.W0}),(0,V.E)(Z.q0)),(0,X.o)(Z.W0)),accountType:Object.assign({width:18,height:18,display:"flex",alignItems:"center",justifyContent:"center",borderWidth:1,borderStyle:"solid",borderColor:c,color:c,lineHeight:(0,Lh.a)(10),flexShrink:0},(0,V.E)(Z.q0)),info:Object.assign({color:s||i?l.muted1:null,paddingLeft:Z.W0,paddingRight:Z.W0},lg.aF),infoName:{flexShrink:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"pre"},plantStatus:Object.assign(Object.assign({},h),{minWidth:"30px",textAlign:"center"}),roundedLabelProvider:g,rightBlock:{display:"flex",marginLeft:"auto"},subAccounts:{},settings:{marginLeft:Z.W0,fill:l.secondary,":hover":{fill:l.primary2}}}}))(oT));var aT=s(41138);const rT=l()([(0,u.$)(cw.D).live(),(0,u.$)(cw.D).plantId(),hw.U,uw.q,(0,u.$)(cw.D).traderLogin(),(0,u.$)(cw.D).accountName(),(0,u.$)(cw.D).leverage(),(0,u.$)(cw.D).brokerTitle(),(0,u.$)(cw.D).isFollowingDisabledInGroup(),(0,u.$)(cw.D).isProvidingDisabledInGroup()],((e,t,s,i,o,n,a,r,l,d)=>({isLive:e,plantId:t,plantStatus:s,balance:i,traderLogin:o,accountName:n,leverage:a,brokerTitle:r,isFollowingDisabledInGroup:l,isProvidingDisabledInGroup:d})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().accountId()})),lT=l()([rT,(0,u.$)(Xt.m).data.isAccountNameShown(),lw.l,aT.z,(0,u.$)(df.U).location.pathname()],((e,t,s,i,o)=>Object.assign(Object.assign({},e),{isAccountNameShown:t,subAccountIdList:s.map((e=>e.accountId)),isCurrent:i===o})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().accountId()}));var dT=s(18505);const cT=l()([zo.i,(0,u.$)(cw.D).isProvidingDisabledInGroup(),(0,u.$)(cw.D).accountType(),hw.U,(0,u.$)(cw.D).isFakeSpreadBetting()],((e,t,s,i,o)=>{const{isProviderAllowed:n}=(0,dT.G)(t,s,i,o);return{sharingCode:e,isProviderAllowed:n}}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().accountId()}));class uT extends o.Component{constructor(){super(...arguments),this.onBecomeClick=()=>{const{accountId:e,openEditDialog:t,hide:s}=this.props;t({type:mf.W.Create,accountId:e}),s()},this.onViewPasswordClick=()=>{const{accountId:e,openInvestorPasswordDialog:t,hide:s}=this.props;t(e),s()},this.onRemovePasswordClick=()=>{const{accountId:e,openRemoveInvestorPasswordDialog:t,hide:s}=this.props;t(e),s()}}render(){const{accountId:e,sharingCode:t,isProviderAllowed:s}=this.props;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(_o.d,{accountId:e},void 0),(0,i.jsx)(od.Z,Object.assign({disabled:!s,onClick:this.onBecomeClick,testId:"become-strategy-provider"},{children:(0,O.L)("Become a Strategy Provider")}),void 0),(0,i.jsx)(od.Z,Object.assign({onClick:this.onViewPasswordClick,testId:"investor-link"},{children:t?(0,O.L)("View Investor Link"):(0,O.L)("Create Investor Link")}),void 0),t&&(0,i.jsx)(od.Z,Object.assign({onClick:this.onRemovePasswordClick,testId:"delete-investor-link"},{children:(0,O.L)("Delete Investor Link")}),void 0)]},void 0)}}const hT=(0,n.$)(cT,{openEditDialog:jf.z.open,openInvestorPasswordDialog:Dw.O.open,openRemoveInvestorPasswordDialog:Vo.M.open})(uT);class gT extends o.Component{constructor(){super(...arguments),this.renderAccountInfo=()=>e=>{var t,s;const{plantStatus:o,traderLogin:n,accountName:a,isAccountNameShown:r,leverage:l,brokerTitle:d,isFollowingDisabledInGroup:c,isProvidingDisabledInGroup:u,styles:h}=this.props,{formattedValue:g}=e,p=(0,iT.I)(r&&a||n,g,null!==(t=(0,pi.Q)(l))&&void 0!==t?t:(0,O.L)("n/a"),d),b=(0,iT.I)(r&&a?`${a} (${n})`:n,g,null!==(s=(0,pi.Q)(l))&&void 0!==s?s:(0,O.L)("n/a"),d),v=sT({isFollowingDisabledInGroup:c,isProvidingDisabledInGroup:u,isAccountNameShown:Boolean(r&&a),plantStatus:o,accountFullInfo:b});return v?(0,i.jsxs)(zs.b,Object.assign({testId:"account-info",autoWidthElement:!0},{children:[(0,i.jsx)("div",Object.assign({className:h.infoName},{children:p}),void 0),(0,i.jsx)("div",Object.assign({className:h.infoName},{children:v}),void 0)]}),void 0):(0,i.jsx)(WC.a,Object.assign({testId:"account-info"},{children:p}),void 0)},this.renderAccountElement=()=>e=>{const{accountId:t}=this.props,{hide:s}=e;return(0,i.jsx)(hT,{accountId:t,hide:s},void 0)},this.onClick=()=>{const{accountId:e,pushAccount:t}=this.props;t(e)}}render(){const{accountId:e,isLive:t,plantId:s,plantStatus:o,balance:n,subAccountIdList:a,styles:r}=this.props,l=(0,Xw.o)(o),d=[l.longText,l.tooltipText].join("\n- ");return(0,i.jsxs)("div",Object.assign({onClick:this.onClick},{children:[(0,i.jsx)(Iw.Q,{accountId:e},void 0),(0,i.jsx)(Vw.b,{plantId:s},void 0),(0,i.jsxs)("div",Object.assign({className:r.head},{children:[(0,i.jsx)("div",Object.assign({className:r.accountType},{children:qw(t)}),void 0),(0,i.jsx)("div",Object.assign({className:r.info},{children:(0,i.jsx)(Lw.e,Object.assign({accountId:e,value:n,prefix:!0},{children:this.renderAccountInfo()}),void 0)}),void 0),(0,i.jsxs)("div",Object.assign({className:r.rightBlock},{children:[l.shortText&&(0,i.jsxs)(zs.b,Object.assign({wide:!0},{children:[(0,i.jsx)("div",Object.assign({className:r.plantStatus},{children:l.shortText}),void 0),d]}),void 0),(0,i.jsx)("div",Object.assign({className:r.settings},{children:(0,i.jsxs)(hd.v,Object.assign({placement:"bottom-start",testId:"regular-account"},{children:[(0,i.jsx)(se.J,{source:ie.Y.options,size:18},void 0),this.renderAccountElement()]}),void 0)}),void 0)]}),void 0)]}),void 0),(0,i.jsx)("div",Object.assign({className:r.subAccounts},{children:a.map((e=>(0,i.jsx)(_w,{accountId:e},e)))}),void 0)]}),void 0)}}const pT=(0,n.$)(lT,{pushAccount:uf.n.pushAccount})((0,x.Z)((e=>{const{isLive:t,isFollowingDisabledInGroup:s,isProvidingDisabledInGroup:i,isCurrent:o}=e,{account:n,backgroundColor:a,foregroundColor:r}=e.theme.palette.semantic,l=t?n.liveAccountColor:n.demoAccountColor,d=s||i?(0,bw.h)(l,.35):l,c=s||i?r.muted1:r.secondary,u=Object.assign({borderWidth:1,borderStyle:"solid",borderColor:c,color:c,paddingTop:1,paddingLeft:6,paddingRight:6},(0,V.E)(Z.q0));return{head:Object.assign(Object.assign(Object.assign(Object.assign({display:"flex",alignItems:"center"},(0,Q.O)({color:s||i?a.tertiaryDisabled:o?a.secondaryNormal:a.tertiaryNormal})),{":hover":Object.assign({},(0,Q.O)({color:o||s||i?null:a.tertiaryHover})),marginBottom:Z.W0}),(0,V.E)(Z.q0)),(0,X.o)(Z.W0)),accountType:Object.assign({width:18,height:18,display:"flex",alignItems:"center",justifyContent:"center",borderWidth:1,borderStyle:"solid",borderColor:d,color:d,lineHeight:(0,Lh.a)(10),flexShrink:0},(0,V.E)(Z.q0)),info:{color:s||i?r.muted1:null,paddingLeft:Z.W0,paddingRight:Z.W0,overflow:"hidden"},infoName:{flexShrink:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"pre"},plantStatus:Object.assign(Object.assign({},u),{minWidth:"30px",textAlign:"center"}),rightBlock:{display:"flex",marginLeft:"auto"},subAccounts:{},settings:{marginLeft:Z.W0,fill:r.secondary,":hover":{fill:r.primary2}}}}))(gT));class bT extends o.Component{render(){const{accountId:e,isStrategyExist:t}=this.props;return t?(0,i.jsx)(nT,{accountId:e},void 0):(0,i.jsx)(pT,{accountId:e},void 0)}}const vT=(0,n.$)(rw)(bT);class mT extends o.Component{constructor(){super(...arguments),this.state={isScrollPresent:!1,search:""},this.onVerticalScrollShow=()=>{const{isScrollPresent:e}=this.state;e||this.setState({isScrollPresent:!0})},this.onVerticalScrollHide=()=>{const{isScrollPresent:e}=this.state;e&&this.setState({isScrollPresent:!1})},this.onSearchChange=e=>{this.setState({search:e})}}componentDidMount(){const{loadVisibility:e}=this.props;e()}render(){const{isLoading:e,styles:t}=this.props;return e?(0,i.jsx)("div",Object.assign({className:t.root},{children:(0,i.jsx)(lu.h,{},void 0)}),void 0):(0,i.jsx)("div",Object.assign({className:t.root},{children:this.renderContent()}),void 0)}renderContent(){const{showOpenLiveAccountButton:e,rules:t}=this.props,{isScrollPresent:s,search:o}=this.state;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(GL,{isScrollPresent:s,search:o,onChange:this.onSearchChange},void 0),(0,i.jsxs)(qe.X,Object.assign({scrollBackgroundLayout:Xe.c.AllTransparent,onVerticalScrollShow:this.onVerticalScrollShow,onVerticalScrollHide:this.onVerticalScrollHide,showHorizontalScroll:!1,extend:{root:t.scroll(this.props)}},{children:[this.renderAccountList(),e&&(0,i.jsx)(tw,{},void 0)]}),void 0)]},void 0)}renderAccountList(){const{accountList:e}=this.props,{search:t}=this.state,s=t.trim();return e.filter((e=>e.accountId.includes(s)||e.brokerName.includes(s)||String(e.traderLogin).includes(s)||e.plantId.includes(s))).map((e=>(0,i.jsx)(vT,{accountId:e.accountId},e.accountId)))}}const jT=(0,n.$)(nw,{loadVisibility:ZL.A.load})((0,x.Z)((e=>{const{isLoading:t}=e,s=t?{position:"relative",alignItems:"center",justifyContent:"center"}:{};return{root:Object.assign(Object.assign(Object.assign({},(0,X.o)(10,0,10,5)),{display:"flex",flexDirection:"column",flexGrow:1,height:"100%"}),s),scroll:Object.assign({flexGrow:1},(0,X.o)(0))}}))(mT));var xT=s(11022),yT=s(935);const ST=l()([wf],(e=>0===e.length?185:285))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),fT=l()([(0,u.$)(Lf.Z).historyNetworkStatus(),wf,ST],((e,t,s)=>{const i=[...t].sort(((e,t)=>e.messageId>t.messageId?1:-1)),o=(0,xT.Z)(i),n=(0,yT.Z)(i);return{isLoading:e!==Cs.I.Done&&e!==Cs.I.Failed,oldestMessageId:null==o?void 0:o.messageId,newestMessageId:null==n?void 0:n.messageId,messageListLength:t.length,messageListHeight:s}}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),OT=e=>{const{messageListHeight:t}=e;return{root:{position:"relative",height:t},scroll:{paddingLeft:0,paddingRight:0},content:{paddingLeft:0},shadowTop:{right:Z.W0+2},shadowBottom:{right:Z.W0+2}}};var CT=s(81549);const kT=l()([N.BA],(e=>{const{firstName:t,surname:s}=e.data,i="User";if(void 0!==t&&void 0!==s){const e=`${t} ${s}`.trim();return""!==e?e:i}return i}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),IT=l()([wf,kT,(0,u.$)(m.Z).info.title()],((e,t,s)=>({messageList:[...e].sort(((e,t)=>e.messageId>t.messageId?1:-1)).map((e=>{const i=(0,CT.V)(e);return{id:e.messageId,isUserMessage:i,userName:i?t:s,message:e.text,fileId:e.fileId,time:ig()(e.createTimestamp).format()}}))})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var LT=s(2851);function wT(e){const{text:t,target:s}=e,i=void 0!==s?`target="${s}"`:"";return(0,LT.yF)((o=t,o.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"))).replace(new RegExp("((?:(http|https|Http|Https|rtsp|Rtsp):\\/\\/(?:(?:[a-zA-Z0-9\\$\\-\\_\\.\\+\\!\\*\\'\\(\\)\\,\\;\\?\\&\\=]|(?:\\%[a-fA-F0-9]{2})){1,64}(?:\\:(?:[a-zA-Z0-9\\$\\-\\_\\.\\+\\!\\*\\'\\(\\)\\,\\;\\?\\&\\=]|(?:\\%[a-fA-F0-9]{2})){1,25})?\\@)?)((?:(?:[a-zA-Z0-9][a-zA-Z0-9\\-]{0,64}\\.)+(?:(?:aero|arpa|asia|a[cdefgilmnoqrstuwxz])|(?:biz|b[abdefghijmnorstvwyz])|(?:cat|com|coop|c[acdfghiklmnoruvxyz])|d[ejkmoz]|(?:edu|e[cegrstu])|f[ijkmor]|(?:gov|g[abdefghilmnpqrstuwy])|h[kmnrtu]|(?:info|int|i[delmnoqrst])|(?:jobs|j[emop])|k[eghimnrwyz]|l[abcikrstuvy]|(?:mil|mobi|museum|m[acdghklmnopqrstuvwxyz])|(?:name|net|n[acefgilopruz])|(?:org|om)|(?:pro|p[aefghklmnrstwy])|qa|r[eouw]|s[abcdeghijklmnortuvyz]|(?:tel|travel|t[cdfghjklmnoprtvwz])|u[agkmsyz]|v[aceginu]|w[fs]|y[etu]|z[amw]))|(?:(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[1-9][0-9]|[1-9])\\.(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[1-9][0-9]|[1-9]|0)\\.(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[1-9][0-9]|[1-9]|0)\\.(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[1-9][0-9]|[0-9])))(?:\\:\\d{1,5})?)(\\/(?:(?:[a-zA-Z0-9\\;\\/\\?\\:\\@\\&\\=\\#\\~\\-\\.\\+\\!\\*\\'\\(\\)\\,\\_])|(?:\\%[a-fA-F0-9]{2}))*)?(?:\\b|$)","ig"),(e=>`<a href="${e}" ${i} style="color: inherit;">${e}</a>`));var o}var TT=s(53701);const DT=l()([TT.s,(0,Ae.P)().fileIds([])],((e,t)=>0===t.length?{files:e}:{files:e.filter((e=>t.includes(e.fileId)))}))(Object.assign({keySelector:(0,Ae.P)().fileIds()},(0,d.jo)()));var PT=s(63594);class NT extends o.Component{constructor(){super(...arguments),this.onActionButtonClick=()=>{const{actionButtonHandler:e}=this.props;e()}}render(){const{styles:e,rules:t,actionButtonSize:s}=this.props;return(0,i.jsxs)("div",Object.assign({className:e.root},{children:[(0,i.jsxs)("div",Object.assign({className:e.loader},{children:[(0,i.jsx)("div",{className:`${e.leftPart} ${e.halfCircle}`},void 0),(0,i.jsx)("div",{className:`${e.rightPart} ${e.halfCircle}`},void 0)]}),void 0),(0,i.jsx)(Yl.h,{iconSource:ie.Y.close,backgroundType:Qt.Eo.Transparent,size:s,onClick:this.onActionButtonClick,extend:{root:t.actionButton(this.props)}},void 0)]}),void 0)}}const AT=(0,x.Z)((e=>{const{progressInPercent:t=0,size:s,actionButtonSize:i,theme:o}=e,{buttonBackgroundColor:n}=o.palette.semantic,a=Math.ceil(3.6*t);return{root:{height:s,width:s,position:"relative"},loader:Object.assign({height:"100%",width:"100%",position:"absolute",left:0,top:0,clip:`rect(0, ${s}px, ${s}px, ${s/2}px)`},t>50?{clip:"rect(auto, auto, auto, auto)"}:{}),leftPart:{transform:`rotate(${a}deg)`},rightPart:Object.assign({},t>50?{transform:"rotate(180deg)"}:{display:"none"}),halfCircle:Object.assign(Object.assign({height:"100%",width:"100%",border:`${s/15}px solid ${n.tradeNormal}`},(0,V.E)("50%")),{clip:`rect(0, ${s/2}px, ${s}px, 0)`,position:"absolute",left:0,top:0}),actionButton:Object.assign(Object.assign({},(0,V.E)("50%")),{cursor:"pointer",display:"block",left:s/2-i/2,top:s/2-i/2,position:"absolute",textAlign:"center"})}}))(NT);var BT=s(22309);class MT extends o.Component{constructor(){super(...arguments),this.renderRemoveFileButton=()=>{const{rules:e}=this.props,t={root:Object.assign(Object.assign({},e.root(this.props)),e.removeFileIconRoot(this.props))};return(0,i.jsx)(Yl.h,{iconSource:ie.Y.close,backgroundType:Qt.Eo.Transparent,onClick:this.onRemoveClick,extend:t,size:oe.J.ExtraSmall},void 0)},this.renderProgressBar=()=>{const{progressInPercent:e,rules:t}=this.props;return(0,i.jsx)(AT,{progressInPercent:e,size:20,actionButtonSize:12,actionButtonHandler:this.onCancelProcessButtonClick,extend:{root:t.icon(this.props)}},void 0)},this.renderDownloadButton=()=>{const{rules:e}=this.props;return(0,i.jsx)(Yl.h,{iconSource:ie.Y.download,backgroundType:Qt.Eo.Transparent,onClick:this.onDownloadClick,size:20,extend:{root:e.icon(this.props)}},void 0)},this.renderAttachedFileIcon=()=>{const{rules:e}=this.props,t={root:e.attachedIconRoot(this.props),iconWrapper:e.attachedIconWrapper(this.props)};return(0,i.jsx)(se.J,{source:ie.Y.file,size:oe.J.Medium,extend:t},void 0)},this.renderFileInfo=()=>{const{styles:e,nameWithExtension:t,sizeInBytes:s}=this.props,o=function(e){return(0,iI.FH)(e/ep.w,2)}(s),{name:n,extension:a}=(0,PT.x)(t);return(0,i.jsxs)("div",Object.assign({className:e.fileInfo},{children:[(0,i.jsx)("div",Object.assign({className:e.fileName},{children:n}),void 0),(0,i.jsx)("div",Object.assign({className:e.fileSize},{children:`(${o} MB ${a.toUpperCase()})`}),void 0)]}),void 0)},this.onCancelProcessButtonClick=()=>{const{fileId:e,fileState:t,stopUploading:s,stopDownloading:i}=this.props;t===BT.X.Uploading?s({fileId:e}):t===BT.X.Downloading&&i({fileId:e})},this.onRemoveClick=()=>{const{removeFile:e,fileId:t}=this.props;e({fileId:t})},this.onDownloadClick=()=>{const{downloadFile:e,fileId:t}=this.props;e({fileId:t})}}render(){const{styles:e,fileState:t}=this.props,s=t===BT.X.Downloading||t===BT.X.Uploading;return t===BT.X.Attached?(0,i.jsxs)("div",Object.assign({className:e.root},{children:[this.renderRemoveFileButton(),this.renderAttachedFileIcon(),this.renderFileInfo()]}),void 0):(0,i.jsxs)("div",Object.assign({className:e.root},{children:[s?this.renderProgressBar():this.renderDownloadButton(),this.renderFileInfo()]}),void 0)}}const $T=(0,n.$)(void 0,{stopUploading:Pf.t.stopUploadFile,stopDownloading:Pf.t.stopDownloadFile,removeFile:Pf.t.removeFile,downloadFile:Pf.t.startDownloadFile})((0,x.Z)((e=>{const{foregroundColor:t}=e.theme.palette.semantic;return{root:{display:"flex",alignItems:"center"},icon:{cursor:"pointer"},fileInfo:{marginLeft:5,display:"flex",flexDirection:"row",flexWrap:"nowrap"},fileName:{width:140,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},fileSize:{whiteSpace:"nowrap"},removeFileIconRoot:{marginRight:Z.W0},attachedIconRoot:{cursor:"default"},attachedIconWrapper:{fill:t.primary2}}}))(MT));class ET extends o.Component{render(){const{files:e,styles:t}=this.props;if(!e||0===e.length)return null;const s=e.map((e=>(0,i.jsx)($T,{fileId:e.fileId,nameWithExtension:e.fileName,sizeInBytes:e.fileSizeInBytes,progressInPercent:e.progressInPercent,fileState:e.state},e.fileId)));return(0,i.jsx)("div",Object.assign({className:t.root},{children:s}),void 0)}}const FT=(0,x.Z)((e=>{const{foregroundColor:t}=e.theme.palette.semantic;return{root:{color:t.primary2}}}))(ET);class RT extends o.Component{render(){const{files:e,rules:t}=this.props;return(0,i.jsx)(FT,{files:e,extend:{root:t.root(this.props)}},void 0)}}const WT=(0,n.$)(DT)((0,x.Z)((()=>({root:{}})))(RT)),HT=l()([(0,qs.t)(fn.l,{imageName:"chat_user_dark.svg"},d.iN),(0,qs.t)(fn.l,{imageName:"chat_user_light.svg"},d.iN),(0,qs.t)(fn.l,{imageName:"chat_logo.svg"},d.iN)],((e,t,s)=>({userDarkImage:e,userLightImage:t,logoImage:s})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class zT extends o.Component{constructor(){super(...arguments),this.getUserPictureUrl=()=>{const{isUserMessage:e,userDarkImage:t,userLightImage:s,logoImage:i,theme:o}=this.props;return e?o.palette.name===Qt.CT.Dark?t:s:i}}render(){const{userName:e,time:t,message:s,rules:o,styles:n,fileId:a}=this.props,r={__html:wT({text:s,target:"_blank"})};return(0,i.jsxs)("div",Object.assign({className:n.container},{children:[(0,i.jsxs)("div",Object.assign({className:n.header},{children:[(0,i.jsx)("img",{className:n.userPicture,src:this.getUserPictureUrl()},void 0),(0,i.jsxs)("div",Object.assign({className:n.headerTexts},{children:[(0,i.jsx)("div",Object.assign({className:n.userName},{children:e}),void 0),(0,i.jsx)("div",Object.assign({className:n.time},{children:ig()(t).format("LLL")}),void 0)]}),void 0)]}),void 0),(0,i.jsx)("div",{className:n.body,dangerouslySetInnerHTML:r},void 0),(0,i.jsx)(WT,{fileIds:[a],extend:{root:o.fileListRoot(this.props)}},void 0)]}),void 0)}}const JT=(0,re.$j)(HT)((0,x.Z)((e=>{const{backgroundColor:t,foregroundColor:s}=e.theme.palette.semantic;return{header:{display:"flex",justifyContent:"space-between",alignItems:"center"},container:{marginBottom:4*Z.W0,userSelect:"text",cursor:"auto",borderBottomWidth:1,borderBottomStyle:"solid",borderBottomColor:t.strokeNormal,nested:{":last-child":{borderBottom:0}}},headerTexts:Object.assign(Object.assign({},(0,vn.f)(1)),{display:"flex",justifyContent:"space-between"}),userPicture:{height:27,width:27,marginRight:10},userName:{color:s.primary2},time:{fontSize:"0.9em",color:s.tertiary},body:{paddingTop:Z.W0,paddingBottom:2*Z.W0,userSelect:"auto",wordWrap:"break-word",whiteSpace:"pre-wrap",color:s.primary2},fileListRoot:{marginBottom:2*Z.W0}}}))(zT)),QT=(0,o.memo)((()=>{const{messageList:e}=(0,ne.v)(IT);return(0,i.jsx)(i.Fragment,{children:e.map((e=>(0,i.jsx)(JT,Object.assign({},e),e.id)))},void 0)})),_T=l()([(0,qs.t)(fn.l,{imageName:"chat_user_dark.svg"},d.iN),(0,qs.t)(fn.l,{imageName:"chat_user_light.svg"},d.iN),(0,qs.t)(fn.l,{imageName:"chat_logo.svg"},d.iN)],((e,t,s)=>({userDarkImage:e,userLightImage:t,logoImage:s})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class qT extends o.Component{constructor(){super(...arguments),this.getUserPictureUrl=()=>{const{userDarkImage:e,userLightImage:t,theme:s}=this.props;return s.palette.name===Qt.CT.Dark?e:t}}render(){const{logoImage:e,styles:t}=this.props;return(0,i.jsxs)("div",Object.assign({className:t.root},{children:[(0,i.jsxs)("div",Object.assign({className:t.iconsContainer},{children:[(0,i.jsx)("img",{className:t.userIcon,src:this.getUserPictureUrl()},void 0),(0,i.jsx)("img",{className:t.managerIcon,src:e},void 0)]}),void 0),(0,i.jsx)("div",{children:(0,O.L)("Send a message to start chat with your manager")},void 0)]}),void 0)}}const XT=(0,re.$j)(_T)((0,x.Z)((e=>{const{foregroundColor:t}=e.theme.palette.semantic;return{root:{paddingTop:0,paddingRight:"20%",paddingBottom:0,paddingLeft:"20%",textAlign:"center",color:t.primary2,position:"absolute",bottom:0,top:0,marginLeft:"auto",marginBottom:"auto",marginRight:"auto",marginTop:"auto",left:0,right:0,display:"flex",justifyContent:"center",flexDirection:"column"},iconsContainer:{paddingBottom:40},managerIcon:{height:27,width:27,marginLeft:"-8px"},userIcon:{height:27,width:27}}}))(qT)),VT=(0,o.memo)((()=>{const{isLoading:e,messageListLength:t,messageListHeight:s,oldestMessageId:n,newestMessageId:a}=(0,ne.v)(fT),r=(0,re.I0)(),[l,d]=(0,o.useState)(!0),c=(0,o.useRef)(a),[u,h]=(0,o.useState)(),g=(0,o.useRef)(),p=(0,o.useRef)(),{css:b,rules:v}=(0,te.X)(OT,{messageListHeight:s}),m=(0,o.useCallback)((e=>{g.current=e}),[g]);(0,o.useLayoutEffect)((()=>{!e&&0!==t&&l&&requestAnimationFrame(g.current.scrollToBottom)}),[e,t,l]),(0,o.useLayoutEffect)((()=>{e||0===t||(c.current=a)}),[e,c,t,a]);const j=(0,o.useCallback)((e=>{const t=e.scrollTop<=200,s=e.scrollHeight-e.scrollTop<=e.clientHeight+50;t&&void 0!==n&&h(n),d(s)}),[d,n]),x=(0,o.useMemo)((()=>(0,vO.Z)((e=>{if(p.current&&e.scrollHeight!==p.current.scrollHeight&&!l){const t=e.scrollHeight-p.current.scrollHeight;c.current===a&&g.current.scrollTop(p.current.scrollTop+t)}p.current=e}),0)),[p,g,l,a]);return(0,o.useLayoutEffect)((()=>{const e=function(e){if(void 0===e)return;let t=e-15;const s=e-1;return s<1?void 0:(t<1&&(t=1),{fromMessageId:t,toMessageId:s})}(u);var t;void 0!==e&&r(Pf.t.loadHistory({newOnly:!1,lastMessages:!1,fromMessageId:(t=e).fromMessageId,toMessageId:t.toMessageId}))}),[r,u]),(0,o.useLayoutEffect)((()=>{l&&void 0!==a&&r(Pf.t.readMessage({messageId:a}))}),[l,a,r]),e?(0,i.jsx)("div",Object.assign({className:b.root()},{children:(0,i.jsx)(lu.h,{},void 0)}),void 0):0===t?(0,i.jsx)("div",Object.assign({className:b.root()},{children:(0,i.jsx)(XT,{},void 0)}),void 0):(0,i.jsx)(qe.X,Object.assign({height:s,getScroll:m,onScrollMove:j,onScrollValuesUpdated:x,extend:{root:v.scroll,content:v.content,shadowTop:v.shadowTop,shadowBottom:v.shadowBottom}},{children:(0,i.jsx)(QT,{},void 0)}),void 0)}));var ZT=s(19118);class UT extends o.Component{render(){const{messages:e,styles:t}=this.props;if(!e||0===e.length)return!1;const s=e.map(((e,s)=>(0,i.jsx)("div",Object.assign({className:t.message},{children:e}),s)));return(0,i.jsx)("div",Object.assign({className:t.root},{children:s}),void 0)}}const KT=(0,x.Z)((()=>({root:{},message:{fontStyle:"italic",color:"#FF6666"}})))(UT);var YT=s(3473);const GT=l()([YT.r,(0,u.$)(Lf.Z).filesErrorMessages()],((e,t)=>({areFilesAttached:e.length>0,errorMessages:t})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),eD=l()([YT.r],(e=>({files:Object.values(e)})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class tD extends o.Component{render(){const{files:e,rules:t}=this.props;return(0,i.jsx)(FT,{files:e,extend:{root:t.root}},void 0)}}const sD=(0,n.$)(eD)((0,x.Z)((()=>({root:{}})))(tD));class iD extends o.Component{constructor(e){super(e),this.onChange=e=>{const{value:t}=e.currentTarget;this.handleChange(t)},this.handleChange=e=>{const{onChange:t}=this.props;this.setState({value:e}),t&&t(e.trim())};const{value:t}=e;this.state={value:t}}componentDidUpdate(e){const{value:t}=this.props;e.value!==t&&this.setState({value:t})}render(){const{maxLength:e,errorMessages:t,readonly:s,placeholder:o,styles:n,rules:a}=this.props,{value:r}=this.state;return(0,i.jsxs)("div",Object.assign({className:n.root},{children:[(0,i.jsx)("div",Object.assign({className:n.counterRow},{children:Boolean(e)&&`${r.length}/${e}`}),void 0),(0,i.jsx)("textarea",{autoFocus:!0,className:n.input,onChange:this.onChange,maxLength:e,value:r,readOnly:s,placeholder:o},void 0),(0,i.jsx)(sD,{extend:{root:a.fileListRoot(this.props)}},void 0),(0,i.jsx)(KT,{messages:t,extend:{root:a.errorBlockRoot(this.props)}},void 0)]}),void 0)}}const oD=(0,n.$)(GT)((0,x.Z)((e=>{const{areFilesAttached:t,errorMessages:s}=e,{foregroundColor:i,backgroundColor:o}=e.theme.palette.semantic,n=t||s.length>0,a=Object.assign(Object.assign(Object.assign(Object.assign({borderTopWidth:1,borderTopStyle:"solid",borderTopColor:o.primaryNormal},(0,vn.f)(1)),(0,Q.O)({color:o.quaternaryNormal})),{borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomRightRadius:Z.q0,borderBottomLeftRadius:Z.q0}),(0,X.o)(Z.W0));return{root:{display:"flex",flexDirection:"column",height:"100%"},input:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,vn.f)(2,1,"100%")),{overflow:"auto",width:"100%",resize:"none",color:i.primary2}),(0,Q.O)({color:o.quaternaryNormal})),(0,ZT.S)(e.theme.palette.semantic,{disabled:!1,backgroundKind:"quaternary"})),n?{borderTopLeftRadius:Z.q0,borderTopRightRadius:Z.q0,borderBottomRightRadius:0,borderBottomLeftRadius:0}:(0,V.E)(Z.q0)),{nested:{"::placeholder":{fontStyle:"italic",color:i.tertiary}}}),counterRow:{display:"flex",justifyContent:"flex-end",height:15,fontStyle:"italic",color:i.secondary},errorBlockRoot:Object.assign({},a),fileListRoot:Object.assign({},a)}}))(iD)),nD=l()([YT.r],(e=>e.length>0))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),aD=l()([(0,u.$)(Lf.Z).preparedMessage(),(0,u.$)(Lf.Z).sendMessageNetworkStatus(),nD],((e,t,s)=>{const i=t===Cs.I.Started;return{message:e,allowSend:!i&&(Boolean(e)||s),isSendingMessage:i}}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var rD=s(9986);const lD=l()([YT.r],(e=>({isDisabled:Object.values(e).length>0})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class dD extends o.Component{constructor(){super(...arguments),this.onClick=()=>{this.fileInput.click()},this.onFileInputChange=e=>{const{attachFile:t}=this.props;t(e.target.files[0]),this.fileInput.value=null}}render(){const{isDisabled:e,styles:t,rules:s}=this.props;return(0,i.jsxs)(go.z,Object.assign({disabled:e,onClick:this.onClick,extend:{root:s.buttonRoot(this.props),content:s.buttonContent(this.props)}},{children:[(0,i.jsx)(se.J,{source:ie.Y.attachFile,size:oe.J.Control,extend:{root:s.iconRoot(this.props),iconWrapper:s.iconWrapper(this.props)}},void 0),(0,O.L)("Attach File"),(0,i.jsx)("input",{ref:e=>{this.fileInput=e},className:t.fileInput,type:"file",name:"file",onChange:this.onFileInputChange},void 0)]}),void 0)}}const cD=(0,n.$)(lD,{attachFile:Pf.t.attachFile})((0,x.Z)((e=>{const{isDisabled:t,theme:s}=e,{buttonBackgroundColor:i,foregroundColor:o,disabledOpacity:n}=s.palette.semantic,a={":hover":Object.assign({cursor:"pointer"},(0,Q.O)({color:t?i.primaryDisabled:i.primaryHover}))};return{root:{position:"relative"},fileInput:{visibility:"hidden",position:"absolute"},buttonRoot:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Q.O)({color:t?i.primaryDisabled:i.primaryNormal})),{opacity:t?n:1}),(0,V.E)(Z.q0)),{color:o.primary2}),a),buttonContent:Object.assign({paddingLeft:3*Z.W0,paddingRight:3*Z.W0},a),iconRoot:{marginRight:3},iconWrapper:{fill:o.primary2}}}))(dD));var uD=s(75975);const hD=(0,x.Z)((e=>{const{backgroundColor:t}=e.theme.palette.semantic;return{root:{width:80,marginLeft:"auto"},content:{nested:{":active":{borderColor:t.menuNormal}}}}}))(ut.K);class gD extends o.Component{constructor(){super(...arguments),this.onKeyPress=e=>{e.ctrlKey&&(0,rD.S)(e,rD.m.Enter)&&this.onSubmit()},this.onChange=e=>{const{changeMessage:t}=this.props;t(e)},this.onSubmit=()=>{const{message:e,sendMessage:t,uploadFiles:s}=this.props;t(e),s()}}render(){const{message:e,isSendingMessage:t,rules:s,styles:o,allowSend:n}=this.props;return(0,i.jsxs)("div",Object.assign({className:o.root,onKeyUp:this.onKeyPress},{children:[(0,i.jsx)("div",Object.assign({className:o.messageBlockRow},{children:(0,i.jsx)(oD,{onChange:this.onChange,value:e,maxLength:uD.$U,readonly:t,placeholder:(0,O.L)("Type your message"),extend:{root:s.messageBlockRoot(this.props)}},void 0)}),void 0),(0,i.jsxs)("div",Object.assign({className:o.buttonBar},{children:[(0,i.jsx)(cD,{},void 0),(0,i.jsx)(hD,Object.assign({onClick:this.onSubmit,type:Lt.L.button,disabled:!n},{children:(0,O.L)("Send")}),void 0)]}),void 0)]}),void 0)}}const pD=(0,n.$)(aD,{sendMessage:Pf.t.sendMessage,changeMessage:Pf.t.changeMessage,uploadFiles:Pf.t.uploadAttached})((0,x.Z)((()=>({root:{display:"flex",flexDirection:"column",height:"100%"},messageBlockRow:{display:"flex",flexDirection:"column",marginBottom:2*Z.W0,height:"80%"},messageBlockRoot:Object.assign({},(0,vn.f)(1,2,"90%")),buttonBar:{display:"flex",justifyContent:"flex-end"}})))(gD)),bD=l()([(0,u.$)(Lf.Z).isShown(),ST,(0,u.$)(c.H).data.productAppName(),(0,u.$)(m.Z).info.title(),(0,u.$)(pn.O).width(),(0,u.$)(pn.O).height(),zi.tQ],((e,t,s,i,o,n,a)=>({isShown:e,messageListHeight:t,brokerProductName:s||i,widthWindow:o,heightWindow:n,isIdLoggedIn:a})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class vD extends o.Component{constructor(){super(...arguments),this.onClose=()=>{const{closeChat:e}=this.props;e()}}componentDidUpdate(e){const{isIdLoggedIn:t,loadHistory:s,isShown:i,clearHistory:o}=this.props;t&&!e.isIdLoggedIn?s({newOnly:!0,lastMessages:!1}):i!==e.isShown&&(i?s({newOnly:!1,lastMessages:!0}):o())}render(){const{isShown:e,messageListHeight:t,brokerProductName:s,heightWindow:o,rules:n,styles:a}=this.props;return e?(0,i.jsx)(fa.V,Object.assign({title:`${s} - Chat`,onClose:this.onClose,isModal:!1,left:120,top:o-t-300,extend:{body:n.dialogBody(this.props),header:n.dialogHeader(this.props)}},{children:(0,i.jsxs)("div",Object.assign({className:a.chatWindow},{children:[(0,i.jsx)("div",Object.assign({className:a.messageList},{children:(0,i.jsx)(VT,{},void 0)}),void 0),(0,i.jsx)("div",Object.assign({className:a.sendMessage},{children:(0,i.jsx)(pD,{},void 0)}),void 0)]}),void 0)}),void 0):null}}const mD=(0,n.$)(bD,{loadHistory:Pf.t.loadHistory,clearHistory:Pf.t.clearHistory,closeChat:Pf.t.close})((0,x.Z)((e=>{const{backgroundColor:t,foregroundColor:s,shadow:i}=e.theme.palette.semantic;return{dialogBody:Object.assign({},(0,X.o)(0)),dialogHeader:Object.assign({},(0,Q.O)({color:t.secondaryNormal})),indicator:{position:"relative"},chatWindow:Object.assign(Object.assign(Object.assign(Object.assign({display:"flex",flexDirection:"column",position:"relative",width:300},(0,Q.O)({color:t.primaryNormal})),{color:s.primary1,boxShadow:i.dialog}),(0,V.E)(Z.q0)),(0,X.o)(0)),messageList:{paddingBottom:0,paddingLeft:3*Z.W0,paddingRight:3*Z.W0},blockDivider:{marginLeft:10,marginRight:28,borderBottomWidth:1,borderBottomStyle:"solid",borderBottomColor:t.strokeNormal},sendMessage:Object.assign({height:150},(0,X.o)(Z.W0,3*Z.W0,3*Z.W0))}}))(vD));class jD extends o.Component{constructor(){super(...arguments),this.onEmailAlertsClick=()=>{const{showSettingsDialog:e}=this.props;e(Ho.b.AccountEmailAlerts)},this.onQuickTradeClick=()=>{const{showSettingsDialog:e}=this.props;e(Ho.b.ApplicationQuickTrade)},this.onHotKeysClick=()=>{const{showSettingsDialog:e}=this.props;e(Ho.b.ApplicationHotKeys)}}render(){const{isMainMenuVisible:e,isAutomateAvailable:t,isCopyEnabled:s,isRootApp:o,isTraderDisabled:n,isAnalyzeAvailable:a,styles:r,rules:l}=this.props;return(0,i.jsxs)("div",Object.assign({className:r.root},{children:[(0,i.jsxs)(rO,{children:[(0,i.jsxs)(cO,Object.assign({testId:"email-alerts-control",onClick:this.onEmailAlertsClick},{children:[(0,i.jsx)(se.J,{size:oe.J.Control,source:ie.Y.emailAlerts,extend:{root:l.icon(this.props)}},void 0),(0,O.L)("Email Alerts")]}),void 0),(0,i.jsxs)(cO,Object.assign({testId:"quick-trade-control",onClick:this.onQuickTradeClick},{children:[(0,i.jsx)(se.J,{size:oe.J.Medium,source:ie.Y.quickTrade},void 0),(0,O.L)("QuickTrade")]}),void 0),(0,i.jsxs)(cO,Object.assign({testId:"hot-key-control",onClick:this.onHotKeysClick},{children:[(0,i.jsx)(se.J,{size:oe.J.Control,source:ie.Y.hotKeys,extend:{root:l.icon(this.props)}},void 0),(0,O.L)("Hotkeys")]}),void 0),(0,i.jsx)(jO,{},void 0),(0,i.jsx)(SO,{},void 0),(0,i.jsx)(CO,{},void 0),(0,i.jsx)(LO,{},void 0)]},void 0),(0,i.jsxs)(TO,{children:[(0,i.jsx)(Cf,Object.assign({icon:ie.Y.trader,route:he.Z.Trader,text:(0,O.L)("Trade"),expanded:e,disabled:n,forceActive:o},{children:(0,i.jsx)(JL,{viewId:BC.an.mainWatchlist},void 0)}),void 0),s&&(0,i.jsx)(Cf,Object.assign({icon:ie.Y.copy,route:he.Z.Copy,text:(0,O.L)("Copy"),expanded:e},{children:(0,i.jsx)(jT,{},void 0)}),void 0),t&&(0,i.jsx)(Cf,{route:he.Z.Automate,icon:ie.Y.bot,text:(0,O.L)("Automate"),expanded:e,disabled:n},void 0),a&&(0,i.jsx)(Cf,{route:he.Z.Analyze,icon:ie.Y.analyze,text:(0,O.L)("Analyze"),expanded:e,disabled:n},void 0)]},void 0),(0,i.jsx)(tO,{},void 0),(0,i.jsx)(mD,{},void 0)]}),void 0)}}const xD=(0,n.$)(of,{showSettingsDialog:mn.z.open})((0,x.Z)((e=>{const{backgroundColor:t}=e.theme.palette.semantic;return{root:Object.assign(Object.assign({display:"flex",flexDirection:"column",flexGrow:1,height:"100%"},(0,Q.O)({color:t.tertiaryNormal})),{overflow:"hidden"}),icon:{width:oe.J.Medium,height:oe.J.Medium}}}))(jD)),yD=l()([(0,u.$)((e=>e.versionVerification)).isShown()],(e=>({isShown:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class SD extends o.Component{constructor(){super(...arguments),this.onClick=()=>{window.location.reload()}}render(){const{isShown:e,styles:t}=this.props;return e?(0,i.jsx)("div",Object.assign({className:t.container},{children:(0,i.jsxs)("div",Object.assign({className:t.content},{children:[(0,i.jsx)("div",Object.assign({className:t.notify},{children:(0,O.L)("Update required")}),void 0),(0,i.jsx)("div",Object.assign({className:t.text},{children:(0,O.L)("Old app version is not supported anymore, please update")}),void 0),this.renderButton()]}),void 0)}),void 0):null}renderButton(){const{styles:e}=this.props;return(0,i.jsx)("div",Object.assign({className:e.button,onClick:this.onClick},{children:(0,O.L)("Update")}),void 0)}}const fD=(0,n.$)(yD)((0,x.Z)((()=>({container:Object.assign({display:"flex",justifyContent:"center",position:"relative",marginRight:-10},(0,Q.O)({color:"#ff6d00"})),content:{display:"flex",justifyContent:"center",color:"#fff"},notify:{fontWeight:"bold",marginTop:12,marginBottom:12,marginRight:32},text:{marginTop:12,marginBottom:12,marginRight:32},button:Object.assign(Object.assign(Object.assign(Object.assign({minWidth:120},(0,X.o)(Z.W0,26)),{marginTop:6,marginBottom:6,borderWidth:1,borderStyle:"solid",borderColor:"#fff"}),(0,V.E)(Z.q0)),{textAlign:"center",nested:{":hover":Object.assign(Object.assign({},(0,Q.O)({color:"#fff"})),{color:"#ff6d00",cursor:"pointer"})}})})))(SD)),OD=e=>e.idInfoDialog,CD=l()([(0,u.$)(OD).isShown(),(0,u.$)(c.H).data.idFrameWidth(),(0,u.$)(c.H).data.idFrameHeight()],((e,t,s)=>({isShown:e,width:null!=t?t:640,height:null!=s?s:640})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var kD=s(42234);const ID=()=>({container:{width:"100%",height:"100%",border:"none"}});var LD=s(7722),wD=s(3070);const TD=l()([(0,u.$)(OD).type(),(0,u.$)(c.H).data.icpLicense(),bo.D,(0,u.$)(Ft.r).locale(),(0,u.$)(c.H).data.immutableSimplifiedName(),wD.n,rt.i,(0,u.$)(LD.$).sessionId()],((e,t,s,i,o,n,a,r)=>({type:e,authUrl:s,locale:i,preferredBrokerName:o,clientAgent:n,productName:a,icpLicense:t,sessionId:r})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var DD;!function(e){e.Referral="Referral",e.ChangeCredentials="ChangeCredentials",e.ActiveSessions="ActiveSessions"}(DD||(DD={}));var PD=s(35084);const ND=l()([(0,u.$)((e=>e.idOneTimeToken)).data(),(0,Ae.P)().key()],((e,t)=>e[t]))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().key()})),AD=e=>{const t=(0,re.I0)(),s=(0,ne.v)(ND,{key:e});return(0,o.useEffect)((()=>(t(PD.T.load({key:e})),()=>{t(PD.T.remove({key:e}))})),[e,t]),s};var BD=s(66098);const MD=(0,o.memo)((()=>{const{type:e,authUrl:t,locale:s,preferredBrokerName:n,clientAgent:a,productName:r,icpLicense:l,sessionId:d}=(0,ne.v)(TD),{css:c}=(0,te.X)(ID,{}),u=e===BD.f.AllSessions?DD.ActiveSessions:DD.ChangeCredentials,h=AD(u),g=(0,o.useMemo)((()=>{const i=(0,Zl.A)({oneTimeAuthToken:h,sessionId:d,locale:s,preferredBrokerName:n,clientAgent:a,appName:r,deviceName:(0,Ai.Me)(),product:"web"});return e===BD.f.AllSessions?`${t}my/settings/sessions?${i}`:`${t}my/settings/credentials?${i}`}),[e,t,s,n,a,r,h,d]);return(0,i.jsxs)(i.Fragment,{children:[Boolean(g&&h)&&(0,i.jsx)("iframe",{src:g,className:c.container()},void 0),l&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Bt.I,{},void 0),l]},void 0)]},void 0)}));class $D extends o.Component{constructor(){super(...arguments),this.onClose=()=>{const{close:e}=this.props;e()}}render(){const{isShown:e,width:t,height:s,rules:o}=this.props;return e?(0,i.jsx)(fa.V,Object.assign({title:"",width:t,height:s,onClose:this.onClose,extend:{body:o.dialog(this.props)}},{children:(0,i.jsx)(MD,{},void 0)}),void 0):null}}const ED=(0,n.$)(CD,{close:kD.q.close})((0,x.Z)((()=>({dialog:Object.assign({},(0,X.o)(0))})))($D)),FD=l()([(0,u.$)(c.H).data.isLcgAuth()],(e=>({isLcgAuth:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var RD=s(90660),WD=s(13456),HD=s(67804),zD=s(18766);const JD=l()([(0,u.$)((e=>e.lcgIdDialog)).isShown(),(0,u.$)(zD.V).errorCode(),(0,qs.t)(fn.l,{imageName:"auth_dialog.png"},d.iN)],((e,t,s)=>({isShown:e,errorCode:t,dialogImage:s})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var QD=s(74118);class _D extends o.Component{constructor(){super(...arguments),this.renderCloseIcon=()=>(0,i.jsx)(se.J,{source:ie.Y.bigClose,size:oe.J.Medium},void 0),this.onClose=()=>{const{close:e}=this.props;e()}}render(){const{isShown:e,errorCode:t,rules:s}=this.props;return e?(0,i.jsx)(fa.V,Object.assign({title:"",isDraggable:Boolean(t),renderCloseIcon:!t&&this.renderCloseIcon,onClose:!t&&this.onClose,extend:{container:s.container(this.props),header:s.header(this.props),body:s.body(this.props)}},{children:(0,i.jsx)(QD.$,{signUpOnly:!0},void 0)}),void 0):null}}const qD=(0,n.$)(JD,{close:HD.M.close})((0,x.Z)((e=>{const{dialogImage:t}=e;return{container:Object.assign({width:564,height:560,borderWidth:0},(0,V.E)(0)),header:Object.assign(Object.assign(Object.assign({},(0,X.o)(11)),{alignItems:"flex-start",justifyContent:"flex-end",height:120}),(0,Q.O)(Object.assign({color:"#00ADBB"},t?{image:`url(${t})`,positionX:"center",positionY:"center",repeat:"no-repeat"}:{}))),body:Object.assign({display:"flex",overflow:"hidden",flexDirection:"column"},(0,X.o)(0))}}))(_D));var XD=s(6749);const VD=l()([(0,u.$)(XD.i).fontSize(),Rt.t],((e,t)=>({fontSize:e,palette:t})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var ZD=s(14421),UD=s(36568),KD=s(95989);const YD=(0,o.memo)((()=>{const{fontSize:e,palette:t}=(0,ne.v)(VD),s=(0,re.I0)(),n=(0,o.useCallback)((()=>{s(HD.M.open({page:ZD.Q.SignUp}))}),[s]);return(0,i.jsx)(RD.Z,Object.assign({theme:(0,WD.g)({isLcg:!0},t,e)},{children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(qD,{},void 0),(0,i.jsx)(UD.R,{onClose:n},void 0),(0,i.jsx)(KD.s,{onClose:n},void 0)]},void 0)}),void 0)})),GD=e=>e.accountDialog;var eP=s(96080);const tP=l()([(0,u.$)(GD).isShown(),rt.i,eP.Y],((e,t,s)=>({isShown:e,productName:t,isCrossBroker:!1})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var sP=s(12707);const iP=()=>({root:{height:"100%",flexDirection:"column"}});var oP=s(54796),nP=s(61559);const aP=l()([(0,u.$)(nP.w).data()],(e=>Object.values(e)))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),rP=l()([aP],(e=>e.map((e=>e.info.immutableSimplifiedName))))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),lP=l()([aP,rP],((e,t)=>({brokerList:t,plantIdList:e.map((e=>e.info.plantId))})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),dP=e=>{const{backgroundColor:t,foregroundColor:s}=e.theme.palette.semantic,i=Object.assign(Object.assign({width:"100%",height:29},(0,Q.O)({color:t.primaryNormal})),(0,V.E)(Z.q0));return{root:i,rootError:Object.assign(Object.assign(Object.assign({},i),(0,Q.O)({color:t.errorNormal})),{nested:{":hover":Object.assign({},(0,Q.O)({color:t.errorNormal}))}}),label:{display:"flex",flexShrink:1,flexBasis:"100%"},listItem:Object.assign(Object.assign({},(0,q.e)(0,0,Z.W0)),{nested:{":last-child":{marginBottom:0}}}),featuredGroupTitle:Object.assign({color:s.secondary},(0,q.e)(0,0,1.5*Z.W0)),popper:Object.assign({},(0,X.o)(0,0,0,Z.W0))}},cP=e=>{const{selected:t,isPlaceholder:s}=e,{foregroundColor:i,backgroundColor:o}=e.theme.palette.semantic;return{root:Object.assign(Object.assign(Object.assign(Object.assign({display:"flex",flexGrow:1,alignItems:"center",minHeight:29},(0,V.E)(Z.q0)),(0,X.o)(Z.W0)),(0,Q.O)({color:t?o.primaryHover:"transparent"})),s?{}:{nested:{":hover":Object.assign({},(0,Q.O)({color:o.primaryHover}))}}),content:Object.assign({display:"flex",alignItems:"center",flexGrow:1,lineHeight:`${Z.Nv}px`},lg.aF),right:{display:"flex",alignItems:"center",color:i.positive,fontSize:9,lineHeight:"9px"},iconWrapper:{display:"flex",justifyContent:"center",alignItems:"center",fill:i.positive,marginRight:Z.W0,width:oe.J.ExtraSmall,height:oe.J.ExtraSmall},icon:{width:oe.J.Small,height:oe.J.Small,marginRight:Z.W0}}};var uP=s(57100),hP=s(38512),gP=s(48042),pP=s(53005);const bP=(0,_s.X)((0,lt.a)({plantId:(0,u.$)(gP.J).info.plantId()})(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().brokerName()})),d.mr).chain((({plantId:e})=>(0,qs.t)(pP.w,{plantId:e},d.iN))).build();var vP=s(96252);const mP=l()([(0,u.$)(Wc.F).brokerTitleShort(),bP,(0,qs.t)(uP.D,{imageName:vP.O.SmallLogo},d.iN),(0,u.$)(hP.I).networkStatus(),(0,Ae.P)().isPlaceholder()],((e,t,s,i,o)=>({shortTitle:e,isNetworkError:i===Cs.I.Failed,isCopyEnabled:o?i!==Cs.I.Failed&&t===tT.V.Full:t===tT.V.Full,icon:s})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,xu.q)((0,Ae.P)().brokerName(),(0,Ae.P)().isPlaceholder())})),jP=(0,o.memo)((e=>{const{brokerName:t,onClick:s,selected:n,isPlaceholder:a,extend:r}=e,{shortTitle:l,isCopyEnabled:d,icon:c,isNetworkError:u}=(0,ne.v)(mP,{brokerName:t,isPlaceholder:a}),{t:h}=(0,on.q)(),{css:g,rules:p}=(0,te.X)(cP,{extend:r,selected:n,isPlaceholder:a}),b=(0,o.useCallback)((()=>{null==s||s(t)}),[t,s]);return(0,i.jsxs)("div",Object.assign({className:g.root(),onClick:b},{children:[(0,i.jsxs)("div",Object.assign({className:g.content()},{children:[(0,i.jsx)("img",{className:g.icon(),src:c},void 0),(0,i.jsx)("span",{children:u&&a?`${l} (${h("Temporarily Unavailable")})`:l},void 0)]}),void 0),d&&(0,i.jsxs)("div",Object.assign({className:g.right()},{children:[(0,i.jsx)(se.J,{extend:{iconWrapper:p.iconWrapper},size:20,source:ie.Y.copy},void 0),h("cTrader Copy")]}),void 0)]}),void 0)}));var xP=s(42516),yP=s(70910);const SP=(e,t)=>{const s=e.filter((e=>t[e.info.plantId]===tT.V.Full)),i=e.filter((e=>t[e.info.plantId]!==tT.V.Full));return[...fP(s),...fP(i)]},fP=e=>[...e].sort(((e,t)=>e.info.immutableSimplifiedName.localeCompare(t.info.immutableSimplifiedName))).sort(((e,t)=>e.info.sortingNumber-t.info.sortingNumber)),OP=l()([aP,(0,u.$)(yP.l).data()],((e,t)=>{const s=(e=>e.filter((e=>e.info.isFeaturedBroker&&e.accountCreation.isEnabled&&!e.info.isExcludedFromBigCrossBroker)))(e);return SP(s,t).map((e=>e.info.immutableSimplifiedName))}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),CP=(0,o.memo)((e=>{const{selectedBrokerName:t,handleChange:s}=e,o=(0,ne.v)(OP),{css:n,rules:a}=(0,te.X)(dP,{}),{t:r}=(0,on.q)();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",Object.assign({className:n.featuredGroupTitle()},{children:r("Featured Brokers")}),void 0),(0,i.jsx)("div",{children:o.map((e=>(0,i.jsx)(jP,{brokerName:e,selected:t===e,onClick:s,extend:{root:a.listItem}},e)))},void 0)]},void 0)})),kP=l()([aP,(0,u.$)(yP.l).data()],((e,t)=>{const s=(e=>e.filter((e=>!e.info.isFeaturedBroker&&e.accountCreation.isEnabled&&!e.info.isExcludedFromBigCrossBroker)))(e);return SP(s,t).map((e=>e.info.immutableSimplifiedName))}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),IP=(0,o.memo)((e=>{const{selectedBrokerName:t,handleChange:s}=e,o=(0,ne.v)(kP,{}),{rules:n}=(0,te.X)(dP,{});return(0,i.jsx)("div",{children:o.map((e=>(0,i.jsx)(jP,{brokerName:e,selected:t===e,onClick:s,extend:{root:n.listItem}},e)))},void 0)})),LP=(0,o.memo)((e=>{const{handleChange:t,selectedBrokerName:s}=e,n=(0,o.useCallback)((e=>{e.stopPropagation()}),[]);return(0,o.useEffect)((()=>(document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n)})),[n]),(0,i.jsxs)(qe.X,Object.assign({autoHeight:!0,autoHeightMax:391,extend:{content:{paddingRight:0}}},{children:[(0,i.jsx)(CP,{selectedBrokerName:s,handleChange:t},void 0),(0,i.jsx)(jo.D,{marginTop:2*Z.W0,marginBottom:2*Z.W0},void 0),(0,i.jsx)(IP,{selectedBrokerName:s,handleChange:t},void 0)]}),void 0)})),wP=(0,o.memo)((e=>{const{selectedBrokerName:t,isNetworkError:s}=e,[n,a]=(0,o.useState)(!1),r=(0,re.I0)(),{brokerList:l,plantIdList:d}=(0,ne.v)(lP),{css:c,rules:u}=(0,te.X)(dP,{}),h=(0,o.useCallback)((()=>{a(!0)}),[a]),g=(0,o.useCallback)((()=>{a(!1)}),[a]),p=(0,o.useCallback)((e=>{r(sP.H_.changeBroker(e))}),[r]),b=(0,o.useCallback)((e=>{g(),p(e)}),[p,g]),v=(0,o.useMemo)((()=>{const e=l.find((e=>t===e));return(0,i.jsx)("div",Object.assign({className:c.label()},{children:Boolean(e)&&(0,i.jsx)(jP,{brokerName:e,isPlaceholder:!0},void 0)}),void 0)}),[t,c,l]),m=(0,o.useCallback)((()=>(0,i.jsx)(LP,{selectedBrokerName:t,handleChange:b},void 0)),[b,t]);return(0,i.jsxs)(i.Fragment,{children:[d.map(((e,t)=>(0,i.jsx)(Vw.b,{plantId:e},`${e}-${t}`))),(0,i.jsx)(xP._,{brokerNameList:l},void 0),(0,i.jsxs)(hd.v,Object.assign({open:n,placement:"bottom-start",onOpen:h,onClose:g,testId:"broker-select",wide:!0,extend:{popper:u.popper}},{children:[(0,i.jsx)(oP.U,Object.assign({isActive:n,extend:{root:s?u.rootError:u.root}},{children:v}),void 0),m]}),void 0)]},void 0)})),TP=e=>{const{buttonBackgroundColor:t,foregroundColor:s}=e.theme.palette.semantic,{isActive:i,isDisabled:o,isLive:n}=e,a=Object.assign(Object.assign({},(0,V.E)(0)),(0,Q.O)({color:t.secondaryNormal})),r=Object.assign(Object.assign({},a),{nested:{":hover":{opacity:.8}}}),l=Object.assign(Object.assign(Object.assign({},a),(0,Q.O)({color:t.secondaryDisabled})),{color:s.muted1}),d=Object.assign(Object.assign(Object.assign({},a),(0,Q.O)({color:t.positiveNormal})),{color:s.primary1}),c=Object.assign(Object.assign(Object.assign({},a),(0,Q.O)({color:t.infoHover})),{color:s.primary1});return{root:Object.assign(Object.assign({width:70,height:29,marginRight:1,overflow:"hidden"},(0,X.o)(0)),{nested:{"&:first-child":Object.assign({},(0,V.E)(Z.q0,0,0,Z.q0)),"&:last-child":Object.assign({marginRight:0},(0,V.E)(0,Z.q0,Z.q0,0))}}),content:o?l:i?n?d:c:r}},DP=(0,o.memo)((e=>{const{label:t,value:s,onClick:n,extend:a,isDisabled:r,isActive:l,isLive:d}=e,{rules:c}=(0,te.X)(TP,{extend:a,isActive:l,isDisabled:r,isLive:d}),u=(0,o.useCallback)((()=>n(s)),[s,n]);return(0,i.jsx)(go.z,Object.assign({onClick:u,disabled:r,extend:{content:c.content,root:c.root}},{children:t}),void 0)}));var PP=s(20065),NP=s(75989);const AP=l()([(0,u.$)(c.H).data.immutableSimplifiedName(),(0,u.$)(GD).selectedBroker()],((e,t)=>null!=t?t:e))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),BP=(0,_s.X)(AP,d.mr).chain((e=>(0,qs.t)(hP.I,{brokerName:e},d.iN))).build(),MP=l()([(0,u.$)(GD).tab(),AP,(0,u.$)(BP).networkStatus(),(0,u.$)(BP).settings.CreateDemoAccount.AllowCreationOfAdditionalDemoAccounts(),(0,u.$)(BP).settings.CreateLiveAccount.AllowCreationOfAdditionalLiveAccounts(),eP.Y],((e,t,s,i,o,n)=>({tab:e===PP.V.Live&&o?PP.V.Live:PP.V.Demo,currentSelectedBrokerName:t,isCreationOfAdditionalDemoAccountsAllowed:i,isCreationOfAdditionalLiveAccountsAllowed:o,isNetworkError:s===Cs.I.Failed,isLoading:s===Cs.I.Started,isCrossBroker:!1})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var $P,EP,FP=s(4499);!function(e){e.InApp="InApp",e.Url="Url"}($P||($P={})),function(e){e.InApp="InApp",e.External="External"}(EP||(EP={}));const RP=l()([(0,u.$)(Fa.v).data.CTID.FirstAccountCreationMethod(),(0,u.$)(BP).settings.CreateLiveAccount.LiveAccountCreationMethod(),ed.P,AP],((e,t,s,i)=>{let o;return o=!s.length&&e===FP.P.Url||t!==$P.InApp?EP.External:EP.InApp,{creationMethod:o,selectedBrokerName:i}}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var WP=s(76764);const HP=l()([rt.i,(0,u.$)(BP).settings.CreateLiveAccount.CreateAccountUrl(),(0,u.$)(zi.pu).userId()],((e,t,s)=>{const i=(0,Ge.e)(t),o=(0,WP.D)(t),n=Object.assign(Object.assign({},o),{cTID:s});return i.search=`?${(0,Zl.A)(n)}`,{productName:e,url:(0,Vl.K)(i)}}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var zP=s(91850);const JP=(0,o.memo)((()=>{const{url:e,productName:t}=(0,ne.v)(HP),{t:s}=(0,on.q)(),n=(0,re.I0)(),a=(0,o.useCallback)((()=>{n(sP.H_.openLink({url:e,type:zP.U.CreateLive}))}),[e,n]);return(0,i.jsx)(At.s,{children:(0,i.jsx)(ge.X,Object.assign({flexGrow:1},{children:(0,i.jsxs)(At.s,Object.assign({justifyContent:"center"},{children:[s("Go Live Now - open a {0} Live account",t),(0,i.jsx)(Bt.I,{height:2*Z.W0},void 0),(0,i.jsxs)(ut.K,Object.assign({wide:!0,onClick:a},{children:[s("Create Live Account"),(0,i.jsx)(es.q,{width:.5*Z.W0},void 0),(0,i.jsx)(se.J,{source:ie.Y.ext,width:14,height:14},void 0)]}),void 0)]}),void 0)}),void 0)},void 0)})),QP=(0,o.memo)((e=>{const{currency:t,currencyList:s,onChange:n}=e,a=(0,o.useMemo)((()=>s.map((e=>({label:e,value:e})))),[s]);return(0,i.jsx)(Ct.P,{options:a,value:t,onChange:n,testId:"currency-select"},void 0)}));var _P=s(31011);const qP=l()([li.U,_P.S],((e,t)=>({leverageList:e,defaultLeverage:t})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,xu.q)((0,Ae.P)().brokerName(),(0,Ae.P)().accountEnv())})),XP=(0,o.memo)((e=>{const{leverage:t,onChange:s,accountEnv:n,brokerName:a}=e,{leverageList:r,defaultLeverage:l}=(0,ne.v)(qP,{accountEnv:n,brokerName:a}),{t:d}=(0,on.q)(),c=(0,o.useMemo)((()=>r.map((e=>{var t;const s=l===e?` (${d("Default")})`:"";return{label:`${null!==(t=(0,pi.Q)(e))&&void 0!==t?t:d("n/a")}${s}`,value:e.toString()}}))),[r,l,d]),u=(0,o.useCallback)((e=>{s((0,oi.J)(e))}),[s]);return(0,i.jsx)(Ct.P,{options:c,value:null==t?void 0:t.toString(),onChange:u,testId:"leverage-select"},void 0)})),VP=l()([(0,u.$)(c.H).data.isLcg()],(e=>{const t=[mi.Qm.Hedged,mi.Qm.Netted];return e&&t.push(mi.Qm.SpreadBetting),t}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),ZP=l()([VP],(e=>({accountTypeList:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),UP=(0,o.memo)((e=>{const{accountType:t,onChange:s}=e,{accountTypeList:n}=(0,ne.v)(ZP),{t:a}=(0,on.q)(),r=(0,o.useMemo)((()=>n.map((e=>({label:e===mi.Qm.Hedged?`${(0,Si.x)(e,!1)} (${a("Default")})`:(0,Si.x)(e,!1),value:e})))),[n,a]),l=(0,o.useCallback)((e=>{s(e)}),[s]);return(0,i.jsx)(Ct.P,{options:r,value:t,onChange:l,testId:"account-type-select"},void 0)})),KP=(0,o.memo)((()=>{const{t:e}=(0,on.q)();return(0,i.jsx)(kt.n,Object.assign({size:20,source:ie.Y.info},{children:(0,i.jsxs)(At.s,{children:[(0,i.jsx)(ge.X,{children:`${e("Hedged accounts allow traders to")}\n                  • ${e("Have both BUY and SELL positions open, for the same symbol, at the same time")}\n                  • ${e("Have multiple BUY, or SELL positions open, for the same symbol, at the same time")}`},void 0),(0,i.jsx)(Bt.I,{height:2*Z.W0},void 0),(0,i.jsx)(ge.X,{children:`${e("Netted accounts allow traders to")}:\n                  • ${e("Only have one position open, for the same symbol, at the same time")}\n                  • ${e("Positions will be closed by orders of the opposite direction")}`},void 0),(0,i.jsx)(Bt.I,{height:2*Z.W0},void 0),(0,i.jsxs)("span",{children:[e("FIX API connection is supported for netted accounts. Click")," ",(0,i.jsx)("a",Object.assign({href:ot.SPECIFICATIONS,target:"_blank"},{children:e("FIX API help")}),void 0)," ",e("to find out more.")]},void 0)]},void 0)}),void 0)}));var YP=s(6591),GP=s(26825),eN=s(16434),tN=s(18936);const sN=l()([(0,u.$)(m.Z).fixApi.isEnabled(),(0,u.$)(c.H).data.isLcg()],((e,t)=>e&&!t))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),iN=l()([GP.F,eN.B,(0,u.$)(hP.I).settings.CreateLiveAccount.DefaultLeverage(),tN.u,(0,u.$)(GD).live()],((e,t,s,i,o)=>{var n,a;const r=e.includes(null==o?void 0:o.currency)?o.currency:t;return{liveDepositCurrencyList:e,currency:r,swapFree:null==o?void 0:o.swapFree,leverage:null!==(n=null==o?void 0:o.leverage)&&void 0!==n?n:s,accountType:null!==(a=null==o?void 0:o.accountType)&&void 0!==a?a:i}}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().brokerName()})),oN=l()([(0,u.$)(hP.I).settings.CreateLiveAccount.AllowedAccountTypes(),(0,u.$)(m.Z).info.title(),(0,u.$)(c.H).data.isKawase(),(0,u.$)(N.Ee).isAppropriatenessTestPassed(),sN,(0,u.$)(m.Z).swapFree.isEnabled(),iN,(0,u.$)(GD).isLoading(),(0,u.$)(GD).errorCode(),(0,u.$)(gP.J).info.plantId()],((e,t,s,i,o,n,a,r,l,d)=>Object.assign(Object.assign({brokerTitle:t,isAccountTypeSelectShown:"HedgedAndNetted"===e,isLeverageTooltipShown:s&&!i,isFixApiTooltipShown:o,isSwapFreeShown:n},a),{isLoading:r,errorCode:l,plantId:d})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().brokerName()}));var nN=s(38722);const aN=(0,o.memo)((e=>{const{selectedBrokerName:t}=e,{isLoading:s,errorCode:n,brokerTitle:a,swapFree:r,currency:l,leverage:d,accountType:c,isLeverageTooltipShown:u,isAccountTypeSelectShown:h,liveDepositCurrencyList:g,isFixApiTooltipShown:p,isSwapFreeShown:b,plantId:v}=(0,ne.v)(oN,{brokerName:t}),m=(0,re.I0)(),{t:j}=(0,on.q)(),x=(0,o.useCallback)((e=>{m(sP.H_.clearError()),m(sP.H_.changeLive({currency:e}))}),[m]),y=(0,o.useCallback)((e=>{m(sP.H_.clearError()),m(sP.H_.changeLive({leverage:e}))}),[m]),S=(0,o.useCallback)((e=>{m(sP.H_.clearError()),m(sP.H_.changeLive({accountType:e}))}),[m]),f=(0,o.useCallback)((e=>{m(sP.H_.clearError()),m(sP.H_.changeLive({swapFree:e}))}),[m]),O=(0,o.useCallback)((()=>{m(nN.Y.create({accountEnv:mi.rf.Live,currency:l,leverage:d,accountType:c,swapFree:r,isAutoLogin:!0,isCreatedAutomatically:!1,brokerName:t,plantId:v}))}),[m,r,l,d,c,v,t]);return(0,i.jsxs)(At.s,Object.assign({testId:"create-live-account-form"},{children:[(0,i.jsxs)(ge.X,Object.assign({marginBottom:3*Z.W0,alignItems:"flex-end",minHeight:44},{children:[(0,i.jsxs)(At.s,Object.assign({flexBasis:"60%"},{children:[(0,i.jsx)(ge.X,Object.assign({testId:"deposit-label"},{children:j("Deposit Currency")}),void 0),(0,i.jsx)(ge.X,{children:(0,i.jsx)(QP,{currency:l,currencyList:g,onChange:x},void 0)},void 0)]}),void 0),(0,i.jsxs)(At.s,{children:[(0,i.jsxs)(ge.X,Object.assign({testId:"leverage-label",alignItems:"flex-end"},{children:[j("Leverage"),u&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(es.q,{},void 0),(0,i.jsx)(kt.n,Object.assign({size:20,source:ie.Y.info},{children:`${j("You can change the account's leverage after filling")}\n                                          ${j("the registration leverage, questionnaire, and upload")}\n                                          ${j("your documents or by contacting")} ${a}`}),void 0)]},void 0)]}),void 0),(0,i.jsx)(ge.X,Object.assign({alignItems:"center"},{children:(0,i.jsx)(XP,{brokerName:t,accountEnv:mi.rf.Live,leverage:d,onChange:y},void 0)}),void 0)]},void 0)]}),void 0),h&&(0,i.jsx)(ge.X,Object.assign({marginBottom:3*Z.W0},{children:(0,i.jsxs)(At.s,{children:[(0,i.jsxs)(ge.X,Object.assign({testId:"account-type-label",alignItems:"flex-end"},{children:[j("Account Type"),(0,i.jsx)(es.q,{},void 0),p&&(0,i.jsx)(KP,{},void 0)]}),void 0),(0,i.jsx)(ge.X,Object.assign({alignItems:"center"},{children:(0,i.jsx)(UP,{accountType:c,onChange:S},void 0)}),void 0)]},void 0)}),void 0),b&&(0,i.jsx)(ge.X,Object.assign({marginBottom:0},{children:(0,i.jsx)(Ie.J,Object.assign({checked:r,onChange:f,testId:"swap-free-checkbox"},{children:j("Shariah Compliant (Swap Free)")}),void 0)}),void 0),(0,i.jsx)(Bt.I,{height:3*Z.W0},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsx)(ut.K,Object.assign({disabled:s,wide:!0,onClick:O,testId:"submit"},{children:j("Create Live Account")}),void 0)},void 0),n&&(0,i.jsx)(ge.X,Object.assign({testId:"error-message"},{children:(0,i.jsx)(We.H,Object.assign({textColor:He.d.Error,isMultiLine:!0},{children:(0,YP.z)(n)}),void 0)}),void 0)]}),void 0)})),rN=(0,o.memo)((()=>{const{creationMethod:e,selectedBrokerName:t}=(0,ne.v)(RP);return e===EP.External?(0,i.jsx)(JP,{},void 0):(0,i.jsx)(aN,{selectedBrokerName:t},void 0)})),lN=l()([(0,u.$)(Fa.v).data.CTID.FirstAccountCreationMethod(),(0,u.$)(BP).settings.CreateDemoAccount.DemoAccountCreationMethod(),ed.P,AP],((e,t,s,i)=>{let o;return o=!s.length&&e===FP.P.Url||t!==$P.InApp?EP.External:EP.InApp,{creationMethod:o,selectedBrokerName:i}}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),dN=l()([rt.i,(0,u.$)(BP).settings.CreateDemoAccount.CreateAccountUrl(),(0,u.$)(zi.pu).userId()],((e,t,s)=>{const i=(0,Ge.e)(t),o=(0,WP.D)(t),n=Object.assign(Object.assign({},o),{cTID:s});return i.search=`?${(0,Zl.A)(n)}`,{productName:e,url:(0,Vl.K)(i)}}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),cN=(0,o.memo)((()=>{const{url:e,productName:t}=(0,ne.v)(dN),{t:s}=(0,on.q)(),n=(0,re.I0)(),a=(0,o.useCallback)((()=>{n(sP.H_.openLink({url:e,type:zP.U.CreateDemo}))}),[e,n]);return(0,i.jsx)(At.s,{children:(0,i.jsx)(ge.X,Object.assign({flexGrow:1},{children:(0,i.jsxs)(At.s,Object.assign({justifyContent:"center"},{children:[s("Press the Button below to open a {0} Demo account",t),(0,i.jsx)(Bt.I,{height:2*Z.W0},void 0),(0,i.jsxs)(ut.K,Object.assign({wide:!0,onClick:a},{children:[s("Create Demo Account"),(0,i.jsx)(es.q,{width:.5*Z.W0},void 0),(0,i.jsx)(se.J,{source:ie.Y.ext,width:14,height:14},void 0)]}),void 0)]}),void 0)}),void 0)},void 0)})),uN={defaultDeposit:[1e3,3e3,5e3,1e4,25e3,5e4,1e5,5e5,1e6],JPY:[1e3,3e3,5e3,1e4,25e3,5e4,1e5,5e5,1e6,5e6,1e7,5e7,1e8]},hN=l()([(0,u.$)(GD).demo.currency()],(e=>{var t;return null!==(t=uN[e])&&void 0!==t?t:uN.defaultDeposit}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),gN=l()([hN],(e=>({depositList:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var pN=s(33535),bN=s(24025);const vN=(0,o.memo)((e=>{const{deposit:t,error:s,onChange:n}=e,{depositList:a}=(0,ne.v)(gN),r=(0,o.useMemo)((()=>a.map((e=>({label:(0,Md.x)(0)((0,pN.R)(e)),value:e.toString()})))),[a]);return(0,i.jsx)(bN.J,{options:r,value:t,error:s,onChange:n,testId:"deposit-select"},void 0)}));var mN=s(12302),jN=s(53995),xN=s(71447),yN=s(40694);const SN=l()([mN.W,jN.t,(0,u.$)(hP.I).settings.CreateDemoAccount.DefaultLeverage(),xN.p,hN,(0,u.$)(GD).demo(),yN.O],((e,t,s,i,o,n,a)=>{var r,l,d;const c=a.includes(null==n?void 0:n.currency)?n.currency:t;return{demoDepositCurrencyList:a,currency:c,swapFree:null==n?void 0:n.swapFree,deposit:null!==(r=null==n?void 0:n.deposit)&&void 0!==r?r:e,leverage:null!==(l=null==n?void 0:n.leverage)&&void 0!==l?l:s,accountType:null!==(d=null==n?void 0:n.accountType)&&void 0!==d?d:i,maxDeposit:o[o.length-1]}}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().brokerName()})),fN=l()([(0,u.$)(hP.I).settings.CreateDemoAccount.AllowedAccountTypes(),sN,(0,u.$)(m.Z).swapFree.isEnabled(),SN,(0,u.$)(GD).isLoading(),(0,u.$)(GD).errorCode(),(0,u.$)(gP.J).info.plantId()],((e,t,s,i,o,n,a)=>Object.assign(Object.assign({isAccountTypeSelectShown:"HedgedAndNetted"===e,isFixApiTooltipShown:t,isSwapFreeShown:s,isLoading:o,errorCode:n},i),{plantId:a})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().brokerName()}));function ON(e,t){if(void 0===e||""===e)return(0,O.L)("Please enter valid number");const s=(0,oi.J)(e.toString());return void 0===s?(0,O.L)("Please enter valid number"):(0,$o.y6)(s.toString())>8?(0,O.L)("Max {0} decimal digits allowed",8):s<=0?(0,O.L)("Please choose an amount greater than {0}",0):s>t?(0,O.L)("Please choose an amount less than {0}",(0,Md.x)(0)((0,pN.R)(t))):void 0}const CN=(0,o.memo)((({selectedBrokerName:e})=>{const{isLoading:t,errorCode:s,isAccountTypeSelectShown:n,demoDepositCurrencyList:a,isFixApiTooltipShown:r,isSwapFreeShown:l,swapFree:d,deposit:c,currency:u,leverage:h,accountType:g,maxDeposit:p,plantId:b}=(0,ne.v)(fN,{brokerName:e}),v=(0,re.I0)(),{t:m}=(0,on.q)(),[j,x]=(0,o.useState)(null==c?void 0:c.toString());(0,o.useEffect)((()=>{x(null==c?void 0:c.toString())}),[c]);const y=(0,o.useMemo)((()=>ON(j,p)),[j,p]),S=(0,o.useCallback)((e=>{x(e),void 0===ON(e,p)&&(v(sP.H_.clearError()),v(sP.H_.changeDemo({deposit:(0,oi.J)(e)})))}),[v,p]),f=(0,o.useCallback)((e=>{v(sP.H_.clearError()),v(sP.H_.changeDemo({currency:e}))}),[v]),O=(0,o.useCallback)((e=>{v(sP.H_.clearError()),v(sP.H_.changeDemo({leverage:e}))}),[v]),C=(0,o.useCallback)((e=>{v(sP.H_.clearError()),v(sP.H_.changeDemo({accountType:e}))}),[v]),k=(0,o.useCallback)((e=>{v(sP.H_.clearError()),v(sP.H_.changeDemo({swapFree:e}))}),[v]),I=(0,o.useCallback)((()=>{v(nN.Y.create({accountEnv:mi.rf.Demo,deposit:Number(c),currency:u,leverage:h,accountType:g,swapFree:d,isAutoLogin:!0,isCreatedAutomatically:!1,brokerName:e,plantId:b}))}),[v,c,d,u,h,g,b,e]);return(0,i.jsxs)(At.s,Object.assign({testId:"create-demo-account-form"},{children:[(0,i.jsxs)(ge.X,Object.assign({marginBottom:3*Z.W0,alignItems:"flex-end",minHeight:44},{children:[(0,i.jsxs)(At.s,Object.assign({flexBasis:"60%"},{children:[(0,i.jsx)(ge.X,Object.assign({testId:"deposit-label"},{children:m("Deposit")}),void 0),(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,Object.assign({flexBasis:"70%"},{children:(0,i.jsx)(vN,{deposit:j,error:y,onChange:S},void 0)}),void 0),(0,i.jsx)(At.s,{children:(0,i.jsx)(QP,{currency:u,currencyList:a,onChange:f},void 0)},void 0)]},void 0)]}),void 0),(0,i.jsxs)(At.s,{children:[(0,i.jsx)(ge.X,Object.assign({testId:"leverage-label"},{children:m("Leverage")}),void 0),(0,i.jsx)(ge.X,{children:(0,i.jsx)(XP,{brokerName:e,accountEnv:mi.rf.Demo,leverage:h,onChange:O},void 0)},void 0)]},void 0)]}),void 0),n&&(0,i.jsx)(ge.X,Object.assign({marginBottom:3*Z.W0},{children:(0,i.jsxs)(At.s,{children:[(0,i.jsxs)(ge.X,Object.assign({testId:"account-type-label",alignItems:"flex-end"},{children:[m("Account Type"),(0,i.jsx)(es.q,{},void 0),r&&(0,i.jsx)(KP,{},void 0)]}),void 0),(0,i.jsx)(ge.X,Object.assign({alignItems:"center"},{children:(0,i.jsx)(UP,{accountType:g,onChange:C},void 0)}),void 0)]},void 0)}),void 0),l&&(0,i.jsx)(ge.X,Object.assign({marginBottom:0},{children:(0,i.jsx)(Ie.J,Object.assign({checked:d,onChange:k,testId:"swap-free-checkbox"},{children:m("Shariah Compliant (Swap Free)")}),void 0)}),void 0),(0,i.jsx)(Bt.I,{height:3*Z.W0},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsx)(ut.K,Object.assign({disabled:void 0!==y||t,title:y,wide:!0,onClick:I,testId:"submit"},{children:m("Create Demo Account")}),void 0)},void 0),s&&(0,i.jsx)(ge.X,Object.assign({testId:"error-message"},{children:(0,i.jsx)(We.H,Object.assign({textColor:He.d.Error,isMultiLine:!0},{children:(0,YP.z)(s)}),void 0)}),void 0)]}),void 0)})),kN=(0,o.memo)((()=>{const{creationMethod:e,selectedBrokerName:t}=(0,ne.v)(lN);return e===EP.External?(0,i.jsx)(cN,{},void 0):(0,i.jsx)(CN,{selectedBrokerName:t},void 0)})),IN=(0,o.memo)((()=>{const{t:e}=(0,on.q)();return(0,i.jsx)(At.s,{children:(0,i.jsx)(ge.X,Object.assign({flexGrow:1},{children:(0,i.jsx)(At.s,Object.assign({justifyContent:"center"},{children:(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(se.J,{source:ie.Y.warningSignColored,width:26,height:26},void 0),(0,i.jsx)(es.q,{width:2*Z.W0},void 0),e("Account creation for the chosen Broker is temporarily unavailable. Please try later or choose another broker from the list.")]},void 0)}),void 0)}),void 0)},void 0)})),LN=l()([(0,u.$)(Wc.F).brokerTitleShort()],(e=>({shortBrokerTitle:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().brokerName()})),wN=(0,o.memo)((e=>{const{brokerName:t}=e,{shortBrokerTitle:s}=(0,ne.v)(LN,{brokerName:t});return(0,i.jsx)(mo.A,Object.assign({testId:"broker-name-title"},{children:s}),void 0)})),TN=(0,o.memo)((()=>{const e=(0,re.I0)(),{t}=(0,on.q)(),{tab:s,currentSelectedBrokerName:n,isCreationOfAdditionalDemoAccountsAllowed:a,isCreationOfAdditionalLiveAccountsAllowed:r,isNetworkError:l,isLoading:d,isCrossBroker:c}=(0,ne.v)(MP),u=(0,o.useCallback)((t=>{e(sP.H_.changeTab(t))}),[e]),h=(0,o.useMemo)((()=>d?(0,i.jsx)(At.s,Object.assign({justifyContent:"center",alignItems:"center"},{children:(0,i.jsx)(lu.h,{display:NP.l.Block},void 0)}),void 0):l?(0,i.jsx)(IN,{},void 0):a||r?s===PP.V.Live?(0,i.jsx)(rN,{},void 0):(0,i.jsx)(kN,{},void 0):(0,i.jsx)(ge.X,Object.assign({testId:"account-creation-not-allowed"},{children:t("Creation of additional trading accounts is disabled. Please contact your broker")}),void 0)),[s,d,a,r,l,t]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ge.X,Object.assign({marginBottom:3*Z.W0},{children:[(0,i.jsx)(xP._,{brokerNameList:[n]},void 0),(0,i.jsxs)(At.s,{children:[c?(0,i.jsx)(ge.X,Object.assign({testId:"broker-label"},{children:t("Broker")}),void 0):(0,i.jsx)(Bt.I,{height:2*Z.W0},void 0),(0,i.jsxs)(ge.X,{children:[(0,i.jsx)(At.s,{children:(0,i.jsx)(ge.X,Object.assign({alignItems:"stretch"},{children:c?(0,i.jsx)(wP,{isNetworkError:l,selectedBrokerName:n},void 0):(0,i.jsx)(wN,{brokerName:n},void 0)}),void 0)},void 0),(0,i.jsx)(At.s,Object.assign({flexShrink:1,flexGrow:0},{children:(0,i.jsxs)(ge.X,Object.assign({testId:"account-type-switcher"},{children:[(0,i.jsx)(DP,{isLive:!0,isDisabled:!r||l,isActive:s===PP.V.Live,label:t("Live"),value:PP.V.Live,onClick:u},void 0),(0,i.jsx)(DP,{isLive:!1,isDisabled:!a||l,isActive:s===PP.V.Demo,label:t("Demo"),value:PP.V.Demo,onClick:u},void 0)]}),void 0)}),void 0)]},void 0)]},void 0)]}),void 0),(0,i.jsx)(ge.X,Object.assign({flexShrink:0,flexGrow:1},{children:h}),void 0)]},void 0)})),DN=l()([eP.Y],(e=>({isCrossBroker:!1})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),PN=(0,o.memo)((()=>{const{rules:e}=(0,te.X)(iP,{}),{isCrossBroker:t}=(0,ne.v)(DN);return(0,i.jsxs)(At.s,Object.assign({extend:{root:e.root}},{children:[t&&(0,i.jsx)(ge.X,Object.assign({marginBottom:5*Z.W0},{children:(0,i.jsxs)(At.s,{children:[(0,i.jsx)(ge.X,Object.assign({marginBottom:0},{children:(0,i.jsx)(mo.A,Object.assign({testId:"form-title"},{children:(0,O.L)("New Trading Account")}),void 0)}),void 0),(0,i.jsx)(jo.D,{marginBottom:0},void 0)]},void 0)}),void 0),(0,i.jsx)(TN,{},void 0)]}),void 0)})),NN=(0,o.memo)((()=>{const e=(0,re.I0)(),{isShown:t,productName:s,isCrossBroker:n}=(0,ne.v)(tP),{t:a}=(0,on.q)(),r=(0,o.useCallback)((()=>{e(sP.H_.close())}),[e]);return t?(0,i.jsx)(fa.V,Object.assign({title:`${a("New Trading Account")} - ${s}`,width:455,height:n?365:290,testId:"account-dialog",onClose:r},{children:(0,i.jsx)(PN,{},void 0)}),void 0):null})),AN=e=>e.switchAccountDialog,BN=l()([(0,u.$)(AN).isShown(),rt.i,ed.P],((e,t,s)=>({isShown:e,productName:t,brokerList:s.map((e=>e.brokerName))})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var MN=s(85139);const $N=l()([(0,u.$)($.S).accountId(),MN.C,(0,u.$)(AN).errorCode()],((e,t,s)=>({currentAccountId:e,accountList:t,errorCode:s})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var EN=s(93771),FN=s(97658);const RN=l()([(0,u.$)(EN.u).live(),FN.W,(0,u.$)(EN.u).accountName(),(0,u.$)(EN.u).traderLogin(),(0,u.$)(EN.u).regulatorName(),(0,u.$)(EN.u).leverage(),(0,u.$)(EN.u).depositCurrency(),(0,u.$)(EN.u).depositCurrencyDigits(),(0,u.$)(EN.u).accountType(),(0,u.$)(EN.u).isFakeSpreadBetting(),(0,u.$)(EN.u).isLimitedRisk()],((e,t,s,i,o,n,a,r,l,d,c)=>({isLive:e,balance:t,accountName:s,login:i,regulatorName:o,leverage:n,depositCurrency:a,depositCurrencyDigits:r,accountType:l,isFakeSpreadBetting:d,isLimitedRisk:c})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().accountId()})),WN=l()([(0,u.$)(EN.u).temporaryUnavailable(),(0,u.$)(EN.u).swapFree()],((e,t)=>({temporaryUnavailable:e,isSwapFree:t})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().accountId()})),HN=l()([(0,u.$)(c.H).data.isLcg(),(0,u.$)(Xt.m).data.isAccountNumberShown(),(0,u.$)(Xt.m).data.isAccountNameShown(),(0,u.$)(Xt.m).data.isAccountBalanceShown(),eP.Y,(0,qs.t)(uP.D,{imageName:vP.O.SmallLogo},d.iN),(0,u.$)(Wc.F).brokerTitleShort(),RN,WN],((e,t,s,i,o,n,a,r,l)=>({isLcg:e,isAccountNumberShown:t,isAccountNameShown:s,isAccountBalanceShown:i,isCrossBroker:o,brokerImageUrl:n,brokerTitleShort:a,account:Object.assign(Object.assign({},r),l)})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,xu.q)((0,Ae.P)().accountId(),(0,Ae.P)().brokerName())})),zN=l()([(0,u.$)(EN.u).brokerName(),(0,Ae.P)().accountId()],((e,t)=>({brokerName:e,accountId:t})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().accountId()})),JN=(0,_s.X)(zN,d.mr).chain((({brokerName:e,accountId:t})=>(0,qs.t)(HN,{accountId:t,brokerName:e},d.iN))).build(),QN=e=>{const{isLive:t,disabled:s,temporaryUnavailable:i}=e,{account:o,foregroundColor:n}=e.theme.palette.semantic,a={position:"relative",display:"flex",flexDirection:"row",height:19,lineHeight:(0,Lh.a)(Z.Nv),marginBottom:2,cursor:"default",overflow:"hidden"},r={flexShrink:0,marginLeft:Z.W0};return{root:Object.assign(Object.assign({},a),{minWidth:"100%",color:s||i?n.muted1:n.primary2}),rootTooltip:Object.assign({},a),brokerImage:{width:16,height:16,marginRight:Z.W0,marginBottom:2,flexShrink:0},title:{flexShrink:0,color:t?o.liveAccountColor:o.demoAccountColor},accountName:{flexShrink:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"pre"},swapFreeIcon:Object.assign(Object.assign({},r),{fill:s||i?n.muted1:n.primary2}),swapFreeIconTooltip:Object.assign({},r)}};var _N=s(86610),qN=s(41852);const XN=()=>({separator:Object.assign({},(0,q.e)(0,2))}),VN=(0,o.memo)((()=>{const{css:e}=(0,te.X)(XN,{});return(0,i.jsx)("div",Object.assign({className:e.separator()},{children:ir.P_}),void 0)}));var ZN=s(6283);const UN=(0,o.memo)((e=>{const{accountId:t,disabled:s,onSelect:n}=e,{isLcg:a,isAccountBalanceShown:r,isAccountNumberShown:l,isAccountNameShown:d,isCrossBroker:c,brokerImageUrl:u,brokerTitleShort:h,account:g}=(0,ne.v)(JN,{accountId:t}),{css:p,rules:b}=(0,te.X)(QN,{isLive:g.isLive,disabled:s,temporaryUnavailable:g.temporaryUnavailable}),{t:v}=(0,on.q)(),m=(0,o.useCallback)((()=>{null==n||n(t)}),[t,n]),j=(0,o.useMemo)((()=>a&&g.regulatorName?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{children:g.regulatorName.slice(0,ZN.O)},void 0),(0,i.jsx)(VN,{},void 0)]},void 0):null),[a,g]),x=(0,o.useMemo)((()=>g.accountName?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",Object.assign({className:p.accountName()},{children:`${g.accountName} (${g.login})`}),void 0),(0,i.jsx)(VN,{},void 0)]},void 0):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{children:g.login},void 0),(0,i.jsx)(VN,{},void 0)]},void 0)),[g.accountName,g.login,p]),y=(0,o.useMemo)((()=>d&&g.accountName?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",Object.assign({className:p.accountName()},{children:g.accountName}),void 0),(0,i.jsx)(VN,{},void 0)]},void 0):d||l?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{children:g.login},void 0),(0,i.jsx)(VN,{},void 0)]},void 0):null),[g.accountName,g.login,l,d,p]),S=(0,o.useCallback)((e=>r||e?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{children:(0,Md.x)(g.depositCurrencyDigits,g.depositCurrency)(g.balance)},void 0),(0,i.jsx)(VN,{},void 0)]},void 0):null),[r,g.depositCurrencyDigits,g.depositCurrency,g.balance]),f=(0,o.useMemo)((()=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{children:(0,Si.x)(g.accountType,g.isFakeSpreadBetting)},void 0),(0,i.jsx)(VN,{},void 0)]},void 0)),[g.accountType,g.isFakeSpreadBetting]),O=(0,o.useMemo)((()=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{children:(0,_N.z)(g.accountType)},void 0),g.isLimitedRisk&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(VN,{},void 0),v("LR")]},void 0)]},void 0)),[g.accountType,g.isLimitedRisk,v]),C=(0,o.useMemo)((()=>{var e;return(0,i.jsx)("span",{children:null!==(e=(0,pi.Q)(g.leverage))&&void 0!==e?e:v("n/a")},void 0)}),[g.leverage,v]),k=(0,o.useCallback)((e=>{const t=!e&&c&&u;return(0,i.jsxs)("div",Object.assign({className:e?p.rootTooltip():p.root(),onClick:m},{children:[t&&(0,i.jsx)("img",{className:p.brokerImage(),src:u,alt:""},void 0),c&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{children:h},void 0),(0,i.jsx)(VN,{},void 0)]},void 0),(0,i.jsx)("div",Object.assign({className:p.title()},{children:(0,qN.T)(g.isLive)}),void 0),(0,i.jsx)(VN,{},void 0),j,e?x:y,!a&&f,S(e),a?O:C,g.isSwapFree&&(0,i.jsx)(se.J,{testId:"shariah-compliant-icon",size:oe.J.Medium,source:ie.Y.swapFree,extend:{root:e?b.swapFreeIconTooltip:b.swapFreeIcon}},void 0)]}),void 0)}),[g.isLive,g.isSwapFree,S,C,y,x,f,O,u,h,p,c,a,m,j,b.swapFreeIconTooltip,b.swapFreeIcon]);return(0,i.jsxs)(zs.b,Object.assign({autoWidthElement:!0},{children:[k(!1),k(!0)]}),void 0)}));class KN extends o.Component{constructor(){super(...arguments),this.renderOption=e=>{const{disabled:t}=this.props;return(0,i.jsx)(UN,{accountId:e.value,disabled:e.disabled||t,onSelect:this.onValueSelect},e.value)},this.onValueSelect=e=>{const{onChange:t}=this.props;t(e)}}render(){const{accountId:e,accountList:t,disabled:s,rules:o}=this.props;return(0,i.jsx)(Ct.P,{options:t,value:e,disabled:s,showHorizontalScroll:!1,renderOption:this.renderOption,extend:{popper:o.popper(this.props),option:o.option(this.props),selectedOption:o.option(this.props)}},void 0)}}const YN=(0,x.Z)((()=>({popper:{maxWidth:480},option:{cursor:"default"},selectedOption:{cursor:"default"}})))(KN);var GN=s(91967);class eA extends o.Component{constructor(e){super(e),this.checkIsButtonAvailable=(e,t)=>{if(!t||0===e.length)return!1;const s=e.find((e=>e.accountId===t));return!!s&&!s.temporaryUnavailable},this.onChange=e=>{this.setState({accountId:e})},this.onClick=()=>{const{authorize:e,closeDialog:t}=this.props,{accountId:s}=this.state;e({accountId:s}),t()};const{currentAccountId:t}=e;this.state={accountId:t}}render(){const{accountList:e,errorCode:t}=this.props,{accountId:s}=this.state,o=!this.checkIsButtonAvailable(e,s);return(0,i.jsxs)(At.s,Object.assign({testId:"switch-account-form"},{children:[(0,i.jsx)(ge.X,Object.assign({marginTop:3*Z.W0,marginBottom:5*Z.W0},{children:(0,i.jsx)(mo.A,{children:(0,O.L)("Switch Account")},void 0)}),void 0),(0,i.jsx)(ge.X,{children:(0,O.L)("Account Number")},void 0),(0,i.jsx)(ge.X,Object.assign({testId:"account"},{children:(0,i.jsx)(YN,{accountId:s,accountList:this.getOptions(),disabled:0===e.length,onChange:this.onChange},void 0)}),void 0),(0,i.jsx)(Bt.I,{},void 0),(0,i.jsx)(ge.X,{children:(0,i.jsxs)(zs.b,Object.assign({wide:!0,placement:"bottom"},{children:[(0,i.jsx)(ut.K,Object.assign({wide:!0,disabled:o,onClick:this.onClick,testId:"submit"},{children:(0,O.L)("Sign In")}),void 0),s&&o&&(0,O.L)("Account is temporarily unavailable. Please try later or choose another account from the list")]}),void 0)},void 0),0===e.length&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Bt.I,{},void 0),(0,i.jsx)(ge.X,Object.assign({testId:"empty-account-list-error"},{children:(0,i.jsx)(We.H,Object.assign({textColor:He.d.Error,isMultiLine:!0},{children:(0,YP.z)(dn.OQ.HUB_NO_LINKED_ACCOUNTS)}),void 0)}),void 0)]},void 0),t&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Bt.I,{},void 0),(0,i.jsx)(ge.X,Object.assign({testId:"error-message"},{children:(0,i.jsx)(We.H,Object.assign({textColor:He.d.Error,isMultiLine:!0},{children:(0,YP.z)(t)}),void 0)}),void 0)]},void 0)]}),void 0)}getOptions(){const{accountList:e}=this.props;return e.map((e=>({value:e.accountId,label:void 0})))}}const tA=(0,n.$)($N,{authorize:GN.A.authorize,closeDialog:Ma.I.close})(eA),sA=(0,o.memo)((()=>{const{isShown:e,productName:t,brokerList:s}=(0,ne.v)(BN),n=(0,re.I0)(),{t:a}=(0,on.q)(),r=(0,o.useCallback)((()=>{n(Ma.I.close())}),[n]);return e?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(xP._,{brokerNameList:s},void 0),(0,i.jsx)(fa.V,Object.assign({title:`${a("Switch Account")} - ${t}`,onClose:r,width:520,height:470,testId:"switch-account-dialog"},{children:(0,i.jsx)(tA,{},void 0)}),void 0)]},void 0):null})),iA=(0,o.memo)((()=>{const{isLcgAuth:e}=(0,ne.v)(FD);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(NN,{},void 0),(0,i.jsx)(ED,{},void 0),(0,i.jsx)(sA,{},void 0),e&&(0,i.jsx)(YD,{},void 0)]},void 0)}));var oA=s(62803),nA=s(7456);const aA=(0,_s.X)(oA.T,d.mr).chain((e=>(0,cl.H)(e.map((e=>(0,qs.t)(nA.z,{positionId:e.positionId},d.iN))))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})))).map((e=>{const t=e.filter((e=>void 0!==e)).map((e=>e.tradeData.symbolId));return[...new Set(t)]})).build(),rA=(0,lt.a)({isLcg:(0,u.$)(c.H).data.isLcg(),symbolIdList:aA})(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var lA=s(62036),dA=s(50204);const cA=(0,o.memo)((()=>{const{isLcg:e,symbolIdList:t}=(0,ne.v)(rA);return(0,lA.c)(t),(0,dA.c)(e?t:[]),null})),uA=l()([oA.T,(0,u.$)(Ls.e).data()],((e,t)=>{const s=e.filter((e=>Object.values(e.takeProfit).filter((e=>void 0!==e)).length>0&&t[e.positionId])).map((e=>t[e.positionId].tradeData.symbolId));return{symbolIdList:[...new Set(s)]}}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));class hA extends o.Component{render(){const{symbolIdList:e}=this.props;return(0,i.jsx)(i.Fragment,{children:e.map((e=>(0,i.jsx)(al.i,{symbolId:e},e)))},void 0)}}const gA=(0,n.$)(uA)(hA),pA=l()([oA.T,(0,u.$)(Ls.e).data()],((e,t)=>({symbolIdList:e.filter((e=>e.stopLoss.breakEvenStop&&t[e.positionId])).map((e=>t[e.positionId].tradeData.symbolId))})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var bA=s(56137),vA=s(9770);const mA=(0,o.memo)((()=>{const{symbolIdList:e}=(0,ne.v)(pA);return(0,bA.G)(e),(0,vA.c)(e),null})),jA=l()([bo.D],(e=>({authUrl:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),xA=()=>({root:{visibility:"hidden",border:0,width:0,height:0}}),yA=(0,o.memo)((()=>{const{authUrl:e}=(0,ne.v)(jA),{css:t}=(0,te.X)(xA,{}),s=AD(DD.Referral),n=(0,o.useMemo)((()=>(0,Vl.K)({host:e.replace(/\/$/,""),pathname:"silent-login",search:(0,Zl.A)({oneTimeAuthToken:s})})),[e,s]);return Boolean(n&&s)&&(0,i.jsx)("iframe",{className:t.root(),src:n},void 0)}));var SA=s(60578);const fA=(0,o.memo)((()=>{const[e,t]=(0,o.useState)(!0),s=(0,o.useRef)();return(0,o.useLayoutEffect)((()=>(s.current=window.setTimeout((()=>{t(!1)}),20*SA.qk),()=>{window.clearTimeout(s.current)})),[s,t]),e&&(0,i.jsx)(yA,{},void 0)}));var OA=s(91189);const CA=l()([(0,u.$)(OA.y).data()],(e=>Object.values(e)))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),kA=l()([CA],(e=>({ribbonIdList:e.filter((e=>e.enabled&&e.shown)).map((e=>e.id))})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),IA=()=>({root:{}}),LA=e=>{const{color:t}=e;return{root:Object.assign(Object.assign({},(0,Q.O)({color:t})),{display:"flex",justifyContent:"center",position:"relative"}),button:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({minWidth:"120px"},(0,X.o)(Z.W0,25)),(0,q.e)(Z.W0,0)),{color:"#fff"}),(0,Cg.C)(1,"#fff")),(0,V.E)(Z.q0)),{textAlign:"center",":hover":Object.assign(Object.assign({},(0,Q.O)({color:"#fff"})),{color:"#11a1ff",cursor:"pointer"})}),closeIcon:{fill:(0,Zb.k)(t),position:"absolute",right:10}}};var wA=s(78890);const TA=l()([(0,u.$)(wA.W).title(),(0,u.$)(wA.W).color(),(0,u.$)(wA.W).closable(),(0,u.$)(wA.W).action.type(),(0,u.$)(wA.W).action.url()],((e,t,s,i,o)=>({title:e,color:t,closable:s,actionType:i,actionUrl:o})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().id()}));var DA=s(72682);const PA=(0,o.memo)((e=>{const{id:t}=e,{title:s,color:n,closable:a}=(0,ne.v)(TA,{id:t}),r=(0,re.I0)(),{css:l,rules:d}=(0,te.X)(LA,{color:n}),c=(0,o.useCallback)((()=>{r(DA.G.doAction({id:t}))}),[r,t]),u=(0,o.useCallback)((()=>{r(DA.G.hide({id:t}))}),[r,t]);return(0,i.jsxs)("div",Object.assign({className:l.root()},{children:[(0,i.jsx)("div",Object.assign({className:l.button(),onClick:c},{children:s}),void 0),a&&(0,i.jsx)(se.J,{source:ie.Y.cross,size:oe.J.Medium,onClick:u,extend:{root:d.closeIcon}},void 0)]}),void 0)})),NA=(0,o.memo)((()=>{const{ribbonIdList:e}=(0,ne.v)(kA),{css:t}=(0,te.X)(IA,{});return(0,i.jsx)("div",Object.assign({className:t.root()},{children:e.map((e=>(0,i.jsx)(PA,{id:e},e)))}),void 0)})),AA=()=>({dialog:Object.assign({},(0,X.o)(0))}),BA=e=>e.ribbonDialog,MA=l()([(0,u.$)(BA).isShown(),(0,u.$)(BA).id()],((e,t)=>({isShown:e,ribbonId:t})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var $A=s(29854);const EA=l()([(0,u.$)(wA.W).action.url()],(e=>({ribbonUrl:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,Ae.P)().id()})),FA=()=>({container:{width:"100%",height:"100%",border:"none"}}),RA=(0,o.memo)((e=>{const{id:t}=e,{ribbonUrl:s}=(0,ne.v)(EA,{id:t}),{css:o}=(0,te.X)(FA,{});return(0,i.jsx)("iframe",{src:s,className:o.container()},void 0)})),WA=(0,o.memo)((()=>{const{isShown:e,ribbonId:t}=(0,ne.v)(MA),s=(0,re.I0)(),{rules:n}=(0,te.X)(AA,{}),a=(0,o.useCallback)((()=>{s($A.a.close({id:t}))}),[s,t]);return e?(0,i.jsx)(fa.V,Object.assign({title:"",width:640,height:640,onClose:a,extend:{body:n.dialog}},{children:(0,i.jsx)(RA,{id:t},void 0)}),void 0):null}));var HA=s(39644);const zA=e=>e.iframeInDialog,JA=l()([(0,u.$)(zA).isShown(),(0,u.$)(zA).url(),(0,u.$)(zA).title(),rt.i],((e,t,s,i)=>({isShown:e,url:t,title:s,productName:i})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var QA=s(34036);const _A=()=>({root:Object.assign({display:"flex",flexDirection:"column"},(0,X.o)(0)),container:{width:QA.aZ,height:QA.BX},iframe:{width:"100%",height:"100%",border:0}}),qA=(0,o.memo)((()=>{const{isShown:e,url:t,title:s,productName:n}=(0,ne.v)(JA),{css:a,rules:r}=(0,te.X)(_A,{}),l=(0,re.I0)(),d=(0,o.useCallback)((()=>{l(HA._.hide())}),[l]);return e?(0,i.jsx)(fa.V,Object.assign({title:s?`${s} - ${n}`:`${(0,O.L)("Dialog")} - ${n}`,onClose:d,width:QA.aZ,height:QA.BX,testId:"iframe-in-dialog",extend:{body:r.root,container:r.container}},{children:(0,i.jsx)("iframe",{className:a.iframe(),src:t},void 0)}),void 0):null})),XA=e=>e.externalFundsDialog,VA=l()([(0,u.$)(XA).isShown(),(0,u.$)(XA).type(),rt.i],((e,t,s)=>({isShown:e,type:t,productName:s})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs}));var ZA=s(64414),UA=s(90683);const KA=l()([(0,u.$)(XA).type(),po.L,(0,qs.t)(fn.l,{imageName:"small_logo.svg"},d.iN)],((e,t,s)=>({type:e,idProductName:t,smallLogoUrl:s})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:h.Rs})),YA=()=>({logo:{width:24,height:24,marginRight:2*Z.W0}}),GA=(0,o.memo)((()=>{const{idProductName:e,type:t,smallLogoUrl:s}=(0,ne.v)(KA),{css:n}=(0,te.X)(YA,{}),a=(0,re.I0)(),r=(0,o.useCallback)((()=>{a(ZA.vB.close()),a(Ma.I.open({})),a(S.m.track({name:y.T2.AccountWindowOpened,params:{method:y.Zq.DepositDialog}}))}),[a]),l=(0,o.useCallback)((()=>{a(ZA.vB.close()),a(Ia.G.open({tab:La.e.Live})),a(S.m.track({name:y.T2.AccountWindowOpened,params:{method:y.Zq.DepositDialog}}))}),[a]);return(0,i.jsxs)(At.s,Object.assign({alignItems:"stretch",justifyContent:"center"},{children:[(0,i.jsxs)(ge.X,Object.assign({justifyContent:"flex-start",marginBottom:0},{children:[(0,i.jsx)("img",{className:n.logo(),src:s},void 0),(0,i.jsx)(mo.A,{children:t===UA.f.Deposit?(0,O.L)("Deposit"):(0,O.L)("Withdrawal")},void 0)]}),void 0),(0,i.jsx)(jo.D,{},void 0),(0,i.jsx)(ge.X,Object.assign({marginBottom:10*Z.W0,justifyContent:"flex-start"},{children:(0,O.L)("Login to your Live trading account and your {0} to manage your funds",e)}),void 0),(0,i.jsx)(ge.X,Object.assign({minWidth:220,minHeight:19,marginBottom:2*Z.W0,alignSelf:"center"},{children:(0,i.jsx)(qc.t,Object.assign({isStretch:!0,onClick:r},{children:(0,i.jsx)(Re.b,Object.assign({justifyContent:"center",alignItems:"center"},{children:(0,O.L)("Log in to your Live trading account")}),void 0)}),void 0)}),void 0),(0,i.jsx)(ge.X,Object.assign({minWidth:220,minHeight:19,marginBottom:2*Z.W0,alignSelf:"center"},{children:(0,i.jsx)(qc.t,Object.assign({isStretch:!0,onClick:l},{children:(0,i.jsx)(Re.b,Object.assign({justifyContent:"center",alignItems:"center"},{children:(0,O.L)("Open Live Account")}),void 0)}),void 0)}),void 0)]}),void 0)})),eB=(0,o.memo)((()=>{const{isShown:e,type:t,productName:s}=(0,ne.v)(VA),n=(0,re.I0)(),a=(0,o.useCallback)((()=>{n(ZA.vB.close())}),[n]),r=(0,o.useMemo)((()=>t===UA.f.Deposit?(0,O.L)("Deposit"):(0,O.L)("Withdrawal")),[t]);return e?(0,i.jsx)(fa.V,Object.assign({title:`${r} - ${s}`,width:430,height:280,onClose:a},{children:(0,i.jsx)(GA,{},void 0)}),void 0):null})),tB=(0,pe.f)((()=>Promise.all([s.e(227),s.e(736),s.e(160),s.e(730),s.e(473)]).then(s.bind(s,10197)).then((({Trade:e})=>e)))),sB=(0,pe.f)((()=>Promise.all([s.e(227),s.e(736),s.e(160),s.e(740),s.e(730),s.e(203)]).then(s.bind(s,60451)).then((({Copy:e})=>e)))),iB=(0,pe.f)((()=>Promise.all([s.e(227),s.e(160),s.e(740),s.e(429)]).then(s.bind(s,14102)).then((({Analyze:e})=>e)))),oB=(0,pe.f)((()=>s.e(244).then(s.bind(s,79800)).then((({AutomateApp:e})=>e))));class nB extends o.Component{constructor(){super(...arguments),this.renderContentFactory=()=>(e,t)=>{const{ctNetUrl:s,isCopyEnabled:o,isMainMenuVisible:n,mainMenuWidth:r}=this.props,l=r/e;return(0,i.jsxs)(be.g,Object.assign({disabled:!n,orientation:ve.y.Horizontal,height:t,width:e,testId:"left-menu-resize"},{children:[(0,i.jsx)(me.k,Object.assign({ratio:l,minSize:n?p.IR:p.ME,maxSize:n?p.Uf:p.ME,onChange:this.onMainMenuChange(e)},{children:(0,i.jsx)(xD,{},void 0)}),void 0),(0,i.jsx)(me.k,Object.assign({ratio:1-l,minSize:0},{children:(0,i.jsxs)(a.rs,{children:[(0,i.jsx)(a.AW,{exact:!0,path:he.Z.Analyze,render:this.renderAnalyze},void 0),Boolean(s)&&(0,i.jsx)(a.AW,{exact:!0,path:he.Z.Automate,render:this.renderAutomate},void 0),Boolean(o)&&(0,i.jsx)(a.AW,{path:he.Z.Copy,render:this.renderCopyApp},void 0),(0,i.jsx)(a.AW,{exact:!0,path:he.Z.Trader,render:this.renderTraderApp},void 0),(0,i.jsx)(a.AW,{children:(0,i.jsx)(a.l_,{to:he.Z.Trader},void 0)},void 0)]},void 0)}),void 0)]}),void 0)},this.onMainMenuChange=e=>t=>{const{changeMainMenuWidth:s}=this.props;s({width:e*t})},this.renderTraderApp=()=>(0,i.jsx)(tB,{},void 0),this.renderCopyApp=()=>(0,i.jsx)(sB,{},void 0),this.renderAnalyze=()=>(0,i.jsx)(iB,{},void 0),this.renderAutomate=()=>(0,i.jsx)(oB,{},void 0)}render(){const{isLcg:e,styles:t}=this.props;return(0,i.jsxs)("div",Object.assign({className:t.root},{children:[!e&&(0,i.jsx)(fA,{},void 0),(0,i.jsx)(iA,{},void 0),(0,i.jsx)(ef,{},void 0),(0,i.jsx)(cA,{},void 0),(0,i.jsx)(gA,{},void 0),(0,i.jsx)(mA,{},void 0),(0,i.jsx)(fD,{},void 0),(0,i.jsx)(NA,{},void 0),(0,i.jsx)(WA,{},void 0),(0,i.jsx)(ue,{},void 0),(0,i.jsx)(qA,{},void 0),(0,i.jsx)(eB,{},void 0),(0,i.jsx)(ge.X,Object.assign({flexGrow:1,flexShrink:1},{children:(0,i.jsx)(je.X,{children:(0,i.jsx)(xe.R,{children:this.renderContentFactory()},void 0)},void 0)}),void 0)]}),void 0)}}const aB=(0,a.EN)((0,n.$)(j,{changeMainMenuWidth:Nt.m.changeMainMenuWidth})((0,x.Z)((e=>{const{backgroundColor:t,foregroundColor:s}=e.theme.palette.semantic;return{root:Object.assign(Object.assign({display:"flex",flexDirection:"column",width:"100%",height:"100%"},(0,Q.O)({color:t.primaryNormal})),{color:s.primary2,overflow:"hidden"})}}))(nB)))},65497:(e,t,s)=>{"use strict";s.d(t,{E:()=>f});var i=s(85893),o=s(67294),n=s(75368),a=s(71383),r=s(95035),l=s(75879),d=s.n(l),c=s(70378),u=s(82864),h=s(29035),g=s(8166);const p=d()([(0,a.$)(g.H).data.isLcg(),(0,a.$)(u.M).leverageId(),(0,a.$)(h.N).tiers([])],((e,t,s)=>({isLcg:e,leverageId:t,tierList:s})))(Object.assign(Object.assign({},(0,c.jo)()),{keySelector:(0,r.P)().symbolId()}));var b=s(21962),v=s(33933),m=s(14441),j=s(97023),x=s(29575),y=s(69903),S=s(82471);const f=(0,o.memo)((e=>{var t;const{symbolId:s}=e,{isLcg:a,tierList:r}=(0,y.v)(p,{symbolId:s}),l=(0,o.useCallback)((e=>(0,i.jsxs)(i.Fragment,{children:[">",(0,i.jsx)(b.q,{},void 0),(0,i.jsx)(x.d,{value:e},void 0)]},void 0)),[]),d=(0,o.useCallback)(((e,t)=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(x.d,{value:e},void 0),(0,i.jsx)(b.q,{},void 0),"-",(0,i.jsx)(b.q,{},void 0),(0,i.jsx)(x.d,{value:t},void 0)]},void 0)),[]),c=(0,o.useCallback)((e=>(0,i.jsxs)(i.Fragment,{children:["≤",(0,i.jsx)(b.q,{},void 0),(0,i.jsx)(x.d,{value:e},void 0)]},void 0)),[]);return 1===r.length?(0,i.jsxs)(v.X,{children:[(0,i.jsx)(m.b,Object.assign({justifyContent:"center"},{children:(0,n.L)("Any")}),void 0),(0,i.jsx)(m.b,Object.assign({flexBasis:"160px",justifyContent:"center"},{children:null!==(t=(0,S.Q)(r[0].leverage))&&void 0!==t?t:(0,n.L)("n/a")}),void 0)]},void 0):(0,i.jsx)(i.Fragment,{children:r.map(((e,t)=>{var s;const u=r.length-1===t,h=0===t?0:r[t-1].volume,g=r[t].volume;return(0,i.jsxs)(o.Fragment,{children:[(0,i.jsxs)(v.X,{children:[(0,i.jsx)(m.b,Object.assign({justifyContent:"center"},{children:u?l(h):a?d(h,g):c(g)}),void 0),(0,i.jsx)(m.b,Object.assign({flexBasis:"160px",justifyContent:"center"},{children:null!==(s=(0,S.Q)(e.leverage))&&void 0!==s?s:(0,n.L)("n/a")}),void 0)]},void 0),!u&&(0,i.jsx)(j.D,{},void 0)]},`tier-${t}`)}))},void 0)}))},66098:(e,t,s)=>{"use strict";var i;s.d(t,{f:()=>i}),function(e){e.AllSessions="AllSessions",e.Credentials="Credentials"}(i||(i={}))},29867:(e,t,s)=>{"use strict";s.d(t,{t:()=>O});var i=s(85893),o=s(67294),n=s(69880),a=s(95035),r=s(75879),l=s.n(r),d=s(70378),c=s(9013);const u=l()([c.l,(0,a.P)().symbolName()],((e,t)=>({watchlistList:e.map((e=>function(e,t){return Object.assign(Object.assign({},e),{selected:!!t&&e.symbolNames.some((e=>e===t))})}(e,t)))})))(Object.assign({keySelector:(0,a.P)().symbolName()},(0,d.jo)()));var h=s(90191),g=s(35394),p=s(75368),b=s(38562),v=s(89085),m=s(92971),j=s(67316),x=s(28746),y=s(97023),S=s(86605);class f extends o.Component{constructor(){super(...arguments),this.onWatchlistClick=e=>()=>{const{symbolName:t,analyticsMethod:s,toggleSymbol:i}=this.props;i({watchlistId:e.id,symbolName:t,analyticsMethod:s})},this.onNewWatchlistClick=()=>{const{symbolName:e,analyticsMethod:t,track:s,openCreateWatchlist:i,hide:o}=this.props;s({name:b.T2.WatchlistCreated,params:{method:t}}),i({symbolName:e}),o()}}render(){return(0,i.jsxs)(x.s,Object.assign({testId:"watchlist-list-context-panel"},{children:[this.renderWatchlistList(),(0,i.jsx)(y.D,{},void 0),(0,i.jsx)(h.Z,Object.assign({testId:"new-watchlist",onClick:this.onNewWatchlistClick},{children:(0,p.L)("New Watchlist...")}),void 0)]}),void 0)}renderWatchlistList(){const{watchlistList:e}=this.props;return e.map((e=>(0,i.jsx)(h.Z,Object.assign({title:e.id===m.U_?(0,p.L)("Watchlist is Read Only"):void 0,icon:e.selected?g.Y.tick:void 0,disabled:e.id===m.U_,onClick:this.onWatchlistClick(e)},{children:e.name}),e.id)))}}const O=(0,n.$)(u,{toggleSymbol:j.U.toggleSymbol,openCreateWatchlist:S.E.open,track:v.m.track})(f)},6794:(e,t,s)=>{"use strict";s.d(t,{C:()=>n});var i=s(67294),o=s(22782);const n=e=>{const{markReady:t}=(0,i.useContext)(o.D);(0,i.useLayoutEffect)((()=>{e||t()}),[e,t])}},43796:(e,t,s)=>{"use strict";s.d(t,{U:()=>C});var i=s(85893),o=s(67294),n=s(22782),a=s(4189),r=s(75879),l=s.n(r),d=s(71383),c=s(95035),u=s(70378);const h=e=>e,g=l()([(0,d.$)(h).data(),(0,c.P)().id()],((e,t)=>e[t]))(Object.assign(Object.assign({},(0,u.jo)()),{keySelector:(0,c.P)().id()}));var p=s(76754);const b=l()([(0,d.$)(h).data(),(0,c.P)().idList()],((e,t)=>void 0===t?{isReady:!0}:0===t.length?{isReady:!1}:{isReady:t.map((t=>{var s;return null===(s=e[t])||void 0===s?void 0:s.status})).every((e=>e===p.WN.Ready))}))(Object.assign(Object.assign({},(0,u.jo)()),{keySelector:(0,c.P)().idList()})),v=l()([(0,d.$)(g).status()],(e=>({isInitialized:void 0!==e&&e!==p.WN.Hidden&&e!==p.WN.Visible})))(Object.assign(Object.assign({},(0,u.jo)()),{keySelector:(0,c.P)().id()}));var m=s(102);const j=()=>({root:{flexGrow:1,display:"flex",flexDirection:"column",overflow:"hidden"}});var x=s(42983);const y=(0,s(40169).AS)(n.O);var S=s(33426);const f=(0,s(40949).g)(n.O);function O(e,t,s){const i="object"==typeof t?s:t,o="object"==typeof t?t:void 0;return(0,S.W)(f,e,o,i)}const C=(0,o.memo)((e=>{var t,s,r,l,d,c;const{id:u,children:h}=e,g=(0,o.useRef)(),[p,S]=(0,o.useState)(!1),f=function(e,t=0){const[s,i]=(0,o.useState)(!1),[n,a]=(0,o.useState)(!1);return(0,o.useLayoutEffect)((()=>{const t=new IntersectionObserver((([e])=>{var t;i(null!==(t=null==e?void 0:e.isIntersecting)&&void 0!==t&&t)})),s=e.current;return s&&t.observe(s),()=>{t.disconnect()}}),[e,i]),(0,o.useLayoutEffect)((()=>{let e;return s?a(!0):e=window.setTimeout((()=>{a(!1)}),t),()=>{window.clearTimeout(e)}}),[s,t]),n}(g,m.Pp);(0,o.useLayoutEffect)((()=>{f&&S(!0)}),[f,p]);const{css:C}=(0,x.X)(j,{}),k=y(),{isInitialized:I}=O(v,{id:u}),L=null!==(c=null!==(d=null!==(l=null!==(r=null!==(s=null!==(t=m.mg[u])&&void 0!==t?t:m.QB[u])&&void 0!==s?s:m.WN[u])&&void 0!==r?r:m.e5[u])&&void 0!==l?l:m.xj[u])&&void 0!==d?d:m.QI[u])&&void 0!==c?c:m.UK[u],{isReady:w}=O(b,{idList:L.id});(0,o.useLayoutEffect)((()=>(k(a.e.show(u)),()=>{k(a.e.hide(u))})),[k,u]),(0,o.useLayoutEffect)((()=>{let e;return(void 0===L.id||w)&&(L.timeout?e=window.setTimeout((()=>{k(a.e.init(u))}),L.timeout):k(a.e.init(u))),()=>{window.clearTimeout(e)}}),[k,u,L,w]);const T=(0,o.useCallback)((()=>{k(a.e.ready(u))}),[k,u]),D=(0,o.useMemo)((()=>({markReady:T})),[T]);return(0,i.jsx)(n.D.Provider,Object.assign({value:D},{children:(0,i.jsx)("div",Object.assign({ref:g,className:C.root()},{children:p&&I&&h}),void 0)}),void 0)}))},43202:(e,t,s)=>{"use strict";s.d(t,{G:()=>ke});var i=s(85893),o=s(67294),n=s(69880),a=s(9570),r=s(8166),l=s(75879),d=s.n(l),c=s(70378),u=s(71383),h=s(51359),g=s(47007),p=s(7485),b=s(61613),v=s(62548);const m=d()([(0,u.$)(b.Z).orderTypeSettings.market.mr.enabled(),(0,u.$)(b.Z).orderTypeSettings.market.mr.pips(),(0,u.$)(b.Z).orderTypeSettings.market.sl.enabled(),(0,u.$)(b.Z).orderTypeSettings.market.sl.pips(),(0,u.$)(b.Z).orderTypeSettings.market.triggerMethodStopLoss(),(0,u.$)(b.Z).orderTypeSettings.market.trailingStopLoss(),(0,u.$)(b.Z).orderTypeSettings.market.tp.enabled(),(0,u.$)(b.Z).orderTypeSettings.market.tp.pips()],((e,t,s,i,o,n,a,r)=>({isMarketRangeEnabled:e,marketRange:t,isMarketStopLossEnabled:s,marketStopLoss:i,marketStopLossMethod:o,isMarketTrailingStopLoss:n,isMarketTakeProfitEnabled:a,marketTakeProfit:r})))(Object.assign(Object.assign({},(0,c.jo)()),{keySelector:h.Rs})),j=d()([(0,u.$)(b.Z).orderTypeSettings.stop.sl.enabled(),(0,u.$)(b.Z).orderTypeSettings.stop.sl.pips(),(0,u.$)(b.Z).orderTypeSettings.stop.triggerMethodStopLoss(),(0,u.$)(b.Z).orderTypeSettings.stop.trailingStopLoss(),(0,u.$)(b.Z).orderTypeSettings.stop.tp.enabled(),(0,u.$)(b.Z).orderTypeSettings.stop.tp.pips(),(0,u.$)(b.Z).orderTypeSettings.stop.stopOrderTriggerMethod()],((e,t,s,i,o,n,a)=>({isStopStopLossEnabled:e,stopStopLoss:t,stopStopLossMethod:s,isStopTrailingStopLoss:i,isStopTakeProfitEnabled:o,stopTakeProfit:n,stopMethod:a})))(Object.assign(Object.assign({},(0,c.jo)()),{keySelector:h.Rs})),x=d()([(0,u.$)(b.Z).orderTypeSettings.limit.sl.enabled(),(0,u.$)(b.Z).orderTypeSettings.limit.sl.pips(),(0,u.$)(b.Z).orderTypeSettings.limit.triggerMethodStopLoss(),(0,u.$)(b.Z).orderTypeSettings.limit.trailingStopLoss(),(0,u.$)(b.Z).orderTypeSettings.limit.tp.enabled(),(0,u.$)(b.Z).orderTypeSettings.limit.tp.pips()],((e,t,s,i,o,n)=>({isLimitStopLossEnabled:e,limitStopLoss:t,limitStopLossMethod:s,isLimitTrailingStopLoss:i,isLimitTakeProfitEnabled:o,limitTakeProfit:n})))(Object.assign(Object.assign({},(0,c.jo)()),{keySelector:h.Rs})),y=d()([v.l,(0,u.$)(b.Z).type(),(0,u.$)(b.Z).marketOrder(),(0,u.$)(r.H).data.isLcg(),(0,u.$)(g.P).data.isDealingDesk(),(0,u.$)(p.S).accountType(),(0,u.$)(p.S).isLimitedRisk(),m,j,x],((e,t,s,i,o,n,r,l,d,c)=>Object.assign(Object.assign(Object.assign({type:t,accepted:e,isMarketOrderOnly:i&&(o||n===a.Qm.SpreadBetting),isMarketOrderShown:!0,isStopOrderShown:!0,isLimitedRisk:r,isMarketOrderEnabled:s},l),d),c)))(Object.assign(Object.assign({},(0,c.jo)()),{keySelector:h.Rs}));var S=s(75368),f=s(28746),O=s(65331),C=s(65367),k=s(42151),I=s(97023),L=s(33933),w=s(76199),T=s(51604),D=s(93882),P=s(18277),N=s(44214),A=s(23414),B=s(80122),M=s(54738),$=s(44535),E=s(4285),F=s(81176),R=s(81996),W=s(65201);function H(e,t,i){const o=i?`${i}/`:"";return`url('${s(55424)(`./${o+e+(t?"_big":"")}.png`)}')`}var z=s(30866),J=s(15369),Q=s(96336),_=s(83069),q=s(70162),X=s(35394),V=s(55967),Z=s(21962);const U=d()([(0,u.$)(r.H).data.isLcg()],(e=>({isLcg:e})))(Object.assign(Object.assign({},(0,c.jo)()),{keySelector:h.Rs}));class K extends o.Component{constructor(){super(...arguments),this.onChange=e=>{const{onChange:t}=this.props;t(e)}}render(){const{type:e,styles:t,rules:s}=this.props;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(z.E,Object.assign({value:e,onChange:this.onChange,testId:"quick-trade-mode-select"},{children:[(0,i.jsxs)(J.Y,Object.assign({value:V.FN.SingleClick,testId:"single-click",extend:{root:s.root(this.props),label:s.label(this.props),radio:s.radio(this.props)}},{children:[(0,i.jsxs)("div",Object.assign({className:t.name},{children:[(0,i.jsx)("div",Object.assign({className:t.title},{children:(0,S.L)("Single-Click")}),void 0),(0,i.jsx)(Z.q,{},void 0),(0,i.jsx)(Q.o,Object.assign({isTransparent:!0},{children:(0,i.jsx)(_.J,{size:q.J.Medium,source:X.Y.quickTradeSingle},void 0)}),void 0)]}),void 0),(0,i.jsx)("div",Object.assign({className:t.description},{children:(0,S.L)("Send Orders by clicking once")}),void 0)]}),void 0),(0,i.jsxs)(J.Y,Object.assign({value:V.FN.DoubleClick,testId:"double-click",extend:{root:s.root(this.props),label:s.label(this.props),radio:s.radio(this.props)}},{children:[(0,i.jsxs)("div",Object.assign({className:t.name},{children:[(0,i.jsx)("div",Object.assign({className:t.title},{children:(0,S.L)("Double-Click")}),void 0),(0,i.jsx)(Z.q,{},void 0),(0,i.jsx)(Q.o,Object.assign({isTransparent:!0},{children:(0,i.jsx)(_.J,{size:q.J.Medium,source:X.Y.quickTradeDouble},void 0)}),void 0)]}),void 0),(0,i.jsx)("div",Object.assign({className:t.description},{children:(0,S.L)("Send Orders by double-clicking")}),void 0)]}),void 0),(0,i.jsxs)(J.Y,Object.assign({value:V.FN.DisabledClick,testId:"disabled",extend:{root:s.root(this.props),label:s.label(this.props),radio:s.radio(this.props)}},{children:[(0,i.jsxs)("div",Object.assign({className:t.name},{children:[(0,i.jsx)("div",Object.assign({className:t.title},{children:(0,S.L)("Disabled")}),void 0),(0,i.jsx)(Z.q,{},void 0),(0,i.jsx)(Q.o,Object.assign({isTransparent:!0},{children:(0,i.jsx)(_.J,{size:q.J.Medium,source:X.Y.quickTradeDisabled},void 0)}),void 0)]}),void 0),(0,i.jsx)("div",Object.assign({className:t.description},{children:(0,S.L)("Open an order screen on click")}),void 0)]}),void 0)]}),void 0),(0,i.jsx)(C.I,{height:6*M.W0},void 0),(0,i.jsxs)("div",Object.assign({className:t.imageList},{children:[(0,i.jsx)("div",{className:t.barImage1},void 0),(0,i.jsx)("div",{className:t.barImage2},void 0),(0,i.jsx)("div",{className:t.barImage3},void 0),(0,i.jsx)("div",{className:t.barImage4},void 0),(0,i.jsx)("div",{className:t.barImage5},void 0),(0,i.jsx)("div",{className:t.barImage6},void 0)]}),void 0)]},void 0)}}const Y=(0,n.$)(U)((0,E.Z)((e=>{const{isLcg:t}=e,{foregroundColor:s,buttonBackgroundColor:i}=e.theme.palette.semantic,o=t?"lcg":"",n=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,F.O)({image:H(e,!1,o),size:"82px auto",repeat:"no-repeat",positionX:"center",positionY:"center"})),{position:"relative",display:"inline-block",width:88,height:78}),(0,R.o)(1)),{borderStyle:"solid",borderWidth:1,borderColor:i.secondaryNormal,marginLeft:3}),(0,W.E)(M.q0)),{nested:{retina:Object.assign({},(0,F.O)({image:H(e,!0,o)}))}});return{root:{flexGrow:1,flexShrink:1,alignItems:"start"},label:{flexGrow:1,flexDirection:"column"},radio:{marginTop:3},name:{display:"flex",flexDirection:"row",alignItems:"center"},title:{verticalAlign:"middle",marginRight:3},description:{color:s.muted1},imageList:{},barImage1:n("barImage1"),barImage2:n("barImage2"),barImage3:n("barImage3"),barImage4:n("barImage4"),barImage5:n("barImage5"),barImage6:n("barImage6")}}))(K));var G=s(28455),ee=s(58852);const te=d()([(0,u.$)(r.H).data.isLcg(),(0,u.$)(ee.Z).info.title()],((e,t)=>({isLcg:e,brokerTitle:t})))(Object.assign(Object.assign({},(0,c.jo)()),{keySelector:h.Rs}));var se=s(61443),ie=s(34285);class oe extends o.Component{constructor(){super(...arguments),this.getAgreementText=()=>{const{isLcg:e,brokerTitle:t}=this.props;return e?function(e){return`${(0,S.L)("You can choose between the following modes for order submission")}\n\n1. ${(0,S.L)("The default mode for order submission is the 'Single-Click' Quick a Trade mode. Using this mode you click on either bid (SELL) or ask (BUY) button to submit your order. You will not need to confirm your order in any way before it is submitted.")}\n2. ${(0,S.L)("Using the 'Double-Click' mode you double-click on either bid (SELL) or ask (BUY) button to submit your order. If you only click once your order will not be submitted. You will not need to confirm your order in any way before it is submitted.")}\n3. ${(0,S.L)("Using the 'Disabled' mode, first you click on either the bid (SELL) or ask (BUY) button to open the 'Create Order' window, you will then need to select SELL or BUY to submit your order.")}\n\n${(0,S.L)("THERE WILL BE NO SUBSEQUENT CONFIRMATION PROMPT FOR YOU TO CLICK. YOU WILL NOT BE ABLE TO WITHDRAW YOUR ORDER ONCE IT IS SUBMITTED. UNDER NORMAL MARKET CONDITIONS AND SYSTEM PERFORMANCE AN ORDER WILL BE FILLED AFTER SUBMISSION AND YOU WILL HAVE ENTERED INTO A BINDING TRANSACTION.")}\n\n${(0,S.L)("You can change QuickTrade mode or disable it using the 'QuickTrade Mode' button on the top right hand menu of the platform.")}\n${(0,S.L)("By choosing 'Single-Click' or 'Double-Click' modes you understand that your orders will be submitted by clicking BUY or SELL without any further order confirmation. You accept all risks associated with the selected order submission mode, including, without limitation, the risk of errors, omissions or mistakes made in submitting any order. You agree to fully indemnify and hold harmless {0} from any and all losses, costs and expenses it may incur as a result of any such errors, omissions or mistakes by you or any other person trading on your behalf.",e)}`}(t):function(e){return`${(0,S.L)("You acknowledge that you have read and understood the following terms and conditions, and you agree to be bound hereby. Your current version of the terminal enables you to choose between the following modes for order submission. You agree that you will be bound by the procedures and conditions specified herein with respect to each such mode.")}\n\n1. ${(0,S.L)("The default mode for order submission is the 'Single-Click' QuickTrade mode which is a one step process. Using the 'Single-Click' QuickTrade mode, you click on either bid (SELL) or ask (BUY) rate button and your order is sent to your broker. When using the 'Single-Click' mode, you will not need to confirm your order in any way before it is sent to your broker.")}\n2. ${(0,S.L)("The 'DoubleClick' trading mode for order submission is also a one-step process. Using the 'Double-Click' mode, you double-click on either bid (SELL) or ask (BUY) rate button and your order is sent to your broker. No action will occur if you click only once on the bid (SELL) or ask (BUY) button. When using the double-click mode, you will not need to confirm your order in any way after double-clicking before it is sent to your broker.")}\n3. ${(0,S.L)("The 'Quick Trading Disabled' mode for order submission is a two step process. Using the 'Disabled' mode, you first click on either bid (SELL) or ask (BUY) rate button once the 'Create Order' window opens. You will then need to select a (SELL) or (BUY) order. Using the 'Quick Trading Off' mode, your order will not be submitted until you have completed both of the aforementioned steps.")}\n\n${(0,S.L)("THERE WILL BE NO SUBSEQUENT CONFIRMATION PROMPT FOR YOU TO CLICK. YOU WILL NOT BE ABLE TO WITHDRAW YOUR ORDER ONCE YOU CLICK. UNDER NORMAL MARKET CONDITIONS AND SYSTEM PERFORMANCE, A MARKET ORDER WILL BE FILLED AFTER SUBMISSION AND YOU WILL HAVE ENTERED INTO A BINDING TRANSACTION.")}\n\n${(0,S.L)("You can change QuickTrade modes or disable it in the 'QuickTrade Mode' section in the Settings panel, available from the Side Menu.")}\n\n${(0,S.L)("By choosing 'Single-Click' or 'Double-Click' trading mode, you understand that your orders will be submitted upon your clicking of the bid or ask rate, without any further order confirmation. You agree to accept all risks associated with the use of the order submission mode you have chosen, including, without limitation, the risk of errors, omissions or mistakes made in submitting any order. You agree to fully indemnify and hold harmless {0}. from any and all losses, costs and expenses that it may incur as a result of any such errors, omissions or mistakes by you, your trading manager or any other person trading on your behalf.",e)}`}(t)},this.onChange=e=>{const{onChange:t}=this.props;t(e)}}render(){const{accepted:e,rules:t}=this.props,s=(0,$.JC)(this.getAgreementText()),o=(0,S.L)("I understand how QuickTrading works. I have read and understood the terms and conditions about QuickTrading described above. Please do not show this message again.");return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(L.X,{children:(0,i.jsx)(se.X,Object.assign({scrollBackgroundLayout:ie.c.AllOpaque,extend:{root:t.scroll(this.props)}},{children:s}),void 0)},void 0),(0,i.jsx)(L.X,{children:(0,i.jsx)(P.J,Object.assign({checked:e,onChange:this.onChange},{children:o}),void 0)},void 0)]},void 0)}}const ne=(0,n.$)(te)((0,E.Z)((e=>{const{backgroundColor:t}=e.theme.palette.semantic;return{scroll:Object.assign(Object.assign({},(0,F.O)({color:t.primaryNormal})),{height:130})}}))(oe));var ae=s(11197),re=s(88930),le=s(53360),de=s(42647),ce=s(97067),ue=s(36700);function he(e){const t=(0,ce.m)(e);return void 0!==t?t:(0,ue.y6)(e)>0?(0,S.L)("Max {0} decimal digits allowed",0):(0,le.J)(e)<=0?(0,S.L)("Range should be more than {0}",0):void 0}class ge extends o.Component{constructor(e){super(e),this.onChangeEnabled=e=>{const{onChangeEnabled:t}=this.props;t(e)},this.onChangeValue=e=>{this.setState({value:e})};const{value:t}=e;this.state={value:t.toFixed()}}componentDidUpdate(e,t){const{onChangeValue:s,onErrorValue:i}=this.props,{value:o}=this.state;if(t.value!==o){const e=he(o);void 0===e&&s((0,le.J)(o)),i(e)}}render(){const{isEnabled:e,error:t}=this.props,{value:s}=this.state;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(L.X,{children:(0,i.jsx)(P.J,Object.assign({checked:e,onChange:this.onChangeEnabled,testId:"market-range"},{children:(0,S.L)("Market Range")}),void 0)},void 0),(0,i.jsxs)(L.X,{children:[(0,i.jsx)(f.s,Object.assign({flexBasis:"70px"},{children:(0,i.jsx)(de.z,{value:s,error:t,step:"1",disabled:!e,onChange:this.onChangeValue},void 0)}),void 0),(0,i.jsx)(f.s,{children:(0,i.jsx)(ae.H,Object.assign({textColor:re.d.Secondary},{children:(0,S.L)("Pips")}),void 0)},void 0)]},void 0)]},void 0)}}const pe=ge;var be=s(73327),ve=s(40299);class me extends o.Component{constructor(e){super(e),this.onChangeEnabled=e=>{const{onChangeEnabled:t}=this.props;t(e)},this.onChangeValue=e=>{this.setState({value:e})},this.onChangeMethod=e=>{const{onChangeMethod:t}=this.props;t(e)},this.onChangeTrailingStopLoss=e=>{const{onChangeTrailingStopLoss:t}=this.props;t(e)};const{value:t}=e;this.state={value:t.toFixed()}}componentDidUpdate(e,t){const{onChangeValue:s,onErrorValue:i}=this.props,{value:o}=this.state;if(t.value!==o){const e=he(o);void 0===e&&s((0,le.J)(o)),i(e)}}render(){const{isEnabled:e,error:t,method:s,isTrailingStopLoss:o}=this.props,{value:n}=this.state;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(L.X,{children:[(0,i.jsx)(P.J,Object.assign({checked:e,onChange:this.onChangeEnabled,testId:"stop-loss"},{children:(0,S.L)("Stop Loss")}),void 0),(0,i.jsx)(be.V,{type:ve.z.StopLoss,method:s,disabled:!e,onChange:this.onChangeMethod},void 0)]},void 0),(0,i.jsxs)(L.X,{children:[(0,i.jsx)(f.s,Object.assign({flexBasis:"70px"},{children:(0,i.jsx)(de.z,{value:n,error:t,step:"1",disabled:!e,onChange:this.onChangeValue},void 0)}),void 0),(0,i.jsx)(f.s,{children:(0,i.jsx)(ae.H,Object.assign({textColor:re.d.Secondary},{children:(0,S.L)("Pips")}),void 0)},void 0)]},void 0),(0,i.jsx)(L.X,{children:(0,i.jsx)(P.J,Object.assign({checked:o,disabled:!e,onChange:this.onChangeTrailingStopLoss,testId:"trailing-stop-loss"},{children:(0,S.L)("Trailing Stop Loss")}),void 0)},void 0)]},void 0)}}const je=me;class xe extends o.Component{constructor(e){super(e),this.onChangeEnabled=e=>{const{onChangeEnabled:t}=this.props;t(e)},this.onChangeValue=e=>{this.setState({value:e})};const{value:t}=e;this.state={value:t.toFixed()}}componentDidUpdate(e,t){const{onChangeValue:s,onErrorValue:i}=this.props,{value:o}=this.state;if(t.value!==o){const e=he(o);void 0===e&&s((0,le.J)(o)),i(e)}}render(){const{isEnabled:e,error:t}=this.props,{value:s}=this.state;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(L.X,{children:(0,i.jsx)(P.J,Object.assign({checked:e,onChange:this.onChangeEnabled,testId:"take-profit"},{children:(0,S.L)("Take Profit")}),void 0)},void 0),(0,i.jsxs)(L.X,{children:[(0,i.jsx)(f.s,Object.assign({flexBasis:"70px"},{children:(0,i.jsx)(de.z,{value:s,error:t,step:"1",disabled:!e,onChange:this.onChangeValue},void 0)}),void 0),(0,i.jsx)(f.s,{children:(0,i.jsx)(ae.H,Object.assign({textColor:re.d.Secondary},{children:(0,S.L)("Pips")}),void 0)},void 0)]},void 0)]},void 0)}}const ye=xe;var Se=s(14441);class fe extends o.Component{constructor(){super(...arguments),this.onChange=e=>{const{onChange:t}=this.props;t(e)}}render(){const{method:e}=this.props;return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(L.X,{children:[(0,i.jsx)(Se.b,Object.assign({flexGrow:0},{children:(0,S.L)("Stop Order")}),void 0),(0,i.jsx)(Z.q,{},void 0),(0,i.jsx)(be.V,{type:ve.z.Stop,method:e,onChange:this.onChange},void 0)]},void 0)},void 0)}}const Oe=fe;class Ce extends o.Component{constructor(e){super(e),this.onChangeType=e=>{this.setState({type:e})},this.onChangeAccepted=e=>{this.setState({accepted:e})},this.onChangeMarketOrderEnabled=e=>{this.setState({isMarketOrderEnabled:e})},this.onChangeMarketRangeEnabled=e=>{this.setState({isMarketRangeEnabled:e})},this.onChangeMarketRange=e=>{this.setState({marketRange:e})},this.onErrorMarketRange=e=>{this.setState({marketRangeError:e})},this.onChangeMarketStopLossEnabled=e=>{this.setState({isMarketStopLossEnabled:e})},this.onChangeMarketStopLoss=e=>{this.setState({marketStopLoss:e})},this.onErrorMarketStopLoss=e=>{this.setState({marketStopLossError:e})},this.onChangeMarketStopLossMethod=e=>{this.setState({marketStopLossMethod:e})},this.onChangeMarketTrailingStopLoss=e=>{this.setState({isMarketTrailingStopLoss:e})},this.onChangeMarketTakeProfitEnabled=e=>{this.setState({isMarketTakeProfitEnabled:e})},this.onChangeMarketTakeProfit=e=>{this.setState({marketTakeProfit:e})},this.onErrorMarketTakeProfit=e=>{this.setState({marketTakeProfitError:e})},this.onChangeStopStopLossEnabled=e=>{this.setState({isStopStopLossEnabled:e})},this.onChangeStopStopLoss=e=>{this.setState({stopStopLoss:e})},this.onErrorStopStopLoss=e=>{this.setState({stopStopLossError:e})},this.onChangeStopStopLossMethod=e=>{this.setState({stopStopLossMethod:e})},this.onChangeStopTrailingStopLoss=e=>{this.setState({isStopTrailingStopLoss:e})},this.onChangeStopTakeProfitEnabled=e=>{this.setState({isStopTakeProfitEnabled:e})},this.onChangeStopTakeProfit=e=>{this.setState({stopTakeProfit:e})},this.onErrorStopTakeProfit=e=>{this.setState({stopTakeProfitError:e})},this.onChangeStopMethod=e=>{this.setState({stopMethod:e})},this.onChangeLimitStopLossEnabled=e=>{this.setState({isLimitStopLossEnabled:e})},this.onChangeLimitStopLoss=e=>{this.setState({limitStopLoss:e})},this.onErrorLimitStopLoss=e=>{this.setState({limitStopLossError:e})},this.onChangeLimitStopLossMethod=e=>{this.setState({limitStopLossMethod:e})},this.onChangeLimitTrailingStopLoss=e=>{this.setState({isLimitTrailingStopLoss:e})},this.onChangeLimitTakeProfitEnabled=e=>{this.setState({isLimitTakeProfitEnabled:e})},this.onChangeLimitTakeProfit=e=>{this.setState({limitTakeProfit:e})},this.onErrorLimitTakeProfit=e=>{this.setState({limitTakeProfitError:e})},this.onSubmit=()=>{const{update:e,onSubmit:t}=this.props;e(Object.assign({},this.state)),null==t||t()};const{type:t,accepted:s,isMarketOrderEnabled:i,isMarketRangeEnabled:o,marketRange:n,isMarketStopLossEnabled:a,marketStopLoss:r,marketStopLossMethod:l,isMarketTrailingStopLoss:d,isMarketTakeProfitEnabled:c,marketTakeProfit:u,isStopStopLossEnabled:h,stopStopLoss:g,stopStopLossMethod:p,isStopTrailingStopLoss:b,isStopTakeProfitEnabled:v,stopTakeProfit:m,stopMethod:j,isLimitStopLossEnabled:x,limitStopLoss:y,limitStopLossMethod:S,isLimitTrailingStopLoss:f,isLimitTakeProfitEnabled:O,limitTakeProfit:C}=e;this.state={type:t,accepted:s,isMarketOrderEnabled:i,isMarketRangeEnabled:o,marketRange:n,marketRangeError:void 0,isMarketStopLossEnabled:a,marketStopLoss:r,marketStopLossError:void 0,marketStopLossMethod:l,isMarketTrailingStopLoss:d,isMarketTakeProfitEnabled:c,marketTakeProfit:u,marketTakeProfitError:void 0,isStopStopLossEnabled:h,stopStopLoss:g,stopStopLossError:void 0,stopStopLossMethod:p,isStopTrailingStopLoss:b,isStopTakeProfitEnabled:v,stopTakeProfit:m,stopTakeProfitError:void 0,stopMethod:j,isLimitStopLossEnabled:x,limitStopLoss:y,limitStopLossError:void 0,limitStopLossMethod:S,isLimitTrailingStopLoss:f,isLimitTakeProfitEnabled:O,limitTakeProfit:C,limitTakeProfitError:void 0}}render(){const{accepted:e,isMarketOrderOnly:t,isLimitedRisk:s,styles:o,rules:n}=this.props,{type:a,accepted:r}=this.state;return(0,i.jsxs)(f.s,{children:[(0,i.jsxs)(se.X,Object.assign({scrollBackgroundLayout:ie.c.AllTransparent,extend:{root:n.scroll(this.props)}},{children:[(0,i.jsx)(O.s,Object.assign({paddingTop:M.W0,paddingBottom:M.W0,paddingLeft:M.W0,paddingRight:M.W0},{children:(0,i.jsx)(Y,{type:a,onChange:this.onChangeType},void 0)}),void 0),(0,i.jsx)(C.I,{height:3*M.W0},void 0),(0,i.jsx)(k.X,{children:(0,S.L)("Order Type Settings")},void 0),(0,i.jsx)(I.D,{},void 0),t?this.renderMarketOnlyOrderForm():this.renderFullOrderForm(),!e&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(C.I,{height:3*M.W0},void 0),(0,i.jsx)(ne,{accepted:r,onChange:this.onChangeAccepted},void 0)]},void 0)]}),void 0),(0,i.jsx)(C.I,{},void 0),(0,i.jsx)(L.X,{children:(0,i.jsx)(T.K,Object.assign({type:D.L.submit,wide:!0,disabled:void 0!==this.getSubmitError()||!this.isFormChanged(),onClick:this.onSubmit,testId:"submit"},{children:(0,S.L)("Apply")}),void 0)},void 0),s&&(0,i.jsx)("div",Object.assign({className:o.disabled},{children:(0,S.L)("Not available for Limited Risk Accounts")}),void 0)]},void 0)}getSubmitError(){const{accepted:e}=this.state;return function(e){if(!e)return(0,S.L)("Should be accepted")}(e)||this.getFieldError()}getFieldError(){const{marketRangeError:e,marketStopLossError:t,marketTakeProfitError:s,stopStopLossError:i,stopTakeProfitError:o,limitStopLossError:n,limitTakeProfitError:a}=this.state;return e||t||s||i||o||n||a}isFormChanged(){const{type:e,accepted:t,isMarketOrderEnabled:s}=this.props,{type:i,accepted:o,isMarketOrderEnabled:n}=this.state;return i!==e||o!==t||n!==s||(a=this.props,r=this.state,a.isMarketRangeEnabled!==r.isMarketRangeEnabled||a.marketRange!==r.marketRange||a.isMarketStopLossEnabled!==r.isMarketStopLossEnabled||a.marketStopLoss!==r.marketStopLoss||a.marketStopLossMethod!==r.marketStopLossMethod||a.isMarketTrailingStopLoss!==r.isMarketTrailingStopLoss||a.isMarketTakeProfitEnabled!==r.isMarketTakeProfitEnabled||a.marketTakeProfit!==r.marketTakeProfit)||((e,t)=>e.isStopStopLossEnabled!==t.isStopStopLossEnabled||e.stopStopLoss!==t.stopStopLoss||e.stopStopLossMethod!==t.stopStopLossMethod||e.isStopTrailingStopLoss!==t.isStopTrailingStopLoss||e.isStopTakeProfitEnabled!==t.isStopTakeProfitEnabled||e.stopTakeProfit!==t.stopTakeProfit||e.stopMethod!==t.stopMethod)(this.props,this.state)||((e,t)=>e.isLimitStopLossEnabled!==t.isLimitStopLossEnabled||e.limitStopLoss!==t.limitStopLoss||e.limitStopLossMethod!==t.limitStopLossMethod||e.isLimitTrailingStopLoss!==t.isLimitTrailingStopLoss||e.isLimitTakeProfitEnabled!==t.isLimitTakeProfitEnabled||e.limitTakeProfit!==t.limitTakeProfit)(this.props,this.state);var a,r}renderMarketOnlyOrderForm(){const{isMarketOrderEnabled:e}=this.state;return(0,i.jsx)(w.z,Object.assign({paddingTop:M.W0,paddingBottom:M.W0,paddingLeft:M.W0,paddingRight:M.W0},{children:(0,i.jsxs)(O.s,Object.assign({paddingTop:2*M.W0,paddingBottom:2*M.W0,paddingLeft:2*M.W0,paddingRight:2*M.W0},{children:[(0,i.jsx)(L.X,{children:(0,i.jsx)(P.J,Object.assign({checked:e,onChange:this.onChangeMarketOrderEnabled},{children:(0,S.L)("Market Order (Disable Market Range)")}),void 0)},void 0),(0,$.JC)(`${(0,S.L)('"Market Order" provide you with ability to buy or sell in a specified size at the best available price for that size.')}\n${(0,S.L)("Note: Prices Shown on the QuickTrade buttons are indicative only.")}`)]}),void 0)}),void 0)}renderFullOrderForm(){const{isMarketOrderShown:e,isStopOrderShown:t,rules:s}=this.props,{isMarketRangeEnabled:o,marketRange:n,marketRangeError:a,isMarketStopLossEnabled:r,marketStopLoss:l,marketStopLossError:d,marketStopLossMethod:c,isMarketTrailingStopLoss:u,isMarketTakeProfitEnabled:h,marketTakeProfit:g,marketTakeProfitError:p,isStopStopLossEnabled:b,stopStopLoss:v,stopStopLossError:m,stopStopLossMethod:j,isStopTrailingStopLoss:x,isStopTakeProfitEnabled:y,stopTakeProfit:O,stopTakeProfitError:C,stopMethod:k,isLimitStopLossEnabled:I,limitStopLoss:T,limitStopLossError:D,limitStopLossMethod:P,isLimitTrailingStopLoss:$,isLimitTakeProfitEnabled:E,limitTakeProfit:F,limitTakeProfitError:R}=this.state,W=void 0!==this.getFieldError();return(0,i.jsx)(w.z,Object.assign({paddingTop:M.W0,paddingBottom:M.W0,paddingLeft:M.W0,paddingRight:M.W0},{children:(0,i.jsxs)(N.n,Object.assign({disabled:W,extend:{headElement:s.head(this.props),tab:s.tab(this.props)}},{children:[(0,i.jsx)(A.O,Object.assign({id:"market",align:B.K.left,label:(0,S.L)("Market"),testId:"market"},{children:(0,i.jsxs)(L.X,Object.assign({flexGrow:1,flexShrink:1},{children:[e&&(0,i.jsx)(f.s,Object.assign({flexBasis:"33%"},{children:(0,i.jsx)(pe,{isEnabled:o,onChangeEnabled:this.onChangeMarketRangeEnabled,value:n,onChangeValue:this.onChangeMarketRange,error:a,onErrorValue:this.onErrorMarketRange},void 0)}),void 0),(0,i.jsx)(f.s,Object.assign({flexBasis:"33%"},{children:(0,i.jsx)(je,{isEnabled:r,onChangeEnabled:this.onChangeMarketStopLossEnabled,value:l,onChangeValue:this.onChangeMarketStopLoss,error:d,onErrorValue:this.onErrorMarketStopLoss,method:c,onChangeMethod:this.onChangeMarketStopLossMethod,isTrailingStopLoss:u,onChangeTrailingStopLoss:this.onChangeMarketTrailingStopLoss},void 0)}),void 0),(0,i.jsx)(f.s,Object.assign({flexBasis:"33%"},{children:(0,i.jsx)(ye,{isEnabled:h,onChangeEnabled:this.onChangeMarketTakeProfitEnabled,value:g,onChangeValue:this.onChangeMarketTakeProfit,error:p,onErrorValue:this.onErrorMarketTakeProfit},void 0)}),void 0)]}),void 0)}),void 0),t&&(0,i.jsx)(A.O,Object.assign({id:"stop",align:B.K.left,label:(0,S.L)("Stop"),testId:"stop"},{children:(0,i.jsxs)(L.X,Object.assign({flexGrow:1,flexShrink:1},{children:[(0,i.jsx)(f.s,Object.assign({flexBasis:"33%"},{children:(0,i.jsx)(je,{isEnabled:b,onChangeEnabled:this.onChangeStopStopLossEnabled,value:v,onChangeValue:this.onChangeStopStopLoss,error:m,onErrorValue:this.onErrorStopStopLoss,method:j,onChangeMethod:this.onChangeStopStopLossMethod,isTrailingStopLoss:x,onChangeTrailingStopLoss:this.onChangeStopTrailingStopLoss},void 0)}),void 0),(0,i.jsx)(f.s,Object.assign({flexBasis:"33%"},{children:(0,i.jsx)(ye,{isEnabled:y,onChangeEnabled:this.onChangeStopTakeProfitEnabled,value:O,onChangeValue:this.onChangeStopTakeProfit,error:C,onErrorValue:this.onErrorStopTakeProfit},void 0)}),void 0),(0,i.jsx)(f.s,Object.assign({flexBasis:"33%"},{children:(0,i.jsx)(Oe,{method:k,onChange:this.onChangeStopMethod},void 0)}),void 0)]}),void 0)}),void 0),(0,i.jsx)(A.O,Object.assign({id:"limit",align:B.K.left,label:(0,S.L)("Limit"),testId:"limit"},{children:(0,i.jsxs)(L.X,Object.assign({flexGrow:1,flexShrink:1},{children:[(0,i.jsx)(f.s,Object.assign({flexBasis:"33%"},{children:(0,i.jsx)(je,{isEnabled:I,onChangeEnabled:this.onChangeLimitStopLossEnabled,value:T,onChangeValue:this.onChangeLimitStopLoss,error:D,onErrorValue:this.onErrorLimitStopLoss,method:P,onChangeMethod:this.onChangeLimitStopLossMethod,isTrailingStopLoss:$,onChangeTrailingStopLoss:this.onChangeLimitTrailingStopLoss},void 0)}),void 0),(0,i.jsx)(f.s,Object.assign({flexBasis:"33%"},{children:(0,i.jsx)(ye,{isEnabled:E,onChangeEnabled:this.onChangeLimitTakeProfitEnabled,value:F,onChangeValue:this.onChangeLimitTakeProfit,error:R,onErrorValue:this.onErrorLimitTakeProfit},void 0)}),void 0)]}),void 0)}),void 0)]}),void 0)}),void 0)}}const ke=(0,n.$)(y,{update:G.t.update})((0,E.Z)((e=>{const{backgroundColor:t}=e.theme.palette.semantic;return{head:{width:80,position:"relative"},tab:Object.assign({},(0,R.o)(M.W0)),scroll:Object.assign(Object.assign({},(0,R.o)(0)),{flexGrow:1,flexShrink:1}),disabled:Object.assign(Object.assign(Object.assign({position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",top:0,bottom:0,left:M.W0,right:0,opacity:.8},(0,F.O)({color:t.primaryNormal})),(0,W.E)(M.q0)),{fontSize:16})}}))(Ce))},45291:(e,t,s)=>{"use strict";s.d(t,{D:()=>b});var i=s(85893),o=s(67294),n=s(10654),a=s(4285);const r={doubleClick:{cursor:`url('${s(13773)}'), default`},singleClick:{cursor:`url('${s(40948)}'), default`},disabledClick:{cursor:`url('${s(17702)}'), default`}};var l=s(92551),d=s(51359),c=s(82810),u=s(70378);const h=(0,l.a)({quickTradingStateType:c.x})(Object.assign(Object.assign({},(0,u.jo)()),{keySelector:d.Rs}));var g=s(55967);class p extends o.Component{constructor(){super(...arguments),this.onClick=e=>{e.stopPropagation();const{onClick:t,quickTradingStateType:s,disabled:i}=this.props;i||s!==g.FN.SingleClick&&s!==g.FN.DisabledClick||t(g.b9.Click)},this.onDoubleClick=e=>{e.stopPropagation();const{onClick:t,quickTradingStateType:s,disabled:i}=this.props;i||s===g.FN.DoubleClick&&t(g.b9.DoubleClick)}}render(){const{children:e,styles:t}=this.props;return(0,i.jsx)("div",Object.assign({className:t.root,onClick:this.onClick,onDoubleClick:this.onDoubleClick},{children:e}),void 0)}}const b=(0,n.B)(h)((0,a.Z)((e=>{const{quickTradingStateType:t}=e;return{root:Object.assign({},r[t])}}))(p))},82632:(e,t,s)=>{"use strict";s.d(t,{K:()=>h});var i=s(85893),o=s(67294),n=s(4285),a=s(79965),r=s(21789),l=s(93557),d=s(82924);const c=e=>{const{symbolId:t,stopLossPrice:s,children:n}=e;(0,d.s)(t);const a=(0,o.useCallback)((e=>i=>(0,r.w)(i,{symbolId:t,stopLossPrice:s,size:e})),[t,s]);return(0,i.jsx)(l.B.Provider,Object.assign({value:a},{children:n}),void 0)};class u extends o.Component{render(){const{symbolId:e,stopLossPrice:t,volumeOrStake:s,tradeSide:o,disabled:n,onChange:r,rules:l}=this.props;return(0,i.jsx)(c,Object.assign({symbolId:e,stopLossPrice:t},{children:(0,i.jsx)(a.C,{symbolId:e,volumeOrStake:s,tradeSide:o,disabled:n,onChange:r,extend:{root:l.root,select:l.select}},void 0)}),void 0)}}const h=(0,n.Z)((()=>({root:{},select:{}})))(u)},98705:(e,t,s)=>{"use strict";s.d(t,{gq:()=>p,UM:()=>b,y4:()=>v,qM:()=>m});var i=s(26196),o=s(1545),n=s(94975),a=s(29127),r=s(53741),l=s(34978),d=s(98430),c=s(72478),u=s(9986),h=s(75368),g=s(41425);const p=(e,t)=>void 0!==e&&void 0!==t&&e>=t.minSize&&e<=t.maxSize&&(0,c.pR)(e,t.stepSize),b=(e,t)=>e?(0,h.L)("Please enter a valid size"):t===g.E.Units?(0,h.L)("Please enter a valid volume"):(0,h.L)("Please enter a valid quantity"),v=e=>e.pipe((0,n.h)((e=>{const t=e.which;return t===u.m.Up||t===u.m.Down})),(0,a.U)((e=>"keyup"===e.type?{kind:"stop"}:{kind:"change",direction:e.which===u.m.Up?1:-1})),(0,r.x)(((e,t)=>e.kind===t.kind&&e.direction===t.direction))),m=(e,t,s,n)=>e.pipe((0,l.w)((e=>{if("change"===e.kind){const o=(0,i.H)(t,s,n).pipe((0,a.U)((()=>e.direction)));return 0!==t?o.pipe((0,d.O)(e.direction)):o}return o.E})))},79965:(e,t,s)=>{"use strict";s.d(t,{C:()=>st});var i=s(85893),o=s(67294),n=s(69880),a=s(4285),r=s(16716),l=s(64573),d=s(10222),c=s(69903),u=s(93557);const h=e=>{const t=(0,o.useContext)(u.B),s=(0,o.useMemo)((()=>t(e)),[t,e]);return(0,c.v)(s)},g=e=>{const{size:t,children:s}=e,o=h(t);return(0,i.jsx)(i.Fragment,{children:s(o)},void 0)};var p=s(81030),b=s(61468),v=s(33535),m=s(3288),j=s(75368),x=s(71383),y=s(87161),S=s(95035),f=s(44798),O=s(82864),C=s(17646),k=s(23046);function I(e,t,s,i){if(void 0===t||void 0===s||void 0===i)return;const o=i.plus(null!=e?e:0);return o.gt(t)&&o.gt(s)}var L=s(75879),w=s.n(L),T=s(70378);const D=w()([C.h,k.q,(0,S.P)().buyMargin(),(0,S.P)().sellMargin(),(0,S.P)().usedMargin()],((e,t,s,i,o)=>{const n=I(o,s,i,t);return{freeMargin:t,buyMargin:s,sellMargin:i,isMarginEnough:n,depositNowButtonDisable:e||n}}))(Object.assign({keySelector:(0,y.q)((0,S.P)().buyMargin(),(0,S.P)().sellMargin(),(0,S.P)().usedMargin())},(0,T.jo)()));var P=s(899),N=s(65185),A=s(60077),B=s(14224),M=s(99938),$=s(57650),E=s(53214);const F=w()([(0,x.$)(O.M).baseAssetId(),(0,x.$)(E.C).assetId()],((e,t)=>({fromAssetId:e,toAssetId:t})))(Object.assign(Object.assign({},(0,T.jo)()),{keySelector:(0,S.P)().symbolId()})),R=(0,B.X)(F,T.mr).chain((e=>(0,M.t)($.e,{fromAssetId:e.fromAssetId,toAssetId:e.toAssetId},T.iN))).build();var W=s(46677),H=s(5570);const z=w()([(0,x.$)(O.M).quoteAssetId(),(0,x.$)(O.M).baseAssetId()],((e,t)=>({fromAssetId:e,toAssetId:t})))(Object.assign(Object.assign({},(0,T.jo)()),{keySelector:(0,S.P)().symbolId()})),J=(0,B.X)(z,T.mr).chain((e=>(0,M.t)($.e,{fromAssetId:e.fromAssetId,toAssetId:e.toAssetId},T.iN))).build();var Q=s(92551),_=s(41680);const q=(0,B.X)((0,Q.a)({usdAssetId:(0,x.$)(_.k).assetId(),baseAssetId:(0,x.$)(O.M).baseAssetId()})(Object.assign(Object.assign({},(0,T.jo)()),{keySelector:(0,S.P)().symbolId()})),T.mr).chain((({usdAssetId:e,baseAssetId:t})=>(0,M.t)($.e,{fromAssetId:e,toAssetId:t},T.iN))).build();var X=s(62084);const V=(0,B.X)((0,Q.a)({minCommissionId:(0,x.$)(X.D).assetId(),baseAssetId:(0,x.$)(O.M).baseAssetId()})(Object.assign(Object.assign({},(0,T.jo)()),{keySelector:(0,S.P)().symbolId()})),T.mr).chain((({minCommissionId:e,baseAssetId:t})=>(0,M.t)($.e,{fromAssetId:e,toAssetId:t},T.iN))).build();var Z=s(51359),U=s(47007);const K=w()([(0,x.$)(U.P).data.dynamicCommission(),(0,x.$)(U.P).tradedVolumes.previous()],((e=[],t)=>{var s;const i=[...e].sort(((e,t)=>t.monthlyVolume-e.monthlyVolume)).find((e=>e.monthlyVolume<t));return 1-(null!==(s=null==i?void 0:i.discount)&&void 0!==s?s:0)}))(Object.assign(Object.assign({},(0,T.jo)()),{keySelector:Z.Rs})),Y=w()([(0,S.P)().size(),O.M,J,K,q,V],((e,t,s,i,o,n)=>{if(void 0===t)return 0;if(void 0!==t.commissionType){const a=(0,H.CV)(e,t.commission,t.commissionType,t.lotSize,o,s);return(0,H.vL)(a,i,t.minCommission,n)}return 0}))(Object.assign({keySelector:(0,y.q)((0,S.P)().size(),(0,S.P)().symbolId())},(0,T.jo)())),G=w()([P.m,(0,x.$)(N.G).bid(),(0,x.$)(N.G).ask(),A.x,R,Y,W.G,(0,S.P)().size()],((e,t,s,i,o,n,a,r)=>{const l=(e,t)=>void 0!==e&&void 0!==t?e*t:void 0,d=l(a,e),c=l(s,r),u=l(t,r);return{tradeValueAsk:c,tradeValueBid:u,tradeValueAskInDeposit:(0,v.R)(l(c,i)),tradeValueBidInDeposit:(0,v.R)(l(u,i)),pipValue:d,pipValueInDeposit:(0,v.R)(l(d,i)),commissionInDeposit:(0,v.R)(l(n,o))}}))(Object.assign({keySelector:(0,y.q)((0,S.P)().symbolId(),(0,S.P)().size())},(0,T.jo)())),ee=w()([z,F,(0,x.$)(O.M).baseAssetId(),(0,x.$)(X.D).assetId(),(0,x.$)(_.k).assetId()],((e,t,s,i,o)=>({quoteToBase:e,baseToDeposit:t,usdToBase:{fromAssetId:o,toAssetId:s},minCommissionToBase:{fromAssetId:i,toAssetId:s}})))(Object.assign(Object.assign({},(0,T.jo)()),{keySelector:(0,S.P)().symbolId()}));var te=s(7485);const se=w()([G,ee,D,(0,x.$)(te.S).depositCurrency(),(0,x.$)(E.C).assetId(),(0,x.$)(f.D).name(),(0,x.$)(O.M).quoteAssetId()],((e,t,s,i,o,n,a)=>({values:e,conversions:t,margins:s,depositCurrency:i,depositAssetId:o,quoteAssetName:n,quoteAssetId:a})))(Object.assign(Object.assign({},(0,T.jo)()),{keySelector:(0,y.q)((0,S.P)().symbolId(),(0,S.P)().size(),(0,S.P)().buyMargin(),(0,S.P)().sellMargin(),(0,S.P)().usedMargin())}));var ie=s(54622),oe=s(25176),ne=s(56364),ae=s(23689),re=s(60196),le=s(94774),de=s(32244),ce=s(68008),ue=s(76042);const he=(0,o.memo)((e=>{const{fromAssetId:t,toAssetId:s}=e;return(0,ue.Z)([{fromAssetId:t,toAssetId:s}]),null}));var ge=s(37187),pe=s(58779),be=s(81176),ve=s(40169),me=s(38562),je=s(51604),xe=s(14441),ye=s(81803),Se=s(39091);const fe=(0,o.createContext)({setForceShow:()=>{}});var Oe=s(54738);const Ce=(0,o.memo)((e=>{const{disabled:t}=e,{setForceShow:s}=(0,o.useContext)(fe),n=(0,ve.I0)(),a=(0,o.useCallback)((()=>{n(ye.h.show({operation:Se.D.Deposit,analyticsOpenFrom:me.mq.SizeSelect})),s(!1)}),[n,s]);return t?null:(0,i.jsx)(xe.b,Object.assign({justifyContent:"flex-end",marginLeft:Oe.W0,marginTop:3},{children:(0,i.jsx)(je.K,Object.assign({onClick:a},{children:(0,j.L)("Deposit Now")}),void 0)}),void 0)}));var ke=s(29480);class Ie extends o.Component{render(){const{styles:e,symbolId:t,disabled:s,tradeSide:o,depositCurrency:n,margins:a,values:r,conversions:l}=this.props,{freeMargin:d,buyMargin:c,sellMargin:u,depositNowButtonDisable:h}=a,{tradeValueAsk:g,tradeValueAskInDeposit:p,tradeValueBid:b,tradeValueBidInDeposit:v}=r,{pipValue:x,pipValueInDeposit:y,commissionInDeposit:S}=r,{quoteToBase:f,baseToDeposit:O,usdToBase:C,minCommissionToBase:k}=l;return(0,i.jsxs)(i.Fragment,{children:[!s&&(0,i.jsxs)(i.Fragment,{children:[f.fromAssetId&&f.toAssetId&&(0,i.jsx)(he,{fromAssetId:f.fromAssetId,toAssetId:f.toAssetId},void 0),C.fromAssetId&&C.toAssetId&&(0,i.jsx)(he,{fromAssetId:C.fromAssetId,toAssetId:C.toAssetId},void 0),k.fromAssetId&&k.toAssetId&&(0,i.jsx)(he,{fromAssetId:k.fromAssetId,toAssetId:k.toAssetId},void 0),O.fromAssetId&&O.toAssetId&&(0,i.jsx)(he,{fromAssetId:O.fromAssetId,toAssetId:O.toAssetId},void 0),(0,i.jsx)(ge.D,{symbolId:t},void 0),(0,i.jsx)(ie.L,{assetName:(0,oe.P)(m.qY)},void 0),(0,i.jsx)(ie.L,{assetName:n},void 0),(0,i.jsx)(ae.i,{symbolId:t},void 0),(0,i.jsx)(re.V,{symbolId:t},void 0),(0,i.jsx)(le.J,{symbolId:t},void 0),(0,i.jsx)(de.a,{symbolId:t},void 0)]},void 0),(0,i.jsxs)("div",Object.assign({className:e.root},{children:[(0,i.jsxs)("div",Object.assign({className:e.left},{children:[(0,i.jsx)("div",Object.assign({className:e.label},{children:`${(0,j.L)("Pip value")}:`}),void 0),(0,i.jsx)("div",Object.assign({className:e.label},{children:`${(0,j.L)("Trade Value (Buy)")}:`}),void 0),(0,i.jsx)("div",Object.assign({className:e.label},{children:`${(0,j.L)("Trade Value (Sell)")}:`}),void 0),(0,i.jsx)("div",{className:e.whiteSpace},void 0),(0,i.jsx)("div",{className:e.delimiter},void 0),(0,i.jsx)("div",Object.assign({className:e.label},{children:`${(0,j.L)("Commission required")}:`}),void 0),(0,i.jsx)("div",{className:e.whiteSpace},void 0),(void 0===o||o===ke.aO.Buy)&&(0,i.jsx)("div",Object.assign({className:e.label},{children:`${(0,j.L)("Margin required (Buy)")}:`}),void 0),(void 0===o||o===ke.aO.Sell)&&(0,i.jsx)("div",Object.assign({className:e.label},{children:`${(0,j.L)("Margin required (Sell)")}:`}),void 0),(0,i.jsx)("div",{className:e.delimiter},void 0),(0,i.jsx)("div",Object.assign({className:e.label},{children:`${(0,j.L)("Margin available")}:`}),void 0)]}),void 0),(0,i.jsxs)("div",Object.assign({className:e.right},{children:[(0,i.jsx)("div",Object.assign({className:e.value},{children:this.formatValue(x,y)}),void 0),(0,i.jsx)("div",Object.assign({className:e.value},{children:this.formatValue(g,p)}),void 0),(0,i.jsx)("div",Object.assign({className:e.value},{children:this.formatValue(b,v)}),void 0),(0,i.jsx)("div",{className:e.whiteSpace},void 0),(0,i.jsx)("div",{className:e.delimiter},void 0),(0,i.jsx)("div",Object.assign({className:e.value},{children:(0,i.jsx)(ce.M,{value:S,prefix:!0},void 0)}),void 0),(0,i.jsx)("div",{className:e.whiteSpace},void 0),(void 0===o||o===ke.aO.Buy)&&(0,i.jsx)("div",Object.assign({className:e.value},{children:(0,i.jsx)(ce.M,{value:c,prefix:!0},void 0)}),void 0),(void 0===o||o===ke.aO.Sell)&&(0,i.jsx)("div",Object.assign({className:e.value},{children:(0,i.jsx)(ce.M,{value:u,prefix:!0},void 0)}),void 0),(0,i.jsx)("div",{className:e.delimiter},void 0),(0,i.jsxs)("div",Object.assign({className:e.enoughValue},{children:[(0,i.jsx)("div",Object.assign({className:e.enough},{children:(0,i.jsx)(ce.M,{value:d,prefix:!0},void 0)}),void 0),Boolean(c&&u)&&(0,i.jsx)(Ce,{disabled:h},void 0)]}),void 0)]}),void 0)]}),void 0)]},void 0)}formatValue(e,t){const{depositAssetId:s,quoteAssetName:o,quoteAssetId:n}=this.props;return n===s?(0,i.jsx)(ce.M,{value:(0,v.R)(e),prefix:!0},void 0):(0,i.jsx)(ne.F,Object.assign({value:(0,v.R)(e),assetName:o,prefix:!0},{children:({formattedValue:e})=>(0,i.jsx)(ce.M,Object.assign({value:t,prefix:!0},{children:({formattedValue:t})=>`${e} (${t})`}),void 0)}),void 0)}}const Le=(0,n.$)(se)((0,a.Z)((e=>{const{tooltip:t,foregroundColor:s}=e.theme.palette.semantic;return{root:{display:"flex",flexDirection:"row",justifyContent:"space-between"},left:Object.assign(Object.assign({},(0,pe.f)(1)),{display:"flex",flexDirection:"column"}),right:Object.assign(Object.assign({},(0,pe.f)(1)),{display:"flex",flexDirection:"column"}),delimiter:Object.assign({height:1},(0,be.O)({color:t.tableBorderColor})),whiteSpace:{height:3},label:{paddingLeft:3,paddingRight:3,whiteSpace:"nowrap"},value:{paddingLeft:3,paddingRight:3,whiteSpace:"nowrap"},enoughValue:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start",paddingLeft:3,paddingRight:3,whiteSpace:"nowrap"},enough:{color:e.margins.isMarginEnough?s.positive:s.negative}}}))(Ie));class we extends o.PureComponent{constructor(){super(...arguments),this.renderElement=()=>()=>{const{symbolId:e,size:t,tradeSide:s,expectedMargin:o,usedMargin:n,disabled:a}=this.props;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(p.K,{symbolId:e,sizes:[t]},void 0),(0,i.jsx)(Le,{symbolId:e,size:t,sellMargin:o.sellMargin,buyMargin:o.buyMargin,usedMargin:n,tradeSide:s,disabled:a},void 0)]},void 0)}}render(){const{disabled:e,offsetX:t,children:s}=this.props;return e?s:(0,i.jsxs)(b.B,Object.assign({placement:"left-start",offsetX:t,offsetY:0,extend:{root:{flexShrink:1}}},{children:[s,this.renderElement()]}),void 0)}}const Te=we;var De=s(98705),Pe=s(75469),Ne=s(18650);const Ae=w()([(0,x.$)(O.M).stepSize(),(0,x.$)(O.M).minSize(),(0,x.$)(O.M).maxSize(),Pe.L,(0,x.$)(O.M).lotSize(),Ne.A],((e,t,s,i,o,n)=>({stepSize:e,minSize:t,maxSize:s,sizeList:i,lotSize:o,tradingUnit:n})))(Object.assign(Object.assign({},(0,T.jo)()),{keySelector:(0,S.P)().symbolId()}));var Be=s(65201),Me=s(3168),$e=s(50137);const Ee=(0,Q.a)({sizeList:Pe.L})(Object.assign(Object.assign({},(0,T.jo)()),{keySelector:(0,S.P)().symbolId()}));var Fe=s(71005),Re=s(27416);const We=(0,Q.a)({freeMargin:k.q})(Object.assign(Object.assign({},(0,T.jo)()),{keySelector:Z.Rs}));var He=s(42983);const ze=()=>({root:{flexGrow:1}}),Je=(0,o.memo)((e=>{const{symbolId:t,selected:s,value:n,usedMargin:a,tradeSide:r,onSelect:l}=e,{freeMargin:d}=(0,c.v)(We),u=h(n),{buyMargin:g,sellMargin:p}=u,b=I(a,g,p,d),v=(0,o.useCallback)((()=>{l(n)}),[l,n]),{rules:m}=(0,He.X)(ze,{});return(0,i.jsx)(Te,Object.assign({symbolId:t,size:n,expectedMargin:u,usedMargin:a,tradeSide:r,offsetX:5},{children:(0,i.jsx)(Fe.$,Object.assign({value:n,selected:s,readonly:!b,onSelect:v,extend:{root:m.root}},{children:(0,i.jsx)(Re.$,{symbolId:t,volumeOrStake:n},void 0)}),void 0)}),void 0)}));var Qe=s(81996),_e=s(61443);class qe extends o.Component{constructor(){super(...arguments),this.onScrollSizeUpdated=()=>{this.forceUpdate()},this.renderOption=e=>{const{symbolId:t,size:s,usedMargin:o,tradeSide:n,onChange:a}=this.props,r=s===e,l=`sizeSelectOptionKey_${e}`;return(0,i.jsx)(Je,{value:e,selected:r,symbolId:t,usedMargin:o,tradeSide:n,onSelect:a},l)}}render(){const{sizeList:e}=this.props;return(0,i.jsx)(_e.X,Object.assign({autoHeight:!0,autoHeightMax:180,onSizeUpdated:this.onScrollSizeUpdated,extend:{root:(0,Qe.o)(0),content:(0,Qe.o)(0)}},{children:e.map(this.renderOption)}),void 0)}}const Xe=(0,n.$)(Ee)(qe);var Ve=s(87536),Ze=s(15720),Ue=s(14953),Ke=s(53621),Ye=s(41425),Ge=s(93302),et=s(55629);class tt extends o.Component{constructor(){super(...arguments),this.state={open:!1,highlight:void 0},this.actionSubject=this.createActionSubject(),this.keyControlSubject=this.createKeyControlSubject(),this.renderPlaceholderFactory=()=>()=>{const{disabled:e,styles:t}=this.props;return(0,i.jsxs)("div",Object.assign({className:t.placeholderRoot},{children:[(0,i.jsxs)("div",Object.assign({className:t.controls,onClick:this.onControlsSectionClick},{children:[(0,i.jsx)("div",Object.assign({className:t.increase,onMouseDown:e?void 0:this.mouseDownIncreaseHandler,onMouseUp:this.raiseStop,onMouseLeave:this.raiseStop},{children:(0,i.jsx)("div",{className:t.increaseArrow},void 0)}),void 0),(0,i.jsx)("div",Object.assign({className:t.decrease,onMouseDown:e?void 0:this.mouseDownDecreaseHandler,onMouseUp:this.raiseStop,onMouseLeave:this.raiseStop},{children:(0,i.jsx)("div",{className:t.decreaseArrow},void 0)}),void 0)]}),void 0),this.sizeSelectTooltipRender()]}),void 0)},this.sizeSelectTooltipRender=()=>{const{symbolId:e,volumeOrStake:t}=this.props;return void 0===e?null:(0,i.jsx)(g,Object.assign({size:t},{children:this.renderExpectedMarginTooltipFactory()}),void 0)},this.renderExpectedMarginTooltipFactory=()=>e=>{const{symbolId:t,disabled:s,volumeOrStake:o,tradeSide:n,usedMargin:a}=this.props;return(0,i.jsx)(Te,Object.assign({symbolId:t,size:o,disabled:s,expectedMargin:e,tradeSide:n,usedMargin:a,offsetX:20},{children:this.renderPlaceholderInput()}),void 0)},this.renderPlaceholderInput=()=>{const{symbolId:e,volumeOrStake:t,disabled:s,maxSize:o,rules:n}=this.props,{highlight:a}=this.state,r=t%1e3==0,l=void 0!==o?new Ge.Big(o).toFixed(0).length:void 0;return(0,i.jsx)(Ve.Oj,Object.assign({onWheel:this.onWheel},{children:(0,i.jsx)("div",{children:(0,i.jsx)(Re.$,Object.assign({symbolId:e,volumeOrStake:t,average:r,averageTotalLength:l},{children:(e,t)=>(0,i.jsx)(Ze.I,{value:void 0!==a?a:t,disabled:s,onChange:this.onChangeInput,onBlur:this.onBlurInput,extend:{root:n.inputRoot(this.props)}},void 0)}),void 0)},void 0)}),void 0)},this.onControlsSectionClick=e=>{e.stopPropagation()},this.onSelect=e=>{const{onChange:t,volumeOrStake:s}=this.props;this.setState({highlight:void 0}),s!==e&&t&&t(e)},this.onOptionSelect=e=>{this.onSelect(e),this.setState({open:!1})},this.onChangeInput=e=>{const{stepSize:t,maxSize:s,minSize:i}=this.props,o=this.convertToVolumeOrStake(e);(0,De.gq)(o,{stepSize:t,maxSize:s,minSize:i})&&this.onSelect(o),this.setState({highlight:e})},this.convertToVolumeOrStake=e=>{const{tradingUnit:t,lotSize:s,stepSize:i}=this.props,o=function(e){var t,s,i;const o=e.replace(/\s/g,""),n=new RegExp("^([0-9]+)?[.,]?([0-9]+)?(k|m|b|t)?$","i").exec(o);if(null===n)return 0;const a=null!==(t=n[1])&&void 0!==t?t:0,r=null!==(s=n[2])&&void 0!==s?s:0,l=parseFloat(`${a}.${r}`),c=(null!==(i=n[3])&&void 0!==i?i:"").toLowerCase();return(0,d.hS)(`${l}${c}`)}(e);let n;return t===Ye.E.Units||t===Ye.E.Stakes?n=o:t!==Ye.E.Lots&&t!==Ye.E.FakeStakes||(n=(0,l.FH)(o*s,(0,d.Lc)(i))),n},this.onBlurInput=()=>{this.setState({highlight:void 0})},this.onWheel=e=>{const{disabled:t}=this.props;t||(e.deltaY<0?this.onStep(1):e.deltaY>0&&this.onStep(-1),e.stopPropagation(),e.preventDefault())},this.setForceShow=e=>{this.setState({open:e})},this.onOpen=()=>{this.setState({open:!0})},this.onClose=()=>{this.setState({open:!1})},this.keyEventsHandler=e=>{const{disabled:t}=this.props;e.which!==et.s.UpArrow&&e.which!==et.s.DownArrow||e.preventDefault(),t||this.keyControlSubject.next(e)},this.raiseStop=()=>{this.actionSubject.next({kind:"stop"})},this.mouseDownIncreaseHandler=()=>{this.raiseChange(1)},this.mouseDownDecreaseHandler=()=>{this.raiseChange(-1)}}componentWillUnmount(){this.raiseStop(),this.actionSubject.complete(),this.keyControlSubject.complete()}render(){const{symbolId:e,disabled:t,sizeList:s,usedMargin:o,tradeSide:n,rules:a,styles:r}=this.props,{open:l,highlight:d}=this.state;let{volumeOrStake:c}=this.props;return void 0!==d&&(c=this.convertToVolumeOrStake(d)),(0,i.jsxs)(fe.Provider,Object.assign({value:{setForceShow:this.setForceShow}},{children:[(0,i.jsx)(ae.i,{symbolId:e},void 0),l&&(0,i.jsx)(p.K,{symbolId:e,sizes:s},void 0),(0,i.jsx)(Ke.v,{},void 0),(0,i.jsx)("div",Object.assign({className:r.root,onKeyDown:this.keyEventsHandler,onKeyUp:this.keyEventsHandler},{children:(0,i.jsx)(Ue.P,Object.assign({value:d,renderPlaceholder:this.renderPlaceholderFactory(),disabled:t,open:l,onChange:this.onOptionSelect,onOpen:this.onOpen,onClose:this.onClose,testId:"size-select",extend:{root:a.select(this.props),placeholderContent:a.selectPlaceholderContent(this.props)}},{children:(0,i.jsx)(Xe,{symbolId:e,size:c,usedMargin:o,tradeSide:n},void 0)}),void 0)}),void 0)]}),void 0)}createActionSubject(){const{timerDelay:e,timerSpeed:t}=this.props,s=new r.x;return(0,De.qM)(s,e,t).subscribe((e=>{this.onStep(e)})),s}createKeyControlSubject(){const e=new r.x;return(0,De.y4)(e).subscribe((e=>{this.actionSubject.next(e)})),e}onStep(e){const{volumeOrStake:t,onChange:s,stepSize:i,minSize:o,maxSize:n}=this.props,a=(0,l.FH)(t+i*e,(0,d.Lc)(i));a>=o&&a<=n&&s(a),this.setState({highlight:void 0})}raiseChange(e){this.actionSubject.next({kind:"change",direction:e})}}tt.defaultProps={timerDelay:300,timerSpeed:16};const st=(0,n.$)(Ae)((0,a.Z)((e=>{const{theme:t,disabled:s}=e,{foregroundColor:i}=t.palette.semantic,o={position:"absolute",right:2},n=s?i.muted2:i.tertiary,a=e=>s?{}:{":hover > div":{[e]:i.primary2}},r={width:10,height:8};return{root:Object.assign({display:"flex"},(0,Be.E)(Oe.q0)),controls:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",flexShrink:0,flexBasis:14,left:1,marginRight:4},increase:Object.assign(Object.assign(Object.assign({},r),a("borderBottomColor")),{marginBottom:1}),decrease:Object.assign(Object.assign(Object.assign({},r),a("borderTopColor")),{marginTop:1}),increaseArrow:Object.assign(Object.assign(Object.assign({},o),(0,Me.sP)(8,4,$e.n4.UP,n)),{bottom:"50%",marginBottom:2}),decreaseArrow:Object.assign(Object.assign(Object.assign({},o),(0,Me.sP)(8,4,$e.n4.DOWN,n)),{top:"50%",marginTop:2}),select:{paddingLeft:0},selectPlaceholderContent:{display:"flex"},placeholderRoot:{flexGrow:1,display:"flex"},inputRoot:Object.assign(Object.assign({},(0,be.O)({color:"transparent"})),{nested:{":hover":Object.assign({},(0,be.O)({color:"transparent"}))}})}}))(tt))},78112:(e,t,s)=>{"use strict";s.d(t,{E:()=>Ee});var i=s(85893),o=s(75368),n=s(67294),a=s(69880),r=s(70378),l=s(71383),d=s(87161),c=s(95035),u=s(75879),h=s.n(u),g=s(82864);const p=h()([(0,l.$)(g.M).name(),(0,l.$)(g.M).description(),(0,l.$)(g.M).leverageId()],((e,t,s)=>({symbolName:e,description:t,leverageId:s})))(Object.assign(Object.assign({},(0,r.jo)()),{keySelector:(0,d.q)((0,c.P)().symbolId())}));var b=s(54738),v=s(3288),m=s(54622),j=s(25176),x=s(23689),y=s(60196),S=s(94774),f=s(32244),O=s(52926),C=s(77187),k=s(33933),I=s(42151),L=s(76199),w=s(65367),T=s(14441),D=s(11676),P=s(44798),N=s(11557),A=s(899),B=s(8166),M=s(35625);const $=h()([(0,l.$)(B.H).data.isLcg(),M.C,(0,l.$)(D.$).displayName(),(0,l.$)(P.D).displayName(),N.c,A.m,(0,l.$)(g.M).pipPosition()],((e,t,s,i,o,n,a)=>({isLcg:e,isSpreadBettingLike:t,baseAssetName:s,quoteAssetName:i,tickSize:o,priceStep:n,pipPosition:a})))(Object.assign(Object.assign({},(0,r.jo)()),{keySelector:(0,c.P)().symbolId()}));class E extends n.Component{render(){const{isLcg:e,isSpreadBettingLike:t,baseAssetName:s,quoteAssetName:n,tickSize:a,priceStep:r,pipPosition:l}=this.props;return(0,i.jsxs)(i.Fragment,{children:[e&&!t&&(0,i.jsxs)(k.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-start"},{children:(0,o.L)("Quote Asset")}),void 0),(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-end"},{children:null!=n?n:v.kZ}),void 0)]}),void 0),e&&(0,i.jsxs)(k.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-start"},{children:(0,o.L)("Minimum Price Increment")}),void 0),(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-end"},{children:null!=a?a:v.kZ}),void 0)]}),void 0),e&&t&&(0,i.jsxs)(k.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-start"},{children:(0,o.L)("Unit Risk")}),void 0),(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-end"},{children:null!=r?r:v.kZ}),void 0)]}),void 0),!e&&(0,i.jsxs)(k.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-start"},{children:(0,o.L)("Base Asset")}),void 0),(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-end"},{children:null!=s?s:v.kZ}),void 0)]}),void 0),!e&&(0,i.jsxs)(k.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-start"},{children:(0,o.L)("Quote Asset")}),void 0),(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-end"},{children:null!=n?n:v.kZ}),void 0)]}),void 0),!e&&(0,i.jsxs)(k.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-start"},{children:e?(0,o.L)("Minimum Price Increment"):(0,o.L)("Minimum Change")}),void 0),(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-end"},{children:null!=a?a:v.kZ}),void 0)]}),void 0),e&&!t&&(0,i.jsxs)(k.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-start"},{children:(0,o.L)("Unit Risk")}),void 0),(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-end"},{children:null!=r?r:v.kZ}),void 0)]}),void 0),!e&&(0,i.jsxs)(k.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-start"},{children:(0,o.L)("Pip Position")}),void 0),(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-end"},{children:null!=l?l:v.kZ}),void 0)]}),void 0)]},void 0)}}const F=(0,a.$)($)(E);var R=s(80362),W=s(27332),H=s(39753),z=s(18650);const J=h()([(0,l.$)(B.H).data.isLcg(),M.C,(0,l.$)(g.M).minSize(),(0,l.$)(g.M).maxSize(),(0,l.$)(g.M).lotSize(),(0,l.$)(g.M).stepSize(),(0,l.$)(g.M).measurementUnits(),(0,l.$)(W.j).title(),(0,l.$)(W.j).description(),H.T,z.A],((e,t,s,i,o,n,a,r,l,d,c)=>({isLcg:e,isSpreadBettingLike:t,minSize:s,maxSize:i,lotSize:o,stepSize:n,measurementUnits:a,commissionTitle:r,commissionDescription:l,minCommission:d,currentTradingUnit:c})))(Object.assign(Object.assign({},(0,r.jo)()),{keySelector:(0,c.P)().symbolId()}));var Q=s(27416),_=s(41425);class q extends n.Component{render(){const{symbolId:e,isLcg:t,isSpreadBettingLike:s,minSize:n,maxSize:a,lotSize:r,stepSize:l,measurementUnits:d,commissionTitle:c,commissionDescription:u,minCommission:h,currentTradingUnit:g}=this.props,p=` (${u})`;return(0,i.jsxs)(i.Fragment,{children:[t&&s&&(0,i.jsxs)(k.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-start"},{children:(0,o.L)("Minimum Trade Size")}),void 0),(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-end"},{children:(0,i.jsx)(Q.$,{symbolId:e,volumeOrStake:n},void 0)}),void 0)]}),void 0),!s&&(0,i.jsxs)(k.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-start"},{children:(0,o.L)("Lot Size")}),void 0),(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-end"},{children:(0,R.fP)(l,d)(r)}),void 0)]}),void 0),t&&!s&&(0,i.jsxs)(k.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-start"},{children:(0,o.L)("Minimum Trade Size")}),void 0),(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-end"},{children:(0,i.jsx)(Q.$,{symbolId:e,volumeOrStake:n},void 0)}),void 0)]}),void 0),!t&&(0,i.jsxs)(k.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-start"},{children:`${(0,o.L)("Commission")} ${p}`}),void 0),(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-end"},{children:null!=c?c:v.kZ}),void 0)]}),void 0),!t&&h&&(0,i.jsxs)(k.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-start"},{children:(0,o.L)("Minimum Commission")}),void 0),(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-end"},{children:h}),void 0)]}),void 0),!t&&!s&&(0,i.jsxs)(k.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-start"},{children:g===_.E.Units?(0,o.L)("Minimum Trade Volume"):(0,o.L)("Minimum Trade Quantity")}),void 0),(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-end"},{children:(0,i.jsx)(Q.$,{symbolId:e,volumeOrStake:n},void 0)}),void 0)]}),void 0),!t&&!s&&(0,i.jsxs)(k.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-start"},{children:g===_.E.Units?(0,o.L)("Maximum Trade Volume"):(0,o.L)("Maximum Trade Quantity")}),void 0),(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-end"},{children:(0,i.jsx)(Q.$,{symbolId:e,volumeOrStake:a},void 0)}),void 0)]}),void 0)]},void 0)}}const X=(0,a.$)(J)(q);var V=s(83617);const Z=h()([(0,l.$)(g.M).distanceSetIn(),(0,l.$)(g.M).tpDistance(),(0,l.$)(g.M).slDistance(),V.f,(0,l.$)(g.M).gslCharge(),(0,l.$)(g.M).pipPosition(),(0,l.$)(g.M).digits()],((e,t,s,i,o,n,a)=>({distanceType:e,tpDistance:t,slDistance:s,gslDistance:i,gslCharge:o,pipPosition:n,digits:a})))(Object.assign(Object.assign({},(0,r.jo)()),{keySelector:(0,c.P)().symbolId()}));var U=s(74139),K=s(29380),Y=s(32694),G=s(2803),ee=s(8519);class te extends n.Component{render(){const{distanceType:e,slDistance:t,tpDistance:s,gslDistance:n,gslCharge:a,pipPosition:r,digits:l}=this.props;if(e===U.Vg.IN_PERCENTAGE)return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(k.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-start"},{children:(0,o.L)("Stop Loss Distance")}),void 0),(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-end"},{children:(0,G.T)()((0,K.$)(t))}),void 0)]}),void 0),(0,i.jsxs)(k.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-start"},{children:(0,o.L)("Take Profit Distance")}),void 0),(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-end"},{children:(0,G.T)()((0,K.$)(s))}),void 0)]}),void 0),(0,i.jsxs)(k.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-start"},{children:(0,o.L)("Guaranteed Stop Loss Distance")}),void 0),(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-end"},{children:(0,G.T)()((0,K.$)(n))}),void 0)]}),void 0),(0,i.jsxs)(k.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-start"},{children:(0,o.L)("Guaranteed Charge")}),void 0),(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-end"},{children:(0,G.T)()((0,K.$)(a))}),void 0)]}),void 0)]},void 0);const d=(0,Y.Rv)((0,Y.IU)(t,l),r),c=(0,Y.Rv)((0,Y.IU)(s,l),r),u=(0,Y.Rv)((0,Y.IU)(n,l),r),h=(0,Y.Rv)((0,Y.IU)(a,l),r);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(k.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-start"},{children:(0,o.L)("Min Stop Loss Distance (pips)")}),void 0),(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-end"},{children:(0,ee.AP)(r,l)(d)}),void 0)]}),void 0),(0,i.jsxs)(k.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-start"},{children:(0,o.L)("Min Take Profit Distance (pips)")}),void 0),(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-end"},{children:(0,ee.AP)(r,l)(c)}),void 0)]}),void 0),(0,i.jsxs)(k.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-start"},{children:(0,o.L)("Min Guaranteed Stop Loss Distance (pips)")}),void 0),(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-end"},{children:(0,ee.AP)(r,l)(u)}),void 0)]}),void 0),(0,i.jsxs)(k.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-start"},{children:(0,o.L)("Guaranteed Charge")}),void 0),(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-end"},{children:(0,ee.AP)(r,l)(h)}),void 0)]}),void 0)]},void 0)}}const se=(0,a.$)(Z)(te);var ie=s(19558),oe=s(21962),ne=s(7485);const ae=h()([(0,l.$)(ne.S).swapFree(),(0,l.$)(g.M).rolloverCommission(),(0,l.$)(g.M).rolloverCommission3Days(),(0,l.$)(g.M).skipRolloverDays(),(0,l.$)(g.M).swapCalculationType(),(0,l.$)(g.M).swapLong(),(0,l.$)(g.M).swapShort(),(0,l.$)(g.M).swapRollover3Days()],((e,t,s,i,o,n,a,r)=>({isSwapFree:e,rolloverCommission:t,rolloverCommission3Days:s,skipRolloverDays:i,swapCalculationType:o,swapLong:n,swapShort:a,swapRollover3Days:r})))(Object.assign(Object.assign({},(0,r.jo)()),{keySelector:(0,c.P)().symbolId()}));var re=s(57776),le=s(37589);class de extends n.Component{render(){const{isSwapFree:e,rolloverCommission:t,skipRolloverDays:s,rolloverCommission3Days:n,swapCalculationType:a,swapLong:r,swapShort:l,swapRollover3Days:d}=this.props;if(e)return n?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(k.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-start"},{children:(0,o.L)("Administrative Charge")}),void 0),(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-end"},{children:(0,ie.c)()(t)}),void 0)]}),void 0),(0,i.jsxs)(k.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-start"},{children:(0,o.L)("Grace Period (Days)")}),void 0),(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-end"},{children:null!=s?s:v.kZ}),void 0)]}),void 0),(0,i.jsxs)(k.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-start"},{children:(0,o.L)("3-Days Administrative Charge")}),void 0),(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-end"},{children:(0,le.y)(n)}),void 0)]}),void 0)]},void 0):null;const c=a===U.w2.Pips?`(${(0,o.L)("Pips")})`:"(%)";return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(k.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsxs)(T.b,Object.assign({justifyContent:"flex-start"},{children:[`${(0,o.L)("Swap Long")} ${c}`,(0,i.jsx)(oe.q,{},void 0),(0,i.jsx)(re.n,{children:a===U.w2.Pips?(0,o.L)("Swaps in Pips: Added as an amount in quote currency per 1 unit of volume."):(0,o.L)("Swaps as a Percentage: Calculated daily as an amount in quote currency using SWAP(%)/100/365 * Volume as a formula.")},void 0)]}),void 0),(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-end"},{children:null!=r?r:v.kZ}),void 0)]}),void 0),(0,i.jsxs)(k.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsxs)(T.b,Object.assign({justifyContent:"flex-start"},{children:[`${(0,o.L)("Swap Short")} ${c}`,(0,i.jsx)(oe.q,{},void 0),(0,i.jsx)(re.n,{children:a===U.w2.Pips?(0,o.L)("Swaps in Pips: Added as an amount in quote currency per 1 unit of volume."):(0,o.L)("Swaps as a Percentage: Calculated daily as an amount in quote currency using SWAP(%)/100/365 * Volume as a formula.")},void 0)]}),void 0),(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-end"},{children:null!=l?l:v.kZ}),void 0)]}),void 0),(0,i.jsxs)(k.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-start"},{children:(0,o.L)("3-Days Swaps")}),void 0),(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-end"},{children:(0,le.y)(d)}),void 0)]}),void 0)]},void 0)}}const ce=(0,a.$)(ae)(de);var ue=s(63536),he=s(66442),ge=s(34277),pe=s(29480);const be=(0,ue.J)(he.C,(e=>({symbolId:e.symbolId,tradeSide:pe.aO.Buy}))),ve=(0,ue.J)(he.C,(e=>({symbolId:e.symbolId,tradeSide:pe.aO.Sell}))),me=(0,ue.J)(ge.g,(e=>({symbolId:e.symbolId,tradeSide:pe.aO.Buy}))),je=(0,ue.J)(ge.g,(e=>({symbolId:e.symbolId,tradeSide:pe.aO.Sell}))),xe=h()([be,me,ve,je],((e,t,s,i)=>({positionCountForBuy:e,positionSizeForBuy:t,positionCountForSell:s,positionSizeForSell:i})))(Object.assign(Object.assign({},(0,r.jo)()),{keySelector:(0,c.P)().symbolId()}));class ye extends n.Component{render(){const{symbolId:e,positionCountForBuy:t,positionSizeForBuy:s,positionCountForSell:n,positionSizeForSell:a}=this.props;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(k.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-start"},{children:(0,o.L)("Buy Positions")}),void 0),(0,i.jsxs)(T.b,Object.assign({justifyContent:"flex-end"},{children:[t,(0,i.jsx)(oe.q,{},void 0),"(",(0,i.jsx)(Q.$,{symbolId:e,volumeOrStake:s},void 0),")"]}),void 0)]}),void 0),(0,i.jsxs)(k.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-start"},{children:(0,o.L)("Sell Positions")}),void 0),(0,i.jsxs)(T.b,Object.assign({justifyContent:"flex-end"},{children:[n,(0,i.jsx)(oe.q,{},void 0),"(",(0,i.jsx)(Q.$,{symbolId:e,volumeOrStake:a},void 0),")"]}),void 0)]}),void 0)]},void 0)}}const Se=(0,a.$)(xe)(ye);var fe=s(29035);const Oe=h()([(0,l.$)(B.H).data.isLcg(),(0,l.$)(fe.N).tiers([])],((e,t)=>({isLcg:e,tierList:t})))(Object.assign(Object.assign({},(0,r.jo)()),{keySelector:(0,c.P)().symbolId()}));var Ce=s(65497);class ke extends n.Component{render(){const{symbolId:e,tierList:t}=this.props;return 0===t.length?null:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(w.I,{},void 0),(0,i.jsx)(k.X,{children:(0,i.jsx)(I.X,{children:`${(0,o.L)("Leverage")} (${(0,o.L)("Volume USD / Leverage")})`},void 0)},void 0),(0,i.jsx)(L.z,Object.assign({paddingTop:b.W0,paddingBottom:b.W0,paddingLeft:b.W0,paddingRight:b.W0},{children:(0,i.jsx)(Ce.E,{symbolId:e},void 0)}),void 0)]},void 0)}}const Ie=(0,a.$)(Oe)(ke);var Le=s(28746),we=s(98773),Te=s(88354);const De=h()([we.c,Te.C],((e,t)=>({scheduleList:e,timeOffset:t})))(Object.assign(Object.assign({},(0,r.jo)()),{keySelector:(0,c.P)().symbolId()}));var Pe=s(30381),Ne=s.n(Pe),Ae=s(86731);class Be extends n.Component{render(){const{scheduleList:e,timeOffset:t}=this.props;return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(k.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-start"},{children:(0,o.L)("Market Hours")}),void 0),(0,i.jsx)(Le.s,Object.assign({alignItems:"flex-end"},{children:e.map(((e,s)=>{const o=Ne()(e.startDate).utcOffset(t),n=Ne()(e.endDate).utcOffset(t);return(0,i.jsxs)(k.X,Object.assign({minWidth:"100%"},{children:[(0,i.jsx)(T.b,Object.assign({flexBasis:"70px",justifyContent:"center"},{children:`${(0,Ae.$)(o.day())} ${o.format("HH:mm")}`}),void 0),(0,i.jsx)(T.b,Object.assign({justifyContent:"center"},{children:" — "}),void 0),(0,i.jsx)(T.b,Object.assign({flexBasis:"70px",justifyContent:"center"},{children:`${(0,Ae.$)(n.day())} ${n.format("HH:mm")}`}),void 0)]}),s)}))}),void 0)]}),void 0)},void 0)}}const Me=(0,a.$)(De)(Be);class $e extends n.Component{render(){const{symbolName:e,description:t,symbolId:s,showScheduler:n,showLeverage:a,leverageId:r}=this.props;return(0,i.jsxs)(i.Fragment,{children:[a&&(0,i.jsx)(C.i,{leverageId:r},void 0),(0,i.jsx)(m.L,{assetName:(0,j.P)(v.qY)},void 0),(0,i.jsx)(x.i,{symbolId:s},void 0),(0,i.jsx)(y.V,{symbolId:s},void 0),(0,i.jsx)(S.J,{symbolId:s},void 0),(0,i.jsx)(f.a,{symbolId:s},void 0),(0,i.jsx)(O.h,{symbolId:s},void 0),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(k.X,{children:(0,i.jsx)(I.X,{children:e},void 0)},void 0),t&&(0,i.jsx)(k.X,{children:t},void 0),(0,i.jsx)(L.z,Object.assign({paddingTop:b.W0,paddingBottom:b.W0,paddingLeft:b.W0,paddingRight:b.W0},{children:(0,i.jsx)(F,{symbolId:s},void 0)}),void 0),(0,i.jsx)(w.I,{},void 0),(0,i.jsx)(L.z,Object.assign({paddingTop:b.W0,paddingBottom:b.W0,paddingLeft:b.W0,paddingRight:b.W0},{children:(0,i.jsx)(X,{symbolId:s},void 0)}),void 0),(0,i.jsx)(w.I,{},void 0),(0,i.jsx)(L.z,Object.assign({paddingTop:b.W0,paddingBottom:b.W0,paddingLeft:b.W0,paddingRight:b.W0},{children:(0,i.jsx)(se,{symbolId:s},void 0)}),void 0),(0,i.jsx)(w.I,{},void 0),n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(L.z,Object.assign({paddingTop:b.W0,paddingBottom:b.W0,paddingLeft:b.W0,paddingRight:b.W0},{children:(0,i.jsx)(Me,{symbolId:s},void 0)}),void 0),(0,i.jsx)(w.I,{},void 0)]},void 0),(0,i.jsx)(L.z,Object.assign({paddingTop:b.W0,paddingBottom:b.W0,paddingLeft:b.W0,paddingRight:b.W0},{children:(0,i.jsx)(ce,{symbolId:s},void 0)}),void 0),(0,i.jsx)(w.I,{},void 0),(0,i.jsx)(L.z,Object.assign({paddingTop:b.W0,paddingBottom:b.W0,paddingLeft:b.W0,paddingRight:b.W0},{children:(0,i.jsx)(Se,{symbolId:s},void 0)}),void 0),(0,i.jsx)(w.I,{},void 0),(0,i.jsx)(L.z,Object.assign({paddingTop:b.W0,paddingBottom:b.W0,paddingLeft:b.W0,paddingRight:b.W0},{children:(0,i.jsxs)(k.X,Object.assign({justifyContent:"space-between"},{children:[(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-start"},{children:(0,o.L)("FIX Symbol ID")}),void 0),(0,i.jsx)(T.b,Object.assign({justifyContent:"flex-end"},{children:s}),void 0)]}),void 0)}),void 0),a&&(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(Ie,{symbolId:s},void 0)},void 0)]},void 0)]},void 0)}}const Ee=(0,a.$)(p)($e)},6538:(e,t,s)=>{"use strict";s.d(t,{k:()=>m});var i=s(85893),o=s(43641),n=s(35394),a=s(67294),r=s(54738),l=s(76309),d=s(13518),c=s(81176),u=s(41296),h=s(65201);const g={display:"block",position:"absolute",height:l.E8,right:0,left:0,content:'""'};var p=s(4285),b=s(12292);class v extends a.Component{constructor(){super(...arguments),this.onClick=e=>{const{symbolName:t,onClick:s}=this.props;e.stopPropagation(),s(t)}}render(){const{symbolName:e,styles:t}=this.props;return(0,i.jsx)("div",Object.assign({className:t.root,onClick:this.onClick},{children:(0,i.jsxs)("div",Object.assign({className:t.item},{children:[this.renderStar(),(0,i.jsx)(b.a,{children:e},void 0)]}),void 0)}),void 0)}renderStar(){const{selected:e,withStar:t,styles:s,rules:a}=this.props;return t?e?(0,i.jsx)(o.h,{iconSource:n.Y.starFilled,extend:{root:a.star(this.props)}},void 0):(0,i.jsx)("div",Object.assign({className:s.starWrapper},{children:(0,i.jsx)(o.h,{iconSource:n.Y.starOutline,extend:{root:a.star(this.props)}},void 0)}),void 0):null}}v.defaultProps={level:0,withStar:!1};const m=(0,p.Z)((e=>{const{level:t,isLast:s,withStar:i}=e,{backgroundColor:o}=e.theme.palette.semantic,n=(0,d.p)("symbolItem"),a=(0,d.p)("starWrapper");return{root:Object.assign(Object.assign({display:"flex",alignItems:"center",flexShrink:0},(0,c.O)({color:o.menuNormal})),{marginLeft:i?Math.max(0,t-1)*l.mK:t*l.mK,height:l.Pj,paddingBottom:r.W0,nested:Object.assign(Object.assign({[`:hover .${n}`]:Object.assign(Object.assign({},(0,c.O)({color:o.primaryHover})),{nested:{":before":Object.assign(Object.assign(Object.assign({},g),{top:-3}),(0,c.O)({color:o.menuNormal}))}})},s?{}:{[`:not(:hover) .${n}`]:{nested:{":after":Object.assign(Object.assign(Object.assign({},g),{bottom:-3}),(0,c.O)({color:o.strokeNormal}))}}}),{[`:hover .${a}`]:{visibility:"visible"}})}),item:(0,u.g)(n,(()=>Object.assign({flexGrow:1,display:"flex",position:"relative",alignItems:"center",height:l.EH,paddingLeft:r.W0,paddingRight:r.W0,width:"100%"},(0,h.E)(r.q0)))),star:Object.assign(Object.assign({paddingRight:r.W0},(0,c.O)({color:"transparent"})),{nested:{":hover":Object.assign({},(0,c.O)({color:"transparent"}))}}),starWrapper:(0,u.g)(a,(()=>({display:"flex",visibility:"hidden"})))}}))(v)},9330:(e,t,s)=>{"use strict";s.d(t,{u:()=>j});var i=s(85893),o=s(37588),n=s(52464),a=s(67294),r=s(95035),l=s(75879),d=s.n(l),c=s(70378),u=s(66681);const h=d()([u.e],(e=>({itemList:e})))(Object.assign(Object.assign({},(0,c.jo)()),{keySelector:(0,r.P)().viewId()}));var g=s(69880),p=s(6538),b=s(54738),v=s(76309);class m extends a.Component{constructor(){super(...arguments),this.renderRowsFactory=()=>(e,t)=>{const{itemList:s,withStars:o,selectedSymbolIdList:n}=this.props,a=s.slice(e,t),r=[];for(let e=0;e<a.length;e++){const t=a[e],s=!!n&&n.some((e=>e===t.symbolId));r.push((0,i.jsx)(p.k,{symbolName:t.symbolName,selected:s,withStar:o,isLast:t.isLastElement,onClick:this.onClick},t.symbolName))}return r},this.getItemSize=(e,t)=>t?v.EH:v.EH+b.W0,this.onClick=e=>{const{onChange:t}=this.props;t(e)}}render(){const{itemList:e,height:t}=this.props;return(0,i.jsx)(o.W,Object.assign({itemCount:e.length,containerSize:t,getItemSize:this.getItemSize,stepIndexCount:2,orientation:n.u.Vertical},{children:this.renderRowsFactory()}),void 0)}}m.defaultProps={withStars:!1};const j=(0,g.$)(h)(m)},14196:(e,t,s)=>{"use strict";s.d(t,{D:()=>b});var i=s(85893),o=s(67294),n=s(40169),a=s(21449),r=s(54991),l=s(95035),d=s(61754),c=s(75879),u=s.n(c),h=s(70378);const g=u()([d.v],(e=>({filter:e})))(Object.assign(Object.assign({},(0,h.jo)()),{keySelector:(0,l.P)().viewId()}));var p=s(69903);const b=(0,o.memo)((e=>{const{viewId:t}=e,{filter:s}=(0,p.v)(g,e),[l,d]=(0,o.useState)(s),c=(0,n.I0)(),u=(0,o.useCallback)((e=>{d(e),c(a.n.setFilter({viewId:t,filter:e}))}),[c,t,d]),h=(0,o.useCallback)((()=>{u("")}),[u]);return(0,i.jsx)(r.M,{value:l,autoFocus:!0,onChange:u,onClear:h},void 0)}))},67942:(e,t,s)=>{"use strict";s.d(t,{I:()=>E});var i=s(85893),o=s(37588),n=s(52464),a=s(67294),r=s(95035),l=s(75879),d=s.n(l),c=s(65576),u=s(70378);const h=d()([c.v],(e=>({itemList:e})))(Object.assign(Object.assign({},(0,u.jo)()),{keySelector:(0,r.P)().viewId()}));var g=s(69880),p=s(87447),b=s(54738),v=s(76309),m=s(65201),j=s(81176),x=s(4285),y=s(7767),S=s(21449),f=s(75368),O=s(21962),C=s(88698),k=s(71383),I=s(71878);const L=d()([(0,k.$)(I.r).name()],(e=>({assetClassName:e})))(Object.assign(Object.assign({},(0,u.jo)()),{keySelector:(0,r.P)().assetClassId()}));var w=s(12292);class T extends a.Component{constructor(){super(...arguments),this.onClick=e=>{const{viewId:t,assetClassId:s,toggleAssetClass:i}=this.props;e.stopPropagation(),i({viewId:t,assetClassId:s})}}render(){const{assetClassId:e,assetClassName:t,expanded:s,styles:o}=this.props,n=e===y.F4?(0,f.L)("Popular Markets"):t;return(0,i.jsxs)("div",Object.assign({className:o.root,onClick:this.onClick},{children:[(0,i.jsx)(C.C,{collapsed:!s},void 0),(0,i.jsx)(O.q,{},void 0),(0,i.jsx)(w.a,{children:n},void 0)]}),void 0)}}const D=(0,g.$)(L,{toggleAssetClass:S.n.toggleAssetClass})((0,x.Z)((e=>{const{backgroundColor:t}=e.theme.palette.semantic;return{root:Object.assign(Object.assign(Object.assign(Object.assign({display:"flex",alignItems:"center",flexShrink:0,height:v.EH,paddingLeft:b.W0},(0,m.E)(b.q0)),{marginBottom:b.W0}),(0,j.O)({color:t.secondaryNormal})),{overflow:"hidden",nested:{":hover":Object.assign({},(0,j.O)({color:t.secondaryHover}))}})}}))(T));var P=s(36373);const N=d()([(0,k.$)(P.d).name()],(e=>({symbolCategoryName:e})))(Object.assign(Object.assign({},(0,u.jo)()),{keySelector:(0,r.P)().symbolCategoryId()}));class A extends a.Component{constructor(){super(...arguments),this.onClick=e=>{const{viewId:t,symbolCategoryId:s,toggleCategory:i}=this.props;e.stopPropagation(),i({viewId:t,categoryId:s})}}render(){const{symbolCategoryId:e,symbolCategoryName:t,expanded:s,styles:o}=this.props,n=e===y.nE?(0,f.L)("Default Category"):t;return(0,i.jsxs)("div",Object.assign({className:o.root,onClick:this.onClick},{children:[(0,i.jsx)(C.C,{collapsed:!s},void 0),(0,i.jsx)(O.q,{},void 0),(0,i.jsx)(w.a,{children:n},void 0)]}),void 0)}}const B=(0,g.$)(N,{toggleCategory:S.n.toggleCategory})((0,x.Z)((e=>{const{level:t}=e,{backgroundColor:s}=e.theme.palette.semantic;return{root:Object.assign(Object.assign(Object.assign(Object.assign({display:"flex",alignItems:"center",flexShrink:0,height:v.EH,paddingLeft:b.W0},(0,m.E)(b.q0)),{marginLeft:t*v.mK,marginBottom:b.W0}),(0,j.O)({color:s.tertiaryNormal})),{overflow:"hidden",nested:{":hover":Object.assign({},(0,j.O)({color:s.tertiaryHover}))}})}}))(A));var M=s(6538);class $ extends a.Component{constructor(){super(...arguments),this.renderRowsFactory=()=>(e,t)=>{const{viewId:s,itemList:o,withStars:n,selectedSymbolIdList:a}=this.props,r=o.slice(e,t),l=[];for(let e=0;e<r.length;e++){const t=r[e];if(t.type===p.j.assetClass)l.push((0,i.jsx)(D,{viewId:s,assetClassId:t.assetClassId,expanded:t.expanded},t.key));else if(t.type===p.j.symbolCategory)l.push((0,i.jsx)(B,{viewId:s,symbolCategoryId:t.symbolCategoryId,expanded:t.expanded,level:t.level},t.key));else if(t.type===p.j.symbol){const e=!!a&&a.some((e=>e===t.symbolId));l.push((0,i.jsx)(M.k,{symbolName:t.symbolName,selected:e,withStar:n,level:t.level,isLast:t.isLastElement,onClick:this.onChange},t.key))}}return l},this.getItemSize=(e,t)=>t?v.EH:v.EH+b.W0,this.onChange=e=>{const{onChange:t}=this.props;t(e)}}render(){const{itemList:e,height:t}=this.props;return(0,i.jsx)(o.W,Object.assign({itemCount:e.length,containerSize:t,getItemSize:this.getItemSize,stepIndexCount:2,orientation:n.u.Vertical},{children:this.renderRowsFactory()}),void 0)}}$.defaultProps={withStars:!1};const E=(0,g.$)(h)($)},88698:(e,t,s)=>{"use strict";s.d(t,{C:()=>c});var i=s(85893),o=s(67294),n=s(4285),a=s(35394),r=s(43641),l=s(81176);class d extends o.Component{render(){const{collapsed:e,rules:t}=this.props,s=e?a.Y.treeCollapsed:a.Y.treeExpanded;return(0,i.jsx)(r.h,{size:15,iconSource:s,extend:{root:t.root(this.props)}},void 0)}}const c=(0,n.Z)((()=>({root:Object.assign(Object.assign({},(0,l.O)({color:"transparent"})),{nested:{":hover":Object.assign({},(0,l.O)({color:"transparent"}))}})})))(d)},61945:(e,t,s)=>{"use strict";s.d(t,{B:()=>n});var i=s(76309),o=s(54738);function n(e){return e*i.EH+(e-1)*o.W0}},66681:(e,t,s)=>{"use strict";s.d(t,{e:()=>h});var i=s(95035),o=s(75879),n=s.n(o),a=s(87447),r=s(70378),l=s(61754),d=s(58161),c=s(94199);const u=n()([d.f,l.v],((e,t)=>{const s=(0,c.TX)(t.toLowerCase());return e.filter((e=>s(e)))}))(Object.assign(Object.assign({},(0,r.jo)()),{keySelector:(0,i.P)().viewId()})),h=n()([u],(e=>{const t=[];for(let s=0;s<e.length;s++){const i=e[s],o=s===e.length-1;t.push({key:`${a.j.symbol}|${i.name}`,type:a.j.symbol,symbolId:i.symbolId,symbolName:i.name,level:0,isLastElement:o})}return t}))(Object.assign(Object.assign({},(0,r.jo)()),{keySelector:(0,i.P)().viewId()}))},70474:(e,t,s)=>{"use strict";s.d(t,{g:()=>b});var i=s(75879),o=s.n(i),n=s(71383),a=s(95035),r=s(61205),l=s(61754),d=s(69422),c=s(65576),u=s(87447),h=s(70378),g=s(61945),p=s(66681);const b=o()([(0,n.$)(r.t).mode(),l.v,d.N,c.v,p.e],((e,t,s,i,o)=>{const n=t?u.q.Search:e,a=n===u.q.Search?o:n===u.q.Watchlists?s:i;return(0,g.B)(a.length)}))(Object.assign(Object.assign({},(0,h.jo)()),{keySelector:(0,a.P)().viewId()}))},65576:(e,t,s)=>{"use strict";s.d(t,{v:()=>d});var i=s(95035),o=s(75879),n=s.n(o),a=s(70378),r=s(68446),l=s(87447);const d=n()([r.b],(e=>{const t=[];for(let s=0;s<e.length;s++){const i=e[s];if(t.push({key:`${l.j.assetClass}|${i.id}`,type:l.j.assetClass,assetClassId:i.id,expanded:i.expanded}),i.expanded)for(let e=0;e<i.categoryList.length;e++){const s=i.categoryList[e];let o=0;if(s.isDefault||(o=1,t.push({key:`${l.j.symbolCategory}|${i.id}|${s.id}`,type:l.j.symbolCategory,symbolCategoryId:s.id,expanded:s.expanded,level:o})),(s.expanded||s.isDefault)&&s.symbolList.length)for(let e=0;e<s.symbolList.length;e++){const n=s.symbolList[e],a=e===s.symbolList.length-1;t.push({key:`${l.j.symbol}|${i.id}|${s.id}|${n.name}`,type:l.j.symbol,symbolId:n.symbolId,symbolName:n.name,level:o+1,isLastElement:a})}}}return t}))(Object.assign(Object.assign({},(0,a.jo)()),{keySelector:(0,i.P)().viewId()}))},69422:(e,t,s)=>{"use strict";s.d(t,{N:()=>d});var i=s(95035),o=s(75879),n=s.n(o),a=s(12370),r=s(70378),l=s(87447);const d=n()([a.a],(e=>{const t=[];for(let s=0;s<e.length;s++){const i=e[s],o=i.symbolList.filter((e=>!e.isAbsent));if(o.length&&(t.push({key:`${l.j.watchlist}|${i.id}`,type:l.j.watchlist,watchlistId:i.id,collapsed:i.collapsed}),!i.collapsed))for(let e=0;e<o.length;e++){const s=o[e],n=e===o.length-1;t.push({key:`${l.j.watchlistSymbol}|${i.id}|${s.name}`,type:l.j.watchlistSymbol,watchlistId:i.id,symbolName:s.name,level:1,isLastElement:n})}}return t}))(Object.assign(Object.assign({},(0,r.jo)()),{keySelector:(0,i.P)().viewId()}))},61205:(e,t,s)=>{"use strict";s.d(t,{t:()=>i});const i=e=>e.symbolSelect},93593:(e,t,s)=>{"use strict";s.d(t,{T:()=>u});var i=s(95035),o=s(71383),n=s(87161),a=s(75879),r=s.n(a),l=s(70378),d=s(65185),c=s(29480);const u=r()([(0,i.P)().tradeSide(),(0,o.$)(d.G).askStatus(),(0,o.$)(d.G).bidStatus()],((e,t,s)=>({spotStatus:e===c.aO.Buy?t:s})))(Object.assign(Object.assign({},(0,l.jo)()),{keySelector:(0,n.q)((0,i.P)().tradeSide(),(0,i.P)().symbolId())}))},70469:(e,t,s)=>{"use strict";s.d(t,{b:()=>d});var i=s(10654),o=s(4285),n=s(93593),a=s(34802),r=s(41491),l=s(58429);const d=(0,i.B)(n.T)((0,o.Z)((e=>{const{isActive:t,isHovered:s,isDisabled:i,isTransparent:o,spotStatus:n,theme:l}=e,{buttonBackgroundColor:d,foregroundColor:c}=l.palette.semantic;switch(n){case a.N.up:return(0,r._)({isActive:t,isHovered:s,isDisabled:i,isTransparent:o},{backgroundNormal:d.positiveNormal,backgroundHover:d.positiveHover,backgroundDisabled:d.positiveDisabled,foregroundNormal:c.primary1,foregroundHover:c.primary1,foregroundToggle:c.primary1,foregroundDisabled:c.primary1Disabled});case a.N.down:return(0,r._)({isActive:t,isHovered:s,isDisabled:i,isTransparent:o},{backgroundNormal:d.negativeNormal,backgroundHover:d.negativeHover,backgroundDisabled:d.negativeDisabled,foregroundNormal:c.primary1,foregroundHover:c.primary1,foregroundToggle:c.primary1,foregroundDisabled:c.primary1Disabled});case a.N.no:default:return(0,r._)({isActive:t,isHovered:s,isDisabled:i,isTransparent:o},{backgroundNormal:d.tradeNormal,backgroundHover:d.tradeHover,backgroundDisabled:d.tradeDisabled,foregroundNormal:c.primary1,foregroundHover:c.primary1,foregroundToggle:c.primary1,foregroundDisabled:c.primary1Disabled})}}))(l.o))},90777:(e,t,s)=>{"use strict";s.d(t,{W:()=>w});var i=s(85893),o=s(30381),n=s.n(o),a=s(75348),r=s(67294),l=s(69880),d=s(4285),c=s(75368);function u(e){return new Date(e.year(),e.month(),e.date())}var h=s(65084),g=s(22749),p=s(51359),b=s(75879),v=s.n(b),m=s(70378),j=s(88354);const x=v()([j.C],(e=>({timeOffset:e})))(Object.assign(Object.assign({},(0,m.jo)()),{keySelector:p.Rs}));var y=s(54738),S=s(59628),f=s(65201),O=s(81176),C=s(81996),k=s(80803),I=s(95385);class L extends r.Component{constructor(){super(...arguments),this.state={open:!1},this.onOpen=()=>{this.setState({open:!0})},this.onClose=()=>{this.setState({open:!1})},this.renderElement=()=>()=>{const{startDate:e,endDate:t,timeOffset:s}=this.props,o=void 0!==e?u(n()(e).utcOffset(s).startOf("day")):void 0,r=void 0!==t?u(n()(t).utcOffset(s).endOf("day")):void 0;return(0,i.jsx)(a.ZP,{value:this.getDate(),minDate:o,maxDate:r,onChange:this.onChange},void 0)},this.onChange=e=>{this.setState({open:!1}),this.setDate(e)}}componentDidUpdate(e){const{value:t,timeOffset:s}=this.props;if(e.timeOffset!==s){const i=n()(t).utcOffset(e.timeOffset),o=u(n()({date:i.date(),month:i.month(),year:i.year()}).utcOffset(s,!0));this.setDate(o)}}render(){var e;const{disabled:t,testId:s,rules:o}=this.props,{open:n}=this.state;return(0,i.jsxs)(I.L,Object.assign({open:n,onOpen:this.onOpen,onClose:this.onClose,disabled:t,testId:s,extend:{root:o.root(this.props),popper:o.panel(this.props),placeholder:o.placeholder(this.props)}},{children:[null!==(e=this.getPlaceholder())&&void 0!==e?e:`${(0,c.L)("Select")}...`,this.renderElement()]}),void 0)}getDate(){const{value:e,timeOffset:t}=this.props;return u(n()(e).utcOffset(t).startOf("day"))}setDate(e){const{value:t,timeOffset:s,startDate:i,endDate:o,onChange:a}=this.props;let r=n()({year:e.getFullYear(),month:e.getMonth(),date:e.getDate()}).utcOffset(s,!0).startOf("day").valueOf();this.isLessThanStartDate(r)&&(r=(0,h.Es)(i,s)),this.isMoreThanEndDate(r)&&(r=(0,h.Es)(o,s)),a&&t!==r&&a(r)}isLessThanStartDate(e){const{startDate:t,timeOffset:s}=this.props,i=(0,h.Es)(t,s);return void 0!==t&&e<i}isMoreThanEndDate(e){const{endDate:t,timeOffset:s}=this.props,i=(0,h.us)(t,s);return void 0!==t&&e>i}getPlaceholder(){const{value:e,timeOffset:t,styles:s}=this.props;return(0,i.jsx)("div",Object.assign({className:s.children},{children:(0,g.m)(e,t)}),void 0)}}const w=(0,l.$)(x)((0,d.Z)((e=>{const{backgroundColor:t,foregroundColor:s,buttonBackgroundColor:i}=e.theme.palette.semantic,{body:o}=e.theme.font.semantic,n=e.disabled?s.muted1:s.primary2,a=Object.assign(Object.assign(Object.assign(Object.assign({border:"3px solid transparent",width:0,height:0,lineHeight:(0,S.a)(15)},(0,f.E)(0)),{color:"transparent"}),(0,O.O)({color:"transparent"})),{cursor:"pointer",outline:"none"}),r=Object.assign(Object.assign({},a),{borderRightColor:"#878787",float:"left",marginLeft:2*y.W0}),l=Object.assign(Object.assign({},a),{borderLeftColor:"#878787",float:"right",marginRight:2*y.W0}),d=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({flexBasis:"auto !important"},(0,O.O)({color:"transparent"})),{border:"none",lineHeight:(0,S.a)(15)}),(0,C.o)(2,3,2,3)),(0,k.e)(2,3)),{color:s.primary2,fontSize:o.primary,cursor:"pointer",maxWidth:"10000px !important",nested:{":hover":Object.assign(Object.assign(Object.assign({},(0,O.O)({color:t.secondaryNormal})),{color:s.primary2}),(0,f.E)(y.q0)),"&[disabled]":{color:s.muted2,cursor:"default",nested:{":hover":Object.assign(Object.assign({},(0,O.O)({color:"inherit"})),{color:s.muted2})}}}}),c=Object.assign(Object.assign(Object.assign(Object.assign({},(0,O.O)({color:i.positiveNormal})),{color:s.primary1}),(0,f.E)(y.q0)),{nested:{":hover":Object.assign(Object.assign({},(0,O.O)({color:i.positiveNormal})),{color:s.primary1})}});return{root:{color:n,paddingLeft:0},panel:{nested:{"> .react-calendar":Object.assign(Object.assign(Object.assign({display:"flex",flexDirection:"column"},(0,f.E)(y.q0)),(0,C.o)(y.W0,0)),{outline:"none",color:s.primary2,overflow:"hidden",nested:{"> .react-calendar__navigation":{alignItems:"center",marginBottom:y.W0},"> .react-calendar__navigation .react-calendar__navigation__prev2-button":{display:"none"},"> .react-calendar__navigation .react-calendar__navigation__next2-button":{display:"none"},"> .react-calendar__navigation .react-calendar__navigation__prev-button":r,"> .react-calendar__navigation .react-calendar__navigation__next-button":l,"> .react-calendar__navigation .react-calendar__navigation__label":Object.assign(Object.assign({},(0,O.O)({color:"transparent"})),{border:"none",color:s.primary2,lineHeight:(0,S.a)(15),fontSize:o.primary,outline:"none"}),"> .react-calendar__month-view .react-calendar__month-view__weekdays":{display:"none !important"},"> .react-calendar__month-view":{width:178,height:114},"> .react-calendar__month-view .react-calendar__tile":Object.assign(Object.assign({},d),{width:19,height:19}),"> .react-calendar__month-view .react-calendar__tile--active":Object.assign({},c),"> .react-calendar__month-view .react-calendar__month-view__days__day--neighboringMonth":{color:s.muted1},"> .react-calendar__year-view":{width:201,height:88},"> .react-calendar__year-view .react-calendar__tile":Object.assign(Object.assign({},d),{width:60,height:19}),"> .react-calendar__year-view .react-calendar__tile--active":Object.assign({},c),"> .react-calendar__decade-view":{width:202,height:88},"> .react-calendar__decade-view .react-calendar__tile":Object.assign(Object.assign({},d),{width:60,height:19}),"> .react-calendar__decade-view .react-calendar__tile--active":Object.assign({},c),"> .react-calendar__century-view":{width:222,height:88},"> .react-calendar__century-view .react-calendar__tile":Object.assign(Object.assign({},d),{width:68,height:19}),"> .react-calendar__century-view .react-calendar__tile--active":Object.assign({},c)}})}},placeholder:{borderTopLeftRadius:3,borderBottomLeftRadius:3},children:{paddingLeft:5,paddingRight:5}}}))(L))},66140:(e,t,s)=>{"use strict";s.d(t,{$:()=>T});var i=s(85893),o=s(65084),n=s(27623),a=s(67294),r=s(69880),l=s(4285),d=s(75368),c=s(71383),u=s(51359),h=s(75879),g=s.n(h),p=s(70378),b=s(88354),v=s(65250);const m=g()([(0,c.$)(v.r).serverTime(),b.C],((e,t)=>({endDate:(0,o.us)(e,t),timeOffset:t})))(Object.assign(Object.assign({},(0,p.jo)()),{keySelector:u.Rs}));var j=s(30866),x=s(15369),y=s(14953),S=s(54738),f=s(90777),O=s(3288),C=s(80803);const k=g()([b.C],(e=>({timeOffset:e})))(Object.assign(Object.assign({},(0,p.jo)()),{keySelector:u.Rs}));class I extends a.Component{constructor(){super(...arguments),this.onChangeFrom=e=>{const{onFromDateChange:t,timeOffset:s}=this.props;t&&t((0,o.Es)(e,s))},this.onChangeTo=e=>{const{onToDateChange:t,timeOffset:s}=this.props;t&&t((0,o.us)(e,s))}}render(){const{fromDate:e,toDate:t,startDate:s,endDate:o,disabled:n,rules:a,styles:r}=this.props;return(0,i.jsxs)("div",Object.assign({className:r.root},{children:[(0,i.jsx)(f.W,{value:e,disabled:n,onChange:this.onChangeFrom,startDate:s,endDate:o,testId:"from",extend:{root:a.dropDown(this.props),panel:a.dropDownPanel(this.props)}},void 0),(0,i.jsx)("div",Object.assign({className:r.delimiter},{children:O.kZ}),void 0),(0,i.jsx)(f.W,{value:t,disabled:n,onChange:this.onChangeTo,startDate:s,endDate:o,testId:"to",extend:{root:a.dropDown(this.props),panel:a.dropDownPanel(this.props)}},void 0)]}),void 0)}}I.defaultProps={disabled:!1};const L=(0,r.$)(k)((0,l.Z)((()=>({root:{flexGrow:1,display:"flex",overflow:"hidden"},delimiter:Object.assign({display:"flex",flexBasis:11},(0,C.e)(0,S.W0)),dropDown:{display:"flex",flexGrow:0,flexBasis:85,overflow:"hidden"},dropDownPanel:{}})))(I));class w extends a.Component{constructor(){super(...arguments),this.onKindChange=e=>{const{onKindChange:t}=this.props;t(e)},this.onPeriodChange=e=>{const{onPeriodChange:t}=this.props;t(e)},this.onFromDateChange=e=>{const{toDate:t,timeOffset:s,onFromDateChange:i}=this.props;let n=e;n>t&&(n=(0,o.Es)(t,s)),i(n)},this.onToDateChange=e=>{const{fromDate:t,timeOffset:s,onToDateChange:i}=this.props;let n=e;t>n&&(n=(0,o.us)(t,s)),i(n)}}render(){const{label:e,layout:t,kind:s,fromDate:o,toDate:a,period:r,startDate:l,endDate:c,rules:u}=this.props;return(0,i.jsxs)(j.E,Object.assign({title:e,value:s,onChange:this.onKindChange,layout:t,testId:"period-select"},{children:[(0,i.jsx)(x.Y,Object.assign({value:n.b0.period,testId:"period",extend:{root:u.period(this.props)}},{children:(0,i.jsx)(y.P,{options:[{label:(0,d.L)("Today"),value:n.tN.beginOfDay},{label:(0,d.L)("Last 3 Days"),value:n.tN.ago3days},{label:(0,d.L)("Current Week"),value:n.tN.beginOfweek},{label:(0,d.L)("Last 2 Weeks"),value:n.tN.beginOf1WeeksAgo},{label:(0,d.L)("Last 3 Weeks"),value:n.tN.beginOf2WeeksAgo},{label:(0,d.L)("Current Month"),value:n.tN.beginOfMonth},{label:(0,d.L)("Previous Month (Calendar)"),value:n.tN.previousMonth},{label:(0,d.L)("Last 2 Months"),value:n.tN.beginOf1MonthAgo},{label:(0,d.L)("Last 3 Months"),value:n.tN.beginOf2MonthAgo},{label:(0,d.L)("Last 6 Months"),value:n.tN.beginOf5MonthAgo},{label:(0,d.L)("Last 9 Months"),value:n.tN.beginOf8MonthAgo},{label:(0,d.L)("Current Year"),value:n.tN.beginOfYear},{label:(0,d.L)("All History"),value:n.tN.all}],value:r,disabled:s!==n.b0.period,onChange:this.onPeriodChange,testId:"period-select"},void 0)}),void 0),(0,i.jsx)(x.Y,Object.assign({value:n.b0.interval,testId:"interval",extend:{root:u.interval(this.props),label:u.intervalLabel(this.props)}},{children:(0,i.jsx)(L,{startDate:l,endDate:c,fromDate:o,toDate:a,disabled:s!==n.b0.interval,onFromDateChange:this.onFromDateChange,onToDateChange:this.onToDateChange},void 0)}),void 0)]}),void 0)}}const T=(0,r.$)(m)((0,l.Z)((()=>({period:{display:"flex",flexGrow:0,flexShrink:0,flexBasis:135},interval:{flexGrow:0,flexShrink:0,flexBasis:260,marginLeft:S.W0},intervalLabel:{flexGrow:0}})))(w))},40299:(e,t,s)=>{"use strict";var i;s.d(t,{z:()=>i}),function(e){e.Stop="stop",e.StopLimit="stopLimit",e.StopLoss="stopLoss"}(i||(i={}))},73327:(e,t,s)=>{"use strict";s.d(t,{V:()=>p});var i=s(85893),o=s(67294),n=s(75368),a=s(40299),r=s(35394),l=s(29480),d=s(43641),c=s(70162),u=s(50137),h=s(42952);class g extends o.Component{constructor(){super(...arguments),this.onClick=()=>{const{method:e,disabled:t,onChange:s}=this.props;if(s&&!t)switch(e){case l.be.Trade:s(l.be.Opposite);break;case l.be.Opposite:s(l.be.DoubleTrade);break;case l.be.DoubleTrade:s(l.be.DoubleOpposite);break;case l.be.DoubleOpposite:s(l.be.Trade)}}}render(){const{method:e,type:t,tradeSide:s,disabled:o,slGslRequired:g}=this.props,{source:p,label:b}=function(e,t,s,i){let o,d;return e===l.be.Trade?(o=r.Y.trade,i?d=(0,n.L)("Only Trade Side is allowed with Guaranteed Stop Loss."):t===a.z.Stop?d=s===l.aO.Buy?(0,n.L)("Trade Side (Default) - Stop Order will be triggered by Ask price"):s===l.aO.Sell?(0,n.L)("Trade Side (Default) - Stop Order will be triggered by Bid price"):(0,n.L)("Trade Side (Default)"):t===a.z.StopLimit?d=s===l.aO.Buy?(0,n.L)("Trade Side (Default) - Stop Limit Order will be triggered by Ask price"):s===l.aO.Sell?(0,n.L)("Trade Side (Default) - Stop Limit Order will be triggered by Bid price"):(0,n.L)("Trade Side (Default)"):t===a.z.StopLoss&&(d=(0,n.L)("Trade Side (Default) - Stop Loss will be triggered by Bid for Buy positions and by Ask for Sell positions"))):e===l.be.Opposite?(o=r.Y.opposite,t===a.z.Stop?d=s===l.aO.Buy?(0,n.L)("Opposite Side - Stop Order will be triggered by Bid price"):s===l.aO.Sell?(0,n.L)("Opposite Side - Stop Order will be triggered by Ask price"):(0,n.L)("Opposite Side"):t===a.z.StopLimit?d=s===l.aO.Buy?(0,n.L)("Opposite Side - Stop Limit Order will be triggered by Bid price"):s===l.aO.Sell?(0,n.L)("Opposite Side - Stop Limit Order will be triggered by Ask price"):(0,n.L)("Opposite Side"):t===a.z.StopLoss&&(d=(0,n.L)("Opposite Side - Stop Loss will be triggered by Ask for Buy positions and by Bid for Sell positions"))):e===l.be.DoubleTrade?(o=r.Y.doubleTrade,t===a.z.Stop?d=s===l.aO.Buy?(0,n.L)("Double Trade Side - Stop Order will be triggered after two consecutive Ask ticks are above its entry price"):s===l.aO.Sell?(0,n.L)("Double Trade Side - Stop Order will be triggered after two consecutive Bid ticks are below its entry price"):(0,n.L)("Double Trade Side"):t===a.z.StopLimit?d=s===l.aO.Buy?(0,n.L)("Double Trade Side - Stop Limit Order will be triggered after two consecutive Ask ticks are above its entry price"):s===l.aO.Sell?(0,n.L)("Double Trade Side - Stop Limit Order will be triggered after two consecutive Bid ticks are below its entry price"):(0,n.L)("Double Trade Side"):t===a.z.StopLoss&&(d=(0,n.L)("Double Trade Side - Stop Loss will be triggered after two consecutive Bid ticks below the Stop Loss price (Buy positions) or after two consecutive Ask ticks above the Stop Loss price (Sell positions)"))):e===l.be.DoubleOpposite&&(o=r.Y.doubleOpposite,t===a.z.Stop?d=s===l.aO.Buy?(0,n.L)("Double Opposite Side - Stop Order will be triggered after two consecutive Bid ticks are above its entry price"):s===l.aO.Sell?(0,n.L)("Double Opposite Side - Stop Order will be triggered after two consecutive Ask ticks are below its entry price"):(0,n.L)("Double Opposite Side"):t===a.z.StopLimit?d=s===l.aO.Buy?(0,n.L)("Double Opposite Side - Stop Limit Order will be triggered after two consecutive Bid ticks are above its entry price"):s===l.aO.Sell?(0,n.L)("Double Opposite Side - Stop Limit Order will be triggered after two consecutive Ask ticks are below its entry price"):(0,n.L)("Double Opposite Side"):t===a.z.StopLoss&&(d=(0,n.L)("Double Opposite Side - Stop Loss will be triggered after two consecutive Ask ticks below the Stop Loss price for Buy positions or after two consecutive Bid ticks above the Stop Loss price for Sell positions"))),{source:o,label:d}}(e,t,s,g),v=!g&&void 0;return(null!=v?v:o)?(0,i.jsx)(d.h,{backgroundType:u.Eo.Secondary,size:c.J.Medium,iconSource:p,disabled:o,onClick:this.onClick},void 0):(0,i.jsxs)(h.b,{children:[(0,i.jsx)(d.h,{backgroundType:u.Eo.Secondary,size:c.J.Medium,iconSource:p,disabled:o,onClick:this.onClick},void 0),b]},void 0)}}const p=g},77388:(e,t,s)=>{"use strict";var i,o;s.d(t,{A:()=>i,H:()=>o}),function(e){e.Released="released",e.History="history"}(i||(i={})),function(e){e.Native="Native",e.RadioSwitch="RadioSwitch"}(o||(o={}))},66457:(e,t,s)=>{"use strict";s.d(t,{D:()=>k});var i=s(85893),o=s(27692),n=s(76314),a=s(88801),r=s(53048),l=s(51604),d=s(75368),c=s(67294),u=s(4285),h=s(69880),g=s(92551),p=s(71383),b=s(51359),v=s(70378);const m=(0,g.a)({isShown:(0,p.$)((e=>e.whatsNewDialog)).isShown()})(Object.assign(Object.assign({},(0,v.jo)()),{keySelector:b.Rs}));var j=s(54738),x=s(81996),y=s(53587),S=s(44202),f=s(10136);const O=(0,o.f)((()=>s.e(879).then(s.bind(s,48431)).then((({WhatsNewDialogContent:e})=>e))));class C extends c.Component{constructor(){super(...arguments),this.onClose=()=>{const{set:e,close:t}=this.props;e(),t({type:S.k.WhatsNewDialog})}}render(){const{isShown:e,rules:t,styles:s}=this.props;return e?(0,i.jsxs)(n.V,Object.assign({title:(0,d.L)("What's New"),contentBackground:a.r.Primary,onClose:this.onClose,extend:{container:t.dialogContainer(this.props),body:t.dialogBody(this.props)}},{children:[(0,i.jsx)(O,{fallback:(0,i.jsx)("div",Object.assign({className:s.loaderContainer},{children:(0,i.jsx)(r.h,{},void 0)}),void 0)},void 0),(0,i.jsx)(l.K,Object.assign({wide:!0,onClick:this.onClose},{children:(0,d.L)("OK")}),void 0)]}),void 0):null}}const k=(0,h.$)(m,{set:y.$.set,close:f.L.close})((0,u.Z)((()=>({dialogBody:Object.assign({display:"flex",flexDirection:"column"},(0,x.o)(0,j.W0,j.W0)),dialogContainer:{maxHeight:"80%",width:645},loaderContainer:{display:"flex",justifyContent:"center",alignItems:"center",height:"70vh"}})))(C))},40756:(e,t,s)=>{"use strict";s.d(t,{q:()=>d});var i=s(75879),o=s.n(i),n=s(71383),a=s(95035),r=s(70378),l=s(96705);const d=o()([(0,n.$)(l.l).data(),(0,a.P)().accountId()],((e,t)=>e[t]))(Object.assign({keySelector:(0,a.P)().accountId()},(0,r.jo)()))},63115:(e,t,s)=>{"use strict";s.d(t,{v:()=>r});var i=s(85893),o=s(67294),n=s(94524),a=s(80822);const r=(0,o.memo)((e=>{const{accountId:t}=e;return(0,i.jsx)(n.e,{param:t,subscribe:a.o.subscribe,unsubscribe:a.o.unsubscribe},void 0)}))},66334:(e,t,s)=>{"use strict";s.d(t,{v:()=>l});var i=s(85893),o=s(67294),n=s(94524),a=s(64695);class r extends o.Component{render(){const{accountId:e}=this.props;return(0,i.jsx)(n.e,{param:e,subscribe:a.W.subscribe,unsubscribe:a.W.unsubscribe},void 0)}}const l=(0,o.memo)(r)},42516:(e,t,s)=>{"use strict";s.d(t,{_:()=>n});var i=s(12961),o=s(46119);const n=e=>{const{brokerNameList:t}=e;return(e=>{(0,o.x)(e,i.x.subscribe,i.x.unsubscribe)})(t),null}},14706:(e,t,s)=>{"use strict";s.d(t,{F:()=>d});var i=s(75879),o=s.n(i),n=s(70378),a=s(71383),r=s(95035),l=s(28774);const d=o()([(0,a.$)(l.D).data(),(0,r.P)().brokerName()],((e,t)=>e[t]))(Object.assign(Object.assign({},(0,n.jo)()),{keySelector:(0,r.P)().brokerName()}))},57100:(e,t,s)=>{"use strict";s.d(t,{D:()=>u});var i=s(75879),o=s.n(i),n=s(71383),a=s(95035),r=s(87161),l=s(70378),d=s(31320),c=s(76096);const u=o()([(0,n.$)(c.g).url(),(0,n.$)(c.g).image(),(0,a.P)().imageName()],((e,t,s)=>(0,d.a)(e,t,s)))(Object.assign(Object.assign({},(0,l.jo)()),{keySelector:(0,r.q)((0,a.P)().brokerName(),(0,a.P)().imageName())}))},41852:(e,t,s)=>{"use strict";function i(e){return e?"Live":"Demo"}s.d(t,{T:()=>i})},88292:(e,t,s)=>{"use strict";s.d(t,{x:()=>a});var i=s(9570),o=s(75368),n=s(16603);function a(e,t){if(t)return(0,o.L)("Spread Betting");switch(e){case i.Qm.Hedged:return(0,o.L)("Hedging");case i.Qm.Netted:return(0,o.L)("Netting");case i.Qm.SpreadBetting:return(0,o.L)("Spread Betting");default:return(0,n.N)(e)}}},86610:(e,t,s)=>{"use strict";s.d(t,{Y:()=>n,z:()=>a});var i=s(75368),o=s(9570);function n(e){return e?(0,i.L)("Live"):(0,i.L)("Demo")}function a(e){return e===o.Qm.SpreadBetting?(0,i.L)("SB"):(0,i.L)("CFD")}},56594:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});const i=e=>e.appName},29575:(e,t,s)=>{"use strict";s.d(t,{d:()=>d});var i=s(85893),o=s(67294),n=s(33535),a=s(3288),r=s(41044),l=s(79317);const d=(0,o.memo)((e=>{const{value:t,average:s=!1,placeholder:o=a.kZ,hideZero:d=!1,prefix:c=!1,children:u}=e,h=(0,n.R)(t),g=(0,l.N)(h,a.cQ,d),p=c?a.qY:void 0,b=g?(0,r.x)(a.cQ,p,s,o)(h):o,v="function"==typeof u?u({formattedValue:b,isValid:g,displayName:a.qY}):b;return(0,i.jsx)(i.Fragment,{children:v},void 0)}))},73099:(e,t,s)=>{"use strict";s.d(t,{$:()=>n});var i=s(77292),o=s(46119);const n=e=>{(0,o.x)(e,i.V.subscribeById,i.V.unsubscribeById)}},54622:(e,t,s)=>{"use strict";s.d(t,{L:()=>a});var i=s(67294),o=s(67142),n=s(73099);const a=(0,i.memo)((e=>{const{assetId:t,assetName:s}=e;return(0,n.$)([t]),(0,o.Q)([s]),null}))},96080:(e,t,s)=>{"use strict";s.d(t,{Y:()=>c});var i,o=s(75879),n=s.n(o),a=s(70378),r=s(71383),l=s(51359);!function(e){e.NotCrossBroker="NotCrossBroker",e.SmallCrossBroker="SmallCrossBroker",e.BigCrossBroker="BigCrossBroker"}(i||(i={}));var d=s(8166);const c=n()([(0,r.$)(d.H).data.crossBrokerType()],(e=>e!==i.NotCrossBroker))(Object.assign(Object.assign({},(0,a.jo)()),{keySelector:l.Rs}))},97987:(e,t,s)=>{"use strict";s.d(t,{g:()=>o});var i=s(85785);function o(){return[{value:i.TD.Style1,label:void 0},{value:i.TD.Style2,label:void 0},{value:i.TD.Style3,label:void 0},{value:i.TD.Style4,label:void 0},{value:i.TD.Style5,label:void 0},{value:i.TD.Style6,label:void 0}]}},33270:(e,t,s)=>{"use strict";function i(){return[{value:"1",label:void 0},{value:"2",label:void 0},{value:"3",label:void 0},{value:"4",label:void 0},{value:"5",label:void 0},{value:"6",label:void 0},{value:"7",label:void 0},{value:"8",label:void 0}]}s.d(t,{K:()=>i})},54796:(e,t,s)=>{"use strict";s.d(t,{U:()=>g});var i=s(85893),o=s(67294),n=s(54738),a=s(65201),r=s(81176),l=s(70162),d=s(83069),c=s(35394),u=s(4285);class h extends o.Component{render(){const{children:e,styles:t}=this.props;return(0,i.jsxs)("div",Object.assign({className:t.root},{children:[e,(0,i.jsx)("div",Object.assign({className:t.arrow},{children:(0,i.jsx)(d.J,{source:c.Y.treeExpanded,size:l.J.Small},void 0)}),void 0)]}),void 0)}}const g=(0,u.Z)((e=>{const{isActive:t}=e,{backgroundColor:s,shadow:i,foregroundColor:o}=e.theme.palette.semantic;return{root:Object.assign(Object.assign(Object.assign({position:"relative",display:"flex",alignItems:"center",height:27,paddingLeft:n.W0,paddingRight:n.W0,border:`1px solid ${t?s.strokeNormal:"transparent"}`,boxShadow:t?i.dropdownsAndTooltips:"none"},(0,a.E)(n.q0)),(0,r.O)({color:t?s.menuNormal:void 0})),{fill:o.primary2,overflow:"hidden",nested:{":hover":Object.assign(Object.assign({},(0,r.O)({color:s.menuNormal})),{border:`1px solid ${s.strokeNormal}`,nested:{":after":{borderTop:`4px solid ${o.primary2}`}}})}}),arrow:{fill:t?o.primary2:o.secondary,marginLeft:n.W0,transform:t?"rotate(180deg)":"none"}}}))(h)},4601:(e,t,s)=>{"use strict";s.d(t,{C:()=>g});var i=s(85893),o=s(67294),n=s(4285),a=s(54738),r=s(16603),l=s(9267);function d(e,t){const{badgeBackgroundColor:s}=t.palette.semantic;switch(e){case l.g.Positive:return s.positive;case l.g.Neutral:return s.neutral;case l.g.Info:return s.info;default:return(0,r.N)(e)}}var c=s(81176),u=s(65201);class h extends o.Component{render(){const{styles:e,children:t}=this.props;return(0,i.jsx)("div",Object.assign({className:e.root},{children:t}),void 0)}}const g=(0,n.Z)((e=>{const{type:t,isSmall:s,theme:i}=e,{foregroundColor:o}=i.palette.semantic;return{root:Object.assign(Object.assign(Object.assign({display:"flex",overflow:"hidden",justifyContent:"center",alignItems:"center"},(0,c.O)({color:d(t,i)})),{color:t===l.g.Neutral?o.primary2:o.primary1,paddingLeft:a.W0,paddingRight:a.W0,fontSize:s?"0.85em":void 0,height:s?16:a.XT}),(0,u.E)(a.q0))}}))(h)},9267:(e,t,s)=>{"use strict";var i;s.d(t,{g:()=>i}),function(e){e[e.Positive=0]="Positive",e[e.Neutral=1]="Neutral",e[e.Info=2]="Info"}(i||(i={}))},4375:(e,t,s)=>{"use strict";s.d(t,{L:()=>n});var i=s(1610),o=s(596);const n=(0,s(4285).Z)((e=>{const{buttonBackgroundColor:t,foregroundColor:s}=e.theme.palette.semantic;return{root:{},content:(0,i.d)(e,{foregroundColorNormal:s.primary2,foregroundColorDisabled:s.muted1,backgroundColorNormal:t.tertiaryNormal,backgroundColorHover:t.tertiaryHover,backgroundColorDisabled:t.tertiaryDisabled})}}))(o.z)},7424:(e,t,s)=>{"use strict";s.d(t,{Q:()=>p});var i=s(70655),o=s(85893),n=s(67294),a=s(4285),r=s(1610),l=s(596),d=s(83069),c=s(35394),u=s(70162),h=s(21962);class g extends n.Component{constructor(){super(...arguments),this.handleClick=e=>{const{to:t,onClick:s}=this.props;t?window.open(t,"_blank"):s&&s(e)}}render(){const e=this.props,{children:t,to:s,onClick:n,styles:a,rules:r}=e,g=(0,i._T)(e,["children","to","onClick","styles","rules"]);return(0,o.jsxs)(l.z,Object.assign({},g,{onClick:this.handleClick,extend:{root:r.root(this.props),content:r.content(this.props)}},{children:[(0,o.jsx)("div",Object.assign({className:a.text},{children:t}),void 0),(0,o.jsx)(h.q,{},void 0),Boolean(s||n)&&(0,o.jsx)(d.J,{source:c.Y.ext,size:u.J.ExtraSmall},void 0)]}),void 0)}}const p=(0,a.Z)((e=>{const{to:t,onClick:s}=e,{foregroundColor:i,buttonBackgroundColor:o}=e.theme.palette.semantic;return{root:{height:"auto",cursor:t||s?"pointer":"inherit"},content:Object.assign({justifyContent:"space-between"},(0,r.d)(e,{foregroundColorNormal:i.primary2,foregroundColorDisabled:i.muted1,backgroundColorNormal:o.secondaryNormal,backgroundColorHover:t||s?o.secondaryHover:void 0,backgroundColorDisabled:o.secondaryDisabled})),text:{display:"flex",overflow:"hidden"}}}))(g)},24530:(e,t,s)=>{"use strict";s.d(t,{z:()=>n});var i=s(1610),o=s(596);const n=(0,s(4285).Z)((e=>{const{buttonBackgroundColor:t,foregroundColor:s}=e.theme.palette.semantic;return{root:{},content:(0,i.d)(e,{foregroundColorNormal:s.primary1,foregroundColorDisabled:s.primary1Disabled,backgroundColorNormal:t.negativeNormal,backgroundColorHover:t.negativeHover,backgroundColorDisabled:t.negativeDisabled})}}))(o.z)},22909:(e,t,s)=>{"use strict";s.d(t,{n:()=>d});var i=s(85893),o=s(67294),n=s(4285),a=s(43641),r=s(35394);class l extends o.Component{render(){const{rules:e,isCollapsed:t,collapseDirection:s,onClick:o}=this.props,n="top"===s?r.Y.arrowExpand:r.Y.arrowCollapse,l="top"===s?r.Y.arrowCollapse:r.Y.arrowExpand;return(0,i.jsx)(a.h,{iconSource:t?n:l,onClick:o,extend:{root:e.root(this.props),iconWrapper:e.iconWrapper(this.props)}},void 0)}}l.defaultProps={collapseDirection:"top"};const d=(0,n.Z)((()=>({root:{},iconWrapper:{}})))(l)},83103:(e,t,s)=>{"use strict";s.d(t,{k:()=>m});var i=s(85893),o=s(67294),n=s(4285),a=s(65792),r=s.n(a),l=s(81176),d=s(59628);class c extends o.Component{render(){const{styles:e}=this.props;return(0,i.jsx)("div",Object.assign({className:e.root},{children:(0,i.jsx)("div",{className:e.color},void 0)}),void 0)}}const u=(0,n.Z)((e=>{const{width:t,height:s,hex:i,opacity:o,gridSize:n,withoutBorder:a}=e,{backgroundColor:c}=e.theme.palette.semantic,u=r().valid(i)?r()(i).alpha(o).css():"inherit";return{root:Object.assign({display:"flex",width:t,height:s,overflow:"hidden"},(h=n,Object.assign(Object.assign({},(0,l.O)({color:"#fff",image:"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAJElEQVQoU2PU1NT8z4AErl+/zojMZ6SDAmT7QGx0K1EcRBsFABn6FfHB1c47AAAAAElFTkSuQmCC')",size:(0,d.a)(h)})),{backgroundPosition:`0 0, ${h}px ${h}px`}))),color:Object.assign(Object.assign({width:"100%",height:"100%"},(0,l.O)({color:u})),{boxShadow:`inset 0px 0px 0px 1px ${c.strokeNormal}`,borderStyle:"solid",borderWidth:a?0:1,borderColor:c.primaryNormal})};var h}))(c);var h=s(54738),g=s(83069),p=s(35394),b=s(70162);class v extends o.Component{render(){const{styles:e}=this.props;return(0,i.jsx)("div",Object.assign({className:e.root},{children:this.renderIcon()}),void 0)}renderIcon(){const{hex:e,iconSize:t,opacity:s,width:o,height:n,gridSize:a,withoutBorder:r,rules:l}=this.props;return e===h.tV?(0,i.jsx)(g.J,{source:p.Y.colorObscure,size:t,extend:{root:l.icon(this.props)}},void 0):(0,i.jsx)(u,{hex:e,opacity:s,width:o,height:n,gridSize:a,withoutBorder:r},void 0)}}v.defaultProps={iconSize:b.J.Control};const m=(0,n.Z)((e=>{const{iconSize:t,theme:s}=e,{foregroundColor:i}=s.palette.semantic;return{root:{display:"flex",alignItems:"center",justifyContent:"center",width:t,height:t},icon:{fill:i.secondary}}}))(v)},58689:(e,t,s)=>{"use strict";s.d(t,{t:()=>h});var i=s(85893),o=s(67294),n=s(42983),a=s(65792),r=s.n(a),l=s(13518),d=s(81176);const c=e=>{const{isHovered:t,hex:s,size:i,opacity:o}=e,{backgroundColor:n,foregroundColor:a}=e.theme.palette.semantic,c=r()(s).alpha(o).css();return{root:{nested:{[`:hover .${(0,l.p)("controlBackdrop")}`]:{boxShadow:`inset 0px 0px 0px 1px ${a.secondary}`}}},backdrop:Object.assign(Object.assign({},(0,d.O)({color:c})),{boxShadow:`inset 0px 0px 0px 1px ${t?a.secondary:n.strokeNormal}`}),placeholder:{width:i,height:i}}};var u=s(58429);const h=(0,o.memo)((e=>{const{isHovered:t,opacity:s,size:o,hex:a,children:r,extend:l}=e,{rules:d,css:h}=(0,n.X)(c,{isHovered:t,opacity:s,size:o,hex:a,extend:l});return(0,i.jsxs)(u.o,Object.assign({},e,{extend:{root:d.root,backdrop:d.backdrop}},{children:[(0,i.jsx)("div",{className:h.placeholder()},void 0),r]}),void 0)}))},77980:(e,t,s)=>{"use strict";s.d(t,{c:()=>x});var i=s(85893),o=s(67294),n=s(4285),a=s(75368),r=s(78874),l=s(81176),d=s(36700);class c extends o.Component{constructor(){super(...arguments),this.onChange=e=>{const{onChange:t}=this.props,s=e;t((0,d.FY)(s))}}render(){const{opacity:e,disabled:t,styles:s}=this.props;return(0,i.jsxs)("div",Object.assign({className:s.root},{children:[(0,i.jsx)("div",Object.assign({className:s.title},{children:(0,a.L)("Opacity")}),void 0),(0,i.jsxs)("div",Object.assign({className:s.slider},{children:[(0,i.jsx)(r.i,{value:(0,d.yI)(e),min:0,max:100,step:1,disabled:t,onChange:this.onChange},void 0),(0,i.jsxs)("div",Object.assign({className:s.scale},{children:[(0,i.jsx)("span",{children:0},void 0),(0,i.jsx)("span",{className:s.center},void 0),(0,i.jsx)("span",{children:100},void 0)]}),void 0)]}),void 0)]}),void 0)}}const u=(0,n.Z)((()=>({root:{},slider:{width:180},title:{marginBottom:15},scale:{marginTop:10,alignItems:"center",justifyContent:"space-between",display:"flex",nested:{"> span":{width:"33.3%",nested:{":last-child":{textAlign:"right"},":nth-of-type(2)":{width:1}}}}},center:Object.assign({height:3},(0,l.O)({color:"#fff"}))})))(c);var h=s(83103);const g=[["#ffffff","#000000","#fe0000","#02aff1","#0070c0","#ffff01","#ffc000","#01af50","#01ff01","#7030a0"],["#e7e7e7","#737373","#ffcbcd","#cdeefd","#cce2f0","#ffffcd","#fff2cd","#cbf0de","#ceffcf","#e3d5ec"],["#cccccc","#595959","#ff999a","#99dff9","#66a8d8","#feff99","#ffe699","#99dfba","#99ff9b","#c6acd9"],["#b3b3b3","#3f3f3f","#ff6666","#68d0f7","#0071c1","#ffff66","#fed966","#67d097","#65fe66","#aa83c6"],["#999999","#262626","#ff3334","#33c1f3","#013861","#ffff33","#bf9100","#00843b","#00bf00","#542478"],["#808080","#1c1b21","#800001","#025776","#001b30","#bebf00","#805f00","#005727","#007f01","#371851"]];var p=s(81996),b=s(65201),v=s(80803),m=s(54738);class j extends o.Component{constructor(){super(...arguments),this.onChangeOpacity=e=>{const{hex:t,onChange:s}=this.props;s(t,e)},this.onChangeColor=e=>()=>{const{opacity:t,onChange:s}=this.props;s(e,t)}}render(){const{styles:e}=this.props;return(0,i.jsxs)("div",Object.assign({className:e.root},{children:[this.renderColors(),this.renderOpacityBlock()]}),void 0)}renderColors(){const{styles:e}=this.props;return g.map(((t,s)=>{const o=t.map((t=>(0,i.jsx)("div",{className:e.panelBox,onClick:this.onChangeColor(t),style:{backgroundColor:t}},t)));return(0,i.jsx)("div",Object.assign({className:e.panelRow},{children:o}),`row-${s}`)}))}renderOpacityBlock(){const{useOpacity:e,hex:t,opacity:s,styles:o}=this.props;return e?(0,i.jsxs)("div",Object.assign({className:o.opacityBlock},{children:[(0,i.jsx)(u,{opacity:s,disabled:t===m.tV,onChange:this.onChangeOpacity},void 0),(0,i.jsx)(h.k,{hex:t,opacity:s,width:36,height:36,iconSize:53,gridSize:12},void 0)]}),void 0):null}}const x=(0,n.Z)((e=>{const{backgroundColor:t}=e.theme.palette.semantic;return{root:Object.assign(Object.assign(Object.assign({},(0,p.o)(11)),(0,b.E)(m.q0)),{display:"flex",flexDirection:"column",height:260}),panelRow:{display:"flex",flexDirection:"row",marginBottom:5,nested:{":last-child":Object.assign({},(0,v.e)(0))}},panelBox:{cursor:"pointer",width:19,height:19,borderWidth:1,borderStyle:"solid",borderColor:t.strokeNormal,marginRight:5,nested:{":last-child":Object.assign({},(0,v.e)(0))}},opacityBlock:{marginTop:11,paddingTop:11,borderTop:`1px solid ${t.strokeNormal}`,display:"flex",alignItems:"flex-end",justifyContent:"space-between"}}}))(j)},90191:(e,t,s)=>{"use strict";s.d(t,{Z:()=>x});var i=s(85893),o=s(67294),n=s(70162),a=s(83069),r=s(35394),l=s(54738),d=s(13518),c=s(81176),u=s(65201),h=s(50485),g=s(41296);const p=e=>{const{disabled:t,isActive:s,hasIcon:i,iconSize:o,withSubmenu:n}=e,{backgroundColor:a,foregroundColor:r}=e.theme.palette.semantic,p=(0,d.p)("contentMenuIcon"),b=(0,d.p)("contentMenuExpander");return{root:Object.assign(Object.assign(Object.assign(Object.assign({flexGrow:1,display:"flex",alignItems:"center"},(0,c.O)({color:s?t?a.menuNormal:a.primaryHover:a.menuNormal})),{color:t?r.muted1:r.primary2}),(0,u.E)(l.q0)),{height:l.b,paddingTop:l.W0,paddingBottom:l.W0,marginBottom:l.W0,outline:"none",nested:{":last-child":{marginBottom:0},[`> .${p}`]:{fill:t?void 0:r.primary2},[`> .${b}`]:{fill:t?r.muted1:r.primary2},":hover":Object.assign(Object.assign({},(0,c.O)({color:t?a.menuNormal:a.primaryHover})),{nested:{[`> .${p}`]:{fill:t?void 0:r.primary2},[`> .${b}`]:{fill:t?r.muted1:r.primary2}}})}}),label:{display:"flex",flexGrow:1,flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingLeft:i?0:l.W0+o+l.W0,paddingRight:n?0:2*l.W0+13+l.W0,overflow:"hidden"},target:Object.assign({},h.aF),icon:(0,g.g)(p,(()=>({width:o,height:o,display:"flex",alignItems:"center",justifyContent:"center",marginLeft:l.W0,marginRight:l.W0,fill:t?r.muted1:r.secondary}))),expander:(0,g.g)(b,(()=>({marginLeft:2*l.W0,marginRight:l.W0,fill:t?r.muted1:r.secondary}))),iconElementWrapper:{}}};var b=s(42952),v=s(12292),m=s(61468),j=s(42983);const x=(0,o.memo)((e=>{const{testId:t,title:s,open:l,icon:d,iconSize:c=n.J.Medium,isActive:u,disabled:h,onOpen:g,onClose:x,children:y,onClick:S,onMouseEnter:f,onMouseLeave:O,maxWidthElement:C,withTooltip:k=!0,extend:I={}}=e,L=(0,o.useMemo)((()=>{let e,t;return Array.isArray(y)?[e,t]=y:e=y,[e,t]}),[y]),[w,T]=L,{css:D,rules:P}=(0,j.X)(p,{hasIcon:void 0!==d,iconSize:c,isActive:u,disabled:h,withSubmenu:Boolean(T),extend:I}),N=(0,o.useCallback)((e=>{e.persist(),e.stopPropagation(),h||T||null==S||S(e)}),[h,S,T]),A=(0,o.useCallback)((()=>{T||null==f||f()}),[f,T]),B=(0,o.useCallback)((()=>{T||null==O||O()}),[O,T]),M=(0,o.useMemo)((()=>(0,i.jsx)("div",Object.assign({className:D.root(),onClick:N,onMouseEnter:A,onMouseLeave:B},{children:(0,i.jsxs)(b.b,Object.assign({wide:!0},{children:[(0,i.jsxs)(i.Fragment,{children:[d&&(0,i.jsxs)("div",Object.assign({className:D.icon()},{children:["string"==typeof d&&(0,i.jsx)(a.J,{source:d,size:c,extend:{iconWrapper:P.iconElementWrapper}},void 0),"string"!=typeof d&&d]}),void 0),(0,i.jsxs)("div",Object.assign({className:D.label()},{children:[k&&(0,i.jsx)(v.a,Object.assign({testId:"label"},{children:w}),void 0),!k&&w]}),void 0),T&&(0,i.jsx)("div",Object.assign({className:D.expander()},{children:(0,i.jsx)(a.J,{source:r.Y.treeCollapsed,size:n.J.ExtraSmall,testId:"expand-icon"},void 0)}),void 0)]},void 0),s]}),void 0)}),void 0)),[D,P,N,A,B,s,d,c,t,w,T,k,h]);return T?(0,i.jsxs)(m.B,Object.assign({open:l,onOpen:g,onClose:x,placement:"right-start",maxWidthElement:C,wide:!0,offsetX:0,offsetY:8,testId:t},{children:[M,T]}),void 0):M}))},39057:(e,t,s)=>{"use strict";s.d(t,{N:()=>l});var i=s(85893),o=s(67294),n=s(35394),a=s(90191);class r extends o.Component{constructor(){super(...arguments),this.onClick=e=>{const{checked:t,onChange:s}=this.props;s(!t,e)}}render(){const{children:e,title:t,disabled:s,checked:o,withTooltip:n,testId:r}=this.props;return(0,i.jsx)(a.Z,Object.assign({testId:r,title:t,icon:this.getMenuItemIcon(o),disabled:s,withTooltip:n,onClick:this.onClick},{children:e}),void 0)}getMenuItemIcon(e){return e?n.Y.tick:void 0}}r.defaultProps={onChange:()=>{}};const l=r},92481:(e,t,s)=>{"use strict";s.d(t,{t:()=>a});var i=s(4285),o=s(41491),n=s(58429);const a=(0,i.Z)((e=>{const{isActive:t,isHovered:s,isDisabled:i,isTransparent:n,theme:a}=e,{buttonBackgroundColor:r,foregroundColor:l}=a.palette.semantic;return(0,o._)({isActive:t,isHovered:s,isDisabled:i,isTransparent:n},{backgroundNormal:r.positiveNormal,backgroundHover:r.positiveHover,backgroundDisabled:r.positiveDisabled,foregroundNormal:l.primary1,foregroundHover:l.primary1,foregroundToggle:l.primary1,foregroundDisabled:l.primary1Disabled})}))(n.o)},46382:(e,t,s)=>{"use strict";s.d(t,{h:()=>a});var i=s(4285),o=s(58429),n=s(41491);const a=(0,i.Z)((e=>{const{isActive:t,isHovered:s,isDisabled:i,isTransparent:o,theme:a}=e,{buttonBackgroundColor:r,foregroundColor:l}=a.palette.semantic;return(0,n._)({isActive:t,isHovered:s,isDisabled:i,isTransparent:o},{backgroundNormal:r.secondaryNormal,backgroundHover:r.secondaryHover,backgroundToggle:r.secondaryToggled,backgroundDisabled:r.secondaryDisabled,foregroundNormal:l.secondary,foregroundHover:l.primary2,foregroundToggle:l.primary2,foregroundDisabled:l.muted1})}))(o.o)},9342:(e,t,s)=>{"use strict";s.d(t,{h:()=>a});var i=s(4285),o=s(58429),n=s(41491);const a=(0,i.Z)((e=>{const{isActive:t,isHovered:s,isDisabled:i,isTransparent:o,theme:a}=e,{buttonBackgroundColor:r,foregroundColor:l}=a.palette.semantic;return(0,n._)({isActive:t,isHovered:s,isDisabled:i,isTransparent:o},{backgroundNormal:r.tertiaryNormal,backgroundHover:r.tertiaryHover,backgroundToggle:r.tertiaryToggled,backgroundDisabled:r.tertiaryDisabled,foregroundNormal:l.secondary,foregroundHover:l.primary2,foregroundToggle:l.primary2,foregroundDisabled:l.muted1})}))(o.o)},1050:(e,t,s)=>{"use strict";s.d(t,{j:()=>r});var i=s(85893),o=s(67294),n=s(4285);class a extends o.Component{constructor(){super(...arguments),this.state={isCopied:!1},this.copiedResetDelay=1e3,this.copy=()=>{const{text:e}=this.props;!function(e){const t=document.createElement("textArea");t.value=e,t.style.position="fixed",t.style.left="-1000px",t.style.top="-1000px";const{activeElement:s}=document;null==s||s.appendChild(t),t.select(),document.execCommand("copy"),null==s||s.removeChild(t)}(e),this.setState({isCopied:!0}),this.copiedResetTimeoutId=window.setTimeout((()=>{this.setState({isCopied:!1})}),this.copiedResetDelay)}}componentWillUnmount(){clearTimeout(this.copiedResetTimeoutId)}render(){const{children:e,styles:t}=this.props,{isCopied:s}=this.state;return(0,i.jsx)("div",Object.assign({className:t.root},{children:e(s,this.copy)}),void 0)}}const r=(0,n.Z)((()=>({root:{display:"flex",flexGrow:1,justifyContent:"center"}})))(a)},68929:(e,t,s)=>{"use strict";s.d(t,{b:()=>u});var i=s(85893),o=s(67294),n=s(1050),a=s(51604),r=s(83069),l=s(35394),d=s(70162);class c extends o.Component{render(){const{disabled:e,text:t,children:s,wide:o,testId:c,extend:u}=this.props;return(0,i.jsx)(n.j,Object.assign({text:t,extend:u},{children:(t,n)=>(0,i.jsx)(a.K,Object.assign({wide:o,disabled:e||t,onClick:n,testId:c},{children:t?(0,i.jsx)(r.J,{source:l.Y.checkmark,size:d.J.ExtraSmall},void 0):s}),void 0)}),void 0)}}const u=c},68328:(e,t,s)=>{"use strict";var i;s.d(t,{i:()=>i}),function(e){e.Vertical="Vertical",e.Horizontal="Horizontal"}(i||(i={}))},86193:(e,t,s)=>{"use strict";s.d(t,{b:()=>l});var i=s(85893),o=s(67294),n=s(68328);const a=e=>{const{orientation:t,width:s,height:i,disabled:o,color:a}=e,{foregroundColor:r}=e.theme.palette.semantic;return{root:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexGrow:0,flexShrink:0,flexBasis:t===n.i.Horizontal?s+1:i+1,cursor:o?"inherit":"move",fill:a||r.tertiary},svg:{width:s,height:i}}};var r=s(42983);const l=(0,o.memo)((e=>{const{orientation:t,title:s,color:n,disabled:l,width:d=5,height:c=20,spacer:u=3,radius:h=1,connector:g,onDragStart:p,onDragMove:b,onDragEnd:v,extend:m}=e,{css:j}=(0,r.X)(a,{orientation:t,color:n,disabled:l,width:d,height:c,extend:m}),x=l?void 0:s,y=(0,o.useCallback)((()=>{const e=[],t=Math.floor((c-2*h)/u),s=Math.floor((d-2*h)/u);for(let i=0;i<=s;i++)for(let s=0;s<=t;s++)e.push([i*u+h,s*u+h]);return e}),[c,h,u,d]),S=(0,o.useMemo)((()=>{if(l)return!1;const e=y();return(0,i.jsx)("svg",Object.assign({viewBox:`0 0 ${d} ${c}`,className:j.svg()},{children:e.map((([e,t])=>(0,i.jsx)("circle",{cx:e,cy:t,r:h},`${e}-${t}`)))}),void 0)}),[l,d,c,h,y,j]),f=(0,o.useCallback)((e=>{b&&b({x:e.clientX,y:e.clientY})}),[b]),O=(0,o.useCallback)((e=>{v&&(v({x:e.clientX,y:e.clientY}),document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",O))}),[v,f]),C=(0,o.useCallback)((e=>{p&&(p({x:e.clientX,y:e.clientY}),document.addEventListener("mousemove",f),document.addEventListener("mouseup",O))}),[p,f,O]),k=(0,o.useMemo)((()=>(0,i.jsx)("div",Object.assign({className:j.root(),title:x,onMouseDown:C},{children:S}),void 0)),[x,C,j,S]);return g?(0,i.jsx)(i.Fragment,{children:g(k)},void 0):k}))},78641:(e,t,s)=>{"use strict";s.d(t,{n:()=>o,l:()=>n});var i=s(67294);class o extends i.Component{componentDidMount(){}shouldComponentUpdate(){return!1}willDestroyEmbedded(){}didDestroyEmbedded(){}destroyEmbedded(){this.embedded&&(this.embedded.destroy(),this.embedded=void 0)}updateEmbeddedProps(e){}initializeEmbedded(){}shouldCreateEmbedded(){return!0}modifyConstructorOptions(e){return e}}function n(e,t,s="div"){return class extends t{UNSAFE_componentWillReceiveProps(e){this.embedded&&this.updateEmbeddedProps(e)}render(){return!!s&&(0,i.createElement)(s,{ref:"container"})}UNSAFE_componentWillUpdate(){this.destroyEmbedded()}componentDidUpdate(){this.createEmbedded()}componentDidMount(){this.createEmbedded(),super.componentDidMount()}componentWillUnmount(){this.willDestroyEmbedded(),this.destroyEmbedded(),this.didDestroyEmbedded()}createEmbedded(){if(this.shouldCreateEmbedded()){let t;t=s?Object.assign(Object.assign({},this.props),{container:this.refs.container}):this.props,this.embedded=new e(this.modifyConstructorOptions(t)),this.initializeEmbedded()}}}}},88670:(e,t,s)=>{"use strict";s.d(t,{w:()=>g});var i=s(85893),o=s(67294),n=s(4285),a=s(54738),r=s(65201);class l extends o.Component{render(){const{children:e,styles:t}=this.props;return(0,i.jsx)("div",Object.assign({className:t.root},{children:e}),void 0)}}const d=(0,n.Z)((e=>{const{buttonBackgroundColor:t}=e.theme.palette.semantic;return{root:Object.assign(Object.assign({height:a.XT,minWidth:25,paddingLeft:a.W0,paddingRight:a.W0,textAlign:"center"},(0,r.E)(a.q0)),{borderStyle:"solid",borderWidth:1,borderColor:t.tradeNormal,whiteSpace:"nowrap"})}}))(l);var c=s(46411),u=s(93137);class h extends o.Component{render(){const{isCtrl:e,isShift:t,children:s,styles:o}=this.props;return(0,i.jsxs)("div",Object.assign({className:o.root},{children:[e&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(d,{children:(0,c.E)()},void 0),(0,i.jsx)("div",Object.assign({className:o.plus},{children:"+"}),void 0)]},void 0),t&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(d,{children:(0,u.g)()},void 0),(0,i.jsx)("div",Object.assign({className:o.plus},{children:"+"}),void 0)]},void 0),(0,i.jsx)(d,{children:s},void 0)]}),void 0)}}const g=(0,n.Z)((()=>({root:{display:"flex",flexDirection:"row",alignItems:"center",overflow:"hidden"},plus:{marginLeft:a.W0,marginRight:a.W0}})))(h)},43641:(e,t,s)=>{"use strict";s.d(t,{h:()=>x});var i=s(85893),o=s(67294),n=s(4285),a=s(70162),r=s(83069),l=s(54738),d=s(16603),c=s(50137);function u(e,t,s){const{backgroundType:i}=e,{buttonBackgroundColor:o}=e.palette.semantic;let n=s;switch(void 0===n&&(n=i||c.Eo.Primary),n){case c.Eo.Primary:return t?o.primaryDisabled:o.primaryNormal;case c.Eo.Secondary:return t?o.secondaryDisabled:o.secondaryNormal;case c.Eo.Tertiary:return t?o.tertiaryDisabled:null;case c.Eo.Transparent:return"transparent";default:return(0,d.N)(n)}}function h(e,t,s){const{backgroundType:i}=e,{buttonBackgroundColor:o}=e.palette.semantic;let n=s;switch(void 0===n&&(n=i||c.Eo.Primary),n){case c.Eo.Primary:return t?o.primaryDisabled:o.primaryHover;case c.Eo.Secondary:return t?o.secondaryDisabled:o.secondaryHover;case c.Eo.Tertiary:return t?o.tertiaryDisabled:o.tertiaryHover;case c.Eo.Transparent:return"transparent";default:return(0,d.N)(n)}}function g(e,t){const{foregroundColor:s}=e.palette.semantic;return t?s.muted1:s.secondary}function p(e,t){const{foregroundColor:s}=e.palette.semantic;return t?s.muted1:s.primary2}var b=s(65201),v=s(81176),m=s(59628);class j extends o.Component{render(){const{iconSource:e,disabled:t,title:s,size:o,width:n,height:l,testId:d="icon-button",rules:c,onMouseDown:u,onMouseUp:h,onMouseLeave:g,onClick:p,styles:b}=this.props,v=null!=o?o:a.J.Medium;return(0,i.jsx)("div",Object.assign({className:b.root,onMouseDown:u,onMouseUp:h,onMouseLeave:g,onClick:p},{children:(0,i.jsx)(r.J,{size:v,width:n,height:l,source:e,disabled:t,title:s,extend:{iconWrapper:c.iconWrapper(this.props)}},void 0)}),void 0)}}const x=(0,n.Z)((e=>{const{size:t,disabled:s,theme:i,backgroundType:o,width:n,height:a,forceHovered:r}=e;return{root:Object.assign(Object.assign(Object.assign({display:"inline-flex"},(0,b.E)(l.q0)),(0,v.O)({color:r?h(i,s,o):u(i,s,o)})),{fill:r?p(i,s):g(i,s),width:t,height:t,justifyContent:"center",alignItems:"center",nested:{":hover":{background:h(i,s,o),fill:p(i,s)}}}),iconWrapper:{width:n||t,height:a||t,lineHeight:(0,m.a)(a||t)}}}))(j)},28917:(e,t,s)=>{"use strict";s.d(t,{f:()=>S});var i=s(70655),o=s(85893),n=s(67294),a=s(4285),r=s(69880),l=s(54738),d=s(1610),c=s(65201),u=s(3168),h=s(75879),g=s.n(h),p=s(70378),b=s(71383),v=s(51359),m=s(8166);const j=g()([(0,b.$)(m.H).data.isLcg()],(e=>({isLcg:e})))(Object.assign(Object.assign({},(0,p.jo)()),{keySelector:v.Rs}));var x=s(596);class y extends n.Component{render(){const e=this.props,{rules:t,styles:s}=e,n=(0,i._T)(e,["rules","styles"]);return(0,o.jsx)(x.z,Object.assign({},n,{disabled:!0,extend:{root:t.root(this.props),content:t.content(this.props)}}),void 0)}}const S=(0,r.$)(j)((0,a.Z)((e=>({root:Object.assign(Object.assign(Object.assign({},(0,c.E)(l.q0)),(0,u.b5)(e.isLcg)),{display:"block",flexGrow:1}),content:(0,d.d)(e,{foregroundColorNormal:"white",foregroundColorDisabled:"white",backgroundColorNormal:"transparent",backgroundColorHover:"transparent",backgroundColorDisabled:"transparent"})})))(y))},81811:(e,t,s)=>{"use strict";s.d(t,{R:()=>a});var i=s(85893),o=s(67294),n=s(72014);const a=(0,o.memo)((e=>{const{children:t}=e,{width:s,height:o}=(0,n.x)();return(0,i.jsx)(i.Fragment,{children:t(s,o)},void 0)}))},53360:(e,t,s)=>{"use strict";s.d(t,{J:()=>n});var i=s(93302),o=s(3288);function n(e){if(void 0===e||""===e||e===o.kZ)return;const t="-"===e[0],s=(t?e.substr(1):e).replace(/\s/g,"").replace(",","."),n=s.match(/\./g);if(n&&n.length>1)return;if(s.replace(/[0-9.]/g,"").length>0)return;if("."===s[0])return;let a;try{const e=new i.Big(s);if(e.gt(Number.MAX_SAFE_INTEGER))return;a=e.toNumber()}catch(e){return}return!t||a?t?-a:a:void 0}},97067:(e,t,s)=>{"use strict";s.d(t,{m:()=>n});var i=s(75368),o=s(53360);function n(e){if(void 0===(0,o.J)(e))return(0,i.L)("Please enter valid number")}},42647:(e,t,s)=>{"use strict";s.d(t,{z:()=>O});var i=s(85893),o=s(67294),n=s(93269),a=s(87536),r=s(21164),l=s(15720),d=s(59948),c=s(72499),u=s(97067),h=s(54738),g=s(13518),p=s(65201),b=s(81176);const v=e=>{const{disabled:t}=e,{backgroundColor:s}=e.theme.palette.semantic,i=(0,g.p)("inputRoot"),o=(0,g.p)("stepControlRoot");return{root:Object.assign(Object.assign({flexGrow:1,display:"flex"},(0,p.E)(h.q0)),{nested:{[`:hover .${i}`]:Object.assign({},(0,b.O)({color:t?s.primaryDisabled:s.primaryHover})),[`:hover .${o}`]:Object.assign({},(0,b.O)({color:t?s.primaryDisabled:s.primaryHover}))},overflow:"hidden"}),input:{borderTopRightRadius:0,borderBottomRightRadius:0},step:{borderTopRightRadius:h.q0,borderBottomRightRadius:h.q0,nested:{":hover":Object.assign({},(0,b.O)({color:t?s.primaryDisabled:s.primaryHover}))}}}};var m=s(93302),j=s.n(m),x=s(55629),y=s(42983);const S=(0,o.memo)((e=>{const{value:t,disabled:s,prefix:n,postfix:h,step:g,onChange:p,onBlur:b,extend:m}=e,S=(0,u.m)(t),f=Boolean(S),{css:O,rules:C}=(0,y.X)(v,{disabled:s,extend:m}),k=(0,o.useCallback)((e=>{const s=new(j())(t),i=new(j())(g).mul(e),o=s.plus(i);return s!==o?(null==p||p(o.toFixed()),o.toNumber()):t}),[p,t,g]),I=(0,o.useCallback)((e=>{if(void 0===g||s||f)return;let i;i=e.deltaY<0?k(1):e.deltaY>0?k(-1):t,i!==t&&(e.stopPropagation(),e.preventDefault())}),[s,t,g,f,k]),L=(0,o.useCallback)((e=>{let t=!1;const s=e.which;s===x.s.UpArrow?(t=!0,k(c.L.Up)):s===x.s.DownArrow&&(t=!0,k(c.L.Down)),t&&(e.stopPropagation(),e.preventDefault())}),[k]);return(0,i.jsx)(a.Oj,Object.assign({onWheel:I},{children:(0,i.jsxs)("div",Object.assign({className:O.root()},{children:[(0,i.jsx)(l.I,{value:t,type:r.n.Text,prefix:n,postfix:h,onChange:p,onBlur:b,onKeyDown:L,disabled:s,extend:{root:C.input}},void 0),(0,i.jsx)(d.h,{disabled:void 0===g||s||f,onStep:k,extend:{root:C.step}},void 0)]}),void 0)}),void 0)})),f=e=>{const{error:t,disabled:s}=e,{backgroundColor:i}=e.theme.palette.semantic,o=Object.assign(Object.assign({},(0,b.O)({color:s?i.errorDisabled:i.errorNormal})),{nested:{":hover":Object.assign({},(0,b.O)({color:s?i.errorDisabled:i.errorHover}))}}),n=(0,g.p)("inputRoot"),a=(0,g.p)("stepControlRoot");return{root:Boolean(t)&&!s?Object.assign(Object.assign({},o),{nested:{[`:hover .${n}`]:Object.assign({},(0,b.O)({color:s?i.errorDisabled:i.errorHover})),[`:hover .${a}`]:Object.assign({},(0,b.O)({color:s?i.errorDisabled:i.errorHover}))}}):{},input:Boolean(t)&&!s?Object.assign({},o):{},step:Boolean(t)&&!s?Object.assign({},o):{}}},O=(0,o.memo)((e=>{const{value:t,wide:s,error:o,step:a,disabled:r,prefix:l,postfix:d,onChange:c,onBlur:u,extend:h}=e,{rules:g}=(0,y.X)(f,{disabled:r,error:o,extend:h});return(0,i.jsx)(n.c,Object.assign({wide:s,error:o,disabled:r},{children:(0,i.jsx)(S,{value:t,step:a,disabled:r,prefix:l,postfix:d,onChange:c,onBlur:u,extend:{root:g.root,input:g.input,step:g.step}},void 0)}),void 0)}))},15369:(e,t,s)=>{"use strict";s.d(t,{Y:()=>h});var i=s(85893),o=s(67294),n=s(4285),a=s(54738),r=s(13518),l=s(81176),d=s(41296),c=s(65201);class u extends o.Component{constructor(){super(...arguments),this.onCheck=()=>{const{value:e,disabled:t,checked:s,onChange:i}=this.props;t||s||i&&i(e)}}render(){const{children:e,styles:t,title:s,testId:n,checked:a,disabled:r}=this.props,l=(0,o.isValidElement)(e)?o.Children.only(e):e;return(0,i.jsxs)("div",Object.assign({className:t.root,onClick:this.onCheck,title:s},{children:[(0,i.jsx)("div",{className:t.radio},void 0),(0,i.jsx)("div",Object.assign({className:t.label},{children:l}),void 0)]}),void 0)}}const h=(0,n.Z)((e=>{const{disabled:t,checked:s}=e,{backgroundColor:i,foregroundColor:o}=e.theme.palette.semantic,n=(0,r.p)("radio"),u={[`:hover > .${n}`]:Object.assign(Object.assign({},s?{nested:{":after":{background:o.primary2}}}:{}),(0,l.O)({color:i.primaryHover}))},h={cursor:t?"not-allowed":s?"default":"pointer"};return{root:Object.assign(Object.assign({display:"flex",alignItems:"center"},h),{overflow:"hidden",nested:Object.assign({},t?{}:u)}),radio:(0,d.g)(n,(()=>Object.assign(Object.assign(Object.assign(Object.assign({display:"flex",flexDirection:"row",flexShrink:0,alignItems:"center",position:"relative"},(0,c.E)(11)),{width:11,height:11}),(0,l.O)({color:t?i.primaryDisabled:i.primaryNormal})),{nested:Object.assign({},s?{":after":Object.assign(Object.assign({display:"block",position:"absolute",width:5,height:5,top:3,left:3,background:t?o.muted1:o.secondary},(0,c.E)(5)),{content:'""'})}:{})}))),label:Object.assign(Object.assign({flexGrow:1,display:"flex",flexDirection:"row",justifyContent:"center",position:"relative",marginLeft:a.W0,color:t?o.muted1:o.primary2},h),{overflow:"hidden"})}}))(u)},17066:(e,t,s)=>{"use strict";var i;s.d(t,{a:()=>i}),function(e){e.Vertical="vertical",e.Horizontal="horizontal"}(i||(i={}))},30866:(e,t,s)=>{"use strict";s.d(t,{E:()=>c});var i=s(85893),o=s(67294),n=s(8657),a=s(4285),r=s(54738),l=s(17066);class d extends o.Component{constructor(){super(...arguments),this.handleCheck=e=>{const{disabled:t,onChange:s}=this.props;s&&!t&&s(e)}}render(){const{title:e,disabled:t,children:s,value:a,testId:r,styles:l,rules:d}=this.props,c=e?(0,i.jsx)("div",Object.assign({className:l.title},{children:e}),void 0):null,u=o.Children.map(s,(e=>{const s=e;if("number"==typeof s||"string"==typeof s)throw new Error("RadioGroup children should be ReactNodes");const i=(0,n.Z)({root:d.radio},s.props.extend||{});return(0,o.cloneElement)(s,{checked:a===s.props.value,disabled:t||s.props.disabled,onChange:this.handleCheck,extend:i})}));return(0,i.jsxs)("div",Object.assign({className:l.root},{children:[c,(0,i.jsx)("div",Object.assign({className:l.radioBlock},{children:u}),void 0)]}),void 0)}}d.defaultProps={layout:l.a.Horizontal};const c=(0,a.Z)((e=>{const{disabled:t,layout:s}=e,{foregroundColor:i}=e.theme.palette.semantic,o=s===l.a.Horizontal;return{root:{flexGrow:1,display:"flex",flexDirection:o?"row":"column",alignItems:o?"center":"flex-start",overflow:"hidden"},title:{color:t?i.muted1:i.primary2,marginRight:r.W0},radioBlock:{flexGrow:1,display:"flex",flexDirection:o?"row":"column",alignItems:o?"center":"flex-start",overflow:"hidden"},radio:{marginRight:r.W0,nested:{":last-child":{marginRight:0}}}}}))(d)},55319:(e,t,s)=>{"use strict";s.d(t,{S:()=>b});var i=s(85893),o=s(67294),n=s(4285),a=s(15369),r=s(30866),l=s(17066),d=s(81176),c=s(81996),u=s(80803),h=s(54738);const g=(0,n.Z)((e=>{const{checked:t,disabled:s}=e,{buttonBackgroundColor:i,foregroundColor:o}=e.theme.palette.semantic;let n=Object.assign(Object.assign({color:o.secondary},(0,d.O)({color:i.primaryNormal})),{nested:{":hover":Object.assign({color:o.primary2},(0,d.O)({color:i.primaryHover}))}});return t&&(n=Object.assign(Object.assign({color:o.primary2},(0,d.O)({color:i.primaryToggled})),{borderBottom:`1px solid ${i.positiveNormal}`,nested:{":hover":Object.assign({},(0,d.O)({color:i.primaryToggled})),":only-child":{borderBottom:"none"}}})),s&&(n=Object.assign(Object.assign({color:o.muted1},(0,d.O)({color:i.primaryDisabled})),{nested:{":hover":Object.assign({color:o.muted1},(0,d.O)({color:i.primaryDisabled}))}})),{root:Object.assign(Object.assign({marginLeft:1},(0,c.o)(3,15)),n),radio:{display:"none"},label:Object.assign(Object.assign({},(0,u.e)(0)),{whiteSpace:"nowrap"})}}))(a.Y);class p extends o.Component{constructor(){super(...arguments),this.onChange=e=>{const{data:t,disabled:s,onChange:i}=this.props;if(s||!i)return;const o=t.find((t=>t.value===e));o&&!o.disabled&&i(e)}}render(){const{data:e,value:t,disabled:s,testId:o,rules:n}=this.props,a=e.map((e=>(0,i.jsx)(g,Object.assign({value:e.value,disabled:s||e.disabled,title:e.title,testId:e.testId},{children:e.label}),e.value)));return(0,i.jsx)(r.E,Object.assign({layout:l.a.Horizontal,value:t,disabled:s,onChange:this.onChange,testId:o,extend:{root:n.root(this.props),title:n.title(this.props),radioBlock:n.radioBlock(this.props),radio:n.radio(this.props)}},{children:a}),void 0)}}const b=(0,n.Z)((e=>{const{stretch:t}=e;return{root:Object.assign({},t&&{flexGrow:1,display:"flex"}),title:{},radioBlock:Object.assign({},t&&{flexGrow:1,display:"flex"}),radio:Object.assign({marginRight:0,nested:{":first-child":{marginLeft:0,borderTopLeftRadius:h.q0,borderBottomLeftRadius:h.q0},":last-child":{borderTopRightRadius:h.q0,borderBottomRightRadius:h.q0}}},t&&{flexGrow:1,justifyContent:"center"})}}))(p)},76847:(e,t,s)=>{"use strict";var i;s.d(t,{y:()=>i}),function(e){e.Vertical="Vertical",e.Horizontal="Horizontal"}(i||(i={}))},33145:(e,t,s)=>{"use strict";s.d(t,{g:()=>g});var i=s(85893),o=s(36700),n=s(67294),a=s(76847);const r=e=>{const{orientation:t}=e;return{root:{flexGrow:1,display:"flex",flexDirection:t===a.y.Vertical?"column":"row",overflow:"hidden"}}};var l,d=s(54738);!function(e){e.Vertical="Vertical",e.Horizontal="Horizontal"}(l||(l={}));const c=e=>{const{disabled:t,orientation:s}=e;return{root:{flexShrink:0,flexBasis:d.W0,cursor:t?"auto":s===l.Horizontal?d.TI:d.ir}}};var u=s(42983);const h=(0,n.memo)((e=>{const{disabled:t,orientation:s,onDragStart:o,onDragMove:a,onDragEnd:r,testId:l}=e,{css:d}=(0,u.X)(c,{disabled:t,orientation:s}),[h,g]=(0,n.useState)(!1),p=(0,n.useCallback)((e=>{a(e)}),[a]),b=(0,n.useCallback)((()=>{r(),g(!1)}),[r,g]);(0,n.useEffect)((()=>(h&&(window.addEventListener("mousemove",p,!1),window.addEventListener("mouseup",b,!1)),()=>{window.removeEventListener("mousemove",p,!1),window.removeEventListener("mouseup",b,!1)})),[h,p,b]);const v=(0,n.useCallback)((e=>{t||(o(e),g(!0))}),[o,t,g]);return(0,i.jsx)("div",{className:d.root(),onMouseDown:v},void 0)})),g=(0,n.memo)((e=>{const{disabled:t,orientation:s,children:d,width:c,height:g,testId:p}=e,{css:b}=(0,u.X)(r,{orientation:s}),[v,m]=(0,n.useState)(void 0),[j,x]=(0,n.useState)(void 0),[y,S]=(0,n.useState)(void 0),[f,O]=(0,n.useState)(!1),C=(0,n.useRef)(void 0),k=(0,n.useRef)(void 0),I=n.Children.toArray(d);(0,n.useEffect)((()=>{var e,t,s,i;const o=k.current;f||!o||(null===(e=o[v])||void 0===e?void 0:e.props.ratio)===(null===(t=I[v])||void 0===t?void 0:t.props.ratio)&&(null===(s=o[j])||void 0===s?void 0:s.props.ratio)===(null===(i=I[j])||void 0===i?void 0:i.props.ratio)||S(void 0),k.current=I}),[I,v,j,m,x,S,f]);const L=(0,n.useCallback)((()=>s===a.y.Vertical?g:c),[s,g,c]),w=(0,n.useCallback)(((e,t)=>s===a.y.Vertical?t:e),[s]),T=(0,n.useCallback)(((e,t)=>s=>{C.current=w(s.pageX,s.pageY),m(e),x(t),O(!0)}),[w,m,x,O]),D=(0,n.useCallback)((e=>{var t,s;const i=L();let o=C.current-w(e.pageX,e.pageY);const n=I[v].props.ratio*i,a=I[j].props.ratio*i,r=I[v].props.minSize,l=null!==(t=I[v].props.maxSize)&&void 0!==t?t:Number.MAX_SAFE_INTEGER;void 0!==r&&n-o<r&&(o=n-r),void 0!==l&&n-o>l&&(o=n-l);const d=I[j].props.minSize,c=null!==(s=I[j].props.maxSize)&&void 0!==s?s:Number.MAX_SAFE_INTEGER;void 0!==d&&a+o<d&&(o=d-a),void 0!==c&&a+o>c&&(o=c-a),S(o/i)}),[v,j,L,w,I]),P=(0,n.useCallback)((()=>{var e,t,s,i;if(0===y)S(void 0);else if(y){const o=I[v].props.ratio||1,n=I[j].props.ratio||0;null===(t=(e=I[v].props).onChange)||void 0===t||t.call(e,o-y),null===(i=(s=I[j].props).onChange)||void 0===i||i.call(s,n+y)}O(!1)}),[v,j,y,I]);let N=0;return(0,i.jsx)("div",Object.assign({className:b.root(),style:{width:c,height:g}},{children:I.map(((e,r)=>{let d=e.props.ratio;y&&(r===v&&(d=I[v].props.ratio-y),r===j&&(d=I[j].props.ratio+y)),N+=d,r===I.length-1&&(d+=1-N);const c={position:"relative",display:"flex",flexGrow:1,flexDirection:s===a.y.Horizontal?"row":"column",flexBasis:void 0!==e.props.minSize?`${(0,o.yI)(d)}%`:"100%",minWidth:s===a.y.Horizontal?e.props.minSize:void 0,maxWidth:s===a.y.Horizontal?e.props.maxSize:void 0,minHeight:s===a.y.Vertical?e.props.minSize:void 0,maxHeight:s===a.y.Vertical?e.props.maxSize:void 0,overflow:"hidden"};return r===I.length-1?(0,i.jsx)("div",Object.assign({style:c},{children:e}),`resize-${r}`):(0,i.jsxs)(n.Fragment,{children:[(0,i.jsx)("div",Object.assign({style:c},{children:e}),void 0),void 0!==e.props.minSize&&(0,i.jsx)(h,{disabled:t,orientation:s===a.y.Vertical?l.Horizontal:l.Vertical,onDragStart:T(r,r+1),onDragMove:D,onDragEnd:P,testId:`${p}-divider`},void 0)]},`resize-${r}`)}))}),void 0)}))},91586:(e,t,s)=>{"use strict";s.d(t,{k:()=>o});var i=s(85893);const o=(0,s(67294).memo)((e=>{const{children:t}=e;return(0,i.jsx)(i.Fragment,{children:t},void 0)}))},54991:(e,t,s)=>{"use strict";s.d(t,{M:()=>p});var i=s(70655),o=s(85893),n=s(67294),a=s(4285),r=s(35394),l=s(83069),d=s(70162),c=s(54738),u=s(15720),h=s(58429);class g extends n.Component{constructor(){super(...arguments),this.onClick=e=>{const{onClear:t}=this.props;e.stopPropagation(),null==t||t("")}}render(){const e=this.props,{testId:t,rules:s,styles:n}=e,a=(0,i._T)(e,["testId","rules","styles"]);return(0,o.jsxs)("div",Object.assign({className:n.root},{children:[(0,o.jsx)(u.I,Object.assign({},a,{extend:{input:s.input(this.props)}}),void 0),this.renderIcon()]}),void 0)}renderIcon(){const{value:e,forceCrossIcon:t,onClear:s,rules:i}=this.props,n=e&&s||t?r.Y.cross:r.Y.search;return(0,o.jsx)(h.o,Object.assign({onClick:this.onClick,testId:"clear-control",extend:{root:i.clear(this.props)}},{children:(0,o.jsx)(l.J,{source:n,size:d.J.Control},void 0)}),void 0)}}const p=(0,a.Z)((e=>{const{foregroundColor:t}=e.theme.palette.semantic,{body:s}=e.theme.font.semantic;return{root:{position:"relative",fill:t.secondary,width:"100%"},input:{paddingRight:s.primary+2*c.W0},clear:{position:"absolute",top:1,right:1,":hover":{cursor:"pointer"}}}}))(g)},24025:(e,t,s)=>{"use strict";s.d(t,{J:()=>c});var i=s(85893),o=s(14953),n=s(67294),a=s(68860),r=s(54738);const l=()=>{const e={position:"absolute",right:4};return{root:{flexGrow:1,paddingLeft:0,paddingRight:0,position:"relative"},placeholder:{},placeholderContent:{},arrow:e,arrowHover:e,arrowOpen:e,popper:{},inputRoot:{},inputInput:{},inputPostfix:{marginRight:3*r.W0},option:{},selectedOption:{}}};var d=s(42983);const c=(0,n.memo)((e=>{const{disabled:t,hideShadows:s,options:r,value:c,prefix:u,postfix:h,error:g,testId:p,onChange:b}=e,{rules:v}=(0,d.X)(l,{}),[m,j]=(0,n.useState)(c),[x,y]=(0,n.useState)(void 0);(0,n.useEffect)((()=>{j(c)}),[c]);const S=(0,n.useCallback)((e=>{y(e),void 0!==e&&(j(e),null==b||b(e))}),[j,b,y]),f=(0,n.useCallback)((()=>(0,i.jsx)(a.U,{value:m,error:g,prefix:u,postfix:h,onChange:S,disabled:t,extend:{root:v.inputRoot,input:v.inputInput,postfix:v.inputPostfix}},void 0)),[g,u,h,t,v,m,S]);return(0,i.jsx)(o.P,{value:m,highlight:x,options:r,disabled:t,preselected:!1,hideShadows:s,renderPlaceholder:f,onHighlight:S,onChange:b,testId:p,extend:{root:v.root,placeholder:v.placeholder,placeholderContent:v.placeholderContent,popper:v.popper,arrow:v.arrow,arrowHover:v.arrowHover,arrowOpen:v.arrowOpen,option:v.option,selectedOption:v.selectedOption}},void 0)}))},70623:(e,t,s)=>{"use strict";s.d(t,{m:()=>c});var i=s(85893),o=s(67294),n=s(4285),a=s(93269),r=s(81176),l=s(14953);class d extends o.PureComponent{render(){const{options:e,value:t,placeholder:s,disabled:o,error:n,renderOption:r,onChange:d,wide:c,rules:u,testId:h}=this.props;return(0,i.jsx)(a.c,Object.assign({error:n,disabled:o,wide:c},{children:(0,i.jsx)(l.P,{options:e,value:t,placeholder:s,disabled:o,renderOption:r,onChange:d,testId:h,extend:{root:u.root(this.props)}},void 0)}),void 0)}}const c=(0,n.Z)((e=>{const{disabled:t,error:s}=e,{backgroundColor:i}=e.theme.palette.semantic,o=Object.assign(Object.assign({},(0,r.O)({color:t?i.errorDisabled:i.errorNormal})),{nested:{":hover":Object.assign({},(0,r.O)({color:t?i.errorDisabled:i.errorHover}))}});return{root:Boolean(s)&&!t?o:{}}}))(d)},78874:(e,t,s)=>{"use strict";s.d(t,{i:()=>f});var i=s(85893),o=s(16603),n=s(33535),a=s(69203),r=s(67294),l=s(73935),d=s(60775);class c extends r.Component{constructor(){super(...arguments),this.onDragStart=e=>{const{disabled:t,onStartChange:s,isDraggingChanged:i}=this.props;if(e.stopPropagation(),!t){const{pageX:t}=e;s().then((()=>{const{position:e,offset:s}=this.props;this.dragOffset=t-e-s,this.addListener()})).catch(d.V),null==i||i(!0)}},this.onDragEnd=()=>{const{isDraggingChanged:e}=this.props;this.removeListener(),null==e||e(!1)},this.onMove=e=>{const{onChange:t}=this.props;t(this.calculateOffsetFromPosition(e.pageX))}}componentWillUnmount(){this.onDragEnd()}render(){const{className:e,position:t,zIndex:s}=this.props,o={left:`${t}px`,zIndex:s};return(0,i.jsx)("span",{style:o,onMouseDown:this.onDragStart,className:e},void 0)}calculateOffsetFromPosition(e){const{offset:t,minPosition:s,maxPosition:i}=this.props;return Math.min(Math.max(e-t-this.dragOffset,s),i)}addListener(){document.addEventListener("mousemove",this.onMove,!1),document.addEventListener("mouseup",this.onDragEnd,!1)}removeListener(){document.removeEventListener("mouseup",this.onDragEnd,!1),document.removeEventListener("mousemove",this.onMove,!1)}}const u=c;var h=s(5875);const g=10;var p=s(80803),b=s(65201),v=s(81176),m=s(4285),j=s(71620);function x(e){return"object"==typeof e}function y(e){return!x(e)}class S extends r.Component{constructor(){super(...arguments),this.onMouseDown=e=>{const{onChange:t,value:s,disabled:i}=this.props;if(this.calculate(),t&&!i){const i=this.getClosestPoint(this.calculateValue(this.calcOffsetFromPosition(e.pageX)));if(y(s))t(i);else if(x(s)){let e;e=i<s.value1?"value1":i>s.value2||Math.abs(s.value1-i)-Math.abs(s.value2-i)>0?"value2":"value1",t(Object.assign(Object.assign({},s),{[e]:i}))}else(0,o.N)(s)}},this.handleValue1Change=e=>{const{value:t,onChange:s}=this.props;this.calculate();const i=this.getClosestPoint(this.calculateValue(e));s&&(x(t)?s(Object.assign(Object.assign({},t),{value1:i})):y(t)&&s(i))},this.handleValue2Change=e=>{const{onChange:t,value:s}=this.props;this.calculate();const i=this.getClosestPoint(this.calculateValue(e));t&&(x(s)?t(Object.assign(Object.assign({},s),{value2:i})):y(s)&&t(i))},this.onHandleStartChange=()=>new Promise((e=>{this.calculate(),this.forceUpdate(e)}))}componentDidMount(){this.rootEl=(0,l.findDOMNode)(this),this.calculate(),this.forceUpdate()}componentDidUpdate(e){const{min:t,max:s}=this.props;t===e.min&&s===e.max||this.calculate()}render(){const{displayMinMax:e,styles:t}=this.props;return this.rect?(0,i.jsxs)("div",Object.assign({className:t.root},{children:[(0,i.jsxs)("div",Object.assign({className:t.trackContainer,onMouseDown:this.onMouseDown},{children:[(0,i.jsx)("div",{className:t.track},void 0),(0,i.jsx)("div",{className:t.progress,style:this.getProgressStyle()},void 0),this.renderHandle("value1"),this.renderHandle("value2")]}),void 0),e&&this.renderMinMax()]}),void 0):(0,i.jsx)("div",{className:t.root},void 0)}renderHandle(e){const{step:t,value:s,disabled:o,valuesCanBeEqual:n,max:a,isDraggingChanged:r,styles:l}=this.props;let d,c,h=0,g=this.maxPosition,p=!0;if(x(s)){const{value1:i,value2:o}=s,r=n?0:t;"value1"===e?g=this.getPosition(o-r):h=this.getPosition(i+r),d=s[e],o===i&&o===a&&"value1"===e&&(c=2)}else y(s)&&(p="value1"===e,d=s);const b="value1"===e?this.handleValue1Change:this.handleValue2Change;return p&&(0,i.jsx)(u,{className:l.handle,position:this.getPosition(d),offset:this.rect.left,disabled:o,minPosition:h,maxPosition:g,onChange:b,onStartChange:this.onHandleStartChange,zIndex:c,isDraggingChanged:r},void 0)}calculateValue(e){const{min:t,max:s,digits:i}=this.props,o=(0,n.R)(t),a=(0,n.R)(s),r=(0,n.R)(this.valueRatio);return j.p.min(j.p.ceil(o.plus(r.mul(e)),i),a).toNumber()}calcOffsetFromPosition(e){return e-this.rect.left}getClosestPoint(e){const{min:t,step:s,digits:i}=this.props,o=(0,n.R)(t),a=(0,n.R)(s),r=(0,n.R)(e).sub(o).div(a).round().mul(s).plus(t);return parseFloat(r.toFixed(i))}getPosition(e){const{min:t,max:s}=this.props;return(Math.min(Math.max(e,t),s)-t)*this.positionRatio}calculate(){const{min:e,max:t}=this.props;this.rect=this.rootEl.getBoundingClientRect(),this.range=t-e,this.maxPosition=this.rect.width-g,this.valueRatio=this.range/this.maxPosition,this.positionRatio=this.maxPosition/this.range}getProgressStyle(){const{value:e}=this.props;if(y(e))return{width:this.getPosition(e)+5};if(x(e)){if(Number.isNaN(e.value1)||Number.isNaN(e.value2)||Number(e.value1)>Number(e.value2))return{left:0,width:0};const t=this.getPosition(e.value1);return{left:t,width:this.getPosition(e.value2)-t+5}}return(0,o.N)(e)}renderMinMax(){const{min:e,max:t,formatMinMax:s,styles:o}=this.props;if(void 0===e||void 0===t)return null;const n=s||a.Z;return(0,i.jsxs)("div",Object.assign({className:o.minMaxElement},{children:[(0,i.jsx)("div",{children:n(e)},void 0),(0,i.jsx)("div",{children:n(t)},void 0)]}),void 0)}}S.defaultProps={step:1,min:0,max:100,digits:2,disabled:!1};const f=(0,m.Z)((e=>{const{buttonBackgroundColor:t,backgroundColor:s}=e.theme.palette.semantic,i="#BDBDBD",o=e.disabled?(0,h.h)(i,.5):i,n=e.disabled?(0,h.h)(t.positiveNormal,.5):t.positiveNormal,a=e.disabled?(0,h.h)(s.primaryNormal,.5):s.primaryNormal;return{root:{opacity:e.disabled?.5:1},trackContainer:{height:5,position:"relative",marginRight:"-5px"},track:Object.assign(Object.assign(Object.assign({height:"100%"},(0,p.e)(0,5)),(0,b.E)(2.5)),(0,v.O)({color:a})),handle:Object.assign(Object.assign(Object.assign({width:g,height:10,top:"50%",position:"absolute",marginTop:-5},(0,b.E)("50%")),(0,v.O)({color:o})),{boxShadow:"0 0 2px rgba(0, 0, 0, 0.5)"}),progress:Object.assign(Object.assign({position:"absolute",top:0,left:0,height:"100%"},(0,b.E)(2.5)),(0,v.O)({color:n})),minMaxElement:{display:"flex",justifyContent:"space-between",marginTop:5}}}))(S)},22972:(e,t,s)=>{"use strict";s.d(t,{F:()=>i,T:()=>o});const i=500,o=30},72499:(e,t,s)=>{"use strict";var i,o;s.d(t,{L:()=>i,i:()=>o}),function(e){e[e.Up=1]="Up",e[e.Down=-1]="Down"}(i||(i={})),function(e){e.Change="change",e.Stop="stop"}(o||(o={}))},59948:(e,t,s)=>{"use strict";s.d(t,{h:()=>b});var i=s(85893),o=s(67294),n=s(55629),a=s(22972),r=s(72499),l=s(81176),d=s(13518),c=s(41296),u=s(3168),h=s(50137);const g=e=>{const{disabled:t}=e,{foregroundColor:s,backgroundColor:i}=e.theme.palette.semantic,o=Object.assign(Object.assign({},(0,l.O)({color:t?i.primaryDisabled:i.primaryNormal})),{nested:{":hover":Object.assign({},(0,l.O)({color:t?i.primaryDisabled:i.primaryHover}))}}),n={position:"absolute",right:2},a=t?s.muted2:s.tertiary,r=e=>t?{}:{":hover > div":{[e]:s.primary2}},g=(0,d.p)("stepControlRoot"),p={width:10,height:8};return{root:(0,c.g)(g,(()=>Object.assign(Object.assign({},o),{width:14,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",position:"relative",marginRight:1}))),increase:Object.assign(Object.assign(Object.assign({},p),r("borderBottomColor")),{marginBottom:1}),decrease:Object.assign(Object.assign(Object.assign({},p),r("borderTopColor")),{marginTop:1}),increaseArrow:Object.assign(Object.assign(Object.assign({},n),(0,u.sP)(8,4,h.n4.UP,a)),{bottom:"50%",marginBottom:2}),decreaseArrow:Object.assign(Object.assign(Object.assign({},n),(0,u.sP)(8,4,h.n4.DOWN,a)),{top:"50%",marginTop:2})}};var p=s(42983);const b=(0,o.memo)((e=>{const{scrollSpeed:t=a.F,scrollDelay:s=a.T,onStep:l,disabled:d,onMouseEnter:c,onMouseLeave:u,extend:h}=e,{css:b}=(0,p.X)(g,{disabled:d,extend:h}),{afterDelay:v,resetDelay:m}=(e=>{const[t,s]=(0,o.useState)(!1),i=(0,o.useRef)();return(0,o.useEffect)((()=>{if(t){const t=setTimeout((()=>{var e;null===(e=i.current)||void 0===e||e.call(i)}),e);return()=>{clearTimeout(t)}}}),[t,e]),{afterDelay:e=>{s(!0),i.current=e},resetDelay:()=>{s(!1)}}})(s),{startStepInterval:j,resetStepInterval:x}=((e,t)=>{const[s,i]=(0,o.useState)(!1),[n,a]=(0,o.useState)();return(0,o.useEffect)((()=>{if(s&&void 0!==n){const s=setInterval((()=>{t(n)}),e);return()=>{clearInterval(s)}}}),[s,n,t,e]),{startStepInterval:e=>{i(!0),a(e)},resetStepInterval:()=>{i(!1)}}})(t,(e=>{l(e)})),y=(0,o.useCallback)((e=>{l(e),v((()=>{j(e)}))}),[l,v,j]),S=(0,o.useCallback)((()=>{m(),x()}),[m,x]),f=(0,o.useCallback)((e=>{let t=!1;const s=e.which;s===n.s.UpArrow?(t=!0,y(r.L.Up)):s===n.s.DownArrow&&(t=!0,y(r.L.Down)),t&&(e.stopPropagation(),e.preventDefault())}),[y]),O=(0,o.useCallback)((e=>{e.stopPropagation(),d||y(r.L.Up)}),[d,y]),C=(0,o.useCallback)((e=>{e.stopPropagation(),d||y(r.L.Down)}),[d,y]),k=(0,o.useCallback)((e=>{e.stopPropagation(),S()}),[S]),I=(0,o.useCallback)((()=>{null==c||c()}),[c]),L=(0,o.useCallback)((()=>{null==u||u()}),[u]);return(0,i.jsxs)("div",Object.assign({className:b.root(),onKeyDown:f,onKeyUp:S,onMouseEnter:I,onMouseLeave:L},{children:[(0,i.jsx)("div",Object.assign({className:b.increase(),onMouseDown:O,onMouseUp:S,onClick:k,onMouseLeave:S},{children:(0,i.jsx)("div",{className:b.increaseArrow()},void 0)}),void 0),(0,i.jsx)("div",Object.assign({className:b.decrease(),onMouseDown:C,onMouseUp:S,onClick:k,onMouseLeave:S},{children:(0,i.jsx)("div",{className:b.decreaseArrow()},void 0)}),void 0)]}),void 0)}))},80122:(e,t,s)=>{"use strict";var i;s.d(t,{K:()=>i}),function(e){e[e.left=0]="left",e[e.right=1]="right"}(i||(i={}))},23414:(e,t,s)=>{"use strict";s.d(t,{O:()=>r});var i=s(85893),o=s(67294),n=s(4285);class a extends o.Component{render(){const{children:e,styles:t,testId:s}=this.props;return(0,i.jsx)("div",Object.assign({className:t.root},{children:e}),void 0)}}const r=(0,n.Z)((()=>({root:{}})))(a)},44214:(e,t,s)=>{"use strict";s.d(t,{n:()=>y});var i=s(85893),o=s(67294),n=s(4285),a=s(54738),r=s(81176),l=s(81996);class d extends o.Component{render(){const{children:e,styles:t}=this.props;return(0,i.jsx)("div",Object.assign({className:t.root},{children:e}),void 0)}}const c=(0,n.Z)((e=>{const{secondaryNormal:t}=e.theme.palette.semantic.backgroundColor;return{root:Object.assign(Object.assign(Object.assign({},(0,r.O)({color:t})),(0,l.o)(a.W0)),{borderTopLeftRadius:e.hasLeftHeadElement?void 0:a.q0,borderTopRightRadius:e.hasRightHeadElement?void 0:a.q0,borderBottomLeftRadius:a.q0,borderBottomRightRadius:a.q0,overflow:"hidden"})}}))(d);var u=s(80122),h=s(65201);const g=e=>{const{align:t,selected:s,disabled:i,count:o}=e,{backgroundColor:n,foregroundColor:d,badgeBackgroundColor:c,buttonBackgroundColor:g}=e.theme.palette.semantic;let p;p=s?i?n.secondaryDisabled:n.secondaryNormal:i?g.primaryDisabled:n.tertiaryNormal;const b=s||i?null:n.tertiaryHover,v=i?d.muted1:s?d.primary2:d.secondary,m=i?d.muted1:d.primary2;return{root:Object.assign(Object.assign(Object.assign(Object.assign({position:"relative",display:"flex",flexDirection:"row"},(0,r.O)({color:p})),{marginLeft:t===u.K.right?a.W0:0,marginRight:t===u.K.left?a.W0:0}),(0,l.o)(a.W0)),{borderTopLeftRadius:a.q0,borderTopRightRadius:a.q0,justifyContent:"center",":hover":Object.assign(Object.assign({},(0,r.O)({color:b})),{color:m}),color:v,whiteSpace:"nowrap",overflow:"hidden"}),counter:Object.assign(Object.assign(Object.assign(Object.assign({},(0,r.O)({color:o>0?c.positive:c.muted1})),{color:d.primary1,fontSize:12,marginLeft:5,height:16}),(0,h.E)(a.q0)),{justifyContent:"center",alignItems:"center",paddingLeft:a.W0,paddingRight:a.W0})}};var p=s(2070),b=s(42983);const v=(0,o.memo)((e=>{const{id:t,align:s,selected:n,disabled:a,count:r,children:l,onClick:d,testId:c,extend:u={}}=e,h=(0,o.useRef)(r),[v,m]=(0,o.useState)(!1),[j,x]=(0,o.useState)(!1),y=(0,o.useRef)(),S=(0,o.useRef)(),{theme:f}=(0,p.S)(),{css:O}=(0,b.X)(g,{align:s,selected:n,disabled:a,count:r,flash:j,transition:v,extend:u}),C=(0,o.useCallback)((()=>{a||d(t)}),[a,d,t]);(0,o.useLayoutEffect)((()=>void 0===r||h.current===r?(h.current=r,()=>null):(m(!0),S.current=window.setTimeout((()=>{x(!0)}),0),y.current=window.setTimeout((()=>{m(!1),x(!1)}),300),h.current=r,()=>{window.clearTimeout(y.current),window.clearTimeout(S.current)})),[h,r,y,S]);const k=(0,o.useMemo)((()=>({backgroundColor:j?f.palette.semantic.backgroundColor.secondaryNormal:void 0,transition:v?"background-color 300ms ease, border-bottom-color 300ms ease":void 0})),[j,v,f]);return(0,i.jsxs)("div",Object.assign({className:O.root(),onClick:C,style:k},{children:[l,void 0!==r&&(0,i.jsx)("div",Object.assign({className:O.counter()},{children:r}),void 0)]}),void 0)}));var m=s(58779),j=s(41296);class x extends o.Component{constructor(){super(...arguments),this.state={selected:void 0},this.setSelectedTab=e=>{const{onChange:t}=this.props;this.isControlled()?t(e):this.setState({selected:e})}}render(){const{testId:e,styles:t}=this.props;return(0,i.jsxs)("div",Object.assign({className:t.root},{children:[this.renderHead(),this.renderBody()]}),void 0)}isControlled(){return"selected"in this.props}getSelected(){const{selected:e}=this.props,{selected:t}=this.state,s=this.isControlled()?void 0!==e?e:this.getDefaultTabId():void 0!==t?t:this.getDefaultTabId();return void 0!==this.getTab(s)?s:this.getDefaultTabId()}renderHead(){const{styles:e}=this.props,t=this.getTabs(),s=[],o=[];return t.forEach((e=>{var t;(null!==(t=e.props.align)&&void 0!==t?t:u.K.left)===u.K.left?s.push(e):o.push(e)})),(0,i.jsxs)("div",Object.assign({className:e.head},{children:[(0,i.jsx)("div",Object.assign({className:e.leftTabs},{children:s.map((e=>this.renderHeadElement(e,u.K.left)))}),void 0),(0,i.jsx)("div",Object.assign({className:e.rightTabs},{children:o.map((e=>this.renderHeadElement(e,u.K.right)))}),void 0)]}),void 0)}getDefaultTabId(){return this.getTabs()[0].props.id}getTabs(){const{children:e}=this.props;return o.Children.toArray(e).filter((e=>e))}getTab(e){return this.getTabs().find((t=>t.props.id===e))}renderHeadElement(e,t){const{disabled:s,rules:o}=this.props,{id:n,label:a,count:r,extend:l,disabled:d,onClick:c,testId:u}=e.props,h=this.getSelected()===n,g=[o.headElement,"object"==typeof l&&l.root,h&&o.selectedHeadElement].filter((e=>e)),p=(0,j.g)(...g),b=!h&&s,m=u?`${u}-tab`:void 0;return(0,i.jsx)(v,Object.assign({id:n,align:t,selected:h,disabled:b||d,count:r,onClick:null!=c?c:this.setSelectedTab,testId:m,extend:{root:p}},{children:a}),n)}renderBody(){const{rules:e}=this.props,t=this.getTabs(),s=t.some((e=>e.props.align===u.K.left)),n=t.some((e=>e.props.align===u.K.right)),a=this.getTab(this.getSelected());return(0,i.jsx)(c,Object.assign({hasLeftHeadElement:s,hasRightHeadElement:n,extend:{root:e.body}},{children:(0,o.cloneElement)(a,{extend:Object.assign(Object.assign({},a.props.extend),{root:e.tab})})}),void 0)}}x.defaultProps={onChange:()=>{}};const y=(0,n.Z)((e=>{const{height:t}=e,{backgroundColor:s}=e.theme.palette.semantic;return{root:{flexGrow:1,flexShrink:1,display:"flex",flexDirection:"column",width:"100%",height:t,overflow:"hidden"},head:{display:"flex",justifyContent:"space-between",flexShrink:0},body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,m.f)(1)),{display:"flex"}),(0,r.O)({color:s.secondaryNormal})),(0,l.o)(a.W0)),{borderBottomLeftRadius:a.q0,borderBottomRightRadius:a.q0}),tab:{display:"flex",flexGrow:1,width:"100%",overflow:"hidden"},selectedHeadElement:{},headElement:{},leftTabs:{display:"flex"},rightTabs:{display:"flex"}}}))(x)},57776:(e,t,s)=>{"use strict";s.d(t,{n:()=>c});var i=s(85893),o=s(35394),n=s(42952),a=s(67294),r=s(4285),l=s(83069);class d extends a.Component{render(){const{styles:e}=this.props;return(0,i.jsx)("div",Object.assign({className:e.root},{children:this.renderContent()}),void 0)}renderContent(){const{disabled:e,source:t,size:s,children:a,placement:r,disabledTooltip:d,maxWidthElement:c,autoWidthElement:u,rules:h}=this.props;return(null!=d?d:e)?(0,i.jsx)(l.J,{size:s||20,source:t||o.Y.info,disabled:e},void 0):(0,i.jsxs)(n.b,Object.assign({placement:r,maxWidthElement:c,autoWidthElement:u},{children:[(0,i.jsx)(l.J,{size:s||20,source:t||o.Y.info,disabled:e,extend:{root:h.icon}},void 0),a]}),void 0)}}const c=(0,r.Z)((e=>{const{foregroundColor:t}=e.theme.palette.semantic;return{root:{display:"inline-block",fill:t.tertiary},icon:{}}}))(d)},4792:(e,t,s)=>{"use strict";s.d(t,{y:()=>a});var i=s(70003),o=s(19755),n=s(19755);class a extends class{constructor(){this.events={},this.isBound=null,this.isDestroyed=!1,this.destroySubject=new i.t(1),this.destroy$=this.destroySubject.asObservable()}on(e,t){return void 0===this.events[e]&&(this.events[e]=[]),this.events[e].push(t),this}trigger(e){if(void 0===this.events[e]&&(this.events[e]=[]),!(this.events[e].length<=0))for(let t=0;t<this.events[e].length;t++)this.events[e][t].apply(this)}destroy(){this.events={},this.isDestroyed=!0,this.destroySubject.next(void 0),this.destroySubject.complete()}bindEvents(){this.isBound||(this.isBound=!0)}unbindEvents(){this.isBound=!1}}{constructor(e={}){super(),this.updateRequested=!1,this.hidden=!1,this.active=!1,this.isDomCreated=!1,this.$container=e.container?o(e.container):o("<div>"),this.container=this.$container.get(0),this.$container.addClass(e.className),this.name=e.name||"",this.parent=e.parent}get width(){return void 0===this.uiWidth?this.$container.outerWidth():this.uiWidth}set width(e){this.uiWidth=e}get height(){return void 0===this.uiHeight?this.$container.outerHeight():this.uiHeight}set height(e){this.uiHeight=e}getContainer(){return this.$container}destroy(){this.$container?this.$container.remove():this.container&&o(this.container).remove(),this.$container=void 0,this.container=void 0,this.parent=void 0,super.destroy()}setDimensions(e,t){this.uiWidth=e,this.uiHeight=t,this.updateNodeDimensions()}append(e){if(e instanceof a)return this.$container.append(e.getContainer()),e;const t=e instanceof n?e:o(e);return this.$container.append(t),t}hide(e){return this.hidden&&!e||(this.hidden=!0,this.$container.hide()),this}show(e,t){return(this.hidden||e)&&(this.hidden=!1,this.$container.css("display","")),this}update(){this.updateRequested||(this.updateRequested=!0,requestAnimationFrame((()=>{this.updateRequested=!1})))}activate(){this.active=!0}deactivate(){this.active=!1}updateNodeDimensions(){this.$container&&(void 0!==this.uiWidth&&this.$container.css("width",this.uiWidth),void 0!==this.uiHeight&&this.$container.css("height",this.uiHeight))}}},52464:(e,t,s)=>{"use strict";var i;s.d(t,{u:()=>i}),function(e){e.Horizontal="Horizontal",e.Vertical="Vertical"}(i||(i={}))},37588:(e,t,s)=>{"use strict";s.d(t,{W:()=>g});var i=s(85893),o=s(67294),n=s(4285),a=s(49576),r=s(52464),l=s(89072),d=s(87536),c=s(6259),u=s(74015);class h extends o.Component{constructor(){super(...arguments),this.state={index:0,isScrolling:!1},this.setIndex=e=>{const{onChangeIndex:t}=this.props;this.isControlled()?t(e):this.setState({index:e})},this.updateIndex=e=>{const{onScrollChange:t}=this.props,s=this.getIndex(),{startIndex:i,endIndex:o,minIndex:n,maxIndex:a,isScrollPresent:r}=this.getScrollValues(),l=Math.max(n,Math.min(a,e));l!==s&&this.setIndex(l),t&&t(i,o,r)}}componentDidMount(){const e=this.getIndex();this.updateIndex(e)}componentDidUpdate(){const e=this.getIndex();this.updateIndex(e)}render(){const{stepIndexCount:e,orientation:t,containerSize:s,scrollbarSize:o,children:n,scrollDelay:r,scrollSpeed:l,itemCount:h,styles:g,rules:p}=this.props,b=this.getIndex(),{isScrolling:v}=this.state,{position:m,fullSize:j,startIndex:x,endIndex:y,minIndex:S,maxIndex:f,isScrollPresent:O}=this.getScrollValues(),C=b===f&&O?"flex-end":"flex-start";return(0,i.jsx)(d.Oj,Object.assign({onWheel:t=>{if(h<=0)return;const s=t.deltaY,i=b+Math.sign(s)*e;this.updateIndex(i),this.setState({isScrolling:!0},(()=>{this.setState({isScrolling:!1})})),t.stopPropagation(),t.preventDefault()}},{children:(0,i.jsxs)("div",Object.assign({className:g.root},{children:[n&&(0,i.jsx)("div",Object.assign({className:g.content,style:{justifyContent:C}},{children:n(x,y)}),void 0),O&&(0,i.jsx)(a.Q,{containerSize:o||s,orientation:t,fullSize:j,stepSize:1,isScrolling:v,scrollDelay:r,scrollSpeed:l,position:m,onChangePosition:(t,s)=>{const i=this.positionToIndex(t),o=t-m,n=i!==b||s?i:b+Math.sign(o)*e;this.updateIndex(n)},extend:{root:p.scrollbar(this.props),arrow:p.arrow(this.props)}},void 0),n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.q,{kind:u.v.Top,isVisible:O&&b>S,extend:{root:p.shadowTop(this.props)}},void 0),(0,i.jsx)(c.q,{kind:u.v.Bottom,isVisible:O&&b<f,extend:{root:p.shadowBottom(this.props)}},void 0)]},void 0)]}),void 0)}),void 0)}isControlled(){return"index"in this.props}getIndex(){const{index:e}=this.props,{index:t}=this.state;return this.isControlled()?e:t}getScrollValues(){const{itemCount:e,getItemSize:t,containerSize:s}=this.props,i=this.getIndex();let o,n=0;const a=[];for(let r=0;r<e;r++){const l=t(r,r===e-1);r===i&&(o=n),void 0!==o&&n<o+s&&a.push(r),n+=l}const r=n-s;let l=0,d=n;const c=n>s;if(c){for(let s=e-1;s>=0;s--)if(d-=t(s,s===e-1),d<r){l=s+1;break}}else l=0;let u=a[0];return i===l&&0!==l&&(u-=1),u===l&&c&&(o=n),{position:o,fullSize:n,startIndex:u,endIndex:a[a.length-1]+1,minIndex:0,maxIndex:l,isScrollPresent:c}}positionToIndex(e){const{itemCount:t,getItemSize:s}=this.props;let i=0;for(let o=0;o<t;o++){const n=s(o,o===t-1);if(i+n>=e)return o;i+=n}return t-1}}const g=(0,n.Z)((e=>{const{orientation:t}=e,{trackWidth:s}=(0,l.h1)(),i={right:s+2},o=t===r.u.Vertical?"column":"row";return{root:{position:"relative",flexGrow:1,display:"flex",overflow:"hidden",flexDirection:t===r.u.Vertical?"row":"column"},content:Object.assign(Object.assign({},t===r.u.Vertical?{height:"100%"}:{width:"100%"}),{flexGrow:1,display:"flex",overflow:"hidden",flexDirection:o}),scrollbar:{},arrow:{},shadowTop:Object.assign({},i),shadowBottom:Object.assign({},i)}}))(h)},49576:(e,t,s)=>{"use strict";s.d(t,{Q:()=>w});var i=s(85893),o=s(16603),n=s(67294),a=s(4285),r=s(16716),l=s(9653),d=s(32817),c=s(16697),u=s(98609),h=s(42034),g=s(53741),p=s(34978),b=s(40727),v=s(29127),m=s(55629),j=s(54738),x=s(81176),y=s(65201),S=s(52464),f=s(89072),O=s(43641),C=s(35394),k=s(72499),I=s(22972);class L extends n.Component{constructor(){super(...arguments),this.state={isScrolling:!1},this.rootRef=(0,n.createRef)(),this.actionSubject=new r.x,this.onKeyDown=e=>{let t=!1;const s=e.which;s===m.s.UpArrow?(t=!0,this.raiseChange(k.L.Down)):s===m.s.DownArrow?(t=!0,this.raiseChange(k.L.Up)):this.raiseStop(),t&&(e.stopPropagation(),e.preventDefault())},this.onIncreaseMouseDown=e=>{e.stopPropagation(),this.raiseChange(k.L.Up)},this.onDecreaseMouseDown=e=>{e.stopPropagation(),this.raiseChange(k.L.Down)},this.onClick=e=>{e.stopPropagation()},this.raiseStop=()=>{this.actionSubject.next({kind:k.i.Stop})},this.onThumbMouseDown=e=>{const{position:t,orientation:s}=this.props;e.stopPropagation(),this.setState({isScrolling:!0}),this.dragPosition=t,this.dragCoordinate=s===S.u.Horizontal?e.pageX:e.pageY,window.addEventListener("mousemove",this.onThumbMouseMove,!1),window.addEventListener("mouseup",this.onThumbMouseUp,!1)},this.onThumbMouseMove=e=>{const{orientation:t,onChangePosition:s}=this.props,i=this.getThumbRatio(),o=(t===S.u.Horizontal?e.pageX:e.pageY)-this.dragCoordinate;if(0!==o){const e=!0;s(this.dragPosition+o/i,e)}},this.onThumbMouseUp=()=>{this.setState({isScrolling:!1}),window.removeEventListener("mousemove",this.onThumbMouseMove,!1),window.removeEventListener("mouseup",this.onThumbMouseUp,!1)},this.onMouseDown=e=>{if(this.rootRef.current){const{orientation:t,onChangePosition:s}=this.props,i=this.getThumbRatio(),o=this.getThumbSize();s(((t===S.u.Horizontal?e.clientX-this.rootRef.current.getBoundingClientRect().left:e.clientY-this.rootRef.current.getBoundingClientRect().top)-9-o/2)/i)}}}componentDidMount(){const{scrollSpeed:e,scrollDelay:t}=this.props;this.actionSubject.pipe((0,g.x)(((e,t)=>{const s=e.kind===t.kind,i=e.kind===k.i.Change&&t.kind===k.i.Change&&e.direction===t.direction;return s&&i}))).pipe((0,p.w)((s=>{if(s.kind===k.i.Stop)return this.setState({isScrolling:!1}),l.C;if(s.kind===k.i.Change){const i=(0,d.of)(s),o=(0,c.F)(e,u.Z).pipe((0,b.g)(t),(0,v.U)((()=>s)));return(0,h.z)(i,o)}return(0,o.N)(s)}))).subscribe((e=>this.onStep(e.direction)))}componentWillUnmount(){this.raiseStop(),this.actionSubject.complete(),window.removeEventListener("mousemove",this.onThumbMouseMove,!1),window.removeEventListener("mouseup",this.onThumbMouseUp,!1)}render(){const{orientation:e,styles:t,rules:s}=this.props,o=this.isScrolling(),n=e===S.u.Horizontal?{transform:`translateX(${this.getThumbPosition()}px)`}:{transform:`translateY(${this.getThumbPosition()}px)`},a=e===S.u.Horizontal?{width:this.getThumbSize()}:{height:this.getThumbSize()},r=e===S.u.Horizontal?C.Y.scrollLeft:C.Y.upArrow,l=e===S.u.Horizontal?C.Y.scrollRight:C.Y.downArrow;return(0,i.jsxs)("div",Object.assign({className:t.root,ref:this.rootRef,tabIndex:-1,onKeyDown:this.onKeyDown,onKeyUp:this.raiseStop,onMouseDown:this.onMouseDown},{children:[(0,i.jsx)(O.h,{iconSource:r,size:7,onMouseDown:this.onDecreaseMouseDown,onMouseUp:this.raiseStop,onMouseLeave:this.raiseStop,onClick:this.onClick,extend:{root:s.arrow(this.props)}},void 0),(0,i.jsx)("div",{className:o?t.activeThumb:t.thumb,onMouseDown:this.onThumbMouseDown,style:Object.assign(Object.assign({},n),a)},void 0),(0,i.jsx)(O.h,{iconSource:l,size:7,onMouseDown:this.onIncreaseMouseDown,onMouseUp:this.raiseStop,onMouseLeave:this.raiseStop,onClick:this.onClick,extend:{root:s.arrow(this.props)}},void 0)]}),void 0)}isScrolling(){const{isScrolling:e}=this.props,{isScrolling:t}=this.state;return e||t}raiseChange(e){this.actionSubject.next({kind:k.i.Change,direction:e})}onStep(e){const{position:t,stepSize:s,onChangePosition:i}=this.props;this.setState({isScrolling:!0}),i(t+s*e)}getThumbRatio(){const{containerSize:e,fullSize:t}=this.props;return 0!==t?(e-18)/t:0}getThumbSize(){const{containerSize:e}=this.props,t=this.getThumbRatio();return Math.max(e*t,8)}getThumbPosition(){const{containerSize:e,position:t}=this.props,s=this.getThumbRatio(),i=this.getThumbSize();return Math.min(t*s+9,e-i-9)}}L.defaultProps={scrollDelay:I.F,scrollSpeed:I.T};const w=(0,a.Z)((e=>{const{orientation:t}=e,{buttonBackgroundColor:s}=e.theme.palette.semantic,i=Object.assign(Object.assign(Object.assign({position:"absolute"},(0,x.O)({color:s.tradeNormal})),(0,y.E)(j.q0)),t===S.u.Horizontal?{height:7}:{width:7});return{root:Object.assign(Object.assign({outline:"none",flexShrink:0,position:"relative",display:"flex",justifyContent:"space-between",flexBasis:(0,f.h1)().thumbSize+j.W0},t===S.u.Horizontal?{paddingTop:j.W0}:{paddingLeft:j.W0}),{flexDirection:t===S.u.Horizontal?"row":"column"}),thumb:Object.assign(Object.assign({},i),{nested:{":hover":Object.assign({},(0,x.O)({color:s.tradeHover}))}}),activeThumb:Object.assign(Object.assign({},i),(0,x.O)({color:s.tradeNormal})),arrow:Object.assign(Object.assign({},(0,x.O)({color:"transparent"})),{fill:s.tradeNormal,nested:{":hover":{fill:s.tradeHover}}})}}))(L)},77191:(e,t,s)=>{"use strict";s.d(t,{i:()=>mt});var i=s(85893),o=s(67294),n=s(97779),a=s(14494);const r=(0,s(99308).Jy)("@@table"),l=r("UPDATE_INFO"),d=r("UPDATE_STATE"),c=r("RESIZE_COLUMN"),u=r("SORT_COLUMN"),h=r("SET_COLUMN_VISIBILITY"),g=r("TOGGLE_ROW"),p=r("UPDATE_COLUMN_WIDTH"),b=r("UPDATE_COLUMN_ORDER"),v=r("CLEAN_SORTING"),m={restoreDefaults:r("RESTORE_DEFAULTS"),cleanSorting:v,updateColumnOrder:b,updateColumnWidth:p,toggleRow:g,setColumnVisibility:h,sortColumn:u,resizeColumn:c,updateState:d,updateInfo:l},j=(0,o.createContext)(null),x=(0,o.createContext)(null);var y=s(76983),S=s(37810);const f=(0,y.reducerWithInitialState)(S.Y8).case(m.updateInfo,((e,t)=>Object.assign(Object.assign({},e),t))),O=(0,y.reducerWithInitialState)(S.WI).case(m.updateState,((e,t)=>t)).casesWithAction([m.resizeColumn,m.sortColumn,m.setColumnVisibility],((e,t)=>{const{columnId:s}=t.payload;return Object.assign(Object.assign({},e),{head:Object.assign(Object.assign({},e.head),{[s]:Object.assign({id:s},C(e.head[s],t))})})})).case(m.toggleRow,((e,t)=>{const{flattenKey:s}=t;return Object.assign(Object.assign({},e),{body:Object.assign(Object.assign({},e.body),{collapsed:Object.assign(Object.assign({},e.body.collapsed),{[s]:!e.body.collapsed[s]})})})})).case(m.updateColumnWidth,((e,t)=>{const s=new Set([...Object.keys(t),...Object.keys(e.head)]);return Object.assign(Object.assign({},e),{head:Array.from(s).reduce(((s,i)=>Object.assign(Object.assign({},s),{[i]:Object.assign(Object.assign({},e.head[i]),{id:i,width:t[i]})})),{})})})).case(m.cleanSorting,(e=>Object.assign(Object.assign({},e),{head:Object.entries(e.head).reduce(((e,[t,s])=>Object.assign(Object.assign({},e),{[t]:Object.assign(Object.assign({},s),{id:t,sorting:void 0,sortingIndex:void 0})})),{})}))).case(m.updateColumnOrder,((e,t)=>Object.assign(Object.assign({},e),{head:t.reduce(((t,s,i)=>Object.assign(Object.assign({},t),{[s]:Object.assign(Object.assign({},e.head[s]),{id:s,order:i})})),{})}))).case(m.restoreDefaults,(()=>S.WI)),C=(0,y.reducerWithoutInitialState)().case(m.resizeColumn,((e,t)=>Object.assign(Object.assign({},e),{width:t.width}))).case(m.sortColumn,((e,t)=>Object.assign(Object.assign({},e),{sorting:t.sorting,sortingIndex:t.sortingIndex}))).case(m.setColumnVisibility,((e,t)=>Object.assign(Object.assign({},e),{hidden:t.hidden})));var k=s(97605),I=s(81811),L=s(54738);const w=e=>e.id,T=e=>e.isLoading,D=e=>e.dataKeys,P=e=>e.columns,N=e=>e.containerWidth,A=e=>e.isResizing,B=e=>e.rowHeight,M=e=>e.onRowClick,$=e=>e.onRowDoubleClick,E=e=>e.onRowEnter,F=e=>e.onRowLeave,R=e=>e.search,W=e=>e.groupBy,H=e=>e.isInitialized,z=e=>e.isScrollPresent,J=e=>e.BodyContextMenu,Q=e=>e.RowContextMenu,_=e=>e.AggregatedContextMenu,q=e=>e.isOrderingDisabled,X=e=>e.isResizingDisabled,V=e=>e.isSortingDisabled,Z=e=>e.isHidingDisabled,U=e=>e.isScrollDisabled,K=e=>e.Head,Y=e=>e.Header,G=e=>e.Resizer,ee=e=>e.Body,te=e=>e.Row,se=e=>e.Cell,ie=e=>e.Expander,oe=e=>e.body.collapsed,ne=(0,a.gR)(j),ae=(0,a.AS)(j),re=e=>ne(e)||(()=>null);var le=s(40169);const de=(0,a.gR)(x);var ce=s(11409);const ue=(e,t)=>de((s=>(0,ce.Y)(Object.values(e),t,s)),le.wU);var he=s(8752);const ge=e=>{const t=ue(e,"hidden"),s=ue(e,"order");return(0,o.useMemo)((()=>(0,he.g)(Object.values(e),t,s)),[e,t,s])};var pe=s(84555),be=s(82888);const ve=(e,t)=>{const s={};let i;for(let t=0;t<e.length;t++){const o=e[t];i=Object.keys(o.values);for(let e=0;e<i.length;e++){const t=i[e],n=o.values[t];s[t]=s[t]?s[t].concat(n):[n]}}const o={};i=Object.keys(s);for(let n=0;n<i.length;n++){const a=i[n],r=s[a],l=t.find((e=>e.id===a)).aggregator;o[a]=l?l(r,e):""}return o};var me=s(51727);const je=(e=[],t,s,i="root")=>{const o=[];for(let n=0;n<e.length;n++){const a=e[n];if("aggregated"in a){const{subGroups:e}=a,n=`${i}::${a.groupKey}`,r=t[n]?[]:je(e,t,s,n);o.push(Object.assign(Object.assign({},a),{flattenKey:n})),o.push(...r)}else{const e=`${i}::${s(a.item)}`;o.push(Object.assign(Object.assign({},a),{flattenKey:e}))}}return o};var xe=s(36700);const ye=(0,a.fw)(x),Se=(0,a.AS)(x),fe=(e,t)=>{const s=t.find((t=>t.id===e)),i=t.filter((e=>!e.fixed)).reduce(((e,t)=>e+(t.basis||S.A0)),0),o=0!==i?100/i:0;return(s&&s.basis||S.A0)*o};var Oe=s(81176),Ce=s(65201);const ke=e=>{const{backgroundColor:t}=e.theme.palette.semantic;return{root:Object.assign(Object.assign(Object.assign({flexGrow:1,display:"flex",flexDirection:"column"},(0,Oe.O)({color:t.primaryNormal})),(0,Ce.E)(L.q0)),{overflow:"hidden"})}};var Ie=s(42983);const Le=(0,o.memo)((e=>{const{width:t,data:s,keyAccessor:n,testId:a,extend:r={}}=e,l=ne(H),d=ne(P),c=ge(d),u=ae(),h=(0,o.useMemo)((()=>{const e=c.filter((({fixed:e})=>e)).reduce(((e,t)=>e+t.basis),0);return t-e-2*L.W0}),[c,t]);(0,o.useEffect)((()=>{h>0&&u(m.updateInfo({isInitialized:!0,containerWidth:h}))}),[h,u]),((e,t,s)=>{const i=ne(R),n=ne(W),a=ae(),r=ue(e,"sorting"),l=ue(e,"sortingIndex"),d=de(oe,le.wU),c=(0,o.useMemo)((()=>{const o=Object.values(e),a=(0,pe.W)(t,o),c=(0,be.h)(a,i);let u;u=n.length?((e,t,s)=>{const i=s.map((e=>t.find((t=>t.id===e)))),o=(e,s)=>{const[i,...n]=s,a={};for(let t=0;t<e.length;t++){const s=e[t],o=s.values[i.id];a[o]=a[o]?a[o].concat(s):[s]}const r=[],l=Object.keys(a);for(let e=0;e<l.length;e++){const s=l[e],i=a[s],d=n.length?o(i,n):i;r.push({groupKey:s,subGroups:d,values:ve(d,t),aggregated:!0})}return r};return o(e,i)})(c,o,n):c;const h=(0,me.D)(u,o,r,l);return je(h,d,s)}),[t,e,s,i,n,r,l,d]),u=(0,o.useMemo)((()=>{const e={},t=[];for(let s=0;s<c.length;s++){const i=c[s];e[i.flattenKey]=i,t.push(i.flattenKey)}return{result:e,resultKeys:t}}),[c]);(0,o.useEffect)((()=>{a(m.updateInfo({data:u.result,dataKeys:u.resultKeys}))}),[u,a])})(d,s,n),(e=>{const t=ye(),s=Se(),i=ge(e),n=(0,o.useRef)(i),a=ne(H),r=(0,o.useRef)(!1);(0,o.useEffect)((()=>{const e=r.current,o=n.current;if(a&&(!e||o.length!==i.length)){const e=i.filter((e=>!e.fixed)).reduce(((e,s)=>{const i=t.getState().head[s.id],n=i&&i.width;return Object.assign(Object.assign({},e),{[s.id]:void 0!==n?n:fe(s.id,o)})}),{}),l=i.filter((e=>!e.fixed)).reduce(((t,s)=>t+(void 0!==e[s.id]?e[s.id]:0)),0),d=Object.entries(e).reduce(((e,[t,s])=>Object.assign(Object.assign({},e),{[t]:(0,xe.yI)(s/l)})),{});s(m.updateColumnWidth(d)),r.current=a,n.current=i}}),[t,s,i,n,a,r])})(d);const g=re(K),p=re(ee),{css:b}=(0,Ie.X)(ke,{extend:r});return(0,i.jsx)("div",Object.assign({className:b.root()},{children:l&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(g,{},void 0),(0,i.jsx)(k.X,{children:(0,i.jsx)(p,{},void 0)},void 0)]},void 0)}),void 0)}));var we=s(81996);const Te=()=>({root:Object.assign({display:"flex",flexDirection:"row",flexShrink:0,overflow:"hidden"},(0,we.o)(L.W0))});var De=s(90191),Pe=s(75368),Ne=s(35394);const Ae=(0,o.memo)((e=>{var t,s;const{columnId:n}=e,a=ne(P),r=a[n],[l,d]=((e,t)=>{const s=ge(e).filter((e=>!e.fixed)).length,i=(0,o.useCallback)((s=>void 0!==s?s:e[t].hidden),[e,t]),n=de((e=>{const s=e.head[t];return void 0!==s?s.hidden:void 0})),a=ye(),r=Se(),l=(0,o.useCallback)((()=>{const e=a.getState().head[t],o=i(e&&e.hidden);if(s>1||o){const e=!o;r(m.setColumnVisibility({columnId:t,hidden:e}))}}),[s,a,t,i,r]);return[i(n),l]})(a,n);return(0,i.jsx)(De.Z,Object.assign({icon:!0!==l?Ne.Y.tick:void 0,title:r.title,onClick:d},{children:null!==(s=null===(t=null==r?void 0:r.Header)||void 0===t?void 0:t.call(r))&&void 0!==s?s:""}),n)}));var Be=s(28746),Me=s(97023);const $e=(0,o.memo)((()=>{const e=ne(P),t=Object.values(e).filter((e=>!e.fixed)),s=Se(),n=(0,o.useCallback)((()=>{s(m.restoreDefaults())}),[s]);return(0,i.jsxs)(Be.s,{children:[t.map((e=>(0,i.jsx)(Ae,{columnId:e.id},e.id))),(0,i.jsx)(Me.D,{},void 0),(0,i.jsx)(De.Z,Object.assign({onClick:n},{children:(0,Pe.L)("Restore Defaults")}),void 0)]},void 0)}));var Ee=s(71551);const Fe=(0,o.memo)((e=>{const{extend:t={}}=e,s=ne(P),n=ge(s),a=ne(Z),{css:r}=(0,Ie.X)(Te,{extend:t}),l=re(Y);let d=(0,i.jsx)(i.Fragment,{children:n.map(((e,t)=>{const s=n[t-1],o=s&&s.id,a=n[t+1],r=a&&a.id;return(0,i.jsx)(l,{columnId:e.id,prevColumnId:o,nextColumnId:r},e.id)}))},void 0);const c=(0,o.useCallback)((()=>(0,i.jsx)($e,{},void 0)),[]);return a||(d=(0,i.jsxs)(Ee.x,Object.assign({placement:"top-start",placementByCursor:!0,wide:!0,testId:"table-head-context-menu"},{children:[d,c]}),void 0)),(0,i.jsx)("div",Object.assign({className:r.root()},{children:d}),void 0)})),Re=(e,t,s)=>{const i=ge(e),o=ne(N),n=s=>{if(void 0!==s)return(0,xe.FY)(s*o);const n=e[t];return n&&n.fixed?n.basis:(0,xe.FY)(fe(t,i)*o)},a=de((e=>{const s=e.head[t];return void 0!==s?s.width:void 0})),r=de((e=>{const t=e.head[s];return void 0!==t?t.width:void 0})),l=n(a),d=n(r),c=Se();return[l,e=>{let i=l+e,n=d-e;const a=i+n;i<=S.WH&&(i=S.WH,n=a-S.WH),n<=S.WH&&(i=a-S.WH,n=S.WH);const r=(0,xe.yI)(i/o),u=(0,xe.yI)(n/o);c(m.resizeColumn({columnId:t,width:r})),c(m.resizeColumn({columnId:s,width:u}))}]};var We=s(32086);const He=e=>{const{sorting:t,isSeparated:s,isPrevSeparated:i,isOver:o,isLeftHighlighted:n,isRightHighlighted:a}=e,{foregroundColor:r,backgroundColor:l}=e.theme.palette.semantic,d=o&&n?i?2:3:0,c=o&&a?3:s?1:0;return{root:{display:"flex",flexGrow:0,flexShrink:0,alignItems:"center",justifyContent:"center",whiteSpace:"nowrap",position:"relative",color:r.tertiary,fill:r.tertiary,minWidth:0,borderLeftStyle:"solid",borderRightStyle:"solid",borderLeftColor:l.strokeNormal,borderRightColor:l.strokeNormal,borderLeftWidth:d,borderRightWidth:c,paddingLeft:3-d,paddingRight:3-c},content:{display:"flex",flexGrow:1,alignItems:"center",justifyContent:"center",overflow:"hidden"},icon:{transform:t===We.a.ASC?"rotate(180deg)":void 0},tooltip:{alignItems:"center",justifyContent:"center"}}};var ze=s(37074),Je=s(83264),Qe=s(83069),_e=s(70162),qe=s(44116),Xe=s(91772);const Ve=(0,o.memo)((e=>{const{columnId:t,prevColumnId:s,nextColumnId:n,extend:a={}}=e,r=ne(w),l=ne(P),d=ge(l),c=ne(z),u=ne(q),h=ne(V),g=ne(A),[p]=Re(l,t),[b,v]=(e=>{const t=(0,o.useCallback)((t=>{const s=t.head[e];return void 0!==s?s.sorting:void 0}),[e]),s=de(t),i=ye(),n=Se();return[s,(0,o.useCallback)((s=>{const o=(0,Je.B)(s.nativeEvent),a=i.getState().head,r=t(i.getState()),l=r?r===We.a.ASC?We.a.DESC:o?void 0:We.a.ASC:We.a.ASC,d=l?o?Object.values(a).filter((e=>e.sorting)).length:0:void 0;o||n(m.cleanSorting()),n(m.sortColumn({columnId:e,sorting:l,sortingIndex:d}))}),[i,t,e,n])]})(t),j=l[t],x=l[s],y=l[n],f=d.filter((e=>!e.fixed)),O=f[f.length-1],C=j.id===O.id,k=j.fixed,I=b===We.a.ASC||b===We.a.DESC,L=y&&!k&&!y.fixed,T=x&&!k&&!x.fixed,[D,N]=(e=>{const t=ne(P),s=ye(),i=(0,o.useCallback)(((e,s)=>{const i=e.head,o=i[s]&&i[s].order;return void 0!==o?o:t[s].order}),[t]),n=de((t=>i(t,e))),a=Se();return[n,(0,o.useCallback)(((e,o)=>{if(e===o)return;const n=Object.values(t).map((e=>({columnId:e.id,order:i(s.getState(),e.id)}))).sort(((e,t)=>e.order-t.order)).map((e=>e.columnId)),r=n.indexOf(e),l=n.indexOf(o);let d=[...n.slice(0,r),...n.slice(r+1)];d=[...d.slice(0,l),e,...d.slice(l)],a(m.updateColumnOrder(d))}),[t,i,a,s])]})(t),[,B]=(0,qe.c)({type:S.$f,item:{columnId:t,tableId:r,order:D},canDrag:()=>!k}),[M,$]=(0,Xe.L)({accept:S.$f,collect:e=>{const t=e.getItem(),s=t?t.order:void 0;return{isOver:e.canDrop()&&e.isOver(),isLeftHighlighted:D<s,isRightHighlighted:D>s}},canDrop:e=>!k&&e.tableId===r&&e.columnId!==t,drop:e=>{N(e.columnId,t)}}),{css:E,rules:F}=(0,Ie.X)(He,Object.assign({sorting:b,isSeparated:L,isPrevSeparated:T,extend:a},M)),R=(0,o.useMemo)((()=>({flexBasis:C&&c?p-S.Sq:p})),[p,c,C]),W=(0,o.useCallback)((e=>{k||h||v(e)}),[k,h,v]),H=re(G),J=u||g?void 0:B,Q=u||g?void 0:$;let _;return b===We.a.ASC?_="asc":b===We.a.DESC&&(_="desc"),(0,i.jsxs)("div",Object.assign({className:E.root(),style:R,onClick:W},{children:[(0,i.jsx)("div",Object.assign({ref:Q,className:E.content()},{children:(0,i.jsxs)("div",Object.assign({ref:J,className:E.content()},{children:[(0,i.jsx)("div",Object.assign({className:E.content()},{children:(0,i.jsxs)(ze.O,Object.assign({extend:{root:F.tooltip}},{children:[j.Header?j.Header():"",j.title]}),void 0)}),void 0),I&&(0,i.jsx)("div",Object.assign({className:E.icon()},{children:(0,i.jsx)(Qe.J,{size:_e.J.Small,source:Ne.Y.treeExpanded},void 0)}),void 0)]}),void 0)}),void 0),(0,i.jsx)(H,{columnId:t,nextColumnId:n},void 0)]}),void 0)})),Ze=()=>({root:{position:"absolute",top:0,bottom:0,right:-S.WH/2,width:S.WH,cursor:"ew-resize",zIndex:1}}),Ue=(0,o.memo)((e=>{const{columnId:t,nextColumnId:s,extend:n={}}=e,a=ne(P),r=ne(X),[,l]=Re(a,t,s),d=a[t],c=a[s],u=(e=>{const t=(0,o.useRef)(NaN),s=ae(),i=(0,o.useCallback)((s=>{e(s.pageX-t.current)}),[t,e]),n=(0,o.useCallback)((()=>{s(m.updateInfo({isResizing:!1})),document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",n),document.removeEventListener("mouseleave",n)}),[i,s]);return(0,o.useCallback)((e=>{t.current=e.pageX,s(m.updateInfo({isResizing:!0})),document.addEventListener("mousemove",i),document.addEventListener("mouseup",n),document.addEventListener("mouseleave",n)}),[i,n,s])})(l),h=(0,o.useCallback)((e=>{e.stopPropagation()}),[]),{css:g}=(0,Ie.X)(Ze,{extend:n});return r||!s||d.fixed||c.fixed?null:(0,i.jsx)("div",{className:g.root(),onMouseDown:u,onClick:h},void 0)}));var Ke=s(53048),Ye=s(37083),Ge=s(52464),et=s(37588);const tt=()=>({root:{position:"relative",flexGrow:1,display:"flex",flexDirection:"column",overflow:"hidden",paddingLeft:L.W0,paddingRight:L.W0,paddingBottom:L.W0},scroll:Object.assign({flexGrow:1},(0,we.o)(0)),content:Object.assign({},(0,we.o)(0))}),st=(0,o.memo)((e=>{const{extend:t={}}=e,{height:s}=(0,o.useContext)(Ye.a),[n,a]=(0,o.useState)(0),r=ne(T),l=ae(),d=ne(D,le.wU),c=ne(J),{css:u}=(0,Ie.X)(tt,{extend:t}),h=ne(B),g=ne(U),p=re(te),b=(0,o.useCallback)((e=>{a(e)}),[a]),v=(0,o.useCallback)(((e,t)=>t?h:h+L.W0),[h]),j=(0,o.useCallback)(((e,t)=>d.slice(e,t).map((e=>(0,i.jsx)(p,{flattenKey:e},e)))),[p,d]),x=(0,o.useCallback)(((e,t,s)=>{l(m.updateInfo({isScrollPresent:s}))}),[l]),y=g?(0,i.jsx)(i.Fragment,{children:j(0,d.length)},void 0):(0,i.jsx)(et.W,Object.assign({itemCount:d.length,containerSize:s-L.W0,getItemSize:v,stepIndexCount:2,index:n,onChangeIndex:b,orientation:Ge.u.Vertical,onScrollChange:x},{children:j}),void 0),S=(0,o.useCallback)((e=>(0,i.jsx)(c,{hide:e.hide},void 0)),[c]);let f;return f=c?(0,i.jsxs)(Ee.x,Object.assign({placement:"bottom-start",placementByCursor:!0,wide:!0,testId:"table-context"},{children:[y,S]}),void 0):y,(0,i.jsx)("div",Object.assign({className:u.root()},{children:r?(0,i.jsx)(Ke.h,{},void 0):f}),void 0)}));var it=s(13518),ot=s(41296);const nt={display:"block",position:"absolute",height:1,right:0,left:0,content:'""'},at=e=>{const{fixed:t,rowHeight:s,isRowSelected:i,isLeftRound:o,isRightRound:n}=e,{backgroundColor:a}=e.theme.palette.semantic,r=(0,it.p)("withUnderline"),l=(0,it.p)("withoutUnderline"),d=(0,it.p)("withHighlight"),c=(0,it.p)("withoutHighlight"),u=(0,it.p)("withLastRow"),h=t?l:r,g=t?c:d,p=i?{":before":Object.assign(Object.assign(Object.assign({},nt),{top:-3}),(0,Oe.O)({color:a.primaryNormal}))}:{},b=t||i?{}:{":after":Object.assign(Object.assign(Object.assign({},nt),{bottom:-3}),(0,Oe.O)({color:a.strokeNormal}))},v=o?{borderTopLeftRadius:L.q0,borderBottomLeftRadius:L.q0}:{},m=n?{borderTopRightRadius:L.q0,borderBottomRightRadius:L.q0}:{},j=i&&!t?Object.assign({},(0,Oe.O)({color:a.secondaryNormal})):{};return{root:(0,ot.g)(h,g,u,(()=>Object.assign(Object.assign(Object.assign(Object.assign({position:"relative",display:"flex",flexGrow:0,flexShrink:0,alignItems:"center",justifyContent:"center",height:s,paddingLeft:o?2:0,paddingRight:n?2:0},v),m),j),{whiteSpace:"nowrap",minWidth:0,nested:Object.assign(Object.assign({},p),b)}))),content:{flexGrow:1,display:"flex",overflow:"hidden",alignItems:"center",justifyContent:"center"},text:{overflow:"hidden",textOverflow:"ellipsis"}}},rt=e=>{const{backgroundColor:t}=e.theme.palette.semantic,s=(0,it.p)("withUnderline"),i=(0,it.p)("withHighlight"),o=(0,it.p)("withLastRow");return{root:{display:"flex",flexDirection:"row",paddingBottom:L.W0,nested:{":last-child":{paddingBottom:0},[`:hover .${s}`]:{nested:{":before":Object.assign(Object.assign(Object.assign({},nt),{top:-3}),(0,Oe.O)({color:t.primaryNormal})),":after":Object.assign({},(0,Oe.O)({color:t.primaryNormal}))}},[`:hover .${i}`]:Object.assign({},(0,Oe.O)({color:t.secondaryNormal})),[`:last-child .${o}`]:{nested:{":after":Object.assign({},(0,Oe.O)({color:t.primaryNormal}))}}}},context:{overflow:"visible"}}};function lt(e,t){let s=[];for(let i=0;i<e.subGroups.length;i++){const o=e.subGroups[i];s="aggregated"in o?s.concat(...lt(o,t)):s.concat(t(o.item))}return s}const dt=e=>{const t=(0,o.useCallback)((t=>{const{keyAccessor:s,isRowSelected:i,selectedRowKey:o,rowHeight:n,getRowHeight:a}=t,r=t.data[e];if(void 0!==r)return{isAggregated:"aggregated"in r,itemKey:"aggregated"in r?void 0:s(r.item),isRowSelected:!("aggregated"in r)&&i(r.item,o),rowHeight:a?a(r):n}}),[e]),s=(0,o.useCallback)((t=>{const{keyAccessor:s}=t,i=t.data[e];if(void 0===i)return;const o="aggregated"in i?void 0:s(i.item);return"aggregated"in i?lt(i,s):[o]}),[e]),i=ne(t,le.wU),n=ne(s,le.wU);return(0,o.useMemo)((()=>{if(i&&n)return Object.assign(Object.assign({},i),{itemKeys:n})}),[i,n])},ct=e=>{const t=de((t=>t.body.collapsed[e])),s=Se();return[t,(0,o.useCallback)((()=>{s(m.toggleRow({flattenKey:e}))}),[s,e])]},ut=(0,o.memo)((e=>{const{flattenKey:t,extend:s={}}=e,n=ne(P),a=ge(n),r=ne(M),l=ne($),d=ne(E),c=ne(F),u=dt(t),{isAggregated:h,itemKey:g,itemKeys:p}=null!=u?u:{},[,b]=ct(t),v=ne(Q),m=ne(_),{css:j,rules:x}=(0,Ie.X)(rt,{extend:s}),y=re(se),S=(0,o.useCallback)((e=>{d(g,e)}),[d,g]),f=(0,o.useCallback)((e=>{c(g,e)}),[c,g]),O=(0,o.useCallback)((e=>{h?b():r(g,e)}),[h,b,r,g]),C=(0,o.useCallback)((e=>{h||l(g,e)}),[h,l,g]);let k=(0,i.jsx)(i.Fragment,{children:a.map(((e,s)=>{const o=a[s-1],n=o&&o.id,r=a[s+1],l=r&&r.id;return(0,i.jsx)(y,{flattenKey:t,columnId:e.id,prevColumnId:n,nextColumnId:l},e.id)}))},void 0);const I=h?m:v,L=(0,o.useCallback)((()=>h?(0,i.jsx)(m,{itemKeys:p},void 0):(0,i.jsx)(v,{itemKey:g},void 0)),[h,m,p,v,g]);return I&&(k=(0,i.jsxs)(Ee.x,Object.assign({placement:"bottom-start",placementByCursor:!0,wide:!0,extend:{root:x.context},testId:"position-row-context"},{children:[k,L]}),void 0)),void 0!==u?(0,i.jsx)("div",Object.assign({className:j.root(),onMouseEnter:S,onMouseLeave:f,onClick:O,onDoubleClick:C},{children:k}),void 0):null})),ht=(0,o.memo)((e=>{var t;const{flattenKey:s,columnId:n,prevColumnId:a,nextColumnId:r,extend:l={}}=e,d=dt(s),{isRowSelected:c,isAggregated:u,rowHeight:h,itemKey:g,itemKeys:p}=null!=d?d:{},[b]=ct(s),v=ne(P),m=ge(v),j=ne(z),{value:x,text:y}=null!==(t=((e,t)=>{const s=(0,o.useCallback)((s=>{const i=s.columns[t],o=s.data[e];if(void 0!==o)return{value:o.values[t],text:"aggregated"in o?i.formatter?i.formatter(o.values[t],o):String(o.values[t]):o.textual[t]}}),[e,t]);return ne(s,le.wU)})(s,n))&&void 0!==t?t:{},[f]=Re(v,n),O=v[n],C=v[a],k=v[r],I=m.filter((e=>!e.fixed)),L=I[0],w=I[I.length-1],T=O.id===L.id,D=O.id===w.id,N=!O.fixed&&(T||C&&C.fixed),A=!O.fixed&&(D||k&&k.fixed),{css:B}=(0,Ie.X)(at,{fixed:O.fixed,isRowSelected:c,rowHeight:h,isLeftRound:N,isRightRound:A,extend:l}),M=(0,o.useMemo)((()=>({flexBasis:D&&j?f-S.Sq:f})),[f,j,D]),{Aggregated:$,Cell:E}=O,F=re(ie),R=(0,o.useCallback)((()=>(0,i.jsx)(F,{isExpanded:!b},void 0)),[F,b]),W=B.text(),H=(0,o.useMemo)((()=>void 0===d?null:u&&$?$(x,y,p,R):E?E(x,y,g,R):(0,i.jsx)("div",Object.assign({className:W},{children:y}),void 0)),[u,$,E,x,y,g,p,R,W,d]),J=(0,o.useCallback)((e=>{O.fixed&&!u&&e.stopPropagation()}),[O,u]);return(0,i.jsx)("div",Object.assign({className:B.root(),style:M,onClick:J},{children:(0,i.jsx)("div",Object.assign({className:B.content()},{children:H}),void 0)}),void 0)})),gt=e=>{const{foregroundColor:t}=e.theme.palette.semantic,s=(0,it.p)("withHighlight");return{root:(0,ot.g)(s,(()=>Object.assign({width:19,height:19,fill:t.secondary},(0,Ce.E)(L.q0))))}},pt=(0,o.memo)((e=>{const{isExpanded:t,extend:s={}}=e,{css:o}=(0,Ie.X)(gt,{extend:s}),n=t?Ne.Y.treeExpanded:Ne.Y.treeCollapsed;return(0,i.jsx)("div",Object.assign({className:o.root()},{children:(0,i.jsx)(Qe.J,{size:_e.J.Small,source:n},void 0)}),void 0)}));var bt=s(37370);const vt=Symbol("Inner State"),mt=e=>{const{id:t,data:s,columns:r,isLoading:l,search:d,groupBy:c,rowHeight:u,getRowHeight:h,onRowClick:g,onRowDoubleClick:p,onRowEnter:b,onRowLeave:v,isRowSelected:y,selectedRowKey:S,RowContextMenu:C,BodyContextMenu:L,tableState:w,onTableStateChange:T,keyAccessor:D,testId:P}=e,{isOrderingDisabled:N,isResizingDisabled:A,isSortingDisabled:B,isHidingDisabled:M,isInteractionDisabled:$,isScrollDisabled:E}=e,{Container:F,Head:R,Header:W,Resizer:H,Body:z,Row:J,Cell:Q,Expander:_}=e,q=(0,o.useMemo)((()=>(0,n.MT)(f,bt.i)),[]),X=(0,o.useMemo)((()=>(0,n.MT)(O,bt.i)),[]),V=(0,o.useMemo)((()=>{const e={};for(let t=0;t<r.length;t++){const s=r[t];e[s.id]=Object.assign(Object.assign({},s),{order:void 0!==s.order?s.order:t})}return e}),[r]);(0,o.useEffect)((()=>{q.dispatch(m.updateInfo(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({id:t,columns:V,keyAccessor:D,isLoading:l},void 0!==d&&{search:d}),c&&{groupBy:c}),u&&{rowHeight:u}),h&&{getRowHeight:h}),L&&{BodyContextMenu:L}),C&&{RowContextMenu:C}),b&&{onRowEnter:b}),v&&{onRowLeave:v}),g&&{onRowClick:g}),p&&{onRowDoubleClick:p}),y&&{isRowSelected:y}),S&&{selectedRowKey:S})))}),[q,V,t,D,l,d,c,u,h,C,L,b,v,g,p,y,S]),(0,o.useEffect)((()=>{q.dispatch(m.updateInfo(Object.assign({isOrderingDisabled:!!$||N,isResizingDisabled:!!$||A,isSortingDisabled:!!$||B,isHidingDisabled:!!$||M},E&&{isScrollDisabled:E})))}),[q,N,A,B,M,$,E]),(0,o.useEffect)((()=>{q.dispatch(m.updateInfo({Container:F||Le,Head:R||Fe,Header:W||Ve,Resizer:H||Ue,Body:z||st,Row:J||ut,Cell:Q||ht,Expander:_||pt}))}),[q,F,R,W,H,z,J,Q,_]),(0,o.useEffect)((()=>{w&&!w[vt]&&X.dispatch(m.updateState(w))}),[X,w]),(0,o.useEffect)((()=>{const e=X.subscribe((()=>{var e;T&&T((e=X.getState(),Object.assign(Object.assign({},e),{[vt]:!0})))}));return()=>{e(),T&&T(X.getState())}}),[X,T]);const Z=(0,o.useCallback)((e=>{const t=F||Le;return(0,i.jsx)(t,{width:e,data:s,keyAccessor:D,testId:P},void 0)}),[s,D,F,P]);return(0,i.jsx)(a.zt,Object.assign({store:q,context:j},{children:(0,i.jsx)(a.zt,Object.assign({store:X,context:x},{children:(0,i.jsx)(k.X,{children:(0,i.jsx)(I.R,{children:Z},void 0)},void 0)}),void 0)}),void 0)}},92:(e,t,s)=>{"use strict";s.d(t,{U:()=>d});var i=s(14224),o=s(71383),n=s(99938),a=s(53005),r=s(62285),l=s(70378);const d=(0,i.X)((0,o.$)(r.D).plantId(),l.mr).chain((e=>(0,n.t)(a.w,{plantId:e},l.iN))).build()},29412:(e,t,s)=>{"use strict";s.d(t,{X:()=>l});var i=s(51359),o=s(75879),n=s.n(o),a=s(70378),r=s(33699);const l=n()([r.O],(e=>e.filter((e=>void 0===e.subaccountOf))))(Object.assign(Object.assign({},(0,a.jo)()),{keySelector:i.Rs}))},54534:(e,t,s)=>{"use strict";s.d(t,{Q:()=>l});var i=s(85893),o=s(67294),n=s(94524),a=s(30023);class r extends o.Component{render(){const{accountId:e}=this.props;return(0,i.jsx)(n.e,{param:e,subscribe:a.S.subscribe,unsubscribe:a.S.unsubscribe},void 0)}}const l=(0,o.memo)(r)},77187:(e,t,s)=>{"use strict";s.d(t,{i:()=>a});var i=s(67294),o=s(46119),n=s(68975);const a=(0,i.memo)((e=>{const{leverageId:t}=e;var s;return s=[t],(0,o.x)(s,n.M.subscribe,n.M.unsubscribe),null}))},22555:(e,t,s)=>{"use strict";s.d(t,{M:()=>j});var i=s(67142),o=s(25176),n=s(76042),a=s(69903),r=s(75879),l=s.n(r),d=s(70378),c=s(71383),u=s(51359),h=s(53214),g=s(41680);const p=l()([(0,c.$)(h.C).assetId(),(0,c.$)(g.k).assetId()],((e,t)=>({fromAssetId:e,toAssetId:t})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:u.Rs}));var b=s(7485);const v=l()([(0,c.$)(b.S).depositCurrency()],(e=>({depositAssetName:e})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:u.Rs}));var m=s(3288);const j=()=>{const{depositAssetName:e}=(0,a.v)(v),t=(0,a.v)(p);(0,i.Q)([e,(0,o.P)(m.qY)]),(0,n.Z)(t.fromAssetId&&t.toAssetId?[t]:[])}},76042:(e,t,s)=>{"use strict";s.d(t,{Z:()=>x});var i=s(67294),o=s(46119),n=s(96797),a=s(75879),r=s.n(a),l=s(70378),d=s(71383),c=s(87161),u=s(95035);const h=r()([(0,d.$)(n.q).chain([])],(e=>({symbolIdList:e.map((e=>e.symbolId))})))(Object.assign(Object.assign({},(0,l.jo)()),{keySelector:(0,c.q)((0,u.P)().fromAssetId(),(0,u.P)().toAssetId())}));var g=s(66423),p=s(62036),b=s(69903),v=s(50576),m=s(27860),j=s(80605);const x=e=>{const t=(0,j.X)(e,v.Z),s=(0,i.useMemo)((()=>(0,m.Z)(t,v.Z).filter((e=>void 0!==e.fromAssetId&&void 0!==e.toAssetId))),[t]),n=(0,i.useCallback)((e=>s.map((t=>h(e,{fromAssetId:t.fromAssetId,toAssetId:t.toAssetId}))).flatMap((e=>e.symbolIdList))),[s]),a=(0,b.v)(n);(0,p.c)(a),(0,o.x)(s,g.j.subscribe,g.j.unsubscribe)}},56137:(e,t,s)=>{"use strict";s.d(t,{G:()=>m});var i=s(67142),o=s(76042),n=s(71383),a=s(51359),r=s(7485),l=s(75879),d=s.n(l),c=s(70378);const u=d()([(0,n.$)(r.S).depositCurrency()],(e=>({depositCurrency:e})))(Object.assign(Object.assign({},(0,c.jo)()),{keySelector:a.Rs}));var h=s(15727),g=s(67294),p=s(69903),b=s(50576),v=s(80605);const m=e=>{const t=(0,v.X)(e,b.Z),s=(0,g.useCallback)((e=>t.map((t=>(0,h.Z)(e,{symbolId:t})))),[t]),{depositCurrency:n}=(0,p.v)(u),a=(0,p.v)(s);(0,i.Q)([n]),(0,o.Z)(a)}},24155:(e,t,s)=>{"use strict";s.d(t,{a:()=>n});var i=s(67294),o=s(22555);const n=(0,i.memo)((()=>((0,o.M)(),null)))},37187:(e,t,s)=>{"use strict";s.d(t,{D:()=>n});var i=s(67294),o=s(56137);const n=(0,i.memo)((e=>{const{symbolId:t}=e;return(0,o.G)([t]),null}))},71752:(e,t,s)=>{"use strict";s.d(t,{y:()=>g});var i=s(75879),o=s.n(i),n=s(71383),a=s(95035),r=s(87161),l=s(70378),d=s(33535),c=s(63041),u=s(27239);const h=o()([(0,n.$)(u.Y).data(),(0,a.P)().symbolId(),(0,a.P)().size()],((e,t,s)=>{var i,o;return null!==(o=null===(i=e[t])||void 0===i?void 0:i[s])&&void 0!==o?o:c.qe}))(Object.assign({keySelector:(0,r.q)((0,a.P)().symbolId(),(0,a.P)().size())},(0,l.jo)())),g=o()([h],(e=>({buyMargin:(0,d.R)(e.buyMargin),sellMargin:(0,d.R)(e.sellMargin)})))(Object.assign(Object.assign({},(0,l.jo)()),{keySelector:(0,r.q)((0,a.P)().symbolId(),(0,a.P)().size())}))},21789:(e,t,s)=>{"use strict";s.d(t,{w:()=>N});var i=s(14224),o=s(9570),n=s(75879),a=s.n(n),r=s(99938),l=s(87161),d=s(95035),c=s(70378),u=s(71383),h=s(65185),g=s(29480);const p=a()([(0,u.$)(h.G).ask(),(0,u.$)(h.G).bid(),(0,d.P)().tradeSide()],((e,t,s)=>s===g.aO.Buy?e:t))(Object.assign({keySelector:(0,l.q)((0,d.P)().symbolId(),(0,d.P)().tradeSide())},(0,c.jo)()));var b=s(76707),v=s(52772),m=s(32672),j=s(82864),x=s(4028),y=s(83617),S=s(64573);const f=a()([(0,u.$)(j.M).distanceSetIn(),(0,u.$)(j.M).digits(),(0,u.$)(h.G).ask(),(0,u.$)(h.G).bid(),x.r,y.f,(0,d.P)().tradeSide(),(0,d.P)().stopLossPrice()],((e,t,s,i,o,n,a,r)=>{if(void 0!==r)return r;const l=(0,b.v)({ask:s,bid:i,currentDistance:n,protectionType:v.a.StopLoss,tradeType:g.YL.NewPosition,tradeSide:a}),d=(0,m.z)({currentDistance:n,validationPrice:l,protectionType:v.a.StopLoss,tradeSide:a,distanceSetIn:e,minPriceStep:o,digits:t});return void 0!==l&&void 0!==d?(0,S.FH)(l+d,t):void 0}))(Object.assign({keySelector:(0,l.q)((0,d.P)().symbolId(),(0,d.P)().tradeSide(),(0,d.P)().stopLossPrice())},(0,c.jo)()));var O=s(60077),C=s(7485),k=s(77439);const I=a()([(0,u.$)(C.S).accountType(),p,f,O.x,(0,u.$)(j.M).pipPosition(),(0,d.P)().size(),(0,d.P)().tradeSide()],((e,t,s,i,o,n,a)=>{if(void 0===t||void 0===s)return;const r=a===g.aO.Buy?t-s:s-t;return(0,k.s)({accountType:e,distance:r,volume:n,quoteToDeposit:i,stake:n,pipPosition:o})}))(Object.assign({keySelector:(0,l.q)((0,d.P)().symbolId(),(0,d.P)().tradeSide(),(0,d.P)().stopLossPrice(),(0,d.P)().size())},(0,c.jo)())),L=a()([(0,r.t)(I,{tradeSide:g.aO.Buy},c.iN),(0,r.t)(I,{tradeSide:g.aO.Sell},c.iN)],((e,t)=>({buyMargin:e,sellMargin:t})))(Object.assign(Object.assign({},(0,c.jo)()),{keySelector:(0,l.q)((0,d.P)().symbolId(),(0,d.P)().stopLossPrice(),(0,d.P)().size())}));var w=s(71752),T=s(71620);const D=a()([(0,u.$)(L).buyMargin(),(0,u.$)(L).sellMargin(),(0,u.$)(w.y).buyMargin(),(0,u.$)(w.y).sellMargin()],((e,t,s,i)=>({buyMargin:void 0!==e&&void 0!==s?T.p.max(e,s):void 0,sellMargin:void 0!==t&&void 0!==i?T.p.max(t,i):void 0})))(Object.assign(Object.assign({},(0,c.jo)()),{keySelector:(0,l.q)((0,d.P)().symbolId(),(0,d.P)().stopLossPrice(),(0,d.P)().size())}));var P=s(33705);const N=(0,i.X)(P.p,c.mr).chain((e=>e===o.ao.AccordingToGsl?L:e===o.ao.AccordingToGslAndLeverage?D:w.y)).build()},93557:(e,t,s)=>{"use strict";s.d(t,{B:()=>n});var i=s(67294),o=s(63041);const n=(0,i.createContext)((()=>()=>o.n4))},81030:(e,t,s)=>{"use strict";s.d(t,{K:()=>b});var i=s(67294),o=s(56137),n=s(46119),a=s(89246),r=s(69903),l=s(51359),d=s(70378),c=s(75879),u=s.n(c),h=s(33705),g=s(9570);const p=u()([h.p],(e=>({shouldSubscribe:e!==g.ao.AccordingToGsl})))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:l.Rs})),b=(0,i.memo)((e=>{const{symbolId:t,sizes:s}=e,{shouldSubscribe:i}=(0,r.v)(p);var l;return(0,o.G)(i?[t]:[]),l=i?s.filter((e=>e>0)).map((e=>({symbolId:t,size:e}))):[],(0,n.x)(l,a.u.subscribe,a.u.unsubscribe),null}))},7383:(e,t,s)=>{"use strict";s.d(t,{b:()=>o});var i=s(49149);function o(e,t){const s=t.palette.semantic;switch(e){case i.z.Started:return s.foregroundColor.positive;case i.z.Pending:case i.z.CloseOnly:return s.buttonBackgroundColor.tradeNormal;case i.z.Stopped:return s.foregroundColor.negative;default:return s.buttonBackgroundColor.tradeNormal}}},88732:(e,t,s)=>{"use strict";s.d(t,{l:()=>a});var i=s(75368),o=s(16603),n=s(49149);function a(e){switch(e){case n.z.Started:return(0,i.L)("Copying is started");case n.z.Stopped:return(0,i.L)("Copying is stopped");case n.z.Pending:return(0,i.L)("Copying is being stopped. Please wait for open position(s) to be closed or fees to be charged.");case n.z.CloseOnly:return(0,i.L)("New positions are not being copied. Please contact your broker for assistance.");default:return(0,o.N)(e)}}},62799:(e,t,s)=>{"use strict";s.d(t,{l:()=>c});var i=s(75879),o=s.n(i),n=s(70378),a=s(71383),r=s(95035),l=s(62285),d=s(52131);const c=o()([d.$,(0,a.$)(l.D).traderId(),(0,a.$)(l.D).live(),(0,a.$)(l.D).plantId()],((e,t,s,i)=>e.filter((e=>e.subaccountOf===t&&e.live===s&&e.plantId===i))))(Object.assign(Object.assign({},(0,n.jo)()),{keySelector:(0,r.P)().accountId()}))},35197:(e,t,s)=>{"use strict";function i(e){if(void 0!==e)return function(e){try{const t=function(e){if(!e||"#"!==e[0])return;const t=[],s=function(e){let t=e.substr(1);if(3===t.length){const[e,s,i]=t;void 0!==e&&void 0!==s&&void 0!==i&&(t=e+e+s+s+i+i)}return t}(e);for(let e=0;e<s.length;e+=2)t.push(parseInt(s.substr(e,2),16));return t}(e);if(void 0===t)return!1;const[s,i,o]=t;if(void 0===s||void 0===i||void 0===o)return!1;const n=function(e,t,s){e/=255,t/=255,s/=255;const i=Math.max(e,t,s),o=Math.min(e,t,s),n=(i+o)/2;let a,r;if(i===o)a=0,r=0;else{const l=i-o;r=n>.5?l/(2-i-o):l/(i+o),a=i===e?(t-s)/l+(t<s?6:0):i===t?(s-e)/l+2:(e-t)/l+4,a/=6}return[a,r,n]}(s,i,o)[2];return void 0!==n&&n>=.5}catch(e){return!1}}(e)?"#000000":"#ffffff"}s.d(t,{k:()=>i})},86886:(e,t,s)=>{"use strict";s.d(t,{e:()=>n});var i=s(10222),o=s(3288);function n(e,t,s){return void 0===e||void 0===t||void 0===s?{big:o.kZ,small:""}:(0,i.Ng)(e,t,s)}},66772:(e,t,s)=>{"use strict";s.d(t,{x:()=>l});var i=s(40169),o=s(40949),n=s(29202);const a=(0,o.g)(i.ET,n.b.quotes);var r=s(33426);function l(e,t,s){const i="object"==typeof t?s:t,o="object"==typeof t?t:void 0;return(0,r.W)(a,e,o,i)}},46411:(e,t,s)=>{"use strict";s.d(t,{E:()=>o});var i=s(42571);const o=()=>(0,i.ad)()?"⌘":"Ctrl"},93137:(e,t,s)=>{"use strict";s.d(t,{g:()=>o});var i=s(42571);const o=()=>(0,i.ad)()?"⇧":"Shift"},44535:(e,t,s)=>{"use strict";s.d(t,{CP:()=>n,pV:()=>a,_d:()=>r,JC:()=>l});var i=s(67294),o=s(96486);function n(e){return e.prototype instanceof i.Component}function a(e){return"function"==typeof e}function r(e){return Boolean(e.$$typeof)}function l(e,t="span"){return function(e,t,s,n="span"){var a,r;const l=[],d=e.length;t.lastIndex=0;let c=t.exec(e),u=0,h=0;for(;c;){const g=e.substr(u,c.index-u);g&&(0,o.trim)(g).length>0&&(l.push((0,i.createElement)(n,{key:h},g)),h+=1);const p=null!==(r=null===(a=c[0])||void 0===a?void 0:a.length)&&void 0!==r?r:0;if(u=c.index+p,u<=d){const e=s(c,h);e.forEach((e=>l.push(e))),h+=e.length}c=t.exec(e)}return u<d&&l.push((0,i.createElement)(n,{key:h},e.substr(u,e.length-u))),l}(e,/\n+/g,((e,t)=>{var s,o;const n=null!==(o=null===(s=e[0])||void 0===s?void 0:s.length)&&void 0!==o?o:0,a=[(0,i.createElement)("br",{key:t})];return n>1&&a.push((0,i.createElement)("br",{key:t+1})),a}),t)}},97577:(e,t,s)=>{"use strict";s.d(t,{C:()=>n});var i=s(65792),o=s.n(i);function n(e){if(!o().valid(e)||void 0===e)return;const t=o()(e);return{hex:t.hex("rgb"),opacity:t.alpha()}}},5890:(e,t,s)=>{"use strict";s.d(t,{i:()=>d});var i=s(70378),o=s(75879),n=s.n(o),a=s(71383),r=s(95035),l=s(5799);const d=n()([(0,a.$)(l.q).data(),(0,r.P)().accountId()],((e,t)=>e[t]))(Object.assign({keySelector:(0,r.P)().accountId()},(0,i.jo)()))},57448:(e,t,s)=>{"use strict";s.d(t,{d:()=>l});var i=s(85893),o=s(67294),n=s(94524),a=s(59009);class r extends o.Component{render(){const{accountId:e}=this.props;return(0,i.jsx)(n.e,{param:e,subscribe:a.T.subscribe,unsubscribe:a.T.unsubscribe},void 0)}}const l=(0,o.memo)(r)},35122:(e,t,s)=>{"use strict";s.d(t,{p:()=>N});var i=s(85893),o=s(69880),n=s(4285),a=s(67294);const r=e=>e.removeInvestorPasswordDialog;var l=s(71383),d=s(51359),c=s(63101),u=s(75879),h=s.n(u),g=s(70378);const p=h()([(0,l.$)(r).isShown(),(0,l.$)(r).accountId(),c.i],((e,t,s)=>({isShown:e,accountId:t,productName:s})))(Object.assign(Object.assign({},(0,g.jo)()),{keySelector:d.Rs}));var b=s(75368),v=s(95035),m=s(5890);const j=h()([m.i],(e=>({investorPassword:e})))(Object.assign(Object.assign({},(0,g.jo)()),{keySelector:(0,v.P)().accountId()}));var x=s(75039),y=s(59009),S=s(65367),f=s(33933),O=s(14441),C=s(54738),k=s(57448),I=s(24530),L=s(61392);class w extends a.Component{constructor(){super(...arguments),this.onConfirm=()=>{const{accountId:e,removeInvestorPassword:t,close:s}=this.props;t(e),s()},this.onCancel=()=>{const{close:e}=this.props;e()}}componentDidUpdate(e){const{investorPassword:t,close:s}=this.props;e.investorPassword&&!t&&s()}render(){const{accountId:e}=this.props;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(k.d,{accountId:e},void 0),(0,b.L)("Are you sure you want to delete Investor Link? \nThe users will not be able to view your Account Profile anymore."),(0,i.jsx)(S.I,{height:3*C.W0},void 0),(0,i.jsxs)(f.X,{children:[(0,i.jsx)(O.b,{children:(0,i.jsx)(I.z,Object.assign({testId:"delete",wide:!0,onClick:this.onConfirm},{children:(0,b.L)("Delete")}),void 0)},void 0),(0,i.jsx)(O.b,{children:(0,i.jsx)(L.U,Object.assign({testId:"cancel",wide:!0,onClick:this.onCancel},{children:(0,b.L)("Cancel")}),void 0)},void 0)]},void 0)]},void 0)}}const T=(0,o.$)(j,{removeInvestorPassword:y.T.remove,close:x.M.close})(w);var D=s(76314);class P extends a.Component{constructor(){super(...arguments),this.onClose=()=>{const{close:e}=this.props;e()}}render(){const{isShown:e,accountId:t,productName:s,rules:o}=this.props;return e?(0,i.jsx)(D.V,Object.assign({title:`${(0,b.L)("Delete Investor Link")} - ${s}`,testId:"delete-investor-link-dialog",onClose:this.onClose,extend:{container:o.container(this.props)}},{children:(0,i.jsx)(T,{accountId:t},void 0)}),void 0):null}}const N=(0,o.$)(p,{close:x.M.close})((0,n.Z)((()=>({container:{width:385,textAlign:"center"}})))(P))},33705:(e,t,s)=>{"use strict";s.d(t,{p:()=>c});var i=s(71383),o=s(51359),n=s(7485),a=s(9570),r=s(75879),l=s.n(r),d=s(70378);const c=l()([(0,i.$)(n.S).isLimitedRisk(),(0,i.$)(n.S).limitedRiskMarginCalculationStrategy()],((e,t)=>e?t:a.ao.AccordingToLeverage))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:o.Rs}))},85139:(e,t,s)=>{"use strict";s.d(t,{C:()=>c});var i=s(71383),o=s(51359),n=s(75879),a=s.n(n),r=s(70378),l=s(64276),d=s(7485);const c=a()([l.P,(0,i.$)(d.S).brokerName(),(0,i.$)(d.S).accountId()],((e,t,s)=>[...e].sort(((e,t)=>e.traderLogin-t.traderLogin)).sort(((e,t)=>""!==e.accountName&&""===t.accountName?-1:""===e.accountName&&""!==t.accountName?1:e.accountName.localeCompare(t.accountName,void 0,{numeric:!0}))).sort(((e,t)=>e.live>t.live?-1:e.live<t.live?1:0)).sort(((e,s)=>e.brokerName===t&&s.brokerName!==t?-1:e.brokerName!==t&&s.brokerName===t?1:e.brokerName.localeCompare(s.brokerName,void 0,{numeric:!0}))).sort(((e,t)=>e.accountId===s?-1:t.accountId===s?1:0))))(Object.assign(Object.assign({},(0,r.jo)()),{keySelector:o.Rs}))},16436:(e,t,s)=>{"use strict";s.d(t,{v:()=>j});var i=s(85893),o=s(67294),n=s(69903),a=s(71383),r=s(95035),l=s(75879),d=s.n(l),c=s(70378),u=s(72832);const h=d()([(0,a.$)(u.R).displayName()],(e=>({displayName:e})))(Object.assign(Object.assign({},(0,c.jo)()),{keySelector:(0,r.P)().assetName()}));var g=s(54622);const p=(0,o.memo)((e=>{const{assetName:t,children:s,placeholder:o}=e,{displayName:a}=(0,n.v)(h,{assetName:t}),r=null!=a?a:o,l="function"==typeof s?s({displayName:r}):r;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(g.L,{assetName:t},void 0),l]},void 0)}));var b=s(51359),v=s(7485);const m=d()([(0,a.$)(v.S).depositCurrency()],(e=>({depositCurrency:e})))(Object.assign(Object.assign({},(0,c.jo)()),{keySelector:b.Rs})),j=(0,o.memo)((e=>{const{placeholder:t,children:s}=e,{depositCurrency:o}=(0,n.v)(m);return(0,i.jsx)(p,Object.assign({assetName:o,placeholder:t},{children:s}),void 0)}))},59338:(e,t,s)=>{"use strict";s.d(t,{b:()=>k});var i=s(85893),o=s(89165),n=s(94524),a=s(75368),r=s(67294),l=s(4285),d=s(58676),c=s(95035),u=s(70378),h=s(75879),g=s.n(h),p=s(71383),b=s(87521);const v=g()([(0,p.$)(b.e).data(),(0,c.P)().symbolId()],((e,t)=>e[t]))(Object.assign({keySelector:(0,c.P)().symbolId()},(0,u.jo)())),m=g()([v],(e=>({buySentiment:e})))(Object.assign(Object.assign({},(0,u.jo)()),{keySelector:(0,c.P)().symbolId()}));var j=s(54738),x=s(81176),y=s(65201),S=s(58779);function f(){return Object.assign(Object.assign({height:j.W0,minWidth:j.W0,marginTop:j.W0},(0,y.E)(j.q0)),{display:"inline-flex",marginRight:j.W0})}var O=s(69880);class C extends r.Component{render(){const{symbolId:e}=this.props;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.e,{param:e,subscribe:d.u.subscribe.started,unsubscribe:d.u.unsubscribe.started},void 0),this.renderContent()]},void 0)}renderContent(){const{buySentiment:e,showPercents:t,styles:s}=this.props;if(void 0===e)return null;const n=Math.floor(e),r=100-n;return(0,i.jsxs)(o.u,Object.assign({placement:"bottom-start",wide:!0,border:!0,maxWidthElement:240},{children:[(0,i.jsxs)("div",Object.assign({className:s.root},{children:[(0,i.jsxs)("div",Object.assign({className:s.barRow},{children:[(0,i.jsx)("span",{className:s.sell},void 0),(0,i.jsx)("span",{className:s.separator},void 0),(0,i.jsx)("span",{className:s.buy},void 0)]}),void 0),t&&(0,i.jsxs)("div",Object.assign({className:s.percentsRow},{children:[(0,i.jsx)("div",Object.assign({className:s.percentSell},{children:`${r}%`}),void 0),(0,i.jsx)("div",Object.assign({className:s.percentBuy},{children:`${n}%`}),void 0)]}),void 0)]}),void 0),(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",Object.assign({className:s.row},{children:[(0,i.jsx)("div",{className:s.sellCircle},void 0),(0,i.jsx)("div",{children:(0,a.L)("{0}% of client accounts with open positions in this symbol expect the price to fall",r)},void 0)]}),void 0),(0,i.jsxs)("div",Object.assign({className:s.row},{children:[(0,i.jsx)("div",{className:s.buyCircle},void 0),(0,i.jsx)("div",{children:(0,a.L)("{0}% of client accounts with open positions in this symbol expect the price to rise",n)},void 0)]}),void 0)]},void 0)]}),void 0)}}C.defaultProps={showPercents:!1};const k=(0,O.$)(m)((0,l.Z)((e=>{const{buySentiment:t}=e,{buttonBackgroundColor:s}=e.theme.palette.semantic,i=void 0===t?0:Math.floor(t),o=void 0===t?0:100-i,n=100!==i&&100!==o;return{root:{position:"relative",display:"flex",flexGrow:1,overflow:"hidden",flexDirection:"column",marginTop:j.W0},row:{display:"flex"},buy:Object.assign(Object.assign(Object.assign({height:j.W0},(0,x.O)({color:s.positiveNormal})),(0,y.E)(j.q0)),(0,S.f)(0,1,`${i}%`)),separator:Object.assign(Object.assign({},(0,S.f)(0,1,"0.4em")),{display:n?"block":"none"}),sell:Object.assign(Object.assign(Object.assign({height:j.W0},(0,x.O)({color:s.negativeNormal})),(0,y.E)(j.q0)),(0,S.f)(0,1,`${o}%`)),buyCircle:Object.assign(Object.assign({},f()),(0,x.O)({color:s.positiveNormal})),sellCircle:Object.assign(Object.assign({},f()),(0,x.O)({color:s.negativeNormal})),barRow:{height:j.W0,display:"flex"},percentsRow:{display:"flex",marginTop:j.W0},percentSell:{flexGrow:1,display:"flex",justifyContent:"flex-start"},percentBuy:{flexGrow:1,display:"flex",justifyContent:"flex-end"}}}))(C))},84985:(e,t,s)=>{"use strict";s.d(t,{h:()=>v});var i=s(85893),o=s(59628),n=s(65201);const a=()=>({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}});var r=s(4285),l=s(67294);class d extends l.Component{constructor(){super(...arguments),this.onClick=()=>{const{disabled:e,onClick:t}=this.props;!e&&t&&t()}}render(){const{styles:e,title:t,children:s,testId:o}=this.props;return(0,i.jsxs)("div",Object.assign({className:e.root,title:t,onClick:this.onClick},{children:[(0,i.jsx)("div",{className:e.div},void 0),(0,i.jsx)("div",{className:e.div},void 0),(0,i.jsx)("div",{className:e.div},void 0),(0,i.jsx)("div",{className:e.div},void 0),s]}),void 0)}}d.defaultProps={size:20};const c=(0,r.Z)(((e,t)=>{const s=t.renderKeyframe(a,void 0);return{root:{display:"flex",alignItems:"center",justifyContent:"center",position:"relative",cursor:e.onClick&&!e.disabled?"pointer":"inherit",width:e.size,height:e.size,lineHeight:(0,o.a)(e.size),nested:{"> div:nth-child(1)":{animationDelay:"-0.45s"},"> div:nth-child(2)":{animationDelay:"-0.3s"},"> div:nth-child(3)":{animationDelay:"-0.15s"}}},div:Object.assign(Object.assign({boxSizing:"border-box",display:"block",position:"absolute",width:e.size-3,height:e.size-3,border:"2px solid #fff"},(0,n.E)("50%")),{borderColor:"#fff transparent transparent transparent",animationIterationCount:"infinite",animationTimingFunction:"cubic-bezier(0.5, 0, 0.5, 1)",animationDuration:"1.2s",animationName:s})}}))(d);var u=s(70162),h=s(83069),g=s(18986),p=s(54738);class b extends l.Component{render(){const{text:e}=this.props;return(0,i.jsxs)(i.Fragment,{children:[this.renderMessage(),(0,i.jsx)("div",{children:e},void 0)]},void 0)}renderMessage(){const{status:e,rules:t}=this.props;if(e===g.Ez.Waiting)return(0,i.jsx)(c,{size:u.J.Control,extend:{root:t.root(this.props)}},void 0);let s;return e===g.Ez.Ready?s=g.sh.Ready:e===g.Ez.Error?s=g.sh.Error:e===g.Ez.Partial?s=g.sh.Partial:e===g.Ez.Info&&(s=g.sh.Info),s&&(0,i.jsx)(h.J,{source:s,size:u.J.Control,testId:"notification-icon",extend:{root:t.root(this.props)}},void 0)}}const v=(0,r.Z)((e=>{const{foregroundColor:t}=e.theme.palette.semantic;return{root:{fill:t.primary2,marginRight:p.W0}}}))(b)},62069:(e,t,s)=>{"use strict";s.d(t,{o:()=>n});var i=s(75368),o=s(72563);function n(e){const t="\n- ";switch(e){case o.V.Full:return{shortText:"FM",longText:(0,i.L)("Full Member Broker"),tooltipText:(0,i.L)("You can become a strategy provider and charge commissions, or follow any demo or live strategy.")};case o.V.Isolated:return{shortText:"IM",longText:(0,i.L)("Isolated Member Broker"),tooltipText:[(0,i.L)("You can only copy strategy providers of the particular broker of this account."),(0,i.L)("You can become a strategy provider and charge commissions, but only investors of the particular broker will copy your strategy.")].join(t)};case o.V.Demo:return{shortText:"DM",longText:(0,i.L)("Demo Member Broker"),tooltipText:[(0,i.L)("You can only copy free strategies."),(0,i.L)("You can become a strategy provider but you are not allowed to charge commissions with this account.")].join(t)};case o.V.Guest:return{shortText:"GM",longText:(0,i.L)("Guest Broker"),tooltipText:[(0,i.L)("You cannot copy any strategies or become a strategy provider with this account."),(0,i.L)("Please contact your broker for more info.")].join(t)};case o.V.Unknown:return{shortText:"UM",longText:(0,i.L)("Unknown Member Broker"),tooltipText:(0,i.L)("Please contact your broker for more info.")};default:return{}}}},2028:(e,t,s)=>{"use strict";s.d(t,{b:()=>l});var i=s(85893),o=s(67294),n=s(94524),a=s(97836);class r extends o.Component{render(){const{plantId:e}=this.props;return(0,i.jsx)(n.e,{param:e,subscribe:a.E.subscribe,unsubscribe:a.E.unsubscribe},void 0)}}const l=(0,o.memo)(r)},85173:(e,t,s)=>{"use strict";s.d(t,{$:()=>a});var i=s(75368),o=s(45167),n=s(78809);function a(e,t){return e===n.Q_.Bid?(0,i.L)("Bid {0} Price",(0,o.E)(t)):(0,i.L)("Ask {0} Price",(0,o.E)(t))}},18505:(e,t,s)=>{"use strict";s.d(t,{G:()=>a});var i=s(9570),o=s(75368),n=s(72563);function a(e,t,s,a){return t===i.Qm.Netted||t===i.Qm.SpreadBetting||a?{isProviderAllowed:!1,errorMessage:(0,o.L)("Netted or Spread Betting accounts are not allowed.")}:e?{isProviderAllowed:!1,errorMessage:(0,o.L)("You cannot become a strategy provider with this account. Please contact your broker for details.")}:void 0===s?{isProviderAllowed:!1,errorMessage:""}:s===n.V.Demo?{isProviderAllowed:!0,errorMessage:""}:[n.V.Guest,n.V.Unknown].includes(s)?{isProviderAllowed:!1,errorMessage:(0,o.L)("You cannot become a strategy provider because your broker is a Guest Member broker. Please contact your broker for more info.")}:{isProviderAllowed:!0,errorMessage:""}}},42255:(e,t,s)=>{"use strict";s.d(t,{c:()=>n});var i=s(46119),o=s(14418);const n=e=>{(0,i.x)(e,o.S.subscribe,o.S.unsubscribe)}},78325:(e,t,s)=>{"use strict";s.d(t,{j:()=>r});var i=s(67294),o=s(40169),n=s(34572),a=s(14418);const r=(0,i.memo)((()=>((()=>{const e=(0,o.I0)();(0,i.useEffect)((()=>(e(a.S.subscribeList([n.xu])),()=>{e(a.S.unsubscribeList([n.xu]))})),[e])})(),null)))},40382:(e,t,s)=>{"use strict";s.d(t,{yS:()=>r,nn:()=>l,HD:()=>d,jP:()=>c});var i=s(75368),o=s(30381),n=s.n(o),a=s(30365);function r(e){if(void 0!==e)return`${(0,i.L)("The strategy creation date")}: ${n()(e).format("DD MMM YYYY")}`}const l=e=>{const{managementFee:t,performanceFee:s,volumeFee:i}=e;return t+s+i===0};function d(e){return void 0===e||e===a.LK.Deleted}function c(e){return e===a.LK.Stopped}},34647:(e,t,s)=>{"use strict";s.d(t,{Q:()=>n});var i=s(67294),o=s(42255);const n=(0,i.memo)((e=>{const{strategyId:t}=e;return(0,o.c)([t]),null}))},94524:(e,t,s)=>{"use strict";s.d(t,{e:()=>o});var i=s(46119);const o=e=>{const{param:t,subscribe:s,unsubscribe:o}=e;return(0,i.x)([t],s,o),null}},65384:(e,t,s)=>{"use strict";s.d(t,{i:()=>O});var i=s(66772),o=s(75879),n=s.n(o),a=s(70378),r=s(71383),l=s(95035),d=s(87161),c=s(43946),u=s(39584),h=s(8166);const g=n()([(0,r.$)(h.H).data.isLcg(),(0,r.$)(c.b).ask(),(0,r.$)(c.b).bid(),(0,l.P)().type()],((e,t,s,i)=>({isLcg:e,price:i===u.F.Ask?t:s})))(Object.assign({keySelector:(0,d.q)((0,l.P)().symbolId(),(0,l.P)().size(),(0,l.P)().type())},(0,a.jo)()));var p=s(62036),b=s(50204),v=s(56137),m=s(9770),j=s(10222),x=s(64573),y=s(82864);const S=n()([(0,r.$)(y.M).pipPosition(),(0,r.$)(y.M).digits()],((e,t)=>({pipPosition:e,digits:t})))(Object.assign(Object.assign({},(0,a.jo)()),{keySelector:(0,l.P)().symbolId()})),f={big:s(3288).kZ,small:""},O=e=>{const{symbolId:t,size:s,type:o}=e,{isLcg:n,price:a}=(0,i.x)(g,{symbolId:t,size:s,type:o});return(0,p.c)([t]),(0,b.c)(n?[t]:[]),(0,v.G)(n?[t]:[]),(e=>{const{price:t,symbolId:s}=e;(0,m.c)([s]);const{pipPosition:o,digits:n}=(0,i.x)(S,{symbolId:s});return void 0!==t&&void 0!==o&&void 0!==n?(0,j.Ng)((0,x.FH)(t,n),o,n):f})({price:a,symbolId:t})}},7436:(e,t,s)=>{"use strict";s.d(t,{_:()=>d});var i=s(85893),o=s(67294),n=s(65384);const a=()=>({root:{display:"flex",alignItems:"baseline",justifyContent:"center"},big:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},small:{fontSize:"0.85em",whiteSpace:"nowrap",overflow:"hidden"}});var r=s(42983);const l=(0,o.memo)((e=>{const{big:t,small:s,extend:o}=e,{css:n}=(0,r.X)(a,{extend:o});return(0,i.jsxs)("div",Object.assign({className:n.root()},{children:[(0,i.jsx)("div",Object.assign({className:n.big()},{children:t}),void 0),(0,i.jsx)("div",Object.assign({className:n.small()},{children:s}),void 0)]}),void 0)})),d=(0,o.memo)((e=>{const{symbolId:t,size:s,type:o,extend:a}=e,{big:r,small:d}=(0,n.i)({symbolId:t,size:s,type:o});return(0,i.jsx)(l,{big:r,small:d,extend:a},void 0)}))},39584:(e,t,s)=>{"use strict";var i;s.d(t,{F:()=>i}),function(e){e.Bid="Bid",e.Ask="Ask"}(i||(i={}))},69111:(e,t,s)=>{"use strict";s.d(t,{x:()=>O});var i=s(85893),o=s(69903),n=s(42983),a=s(67294);const r=e=>{const{isAscendingChange:t}=e,{foregroundColor:s}=e.theme.palette.semantic;return{root:Object.assign({flexShrink:0},void 0!==t&&{color:t?s.positive:s.negative})}};var l=s(70378),d=s(71383),c=s(95035),u=s(82864),h=s(75879),g=s.n(h),p=s(65185);const b=g()([(0,d.$)(p.G).bid(),(0,d.$)(p.G).close()],((e,t)=>{if(void 0!==e&&void 0!==t)return e-t}))(Object.assign(Object.assign({},(0,l.jo)()),{keySelector:(0,c.P)().symbolId()})),v=g()([b,(0,d.$)(p.G).close()],((e,t)=>{if(void 0!==e&&void 0!==t)return e/t}))(Object.assign(Object.assign({},(0,l.jo)()),{keySelector:(0,c.P)().symbolId()}));var m=s(32694),j=s(3288),x=s(8519),y=s(2803);function S(e,t,s,i){if(void 0===e)return j.kZ;const o=(0,m.Rv)(e,s);return`${(0,x.AP)(s,i,!0)(o)} (${(0,y.T)(!0)(t)})`}const f=g()([(0,d.$)(u.M).pipPosition(),(0,d.$)(u.M).digits(),b,v],((e,t,s,i)=>({change:S(s,i,e,t),isAscendingChange:s>0})))(Object.assign(Object.assign({},(0,l.jo)()),{keySelector:(0,c.P)().symbolId()})),O=(0,a.memo)((e=>{const{symbolId:t,extend:s={}}=e,{change:a,isAscendingChange:l}=(0,o.v)(f,{symbolId:t}),{css:d}=(0,n.X)(r,{isAscendingChange:l,extend:s});return(0,i.jsx)("div",Object.assign({className:d.root()},{children:a}),void 0)}))},50204:(e,t,s)=>{"use strict";s.d(t,{c:()=>n});var i=s(46119),o=s(30740);const n=e=>{(0,i.x)(e,o.Q.subscribe,o.Q.unsubscribe)}},25340:(e,t,s)=>{"use strict";s.d(t,{c:()=>n});var i=s(67294),o=s(50204);const n=(0,i.memo)((e=>{const{symbolId:t}=e;return(0,o.c)([t]),null}))},12370:(e,t,s)=>{"use strict";s.d(t,{a:()=>v});var i=s(95035),o=s(75879),n=s.n(o),a=s(71383),r=s(4605),l=s(70378);const d=n()([(0,a.$)(r.N).watchlists({})],(e=>Object.entries(e).filter((([,e])=>e)).map((([e])=>e))))(Object.assign(Object.assign({},(0,l.jo)()),{keySelector:(0,i.P)().viewId()}));var c=s(14224),u=s(44251),h=s(99938),g=s(9013),p=s(70216);const b=(0,c.X)(g.l,l.mr).chain((e=>(0,u.H)(e.map((e=>(0,h.t)(p.K,{watchlistId:e.id},l.iN))))(Object.assign(Object.assign({},(0,l.jo)()),{keySelector:(0,i.P)().viewId()})))).build(),v=n()([b,d],((e,t)=>e.map((e=>Object.assign(Object.assign({},e),{collapsed:t.some((t=>t===e.id))})))))(Object.assign(Object.assign({},(0,l.jo)()),{keySelector:(0,i.P)().viewId()}))},70216:(e,t,s)=>{"use strict";s.d(t,{K:()=>S});var i=s(87161),o=s(95035),n=s(75879),a=s.n(n),r=s(18032),l=s(70378),d=s(60313),c=s(23490),u=s(14224),h=s(44251),g=s(99938),p=s(51359),b=s(72065),v=s(71383),m=s(4605);const j=a()([(0,v.$)(m.N).symbols({}),(0,o.P)().watchlistId()],((e,t)=>{var s;return Object.entries(null!==(s=null==e?void 0:e[t])&&void 0!==s?s:{}).filter((([,e])=>e)).map((([e])=>e))}))(Object.assign({keySelector:(0,i.q)((0,o.P)().viewId(),(0,o.P)().watchlistId())},(0,l.jo)())),x=(0,u.X)(j,l.mr).chain((e=>(0,h.H)(e.map((e=>(0,g.t)(b.e,{symbolName:e},l.iN))))(Object.assign(Object.assign({},(0,l.jo)()),{keySelector:p.Rs})))).map((e=>e.filter((e=>void 0!==e)))).build(),y=a()([d.q,x],((e,t)=>e.map((e=>(0,r.G)(e)?Object.assign(Object.assign({},e),{opened:!1}):Object.assign(Object.assign({},e),{opened:t.some((t=>t.symbolId===e.symbolId))})))))(Object.assign(Object.assign({},(0,l.jo)()),{keySelector:(0,i.q)((0,o.P)().watchlistId(),(0,o.P)().viewId())})),S=a()([c.G,y],((e,t)=>Object.assign(Object.assign({},e),{symbolList:t})))(Object.assign(Object.assign({},(0,l.jo)()),{keySelector:(0,i.q)((0,o.P)().watchlistId(),(0,o.P)().viewId())}))},57116:(e,t,s)=>{"use strict";s.d(t,{J:()=>c});var i=s(71383),o=s(87161),n=s(95035),a=s(43946),r=s(75879),l=s.n(r),d=s(70378);const c=l()([(0,i.$)(a.b).bid(),(0,i.$)(a.b).ask()],((e,t)=>{if(void 0!==e&&void 0!==t)return t-e}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,o.q)((0,n.P)().symbolId(),(0,n.P)().size())}))},62036:(e,t,s)=>{"use strict";s.d(t,{c:()=>n});var i=s(46119),o=s(22536);const n=e=>{(0,i.x)(e,o.J.subscribe,o.J.unsubscribe)}},64253:(e,t,s)=>{"use strict";s.d(t,{B:()=>n});var i=s(67294),o=s(62036);const n=(0,i.memo)((e=>{const{symbolId:t}=e;return(0,o.c)([t]),null}))},82924:(e,t,s)=>{"use strict";s.d(t,{s:()=>g});var i=s(69903),o=s(75879),n=s.n(o),a=s(71383),r=s(95035),l=s(70378),d=s(82864);const c=n()([(0,a.$)(d.M).gslScheduleId()],(e=>({scheduleId:e})))(Object.assign(Object.assign({},(0,l.jo)()),{keySelector:(0,r.P)().symbolId()}));var u=s(46119),h=s(99741);const g=e=>{const{scheduleId:t}=(0,i.v)(c,{symbolId:e});var s;s=[t],(0,u.x)(s,h.w.subscribe,h.w.unsubscribe)}},9770:(e,t,s)=>{"use strict";s.d(t,{c:()=>n});var i=s(46119),o=s(10632);const n=e=>{(0,i.x)(e,o.u.subscribe,o.u.unsubscribe)}},11676:(e,t,s)=>{"use strict";s.d(t,{$:()=>d});var i=s(14224),o=s(71383),n=s(99938),a=s(62139),r=s(82864),l=s(70378);const d=(0,i.X)((0,o.$)(r.M).baseAssetId(),l.mr).chain((e=>(0,n.t)(a.q,{assetId:e},l.iN))).build()},29035:(e,t,s)=>{"use strict";s.d(t,{N:()=>d});var i=s(14224),o=s(71383),n=s(99938),a=s(82864),r=s(86384),l=s(70378);const d=(0,i.X)((0,o.$)(a.M).leverageId(),l.mr).chain((e=>(0,n.t)(r.e,{leverageId:e},l.iN))).build()},6729:(e,t,s)=>{"use strict";s.d(t,{e:()=>d});var i=s(71383),o=s(95035),n=s(65250),a=s(70378),r=s(98773),l=s(75879);const d=s.n(l)()([r.c,(0,i.$)(n.r).serverTime()],((e,t)=>e.some((e=>e.startDate<=t&&e.endDate>t))))(Object.assign(Object.assign({},(0,a.jo)()),{keySelector:(0,o.P)().symbolId()}))},62084:(e,t,s)=>{"use strict";s.d(t,{D:()=>v});var i=s(75879),o=s.n(i),n=s(71383),a=s(95035),r=s(82864),l=s(14224),d=s(99938),c=s(72832),u=s(70378),h=s(77218);const g=(0,l.X)((0,n.$)(r.M).minCommissionAsset(),u.mr).chain((e=>(0,d.t)(c.R,{assetName:(0,h.e)(e)},u.iN))).build();var p=s(74139),b=s(44798);const v=o()([(0,n.$)(r.M).minCommissionType(),g,b.D],((e,t,s)=>e===p.M4.CURRENCY?t:e===p.M4.QUOTE_CURRENCY?s:void 0))(Object.assign(Object.assign({},(0,u.jo)()),{keySelector:(0,a.P)().symbolId()}))},44798:(e,t,s)=>{"use strict";s.d(t,{D:()=>d});var i=s(14224),o=s(71383),n=s(99938),a=s(62139),r=s(82864),l=s(70378);const d=(0,i.X)((0,o.$)(r.M).quoteAssetId(),l.mr).chain((e=>(0,n.t)(a.q,{assetId:e},l.iN))).build()},98773:(e,t,s)=>{"use strict";s.d(t,{c:()=>p});var i=s(70378),o=s(80008),n=s.n(o),a=s(60578),r=s(65084);var l=s(82864),d=s(75879),c=s.n(d),u=s(71383),h=s(95035),g=s(65250);const p=c()([(0,u.$)(l.M).schedule(),(0,u.$)(l.M).scheduleTimeZone(),(0,u.$)(g.r).serverTime()],((e,t,s)=>{if(!e)return[];const i=((e,t)=>{const s=(0,r.Og)(e,0),i=function(e,t){return n()(e).tz(t).utcOffset()*a.yJ}(e,t);return e=>{const t=e*a.qk;return s+t-i}})(s,t);return e.map((e=>({startDate:i(e.startSecond),endDate:i(e.endSecond)})))}))(Object.assign(Object.assign({},(0,i.jo)()),{keySelector:(0,h.P)().symbolId()}))},27332:(e,t,s)=>{"use strict";s.d(t,{j:()=>m});var i=s(75879),o=s.n(i),n=s(71383),a=s(95035),r=s(82864),l=s(33535),d=s(70378);const c=o()([(0,n.$)(r.M).commission()],(e=>(0,l.R)(e)))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,a.P)().symbolId()}));var u=s(44798),h=s(74139),g=s(16603),p=s(41044),b=s(3288),v=s(75368);const m=o()([c,(0,n.$)(r.M).commissionType(),(0,n.$)(u.D).displayName(""),(0,n.$)(u.D).digits()],((e,t,s,i)=>{if(void 0===t)return{title:null==e?void 0:e.toString(),description:""};switch(t){case h.Y5.USD_PER_MILLION_USD_VOLUME:return{title:void 0!==e?`${(0,p.x)(b.cQ)(e)} ${b.qY}`:void 0,description:(0,v.L)("per mil. {0} volume",b.qY)};case h.Y5.USD_PER_ONE_LOT:return{title:void 0!==e?`${(0,p.x)(b.cQ)(e)} ${b.qY}`:void 0,description:(0,v.L)("per Lot")};case h.Y5.PERCENTAGE_OF_TRADING_VOLUME:return{title:void 0!==e?`${e.toString()}%`:void 0,description:(0,v.L)("% of volume")};case h.Y5.QUOTE_CURRENCY_PER_ONE_LOT:return{title:void 0!==e&&void 0!==i?`${(0,p.x)(i)(e)} ${s}`:void 0,description:(0,v.L)("per Lot")};default:return(0,g.N)(t)}}))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,a.P)().symbolId()}))},39753:(e,t,s)=>{"use strict";s.d(t,{T:()=>p});var i=s(75879),o=s.n(i),n=s(71383),a=s(95035),r=s(82864),l=s(70378),d=s(93302),c=s.n(d);const u=o()([(0,n.$)(r.M).minCommission(0)],(e=>new(c())(e)))(Object.assign(Object.assign({},(0,l.jo)()),{keySelector:(0,a.P)().symbolId()}));var h=s(62084),g=s(41044);const p=o()([u,(0,n.$)(h.D).displayName(),(0,n.$)(h.D).digits()],((e,t,s)=>e.gt(0)&&void 0!==t&&void 0!==s?`${(0,g.x)(s)(e)} ${t}`:void 0))(Object.assign(Object.assign({},(0,l.jo)()),{keySelector:(0,a.P)().symbolId()}))},11557:(e,t,s)=>{"use strict";s.d(t,{c:()=>c});var i=s(75879),o=s.n(i),n=s(71383),a=s(95035),r=s(82864),l=s(42824),d=s(70378);const c=o()([(0,n.$)(r.M).digits()],(e=>void 0!==e?(0,l.l)(Math.pow(10,-e)):void 0))(Object.assign(Object.assign({},(0,d.jo)()),{keySelector:(0,a.P)().symbolId()}))},60196:(e,t,s)=>{"use strict";s.d(t,{V:()=>b});var i=s(85893),o=s(67294),n=s(69880),a=s(75879),r=s.n(a),l=s(71383),d=s(95035),c=s(82864),u=s(70378);const h=r()([(0,l.$)(c.M).baseAssetId()],(e=>({assetId:e})))(Object.assign(Object.assign({},(0,u.jo)()),{keySelector:(0,d.P)().symbolId()}));var g=s(54622);class p extends o.Component{render(){const{assetId:e}=this.props;return(0,i.jsx)(g.L,{assetId:e},void 0)}}const b=(0,n.$)(h)(p)},32244:(e,t,s)=>{"use strict";s.d(t,{a:()=>b});var i=s(85893),o=s(67294),n=s(69880),a=s(75879),r=s.n(a),l=s(70378),d=s(71383),c=s(95035),u=s(82864);const h=r()([(0,d.$)(u.M).minCommissionAsset()],(e=>({assetName:e})))(Object.assign(Object.assign({},(0,l.jo)()),{keySelector:(0,c.P)().symbolId()}));var g=s(54622);class p extends o.Component{render(){const{assetName:e}=this.props;return(0,i.jsx)(g.L,{assetName:e},void 0)}}const b=(0,n.$)(h)(p)},52926:(e,t,s)=>{"use strict";s.d(t,{h:()=>n});var i=s(67294),o=s(82924);const n=(0,i.memo)((e=>{const{symbolId:t}=e;return(0,o.s)(t),null}))},94774:(e,t,s)=>{"use strict";s.d(t,{J:()=>b});var i=s(85893),o=s(67294),n=s(69880),a=s(75879),r=s.n(a),l=s(71383),d=s(95035),c=s(70378),u=s(82864);const h=r()([(0,l.$)(u.M).quoteAssetId()],(e=>({assetId:e})))(Object.assign(Object.assign({},(0,c.jo)()),{keySelector:(0,d.P)().symbolId()}));var g=s(54622);class p extends o.Component{render(){const{assetId:e}=this.props;return(0,i.jsx)(g.L,{assetId:e},void 0)}}const b=(0,n.$)(h)(p)},23689:(e,t,s)=>{"use strict";s.d(t,{i:()=>n});var i=s(67294),o=s(9770);const n=(0,i.memo)((e=>{const{symbolId:t}=e;return(0,o.c)([t]),null}))},75504:(e,t,s)=>{"use strict";s.d(t,{W:()=>d});var i=s(85893),o=s(67294),n=s(90660),a=s(4285);const r=(0,s(96486).memoize)((e=>{const{buttonBackgroundColor:t,backgroundColor:s}=e.palette.semantic,i=Object.assign(Object.assign({},s),{primaryNormal:s.quaternaryNormal,primaryHover:s.quaternaryHover,primaryDisabled:s.quaternaryDisabled}),o=Object.assign(Object.assign({},t),{secondaryNormal:t.primaryNormal,secondaryHover:t.primaryHover,secondaryDisabled:t.primaryDisabled});return Object.assign(Object.assign({},e),{palette:Object.assign(Object.assign({},e.palette),{semantic:Object.assign(Object.assign({},e.palette.semantic),{backgroundColor:i,buttonBackgroundColor:o})})})}));class l extends o.Component{render(){const{children:e,theme:t}=this.props;return(0,i.jsx)(n.Z,Object.assign({theme:r(t),overwrite:!0},{children:(0,i.jsx)(i.Fragment,{children:e},void 0)}),void 0)}}const d=(0,a.Z)({})(l)},96252:(e,t,s)=>{"use strict";var i;s.d(t,{O:()=>i}),function(e){e.SmallLogo="small_logo.svg"}(i||(i={}))},12592:(e,t,s)=>{"use strict";s.d(t,{W:()=>a});var i=s(27623),o=s(75368),n=s(3288);function a(e){switch(e){case i.mr.January:return(0,o.L)("January");case i.mr.February:return(0,o.L)("February");case i.mr.March:return(0,o.L)("March");case i.mr.April:return(0,o.L)("April");case i.mr.May:return(0,o.L)("May");case i.mr.June:return(0,o.L)("June");case i.mr.July:return(0,o.L)("July");case i.mr.August:return(0,o.L)("August");case i.mr.September:return(0,o.L)("September");case i.mr.October:return(0,o.L)("October");case i.mr.November:return(0,o.L)("November");case i.mr.December:return(0,o.L)("December");default:return n.kZ}}},37589:(e,t,s)=>{"use strict";s.d(t,{y:()=>a});var i=s(27623),o=s(75368),n=s(3288);function a(e){switch(e){case i.OG.Sunday:return(0,o.L)("Sunday");case i.OG.Monday:return(0,o.L)("Monday");case i.OG.Tuesday:return(0,o.L)("Tuesday");case i.OG.Wednesday:return(0,o.L)("Wednesday");case i.OG.Thursday:return(0,o.L)("Thursday");case i.OG.Friday:return(0,o.L)("Friday");case i.OG.Saturday:return(0,o.L)("Saturday");default:return n.kZ}}},86731:(e,t,s)=>{"use strict";s.d(t,{$:()=>a});var i=s(27623),o=s(3288),n=s(75368);function a(e){switch(e){case i.OG.Sunday:return(0,n.L)("Sun");case i.OG.Monday:return(0,n.L)("Mon");case i.OG.Tuesday:return(0,n.L)("Tue");case i.OG.Wednesday:return(0,n.L)("Wed");case i.OG.Thursday:return(0,n.L)("Thu");case i.OG.Friday:return(0,n.L)("Fri");case i.OG.Saturday:return(0,n.L)("Sat");default:return o.kZ}}},89140:(e,t,s)=>{"use strict";s.d(t,{x:()=>o});var i=s(27623);function o(){return[i.mr.January,i.mr.February,i.mr.March,i.mr.April,i.mr.May,i.mr.June,i.mr.July,i.mr.August,i.mr.September,i.mr.October,i.mr.November,i.mr.December]}},27549:(e,t,s)=>{"use strict";function i(e,t=2){return String(e).padStart(t,"0")}s.d(t,{B:()=>i})},2429:(e,t,s)=>{"use strict";s.d(t,{H:()=>n});var i=s(87504),o=s(75368);function n(e){switch(e){case i.y.ShouldCompleteKyc:return(0,o.L)("Please activate your Account");case i.y.NotEnoughFunds:return(0,o.L)("Not enough funds");case i.y.Absent:return(0,o.L)("The symbol is absent or loading now");case i.y.SymbolDisabled:return(0,o.L)("Trading for this symbol is disabled");case i.y.TradingEnabledAndMarketOpen:return(0,o.L)("The symbol is opened for trading");case i.y.TradingEnabledAndMarketClose:return(0,o.L)("The market for this symbol is closed");case i.y.CloseOnlyAndMarketOpen:return(0,o.L)("Trading for this symbol is disabled. Symbol can be closed only");case i.y.ShortTradingDisabledAndMarketOpen:return(0,o.L)("Short trading for this symbol is disabled");case i.y.FullyDisabledForAccount:return(0,o.L)("Trading for this account is disabled");case i.y.CloseOnlyForAccountAndMarketOpen:return(0,o.L)('The status of this account is set to "Close Only". You can only close your existing Positions');case i.y.DisabledForLimitedRiskForSymbolWithoutGuaranteedStopLoss:return(0,o.L)("Limited Risks accounts are not supported for this symbol");default:return}}},75477:(e,t,s)=>{"use strict";var i;s.d(t,{e:()=>i}),function(e){e.buyState="buyState",e.sellState="sellState",e.closePositionState="closePositionState",e.cancelOrderState="cancelOrderState",e.quickTradeBuyState="quickTradeBuyState",e.quickTradeSellState="quickTradeSellState",e.quickTradeBuyLimitState="quickTradeBuyLimitState",e.quickTradeSellLimitState="quickTradeSellLimitState",e.quickTradeBuyStopState="quickTradeBuyStopState",e.quickTradeSellStopState="quickTradeSellStopState",e.quickTradeBuyStopLimitState="quickTradeBuyStopLimitState",e.quickTradeSellStopLimitState="quickTradeSellStopLimitState",e.quickTradeCloseAllBuyPositionsState="quickTradeCloseAllBuyPositionsState",e.quickTradeCloseAllSellPositionsState="quickTradeCloseAllSellPositionsState",e.quickTradeCancelAllBuyOrdersState="quickTradeCancelAllBuyOrdersState",e.quickTradeCancelAllSellOrdersState="quickTradeCancelAllSellOrdersState",e.reversePositionState="reversePositionState",e.doublePositionState="doublePositionState",e.modifyPositionState="modifyPositionState",e.modifyPositionPartialClosingState="modifyPositionPartialClosingState",e.modifyPositionProtectionState="modifyPositionProtectionState",e.modifyOrderState="modifyOrderState",e.placeOrderBuyMarketState="placeOrderBuyMarketState",e.placeOrderSellMarketState="placeOrderSellMarketState",e.placeOrderBuyPendingState="placeOrderBuyPendingState",e.placeOrderSellPendingState="placeOrderSellPendingState"}(i||(i={}))},34877:(e,t,s)=>{"use strict";s.d(t,{X:()=>k});var i=s(71383),o=s(95035),n=s(75368),a=s(87504),r=s(8494),l=s(2429);class d{constructor(){this.states={absentState:this.getHiddenState((0,l.H)(a.y.Absent)),marketForSymbolClosedState:this.getDisabledState((0,l.H)(a.y.TradingEnabledAndMarketClose)),tradingForSymbolDisabledState:this.getDisabledState((0,l.H)(a.y.SymbolDisabled)),shortTradingForSymbolDisabledState:this.getDisabledState((0,l.H)(a.y.ShortTradingDisabledAndMarketOpen)),tradingForAccountDisabledState:this.getDisabledState((0,l.H)(a.y.FullyDisabledForAccount)),closeOnlyForAccountState:this.getDisabledState((0,l.H)(a.y.CloseOnlyForAccountAndMarketOpen)),closeOnlyForSymbolState:this.getDisabledState((0,l.H)(a.y.CloseOnlyAndMarketOpen)),notEnoughFundsState:this.getEnabledState((0,l.H)(a.y.NotEnoughFunds)),shouldCompleteKycState:this.getEnabledState((0,l.H)(a.y.ShouldCompleteKyc)),isLimitedRiskAccountState:this.getDisabledState((0,l.H)(a.y.DisabledForLimitedRiskForSymbolWithoutGuaranteedStopLoss))}}static getInstance(){return d.instance||(d.instance=new d),d.instance}getNotEnoughFundsData(){return{tradingModeStatus:a.y.NotEnoughFunds,title:(0,l.H)(a.y.NotEnoughFunds),closePositionState:this.states.notEnoughFundsState,cancelOrderState:this.states.notEnoughFundsState,buyState:this.states.notEnoughFundsState,sellState:this.states.notEnoughFundsState,quickTradeBuyState:this.states.notEnoughFundsState,quickTradeSellState:this.states.notEnoughFundsState,quickTradeBuyLimitState:this.states.notEnoughFundsState,quickTradeSellLimitState:this.states.notEnoughFundsState,quickTradeBuyStopState:this.states.notEnoughFundsState,quickTradeSellStopState:this.states.notEnoughFundsState,quickTradeBuyStopLimitState:this.states.notEnoughFundsState,quickTradeSellStopLimitState:this.states.notEnoughFundsState,quickTradeCloseAllBuyPositionsState:this.states.notEnoughFundsState,quickTradeCloseAllSellPositionsState:this.states.notEnoughFundsState,quickTradeCancelAllBuyOrdersState:this.states.notEnoughFundsState,quickTradeCancelAllSellOrdersState:this.states.notEnoughFundsState,reversePositionState:this.states.notEnoughFundsState,doublePositionState:this.states.notEnoughFundsState,modifyPositionState:this.states.notEnoughFundsState,modifyPositionPartialClosingState:this.states.notEnoughFundsState,modifyPositionProtectionState:this.getEnabledState("Apply Protection changes"),modifyOrderState:this.states.notEnoughFundsState,placeOrderBuyMarketState:this.states.notEnoughFundsState,placeOrderSellMarketState:this.states.notEnoughFundsState,placeOrderBuyPendingState:this.states.notEnoughFundsState,placeOrderSellPendingState:this.states.notEnoughFundsState}}getShouldCompleteKycData(){return{tradingModeStatus:a.y.ShouldCompleteKyc,title:(0,l.H)(a.y.ShouldCompleteKyc),closePositionState:this.states.shouldCompleteKycState,cancelOrderState:this.states.shouldCompleteKycState,buyState:this.states.shouldCompleteKycState,sellState:this.states.shouldCompleteKycState,quickTradeBuyState:this.states.shouldCompleteKycState,quickTradeSellState:this.states.shouldCompleteKycState,quickTradeBuyLimitState:this.states.shouldCompleteKycState,quickTradeSellLimitState:this.states.shouldCompleteKycState,quickTradeBuyStopState:this.states.shouldCompleteKycState,quickTradeSellStopState:this.states.shouldCompleteKycState,quickTradeBuyStopLimitState:this.states.shouldCompleteKycState,quickTradeSellStopLimitState:this.states.shouldCompleteKycState,quickTradeCloseAllBuyPositionsState:this.states.shouldCompleteKycState,quickTradeCloseAllSellPositionsState:this.states.shouldCompleteKycState,quickTradeCancelAllBuyOrdersState:this.states.shouldCompleteKycState,quickTradeCancelAllSellOrdersState:this.states.shouldCompleteKycState,reversePositionState:this.states.shouldCompleteKycState,doublePositionState:this.states.shouldCompleteKycState,modifyPositionState:this.states.shouldCompleteKycState,modifyPositionPartialClosingState:this.states.shouldCompleteKycState,modifyPositionProtectionState:this.getEnabledState("Apply Protection changes"),modifyOrderState:this.states.shouldCompleteKycState,placeOrderBuyMarketState:this.states.shouldCompleteKycState,placeOrderSellMarketState:this.states.shouldCompleteKycState,placeOrderBuyPendingState:this.states.shouldCompleteKycState,placeOrderSellPendingState:this.states.shouldCompleteKycState}}getByStatus(e,t){switch(e){case a.y.Absent:return this.getAbsentData();case a.y.SymbolDisabled:return this.getSymbolDisabledData();case a.y.TradingEnabledAndMarketOpen:return this.getTradingEnabledAndMarketOpenData(t);case a.y.TradingEnabledAndMarketClose:return this.getTradingEnabledAndMarketCloseData(t);case a.y.FullyDisabled:return this.getFullyDisabledData();case a.y.TradingDisabledWithPendingsExecution:return this.getTradingDisabledWithPendingsExecutionData();case a.y.CloseOnlyAndMarketOpen:return this.getCloseOnlyAndMarketOpenData();case a.y.CloseOnlyAndMarketClose:return this.getCloseOnlyAndMarketCloseData();case a.y.ShortTradingDisabledAndMarketOpen:return this.getShortTradingDisabledAndMarketOpenData(t);case a.y.ShortTradingDisabledAndMarketClose:return this.getShortTradingDisabledAndMarketCloseData(t);case a.y.DisabledForLimitedRiskForSymbolWithoutGuaranteedStopLoss:return this.getDisabledForLimitedRiskData();case a.y.FullyDisabledForAccount:return this.getFullyDisabledForAccountData();case a.y.CloseOnlyForAccountAndMarketOpen:return this.getCloseOnlyForAccountAndMarketOpenData();case a.y.CloseOnlyForAccountAndMarketClose:return this.getCloseOnlyForAccountAndMarketCloseData();case a.y.CloseOnlyForAccountAndDisabledWithPendingsExecution:return this.getCloseOnlyForAccountAndDisabledWithPendingsExecutionData();default:return this.getTradingEnabledAndMarketOpenData(t)}}getAbsentData(){return{tradingModeStatus:a.y.Absent,title:(0,l.H)(a.y.Absent),closePositionState:this.states.absentState,cancelOrderState:this.states.absentState,buyState:this.states.absentState,sellState:this.states.absentState,quickTradeBuyState:this.states.absentState,quickTradeSellState:this.states.absentState,quickTradeBuyLimitState:this.states.absentState,quickTradeSellLimitState:this.states.absentState,quickTradeBuyStopState:this.states.absentState,quickTradeSellStopState:this.states.absentState,quickTradeBuyStopLimitState:this.states.absentState,quickTradeSellStopLimitState:this.states.absentState,quickTradeCloseAllBuyPositionsState:this.states.absentState,quickTradeCloseAllSellPositionsState:this.states.absentState,quickTradeCancelAllBuyOrdersState:this.states.absentState,quickTradeCancelAllSellOrdersState:this.states.absentState,reversePositionState:this.states.absentState,doublePositionState:this.states.absentState,modifyPositionState:this.states.absentState,modifyPositionPartialClosingState:this.states.absentState,modifyPositionProtectionState:this.states.absentState,modifyOrderState:this.states.absentState,placeOrderBuyMarketState:this.states.absentState,placeOrderSellMarketState:this.states.absentState,placeOrderBuyPendingState:this.states.absentState,placeOrderSellPendingState:this.states.absentState}}getSymbolDisabledData(){return{tradingModeStatus:a.y.SymbolDisabled,title:(0,l.H)(a.y.SymbolDisabled),closePositionState:this.getEnabledState((0,n.L)("Close Position")),cancelOrderState:this.getEnabledState((0,n.L)("Cancel Order")),buyState:this.states.tradingForSymbolDisabledState,sellState:this.states.tradingForSymbolDisabledState,quickTradeBuyState:this.getHiddenState((0,l.H)(a.y.SymbolDisabled)),quickTradeSellState:this.getHiddenState((0,l.H)(a.y.SymbolDisabled)),quickTradeBuyLimitState:this.getHiddenState((0,l.H)(a.y.SymbolDisabled)),quickTradeSellLimitState:this.getHiddenState((0,l.H)(a.y.SymbolDisabled)),quickTradeBuyStopState:this.getHiddenState((0,l.H)(a.y.SymbolDisabled)),quickTradeSellStopState:this.getHiddenState((0,l.H)(a.y.SymbolDisabled)),quickTradeBuyStopLimitState:this.getHiddenState((0,l.H)(a.y.SymbolDisabled)),quickTradeSellStopLimitState:this.getHiddenState((0,l.H)(a.y.SymbolDisabled)),quickTradeCloseAllBuyPositionsState:this.getHiddenState((0,l.H)(a.y.SymbolDisabled)),quickTradeCloseAllSellPositionsState:this.getHiddenState((0,l.H)(a.y.SymbolDisabled)),quickTradeCancelAllBuyOrdersState:this.getHiddenState((0,l.H)(a.y.SymbolDisabled)),quickTradeCancelAllSellOrdersState:this.getHiddenState((0,l.H)(a.y.SymbolDisabled)),reversePositionState:this.states.tradingForSymbolDisabledState,doublePositionState:this.states.tradingForSymbolDisabledState,modifyPositionState:this.states.tradingForSymbolDisabledState,modifyPositionPartialClosingState:this.getEnabledState((0,n.L)("Modify Position")),modifyPositionProtectionState:this.getEnabledState("Apply Protection changes"),modifyOrderState:this.states.tradingForSymbolDisabledState,placeOrderBuyMarketState:this.states.tradingForSymbolDisabledState,placeOrderSellMarketState:this.states.tradingForSymbolDisabledState,placeOrderBuyPendingState:this.states.tradingForSymbolDisabledState,placeOrderSellPendingState:this.states.tradingForSymbolDisabledState}}getTradingEnabledAndMarketOpenData(e){return{tradingModeStatus:a.y.TradingEnabledAndMarketOpen,title:(0,l.H)(a.y.TradingEnabledAndMarketOpen),closePositionState:this.getEnabledState((0,n.L)("Close Position")),cancelOrderState:this.getEnabledState((0,n.L)("Cancel Order")),buyState:this.getEnabledState((0,n.L)("Click to Buy")),sellState:this.getEnabledState((0,n.L)("Click to Sell")),quickTradeBuyState:this.getEnabledState((0,n.L)("Click to Buy (QuickTrade)")),quickTradeSellState:this.getEnabledState((0,n.L)("Click to Sell (QuickTrade)")),quickTradeBuyLimitState:this.getEnabledState((0,n.L)("Place Buy Limit Order for {0}",e)),quickTradeSellLimitState:this.getEnabledState((0,n.L)("Place Sell Limit Order for {0}",e)),quickTradeBuyStopState:this.getEnabledState((0,n.L)("Place Buy Stop Order for {0}",e)),quickTradeSellStopState:this.getEnabledState((0,n.L)("Place Sell Stop Order for {0}",e)),quickTradeBuyStopLimitState:this.getEnabledState((0,n.L)("Place Buy Stop Limit Order for {0}",e)),quickTradeSellStopLimitState:this.getEnabledState((0,n.L)("Place Sell Stop Limit Order for {0}",e)),quickTradeCloseAllBuyPositionsState:this.getEnabledState((0,n.L)("Close Buy Positions")),quickTradeCloseAllSellPositionsState:this.getEnabledState((0,n.L)("Close Sell Positions")),quickTradeCancelAllBuyOrdersState:this.getEnabledState((0,n.L)("Cancel Buy Orders")),quickTradeCancelAllSellOrdersState:this.getEnabledState((0,n.L)("Cancel Sell Orders")),reversePositionState:this.getEnabledState((0,n.L)("Reverse Position")),doublePositionState:this.getEnabledState((0,n.L)("Double Position")),modifyPositionState:this.getEnabledState((0,n.L)("Modify Position")),modifyPositionPartialClosingState:this.getEnabledState((0,n.L)("Modify Position")),modifyPositionProtectionState:this.getEnabledState("Apply Protection changes"),modifyOrderState:this.getEnabledState((0,n.L)("Modify Order")),placeOrderBuyMarketState:this.getEnabledState((0,n.L)("Place Market Order")),placeOrderSellMarketState:this.getEnabledState((0,n.L)("Place Market Order")),placeOrderBuyPendingState:this.getEnabledState((0,n.L)("Place Pending Order")),placeOrderSellPendingState:this.getEnabledState((0,n.L)("Place Pending Order"))}}getTradingEnabledAndMarketCloseData(e){return{tradingModeStatus:a.y.TradingEnabledAndMarketClose,title:(0,l.H)(a.y.TradingEnabledAndMarketClose),closePositionState:this.states.marketForSymbolClosedState,cancelOrderState:this.getEnabledState((0,n.L)("Cancel Order")),buyState:this.states.marketForSymbolClosedState,sellState:this.states.marketForSymbolClosedState,quickTradeBuyState:this.states.marketForSymbolClosedState,quickTradeSellState:this.states.marketForSymbolClosedState,quickTradeBuyLimitState:this.getEnabledState((0,n.L)("Place Buy Limit Order for {0}",e)),quickTradeSellLimitState:this.getEnabledState((0,n.L)("Place Sell Limit Order for {0}",e)),quickTradeBuyStopState:this.getEnabledState((0,n.L)("Place Buy Stop Order for {0}",e)),quickTradeSellStopState:this.getEnabledState((0,n.L)("Place Sell Stop Order for {0}",e)),quickTradeBuyStopLimitState:this.getEnabledState((0,n.L)("Place Buy Stop Limit Order for {0}",e)),quickTradeSellStopLimitState:this.getEnabledState((0,n.L)("Place Sell Stop Limit Order for {0}",e)),quickTradeCloseAllBuyPositionsState:this.states.marketForSymbolClosedState,quickTradeCloseAllSellPositionsState:this.states.marketForSymbolClosedState,quickTradeCancelAllBuyOrdersState:this.getEnabledState((0,n.L)("Cancel Buy Orders")),quickTradeCancelAllSellOrdersState:this.getEnabledState((0,n.L)("Cancel Sell Orders")),reversePositionState:this.states.marketForSymbolClosedState,doublePositionState:this.states.marketForSymbolClosedState,modifyPositionState:this.states.marketForSymbolClosedState,modifyPositionPartialClosingState:this.states.marketForSymbolClosedState,modifyPositionProtectionState:this.getEnabledState("Apply Protection changes"),modifyOrderState:this.getEnabledState((0,n.L)("Modify Order")),placeOrderBuyMarketState:this.states.marketForSymbolClosedState,placeOrderSellMarketState:this.states.marketForSymbolClosedState,placeOrderBuyPendingState:this.getEnabledState((0,n.L)("Place Pending Order")),placeOrderSellPendingState:this.getEnabledState((0,n.L)("Place Pending Order"))}}getFullyDisabledData(){return{tradingModeStatus:a.y.FullyDisabled,title:(0,l.H)(a.y.SymbolDisabled),closePositionState:this.states.tradingForSymbolDisabledState,cancelOrderState:this.states.tradingForSymbolDisabledState,buyState:this.states.tradingForSymbolDisabledState,sellState:this.states.tradingForSymbolDisabledState,quickTradeBuyState:this.states.tradingForSymbolDisabledState,quickTradeSellState:this.states.tradingForSymbolDisabledState,quickTradeBuyLimitState:this.states.tradingForSymbolDisabledState,quickTradeSellLimitState:this.states.tradingForSymbolDisabledState,quickTradeBuyStopState:this.states.tradingForSymbolDisabledState,quickTradeSellStopState:this.states.tradingForSymbolDisabledState,quickTradeBuyStopLimitState:this.states.tradingForSymbolDisabledState,quickTradeSellStopLimitState:this.states.tradingForSymbolDisabledState,quickTradeCloseAllBuyPositionsState:this.states.tradingForSymbolDisabledState,quickTradeCloseAllSellPositionsState:this.states.tradingForSymbolDisabledState,quickTradeCancelAllBuyOrdersState:this.states.tradingForSymbolDisabledState,quickTradeCancelAllSellOrdersState:this.states.tradingForSymbolDisabledState,reversePositionState:this.states.tradingForSymbolDisabledState,doublePositionState:this.states.tradingForSymbolDisabledState,modifyPositionState:this.states.tradingForSymbolDisabledState,modifyPositionPartialClosingState:this.states.tradingForSymbolDisabledState,modifyPositionProtectionState:this.states.tradingForSymbolDisabledState,modifyOrderState:this.states.tradingForSymbolDisabledState,placeOrderBuyMarketState:this.states.tradingForSymbolDisabledState,placeOrderSellMarketState:this.states.tradingForSymbolDisabledState,placeOrderBuyPendingState:this.states.tradingForSymbolDisabledState,placeOrderSellPendingState:this.states.tradingForSymbolDisabledState}}getTradingDisabledWithPendingsExecutionData(){return{tradingModeStatus:a.y.TradingDisabledWithPendingsExecution,title:(0,l.H)(a.y.SymbolDisabled),closePositionState:this.states.tradingForSymbolDisabledState,cancelOrderState:this.getEnabledState((0,n.L)("Cancel Order")),buyState:this.states.tradingForSymbolDisabledState,sellState:this.states.tradingForSymbolDisabledState,quickTradeBuyState:this.states.tradingForSymbolDisabledState,quickTradeSellState:this.states.tradingForSymbolDisabledState,quickTradeBuyLimitState:this.states.tradingForSymbolDisabledState,quickTradeSellLimitState:this.states.tradingForSymbolDisabledState,quickTradeBuyStopState:this.states.tradingForSymbolDisabledState,quickTradeSellStopState:this.states.tradingForSymbolDisabledState,quickTradeBuyStopLimitState:this.states.tradingForSymbolDisabledState,quickTradeSellStopLimitState:this.states.tradingForSymbolDisabledState,quickTradeCloseAllBuyPositionsState:this.states.tradingForSymbolDisabledState,quickTradeCloseAllSellPositionsState:this.states.tradingForSymbolDisabledState,quickTradeCancelAllBuyOrdersState:this.getEnabledState((0,n.L)("Cancel Buy Orders")),quickTradeCancelAllSellOrdersState:this.getEnabledState((0,n.L)("Cancel Sell Orders")),reversePositionState:this.states.tradingForSymbolDisabledState,doublePositionState:this.states.tradingForSymbolDisabledState,modifyPositionState:this.states.tradingForSymbolDisabledState,modifyPositionPartialClosingState:this.states.tradingForSymbolDisabledState,modifyPositionProtectionState:this.getEnabledState("Apply Protection changes"),modifyOrderState:this.getEnabledState((0,n.L)("Modify Order")),placeOrderBuyMarketState:this.states.tradingForSymbolDisabledState,placeOrderSellMarketState:this.states.tradingForSymbolDisabledState,placeOrderBuyPendingState:this.states.tradingForSymbolDisabledState,placeOrderSellPendingState:this.states.tradingForSymbolDisabledState}}getCloseOnlyAndMarketOpenData(){return{tradingModeStatus:a.y.CloseOnlyAndMarketOpen,title:(0,l.H)(a.y.CloseOnlyAndMarketOpen),closePositionState:this.getEnabledState((0,n.L)("Close Position")),cancelOrderState:this.getEnabledState((0,n.L)("Cancel Order")),buyState:this.states.closeOnlyForSymbolState,sellState:this.states.closeOnlyForSymbolState,quickTradeBuyState:this.states.closeOnlyForSymbolState,quickTradeSellState:this.states.closeOnlyForSymbolState,quickTradeBuyLimitState:this.states.closeOnlyForSymbolState,quickTradeSellLimitState:this.states.closeOnlyForSymbolState,quickTradeBuyStopState:this.states.closeOnlyForSymbolState,quickTradeSellStopState:this.states.closeOnlyForSymbolState,quickTradeBuyStopLimitState:this.states.closeOnlyForSymbolState,quickTradeSellStopLimitState:this.states.closeOnlyForSymbolState,quickTradeCloseAllBuyPositionsState:this.getEnabledState((0,n.L)("Close Buy Positions")),quickTradeCloseAllSellPositionsState:this.getEnabledState((0,n.L)("Close Sell Positions")),quickTradeCancelAllBuyOrdersState:this.getEnabledState((0,n.L)("Cancel Buy Orders")),quickTradeCancelAllSellOrdersState:this.getEnabledState((0,n.L)("Cancel Sell Orders")),reversePositionState:this.states.closeOnlyForSymbolState,doublePositionState:this.states.closeOnlyForSymbolState,modifyPositionState:this.states.closeOnlyForSymbolState,modifyPositionPartialClosingState:this.getEnabledState((0,n.L)("Modify Position")),modifyPositionProtectionState:this.getEnabledState("Apply Protection changes"),modifyOrderState:this.states.closeOnlyForSymbolState,placeOrderBuyMarketState:this.states.closeOnlyForSymbolState,placeOrderSellMarketState:this.states.closeOnlyForSymbolState,placeOrderBuyPendingState:this.states.closeOnlyForSymbolState,placeOrderSellPendingState:this.states.closeOnlyForSymbolState}}getCloseOnlyAndMarketCloseData(){return{tradingModeStatus:a.y.CloseOnlyAndMarketClose,title:(0,l.H)(a.y.CloseOnlyAndMarketOpen),closePositionState:this.states.marketForSymbolClosedState,cancelOrderState:this.getEnabledState((0,n.L)("Cancel Order")),buyState:this.states.closeOnlyForSymbolState,sellState:this.states.closeOnlyForSymbolState,quickTradeBuyState:this.states.closeOnlyForSymbolState,quickTradeSellState:this.states.closeOnlyForSymbolState,quickTradeBuyLimitState:this.states.closeOnlyForSymbolState,quickTradeSellLimitState:this.states.closeOnlyForSymbolState,quickTradeBuyStopState:this.states.closeOnlyForSymbolState,quickTradeSellStopState:this.states.closeOnlyForSymbolState,quickTradeBuyStopLimitState:this.states.closeOnlyForSymbolState,quickTradeSellStopLimitState:this.states.closeOnlyForSymbolState,quickTradeCloseAllBuyPositionsState:this.states.marketForSymbolClosedState,quickTradeCloseAllSellPositionsState:this.states.marketForSymbolClosedState,quickTradeCancelAllBuyOrdersState:this.getEnabledState((0,n.L)("Cancel Buy Orders")),quickTradeCancelAllSellOrdersState:this.getEnabledState((0,n.L)("Cancel Sell Orders")),reversePositionState:this.states.closeOnlyForSymbolState,doublePositionState:this.states.closeOnlyForSymbolState,modifyPositionState:this.states.closeOnlyForSymbolState,modifyPositionPartialClosingState:this.states.marketForSymbolClosedState,modifyPositionProtectionState:this.getEnabledState("Apply Protection changes"),modifyOrderState:this.states.closeOnlyForSymbolState,placeOrderBuyMarketState:this.states.closeOnlyForSymbolState,placeOrderSellMarketState:this.states.closeOnlyForSymbolState,placeOrderBuyPendingState:this.states.closeOnlyForSymbolState,placeOrderSellPendingState:this.states.closeOnlyForSymbolState}}getShortTradingDisabledAndMarketOpenData(e){return{tradingModeStatus:a.y.ShortTradingDisabledAndMarketOpen,title:(0,l.H)(a.y.ShortTradingDisabledAndMarketOpen),closePositionState:this.getEnabledState((0,n.L)("Close Position")),cancelOrderState:this.getEnabledState((0,n.L)("Cancel Order")),buyState:this.getEnabledState((0,n.L)("Click to Buy")),sellState:this.states.shortTradingForSymbolDisabledState,quickTradeBuyState:this.getEnabledState((0,n.L)("Click to Buy (QuickTrade)")),quickTradeSellState:this.states.shortTradingForSymbolDisabledState,quickTradeBuyLimitState:this.getEnabledState((0,n.L)("Place Buy Limit Order for {0}",e)),quickTradeSellLimitState:this.states.tradingForSymbolDisabledState,quickTradeBuyStopState:this.getEnabledState((0,n.L)("Place Buy Stop Order for {0}",e)),quickTradeSellStopState:this.states.tradingForSymbolDisabledState,quickTradeBuyStopLimitState:this.getEnabledState((0,n.L)("Place Buy Stop Limit Order for {0}",e)),quickTradeSellStopLimitState:this.states.tradingForSymbolDisabledState,quickTradeCloseAllBuyPositionsState:this.getEnabledState((0,n.L)("Close Buy Positions")),quickTradeCloseAllSellPositionsState:this.states.shortTradingForSymbolDisabledState,quickTradeCancelAllBuyOrdersState:this.getEnabledState((0,n.L)("Cancel Buy Orders")),quickTradeCancelAllSellOrdersState:this.states.shortTradingForSymbolDisabledState,reversePositionState:this.getEnabledState((0,n.L)("Reverse Position")),doublePositionState:this.getEnabledState((0,n.L)("Double Position")),modifyPositionState:this.getEnabledState((0,n.L)("Modify Position")),modifyPositionPartialClosingState:this.getEnabledState((0,n.L)("Modify Position")),modifyPositionProtectionState:this.getEnabledState("Apply Protection changes"),modifyOrderState:this.getEnabledState((0,n.L)("Modify Order")),placeOrderBuyMarketState:this.getEnabledState((0,n.L)("Place Market Order")),placeOrderSellMarketState:this.states.shortTradingForSymbolDisabledState,placeOrderBuyPendingState:this.getEnabledState((0,n.L)("Place Pending Order")),placeOrderSellPendingState:this.states.shortTradingForSymbolDisabledState}}getShortTradingDisabledAndMarketCloseData(e){return{tradingModeStatus:a.y.ShortTradingDisabledAndMarketClose,title:(0,l.H)(a.y.TradingEnabledAndMarketClose),closePositionState:this.states.marketForSymbolClosedState,cancelOrderState:this.getEnabledState((0,n.L)("Cancel Order")),buyState:this.states.marketForSymbolClosedState,sellState:this.states.shortTradingForSymbolDisabledState,quickTradeBuyState:this.states.marketForSymbolClosedState,quickTradeSellState:this.states.shortTradingForSymbolDisabledState,quickTradeBuyLimitState:this.getEnabledState((0,n.L)("Place Buy Limit Order for {0}",e)),quickTradeSellLimitState:this.states.tradingForSymbolDisabledState,quickTradeBuyStopState:this.getEnabledState((0,n.L)("Place Buy Stop Order for {0}",e)),quickTradeSellStopState:this.states.tradingForSymbolDisabledState,quickTradeBuyStopLimitState:this.getEnabledState((0,n.L)("Place Buy Stop Limit Order for {0}",e)),quickTradeSellStopLimitState:this.states.tradingForSymbolDisabledState,quickTradeCloseAllBuyPositionsState:this.states.marketForSymbolClosedState,quickTradeCloseAllSellPositionsState:this.states.shortTradingForSymbolDisabledState,quickTradeCancelAllBuyOrdersState:this.getEnabledState((0,n.L)("Cancel Buy Orders")),quickTradeCancelAllSellOrdersState:this.states.shortTradingForSymbolDisabledState,reversePositionState:this.states.shortTradingForSymbolDisabledState,doublePositionState:this.states.marketForSymbolClosedState,modifyPositionState:this.states.marketForSymbolClosedState,modifyPositionPartialClosingState:this.states.marketForSymbolClosedState,modifyPositionProtectionState:this.getEnabledState("Apply Protection changes"),modifyOrderState:this.getEnabledState((0,n.L)("Modify Order")),placeOrderBuyMarketState:this.states.marketForSymbolClosedState,placeOrderSellMarketState:this.states.shortTradingForSymbolDisabledState,placeOrderBuyPendingState:this.getEnabledState((0,n.L)("Place Pending Order")),placeOrderSellPendingState:this.states.shortTradingForSymbolDisabledState}}getDisabledForLimitedRiskData(){return{tradingModeStatus:a.y.DisabledForLimitedRiskForSymbolWithoutGuaranteedStopLoss,title:(0,l.H)(a.y.DisabledForLimitedRiskForSymbolWithoutGuaranteedStopLoss),closePositionState:this.states.isLimitedRiskAccountState,cancelOrderState:this.states.isLimitedRiskAccountState,buyState:this.states.isLimitedRiskAccountState,sellState:this.states.isLimitedRiskAccountState,quickTradeBuyState:this.states.isLimitedRiskAccountState,quickTradeSellState:this.states.isLimitedRiskAccountState,quickTradeBuyLimitState:this.states.isLimitedRiskAccountState,quickTradeSellLimitState:this.states.isLimitedRiskAccountState,quickTradeBuyStopState:this.states.isLimitedRiskAccountState,quickTradeSellStopState:this.states.isLimitedRiskAccountState,quickTradeBuyStopLimitState:this.states.isLimitedRiskAccountState,quickTradeSellStopLimitState:this.states.isLimitedRiskAccountState,quickTradeCloseAllBuyPositionsState:this.states.isLimitedRiskAccountState,quickTradeCloseAllSellPositionsState:this.states.isLimitedRiskAccountState,quickTradeCancelAllBuyOrdersState:this.states.isLimitedRiskAccountState,quickTradeCancelAllSellOrdersState:this.states.isLimitedRiskAccountState,reversePositionState:this.states.isLimitedRiskAccountState,doublePositionState:this.states.isLimitedRiskAccountState,modifyPositionState:this.states.isLimitedRiskAccountState,modifyPositionPartialClosingState:this.states.isLimitedRiskAccountState,modifyPositionProtectionState:this.states.isLimitedRiskAccountState,modifyOrderState:this.states.isLimitedRiskAccountState,placeOrderBuyMarketState:this.states.isLimitedRiskAccountState,placeOrderSellMarketState:this.states.isLimitedRiskAccountState,placeOrderBuyPendingState:this.states.isLimitedRiskAccountState,placeOrderSellPendingState:this.states.isLimitedRiskAccountState}}getFullyDisabledForAccountData(){return{tradingModeStatus:a.y.FullyDisabledForAccount,title:(0,l.H)(a.y.FullyDisabledForAccount),closePositionState:this.states.tradingForAccountDisabledState,cancelOrderState:this.states.tradingForAccountDisabledState,buyState:this.states.tradingForAccountDisabledState,sellState:this.states.tradingForAccountDisabledState,quickTradeBuyState:this.states.tradingForAccountDisabledState,quickTradeSellState:this.states.tradingForAccountDisabledState,quickTradeBuyLimitState:this.states.tradingForAccountDisabledState,quickTradeSellLimitState:this.states.tradingForAccountDisabledState,quickTradeBuyStopState:this.states.tradingForAccountDisabledState,quickTradeSellStopState:this.states.tradingForAccountDisabledState,quickTradeBuyStopLimitState:this.states.tradingForAccountDisabledState,quickTradeSellStopLimitState:this.states.tradingForAccountDisabledState,quickTradeCloseAllBuyPositionsState:this.states.tradingForAccountDisabledState,quickTradeCloseAllSellPositionsState:this.states.tradingForAccountDisabledState,quickTradeCancelAllBuyOrdersState:this.states.tradingForAccountDisabledState,quickTradeCancelAllSellOrdersState:this.states.tradingForAccountDisabledState,reversePositionState:this.states.tradingForAccountDisabledState,doublePositionState:this.states.tradingForAccountDisabledState,modifyPositionState:this.states.tradingForAccountDisabledState,modifyPositionPartialClosingState:this.states.tradingForAccountDisabledState,modifyPositionProtectionState:this.states.tradingForAccountDisabledState,modifyOrderState:this.states.tradingForAccountDisabledState,placeOrderBuyMarketState:this.states.tradingForAccountDisabledState,placeOrderSellMarketState:this.states.tradingForAccountDisabledState,placeOrderBuyPendingState:this.states.tradingForAccountDisabledState,placeOrderSellPendingState:this.states.tradingForAccountDisabledState}}getCloseOnlyForAccountAndMarketOpenData(){return{tradingModeStatus:a.y.CloseOnlyForAccountAndMarketOpen,title:(0,l.H)(a.y.CloseOnlyForAccountAndMarketOpen),closePositionState:this.getEnabledState((0,n.L)("Close Position")),cancelOrderState:this.getEnabledState((0,n.L)("Cancel Order")),buyState:this.states.closeOnlyForAccountState,sellState:this.states.closeOnlyForAccountState,quickTradeBuyState:this.states.closeOnlyForAccountState,quickTradeSellState:this.states.closeOnlyForAccountState,quickTradeBuyLimitState:this.states.closeOnlyForAccountState,quickTradeSellLimitState:this.states.closeOnlyForAccountState,quickTradeBuyStopState:this.states.closeOnlyForAccountState,quickTradeSellStopState:this.states.closeOnlyForAccountState,quickTradeBuyStopLimitState:this.states.closeOnlyForAccountState,quickTradeSellStopLimitState:this.states.closeOnlyForAccountState,quickTradeCloseAllBuyPositionsState:this.getEnabledState((0,n.L)("Close Buy Positions")),quickTradeCloseAllSellPositionsState:this.getEnabledState((0,n.L)("Close Sell Positions")),quickTradeCancelAllBuyOrdersState:this.getEnabledState((0,n.L)("Cancel Buy Orders")),quickTradeCancelAllSellOrdersState:this.getEnabledState((0,n.L)("Cancel Sell Orders")),reversePositionState:this.states.closeOnlyForAccountState,doublePositionState:this.states.closeOnlyForAccountState,modifyPositionState:this.states.marketForSymbolClosedState,modifyPositionPartialClosingState:this.getEnabledState((0,n.L)("Modify Position")),modifyPositionProtectionState:this.getEnabledState("Apply Protection changes"),modifyOrderState:this.states.closeOnlyForAccountState,placeOrderBuyMarketState:this.states.closeOnlyForAccountState,placeOrderSellMarketState:this.states.closeOnlyForAccountState,placeOrderBuyPendingState:this.states.closeOnlyForAccountState,placeOrderSellPendingState:this.states.closeOnlyForAccountState}}getCloseOnlyForAccountAndMarketCloseData(){return{tradingModeStatus:a.y.CloseOnlyForAccountAndMarketClose,title:(0,l.H)(a.y.TradingEnabledAndMarketClose),closePositionState:this.states.marketForSymbolClosedState,cancelOrderState:this.getEnabledState((0,n.L)("Cancel Order")),buyState:this.states.closeOnlyForAccountState,sellState:this.states.closeOnlyForAccountState,quickTradeBuyState:this.states.closeOnlyForAccountState,quickTradeSellState:this.states.closeOnlyForAccountState,quickTradeBuyLimitState:this.states.closeOnlyForAccountState,quickTradeSellLimitState:this.states.closeOnlyForAccountState,quickTradeBuyStopState:this.states.closeOnlyForAccountState,quickTradeSellStopState:this.states.closeOnlyForAccountState,quickTradeBuyStopLimitState:this.states.closeOnlyForAccountState,quickTradeSellStopLimitState:this.states.closeOnlyForAccountState,quickTradeCloseAllBuyPositionsState:this.states.marketForSymbolClosedState,quickTradeCloseAllSellPositionsState:this.states.marketForSymbolClosedState,quickTradeCancelAllBuyOrdersState:this.getEnabledState((0,n.L)("Cancel Buy Orders")),quickTradeCancelAllSellOrdersState:this.getEnabledState((0,n.L)("Cancel Sell Orders")),reversePositionState:this.states.closeOnlyForAccountState,doublePositionState:this.states.closeOnlyForAccountState,modifyPositionState:this.states.closeOnlyForAccountState,modifyPositionPartialClosingState:this.states.marketForSymbolClosedState,modifyPositionProtectionState:this.getEnabledState("Apply Protection changes"),modifyOrderState:this.states.closeOnlyForAccountState,placeOrderBuyMarketState:this.states.closeOnlyForAccountState,placeOrderSellMarketState:this.states.closeOnlyForAccountState,placeOrderBuyPendingState:this.states.closeOnlyForAccountState,placeOrderSellPendingState:this.states.closeOnlyForAccountState}}getCloseOnlyForAccountAndDisabledWithPendingsExecutionData(){return{tradingModeStatus:a.y.CloseOnlyForAccountAndDisabledWithPendingsExecution,title:(0,l.H)(a.y.SymbolDisabled),closePositionState:this.states.closeOnlyForAccountState,cancelOrderState:this.getEnabledState((0,n.L)("Cancel Order")),buyState:this.states.closeOnlyForAccountState,sellState:this.states.closeOnlyForAccountState,quickTradeBuyState:this.states.closeOnlyForAccountState,quickTradeSellState:this.states.closeOnlyForAccountState,quickTradeBuyLimitState:this.states.closeOnlyForAccountState,quickTradeSellLimitState:this.states.closeOnlyForAccountState,quickTradeBuyStopState:this.states.closeOnlyForAccountState,quickTradeSellStopState:this.states.closeOnlyForAccountState,quickTradeBuyStopLimitState:this.states.closeOnlyForAccountState,quickTradeSellStopLimitState:this.states.closeOnlyForAccountState,quickTradeCloseAllBuyPositionsState:this.states.closeOnlyForAccountState,quickTradeCloseAllSellPositionsState:this.states.closeOnlyForAccountState,quickTradeCancelAllBuyOrdersState:this.getEnabledState((0,n.L)("Cancel Buy Orders")),quickTradeCancelAllSellOrdersState:this.getEnabledState((0,n.L)("Cancel Sell Orders")),reversePositionState:this.states.closeOnlyForAccountState,doublePositionState:this.states.closeOnlyForAccountState,modifyPositionState:this.states.closeOnlyForAccountState,modifyPositionPartialClosingState:this.states.closeOnlyForAccountState,modifyPositionProtectionState:this.getEnabledState("Apply Protection changes"),modifyOrderState:this.states.closeOnlyForAccountState,placeOrderBuyMarketState:this.states.closeOnlyForAccountState,placeOrderSellMarketState:this.states.closeOnlyForAccountState,placeOrderBuyPendingState:this.states.closeOnlyForAccountState,placeOrderSellPendingState:this.states.closeOnlyForAccountState}}getHiddenState(e){return new r.J(a.L.Hidden,e)}getDisabledState(e){return new r.J(a.L.Disabled,e)}getEnabledState(e){return new r.J(a.L.Enabled,e)}}var c=s(75477),u=s(48645),h=s(8166),g=s(65789),p=s(6729),b=s(82864),v=s(75879),m=s.n(v),j=s(70378),x=s(7485),y=s(18032),S=s(9570),f=s(73056),O=s(16603);const C=m()([p.e,x.S,b.M],((e,t,s)=>function(e){const{symbol:t,account:s,isMarketOn:i}=e;if((0,y.G)(t))return a.y.Absent;if(!t.enabled)return a.y.SymbolDisabled;if(!t.lpEnabled)return a.y.FullyDisabled;switch(null==s?void 0:s.accessRights){case S.Dy.NO_LOGIN:case S.Dy.NO_TRADING:return a.y.FullyDisabledForAccount;case S.Dy.CLOSE_ONLY:return(e=>{const{tradingMode:t,isMarketOn:s}=e;switch(t){case f.OX.DISABLED_WITHOUT_PENDINGS_EXECUTION:return a.y.FullyDisabled;case f.OX.DISABLED_WITH_PENDINGS_EXECUTION:return a.y.CloseOnlyForAccountAndDisabledWithPendingsExecution;case f.OX.CLOSE_ONLY_MODE:return s?a.y.CloseOnlyAndMarketOpen:a.y.CloseOnlyAndMarketClose;case f.OX.ENABLED:return s?a.y.CloseOnlyForAccountAndMarketOpen:a.y.CloseOnlyForAccountAndMarketClose;default:return(0,O.N)(t)}})({tradingMode:t.tradingMode,isMarketOn:i});case S.Dy.FULL_ACCESS:return function(e){const{isLimitedRisk:t,guaranteedStopLoss:s,enableShortSelling:i,tradingMode:o,isMarketOn:n}=e;if(t&&!s)return a.y.DisabledForLimitedRiskForSymbolWithoutGuaranteedStopLoss;switch(o){case f.OX.DISABLED_WITHOUT_PENDINGS_EXECUTION:return a.y.FullyDisabled;case f.OX.DISABLED_WITH_PENDINGS_EXECUTION:return a.y.TradingDisabledWithPendingsExecution;case f.OX.CLOSE_ONLY_MODE:return n?a.y.CloseOnlyAndMarketOpen:a.y.CloseOnlyAndMarketClose;case f.OX.ENABLED:return i?n?a.y.TradingEnabledAndMarketOpen:a.y.TradingEnabledAndMarketClose:n?a.y.ShortTradingDisabledAndMarketOpen:a.y.ShortTradingDisabledAndMarketClose;default:return(0,O.N)(o)}}({isLimitedRisk:s.isLimitedRisk,guaranteedStopLoss:t.guaranteedStopLoss,enableShortSelling:t.enableShortSelling,isMarketOn:i,tradingMode:t.tradingMode});default:return a.y.FullyDisabledForAccount}}({isMarketOn:e,account:t,symbol:s})))(Object.assign(Object.assign({},(0,j.jo)()),{keySelector:(0,o.P)().symbolId()})),k=m()([(0,i.$)(h.H).data.isKawase(),C,u.S,g.S,(0,i.$)(b.M).name("")],((e,t,s,i,o)=>{const n=d.getInstance(),a=n.getShouldCompleteKycData(),r=n.getNotEnoughFundsData(),l=n.getByStatus(t,o);return Object.entries(l).map((([t,o])=>{if(c.e[t]){const n=o;if(s)return[t,a[t]];if(i&&(n.isEnabled||e))return[t,r[t]]}return[t,o]})).reduce(((e,[t,s])=>Object.assign(Object.assign({},e),{[t]:s})),{})}))(Object.assign(Object.assign({},(0,j.jo)()),{keySelector:(0,o.P)().symbolId()}))},94844:(e,t,s)=>{"use strict";s.d(t,{Z:()=>x});var i=s(85893),o=s(67294),n=s(69880),a=s(4285),r=s(83069),l=s(70162),d=s(87504),c=s(71383),u=s(95035),h=s(75879),g=s.n(h),p=s(8166),b=s(70378),v=s(34877);const m=g()([v.X,(0,c.$)(p.H).data.isLcg()],((e,t)=>void 0===e?{tradingModeStatus:void 0,title:"",isLcg:t}:{tradingModeStatus:e.tradingModeStatus,title:e.title,isLcg:t}))(Object.assign(Object.assign({},(0,b.jo)()),{keySelector:(0,u.P)().symbolId()}));class j extends o.Component{render(){const{rules:e,title:t}=this.props,s=this.getIconSource();return(0,i.jsx)("div",Object.assign({title:t},{children:(0,i.jsx)(r.J,{size:l.J.Medium,source:s,extend:{root:e.root(this.props)}},void 0)}),void 0)}getIconSource(){const{tradingModeStatus:e,isLcg:t}=this.props,i=t?"lcg/lcg_":"";let o="statusUnknown";switch(e){case d.y.Absent:case d.y.SymbolDisabled:o="statusUnknown";break;case d.y.ShortTradingDisabledAndMarketClose:case d.y.TradingEnabledAndMarketClose:case d.y.CloseOnlyForAccountAndMarketClose:case d.y.CloseOnlyAndMarketClose:o="marketBreak";break;case d.y.FullyDisabledForAccount:case d.y.DisabledForLimitedRiskForSymbolWithoutGuaranteedStopLoss:case d.y.FullyDisabled:o="closed";break;case d.y.ShortTradingDisabledAndMarketOpen:o="longOnly";break;case d.y.TradingEnabledAndMarketOpen:o="opened";break;case d.y.CloseOnlyForAccountAndDisabledWithPendingsExecution:case d.y.TradingDisabledWithPendingsExecution:o="pendingOrdersAvailable";break;case d.y.CloseOnlyForAccountAndMarketOpen:case d.y.CloseOnlyAndMarketOpen:o="closingOnly"}return s(85670)(`./${i}${o}.svg`)}}const x=(0,n.$)(m)((0,a.Z)((()=>({root:{}})))(j))},8494:(e,t,s)=>{"use strict";s.d(t,{J:()=>o});var i=s(87504);class o{constructor(e,t){this.isEnabled=e===i.L.Enabled,this.isDisabled=e!==i.L.Enabled,this.isHidden=e===i.L.Hidden,this.title=t}}},87504:(e,t,s)=>{"use strict";var i,o;s.d(t,{L:()=>i,y:()=>o}),function(e){e[e.Hidden=0]="Hidden",e[e.Enabled=1]="Enabled",e[e.Disabled=2]="Disabled",e[e.GreyedOut=3]="GreyedOut"}(i||(i={})),function(e){e[e.ShouldCompleteKyc=-2]="ShouldCompleteKyc",e[e.NotEnoughFunds=-1]="NotEnoughFunds",e[e.Absent=1]="Absent",e[e.SymbolDisabled=2]="SymbolDisabled",e[e.TradingEnabledAndMarketOpen=3]="TradingEnabledAndMarketOpen",e[e.TradingEnabledAndMarketClose=4]="TradingEnabledAndMarketClose",e[e.FullyDisabled=5]="FullyDisabled",e[e.TradingDisabledWithPendingsExecution=6]="TradingDisabledWithPendingsExecution",e[e.CloseOnlyAndMarketOpen=7]="CloseOnlyAndMarketOpen",e[e.CloseOnlyAndMarketClose=8]="CloseOnlyAndMarketClose",e[e.ShortTradingDisabledAndMarketOpen=9]="ShortTradingDisabledAndMarketOpen",e[e.ShortTradingDisabledAndMarketClose=10]="ShortTradingDisabledAndMarketClose",e[e.DisabledForLimitedRiskForSymbolWithoutGuaranteedStopLoss=11]="DisabledForLimitedRiskForSymbolWithoutGuaranteedStopLoss",e[e.FullyDisabledForAccount=12]="FullyDisabledForAccount",e[e.CloseOnlyForAccountAndMarketOpen=13]="CloseOnlyForAccountAndMarketOpen",e[e.CloseOnlyForAccountAndMarketClose=14]="CloseOnlyForAccountAndMarketClose",e[e.CloseOnlyForAccountAndDisabledWithPendingsExecution=15]="CloseOnlyForAccountAndDisabledWithPendingsExecution"}(o||(o={}))},16352:(e,t,s)=>{"use strict";s.d(t,{T:()=>c});var i=s(75879),o=s.n(i),n=s(70378),a=s(78283),r=s(72065),l=s(71383),d=s(95035);const c=o()([(0,l.$)(r.e).name(),a.g],((e,t)=>t.some((t=>t.symbolNames.includes(e)))))(Object.assign(Object.assign({},(0,n.jo)()),{keySelector:(0,d.P)().symbolName()}))},85952:(e,t,s)=>{"use strict";s.d(t,{d:()=>a});var i=s(69903),o=s(67294),n=s(50969);const a=e=>{const t=(0,o.useMemo)((()=>(0,n.d)()),[]),s=(0,i.v)(t,{indicatorId:e});return null!=s?s:{}}},50969:(e,t,s)=>{"use strict";s.d(t,{c:()=>d,d:()=>c});var i=s(75879),o=s.n(i),n=s(71383),a=s(95035),r=s(70378),l=s(72154);const d=o()([(0,n.$)(l.y).data(),(0,a.P)().indicatorId()],((e,t)=>e[t]))(Object.assign(Object.assign({},(0,r.jo)()),{keySelector:(0,a.P)().indicatorId()}));function c(e){return o()([d],(e=>e))(Object.assign(Object.assign({},(0,r.jo)()),{keySelector:(0,a.P)().indicatorId()}))}},31817:(e,t,s)=>{"use strict";s.d(t,{J:()=>O});var i=s(72478),o=s(70378),n=s(75368),a=s(4028),r=s(95035),l=s(87161),d=s(75879),c=s.n(d),u=s(29480),h=s(64573),g=s(82864),p=s(71383),b=s(32694),v=s(8519),m=s(8166),j=s(93030),x=s(80235),y=s(64162);const S=c()([j.o,x.S,y.A,(0,r.P)().tradeSide(),(0,r.P)().orderType(),(0,p.$)(g.M).pipPosition(),(0,p.$)(g.M).digits(),(0,p.$)(m.H).data.isLcg()],((e,t,s,i,o,a,r,l)=>{if(!l){const e=(e=>{switch(e){case u.mr.Stop:return(0,n.L)("Stop Order");case u.mr.Limit:return(0,n.L)("Limit Order");case u.mr.StopLimit:return(0,n.L)("Stop Limit Order");default:return}})(o);return(0,n.L)("Please enter a valid {0} price",e)}const d=t-e,c=o===u.mr.Limit?s+d:s,h=(0,b.Rv)(c,a),g=(0,v.AP)(a,r)(h);return`${((e,t)=>{switch(t){case u.mr.Limit:return e===u.aO.Buy?(0,n.L)("The minimum distance for a Buy Limit Order is"):(0,n.L)("The minimum distance for a Sell Limit Order is");case u.mr.Stop:return e===u.aO.Buy?(0,n.L)("The minimum distance for a Buy Stop Order is"):(0,n.L)("The minimum distance for a Sell Stop Order is");case u.mr.StopLimit:return e===u.aO.Buy?(0,n.L)("The minimum distance for a Buy Stop Limit Order is"):(0,n.L)("The minimum distance for a Sell Stop Limit Order is");default:return}})(i,o)} ${g} ${(0,n.L)("pips")}`}))(Object.assign({keySelector:(0,l.q)((0,r.P)().symbolId(),(0,r.P)().tradeSide(),(0,r.P)().stopTriggerMethod(),(0,r.P)().orderType())},(0,o.jo)())),f=c()([(0,r.P)().price(),x.S,y.A,(0,p.$)(g.M).digits(),(0,r.P)().tradeSide(),(0,r.P)().orderType(),S],((e,t,s,i,o,n,a)=>{const r=(0,h.FH)(t+s,i);return n===u.mr.Limit?(o===u.aO.Sell?r>e:r<e)?a:void 0:(o===u.aO.Sell?r<e:r>e)?a:void 0}))(Object.assign({keySelector:(0,l.q)((0,r.P)().price(),(0,r.P)().symbolId(),(0,r.P)().tradeSide(),(0,r.P)().stopTriggerMethod(),(0,r.P)().orderType())},(0,o.jo)())),O=c()([(0,r.P)().price(),a.r,(0,r.P)().orderType(),f],((e,t,s,o)=>{const a=s===u.mr.Limit?(0,n.L)("Please enter a valid Limit Order price"):s===u.mr.Stop?(0,n.L)("Please enter a valid Stop Order price"):(0,n.L)("Please enter a valid Stop Limit Order price");return e<=0?a:(0,i.pR)(e,t)?o:a}))(Object.assign({keySelector:(0,l.q)((0,r.P)().price(),(0,r.P)().symbolId(),(0,r.P)().tradeSide(),(0,r.P)().stopTriggerMethod(),(0,r.P)().orderType())},(0,o.jo)()))},64162:(e,t,s)=>{"use strict";s.d(t,{A:()=>v});var i=s(75879),o=s.n(i),n=s(71383),a=s(95035),r=s(87161),l=s(70378),d=s(8166),c=s(82864),u=s(4028),h=s(94199),g=s(29480),p=s(80235);const b=(e,t,s)=>{if(void 0!==e){if(s===g.mr.Limit){if(t===g.aO.Buy)return-e}else if(t===g.aO.Sell)return-e;return e}},v=o()([p.S,(0,n.$)(c.M).digits(),(0,n.$)(c.M).distanceSetIn(),(0,n.$)(c.M).tpDistance(),(0,n.$)(c.M).slDistance(),u.r,(0,n.$)(d.H).data.isLcg(),(0,a.P)().tradeSide(),(0,a.P)().orderType()],((e,t,s,i,o,n,a,r,l)=>{if(!a)return b(n,r,l);const d=l===g.mr.Stop||l===g.mr.StopLimit?o:i,c=(0,h.J3)(d,e,s,t);return b(c||n,r,l)}))(Object.assign({keySelector:(0,r.q)((0,a.P)().symbolId(),(0,a.P)().tradeSide(),(0,a.P)().stopTriggerMethod(),(0,a.P)().orderType())},(0,l.jo)()))},93030:(e,t,s)=>{"use strict";s.d(t,{o:()=>c});var i=s(65185),o=s(75879),n=s.n(o),a=s(70378),r=s(95035),l=s(87161),d=s(43281);const c=n()([i.G,(0,r.P)().tradeSide(),(0,r.P)().stopTriggerMethod()],d.t)(Object.assign({keySelector:(0,l.q)((0,r.P)().symbolId(),(0,r.P)().tradeSide(),(0,r.P)().stopTriggerMethod())},(0,a.jo)()))},80235:(e,t,s)=>{"use strict";s.d(t,{S:()=>g});var i=s(8166),o=s(65185),n=s(75879),a=s.n(n),r=s(70378),l=s(71383),d=s(95035),c=s(87161),u=s(29480),h=s(93030);const g=a()([o.G,h.o,(0,l.$)(i.H).data.isLcg(),(0,d.P)().tradeSide(),(0,d.P)().orderType()],((e,t,s,i,o)=>s?o===u.mr.Limit?i===u.aO.Sell?e.ask:e.bid:i===u.aO.Sell?e.bid:e.ask:t))(Object.assign({keySelector:(0,c.q)((0,d.P)().symbolId(),(0,d.P)().tradeSide(),(0,d.P)().stopTriggerMethod(),(0,d.P)().orderType())},(0,r.jo)()))},98112:(e,t,s)=>{"use strict";s.d(t,{e:()=>m});var i=s(69903),o=s(62036),n=s(50204),a=s(75879),r=s.n(a),l=s(70378),d=s(51359),c=s(92551),u=s(71383),h=s(8166),g=s(45890);const p=r()([g.r],(e=>{const t=e.map((e=>e.tradeData.symbolId));return[...new Set(t)]}))(Object.assign(Object.assign({},(0,l.jo)()),{keySelector:d.Rs})),b=(0,c.a)({isLcg:(0,u.$)(h.H).data.isLcg(),symbolIdList:p})(Object.assign(Object.assign({},(0,l.jo)()),{keySelector:d.Rs}));var v=s(56137);const m=()=>{const{isLcg:e,symbolIdList:t}=(0,i.v)(b);(0,o.c)(t),(0,n.c)(e?t:[]),(0,v.G)(t)}},66442:(e,t,s)=>{"use strict";s.d(t,{C:()=>d});var i=s(75879),o=s.n(i),n=s(95035),a=s(87161),r=s(70378),l=s(45890);const d=o()([l.r,(0,n.P)().symbolId(),(0,n.P)().tradeSide()],((e,t,s)=>e.reduce(((e,i)=>(i.tradeData.symbolId!==t||i.tradeData.tradeSide===s&&e++,e)),0)))(Object.assign({keySelector:(0,a.q)((0,n.P)().symbolId(),(0,n.P)().tradeSide())},(0,r.jo)()))},34277:(e,t,s)=>{"use strict";s.d(t,{g:()=>d});var i=s(95035),o=s(87161),n=s(75879),a=s.n(n),r=s(70378),l=s(59755);const d=a()([l.I,(0,i.P)().symbolId(),(0,i.P)().tradeSide()],((e,t,s)=>e.reduce(((e,i)=>(i.symbolId!==t||i.tradeSide===s&&(e+=i.size),e)),0)))(Object.assign({keySelector:(0,o.q)((0,i.P)().symbolId(),(0,i.P)().tradeSide())},(0,r.jo)()))},59755:(e,t,s)=>{"use strict";s.d(t,{I:()=>v});var i=s(75879),o=s.n(i),n=s(7456),a=s(61475),r=s(70378),l=s(71383),d=s(95035),c=s(14224),u=s(44251),h=s(99938),g=s(51359),p=s(45890);const b=o()([(0,l.$)(n.z).positionId(),(0,l.$)(n.z).tradeData.symbolId(),(0,l.$)(n.z).tradeData.tradeSide(),a.w],((e,t,s,i)=>({positionId:e,symbolId:t,tradeSide:s,size:i})))(Object.assign(Object.assign({},(0,r.jo)()),{keySelector:(0,d.P)().positionId()})),v=(0,c.X)(p.r,r.mr).map((e=>e.map((e=>e.positionId)))).chain((e=>(0,u.H)(e.map((e=>(0,h.t)(b,{positionId:e},r.iN))))(Object.assign(Object.assign({},(0,r.jo)()),{keySelector:g.Rs})))).build()},53621:(e,t,s)=>{"use strict";s.d(t,{v:()=>n});var i=s(67294),o=s(98112);const n=(0,i.memo)((()=>((0,o.e)(),null)))},24770:(e,t,s)=>{"use strict";function i(...e){return e.join(" - ")}s.d(t,{I:()=>i})},19558:(e,t,s)=>{"use strict";s.d(t,{c:()=>l});var i=s(54579),o=s(87617),n=s(23815),a=s(14801),r=s(81882);const l=()=>(0,i.y)((0,o.i)(),(0,r.T)({mantissa:2}),(0,a.o)(),(0,n.H)({mantissa:2}))},82471:(e,t,s)=>{"use strict";function i(e){if(void 0!==e)return`1:${e}`}s.d(t,{Q:()=>i})},69875:(e,t,s)=>{"use strict";s.d(t,{x:()=>i});const i="toggleControl"},2727:(e,t,s)=>{"use strict";s.d(t,{Z:()=>p});var i=s(85893),o=s(67294),n=s(54738),a=s(13518),r=s(81176),l=s(81996),d=s(65201),c=s(41296),u=s(69875);const h=e=>{const{disabled:t,value:s}=e,{backgroundColor:i,buttonBackgroundColor:o}=e.theme.palette.semantic,h=(0,a.p)(u.x);return{root:{},content:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({display:"flex",justifyContent:"space-between",flexDirection:s?"row":"row-reverse"},(0,r.O)({color:t?i.primaryDisabled:i.primaryNormal})),{width:"100%",height:"100%",cursor:t?"default":"pointer"}),(0,l.o)(n.W0)),(0,d.E)(n.q0)),{nested:{":hover":Object.assign({},(0,r.O)({color:t?i.primaryDisabled:i.primaryHover}))}}),control:(0,c.g)(h,(()=>Object.assign(Object.assign(Object.assign({},(0,d.E)(n.q0)),(0,r.O)({color:t?o.positiveDisabled:o.positiveNormal})),{marginLeft:s?n.W0:0,marginRight:s?0:n.W0,width:20,minHeight:12})))}};var g=s(42983);const p=(0,o.memo)((e=>{const{value:t,disabled:s,children:n,onClick:a,extend:r={}}=e,{css:l}=(0,g.X)(h,{value:t,disabled:s,extend:r}),d=(0,o.useCallback)((()=>{s||null==a||a()}),[s,a]);return(0,i.jsx)("div",Object.assign({className:l.root()},{children:(0,i.jsxs)("div",Object.assign({className:l.content(),onClick:d},{children:[n,(0,i.jsx)("div",{className:l.control()},void 0)]}),void 0)}),void 0)}))},76199:(e,t,s)=>{"use strict";s.d(t,{z:()=>r});var i=s(85893),o=s(67294),n=s(2070),a=s(57616);const r=(0,o.memo)((e=>{const{paddingTop:t,paddingBottom:s,paddingLeft:o,paddingRight:r,children:l,testId:d,extend:c,onMouseEnter:u,onMouseLeave:h}=e,{theme:g}=(0,n.S)(),{backgroundColor:p}=g.palette.semantic;return(0,i.jsx)(a.N,Object.assign({backgroundColor:p.primaryNormal,paddingTop:t,paddingBottom:s,paddingLeft:o,paddingRight:r,onMouseEnter:u,onMouseLeave:h,testId:null!=d?d:"background-primary",extend:c},{children:l}),void 0)}))},51685:(e,t,s)=>{"use strict";s.d(t,{x:()=>i});const i=()=>null},74054:(e,t,s)=>{"use strict";s.d(t,{H:()=>l});var i=s(85893),o=s(67294),n=s(42983),a=s(67030);const r=e=>{const{body:t}=e.theme.font.semantic;return{root:{fontSize:t.secondary}}},l=(0,o.memo)((e=>{const{isMultiLine:t,textColor:s,textAlign:o,extend:l,children:d,testId:c}=e,{rules:u}=(0,n.X)(r,{extend:l});return(0,i.jsx)(a.x,Object.assign({testId:null!=c?c:"body-secondary",textColor:s,isMultiLine:t,textAlign:o,extend:u},{children:d}),void 0)}))},8850:(e,t,s)=>{"use strict";s.d(t,{O:()=>l});var i=s(85893),o=s(67294);const n=e=>{const{subtitle:t}=e.theme.font.semantic;return{root:{fontSize:t.primary,fontWeight:"bold"}}};var a=s(42983),r=s(67030);const l=(0,o.memo)((e=>{const{isMultiLine:t,textColor:s,textAlign:o,extend:l,children:d,testId:c}=e,{rules:u}=(0,a.X)(n,{extend:l});return(0,i.jsx)(r.x,Object.assign({testId:null!=c?c:"subtitle-primary",textColor:s,isMultiLine:t,textAlign:o,extend:u},{children:d}),void 0)}))},39323:(e,t,s)=>{"use strict";s.d(t,{v:()=>u});var i=s(85893),o=s(67294),n=s(71869),a=s(79571),r=s(42983),l=s(36901);const d=e=>{const{wide:t}=e;return{root:{display:"flex",flexDirection:"row",flexGrow:t?1:0,flexShrink:t?1:0,overflow:"hidden"},popper:Object.assign({},(0,l.W)(e))}};var c=s(14669);const u=(0,o.memo)((e=>{const{children:t,open:s,onOpen:l,onClose:u,placement:h,wide:g,offsetX:p,offsetY:b,testId:v,extend:m={}}=e,[j,x]=(0,c.u)({value:s,defaultValue:!1}),{rules:y}=(0,r.X)(d,{wide:g,extend:m}),S=(0,o.useCallback)((()=>{x(!0),null==l||l()}),[x,l]),f=(0,o.useCallback)((()=>{x(!1),null==u||u()}),[x,u]),O=(0,o.useCallback)((()=>{x(!1),null==u||u()}),[x,u]),[C,k]=t;return(0,i.jsxs)(a.D,Object.assign({type:n.U.leftClick,open:j,onOpen:S,onClose:f,placement:h,offset:[p,b],testId:v,extend:{root:y.root,popper:y.popper}},{children:[C,k({hide:O})]}),void 0)}))},71551:(e,t,s)=>{"use strict";s.d(t,{x:()=>u});var i=s(85893),o=s(67294),n=s(79571),a=s(71869),r=s(42983),l=s(36901);const d=e=>{const{wide:t}=e;return{root:{display:"flex",flexDirection:"row",flexGrow:t?1:0,flexShrink:t?1:0,overflow:"hidden"},popper:Object.assign({},(0,l.W)(e))}};var c=s(14669);const u=(0,o.memo)((e=>{const{children:t,open:s,onOpen:l,onClose:u,placement:h,placementByCursor:g,wide:p,offsetX:b,offsetY:v,testId:m,extend:j={}}=e,[x,y]=(0,c.u)({value:s,defaultValue:!1}),{rules:S}=(0,r.X)(d,{wide:p,extend:j}),f=(0,o.useCallback)((()=>{y(!0),null==l||l()}),[y,l]),O=(0,o.useCallback)((()=>{y(!1),null==u||u()}),[y,u]),C=(0,o.useCallback)((()=>{y(!1),null==u||u()}),[y,u]),[k,I]=t;return(0,i.jsxs)(n.D,Object.assign({type:a.U.rightClick,testId:m,open:x,onOpen:f,onClose:O,placement:h,placementByCursor:g,offset:[b,v],extend:{root:S.root,popper:S.popper}},{children:[k,I({hide:C})]}),void 0)}))},37074:(e,t,s)=>{"use strict";s.d(t,{O:()=>d});var i=s(85893),o=s(67294),n=s(50485);const a=()=>({root:{justifyContent:"inherit"},content:Object.assign({},n.aF)});var r=s(42983),l=s(42952);const d=(0,o.memo)((e=>{const{children:t,placement:s,wide:n=!0,testId:d}=e,{css:c,rules:u}=(0,r.X)(a,{}),h=void 0!==d?`${d}-tooltip`:void 0,[g,p]=o.Children.toArray(t);return(0,i.jsxs)(l.b,Object.assign({wide:n,placement:s,testId:h,extend:{root:u.root}},{children:[(0,i.jsx)("div",Object.assign({className:c.content()},{children:g}),void 0),p]}),void 0)}))},89165:(e,t,s)=>{"use strict";s.d(t,{u:()=>p});var i=s(85893),o=s(67294),n=s(30543),a=s(42983),r=s(54738);const l=(e,t)=>Object.assign(Object.assign({position:"absolute",pointerEvents:"none",content:'" "',border:"solid transparent",height:0,width:0,borderBottomColor:t,borderWidth:8},d(e)),c(e)),d=e=>{switch(e){case"top-start":case"top":case"top-end":return{bottom:-15,transform:"rotate(180deg)"};case"right-start":case"right":case"right-end":return{left:-15,transform:"rotate(270deg)"};case"bottom-start":case"bottom":case"bottom-end":return{bottom:"100%",transform:"rotate(0deg)"};case"left-start":case"left":case"left-end":return{right:-15,transform:"rotate(90deg)"};default:return{}}},c=e=>{switch(e){case"top-start":case"bottom-start":return{left:r.W0};case"top-end":case"bottom-end":return{right:r.W0};case"right-start":case"left-start":return{top:r.W0};case"right-end":case"left-end":return{bottom:r.W0};case"top":case"bottom":return{left:"50%",marginLeft:-8};case"left":case"right":return{top:"50%",marginTop:-8};default:return{}}};var u=s(32138);const h=e=>{const{placement:t,wide:s,border:i}=e,{tooltip:o}=e.theme.palette.semantic;return{root:{display:"flex",flexDirection:"row",flexGrow:s?1:0,flexShrink:0,overflow:"hidden"},popper:Object.assign(Object.assign({},(0,u.z)({style:o})),i?{borderStyle:"solid",borderWidth:1,borderColor:o.borderColor}:{}),arrow:Object.assign({},l(t,o.backgroundColor))}};var g=s(29069);const p=(0,o.memo)((e=>{const{children:t,open:s,onOpen:o,onClose:r,arrow:l,placement:d,placementByCursor:c,offsetX:u,offsetY:p,wide:b,border:v,autoWidthElement:m,maxWidthElement:j,testId:x}=e,y=(0,g.I)([u,p],d,0,10),{rules:S}=(0,a.X)(h,{placement:d,wide:b,border:v});return(0,i.jsx)(n._,Object.assign({open:s,onOpen:o,onClose:r,arrow:l,placement:d,placementByCursor:c,offset:y,autoWidthElement:m,maxWidthElement:j,testId:x,extend:{root:S.root,popper:S.popper,arrow:S.arrow}},{children:t}),void 0)}))},10654:(e,t,s)=>{"use strict";s.d(t,{B:()=>r});var i=s(40169),o=s(47469),n=s(75812),a=s(29202);const r=i.S3?(0,i.S3)({subscriptionFactory:o.S,stateGetter:n.Q.getState,updateGroup:a.b.quotes}):i.$j},76034:(e,t,s)=>{var i={"./blurry.png":64282,"./covered.png":73711,"./cropped.png":98405,"./flat.png":20335,"./normal.png":39909,"./not_flat.png":32931};function o(e){var t=n(e);return s(t)}function n(e){if(!s.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}o.keys=function(){return Object.keys(i)},o.resolve=n,e.exports=o,o.id=76034},6524:(e,t,s)=>{var i={"./id.png":10235,"./passport.png":18577};function o(e){var t=n(e);return s(t)}function n(e){if(!s.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}o.keys=function(){return Object.keys(i)},o.resolve=n,e.exports=o,o.id=6524},82032:(e,t,s)=>{var i={"./bank_letter.png":88724,"./bank_statement.png":39565,"./government_correspondence.png":27049,"./utility_bill.png":96191};function o(e){var t=n(e);return s(t)}function n(e){if(!s.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}o.keys=function(){return Object.keys(i)},o.resolve=n,e.exports=o,o.id=82032},85670:(e,t,s)=>{var i={"./closed.svg":38408,"./closingOnly.svg":15950,"./lcg/lcg_closed.svg":31640,"./lcg/lcg_closingOnly.svg":65999,"./lcg/lcg_longOnly.svg":67934,"./lcg/lcg_marketBreak.svg":64924,"./lcg/lcg_opened.svg":38015,"./lcg/lcg_pendingOrdersAvailable.svg":45280,"./lcg/lcg_statusUnknown.svg":9947,"./longOnly.svg":92255,"./marketBreak.svg":97493,"./opened.svg":84218,"./pendingOrdersAvailable.svg":55769,"./statusUnknown.svg":12254};function o(e){var t=n(e);return s(t)}function n(e){if(!s.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}o.keys=function(){return Object.keys(i)},o.resolve=n,e.exports=o,o.id=85670},64409:(e,t,s)=>{"use strict";e.exports=s.p+"static/478100d5fe57fe35fdf5.png"},65465:(e,t,s)=>{"use strict";e.exports=s.p+"static/c018f85c9394f4f5a2a8.png"},89846:(e,t,s)=>{"use strict";e.exports=s.p+"static/1e89e46869f24fcf8661.png"},31480:(e,t,s)=>{"use strict";e.exports=s.p+"static/9a21913ffb117aff381a.png"},16540:(e,t,s)=>{"use strict";e.exports=s.p+"static/137b69c54518ceb1090b.png"},40640:(e,t,s)=>{"use strict";e.exports=s.p+"static/cd7d835076ccca37d775.png"},38720:(e,t,s)=>{"use strict";e.exports=s.p+"static/4b93355c2e9affb8bd3f.png"},92934:(e,t,s)=>{"use strict";e.exports=s.p+"static/01f6dbf32a564da58e22.png"},75091:(e,t,s)=>{"use strict";e.exports=s.p+"static/2dbd7cfb1a7d90001aa0.png"},62789:(e,t,s)=>{"use strict";e.exports=s.p+"static/9a62377445394265186e.png"},84048:(e,t,s)=>{"use strict";e.exports=s.p+"static/dcecb453b6d0bb652f3a.png"},46637:(e,t,s)=>{"use strict";e.exports=s.p+"static/ddb46eba0de16f80faa9.png"},59659:(e,t,s)=>{"use strict";e.exports=s.p+"static/ac12a20a72833d04297d.png"},98255:(e,t,s)=>{"use strict";e.exports=s.p+"static/303f896705aa384d80a9.png"},77538:(e,t,s)=>{"use strict";e.exports=s.p+"static/f0faa0ff02747076c99e.png"},96818:(e,t,s)=>{"use strict";e.exports=s.p+"static/63e8404dfa9ec40e2232.png"},55419:(e,t,s)=>{"use strict";e.exports=s.p+"static/271885f19a4a6bde8eb1.png"},74608:(e,t,s)=>{"use strict";e.exports=s.p+"static/000fbbf55d293581bf86.png"},70496:(e,t,s)=>{"use strict";e.exports=s.p+"static/61c71eae78e55bc76fbd.png"},87919:(e,t,s)=>{"use strict";e.exports=s.p+"static/ed9c47ef370cac238ab3.png"},17389:(e,t,s)=>{"use strict";e.exports=s.p+"static/ab5d5a566e0f7715a848.png"},42643:(e,t,s)=>{"use strict";e.exports=s.p+"static/85eed82c6c5545eaac1a.png"},8428:(e,t,s)=>{"use strict";e.exports=s.p+"static/829320635c2334093b2a.png"},58012:(e,t,s)=>{"use strict";e.exports=s.p+"static/a681712b9caba03a86a2.png"},31201:(e,t,s)=>{"use strict";e.exports=s.p+"static/138415ad9e215c1c1b12.png"},13773:(e,t,s)=>{"use strict";e.exports=s.p+"static/5a40d2249731ebde8fe1.cur"},17702:(e,t,s)=>{"use strict";e.exports=s.p+"static/e77845fafbc42d6e7299.cur"},40948:(e,t,s)=>{"use strict";e.exports=s.p+"static/ac642b1dc3f363575389.cur"},80773:(e,t,s)=>{"use strict";e.exports=s.p+"static/cff0a2dbe4179e606767.png"},43546:(e,t,s)=>{"use strict";e.exports=s.p+"static/06ab6d56dd2edb1df744.png"},42727:(e,t,s)=>{"use strict";e.exports=s.p+"static/a3cfeff9419b4f2c4ace.png"},64282:(e,t,s)=>{"use strict";e.exports=s.p+"static/3d3b1ded7157b2c2f510.png"},73711:(e,t,s)=>{"use strict";e.exports=s.p+"static/350424c37127b2fec5ea.png"},98405:(e,t,s)=>{"use strict";e.exports=s.p+"static/1213b95a2dae18e85cde.png"},20335:(e,t,s)=>{"use strict";e.exports=s.p+"static/72d73a7d7587e34ff572.png"},39909:(e,t,s)=>{"use strict";e.exports=s.p+"static/97b87ef6cbadcc7d9408.png"},32931:(e,t,s)=>{"use strict";e.exports=s.p+"static/cbe3ff460ffebbad9044.png"},10235:(e,t,s)=>{"use strict";e.exports=s.p+"static/5a1010e36bc46cc9bb2a.png"},18577:(e,t,s)=>{"use strict";e.exports=s.p+"static/1fbe813f48c507643a7a.png"},88724:(e,t,s)=>{"use strict";e.exports=s.p+"static/0e756f3742492d584ce1.png"},39565:(e,t,s)=>{"use strict";e.exports=s.p+"static/c63f2e866abd5f7545f3.png"},27049:(e,t,s)=>{"use strict";e.exports=s.p+"static/aaf7b8d694a83b3423cd.png"},96191:(e,t,s)=>{"use strict";e.exports=s.p+"static/86fadfdf6eba8cf095da.png"},35384:e=>{"use strict";e.exports='<svg id="ic_checkbox_deselected" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n    <path d="M19 5v14.07H5V5h14m-.08-2h-14A2 2 0 0 0 3 5.07v14A1.87 1.87 0 0 0 4.92 21h14A2 2 0 0 0 21 19.07v-14A2.13 2.13 0 0 0 18.92 3z"\n          id="checkbox_off_light"/>\n</svg>\n'},17067:e=>{"use strict";e.exports='<svg id="ic_checkbox_selected" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n    <path d="M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"\n          id="checkbox_on_light"/>\n</svg>\n'},38408:e=>{"use strict";e.exports='<svg id="ic_closed" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19 19"><path d="M13 8h-1V6.49a2.5 2.5 0 0 0-5 0V8H6a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V9a1 1 0 0 0-1-1zM8 6.49a1.5 1.5 0 0 1 3 0V8H8zM13 14H6V9h7z" fill="#9e9e9e"/></svg>'},15950:e=>{"use strict";e.exports='<svg id="ic_closing_only" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19 19"><path fill="#e5b429" d="M14 5.66L13.34 5 9.5 8.84 5.66 5 5 5.66 8.84 9.5 5 13.34l.66.66 3.84-3.84L13.34 14l.66-.66-3.84-3.84L14 5.66z"/></svg>'},31640:e=>{"use strict";e.exports='<svg id="ic_closed" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19 19"><path d="M13 8h-1V6.49a2.5 2.5 0 0 0-5 0V8H6a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V9a1 1 0 0 0-1-1zM8 6.49a1.5 1.5 0 0 1 3 0V8H8zM13 14H6V9h7z" fill="#9e9e9e"/></svg>'},65999:e=>{"use strict";e.exports='<svg id="ic_closing_only" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19 19"><path fill="#e2632b" d="M14 5.66L13.34 5 9.5 8.84 5.66 5 5 5.66 8.84 9.5 5 13.34l.66.66 3.84-3.84L13.34 14l.66-.66-3.84-3.84L14 5.66z"/></svg>'},67934:e=>{"use strict";e.exports='<svg id="ic_long_only" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19 19"><path fill="#e2632b" d="M13.59 8.4L9.5 4 5.41 8.4l.73.68L9 6.01V14h1V6l2.86 3.08.73-.68z"/></svg>'},64924:e=>{"use strict";e.exports='<svg id="ic_market_break" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19 19"><path d="M11 5h1v8h-1zM7 5h1v8H7z" fill="#e2632b"/></svg>'},38015:e=>{"use strict";e.exports='<svg id="ic_opened" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19 19"><path fill="#00b0ba" d="M7.56 13.23L4.18 9.85l.7-.7 2.62 2.62 6.64-6.6.76.66-7.34 7.4z"/></svg>'},45280:e=>{"use strict";e.exports='<svg id="ic_pending_orders_available" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19 19"><g fill="#e2632b"><path d="M9.51 4.93A4.57 4.57 0 1 1 4.94 9.5a4.58 4.58 0 0 1 4.57-4.57m0-.91A5.49 5.49 0 1 0 15 9.5 5.49 5.49 0 0 0 9.51 4z"/><path d="M12 11H9V6h1v4h2v1z"/></g></svg>'},9947:e=>{"use strict";e.exports='<svg id="ic_status_unknown" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19 19"><path d="M12 4v1.64L9.56 8.57l-.06.09-.07-.09L7 5.68V4h5M9.5 9.76l.11.13L12 12.44V14H7v-1.49l2.4-2.63.1-.12M13 3H6v3l2.67 3.21L6 12.13V15h7v-3l-2.67-2.79L13 6V3z" fill="#9e9e9e"/></svg>'},92255:e=>{"use strict";e.exports='<svg id="ic_long_only" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19 19"><path fill="#e5b429" d="M13.59 8.4L9.5 4 5.41 8.4l.73.68L9 6.01V14h1V6l2.86 3.08.73-.68z"/></svg>'},97493:e=>{"use strict";e.exports='<svg id="ic_market_break" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19 19"><path d="M11 5h1v8h-1zM7 5h1v8H7z" fill="#e5b429"/></svg>'},84218:e=>{"use strict";e.exports='<svg id="ic_opened" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19 19"><path fill="#0e9247" d="M7.56 13.23L4.18 9.85l.7-.7 2.62 2.62 6.64-6.6.76.66-7.34 7.4z"/></svg>'},55769:e=>{"use strict";e.exports='<svg id="ic_pending_orders_available" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19 19"><g fill="#e5b429"><path d="M9.51 4.93A4.57 4.57 0 1 1 4.94 9.5a4.58 4.58 0 0 1 4.57-4.57m0-.91A5.49 5.49 0 1 0 15 9.5 5.49 5.49 0 0 0 9.51 4z"/><path d="M12 11H9V6h1v4h2v1z"/></g></svg>'},12254:e=>{"use strict";e.exports='<svg id="ic_status_unknown" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19 19"><path d="M12 4v1.64L9.56 8.57l-.06.09-.07-.09L7 5.68V4h5M9.5 9.76l.11.13L12 12.44V14H7v-1.49l2.4-2.63.1-.12M13 3H6v3l2.67 3.21L6 12.13V15h7v-3l-2.67-2.79L13 6V3z" fill="#9e9e9e"/></svg>'}}]);