"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__name=(e,t)=>__defProp(e,"name",{value:t,configurable:!0}),__export=(e,t)=>{for(var o in t)__defProp(e,o,{get:t[o],enumerable:!0})},__copyProps=(e,t,o,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of __getOwnPropNames(t))__hasOwnProp.call(e,s)||s===o||__defProp(e,s,{get:()=>t[s],enumerable:!(r=__getOwnPropDesc(t,s))||r.enumerable});return e},__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),__async=(e,t,o)=>new Promise((r,s)=>{var n=e=>{try{_(o.next(e))}catch(e){s(e)}},a=e=>{try{_(o.throw(e))}catch(e){s(e)}},_=e=>e.done?r(e.value):Promise.resolve(e.value).then(n,a);_((o=o.apply(e,t)).next())}),posts_exports={};__export(posts_exports,{getPosts:()=>getPosts,getSearchPosts:()=>getSearchPosts});var getPosts=__name(function(e){return __async(this,arguments,function*({filter:e,signal:t,providerContext:o}){const{getBaseUrl:r}=o;return posts({url:""+((yield r("consumet"))+"/movies/flixhq"+e),signal:t,providerContext:o})})},"getPosts"),getSearchPosts=__name(function(e){return __async(this,arguments,function*({searchQuery:e,page:t,signal:o,providerContext:r}){const{getBaseUrl:s}=r;return posts({url:`${(yield s("consumet"))+"/movies/flixhq"}/${e}?page=${t}`,signal:o,providerContext:r})})},"getSearchPosts");function posts(e){return __async(this,arguments,function*({url:e,signal:t,providerContext:o}){var r;try{const{axios:s}=o,n=yield s.get(e,{signal:t}),a=(null==(r=n.data)?void 0:r.results)||n.data,_=[];return null==a||a.map(e=>{const t=e.title,o=e.id,r=e.image;t&&o&&r&&_.push({title:t,link:o,image:r})}),_}catch(e){return[]}})}__name(posts,"posts"),exports.getPosts=getPosts,exports.getSearchPosts=getSearchPosts;