{"version":3,"file":"VideoTicker.D7Q5UORr.mjs","names":["useRef","useState"],"sources":["https:/framerusercontent.com/modules/IqME0fLwVvuHXw2ZPO3S/oZjYaKfpLwGmwJBJyuPQ/VideoTicker.js"],"sourcesContent":["// Horizontal video ticker with 5 vertical videos, always playing even in background, optimized for mobile\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useRef,useEffect,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";const defaultVideos=[\"https://framerusercontent.com/assets/MLWPbW1dUQawJLhhun3dBwpgJak.mp4\",\"https://framerusercontent.com/assets/MLWPbW1dUQawJLhhun3dBwpgJak.mp4\",\"https://framerusercontent.com/assets/MLWPbW1dUQawJLhhun3dBwpgJak.mp4\",\"https://framerusercontent.com/assets/MLWPbW1dUQawJLhhun3dBwpgJak.mp4\",\"https://framerusercontent.com/assets/MLWPbW1dUQawJLhhun3dBwpgJak.mp4\"];/**\n * Horizontal Video Ticker (5 vertical videos, always playing)\n *\n * @framerIntrinsicWidth 400\n * @framerIntrinsicHeight 700\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function VideoTicker(props){const{videos=defaultVideos,videoWidth,videoHeight,gap,borderRadius,shadow,style,padding}=props;// Always play videos, even in background (no pause on blur)\n// On mobile, ensure autoplay, muted, loop, playsInline\n// Horizontal scroll\nconst containerRef=useRef(null);const[isDragging,setIsDragging]=useState(false);const[startX,setStartX]=useState(0);const[scrollLeft,setScrollLeft]=useState(0);// Always play videos, never pause\nuseEffect(()=>{if(typeof window===\"undefined\")return;const videosEls=containerRef.current?.querySelectorAll(\"video\")||[];videosEls.forEach(v=>{v.play().catch(()=>{});});});return /*#__PURE__*/_jsxs(\"div\",{ref:containerRef,style:{...style,width:\"100%\",height:\"100%\",overflow:\"hidden\",overscrollBehavior:\"none\",touchAction:\"none\",WebkitOverflowScrolling:undefined,userSelect:\"none\",msTouchAction:\"none\",scrollbarWidth:\"none\",\"-webkit-overflow-scrolling\":\"auto\",\"-webkit-user-drag\":\"none\",\"-webkit-user-select\":\"none\",\"-webkit-touch-callout\":\"none\",\"-webkit-tap-highlight-color\":\"transparent\",pointerEvents:\"none\",position:\"relative\",padding:padding,// Prevent all scrolling and movement\noverflowX:\"hidden\",overflowY:\"hidden\",overscrollBehaviorX:\"none\",overscrollBehaviorY:\"none\"},tabIndex:-1,\"aria-label\":\"Video Ticker\",children:[/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",background:props.backgroundColor,opacity:props.backgroundOpacity,pointerEvents:\"none\",zIndex:0},\"aria-hidden\":\"true\"}),/*#__PURE__*/_jsx(\"div\",{style:{pointerEvents:\"none\",position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",zIndex:2,background:`linear-gradient(90deg,\n            rgba(255,255,255,${props.clipOpacity}) ${props.clipStart}%,\n            rgba(255,255,255,0) calc(${props.clipStart}% + 32px),\n            rgba(255,255,255,0) calc(${props.clipEnd}% - 32px),\n            rgba(255,255,255,${props.clipOpacity}) ${props.clipEnd}%\n          )`,maskImage:`linear-gradient(to bottom, transparent 0px, white 32px, white calc(100% - 32px), transparent 100%)`,WebkitMaskImage:`linear-gradient(to bottom, transparent 0px, white 32px, white calc(100% - 32px), transparent 100%)`,transition:\"background 0.2s\"},\"aria-hidden\":\"true\"}),/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",flexDirection:\"row\",gap,width:`calc(2 * (${videoWidth+gap} * ${videos.length}))`,height:\"100%\",position:\"absolute\",left:0,top:0,willChange:\"transform\",animation:`ticker-move ${props.speed}s linear infinite`,zIndex:1,alignItems:\"center\",justifyContent:\"center\"},children:[...videos,...videos].map((src,i)=>/*#__PURE__*/_jsx(\"div\",{style:{minWidth:videoWidth,width:videoWidth,height:videoHeight,borderRadius,overflow:\"hidden\",boxShadow:shadow?`${props.shadowX}px ${props.shadowY}px ${props.shadowBlur}px ${props.shadowSpread}px ${props.shadowColor}`:undefined,background:\"transparent\",flex:\"0 0 auto\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},children:/*#__PURE__*/_jsx(\"video\",{src:src,width:videoWidth,height:videoHeight,style:{width:\"100%\",height:\"100%\",objectFit:\"cover\",boxShadow:\"0 8px 32px 0 rgba(0,0,0,0.18), 0 2px 8px 0 rgba(0,0,0,0.10)\",borderRadius:borderRadius},autoPlay:true,muted:true,loop:true,playsInline:true,controls:false,preload:\"auto\",\"aria-label\":`Video ${i%videos.length+1}`})},i))}),/*#__PURE__*/_jsx(\"style\",{children:`\n        @keyframes ticker-move {\n          0% { transform: translateX(0); }\n          100% { transform: translateX(-50%); }\n        }\n      `})]});}addPropertyControls(VideoTicker,{backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#00000000\"},backgroundOpacity:{type:ControlType.Number,title:\"Bg Opacity\",defaultValue:1,min:0,max:1,step:.01,unit:\"\"},speed:{type:ControlType.Number,title:\"Speed (s)\",defaultValue:20,min:5,max:60,step:1,unit:\"s\"},videos:{type:ControlType.Array,title:\"Videos\",control:{type:ControlType.File,allowedFileTypes:[\"mp4\",\"webm\",\"mov\"]},maxCount:5,defaultValue:defaultVideos},videoWidth:{type:ControlType.Number,title:\"Video Width\",defaultValue:240,min:120,max:400,unit:\"px\"},videoHeight:{type:ControlType.Number,title:\"Video Height\",defaultValue:420,min:200,max:800,unit:\"px\"},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:16,min:0,max:64,unit:\"px\"},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:16,min:0,max:64,unit:\"px\"},shadow:{type:ControlType.Boolean,title:\"Shadow\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"},shadowColor:{type:ControlType.Color,title:\"Shadow Color\",defaultValue:\"rgba(0,0,0,0.18)\",hidden:({shadow})=>!shadow},shadowX:{type:ControlType.Number,title:\"Shadow X\",defaultValue:0,min:-32,max:32,step:1,unit:\"px\",hidden:({shadow})=>!shadow},shadowY:{type:ControlType.Number,title:\"Shadow Y\",defaultValue:8,min:-32,max:32,step:1,unit:\"px\",hidden:({shadow})=>!shadow},shadowBlur:{type:ControlType.Number,title:\"Shadow Blur\",defaultValue:32,min:0,max:64,step:1,unit:\"px\",hidden:({shadow})=>!shadow},shadowSpread:{type:ControlType.Number,title:\"Shadow Spread\",defaultValue:0,min:-16,max:16,step:1,unit:\"px\",hidden:({shadow})=>!shadow},clipStart:{type:ControlType.Number,title:\"Clip Start %\",defaultValue:0,min:0,max:40,step:1,unit:\"%\"},clipEnd:{type:ControlType.Number,title:\"Clip End %\",defaultValue:100,min:60,max:100,step:1,unit:\"%\"},clipOpacity:{type:ControlType.Number,title:\"Clip Opacity\",defaultValue:.9,min:0,max:1,step:.01},padding:{type:ControlType.Padding,title:\"Padding\",defaultValue:\"0px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"VideoTicker\",\"slots\":[],\"annotations\":{\"framerIntrinsicHeight\":\"700\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerIntrinsicWidth\":\"400\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./VideoTicker.map"],"mappings":"iUASG,SAAwB,EAAY,EAAM,CAAC,GAAK,CAAC,SAAO,EAAc,aAAW,cAAY,MAAI,eAAa,SAAO,QAAM,UAAQ,CAAC,EAGjI,EAAaA,EAAO,MAAW,CAAC,EAAW,EAAc,CAACC,EAAS,IAAY,CAAC,EAAO,EAAU,CAACA,EAAS,GAAQ,CAAC,EAAW,EAAc,CAACA,EAAS,GACe,OAA5K,MAAc,CAAC,GAAU,IAAS,OAAY,OAAO,IAAM,EAAU,EAAa,SAAS,iBAAiB,UAAU,EAAE,CAAC,EAAU,QAAQ,GAAG,CAAC,EAAE,OAAO,UAAU,CAAE,EAAG,EAAG,GAAsB,EAAM,M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