function r(t){if(!Array.isArray(t))return t;const e=[];return t.forEach((t=>{const n=r(t);null!=n&&e.push(...Array.isArray(n)?n:[n])})),e.length?e:void 0}function t(e,n,o=!1){if("object"!=typeof e)return;let s;if(Array.isArray(e))s=e.map((r=>t(r,n,o)));else if(s=e[n],o){s=[s];for(const[r,c]of Object.entries(e))r!==n&&"object"==typeof c&&s.push(t(e[r],n,o))}return r(s)}function e(t,e){const n="object"==typeof e?(o=e,r=>{for(const[t,e]of Object.entries(o))if(r[t]!==e)return!1;return!0}):e;var o;const s=Array.isArray(t),c=s?t:[t],f=[];for(const r of c){if(null==r)continue;const t=n(r);!0===t?f.push(r):null!=t&&!1!==t&&f.push(t)}return r(s?f:f[0])}function n(n,o,...s){const c=o.replace(/\s+/g,"").split(/(\.{1,2}|\[\?\]|\[\d+\])/g).filter((r=>r.length>0)).map((r=>{r=r.replace(/\[|\]/g,"");const t=parseInt(r);return isNaN(t)?r:t}));let f=0,i="",u=0;for(;null!=n&&f<c.length;){const o=c[f++];switch(!0){case".."===o:case"."===o:break;case"?"===o:const c=s[u++];if(null==c)throw new Error(`missing function for ${i}`);n=e(n,c);break;case"number"==typeof o:n=r(n[o]);break;default:n=t(n,o,".."===i)}i=o}return n}export{n as get};
//# sourceMappingURL=index.js.map
