"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 getMeta=__name(function(_0){return __async(this,arguments,function*({link:link,providerContext:providerContext}){var _a,_b,_c,_d,_e;try{let decodeHtml2=function(encodedArray){return encodedArray.join("").replace(/\\"/g,'"').replace(/\\'/g,"'").replace(/\\n/g,"\n").replace(/\\t/g,"\t").replace(/\\r/g,"\r").replace(/&quot;/g,'"').replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")};__name(decodeHtml2,"decodeHtml");const{axios:axios,cheerio:cheerio,getBaseUrl:getBaseUrl}=providerContext,baseUrl=yield getBaseUrl("protonMovies");console.log("all",link);const data=(yield axios.get(`${baseUrl}${link}`)).data,htmlArray=null==(_e=null==(_d=null==(_c=null==(_b=null==(_a=cheerio.load(data)('script:contains("decodeURIComponent")').text().split(" = "))?void 0:_a[1])?void 0:_b.split("protomovies"))?void 0:_c[0])?void 0:_d.trim())?void 0:_e.slice(0,-1),html=decodeHtml2(JSON.parse(htmlArray)),$=cheerio.load(html),title=$(".trending-text.fw-bold.texture-text.text-uppercase.my-0.fadeInLeft.animated.d-inline-block").text(),image=$("#thumbnail").attr("src"),type=link.includes("series")?"series":"movie",synopsis=$(".col-12.iq-mb-30.animated.fadeIn").first().text()||$(".description-content").text(),tags=$(".p-0.mt-2.list-inline.d-flex.flex-wrap.movie-tag").find("li").map((i,el)=>$(el).text()).slice(0,3).get(),links=[];if("movie"===type){const directLinks=[];directLinks.push({title:"Movie",link:baseUrl+link}),links.push({title:"Movie",directLinks:directLinks})}else $("#episodes").children().map((i,element)=>{let directLinks=[];$(element).find(".episode-block").map((j,ep)=>{const link2=baseUrl+$(ep).find("a").attr("href")||"",title2="Episode "+$(ep).find(".episode-number").text().split("E")[1];directLinks.push({title:title2,link:link2})}),links.push({title:"Season "+(i+1),directLinks:directLinks})});return{image:image||"",imdbId:"",linkList:links,title:title||"",synopsis:synopsis,tags:tags,type:type}}catch(err){return console.error("prton",err),{title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]}}})},"getMeta");exports.getMeta=getMeta;