Liferay.Loader.define("frontend-js-web@5.0.31/liferay/util/session.es",["module","exports","require","./fetch.es"],(function(e,t,n){var s;window;{Object.defineProperty(t,"__esModule",{value:!0}),t.getSessionValue=function(t,n={}){const s=a("get");s.append("key",t),n.useHttpSession&&s.append("useHttpSession",!0);return(0,o.default)(i(),{body:s,method:"POST"}).then((e=>e.text())).then((t=>{if(t.startsWith(e)){const n=t.substring(e.length);t=JSON.parse(n)}return t}))},t.setSessionValue=function(t,n,s={}){const r=a("set");n&&"object"==typeof n&&(n=e+JSON.stringify(n));r.append(t,n),s.useHttpSession&&r.append("useHttpSession",!0);return(0,o.default)(i(),{body:r,method:"POST"})};var o=(s=n("./fetch.es"))&&s.__esModule?s:{default:s};const e="serialize://";function a(e){const t=Liferay.ThemeDisplay.getDoAsUserIdEncoded(),n=new FormData;return n.append("cmd",e),n.append("p_auth",Liferay.authToken),t&&n.append("doAsUserId",t),n}function i(){return"".concat(Liferay.ThemeDisplay.getPortalURL()).concat(Liferay.ThemeDisplay.getPathMain(),"/portal/session_click")}}}));
//# sourceMappingURL=session.es.js.map