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AAO,EAAY,GACnB,EAAM,EAAQ,GAAG,GACvB,EAAW,KAAK,CACZ,KAAM,EACN,IAAK,GACP,IAEC,QAAQ,IAAI,EAAW","file":"/npm/pelisplushd@1.0.1/dist/api/api.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.19.2.\n * Original file: /npm/pelisplushd@1.0.1/dist/api/api.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n    return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst cheerio_1 = require(\"cheerio\");\r\nconst axios_1 = __importDefault(require(\"axios\"));\r\nconst index_1 = require(\"./utils/index\");\r\nconst index_2 = require(\"./url/index\");\r\nexports.search = async (query) => {\r\n    const res = await axios_1.default.get(`${index_2.BASE_URL}search/?s=${query}`);\r\n    const body = await res.data;\r\n    const $ = cheerio_1.load(body);\r\n    const union = [];\r\n    const promise = $('body div#default-tab-1 div.Posters a').map((index, element) => new Promise(async (resolve) => {\r\n        const $element = $(element);\r\n        const id = $element.attr('href').replace(index_2.BASE_URL, '').trim();\r\n        const title = $element.find('div.listing-content p').text().trim();\r\n        const poster = $element.find('img').attr('src');\r\n        const extra = await contentHandler(id);\r\n        union.push({\r\n            id: id || null,\r\n            title: title || null,\r\n            poster: poster || null,\r\n            year: extra.promises[0].year || null,\r\n            seasons: extra.seasons || null,\r\n            genres: extra.promises[0].genres || null,\r\n            rating: extra.promises[0].rating || null,\r\n            synopsis: extra.promises[0].synopsis || null,\r\n            authors: extra.promises[0].authors || null,\r\n            director: extra.promises[0].director || null,\r\n            writers: extra.promises[0].writers || null,\r\n            country: extra.promises[0].country || null,\r\n            releaseDate: extra.promises[0].releaseDate || null,\r\n            promo: extra.promises[0].promo || null\r\n        });\r\n        resolve(union);\r\n    }));\r\n    return Promise.all(promise.toArray());\r\n};\r\nexports.seriesByGenres = async (genre, page) => {\r\n    const res = await axios_1.default.get(`${index_2.BASE_URL}series/generos/${genre}/${page}`);\r\n    const body = await res.data;\r\n    const $ = cheerio_1.load(body);\r\n    const promises = [];\r\n    const promise = $('body div#default-tab-1 div.Posters a').map((index, element) => new Promise(async (resolve) => {\r\n        const $element = $(element);\r\n        const id = $element.attr('href').replace(index_2.BASE_URL, '').trim();\r\n        const title = $element.find('div.listing-content p').text().trim();\r\n        const poster = $element.find('img').attr('src');\r\n        const extra = await contentHandler(id);\r\n        promises.push({\r\n            id: id || null,\r\n            title: title || null,\r\n            poster: poster || null,\r\n            year: extra.promises[0].year || null,\r\n            seasons: extra.seasons || null,\r\n            genres: extra.promises[0].genres || null,\r\n            rating: extra.promises[0].rating || null,\r\n            synopsis: extra.promises[0].synopsis || null,\r\n            authors: extra.promises[0].authors || null,\r\n            director: extra.promises[0].director || null,\r\n            writers: extra.promises[0].writers || null,\r\n            country: extra.promises[0].country || null,\r\n            releaseDate: extra.promises[0].releaseDate || null,\r\n            promo: extra.promises[0].promo || null\r\n        });\r\n        resolve(promises);\r\n    }));\r\n    return Promise.all(promise.toArray());\r\n};\r\nexports.getPopularSeries = async (page) => {\r\n    const res = await axios_1.default.get(`${index_2.BASE_URL}series/populares/${page}`);\r\n    const body = await res.data;\r\n    const $ = cheerio_1.load(body);\r\n    const promises = [];\r\n    const promise = $('body div#default-tab-1 div.Posters a').map((index, element) => new Promise(async (resolve) => {\r\n        const $element = $(element);\r\n        const id = $element.attr('href').replace(index_2.BASE_URL, '').trim();\r\n        const title = $element.find('div.listing-content p').text().trim();\r\n        const poster = $element.find('img').attr('src');\r\n        const extra = await contentHandler(id);\r\n        promises.push({\r\n            id: id || null,\r\n            title: title || null,\r\n            poster: poster || null,\r\n            year: extra.promises[0].year || null,\r\n            seasons: extra.seasons || null,\r\n            genres: extra.promises[0].genres || null,\r\n            rating: extra.promises[0].rating || null,\r\n            synopsis: extra.promises[0].synopsis || null,\r\n            authors: extra.promises[0].authors || null,\r\n            director: extra.promises[0].director || null,\r\n            writers: extra.promises[0].writers || null,\r\n            country: extra.promises[0].country || null,\r\n            releaseDate: extra.promises[0].releaseDate || null,\r\n            promo: extra.promises[0].promo || null\r\n        });\r\n        resolve(promises);\r\n    }));\r\n    return Promise.all(promise.toArray());\r\n};\r\nexports.getLatestReleasesSeries = async (page) => {\r\n    const res = await axios_1.default.get(`${index_2.BASE_URL}series/estrenos/${page}`);\r\n    const body = await res.data;\r\n    const $ = cheerio_1.load(body);\r\n    const promises = [];\r\n    const promise = $('body div#default-tab-1 div.Posters a').map((index, element) => new Promise(async (resolve) => {\r\n        const $element = $(element);\r\n        const id = $element.attr('href').replace(index_2.BASE_URL, '').trim();\r\n        const title = $element.find('div.listing-content p').text().trim();\r\n        const poster = $element.find('img').attr('src');\r\n        const extra = await contentHandler(id);\r\n        promises.push({\r\n            id: id || null,\r\n            title: title || null,\r\n            poster: poster || null,\r\n            year: extra.promises[0].year || null,\r\n            seasons: extra.seasons || null,\r\n            genres: extra.promises[0].genres || null,\r\n            rating: extra.promises[0].rating || null,\r\n            synopsis: extra.promises[0].synopsis || null,\r\n            authors: extra.promises[0].authors || null,\r\n            director: extra.promises[0].director || null,\r\n            writers: extra.promises[0].writers || null,\r\n            country: extra.promises[0].country || null,\r\n            releaseDate: extra.promises[0].releaseDate || null,\r\n            promo: extra.promises[0].promo || null\r\n        });\r\n        resolve(promises);\r\n    }));\r\n    return Promise.all(promise.toArray());\r\n};\r\nexports.getAllSeries = async (page) => {\r\n    const res = await axios_1.default.get(`${index_2.BASE_URL}series/${page}`);\r\n    const body = await res.data;\r\n    const $ = cheerio_1.load(body);\r\n    const promises = [];\r\n    const promise = $('body div#default-tab-1 div.Posters a').map((index, element) => new Promise(async (resolve) => {\r\n        const $element = $(element);\r\n        const id = $element.attr('href').replace(index_2.BASE_URL, '').trim();\r\n        const title = $element.find('div.listing-content p').text().trim();\r\n        const poster = $element.find('img').attr('src');\r\n        const extra = await contentHandler(id);\r\n        promises.push({\r\n            id: id || null,\r\n            title: title || null,\r\n            poster: poster || null,\r\n            year: extra.promises[0].year || null,\r\n            seasons: extra.seasons || null,\r\n            genres: extra.promises[0].genres || null,\r\n            rating: extra.promises[0].rating || null,\r\n            synopsis: extra.promises[0].synopsis || null,\r\n            authors: extra.promises[0].authors || null,\r\n            director: extra.promises[0].director || null,\r\n            writers: extra.promises[0].writers || null,\r\n            country: extra.promises[0].country || null,\r\n            releaseDate: extra.promises[0].releaseDate || null,\r\n            promo: extra.promises[0].promo || null\r\n        });\r\n        resolve(promises);\r\n    }));\r\n    return Promise.all(promise.toArray());\r\n};\r\nexports.moviesByGenres = async (genre, page) => {\r\n    const res = await axios_1.default.get(`${index_2.BASE_URL}peliculas/generos/${genre}/${page}`);\r\n    const body = await res.data;\r\n    const $ = cheerio_1.load(body);\r\n    const promises = [];\r\n    const promise = $('body div#default-tab-1 div.Posters a').map((index, element) => new Promise(async (resolve) => {\r\n        const $element = $(element);\r\n        const id = $element.attr('href').replace(index_2.BASE_URL, '').trim();\r\n        const title = $element.find('div.listing-content p').text().trim();\r\n        const poster = $element.find('img').attr('src');\r\n        const extra = await contentHandler(id);\r\n        promises.push({\r\n            id: id || null,\r\n            title: title || null,\r\n            poster: poster || null,\r\n            year: extra.promises[0].year || null,\r\n            genres: extra.promises[0].genres || null,\r\n            rating: extra.promises[0].rating || null,\r\n            synopsis: extra.promises[0].synopsis || null,\r\n            authors: extra.promises[0].authors || null,\r\n            director: extra.promises[0].director || null,\r\n            writers: extra.promises[0].writers || null,\r\n            country: extra.promises[0].country || null,\r\n            releaseDate: extra.promises[0].releaseDate || null,\r\n            promo: extra.promises[0].promo || null\r\n        });\r\n        resolve(promises);\r\n    }));\r\n    return Promise.all(promise.toArray());\r\n};\r\nexports.getPopularMovies = async (page) => {\r\n    const res = await axios_1.default.get(`${index_2.BASE_URL}peliculas/populares/${page}`);\r\n    const body = await res.data;\r\n    const $ = cheerio_1.load(body);\r\n    const promises = [];\r\n    const promise = $('body div#default-tab-1 div.Posters a').map((index, element) => new Promise(async (resolve) => {\r\n        const $element = $(element);\r\n        const id = $element.attr('href').replace(index_2.BASE_URL, '').trim();\r\n        const title = $element.find('div.listing-content p').text().trim();\r\n        const poster = $element.find('img').attr('src');\r\n        const extra = await contentHandler(id);\r\n        promises.push({\r\n            id: id || null,\r\n            title: title || null,\r\n            poster: poster || null,\r\n            year: extra.promises[0].year || null,\r\n            genres: extra.promises[0].genres || null,\r\n            rating: extra.promises[0].rating || null,\r\n            synopsis: extra.promises[0].synopsis || null,\r\n            authors: extra.promises[0].authors || null,\r\n            director: extra.promises[0].director || null,\r\n            writers: extra.promises[0].writers || null,\r\n            country: extra.promises[0].country || null,\r\n            releaseDate: extra.promises[0].releaseDate || null,\r\n            promo: extra.promises[0].promo || null\r\n        });\r\n        resolve(promises);\r\n    }));\r\n    return Promise.all(promise.toArray());\r\n};\r\nexports.getLatestReleasesMovies = async (page) => {\r\n    const res = await axios_1.default.get(`${index_2.BASE_URL}peliculas/estrenos/${page}`);\r\n    const body = await res.data;\r\n    const $ = cheerio_1.load(body);\r\n    const promises = [];\r\n    const promise = $('body div#default-tab-1 div.Posters a').map((index, element) => new Promise(async (resolve) => {\r\n        const $element = $(element);\r\n        const id = $element.attr('href').replace(index_2.BASE_URL, '').trim();\r\n        const title = $element.find('div.listing-content p').text().trim();\r\n        const poster = $element.find('img').attr('src');\r\n        const extra = await contentHandler(id);\r\n        promises.push({\r\n            id: id || null,\r\n            title: title || null,\r\n            poster: poster || null,\r\n            year: extra.promises[0].year || null,\r\n            genres: extra.promises[0].genres || null,\r\n            rating: extra.promises[0].rating || null,\r\n            synopsis: extra.promises[0].synopsis || null,\r\n            authors: extra.promises[0].authors || null,\r\n            director: extra.promises[0].director || null,\r\n            writers: extra.promises[0].writers || null,\r\n            country: extra.promises[0].country || null,\r\n            releaseDate: extra.promises[0].releaseDate || null,\r\n            promo: extra.promises[0].promo || null\r\n        });\r\n        resolve(promises);\r\n    }));\r\n    return Promise.all(promise.toArray());\r\n};\r\nexports.getAllMovies = async (page) => {\r\n    const res = await axios_1.default.get(`${index_2.BASE_URL}peliculas/${page}`);\r\n    const body = await res.data;\r\n    const $ = cheerio_1.load(body);\r\n    const promises = [];\r\n    const promise = $('body div#default-tab-1 div.Posters a').map((index, element) => new Promise(async (resolve) => {\r\n        const $element = $(element);\r\n        const id = $element.attr('href').replace(index_2.BASE_URL, '').trim();\r\n        const title = $element.find('div.listing-content p').text().trim();\r\n        const poster = $element.find('img').attr('src');\r\n        const extra = await contentHandler(id);\r\n        promises.push({\r\n            id: id || null,\r\n            title: title || null,\r\n            poster: poster || null,\r\n            year: extra.promises[0].year || null,\r\n            genres: extra.promises[0].genres || null,\r\n            rating: extra.promises[0].rating || null,\r\n            synopsis: extra.promises[0].synopsis || null,\r\n            authors: extra.promises[0].authors || null,\r\n            director: extra.promises[0].director || null,\r\n            writers: extra.promises[0].writers || null,\r\n            country: extra.promises[0].country || null,\r\n            releaseDate: extra.promises[0].releaseDate || null,\r\n            promo: extra.promises[0].promo || null\r\n        });\r\n        resolve(promises);\r\n    }));\r\n    return Promise.all(promise.toArray());\r\n};\r\nconst episodeContentHanlder = async (id) => {\r\n    const res = await axios_1.default.get(`${index_2.BASE_URL}${id}`);\r\n    const body = await res.data;\r\n    const $ = cheerio_1.load(body);\r\n    const promises = [];\r\n    const previewImage = $('body div.card div.card-body div.row.m-v-30 div.col-sm-3 img.img-fluid').attr('src') || null;\r\n    let synopsis = $('body div div div.page-container div.main-content div.container-fluid div.card div.card-body div.row.m-v-30 div.col-sm-4')\r\n        .eq(0).find('div.text-large').text().trim();\r\n    promises.push({ previewImage: previewImage, synopsis: synopsis });\r\n    return Promise.all(promises);\r\n};\r\nconst contentHandler = async (id) => {\r\n    const res = await axios_1.default.get(`${index_2.BASE_URL}${id}`);\r\n    const body = await res.data;\r\n    const $ = cheerio_1.load(body);\r\n    const tempPromises = [];\r\n    const promises = [];\r\n    const seasons = $('body div ul.TbVideoNv li.presentation').length;\r\n    $('body div div div.page-container div.main-content div.container-fluid div.card div.card-body div.row.m-v-30 div.col-sm-4').eq(0).each((index, element) => {\r\n        const $element = $(element);\r\n        const synopsis = $element.find('div.text-large').text().trim();\r\n        const actors = [];\r\n        $element.find('div.sectionDetail.mb15').eq(0).find('a').each((j, el) => {\r\n            const $el = $(el);\r\n            const name = $el.text();\r\n            actors.push(name);\r\n        });\r\n        const director = $element.find('div.sectionDetail.mb15').eq(1).find('a').text().trim();\r\n        const writers = [];\r\n        $element.find('div.sectionDetail.mb15').eq(2).find('a').each((j, el) => {\r\n            const $el = $(el);\r\n            const name = $el.text();\r\n            writers.push(name);\r\n        });\r\n        const country = $element.find('div.sectionDetail.mb15').eq(3).find('a').text().trim();\r\n        const tempReleaseDate = $element.find('div.sectionDetail.mb15').eq(4).text().trim();\r\n        const releaseDate = tempReleaseDate.substring(tempReleaseDate.lastIndexOf(':') + 1);\r\n        tempPromises.push({\r\n            synopsis: synopsis,\r\n            authors: actors,\r\n            director: director,\r\n            writers: writers,\r\n            country: country,\r\n            releaseDate: releaseDate,\r\n        });\r\n    });\r\n    const year = parseInt($('body div div div.page-container div.main-content div.container-fluid div.card div.card-body div.row.m-v-30 div.col-sm-4 div.d-flex.flex-row div.p-v-20').eq(0).find('span').text().trim(), 10);\r\n    const genres = [];\r\n    $('body div div div.page-container div.main-content div.container-fluid div.card div.card-body div.row.m-v-30 div.col-sm-4 div.d-flex.flex-row div.p-v-20').eq(1).find('a').each((j, el) => {\r\n        const $el = $(el);\r\n        const genre = $el.find('span').text().trim();\r\n        genres.push(genre);\r\n    });\r\n    const rating = parseFloat($('body div div div.page-container div.main-content div.container-fluid div.card div.card-body div.row.m-v-30 div.col-sm-4 div.d-flex.flex-row div.p-v-20').eq(2).find('span').text().trim().split('/')[0]);\r\n    const promo = $('body div.app div.layout div.page-container div.main-content div.modal iframe').attr('src');\r\n    tempPromises.map(doc => {\r\n        promises.push({\r\n            year: year,\r\n            genres: genres,\r\n            rating: rating,\r\n            synopsis: doc.synopsis,\r\n            authors: doc.authors,\r\n            director: doc.director,\r\n            writers: doc.writers,\r\n            country: doc.country,\r\n            releaseDate: doc.releaseDate,\r\n            promo: promo\r\n        });\r\n    });\r\n    return { promises, seasons };\r\n};\r\nexports.getSeriesServersBySeason = async (id, season) => {\r\n    const res = await axios_1.default.get(`${index_2.BASE_URL}${id}`);\r\n    const body = await res.data;\r\n    const $ = cheerio_1.load(body);\r\n    const promises = [];\r\n    const serieId = id.split('/')[1];\r\n    const episodesTitles = [];\r\n    const totalEps = $(`body div div.container-fluid div.row div.col-sm-12 div.card div.tab-content div#pills-vertical-${season} a`).length;\r\n    $(`body div div.container-fluid div.row div.col-sm-12 div.card div.tab-content div#pills-vertical-${season} a`).each((index, element) => {\r\n        const $element = $(element);\r\n        const title = $element.text().split('-')[1].trim();\r\n        episodesTitles.push(title);\r\n    });\r\n    const episodes = await Promise.all(Array.from({ length: totalEps }, async (v, j) => {\r\n        index_1.sleep(1500);\r\n        const epsTitle = episodesTitles[j];\r\n        const episode = `serie/${serieId}/temporada/${season}/capitulo/${j + 1}`;\r\n        const epsId = `${episode}`;\r\n        index_1.sleep(1500);\r\n        const extra = await episodeContentHanlder(epsId);\r\n        const servers = await getSeriesServers(episode);\r\n        return {\r\n            episode: j + 1,\r\n            title: epsTitle,\r\n            previewImage: extra[0].previewImage,\r\n            synopsis: extra[0].synopsis,\r\n            servers: servers\r\n        };\r\n    }));\r\n    promises.push({ season: season, episodes: episodes });\r\n    return Promise.all(promises);\r\n};\r\nexports.getMovieServers = async (id) => {\r\n    const res = await axios_1.default.get(`${index_2.BASE_URL}${id}`);\r\n    const body = await res.data;\r\n    const $ = cheerio_1.load(body);\r\n    const scripts = $('script');\r\n    const servers = [];\r\n    const serverNames = [];\r\n    $('div.app div.layout ul.TbVideoNv li').each((index, element) => {\r\n        const $element = $(element);\r\n        const name = $element.find('a').text().trim();\r\n        serverNames.push(name);\r\n    });\r\n    Array.from({ length: scripts.length }, (v, k) => {\r\n        const $script = $(scripts[k]);\r\n        const contents = $script.html();\r\n        if ((contents || '').includes('var video = ')) {\r\n            let allScript = contents.split('video =  ');\r\n            allScript.map(x => {\r\n                let tempUrlList = index_1.urlify(x);\r\n                let urlListFixed = tempUrlList.map(x => {\r\n                    return x.replace(/[;\"]/g, '');\r\n                });\r\n                servers.push(urlListFixed);\r\n            });\r\n        }\r\n    });\r\n    const serverList = [];\r\n    Array.from({ length: serverNames.length }, (v, k) => {\r\n        const name = serverNames[k];\r\n        const url = servers[0][k];\r\n        serverList.push({\r\n            name: name,\r\n            url: url\r\n        });\r\n    });\r\n    return Promise.all(serverList);\r\n};\r\nconst getSeriesServers = async (id) => {\r\n    const res = await axios_1.default.get(`${index_2.BASE_URL}${id}`);\r\n    const body = await res.data;\r\n    const $ = cheerio_1.load(body);\r\n    const scripts = $('script');\r\n    const servers = [];\r\n    const serverNames = [];\r\n    $('div.app div.layout ul.TbVideoNv li').each((index, element) => {\r\n        const $element = $(element);\r\n        const name = $element.find('a').text().trim();\r\n        serverNames.push(name);\r\n    });\r\n    Array.from({ length: scripts.length }, (v, k) => {\r\n        const $script = $(scripts[k]);\r\n        const contents = $script.html();\r\n        if ((contents || '').includes('var video = ')) {\r\n            let allScript = contents.split('video =  ');\r\n            allScript.map(x => {\r\n                let tempUrlList = index_1.urlify(x);\r\n                let urlListFixed = tempUrlList.map(x => {\r\n                    return x.replace(/[;\"]/g, '');\r\n                });\r\n                servers.push(urlListFixed);\r\n            });\r\n        }\r\n    });\r\n    const serverList = [];\r\n    Array.from({ length: serverNames.length }, (v, k) => {\r\n        const name = serverNames[k];\r\n        const url = servers[0][k];\r\n        serverList.push({\r\n            name: name,\r\n            url: url\r\n        });\r\n    });\r\n    return Promise.all(serverList);\r\n};\r\n"]}