1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ae9dff24-ee81-498c-b80a-74d63cfca14c",e._sentryDebugIdIdentifier="sentry-dbid-ae9dff24-ee81-498c-b80a-74d63cfca14c")}()}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1225,3951],{2760:(e,t,n)=>{n.d(t,{B:()=>o});let r=new(n(48304)).EventEmitter;var a=n(69534);let s="account.preferences";function i(e){return"BTC"===e?"BTC":"USDT"}var l=n(38113);function o(){let[e,t]=(0,l.useState)(!0),[n,o]=(0,l.useState)("USDT"),[c,d]=(0,l.useState)(!1);(0,l.useEffect)(()=>{t(function(){var e;let t=a.Ay.getItem(s);return null==(e=null==t?void 0:t.hideBalance)||e}()),o(i(a.Ay.getItem("valuationAsset"))),d(!0);let e=e=>{t(!!e)},n=e=>{o(i(e))};return r.on("onNavbarAssetsEncryption",e),r.on("onPersonalAssetsEncryption",e),r.on("onNavbarAssetsUnit",n),r.on("onPersonalAssetsUnit",n),()=>{r.off("onNavbarAssetsEncryption",e),r.off("onPersonalAssetsEncryption",e),r.off("onNavbarAssetsUnit",n),r.off("onPersonalAssetsUnit",n)}},[]);let u=e=>{t(function(e){let t=!!e,n=a.Ay.getItem(s)||{};return a.Ay.setItem(s,{...n,hideBalance:t}),r.emit("onNavbarAssetsEncryption",t),r.emit("onPersonalAssetsEncryption",t),t}(e))};return{isBalanceVisible:e,valuationAsset:n,isDisplayPrefsReady:c,setBalanceVisible:u,setValuationAsset:e=>{o(function(e){let t=i(e);return a.Ay.setItem("valuationAsset",t),r.emit("onNavbarAssetsUnit",t),r.emit("onPersonalAssetsUnit",t),t}(e))},toggleBalanceVisible:()=>{u(!e)}}}},7370:(e,t,n)=>{n.d(t,{q:()=>i});var r=n(79237),a=n(38113),s=n(65375);let i=a.forwardRef((e,t)=>(0,r.jsx)(s.B,{ref:t,viewBox:"0 0 1066 1024",...e,children:(0,r.jsx)("path",{d:"M765.269333 76.501333a133.162667 133.162667 0 1 1 188.330667 188.330667l-408.021333 408.021333-2.517334 2.517334c-12.245333 12.288-23.04 23.125333-36.096 31.104a128 128 0 0 1-36.992 15.36C455.082667 725.333333 439.765333 725.333333 422.4 725.333333H347.434667a42.666667 42.666667 0 0 1-42.666667-42.666666v-71.466667-3.541333c0-17.365333-0.042667-32.682667 3.541333-47.530667a128 128 0 0 1 15.317334-36.992c7.978667-13.056 18.816-23.850667 31.104-36.096l2.517333-2.56 408.021333-407.978667z m128 60.330667a47.829333 47.829333 0 0 0-67.669333 0L417.578667 544.853333c-16.213333 16.213333-19.2 19.584-21.205334 22.869334a42.666667 42.666667 0 0 0-5.12 12.330666c-0.853333 3.754667-1.152 8.277333-1.152 31.146667V640h28.757334c22.912 0 27.434667-0.256 31.146666-1.194667a42.581333 42.581333 0 0 0 12.373334-5.12c3.285333-2.005333 6.656-4.992 22.869333-21.162666l408.021333-408.021334a47.829333 47.829333 0 0 0 0-67.669333zM294.485333 128h180.906667a42.666667 42.666667 0 1 1 0 85.333333h-179.2c-36.522667 0-61.354667 0-80.554667 1.621334-18.730667 1.493333-28.288 4.266667-34.986666 7.68a85.333333 85.333333 0 0 0-37.248 37.290666c-3.413333 6.656-6.186667 16.213333-7.68 34.944-1.578667 19.2-1.621333 44.032-1.621334 80.597334v358.4c0 36.565333 0 61.397333 1.578667 80.597333 1.536 18.688 4.309333 28.288 7.68 34.944a85.333333 85.333333 0 0 0 37.333333 37.290667c6.656 3.413333 16.213333 6.186667 34.944 7.68 19.2 1.578667 44.032 1.621333 80.597334 1.621333h358.4c36.522667 0 61.397333 0 80.597333-1.621333 18.688-1.493333 28.245333-4.266667 34.944-7.68a85.333333 85.333333 0 0 0 37.290667-37.290667c3.413333-6.656 6.186667-16.213333 7.68-34.944 1.578667-19.2 1.621333-44.032 1.621333-80.597333V554.666667a42.666667 42.666667 0 1 1 85.333333 0v180.949333c0 34.346667 0 62.72-1.877333 85.76-1.962667 24.021333-6.186667 46.08-16.725333 66.773333a170.666667 170.666667 0 0 1-74.581334 74.581334c-20.736 10.538667-42.752 14.762667-66.730666 16.725333-23.082667 1.877333-51.456 1.877333-85.76 1.877333H294.442667c-34.346667 0-62.72 0-85.802667-1.877333-23.978667-1.962667-46.037333-6.186667-66.730667-16.725333a170.666667 170.666667 0 0 1-74.581333-74.581334c-10.538667-20.693333-14.762667-42.752-16.725333-66.730666-1.877333-23.082667-1.877333-51.456-1.877334-85.76V373.674667c0-34.346667 0-62.72 1.877334-85.76 1.962667-24.021333 6.186667-46.08 16.725333-66.773334a170.666667 170.666667 0 0 1 74.581333-74.581333c20.693333-10.538667 42.752-14.762667 66.730667-16.725333C231.765333 128 260.138667 128 294.442667 128z"})}));i.displayName="EditIcon"},12256:(e,t,n)=>{n.d(t,{A:()=>h});var r=n(79237),a=n(71591),s=n(93924),i=n(53951),l=n(44031),o=n(66960),c=n(59292),d=n(10935),u=n(51025),m=n(38113);let f=/([0-9|*|#]\uFE0F\u20E3)|([0-9|#]\u20E3)|([\u203C-\u3299]\uFE0F\u200D)|([\u203C-\u3299]\uFE0F)|([\u2122-\u2B55])|(\u303D)|([
1(\u00A9)|(\u00AE)]\u3030)|(\u00A9)|(\u00AE)|(\u3030)|([\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF])|([\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F])/g;function h(e){let{open:t,onOpenChange:n,defaultName:h=""}=e,{$t:p}=(0,o.B)(),{user:x,refreshUser:v}=(0,u.k)(),[g,b]=(0,m.useState)(""),[j,N]=(0,m.useState)(!1),y=async()=>{if(g.trim()&&!j){N(!0);try{let e=await c.request.post("/user/nick/name",{body:{nickName:g.trim()},requestType:d.Yw.JsonString});e&&200===e.code&&((0,s.toast)({title:p("Nickname change request submitted. We'll review it soon."),type:"success"}),await v(),n(!1),b(""))}catch(e){}finally{N(!1)}}};(0,m.useEffect)(()=>{t&&b(h||"")},[t,h]);let w=(null==x?void 0:x.nickNameModificationTimes)===0,k=!j&&g.trim().length>0&&!w;return(0,r.jsx)(i.Dialog,{open:t,onOpenChange:n,title:p("Edit Nickname"),onOk:y,onCancel:()=>{b(""),n(!1)},okText:p("Confirm"),cancelText:p("Cancel"),okButtonProps:{disabled:!k},children:(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"text-t2 mb-2 block text-xs leading-4",children:p("Nickname")}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(l.Input,{value:g,onChange:e=>{b(e.target.value.replace(f,""))},maxLength:25,disabled:w,placeholder:p("Enter nickname"),className:"focus:border-p1 pr-20"}),(0,r.jsxs)("div",{className:"absolute top-1/2 right-3 flex -translate-y-1/2 items-center gap-2",children:[g.length>0&&(0,r.jsx)("button",{type:"button",onClick:()=>b(""),className:"text-t3 hover:text-t1 transition-colors",children:(0,r.jsx)(a.v,{className:"text-sm"})}),(0,r.jsx)("div",{className:"bg-l1 h-4 w-px"}),(0,r.jsxs)("span",{className:"text-t3 text-sm",children:[g.length,"/25"]})]})]})]}),(0,r.jsxs)("div",{className:"text-t2 text-xs leading-4",children:[(0,r.jsxs)("div",{children:["*",p("Nickname can not be longer than 25 characters")]}),(0,r.jsx)("div",{children:(null==x?void 0:x.nickNameModificationTimes)&&(null==x?void 0:x.nickNameModificationTimes)>0?p("You can edit your nickname {0} more time(s) this month",{0:null==x?void 0:x.nickNameModificationTimes}):p("You have reached the limit of {0} nickname changes this month",{0:(null==x?void 0:x.maxNickNamModificationTimes)||0})})]})]})})}},17391:(e,t,n)=>{n.d(t,{$h:()=>S,$q:()=>D,A8:()=>u,Ab:()=>N,I0:()=>b,NF:()=>m,OY:()=>A,Td:()=>x,Yf:()=>h,Yy:()=>j,Zz:()=>_,_B:()=>C,gO:()=>g,hW:()=>k,rm:()=>f,vI:()=>p,xZ:()=>v,y9:()=>w});var r=n(31508),a=n(13973);let s=0;function i(e){return Object.fromEntries(Object.entries(e).filter(e=>{let[,t]=e;return null!=t&&""!==t}))}function l(e){if("string"==typeof e)return e.trim().toLowerCase()||void 0}function o(e){return Number.isFinite(e)?Math.max(0,Math.round(e)):0}function c(e){return"success"===e.result?{result:"success",duration_ms:o(e.durationMs)}:i({result:"fail",duration_ms:o(e.durationMs),...e.technicalFailure?{fail_code:e.technicalFailure,fail_reason:e.technicalFailure}:function(e){if(!(0,r.d)(e))return{fail_code:"network_error",fail_reason:"network_error"};if(e.errorType===r.TT.Backend){var t,n;let r=null==(t=e.data)?void 0:t.code,a=null==(n=e.data)?void 0:n.message;return{...null==r?{}:{fail_code:String(r)},..."string"==typeof a&&a?{fail_reason:a}:{}}}return e.errorType===r.TT.Http?{fail_code:Number.isFinite(e.status)?"http_".concat(e.status):"http_error",fail_reason:"http_error"}:1===e.status?{fail_code:"timeout",fail_reason:"request_timeout"}:{fail_code:"network_error",fail_reason:"network_error"}}(e.error)})}function d(e){return"onchain"===e?"withdraw_onchain":"withdraw_internal"}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:performance.now();return s+=1,{attemptId:"".concat(Math.round(t),"-").concat(s),startedAt:t,asset:l(e.asset),network:l(e.network)}}function m(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:performance.now();return o(t-e.startedAt)}async function f(e,t){let n=u(e),r=!1;try{let e=await t(()=>{r=!0});if(r){var a;y(n,(null==(a=e.data)?void 0:a.address)?{result:"success",durationMs:m(n)}:{result:"fail",durationMs:m(n),error:void 0,technicalFailure:"empty_address"})}return e}catch(e){throw r&&y(n,{result:"fail",durationMs:m(n),error:e}),e}}function h(e){return"WITHDRAW"===e?"onchain":"internal"}function p(e,t){var n="onchain"===e?null==t?void 0:t.state:null==t?void 0:t.authenticated;return"onchain"===e?!0===n?"verified_address":!1===n?"unverified_address":void 0:"AUTHENTICATED"===n?"verified_address":"UNAUTHENTICATED"===n?"unverified_address":void 0}function x(e,t){return i({page_name:d(e),asset:l(t)})}function v(e){return i({page_name:d(e.flow),page_type:"modal",modal_name:"withdraw_security_verification",asset:l(e.asset),network:"onchain"===e.flow?l(e.network):void 0,address_verification_type:e.addressVerificationType})}function g(e){(0,a.s)("deposit_entry_click",{page_name:e})}function b(e){(0,a.s)("withdraw_entry_click",{page_name:e})}function j(e,t){(0,a.s)("deposit_asset_select_submit",i({page_name:"deposit",asset:l(e),selection_source:t}))}function N(e,t){(0,a.s)("deposit_network_select_click",i({page_name:"deposit",asset:l(e),network:l(t)}))}function y(e,t){(0,a.s)("deposit_address_fetch_result",i({asset:e.asset,network:e.network,...c(t)}))}function w(e,t,n){(0,a.s)("deposit_address_result_click",i({page_name:"deposit",asset:l(e),network:l(t),element_name:n}))}
1function k(e,t,n){(0,a.s)("onchain"===e?"withdraw_onchain_click":"withdraw_internal_click",i({page_name:d(e),asset:l(t),element_name:n}))}function _(e,t,n){(0,a.s)("withdraw_onchain_submit",i({page_name:"withdraw_onchain",asset:l(e),network:l(t),is_address_book:n}))}function C(e,t){let n="EMAIL"===t?"email":"PHONE"===t?"phone":"UID"===t?"uid":void 0;n&&(0,a.s)("withdraw_internal_submit",i({page_name:"withdraw_internal",asset:l(e),account_type:n}))}function S(e,t){(0,a.s)("withdraw_submit_blocked",{page_name:d(e),reason:t})}function D(e,t){(0,a.s)("withdraw_security_verification_click",{page_name:d(e),page_type:"modal",modal_name:"withdraw_security_verification",element_name:t})}function A(e,t,n){(0,a.s)("withdraw_security_verification_result",i({withdraw_type:e,address_verification_type:t,...c(n)}))}},18393:(e,t,n)=>{n.d(t,{T:()=>i});var r=n(79237),a=n(38113),s=n(65375);let i=a.forwardRef((e,t)=>(0,r.jsx)(s.B,{ref:t,viewBox:"0 0 1066 1024",...e,children:(0,r.jsx)("path",{d:"M767.018667 172.842667C740.693333 170.709333 706.901333 170.666667 658.389333 170.666667h-302.933333a42.666667 42.666667 0 1 1 0-85.333334h304.768c46.250667 0 83.541333 0 113.749333 2.474667 31.104 2.56 58.410667 7.893333 83.669334 20.778667a213.333333 213.333333 0 0 1 93.226666 93.226666c12.885333 25.258667 18.261333 52.608 20.778667 83.669334 2.474667 30.208 2.474667 67.498667 2.474667 113.749333V704a42.666667 42.666667 0 0 1-85.333334 0V401.066667c0-48.512 0-82.304-2.133333-108.629334-2.133333-25.813333-6.058667-40.661333-11.818667-51.882666a128 128 0 0 0-55.893333-55.936c-11.264-5.717333-26.112-9.642667-51.925333-11.776zM298.368 234.666667h348.885333c22.485333 0 41.898667 0 57.856 1.28 16.896 1.408 33.664 4.437333 49.792 12.672a128 128 0 0 1 55.936 55.936c8.234667 16.128 11.264 32.938667 12.672 49.792 1.28 16 1.28 35.413333 1.28 57.856v348.928c0 22.485333 0 41.898667-1.28 57.856-1.365333 16.853333-4.437333 33.664-12.672 49.792a128 128 0 0 1-55.893333 55.936c-16.170667 8.234667-32.938667 11.264-49.834667 12.629333-15.957333 1.322667-35.370667 1.322667-57.856 1.322667H298.368c-22.485333 0-41.898667 0-57.898667-1.28-16.853333-1.408-33.621333-4.437333-49.792-12.672a128 128 0 0 1-55.893333-55.936c-8.234667-16.128-11.306667-32.938667-12.672-49.792a763.733333 763.733333 0 0 1-1.28-57.898667V412.245333c0-22.485333 0-41.856 1.28-57.856 1.365333-16.853333 4.437333-33.664 12.629333-49.792A128 128 0 0 1 190.72 248.618667c16.170667-8.234667 32.938667-11.264 49.792-12.629334 16-1.322667 35.413333-1.322667 57.898667-1.322666zM247.424 321.024c-11.562667 0.938667-15.872 2.56-18.005333 3.626667a42.666667 42.666667 0 0 0-18.645334 18.645333c-1.066667 2.133333-2.688 6.4-3.626666 18.005333-0.981333 12.074667-1.024 27.946667-1.024 52.565334v345.6c0 24.618667 0.042667 40.490667 1.024 52.565333 0.938667 11.605333 2.56 15.872 3.626666 18.005333a42.666667 42.666667 0 0 0 18.645334 18.645334c2.133333 1.066667 6.4 2.688 18.005333 3.626666 12.117333 0.981333 27.989333 1.024 52.565333 1.024h345.6c24.618667 0 40.533333 0 52.565334-1.024 11.605333-0.938667 15.914667-2.56 18.005333-3.626666a42.666667 42.666667 0 0 0 18.645333-18.645334c1.109333-2.133333 2.688-6.4 3.626667-18.005333 1.024-12.074667 1.024-27.946667 1.024-52.565333V413.866667c0-24.618667 0-40.490667-1.024-52.565334-0.938667-11.605333-2.56-15.914667-3.626667-18.005333a42.666667 42.666667 0 0 0-18.645333-18.645333c-2.133333-1.066667-6.4-2.688-18.005333-3.626667-12.074667-0.981333-27.946667-1.024-52.565334-1.024h-345.6c-24.576 0-40.448 0-52.565333 1.024z"})}));i.displayName="CopyIcon"},29521:(e,t,n)=>{n.d(t,{Km:()=>s,WU:()=>a,tG:()=>i});var r=n(14298);let a={en:{common:{cancel:"Cancel",confirm:"Confirm",loading:"Loading...",noRecords:"No record",search:"Search",select:"Select"},datePicker:{endDate:"End date",pickDate:"Pick a date",pickDateRange:"Pick a date range"}},ko:{common:{cancel:"ì·¨ì",confirm:"íì¸",loading:"ë¡ë ì¤...",noRecords:"ìë¡ì´ ì림 ìì",search:"ê²ì",select:"ì í"},datePicker:{endDate:"ì¢
ë£ì¼",pickDate:"ë ì§ ì í",pickDateRange:"ë ì§ ë²ì ì í"}},de:{common:{cancel:"Abbrechen",confirm:"Best\xe4tigen",loading:"Wird geladen...",noRecords:"Kein Eintrag",search:"Suchen",select:"Ausw\xe4hlen"},datePicker:{endDate:"Enddatum",pickDate:"Datum ausw\xe4hlen",pickDateRange:"Datumsbereich ausw\xe4hlen"}},ja:{common:{cancel:"ãã£ã³ã»ã«",confirm:"確èª",loading:"ãã¼ãã£ã³ã°...",noRecords:"è¨é²ãããã¾ãã",search:"æ¤ç´¢",select:"鏿"},datePicker:{endDate:"çµäºæ¥",pickDate:"æ¥ä»ã鏿",pickDateRange:"æ¥ä»ç¯å²ã鏿"}},fa:{common:{cancel:"ÙØºÙ",confirm:"تاÛÛØ¯ Ú©ÙÛØ¯",loading:"Ø¯Ø±ØØ§Ù بارگزارÛ....",noRecords:"بدÙ٠سابÙÙ",search:"جستجÙ",select:"Ø§ÙØªØ®Ø§Ø¨"},datePicker:{endDate:"ØªØ§Ø±ÛØ® Ù¾Ø§ÛØ§Ù",pickDate:"ØªØ§Ø±ÛØ® را Ø§ÙØªØ®Ø§Ø¨ Ú©ÙÛØ¯",pickDateRange:"Ø¨Ø§Ø²Ù ØªØ§Ø±ÛØ® را Ø§ÙØªØ®Ø§Ø¨ Ú©ÙÛØ¯"}},fr:{common:{cancel:"Annuler",confirm:"Confirmer",loading:"Chargementâ¦",noRecords:"Aucun enregistrement",search:"Rechercher",select:"S\xe9lectionner"},datePicker:{endDate:"Date de fin",pickDate:"S\xe9lectionner une date",pickDateRange:"S\xe9lectionner une plage de dates"}},it:{common:{cancel:"Annulla",confirm:"Conferma",loading:"Caricamento...",noRecords:"Nessun Record",search:"
1Cerca",select:"Seleziona"},datePicker:{endDate:"Data di fine",pickDate:"Seleziona una data",pickDateRange:"Seleziona un intervallo di date"}},ru:{common:{cancel:"ÐÑмена",confirm:"ÐодÑвеÑдиÑÑ",loading:"ÐагÑÑзка...",noRecords:"ÐÐµÑ ÐапиÑи",search:"ÐоиÑк",select:"ÐÑбÑаÑÑ"},datePicker:{endDate:"ÐаÑа оконÑаниÑ",pickDate:"ÐÑбеÑиÑе даÑÑ",pickDateRange:"ÐÑбеÑиÑе диапазон даÑ"}},es:{common:{cancel:"Cancelar",confirm:"Confirmar",loading:"Cargando...",noRecords:"Sin registro",search:"Buscar",select:"Seleccionar"},datePicker:{endDate:"Fecha final",pickDate:"Selecciona una fecha",pickDateRange:"Selecciona un rango de fechas"}},pt:{common:{cancel:"Cancelar",confirm:"Confirmar",loading:"Carregando...",noRecords:"Sem registro",search:"Pesquisar",select:"Selecionar"},datePicker:{endDate:"Data final",pickDate:"Selecione uma data",pickDateRange:"Selecione um intervalo de datas"}},tr:{common:{cancel:"İptal",confirm:"Onayla",loading:"Y\xfckleniyor...",noRecords:"Kayıt yok",search:"Ara",select:"Se\xe7"},datePicker:{endDate:"BitiÅ tarihi",pickDate:"Tarih se\xe7in",pickDateRange:"Tarih aralıÄı se\xe7in"}},"zh-TW":{common:{cancel:"åæ¶",confirm:"確èª",loading:"å è¼ä¸...",noRecords:"æ«ç¡è¨é",search:"æå°",select:"鏿"},datePicker:{endDate:"çµææ¥æ",pickDate:"é¸ææ¥æ",pickDateRange:"é¸ææ¥æç¯å"}}},s=e=>{var t;return null!=(t=a[null!=e?e:r.Xn])?t:a[r.Xn]};Object.fromEntries(Object.entries(a).map(e=>{let[t,n]=e;return[t,n.common.noRecords]})),a.en.common.noRecords;let i=e=>s(e).common.noRecords},37726:(e,t,n)=>{n.r(t),n.d(t,{default:()=>eI});var r=n(79237),a=n(38113),s=n(65375);let i=a.forwardRef((e,t)=>(0,r.jsx)(s.B,{ref:t,viewBox:"0 0 1084 1024",...e,children:(0,r.jsx)("path",{d:"M542.117647 0a520.071529 520.071529 0 0 0-207.450353 43.309176 541.153882 541.153882 0 0 0-175.887059 123.301648C57.103059 273.287529 0 418.032941 0 568.862118v398.275764c0 15.058824 5.722353 29.515294 15.902118 40.176942A53.007059 53.007059 0 0 0 54.211765 1024h162.635294c43.128471 0 84.510118-18.010353 115.049412-49.995294 30.479059-31.984941 47.585882-75.414588 47.585882-120.651294v-113.844706c0-45.176471-17.106824-88.606118-47.585882-120.651294a158.840471 158.840471 0 0 0-115.049412-49.995294H108.423529c0-120.651294 45.718588-236.423529 127.036236-321.776942C316.777412 161.731765 427.068235 113.784471 542.117647 113.784471c115.049412 0 225.28 47.947294 306.657882 133.300705C930.093176 332.438588 975.811765 448.150588 975.811765 568.862118h-108.42353c-43.128471 0-84.510118 18.010353-115.049411 49.995294a175.043765 175.043765 0 0 0-47.585883 120.711529v113.784471c0 45.236706 17.167059 88.666353 47.585883 120.651294 30.539294 31.984941 71.920941 49.995294 115.049411 49.995294h162.635294a53.007059 53.007059 0 0 0 38.309647-16.685176 58.368 58.368 0 0 0 15.902118-40.176942V568.862118c0-150.829176-57.103059-295.574588-158.780235-402.251294C823.777882 59.934118 685.899294 0 542.117647 0zM216.847059 682.646588c14.396235 0 28.190118 6.023529 38.309647 16.685177a58.368 58.368 0 0 1 15.902118 40.237176v113.784471c0 15.058824-5.722353 29.515294-15.902118 40.237176a53.007059 53.007059 0 0 1-38.309647 16.624941H108.423529v-227.568941h108.42353z m758.964706 227.568941h-108.42353a53.007059 53.007059 0 0 1-38.309647-16.685176 58.368 58.368 0 0 1-15.902117-40.176941v-113.844706c0-15.058824 5.722353-29.515294 15.902117-40.176941a52.946824 52.946824 0 0 1 38.309647-16.685177h108.42353v227.568941z"})}));i.displayName="CustomerServiceIcon";var l=n(91405),o=n(9238),c=n(51025),d=n(53951),u=n(66960),m=n(59502),f=n(62564),h=n(93924),p=n(83125);function x(){let{$t:e}=(0,u.B)(),{bonusDialogOpen:t,grantsBalance:n,closeBonusDialog:a,finalSubmit:s}=(0,f.Q)();return(0,r.jsx)(d.Dialog,{open:t,onOpenChange:e=>{e||a()},title:"",cancelText:e("Cancel"),okText:e("Confirm"),onCancel:a,onOk:()=>{a(),s(()=>{(0,h.toast)({title:e("Success_1"),type:"success"})})},bodyClassName:"mt-0",children:(0,r.jsxs)("div",{className:"flex flex-col items-center py-2",children:[(0,r.jsx)(p.Image,{src:"/monorepo/fund-coupon.png",alt:"bonus",width:128,height:128,className:"mb-2.5 size-32"}),(0,r.jsx)("div",{className:"text-t1 text-center text-base leading-6",children:null==n?void 0:n.message})]})})}
1var v=n(44031),g=n(70659),b=n(59749),j=n(90477),N=n(19490),y=n(50324),w=n(57032);function k(e,t,n,r,a){let s=e.filter(e=>e&&e.value===t)[0];!n&&s&&r.indexOf(s.status)>-1&&a({disabledProduct:s.value,status:s.status})}function _(e,t,n){n(e&&e.status!==w.u.AVAILABLE&&e.status!==w.u.SUSPEND_IN?{disabledProduct:e.value,status:e.status}:t&&t.status!==w.u.AVAILABLE&&t.status!==w.u.SUSPEND_OUT?{disabledProduct:t.value,status:t.status}:{disabledProduct:null,status:w.u.AVAILABLE})}let C=a.forwardRef((e,t)=>(0,r.jsx)(s.B,{ref:t,viewBox:"0 0 1024 1024",...e,children:(0,r.jsx)("path",{d:"M268.501333 140.501333a42.666667 42.666667 0 0 1 60.330667 0l170.666667 170.666667a42.666667 42.666667 0 0 1-60.330667 60.330667L341.333333 273.664V853.333333a42.666667 42.666667 0 1 1-85.333333 0V273.664L158.165333 371.498667a42.666667 42.666667 0 0 1-60.330666-60.330667l170.666666-170.666667zM682.666667 750.336V170.666667a42.666667 42.666667 0 1 1 85.333333 0v579.669333l97.834667-97.834667a42.666667 42.666667 0 0 1 60.330666 60.330667l-170.666666 170.666667a42.666667 42.666667 0 0 1-60.330667 0l-170.666667-170.666667a42.666667 42.666667 0 0 1 60.330667-60.330667L682.666667 750.336z"})}));C.displayName="ExchangeIcon";var S=n(31073);function D(e){let{options:t,value:n,onChange:s,disabled:i,loading:l,showStatus:o,statusFilter:c=[]}=e,{$t:d,locale:m}=(0,u.B)(),f=(0,a.useMemo)(()=>(0,y.ut)(d),[d]),h=t.find(e=>e.value===n),p=i||l||!t.length;return(0,r.jsx)("div",{className:"relative h-10",children:(0,r.jsxs)(S.Select,{locale:m,value:h?String(h.value):void 0,onValueChange:e=>{s(Number(e))},disabled:p,children:[(0,r.jsx)(S.SelectTrigger,{className:"text-t1 h-10 rounded-none border-none bg-transparent !px-0 py-2 text-left text-sm font-normal shadow-none focus:border-none focus:ring-0 data-[state=open]:border-none data-[state=open]:ring-0",children:(0,r.jsx)(S.SelectValue,{placeholder:d("Select")})}),(0,r.jsx)(S.SelectContent,{className:"max-h-[300px]",children:t.map(e=>{let t=o&&c.includes(e.status);return(0,r.jsx)(S.SelectItem,{value:String(e.value),className:"data-[state=checked]:text-p1 h-auto min-h-10 py-2.5",children:(0,r.jsxs)("span",{className:"flex w-full items-center justify-between gap-2",children:[(0,r.jsx)("span",{className:"truncate",children:e.label}),t?(0,r.jsx)("span",{className:"text-t3 text-xs",children:f[e.status]}):null]})},e.value)})})]})})}function A(){let{$t:e}=(0,u.B)(),t=(0,a.useMemo)(()=>(0,y.st)(e),[e]),n=(0,a.useMemo)(()=>(0,y.ut)(e),[e]),{values:s,customData:i,transferInfo:l,transferInfoLoading:o,updateValues:c,updateCustomData:d,fetchTransferInfo:m}=(0,f.Q)(),h=i.close?[]:function(e,t){let n=e.products||[],r=(0,y.st)(t);return n.map(e=>({label:r[e.id]||"Account ".concat(e.id),value:e.id,status:e.transferAvailable}))}(l||{},e),p=function(e,t){var n;if(!e.length)return 0;let r=e.find(e=>e&&e.value==t.fromProduct);return r?r.value:(null==(n=e[0])?void 0:n.value)||0}(h,s),x=h.filter(e=>e.value!==p),v=function(e,t){var n;if(!e.length)return 0;let r=e.find(e=>e&&e.value==t.toProduct);return r?r.value:(null==(n=e[0])?void 0:n.value)||0}(x,s);return(0,a.useEffect)(()=>{if(p&&(p!==s.fromProduct||v!==s.toProduct)&&!i.close){var e,t;c({fromProduct:p,toProduct:v,amount:null}),m({fromProduct:p,toProduct:v,amount:null}),k(h,p,null!=(e=i.disabledProduct)?e:null,[0,1],d),k(x,v,null!=(t=i.disabledProduct)?t:null,[0,2],d)}},[p,v,i.close]),(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"border-l1 rounded-md border px-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsxs)("div",{className:"flex flex-col justify-between py-3",children:[(0,r.jsx)("div",{className:"text-t3 mb-3 text-xs leading-[29px]",children:e("From_1")}),(0,r.jsx)("div",{className:"text-t3 text-xs leading-[29px]",children:e("To_1")})]}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)(D,{options:h,value:h.length>0?s.fromProduct:null,onChange:e=>{let t=s.toProduct;if(e===t){var n;t=(null==(n=h.filter(t=>t.value!==e)[0])?void 0:n.value)||t}_(h.find(t=>t.value===e),h.find(e=>e.value===t),d),c({fromProduct:e,toProduct:t,amount:null}),m({fromProduct:e,toProduct:t,amount:null})},disabled:!h[0],loading:o,showStatus:!0,statusFilter:[w.u.SUSPEND,w.u.SUSPEND_OUT]}),(0,r.jsx)("div",{className:"border-l1 mt-[3px] mb-[2px] border-b"}),(0,r.jsx)(D,{options:x,value:x.length>0?s.toProduct:null,onChange:e=>{_(h.find(e=>e.value===s.fromProduct),h.find(t=>t.value===e),d),c({toProduct:e,amount:null}),m({toProduct:e,amount:null})},disabled:!x[0],loading:o,showStatus:!0,statusFilter:[w.u.SUSPEND,w.u.SUSPEND_IN]})]}),(0,r.jsx)("div",{className:"flex md:pl-3.5",children:(0,r.jsx)("button",{type:"button",onClick:()=>{let e=s.toProduct,t=s.fromProduct;_(h.find(t=>t.value===e),h.find(e=>e.value===t),d),c({fromProduct:e,toProduct:t,amount:null}),m({fromProduct:e,toProduct:t,amount:null})},disabled:!h.length||o,className:(0,j.cn)("text-t1 flex items-center justify-center transition-colors disabled:cursor-not-allowed disabled:opacity-50"),children:(0,r.jsx)(C,{className:"hover:text-p1 size-4 cursor-pointer"})})})]}),i.disabledProduct&&(0,r.jsxs)("div",{className:"text-error border-t-l1 border-t py-2 text-xs",children:[t[i.disabledProduct]," ",n[i.status||0]]})]})})}function T(){var e,t,n;let a,{$t:s,locale:i}
1=(0,u.B)(),{values:l,customData:o,allAssets:c,updateValues:d,updateCustomData:m,fetchTransferInfo:h}=(0,f.Q)(),p="https://res.tapbit.mobi",x=(e=o.useSymbol||!1,t=l.fromSubProduct,n=l.toSubProduct,a=c||[],e&&(t||n)&&(a=(t||n).split("/")),a.map(e=>({label:e,value:e}))),v=x.find(e=>e.value===l.asset),g=o.assetDisabled||!x.length;return console.log("locale",i),(0,r.jsxs)("div",{className:"pt-4",children:[(0,r.jsx)("span",{className:"text-t3 mb-2 block text-xs",children:s("Coin")}),(0,r.jsxs)(S.Select,{locale:i,value:null==v?void 0:v.value,onValueChange:e=>{d({asset:e,fromSubProduct:"",toSubProduct:"",amount:null}),m({disabledProduct:null}),h({asset:e,fromSubProduct:"",toSubProduct:"",amount:null})},disabled:g,children:[(0,r.jsx)(S.SelectTrigger,{className:"bg-button h-10 rounded-md px-3 text-sm font-medium focus:ring-0 data-[state=open]:ring-0 md:h-12",children:v?(0,r.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,r.jsx)("img",{src:"".concat(p,"/resource-upload/").concat(v.value,".png"),alt:v.label,className:"size-7 rounded-full",onError:e=>{e.currentTarget.style.display="none"}}),(0,r.jsx)("span",{className:"truncate",children:v.label})]}):(0,r.jsx)("span",{className:"text-t3 text-sm",children:s("Select")})}),(0,r.jsx)(S.SelectContent,{className:"max-h-[300px]",children:x.map(e=>(0,r.jsx)(S.SelectItem,{value:e.value,children:(0,r.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,r.jsx)("img",{src:"".concat(p,"/resource-upload/").concat(e.value,".png"),alt:e.label,className:"size-7 rounded-full",onError:e=>{e.currentTarget.style.display="none"}}),(0,r.jsx)("span",{className:"truncate",children:e.label})]})},e.value))})]})]})}var P=n(47776),E=n(55872);function L(e){let{options:t,value:n,onChange:s,disabled:i,loading:l}=e,[o,c]=a.useState(!1),d=t.find(e=>e.value===n);return(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsxs)("button",{type:"button",disabled:i||l||!t.length,onClick:()=>c(!o),className:(0,j.cn)("text-t1 flex h-10 w-full items-center justify-between px-0 py-2 text-left text-sm transition-colors disabled:cursor-not-allowed disabled:opacity-50","focus:outline-none"),children:[(0,r.jsx)("span",{className:"text-sm leading-5",children:(null==d?void 0:d.label)||"Select"}),(0,r.jsx)(P.C,{className:(0,j.cn)("ml-2 size-4 transition-transform",o&&"rotate-180")})]}),o&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"fixed inset-0 z-40",onClick:()=>c(!1)}),(0,r.jsx)("div",{className:"bg-bg1 border-l1 absolute top-full right-0 left-0 z-50 mt-1 max-h-[300px] overflow-auto rounded-md border shadow-lg",children:t.map(e=>{let t=e.value===n;return(0,r.jsxs)("div",{onClick:()=>{s(e.value),c(!1)},className:(0,j.cn)("hover:bg-bg2 relative flex cursor-pointer items-center justify-between px-3 py-2.5",t&&"bg-bg2"),children:[(0,r.jsx)("span",{className:"text-t1 text-sm",children:e.label}),t&&(0,r.jsx)(E.S,{className:"size-4"})]},e.value)})})]})]})}function R(){let{$t:e}=(0,u.B)(),t=(0,b.e)(),{values:n,customData:s,transferInfo:i,loading:l,transferInfoLoading:o,grantsBalanceLoading:c,updateValues:d,fetchTransferInfo:m,checkAndSubmit:p}=(0,f.Q)(),x=((i||{}).marginSymbols||[]).map(e=>({label:e,value:e})),w=(null==i?void 0:i.marginProductId)||y.$E,k=(null==i?void 0:i.availableBalance)||"0",_=0>Number(k)?"--":k;(0,a.useEffect)(()=>{x.length>0&&function(e,t,n,r){if(!n[0])return;let a=n[0]?(n.find(t=>t&&t.value===e.fromSubProduct)||n[0]).value:e.fromSubProduct,s=n.filter(t=>t.value!==e.fromSubProduct),i=s[0]?(s.find(t=>t&&t.value===e.toSubProduct)||s[0]).value:e.toSubProduct;a&&e.fromProduct===t&&a!==e.fromSubProduct&&a.indexOf(e.asset)>-1&&r({fromSubProduct:a}),e.fromSubProduct&&e.fromProduct!==t&&r({fromSubProduct:""}),i&&e.toProduct===t&&i!==e.toSubProduct&&i.indexOf(e.asset)>-1&&r({toSubProduct:i}),e.toSubProduct&&e.toProduct!==t&&r({toSubProduct:""})}(n,w,x,e=>{d(e),m(e)})},[x.length,w,n.asset]);let C=()=>!o&&!c&&!l&&n.fromProduct&&n.toProduct&&Number(n.amount)>0&&Number(_)>=0&&!s.disabledProduct,S=e=>t=>{d({[e]:t,amount:null}),m({[e]:t,amount:null})};return(0,r.jsxs)("div",{className:"overflow-hidden",children:[(0,r.jsx)(A,{}),(0,r.jsx)(T,{}),(n.fromProduct===w||n.toProduct===w)&&(0,r.jsxs)("div",{className:"mt-6",children:[(0,r.jsx)("label",{className:"text-t2 mb-2 block text-xs",children:e("Trade pair")}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[n.fromProduct===w&&(0,r.jsx)("div",{className:"flex-1",children:(0,r.jsx)(L,{options:x,value:n.fromSubProduct,onChange:S("fromSubProduct"),disabled:!x.length,loading:o})}),n.fromProduct===w&&n.toProduct===w&&(0,r.jsx)("div",{className:"text-t3 px-2",children:e("To_1")}
1),n.toProduct===w&&(0,r.jsx)("div",{className:"flex-1",children:(0,r.jsx)(L,{options:x,value:n.toSubProduct,onChange:S("toSubProduct"),disabled:!x.length,loading:o})})]})]}),(0,r.jsxs)("div",{className:"relative mt-4",children:[(0,r.jsx)("label",{className:"text-t3 mb-2 block text-xs",children:e("Amount")}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(v.Input,{type:"text",size:"m",value:n.amount||"",onChange:e=>{let t=e.target.value;if(!t||/^\d*\.?\d*$/.test(t)){if(t.includes(".")){let e=t.split(".");if(e[1]&&e[1].length>8)return}if("--"!==_&&Number(t)>Number(_))return void d({amount:_});d({amount:t||null})}},placeholder:"0",className:"!md:h-12 !h-10 pr-32 text-sm",disabled:l}),(0,r.jsxs)("div",{className:"absolute top-1/2 right-3 flex -translate-y-1/2 items-center gap-3",children:[(0,r.jsx)("div",{className:"border-l1 text-t1 border-r pr-3 text-sm",children:n.asset}),(0,r.jsx)("button",{type:"button",onClick:()=>{"--"!==_&&d({amount:_})},disabled:!_||"--"===_||l,className:(0,j.cn)("text-p1-dark hover:text-p1/80 cursor-pointer text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50"),children:e("Max")})]})]}),(0,r.jsxs)("div",{className:"mt-2 flex items-center gap-1 text-xs",children:[(0,r.jsxs)("span",{className:"text-t3",children:[e("Availble"),":"]}),(0,r.jsx)("span",{className:"text-t1",children:N.Ay.toSeprator(_)||"--"}),(0,r.jsx)("span",{className:"text-t1",children:n.asset}),(0,r.jsx)("button",{type:"button",onClick:()=>window.location.href=t("/wallet/deposit?asset=".concat(n.asset)),className:"text-p1-dark hover:text-p1/80 ml-2 cursor-pointer transition-colors",children:e("Deposit")})]})]}),(0,r.jsx)("div",{className:"mt-s7",children:(0,r.jsx)(g.$,{variant:"primary",size:"m",className:"w-full text-base",disabled:!C()||l,onClick:()=>{C()&&p(()=>{(0,h.toast)({title:e("Success_1"),type:"success"})})},children:l?e("Loading...")||"Loading...":e("Confirm")})})]})}function I(){let{$t:e}=(0,u.B)(),{dialogOpen:t,closeDialog:n}=(0,f.Q)();return(0,m.s)("transfer_view",{page_type:"modal",modal_name:"transfer_modal"},{trigger:"active",active:t}),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.Dialog,{title:e("Transfer"),variant:"drawer",open:t,onOpenChange:e=>{e||n()},footer:!1,className:"md:w-105",bodyClassName:"!pt-0",children:(0,r.jsx)(R,{})}),(0,r.jsx)(x,{})]})}var z=n(98273),M=n(33162),O=n(18983),B=n(27737),F=n(2760),U=n(37566),V=n(74116),q=n(17391),H=n(59292),Q=n(97624),Y=n(78063),K=n(95432),W=n(90052),$=n(50697),J=n(4390),X=n(13847),G=n(122);function Z(e){return null==e||""===e}function ee(e){let{title:t,children:n=[]}=e,[s,i]=(0,a.useState)(!1),l=(0,a.useRef)(null),o=()=>{l.current&&(clearTimeout(l.current),l.current=null),s||(l.current=window.setTimeout(()=>i(!0),100))},c=()=>{d.current||(l.current&&clearTimeout(l.current),l.current=window.setTimeout(()=>i(!1),100))},d=(0,a.useRef)(!1);return(0,r.jsxs)(B.DropdownMenu,{open:s,onOpenChange:i,modal:!1,children:[(0,r.jsx)(B.DropdownMenuTrigger,{className:"px-3",asChild:!0,showIcon:!1,children:(0,r.jsxs)("div",{className:"gap-s2 group flex h-full cursor-pointer items-center",onMouseEnter:o,onMouseLeave:c,children:[(0,r.jsx)("div",{className:"text-t1 text-sm font-medium",children:t}),(0,r.jsx)(P.C,{className:"text-t1 size-3 shrink-0 opacity-50 transition-transform duration-200 group-data-[state=open]:rotate-180"})]})}),(0,r.jsx)(B.DropdownMenuContent,{className:"z-250 !py-0",side:"bottom",align:"end",onMouseEnter:o,onMouseLeave:c,children:(0,r.jsx)(et,{onSelectOpenChange:e=>{d.current=e},onVisibleChange:i,children:n})})]})}function et(e){var t,n;let{onSelectOpenChange:s,onVisibleChange:i,children:l=[]}=e,{$t:o}=(0,u.B)();(0,U.td)();let c=l.slice(0,-1),{isBalanceVisible:d,valuationAsset:m,isDisplayPrefsReady:f,setBalanceVisible:h,setValuationAsset:p}=(0,F.B)(),[x,v]=(0,a.useState)({}),[g,b]=(0,a.useState)({}),j=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"BTC/USDT";return(0,J.useQuery)({queryKey:["fetchAssetsRate",e],staleTime:5e3,queryFn:()=>H.request.get("/market/v2/tradepair/single/quote",{params:{tradePairName:e}})})}(),y=null!=(n=null==j||null==(t=j.data)?void 0:t.data)?n:{},w=(0,K.s)(g,m);return(0,a.useEffect)(()=>{f&&((0,Y.Yj)()?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"USDT",t=arguments.length>1?arguments[1]:void 0;H.request.get("/api/exchange-account-center-api/asset/totalPreestimate",{params:{valuationAsset:e}}).then(e=>{if(e&&200===e.code){let n=e.data||{};null==t||t(n)}}).catch(e=>{console.log(e)})}(m,b):b({}))},[f,m]),(0,a.useEffect)(()=>{(0,Y.Yj)()?H.request.get("/api/usdt-rouse-api/bonus/pending/deposit/list").then(e=>{var t;e&&(null==e?void 0:e.code)===200&&(null==(t=e.data)?void 0:t.length)>0?v(e.data[0]||{}):v({})}).catch(e=>{console.log(e)}):v({})},[]),(0,r.jsxs)("div",{className:"min-w-[320px]",children:[(0,r.jsxs)("div",{className:"p-4 pb-[14px]",children:[(0,r.jsxs)("div",{className:"text-t2 mb-1 flex items-center",children:[(0,r.jsx)("div",{className:"text-t2 text-sm leading-4 font-medium",children:o("Total Value")}),(0,r.jsx)("button",{type:"button",className:"hover:text-t1 ml-1 cursor-pointer",onClick:()=>{h(!d)},children:d?(0,r.jsx)(M.c,{className:"size-4"}):(0,r.jsx)(O.b,{className:"size-4"})})]}),(0,r.jsxs)("div",{className:"text-t1 mb-1 flex items-center",children:[(0,r.jsx)("div",{className:"text-t1 text-xl leading-[26px] font-semibold",children:(e=>d?(0,N.ej)(e,"BTC"===m?8:2):"******")(w)}),(0,r.jsxs)(S.Select,{value:m,onOpenChange:s,onValueChange:e=>{b({}),(0,Y.Yj)(),p("BTC"===e?"BTC":"USDT")},children:[(0,r.jsx)(S.SelectTrigger,{className:"text-t1 focus: ml-2 h-[26px] w-[80px] border-none bg-transparent !ring-transparent",children:(0,r.jsx)(S.SelectValue,{})}),(0,r.jsxs)(S.SelectContent,{className:"z-250",children:[(0,r.jsx)(S.SelectItem,{value:"BTC",children:"BTC"}),(0,r.jsx)(S.SelectItem,{value:"USDT",children:"USDT"})]})]})]}),(0,r.jsx)("div",{className:"text-t2 text-sm leading-4",children:(e=>{if(!d)return"******";let t=function(e,t,n){if(Z(e))return;if("USDT"===t)return e;if(Z(n))return;let r=Number(e),a=Number(n);if(Number.isFinite(r)&&Number.isFinite(a)&&0!==a)return new G.A(e).mul(n).toFixed(8,G.A.ROUND_FLOOR)}(e,m,y.n);return void 0===t?"--":(0,r.jsx)(W.b,{precision:4,prefix:"â",usdt:t})})(w)})]}),(0,r.jsx)(en,{onVisibleChange:i,couponBankInfo:x}),c.map((e,t)=>(0,r.jsx)(X.t,{children:e.map((e,t)=>(0,r.jsx)(X.q,{title:e.title,href:e.href,icon:e.icon,trackingTabName:e.trackingTabName},t))},t))]})}function en(e){let{type:t="dropdown",onVisibleChange:n=()=>{},couponBankInfo:a={}}=e,{$t:s}=(0,u.B)(),i=(0,U.td)(),l=(0,b.e)(),o=(0,V.W)(),c=e=>{o(e)};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"text-t1 flex ".concat("drawer"===t?"border-b-0":""),children:[(0,r.jsxs)("div",{className:"hover:bg-bg2 flex min-w-[80px] flex-1 cursor-pointer flex-col items-center justify-center gap-3 p-4 hover:rounded",onClick:()=>{c("deposit"),(0,q.gO)("home"),window.location.href="".concat(window.location.origin).concat(l())},children:[(0,r.jsx)(z.YY,{className:"h-6 w-6"}),(0,r.jsx)("div",{className:"text-t1 text-mm14",children:s("Deposit")})]}),(0,r.jsxs)("div",{className:"hover:bg-bg2 flex min-w-[80px] flex-1 cursor-pointer flex-col items-center justify-center gap-3 p-4 hover:rounded",onClick:()=>{c("withdraw"),window.location.href=i()},children:[(0,r.jsx)(z.qA,{className:"h-6 w-6"}),(0,r.jsx)("div",{className:"text-t1 text-mm14",children:s("Withdraw")})]}),(0,r.jsxs)("div",{className:"hover:bg-bg2 flex min-w-[80px] flex-1 cursor-pointer flex-col items-center justify-center gap-3 p-4 hover:rounded",onClick:()=>{c("transfer");let e=0;"drawer"===t&&(e=300),setTimeout(()=>{(0,$.F9)({values:{asset:"USDT",fromProduct:y.X9.spot,toProduct:y.X9.futures_usdt},onSuccess:()=>window.location.reload()})},e),n(!1)},children:[(0,r.jsx)(z.qR,{className:"h-6 w-6"}),(0,r.jsx)("div",{className:"text-t1 text-mm14",children:s("Transfer")})]})]}),parseInt((null==a?void 0:a.couponAmount)||"0")>0&&(0,r.jsx)("div",{className:"px-3 pb-3",children:(0,r.jsxs)("div",{className:"bg-p4/12 mt-1.5 flex cursor-pointer items-center gap-3 rounded-lg p-3 font-medium",onClick:()=>{c("deposit"),(0,q.gO)("home"),window.location.href=l()},children:[(0,r.jsx)("img",{src:"https://cdn.tapbit.mobi/mobile/coupons/reward.png",width:34,he
1ight:32,alt:"reward"}),(0,r.jsx)("div",{className:"text-t1 leading-[18px]",dangerouslySetInnerHTML:{__html:(0,Q.p)(s("Up to <span>{1}</span> back",{1:"".concat(null==a?void 0:a.couponAmount," USDT")}))}})]})})]})}var er=n(91038),ea=n(327);let es=a.forwardRef((e,t)=>(0,r.jsx)(s.B,{ref:t,viewBox:"0 0 1066 1024",...e,children:(0,r.jsx)("path",{d:"M306.901333 130.133333A298.666667 298.666667 0 0 1 816.768 341.333333c0 124.288 31.232 206.677333 64 259.285334l0.469333 0.810666c15.232 24.490667 27.306667 43.861333 35.413334 57.984 4.096 7.04 7.808 13.866667 10.538666 19.882667 1.365333 3.029333 2.901333 6.741333 4.096 10.752 0.981333 3.370667 2.901333 10.496 2.176 19.2-0.469333 5.802667-1.664 15.786667-7.381333 26.069333a63.232 63.232 0 0 1-18.261333 20.053334c-10.666667 7.936-22.954667 9.770667-27.050667 10.368h-0.170667a197.034667 197.034667 0 0 1-20.650666 1.706666c-14.293333 0.554667-34.133333 0.554667-58.709334 0.554667H234.965333c-24.618667 0-44.416 0-58.752-0.554667a197.034667 197.034667 0 0 1-20.608-1.706666h-0.170666a59.946667 59.946667 0 0 1-27.050667-10.325334 63.146667 63.146667 0 0 1-18.261333-20.053333 63.232 63.232 0 0 1-7.381334-26.154667c-0.725333-8.661333 1.152-15.786667 2.133334-19.157333 1.237333-4.010667 2.773333-7.68 4.138666-10.709333a241.493333 241.493333 0 0 1 10.496-19.925334c8.106667-14.08 20.181333-33.493333 35.413334-57.984l0.512-0.810666c32.768-52.608 64-134.997333 64-259.285334a298.666667 298.666667 0 0 1 87.466666-211.2z m211.2-2.133333a213.333333 213.333333 0 0 0-213.333333 213.333333c0 139.434667-35.285333 237.568-76.842667 304.384-9.088 14.592-16.64 26.752-22.869333 36.906667l30.976 0.042667h564.138667l30.976-0.042667c-6.186667-10.154667-13.781333-22.314667-22.869334-36.906667-41.557333-66.816-76.842667-164.949333-76.842666-304.384a213.333333 213.333333 0 0 0-213.333334-213.333333zM373.205333 867.754667a42.666667 42.666667 0 0 1 60.245334-3.754667c22.613333 19.968 52.138667 32 84.650666 32 32.469333 0 62.037333-12.032 84.650667-32a42.666667 42.666667 0 1 1 56.448 64A212.650667 212.650667 0 0 1 518.101333 981.333333a212.650667 212.650667 0 0 1-141.141333-53.333333 42.666667 42.666667 0 0 1-3.754667-60.245333z"})}));es.displayName="BellIcon";var ei=n(19125),el=n(78202),eo=n(40654),ec=n(11038),ed=n(6378);let eu=(0,el.RJ)();function em(){let[e,t]=(0,a.useState)(!1),[n,s]=(0,a.useState)(!1),i=(0,a.useRef)(null),{messageList:l}=(0,ec.oz)();(0,m.s)("notifications_home_view",eu,{trigger:"active",active:n});let o=(0,ed.MS)(),d=(0,a.useMemo)(()=>o.map(e=>{let t=l.find(t=>t.type===e.type)||null;return{type:e.type,title:e.title,href:e.href,icon:e.icon,trackingTabName:e.trackingTabName,list:(null==t?void 0:t.list)||[]}}),[l,o]),{user:u}=(0,c.k)(),f=null==u?void 0:u.userId;return(0,a.useEffect)(()=>{null==l||l.forEach(e=>{var t,n;(0,eo.zX)({firstCreateTime:null==(n=e.list)||null==(t=n[0])?void 0:t.createTime,type:e.type,userId:f})})},[l,f]),(0,a.useEffect)(()=>(i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{t(o.some(e=>(0,eo.Je)(e.type,f)))},100),()=>{i.current&&(clearTimeout(i.current),i.current=null)}),[l,o,f]),(0,r.jsxs)(B.DropdownMenu,{trigger:"hover",onOpenChange:s,children:[(0,r.jsx)(B.DropdownMenuTrigger,{asChild:!0,showIcon:!1,children:(0,r.jsx)("div",{className:"flex items-center px-3",children:(0,r.jsxs)("div",{className:"relative h-6 cursor-pointer",children:[(0,r.jsx)(es,{className:"text-t1 h-full w-6"}),e&&(0,r.jsx)("i",{className:"bg-p3 absolute -top-0.5 -right-0.5 h-2 w-2 rounded-full"})]})})}),(0,r.jsx)(B.DropdownMenuContent,{className:(0,j.cn)("rounded-r3 bg-bg4 shadow-2 z-250 p-0 !py-0","w-[clamp(200px,32vw,400px)]"),"data-testid":"navbar-message-dropdown-content",side:"bottom",align:"end",children:(0,r.jsx)(eh,{messageList:d})})]})}function ef(e){let{icon:t,item:n,title:a,type:s,href:i,trackingTabName:l}=e,{$t:o}=(0,u.B)(),d=(0,ei.q)(),m=(0,V.W)(),{user:f}=(0,c.k)(),h=null==f?void 0:f.userId,p=!!n,x=(null==n?void 0:n.body)||(null==n?void 0:n.title)||o("No Record"),v=(null==n?void 0:n.createTime)?(0,N.yS)({value:n.createTime,type:"datetime"}):"",g=(0,eo.Je)(s,h),b=()=>{(0,el.B)((0,el.DU)(s)),l&&m(l),(0,eo.Og)({firstCreateTime:null==n?void 0:n.createTime,type:s,userId:h}),setTimeout(()=>{window.location.href=d(i)},0)};return(0,r.jsxs)("div",{role:"button",tabIndex:0,onClick:b,onKeyDown:e=>
1{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),b())},className:(0,j.cn)("bg-bg4 hover:bg-bg2 focus-visible:bg-bg2 flex w-full cursor-pointer items-start gap-3 px-4 py-4 text-left transition-colors focus-visible:outline-none"),children:[(0,r.jsx)("div",{className:"shrink-0 overflow-hidden",children:t?(0,r.jsx)(t,{className:"text-t1 h-5 w-5"}):null}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col items-start justify-center gap-1",children:[(0,r.jsxs)("div",{className:"flex items-start gap-1",children:[(0,r.jsx)("p",{className:"text-t1 text-sm leading-[1.4] font-medium whitespace-nowrap",children:a}),g?(0,r.jsx)("i",{className:"bg-p3 mt-[6px] h-2 w-2 shrink-0 rounded-full"}):null]}),p?(0,r.jsxs)("p",{className:"text-t2 line-clamp-2 min-w-0 text-xs leading-4 break-words",children:[x,(null==n?void 0:n.linkUrl)?(0,r.jsx)("a",{className:"text-p1-dark ml-1 inline-block text-xs leading-[14px] font-normal whitespace-nowrap",href:n.linkUrl,target:"_blank",rel:"noreferrer",onClick:e=>{e.preventDefault(),e.stopPropagation(),(null==n?void 0:n.linkUrl)&&((0,el.B)((0,el.DU)(s)),window.open(n.linkUrl,"_blank","noreferrer"))},children:o("View details")}):null]}):(0,r.jsx)("p",{className:"text-t2 text-xs leading-4",children:x}),v?(0,r.jsx)("p",{className:"text-t3 text-xs leading-4 whitespace-nowrap",children:v}):null]})]})}let eh=e=>{let{messageList:t=[]}=e;return(0,r.jsx)("div",{className:"overflow-hidden",children:t.map(e=>{var t;let n=(null==(t=e.list)?void 0:t[0])||null;return(0,r.jsx)(ef,{...e,item:n},e.type)})})};var ep=n(52279);function ex(e){let{title:t,children:n=[]}=e;return(0,r.jsxs)(B.DropdownMenu,{trigger:"hover",children:[(0,r.jsx)(B.DropdownMenuTrigger,{asChild:!0,showIcon:!0,children:(0,r.jsx)("div",{className:"group flex h-full cursor-pointer items-center",children:(0,r.jsx)("div",{className:"text-t1 text-sm font-medium",children:t})})}),(0,r.jsx)(B.DropdownMenuContent,{className:"z-250 !py-0",side:"bottom",align:"end",children:(0,r.jsx)(ev,{children:n})})]})}let ev=e=>{let{children:t=[]}=e;return(0,r.jsx)("div",{className:"max-w-[400px] min-w-[200px]",children:t.map((e,t)=>(0,r.jsx)("div",{className:"border-l1 border-b last:border-b-0",children:e.map((e,t)=>(0,r.jsx)(X.q,{title:e.title,href:e.href,icon:e.icon,trackingTabName:e.trackingTabName},t))},t))})};var eg=n(18393),eb=n(7370),ej=n(37745),eN=n(84980),ey=n(46540),ew=n(94763),ek=n(27966),e_=n(12256);let eC=(0,a.createContext)(null);function eS(e){let{children:t}=e,[n,s]=(0,a.useState)(!1),[i,l]=(0,a.useState)(""),o=(0,a.useCallback)(e=>{l(e||""),s(!0)},[]),c=(0,a.useCallback)(()=>s(!1),[]),d=(0,a.useMemo)(()=>({open:n,defaultName:i,openWithName:o,close:c}),[n,i,o,c]);return(0,r.jsxs)(eC.Provider,{value:d,children:[t,(0,r.jsx)(e_.A,{open:n,onOpenChange:s,defaultName:i})]})}var eD=n(92141),eA=n(45467);function eT(e){let{userMenus:t,logoutMenus:n}=e;return(0,r.jsxs)(B.DropdownMenu,{trigger:"hover",children:[(0,r.jsx)(B.DropdownMenuTrigger,{asChild:!0,showIcon:!1,children:(0,r.jsx)("div",{className:"group flex h-full cursor-pointer items-center px-3",children:(0,r.jsx)(p.Image,{className:"h-6 !max-w-6",width:24,height:24,dpi:2,src:"/next-web/common/avatar-new.png",alt:"avatar",unoptimized:!0})})}),(0,r.jsx)(B.DropdownMenuContent,{className:"z-250 !py-0",side:"bottom",align:"end",children:(0,r.jsx)(eE,{userMenus:t,logoutMenus:n})})]})}function eP(e){var t;let{navbarWallet:n,navbarOrders:s,userMenus:i,logoutMenus:o}=e,{$t:c}=(0,u.B)(),d=(0,l.no)(),[m,f]=(0,a.useState)(!1),h=e=>(null==e?void 0:e.length)>0?e.reduce((e,t)=>e.concat(t),[]):[],x=[{title:c("Profile"),children:i}],v=[{...n,children:h((null==n||null==(t=n.children)?void 0:t.slice(0,-1))||[])},{...s,children:h((null==s?void 0:s.children)||[])}];if(d){let e=h(n.children.slice(0,-1)).filter(e=>e.mobileVisible);v=[{...n,children:e}]}let g=e=>{f(e)};return(0,r.jsx)(eN.Drawer,{className:"!w-full",open:m,onOpenChange:g,direction:"right",showClose:!1,bodyClassName:"!px-4 !pt-6",hideHeader:!0,trigger:(0,r.jsx)(p.Image,{className:"cursor-pointer",width:24,height:24,dpi:2,src:"/next-web/common/avatar-new.png",alt:"avatar",unoptimized:!0}),children:(0,r.jsxs)("div",{className:"flex flex-col pb-12",children:[(0,r.jsx)(eA.A,{onClose:()=>g(!1)}),(0,r.jsxs)("div",{className:"mt-4 flex flex-col",children:[(0,r.jsx)(eL,{type:"drawer",onVisibleChange:g}),(0,r.jsx)(en,{type:"drawer",onVisibleChange:g}),(0,r.jsx)("div",{className:"py-2",children:(0,r.jsx)("div",{className:"bg-l1 h-px"})}
1),!d&&(0,r.jsx)(eD.Ay,{menus:x}),(0,r.jsx)(eD.Ay,{menus:v}),(0,r.jsx)(eD.Ay,{menus:o})]})]})})}function eE(e){let{userMenus:t,logoutMenus:n}=e;return(0,r.jsxs)("div",{className:"min-w-[280px]",children:[(0,r.jsx)(eL,{}),(0,r.jsx)(X.t,{children:t.map((e,t)=>(0,r.jsx)(X.q,{...e},t))}),(0,r.jsx)(X.t,{children:n.map((e,t)=>(0,r.jsx)(X.q,{...e},t))})]})}function eL(e){let{type:t="dropdown",onVisibleChange:n=()=>{}}=e,{$t:s}=(0,u.B)(),{user:i}=(0,c.k)(),{personalCenterMenu:l={}}=(0,ek.e7)(e=>e.navbarActivityConfig)||{},{vipLevel:o,newNickName:d,nickNameStatus:m}=i||{},{openWithName:f}=function(){let e=(0,a.useContext)(eC);if(!e)throw Error("useEditNickName must be used within EditNickNameProvider");return e}(),x=(0,ei.q)(),v=(0,V.W)();return(0,r.jsxs)("div",{className:"".concat("drawer"===t?"border-b-0 py-4":"border-b border-l1 p-4"),children:[(0,r.jsx)("div",{className:"text-t1 mb-s3 flex items-center",children:(0,r.jsxs)("div",{className:"text-t1 text-xl leading-[26px] font-semibold",children:[s("Hi"),", ",null==i?void 0:i.currentNickName]})}),(0,r.jsxs)("div",{className:"mb-s3 flex items-center",children:[(0,r.jsx)(p.Image,{onClick:e=>{e.stopPropagation(),v("portfolio_vip",{afterTrack:()=>window.location.href=x("/vip")})},className:"cursor-pointer",width:46,height:20,dpi:2,src:"/monorepo/vip-".concat((e=>{switch(e){case 0:default:return"0";case 1:return"1";case 2:return"2";case 3:return"3";case 4:return"4";case 5:return"5"}})(o||0),".png"),alt:"vip",unoptimized:!0}),(0,r.jsxs)("div",{className:"text-t3 ml-2 text-sm leading-5",children:["UID: ",(null==i?void 0:i.displayUserId)||""]}),(0,r.jsx)(eg.T,{className:"text-t3 hover:text-t1 ml-2 h-4 w-4 cursor-pointer",onClick:()=>{var e;return e=(null==i?void 0:i.displayUserId)||"",void(navigator.clipboard.writeText(e||""),(0,h.toast)({type:"success",title:s("Success")}))}})]}),(0,r.jsxs)("div",{className:"flex min-h-5 items-center",children:[(0,r.jsxs)("div",{className:"text-t3 text-sm leading-4",children:[s("Nickname"),": ",(null==i?void 0:i.nickNameStatus)===0?null==i?void 0:i.newNickName:(null==i?void 0:i.currentNickName)||""]}),(0,r.jsx)(eb.q,{className:"text-t3 hover:text-t1 ml-2 h-4 w-4 cursor-pointer",onClick:()=>{if((null==i?void 0:i.nickNameStatus)===0)return void(0,h.toast)({type:"error",title:s("Your submitted nickname is under review. Please wait for the results.")});n(!1),f((null==i?void 0:i.currentNickName)||"")}}),0===m&&(0,r.jsx)(ey.Tooltip,{content:(0,r.jsx)("div",{className:"text-t1 text-xs",children:s('Your nickname modification "{0}" is currently under review.',{0:d})}),children:(0,r.jsx)("span",{className:"text-p4 bg-p4/10 ml-2 rounded-[10px] px-2 text-xs leading-5 font-normal",children:s("Review")})}),2===m&&(0,r.jsx)(ey.Tooltip,{content:(0,r.jsx)("div",{className:"text-t1 text-xs",children:s('Your attempt to change the nickname "{0}" has failed because it contains sensitive words.',{0:d})}),children:(0,r.jsx)("span",{className:"text-p3 bg-p3/10 ml-2 rounded-[10px] px-2 text-xs leading-5 font-normal",children:s("Failed")})})]}),l.enabled&&(0,r.jsxs)("a",{className:"bg-p1/10 mt-3 flex cursor-pointer items-center rounded-lg px-2.5 py-3",href:l.menuUrl,children:[(0,r.jsx)(p.Image,{width:32,height:32,dpi:2,src:"/common/navbar/0fee-light.png",alt:"0 Fee Rewards",unoptimized:!0,className:"dark:hidden"}),(0,r.jsx)(p.Image,{width:32,height:32,dpi:2,src:"/common/navbar/0fee-dark.png",alt:"0 Fee Rewards",unoptimized:!0,className:"hidden dark:block","aria-hidden":"true"}),(0,r.jsx)("span",{className:"text-t1 ml-0.5 flex-1 text-sm font-medium",children:l.menuName}),(0,r.jsx)(ej.f,{className:"text-p4 h-6 w-6"})]})]})}let eR=e=>{let{type:t="dropdown",navbarWallet:n,navbarOrders:a}=e,{$t:s,locale:i}=(0,u.B)(),l=(0,ei.q)(),o=(0,ew.IO)(),{logout:d,user:m}=(0,c.k)(),f=(null==m?void 0:m.kyc)===!0,h=[{icon:z.OR,title:s("Security Center"),href:l("/security")},{icon:z.dt,title:s("ID Verification"),href:l("/settings/profile"),afterNode:function(e,t){switch(e){case"-1":default:return(0,r.jsx)("div",{className:"bg-p4/10 text-p4 ml-auto flex h-5 shrink-0 items-center justify-center rounded-full px-2 text-xs leading-5",children:t("Unverified")});case"1":case"10":return(0,r.jsx)("div",{className:"bg-p4/10 text-p4 ml-auto flex h-5 shrink-0 items-center justify-center rounded-full px-2 text-xs leading-5",children:t("Pending")});case"9":return(0,r.jsx)("div",{className:"bg-p3/10 text-p3 ml-auto flex h-5 shrink-0 items-center justify-center rounded-full px-2 text-xs leading-5",children:t("Failed")});case"2":return(0,r.jsx)("div",{className:"bg-p2/10 text-p2 ml-auto flex h-5 shrink-0 items-center justify-center rounded-full px-2 text-xs leading-5",children:t("Verified")})}}((null==m?void 0:m.kycStatus)+"",s)},...f?[{icon:z.Wt,title:s("Proof of Identity"),href:l("/proof-identity")}]:[],{icon:z.TJ,title:s("Invite Friends"),href:l("/invitation")},{icon:z.KP,title:s("Coupon Center"),href:o()},{icon:z.yA,title:s("Trading Fees & VOL"),href:"/fees",linkType:"internal"},{icon:z.G9,title:s("Notification Setting"),href:"/".concat(i,"/promotion/mail-promotion")},{icon:z.hx,title:s("API Management"),href:l("/settings/api")}],p=[{icon:z.TC,title:s("Log out"),handleClick:()=>x()}],x=()=>{d()};return"drawer"===t?(0,r.jsx)(eP,{navbarWallet:n,navbarOrders:a,userMenus:h,logoutMenus:p}):(0,r.jsx)(eT,{userMenus:h,logoutMenus:p})};function eI(e){let{navbarWallet:t,navbarOrders:n}=e,a=(0,c.k)(e=>e.user),s=!!(null==a?void 0:a.userId),d=(0,l.a9)();return(0,r.jsxs)(eS,{children:[(0,r.jsxs)("div",{className:"flex h-full items-center",children:[s?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"hidden lg:block",children:(0,r.jsxs)("div",{className:"flex h-full items-center leading-6",children:[(0,r.jsx)(ee,{...t}),(0,r.jsx)(ex,{...n})]})}),(0,r.jsxs)("div",{className:"gap-s4 flex h-full items-center leading-6 ".concat(d?"":"lg:ml-3"),children:[(0,r.jsx)(i,{className:"text-t1 h-[18px] w-[18px] curs
1or-pointer lg:hidden",onClick:o.U9}),(0,r.jsx)(eR,{type:d?"dropdown":"drawer",navbarWallet:t,navbarOrders:n})]}),(0,r.jsx)("div",{className:"hidden lg:block",children:(0,r.jsx)("div",{className:"flex h-full items-center leading-6",children:(0,r.jsx)(em,{})})})]}):null,(0,r.jsx)("div",{className:"block md:hidden lg:hidden",children:(0,r.jsx)("div",{className:"flex h-full items-center leading-6",children:(0,r.jsx)(ep.A,{isLoggedIn:s})})}),(0,r.jsx)("div",{className:"hidden md:block lg:hidden",children:(0,r.jsxs)("div",{className:"flex h-full items-center leading-6",children:[(0,r.jsx)(er.A,{}),(0,r.jsx)(ep.A,{isLoggedIn:s})]})}),(0,r.jsx)("div",{className:"hidden md:hidden lg:block",children:(0,r.jsxs)("div",{className:"flex h-full items-center leading-6",children:[(0,r.jsx)(ea.A,{}),(0,r.jsx)(er.A,{})]})})]}),(0,r.jsx)(I,{})]})}},37745:(e,t,n)=>{n.d(t,{f:()=>i});var r=n(79237),a=n(38113),s=n(65375);let i=a.forwardRef((e,t)=>(0,r.jsx)(s.B,{ref:t,viewBox:"0 0 1024 1024",...e,children:(0,r.jsx)("path",{d:"M849.92 495.786667a42.666667 42.666667 0 0 0-8.96-14.08l-213.333333-213.333334a42.837333 42.837333 0 1 0-60.586667 60.586667l140.8 140.373333H213.333333a42.666667 42.666667 0 1 0 0 85.333334h494.506667l-140.8 140.373333a42.752 42.752 0 0 0 13.866667 69.973333 42.752 42.752 0 0 0 46.72-9.386666l213.333333-213.333334c3.882667-4.053333 6.912-8.832 8.96-14.08a42.666667 42.666667 0 0 0 0-32.426666z"})}));i.displayName="ArrowRightIcon"},40654:(e,t,n)=>{function r(){return window.localStorage}function a(e,t){var n;null==(n=r())||n.setItem(e,t)}function s(e){var t,n;return null!=(n=null==(t=r())?void 0:t.getItem(e))?n:null}function i(e,t){return"showmessage".concat(e).concat(t)}function l(e,t){return"message".concat(e).concat(t,"Time")}function o(e){let{config:t,firstCreateTime:n,userId:r}=e;a("".concat(t.showKey).concat(r),"0"),t.resetClearKeys.forEach(e=>{a("".concat(e).concat(r),"0")}),function(e,t){if(null==t)return;let n=Number(t),r=s(e),i=Number(r);(null===r||!Number.isFinite(i)||n>i)&&a(e,String(t))}("".concat(t.latestTimeKey).concat(r,"Time"),n),a("".concat(t.clearKey).concat(r),"1")}function c(e,t){t&&(a("".concat(e.showKey).concat(t),"0"),a("".concat(e.clearKey).concat(t),"1"))}function d(e){let{firstCreateTime:t,type:n,userId:r}=e;if(!r)return!1;let o=i(n,r),c="clearmessage".concat(n).concat(r),d=l(n,r);if(null==t)return a(o,"0"),!1;let u=s(d);if(!u)return a(o,"1"),!0;a(c,"0");let m=Number(t)>Number(u)&&"1"!==s(c);return a(o,m?"1":"0"),m}function u(e){let{firstCreateTime:t,type:n,userId:r}=e;r&&(a(i(n,r),"0"),a(l(n,r),void 0!==t?String(t):""))}function m(e,t){return!!t&&"1"===s(i(e,t))}n.d(t,{Je:()=>m,M_:()=>o,Og:()=>u,qY:()=>c,zX:()=>d})},48304:e=>{var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise(function(n,r){var a,s,i;function l(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",l),n([].slice.call(arguments))}p(e,t,o,{once:!0}),"error"!==t&&(a=e,s=l,i={once:!0},"function"==typeof a.on&&p(a,"error",s,i))})},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var i=10;function l(e){if("function"!=typeof e)throw TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function o(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function c(e,t,n,r){if(l(n),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),s=e._events),i=s[t]),void 0===i)i=s[t]=n,++e._eventsCount;else if("function"==typeof i?i=s[t]=r?[n,i]:[i,n]:r?i.unshift(n):i.push(n),(a=o(e))>0&&i.length>a&&!i.warned){i.warned=!0;var a,s,i,c=Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=i.length,console&&console.warn&&console.warn(c)}return e}function d(){if(!this.fired)return(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0==arguments.length)?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},a=d.bind(r);return a.listener=n,r.wrapFn=a,a}function m(e,t,n){var r=e._events;if(void 0===r)return[];var a=r[t];return void 0===a?[]:"function"==typeof a?n?[a.listener||a]:[a]:n?function(e){for(var t=Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(a):h(a,a.length)}function f(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function h(e,t){for(var n=Array(t),r=0;r<t;++r)n[r]=e[r];return n}function p(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else if("function"==typeof e.addEventListener)e.addEventListener(t,function a(s){r.once&&e.removeEventListener(t,a),n(s)});else throw TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return i},set:function(e){if("number"!=typeof e||e<0||a(e))throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");i=e}}),s.init=function(){(void 0===this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return o(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var a="error"===e,s=this._events;if(void 0!==s)a=a&&void 0===s.error;else if(!a)return!1;if(a){if(t.length>0&&(i=t[0]),i instanceof Error)throw i;var i,l=Error("Unhandled error."+(i?" ("+i.message+")":""));throw l.context=i,l}var o=s[e];if(void 0===o)return!1;if("function"==typeof o)r(o,this,t);else for(var c=o.length,d=h(o,c),n=0;n<c;++n)r(d[n],this,t);return!0},s.prototype.addListener=function(e,t){return c(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return c(this,e,t,!0)},s.prototype.once=function(e,t){return l(t),this.on(e,u(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,u(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,a,s,i;if(l(t),void 0===(r=this._events)||void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit
1("removeListener",e,n.listener||t));else if("function"!=typeof n){for(a=-1,s=n.length-1;s>=0;s--)if(n[s]===t||n[s].listener===t){i=n[s].listener,a=s;break}if(a<0)return this;0===a?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,a),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,i||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0==arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0==arguments.length){var a,s=Object.keys(n);for(r=0;r<s.length;++r)"removeListener"!==(a=s[r])&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return m(this,e,!0)},s.prototype.rawListeners=function(e){return m(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},s.prototype.listenerCount=f,s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},53678:(e,t,n)=>{n.d(t,{FT:()=>l,HY:()=>c,Ou:()=>u,R9:()=>m,Sv:()=>i,cz:()=>d});var r=n(79237),a=n(90477),s=n(4487);function i(e){let{className:t,...n}=e;return(0,r.jsx)("div",{"data-slot":"empty",className:(0,a.Q)("flex w-40 min-w-0 flex-1 flex-col items-center justify-center text-center",t),...n})}function l(e){let{className:t,...n}=e;return(0,r.jsx)("div",{"data-slot":"empty-header",className:(0,a.Q)("mt-s2 mb-s1 flex max-w-sm flex-col items-center gap-1 text-center",t),...n})}n(38113);let o=(0,s.F)("flex shrink-0 items-center justify-center rounded-lg backdrop-blur-[1.5px]",{variants:{size:{l:"h-30 w-30 rounded-md",m:"h-20 w-20 rounded"}},defaultVariants:{size:"m"}});function c(e){let{className:t,size:n="m",src:s,alt:i="empty",children:l,...c}=e;return l?(0,r.jsx)("div",{"data-slot":"empty-media","data-size":n,className:(0,a.Q)(o({size:n}),t),...c,children:l}):s?(0,r.jsx)("div",{"data-slot":"empty-media","data-size":n,className:(0,a.Q)(o({size:n}),t),...c,children:(0,r.jsx)("img",{src:s,alt:i,className:"h-full w-full object-contain"})}):null}function d(e){let{className:t,...n}=e;return(0,r.jsx)("div",{"data-slot":"empty-title",className:(0,a.Q)("text-t1 text-base leading-[1.4] font-semibold",t),...n})}function u(e){let{className:t,...n}=e;return(0,r.jsx)("p",{"data-slot":"empty-description",className:(0,a.Q)("mb-s4 text-t3 text-bm14",t),...n})}function m(e){let{description:t,className:n}=e;return(0,r.jsxs)(i,{className:n,children:[(0,r.jsx)(c,{size:"m",children:(0,r.jsx)("span",{"aria-hidden":"true",className:(0,a.Q)("block h-[100px] w-[100px]","bg-contain bg-center bg-no-repeat","bg-[url('https://cdn.tapbit.mobi/next-web/common/no-record.png')]")})}),(0,r.jsx)(u,{children:t})]})}},53951:(e,t,n)=>{n.r(t),n.d(t,{Dialog:()=>w,DialogClose:()=>p,DialogContent:()=>v,DialogDescription:()=>N,DialogFooter:()=>b,DialogHeader:()=>g,DialogOverlay:()=>x,DialogPortal:()=>h,DialogRoot:()=>m,DialogTitle:()=>j,DialogTrigger:()=>f});var r=n(79237),a=n(91405),s=n(90477),i=n(45056),l=n(12407),o=n(61058),c=n(38113),d=n(51924),u=n(70659);let m=i.bL,f=i.l9,h=i.ZL,p=i.bm,x=c.forwardRef((e,t)=>{let{className:n,...a}=e;return(0,r.jsx)(i.hJ,{ref:t,className:(0,s.Q)("bg-p6 fixed inset-0 z-300","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",n),...a})});x.displayName=i.hJ.displayName;let v=c.forwardRef((e,t)=>{let{className:n,children:a,style:l,overlayClassName:o,...c}=e;return(0,r.jsxs)(h,{children:[(0,r.jsx)(x,{className:o}),(0,r.jsx)(i.UC,{ref:t,style:l,className:(0,s.Q)("fixed top-[50%] left-[50%] z-300 translate-x-[-50%] translate-y-[-50%] outline-none","w-[420px] max-md:w-[calc(100vw-var(--spacing-s8)-var(--spacing-s8))] max-md:max-w-[420px]","flex flex-col","border-l1 bg-m1 p-s6 shadow-3 rounded-[12px] border","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",n),...c,children:a})]})});v.displayName=i.UC.displayName;let g=e=>{let{className:t,...n}=e;return(0,r.jsx)("div",{className:(0,s.Q)("gap-s4 flex flex-col",t),...n})};g.displayName="DialogHeader";let b=e=>{let{className:t,layout:n="horizontal",...a}=e;return(0,r.jsx)("div",{className:(0,s.Q)("gap-s2 flex w-full","horizontal"===n?"flex-row":"flex-col",t),...a})};b.displayName="DialogFooter";let j=c.forwardRef((e,t)=>
1{let{className:n,showClose:a=!0,onClose:l,children:o,...c}=e;return(0,r.jsxs)("div",{className:"gap-s6 flex items-center justify-between",children:[(0,r.jsx)(i.hE,{ref:t,className:(0,s.Q)("text-t1 text-tm18 flex-1",n),...c,children:o}),a&&(0,r.jsx)(p,{className:"flex h-[22px] cursor-pointer items-center justify-center px-0 py-[2px] focus:outline-none",onClick:l,children:(0,r.jsx)("div",{className:"flex items-center",children:(0,r.jsx)(d.U,{className:"text-t3 size-5"})})})]})});j.displayName=i.hE.displayName;let N=c.forwardRef((e,t)=>{let{className:n,...a}=e;return(0,r.jsx)(i.VY,{ref:t,className:(0,s.Q)("text-t2 text-b14",n),...a})});N.displayName=i.VY.displayName;let y=(0,l.default)(()=>Promise.all([n.e(2243),n.e(3447)]).then(n.bind(n,33447)),{loadableGenerated:{webpack:()=>[33447]},ssr:!1}),w=e=>{let{trigger:t,defaultOpen:n,open:i,onOpenChange:l,title:d,description:h,showClose:x=!0,okText:w,cancelText:k,onOk:_,onCancel:C,okButtonProps:S,cancelButtonProps:D,footerLayout:A,footer:T=null,children:P,onClose:E,className:L,hideHeader:R=!1,headerClassName:I,bodyClassName:z,footerClassName:M,preventOutsideClose:O=!1,preventEscapeClose:B=!1,variant:F="default",overlayClassName:U,onOpenAutoFocus:V}=e,q=(0,a.no)(),[H,Q]=c.useState(!1);c.useEffect(()=>{Q(!0)},[]);let[Y,K]=c.useState(null!=n&&n),W=void 0!==i,$=W?i:Y,J=W?l:e=>{K(e),null==l||l(e)},X=A||(w&&k?"horizontal":"single"),G="vertical"===X?"vertical":"horizontal",Z=!R&&(d||h||x),ee=(e,t,n,r,a)=>{let{className:i,onClick:l,variant:o,size:c,...d}=e||{};return{...d,variant:o||t,size:c||n,className:(0,s.Q)(r,i),onClick:((e,t)=>n=>{null==e||e(n),n.defaultPrevented||null==t||t()})(l,a)}};return"drawer"===F&&H&&q?(0,r.jsx)(y,{open:$,onOpenChange:J,trigger:t,title:d,description:h,showClose:x,okText:w,cancelText:k,onOk:_,onCancel:C,okButtonProps:S,cancelButtonProps:D,footerLayout:A,footer:T,onClose:E,className:L,hideHeader:R,headerClassName:I,bodyClassName:z,footerClassName:M,dismissible:!O,overlayClassName:U,children:P}):(0,r.jsxs)(m,{open:$,onOpenChange:J,children:[t&&(0,r.jsx)(f,{asChild:!0,children:t}),(0,r.jsxs)(v,{"aria-describedby":h?"dialog-description":void 0,className:L,overlayClassName:U,onOpenAutoFocus:V,onInteractOutside:e=>{O&&e.preventDefault()},onPointerDownOutside:e=>{O&&e.preventDefault()},onEscapeKeyDown:e=>{B&&e.preventDefault()},children:[Z?(0,r.jsxs)(g,{className:I,children:[(0,r.jsx)(j,{showClose:x,onClose:()=>{null==J||J(!1),null==E||E()},children:d}),h&&(0,r.jsx)(N,{children:h})]}):(0,r.jsx)(o.bL,{children:(0,r.jsx)(j,{showClose:x,children:d})}),P&&(0,r.jsx)("div",{className:(0,s.Q)(Z?"mt-s4":"mt-0",z),children:P}),(()=>{if(!1===T)return null;let e=T;return T||(e=(0,r.jsx)(b,{layout:G,children:"single"===X?(0,r.jsx)(r.Fragment,{children:w?(0,r.jsx)(u.$,{...ee(S,"primary","m","w-full",_),children:w}):k?(0,r.jsx)(p,{asChild:!0,children:(0,r.jsx)(u.$,{...ee(D,"secondary","m","w-full",C),children:k})}):null}):"vertical"===X?(0,r.jsxs)(r.Fragment,{children:[w&&(0,r.jsx)(u.$,{...ee(S,"primary","l","h-11 w-full md:h-12",_),children:w}),k&&(0,r.jsx)(p,{asChild:!0,children:(0,r.jsx)(u.$,{...ee(D,"white","l","text-t3 h-11 w-full border-none md:h-12",C),children:k})})]}):(0,r.jsxs)(r.Fragment,{children:[k&&(0,r.jsx)(p,{asChild:!0,children:(0,r.jsx)(u.$,{...ee(D,"secondary","m","h-10 flex-1",C),children:k})}),w&&(0,r.jsx)(u.$,{...ee(S,"primary","m",k?"h-10 flex-1":"h-10 w-full",_),children:w})]})})),(0,r.jsx)("div",{className:(0,s.Q)("mt-s7",M),children:e})})()]})]})};w.displayName="Dialog"}
1,78202:(e,t,n)=>{n.d(t,{B:()=>o,DU:()=>i,LY:()=>m,RJ:()=>l,Zm:()=>d,eD:()=>c,uA:()=>u});var r=n(13973);let a={system:"system",user:"my_message",trader:"copy_trade"},s={page_name:"notifications_home",page_type:"modal",modal_name:"notifications_home"};function i(e){return a[e]}function l(){return s}function o(e){(0,r.s)("notifications_home_click",{...s,element_name:e},{transport:"beacon"})}function c(e){return{page_name:"notifications_list",tab_name:a[e]}}function d(e){(0,r.s)("notifications_list_tab_click",{page_name:"notifications_list",tab_name:a[e]})}function u(e){var t,n;let{slug:r,item:s,pageNumber:i,position:l}=e;return{page_name:"notifications_list",tab_name:a[r],type:String(null!=(t=s.type)?t:""),sub_type:String(null!=(n=s.subType)?n:""),page_number:i,position:l}}function m(e){(0,r.s)("notifications_detail_click",u(e),{transport:"immediate"})}},90052:(e,t,n)=>{n.d(t,{A:()=>c,b:()=>o});var r=n(79237),a=n(19490),s=n(69534),i=n(34381),l=n(122);function o(e){let{usdt:t,precision:n=2,prefix:o="",...c}=e,{currencyRatesCurrent:d,currencyRatesList:u}=(0,i.cn)(),m=d||s.Ay.getItem("CURRENCY_RATES_CURRENT")||"USD",f=(u||[]).find(e=>e.name===m)||{};if(void 0===t||!f.rate)return"--";let h=new l.A("string"==typeof t?t:Number(t)),p=new l.A(f.rate);return(0,r.jsxs)("span",{...c,children:[o,"".concat(f.symbol||"").concat((0,a.iT)(h.mul(p).toFixed(n)))]})}let c=o},94763:(e,t,n)=>{n.d(t,{IO:()=>s});var r=n(19125),a=n(21083);function s(){let e=(0,r.q)();return(0,a.A)(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/coupon";return e(t)})}},95432:(e,t,n)=>{n.d(t,{s:()=>r});function r(e,t){var n;return"BTC"===t?null==e?void 0:e.btcTotalPreestimate:null!=(n=null==e?void 0:e.usdtTotalPreestimate)?n:null==e?void 0:e.btcTotalPreestimate}},97624:(e,t,n)=>{n.d(t,{p:()=>m,g:()=>f});var r=n(16851);let a=Symbol("dompurify-hooks-configured"),s=/^https?:\/\//i,i=new Set(["behavior","-moz-binding"]),l=/(?:expression\s*\(|(?:java|vb)script\s*:|url\s*\(|@import)/i,o={USE_PROFILES:{html:!0}},c=new Set(["tapbit.com","tapbit.mobi","vimeo.com","player.vimeo.com","youtube.com","youtube-nocookie.com"]),d={...o,ADD_TAGS:["iframe"],ADD_ATTR:["allow","allowfullscreen","frameborder","referrerpolicy"],RETURN_DOM:!0};function u(e){e[a]||(e.addHook("uponSanitizeAttribute",(e,t)=>{"a"===e.tagName.toLowerCase()&&"target"===t.attrName&&"_blank"===t.attrValue&&(t.forceKeepAttr=!0)}),e.addHook("afterSanitizeAttributes",e=>{if(!(e&&"object"==typeof e&&"getAttribute"in e&&"setAttribute"in e&&"removeAttribute"in e))return;let t=e.getAttribute("style");if(t){let n=function(e){let t=[];return e.split(";").forEach(e=>{let n=e.trim();if(!n)return;let[r,...a]=n.split(":");if(!r||0===a.length)return;let s=r.trim().toLowerCase(),o=a.join(":").trim();!o||i.has(s)||l.test(o)||t.push("".concat(s,": ").concat(o))}),t.join("; ")}(t);n?e.setAttribute("style",n):e.removeAttribute("style")}!function(e){var t;let n=e.getAttribute("href");if(!n){e.removeAttribute("target"),e.removeAttribute("rel");return}if("_blank"!==e.getAttribute("target")||!s.test(n))return;let r=new Set((null!=(t=e.getAttribute("rel"))?t:"").split(/\s+/).filter(Boolean));r.add("noopener"),r.add("noreferrer"),e.setAttribute("rel",Array.from(r).join(" "))}(e)}),e[a]=!0)}let m=function(e){return u(e),t=>t&&e.isSupported?e.sanitize(t,o):""}(r.A),f=function(e){return u(e),t=>{if(!t||!e.isSupported)return"";let n=e.sanitize(t,d);return Array.from(n.getElementsByTagName("a")).forEach(e=>{e.getAttribute("href")||function(e){let t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}}(e)}),Array.from(n.getElementsByTagName("img")).forEach(e=>{if(!e.getAttribute("src"))return void e.remove();e.getAttribute("loading")||e.setAttribute("loading","lazy"),e.getAttribute("decoding")||e.setAttribute("decoding","async")}),Array.from(n.getElementsByTagName("source")).forEach(e=>{e.getAttribute("src")||e.remove()}
1),Array.from(n.getElementsByTagName("iframe")).forEach(e=>{let t=e.getAttribute("src");if(!t||!function(e){try{let t=new URL(e);return/^https?:$/i.test(t.protocol)&&c.has(t.hostname.replace(/^www\./i,""))}catch(e){return!1}}(t))return void e.remove();e.getAttribute("loading")||e.setAttribute("loading","lazy"),e.getAttribute("referrerpolicy")||e.setAttribute("referrerpolicy","no-referrer")}),n.innerHTML}}(r.A)}}]);
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.