# imagify/trunk/assets/js/helpers.min.js

Imagify Image Optimization: Optimize Images | Compress &amp; Convert to WebP/AVIF, version trunk. 1 lines.

- Page: https://pluginprobe.com/plugins/imagify/trunk/code/assets/js/helpers.min.js
- Raw: https://pluginprobe.com/plugins/imagify/trunk/raw/assets/js/helpers.min.js
- Modified: 2026-09-07T07:18:16+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/imagify/trunk/code/assets/js/helpers.min.js#L10-L20`.

```javascript
!function(t){function o(t){return Math.round(t/12*100)/100}var n={getProgress:function(t,n){return t=Math.max(parseInt(t,10)||0,0),n=Math.max(parseInt(n,10)||0,0),{processed:n=(t=Math.max(t,n))-n,total:t,percent:0<t?Math.floor(n/t*100):0}},getPromoAppliesTo:function(t){var n=[];return t.applies_to instanceof Array?(t.applies_to.forEach(function(t){n.includes(t.plan_name)||n.push(t.plan_name)}),n):[t.applies_to]},sanitizeId:function(t){return parseInt(t,10)},splitPrice:function(t){var n=1<(t=(""+t).split(".")).length?""+t[1]:"";return""===n?n="00":1===n.length?n+="0":n=n.substring(0,2),[t[0],n]},humanSize:function(t){var n;return 0===t?"0 kB":(n=parseInt(Math.floor(Math.log(t)/Math.log(1024)),10),(t/Math.pow(1024,n)).toFixed(2)+" "+["B","kB","MB"][n])},formatQuota:function(t){return-1===t?"Unlimited":1e3<=t?t/1e3+" GB":t+" MB"},monthlyFromAnnual:o,applyDiscount:function(t,n,e){return{monthly:t*(e=(100-e)/100),yearly:o(n*e)}}};if(void 0!==t&&t)for(var e in t.imagify=t.imagify||{},n)Object.prototype.hasOwnProperty.call(n,e)&&(t.imagify[e]=n[e]);"undefined"!=typeof module&&module.exports&&(module.exports=n)}("undefined"!=typeof window?window:void 0);
```
