"use strict";(self.webpackChunksubstack=self.webpackChunksubstack||[]).push([["7493"],{86871:function(t,e,n){function i(t){return t.split("-")[1]}function l(t){return"y"===t?"height":"width"}function o(t){return t.split("-")[0]}function r(t){return["top","bottom"].includes(o(t))?"x":"y"}function a(t,e,n){let a,{reference:s,floating:f}=t,c=s.x+s.width/2-f.width/2,u=s.y+s.height/2-f.height/2,p=r(e),h=l(p),d=s[h]/2-f[h]/2,m="x"===p;switch(o(e)){case"top":a={x:c,y:s.y-f.height};break;case"bottom":a={x:c,y:s.y+s.height};break;case"right":a={x:s.x+s.width,y:u};break;case"left":a={x:s.x-f.width,y:u};break;default:a={x:s.x,y:s.y}}switch(i(e)){case"start":a[p]-=d*(n&&m?-1:1);break;case"end":a[p]+=d*(n&&m?-1:1)}return a}n.d(e,{JB:()=>f,RR:()=>x,cv:()=>y,dp:()=>v,oo:()=>s,uY:()=>w});let s=async(t,e,n)=>{let{placement:i="bottom",strategy:l="absolute",middleware:o=[],platform:r}=n,s=o.filter(Boolean),f=await (null==r.isRTL?void 0:r.isRTL(e)),c=await r.getElementRects({reference:t,floating:e,strategy:l}),{x:u,y:p}=a(c,i,f),h=i,d={},m=0;for(let n=0;nt.concat(e,e+"-start",e+"-end"),[]);let h=/^(1588|1691|2536|4457)$/.test(n.j)?null:{left:"right",right:"left",bottom:"top",top:"bottom"};function d(t){return t.replace(/left|right|bottom|top/g,t=>h[t])}let m=/^(1588|1691|2536|4457)$/.test(n.j)?null:{start:"end",end:"start"};function g(t){return t.replace(/start|end/g,t=>m[t])}let x=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,a,s,f;let{placement:u,middlewareData:p,rects:h,initialPlacement:m,platform:x,elements:y}=e,{mainAxis:w=!0,crossAxis:v=!0,fallbackPlacements:b,fallbackStrategy:R="bestFit",fallbackAxisSideDirection:L="none",flipAlignment:k=!0,...T}=t,F=o(u),D=o(m)===m,j=await (null==x.isRTL?void 0:x.isRTL(y.floating)),A=b||(D||!k?[d(m)]:function(t){let e=d(t);return[g(t),e,g(e)]}(m));b||"none"===L||A.push(...function(t,e,n,l){let r=i(t),a=function(t,e,n){let i=["left","right"],l=["right","left"];switch(t){case"top":case"bottom":return n?e?l:i:e?i:l;case"left":case"right":return e?["top","bottom"]:["bottom","top"];default:return[]}}(o(t),"start"===n,l);return r&&(a=a.map(t=>t+"-"+r),e&&(a=a.concat(a.map(g)))),a}(m,k,L,j));let E=[m,...A],P=await c(e,T),W=[],$=(null==(n=p.flip)?void 0:n.overflows)||[];if(w&&W.push(P[F]),v){let{main:t,cross:e}=function(t,e,n){void 0===n&&(n=!1);let o=i(t),a=r(t),s=l(a),f="x"===a?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[s]>e.floating[s]&&(f=d(f)),{main:f,cross:d(f)}}(u,h,j);W.push(P[t],P[e])}if($=[...$,{placement:u,overflows:W}],!W.every(t=>t<=0)){let t=((null==(a=p.flip)?void 0:a.index)||0)+1,e=E[t];if(e)return{data:{index:t,overflows:$},reset:{placement:e}};let n=null==(s=$.filter(t=>t.overflows[0]<=0).sort((t,e)=>t.overflows[1]-e.overflows[1])[0])?void 0:s.placement;if(!n)switch(R){case"bestFit":{let t=null==(f=$.map(t=>[t.placement,t.overflows.filter(t=>t>0).reduce((t,e)=>t+e,0)]).sort((t,e)=>t[1]-e[1])[0])?void 0:f[0];t&&(n=t);break}case"initialPlacement":n=m}if(u!==n)return{reset:{placement:n}}}return{}}}},y=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){let{x:n,y:l}=e,a=await async function(t,e){let{placement:n,platform:l,elements:a}=t,s=await (null==l.isRTL?void 0:l.isRTL(a.floating)),f=o(n),c=i(n),u="x"===r(n),p=["left","top"].includes(f)?-1:1,h=s&&u?-1:1,d="function"==typeof e?e(t):e,{mainAxis:m,crossAxis:g,alignmentAxis:x}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return c&&"number"==typeof x&&(g="end"===c?-1*x:x),u?{x:g*h,y:m*p}:{x:m*p,y:g*h}}(e,t);return{x:n+a.x,y:l+a.y,data:a}}}},w=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:i,placement:l}=e,{mainAxis:a=!0,crossAxis:s=!1,limiter:f={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...h}=t,d={x:n,y:i},m=await c(e,h),g=r(o(l)),x="x"===g?"y":"x",y=d[g],w=d[x];if(a){let t="y"===g?"bottom":"right";y=p(y+m["y"===g?"top":"left"],u(y,y-m[t]))}if(s){let t="y"===x?"bottom":"right";w=p(w+m["y"===x?"top":"left"],u(w,w-m[t]))}let v=f.fn({...e,[g]:y,[x]:w});return{...v,data:{x:v.x-n,y:v.y-i}}}}},v=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){let n,l;let{placement:a,rects:s,platform:f,elements:h}=e,{apply:d=()=>{},...m}=t,g=await c(e,m),x=o(a),y=i(a),w="x"===r(a),{width:v,height:b}=s.floating;"top"===x||"bottom"===x?(n=x,l=y===(await (null==f.isRTL?void 0:f.isRTL(h.floating))?"start":"end")?"left":"right"):(l=x,n="end"===y?"top":"bottom");let R=b-g[n],L=v-g[l],k=!e.middlewareData.shift,T=R,F=L;if(w){let t=v-g.left-g.right;F=y||k?u(L,t):t}else{let t=b-g.top-g.bottom;T=y||k?u(R,t):t}if(k&&!y){let t=p(g.left,0),e=p(g.right,0),n=p(g.top,0),i=p(g.bottom,0);w?F=v-2*(0!==t||0!==e?t+e:p(g.left,g.right)):T=b-2*(0!==n||0!==i?n+i:p(g.top,g.bottom))}await d({...e,availableWidth:F,availableHeight:T});let D=await f.getDimensions(h.floating);return v!==D.width||b!==D.height?{reset:{rects:!0}}:{}}}}},93920:function(t,e,n){if(n.d(e,{Me:()=>v,RR:()=>L,cv:()=>b,dp:()=>k,oo:()=>T,uY:()=>R}),!/^(1588|1691|2536|4457)$/.test(n.j))var i=n(86871);if(!/^(1588|1691|2536|4457)$/.test(n.j))var l=n(81528);if(!/^(1588|1691|2536|4457)$/.test(n.j))var o=n(31720);function r(t){let e=(0,o.Dx)(t),n=parseFloat(e.width)||0,i=parseFloat(e.height)||0,r=(0,o.Re)(t),a=r?t.offsetWidth:n,s=r?t.offsetHeight:i,f=(0,l.NM)(n)!==a||(0,l.NM)(i)!==s;return f&&(n=a,i=s),{width:n,height:i,$:f}}function a(t){return(0,o.kK)(t)?t:t.contextElement}function s(t){let e=a(t);if(!(0,o.Re)(e))return(0,l.ze)(1);let n=e.getBoundingClientRect(),{width:i,height:s,$:f}=r(e),c=(f?(0,l.NM)(n.width):n.width)/i,u=(f?(0,l.NM)(n.height):n.height)/s;return c&&Number.isFinite(c)||(c=1),u&&Number.isFinite(u)||(u=1),{x:c,y:u}}let f=/^(1588|1691|2536|4457)$/.test(n.j)?null:(0,l.ze)(0);function c(t){let e=(0,o.Jj)(t);return(0,o.Pf)()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:f}function u(t,e,n,r){var f;void 0===e&&(e=!1),void 0===n&&(n=!1);let u=t.getBoundingClientRect(),p=a(t),h=(0,l.ze)(1);e&&(r?(0,o.kK)(r)&&(h=s(r)):h=s(t));let d=(void 0===(f=n)&&(f=!1),r&&(!f||r===(0,o.Jj)(p))&&f)?c(p):(0,l.ze)(0),m=(u.left+d.x)/h.x,g=(u.top+d.y)/h.y,x=u.width/h.x,y=u.height/h.y;if(p){let t=(0,o.Jj)(p),e=r&&(0,o.kK)(r)?(0,o.Jj)(r):r,n=t,i=n.frameElement;for(;i&&r&&e!==n;){let t=s(i),e=i.getBoundingClientRect(),l=(0,o.Dx)(i),r=e.left+(i.clientLeft+parseFloat(l.paddingLeft))*t.x,a=e.top+(i.clientTop+parseFloat(l.paddingTop))*t.y;m*=t.x,g*=t.y,x*=t.x,y*=t.y,m+=r,g+=a,i=(n=(0,o.Jj)(i)).frameElement}}return(0,i.JB)({width:x,height:y,x:m,y:g})}let p=/^(1588|1691|2536|4457)$/.test(n.j)?null:[":popover-open",":modal"];function h(t){return p.some(e=>{try{return t.matches(e)}catch(t){return!1}})}function d(t){return u((0,o.tF)(t)).left+(0,o.Lw)(t).scrollLeft}function m(t,e,n){let r;if("viewport"===e)r=function(t,e){let n=(0,o.Jj)(t),i=(0,o.tF)(t),l=n.visualViewport,r=i.clientWidth,a=i.clientHeight,s=0,f=0;if(l){r=l.width,a=l.height;let t=(0,o.Pf)();(!t||t&&"fixed"===e)&&(s=l.offsetLeft,f=l.offsetTop)}return{width:r,height:a,x:s,y:f}}(t,n);else if("document"===e)r=function(t){let e=(0,o.tF)(t),n=(0,o.Lw)(t),i=t.ownerDocument.body,r=(0,l.Fp)(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),a=(0,l.Fp)(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight),s=-n.scrollLeft+d(t),f=-n.scrollTop;return"rtl"===(0,o.Dx)(i).direction&&(s+=(0,l.Fp)(e.clientWidth,i.clientWidth)-r),{width:r,height:a,x:s,y:f}}((0,o.tF)(t));else if((0,o.kK)(e))r=function(t,e){let n=u(t,!0,"fixed"===e),i=n.top+t.clientTop,r=n.left+t.clientLeft,a=(0,o.Re)(t)?s(t):(0,l.ze)(1),f=t.clientWidth*a.x,c=t.clientHeight*a.y;return{width:f,height:c,x:r*a.x,y:i*a.y}}(e,n);else{let n=c(t);r={...e,x:e.x-n.x,y:e.y-n.y}}return(0,i.JB)(r)}function g(t,e){return(0,o.Re)(t)&&"fixed"!==(0,o.Dx)(t).position?e?e(t):t.offsetParent:null}function x(t,e){let n=(0,o.Jj)(t);if(!(0,o.Re)(t)||h(t))return n;let i=g(t,e);for(;i&&(0,o.Ze)(i)&&"static"===(0,o.Dx)(i).position;)i=g(i,e);return i&&("html"===(0,o.wk)(i)||"body"===(0,o.wk)(i)&&"static"===(0,o.Dx)(i).position&&!(0,o.hT)(i))?n:i||(0,o.gQ)(t)||n}let y=async function(t){let e=this.getOffsetParent||x,n=this.getDimensions,i=await n(t.floating);return{reference:function(t,e,n){let i=(0,o.Re)(e),r=(0,o.tF)(e),a="fixed"===n,s=u(t,!0,a,e),f={scrollLeft:0,scrollTop:0},c=(0,l.ze)(0);if(i||!i&&!a){if(("body"!==(0,o.wk)(e)||(0,o.ao)(r))&&(f=(0,o.Lw)(e)),i){let t=u(e,!0,a,e);c.x=t.x+e.clientLeft,c.y=t.y+e.clientTop}else r&&(c.x=d(r))}return{x:s.left+f.scrollLeft-c.x,y:s.top+f.scrollTop-c.y,width:s.width,height:s.height}}(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},w=/^(1588|1691|2536|4457)$/.test(n.j)?null:{convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:i,strategy:r}=t,a="fixed"===r,f=(0,o.tF)(i),c=!!e&&h(e.floating);if(i===f||c&&a)return n;let p={scrollLeft:0,scrollTop:0},d=(0,l.ze)(1),m=(0,l.ze)(0),g=(0,o.Re)(i);if((g||!g&&!a)&&(("body"!==(0,o.wk)(i)||(0,o.ao)(f))&&(p=(0,o.Lw)(i)),(0,o.Re)(i))){let t=u(i);d=s(i),m.x=t.x+i.clientLeft,m.y=t.y+i.clientTop}return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-p.scrollLeft*d.x+m.x,y:n.y*d.y-p.scrollTop*d.y+m.y}},getDocumentElement:o.tF,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:i,strategy:r}=t,a=[..."clippingAncestors"===n?function(t,e){let n=e.get(t);if(n)return n;let i=(0,o.Kx)(t,[],!1).filter(t=>(0,o.kK)(t)&&"body"!==(0,o.wk)(t)),l=null,r="fixed"===(0,o.Dx)(t).position,a=r?(0,o.Ow)(t):t;for(;(0,o.kK)(a)&&!(0,o.Py)(a);){let e=(0,o.Dx)(a),n=(0,o.hT)(a);n||"fixed"!==e.position||(l=null),(r?!n&&!l:!n&&"static"===e.position&&!!l&&["absolute","fixed"].includes(l.position)||(0,o.ao)(a)&&!n&&function t(e,n){let i=(0,o.Ow)(e);return!(i===n||!(0,o.kK)(i)||(0,o.Py)(i))&&("fixed"===(0,o.Dx)(i).position||t(i,n))}(t,a))?i=i.filter(t=>t!==a):l=e,a=(0,o.Ow)(a)}return e.set(t,i),i}(e,this._c):[].concat(n),i],s=a[0],f=a.reduce((t,n)=>{let i=m(e,n,r);return t.top=(0,l.Fp)(i.top,t.top),t.right=(0,l.VV)(i.right,t.right),t.bottom=(0,l.VV)(i.bottom,t.bottom),t.left=(0,l.Fp)(i.left,t.left),t},m(e,s,r));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}},getOffsetParent:x,getElementRects:y,getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){let{width:e,height:n}=r(t);return{width:e,height:n}},getScale:s,isElement:o.kK,isRTL:function(t){return"rtl"===(0,o.Dx)(t).direction}};function v(t,e,n,i){let r;void 0===i&&(i={});let{ancestorScroll:s=!0,ancestorResize:f=!0,elementResize:c="function"==typeof ResizeObserver,layoutShift:p="function"==typeof IntersectionObserver,animationFrame:h=!1}=i,d=a(t),m=s||f?[...d?(0,o.Kx)(d):[],...(0,o.Kx)(e)]:[];m.forEach(t=>{s&&t.addEventListener("scroll",n,{passive:!0}),f&&t.addEventListener("resize",n)});let g=d&&p?function(t,e){let n,i=null,r=(0,o.tF)(t);function a(){var t;clearTimeout(n),null==(t=i)||t.disconnect(),i=null}return!function o(s,f){void 0===s&&(s=!1),void 0===f&&(f=1),a();let{left:c,top:u,width:p,height:h}=t.getBoundingClientRect();if(s||e(),!p||!h)return;let d=(0,l.GW)(u),m=(0,l.GW)(r.clientWidth-(c+p)),g={rootMargin:-d+"px "+-m+"px "+-(0,l.GW)(r.clientHeight-(u+h))+"px "+-(0,l.GW)(c)+"px",threshold:(0,l.Fp)(0,(0,l.VV)(1,f))||1},x=!0;function y(t){let e=t[0].intersectionRatio;if(e!==f){if(!x)return o();e?o(!1,e):n=setTimeout(()=>{o(!1,1e-7)},1e3)}x=!1}try{i=new IntersectionObserver(y,{...g,root:r.ownerDocument})}catch(t){i=new IntersectionObserver(y,g)}i.observe(t)}(!0),a}(d,n):null,x=-1,y=null;c&&(y=new ResizeObserver(t=>{let[i]=t;i&&i.target===d&&y&&(y.unobserve(e),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var t;null==(t=y)||t.observe(e)})),n()}),d&&!h&&y.observe(d),y.observe(e));let w=h?u(t):null;return h&&function e(){let i=u(t);w&&(i.x!==w.x||i.y!==w.y||i.width!==w.width||i.height!==w.height)&&n(),w=i,r=requestAnimationFrame(e)}(),n(),()=>{var t;m.forEach(t=>{s&&t.removeEventListener("scroll",n),f&&t.removeEventListener("resize",n)}),null==g||g(),null==(t=y)||t.disconnect(),y=null,h&&cancelAnimationFrame(r)}}let b=/^(1588|1691|2536|4457)$/.test(n.j)?null:i.cv,R=/^(3154|6909)$/.test(n.j)?i.uY:null,L=/^(1588|1691|2536|4457)$/.test(n.j)?null:i.RR,k=/^(1588|1691|2536|4457)$/.test(n.j)?null:i.dp,T=(t,e,n)=>{let l=new Map,o={platform:w,...n},r={...o.platform,_c:l};return(0,i.oo)(t,e,{...o,platform:r})}}}]);