const DEFAULT_DURATION_MS=0xfa;function prefersReducedMotion(){try{return window['matchMedia']&&window['matchMedia']('(prefers-reduced-motion:\x20reduce)')['matches'];}catch{return![];}}function safeCancelAnimations(_0x358898){if(!_0x358898||typeof _0x358898['getAnimations']!=='function')return;try{_0x358898['getAnimations']()['forEach'](_0x52239e=>_0x52239e['cancel']());}catch{}}function animateRestoreFlip({contentEl:_0x1877b4,fromRect:_0x96919c,toRect:_0x5c3a48,durationMs:_0x2b2094}){if(!_0x1877b4)return;if(!_0x96919c||!_0x5c3a48)return;if(prefersReducedMotion())return;const _0x1031fd=_0x5c3a48['width']||0x0,_0x178ba1=_0x5c3a48['height']||0x0,_0x1a6cbb=_0x96919c['width']||0x0,_0x257d55=_0x96919c['height']||0x0;if(_0x1031fd<=0x0||_0x178ba1<=0x0||_0x1a6cbb<=0x0||_0x257d55<=0x0)return;const _0x50c24c=_0x96919c['left']-_0x5c3a48['left'],_0x4307f1=_0x96919c['top']-_0x5c3a48['top'],_0x4828cc=_0x1a6cbb/_0x1031fd,_0x2714da=_0x257d55/_0x178ba1;if(!Number['isFinite'](_0x50c24c)||!Number['isFinite'](_0x4307f1)||!Number['isFinite'](_0x4828cc)||!Number['isFinite'](_0x2714da))return;safeCancelAnimations(_0x1877b4);const _0x1a9bc6=_0x1877b4['style']['transition'],_0x1f7bab=_0x1877b4['style']['transformOrigin'],_0x383d27=_0x1877b4['style']['willChange'];_0x1877b4['style']['transition']='none',_0x1877b4['style']['transformOrigin']='top\x20left',_0x1877b4['style']['willChange']='transform';const _0xd90b04='translate('+_0x50c24c+'px,\x20'+_0x4307f1+'px)\x20scale('+_0x4828cc+',\x20'+_0x2714da+')',_0xa1a80b=_0x1877b4['animate']([{'transform':_0xd90b04},{'transform':'none'}],{'duration':_0x2b2094,'easing':'ease','fill':'both'}),_0x1bc343=()=>{_0x1877b4['style']['transition']=_0x1a9bc6,_0x1877b4['style']['transformOrigin']=_0x1f7bab,_0x1877b4['style']['willChange']=_0x383d27;};_0xa1a80b['addEventListener']('finish',_0x1bc343,{'once':!![]}),_0xa1a80b['addEventListener']('cancel',_0x1bc343,{'once':!![]});}export function toggleModalMaximize(_0x2ac704,_0x520081={}){if(!_0x2ac704)return;const {storageKey:_0x301519,updateIcon:_0x5a1f46,onAfterToggle:_0x49b403,durationMs:durationMs=DEFAULT_DURATION_MS}=_0x520081,_0x554f53=_0x2ac704['querySelector']('.modal-content'),_0x426a9e=_0x2ac704['classList']['contains']('maximized'),_0x5f4bbf=!_0x426a9e;if(!_0x554f53){_0x2ac704['classList']['toggle']('maximized'),_0x5a1f46?.(_0x5f4bbf),_0x49b403?.(_0x5f4bbf);if(_0x301519)try{localStorage['setItem'](_0x301519,String(_0x5f4bbf));}catch{}return;}if(_0x426a9e&&!prefersReducedMotion()){const _0x5361f5=_0x554f53['getBoundingClientRect']();_0x2ac704['classList']['remove']('maximized');const _0x435dcd=_0x554f53['getBoundingClientRect']();animateRestoreFlip({'contentEl':_0x554f53,'fromRect':_0x5361f5,'toRect':_0x435dcd,'durationMs':durationMs});}else _0x2ac704['classList']['toggle']('maximized');_0x5a1f46?.(_0x5f4bbf),_0x49b403?.(_0x5f4bbf);if(_0x301519)try{localStorage['setItem'](_0x301519,String(_0x5f4bbf));}catch{}}