PageSourceSearch

https://www.sexole.com/js/build/vite/assets/Modal-DrfJ3UGQ.js

js sexole.com collected 2026-09-26 13:59:51 UTC 6,049 bytes, 2 lines download raw bytes

1import{c as e,h as t,l as n,n as r,u as i}from"./GlobalEventHandler-w0VIL1rJ.js";import{l as a}from"./CommonUtils-Z3FgM2Jg.js";import{t as o}from"./Flux-CfqvmlI0.js";import{t as s}from"./LogoLoader-clDmNn24.js";var c=t(r(),1),l=t(i(),1),u=t(n(),1),d=t(e(),1),f=document.body,Modal=class extends l.Component{constructor(e){super(e),this.scrollY=``,this.isRemoved=!1,this.state={modalElement:document.createElement(`div`),show:!this.props.animation.useAnimation},(this.props.modalContainer||f).appendChild(this.state.modalElement),!this.props.animation.useAnimation&&this.addPreventScrolling(),this.removeModal=this.removeModal.bind(this),this.onCloseClick=this.onCloseClick.bind(this),this.onContainerClick=this.onContainerClick.bind(this),this.containerIsInitialized=this.containerIsInitialized.bind(this),this.onKeyUp=this.onKeyUp.bind(this)}componentDidMount(){o.Browser.addEventListener(o.Browser.EVENTS.closeModal,this.onCloseClick),this.props.hideCloseButton||document.addEventListener(`keyup`,this.onKeyUp),this.props.animation.useAnimation&&setTimeout(()=>{this.setState({show:!0},()=>{setTimeout(()=>{this.addPreventScrolling()},500)})},100)}componentWillUnmount(){!this.props.hideCloseButton&&this.state.modalElement&&document.removeEventListener(`keyup`,this.onKeyUp),this.props.renderInline||this.removeModal()}addPreventScrolling(){document.querySelector(`.prevent-scrolling`)===null&&(this.scrollY=a(),document.querySelector(`body`).classList.add(`prevent-scrolling`),document.querySelector(`html.mobile`)!==null&&o.Browser.isSafariMobile()&&document.querySelector(`html.mobile`).classList.add(`prevent-scrolling`))}removePreventScrolling(){document.querySelector(`.prevent-scrolling`)!==null&&(document.querySelector(`body`).classList.remove(`prevent-scrolling`),document.querySelector(`html.mobile`)!==null&&document.querySelector(`html.mobile`).classList.remove(`prevent-scrolling`))}containerIsInitialized(e){this.props.postRenderCallback&&this.props.postRenderCallback(e)}removeModal(){this.isRemoved||(this.isRemoved=!0,this.state.modalElement?(!this.props.animation.useAnimation&&this.removePreventScrolling(),typeof this.props.beforeClose==`function`&&this.props.beforeClose(),this.setState({modalElement:null}),typeof this.props.onClose==`function`&&this.props.onClose()):(typeof this.props.beforeClose==`function`&&this.props.beforeClose(),typeof this.props.onClose==`function`&&this.props.onClose()))}getModal(){let e={...this.props.divProps},t={},n=`modal__container `+this.props.className,r=`modal `+this.props.modalClassName+(this.props.isHidden?` h-hide`:``);return this.props.animation.useAnimation&&this.props.animation.fromRight&&!this.state.show&&(r+=` modal--transform-from-right`),this.props.containerWidth&&!this.props.isHls&&!this.props.isFullHeight&&(n+=` -auto-size`,t=this.props.useMaxWidth?{maxWidth:this.props.containerWidth+`px`,height:this.props.containerHeight+`px`}:{width:this.props.containerWidth+`px`,height:this.props.containerHeight+`px`}),this.props.dynamicSize&&(n+=` -dynamic-size`,r+=` -dynamic-size`,this.props.containerHeight?t.height=this.props.containerHeight+`px`:t.height=``,this.props.containerWidth&&!this.props.useMaxWidth&&(t.width=this.props.containerWidth+`px`)),(VXConfig?.guest?.camLink?.timerEnd&&!o.Guest.hasAvs()||this.props.isMessengerImageModal||o.Guest.getIsUberFlowActive()&&!o.Guest.hasAvs())&&(r+=` modal--over-chat`),(0,d.jsx)(`div`,{className:r,...e,onClick:this.onContainerClick,children:(0,d.jsxs)(`div`,{className:n,style:t,ref:e=>this.containerIsInitialized(e),children:[this.props.showSpinner&&(0,d.jsx)(`div`,{className:`modal__spinner`,children:(0,d.jsx)(s,{})}),(0,d.jsxs)(`div`,{className:`modal__frame`,children:[!this.props.hideCloseButton&&(0,d.jsx)(`span`,{className:`icon ${this.props.closeBtnIconClass} modal__btn-close`,onClick:this.onCloseClick}),(0,d.jsx)(`div`,{className:`modal__content`+(this.props.useFlexDirection?` modal__content--flex`:``),children:this.props.children})]})]})})}onCloseClick(e){e&&e.stopPropagation&&e.stopPropagation(),this.props.animation.useAnimation?this.setState({show:!1},()=>{this.removePreventScrolling(),typeof this.props.beforeAnimationClose
1==`function`&&this.props.beforeAnimationClose(),setTimeout(()=>this.removeModal(),500)}):this.removeModal()}onContainerClick(e){e.target&&e.target.classList&&e.target.classList.contains(`modal`)&&(typeof this.props.onContainerClickFn==`function`&&this.props.hideCloseButton?this.props.onContainerClickFn():this.props.hideCloseButton||this.props.isContainerClickClose&&this.removeModal())}onKeyUp(e){e.keyCode===27&&(this.props.hideCloseButton||this.removeModal())}render(){return this.props.renderInline?this.getModal():this.state.modalElement?u.createPortal(this.getModal(),this.state.modalElement):null}};Modal.propTypes={beforeClose:c.default.func,children:c.default.node,className:c.default.string,modalClassName:c.default.string,containerWidth:c.default.number,containerHeight:c.default.number,dynamicSize:c.default.bool,hideCloseButton:c.default.bool,isHidden:c.default.bool,onClose:c.default.func,beforeAnimationClose:c.default.func,onContainerClickFn:c.default.func,showSpinner:c.default.bool,useMaxWidth:c.default.bool,postRenderCallback:c.default.func,renderInline:c.default.bool,isHls:c.default.bool,useFlexDirection:c.default.bool,isFullHeight:c.default.bool,isContainerClickClose:c.default.bool,animation:c.default.shape({useAnimation:c.default.bool,fromRight:c.default.bool}),divProps:c.default.object,modalContainer:c.default.object,closeBtnIconClass:c.default.string,isMessengerImageModal:c.default.bool},Modal.defaultProps={beforeClose:null,beforeAnimationClose:null,className:``,modalClassName:``,dynamicSize:!1,hideCloseButton:!1,isHidden:!1,onContainerClickFn:()=>{},showSpinner:!1,useMaxWidth:!1,postRenderCallback:null,renderInline:!1,isHls:!1,useFlexDirection:!1,isFullHeight:!1,isContainerClickClose:!0,animation:{},divProps:{},closeBtnIconClass:`-icon-close-line`,isMessengerImageModal:!1};export{Modal as t};
2//# sourceMappingURL=Modal-DrfJ3UGQ.js.map

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.