PageSourceSearch

https://wecopytrade.com/static/js/38265.1b7bdb93.chunk.js

js wecopytrade.com collected 2026-10-04 02:19:27 UTC 10,069 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkwecopytrade_client=self.webpackChunkwecopytrade_client||[]).push([[38265],{18390:(e,a,t)=>{t.d(a,{Z:()=>s});var r=t(65755),n=t(98552),i=t(30686);const l={self:e=>{let{spacing:a}=e;return(0,i.iv)({display:"flex",flexDirection:"column",gap:null===a||void 0===a?void 0:a[3]})},selfHaveNotRadio:e=>{let{spacing:a}=e;return(0,i.iv)({gap:null===a||void 0===a?void 0:a[2]})},title:e=>{let{fontSize:a,fontWeight:t}=e;return(0,i.iv)({margin:0,color:"var(--text-primary)",fontSize:null===a||void 0===a?void 0:a.md,fontWeight:null===t||void 0===t?void 0:t.default})},label:e=>{let{spacing:a}=e;return(0,i.iv)({height:"40px",display:"flex",flexWrap:"wrap",alignItems:"center",gap:null===a||void 0===a?void 0:a[3]})},labelHaveNotRadio:(0,i.iv)({height:"unset"}),radioGroup:e=>{let{spacing:a}=e;return(0,i.iv)({flex:1,display:"flex",minWidth:"fit-content",justifyContent:"flex-end",gap:null===a||void 0===a?void 0:a[8],"> div":{display:"flex"}})}};var o=t(1568);const s=e=>{let{registerField:a,radioOptions:t,name:i,label:s,hiddenRadio:d=!1,disabled:c=!1,required:u=!1,children:p,currentValue:m}=e;return(0,o.tZ)(o.HY,{children:(0,o.BX)("div",{css:[l.self,d&&l.selfHaveNotRadio],children:[(0,o.BX)("div",{css:[l.label,d&&l.labelHaveNotRadio],children:[(0,o.tZ)("p",{css:[l.title,u&&r.w.requireLabel],children:s}),d?null:(0,o.tZ)("div",{css:[l.radioGroup],children:Array.isArray(t)&&t.map((e=>(0,o.tZ)("div",{children:(0,o.tZ)(n.Z,{size:"sm",registerField:a,label:e.label,name:i,value:e.value,"aria-label":e.value,disabled:c,defaultChecked:m===e.value})},e.value)))})]}),p]})})}},37016:(e,a,t)=>{t.d(a,{Z:()=>h});var r=t(30686),n=t(51529),i=t(53781),l=t(4561),o=t(69706),s=t.n(o),d=t(47313),c=t(667),u=t(98129),p=t(1568);const m={sm:32,md:40,lg:48},h=e=>{const{name:a,type:t,value:o,size:h="md",prefixIcon:b,isValid:v,disabled:g,showPassword:Z,registerField:f,readOnly:y,clearable:T,onCustomChange:w,...k}=e,[C,A]=(0,d.useState)(t);(0,d.useEffect)((()=>{Z&&A("password")}),[Z]);return(0,p.tZ)(p.HY,{children:(0,p.BX)("div",{"data-type":"input",css:(()=>{const e=[u.h.self,(0,r.iv)({height:m[h]})];return v&&e.push(u.h.isError),g&&e.push(u.h.disabled),y&&e.push(u.h.readOnly),e})(),children:[(0,l.v)(b)&&(0,p.tZ)("span",{css:u.h.prefixIcon,children:b}),(0,p.BX)("div",{css:u.h.container,children:[(0,p.tZ)("input",{...k,...f,type:C,value:o,disabled:g,readOnly:y,"aria-label":a,"aria-labelledby":a,css:u.h.input,onChange:e=>{const a=e.target.value,t=s()(e.nativeEvent,"inputType","");if((0,i.xt)(a)){const t=a.replace(n.m.emoji(),"");e.target.value=t}"insertFromPaste"===t&&(e.target.value=e.target.value.trim()),null===f||void 0===f||f.onChange(e),null===w||void 0===w||w(e)}}),T&&o&&(0,p.tZ)(c.Z,{icon:"xmark",css:u.h.icon,onClick:()=>{if(f){const{onChange:e,name:a}=f;e({target:{name:a,value:""},type:"change"})}},size:"xs"}),Z&&o?(0,p.tZ)("span",{css:u.h.icon,children:(0,p.tZ)(c.Z,{icon:"password"===C?"eye-slash":"eye",onClick:()=>{A((e=>"password"===e?"text":"password"))},size:"md"})}):null]})]})})}},98552:(e,a,t)=>{t.d(a,{Z:()=>c});var r=t(30686),n=t(4561),i=t(85835),l=t(1568);const o={sm:i.S.sm,md:i.S.md},s=e=>{let{size:a="md",customCheckmark:t}=e;return(0,l.tZ)("span",{tabIndex:0,css:[i.S.checkmark,o[a],t],"aria-labelledby":a,"data-testid":"checkmark"})},d=e=>{let{label:a,customLabel:t,expandable:r}=e;return(0,l.tZ)(l.HY,{children:(0,n.v)(r)?(0,l.tZ)("span",{css:[i.S.label,t],children:r}):(0,l.tZ)("span",{css:[i.S.label,t],"data-testid":"label",children:a})})},c=e=>{const{label:a,id:t,size:n,registerField:o,disabled:c,customSelf:u,customLabel:p,customCheckmark:m,activeColorLabel:h=!0,...b}=e;return(0,l.BX)("label",{role:"radio",css:[i.S.self,u,p],htmlFor:t||a,"aria-disabled":c,children:[(0,l.tZ)("input",{...b,...o,hidden:!0,type:"radio",id:t||a,disabled:c,"aria-labelledby":a,placeholder:a,css:[i.S.input,e=>{let{colors:a}=e;return(0,r.iv)({"&:checked ~ span:nth-of-type(2)":{color:h?null===a||void 0===a?void 0:a.primary:""}})}]}),(0,l.tZ)(s,{size:n,"aria-labelledby":t,customCheckmark:m}),(0,l.tZ)(d,{label:a,customLabel:p,...b})]})}},38265:(e,a,t)=>{t.r(a),t.d(a,{default:()=>E});var r=t(62563),n=t(6523),i=t(64596),l=t(75600),o=t(18390),s=t(37016),d=t(33398),c=t(63958),u=t(18139),p=t(37557),m=t(53838),h=t(49235),b=t(40280),v=t(58823),g=t(51764),Z=t(69706),f=t.n(Z),y=t(35742),T=t.n(y),w=t(11822),k=t.n(w),C=t(47313),A=t(75627),x=t(99093),R=t(58467),S=t(2684);const _=(0,t(31324).ZP)((()=>
1Promise.all([t.e(65956),t.e(15213),t.e(65457),t.e(76849)]).then(t.bind(t,76849))));var B=t(49948),q=t(1568);const E=()=>{const{t:e}=(0,x.$G)(g.aC.feature),a=(0,R.s0)(),{data:{isMaster:t,platform:Z,brokerId:y,brokerName:w,accountId:E,name:X,id:F}}=(0,R.f_)(),{optionsAccount:I}=(0,b.Z)(),{register:P,watch:z,handleSubmit:N,control:W,setError:$,clearErrors:H,formState:{errors:D,isValid:O}}=(0,A.cI)({mode:"all",resolver:(0,r.X)(h.EJ),defaultValues:{accountType:t?"master":"copier",platformType:"".concat(Z),broker:{label:w,value:y},id:"".concat(E),password:"",accountName:X,isAgreement:!1}}),[V,M]=(0,C.useState)(!1),[L,Y]=(0,C.useState)(!1),[G,j]=(0,C.useState)(""),K=(0,C.useMemo)((()=>L||!O),[O,L]),J=(0,C.useCallback)((e=>{T()(e)>h.Vc?$("inputSearchBroker",{message:"validation.connectTrading.CTA_ERR_012"}):H("inputSearchBroker")}),[]);return(0,q.BX)(q.HY,{children:[(0,q.tZ)(v.Z,{visible:V,onClose:()=>M(!1),failureReason:G}),(0,q.tZ)("div",{css:[B.z.self],children:(0,q.BX)("form",{autoComplete:"off",onSubmit:N((async e=>{try{Y(!0);const t={tradingAccountId:k()(F),accountPassword:e.password,tradingBrokerId:e.broker.value},r=await p.Z.reConnectTradingAccountAsync(t),{status:n}=r;200===n&&("master"===e.accountType?a(u.X2.tabMaster()):a(u.X2.tabCopier()))}catch(t){M(!0);const{statusText:e}=(0,m.X)(t);j(e)}finally{Y(!1)}})),role:"form",css:[S.$.self],"data-loading":L,children:[(0,q.tZ)("div",{css:[S.$.accountTypes],children:(0,q.tZ)(o.Z,{label:e("connectTradingAccount.accountType"),name:"account-type",radioOptions:I,registerField:P("accountType"),disabled:!0})}),(0,q.BX)(d.Z,{label:e("connectTradingAccount.platform"),labelWidth:"md",required:!0,groupDirection:"row",children:[(0,q.tZ)(s.Z,{disabled:!0,value:"1"===z("platformType")?"MT4":"MT5"}),(0,q.tZ)("p",{css:[S.$.platformDescription],children:z("platformType")===k()(c.DC.MT4)?e("connectTradingAccount.metaTrader4"):e("connectTradingAccount.metaTrader5")})]}),(0,q.BX)(d.Z,{label:e("connectTradingAccount.findYourBroker"),labelWidth:"md",required:!0,groupDirection:"row",children:[(0,q.tZ)(_,{name:"broker",control:W,isValid:!!D.broker||!!D.inputSearchBroker,isDisabled:L,clearValueByKey:k()(Z),onInputSearchBroker:e=>J(e)}),(0,q.tZ)(l.Z,{message:e(f()(D,"inputSearchBroker.message",""))}),D.inputSearchBroker?null:(0,q.tZ)(l.Z,{message:e(f()(D,"broker.label.message",""))})]}),(0,q.tZ)(d.Z,{label:e("connectTradingAccount.accountName"),labelWidth:"md",labelFor:"accountName",required:!0,groupDirection:"row",children:(0,q.tZ)(s.Z,{disabled:!0,registerField:P("accountName"),value:z("accountName")})}),(0,q.tZ)(d.Z,{label:e("id",{ns:g.aC.general}),labelWidth:"md",labelFor:"id",required:!0,groupDirection:"row",children:(0,q.tZ)(s.Z,{disabled:!0,registerField:P("id"),value:z("id")})}),(0,q.BX)(d.Z,{label:e("connectTradingAccount.password"),labelWidth:"md",labelFor:"password",required:!0,groupDirection:"row",children:[(0,q.tZ)(s.Z,{id:"password",autoComplete:"new-password",placeholder:e("connectTradingAccount.placeholders.password"),registerField:P("password"),type:"password",isValid:!!D.password,disabled:L,value:z("password"),showPassword:!0,"aria-label":"account password",maxLength:h.Hf}),(0,q.tZ)(l.Z,{message:e(f()(D,"password.message",""))})]}),(0,q.tZ)("p",{"data-testid":"msg-password",css:[B.z.noteInvestorPassword],children:(0,q.tZ)(x.cC,{t:e,i18nKey:"connectTradingAccount.investorPassword",components:{strong:(0,q.tZ)("strong",{})}})}),(0,q.tZ)("div",{css:S.$.agreement,children:(0,q.tZ)(i.Z,{registerField:P("isAgreement"),customSelf:S.$.checkbox,customCheckmark:S.$.checkmark,disabled:L,expandable:(0,q.tZ)("span",{children:(0,q.tZ)(x.cC,{i18nKey:"connectTradingAccount.noteReadAndAccepted",t:e,children:(0,q.tZ)("a",{href:u.Ys.termsOfUse(),target:"_blank",rel:"noopener noreferrer",children:"Trading Account Connection Agreement"})})})})}),(0,q.BX)("div",{css:[S.$.cta,S.$.buttonGroup],children:[(0,q.tZ)(n.Z,{fullWidth:!0,variant:"outlined",type:"button",label:e("buttons.cancel",{ns:g.aC.general}),disabled:L,onClick:()=>a(-1)}),(0,q.tZ)(n.Z,{fullWidth:!0,label:e("buttons.reconnect",{ns:g.aC.general}),type:"submit","data-testid":"btn-submit",loading:L,disabled:K})]})]})})]})}},49235:(e,a,t)=>{t.d(a,{EJ:()=>d,Hf:()=>s,Vc:()=>o});var r=t(53781),n=t(11822),i=t.n(n),l=t(3463);const o=200,s=200,d=l.Ry().shape({accountType:l.Z_().required("validation.required"),platformType:l.Z_().required("validation.required"),broker:l.Ry().shape({label:l.Z_().required("validation.required"),value:l.Z_()}),accountName:l.Z_().required("validation.required").trim().max(50,"validation.connectTrading.CTA_ERR_013").test("has emojis","validation.connectTrading.CTA_ERR_013",(e=>!(0,r.xt)(i()(e)))),id:l.Z_().required("validation.required").max(16,"validation.connectTrading.CTA_ERR_014").matches(new RegExp("^[0-9]*$"),"validation.connectTrading.CTA_ERR_015"),password:l.Z_().required("validation.required").max(s,"validation.connectTrading.CTA_ERR_016"),isAgreement:l.O7().oneOf([!0]),inputSearchBroker:l.Z_().max(o,"validation.connectTrading.CTA_ERR_012")})},40280:(e,a,t)=>{t.d(a,{Z:()=>o});var r=t(27672),n=t(63958),i=t(51764),l=t(99093);const o=()=>{const{t:e}=(0,l.$G)(i.aC.feature);return{optionsAccount:[{label:e("connectTradingAccount.type.master"),value:n.Qm.MASTER},{label:e("connectTradingAccount.type.copier"),value:n.Qm.COPIER}],optionsPassword:[{label:e("connectTradingAccount.passwordType.trading"),value:"".concat(r.mB.TradingPassword)},{label:e("connectTradingAccount.passwordType.investor"),value:"".concat(r.mB.InvestorPassword)}]}}},58823:(e,a,t)=>{t.d(a,{Z:()=>r});const r=(0,t(31324).ZP)((()=>
1t.e(81236).then(t.bind(t,81236))))}}]);

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