{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/MvMI8rlAwWI6W41vb7x5/sTVXIzLDIm9OW42tnlkm/CMSSlideshow.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\";const slideshowProps=getComponentProps(SlideShow);/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n * @framerIntrinsicWidth 400\n * @framerIntrinsicHeight 200\n */export default function CMSSlideshow(props){var _props_collectionList;const{startLayers,endLayers,...otherProps}=props;const isCanvas=RenderTarget.current()===RenderTarget.canvas;const items=isCanvas?[]:getCollectionListItems((_props_collectionList=props.collectionList)===null||_props_collectionList===void 0?void 0:_props_collectionList[0]);let layers=[];if(startLayers){layers=layers.concat(startLayers);}if(!isCanvas){for(let i=0;i<items.length;i++){const layer=/*#__PURE__*/cloneElement(items[i].props.children.props.children,{style:{width:\"100%\",height:\"100%\"}});layers.push(/*#__PURE__*/_jsx(motion.div,{style:{width:\"100%\",height:\"100%\"},children:layer}));}if(props.randomize){layers=shuffleArray(layers);}}else{for(let i=0;i<props.itemAmount;i++){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 orvisit the live website to view the slideshow with CMS content.\"}));}}if(endLayers){layers=layers.concat(endLayers);}return /*#__PURE__*/_jsx(SlideShow,{...otherProps,slots:layers});}CMSSlideshow.displayName=\"CMS Slideshow\";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}}}});function getComponentProps(component){const{slots,...otherProps}=getPropertyControls(component);return otherProps;}export function CanvasPlaceholder({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){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]];}return array;}export function getCollectionListItems(collectionList){var _collectionList_props,_collectionList_props_children_props,_collectionList_props_children,_collectionList_props1;var _collectionList_props_query;const query=(_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;if(query){var _collectionList_props2,_clpc_props;let childrenFunction=null;const clpc=(_collectionList_props2=collectionList.props)===null||_collectionList_props2===void 0?void 0:_collectionList_props2.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\"){var _clpc_props1;childrenFunction=clpc===null||clpc===void 0?void 0:(_clpc_props1=clpc.props)===null||_clpc_props1===void 0?void 0:_clpc_props1.children;}const data=useQueryData(query);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;}}if(children){return Children.toArray(children);}}return[];}\nexport const __FramerMetadata__ = {\"exports\":{\"CanvasPlaceholder\":{\"type\":\"reactComponent\",\"name\":\"CanvasPlaceholder\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"getCollectionListItems\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"reactComponent\",\"name\":\"CMSSlideshow\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"200\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicWidth\":\"400\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CMSSlideshow.map"],
  "mappings": "oLAE4L,IAAMA,EAAeC,EAAkBC,CAAS,EAK1N,SAARC,EAA8BC,EAAM,CAAC,IAAIC,EAAsB,GAAK,CAAC,YAAAC,EAAY,UAAAC,EAAU,GAAGC,CAAU,EAAEJ,EAAYK,EAASC,EAAa,QAAQ,IAAIA,E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AuBJ,EAAe,SAAS,MAAMI,IAAyB,SAAeD,EAA+BC,EAAuB,YAAY,MAAMD,IAAiC,SAAeD,EAAqCC,EAA+B,SAAS,MAAMD,IAAuC,OAAvV,OAAqWA,EAAqC,MAAM,GAAGI,EAAM,CAAC,IAAIC,EAAuBC,EAAY,IAAIC,EAAiB,KAAWC,GAAMH,EAAuBP,EAAe,SAAS,MAAMO,IAAyB,OAAO,OAAOA,EAAuB,SAAS,GAAG,OAAOG,GAAM,WAAYD,EAAiBC,UAAc,OAAOA,GAAO,OAA4BF,EAAYE,EAAK,SAAS,MAAMF,IAAc,OAAtD,OAAoEA,EAAY,WAAW,WAAW,CAAC,IAAIG,EAAaF,EAAiBC,GAAO,OAA4BC,EAAaD,EAAK,SAAS,MAAMC,IAAe,OAAxD,OAAsEA,EAAa,QAAS,CAAC,IAAMC,EAAKC,EAAaP,CAAK,EAAMQ,EAAS,CAAC,EAAE,GAAGL,EAAiB,CAAC,IAAIM,EAA2BC,EAAkBC,EAAmB,IAAIC,EAAWT,EAAiBG,CAAI,EAAK,MAAM,QAAQM,CAAU,EAAGJ,EAASI,EAAoB,MAAM,QAAQA,GAAa,OAAkCF,EAAkBE,EAAW,SAAS,MAAMF,IAAoB,SAAeD,EAA2BC,EAAkB,YAAY,MAAMD,IAA6B,OAAnL,OAAiMA,EAA2B,CAAC,CAAC,EAAGD,EAASI,EAAW,MAAM,SAAS,CAAC,EAAW,MAAM,QAAQA,GAAa,OAAkCD,EAAmBC,EAAW,SAAS,MAAMD,IAAqB,OAA1E,OAAwFA,EAAmB,QAAQ,IAAGH,EAASI,EAAW,MAAM,SAAU,CAAC,GAAGJ,EAAU,OAAOf,EAAS,QAAQe,CAAQ,CAAG,CAAC,MAAM,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_query", "query", "_collectionList_props2", "_clpc_props", "childrenFunction", "clpc", "_clpc_props1", "data", "useQueryData", "children", "_clChildren_props_children", "_clChildren_props", "_clChildren_props1", "clChildren"]
}
