(()=>{const{fetch:t}=window;window.fetch=(...e)=>{let r,[o,n]=e;if(void 0===n||void 0===n.body)return t(o,n);try{r=JSON.parse(n.body)}catch(e){return t(o,n)}return null===r||void 0===r.requests||!r.requests instanceof Array||(r.requests.forEach(function(t){t.path.includes("cart/add-item")&&(t.body._wp_http_referer=window.location.href)}),n.body=JSON.stringify(r)),t(o,n)}})()