Liferay.Loader.define("@liferay/search-experiences-web@3.0.7/sxp_blueprint_admin/js/utils/language",["module","exports","require"],(function(e,t,n){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.renameKeys=function(e,t){const n={};return Object.keys(e).map((r=>{n["".concat(t(r))]=e[r]})),n},t.sub=function(t,n,r=!0){const i=t.split(e).filter((e=>0!==e.length));for(let e=0;e<n.length;e++){const t=n[e],r="{".concat(e,"}");let a=i.indexOf(r);for(;a>=0;)i.splice(a,1,t),a=i.indexOf(r)}return r?i.join(""):i},t.getLocalizedLearnMessageObject=function(e,t={},n=Liferay.ThemeDisplay.getLanguageId(),r=Liferay.ThemeDisplay.getDefaultLanguageId()){const i=t[e]||{en_US:{}};return i[n]||i[r]||i[Object.keys(i)[0]]},t.getLocalizedText=function(e,t){if(!e)return"";if(e[t])return e[t];if(e[t.replace("_","-")])return e[t.replace("_","-")];if("string"==typeof e||e instanceof String)return e;if(e[Liferay.ThemeDisplay.getDefaultLanguageId()])return e[Liferay.ThemeDisplay.getDefaultLanguageId()];if(Object.keys(e).length>0)return e[Object.keys(e)[0]];return""};const e=/({\d+})/g}}));
//# sourceMappingURL=language.js.map