jQuery(function(c){var r,p,h={},d=void 0,a=void 0,f=800,w=void 0,m=void 0,v=void 0,g=void 0,z=void 0,x=void 0,W=void 0,l=void 0,u=void 0,s=void 0,b={},T={northwest:"top",north:"top",northeast:"top",west:"left",east:"right",southwest:"bottom",south:"bottom",southeast:"bottom"},y={callout:"north",autohide:!0,mousetrack:!1,mouseEnter:!1,showShortcutKey:!0,contentType:"text",positionAlterable:!0,calloutHideMode:!1};function n(t){this._windowEle=c(window),this._windowWidth=this._windowEle.width();var n=this;this._windowEle.on("resize."+this.widgetName,function(t){n._windowWidth=n._windowEle.width()}),this._documentEle=c(document),this._documentEle.on("keydown."+this.widgetName,function(t){27==t.keyCode&&F(t)}),c(t).on("buttondisabled",function(t,o){var e=c(o.element),i=e.attr("title");o.disabled?(e.removeAttr("title"),e.data("ztooltip",i)):e.attr("title",e.data("ztooltip"))}),c(t).on("mouseover mouseup",function(t){var o=function(t,o){var e="["+o+"]";try{t=t.is(e)?t:c(t.parents(e).get(0))}catch(t){}return t}(c(t.target),"title"),e=o.attr("title");if(e&&o.length&&"document"!==o[0].nodeName.toLowerCase()){if(a&&clearTimeout(a),t.stopPropagation(),t.preventDefault(),o.attr("disabled")||o.hasClass("ui-state-disabled")||o.hasClass("ui-ztooltip-ignore"))return E(o),F(),!1;E(o),h=c.extend({},y,function(t,o){try{var e=c.parseJSON(o);return e.componentOptions?e.componentOptions:e={content:o}}catch(t){return eleOptions={content:o},eleOptions}}(0,e));var i=o.attr("callout");void 0!==i&&""!==T[i]&&(h.callout=i),c(w).length&&c(w).find(".ui-ztooltip-close").remove(),f=800,function(o,e){var i="html"==h.contentType;!0!==h.mouseEnter&&!0!==h.mousetrack||(h.callout="northwest");var n=function(t){var o=!!w,e="ui-corner-all",i=h.ajaxContent?"ui-ztooltip-ajaxcontent ":h.autohide?"ui-ztooltip-content ":"ui-ztooltip-contentwithclose ";if(o)f=0;else{w=c("
").attr("class","ui-ztooltip ui-widget"),x=void 0;var n=c("
").attr("class","ui-ztooltip-overlaydiv ui-corner-all");g=c("
").attr("class","ui-ztooltip-header ui-corner-top"),z=c("
").attr({class:i+e,id:"ui-ztooltip-content"}),W=c("").attr("class","ui-ztooltip-img "+h.iconclass).appendTo(n),g.appendTo(n),z.appendTo(n),n.appendTo(w),c("body").append(w)}g.css("display",""),W.css("display",""),h.iconclass&&W.css({display:"inline-block"});h.title&&(g.text(h.title),e="ui-corner-bottom",g.css({display:"inline-block"}));if(!h.autohide){var a=c("").attr("class","ui-ztooltip-close ui-icon ui-components-icon").on("click",function(t){c(m).off("mousemove"),F(t),c(m).attr("title",v)});a.appendTo(w),c(m).attr("noAutoHide",!0)}if(z.attr("class",i+" "+e),!h.ajaxContent){p=h.content;var l="html"==h.contentType;if(l&&h.isContentElementId){var u=c("
").append(c("#"+h.content).show());p=u.html()}if(b&&c.ui&&c.ui.shortcutkeys&&b.showShortcutKey){t=t.is("label.ui-button")?t.prev("input"):t;var s=c(document).shortcutkeys("getShortcutKey",t);s&&(p=p+" ("+s+")")}}d&&d.remove();d=w.clone(),c("body").append(d);var l="html"==h.contentType;d.removeAttr("style").hide(),d.find("#ui-ztooltip-content").removeAttr("style"),d.find("#ui-ztooltip-content")[l?"html":"text"](p),h.callout&&!h.ajaxContent?(x||(x=c("
").attr("class","ui-ztooltip-callout").appendTo(w)),r=H(h.callout,x)):x=void 0;return w}(e);if(n){var a=void 0;o.originalEvent?a=h.callout&&!h.ajaxContent?k(o):{left:o.pageX+10,top:o.pageY+10}:((a=e.offset()).left+=e.width(),a.top+=e.height()),a=_(a,e,d),clearTimeout(l),clearTimeout(u),l=setTimeout(function(){if(e.is(":visible")||e.is("option")){if(h.ajaxContent){var t=c("
").attr("class","ui-ztooltip-content-loading");c(w).find(".ui-ztooltip-ajaxcontent").append(t),u=setTimeout(function(){c.ajax({type:"GET",url:h.ajaxContent,data:"",success:function(t){c(w).find(".ui-ztooltip-ajaxcontent").html(t)},error:function(){c(w).find(".ui-ztooltip-ajaxcontent").empty()}})})}h.timeout&&h.autohide&&(s=setTimeout(function(){F(o)},parseInt(h.timeout))),n.show(1,function(){z[i?"html":"text"](p),x.css(r),(a=O(o,n,a,e))&&n.css(a),h.calloutHideMode&&w.find(".ui-ztooltip-callout").hide()})}},f)}}(t,o),v=e,(m=o).on("click.ztooltip",function(t){F()}),o.off("mouseout.ztooltip").on("mouseout.ztooltip",function(t){h.timeout&&clearTimeout(s),a&&clearTimeout(a),a=setTimeout(function(){h.autohide&&(o.unbind("mousemove"),F(t))},200),E(o,!0)}),n._documentEle.off("mousedown.ztooltip").on("mousedown.ztooltip",function(t){h.autohide&&(o.unbind("mousemove"),F(t)),E(o,!0)}),h.mousetrack&&o.off("mousemove.ztooltip").on("mousemove.ztooltip",function(t){!function(t,o){var e=c(w),i=(e.width(),e.height(),h.callout&&!h.ajaxContent?k(t):{left:t.pageX+5,top:t.pageY+5});i=O(t,w,i,o),e.width()+parseInt(i.left)>this._windowWidth&&e.width(this._windowWidth-(parseInt(i.left)+50));e.css(i)}(t,o)})}})}function E(t,n){var o=n?t.data("parents"):t.parents("[title]");n?t.data("parents",void 0):(o.push(t),t.data("parents",o)),o&&c.each(o,function(t,o){var e="",i=(o=c(o)).attr("title");n?e=i!=o.data("title")&&""!=i?i:o.data("title"):o.data("title",i),o.attr("title",e)})}function _(t,o,e,i){var n=h.callout?h.callout:i,a=o.offset(),l=a.left,u=a.top;return o.is("option")&&(l=o.parent("select").offset().left,u=o.parent("select").offset().top+o.offset.top),n&&(-1!=n.indexOf("north")?(h.mouseEnter||h.mousetrack||(t.left="northwest"===n?l:"northeast"===n?l-(e.width()-o.outerWidth()):l-8-(e.width()/2-8)+o.outerWidth()/2),t.top=u+o.outerHeight()+9):-1!=n.indexOf("south")?(t.left="southwest"===n?l:"southeast"===n?l-(e.width()-o.outerWidth()):l-8-(e.width()/2-8)+o.outerWidth()/2,t.top=u-e.outerHeight()-9):"west"===n?(t.left=parseInt(l+o.outerWidth()+9),t.top=u-e.height()/2+o.outerHeight()/2):"east"===n&&(t.left=parseInt(l-e.width()-9),t.top=u-e.height()/2+o.outerHeight()/2)),t}function H(t,o){if(!w)return!1;var e={};o.removeAttr("class").attr("class","ui-ztooltip-callout ui-ztooltip-callout-"+T[t]);var i=o.outerWidth(),n=o.outerHeight(),a=d.width(),l=d.height();switch(t){case"north":e={left:a/2-i/2+"px",top:"-"+(n-1)+"px"};break;case"west":e={left:"-"+(i-1)+"px",top:l/2-n/2+"px"};break;case"east":e={left:a-1+"px",top:l/2-n/2+"px"};break;case"south":e={left:a/2-i/2+"px",top:l-1+"px"};break;case"northeast":e={left:a-2*i+"px",top:"-"+(n-1)+"px"};break;case"northwest":e={left:i+"px",top:"-"+(n-1)+"px"};break;case"southwest":e={left:i+"px",top:l-1+"px"};break;case"southeast":e={left:a-2*i+"px",top:l-1+"px"};break;default:o.addClass("ui-ztooltip-callout-top"),e={left:i+"px",top:"-"+(n-1)+"px"}}return e}var i={north:function(t){return{left:t.pageX-t.tooltipWidth/2,top:t.pageY+(t.calloutHeight+t._OFFSET)}},west:function(t){return{left:t.pageX+(t.calloutWidth+t._OFFSET),top:t.pageY-t.tooltipHeight/2}},east:function(t){return{left:t.pageX-(t.calloutWidth+t._OFFSET)-t.tooltipWidth,top:t.pageY-t.tooltipHeight/2}},south:function(t){return{left:t.pageX-t.tooltipWidth/2,top:t.pageY-(t.calloutHeight+t._OFFSET)-t.tooltipHeight}},northeast:function(t){return{left:t.pageX-(t.tooltipWidth-(t.calloutWidth+t.calloutWidth/2)),top:t.pageY+t.calloutHeight+t._OFFSET}},northwest:function(t){return{left:t.pageX-(t.calloutWidth+t.calloutWidth/2),top:t.pageY+t.calloutHeight+t._OFFSET}},southwest:function(t){return{left:t.pageX-(t.calloutWidth+t.calloutWidth/2),top:t.pageY-(t.calloutHeight+t._OFFSET)-t.tooltipHeight}},southeast:function(t){return{left:t.pageX-(t.tooltipWidth-(t.calloutWidth+t.calloutWidth/2)),top:t.pageY-(t.calloutHeight+t._OFFSET)-t.tooltipHeight}},defaultFn:function(t){return i.north(t,t.calloutHeight,t.calloutWidth)}};function k(t){t.tooltipWidth=w.outerWidth(),t.tooltipHeight=w.height();if(t._OFFSET=10,!w)return!1;var o=w.find(".ui-ztooltip-callout");t.calloutWidth=o.outerWidth(),t.calloutHeight=o.outerHeight();var e=i[h.callout];return e||(e=i.defaultFn),e(t)}function F(t){w&&("html"===h.contentType&&h.isContentElementId&&c(w).find("#"+h.content).appendTo("body").hide(),c(w).remove(),w=void 0)}function O(t,o,e,i){if(o&&e){var n,a=e.top-this._documentEle.scrollTop(),l=e.left-this._documentEle.scrollLeft(),u=l+o.width(),s=a+o.height(),r=void 0;if(u>=this._windowWidth?(e.left=this._windowWidth-(o.outerWidth(!0)+5),e.left+o.width()-i.offset().left<=15&&(h.callout="east"),r=h.callout):l<0&&(e.left=e.left+5-l,i.offset().left+i.width()-this._documentEle.scrollLeft()<=20&&(h.callout="west"),r=h.callout),s>=this._windowEle.height()?(e.top=i.offset().top-o.outerHeight()-9,r="south",n=a):a<0&&(e.top=i.offset().top+i.outerHeight()+9,r="north",n=a),r)!function(t,o,e,i,n,a,l){var u=h.callout?h.callout:o;switch(o){case"north":u="south"==u?"north":"southeast"==u?"northeast":"southwest"==u?"northwest":u;break;case"south":u="north"==u?"south":"northeast"==u?"southeast":"northwest"==u?"southwest":u;break;case"west":u="east"==u?"west":u;break;case"east":u="west"==u?"east":u}(function(t,o,e,i,n,a,l,u){if(e){h.callout=o;var s=e.position();u&&((s=H(o,e))||(s=e.position())),"east"===o||"west"===o?(s=H(o,e),a=_(a,c(t.target),i,n)):"northwest"===o||"northeast"===o||"southwest"===o||"southeast"===o?s=H(o,e):l<0?(s.left=i.width()/2-e.outerWidth()/2+l-5,s.left<=10&&(s.left=10)):(s.left=i.width()/2-e.outerWidth()/2+(l-a.left),i.width()-s.left<=20&&(s.left=i.width()-20)),s&&e.css(s)}})(t,u,e,i,o,n,a,l)}(t,r,o.find(".ui-ztooltip-callout"),o,e,l,n)}return e}c.fn.ztooltip=function(t,o,e){var i=c(this);b=c.extend({},y,"object"==typeof t&&t),i.data("z-ztooltip")?"remove"===t&&F():(n(i),i.data("z-ztooltip",!0))},c.fn.ztooltip.remove=F,!$Support.isMobileWidth()&&$Support.isIframeContentLoaded()&&c(document).ztooltip()});LSDragDrop={onDropEvent:function(e,i,a){if(-1!=e)try{i.preventDefault();var t=a||i.dataTransfer.files;this.nooffiles=t.length,this.pos=0,this.uploadFile(e,t)}catch(e){}},uploadFile:function(a,t,e,i){var o=this,s=(new Date).getTime(),l=null!=e?e:"chat_attachment",n={progress:function(e,i){$UI.showUploadProgress({fileobj:t[o.pos-1],prgval:e,msgid:i,att_type:l},a)},complete:function(){r()},success:function(){r()}};function r(){$UI.hideUploadProgress(s),$Support.Util.handleCallbacks("chat.file",{}),o.pos
":$EmbedManger.UI.getPrevHTML()},getEmbPrevHTML:function(){return'
'+LSResource.getRealValue("common.sharewith",getEncodedText(Support.attendername))+'
'+LSResource.getRealValue("banner.share")+''+LSResource.getRealValue("common.cancel")+"
"},getHTML:function(){for(var e="
",t=this.files.length,a=2"},insertText:function(e){var t=document.getSelection();return window.clipboardData?(document.selection.createRange().pasteHTML(e),!0):!!(document.queryCommandEnabled("insertText")&&0\?\/]/g,"-")).substring(0,100),this.Filename=s,this.ext=r,l.attr("fileextn",r),l.find(".file-name").val(s),l.find("#pasteimgcomment").focus(),this.bindHandler(l),this.setPreview(l,i)}},bindHandler:function(e){e.find(".file-name").on("blur",function(){""!=$(this).val()?PasteImage.Filename=$(this).val():$(this).val(PasteImage.Filename)}).on("keydown",function(){$(this).removeClass("bdrbot_red")})},generateName:function(e,t){var a=e.type,n=a.substring(a.indexOf("/")+1,a.length);return"Image - "+this.getcurrTime()+"."+n},getcurrTime:function(){var e=new Date,t="",a=e.getHours(),n=e.getMinutes(),i=12\?\/]$/.test(r)||""==r)return!1;if(100')},a.readAsDataURL(t)},handlepasteimage:function(e){var t=parseInt(e.attr("mcount")),a=t-e.val().length,n=a<0?" redtxt":"",i=a<0?LSResource.getRealValue("common.count.error",""+t):a+" ";e.parent().find(".messagecount").show().removeClass("redtxt").addClass(n).text(i)}};