"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),P=require("./sizeUtil.js");function i(u){return typeof u=="string"&&u.endsWith("%")}function o(u){return Number(u.slice(0,-1))/100}const x=(u,c)=>{const v=t.computed(()=>t.unref(u).map(e=>e.size)),a=t.computed(()=>t.unref(u).length),r=t.computed(()=>t.unref(c)||0),g=e=>e*t.unref(r),l=t.ref(t.unref(u).map(e=>e.defaultSize||e["default-size"])),p=t.computed(()=>{const e=[];for(let n=0;n<a.value;n+=1)e[n]=v.value[n]??l.value[n];return e}),f=t.computed(()=>t.unref(u).map(e=>i(e.min)?o(e.min):(e.min||0)/r.value)),m=t.computed(()=>t.unref(u).map(e=>i(e.max)?o(e.max):(e.max||r.value)/r.value)),z=t.computed(()=>{const e=[];for(let n=0;n<a.value;n+=1){const s=p.value[n];if(i(s))e[n]=o(s);else if(s||s===0){const S=Number(s);Number.isNaN(S)||(e[n]=S/r.value)}else e[n]=void 0}return P.autoPtgSizes(e,f.value,m.value)}),d=t.computed(()=>t.unref(z).map(g));return[t.computed(()=>c?.value?t.unref(d):t.unref(p)),d,z,f,m,e=>{l.value=e}]};exports.getPtg=o;exports.useSizes=x;
