Liferay.Loader.define("@liferay/frontend-data-set-web@1.0.31/utils/iframes",["module","exports","require","./eventsDefinitions","./logError"],(function(e,r,t){window;{Object.defineProperty(r,"__esModule",{value:!0}),r.isPageInIframe=f,r.subscribeModal=function(){return e.add(++u),u},r.unsubscribeModal=function(r){e.delete(r)};var n=t("./eventsDefinitions"),o=t("./logError");function i(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?i(Object(t),!0).forEach((function(r){a(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function a(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function f(){return window.location!==window.parent.location}const e=new Set;let u=0;f()||Liferay.on(n.OPEN_MODAL_FROM_IFRAME,(r=>{if(!e.size)return(0,o.logError)("No registered modals found.");const t=Array.from(e),i=t[t.length-1];Liferay.fire(n.OPEN_MODAL,c(c({},r),{},{id:i}))})),Liferay.on("beforeNavigate",(()=>{e.clear()}))}}));
//# sourceMappingURL=iframes.js.map