// Metro module 4344 (f4345). import * as _isObject from "./isObject"; import * as _castPath from "./castPath"; import * as _toKey from "./toKey"; import * as _isIndex from "./isIndex"; import * as _assignValue from "./assignValue"; module.exports = function baseSet(a0, a1, a2, a3) { if (_isObject(a0)) { const r14 = _castPath(a1, a0); const length = r14.length; const r4 = length - 1; if (a0 != null) { let r0 = 0; const r6 = 0 < length; let r33 = a0; if (r6) { while (true) { const r35 = _toKey(r14[r0]); const r36 = r33; const r1 = r0; if (r35 !== "__proto__" && r35 !== "constructor" && r35 !== "prototype") { let r21 = a2; if (r1 !== r4) { let r23 = r36[r35]; r21 = a3 ? a3(r23, r35, r36) : void 0; if (r21 === void 0) { if (!_isObject(r23)) { r23 = _isIndex(r14[r1 + 1]) ? [] : {}; } r21 = r23; } } _assignValue(r36, r35, r21); const r47 = r36[r35]; if (r47 == null) { break; } r0 = r1 + 1; r33 = r47; if (r0 < length) { continue; } break; } return a0; } } } return a0; } return a0; };