var e=8.43,t=7,n=.1,r=0,i=2,a=4/3;function o(e){return e&&e>0?e:t}function s(e){return Math.ceil(o(e))}function c(e,t){return e==null||e<=0?64:e*s(t)}function l(e,t){if(!Number.isFinite(e)||e<=0)return 0;let n=e/s(t);return Math.round(n*100)/100}function u(e){return(e==null||e===0?15:e)*96/72}function d(e){return Number.isFinite(e??0)?(e??0)*72/96:15}function f(e){let t=e>0?e:11;return{padLr:Math.max(i,Math.floor(t*n)),padTb:Math.max(a,Math.floor(t*r))}}function p(e){let t=``;for(e+=1;e;){let n=(e-1)%26;t=String.fromCharCode(65+n)+t,e=Math.floor((e-n)/26)}return t}function m(e){let t=e.match(/[A-Z]+/);if(!t)return 0;let n=0;for(let e of t[0])n=n*26+(e.charCodeAt(0)-64);return n-1}function h(e){let t=e.match(/\d+/);return t?parseInt(t[0],10)-1:0}function g(e){let t=e.replace(/^0x/i,``);return t.length===8?`rgba(${parseInt(t.slice(2,4),16)}, ${parseInt(t.slice(4,6),16)}, ${parseInt(t.slice(6,8),16)}, ${1 .toFixed(3)})`:t.length===6?`#${t}`:`#ffffff`}function _(e){if(e!=null)return e===64?`#000000`:`#000000.#FFFFFF.#FF0000.#00FF00.#0000FF.#FFFF00.#FF00FF.#00FFFF.#000000.#FFFFFF.#FF0000.#00FF00.#0000FF.#FFFF00.#FF00FF.#00FFFF.#800000.#008000.#000080.#808000.#800080.#008080.#C0C0C0.#808080.#9999FF.#993366.#FFFFCC.#CCFFFF.#660066.#FF8080.#0066CC.#CCCCFF.#000080.#FF00FF.#FFFF00.#00FFFF.#800080.#800000.#008080.#0000FF.#00CCFF.#CCFFFF.#CCFFCC.#FFFF99.#99CCFF.#FF99CC.#CC99FF.#FFCC99.#3366FF.#33CCCC.#99CC00.#FFCC00.#FF9900.#FF6600.#666699.#969696.#003366.#339966.#003300.#333300.#993300.#993366.#333399.#333333`.split(`.`)[e]}function v(e){let t=x(e);if(!t)return null;let n=t.split(`:`),r=n[0];if(!r)return null;let i=n[1]??r,a=h(r),o=m(r),s=h(i),c=m(i),l={startRow:Math.min(a,s),startCol:Math.min(o,c),endRow:Math.max(a,s),endCol:Math.max(o,c)};return{ref:y(l),bounds:l}}function y(e){let t=b(e.startRow,e.startCol),n=b(e.endRow,e.endCol);return t===n?t:`${t}:${n}`}function b(e,t){return`${p(t)}${e+1}`}function x(e){let t=e.trim();return t?(t.includes(`!`)?t.slice(t.indexOf(`!`)+1):t).replace(/\$/g,``).toUpperCase():null}function S(e){return{rows:e.endRow-e.startRow+1,cols:e.endCol-e.startCol+1}}function C(e,t){return e.startRow<=t.endRow&&e.endRow>=t.startRow&&e.startCol<=t.endCol&&e.endCol>=t.startCol}function w(e){let t=e.startsWith(`=`)?e.slice(1):e,n=t.indexOf(`!`);if(n===-1)return{ref:v(t)?.ref??t};let r=t.slice(0,n),i=t.slice(n+1),a=v(i);return{sheetName:T(r),ref:a?.ref??i}}function T(e){return e.startsWith(`'`)&&e.endsWith(`'`)&&e.length>=2?e.slice(1,-1).replace(/''/g,`'`):e}export{f as _,v as a,e as c,m as d,p as f,d as g,l as h,x as i,g as l,u as m,y as n,C as o,_ as p,b as r,w as s,S as t,c as u,h as v};
//# sourceMappingURL=address-utils-BA97BHFt.js.map