{"version":3,"file":"RitzVideo.BNcSlwHb.mjs","names":["useRef","__esmMin","init_npm_react_18_3_1","c","init_jsx_runtime","ce","de","init_framer_CKT6jEEQ","addPropertyControls","useIsStaticRenderer","ControlType","RitzVideo","props","isStatic","ref","v","io","e","videoURL","radius","posterURL","fit","position","init_RitzVideo"],"sources":["https:/framerusercontent.com/modules/z1s0ZkfJlSogQ4eXMuC9/w7ytMvATxHtTbAmyRX6d/RitzVideo.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{useEffect,useRef}from\"react\";/**\n * Ritz Video\n *\n * Kartı dolduran, sessiz ve döngüde oynayan video. Ekran dışındayken durur.\n *\n * @framerIntrinsicWidth 270\n * @framerIntrinsicHeight 480\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function RitzVideo(props){const{videoURL=\"https://framerusercontent.com/assets/fDnoATZ2A7uL2qJLUgHTqV9BgsY.webm\",posterURL=\"\",radius=0,fit=\"cover\",position=\"Orta\"}=props;const isStatic=useIsStaticRenderer();const ref=useRef(null);// Video ekrana yaklaşınca yüklenir ve oynar, uzaklaşınca durur; sayfa açılışını yavaşlatmaz.\nuseEffect(()=>{const v=ref.current;if(!v||isStatic||typeof IntersectionObserver===\"undefined\")return;const io=new IntersectionObserver(([e])=>{if(e.isIntersecting){if(v.preload!==\"auto\")v.preload=\"auto\";v.play().catch(()=>{});}else v.pause();},{rootMargin:\"200px 0px\",threshold:.01});io.observe(v);return()=>io.disconnect();},[videoURL,isStatic]);return /*#__PURE__*/_jsx(\"div\",{style:{...props.style,position:\"relative\",width:\"100%\",height:\"100%\",overflow:\"hidden\",borderRadius:radius,background:\"#0b0b0b\"},children:/*#__PURE__*/_jsx(\"video\",{ref:ref,src:isStatic?`${videoURL}#t=1.5`:videoURL,poster:posterURL||undefined,muted:true,loop:true,playsInline:true,\"aria-hidden\":\"true\",preload:isStatic?\"metadata\":\"none\",style:{position:\"absolute\",inset:0,width:\"100%\",height:\"100%\",objectFit:fit,objectPosition:position===\"\\xdcst\"?\"top center\":\"center\",display:\"block\"}})});}addPropertyControls(RitzVideo,{videoURL:{type:ControlType.String,title:\"Video URL\",defaultValue:\"https://framerusercontent.com/assets/fDnoATZ2A7uL2qJLUgHTqV9BgsY.webm\"},posterURL:{type:ControlType.String,title:\"Poster URL\",defaultValue:\"\"},radius:{type:ControlType.Number,title:\"K\\xf6şe\",defaultValue:0,min:0,max:60},fit:{type:ControlType.Enum,title:\"Sığdırma\",options:[\"cover\",\"contain\"],optionTitles:[\"Doldur\",\"Sığdır\"],defaultValue:\"cover\",displaySegmentedControl:true},position:{type:ControlType.Enum,title:\"Odak\",options:[\"Orta\",\"\\xdcst\"],defaultValue:\"Orta\",displaySegmentedControl:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"RitzVideo\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"480\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerIntrinsicWidth\":\"270\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./RitzVideo.map"],"mappings":"A,yLAUG,SAAwBW,EAAU,EAAM,CAAC,GAAK,CAAC,WAAS,wEAAwE,YAAU,GAAG,SAAO,EAAE,MAAI,QAAQ,WAAS,QAAQC,EAAYC,EAASJ,EAAoB,EAAQK,EAAId,EAAO,IAAI,EACqG,OAA3VK,MAAc,CAAC,IAAMU,EAAED,EAAI,QAAQ,GAAG,CAACC,GAAGF,GAAU,OAAO,qBAAuB,IAAY,OAAO,IAAMG,EAAG,IAAI,sBAAsB,CAACC,KAAK,CAAIA,EAAE,gBAAmBF,EAAE,UAAU,SAAO,EAAE,QAAQ,QAAOA,EAAE,KAAK,CAAC,CAAC,UAAU,CAAC,CAAC,GAAQA,EAAE,MAAM,CAAE,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