{"version":3,"file":"DragSlider.BFmxOS6A.mjs","names":["React.forwardRef","__esmMin","init_npm_react_18_3_1","window","init_jsx_runtime","J","c","ce","init_ssg_sandbox_shims","motion","cx","useSVGTemplate","withCSS","addPropertyControls","ControlType","init_framer_BL70qLPA","mask","Base","MotionSVG","SVG","svg","getProps","Icon","init_bDZjksbCJ","props","rest","animated","color","width1","alpha","restProps","href","className","qxTvv_EBh","ezTt3ayMo","lschgej4H","style","injectStyles","STYLE_ID","s","sliders","el","cardOffsets","kids","first","k","maxScroll","snap","x","best","left","step","offs","card","perPage","i","o","next","dir","updateButtons","atStart","atEnd","b","withDragSlider","onStep","EVENT","onPointerDown","startX","startLeft","moved","move","dx","ev","up","block","Component","SliderButton","t","withSliderPrev","withSliderNext","init_DragSlider"],"sources":["https:/framerusercontent.com/modules/q6AdYuVdn7nqnxRYPtBb/OYrLlDFAClRhsX9vzOMl/bDZjksbCJ.js","https:/framerusercontent.com/modules/jA2TFLZjJnIVGACD3CWe/ITAvbV39UCYahyUmEBoK/DragSlider.js"],"sourcesContent":["// Generated by Framer (6ca5d98)\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,cx,motion,useSVGTemplate,withCSS}from\"framer\";import*as React from\"react\";import{forwardRef}from\"react\";const mask=\"var(--framer-icon-mask)\";const Base=/*#__PURE__*/forwardRef(function(props,ref){return /*#__PURE__*/_jsx(\"svg\",{...props,ref:ref,children:props.children});});const MotionSVG=motion.create(Base);const SVG=/*#__PURE__*/forwardRef((props,ref)=>{const{animated,layoutId,children,...rest}=props;return animated?/*#__PURE__*/_jsx(MotionSVG,{...rest,layoutId:layoutId,ref:ref,children:children}):/*#__PURE__*/_jsx(\"svg\",{...rest,ref:ref,children:children});});const svg='<svg display=\"block\" role=\"presentation\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 0 0 L 16.5 0 C 17.328 0 18 0.672 18 1.5 L 18 15 L 18 15 L 0 15 L 0 15 L 0 0 Z\" fill-opacity=\"var(--1m6trwb, 0)\" fill=\"var(--21h8s6, rgb(0, 0, 0))\" height=\"15px\" id=\"p1fpTQK7F\" transform=\"translate(3 4.5)\" width=\"18px\"/><path d=\"M 18 15 L 0 15 L 0 0\" fill=\"transparent\" height=\"15px\" id=\"LOKQVnF_E\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"var(--pgex8v, 1.5)\" stroke=\"var(--21h8s6, rgb(0, 0, 0))\" transform=\"translate(3 4.5)\" width=\"18px\"/><path d=\"M 15.75 0 L 9 6.75 L 6 3.75 L 0 9.75\" fill=\"transparent\" height=\"9.75px\" id=\"YJGYU62So\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"var(--pgex8v, 1.5)\" stroke=\"var(--21h8s6, rgb(0, 0, 0))\" transform=\"translate(3 6.75)\" width=\"15.75px\"/><path d=\"M 3.75 3.75 L 3.75 0 L 0 0\" fill=\"transparent\" height=\"3.75px\" id=\"LN0V1ajm1\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"var(--pgex8v, 1.5)\" stroke=\"var(--21h8s6, rgb(0, 0, 0))\" transform=\"translate(15 6.75)\" width=\"3.75px\"/></svg>';const getProps=({alpha,color,height,id,width,width1,...props})=>{return{...props,ezTt3ayMo:color??props.ezTt3ayMo??\"rgb(0, 0, 0)\",lschgej4H:width1??props.lschgej4H??1.5,qxTvv_EBh:alpha??props.qxTvv_EBh};};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const{style,className,layoutId,variant,ezTt3ayMo,lschgej4H,qxTvv_EBh,...restProps}=getProps(props);const href=useSVGTemplate(\"987190984\",svg);return /*#__PURE__*/_jsx(SVG,{...restProps,className:cx(\"framer-DkID7\",className),layoutId:layoutId,ref:ref,role:\"presentation\",style:{\"--1m6trwb\":qxTvv_EBh,\"--21h8s6\":ezTt3ayMo,\"--pgex8v\":lschgej4H,...style},viewBox:\"0 0 24 24\",children:/*#__PURE__*/_jsx(\"use\",{href:href})});});const css=[`.framer-DkID7 { -webkit-mask: ${mask}; aspect-ratio: 1; display: block; mask: ${mask}; width: 24px; }`];/**\n * This is a generated Framer component.\n * @framerIntrinsicWidth 24\n * @framerIntrinsicHeight 24\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerVariables {\"ezTt3ayMo\":\"color\",\"lschgej4H\":\"width1\",\"qxTvv_EBh\":\"alpha\"}\n * @framerImmutableVariables true\n * @framerVector {\"name\":\"Chart Line Up\",\"color\":{\"type\":\"variable\",\"value\":\"21h8s6\"},\"set\":{\"localId\":\"vectorSet/NGVKdicsm\",\"id\":\"NGVKdicsm\",\"moduleId\":\"omX0gWFPqDwhaiWwf6ab\"}}\n * @framerDisableUnlink true\n */const Icon=withCSS(Component,css,\"framer-DkID7\");Icon.displayName=\"Chart Line Up\";export default Icon;addPropertyControls(Icon,{ezTt3ayMo:{defaultValue:\"rgb(0, 0, 0)\",hidden:false,title:\"Color\",type:ControlType.Color},lschgej4H:{defaultValue:1.5,displayStepper:true,hidden:false,max:6,min:0,step:.5,title:\"Width\",type:ControlType.Number},qxTvv_EBh:{defaultValue:0,displayStepper:true,hidden:false,max:1,min:0,step:.1,title:\"Alpha\",type:ControlType.Number}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Icon\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerVector\":\"{\\\"name\\\":\\\"Chart Line Up\\\",\\\"color\\\":{\\\"type\\\":\\\"variable\\\",\\\"value\\\":\\\"21h8s6\\\"},\\\"set\\\":{\\\"localId\\\":\\\"vectorSet/NGVKdicsm\\\",\\\"id\\\":\\\"NGVKdicsm\\\",\\\"moduleId\\\":\\\"omX0gWFPqDwhaiWwf6ab\\\"}}\",\"framerIntrinsicHeight\":\"24\",\"framerVariables\":\"{\\\"ezTt3ayMo\\\":\\\"color\\\",\\\"lschgej4H\\\":\\\"width1\\\",\\\"qxTvv_EBh\\\":\\\"alpha\\\"}\",\"framerDisableUnlink\":\"true\",\"framerImmutableVariables\":\"true\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"24\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";// Drag slider for horizontally overflowing rows, plus prev/next arrow\n// buttons. Mouse drag scrolls and snaps to the nearest card; touch keeps\n// native swiping. Arrows scroll a page of cards (up to three) and dim at either end.\nconst STYLE_ID=\"drag-slider-style\";const EVENT=\"drag-slider:step\";function injectStyles(){if(document.getElementById(STYLE_ID))return;const s=document.createElement(\"style\");s.id=STYLE_ID;s.textContent=[\"[data-drag-slider]::-webkit-scrollbar{display:none}\",\"[data-slider-btn]{transition:background-color .15s ease,opacity .2s ease}\",\"[data-slider-btn]:hover{background-color:var(--token-ac705832-092f-475e-a252-93784ea8573d, #f5f5f5)}\",\"[data-slider-btn][data-disabled]{opacity:.35;pointer-events:none}\"].join(\"\");document.head.appendChild(s);}function sliders(){return Array.from(document.querySelectorAll(\"[data-drag-slider]\")).filter(el=>el.offsetParent!==null);}function cardOffsets(el){const kids=Array.from(el.children);const first=kids[0]?.offsetLeft??0;return kids.map(k=>k.offsetLeft-first);}function maxScroll(el){return el.scrollWidth-el.clientWidth;}function snap(el){const x=el.scrollLeft;let best=0;for(const left of cardOffsets(el))if(Math.abs(left-x)<Math.abs(best-x))best=left;el.scrollTo({left:Math.min(best,maxScroll(el)),behavior:\"smooth\"});}function step(el,dir){const offs=cardOffsets(el);const x=el.scrollLeft;const card=offs.length>1?offs[1]-offs[0]:el.clientWidth;const perPage=Math.max(1,Math.min(3,Math.floor((el.clientWidth+2)/card)));let i=offs.findIndex(o=>o>=x-2);if(i<0)i=offs.length-1;const next=Math.max(0,Math.min(offs.length-1,i+dir*perPage));el.scrollTo({left:Math.max(0,Math.min(offs[next],maxScroll(el))),behavior:\"smooth\"});}function updateButtons(){const el=sliders()[0];if(!el)return;const atStart=el.scrollLeft<=2;const atEnd=el.scrollLeft>=maxScroll(el)-2;document.querySelectorAll(\"[data-slider-btn]\").forEach(b=>{const dir=b.dataset.sliderBtn;const off=dir===\"prev\"?atStart:atEnd;if(off)b.setAttribute(\"data-disabled\",\"\");else b.removeAttribute(\"data-disabled\");});}export function withDragSlider(Component){return props=>{useEffect(()=>{injectStyles();const onStep=e=>sliders().forEach(el=>step(el,e.detail));window.addEventListener(EVENT,onStep);const t=setTimeout(updateButtons,300);window.addEventListener(\"resize\",updateButtons);return()=>{window.removeEventListener(EVENT,onStep);window.removeEventListener(\"resize\",updateButtons);clearTimeout(t);};},[]);const onPointerDown=e=>{if(e.pointerType!==\"mouse\"||e.button!==0)return;const el=e.currentTarget;const startX=e.clientX;const startLeft=el.scrollLeft;let moved=false;el.style.cursor=\"grabbing\";el.style.userSelect=\"none\";const move=ev=>{const dx=ev.clientX-startX;if(Math.abs(dx)>3)moved=true;el.scrollLeft=startLeft-dx;};const up=()=>{window.removeEventListener(\"pointermove\",move);window.removeEventListener(\"pointerup\",up);el.style.cursor=\"grab\";el.style.userSelect=\"\";if(moved){snap(el);const block=ev=>{ev.preventDefault();ev.stopPropagation();};el.addEventListener(\"click\",block,{capture:true,once:true});setTimeout(()=>el.removeEventListener(\"click\",block,{capture:true}),0);}};window.addEventListener(\"pointermove\",move);window.addEventListener(\"pointerup\",up);};return /*#__PURE__*/_jsx(Component,{...props,\"data-drag-slider\":\"\",onPointerDown:onPointerDown,onScroll:updateButtons,onDragStart:e=>e.preventDefault(),style:{...props.style,cursor:\"grab\",scrollbarWidth:\"none\",overscrollBehaviorX:\"contain\"}});};}function SliderButton({Component,dir,props}){useEffect(()=>{injectStyles();const t=setTimeout(updateButtons,300);return()=>clearTimeout(t);},[]);return /*#__PURE__*/_jsx(Component,{...props,\"data-slider-btn\":dir,role:\"button\",\"aria-label\":dir===\"prev\"?\"Previous\":\"Next\",onClick:()=>window.dispatchEvent(new CustomEvent(EVENT,{detail:dir===\"prev\"?-1:1})),style:{...props.style,cursor:\"pointer\"}});}export function withSliderPrev(Component){return props=>/*#__PURE__*/_jsx(SliderButton,{Component:Component,dir:\"prev\",props:props});}export function withSliderNext(Component){return props=>/*#__PURE__*/_jsx(SliderButton,{Component:Component,dir:\"next\",props:props});}\nexport const __FramerMetadata__ = {\"exports\":{\"withSliderPrev\":{\"type\":\"reactHoc\",\"name\":\"withSliderPrev\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withDragSlider\":{\"type\":\"reactHoc\",\"name\":\"withDragSlider\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSliderNext\":{\"type\":\"reactHoc\",\"name\":\"withSliderNext\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./DragSlider.map"],"mappings":"A,4TACgM,EAAK,0BAAgC,EAAkB,gBAAW,SAAS,EAAM,EAAI,CAAC,MAAoB,gBAAK,MAAM,CAAC,GAAGwB,EAAU,MAAI,SAASA,EAAM,QAAQ,CAAC,CAAE,CAAC,EAAQ,EAAUf,EAAO,OAAOQ,CAAI,EAAQ,EAAiB,iBAAY,EAAM,IAAM,CAAC,GAAK,CAAC,WAAS,WAAS,WAAS,GAAGQ,GAAMD,EAAM,OAAOE,EAAsB,gBAAKR,EAAU,CAAC,GAAGO,EAAc,WAAa,MAAa,UAAQ,CAAC,EAAe,gBAAK,MAAM,CAAC,GAAGA,EAAS,MAAa,UAAQ,CAAC,CAAE,CAAC,EAAQ,EAAI,6nCAAmoC,GAAU,CAAC,QAAM,QAAM,SAAO,KAAG,QAAM,SAAO,GAAGD,MAAgB,CAAC,GAAGA,EAAM,UAAUG,GAAOH,EAAM,WAAW,eAAe,UAAUI,GAAQJ,EAAM,WAAW,IAAI,UAAUK,GAAOL,EAAM,SAA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