!function(a,b){"function"==typeofdefine&&define.amd?define(b):"object"==typeofexports?module.exports=b(require,exports,module):a.Tether=b()}(this,function(){"use strict";functiona(a,b){if(!(ainstanceofb))thrownewTypeError("Cannot call a class as a function")}functionb(a){varb=getComputedStyle(a),c=b.position;if("fixed"===c)returna;for(vard=a;d=d.parentNode;){vare=void0;try{e=getComputedStyle(d)}catch(f){}if("undefined"==typeofe||null===e)returnd;varg=e.overflow,h=e.overflowX,i=e.overflowY;if(/(auto|scroll)/.test(g+i+h)&&("absolute"!==c||["relative","absolute","fixed"].indexOf(e.position)>=0))returnd}returndocument.body}functionc(a){varb=void0;a===document?(b=document,a=document.documentElement):b=a.ownerDocument;varc=b.documentElement,d={},e=a.getBoundingClientRect();for(varfine)d[f]=e[f];varg=v(b);returnd.top-=g.top,d.left-=g.left,"undefined"==typeofd.width&&(d.width=document.body.scrollWidth-d.left-d.right),"undefined"==typeofd.height&&(d.height=document.body.scrollHeight-d.top-d.bottom),d.top=d.top-c.clientTop,d.left=d.left-c.clientLeft,d.right=b.body.clientWidth-d.width-d.left,d.bottom=b.body.clientHeight-d.height-d.top,d}functiond(a){returna.offsetParent||document.documentElement}functione(){vara=document.createElement("div");a.style.width="100%",a.style.height="200px";varb=document.createElement("div");f(b.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),b.appendChild(a),document.body.appendChild(b);varc=a.offsetWidth;b.style.overflow="scroll";vard=a.offsetWidth;c===d&&(d=b.clientWidth),document.body.removeChild(b);vare=c-d;return{width:e,height:e}}functionf(){vara=arguments.length<=0||void0===arguments[0]?{}:arguments[0],b=[];returnArray.prototype.push.apply(b,arguments),b.slice(1).forEach(function(b){if(b)for(varcinb)({}).hasOwnProperty.call(b,c)&&(a[c]=b[c])}),a}functiong(a,b){if("undefined"!=typeofa.classList)b.split("").forEach(function(b){b.trim()&&a.classList.remove(b)});else{varc=newRegExp("(^| )"+b.split("").join("|")+"( |$)","gi"),d=j(a).replace(c,"");k(a,d)}}functionh(a,b){if("undefined"!=typeofa.classList)b.split("").forEach(function(b){b.trim()&&a.classList.add(b)});else{g(a,b);varc=j(a)+(""+b);k(a,c)}}functioni(a,b){if("undefined"!=typeofa.classList)returna.classList.contains(b);varc=j(a);returnnewRegExp("(^| )"+b+"( |$)","gi").test(c)}functionj(a){returna.classNameinstanceofSVGAnimatedString?a.className.baseVal:a.className}functionk(a,b){a.setAttribute("class",b)}functionl(a,b,c){c.forEach(function(c){-1===b.indexOf(c)&&i(a,c)&&g(a,c)}),b.forEach(function(b){i(a,b)||h(a,b)})}functiona(a,b){if(!(ainstanceofb))thrownewTypeError("Cannot call a class as a function")}functionm(a,b){varc=arguments.length<=2||void0===arguments[2]?1:arguments[2];returna+c>=b&&b>=a-c}functionn(){return"undefined"!=typeofperformance&&"undefined"!=typeofperformance.now?performance.now():+newDate}functiono(){for(vara={top:0,left:0},b=arguments.length,c=Array(b),d=0;b>d;d++)c[d]=arguments[d];returnc.forEach(function(b){varc=b.top,d=b.left;"string"==typeofc&&(c=parseFloat(c,10)),"string"==typeofd&&(d=parseFloat(d,10)),a.top+=c,a.left+=d}),a}functionp(a,b){return"string"==typeofa.left&&-1!==a.left.indexOf("%")&&(a.left=parseFloat(a.left,10)/100*b.width),"string"==typeofa.top&&-1!==a.top.indexOf("%")&&(a.top=parseFloat(a.top,10)/100*b.height),a}functionq(a,b){return"scrollParent"===b?b=a.scrollParent:"window"===b&&(b=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),b===document&&(b=b.documentElement),"undefined"!=typeofb.nodeType&&!function(){vara=c(b),d=a,e=getComputedStyle(b);b=[d.left,d.top,a.width+d.left,a.height+d.top],O.forEach(function(a,c){a=a[0].toUpperCase()+a.substr(1),"Top"===a||"Left"===a?b[c]+=parseFloat(e["border"+a+"Width"]):b[c]-=parseFloat(e["border"+a+"Width"])})}(),b}varr=function(){functiona(a,b){for(varc=0;c<b.length;c++){vard=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"ind&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}returnfunction(b,c,d){returnc&&a(b.prototype,c),d&&a(b,d),b}}(),s=void0;"undefined"==typeofs&&(s={modules:[]});vart=function(){vara=0;returnfunction(){return++a}}(),u={},v=function(a){varb=a._tetherZeroElement;"undefined"==typeofb&&(b=a.createElement("div"),b.setAttribute("data-tether-id",t()),f(b.style,{top:0,left:0,position:"absolute"}),a.body.appendChild(b),a._tetherZeroElement=b);varc=b.getAttribute("data-tether-id");if("undefined"==typeofu[c]){u[c]={};vard=b.getBoundingClientRect();for(vareind)u[c][e]=d[e];x(function(){deleteu[c]})}returnu[c]},w=[],x=function(a){w.push(a)},y=function(){for(vara=void0;a=w.pop();)a()},z=function(){functionb(){a(this,b)}returnr(b,[{key:"on",value:function(a,b,c){vard=arguments.length<=3||void0===arguments[3]?!1:arguments[3];"undefined"==typeofthis.bindings&&(this.bindings={}),"undefined"==typeofthis.bindings[a]&&(this.bindings[a]=[]),this.bindings[a].push({handler:b,ctx:c,once:d})}},{key:"once",value:function(a,b,c){this.on(a,b,c,!0)}},{key:"off",value:function(a,b){if("undefined"==typeofthis.bindings||"undefined"==typeofthis.bindings[a])if("undefined"==typeofb)deletethis.bindings[a];elsefor(varc=0;c<this.bindings[a].length;)this.bindings[a][c].handler===b?this.bindings[a].splice(c,1):++c}},{key:"trigger",value:function(a){if("undefined"!=typeofthis.bindings&&this.bindings[a])for(varb=0;b<this.bindings[a].length;){varc=this.bindings[a][b],d=c.handler,e=c.ctx,f=c.once,g=e;"undefined"==typeofg&&(g=this);for(varh=arguments.length,i=Array(h>1?h-1:0),j=1;h>j;j++)i[j-1]=arguments[j];d.apply(g,i),f?this.bindings[a].splice(b,1):++b}}}]),b}();s.Utils={getScrollParent:b,getBounds:c,getOffsetParent:d,extend:f,addClass:h,removeClass:g,hasClass:i,updateClasses:l,defer:x,flush:y,uniqueId:t,Evented:z,getScrollBarSize:e};varA=function(){functiona(a,b){varc=[],d=!0,e=!1,f=void0;try{for(varg,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throwf}}returnc}returnfunction(b,c){if(Array.isArray(b))returnb;if(Symbol.iteratorinObject(b))returna(b,c);thrownewTypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(){functiona(a,b){for(varc=0;c<b.length;c++){vard=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"ind&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}returnfunction(b,c,d){returnc&&a(b.prototype,c),d&&a(b,d),b}}();if("undefined"==typeofs)thrownewError("You must include the utils.js file before tether.js");varB=s.Utils,b=B.getScrollParent,c=B.getBounds,d=B.getOffsetParent,f=B.extend,h=B.addClass,g=B.removeClass,l=B.updateClasses,x=B.defer,y=B.flush,e=B.getScrollBarSize,C=function(){for(vara=document.createElement("div"),b=["transform","webkitTransform","OTransform","MozTransform","msTransform"],c=0;c<b.length;++c){vard=b[c];if(void0!==a.style[d])returnd}}(),D=[],E=function(){D.forEach(function(a){a.position(!1)}),y()};!function(){vara=null,b=null,c=null,d=functione(){return"undefined"!=typeofb&&b>16?(b=Math.min(b-16,250),void(c=setTimeout(e,250))):void("undefined"!=typeofa&&n()-a<10||("undefined"!=typeofc&&(clearTimeout(c),c=null),a=n(),E(),b=n()-a))};["resize","scroll","touchmove"].forEach(function(a){window.addEventListener(a,d)})}();varF={center:"center",left:"right",right:"left"},G={middle:"middle",top:"bottom",bottom:"top"},H={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},I=function(a,b){varc=a.left,d=a.top;return"auto"===c&&(c=F[b.left]),"auto"===d&&(d=G[b.top]),{left:c,top:d}},J=function(a){varb=a.left,c=a.top;return"undefined"!=typeofH[a.left]&&(b=H[a.left]),"undefined"!=typeofH[a.top]&&(c=H[a.top]),{left:b,top:c}},K=function(a){varb=a.split(""),c=A(b,2),d=c[0],e=c[1];return{top:d,left:e}},L=K,M=function(){functioni(b){varc=this;a(this,i),this.position=this.position.bind(this),D.push(this),this.history=[],this.setOptions(b,!1),s.modules.forEach(function(a){"undefined"!=typeofa.initialize&&a.initialize.call(c)}),this.position()}returnr(i,[{key:"getClass",value:function(){vara=arguments.length<=0||void0===arguments[0]?"":arguments[0],b=this.options.classes;return"undefined"!=typeofb&&b[a]?this.options.classes[a]:this.options.classPrefix?this.options.classPrefix+"-"+a:a}},{key:"setOptions",value:function(a){varc=this,d=arguments.length<=1||void0===arguments[1]?!0:arguments[1],e={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"};this.options=f(e,a);varg=this.options,i=g.element,j=g.target,k=g.targetModifier;if(this.element=i,this.target=j,this.targetModifier=k,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),["element","target"].forEach(function(a){if("undefined"==typeofc[a])thrownewError("Tether Error: Both element and target must be defined");"undefined"!=typeofc[a].jquery?c[a]=c[a][0]:"string"==typeofc[a]&&(c[a]=document.querySelector(c[a]))}),h(this.element,this.getClass("element")),this.options.addTargetClasses!==!1&&h(this.target,this.getClass("target")),!this.options.attachment)thrownewError("Tether Error: You must provide an attachment");this.targetAttachment=L(this.options.targetAttachment),this.attachment=L(this.options.attachment),this.offset=K(this.options.offset),this.targetOffset=K(this.options.targetOffset),"undefined"!=typeofthis.scrollParent&&this.disable(),this.scrollParent="scroll-handle"===this.targetModifier?this.target:b(this.target),this.options.enabled!==!1&&this.enable(d)}},{key:"getTargetBounds",value:function(){if("undefined"==typeofthis.targetModifier)returnc(this.target);if("visible"===this.targetModifier){if(this.target===document.body)return{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth};vara=c(this.target),b={height:a.height,width:a.width,top:a.top,left:a.left};returnb.height=Math.min(b.height,a.height-(pageYOffset-a.top)),b.height=Math.min(b.height,a.height-(a.top+a.height-(pageYOffset+innerHeight))),b.height=Math.min(innerHeight,b.height),b.height-=2,b.width=Math.min(b.width,a.width-(pageXOffset-a.left)),b.width=Math.min(b.width,a.width-(a.left+a.width-(pageXOffset+innerWidth))),b.width=Math.min(innerWidth,b.width),b.width-=2,b.top<pageYOffset&&(b.top=pageYOffset),b.left<pageXOffset&&(b.left=pageXOffset),b}if("scroll-handle"===this.targetModifier){vara=void0,d=this.target;d===document.body?(d=document.documentElement,a={left:pageXOffset,top:pageYOffset,height:innerHeight,width:innerWidth}):a=c(d);vare=getComputedStyle(d),f=d.scrollWidth>d.clientWidth||[e.overflow,e.overflowX].indexOf("scroll")>=0||this.target!==document.body,g=0;f&&(g=15);varh=a.height-parseFloat(e.borderTopWidth)-parseFloat(e.borderBottomWidth)-g,b={width:15,height:.975*h*(h/d.scrollHeight),left:a.left+a.width-parseFloat(e.borderLeftWidth)-15},i=0;408>h&&this.target===document.body&&(i=-11e-5*Math.pow(h,2)-.00727*h+22.58),this.target!==document.body&&(b.height=Math.max(b.height,24));varj=this.target.scrollTop/(d.scrollHeight-h);returnb.top=j*(h-b.height-i)+a.top+parseFloat(e.borderTopWidth),this.target===document.body&&(b.height=Math.max(b.height,24)),b}}},{key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(a,b){return"undefined"==typeofthis._cache&&(this._cache={}),"undefined"==typeofthis._cache[a]&&(this._cache[a]=b.call(this)),this._cache[a]}},{key:"enable",value:function(){vara=arguments.length<=0||void0===arguments[0]?!0:arguments[0];this.options.addTargetClasses!==!1&&h(this.target,this.getClass("enabled")),h(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParent!==document&&this.scrollParent.addEventListener("scroll",this.position),a&&this.position()}},{key:"disable",value:function(){g(this.target,this.getClass("enabled")),g(this.element,this.getClass("enabled")),this.enabled=!1,"undefined"!=typeofthis.scrollParent&&this.scrollParent.removeEventListener("scroll",this.position)}},{key:"destroy",value:function(){vara=this;this.disable(),D.forEach(function(b,c){returnb===a?voidD.splice(c,1):void0})}},{key:"updateAttachClasses",value:function(a,b){varc=this;a=a||this.attachment,b=b||this.targetAttachment;vard=["left","top","bottom","right","middle","center"];"undefined"!=typeofthis._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),"undefined"==typeofthis._addAttachClasses&&(this._addAttachClasses=[]);vare=this._addAttachClasses;a.top&&e.push(this.getClass("element-attached")+"-"+a.top),a.left&&e.push(this.getClass("element-attached")+"-"+a.left),b.top&&e.push(this.getClass("target-attached")+"-"+b.top),b.left&&e.push(this.getClass("target-attached")+"-"+b.left);varf=[];d.forEach(function(a){f.push(c.getClass("element-attached")+"-"+a),f.push(c.getClass("target-attached")+"-"+a)}),x(function(){"undefined"!=typeofc._addAttachClasses&&(l(c.element,c._addAttachClasses,f),c.options.addTargetClasses!==!1&&l(c.target,c._addAttachClasses,f),deletec._addAttachClasses)})}},{key:"position",value:function(){vara=this,b=arguments.length<=0||void0===arguments[0]?!0:arguments[0];if(this.enabled){this.clearCache();varf=I(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,f);varg=this.cache("element-bounds",function(){returnc(a.element)}),h=g.width,i=g.height;if(0===h&&0===i&&"undefined"!=typeofthis.lastSize){varj=this.lastSize;h=j.width,i=j.height}elsethis.lastSize={width:h,height:i};vark=this.cache("target-bounds",function(){returna.getTargetBounds()}),l=k,m=p(J(this.attachment),{width:h,height:i}),n=p(J(f),l),q=p(this.offset,{width:h,height:i}),r=p(this.targetOffset,l);m=o(m,q),n=o(n,r);for(vart=k.left+n.left-m.left,u=k.top+n.top-m.top,v=0;v<s.modules.length;++v){varw=s.modules[v],x=w.position.call(this,{left:t,top:u,targetAttachment:f,targetPos:k,elementPos:g,offset:m,targetOffset:n,manualOffset:q,manualTargetOffset:r,scrollbarSize:A,attachment:this.attachment});if(x===!1)return!1;"undefined"!=typeofx&&"object"==typeofx&&(u=x.top,t=x.left)}varz={page:{top:u,left:t},viewport:{top:u-pageYOffset,bottom:pageYOffset-u-i+innerHeight,left:t-pageXOffset,right:pageXOffset-t-h+innerWidth}},A=void0;returndocument.body.scrollWidth>window.innerWidth&&(A=this.cache("scrollbar-size",e),z.viewport.bottom-=A.height),document.body.scrollHeight>window.innerHeight&&(A=this.cache("scrollbar-size",e),z.viewport.right-=A.width),(-1===["","static"].indexOf(document.body.style.position)||-1===["","static"].indexOf(document.body.parentElement.style.position))&&(z.page.bottom=document.body.scrollHeight-u-i,z.page.right=document.body.scrollWidth-t-h),"undefined"!=typeofthis.options.optimizations&&this.options.optimizations.moveElement!==!1&&"undefined"==typeofthis.targetModifier&&!function(){varb=a.cache("target-offsetparent",function(){returnd(a.target)}),e=a.cache("target-offsetparent-bounds",function(){returnc(b)}),f=getComputedStyle(b),g=e,h={};if(["Top","Left","Bottom","Right"].forEach(function(a){h[a.toLowerCase()]=parseFloat(f["border"+a+"Width"])}),e.right=document.body.scrollWidth-e.left-g.width+h.right,e.bottom=document.body.scrollHeight-e.top-g.height+h.bottom,z.page.top>=e.top+h.top&&z.page.bottom>=e.bottom&&z.page.left>=e.left+h.left&&z.page.right>=e.right){vari=b.scrollTop,j=b.scrollLeft;z.offset={top:z.page.top-e.top+i-h.top,left:z.page.left-e.left+j-h.left}}}(),this.move(z),this.history.unshift(z),this.history.length>3&&this.history.pop(),b&&y(),!0}}},{key:"move",value:function(a){varb=this;if("undefined"!=typeofthis.element.parentNode){varc={};for(vareina){c[e]={};for(vargina[e]){for(varh=!1,i=0;i<this.history.length;++i){varj=this.history[i];if("undefined"!=typeofj[e]&&!m(j[e][g],a[e][g])){h=!0;break}}h||(c[e][g]=!0)}}vark={top:"",left:"",right:"",bottom:""},l=function(a,c){vard="undefined"!=typeofb.options.optimizations,e=d?b.options.optimizations.gpu:null;if(e!==!1){varf=void0,g=void0;a.top?(k.top=0,f=c.top):(k.bottom=0,f=-c.bottom),a.left?(k.left=0,g=c.left):(k.right=0,g=-c.right),k[C]="translateX("+Math.round(g)+"px) translateY("+Math.round(f)+"px)","msTransform"!==C&&(k[C]+=" translateZ(0)")}elsea.top?k.top=c.top+"px":k.bottom=c.bottom+"px",a.left?k.left=c.left+"px":k.right=c.right+"px"},n=!1;if((c.page.top||c.page.bottom)&&(c.page.left||c.page.right)?(k.position="absolute",l(c.page,a.page)):(c.viewport.top||c.viewport.bottom)&&(c.viewport.left||c.viewport.right)?(k.position="fixed",l(c.viewport,a.viewport)):"undefined"!=typeofc.offset&&c.offset.top&&c.offset.left?!function(){k.position="absolute";vare=b.cache("target-offsetparent",function(){returnd(b.target)});d(b.element)!==e&&x(function(){b.element.parentNode.removeChild(b.element),e.appendChild(b.element)}),l(c.offset,a.offset),n=!0}():(k.position="absolute",l({top:!0,left:!0},a.page)),!n){for(varo=!0,p=this.element.parentNode;p&&"BODY"!==p.tagName;){if("static"!==getComputedStyle(p).position){o=!1;break}p=p.parentNode}o||(this.element.parentNode.removeChild(this.element),document.body.appendChild(this.element))}varq={},r=!1;for(vargink){vars=k[g],t=this.element.style[g];""!==t&&""!==s&&["top","left","bottom","right"].indexOf(g)>=0&&(t=parseFloat(t),s=parseFloat(s)),t!==s&&(r=!0,q[g]=s)}r&&x(function(){f(b.element.style,q)})}}}]),i}();M.modules=[],s.position=E;varN=f(M,s),A=function(){functiona(a,b){varc=[],d=!0,e=!1,f=void0;try{for(varg,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throwf}}returnc}returnfunction(b,c){if(Array.isArray(b))returnb;if(Symbol.iteratorinObject(b))returna(b,c);thrownewTypeError("Invalid attempt to destructure non-iterable instance")}}(),B=s.Utils,c=B.getBounds,f=B.extend,l=B.updateClasses,x=B.defer,O=["left","top","right","bottom"];s.modules.push({position:function(a){varb=this,d=a.top,e=a.left,g=a.targetAttachment;if(!this.options.constraints)return!0;varh=this.cache("element-bounds",function(){returnc(b.element)}),i=h.height,j=h.width;if(0===j&&0===i&&"undefined"!=typeofthis.lastSize){vark=this.lastSize;j=k.width,i=k.height}varm=this.cache("target-bounds",function(){returnb.getTargetBounds()}),n=m.height,o=m.width,p=[this.getClass("pinned"),this.getClass("out-of-bounds")];this.options.constraints.forEach(function(a){varb=a.outOfBoundsClass,c=a.pinnedClass;b&&p.push(b),c&&p.push(c)}),p.forEach(function(a){["left","top","right","bottom"].forEach(function(b){p.push(a+"-"+b)})});varr=[],s=f({},g),t=f({},this.attachment);returnthis.options.constraints.forEach(function(a){varc=a.to,f=a.attachment,h=a.pin;"undefined"==typeoff&&(f="");vark=void0,l=void0;if(f.indexOf("")>=0){varm=f.split(""),p=A(m,2);l=p[0],k=p[1]}elsek=l=f;varu=q(b,c);("target"===l||"both"===l)&&(d<u[1]&&"top"===s.top&&(d+=n,s.top="bottom"),d+i>u[3]&&"bottom"===s.top&&(d-=n,s.top="top")),"together"===l&&(d<u[1]&&"top"===s.top&&("bottom"===t.top?(d+=n,s.top="bottom",d+=i,t.top="top"):"top"===t.top&&(d+=n,s.top="bottom",d-=i,t.top="bottom")),d+i>u[3]&&"bottom"===s.top&&("top"===t.top?(d-=n,s.top="top",d-=i,t.top="bottom"):"bottom"===t.top&&(d-=n,s.top="top",d+=i,t.top="top")),"middle"===s.top&&(d+i>u[3]&&"top"===t.top?(d-=i,t.top="bottom"):d<u[1]&&"bottom"===t.top&&(d+=i,t.top="top"))),("target"===k||"both"===k)&&(e<u[0]&&"left"===s.left&&(e+=o,s.left="right"),e+j>u[2]&&"right"===s.left&&(e-=o,s.left="left")),"together"===k&&(e<u[0]&&"left"===s.left?"right"===t.left?(e+=o,s.left="right",e+=j,t.left="left"):"left"===t.left&&(e+=o,s.left="right",e-=j,t.left="right"):e+j>u[2]&&"right"===s.left?"left"===t.left?(e-=o,s.left="left",e-=j,t.left="right"):"right"===t.left&&(e-=o,s.left="left",e+=j,t.left="left"):"center"===s.left&&(e+j>u[2]&&"left"===t.left?(e-=j,t.left="right"):e<u[0]&&"right"===t.left&&(e+=j,t.left="left"))),("element"===l||"both"===l)&&(d<u[1]&&"bottom"===t.top&&(d+=i,t.top="top"),d+i>u[3]&&"top"===t.top&&(d-=i,t.top="bottom")),("element"===k||"both"===k)&&(e<u[0]&&"right"===t.left&&(e+=j,t.left="left"),e+j>u[2]&&"left"===t.left&&(e-=j,t.left="right")),"string"==typeofh?h=h.split(",").map(function(a){returna.trim()}):h===!0&&(h=["top","left","right","bottom"]),h=h||[];varv=[],w=[];d<u[1]&&(h.indexOf("top")>=0?(d=u[1],v.push("top")):w.push("top")),d+i>u[3]&&(h.indexOf("bottom")>=0?(d=u[3]-i,v.push("bottom")):w.push("bottom")),e<u[0]&&(h.indexOf("left")>=0?(e=u[0],v.push("left")):w.push("left")),e+j>u[2]&&(h.indexOf("right")>=0?(e=u[2]-j,v.push("right")):w.push("right")),v.length&&!function(){vara=void0;a="undefined"!=typeofb.options.pinnedClass?b.options.pinnedClass:b.getClass("pinned"),r.push(a),v.forEach(function(b){r.push(a+"-"+b)})}(),w.length&&!function(){vara=void0;a="undefined"!=typeofb.options.outOfBoundsClass?b.options.outOfBoundsClass:b.getClass("out-of-bounds"),r.push(a),w.forEach(function(b){r.push(a+"-"+b)})}(),(v.indexOf("left")>=0||v.indexOf("right")>=0)&&(t.left=s.left=!1),(v.indexOf("top")>=0||v.indexOf("bottom")>=0)&&(t.top=s.top=!1),(s.top!==g.top||s.left!==g.left||t.top!==b.attachment.top||t.left!==b.attachment.left)&&b.updateAttachClasses(t,s)}),x(function(){b.options.addTargetClasses!==!1&&l(b.target,r,p),l(b.element,r,p)}),{top:d,left:e}}});varB=s.Utils,c=B.getBounds,l=B.updateClasses,x=B.defer;s.modules.push({position:function(a){varb=this,d=a.top,e=a.left,f=this.cache("element-bounds",function(){returnc(b.element)}),g=f.height,h=f.width,i=this.getTargetBounds(),j=d+g,k=e+h,m=[];d<=i.bottom&&j>=i.top&&["left","right"].forEach(function(a){varb=i[a];(b===e||b===k)&&m.push(a)}),e<=i.right&&k>=i.left&&["top","bottom"].forEach(function(a){varb=i[a];(b===d||b===j)&&m.push(a)});varn=[],o=[],p=["left","top","right","bottom"];returnn.push(this.getClass("abutted")),p.forEach(function(a){n.push(b.getClass("abutted")+"-"+a)}),m.length&&o.push(this.getClass("abutted")),m.forEach(function(a){o.push(b.getClass("abutted")+"-"+a)}),x(function(){b.options.addTargetClasses!==!1&&l(b.target,o,n),l(b.element,o,n)}),!0}});varA=function(){functiona(a,b){varc=[],d=!0,e=!1,f=void0;try{for(varg,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throwf}}returnc}returnfunction(b,c){if(Array.isArray(b))returnb;if(Symbol.iteratorinObject(b))returna(b,c);thrownewTypeError("Invalid attempt to destructure non-iterable instance")}}();returns.modules.push({position:function(a){varb=a.top,c=a.left;if(this.options.shift){vard=this.options.shift;"function"==typeofthis.options.shift&&(d=this.options.shift.call(this,{top:b,left:c}));vare=void0,f=void0;if("string"==typeofd){d=d.split(""),d[1]=d[1]||d[0];varg=A(d,2);e=g[0],f=g[1],e=parseFloat(e,10),f=parseFloat(f,10)}elsee=d.top,f=d.left;returnb+=e,c+=f,{top:b,left:c}}}}),N});
\ No newline at end of file
!function(a,b){"function"==typeofdefine&&define.amd?define(b):"object"==typeofexports?module.exports=b(require,exports,module):a.Tether=b()}(this,function(){"use strict";functiona(a,b){if(!(ainstanceofb))thrownewTypeError("Cannot call a class as a function")}functionb(a){varb=getComputedStyle(a),c=b.position;if("fixed"===c)returna;for(vard=a;d=d.parentNode;){vare=void0;try{e=getComputedStyle(d)}catch(f){}if("undefined"==typeofe||null===e)returnd;varg=e.overflow,h=e.overflowX,i=e.overflowY;if(/(auto|scroll)/.test(g+i+h)&&("absolute"!==c||["relative","absolute","fixed"].indexOf(e.position)>=0))returnd}returndocument.body}functionc(a){varb=void0;a===document?(b=document,a=document.documentElement):b=a.ownerDocument;varc=b.documentElement,d={},e=a.getBoundingClientRect();for(varfine)d[f]=e[f];varg=v(b);returnd.top-=g.top,d.left-=g.left,"undefined"==typeofd.width&&(d.width=document.body.scrollWidth-d.left-d.right),"undefined"==typeofd.height&&(d.height=document.body.scrollHeight-d.top-d.bottom),d.top=d.top-c.clientTop,d.left=d.left-c.clientLeft,d.right=b.body.clientWidth-d.width-d.left,d.bottom=b.body.clientHeight-d.height-d.top,d}functiond(a){returna.offsetParent||document.documentElement}functione(){vara=document.createElement("div");a.style.width="100%",a.style.height="200px";varb=document.createElement("div");f(b.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),b.appendChild(a),document.body.appendChild(b);varc=a.offsetWidth;b.style.overflow="scroll";vard=a.offsetWidth;c===d&&(d=b.clientWidth),document.body.removeChild(b);vare=c-d;return{width:e,height:e}}functionf(){vara=arguments.length<=0||void0===arguments[0]?{}:arguments[0],b=[];returnArray.prototype.push.apply(b,arguments),b.slice(1).forEach(function(b){if(b)for(varcinb)({}).hasOwnProperty.call(b,c)&&(a[c]=b[c])}),a}functiong(a,b){if("undefined"!=typeofa.classList)b.split("").forEach(function(b){b.trim()&&a.classList.remove(b)});else{varc=newRegExp("(^| )"+b.split("").join("|")+"( |$)","gi"),d=j(a).replace(c,"");k(a,d)}}functionh(a,b){if("undefined"!=typeofa.classList)b.split("").forEach(function(b){b.trim()&&a.classList.add(b)});else{g(a,b);varc=j(a)+(""+b);k(a,c)}}functioni(a,b){if("undefined"!=typeofa.classList)returna.classList.contains(b);varc=j(a);returnnewRegExp("(^| )"+b+"( |$)","gi").test(c)}functionj(a){returna.classNameinstanceofSVGAnimatedString?a.className.baseVal:a.className}functionk(a,b){a.setAttribute("class",b)}functionl(a,b,c){c.forEach(function(c){-1===b.indexOf(c)&&i(a,c)&&g(a,c)}),b.forEach(function(b){i(a,b)||h(a,b)})}functiona(a,b){if(!(ainstanceofb))thrownewTypeError("Cannot call a class as a function")}functionm(a,b){varc=arguments.length<=2||void0===arguments[2]?1:arguments[2];returna+c>=b&&b>=a-c}functionn(){return"undefined"!=typeofperformance&&"undefined"!=typeofperformance.now?performance.now():+newDate}functiono(){for(vara={top:0,left:0},b=arguments.length,c=Array(b),d=0;b>d;d++)c[d]=arguments[d];returnc.forEach(function(b){varc=b.top,d=b.left;"string"==typeofc&&(c=parseFloat(c,10)),"string"==typeofd&&(d=parseFloat(d,10)),a.top+=c,a.left+=d}),a}functionp(a,b){return"string"==typeofa.left&&-1!==a.left.indexOf("%")&&(a.left=parseFloat(a.left,10)/100*b.width),"string"==typeofa.top&&-1!==a.top.indexOf("%")&&(a.top=parseFloat(a.top,10)/100*b.height),a}functionq(a,b){return"scrollParent"===b?b=a.scrollParent:"window"===b&&(b=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),b===document&&(b=b.documentElement),"undefined"!=typeofb.nodeType&&!function(){vara=c(b),d=a,e=getComputedStyle(b);b=[d.left,d.top,a.width+d.left,a.height+d.top],O.forEach(function(a,c){a=a[0].toUpperCase()+a.substr(1),"Top"===a||"Left"===a?b[c]+=parseFloat(e["border"+a+"Width"]):b[c]-=parseFloat(e["border"+a+"Width"])})}(),b}varr=function(){functiona(a,b){for(varc=0;c<b.length;c++){vard=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"ind&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}returnfunction(b,c,d){returnc&&a(b.prototype,c),d&&a(b,d),b}}(),s=void0;"undefined"==typeofs&&(s={modules:[]});vart=function(){vara=0;returnfunction(){return++a}}(),u={},v=function(a){varb=a._tetherZeroElement;"undefined"==typeofb&&(b=a.createElement("div"),b.setAttribute("data-tether-id",t()),f(b.style,{top:0,left:0,position:"absolute"}),a.body.appendChild(b),a._tetherZeroElement=b);varc=b.getAttribute("data-tether-id");if("undefined"==typeofu[c]){u[c]={};vard=b.getBoundingClientRect();for(vareind)u[c][e]=d[e];x(function(){deleteu[c]})}returnu[c]},w=[],x=function(a){w.push(a)},y=function(){for(vara=void0;a=w.pop();)a()},z=function(){functionb(){a(this,b)}returnr(b,[{key:"on",value:function(a,b,c){vard=arguments.length<=3||void0===arguments[3]?!1:arguments[3];"undefined"==typeofthis.bindings&&(this.bindings={}),"undefined"==typeofthis.bindings[a]&&(this.bindings[a]=[]),this.bindings[a].push({handler:b,ctx:c,once:d})}},{key:"once",value:function(a,b,c){this.on(a,b,c,!0)}},{key:"off",value:function(a,b){if("undefined"==typeofthis.bindings||"undefined"==typeofthis.bindings[a])if("undefined"==typeofb)deletethis.bindings[a];elsefor(varc=0;c<this.bindings[a].length;)this.bindings[a][c].handler===b?this.bindings[a].splice(c,1):++c}},{key:"trigger",value:function(a){if("undefined"!=typeofthis.bindings&&this.bindings[a])for(varb=0;b<this.bindings[a].length;){varc=this.bindings[a][b],d=c.handler,e=c.ctx,f=c.once,g=e;"undefined"==typeofg&&(g=this);for(varh=arguments.length,i=Array(h>1?h-1:0),j=1;h>j;j++)i[j-1]=arguments[j];d.apply(g,i),f?this.bindings[a].splice(b,1):++b}}}]),b}();s.Utils={getScrollParent:b,getBounds:c,getOffsetParent:d,extend:f,addClass:h,removeClass:g,hasClass:i,updateClasses:l,defer:x,flush:y,uniqueId:t,Evented:z,getScrollBarSize:e};varA=function(){functiona(a,b){varc=[],d=!0,e=!1,f=void0;try{for(varg,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throwf}}returnc}returnfunction(b,c){if(Array.isArray(b))returnb;if(Symbol.iteratorinObject(b))returna(b,c);thrownewTypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(){functiona(a,b){for(varc=0;c<b.length;c++){vard=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"ind&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}returnfunction(b,c,d){returnc&&a(b.prototype,c),d&&a(b,d),b}}();if("undefined"==typeofs)thrownewError("You must include the utils.js file before tether.js");varB=s.Utils,b=B.getScrollParent,c=B.getBounds,d=B.getOffsetParent,f=B.extend,h=B.addClass,g=B.removeClass,l=B.updateClasses,x=B.defer,y=B.flush,e=B.getScrollBarSize,C=function(){for(vara=document.createElement("div"),b=["transform","webkitTransform","OTransform","MozTransform","msTransform"],c=0;c<b.length;++c){vard=b[c];if(void0!==a.style[d])returnd}}(),D=[],E=function(){D.forEach(function(a){a.position(!1)}),y()};!function(){vara=null,b=null,c=null,d=functione(){return"undefined"!=typeofb&&b>16?(b=Math.min(b-16,250),void(c=setTimeout(e,250))):void("undefined"!=typeofa&&n()-a<10||("undefined"!=typeofc&&(clearTimeout(c),c=null),a=n(),E(),b=n()-a))};["resize","scroll","touchmove"].forEach(function(a){window.addEventListener(a,d)})}();varF={center:"center",left:"right",right:"left"},G={middle:"middle",top:"bottom",bottom:"top"},H={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},I=function(a,b){varc=a.left,d=a.top;return"auto"===c&&(c=F[b.left]),"auto"===d&&(d=G[b.top]),{left:c,top:d}},J=function(a){varb=a.left,c=a.top;return"undefined"!=typeofH[a.left]&&(b=H[a.left]),"undefined"!=typeofH[a.top]&&(c=H[a.top]),{left:b,top:c}},K=function(a){varb=a.split(""),c=A(b,2),d=c[0],e=c[1];return{top:d,left:e}},L=K,M=function(){functioni(b){varc=this;a(this,i),this.position=this.position.bind(this),D.push(this),this.history=[],this.setOptions(b,!1),s.modules.forEach(function(a){"undefined"!=typeofa.initialize&&a.initialize.call(c)}),this.position()}returnr(i,[{key:"getClass",value:function(){vara=arguments.length<=0||void0===arguments[0]?"":arguments[0],b=this.options.classes;return"undefined"!=typeofb&&b[a]?this.options.classes[a]:this.options.classPrefix?this.options.classPrefix+"-"+a:a}},{key:"setOptions",value:function(a){varc=this,d=arguments.length<=1||void0===arguments[1]?!0:arguments[1],e={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"};this.options=f(e,a);varg=this.options,i=g.element,j=g.target,k=g.targetModifier;if(this.element=i,this.target=j,this.targetModifier=k,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),["element","target"].forEach(function(a){if("undefined"==typeofc[a])thrownewError("Tether Error: Both element and target must be defined");"undefined"!=typeofc[a].jquery?c[a]=c[a][0]:"string"==typeofc[a]&&(c[a]=document.querySelector(c[a]))}),h(this.element,this.getClass("element")),this.options.addTargetClasses!==!1&&h(this.target,this.getClass("target")),!this.options.attachment)thrownewError("Tether Error: You must provide an attachment");this.targetAttachment=L(this.options.targetAttachment),this.attachment=L(this.options.attachment),this.offset=K(this.options.offset),this.targetOffset=K(this.options.targetOffset),"undefined"!=typeofthis.scrollParent&&this.disable(),this.scrollParent="scroll-handle"===this.targetModifier?this.target:b(this.target),this.options.enabled!==!1&&this.enable(d)}},{key:"getTargetBounds",value:function(){if("undefined"==typeofthis.targetModifier)returnc(this.target);if("visible"===this.targetModifier){if(this.target===document.body)return{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth};vara=c(this.target),b={height:a.height,width:a.width,top:a.top,left:a.left};returnb.height=Math.min(b.height,a.height-(pageYOffset-a.top)),b.height=Math.min(b.height,a.height-(a.top+a.height-(pageYOffset+innerHeight))),b.height=Math.min(innerHeight,b.height),b.height-=2,b.width=Math.min(b.width,a.width-(pageXOffset-a.left)),b.width=Math.min(b.width,a.width-(a.left+a.width-(pageXOffset+innerWidth))),b.width=Math.min(innerWidth,b.width),b.width-=2,b.top<pageYOffset&&(b.top=pageYOffset),b.left<pageXOffset&&(b.left=pageXOffset),b}if("scroll-handle"===this.targetModifier){vara=void0,d=this.target;d===document.body?(d=document.documentElement,a={left:pageXOffset,top:pageYOffset,height:innerHeight,width:innerWidth}):a=c(d);vare=getComputedStyle(d),f=d.scrollWidth>d.clientWidth||[e.overflow,e.overflowX].indexOf("scroll")>=0||this.target!==document.body,g=0;f&&(g=15);varh=a.height-parseFloat(e.borderTopWidth)-parseFloat(e.borderBottomWidth)-g,b={width:15,height:.975*h*(h/d.scrollHeight),left:a.left+a.width-parseFloat(e.borderLeftWidth)-15},i=0;408>h&&this.target===document.body&&(i=-11e-5*Math.pow(h,2)-.00727*h+22.58),this.target!==document.body&&(b.height=Math.max(b.height,24));varj=this.target.scrollTop/(d.scrollHeight-h);returnb.top=j*(h-b.height-i)+a.top+parseFloat(e.borderTopWidth),this.target===document.body&&(b.height=Math.max(b.height,24)),b}}},{key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(a,b){return"undefined"==typeofthis._cache&&(this._cache={}),"undefined"==typeofthis._cache[a]&&(this._cache[a]=b.call(this)),this._cache[a]}},{key:"enable",value:function(){vara=arguments.length<=0||void0===arguments[0]?!0:arguments[0];this.options.addTargetClasses!==!1&&h(this.target,this.getClass("enabled")),h(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParent!==document&&this.scrollParent.addEventListener("scroll",this.position),a&&this.position()}},{key:"disable",value:function(){g(this.target,this.getClass("enabled")),g(this.element,this.getClass("enabled")),this.enabled=!1,"undefined"!=typeofthis.scrollParent&&this.scrollParent.removeEventListener("scroll",this.position)}},{key:"destroy",value:function(){vara=this;this.disable(),D.forEach(function(b,c){returnb===a?voidD.splice(c,1):void0})}},{key:"updateAttachClasses",value:function(a,b){varc=this;a=a||this.attachment,b=b||this.targetAttachment;vard=["left","top","bottom","right","middle","center"];"undefined"!=typeofthis._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),"undefined"==typeofthis._addAttachClasses&&(this._addAttachClasses=[]);vare=this._addAttachClasses;a.top&&e.push(this.getClass("element-attached")+"-"+a.top),a.left&&e.push(this.getClass("element-attached")+"-"+a.left),b.top&&e.push(this.getClass("target-attached")+"-"+b.top),b.left&&e.push(this.getClass("target-attached")+"-"+b.left);varf=[];d.forEach(function(a){f.push(c.getClass("element-attached")+"-"+a),f.push(c.getClass("target-attached")+"-"+a)}),x(function(){"undefined"!=typeofc._addAttachClasses&&(l(c.element,c._addAttachClasses,f),c.options.addTargetClasses!==!1&&l(c.target,c._addAttachClasses,f),deletec._addAttachClasses)})}},{key:"position",value:function(){vara=this,b=arguments.length<=0||void0===arguments[0]?!0:arguments[0];if(this.enabled){this.clearCache();varf=I(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,f);varg=this.cache("element-bounds",function(){returnc(a.element)}),h=g.width,i=g.height;if(0===h&&0===i&&"undefined"!=typeofthis.lastSize){varj=this.lastSize;h=j.width,i=j.height}elsethis.lastSize={width:h,height:i};vark=this.cache("target-bounds",function(){returna.getTargetBounds()}),l=k,m=p(J(this.attachment),{width:h,height:i}),n=p(J(f),l),q=p(this.offset,{width:h,height:i}),r=p(this.targetOffset,l);m=o(m,q),n=o(n,r);for(vart=k.left+n.left-m.left,u=k.top+n.top-m.top,v=0;v<s.modules.length;++v){varw=s.modules[v],x=w.position.call(this,{left:t,top:u,targetAttachment:f,targetPos:k,elementPos:g,offset:m,targetOffset:n,manualOffset:q,manualTargetOffset:r,scrollbarSize:A,attachment:this.attachment});if(x===!1)return!1;"undefined"!=typeofx&&"object"==typeofx&&(u=x.top,t=x.left)}varz={page:{top:u,left:t},viewport:{top:u-pageYOffset,bottom:pageYOffset-u-i+innerHeight,left:t-pageXOffset,right:pageXOffset-t-h+innerWidth}},A=void0;returndocument.body.scrollWidth>window.innerWidth&&(A=this.cache("scrollbar-size",e),z.viewport.bottom-=A.height),document.body.scrollHeight>window.innerHeight&&(A=this.cache("scrollbar-size",e),z.viewport.right-=A.width),(-1===["","static"].indexOf(document.body.style.position)||-1===["","static"].indexOf(document.body.parentElement.style.position))&&(z.page.bottom=document.body.scrollHeight-u-i,z.page.right=document.body.scrollWidth-t-h),"undefined"!=typeofthis.options.optimizations&&this.options.optimizations.moveElement!==!1&&"undefined"==typeofthis.targetModifier&&!function(){varb=a.cache("target-offsetparent",function(){returnd(a.target)}),e=a.cache("target-offsetparent-bounds",function(){returnc(b)}),f=getComputedStyle(b),g=e,h={};if(["Top","Left","Bottom","Right"].forEach(function(a){h[a.toLowerCase()]=parseFloat(f["border"+a+"Width"])}),e.right=document.body.scrollWidth-e.left-g.width+h.right,e.bottom=document.body.scrollHeight-e.top-g.height+h.bottom,z.page.top>=e.top+h.top&&z.page.bottom>=e.bottom&&z.page.left>=e.left+h.left&&z.page.right>=e.right){vari=b.scrollTop,j=b.scrollLeft;z.offset={top:z.page.top-e.top+i-h.top,left:z.page.left-e.left+j-h.left}}}(),this.move(z),this.history.unshift(z),this.history.length>3&&this.history.pop(),b&&y(),!0}}},{key:"move",value:function(a){varb=this;if("undefined"!=typeofthis.element.parentNode){varc={};for(vareina){c[e]={};for(vargina[e]){for(varh=!1,i=0;i<this.history.length;++i){varj=this.history[i];if("undefined"!=typeofj[e]&&!m(j[e][g],a[e][g])){h=!0;break}}h||(c[e][g]=!0)}}vark={top:"",left:"",right:"",bottom:""},l=function(a,c){vard="undefined"!=typeofb.options.optimizations,e=d?b.options.optimizations.gpu:null;if(e!==!1){varf=void0,g=void0;a.top?(k.top=0,f=c.top):(k.bottom=0,f=-c.bottom),a.left?(k.left=0,g=c.left):(k.right=0,g=-c.right),k[C]="translateX("+Math.round(g)+"px) translateY("+Math.round(f)+"px)","msTransform"!==C&&(k[C]+=" translateZ(0)")}elsea.top?k.top=c.top+"px":k.bottom=c.bottom+"px",a.left?k.left=c.left+"px":k.right=c.right+"px"},n=!1;if((c.page.top||c.page.bottom)&&(c.page.left||c.page.right)?(k.position="absolute",l(c.page,a.page)):(c.viewport.top||c.viewport.bottom)&&(c.viewport.left||c.viewport.right)?(k.position="fixed",l(c.viewport,a.viewport)):"undefined"!=typeofc.offset&&c.offset.top&&c.offset.left?!function(){k.position="absolute";vare=b.cache("target-offsetparent",function(){returnd(b.target)});d(b.element)!==e&&x(function(){b.element.parentNode.removeChild(b.element),e.appendChild(b.element)}),l(c.offset,a.offset),n=!0}():(k.position="absolute",l({top:!0,left:!0},a.page)),!n){for(varo=!0,p=this.element.parentNode;p&&"BODY"!==p.tagName;){if("static"!==getComputedStyle(p).position){o=!1;break}p=p.parentNode}o||(this.element.parentNode.removeChild(this.element),document.body.appendChild(this.element))}varq={},r=!1;for(vargink){vars=k[g],t=this.element.style[g];""!==t&&""!==s&&["top","left","bottom","right"].indexOf(g)>=0&&(t=parseFloat(t),s=parseFloat(s)),t!==s&&(r=!0,q[g]=s)}r&&x(function(){f(b.element.style,q)})}}}]),i}();M.modules=[],s.position=E;varN=f(M,s),A=function(){functiona(a,b){varc=[],d=!0,e=!1,f=void0;try{for(varg,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throwf}}returnc}returnfunction(b,c){if(Array.isArray(b))returnb;if(Symbol.iteratorinObject(b))returna(b,c);thrownewTypeError("Invalid attempt to destructure non-iterable instance")}}(),B=s.Utils,c=B.getBounds,f=B.extend,l=B.updateClasses,x=B.defer,O=["left","top","right","bottom"];s.modules.push({position:function(a){varb=this,d=a.top,e=a.left,g=a.targetAttachment;if(!this.options.constraints)return!0;varh=this.cache("element-bounds",function(){returnc(b.element)}),i=h.height,j=h.width;if(0===j&&0===i&&"undefined"!=typeofthis.lastSize){vark=this.lastSize;j=k.width,i=k.height}varm=this.cache("target-bounds",function(){returnb.getTargetBounds()}),n=m.height,o=m.width,p=[this.getClass("pinned"),this.getClass("out-of-bounds")];this.options.constraints.forEach(function(a){varb=a.outOfBoundsClass,c=a.pinnedClass;b&&p.push(b),c&&p.push(c)}),p.forEach(function(a){["left","top","right","bottom"].forEach(function(b){p.push(a+"-"+b)})});varr=[],s=f({},g),t=f({},this.attachment);returnthis.options.constraints.forEach(function(a){varc=a.to,f=a.attachment,h=a.pin;"undefined"==typeoff&&(f="");vark=void0,l=void0;if(f.indexOf("")>=0){varm=f.split(""),p=A(m,2);l=p[0],k=p[1]}elsek=l=f;varu=q(b,c);("target"===l||"both"===l)&&(d<u[1]&&"top"===s.top&&(d+=n,s.top="bottom"),d+i>u[3]&&"bottom"===s.top&&(d-=n,s.top="top")),"together"===l&&(d<u[1]&&"top"===s.top&&("bottom"===t.top?(d+=n,s.top="bottom",d+=i,t.top="top"):"top"===t.top&&(d+=n,s.top="bottom",d-=i,t.top="bottom")),d+i>u[3]&&"bottom"===s.top&&("top"===t.top?(d-=n,s.top="top",d-=i,t.top="bottom"):"bottom"===t.top&&(d-=n,s.top="top",d+=i,t.top="top")),"middle"===s.top&&(d+i>u[3]&&"top"===t.top?(d-=i,t.top="bottom"):d<u[1]&&"bottom"===t.top&&(d+=i,t.top="top"))),("target"===k||"both"===k)&&(e<u[0]&&"left"===s.left&&(e+=o,s.left="right"),e+j>u[2]&&"right"===s.left&&(e-=o,s.left="left")),"together"===k&&(e<u[0]&&"left"===s.left?"right"===t.left?(e+=o,s.left="right",e+=j,t.left="left"):"left"===t.left&&(e+=o,s.left="right",e-=j,t.left="right"):e+j>u[2]&&"right"===s.left?"left"===t.left?(e-=o,s.left="left",e-=j,t.left="right"):"right"===t.left&&(e-=o,s.left="left",e+=j,t.left="left"):"center"===s.left&&(e+j>u[2]&&"left"===t.left?(e-=j,t.left="right"):e<u[0]&&"right"===t.left&&(e+=j,t.left="left"))),("element"===l||"both"===l)&&(d<u[1]&&"bottom"===t.top&&(d+=i,t.top="top"),d+i>u[3]&&"top"===t.top&&(d-=i,t.top="bottom")),("element"===k||"both"===k)&&(e<u[0]&&"right"===t.left&&(e+=j,t.left="left"),e+j>u[2]&&"left"===t.left&&(e-=j,t.left="right")),"string"==typeofh?h=h.split(",").map(function(a){returna.trim()}):h===!0&&(h=["top","left","right","bottom"]),h=h||[];varv=[],w=[];d<u[1]&&(h.indexOf("top")>=0?(d=u[1],v.push("top")):w.push("top")),d+i>u[3]&&(h.indexOf("bottom")>=0?(d=u[3]-i,v.push("bottom")):w.push("bottom")),e<u[0]&&(h.indexOf("left")>=0?(e=u[0],v.push("left")):w.push("left")),e+j>u[2]&&(h.indexOf("right")>=0?(e=u[2]-j,v.push("right")):w.push("right")),v.length&&!function(){vara=void0;a="undefined"!=typeofb.options.pinnedClass?b.options.pinnedClass:b.getClass("pinned"),r.push(a),v.forEach(function(b){r.push(a+"-"+b)})}(),w.length&&!function(){vara=void0;a="undefined"!=typeofb.options.outOfBoundsClass?b.options.outOfBoundsClass:b.getClass("out-of-bounds"),r.push(a),w.forEach(function(b){r.push(a+"-"+b)})}(),(v.indexOf("left")>=0||v.indexOf("right")>=0)&&(t.left=s.left=!1),(v.indexOf("top")>=0||v.indexOf("bottom")>=0)&&(t.top=s.top=!1),(s.top!==g.top||s.left!==g.left||t.top!==b.attachment.top||t.left!==b.attachment.left)&&b.updateAttachClasses(t,s)}),x(function(){b.options.addTargetClasses!==!1&&l(b.target,r,p),l(b.element,r,p)}),{top:d,left:e}}});varB=s.Utils,c=B.getBounds,l=B.updateClasses,x=B.defer;s.modules.push({position:function(a){varb=this,d=a.top,e=a.left,f=this.cache("element-bounds",function(){returnc(b.element)}),g=f.height,h=f.width,i=this.getTargetBounds(),j=d+g,k=e+h,m=[];d<=i.bottom&&j>=i.top&&["left","right"].forEach(function(a){varb=i[a];(b===e||b===k)&&m.push(a)}),e<=i.right&&k>=i.left&&["top","bottom"].forEach(function(a){varb=i[a];(b===d||b===j)&&m.push(a)});varn=[],o=[],p=["left","top","right","bottom"];returnn.push(this.getClass("abutted")),p.forEach(function(a){n.push(b.getClass("abutted")+"-"+a)}),m.length&&o.push(this.getClass("abutted")),m.forEach(function(a){o.push(b.getClass("abutted")+"-"+a)}),x(function(){b.options.addTargetClasses!==!1&&l(b.target,o,n),l(b.element,o,n)}),!0}});varA=function(){functiona(a,b){varc=[],d=!0,e=!1,f=void0;try{for(varg,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throwf}}returnc}returnfunction(b,c){if(Array.isArray(b))returnb;if(Symbol.iteratorinObject(b))returna(b,c);thrownewTypeError("Invalid attempt to destructure non-iterable instance")}}();returns.modules.push({position:function(a){varb=a.top,c=a.left;if(this.options.shift){vard=this.options.shift;"function"==typeofthis.options.shift&&(d=this.options.shift.call(this,{top:b,left:c}));vare=void0,f=void0;if("string"==typeofd){d=d.split(""),d[1]=d[1]||d[0];varg=A(d,2);e=g[0],f=g[1],e=parseFloat(e,10),f=parseFloat(f,10)}elsee=d.top,f=d.left;returnb+=e,c+=f,{top:b,left:c}}}}),N}),/*!
* JavaScript for Bootstrap's docs (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Licensed under the Creative Commons Attribution 3.0 Unported License. For
* details, see https://creativecommons.org/licenses/by/3.0/.
*/
!function(a){"use strict";a(function(){a(".tooltip-demo").tooltip({selector:'[data-toggle="tooltip"]',container:"body"}),a('[data-toggle="popover"]').popover(),a(".tooltip-test").tooltip(),a(".popover-test").popover(),ZeroClipboard.config({moviePath:"/assets/flash/ZeroClipboard.swf",hoverClass:"btn-clipboard-hover"}),a(".highlight").each(function(){varb='<div class="zero-clipboard"><span class="btn-clipboard">Copy</span></div>';a(this).before(b)});varb=newZeroClipboard(a(".btn-clipboard")),c=a("#global-zeroclipboard-html-bridge");b.on("load",function(){c.data("placement","top").attr("title","Copy to clipboard").tooltip(),b.on("dataRequested",function(b){varc=a(this).parent().nextAll(".highlight").first();b.setText(c.text())}),b.on("complete",function(){c.attr("title","Copied!").tooltip("fixTitle").tooltip("show").attr("title","Copy to clipboard").tooltip("fixTitle")})}),b.on("noflash wrongflash",function(){a(".zero-clipboard").remove(),ZeroClipboard.destroy()})})}(jQuery);