!function(t,e){"use strict";function n(t){this.time=t.time,this.target=t.target,this.rootbounds=t.rootbounds,this.boundingclientrect=t.boundingclientrect,this.intersectionrect=t.intersectionrect||{top:0,bottom:0,left:0,right:0,width:0,height:0},this.isintersecting=!!t.intersectionrect;var e=this.boundingclientrect,n=e.width*e.height,o=this.intersectionrect,i=o.width*o.height;this.intersectionratio=n?i/n:this.isintersecting?1:0}function o(t,e){var n=e||{};if("function"!=typeof t)throw new error("callback must be a function");if(n.root&&1!=n.root.nodetype)throw new error("root must be an element");this._checkforintersections=r(this._checkforintersections.bind(this),this.throttle_timeout),this._callback=t,this._observationtargets=[],this._queuedentries=[],this._rootmarginvalues=this._parserootmargin(n.rootmargin),this.thresholds=this._initthresholds(n.threshold),this.root=n.root||null,this.rootmargin=this._rootmarginvalues.map(function(t){return t.value+t.unit}).join(" ")}function i(){return t.performance&&performance.now&&performance.now()}function r(t,e){var n=null;return function(){n||(n=settimeout(function(){t(),n=null},e))}}function s(t,e,n,o){"function"==typeof t.addeventlistener?t.addeventlistener(e,n,o||!1):"function"==typeof t.attachevent&&t.attachevent("on"+e,n)}function h(t,e,n,o){"function"==typeof t.removeeventlistener?t.removeeventlistener(e,n,o||!1):"function"==typeof t.detatchevent&&t.detatchevent("on"+e,n)}function c(t,e){var n=math.max(t.top,e.top),o=math.min(t.bottom,e.bottom),i=math.max(t.left,e.left),r=math.min(t.right,e.right),s=r-i,h=o-n;return s>=0&&h>=0&&{top:n,bottom:o,left:i,right:r,width:s,height:h}}function u(t){var e;try{e=t.getboundingclientrect()}catch(t){}return e?(e.width&&e.height||(e={top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.right-e.left,height:e.bottom-e.top}),e):{top:0,bottom:0,left:0,right:0,width:0,height:0}}function a(t,e){for(var n=e;n;){if(n==t)return!0;n=l(n)}return!1}function l(t){var e=t.parentnode;return e&&11==e.nodetype&&e.host?e.host:e}if("intersectionobserver"in t&&"intersectionobserverentry"in t&&"intersectionratio"in t.intersectionobserverentry.prototype)"isintersecting"in t.intersectionobserverentry.prototype||object.defineproperty(t.intersectionobserverentry.prototype,"isintersecting",{get:function(){return this.intersectionratio>0}});else{var p=[];o.prototype.throttle_timeout=100,o.prototype.poll_interval=null,o.prototype.observe=function(t){if(!this._observationtargets.some(function(e){return e.element==t})){if(!t||1!=t.nodetype)throw new error("target must be an element");this._registerinstance(),this._observationtargets.push({element:t,entry:null}),this._monitorintersections(),this._checkforintersections()}},o.prototype.unobserve=function(t){this._observationtargets=this._observationtargets.filter(function(e){return e.element!=t}),this._observationtargets.length||(this._unmonitorintersections(),this._unregisterinstance())},o.prototype.disconnect=function(){this._observationtargets=[],this._unmonitorintersections(),this._unregisterinstance()},o.prototype.takerecords=function(){var t=this._queuedentries.slice();return this._queuedentries=[],t},o.prototype._initthresholds=function(t){var e=t||[0];return array.isarray(e)||(e=[e]),e.sort().filter(function(t,e,n){if("number"!=typeof t||isnan(t)||t<0||t>1)throw new error("threshold must be a number between 0 and 1 inclusively");return t!==n[e-1]})},o.prototype._parserootmargin=function(t){var e=(t||"0px").split(/\s+/).map(function(t){var e=/^(-?\d*\.?\d+)(px|%)$/.exec(t);if(!e)throw new error("rootmargin must be specified in pixels or percent");return{value:parsefloat(e[1]),unit:e[2]}});return e[1]=e[1]||e[0],e[2]=e[2]||e[0],e[3]=e[3]||e[1],e},o.prototype._monitorintersections=function(){this._monitoringintersections||(this._monitoringintersections=!0,this.poll_interval?this._monitoringinterval=setinterval(this._checkforintersections,this.poll_interval):(s(t,"resize",this._checkforintersections,!0),s(e,"scroll",this._checkforintersections,!0),"mutationobserver"in t&&(this._domobserver=new mutationobserver(this._checkforintersections),this._domobserver.observe(e,{attributes:!0,childlist:!0,characterdata:!0,subtree:!0}))))},o.prototype._unmonitorintersections=function(){this._monitoringintersections&&(this._monitoringintersections=!1,clearinterval(this._monitoringinterval),this._monitoringinterval=null,h(t,"resize",this._checkforintersections,!0),h(e,"scroll",this._checkforintersections,!0),this._domobserver&&(this._domobserver.disconnect(),this._domobserver=null))},o.prototype._checkforintersections=function(){var t=this._rootisindom(),e=t?this._getrootrect():{top:0,bottom:0,left:0,right:0,width:0,height:0};this._observationtargets.foreach(function(o){var r=o.element,s=u(r),h=this._rootcontainstarget(r),c=o.entry,a=t&&h&&this._computetargetandrootintersection(r,e),l=o.entry=new n({time:i(),target:r,boundingclientrect:s,rootbounds:e,intersectionrect:a});c?t&&h?this._hascrossedthreshold(c,l)&&this._queuedentries.push(l):c&&c.isintersecting&&this._queuedentries.push(l):this._queuedentries.push(l)},this),this._queuedentries.length&&this._callback(this.takerecords(),this)},o.prototype._computetargetandrootintersection=function(n,o){if("none"!=t.getcomputedstyle(n).display){for(var i=u(n),r=l(n),s=!1;!s;){var h=null,a=1==r.nodetype?t.getcomputedstyle(r):{};if("none"==a.display)return;if(r==this.root||r==e?(s=!0,h=o):r!=e.body&&r!=e.documentelement&&"visible"!=a.overflow&&(h=u(r)),h&&!(i=c(h,i)))break;r=l(r)}return i}},o.prototype._getrootrect=function(){var t;if(this.root)t=u(this.root);else{var n=e.documentelement,o=e.body;t={top:0,left:0,right:n.clientwidth||o.clientwidth,width:n.clientwidth||o.clientwidth,bottom:n.clientheight||o.clientheight,height:n.clientheight||o.clientheight}}return this._expandrectbyrootmargin(t)},o.prototype._expandrectbyrootmargin=function(t){var e=this._rootmarginvalues.map(function(e,n){return"px"==e.unit?e.value:e.value*(n%2?t.width:t.height)/100}),n={top:t.top-e[0],right:t.right+e[1],bottom:t.bottom+e[2],left:t.left-e[3]};return n.width=n.right-n.left,n.height=n.bottom-n.top,n},o.prototype._hascrossedthreshold=function(t,e){var n=t&&t.isintersecting?t.intersectionratio||0:-1,o=e.isintersecting?e.intersectionratio||0:-1;if(n!==o)for(var i=0;i