/**
 * Skipped minification because the original files appears to be already minified.
 * Original file: /npm/@candriajs/karin-plugin-meme@4.1.1/lib/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
import{r as e}from"./common-Cr8P5CKd.js";import{S as t,y as n}from"./models-B904Uk93.js";import{karinPathBase as r,logger as i}from"node-karin";import a from"node-karin/axios";import o from"node:path";import{GlobalFonts as s}from"canvas";async function c(){let t=o.join(r,e.Plugin_Name,`data`,`memes`);process.env.MEME_HOME=t;try{await n(),i.info(i.chalk.bold.blue(`[${e.Plugin_AliasName}] 🎉 表情包数据加载成功！`))}catch(t){i.error(i.chalk.bold.red(`[${e.Plugin_AliasName}] 💥 表情包数据加载失败！错误详情：${t.message}`))}await l();let s=`加载失败`;try{s=(await a.get(`https://api.wuliya.cn/api/image/count?name=${e.Plugin_Name}&type=json`,{timeout:3e3})).data.data.count}catch{i.error(i.chalk.red.bold(`⚠️ 访问统计数据失败，超时或网络错误`))}i.info(i.chalk.bold.rgb(0,255,0)(`========= 🌟🌟🌟 =========`)),i.info(i.chalk.bold.blue(`🌍 当前运行环境: `)+i.chalk.bold.white(`${e.Bot_Name}`)+i.chalk.gray(` | `)+i.chalk.bold.green(`🏷️ 运行版本: `)+i.chalk.bold.white(`V${e.Bot_Version}`)+i.chalk.gray(` | `)+i.chalk.bold.yellow(`📊 运行插件总访问/运行次数: `)+i.chalk.bold.cyan(s)),i.info(i.chalk.bold.rgb(255,215,0)(`✨ ${e.Plugin_AliasName} `)+i.chalk.bold.rgb(255,165,0)(e.Plugin_Version)+i.chalk.rgb(255,215,0).bold(` 载入成功 ^_^`)),i.info(i.chalk.cyan.bold(`💬 雾里的小窝: 272040396`)),i.info(i.chalk.green.bold(`=========================`))}async function l(){s.registerFromPath(`${e.Plugin_Path}/resources/fonts/NotoColorEmoji-Regular.woff2`,`NotoColorEmoji`),s.registerFromPath(`${e.Plugin_Path}/resources/fonts/SmileySans-Oblique.woff2`,`SmileySans`)}export{c as KARIN_PLUGIN_INIT,t as make_meme};