File Editor
Directories:
.. (Back)
Files:
cdp-bulk.min.js
cdp-global.min.js
cdp-gutenberg.min.js
cdp-icPagination.min.js
cdp-modal.min.js
cdp-select.min.js
cdp-user.min.js
cdp.min.js
cdp.tooltip.min.js
Create New File
Create
Edit File: cdp.tooltip.min.js
!function(t,i){void 0===t&&void 0!==window&&(t=window),"function"==typeof define&&define.amd?define(["jquery"],function(t){return i(t)}):"object"==typeof module&&module.exports?module.exports=i(require("jquery")):i(t.jQuery)}(this,function(t){var i={animation:"fade",animationDuration:350,content:null,contentAsHTML:!1,contentCloning:!1,debug:!0,delay:300,delayTouch:[300,500],functionInit:null,functionBefore:null,functionReady:null,functionAfter:null,functionFormat:null,IEmin:6,interactive:!1,multiple:!1,parent:null,plugins:["sideTip"],repositionOnScroll:!1,restoration:"none",selfDestruction:!0,theme:[],timer:0,trackerInterval:500,trackOrigin:!1,trackTooltip:!1,trigger:"hover",triggerClose:{click:!1,mouseleave:!1,originClick:!1,scroll:!1,tap:!1,touchleave:!1},triggerOpen:{click:!1,mouseenter:!1,tap:!1,touchstart:!1},updateAnimation:"rotate",zIndex:9999999},e="undefined"!=typeof window?window:null,o={hasTouchCapability:!(!e||!("ontouchstart"in e||e.DocumentTouch&&e.document instanceof e.DocumentTouch||e.navigator.maxTouchPoints)),hasTransitions:function(){if(!e)return!1;var t=(e.document.body||e.document.documentElement).style,i="transition",o=["Moz","Webkit","Khtml","O","ms"];if("string"==typeof t[i])return!0;i=i.charAt(0).toUpperCase()+i.substr(1);for(var n=0;n<o.length;n++)if("string"==typeof t[o[n]+i])return!0;return!1}(),IE:!1,semVer:"4.2.6",window:e},n=function(){this.ept=t({}),this.epn=t({}),this.__instancesLatestArr=[],this.__plugins={},this._env=o};function s(t){this.$container,this.constraints=null,this.__$tooltip,this.__init(t)}function r(i,e){var o=!0;return t.each(i,function(t,n){if(void 0===e[t]||i[t]!==e[t])return o=!1,!1}),o}function _(i){var e=i.attr("id"),n=e?o.window.document.getElementById(e):null;return n?n===i[0]:t.contains(o.window.document.body,i[0])}n.prototype={__bridge:function(e,o,n){if(!o[n]){var s=function(){};s.prototype=e;var r=new s;r.__init&&r.__init(o),t.each(e,function(t,e){0!=t.indexOf("__")&&(o[t]?i.debug&&console.log("The "+t+" method of the "+n+" plugin conflicts with another plugin or native methods"):(o[t]=function(){return r[t].apply(r,Array.prototype.slice.apply(arguments))},o[t].bridged=r))}),o[n]=r}return this},__setWindow:function(t){return o.window=t,this},_getRuler:function(t){return new s(t)},_off:function(){return this.ept.off.apply(this.ept,Array.prototype.slice.apply(arguments)),this},_on:function(){return this.ept.on.apply(this.ept,Array.prototype.slice.apply(arguments)),this},_one:function(){return this.ept.one.apply(this.ept,Array.prototype.slice.apply(arguments)),this},_plugin:function(i){if("string"==typeof i){var e=i,o=null;return e.indexOf(".")>0?o=this.__plugins[e]:t.each(this.__plugins,function(t,i){if(i.name.substring(i.name.length-e.length-1)=="."+e)return o=i,!1}),o}if(i.name.indexOf(".")<0)throw new Error("Plugins must be namespaced");return this.__plugins[i.name]=i,i.core&&this.__bridge(i.core,this,i.name),this},_trigger:function(){var t=Array.prototype.slice.apply(arguments);return"string"==typeof t[0]&&(t[0]={type:t[0]}),this.ept.trigger.apply(this.ept,t),this.epn.trigger.apply(this.epn,t),this},instances:function(i){var e=[];return t(i||".cdptipstered").each(function(){var i=t(this),o=i.data("cdptipster-ns");o&&t.each(o,function(t,o){e.push(i.data(o))})}),e},instancesLatest:function(){return this.__instancesLatestArr},off:function(){return this.epn.off.apply(this.epn,Array.prototype.slice.apply(arguments)),this},on:function(){return this.epn.on.apply(this.epn,Array.prototype.slice.apply(arguments)),this},one:function(){return this.epn.one.apply(this.epn,Array.prototype.slice.apply(arguments)),this},origins:function(i){return t((i?i+" ":"")+".cdptipstered").toArray()},setDefaults:function(e){return t.extend(i,e),this},triggerHandler:function(){return this.epn.triggerHandler.apply(this.epn,Array.prototype.slice.apply(arguments)),this}},t.cdptipster=new n,t.Cdptipster=function(i,e){this.__callbacks={close:[],open:[]},this.__closingTime,this.__Content,this.__contentBcr,this.__destroyed=!1,this.ept=t({}),this.epn=t({}),this.__enabled=!0,this.__garbageCollector,this.__Geometry,this.__lastPosition,this.__namespace="cdptipster-"+Math.round(1e6*Math.random()),this.__options,this.__$originParents,this.__pointerIsOverOrigin=!1,this.__previousThemes=[],this.__state="closed",this.__timeouts={close:[],open:null},this.__touchEvents=[],this.__tracker=null,this._$origin,this._$tooltip,this.__init(i,e)},t.Cdptipster.prototype={__init:function(e,n){var s=this;if(s._$origin=t(e),s.__options=t.extend(!0,{},i,n),s.__optionsFormat(),!o.IE||o.IE>=s.__options.IEmin){var r=null;if(void 0===s._$origin.data("cdptipster-initialTitle")&&(void 0===(r=s._$origin.attr("title"))&&(r=null),s._$origin.data("cdptipster-initialTitle",r)),null!==s.__options.content)s.__contentSet(s.__options.content);else{var _,a=s._$origin.attr("data-tooltip-content");a&&(_=t(a)),_&&_[0]?s.__contentSet(_.first()):s.__contentSet(r)}s._$origin.removeAttr("title").addClass("cdptipstered"),s.__prepareOrigin(),s.__prepareGC(),t.each(s.__options.plugins,function(t,i){s._plug(i)}),o.hasTouchCapability&&t(o.window.document.body).on("touchmove."+s.__namespace+"-triggerOpen",function(t){s._touchRecordEvent(t)}),s._on("created",function(){s.__prepareTooltip()})._on("repositioned",function(t){s.__lastPosition=t.position})}else s.__options.disabled=!0},__contentInsert:function(){var t=this._$tooltip.find(".cdptipster-content"),i=this.__Content;return this._trigger({type:"format",content:this.__Content,format:function(t){i=t}}),this.__options.functionFormat&&(i=this.__options.functionFormat.call(this,this,{origin:this._$origin[0]},this.__Content)),"string"!=typeof i||this.__options.contentAsHTML?t.empty().append(i):t.text(i),this},__contentSet:function(i){return i instanceof t&&this.__options.contentCloning&&(i=i.clone(!0)),this.__Content=i,this._trigger({type:"updated",content:i}),this},__destroyError:function(){throw new Error("This tooltip has been destroyed and cannot execute your method call.")},__geometry:function(){var i=this._$origin,e=this._$origin.is("area");if(e){var n=this._$origin.parent().attr("name");i=t('img[usemap="#'+n+'"]')}var s=i[0].getBoundingClientRect(),r=t(o.window.document),_=t(o.window),a=i,p={available:{document:null,window:null},document:{size:{height:r.height(),width:r.width()}},window:{scroll:{left:o.window.scrollX||o.window.document.documentElement.scrollLeft,top:o.window.scrollY||o.window.document.documentElement.scrollTop},size:{height:_.height(),width:_.width()}},origin:{fixedLineage:!1,offset:{},size:{height:s.bottom-s.top,width:s.right-s.left},usemapImage:e?i[0]:null,windowOffset:{bottom:s.bottom,left:s.left,right:s.right,top:s.top}}};if(e){var c=this._$origin.attr("shape"),l=this._$origin.attr("coords");if(l&&(l=l.split(","),t.map(l,function(t,i){l[i]=parseInt(t)})),"default"!=c)switch(c){case"circle":var h=l[0],d=l[1],g=l[2],u=d-g,f=h-g;p.origin.size.height=2*g,p.origin.size.width=p.origin.size.height,p.origin.windowOffset.left+=f,p.origin.windowOffset.top+=u;break;case"rect":var m=l[0],w=l[1],v=l[2],y=l[3];p.origin.size.height=y-w,p.origin.size.width=v-m,p.origin.windowOffset.left+=m,p.origin.windowOffset.top+=w;break;case"poly":for(var b=0,C=0,$=0,O=0,z="even",T=0;T<l.length;T++){var E=l[T];"even"==z?(E>$&&($=E,0===T&&(b=$)),E<b&&(b=E),z="odd"):(E>O&&(O=E,1==T&&(C=O)),E<C&&(C=E),z="even")}p.origin.size.height=O-C,p.origin.size.width=$-b,p.origin.windowOffset.left+=b,p.origin.windowOffset.top+=C}}for(this._trigger({type:"geometry",edit:function(t){p.origin.size.height=t.height,p.origin.windowOffset.left=t.left,p.origin.windowOffset.top=t.top,p.origin.size.width=t.width},geometry:{height:p.origin.size.height,left:p.origin.windowOffset.left,top:p.origin.windowOffset.top,width:p.origin.size.width}}),p.origin.windowOffset.right=p.origin.windowOffset.left+p.origin.size.width,p.origin.windowOffset.bottom=p.origin.windowOffset.top+p.origin.size.height,p.origin.offset.left=p.origin.windowOffset.left+p.window.scroll.left,p.origin.offset.top=p.origin.windowOffset.top+p.window.scroll.top,p.origin.offset.bottom=p.origin.offset.top+p.origin.size.height,p.origin.offset.right=p.origin.offset.left+p.origin.size.width,p.available.document={bottom:{height:p.document.size.height-p.origin.offset.bottom,width:p.document.size.width},left:{height:p.document.size.height,width:p.origin.offset.left},right:{height:p.document.size.height,width:p.document.size.width-p.origin.offset.right},top:{height:p.origin.offset.top,width:p.document.size.width}},p.available.window={bottom:{height:Math.max(p.window.size.height-Math.max(p.origin.windowOffset.bottom,0),0),width:p.window.size.width},left:{height:p.window.size.height,width:Math.max(p.origin.windowOffset.left,0)},right:{height:p.window.size.height,width:Math.max(p.window.size.width-Math.max(p.origin.windowOffset.right,0),0)},top:{height:Math.max(p.origin.windowOffset.top,0),width:p.window.size.width}};"html"!=a[0].tagName.toLowerCase();){if("fixed"==a.css("position")){p.origin.fixedLineage=!0;break}a=a.parent()}return p},__optionsFormat:function(){return"number"==typeof this.__options.animationDuration&&(this.__options.animationDuration=[this.__options.animationDuration,this.__options.animationDuration]),"number"==typeof this.__options.delay&&(this.__options.delay=[this.__options.delay,this.__options.delay]),"number"==typeof this.__options.delayTouch&&(this.__options.delayTouch=[this.__options.delayTouch,this.__options.delayTouch]),"string"==typeof this.__options.theme&&(this.__options.theme=[this.__options.theme]),null===this.__options.parent?this.__options.parent=t(o.window.document.body):"string"==typeof this.__options.parent&&(this.__options.parent=t(this.__options.parent)),"hover"==this.__options.trigger?(this.__options.triggerOpen={mouseenter:!0,touchstart:!0},this.__options.triggerClose={mouseleave:!0,originClick:!0,touchleave:!0}):"click"==this.__options.trigger&&(this.__options.triggerOpen={click:!0,tap:!0},this.__options.triggerClose={click:!0,tap:!0}),this._trigger("options"),this},__prepareGC:function(){var i=this;return i.__options.selfDestruction?i.__garbageCollector=setInterval(function(){var e=(new Date).getTime();i.__touchEvents=t.grep(i.__touchEvents,function(t,i){return e-t.time>6e4}),_(i._$origin)||i.close(function(){i.destroy()})},2e4):clearInterval(i.__garbageCollector),i},__prepareOrigin:function(){var t=this;if(t._$origin.off("."+t.__namespace+"-triggerOpen"),o.hasTouchCapability&&t._$origin.on("touchstart."+t.__namespace+"-triggerOpen touchend."+t.__namespace+"-triggerOpen touchcancel."+t.__namespace+"-triggerOpen",function(i){t._touchRecordEvent(i)}),t.__options.triggerOpen.click||t.__options.triggerOpen.tap&&o.hasTouchCapability){var i="";t.__options.triggerOpen.click&&(i+="click."+t.__namespace+"-triggerOpen "),t.__options.triggerOpen.tap&&o.hasTouchCapability&&(i+="touchend."+t.__namespace+"-triggerOpen"),t._$origin.on(i,function(i){t._touchIsMeaningfulEvent(i)&&t._open(i)})}return(t.__options.triggerOpen.mouseenter||t.__options.triggerOpen.touchstart&&o.hasTouchCapability)&&(i="",t.__options.triggerOpen.mouseenter&&(i+="mouseenter."+t.__namespace+"-triggerOpen "),t.__options.triggerOpen.touchstart&&o.hasTouchCapability&&(i+="touchstart."+t.__namespace+"-triggerOpen"),t._$origin.on(i,function(i){!t._touchIsTouchEvent(i)&&t._touchIsEmulatedEvent(i)||(t.__pointerIsOverOrigin=!0,t._openShortly(i))})),(t.__options.triggerClose.mouseleave||t.__options.triggerClose.touchleave&&o.hasTouchCapability)&&(i="",t.__options.triggerClose.mouseleave&&(i+="mouseleave."+t.__namespace+"-triggerOpen "),t.__options.triggerClose.touchleave&&o.hasTouchCapability&&(i+="touchend."+t.__namespace+"-triggerOpen touchcancel."+t.__namespace+"-triggerOpen"),t._$origin.on(i,function(i){t._touchIsMeaningfulEvent(i)&&(t.__pointerIsOverOrigin=!1)})),t},__prepareTooltip:function(){var i=this,e=i.__options.interactive?"auto":"";return i._$tooltip.attr("id",i.__namespace).css({"pointer-events":e,zIndex:i.__options.zIndex}),t.each(i.__previousThemes,function(t,e){i._$tooltip.removeClass(e)}),t.each(i.__options.theme,function(t,e){i._$tooltip.addClass(e)}),i.__previousThemes=t.merge([],i.__options.theme),i},__scrollHandler:function(i){if(this.__options.triggerClose.scroll)this._close(i);else if(_(this._$origin)&&_(this._$tooltip)){var e=null;if(i.target===o.window.document)this.__Geometry.origin.fixedLineage||this.__options.repositionOnScroll&&this.reposition(i);else{e=this.__geometry();var n=!1;if("fixed"!=this._$origin.css("position")&&this.__$originParents.each(function(i,o){var s=t(o),r=s.css("overflow-x"),_=s.css("overflow-y");if("visible"!=r||"visible"!=_){var a=o.getBoundingClientRect();if("visible"!=r&&(e.origin.windowOffset.left<a.left||e.origin.windowOffset.right>a.right))return n=!0,!1;if("visible"!=_&&(e.origin.windowOffset.top<a.top||e.origin.windowOffset.bottom>a.bottom))return n=!0,!1}if("fixed"==s.css("position"))return!1}),n)this._$tooltip.css("visibility","hidden");else if(this._$tooltip.css("visibility","visible"),this.__options.repositionOnScroll)this.reposition(i);else{var s=e.origin.offset.left-this.__Geometry.origin.offset.left,r=e.origin.offset.top-this.__Geometry.origin.offset.top;this._$tooltip.css({left:this.__lastPosition.coord.left+s,top:this.__lastPosition.coord.top+r})}}this._trigger({type:"scroll",event:i,geo:e})}return this},__stateSet:function(t){return this.__state=t,this._trigger({type:"state",state:t}),this},__timeoutsClear:function(){return clearTimeout(this.__timeouts.open),this.__timeouts.open=null,t.each(this.__timeouts.close,function(t,i){clearTimeout(i)}),this.__timeouts.close=[],this},__trackerStart:function(){var t=this,i=t._$tooltip.find(".cdptipster-content");return t.__options.trackTooltip&&(t.__contentBcr=i[0].getBoundingClientRect()),t.__tracker=setInterval(function(){if(_(t._$origin)&&_(t._$tooltip)){if(t.__options.trackOrigin){var e=t.__geometry(),o=!1;r(e.origin.size,t.__Geometry.origin.size)&&(t.__Geometry.origin.fixedLineage?r(e.origin.windowOffset,t.__Geometry.origin.windowOffset)&&(o=!0):r(e.origin.offset,t.__Geometry.origin.offset)&&(o=!0)),o||(t.__options.triggerClose.mouseleave?t._close():t.reposition())}if(t.__options.trackTooltip){var n=i[0].getBoundingClientRect();n.height===t.__contentBcr.height&&n.width===t.__contentBcr.width||(t.reposition(),t.__contentBcr=n)}}else t._close()},t.__options.trackerInterval),t},_close:function(i,e,n){var s=this,r=!0;if(s._trigger({type:"close",event:i,stop:function(){r=!1}}),r||n){e&&s.__callbacks.close.push(e),s.__callbacks.open=[],s.__timeoutsClear();var _=function(){t.each(s.__callbacks.close,function(t,e){e.call(s,s,{event:i,origin:s._$origin[0]})}),s.__callbacks.close=[]};if("closed"!=s.__state){var a=!0,p=(new Date).getTime()+s.__options.animationDuration[1];if("disappearing"==s.__state&&p>s.__closingTime&&s.__options.animationDuration[1]>0&&(a=!1),a){s.__closingTime=p,"disappearing"!=s.__state&&s.__stateSet("disappearing");var c=function(){clearInterval(s.__tracker),s._trigger({type:"closing",event:i}),s._$tooltip.off("."+s.__namespace+"-triggerClose").removeClass("cdptipster-dying"),t(o.window).off("."+s.__namespace+"-triggerClose"),s.__$originParents.each(function(i,e){t(e).off("scroll."+s.__namespace+"-triggerClose")}),s.__$originParents=null,t(o.window.document.body).off("."+s.__namespace+"-triggerClose"),s._$origin.off("."+s.__namespace+"-triggerClose"),s._off("dismissable"),s.__stateSet("closed"),s._trigger({type:"after",event:i}),s.__options.functionAfter&&s.__options.functionAfter.call(s,s,{event:i,origin:s._$origin[0]}),_()};o.hasTransitions?(s._$tooltip.css({"-moz-animation-duration":s.__options.animationDuration[1]+"ms","-ms-animation-duration":s.__options.animationDuration[1]+"ms","-o-animation-duration":s.__options.animationDuration[1]+"ms","-webkit-animation-duration":s.__options.animationDuration[1]+"ms","animation-duration":s.__options.animationDuration[1]+"ms","transition-duration":s.__options.animationDuration[1]+"ms"}),s._$tooltip.clearQueue().removeClass("cdptipster-show").addClass("cdptipster-dying"),s.__options.animationDuration[1]>0&&s._$tooltip.delay(s.__options.animationDuration[1]),s._$tooltip.queue(c)):s._$tooltip.stop().fadeOut(s.__options.animationDuration[1],c)}}else _()}return s},_off:function(){return this.ept.off.apply(this.ept,Array.prototype.slice.apply(arguments)),this},_on:function(){return this.ept.on.apply(this.ept,Array.prototype.slice.apply(arguments)),this},_one:function(){return this.ept.one.apply(this.ept,Array.prototype.slice.apply(arguments)),this},_open:function(i,e){var n=this;if(!n.__destroying&&_(n._$origin)&&n.__enabled){var s=!0;if("closed"==n.__state&&(n._trigger({type:"before",event:i,stop:function(){s=!1}}),s&&n.__options.functionBefore&&(s=n.__options.functionBefore.call(n,n,{event:i,origin:n._$origin[0]}))),!1!==s&&null!==n.__Content){e&&n.__callbacks.open.push(e),n.__callbacks.close=[],n.__timeoutsClear();var r,a=function(){"stable"!=n.__state&&n.__stateSet("stable"),t.each(n.__callbacks.open,function(t,i){i.call(n,n,{origin:n._$origin[0],tooltip:n._$tooltip[0]})}),n.__callbacks.open=[]};if("closed"!==n.__state)r=3e3,"disappearing"===n.__state?(n.__stateSet("appearing"),o.hasTransitions?(n._$tooltip.clearQueue().removeClass("cdptipster-dying").addClass("cdptipster-show"),n.__options.animationDuration[0]>0&&n._$tooltip.delay(n.__options.animationDuration[0]),n._$tooltip.queue(a)):n._$tooltip.stop().fadeIn(a)):"stable"==n.__state&&a();else{if(n.__stateSet("appearing"),r=n.__options.animationDuration[0],n.__contentInsert(),n.reposition(i,!0),o.hasTransitions?(n._$tooltip.addClass("cdptipster-"+n.__options.animation).addClass("cdptipster-initial").css({"-moz-animation-duration":n.__options.animationDuration[0]+"ms","-ms-animation-duration":n.__options.animationDuration[0]+"ms","-o-animation-duration":n.__options.animationDuration[0]+"ms","-webkit-animation-duration":n.__options.animationDuration[0]+"ms","animation-duration":n.__options.animationDuration[0]+"ms","transition-duration":n.__options.animationDuration[0]+"ms"}),setTimeout(function(){"closed"!=n.__state&&(n._$tooltip.addClass("cdptipster-show").removeClass("cdptipster-initial"),n.__options.animationDuration[0]>0&&n._$tooltip.delay(n.__options.animationDuration[0]),n._$tooltip.queue(a))},0)):n._$tooltip.css("display","none").fadeIn(n.__options.animationDuration[0],a),n.__trackerStart(),t(o.window).on("resize."+n.__namespace+"-triggerClose",function(i){var e=t(document.activeElement);(e.is("input")||e.is("textarea"))&&t.contains(n._$tooltip[0],e[0])||n.reposition(i)}).on("scroll."+n.__namespace+"-triggerClose",function(t){n.__scrollHandler(t)}),n.__$originParents=n._$origin.parents(),n.__$originParents.each(function(i,e){t(e).on("scroll."+n.__namespace+"-triggerClose",function(t){n.__scrollHandler(t)})}),n.__options.triggerClose.mouseleave||n.__options.triggerClose.touchleave&&o.hasTouchCapability){n._on("dismissable",function(t){t.dismissable?t.delay?(h=setTimeout(function(){n._close(t.event)},n.__options.timer+r),n.__timeouts.close.push(h)):n._close(t):clearTimeout(h)});var p=n._$origin,c="",l="",h=null;n.__options.interactive&&(p=p.add(n._$tooltip)),n.__options.triggerClose.mouseleave&&(c+="mouseenter."+n.__namespace+"-triggerClose ",l+="mouseleave."+n.__namespace+"-triggerClose "),n.__options.triggerClose.touchleave&&o.hasTouchCapability&&(c+="touchstart."+n.__namespace+"-triggerClose",l+="touchend."+n.__namespace+"-triggerClose touchcancel."+n.__namespace+"-triggerClose"),p.on(l,function(t){if(n._touchIsTouchEvent(t)||!n._touchIsEmulatedEvent(t)){var i="mouseleave"==t.type?n.__options.delay:n.__options.delayTouch;n._trigger({delay:i[1],dismissable:!0,event:t,type:"dismissable"})}}).on(c,function(t){!n._touchIsTouchEvent(t)&&n._touchIsEmulatedEvent(t)||n._trigger({dismissable:!1,event:t,type:"dismissable"})})}n.__options.triggerClose.originClick&&n._$origin.on("click."+n.__namespace+"-triggerClose",function(t){n._touchIsTouchEvent(t)||n._touchIsEmulatedEvent(t)||n._close(t)}),(n.__options.triggerClose.click||n.__options.triggerClose.tap&&o.hasTouchCapability)&&setTimeout(function(){if("closed"!=n.__state){var i="",e=t(o.window.document.body);n.__options.triggerClose.click&&(i+="click."+n.__namespace+"-triggerClose "),n.__options.triggerClose.tap&&o.hasTouchCapability&&(i+="touchend."+n.__namespace+"-triggerClose"),e.on(i,function(i){n._touchIsMeaningfulEvent(i)&&(n._touchRecordEvent(i),n.__options.interactive&&t.contains(n._$tooltip[0],i.target)||n._close(i))}),n.__options.triggerClose.tap&&o.hasTouchCapability&&e.on("touchstart."+n.__namespace+"-triggerClose",function(t){n._touchRecordEvent(t)})}},0),n._trigger("ready"),n.__options.functionReady&&n.__options.functionReady.call(n,n,{origin:n._$origin[0],tooltip:n._$tooltip[0]})}}}return n},_openShortly:function(t){var i=this,e=!0;if("stable"!=i.__state&&"appearing"!=i.__state&&!i.__timeouts.open&&(i._trigger({type:"start",event:t,stop:function(){e=!1}}),e)){var o=0==t.type.indexOf("touch")?i.__options.delayTouch:i.__options.delay;o[0]?i.__timeouts.open=setTimeout(function(){i.__timeouts.open=null,i.__pointerIsOverOrigin&&i._touchIsMeaningfulEvent(t)?(i._trigger("startend"),i._open(t)):i._trigger("startcancel")},o[0]):(i._trigger("startend"),i._open(t))}return i},_optionsExtract:function(i,e){var o=this,n=t.extend(!0,{},e),s=o.__options[i];return s||(s={},t.each(e,function(t,i){var e=o.__options[t];void 0!==e&&(s[t]=e)})),t.each(n,function(i,e){void 0!==s[i]&&("object"!=typeof e||e instanceof Array||null==e||"object"!=typeof s[i]||s[i]instanceof Array||null==s[i]?n[i]=s[i]:t.extend(n[i],s[i]))}),n},_plug:function(i){var e=t.cdptipster._plugin(i);if(!e)throw new Error('The "'+i+'" plugin is not defined');return e.instance&&t.cdptipster.__bridge(e.instance,this,e.name),this},_touchIsEmulatedEvent:function(t){for(var i=!1,e=(new Date).getTime(),o=this.__touchEvents.length-1;o>=0;o--){var n=this.__touchEvents[o];if(!(e-n.time<500))break;n.target===t.target&&(i=!0)}return i},_touchIsMeaningfulEvent:function(t){return this._touchIsTouchEvent(t)&&!this._touchSwiped(t.target)||!this._touchIsTouchEvent(t)&&!this._touchIsEmulatedEvent(t)},_touchIsTouchEvent:function(t){return 0==t.type.indexOf("touch")},_touchRecordEvent:function(t){return this._touchIsTouchEvent(t)&&(t.time=(new Date).getTime(),this.__touchEvents.push(t)),this},_touchSwiped:function(t){for(var i=!1,e=this.__touchEvents.length-1;e>=0;e--){var o=this.__touchEvents[e];if("touchmove"==o.type){i=!0;break}if("touchstart"==o.type&&t===o.target)break}return i},_trigger:function(){var i=Array.prototype.slice.apply(arguments);return"string"==typeof i[0]&&(i[0]={type:i[0]}),i[0].instance=this,i[0].origin=this._$origin?this._$origin[0]:null,i[0].tooltip=this._$tooltip?this._$tooltip[0]:null,this.ept.trigger.apply(this.ept,i),t.cdptipster._trigger.apply(t.cdptipster,i),this.epn.trigger.apply(this.epn,i),this},_unplug:function(i){var e=this;if(e[i]){var o=t.cdptipster._plugin(i);o.instance&&t.each(o.instance,function(t,o){e[t]&&e[t].bridged===e[i]&&delete e[t]}),e[i].__destroy&&e[i].__destroy(),delete e[i]}return e},close:function(t){return this.__destroyed?this.__destroyError():this._close(null,t),this},content:function(t){var i=this;if(void 0===t)return i.__Content;if(i.__destroyed)i.__destroyError();else if(i.__contentSet(t),null!==i.__Content){if("closed"!==i.__state&&(i.__contentInsert(),i.reposition(),i.__options.updateAnimation))if(o.hasTransitions){var e=i.__options.updateAnimation;i._$tooltip.addClass("cdptipster-update-"+e),setTimeout(function(){"closed"!=i.__state&&i._$tooltip.removeClass("cdptipster-update-"+e)},1e3)}else i._$tooltip.fadeTo(200,.5,function(){"closed"!=i.__state&&i._$tooltip.fadeTo(200,1)})}else i._close();return i},destroy:function(){var i=this;if(i.__destroyed)i.__destroyError();else{"closed"!=i.__state?i.option("animationDuration",0)._close(null,null,!0):i.__timeoutsClear(),i._trigger("destroy"),i.__destroyed=!0,i._$origin.removeData(i.__namespace).off("."+i.__namespace+"-triggerOpen"),t(o.window.document.body).off("."+i.__namespace+"-triggerOpen");var e=i._$origin.data("cdptipster-ns");if(e)if(1===e.length){var n=null;"previous"==i.__options.restoration?n=i._$origin.data("cdptipster-initialTitle"):"current"==i.__options.restoration&&(n="string"==typeof i.__Content?i.__Content:t("<div></div>").append(i.__Content).html()),n&&i._$origin.attr("title",n),i._$origin.removeClass("cdptipstered"),i._$origin.removeData("cdptipster-ns").removeData("cdptipster-initialTitle")}else e=t.grep(e,function(t,e){return t!==i.__namespace}),i._$origin.data("cdptipster-ns",e);i._trigger("destroyed"),i._off(),i.off(),i.__Content=null,i.ept=null,i.epn=null,i.__options.parent=null,i._$origin=null,i._$tooltip=null,t.cdptipster.__instancesLatestArr=t.grep(t.cdptipster.__instancesLatestArr,function(t,e){return i!==t}),clearInterval(i.__garbageCollector)}return i},disable:function(){return this.__destroyed?(this.__destroyError(),this):(this._close(),this.__enabled=!1,this)},elementOrigin:function(){if(!this.__destroyed)return this._$origin[0];this.__destroyError()},elementTooltip:function(){return this._$tooltip?this._$tooltip[0]:null},enable:function(){return this.__enabled=!0,this},hide:function(t){return this.close(t)},instance:function(){return this},off:function(){return this.__destroyed||this.epn.off.apply(this.epn,Array.prototype.slice.apply(arguments)),this},on:function(){return this.__destroyed?this.__destroyError():this.epn.on.apply(this.epn,Array.prototype.slice.apply(arguments)),this},one:function(){return this.__destroyed?this.__destroyError():this.epn.one.apply(this.epn,Array.prototype.slice.apply(arguments)),this},open:function(t){return this.__destroyed?this.__destroyError():this._open(null,t),this},option:function(i,e){return void 0===e?this.__options[i]:(this.__destroyed?this.__destroyError():(this.__options[i]=e,this.__optionsFormat(),t.inArray(i,["trigger","triggerClose","triggerOpen"])>=0&&this.__prepareOrigin(),"selfDestruction"===i&&this.__prepareGC()),this)},reposition:function(t,i){return this.__destroyed?this.__destroyError():"closed"!=this.__state&&_(this._$origin)&&(i||_(this._$tooltip))&&(i||this._$tooltip.detach(),this.__Geometry=this.__geometry(),this._trigger({type:"reposition",event:t,helper:{geo:this.__Geometry}})),this},show:function(t){return this.open(t)},status:function(){return{destroyed:this.__destroyed,enabled:this.__enabled,open:"closed"!==this.__state,state:this.__state}},triggerHandler:function(){return this.__destroyed?this.__destroyError():this.epn.triggerHandler.apply(this.epn,Array.prototype.slice.apply(arguments)),this}},t.fn.cdptipster=function(){var e=Array.prototype.slice.apply(arguments),o="You are using a single HTML element as content for several tooltips. You probably want to set the contentCloning option to TRUE.";if(0===this.length)return this;if("string"==typeof e[0]){var n="#*$~&";return this.each(function(){var i=t(this).data("cdptipster-ns"),s=i?t(this).data(i[0]):null;if(!s)throw new Error("You called Cdptipster's \""+e[0]+'" method on an uninitialized element');if("function"!=typeof s[e[0]])throw new Error('Unknown method "'+e[0]+'"');this.length>1&&"content"==e[0]&&(e[1]instanceof t||"object"==typeof e[1]&&null!=e[1]&&e[1].tagName)&&!s.__options.contentCloning&&s.__options.debug&&console.log(o);var r=s[e[0]](e[1],e[2]);if(r!==s||"instance"===e[0])return n=r,!1}),"#*$~&"!==n?n:this}t.cdptipster.__instancesLatestArr=[];var s=e[0]&&void 0!==e[0].multiple,r=s&&e[0].multiple||!s&&i.multiple,_=e[0]&&void 0!==e[0].content,a=_&&e[0].content||!_&&i.content,p=e[0]&&void 0!==e[0].contentCloning,c=p&&e[0].contentCloning||!p&&i.contentCloning,l=e[0]&&void 0!==e[0].debug,h=l&&e[0].debug||!l&&i.debug;return this.length>1&&(a instanceof t||"object"==typeof a&&null!=a&&a.tagName)&&!c&&h&&console.log(o),this.each(function(){var i=!1,o=t(this),n=o.data("cdptipster-ns"),s=null;n?r?i=!0:h&&(console.log("Cdptipster: one or more tooltips are already attached to the element below. Ignoring."),console.log(this)):i=!0,i&&(s=new t.Cdptipster(this,e[0]),n||(n=[]),n.push(s.__namespace),o.data("cdptipster-ns",n),o.data(s.__namespace,s),s.__options.functionInit&&s.__options.functionInit.call(s,s,{origin:this}),s._trigger("init")),t.cdptipster.__instancesLatestArr.push(s)}),this},s.prototype={__init:function(i){this.__$tooltip=i,this.__$tooltip.css({left:0,overflow:"hidden",position:"absolute",top:0}).find(".cdptipster-content").css("overflow","auto"),this.$container=t('<div class="cdptipster-ruler"></div>').append(this.__$tooltip).appendTo(o.window.document.body)},__forceRedraw:function(){var t=this.__$tooltip.parent();this.__$tooltip.detach(),this.__$tooltip.appendTo(t)},constrain:function(t,i){return this.constraints={width:t,height:i},this.__$tooltip.css({display:"block",height:"",overflow:"auto",width:t}),this},destroy:function(){this.__$tooltip.detach().find(".cdptipster-content").css({display:"",overflow:""}),this.$container.remove()},free:function(){return this.constraints=null,this.__$tooltip.css({display:"",height:"",overflow:"visible",width:""}),this},measure:function(){this.__forceRedraw();var t=this.__$tooltip[0].getBoundingClientRect(),i={size:{height:t.height||t.bottom-t.top,width:t.width||t.right-t.left}};if(this.constraints){var e=this.__$tooltip.find(".cdptipster-content"),n=this.__$tooltip.outerHeight(),s=e[0].getBoundingClientRect(),r={height:n<=this.constraints.height,width:t.width<=this.constraints.width&&s.width>=e[0].scrollWidth-1};i.fits=r.height&&r.width}return o.IE&&o.IE<=11&&i.size.width!==o.window.document.documentElement.clientWidth&&(i.size.width=Math.ceil(i.size.width)+1),i}};var a=navigator.userAgent.toLowerCase();return-1!=a.indexOf("msie")?o.IE=parseInt(a.split("msie")[1]):-1!==a.toLowerCase().indexOf("trident")&&-1!==a.indexOf(" rv:11")?o.IE=11:-1!=a.toLowerCase().indexOf("edge/")&&(o.IE=parseInt(a.toLowerCase().split("edge/")[1])),t.cdptipster._plugin({name:"cdptipster.sideTip",instance:{__defaults:function(){return{arrow:!0,distance:6,functionPosition:null,maxWidth:null,minIntersection:16,minWidth:0,position:null,side:"top",viewportAware:!0}},__init:function(t){var i=this;i.__instance=t,i.__namespace="cdptipster-sideTip-"+Math.round(1e6*Math.random()),i.__previousState="closed",i.__options,i.__optionsFormat(),i.__instance._on("state."+i.__namespace,function(t){"closed"==t.state?i.__close():"appearing"==t.state&&"closed"==i.__previousState&&i.__create(),i.__previousState=t.state}),i.__instance._on("options."+i.__namespace,function(){i.__optionsFormat()}),i.__instance._on("reposition."+i.__namespace,function(t){i.__reposition(t.event,t.helper)})},__close:function(){this.__instance.content()instanceof t&&this.__instance.content().detach(),this.__instance._$tooltip.remove(),this.__instance._$tooltip=null},__create:function(){var i=t('<div class="cdptipster-base cdptipster-sidetip"><div class="cdptipster-box"><div class="cdptipster-content"></div></div><div class="cdptipster-arrow"><div class="cdptipster-arrow-uncropped"><div class="cdptipster-arrow-border"></div><div class="cdptipster-arrow-background"></div></div></div></div>');this.__options.arrow||i.find(".cdptipster-box").css("margin",0).end().find(".cdptipster-arrow").hide(),this.__options.minWidth&&i.css("min-width",this.__options.minWidth+"px"),this.__options.maxWidth&&i.css("max-width",this.__options.maxWidth+"px"),this.__instance._$tooltip=i,this.__instance._trigger("created")},__destroy:function(){this.__instance._off("."+self.__namespace)},__optionsFormat:function(){this.__options=this.__instance._optionsExtract("cdptipster.sideTip",this.__defaults()),this.__options.position&&(this.__options.side=this.__options.position),"object"!=typeof this.__options.distance&&(this.__options.distance=[this.__options.distance]),this.__options.distance.length<4&&(void 0===this.__options.distance[1]&&(this.__options.distance[1]=this.__options.distance[0]),void 0===this.__options.distance[2]&&(this.__options.distance[2]=this.__options.distance[0]),void 0===this.__options.distance[3]&&(this.__options.distance[3]=this.__options.distance[1]),this.__options.distance={top:this.__options.distance[0],right:this.__options.distance[1],bottom:this.__options.distance[2],left:this.__options.distance[3]}),"string"==typeof this.__options.side&&(this.__options.side=[this.__options.side,{top:"bottom",right:"left",bottom:"top",left:"right"}[this.__options.side]],"left"==this.__options.side[0]||"right"==this.__options.side[0]?this.__options.side.push("top","bottom"):this.__options.side.push("right","left")),6===t.cdptipster._env.IE&&!0!==this.__options.arrow&&(this.__options.arrow=!1)},__reposition:function(i,e){var o,n=this,s=n.__targetFind(e),r=[];n.__instance._$tooltip.detach();var _=n.__instance._$tooltip.clone(),a=t.cdptipster._getRuler(_),p=!1,c=n.__instance.option("animation");switch(c&&_.removeClass("cdptipster-"+c),t.each(["window","document"],function(o,c){var l=null;if(n.__instance._trigger({container:c,helper:e,satisfied:p,takeTest:function(t){l=t},results:r,type:"positionTest"}),1==l||0!=l&&0==p&&("window"!=c||n.__options.viewportAware))for(o=0;o<n.__options.side.length;o++){var h={horizontal:0,vertical:0},d=n.__options.side[o];"top"==d||"bottom"==d?h.vertical=n.__options.distance[d]:h.horizontal=n.__options.distance[d],n.__sideChange(_,d),t.each(["natural","constrained"],function(t,o){if(l=null,n.__instance._trigger({container:c,event:i,helper:e,mode:o,results:r,satisfied:p,side:d,takeTest:function(t){l=t},type:"positionTest"}),1==l||0!=l&&0==p){var _={container:c,distance:h,fits:null,mode:o,outerSize:null,side:d,size:null,target:s[d],whole:null},g=("natural"==o?a.free():a.constrain(e.geo.available[c][d].width-h.horizontal,e.geo.available[c][d].height-h.vertical)).measure();if(_.size=g.size,_.outerSize={height:g.size.height+h.vertical,width:g.size.width+h.horizontal},"natural"==o?e.geo.available[c][d].width>=_.outerSize.width&&e.geo.available[c][d].height>=_.outerSize.height?_.fits=!0:_.fits=!1:_.fits=g.fits,"window"==c&&(_.fits?_.whole="top"==d||"bottom"==d?e.geo.origin.windowOffset.right>=n.__options.minIntersection&&e.geo.window.size.width-e.geo.origin.windowOffset.left>=n.__options.minIntersection:e.geo.origin.windowOffset.bottom>=n.__options.minIntersection&&e.geo.window.size.height-e.geo.origin.windowOffset.top>=n.__options.minIntersection:_.whole=!1),r.push(_),_.whole)p=!0;else if("natural"==_.mode&&(_.fits||_.size.width<=e.geo.available[c][d].width))return!1}})}}),n.__instance._trigger({edit:function(t){r=t},event:i,helper:e,results:r,type:"positionTested"}),r.sort(function(t,i){return t.whole&&!i.whole?-1:!t.whole&&i.whole?1:t.whole&&i.whole?(e=n.__options.side.indexOf(t.side))<(o=n.__options.side.indexOf(i.side))?-1:e>o?1:"natural"==t.mode?-1:1:t.fits&&!i.fits?-1:!t.fits&&i.fits?1:t.fits&&i.fits?(e=n.__options.side.indexOf(t.side))<(o=n.__options.side.indexOf(i.side))?-1:e>o?1:"natural"==t.mode?-1:1:"document"==t.container&&"bottom"==t.side&&"natural"==t.mode?-1:1;var e,o}),(o=r[0]).coord={},o.side){case"left":case"right":o.coord.top=Math.floor(o.target-o.size.height/2);break;case"bottom":case"top":o.coord.left=Math.floor(o.target-o.size.width/2)}switch(o.side){case"left":o.coord.left=e.geo.origin.windowOffset.left-o.outerSize.width;break;case"right":o.coord.left=e.geo.origin.windowOffset.right+o.distance.horizontal;break;case"top":o.coord.top=e.geo.origin.windowOffset.top-o.outerSize.height;break;case"bottom":o.coord.top=e.geo.origin.windowOffset.bottom+o.distance.vertical}"window"==o.container?"top"==o.side||"bottom"==o.side?o.coord.left<0?e.geo.origin.windowOffset.right-this.__options.minIntersection>=0?o.coord.left=0:o.coord.left=e.geo.origin.windowOffset.right-this.__options.minIntersection-1:o.coord.left>e.geo.window.size.width-o.size.width&&(e.geo.origin.windowOffset.left+this.__options.minIntersection<=e.geo.window.size.width?o.coord.left=e.geo.window.size.width-o.size.width:o.coord.left=e.geo.origin.windowOffset.left+this.__options.minIntersection+1-o.size.width):o.coord.top<0?e.geo.origin.windowOffset.bottom-this.__options.minIntersection>=0?o.coord.top=0:o.coord.top=e.geo.origin.windowOffset.bottom-this.__options.minIntersection-1:o.coord.top>e.geo.window.size.height-o.size.height&&(e.geo.origin.windowOffset.top+this.__options.minIntersection<=e.geo.window.size.height?o.coord.top=e.geo.window.size.height-o.size.height:o.coord.top=e.geo.origin.windowOffset.top+this.__options.minIntersection+1-o.size.height):(o.coord.left>e.geo.window.size.width-o.size.width&&(o.coord.left=e.geo.window.size.width-o.size.width),o.coord.left<0&&(o.coord.left=0)),n.__sideChange(_,o.side),e.tooltipClone=_[0],e.tooltipParent=n.__instance.option("parent").parent[0],e.mode=o.mode,e.whole=o.whole,e.origin=n.__instance._$origin[0],e.tooltip=n.__instance._$tooltip[0],delete o.container,delete o.fits,delete o.mode,delete o.outerSize,delete o.whole,o.distance=o.distance.horizontal||o.distance.vertical;var l,h,d,g=t.extend(!0,{},o);if(n.__instance._trigger({edit:function(t){o=t},event:i,helper:e,position:g,type:"position"}),n.__options.functionPosition){var u=n.__options.functionPosition.call(n,n.__instance,e,g);u&&(o=u)}a.destroy(),"top"==o.side||"bottom"==o.side?(l={prop:"left",val:o.target-o.coord.left},h=o.size.width-this.__options.minIntersection):(l={prop:"top",val:o.target-o.coord.top},h=o.size.height-this.__options.minIntersection),l.val<this.__options.minIntersection?l.val=this.__options.minIntersection:l.val>h&&(l.val=h),d=e.geo.origin.fixedLineage?e.geo.origin.windowOffset:{left:e.geo.origin.windowOffset.left+e.geo.window.scroll.left,top:e.geo.origin.windowOffset.top+e.geo.window.scroll.top},o.coord={left:d.left+(o.coord.left-e.geo.origin.windowOffset.left),top:d.top+(o.coord.top-e.geo.origin.windowOffset.top)},n.__sideChange(n.__instance._$tooltip,o.side),e.geo.origin.fixedLineage?n.__instance._$tooltip.css("position","fixed"):n.__instance._$tooltip.css("position",""),n.__instance._$tooltip.css({left:o.coord.left,top:o.coord.top,height:o.size.height,width:o.size.width}).find(".cdptipster-arrow").css({left:"",top:""}).css(l.prop,l.val),n.__instance._$tooltip.appendTo(n.__instance.option("parent")),n.__instance._trigger({type:"repositioned",event:i,position:o})},__sideChange:function(t,i){t.removeClass("cdptipster-bottom").removeClass("cdptipster-left").removeClass("cdptipster-right").removeClass("cdptipster-top").addClass("cdptipster-"+i)},__targetFind:function(t){var i={},e=this.__instance._$origin[0].getClientRects();if(e.length>1&&1==this.__instance._$origin.css("opacity")&&(this.__instance._$origin.css("opacity",.99),e=this.__instance._$origin[0].getClientRects(),this.__instance._$origin.css("opacity",1)),e.length<2)i.top=Math.floor(t.geo.origin.windowOffset.left+t.geo.origin.size.width/2),i.bottom=i.top,i.left=Math.floor(t.geo.origin.windowOffset.top+t.geo.origin.size.height/2),i.right=i.left;else{var o=e[0];i.top=Math.floor(o.left+(o.right-o.left)/2),o=e.length>2?e[Math.ceil(e.length/2)-1]:e[0],i.right=Math.floor(o.top+(o.bottom-o.top)/2),o=e[e.length-1],i.bottom=Math.floor(o.left+(o.right-o.left)/2),o=e.length>2?e[Math.ceil((e.length+1)/2)-1]:e[e.length-1],i.left=Math.floor(o.top+(o.bottom-o.top)/2)}return i}}}),t});
Save Changes
Rename File
Rename