1import{a as mt}from"./chunk-F2YSC6UC.js";import"./chunk-54W5WZQA.js";import{c as ot,e as Ft,f as it,h as zt,k as Gt,l as ft,m as Vt}from"./chunk-JJIDVCXS.js";import{a as ut}from"./chunk-QUJFQN2Y.js";import{f as Kt,g as jt}from"./chunk-SHP4ND3R.js";import{a as Pt}from"./chunk-FPOZYJOD.js";import{a as Mt}from"./chunk-QYLUONB5.js";import{g as It,h as Nt,j as Lt,k as _t,l as ht,o as Ht,p as Q,q as $t,s as Wt,t as nt}from"./chunk-6D677ZFO.js";import{a as Bt,b as Yt,c as Rt}from"./chunk-XNDU5ZZL.js";import{a as f}from"./chunk-GXWWUYBK.js";import{a as pt}from"./chunk-VZWY4NEG.js";import"./chunk-WI5MSH4N.js";import"./chunk-DGDFF3EP.js";import{a as w}from"./chunk-CKP3SGE2.js";import{c as qt}from"./chunk-6N4CUDVL.js";import{b as V}from"./chunk-VXV6LGYV.js";import{c as Dt,d as Ot,h as P,i as G,m as J}from"./chunk-WCXRWRL6.js";import{a as gt,b as rt,f as Ut,h as yt,j as K,k as Zt,m as Xt,n as D}from"./chunk-2TPYN4T3.js";import{h as R}from"./chunk-HHJ6TDNL.js";var tt=(function(t){return t.Dark="DARK",t.Light="LIGHT",t.Default="DEFAULT",t})(tt||{}),xt={getEngine(){let t=Pt();if(t?.isPluginAvailable("StatusBar"))return t.Plugins.StatusBar},setStyle(t){let e=this.getEngine();e&&e.setStyle(t)},getStyle:function(){return R(this,null,function*(){let t=this.getEngine();if(!t)return tt.Default;let{style:e}=yield t.getInfo();return e})}},vt=(t,e)=>{if(e===1)return 0;let n=1/(1-e),o=-(e*n);return t*n+o},ie=()=>{!w||w.innerWidth>=768||xt.setStyle({style:tt.Dark})},St=(t=tt.Default)=>{!w||w.innerWidth>=768||xt.setStyle({style:t})},re=t=>{let e=ot(t)?P(t).querySelector(".inner-scroll"):t;return!!!zt(t)&&e.scrollTop===0},se=(t,e)=>R(null,null,function*(){typeof t.canDismiss!="function"||!(yield t.canDismiss(void 0,Q))||(e.isRunning()?e.onFinish(()=>{t.dismiss(void 0,"handler")},{oneTimeCallback:!0}):t.dismiss(void 0,"handler"))}),wt=t=>.00255275*2.71828**(-14.9619*t)-1.00255*2.71828**(-.0380968*t)+1,W={MIN_PRESENTING_SCALE:.915},me=(t,e,n,o,i,r,s)=>{let d=t.offsetHeight,p=!1,y=!1,c=null,v=.2,b=!0,S=0,I=()=>c&&ot(c)?c.scrollY:!0,U=pt({el:t,gestureName:"modalSwipeToClose",gesturePriority:$t,direction:"y",threshold:10,canStart:m=>{let x=m.event.target;return x===null||!x.closest?!0:(c=it(x),c?re(c):x.closest("ion-footer")===null)},onStart:m=>{var x;let{deltaY:C}=m;(x=window.getSelection())===null||x===void 0||x.removeAllRanges(),b=I(),y=t.canDismiss!==void 0&&t.canDismiss!==!0,C>0&&c&&ft(c),e.progressStart(!0,p?1:0),i()},onMove:m=>{let{deltaY:x}=m;x>0&&c&&ft(c);let C=m.deltaY/d,N=C>=0&&y,M=N?v:.9999,L=N?wt(C/M):C,E=J(1e-4,L,M);e.progressStep(E),E>=.5&&S<.5?St(n):E<.5&&S>=.5&&ie(),S=E;let Z={currentY:m.currentY,deltaY:m.deltaY,velocityY:m.velocityY,progress:Qt(t,m.deltaY)};r(Z)},onEnd:m=>{let x=m.velocityY,C=m.deltaY/d,N=C>=0&&y,M=N?v:.9999,L=N?wt(C/M):C,E=J(1e-4,L,M),Z=(m.deltaY+x*1e3)/d,_=!N&&Z>=.5,X=_?-.001:.001;_?(e.easing("cubic-bezier(0.32, 0.72, 0, 1)"),X+=ut([0,0],[.32,.72],[0,1],[1,1],E)[0]):(e.easing("cubic-bezier(1, 0, 0.68, 0.28)"),X+=ut([0,0],[1,0],[.68,.28],[1,1],E)[0]);let q=Jt(_?C*d:(1-E)*d,x);p=_,U.enable(!1),c&&Vt(c,b),e.onFinish(()=>{_||U.enable(!0)}).progressEnd(_?1:0,X,q),N&&E>M/4?se(t,e):_&&o();let F={currentY:m.currentY,deltaY:m.deltaY,velocityY:m.velocityY,progress:Qt(t,m.deltaY)};s(F)}});return U},Jt=(t,e)=>J(400,t/Math.abs(e*1.1),500),Qt=(t,e)=>{let n=window.innerHeight,o=t.getBoundingClientRect().top,i=n-o,s=1-e/i,a=Math.round(s*1e3)/1e3;return Math.max(0,Math.min(1,a))},ae=t=>{let{currentBreakpoint:e,backdropBreakpoint:n,expandToScroll:o}=t,i=n===void 0||n<e,r=i?`calc(var(--backdrop-opacity) * ${e})`:"0",s=f("backdropAnimation").fromTo("opacity",0,r);i&&s.beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]);let a=f("wrapperAnimation").keyframes([{offset:0,opacity:1,transform:"translateY(100%)"},{offset:1,opacity:1,transform:`translateY(${100-e*100}%)`}]),d=o?void 0:f("contentAnimation").keyframes([{offset:0,opacity:1,maxHeight:`${(1-e)*100}%`},{offset:1,opacity:1,maxHeight:`${e*100}%`}]);return{wrapperAnimation:a,backdropAnimation:s,contentAnimation:d}},de=t=>{let{currentBreakpoint:e,backdropBreakpoint:n}=t,o=`calc(var(--backdrop-opacity) * ${vt(e,n)})`,i=[{offset:0,opacity:o},{offset:1,opacity:0}
1],r=[{offset:0,opacity:o},{offset:n,opacity:0},{offset:1,opacity:0}],s=f("backdropAnimation").keyframes(n!==0?r:i);return{wrapperAnimation:f("wrapperAnimation").keyframes([{offset:0,opacity:1,transform:`translateY(${100-e*100}%)`},{offset:1,opacity:1,transform:"translateY(100%)"}]),backdropAnimation:s}},ue=()=>{let t=f().fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),e=f().fromTo("transform","translateY(100vh)","translateY(0vh)");return{backdropAnimation:t,wrapperAnimation:e,contentAnimation:void 0}},te=(t,e)=>{let{presentingEl:n,currentBreakpoint:o,expandToScroll:i}=e,r=P(t),{wrapperAnimation:s,backdropAnimation:a,contentAnimation:d}=o!==void 0?ae(e):ue();a.addElement(r.querySelector("ion-backdrop")),s.addElement(r.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({opacity:1}),!i&&d?.addElement(t.querySelector(".ion-page"));let p=f("entering-base").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(500).addAnimation([s]);if(d&&p.addAnimation(d),n){let y=window.innerWidth<768,c=n.tagName==="ION-MODAL"&&n.presentingElement!==void 0,v=P(n),b=f().beforeStyles({transform:"translateY(0)","transform-origin":"top center",overflow:"hidden"}),S=document.body;if(y){let I=CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px",A=c?"-10px":I,O=W.MIN_PRESENTING_SCALE,k=`translateY(${A}) scale(${O})`;b.afterStyles({transform:k}).beforeAddWrite(()=>S.style.setProperty("background-color","black")).addElement(n).keyframes([{offset:0,filter:"contrast(1)",transform:"translateY(0px) scale(1)",borderRadius:"0px"},{offset:1,filter:"contrast(0.85)",transform:k,borderRadius:"10px 10px 0 0"}]),p.addAnimation(b)}else if(p.addAnimation(a),!c)s.fromTo("opacity","0","1");else{let A=`translateY(-10px) scale(${c?W.MIN_PRESENTING_SCALE:1})`;b.afterStyles({transform:A}).addElement(v.querySelector(".modal-wrapper")).keyframes([{offset:0,filter:"contrast(1)",transform:"translateY(0) scale(1)"},{offset:1,filter:"contrast(0.85)",transform:A}]);let O=f().afterStyles({transform:A}).addElement(v.querySelector(".modal-shadow")).keyframes([{offset:0,opacity:"1",transform:"translateY(0) scale(1)"},{offset:1,opacity:"0",transform:A}]);p.addAnimation([b,O])}}else p.addAnimation(a);return p},ge=()=>{let t=f().fromTo("opacity","var(--backdrop-opacity)",0),e=f().fromTo("transform","translateY(0vh)","translateY(100vh)");return{backdropAnimation:t,wrapperAnimation:e}},ee=(t,e,n=500)=>{let{presentingEl:o,currentBreakpoint:i}=e,r=P(t),{wrapperAnimation:s,backdropAnimation:a}=i!==void 0?de(e):ge();a.addElement(r.querySelector("ion-backdrop")),s.addElement(r.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({opacity:1});let d=f("leaving-base").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(n).addAnimation(s);if(o){let p=window.innerWidth<768,y=o.tagName==="ION-MODAL"&&o.presentingElement!==void 0,c=P(o),v=f().beforeClearStyles(["transform"]).afterClearStyles(["transform"]).onFinish(S=>{if(S!==1)return;o.style.setProperty("overflow",""),Array.from(b.querySelectorAll("ion-modal:not(.overlay-hidden)")).filter(A=>A.presentingElement!==void 0).length<=1&&b.style.setProperty("background-color","")}),b=document.body;if(p){let S=CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px",I=y?"-10px":S,A=W.MIN_PRESENTING_SCALE,O=`translateY(${I}) scale(${A})`;v.addElement(o).keyframes([{offset:0,filter:"contrast(0.85)",transform:O,borderRadius:"10px 10px 0 0"},{offset:1,filter:"contrast(1)",transform:"translateY(0px) scale(1)",borderRadius:"0px"}]),d.addAnimation(v)}else if(d.addAnimation(a),!y)s.fromTo("opacity","1","0");else{let I=`translateY(-10px) scale(${y?W.MIN_PRESENTING_SCALE:1})`;v.addElement(c.querySelector(".modal-wrapper")).afterStyles({transform:"translate3d(0, 0, 0)"}).keyframes([{offset:0,filter:"contrast(0.85)",transform:I},{offset:1,filter:"contrast(1)",transform:"translateY(0) scale(1)"}]);let A=f().addElement(c.querySelector(".modal-shadow")).afterStyles({transform:"translateY(0) scale(1)"}).keyframes([{offset:0,opacity:"0",transform:I},{offset:1,opacity:"1",transform:"translateY(0) scale(1)"}]);d.addAnimation([v,A])}}else d.addAnimation(a);return d},ye=(t,e,n=300)=>{let{presentingEl:o}=e;if(!o)return f("portrait-to-landscape-transition");let i=o.tagName==="ION-MODAL"&&o.presentingElement!==void 0,r=P(o),s=document.body,a=f("portrait-to-landscape-transition").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(n),d=f().beforeStyles({transform:"translateY(0)","transform-origin":"top center",overflow:"hidden"});if(i){let y=`translateY(-10px) scale(${W.MIN_PRESENTING_SCALE})`,c="translateY(0px) scale(1)";d.addElement(o).afterStyles({transform:c}).fromTo("transform",y,c).fromTo("filter","contrast(0.85)","contrast(1)");let v=f().addElement(r.querySelector(".modal-shadow")).afterStyles({transform:c,opacity:"0"}).fromTo("transform",y,c);a.addAnimation([d,v])}else{let p=P(t),y=f().addElement(p.querySelectorAll(".modal-wrapper, .modal-shadow")).fromTo("opacity","1","1"),c=f().addElement(p.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)","var(--backdrop-opacity)"),v=CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px",b=W.MIN_PRESENTING_SCALE,S=`translateY(${v}) scale(${b})`;d.addElement(o).afterStyles({transform:"translateY(0px) scale(1)","border-radius":"0px"}).beforeAddWrite(()=>s.style.setProperty("background-color","")).fromTo("transform",S,"translateY(0px) scale(1)").fromTo("filter","contrast(0.85)","contrast(1)").fromTo("border-radius","10px 10px 0 0","0px"),a.addAnimation([d,y,c])}return a},be=(t,e,n=300)=>{let{presentingEl:o}=e;if(!o)return f("landscape-to-portrait-transition");let i=o.tagName==="ION-MODAL"&&o.presentingElement!==void 0,r=P(o),s=document.body,a=f("landscape-to-portrait-transition").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(n),d=f().beforeStyles({transform:"translateY(0)","transform-origin":"top center",overflow:"hidden"});if(i){let y=`translateY(-10px) scale(${W.MIN_PRESENTING_SCALE})`,c="translateY(0) scale(1)";d.addElement(o).afterStyles({transform:c}).fromTo("transform",y,c);let v=f().addElement(r.querySelector(".modal-shadow")).afterStyles({transform:c,opacity:"0"}).fromTo("transform",y,c);a.addAnimation([d,v])}else{let p=P(t),y=f().addElement(p.querySelectorAll(".modal-wrapper, .modal-shadow")).fromTo("opacity","1","1"),c=f().addElement(p.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)","var(--backdrop-opacity)"),v=CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px",b=W.MIN_PRESENTING_SCALE,S=`translateY(${v}) scale(${b})`;d.addElement(o).afterStyles({transform:S}).beforeAddWrite(()=>s.style.setProperty("background-color","black")).keyframes([{offset:0,transform:"translateY(0px) scale(1)",filter:"contrast(1)",borderRadius:"0px"},{offset:.2,transform:"translateY(0px) scale(1)",filter:"contrast(1)",borderRadius:"10px 10px 0 0"},{offset:1,transform:S,filter:"contrast(0.85)",borderRadius:"10px 10px 0 0"}]),a.addAnimation([d,y,c])}return a},ve=()=>{let t=f().fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),e=f().keyframes([{offset:0,opacity:.01,transform:"translateY(40px)"},{offset:1,opacity:1,transform:"translateY(0px)"}]);return{backdropAnimation:t,wrapperAnimation:e,contentAnimation:void 0}},Se=(t,e)=>{let{currentBreakpoint:n,expandToScroll:o}=e,i=P(t),{wrapperAnimation:r,backdropAnimation:s,contentAnimation:a}=n!==void 0?ae(e):ve();s.addElement(i.querySelector("ion-backdrop")),r.addElement(i.querySelector(".modal-wrapper")),!o&&a?.addElement(t.querySelector(".ion-page"));let d=f().addElement(t).easing("cubic-bezier(0.36,0.66,0.04,1)").duration(280).addAnimation([s,r]);return a&&d.addAnimation(a),d},we=()=>{let t=f().fromTo("opacity","var(--backdrop-opacity)",0),e=f().keyframes([{offset:0,opacity:.99,transform:"translateY(0px)"},{offset:1,opacity:0,transform:"translateY(40px)"}]);return{backdropAnimation:t,wrapperAnimation:e}},xe=(t,e)=>{let{currentBreakpoint:n}=e,o=P(t),{wrapperAnimation:i,backdropAnimation:r}=n!==void 0?de(e):we();return r.addElement(o.querySelector("ion-backdrop")),i.addElement(o.querySelector(".modal-wrapper")),f().easing("cubic-bezier(0.47,0,0.745,0.715)").duration(200).addAnimation([r,i])},ke=(t,e,n,o,i,r,s=[],a,d,p,y,c,v,b)=>{var S;let I=[{offset:0,opacity:"var(--backdrop-opacity)"},{offset:1,opacity:.01}],A=[{offset:0,opacity:"var(--backdrop-opacity)"},{offset:1-i,opacity:0}
1,{offset:1,opacity:0}],O={WRAPPER_KEYFRAMES:[{offset:0,transform:"translateY(0%)"},{offset:1,transform:"translateY(100%)"}],BACKDROP_KEYFRAMES:i!==0?A:I,CONTENT_KEYFRAMES:[{offset:0,maxHeight:"100%"},{offset:1,maxHeight:"0%"}]},k=t.querySelector("ion-content"),dt=(S=k?.scrollY)!==null&&S!==void 0?S:!0,U=n.clientHeight,m=o,x=0,C=!1,N=null,M=null,L=null,E=null,Z=.95,_=s[s.length-1],X=s[0],q=r.childAnimations.find(l=>l.id==="wrapperAnimation"),F=r.childAnimations.find(l=>l.id==="backdropAnimation"),z=r.childAnimations.find(l=>l.id==="contentAnimation"),kt=()=>{let l=t;l.focusTrap===!1||l.showBackdrop===!1||(t.style.setProperty("pointer-events","auto"),e.style.setProperty("pointer-events","auto"),t.classList.remove(nt))},At=()=>{t.style.setProperty("pointer-events","none"),e.style.setProperty("pointer-events","none"),t.classList.add(nt)},j=l=>{if(!M&&(M=Array.from(t.querySelectorAll("ion-footer")),!M.length))return;let g=t.querySelector(".ion-page");if(E=l,l==="stationary")M.forEach(h=>{h.classList.remove("modal-footer-moving"),h.style.removeProperty("position"),h.style.removeProperty("width"),h.style.removeProperty("height"),h.style.removeProperty("top"),h.style.removeProperty("left"),g?.style.removeProperty("padding-bottom"),g?.appendChild(h)});else{let h=0;M.forEach((u,B)=>{let Y=u.getBoundingClientRect(),T=document.body.getBoundingClientRect();h+=u.clientHeight;let H=Y.top-T.top,$=Y.left-T.left;if(u.style.setProperty("--pinned-width",`${u.clientWidth}px`),u.style.setProperty("--pinned-height",`${u.clientHeight}px`),u.style.setProperty("--pinned-top",`${H}px`),u.style.setProperty("--pinned-left",`${$}px`),B===0){L=H;let ct=t.querySelector("ion-header");ct&&(L-=ct.clientHeight)}}),M.forEach(u=>{g?.style.setProperty("padding-bottom",`${h}px`),u.classList.add("modal-footer-moving"),u.style.setProperty("position","absolute"),u.style.setProperty("width","var(--pinned-width)"),u.style.setProperty("height","var(--pinned-height)"),u.style.setProperty("top","var(--pinned-top)"),u.style.setProperty("left","var(--pinned-left)"),document.body.appendChild(u)})}};q&&F&&(q.keyframes([...O.WRAPPER_KEYFRAMES]),F.keyframes([...O.BACKDROP_KEYFRAMES]),z?.keyframes([...O.CONTENT_KEYFRAMES]),r.progressStart(!0,1-m),m>i&&t.focusTrap!==!1&&t.showBackdrop!==!1?kt():At()),k&&m!==_&&a&&(k.scrollY=!1);let ce=l=>{let g=it(l.event.target);return m=d(),g&&(!a||m===1)?re(g):!0},pe=l=>{var g;if((g=window.getSelection())===null||g===void 0||g.removeAllRanges(),C=t.canDismiss!==void 0&&t.canDismiss!==!0&&X===0,!a){let h=it(l.event.target);N=h&&ot(h)?P(h).querySelector(".inner-scroll"):h}a||j("moving"),l.deltaY>0&&k&&(k.scrollY=!1),G(()=>{t.focus()}),r.progressStart(!0,1-m),c()},he=l=>{if(!a&&L!==null&&E!==null&&(l.currentY>=L&&E==="moving"?j("stationary"):l.currentY<L&&E==="stationary"&&j("moving")),!a&&l.deltaY<=0&&N)return;l.deltaY>0&&k&&(k.scrollY=!1);let g=1-m,h=s.length>1?1-s[1]:void 0,u=g+l.deltaY/U,B=h!==void 0&&u>=h&&C,Y=B?Z:.9999,T=B&&h!==void 0?h+wt((u-h)/(Y-h)):u;x=J(1e-4,T,Y),r.progressStep(x);let H=Et(l.deltaY),$={currentY:l.currentY,deltaY:l.deltaY,velocityY:l.velocityY,progress:lt(l.currentY),snapBreakpoint:H};v($)},fe=l=>{let g=Et(l.deltaY),h={currentY:l.currentY,deltaY:l.deltaY,velocityY:l.velocityY,progress:lt(l.currentY),snapBreakpoint:g};if(!a&&l.deltaY<=0&&N&&N.scrollTop>0){j("stationary"),b(h);return}Ct({breakpoint:g,breakpointOffset:x,canDismiss:C,animated:!0}),b(h)},Ct=l=>{let{breakpoint:g,canDismiss:h,breakpointOffset:u,animated:B}=l,Y=h&&g===0,T=Y?m:g,H=T!==0;return m=0,q&&F&&(q.keyframes([{offset:0,transform:`translateY(${u*100}%)`},{offset:1,transform:`translateY(${(1-T)*100}%)`}]),F.keyframes([{offset:0,opacity:`calc(var(--backdrop-opacity) * ${vt(1-u,i)})`},{offset:1,opacity:`calc(var(--backdrop-opacity) * ${vt(T,i)})`}]),z&&z.keyframes([{offset:0,maxHeight:`${(1-u)*100}%`},{offset:1,maxHeight:`${T*100}%`}]),r.progressStep(0)),et.enable(!1),Y?se(t,r):H||p(),k&&(T===s[s.length-1]||!a)&&(k.scrollY=dt),!a&&T===0&&j("stationary"),new Promise($=>{r.onFinish(()=>{H?(a||j("stationary"),q&&F?G(()=>{q.keyframes([...O.WRAPPER_KEYFRAMES]),F.keyframes([...O.BACKDROP_KEYFRAMES]),z?.keyframes([...O.CONTENT_KEYFRAMES]),r.progressStart(!0,1-T),m=T,y(m),m>
1i&&t.focusTrap!==!1&&t.showBackdrop!==!1?kt():At(),et.enable(!0),$()}):(et.enable(!0),$())):$()},{oneTimeCallback:!0}).progressEnd(1,0,B?500:0)})},Et=l=>{let g=n.getBoundingClientRect().top+l,h=lt(g);return s.reduce((B,Y)=>Math.abs(Y-h)<Math.abs(B-h)?Y:B)},lt=l=>{let g=s[0],h=s[s.length-1],u=Tt(g),B=Tt(h),Y=u-B,H=(u-l)/Y,$=Math.round(H*1e3)/1e3;return Math.max(0,Math.min(1,$))},Tt=l=>{let h=t.getBoundingClientRect().height,u=window.innerHeight,B=h*l;return u-B},et=pt({el:n,gestureName:"modalSheet",gesturePriority:40,direction:"y",threshold:10,canStart:ce,onStart:pe,onMove:he,onEnd:fe});return{gesture:et,moveSheetToBreakpoint:Ct,resetContentScroll:()=>{k&&(k.scrollY=dt)}}},Ae=768,Ce=600,st=5,ne=new Set(["","100%","100vw","100vh","100dvw","100dvh","100svw","100svh"]),at=null,bt=!1,Ee=()=>w?w.matchMedia(`(min-width: ${Ae}px) and (min-height: ${Ce}px)`).matches:!1,le=()=>{if(at!==null)return at;let t=w===null||w===void 0?void 0:w.document;if(!t?.body)return 0;let e=t.createElement("div");e.style.cssText="position:fixed;visibility:hidden;pointer-events:none;top:0;left:0;padding-top:var(--ion-safe-area-top,0px);",t.body.appendChild(e);let n=parseFloat(getComputedStyle(e).paddingTop)||0;return e.remove(),at=n,bt||(bt=!0,G(()=>{at=null,bt=!1})),n},Te=t=>{let e=w===null||w===void 0?void 0:w.document;if(!e?.body||typeof ResizeObserver>"u")return()=>{};let n=e.createElement("div");n.style.cssText="position:fixed;visibility:hidden;pointer-events:none;top:0;left:0;width:0;height:var(--ion-safe-area-top,0px);",e.body.appendChild(n);let o=le(),i=new ResizeObserver(r=>{let{height:s}=r[0].contentRect;s!==o&&(o=s,t(s))});return i.observe(n),()=>{i.disconnect(),n.remove()}},Pe=t=>{let e=getComputedStyle(t),n=e.getPropertyValue("--width").trim(),o=e.getPropertyValue("--height").trim();return!ne.has(n)&&!ne.has(o)},De=t=>{let{isSheetModal:e,isCardModal:n}=t;return e?{top:"0px",bottom:"inherit",left:"0px",right:"0px"}:n?{top:"inherit",bottom:"inherit",left:"0px",right:"0px"}:Ee()||t.hasCustomDimensions?{top:"0px",bottom:"0px",left:"0px",right:"0px"}:{top:"inherit",bottom:"inherit",left:"inherit",right:"inherit"}},Oe=t=>{var e,n;let o=t.getBoundingClientRect(),i=(e=w===null||w===void 0?void 0:w.innerHeight)!==null&&e!==void 0?e:0,r=(n=w===null||w===void 0?void 0:w.innerWidth)!==null&&n!==void 0?n:0;return{top:o.top<=st?"inherit":"0px",bottom:o.bottom>=i-st?"inherit":"0px",left:o.left<=st?"inherit":"0px",right:o.right>=r-st?"inherit":"0px"}},oe=(t,e)=>{t.style.setProperty("--ion-safe-area-top",e.top),t.style.setProperty("--ion-safe-area-bottom",e.bottom),t.style.setProperty("--ion-safe-area-left",e.left),t.style.setProperty("--ion-safe-area-right",e.right)},Me=t=>{t.style.removeProperty("--ion-safe-area-top"),t.style.removeProperty("--ion-safe-area-bottom"),t.style.removeProperty("--ion-safe-area-left"),t.style.removeProperty("--ion-safe-area-right")},Be=()=>':host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);
1-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-wrapper{outline:none}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}:host(.modal-sheet){--height:calc(100% - (var(--ion-modal-offset-top, 0px) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.4)}:host(.modal-card),:host(.modal-sheet){--border-radius:10px}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:10px}}.modal-wrapper{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}@media screen and (max-width: 767px){@supports (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - max(30px, var(--ion-safe-area-top)) - 10px)}}@supports not (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - 40px)}}:host(.modal-card) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}:host(.modal-card){--backdrop-opacity:0;--width:100%;-ms-flex-align:end;align-items:flex-end}:host(.modal-card) .modal-shadow{display:none}:host(.modal-card) ion-backdrop{pointer-events:none}}@media screen and (min-width: 768px){:host(.modal-card){--width:calc(100% - 120px);--height:calc(100% - (120px + var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));--max-width:720px;--max-height:1000px;--backdrop-opacity:0;--box-shadow:0px 0px 30px 10px rgba(0, 0, 0, 0.1);-webkit-transition:all 0.5s ease-in-out;transition:all 0.5s ease-in-out}:host(.modal-card) .modal-wrapper{-webkit-box-shadow:none;box-shadow:none}:host(.modal-card) .modal-shadow{-webkit-box-shadow:var(--box-sha
1dow);box-shadow:var(--box-shadow)}}:host(.modal-sheet) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}',Ye=()=>':host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);
1-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-wrapper{outline:none}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}:host(.modal-sheet){--height:calc(100% - (var(--ion-modal-offset-top, 0px) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.32)}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:2px;--box-shadow:0 28px 48px rgba(0, 0, 0, 0.4)}}.modal-wrapper{-webkit-transform:translate3d(0, 40px, 0);transform:translate3d(0, 40px, 0);opacity:0.01}',Re=class{constructor(t){Ut(this,t),this.didPresent=D(this,"ionModalDidPresent",7),this.willPresent=D(this,"ionModalWillPresent",7),this.willDismiss=D(this,"ionModalWillDismiss",7),this.didDismiss=D(this,"ionModalDidDismiss",7),this.ionBreakpointDidChange=D(this,"ionBreakpointDidChange",7),this.didPresentShorthand=D(this,"didPresent",7),this.willPresentShorthand=D(this,"willPresent",7),this.willDismissShorthand=D(this,"willDismiss",7),this.didDismissShorthand=D(this,"didDismiss",7),this.ionMount=D(this,"ionMount",7),this.ionDragStart=D(this,"ionDragStart",7),this.ionDragMove=D(this,"ionDragMove",7),this.ionDragEnd=D(this,"ionDragEnd",7),this.lockController=Mt(),this.triggerController=Wt(),this.coreDelegate=Rt(),this.isSheetModal=!1,this.inheritedAttributes={},this.inline=!1,this.gestureAnimationDismissing=!1,this.presented=!1,this.hasController=!1,this.keyboardClose=!0,this.expandToScroll=!0,this.backdropBreakpoint=0,this.handleBehavior="none",this.backdropDismiss=!0,this.showBackdrop=!0,this.animated=!0,this.isOpen=!1,this.keepContentsMounted=!1,this.focusTrap=!0,this.canDismiss=!0,this.onHandleClick=()=>{let{sheetTransition:e,handleBehavior:n}=this;n!=="cycle"||e!==void 0||this.moveToNextBreakpoint()},this.onBackdropTap=()=>{let{sheetTransition:e}=this;e===void 0&&this.dismiss(void 0,Ht)},this.onLifecycle=e=>{let n=this.usersElement,o=Ie[e.type];if(n&&o){let i=new CustomEvent(o,{bubbles:!1,cancelable:!1,detail:e.detail});n.dispatchEvent(i)}},this.onModalFocus=e=>{var n;let{dragHandleEl:o,el:i}=this;e.target===i&&((n=i.shadowRoot)===null||n===void 0?void 0:n.activeElement)==null&&o&&o.tabIndex!==-1&&o.focus()},this.onSlotChange=({target:e})=>{e.assignedElements().forEach(o=>{o.querySelectorAll("ion-modal").forEach(i=>{i.getAttribute("data-parent-ion-modal")===null&&i.setAttribute("data-parent-ion-modal",this.el.id)})})}}onIsOpenChange(t,e){t===!0&&e===!1?this.present():t===!1&&e===!0&&this.dismiss()}triggerChanged(){let{trigger:t,el:e,triggerController:n}=this;t&&n.addClickListener(e,t)}onWindowResize(){this.presented&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{let t=this.getSafeAreaContext();if(t.isCardModal&&!this.enterAnimation&&!this.leaveAnimation&&this.handleViewTransition(),t.isSheetModal&&this.updateSheetOffsetTop(),!t.isSheetModal&&!t.isCardModal){this.updateSafeAreaOverrides();let{contentEl:e,hasFooter:n}=this.findContentAndFooter();this.clearContentSafeAreaPadding(e),this.applyFullscreenSafeAreaTo(e,n)}},50))}breakpointsChanged(t){t!==void 0&&(this.sortedBreakpoints=t.sort((e,n)=>e-n))}connectedCallback(){let{el:t}=this;It(t),this.triggerChanged()}disconnectedCallback(){this.triggerController.removeClickListener(),this.cleanupViewTransitionListener(),this.cleanupParentRemovalObserver(),this.cleanupSafeAreaOverrides()}componentWillLoad(){var t;
1let{breakpoints:e,initialBreakpoint:n,el:o,htmlAttributes:i}=this,r=this.isSheetModal=e!==void 0&&n!==void 0,s=["aria-label","role"];this.inheritedAttributes=Ot(o,s),o.parentNode&&(this.cachedOriginalParent=o.parentNode),i!==void 0&&s.forEach(a=>{i[a]&&(this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[a]:i[a]}),delete i[a])}),r&&(this.currentBreakpoint=this.initialBreakpoint),e!==void 0&&n!==void 0&&!e.includes(n)&&rt("[ion-modal] - Your breakpoints array must include the initialBreakpoint value."),!((t=this.htmlAttributes)===null||t===void 0)&&t.id||Nt(this.el)}componentDidLoad(){this.isOpen===!0&&G(()=>this.present()),this.breakpointsChanged(this.breakpoints),this.triggerChanged()}getDelegate(t=!1){if(this.workingDelegate&&!t)return{delegate:this.workingDelegate,inline:this.inline};let e=this.el.parentNode,n=this.inline=e!==null&&!this.hasController,o=this.workingDelegate=n?this.delegate||this.coreDelegate:this.delegate;return{inline:n,delegate:o}}checkCanDismiss(t,e){return R(this,null,function*(){let{canDismiss:n}=this;return typeof n=="function"?n(t,e):n})}present(){return R(this,null,function*(){let t=yield this.lockController.lock();if(this.presented){t();return}let{presentingElement:e,el:n}=this;this.currentBreakpoint=this.initialBreakpoint;let{inline:o,delegate:i}=this.getDelegate(!0);this.ionMount.emit(),this.usersElement=yield Bt(i,n,this.component,["ion-page"],this.componentProps,o),Dt(n)?yield jt(this.usersElement):this.keepContentsMounted||(yield Kt()),yt(()=>this.el.classList.add("show-modal")),this.isSheetModal=this.breakpoints!==void 0&&this.initialBreakpoint!==void 0,this.setInitialSafeAreaOverrides();let r=e!==void 0;r&&V(this)==="ios"&&(this.statusBarStyle=yield xt.getStyle(),ie()),yield Lt(this,"modalEnter",te,Se,{presentingEl:e,currentBreakpoint:this.initialBreakpoint,backdropBreakpoint:this.backdropBreakpoint,expandToScroll:this.expandToScroll}),this.updateSafeAreaOverrides(),this.applyFullscreenSafeArea(),typeof window<"u"&&(this.keyboardOpenCallback=()=>{this.gesture&&(this.gesture.enable(!1),G(()=>{this.gesture&&this.gesture.enable(!0)}))},window.addEventListener(mt,this.keyboardOpenCallback)),this.isSheetModal?this.initSheetGesture():r&&this.initSwipeToClose(),this.initViewTransitionListener(),this.initParentRemovalObserver(),t()})}initSwipeToClose(){var t;if(V(this)!=="ios")return;let{el:e}=this,n=this.leaveAnimation||gt.get("modalLeave",ee),o=this.animation=n(e,{presentingEl:this.presentingElement,expandToScroll:this.expandToScroll});if(!Ft(e)){Gt(e);return}let r=(t=this.statusBarStyle)!==null&&t!==void 0?t:tt.Default;this.gesture=me(e,o,r,()=>this.cardOnDismiss(),()=>this.onDragStart(),s=>this.onDragMove(s),s=>this.onDragEnd(s)),this.gesture.enable(!0)}initSheetGesture(){let{wrapperEl:t,initialBreakpoint:e,backdropBreakpoint:n}=this;if(!t||e===void 0)return;let o=this.enterAnimation||gt.get("modalEnter",te),i=this.animation=o(this.el,{presentingEl:this.presentingElement,currentBreakpoint:e,backdropBreakpoint:n,expandToScroll:this.expandToScroll});i.progressStart(!0,1);let{gesture:r,moveSheetToBreakpoint:s,resetContentScroll:a}=ke(this.el,this.backdropEl,t,e,n,i,this.sortedBreakpoints,this.expandToScroll,()=>{var p;return(p=this.currentBreakpoint)!==null&&p!==void 0?p:0},()=>this.sheetOnDismiss(),p=>{this.currentBreakpoint!==p&&(this.currentBreakpoint=p,this.ionBreakpointDidChange.emit({breakpoint:p}))},()=>this.onDragStart(),p=>this.onDragMove(p),p=>this.onDragEnd(p));this.gesture=r,this.moveSheetToBreakpoint=s,this.resetSheetContentScroll=a,this.gesture.enable(!0),(this.showBackdrop===!1||this.focusTrap===!1||n>0)&&this.setupChildRoutePassthrough()}setupChildRoutePassthrough(){var t;this.cachedPageParent=this.getOriginalPageParent();let e=this.cachedPageParent;if(!e||e.tagName==="ION-APP"||Array.from(e.children).some(i=>{var r;return i!==this.el&&!(i instanceof HTMLElement&&window.getComputedStyle(i).display==="none")&&i.tagName!=="TEMPLATE"&&i.tagName!=="SLOT"&&!(i.nodeType===Node.TEXT_NODE&&!(!((r=i.textContent)===null||r===void 0)&&r.trim()))}))return;e.classList.add("ion-page-overlay-passthrough");let o=e.parentElement;o?.tagName==="ION-ROUTER-OUTLET"&&((t=o.parentElement)===null||t===void 0?void 0:t.tagName)!=="ION-APP"&&(o.style.setProperty("pointer-events","none"),o.setAttribute("data-overlay-passthrough","true"))}getOriginalPageParent(){if(!this.cachedOriginalParent)return null;let t=this.cachedOriginalParent;for(;t&&!t.classList.contains("ion-page");)t=t.parentElement;return t}cleanupChildRoutePassthrough(){let t=this.cachedPageParent;if(!t)return;t.classList.remove("ion-page-overlay-passthrough");let e=t.parentElement;e?.hasAttribute("data-overlay-passthrough")&&(e.style.removeProperty("pointer-events"),e.removeAttribute("data-overlay-passthrough")),this.cachedPageParent=void 0}sheetOnDismiss(){this.gestureAnimationDismissing=!0,this.animation.onFinish(()=>R(this,null,function*(){this.currentBreakpoint=0,this.ionBreakpointDidChange.emit({breakpoint:this.currentBreakpoint}),yield this.dismiss(void 0,Q),this.gestureAnimationDismissing=!1}))}cardOnDismiss(){this.gestureAnimationDismissing=!0,St(this.statusBarStyle),this.animation.onFinish(()=>R(this,null,function*(){yield this.dismiss(void 0,Q),this.gestureAnimationDismissing=!1}))}dismiss(t,e){return R(this,null,function*(){var n,o;if(this.gestureAnimationDismissing&&e!==Q)return!1;clearTimeout(this.resizeTimeout),this.resizeTimeout=void 0;let i=yield this.lockController.lock();if(yield this.dismissNestedModals(),e!=="handler"&&!(yield this.checkCanDismiss(t,e)))return i(),!1;let{presentingElement:r}=this;r!==void 0&&V(this)==="ios"&&St(this.statusBarStyle),typeof window<"u"&&this.keyboardOpenCallback&&(window.removeEventListener(mt,this.keyboardOpenCallback),this.keyboardOpenCallback=void 0);let a=yield _t(this,t,e,"modalLeave",ee,xe,{presentingEl:r,currentBreakpoint:(n=this.currentBreakpoint)!==null&&n!==void 0?n:this.initialBreakp
1oint,backdropBreakpoint:this.backdropBreakpoint,expandToScroll:this.expandToScroll});if(a){let{delegate:d}=this.getDelegate();yield Yt(d,this.usersElement),yt(()=>this.el.classList.remove("show-modal")),this.animation&&this.animation.destroy(),this.gesture&&this.gesture.destroy(),(o=this.resetSheetContentScroll)===null||o===void 0||o.call(this),this.resetSheetContentScroll=void 0,this.cleanupViewTransitionListener(),this.cleanupParentRemovalObserver(),this.cleanupSafeAreaOverrides(),this.cleanupChildRoutePassthrough()}return this.currentBreakpoint=void 0,this.animation=void 0,i(),a})}onDidDismiss(){return ht(this.el,"ionModalDidDismiss")}onWillDismiss(){return ht(this.el,"ionModalWillDismiss")}setCurrentBreakpoint(t){return R(this,null,function*(){if(!this.isSheetModal){rt("[ion-modal] - setCurrentBreakpoint is only supported on sheet modals.");return}if(!this.breakpoints.includes(t)){rt(`[ion-modal] - Attempted to set invalid breakpoint value ${t}. Please double check that the breakpoint value is part of your defined breakpoints.`);return}let{currentBreakpoint:e,moveSheetToBreakpoint:n,canDismiss:o,breakpoints:i,animated:r}=this;e!==t&&n&&(this.sheetTransition=n({breakpoint:t,breakpointOffset:1-e,canDismiss:o!==void 0&&o!==!0&&i[0]===0,animated:r}),yield this.sheetTransition,this.sheetTransition=void 0)})}getCurrentBreakpoint(){return R(this,null,function*(){return this.currentBreakpoint})}moveToNextBreakpoint(){return R(this,null,function*(){let{breakpoints:t,currentBreakpoint:e}=this;if(!t||e==null)return!1;let n=t.filter(s=>s!==0),i=(n.indexOf(e)+1)%n.length,r=n[i];return yield this.setCurrentBreakpoint(r),!0})}initViewTransitionListener(){V(this)!=="ios"||!this.presentingElement||this.enterAnimation||this.leaveAnimation||(this.currentViewIsPortrait=window.innerWidth<768)}handleViewTransition(){if(!this.presented)return;let t=window.innerWidth<768;if(this.currentViewIsPortrait===t)return;this.viewTransitionAnimation&&(this.viewTransitionAnimation.destroy(),this.viewTransitionAnimation=void 0);let{presentingElement:e}=this;if(!e)return;let n;this.currentViewIsPortrait&&!t?n=ye(this.el,{presentingEl:e}):n=be(this.el,{presentingEl:e}),this.currentViewIsPortrait=t,this.viewTransitionAnimation=n,n.play().then(()=>{this.viewTransitionAnimation=void 0,G(()=>this.updateSafeAreaOverrides()),this.reinitSwipeToClose()})}cleanupViewTransitionListener(){this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=void 0),this.viewTransitionAnimation&&(this.viewTransitionAnimation.destroy(),this.viewTransitionAnimation=void 0)}reinitSwipeToClose(){V(this)!=="ios"||!this.presentingElement||(this.gesture&&(this.gesture.destroy(),this.gesture=void 0),this.animation&&(this.animation.progressEnd(0,0,0),this.animation.destroy(),this.animation=void 0),G(()=>{this.ensureCorrectModalPosition(),this.initSwipeToClose()}))}ensureCorrectModalPosition(){let{el:t,presentingElement:e}=this,o=P(t).querySelector(".modal-wrapper");if(o&&(o.style.transform="translateY(0vh)",o.style.opacity="1"),e?.tagName==="ION-MODAL")if(window.innerWidth<768){let r=CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px",s=W.MIN_PRESENTING_SCALE;e.style.transform=`translateY(${r}) scale(${s})`}else e.style.transform="translateY(0px) scale(1)"}dismissNestedModals(){return R(this,null,function*(){let t=document.querySelectorAll(`ion-modal[data-parent-ion-modal="${this.el.id}"]`);t?.forEach(e=>R(this,null,function*(){yield e.dismiss(void 0,"parent-dismissed")}))})}initParentRemovalObserver(){typeof MutationObserver>"u"||typeof window>"u"||!this.cachedOriginalParent||this.cachedOriginalParent.nodeType===Node.DOCUMENT_NODE||this.cachedOriginalParent.nodeType===Node.DOCUMENT_FRAGMENT_NODE||this.hasController||this.cachedOriginalParent===document.body||this.cachedOriginalParent.tagName==="ION-APP"||(this.parentRemovalObserver=new MutationObserver(t=>{t.forEach(e=>{if(e.type==="childList"&&e.removedNodes.length>0){let n=Array.from(e.removedNodes).some(i=>{var r,s;let a=i===this.cachedOriginalParent,d=this.cachedOriginalParent?(s=(r=i).contains)===null||s===void 0?void 0:s.call(r,this.cachedOriginalParent):!1;return a||d}),o=this.cachedOriginalParent&&!this.cachedOriginalParent.isConnected;(n||o)&&(this.dismiss(void 0,"parent-removed"),this.cachedOriginalParent=void 0)}})}),this.parentRemovalObserver.observe(document.body,{childList:!0,subtree:!0}))}cleanupParentRemovalObserver(){var t;(t=this.parentRemovalObserver)===null||t===void 0||t.disconnect(),this.parentRemovalObserver=void 0}onDragStart(){this.ionDragStart.emit()}onDragMove(t){this.ionDragMove.emit(t)}onDragEnd(t){this.ionDragEnd.emit(t)}getSafeAreaContext(){return{isSheetModal:this.isSheetModal,isCardModal:this.presentingElement!==void 0&&V(this)==="ios",presentingElement:this.presentingElement,breakpoints:this.breakpoints,currentBreakpoint:this.currentBreakpoint}}setInitialSafeAreaOverrides(){let t=Object.assign(Object.assign({}
1,this.getSafeAreaContext()),{hasCustomDimensions:Pe(this.el)}),e=De(t);oe(this.el,e),t.isSheetModal&&(this.updateSheetOffsetTop(),this.unsubscribeRootSafeAreaTop=Te(n=>this.updateSheetOffsetTop(n)))}updateSheetOffsetTop(t){let e=t??le();this.el.style.setProperty("--ion-modal-offset-top",`${e}px`)}updateSafeAreaOverrides(){let{wrapperEl:t,el:e}=this,n=this.getSafeAreaContext();if(n.isSheetModal||n.isCardModal||!t)return;let o=Oe(t);oe(e,o)}applyFullscreenSafeArea(){let t=this.getSafeAreaContext();if(t.isSheetModal||t.isCardModal)return;let{contentEl:e,hasFooter:n}=this.findContentAndFooter();this.applyFullscreenSafeAreaTo(e,n)}applyFullscreenSafeAreaTo(t,e){!t||e||t.style.setProperty("--internal-content-safe-area-padding-bottom","var(--ion-safe-area-bottom, 0px)")}clearContentSafeAreaPadding(t){t&&t.style.removeProperty("--internal-content-safe-area-padding-bottom")}findContentAndFooter(){let t=null,e=!1;for(let n of Array.from(this.el.children)){n.tagName==="ION-CONTENT"&&(t=n),n.tagName==="ION-FOOTER"&&(e=!0);for(let o of Array.from(n.children))o.tagName==="ION-CONTENT"&&!t&&(t=o),o.tagName==="ION-FOOTER"&&(e=!0)}return{contentEl:t,hasFooter:e}}cleanupSafeAreaOverrides(){var t;Me(this.el),(t=this.unsubscribeRootSafeAreaTop)===null||t===void 0||t.call(this),this.unsubscribeRootSafeAreaTop=void 0,this.el.style.removeProperty("--ion-modal-offset-top");let{contentEl:e}=this.findContentAndFooter();this.clearContentSafeAreaPadding(e)}render(){let{handle:t,isSheetModal:e,presentingElement:n,htmlAttributes:o,handleBehavior:i,inheritedAttributes:r,focusTrap:s,expandToScroll:a}=this,d=t!==!1&&e,p=V(this),y=n!==void 0&&p==="ios",c=i==="cycle";return K(Zt,Object.assign({key:"c4b2713ebc788ac8672e18fdd5069e4253c4da34","no-router":!0,tabIndex:c&&(e&&d)?0:-1},o,{style:{zIndex:`${2e4+this.overlayIndex}`},class:Object.assign({[p]:!0,"modal-default":!y&&!e,"modal-card":y,"modal-sheet":e,"modal-no-expand-scroll":e&&!a,"overlay-hidden":!0,[nt]:s===!1},qt(this.cssClass)),onIonBackdropTap:this.onBackdropTap,onIonModalDidPresent:this.onLifecycle,onIonModalWillPresent:this.onLifecycle,onIonModalWillDismiss:this.onLifecycle,onIonModalDidDismiss:this.onLifecycle,onFocus:this.onModalFocus}),K("ion-backdrop",{key:"2cc0afff8a815954492138afb0fca042243afddd",ref:b=>this.backdropEl=b,visible:this.showBackdrop,tappable:this.backdropDismiss,part:"backdrop"}),p==="ios"&&K("div",{key:"9844700b9436f9bfa1a69ba436e9ca46d70cf316",class:"modal-shadow"}),K("div",Object.assign({key:"ab1cd56ca956c773c9242fb42ff320bac7627b4b",role:"dialog"},r,{"aria-modal":"true",tabIndex:-1,class:"modal-wrapper ion-overlay-wrapper",part:"content",ref:b=>this.wrapperEl=b}),d&&K("button",{key:"c7706794e04a962178640e9a9a11c56288c45e08",class:"modal-handle",tabIndex:c?0:-1,"aria-label":"Activate to adjust the size of the dialog overlaying the screen",onClick:c?this.onHandleClick:void 0,part:"handle",ref:b=>this.dragHandleEl=b}),K("slot",{key:"c44fd9810cdd3286f096af98e5a4072f8f44c193",onSlotchange:this.onSlotChange}
1)))}get el(){return Xt(this)}static get watchers(){return{isOpen:[{onIsOpenChange:0}],trigger:[{triggerChanged:0}],breakpoints:[{breakpointsChanged:0}]}}},Ie={ionModalDidPresent:"ionViewDidEnter",ionModalWillPresent:"ionViewWillEnter",ionModalWillDismiss:"ionViewWillLeave",ionModalDidDismiss:"ionViewDidLeave"};Re.style={ios:Be(),md:Ye()};export{Re as ion_modal};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.