# fluent-cart/1.6.2/assets/chunks/Utils.js

FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler, version 1.6.2. 2 lines.

- Page: https://pluginprobe.com/plugins/fluent-cart/1.6.2/code/assets/chunks/Utils.js
- Raw: https://pluginprobe.com/plugins/fluent-cart/1.6.2/raw/assets/chunks/Utils.js
- Modified: 2026-08-20T12:34:14+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/fluent-cart/1.6.2/code/assets/chunks/Utils.js#L10-L20`.

```javascript
import{A as p,a as g,t as y}from"./Translator.js?ver=1.6.2";import{d as f}from"./dayjs.min.js?ver=1.6.2";import{u as x,t as S}from"./timezone.js?ver=1.6.2";import{C as w}from"./CurrencyFormatter.js?ver=1.6.2";f.extend(x);f.extend(S);class _{static debounce(a,e=300,n=null){let r;return(...s)=>{clearTimeout(r),r=setTimeout(()=>{a.bind(n)(...s)},e)}}}function N(t,a="MMM DD"){const e=p.get("datei18"),n=f.utc(t).local().locale({name:"fluent_date_time",weekdays:Object.values(e.weekdays),weekdaysShort:Object.values(e.weekdaysShort),months:Object.values(e.months),monthsShort:Object.values(e.monthsShort),meridiem:(r,s,o)=>{const l=e.am||"AM",u=e.pm||"PM",d=r<12?l:u;return o?d.toLowerCase():d}}).format(a);return A(n)}const A=function(t,a){return t&&(p.get("datei18"),t=t.toString(),g(t))};function C(t){if(t==null)return!0;if(typeof t=="string"||Array.isArray(t))return t.length===0;if(typeof t=="object")return Object.values(t).length===0}function E(t,a){typeof t>"u"||t===null||(Array.isArray(t)?t.forEach((e,n)=>{a(e,n)}):typeof t=="object"&&Object.keys(t).forEach((e,n)=>{let r=t[e];a(r,e)}))}function P(t,a="billing",e=!1){return t?(t.formatted_address&&(t=t.formatted_address),[e?" ":t.name,t.address_1,t.address_2,t.city,t.state,t.postcode,t.country].filter(s=>s!==null&&typeof s<"u"&&s.toString().trim().length>0).join(", ")||y("No %s address provided",a)):""}function z(t,a=null){return w.formatNumber(Math.round(Number(t)||0),!0,!1,a)}function D(t,a,e,n,r){const o=r.viewSize[0],l=r.viewSize[1],u=r.contentSize[0],d=r.contentSize[1],c=t[0]-16-u,m=t[0]+16;let i=t[0]>o/2?c:m;i<16?i=m:i+u>o-16&&(i=c),i=Math.min(Math.max(16,i),Math.max(16,o-u-16));const h=Math.min(Math.max(16,t[1]-d/2),Math.max(16,l-d-16));return[i,h]}function H(t,a,e=null,n="line"){return n==="bar"?{type:"shadow",shadowStyle:{color:t?a:"rgba(103, 129, 168, 0.10)"}}:{type:"line",lineStyle:{type:"solid",width:2,color:t?a:e}}}export{_ as U,D as a,z as b,H as c,N as d,E as e,C as i,P as p};

```
