{"version":3,"file":"Book.u5iZNWCD.mjs","names":[],"sources":["https:/framerusercontent.com/modules/aopoeKXiCpIOlT3vWwvB/TN9JRaYpINFDam2vRBIH/Book.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/*\n * @framerDisableUnlink\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function Book(props){const{image,title,backgroundColor,textColor,font,variant,filter,widthContent}=props;const height=widthContent*5;const maxTitleHeight=height*.9;const widthImage=widthContent*4;const widthButton=widthContent+widthImage;const buttonStyle={display:\"flex\",flexDirection:\"row\",justifyContent:\"flex-start\",outline:\"none\",flexShrink:0,width:`${widthButton}px`,perspective:\"1000px\",gap:\"0px\",transition:\"all 500ms ease 0s\",willChange:\"auto\",transform:\"translateX(0px)\",marginLeft:`${calculateMargin(widthContent,variant?65:30)-widthContent}px`,marginRight:`${calculateMargin(widthImage,variant?30:81)-widthImage}px`};const contentStyle={transformStyle:\"preserve-3d\",display:\"flex\",alignItems:\"flex-start\",justifyContent:\"center\",flexShrink:0,width:`${widthContent}px`,height:`${height}px`,transformOrigin:\"right center\",backgroundColor:backgroundColor,color:textColor,transform:variant?\"rotateY(-65deg)\":\"rotateY(-30deg)\",transition:\"all 500ms ease 0s\",willChange:\"auto\",filter:\"brightness(0.8) contrast(2)\"};const imageContainerStyle={transformStyle:\"preserve-3d\",position:\"relative\",flexShrink:0,overflow:\"hidden\",transformOrigin:variant?\"left center\":\"left\",transform:variant?\"rotateY(30deg)\":\"rotateY(81deg)\",transition:\"all 500ms ease 0s\",willChange:\"auto\",filter:\"brightness(0.8) contrast(2)\"};const titleStyle={writingMode:\"vertical-rl\",marginTop:\"12px\",userSelect:\"none\",textOverflow:\"ellipsis\",whiteSpace:\"nowrap\",maxHeight:`${maxTitleHeight}px`};const filterContentStyle={pointerEvents:\"none\",position:\"fixed\",zIndex:\"50\",height:`${height}px`,width:\"100%\",opacity:\"0.4\",filter:filter?'url(\"#paper\")':\"\"};const filterImageStyle={pointerEvents:\"none\",position:\"fixed\",zIndex:\"50\",height:`${height}px`,width:`${widthImage}px`,opacity:\"0.4\",filter:filter?'url(\"#paper\")':\"\"};const shadowStyle={pointerEvents:\"none\",position:\"absolute\",top:\"0px\",left:\"0px\",zIndex:\"50\",height:`${height}px`,width:`${widthImage}px`,background:\"linear-gradient(to right, rgba(255, 255, 255, 0) 2px, rgba(255, 255, 255, 0.5) 3px, rgba(255, 255, 255, 0.25) 4px, rgba(255, 255, 255, 0.25) 6px, transparent 7px, transparent 9px, rgba(255, 255, 255, 0.25) 9px, transparent 12px)\"};const imageStyle={transition:\"all 500ms ease 0s\",willChange:\"auto\",width:`${widthImage}px`,height:`${height}px`,maxHeight:\"100%\"};return /*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"svg\",{style:{position:\"absolute\",inset:0,visibility:\"hidden\"},children:/*#__PURE__*/_jsx(\"defs\",{children:/*#__PURE__*/_jsxs(\"filter\",{id:\"paper\",x:\"0%\",y:\"0%\",width:\"100%\",height:\"100%\",children:[/*#__PURE__*/_jsx(\"feTurbulence\",{type:\"fractalNoise\",baseFrequency:\"1\",numOctaves:\"8\",result:\"noise\"}),/*#__PURE__*/_jsx(\"feDiffuseLighting\",{in:\"noise\",lightingColor:\"white\",surfaceScale:\"1\",result:\"diffLight\",children:/*#__PURE__*/_jsx(\"feDistantLight\",{azimuth:\"45\",elevation:\"35\"})})]})})}),/*#__PURE__*/_jsxs(\"div\",{style:buttonStyle,children:[/*#__PURE__*/_jsxs(\"div\",{style:contentStyle,children:[/*#__PURE__*/_jsx(\"span\",{style:filterContentStyle}),/*#__PURE__*/_jsx(\"h2\",{style:{...font,...titleStyle},children:title})]}),/*#__PURE__*/_jsxs(\"div\",{style:imageContainerStyle,children:[/*#__PURE__*/_jsx(\"span\",{style:filterImageStyle}),/*#__PURE__*/_jsx(\"span\",{style:shadowStyle}),/*#__PURE__*/_jsx(\"img\",{alt:image&&image.alt?image.alt:defaultProperty.image.alt,src:image?image.src:defaultProperty.image.src,style:imageStyle})]})]})]});}addPropertyControls(Book,{image:{type:ControlType.ResponsiveImage,title:\"Image\"},title:{type:ControlType.String,title:\"Title\",defaultValue:\"Think And Grow Rich\"},backgroundColor:{type:ControlType.Color,title:\"Background Color\",defaultValue:\"rgb(255, 202, 126)\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"rgb(8, 21, 59)\"},font:{type:ControlType.Font,title:\"Font\",defaultValue:\"Inter\",controls:\"extended\"},variant:{type:ControlType.Boolean,title:\"Variant\",enabledTitle:\"Open\",disabledTitle:\"Close\"},filter:{type:ControlType.Boolean,title:\"Filter\",enabledTitle:\"With\",disabledTitle:\"Without\"},widthContent:{type:ControlType.Number,title:\"Size\",defaultValue:50}});const defaultProperty={image:{src:\"https://framerusercontent.com/images/l5lP01syB8XZqU1kYdWFfQ5fGX0.png\",srcSet:\"https://framerusercontent.com/images/l5lP01syB8XZqU1kYdWFfQ5fGX0.png 401w\",alt:\"Think And Grow Rich\"}};Book.displayName=\"3D Book\";const calculateMargin=(width,rotationAngle)=>{var radians=rotationAngle*Math.PI/180;var horizontalDisplacement=width*Math.cos(radians);return horizontalDisplacement;};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Book\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"*\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Book.map"],"mappings":"wOAKG,SAAwB,EAAK,EAAM,CAAC,GAAK,CAAC,QAAM,QAAM,kBAAgB,YAAU,OAAK,UAAQ,SAAO,gBAAc,EAAY,EAAO,EAAa,EAAQ,EAAe,EAAO,GAAS,EAAW,EAAa,EAAkD,EAAY,CAAC,QAAQ,OAAO,cAAc,MAAM,eAAe,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