import i from"postcss-value-parser";var l=new Map([["flow","block"],["block,flow","block"],["flow,block","block"],["flow-root,block","flow-root"],["block,flow-root","flow-root"],["inline,flow","inline"],["flow,inline","inline"],["inline,flow-root","inline-block"],["flow-root,inline","inline-block"],["run-in,flow","run-in"],["flow,run-in","run-in"],["block,list-item","list-item"],["list-item,block","list-item"],["flow,list-item","list-item"],["list-item,flow","list-item"],["block,flow,list-item","list-item"],["block,list-item,flow","list-item"],["list-item,block,flow","list-item"],["list-item,flow,block","list-item"],["flow,block,list-item","list-item"],["flow,list-item,block","list-item"],["inline,flow,list-item","inline list-item"],["inline,list-item,flow","inline list-item"],["list-item,inline,flow","inline list-item"],["list-item,flow,inline","inline list-item"],["flow,inline,list-item","inline list-item"],["flow,list-item,inline","inline list-item"],["block,flex","flex"],["flex,block","flex"],["inline,flex","inline-flex"],["flex,inline","inline-flex"],["block,grid","grid"],["grid,block","grid"],["inline,grid","inline-grid"],["grid,inline","inline-grid"],["inline,ruby","ruby"],["ruby,inline","ruby"],["block,table","table"],["table,block","table"],["inline,table","inline-table"],["table,inline","inline-table"]]);function transform(e){if(!e.trim())return e;const{nodes:t}=i(e);if(t.length<=1)return e;const n=t.filter(i=>"word"===i.type).map(i=>i.value.toLowerCase());if(n.length<=1)return e;const o=l.get(n.join(","));return o||e}const e=/^display$/i,t=/\b\s\b/,creator=i=>{const l=!("preserve"in Object(i))||Boolean(i?.preserve);return{postcssPlugin:"postcss-normalize-display-values",Declaration(i){if(!e.test(i.prop))return;const n=i.value;if(!n)return;if(!t.test(n))return;const o=transform(n);i.value!==o&&(i.cloneBefore({value:o}),l||i.remove())}}};creator.postcss=!0;export{creator as default,creator as"module.exports"};
