import{__exports as r}from"../../../../_virtual/alignSpanningCell.mjs";import{__require as t}from"../../../string-width/index.mjs";import{__require as e}from"./alignString.mjs";import{__require as n}from"./mapDataUsingRowHeights.mjs";import{__require as a}from"./padTableData.mjs";import{__require as i}from"./truncateTableData.mjs";import{__require as o}from"./utils.mjs";import{__require as l}from"./wrapCell.mjs";var s;function m(){if(s)return r;s=1;var m=r&&r.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(r,"__esModule",{value:!0}),r.alignVerticalRangeContent=r.wrapRangeContent=void 0;const u=m(t()),p=e(),g=n(),_=a(),f=i(),c=o(),w=l();r.wrapRangeContent=(r,t,e)=>{const{topLeft:n,paddingRight:a,paddingLeft:i,truncate:o,wrapWord:l,alignment:s}=r,m=e.rows[n.row][n.col],u=t-i-a;return(0,w.wrapCell)((0,f.truncateString)(m,o),u,l).map(r=>{const t=(0,p.alignString)(r,u,s);return(0,_.padString)(t,i,a)})};return r.alignVerticalRangeContent=(r,t,e)=>{const{rows:n,drawHorizontalLine:a,rowHeights:i}=e,{topLeft:o,bottomRight:l,verticalAlignment:s}=r;if(0===i.length)return[];const m=(0,c.sumArray)(i.slice(o.row,l.row+1))+(l.row-o.row)-(0,c.sequence)(o.row+1,l.row).filter(r=>!a(r,n.length)).length;return(0,g.padCellVertically)(t,m,s).map(r=>0===r.length?" ".repeat((0,u.default)(t[0])):r)},r}export{m as __require};