function e(e){if(!(null==e?void 0:e.properties))return{};const t=Object.assign({},e.properties),r={id:"_id",timestamp:"_timestamp",descriptive:"_descriptive",createduser:"_createduser",createdtime:"_createdtime",updateduser:"_updateduser"};for(const[e,n]of Object.entries(r)){const r=t[e];r&&(t[n]=r,delete t[e])}return t}function t(t,r,n){if(!n||!r||!t)return;const o=n.split(".");let i,s=t[r];for(const t of o){if(!s)return;if(i=e(s)[t],!i)return;i.relation&&(s=i.relation.getLimetype())}return i}function r(t,r,n){if(!n||!r||!t)return{property:void 0};const o=n.split(".");let i,s=t[r];for(let t=0;t<o.length;t++){const r=o[t];if(!s)return{property:void 0};if(i=e(s)[r],!i)return{property:void 0,error:`Property '${r}' does not exist on limetype '${s.name}'`};if("hasmany"===i.type||"hasandbelongstomany"===i.type)return{property:void 0,error:`Cannot filter on many-relation '${o.slice(0,t+1).join(".")}'. Use a related limetype's filter instead.`};i.relation&&(s=i.relation.getLimetype())}return{property:i}}export{e as a,t as g,r as v}