arifselviawedding/js/jquery.popupoverlay.min.js

8 lines
11 KiB
JavaScript
Raw Normal View History

2022-11-20 23:31:05 +07:00
/**
* Minified by jsDelivr using Terser v3.14.1.
* Original file: /gh/vast-engineering/jquery-popup-overlay@2.1.5/jquery.popupoverlay.js
*
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
*/
!function(t){var e,o,i,n=t(window),a={},s=[],p=[],l=null,d=[],r=null,c=/(iPad|iPhone|iPod)/.test(navigator.userAgent),u={_init:function(e){var o=t(e),i=o.data("popupoptions");p[e.id]=!1,s[e.id]=0,o.data("popup-initialized")||(o.attr("data-popup-initialized","true"),u._initonce(e)),i.autoopen&&setTimeout(function(){u.show(e,0)},0)},_initonce:function(o){var i,n,a,s=t(o),p=t("body"),d=s.data("popupoptions");(l=parseInt(p.css("margin-right"),10),r=void 0!==document.body.style.webkitTransition||void 0!==document.body.style.MozTransition||void 0!==document.body.style.msTransition||void 0!==document.body.style.OTransition||void 0!==document.body.style.transition,d.scrolllock)&&(void 0===e&&(a=(n=t('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body")).children(),e=a.innerWidth()-a.height(99).innerWidth(),n.remove()));if(s.attr("id")||s.attr("id","j-popup-"+parseInt(1e8*Math.random(),10)),s.addClass("popup_content"),d.background&&!t("#"+o.id+"_background").length){p.append('<div id="'+o.id+'_background" class="popup_background"></div>');var f=t("#"+o.id+"_background");f.css({opacity:0,visibility:"hidden",backgroundColor:d.color,position:"fixed",top:0,right:0,bottom:0,left:0}),d.setzindex&&!d.autozindex&&f.css("z-index","100000"),d.transition&&f.css("transition",d.transition)}p.append(o),s.wrap('<div id="'+o.id+'_wrapper" class="popup_wrapper" />'),(i=t("#"+o.id+"_wrapper")).css({opacity:0,visibility:"hidden",position:"absolute"}),c&&((f=t("#"+o.id+"_background")).css("cursor","pointer"),t(d.pagecontainer).css("cursor","pointer")),"overlay"==d.type&&!d.absolute&&d.background&&(i.css("overflow","auto"),i[0].style.WebkitOverflowScrolling="touch"),s.css({opacity:0,visibility:"hidden","pointer-events":"auto",display:"inline-block"}),d.setzindex&&!d.autozindex&&i.css("z-index","100001"),d.outline||s.css("outline","none"),d.transition&&(s.css("transition",d.transition),i.css("transition",d.transition)),s.attr("aria-hidden",!0),"overlay"==d.type&&(s.css({textAlign:"left",position:"relative",verticalAlign:"middle"}),i.css({position:"fixed",width:"100%",height:"100%",top:0,left:0,textAlign:"center"}),i.append('<div class="popup_align" />'),t(".popup_align").css({display:"inline-block",verticalAlign:"middle",height:"100%"})),s.attr("role","dialog");var h=d.openelement?d.openelement:"."+o.id+"_open";t(h).each(function(e,o){t(o).attr("data-popup-ordinal",e),o.id||t(o).attr("id","open_"+parseInt(1e8*Math.random(),10))}),s.attr("aria-labelledby")||s.attr("aria-label")||s.attr("aria-labelledby",t(h).attr("id")),"hover"==d.action?(d.keepfocus=!1,t(h).on("mouseenter",function(){u.show(o,t(this).data("popup-ordinal"))}),t(h).on("mouseleave",function(){u.hide(o)})):t(document).on("click.jqp",h,function(e){e.preventDefault();var i=t(this).data("popup-ordinal");setTimeout(function(){u.show(o,i)},0)}),d.closebutton&&u.addclosebutton(o),d.detach?s.detach():s.hide()},show:function(i,a){var c=t(i);if(!c.data("popup-visible")){c.data("popup-initialized")||u._init(i),c.attr("data-popup-initialized","true");var h=t("body"),b=c.data("popupoptions"),g=t("#"+i.id+"_wrapper"),v=t("#"+i.id+"_background");if(f(i,a,b.beforeopen),p[i.id]=a,setTimeout(function(){d.push(i.id)},0),b.autozindex){for(var m=document.getElementsByTagName("*"),y=m.length,_=0,w=0;w<y;w++){var k=t(m[w]).css("z-index");"auto"!==k&&_<(k=parseInt(k,10))&&(_=k)}s[i.id]=_,b.background&&s[i.id]>=0&&t("#"+i.id+"_background").css({zIndex:s[i.id]+1}),s[i.id]>=0&&g.css({zIndex:s[i.id]+2})}b.detach?(g.prepend(i),c.show()):c.show(),o=setTimeout(function(){g.css({visibility:"visible",opacity:1}),t("html").addClass("popup_visible").addClass("popup_visible_"+i.id),g.addClass("popup_wrapper_visible")},20),b.scrolllock&&(h.css("overflow","hidden"),h.height()>n.height()&&h.css("margin-right",l+e)),c.css({visibility:"visible",opacity:1}),b.background&&(v.css({visibility:"visible",opacity:b.opacity}),setTimeout(function(){v.css({opacity:b.opacity})},0)),c.data("popup-visible",!0),u.reposition(i,a),c.data("focusedelementbeforepopup",document.activeElement),c.attr("tabindex",-1),set
//# sourceMappingURL=/sm/f5b2942be67f63957f42b76c937cdf49f8d35e9757218ac115be2c27a7dd186e.map