const O=/^#[a-f\d]{3}$/i,j=o=>O.test(o),U=/^#[a-f\d]{6}$/i,q=o=>U.test(o),z=o=>j(o)||q(o),s=(o,c=100)=>{if(!o)return null;if(!z(o))return o;j(o)&&(o=[o[0],o[1],o[1],o[2],o[2],o[3],o[3]].join(""));const r=parseInt(o.substring(1,3),16),n=parseInt(o.substring(3,5),16),t=parseInt(o.substring(5,7),16);return`rgba(${r}, ${n}, ${t}, ${c/100})`},A=o=>`--plugin-isv-conversionBooster-${o}`,C=["color_btn_text","color_btn_background","color_secondary_btn_text","color_secondary_btn_background","color_secondary_btn_border","color_page_background","color_entry_line","color_text","color_mask"],D=(o=A,c)=>{const r=c||[];return C.forEach(n=>{var e,i,l,b,u,a,d,g,$,w,p,h,f,S,m,v,H,E,X,I,T,B,L,P,R;let t=(l=(i=(e=window.Shopline)==null?void 0:e.theme)==null?void 0:i.settings)==null?void 0:l[n];if(((b=window.Shopline)==null?void 0:b.themeName)==="Barn"&&(n==="color_secondary_btn_text"||n==="color_secondary_btn_border")&&(t=(d=(a=(u=window.Shopline)==null?void 0:u.theme)==null?void 0:a.settings)==null?void 0:d.color_btn_background),t||(n==="color_secondary_btn_background"&&(t=((w=($=(g=window.Shopline)==null?void 0:g.theme)==null?void 0:$.settings)==null?void 0:w.color_secondary_btn_backgroud)||((f=(h=(p=window.Shopline)==null?void 0:p.theme)==null?void 0:h.settings)==null?void 0:f.color_button_secondary_background)),n==="color_secondary_btn_text"&&(t=((v=(m=(S=window.Shopline)==null?void 0:S.theme)==null?void 0:m.settings)==null?void 0:v.color_button_secondary_text)||((X=(E=(H=window.Shopline)==null?void 0:H.theme)==null?void 0:E.settings)==null?void 0:X.color_btn_background)),n==="color_secondary_btn_border"&&(t=((B=(T=(I=window.Shopline)==null?void 0:I.theme)==null?void 0:T.settings)==null?void 0:B.color_button_secondary_text)||((R=(P=(L=window.Shopline)==null?void 0:L.theme)==null?void 0:P.settings)==null?void 0:R.color_btn_background))),t){if(n==="color_mask"&&(t=s(t,60)),n==="color_text"){const _=s(t,3),y=s(t,60),N=s(t,70);r.push(`${o(`${n}_3`)}: ${_}; `),r.push(`${o(`${n}_60`)}: ${y}; `),r.push(`${o(`${n}_70`)}: ${N}; `)}if(n==="color_btn_background"){const _=s(t,2);r.push(`${o(`${n}_2`)}: ${_}; `)}r.push(`${o(n)}: ${t}; `)}}),r};export{D as g};