import{t as e}from"./isObject-BNleAbAq.js";import{E as t,c as n,s as r}from"./isArrayLikeObject-CpNOZLZH.js";import{c as i}from"./_initCloneObject-BuQ4-jhh.js";function a(a,o,s,c){if(!e(a))return a;o=n(o,a);for(var l=-1,u=o.length,d=u-1,f=a;f!=null&&++l<u;){var p=r(o[l]),m=s;if(p===`__proto__`||p===`constructor`||p===`prototype`)return a;if(l!=d){var h=f[p];m=c?c(h,p,f):void 0,m===void 0&&(m=e(h)?h:t(o[l+1])?[]:{})}i(f,p,m),f=f[p]}return a}export{a as t};