window.api_tokens={fetchTokens:async function(){return await window.Apts247.api.v3GetTokens()},setTokenContent:async function(){let t=await this.fetchTokens();for(let e of t){let n=document.querySelector(`.api-token-${e.base_slug}`);e.content&&n&&(n.innerHTML=await this.replaceCommunityTags(e.content))}let o=new Event("tokens-set");document.dispatchEvent(o)},replaceCommunityTags:async function(t){let{city:e,state:n,name:o}=await window.Apts247.api.v1GetCommunityInfo(),s={city:e,state:n,name:o},a=t.replace(/{{\s*community\.(city|state|name)\s*}}/g,(t,e)=>s[e]||t);return a},resetTokenContent:function(){this.setTokenContent()}},window.api_tokens.setTokenContent();