/*! * name: @fe/by-globals * v: 0.2.0_eaef129d5a4c * build: 2026-07-17T03:49:41.421Z */ !function(M,e){"object"===typeof exports&&"object"===typeof module?module.exports=e(require("ByVendors")):"function"===typeof define&&define.amd?define(["ByVendors"],e):"object"===typeof exports?exports.ByGlobals=e(require("ByVendors")):M.ByGlobals=e(M.ByVendors)}(this,M=>(()=>{var e={1099:(M,e,i)=>{"use strict";i.d(e,{Az:()=>y,Cn:()=>l,Cv:()=>E,J9:()=>U,Nu:()=>x,O_:()=>L,YB:()=>w,dd:()=>h,iW:()=>O,iq:()=>S,wF:()=>k});var t,n,N,D,a,g,o,j,I,s,c,u,T,r,z,A,d=i(6208);const y=null!==(t=null===d.byMetas||void 0===d.byMetas?void 0:d.byMetas.BRAND_NAME)&&void 0!==t?t:"",l=(n=null===d.byMetas||void 0===d.byMetas?void 0:d.byMetas.BRAND_NAME_UPPER,N=null===d.byMetas||void 0===d.byMetas?void 0:d.byMetas.BRAND_NAME_FIRST_CHAR_UPPER,D=null===d.byMetas||void 0===d.byMetas?void 0:d.byMetas.BRAND_USA,a=null===d.byMetas||void 0===d.byMetas?void 0:d.byMetas.BRAND_GLOBAL,null!==(g=null===d.bySharedSettings||void 0===d.bySharedSettings?void 0:d.bySharedSettings.SITE_ID)&&void 0!==g?g:""),O=(o=null===d.byEnv||void 0===d.byEnv?void 0:d.byEnv.isProdOrTestnet,null!==(j=null===d.byEnv||void 0===d.byEnv?void 0:d.byEnv.isTestnet)&&void 0!==j&&j),L=null!==(I=null===d.byEnv||void 0===d.byEnv?void 0:d.byEnv.isProd)&&void 0!==I&&I,x=null!==(s=null===d.byEnv||void 0===d.byEnv?void 0:d.byEnv.isTest)&&void 0!==s&&s,w=null!==(c=null===d.byEnv||void 0===d.byEnv?void 0:d.byEnv.isApp)&&void 0!==c?c:()=>!1,E=null!==(u=null===d.byEnv||void 0===d.byEnv?void 0:d.byEnv.isTGMiniApp)&&void 0!==u?u:()=>!1,U=null!==(T=null===d.byEnv||void 0===d.byEnv?void 0:d.byEnv.isAppUSA)&&void 0!==T&&T,h=()=>{var M;return null!==(M=null===d.byDynamicDomain||void 0===d.byDynamicDomain?void 0:d.byDynamicDomain.API2_HOST)&&void 0!==M?M:""},S=(r=null===d.byStorage||void 0===d.byStorage?void 0:d.byStorage.getCookie,z=null===d.byStorage||void 0===d.byStorage?void 0:d.byStorage.addCookie,()=>{var M;return null!==(M=null===d.byRequest||void 0===d.byRequest?void 0:d.byRequest.request)&&void 0!==M?M:{get:(M,e)=>Promise.reject(new Error(`byRequest not loaded from @fe/by-vendors. Attempted to GET: ${M}`)),post:(M,e)=>Promise.reject(new Error(`byRequest not loaded from @fe/by-vendors. Attempted to POST: ${M}`)),put:(M,e)=>Promise.reject(new Error(`byRequest not loaded from @fe/by-vendors. Attempted to PUT: ${M}`)),patch:(M,e)=>Promise.reject(new Error(`byRequest not loaded from @fe/by-vendors. Attempted to PATCH: ${M}`)),delete:(M,e)=>Promise.reject(new Error(`byRequest not loaded from @fe/by-vendors. Attempted to DELETE: ${M}`))}}),k=null!==(A=null===d.byI18nLoader||void 0===d.byI18nLoader?void 0:d.byI18nLoader.initI18nInstance)&&void 0!==A?A:()=>(console.warn("byI18nLoader.initI18nInstance not available"),null);d.byMetas,d.bySharedSettings,d.byEnv,d.byDynamicDomain,d.byStorage,d.byRequest,d.byI18nLoader},1511:(M,e,i)=>{"use strict";i.d(e,{c:()=>o});var t=i(5203);const n="/common-static/fhs/react.18.2.0.min-860f1d37ec17b010c94069b99a49ae7b.js",N={react:{urls:{prod:n,testnet:n,test:n,local:t.qZ},validate:()=>"undefined"!==typeof window.React&&"undefined"!==typeof window.ReactDOM,retries:2,timeout:5e3},byVendors:{urls:{prod:`${t.Re}/by-vendors.latest.js`,testnet:`${t.Re}/by-vendors.latest.js`,test:`${t.Re}/by-vendors.latest.js`,local:`${t.Re}/by-vendors.latest.js`},validate:()=>"undefined"!==typeof window.ByVendors,retries:2,timeout:5e3}};var D=i(8664);class a extends Error{constructor(M,e,i){super(M),this.name="GlobalsError",this.type=e,this.details=i}}var g=i(2239);class o{constructor(){this.loadedDeps=new Set,this.loading=new Map,this.loadedScripts=new Set,this.events=new D.l,this.downgradeCDNPrefix=t.WI}static getInstance(){return o.instance||(o.instance=new o),o.instance}getFileUrl(M){return`${this.downgradeCDNPrefix}/${M}`}async loadDowngradeScript(M){if(!(null===M||void 0===M?void 0:M.downgradeFilename))throw new Error(`No downgrade filename provided: ${null===M||void 0===M?void 0:M.downgradeFilename}`);return new Promise((e,i)=>{const t=document.createElement("script"),n=M.downgradeFilename,N=this.getFileUrl(n);t.src=N,t.crossOrigin="anonymous",t.onload=()=>{!(null===M||void 0===M?void 0:M.windowKey)||window[M.windowKey]?e():i(new Error(`Script loaded but ${M.windowKey} not found in window object`))},t.onerror=M=>{i(new Error(`Failed to load local script from ${N}: ${M instanceof ErrorEvent?M.message:"Unknown error"}`))},document.head.appendChild(t)})}async loadScript(M,e={}){var i;try{await this.loadRemoteScript(M,e)}catch(t){console.warn(`Remote script load failed for ${M}, attempting local fallback...`);try{(null===(i=null===e||void 0===e?void 0:e.downgrade)||void 0===i?void 0:i.downgradeFilename)&&await this.loadDowngradeScript(e.downgrade)}catch(M){throw console.error("Local fallback also failed:",M),t}}}applyLoadingStrategy(M,e){switch(e){case"async":M.async=!0;break;case"defer":M.defer=!0;break;case"preload":M.rel="preload",M.as="script";break;case"prefetch":M.rel="prefetch",M.as="script"}}async handleResourceHint(M,e){return new Promise((i,t)=>{const n=document.createElement("link");n.rel=e,n.as="script",n.href=M,n.crossOrigin="anonymous",n.onload=()=>{this.loadedScripts.add(M),i()},n.onerror=i=>{t(new Error(`Failed to ${e} script: ${M}, error: ${i instanceof ErrorEvent?i.message:"Unknown error"}`))},document.head.appendChild(n)})}async loadRemoteScript(M,e={}){return new Promise((i,t)=>{if(this.loadedScripts.has(M))return void i();const{strategy:n="normal",priority:N="auto",crossOrigin:D="anonymous"}=e,a=document.createElement("script");a.src=(0,g.y)(M),a.crossOrigin=D,this.applyLoadingStrategy(a,n);const o=()=>{a.onerror=null,a.onload=null};a.onerror=e=>{o(),this.loadedScripts.delete(M),t(new Error(`Failed to load script: ${M}, error: ${e instanceof ErrorEvent?e.message:"Unknown error"}`))},a.onload=()=>{setTimeout(()=>{try{if(a.textContent&&a.textContent.includes("setTimeout(()=>e(new Error(`Timeout after ${i}ms`)),i))])}catch(M){if(t=M,n.push(t),console.warn(`Attempt ${N+1}/${e+1} failed:`,M),NsetTimeout(e,M))}}const N=`All ${e+1} attempts failed:\n${n.map((M,e)=>` ${e+1}. ${M.message}`).join("\n")}`;throw new Error(N)}async loadDependency(M,e={}){if(this.loadedDeps.has(M))return;if(this.loading.has(M))return this.loading.get(M);const i=N[M];if(!i)throw new Error(`Unknown dependency: ${M}`);if(i.validate())return void this.loadedDeps.add(M);const n=(async()=>{try{const n=(0,t.aw)(i.urls,M);if(await this.loadWithRetry(()=>this.loadScript(n,e),i.retries||2,i.timeout||1e4),!i.validate())throw new Error(`Failed to validate dependency: ${M}`);this.loadedDeps.add(M)}catch(e){throw this.events.emit("dependency_error",new a(`Failed to load dependency: ${M}`,"dependency",{name:M,error:e})),e}})();this.loading.set(M,n);try{await n}finally{this.loading.delete(M)}return n}async loadDependencies(M={}){const e=Object.keys(N);await Promise.all(e.map(e=>this.loadDependency(e,M)))}clear(){this.loadedDeps.clear(),this.loading.clear(),this.events.removeAllListeners(),this.loadedScripts.clear()}}},1975:M=>{function e(M,e,i,t){Object.defineProperty(M,e,{get:i,set:t,enumerable:!0,configurable:!0})}function i(M){return M&&M.__esModule?M.default:M}e(M.exports,"renderHeader",function(){return j}),e(M.exports,"getServerHtmlText",function(){return I});const t=M=>{let e=String.fromCharCode(98,121,98,105,116),i=e.toUpperCase(),t=M||("undefined"!=typeof window?window?.location?.hostname:void 0);return t?t?.includes(`${e}-tr.com`)?"TUR":t?.includes(`${e}.kz`)?"KAZ":t?.includes(`${e}.eu`)?"EUR":t?.includes(`${e}.id`)?"IDN":t?.includes(`${e}georgia.ge`)?"GEO":t?.includes("byhkbit.com")?"HKG":t?.includes("abfinance.com")?"USA":t?.includes("moneypartners.co.jp")?"JPN":t?.includes("waanx.com")?"THA":i:i};let n="";const N="NAV_HEADER_LATEST_CACHE",D={navs:{left:[],right:[],language:""},isLogin:!1},a=()=>{let M=t();n=i(''),"TUR"===M&&(n=i('')),"KAZ"===M&&(n=i('')),"EUR"===M&&(n=i('')),"GEO"===M&&(n=i('')),"IDN"===M&&(n=i('')),"HKG"===M&&(n=i('')),"USA"===M&&(n=i('')),"JPN"===M&&(n=i('')),"THA"===M&&(n=i(''))},g=M=>{let e=M.querySelector(".nav-list.left");if(!e)return;let i=D.navs.left;if(!i||!i.length)return;let t=(M=>{let e=document.createDocumentFragment();return M.forEach(M=>{let i=document.createElement("span");if(i.className="nav-item","WSOT"===M.name&&(i.className+=" wsot"),"PrimaryLink"===M.renderer&&(i.className+=" link"),"MoreDropdown"===M.renderer){i.className="nav-item more";let M=document.createElement("span");M.className="more",i.appendChild(M)}else i.textContent=M.name;e.appendChild(i)}),e})(i);e.appendChild(t)},o=M=>{var e=document.createElement("style");try{e.appendChild(document.createTextNode(i('.nav-skeleton-header{align-items:center;background-color:#17181e;display:flex;flex-direction:row;height:48px;width:100%}.nav-skeleton-header .left{align-items:center;display:flex;flex:none}.nav-skeleton-header .logo{margin-left:16px;margin-right:20px}.nav-skeleton-header .logo,.nav-skeleton-header .nav-list{align-items:center;display:flex}.nav-skeleton-header .nav-item{color:#fff;font-size:14px;margin-right:18px;padding:0 8px 0 10px;position:relative;-webkit-user-select:none;user-select:none}.nav-skeleton-header .nav-item:after{border-bottom:1.5px solid #71757a;border-left:1.5px solid #71757a;border-radius:1px;box-sizing:content-box;content:"";font-style:normal;font-weight:400;height:5.4px;position:absolute;top:50%;transform:translateX(12px)rotate(-45deg)translateY(-7.5px);width:5.4px}.nav-skeleton-header .nav-item.link{margin-right:unset;padding:16px 12px}.nav-skeleton-header .nav-item.link.wsot{-webkit-text-fill-color:transparent;-webkit-background-clip:text;background-clip:text;background-image:-webkit-linear-gradient(left,#f9b22b,#3cf0ce 25%,#f9b22b 50%,#3cf0ce 75%,#f9b22b);background-size:200% 100%;font-size:16px;font-weight:1000}.nav-skeleton-header .nav-item.link:after{display:none}.nav-skeleton-header .nav-item .more{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAACXBIWXMAACE4AAAhOAFFljFgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAInSURBVHgB7drNTQMxEAXgtwgBkThQwtIBVEAoA7iQCqADoIRUEC7UQaiAUAEpgQPiR0IaZsMGcXFmslpjW3qfZAVky5t9meXHGoCIiKhUFQojE+x9bOFC3/lQvx2ig0ow+wLGu2e4NdeiIO8T1NjGvX5Zox9zfOJ4MNLXgA2UpN9wsNhL92yqMrRgrYBEZE/HlY576e5RxznW9HqHc/QbzlL9toXL0KQ7IL2pWl8edVyj47PfOtAx0f2e2z1dNiv9uRPJRoWj4Bz8+i9v3bOpSs9i+Qk2lmFowhVQ+0jU6F+t4xIZ81ZQtPJWR8iYN6Ak5Z2Dsn7NJ8CADAzIwIAMDMjAgAwMyMCADAzIwIAMJQU0RSR6UjALzZUTkOABkegZ9Tg4B4fmGBARVcpaszis314c2NXo13xwiv3QpLeCpohn5llUjfCiH+cxED5g72De7hnkDShaeauxd+HgpP20BSOt6Sd0JM39CG52PnHY7LlqrfcRa45Fo5S3Pl37yJirgvQmXvSl//LG6vIuUnM+rWMm3U11XHsP64mIiOhfSKLuDknYVbLOm6zlpyOjL8/i6O5Idd0ld4dZszEi/Kuh47D9Sz2r6y5l3d0hGXSV5N7dkbyrJOsDs1TX/YuH9gYGZGBABgZkYEAGBmRgQAYGZGBABgZkYEAGBmRgQIbcuzumSHPdX7l3dyTvKsm6u0My6CrJurujyK4SSdTdIewqISIiIqKcfAPjxe2fX/FuhAAAAABJRU5ErkJggg==") 50% /100% 100% no-repeat;border:0;display:flex;height:24px;width:24px}.nav-skeleton-header .center{flex:auto}.nav-skeleton-header .right{flex:none;font-size:14px;height:48px}.nav-skeleton-header .right,.nav-skeleton-header .right-h5,.nav-skeleton-header .right-pc{align-items:center;display:flex}.nav-skeleton-header .user-avatar{align-items:center;display:flex;height:48px;justify-content:center;width:48px}.nav-skeleton-header .user-avatar img{height:24px;width:24px}.nav-skeleton-header .right-h5 .search,.nav-skeleton-header .right-h5 .thumbnail{cursor:unset;line-height:48px;text-align:center;width:48px}.nav-skeleton-header .right-h5 .search{font-size:22px}.nav-skeleton-header .right-h5 .thumbnail{font-size:16px}.nav-skeleton-header .right-btn{align-items:center;border-radius:4px;display:flex;height:32px;justify-content:center;padding:0 20px;-webkit-user-select:none;user-select:none}.nav-skeleton-header .right-btn.register{background-color:#ffb11a;color:#17181e}.nav-skeleton-header .right-icon{align-items:center;display:flex;height:48px;justify-content:center;text-align:center;width:48px}@media screen and (max-width:1024px){.nav-skeleton-header .right-pc{display:none}}@media screen and (min-width:1025px){.nav-skeleton-header .right-h5{display:none}}@media screen and (max-width:912px){.nav-skeleton-header .nav-list{display:none}}'))),M.prepend(e)}catch(M){console.error("加载css 失败 ",M)}},j=M=>{let e=document.getElementById(M||"");e||(e=(()=>{let M=document.createElement("div");return M.id="NAV_HEADER_SKELETON",document.body.insertBefore(M,document.body.childNodes[0]),M})()),a(),(()=>{let M=null!==localStorage.getItem(N)?JSON.parse(localStorage.getItem(N)||""):{exchange:[],left:[],right:[],language:""};D.navs=M,D.isLogin=!!localStorage.getItem("GA_UID")})(),(M=>{M.innerHTML=n})(e),o(e),(M=>{localStorage.getItem("LANG_KEY")===D.navs.language&&g(M)})(e)},I=M=>{let e=t(M);return"IDN"===e?'\n
\n
\n \n\n
\n
\n\n':"EUR"===e?'\n
\n
\n \n\n
\n
\n\n':"GEO"===e?'\n
\n
\n \n\n
\n
\n\n':"KAZ"===e?'\n
\n
\n \n\n
\n
\n\n':"TUR"===e?'\n
\n
\n \n\n
\n
\n\n':"HKG"===e?'\n
\n \n
\n
\n
\n\n':"USA"===e?'\n
\n
\n \n\n
\n
\n\n':"JPN"===e?'\n
\n
\n \n\n
\n
\n\n':"THA"===e?'\n
\n
\n \n\n
\n
\n\n':'\n
\n
\n \n\n
\n
\n\n'}},2239:(M,e,i)=>{"use strict";i.d(e,{h:()=>N,y:()=>n});var t=i(1099);const n=M=>t.iW||t.O_?`${M}?t=${Math.floor((new Date).getTime()/6e4)}`:M,N=(M,e)=>{try{if(M===e)return!0;if("object"!==typeof M||null===M||"object"!==typeof e||null===e)return!1;const i=Object.keys(M),t=Object.keys(e);if(i.length!==t.length)return!1;for(const t of i)if(M[t]!==e[t])return!1;return!0}catch(M){return!1}}},5193:(M,e,i)=>{"use strict";i.d(e,{e:()=>a});var t=i(1511),n=i(8664),N=i(2239),D=i(5203);class a{constructor(){this.instances=new Map,this.mountingInstances=new Map,this.mountedInstances=new Map,this.onlyLoadInstances=new Map,this.onlyLoadLoadings=new Map,this.lifecycleEvents=new n.l,this.depsLoader=t.c.getInstance()}static getInstance(){return a.instance||(a.instance=new a),a.instance}generateContainerId(M){return`byglobals-${M}`}generateInstanceKey(M,e,i=!1){return i&&e?`${M}_${e}`:M}getInstanceByKey(M){return this.mountedInstances.has(M)?this.mountedInstances.get(M):this.onlyLoadInstances.has(M)?this.onlyLoadInstances.get(M):void 0}async unmountByInstanceKey(M){const e=this.mountedInstances.get(M);e&&await this.unmount(e)}getInstancesByComponentName(M){const e=[];for(const[i,t]of this.mountedInstances.entries())t.componentName===M&&e.push(t);return e}async unmountAllInstancesByComponentName(M){const e=this.getInstancesByComponentName(M);for(const M of e)await this.unmount(M)}getAllInstanceKeys(){return Array.from(this.mountedInstances.keys())}getMountedInstances(){return this.mountedInstances}getInstanceByName(M){return Array.from(this.instances.values()).find(e=>e.componentName===M)}getInstance(M){return this.instances.get(M)}ensureContainer(M,e){const i=e||this.generateContainerId(M);if(i){const M=document.getElementById(i);if(M)return M}const t=document.createElement("div");return t.id=i,document.body.appendChild(t),t}emitLifecycle(M,{type:e,componentInstance:i,error:t}){this.lifecycleEvents.emit(`module_${e}`,{type:`module_${e}`,name:M,componentInstance:i,error:t})}createReactRoot(M){const e=window.ReactDOM;if(!e)throw new Error("ReactDOM not found. React 17 or 18 is required.");const i=e.createRoot;if(i)return i(M);if(!e.render||!e.unmountComponentAtNode)throw new Error("ReactDOM.render or ReactDOM.unmountComponentAtNode not found. React 17 or 18 is required.");const t=e.render.bind(e),n=e.unmountComponentAtNode.bind(e);return{render:e=>{t(e,M)},unmount:()=>{n(M)}}}async createComponentInstance(M,e,i,t){if(!window.React||!window.React.createElement)throw new Error("React is not properly loaded. Please ensure React is loaded before creating components.");if(!window.ReactDOM)throw new Error("ReactDOM is not properly loaded. Please ensure ReactDOM is loaded before creating components.");const D=this.createReactRoot(i);let a;if(this.isReactComponent(e))a=e;else{const M=e;if("function"===typeof M.init){a=await M.init()}}if(!a)throw new Error(`Invalid react component ${M}`);let g={...t};const o=(null===t||void 0===t?void 0:t.eventBus)||new n.l,j={componentName:M,instanceKey:"",root:D,component:a,containerId:i.id,container:i,data:g,eventBus:o,supportedProps:(null===t||void 0===t?void 0:t.supportedProps)||{},supportedOnEvents:(null===t||void 0===t?void 0:t.supportedOnEvents)||{},supportedEmitEvents:(null===t||void 0===t?void 0:t.supportedEmitEvents)||{},update:M=>{const e=j.instanceKey||j.componentName;(this.mountedInstances.has(e)||this.instances.has(j.containerId))&&(g={...g,...M},(0,N.h)(g,j.data)||(j.data=g,this.renderRoot(j)))},unmount:()=>{this.unmount(j)}};return this.renderRoot(j),j}isReactComponent(M){return"function"===typeof M||M&&"object"===typeof M&&("function"===typeof M.render||M.$$typeof===Symbol.for("react.forward_ref")||M.$$typeof===Symbol.for("react.memo"))}async unmount(M){var e;if(M&&this.instances.has(M.containerId))try{(null===(e=M.root)||void 0===e?void 0:e.unmount)&&M.root.unmount(),M.eventBus.removeAllListeners(),this.instances.delete(M.containerId),M.container&&(M.container.innerHTML=""),this.emitLifecycle("component_unmounted",{type:"afterUnmount",componentInstance:M}),this.mountedInstances.delete(M.instanceKey||M.componentName)}catch(e){throw this.emitLifecycle("component_unmounted",{type:"unmountError",componentInstance:M,error:e}),e}}renderRoot(M){var e;const i=M.instanceKey||M.componentName,t=this.mountedInstances.has(i),n=this.instances.has(M.containerId),N=M.container&&document.contains(M.container);if(!t&&!n&&!N)return;const{root:D,component:a,data:g}=M;if(a&&this.isReactComponent(a)&&(null===(e=null===window||void 0===window?void 0:window.React)||void 0===e?void 0:e.createElement))try{D.render(window.React.createElement(a,{...g,key:M.instanceKey}))}catch(e){console.warn(`Failed to render component ${M.componentName}:`,e)}}async loadRemoteComponent(M,e){if(!e)throw new Error(`No configuration found for module ${M}`);const i=(0,D.aw)(e.urls,M);try{await this.depsLoader.loadWithRetry(()=>this.depsLoader.loadScript(i,{strategy:e.loadingStrategy||"normal",priority:e.priority||"auto",retries:e.retries||2,timeout:e.timeout||1e4}),e.retries||2,e.timeout||1e4)}catch(e){throw console.error(`Failed to load module ${M} from ${i}:`,e),e}try{let i;const t=e.windowKey,n=e.componentName,N=e.timeout||1e4;if("global"===e.type&&t){if(i=await this.waitForGlobal(t,n,N),!i)throw new Error(`Global component ${t} not found`)}else{if("react"!==e.type||!t)throw new Error(`Invalid module type or configuration for ${M}`);if(i=await this.waitForGlobal(t,n,N),!i)throw new Error(`React component ${t} not found`)}return i}catch(e){return console.error(`Failed to load module ${M}:`,e),()=>null}}async loadAndMount(M,e,i={}){const t=M.name;if(M.supportMultiInstance&&!e)throw new Error(`Component ${t} supports multi-instance, containerId is required`);const n=this.generateInstanceKey(t,e,M.supportMultiInstance);if(M.forceCreateOnLoad){if(this.mountingInstances.has(n)){try{const M=await this.mountingInstances.get(n);M&&await this.unmount(M)}catch(M){console.warn(`Failed to unmount mounting instance for ${t}:`,M)}this.mountingInstances.delete(n)}this.mountedInstances.has(n)&&await this.unmount(this.mountedInstances.get(n))}else{if(this.mountedInstances.has(n)){const M=this.mountedInstances.get(n);return M&&M.update(i),M}if(this.mountingInstances.has(n)){const M=this.mountingInstances.get(n);return null===M||void 0===M||M.then(M=>{M&&(this.mountedInstances.has(M.instanceKey||M.componentName)||this.instances.has(M.containerId))&&M.update(i)}),M}}const N=(async()=>{try{const N=await this.loadRemoteComponent(t,M),D=await this.mountComponent(t,N,e,i,M.forceCreateOnLoad||!1);return D.instanceKey=n,this.mountedInstances.set(n,D),this.lifecycleEvents.emit("component_mounted",{type:"component_mounted",name:t,componentInstance:D}),this.mountingInstances.delete(n),D}catch(M){throw this.mountingInstances.delete(n),new Error(`Failed_load_and_mount_module_${t}: ${M instanceof Error?M.message:"Unknown error"}`)}})();return N.catch(M=>{console.error(`Failed_load_and_mount_module_${t}:`,M),this.mountingInstances.delete(n)}),this.mountingInstances.set(n,N),N}async onlyLoad(M,e){if(this.onlyLoadInstances.has(M))return this.onlyLoadInstances.get(M);if(this.onlyLoadLoadings.has(M))return this.onlyLoadLoadings.get(M);const i=(async()=>{this.lifecycleEvents.emit("module_loading",{type:"module_loading",name:M});try{const i=await this.loadRemoteComponent(M,e);return this.onlyLoadInstances.set(M,i),i}catch(e){const i=e instanceof Error?e:new Error("Unknown error");throw this.lifecycleEvents.emit("module_error",{type:"module_error",name:M,error:i}),i}})();return this.onlyLoadLoadings.set(M,i),i}async updateData(M,e){if(!M||!this.instances.has(M.containerId))throw new Error(`No instance found for module ${M.containerId}`);M.update(e),M.data={...M.data,...e}}async waitForGlobal(M,e,i=1e4){var t;const n=Date.now();for(;Date.now()-nsetTimeout(M,500))}const N=window[M],D=N?Object.keys(N):[],a=e?`Timeout waiting for global ${M}.${e} to be available. Available keys: ${D.join(", ")||"none"}. Window.${M} exists: ${!!N}`:`Timeout waiting for global ${M} to be available. Window.${M} exists: ${!!N}`;throw new Error(a)}clear(){this.onlyLoadInstances.clear(),this.onlyLoadLoadings.clear(),this.instances.clear(),this.mountingInstances.clear(),this.mountedInstances.clear()}getInstances(){return this.instances}onLifecycle(M,e){return this.lifecycleEvents.on(M,e)}async mountComponent(M,e,i,t={},n=!1){this.emitLifecycle("component_mounting",{type:"beforeMount"});try{const N=this.ensureContainer(M,i);if(!n){const M=this.instances.get(N.id);if(M)return M.update(t),this.emitLifecycle("component_mounted",{type:"afterMount"}),M}const D=await this.createComponentInstance(M,e,N,t);return this.instances.set(N.id,D),this.emitLifecycle("component_mounted",{type:"afterMount"}),D}catch(M){throw this.emitLifecycle("component_mounted",{type:"mountError",error:M}),M}}}},5203:(M,e,i)=>{"use strict";i.d(e,{WI:()=>c,Re:()=>u,qZ:()=>T,aw:()=>y,IX:()=>D});var t=i(1099);const n=M=>{if(!function(){const M=function(){const M="all".trim()||"";return""===M?"none":"all"===M.toLowerCase()?"all":M.split(",").map(M=>M.trim()).filter(M=>M.length>0)}();if("none"===M)return!1;if("all"===M)return!0;if("undefined"!==typeof window){const e=window.location.hostname;return M.some(M=>e===M||e.endsWith(`.${M}`))}return!1}())return M;if(M.startsWith("/fe-lib-")){let e=M;return!e.endsWith(".latest.js")&&e.endsWith(".js")&&(e=e.replace(/\.js$/,".latest.js")),`/static${e}`}return M};var N;const D=!1,a="MISSING_ENV_VAR".S3_CDN_PREFIX,g="/common-static/infra-static",o="/common-static/infra-static",j="/common-static/infra-static",I="/common-static/infra-static",s=(M="by-globals")=>D?`${a}${I}/${M}`:t.O_?`${g}/${M}`:t.iW?`${o}/${M}`:`${j}/${M}`,c=s(),u=s("by-vendors"),T="MISSING_ENV_VAR".REACT_CDN_URL||"/common-static/fhs/react.18.2.0.min-860f1d37ec17b010c94069b99a49ae7b.js",r=(null===(N="MISSING_ENV_VAR".DEBUG_COMPONENT_NAMES)||void 0===N?void 0:N.split(","))||[],z="MISSING_ENV_VAR".DEBUG_COMPONENT_REMOTE_PREFIX,A="MISSING_ENV_VAR".DEBUG_COMPONENT_LOCAL_PREFIX,d="DEBUG_BYGLOBLAS_ENV",y=(M,e)=>{let i="";if(D){if(r.length>0&&(M=>r.includes(M||""))(e)){const e=(M=>{if(!M)return;const e={5002:/fe-lib-header/,5003:/fe-lib-footer/,5005:/fe-lib-ujtools/,5006:/fe-lib-login/,5007:/fe-lib-assets/,5008:/fe-lib-user-security/,5009:/fe-lib-trade/,5100:/fe-lib-ac-tools/};for(const i of Object.keys(e))if(e[i].test(M))return i})(M.local||"");return`${A}${e?`:${e}`:""}${M.local}`}return M.test.startsWith("http")?n(M.test):`${z}${n(M.test)}`}return"undefined"!==typeof localStorage&&localStorage.getItem(d)&&t.Nu?M.test.startsWith("http")?n(M.test):`${localStorage.getItem(d)}${n(M.test)}`:(i=t.O_?M.prod:t.iW?M.testnet:M.prod,n(i))}},6208:e=>{"use strict";e.exports=M},6557:(M,e,i)=>{"use strict";i.d(e,{E:()=>N,n:()=>D});var t=i(1975);let n="";const N=M=>{n=M||"",(0,t.renderHeader)(n)},D=()=>n},8664:(M,e,i)=>{"use strict";i.d(e,{l:()=>t});class t{constructor(){this.events=new Map}on(M,e){var i,t;return M?(this.events.has(M)||this.events.set(M,[]),-1!==(null===(i=this.events.get(M))||void 0===i?void 0:i.indexOf(e))||null===(t=this.events.get(M))||void 0===t||t.push(e),this):(console.error("Event name is missing",M),this)}off(M,e){if(!this.events.has(M))return this;const i=this.events.get(M),t=i.indexOf(e);return-1!==t&&i.splice(t,1),0===i.length&&this.events.delete(M),this}emit(M,...e){if(!this.events.has(M))return this;return this.events.get(M).forEach(i=>{try{i(...e)}catch(e){console.error(`Error in event handler for ${M}:`,e)}}),this}removeAllListeners(M){return M?this.events.delete(M):this.events.clear(),this}}}},i={};function t(M){var n=i[M];if(void 0!==n)return n.exports;var N=i[M]={exports:{}};return e[M](N,N.exports,t),N.exports}t.m=e,t.n=M=>{var e=M&&M.__esModule?()=>M.default:()=>M;return t.d(e,{a:e}),e},t.d=(M,e)=>{for(var i in e)t.o(e,i)&&!t.o(M,i)&&Object.defineProperty(M,i,{enumerable:!0,get:e[i]})},t.f={},t.e=M=>Promise.all(Object.keys(t.f).reduce((e,i)=>(t.f[i](M,e),e),[])),t.u=M=>"globals."+({237:"taskCardPeriodicGroup",335:"deposit",339:"assetsExchangeV2",345:"rewardCardGroup",411:"security-item",533:"withdraw",690:"trBindOrLogin",1068:"drawBox",1149:"tradfiTradingLevelModal",1731:"registerGuideModal",1820:"autoSaving",1848:"gridDrawModal",1888:"migrationProcess",2072:"addBalance",2618:"resetMt4Password",2765:"linkWithX",2876:"createSubAccount",3012:"rewardChooseModal",3021:"giveawayModal",3073:"preListingAuction",3119:"migrationEntry",3221:"dualAssetPurchaseModal",3765:"changeTradfiAccountTypeModal",3976:"share",4050:"upgradeUnifiedAccount",4093:"thirdPartyLogin",4216:"globalPopup",4645:"googleOneTap",4685:"gridDraw",4813:"vipWithdrawQuestionnaire",4895:"navFooter",4977:"security",5030:"securityProtect",5055:"simpleNavHeader",5183:"drawBoxModal",5189:"aiSubAccountModal",5305:"campaign",5312:"loanRepayment",5331:"captchaV2",5410:"withdrawSpecial",5432:"recurringRewardModal",5436:"tradfiArchiveModal",5495:"ampDialog",5665:"easyEarnPurchaseModal",5885:"onChainEarnRedeem",5949:"warning",6096:"antiPhishingCode",6255:"captcha",6756:"utaRepayment",6902:"loanPledge",7031:"utaLoan",7121:"navHeader",7234:"transfer",8202:"rmChat",8292:"drawTurntable",8323:"webPush",8460:"depositThreeInOne",8559:"assetsExchange",8907:"dialog",8916:"languageModal",8959:"taskCardGroup",9025:"ada",9090:"taskDetailModal",9318:"complianceWall",9395:"demoAccountRechargeModal",9831:"taskDetail"}[M]||M)+"."+{237:"5edfcd1b",335:"51b1419f",339:"af171ff3",345:"1db9e5c2",411:"17d3ab5a",533:"d737e40b",690:"911e6045",1068:"81b4cd88",1149:"ca22a869",1731:"6f0816d0",1820:"d0ff11f1",1848:"7261bc03",1871:"31f14313",1888:"6433df7e",2072:"9b841aff",2618:"a01e6172",2765:"e195de38",2876:"d7464b87",3012:"d56f8c13",3021:"c18abe23",3073:"def9e051",3119:"e13f5115",3221:"a42e7660",3765:"f1db676f",3976:"eeab38a8",4050:"0ba4430f",4093:"044afd9f",4216:"b7179749",4645:"b5dbe72a",4685:"47c7fb47",4813:"126086d1",4895:"61b973e6",4977:"3e6a1e37",5030:"7e30439c",5055:"cdfa99e3",5183:"fb4c98b6",5189:"93d9e409",5305:"fbc674c0",5312:"6bc67aac",5331:"4a698e18",5410:"0c7f2978",5432:"b2227011",5436:"bdefbd1e",5495:"5f2b2d97",5665:"3e901f1f",5885:"37e1c012",5949:"aa5875dc",6096:"96170430",6255:"281c2739",6756:"fabfae41",6902:"1b5bc5ea",7031:"0f228ed1",7121:"c9e7a3b5",7234:"c9ee4b21",8202:"0e279a8c",8292:"5a15ab69",8323:"37f16f71",8460:"6cb54e1b",8559:"571caf77",8907:"1346e87b",8916:"9aec47c8",8959:"4d6a6d9d",9025:"4a90abda",9090:"122527da",9318:"5160044b",9395:"8b9f004d",9831:"26d38281"}[M]+".js",t.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(M){if("object"===typeof window)return window}}(),t.o=(M,e)=>Object.prototype.hasOwnProperty.call(M,e),(()=>{var M={},e="ByGlobals:";t.l=(i,n,N,D)=>{if(M[i])M[i].push(n);else{var a,g;if(void 0!==N)for(var o=document.getElementsByTagName("script"),j=0;j{a.onerror=a.onload=null,clearTimeout(c);var n=M[i];if(delete M[i],a.parentNode&&a.parentNode.removeChild(a),n&&n.forEach(M=>M(t)),e)return e(t)},c=setTimeout(s.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=s.bind(null,a.onerror),a.onload=s.bind(null,a.onload),g&&document.head.appendChild(a)}}})(),t.r=M=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(M,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(M,"__esModule",{value:!0})},(()=>{var M;t.g.importScripts&&(M=t.g.location+"");var e=t.g.document;if(!M&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(M=e.currentScript.src),!M)){var i=e.getElementsByTagName("script");if(i.length)for(var n=i.length-1;n>-1&&(!M||!/^http(s?):/.test(M));)M=i[n--].src}if(!M)throw new Error("Automatic publicPath is not supported in this browser");M=M.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),t.p=M})(),(()=>{var M={8792:0};t.f.j=(e,i)=>{var n=t.o(M,e)?M[e]:void 0;if(0!==n)if(n)i.push(n[2]);else{var N=new Promise((i,t)=>n=M[e]=[i,t]);i.push(n[2]=N);var D=t.p+t.u(e),a=new Error;t.l(D,i=>{if(t.o(M,e)&&(0!==(n=M[e])&&(M[e]=void 0),n)){var N=i&&("load"===i.type?"missing":i.type),D=i&&i.target&&i.target.src;a.message="Loading chunk "+e+" failed.\n("+N+": "+D+")",a.name="ChunkLoadError",a.type=N,a.request=D,n[1](a)}},"chunk-"+e,e)}};var e=(e,i)=>{var n,N,[D,a,g]=i,o=0;if(D.some(e=>0!==M[e])){for(n in a)t.o(a,n)&&(t.m[n]=a[n]);if(g)g(t)}for(e&&e(i);o{"use strict";t.d(n,{default:()=>d});var M=t(5193),e=t(1511),i=t(1099);const N="action",D=M=>{window.location.href};class a{constructor(){this.components=new Map,this.loadingPromises=new Map,this.componentFactories=new Map,this.registerComponentFactories()}static getInstance(){return a.instance||(a.instance=new a),a.instance}async unmountComponent(M){const e=this.components.get(M);e&&(await e.unmount(),this.components.delete(M))}async destroyAllComponents(){const M=Array.from(this.components.values()).map(M=>M.destroy());await Promise.all(M),this.components.clear()}registerComponentFactories(){this.componentFactories.set("navHeader",async()=>{const{NavHeader:M}=await t.e(7121).then(t.bind(t,5424));return new M}),this.componentFactories.set("simpleHeader",async()=>{const{SimpleNavHeader:M}=await t.e(5055).then(t.bind(t,766));return new M}),this.componentFactories.set("share",async()=>{const{Share:M}=await t.e(3976).then(t.bind(t,99));return new M}),this.componentFactories.set("dialog",async()=>{const{Dialog:M}=await t.e(8907).then(t.bind(t,6680));return new M}),this.componentFactories.set("languageModal",async()=>{const{LanguageModal:M}=await t.e(8916).then(t.bind(t,9355));return new M}),this.componentFactories.set("ada",async()=>{const{Ada:M}=await t.e(9025).then(t.bind(t,8392));return new M}),this.componentFactories.set("rmChat",async()=>{const{RmChat:M}=await t.e(8202).then(t.bind(t,1411));return new M}),this.componentFactories.set("globalPopup",async()=>{const{GlobalPopup:M}=await t.e(4216).then(t.bind(t,6695));return new M}),this.componentFactories.set("warning",async()=>{const{Warning:M}=await t.e(5949).then(t.bind(t,9212));return new M}),this.componentFactories.set("ampDialog",async()=>{const{AMPDialog:M}=await t.e(5495).then(t.bind(t,7826));return new M}),this.componentFactories.set("autoSaving",async()=>{const{AutoSaving:M}=await t.e(1820).then(t.bind(t,8589));return new M}),this.componentFactories.set("transfer",async()=>{const{Transfer:M}=await t.e(7234).then(t.bind(t,5427));return new M}),this.componentFactories.set("utaRepayment",async()=>{const{UtaRepayment:M}=await t.e(6756).then(t.bind(t,3321));return new M}),this.componentFactories.set("assetsExchange",async()=>{const{Convert:M}=await t.e(8559).then(t.bind(t,4379));return new M}),this.componentFactories.set("assetsExchangeV2",async()=>{const{Convert:M}=await t.e(339).then(t.bind(t,5719));return new M}),this.componentFactories.set("deposit",async()=>{const{Deposit:M}=await t.e(335).then(t.bind(t,6290));return new M}),this.componentFactories.set("depositThreeInOne",async()=>{const{DepositThreeInOne:M}=await t.e(8460).then(t.bind(t,5411));return new M}),this.componentFactories.set("withdraw",async()=>{const{Withdraw:M}=await t.e(533).then(t.bind(t,8374));return new M}),this.componentFactories.set("withdrawSpecial",async()=>{const{WithdrawSpecial:M}=await t.e(5410).then(t.bind(t,1997));return new M}),this.componentFactories.set("complianceWall",async()=>{const{ComplianceWall:M}=await t.e(9318).then(t.bind(t,8279));return new M}),this.componentFactories.set("navFooter",async()=>{const{NavFooter:M}=await t.e(4895).then(t.bind(t,4676));return new M}),this.componentFactories.set("campaign",async()=>{const{Campaign:M}=await t.e(5305).then(t.bind(t,3430));return new M}),this.componentFactories.set("security",async()=>{const{Security:M}=await t.e(4977).then(t.bind(t,5970));return new M}),this.componentFactories.set("securityItem",async()=>{const{SecurityItem:M}=await t.e(411).then(t.bind(t,5493));return new M}),this.componentFactories.set("captcha",async()=>{const{Captcha:M}=await t.e(6255).then(t.bind(t,8030));return new M}),this.componentFactories.set("captchaV2",async()=>{const{CaptchaV2:M}=await t.e(5331).then(t.bind(t,7542));return new M}),this.componentFactories.set("googleOneTap",async()=>{const{googleOneTap:M}=await t.e(4645).then(t.bind(t,1319));return new M}),this.componentFactories.set("migrationEntry",async()=>{const{MigrationEntry:M}=await t.e(3119).then(t.bind(t,1629));return new M}),this.componentFactories.set("migrationProcess",async()=>{const{MigrationProcess:M}=await t.e(1888).then(t.bind(t,2508));return new M}),this.componentFactories.set("registerLoginPage",async()=>{const{registerLoginPage:M}=await t.e(4093).then(t.bind(t,6990));return new M}),this.componentFactories.set("registerLoginModal",async()=>{const{registerLoginModal:M}=await t.e(4093).then(t.bind(t,6990));return new M}),this.componentFactories.set("thirdPartyLogin",async()=>{const{thirdPartyLogin:M}=await t.e(4093).then(t.bind(t,6990));return new M}),this.componentFactories.set("trBindOrLogin",async()=>{const{trBindOrLogin:M}=await t.e(690).then(t.bind(t,8368));return new M}),this.componentFactories.set("tgQuickLogin",async()=>{const{tgQuickLogin:M}=await t.e(690).then(t.bind(t,8808));return new M}),this.componentFactories.set("createSubAccount",async()=>{const{CreateSubAccount:M}=await t.e(2876).then(t.bind(t,6989));return new M}),this.componentFactories.set("aiSubAccountModal",async()=>{const{AiSubAccountModal:M}=await t.e(5189).then(t.bind(t,7580));return new M}),this.componentFactories.set("antiPhishingCode",async()=>{const{AntiPhishingCode:M}=await t.e(6096).then(t.bind(t,2689));return new M}),this.componentFactories.set("linkWithX",async()=>{const{LinkWithX:M}=await t.e(2765).then(t.bind(t,2152));return new M}),this.componentFactories.set("securityProtect",async()=>{const{SecurityProtect:M}=await t.e(5030).then(t.bind(t,4357));return new M}),this.componentFactories.set("resetMt4Password",async()=>{const{ResetMt4Password:M}=await t.e(2618).then(t.bind(t,7851));return new M}),this.componentFactories.set("rewardCardGroup",async()=>{const{RewardCardGroup:M}=await t.e(345).then(t.bind(t,2484));return new M}),this.componentFactories.set("recurringRewardModal",async()=>{const{RecurringRewardModal:M}=await t.e(5432).then(t.bind(t,2253));return new M}),this.componentFactories.set("rewardChooseModal",async()=>{const{RewardChooseModal:M}=await t.e(3012).then(t.bind(t,8963));return new M}),this.componentFactories.set("taskCardGroup",async()=>{const{TaskCardGroup:M}=await t.e(8959).then(t.bind(t,1678));return new M}),this.componentFactories.set("taskCardPeriodicGroup",async()=>{const{TaskCardPeriodicGroup:M}=await t.e(237).then(t.bind(t,5045));return new M}),this.componentFactories.set("taskDetail",async()=>{const{TaskDetail:M}=await t.e(9831).then(t.bind(t,3692));return new M}),this.componentFactories.set("taskDetailModal",async()=>{const{TaskDetailModal:M}=await t.e(9090).then(t.bind(t,7409));return new M}),this.componentFactories.set("vipWithdrawQuestionnaire",async()=>{const{VipWithdrawQuestionnaire:M}=await t.e(4813).then(t.bind(t,6058));return new M}),this.componentFactories.set("gridDraw",async()=>{const{GridDraw:M}=await t.e(4685).then(t.bind(t,8674));return new M}),this.componentFactories.set("gridDrawModal",async()=>{const{GridDrawModal:M}=await t.e(1848).then(t.bind(t,7319));return new M}),this.componentFactories.set("drawBox",async()=>{const{DrawBox:M}=await t.e(1068).then(t.bind(t,9423));return new M}),this.componentFactories.set("drawBoxModal",async()=>{const{DrawBoxModal:M}=await t.e(5183).then(t.bind(t,1548));return new M}),this.componentFactories.set("drawTurntable",async()=>{const{DrawTurntable:M}=await t.e(8292).then(t.bind(t,9959));return new M}),this.componentFactories.set("giveawayModal",async()=>{const{GiveawayModal:M}=await t.e(3021).then(t.bind(t,9580));return new M}),this.componentFactories.set("upgradeUnifiedAccount",async()=>{const{UpgradeUnifiedAccount:M}=await t.e(4050).then(t.bind(t,777));return new M}),this.componentFactories.set("addBalance",async()=>{const{AddBalance:M}=await t.e(2072).then(t.bind(t,857));return new M}),this.componentFactories.set("loanRepayment",async()=>{const{LoanRepayment:M}=await t.e(5312).then(t.bind(t,1227));return new M}),this.componentFactories.set("loanPledge",async()=>{const{LoanPledge:M}=await t.e(6902).then(t.bind(t,8695));return new M}),this.componentFactories.set("preListingAuction",async()=>{const{PreListingAuction:M}=await t.e(3073).then(t.bind(t,9272));return new M}),this.componentFactories.set("demoAccountRechargeModal",async()=>{const{DemoAccountRechargeModal:M}=await t.e(9395).then(t.bind(t,9608));return new M}),this.componentFactories.set("changeTradfiAccountTypeModal",async()=>{const{ChangeTradfiAccountTypeModal:M}=await t.e(3765).then(t.bind(t,3418));return new M}),this.componentFactories.set("utaLoan",async()=>{const{UtaLoan:M}=await t.e(7031).then(t.bind(t,5494));return new M}),this.componentFactories.set("onChainEarnRedeem",async()=>{const{OnChainEarnRedeem:M}=await t.e(5885).then(t.bind(t,8400));return new M}),this.componentFactories.set("easyEarnPurchaseModal",async()=>{const{EasyEarnPurchaseModal:M}=await t.e(5665).then(t.bind(t,3028));return new M}),this.componentFactories.set("dualAssetPurchaseModal",async()=>{const{DualAssetPurchaseModal:M}=await t.e(3221).then(t.bind(t,7970));return new M}),this.componentFactories.set("registerGuideModal",async()=>{const{RegisterGuideModal:M}=await t.e(1731).then(t.bind(t,712));return new M}),this.componentFactories.set("tradfiTradingLevelModal",async()=>{const{TradfiTradingLevelModal:M}=await t.e(1149).then(t.bind(t,3824));return new M}),this.componentFactories.set("tradfiArchiveModal",async()=>{const{TradfiArchiveModal:M}=await t.e(5436).then(t.bind(t,5161));return new M})}async getComponent(M){let e=M;if(e===`${i.Az}Header`&&(console.warn(`[ByGlobals] "${e}" is deprecated, use "navHeader" instead`),D({t:N,ext:{m:"deprecated_component_name",deprecated:e,replacement:"navHeader",page:window.location.pathname}}),e="navHeader"),e===`${i.Az}Footer`&&(console.warn(`[ByGlobals] "${e}" is deprecated, use "navFooter" instead`),D({t:N,ext:{m:"deprecated_component_name",deprecated:e,replacement:"navFooter",page:window.location.pathname}}),e="navFooter"),this.components.has(e))return this.components.get(e);if(this.loadingPromises.has(e))return this.loadingPromises.get(e);const t=this.componentFactories.get(e);if(t){const M=t().then(M=>(this.components.set(e,M),M));return M.finally(()=>{this.loadingPromises.delete(e)}),this.loadingPromises.set(e,M),M}}getComponentNames(){return Array.from(this.componentFactories.keys())}getComponentInstance(M){return this.components.get(M)}async preloadComponent(M){!this.components.has(M)&&this.componentFactories.has(M)&&await this.getComponent(M)}}let g=window.BYGLOBALS_I18N_INSTANCE;const o=()=>(g||(g=(0,i.wF)({projectId:"trade",ns:["global","common"],defaultNS:"global",defaultLang:"en",keySeparator:!1}),window.BYGLOBALS_I18N_INSTANCE=g),g);var j=t(6557);const I=()=>{const{DEADPOOL_CONFIG:M}={DEADPOOL_CONFIG:`${(0,i.dd)()}/v3/config/web`};return(0,i.iq)().post(M,{data:{project_name:"web",keys:["cht.googleonetap.blacklist"]}}).then(M=>{const{result:{data:e=[]}}=(null===M||void 0===M?void 0:M.data)||{};return(null===e||void 0===e?void 0:e.map(M=>JSON.parse(null===M||void 0===M?void 0:M.value)))[0]||{}}).catch(()=>({}))},s=M=>{var e;return(null===(e=M.replace(/^\/[a-z]{2,3}-[A-Z]{2,3}|^\/en/,""))||void 0===e?void 0:e.replace(/\/[a-z]{2,3}-[A-Z]{2,3}|\/en/,"/en").replace(/\/$/,""))||"/"},c="USER_BEHAVIOR_PATH",u=()=>{var M;try{const e=localStorage.getItem(c),i=(null===(M=null===e||void 0===e?void 0:e.split(","))||void 0===M?void 0:M.filter(M=>!!M))||[],t=i[i.length-1],{isSameHost:n,currentPath:N,referrerPath:D}=(()=>{const M=document.referrer;if(!M)return{isSameHost:!0,currentPath:s(location.pathname)};try{const e=location.hostname,i=new URL(M),t=i.hostname,n=s(i.pathname);return{isSameHost:e===t,currentPath:s(location.pathname),referrerPath:`${t}${n}`}}catch(M){return{isSameHost:!0,currentPath:s(location.pathname)}}})();if(i.length){if(N!==t){if(!n&&D)return void i.push(D,N);i.push(N)}}else!n&&D?i.push(D,N):i.push(N);return localStorage.setItem(c,i.slice(-6).join(","))}catch(M){console.warn(M)}};const T=async()=>{const M="/common-static/cht-static/security-svc/js/finger_device.js";if((()=>{var M,e;try{const t=["announcements","learn"].some(M=>{var e,i;return null===(i=null===(e=null===window||void 0===window?void 0:window.location)||void 0===e?void 0:e.host)||void 0===i?void 0:i.includes(M)});if(t||!i.O_)return!1;const n=["/trade"];for(let i=0;i-1)return!0;return!1}(M))return;let e={};"object"===typeof window&&(e=window);const t=()=>{e.byDeviceTx={ByFingerPrintReport:async M=>{},getEventUUID:async()=>{},getDeviceNameAsync:async()=>"",getGdfp2:async()=>""}};await(async()=>{var n,N,D;if(e.navigator&&(null===(n=e.navigator)||void 0===n?void 0:n.brave)){if(await(null===(D=null===(N=e.navigator)||void 0===N?void 0:N.brave)||void 0===D?void 0:D.isBrave()))return t(),e.byDeviceTx}if("USA"===i.Cn)return t(),e.byDeviceTx;if(e.byDeviceTx&&e.byDeviceTx.getGdfp2)return e.byDeviceTx;e.byDeviceLoading=!0;const a=document.createElement("script");return a.src=M,document.head.append(a),new Promise(M=>{a.addEventListener("error",()=>{t(),M(e.byDeviceTx)}),a.addEventListener("load",()=>{M(e.byDeviceTx)})})})()};o();class r{constructor(){this.i18nInstance=null,this.initialized=!1,this.initializing=!1,this.initPromise=null,this.webPush=null,this.componentLoader=M.e.getInstance(),this.depsLoader=e.c.getInstance()}static getInstance(){return r.instance||(r.instance=new r),r.instance}async loadComponent(M,e,t){try{if(["navHeader","simpleHeader"].includes(M)&&((0,i.J9)()||(0,i.YB)()))return void console.warn(`Component ${M} not supported in appUSA or app, skip loading`);this.initPromise&&await this.initPromise;const n=await this.getComponent(M);return n?await n.init(e,t):void console.warn(`Component ${M} not found`)}catch(M){throw M}}async unmount(M){try{await this.componentLoader.unmount(M),this.getComponentRegistry().unmountComponent(M.componentName)}catch(M){console.error("unmount error",M)}}async unmountByInstanceName(M){await this.componentLoader.unmountByInstanceKey(M)}updateComponentData(M,e){const i=this.getComponentInstance(M);i&&i.update(e)}onComponentEvent(M,e,i){const t=this.getComponentInstance(M);t&&t.eventBus.on(e,i)}onLifecycle(M,e){return this.componentLoader.onLifecycle(M,e)}getComponentInstance(M){let e=this.componentLoader.getInstanceByKey(M);if(e)return e;const i=this.componentLoader.getInstancesByComponentName(M);return i.length>0?i[0]:void 0}getComponentInstancesByName(M){return this.componentLoader.getInstancesByComponentName(M)}getAllComponentInstances(){return Array.from(this.componentLoader.getMountedInstances().values())}getAllInstanceNames(){return this.componentLoader.getAllInstanceKeys()}async unmountAllInstancesByName(M){await this.componentLoader.unmountAllInstancesByComponentName(M)}getComponentRegistry(){return a.getInstance()}async getComponent(M){return this.getComponentRegistry().getComponent(M)}getAllComponents(){return this.getComponentRegistry().getComponentNames()}async doInit(M){try{const{preload:e,...i}=M;await this.validateVendors(),await this.initGlobalModules(i)}catch(M){throw M}}async init(M){if(this.initialized)return console.info("ByGlobals already initialized"),Promise.resolve();if(this.initializing&&this.initPromise)return this.initPromise;this.initializing=!0,this.initPromise=this.doInit(M);try{await this.initPromise,this.initialized=!0}finally{this.initializing=!1}return this.initPromise}async validateVendors(){try{const M=[];window.React&&window.ReactDOM||M.push(this.depsLoader.loadDependency("react")),window.ByVendors||M.push(this.depsLoader.loadDependency("byVendors"));await Promise.all(M);if(!window.ByVendors||"object"!==typeof window.ByVendors)throw new Error("Vendors initialization failed");if(!window.React||!window.ReactDOM)throw new Error("React initialization failed");return this.initI18nInstance(),!0}catch(M){throw console.error("Validate vendors error:",M),M}}async initGlobalModules(M){var e,t,n,a,g,o;try{const j=`${i.Az}Header`,I=`${i.Az}Footer`,s=(null===M||void 0===M?void 0:M.navHeader)||M[j],c=(null===M||void 0===M?void 0:M.navFooter)||M[I];M[j]&&(console.warn(`[ByGlobals] "${j}" is deprecated, use "navHeader" instead`),D({t:N,ext:{m:"deprecated_init_key",deprecated:j,replacement:"navHeader",page:window.location.pathname}})),M[I]&&(console.warn(`[ByGlobals] "${I}" is deprecated, use "navFooter" instead`),D({t:N,ext:{m:"deprecated_init_key",deprecated:I,replacement:"navFooter",page:window.location.pathname}})),!(null===s||void 0===s?void 0:s.disabled)&&this.initNavHeader(s),(null===M||void 0===M?void 0:M.simpleHeader)&&!(null===(e=null===M||void 0===M?void 0:M.simpleHeader)||void 0===e?void 0:e.disabled)&&this.initSimpleHeader(M.simpleHeader),!(null===(t=M.complianceWall)||void 0===t?void 0:t.disabled)&&this.initComplianceWall(),!(null===(n=M.campaign)||void 0===n?void 0:n.disabled)&&this.initCampaigns(M.campaign),!(null===(a=M.antiPhishingCode)||void 0===a?void 0:a.disabled)&&this.initAntiPhishingCode(M.antiPhishingCode),!(null===(g=M.googleOneTap)||void 0===g?void 0:g.disabled)&&this.initGoogleAuth(),!(null===(o=M.webPush)||void 0===o?void 0:o.disabled)&&this.initWebPush(),!(null===c||void 0===c?void 0:c.disabled)&&this.initNavFooter(c)}catch(M){throw M}}async initCampaigns(M){try{await this.loadComponent("campaign",null===M||void 0===M?void 0:M.containerId,null===M||void 0===M?void 0:M.defaultProps)}catch(M){throw M}}async initAntiPhishingCode(M){try{"undefined"!==typeof window.ByLandingPage||await this.loadComponent("antiPhishingCode",null===M||void 0===M?void 0:M.containerId,{...(null===M||void 0===M?void 0:M.defaultProps)||{},type:"randomAntiPhishingCode",isAutoPopup:!0})}catch(M){throw M}}async initComplianceWall(){try{await this.loadComponent("complianceWall")}catch(M){throw M}}async initGoogleAuth(){var M,e,t,n;u(),T();const N=["TUR","KAZ","HKG"];if(!(0,i.Cv)()){const D=N.includes(i.Cn||"")||window.location.host.indexOf(`.explore${i.Az}.com`)>-1||window.location.host.indexOf(`.${i.Az}card.com`)>-1||window.location.host.indexOf(`.${i.Az}cards.com`)>-1;if(window.self!==window.top||window.hideGoogle2||D||(0,i.Cv)())return;const a=["/login","/tr-authorized","/oauth-login","/register","/oauth-register","/oauth-authorized","/sign-up","/exclusive-benefits","/mobile-bot","/app/user/security","/app/user/sub-account","/app/user/api-management","/app/user/settings","/red-packet","/red-packet/result","/red-packet/enroll","/fiat/trade/express/addCard/continue","/fiat/trade/express/addCard/template","/fiat/cards/dashboard","/fiat/cards/campaign/bcard","/user/accounts/auth/sdk","/download"];for(let i=0;i-1)return}for(let M=0;M{location.reload()},registerSuccessCallBack:()=>{location.reload()}})}}initWebPush(){"USA"!==i.Cn&&Promise.all([t.e(1871),t.e(8323)]).then(t.bind(t,5549)).then(({webPush:M})=>{this.webPush=M})}initI18nInstance(M){this.i18nInstance=o(),null===M||void 0===M||M()}async initNavHeader(M){try{if((null===M||void 0===M?void 0:M.disabled)||(0,i.YB)()||(0,i.J9)())return;let e="";(null===M||void 0===M?void 0:M.skeleton)&&"USA"!==i.Cn&&(e=(null===M||void 0===M?void 0:M.skeletonContainerId)||this.componentLoader.generateContainerId("navHeader"),(0,j.E)(e)),await this.loadComponent("navHeader",null===M||void 0===M?void 0:M.containerId,null===M||void 0===M?void 0:M.defaultProps)}catch(M){throw M}}async initSimpleHeader(M){try{if(null===M||void 0===M?void 0:M.disabled)return;await this.loadComponent("simpleHeader",null===M||void 0===M?void 0:M.containerId,null===M||void 0===M?void 0:M.defaultProps)}catch(M){throw M}}async initNavFooter(M){try{if(null===M||void 0===M?void 0:M.disabled)return;await this.loadComponent("navFooter",null===M||void 0===M?void 0:M.containerId,null===M||void 0===M?void 0:M.defaultProps)}catch(M){throw M}}reset(){this.initialized=!1,this.initializing=!1,this.initPromise=null,this.componentLoader.clear()}}const z=r.getInstance();var A;!function(M){M.MODULE_LOADING="module_loading",M.MODULE_LOADED="module_loaded",M.MODULE_ERROR="module_error",M.MODULE_UNMOUNTED="module_unmounted",M.DEPENDENCIES_LOADING="dependencies_loading",M.DEPENDENCIES_LOADED="dependencies_loaded",M.SCRIPT_LOADING="script_loading",M.SCRIPT_LOADED="script_loaded",M.COMPONENT_INITIALIZING="component_initializing",M.COMPONENT_INITIALIZED="component_initialized",M.COMPONENT_MOUNTING="component_mounting",M.COMPONENT_MOUNTED="component_mounted",M.DATA_UPDATED="data_updated"}(A||(A={}));const d=z})(),n=n.default})());