"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__name=(target,value)=>__defProp(target,"name",{value:value,configurable:!0}),__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&"object"==typeof from||"function"==typeof from)for(let key of __getOwnPropNames(from))__hasOwnProp.call(to,key)||key===except||__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),__async=(__this,__arguments,generator)=>new Promise((resolve,reject)=>{var fulfilled=value=>{try{step(generator.next(value))}catch(e){reject(e)}},rejected=value=>{try{step(generator.throw(value))}catch(e){reject(e)}},step=x=>x.done?resolve(x.value):Promise.resolve(x.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())}),meta_exports={};__export(meta_exports,{getMeta:()=>getMeta});var hdbHeaders={Cookie:"xla=s4t",Referer:"https://google.com","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"},getMeta=__name(function(_0){return __async(this,arguments,function*({link:link,providerContext:providerContext}){var _a;try{const{axios:axios,cheerio:cheerio}=providerContext,url=link,data=(yield axios.get(url,{headers:hdbHeaders})).data,$=cheerio.load(data),container=$(".page-body"),imdbId=(null==(_a=container.find('a[href*="imdb.com/title/tt"]:not([href*="imdb.com/title/tt/"])').attr("href"))?void 0:_a.split("/")[4])||"",title=container.find('h2[data-ved="2ahUKEwjL0NrBk4vnAhWlH7cAHRCeAlwQ3B0oATAfegQIFBAM"],h2[data-ved="2ahUKEwiP0pGdlermAhUFYVAKHV8tAmgQ3B0oATAZegQIDhAM"]').text(),type=title.toLocaleLowerCase().includes("season")?"series":"movie",synopsis=container.find('strong:contains("DESCRIPTION")').parent().text().replace("DESCRIPTION:",""),image=container.find('img[decoding="async"]').attr("src")||"",links=[],directLink=[];return $('strong:contains("EPiSODE")').map((i,element)=>{const epTitle=$(element).parent().parent().text(),episodesLink=$(element).parent().parent().parent().next().next().find("a").attr("href")||$(element).parent().parent().parent().next().find("a").attr("href");episodesLink&&episodesLink&&directLink.push({title:epTitle,link:episodesLink})}),0===directLink.length&&container.find('a:contains("EPiSODE")').map((i,element)=>{const epTitle=$(element).text(),episodesLink=$(element).attr("href");episodesLink&&directLink.push({title:epTitle.toLocaleUpperCase(),link:episodesLink})}),directLink.length>0&&links.push({title:title,directLinks:directLink}),0===directLink.length&&container.find('a:contains("480"),a:contains("720"),a:contains("1080"),a:contains("2160"),a:contains("4K")').map((i,element)=>{var _a2;const quality=(null==(_a2=$(element).text().match(/\b(480p|720p|1080p|2160p)\b/i))?void 0:_a2[0])||"",movieLinks=$(element).attr("href"),title2=$(element).text();movieLinks&&links.push({directLinks:[{link:movieLinks,title:"Movie",type:"movie"}],quality:quality,title:title2})}),{title:title,synopsis:synopsis,image:image,imdbId:imdbId,type:type,linkList:links}}catch(err){return console.error(err),{title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]}}})},"getMeta");exports.getMeta=getMeta;