function o(r){return r==="__proto__"}function l(r){switch(typeof r){case"number":case"symbol":return!1;case"string":return r.includes(".")||r.includes("[")||r.includes("]")}}function c(r){return typeof r=="string"||typeof r=="symbol"?r:Object.is(r?.valueOf?.(),-0)?"-0":String(r)}function g(r){if(r==null)return"";if(typeof r=="string")return r;if(Array.isArray(r))return r.map(g).join(",");const n=String(r);return n==="0"&&Object.is(Number(r),-0)?"-0":n}function m(r){if(Array.isArray(r))return r.map(c);if(typeof r=="symbol")return[r];r=g(r);const n=[],s=r.length;if(s===0)return n;let i=0,t="",f="",u=!1;for(r.charCodeAt(0)===46&&(n.push(""),i++);i<s;){const e=r[i];f?e==="\\"&&i+1<s?(i++,t+=r[i]):e===f?f="":t+=e:u?e==='"'||e==="'"?f=e:e==="]"?(u=!1,n.push(t),t=""):t+=e:e==="["?(u=!0,t&&(n.push(t),t="")):e==="."?t&&(n.push(t),t=""):t+=e,i++}return t&&n.push(t),n}function y(r,n,s){if(r==null)return s;switch(typeof n){case"string":{if(o(n))return s;const i=r[n];return i===void 0?l(n)?y(r,m(n),s):s:i}case"number":case"symbol":{typeof n=="number"&&(n=c(n));const i=r[n];return i===void 0?s:i}default:{if(Array.isArray(n))return b(r,n,s);if(Object.is(n?.valueOf(),-0)?n="-0":n=String(n),o(n))return s;const i=r[n];return i===void 0?s:i}}}function b(r,n,s){if(n.length===0)return s;let i=r;for(let t=0;t<n.length;t++){if(i==null||o(n[t]))return s;i=i[n[t]]}return i===void 0?s:i}export{c as a,y as g,l as i,m as t};
