"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});const starling_intl_1=require("@ies/starling_intl"),en_US_js_1=__importDefault(require("./locales/COMMON/en-US.js")),zh_CN_js_1=__importDefault(require("./locales/COMMON/zh-CN.js"));starling_intl_1.I18n.init({lng:"en-US",resources:{"zh-CN":{translation:zh_CN_js_1.default},"en-US":{translation:en_US_js_1.default}}});class I18n{constructor(){this.replaceMap=new Map,this.t=(e,t,r)=>{const s=starling_intl_1.I18n.t(e,t,r);return this.doReplace(s)}}setLocaleWithPromise(e){return starling_intl_1.I18n.setLangWithPromise(e)}setReplaceMap(e){e.forEach((e,t)=>{this.replaceMap.set(t,e)})}doReplace(e){const t=e;return this.replaceMap.forEach((e,t)=>{e=e.replace(t,e)}),t}}const i18nHelper=new I18n;exports.default=i18nHelper;