text: "use strict";var __importDefault=this&&this.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},__importStar=this&&this.__importStar||function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b};Object.defineProperty(exports,"__esModule",{value:!0});const postcss_1=__importDefault(require("postcss")),process=async({plugins:a,parser:b,syntax:c},d,e,f)=>{const{css:g,map:h,messages:i}=await postcss_1.default(a).process(d,{from:e,map:{prev:f},parser:b,syntax:c}),j=i.reduce((a,b)=>"dependency"===b.type?(a.push(b.file),a):a,[]);return{code:g,map:h,dependencies:j}},transformer=async({content:a,filename:b,options:c,map:d=void 0})=>{if(c&&Array.isArray(c.plugins))return process(c,a,b,d);try{const{default:a}=await Promise.resolve().then(()=>__importStar(require(`postcss-load-config`))),b=await a(c,c?c.configFilePath:void 0);c={plugins:b.plugins,...b.options}}catch(b){return"MODULE_NOT_FOUND"===b.code?console.error(`[svelte-preprocess] PostCSS configuration was not passed. If you expect to load it from a file, make sure to install "postcss-load-config" and try again ʕ•ᴥ•ʔ`):console.error(b),{code:a,map:d,dependencies:[]}}return process(c,a,b,d)};exports.default=transformer;