if(function(n,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():n.Tether=t()}(this,function(){"use strict";function rt(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function c(n){var f=n.getBoundingClientRect(),t={},r,u,i;for(r in f)t[r]=f[r];return n.ownerDocument!==document&&(u=n.ownerDocument.defaultView.frameElement,u&&(i=c(u),t.top+=i.top,t.bottom+=i.top,t.left+=i.left,t.right+=i.left)),t}function ut(n){var e=getComputedStyle(n)||{},f=e.position,i=[],t,r;if("fixed"===f)return[n];for(t=n;(t=t.parentNode)&&t&&1===t.nodeType;){r=void 0;try{r=getComputedStyle(t)}catch(n){}if(void 0===r||null===r)return i.push(t),i;var u=r,o=u.overflow,s=u.overflowX;/(auto|scroll|overlay)/.test(o+u.overflowY+s)&&("absolute"!==f||["relative","absolute","fixed"].indexOf(r.position)>=0)&&i.push(t)}return i.push(n.ownerDocument.body),n.ownerDocument!==document&&i.push(n.ownerDocument.defaultView),i}function ft(){s&&document.body.removeChild(s);s=null}function i(n){var i=void 0;n===document?(i=document,n=document.documentElement):i=n.ownerDocument;var r=i.documentElement,t=c(n),u=dt();return t.top-=u.top,t.left-=u.left,void 0===t.width&&(t.width=document.body.scrollWidth-t.left-t.right),void 0===t.height&&(t.height=document.body.scrollHeight-t.top-t.bottom),t.top=t.top-r.clientTop,t.left=t.left-r.clientLeft,t.right=i.body.clientWidth-t.width-t.left,t.bottom=i.body.clientHeight-t.height-t.top,t}function l(n){return n.offsetParent||document.documentElement}function w(){var t,n,u,i,f;return g?g:(t=document.createElement("div"),t.style.width="100%",t.style.height="200px",n=document.createElement("div"),r(n.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),n.appendChild(t),document.body.appendChild(n),u=t.offsetWidth,n.style.overflow="scroll",i=t.offsetWidth,u===i&&(i=n.clientWidth),document.body.removeChild(n),f=u-i,g={width:f,height:f})}function r(){var n=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=[];return Array.prototype.push.apply(t,arguments),t.slice(1).forEach(function(t){if(t)for(var i in t)({}).hasOwnProperty.call(t,i)&&(n[i]=t[i])}),n}function o(n,t){if(void 0!==n.classList)t.split(" ").forEach(function(t){t.trim()&&n.classList.remove(t)});else{var i=new RegExp("(^| )"+t.split(" ").join("|")+"( |$)","gi"),r=k(n).replace(i," ");et(n,r)}}function e(n,t){if(void 0!==n.classList)t.split(" ").forEach(function(t){t.trim()&&n.classList.add(t)});else{o(n,t);var i=k(n)+" "+t;et(n,i)}}function b(n,t){if(void 0!==n.classList)return n.classList.contains(t);var i=k(n);return new RegExp("(^| )"+t+"( |$)","gi").test(i)}function k(n){return n.className instanceof n.ownerDocument.defaultView.SVGAnimatedString?n.className.baseVal:n.className}function et(n,t){n.setAttribute("class",t)}function u(n,t,i){i.forEach(function(i){-1===t.indexOf(i)&&b(n,i)&&o(n,i)});t.forEach(function(t){b(n,t)||e(n,t)})}function rt(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function wt(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}function bt(n,t){var i=arguments.length<=2||void 0===arguments[2]?1:arguments[2];return n+i>=t&&t>=n-i}function d(){return"object"==typeof performance&&"function"==typeof performance.now?performance.now():+new Date}function ot(){for(var t={top:0,left:0},i=arguments.length,r=Array(i),n=0;n<i;n++)r[n]=arguments[n];return r.forEach(function(n){var i=n.top,r=n.left;"string"==typeof i&&(i=parseFloat(i,10));"string"==typeof r&&(r=parseFloat(r,10));t.top+=i;t.left+=r}),t}function a(n,t){return"string"==typeof n.left&&-1!==n.left.indexOf("%")&&(n.left=parseFloat(n.left,10)/100*t.width),"string"==typeof n.top&&-1!==n.top.indexOf("%")&&(n.top=parseFloat(n.top,10)/100*t.height),n}function kt(n,t){return"scrollParent"===t?t=n.scrollParents[0]:"window"===t&&(t=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),t===document&&(t=t.documentElement),void 0!==t.nodeType&&function(){var f=t,u=i(t),r=u,e=getComputedStyle(t),n;(t=[r.left,r.top,u.width+r.left,u.height+r.top],f.ownerDocument!==document)&&(n=f.ownerDocument.defaultView,t[0]+=n.pageXOffset,t[1]+=n.pageYOffset,t[2]+=n.pageXOffset,t[3]+=n.pageYOffset);ui.forEach(function(n,i){n=n[0].toUpperCase()+n.substr(1);"Top"===n||"Left"===n?t[i]+=parseFloat(e["border"+n+"Width"]):t[i]-=parseFloat(e["border"+n+"Width"])})}(),t}var st=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),t=void 0,y;void 0===t&&(t={modules:[]});var s=null,ht=function(){var n=0;return function(){return++n}}(),v={},dt=function(){var n=s,t;return n&&document.body.contains(n)||(n=document.createElement("div"),n.setAttribute("data-tether-id",ht()),r(n.style,{top:0,left:0,position:"absolute"}),document.body.appendChild(n),s=n),t=n.getAttribute("data-tether-id"),void 0===v[t]&&(v[t]=c(n),f(function(){delete v[t]})),v[t]},g=null,ct=[],f=function(n){ct.push(n)},nt=function(){for(var n=void 0;n=ct.pop();)n()},lt=function(){function n(){rt(this,n)}return st(n,[{key:"on",value:function(n,t,i){var r=!(arguments.length<=3||void 0===arguments[3])&&arguments[3];void 0===this.bindings&&(this.bindings={});void 0===this.bindings[n]&&(this.bindings[n]=[]);this.bindings[n].push({handler:t,ctx:i,once:r})}},{key:"once",value:function(n,t,i){this.on(n,t,i,!0)}},{key:"off",value:function(n,t){if(void 0!==this.bindings&&void 0!==this.bindings[n])if(void 0===t)delete this.bindings[n];else for(var i=0;i<this.bindings[n].length;)this.bindings[n][i].handler===t?this.bindings[n].splice(i,1):++i}},{key:"trigger",value:function(n){if(void 0!==this.bindings&&this.bindings[n]){for(var t=0,r=arguments.length,e=Array(r>1?r-1:0),i=1;i<r;i++)e[i-1]=arguments[i];for(;t<this.bindings[n].length;){var u=this.bindings[n][t],o=u.handler,s=u.ctx,h=u.once,f=s;void 0===f&&(f=this);o.apply(f,e);h?this.bindings[n].splice(t,1):++t}}}}]),n}();t.Utils={getActualBoundingClientRect:c,getScrollParents:ut,getBounds:i,getOffsetParent:l,extend:r,addClass:e,removeClass:o,hasClass:b,updateClasses:u,defer:f,flush:nt,uniqueId:ht,Evented:lt,getScrollBarSize:w,removeUtilElements:ft};var y=function(){function n(n,t){var r=[],u=!0,f=!1,e=void 0,o,i;try{for(i=n[Symbol.iterator]();!(u=(o=i.next()).done)&&(r.push(o.value),!t||r.length!==t);u=!0);}catch(n){f=!0;e=n}finally{try{!u&&i.return&&i.return()}finally{if(f)throw e;}}return r}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return n(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),st=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),gt=function(n,t,i){for(var r,o,e,u=!0;u;){var f=n,s=t,h=i;if(u=!1,null===f&&(f=Function.prototype),r=Object.getOwnPropertyDescriptor(f,s),void 0!==r)return"value"in r?r.value:(o=r.get,void 0===o)?void 0:o.call(h);if(e=Object.getPrototypeOf(f),null===e)return;n=e;t=s;i=h;u=!0;r=e=void 0}};if(void 0===t)throw new Error("You must include the utils.js file before tether.js");var n=t.Utils,ut=n.getScrollParents,i=n.getBounds,l=n.getOffsetParent,r=n.extend,e=n.addClass,o=n.removeClass,u=n.updateClasses,f=n.defer,nt=n.flush,w=n.getScrollBarSize,ft=n.removeUtilElements,tt=function(){var t;if("undefined"==typeof document)return"";for(var r=document.createElement("div"),i=["transform","WebkitTransform","OTransform","MozTransform","msTransform"],n=0;n<i.length;++n)if(t=i[n],void 0!==r.style[t])return t}(),h=[],at=function(){h.forEach(function(n){n.position(!1)});nt()};!function(){var t=null,n=null,i=null,r=function r(){return void 0!==n&&n>16?(n=Math.min(n-16,250),void(i=setTimeout(r,250))):void(void 0!==t&&d()-t<10||(null!=i&&(clearTimeout(i),i=null),t=d(),at(),n=d()-t))};"undefined"!=typeof window&&void 0!==window.addEventListener&&["resize","scroll","touchmove"].forEach(function(n){window.addEventListener(n,r)})}();var ni={center:"center",left:"right",right:"left"},ti={middle:"middle",top:"bottom",bottom:"top"},p={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},ii=function(n,t){var i=n.left,r=n.top;return"auto"===i&&(i=ni[t.left]),"auto"===r&&(r=ti[t.top]),{left:i,top:r}},vt=function(n){var t=n.left,i=n.top;return void 0!==p[n.left]&&(t=p[n.left]),void 0!==p[n.top]&&(i=p[n.top]),{left:t,top:i}},it=function(n){var i=n.split(" "),t=y(i,2);return{top:t[0],left:t[1]}},yt=it,pt=function(n){function s(n){var i=this;rt(this,s);gt(Object.getPrototypeOf(s.prototype),"constructor",this).call(this);this.position=this.position.bind(this);h.push(this);this.history=[];this.setOptions(n,!1);t.modules.forEach(function(n){void 0!==n.initialize&&n.initialize.call(i)});this.position()}return wt(s,n),st(s,[{key:"getClass",value:function(){var n=arguments.length<=0||void 0===arguments[0]?"":arguments[0],t=this.options.classes;return void 0!==t&&t[n]?this.options.classes[n]:this.options.classPrefix?this.options.classPrefix+"-"+n:n}},{key:"setOptions",value:function(n){var t=this,u=arguments.length<=1||void 0===arguments[1]||arguments[1];this.options=r({offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"},n);var i=this.options,f=i.element,o=i.target,s=i.targetModifier;if(this.element=f,this.target=o,this.targetModifier=s,"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(n){if(void 0===t[n])throw new Error("Tether Error: Both element and target must be defined");void 0!==t[n].jquery?t[n]=t[n][0]:"string"==typeof t[n]&&(t[n]=document.querySelector(t[n]))}),e(this.element,this.getClass("element")),!1!==this.options.addTargetClasses&&e(this.target,this.getClass("target")),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=yt(this.options.targetAttachment);this.attachment=yt(this.options.attachment);this.offset=it(this.options.offset);this.targetOffset=it(this.options.targetOffset);void 0!==this.scrollParents&&this.disable();this.scrollParents="scroll-handle"===this.targetModifier?[this.target]:ut(this.target);!1!==this.options.enabled&&this.enable(u)}},{key:"getTargetBounds",value:function(){var n,t,r,s;if(void 0===this.targetModifier)return i(this.target);if("visible"===this.targetModifier)return this.target===document.body?{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth}:(t=i(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);if("scroll-handle"===this.targetModifier){t=void 0;r=this.target;r===document.body?(r=document.documentElement,t={left:pageXOffset,top:pageYOffset,height:innerHeight,width:innerWidth}):t=i(r);var f=getComputedStyle(r),h=r.scrollWidth>r.clientWidth||[f.overflow,f.overflowX].indexOf("scroll")>=0||this.target!==document.body,e=0;h&&(e=15);var u=t.height-parseFloat(f.borderTopWidth)-parseFloat(f.borderBottomWidth)-e,n={width:15,height:.975*u*(u/r.scrollHeight),left:t.left+t.width-parseFloat(f.borderLeftWidth)-15},o=0;return u<408&&this.target===document.body&&(o=-.00011*Math.pow(u,2)-.00727*u+22.58),this.target!==document.body&&(n.height=Math.max(n.height,24)),s=this.target.scrollTop/(r.scrollHeight-u),n.top=s*(u-n.height-o)+t.top+parseFloat(f.borderTopWidth),this.target===document.body&&(n.height=Math.max(n.height,24)),n}}},{key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(n,t){return void 0===this._cache&&(this._cache={}),void 0===this._cache[n]&&(this._cache[n]=t.call(this)),this._cache[n]}},{key:"enable",value:function(){var n=this,t=arguments.length<=0||void 0===arguments[0]||arguments[0];!1!==this.options.addTargetClasses&&e(this.target,this.getClass("enabled"));e(this.element,this.getClass("enabled"));this.enabled=!0;this.scrollParents.forEach(function(t){t!==n.target.ownerDocument&&t.addEventListener("scroll",n.position)});t&&this.position()}},{key:"disable",value:function(){var n=this;o(this.target,this.getClass("enabled"));o(this.element,this.getClass("enabled"));this.enabled=!1;void 0!==this.scrollParents&&this.scrollParents.forEach(function(t){t.removeEventListener("scroll",n.position)})}},{key:"destroy",value:function(){var n=this;this.disable();h.forEach(function(t,i){t===n&&h.splice(i,1)});0===h.length&&ft()}},{key:"updateAttachClasses",value:function(n,t){var i=this,o,r,e;n=n||this.attachment;t=t||this.targetAttachment;o=["left","top","bottom","right","middle","center"];void 0!==this._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length);void 0===this._addAttachClasses&&(this._addAttachClasses=[]);r=this._addAttachClasses;n.top&&r.push(this.getClass("element-attached")+"-"+n.top);n.left&&r.push(this.getClass("element-attached")+"-"+n.left);t.top&&r.push(this.getClass("target-attached")+"-"+t.top);t.left&&r.push(this.getClass("target-attached")+"-"+t.left);e=[];o.forEach(function(n){e.push(i.getClass("element-attached")+"-"+n);e.push(i.getClass("target-attached")+"-"+n)});f(function(){void 0!==i._addAttachClasses&&(u(i.element,i._addAttachClasses,e),!1!==i.options.addTargetClasses&&u(i.target,i._addAttachClasses,e),delete i._addAttachClasses)})}},{key:"position",value:function(){var h=this,et=arguments.length<=0||void 0===arguments[0]||arguments[0],p,d,ut,s;if(this.enabled){this.clearCache();p=ii(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,p);var k=this.cache("element-bounds",function(){return i(h.element)}),u=k.width,f=k.height;0===u&&0===f&&void 0!==this.lastSize?(d=this.lastSize,u=d.width,f=d.height):this.lastSize={width:u,height:f};var b=this.cache("target-bounds",function(){return h.getTargetBounds()}),tt=b,c=a(vt(this.attachment),{width:u,height:f}),v=a(vt(p),tt),it=a(this.offset,{width:u,height:f}),rt=a(this.targetOffset,tt);c=ot(c,it);v=ot(v,rt);for(var e=b.left+v.left-c.left,o=b.top+v.top-c.top,g=0;g<t.modules.length;++g){if(ut=t.modules[g],s=ut.position.call(this,{left:e,top:o,targetAttachment:p,targetPos:b,elementPos:k,offset:c,targetOffset:v,manualOffset:it,manualTargetOffset:rt,scrollbarSize:y,attachment:this.attachment}),!1===s)return!1;void 0!==s&&"object"==typeof s&&(o=s.top,e=s.left)}var n={page:{top:o,left:e},viewport:{top:o-pageYOffset,bottom:pageYOffset-o-f+innerHeight,left:e-pageXOffset,right:pageXOffset-e-u+innerWidth}},r=this.target.ownerDocument,ft=r.defaultView,y=void 0;return ft.innerHeight>r.documentElement.clientHeight&&(y=this.cache("scrollbar-size",w),n.viewport.bottom-=y.height),ft.innerWidth>r.documentElement.clientWidth&&(y=this.cache("scrollbar-size",w),n.viewport.right-=y.width),-1!==["","static"].indexOf(r.body.style.position)&&-1!==["","static"].indexOf(r.body.parentElement.style.position)||(n.page.bottom=r.body.scrollHeight-o-f,n.page.right=r.body.scrollWidth-e-u),void 0!==this.options.optimizations&&!1!==this.options.optimizations.moveElement&&void 0===this.targetModifier&&function(){var f=h.cache("target-offsetparent",function(){return l(h.target)}),t=h.cache("target-offsetparent-bounds",function(){return i(f)}),c=getComputedStyle(f),e=t,u={},o,s;(["Top","Left","Bottom","Right"].forEach(function(n){u[n.toLowerCase()]=parseFloat(c["border"+n+"Width"])}),t.right=r.body.scrollWidth-t.left-e.width+u.right,t.bottom=r.body.scrollHeight-t.top-e.height+u.bottom,n.page.top>=t.top+u.top&&n.page.bottom>=t.bottom&&n.page.left>=t.left+u.left&&n.page.right>=t.right)&&(o=f.scrollTop,s=f.scrollLeft,n.offset={top:n.page.top-t.top+o-u.top,left:n.page.left-t.left+s-u.left})}(),this.move(n),this.history.unshift(n),this.history.length>3&&this.history.pop(),et&&nt(),!0}}},{key:"move",value:function(n){var u=this,t,o,a,h,v,y,s,p,w,e,b;if(void 0!==this.element.parentNode){t={};for(o in n){t[o]={};for(e in n[o]){for(a=!1,h=0;h<this.history.length;++h)if(v=this.history[h],void 0!==v[o]&&!bt(v[o][e],n[o][e])){a=!0;break}a||(t[o][e]=!0)}}var i={top:"",left:"",right:"",bottom:""},c=function(n,t){if(!1!==(void 0!==u.options.optimizations?u.options.optimizations.gpu:null)){var r=void 0,f=void 0;n.top?(i.top=0,r=t.top):(i.bottom=0,r=-t.bottom);n.left?(i.left=0,f=t.left):(i.right=0,f=-t.right);window.matchMedia&&(window.matchMedia("only screen and (min-resolution: 1.3dppx)").matches||window.matchMedia("only screen and (-webkit-min-device-pixel-ratio: 1.3)").matches||(f=Math.round(f),r=Math.round(r)));i[tt]="translateX("+f+"px) translateY("+r+"px)";"msTransform"!==tt&&(i[tt]+=" translateZ(0)")}else n.top?i.top=t.top+"px":i.bottom=t.bottom+"px",n.left?i.left=t.left+"px":i.right=t.right+"px"},k=!1;if((t.page.top||t.page.bottom)&&(t.page.left||t.page.right)?(i.position="absolute",c(t.page,n.page)):(t.viewport.top||t.viewport.bottom)&&(t.viewport.left||t.viewport.right)?(i.position="fixed",c(t.viewport,n.viewport)):void 0!==t.offset&&t.offset.top&&t.offset.left?function(){i.position="absolute";var r=u.cache("target-offsetparent",function(){return l(u.target)});l(u.element)!==r&&f(function(){u.element.parentNode.removeChild(u.element);r.appendChild(u.element)});c(t.offset,n.offset);k=!0}():(i.position="absolute",c({top:!0,left:!0},n.page)),!k)if(this.options.bodyElement)this.element.parentNode!==this.options.bodyElement&&this.options.bodyElement.appendChild(this.element);else{for(y=!0,s=this.element.parentNode;s&&1===s.nodeType&&"BODY"!==s.tagName;){if("static"!==getComputedStyle(s).position){y=!1;break}s=s.parentNode}y||(this.element.parentNode.removeChild(this.element),this.element.ownerDocument.body.appendChild(this.element))}p={};w=!1;for(e in i)b=i[e],this.element.style[e]!==b&&(w=!0,p[e]=b);w&&f(function(){r(u.element.style,p);u.trigger("repositioned")})}}}]),s}(lt);pt.modules=[];t.position=at;var ri=r(pt,t),y=function(){function n(n,t){var r=[],u=!0,f=!1,e=void 0,o,i;try{for(i=n[Symbol.iterator]();!(u=(o=i.next()).done)&&(r.push(o.value),!t||r.length!==t);u=!0);}catch(n){f=!0;e=n}finally{try{!u&&i.return&&i.return()}finally{if(f)throw e;}}return r}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return n(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),n=t.Utils,i=n.getBounds,r=n.extend,u=n.updateClasses,f=n.defer,ui=["left","top","right","bottom"];t.modules.push({position:function(n){var l=this,e=n.top,o=n.left,b=n.targetAttachment,k;if(!this.options.constraints)return!0;var d=this.cache("element-bounds",function(){return i(l.element)}),h=d.height,c=d.width;0===c&&0===h&&void 0!==this.lastSize&&(k=this.lastSize,c=k.width,h=k.height);var g=this.cache("target-bounds",function(){return l.getTargetBounds()}),a=g.height,v=g.width,p=[this.getClass("pinned"),this.getClass("out-of-bounds")];this.options.constraints.forEach(function(n){var t=n.outOfBoundsClass,i=n.pinnedClass;t&&p.push(t);i&&p.push(i)});p.forEach(function(n){["left","top","right","bottom"].forEach(function(t){p.push(n+"-"+t)})});var w=[],s=r({},b),t=r({},this.attachment);return this.options.constraints.forEach(function(n){var tt=n.to,d=n.attachment,r=n.pin,f,p,nt,g,i,u,k;void 0===d&&(d="");f=void 0;p=void 0;d.indexOf(" ")>=0?(nt=d.split(" "),g=y(nt,2),p=g[0],f=g[1]):f=p=d;i=kt(l,tt);"target"!==p&&"both"!==p||(e<i[1]&&"top"===s.top&&(e+=a,s.top="bottom"),e+h>i[3]&&"bottom"===s.top&&(e-=a,s.top="top"));"together"===p&&("top"===s.top&&("bottom"===t.top&&e<i[1]?(e+=a,s.top="bottom",e+=h,t.top="top"):"top"===t.top&&e+h>i[3]&&e-(h-a)>=i[1]&&(e-=h-a,s.top="bottom",t.top="bottom")),"bottom"===s.top&&("top"===t.top&&e+h>i[3]?(e-=a,s.top="top",e-=h,t.top="bottom"):"bottom"===t.top&&e<i[1]&&e+(2*h-a)<=i[3]&&(e+=h-a,s.top="top",t.top="top")),"middle"===s.top&&(e+h>i[3]&&"top"===t.top?(e-=h,t.top="bottom"):e<i[1]&&"bottom"===t.top&&(e+=h,t.top="top")));"target"!==f&&"both"!==f||(o<i[0]&&"left"===s.left&&(o+=v,s.left="right"),o+c>i[2]&&"right"===s.left&&(o-=v,s.left="left"));"together"===f&&(o<i[0]&&"left"===s.left?"right"===t.left?(o+=v,s.left="right",o+=c,t.left="left"):"left"===t.left&&(o+=v,s.left="right",o-=c,t.left="right"):o+c>i[2]&&"right"===s.left?"left"===t.left?(o-=v,s.left="left",o-=c,t.left="right"):"right"===t.left&&(o-=v,s.left="left",o+=c,t.left="left"):"center"===s.left&&(o+c>i[2]&&"left"===t.left?(o-=c,t.left="right"):o<i[0]&&"right"===t.left&&(o+=c,t.left="left")));"element"!==p&&"both"!==p||(e<i[1]&&"bottom"===t.top&&(e+=h,t.top="top"),e+h>i[3]&&"top"===t.top&&(e-=h,t.top="bottom"));"element"!==f&&"both"!==f||(o<i[0]&&("right"===t.left?(o+=c,t.left="left"):"center"===t.left&&(o+=c/2,t.left="left")),o+c>i[2]&&("left"===t.left?(o-=c,t.left="right"):"center"===t.left&&(o-=c/2,t.left="right")));"string"==typeof r?r=r.split(",").map(function(n){return n.trim()}):!0===r&&(r=["top","left","right","bottom"]);r=r||[];u=[];k=[];e<i[1]&&(r.indexOf("top")>=0?(e=i[1],u.push("top")):k.push("top"));e+h>i[3]&&(r.indexOf("bottom")>=0?(e=i[3]-h,u.push("bottom")):k.push("bottom"));o<i[0]&&(r.indexOf("left")>=0?(o=i[0],u.push("left")):k.push("left"));o+c>i[2]&&(r.indexOf("right")>=0?(o=i[2]-c,u.push("right")):k.push("right"));u.length&&function(){var n=void 0;n=void 0!==l.options.pinnedClass?l.options.pinnedClass:l.getClass("pinned");w.push(n);u.forEach(function(t){w.push(n+"-"+t)})}();k.length&&function(){var n=void 0;n=void 0!==l.options.outOfBoundsClass?l.options.outOfBoundsClass:l.getClass("out-of-bounds");w.push(n);k.forEach(function(t){w.push(n+"-"+t)})}();(u.indexOf("left")>=0||u.indexOf("right")>=0)&&(t.left=s.left=!1);(u.indexOf("top")>=0||u.indexOf("bottom")>=0)&&(t.top=s.top=!1);s.top===b.top&&s.left===b.left&&t.top===l.attachment.top&&t.left===l.attachment.left||(l.updateAttachClasses(t,s),l.trigger("update",{attachment:t,targetAttachment:s}))}),f(function(){!1!==l.options.addTargetClasses&&u(l.target,w,p);u(l.element,w,p)}),{top:e,left:o}}});var n=t.Utils,i=n.getBounds,u=n.updateClasses,f=n.defer;return t.modules.push({position:function(n){var t=this,h=n.top,c=n.left,l=this.cache("element-bounds",function(){return i(t.element)}),y=l.height,p=l.width,r=this.getTargetBounds(),a=h+y,v=c+p,e=[];h<=r.bottom&&a>=r.top&&["left","right"].forEach(function(n){var t=r[n];t!==c&&t!==v||e.push(n)});c<=r.right&&v>=r.left&&["top","bottom"].forEach(function(n){var t=r[n];t!==h&&t!==a||e.push(n)});var o=[],s=[];return o.push(this.getClass("abutted")),["left","top","right","bottom"].forEach(function(n){o.push(t.getClass("abutted")+"-"+n)}),e.length&&s.push(this.getClass("abutted")),e.forEach(function(n){s.push(t.getClass("abutted")+"-"+n)}),f(function(){!1!==t.options.addTargetClasses&&u(t.target,s,o);u(t.element,s,o)}),!0}}),y=function(){function n(n,t){var r=[],u=!0,f=!1,e=void 0,o,i;try{for(i=n[Symbol.iterator]();!(u=(o=i.next()).done)&&(r.push(o.value),!t||r.length!==t);u=!0);}catch(n){f=!0;e=n}finally{try{!u&&i.return&&i.return()}finally{if(f)throw e;}}return r}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return n(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),t.modules.push({position:function(n){var u=n.top,f=n.left,t,i,r,o,e;if(this.options.shift)return t=this.options.shift,"function"==typeof this.options.shift&&(t=this.options.shift.call(this,{top:u,left:f})),i=void 0,r=void 0,"string"==typeof t?(t=t.split(" "),t[1]=t[1]||t[0],o=t,e=y(o,2),i=e[0],r=e[1],i=parseFloat(i,10),r=parseFloat(r,10)):(i=t.top,r=t.left),u+=i,f+=r,{top:u,left:f}}}),ri}),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");+function(n){var t=n.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1||t[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0");}(jQuery),function(){function f(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?n:t}function e(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}function t(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},i=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),n=function(n){function u(n){return{}.toString.call(n).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function f(n){return(n[0]||n).nodeType}function e(){return{bindType:t.end,delegateType:t.end,handle:function(t){if(n(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}}}function o(){var t,n;if(window.QUnit)return!1;t=document.createElement("bootstrap");for(n in r)if(void 0!==t.style[n])return{end:r[n]};return!1}function s(t){var u=this,r=!1;return n(this).one(i.TRANSITION_END,function(){r=!0}),setTimeout(function(){r||i.triggerTransitionEnd(u)},t),this}var t=!1,r={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},i={TRANSITION_END:"bsTransitionEnd",getUID:function(n){do n+=~~(1e6*Math.random());while(document.getElementById(n));return n},getSelectorFromElement:function(n){var t=n.getAttribute("data-target");return t||(t=n.getAttribute("href")||"",t=/^#[a-z]/i.test(t)?t:null),t},reflow:function(n){return n.offsetHeight},triggerTransitionEnd:function(i){n(i).trigger(t.end)},supportsTransitionEnd:function(){return Boolean(t)},typeCheckConfig:function(n,t,i){for(var r in i)if(i.hasOwnProperty(r)){var o=i[r],e=t[r],s=e&&f(e)?"element":u(e);if(!new RegExp(o).test(s))throw new Error(n.toUpperCase()+': Option "'+r+'" provided type "'+s+'" but expected type "'+o+'".');}}};return function(){t=o();n.fn.emulateTransitionEnd=s;i.supportsTransitionEnd()&&(n.event.special[i.TRANSITION_END]=e())}(),i}(jQuery),u=(function(r){var u="alert",e="bs.alert",o="."+e,c=r.fn[u],s={CLOSE:"close"+o,CLOSED:"closed"+o,CLICK_DATA_API:"click"+o+".data-api"},h={ALERT:"alert",FADE:"fade",SHOW:"show"},f=function(){function u(n){t(this,u);this._element=n}return u.prototype.close=function(n){n=n||this._element;var t=this._getRootElement(n);this._triggerCloseEvent(t).isDefaultPrevented()||this._removeElement(t)},u.prototype.dispose=function(){r.removeData(this._element,e);this._element=null},u.prototype._getRootElement=function(t){var u=n.getSelectorFromElement(t),i=!1;return u&&(i=r(u)[0]),i||(i=r(t).closest("."+h.ALERT)[0]),i},u.prototype._triggerCloseEvent=function(n){var t=r.Event(s.CLOSE);return r(n).trigger(t),t},u.prototype._removeElement=function(t){var i=this;return r(t).removeClass(h.SHOW),n.supportsTransitionEnd()&&r(t).hasClass(h.FADE)?void r(t).one(n.TRANSITION_END,function(n){return i._destroyElement(t,n)}).emulateTransitionEnd(150):void this._destroyElement(t)},u.prototype._destroyElement=function(n){r(n).detach().trigger(s.CLOSED).remove()},u._jQueryInterface=function(n){return this.each(function(){var i=r(this),t=i.data(e);t||(t=new u(this),i.data(e,t));"close"===n&&t[n](this)})},u._handleDismiss=function(n){return function(t){t&&t.preventDefault();n.close(this)}},i(u,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.6"}}]),u}();r(document).on(s.CLICK_DATA_API,{DISMISS:'[data-dismiss="alert"]'}.DISMISS,f._handleDismiss(new f));r.fn[u]=f._jQueryInterface;r.fn[u].Constructor=f;r.fn[u].noConflict=function(){return r.fn[u]=c,f._jQueryInterface}}(jQuery),function(n){var f="button",e="bs.button",s="."+e,h=".data-api",l=n.fn[f],r={ACTIVE:"active",BUTTON:"btn",FOCUS:"focus"},u={DATA_TOGGLE_CARROT:'[data-toggle^="button"]',DATA_TOGGLE:'[data-toggle="buttons"]',INPUT:"input",ACTIVE:".active",BUTTON:".btn"},c={CLICK_DATA_API:"click"+s+h,FOCUS_BLUR_DATA_API:"focus"+s+h+" blur"+s+h},o=function(){function f(n){t(this,f);this._element=n}return f.prototype.toggle=function(){var i=!0,e=n(this._element).closest(u.DATA_TOGGLE)[0],t,f;e&&(t=n(this._element).find(u.INPUT)[0],t&&("radio"===t.type&&(t.checked&&n(this._element).hasClass(r.ACTIVE)?i=!1:(f=n(e).find(u.ACTIVE)[0],f&&n(f).removeClass(r.ACTIVE))),i&&(t.checked=!n(this._element).hasClass(r.ACTIVE),n(t).trigger("change")),t.focus()));this._element.setAttribute("aria-pressed",!n(this._element).hasClass(r.ACTIVE));i&&n(this._element).toggleClass(r.ACTIVE)},f.prototype.dispose=function(){n.removeData(this._element,e);this._element=null},f._jQueryInterface=function(t){return this.each(function(){var i=n(this).data(e);i||(i=new f(this),n(this).data(e,i));"toggle"===t&&i[t]()})},i(f,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.6"}}]),f}();n(document).on(c.CLICK_DATA_API,u.DATA_TOGGLE_CARROT,function(t){t.preventDefault();var i=t.target;n(i).hasClass(r.BUTTON)||(i=n(i).closest(u.BUTTON));o._jQueryInterface.call(n(i),"toggle")}).on(c.FOCUS_BLUR_DATA_API,u.DATA_TOGGLE_CARROT,function(t){var i=n(t.target).closest(u.BUTTON)[0];n(i).toggleClass(r.FOCUS,/^focus(in)?$/.test(t.type))});n.fn[f]=o._jQueryInterface;n.fn[f].Constructor=o;n.fn[f].noConflict=function(){return n.fn[f]=l,o._jQueryInterface}}(jQuery),function(u){var c="carousel",l="bs.carousel",o="."+l,y=".data-api",p=u.fn[c],v={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0},w={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean"},e={NEXT:"next",PREV:"prev",LEFT:"left",RIGHT:"right"},s={SLIDE:"slide"+o,SLID:"slid"+o,KEYDOWN:"keydown"+o,MOUSEENTER:"mouseenter"+o,MOUSELEAVE:"mouseleave"+o,LOAD_DATA_API:"load"+o+y,CLICK_DATA_API:"click"+o+y},f={CAROUSEL:"carousel",ACTIVE:"active",SLIDE:"slide",RIGHT:"carousel-item-right",LEFT:"carousel-item-left",NEXT:"carousel-item-next",PREV:"carousel-item-prev",ITEM:"carousel-item"},h={ACTIVE:".active",ACTIVE_ITEM:".active.carousel-item",ITEM:".carousel-item",NEXT_PREV:".carousel-item-next, .carousel-item-prev",INDICATORS:".carousel-indicators",DATA_SLIDE:"[data-slide], [data-slide-to]",DATA_RIDE:'[data-ride="carousel"]'},a=function(){function a(n,i){t(this,a);this._items=null;this._interval=null;this._activeElement=null;this._isPaused=!1;this._isSliding=!1;this._config=this._getConfig(i);this._element=u(n)[0];this._indicatorsElement=u(this._element).find(h.INDICATORS)[0];this._addEventListeners()}return a.prototype.next=function(){if(this._isSliding)throw new Error("Carousel is sliding");this._slide(e.NEXT)},a.prototype.nextWhenVisible=function(){document.hidden||this.next()},a.prototype.prev=function(){if(this._isSliding)throw new Error("Carousel is sliding");this._slide(e.PREVIOUS)},a.prototype.pause=function(t){t||(this._isPaused=!0);u(this._element).find(h.NEXT_PREV)[0]&&n.supportsTransitionEnd()&&(n.triggerTransitionEnd(this._element),this.cycle(!0));clearInterval(this._interval);this._interval=null},a.prototype.cycle=function(n){n||(this._isPaused=!1);this._interval&&(clearInterval(this._interval),this._interval=null);this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},a.prototype.to=function(n){var r=this,t,i;if(this._activeElement=u(this._element).find(h.ACTIVE_ITEM)[0],t=this._getItemIndex(this._activeElement),!(n>this._items.length-1||n<0)){if(this._isSliding)return void u(this._element).one(s.SLID,function(){return r.to(n)});if(t===n)return this.pause(),void this.cycle();i=n>t?e.NEXT:e.PREVIOUS;this._slide(i,this._items[n])}},a.prototype.dispose=function(){u(this._element).off(o);u.removeData(this._element,l);this._items=null;this._config=null;this._element=null;this._interval=null;this._isPaused=null;this._isSliding=null;this._activeElement=null;this._indicatorsElement=null},a.prototype._getConfig=function(t){return t=u.extend({},v,t),n.typeCheckConfig(c,t,w),t},a.prototype._addEventListeners=function(){var n=this;this._config.keyboard&&u(this._element).on(s.KEYDOWN,function(t){return n._keydown(t)});"hover"!==this._config.pause||"ontouchstart"in document.documentElement||u(this._element).on(s.MOUSEENTER,function(t){return n.pause(t)}).on(s.MOUSELEAVE,function(t){return n.cycle(t)})},a.prototype._keydown=function(n){if(!/input|textarea/i.test(n.target.tagName))switch(n.which){case 37:n.preventDefault();this.prev();break;case 39:n.preventDefault();this.next();break;default:return}},a.prototype._getItemIndex=function(n){return this._items=u.makeArray(u(n).parent().find(h.ITEM)),this._items.indexOf(n)},a.prototype._getItemByDirection=function(n,t){var f=n===e.NEXT,o=n===e.PREVIOUS,i=this._getItemIndex(t),s=this._items.length-1,u,r;return(o&&0===i||f&&i===s)&&!this._config.wrap?t:(u=n===e.PREVIOUS?-1:1,r=(i+u)%this._items.length,-1===r?this._items[this._items.length-1]:this._items[r])},a.prototype._triggerSlideEvent=function(n,t){var i=u.Event(s.SLIDE,{relatedTarget:n,direction:t});return u(this._element).trigger(i),i},a.prototype._setActiveIndicatorElement=function(n){if(this._indicatorsElement){u(this._indicatorsElement).find(h.ACTIVE).removeClass(f.ACTIVE);var t=this._indicatorsElement.children[this._getItemIndex(n)];t&&u(t).addClass(f.ACTIVE)}},a.prototype._slide=function(t,i){var y=this,o=u(this._element).find(h.ACTIVE_ITEM)[0],r=i||o&&this._getItemByDirection(t,o),p=Boolean(this._interval),c=void 0,l=void 0,a=void 0,v;if(t===e.NEXT?(c=f.LEFT,l=f.NEXT,a=e.LEFT):(c=f.RIGHT,l=f.PREV,a=e.RIGHT),r&&u(r).hasClass(f.ACTIVE))return void(this._isSliding=!1);!this._triggerSlideEvent(r,a).isDefaultPrevented()&&o&&r&&(this._isSliding=!0,p&&this.pause(),this._setActiveIndicatorElement(r),v=u.Event(s.SLID,{relatedTarget:r,direction:a}),n.supportsTransitionEnd()&&u(this._element).hasClass(f.SLIDE)?(u(r).addClass(l),n.reflow(r),u(o).addClass(c),u(r).addClass(c),u(o).one(n.TRANSITION_END,function(){u(r).removeClass(c+" "+l).addClass(f.ACTIVE);u(o).removeClass(f.ACTIVE+" "+l+" "+c);y._isSliding=!1;setTimeout(function(){return u(y._element).trigger(v)},0)}).emulateTransitionEnd(600)):(u(o).removeClass(f.ACTIVE),u(r).addClass(f.ACTIVE),this._isSliding=!1,u(this._element).trigger(v)),p&&this.cycle())},a._jQueryInterface=function(n){return this.each(function(){var t=u(this).data(l),f=u.extend({},v,u(this).data()),i;if("object"===(void 0===n?"undefined":r(n))&&u.extend(f,n),i="string"==typeof n?n:f.slide,t||(t=new a(this,f),u(this).data(l,t)),"number"==typeof n)t.to(n);else if("string"==typeof i){if(void 0===t[i])throw new Error('No method named "'+i+'"');t[i]()}else f.interval&&(t.pause(),t.cycle())})},a._dataApiClickHandler=function(t){var o=n.getSelectorFromElement(this),i,e,r;o&&(i=u(o)[0],i&&u(i).hasClass(f.CAROUSEL)&&(e=u.extend({},u(i).data(),u(this).data()),r=this.getAttribute("data-slide-to"),r&&(e.interval=!1),a._jQueryInterface.call(u(i),e),r&&u(i).data(l).to(r),t.preventDefault()))},i(a,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.6"}},{key:"Default",get:function(){return v}}]),a}();u(document).on(s.CLICK_DATA_API,h.DATA_SLIDE,a._dataApiClickHandler);u(window).on(s.LOAD_DATA_API,function(){u(h.DATA_RIDE).each(function(){var n=u(this);a._jQueryInterface.call(n,n.data())})});u.fn[c]=a._jQueryInterface;u.fn[c].Constructor=a;u.fn[c].noConflict=function(){return u.fn[c]=p,a._jQueryInterface}}(jQuery),function(u){var o="collapse",e="bs.collapse",s="."+e,y=u.fn[o],a={toggle:!0,parent:""},p={toggle:"boolean",parent:"string"},h={SHOW:"show"+s,SHOWN:"shown"+s,HIDE:"hide"+s,HIDDEN:"hidden"+s,CLICK_DATA_API:"click"+s+".data-api"},f={SHOW:"show",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},l={WIDTH:"width",HEIGHT:"height"},v={ACTIVES:".card > .show, .card > .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},c=function(){function s(n,i){t(this,s);this._isTransitioning=!1;this._element=n;this._config=this._getConfig(i);this._triggerArray=u.makeArray(u('[data-toggle="collapse"][href="#'+n.id+'"],[data-toggle="collapse"][data-target="#'+n.id+'"]'));this._parent=this._config.parent?this._getParent():null;this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray);this._config.toggle&&this.toggle()}return s.prototype.toggle=function(){u(this._element).hasClass(f.SHOW)?this.hide():this.show()},s.prototype.show=function(){var r=this,t,o,c,i,l,a,y;if(this._isTransitioning)throw new Error("Collapse is transitioning");if(!u(this._element).hasClass(f.SHOW)&&(t=void 0,o=void 0,(this._parent&&(t=u.makeArray(u(this._parent).find(v.ACTIVES)),t.length||(t=null)),!(t&&(o=u(t).data(e))&&o._isTransitioning))&&(c=u.Event(h.SHOW),u(this._element).trigger(c),!c.isDefaultPrevented()))){if(t&&(s._jQueryInterface.call(u(t),"hide"),o||u(t).data(e,null)),i=this._getDimension(),u(this._element).removeClass(f.COLLAPSE).addClass(f.COLLAPSING),this._element.style[i]=0,this._element.setAttribute("aria-expanded",!0),this._triggerArray.length&&u(this._triggerArray).removeClass(f.COLLAPSED).attr("aria-expanded",!0),this.setTransitioning(!0),l=function(){u(r._element).removeClass(f.COLLAPSING).addClass(f.COLLAPSE).addClass(f.SHOW);r._element.style[i]="";r.setTransitioning(!1);u(r._element).trigger(h.SHOWN)},!n.supportsTransitionEnd())return void l();a=i[0].toUpperCase()+i.slice(1);y="scroll"+a;u(this._element).one(n.TRANSITION_END,l).emulateTransitionEnd(600);this._element.style[i]=this._element[y]+"px"}},s.prototype.hide=function(){var e=this,i,t,o,r;if(this._isTransitioning)throw new Error("Collapse is transitioning");if(u(this._element).hasClass(f.SHOW)&&(i=u.Event(h.HIDE),u(this._element).trigger(i),!i.isDefaultPrevented()))return t=this._getDimension(),o=t===l.WIDTH?"offsetWidth":"offsetHeight",this._element.style[t]=this._element[o]+"px",n.reflow(this._element),u(this._element).addClass(f.COLLAPSING).removeClass(f.COLLAPSE).removeClass(f.SHOW),this._element.setAttribute("aria-expanded",!1),this._triggerArray.length&&u(this._triggerArray).addClass(f.COLLAPSED).attr("aria-expanded",!1),this.setTransitioning(!0),r=function(){e.setTransitioning(!1);u(e._element).removeClass(f.COLLAPSING).addClass(f.COLLAPSE).trigger(h.HIDDEN)},this._element.style[t]="",n.supportsTransitionEnd()?void u(this._element).one(n.TRANSITION_END,r).emulateTransitionEnd(600):void r()},s.prototype.setTransitioning=function(n){this._isTransitioning=n},s.prototype.dispose=function(){u.removeData(this._element,e);this._config=null;this._parent=null;this._element=null;this._triggerArray=null;this._isTransitioning=null},s.prototype._getConfig=function(t){return t=u.extend({},a,t),t.toggle=Boolean(t.toggle),n.typeCheckConfig(o,t,p),t},s.prototype._getDimension=function(){return u(this._element).hasClass(l.WIDTH)?l.WIDTH:l.HEIGHT},s.prototype._getParent=function(){var t=this,n=u(this._config.parent)[0],i='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return u(n).find(i).each(function(n,i){t._addAriaAndCollapsedClass(s._getTargetFromElement(i),[i])}),n},s.prototype._addAriaAndCollapsedClass=function(n,t){if(n){var i=u(n).hasClass(f.SHOW);n.setAttribute("aria-expanded",i);t.length&&u(t).toggleClass(f.COLLAPSED,!i).attr("aria-expanded",i)}},s._getTargetFromElement=function(t){var i=n.getSelectorFromElement(t);return i?u(i)[0]:null},s._jQueryInterface=function(n){return this.each(function(){var i=u(this),t=i.data(e),f=u.extend({},a,i.data(),"object"===(void 0===n?"undefined":r(n))&&n);if(!t&&f.toggle&&/show|hide/.test(n)&&(f.toggle=!1),t||(t=new s(this,f),i.data(e,t)),"string"==typeof n){if(void 0===t[n])throw new Error('No method named "'+n+'"');t[n]()}})},i(s,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.6"}},{key:"Default",get:function(){return a}}]),s}();u(document).on(h.CLICK_DATA_API,v.DATA_TOGGLE,function(n){n.preventDefault();var t=c._getTargetFromElement(this),i=u(t).data(e),r=i?"toggle":u(this).data();c._jQueryInterface.call(u(t),r)});u.fn[o]=c._jQueryInterface;u.fn[o].Constructor=c;u.fn[o].noConflict=function(){return u.fn[o]=y,c._jQueryInterface}}(jQuery),function(r){var h="dropdown",c="bs.dropdown",e="."+c,l=".data-api",a=r.fn[h],u={HIDE:"hide"+e,HIDDEN:"hidden"+e,SHOW:"show"+e,SHOWN:"shown"+e,CLICK:"click"+e,CLICK_DATA_API:"click"+e+l,FOCUSIN_DATA_API:"focusin"+e+l,KEYDOWN_DATA_API:"keydown"+e+l},o={BACKDROP:"dropdown-backdrop",DISABLED:"disabled",SHOW:"show"},f={BACKDROP:".dropdown-backdrop",DATA_TOGGLE:'[data-toggle="dropdown"]',FORM_CHILD:".dropdown form",ROLE_MENU:'[role="menu"]',ROLE_LISTBOX:'[role="listbox"]',NAVBAR_NAV:".navbar-nav",VISIBLE_ITEMS:'[role="menu"] li:not(.disabled) a, [role="listbox"] li:not(.disabled) a'},s=function(){function s(n){t(this,s);this._element=n;this._addEventListeners()}return s.prototype.toggle=function(){var n,h,t,i,e;return this.disabled||r(this).hasClass(o.DISABLED)?!1:(n=s._getParentFromElement(this),h=r(n).hasClass(o.SHOW),s._clearMenus(),h)?!1:("ontouchstart"in document.documentElement&&!r(n).closest(f.NAVBAR_NAV).length&&(t=document.createElement("div"),t.className=o.BACKDROP,r(t).insertBefore(this),r(t).on("click",s._clearMenus)),i={relatedTarget:this},e=r.Event(u.SHOW,i),r(n).trigger(e),!e.isDefaultPrevented()&&(this.focus(),this.setAttribute("aria-expanded",!0),r(n).toggleClass(o.SHOW),r(n).trigger(r.Event(u.SHOWN,i)),!1))},s.prototype.dispose=function(){r.removeData(this._element,c);r(this._element).off(e);this._element=null},s.prototype._addEventListeners=function(){r(this._element).on(u.CLICK,this.toggle)},s._jQueryInterface=function(n){return this.each(function(){var t=r(this).data(c);if(t||(t=new s(this),r(this).data(c,t)),"string"==typeof n){if(void 0===t[n])throw new Error('No method named "'+n+'"');t[n].call(this)}})},s._clearMenus=function(n){var h,i,t,e,c,l;if(!n||3!==n.which)for(h=r(f.BACKDROP)[0],h&&h.parentNode.removeChild(h),i=r.makeArray(r(f.DATA_TOGGLE)),t=0;t<i.length;t++)e=s._getParentFromElement(i[t]),c={relatedTarget:i[t]},!r(e).hasClass(o.SHOW)||n&&("click"===n.type&&/input|textarea/i.test(n.target.tagName)||"focusin"===n.type)&&r.contains(e,n.target)||(l=r.Event(u.HIDE,c),r(e).trigger(l),l.isDefaultPrevented()||(i[t].setAttribute("aria-expanded","false"),r(e).removeClass(o.SHOW).trigger(r.Event(u.HIDDEN,c))))},s._getParentFromElement=function(t){var i=void 0,u=n.getSelectorFromElement(t);return u&&(i=r(u)[0]),i||t.parentNode},s._dataApiKeydownHandler=function(n){var u,e,h,i,t;if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)&&(n.preventDefault(),n.stopPropagation(),!this.disabled&&!r(this).hasClass(o.DISABLED))){if(u=s._getParentFromElement(this),e=r(u).hasClass(o.SHOW),!e&&27!==n.which||e&&27===n.which)return 27===n.which&&(h=r(u).find(f.DATA_TOGGLE)[0],r(h).trigger("focus")),void r(this).trigger("click");i=r(u).find(f.VISIBLE_ITEMS).get();i.length&&(t=i.indexOf(n.target),38===n.which&&t>0&&t--,40===n.which&&t<i.length-1&&t++,t<0&&(t=0),i[t].focus())}},i(s,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.6"}}]),s}();r(document).on(u.KEYDOWN_DATA_API,f.DATA_TOGGLE,s._dataApiKeydownHandler).on(u.KEYDOWN_DATA_API,f.ROLE_MENU,s._dataApiKeydownHandler).on(u.KEYDOWN_DATA_API,f.ROLE_LISTBOX,s._dataApiKeydownHandler).on(u.CLICK_DATA_API+" "+u.FOCUSIN_DATA_API,s._clearMenus).on(u.CLICK_DATA_API,f.DATA_TOGGLE,s.prototype.toggle).on(u.CLICK_DATA_API,f.FORM_CHILD,function(n){n.stopPropagation()});r.fn[h]=s._jQueryInterface;r.fn[h].Constructor=s;r.fn[h].noConflict=function(){return r.fn[h]=a,s._jQueryInterface}}(jQuery),function(u){var s="modal",h="bs.modal",o="."+h,v=u.fn[s],a={backdrop:!0,keyboard:!0,focus:!0,show:!0},y={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},f={HIDE:"hide"+o,HIDDEN:"hidden"+o,SHOW:"show"+o,SHOWN:"shown"+o,FOCUSIN:"focusin"+o,RESIZE:"resize"+o,CLICK_DISMISS:"click.dismiss"+o,KEYDOWN_DISMISS:"keydown.dismiss"+o,MOUSEUP_DISMISS:"mouseup.dismiss"+o,MOUSEDOWN_DISMISS:"mousedown.dismiss"+o,CLICK_DATA_API:"click"+o+".data-api"},e={SCROLLBAR_MEASURER:"modal-scrollbar-measure",BACKDROP:"modal-backdrop",OPEN:"modal-open",FADE:"fade",SHOW:"show"},c={DIALOG:".modal-dialog",DATA_TOGGLE:'[data-toggle="modal"]',DATA_DISMISS:'[data-dismiss="modal"]',FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top"},l=function(){function l(n,i){t(this,l);this._config=this._getConfig(i);this._element=n;this._dialog=u(n).find(c.DIALOG)[0];this._backdrop=null;this._isShown=!1;this._isBodyOverflowing=!1;this._ignoreBackdropClick=!1;this._isTransitioning=!1;this._originalBodyPadding=0;this._scrollbarWidth=0}return l.prototype.toggle=function(n){return this._isShown?this.hide():this.show(n)},l.prototype.show=function(t){var i=this,r;if(this._isTransitioning)throw new Error("Modal is transitioning");n.supportsTransitionEnd()&&u(this._element).hasClass(e.FADE)&&(this._isTransitioning=!0);r=u.Event(f.SHOW,{relatedTarget:t});u(this._element).trigger(r);this._isShown||r.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),u(document.body).addClass(e.OPEN),this._setEscapeEvent(),this._setResizeEvent(),u(this._element).on(f.CLICK_DISMISS,c.DATA_DISMISS,function(n){return i.hide(n)}),u(this._dialog).on(f.MOUSEDOWN_DISMISS,function(){u(i._element).one(f.MOUSEUP_DISMISS,function(n){u(n.target).is(i._element)&&(i._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return i._showElement(t)}))},l.prototype.hide=function(t){var o=this,i,r;if(t&&t.preventDefault(),this._isTransitioning)throw new Error("Modal is transitioning");i=n.supportsTransitionEnd()&&u(this._element).hasClass(e.FADE);i&&(this._isTransitioning=!0);r=u.Event(f.HIDE);u(this._element).trigger(r);this._isShown&&!r.isDefaultPrevented()&&(this._isShown=!1,this._setEscapeEvent(),this._setResizeEvent(),u(document).off(f.FOCUSIN),u(this._element).removeClass(e.SHOW),u(this._element).off(f.CLICK_DISMISS),u(this._dialog).off(f.MOUSEDOWN_DISMISS),i?u(this._element).one(n.TRANSITION_END,function(n){return o._hideModal(n)}).emulateTransitionEnd(300):this._hideModal())},l.prototype.dispose=function(){u.removeData(this._element,h);u(window,document,this._element,this._backdrop).off(o);this._config=null;this._element=null;this._dialog=null;this._backdrop=null;this._isShown=null;this._isBodyOverflowing=null;this._ignoreBackdropClick=null;this._originalBodyPadding=null;this._scrollbarWidth=null},l.prototype._getConfig=function(t){return t=u.extend({},a,t),n.typeCheckConfig(s,t,y),t},l.prototype._showElement=function(t){var i=this,o=n.supportsTransitionEnd()&&u(this._element).hasClass(e.FADE),s,r;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element);this._element.style.display="block";this._element.removeAttribute("aria-hidden");this._element.scrollTop=0;o&&n.reflow(this._element);u(this._element).addClass(e.SHOW);this._config.focus&&this._enforceFocus();s=u.Event(f.SHOWN,{relatedTarget:t});r=function(){i._config.focus&&i._element.focus();i._isTransitioning=!1;u(i._element).trigger(s)};o?u(this._dialog).one(n.TRANSITION_END,r).emulateTransitionEnd(300):r()},l.prototype._enforceFocus=function(){var n=this;u(document).off(f.FOCUSIN).on(f.FOCUSIN,function(t){document===t.target||n._element===t.target||u(n._element).has(t.target).length||n._element.focus()})},l.prototype._setEscapeEvent=function(){var n=this;this._isShown&&this._config.keyboard?u(this._element).on(f.KEYDOWN_DISMISS,function(t){27===t.which&&n.hide()}):this._isShown||u(this._element).off(f.KEYDOWN_DISMISS)},l.prototype._setResizeEvent=function(){var n=this;this._isShown?u(window).on(f.RESIZE,function(t){return n._handleUpdate(t)}):u(window).off(f.RESIZE)},l.prototype._hideModal=function(){var n=this;this._element.style.display="none";this._element.setAttribute("aria-hidden","true");this._isTransitioning=!1;this._showBackdrop(function(){u(document.body).removeClass(e.OPEN);n._resetAdjustments();n._resetScrollbar();u(n._element).trigger(f.HIDDEN)})},l.prototype._removeBackdrop=function(){this._backdrop&&(u(this._backdrop).remove(),this._backdrop=null)},l.prototype._showBackdrop=function(t){var i=this,r=u(this._element).hasClass(e.FADE)?e.FADE:"",o,s;if(this._isShown&&this._config.backdrop){if(o=n.supportsTransitionEnd()&&r,this._backdrop=document.createElement("div"),this._backdrop.className=e.BACKDROP,r&&u(this._backdrop).addClass(r),u(this._backdrop).appendTo(document.body),u(this._element).on(f.CLICK_DISMISS,function(n){return i._ignoreBackdropClick?void(i._ignoreBackdropClick=!1):void(n.target===n.currentTarget&&("static"===i._config.backdrop?i._element.focus():i.hide()))}),o&&n.reflow(this._backdrop),u(this._backdrop).addClass(e.SHOW),!t)return;if(!o)return void t();u(this._backdrop).one(n.TRANSITION_END,t).emulateTransitionEnd(150)}else!this._isShown&&this._backdrop?(u(this._backdrop).removeClass(e.SHOW),s=function(){i._removeBackdrop();t&&t()},n.supportsTransitionEnd()&&u(this._element).hasClass(e.FADE)?u(this._backdrop).one(n.TRANSITION_END,s).emulateTransitionEnd(150):s()):t&&t()},l.prototype._handleUpdate=function(){this._adjustDialog()},l.prototype._adjustDialog=function(){var n=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&n&&(this._element.style.paddingLeft=this._scrollbarWidth+"px");this._isBodyOverflowing&&!n&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},l.prototype._resetAdjustments=function(){this._element.style.paddingLeft="";this._element.style.paddingRight=""},l.prototype._checkScrollbar=function(){this._isBodyOverflowing=document.body.clientWidth<window.innerWidth;this._scrollbarWidth=this._getScrollbarWidth()},l.prototype._setScrollbar=function(){var n=parseInt(u(c.FIXED_CONTENT).css("padding-right")||0,10);this._originalBodyPadding=document.body.style.paddingRight||"";this._isBodyOverflowing&&(document.body.style.paddingRight=n+this._scrollbarWidth+"px")},l.prototype._resetScrollbar=function(){document.body.style.paddingRight=this._originalBodyPadding},l.prototype._getScrollbarWidth=function(){var n=document.createElement("div"),t;return n.className=e.SCROLLBAR_MEASURER,document.body.appendChild(n),t=n.offsetWidth-n.clientWidth,document.body.removeChild(n),t},l._jQueryInterface=function(n,t){return this.each(function(){var i=u(this).data(h),f=u.extend({},l.Default,u(this).data(),"object"===(void 0===n?"undefined":r(n))&&n);if(i||(i=new l(this,f),u(this).data(h,i)),"string"==typeof n){if(void 0===i[n])throw new Error('No method named "'+n+'"');i[n](t)}else f.show&&i.show(t)})},i(l,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.6"}},{key:"Default",get:function(){return a}}]),l}();u(document).on(f.CLICK_DATA_API,c.DATA_TOGGLE,function(t){var r=this,i=void 0,e=n.getSelectorFromElement(this),o,s;e&&(i=u(e)[0]);o=u(i).data(h)?"toggle":u.extend({},u(i).data(),u(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||t.preventDefault();s=u(i).one(f.SHOW,function(n){n.isDefaultPrevented()||s.one(f.HIDDEN,function(){u(r).is(":visible")&&r.focus()})});l._jQueryInterface.call(u(i),o,this)});u.fn[s]=l._jQueryInterface;u.fn[s].Constructor=l;u.fn[s].noConflict=function(){return u.fn[s]=v,l._jQueryInterface}}(jQuery),function(u){var e="scrollspy",s="bs.scrollspy",h="."+s,y=u.fn[e],v={offset:10,method:"auto",target:""},p={offset:"number",method:"string",target:"(string|element)"},l={ACTIVATE:"activate"+h,SCROLL:"scroll"+h,LOAD_DATA_API:"load"+h+".data-api"},o={DROPDOWN_ITEM:"dropdown-item",DROPDOWN_MENU:"dropdown-menu",NAV_LINK:"nav-link",NAV:"nav",ACTIVE:"active"},f={DATA_SPY:'[data-spy="scroll"]',ACTIVE:".active",LIST_ITEM:".list-item",LI:"li",LI_DROPDOWN:"li.dropdown",NAV_LINKS:".nav-link",DROPDOWN:".dropdown",DROPDOWN_ITEMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},a={OFFSET:"offset",POSITION:"position"},c=function(){function c(n,i){var r=this;t(this,c);this._element=n;this._scrollElement="BODY"===n.tagName?window:n;this._config=this._getConfig(i);this._selector=this._config.target+" "+f.NAV_LINKS+","+this._config.target+" "+f.DROPDOWN_ITEMS;this._offsets=[];this._targets=[];this._activeTarget=null;this._scrollHeight=0;u(this._scrollElement).on(l.SCROLL,function(n){return r._process(n)});this.refresh();this._process()}return c.prototype.refresh=function(){var t=this,r=this._scrollElement!==this._scrollElement.window?a.POSITION:a.OFFSET,i="auto"===this._config.method?r:this._config.method,f=i===a.POSITION?this._getScrollTop():0;this._offsets=[];this._targets=[];this._scrollHeight=this._getScrollHeight();u.makeArray(u(this._selector)).map(function(t){var r=void 0,e=n.getSelectorFromElement(t);return e&&(r=u(e)[0]),r&&(r.offsetWidth||r.offsetHeight)?[u(r)[i]().top+f,e]:null}).filter(function(n){return n}).sort(function(n,t){return n[0]-t[0]}).forEach(function(n){t._offsets.push(n[0]);t._targets.push(n[1])})},c.prototype.dispose=function(){u.removeData(this._element,s);u(this._scrollElement).off(h);this._element=null;this._scrollElement=null;this._config=null;this._selector=null;this._offsets=null;this._targets=null;this._activeTarget=null;this._scrollHeight=null},c.prototype._getConfig=function(t){if(t=u.extend({},v,t),"string"!=typeof t.target){var i=u(t.target).attr("id");i||(i=n.getUID(e),u(t.target).attr("id",i));t.target="#"+i}return n.typeCheckConfig(e,t,p),t},c.prototype._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},c.prototype._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},c.prototype._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.offsetHeight},c.prototype._process=function(){var t=this._getScrollTop()+this._config.offset,r=this._getScrollHeight(),u=this._config.offset+r-this._getOffsetHeight(),i,n;if(this._scrollHeight!==r&&this.refresh(),t>=u)return i=this._targets[this._targets.length-1],void(this._activeTarget!==i&&this._activate(i));if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(n=this._offsets.length;n--;)this._activeTarget!==this._targets[n]&&t>=this._offsets[n]&&(void 0===this._offsets[n+1]||t<this._offsets[n+1])&&this._activate(this._targets[n])},c.prototype._activate=function(n){var i,t;this._activeTarget=n;this._clear();i=this._selector.split(",");i=i.map(function(t){return t+'[data-target="'+n+'"],'+t+'[href="'+n+'"]'});t=u(i.join(","));t.hasClass(o.DROPDOWN_ITEM)?(t.closest(f.DROPDOWN).find(f.DROPDOWN_TOGGLE).addClass(o.ACTIVE),t.addClass(o.ACTIVE)):t.parents(f.LI).find("> "+f.NAV_LINKS).addClass(o.ACTIVE);u(this._scrollElement).trigger(l.ACTIVATE,{relatedTarget:n})},c.prototype._clear=function(){u(this._selector).filter(f.ACTIVE).removeClass(o.ACTIVE)},c._jQueryInterface=function(n){return this.each(function(){var t=u(this).data(s),i="object"===(void 0===n?"undefined":r(n))&&n;if(t||(t=new c(this,i),u(this).data(s,t)),"string"==typeof n){if(void 0===t[n])throw new Error('No method named "'+n+'"');t[n]()}})},i(c,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.6"}},{key:"Default",get:function(){return v}}]),c}();u(window).on(l.LOAD_DATA_API,function(){for(var i,n=u.makeArray(u(f.DATA_SPY)),t=n.length;t--;)i=u(n[t]),c._jQueryInterface.call(i,i.data())});u.fn[e]=c._jQueryInterface;u.fn[e].Constructor=c;u.fn[e].noConflict=function(){return u.fn[e]=y,c._jQueryInterface}}(jQuery),function(r){var e="tab",h="bs.tab",o="."+h,l=r.fn[e],s={HIDE:"hide"+o,HIDDEN:"hidden"+o,SHOW:"show"+o,SHOWN:"shown"+o,CLICK_DATA_API:"click"+o+".data-api"},u={DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active",DISABLED:"disabled",FADE:"fade",SHOW:"show"},f={A:"a",LI:"li",DROPDOWN:".dropdown",LIST:"ul:not(.dropdown-menu), ol:not(.dropdown-menu), nav:not(.dropdown-menu)",FADE_CHILD:"> .nav-item .fade, > .fade",ACTIVE:".active",ACTIVE_CHILD:"> .nav-item > .active, > .active",DATA_TOGGLE:'[data-toggle="tab"], [data-toggle="pill"]',DROPDOWN_TOGGLE:".dropdown-toggle",DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu .active"},c=function(){function e(n){t(this,e);this._element=n}return e.prototype.show=function(){var l=this,o,h,c;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&r(this._element).hasClass(u.ACTIVE)||r(this._element).hasClass(u.DISABLED))){var i=void 0,t=void 0,e=r(this._element).closest(f.LIST)[0],a=n.getSelectorFromElement(this._element);e&&(t=r.makeArray(r(e).find(f.ACTIVE)),t=t[t.length-1]);o=r.Event(s.HIDE,{relatedTarget:this._element});h=r.Event(s.SHOW,{relatedTarget:t});(t&&r(t).trigger(o),r(this._element).trigger(h),h.isDefaultPrevented()||o.isDefaultPrevented())||(a&&(i=r(a)[0]),this._activate(this._element,e),c=function(){var n=r.Event(s.HIDDEN,{relatedTarget:l._element}),i=r.Event(s.SHOWN,{relatedTarget:t});r(t).trigger(n);r(l._element).trigger(i)},i?this._activate(i,i.parentNode,c):c())}},e.prototype.dispose=function(){r.removeClass(this._element,h);this._element=null},e.prototype._activate=function(t,i,e){var c=this,o=r(i).find(f.ACTIVE_CHILD)[0],s=e&&n.supportsTransitionEnd()&&(o&&r(o).hasClass(u.FADE)||Boolean(r(i).find(f.FADE_CHILD)[0])),h=function(){return c._transitionComplete(t,o,s,e)};o&&s?r(o).one(n.TRANSITION_END,h).emulateTransitionEnd(150):h();o&&r(o).removeClass(u.SHOW)},e.prototype._transitionComplete=function(t,i,e,o){var s,h;i&&(r(i).removeClass(u.ACTIVE),s=r(i.parentNode).find(f.DROPDOWN_ACTIVE_CHILD)[0],s&&r(s).removeClass(u.ACTIVE),i.setAttribute("aria-expanded",!1));(r(t).addClass(u.ACTIVE),t.setAttribute("aria-expanded",!0),e?(n.reflow(t),r(t).addClass(u.SHOW)):r(t).removeClass(u.FADE),t.parentNode&&r(t.parentNode).hasClass(u.DROPDOWN_MENU))&&(h=r(t).closest(f.DROPDOWN)[0],h&&r(h).find(f.DROPDOWN_TOGGLE).addClass(u.ACTIVE),t.setAttribute("aria-expanded",!0));o&&o()},e._jQueryInterface=function(n){return this.each(function(){var i=r(this),t=i.data(h);if(t||(t=new e(this),i.data(h,t)),"string"==typeof n){if(void 0===t[n])throw new Error('No method named "'+n+'"');t[n]()}})},i(e,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.6"}}]),e}();r(document).on(s.CLICK_DATA_API,f.DATA_TOGGLE,function(n){n.preventDefault();c._jQueryInterface.call(r(this),"show")});r.fn[e]=c._jQueryInterface;r.fn[e].Constructor=c;r.fn[e].noConflict=function(){return r.fn[e]=l,c._jQueryInterface}}(jQuery),function(u){if("undefined"==typeof Tether)throw new Error("Bootstrap tooltips require Tether (http://tether.io/)");var h="tooltip",c="bs.tooltip",f="."+c,a=u.fn[h],v={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="tooltip-inner"><\/div><\/div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:"0 0",constraints:[],container:!1},y={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"string",constraints:"array",container:"(string|element|boolean)"},p={TOP:"bottom center",RIGHT:"middle left",BOTTOM:"top center",LEFT:"middle right"},s={SHOW:"show",OUT:"out"},w={HIDE:"hide"+f,HIDDEN:"hidden"+f,SHOW:"show"+f,SHOWN:"shown"+f,INSERTED:"inserted"+f,CLICK:"click"+f,FOCUSIN:"focusin"+f,FOCUSOUT:"focusout"+f,MOUSEENTER:"mouseenter"+f,MOUSELEAVE:"mouseleave"+f},o={FADE:"fade",SHOW:"show"},b={TOOLTIP:".tooltip",TOOLTIP_INNER:".tooltip-inner"},k={element:!1,enabled:!1},e={HOVER:"hover",FOCUS:"focus",CLICK:"click",MANUAL:"manual"},l=function(){function l(n,i){t(this,l);this._isEnabled=!0;this._timeout=0;this._hoverState="";this._activeTrigger={};this._isTransitioning=!1;this._tether=null;this.element=n;this.config=this._getConfig(i);this.tip=null;this._setListeners()}return l.prototype.enable=function(){this._isEnabled=!0},l.prototype.disable=function(){this._isEnabled=!1},l.prototype.toggleEnabled=function(){this._isEnabled=!this._isEnabled},l.prototype.toggle=function(n){if(n){var i=this.constructor.DATA_KEY,t=u(n.currentTarget).data(i);t||(t=new this.constructor(n.currentTarget,this._getDelegateConfig()),u(n.currentTarget).data(i,t));t._activeTrigger.click=!t._activeTrigger.click;t._isWithActiveTrigger()?t._enter(null,t):t._leave(null,t)}else{if(u(this.getTipElement()).hasClass(o.SHOW))return void this._leave(null,this);this._enter(null,this)}},l.prototype.dispose=function(){clearTimeout(this._timeout);this.cleanupTether();u.removeData(this.element,this.constructor.DATA_KEY);u(this.element).off(this.constructor.EVENT_KEY);u(this.element).closest(".modal").off("hide.bs.modal");this.tip&&u(this.tip).remove();this._isEnabled=null;this._timeout=null;this._hoverState=null;this._activeTrigger=null;this._tether=null;this.element=null;this.config=null;this.tip=null},l.prototype.show=function(){var i=this,r,h,t,f,e;if("none"===u(this.element).css("display"))throw new Error("Please use show on visible elements");if(r=u.Event(this.constructor.Event.SHOW),this.isWithContent()&&this._isEnabled){if(this._isTransitioning)throw new Error("Tooltip is transitioning");if(u(this.element).trigger(r),h=u.contains(this.element.ownerDocument.documentElement,this.element),r.isDefaultPrevented()||!h)return;t=this.getTipElement();f=n.getUID(this.constructor.NAME);t.setAttribute("id",f);this.element.setAttribute("aria-describedby",f);this.setContent();this.config.animation&&u(t).addClass(o.FADE);var c="function"==typeof this.config.placement?this.config.placement.call(this,t,this.element):this.config.placement,a=this._getAttachment(c),v=!1===this.config.container?document.body:u(this.config.container);if(u(t).data(this.constructor.DATA_KEY,this).appendTo(v),u(this.element).trigger(this.constructor.Event.INSERTED),this._tether=new Tether({attachment:a,element:t,target:this.element,classes:k,classPrefix:"bs-tether",offset:this.config.offset,constraints:this.config.constraints,addTargetClasses:!1}),n.reflow(t),this._tether.position(),u(t).addClass(o.SHOW),e=function(){var n=i._hoverState;i._hoverState=null;i._isTransitioning=!1;u(i.element).trigger(i.constructor.Event.SHOWN);n===s.OUT&&i._leave(null,i)},n.supportsTransitionEnd()&&u(this.tip).hasClass(o.FADE))return this._isTransitioning=!0,void u(this.tip).one(n.TRANSITION_END,e).emulateTransitionEnd(l._TRANSITION_DURATION);e()}},l.prototype.hide=function(t){var i=this,r=this.getTipElement(),h=u.Event(this.constructor.Event.HIDE),f;if(this._isTransitioning)throw new Error("Tooltip is transitioning");f=function(){i._hoverState!==s.SHOW&&r.parentNode&&r.parentNode.removeChild(r);i.element.removeAttribute("aria-describedby");u(i.element).trigger(i.constructor.Event.HIDDEN);i._isTransitioning=!1;i.cleanupTether();t&&t()};u(this.element).trigger(h);h.isDefaultPrevented()||(u(r).removeClass(o.SHOW),this._activeTrigger[e.CLICK]=!1,this._activeTrigger[e.FOCUS]=!1,this._activeTrigger[e.HOVER]=!1,n.supportsTransitionEnd()&&u(this.tip).hasClass(o.FADE)?(this._isTransitioning=!0,u(r).one(n.TRANSITION_END,f).emulateTransitionEnd(150)):f(),this._hoverState="")},l.prototype.isWithContent=function(){return Boolean(this.getTitle())},l.prototype.getTipElement=function(){return this.tip=this.tip||u(this.config.template)[0]},l.prototype.setContent=function(){var n=u(this.getTipElement());this.setElementContent(n.find(b.TOOLTIP_INNER),this.getTitle());n.removeClass(o.FADE+" "+o.SHOW);this.cleanupTether()},l.prototype.setElementContent=function(n,t){var i=this.config.html;"object"===(void 0===t?"undefined":r(t))&&(t.nodeType||t.jquery)?i?u(t).parent().is(n)||n.empty().append(t):n.text(u(t).text()):n[i?"html":"text"](t)},l.prototype.getTitle=function(){var n=this.element.getAttribute("data-original-title");return n||(n="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),n},l.prototype.cleanupTether=function(){this._tether&&this._tether.destroy()},l.prototype._getAttachment=function(n){return p[n.toUpperCase()]},l.prototype._setListeners=function(){var n=this;this.config.trigger.split(" ").forEach(function(t){if("click"===t)u(n.element).on(n.constructor.Event.CLICK,n.config.selector,function(t){return n.toggle(t)});else if(t!==e.MANUAL){var i=t===e.HOVER?n.constructor.Event.MOUSEENTER:n.constructor.Event.FOCUSIN,r=t===e.HOVER?n.constructor.Event.MOUSELEAVE:n.constructor.Event.FOCUSOUT;u(n.element).on(i,n.config.selector,function(t){return n._enter(t)}).on(r,n.config.selector,function(t){return n._leave(t)})}u(n.element).closest(".modal").on("hide.bs.modal",function(){return n.hide()})});this.config.selector?this.config=u.extend({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},l.prototype._fixTitle=function(){var n=r(this.element.getAttribute("data-original-title"));(this.element.getAttribute("title")||"string"!==n)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},l.prototype._enter=function(n,t){var i=this.constructor.DATA_KEY;return t=t||u(n.currentTarget).data(i),t||(t=new this.constructor(n.currentTarget,this._getDelegateConfig()),u(n.currentTarget).data(i,t)),n&&(t._activeTrigger["focusin"===n.type?e.FOCUS:e.HOVER]=!0),u(t.getTipElement()).hasClass(o.SHOW)||t._hoverState===s.SHOW?void(t._hoverState=s.SHOW):(clearTimeout(t._timeout),t._hoverState=s.SHOW,t.config.delay&&t.config.delay.show?void(t._timeout=setTimeout(function(){t._hoverState===s.SHOW&&t.show()},t.config.delay.show)):void t.show())},l.prototype._leave=function(n,t){var i=this.constructor.DATA_KEY;if(t=t||u(n.currentTarget).data(i),t||(t=new this.constructor(n.currentTarget,this._getDelegateConfig()),u(n.currentTarget).data(i,t)),n&&(t._activeTrigger["focusout"===n.type?e.FOCUS:e.HOVER]=!1),!t._isWithActiveTrigger())return clearTimeout(t._timeout),t._hoverState=s.OUT,t.config.delay&&t.config.delay.hide?void(t._timeout=setTimeout(function(){t._hoverState===s.OUT&&t.hide()},t.config.delay.hide)):void t.hide()},l.prototype._isWithActiveTrigger=function(){for(var n in this._activeTrigger)if(this._activeTrigger[n])return!0;return!1},l.prototype._getConfig=function(t){return t=u.extend({},this.constructor.Default,u(this.element).data(),t),t.delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),n.typeCheckConfig(h,t,this.constructor.DefaultType),t},l.prototype._getDelegateConfig=function(){var t={},n;if(this.config)for(n in this.config)this.constructor.Default[n]!==this.config[n]&&(t[n]=this.config[n]);return t},l._jQueryInterface=function(n){return this.each(function(){var t=u(this).data(c),i="object"===(void 0===n?"undefined":r(n))&&n;if((t||!/dispose|hide/.test(n))&&(t||(t=new l(this,i),u(this).data(c,t)),"string"==typeof n)){if(void 0===t[n])throw new Error('No method named "'+n+'"');t[n]()}})},i(l,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.6"}},{key:"Default",get:function(){return v}},{key:"NAME",get:function(){return h}},{key:"DATA_KEY",get:function(){return c}},{key:"Event",get:function(){return w}},{key:"EVENT_KEY",get:function(){return f}},{key:"DefaultType",get:function(){return y}}]),l}();return u.fn[h]=l._jQueryInterface,u.fn[h].Constructor=l,u.fn[h].noConflict=function(){return u.fn[h]=a,l._jQueryInterface},l}(jQuery));!function(n){var s="popover",h="bs.popover",o="."+h,v=n.fn[s],y=n.extend({},u.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><h3 class="popover-title"><\/h3><div class="popover-content"><\/div><\/div>'}),p=n.extend({},u.DefaultType,{content:"(string|element|function)"}),l={FADE:"fade",SHOW:"show"},a={TITLE:".popover-title",CONTENT:".popover-content"},w={HIDE:"hide"+o,HIDDEN:"hidden"+o,SHOW:"show"+o,SHOWN:"shown"+o,INSERTED:"inserted"+o,CLICK:"click"+o,FOCUSIN:"focusin"+o,FOCUSOUT:"focusout"+o,MOUSEENTER:"mouseenter"+o,MOUSELEAVE:"mouseleave"+o},c=function(u){function c(){return t(this,c),f(this,u.apply(this,arguments))}return e(c,u),c.prototype.isWithContent=function(){return this.getTitle()||this._getContent()},c.prototype.getTipElement=function(){return this.tip=this.tip||n(this.config.template)[0]},c.prototype.setContent=function(){var t=n(this.getTipElement());this.setElementContent(t.find(a.TITLE),this.getTitle());this.setElementContent(t.find(a.CONTENT),this._getContent());t.removeClass(l.FADE+" "+l.SHOW);this.cleanupTether()},c.prototype._getContent=function(){return this.element.getAttribute("data-content")||("function"==typeof this.config.content?this.config.content.call(this.element):this.config.content)},c._jQueryInterface=function(t){return this.each(function(){var i=n(this).data(h),u="object"===(void 0===t?"undefined":r(t))?t:null;if((i||!/destroy|hide/.test(t))&&(i||(i=new c(this,u),n(this).data(h,i)),"string"==typeof t)){if(void 0===i[t])throw new Error('No method named "'+t+'"');i[t]()}})},i(c,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.6"}},{key:"Default",get:function(){return y}},{key:"NAME",get:function(){return s}},{key:"DATA_KEY",get:function(){return h}},{key:"Event",get:function(){return w}},{key:"EVENT_KEY",get:function(){return o}},{key:"DefaultType",get:function(){return p}}]),c}(u);n.fn[s]=c._jQueryInterface;n.fn[s].Constructor=c;n.fn[s].noConflict=function(){return n.fn[s]=v,c._jQueryInterface}}(jQuery)}(),function(n,t){"function"==typeof define&&define.amd?define([],function(){return n.svg4everybody=t()}):"object"==typeof module&&module.exports?module.exports=t():n.svg4everybody=t()}(this,function(){function n(n,t,i){var r,u,f;if(i){for(r=document.createDocumentFragment(),u=!t.hasAttribute("viewBox")&&i.getAttribute("viewBox"),u&&t.setAttribute("viewBox",u),f=i.cloneNode(!0);f.childNodes.length;)r.appendChild(f.firstChild);n.appendChild(r)}}function t(t){t.onreadystatechange=function(){if(4===t.readyState){var i=t._cachedDocument;i||(i=t._cachedDocument=document.implementation.createHTMLDocument(""),i.body.innerHTML=t.responseText,t._cachedTarget={});t._embeds.splice(0).map(function(r){var u=t._cachedTarget[r.id];u||(u=t._cachedTarget[r.id]=i.getElementById(r.id));n(r.parent,r.svg,u)})}};t.onreadystatechange()}function i(i){function o(){for(var i,a=0;a<f.length;){var c=f[a],y=c.parentNode,p=r(y),v=c.getAttribute("xlink:href")||c.getAttribute("href");if(!v&&u.attributeName&&(v=c.getAttribute(u.attributeName)),p&&v){if(e)if(!u.validate||u.validate(v,p,c)){y.removeChild(c);var b=v.split("#"),w=b.shift(),k=b.join("#");w.length?(i=s[w],i||(i=s[w]=new XMLHttpRequest,i.open("GET",w),i.send(),i._embeds=[]),i._embeds.push({parent:y,svg:p,id:k}),t(i)):n(y,p,document.getElementById(k))}else++a,++h}else++a}(!f.length||f.length-h>0)&&l(o,67)}var e,u=Object(i),c=window.top!==window.self;e="polyfill"in u?u.polyfill:/\bTrident\/[567]\b|\bMSIE (?:9|10)\.0\b/.test(navigator.userAgent)||(navigator.userAgent.match(/\bEdge\/12\.(\d+)\b/)||[])[1]<10547||(navigator.userAgent.match(/\bAppleWebKit\/(\d+)\b/)||[])[1]<537||/\bEdge\/.(\d+)\b/.test(navigator.userAgent)&&c;var s={},l=window.requestAnimationFrame||setTimeout,f=document.getElementsByTagName("use"),h=0;e&&o()}function r(n){for(var t=n;"svg"!==t.nodeName.toLowerCase()&&(t=t.parentNode););return t}return i}),function(){function o(n){for(var i,c,l,r,s,e,u,a,p,v,t,f,h=n.css("color"),o=n[0],y=!1;o&&!f&&!y;){try{t=$(o).css("background-color")}catch(n){t="transparent"}"transparent"!==t&&"rgba(0, 0, 0, 0)"!==t&&(f=t);y=o.body;o=o.parentNode}return c=/rgb[a]*\((\d+),\s*(\d+),\s*(\d+)/,l=/#([AaBbCcDdEeFf\d]{2})([AaBbCcDdEeFf\d]{2})([AaBbCcDdEeFf\d]{2})/,t=void 0,t=h.match(c),t?i={r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}:(t=h.match(l))&&(i={r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}),f?(t=void 0,t=f.match(c),t?r={r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}:(t=f.match(l))&&(r={r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)})):r=i&&Math.max.apply(null,[i.r,i.g,i.b])>127?{r:0,g:0,b:0}:{r:255,g:255,b:255},a=function(n){return"rgb("+[n.r,n.g,n.b].join(", ")+")"},i&&r?(p=Math.max.apply(null,[i.r,i.g,i.b]),e=Math.max.apply(null,[r.r,r.g,r.b]),u=Math.round(e+-1*(e-p)*.75),s={r:u,g:u,b:u}):i?(e=Math.max.apply(null,[i.r,i.g,i.b]),v=1,e>127&&(v=-1),u=Math.round(e+96*v),s={r:u,g:u,b:u}):s={r:191,g:191,b:191},{color:h,"background-color":r?a(r):f,"decor-color":a(s)}}function i(n,t){this.x=n;this.y=t;this.reverse=function(){return new this.constructor(-1*this.x,-1*this.y)};this._length=null;this.getLength=function(){return this._length||(this._length=Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2))),this._length};var i=function(n){return Math.round(n/Math.abs(n))};this.resizeTo=function(n){if(0===this.x&&0===this.y)this._length=0;else if(0===this.x)this._length=n,this.y=n*i(this.y);else if(0===this.y)this._length=n,this.x=n*i(this.x);else{var t=Math.abs(this.y/this.x),r=Math.sqrt(Math.pow(n,2)/(1+Math.pow(t,2))),u=t*r;this._length=n;this.x=r*i(this.x);this.y=u*i(this.y)}return this};this.angleTo=function(n){var t=this.getLength()*n.getLength();return 0===t?0:Math.acos(Math.min(Math.max((this.x*n.x+this.y*n.y)/t,-1),1))/Math.PI}}function t(n,t){this.x=n;this.y=t;this.getVectorToCoordinates=function(n,t){return new i(n-this.x,t-this.y)};this.getVectorFromCoordinates=function(n,t){return this.getVectorToCoordinates(n,t).reverse()};this.getVectorToPoint=function(n){return new i(n.x-this.x,n.y-this.y)};this.getVectorFromPoint=function(n){return this.getVectorToPoint(n).reverse()}}function s(n,t,i,r,u){var f,s,h,e,o;if(this.data=n,this.context=t,n.length)for(h=n.length,e=0;e<h;e++){for(f=n[e],s=f.x.length,i.call(t,f),o=1;o<s;o++)r.call(t,f,o);u.call(t,f)}this.changed=function(){};this.startStrokeFn=i;this.addToStrokeFn=r;this.endStrokeFn=u;this.inStroke=!1;this._lastPoint=null;this._stroke=null;this.startStroke=function(n){if(n&&"number"==typeof n.x&&"number"==typeof n.y){this._stroke={x:[n.x],y:[n.y]};this.data.push(this._stroke);this._lastPoint=n;this.inStroke=!0;var t=this._stroke,i=this.startStrokeFn,r=this.context;return setTimeout(function(){i.call(r,t)},3),n}return null};this.addToStroke=function(n){var t;if(this.inStroke&&"number"==typeof n.x&&"number"==typeof n.y&&Math.abs(n.x-this._lastPoint.x)+Math.abs(n.y-this._lastPoint.y)>4){t=this._stroke.x.length;this._stroke.x.push(n.x);this._stroke.y.push(n.y);this._lastPoint=n;var i=this._stroke,r=this.addToStrokeFn,u=this.context;return setTimeout(function(){r.call(u,i,t)},3),n}return null};this.endStroke=function(){var t=this.inStroke;if(this.inStroke=!1,this._lastPoint=null,t){var i=this._stroke,r=this.endStrokeFn,n=this.context,u=this.changed;return setTimeout(function(){r.call(n,i);u.call(n)},3),!0}return null}}function h(n,t,i,r){"use strict";"ratio"!==t&&"%"!==t.split("")[t.length-1]||(this.eventTokens[i+".parentresized"]=r.subscribe(i+".parentresized",function(t,u,f){return function(){var s=u.width(),o,e;if(s!==f){for(e in t)t.hasOwnProperty(e)&&(r.unsubscribe(t[e]),delete t[e]);o=n.settings;n.$parent.children().remove();for(e in n)n.hasOwnProperty(e)&&delete n[e];o.data=function(n,t){for(var r,i,o,f,s=[],u=0,e=n.length;u<e;u++){for(f=n[u],r={x:[],y:[]},i=0,o=f.x.length;i<o;i++)r.x.push(f.x[i]*t),r.y.push(f.y[i]*t);s.push(r)}return s}(o.data,1*s/f);u[i](o)}}}(this.eventTokens,this.$parent,this.$parent.width(),(this.canvas.width,this.canvas.height))))}function r(i,r,u){var v=this.$parent=$(i),w=this.eventTokens={},p=(this.events=new f(this),$.fn[n]("globalEvents")),e={width:"ratio",height:"ratio",sizeRatio:4,color:"#000","background-color":"#fff","decor-color":"#eee",lineWidth:0,minFatFingerCompensation:-10,showUndoButton:!1,readOnly:!1,data:[],signatureLine:!1},c,a,y,s;$.extend(e,o(v));r&&$.extend(e,r);this.settings=e;for(c in u)u.hasOwnProperty(c)&&u[c].call(this,c);return this.events.publish(n+".initializing"),this.$controlbarUpper=function(){return $('<div style="padding:0 !important; margin:0 !important;width: 100% !important; height: 0 !important; -ms-touch-action: none; touch-action: none;margin-top:-1em !important; margin-bottom:1em !important;"><\/div>').appendTo(v)}(),this.isCanvasEmulator=!1,a=this.canvas=this.initializeCanvas(e),y=$(a),this.$controlbarLower=function(){return $('<div style="padding:0 !important; margin:0 !important;width: 100% !important; height: 0 !important; -ms-touch-action: none; touch-action: none;margin-top:-1.5em !important; margin-bottom:1.5em !important; position: relative;"><\/div>').appendTo(v)}(),this.canvasContext=a.getContext("2d"),y.data(n+".this",this),e.lineWidth=function(n,t){return n||Math.max(Math.round(t/400),2)}(e.lineWidth,a.width),this.lineCurveThreshold=3*e.lineWidth,e.cssclass&&""!=$.trim(e.cssclass)&&y.addClass(e.cssclass),this.fatFingerCompensation=0,s=function(n){var r,u,e=function(){var t=$(n.canvas).offset();r=-1*t.left;u=-1*t.top},f=function(i){var f=i.changedTouches&&i.changedTouches.length>0?i.changedTouches[0]:i;return new t(Math.round(f.pageX+r),Math.round(f.pageY+u)+n.fatFingerCompensation)},i=new l(750,function(){n.dataEngine.endStroke()});return this.drawEndHandler=function(t){if(!n.settings.readOnly){try{t.preventDefault()}catch(n){}i.clear();n.dataEngine.endStroke()}},this.drawStartHandler=function(t){n.settings.readOnly||(t.preventDefault(),e(),n.dataEngine.startStroke(f(t)),i.kick())},this.drawMoveHandler=function(t){if(!n.settings.readOnly){if(t.preventDefault(),!n.dataEngine.inStroke)return;n.dataEngine.addToStroke(f(t));i.kick()}},this}.call({},this),function(t,i,r){var u=this.canvas,o=$(u),f;this.isCanvasEmulator?(o.bind("mousemove."+n,r),o.bind("mouseup."+n,t),o.bind("mousedown."+n,i)):(f="function"==typeof u.addEventListener,this.ontouchstart=function(n){u.onmousedown=u.onmouseup=u.onmousemove=void 0;this.fatFingerCompensation=e.minFatFingerCompensation&&-3*e.lineWidth>e.minFatFingerCompensation?-3*e.lineWidth:e.minFatFingerCompensation;i(n);f?(u.addEventListener("touchend",t),u.addEventListener("touchstart",i),u.addEventListener("touchmove",r)):(u.ontouchend=t,u.ontouchstart=i,u.ontouchmove=r)},f?u.addEventListener("touchstart",this.ontouchstart):u.ontouchstart=ontouchstart,u.onmousedown=function(n){f?u.removeEventListener("touchstart",this.ontouchstart):u.ontouchstart=u.ontouchend=u.ontouchmove=void 0;i(n);u.onmousedown=i;u.onmouseup=t;u.onmousemove=r},window.navigator.msPointerEnabled&&(u.onmspointerdown=i,u.onmspointerup=t,u.onmspointermove=r))}.call(this,s.drawEndHandler,s.drawStartHandler,s.drawMoveHandler),w[n+".windowmouseup"]=p.subscribe(n+".windowmouseup",s.drawEndHandler),this.events.publish(n+".attachingEventHandlers"),h.call(this,this,e.width.toString(10),n,p),this.resetCanvas(e.data),this.events.publish(n+".initialized"),this}function c(n){var t,r,i;if(n.getContext)return!1;if(t=n.ownerDocument.parentWindow,r=t.FlashCanvas?n.ownerDocument.parentWindow.FlashCanvas:"undefined"==typeof FlashCanvas?void 0:FlashCanvas,r){if(n=r.initElement(n),i=1,t&&t.screen&&t.screen.deviceXDPI&&t.screen.logicalXDPI&&(i=1*t.screen.deviceXDPI/t.screen.logicalXDPI),1!==i)try{$(n).children("object").get(0).resize(Math.ceil(n.width*i),Math.ceil(n.height*i));n.getContext("2d").scale(i,i)}catch(n){}return!0}throw new Error("Canvas element does not support 2d context. jSignature cannot proceed.");}var n="jSignature",l=function(n,t){var i;return this.kick=function(){clearTimeout(i);i=setTimeout(t,n)},this.clear=function(){clearTimeout(i)},this},f=function(n){"use strict";this.topics={};this.context=n||this;this.publish=function(n){if(this.topics[n]){for(var o,r,u=this.topics[n],s=Array.prototype.slice.call(arguments,1),f=[],e=[],t=0,i=u.length;t<i;t++)r=u[t],o=r[0],r[1]&&(r[0]=function(){},f.push(t)),e.push(o);for(t=0,i=f.length;t<i;t++)u.splice(f[t],1);for(t=0,i=e.length;t<i;t++)e[t].apply(this.context,s)}};this.subscribe=function(n,t,i){return this.topics[n]?this.topics[n].push([t,i]):this.topics[n]=[[t,i]],{topic:n,callback:t}};this.unsubscribe=function(n){if(this.topics[n.topic])for(var i=this.topics[n.topic],t=0,r=i.length;t<r;t++)i[t]&&i[t][0]===n.callback&&i.splice(t,1)}},a=function(n,t,i,r){var u=n.fillStyle;n.fillStyle=n.strokeStyle;n.fillRect(t+r/-2,i+r/-2,r,r);n.fillStyle=u},u=function(n,t,i,r,u){n.beginPath();n.moveTo(t,i);n.lineTo(r,u);n.closePath();n.stroke()},e=function(n,t,i,r,u,f,e,o,s){n.beginPath();n.moveTo(t,i);n.bezierCurveTo(f,e,o,s,r,u);n.closePath();n.stroke()},v=function(n){a(this.canvasContext,n.x[0],n.y[0],this.settings.lineWidth)},y=function(n,r){var o=new t(n.x[r-1],n.y[r-1]),l=new t(n.x[r],n.y[r]),h=o.getVectorToPoint(l),c,s,f;if(r>1&&(s=new t(n.x[r-2],n.y[r-2]),f=s.getVectorToPoint(o),f.getLength()>this.lineCurveThreshold)){c=r>2?new t(n.x[r-3],n.y[r-3]).getVectorToPoint(s):new i(0,0);var a=.35*f.getLength(),p=f.angleTo(c.reverse()),w=h.angleTo(f.reverse()),v=new i(c.x+f.x,c.y+f.y).resizeTo(Math.max(.05,p)*a),y=new i(f.x+h.x,f.y+h.y).reverse().resizeTo(Math.max(.05,w)*a);e(this.canvasContext,s.x,s.y,o.x,o.y,s.x+v.x,s.y+v.y,o.x+y.x,o.y+y.y)}h.getLength()<=this.lineCurveThreshold&&u(this.canvasContext,o.x,o.y,l.x,l.y)},p=function(n){var r=n.x.length-1,c;if(r>0){var h,o=new t(n.x[r],n.y[r]),f=new t(n.x[r-1],n.y[r-1]),s=f.getVectorToPoint(o);s.getLength()>this.lineCurveThreshold&&(r>1?(h=new t(n.x[r-2],n.y[r-2]).getVectorToPoint(f),c=new i(h.x+s.x,h.y+s.y).resizeTo(s.getLength()/2),e(this.canvasContext,f.x,f.y,o.x,o.y,f.x+c.x,f.y+c.y,o.x,o.y)):u(this.canvasContext,f.x,f.y,o.x,o.y))}};r.prototype.resetCanvas=function(t,i){var h=this.canvas,f=this.settings,r=this.canvasContext,a=this.isCanvasEmulator,c=h.width,e=h.height,o,l;return(i||r.clearRect(0,0,c+30,e+30),r.shadowColor=r.fillStyle=f["background-color"],a&&r.fillRect(0,0,c+30,e+30),r.lineWidth=Math.ceil(parseInt(f.lineWidth,10)),r.lineCap=r.lineJoin="round",f.signatureLine)&&(null!=f["decor-color"]&&(r.strokeStyle=f["decor-color"],r.shadowOffsetX=0,r.shadowOffsetY=0,o=Math.round(e/5),u(r,1.5*o,e-o,c-1.5*o,e-o)),a||(r.shadowColor=r.strokeStyle,r.shadowOffsetX=.5*r.lineWidth,r.shadowOffsetY=-.6*r.lineWidth,r.shadowBlur=0)),r.strokeStyle=f.color,t||(t=[]),l=this.dataEngine=new s(t,this,v,y,p),f.data=t,$(h).data(n+".data",t).data(n+".settings",f),l.changed=function(n,t,i){"use strict";return function(){t.publish(i+".change");n.trigger("change")}}(this.$parent,this.events,n),l.changed(),!0};r.prototype.initializeCanvas=function(t){var r=document.createElement("canvas"),i=$(r);return t.width===t.height&&"ratio"===t.height&&(t.width="100%"),i.css({margin:0,padding:0,border:"none",height:"ratio"!==t.height&&t.height?t.height.toString(10):1,width:"ratio"!==t.width&&t.width?t.width.toString(10):1,"-ms-touch-action":"none","touch-action":"none","background-color":t["background-color"]}),i.appendTo(this.$parent),"ratio"===t.height?i.css("height",Math.round(i.width()/t.sizeRatio)):"ratio"===t.width&&i.css("width",Math.round(i.height()*t.sizeRatio)),i.addClass(n),r.width=i.width(),r.height=i.height(),this.isCanvasEmulator=c(r),r.onselectstart=function(n){return n&&n.preventDefault&&n.preventDefault(),n&&n.stopPropagation&&n.stopPropagation(),!1},r};!function(t){function i(n,t){"use strict";var i=new Image,r=this;i.onload=function(){var n=r.getContext("2d"),t=n.shadowColor;n.shadowColor="transparent";n.drawImage(i,0,0,i.width<r.width?i.width:r.width,i.height<r.height?i.height:r.height);n.shadowColor=t};i.src="data:"+t+","+n}function c(t,i){return this.find("canvas."+n).add(this.filter("canvas."+n)).data(n+".this").resetCanvas(t,i),this}function l(t,i){if(void 0!==i||"string"!=typeof t||"data:"!==t.substr(0,5)||(i=t.slice(5).split(",")[0],t=t.slice(6+i.length),i!==t)){var r=this.find("canvas."+n).add(this.filter("canvas."+n));if(!s.hasOwnProperty(i))throw new Error(n+" is unable to find import plugin with for format '"+String(i)+"'");return 0!==r.length&&s[i].call(r[0],t,i,function(n){return function(){return n.resetCanvas.apply(n,arguments)}}(r.data(n+".this"))),this}}var e=new f;!function(n,t,i,r){"use strict";var u,f=function(){n.publish(t+".parentresized")};i(r).bind("resize."+t,function(){u&&clearTimeout(u);u=setTimeout(f,500)}).bind("mouseup."+t,function(){n.publish(t+".windowmouseup")})}(e,n,$,t);var a={},o={"default":function(){return this.toDataURL()},"native":function(n){return n},image:function(){var n=this.toDataURL(),t;return"string"==typeof n&&n.length>4&&"data:"===n.slice(0,5)&&-1!==n.indexOf(",")?(t=n.indexOf(","),[n.slice(5,t),n.substr(t+1)]):[]}},s={"native":function(n,t,i){i(n)},image:i,"image/png;base64":i,"image/jpeg;base64":i,"image/jpg;base64":i},v=function(n){var t=!1;for(n=n.parentNode;n&&!t;)t=n.body,n=n.parentNode;return!t},u={"export":o,"import":s,instance:a},h={init:function(n){return this.each(function(){v(this)||new r(this,n,a)})},destroy:function(){return this.each(function(){var t,i;if(!v(this)&&(t=$(this).find("canvas").data(n+".this"),t)){t.$controlbarLower.remove();t.$controlbarUpper.remove();$(t.canvas).remove();for(i in t.eventTokens)t.eventTokens.hasOwnProperty(i)&&e.unsubscribe(t.eventTokens[i])}})},getSettings:function(){return this.find("canvas."+n).add(this.filter("canvas."+n)).data(n+".this").settings},isModified:function(){return null!==this.find("canvas."+n).add(this.filter("canvas."+n)).data(n+".this").dataEngine._stroke},updateSetting:function(t,i,r){var u=this.find("canvas."+n).add(this.filter("canvas."+n)).data(n+".this");return u.settings[t]=i,u.resetCanvas(r?null:u.settings.data,!0),u.settings[t]},clear:c,reset:c,addPlugin:function(n,t,i){return u.hasOwnProperty(n)&&(u[n][t]=i),this},listPlugins:function(n){var r=[],t,i;if(u.hasOwnProperty(n)){t=u[n];for(i in t)t.hasOwnProperty(i)&&r.push(i)}return r},getData:function(t){var i=this.find("canvas."+n).add(this.filter("canvas."+n));if(void 0===t&&(t="default"),0!==i.length&&o.hasOwnProperty(t))return o[t].call(i.get(0),i.data(n+".data"),i.data(n+".settings"))},importData:l,setData:l,globalEvents:function(){return e},disable:function(){this.find("input").attr("disabled",1);this.find("canvas."+n).addClass("disabled").data(n+".this").settings.readOnly=!0},enable:function(){this.find("input").removeAttr("disabled");this.find("canvas."+n).removeClass("disabled").data(n+".this").settings.readOnly=!1},events:function(){return this.find("canvas."+n).add(this.filter("canvas."+n)).data(n+".this").events}};$.fn[n]=function(t){"use strict";return t&&"object"!=typeof t?"string"==typeof t&&h[t]?h[t].apply(this,Array.prototype.slice.call(arguments,1)):void $.error("Method "+String(t)+" does not exist on jQuery."+n):h.init.apply(this,arguments)}}(window)}(),function(){"use strict";function t(n,t){this.x=n;this.y=t;this.reverse=function(){return new this.constructor(-1*this.x,-1*this.y)};this._length=null;this.getLength=function(){return this._length||(this._length=Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2))),this._length};var i=function(n){return Math.round(n/Math.abs(n))};this.resizeTo=function(n){if(0===this.x&&0===this.y)this._length=0;else if(0===this.x)this._length=n,this.y=n*i(this.y);else if(0===this.y)this._length=n,this.x=n*i(this.x);else{var t=Math.abs(this.y/this.x),r=Math.sqrt(Math.pow(n,2)/(1+Math.pow(t,2))),u=t*r;this._length=n;this.x=r*i(this.x);this.y=u*i(this.y)}return this};this.angleTo=function(n){var t=this.getLength()*n.getLength();return 0===t?0:Math.acos(Math.min(Math.max((this.x*n.x+this.y*n.y)/t,-1),1))/Math.PI}}function i(n,i){this.x=n;this.y=i;this.getVectorToCoordinates=function(n,i){return new t(n-this.x,i-this.y)};this.getVectorFromCoordinates=function(n,t){return this.getVectorToCoordinates(n,t).reverse()};this.getVectorToPoint=function(n){return new t(n.x-this.x,n.y-this.y)};this.getVectorFromPoint=function(n){return this.getVectorToPoint(n).reverse()}}function n(n,t){var i=Math.pow(10,t);return Math.round(n*i)/i}function h(r,u,f){u+=1;var o,h=new i(r.x[u-1],r.y[u-1]),p=new i(r.x[u],r.y[u]),s=h.getVectorToPoint(p),c=new i(r.x[u-2],r.y[u-2]),e=c.getVectorToPoint(h);if(e.getLength()>f){o=u>2?new i(r.x[u-3],r.y[u-3]).getVectorToPoint(c):new t(0,0);var l=.35*e.getLength(),w=e.angleTo(o.reverse()),b=s.angleTo(e.reverse()),a=new t(o.x+e.x,o.y+e.y).resizeTo(Math.max(.05,w)*l),v=new t(e.x+s.x,e.y+s.y).reverse().resizeTo(Math.max(.05,b)*l),y=new t(e.x+v.x,e.y+v.y);return["c",n(a.x,2),n(a.y,2),n(y.x,2),n(y.y,2),n(e.x,2),n(e.y,2)]}return["l",n(e.x,2),n(e.y,2)]}function c(r,u){var e=r.x.length-1,c=new i(r.x[e],r.y[e]),s=new i(r.x[e-1],r.y[e-1]),f=s.getVectorToPoint(c);if(e>1&&f.getLength()>u){var o=new i(r.x[e-2],r.y[e-2]).getVectorToPoint(s),l=f.angleTo(o.reverse()),a=.35*f.getLength(),h=new t(o.x+f.x,o.y+f.y).resizeTo(Math.max(.05,l)*a);return["c",n(h.x,2),n(h.y,2),n(f.x,2),n(f.y,2),n(f.x,2),n(f.y,2)]}return["l",n(f.x,2),n(f.y,2)]}function l(t,i,r){for(var u=["M",n(t.x[0]-i,2),n(t.y[0]-r,2)],f=1,e=t.x.length-1;f<e;f++)u.push.apply(u,h(t,f,1));return e>0?u.push.apply(u,c(t,f,1)):0===e&&u.push.apply(u,["l",1,1]),u.join(" ")}function a(n){for(var i=[],u={x:[],y:[]},t=0,r=n.x.length;t<r;t++)i.push({x:n.x[t],y:n.y[t]});for(i=simplify(i,.7,!0),t=0,r=i.length;t<r;t++)u.x.push(i[t].x),u.y.push(i[t].y);return u}function v(n){for(var u=[],i=[["fill",void 0,"none"],["stroke","color","#000000"],["stroke-width","lineWidth",2],["stroke-linecap",void 0,"round"],["stroke-linejoin",void 0,"round"]],t=i.length-1;t>=0;t--){var f=i[t][0],r=i[t][1],e=i[t][2];u.push(f+'="'+(r in n&&n[r]?n[r]:e)+'"')}return u.join(" ")}function e(n,t){var i,r,u,y,f,p,e=['<?xml version="1.0" encoding="UTF-8" standalone="no"?>','<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">'],o=n.length,s=[],h=[],w=0,b=0,k=0,d=0,c=[];if(0!==o){for(i=0;i<o;i++)r=a(n[i]),c.push(r),s=s.concat(r.x),h=h.concat(r.y);u=Math.min.apply(null,s)-1;y=Math.max.apply(null,s)+1;f=Math.min.apply(null,h)-1;p=Math.max.apply(null,h)+1;k=u<0?0:u;d=f<0?0:f;w=y-u;b=p-f}for(e.push('<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="'+w.toString()+'" height="'+b.toString()+'">'),i=0,o=c.length;i<o;i++)r=c[i],e.push("<path "+v(t)+' d="'+l(r,k,d)+'"/>');return e.push("<\/svg>"),e.join("")}function o(n,t){return[u,e(n,t)]}function s(n,t){return[f,r(e(n,t))]}var r,u,f;if((function(n,t){function i(n,t){var i=n.x-t.x,r=n.y-t.y;return i*i+r*r}function r(n,t,i){var f,e=t.x,o=t.y,r=i.x-e,u=i.y-o;return 0===r&&0===u||(f=((n.x-e)*r+(n.y-o)*u)/(r*r+u*u),f>1?(e=i.x,o=i.y):f>0&&(e+=r*f,o+=u*f)),r=n.x-e,u=n.y-o,r*r+u*u}function u(n,t){for(var r,o=n.length,f=n[0],e=[f],u=1;u<o;u++)r=n[u],i(r,f)>t&&(e.push(r),f=r);return f!==r&&e.push(r),e}function f(n,i){var u,o,v,s,c=n.length,p=typeof Uint8Array!=t+""?Uint8Array:Array,h=new p(c),e=0,f=c-1,l=[],a=[],y=[];for(h[e]=h[f]=1;f;){for(o=0,u=e+1;u<f;u++)(v=r(n[u],n[e],n[f]))>o&&(s=u,o=v);o>i&&(h[s]=1,l.push(e),a.push(s),l.push(s),a.push(f));e=l.pop();f=a.pop()}for(u=0;u<c;u++)h[u]&&y.push(n[u]);return y}n.simplify=function(n,i,r){var e=i!==t?i*i:1;return r||(n=u(n,e)),n=f(n,e)}}(window),"function"!=typeof r)&&(r=function(n){var e,o,s,h,c,l,a,t,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split(""),r=0,y=0,f="",v=[],u;do e=n.charCodeAt(r++),o=n.charCodeAt(r++),s=n.charCodeAt(r++),t=e<<16|o<<8|s,h=t>>18&63,c=t>>12&63,l=t>>6&63,a=63&t,v[y++]=i[h]+i[c]+i[l]+i[a];while(r<n.length);return f=v.join(""),u=n.length%3,(u?f.slice(0,u-3):f)+"===".slice(u||3)}),u="image/svg+xml",f="image/svg+xml;base64","undefined"==typeof $)throw new Error("We need jQuery for some of the functionality. jQuery is not detected. Failing to initialize...");!function(n){var t=n.fn.jSignature;t("addPlugin","export","svg",o);t("addPlugin","export",u,o);t("addPlugin","export","svgbase64",s);t("addPlugin","export",f,s)}($)}();!function(){function n(t,i,r){function u(f,o){var h,c,s;if(!i[f]){if(!t[f]){if(h="function"==typeof require&&require,!o&&h)return h(f,!0);if(e)return e(f,!0);c=new Error("Cannot find module '"+f+"'");throw c.code="MODULE_NOT_FOUND",c;}s=i[f]={exports:{}};t[f][0].call(s.exports,function(n){var i=t[f][1][n];return u(i||n)},s,s.exports,n,t,i,r)}return i[f].exports}for(var e="function"==typeof require&&require,f=0;f<r.length;f++)u(r[f]);return u}return n}()({1:[function(n,t){function i(){var n=document.querySelectorAll(".js-code-block");n.length&&u();[].forEach.call(n,function(n){var i=n.innerHTML,u=r(i.split("\n")).join("\n"),t=document.createElement("pre");t.className+="prettyprint";t.appendChild(document.createTextNode(u));n.parentNode.insertBefore(t,n.nextSibling)})}function r(n){for(var i=0,t=0;t<=n.length;t++)n[t].trim().length||n.splice(t,1),n[t]&&(i||(i=n[t].search(/\S/)),n[t]=n[t].substring(i));return n}function u(){var n=document.createElement("script");n.type="text/javascript";n.async=!0;n.src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js";document.getElementsByTagName("head")[0].appendChild(n)}t.exports=i()},{}],2:[function(n){n("./code-block");svg4everybody();String.prototype.startsWith||(String.prototype.startsWith=function(n,t){return t=t||0,this.indexOf(n,t)===t});String.prototype.endsWith||(String.prototype.endsWith=function(n,t){var i=this.toString(),r;return("number"!=typeof t||!isFinite(t)||Math.floor(t)!==t||t>i.length)&&(t=i.length),t-=n.length,r=i.indexOf(n,t),r!==-1&&r===t});String.prototype.includes||(String.prototype.includes=function(n,t){"use strict";return"number"!=typeof t&&(t=0),!(t+n.length>this.length)&&this.indexOf(n,t)!==-1});$(document).ready(function(){function n(){$(".page-feedback-form").removeClass("collapse");$(".page-feedback").addClass("expand")}function t(){$(".page-feedback-form").addClass("collapse");$(".page-feedback").removeClass("expand");$("#feedback-text").val("")}function i(){$(".page-feedback-buttons").addClass("collapse")}$(".page-feedback input:radio").prop("checked",!1);$("#feedback-text").val("");$('.page-feedback input[type="radio"]').on("click",function(){n()});$(".page-feedback").on("submit",function(n){var r={};r.FeedbackURL=window.location.href;r.Comments=$("#feedback-text").val();r.WasThisPageHelpful=$("#radio-yes").prop("checked");$(".page-feedback-loader").show();i();t();$.ajax({url:"/Home/Feedback/",type:"POST",dataType:"json",data:r,success:function(n){$(".page-feedback-loader").hide();n.result?($(".page-feedback-success").show(),$("#sFeedbackSuccess").html(n.message)):($(".page-feedback-error").show(),$("#sFeedbackError").html(n.message))},error:function(n,t,i){$(".page-feedback-loader").hide();$(".page-feedback-error").show();$("#sFeedbackError").html(i+" occurred sending feedback.")}});n.preventDefault()});$(".page-feedback .btn-feedback").on("click",function(t){t.preventDefault();$(".page-feedback input:radio").prop("checked",!1);$(this).prev().prop("checked",!0);n()});$(".page-feedback #btnFeedbackCancel").on("click",function(){$(".page-feedback input:radio").prop("checked",!1);t()});$(".skip-to-content").on("click",function(){var n="#"+this.href.split("#")[1];$(n).attr("tabindex",-1).on("blur focusout",function(){$(this).removeAttr("tabindex")}).focus()})})},{"./code-block":1}]},{},[2])