1import{$ as S,a0 as m,a1 as t,q as g}from"./DihDAdJ2.js";import{g as C,f as p}from"./CxeTWt1W.js";function N(e={}){var i,n,u,r,c,l,f;return{id:(e==null?void 0:e.Id)??0,description:(e==null?void 0:e.Description)??"",imageUrl:((i=e==null?void 0:e.Image)==null?void 0:i.Url)??"",flagUrl:((u=(n=e==null?void 0:e.Country)==null?void 0:n.FlagImage)==null?void 0:u.Url)??"",title:(e==null?void 0:e.Name)??"",country:((r=e==null?void 0:e.Country)==null?void 0:r.Name)??"",rank:((l=(c=e==null?void 0:e.BaseSuccessStoryVideo)==null?void 0:c.Rank)==null?void 0:l.MpName)??"",videoUrl:((f=e==null?void 0:e.Video)==null?void 0:f.Url)??""}}function U(e=[]){return Array.isArray(e)?e.map(N):[]}const A=S("storiesStore",()=>{function e({filter:n,header:u}){return m.find(t.successStoryVideo,n,u)}function i({id:n,filter:u,header:r}){return m.load(t.successStoryVideo,n,u,r)}return{findStories:e,loadStories:i}});async function V(e){var n,u,r;if(!Array.isArray(e))return[];const i=g();if(((n=i.currentLanguage)==null?void 0:n.code)!=="ru"){const c=new Map;e.forEach(a=>{var d;(d=a==null?void 0:a.Country)!=null&&d.Id&&a.Country.Name&&c.set(a.Country.Id,C(a.Country.Name))});const l=Array.from(c.values());if(l.length===0)return e;const f=await p((u=i.region)==null?void 0:u.id,(r=i.currentLanguage)==null?void 0:r.id,l);return e.forEach(a=>{var d;(d=a==null?void 0:a.Country)!=null&&d.Id&&a.Country.Name&&(a.Country.Name=f.get(c.get(a.Country.Id))??a.Country.Name)}),e}return e}export{V as a,U as n,A as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.