{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/nETIlKRguiVehWobGeB2/pZLD8GkVJhf9hFTqTfZH/CMSSlideshow_1.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,// @ts-ignore\ngetPropertyControls,// @ts-ignore\nuseQueryData,ControlType,RenderTarget}from\"framer\";import{cloneElement,Children}from\"react\";import{motion}from\"framer-motion\";import SlideShow from\"https://framer.com/m/SlideShow-07du.js\";console.log(\"Importing dependencies and defining constants\");const slideshowProps=getComponentProps(SlideShow);console.log(\"Retrieved slideshow properties:\",slideshowProps);export default function CMSSlideshow(props){var _props_collectionList;console.log(\"CMSSlideshow component initiated with props:\",props);const{startLayers,endLayers,...otherProps}=props;console.log(\"Destructured props:\",{startLayers,endLayers,otherProps});const isCanvas=RenderTarget.current()===RenderTarget.canvas;console.log(\"RenderTarget is canvas:\",isCanvas);const items=isCanvas?[]:getCollectionListItems((_props_collectionList=props.collectionList)===null||_props_collectionList===void 0?void 0:_props_collectionList[0]);console.log(\"Collection list items:\",items);let layers=[];if(startLayers){layers=layers.concat(startLayers);console.log(\"Added startLayers:\",layers);}if(!isCanvas){for(let i=0;i<items.length;i++){console.log(`Processing item ${i} for non-canvas mode`);const layer=/*#__PURE__*/cloneElement(items[i].props.children.props.children,{style:{width:\"100%\",height:\"100%\"}});console.log(\"Cloned element:\",layer);layers.push(/*#__PURE__*/_jsx(motion.div,{style:{width:\"100%\",height:\"100%\"},children:layer}));console.log(\"Added layer to layers array:\",layers);}if(props.randomize){layers=shuffleArray(layers);console.log(\"Shuffled layers due to randomize flag:\",layers);}}else{for(let i=0;i<props.itemAmount;i++){console.log(`Adding placeholder for item ${i} in canvas mode`);layers.push(/*#__PURE__*/_jsx(CanvasPlaceholder,{title:\"Run project to view slideshow content\",subtitle:\"Collection List content is not accessible to the slideshow component in the editor. Run your project or visit the live website to view the slideshow with CMS content.\"}));}}if(endLayers){layers=layers.concat(endLayers);console.log(\"Added endLayers to layers array:\",layers);}console.log(\"Final layers array before rendering SlideShow component:\",layers);return /*#__PURE__*/_jsx(SlideShow,{...otherProps,slots:layers});}CMSSlideshow.displayName=\"CMS Slideshow\";console.log(\"Display name set for CMSSlideshow component\");addPropertyControls(CMSSlideshow,{collectionList:{type:ControlType.ComponentInstance},startLayers:{type:ControlType.Array,control:{type:ControlType.ComponentInstance},title:\"Start\"},endLayers:{type:ControlType.Array,control:{type:ControlType.ComponentInstance},title:\"End\"},randomize:{type:ControlType.Boolean,defaultValue:false,description:\"Shuffle order of CMS items\"},...slideshowProps,arrowOptions:{...slideshowProps.arrowOptions,controls:{...slideshowProps.arrowOptions.controls,arrowPadding:{...slideshowProps.arrowOptions.controls.arrowPadding,max:Infinity,min:Infinity}}}});console.log(\"Added property controls to CMSSlideshow\");function getComponentProps(component){console.log(\"Fetching component properties for:\",component);const{slots,...otherProps}=getPropertyControls(component);console.log(\"Extracted properties:\",otherProps);return otherProps;}export function CanvasPlaceholder({title,subtitle}){console.log(\"Rendering CanvasPlaceholder with title and subtitle:\",{title,subtitle});return /*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",width:\"100%\",height:\"100%\",placeContent:\"center\",placeItems:\"center\",flexDirection:\"column\",backgroundColor:\"rgba(136, 85, 255, 0.1)\",borderRadius:6,border:\"1px dashed rgb(136, 85, 255)\",color:\"rgb(136, 85, 255)\",fontSize:12,padding:24},children:[/*#__PURE__*/_jsx(\"p\",{style:{margin:0,marginBottom:10,fontWeight:600,textAlign:\"center\"},children:title}),/*#__PURE__*/_jsx(\"p\",{style:{margin:0,opacity:.7,maxWidth:500,lineHeight:1.5,textAlign:\"center\"},children:subtitle})]});}function shuffleArray(array){console.log(\"Shuffling array:\",array);for(let i=array.length-1;i>0;i--){const j=Math.floor(Math.random()*(i+1));[array[i],array[j]]=[array[j],array[i]];}console.log(\"Shuffled array:\",array);return array;}export function getCollectionListItems(collectionList){var _collectionList_props,_collectionList_props_children_props,_collectionList_props_children,_collectionList_props1,_collectionList_props_children_props_children_props,_collectionList_props_children_props_children,_collectionList_props_children_props1,_collectionList_props_children1,_collectionList_props2;console.log(\"Fetching collection list items for:\",collectionList);var _collectionList_props_query,_ref;const query=(_ref=(_collectionList_props_query=collectionList===null||collectionList===void 0?void 0:(_collectionList_props=collectionList.props)===null||_collectionList_props===void 0?void 0:_collectionList_props.query)!==null&&_collectionList_props_query!==void 0?_collectionList_props_query:collectionList===null||collectionList===void 0?void 0:(_collectionList_props1=collectionList.props)===null||_collectionList_props1===void 0?void 0:(_collectionList_props_children=_collectionList_props1.children)===null||_collectionList_props_children===void 0?void 0:(_collectionList_props_children_props=_collectionList_props_children.props)===null||_collectionList_props_children_props===void 0?void 0:_collectionList_props_children_props.query)!==null&&_ref!==void 0?_ref:collectionList===null||collectionList===void 0?void 0:(_collectionList_props2=collectionList.props)===null||_collectionList_props2===void 0?void 0:(_collectionList_props_children1=_collectionList_props2.children)===null||_collectionList_props_children1===void 0?void 0:(_collectionList_props_children_props1=_collectionList_props_children1.props)===null||_collectionList_props_children_props1===void 0?void 0:(_collectionList_props_children_props_children=_collectionList_props_children_props1.children)===null||_collectionList_props_children_props_children===void 0?void 0:(_collectionList_props_children_props_children_props=_collectionList_props_children_props_children.props)===null||_collectionList_props_children_props_children_props===void 0?void 0:_collectionList_props_children_props_children_props.query;console.log(\"Resolved query:\",query);if(query){var _collectionList_props3,_clpc_props,_clpc_props_children_props,_clpc_props_children,_clpc_props1;let childrenFunction=null;const clpc=(_collectionList_props3=collectionList.props)===null||_collectionList_props3===void 0?void 0:_collectionList_props3.children;if(typeof clpc==\"function\"){childrenFunction=clpc;}else if(typeof(clpc===null||clpc===void 0?void 0:(_clpc_props=clpc.props)===null||_clpc_props===void 0?void 0:_clpc_props.children)==\"function\"){childrenFunction=clpc.props.children;}else if(typeof(clpc===null||clpc===void 0?void 0:(_clpc_props1=clpc.props)===null||_clpc_props1===void 0?void 0:(_clpc_props_children=_clpc_props1.children)===null||_clpc_props_children===void 0?void 0:(_clpc_props_children_props=_clpc_props_children.props)===null||_clpc_props_children_props===void 0?void 0:_clpc_props_children_props.children)==\"function\"){childrenFunction=clpc.props.children.props.children;}console.log(\"Resolved children function:\",childrenFunction);const data=useQueryData(query);console.log(\"Fetched query data:\",data);let children=[];if(childrenFunction){var _clChildren_props_children,_clChildren_props,_clChildren_props1;let clChildren=childrenFunction(data);if(Array.isArray(clChildren)){children=clChildren;}else if(Array.isArray(clChildren===null||clChildren===void 0?void 0:(_clChildren_props=clChildren.props)===null||_clChildren_props===void 0?void 0:(_clChildren_props_children=_clChildren_props.children)===null||_clChildren_props_children===void 0?void 0:_clChildren_props_children[0])){children=clChildren.props.children[0];}else if(Array.isArray(clChildren===null||clChildren===void 0?void 0:(_clChildren_props1=clChildren.props)===null||_clChildren_props1===void 0?void 0:_clChildren_props1.children)){children=clChildren.props.children;}}console.log(\"Final children array:\",children);if(children){return Children.toArray(children);}}console.log(\"Returning empty array as default collection items\");return[];}\nexport const __FramerMetadata__ = {\"exports\":{\"CanvasPlaceholder\":{\"type\":\"reactComponent\",\"name\":\"CanvasPlaceholder\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"reactComponent\",\"name\":\"CMSSlideshow\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"getCollectionListItems\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CMSSlideshow_1.map"],
  "mappings": "sNAE4L,QAAQ,IAAI,+CAA+C,EAAE,IAAMA,EAAeC,EAAkBC,CAAS,EAAE,QAAQ,IAAI,kCAAkCF,CAAc,EAAiB,SAARG,EAA8BC,EAAM,CAAC,IAAIC,EAAsB,QAAQ,IAAI,+CAA+CD,CAAK,EAAE,GAAK,CAAC,YAAAE,EAAY,UAAAC,EAAU,GAAGC,CAAU,EAAEJ,EAAM,QAAQ,IAAI,sBAAsB,C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eAAQ,IAAI,mDAAmD,EAAQ,CAAC,CAAE",
  "names": ["slideshowProps", "getComponentProps", "Slideshow", "CMSSlideshow", "props", "_props_collectionList", "startLayers", "endLayers", "otherProps", "isCanvas", "RenderTarget", "items", "getCollectionListItems", "layers", "i", "p", "CanvasPlaceholder", "layer", "q", "motion", "shuffleArray", "addPropertyControls", "ControlType", "component", "slots", "getPropertyControls", "title", "subtitle", "u", "array", "j", "collectionList", "_collectionList_props", "_collectionList_props_children_props", "_collectionList_props_children", "_collectionList_props1", "_collectionList_props_children_props_children_props", "_collectionList_props_children_props_children", "_collectionList_props_children_props1", "_collectionList_props_children1", "_collectionList_props2", "_collectionList_props_query", "_ref", "query", "_collectionList_props3", "_clpc_props", "_clpc_props_children_props", "_clpc_props_children", "_clpc_props1", "childrenFunction", "clpc", "data", "useQueryData", "children", "_clChildren_props_children", "_clChildren_props", "_clChildren_props1", "clChildren"]
}
