48 merge requests!28721Hot test,!27561Adds font-weight-medium to font weight classes,!26437merge,!26197V4 dev xmr,!20778V4 dev,!20539Allow multiple modals,!18047#17986,!18988Blockquote border width,!20854Fixes 15534,!19272V4 dev xmr grunt html,!17218Issue 17066,!19581V4 fix popover,!18283Tether docs fix,!17229Include documentation for .navbar-static-top,!20493V4 dev display,!20636Fix docs for heading sizes,!19824blockquote-center,!22547Finished a new translation for bootstrap,!19534Docs 17264,!19533Npm deps,!22143Fix selectable disabled toggle radio buttons,!19084V4 rhythm,!18085Ie9 click comment,!22598test,!18829Add prefix to carousel classes,!18581Check getting started files for broken links - Issue 18568,!18067replace grunt-autoprefixer with gruntpostcss + autoprefixer,!20099V4.0.0 alpha.3,!20438V4 grid classes,!17307Vertical alignment on Bootstrap columns with equal height,!18477add utility color-contrast function,!18864Feature/navbar toggler support color schemes,!19602V4 palettes arun,!18311V4 dev xmr,!19448New pull request for testing,!19358XXL grid size,!19825.blockquote-center,!17508Fix usage of “its” and “it’s” (v4 docs),!25326Adjust examples,!23995Add back cursor: pointer for .btn-link,!23178Spinner,!19754Issue template,!19753Card img overlay padding,!19747Blockquote border width,!19580ExitStars,!18684Docs: change "Button" to "Go somewhere",!18661Docs: accessibility fix-up of collapsible content navbar, change site-wide main navbar,!17021v4
!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);
!function(t,e){"function"==typeofdefine&&define.amd?define(e):"object"==typeofexports?module.exports=e(require,exports,module):t.Tether=e()}(this,function(t,e,o){"use strict";functioni(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}functionn(t){vare=getComputedStyle(t),o=e.position;if("fixed"===o)returnt;for(vari=t;i=i.parentNode;){varn=void0;try{n=getComputedStyle(i)}catch(r){}if("undefined"==typeofn||null===n)returni;vars=n.overflow,a=n.overflowX,f=n.overflowY;if(/(auto|scroll)/.test(s+f+a)&&("absolute"!==o||["relative","absolute","fixed"].indexOf(n.position)>=0))returni}returndocument.body}functionr(t){vare=void0;t===document?(e=document,t=document.documentElement):e=t.ownerDocument;varo=e.documentElement,i={},n=t.getBoundingClientRect();for(varrinn)i[r]=n[r];vars=x(e);returni.top-=s.top,i.left-=s.left,"undefined"==typeofi.width&&(i.width=document.body.scrollWidth-i.left-i.right),"undefined"==typeofi.height&&(i.height=document.body.scrollHeight-i.top-i.bottom),i.top=i.top-o.clientTop,i.left=i.left-o.clientLeft,i.right=e.body.clientWidth-i.width-i.left,i.bottom=e.body.clientHeight-i.height-i.top,i}functions(t){returnt.offsetParent||document.documentElement}functiona(){vart=document.createElement("div");t.style.width="100%",t.style.height="200px";vare=document.createElement("div");f(e.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),e.appendChild(t),document.body.appendChild(e);varo=t.offsetWidth;e.style.overflow="scroll";vari=t.offsetWidth;o===i&&(i=e.clientWidth),document.body.removeChild(e);varn=o-i;return{width:n,height:n}}functionf(){vart=arguments.length<=0||void0===arguments[0]?{}:arguments[0],e=[];returnArray.prototype.push.apply(e,arguments),e.slice(1).forEach(function(e){if(e)for(varoine)({}).hasOwnProperty.call(e,o)&&(t[o]=e[o])}),t}functionh(t,e){if("undefined"!=typeoft.classList)e.split("").forEach(function(e){e.trim()&&t.classList.remove(e)});else{varo=newRegExp("(^| )"+e.split("").join("|")+"( |$)","gi"),i=u(t).replace(o,"");p(t,i)}}functionl(t,e){if("undefined"!=typeoft.classList)e.split("").forEach(function(e){e.trim()&&t.classList.add(e)});else{h(t,e);varo=u(t)+(""+e);p(t,o)}}functiond(t,e){if("undefined"!=typeoft.classList)returnt.classList.contains(e);varo=u(t);returnnewRegExp("(^| )"+e+"( |$)","gi").test(o)}functionu(t){returnt.classNameinstanceofSVGAnimatedString?t.className.baseVal:t.className}functionp(t,e){t.setAttribute("class",e)}functionc(t,e,o){o.forEach(function(o){-1===e.indexOf(o)&&d(t,o)&&h(t,o)}),e.forEach(function(e){d(t,e)||l(t,e)})}functioni(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}functiong(t,e){varo=arguments.length<=2||void0===arguments[2]?1:arguments[2];returnt+o>=e&&e>=t-o}functionm(){return"undefined"!=typeofperformance&&"undefined"!=typeofperformance.now?performance.now():+newDate}functionv(){for(vart={top:0,left:0},e=arguments.length,o=Array(e),i=0;e>i;i++)o[i]=arguments[i];returno.forEach(function(e){varo=e.top,i=e.left;"string"==typeofo&&(o=parseFloat(o,10)),"string"==typeofi&&(i=parseFloat(i,10)),t.top+=o,t.left+=i}),t}functiony(t,e){return"string"==typeoft.left&&-1!==t.left.indexOf("%")&&(t.left=parseFloat(t.left,10)/100*e.width),"string"==typeoft.top&&-1!==t.top.indexOf("%")&&(t.top=parseFloat(t.top,10)/100*e.height),t}functionb(t,e){return"scrollParent"===e?e=t.scrollParent:"window"===e&&(e=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),e===document&&(e=e.documentElement),"undefined"!=typeofe.nodeType&&!function(){vart=r(e),o=t,i=getComputedStyle(e);e=[o.left,o.top,t.width+o.left,t.height+o.top],U.forEach(function(t,o){t=t[0].toUpperCase()+t.substr(1),"Top"===t||"Left"===t?e[o]+=parseFloat(i["border"+t+"Width"]):e[o]-=parseFloat(i["border"+t+"Width"])})}(),e}varw=function(){functiont(t,e){for(varo=0;o<e.length;o++){vari=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"ini&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}returnfunction(e,o,i){returno&&t(e.prototype,o),i&&t(e,i),e}}(),C=void0;"undefined"==typeofC&&(C={modules:[]});varO=function(){vart=0;returnfunction(){return++t}}(),E={},x=function(t){vare=t._tetherZeroElement;"undefined"==typeofe&&(e=t.createElement("div"),e.setAttribute("data-tether-id",O()),f(e.style,{top:0,left:0,position:"absolute"}),t.body.appendChild(e),t._tetherZeroElement=e);varo=e.getAttribute("data-tether-id");if("undefined"==typeofE[o]){E[o]={};vari=e.getBoundingClientRect();for(varnini)E[o][n]=i[n];T(function(){deleteE[o]})}returnE[o]},A=[],T=function(t){A.push(t)},S=function(){for(vart=void0;t=A.pop();)t()},W=function(){functiont(){i(this,t)}returnw(t,[{key:"on",value:function(t,e,o){vari=arguments.length<=3||void0===arguments[3]?!1:arguments[3];"undefined"==typeofthis.bindings&&(this.bindings={}),"undefined"==typeofthis.bindings[t]&&(this.bindings[t]=[]),this.bindings[t].push({handler:e,ctx:o,once:i})}},{key:"once",value:function(t,e,o){this.on(t,e,o,!0)}},{key:"off",value:function(t,e){if("undefined"==typeofthis.bindings||"undefined"==typeofthis.bindings[t])if("undefined"==typeofe)deletethis.bindings[t];elsefor(varo=0;o<this.bindings[t].length;)this.bindings[t][o].handler===e?this.bindings[t].splice(o,1):++o}},{key:"trigger",value:function(t){if("undefined"!=typeofthis.bindings&&this.bindings[t])for(vare=0;e<this.bindings[t].length;){varo=this.bindings[t][e],i=o.handler,n=o.ctx,r=o.once,s=n;"undefined"==typeofs&&(s=this);for(vara=arguments.length,f=Array(a>1?a-1:0),h=1;a>h;h++)f[h-1]=arguments[h];i.apply(s,f),r?this.bindings[t].splice(e,1):++e}}}]),t}();C.Utils={getScrollParent:n,getBounds:r,getOffsetParent:s,extend:f,addClass:l,removeClass:h,hasClass:d,updateClasses:c,defer:T,flush:S,uniqueId:O,Evented:W,getScrollBarSize:a};varM=function(){functiont(t,e){varo=[],i=!0,n=!1,r=void0;try{for(vars,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);i=!0);}catch(f){n=!0,r=f}finally{try{!i&&a["return"]&&a["return"]()}finally{if(n)throwr}}returno}returnfunction(e,o){if(Array.isArray(e))returne;if(Symbol.iteratorinObject(e))returnt(e,o);thrownewTypeError("Invalid attempt to destructure non-iterable instance")}}(),w=function(){functiont(t,e){for(varo=0;o<e.length;o++){vari=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"ini&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}returnfunction(e,o,i){returno&&t(e.prototype,o),i&&t(e,i),e}}();if("undefined"==typeofC)thrownewError("You must include the utils.js file before tether.js");varP=C.Utils,n=P.getScrollParent,r=P.getBounds,s=P.getOffsetParent,f=P.extend,l=P.addClass,h=P.removeClass,c=P.updateClasses,T=P.defer,S=P.flush,a=P.getScrollBarSize,k=function(){for(vart=document.createElement("div"),e=["transform","webkitTransform","OTransform","MozTransform","msTransform"],o=0;o<e.length;++o){vari=e[o];if(void0!==t.style[i])returni}}(),B=[],_=function(){B.forEach(function(t){t.position(!1)}),S()};!function(){vart=null,e=null,o=null,i=functionn(){return"undefined"!=typeofe&&e>16?(e=Math.min(e-16,250),void(o=setTimeout(n,250))):void("undefined"!=typeoft&&m()-t<10||("undefined"!=typeofo&&(clearTimeout(o),o=null),t=m(),_(),e=m()-t))};["resize","scroll","touchmove"].forEach(function(t){window.addEventListener(t,i)})}();varz={center:"center",left:"right",right:"left"},F={middle:"middle",top:"bottom",bottom:"top"},L={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},Y=function(t,e){varo=t.left,i=t.top;return"auto"===o&&(o=z[e.left]),"auto"===i&&(i=F[e.top]),{left:o,top:i}},H=function(t){vare=t.left,o=t.top;return"undefined"!=typeofL[t.left]&&(e=L[t.left]),"undefined"!=typeofL[t.top]&&(o=L[t.top]),{left:e,top:o}},X=function(t){vare=t.split(""),o=M(e,2),i=o[0],n=o[1];return{top:i,left:n}},j=X,N=function(){functiont(e){varo=this;i(this,t),this.position=this.position.bind(this),B.push(this),this.history=[],this.setOptions(e,!1),C.modules.forEach(function(t){"undefined"!=typeoft.initialize&&t.initialize.call(o)}),this.position()}returnw(t,[{key:"getClass",value:function(){vart=arguments.length<=0||void0===arguments[0]?"":arguments[0],e=this.options.classes;return"undefined"!=typeofe&&e[t]?this.options.classes[t]:this.options.classPrefix?this.options.classPrefix+"-"+t:t}},{key:"setOptions",value:function(t){vare=this,o=arguments.length<=1||void0===arguments[1]?!0:arguments[1],i={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"};this.options=f(i,t);varr=this.options,s=r.element,a=r.target,h=r.targetModifier;if(this.element=s,this.target=a,this.targetModifier=h,"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(t){if("undefined"==typeofe[t])thrownewError("Tether Error: Both element and target must be defined");"undefined"!=typeofe[t].jquery?e[t]=e[t][0]:"string"==typeofe[t]&&(e[t]=document.querySelector(e[t]))}),l(this.element,this.getClass("element")),this.options.addTargetClasses!==!1&&l(this.target,this.getClass("target")),!this.options.attachment)thrownewError("Tether Error: You must provide an attachment");this.targetAttachment=j(this.options.targetAttachment),this.attachment=j(this.options.attachment),this.offset=X(this.options.offset),this.targetOffset=X(this.options.targetOffset),"undefined"!=typeofthis.scrollParent&&this.disable(),this.scrollParent="scroll-handle"===this.targetModifier?this.target:n(this.target),this.options.enabled!==!1&&this.enable(o)}},{key:"getTargetBounds",value:function(){if("undefined"==typeofthis.targetModifier)returnr(this.target);if("visible"===this.targetModifier){if(this.target===document.body)return{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth};vart=r(this.target),e={height:t.height,width:t.width,top:t.top,left:t.left};returne.height=Math.min(e.height,t.height-(pageYOffset-t.top)),e.height=Math.min(e.height,t.height-(t.top+t.height-(pageYOffset+innerHeight))),e.height=Math.min(innerHeight,e.height),e.height-=2,e.width=Math.min(e.width,t.width-(pageXOffset-t.left)),e.width=Math.min(e.width,t.width-(t.left+t.width-(pageXOffset+innerWidth))),e.width=Math.min(innerWidth,e.width),e.width-=2,e.top<pageYOffset&&(e.top=pageYOffset),e.left<pageXOffset&&(e.left=pageXOffset),e}if("scroll-handle"===this.targetModifier){vart=void0,o=this.target;o===document.body?(o=document.documentElement,t={left:pageXOffset,top:pageYOffset,height:innerHeight,width:innerWidth}):t=r(o);vari=getComputedStyle(o),n=o.scrollWidth>o.clientWidth||[i.overflow,i.overflowX].indexOf("scroll")>=0||this.target!==document.body,s=0;n&&(s=15);vara=t.height-parseFloat(i.borderTopWidth)-parseFloat(i.borderBottomWidth)-s,e={width:15,height:.975*a*(a/o.scrollHeight),left:t.left+t.width-parseFloat(i.borderLeftWidth)-15},f=0;408>a&&this.target===document.body&&(f=-11e-5*Math.pow(a,2)-.00727*a+22.58),this.target!==document.body&&(e.height=Math.max(e.height,24));varh=this.target.scrollTop/(o.scrollHeight-a);returne.top=h*(a-e.height-f)+t.top+parseFloat(i.borderTopWidth),this.target===document.body&&(e.height=Math.max(e.height,24)),e}}},{key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(t,e){return"undefined"==typeofthis._cache&&(this._cache={}),"undefined"==typeofthis._cache[t]&&(this._cache[t]=e.call(this)),this._cache[t]}},{key:"enable",value:function(){vart=arguments.length<=0||void0===arguments[0]?!0:arguments[0];this.options.addTargetClasses!==!1&&l(this.target,this.getClass("enabled")),l(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParent!==document&&this.scrollParent.addEventListener("scroll",this.position),t&&this.position()}},{key:"disable",value:function(){h(this.target,this.getClass("enabled")),h(this.element,this.getClass("enabled")),this.enabled=!1,"undefined"!=typeofthis.scrollParent&&this.scrollParent.removeEventListener("scroll",this.position)}},{key:"destroy",value:function(){vart=this;this.disable(),B.forEach(function(e,o){returne===t?voidB.splice(o,1):void0})}},{key:"updateAttachClasses",value:function(t,e){varo=this;t=t||this.attachment,e=e||this.targetAttachment;vari=["left","top","bottom","right","middle","center"];"undefined"!=typeofthis._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),"undefined"==typeofthis._addAttachClasses&&(this._addAttachClasses=[]);varn=this._addAttachClasses;t.top&&n.push(this.getClass("element-attached")+"-"+t.top),t.left&&n.push(this.getClass("element-attached")+"-"+t.left),e.top&&n.push(this.getClass("target-attached")+"-"+e.top),e.left&&n.push(this.getClass("target-attached")+"-"+e.left);varr=[];i.forEach(function(t){r.push(o.getClass("element-attached")+"-"+t),r.push(o.getClass("target-attached")+"-"+t)}),T(function(){"undefined"!=typeofo._addAttachClasses&&(c(o.element,o._addAttachClasses,r),o.options.addTargetClasses!==!1&&c(o.target,o._addAttachClasses,r),deleteo._addAttachClasses)})}},{key:"position",value:function(){vart=this,e=arguments.length<=0||void0===arguments[0]?!0:arguments[0];if(this.enabled){this.clearCache();varo=Y(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,o);vari=this.cache("element-bounds",function(){returnr(t.element)}),n=i.width,f=i.height;if(0===n&&0===f&&"undefined"!=typeofthis.lastSize){varh=this.lastSize;n=h.width,f=h.height}elsethis.lastSize={width:n,height:f};varl=this.cache("target-bounds",function(){returnt.getTargetBounds()}),d=l,u=y(H(this.attachment),{width:n,height:f}),p=y(H(o),d),c=y(this.offset,{width:n,height:f}),g=y(this.targetOffset,d);u=v(u,c),p=v(p,g);for(varm=l.left+p.left-u.left,b=l.top+p.top-u.top,w=0;w<C.modules.length;++w){varO=C.modules[w],E=O.position.call(this,{left:m,top:b,targetAttachment:o,targetPos:l,elementPos:i,offset:u,targetOffset:p,manualOffset:c,manualTargetOffset:g,scrollbarSize:A,attachment:this.attachment});if(E===!1)return!1;"undefined"!=typeofE&&"object"==typeofE&&(b=E.top,m=E.left)}varx={page:{top:b,left:m},viewport:{top:b-pageYOffset,bottom:pageYOffset-b-f+innerHeight,left:m-pageXOffset,right:pageXOffset-m-n+innerWidth}},A=void0;returndocument.body.scrollWidth>window.innerWidth&&(A=this.cache("scrollbar-size",a),x.viewport.bottom-=A.height),document.body.scrollHeight>window.innerHeight&&(A=this.cache("scrollbar-size",a),x.viewport.right-=A.width),(-1===["","static"].indexOf(document.body.style.position)||-1===["","static"].indexOf(document.body.parentElement.style.position))&&(x.page.bottom=document.body.scrollHeight-b-f,x.page.right=document.body.scrollWidth-m-n),"undefined"!=typeofthis.options.optimizations&&this.options.optimizations.moveElement!==!1&&"undefined"==typeofthis.targetModifier&&!function(){vare=t.cache("target-offsetparent",function(){returns(t.target)}),o=t.cache("target-offsetparent-bounds",function(){returnr(e)}),i=getComputedStyle(e),n=o,a={};if(["Top","Left","Bottom","Right"].forEach(function(t){a[t.toLowerCase()]=parseFloat(i["border"+t+"Width"])}),o.right=document.body.scrollWidth-o.left-n.width+a.right,o.bottom=document.body.scrollHeight-o.top-n.height+a.bottom,x.page.top>=o.top+a.top&&x.page.bottom>=o.bottom&&x.page.left>=o.left+a.left&&x.page.right>=o.right){varf=e.scrollTop,h=e.scrollLeft;x.offset={top:x.page.top-o.top+f-a.top,left:x.page.left-o.left+h-a.left}}}(),this.move(x),this.history.unshift(x),this.history.length>3&&this.history.pop(),e&&S(),!0}}},{key:"move",value:function(t){vare=this;if("undefined"!=typeofthis.element.parentNode){varo={};for(variint){o[i]={};for(varnint[i]){for(varr=!1,a=0;a<this.history.length;++a){varh=this.history[a];if("undefined"!=typeofh[i]&&!g(h[i][n],t[i][n])){r=!0;break}}r||(o[i][n]=!0)}}varl={top:"",left:"",right:"",bottom:""},d=function(t,o){vari="undefined"!=typeofe.options.optimizations,n=i?e.options.optimizations.gpu:null;if(n!==!1){varr=void0,s=void0;t.top?(l.top=0,r=o.top):(l.bottom=0,r=-o.bottom),t.left?(l.left=0,s=o.left):(l.right=0,s=-o.right),l[k]="translateX("+Math.round(s)+"px) translateY("+Math.round(r)+"px)","msTransform"!==k&&(l[k]+=" translateZ(0)")}elset.top?l.top=o.top+"px":l.bottom=o.bottom+"px",t.left?l.left=o.left+"px":l.right=o.right+"px"},u=!1;if((o.page.top||o.page.bottom)&&(o.page.left||o.page.right)?(l.position="absolute",d(o.page,t.page)):(o.viewport.top||o.viewport.bottom)&&(o.viewport.left||o.viewport.right)?(l.position="fixed",d(o.viewport,t.viewport)):"undefined"!=typeofo.offset&&o.offset.top&&o.offset.left?!function(){l.position="absolute";vari=e.cache("target-offsetparent",function(){returns(e.target)});s(e.element)!==i&&T(function(){e.element.parentNode.removeChild(e.element),i.appendChild(e.element)}),d(o.offset,t.offset),u=!0}():(l.position="absolute",d({top:!0,left:!0},t.page)),!u){for(varp=!0,c=this.element.parentNode;c&&"BODY"!==c.tagName;){if("static"!==getComputedStyle(c).position){p=!1;break}c=c.parentNode}p||(this.element.parentNode.removeChild(this.element),document.body.appendChild(this.element))}varm={},v=!1;for(varninl){vary=l[n],b=this.element.style[n];""!==b&&""!==y&&["top","left","bottom","right"].indexOf(n)>=0&&(b=parseFloat(b),y=parseFloat(y)),b!==y&&(v=!0,m[n]=y)}v&&T(function(){f(e.element.style,m)})}}}]),t}();N.modules=[],C.position=_;varR=f(N,C),M=function(){functiont(t,e){varo=[],i=!0,n=!1,r=void0;try{for(vars,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);i=!0);}catch(f){n=!0,r=f}finally{try{!i&&a["return"]&&a["return"]()}finally{if(n)throwr}}returno}returnfunction(e,o){if(Array.isArray(e))returne;if(Symbol.iteratorinObject(e))returnt(e,o);thrownewTypeError("Invalid attempt to destructure non-iterable instance")}}(),P=C.Utils,r=P.getBounds,f=P.extend,c=P.updateClasses,T=P.defer,U=["left","top","right","bottom"];C.modules.push({position:function(t){vare=this,o=t.top,i=t.left,n=t.targetAttachment;if(!this.options.constraints)return!0;vars=this.cache("element-bounds",function(){returnr(e.element)}),a=s.height,h=s.width;if(0===h&&0===a&&"undefined"!=typeofthis.lastSize){varl=this.lastSize;h=l.width,a=l.height}vard=this.cache("target-bounds",function(){returne.getTargetBounds()}),u=d.height,p=d.width,g=[this.getClass("pinned"),this.getClass("out-of-bounds")];this.options.constraints.forEach(function(t){vare=t.outOfBoundsClass,o=t.pinnedClass;e&&g.push(e),o&&g.push(o)}),g.forEach(function(t){["left","top","right","bottom"].forEach(function(e){g.push(t+"-"+e)})});varm=[],v=f({},n),y=f({},this.attachment);returnthis.options.constraints.forEach(function(t){varr=t.to,s=t.attachment,f=t.pin;"undefined"==typeofs&&(s="");varl=void0,d=void0;if(s.indexOf("")>=0){varc=s.split(""),g=M(c,2);d=g[0],l=g[1]}elsel=d=s;varw=b(e,r);("target"===d||"both"===d)&&(o<w[1]&&"top"===v.top&&(o+=u,v.top="bottom"),o+a>w[3]&&"bottom"===v.top&&(o-=u,v.top="top")),"together"===d&&(o<w[1]&&"top"===v.top&&("bottom"===y.top?(o+=u,v.top="bottom",o+=a,y.top="top"):"top"===y.top&&(o+=u,v.top="bottom",o-=a,y.top="bottom")),o+a>w[3]&&"bottom"===v.top&&("top"===y.top?(o-=u,v.top="top",o-=a,y.top="bottom"):"bottom"===y.top&&(o-=u,v.top="top",o+=a,y.top="top")),"middle"===v.top&&(o+a>w[3]&&"top"===y.top?(o-=a,y.top="bottom"):o<w[1]&&"bottom"===y.top&&(o+=a,y.top="top"))),("target"===l||"both"===l)&&(i<w[0]&&"left"===v.left&&(i+=p,v.left="right"),i+h>w[2]&&"right"===v.left&&(i-=p,v.left="left")),"together"===l&&(i<w[0]&&"left"===v.left?"right"===y.left?(i+=p,v.left="right",i+=h,y.left="left"):"left"===y.left&&(i+=p,v.left="right",i-=h,y.left="right"):i+h>w[2]&&"right"===v.left?"left"===y.left?(i-=p,v.left="left",i-=h,y.left="right"):"right"===y.left&&(i-=p,v.left="left",i+=h,y.left="left"):"center"===v.left&&(i+h>w[2]&&"left"===y.left?(i-=h,y.left="right"):i<w[0]&&"right"===y.left&&(i+=h,y.left="left"))),("element"===d||"both"===d)&&(o<w[1]&&"bottom"===y.top&&(o+=a,y.top="top"),o+a>w[3]&&"top"===y.top&&(o-=a,y.top="bottom")),("element"===l||"both"===l)&&(i<w[0]&&"right"===y.left&&(i+=h,y.left="left"),i+h>w[2]&&"left"===y.left&&(i-=h,y.left="right")),"string"==typeoff?f=f.split(",").map(function(t){returnt.trim()}):f===!0&&(f=["top","left","right","bottom"]),f=f||[];varC=[],O=[];o<w[1]&&(f.indexOf("top")>=0?(o=w[1],C.push("top")):O.push("top")),o+a>w[3]&&(f.indexOf("bottom")>=0?(o=w[3]-a,C.push("bottom")):O.push("bottom")),i<w[0]&&(f.indexOf("left")>=0?(i=w[0],C.push("left")):O.push("left")),i+h>w[2]&&(f.indexOf("right")>=0?(i=w[2]-h,C.push("right")):O.push("right")),C.length&&!function(){vart=void0;t="undefined"!=typeofe.options.pinnedClass?e.options.pinnedClass:e.getClass("pinned"),m.push(t),C.forEach(function(e){m.push(t+"-"+e)})}(),O.length&&!function(){vart=void0;t="undefined"!=typeofe.options.outOfBoundsClass?e.options.outOfBoundsClass:e.getClass("out-of-bounds"),m.push(t),O.forEach(function(e){m.push(t+"-"+e)})}(),(C.indexOf("left")>=0||C.indexOf("right")>=0)&&(y.left=v.left=!1),(C.indexOf("top")>=0||C.indexOf("bottom")>=0)&&(y.top=v.top=!1),(v.top!==n.top||v.left!==n.left||y.top!==e.attachment.top||y.left!==e.attachment.left)&&e.updateAttachClasses(y,v)}),T(function(){e.options.addTargetClasses!==!1&&c(e.target,m,g),c(e.element,m,g)}),{top:o,left:i}}});varP=C.Utils,r=P.getBounds,c=P.updateClasses,T=P.defer;C.modules.push({position:function(t){vare=this,o=t.top,i=t.left,n=this.cache("element-bounds",function(){returnr(e.element)}),s=n.height,a=n.width,f=this.getTargetBounds(),h=o+s,l=i+a,d=[];o<=f.bottom&&h>=f.top&&["left","right"].forEach(function(t){vare=f[t];(e===i||e===l)&&d.push(t)}),i<=f.right&&l>=f.left&&["top","bottom"].forEach(function(t){vare=f[t];(e===o||e===h)&&d.push(t)});varu=[],p=[],g=["left","top","right","bottom"];returnu.push(this.getClass("abutted")),g.forEach(function(t){u.push(e.getClass("abutted")+"-"+t)}),d.length&&p.push(this.getClass("abutted")),d.forEach(function(t){p.push(e.getClass("abutted")+"-"+t)}),T(function(){e.options.addTargetClasses!==!1&&c(e.target,p,u),c(e.element,p,u)}),!0}});varM=function(){functiont(t,e){varo=[],i=!0,n=!1,r=void0;try{for(vars,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);i=!0);}catch(f){n=!0,r=f}finally{try{!i&&a["return"]&&a["return"]()}finally{if(n)throwr}}returno}returnfunction(e,o){if(Array.isArray(e))returne;if(Symbol.iteratorinObject(e))returnt(e,o);thrownewTypeError("Invalid attempt to destructure non-iterable instance")}}();returnC.modules.push({position:function(t){vare=t.top,o=t.left;if(this.options.shift){vari=this.options.shift;"function"==typeofthis.options.shift&&(i=this.options.shift.call(this,{top:e,left:o}));varn=void0,r=void0;if("string"==typeofi){i=i.split(""),i[1]=i[1]||i[0];vars=M(i,2);n=s[0],r=s[1],n=parseFloat(n,10),r=parseFloat(r,10)}elsen=i.top,r=i.left;returne+=n,o+=r,{top:e,left:o}}}}),R});
!function(t,e){"function"==typeofdefine&&define.amd?define(e):"object"==typeofexports?module.exports=e(require,exports,module):t.Tether=e()}(this,function(t,e,o){returnfunction(){vart,e,o,i,n,s,l,r,h,a,f,p,u,d,g,c,m,b,v,y={}.hasOwnProperty,w=[].indexOf||function(t){for(vare=0,o=this.length;o>e;e++)if(einthis&&this[e]===t)returne;return-1},C=[].slice;null==this.Tether&&(this.Tether={modules:[]}),p=function(t){vare,o,i,n,s;if(o=getComputedStyle(t).position,"fixed"===o)returnt;for(i=void0,e=t;e=e.parentNode;){try{n=getComputedStyle(e)}catch(l){}if(null==n)returne;if(/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&("absolute"!==o||"relative"===(s=n.position)||"absolute"===s||"fixed"===s))returne}returndocument.body},m=function(){vart;returnt=0,function(){returnt++}}(),v={},a=function(t){vare,i,s,l,r;if(s=t._tetherZeroElement,null==s&&(s=t.createElement("div"),s.setAttribute("data-tether-id",m()),n(s.style,{top:0,left:0,position:"absolute"}),t.body.appendChild(s),t._tetherZeroElement=s),e=s.getAttribute("data-tether-id"),null==v[e]){v[e]={},r=s.getBoundingClientRect();for(iinr)l=r[i],v[e][i]=l;o(function(){returnv[e]=void0})}returnv[e]},d=null,l=function(t){vare,o,i,n,s,l,r;t===document?(o=document,t=document.documentElement):o=t.ownerDocument,i=o.documentElement,e={},r=t.getBoundingClientRect();for(ninr)l=r[n],e[n]=l;returns=a(o),e.top-=s.top,e.left-=s.left,null==e.width&&(e.width=document.body.scrollWidth-e.left-e.right),null==e.height&&(e.height=document.body.scrollHeight-e.top-e.bottom),e.top=e.top-i.clientTop,e.left=e.left-i.clientLeft,e.right=o.body.clientWidth-e.width-e.left,e.bottom=o.body.clientHeight-e.height-e.top,e},h=function(t){returnt.offsetParent||document.documentElement},f=function(){vart,e,o,i,s;returnt=document.createElement("div"),t.style.width="100%",t.style.height="200px",e=document.createElement("div"),n(e.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),e.appendChild(t),document.body.appendChild(e),i=t.offsetWidth,e.style.overflow="scroll",s=t.offsetWidth,i===s&&(s=e.clientWidth),document.body.removeChild(e),o=i-s,{width:o,height:o}},n=function(t){vare,o,i,n,s,l,r;for(null==t&&(t={}),e=[],Array.prototype.push.apply(e,arguments),r=e.slice(1),s=0,l=r.length;l>s;s++)if(i=r[s])for(oini)y.call(i,o)&&(n=i[o],t[o]=n);returnt},g=function(t,e){varo,i,n,s,l,h;if(null!=t.classList){for(l=e.split(""),h=[],n=0,s=l.length;s>n;n++)i=l[n],i.trim()&&h.push(t.classList.remove(i));returnh}returno=r(t).replace(newRegExp("(^| )"+e.split("").join("|")+"( |$)","gi"),""),c(t,o)},e=function(t,e){varo,i,n,s,l;if(null!=t.classList){for(s=e.split(""),l=[],i=0,n=s.length;n>i;i++)o=s[i],o.trim()&&l.push(t.classList.add(o));returnl}returng(t,e),o=r(t)+(""+e),c(t,o)},u=function(t,e){returnnull!=t.classList?t.classList.contains(e):newRegExp("(^| )"+e+"( |$)","gi").test(r(t))},r=function(t){returnt.classNameinstanceofSVGAnimatedString?t.className.baseVal:t.className},c=function(t,e){returnt.setAttribute("class",e)},b=function(t,o,i){varn,s,l,r,h,a;for(s=0,r=i.length;r>s;s++)n=i[s],w.call(o,n)<0&&u(t,n)&&g(t,n);for(a=[],l=0,h=o.length;h>l;l++)n=o[l],a.push(u(t,n)?void0:e(t,n));returna},i=[],o=function(t){returni.push(t)},s=function(){vart,e;for(e=[];t=i.pop();)e.push(t());returne},t=function(){functiont(){}returnt.prototype.on=function(t,e,o,i){varn;returnnull==i&&(i=!1),null==this.bindings&&(this.bindings={}),null==(n=this.bindings)[t]&&(n[t]=[]),this.bindings[t].push({handler:e,ctx:o,once:i})},t.prototype.once=function(t,e,o){returnthis.on(t,e,o,!0)},t.prototype.off=function(t,e){varo,i,n;if(null!=(null!=(i=this.bindings)?i[t]:void0)){if(null==e)returndeletethis.bindings[t];for(o=0,n=[];o<this.bindings[t].length;)n.push(this.bindings[t][o].handler===e?this.bindings[t].splice(o,1):o++);returnn}},t.prototype.trigger=function(){vart,e,o,i,n,s,l,r,h;if(o=arguments[0],t=2<=arguments.length?C.call(arguments,1):[],null!=(l=this.bindings)?l[o]:void0){for(n=0,h=[];n<this.bindings[o].length;)r=this.bindings[o][n],i=r.handler,e=r.ctx,s=r.once,i.apply(null!=e?e:this,t),h.push(s?this.bindings[o].splice(n,1):n++);returnh}},t}(),this.Tether.Utils={getScrollParent:p,getBounds:l,getOffsetParent:h,extend:n,addClass:e,removeClass:g,hasClass:u,updateClasses:b,defer:o,flush:s,uniqueId:m,Evented:t,getScrollBarSize:f}}.call(this),function(){vart,e,o,i,n,s,l,r,h,a,f,p,u,d,g,c,m,b,v,y,w,C,O,T,x,A,E,S,W,M=[].slice,P=function(t,e){returnfunction(){returnt.apply(e,arguments)}};if(null==this.Tether)thrownewError("You must include the utils.js file before tether.js");i=this.Tether,W=i.Utils,c=W.getScrollParent,m=W.getSize,d=W.getOuterSize,p=W.getBounds,u=W.getOffsetParent,a=W.extend,n=W.addClass,O=W.removeClass,A=W.updateClasses,h=W.defer,f=W.flush,g=W.getScrollBarSize,E=function(t,e,o){returnnull==o&&(o=1),t+o>=e&&e>=t-o},x=function(){vart,e,o,i,n;for(t=document.createElement("div"),n=["transform","webkitTransform","OTransform","MozTransform","msTransform"],o=0,i=n.length;i>o;o++)if(e=n[o],void0!==t.style[e])returne}(),T=[],C=function(){vart,e,o;for(e=0,o=T.length;o>e;e++)t=T[e],t.position(!1);returnf()},b=function(){vart;returnnull!=(t="undefined"!=typeofperformance&&null!==performance&&"function"==typeofperformance.now?performance.now():void0)?t:+newDate},function(){vart,e,o,i,n,s,l,r,h;for(e=null,o=null,i=null,n=function(){if(null!=o&&o>16)returno=Math.min(o-16,250),void(i=setTimeout(n,250));if(!(null!=e&&b()-e<10))returnnull!=i&&(clearTimeout(i),i=null),e=b(),C(),o=b()-e},r=["resize","scroll","touchmove"],h=[],s=0,l=r.length;l>s;s++)t=r[s],h.push(window.addEventListener(t,n));returnh}(),t={center:"center",left:"right",right:"left"},e={middle:"middle",top:"bottom",bottom:"top"},o={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},r=function(o,i){varn,s;returnn=o.left,s=o.top,"auto"===n&&(n=t[i.left]),"auto"===s&&(s=e[i.top]),{left:n,top:s}},l=function(t){vare,i;return{left:null!=(e=o[t.left])?e:t.left,top:null!=(i=o[t.top])?i:t.top}},s=function(){vart,e,o,i,n,s,l;for(e=1<=arguments.length?M.call(arguments,0):[],o={top:0,left:0},n=0,s=e.length;s>n;n++)l=e[n],i=l.top,t=l.left,"string"==typeofi&&(i=parseFloat(i,10)),"string"==typeoft&&(t=parseFloat(t,10)),o.top+=i,o.left+=t;returno},v=function(t,e){return"string"==typeoft.left&&-1!==t.left.indexOf("%")&&(t.left=parseFloat(t.left,10)/100*e.width),"string"==typeoft.top&&-1!==t.top.indexOf("%")&&(t.top=parseFloat(t.top,10)/100*e.height),t},y=w=function(t){vare,o,i;returni=t.split(""),o=i[0],e=i[1],{top:o,left:e}},S=function(){functiont(t){this.position=P(this.position,this);vare,o,n,s,l;for(T.push(this),this.history=[],this.setOptions(t,!1),s=i.modules,o=0,n=s.length;n>o;o++)e=s[o],null!=(l=e.initialize)&&l.call(this);this.position()}returnt.modules=[],t.prototype.getClass=function(t){vare,o;return(null!=(e=this.options.classes)?e[t]:void0)?this.options.classes[t]:(null!=(o=this.options.classes)?o[t]:void0)!==!1?this.options.classPrefix?""+this.options.classPrefix+"-"+t:t:""},t.prototype.setOptions=function(t,e){varo,i,s,l,r,h;for(this.options=t,null==e&&(e=!0),o={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"},this.options=a(o,this.options),r=this.options,this.element=r.element,this.target=r.target,this.targetModifier=r.targetModifier,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),h=["element","target"],s=0,l=h.length;l>s;s++){if(i=h[s],null==this[i])thrownewError("Tether Error: Both element and target must be defined");null!=this[i].jquery?this[i]=this[i][0]:"string"==typeofthis[i]&&(this[i]=document.querySelector(this[i]))}if(n(this.element,this.getClass("element")),this.options.addTargetClasses!==!1&&n(this.target,this.getClass("target")),!this.options.attachment)thrownewError("Tether Error: You must provide an attachment");returnthis.targetAttachment=y(this.options.targetAttachment),this.attachment=y(this.options.attachment),this.offset=w(this.options.offset),this.targetOffset=w(this.options.targetOffset),null!=this.scrollParent&&this.disable(),"scroll-handle"===this.targetModifier?this.scrollParent=this.target:this.scrollParent=c(this.target),this.options.enabled!==!1?this.enable(e):void0},t.prototype.getTargetBounds=function(){vart,e,o,i,n,s,l,r,h;if(null==this.targetModifier)returnp(this.target);switch(this.targetModifier){case"visible":returnthis.target===document.body?{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth}:(t=p(this.target),n={height:t.height,width:t.width,top:t.top,left:t.left},n.height=Math.min(n.height,t.height-(pageYOffset-t.top)),n.height=Math.min(n.height,t.height-(t.top+t.height-(pageYOffset+innerHeight))),n.height=Math.min(innerHeight,n.height),n.height-=2,n.width=Math.min(n.width,t.width-(pageXOffset-t.left)),n.width=Math.min(n.width,t.width-(t.left+t.width-(pageXOffset+innerWidth))),n.width=Math.min(innerWidth,n.width),n.width-=2,n.top<pageYOffset&&(n.top=pageYOffset),n.left<pageXOffset&&(n.left=pageXOffset),n);case"scroll-handle":returnh=this.target,h===document.body?(h=document.documentElement,t={left:pageXOffset,top:pageYOffset,height:innerHeight,width:innerWidth}):t=p(h),r=getComputedStyle(h),o=h.scrollWidth>h.clientWidth||"scroll"===[r.overflow,r.overflowX]||this.target!==document.body,s=0,o&&(s=15),i=t.height-parseFloat(r.borderTopWidth)-parseFloat(r.borderBottomWidth)-s,n={width:15,height:.975*i*(i/h.scrollHeight),left:t.left+t.width-parseFloat(r.borderLeftWidth)-15},e=0,408>i&&this.target===document.body&&(e=-11e-5*Math.pow(i,2)-.00727*i+22.58),this.target!==document.body&&(n.height=Math.max(n.height,24)),l=this.target.scrollTop/(h.scrollHeight-i),n.top=l*(i-n.height-e)+t.top+parseFloat(r.borderTopWidth),this.target===document.body&&(n.height=Math.max(n.height,24)),n}},t.prototype.clearCache=function(){returnthis._cache={}},t.prototype.cache=function(t,e){returnnull==this._cache&&(this._cache={}),null==this._cache[t]&&(this._cache[t]=e.call(this)),this._cache[t]},t.prototype.enable=function(t){returnnull==t&&(t=!0),this.options.addTargetClasses!==!1&&n(this.target,this.getClass("enabled")),n(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParent!==document&&this.scrollParent.addEventListener("scroll",this.position),t?this.position():void0},t.prototype.disable=function(){returnO(this.target,this.getClass("enabled")),O(this.element,this.getClass("enabled")),this.enabled=!1,null!=this.scrollParent?this.scrollParent.removeEventListener("scroll",this.position):void0},t.prototype.destroy=function(){vart,e,o,i,n;for(this.disable(),n=[],t=o=0,i=T.length;i>o;t=++o){if(e=T[t],e===this){T.splice(t,1);break}n.push(void0)}returnn},t.prototype.updateAttachClasses=function(t,e){varo,i,n,s,l,r,a,f,p,u=this;for(null==t&&(t=this.attachment),null==e&&(e=this.targetAttachment),s=["left","top","bottom","right","middle","center"],(null!=(p=this._addAttachClasses)?p.length:void0)&&this._addAttachClasses.splice(0,this._addAttachClasses.length),o=null!=this._addAttachClasses?this._addAttachClasses:this._addAttachClasses=[],t.top&&o.push(""+this.getClass("element-attached")+"-"+t.top),t.left&&o.push(""+this.getClass("element-attached")+"-"+t.left),e.top&&o.push(""+this.getClass("target-attached")+"-"+e.top),e.left&&o.push(""+this.getClass("target-attached")+"-"+e.left),i=[],l=0,a=s.length;a>l;l++)n=s[l],i.push(""+this.getClass("element-attached")+"-"+n);for(r=0,f=s.length;f>r;r++)n=s[r],i.push(""+this.getClass("target-attached")+"-"+n);returnh(function(){returnnull!=u._addAttachClasses?(A(u.element,u._addAttachClasses,i),u.options.addTargetClasses!==!1&&A(u.target,u._addAttachClasses,i),u._addAttachClasses=void0):void0})},t.prototype.position=function(t){vare,o,n,h,a,d,c,m,b,y,w,C,O,T,x,A,E,S,W,M,P,z,B,_,F,L,Y,H,X,N,j,R,U,q,k,D=this;if(null==t&&(t=!0),this.enabled){for(this.clearCache(),M=r(this.targetAttachment,this.attachment),this.updateAttachClasses(this.attachment,M),e=this.cache("element-bounds",function(){returnp(D.element)}),F=e.width,n=e.height,0===F&&0===n&&null!=this.lastSize?(N=this.lastSize,F=N.width,n=N.height):this.lastSize={width:F,height:n},B=z=this.cache("target-bounds",function(){returnD.getTargetBounds()}),b=v(l(this.attachment),{width:F,height:n}),P=v(l(M),B),a=v(this.offset,{width:F,height:n}),d=v(this.targetOffset,B),b=s(b,a),P=s(P,d),h=z.left+P.left-b.left,_=z.top+P.top-b.top,j=i.modules,L=0,H=j.length;H>L;L++){if(c=j[L],x=c.position.call(this,{left:h,top:_,targetAttachment:M,targetPos:z,attachment:this.attachment,elementPos:e,offset:b,targetOffset:P,manualOffset:a,manualTargetOffset:d,scrollbarSize:S}),x===!1)return!1;null!=x&&"object"==typeofx&&(_=x.top,h=x.left)}if(m={page:{top:_,left:h},viewport:{top:_-pageYOffset,bottom:pageYOffset-_-n+innerHeight,left:h-pageXOffset,right:pageXOffset-h-F+innerWidth}},document.body.scrollWidth>window.innerWidth&&(S=this.cache("scrollbar-size",g),m.viewport.bottom-=S.height),document.body.scrollHeight>window.innerHeight&&(S=this.cache("scrollbar-size",g),m.viewport.right-=S.width),(""!==(R=document.body.style.position)&&"static"!==R||""!==(U=document.body.parentElement.style.position)&&"static"!==U)&&(m.page.bottom=document.body.scrollHeight-_-n,m.page.right=document.body.scrollWidth-h-F),(null!=(q=this.options.optimizations)?q.moveElement:void0)!==!1&&null==this.targetModifier){for(w=this.cache("target-offsetparent",function(){returnu(D.target)}),T=this.cache("target-offsetparent-bounds",function(){returnp(w)}),O=getComputedStyle(w),o=getComputedStyle(this.element),C=T,y={},k=["Top","Left","Bottom","Right"],Y=0,X=k.length;X>Y;Y++)W=k[Y],y[W.toLowerCase()]=parseFloat(O["border"+W+"Width"]);T.right=document.body.scrollWidth-T.left-C.width+y.right,T.bottom=document.body.scrollHeight-T.top-C.height+y.bottom,m.page.top>=T.top+y.top&&m.page.bottom>=T.bottom&&m.page.left>=T.left+y.left&&m.page.right>=T.right&&(E=w.scrollTop,A=w.scrollLeft,m.offset={top:m.page.top-T.top+E-y.top,left:m.page.left-T.left+A-y.left})}returnthis.move(m),this.history.unshift(m),this.history.length>3&&this.history.pop(),t&&f(),!0}},t.prototype.move=function(t){vare,o,i,n,s,l,r,f,p,d,g,c,m,b,v,y,w,C=this;if(null!=this.element.parentNode){f={};for(dint){f[d]={};for(nint[d]){for(i=!1,y=this.history,b=0,v=y.length;v>b;b++)if(r=y[b],!E(null!=(w=r[d])?w[n]:void0,t[d][n])){i=!0;break}i||(f[d][n]=!0)}}e={top:"",left:"",right:"",bottom:""},p=function(t,o){vari,n,s;return(null!=(s=C.options.optimizations)?s.gpu:void0)===!1?(t.top?e.top=""+o.top+"px":e.bottom=""+o.bottom+"px",t.left?e.left=""+o.left+"px":e.right=""+o.right+"px"):(t.top?(e.top=0,n=o.top):(e.bottom=0,n=-o.bottom),t.left?(e.left=0,i=o.left):(e.right=0,i=-o.right),e[x]="translateX("+Math.round(i)+"px) translateY("+Math.round(n)+"px)","msTransform"!==x?e[x]+=" translateZ(0)":void0)},s=!1,(f.page.top||f.page.bottom)&&(f.page.left||f.page.right)?(e.position="absolute",p(f.page,t.page)):(f.viewport.top||f.viewport.bottom)&&(f.viewport.left||f.viewport.right)?(e.position="fixed",p(f.viewport,t.viewport)):null!=f.offset&&f.offset.top&&f.offset.left?(e.position="absolute",l=this.cache("target-offsetparent",function(){returnu(C.target)}),u(this.element)!==l&&h(function(){returnC.element.parentNode.removeChild(C.element),l.appendChild(C.element)}),p(f.offset,t.offset),s=!0):(e.position="absolute",p({top:!0,left:!0},t.page)),s||"BODY"===this.element.parentNode.tagName||(this.element.parentNode.removeChild(this.element),document.body.appendChild(this.element)),m={},c=!1;for(nine)g=e[n],o=this.element.style[n],""===o||""===g||"top"!==n&&"left"!==n&&"bottom"!==n&&"right"!==n||(o=parseFloat(o),g=parseFloat(g)),o!==g&&(c=!0,m[n]=e[n]);returnc?h(function(){returna(C.element.style,m)}):void0}},t}(),i.position=C,this.Tether=a(S,i)}.call(this),function(){vart,e,o,i,n,s,l,r,h,a,f=[].indexOf||function(t){for(vare=0,o=this.length;o>e;e++)if(einthis&&this[e]===t)returne;return-1};a=this.Tether.Utils,l=a.getOuterSize,s=a.getBounds,r=a.getSize,i=a.extend,h=a.updateClasses,o=a.defer,e={left:"right",right:"left",top:"bottom",bottom:"top",middle:"middle"},t=["left","top","right","bottom"],n=function(e,o){vari,n,l,r,h,a,f;if("scrollParent"===o?o=e.scrollParent:"window"===o&&(o=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),o===document&&(o=o.documentElement),null!=o.nodeType)for(n=r=s(o),h=getComputedStyle(o),o=[n.left,n.top,r.width+n.left,r.height+n.top],i=a=0,f=t.length;f>a;i=++a)l=t[i],l=l[0].toUpperCase()+l.substr(1),"Top"===l||"Left"===l?o[i]+=parseFloat(h["border"+l+"Width"]):o[i]-=parseFloat(h["border"+l+"Width"]);returno},this.Tether.modules.push({position:function(e){varl,r,a,p,u,d,g,c,m,b,v,y,w,C,O,T,x,A,E,S,W,M,P,z,B,_,F,L,Y,H,X,N,j,R,U,q,k,D,Z,V,$,G,I,J,K,Q,tt,et=this;if(_=e.top,v=e.left,W=e.targetAttachment,!this.options.constraints)return!0;for(A=function(e){varo,i,n,s;for(et.removeClass(e),s=[],i=0,n=t.length;n>i;i++)o=t[i],s.push(et.removeClass(""+e+"-"+o));returns},V=this.cache("element-bounds",function(){returns(et.element)}),b=V.height,F=V.width,0===F&&0===b&&null!=this.lastSize&&($=this.lastSize,F=$.width,b=$.height),P=this.cache("target-bounds",function(){returnet.getTargetBounds()}),M=P.height,z=P.width,S={},m={},r=[this.getClass("pinned"),this.getClass("out-of-bounds")],G=this.options.constraints,L=0,N=G.length;N>L;L++)c=G[L],c.outOfBoundsClass&&r.push(c.outOfBoundsClass),c.pinnedClass&&r.push(c.pinnedClass);for(Y=0,j=r.length;j>Y;Y++)for(g=r[Y],I=["left","top","right","bottom"],H=0,R=I.length;R>H;H++)E=I[H],r.push(""+g+"-"+E);for(l=[],S=i({},W),m=i({},this.attachment),J=this.options.constraints,X=0,U=J.length;U>X;X++){if(c=J[X],B=c.to,a=c.attachment,O=c.pin,null==a&&(a=""),f.call(a,"")>=0?(K=a.split(""),d=K[0],u=K[1]):u=d=a,p=n(this,B),("target"===d||"both"===d)&&(_<p[1]&&"top"===S.top&&(_+=M,S.top="bottom"),_+b>p[3]&&"bottom"===S.top&&(_-=M,S.top="top")),"together"===d&&(_<p[1]&&"top"===S.top&&("bottom"===m.top?(_+=M,S.top="bottom",_+=b,m.top="top"):"top"===m.top&&(_+=M,S.top="bottom",_-=b,m.top="bottom")),_+b>p[3]&&"bottom"===S.top&&("top"===m.top?(_-=M,S.top="top",_-=b,m.top="bottom"):"bottom"===m.top&&(_-=M,S.top="top",_+=b,m.top="top")),"middle"===S.top&&(_+b>p[3]&&"top"===m.top?(_-=b,m.top="bottom"):_<p[1]&&"bottom"===m.top&&(_+=b,m.top="top"))),("target"===u||"both"===u)&&(v<p[0]&&"left"===S.left&&(v+=z,S.left="right"),v+F>p[2]&&"right"===S.left&&(v-=z,S.left="left")),"together"===u&&(v<p[0]&&"left"===S.left?"right"===m.left?(v+=z,S.left="right",v+=F,m.left="left"):"left"===m.left&&(v+=z,S.left="right",v-=F,m.left="right"):v+F>p[2]&&"right"===S.left?"left"===m.left?(v-=z,S.left="left",v-=F,m.left="right"):"right"===m.left&&(v-=z,S.left="left",v+=F,m.left="left"):"center"===S.left&&(v+F>p[2]&&"left"===m.left?(v-=F,m.left="right"):v<p[0]&&"right"===m.left&&(v+=F,m.left="left"))),("element"===d||"both"===d)&&(_<p[1]&&"bottom"===m.top&&(_+=b,m.top="top"),_+b>p[3]&&"top"===m.top&&(_-=b,m.top="bottom")),("element"===u||"both"===u)&&(v<p[0]&&"right"===m.left&&(v+=F,m.left="left"),v+F>p[2]&&"left"===m.left&&(v-=F,m.left="right")),"string"==typeofO?O=function(){vart,e,o,i;for(o=O.split(","),i=[],e=0,t=o.length;t>e;e++)C=o[e],i.push(C.trim());returni}():O===!0&&(O=["top","left","right","bottom"]),O||(O=[]),T=[],y=[],_<p[1]&&(f.call(O,"top")>=0?(_=p[1],T.push("top")):y.push("top")),_+b>p[3]&&(f.call(O,"bottom")>=0?(_=p[3]-b,T.push("bottom")):y.push("bottom")),v<p[0]&&(f.call(O,"left")>=0?(v=p[0],T.push("left")):y.push("left")),v+F>p[2]&&(f.call(O,"right")>=0?(v=p[2]-F,T.push("right")):y.push("right")),T.length)for(x=null!=(Q=this.options.pinnedClass)?Q:this.getClass("pinned"),l.push(x),D=0,q=T.length;q>D;D++)E=T[D],l.push(""+x+"-"+E);if(y.length)for(w=null!=(tt=this.options.outOfBoundsClass)?tt:this.getClass("out-of-bounds"),l.push(w),Z=0,k=y.length;k>Z;Z++)E=y[Z],l.push(""+w+"-"+E);(f.call(T,"left")>=0||f.call(T,"right")>=0)&&(m.left=S.left=!1),(f.call(T,"top")>=0||f.call(T,"bottom")>=0)&&(m.top=S.top=!1),(S.top!==W.top||S.left!==W.left||m.top!==this.attachment.top||m.left!==this.attachment.left)&&this.updateAttachClasses(m,S)}returno(function(){returnet.options.addTargetClasses!==!1&&h(et.target,l,r),h(et.element,l,r)}),{top:_,left:v}}})}.call(this),function(){vart,e,o,i;i=this.Tether.Utils,e=i.getBounds,o=i.updateClasses,t=i.defer,this.Tether.modules.push({position:function(i){varn,s,l,r,h,a,f,p,u,d,g,c,m,b,v,y,w,C,O,T,x,A,E,S,W,M=this;if(g=i.top,a=i.left,x=this.cache("element-bounds",function(){returne(M.element)}),h=x.height,c=x.width,d=this.getTargetBounds(),r=g+h,f=a+c,n=[],g<=d.bottom&&r>=d.top)for(A=["left","right"],m=0,w=A.length;w>m;m++)p=A[m],((E=d[p])===a||E===f)&&n.push(p);if(a<=d.right&&f>=d.left)for(S=["top","bottom"],b=0,C=S.length;C>b;b++)p=S[b],((W=d[p])===g||W===r)&&n.push(p);for(l=[],s=[],u=["left","top","right","bottom"],l.push(this.getClass("abutted")),v=0,O=u.length;O>v;v++)p=u[v],l.push(""+this.getClass("abutted")+"-"+p);for(n.length&&s.push(this.getClass("abutted")),y=0,T=n.length;T>y;y++)p=n[y],s.push(""+this.getClass("abutted")+"-"+p);returnt(function(){returnM.options.addTargetClasses!==!1&&o(M.target,s,l),o(M.element,s,l)}),!0}})}.call(this),function(){this.Tether.modules.push({position:function(t){vare,o,i,n,s,l,r;returnl=t.top,e=t.left,this.options.shift?(o=function(t){return"function"==typeoft?t.call(this,{top:l,left:e}):t},i=o(this.options.shift),"string"==typeofi?(i=i.split(""),i[1]||(i[1]=i[0]),s=i[0],n=i[1],s=parseFloat(s,10),n=parseFloat(n,10)):(r=[i.top,i.left],s=r[0],n=r[1]),l+=s,e+=n,{top:l,left:e}):void0}})}.call(this),this.Tether});
\ No newline at end of file
/*! tether 1.1.0 */
!function(t,e){"function"==typeofdefine&&define.amd?define(e):"object"==typeofexports?module.exports=e(require,exports,module):t.Tether=e()}(this,function(t,e,o){"use strict";functioni(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}functionn(t){vare=getComputedStyle(t),o=e.position;if("fixed"===o)returnt;for(vari=t;i=i.parentNode;){varn=void0;try{n=getComputedStyle(i)}catch(r){}if("undefined"==typeofn||null===n)returni;vars=n.overflow,a=n.overflowX,f=n.overflowY;if(/(auto|scroll)/.test(s+f+a)&&("absolute"!==o||["relative","absolute","fixed"].indexOf(n.position)>=0))returni}returndocument.body}functionr(t){vare=void0;t===document?(e=document,t=document.documentElement):e=t.ownerDocument;varo=e.documentElement,i={},n=t.getBoundingClientRect();for(varrinn)i[r]=n[r];vars=x(e);returni.top-=s.top,i.left-=s.left,"undefined"==typeofi.width&&(i.width=document.body.scrollWidth-i.left-i.right),"undefined"==typeofi.height&&(i.height=document.body.scrollHeight-i.top-i.bottom),i.top=i.top-o.clientTop,i.left=i.left-o.clientLeft,i.right=e.body.clientWidth-i.width-i.left,i.bottom=e.body.clientHeight-i.height-i.top,i}functions(t){returnt.offsetParent||document.documentElement}functiona(){vart=document.createElement("div");t.style.width="100%",t.style.height="200px";vare=document.createElement("div");f(e.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),e.appendChild(t),document.body.appendChild(e);varo=t.offsetWidth;e.style.overflow="scroll";vari=t.offsetWidth;o===i&&(i=e.clientWidth),document.body.removeChild(e);varn=o-i;return{width:n,height:n}}functionf(){vart=arguments.length<=0||void0===arguments[0]?{}:arguments[0],e=[];returnArray.prototype.push.apply(e,arguments),e.slice(1).forEach(function(e){if(e)for(varoine)({}).hasOwnProperty.call(e,o)&&(t[o]=e[o])}),t}functionh(t,e){if("undefined"!=typeoft.classList)e.split("").forEach(function(e){e.trim()&&t.classList.remove(e)});else{varo=newRegExp("(^| )"+e.split("").join("|")+"( |$)","gi"),i=u(t).replace(o,"");p(t,i)}}functionl(t,e){if("undefined"!=typeoft.classList)e.split("").forEach(function(e){e.trim()&&t.classList.add(e)});else{h(t,e);varo=u(t)+(""+e);p(t,o)}}functiond(t,e){if("undefined"!=typeoft.classList)returnt.classList.contains(e);varo=u(t);returnnewRegExp("(^| )"+e+"( |$)","gi").test(o)}functionu(t){returnt.classNameinstanceofSVGAnimatedString?t.className.baseVal:t.className}functionp(t,e){t.setAttribute("class",e)}functionc(t,e,o){o.forEach(function(o){-1===e.indexOf(o)&&d(t,o)&&h(t,o)}),e.forEach(function(e){d(t,e)||l(t,e)})}functioni(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}functiong(t,e){varo=arguments.length<=2||void0===arguments[2]?1:arguments[2];returnt+o>=e&&e>=t-o}functionm(){return"undefined"!=typeofperformance&&"undefined"!=typeofperformance.now?performance.now():+newDate}functionv(){for(vart={top:0,left:0},e=arguments.length,o=Array(e),i=0;e>i;i++)o[i]=arguments[i];returno.forEach(function(e){varo=e.top,i=e.left;"string"==typeofo&&(o=parseFloat(o,10)),"string"==typeofi&&(i=parseFloat(i,10)),t.top+=o,t.left+=i}),t}functiony(t,e){return"string"==typeoft.left&&-1!==t.left.indexOf("%")&&(t.left=parseFloat(t.left,10)/100*e.width),"string"==typeoft.top&&-1!==t.top.indexOf("%")&&(t.top=parseFloat(t.top,10)/100*e.height),t}functionb(t,e){return"scrollParent"===e?e=t.scrollParent:"window"===e&&(e=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),e===document&&(e=e.documentElement),"undefined"!=typeofe.nodeType&&!function(){vart=r(e),o=t,i=getComputedStyle(e);e=[o.left,o.top,t.width+o.left,t.height+o.top],U.forEach(function(t,o){t=t[0].toUpperCase()+t.substr(1),"Top"===t||"Left"===t?e[o]+=parseFloat(i["border"+t+"Width"]):e[o]-=parseFloat(i["border"+t+"Width"])})}(),e}varw=function(){functiont(t,e){for(varo=0;o<e.length;o++){vari=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"ini&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}returnfunction(e,o,i){returno&&t(e.prototype,o),i&&t(e,i),e}}(),C=void0;"undefined"==typeofC&&(C={modules:[]});varO=function(){vart=0;returnfunction(){return++t}}(),E={},x=function(t){vare=t._tetherZeroElement;"undefined"==typeofe&&(e=t.createElement("div"),e.setAttribute("data-tether-id",O()),f(e.style,{top:0,left:0,position:"absolute"}),t.body.appendChild(e),t._tetherZeroElement=e);varo=e.getAttribute("data-tether-id");if("undefined"==typeofE[o]){E[o]={};vari=e.getBoundingClientRect();for(varnini)E[o][n]=i[n];T(function(){deleteE[o]})}returnE[o]},A=[],T=function(t){A.push(t)},S=function(){for(vart=void0;t=A.pop();)t()},W=function(){functiont(){i(this,t)}returnw(t,[{key:"on",value:function(t,e,o){vari=arguments.length<=3||void0===arguments[3]?!1:arguments[3];"undefined"==typeofthis.bindings&&(this.bindings={}),"undefined"==typeofthis.bindings[t]&&(this.bindings[t]=[]),this.bindings[t].push({handler:e,ctx:o,once:i})}},{key:"once",value:function(t,e,o){this.on(t,e,o,!0)}},{key:"off",value:function(t,e){if("undefined"==typeofthis.bindings||"undefined"==typeofthis.bindings[t])if("undefined"==typeofe)deletethis.bindings[t];elsefor(varo=0;o<this.bindings[t].length;)this.bindings[t][o].handler===e?this.bindings[t].splice(o,1):++o}},{key:"trigger",value:function(t){if("undefined"!=typeofthis.bindings&&this.bindings[t])for(vare=0;e<this.bindings[t].length;){varo=this.bindings[t][e],i=o.handler,n=o.ctx,r=o.once,s=n;"undefined"==typeofs&&(s=this);for(vara=arguments.length,f=Array(a>1?a-1:0),h=1;a>h;h++)f[h-1]=arguments[h];i.apply(s,f),r?this.bindings[t].splice(e,1):++e}}}]),t}();C.Utils={getScrollParent:n,getBounds:r,getOffsetParent:s,extend:f,addClass:l,removeClass:h,hasClass:d,updateClasses:c,defer:T,flush:S,uniqueId:O,Evented:W,getScrollBarSize:a};varM=function(){functiont(t,e){varo=[],i=!0,n=!1,r=void0;try{for(vars,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);i=!0);}catch(f){n=!0,r=f}finally{try{!i&&a["return"]&&a["return"]()}finally{if(n)throwr}}returno}returnfunction(e,o){if(Array.isArray(e))returne;if(Symbol.iteratorinObject(e))returnt(e,o);thrownewTypeError("Invalid attempt to destructure non-iterable instance")}}(),w=function(){functiont(t,e){for(varo=0;o<e.length;o++){vari=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"ini&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}returnfunction(e,o,i){returno&&t(e.prototype,o),i&&t(e,i),e}}();if("undefined"==typeofC)thrownewError("You must include the utils.js file before tether.js");varP=C.Utils,n=P.getScrollParent,r=P.getBounds,s=P.getOffsetParent,f=P.extend,l=P.addClass,h=P.removeClass,c=P.updateClasses,T=P.defer,S=P.flush,a=P.getScrollBarSize,k=function(){for(vart=document.createElement("div"),e=["transform","webkitTransform","OTransform","MozTransform","msTransform"],o=0;o<e.length;++o){vari=e[o];if(void0!==t.style[i])returni}}(),B=[],_=function(){B.forEach(function(t){t.position(!1)}),S()};!function(){vart=null,e=null,o=null,i=functionn(){return"undefined"!=typeofe&&e>16?(e=Math.min(e-16,250),void(o=setTimeout(n,250))):void("undefined"!=typeoft&&m()-t<10||("undefined"!=typeofo&&(clearTimeout(o),o=null),t=m(),_(),e=m()-t))};["resize","scroll","touchmove"].forEach(function(t){window.addEventListener(t,i)})}();varz={center:"center",left:"right",right:"left"},F={middle:"middle",top:"bottom",bottom:"top"},L={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},Y=function(t,e){varo=t.left,i=t.top;return"auto"===o&&(o=z[e.left]),"auto"===i&&(i=F[e.top]),{left:o,top:i}},H=function(t){vare=t.left,o=t.top;return"undefined"!=typeofL[t.left]&&(e=L[t.left]),"undefined"!=typeofL[t.top]&&(o=L[t.top]),{left:e,top:o}},X=function(t){vare=t.split(""),o=M(e,2),i=o[0],n=o[1];return{top:i,left:n}},j=X,N=function(){functiont(e){varo=this;i(this,t),this.position=this.position.bind(this),B.push(this),this.history=[],this.setOptions(e,!1),C.modules.forEach(function(t){"undefined"!=typeoft.initialize&&t.initialize.call(o)}),this.position()}returnw(t,[{key:"getClass",value:function(){vart=arguments.length<=0||void0===arguments[0]?"":arguments[0],e=this.options.classes;return"undefined"!=typeofe&&e[t]?this.options.classes[t]:this.options.classPrefix?this.options.classPrefix+"-"+t:t}},{key:"setOptions",value:function(t){vare=this,o=arguments.length<=1||void0===arguments[1]?!0:arguments[1],i={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"};this.options=f(i,t);varr=this.options,s=r.element,a=r.target,h=r.targetModifier;if(this.element=s,this.target=a,this.targetModifier=h,"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(t){if("undefined"==typeofe[t])thrownewError("Tether Error: Both element and target must be defined");"undefined"!=typeofe[t].jquery?e[t]=e[t][0]:"string"==typeofe[t]&&(e[t]=document.querySelector(e[t]))}),l(this.element,this.getClass("element")),this.options.addTargetClasses!==!1&&l(this.target,this.getClass("target")),!this.options.attachment)thrownewError("Tether Error: You must provide an attachment");this.targetAttachment=j(this.options.targetAttachment),this.attachment=j(this.options.attachment),this.offset=X(this.options.offset),this.targetOffset=X(this.options.targetOffset),"undefined"!=typeofthis.scrollParent&&this.disable(),this.scrollParent="scroll-handle"===this.targetModifier?this.target:n(this.target),this.options.enabled!==!1&&this.enable(o)}},{key:"getTargetBounds",value:function(){if("undefined"==typeofthis.targetModifier)returnr(this.target);if("visible"===this.targetModifier){if(this.target===document.body)return{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth};vart=r(this.target),e={height:t.height,width:t.width,top:t.top,left:t.left};returne.height=Math.min(e.height,t.height-(pageYOffset-t.top)),e.height=Math.min(e.height,t.height-(t.top+t.height-(pageYOffset+innerHeight))),e.height=Math.min(innerHeight,e.height),e.height-=2,e.width=Math.min(e.width,t.width-(pageXOffset-t.left)),e.width=Math.min(e.width,t.width-(t.left+t.width-(pageXOffset+innerWidth))),e.width=Math.min(innerWidth,e.width),e.width-=2,e.top<pageYOffset&&(e.top=pageYOffset),e.left<pageXOffset&&(e.left=pageXOffset),e}if("scroll-handle"===this.targetModifier){vart=void0,o=this.target;o===document.body?(o=document.documentElement,t={left:pageXOffset,top:pageYOffset,height:innerHeight,width:innerWidth}):t=r(o);vari=getComputedStyle(o),n=o.scrollWidth>o.clientWidth||[i.overflow,i.overflowX].indexOf("scroll")>=0||this.target!==document.body,s=0;n&&(s=15);vara=t.height-parseFloat(i.borderTopWidth)-parseFloat(i.borderBottomWidth)-s,e={width:15,height:.975*a*(a/o.scrollHeight),left:t.left+t.width-parseFloat(i.borderLeftWidth)-15},f=0;408>a&&this.target===document.body&&(f=-11e-5*Math.pow(a,2)-.00727*a+22.58),this.target!==document.body&&(e.height=Math.max(e.height,24));varh=this.target.scrollTop/(o.scrollHeight-a);returne.top=h*(a-e.height-f)+t.top+parseFloat(i.borderTopWidth),this.target===document.body&&(e.height=Math.max(e.height,24)),e}}},{key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(t,e){return"undefined"==typeofthis._cache&&(this._cache={}),"undefined"==typeofthis._cache[t]&&(this._cache[t]=e.call(this)),this._cache[t]}},{key:"enable",value:function(){vart=arguments.length<=0||void0===arguments[0]?!0:arguments[0];this.options.addTargetClasses!==!1&&l(this.target,this.getClass("enabled")),l(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParent!==document&&this.scrollParent.addEventListener("scroll",this.position),t&&this.position()}},{key:"disable",value:function(){h(this.target,this.getClass("enabled")),h(this.element,this.getClass("enabled")),this.enabled=!1,"undefined"!=typeofthis.scrollParent&&this.scrollParent.removeEventListener("scroll",this.position)}},{key:"destroy",value:function(){vart=this;this.disable(),B.forEach(function(e,o){returne===t?voidB.splice(o,1):void0})}},{key:"updateAttachClasses",value:function(t,e){varo=this;t=t||this.attachment,e=e||this.targetAttachment;vari=["left","top","bottom","right","middle","center"];"undefined"!=typeofthis._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),"undefined"==typeofthis._addAttachClasses&&(this._addAttachClasses=[]);varn=this._addAttachClasses;t.top&&n.push(this.getClass("element-attached")+"-"+t.top),t.left&&n.push(this.getClass("element-attached")+"-"+t.left),e.top&&n.push(this.getClass("target-attached")+"-"+e.top),e.left&&n.push(this.getClass("target-attached")+"-"+e.left);varr=[];i.forEach(function(t){r.push(o.getClass("element-attached")+"-"+t),r.push(o.getClass("target-attached")+"-"+t)}),T(function(){"undefined"!=typeofo._addAttachClasses&&(c(o.element,o._addAttachClasses,r),o.options.addTargetClasses!==!1&&c(o.target,o._addAttachClasses,r),deleteo._addAttachClasses)})}},{key:"position",value:function(){vart=this,e=arguments.length<=0||void0===arguments[0]?!0:arguments[0];if(this.enabled){this.clearCache();varo=Y(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,o);vari=this.cache("element-bounds",function(){returnr(t.element)}),n=i.width,f=i.height;if(0===n&&0===f&&"undefined"!=typeofthis.lastSize){varh=this.lastSize;n=h.width,f=h.height}elsethis.lastSize={width:n,height:f};varl=this.cache("target-bounds",function(){returnt.getTargetBounds()}),d=l,u=y(H(this.attachment),{width:n,height:f}),p=y(H(o),d),c=y(this.offset,{width:n,height:f}),g=y(this.targetOffset,d);u=v(u,c),p=v(p,g);for(varm=l.left+p.left-u.left,b=l.top+p.top-u.top,w=0;w<C.modules.length;++w){varO=C.modules[w],E=O.position.call(this,{left:m,top:b,targetAttachment:o,targetPos:l,elementPos:i,offset:u,targetOffset:p,manualOffset:c,manualTargetOffset:g,scrollbarSize:A,attachment:this.attachment});if(E===!1)return!1;"undefined"!=typeofE&&"object"==typeofE&&(b=E.top,m=E.left)}varx={page:{top:b,left:m},viewport:{top:b-pageYOffset,bottom:pageYOffset-b-f+innerHeight,left:m-pageXOffset,right:pageXOffset-m-n+innerWidth}},A=void0;returndocument.body.scrollWidth>window.innerWidth&&(A=this.cache("scrollbar-size",a),x.viewport.bottom-=A.height),document.body.scrollHeight>window.innerHeight&&(A=this.cache("scrollbar-size",a),x.viewport.right-=A.width),(-1===["","static"].indexOf(document.body.style.position)||-1===["","static"].indexOf(document.body.parentElement.style.position))&&(x.page.bottom=document.body.scrollHeight-b-f,x.page.right=document.body.scrollWidth-m-n),"undefined"!=typeofthis.options.optimizations&&this.options.optimizations.moveElement!==!1&&"undefined"==typeofthis.targetModifier&&!function(){vare=t.cache("target-offsetparent",function(){returns(t.target)}),o=t.cache("target-offsetparent-bounds",function(){returnr(e)}),i=getComputedStyle(e),n=o,a={};if(["Top","Left","Bottom","Right"].forEach(function(t){a[t.toLowerCase()]=parseFloat(i["border"+t+"Width"])}),o.right=document.body.scrollWidth-o.left-n.width+a.right,o.bottom=document.body.scrollHeight-o.top-n.height+a.bottom,x.page.top>=o.top+a.top&&x.page.bottom>=o.bottom&&x.page.left>=o.left+a.left&&x.page.right>=o.right){varf=e.scrollTop,h=e.scrollLeft;x.offset={top:x.page.top-o.top+f-a.top,left:x.page.left-o.left+h-a.left}}}(),this.move(x),this.history.unshift(x),this.history.length>3&&this.history.pop(),e&&S(),!0}}},{key:"move",value:function(t){vare=this;if("undefined"!=typeofthis.element.parentNode){varo={};for(variint){o[i]={};for(varnint[i]){for(varr=!1,a=0;a<this.history.length;++a){varh=this.history[a];if("undefined"!=typeofh[i]&&!g(h[i][n],t[i][n])){r=!0;break}}r||(o[i][n]=!0)}}varl={top:"",left:"",right:"",bottom:""},d=function(t,o){vari="undefined"!=typeofe.options.optimizations,n=i?e.options.optimizations.gpu:null;if(n!==!1){varr=void0,s=void0;t.top?(l.top=0,r=o.top):(l.bottom=0,r=-o.bottom),t.left?(l.left=0,s=o.left):(l.right=0,s=-o.right),l[k]="translateX("+Math.round(s)+"px) translateY("+Math.round(r)+"px)","msTransform"!==k&&(l[k]+=" translateZ(0)")}elset.top?l.top=o.top+"px":l.bottom=o.bottom+"px",t.left?l.left=o.left+"px":l.right=o.right+"px"},u=!1;if((o.page.top||o.page.bottom)&&(o.page.left||o.page.right)?(l.position="absolute",d(o.page,t.page)):(o.viewport.top||o.viewport.bottom)&&(o.viewport.left||o.viewport.right)?(l.position="fixed",d(o.viewport,t.viewport)):"undefined"!=typeofo.offset&&o.offset.top&&o.offset.left?!function(){l.position="absolute";vari=e.cache("target-offsetparent",function(){returns(e.target)});s(e.element)!==i&&T(function(){e.element.parentNode.removeChild(e.element),i.appendChild(e.element)}),d(o.offset,t.offset),u=!0}():(l.position="absolute",d({top:!0,left:!0},t.page)),!u){for(varp=!0,c=this.element.parentNode;c&&"BODY"!==c.tagName;){if("static"!==getComputedStyle(c).position){p=!1;break}c=c.parentNode}p||(this.element.parentNode.removeChild(this.element),document.body.appendChild(this.element))}varm={},v=!1;for(varninl){vary=l[n],b=this.element.style[n];""!==b&&""!==y&&["top","left","bottom","right"].indexOf(n)>=0&&(b=parseFloat(b),y=parseFloat(y)),b!==y&&(v=!0,m[n]=y)}v&&T(function(){f(e.element.style,m)})}}}]),t}();N.modules=[],C.position=_;varR=f(N,C),M=function(){functiont(t,e){varo=[],i=!0,n=!1,r=void0;try{for(vars,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);i=!0);}catch(f){n=!0,r=f}finally{try{!i&&a["return"]&&a["return"]()}finally{if(n)throwr}}returno}returnfunction(e,o){if(Array.isArray(e))returne;if(Symbol.iteratorinObject(e))returnt(e,o);thrownewTypeError("Invalid attempt to destructure non-iterable instance")}}(),P=C.Utils,r=P.getBounds,f=P.extend,c=P.updateClasses,T=P.defer,U=["left","top","right","bottom"];C.modules.push({position:function(t){vare=this,o=t.top,i=t.left,n=t.targetAttachment;if(!this.options.constraints)return!0;vars=this.cache("element-bounds",function(){returnr(e.element)}),a=s.height,h=s.width;if(0===h&&0===a&&"undefined"!=typeofthis.lastSize){varl=this.lastSize;h=l.width,a=l.height}vard=this.cache("target-bounds",function(){returne.getTargetBounds()}),u=d.height,p=d.width,g=[this.getClass("pinned"),this.getClass("out-of-bounds")];this.options.constraints.forEach(function(t){vare=t.outOfBoundsClass,o=t.pinnedClass;e&&g.push(e),o&&g.push(o)}),g.forEach(function(t){["left","top","right","bottom"].forEach(function(e){g.push(t+"-"+e)})});varm=[],v=f({},n),y=f({},this.attachment);returnthis.options.constraints.forEach(function(t){varr=t.to,s=t.attachment,f=t.pin;"undefined"==typeofs&&(s="");varl=void0,d=void0;if(s.indexOf("")>=0){varc=s.split(""),g=M(c,2);d=g[0],l=g[1]}elsel=d=s;varw=b(e,r);("target"===d||"both"===d)&&(o<w[1]&&"top"===v.top&&(o+=u,v.top="bottom"),o+a>w[3]&&"bottom"===v.top&&(o-=u,v.top="top")),"together"===d&&(o<w[1]&&"top"===v.top&&("bottom"===y.top?(o+=u,v.top="bottom",o+=a,y.top="top"):"top"===y.top&&(o+=u,v.top="bottom",o-=a,y.top="bottom")),o+a>w[3]&&"bottom"===v.top&&("top"===y.top?(o-=u,v.top="top",o-=a,y.top="bottom"):"bottom"===y.top&&(o-=u,v.top="top",o+=a,y.top="top")),"middle"===v.top&&(o+a>w[3]&&"top"===y.top?(o-=a,y.top="bottom"):o<w[1]&&"bottom"===y.top&&(o+=a,y.top="top"))),("target"===l||"both"===l)&&(i<w[0]&&"left"===v.left&&(i+=p,v.left="right"),i+h>w[2]&&"right"===v.left&&(i-=p,v.left="left")),"together"===l&&(i<w[0]&&"left"===v.left?"right"===y.left?(i+=p,v.left="right",i+=h,y.left="left"):"left"===y.left&&(i+=p,v.left="right",i-=h,y.left="right"):i+h>w[2]&&"right"===v.left?"left"===y.left?(i-=p,v.left="left",i-=h,y.left="right"):"right"===y.left&&(i-=p,v.left="left",i+=h,y.left="left"):"center"===v.left&&(i+h>w[2]&&"left"===y.left?(i-=h,y.left="right"):i<w[0]&&"right"===y.left&&(i+=h,y.left="left"))),("element"===d||"both"===d)&&(o<w[1]&&"bottom"===y.top&&(o+=a,y.top="top"),o+a>w[3]&&"top"===y.top&&(o-=a,y.top="bottom")),("element"===l||"both"===l)&&(i<w[0]&&"right"===y.left&&(i+=h,y.left="left"),i+h>w[2]&&"left"===y.left&&(i-=h,y.left="right")),"string"==typeoff?f=f.split(",").map(function(t){returnt.trim()}):f===!0&&(f=["top","left","right","bottom"]),f=f||[];varC=[],O=[];o<w[1]&&(f.indexOf("top")>=0?(o=w[1],C.push("top")):O.push("top")),o+a>w[3]&&(f.indexOf("bottom")>=0?(o=w[3]-a,C.push("bottom")):O.push("bottom")),i<w[0]&&(f.indexOf("left")>=0?(i=w[0],C.push("left")):O.push("left")),i+h>w[2]&&(f.indexOf("right")>=0?(i=w[2]-h,C.push("right")):O.push("right")),C.length&&!function(){vart=void0;t="undefined"!=typeofe.options.pinnedClass?e.options.pinnedClass:e.getClass("pinned"),m.push(t),C.forEach(function(e){m.push(t+"-"+e)})}(),O.length&&!function(){vart=void0;t="undefined"!=typeofe.options.outOfBoundsClass?e.options.outOfBoundsClass:e.getClass("out-of-bounds"),m.push(t),O.forEach(function(e){m.push(t+"-"+e)})}(),(C.indexOf("left")>=0||C.indexOf("right")>=0)&&(y.left=v.left=!1),(C.indexOf("top")>=0||C.indexOf("bottom")>=0)&&(y.top=v.top=!1),(v.top!==n.top||v.left!==n.left||y.top!==e.attachment.top||y.left!==e.attachment.left)&&e.updateAttachClasses(y,v)}),T(function(){e.options.addTargetClasses!==!1&&c(e.target,m,g),c(e.element,m,g)}),{top:o,left:i}}});varP=C.Utils,r=P.getBounds,c=P.updateClasses,T=P.defer;C.modules.push({position:function(t){vare=this,o=t.top,i=t.left,n=this.cache("element-bounds",function(){returnr(e.element)}),s=n.height,a=n.width,f=this.getTargetBounds(),h=o+s,l=i+a,d=[];o<=f.bottom&&h>=f.top&&["left","right"].forEach(function(t){vare=f[t];(e===i||e===l)&&d.push(t)}),i<=f.right&&l>=f.left&&["top","bottom"].forEach(function(t){vare=f[t];(e===o||e===h)&&d.push(t)});varu=[],p=[],g=["left","top","right","bottom"];returnu.push(this.getClass("abutted")),g.forEach(function(t){u.push(e.getClass("abutted")+"-"+t)}),d.length&&p.push(this.getClass("abutted")),d.forEach(function(t){p.push(e.getClass("abutted")+"-"+t)}),T(function(){e.options.addTargetClasses!==!1&&c(e.target,p,u),c(e.element,p,u)}),!0}});varM=function(){functiont(t,e){varo=[],i=!0,n=!1,r=void0;try{for(vars,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);i=!0);}catch(f){n=!0,r=f}finally{try{!i&&a["return"]&&a["return"]()}finally{if(n)throwr}}returno}returnfunction(e,o){if(Array.isArray(e))returne;if(Symbol.iteratorinObject(e))returnt(e,o);thrownewTypeError("Invalid attempt to destructure non-iterable instance")}}();returnC.modules.push({position:function(t){vare=t.top,o=t.left;if(this.options.shift){vari=this.options.shift;"function"==typeofthis.options.shift&&(i=this.options.shift.call(this,{top:e,left:o}));varn=void0,r=void0;if("string"==typeofi){i=i.split(""),i[1]=i[1]||i[0];vars=M(i,2);n=s[0],r=s[1],n=parseFloat(n,10),r=parseFloat(r,10)}elsen=i.top,r=i.left;returne+=n,o+=r,{top:e,left:o}}}}),R});