{"version":3,"file":"CardStack.CHzjL47q.mjs","names":["React.useState"],"sources":["https:/framerusercontent.com/modules/rRIzhc0dDCRMrqfmrN8Q/L4CAdIEQoaZbcG8T8e0X/jQp754UPC.js","https:/framerusercontent.com/modules/rsGTBRzpYExt2dRreAPY/JhJQqoUfJ4r0ULGyYWzQ/CardStack.js"],"sourcesContent":["// Generated by Framer (6ca5d98)\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,cx,motion,withCSS}from\"framer\";import*as React from\"react\";import{forwardRef}from\"react\";const mask='url(\\'data:image/svg+xml,<svg display=\"block\" role=\"presentation\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 8.25 11 C 8.25 11.69 7.69 12.25 7 12.25 C 6.31 12.25 5.75 11.69 5.75 11 C 5.75 10.31 6.31 9.75 7 9.75 C 7.69 9.75 8.25 10.31 8.25 11 Z M 13 9.75 C 12.31 9.75 11.75 10.31 11.75 11 C 11.75 11.69 12.31 12.25 13 12.25 C 13.69 12.25 14.25 11.69 14.25 11 C 14.25 10.31 13.69 9.75 13 9.75 Z M 20 10 C 20 15.52 15.52 20 10 20 C 4.48 20 0 15.52 0 10 C 0 4.48 4.48 0 10 0 C 15.52 0 20 4.48 20 10 Z M 8.66 2.12 C 10.06 4.44 12.6 6 15.5 6 C 15.96 6 16.41 5.95 16.84 5.88 C 15.44 3.56 12.9 2 10 2 C 9.54 2 9.09 2.05 8.66 2.12 Z M 2.42 7.47 C 4.13 6.5 5.45 4.92 6.08 3.03 C 4.37 4 3.05 5.58 2.42 7.47 Z M 18 10 C 18 9.22 17.88 8.47 17.67 7.76 C 16.97 7.91 16.25 8 15.5 8 C 12.37 8 9.58 6.56 7.74 4.31 C 6.69 6.87 4.6 8.88 2 9.86 C 2.01 9.9 2 9.95 2 10 C 2 14.41 5.59 18 10 18 C 14.41 18 18 14.41 18 10 Z\" fill=\"var(--esondr, rgb(0,0,0))\" height=\"20px\" id=\"Ig7omM21I\" transform=\"translate(2 2)\" width=\"20px\"/></svg>\\') alpha no-repeat center / auto var(--framer-icon-mask-mode, add), var(--framer-icon-mask, none)';const SVG=/*#__PURE__*/forwardRef((props,ref)=>{const{animated,layoutId,children,...rest}=props;return animated?/*#__PURE__*/_jsx(motion.div,{...rest,layoutId:layoutId,ref:ref}):/*#__PURE__*/_jsx(\"div\",{...rest,ref:ref});});const getProps=({fill,height,id,width,...props})=>{return{...props,K5AAorpEW:fill??props.K5AAorpEW??\"rgb(0, 0, 0)\"};};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const{style,className,layoutId,variant,K5AAorpEW,...restProps}=getProps(props);return /*#__PURE__*/_jsx(SVG,{...restProps,className:cx(\"framer-jWOTC\",className),layoutId:layoutId,ref:ref,style:{\"--esondr\":K5AAorpEW,...style}});});const css=[`.framer-jWOTC { -webkit-mask: ${mask}; aspect-ratio: 1; background-color: var(--esondr); 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 {\"K5AAorpEW\":\"fill\"}\n * @framerImmutableVariables true\n * @framerVector {\"name\":\"Face\",\"color\":{\"type\":\"variable\",\"value\":\"esondr\"},\"set\":{\"localId\":\"vectorSet/DnLsXE00W\",\"id\":\"DnLsXE00W\",\"moduleId\":\"JIScivAkNLgXrcOUxHXD\"}}\n * @framerDisableUnlink true\n */const Icon=withCSS(Component,css,\"framer-jWOTC\");Icon.displayName=\"Face\";export default Icon;addPropertyControls(Icon,{K5AAorpEW:{defaultValue:\"rgb(0, 0, 0)\",hidden:false,title:\"Fill\",type:ControlType.Color}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Icon\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"24\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerImmutableVariables\":\"true\",\"framerVariables\":\"{\\\"K5AAorpEW\\\":\\\"fill\\\"}\",\"framerIntrinsicHeight\":\"24\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerVector\":\"{\\\"name\\\":\\\"Face\\\",\\\"color\\\":{\\\"type\\\":\\\"variable\\\",\\\"value\\\":\\\"esondr\\\"},\\\"set\\\":{\\\"localId\\\":\\\"vectorSet/DnLsXE00W\\\",\\\"id\\\":\\\"DnLsXE00W\\\",\\\"moduleId\\\":\\\"JIScivAkNLgXrcOUxHXD\\\"}}\",\"framerDisableUnlink\":\"true\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","// CardStack component for Framer with image upload and reordering\nimport{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{motion}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";/**\n * CardStack\n *\n * A stack of cards with images that can be uploaded and rearranged in Framer Studio.\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n * @framerIntrinsicWidth 352\n * @framerIntrinsicHeight 198\n */let idCounter=0;const genId=()=>`card_${Date.now().toString(36)}_${idCounter++}`;function toObjList(arr){return(arr.length?arr:[placeholderImage]).map(img=>{if(typeof img===\"string\")return{id:genId(),src:img,alt:\"\"};if(img&&typeof img===\"object\"&&img.src)return{id:genId(),...img};return{id:genId(),src:placeholderImage.src,alt:placeholderImage.alt};});}const placeholderImage={src:\"data:image/svg+xml;utf8,\"+encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 90'><rect fill='#ddd' width='160' height='90'/><path d='M0 0L160 90M160 0L0 90' stroke='#aaa' stroke-width='4'/></svg>`),alt:\"Placeholder\"};export default function CardStack(props){const{images=[],offset=10,scaleStep=.06,dimStep=.15,stiff=170,damp=26,style={},...rest}=props;const[cards,setCards]=React.useState(toObjList(images));React.useEffect(()=>{const prev=cards.slice();const next=[];const srcList=images.length?images:[placeholderImage];srcList.forEach(img=>{const src=typeof img===\"string\"?img:img.src;const idx=prev.findIndex(c=>c.src===src);if(idx>-1){next.push(prev.splice(idx,1)[0]);}else{if(typeof img===\"object\"&&img.src)next.push({id:genId(),...img});else next.push({id:genId(),src,alt:\"\"});}});setCards(next);// eslint-disable-next-line\n},[JSON.stringify(images)]);const moveToEnd=i=>setCards(prev=>[...prev.slice(i+1),prev[i]]);const spring=stiff||damp?{type:\"spring\",stiffness:stiff,damping:damp}:undefined;const wrapperStyle={...style,position:\"relative\",width:style.width??250,aspectRatio:props.ratio??\"16 / 9\",overflow:\"visible\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",zIndex:0};delete wrapperStyle.height;return /*#__PURE__*/_jsx(\"div\",{...rest,style:wrapperStyle,children:/*#__PURE__*/_jsx(\"ul\",{style:{position:\"relative\",width:\"100%\",height:\"100%\",margin:0,padding:0},children:cards.map(({id,src,alt},i)=>{const front=i===0;const brightness=Math.max(.1,1-i*dimStep);const baseZ=cards.length-i;return /*#__PURE__*/_jsx(motion.li,{style:{position:\"absolute\",width:\"100%\",height:\"100%\",borderRadius:props.borderRadius??8,listStyle:\"none\",cursor:front?\"grab\":\"auto\",overflow:\"hidden\",touchAction:\"none\",zIndex:baseZ,transition:\"box-shadow 0.3s cubic-bezier(.4,0,.2,1)\"},animate:{top:`calc(${i*-offset}%)`,scale:1-i*scaleStep,filter:`brightness(${brightness})`,zIndex:baseZ,transition:spring},drag:front?\"y\":false,dragConstraints:{top:0,bottom:0},dragMomentum:false,onDragEnd:()=>moveToEnd(i),whileDrag:front?{zIndex:cards.length,cursor:\"grabbing\",scale:1-i*scaleStep+.05,rotate:2}:{},children:/*#__PURE__*/_jsx(\"img\",{src:src,alt:alt||\"Card image\",style:{width:\"100%\",height:\"100%\",objectFit:\"cover\",pointerEvents:\"none\",display:\"block\",transition:\"filter 0.3s cubic-bezier(.4,0,.2,1)\"}})},id);})})});}addPropertyControls(CardStack,{images:{title:\"Cards\",type:ControlType.Array,control:{type:ControlType.ResponsiveImage},maxCount:10,defaultValue:[{src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Gradient 1 - Blue\"},{src:\"https://framerusercontent.com/images/aNsAT3jCvt4zglbWCUoFe33Q.jpg\",alt:\"Gradient 2 - Purple\"}]},ratio:{title:\"Aspect Ratio\",type:ControlType.Enum,options:[\"16 / 9\",\"4 / 3\",\"1 / 1\",\"3 / 4\",\"9 / 16\"],optionTitles:[\"16:9\",\"4:3\",\"1:1\",\"3:4\",\"9:16\"],defaultValue:\"16 / 9\"},borderRadius:{title:\"Corner Radius\",type:ControlType.Number,defaultValue:8,min:0,max:64,step:1,displayStepper:true},offset:{title:\"Offset\",type:ControlType.Number,defaultValue:8,min:0,max:60,step:1,displayStepper:true,unit:\"%\",description:\"Vertical shift between cards\"},scaleStep:{title:\"Scale\",type:ControlType.Number,defaultValue:.06,min:0,max:.2,step:.005,displayStepper:true},dimStep:{title:\"Dim\",type:ControlType.Number,defaultValue:.15,min:0,max:1,step:.02,displayStepper:true},stiff:{title:\"Stiffness\",type:ControlType.Number,defaultValue:170,min:0,max:600,step:10,displayStepper:true},damp:{title:\"Damping\",type:ControlType.Number,defaultValue:26,min:0,max:60,step:2,displayStepper:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CardStack\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CardStack.map"],"mappings":"qZAC2C,IAAsE,IAA4B,CAAoC,EAAK,2mCAAmnC,EAAiB,GAAY,EAAM,IAAM,CAAC,GAAK,CAAC,WAAS,WAAS,WAAS,GAAG,GAAM,EAAM,OAAO,EAAsB,EAAK,EAAO,IAAI,CAAC,GAAG,EAAc,WAAa,MAAI,CAAC,CAAc,EAAK,MAAM,CAAC,GAAG,EAAS,MAAI,CAAC,EAAG,CAAO,GAAU,CAAC,OAA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