((t,e)=>{"object"==typeof exports&&"object"==typeof module?module.exports=e(require("./foundation.core"),require("jquery"),require("./foundation.util.mediaQuery"),require("./foundation.util.motion"),require("./foundation.util.box")):"function"==typeof define&&define.amd?define(["./foundation.core","jquery","./foundation.util.mediaQuery","./foundation.util.motion","./foundation.util.box"],e):"object"==typeof exports?exports.__FOUNDATION_EXTERNAL__=e(require("./foundation.core"),require("jquery"),require("./foundation.util.mediaQuery"),require("./foundation.util.motion"),require("./foundation.util.box")):(t.__FOUNDATION_EXTERNAL__=t.__FOUNDATION_EXTERNAL__||{},t.__FOUNDATION_EXTERNAL__["foundation.tooltip"]=e(t.__FOUNDATION_EXTERNAL__["foundation.core"],t.jQuery,t.__FOUNDATION_EXTERNAL__["foundation.util.mediaQuery"],t.__FOUNDATION_EXTERNAL__["foundation.util.motion"],t.__FOUNDATION_EXTERNAL__["foundation.util.box"]))})(self,function(e,i,o,n,r){return a={"./js/foundation.positionable.js":function(t,e,i){i.r(e),i.d(e,{Positionable:function(){return o}});var s=i("./foundation.util.box"),n=i("./foundation.core");function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var i=0;i(t=((t,e)=>{if("object"!=r(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0===i)return("string"===e?String:Number)(t);if("object"!=r(i=i.call(t,e||"default")))return i;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==r(t)?t:t+""))(o.key),o)}}function l(t,e,i){e=f(e);var o=t,e=u()?Reflect.construct(e,i||[],f(t).constructor):e.apply(t,i);if(!e||"object"!=r(e)&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=o))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function u(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(u=function(){return!!t})()}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var p=["left","right","top","bottom"],e=["top","bottom","center"],i=["left","right","center"],d={left:e,right:e,top:i,bottom:i};function g(t,e){t=e.indexOf(t);return t===e.length-1?e[0]:e[t+1]}var o=(t=>{function i(){var t=this,e=i;if(t instanceof e)return l(this,i,arguments);throw new TypeError("Cannot call a class as a function")}var e,o=i;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return o.prototype=Object.create(t&&t.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),t&&c(o,t),o=i,(t=[{key:"_init",value:function(){this.triedPositions={},this.position="auto"===this.options.position?this._getDefaultPosition():this.options.position,this.alignment="auto"===this.options.alignment?this._getDefaultAlignment():this.options.alignment,this.originalPosition=this.position,this.originalAlignment=this.alignment}},{key:"_getDefaultPosition",value:function(){return"bottom"}},{key:"_getDefaultAlignment",value:function(){switch(this.position){case"bottom":case"top":return(0,n.rtl)()?"right":"left";case"left":case"right":return"bottom"}}},{key:"_reposition",value:function(){this._alignmentsExhausted(this.position)?(this.position=g(this.position,p),this.alignment=d[this.position][0]):this._realign()}},{key:"_realign",value:function(){this._addTriedPosition(this.position,this.alignment),this.alignment=g(this.alignment,d[this.position])}},{key:"_addTriedPosition",value:function(t,e){this.triedPositions[t]=this.triedPositions[t]||[],this.triedPositions[t].push(e)}},{key:"_positionsExhausted",value:function(){for(var t=!0,e=0;e(t=((t,e)=>{if("object"!=l(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0===i)return("string"===e?String:Number)(t);if("object"!=l(i=i.call(t,e||"default")))return i;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string"),"symbol"==l(t)?t:t+""))(o.key),o)}}function f(t,e,i){e=g(e);var o=t,e=c()?Reflect.construct(e,i||[],g(t).constructor):e.apply(t,i);if(!e||"object"!=l(e)&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=o))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}function p(t,e,i,o){var n=d(g(1&o?t.prototype:t),e,i);return 2&o&&"function"==typeof n?function(t){return n.apply(i,t)}:n}function d(){return(d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,i){var o=((t,e)=>{for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=g(t)););return t})(t,e);if(o)return(o=Object.getOwnPropertyDescriptor(o,e)).get?o.get.call(arguments.length<3?t:i):o.value}).apply(null,arguments)}function g(t){return(g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function h(t,e){return(h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var o=(t=>{function i(){var t=this,e=i;if(t instanceof e)return f(this,i,arguments);throw new TypeError("Cannot call a class as a function")}var e,o=i;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");return o.prototype=Object.create(t&&t.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),t&&h(o,t),o=i,(t=[{key:"_setup",value:function(t,e){this.$element=t,this.options=n().extend({},i.defaults,this.$element.data(),e),this.className="Tooltip",this.isActive=!1,this.isClick=!1,a.Triggers.init(n()),this._init()}},{key:"_init",value:function(){s.MediaQuery._init();var t=this.$element.attr("aria-describedby")||(0,r.GetYoDigits)(6,"tooltip");this.options.tipText=this.options.tipText||this.$element.attr("title"),this.template=this.options.template?n()(this.options.template):this._buildTemplate(t),(this.options.allowHtml?this.template.appendTo(document.body).html(this.options.tipText):this.template.appendTo(document.body).text(this.options.tipText)).hide(),this.$element.attr({title:"","aria-describedby":t,"data-yeti-box":t,"data-toggle":t,"data-resize":t}).addClass(this.options.triggerClass),p(i,"_init",this,3)([]),this._events()}},{key:"_getDefaultPosition",value:function(){var t=this.$element[0].className,t=(t=this.$element[0]instanceof SVGElement?t.baseVal:t).match(/\b(top|left|right|bottom)\b/g);return t?t[0]:"top"}},{key:"_getDefaultAlignment",value:function(){return"center"}},{key:"_getHOffset",value:function(){return"left"===this.position||"right"===this.position?this.options.hOffset+this.options.tooltipWidth:this.options.hOffset}},{key:"_getVOffset",value:function(){return"top"===this.position||"bottom"===this.position?this.options.vOffset+this.options.tooltipHeight:this.options.vOffset}},{key:"_buildTemplate",value:function(t){var e="".concat(this.options.tooltipClass," ").concat(this.options.templateClasses).trim();return n()("
").addClass(e).attr({role:"tooltip","aria-hidden":!0,"data-is-active":!1,"data-is-focus":!1,id:t})}},{key:"_setPosition",value:function(){p(i,"_setPosition",this,3)([this.$element,this.template])}},{key:"show",value:function(){if("all"!==this.options.showOn&&!s.MediaQuery.is(this.options.showOn))return!1;this.template.css("visibility","hidden").show(),this._setPosition(),this.template.removeClass("top bottom left right").addClass(this.position),this.template.removeClass("align-top align-bottom align-left align-right align-center").addClass("align-"+this.alignment),this.$element.trigger("closeme.zf.tooltip",this.template.attr("id")),this.template.attr({"data-is-active":!0,"aria-hidden":!1}),this.isActive=!0,this.template.stop().hide().css("visibility","").fadeIn(this.options.fadeInDuration,function(){}),this.$element.trigger("show.zf.tooltip")}},{key:"hide",value:function(){var t=this;this.template.stop().attr({"aria-hidden":!0,"data-is-active":!1}).fadeOut(this.options.fadeOutDuration,function(){t.isActive=!1,t.isClick=!1}),this.$element.trigger("hide.zf.tooltip")}},{key:"_events",value:function(){var t=this,e="ontouchstart"in window||void 0!==window.ontouchstart,i=!1;e&&this.options.disableForTouch||(this.options.disableHover||this.$element.on("mouseenter.zf.tooltip",function(){t.isActive||(t.timeout=setTimeout(function(){t.show()},t.options.hoverDelay))}).on("mouseleave.zf.tooltip",(0,r.ignoreMousedisappear)(function(){clearTimeout(t.timeout),i&&(!t.isClick||t.options.clickOpen)||t.hide()})),e&&this.$element.on("tap.zf.tooltip touchend.zf.tooltip",function(){t.isActive?t.hide():t.show()}),this.options.clickOpen?this.$element.on("mousedown.zf.tooltip",function(){t.isClick||(t.isClick=!0,!t.options.disableHover&&t.$element.attr("tabindex"))||t.isActive||t.show()}):this.$element.on("mousedown.zf.tooltip",function(){t.isClick=!0}),this.$element.on({"close.zf.trigger":this.hide.bind(this)}),this.$element.on("focus.zf.tooltip",function(){if(i=!0,t.isClick)return t.options.clickOpen||(i=!1),!1;t.show()}).on("focusout.zf.tooltip",function(){i=!1,t.isClick=!1,t.hide()}).on("resizeme.zf.trigger",function(){t.isActive&&t._setPosition()}))}},{key:"toggle",value:function(){this.isActive?this.hide():this.show()}},{key:"_destroy",value:function(){this.$element.attr("title",this.template.text()).off(".zf.trigger .zf.tooltip").removeClass(this.options.triggerClass).removeClass("top right left bottom").removeAttr("aria-describedby data-disable-hover data-resize data-toggle data-tooltip data-yeti-box"),this.template.remove()}}])&&u(o.prototype,t),e&&u(o,e),Object.defineProperty(o,"prototype",{writable:!1}),o})(i("./js/foundation.positionable.js").Positionable);o.defaults={hoverDelay:200,fadeInDuration:150,fadeOutDuration:150,disableHover:!1,disableForTouch:!1,templateClasses:"",tooltipClass:"tooltip",triggerClass:"has-tip",showOn:"small",template:"",tipText:"",touchCloseText:"Tap to close.",clickOpen:!0,position:"auto",alignment:"auto",allowOverlap:!1,allowBottomOverlap:!1,vOffset:0,hOffset:0,tooltipHeight:14,tooltipWidth:12,allowHtml:!1}},"./js/foundation.util.triggers.js":function(t,e,i){i.r(e),i.d(e,{Triggers:function(){return u}});var e=i("jquery"),r=i.n(e),o=i("./foundation.core"),n=i("./foundation.util.motion");function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(e,i){e.data(i).split(" ").forEach(function(t){r()("#".concat(t))["close"===i?"trigger":"triggerHandler"]("".concat(i,".zf.trigger"),[e])})}var l=(()=>{for(var t=["WebKit","Moz","O","Ms",""],e=0;e