import{o as p}from"./animation-7e2d11a2.js";import{g as m}from"./request-a636442b.js";const f={bindListeners(){document.addEventListener("click",o=>{const e=o.target.closest("[data-dialog-open-remote]");if(!e)return;o.preventDefault();const i=e.getAttribute("data-dialog-open-remote"),r=e.getAttribute("href")||e.getAttribute("data-remote-url"),n=e.getAttribute("data-remote-route-url"),d=!e.hasAttribute("data-remote-disable-reload"),s=e.hasAttribute("data-dialog-prevent-light-dismiss"),a=e.hasAttribute("data-dialog-non-modal-mode");if(!r||!i)return;if(n&&(o.ctrlKey||o.metaKey)){window.open(n,"_blank");return}const l={url:r,dialogId:i,shouldReload:d,preventLightDismiss:s,routeUrl:n,nonModalMode:a};this.openRemote(l)}),window.addEventListener("popstate",o=>{var e,i;if(((e=o.state)==null?void 0:e.action)==="OPEN_DIALOG")this.openRemote({...o.state.options,routeUrl:null});else if(((i=o.state)==null?void 0:i.action)==="CLOSE_DIALOG"){const r=document.querySelector(`drb-dialog#${o.state.dialogId}`);r==null||r.close()}})},openRemote(o){const{url:e,dialogId:i,shouldReload:r=!0,preventLightDismiss:n=!1,routeUrl:d=null,nonModalMode:s=!1,remoteLoadingSlotHtml:a=null,remoteInitialHeight:l=null,shouldResetIsFetching:h=!0}=o;let t=document.querySelector(`drb-dialog#${i}`);return t&&r&&(t.remove(),t=null),t||(t=document.createElement("drb-dialog"),t.id=i,t.innerHTML=`
${a?`