const DEFAULT_DURATION_MS=0xfa;function prefersReducedMotion(){try{return window['matchMedia']&&window['matchMedia']('(prefers-reduced-motion:\x20reduce)')['matches'];}catch{return![];}}function safeCancelAnimations(_0x220c16){if(!_0x220c16||typeof _0x220c16['getAnimations']!=='function')return;try{_0x220c16['getAnimations']()['forEach'](_0x56c0d6=>_0x56c0d6['cancel']());}catch{}}function animateRestoreFlip({contentEl:_0x3c4391,fromRect:_0x149552,toRect:_0x5791bc,durationMs:_0x1f4a05}){if(!_0x3c4391)return;if(!_0x149552||!_0x5791bc)return;if(prefersReducedMotion())return;const _0x17bdda=_0x5791bc['width']||0x0,_0x43fb95=_0x5791bc['height']||0x0,_0x2d29cb=_0x149552['width']||0x0,_0x3acd1a=_0x149552['height']||0x0;if(_0x17bdda<=0x0||_0x43fb95<=0x0||_0x2d29cb<=0x0||_0x3acd1a<=0x0)return;const _0x5941b7=_0x149552['left']-_0x5791bc['left'],_0x5d4af7=_0x149552['top']-_0x5791bc['top'],_0x350c2a=_0x2d29cb/_0x17bdda,_0x444ae8=_0x3acd1a/_0x43fb95;if(!Number['isFinite'](_0x5941b7)||!Number['isFinite'](_0x5d4af7)||!Number['isFinite'](_0x350c2a)||!Number['isFinite'](_0x444ae8))return;safeCancelAnimations(_0x3c4391);const _0x48948d=_0x3c4391['style']['transition'],_0xd47ef9=_0x3c4391['style']['transformOrigin'],_0x50822b=_0x3c4391['style']['willChange'];_0x3c4391['style']['transition']='none',_0x3c4391['style']['transformOrigin']='top\x20left',_0x3c4391['style']['willChange']='transform';const _0x41a9d2='translate('+_0x5941b7+'px,\x20'+_0x5d4af7+'px)\x20scale('+_0x350c2a+',\x20'+_0x444ae8+')',_0x545f88=_0x3c4391['animate']([{'transform':_0x41a9d2},{'transform':'none'}],{'duration':_0x1f4a05,'easing':'ease','fill':'both'}),_0x42fe82=()=>{_0x3c4391['style']['transition']=_0x48948d,_0x3c4391['style']['transformOrigin']=_0xd47ef9,_0x3c4391['style']['willChange']=_0x50822b;};_0x545f88['addEventListener']('finish',_0x42fe82,{'once':!![]}),_0x545f88['addEventListener']('cancel',_0x42fe82,{'once':!![]});}export function toggleModalMaximize(_0x4e86c5,_0x118ccf={}){if(!_0x4e86c5)return;const {storageKey:_0x57b05b,updateIcon:_0x4f6cf5,onAfterToggle:_0x29935f,durationMs:durationMs=DEFAULT_DURATION_MS}=_0x118ccf,_0x3506e5=_0x4e86c5['querySelector']('.modal-content'),_0x4241d7=_0x4e86c5['classList']['contains']('maximized'),_0x4bfc1e=!_0x4241d7;if(!_0x3506e5){_0x4e86c5['classList']['toggle']('maximized'),_0x4f6cf5?.(_0x4bfc1e),_0x29935f?.(_0x4bfc1e);if(_0x57b05b)try{localStorage['setItem'](_0x57b05b,String(_0x4bfc1e));}catch{}return;}if(_0x4241d7&&!prefersReducedMotion()){const _0x37968e=_0x3506e5['getBoundingClientRect']();_0x4e86c5['classList']['remove']('maximized');const _0x22cab2=_0x3506e5['getBoundingClientRect']();animateRestoreFlip({'contentEl':_0x3506e5,'fromRect':_0x37968e,'toRect':_0x22cab2,'durationMs':durationMs});}else _0x4e86c5['classList']['toggle']('maximized');_0x4f6cf5?.(_0x4bfc1e),_0x29935f?.(_0x4bfc1e);if(_0x57b05b)try{localStorage['setItem'](_0x57b05b,String(_0x4bfc1e));}catch{}}