{"version":3,"file":"DHE2026_RailArrows.CTkcO2_M.mjs","names":["useRef","useEffect","useCallback","_jsxs","_jsx","__esmMin","init_ssg_sandbox_shims","init_npm_react_18_3_1","window","ce","init_jsx_runtime","ne","p","de","addPropertyControls","init_framer_BWzg2IRg","ControlType","useIsStaticRenderer","prefersReducedMotion","isScrollable","element","overflowX","findRail","targetId","from","byId","scope","depth","candidates","candidate","DHE2026RailArrows","props","gap","size","background","borderColor","iconColor","align","snap","layoutRail","contentMaxWidth","edgePadding","style","wrapRef","isStatic","rail","RAIL_CLASS","scrollRail","direction","first","step","buttonStyle","snapRules","edgeRule","rules","sheet","c","init_DHE2026_RailArrows"],"sources":["https:/framerusercontent.com/modules/758zPnV5e7ffBjZnCt6x/CRuhFenrH9ql93KfqxYD/DHE2026_RailArrows.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{useCallback,useEffect,useRef}from\"react\";const RAIL_CLASS=\"dhe2026-rail-scroll\";function prefersReducedMotion(){if(typeof window===\"undefined\"||!window.matchMedia)return false;return window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;}function isScrollable(element){if(element.scrollWidth<=element.clientWidth+8)return false;const overflowX=window.getComputedStyle(element).overflowX;return overflowX===\"auto\"||overflowX===\"scroll\";}/** Resolve the rail by Element ID, falling back to the nearest scrollable row. */function findRail(targetId,from){if(typeof document===\"undefined\")return null;if(targetId){const byId=document.getElementById(targetId);if(byId)return byId;}let scope=from?from.parentElement:null;for(let depth=0;depth<8&&scope;depth++){const candidates=Array.from(scope.querySelectorAll(\"*\"));for(const candidate of candidates){if(isScrollable(candidate))return candidate;}scope=scope.parentElement;}return null;}/**\n * Rail Arrows\n *\n * Scrolls a horizontally scrolling layer (a stack or a CMS collection list) one\n * card at a time. Point it at the layer's Element ID.\n *\n * @framerIntrinsicWidth 110\n * @framerIntrinsicHeight 46\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function DHE2026RailArrows(props){const{targetId=\"rail\",gap=20,size=46,background=\"#FFFFFF\",borderColor=\"rgba(16, 16, 16, 0.12)\",iconColor=\"#101010\",align=\"end\",snap=true,layoutRail=false,contentMaxWidth=1200,edgePadding=24,style}=props;const wrapRef=useRef(null);const isStatic=useIsStaticRenderer();// Tag the rail so the scrollbar/snap rules still apply if no Element ID is set.\nuseEffect(()=>{if(isStatic)return;const rail=findRail(targetId,wrapRef.current);if(!rail)return;rail.classList.add(RAIL_CLASS);return()=>rail.classList.remove(RAIL_CLASS);},[isStatic,targetId]);const scrollRail=useCallback(direction=>{const rail=findRail(targetId,wrapRef.current);if(!rail)return;const first=rail.firstElementChild;const step=first?first.getBoundingClientRect().width+gap:rail.clientWidth*.8;rail.scrollBy({left:direction*step,behavior:prefersReducedMotion()?\"auto\":\"smooth\"});},[targetId,gap]);const buttonStyle={width:size,height:size,borderRadius:\"50%\",border:`1px solid ${borderColor}`,background,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",cursor:\"pointer\",padding:0,flexShrink:0};const snapRules=\"scroll-snap-type:x mandatory;scrollbar-width:none;-ms-overflow-style:none\";const edgeRule=`max(${edgePadding}px,calc((100% - ${contentMaxWidth}px) / 2 + ${edgePadding}px))`;const rules=[`.${RAIL_CLASS}>*{flex:0 0 auto}.${RAIL_CLASS}::-webkit-scrollbar{display:none}`,targetId?`#${targetId}>*{flex:0 0 auto}#${targetId}::-webkit-scrollbar{display:none}`:\"\",snap?`.${RAIL_CLASS}{${snapRules}}.${RAIL_CLASS}>*{scroll-snap-align:start}`:\"\",snap&&targetId?`#${targetId}{${snapRules}}#${targetId}>*{scroll-snap-align:start}`:\"\",layoutRail?`.${RAIL_CLASS}{padding-left:${edgeRule} !important;padding-right:${edgeRule} !important}`:\"\",layoutRail&&targetId?`#${targetId}{padding-left:${edgeRule} !important;padding-right:${edgeRule} !important}`:\"\"].join(\"\");// The rail stylesheet is injected imperatively rather than rendered as a\n// <style> element in the component tree. An in-tree <style> is not present\n// in Framer's server HTML at the same position, so hydration reported a\n// server/client mismatch (React #425, and #422 from the retry) on every load.\nuseEffect(()=>{if(isStatic)return;if(typeof document===\"undefined\")return;const sheet=document.createElement(\"style\");sheet.setAttribute(\"data-dhe-rail-arrows\",targetId||\"rail\");sheet.textContent=rules;document.head.appendChild(sheet);return()=>sheet.remove();},[isStatic,rules,targetId]);return /*#__PURE__*/_jsxs(\"div\",{ref:wrapRef,style:{display:\"flex\",justifyContent:align===\"end\"?\"flex-end\":align===\"center\"?\"center\":\"flex-start\",gap:10,position:\"relative\",width:\"100%\",...style},children:[/*#__PURE__*/_jsx(\"button\",{type:\"button\",\"aria-label\":\"Previous story\",style:buttonStyle,onClick:()=>scrollRail(-1),children:/*#__PURE__*/_jsx(\"svg\",{viewBox:\"0 0 24 24\",width:16,height:16,style:{display:\"block\"},children:/*#__PURE__*/_jsx(\"path\",{d:\"M15 5l-7 7 7 7\",fill:\"none\",stroke:iconColor,strokeWidth:2.2})})}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",\"aria-label\":\"Next story\",style:buttonStyle,onClick:()=>scrollRail(1),children:/*#__PURE__*/_jsx(\"svg\",{viewBox:\"0 0 24 24\",width:16,height:16,style:{display:\"block\"},children:/*#__PURE__*/_jsx(\"path\",{d:\"M9 5l7 7-7 7\",fill:\"none\",stroke:iconColor,strokeWidth:2.2})})})]});}addPropertyControls(DHE2026RailArrows,{targetId:{type:ControlType.String,title:\"Target ID\",defaultValue:\"rail\",description:\"Element ID of the scrolling layer\"},gap:{type:ControlType.Number,title:\"Card gap\",defaultValue:20,min:0,max:80,step:1},size:{type:ControlType.Number,title:\"Size\",defaultValue:46,min:30,max:72,step:1},background:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},borderColor:{type:ControlType.Color,title:\"Border\",defaultValue:\"rgba(16, 16, 16, 0.12)\"},iconColor:{type:ControlType.Color,title:\"Icon\",defaultValue:\"#101010\"},align:{type:ControlType.Enum,title:\"Align\",options:[\"start\",\"center\",\"end\"],optionTitles:[\"Left\",\"Center\",\"Right\"],defaultValue:\"end\",displaySegmentedControl:true},snap:{type:ControlType.Boolean,title:\"Snap + hide bar\",defaultValue:true},layoutRail:{type:ControlType.Boolean,title:\"Edge align\",defaultValue:false},contentMaxWidth:{type:ControlType.Number,title:\"Max width\",defaultValue:1200,min:600,max:1800,step:10,hidden:props=>!props.layoutRail},edgePadding:{type:ControlType.Number,title:\"Edge padding\",defaultValue:24,min:0,max:120,step:1,hidden:props=>!props.layoutRail}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"DHE2026RailArrows\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerIntrinsicWidth\":\"110\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicHeight\":\"46\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./DHE2026_RailArrows.map"],"mappings":"A,gNAAwN,SAASkB,GAAsB,CAAiE,OAAtDV,IAAS,QAAa,CAACA,EAAO,WAAkB,GAAaA,EAAO,WAAW,kCAAkC,CAAC,CAAC,OAAQ,CAAC,SAASW,EAAaC,EAAQ,CAAC,GAAGA,EAAQ,aAAaA,EAAQ,YAAY,EAAE,MAAO,GAAM,IAAMC,EAAUb,EAAO,iBAAiBY,CAAO,CAAC,CAAC,UAAU,OAAOC,IAAY,QAAQA,IAAY,QAAS,CAAmF,SAASC,EAASC,EAASC,EAAK,CAAC,GAAG,OAAO,SAAW,IAAY,OAAO,KAAK,GAAGD,EAAS,CAAC,IAAME,EAAK,SAAS,eAAeF,CAAQ,EAAE,GAAGE,EAAK,OAAOA,CAAK,CAAC,IAAIC,EAAMF,EAAKA,EAAK,cAAc,KAAK,IAAI,IAAIG,EAAM,EAAEA,EAAM,GAAGD,EAAMC,IAAQ,CAAC,IAAMC,EAAW,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