import{D as t}from"./p-d50d0ec8.js";import{M as r}from"./p-fac8edcc.js";import{U as s}from"./p-56d4255d.js";const e=t=>"active"===t.status,o=t=>{const r=t.consents||[];return(t.config.agreements||[]).filter((t=>!r.some((r=>r.agreement._id===t._id)))).length>0},c=t=>{if(!t.config.enforceRequiredInfo)return!1;const r=t.config.fields||[];for(let s=0;s<r.length;s++){const e=r[s];if(e.required&&!t[e.id])return!0}return!1};class n extends t{static decode(t){const e=Object.assign(Object.create(n.prototype),t);return e.config=r.decode(e.config),e.user=s.decode(e.user),e}requireDataCompletion(){if(!this.config.enforceRequiredInfo)return!1;const t=this.config.fields||[];for(let r=0;r<t.length;r++){const s=t[r];if(s.required&&!this[s.id])return!0}return!1}}export{n as M,c as a,o as d,e as i}