(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6469],{26364:function(e,t,n){"use strict";n.d(t,{$X:function(){return L},BB:function(){return p},FR:function(){return b},Jg:function(){return f},Qm:function(){return v},T9:function(){return O},TF:function(){return g},Y8:function(){return d},eg:function(){return S},lb:function(){return h}});var r,i,o,s,a,u=n(95533),c="",l={};"undefined"!=typeof window&&(a=window.location.hostname,c=window.location.protocol,l=window.__BYBIT_GLOBAL_CONFIG__||{});var h=/^[^.]+\.[^.]+\.[^.]+$/.test(a)||/^[^.]+\.[^.]+\.[^.]+\.(hk|uae|us|uk|jp|fr|de|au|ca|br|in|ru)$/.test(a),f=h&&/^[^.]*testnet[^.]*\./.test(a),p=h&&!f,d=!f&&!p,g=c,m=l.enableAutoman&&l.automan||{};m.AUTOMAN_RUNTIME_ENV;var v=m.AUTOMAN_API2_HOST,b=m.AUTOMAN_WS2_HOST,E=m.AUTOMAN_TMS_HOST,y=m.AUTOMAN_TMS_PATH,_=m.AUTOMAN_TMS_FULL_PATH,A=m.AUTOMAN_SERVICE_DOMAINS;m.AUTOMAN_APM_ENABLED,m.AUTOMAN_APM_URL,m.AUTOMAN_SENTRY_ENABLED,m.AUTOMAN_SENTRY_DSN,m.AUTOMAN_LOGGER_ENABLED,m.AUTOMAN_LOGGER_URL,m.AUTOMAN_METRIC_URL,m.AUTOMAN_METRIC_ENABLED,m.AUTOMAN_SENSORS_URL,m.AUTOMAN_SENSORS_ENABLED;var w=u.env.BYBIT_TMS_HOST||E||(d?"https://tms.ffe390afd658c19dcbf707e0597b846d.de":""),T=u.env.BYBIT_I18N_SOURCE_URL||y||(d?"/download/{{projectId}}/{{ns}}/{{lng}}/":"/translations/{{projectId}}/{{lng}}/{{ns}}.json");_||"".concat(w).concat(T);var N="";f?N="bybitglobal.com":p?N="bycbe.com, byapis.com":d&&(N="bybit-cn.com");var S=u.env.BYBIT_SERVICE_DOMAINS||A||N;u.env.BYBIT_APM_URL,u.env.BYBIT_APM_DISABLED,u.env.BYBIT_APM_DISABLED,u.env.BYBIT_SENTRY_DSN,u.env.BYBIT_SENTRY_DISABLED,u.env.BYBIT_LOGGER_URL,u.env.BYBIT_LOGGER_DISABLED,u.env.BYBIT_METRIC_URL,u.env.BYBIT_METRIC_DISABLED,u.env.BYBIT_SENSORS_URL,u.env.BYBIT_SENSORS_DISABLED;var O=a,I=["cloud","announcements","sandbox","blog","newblog","learn"];if(a&&I.some(function(e){return a.includes(e)})){var P=RegExp("(?:(?:".concat(I.join("|"),")-testnet|testnet-(?:").concat(I.join("|"),"))"),"g"),R=RegExp("^(?:".concat(I.join("|"),")(?=.)"),"g");O=a.replace(P,"testnet").replace(R,"www")}var L=(null===(r=a)||void 0===r?void 0:r.includes("bybit.eu"))?"EU":(null===(i=a)||void 0===i?void 0:i.includes("bybit.kz"))?"KAZ":(null===(o=a)||void 0===o?void 0:o.includes("bybit-tr.com"))?"TUR":/^[^.]+\.[^.]+\.[^.]+\.hk$/.test(a)||/^[^.]+\.[^.]+\.[^.]+\.[^.]+\.hk$/.test(a)||(null===(s=a)||void 0===s?void 0:s.includes("byhkbit.com"))?"HKG":/^[^.]+\.[^.]+\.ae$/.test(a)||/^[^.]+\.[^.]+\.[^.]+\.ae$/.test(a)?"ARE":/^[^.]+\.[^.]+\.nl$/.test(a)||/^[^.]+\.[^.]+\.[^.]+\.nl$/.test(a)?"NLD":"BYBIT"},14453:function(e,t,n){"use strict";n.d(t,{E0:function(){return ea}});var r=n(98992),i=n(6157),o=n(26364),s=n(95533),a=s.env.BYBIT_COOKIE_DOMAIN,u=s.env.BYBIT_API2_HOST,c=s.env.BYBIT_WS2_HOST,l="https:"===o.TF,h=!0,f="public-test-1",p="bybit",d="com",g="";h=!1;var m=o.T9?o.T9.split("."):[];if(3===m.length){var v=(0,i.Z)(m,3);f=v[0],p=v[1],d=v[2]}if(4===m.length){if(o.lb){var b=(0,i.Z)(m,4);f=b[0],p=b[1],d=b[2],g=b[3],d="".concat(d,".").concat(g)}else{var E=(0,i.Z)(m,4);f=E[1],p=E[2],d=E[3]}}if(5===m.length){var y=(0,i.Z)(m,5);f=y[1],p=y[2],d=y[3],g=y[4],d="".concat(d,".").concat(g)}var _=h&&("dev-3"===f||"test-3"===f),A=/^(www|m)$/,w="testnet"===f||"m-testnet"===f,T=/^(www|m|testnet|m-testnet)$/.test(f),N="".concat(p,".").concat(d),S="api2.".concat(A.test(f)?"":"".concat(f,".")),O="ws2.".concat(A.test(f)?"":"".concat(f,".")),I="chat.".concat(A.test(f)?"":"".concat(f,".")),P="affiliates.";w&&(S="api2-testnet.",I="chat-testnet.",O="ws2-testnet.",P="affiliates-testnet."),T||(P="affiliates.".concat(f,".")),"https://".concat(P).concat(p,".").concat(d);var R=S,L=O;a||A.test(f),"".concat(o.TF,"//").concat(I).concat(p,".").concat(d,"/chat/by-chat-widget.js");var B=_?"https:":o.TF,U=_?"wss:":l?"wss:":"ws:",M=u||o.Qm||"".concat(o.TF,"//").concat(R).concat(p,".").concat(d),H=c||o.FR||"".concat(U,"//").concat(L).concat(p,".").concat(d);"".concat(o.TF,"//infra-gateway.").concat(f,".").concat(p,".").concat(d),"".concat(U,"//www.").concat(f,".").concat(p,".").concat(d),A.test(f),s.env.BYBIT_TMS_HOST,T||s.env.BYBIT_EXPORT_URL;var D={set:function(e,t){return"undefined"!=typeof window&&window.localStorage?void 0===t?localStorage.removeItem(e):localStorage.setItem(e,t):null},setObject:function(e,t){return this.set(e,JSON.stringify(t))},get:function(e){if("undefined"!=typeof window&&window.localStorage)try{return localStorage.getItem(e)}catch(e){return null}return""},getObject:function(e){try{return JSON.parse(this.get(e))}catch(e){return{}}},remove:function(e){"undefined"!=typeof window&&window.localStorage&&localStorage.removeItem(e)}},C=n(28766),G=n(87700),x=n(43426),j=null;try{j="AbortController"in window}catch(e){j=null}var k="json",$={},F=function(e){var t=String(e).toLowerCase();return({json:!0,text:!0,formData:!0,blob:!0,arrayBuffer:!0})[t]?t:k},K=function(e){return e>=200&&e<300},Z=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,G.Z)(this,e),this.defaultOpts=(0,C.Z)((0,C.Z)({},$),t),this.timeout=n.timeout||3e4,this.validateStatus=n.validateStatus||K,this.defaultRespType=n.defaultRespType||k,this.interceptors={response:[],request:[],errorHandler:[],finally:[]}}return(0,x.Z)(e,[{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=e;if(t.body){var i=t.body;Object.keys(i).forEach(function(e){var t="".concat(e,"=").concat(i[e]);r=r.indexOf("?")>-1?"".concat(r,"&").concat(t):"".concat(r,"?").concat(t)}),delete t.body}return this.fetch(r,(0,C.Z)((0,C.Z)({},t),{},{method:"get"}),n)}},{key:"post",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return this.fetch(e,(0,C.Z)((0,C.Z)({},t),{},{method:"post"}),n)}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return this.fetch(e,(0,C.Z)((0,C.Z)({},t),{},{method:"delete"}),n)}},{key:"put",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return this.fetch(e,(0,C.Z)((0,C.Z)({},t),{},{method:"put"}),n)}},{key:"fetch",value:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e){var t,n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,o=i||this.defaultRespType,s=(0,C.Z)((0,C.Z)((0,C.Z)({url:e},this.defaultOpts),r),{},{headers:(0,C.Z)((0,C.Z)({},this.defaultOpts.headers),r.headers)}),a=this.interceptors.request.reduce(function(t,n){return n(t,e)},s),u=j?new AbortController:{};a.signal=u.signal;var c=new Promise(function(r,i){t=setTimeout(function(){i({ret_code:9000001,ret_msg:"Request timeout, please re-try!",url:e}),j&&u.abort()},n.timeout)});return Promise.race([fetch(e,a),c]).then(function(e){return clearTimeout(t),e}).then(function(e){return n.validateStatus(e.status)?e.ok?new Promise(function(t){e[F(o)]().then(function(n){t({headers:e.headers,data:n})})}):{headers:{},data:{}}:Promise.reject({status:e.status,statusText:e.statusText})}).then(function(t){var r=t.data,i=t.headers;return n.interceptors.response.reduce(function(e,t){return e.then(t)},Promise.resolve({headers:i,data:r,config:a,url:e}))}).catch(function(r){return clearTimeout(t),n.interceptors.errorHandler.forEach(function(t){return t(r,a,e)}),Promise.reject(r)}).finally(function(){n.interceptors.finally.forEach(function(t){return t(a,e)})})})}]),e}(),q=n(90619),Y=n(15191),V={domain:"",weight:0};!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};("undefined"==typeof window||!("fetch"in window))&&console&&console.error&&console.error("fetch function doesn't detected in you environment");var n=new Z(e,t),r=n.fetch.bind(n);r.get=n.get.bind(n),r.post=n.post.bind(n),r.put=n.put.bind(n),r.delete=n.delete.bind(n),r.interceptors=n.interceptors}();var z=({set:function(e,t){return"undefined"!=typeof window&&window.sessionStorage?void 0===t?sessionStorage.removeItem(e):sessionStorage.setItem(e,t):null},setObject:function(e,t){return this.set(e,JSON.stringify(t))},get:function(e){if("undefined"!=typeof window&&window.sessionStorage)try{return sessionStorage.getItem(e)}catch(e){return null}return""},getObject:function(e){try{return JSON.parse(this.get(e))}catch(e){return{}}},remove:function(e){window.sessionStorage&&sessionStorage.removeItem(e)}}).getObject("by_route_record")||{},X=function(e){return["".concat(B,"//").concat(o.Jg?R.replace("-","-1-"):R.replace(".","-1.")).concat(e.trim()),"".concat(B,"//").concat(o.Jg?R.replace("-","-2-"):R.replace(".","-2.")).concat(e.trim())]},J=function(e){return["".concat(U,"//").concat(o.Jg?L.replace("-","-1-"):L.replace(".","-1.")).concat(e.trim()),"".concat(U,"//").concat(o.Jg?L.replace("-","-2-"):L.replace(".","-2.")).concat(e.trim())]},W=[{domain:N,api2:M,ws2:H},{domain:"".concat(N,"@1"),api2:X(N)[0],ws2:J(N)[0]},{domain:"".concat(N,"@2"),api2:X(N)[1],ws2:J(N)[1]},{domain:"auto"}],Q=function(e){return"".concat(U,"//").concat(L).concat(e.trim())};[Q(N)].concat((0,r.Z)(o.eg.split(",").filter(Boolean).map(function(e){return Q(e)})));var ee=H,et=function(e){var t=W.findIndex(function(t){return t.domain===e}),n=t>-1,r=W[0];return{idx:n?t:0,item:n?W[t]:r}},en=[],er="",ei=function(e){if(!er||er!==e){er=e;var t=et(e).item;ee=t.ws2,en.forEach(function(e){return e(t)})}},eo="route_chosen_v2",es=D.get(eo);"auto"===es?ei(0===Object.keys(z).length?N:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.keys(e).reduce(function(t,n){return(0,Y.Z)((0,Y.Z)({},t),{},(0,q.Z)({},n,e[n].reduce(function(e,t){return{factor:e.factor-.03,weight:e.weight+t*e.factor}},{factor:.1,weight:0}).weight))},{}),n=Object.keys(t).reduce(function(e,n){return!e.domain||e.weight>t[n]?{domain:n,weight:t[n]}:e},{});if("undefined"!=typeof window&&window&&window.$_router_info&&(console.log("rttMap = ",e),console.log("weightMap = ",t),console.log("bestDomainConfig = ",n.domain)),!V.domain)return V=n,n;if(V.domain&&V.domain!==n.domain){if(V.weight-n.weight>5)return V=n,n;var r=t[V.domain];return r-n.weight>25||r-V.weight>30?(V=n,n):V}return V.weight>n.weight&&(V=n),V}(z).domain):es&&!es.includes(N)?(D.remove(eo),ei(null)):ei(es),Object.defineProperties({API2_HOST:M,WS2_HOST:H},{API2_HOST:{get:function(){return"/x-api"}},WS2_HOST:{get:function(){return ee}}});var ea=function(){return{API2_HOST:"/x-api",WS2_HOST:ee}};es?et(es):W[3]},2856:function(e,t,n){var r=n(95533);(()=>{"use strict";let t;var i={d:(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};i.r(o),i.d(o,{ByVendors:()=>oM,byComplianceSdk:()=>oA,byDeadpoolSdk:()=>oO,byDynamicDomain:()=>c,byDynamicSymbol:()=>ow,byEnv:()=>a,byFetch:()=>o_,byGtm:()=>oI,byHelpers:()=>u,byI18nLoader:()=>oy,byLanguageDetector:()=>oU,byLogger:()=>oL,byMetas:()=>s,byRequest:()=>oS,byRouteFinder:()=>oB,bySensors:()=>oN,bySharedSettings:()=>l,byStorage:()=>oP,bySymbolList:()=>oR,byThemeLoader:()=>h,byUniframeToolkit:()=>oT});var s={};i.r(s),i.d(s,{APP_DEEPLINK_PREFIX_EU:()=>Y,APP_DEEPLINK_PREFIX_GLOBAL:()=>Z,APP_DEEPLINK_PREFIX_JPN:()=>X,APP_DEEPLINK_PREFIX_MINI:()=>J,APP_DEEPLINK_PREFIX_THA:()=>z,APP_DEEPLINK_PREFIX_TUR:()=>V,APP_DEEPLINK_PREFIX_USA:()=>q,APP_ONELINK:()=>W,APP_ONELINK_JPN:()=>en,APP_ONELINK_THA:()=>et,APP_ONELINK_TUR:()=>Q,APP_ONELINK_USA:()=>ee,BRAND_CN:()=>y,BRAND_GEO:()=>E,BRAND_GLOBAL:()=>m,BRAND_HKG:()=>_,BRAND_NAME:()=>f,BRAND_NAME_FIRST_CHAR_UPPER:()=>d,BRAND_NAME_UPPER:()=>p,BRAND_TUR:()=>b,BRAND_TUR_OLD:()=>v,BRAND_USA:()=>g,DOMAIN_ARE:()=>D,DOMAIN_EU:()=>R,DOMAIN_GEO:()=>G,DOMAIN_HKG:()=>C,DOMAIN_IDN:()=>H,DOMAIN_JPN:()=>j,DOMAIN_KAZ:()=>L,DOMAIN_NLD:()=>M,DOMAIN_THA:()=>$,DOMAIN_TUR:()=>B,DOMAIN_TUR_OLD:()=>U,DOMAIN_USA:()=>k,DOMAIN_WWW:()=>x,REPLACE_DOMAIN_WHITE_LIST:()=>er,UA_APP:()=>A,UA_APP_EU:()=>T,UA_APP_IDN:()=>N,UA_APP_JPN:()=>I,UA_APP_THA:()=>O,UA_APP_TUR:()=>w,UA_APP_USA:()=>S,URL_TESTNET:()=>F,URL_WWW:()=>K,getDomain:()=>P});var a={};i.r(a),i.d(a,{API2_HOST:()=>eR,BYBIT_SERVICE_DOMAINS:()=>eU,COOKIE_DOMAIN:()=>eP,DEADPOOL_URL_PREFIX:()=>ej,ENV_API2_HOST:()=>ev,ENV_COOKIE_DOMAIN:()=>eg,ENV_DEADPOOL_URL_PREFIX:()=>ex,ENV_HOST:()=>ew,ENV_HOSTNAME:()=>eT,ENV_NODE_ENV:()=>ey,ENV_ORIGIN_HOST:()=>e_,ENV_PORT:()=>eN,ENV_PROTOCOL:()=>eA,ENV_RUNTIME_ENV:()=>em,ENV_SERVICE_DOMAINS:()=>eE,ENV_WS2_HOST:()=>eb,REGULATED_SITE_HOSTS:()=>eC,RUNTIME_ENV:()=>eI,SERVICE_DOMAINS:()=>eU,SITE_ID:()=>eC,TG_PLATFORM:()=>eJ,WS2_HOST:()=>eL,getPlatform:()=>eW,getRelativeUrl:()=>e8,getSiteId:()=>eH,getWwwUrlBySiteId:()=>eD,getXUserAgent:()=>eQ,isApp:()=>eV,isAppEu:()=>eK,isAppJpn:()=>eY,isAppTha:()=>eq,isAppTr:()=>eF,isAppUSA:()=>eZ,isBrowser:()=>ek,isBybitApp:()=>eV,isBybitEuApp:()=>eK,isBybitTrApp:()=>eF,isDev:()=>eh,isGlobalApp:()=>e$,isLocal:()=>e6,isMobile:()=>ez,isProd:()=>ec,isProdOrTestnet:()=>ea,isSSL:()=>ef,isTGMiniApp:()=>eX,isTest:()=>el,isTestnet:()=>eu,platform:()=>e0,protocol:()=>ep,repaired_hostname:()=>eM,s3TransformPath:()=>e2,xUserPlatform:()=>e1});var u={};i.r(u),i.d(u,{clamp:()=>tI,countDown:()=>tx,crossCombine:()=>tO,deepClone:()=>tT,displayThousands:()=>rl,flatMapDepth:()=>tM,formatCountDown:()=>tj,formatNumber:()=>rh,getMainDomainName:()=>rb,getQueryParams:()=>rg,getQueryParamsWithSpecialChars:()=>rm,getUrlObject:()=>rv,guid:()=>rd,intercept:()=>re,isFinite:()=>t_,isFromInternalByMainDomain:()=>rE,isFunction:()=>tw,isInteger:()=>tA,isNaN:()=>ty,isNumber:()=>tE,isObject:()=>td,isObjectLike:()=>tf,isPlainObject:()=>tp,isString:()=>tl,isSymbol:()=>tg,isUndefined:()=>th,loadScript:()=>rf,localDate:()=>tC,localDateTime:()=>tD,localTime:()=>tG,map:()=>tN,omit:()=>tS,partition:()=>tP,pick:()=>tR,reduceNum:()=>rr,tendTo5:()=>ri,toFinite:()=>tv,toInteger:()=>tb,toNumber:()=>tm,toThousands:()=>rt,transformNum:()=>rn});var c={};i.r(c),i.d(c,{AFFILIATES_HOST:()=>rx,API2_HOST:()=>rJ,BLOG_HOST:()=>r6,CDN_STATIC:()=>rq,CDN_STATIC_PROD:()=>rZ,CHAT_URL:()=>rV,DOMAIN:()=>r$,DOMAIN_TYPE:()=>rF,DYNAMIC_ENV:()=>rU,OPTION_ALL_ENV:()=>r1,OPTION_TEST_GATEWAY_HOST:()=>rQ,OPTION_TEST_WS_HOST:()=>r0,REPLACE_DOMAIN_WHITE_LIST:()=>er,TOKEN_COOKIE_KEY:()=>rK,WS2_HOST:()=>rW,ZENDESK_HOST:()=>r2,api2Prefix:()=>rj,apiProtocol:()=>rz,cdnStatic:()=>rB,currentDomain:()=>rM,getContentDomain:()=>ry,getHelpLink:()=>r5,helpCenterHost:()=>r9,helpLang:()=>r3,replaceContentDomain:()=>r_,ws2Prefix:()=>rk,ws2Protocol:()=>rX,zBaseLink:()=>r8});var l={};i.r(l),i.d(l,{ADA_LOCALE_MAP:()=>iI,APP_QR_CODE_PATH:()=>iO,BYBIT_APP_QR_CODE_PATH:()=>iO,BYBIT_GUID_KEY:()=>im,BYBIT_LANGUAGES:()=>iU,BYBIT_LANGUAGES_ALL:()=>iB,BYBIT_LANGUAGES_ARE:()=>ik,BYBIT_LANGUAGES_EU:()=>iG,BYBIT_LANGUAGES_GBR:()=>iL,BYBIT_LANGUAGES_GEO:()=>ix,BYBIT_LANGUAGES_HKG:()=>iM,BYBIT_LANGUAGES_IDN:()=>ij,BYBIT_LANGUAGES_JPN:()=>i$,BYBIT_LANGUAGES_KAZ:()=>iC,BYBIT_LANGUAGES_NLD:()=>iH,BYBIT_LANGUAGES_THA:()=>iK,BYBIT_LANGUAGES_TUR:()=>iD,BYBIT_LANGUAGES_USA:()=>iF,BYBIT_LANG_KEY:()=>ig,BYBIT_LOGO_PATH:()=>iS,BYBIT_THEME_KEY:()=>iv,GA_UID_KEY:()=>ib,GLOBAL_SITE_KEY:()=>iT,GLOBAL_THEME_KEY:()=>iw,GOOGLE_CAPTCHA_HOSTS:()=>i_,GOOGLE_LOGIN_HOSTS:()=>iA,GTM_ID:()=>i7,GTM_ID_LEARN:()=>i4,GUID_KEY:()=>im,GetBybitSelectedLanguage:()=>iW,LANG_KEY:()=>ig,LOGO_PATH:()=>iS,PLATFORM_SUPPORT_LANGUAGES:()=>iZ,PLATFORM_SUPPORT_LANGUAGES_MAP:()=>iq,REG_REF_KEY:()=>i6,RTL_LANGUAGES:()=>i2,SITE_DEFAULT_LANGUAGE:()=>iV,SITE_DEFAULT_LANGUAGE_MAP:()=>iY,SITE_ID:()=>eC,SITE_ID_HOST_MAP:()=>ei,SITE_SUPPORTED_LANGUAGES:()=>iX,SUPPORTED_LANGUAGES:()=>iU,SUPPORTED_LANGUAGES_ALL_SITES:()=>iZ,SUPPORTED_LANGUAGES_ALL_SITES_MAP:()=>iq,SUPPORTED_LANGUAGES_ARE:()=>ik,SUPPORTED_LANGUAGES_EU:()=>iG,SUPPORTED_LANGUAGES_GBR:()=>iL,SUPPORTED_LANGUAGES_GEO:()=>ix,SUPPORTED_LANGUAGES_GLOBAL:()=>iB,SUPPORTED_LANGUAGES_GLOBAL_DISPLAY:()=>iR,SUPPORTED_LANGUAGES_HKG:()=>iM,SUPPORTED_LANGUAGES_IDN:()=>ij,SUPPORTED_LANGUAGES_JPN:()=>i$,SUPPORTED_LANGUAGES_KAZ:()=>iC,SUPPORTED_LANGUAGES_NLD:()=>iH,SUPPORTED_LANGUAGES_THA:()=>iK,SUPPORTED_LANGUAGES_TUR:()=>iD,SUPPORTED_LANGUAGES_USA:()=>iF,SetBybitSelectedLanguage:()=>iJ,TDID_V2_KEY:()=>iN,TG_BOT:()=>iy,TG_BOTS:()=>iE,THEME_KEY:()=>iv,TRADING_VIEW_LOCALE_MAP:()=>iP,domainSiteIdMap:()=>i1,getAppDeeplinkPrefix:()=>i3,getFormattedConfigs:()=>ip,getHreflangHtml:()=>id,getOriginalConfigs:()=>ih,getSiteIdByLanguage:()=>i0,getSiteLanguage:()=>iW,getSupportLanguage:()=>iQ,regulatedSiteHosts:()=>eC,rtlLanguagesList:()=>i2,setSiteLanguage:()=>iJ});var h={};i.r(h),i.d(h,{getSite:()=>og,getTheme:()=>om,initTheme:()=>op,reinit:()=>od,setSite:()=>ou,setTheme:()=>oh,toggleTheme:()=>of});let f=String.fromCharCode(98,121,98,105,116),p=f.toUpperCase(),d=String.fromCharCode(66,121,98,105,116),g="abfinance",m=`${f}global`,v=`${f}-tr`,b=`${f}tr`,E=`${f}georgia`,y=`${f}-cn`,_=String.fromCharCode(98,121,104,107,98,105,116),A=`${f}_app`,w=`${f}_app_tr`,T=`${f}_app_eu`,N=`${f}_app_idn`,S="bit_app_us",O="bit_app_tha",I="bit_app_jpn",P=e=>`${f}.${e}`,R=P("eu"),L=P("kz"),B=P("tr"),U=`${v}.com`,M=P("nl"),H=P("id"),D=P("ae"),C=`${_}.com`,G=`${E}.ge`,x=P("com"),j="moneypartners.co.jp",k="abfinance.com",$="waanx.com",F=`https://testnet.${f}.com`,K=`https://www.${f}.com`,Z=`${f}app://`,q="bitusapp://",Y=`${f}-eu://`,V=`${f}-tr://`,z="waanxapp://",X="bit-jpn://",J="by-mini://",W=`https://${f}.onelink.me`,Q=`https://${b}.onelink.me`,ee="https://bitappus.onelink.me",et="https://waanx.onelink.me",en="https://moneypartners.onelink.me",er=[`${f}.com`,`${m}.com`,"bytick.com",`${f}-global.com`,`${f}.biz`,`${f}.global`,`${f}.org`,`${f}s.org`,`${f}gum.com`,`${f}gum.org`,`${f}s.io`,`${f}.cloud`,`${f}x.global`,C,M,D,`${f}.com.hk`,B,U,L,R,`${f}-ge.com`,H,G,k,$,j],ei={HKG:C,TUR:B,TUR_OLD:U,KAZ:L,NLD:M,GEO:G,IDN:H,ARE:D,EU:R,JPN:j,USA:k,THA:$},eo,es={},ea=!1,eu=!1,ec=!1,el=true,eh=true,ef=!1,ep="",ed=es.enableAutoman&&es.automan||{},eg=ed.AUTOMAN_COOKIE_DOMAIN,em=ed.AUTOMAN_RUNTIME_ENV,ev=ed.AUTOMAN_API2_HOST,eb=ed.AUTOMAN_WS2_HOST,eE=ed.AUTOMAN_SERVICE_DOMAINS,ey=ed.AUTOMAN_NODE_ENV||"production",e_=ed.AUTOMAN_ORIGIN_HOST,eA=ed.AUTOMAN_PROTOCOL,ew=ed.AUTOMAN_HOST,eT=ed.AUTOMAN_HOSTNAME,eN=ed.AUTOMAN_PORT;function eS(e,t,n){return void 0!==r&&r.env&&r.env[e]?r.env[e]:null!=t&&""!==t?t:n}let eO="local";eu?eO="testnet":ec?eO="prod":el&&(eO="test");let eI=eS("RUNTIME_ENV",em,eO)||eO,eP=eS("COOKIE_DOMAIN",eg),eR=eS("API2_HOST",ev),eL=eS("WS2_HOST",eb),eB="";eu?eB=`${m}.com`:ec?eB="bycbe.com, byapis.com":el&&(eB=`${y}.com`);let eU=eS("SERVICE_DOMAINS",eE,eB)||eB,eM=eo;function eH(e){var t;if(!e)return(null==r||null===(t=r.env)||void 0===t?void 0:t.BUILD_SITE_ID)||p;let n=e||"";return null!=n&&n.includes(R)?"EU":null!=n&&n.includes(L)?"KAZ":null!=n&&n.includes(B)||null!=n&&n.includes(U)?"TUR":null!=n&&n.includes(G)?"GEO":null!=n&&n.includes(H)?"IDN":/^[^.]+\.[^.]+\.[^.]+\.hk$/.test(n)||/^[^.]+\.[^.]+\.[^.]+\.[^.]+\.hk$/.test(n)||null!=n&&n.includes(C)?"HKG":/^[^.]+\.[^.]+\.ae$/.test(n)||/^[^.]+\.[^.]+\.[^.]+\.ae$/.test(n)?"ARE":/^[^.]+\.[^.]+\.nl$/.test(n)||/^[^.]+\.[^.]+\.[^.]+\.nl$/.test(n)?"NLD":null!=n&&n.includes(j)?"JPN":null!=n&&n.includes(k)?"USA":null!=n&&n.includes($)?"THA":p}let eD=e=>{let t=ei[e];return t||(t=x),`https://www.${t}`},eC=eH(),eG="USA"===eC?"//www.byore-test-1.abfinance.com":`//www.unify-test-1.${f}.com`,ex=ed.AUTOMAN_DEADPOOL_URL_PREFIX,ej=eS("DEADPOOL_URL_PREFIX",ex,eG)||eG,ek=!1,e$=()=>!!ek&&new RegExp(A).test(navigator.userAgent.toLowerCase()),eF=()=>!!ek&&new RegExp(w).test(navigator.userAgent.toLowerCase()),eK=()=>!!ek&&new RegExp(T).test(navigator.userAgent.toLowerCase()),eZ=()=>!!ek&&new RegExp(S).test(navigator.userAgent.toLowerCase()),eq=()=>!!ek&&new RegExp(O).test(navigator.userAgent.toLowerCase()),eY=()=>!!ek&&new RegExp(I).test(navigator.userAgent.toLowerCase()),eV=()=>e$()||eK()||eq()||eF()||eZ()||eY();function ez(e={}){var t,n;let r=null==e?void 0:e.ua;if(r||"undefined"==typeof navigator||(r=navigator.userAgent),"object"==typeof r&&null!==(t=r)&&void 0!==t&&null!==(n=t.headers)&&void 0!==n&&n["user-agent"]&&(r=r.headers["user-agent"]),"string"!=typeof r)return!1;let i=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino|Telegram-Android/i.test(r)||!!e.tablet&&/android|ipad|playbook|silk/i.test(r);return!i&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==r.indexOf("Macintosh")&&-1!==r.indexOf("Safari")&&(i=!0),i}function eX(){return!1}let eJ={PC:"pc_tg",IOS:"ios_tg",ANDROID:"android_tg"},eW=e=>{try{return null!=e?e:ez()?"h5":"pc"}catch(t){return null!=e?e:ez()?"h5":"pc"}},eQ=()=>{try{return}catch(e){return}},e0=eW(),e1=eQ(),e2=new Map([["https://fh-static.bycsi.com","/common-static/fhs"],["https://prod-usa-fht-web-0145-wu.s3.ap-southeast-1.amazonaws.com","/common-static/fhs"],["https://t1.bycsi.com","/bycsi-root"],["https://t1.abfinance.com","/bycsi-root"],["https://s1.bycsi.com","/bycsi-root"],["https://s1.abfinance.com","/bycsi-root"]]),e6=void 0!==r&&"development"===(null===(tk=r.env)||void 0===tk?void 0:"production")||"development"===ey||"development"===em;function e8(e,t=!1){try{if(!e)return e;if(e.startsWith("/bycsi-root"))return e6||t?`${ej}${e}`:e;if(/deadpool/.test(e)){let n=e;try{let t=new URL(e);n=t.pathname,t.origin}catch{n=e}return n.includes(`/${f}/deadpool-testnet`)?n=n.replace(`/${f}/deadpool-testnet`,"/bycsi-root/deadpool"):n.includes("/deadpool-test")?n=n.replace("/deadpool-test","/bycsi-root/deadpool"):n.includes(`/${f}/deadpool`)&&(n=n.replace(`/${f}/deadpool`,"/bycsi-root/deadpool")),e6||t?`${ej}${n}`:n}let n=new URL(e);if(!e2.has(n.origin))return e;let r=e;return r=e.replace(n.origin,e2.get(n.origin)),(e6||t)&&(r=n.origin.includes("t1.bycsi.com")?`${F}${r}`:`${K}${r}`),r}catch(n){return(e6||t)&&e.startsWith("/bycsi-root")?`${ej}${e}`:e}}let e3=Object.prototype,e9=n.g&&n.g.Object===Object&&n.g||function(){return this}()||("undefined"!=typeof globalThis?globalThis:void 0),e5=(null==e9?void 0:e9.isFinite)||Number.isFinite,e7=1/0,e4=Symbol?Symbol.toStringTag:void 0,te=Symbol?Symbol.isConcatSpreadable:void 0,tt=e3.toString,tn=e3.propertyIsEnumerable,tr=e3.hasOwnProperty,ti=/^\s+|\s+$/g,to=/^[-+]0x[0-9a-f]+$/i,ts=/^0b[01]+$/i,ta=/^0o[0-7]+$/i,tu=parseInt,tc=e3.toString,tl=e=>"string"==typeof e,th=e=>void 0===e,tf=e=>!!e&&"object"==typeof e,tp=e=>!!e&&"object"==typeof e&&e.constructor===Object,td=e=>{var t=typeof e;return!!e&&("object"==t||"function"==t)},tg=e=>"symbol"==typeof e||tf(e)&&"[object Symbol]"==tc.call(e),tm=e=>{if("number"==typeof e)return e;if(tg(e))return NaN;if(td(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=td(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(ti,"");var n=ts.test(e);return n||ta.test(e)?tu(e.slice(2),n?2:8):to.test(e)?NaN:+e},tv=e=>e?(e=tm(e))===e7||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0,tb=e=>{var t=tv(e),n=t%1;return t==t?n?t-n:t:0},tE=e=>"number"==typeof e||tf(e)&&"[object Number]"==tc.call(e),ty=e=>tE(e)&&e!=+e,t_=e=>"number"==typeof e&&e5(e),tA=e=>"number"==typeof e&&e==tb(e),tw=e=>{var t=td(e)?tc.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t},tT=e=>{if(null===e)return null;let t=Object.assign({},e);return Object.keys(t).forEach(n=>t[n]="object"==typeof e[n]?tT(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},tN=(e,t)=>Array.isArray(e)?e.map(t):tp(e)?Object.keys(e).map(n=>t(e[n],n)):[],tS=(e,t)=>Object.keys(e).filter(e=>!t.includes(e)).reduce((t,n)=>(t[n]=e[n],t),{}),tO=(e,t)=>e.reduce((e,n)=>[...e,...t.map(e=>[n,e])],[]),tI=(e,t,n)=>(t=(t=+t)===t?t:0,n=(n=+n)===n?n:0,(e=+e)===e&&(e=(e=e<=n?e:n)>=t?e:t),e),tP=(e,t)=>e.reduce((e,n,r,i)=>(e[t(n,r,i)?0:1].push(n),e),[[],[]]),tR=(e,t)=>t.reduce((t,n)=>(n in e&&(t[n]=e[n]),t),{});function tL(e){return tf(e)&&"[object Arguments]"==(null==e?void 0===e?"[object Undefined]":"[object Null]":e4&&e4 in Object(e)?function(e){var t=tr.call(e,e4),n=e[e4];try{e[e4]=void 0;var r=!0}catch(e){}var i=tt.call(e);return r&&(t?e[e4]=n:delete e[e4]),i}(e):tc.call(e))}var tB=tL(function(){return arguments}())?tL:function(e){return tf(e)&&tr.call(e,"callee")&&!tn.call(e,"callee")};let tU=e=>Array.isArray(e)||tB(e)||!!(te&&e&&e[te]),tM=(e,t,n)=>(n=void 0===n?1:tb(n),function e(t,n,r,i,o){var s=-1,a=t.length;for(r||(r=tU),o||(o=[]);++s0&&r(u)?n>1?e(u,n-1,r,i,o):function(e,t){for(var n=-1,r=t.length,i=e.length;++n{a[e]<10&&(a[e]=`0${a[e]}`)}),a}function tD(e){if(!e)return e;let t=tH("object"==typeof e?e:new Date(e));return`${t.year}-${t.month}-${t.day} ${t.hours}:${t.minutes}:${t.seconds}`}function tC(e){if(!e)return e;let t=tH("object"==typeof e?e:new Date(e));return`${t.year}-${t.month}-${t.day}`}function tG(e){if(!e)return e;let t=tH("object"==typeof e?e:new Date(e));return`${t.hours}:${t.minutes}:${t.seconds}`}function tx(e,t){if(!e)return e;let{hours:n,minutes:r,seconds:i}=function(e,t=0){let n=(e-(new Date).getTime())/1e3,r=Math.floor(n/3600/24),i=Math.floor((n-24*r*3600)/3600),o=Math.floor((n-24*r*3600-3600*i)/60),s={days:r,hours:i+t,minutes:o,seconds:Math.floor(n-24*r*3600-3600*i-60*o)};return Object.keys(s).forEach(e=>{s[e]<10&&(s[e]=`0${s[e]}`)}),s}("object"==typeof e?e:new Date(e),t);return`${n}:${r}:${i}`}function tj(e){let t=Math.floor(e/3600/24),n=Math.floor((e-24*t*3600)/3600),r=Math.floor((e-24*t*3600-3600*n)/60),i={hours:n,minutes:r,seconds:Math.floor(e-24*t*3600-3600*n-60*r)};return Object.keys(i).forEach(e=>{i[e]<10&&(i[e]=`0${i[e]}`)}),e>86400?Math.ceil(e/3600/24):`${i.hours}:${i.minutes}:${i.seconds}`}var tk,t$,tF,tK="0123456789abcdef",tZ="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",tq="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",tY={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-9e15,maxE:9e15,crypto:!1},tV=!0,tz="[DecimalError] ",tX=tz+"Invalid argument: ",tJ=tz+"Precision limit exceeded",tW=tz+"crypto unavailable",tQ="[object Decimal]",t0=Math.floor,t1=Math.pow,t2=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,t6=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,t8=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,t3=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,t9=tZ.length-1,t5=tq.length-1,t7={toStringTag:tQ};function t4(e){var t,n,r,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tn)throw Error(tX+e)}function nt(e,t,n,r){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=7,i=0):(i=Math.ceil((t+1)/7),t%=7),o=t1(10,7-t),a=e[i]%o|0,null==r?t<3?(0==t?a=a/100|0:1==t&&(a=a/10|0),s=n<4&&99999==a||n>3&&49999==a||5e4==a||0==a):s=(n<4&&a+1==o||n>3&&a+1==o/2)&&(e[i+1]/o/100|0)==t1(10,t-2)-1||(a==o/2||0==a)&&0==(e[i+1]/o/100|0):t<4?(0==t?a=a/1e3|0:1==t?a=a/100|0:2==t&&(a=a/10|0),s=(r||n<4)&&9999==a||!r&&n>3&&4999==a):s=((r||n<4)&&a+1==o||!r&&n>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==t1(10,t-3)-1,s}function nn(e,t,n){for(var r,i,o=[0],s=0,a=e.length;sn-1&&(void 0===o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}t7.absoluteValue=t7.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),ni(e)},t7.ceil=function(){return ni(new this.constructor(this),this.e+1,2)},t7.clampedTo=t7.clamp=function(e,t){var n=this.constructor;if(e=new n(e),t=new n(t),!e.s||!t.s)return new n(NaN);if(e.gt(t))throw Error(tX+t);return 0>this.cmp(e)?e:this.cmp(t)>0?t:new n(this)},t7.comparedTo=t7.cmp=function(e){var t,n,r,i,o=this.d,s=(e=new this.constructor(e)).d,a=this.s,u=e.s;if(!o||!s)return a&&u?a!==u?a:o===s?0:!o^a<0?1:-1:NaN;if(!o[0]||!s[0])return o[0]?a:s[0]?-u:0;if(a!==u)return a;if(this.e!==e.e)return this.e>e.e^a<0?1:-1;for(t=0,n=(r=o.length)<(i=s.length)?r:i;ts[t]^a<0?1:-1;return r===i?0:r>i^a<0?1:-1},t7.cosine=t7.cos=function(){var e,t,n=this,r=n.constructor;return n.d?n.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(e,t){var n,r,i;if(t.isZero())return t;(r=t.d.length)<32?i=(1/nE(4,n=Math.ceil(r/3))).toString():(n=16,i="2.3283064365386962890625e-10"),e.precision+=n,t=nb(e,1,t.times(i),new e(1));for(var o=n;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=n,t}(r,ny(r,n)),r.precision=e,r.rounding=t,ni(2==tF||3==tF?n.neg():n,e,t,!0)):new r(1):new r(NaN)},t7.cubeRoot=t7.cbrt=function(){var e,t,n,r,i,o,s,a,u,c,l=this.constructor;if(!this.isFinite()||this.isZero())return new l(this);for(tV=!1,(o=this.s*t1(this.s*this,1/3))&&Math.abs(o)!=1/0?r=new l(o.toString()):(n=t4(this.d),(o=((e=this.e)-n.length+1)%3)&&(n+=1==o||-2==o?"0":"00"),o=t1(n,1/3),e=t0((e+1)/3)-(e%3==(e<0?-1:2)),(r=new l(n=o==1/0?"5e"+e:(n=o.toExponential()).slice(0,n.indexOf("e")+1)+e)).s=this.s),s=(e=l.precision)+3;;)if(r=nr((c=(u=(a=r).times(a).times(a)).plus(this)).plus(this).times(a),c.plus(u),s+2,1),t4(a.d).slice(0,s)===(n=t4(r.d)).slice(0,s)){if("9999"!=(n=n.slice(s-3,s+1))&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(ni(r,e+1,1),t=!r.times(r).times(r).eq(this));break}if(!i&&(ni(a,e+1,0),a.times(a).times(a).eq(this))){r=a;break}s+=4,i=1}return tV=!0,ni(r,e,l.rounding,t)},t7.decimalPlaces=t7.dp=function(){var e,t=this.d,n=NaN;if(t){if(n=7*((e=t.length-1)-t0(this.e/7)),e=t[e])for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},t7.dividedBy=t7.div=function(e){return nr(this,new this.constructor(e))},t7.dividedToIntegerBy=t7.divToInt=function(e){var t=this.constructor;return ni(nr(this,new t(e),0,1,1),t.precision,t.rounding)},t7.equals=t7.eq=function(e){return 0===this.cmp(e)},t7.floor=function(){return ni(new this.constructor(this),this.e+1,3)},t7.greaterThan=t7.gt=function(e){return this.cmp(e)>0},t7.greaterThanOrEqualTo=t7.gte=function(e){var t=this.cmp(e);return 1==t||0===t},t7.hyperbolicCosine=t7.cosh=function(){var e,t,n,r,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;n=s.precision,r=s.rounding,s.precision=n+Math.max(o.e,o.sd())+4,s.rounding=1,(i=o.d.length)<32?t=(1/nE(4,e=Math.ceil(i/3))).toString():(e=16,t="2.3283064365386962890625e-10"),o=nb(s,1,o.times(t),new s(1),!0);for(var u,c=e,l=new s(8);c--;)u=o.times(o),o=a.minus(u.times(l.minus(u.times(l))));return ni(o,s.precision=n,s.rounding=r,!0)},t7.hyperbolicSine=t7.sinh=function(){var e,t,n,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,n=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,(r=i.d.length)<3)i=nb(o,2,i,i,!0);else{e=(e=1.4*Math.sqrt(r))>16?16:0|e,i=nb(o,2,i=i.times(1/nE(5,e)),i,!0);for(var s,a=new o(5),u=new o(16),c=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(u.times(s).plus(c))))}return o.precision=t,o.rounding=n,ni(i,t,n,!0)},t7.hyperbolicTangent=t7.tanh=function(){var e,t,n=this.constructor;return this.isFinite()?this.isZero()?new n(this):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,nr(this.sinh(),this.cosh(),n.precision=e,n.rounding=t)):new n(this.s)},t7.inverseCosine=t7.acos=function(){var e=this,t=e.constructor,n=e.abs().cmp(1),r=t.precision,i=t.rounding;return -1!==n?0===n?e.isNeg()?nu(t,r,i):new t(0):new t(NaN):e.isZero()?nu(t,r+4,i).times(.5):(t.precision=r+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=r,t.rounding=i,e.times(2))},t7.inverseHyperbolicCosine=t7.acosh=function(){var e,t,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,tV=!1,n=n.times(n).minus(1).sqrt().plus(n),tV=!0,r.precision=e,r.rounding=t,n.ln()):new r(n)},t7.inverseHyperbolicSine=t7.asinh=function(){var e,t,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,tV=!1,n=n.times(n).plus(1).sqrt().plus(n),tV=!0,r.precision=e,r.rounding=t,n.ln())},t7.inverseHyperbolicTangent=t7.atanh=function(){var e,t,n,r,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,Math.max(r=i.sd(),e)<-(2*i.e)-1?ni(new o(i),e,t,!0):(o.precision=n=r-i.e,i=nr(i.plus(1),new o(1).minus(i),n+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)},t7.inverseSine=t7.asin=function(){var e,t,n,r,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),n=o.precision,r=o.rounding,-1!==t?0===t?((e=nu(o,n+4,r).times(.5)).s=i.s,e):new o(NaN):(o.precision=n+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=r,i.times(2)))},t7.inverseTangent=t7.atan=function(){var e,t,n,r,i,o,s,a,u,c=this,l=c.constructor,h=l.precision,f=l.rounding;if(c.isFinite()){if(c.isZero())return new l(c);if(c.abs().eq(1)&&h+4<=t5)return(s=nu(l,h+4,f).times(.25)).s=c.s,s}else{if(!c.s)return new l(NaN);if(h+4<=t5)return(s=nu(l,h+4,f).times(.5)).s=c.s,s}for(l.precision=a=h+10,l.rounding=1,e=n=Math.min(28,a/7+2|0);e;--e)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(tV=!1,t=Math.ceil(a/7),r=1,u=c.times(c),s=new l(c),i=c;-1!==e;)if(i=i.times(u),o=s.minus(i.div(r+=2)),i=i.times(u),void 0!==(s=o.plus(i.div(r+=2))).d[t])for(e=t;s.d[e]===o.d[e]&&e--;);return n&&(s=s.times(2<this.d.length-2},t7.isNaN=function(){return!this.s},t7.isNegative=t7.isNeg=function(){return this.s<0},t7.isPositive=t7.isPos=function(){return this.s>0},t7.isZero=function(){return!!this.d&&0===this.d[0]},t7.lessThan=t7.lt=function(e){return 0>this.cmp(e)},t7.lessThanOrEqualTo=t7.lte=function(e){return 1>this.cmp(e)},t7.logarithm=t7.log=function(e){var t,n,r,i,o,s,a,u=this.constructor,c=u.precision,l=u.rounding;if(null==e)e=new u(10),t=!0;else{if(n=(e=new u(e)).d,e.s<0||!n||!n[0]||e.eq(1))return new u(NaN);t=e.eq(10)}if(n=this.d,this.s<0||!n||!n[0]||this.eq(1))return new u(n&&!n[0]?-1/0:1!=this.s?NaN:n?0:1/0);if(t){if(n.length>1)i=!0;else{for(r=n[0];r%10==0;)r/=10;i=1!==r}}if(tV=!1,nt((a=nr(ng(this,s=c+5),t?na(u,s+10):ng(e,s),s,1)).d,r=c,l))do if(a=nr(ng(this,s+=10),t?na(u,s+10):ng(e,s),s,1),!i){+t4(a.d).slice(r+1,r+15)+1==1e14&&(a=ni(a,c+1,0));break}while(nt(a.d,r+=10,l));return tV=!0,ni(a,c,l)},t7.minus=t7.sub=function(e){var t,n,r,i,o,s,a,u,c,l,h,f,p=this.constructor;if(e=new p(e),!this.d||!e.d)return this.s&&e.s?this.d?e.s=-e.s:e=new p(e.d||this.s!==e.s?this:NaN):e=new p(NaN),e;if(this.s!=e.s)return e.s=-e.s,this.plus(e);if(c=this.d,f=e.d,a=p.precision,u=p.rounding,!c[0]||!f[0]){if(f[0])e.s=-e.s;else{if(!c[0])return new p(3===u?-0:0);e=new p(this)}return tV?ni(e,a,u):e}if(n=t0(e.e/7),l=t0(this.e/7),c=c.slice(),o=l-n){for((h=o<0)?(t=c,o=-o,s=f.length):(t=f,n=l,s=c.length),o>(r=Math.max(Math.ceil(a/7),s)+2)&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.reverse()}else{for((h=(r=c.length)<(s=f.length))&&(s=r),r=0;r0;--r)c[s++]=0;for(r=f.length;r>o;){if(c[--r](s=(o=Math.ceil(a/7))>s?o+1:s+1)&&(i=s,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for((s=c.length)-(i=l.length)<0&&(i=s,n=l,l=c,c=n),t=0;i;)t=(c[--i]=c[i]+l[i]+t)/1e7|0,c[i]%=1e7;for(t&&(c.unshift(t),++r),s=c.length;0==c[--s];)c.pop();return e.d=c,e.e=ns(c,r),tV?ni(e,a,u):e},t7.precision=t7.sd=function(e){var t;if(void 0!==e&&!!e!==e&&1!==e&&0!==e)throw Error(tX+e);return this.d?(t=nc(this.d),e&&this.e+1>t&&(t=this.e+1)):t=NaN,t},t7.round=function(){var e=this.constructor;return ni(new e(this),this.e+1,e.rounding)},t7.sine=t7.sin=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(e,t){var n,r=t.d.length;if(r<3)return t.isZero()?t:nb(e,2,t,t);n=(n=1.4*Math.sqrt(r))>16?16:0|n,t=nb(e,2,t=t.times(1/nE(5,n)),t);for(var i,o=new e(5),s=new e(16),a=new e(20);n--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}(r,ny(r,n)),r.precision=e,r.rounding=t,ni(tF>2?n.neg():n,e,t,!0)):new r(NaN)},t7.squareRoot=t7.sqrt=function(){var e,t,n,r,i,o,s=this.d,a=this.e,u=this.s,c=this.constructor;if(1!==u||!s||!s[0])return new c(!u||u<0&&(!s||s[0])?NaN:s?this:1/0);for(tV=!1,0==(u=Math.sqrt(+this))||u==1/0?(((t=t4(s)).length+a)%2==0&&(t+="0"),u=Math.sqrt(t),a=t0((a+1)/2)-(a<0||a%2),r=new c(t=u==1/0?"5e"+a:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+a)):r=new c(u.toString()),n=(a=c.precision)+3;;)if(r=(o=r).plus(nr(this,o,n+2,1)).times(.5),t4(o.d).slice(0,n)===(t=t4(r.d)).slice(0,n)){if("9999"!=(t=t.slice(n-3,n+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(ni(r,a+1,1),e=!r.times(r).eq(this));break}if(!i&&(ni(o,a+1,0),o.times(o).eq(this))){r=o;break}n+=4,i=1}return tV=!0,ni(r,a,c.rounding,e)},t7.tangent=t7.tan=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,(n=n.sin()).s=1,n=nr(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,ni(2==tF||4==tF?n.neg():n,e,t,!0)):new r(NaN)},t7.times=t7.mul=function(e){var t,n,r,i,o,s,a,u,c,l=this.constructor,h=this.d,f=(e=new l(e)).d;if(e.s*=this.s,!h||!h[0]||!f||!f[0])return new l(e.s&&(!h||h[0]||f)&&(!f||f[0]||h)?h&&f?0*e.s:e.s/0:NaN);for(n=t0(this.e/7)+t0(e.e/7),(u=h.length)<(c=f.length)&&(o=h,h=f,f=o,s=u,u=c,c=s),o=[],r=s=u+c;r--;)o.push(0);for(r=c;--r>=0;){for(t=0,i=u+r;i>r;)a=o[i]+f[r]*h[i-r-1]+t,o[i--]=a%1e7|0,t=a/1e7|0;o[i]=(o[i]+t)%1e7|0}for(;!o[--s];)o.pop();return t?++n:o.shift(),e.d=o,e.e=ns(o,n),tV?ni(e,l.precision,l.rounding):e},t7.toBinary=function(e,t){return n_(this,2,e,t)},t7.toDecimalPlaces=t7.toDP=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(ne(e,0,1e9),void 0===t?t=r.rounding:ne(t,0,8),ni(n,e+n.e+1,t))},t7.toExponential=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=no(r,!0):(ne(e,0,1e9),void 0===t?t=i.rounding:ne(t,0,8),n=no(r=ni(new i(r),e+1,t),!0,e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},t7.toFixed=function(e,t){var n,r,i=this.constructor;return void 0===e?n=no(this):(ne(e,0,1e9),void 0===t?t=i.rounding:ne(t,0,8),n=no(r=ni(new i(this),e+this.e+1,t),!1,e+r.e+1)),this.isNeg()&&!this.isZero()?"-"+n:n},t7.toFraction=function(e){var t,n,r,i,o,s,a,u,c,l,h,f,p=this.d,d=this.constructor;if(!p)return new d(this);if(c=n=new d(1),r=u=new d(0),s=(o=(t=new d(r)).e=nc(p)-this.e-1)%7,t.d[0]=t1(10,s<0?7+s:s),null==e)e=o>0?t:c;else{if(!(a=new d(e)).isInt()||a.lt(c))throw Error(tX+a);e=a.gt(t)?o>0?t:c:a}for(tV=!1,a=new d(t4(p)),l=d.precision,d.precision=o=7*p.length*2;h=nr(a,t,0,1,1),1!=(i=n.plus(h.times(r))).cmp(e);)n=r,r=i,i=c,c=u.plus(h.times(i)),u=i,i=t,t=a.minus(h.times(i)),a=i;return i=nr(e.minus(n),r,0,1,1),u=u.plus(i.times(c)),n=n.plus(i.times(r)),u.s=c.s=this.s,f=1>nr(c,r,o,1).minus(this).abs().cmp(nr(u,n,o,1).minus(this).abs())?[c,r]:[u,n],d.precision=l,tV=!0,f},t7.toHexadecimal=t7.toHex=function(e,t){return n_(this,16,e,t)},t7.toNearest=function(e,t){var n=this,r=n.constructor;if(n=new r(n),null==e){if(!n.d)return n;e=new r(1),t=r.rounding}else{if(e=new r(e),void 0===t?t=r.rounding:ne(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(tV=!1,n=nr(n,e,0,t,1).times(e),tV=!0,ni(n)):(e.s=n.s,n=e),n},t7.toNumber=function(){return+this},t7.toOctal=function(e,t){return n_(this,8,e,t)},t7.toPower=t7.pow=function(e){var t,n,r,i,o,s,a=this,u=a.constructor,c=+(e=new u(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new u(t1(+a,c));if((a=new u(a)).eq(1))return a;if(r=u.precision,o=u.rounding,e.eq(1))return ni(a,r,o);if((t=t0(e.e/7))>=e.d.length-1&&(n=c<0?-c:c)<=9007199254740991)return i=nh(u,a,n,r),e.s<0?new u(1).div(i):ni(i,r,o);if((s=a.s)<0){if(tu.maxE+1||t0?s/0:0):(tV=!1,u.rounding=a.s=1,n=Math.min(12,(t+"").length),(i=nd(e.times(ng(a,r+n)),r)).d&&nt((i=ni(i,r+5,1)).d,r,o)&&(t=r+10,+t4((i=ni(nd(e.times(ng(a,t+n)),t),t+5,1)).d).slice(r+1,r+15)+1==1e14&&(i=ni(i,r+1,0))),i.s=s,tV=!0,u.rounding=o,ni(i,r,o))},t7.toPrecision=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=no(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(ne(e,1,1e9),void 0===t?t=i.rounding:ne(t,0,8),n=no(r=ni(new i(r),e,t),e<=r.e||r.e<=i.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+n:n},t7.toSignificantDigits=t7.toSD=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(ne(e,1,1e9),void 0===t?t=n.rounding:ne(t,0,8)),ni(new n(this),e,t)},t7.toString=function(){var e=this.constructor,t=no(this,this.e<=e.toExpNeg||this.e>=e.toExpPos);return this.isNeg()&&!this.isZero()?"-"+t:t},t7.truncated=t7.trunc=function(){return ni(new this.constructor(this),this.e+1,1)},t7.valueOf=t7.toJSON=function(){var e=this.constructor,t=no(this,this.e<=e.toExpNeg||this.e>=e.toExpPos);return this.isNeg()?"-"+t:t};var nr=function(){function e(e,t,n){var r,i=0,o=e.length;for(e=e.slice();o--;)r=e[o]*t+i,e[o]=r%n|0,i=r/n|0;return i&&e.unshift(i),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;it[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]1;)e.shift()}return function(r,i,o,s,a,u){var c,l,h,f,p,d,g,m,v,b,E,y,_,A,w,T,N,S,O,I,P=r.constructor,R=r.s==i.s?1:-1,L=r.d,B=i.d;if(!L||!L[0]||!B||!B[0])return new P(r.s&&i.s&&(L?!B||L[0]!=B[0]:B)?L&&0==L[0]||!B?0*R:R/0:NaN);for(u?(p=1,l=r.e-i.e):(u=1e7,p=7,l=t0(r.e/p)-t0(i.e/p)),O=B.length,N=L.length,b=(v=new P(R)).d=[],h=0;B[h]==(L[h]||0);h++);if(B[h]>(L[h]||0)&&l--,null==o?(A=o=P.precision,s=P.rounding):A=a?o+(r.e-i.e)+1:o,A<0)b.push(1),d=!0;else{if(A=A/p+2|0,h=0,1==O){for(f=0,B=B[0],A++;(h1&&(B=e(B,f,u),L=e(L,f,u),O=B.length,N=L.length),T=O,y=(E=L.slice(0,O)).length;y=u/2&&++S;do f=0,(c=t(B,E,O,y))<0?(_=E[0],O!=y&&(_=_*u+(E[1]||0)),(f=_/S|0)>1?(f>=u&&(f=u-1),1==(c=t(g=e(B,f,u),E,m=g.length,y=E.length))&&(f--,n(g,O=10;f/=10)h++;v.e=h+l*p-1,ni(v,a?o+v.e+1:o,s,d)}return v}}();function ni(e,t,n,r){var i,o,s,a,u,c,l,h,f,p=e.constructor;e:if(null!=t){if(!(h=e.d))return e;for(i=1,a=h[0];a>=10;a/=10)i++;if((o=t-i)<0)o+=7,s=t,u=(l=h[f=0])/t1(10,i-s-1)%10|0;else if((f=Math.ceil((o+1)/7))>=(a=h.length)){if(!r)break e;for(;a++<=f;)h.push(0);l=u=0,i=1,s=(o%=7)-7+1}else{for(l=a=h[f],i=1;a>=10;a/=10)i++;u=(s=(o%=7)-7+i)<0?0:l/t1(10,i-s-1)%10|0}if(r=r||t<0||void 0!==h[f+1]||(s<0?l:l%t1(10,i-s-1)),c=n<4?(u||r)&&(0==n||n==(e.s<0?3:2)):u>5||5==u&&(4==n||r||6==n&&(o>0?s>0?l/t1(10,i-s):0:h[f-1])%10&1||n==(e.s<0?8:7)),t<1||!h[0])return h.length=0,c?(t-=e.e+1,h[0]=t1(10,(7-t%7)%7),e.e=-t||0):h[0]=e.e=0,e;if(0==o?(h.length=f,a=1,f--):(h.length=f+1,a=t1(10,7-o),h[f]=s>0?(l/t1(10,i-s)%t1(10,s)|0)*a:0),c)for(;;){if(0==f){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,1e7==h[0]&&(h[0]=1));break}if(h[f]+=a,1e7!=h[f])break;h[f--]=0,a=1}for(o=h.length;0===h[--o];)h.pop()}return tV&&(e.e>p.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+nl(r):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+nl(-i-1)+o,n&&(r=n-s)>0&&(o+=nl(r))):i>=s?(o+=nl(i+1-s),n&&(r=n-i-1)>0&&(o=o+"."+nl(r))):((r=i+1)0&&(i+1===s&&(o+="."),o+=nl(r))),o}function ns(e,t){var n=e[0];for(t*=7;n>=10;n/=10)t++;return t}function na(e,t,n){if(t>t9)throw tV=!0,n&&(e.precision=n),Error(tJ);return ni(new e(tZ),t,1,!0)}function nu(e,t,n){if(t>t5)throw Error(tJ);return ni(new e(tq),t,n,!0)}function nc(e){var t=e.length-1,n=7*t+1;if(t=e[t]){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function nl(e){for(var t="";e--;)t+="0";return t}function nh(e,t,n,r){var i,o=new e(1),s=Math.ceil(r/7+4);for(tV=!1;;){if(n%2&&nA((o=o.times(t)).d,s)&&(i=!0),0===(n=t0(n/2))){n=o.d.length-1,i&&0===o.d[n]&&++o.d[n];break}nA((t=t.times(t)).d,s)}return tV=!0,o}function nf(e){return 1&e.d[e.d.length-1]}function np(e,t,n){for(var r,i,o=new e(t[0]),s=0;++s17)return new f(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(null==t?(tV=!1,u=d):u=t,a=new f(.03125);e.e>-2;)e=e.times(a),h+=5;for(u+=r=Math.log(t1(2,h))/Math.LN10*2+5|0,n=o=s=new f(1),f.precision=u;;){if(o=ni(o.times(e),u,1),n=n.times(++l),t4((a=s.plus(nr(o,n,u,1))).d).slice(0,u)===t4(s.d).slice(0,u)){for(i=h;i--;)s=ni(s.times(s),u,1);if(null!=t)return f.precision=d,s;if(!(c<3&&nt(s.d,u-r,p,c)))return ni(s,f.precision=d,p,tV=!0);f.precision=u+=10,n=o=a=new f(1),l=0,c++}s=a}}function ng(e,t){var n,r,i,o,s,a,u,c,l,h,f,p=1,d=e,g=d.d,m=d.constructor,v=m.rounding,b=m.precision;if(d.s<0||!g||!g[0]||!d.e&&1==g[0]&&1==g.length)return new m(g&&!g[0]?-1/0:1!=d.s?NaN:g?0:d);if(null==t?(tV=!1,l=b):l=t,m.precision=l+=10,r=(n=t4(g)).charAt(0),!(15e14>Math.abs(o=d.e)))return c=na(m,l+2,b).times(o+""),d=ng(new m(r+"."+n.slice(1)),l-10).plus(c),m.precision=b,null==t?ni(d,b,v,tV=!0):d;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=t4((d=d.times(e)).d)).charAt(0),p++;for(o=d.e,r>1?(d=new m("0."+n),o++):d=new m(r+"."+n.slice(1)),h=d,u=s=d=nr(d.minus(1),d.plus(1),l,1),f=ni(d.times(d),l,1),i=3;;){if(s=ni(s.times(f),l,1),t4((c=u.plus(nr(s,new m(i),l,1))).d).slice(0,l)===t4(u.d).slice(0,l)){if(u=u.times(2),0!==o&&(u=u.plus(na(m,l+2,b).times(o+""))),u=nr(u,new m(p),l,1),null!=t)return m.precision=b,u;if(!nt(u.d,l-10,v,a))return ni(u,m.precision=b,v,tV=!0);m.precision=l+=10,c=s=d=nr(h.minus(1),h.plus(1),l,1),f=ni(d.times(d),l,1),i=a=1}u=c,i+=2}}function nm(e){return String(e.s*e.s/0)}function nv(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);r++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(r,i)){if(i-=r,e.e=n=n-r-1,e.d=[],r=(n+1)%7,n<0&&(r+=7),re.constructor.maxE?(e.d=null,e.e=NaN):e.e=0&&(l=l.replace(".",""),(f=new p(1)).e=l.length-s,f.d=nn(no(f),10,i),f.e=f.d.length),o=u=(h=nn(l,10,i)).length;0==h[--u];)h.pop();if(h[0]){if(s<0?o--:((e=new p(e)).d=h,e.e=o,h=(e=nr(e,f,n,r,0,i)).d,o=e.e,c=t$),s=h[n],a=i/2,c=c||void 0!==h[n+1],c=r<4?(void 0!==s||c)&&(0===r||r===(e.s<0?3:2)):s>a||s===a&&(4===r||c||6===r&&1&h[n-1]||r===(e.s<0?8:7)),h.length=n,c)for(;++h[--n]>i-1;)h[n]=0,n||(++o,h.unshift(1));for(u=h.length;!h[u-1];--u);for(s=0,l="";s1){if(16==t||8==t){for(s=16==t?4:3,--u;u%s;u++)l+="0";for(u=(h=nn(l,i,t)).length;!h[u-1];--u);for(s=1,l="1.";su)for(o-=u;o--;)l+="0";else ot)return e.length=t,!0}function nw(e){return new this(e).abs()}function nT(e){return new this(e).acos()}function nN(e){return new this(e).acosh()}function nS(e,t){return new this(e).plus(t)}function nO(e){return new this(e).asin()}function nI(e){return new this(e).asinh()}function nP(e){return new this(e).atan()}function nR(e){return new this(e).atanh()}function nL(e,t){e=new this(e),t=new this(t);var n,r=this.precision,i=this.rounding,o=r+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(n=t.s<0?nu(this,r,i):new this(0)).s=e.s:!e.d||t.isZero()?(n=nu(this,o,1).times(.5)).s=e.s:t.s<0?(this.precision=o,this.rounding=1,n=this.atan(nr(e,t,o,1)),t=nu(this,o,1),this.precision=r,this.rounding=i,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(nr(e,t,o,1)):(n=nu(this,o,1).times(t.s>0?.25:.75)).s=e.s:n=new this(NaN),n}function nB(e){return new this(e).cbrt()}function nU(e){return ni(e=new this(e),e.e+1,2)}function nM(e,t,n){return new this(e).clamp(t,n)}function nH(e){if(!e||"object"!=typeof e)throw Error(tz+"Object expected");var t,n,r,i=!0===e.defaults,o=["precision",1,1e9,"rounding",0,8,"toExpNeg",-9e15,0,"toExpPos",0,9e15,"maxE",0,9e15,"minE",-9e15,0,"modulo",0,9];for(t=0;t=o[t+1]&&r<=o[t+2]))throw Error(tX+n+": "+r);this[n]=r}if(n="crypto",i&&(this[n]=tY[n]),void 0!==(r=e[n])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(tX+n+": "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(tW);this[n]=!0}else this[n]=!1}return this}function nD(e){return new this(e).cos()}function nC(e){return new this(e).cosh()}function nG(e,t){return new this(e).div(t)}function nx(e){return new this(e).exp()}function nj(e){return ni(e=new this(e),e.e+1,3)}function nk(){var e,t,n=new this(0);for(tV=!1,e=0;e=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else{if(!crypto.randomBytes)throw Error(tW);for(t=crypto.randomBytes(r*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=r/4}}else for(;o=10;i/=10)r++;r<7&&(n-=7-r)}return s.e=n,s.d=a,s}function nQ(e){return ni(e=new this(e),e.e+1,this.rounding)}function n0(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function n1(e){return new this(e).sin()}function n2(e){return new this(e).sinh()}function n6(e){return new this(e).sqrt()}function n8(e,t){return new this(e).sub(t)}function n3(){var e=0,t=arguments,n=new this(t[0]);for(tV=!1;n.s&&++eo.maxE?(this.e=NaN,this.d=null):e.e=10;n/=10)t++;return void(tV?t>o.maxE?(this.e=NaN,this.d=null):t-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),t3.test(t))return nv(e,t)}else if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(t6.test(t))n=16,t=t.toLowerCase();else if(t2.test(t))n=2;else{if(!t8.test(t))throw Error(tX+t);n=8}for((o=t.search(/p/i))>0?(u=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),s=(o=t.indexOf("."))>=0,r=e.constructor,s&&(o=(a=(t=t.replace(".","")).length)-o,i=nh(r,new r(n),o,2*o)),o=l=(c=nn(t,n,1e7)).length-1;0===c[o];--o)c.pop();return o<0?new r(0*e.s):(e.e=ns(c,l),e.d=c,tV=!1,s&&(e=nr(e,i,4*a)),u&&(e=e.times(54>Math.abs(u)?t1(2,u):n4.pow(2,u))),tV=!0,e)}(this,e);if("bigint"===r)return e<0?(e=-e,this.s=-1):this.s=1,nv(this,e.toString());throw Error(tX+e)}if(o.prototype=t7,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.EUCLID=9,o.config=o.set=nH,o.clone=e,o.isDecimal=n$,o.abs=nw,o.acos=nT,o.acosh=nN,o.add=nS,o.asin=nO,o.asinh=nI,o.atan=nP,o.atanh=nR,o.atan2=nL,o.cbrt=nB,o.ceil=nU,o.clamp=nM,o.cos=nD,o.cosh=nC,o.div=nG,o.exp=nx,o.floor=nj,o.hypot=nk,o.ln=nF,o.log=nK,o.log10=nq,o.log2=nZ,o.max=nY,o.min=nV,o.mod=nz,o.mul=nX,o.pow=nJ,o.random=nW,o.round=nQ,o.sign=n0,o.sin=n1,o.sinh=n2,o.sqrt=n6,o.sub=n8,o.sum=n3,o.tan=n9,o.tanh=n5,o.trunc=n7,void 0===t&&(t={}),t&&!0!==t.defaults)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],n=0;n{let n=Number(e);!ty(n)&&t_(n)||(n=0);let r=Number(t);ty(r)&&(r=8);let i="";if(tA(n)){if(r>0){i=`${n}.`;for(let e=0;e=0||i.indexOf("E-")>=0)&&(i=n.toFixed(r+1));let e=i.split("."),t=e[0];if(0===r)return`${t}`;let o=e[1];if(o.length{let n=re(e,t),r="(\\d)(?=(\\d{3})+\\.)";return -1===n.indexOf(".")&&(r="(\\d)(?=(\\d{3})+$)"),n.replace(RegExp(r,"g"),"$1,")},rn=(e,t,n="div")=>tE(1*e)&&tE(1*t)?new n4(1*e)[n](new n4(1*t)).toNumber():null,rr=(e,t="en-US",n=!0)=>{if(!tE(1*e)||ty(1*e))return null;let r=new Intl.NumberFormat(t,{notation:"compact"}).format(1*e);return n?null==r?void 0:r.toLocaleLowerCase():r},ri=(e,t=1)=>{let n=10**(t-1);return Math.floor(Number(e)*n*2)/2/n},ro=["id-ID","nl-NL","nl-EU","pt-PT","pt-EU","pt-BR","es-ES","es-EU","es-MX","es-AR","vi-VN","ro-RO","ro-EU","de-DE","de","de-EU","it-IT","it-EU","it","tr-TR","tr-TUR","id-IDN"],rs=["ru-RU","uk-UA","pl-PL","pl-EU","fr-FR","fr","fr-EU","kk-KZ","kk-KAZ","ka-GEO","ru-GEO"],ra=e=>ro.includes(e)?"TYPE1":rs.includes(e)?"TYPE2":"DEFAULT",ru=(e,n)=>{let r="en";["TYPE1"].includes(n)?r="id-ID":["TYPE2"].includes(n)&&(r="ru-RU");try{t=new Intl.NumberFormat(r,{minimumFractionDigits:0,maximumFractionDigits:0})}catch(e){console.warn("Invalid locale, falling back to en"),t=new Intl.NumberFormat("en")}return["TYPE2"].includes(n)&&e>=1e3&&e<1e4?e:t.format(e)},rc=(e,t)=>{if(""===t||null==t||Number.isNaN(t)||0>+t)return null==e?void 0:e.toString();let n=t?+t:0,r=e.toString(),i=r.indexOf(".");return -1!==i?(r=r.slice(0,i+1+n),n<=0?r.split(".")[0]:r):r},rl=(e,t,n="en")=>{var r;if(0===e)return"0";if(!e||Number.isNaN(+e))return e;let i=ra(n),o=["TYPE1","TYPE2"].includes(i)?",":".",s=(null===(r=rc(e,t))||void 0===r?void 0:r.replace(/\./g,o)).split(o);return s[0]=ru(s[0],i),s.join(o)},rh=(e,t,n="en")=>{var r,i;if(0===e)return"0";if(!e||Number.isNaN(+e))return e;let o=t||(0===t?0:4),s=ra(n),a=null===(r=Number(e))||void 0===r?void 0:r.toFixed(o),u=["TYPE1","TYPE2"].includes(s)?",":".",c=(null===(i=rc(a,o))||void 0===i?void 0:i.replace(/\./g,u)).split(u);return c[0]=ru(c[0],s),c.join(u)},rf=({url:e,async:t,name:n,...r})=>new Promise(i=>{(function(e){let t=Array.from(document.getElementsByTagName("script")),n=!1;for(let r=0,i=t.length;r{i({name:n})}});function rp(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}function rd(){return`${rp()}${rp()}-${rp()}-${rp()}-${rp()}-${rp()}${rp()}${rp()}`}let rg=e=>{let{search:t}=e;return t?t.slice(1).split("&").reduce((e,t)=>{let[n,r]=t.split("=");return{...e,[n]:decodeURIComponent(r)}},{}):{}},rm=e=>{let[,t]=e.href.split("?");return t?t.split("&").reduce((e,t)=>{let[n,r]=t.split("=");return{...e,[n]:decodeURIComponent(r)}},{}):{}},rv=e=>{let t;if(!e)return t;try{t=new URL(e)}catch(e){console.warn(e)}return t},rb=(e="")=>{let t=e.split(".");return t.slice(-(t.length-1)).join(".")},rE=(e="",t="")=>rb(e)===rb(t),ry=e=>"",r_=e=>e,rA=!0,rw="USA"===eC?"byore-test-1":"unify-test-1",rT="USA"===eC?g:f,rN="com",rS="";if("development"!==ey&&eM){rA=!1;let e=eM.split(".");3===e.length&&([rw,rT,rN]=e),4===e.length&&(ea?([rw,rT,rN,rS]=e,rN=`${rN}.${rS}`):[,rw,rT,rN]=e),5===e.length&&([,rw,rT,rN,rS]=e,rN=`${rN}.${rS}`)}let rO=rA&&("dev-3"===rw||"test-3"===rw),rI=/^(www|m)$/,rP="testnet"===rw||"m-testnet"===rw,rR="s1.bycsi.com",rL=/^(www|m|testnet|m-testnet)$/.test(rw),rB=rP?"t1.bycsi.com":rR,rU=rw,rM=`${rT}.${rN}`,rH="api2."+(rI.test(rw)?"":`${rw}.`),rD="ws2."+(rI.test(rw)?"":`${rw}.`),rC="chat."+(rI.test(rw)?"":`${rw}.`),rG="affiliates.";rP&&(rH="api2-testnet.",rC="chat-testnet.",rD="ws2-testnet.",rG="affiliates-testnet."),rL||(rG=`affiliates.${rw}.`);let rx=`https://${rG}${rT}.${rN}`,rj=rH,rk=rD,r$=rT,rF=rN,rK=eg||"b_t_c_k"+(rI.test(rw)?"":`_${rw}`),rZ=`https://${rR}`,rq=`https://${rB}`,rY=ep||"https:",rV=`${rY}//${rC}${rT}.${rN}/chat/by-chat-widget.js`,rz=rO?"https:":rY,rX=rO?"wss:":void 0!==ep&&"https:"===ep?"wss:":"ws:",rJ=ev||"/x-api",rW=eb||`${rX}//${rk}${rT}.${rN}`,rQ=`${rY}//infra-gateway.${rw}.${rT}.${rN}`,r0=`${rX}//www.${rw}.${rT}.${rN}`,r1=rI.test(rw)?"":`_${rw}`,r2=`https://help.${rT}.com`,r6=`https://blog.${rT}.com`,r8=`${r2}/hc`,r3={"en-US":"en-us","zh-CN":"zh-cn","zh-TW":"zh-tw","ja-JP":"ja","ko-KR":"ko","ru-RU":"en-us","vi-VN":"en-us"},r9=rL?"":K,r5=(e,t)=>`${r9}/${e||"en-US"}/help-center/${t}`,r7=`https://www.${m}.com`,r4=`https://www.${B}`,ie=`https://www.${R}`,it=`https://www.${L}`,ir=`https://www.${G}`,ii=`https://www.${H}`,io=`https://www.${k}`,is=`https://www.${$}`,ia=`https://www.${j}`,iu=[p,"EU","KAZ","GEO","TUR"],ic={[p]:[{domain:K,locale:"en",hreflang:"x-default"},{domain:K,locale:"en",hreflang:"en"},{domain:K,locale:"fr-FR",hreflang:"fr"},{domain:K,locale:"es-ES",hreflang:"es-ES"},{domain:K,locale:"es-MX",hreflang:"es-MX"},{domain:K,locale:"es-AR",hreflang:"es-AR"},{domain:K,locale:"pt-BR",hreflang:"pt-BR"},{domain:K,locale:"pt-PT",hreflang:"pt-PT"},{domain:K,locale:"vi-VN",hreflang:"vi-VN"},{domain:K,locale:"ja-JP",hreflang:"ja-JP"},{domain:K,locale:"zh-TW",hreflang:"zh-TW"},{domain:K,locale:"ru-RU",hreflang:"ru-RU"},{domain:K,locale:"uk-UA",hreflang:"uk-UA"},{domain:K,locale:"ar-SA",hreflang:"ar-SA"},{domain:K,locale:"en-GB",hreflang:"en-GB"},{domain:r7,locale:"zh-MY",hreflang:"zh-MY"},{domain:r7,locale:"en",hreflang:"en-MY"},{domain:`https://www.${f}-global.com`,locale:"id-ID",hreflang:"id-ID"}],EU:[{domain:ie,locale:"de-EU",hreflang:"de"},{domain:ie,locale:"es-EU",hreflang:"es"},{domain:ie,locale:"pt-EU",hreflang:"pt"},{domain:ie,locale:"pl-EU",hreflang:"pl"},{domain:ie,locale:"ro-EU",hreflang:"ro"},{domain:ie,locale:"it-EU",hreflang:"it"},{domain:ie,locale:"fr-EU",hreflang:"fr-FR"},{domain:ie,locale:"nl-EU",hreflang:"nl"},{domain:ie,locale:"en-EU",hreflang:"en-DE"},{domain:ie,locale:"en-EU",hreflang:"en-ES"},{domain:ie,locale:"en-EU",hreflang:"en-FR"},{domain:ie,locale:"en-EU",hreflang:"en-IT"},{domain:ie,locale:"en-EU",hreflang:"en-PL"},{domain:ie,locale:"en-EU",hreflang:"en-PT"},{domain:ie,locale:"en-EU",hreflang:"en-RO"},{domain:ie,locale:"en-EU",hreflang:"en-AT"},{domain:ie,locale:"en-EU",hreflang:"en-SE"},{domain:ie,locale:"en-EU",hreflang:"en-FI"},{domain:ie,locale:"cs-EU",hreflang:"cs"},{domain:ie,locale:"hu-EU",hreflang:"hu"},{domain:ie,locale:"lt-EU",hreflang:"lt"},{domain:ie,locale:"el-EU",hreflang:"el"},{domain:ie,locale:"en-EU",hreflang:"en-CZ"},{domain:ie,locale:"en-EU",hreflang:"en-GR"},{domain:ie,locale:"en-EU",hreflang:"en-LT"},{domain:ie,locale:"en-EU",hreflang:"en-HU"},{domain:ie,locale:"fi-EU",hreflang:"fi"},{domain:ie,locale:"sv-EU",hreflang:"sv"},{domain:ie,locale:"da-EU",hreflang:"da"},{domain:ie,locale:"no-EU",hreflang:"no"}],KAZ:[{domain:it,locale:"kk-KAZ",hreflang:"kk-KZ"},{domain:it,locale:"en-KAZ",hreflang:"en-KZ"},{domain:it,locale:"ru-KAZ",hreflang:"ru-KZ"}],GEO:[{domain:ir,locale:"en-GEO",hreflang:"en-GE"},{domain:ir,locale:"ru-GEO",hreflang:"ru-GE"},{domain:ir,locale:"ka-GEO",hreflang:"ka-GE"}],IDN:[{domain:ii,locale:"id-IDN",hreflang:"id-ID"},{domain:ii,locale:"en-IDN",hreflang:"en-ID"}],USA:[{domain:io,locale:"en-USA",hreflang:"x-default"},{domain:io,locale:"en-USA",hreflang:"en-US"}],TUR:[{domain:r4,locale:"tr-TUR",hreflang:"tr-TR"},{domain:r4,locale:"en-TR",hreflang:"en-TR"}],THA:[{domain:is,locale:"en-THA",hreflang:"x-default"},{domain:is,locale:"en-THA",hreflang:"en-TH"},{domain:is,locale:"th-THA",hreflang:"th-TH"}],JPN:[{domain:ia,locale:"ja-JPN",hreflang:"x-default"},{domain:ia,locale:"en-JPN",hreflang:"en-JP"},{domain:ia,locale:"ja-JPN",hreflang:"ja-JP"}]};class il{static getConfigs(e){return(Array.isArray(e)&&e.length>0?e:iu).reduce((e,t)=>e.concat(ic[null==t?void 0:t.toUpperCase()]||[]),[])}static isLocaleSegment(e){return e.match(/^(\/?([a-z]{2,3}-[A-Z]{2,3}|[a-z]{2}))?$/)}static processPath(e){let t=e.split("/").filter(Boolean),n=-1;t.forEach((e,t)=>{this.isLocaleSegment(e)&&(n=t)});let r=e.endsWith("/");return{segments:t,localeIndex:n,hasTrailingSlash:r}}static generateUrl(e,t){let{segments:n,localeIndex:r,hasTrailingSlash:i}=t,o=[...n];return -1!==r?o[r]=e.locale:o.unshift(e.locale),`${e.domain}/${o.join("/")}${i?"/":""}`}static generateHreflangArray(e,t){let n;let r=this.processPath(e),i=r.segments[r.localeIndex]||"en",o=i0(i),s=["USA","THA","JPN"].includes(o)?[o]:t,a=this.getConfigs(s),u=null==a?void 0:a.filter(e=>e.locale===i);u.length>0?[n]=u:n={domain:`https://www.${ei[o]||x}`,locale:i,hreflang:"en"};let c=[...r.segments];return -1!==r.localeIndex?c[r.localeIndex]=n.locale:c.unshift(n.locale),[{href:`${n.domain}/${c.join("/")}${r.hasTrailingSlash?"/":""}`,hreflang:"x-default",isCanonical:!0},...a.map(e=>({href:this.generateUrl(e,r),hreflang:e.hreflang,isCanonical:!1}))]}static generateHreflangHtml(e){let t=e.find(e=>e.isCanonical),n=e.map(({href:e,hreflang:t})=>``);return t?` ${n.join("\n")}`:n.join("\n")}}let ih=e=>il.getConfigs(e),ip=(e,t)=>il.generateHreflangArray(e,t),id=(e,t)=>il.generateHreflangHtml(ip(e,t)),ig="LANG_KEY",im="_by_l_g_d",iv="THEME_KEY",ib="GA_UID_KEY";Object.entries({[p+"_LANG_KEY"]:ig,[p+"_THEME_KEY"]:iv,[p+"_GA_UID"]:ib}).reduce((e,[t,n])=>(e[n]=t,e),{});let iE={[`www.unify-test-1.${f}.com`]:{tgBotId:"7453696231",tgBotName:`${d}DevBot`},[`www.unify-test-3.${f}.com`]:{tgBotId:"8053134383",tgBotName:"unify3_bot"},[`testnet.${f}.com`]:{tgBotId:"6703577986",tgBotName:`${d}_Testnet01_bot`},[`www.${f}.com`]:{tgBotId:"7572073992",tgBotName:`${d}_Mainnet_bot`},[`www.${f}-global.com`]:{tgBotId:"6938202067",tgBotName:`${d}_Mainnet02_bot`},[`www.${f}.biz`]:{tgBotId:"6698911653",tgBotName:`${d}_Mainnet03_bot`},[`www.${f}.cloud`]:{tgBotId:"6974167684",tgBotName:`${d}_Mainnet04_bot`},[`www.${f}.global`]:{tgBotId:"6912768786",tgBotName:`${d}_Mainnet05_bot`},[`www.${f}.org`]:{tgBotId:"6589825292",tgBotName:`${d}_Mainnet06_bot`},[`www.${f}gum.com`]:{tgBotId:"6764683135",tgBotName:`${d}_Mainnet07_bot`},[`www.${f}gum.org`]:{tgBotId:"6984382499",tgBotName:`${d}_Mainnet08_bot`},[`www.${f}s.io`]:{tgBotId:"6731628027",tgBotName:`${d}_Mainnet09_bot`},"www.bycloud.org":{tgBotId:"6800931970",tgBotName:`${d}_Mainnet10_bot`},[`www.${f}s.org`]:{tgBotId:"6805006154",tgBotName:`${d}_Mainnet11_bot`},[`www.${f}x.global`]:{tgBotId:"6842627606",tgBotName:`${d}_Mainnet12_bot`},[`www.${f}global.com`]:{tgBotId:"6838232897",tgBotName:`${d}_Mainnet13_bot`},"www.bytick.com":{tgBotId:"6357490882",tgBotName:`${d}_Mainnet14_bot`},[`testnet.${G}`]:{tgBotId:"7715624626",tgBotName:`${d}_Testnet_GE_bot`},[`www.${G}`]:{tgBotId:"7837890882",tgBotName:`${d}_Mainnet_GE_bot`},[`www.unify-test-1.${H}`]:{tgBotId:"8029996074",tgBotName:"unify_test_1_ide_bot"},[`testnet.${H}`]:{tgBotId:"7655265705",tgBotName:`${d}_Testnet_ID_bot`},[`www.${H}`]:{tgBotId:"8101541806",tgBotName:`${d}_Mainnet_ID_bot`},[`www.unify-test-1.${D}`]:{tgBotId:"7876590504",tgBotName:`${f}_ae_bot`},[`testnet.${D}`]:{tgBotId:"7845464164",tgBotName:`${d}_Testnet_AE_bot`},[`www.${D}`]:{tgBotId:"7700658388",tgBotName:`${d}_Mainnet_AE_bot`}},iy=void 0,i_=[`${f}.biz`,`${f}.cloud`,`${f}.global`,`${f}.com`,`${m}.com`,`${f}.global`,`${f}s.io`,`${f}s.org`,`${f}-global.com`,"bycloud.org","bytick.com",`${f}gum.com`,`${f}gum.org`,`explore${f}.com`,D,"seabit.net","byffbb.com","ng-dex.com","bit-love.com","bitlove-dex.com","byabcd.com","byapp.io","bygame.io","byeco.io","bbgum.biz",`${f}.org`,M,C,B,L,R,G,H,`${f}card.com`,`${f}cards.com`,`k${f}.com`,`love${f}.com`],iA=[`www.unify-test-3.${f}.com`,`www.unify-test-3.${f}.com`,`www.bybit-test-1.${f}.com`,`.love${f}.com`,`.cb${f}.com`,".d-by-bit.com",`.j${f}.com`,`.b${G}`],iw="GLOBAL_THEME_KEY",iT="GLOBAL_SITE_KEY",iN="TDID_V2_KEY",iS={dark:`${rZ}/asset/image/logo-white.svg`,light:`${rZ}/asset/image/logo-dark.svg`},iO=`${rZ}/assets/image/d-${r$}.png`,iI={"en-US":"en",en:"en","zh-MY":"zh","ja-JP":"ja","ko-KR":"ko","ru-RU":"ru","vi-VN":"vi","zh-TW":"zh-tw","zh-HK":"zh-tw","en-HK":"en","es-ES":"es","pt-BR":"pt","fr-FR":"fr","id-ID":"id","uk-UA":"uk","kk-KZ":"kk","ar-SA":"ar","pt-PT":"pt","es-MX":"es","es-AR":"es","es-419":"es"},iP={"ro-RO":"ro","en-US":"en",en:"en","zh-MY":"zh","ja-JP":"ja","ko-KR":"ko","ru-RU":"ru","vi-VN":"vi","zh-TW":"zh_TW","zh-HK":"zh_TW","es-ES":"es","tr-TR":"tr","pt-BR":"pt","fr-FR":"fr","id-ID":"id_ID","uk-UA":"en","kk-KZ":"en","ar-SA":"ar","hi-IN":"en","pt-PT":"pt","es-MX":"es","es-AR":"es","es-419":"es"},iR=[{label:"English",lang:"EN",value:"en"},{label:"Bahasa Indonesia",lang:"ID",value:"id-ID"},{label:"Espa\xf1ol (Internacional)",lang:"ES",value:"es-ES"},{label:"Espa\xf1ol (M\xe9xico)",lang:"ES",value:"es-MX"},{label:"Espa\xf1ol (Argentina)",lang:"ES",value:"es-AR"},{label:"қазақша",lang:"KK",value:"kk-KZ"},{label:"Fran\xe7ais",lang:"FR",value:"fr-FR"},{label:"Portugu\xeas (Brasil)",lang:"BR",value:"pt-BR"},{label:"Portugu\xeas (Internacional)",lang:"PT",value:"pt-PT"},{label:"Русский",lang:"RU",value:"ru-RU"},{label:"Ti\xeáng Việt",lang:"VI",value:"vi-VN"},{label:"Українська",lang:"UK",value:"uk-UA"},{label:"العربيه",lang:"AR",value:"ar-SA"},{label:"日本語",lang:"JA",value:"ja-JP"},{label:"简体中文 (马来西亚)",lang:"ZH",value:"zh-MY"},{label:"繁體中文",lang:"ZH",value:"zh-TW"}],iL=[{label:"English (Great Britain)",lang:"EN",value:"en-GB"}],iB=[...iR,...iL,{label:"Polski",lang:"PL",value:"pl-PL"},{label:"Rom\xe2nǎ",lang:"RO",value:"ro-RO"}],iU=iR,iM=[{label:"繁體中文 (香港)",lang:"ZH",value:"zh-HK"},{label:"English(Hong Kong)",lang:"EN",value:"en-HK"}],iH=[{label:"Dutch",lang:"NL",value:"nl-NL"},{label:"English (Netherlands)",lang:"EN",value:"en-NL"}],iD=[{label:"T\xfcrk\xe7e",lang:"TR",value:"tr-TUR"},{label:"English(Turkey)",lang:"EN",value:"en-TR"}],iC=[{label:"Русский (Казахстан)",lang:"RU",value:"ru-KAZ"},{label:"Қазақша (Қазақстан)",lang:"KK",value:"kk-KAZ"},{label:"English (Kazakhstan)",lang:"EN",value:"en-KAZ"}],iG=[{label:"English",lang:"EN",value:"en-EU"},{label:"Čeština",lang:"CS",value:"cs-EU"},{label:"Dansk",lang:"DA",value:"da-EU"},{label:"Deutsch",lang:"DE",value:"de-EU"},{label:"Espa\xf1ol",lang:"ES",value:"es-EU"},{label:"Ελληνικά",lang:"EL",value:"el-EU"},{label:"Fran\xe7ais",lang:"FR",value:"fr-EU"},{label:"Italiano",lang:"IT",value:"it-EU"},{label:"Lietuvių",lang:"LT",value:"lt-EU"},{label:"Magyar",lang:"HU",value:"hu-EU"},{label:"Nederlands",lang:"NL",value:"nl-EU"},{label:"Norsk",lang:"NO",value:"no-EU"},{label:"Polski",lang:"PL",value:"pl-EU"},{label:"Portugu\xeas",lang:"PT",value:"pt-EU"},{label:"Rom\xe2nă",lang:"RO",value:"ro-EU"},{label:"Suomi",lang:"FI",value:"fi-EU"},{label:"Svenska",lang:"SV",value:"sv-EU"}],ix=[{label:"ქართული (საქართველო)",lang:"KA",value:"ka-GEO"},{label:"Русский (Грузия)",lang:"RU",value:"ru-GEO"},{label:"English (Georgia)",lang:"EN",value:"en-GEO"}],ij=[{label:"Bahasa Indonesia",lang:"ID",value:"id-IDN"},{label:"English (Indonesia)",lang:"EN",value:"en-IDN"}],ik=[{label:"English (UAE)",lang:"EN",value:"en-ARE"},{label:"العربيه",lang:"AR",value:"ar-ARE"}],i$=[{label:"日本語",lang:"JA",value:"ja-JPN"},{label:"English (Japan)",lang:"EN",value:"en-JPN"}],iF=[{label:"English",lang:"EN",value:"en-USA"}],iK=[{label:"Thai",lang:"TH",value:"th-THA"},{label:"English",lang:"EN",value:"en-THA"}],iZ=[...iB,...iM,...iD,...iC,...iH,...iG,...ix,...ij,...ik,...iF,...iK,...i$],iq={[p]:iB,HKG:iM,TUR:iD,KAZ:iC,NLD:iH,EU:iG,GEO:ix,IDN:ij,ARE:ik,USA:iF,THA:iK,JPN:i$},iY={[p]:"en",HKG:"zh-HK",TUR:"tr-TUR",KAZ:"kk-KAZ",NLD:"nl-NL",EU:"en-EU",GEO:"en-GEO",IDN:"id-IDN",ARE:"en-ARE",USA:"en-USA",THA:"th-THA",JPN:"ja-JPN"},iV="en";iV=iY[eC]||"en";let iz=iq[eC];eC===p&&(iz=iR),iz&&(iU=iz);let iX=iq[eC],iJ=e=>{},iW=()=>iV,iQ=e=>iU.find(t=>e===t.value)?e:iV,i0=e=>((e,t)=>{let n=Object.entries(t).find(([t,n])=>n.some(t=>t.value===e));return n?n[0]:p})(e,iq),i1=[{hostname:[ei.NLD],siteId:"NLD"},{hostname:[ei.ARE],siteId:"ARE"},{hostname:[ei.HKG],siteId:"HKG"},{hostname:[ei.TUR_OLD,ei.TUR],siteId:"TUR"},{hostname:[ei.KAZ],siteId:"KAZ"},{hostname:[ei.EU],siteId:"EU"},{hostname:[ei.GEO],siteId:"GEO"},{hostname:[ei.IDN],siteId:"IDN"},{hostname:[ei.JPN],siteId:"JPN"},{hostname:[ei.USA],siteId:"USA"},{hostname:[ei.THA],siteId:"THA"}],i2=["ar-SA","ar-ARE"],i6=`REG_REF_${eI}`,i8={[p]:Z,USA:q,EU:Y,TUR:V,THA:z,JPN:X},i3=e=>i8[e||eC]||Z,i9={[p]:"GTM-PMHBL76",USA:"GTM-TT967TJN"},i5={[p]:"GTM-NN3QBWC",USA:"GTM-TT967TJN"},i7=i9[eC]||i9[p],i4=i5[eC]||i5[p],oe="data-theme",ot="data-site",on={usa:/(^|\.)abfinance\.com$/i,tha:/(^|\.)waanx\.com$/i};function or(e){return["global","usa","tha"].includes(e)}function oi(e){return["light","dark"].includes(e)}function oo(e){for(let n in on){var t;if(null!==(t=on[n])&&void 0!==t&&t.test(e))return n}return""}function os(e){var t;if(null!=e&&e.site&&or(null==e||null===(t=e.site)||void 0===t?void 0:t.toLowerCase()))return e.site;if("undefined"!=typeof location){let e=new URLSearchParams(location.search).get("site");if(e&&or(e))return e}else if(null!=e&&e.pageUrl)try{let t=new URL(e.pageUrl).searchParams.get("site");if(t&&or(t))return t}catch(e){console.error("detectSite error",e)}if("undefined"!=typeof document){let e=document.documentElement.getAttribute("data-site");if(e&&or(e))return e}if("undefined"!=typeof location){let e=location.hostname;if(or(oo(e)))return oo(e)}else if(null!=e&&e.pageUrl)try{let t=new URL(e.pageUrl).hostname;if(or(oo(t)))return oo(t)}catch(e){console.error("detectSite hostname error",e)}return"global"}function oa(e){if(null!=e&&e.theme&&oi(e.theme))return e.theme;if("undefined"!=typeof location){let e=new URLSearchParams(location.search).get("theme");if(oi(e))return e}else if(null!=e&&e.pageUrl)try{let t=new URL(e.pageUrl).searchParams.get("theme");if(oi(t))return t}catch(e){console.error("detectTheme error",e)}if("undefined"!=typeof document){let e=document.documentElement.getAttribute(oe);if(oi(e))return e}return"light"}function ou(e){"undefined"!=typeof document&&(or(e)?(document.documentElement.removeAttribute(ot),document.documentElement.setAttribute(ot,e),"undefined"!=typeof localStorage&&localStorage.setItem(iT,e)):console.error("setSite error, not allowed site",e))}function oc(){if("undefined"==typeof location)return!1;let e=new URLSearchParams(location.search).get("theme");return null!==e&&oi(e)}function ol(e){"undefined"!=typeof document&&(oi(e)?(document.documentElement.removeAttribute(oe),document.documentElement.setAttribute(oe,e)):console.error("setTheme error, not allowed theme",e))}function oh(e){"undefined"!=typeof document&&(oc()?console.warn("Theme is locked by URL parameter, cannot change theme"):ol(e))}function of(){if("undefined"!=typeof document){if(oc())return void console.warn("Theme is locked by URL parameter, cannot toggle theme");oh("light"===(document.documentElement.getAttribute(oe)||"light")?"dark":"light")}}function op(e){e&&function(e){if("undefined"!=typeof document){null==e||e.enableThemeSwitch;let t=os(e),n=oa(e);document.documentElement.setAttribute(ot,t),document.documentElement.setAttribute(oe,n)}}(e)}function od(e){if("undefined"==typeof document)return;null==e||e.enableThemeSwitch;let t=os(e),n=oa(e);ou(t),ol(n)}function og(){if("undefined"==typeof document)return"global";let e=document.documentElement.getAttribute(ot);return e&&or(e)?e:"global"}function om(){if("undefined"==typeof document)return"light";let e=document.documentElement.getAttribute(oe);return oi(e)?e:"light"}class ov{constructor(e,t={},n={}){this.init(e,t)}init(e,t){let n=(()=>{let e=iq[eH()],t=e?e.map(e=>e.value):[];return{defaultLanguage:iV,cacheKey:"i18nextLng",supportLangs:t}})();this.options={...n,...t}}detect(){return this.options.defaultLanguage}}ov.type="languageDetector",ov.prototype.cacheUserLanguage=()=>{};let ob={projectId:"",loadPath:"/locales/{{lng}}/{{ns}}.json",version:"latest",requestOptions:{}};class oE{constructor(e,t={},n={}){this.init(e,t)}init(e,t){this.services=e,this.options={...ob,...t},this.fetch=t.fetch}getResourceUrl(e,t,n){return this.services.interpolator.interpolate(n,{lng:e,ns:t,projectId:this.options.projectId})}read(e,t,n){let r=this.getResourceUrl(e,t,this.options.loadPath);this.fetch(r,this.options.requestOptions).then(e=>{n(null,e)}).catch(i=>{if(console.error(`Load ${r} resource failed!`,i),"TypeError: Failed to fetch"===i.toString()){if(this.options.fallbackPath||r.startsWith("/common-static/fhs")){let i=this.options.fallbackPath?this.getResourceUrl(e,t,this.options.fallbackPath):r.replace("/common-static/fhs","/fht-frontend/common-static/frontend-web");this.fetch(i,this.options.requestOptions).then(e=>{n(null,e)}).catch(e=>{console.error(`Load fallback ${i} resource failed!`,e),n(null,{})})}else n(null,{})}else n(null,{})})}}oE.type="backend";let oy={I18nLanguageDetector:ov,I18nBackend:oE,initI18nInstance:()=>{}},o_=null,oA=null,ow=null,oT=null,oN=null,oS=null,oO=null,oI=null,oP=null,oR=null,oL=null,oB=null,oU=null,oM={byEnv:a,byHelpers:u,bySharedSettings:l,byThemeLoader:h,byMetas:s,byFetch:null,byComplianceSdk:null,byDynamicDomain:c,byDynamicSymbol:null,byUniframeToolkit:null,bySensors:null,byRequest:null,byDeadpoolSdk:null,byGtm:null,byI18nLoader:oy,byStorage:null,bySymbolList:null,byLogger:null,byRouteFinder:null,byLanguageDetector:null};e.exports.P=o})()},32825:function(e,t,n){!function(e,t){for(var n in t)e[n]=t[n]}(t,function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t||4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,(function(t){return e[t]}).bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="./src/index.ts")}({"./src/@types/index.ts":function(e,t,n){"use strict";var r,i,o;Object.defineProperty(t,"__esModule",{value:!0}),t.Autorename=t.Source=t.Mode=void 0,(r=t.Mode||(t.Mode={})).combined="combined",r.override="override",(i=t.Source||(t.Source={})).ltr="ltr",i.rtl="rtl",(o=t.Autorename||(t.Autorename={})).disabled="disabled",o.flexible="flexible",o.strict="strict"},"./src/index.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("./src/rtl-react/index.ts");Object.defineProperty(t,"reactRTLJsInit",{enumerable:!0,get:function(){return r.reactRTLJsInit}}),Object.defineProperty(t,"reactPropsProcessor",{enumerable:!0,get:function(){return r.reactPropsProcessor}}),Object.defineProperty(t,"processor",{enumerable:!0,get:function(){return r.processor}}),Object.defineProperty(t,"processorForNew",{enumerable:!0,get:function(){return r.processorForNew}}),Object.defineProperty(t,"rtlCssReact",{enumerable:!0,get:function(){return r.rtlCssReact}}),Object.defineProperty(t,"RTLSkipStart",{enumerable:!0,get:function(){return r.RTLSkipStart}}),Object.defineProperty(t,"RTLSkipEnd",{enumerable:!0,get:function(){return r.RTLSkipEnd}});var i=n("./src/utilities/index.ts");Object.defineProperty(t,"setRTLStatus",{enumerable:!0,get:function(){return i.setRTLStatus}});var o=n("./src/@types/index.ts");Object.defineProperty(t,"Mode",{enumerable:!0,get:function(){return o.Mode}}),Object.defineProperty(t,"Source",{enumerable:!0,get:function(){return o.Source}}),Object.defineProperty(t,"Autorename",{enumerable:!0,get:function(){return o.Autorename}})},"./src/rtl-react/index.ts":function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||r(t,e,n)},o=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t0||r[1]!==r[3])){var i=0;n.value=n.value.replace(this.cache.match,function(){return r[(4-i++)%4]})}return{prop:e,value:s.default.unguardFunctions(n)}}},{name:"border radius",expr:/border-radius/gi,cache:null,flip:function(e){var t,n=e.match(this.cache.match);if(n)switch(n.length){case 2:t=1,n[0]!==n[1]&&(e=e.replace(this.cache.match,function(){return n[t--]}));break;case 3:e=e.replace(this.cache.white,function(e){return e+n[1]+" "});break;case 4:t=0,(n[0]!==n[1]||n[2]!==n[3])&&(e=e.replace(this.cache.match,function(){return n[(5-t++)%4]}))}return e},action:function(e,t){null===this.cache&&(this.cache={match:/[^\s\uFFFD]+/g,slash:/[^\/]+/g,white:/(^\s*)/});var n=s.default.guardFunctions(t);return n.value=n.value.replace(this.cache.slash,(function(e){return this.flip(e)}).bind(this)),{prop:e,value:s.default.unguardFunctions(n)}}},{name:"shadow",expr:/shadow/gi,cache:null,action:function(e,t){null===this.cache&&(this.cache={replace:/[^,]+/g});var n=s.default.guardHexColors(t),r=s.default.guardFunctions(n.value);return r.value=r.value.replace(this.cache.replace,function(e){return s.default.negate(e)}),n.value=s.default.unguardFunctions(r),{prop:e,value:s.default.unguardHexColors(n)}}},{name:"transform and perspective origin",expr:/(?:transform|perspective)-origin/gi,cache:null,flip:function(e){return"0"===e?e="100%":e.match(this.cache.percent)?e=s.default.complement(e):e.match(this.cache.length)&&(e=s.default.flipLength(e)),e},action:function(e,t){if(null===this.cache&&(this.cache={match:s.default.regex(["calc","percent","length"],"g"),percent:s.default.regex(["calc","percent"],"i"),length:s.default.regex(["length"],"gi"),xKeyword:/(left|right)/i}),t.match(this.cache.xKeyword))t=s.default.swapLeftRight(t);else{var n=s.default.guardFunctions(t),r=n.value.match(this.cache.match);r&&r.length>0&&(r[0]=this.flip(r[0]),n.value=n.value.replace(this.cache.match,function(){return r.shift()}),t=s.default.unguardFunctions(n))}return{prop:e,value:t}}},{name:"transform",expr:/^(?!text\-).*?transform$/gi,cache:null,flip:function(e,t){var n=0;return e.replace(this.cache.unit,function(e){return t(++n,e)})},flipMatrix:function(e){return this.flip(e,function(e,t){return 2===e||3===e||5===e?s.default.negate(t):t})},flipMatrix3D:function(e){return this.flip(e,function(e,t){return 2===e||4===e||5===e||13===e?s.default.negate(t):t})},flipRotate3D:function(e){return this.flip(e,function(e,t){return 1===e||4===e?s.default.negate(t):t})},action:function(e,t){null===this.cache&&(this.cache={negatable:/((translate)(x|3d)?|rotate(z|y)?)$/gi,unit:s.default.regex(["calc","number"],"g"),matrix:/matrix$/i,matrix3D:/matrix3d$/i,skewXY:/skew(x|y)?$/i,rotate3D:/rotate3d$/i});var n=s.default.guardFunctions(t);return{prop:e,value:s.default.unguardFunctions(n,(function(e,t){return t.length&&(t.match(this.cache.matrix3D)?e=this.flipMatrix3D(e):t.match(this.cache.matrix)?e=this.flipMatrix(e):t.match(this.cache.rotate3D)?e=this.flipRotate3D(e):t.match(this.cache.skewXY)?e=s.default.negateAll(e):t.match(this.cache.negatable)&&(e=s.default.negate(e))),e}).bind(this))}}},{name:"transition",expr:/transition(-property)?$/i,action:function(e,t){return{prop:e,value:s.default.swapLeftRight(t)}}},{name:"background",expr:/background(-position(-x)?|-image)?$/i,cache:null,flip:function(e){var t=s.default.saveTokens(e,!0),n=t.value.match(this.cache.match);if(n&&n.length>0){var r=(t.value.match(this.cache.position)||"").length;n.length>=3||2===r?t.value=s.default.swapLeftRight(t.value):(n[0]="0"===n[0]?"100%":n[0].match(this.cache.percent)?s.default.complement(n[0]):n[0].match(this.cache.length)?s.default.flipLength(n[0]):s.default.swapLeftRight(n[0]),t.value=t.value.replace(this.cache.match,function(){return n.shift()}))}return s.default.restoreTokens(t)},update:function(e,t,n){return n.match(this.cache.gradient)?(t=s.default.swapLeftRight(t)).match(this.cache.angle)&&(t=s.default.negate(t)):(!0===e.config.processUrls||!0===e.config.processUrls.decl&&n.match(this.cache.url))&&(t=s.default.applyStringMap(t,!0)),t},action:function(e,t){null===this.cache&&(this.cache={match:s.default.regex(["position","percent","length","calc"],"ig"),percent:s.default.regex(["calc","percent"],"i"),position:s.default.regex(["position"],"g"),length:s.default.regex(["length"],"gi"),gradient:/gradient$/i,angle:/\d+(deg|g?rad|turn)/i,url:/^url/i});var n=s.default.guardHexColors(t),r=s.default.guardFunctions(n.value),i=r.value.split(",");if("background-image"!==e.toLowerCase())for(var o=0;o1&&(t[r[0].trim()]=r[1].trim())}}),t};t.isObject=function(e){return"[object Object]"===Object.prototype.toString.call(e)},t.default={extend:function(e,t){for(var n in(void 0===e||"object"!=typeof e)&&(e={}),t)e.hasOwnProperty(n)||(e[n]=t[n]);return e},swap:function(e,n,r,i){var o=A(n)+"|"+A(r);((i=i||y).hasOwnProperty("greedy")?i.greedy:t.config.greedy)||(o="\\b("+o+")\\b");var s=i.ignoreCase?"img":"mg";return e.replace(new RegExp(o,s),function(e){return(i.ignoreCase?e.toLowerCase()===n.toLowerCase():e===n)?r:n})},swapLeftRight:function(e){return this.swap(e,"left","right")},swapLtrRtl:function(e){return this.swap(e,"ltr","rtl")},applyStringMap:function(e,n){for(var r=e,i=0;i1)for(var n=1;ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&this.cache.size>=this.maxCache){var o=h([],this.cache.keys(),!0)[0];this.cache.delete(o),this.timer[o]&&clearTimeout(this.timer[o])}this.cache.set(e,t),n>0&&(this.timer[e]=setTimeout(function(){r.allowDeleteCacheEntry(e,i.TTL)&&(r.cache.delete(e),delete r.timer[e])},n))},e.prototype.delete=function(e){return delete this.timer[e],this.cache.delete(e)},e.prototype.clear=function(){var e=this;Object.entries(this.timer).forEach(function(t){var n=t[0];e.allowDeleteCacheEntry(n,i.MANUAL)&&delete e.timer[n]}),this.cache.forEach(function(t,n){e.allowDeleteCacheEntry(n,i.MANUAL)&&e.cache.delete(n)})},e.prototype.clearOneCache=function(e){var t=this;Object.entries(this.timer).forEach(function(n){var r=n[0];t.allowDeleteCacheEntry(r,i.MANUAL)&&e===r&&delete t.timer[r]}),this.cache.forEach(function(n,r){t.allowDeleteCacheEntry(r,i.MANUAL)&&e===r&&t.cache.delete(r)})},e.prototype.freezeCacheDeletion=function(e){void 0===e&&(e={}),this.freezedCacheDeletion=u(u({},this.freezedCacheDeletion),e)},e.prototype.allowDeleteCacheEntry=function(e,t){return!Object.entries(this.freezedCacheDeletion).some(function(n){var r=n[0],o=n[1];return e.includes(r)&&(o===i.ALL||t===o)})},e}(),p=function(){function e(){this.middlewares=[]}return e.prototype.use=function(e){if("function"!=typeof e)throw TypeError("Middleware is not a function.");this.middlewares.push(e)},e.prototype.execute=function(e){return(function(e){if(!Array.isArray(e))throw TypeError("Middlewares must be an array!");for(var t=e.length,n=0;n=200&&e<300}:N,O=s.ttl,I=a.get(h);return I&&p?y(e).then(function(e){return _(e)}).then(function(){return I}).then(function(t){return e.operations.createResponseError=function(n,r){return new g(t,n,r,e.req)},A(t,e)}).then(function(n){return e.res=n,t()}).catch(function(e){return Promise.reject(e)}):(I=new v,p&&a.set(h,I,void 0===O?6e4:O),y(e).then(function(e){return _(e)}).then(function(e){return c(n,void 0,void 0,function(){var n,r,o,s;return l(this,function(f){var v,y,_;return n=e.req.options,b&&(r=new AbortController),o=fetch(i,u(u({},n),{signal:r?r.signal:void 0})),v=e.req,y=function(){b&&r.abort()},[2,Promise.race([o,(s={promise:new Promise(function(e,t){_=setTimeout(function(){t(new d("timeout of ".concat(T,"ms exceeded"),v,"Timeout")),y()},T)}),timer:_}).promise]).then(function(e){var t="BROWSER"===m()&&"function"==typeof e.clone?e.clone():e;return S(t.status)&&p&&(t.useCache=!0,I.resolve(t)),e}).then(function(t){return e.operations.createResponseError=function(n,r){return new g(t,n,r,e.req)},function(e,t){c(this,void 0,void 0,function(){var n,r;return l(this,function(i){return(n=t.interceptors.globalResponseMap[t.req.url])&&Array.isArray(n)&&(r="BROWSER"===m()&&"function"==typeof e.clone?e.clone():e,n.forEach(function(e){return e(r,t.req.options,t.operations)})),[2]})})}(t,e),t}).then(function(t){return A(t,e)}).then(function(n){return e.res=n,t()}).catch(function(t){return(null==E?void 0:E.every(function(t){var n;return!(null===(n=null==e?void 0:e.req)||void 0===n?void 0:n.url.includes(t))}))&&a.delete(h),Promise.reject(t)}).finally(function(){s.timer&&clearTimeout(s.timer)})]})})}))}function T(e,t){var n;return t().then(function(){if(!e)return Promise.resolve();var t=e.res,r=void 0===t?{}:t,i=e.req,o=void 0===i?{}:i;(n=("BROWSER"===m()&&"function"==typeof r.clone?r.clone():r)||{}).useCache=r.useCache||!1;var s=o.options,a=(void 0===s?{}:s).responseType,u=void 0===a?"json":a;if("json"===u)return r.text().then(function(e){try{return JSON.parse(e)}catch(t){return e}});try{return r[u]()}catch(e){throw new g(n,"responseType not support",null,o,"ParseError")}}).then(function(t){var r,i=e.req,o=void 0===i?{}:i,s=o.options,a=void 0===s?{}:s,u=a.cacheType,c=a.ttl,l=a.validateStatus;if(n){if((void 0===l?function(e){return e>=200&&e<300}:l)(n.status)){if("persist"===u)try{null===(r=null==e?void 0:e.storage)||void 0===r||r.set(e.cacheKey,{data:t},c)}catch(e){}e.finalResult={data:t,response:n};return}throw new g(n,"http error",t,o,"HttpError")}}).catch(function(t){if(t instanceof d||t instanceof g)throw t;var n=e.req,r=e.res;throw t.request=t.request||n,t.response=t.response||r,t.type=t.type||t.name,t.data=t.data||void 0,t})}function N(e,t){if(!e)return t();var n=e.req,r=void 0===n?{}:n,i=r.options,o=void 0===i?{}:i,s=r.url,a=void 0===s?"":s,u=o.params;return o.method=o.method?o.method.toUpperCase():"GET",o.credentials=o.credentials||"same-origin",u&&(e.req.originUrl=a,e.req.url=Object.entries(u).reduce(function(e,t){var n=t[0],r=t[1],i="".concat(n,"=").concat(r);return e.indexOf("?")>-1?"".concat(e,"&").concat(i):"".concat(e,"?").concat(i)},a)),e.req.options=o,t()}function S(e,t){if(!e)return t();var n=e.req,r=(void 0===n?{}:n).options,i=void 0===r?{}:r,o=i.method;if(!["post","put","patch","delete"].includes((void 0===o?"get":o).toLowerCase()))return t();var s=i.requestType,a=i.data;if(a){var c=Object.prototype.toString.call(a);"[object Object]"===c||"[object Array]"===c?"json"===(void 0===s?"json":s)&&(i.headers=u({Accept:"application/json","Content-Type":"application/json;charset=UTF-8"},i.headers),i.body=JSON.stringify(a)):(i.headers=u({Accept:"application/json"},i.headers),i.body=a)}return e.req.options=i,t()}var O=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.defaultOpts=e,this.cache=t.cache,this.storage=t.storage,this.interceptors={globalRequestMap:t.requestInterceptors||{},globalResponseMap:t.responseInterceptors||{},instanceRequest:t.instanceRequestInterceptors||[],instanceResponse:t.instanceResponseInterceptors||[]},this.onion=new p,this.onion.use(S),this.onion.use(N),this.onion.use(T),this.onion.use(w)}return e.prototype.get=function(e,t){return void 0===t&&(t={}),this.fetch(e,u(u({},t),{method:"get"}))},e.prototype.post=function(e,t){return void 0===t&&(t={}),this.fetch(e,u(u({},t),{method:"post"}))},e.prototype.delete=function(e,t){return void 0===t&&(t={}),this.fetch(e,u(u({},t),{method:"delete"}))},e.prototype.put=function(e,t){return void 0===t&&(t={}),this.fetch(e,u(u({},t),{method:"put"}))},e.prototype.patch=function(e,t){return void 0===t&&(t={}),this.fetch(e,u(u({},t),{method:"patch"}))},e.prototype.fetch=function(e,t){var n=this;void 0===t&&(t={});var r=u(u(u({},this.defaultOpts),t),{headers:u(u({},this.defaultOpts.headers),t.headers)}),i=t.data,o=t.params,s=t.method,a=t.rewriteCacheKey,c=JSON.stringify({url:a?a(e):e,params:o,method:s,data:i}),l={req:{url:e,options:r},res:null,cache:this.cache,storage:this.storage,cacheKey:c,interceptors:this.interceptors,operations:{clearCache:function(){var e;(e=n.cache).clear&&e.clear()},clearOneCache:function(){return n.cache.clearOneCache(c)},clearStorage:function(){return n.storage.delete(c)}}};return new Promise(function(e,r){if((null==t?void 0:t.useCache)&&(null==t?void 0:t.cacheType)==="persist"&&n.storage.get(c)){e(n.storage.get(c));return}n.onion.execute(l).then(function(){return e(l.finalResult)}).catch(function(t){var n=l.req.options.errorHandler;if(n)try{var i=n(t);e(i)}catch(e){r(e)}r(t)})})},e}(),I=function(){function e(){var e=this;this.max_cache_size=4718592,this.get=function(t){if(window.localStorage)try{var n=localStorage.getItem(t)||"{}",r=JSON.parse(n),i=r.expireAt,o=r.data;if(!o)return null;if(Date.now()<=i)return o;e.delete(t)}catch(e){}return null},this.delete=function(e){window.localStorage&&localStorage.removeItem(e)}}return e.prototype.isOverflowSize=function(){var e;try{for(var t=0,n=0;nthis.max_cache_size}catch(e){return!1}},e.prototype.set=function(e,t,n){void 0===n&&(n=6e4);try{if(this.isOverflowSize()||!window.localStorage)return;var r=Date.now();localStorage.setItem(e,JSON.stringify({expireAt:r+n,data:t}))}catch(e){}},e}(),P=function(){function e(t){this.instanceRequestInterceptors=[],this.instanceResponseInterceptors=[],t&&t.rewriteCacheKey&&delete t.rewriteCacheKey,this.fetch=new O(t,{cache:e.cache,storage:e.storage,requestInterceptors:e.requestInterceptors,responseInterceptors:e.responseInterceptors,instanceRequestInterceptors:this.instanceRequestInterceptors,instanceResponseInterceptors:this.instanceResponseInterceptors})}return e.addGlobalRequestInterceptors=function(t){Object.entries(t).forEach(function(t){var n=t[0],r=t[1];Array.isArray(e.requestInterceptors[n])||(e.requestInterceptors[n]=[]),r.forEach(function(t){return e.requestInterceptors[n].push(t)})})},e.addGlobalResponseInterceptors=function(t){Object.entries(t).forEach(function(t){var n=t[0],r=t[1];Array.isArray(e.responseInterceptors[n])||(e.responseInterceptors[n]=[]),r.forEach(function(t){return e.responseInterceptors[n].push(t)})})},e.prototype.addInstanceRequestInterceptors=function(e){var t=this;e.forEach(function(e){return t.instanceRequestInterceptors.push(e)})},e.prototype.addInstanceResponseInterceptors=function(e){var t=this;e.forEach(function(e){return t.instanceResponseInterceptors.push(e)})},e.prototype.request=function(e,t){return void 0===t&&(t={}),this.fetch.get(e,t)},e.prototype.get=function(e,t){return void 0===t&&(t={}),this.fetch.get(e,t)},e.prototype.post=function(e,t){return void 0===t&&(t={}),this.fetch.post(e,t)},e.prototype.patch=function(e,t){return void 0===t&&(t={}),this.fetch.patch(e,t)},e.prototype.put=function(e,t){return void 0===t&&(t={}),this.fetch.put(e,t)},e.prototype.delete=function(e,t){return void 0===t&&(t={}),this.fetch.delete(e,t)},e.prototype.freezeCacheDeletion=function(e){void 0===e&&(e={}),this.fetch.cache.freezeCacheDeletion(e)},e.storage=new I,e.cache=new f,e.version="2.0.0",e.requestInterceptors={},e.responseInterceptors={},e.getGlobalSharableEntry=function(){var t=L(e.version);return R().SharedUniRequest[t]},e}();function R(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw Error("unable to locate global object")}function L(e){return e.split(".")[0]||"0"}var B=L(P.version),U=R();U.SharedUniRequest||(U.SharedUniRequest={}),U.SharedUniRequest[B]||(U.SharedUniRequest[B]={cache:new f,requestInterceptors:{},responseInterceptors:{}}),P.cache=U.SharedUniRequest[B].cache,P.requestInterceptors=U.SharedUniRequest[B].requestInterceptors,P.responseInterceptors=U.SharedUniRequest[B].responseInterceptors},96636:function(e,t,n){"use strict";n.r(t),n.d(t,{__addDisposableResource:function(){return H},__assign:function(){return o},__asyncDelegator:function(){return N},__asyncGenerator:function(){return T},__asyncValues:function(){return S},__await:function(){return w},__awaiter:function(){return d},__classPrivateFieldGet:function(){return B},__classPrivateFieldIn:function(){return M},__classPrivateFieldSet:function(){return U},__createBinding:function(){return m},__decorate:function(){return a},__disposeResources:function(){return C},__esDecorate:function(){return c},__exportStar:function(){return v},__extends:function(){return i},__generator:function(){return g},__importDefault:function(){return L},__importStar:function(){return R},__makeTemplateObject:function(){return O},__metadata:function(){return p},__param:function(){return u},__propKey:function(){return h},__read:function(){return E},__rest:function(){return s},__rewriteRelativeImportExtension:function(){return G},__runInitializers:function(){return l},__setFunctionName:function(){return f},__spread:function(){return y},__spreadArray:function(){return A},__spreadArrays:function(){return _},__values:function(){return b}});var r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;nt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function a(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}function u(e,t){return function(n,r){t(n,r,e)}}function c(e,t,n,r,i,o){function s(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var a,u=r.kind,c="getter"===u?"get":"setter"===u?"set":"value",l=!t&&e?r.static?e:e.prototype:null,h=t||(l?Object.getOwnPropertyDescriptor(l,r.name):{}),f=!1,p=n.length-1;p>=0;p--){var d={};for(var g in r)d[g]="access"===g?{}:r[g];for(var g in r.access)d.access[g]=r.access[g];d.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");o.push(s(e||null))};var m=(0,n[p])("accessor"===u?{get:h.get,set:h.set}:h[c],d);if("accessor"===u){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(a=s(m.get))&&(h.get=a),(a=s(m.set))&&(h.set=a),(a=s(m.init))&&i.unshift(a)}else(a=s(m))&&("field"===u?i.unshift(a):h[c]=a)}l&&Object.defineProperty(l,r.name,h),f=!0}function l(e,t,n){for(var r=arguments.length>2,i=0;i0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function E(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function y(){for(var e=[],t=0;t1||a(e,t)})},t&&(r[e]=t(r[e])))}function a(e,t){try{var n;(n=i[e](t)).value instanceof w?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(e){l(o[0][3],e)}}function u(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function N(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:w(e[r](t)),done:!1}:i?i(t):t}:i}}function S(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=b(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,i){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,i,(t=e[n](t)).done,t.value)})}}}function O(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var I=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},P=function(e){return(P=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t})(e)};function R(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=P(e),r=0;r=Math.abs(e)},et=!0;try{var en=ec("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");et=(null===(f=en.exec("a"))||void 0===f?void 0:f[0])==="a"}catch(e){et=!1}var er=V?function(e,t,n){return e.startsWith(t,n)}:function(e,t,n){return e.slice(n,n+t.length)===t},ei=z?String.fromCodePoint:function(){for(var e,t=[],n=0;no;){if((e=t[o++])>1114111)throw RangeError(e+" is not a valid code point");r+=e<65536?String.fromCharCode(e):String.fromCharCode(((e-=65536)>>10)+55296,e%1024+56320)}return r},eo=X?Object.fromEntries:function(e){for(var t={},n=0;n=r)){var i=e.charCodeAt(t);return i<55296||i>56319||t+1===r||(n=e.charCodeAt(t+1))<56320||n>57343?i:(i-55296<<10)+(n-56320)+65536}},ea=W?function(e){return e.trimStart()}:function(e){return e.replace(Z,"")},eu=Q?function(e){return e.trimEnd()}:function(e){return e.replace(q,"")};function ec(e,t){return new RegExp(e,t)}if(et){var el=ec("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");p=function(e,t){var n;return el.lastIndex=t,null!==(n=el.exec(e)[1])&&void 0!==n?n:""}}else p=function(e,t){for(var n=[];;){var r,i=es(e,t);if(void 0===i||ep(i)||(r=i)>=33&&r<=35||36===r||r>=37&&r<=39||40===r||41===r||42===r||43===r||44===r||45===r||r>=46&&r<=47||r>=58&&r<=59||r>=60&&r<=62||r>=63&&r<=64||91===r||92===r||93===r||94===r||96===r||123===r||124===r||125===r||126===r||161===r||r>=162&&r<=165||166===r||167===r||169===r||171===r||172===r||174===r||176===r||177===r||182===r||187===r||191===r||215===r||247===r||r>=8208&&r<=8213||r>=8214&&r<=8215||8216===r||8217===r||8218===r||r>=8219&&r<=8220||8221===r||8222===r||8223===r||r>=8224&&r<=8231||r>=8240&&r<=8248||8249===r||8250===r||r>=8251&&r<=8254||r>=8257&&r<=8259||8260===r||8261===r||8262===r||r>=8263&&r<=8273||8274===r||8275===r||r>=8277&&r<=8286||r>=8592&&r<=8596||r>=8597&&r<=8601||r>=8602&&r<=8603||r>=8604&&r<=8607||8608===r||r>=8609&&r<=8610||8611===r||r>=8612&&r<=8613||8614===r||r>=8615&&r<=8621||8622===r||r>=8623&&r<=8653||r>=8654&&r<=8655||r>=8656&&r<=8657||8658===r||8659===r||8660===r||r>=8661&&r<=8691||r>=8692&&r<=8959||r>=8960&&r<=8967||8968===r||8969===r||8970===r||8971===r||r>=8972&&r<=8991||r>=8992&&r<=8993||r>=8994&&r<=9e3||9001===r||9002===r||r>=9003&&r<=9083||9084===r||r>=9085&&r<=9114||r>=9115&&r<=9139||r>=9140&&r<=9179||r>=9180&&r<=9185||r>=9186&&r<=9254||r>=9255&&r<=9279||r>=9280&&r<=9290||r>=9291&&r<=9311||r>=9472&&r<=9654||9655===r||r>=9656&&r<=9664||9665===r||r>=9666&&r<=9719||r>=9720&&r<=9727||r>=9728&&r<=9838||9839===r||r>=9840&&r<=10087||10088===r||10089===r||10090===r||10091===r||10092===r||10093===r||10094===r||10095===r||10096===r||10097===r||10098===r||10099===r||10100===r||10101===r||r>=10132&&r<=10175||r>=10176&&r<=10180||10181===r||10182===r||r>=10183&&r<=10213||10214===r||10215===r||10216===r||10217===r||10218===r||10219===r||10220===r||10221===r||10222===r||10223===r||r>=10224&&r<=10239||r>=10240&&r<=10495||r>=10496&&r<=10626||10627===r||10628===r||10629===r||10630===r||10631===r||10632===r||10633===r||10634===r||10635===r||10636===r||10637===r||10638===r||10639===r||10640===r||10641===r||10642===r||10643===r||10644===r||10645===r||10646===r||10647===r||10648===r||r>=10649&&r<=10711||10712===r||10713===r||10714===r||10715===r||r>=10716&&r<=10747||10748===r||10749===r||r>=10750&&r<=11007||r>=11008&&r<=11055||r>=11056&&r<=11076||r>=11077&&r<=11078||r>=11079&&r<=11084||r>=11085&&r<=11123||r>=11124&&r<=11125||r>=11126&&r<=11157||11158===r||r>=11159&&r<=11263||r>=11776&&r<=11777||11778===r||11779===r||11780===r||11781===r||r>=11782&&r<=11784||11785===r||11786===r||11787===r||11788===r||11789===r||r>=11790&&r<=11798||11799===r||r>=11800&&r<=11801||11802===r||11803===r||11804===r||11805===r||r>=11806&&r<=11807||11808===r||11809===r||11810===r||11811===r||11812===r||11813===r||11814===r||11815===r||11816===r||11817===r||r>=11818&&r<=11822||11823===r||r>=11824&&r<=11833||r>=11834&&r<=11835||r>=11836&&r<=11839||11840===r||11841===r||11842===r||r>=11843&&r<=11855||r>=11856&&r<=11857||11858===r||r>=11859&&r<=11903||r>=12289&&r<=12291||12296===r||12297===r||12298===r||12299===r||12300===r||12301===r||12302===r||12303===r||12304===r||12305===r||r>=12306&&r<=12307||12308===r||12309===r||12310===r||12311===r||12312===r||12313===r||12314===r||12315===r||12316===r||12317===r||r>=12318&&r<=12319||12320===r||12336===r||64830===r||64831===r||r>=65093&&r<=65094)break;n.push(i),t+=i>=65536?2:1}return ei.apply(void 0,n)};var eh=function(){function e(e,t){void 0===t&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return e.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(e,t,n){for(var r=[];!this.isEOF();){var i=this.char();if(123===i){var o=this.parseArgument(e,n);if(o.err)return o;r.push(o.val)}else if(125===i&&e>0)break;else if(35===i&&("plural"===t||"selectordinal"===t)){var s=this.clonePosition();this.bump(),r.push({type:l.pound,location:Y(s,this.clonePosition())})}else if(60!==i||this.ignoreTag||47!==this.peek()){if(60===i&&!this.ignoreTag&&ef(this.peek()||0)){var o=this.parseTag(e,t);if(o.err)return o;r.push(o.val)}else{var o=this.parseLiteral(e,t);if(o.err)return o;r.push(o.val)}}else{if(!n)return this.error(c.UNMATCHED_CLOSING_TAG,Y(this.clonePosition(),this.clonePosition()));break}}return{val:r,err:null}},e.prototype.parseTag=function(e,t){var n=this.clonePosition();this.bump();var r=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:l.literal,value:"<".concat(r,"/>"),location:Y(n,this.clonePosition())},err:null};if(!this.bumpIf(">"))return this.error(c.INVALID_TAG,Y(n,this.clonePosition()));var i=this.parseMessage(e+1,t,!0);if(i.err)return i;var o=i.val,s=this.clonePosition();if(!this.bumpIf(""))?{val:{type:l.tag,value:r,children:o,location:Y(n,this.clonePosition())},err:null}:this.error(c.INVALID_TAG,Y(s,this.clonePosition()))},e.prototype.parseTagName=function(){var e,t=this.offset();for(this.bump();!this.isEOF()&&(45===(e=this.char())||46===e||e>=48&&e<=57||95===e||e>=97&&e<=122||e>=65&&e<=90||183==e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039);)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(e,t){for(var n=this.clonePosition(),r="";;){var i=this.tryParseQuote(t);if(i){r+=i;continue}var o=this.tryParseUnquoted(e,t);if(o){r+=o;continue}var s=this.tryParseLeftAngleBracket();if(s){r+=s;continue}break}var a=Y(n,this.clonePosition());return{val:{type:l.literal,value:r,location:a},err:null}},e.prototype.tryParseLeftAngleBracket=function(){var e;return this.isEOF()||60!==this.char()||!this.ignoreTag&&(ef(e=this.peek()||0)||47===e)?null:(this.bump(),"<")},e.prototype.tryParseQuote=function(e){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===e||"selectordinal"===e)break;return null;default:return null}this.bump();var t=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(39===n){if(39===this.peek())t.push(39),this.bump();else{this.bump();break}}else t.push(n);this.bump()}return ei.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var n=this.char();return 60===n||123===n||35===n&&("plural"===t||"selectordinal"===t)||125===n&&e>0?null:(this.bump(),ei(n))},e.prototype.parseArgument=function(e,t){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(c.EXPECT_ARGUMENT_CLOSING_BRACE,Y(n,this.clonePosition()));if(125===this.char())return this.bump(),this.error(c.EMPTY_ARGUMENT,Y(n,this.clonePosition()));var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(c.MALFORMED_ARGUMENT,Y(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(c.EXPECT_ARGUMENT_CLOSING_BRACE,Y(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:l.argument,value:r,location:Y(n,this.clonePosition())},err:null};case 44:if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(c.EXPECT_ARGUMENT_CLOSING_BRACE,Y(n,this.clonePosition()));return this.parseArgumentOptions(e,t,r,n);default:return this.error(c.MALFORMED_ARGUMENT,Y(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),n=p(this.message,t),r=t+n.length;return this.bumpTo(r),{value:n,location:Y(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,n,r){var i,o=this.clonePosition(),s=this.parseIdentifierIfPossible().value,a=this.clonePosition();switch(s){case"":return this.error(c.EXPECT_ARGUMENT_TYPE,Y(o,a));case"number":case"date":case"time":this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var f=this.clonePosition(),p=this.parseSimpleArgStyleIfPossible();if(p.err)return p;var d=eu(p.val);if(0===d.length)return this.error(c.EXPECT_ARGUMENT_STYLE,Y(this.clonePosition(),this.clonePosition()));u={style:d,styleLocation:Y(f,this.clonePosition())}}var g=this.tryParseArgumentClose(r);if(g.err)return g;var m=Y(r,this.clonePosition());if(u&&er(null==u?void 0:u.style,"::",0)){var b,E=ea(u.style.slice(2));if("number"===s){var p=this.parseNumberSkeletonFromString(E,u.styleLocation);if(p.err)return p;return{val:{type:l.number,value:n,location:m,style:p.val},err:null}}if(0===E.length)return this.error(c.EXPECT_DATE_TIME_SKELETON,m);var y=E;this.locale&&(y=function(e,t){for(var n="",r=0;r>1),u=function(e){var t,n=e.hourCycle;if(void 0===n&&e.hourCycles&&e.hourCycles.length&&(n=e.hourCycles[0]),n)switch(n){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw Error("Invalid hourCycle")}var r=e.language;return"root"!==r&&(t=e.maximize().region),(K[t||""]||K[r||""]||K["".concat(r,"-001")]||K["001"])[0]}(t);for(("H"==u||"k"==u)&&(a=0);a-- >0;)n+="a";for(;s-- >0;)n=u+n}else"J"===i?n+="H":n+=i}return n}(E,this.locale));var d={type:h.dateTime,pattern:y,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?(b={},y.replace(H,function(e){var t=e.length;switch(e[0]){case"G":b.era=4===t?"long":5===t?"narrow":"short";break;case"y":b.year=2===t?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":b.month=["numeric","2-digit","short","long","narrow"][t-1];break;case"w":case"W":throw RangeError("`w/W` (week) patterns are not supported");case"d":b.day=["numeric","2-digit"][t-1];break;case"D":case"F":case"g":throw RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":b.weekday=4===t?"long":5===t?"narrow":"short";break;case"e":if(t<4)throw RangeError("`e..eee` (weekday) patterns are not supported");b.weekday=["short","long","narrow","short"][t-4];break;case"c":if(t<4)throw RangeError("`c..ccc` (weekday) patterns are not supported");b.weekday=["short","long","narrow","short"][t-4];break;case"a":b.hour12=!0;break;case"b":case"B":throw RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":b.hourCycle="h12",b.hour=["numeric","2-digit"][t-1];break;case"H":b.hourCycle="h23",b.hour=["numeric","2-digit"][t-1];break;case"K":b.hourCycle="h11",b.hour=["numeric","2-digit"][t-1];break;case"k":b.hourCycle="h24",b.hour=["numeric","2-digit"][t-1];break;case"j":case"J":case"C":throw RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":b.minute=["numeric","2-digit"][t-1];break;case"s":b.second=["numeric","2-digit"][t-1];break;case"S":case"A":throw RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":b.timeZoneName=t<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),b):{}};return{val:{type:"date"===s?l.date:l.time,value:n,location:m,style:d},err:null}}return{val:{type:"number"===s?l.number:"date"===s?l.date:l.time,value:n,location:m,style:null!==(i=null==u?void 0:u.style)&&void 0!==i?i:null},err:null};case"plural":case"selectordinal":case"select":var _=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(c.EXPECT_SELECT_ARGUMENT_OPTIONS,Y(_,(0,v.__assign)({},_)));this.bumpSpace();var A=this.parseIdentifierIfPossible(),w=0;if("select"!==s&&"offset"===A.value){if(!this.bumpIf(":"))return this.error(c.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Y(this.clonePosition(),this.clonePosition()));this.bumpSpace();var p=this.tryParseDecimalInteger(c.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,c.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(p.err)return p;this.bumpSpace(),A=this.parseIdentifierIfPossible(),w=p.val}var T=this.tryParsePluralOrSelectOptions(e,s,t,A);if(T.err)return T;var g=this.tryParseArgumentClose(r);if(g.err)return g;var N=Y(r,this.clonePosition());if("select"===s)return{val:{type:l.select,value:n,options:eo(T.val),location:N},err:null};return{val:{type:l.plural,value:n,options:eo(T.val),offset:w,pluralType:"plural"===s?"cardinal":"ordinal",location:N},err:null};default:return this.error(c.INVALID_ARGUMENT_TYPE,Y(o,a))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error(c.EXPECT_ARGUMENT_CLOSING_BRACE,Y(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();)switch(this.char()){case 39:this.bump();var n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(c.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Y(n,this.clonePosition()));this.bump();break;case 123:e+=1,this.bump();break;case 125:if(!(e>0))return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var n=[];try{n=function(e){if(0===e.length)throw Error("Number skeleton cannot be empty");for(var t=e.split(D).filter(function(e){return e.length>0}),n=[],r=0;r1)throw RangeError("integer-width stems only accept a single optional option");r.options[0].replace(x,function(e,n,r,i,o,s){if(n)t.minimumIntegerDigits=r.length;else if(i&&o)throw Error("We currently do not support maximum integer digits");else if(s)throw Error("We currently do not support exact integer digits");return""});continue}if(j.test(r.stem)){t.minimumIntegerDigits=r.stem.length;continue}if(C.test(r.stem)){if(r.options.length>1)throw RangeError("Fraction-precision stems only accept a single optional option");r.stem.replace(C,function(e,n,r,i,o,s){return"*"===r?t.minimumFractionDigits=n.length:i&&"#"===i[0]?t.maximumFractionDigits=i.length:o&&s?(t.minimumFractionDigits=o.length,t.maximumFractionDigits=o.length+s.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),""});var i=r.options[0];"w"===i?t=(0,v.__assign)((0,v.__assign)({},t),{trailingZeroDisplay:"stripIfInteger"}):i&&(t=(0,v.__assign)((0,v.__assign)({},t),k(i)));continue}if(G.test(r.stem)){t=(0,v.__assign)((0,v.__assign)({},t),k(r.stem));continue}var o=$(r.stem);o&&(t=(0,v.__assign)((0,v.__assign)({},t),o));var s=function(e){var t;if("E"===e[0]&&"E"===e[1]?(t={notation:"engineering"},e=e.slice(2)):"E"===e[0]&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if("+!"===n?(t.signDisplay="always",e=e.slice(2)):"+?"===n&&(t.signDisplay="exceptZero",e=e.slice(2)),!j.test(e))throw Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}(r.stem);s&&(t=(0,v.__assign)((0,v.__assign)({},t),s))}return t}(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(e,t,n,r){for(var i,o=!1,s=[],a=new Set,u=r.value,l=r.location;;){if(0===u.length){var h=this.clonePosition();if("select"!==t&&this.bumpIf("=")){var f=this.tryParseDecimalInteger(c.EXPECT_PLURAL_ARGUMENT_SELECTOR,c.INVALID_PLURAL_ARGUMENT_SELECTOR);if(f.err)return f;l=Y(h,this.clonePosition()),u=this.message.slice(h.offset,this.offset())}else break}if(a.has(u))return this.error("select"===t?c.DUPLICATE_SELECT_ARGUMENT_SELECTOR:c.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,l);"other"===u&&(o=!0),this.bumpSpace();var p=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?c.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:c.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Y(this.clonePosition(),this.clonePosition()));var d=this.parseMessage(e+1,t,n);if(d.err)return d;var g=this.tryParseArgumentClose(p);if(g.err)return g;s.push([u,{value:d.val,location:Y(p,this.clonePosition())}]),a.add(u),this.bumpSpace(),u=(i=this.parseIdentifierIfPossible()).value,l=i.location}return 0===s.length?this.error("select"===t?c.EXPECT_SELECT_ARGUMENT_SELECTOR:c.EXPECT_PLURAL_ARGUMENT_SELECTOR,Y(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(c.MISSING_OTHER_CLAUSE,Y(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var n=1,r=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var i=!1,o=0;!this.isEOF();){var s=this.char();if(s>=48&&s<=57)i=!0,o=10*o+(s-48),this.bump();else break}var a=Y(r,this.clonePosition());return i?ee(o*=n)?{val:o,err:null}:this.error(t,a):this.error(e,a)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=es(this.message,e);if(void 0===t)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return t},e.prototype.error=function(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}},e.prototype.bump=function(){if(!this.isEOF()){var e=this.char();10===e?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},e.prototype.bumpIf=function(e){if(er(this.message,e,this.offset())){for(var t=0;t=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var t=this.offset();if(t===e)break;if(t>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&ep(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),n=this.message.charCodeAt(t+(e>=65536?2:1));return null!=n?n:null},e}();function ef(e){return e>=97&&e<=122||e>=65&&e<=90}function ep(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}function ed(e,t){void 0===t&&(t={});var n=new eh(e,t=(0,v.__assign)({shouldParseSkeletons:!0,requiresOtherClause:!0},t)).parse();if(n.err){var r=SyntaxError(c[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return(null==t?void 0:t.captureLocation)||function e(t){t.forEach(function(t){if(delete t.location,P(t)||R(t))for(var n in t.options)delete t.options[n].location,e(t.options[n].value);else S(t)&&B(t.style)?delete t.style.location:(O(t)||I(t))&&U(t.style)?delete t.style.location:L(t)&&e(t.children)})}(n.val),n.val}(s=d||(d={})).MISSING_VALUE="MISSING_VALUE",s.INVALID_VALUE="INVALID_VALUE",s.MISSING_INTL_API="MISSING_INTL_API";var eg=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.code=n,i.originalMessage=r,i}return(0,v.__extends)(t,e),t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),em=function(e){function t(t,n,r,i){return e.call(this,'Invalid values for "'.concat(t,'": "').concat(n,'". Options are "').concat(Object.keys(r).join('", "'),'"'),d.INVALID_VALUE,i)||this}return(0,v.__extends)(t,e),t}(eg),ev=function(e){function t(t,n,r){return e.call(this,'Value for "'.concat(t,'" must be of type ').concat(n),d.INVALID_VALUE,r)||this}return(0,v.__extends)(t,e),t}(eg),eb=function(e){function t(t,n){return e.call(this,'The intl string context variable "'.concat(t,'" was not provided to the string "').concat(n,'"'),d.MISSING_VALUE,n)||this}return(0,v.__extends)(t,e),t}(eg);function eE(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}(a=g||(g={}))[a.literal=0]="literal",a[a.object=1]="object";var ey=function(){function e(t,n,r,i){void 0===n&&(n=e.defaultLocale);var o,s,a=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(e){var t=a.formatToParts(e);if(1===t.length)return t[0].value;var n=t.reduce(function(e,t){return e.length&&t.type===g.literal&&"string"==typeof e[e.length-1]?e[e.length-1]+=t.value:e.push(t.value),e},[]);return n.length<=1?n[0]||"":n},this.formatToParts=function(e){return function e(t,n,r,i,o,s,a){if(1===t.length&&N(t[0]))return[{type:g.literal,value:t[0].value}];for(var u=[],c=0;c0?t[0]:"string"==typeof e?e:e[0])}},e.__parse=ed,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();class e_ extends Error{constructor(e,t){let n=e;t&&(n+=": "+t),super(n),this.code=e,t&&(this.originalMessage=t)}}var eA=((u=eA||{}).MISSING_MESSAGE="MISSING_MESSAGE",u.MISSING_FORMAT="MISSING_FORMAT",u.ENVIRONMENT_FALLBACK="ENVIRONMENT_FALLBACK",u.INSUFFICIENT_PATH="INSUFFICIENT_PATH",u.INVALID_MESSAGE="INVALID_MESSAGE",u.INVALID_KEY="INVALID_KEY",u.FORMATTING_ERROR="FORMATTING_ERROR",u);function ew(...e){return e.filter(Boolean).join(".")}function eT(e){return ew(e.namespace,e.key)}function eN(e){console.error(e)}function eS(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function eO(e,t){return b(e,{cache:{create:()=>({get:e=>t[e],set(e,n){t[e]=n}})},strategy:T.variadic})}function eI(e,t){return eO((...t)=>new e(...t),t)}function eP(e){return{getDateTimeFormat:eI(Intl.DateTimeFormat,e.dateTime),getNumberFormat:eI(Intl.NumberFormat,e.number),getPluralRules:eI(Intl.PluralRules,e.pluralRules),getRelativeTimeFormat:eI(Intl.RelativeTimeFormat,e.relativeTime),getListFormat:eI(Intl.ListFormat,e.list),getDisplayNames:eI(Intl.DisplayNames,e.displayNames)}}function eR(e,t,n,r){let i=ew(r,n);if(!t)throw Error(i);let o=t;return n.split(".").forEach(t=>{let n=o[t];if(null==t||null==n)throw Error(i+` (${e})`);o=n}),o}let eL={second:1,seconds:1,minute:60,minutes:60,hour:3600,hours:3600,day:86400,days:86400,week:604800,weeks:604800,month:2628e3,months:2628e3,quarter:7884e3,quarters:7884e3,year:31536e3,years:31536e3};var eB=n(26657);let eU=(0,m.createContext)(void 0);function eM({children:e,formats:t,getMessageFallback:n,locale:r,messages:i,now:o,onError:s,timeZone:a}){let u=(0,m.useContext)(eU),c=(0,m.useMemo)(()=>u?.cache||eS(),[r,u?.cache]),l=(0,m.useMemo)(()=>u?.formatters||eP(c),[c,u?.formatters]),h=(0,m.useMemo)(()=>({...function({formats:e,getMessageFallback:t,messages:n,onError:r,...i}){return{...i,formats:e||void 0,messages:n||void 0,onError:r||eN,getMessageFallback:t||eT}}({locale:r,formats:void 0===t?u?.formats:t,getMessageFallback:n||u?.getMessageFallback,messages:void 0===i?u?.messages:i,now:o||u?.now,onError:s||u?.onError,timeZone:a||u?.timeZone}),formatters:l,cache:c}),[c,t,l,n,r,i,o,s,u,a]);return(0,eB.jsx)(eU.Provider,{value:h,children:e})}function eH(){let e=(0,m.useContext)(eU);if(!e)throw Error(void 0);return e}let eD=!1,eC="undefined"==typeof window;function eG(e){return function(e,t,n){let{cache:r,formats:i,formatters:o,getMessageFallback:s,locale:a,onError:u,timeZone:c}=eH(),l=e["!"],h="!"===t?void 0:t.slice(2);return c||eD||!eC||(eD=!0,u(new e_(eA.ENVIRONMENT_FALLBACK,void 0))),(0,m.useMemo)(()=>(function(e){let t=function(e,t,n,r=eN){try{if(!t)throw Error(void 0);let r=n?eR(e,t,n):t;if(!r)throw Error(n);return r}catch(t){let e=new e_(eA.MISSING_MESSAGE,t.message);return r(e),e}}(e.locale,e.messages,e.namespace,e.onError);return function({cache:e,formats:t,formatters:n,getMessageFallback:r=eT,locale:i,messagesOrError:o,namespace:s,onError:a,timeZone:u}){let c=o instanceof e_;function l(e,t,n){let i=new e_(t,n);return a(i),r({error:i,key:e,namespace:s})}function h(a,h,f){var p;let d,g;if(c)return r({error:o,key:a,namespace:s});try{d=eR(i,o,a,s)}catch(e){return l(a,eA.MISSING_MESSAGE,e.message)}if("object"==typeof d){let e;return l(a,Array.isArray(d)?eA.INVALID_MESSAGE:eA.INSUFFICIENT_PATH,e)}let v=(p=d,h||/'[{}]/.test(p)?void 0:p);if(v)return v;n.getMessageFormat||(n.getMessageFormat=eO((...e)=>new ey(e[0],e[1],e[2],{formatters:n,...e[3]}),e.message));try{g=n.getMessageFormat(d,i,function(e,t,n){let r=ey.formats.date,i=ey.formats.time,o={...e?.dateTime,...t?.dateTime},s={date:{...r,...o},time:{...i,...o},number:{...e?.number,...t?.number}};return n&&["date","time"].forEach(e=>{let t=s[e];for(let[e,r]of Object.entries(t))t[e]={timeZone:n,...r}}),s}(t,f,u),{formatters:{...n,getDateTimeFormat:(e,t)=>n.getDateTimeFormat(e,{timeZone:u,...t})}})}catch(e){return l(a,eA.INVALID_MESSAGE,e.message)}try{let e=g.format(h?function(e){let t={};return Object.keys(e).forEach(n=>{let r,i=0,o=e[n];r="function"==typeof o?e=>{let t=o(e);return(0,m.isValidElement)(t)?(0,m.cloneElement)(t,{key:n+i++}):t}:o,t[n]=r}),t}(h):h);if(null==e)throw Error(void 0);return(0,m.isValidElement)(e)||Array.isArray(e)||"string"==typeof e?e:String(e)}catch(e){return l(a,eA.FORMATTING_ERROR,e.message)}}function f(e,t,n){let r=h(e,t,n);return"string"!=typeof r?l(e,eA.INVALID_MESSAGE,void 0):r}return f.rich=h,f.markup=(e,t,n)=>h(e,t,n),f.raw=e=>{if(c)return r({error:o,key:e,namespace:s});try{return eR(i,o,e,s)}catch(t){return l(e,eA.MISSING_MESSAGE,t.message)}},f.has=e=>{if(c)return!1;try{return eR(i,o,e,s),!0}catch{return!1}},f}({...e,messagesOrError:t})})({cache:r,formatters:o,getMessageFallback:s,messages:l,namespace:h,onError:u,formats:i,locale:a,timeZone:c}),[r,o,s,l,h,u,i,a,c])}({"!":eH().messages},e?`!.${e}`:"!","!")}function ex(){return eH().locale}function ej(){let e=eH();if(!e.messages)throw Error(void 0);return e.messages}function ek(){let{formats:e,formatters:t,locale:n,now:r,onError:i,timeZone:o}=eH();return(0,m.useMemo)(()=>(function(e){let{_cache:t=eS(),_formatters:n=eP(t),formats:r,locale:i,onError:o=eN,timeZone:s}=e;function a(e){return e?.timeZone||(s?e={...e,timeZone:s}:o(new e_(eA.ENVIRONMENT_FALLBACK,void 0))),e}function u(e,t,n,r,i){let s;try{s=function(e,t,n){let r;if("string"==typeof t){if(!(r=e?.[t])){let e=new e_(eA.MISSING_FORMAT,void 0);throw o(e),e}}else r=t;return n&&(r={...r,...n}),r}(n,e,t)}catch{return i()}try{return r(s)}catch(e){return o(new e_(eA.FORMATTING_ERROR,e.message)),i()}}function c(e,t,o){return u(t,o,r?.dateTime,t=>(t=a(t),n.getDateTimeFormat(i,t).format(e)),()=>String(e))}function l(){return e.now?e.now:(o(new e_(eA.ENVIRONMENT_FALLBACK,void 0)),new Date)}return{dateTime:c,number:function(e,t,o){return u(t,o,r?.number,t=>n.getNumberFormat(i,t).format(e),()=>String(e))},relativeTime:function(e,t){try{var r;let o,s;let a={};t instanceof Date||"number"==typeof t?o=new Date(t):t&&(o=null!=t.now?new Date(t.now):l(),s=t.unit,a.style=t.style,a.numberingSystem=t.numberingSystem),o||(o=l());let u=(new Date(e).getTime()-o.getTime())/1e3;s||(s=function(e){let t=Math.abs(e);return t<60?"second":t<3600?"minute":t<86400?"hour":t<604800?"day":t<2628e3?"week":t<31536e3?"month":"year"}(u)),a.numeric="second"===s?"auto":"always";let c=(r=s,Math.round(u/eL[r]));return n.getRelativeTimeFormat(i,a).format(c,s)}catch(t){return o(new e_(eA.FORMATTING_ERROR,t.message)),String(e)}},list:function(e,t,o){let s=[],a=new Map,c=0;for(let t of e){let e;"object"==typeof t?(e=String(c),a.set(e,t)):e=String(t),s.push(e),c++}return u(t,o,r?.list,e=>{let t=n.getListFormat(i,e).formatToParts(s).map(e=>"literal"===e.type?e.value:a.get(e.value)||e.value);return a.size>0?t:t.join("")},()=>String(e))},dateTimeRange:function(e,t,o,s){return u(o,s,r?.dateTime,r=>(r=a(r),n.getDateTimeFormat(i,r).formatRange(e,t)),()=>[c(e),c(t)].join(" – "))}}})({formats:e,locale:n,now:r,onError:i,timeZone:o,_formatters:t}),[e,t,r,n,i,o])}}}]); //# sourceMappingURL=6469-716ecb61ac09379d.js.map