!function(t,e,i){"use strict";var o;o=function(i){var o="webuiPopover",n="webui-popover",s="webui.popover",h={placement:"auto",container:null,width:"auto",height:"auto",trigger:"click",style:"",selector:!1,delay:{show:null,hide:300},async:{type:"GET",before:null,success:null,error:null},cache:!0,multi:!1,arrow:!0,title:"",content:"",closeable:!1,padding:!0,url:"",type:"html",direction:"",animation:null,template:'

 

',backdrop:!1,dismissible:!0,onShow:null,onHide:null,abortXHR:!0,autoHide:!1,offsetTop:0,offsetLeft:0,iframeOptions:{frameborder:"0",allowtransparency:"true",id:"",name:"",scrolling:"",onload:"",height:"",width:""},hideEmpty:!1},r=n+"-rtl",a=[],l=i('
'),c=0,p=!1,f=i(e),d=function(t,e){return isNaN(t)?e||0:Number(t)},g=function(t){return t.data("plugin_"+o)},u=function(){for(var t=null,e=0;e").attr("src",this.getUrl()),e=this;return i.each(this._defaults.iframeOptions,function(i){void 0!==e.options.iframeOptions[i]&&t.attr(i,e.options.iframeOptions[i])}),t},getContent:function(){if(this.getUrl())switch(this.options.type){case"iframe":this.content=this.getIframe();break;case"html":try{this.content=i(this.getUrl()),this.content.is(":visible")||this.content.show()}catch(t){throw Error("Unable to get popover content. Invalid selector specified.")}}else if(!this.content){var e="";if(e=i.isFunction(this.options.content)?this.options.content.apply(this.$element[0],[this]):this.options.content,this.content=this.$element.attr("data-content")||e,!this.content){var o=this.$element.next();o&&o.hasClass(n+"-content")&&(this.content=o)}}return this.content},setContent:function(t){var e=this.getTarget(),o=this.getContentElement();"string"==typeof t?o.html(t):t instanceof i&&(o.html(""),this.options.cache?t.removeClass(n+"-content").appendTo(o):t.clone(!0,!0).removeClass(n+"-content").appendTo(o)),this.$target=e},isAsync:function(){return"async"===this.options.type},setContentASync:function(t){var e=this;!this.xhr&&(this.xhr=i.ajax({url:this.getUrl(),type:this.options.async.type,cache:this.getCache(),beforeSend:function(t,i){e.options.async.before&&e.options.async.before(e,t,i)},success:function(o){e.bindBodyEvents(),t&&i.isFunction(t)?e.content=t.apply(e.$element[0],[o]):e.content=o,e.setContent(e.content),e.getContentElement().removeAttr("style"),e.displayContent(),e.options.async.success&&e.options.async.success(e,o)},complete:function(){e.xhr=null},error:function(t,i){e.options.async.error&&e.options.async.error(e,t,i)}}))},bindBodyEvents:function(){!p&&(this.options.dismissible&&"click"===this.getTrigger()?v?f.off("touchstart.webui-popover").on("touchstart.webui-popover",i.proxy(this.bodyTouchStartHandler,this)):(f.off("keyup.webui-popover").on("keyup.webui-popover",i.proxy(this.escapeHandler,this)),f.off("click.webui-popover").on("click.webui-popover",i.proxy(this.bodyClickHandler,this))):"hover"===this.getTrigger()&&f.off("touchend.webui-popover").on("touchend.webui-popover",i.proxy(this.bodyClickHandler,this)))},mouseenterHandler:function(t){var e=this;t&&this.options.selector&&(e=this.delegate(t.currentTarget)),e._timeout&&clearTimeout(e._timeout),e._enterTimeout=setTimeout(function(){e.getTarget().is(":visible")||e.show()},this.getDelayShow())},mouseleaveHandler:function(){var t=this;clearTimeout(t._enterTimeout),t._timeout=setTimeout(function(){t.hide()},this.getHideDelay())},escapeHandler:function(t){27===t.keyCode&&this.hideAll()},bodyTouchStartHandler:function(t){var e=this,o=i(t.currentTarget);o.on("touchend",function(t){e.bodyClickHandler(t),o.off("touchend")}),o.on("touchmove",function(){o.off("touchend")})},bodyClickHandler:function(t){p=!0;for(var e=!0,i=0;i=s&&c.x<=r&&c.y>=h&&c.y<=l){e=!1;break}}}e&&u()},initTargetEvents:function(){"hover"===this.getTrigger()&&this.$target.off("mouseenter mouseleave").on("mouseenter",i.proxy(this.mouseenterHandler,this)).on("mouseleave",i.proxy(this.mouseleaveHandler,this)),this.$target.find(".close").off("click").on("click",i.proxy(this.hide,this,!0))},getPlacement:function(t){var e,i=this.options.container,o=i.innerWidth(),n=i.innerHeight(),s=i.scrollTop(),h=i.scrollLeft(),r=Math.max(0,t.left-h),a=Math.max(0,t.top-s),l="horizontal"===(e="function"==typeof this.options.placement?this.options.placement.call(this,this.getTarget()[0],this.$element[0]):this.$element.data("placement")||this.options.placement),c="vertical"===e;return"auto"===e||l||c?e=r0,w=s.left+s.width/2+g0,T=s.top+s.height/2+u