var _,d;function I(){if(d)return _;d=1;function u(e){this._maxSize=e,this.clear()}u.prototype.clear=function(){this._size=0,this._values=Object.create(null)},u.prototype.get=function(e){return this._values[e]},u.prototype.set=function(e,r){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=r};var y=/[^.^\]^[]+|(?=\[\]|\.\.)/g,v=/^\d+$/,C=/^\d/,m=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,A=/^\s*(['"]?)(.*?)(\1)\s*$/,a=512,g=new u(a),p=new u(a),x=new u(a);_={Cache:u,split:l,normalizePath:f,setter:function(e){var r=f(e);return p.get(e)||p.set(e,function(c,t){for(var n=0,s=r.length,o=c;n<s-1;){var E=r[n];if(E==="__proto__"||E==="constructor"||E==="prototype")return c;o=o[r[n++]]}o[r[n]]=t})},getter:function(e,r){var i=f(e);return x.get(e)||x.set(e,function(t){for(var n=0,s=i.length;n<s;)if(t!=null||!r)t=t[i[n++]];else return;return t})},join:function(e){return e.reduce(function(r,i){return r+(h(i)||v.test(i)?"["+i+"]":(r?".":"")+i)},"")},forEach:function(e,r,i){z(Array.isArray(e)?e:l(e),r,i)}};function f(e){return g.get(e)||g.set(e,l(e).map(function(r){return r.replace(A,"$2")}))}function l(e){return e.match(y)||[""]}function z(e,r,i){var c=e.length,t,n,s,o;for(n=0;n<c;n++)t=e[n],t&&(S(t)&&(t='"'+t+'"'),o=h(t),s=!o&&/^\d+$/.test(t),r.call(i,t,o,s,n,e))}function h(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function G(e){return e.match(C)&&!e.match(v)}function R(e){return m.test(e)}function S(e){return!h(e)&&(G(e)||R(e))}return _}var P=I();export{P as p};
