the-forest/client/node_modules/postcss-preset-env/dist/index.mjs

2 lines
20 KiB
JavaScript
Raw Normal View History

2024-09-17 20:35:18 -04:00
import s from"autoprefixer";import e from"cssdb";import o from"@csstools/postcss-progressive-custom-properties";import t from"fs";import i from"path";import r from"browserslist";import n from"postcss-initial";import a from"postcss-pseudo-class-any-link";import c from"css-blank-pseudo";import p from"postcss-page-break";import m from"@csstools/postcss-cascade-layers";import u from"postcss-attribute-case-insensitive";import l from"postcss-clamp";import d from"@csstools/postcss-color-function";import f from"postcss-color-functional-notation";import g from"postcss-custom-media";import b from"postcss-custom-properties";import h from"postcss-custom-selectors";import N from"postcss-dir-pseudo-class";import k from"@csstools/postcss-normalize-display-values";import y from"postcss-double-position-gradients";import v from"postcss-env-function";import w from"postcss-focus-visible";import $ from"postcss-focus-within";import O from"@csstools/postcss-font-format-keywords";import S from"postcss-font-variant";import x from"postcss-gap-properties";import P from"css-has-pseudo";import j from"postcss-color-hex-alpha";import F from"@csstools/postcss-hwb-function";import E from"@csstools/postcss-ic-unit";import C from"postcss-image-set-function";import M from"@csstools/postcss-is-pseudo-class";import _ from"postcss-lab-function";import q from"postcss-logical";import A from"postcss-media-minmax";import R from"@csstools/postcss-nested-calc";import U from"postcss-nesting";import T from"postcss-selector-not";import B from"@csstools/postcss-oklab-function";import I from"postcss-opacity-percentage";import V from"postcss-overflow-shorthand";import W from"postcss-replace-overflow-wrap";import L from"postcss-place";import D from"css-prefers-color-scheme";import H from"postcss-color-rebeccapurple";import J from"@csstools/postcss-stepped-value-functions";import z from"@csstools/postcss-text-decoration-shorthand";import G from"@csstools/postcss-trigonometric-functions";import K from"@csstools/postcss-unset-value";const Q={"blank-pseudo-class":"https://github.com/csstools/postcss-plugins/blob/main/plugins/css-blank-pseudo/README-BROWSER.md","focus-visible-pseudo-class":"https://github.com/WICG/focus-visible","focus-within-pseudo-class":"https://github.com/jsxtools/focus-within/blob/master/README-BROWSER.md","has-pseudo-class":"https://github.com/csstools/postcss-plugins/blob/main/plugins/css-has-pseudo/README-BROWSER.md","prefers-color-scheme-query":"https://github.com/csstools/postcss-plugins/blob/main/plugins/css-prefers-color-scheme/README-BROWSER.md"},X=["blank-pseudo-class","focus-visible-pseudo-class","focus-within-pseudo-class","has-pseudo-class","prefers-color-scheme-query"];async function Y(s,e,o,t){const i=function(s){return`:root {\n${Object.keys(s).reduce(((e,o)=>(e.push(`\t${o}: ${s[o]};`),e)),[]).join("\n")}\n}\n`}(o),r=function(s){return`${Object.keys(s).reduce(((e,o)=>(e.push(`@custom-media ${o} ${s[o]};`),e)),[]).join("\n")}\n`}(e),n=function(s){return`${Object.keys(s).reduce(((e,o)=>(e.push(`@custom-selector ${o} ${s[o]};`),e)),[]).join("\n")}\n`}(t),a=`${r}\n${n}\n${i}`;await ts(s,a)}function Z(s,e){return`\n\t${s}: {\n${Object.keys(e).reduce(((s,o)=>(s.push(`\t\t'${is(o)}': '${is(e[o])}'`),s)),[]).join(",\n")}\n\t}`}function ss(s,e){return`export const ${s} = {\n${Object.keys(e).reduce(((s,o)=>(s.push(`\t'${is(o)}': '${is(e[o])}'`),s)),[]).join(",\n")}\n};\n`}function es(s,e){return Promise.all([].concat(e).map((async e=>{if(e instanceof Function)await e({customMedia:os(s.customMedia),customProperties:os(s.customProperties),customSelectors:os(s.customSelectors)});else{const o=e===Object(e)?e:{to:String(e)},t=o.toJSON||os;if("customMedia"in o||"customProperties"in o||"customSelectors"in o)o.customMedia=t(s.customMedia),o.customProperties=t(s.customProperties),o.customSelectors=t(s.customSelectors);else if("custom-media"in o||"custom-properties"in o||"custom-selectors"in o)o["custom-media"]=t(s.customMedia),o["custom-properties"]=t(s.customProperties),o["custom-selectors"]=t(s.customSelectors);else{const e=String(o.to||""),r=(o.type||i.e