import{__exports as r}from"../../../../_virtual/mapDataUsingRowHeights.mjs";import{__require as t}from"./utils.mjs";import{__require as e}from"./wrapCell.mjs";var a;function l(){return a||(a=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.mapDataUsingRowHeights=r.padCellVertically=void 0;const a=t(),l=e(),o=r=>new Array(r).fill("");r.padCellVertically=(r,t,e)=>{const a=t-r.length;return"top"===e?[...r,...o(a)]:"bottom"===e?[...o(a),...r]:[...o(Math.floor(a/2)),...r,...o(Math.ceil(a/2))]};r.mapDataUsingRowHeights=(t,e,o)=>{const n=t[0].length,i=t.map((t,a)=>{const i=e[a],s=Array.from({length:i},()=>new Array(n).fill(""));return t.forEach((t,e)=>{var n;const c=null===(n=o.spanningCellManager)||void 0===n?void 0:n.getContainingRange({col:e,row:a});if(c)return void c.extractCellContent(a).forEach((r,t)=>{s[t][e]=r});const m=(0,l.wrapCell)(t,o.columns[e].width,o.columns[e].wrapWord);(0,r.padCellVertically)(m,i,o.columns[e].verticalAlignment).forEach((r,t)=>{s[t][e]=r})}),s});return(0,a.flatten)(i)}}(r)),r}export{l as __require};