1"use strict";(self.webpackChunkgatsby_elkhorn=self.webpackChunkgatsby_elkhorn||[]).push([[6473],{6473:function(e,t,o){o.r(t),o.d(t,{default:function(){return M}});var n=o(30758),l=o(55034),i=o(31737),s=o(60886);let a=!1;if("undefined"!=typeof window){const e={get passive(){a=!0}};window.addEventListener("testPassive",null,e),window.removeEventListener("testPassive",null,e)}const d="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1);let r,c,u,m,p=[],y=new Map,v=!1,w=-1;const g=e=>p.some(t=>!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))),h=e=>{const t=e||window.event;return!!g(t.target)||(t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1))},f=()=>{void 0!==m&&(document.body.style.paddingRight=m,m=void 0),void 0!==r&&(document.body.style.overflow=r,r=void 0)},b=()=>{if(void 0!==u){const e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10),o=document.documentElement,n=document.body;o.style.height=(null==c?void 0:c.height)||"",o.style.overflow=(null==c?void 0:c.overflow)||"",n.style.position=u.position||"",n.style.top=u.top||"",n.style.left=u.left||"",n.style.width=u.width||"",n.style.height=u.height||"",n.style.overflow=u.overflow||"",window.scrollTo(t,e),u=void 0}},E=(e,t)=>{if(!e)return void console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");if(y.set(e,(null==y?void 0:y.get(e))?(null==y?void 0:y.get(e))+1:1),p.some(t=>t.targetElement===e))return;const o={targetElement:e,options:t||{}};p=[...p,o],d?window.requestAnimationFrame(()=>{const e=document.documentElement,t=document.body;if(void 0===u){c={...e.style},u={...t.style};const{scrollY:o,scrollX:n,innerHeight:l}=window;e.style.height="100%",e.style.overflow="hidden",t.style.position="fixed",t.style.top=-o+"px",t.style.left=-n+"px",t.style.width="100%",t.style.height="auto",t.style.overflow="hidden",setTimeout(()=>window.requestAnimationFrame(()=>{const e=l-window.innerHeight;e&&o>=l&&(t.style.top=-(o+e)+"px")}),300)}}):(e=>{if(void 0===m){const t=!!e&&!0===e.reserveScrollBarGap,o=window.innerWidth-document.documentElement.getBoundingClientRect().width;if(t&&o>0){const e=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"),10);m=document.body.style.paddingRight,document.body.style.paddingRight=`${e+o}px`}}void 0===r&&(r=document.body.style.overflow,document.body.style.overflow="hidden")})(t),d&&(e.ontouchstart=e=>{1===e.targetTouches.length&&(w=e.targetTouches[0].clientY)},e.ontouchmove=t=>{1===t.targetTouches.length&&((e,t)=>{const o=e.targetTouches[0].clientY-w;!g(e.target)&&(t&&0===t.scrollTop&&o>0||(e=>!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight)(t)&&o<0?h(e):e.stopPropagation())})(t,e)},v||(document.addEventListener("touchmove",h,a?{passive:!1}:void 0),v=!0))};var x=(e,t)=>{var o;e?(o=t)?(y.set(o,(null==y?void 0:y.get(o))?(null==y?void 0:y.get(o))-1:0),0===(null==y?void 0:y.get(o))&&(p=p.filter(e=>e.targetElement!==o),null==y||y.delete(o)),d&&(o.ontouchstart=null,o.ontouchmove=null,v&&0===p.length&&(document.removeEventListener("touchmove",h,a?{passive:!1}:void 0),v=!1)),0===p.length&&(d?b():f())):console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices."):E(t)};const T={lg:"max-w-3xl xl:max-w-4xl",md:"max-w-2xl xl:max-w-3xl",sm:"max-w-xl xl:max-w-2xl"},k={type:"tween",duration:.3},C={open:{opacity:1,display:"block",pointerEvents:"auto",transition:k},closed:{opacity:0,transition:k,transitionEnd:{pointerEvents:"none",display:"none"}}},I={open:{opacity:1,transition:{...k,type:"tween",tween:"easeOut"}},closed:{opacity:0,transition:{...k,type:"tween",tween:"easeOut"}}};var M=()=>{const e=(0,n.useRef)(),[{modal:t},o]=(0,s.A1)(),{modal:a,content:d,background:r,title:c,description:u,focusId:m,size:p}=t;return(0,n.useEffect)(()=>{const e=e=>{27===parseInt(e.keyCode,10)&&o({type:"closeModal"})};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[]),(0,n.useEffect)(()=>{a||(x(!0,e.current),o({type:"closeModal"}))},[a]),n.createElement(i.m.div,{initial:"closed",animate:a?"open":"closed",variants:C,className:(0,l.A)("bg-opacity-[0.975] fixed inset-0 z-300 md:py-12",r),onAnimationComplete:()=>{!a&&e.content?o({type:"clearModalContent"}):a&&(m&&document.getElementById(m).focus(),x(!1,e.current))}},n.createElement("button",{type:"button","aria-label":"Close modal",onClick:()=>{o({type:"closeModal"})},className:(0,l.A)("absolute inset-0 z-0 flex w-full items-center text-xs text-transparent",{})},n.createElement("span",{className:"sr-only"},"Close")),n.createElement(i.m.div,{ref:e,animate:a?"open":"closed",className:(0,l.A)("relative z-30 mx-auto h-full w-full overflow-y-auto",T[p||"md"]),variants:I,"aria-labelledby":c?"modalTitle":null,"aria-describedby":u?"modalDescription":null},!!d&&n.createElement(n.Fragment,null,c&&n.createElement("h2",{id:"modalTitle",className:"sr-only"}
1,c),u&&n.createElement("p",{id:"modalDescription",className:"sr-only"},u),n.createElement(d,null))))}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.