{t.d(B,{AB:()=>f,AS:()=>S,eM:()=>N,pq:()=>y});var o=t(2543),e=t.n(o),A=t(79657);const f=(x,M,d)=>{if(!N(M.id??"",d))throw new Error(`No such route with ID '${M.id}'`);function h(v){let U=v;if(v.id===M.id){const R=(0,A.SJ)(x,M,d);U=(0,o.omit)({...v,...R},"id")}return(0,o.omit)({...U,routes:v.routes?.map(h)},"id")}return h(d)},S=(x,M)=>{if(x.id===M.id)throw new Error("You cant remove the root policy");function d(L){return(0,o.omit)({...L,routes:L.routes?.reduce((h=[],v)=>(v.id===x.id||h.push(d(v)),h),[])},"id")}return d(M)},y=(x,M,d,L)=>{const h=(0,A.SJ)(x,M,L);function v(R){return R.id===d.id?{...R,routes:R.routes?.concat(h)}:{...R,routes:R.routes?.map(v)}}function U(R){return(0,o.omit)({...R,routes:R.routes?.map(U)},"id")}return U(v(L))};function N(x,M){return M.id===x?M:M.routes?.find(d=>N(x,d))}}}]); //# sourceMappingURL=AlertAmRoutes.10a0d9a23a082caf12c8.js.map