import{Md as f,Nd as a,Od as n,Ud as p,_d as c,r as i,s as u}from"./chunk-UNHECMG2.js";function d(r){return typeof r=="function"?p(r):typeof r=="number"&&!isFinite(r)?isNaN(r)?"NaN":r>0?"Infinity":"-Infinity":JSON.stringify(r)}function y(r){return r.map(function(e){var t=e.key,s=e.type;return"".concat(t,": ").concat(s.name)}).join("/")}function g(r){return r.message!==void 0?r.message:"Invalid value ".concat(d(r.value)," supplied to ").concat(y(r.context))}function l(r){return r.map(g)}function x(){return["No errors!"]}var m={report:n(l,x)};var o=class extends Error{constructor(){super(...arguments),this.name="DecodeError"}};function N(r){return e=>f(r.decode(e),n(t=>u(()=>new o(m.report(a(t)).join(`
`))),t=>i(t)))}function R(r){return N(c(r))}export{N as a,R as b};
