"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 n of __getOwnPropNames(t))__hasOwnProp.call(e,n)||n===o||__defProp(e,n,{get:()=>t[n],enumerable:!(r=__getOwnPropDesc(t,n))||r.enumerable});return e},__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),__async=(e,t,o)=>new Promise((r,n)=>{var s=e=>{try{a(o.next(e))}catch(e){n(e)}},p=e=>{try{a(o.throw(e))}catch(e){n(e)}},a=e=>e.done?r(e.value):Promise.resolve(e.value).then(s,p);a((o=o.apply(e,t)).next())}),episodes_exports={};__export(episodes_exports,{getEpisodes:()=>getEpisodes});var getEpisodes=__name(function(e){return __async(this,arguments,function*({url:e,providerContext:t}){var o;const{axios:r,cheerio:n}=t;try{e.includes("url=")&&(e=atob(e.split("url=")[1]));const t=(yield r.get(e)).data;let s=n.load(t);if(e.includes("url=")){const t=null==(o=s("meta[http-equiv='refresh']").attr("content"))?void 0:o.split("url=")[1],p=(yield r.get(t||e)).data;s=n.load(p)}const p=[];return s("h3,h4").map((e,t)=>{const o=s(t).text(),r=s(t).find("a").attr("href");r&&"#"!==r&&p.push({title:o.trim()||"No title found",link:r||""})}),s("a.maxbutton").map((e,t)=>{const o=s(t).children("span").text(),r=s(t).attr("href");r&&"#"!==r&&p.push({title:o.trim()||"No title found",link:r||""})}),p}catch(e){return[]}})},"getEpisodes");exports.getEpisodes=getEpisodes;