diff --git a/.yarn/patches/tether-npm-2.0.0-f14e824ccf.patch b/.yarn/patches/tether-npm-2.0.0-f14e824ccf.patch new file mode 100644 index 0000000000..5ddd2379e6 --- /dev/null +++ b/.yarn/patches/tether-npm-2.0.0-f14e824ccf.patch @@ -0,0 +1,103 @@ +diff --git a/dist/js/tether.esm.js b/dist/js/tether.esm.js +index b2719dd8bf986bc1d3add0d28a7c4ebe3bf41640..cfa1d88a240bbe3b94659a988e1886d356495a32 100644 +--- a/dist/js/tether.esm.js ++++ b/dist/js/tether.esm.js +@@ -193,7 +193,7 @@ var uniqueId = function () { + }(); + + var zeroPosCache = {}; +-var zeroElement = null; ++var zeroElements = new Map(); + function getBounds(body, el) { + var doc; + +@@ -328,11 +328,11 @@ function getVisibleBounds(body, target) { + } + } + function removeUtilElements(body) { +- if (zeroElement) { +- body.removeChild(zeroElement); ++ if (zeroElements.has(body)) { ++ body.removeChild(zeroElements.get(body)); + } + +- zeroElement = null; ++ zeroElements.delete(body); + } + /** + * Same as native getBoundingClientRect, except it takes into account parent offsets +@@ -374,7 +374,7 @@ function _getOrigin(body) { + // jitter as the user scrolls that messes with our ability to detect if two positions + // are equivilant or not. We place an element at the top left of the page that will + // get the same jitter, so we can cancel the two out. +- var node = zeroElement; ++ var node = zeroElements.get(body); + + if (!node || !body.contains(node)) { + node = document.createElement('div'); +@@ -385,7 +385,7 @@ function _getOrigin(body) { + position: 'absolute' + }); + body.appendChild(node); +- zeroElement = node; ++ zeroElements.set(body, node); + } + + var id = node.getAttribute('data-tether-id'); +diff --git a/dist/js/tether.esm.min.js b/dist/js/tether.esm.min.js +index 1b2cb71590b6710544203bcf61f179dc0c5a0dd8..128b1ac71bbcd4ef3e3e23eeae3a4d84c5d3248f 100644 +--- a/dist/js/tether.esm.min.js ++++ b/dist/js/tether.esm.min.js +@@ -1,4 +1,3 @@ + /*! tether 2.0.0 */ + +-function t(e,o){return(t=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(e,o)}function e(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function o(t){return"string"==typeof t}function i(t){return void 0===t}function n(t,e){e.split(" ").forEach((function(e){e.trim()&&t.classList.add(e)}))}function r(t,e,o){return void 0===t&&(t=""),i(e)||i(e[t])?o?o+"-"+t:t:!1===e[t]?"":e[t]}function s(t,e){e.split(" ").forEach((function(e){e.trim()&&t.classList.remove(e)}))}function a(t,e,o){o.forEach((function(o){-1===e.indexOf(o)&&t.classList.contains(o)&&s(t,o)})),e.forEach((function(e){t.classList.contains(e)||n(t,e)}))}var h=[];function l(t){h.push(t)}function f(){for(var t;t=h.pop();)t()}var p=null;function d(t){void 0===t&&(t={});var e=[];return Array.prototype.push.apply(e,arguments),e.slice(1).forEach((function(e){if(e)for(var o in e)({}).hasOwnProperty.call(e,o)&&(t[o]=e[o])})),t}function c(){if(p)return p;var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");d(e.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),e.appendChild(t),document.body.appendChild(e);var o=t.offsetWidth;e.style.overflow="scroll";var i=t.offsetWidth;o===i&&(i=e.clientWidth),document.body.removeChild(e);var n=o-i;return p={width:n,height:n}}var u,m=(u=0,function(){return++u}),g={},v=null;function b(t,e){var o;e===document?(o=document,e=document.documentElement):o=e.ownerDocument;var n=o.documentElement,r=w(e),s=function(t){var e=v;e&&t.contains(e)||((e=document.createElement("div")).setAttribute("data-tether-id",m()),d(e.style,{top:0,left:0,position:"absolute"}),t.appendChild(e),v=e);var o=e.getAttribute("data-tether-id");i(g[o])&&(g[o]=w(e),l((function(){delete g[o]})));return g[o]}(t);return r.top-=s.top,r.left-=s.left,i(r.width)&&(r.width=document.body.scrollWidth-r.left-r.right),i(r.height)&&(r.height=document.body.scrollHeight-r.top-r.bottom),r.top=r.top-n.clientTop,r.left=r.left-n.clientLeft,r.right=o.body.clientWidth-r.width-r.left,r.bottom=o.body.clientHeight-r.height-r.top,r}function w(t){var e=t.getBoundingClientRect(),o={};for(var i in e)o[i]=e[i];try{if(t.ownerDocument!==document){var n=t.ownerDocument.defaultView.frameElement;if(n){var r=w(n);o.top+=r.top,o.bottom+=r.top,o.left+=r.left,o.right+=r.left}}}catch(t){}return o}var y={position:function(t){var e=this,o=t.top,i=t.left,n=this.cache("element-bounds",(function(){return b(e.element)})),s=n.height,h=n.width,f=this.getTargetBounds(),p=o+s,d=i+h,c=[];o<=f.bottom&&p>=f.top&&["left","right"].forEach((function(t){var e=f[t];e!==i&&e!==d||c.push(t)})),i<=f.right&&d>=f.left&&["top","bottom"].forEach((function(t){var e=f[t];e!==o&&e!==p||c.push(t)}));var u=this.options,m=u.classes,g=u.classPrefix;return this.all.push(r("abutted",m,g)),["left","top","right","bottom"].forEach((function(t){e.all.push(r("abutted",m,g)+"-"+t)})),c.length&&this.add.push(r("abutted",m,g)),c.forEach((function(t){e.add.push(r("abutted",m,g)+"-"+t)})),l((function(){!1!==e.options.addTargetClasses&&a(e.target,e.add,e.all),a(e.element,e.add,e.all)})),!0}},E=["left","top","right","bottom"];var O={position:function(t){var e=this,n=t.top,s=t.left,h=t.targetAttachment;if(!this.options.constraints)return!0;var f=this.cache("element-bounds",(function(){return b(e.bodyElement,e.element)})),p=f.height,c=f.width;if(0===c&&0===p&&!i(this.lastSize)){var u=this.lastSize;c=u.width,p=u.height}var m=this.cache("target-bounds",(function(){return e.getTargetBounds()})),g=m.height,v=m.width,w=this.options,y=w.classes,O=w.classPrefix,x=function(t,e,o){var i=[r("pinned",t,e),r("out-of-bounds",t,e)];return o.forEach((function(t){var e=t.outOfBoundsClass,o=t.pinnedClass;e&&i.push(e),o&&i.push(o)})),i.forEach((function(t){["left","top","right","bottom"].forEach((function(e){i.push(t+"-"+e)}))})),i}(y,O,this.options.constraints),C=[],T=d({},h),P=d({},this.attachment);return this.options.constraints.forEach((function(t){var a,l,f=t.to,d=t.attachment,u=t.pin;if(i(d)&&(d=""),d.indexOf(" ")>=0){var m=d.split(" ");l=m[0],a=m[1]}else a=l=d;var w=function(t,e,o){if(!o)return null;if("scrollParent"===o?o=e.scrollParents[0]:"window"===o&&(o=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),o===document&&(o=o.documentElement),!i(o.nodeType)){var n=o,r=b(t,o),s=r,a=getComputedStyle(o);if(o=[s.left,s.top,r.width+s.left,r.height+s.top],n.ownerDocument!==document){var h=n.ownerDocument.defaultView;o[0]+=h.pageXOffset,o[1]+=h.pageYOffset,o[2]+=h.pageXOffset,o[3]+=h.pageYOffset}E.forEach((function(t,e){"Top"===(t=t[0].toUpperCase()+t.substr(1))||"Left"===t?o[e]+=parseFloat(a["border"+t+"Width"]):o[e]-=parseFloat(a["border"+t+"Width"])}))}return o}(e.bodyElement,e,f);"target"!==l&&"both"!==l||(nw[3]&&"bottom"===T.top&&(n-=g,T.top="top")),"together"===l&&(n=function(t,e,o,i,n,r){return"top"===t.top&&("bottom"===e.top&&ro[3]&&r-(i-n)>=o[1]&&(r-=i-n,t.top="bottom",e.top="bottom")),"bottom"===t.top&&("top"===e.top&&r+i>o[3]?(r-=n,t.top="top",r-=i,e.top="bottom"):"bottom"===e.top&&ro[3]&&"top"===e.top?(r-=i,e.top="bottom"):rw[2]&&"right"===T.left&&(s-=v,T.left="left")),"together"===a&&(s=function(t,e,o,i,n,r){return ro[2]&&"right"===t.left?"left"===e.left?(r-=n,t.left="left",r-=i,e.left="right"):"right"===e.left&&(r-=n,t.left="left",r+=i,e.left="left"):"center"===t.left&&(r+i>o[2]&&"left"===e.left?(r-=i,e.left="right"):rw[3]&&"top"===P.top&&(n-=p,P.top="bottom")),"element"!==a&&"both"!==a||(sw[2]&&("left"===P.left?(s-=c,P.left="right"):"center"===P.left&&(s-=c/2,P.left="right"))),o(u)?u=u.split(",").map((function(t){return t.trim()})):!0===u&&(u=["top","left","right","bottom"]);var x,A=[],W=[];(s=function(t,e,o,i,n,r){return t=0?(t=e[0],n.push("left")):r.push("left")),t+o>e[2]&&(i.indexOf("right")>=0?(t=e[2]-o,n.push("right")):r.push("right")),t}(s,w,c,u=u||[],A,W),n=function(t,e,o,i,n,r){return t=0?(t=e[1],n.push("top")):r.push("top")),t+o>e[3]&&(i.indexOf("bottom")>=0?(t=e[3]-o,n.push("bottom")):r.push("bottom")),t}(n,w,p,u,A,W),A.length)&&(x=i(e.options.pinnedClass)?r("pinned",y,O):e.options.pinnedClass,C.push(x),A.forEach((function(t){C.push(x+"-"+t)})));!function(t,e,o,n,s){var a;t.length&&(a=i(s)?r("out-of-bounds",o,n):s,e.push(a),t.forEach((function(t){e.push(a+"-"+t)})))}(W,C,y,O,e.options.outOfBoundsClass),(A.indexOf("left")>=0||A.indexOf("right")>=0)&&(P.left=T.left=!1),(A.indexOf("top")>=0||A.indexOf("bottom")>=0)&&(P.top=T.top=!1),T.top===h.top&&T.left===h.left&&P.top===e.attachment.top&&P.left===e.attachment.left||(e.updateAttachClasses(P,T),e.trigger("update",{attachment:P,targetAttachment:T}))})),l((function(){!1!==e.options.addTargetClasses&&a(e.target,C,x),a(e.element,C,x)})),{top:n,left:s}}},x={position:function(t){var e=t.top,i=t.left;if(this.options.shift){var n,r,s=this.options.shift;if("function"==typeof s&&(s=s.call(this,{top:e,left:i})),o(s)){(s=s.split(" "))[1]=s[1]||s[0];var a=s;n=a[0],r=a[1],n=parseFloat(n,10),r=parseFloat(r,10)}else{var h=[s.top,s.left];n=h[0],r=h[1]}return{top:e+=n,left:i+=r}}}},C=function(){function t(){}var e=t.prototype;return e.on=function(t,e,o,n){return void 0===n&&(n=!1),i(this.bindings)&&(this.bindings={}),i(this.bindings[t])&&(this.bindings[t]=[]),this.bindings[t].push({handler:e,ctx:o,once:n}),this},e.once=function(t,e,o){return this.on(t,e,o,!0)},e.off=function(t,e){var o=this;return i(this.bindings)||i(this.bindings[t])||(i(e)?delete this.bindings[t]:this.bindings[t].forEach((function(i,n){i.handler===e&&o.bindings[t].splice(n,1)}))),this},e.trigger=function(t){for(var e=this,o=arguments.length,n=new Array(o>1?o-1:0),r=1;r16)return S=Math.min(S-16,250),void(X=setTimeout(t,250));!i(Y)&&N()-Y<10||(null!=X&&(clearTimeout(X),X=null),Y=N(),B(),S=N()-Y)},i(window)||i(window.addEventListener)||["resize","scroll","touchmove"].forEach((function(t){window.addEventListener(t,H)}));var R=function(h){var p,u;function m(t){var o;return(o=h.call(this)||this).position=o.position.bind(e(o)),k.push(e(o)),o.history=[],o.setOptions(t,!1),L.modules.forEach((function(t){i(t.initialize)||t.initialize.call(e(o))})),o.position(),o}u=h,(p=m).prototype=Object.create(u.prototype),p.prototype.constructor=p,t(p,u);var g=m.prototype;return g.setOptions=function(t,e){var n=this;void 0===e&&(e=!0);var r={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether",bodyElement:document.body};this.options=d(r,t);var s=this.options,a=s.element,h=s.target,l=s.targetModifier,f=s.bodyElement;if(this.element=a,this.target=h,this.targetModifier=l,"string"==typeof f&&(f=document.querySelector(f)),this.bodyElement=f,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),["element","target"].forEach((function(t){if(i(n[t]))throw new Error("Tether Error: Both element and target must be defined");i(n[t].jquery)?o(n[t])&&(n[t]=document.querySelector(n[t])):n[t]=n[t][0]})),this._addClasses(),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=z(this.options.targetAttachment),this.attachment=z(this.options.attachment),this.offset=z(this.options.offset),this.targetOffset=z(this.options.targetOffset),i(this.scrollParents)||this.disable(),"scroll-handle"===this.targetModifier?this.scrollParents=[this.target]:this.scrollParents=function(t){var e=(getComputedStyle(t)||{}).position,o=[];if("fixed"===e)return[t];for(var n=t;(n=n.parentNode)&&n&&1===n.nodeType;){var r=void 0;try{r=getComputedStyle(n)}catch(t){}if(i(r)||null===r)return o.push(n),o;var s=r,a=s.overflow,h=s.overflowX,l=s.overflowY;/(auto|scroll|overlay)/.test(a+l+h)&&("absolute"!==e||["relative","absolute","fixed"].indexOf(r.position)>=0)&&o.push(n)}return o.push(t.ownerDocument.body),t.ownerDocument!==document&&o.push(t.ownerDocument.defaultView),o}(this.target),!1!==this.options.enabled&&this.enable(e)},g.getTargetBounds=function(){return i(this.targetModifier)?b(this.bodyElement,this.target):"visible"===this.targetModifier?function(t,e){if(e===document.body)return{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth};var o=b(t,e),i={height:o.height,width:o.width,top:o.top,left:o.left};return i.height=Math.min(i.height,o.height-(pageYOffset-o.top)),i.height=Math.min(i.height,o.height-(o.top+o.height-(pageYOffset+innerHeight))),i.height=Math.min(innerHeight,i.height),i.height-=2,i.width=Math.min(i.width,o.width-(pageXOffset-o.left)),i.width=Math.min(i.width,o.width-(o.left+o.width-(pageXOffset+innerWidth))),i.width=Math.min(innerWidth,i.width),i.width-=2,i.tope.clientWidth||[r.overflow,r.overflowX].indexOf("scroll")>=0||!n)&&(s=15);var a=o.height-parseFloat(r.borderTopWidth)-parseFloat(r.borderBottomWidth)-s,h={width:15,height:.975*a*(a/e.scrollHeight),left:o.left+o.width-parseFloat(r.borderLeftWidth)-15},l=0;a<408&&n&&(l=-11e-5*Math.pow(a,2)-.00727*a+22.58),n||(h.height=Math.max(h.height,24));var f=i/(e.scrollHeight-a);return h.top=f*(a-h.height-l)+o.top+parseFloat(r.borderTopWidth),n&&(h.height=Math.max(h.height,24)),h}(this.bodyElement,this.target):void 0},g.clearCache=function(){this._cache={}},g.cache=function(t,e){return i(this._cache)&&(this._cache={}),i(this._cache[t])&&(this._cache[t]=e.call(this)),this._cache[t]},g.enable=function(t){var e=this;void 0===t&&(t=!0);var o=this.options,i=o.classes,s=o.classPrefix;!1!==this.options.addTargetClasses&&n(this.target,r("enabled",i,s)),n(this.element,r("enabled",i,s)),this.enabled=!0,this.scrollParents.forEach((function(t){t!==e.target.ownerDocument&&t.addEventListener("scroll",e.position)})),t&&this.position()},g.disable=function(){var t=this,e=this.options,o=e.classes,n=e.classPrefix;s(this.target,r("enabled",o,n)),s(this.element,r("enabled",o,n)),this.enabled=!1,i(this.scrollParents)||this.scrollParents.forEach((function(e){e&&e.removeEventListener&&e.removeEventListener("scroll",t.position)}))},g.destroy=function(){var t,e=this;this.disable(),this._removeClasses(),k.forEach((function(t,o){t===e&&k.splice(o,1)})),0===k.length&&(t=this.bodyElement,v&&t.removeChild(v),v=null)},g.updateAttachClasses=function(t,e){var o=this;t=t||this.attachment,e=e||this.targetAttachment;var n=this.options,s=n.classes,h=n.classPrefix;!i(this._addAttachClasses)&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),i(this._addAttachClasses)&&(this._addAttachClasses=[]),this.add=this._addAttachClasses,t.top&&this.add.push(r("element-attached",s,h)+"-"+t.top),t.left&&this.add.push(r("element-attached",s,h)+"-"+t.left),e.top&&this.add.push(r("target-attached",s,h)+"-"+e.top),e.left&&this.add.push(r("target-attached",s,h)+"-"+e.left),this.all=[],["left","top","bottom","right","middle","center"].forEach((function(t){o.all.push(r("element-attached",s,h)+"-"+t),o.all.push(r("target-attached",s,h)+"-"+t)})),l((function(){i(o._addAttachClasses)||(a(o.element,o._addAttachClasses,o.all),!1!==o.options.addTargetClasses&&a(o.target,o._addAttachClasses,o.all),delete o._addAttachClasses)}))},g.position=function(t){var e=this;if(void 0===t&&(t=!0),this.enabled){this.clearCache();var o=function(t,e){var o=t.left,i=t.top;return"auto"===o&&(o=T[e.left]),"auto"===i&&(i=P[e.top]),{left:o,top:i}}(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,o);var n=this.cache("element-bounds",(function(){return b(e.bodyElement,e.element)})),r=n.width,s=n.height;if(0!==r||0!==s||i(this.lastSize))this.lastSize={width:r,height:s};else{var a=this.lastSize;r=a.width,s=a.height}var h=this.cache("target-bounds",(function(){return e.getTargetBounds()})),l=h,p=M(_(this.attachment),{width:r,height:s}),d=M(_(o),l),u=M(this.offset,{width:r,height:s}),m=M(this.targetOffset,l);p=W(p,u),d=W(d,m);for(var g=h.left+d.left-p.left,v=h.top+d.top-p.top,w=0;wx.documentElement.clientHeight&&(E=this.cache("scrollbar-size",c),O.viewport.bottom-=E.height),C.innerWidth>x.documentElement.clientWidth&&(E=this.cache("scrollbar-size",c),O.viewport.right-=E.width),-1!==["","static"].indexOf(x.body.style.position)&&-1!==["","static"].indexOf(x.body.parentElement.style.position)||(O.page.bottom=x.body.scrollHeight-v-s,O.page.right=x.body.scrollWidth-g-r),!i(this.options.optimizations)&&!1!==this.options.optimizations.moveElement&&i(this.targetModifier)){var A=this.cache("target-offsetparent",(function(){return F(e.target)})),z=this.cache("target-offsetparent-bounds",(function(){return b(e.bodyElement,A)})),Y=getComputedStyle(A),S=z,X={};if(["Top","Left","Bottom","Right"].forEach((function(t){X[t.toLowerCase()]=parseFloat(Y["border"+t+"Width"])})),z.right=x.body.scrollWidth-z.left-S.width+X.right,z.bottom=x.body.scrollHeight-z.top-S.height+X.bottom,O.page.top>=z.top+X.top&&O.page.bottom>=z.bottom&&O.page.left>=z.left+X.left&&O.page.right>=z.right){var H=A.scrollLeft,D=A.scrollTop;O.offset={top:O.page.top-z.top+D-X.top,left:O.page.left-z.left+H-X.left}}}return this.move(O),this.history.unshift(O),this.history.length>3&&this.history.pop(),t&&f(),!0}},g.move=function(t){var e=this;if(!i(this.element.parentNode)){var o,n,r,s={};for(var a in t)for(var h in s[a]={},t[a]){for(var f=!1,p=0;p=n&&n>=o-r))){f=!0;break}}f||(s[a][h]=!0)}var u={top:"",left:"",right:"",bottom:""},m=function(t,o){var n,r;!1!==(!i(e.options.optimizations)?e.options.optimizations.gpu:null)?(t.top?(u.top=0,n=o.top):(u.bottom=0,n=-o.bottom),t.left?(u.left=0,r=o.left):(u.right=0,r=-o.right),"number"==typeof window.devicePixelRatio&&devicePixelRatio%1==0&&(r=Math.round(r*devicePixelRatio)/devicePixelRatio,n=Math.round(n*devicePixelRatio)/devicePixelRatio),u[D]="translateX("+r+"px) translateY("+n+"px)","msTransform"!==D&&(u[D]+=" translateZ(0)")):(t.top?u.top=o.top+"px":u.bottom=o.bottom+"px",t.left?u.left=o.left+"px":u.right=o.right+"px")},g=!0;!i(this.options.optimizations)&&!1===this.options.optimizations.allowPositionFixed&&(g=!1);var v,b,w=!1;if((s.page.top||s.page.bottom)&&(s.page.left||s.page.right))u.position="absolute",m(s.page,t.page);else if(g&&(s.viewport.top||s.viewport.bottom)&&(s.viewport.left||s.viewport.right))u.position="fixed",m(s.viewport,t.viewport);else if(!i(s.offset)&&s.offset.top&&s.offset.left){u.position="absolute";var y=this.cache("target-offsetparent",(function(){return F(e.target)}));F(this.element)!==y&&l((function(){e.element.parentNode.removeChild(e.element),y.appendChild(e.element)})),m(s.offset,t.offset),w=!0}else u.position="absolute",m({top:!0,left:!0},t.page);if(!w)if(this.options.bodyElement)this.element.parentNode!==this.options.bodyElement&&this.options.bodyElement.appendChild(this.element);else{for(var E=!0,O=this.element.parentNode;O&&1===O.nodeType&&"BODY"!==O.tagName&&(b=void 0,((b=(v=O).ownerDocument).fullscreenElement||b.webkitFullscreenElement||b.mozFullScreenElement||b.msFullscreenElement)!==v);){if("static"!==getComputedStyle(O).position){E=!1;break}O=O.parentNode}E||(this.element.parentNode.removeChild(this.element),this.element.ownerDocument.body.appendChild(this.element))}var x={},C=!1;for(var T in u){var P=u[T];this.element.style[T]!==P&&(C=!0,x[T]=P)}C&&l((function(){d(e.element.style,x),e.trigger("repositioned")}))}},g._addClasses=function(){var t=this.options,e=t.classes,o=t.classPrefix;n(this.element,r("element",e,o)),!1!==this.options.addTargetClasses&&n(this.target,r("target",e,o))},g._removeClasses=function(){var t=this,e=this.options,o=e.classes,i=e.classPrefix;s(this.element,r("element",o,i)),!1!==this.options.addTargetClasses&&s(this.target,r("target",o,i)),this.all.forEach((function(e){t.element.classList.remove(e),t.target.classList.remove(e)}))},m}(C);R.modules=[],L.position=B;var j=d(R,L);j.modules.push({initialize:function(){var t=this,e=this.options,o=e.classes,i=e.classPrefix;this.markers={},["target","element"].forEach((function(e){var n=document.createElement("div");n.className=r(e+"-marker",o,i);var s=document.createElement("div");s.className=r("marker-dot",o,i),n.appendChild(s),t[e].appendChild(n),t.markers[e]={dot:s,el:n}}))},position:function(t){var e={element:t.manualOffset,target:t.manualTargetOffset};for(var i in e){var n=e[i];for(var r in n){var s,a=n[r];(!o(a)||-1===a.indexOf("%")&&-1===a.indexOf("px"))&&(a+="px"),this.markers[i]&&(null==(s=this.markers[i].dot)?void 0:s.style[r])!==a&&(this.markers[i].dot.style[r]=a)}}return!0}});export default j; +-//# sourceMappingURL=tether.esm.min.js.map ++function t(e,o){return t=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},t(e,o)}function e(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function o(t){return"string"==typeof t}function i(t){return void 0===t}function n(t,e){e.split(" ").forEach((function(e){e.trim()&&t.classList.add(e)}))}function r(t,e,o){return void 0===t&&(t=""),i(e)||i(e[t])?o?o+"-"+t:t:!1===e[t]?"":e[t]}function s(t,e){e.split(" ").forEach((function(e){e.trim()&&t.classList.remove(e)}))}function a(t,e,o){o.forEach((function(o){-1===e.indexOf(o)&&t.classList.contains(o)&&s(t,o)})),e.forEach((function(e){t.classList.contains(e)||n(t,e)}))}var h=[];function l(t){h.push(t)}function f(){for(var t;t=h.pop();)t()}var p=null;function d(t){void 0===t&&(t={});var e=[];return Array.prototype.push.apply(e,arguments),e.slice(1).forEach((function(e){if(e)for(var o in e)({}).hasOwnProperty.call(e,o)&&(t[o]=e[o])})),t}function c(){if(p)return p;var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");d(e.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),e.appendChild(t),document.body.appendChild(e);var o=t.offsetWidth;e.style.overflow="scroll";var i=t.offsetWidth;o===i&&(i=e.clientWidth),document.body.removeChild(e);var n=o-i;return p={width:n,height:n}}var u,m=(u=0,function(){return++u}),g={},v=new Map;function b(t,e){var o;e===document?(o=document,e=document.documentElement):o=e.ownerDocument;var n=o.documentElement,r=w(e),s=function(t){var e=v.get(t);e&&t.contains(e)||((e=document.createElement("div")).setAttribute("data-tether-id",m()),d(e.style,{top:0,left:0,position:"absolute"}),t.appendChild(e),v.set(t,e));var o=e.getAttribute("data-tether-id");i(g[o])&&(g[o]=w(e),l((function(){delete g[o]})));return g[o]}(t);return r.top-=s.top,r.left-=s.left,i(r.width)&&(r.width=document.body.scrollWidth-r.left-r.right),i(r.height)&&(r.height=document.body.scrollHeight-r.top-r.bottom),r.top=r.top-n.clientTop,r.left=r.left-n.clientLeft,r.right=o.body.clientWidth-r.width-r.left,r.bottom=o.body.clientHeight-r.height-r.top,r}function w(t){var e=t.getBoundingClientRect(),o={};for(var i in e)o[i]=e[i];try{if(t.ownerDocument!==document){var n=t.ownerDocument.defaultView.frameElement;if(n){var r=w(n);o.top+=r.top,o.bottom+=r.top,o.left+=r.left,o.right+=r.left}}}catch(t){}return o}var y={position:function(t){var e=this,o=t.top,i=t.left,n=this.cache("element-bounds",(function(){return b(e.element)})),s=n.height,h=n.width,f=this.getTargetBounds(),p=o+s,d=i+h,c=[];o<=f.bottom&&p>=f.top&&["left","right"].forEach((function(t){var e=f[t];e!==i&&e!==d||c.push(t)})),i<=f.right&&d>=f.left&&["top","bottom"].forEach((function(t){var e=f[t];e!==o&&e!==p||c.push(t)}));var u=this.options,m=u.classes,g=u.classPrefix;return this.all.push(r("abutted",m,g)),["left","top","right","bottom"].forEach((function(t){e.all.push(r("abutted",m,g)+"-"+t)})),c.length&&this.add.push(r("abutted",m,g)),c.forEach((function(t){e.add.push(r("abutted",m,g)+"-"+t)})),l((function(){!1!==e.options.addTargetClasses&&a(e.target,e.add,e.all),a(e.element,e.add,e.all)})),!0}},E=["left","top","right","bottom"];var O={position:function(t){var e=this,n=t.top,s=t.left,h=t.targetAttachment;if(!this.options.constraints)return!0;var f=this.cache("element-bounds",(function(){return b(e.bodyElement,e.element)})),p=f.height,c=f.width;if(0===c&&0===p&&!i(this.lastSize)){var u=this.lastSize;c=u.width,p=u.height}var m=this.cache("target-bounds",(function(){return e.getTargetBounds()})),g=m.height,v=m.width,w=this.options,y=w.classes,O=w.classPrefix,x=function(t,e,o){var i=[r("pinned",t,e),r("out-of-bounds",t,e)];return o.forEach((function(t){var e=t.outOfBoundsClass,o=t.pinnedClass;e&&i.push(e),o&&i.push(o)})),i.forEach((function(t){["left","top","right","bottom"].forEach((function(e){i.push(t+"-"+e)}))})),i}(y,O,this.options.constraints),C=[],T=d({},h),P=d({},this.attachment);return this.options.constraints.forEach((function(t){var a,l,f=t.to,d=t.attachment,u=t.pin;if(i(d)&&(d=""),d.indexOf(" ")>=0){var m=d.split(" ");l=m[0],a=m[1]}else a=l=d;var w=function(t,e,o){if(!o)return null;if("scrollParent"===o?o=e.scrollParents[0]:"window"===o&&(o=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),o===document&&(o=o.documentElement),!i(o.nodeType)){var n=o,r=b(t,o),s=r,a=getComputedStyle(o);if(o=[s.left,s.top,r.width+s.left,r.height+s.top],n.ownerDocument!==document){var h=n.ownerDocument.defaultView;o[0]+=h.pageXOffset,o[1]+=h.pageYOffset,o[2]+=h.pageXOffset,o[3]+=h.pageYOffset}E.forEach((function(t,e){"Top"===(t=t[0].toUpperCase()+t.substr(1))||"Left"===t?o[e]+=parseFloat(a["border"+t+"Width"]):o[e]-=parseFloat(a["border"+t+"Width"])}))}return o}(e.bodyElement,e,f);"target"!==l&&"both"!==l||(nw[3]&&"bottom"===T.top&&(n-=g,T.top="top")),"together"===l&&(n=function(t,e,o,i,n,r){return"top"===t.top&&("bottom"===e.top&&ro[3]&&r-(i-n)>=o[1]&&(r-=i-n,t.top="bottom",e.top="bottom")),"bottom"===t.top&&("top"===e.top&&r+i>o[3]?(r-=n,t.top="top",r-=i,e.top="bottom"):"bottom"===e.top&&ro[3]&&"top"===e.top?(r-=i,e.top="bottom"):rw[2]&&"right"===T.left&&(s-=v,T.left="left")),"together"===a&&(s=function(t,e,o,i,n,r){return ro[2]&&"right"===t.left?"left"===e.left?(r-=n,t.left="left",r-=i,e.left="right"):"right"===e.left&&(r-=n,t.left="left",r+=i,e.left="left"):"center"===t.left&&(r+i>o[2]&&"left"===e.left?(r-=i,e.left="right"):rw[3]&&"top"===P.top&&(n-=p,P.top="bottom")),"element"!==a&&"both"!==a||(sw[2]&&("left"===P.left?(s-=c,P.left="right"):"center"===P.left&&(s-=c/2,P.left="right"))),o(u)?u=u.split(",").map((function(t){return t.trim()})):!0===u&&(u=["top","left","right","bottom"]);var x,A=[],W=[];(s=function(t,e,o,i,n,r){return t=0?(t=e[0],n.push("left")):r.push("left")),t+o>e[2]&&(i.indexOf("right")>=0?(t=e[2]-o,n.push("right")):r.push("right")),t}(s,w,c,u=u||[],A,W),n=function(t,e,o,i,n,r){return t=0?(t=e[1],n.push("top")):r.push("top")),t+o>e[3]&&(i.indexOf("bottom")>=0?(t=e[3]-o,n.push("bottom")):r.push("bottom")),t}(n,w,p,u,A,W),A.length)&&(x=i(e.options.pinnedClass)?r("pinned",y,O):e.options.pinnedClass,C.push(x),A.forEach((function(t){C.push(x+"-"+t)})));!function(t,e,o,n,s){var a;t.length&&(a=i(s)?r("out-of-bounds",o,n):s,e.push(a),t.forEach((function(t){e.push(a+"-"+t)})))}(W,C,y,O,e.options.outOfBoundsClass),(A.indexOf("left")>=0||A.indexOf("right")>=0)&&(P.left=T.left=!1),(A.indexOf("top")>=0||A.indexOf("bottom")>=0)&&(P.top=T.top=!1),T.top===h.top&&T.left===h.left&&P.top===e.attachment.top&&P.left===e.attachment.left||(e.updateAttachClasses(P,T),e.trigger("update",{attachment:P,targetAttachment:T}))})),l((function(){!1!==e.options.addTargetClasses&&a(e.target,C,x),a(e.element,C,x)})),{top:n,left:s}}},x={position:function(t){var e=t.top,i=t.left;if(this.options.shift){var n,r,s=this.options.shift;if("function"==typeof s&&(s=s.call(this,{top:e,left:i})),o(s)){(s=s.split(" "))[1]=s[1]||s[0];var a=s;n=a[0],r=a[1],n=parseFloat(n,10),r=parseFloat(r,10)}else{var h=[s.top,s.left];n=h[0],r=h[1]}return{top:e+=n,left:i+=r}}}},C=function(){function t(){}var e=t.prototype;return e.on=function(t,e,o,n){return void 0===n&&(n=!1),i(this.bindings)&&(this.bindings={}),i(this.bindings[t])&&(this.bindings[t]=[]),this.bindings[t].push({handler:e,ctx:o,once:n}),this},e.once=function(t,e,o){return this.on(t,e,o,!0)},e.off=function(t,e){var o=this;return i(this.bindings)||i(this.bindings[t])||(i(e)?delete this.bindings[t]:this.bindings[t].forEach((function(i,n){i.handler===e&&o.bindings[t].splice(n,1)}))),this},e.trigger=function(t){for(var e=this,o=arguments.length,n=new Array(o>1?o-1:0),r=1;r16)return S=Math.min(S-16,250),void(X=setTimeout(t,250));!i(Y)&&N()-Y<10||(null!=X&&(clearTimeout(X),X=null),Y=N(),B(),S=N()-Y)},i(window)||i(window.addEventListener)||["resize","scroll","touchmove"].forEach((function(t){window.addEventListener(t,H)}));var R=function(h){var p,u;function m(t){var o;return(o=h.call(this)||this).position=o.position.bind(e(o)),k.push(e(o)),o.history=[],o.setOptions(t,!1),L.modules.forEach((function(t){i(t.initialize)||t.initialize.call(e(o))})),o.position(),o}u=h,(p=m).prototype=Object.create(u.prototype),p.prototype.constructor=p,t(p,u);var g=m.prototype;return g.setOptions=function(t,e){var n=this;void 0===e&&(e=!0);var r={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether",bodyElement:document.body};this.options=d(r,t);var s=this.options,a=s.element,h=s.target,l=s.targetModifier,f=s.bodyElement;if(this.element=a,this.target=h,this.targetModifier=l,"string"==typeof f&&(f=document.querySelector(f)),this.bodyElement=f,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),["element","target"].forEach((function(t){if(i(n[t]))throw new Error("Tether Error: Both element and target must be defined");i(n[t].jquery)?o(n[t])&&(n[t]=document.querySelector(n[t])):n[t]=n[t][0]})),this._addClasses(),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=z(this.options.targetAttachment),this.attachment=z(this.options.attachment),this.offset=z(this.options.offset),this.targetOffset=z(this.options.targetOffset),i(this.scrollParents)||this.disable(),"scroll-handle"===this.targetModifier?this.scrollParents=[this.target]:this.scrollParents=function(t){var e=(getComputedStyle(t)||{}).position,o=[];if("fixed"===e)return[t];for(var n=t;(n=n.parentNode)&&n&&1===n.nodeType;){var r=void 0;try{r=getComputedStyle(n)}catch(t){}if(i(r)||null===r)return o.push(n),o;var s=r,a=s.overflow,h=s.overflowX,l=s.overflowY;/(auto|scroll|overlay)/.test(a+l+h)&&("absolute"!==e||["relative","absolute","fixed"].indexOf(r.position)>=0)&&o.push(n)}return o.push(t.ownerDocument.body),t.ownerDocument!==document&&o.push(t.ownerDocument.defaultView),o}(this.target),!1!==this.options.enabled&&this.enable(e)},g.getTargetBounds=function(){return i(this.targetModifier)?b(this.bodyElement,this.target):"visible"===this.targetModifier?function(t,e){if(e===document.body)return{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth};var o=b(t,e),i={height:o.height,width:o.width,top:o.top,left:o.left};return i.height=Math.min(i.height,o.height-(pageYOffset-o.top)),i.height=Math.min(i.height,o.height-(o.top+o.height-(pageYOffset+innerHeight))),i.height=Math.min(innerHeight,i.height),i.height-=2,i.width=Math.min(i.width,o.width-(pageXOffset-o.left)),i.width=Math.min(i.width,o.width-(o.left+o.width-(pageXOffset+innerWidth))),i.width=Math.min(innerWidth,i.width),i.width-=2,i.tope.clientWidth||[r.overflow,r.overflowX].indexOf("scroll")>=0||!n)&&(s=15);var a=o.height-parseFloat(r.borderTopWidth)-parseFloat(r.borderBottomWidth)-s,h={width:15,height:.975*a*(a/e.scrollHeight),left:o.left+o.width-parseFloat(r.borderLeftWidth)-15},l=0;a<408&&n&&(l=-11e-5*Math.pow(a,2)-.00727*a+22.58),n||(h.height=Math.max(h.height,24));var f=i/(e.scrollHeight-a);return h.top=f*(a-h.height-l)+o.top+parseFloat(r.borderTopWidth),n&&(h.height=Math.max(h.height,24)),h}(this.bodyElement,this.target):void 0},g.clearCache=function(){this._cache={}},g.cache=function(t,e){return i(this._cache)&&(this._cache={}),i(this._cache[t])&&(this._cache[t]=e.call(this)),this._cache[t]},g.enable=function(t){var e=this;void 0===t&&(t=!0);var o=this.options,i=o.classes,s=o.classPrefix;!1!==this.options.addTargetClasses&&n(this.target,r("enabled",i,s)),n(this.element,r("enabled",i,s)),this.enabled=!0,this.scrollParents.forEach((function(t){t!==e.target.ownerDocument&&t.addEventListener("scroll",e.position)})),t&&this.position()},g.disable=function(){var t=this,e=this.options,o=e.classes,n=e.classPrefix;s(this.target,r("enabled",o,n)),s(this.element,r("enabled",o,n)),this.enabled=!1,i(this.scrollParents)||this.scrollParents.forEach((function(e){e&&e.removeEventListener&&e.removeEventListener("scroll",t.position)}))},g.destroy=function(){var t,e=this;this.disable(),this._removeClasses(),k.forEach((function(t,o){t===e&&k.splice(o,1)})),0===k.length&&(t=this.bodyElement,v.has(t)&&t.removeChild(v.get(t)),v.delete(t))},g.updateAttachClasses=function(t,e){var o=this;t=t||this.attachment,e=e||this.targetAttachment;var n=this.options,s=n.classes,h=n.classPrefix;!i(this._addAttachClasses)&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),i(this._addAttachClasses)&&(this._addAttachClasses=[]),this.add=this._addAttachClasses,t.top&&this.add.push(r("element-attached",s,h)+"-"+t.top),t.left&&this.add.push(r("element-attached",s,h)+"-"+t.left),e.top&&this.add.push(r("target-attached",s,h)+"-"+e.top),e.left&&this.add.push(r("target-attached",s,h)+"-"+e.left),this.all=[],["left","top","bottom","right","middle","center"].forEach((function(t){o.all.push(r("element-attached",s,h)+"-"+t),o.all.push(r("target-attached",s,h)+"-"+t)})),l((function(){i(o._addAttachClasses)||(a(o.element,o._addAttachClasses,o.all),!1!==o.options.addTargetClasses&&a(o.target,o._addAttachClasses,o.all),delete o._addAttachClasses)}))},g.position=function(t){var e=this;if(void 0===t&&(t=!0),this.enabled){this.clearCache();var o=function(t,e){var o=t.left,i=t.top;return"auto"===o&&(o=T[e.left]),"auto"===i&&(i=P[e.top]),{left:o,top:i}}(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,o);var n=this.cache("element-bounds",(function(){return b(e.bodyElement,e.element)})),r=n.width,s=n.height;if(0!==r||0!==s||i(this.lastSize))this.lastSize={width:r,height:s};else{var a=this.lastSize;r=a.width,s=a.height}var h=this.cache("target-bounds",(function(){return e.getTargetBounds()})),l=h,p=M(_(this.attachment),{width:r,height:s}),d=M(_(o),l),u=M(this.offset,{width:r,height:s}),m=M(this.targetOffset,l);p=W(p,u),d=W(d,m);for(var g=h.left+d.left-p.left,v=h.top+d.top-p.top,w=0;wx.documentElement.clientHeight&&(E=this.cache("scrollbar-size",c),O.viewport.bottom-=E.height),C.innerWidth>x.documentElement.clientWidth&&(E=this.cache("scrollbar-size",c),O.viewport.right-=E.width),-1!==["","static"].indexOf(x.body.style.position)&&-1!==["","static"].indexOf(x.body.parentElement.style.position)||(O.page.bottom=x.body.scrollHeight-v-s,O.page.right=x.body.scrollWidth-g-r),!i(this.options.optimizations)&&!1!==this.options.optimizations.moveElement&&i(this.targetModifier)){var A=this.cache("target-offsetparent",(function(){return F(e.target)})),z=this.cache("target-offsetparent-bounds",(function(){return b(e.bodyElement,A)})),Y=getComputedStyle(A),S=z,X={};if(["Top","Left","Bottom","Right"].forEach((function(t){X[t.toLowerCase()]=parseFloat(Y["border"+t+"Width"])})),z.right=x.body.scrollWidth-z.left-S.width+X.right,z.bottom=x.body.scrollHeight-z.top-S.height+X.bottom,O.page.top>=z.top+X.top&&O.page.bottom>=z.bottom&&O.page.left>=z.left+X.left&&O.page.right>=z.right){var H=A.scrollLeft,D=A.scrollTop;O.offset={top:O.page.top-z.top+D-X.top,left:O.page.left-z.left+H-X.left}}}return this.move(O),this.history.unshift(O),this.history.length>3&&this.history.pop(),t&&f(),!0}},g.move=function(t){var e=this;if(!i(this.element.parentNode)){var o,n,r,s={};for(var a in t)for(var h in s[a]={},t[a]){for(var f=!1,p=0;p=n&&n>=o-r))){f=!0;break}}f||(s[a][h]=!0)}var u={top:"",left:"",right:"",bottom:""},m=function(t,o){var n,r;!1!==(!i(e.options.optimizations)?e.options.optimizations.gpu:null)?(t.top?(u.top=0,n=o.top):(u.bottom=0,n=-o.bottom),t.left?(u.left=0,r=o.left):(u.right=0,r=-o.right),"number"==typeof window.devicePixelRatio&&devicePixelRatio%1==0&&(r=Math.round(r*devicePixelRatio)/devicePixelRatio,n=Math.round(n*devicePixelRatio)/devicePixelRatio),u[D]="translateX("+r+"px) translateY("+n+"px)","msTransform"!==D&&(u[D]+=" translateZ(0)")):(t.top?u.top=o.top+"px":u.bottom=o.bottom+"px",t.left?u.left=o.left+"px":u.right=o.right+"px")},g=!0;!i(this.options.optimizations)&&!1===this.options.optimizations.allowPositionFixed&&(g=!1);var v,b,w=!1;if((s.page.top||s.page.bottom)&&(s.page.left||s.page.right))u.position="absolute",m(s.page,t.page);else if(g&&(s.viewport.top||s.viewport.bottom)&&(s.viewport.left||s.viewport.right))u.position="fixed",m(s.viewport,t.viewport);else if(!i(s.offset)&&s.offset.top&&s.offset.left){u.position="absolute";var y=this.cache("target-offsetparent",(function(){return F(e.target)}));F(this.element)!==y&&l((function(){e.element.parentNode.removeChild(e.element),y.appendChild(e.element)})),m(s.offset,t.offset),w=!0}else u.position="absolute",m({top:!0,left:!0},t.page);if(!w)if(this.options.bodyElement)this.element.parentNode!==this.options.bodyElement&&this.options.bodyElement.appendChild(this.element);else{for(var E=!0,O=this.element.parentNode;O&&1===O.nodeType&&"BODY"!==O.tagName&&(b=void 0,((b=(v=O).ownerDocument).fullscreenElement||b.webkitFullscreenElement||b.mozFullScreenElement||b.msFullscreenElement)!==v);){if("static"!==getComputedStyle(O).position){E=!1;break}O=O.parentNode}E||(this.element.parentNode.removeChild(this.element),this.element.ownerDocument.body.appendChild(this.element))}var x={},C=!1;for(var T in u){var P=u[T];this.element.style[T]!==P&&(C=!0,x[T]=P)}C&&l((function(){d(e.element.style,x),e.trigger("repositioned")}))}},g._addClasses=function(){var t=this.options,e=t.classes,o=t.classPrefix;n(this.element,r("element",e,o)),!1!==this.options.addTargetClasses&&n(this.target,r("target",e,o))},g._removeClasses=function(){var t=this,e=this.options,o=e.classes,i=e.classPrefix;s(this.element,r("element",o,i)),!1!==this.options.addTargetClasses&&s(this.target,r("target",o,i)),this.all.forEach((function(e){t.element.classList.remove(e),t.target.classList.remove(e)}))},m}(C);R.modules=[],L.position=B;var j=d(R,L);j.modules.push({initialize:function(){var t=this,e=this.options,o=e.classes,i=e.classPrefix;this.markers={},["target","element"].forEach((function(e){var n=document.createElement("div");n.className=r(e+"-marker",o,i);var s=document.createElement("div");s.className=r("marker-dot",o,i),n.appendChild(s),t[e].appendChild(n),t.markers[e]={dot:s,el:n}}))},position:function(t){var e={element:t.manualOffset,target:t.manualTargetOffset};for(var i in e){var n=e[i];for(var r in n){var s,a=n[r];(!o(a)||-1===a.indexOf("%")&&-1===a.indexOf("px"))&&(a+="px"),this.markers[i]&&(null==(s=this.markers[i].dot)?void 0:s.style[r])!==a&&(this.markers[i].dot.style[r]=a)}}return!0}});export default j; +\ No newline at end of file +diff --git a/dist/js/tether.js b/dist/js/tether.js +index 8a3c21d6312fe700ffbbadf29335146a96cd90e6..0af5d490878dffe264591a8df06ad3c8f5fdcb8d 100644 +--- a/dist/js/tether.js ++++ b/dist/js/tether.js +@@ -199,7 +199,7 @@ + }(); + + var zeroPosCache = {}; +- var zeroElement = null; ++ var zeroElement = new Map(); + function getBounds(body, el) { + var doc; + +@@ -334,11 +334,11 @@ + } + } + function removeUtilElements(body) { +- if (zeroElement) { +- body.removeChild(zeroElement); ++ if (zeroElements.has(body)) { ++ body.removeChild(zeroElements.get(body)); + } + +- zeroElement = null; ++ zeroElements.delete(body); + } + /** + * Same as native getBoundingClientRect, except it takes into account parent offsets +@@ -380,7 +380,7 @@ + // jitter as the user scrolls that messes with our ability to detect if two positions + // are equivilant or not. We place an element at the top left of the page that will + // get the same jitter, so we can cancel the two out. +- var node = zeroElement; ++ var node = zeroElements.get(body); + + if (!node || !body.contains(node)) { + node = document.createElement('div'); +@@ -391,7 +391,7 @@ + position: 'absolute' + }); + body.appendChild(node); +- zeroElement = node; ++ zeroElements.set(body, node); + } + + var id = node.getAttribute('data-tether-id'); diff --git a/package.json b/package.json index 1e63a99e67..abd4ab6d20 100644 --- a/package.json +++ b/package.json @@ -198,7 +198,8 @@ "packageManager": "yarn@3.2.0", "resolutions": { "@stencil/react-output-target@^0.4.0": "patch:@stencil/react-output-target@npm:0.3.1#.yarn/patches/@stencil-react-output-target-npm-0.3.1-4da13663f2.patch", - "@stencil/vue-output-target@^0.7.0": "patch:@stencil/vue-output-target@npm:0.6.2#.yarn/patches/@stencil-vue-output-target-npm-0.6.2-a9b3828cb9.patch" + "@stencil/vue-output-target@^0.7.0": "patch:@stencil/vue-output-target@npm:0.6.2#.yarn/patches/@stencil-vue-output-target-npm-0.6.2-a9b3828cb9.patch", + "tether@2.0.0": "patch:tether@npm:2.0.0#.yarn/patches/tether-npm-2.0.0-f14e824ccf.patch" }, "eslintConfig": { "extends": [