import{A as u,t as m,a as c}from"./Translator.js?ver=1.5.0";import{d as i}from"./dayjs.min.js?ver=1.5.0";import{u as p,t as y}from"./timezone.js?ver=1.5.0";i.extend(p);i.extend(y);class w{static debounce(r,t=300,n=null){let s;return(...a)=>{clearTimeout(s),s=setTimeout(()=>{r.bind(n)(...a)},t)}}}function S(e,r="MMM DD"){const t=u.get("datei18"),n=i.utc(e).local().locale({name:"fluent_date_time",weekdays:Object.values(t.weekdays),weekdaysShort:Object.values(t.weekdaysShort),months:Object.values(t.months),monthsShort:Object.values(t.monthsShort),meridiem:(s,a,l)=>{const f=t.am||"AM",o=t.pm||"PM",d=s<12?f:o;return l?d.toLowerCase():d}}).format(r);return h(n)}const h=function(e,r){return e&&(u.get("datei18"),e=e.toString(),c(e))};function x(e){if(e==null)return!0;if(typeof e=="string"||Array.isArray(e))return e.length===0;if(typeof e=="object")return Object.values(e).length===0}function O(e,r){typeof e>"u"||e===null||(Array.isArray(e)?e.forEach((t,n)=>{r(t,n)}):typeof e=="object"&&Object.keys(e).forEach((t,n)=>{let s=e[t];r(s,t)}))}function T(e,r="billing",t=!1){return e?(e.formatted_address&&(e=e.formatted_address),[t?" ":e.name,e.address_1,e.address_2,e.city,e.state,e.postcode,e.country].filter(a=>a!==null&&typeof a<"u"&&a.toString().trim().length>0).join(", ")||m("No %s address provided",r)):""}export{w as U,S as d,O as e,x as i,T as p};
