"use strict";var e=require("postcss-value-parser"),l=new Map([["block,flow","block"],["block,flow-root","flow-root"],["inline,flow","inline"],["inline,flow-root","inline-block"],["run-in,flow","run-in"],["list-item,block,flow","list-item"],["inline,flow,list-item","inline list-item"],["block,flex","flex"],["inline,flex","inline-flex"],["block,grid","grid"],["inline,grid","inline-grid"],["inline,ruby","ruby"],["block,table","table"],["inline,table","inline-table"],["table-cell,flow","table-cell"],["table-caption,flow","table-caption"],["ruby-base,flow","ruby-base"],["ruby-text,flow","ruby-text"]]);function transform(n){const{nodes:o}=e(n);if(1===o.length)return n;const t=o.filter((e=>"word"===e.type)).map((e=>e.value.toLowerCase()));if(t.length<=1)return n;const i=l.get(t.join(","));return i||n}const creator=e=>{const l=!("preserve"in Object(e))||Boolean(e.preserve);return{postcssPlugin:"postcss-normalize-display-values",prepare(){const e=new Map;return{Declaration(n){if("display"!==n.prop.toLowerCase())return;const o=n.value;if(!o)return;if(e.has(o))return void(n.value!==e.get(o)&&(n.cloneBefore({value:e.get(o)}),l||n.remove()));const t=transform(o);e.set(o,t),n.value!==t&&(n.cloneBefore({value:t}),l||n.remove())}}}}};creator.postcss=!0,module.exports=creator;
