Liferay.Loader.define("frontend-js-web@5.0.33/liferay/PortletBase.es",["module","exports","require","frontend-js-metal-web$metal-component","./util/form/object_to_form_data.es"],(function(e,t,o){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(o("frontend-js-metal-web$metal-component")),a=n(o("./util/form/object_to_form_data.es"));function n(e){return e&&e.__esModule?e:{default:e}}function s(e){return"string"==typeof e&&(e=document.querySelector(e)),e}function l(e){return"string"==typeof e}class e extends r.default{all(e,t){return(t=s(t)||this.rootNode||document).querySelectorAll(this.namespaceSelectors_(this.portletNamespace||this.namespace,e))}fetch(e,t){const o=this.getRequestBody_(t);return fetch(e,{body:o,credentials:"include",method:"POST"})}getRequestBody_(e){let t;return t=e instanceof FormData?e:e instanceof HTMLFormElement?new FormData(e):"object"==typeof e?(0,a.default)(this.ns(e)):e,t}namespaceSelectors_(e,t){return t.replace(new RegExp("(#|\\[id=(\\\"|\\'))(?!"+e+")","g"),"$1"+e)}ns(e){return Liferay.Util.ns(this.portletNamespace||this.namespace,e)}one(e,t){return(t=s(t)||this.rootNode||document).querySelector(this.namespaceSelectors_(this.portletNamespace||this.namespace,e))}rootNodeValueFn_(){return document.getElementById("p_p_id".concat(this.portletNamespace||this.namespace))}}e.STATE={namespace:{validator:l},portletNamespace:{validator:l},rootNode:{setter:s,valueFn:"rootNodeValueFn_"}};var c=e;t.default=c}}));
//# sourceMappingURL=PortletBase.es.js.map