/*!
 * Crafted with ❤ by Salla
 */
import{d as e}from"./p-Cb4NFvMH.js";function E(e,E){return E.forEach((function(E){E&&"string"!=typeof E&&!Array.isArray(E)&&Object.keys(E).forEach((function(i){if("default"!==i&&!(i in e)){var _=Object.getOwnPropertyDescriptor(E,i);Object.defineProperty(e,i,_.get?_:{enumerable:!0,get:function(){return E[i]}})}}))})),Object.freeze(e)}var i,_,l={exports:{}},n=i?l.exports:(i=1,l.exports=(_=function(e){var E=e.addFilter,i=e.utils,_=i.Type,l=i.replaceInString,n=i.toNaturalFileSize;return E("ALLOW_HOPPER_ITEM",(function(e,E){var i=E.query;if(!i("GET_ALLOW_FILE_SIZE_VALIDATION"))return!0;var _=i("GET_MAX_FILE_SIZE");if(null!==_&&e.size>_)return!1;var l=i("GET_MIN_FILE_SIZE");return!(null!==l&&e.size<l)})),E("LOAD_FILE",(function(e,E){var i=E.query;return new Promise((function(E,_){if(!i("GET_ALLOW_FILE_SIZE_VALIDATION"))return E(e);var t=i("GET_FILE_VALIDATE_SIZE_FILTER");if(t&&!t(e))return E(e);var I=i("GET_MAX_FILE_SIZE");if(null!==I&&e.size>I)_({status:{main:i("GET_LABEL_MAX_FILE_SIZE_EXCEEDED"),sub:l(i("GET_LABEL_MAX_FILE_SIZE"),{filesize:n(I,".",i("GET_FILE_SIZE_BASE"),i("GET_FILE_SIZE_LABELS",i))})}});else{var L=i("GET_MIN_FILE_SIZE");if(null!==L&&e.size<L)_({status:{main:i("GET_LABEL_MIN_FILE_SIZE_EXCEEDED"),sub:l(i("GET_LABEL_MIN_FILE_SIZE"),{filesize:n(L,".",i("GET_FILE_SIZE_BASE"),i("GET_FILE_SIZE_LABELS",i))})}});else{var a=i("GET_MAX_TOTAL_FILE_SIZE");if(null!==a&&i("GET_ACTIVE_ITEMS").reduce((function(e,E){return e+E.fileSize}),0)>a)return void _({status:{main:i("GET_LABEL_MAX_TOTAL_FILE_SIZE_EXCEEDED"),sub:l(i("GET_LABEL_MAX_TOTAL_FILE_SIZE"),{filesize:n(a,".",i("GET_FILE_SIZE_BASE"),i("GET_FILE_SIZE_LABELS",i))})}});E(e)}}}))})),{options:{allowFileSizeValidation:[!0,_.BOOLEAN],maxFileSize:[null,_.INT],minFileSize:[null,_.INT],maxTotalFileSize:[null,_.INT],fileValidateSizeFilter:[null,_.FUNCTION],labelMinFileSizeExceeded:["File is too small",_.STRING],labelMinFileSize:["Minimum file size is {filesize}",_.STRING],labelMaxFileSizeExceeded:["File is too large",_.STRING],labelMaxFileSize:["Maximum file size is {filesize}",_.STRING],labelMaxTotalFileSizeExceeded:["Maximum total size exceeded",_.STRING],labelMaxTotalFileSize:["Maximum total file size is {filesize}",_.STRING]}}},"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:_})),_)),t=E({__proto__:null,default:e(n)},[n]);
/*!
 * FilePondPluginFileValidateSize 2.2.8
 * Licensed under MIT, https://opensource.org/licenses/MIT/
 * Please visit https://pqina.nl/filepond/ for details.
 */export{t as f}