FileMaster
Search
Toggle Dark Mode
Home
/
.
/
wp-content
/
plugins
/
cozy-addons
/
cozy-blocks
/
dist
/
testimonial
/
build
Edit File: index.js
(()=>{"use strict";var o,e={739:()=>{const o=window.wp.blocks,e=window.wp.i18n,a=window.wp.blockEditor,n=window.wp.components,i=window.React,t=window.wp.primitives,s=(0,i.createElement)(t.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,i.createElement)(t.Path,{d:"M10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6zM10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6z"})),l=(0,i.createElement)(t.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(t.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})),r=(0,i.createElement)(t.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(t.Path,{d:"M12.5 15v5H11v-5H4V9h7V4h1.5v5h7v6h-7Z"})),c=(0,i.createElement)(t.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,i.createElement)(t.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})),p=window.wp.element,d=window.wp.compose,u=window.wp.data,g=window.ReactJSXRuntime,v=()=>(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:"16px",marginBottom:"10px"},children:[(0,g.jsx)("p",{children:(0,g.jsxs)("svg",{width:"41",height:"48",viewBox:"0 0 41 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,g.jsx)("path",{d:"M0 34.7721L6.88004 38.677V15.8055L20.4542 7.80977L23.9872 9.4833L30.4953 5.57841L20.4542 -7.62939e-06L0 11.9006V34.7721Z",fill:"#38DAC7"}),(0,g.jsx)("path",{d:"M32.9284 6.87939L34.2126 7.61318L12.3825 19.904L12.1991 40.45L20.6376 45.8616L41.0001 33.6625V35.4969L20.6376 47.6043L10.8232 41.2755V18.9868L32.9284 6.87939Z",fill:"#5566CA"}),(0,g.jsx)("path",{d:"M37.6063 9.53936L36.2305 8.71385L14.217 21.3716V38.9824L20.5459 43.5685L41.0001 31.3694V29.5349L20.5459 41.8258L15.5928 38.2486V22.1054L37.6063 9.53936Z",fill:"#5566CA"}),(0,g.jsx)("path",{d:"M41.0001 11.3738L39.5325 10.5483L17.3356 23.2061V37.2397L20.5459 39.6244L41.0001 27.4253V25.6826L20.5459 37.79L18.9866 36.5976V24.1233L41.0001 11.3738Z",fill:"#5566CA"})]})}),(0,g.jsx)("h2",{style:{fontSize:"18px",fontFamily:"Inter",marginTop:"-5px",marginBottom:"15px"},children:(0,e.__)("Access Without Limits!","cozy-addons")}),(0,g.jsx)("p",{style:{textAlign:"center",lineHeight:"20px"},children:(0,e.__)("Access more blocks and advanced features for effortless design. Upgrade today for a richer web-building experience!","cozy-addons")}),(0,g.jsx)("a",{href:"https://cozythemes.com/pricing-and-plans/",target:"_blank",children:(0,g.jsx)("button",{className:"cozy-block-premium-button",style:{backgroundColor:"#5566ca",borderRadius:"20px",padding:"10px",border:"none",color:"#fff",fontFamily:"Inter",fontSize:"10px",fontWeight:"500",cursor:"pointer"},children:(0,g.jsxs)("div",{style:{display:"flex",gap:"5px",margin:"0"},children:[(0,g.jsx)("div",{children:(0,g.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,g.jsx)("path",{d:"M9.29768 0.0630875L0.24397 5.2847C-0.109583 5.48778 -0.0646564 5.97987 0.286944 6.12828L2.36334 6.99919L7.97527 2.05487C8.0827 1.95919 8.23506 2.10565 8.14325 2.21695L3.43767 7.94822V9.52017C3.43767 9.98102 3.99437 10.1626 4.26784 9.8287L5.50821 8.31924L7.94206 9.33857C8.21943 9.45573 8.53588 9.28194 8.58666 8.98317L9.99306 0.547365C10.0595 0.152913 9.6356 -0.132186 9.29768 0.0630875Z",fill:"white"})})}),(0,g.jsx)("div",{children:(0,e.__)("Upgrade to Pro","cozy-addons")})]})})})]})}),y=[["cozy-block/carousel",{},[["core/group",{style:{spacing:{padding:{top:"var:preset|spacing|40",bottom:"var:preset|spacing|40",left:"var:preset|spacing|50",right:"var:preset|spacing|50"}}},layout:{type:"constrained",contentSize:"760px"}},[["core/image",{align:"center",height:"80px",width:"80px",scale:"cover",style:{border:{radius:"50px"}},url:cozyBlockAssets.imageDir+"image_placeholder.jpg"}],["core/paragraph",{align:"center",placeholder:(0,e.__)("Lorem Ipsum is simply dummy text of the printing and typesetting industry.","cozy-addons"),style:{spacing:{margin:{bottom:"30px"}}}}],["core/heading",{textAlign:"center",placeholder:(0,e.__)("George Mathew","cozy-addons"),style:{typography:{fontSize:"18px"}}}]]]]],["cozy-block/carousel",{},[["core/group",{style:{spacing:{padding:{top:"var:preset|spacing|40",bottom:"var:preset|spacing|40",left:"var:preset|spacing|50",right:"var:preset|spacing|50"}}},layout:{type:"constrained",contentSize:"760px"}},[["core/image",{align:"center",height:"80px",width:"80px",scale:"cover",style:{border:{radius:"50px"}},url:cozyBlockAssets.imageDir+"image_placeholder.jpg"}],["core/paragraph",{align:"center",placeholder:(0,e.__)("Lorem Ipsum is simply dummy text of the printing and typesetting industry.","cozy-addons"),style:{spacing:{margin:{bottom:"30px"}}}}],["core/heading",{textAlign:"center",placeholder:(0,e.__)("George Mathew","cozy-addons"),style:{typography:{fontSize:"18px"}}}]]]]]],h=(0,p.memo)((({layout:o})=>{const e=(0,a.useInnerBlocksProps)({className:`cozy-block-${o}-wrapper ${"carousel"===o?"swiper-wrapper":""}`},{allowedBlocks:["cozy-block/grid","cozy-block/carousel"],template:y,renderAppender:!1,orientation:"horizontal"});return(0,g.jsx)("div",{...e})})),O=(0,p.memo)((({clientId:i,layout:t})=>{const{insertBlock:l,selectBlock:r}=(0,u.useDispatch)(a.store),c=(0,u.useSelect)((o=>o(a.store).getBlock(i).innerBlocks));return(0,g.jsx)(n.ToolbarGroup,{children:(0,g.jsx)(n.ToolbarButton,{icon:s,onClick:()=>{const a=[["core/group",{style:{spacing:{padding:{top:"var:preset|spacing|50",bottom:"var:preset|spacing|70",left:"var:preset|spacing|50",right:"var:preset|spacing|50"}}},layout:{type:"constrained",contentSize:"760px"}},[["core/image",{align:"center",height:"80px",width:"80px",scale:"cover",style:{border:{radius:"50px"}},url:cozyBlockAssets.imageDir+"image_placeholder.jpg"}],["core/paragraph",{align:"center",placeholder:(0,e.__)("Lorem Ipsum is simply dummy text of the printing and typesetting industry.","cozy-addons"),style:{spacing:{margin:{bottom:"30px"}}}}],["core/heading",{textAlign:"center",placeholder:(0,e.__)("George Mathew","cozy-addons"),style:{typography:{fontSize:"18px"}}}]]]],n=(0,o.createBlock)("cozy-block/"+t,{},(0,o.createBlocksFromInnerBlocksTemplate)(a));l(n,c.length,i,!1),r(n.clientId)},children:(0,e.__)(`Add ${t.slice(0,1).toUpperCase()+t.slice(1)}`,"cozy-addons")})})})),x=(0,p.memo)((({clientId:o,attributes:e})=>{const n=(0,d.useRefEffect)((o=>{const a=[{property:"--cozyTestimonialGridTemplateColumns",value:e.gridOptions.displayColumn},{property:"--cozyTestimonialGridGap",value:`${e.gridOptions.columnGap}px`}];null!==o&&a.forEach((e=>{o.style.setProperty(e.property,e.value)}))})),i=(0,d.useRefEffect)((n=>{const i=n.querySelector(".swiper-button-prev"),t=n.querySelector(".swiper-button-next"),s=n.querySelector(".swiper-pagination"),l=[{property:"--cozyNavIconSize",value:`${e.carouselOptions.navigation.iconSize}px`},{property:"--cozyNavWidth",value:`${e.carouselOptions.navigation.iconBoxWidth}px`},{property:"--cozyNavHeight",value:`${e.carouselOptions.navigation.iconBoxHeight}px`},{property:"--cozyNavBorderType",value:`${e.carouselOptions.navigation.borderType}`},{property:"--cozyNavBorderWidth",value:`${e.carouselOptions.navigation.borderWidth}px`},{property:"--cozyNavBorderColor",value:`${e.carouselOptions.navigation.borderColor}`},{property:"--cozyNavBorderColorHover",value:`${e.carouselOptions.navigation.borderColorHover}`},{property:"--cozyNavBorderRadius",value:`${e.carouselOptions.navigation.borderRadius}px`},{property:"--cozyNavIconColor",value:e.carouselOptions.navigation.color},{property:"--cozyNavIconColorHover",value:e.carouselOptions.navigation.colorHover},{property:"--cozyNavBgColor",value:e.carouselOptions.navigation.backgroundColor},{property:"--cozyNavBgColorHover",value:e.carouselOptions.navigation.backgroundColorHover},{property:"--cozyPaginationWidth",value:`${e.carouselOptions.pagination.width}px`},{property:"--cozyPaginationHeight",value:`${e.carouselOptions.pagination.height}px`},{property:"--cozyPaginationBorderRadius",value:`${e.carouselOptions.pagination.borderRadius}px`},{property:"--cozyPaginationActiveWidth",value:`${e.carouselOptions.pagination.activeWidth}px`},{property:"--cozyPaginationActiveBorderRadius",value:`${e.carouselOptions.pagination.activeBorderRadius}px`},{property:"--cozyPaginationColor",value:e.carouselOptions.pagination.color},{property:"--cozyPaginationColorHover",value:e.carouselOptions.pagination.colorHover},{property:"--cozyPaginationActiveColor",value:e.carouselOptions.pagination.activeColor},{property:"--cozyPaginationActiveColorHover",value:e.carouselOptions.pagination.activeColorHover},{property:"--cozyPaginationPositionVertical",value:`${e.carouselOptions.pagination.positionVertical}px`},{property:"--cozyPaginationAlign",value:e.carouselOptions.pagination?.align?e.carouselOptions.pagination?.align:"center"},{property:"--cozyPaginationLeft",value:"left"===e.carouselOptions.pagination?.align?e.carouselOptions.pagination?.left:""},{property:"--cozyPaginationRight",value:"right"===e.carouselOptions.pagination?.align?e.carouselOptions.pagination?.right:""}],r={init:!0,speed:e.carouselOptions.sliderOptions.speed,centeredSlides:e.carouselOptions.sliderOptions.centeredSlides,slidesPerView:e.carouselOptions.sliderOptions.slidesPerView,spaceBetween:e.carouselOptions.sliderOptions.spaceBetween,navigation:{nextEl:t,prevEl:i},pagination:{clickable:!0,el:s},breakpoints:{400:{slidesPerView:1},767:{slidesPerView:e.carouselOptions.sliderOptions.slidesPerView<=2?e.carouselOptions.sliderOptions.slidesPerView:2},1024:{slidesPerView:e.carouselOptions.sliderOptions.slidesPerView<=3?e.carouselOptions.sliderOptions.slidesPerView:3},1180:{slidesPerView:e.carouselOptions.sliderOptions.slidesPerView}},allowTouchMove:!1};let c={};c=new Swiper(n,r);let p=(0,u.select)(a.store).getBlockOrder(o);const d=(0,u.subscribe)((()=>{const e=(0,u.select)(a.store).getBlockOrder(o);if(e.toString()!==p.toString()){const o=(0,u.select)(a.store).getSelectedBlock(),i=e.length>p.length,t=e.length<p.length,s=e.length===p.length,d=c.activeIndex;p=e,c.destroy(),window.requestAnimationFrame((()=>{c=new Swiper(n,r);let e=d;i?e=p.length:t?e=d-1:s&&(e=p.findIndex((e=>e===o.clientId))),e<0&&(e=0),c&&c.slideTo(e,0),null!==n&&l.forEach((o=>{n.style.setProperty(o.property,o.value)}))}))}})),g=(0,u.subscribe)((()=>{const o=(0,u.select)(a.store).getSelectedBlock(),e=o?.clientId;if(null!=e){const o=p.findIndex((o=>o===e));window.requestAnimationFrame((()=>{-1!==o&&c&&c.slideTo(o)}))}}));return null!==n&&l.forEach((o=>{n.style.setProperty(o.property,o.value)})),()=>{g(),d(),c.destroy()}}));return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(a.BlockControls,{children:(0,g.jsx)(O,{clientId:o,layout:e.layout})}),"grid"===e.layout&&(0,g.jsx)("div",{className:"cozy-block-testimonial display-grid "+(e.gridOptions.masonryEnabled?"has-masonry":""),id:`cozyBlock_${o.replace(/-/gi,"_")}`,ref:n,children:(0,g.jsx)(h,{layout:e.layout})}),"carousel"===e.layout&&(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"cozy-block-testimonial display-carousel swiper-container "+(e.hoverShow?"hover-show":""),id:`cozyBlock_${o.replace(/-/gi,"_")}`,ref:i,children:[(0,g.jsx)(h,{layout:e.layout}),"carousel"===e.layout&&e.carouselOptions.navigation.enabled&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("div",{className:"swiper-button-prev cozy-block-button-prev"}),(0,g.jsx)("div",{className:"swiper-button-next cozy-block-button-next"})]}),"carousel"===e.layout&&e.carouselOptions.pagination.enabled&&(0,g.jsx)("div",{className:"swiper-pagination cozy-pagination"})]})})]})})),m=JSON.parse('{"UU":"cozy-block/testimonial","DD":"Testimonials","h_":"Build trust and credibility with our \'Testimonial\' block, providing grid and carousel layouts to elegantly showcase user feedback and positive experiences."}'),b=(0,g.jsxs)("svg",{width:"31",height:"24",viewBox:"0 0 31 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,g.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5H4V4.5H12V5.5Z",fill:"#0C50FF",fillOpacity:"0.5"}),(0,g.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.5 7.5H4V6.5H10.5V7.5Z",fill:"#0C50FF",fillOpacity:"0.5"}),(0,g.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.5 9.5H4V8.5H9.5V9.5Z",fill:"#0C50FF",fillOpacity:"0.5"}),(0,g.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18 9.5L10 9.5V8.5L18 8.5V9.5Z",fill:"#0C50FF",fillOpacity:"0.5"}),(0,g.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14 11.5L4 11.5V10.5L14 10.5V11.5Z",fill:"#0C50FF",fillOpacity:"0.5"}),(0,g.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 5.5H12.5V4.5H21V5.5Z",fill:"#0C50FF",fillOpacity:"0.5"}),(0,g.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23 7.5L11 7.5V6.5L23 6.5V7.5Z",fill:"#0C50FF",fillOpacity:"0.5"}),(0,g.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 0H27V8.4H25V2H2V14.6H4.94118V18.5015L8.6599 14.6H19.3824V16.6H9.51657L2.94118 23.4985V16.6H0V0Z",fill:"#0C50FF"}),(0,g.jsx)("path",{d:"M25.0557 18.327C23.6546 16.5756 23.9611 14.3865 24.2895 13.5108C24.2019 13.3356 23.7422 13.3648 23.5233 13.4013C22.4725 13.664 22.5017 13.0729 22.6476 12.7446C22.8227 12.1316 23.6692 11.3216 24.0706 10.9932C24.8733 10.3365 24.9463 10.0446 25.0557 9.78918C25.1433 8.91351 24.3989 8.8892 23.9611 9.13243C22.3849 10.0081 21.0422 12.0513 20.5679 12.9635C19.3639 16.0283 20.349 17.4148 21.0057 18.1081C22.5381 19.2027 24.326 18.8743 25.0557 18.327Z",fill:"#0C50FF"}),(0,g.jsx)("path",{d:"M24.8369 14.3865C25.1871 12.46 26.3693 11.0298 26.9166 10.5555C27.7922 9.67978 28.4929 9.20546 28.7774 9.13249C29.653 8.69464 30.0909 9.67978 29.5436 10.2271C28.9963 10.9933 27.9382 11.9054 27.5733 12.4163C26.6976 13.5546 27.7922 13.6203 28.449 13.5108C30.463 13.7735 30.8936 15.4446 30.8571 16.2473C30.8571 18.6992 28.522 19.0933 27.3544 18.9838C24.6179 18.7272 24.545 15.5541 24.8369 14.3865Z",fill:"#0C50FF"})]});(0,o.registerBlockType)(m.UU,{title:(0,e.__)(m.DD,"cozy-addons"),description:(0,e.__)(m.h_,"cozy-addons"),icon:{src:b},example:{attributes:{cover:cozyBlockAssets.imageDir+"/preview_testimonials.jpg"},viewportWidth:1260},edit:function(i){const{attributes:t,setAttributes:s,clientId:d}=i;if(t.cover)return(0,g.jsx)("img",{src:t.cover});t.blockClientId=d;const y=(0,a.useBlockProps)({className:"cozy-block-wrapper"}),h=`cozyBlock_${d.replace(/-/gi,"_")}`,O=`\n\t\t#${h}.swiper-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet {\n\t\t\tmargin: 0 var(--swiper-pagination-bullet-horizontal-gap, ${t.carouselOptions.pagination?.gap?t.carouselOptions.pagination?.gap:4}px);\n\t\t}\n\t\t#${h} .swiper-pagination-bullet-active {\n\t\t\theight: ${t.carouselOptions.pagination?.activeHeight}px !important;\n\t\t\t${m="outline",b=t.carouselOptions.pagination?.activeBorder,b&&Object.keys(b).length<4?1===Object.keys(b).length?`\n\t${m}: ${b};\n `:`\n\t${m}: ${b?.width} ${b?.style} ${b?.color};\n `:b&&4===Object.keys(b).length?`\n ${m}: ${b.top} ${b.right} ${b.bottom} ${b.left};\n`:""}\n\t\t\toutline-offset: ${t.carouselOptions.pagination?.activeOffset}px;\n\t\t}\n \t#${h} .swiper-pagination .swiper-pagination-bullet-active:hover {\n\t\t\toutline-color: ${t.carouselOptions.pagination?.activeBorderHover};\n\t\t}\n\t`;var m,b;const _=(0,u.select)("core/editor").getEditorSettings().colors,[z,C]=(0,p.useState)("general");return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)("div",{...y,children:[(0,g.jsx)("style",{dangerouslySetInnerHTML:{__html:O}}),(0,g.jsx)(x,{clientId:d,attributes:t})]}),(0,g.jsxs)(a.InspectorControls,{group:"settings",children:[(0,g.jsxs)(n.PanelBody,{title:(0,e.__)("General","cozy-addons"),opened:"general"===z,onToggle:()=>C("general"),children:[(0,g.jsx)(n.SelectControl,{title:(0,e.__)("Layout","cozy-addons"),options:[{label:(0,e.__)("Grid","cozy-addons"),value:"grid"},{label:(0,e.__)("Carousel","cozy-addons"),value:"carousel"}],value:t.layout,onChange:e=>{!function(e,a){a.forEach((a=>{(0,u.dispatch)("core/block-editor").replaceBlock(a.clientId,(0,o.createBlock)("cozy-block/"+e,{},a.innerBlocks))}))}(e,(0,u.select)("core/block-editor").getBlock(d).innerBlocks),s({...t,layout:e})}}),"grid"===t.layout&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(n.RangeControl,{label:(0,e.__)("Display Column","cozy-addons"),min:1,max:10,step:1,value:t.gridOptions.displayColumn,onChange:o=>s({...t,gridOptions:{...t.gridOptions,displayColumn:o}})}),(0,g.jsx)(n.RangeControl,{label:(0,e.__)("Column gap","cozy-addons"),value:t.gridOptions.columnGap,onChange:o=>s({...t,gridOptions:{...t.gridOptions,columnGap:o}}),min:0,step:1,max:100}),(0,g.jsx)(n.ToggleControl,{label:(0,e.__)("Enable Masonry","cozy-addons"),checked:t.gridOptions.masonryEnabled,onChange:o=>s({...t,gridOptions:{...t.gridOptions,masonryEnabled:o}})})]}),"carousel"===t.layout&&(0,g.jsxs)(g.Fragment,{children:[!cozyBlockAssets.isPremium&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(n.BaseControl,{children:[(0,g.jsxs)("div",{style:{display:"flex",gap:"15px"},children:[(0,g.jsx)(n.BaseControl.VisualLabel,{children:(0,e.__)("Display Column","cozy-addons")}),(0,g.jsx)("p",{className:"cozy-block-pro-label",children:(0,e.__)("PRO","cozy-addons")})]}),(0,g.jsx)(n.RangeControl,{min:1,max:10,value:t.carouselOptions.sliderOptions.slidesPerView,help:(0,e.__)("*Note: To enhance the visual impact, activate centered slides and use fractional numbers as input.","cozy-addons"),disabled:!0})]}),(0,g.jsxs)(n.BaseControl,{children:[(0,g.jsxs)("div",{style:{display:"flex",gap:"15px"},children:[(0,g.jsx)(n.BaseControl.VisualLabel,{children:(0,e.__)("Centered Slides","cozy-addons")}),(0,g.jsx)("p",{className:"cozy-block-pro-label",children:(0,e.__)("PRO","cozy-addons")})]}),(0,g.jsx)(n.ToggleControl,{checked:t.carouselOptions.sliderOptions.centeredSlides,disabled:!0})]}),(0,g.jsxs)(n.BaseControl,{children:[(0,g.jsxs)("div",{style:{display:"flex",gap:"15px"},children:[(0,g.jsx)(n.BaseControl.VisualLabel,{children:(0,e.__)("Gap","cozy-addons")}),(0,g.jsx)("p",{className:"cozy-block-pro-label",children:(0,e.__)("PRO","cozy-addons")})]}),(0,g.jsx)(n.RangeControl,{value:t.carouselOptions.sliderOptions.spaceBetween,disabled:!0,min:0,max:100})]})]}),cozyBlockAssets.isPremium&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(n.RangeControl,{label:(0,e.__)("Display Column","cozy-addons"),min:1,max:10,step:.1,value:t.carouselOptions.sliderOptions.slidesPerView,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,sliderOptions:{...t.carouselOptions.sliderOptions,slidesPerView:o}}}),help:(0,e.__)("*Note: To enhance the visual impact, activate centered slides and use fractional numbers as input.","cozy-addons")}),(0,g.jsx)(n.ToggleControl,{label:(0,e.__)("Centered Slides","cozy-addons"),checked:t.carouselOptions.sliderOptions.centeredSlides,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,sliderOptions:{...t.carouselOptions.sliderOptions,centeredSlides:o}}})}),(0,g.jsx)(n.RangeControl,{label:(0,e.__)("Gap","cozy-addons"),value:t.carouselOptions.sliderOptions.spaceBetween,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,sliderOptions:{...t.carouselOptions.sliderOptions,spaceBetween:o}}}),min:0,step:1,max:100})]})]})]}),"carousel"===t.layout&&(0,g.jsxs)(n.PanelBody,{title:(0,e.__)("Slider Options","cozy-addons"),opened:"slider-options"===z,onToggle:()=>C("slider-options"),children:[(0,g.jsx)(n.ToggleControl,{label:(0,e.__)("Loop","cozy-addons"),checked:t.carouselOptions.sliderOptions.loop,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,sliderOptions:{...t.carouselOptions.sliderOptions,loop:o}}})}),!cozyBlockAssets.isPremium&&(0,g.jsxs)(n.BaseControl,{children:[(0,g.jsxs)("div",{style:{display:"flex",gap:"15px"},children:[(0,g.jsx)(n.BaseControl.VisualLabel,{children:(0,e.__)("Speed (ms)","cozy-addons")}),(0,g.jsx)("p",{className:"cozy-block-pro-label",children:(0,e.__)("PRO","cozy-addons")})]}),(0,g.jsx)(n.RangeControl,{min:500,max:5e3,value:t.carouselOptions.sliderOptions.speed,disabled:!0,help:(0,e.__)("*Note: Greater the value, greater the delay.","cozy-addons")})]}),cozyBlockAssets.isPremium&&(0,g.jsx)(n.RangeControl,{label:(0,e.__)("Speed (ms)","cozy-addons"),min:0,max:5e3,step:1,value:t.carouselOptions.sliderOptions.speed,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,sliderOptions:{...t.carouselOptions.sliderOptions,speed:o}}}),help:(0,e.__)("*Note: Greater the value, greater the delay.","cozy-addons")}),(0,g.jsx)(n.ToggleControl,{label:(0,e.__)("Autoplay","cozy-addons"),checked:t.carouselOptions.sliderOptions.autoplay.enabled,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,sliderOptions:{...t.carouselOptions.sliderOptions,autoplay:{...t.carouselOptions.sliderOptions.autoplay,enabled:o}}}})}),t.carouselOptions.sliderOptions.autoplay.enabled&&(0,g.jsx)(n.RangeControl,{label:(0,e.__)("Autoplay Delay","cozy-addons"),min:0,max:5e3,step:1,value:t.carouselOptions.sliderOptions.autoplay.delay,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,sliderOptions:{...t.carouselOptions.sliderOptions,autoplay:{...t.carouselOptions.sliderOptions.autoplay,delay:Math.abs(o)}}}})}),(0,g.jsx)(n.ToggleControl,{label:(0,e.__)("Enable Pagination","cozy-addons"),checked:t.carouselOptions.pagination.enabled,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,pagination:{...t.carouselOptions.pagination,enabled:o}}})}),(0,g.jsx)(n.ToggleControl,{label:(0,e.__)("Enable Navigation","cozy-addons"),checked:t.carouselOptions.navigation.enabled,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,navigation:{...t.carouselOptions.navigation,enabled:o}}})}),t.carouselOptions.navigation.enabled&&(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(n.ToggleControl,{label:(0,e.__)("Display on Hover","cozy-addons"),checked:t.hoverShow,onChange:o=>s({hoverShow:o}),help:(0,e.__)("*Note: Show navigation only after hovering the block.")})})]}),!cozyBlockAssets.isPremium&&(0,g.jsx)(v,{})]},"setting"),(0,g.jsxs)(a.InspectorControls,{group:"styles",children:["carousel"===t.layout&&t.carouselOptions.pagination.enabled&&(0,g.jsxs)(n.PanelBody,{title:(0,e.__)("Pagination Styles","cozy-addons"),opened:"bullet-styles"===z,onToggle:()=>C("bullet-styles"),children:[(0,g.jsxs)(n.__experimentalToggleGroupControl,{label:(0,e.__)("Align","cozy-addons"),isBlock:!0,value:t.carouselOptions.pagination?.align,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,pagination:{...t.carouselOptions.pagination,align:o}}}),children:[(0,g.jsx)(n.__experimentalToggleGroupControlOptionIcon,{label:(0,e.__)("Left","cozy-addons"),value:"left",icon:l}),(0,g.jsx)(n.__experimentalToggleGroupControlOptionIcon,{label:(0,e.__)("Center","cozy-addons"),value:"center",icon:r}),(0,g.jsx)(n.__experimentalToggleGroupControlOptionIcon,{label:(0,e.__)("Right","cozy-addons"),value:"right",icon:c})]}),(0,g.jsx)(n.RangeControl,{label:(0,e.__)("Vertical Positioning","cozy-addons"),value:t.carouselOptions.pagination.positionVertical,min:-300,max:300,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,pagination:{...t.carouselOptions.pagination,positionVertical:o}}})}),"left"===t.carouselOptions.pagination?.align&&(0,g.jsx)("div",{className:"components-base-control",children:(0,g.jsx)(a.HeightControl,{label:(0,e.__)("Horizontal Positioning","cozy-addons"),value:t.carouselOptions.pagination?.left,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,pagination:{...t.carouselOptions.pagination,left:o}}})})}),"right"===t.carouselOptions.pagination?.align&&(0,g.jsx)("div",{className:"components-base-control",children:(0,g.jsx)(a.HeightControl,{label:(0,e.__)("Horizontal Positioning","cozy-addons"),value:t.carouselOptions.pagination?.right,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,pagination:{...t.carouselOptions.pagination,right:o}}})})}),(0,g.jsx)(n.RangeControl,{label:(0,e.__)("Gap","cozy-addons"),value:t.carouselOptions.pagination?.gap,min:0,max:100,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,pagination:{...t.carouselOptions.pagination,gap:o}}})}),(0,g.jsx)(n.TabPanel,{className:"cozy-tab-panel",activeClass:"active-tab",tabs:[{name:"cozy-tab__default",title:(0,e.__)("Default","cozy-addons"),className:"tab-one"},{name:"cozy-tab__active",title:(0,e.__)("Active","cozy-addons"),className:"tab-two"}],children:o=>(0,g.jsxs)(g.Fragment,{children:["cozy-tab__default"===o.name&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(n.RangeControl,{label:(0,e.__)("Width","cozy-addons"),value:t.carouselOptions.pagination.width,min:1,max:100,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,pagination:{...t.carouselOptions.pagination,width:o}}})}),(0,g.jsx)(n.RangeControl,{label:(0,e.__)("Height","cozy-addons"),value:t.carouselOptions.pagination.height,min:1,max:100,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,pagination:{...t.carouselOptions.pagination,height:o}}})}),(0,g.jsx)(n.RangeControl,{label:(0,e.__)("Border Radius","cozy-addons"),value:t.carouselOptions.pagination.borderRadius,min:0,max:100,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,pagination:{...t.carouselOptions.pagination,borderRadius:o}}})})]}),"cozy-tab__active"===o.name&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(n.RangeControl,{label:(0,e.__)("Width","cozy-addons"),value:t.carouselOptions.pagination.activeWidth,min:1,max:100,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,pagination:{...t.carouselOptions.pagination,activeWidth:o}}})}),(0,g.jsx)(n.RangeControl,{label:(0,e.__)("Height","cozy-addons"),value:t.carouselOptions.pagination?.activeHeight,min:1,max:100,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,pagination:{...t.carouselOptions.pagination,activeHeight:o}}})}),(0,g.jsx)("div",{className:"components-base-control",children:(0,g.jsx)(n.__experimentalBorderControl,{enableAlpha:!0,isCompact:!0,colors:_,label:(0,e.__)("Border","cozy-addons"),value:t.carouselOptions.pagination?.activeBorder,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,pagination:{...t.carouselOptions.pagination,activeBorder:o}}})})}),(0,g.jsx)(n.RangeControl,{label:(0,e.__)("Border Offset","cozy-addons"),value:t.carouselOptions.pagination?.activeOffset,min:0,max:100,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,pagination:{...t.carouselOptions.pagination,activeOffset:o}}})}),(0,g.jsx)(n.RangeControl,{label:(0,e.__)("Border Radius","cozy-addons"),value:t.carouselOptions.pagination.activeBorderRadius,min:0,max:100,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,pagination:{...t.carouselOptions.pagination,activeBorderRadius:o}}})})]})]})}),(0,g.jsx)(a.PanelColorSettings,{className:"cozy-color-control",enableAlpha:!0,title:(0,e.__)("Color","cozy-addons"),colorSettings:[{value:t.carouselOptions.pagination.color,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,pagination:{...t.carouselOptions.pagination,color:o}}}),label:(0,e.__)("Default","cozy-addons")},{value:t.carouselOptions.pagination.colorHover,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,pagination:{...t.carouselOptions.pagination,colorHover:o}}}),label:(0,e.__)("Default (Hover)","cozy-addons")},{value:t.carouselOptions.pagination.activeColor,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,pagination:{...t.carouselOptions.pagination,activeColor:o}}}),label:(0,e.__)("Active","cozy-addons")},{label:(0,e.__)("Active (Hover)","cozy-addons"),value:t.carouselOptions.pagination.activeColorHover,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,pagination:{...t.carouselOptions.pagination,activeColorHover:o}}})},{label:(0,e.__)("Active Border (Hover)","cozy-addons"),value:t.carouselOptions.pagination?.activeBorderHover,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,pagination:{...t.carouselOptions.pagination,activeBorderHover:o}}})}]})]}),"carousel"===t.layout&&t.carouselOptions.navigation.enabled&&(0,g.jsxs)(n.PanelBody,{title:(0,e.__)("Navigation Styles","cozy-addons"),opened:"nav-styles"===z,onToggle:()=>C("nav-styles"),children:[(0,g.jsx)(n.RangeControl,{label:(0,e.__)("Icon Size","cozy-addons"),value:t.carouselOptions.navigation.iconSize,min:1,max:50,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,navigation:{...t.carouselOptions.navigation,iconSize:o}}})}),(0,g.jsx)(n.RangeControl,{label:(0,e.__)("Icon Box Width","cozy-addons"),value:t.carouselOptions.navigation.iconBoxWidth,min:1,max:50,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,navigation:{...t.carouselOptions.navigation,iconBoxWidth:o}}})}),(0,g.jsx)(n.RangeControl,{label:(0,e.__)("Icon Box Height","cozy-addons"),value:t.carouselOptions.navigation.iconBoxHeight,min:1,max:50,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,navigation:{...t.carouselOptions.navigation,iconBoxHeight:o}}})}),(0,g.jsx)(n.SelectControl,{label:(0,e.__)("Border Type","cozy-addons"),options:[{label:(0,e.__)("None","cozy-addons"),value:"none"},{label:(0,e.__)("Solid","cozy-addons"),value:"solid"},{label:(0,e.__)("Double","cozy-addons"),value:"double"},{label:(0,e.__)("Dotted","cozy-addons"),value:"dotted"},{label:(0,e.__)("Dashed","cozy-addons"),value:"dashed"},{label:(0,e.__)("Groove","cozy-addons"),value:"groove"}],value:t.carouselOptions.navigation.borderType,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,navigation:{...t.carouselOptions.navigation,borderType:o}}})}),"none"!==t.carouselOptions.navigation.borderType&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(n.RangeControl,{label:(0,e.__)("Border Width","cozy-addons"),min:1,max:50,step:1,value:t.carouselOptions.navigation.borderWidth,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,navigation:{...t.carouselOptions.navigation,borderWidth:o}}})}),(0,g.jsx)(a.PanelColorSettings,{className:"cozy-color-control",enableAlpha:!0,title:(0,e.__)("Border Color","cozy-addons"),colorSettings:[{label:(0,e.__)("Default","cozy-addons"),value:t.carouselOptions.navigation.borderColor,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,navigation:{...t.carouselOptions.navigation,borderColor:o}}})},{label:(0,e.__)("Hover","cozy-addons"),value:t.carouselOptions.navigation.borderColorHover,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,navigation:{...t.carouselOptions.navigation,borderColorHover:o}}})}]})]}),(0,g.jsx)(n.RangeControl,{label:(0,e.__)("Border Radius","cozy-addons"),value:t.carouselOptions.navigation.borderRadius,min:1,max:50,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,navigation:{...t.carouselOptions.navigation,borderRadius:o}}})}),(0,g.jsx)(a.PanelColorSettings,{className:"cozy-color-control",enableAlpha:!0,title:(0,e.__)("Color","cozy-addons"),colorSettings:[{value:t.carouselOptions.navigation.color,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,navigation:{...t.carouselOptions.navigation,color:o}}}),label:(0,e.__)("Icon (Default)","cozy-addons")},{value:t.carouselOptions.navigation.colorHover,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,navigation:{...t.carouselOptions.navigation,colorHover:o}}}),label:(0,e.__)("Icon (Hover)","cozy-addons")},{value:t.carouselOptions.navigation.backgroundColor,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,navigation:{...t.carouselOptions.navigation,backgroundColor:o}}}),label:(0,e.__)("Background (Default)","cozy-addons")},{value:t.carouselOptions.navigation.backgroundColorHover,onChange:o=>s({...t,carouselOptions:{...t.carouselOptions,navigation:{...t.carouselOptions.navigation,backgroundColorHover:o}}}),label:(0,e.__)("Background (Hover)","cozy-addons")}]})]})]},"style")]})},save:function({attributes:o}){const e=`cozyBlock_${(n=o.blockClientId,n.replace(/[;=()\s]/g,"")).replace(/-/gi,"_")}`;var n;return(0,g.jsxs)("div",{className:`cozy-block-testimonial display-${o.layout} ${"grid"===o.layout&&o.gridOptions.masonryEnabled?"has-masonry":""} ${"carousel"===o.layout?"swiper-container":""} ${o.hoverShow?"hover-show":""}`,id:e,children:[(0,g.jsx)("div",{className:`cozy-block-${o.layout}-wrapper ${"carousel"===o.layout?"swiper-wrapper":""}`,children:(0,g.jsx)(a.InnerBlocks.Content,{})}),"carousel"===o.layout&&o.carouselOptions.navigation.enabled&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("div",{className:"swiper-button-prev cozy-block-button-prev"}),(0,g.jsx)("div",{className:"swiper-button-next cozy-block-button-next"})]}),"carousel"===o.layout&&o.carouselOptions.pagination.enabled&&(0,g.jsx)("div",{className:"swiper-pagination cozy-pagination"})]})}})}},a={};function n(o){var i=a[o];if(void 0!==i)return i.exports;var t=a[o]={exports:{}};return e[o](t,t.exports,n),t.exports}n.m=e,o=[],n.O=(e,a,i,t)=>{if(!a){var s=1/0;for(p=0;p<o.length;p++){for(var[a,i,t]=o[p],l=!0,r=0;r<a.length;r++)(!1&t||s>=t)&&Object.keys(n.O).every((o=>n.O[o](a[r])))?a.splice(r--,1):(l=!1,t<s&&(s=t));if(l){o.splice(p--,1);var c=i();void 0!==c&&(e=c)}}return e}t=t||0;for(var p=o.length;p>0&&o[p-1][2]>t;p--)o[p]=o[p-1];o[p]=[a,i,t]},n.o=(o,e)=>Object.prototype.hasOwnProperty.call(o,e),(()=>{var o={57:0,350:0};n.O.j=e=>0===o[e];var e=(e,a)=>{var i,t,[s,l,r]=a,c=0;if(s.some((e=>0!==o[e]))){for(i in l)n.o(l,i)&&(n.m[i]=l[i]);if(r)var p=r(n)}for(e&&e(a);c<s.length;c++)t=s[c],n.o(o,t)&&o[t]&&o[t][0](),o[t]=0;return n.O(p)},a=globalThis.webpackChunktestimonial=globalThis.webpackChunktestimonial||[];a.forEach(e.bind(null,0)),a.push=e.bind(null,a.push.bind(a))})();var i=n.O(void 0,[350],(()=>n(739)));i=n.O(i)})();
Save
Back