Liferay.Loader.define("data-engine-js-components-web@1.0.89/js/custom/form-report/utils/client",["module","exports","require","frontend-js-web"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.getURL=getURL,t.request=function request({endpoint:t,method:r="GET",params:o={}}){return(0,n.fetch)(getURL(t,o),{headers:e,method:r}).then((e=>parseResponse(e)))};var n=r("frontend-js-web");function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const e={Accept:"application/json","Accept-Language":Liferay.ThemeDisplay.getBCP47LanguageId(),"Content-Type":"application/json"},parseJSON=(e,t,r)=>e.text().then((e=>t(e?JSON.parse(e):{}))).catch((e=>r(e))),parseResponse=e=>new Promise(((t,r)=>{e.ok?parseJSON(e,t,r):parseJSON(e,r,r)}));function getURL(e,t){t=function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach((function(t){_defineProperty(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({p_auth:Liferay.authToken,t:Date.now()},t);const r=new URL("".concat(window.location.origin).concat(e));return Object.keys(t).forEach((e=>{Array.isArray(t[e])?t[e].forEach((t=>r.searchParams.append(e,t))):r.searchParams.set(e,t[e])})),r.toString()}}}));
//# sourceMappingURL=client.js.map