Changeset 3446832
- Timestamp:
- 01/26/2026 05:35:45 AM (3 weeks ago)
- Location:
- wp-swiper/trunk/build
- Files:
-
- 2 edited
-
index.build.asset.php (modified) (1 diff)
-
index.build.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wp-swiper/trunk/build/index.build.asset.php
r3446823 r3446832 1 <?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keycodes' ), 'version' => '3a3992f353767a38ea99');1 <?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-notices'), 'version' => '9e110f6c48eacfb63c33'); -
wp-swiper/trunk/build/index.build.js
r3446823 r3446832 1 (()=>{var e={655(e,t){var i;!function(){"use strict";var s=function(){function e(){}function t(e,t){for(var i=t.length,s=0;s<i;++s)o(e,t[s])}e.prototype=Object.create(null);var i={}.hasOwnProperty,s=/\s+/;function o(e,o){if(o){var a=typeof o;"string"===a?function(e,t){for(var i=t.split(s),o=i.length,a=0;a<o;++a)e[i[a]]=!0}(e,o):Array.isArray(o)?t(e,o):"object"===a?function(e,t){if(t.toString===Object.prototype.toString||t.toString.toString().includes("[native code]"))for(var s in t)i.call(t,s)&&(e[s]=!!t[s]);else e[t.toString()]=!0}(e,o):"number"===a&&function(e,t){e[t]=!0}(e,o)}}return function(){for(var i=arguments.length,s=Array(i),o=0;o<i;o++)s[o]=arguments[o];var a=new e;t(a,s);var l=[];for(var n in a)a[n]&&l.push(n);return l.join(" ")}}();e.exports?(s.default=s,e.exports=s):void 0===(i=function(){return s}.apply(t,[]))||(e.exports=i)}()}},t={};function i(s){var o=t[s];if(void 0!==o)return o.exports;var a=t[s]={exports:{}};return e[s](a,a.exports,i),a.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var s in t)i.o(t,s)&&!i.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=JSON.parse('{"apiVersion":3,"name":"da/wp-swiper-slides","category":"media","supports":{"html":false,"className":false,"anchor":true,"align":["wide","full"]},"attributes":{"align":{"type":"string","default":""},"overlayColor":{"type":"object","default":{"rgb":{"r":0,"g":0,"b":0,"a":0}}},"containerWidth":{"type":"number"},"overlayImg":{"type":"string"},"previousIcon":{"type":"string"},"nextIcon":{"type":"string"},"overlayImgOpacity":{"type":"number","default":0.5},"currentSlide":{"type":"number","default":0},"tabActive":{"type":"string","default":"slide-1"},"buttonsAlign":{"type":"string","default":"start"},"autoplay":{"type":"boolean","default":false},"disableOnInteraction":{"type":"boolean","default":true},"pauseOnMouseEnter":{"type":"boolean","default":false},"reverseDirection":{"type":"boolean","default":false},"stopOnLastSlide":{"type":"boolean","default":false},"waitForTransition":{"type":"boolean","default":true},"navigation":{"type":"boolean","default":true},"pagination":{"type":"boolean","default":true},"clickable_pagination":{"type":"boolean","default":false},"loop":{"type":"boolean","default":false},"loopAddBlankSlides":{"type":"boolean","default":true},"loopAdditionalSlides":{"type":"number","default":0},"effect":{"type":"string","default":"slide"},"speed":{"type":"number","default":500},"delay":{"type":"number","default":3000},"slidesPerView":{"type":"string","default":"1"},"slidesPerGroup":{"type":"number","default":1},"slidesPerGroupAuto":{"type":"boolean","default":false},"slidesPerGroupSkip":{"type":"number","default":0},"spaceBetween":{"type":"number","default":0},"autoSlideWidth":{"type":"boolean","default":false},"slidesOffsetBefore":{"type":"number","default":0},"slidesOffsetAfter":{"type":"number","default":0},"tabsData":{"type":"array","default":[{"clientId":"","slug":"slide-1","slideImg":"","thumbImg":""}]},"breakpoints":{"type":"string"},"thumbs":{"type":"boolean","default":false},"thumbsSlidesPerView":{"type":"number","default":4},"thumbsSpaceBetween":{"type":"number","default":10},"autoHeight":{"type":"boolean","default":true},"sliderHeight":{"type":"string","default":"500px"},"freeMode":{"type":"boolean","default":false},"freeModeMinimumVelocity":{"type":"number","default":0.02},"freeModeMomentum":{"type":"boolean","default":true},"freeModeMomentumBounce":{"type":"boolean","default":true},"freeModeMomentumBounceRatio":{"type":"number","default":1},"freeModeMomentumRatio":{"type":"number","default":1},"freeModeMomentumVelocityRatio":{"type":"number","default":1},"freeModeSticky":{"type":"boolean","default":false},"debug":{"type":"boolean","default":false},"direction":{"type":"string","default":"horizontal"},"overflowVisible":{"type":"boolean","default":false},"navigationColor":{"type":"string","default":""},"paginationColor":{"type":"string","default":""}}}');var t=i(655),s=i.n(t);const o=window.wp.blockEditor,a=window.ReactJSXRuntime,{sliderHeight:l,navigationColor:n,paginationColor:r,autoHeight:d,...p}=e.attributes,c={...p,autoHeight:{type:"boolean",default:!0},pagination_type:{type:"string",default:"bullets"},mousewheel:{type:"boolean",default:!1},releaseOnEdges:{type:"boolean",default:!1}},u=[{attributes:{...c,tabsData:{type:"array",default:[]}},save:function(e){let{className:t}=e.attributes;const{align:i,overlayImg:l,overlayImgOpacity:n,slidesPerView:r,slidesPerGroup:d,slidesPerGroupAuto:p,slidesPerGroupSkip:c,spaceBetween:u,autoSlideWidth:w,autoplay:m,disableOnInteraction:g,pauseOnMouseEnter:h,reverseDirection:f,stopOnLastSlide:b,waitForTransition:v,delay:y,speed:x,loop:_,loopAddBlankSlides:j,loopAdditionalSlides:k,effect:C,navigation:P,pagination:S,mousewheel:M,releaseOnEdges:B,pagination_type:O,clickable_pagination:I,breakpoints:N,thumbs:R,thumbsSpaceBetween:A,thumbsSlidesPerView:T,autoHeight:V,freeMode:E,freeModeMinimumVelocity:D,freeModeMomentum: H,freeModeMomentumBounce:F,freeModeMomentumBounceRatio:G,freeModeMomentumRatio:$,freeModeMomentumVelocityRatio:z,freeModeSticky:L,debug:W,direction:J,tabsData:q,previousIcon:U,nextIcon:Z,slidesOffsetBefore:X,slidesOffsetAfter:Y,overflowVisible:K}=e.attributes;t=s()(t,"wp-swiper"),i&&(t=s()(t,`align${i}`));const Q={className:t},ee=l?{backgroundImage:`url(${l})`}:{};n&&(ee.opacity=n);let te={"data-thumbs":{}},ie={slidesPerView:"auto"===r?"auto":parseInt(r,10),slidesPerGroup:d,slidesPerGroupAuto:p,slidesPerGroupSkip:c,navigation:P,pagination:{},delay:y,speed:x,loop:_,direction:J,slidesOffsetBefore:X,slidesOffsetAfter:Y,autoHeight:V,spaceBetween:u,releaseOnEdges:B};w&&(ie.autoSlideWidth=!0),M&&B&&(ie.mousewheel={releaseOnEdges:"true"===B}),_&&(ie.loopAddBlankSlides=j,ie.loopAdditionalSlides=k),ie.effect=C||"slide","fade"===C&&(ie.fadeEffect={crossFade:!0}),m&&(ie.autoplay=!0,null!=y&&(ie.autoplay={delay:Number(y)}),g&&(ie.autoplay||(ie.autoplay={}),ie.autoplay.disableOnInteraction=!0),h&&(ie.autoplay||(ie.autoplay={}),ie.autoplay.pauseOnMouseEnter=!0),f&&(ie.autoplay||(ie.autoplay={}),ie.autoplay.reverseDirection=!0),b&&(ie.autoplay||(ie.autoplay={}),ie.autoplay.stopOnLastSlide=!0),null!=v&&(ie.autoplay||(ie.autoplay={}),ie.autoplay.waitForTransition=v)),E&&(ie.freeMode={enabled:!0,minimumVelocity:D,momentum:H,momentumBounce:F,momentumBounceRatio:G,momentumRatio:$,momentumVelocityRatio:z,sticky:L}),ie.pagination.type="bullets"!=O?O:"bullets",I&&(ie.pagination.clickable=!!I||""),void 0!==N&&""!=N&&(ie.breakpoints=N),R&&(te["data-thumbs"]=JSON.stringify({spaceBetween:A,slidesPerView:T,freeMode:!0,watchSlidesProgress:!0,navigation:!1}));const se=(void 0!==q?q:[]).map((e,t)=>(e.thumbImg||e.slideImg)&&(0,a.jsx)("div",{className:"swiper-slide wp-swiper__thumb","data-thumb":t+1,children:(0,a.jsx)("img",{src:e.thumbImg||e.slideImg,alt:`Thumbnail ${t+1}`})},t)),oe=s()("swiper-container","swiper",{"swiper-overflow-visible":K});return(0,a.jsxs)("div",{...Q,children:[function(e,t){if(void 0!==e)return(0,a.jsx)("div",{className:"wp-swiper__overlay-img",style:t})}(l,ee),(0,a.jsxs)("div",{className:"wp-swiper__wrapper",children:[(0,a.jsx)("div",{className:oe,...W?{"data-debug":!0}:{},"data-swiper":JSON.stringify(ie),...te,children:(0,a.jsxs)("div",{className:"swiper-wrapper",children:["\n",(0,a.jsx)(o.InnerBlocks.Content,{}),"\n"]})}),function({attributes:e}){const{navigation:t}=e;if(t)return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:"wp_swiper__navigation",children:(0,a.jsxs)("div",{className:"wp_swiper__navigation-container",children:[(0,a.jsx)("div",{className:"swiper-button-prev "+(U?"wp_swiper__button-prev":""),children:U?(0,a.jsx)("img",{src:U,alt:"Previous"}):null}),(0,a.jsx)("div",{className:"swiper-button-next "+(Z?"wp_swiper__button-next":""),children:Z?(0,a.jsx)("img",{src:Z,alt:"Previous"}):null})]})})})}(e),function({attributes:e}){const{pagination:t}=e;if(t)return(0,a.jsx)("div",{className:"swiper-pagination"})}(e)]}),function({attributes:e}){let{className:t}=e;if(t=t?t.toString():"",-1!==t.indexOf("is-style-testimonials"))return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:"wp-swiper__quotes",children:(0,a.jsx)("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"quote-right",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",class:"svg-inline--fa fa-quote-right fa-w-16 fa-5x",children:(0,a.jsx)("path",{fill:"currentColor",d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z",class:""})})})})}(e),R&&(0,a.jsx)("div",{className:"wp-swiper__thumbs",children:(0,a.jsx)("div",{className:"wp-swiper__wrapper",children:(0,a.jsx)("div",{className:"swiper-container",children:(0,a.jsx)("div",{className:"swiper-wrapper",children:se})})})})]})},migrate:e=>({...e,sliderHeight:"500px",navigationColor:void 0,paginationColor:void 0})},{attributes:{...c,sticky:{type:"boolean",default:!1},tabsData:{type:"array",default:[]}},save:function(e){let{className:t}=e.attributes;const{align:i,overlayImg:l,overlayImgOpacity:n,slidesPerView:r,slidesPerGroup:d,slidesPerGroupAuto:p,slidesPerGroupSkip:c,spaceBetween:u,txtColor:w,autoplay:m,disableOnInteraction:g,pauseOnMouseEnter:h,reverseDirection:f,stopOnLastSlide:b,waitForTransition:v,delay:y,speed:x,loop:_,effect:j,navigation:k,pagination:C,mousewheel:P,releaseOnEdges:S,pagination_type:M,clickable_pagination:B,breakpoints:O,thumbs:I,thumbsSpaceBetween:N,thumbsSlidesPerView:R,autoHeight:A,freeMode:T,sticky:V,debug:E,direction:D,tabsData:H,previousIcon:F,nextIcon:G,slidesOffsetBefore:$,slidesOffsetAfter:z,overflowVisible:L}=e.attributes;t=s()(t,"wp-swiper"),i&&(t=s()(t,`align${i}`));const W=o.useBlockProps.save({className:t}),J=(o.useInnerBlocksProps,l?{backgroundImage:`url(${l})`}:{});n&&(J.opacity=n);const q=w?{color:w}:{};let U={"data-thumbs":{}},Z={slidesPerView:"auto"===r?"auto":parseInt(r,10),slidesPerGroup:d,slidesPerGroupAuto:p,slidesPerGroupSkip:c,navigation:k,pagination:{},delay:y,speed:x,loop:_,direction:D,slidesOffsetBefore:$,slidesOffsetAfter:z,autoHeight:A,spaceBetween:u,releaseOnEdges:S};P&&S&&(Z.mousewheel={releaseOnEdges:"true"===S}),j&&(Z.effect=j,"fade"===j&&(Z.fadeEffect={crossFade:!0})),m&&(Z.autoplay=!0,null!=y&&(Z.autoplay={delay:Number(y)}),g&&(Z.autoplay||(Z.autoplay={}),Z.autoplay.disableOnInteraction=!0),h&&(Z.autoplay||(Z.autoplay={}),Z.autoplay.pauseOnMouseEnter=!0),f&&(Z.autoplay||(Z.autoplay={}),Z.autoplay.reverseDirection=!0),b&&(Z.autoplay||(Z.autoplay={}),Z.autoplay.stopOnLastSlide=!0),null!=v&&(Z.autoplay||(Z.autoplay={}),Z.autoplay.waitForTransition=v)),T&&(Z.freeMode={enabled:!0},V&&(Z.freeMode.sticky=!0)),Z.pagination.type="bullets"!=M?M:"bullets",B&&(Z.pagination.clickable=!!B||""),void 0!==O&&""!=O&&(Z.breakpoints=O),I&&(U["data-thumbs"]=JSON.stringify({spaceBetween:N,slidesPerView:R,freeMode:!0,watchSlidesProgress:!0,navigation:!1}));const X=(void 0!==H?H:[]).map((e,t)=>(e.thumbImg||e.slideImg)&&(0,a.jsx)("div",{className:"swiper-slide wp-swiper__thumb","data-thumb":t+1,children:(0,a.jsx)("img",{src:e.thumbImg||e.slideImg,alt:`Thumbnail ${t+1}`})},t)),Y=s()("swiper-container","swiper",{"swiper-overflow-visible":L});return(0,a.jsxs)("div",{...W,children:[function(e,t){if(void 0!==e)return(0,a.jsx)("div",{className:"wp-swiper__overlay-img",style:t})}(l,J),(0,a.jsxs)("div",{className:"wp-swiper__wrapper",style:q,children:[(0,a.jsx)("div",{className:Y,...E?{"data-debug":!0}:{},"data-swiper":JSON.stringify(Z),...U,children:(0,a.jsx)("div",{className:"swiper-wrapper",children:(0,a.jsx)(o.InnerBlocks.Content,{})})}),function({attributes:e}){const{navigation:t}=e;if(t)return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:"wp_swiper__navigation",children:(0,a.jsxs)("div",{className:"wp_swiper__navigation-container",children:[(0,a.jsx)("div",{className:"swiper-button-prev "+(F?"wp_swiper__button-prev":""),children:F?(0,a.jsx)("img",{src:F,alt:"Previous"}):null}),(0,a.jsx)("div",{className:"swiper-button-next "+(G?"wp_swiper__button-next":""),children:G?(0,a.jsx)("img",{src:G,alt:"Previous"}):null})]})})})}(e),function({attributes:e}){const{pagination:t}=e;if(t)return(0,a.jsx)("div",{className:"swiper-pagination"})}(e)]}),function({attributes:e}){let{className:t}=e;if(t=t?t.toString():"",-1!==t.indexOf("is-style-testimonials"))return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:"wp-swiper__quotes",children:(0,a.jsx)("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"quote-right",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",class:"svg-inline--fa fa-quote-right fa-w-16 fa-5x",children:(0,a.jsx)("path",{fill:"currentColor",d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z",class:""})})})})}(e),I&&(0,a.jsx)("div",{className:"wp-swiper__thumbs",children:(0,a.jsx)("div",{className:"wp-swiper__wrapper",children:(0,a.jsx)("div",{className:"swiper-container",children:(0,a.jsx)("div",{className:"swiper-wrapper",children:X})})})})]})},migrate(e){const{sticky:t,...i}=e;return{...i,freeModeSticky:t||!1,sliderHeight:"500px",navigationColor:void 0,paginationColor:void 0}}},{attributes:{...c,tabsData:{type:"array",default:[]}},save:function(e){let{className:t}=e.attributes;const{align:i,overlayImg:l,overlayImgOpacity:n,slidesPerView:r,spaceBetween:d,txtColor:p,autoplay:c,disableOnInteraction:u,pauseOnMouseEnter:w,reverseDirection:m,stopOnLastSlide:g,waitForTransition:h,delay:f,speed:b,loop:v,effect:y,navigation:x,pagination:_,mousewheel:j,releaseOnEdges:k,pagination_type:C,clickable_pagination:P,breakpoints:S,thumbs:M,thumbsSpaceBetween:B,thumbsSlidesPerView:O,autoHeight:I,freeMode:N,sticky:R,debug:A,direction:T,tabsData:V,previousIcon:E,nextIcon:D,slidesOffsetBefore:H,slidesOffsetAfter:F}=e.attributes;t=s()(t,"wp-swiper"),i&&(t=s()(t,`align${i}`));const G=o.useBlockProps.save({className:t}),$=(o.useInnerBlocksProps,(void 0!==V?V:[]).map((e,t)=>(e.thumbImg||e.slideImg)&&(0,a.jsx)("div",{className:"swiper-slide wp-swiper__thumb","data-thumb":t+1,children:(0,a.jsx)("img",{src:e.thumbImg||e.slideImg,alt:`Thumbnail ${t+1}`})},t))),z=l?{backgroundImage:`url(${l})`}:{};n&&(z.opacity=n);const L=p?{color:p}:{};let W={"data-thumbs":{}},J={"slidesPerView-":r,navigation:x,pagination:_,autoplay:c,disableOnInteraction:u,pauseOnMouseEnter:w,delay:f,speed:b,loop:v,effect:y};return A&&(J.debug=A),N&&R&&(J.sticky=R),J.slidesOffsetBefore=H,J.slidesOffsetAfter=F,J.direction=T,J.freeMode=N,J.autoHeight=I,J.spaceBetween=d,J.mousewheel=j,J.releaseOnEdges=k,J.type="bullets"!=C?C:"bullets",P&&(J.clickable=!!P||""),void 0!==S&&""!=S&&(J["data-breakpoints"]=JSON.stringify(S.replace(/^\s+|\s+|\n$/gm,"")),J["data-breakpoints"]=J.breakpoints.substring(1,J.breakpoints.length-1)),M&&(W["data-thumbs"]=JSON.stringify({spaceBetween:B,slidesPerView:O,freeMode:!0,watchSlidesProgress:!0,navigation:!1})),(0,a.jsxs)("div",{...G,children:[function(e,t){if(void 0!==e)return(0,a.jsx)("div",{className:"wp-swiper__overlay-img",style:t})}(l,z),(0,a.jsxs)("div",{className:"wp-swiper__wrapper",style:L,children:[(0,a.jsx)("div",{className:"swiper-container swiper","data-swiper":JSON.stringify(J),...W,children:(0,a.jsx)("div",{className:"swiper-wrapper",children:(0,a.jsx)(o.InnerBlocks.Content,{})})}),function({attributes:e}){const{navigation:t}=e;if(t)return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:"wp_swiper__navigation",children:(0,a.jsxs)("div",{className:"wp_swiper__navigation-container",children:[(0,a.jsx)("div",{className:"swiper-button-prev "+(E?"wp_swiper__button-prev":""),children:E?(0,a.jsx)("img",{src:E,alt:"Previous"}):null}),(0,a.jsx)("div",{className:"swiper-button-next "+(D?"wp_swiper__button-next":""),children:D?(0,a.jsx)("img",{src:D,alt:"Previous"}):null})]})})})}(e),function({attributes:e}){const{pagination:t}=e;if(t)return(0,a.jsx)("div",{className:"swiper-pagination"})}(e)]}),function({attributes:e}){let{className:t}=e;if(t=t?t.toString():"",-1!==t.indexOf("is-style-testimonials"))return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:"wp-swiper__quotes",children:(0,a.jsx)("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"quote-right",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",class:"svg-inline--fa fa-quote-right fa-w-16 fa-5x",children:(0,a.jsx)("path",{fill:"currentColor",d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z",class:""})})})})}(e),M&&(0,a.jsx)("div",{className:"wp-swiper__thumbs",children:(0,a.jsx)("div",{className:"wp-swiper__wrapper",children:(0,a.jsx)("div",{className:"swiper-container",children:(0,a.jsx)("div",{className:"swiper-wrapper",children:$})})})})]})},migrate:e=>({...e,sliderHeight:"500px",navigationColor:void 0,paginationColor:void 0})}],w=window.wp.element,m=window.wp.i18n,g=window.wp.blocks,h=window.wp.data,f=window.wp.components,{Component:b}=wp.element,{__}=wp.i18n,{Button:v,Popover:y}=wp.components;class x extends b{constructor(){super(...arguments),this.state={confirmed:-1}}render(){const{onRemove:e,show:t,style:i,tooltipText:s=__("Remove Slide?","@@text_domain"),tooltipRemoveText:o=__("Remove","@@text_domain"),tooltipCancelText:l=__("Cancel","@@text_domain")}=this.props,{confirmed:n}=this.state;return t?(0,a.jsxs)(v,{className:"wb-component-remove-button",onClick:()=>{-1===n&&this.setState({confirmed:0})},style:i,children:[0===n?(0,a.jsxs)(y,{className:"wb-component-remove-button-confirm",onClose:()=>{this.setState({confirmed:-1})},onClickOutside:()=>{this.setState({confirmed:-1})},children:[s,(0,a.jsx)(v,{className:"wb-component-remove-button-confirm-yep",onClick:e,children:o}),(0,a.jsx)(v,{className:"wb-component-remove-button-confirm-nope",onClick:()=>{this.setState({confirmed:-1})},children:l})]}):"",(0,a.jsx)("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"trash",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",class:"svg-inline--fa fa-trash fa-w-14 fa-3x",children:(0,a.jsx)("path",{fill:"currentColor",d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z",class:""})})]}):""}}function _(e){return(0,a.jsx)("div",{className:"wb-tabs-icon",children:""!=e&&(0,a.jsx)("img",{className:"wb-tabs-icon_image",src:e})})}const j={"top left":"is-position-top-left","top center":"is-position-top-center","top right":"is-position-top-right","center left":"is-position-center-left","center center":"is-position-center-center",center:"is-position-center-center","center right":"is-position-center-right","bottom left":"is-position-bottom-left","bottom center":"is-position-bottom-center","bottom right":"is-position-bottom-right"};function k(e){return function(e){return!e||"center center"===e||"center"===e}(e)?"":j[e]}function C(e){if(Array.isArray(e))return e.map(e=>C(e));if("object"==typeof e&&null!==e){const t={};for(let i in e)e.hasOwnProperty(i)&&(t[i]=C(e[i]));return t}return e}const P=[["da/wp-swiper-slide",{slug:"slide-1"}]];async function S(e){const t=new FormData;return t.append("file",e),await wp.apiFetch({path:"/wp/v2/media",method:"POST",body:t})}function M({attributes:e,setAttributes:t}){const[i,s]=(0,w.useState)(""),[o,l]=(0,w.useState)(!0),[n,r]=(0,w.useState)(!1),d=function(e){const{slidesPerView:t,slidesPerGroup:i,slidesPerGroupAuto:s,slidesPerGroupSkip:o,spaceBetween:a,autoSlideWidth:l,autoplay:n,disableOnInteraction:r,pauseOnMouseEnter:d,reverseDirection:p,stopOnLastSlide:c,waitForTransition:u,delay:w,speed:m,loop:g,loopAddBlankSlides:h,loopAdditionalSlides:f,effect:b,navigation:v,mousewheel:y,releaseOnEdges:x,pagination_type:_,clickable_pagination:j,breakpoints:k,freeMode:C,freeModeMinimumVelocity:P,freeModeMomentum:S,freeModeMomentumBounce:M,freeModeMomentumBounceRatio:B,freeModeMomentumRatio:O,freeModeMomentumVelocityRatio:I,freeModeSticky:N,autoHeight:R,direction:A,slidesOffsetBefore:T,slidesOffsetAfter:V}=e,E={slidesPerView:"auto"===t?"auto":parseInt(t,10),slidesPerGroup:i,slidesPerGroupAuto:s,slidesPerGroupSkip:o,navigation:v,pagination:{},delay:w,speed:m,loop:g,direction:A,slidesOffsetBefore:T,slidesOffsetAfter:V,autoHeight:R,spaceBetween:a,releaseOnEdges:x};return l&&(E.autoSlideWidth=!0),y&&x&&(E.mousewheel={releaseOnEdges:"true"===x}),g&&(E.loopAddBlankSlides=h,E.loopAdditionalSlides=f),b&&(E.effect=b,"fade"===b&&(E.fadeEffect={crossFade:!0})),n&&(E.autoplay=!0,null!=w&&(E.autoplay={delay:Number(w)}),r&&(E.autoplay&&!0!==E.autoplay||(E.autoplay={}),E.autoplay.disableOnInteraction=!0),d&&(E.autoplay&&!0!==E.autoplay||(E.autoplay={}),E.autoplay.pauseOnMouseEnter=!0),p&&(E.autoplay&&!0!==E.autoplay||(E.autoplay={}),E.autoplay.reverseDirection=!0),c&&(E.autoplay&&!0!==E.autoplay||(E.autoplay={}),E.autoplay.stopOnLastSlide=!0),null!=u&&(E.autoplay&&!0!==E.autoplay||(E.autoplay={}),E.autoplay.waitForTransition=u)),C&&(E.freeMode={enabled:!0,minimumVelocity:P,momentum:S,momentumBounce:M,momentumBounceRatio:B,momentumRatio:O,momentumVelocityRatio:I,sticky:N}),E.pagination.type="bullets"!==_?_:"bullets",j&&(E.pagination.clickable=!!j||""),void 0!==k&&""!==k&&(E.breakpoints=k),E}(e),p=JSON.stringify(d,null,2);(0,w.useEffect)(()=>{n||s(p)},[p,n]),(0,w.useEffect)(()=>{s(p)},[]);const c={marginTop:"8px",fontSize:"12px",fontStyle:"normal",color:"rgb(117, 117, 117)",marginBottom:"12px"};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(f.BaseControl,{label:(0,m.__)("Swiper Configuration (JSON)","wp-swiper"),help:o?"":(0,m.__)("Invalid JSON format. Please fix the syntax errors.","wp-swiper"),children:(0,a.jsx)("textarea",{value:i,onChange:e=>(e=>{s(e),r(!0);try{JSON.parse(e),l(!0)}catch(e){l(!1)}})(e.target.value),rows:15,style:{width:"100%",fontFamily:"monospace",fontSize:"11px",padding:"8px",border:"1px solid "+(o?"#8c8f94":"#cc1818"),borderRadius:"4px",backgroundColor:o?"#fff":"#fff5f5",resize:"vertical"}})}),(0,a.jsxs)(f.PanelRow,{children:[(0,a.jsx)(f.Button,{variant:"primary",onClick:()=>{if(o)try{const e=JSON.parse(i),s={};void 0!==e.slidesPerView&&(s.slidesPerView=e.slidesPerView),void 0!==e.slidesPerGroup&&(s.slidesPerGroup=e.slidesPerGroup),void 0!==e.slidesPerGroupAuto&&(s.slidesPerGroupAuto=e.slidesPerGroupAuto),void 0!==e.slidesPerGroupSkip&&(s.slidesPerGroupSkip=e.slidesPerGroupSkip),void 0!==e.spaceBetween&&(s.spaceBetween=e.spaceBetween),void 0!==e.autoSlideWidth&&(s.autoSlideWidth=e.autoSlideWidth),void 0!==e.navigation&&(s.navigation=e.navigation),void 0!==e.delay&&(s.delay=e.delay),void 0!==e.speed&&(s.speed=e.speed),void 0!==e.loop&&(s.loop=e.loop),void 0!==e.direction&&(s.direction=e.direction),void 0!==e.slidesOffsetBefore&&(s.slidesOffsetBefore=e.slidesOffsetBefore),void 0!==e.slidesOffsetAfter&&(s.slidesOffsetAfter=e.slidesOffsetAfter),void 0!==e.autoHeight&&(s.autoHeight=e.autoHeight),void 0!==e.releaseOnEdges&&(s.releaseOnEdges=e.releaseOnEdges),void 0!==e.effect&&(s.effect=e.effect),void 0!==e.loopAddBlankSlides&&(s.loopAddBlankSlides=e.loopAddBlankSlides),void 0!==e.loopAdditionalSlides&&(s.loopAdditionalSlides=e.loopAdditionalSlides),void 0!==e.autoplay&&(!0===e.autoplay||"object"==typeof e.autoplay?(s.autoplay=!0,"object"==typeof e.autoplay&&(void 0!==e.autoplay.delay&&(s.delay=e.autoplay.delay),void 0!==e.autoplay.disableOnInteraction&&(s.disableOnInteraction=e.autoplay.disableOnInteraction),void 0!==e.autoplay.pauseOnMouseEnter&&(s.pauseOnMouseEnter=e.autoplay.pauseOnMouseEnter),void 0!==e.autoplay.reverseDirection&&(s.reverseDirection=e.autoplay.reverseDirection),void 0!==e.autoplay.stopOnLastSlide&&(s.stopOnLastSlide=e.autoplay.stopOnLastSlide),void 0!==e.autoplay.waitForTransition&&(s.waitForTransition=e.autoplay.waitForTransition))):s.autoplay=!1),void 0!==e.freeMode&&("object"==typeof e.freeMode&&e.freeMode.enabled?(s.freeMode=!0,void 0!==e.freeMode.minimumVelocity&&(s.freeModeMinimumVelocity=e.freeMode.minimumVelocity),void 0!==e.freeMode.momentum&&(s.freeModeMomentum=e.freeMode.momentum),void 0!==e.freeMode.momentumBounce&&(s.freeModeMomentumBounce=e.freeMode.momentumBounce),void 0!==e.freeMode.momentumBounceRatio&&(s.freeModeMomentumBounceRatio=e.freeMode.momentumBounceRatio),void 0!==e.freeMode.momentumRatio&&(s.freeModeMomentumRatio=e.freeMode.momentumRatio),void 0!==e.freeMode.momentumVelocityRatio&&(s.freeModeMomentumVelocityRatio=e.freeMode.momentumVelocityRatio),void 0!==e.freeMode.sticky&&(s.freeModeSticky=e.freeMode.sticky)):s.freeMode=!1),void 0!==e.pagination&&(void 0!==e.pagination.type&&(s.pagination_type=e.pagination.type),void 0!==e.pagination.clickable&&(s.clickable_pagination=e.pagination.clickable)),void 0!==e.breakpoints&&(s.breakpoints=e.breakpoints),void 0!==e.mousewheel&&(s.mousewheel=!0,"object"==typeof e.mousewheel&&void 0!==e.mousewheel.releaseOnEdges&&(s.releaseOnEdges=e.mousewheel.releaseOnEdges?"true":"false")),t(s),r(!1)}catch(e){console.error("Failed to parse JSON config:",e)}},disabled:!o||!n,style:{marginRight:"8px"},children:(0,m.__)("Apply Changes","wp-swiper")}),(0,a.jsx)(f.Button,{variant:"secondary",onClick:()=>{s(p),r(!1),l(!0)},disabled:!n,children:(0,m.__)("Reset","wp-swiper")})]}),(0,a.jsx)("p",{style:c,children:(0,m.__)('This JSON object represents the Swiper initialization configuration. You can edit properties directly here and click "Apply Changes" to update the slider settings. This is useful for advanced customizations or copying configurations between sliders.',"wp-swiper")}),(0,a.jsxs)("p",{style:c,children:[(0,a.jsx)("strong",{children:(0,m.__)("Tip:","wp-swiper")})," ",(0,m.__)("Changes made here will update the corresponding settings in the sidebar panels. Some nested properties (like autoplay options) will be extracted to their respective settings.","wp-swiper")]})]})}const{__:B}=wp.i18n,{name:O}=e,I={...e,title:B("WP Swiper","@@text_domain"),description:B("Create an awesome slider.","@@text_domain"),icon:(0,a.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M20 17.4444C20 17.857 19.8314 18.2527 19.5314 18.5444C19.2313 18.8361 18.8243 19 18.4 19H5.6C5.17565 19 4.76869 18.8361 4.46863 18.5444C4.16857 18.2527 4 17.857 4 17.4444V6.55556C4 6.143 4.16857 5.74733 4.46863 5.45561C4.76869 5.16389 5.17565 5 5.6 5H9.6L11.2 7.33333H18.4C18.8243 7.33333 19.2313 7.49722 19.5314 7.78894C19.8314 8.08067 20 8.47633 20 8.88889V17.4444Z",stroke:"currentColor",fill:"transparent","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),keywords:[B("swiper","@@text_domain"),B("slider","@@text_domain"),B("wp slider","@@text_domain"),B("wp swiper","@@text_domain")],edit:function({clientId:e,attributes:t,setAttributes:i,className:l}){const n=(0,o.useBlockProps)(),{block:r,isSelectedBlockInRoot:d}=(0,h.useSelect)(t=>{const{getBlock:i,isBlockSelected:s,hasSelectedInnerBlock:a}=t(o.store);return{block:i(e),isSelectedBlockInRoot:s(e)||a(e,!0)}},[e]),{updateBlockAttributes:p,removeBlock:c,replaceInnerBlocks:u}=(0,h.useDispatch)(o.store),{getBlocks:b}=(0,h.useSelect)(e=>({getBlocks:e(o.store).getBlocks}),[]),v=(0,w.useCallback)(e=>{let t=1;e.forEach(e=>{p(e.clientId,{slug:`slide-${t}`}),t++})},[p]),{tabActive:y,buttonsAlign:j,tabsData:k,overlayColor:B,overlayImg:O,overlayImgOpacity:I,autoplay:N,disableOnInteraction:R,pauseOnMouseEnter:A,reverseDirection:T,stopOnLastSlide:V,waitForTransition:E,delay:D,speed:H,loop:F,loopAddBlankSlides:G,loopAdditionalSlides:$,effect:z,slidesPerView:L,slidesPerGroup:W,slidesPerGroupAuto:J,slidesPerGroupSkip:q,spaceBetween:U,autoSlideWidth:Z,navigation:X,pagination:Y,containerWidth:K,mousewheel:Q,releaseOnEdges:ee,pagination_type:te,clickable_pagination:ie,breakpoints:se,freeMode:oe,freeModeMinimumVelocity:ae,freeModeMomentum:le,freeModeMomentumBounce:ne,freeModeMomentumBounceRatio:re,freeModeMomentumRatio:de,freeModeMomentumVelocityRatio:pe,freeModeSticky:ce,thumbs:ue,thumbsSlidesPerView:we,thumbsSpaceBetween:me,autoHeight:ge,sliderHeight:he,debug:fe,direction:be,previousIcon:ve,nextIcon:ye,slidesOffsetBefore:xe,slidesOffsetAfter:_e,overflowVisible:je,navigationColor:ke,paginationColor:Ce}=t,Pe=b(e),Se=(0,w.useCallback)((e,t)=>!(!e||!t||e.length!==t.length)&&e.every((e,i)=>e===t[i]),[]);(0,w.useEffect)(()=>{if(!r?.innerBlocks)return;const e=r.innerBlocks.map(e=>e.attributes.slug),t=k.map(e=>e.slug),s=r.innerBlocks.map(e=>e.attributes.thumbImg),o=k.map(e=>e.thumbImg);let a=0;if(!Se(e,t)||!Se(s,o)){const e=r.innerBlocks.map(e=>(a++,{clientId:e.clientId,slideImg:e.attributes.slideImg,thumbImg:e.attributes.thumbImg,slug:`slide-${a}`}));v(r.innerBlocks),i({tabsData:e})}},[Pe,r,k,Se,v,i]);const[Me,Be]=(0,w.useState)("bottom center"),[Oe,Ie]=(0,w.useState)(!1),[Ne,Re]=(0,w.useState)(!1),Ae=(0,w.useCallback)(e=>{if(r?.innerBlocks)if(r.innerBlocks.length<=1)c(r.clientId);else if(r.innerBlocks[e]&&k[e]){const t=C(k);t.splice(e,1),c(r.innerBlocks[e].clientId);for(let i=e;i<t.length;i++){const e=`slide-${i+1}`;t[i].slug=e,p(t[i].clientId,{slug:e})}i({tabsData:t})}},[r,k,c,p,i]);l=s()(l,"wp-swiper__slides");let Te=j;"start"===Te?Te="left":"end"===Te&&(Te="right");let Ve=1;const Ee=()=>(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)("div",{style:{borderTop:"1px solid #dddddd",marginTop:"16px",marginBottom:"16px",width:"100%"}})});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(o.InspectorControls,{children:[(0,a.jsxs)(f.PanelBody,{title:(0,m.__)("Overlay Settings","wp-swiper"),initialOpen:!1,children:[(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(o.MediaUploadCheck,{children:(0,a.jsx)(o.MediaUpload,{value:O,onSelect:e=>{const t=e.sizes?.full?.url||e.url;i({overlayImg:t})},allowedTypes:["image"],render:({open:e})=>(0,a.jsx)(f.Button,{onClick:e,className:"button",children:(0,m.__)("Select overlay image","wp-swiper")})})})}),O&&(0,a.jsx)(f.PanelRow,{children:_(O)}),O&&(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.Button,{variant:"secondary",size:"small",className:"block-library-cover__reset-button",onClick:()=>i({overlayImg:void 0}),children:(0,m.__)("Clear Media","wp-swiper")})}),O&&(0,a.jsx)(f.BaseControl,{label:(0,m.__)("Image Overlay Opacity","wp-swiper"),children:(0,a.jsx)(f.RangeControl,{label:(0,m.__)("Opacity","wp-swiper"),value:I,onChange:e=>i({overlayImgOpacity:e}),min:0,max:1,step:.01,required:!0})}),(0,a.jsx)(Ee,{}),(0,a.jsx)(f.BaseControl,{label:(0,m.__)("Overlay Color","wp-swiper"),children:(0,a.jsx)(f.ColorPalette,{value:"object"==typeof B?`rgba(${B.rgb.r}, ${B.rgb.g}, ${B.rgb.b}, ${B.rgb.a})`:B,onChange:e=>{i({overlayColor:e}),r.innerBlocks.map(t=>{p(t.clientId,{overlayColor:e})})}})}),B?.rgb?.a>0&&(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.Button,{variant:"secondary",size:"small",className:"block-library-cover__reset-button",onClick:()=>{const e={rgb:{r:0,g:0,b:0,a:0}};i({overlayColor:e}),(r?.innerBlocks||[]).forEach(t=>{p(t.clientId,{overlayColor:e})})},children:(0,m.__)("Clear Color","wp-swiper")})})]}),(0,a.jsxs)(f.PanelBody,{title:(0,m.__)("Color Settings","wp-swiper"),initialOpen:!1,children:[(0,a.jsx)(f.BaseControl,{label:(0,m.__)("Navigation Color","wp-swiper"),children:(0,a.jsx)(f.ColorPalette,{value:ke,onChange:e=>i({navigationColor:e})})}),ke&&(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.Button,{variant:"secondary",size:"small",onClick:()=>i({navigationColor:""}),children:(0,m.__)("Clear Navigation Color","wp-swiper")})}),(0,a.jsx)(Ee,{}),(0,a.jsx)(f.BaseControl,{label:(0,m.__)("Pagination Color","wp-swiper"),children:(0,a.jsx)(f.ColorPalette,{value:Ce,onChange:e=>i({paginationColor:e})})}),Ce&&(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.Button,{variant:"secondary",size:"small",onClick:()=>i({paginationColor:""}),children:(0,m.__)("Clear Pagination Color","wp-swiper")})})]}),(0,a.jsxs)(f.PanelBody,{title:(0,m.__)("Basic Slider Settings","wp-swiper"),icon:"controls-play",initialOpen:!0,children:[!ge&&(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.__experimentalUnitControl,{label:(0,m.__)("Slider Height","wp-swiper"),help:(0,m.__)("Set a fixed height for the slider","wp-swiper"),value:he,onChange:e=>{i({sliderHeight:e})},units:[{value:"px",label:"px",default:500},{value:"vh",label:"vh",default:50},{value:"%",label:"%",default:100},{value:"em",label:"em",default:20}]})}),(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.ToggleControl,{label:(0,m.__)("Auto Height","wp-swiper"),help:(0,m.__)("Slider wrapper will adapt its height to the height of the currently active slide","wp-swiper"),checked:ge,onChange:()=>{i({autoHeight:!ge})}})}),(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.ToggleControl,{label:(0,m.__)("Auto Play","wp-swiper"),checked:N,onChange:()=>{i({autoplay:!N})}})}),(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.ToggleControl,{label:(0,m.__)("Loop","wp-swiper"),checked:F,onChange:()=>{i({loop:!F})}})}),F&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.ToggleControl,{label:(0,m.__)("Loop Add Blank Slides","wp-swiper"),help:(0,m.__)("Automatically adds blank slides if you use Grid or slidesPerGroup and the total amount of slides is not even to slidesPerGroup or to grid.rows","wp-swiper"),checked:G,onChange:()=>{i({loopAddBlankSlides:!G})}})}),(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.TextControl,{label:(0,m.__)("Loop Additional Slides","wp-swiper"),help:(0,m.__)("Allows to increase amount of looped slides","wp-swiper"),value:$,type:"number",onChange:e=>{i({loopAdditionalSlides:parseInt(e)})}})})]}),(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.TextControl,{label:(0,m.__)("Speed","wp-swiper"),help:(0,m.__)("Duration of transition between slides (in ms)","wp-swiper"),value:H,type:"number",onChange:e=>{i({speed:parseInt(e)})}})}),(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.TextControl,{label:(0,m.__)("Delay","wp-swiper"),help:(0,m.__)("Delay between transitions (in ms)","wp-swiper"),value:D,type:"number",onChange:e=>{i({delay:parseInt(e)})}})}),(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.RangeControl,{label:(0,m.__)("Container Max Width %","wp-swiper"),help:(0,m.__)("Frontend: Set the max width for the content with text.","wp-swiper"),value:K,onChange:e=>{i({containerWidth:e}),(r?.innerBlocks||[]).forEach(t=>{p(t.clientId,{containerWidth:e})})},min:1,max:100,step:1,required:!0})}),(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.ToggleControl,{label:(0,m.__)("Overflow Visible","wp-swiper"),help:(0,m.__)("Apply overflow visible to the swiper container","wp-swiper"),checked:je,onChange:()=>{i({overflowVisible:!je})}})})]}),(0,a.jsxs)(f.PanelBody,{title:(0,m.__)("Slides Configuration","wp-swiper"),icon:"grid-view",initialOpen:!1,children:[(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.TextControl,{label:(0,m.__)("Slides per view","wp-swiper"),help:(0,m.__)("Number of slides per view (slides visible at the same time on slider's container). Can be a number or auto","wp-swiper"),value:L,onChange:e=>{i({slidesPerView:e})}})}),(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.TextControl,{label:(0,m.__)("Slides Per Group","wp-swiper"),help:(0,m.__)("Set numbers of slides to define and enable group sliding. Useful to use with slidesPerView > 1","wp-swiper"),value:W,type:"number",onChange:e=>{i({slidesPerGroup:parseInt(e)})}})}),(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.ToggleControl,{label:(0,m.__)("Slides Per Group Auto","wp-swiper"),help:(0,m.__)("This param intended to be used only with slidesPerView: 'auto' and slidesPerGroup: 1. When enabled, it will skip all slides in view on .slideNext() & .slidePrev() methods calls, on Navigation buttons clicks and in autoplay.","wp-swiper"),checked:J,onChange:()=>{i({slidesPerGroupAuto:!J})}})}),(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.TextControl,{label:(0,m.__)("Slides Per Group Skip","wp-swiper"),help:(0,m.__)("If slidesPerGroupSkip equals 0 (default), no slides are excluded from grouping. If slidesPerGroupSkip is equal or greater than 1, the first X slides are treated as single groups, whereas all following slides are grouped by the slidesPerGroup value.","wp-swiper"),value:q,type:"number",onChange:e=>{i({slidesPerGroupSkip:parseInt(e)})}})}),(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.TextControl,{label:(0,m.__)("Space Between","wp-swiper"),help:(0,m.__)("Distance between slides in px.","wp-swiper"),value:U,onChange:e=>{i({spaceBetween:parseInt(e)})}})}),(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.ToggleControl,{label:(0,m.__)("Auto Slide Width","wp-swiper"),help:(0,m.__)("Makes each slide size itself based on its content instead of being evenly distributed. Useful for logos, badges, small cards, or any element that should not be stretched.","wp-swiper"),checked:Z,onChange:()=>{i({autoSlideWidth:!Z})}})}),(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.TextControl,{label:(0,m.__)("Slides Offset Before","wp-swiper"),help:(0,m.__)("Add (in px) additional slide offset in the beginning of the container (before all slides)","wp-swiper"),value:xe,onChange:e=>{i({slidesOffsetBefore:parseInt(e)})}})}),(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.TextControl,{label:(0,m.__)("Slides Offset After","wp-swiper"),help:(0,m.__)("Add (in px) additional slide offset in the end of the container (after all slides)","wp-swiper"),value:_e,onChange:e=>{i({slidesOffsetAfter:parseInt(e)})}})})]}),(0,a.jsxs)(f.PanelBody,{title:(0,m.__)("Navigation & Controls","wp-swiper"),icon:"leftright",initialOpen:!1,children:[(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.ToggleControl,{label:(0,m.__)("Show Navigation","wp-swiper"),checked:X,onChange:()=>{i({navigation:!X})}})}),X&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)("p",{children:(0,m.__)("You can customize icons by uploading your own. Default icons used otherwise.","wp-swiper")})}),(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(o.MediaUploadCheck,{children:(0,a.jsx)(o.MediaUpload,{value:ve,onSelect:e=>{const t=e.sizes?.full?.url||e.url;i({previousIcon:t})},allowedTypes:["image"],render:({open:e})=>(0,a.jsx)(f.Button,{onClick:e,className:"button",children:(0,m.__)("Select previous slide icon","wp-swiper")})})})}),ve&&(0,a.jsx)(f.PanelRow,{children:_(ve)}),ve&&(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.Button,{variant:"secondary",size:"small",className:"block-library-cover__reset-button",onClick:()=>i({previousIcon:void 0}),children:(0,m.__)("Clear Media","wp-swiper")})}),(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(o.MediaUploadCheck,{children:(0,a.jsx)(o.MediaUpload,{value:ye,onSelect:e=>{const t=e.sizes?.full?.url||e.url;i({nextIcon:t})},allowedTypes:["image"],render:({open:e})=>(0,a.jsx)(f.Button,{onClick:e,className:"button",children:(0,m.__)("Select next slide icon","wp-swiper")})})})}),ye&&(0,a.jsx)(f.PanelRow,{children:_(ye)}),ye&&(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.Button,{variant:"secondary",size:"small",className:"block-library-cover__reset-button",onClick:()=>i({nextIcon:void 0}),children:(0,m.__)("Clear Media","wp-swiper")})})]}),(0,a.jsx)(Ee,{}),(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.ToggleControl,{label:(0,m.__)("Show Pagination","wp-swiper"),checked:Y,onChange:()=>{i({pagination:!Y})}})}),Y&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.SelectControl,{label:(0,m.__)("Type of pagination","wp-swiper"),value:te,options:[{label:(0,m.__)("Bullets","wp-swiper"),value:"bullets"},{label:(0,m.__)("Fraction","wp-swiper"),value:"fraction"},{label:(0,m.__)("Progress Bar","wp-swiper"),value:"progressbar"}],onChange:e=>{i({pagination_type:e})}})}),(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.ToggleControl,{label:(0,m.__)("Clickable Pagination","wp-swiper"),checked:ie,onChange:()=>{i({clickable_pagination:!ie})}})})]})]}),(0,a.jsx)(f.PanelBody,{title:(0,m.__)("Direction Settings","wp-swiper"),icon:"sort",initialOpen:!1,children:(0,a.jsx)(f.SelectControl,{label:(0,m.__)("Direction","wp-swiper"),help:(0,m.__)("For vertical slider, Slides Per View should be set to 1","wp-swiper"),value:be,options:[{label:(0,m.__)("Horizontal","wp-swiper"),value:"horizontal"},{label:(0,m.__)("Vertical","wp-swiper"),value:"vertical"}],onChange:e=>{i({direction:e})}})}),(0,a.jsxs)(f.PanelBody,{title:(0,m.__)("Autoplay Behavior","wp-swiper"),icon:"controls-repeat",initialOpen:!1,children:[(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.ToggleControl,{label:(0,m.__)("Disable On Interaction","wp-swiper"),checked:R,help:(0,m.__)("Set to false and autoplay will not be disabled after user interactions (swipes), it will be restarted every time after interaction","wp-swiper"),onChange:()=>{i({disableOnInteraction:!R})}})}),(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.ToggleControl,{label:(0,m.__)("Pause On Mouse Enter","wp-swiper"),checked:A,help:(0,m.__)("When enabled autoplay will be paused on pointer (mouse) enter over Swiper container.","wp-swiper"),onChange:()=>{i({pauseOnMouseEnter:!A})}})}),(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.ToggleControl,{label:(0,m.__)("Reverse Direction","wp-swiper"),checked:T,help:(0,m.__)("Enables autoplay in reverse direction","wp-swiper"),onChange:()=>{i({reverseDirection:!T})}})}),(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.ToggleControl,{label:(0,m.__)("Stop On Last Slide","wp-swiper"),checked:V,help:(0,m.__)("Enable this parameter and autoplay will be stopped when it reaches last slide (has no effect in loop mode)","wp-swiper"),onChange:()=>{i({stopOnLastSlide:!V})}})}),(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.ToggleControl,{label:(0,m.__)("Wait For Transition","wp-swiper"),checked:E,help:(0,m.__)("When enabled autoplay will wait for wrapper transition to continue. Can be disabled in case of using Virtual Translate when your slider may not have transition","wp-swiper"),onChange:()=>{i({waitForTransition:!E})}})})]}),(0,a.jsxs)(f.PanelBody,{title:(0,m.__)("Advanced Features","wp-swiper"),icon:"admin-generic",initialOpen:!1,children:[(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.SelectControl,{label:(0,m.__)("Effect (Under Construction)","wp-swiper"),value:z,options:[{label:(0,m.__)("Slide","wp-swiper"),value:"slide"},{label:(0,m.__)("Fade","wp-swiper"),value:"fade"},{label:(0,m.__)("Cube","wp-swiper"),value:"cube"},{label:(0,m.__)("Coverflow","wp-swiper"),value:"coverflow"},{label:(0,m.__)("Flip","wp-swiper"),value:"flip"}],onChange:e=>{i({effect:e})}})}),(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.ToggleControl,{label:(0,m.__)("Mouse Wheel","wp-swiper"),help:(0,m.__)("Enables navigation through slides using mouse wheel.","wp-swiper"),checked:Q,onChange:()=>{i({mousewheel:!Q})}})}),(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.ToggleControl,{label:(0,m.__)("Release On Edges","wp-swiper"),help:(0,m.__)("Set to true and swiper will release mousewheel event and allow page scrolling when swiper is on edge positions (in the beginning or in the end) NOTE: Mouse Wheel must be set to true for this to work.","wp-swiper"),checked:ee,onChange:()=>{i({releaseOnEdges:!ee})}})})]}),(0,a.jsxs)(f.PanelBody,{title:(0,m.__)("Free Mode","wp-swiper"),icon:"controls-play",initialOpen:!1,children:[(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.ToggleControl,{label:(0,m.__)("Enable Free Mode","wp-swiper"),help:(0,m.__)("Whether the free mode is enabled. Slide will continue moving for a while after you release it.","wp-swiper"),checked:oe,onChange:()=>{oe&&i({freeModeSticky:!1}),i({freeMode:!oe})}})}),oe&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.RangeControl,{label:(0,m.__)("Minimum Velocity","wp-swiper"),help:(0,m.__)("Minimum touchmove-velocity required to trigger free mode momentum","wp-swiper"),value:ae,onChange:e=>{i({freeModeMinimumVelocity:e})},min:0,max:1,step:.01})}),(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.ToggleControl,{label:(0,m.__)("Momentum","wp-swiper"),help:(0,m.__)("If enabled, then slide will keep moving for a while after you release it","wp-swiper"),checked:le,onChange:()=>{i({freeModeMomentum:!le})}})}),(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.ToggleControl,{label:(0,m.__)("Momentum Bounce","wp-swiper"),help:(0,m.__)("Set to false if you want to disable momentum bounce in free mode","wp-swiper"),checked:ne,onChange:()=>{i({freeModeMomentumBounce:!ne})}})}),(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.RangeControl,{label:(0,m.__)("Momentum Bounce Ratio","wp-swiper"),help:(0,m.__)("Higher value produces larger momentum bounce effect","wp-swiper"),value:re,onChange:e=>{i({freeModeMomentumBounceRatio:e})},min:0,max:10,step:.1})}),(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.RangeControl,{label:(0,m.__)("Momentum Ratio","wp-swiper"),help:(0,m.__)("Higher value produces larger momentum distance after you release slider","wp-swiper"),value:de,onChange:e=>{i({freeModeMomentumRatio:e})},min:0,max:10,step:.1})}),(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.RangeControl,{label:(0,m.__)("Momentum Velocity Ratio","wp-swiper"),help:(0,m.__)("Higher value produces larger momentum velocity after you release slider","wp-swiper"),value:pe,onChange:e=>{i({freeModeMomentumVelocityRatio:e})},min:0,max:10,step:.1})}),(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.ToggleControl,{label:(0,m.__)("Sticky","wp-swiper"),help:(0,m.__)("Set to enabled to enable snap to slides positions in free mode","wp-swiper"),checked:ce,onChange:()=>{i({freeModeSticky:!ce})}})})]})]}),(0,a.jsxs)(f.PanelBody,{title:(0,m.__)("Responsive Breakpoints","wp-swiper"),icon:"smartphone",initialOpen:!1,children:[(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.TextareaControl,{label:(0,m.__)("Responsive breakpoints (JSON Object)","wp-swiper"),help:(0,m.__)("Allows to set different parameter for different responsive breakpoints (screen sizes). Not all parameters can be changed in breakpoints, only those which are not required different layout and logic, like slidesPerView, slidesPerGroup, spaceBetween, grid.rows. Such parameters like loop and effect won't work","wp-swiper"),value:se,onChange:e=>{i({breakpoints:e})}})}),(0,a.jsx)(f.PanelRow,{children:(0,a.jsxs)("p",{children:[(0,m.__)("Example:","wp-swiper")," ",'{"720":{"slidesPerView":2}}'," - ",(0,m.__)("Notice the double quotes","wp-swiper")]})})]}),(0,a.jsxs)(f.PanelBody,{title:(0,m.__)("Thumbnails","wp-swiper"),icon:"images-alt2",initialOpen:!1,children:[(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.ToggleControl,{label:(0,m.__)("Thumbs","wp-swiper"),help:(0,m.__)("Enables thumbs to be used as pagination.","wp-swiper"),checked:ue,onChange:()=>{i({thumbs:!ue})}})}),ue&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.TextControl,{label:(0,m.__)("Space Between","wp-swiper"),help:(0,m.__)("Distance between slides in px.","wp-swiper"),value:me,onChange:e=>{i({thumbsSpaceBetween:parseInt(e)})}})}),(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.TextControl,{label:(0,m.__)("Thumbs per view","wp-swiper"),help:(0,m.__)("Number of slides per view (slides visible at the same time on slider's container). Can be a number or auto","wp-swiper"),value:we,onChange:e=>{i({thumbsSlidesPerView:parseInt(e)})}})}),(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.__experimentalAlignmentMatrixControl,{disableAlignment:["center"],value:Me,onChange:e=>Be(e)})})]})]}),(0,a.jsxs)(f.PanelBody,{title:(0,m.__)("Developer Tools","wp-swiper"),icon:"admin-tools",initialOpen:!1,children:[(0,a.jsx)(f.ToggleControl,{label:(0,m.__)("Debug","wp-swiper"),help:(0,m.__)("Show (console.log) config JSON object for each slider","wp-swiper"),checked:fe,onChange:()=>{i({debug:!fe})}}),(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.Button,{onClick:()=>{let e=1;k.forEach(t=>{t.slug=`slide-${e}`,e++}),i({tabsData:k}),v(r?.innerBlocks||[])},className:"button",children:(0,m.__)("Fix Slide Slugs","wp-swiper")})}),(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)("p",{style:{marginTop:"calc(8px)",fontSize:"12px",fontStyle:"normal",color:"rgb(117, 117, 117)",marginBottom:"revert"},children:(0,m.__)("On rare occasions, if the slide slugs become out of sync with the slide data stored in the parent block, you might notice all slide contents appearing under a single tab. Clicking this button could help resolve the issue. This action iterates over each slide and resets the slugs in ascending order (e.g., slide-1, slide-2, etc.), ensuring that each tab properly corresponds to its respective slide.","wp-swiper")})}),(0,a.jsx)(M,{attributes:t,setAttributes:i})]})]}),(0,a.jsx)("div",{...n,className:s()(n.className,l),"data-tab-active":y,children:(0,a.jsxs)("div",{className:"wb-tabs-buttons-wrapper",children:[(0,a.jsxs)("div",{className:s()("wb-tabs-buttons",`wb-tabs-buttons-align-${j}`),children:[k.map((e,t)=>{const{slug:o}=e,l=y===o;return(0,a.jsxs)("div",{className:s()("wb-tabs-buttons-item",l?"wb-tabs-buttons-item-active":""),onClick:()=>i({tabActive:o}),children:[(0,a.jsxs)("h4",{children:[(0,m.__)("Slide","wp-swiper")," ",Ve++]}),(0,a.jsx)(x,{show:d,tooltipText:(0,m.__)("Remove slide?","wp-swiper"),onRemove:()=>{Ae(t)}})]},`tab_button_${e.slug}`)}),d?(0,a.jsx)(f.Tooltip,{text:(0,m.__)("Add Slide","wp-swiper"),children:(0,a.jsx)(f.Button,{icon:"insert",onClick:()=>{const t=k.length+1,s=(0,g.createBlock)("da/wp-swiper-slide",{slug:`slide-${t}`}),o=[...k,{clientId:s.clientId,slug:`slide-${t}`,slideImg:"",thumbImg:""}],a=[...b(e),s];u(e,a,!1),i({tabsData:o})}})}):""]}),(0,a.jsx)("div",{className:"wp-swiper__slide-content",children:(0,a.jsx)(o.InnerBlocks,{template:P,templateLock:!1,allowedBlocks:["da/wp-swiper-slide"]})}),(0,a.jsxs)("div",{className:s()("wp-swiper__drop-zone-wrapper",{"is-dragging-over":Oe,"is-uploading":Ne}),children:[(0,a.jsx)(f.DropZone,{onFilesDrop:async t=>{if(!t||0===t.length)return;const s=Array.from(t).filter(e=>e.type.startsWith("image/"));if(0!==s.length){Re(!0),Ie(!1);try{const t=1===k.length&&!k[0].slideImg&&r?.innerBlocks?.[0]&&!r.innerBlocks[0].attributes.slideImg;let o=0,a=[...k],l=[...b(e)];if(t&&s.length>0){const e=s[0],t=await S(e),i=t.source_url||t.media_details?.sizes?.full?.source_url||"",n=t.media_details?.sizes?.thumbnail?.source_url||t.media_details?.sizes?.medium?.source_url||i,r=l[0],d=(0,g.createBlock)("da/wp-swiper-slide",{...r.attributes,slug:"slide-1",slideImg:i,slideImgId:t.id,thumbImg:n},r.innerBlocks);l[0]=d,a[0]={clientId:d.clientId,slug:"slide-1",slideImg:i,thumbImg:n},o=1}for(let e=o;e<s.length;e++){const t=s[e],i=await S(t),o=i.source_url||i.media_details?.sizes?.full?.source_url||"",n=i.media_details?.sizes?.thumbnail?.source_url||i.media_details?.sizes?.medium?.source_url||o,r=a.length+1,d=(0,g.createBlock)("da/wp-swiper-slide",{slug:`slide-${r}`,slideImg:o,slideImgId:i.id,thumbImg:n});a=[...a,{clientId:d.clientId,slug:`slide-${r}`,slideImg:o,thumbImg:n}],l=[...l,d]}l.length>0&&(u(e,l,!1),i({tabsData:a,tabActive:1===o?"slide-1":`slide-${a.length}`}))}catch(e){console.error("Error uploading images:",e)}finally{Re(!1)}}},onDragEnter:()=>Ie(!0),onDragLeave:()=>Ie(!1)}),(0,a.jsx)("div",{className:"wp-swiper__drop-zone-content",children:Ne?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("svg",{className:"wp-swiper__drop-zone-spinner",width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z",opacity:"0.3"}),(0,a.jsx)("path",{d:"M12 2v4c3.31 0 6 2.69 6 6h4c0-5.52-4.48-10-10-10z",children:(0,a.jsx)("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",from:"0 12 12",to:"360 12 12",dur:"1s",repeatCount:"indefinite"})})]}),(0,a.jsx)("p",{children:(0,m.__)("Uploading images...","wp-swiper")})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("svg",{width:"48",height:"48",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",children:(0,a.jsx)("path",{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"})}),(0,a.jsx)("p",{children:(0,m.__)("Drop images here to create slides","wp-swiper")})]})})]})]})}),(0,a.jsx)("style",{children:`\n\t\t\t\t\t\t[data-block="${e}"] [data-tab] {\n\t\t\t\t\t\t\tdisplay: none;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t[data-block="${e}"] [data-tab="${null!=y?y:"slide-1"}"] {\n\t\t\t\t\t\t\tdisplay: flex !important;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t`})]})},save:function(e){let{className:t}=e.attributes;const{align:i,overlayImg:l,overlayImgOpacity:n,slidesPerView:r,slidesPerGroup:d,slidesPerGroupAuto:p,slidesPerGroupSkip:c,spaceBetween:u,autoSlideWidth:w,autoplay:m,disableOnInteraction:g,pauseOnMouseEnter:h,reverseDirection:f,stopOnLastSlide:b,waitForTransition:v,delay:y,speed:x,loop:_,loopAddBlankSlides:j,loopAdditionalSlides:k,effect:C,navigation:P,pagination:S,mousewheel:M,releaseOnEdges:B,pagination_type:O,clickable_pagination:I,breakpoints:N,thumbs:R,thumbsSpaceBetween:A,thumbsSlidesPerView:T,autoHeight:V,sliderHeight:E,freeMode:D,freeModeMinimumVelocity:H,freeModeMomentum:F,freeModeMomentumBounce:G,freeModeMomentumBounceRatio:$,freeModeMomentumRatio:z,freeModeMomentumVelocityRatio:L,freeModeSticky:W,debug:J,direction:q,tabsData:U,previousIcon:Z,nextIcon:X,slidesOffsetBefore:Y,slidesOffsetAfter:K,overflowVisible:Q,navigationColor:ee,paginationColor:te}=e.attributes;t=s()(t,"wp-swiper"),i&&(t=s()(t,`align${i}`));const ie={};ee&&(ie["--wp-swiper-navigation-color"]=ee),te&&(ie["--wp-swiper-pagination-color"]=te);const se=o.useBlockProps.save({className:t,style:ie}),oe=(o.useInnerBlocksProps,l?{backgroundImage:`url(${l})`}:{});n&&(oe.opacity=n);let ae={"data-thumbs":{}},le={slidesPerView:"auto"===r?"auto":parseInt(r,10),slidesPerGroup:d,slidesPerGroupAuto:p,slidesPerGroupSkip:c,navigation:P,pagination:{},delay:y,speed:x,loop:_,direction:q,slidesOffsetBefore:Y,slidesOffsetAfter:K,autoHeight:V,spaceBetween:u,releaseOnEdges:B};w&&(le.autoSlideWidth=!0),M&&B&&(le.mousewheel={releaseOnEdges:"true"===B}),_&&(le.loopAddBlankSlides=j,le.loopAdditionalSlides=k),C&&(le.effect=C,"fade"===C&&(le.fadeEffect={crossFade:!0})),m&&(le.autoplay=!0,null!=y&&(le.autoplay={delay:Number(y)}),g&&(le.autoplay||(le.autoplay={}),le.autoplay.disableOnInteraction=!0),h&&(le.autoplay||(le.autoplay={}),le.autoplay.pauseOnMouseEnter=!0),f&&(le.autoplay||(le.autoplay={}),le.autoplay.reverseDirection=!0),b&&(le.autoplay||(le.autoplay={}),le.autoplay.stopOnLastSlide=!0),null!=v&&(le.autoplay||(le.autoplay={}),le.autoplay.waitForTransition=v)),D&&(le.freeMode={enabled:!0,minimumVelocity:H,momentum:F,momentumBounce:G,momentumBounceRatio:$,momentumRatio:z,momentumVelocityRatio:L,sticky:W}),le.pagination.type="bullets"!=O?O:"bullets",I&&(le.pagination.clickable=!!I||""),void 0!==N&&""!=N&&(le.breakpoints=N),R&&(ae["data-thumbs"]=JSON.stringify({spaceBetween:A,slidesPerView:T,freeMode:!0,watchSlidesProgress:!0,navigation:!1}));const ne=(void 0!==U?U:[]).map((e,t)=>(e.thumbImg||e.slideImg)&&(0,a.jsx)("div",{className:"swiper-slide wp-swiper__thumb","data-thumb":t+1,children:(0,a.jsx)("img",{src:e.thumbImg||e.slideImg,alt:`Thumbnail ${t+1}`})},t)),re=s()("swiper-container","swiper",{"swiper-overflow-visible":Q}),de={};return E&&!V&&(de.height=E),(0,a.jsxs)("div",{...se,children:[function(e,t){if(void 0!==e)return(0,a.jsx)("div",{className:"wp-swiper__overlay-img",style:t})}(l,oe),(0,a.jsxs)("div",{className:"wp-swiper__wrapper",children:[(0,a.jsx)("div",{className:re,style:Object.keys(de).length>0?de:void 0,...J?{"data-debug":!0}:{},"data-swiper":JSON.stringify(le),...ae,children:(0,a.jsx)("div",{className:"swiper-wrapper",children:(0,a.jsx)(o.InnerBlocks.Content,{})})}),function({attributes:e}){const{navigation:t}=e;if(t)return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:"wp_swiper__navigation",children:(0,a.jsxs)("div",{className:"wp_swiper__navigation-container",children:[(0,a.jsx)("div",{className:"swiper-button-prev "+(Z?"wp_swiper__button-prev":""),children:Z?(0,a.jsx)("img",{src:Z,alt:"Previous"}):null}),(0,a.jsx)("div",{className:"swiper-button-next "+(X?"wp_swiper__button-next":""),children:X?(0,a.jsx)("img",{src:X,alt:"Previous"}):null})]})})})}(e),function({attributes:e}){const{pagination:t}=e;if(t)return(0,a.jsx)("div",{className:"swiper-pagination"})}(e)]}),function({attributes:e}){let{className:t}=e;if(t=t?t.toString():"",-1!==t.indexOf("is-style-testimonials"))return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:"wp-swiper__quotes",children:(0,a.jsx)("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"quote-right",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",class:"svg-inline--fa fa-quote-right fa-w-16 fa-5x",children:(0,a.jsx)("path",{fill:"currentColor",d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z",class:""})})})})}(e),R&&(0,a.jsx)("div",{className:"wp-swiper__thumbs",children:(0,a.jsx)("div",{className:"wp-swiper__wrapper",children:(0,a.jsx)("div",{className:"swiper-container",children:(0,a.jsx)("div",{className:"swiper-wrapper",children:ne})})})})]})},deprecated:u};I.attributes={...I.attributes,freeMode:{type:"boolean",default:!1},freeModeMinimumVelocity:{type:"number",default:.02},freeModeMomentum:{type:"boolean",default:!0},freeModeMomentumBounce:{type:"boolean",default:!0},freeModeMomentumBounceRatio:{type:"number",default:1},freeModeMomentumRatio:{type:"number",default:1},freeModeMomentumVelocityRatio:{type:"number",default:1},freeModeSticky:{type:"boolean",default:!1},mousewheel:{type:"boolean",default:!1},releaseOnEdges:{type:"boolean",default:!1},pagination_type:{type:"string",default:"bullets"}};const N=JSON.parse('{"apiVersion":3,"name":"da/wp-swiper-slide","icon":{"src":"<svg viewBox=\'0 0 24 24\' xmlns=\'http://www.w3.org/2000/svg\'><rect x=\'3\' y=\'5\' width=\'18\' height=\'14\' rx=\'2\' fill=\'none\' stroke=\'currentColor\' stroke-width=\'2\'/><circle cx=\'8\' cy=\'10\' r=\'1.5\' fill=\'currentColor\'/><path d=\'M3 15 L8 11 L12 14 L16 10 L21 14 L21 17 C21 18.1 20.1 19 19 19 L5 19 C3.9 19 3 18.1 3 17 Z\' fill=\'currentColor\' opacity=\'0.4\'/></svg>"},"parent":["da/wp-swiper-slides"],"category":"media","supports":{"html":false,"className":false,"anchor":true,"inserter":false,"reusable":false},"attributes":{"align":{"type":"string","default":"undefined"},"slideImgId":{"type":"number"},"slideImg":{"type":"string"},"thumbImg":{"type":"string"},"slug":{"type":"string"},"contentValign":{"type":"string","default":""},"contentHalign":{"type":"string","default":""},"contentVHalign":{"type":"string"},"focalPoint":{"type":"object","default":{"x":0.5,"y":0.5}},"overlayColor":{"type":"object","default":{"rgb":{"r":0,"g":0,"b":0,"a":0}}},"containerWidth":{"type":"number"}}}'),R=window.wp.keycodes,A=function(e){const{label:t=(0,m.__)("Change matrix alignment"),onChange:i="undefined",value:s="center",isDisabled:o}=e,l=(0,a.jsx)(f.__experimentalAlignmentMatrixControl.Icon,{value:s}),n="block-editor-block-alignment-matrix-control",r=`${n}__popover`;return(0,a.jsx)(f.Dropdown,{placement:"bottom right",className:n,popoverProps:{className:r,isAlternate:!0},renderToggle:({onToggle:e,isOpen:i})=>(0,a.jsx)(f.ToolbarButton,{onClick:e,"aria-haspopup":"true","aria-expanded":i,onKeyDown:t=>{i||t.keyCode!==R.DOWN||(t.preventDefault(),t.stopPropagation(),e())},label:t,icon:l,showTooltip:!0,disabled:o}),renderContent:()=>(0,a.jsx)(f.__experimentalAlignmentMatrixControl,{hasFocusBorder:!1,onChange:i,value:s})})},T=window.React,{applyFilters:V}=wp.hooks,{Component:E}=wp.element,{InnerBlocks:D}=wp.blockEditor,{name:H}=N,F=class extends E{render(){const{overlayColor:e,slug:t,slideImg:i,contentVHalign:o,containerWidth:l}=this.props.attributes;let n="wp-swiper__slide swiper-slide";""!=o&&void 0!==o&&(n=s()(n,k(o)));const r=i?{backgroundImage:`url(${i})`,backgroundSize:"cover"}:{},d=l?{maxWidth:`${l}%`}:null,p=e?{backgroundColor:`rgba(${e.rgb.r}, ${e.rgb.g}, ${e.rgb.b}, ${e.rgb.a})`}:{};return(0,a.jsxs)("div",{className:n,"data-tab":t,style:r,children:[(0,a.jsx)("div",{className:"wp-swiper__overlay-color",style:p}),(0,a.jsx)("div",{className:"wp-swiper__slide-content",style:d,children:(0,a.jsx)(D.Content,{})})]})}},{focalPoint:G,...$}=N.attributes,z=[{supports:N.supports,attributes:{...$},save:F,migrate:e=>({...e,focalPoint:{x:.5,y:.5}})},{supports:N.supports,attributes:{...N.attributes},save:F}],{__:L}=wp.i18n,{name:W}=N,J={...N,title:L("Slide","@@text_domain"),description:L("A single slide within a wp-swiper block.","@@text_domain"),icon:(0,a.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2",stroke:"currentColor",fill:"transparent","stroke-width":"1.5"}),(0,a.jsx)("circle",{cx:"8",cy:"10",r:"1.5",fill:"currentColor"}),(0,a.jsx)("path",{d:"M3 15 L8 11 L12 14 L16 10 L21 14 L21 17 C21 18.1 20.1 19 19 19 L5 19 C3.9 19 3 18.1 3 17 Z",fill:"currentColor",opacity:"0.4"})]}),getEditWrapperProps:e=>({"data-tab":e.slug}),edit:function({attributes:e,setAttributes:t,clientId:i}){const{slideImg:l,thumbImg:n,overlayColor:r,contentVHalign:d,slug:p,focalPoint:c}=e,u=(0,h.useSelect)(e=>e(o.store).getBlockOrder(i).length>0,[i]),g=(0,w.useCallback)(e=>{const i=e?.sizes?.full?.url||e?.url;i&&t({slideImg:i})},[t]),b=(0,w.useCallback)(e=>{const i=e?.sizes?.full?.url||e?.url;i&&t({thumbImg:i})},[t]),v=(0,w.useCallback)(e=>{t({focalPoint:e})},[t]),y=(0,w.useCallback)(()=>{t({slideImg:void 0})},[t]),x=(0,w.useCallback)(()=>{t({thumbImg:void 0})},[t]),_=(0,w.useMemo)(()=>{let e=s()("wp-swiper__slide",{"has-image":Boolean(l)});return e=s()(e,k(d)),e},[l,d]),j=(0,o.useBlockProps)({className:_,"data-tab":p}),C=(0,w.useMemo)(()=>{var e,t;return l?{backgroundImage:`url(${l})`,backgroundPosition:`${100*(null!==(e=c?.x)&&void 0!==e?e:.5)}% ${100*(null!==(t=c?.y)&&void 0!==t?t:.5)}%`}:{}},[l,c]),P=(0,w.useMemo)(()=>{if(!r?.rgb)return{};const{r:e,g:t,b:i,a:s}=r.rgb;return{backgroundColor:`rgba(${e}, ${t}, ${i}, ${s})`}},[r]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.InspectorControls,{children:(0,a.jsxs)(f.PanelBody,{title:(0,m.__)("Image Settings","wp-swiper"),children:[(0,a.jsxs)(f.BaseControl,{label:(0,m.__)("Slide Image","wp-swiper"),children:[(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(o.MediaUploadCheck,{children:(0,a.jsx)(o.MediaUpload,{value:l,onSelect:g,allowedTypes:["image"],render:({open:e})=>(0,a.jsx)(f.Button,{onClick:e,variant:"secondary",children:(0,m.__)("Select slide image","wp-swiper")})})})}),l&&(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.FocalPointPicker,{url:l,value:c,onDragStart:v,onDrag:v,onChange:v})}),l&&(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.Button,{variant:"secondary",size:"small",className:"block-library-cover__reset-button",onClick:y,children:(0,m.__)("Clear Media","wp-swiper")})})]}),(0,a.jsxs)(f.BaseControl,{label:(0,m.__)("Thumbnail Image","wp-swiper"),children:[(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(o.MediaUploadCheck,{children:(0,a.jsx)(o.MediaUpload,{value:n,onSelect:b,allowedTypes:["image"],render:({open:e})=>(0,a.jsx)(f.Button,{onClick:e,variant:"secondary",children:(0,m.__)("Select thumb image","wp-swiper")})})})}),n&&(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.FocalPointPicker,{url:n,value:c,onDragStart:v,onDrag:v,onChange:v})}),n&&(0,a.jsx)(f.PanelRow,{children:(0,a.jsx)(f.Button,{variant:"secondary",size:"small",className:"block-library-cover__reset-button",onClick:x,children:(0,m.__)("Clear Media","wp-swiper")})})]})]})}),(0,a.jsx)(o.BlockControls,{group:"block",children:(0,a.jsx)(A,{label:(0,m.__)("Change content position","wp-swiper"),value:d,onChange:e=>t({contentVHalign:e})})}),(0,a.jsxs)("div",{...j,children:[l&&(0,a.jsx)("div",{className:"wp-swiper__slide-overlay wp-swiper__slide-overlay--image",style:C}),r?.rgb?.a>0&&(0,a.jsx)("div",{className:"wp-swiper__slide-overlay wp-swiper__slide-overlay--color",style:P}),(0,a.jsx)(o.InnerBlocks,{renderAppender:u?void 0:o.InnerBlocks.ButtonBlockAppender})]})]})},save:function(e){const{attributes:t}=e,{overlayColor:i,slug:l,slideImg:n,contentVHalign:r,containerWidth:d,focalPoint:p}=t;let c="wp-swiper__slide swiper-slide";""!=r&&void 0!==r&&(c=s()(c,k(r)));const u=n?{backgroundImage:`url(${n})`,backgroundSize:"cover",backgroundPosition:`${100*p.x}% ${100*p.y}%`}:{},w=d?{maxWidth:`${d}%`}:null,m=i?{backgroundColor:`rgba(${i.rgb.r}, ${i.rgb.g}, ${i.rgb.b}, ${i.rgb.a})`}:null,g=o.useBlockProps.save();return(0,T.createElement)("div",{...g,key:l,"data-tab":l,className:c,style:u},(0,a.jsx)("div",{className:"wp-swiper__overlay-color",...m&&{style:m}}),(0,a.jsx)("div",{className:"wp-swiper__slide-content",style:w,children:(0,a.jsx)(o.InnerBlocks.Content,{})}))},deprecated:z},{registerBlockType:q,registerBlockStyle:U}=wp.blocks;q(O,I),q(W,J),U(O,[{name:"testimonials",label:"Testimonials"},{name:"thumbnails-bottom-right",label:"Thumbnails Bottom Right"},{name:"overlayed-text-right",label:"Overlayed Text Right"}])})()})();1 (()=>{var e={655(e,t){var i;!function(){"use strict";var s=function(){function e(){}function t(e,t){for(var i=t.length,s=0;s<i;++s)o(e,t[s])}e.prototype=Object.create(null);var i={}.hasOwnProperty,s=/\s+/;function o(e,o){if(o){var a=typeof o;"string"===a?function(e,t){for(var i=t.split(s),o=i.length,a=0;a<o;++a)e[i[a]]=!0}(e,o):Array.isArray(o)?t(e,o):"object"===a?function(e,t){if(t.toString===Object.prototype.toString||t.toString.toString().includes("[native code]"))for(var s in t)i.call(t,s)&&(e[s]=!!t[s]);else e[t.toString()]=!0}(e,o):"number"===a&&function(e,t){e[t]=!0}(e,o)}}return function(){for(var i=arguments.length,s=Array(i),o=0;o<i;o++)s[o]=arguments[o];var a=new e;t(a,s);var l=[];for(var n in a)a[n]&&l.push(n);return l.join(" ")}}();e.exports?(s.default=s,e.exports=s):void 0===(i=function(){return s}.apply(t,[]))||(e.exports=i)}()}},t={};function i(s){var o=t[s];if(void 0!==o)return o.exports;var a=t[s]={exports:{}};return e[s](a,a.exports,i),a.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var s in t)i.o(t,s)&&!i.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=JSON.parse('{"apiVersion":3,"name":"da/wp-swiper-slides","category":"media","supports":{"html":false,"className":false,"anchor":true,"align":["wide","full"]},"attributes":{"align":{"type":"string","default":""},"overlayColor":{"type":"object","default":{"rgb":{"r":0,"g":0,"b":0,"a":0}}},"containerWidth":{"type":"number"},"overlayImg":{"type":"string"},"previousIcon":{"type":"string"},"nextIcon":{"type":"string"},"overlayImgOpacity":{"type":"number","default":0.5},"currentSlide":{"type":"number","default":0},"tabActive":{"type":"string","default":"slide-1"},"buttonsAlign":{"type":"string","default":"start"},"autoplay":{"type":"boolean","default":false},"disableOnInteraction":{"type":"boolean","default":true},"pauseOnMouseEnter":{"type":"boolean","default":false},"reverseDirection":{"type":"boolean","default":false},"stopOnLastSlide":{"type":"boolean","default":false},"waitForTransition":{"type":"boolean","default":true},"navigation":{"type":"boolean","default":true},"pagination":{"type":"boolean","default":true},"clickable_pagination":{"type":"boolean","default":false},"loop":{"type":"boolean","default":false},"loopAddBlankSlides":{"type":"boolean","default":true},"loopAdditionalSlides":{"type":"number","default":0},"effect":{"type":"string","default":"slide"},"speed":{"type":"number","default":500},"delay":{"type":"number","default":3000},"slidesPerView":{"type":"string","default":"1"},"slidesPerGroup":{"type":"number","default":1},"slidesPerGroupAuto":{"type":"boolean","default":false},"slidesPerGroupSkip":{"type":"number","default":0},"spaceBetween":{"type":"number","default":0},"autoSlideWidth":{"type":"boolean","default":false},"slidesOffsetBefore":{"type":"number","default":0},"slidesOffsetAfter":{"type":"number","default":0},"tabsData":{"type":"array","default":[{"clientId":"","slug":"slide-1","slideImg":"","thumbImg":""}]},"breakpoints":{"type":"string"},"thumbs":{"type":"boolean","default":false},"thumbsSlidesPerView":{"type":"number","default":4},"thumbsSpaceBetween":{"type":"number","default":10},"autoHeight":{"type":"boolean","default":true},"sliderHeight":{"type":"string","default":"500px"},"freeMode":{"type":"boolean","default":false},"freeModeMinimumVelocity":{"type":"number","default":0.02},"freeModeMomentum":{"type":"boolean","default":true},"freeModeMomentumBounce":{"type":"boolean","default":true},"freeModeMomentumBounceRatio":{"type":"number","default":1},"freeModeMomentumRatio":{"type":"number","default":1},"freeModeMomentumVelocityRatio":{"type":"number","default":1},"freeModeSticky":{"type":"boolean","default":false},"debug":{"type":"boolean","default":false},"direction":{"type":"string","default":"horizontal"},"overflowVisible":{"type":"boolean","default":false},"navigationColor":{"type":"string","default":""},"paginationColor":{"type":"string","default":""}}}');var t=i(655),s=i.n(t);const o=window.wp.blockEditor,a=window.ReactJSXRuntime,{sliderHeight:l,navigationColor:n,paginationColor:r,autoHeight:d,...p}=e.attributes,c={...p,autoHeight:{type:"boolean",default:!0},pagination_type:{type:"string",default:"bullets"},mousewheel:{type:"boolean",default:!1},releaseOnEdges:{type:"boolean",default:!1}},u=[{attributes:{...c,tabsData:{type:"array",default:[]}},save:function(e){let{className:t}=e.attributes;const{align:i,overlayImg:l,overlayImgOpacity:n,slidesPerView:r,slidesPerGroup:d,slidesPerGroupAuto:p,slidesPerGroupSkip:c,spaceBetween:u,autoSlideWidth:w,autoplay:m,disableOnInteraction:g,pauseOnMouseEnter:h,reverseDirection:f,stopOnLastSlide:b,waitForTransition:v,delay:y,speed:x,loop:_,loopAddBlankSlides:j,loopAdditionalSlides:k,effect:C,navigation:P,pagination:S,mousewheel:M,releaseOnEdges:B,pagination_type:O,clickable_pagination:I,breakpoints:N,thumbs:R,thumbsSpaceBetween:A,thumbsSlidesPerView:T,autoHeight:V,freeMode:E,freeModeMinimumVelocity:D,freeModeMomentum:F,freeModeMomentumBounce:H,freeModeMomentumBounceRatio:G,freeModeMomentumRatio:$,freeModeMomentumVelocityRatio:z,freeModeSticky:L,debug:W,direction:J,tabsData:q,previousIcon:U,nextIcon:Z,slidesOffsetBefore:X,slidesOffsetAfter:Y,overflowVisible:K}=e.attributes;t=s()(t,"wp-swiper"),i&&(t=s()(t,`align${i}`));const Q={className:t},ee=l?{backgroundImage:`url(${l})`}:{};n&&(ee.opacity=n);let te={"data-thumbs":{}},ie={slidesPerView:"auto"===r?"auto":parseInt(r,10),slidesPerGroup:d,slidesPerGroupAuto:p,slidesPerGroupSkip:c,navigation:P,pagination:{},delay:y,speed:x,loop:_,direction:J,slidesOffsetBefore:X,slidesOffsetAfter:Y,autoHeight:V,spaceBetween:u,releaseOnEdges:B};w&&(ie.autoSlideWidth=!0),M&&B&&(ie.mousewheel={releaseOnEdges:"true"===B}),_&&(ie.loopAddBlankSlides=j,ie.loopAdditionalSlides=k),ie.effect=C||"slide","fade"===C&&(ie.fadeEffect={crossFade:!0}),m&&(ie.autoplay=!0,null!=y&&(ie.autoplay={delay:Number(y)}),g&&(ie.autoplay||(ie.autoplay={}),ie.autoplay.disableOnInteraction=!0),h&&(ie.autoplay||(ie.autoplay={}),ie.autoplay.pauseOnMouseEnter=!0),f&&(ie.autoplay||(ie.autoplay={}),ie.autoplay.reverseDirection=!0),b&&(ie.autoplay||(ie.autoplay={}),ie.autoplay.stopOnLastSlide=!0),null!=v&&(ie.autoplay||(ie.autoplay={}),ie.autoplay.waitForTransition=v)),E&&(ie.freeMode={enabled:!0,minimumVelocity:D,momentum:F,momentumBounce:H,momentumBounceRatio:G,momentumRatio:$,momentumVelocityRatio:z,sticky:L}),ie.pagination.type="bullets"!=O?O:"bullets",I&&(ie.pagination.clickable=!!I||""),void 0!==N&&""!=N&&(ie.breakpoints=N),R&&(te["data-thumbs"]=JSON.stringify({spaceBetween:A,slidesPerView:T,freeMode:!0,watchSlidesProgress:!0,navigation:!1}));const se=(void 0!==q?q:[]).map((e,t)=>(e.thumbImg||e.slideImg)&&(0,a.jsx)("div",{className:"swiper-slide wp-swiper__thumb","data-thumb":t+1,children:(0,a.jsx)("img",{src:e.thumbImg||e.slideImg,alt:`Thumbnail ${t+1}`})},t)),oe=s()("swiper-container","swiper",{"swiper-overflow-visible":K});return(0,a.jsxs)("div",{...Q,children:[function(e,t){if(void 0!==e)return(0,a.jsx)("div",{className:"wp-swiper__overlay-img",style:t})}(l,ee),(0,a.jsxs)("div",{className:"wp-swiper__wrapper",children:[(0,a.jsx)("div",{className:oe,...W?{"data-debug":!0}:{},"data-swiper":JSON.stringify(ie),...te,children:(0,a.jsxs)("div",{className:"swiper-wrapper",children:["\n",(0,a.jsx)(o.InnerBlocks.Content,{}),"\n"]})}),function({attributes:e}){const{navigation:t}=e;if(t)return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:"wp_swiper__navigation",children:(0,a.jsxs)("div",{className:"wp_swiper__navigation-container",children:[(0,a.jsx)("div",{className:"swiper-button-prev "+(U?"wp_swiper__button-prev":""),children:U?(0,a.jsx)("img",{src:U,alt:"Previous"}):null}),(0,a.jsx)("div",{className:"swiper-button-next "+(Z?"wp_swiper__button-next":""),children:Z?(0,a.jsx)("img",{src:Z,alt:"Previous"}):null})]})})})}(e),function({attributes:e}){const{pagination:t}=e;if(t)return(0,a.jsx)("div",{className:"swiper-pagination"})}(e)]}),function({attributes:e}){let{className:t}=e;if(t=t?t.toString():"",-1!==t.indexOf("is-style-testimonials"))return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:"wp-swiper__quotes",children:(0,a.jsx)("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"quote-right",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",class:"svg-inline--fa fa-quote-right fa-w-16 fa-5x",children:(0,a.jsx)("path",{fill:"currentColor",d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z",class:""})})})})}(e),R&&(0,a.jsx)("div",{className:"wp-swiper__thumbs",children:(0,a.jsx)("div",{className:"wp-swiper__wrapper",children:(0,a.jsx)("div",{className:"swiper-container",children:(0,a.jsx)("div",{className:"swiper-wrapper",children:se})})})})]})},migrate:e=>({...e,sliderHeight:"500px",navigationColor:void 0,paginationColor:void 0})},{attributes:{...c,sticky:{type:"boolean",default:!1},tabsData:{type:"array",default:[]}},save:function(e){let{className:t}=e.attributes;const{align:i,overlayImg:l,overlayImgOpacity:n,slidesPerView:r,slidesPerGroup:d,slidesPerGroupAuto:p,slidesPerGroupSkip:c,spaceBetween:u,txtColor:w,autoplay:m,disableOnInteraction:g,pauseOnMouseEnter:h,reverseDirection:f,stopOnLastSlide:b,waitForTransition:v,delay:y,speed:x,loop:_,effect:j,navigation:k,pagination:C,mousewheel:P,releaseOnEdges:S,pagination_type:M,clickable_pagination:B,breakpoints:O,thumbs:I,thumbsSpaceBetween:N,thumbsSlidesPerView:R,autoHeight:A,freeMode:T,sticky:V,debug:E,direction:D,tabsData:F,previousIcon:H,nextIcon:G,slidesOffsetBefore:$,slidesOffsetAfter:z,overflowVisible:L}=e.attributes;t=s()(t,"wp-swiper"),i&&(t=s()(t,`align${i}`));const W=o.useBlockProps.save({className:t}),J=(o.useInnerBlocksProps,l?{backgroundImage:`url(${l})`}:{});n&&(J.opacity=n);const q=w?{color:w}:{};let U={"data-thumbs":{}},Z={slidesPerView:"auto"===r?"auto":parseInt(r,10),slidesPerGroup:d,slidesPerGroupAuto:p,slidesPerGroupSkip:c,navigation:k,pagination:{},delay:y,speed:x,loop:_,direction:D,slidesOffsetBefore:$,slidesOffsetAfter:z,autoHeight:A,spaceBetween:u,releaseOnEdges:S};P&&S&&(Z.mousewheel={releaseOnEdges:"true"===S}),j&&(Z.effect=j,"fade"===j&&(Z.fadeEffect={crossFade:!0})),m&&(Z.autoplay=!0,null!=y&&(Z.autoplay={delay:Number(y)}),g&&(Z.autoplay||(Z.autoplay={}),Z.autoplay.disableOnInteraction=!0),h&&(Z.autoplay||(Z.autoplay={}),Z.autoplay.pauseOnMouseEnter=!0),f&&(Z.autoplay||(Z.autoplay={}),Z.autoplay.reverseDirection=!0),b&&(Z.autoplay||(Z.autoplay={}),Z.autoplay.stopOnLastSlide=!0),null!=v&&(Z.autoplay||(Z.autoplay={}),Z.autoplay.waitForTransition=v)),T&&(Z.freeMode={enabled:!0},V&&(Z.freeMode.sticky=!0)),Z.pagination.type="bullets"!=M?M:"bullets",B&&(Z.pagination.clickable=!!B||""),void 0!==O&&""!=O&&(Z.breakpoints=O),I&&(U["data-thumbs"]=JSON.stringify({spaceBetween:N,slidesPerView:R,freeMode:!0,watchSlidesProgress:!0,navigation:!1}));const X=(void 0!==F?F:[]).map((e,t)=>(e.thumbImg||e.slideImg)&&(0,a.jsx)("div",{className:"swiper-slide wp-swiper__thumb","data-thumb":t+1,children:(0,a.jsx)("img",{src:e.thumbImg||e.slideImg,alt:`Thumbnail ${t+1}`})},t)),Y=s()("swiper-container","swiper",{"swiper-overflow-visible":L});return(0,a.jsxs)("div",{...W,children:[function(e,t){if(void 0!==e)return(0,a.jsx)("div",{className:"wp-swiper__overlay-img",style:t})}(l,J),(0,a.jsxs)("div",{className:"wp-swiper__wrapper",style:q,children:[(0,a.jsx)("div",{className:Y,...E?{"data-debug":!0}:{},"data-swiper":JSON.stringify(Z),...U,children:(0,a.jsx)("div",{className:"swiper-wrapper",children:(0,a.jsx)(o.InnerBlocks.Content,{})})}),function({attributes:e}){const{navigation:t}=e;if(t)return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:"wp_swiper__navigation",children:(0,a.jsxs)("div",{className:"wp_swiper__navigation-container",children:[(0,a.jsx)("div",{className:"swiper-button-prev "+(H?"wp_swiper__button-prev":""),children:H?(0,a.jsx)("img",{src:H,alt:"Previous"}):null}),(0,a.jsx)("div",{className:"swiper-button-next "+(G?"wp_swiper__button-next":""),children:G?(0,a.jsx)("img",{src:G,alt:"Previous"}):null})]})})})}(e),function({attributes:e}){const{pagination:t}=e;if(t)return(0,a.jsx)("div",{className:"swiper-pagination"})}(e)]}),function({attributes:e}){let{className:t}=e;if(t=t?t.toString():"",-1!==t.indexOf("is-style-testimonials"))return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:"wp-swiper__quotes",children:(0,a.jsx)("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"quote-right",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",class:"svg-inline--fa fa-quote-right fa-w-16 fa-5x",children:(0,a.jsx)("path",{fill:"currentColor",d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z",class:""})})})})}(e),I&&(0,a.jsx)("div",{className:"wp-swiper__thumbs",children:(0,a.jsx)("div",{className:"wp-swiper__wrapper",children:(0,a.jsx)("div",{className:"swiper-container",children:(0,a.jsx)("div",{className:"swiper-wrapper",children:X})})})})]})},migrate(e){const{sticky:t,...i}=e;return{...i,freeModeSticky:t||!1,sliderHeight:"500px",navigationColor:void 0,paginationColor:void 0}}},{attributes:{...c,tabsData:{type:"array",default:[]}},save:function(e){let{className:t}=e.attributes;const{align:i,overlayImg:l,overlayImgOpacity:n,slidesPerView:r,spaceBetween:d,txtColor:p,autoplay:c,disableOnInteraction:u,pauseOnMouseEnter:w,reverseDirection:m,stopOnLastSlide:g,waitForTransition:h,delay:f,speed:b,loop:v,effect:y,navigation:x,pagination:_,mousewheel:j,releaseOnEdges:k,pagination_type:C,clickable_pagination:P,breakpoints:S,thumbs:M,thumbsSpaceBetween:B,thumbsSlidesPerView:O,autoHeight:I,freeMode:N,sticky:R,debug:A,direction:T,tabsData:V,previousIcon:E,nextIcon:D,slidesOffsetBefore:F,slidesOffsetAfter:H}=e.attributes;t=s()(t,"wp-swiper"),i&&(t=s()(t,`align${i}`));const G=o.useBlockProps.save({className:t}),$=(o.useInnerBlocksProps,(void 0!==V?V:[]).map((e,t)=>(e.thumbImg||e.slideImg)&&(0,a.jsx)("div",{className:"swiper-slide wp-swiper__thumb","data-thumb":t+1,children:(0,a.jsx)("img",{src:e.thumbImg||e.slideImg,alt:`Thumbnail ${t+1}`})},t))),z=l?{backgroundImage:`url(${l})`}:{};n&&(z.opacity=n);const L=p?{color:p}:{};let W={"data-thumbs":{}},J={"slidesPerView-":r,navigation:x,pagination:_,autoplay:c,disableOnInteraction:u,pauseOnMouseEnter:w,delay:f,speed:b,loop:v,effect:y};return A&&(J.debug=A),N&&R&&(J.sticky=R),J.slidesOffsetBefore=F,J.slidesOffsetAfter=H,J.direction=T,J.freeMode=N,J.autoHeight=I,J.spaceBetween=d,J.mousewheel=j,J.releaseOnEdges=k,J.type="bullets"!=C?C:"bullets",P&&(J.clickable=!!P||""),void 0!==S&&""!=S&&(J["data-breakpoints"]=JSON.stringify(S.replace(/^\s+|\s+|\n$/gm,"")),J["data-breakpoints"]=J.breakpoints.substring(1,J.breakpoints.length-1)),M&&(W["data-thumbs"]=JSON.stringify({spaceBetween:B,slidesPerView:O,freeMode:!0,watchSlidesProgress:!0,navigation:!1})),(0,a.jsxs)("div",{...G,children:[function(e,t){if(void 0!==e)return(0,a.jsx)("div",{className:"wp-swiper__overlay-img",style:t})}(l,z),(0,a.jsxs)("div",{className:"wp-swiper__wrapper",style:L,children:[(0,a.jsx)("div",{className:"swiper-container swiper","data-swiper":JSON.stringify(J),...W,children:(0,a.jsx)("div",{className:"swiper-wrapper",children:(0,a.jsx)(o.InnerBlocks.Content,{})})}),function({attributes:e}){const{navigation:t}=e;if(t)return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:"wp_swiper__navigation",children:(0,a.jsxs)("div",{className:"wp_swiper__navigation-container",children:[(0,a.jsx)("div",{className:"swiper-button-prev "+(E?"wp_swiper__button-prev":""),children:E?(0,a.jsx)("img",{src:E,alt:"Previous"}):null}),(0,a.jsx)("div",{className:"swiper-button-next "+(D?"wp_swiper__button-next":""),children:D?(0,a.jsx)("img",{src:D,alt:"Previous"}):null})]})})})}(e),function({attributes:e}){const{pagination:t}=e;if(t)return(0,a.jsx)("div",{className:"swiper-pagination"})}(e)]}),function({attributes:e}){let{className:t}=e;if(t=t?t.toString():"",-1!==t.indexOf("is-style-testimonials"))return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:"wp-swiper__quotes",children:(0,a.jsx)("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"quote-right",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",class:"svg-inline--fa fa-quote-right fa-w-16 fa-5x",children:(0,a.jsx)("path",{fill:"currentColor",d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z",class:""})})})})}(e),M&&(0,a.jsx)("div",{className:"wp-swiper__thumbs",children:(0,a.jsx)("div",{className:"wp-swiper__wrapper",children:(0,a.jsx)("div",{className:"swiper-container",children:(0,a.jsx)("div",{className:"swiper-wrapper",children:$})})})})]})},migrate:e=>({...e,sliderHeight:"500px",navigationColor:void 0,paginationColor:void 0})}],w=window.wp.element,m=window.wp.i18n,g=window.wp.blocks,h=window.wp.data,f=window.wp.notices,b=window.wp.components,{Component:v}=wp.element,{__}=wp.i18n,{Button:y,Popover:x}=wp.components;class _ extends v{constructor(){super(...arguments),this.state={confirmed:-1}}render(){const{onRemove:e,show:t,style:i,tooltipText:s=__("Remove Slide?","@@text_domain"),tooltipRemoveText:o=__("Remove","@@text_domain"),tooltipCancelText:l=__("Cancel","@@text_domain")}=this.props,{confirmed:n}=this.state;return t?(0,a.jsxs)(y,{className:"wb-component-remove-button",onClick:()=>{-1===n&&this.setState({confirmed:0})},style:i,children:[0===n?(0,a.jsxs)(x,{className:"wb-component-remove-button-confirm",onClose:()=>{this.setState({confirmed:-1})},onClickOutside:()=>{this.setState({confirmed:-1})},children:[s,(0,a.jsx)(y,{className:"wb-component-remove-button-confirm-yep",onClick:e,children:o}),(0,a.jsx)(y,{className:"wb-component-remove-button-confirm-nope",onClick:()=>{this.setState({confirmed:-1})},children:l})]}):"",(0,a.jsx)("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"trash",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",class:"svg-inline--fa fa-trash fa-w-14 fa-3x",children:(0,a.jsx)("path",{fill:"currentColor",d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z",class:""})})]}):""}}function j(e){return(0,a.jsx)("div",{className:"wb-tabs-icon",children:""!=e&&(0,a.jsx)("img",{className:"wb-tabs-icon_image",src:e})})}const k={"top left":"is-position-top-left","top center":"is-position-top-center","top right":"is-position-top-right","center left":"is-position-center-left","center center":"is-position-center-center",center:"is-position-center-center","center right":"is-position-center-right","bottom left":"is-position-bottom-left","bottom center":"is-position-bottom-center","bottom right":"is-position-bottom-right"};function C(e){return function(e){return!e||"center center"===e||"center"===e}(e)?"":k[e]}function P(e){if(Array.isArray(e))return e.map(e=>P(e));if("object"==typeof e&&null!==e){const t={};for(let i in e)e.hasOwnProperty(i)&&(t[i]=P(e[i]));return t}return e}const S=[["da/wp-swiper-slide",{slug:"slide-1"}]];async function M(e){const t=new FormData;return t.append("file",e),await wp.apiFetch({path:"/wp/v2/media",method:"POST",body:t})}function B({attributes:e,setAttributes:t}){const[i,s]=(0,w.useState)(""),[o,l]=(0,w.useState)(!0),[n,r]=(0,w.useState)(!1),d=function(e){const{slidesPerView:t,slidesPerGroup:i,slidesPerGroupAuto:s,slidesPerGroupSkip:o,spaceBetween:a,autoSlideWidth:l,autoplay:n,disableOnInteraction:r,pauseOnMouseEnter:d,reverseDirection:p,stopOnLastSlide:c,waitForTransition:u,delay:w,speed:m,loop:g,loopAddBlankSlides:h,loopAdditionalSlides:f,effect:b,navigation:v,mousewheel:y,releaseOnEdges:x,pagination_type:_,clickable_pagination:j,breakpoints:k,freeMode:C,freeModeMinimumVelocity:P,freeModeMomentum:S,freeModeMomentumBounce:M,freeModeMomentumBounceRatio:B,freeModeMomentumRatio:O,freeModeMomentumVelocityRatio:I,freeModeSticky:N,autoHeight:R,direction:A,slidesOffsetBefore:T,slidesOffsetAfter:V}=e,E={slidesPerView:"auto"===t?"auto":parseInt(t,10),slidesPerGroup:i,slidesPerGroupAuto:s,slidesPerGroupSkip:o,navigation:v,pagination:{},delay:w,speed:m,loop:g,direction:A,slidesOffsetBefore:T,slidesOffsetAfter:V,autoHeight:R,spaceBetween:a,releaseOnEdges:x};return l&&(E.autoSlideWidth=!0),y&&x&&(E.mousewheel={releaseOnEdges:"true"===x}),g&&(E.loopAddBlankSlides=h,E.loopAdditionalSlides=f),b&&(E.effect=b,"fade"===b&&(E.fadeEffect={crossFade:!0})),n&&(E.autoplay=!0,null!=w&&(E.autoplay={delay:Number(w)}),r&&(E.autoplay&&!0!==E.autoplay||(E.autoplay={}),E.autoplay.disableOnInteraction=!0),d&&(E.autoplay&&!0!==E.autoplay||(E.autoplay={}),E.autoplay.pauseOnMouseEnter=!0),p&&(E.autoplay&&!0!==E.autoplay||(E.autoplay={}),E.autoplay.reverseDirection=!0),c&&(E.autoplay&&!0!==E.autoplay||(E.autoplay={}),E.autoplay.stopOnLastSlide=!0),null!=u&&(E.autoplay&&!0!==E.autoplay||(E.autoplay={}),E.autoplay.waitForTransition=u)),C&&(E.freeMode={enabled:!0,minimumVelocity:P,momentum:S,momentumBounce:M,momentumBounceRatio:B,momentumRatio:O,momentumVelocityRatio:I,sticky:N}),E.pagination.type="bullets"!==_?_:"bullets",j&&(E.pagination.clickable=!!j||""),void 0!==k&&""!==k&&(E.breakpoints=k),E}(e),p=JSON.stringify(d,null,2);(0,w.useEffect)(()=>{n||s(p)},[p,n]),(0,w.useEffect)(()=>{s(p)},[]);const c={marginTop:"8px",fontSize:"12px",fontStyle:"normal",color:"rgb(117, 117, 117)",marginBottom:"12px"};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.BaseControl,{label:(0,m.__)("Swiper Configuration (JSON)","wp-swiper"),help:o?"":(0,m.__)("Invalid JSON format. Please fix the syntax errors.","wp-swiper"),children:(0,a.jsx)("textarea",{value:i,onChange:e=>(e=>{s(e),r(!0);try{JSON.parse(e),l(!0)}catch(e){l(!1)}})(e.target.value),rows:15,style:{width:"100%",fontFamily:"monospace",fontSize:"11px",padding:"8px",border:"1px solid "+(o?"#8c8f94":"#cc1818"),borderRadius:"4px",backgroundColor:o?"#fff":"#fff5f5",resize:"vertical"}})}),(0,a.jsxs)(b.PanelRow,{children:[(0,a.jsx)(b.Button,{variant:"primary",onClick:()=>{if(o)try{const e=JSON.parse(i),s={};void 0!==e.slidesPerView&&(s.slidesPerView=e.slidesPerView),void 0!==e.slidesPerGroup&&(s.slidesPerGroup=e.slidesPerGroup),void 0!==e.slidesPerGroupAuto&&(s.slidesPerGroupAuto=e.slidesPerGroupAuto),void 0!==e.slidesPerGroupSkip&&(s.slidesPerGroupSkip=e.slidesPerGroupSkip),void 0!==e.spaceBetween&&(s.spaceBetween=e.spaceBetween),void 0!==e.autoSlideWidth&&(s.autoSlideWidth=e.autoSlideWidth),void 0!==e.navigation&&(s.navigation=e.navigation),void 0!==e.delay&&(s.delay=e.delay),void 0!==e.speed&&(s.speed=e.speed),void 0!==e.loop&&(s.loop=e.loop),void 0!==e.direction&&(s.direction=e.direction),void 0!==e.slidesOffsetBefore&&(s.slidesOffsetBefore=e.slidesOffsetBefore),void 0!==e.slidesOffsetAfter&&(s.slidesOffsetAfter=e.slidesOffsetAfter),void 0!==e.autoHeight&&(s.autoHeight=e.autoHeight),void 0!==e.releaseOnEdges&&(s.releaseOnEdges=e.releaseOnEdges),void 0!==e.effect&&(s.effect=e.effect),void 0!==e.loopAddBlankSlides&&(s.loopAddBlankSlides=e.loopAddBlankSlides),void 0!==e.loopAdditionalSlides&&(s.loopAdditionalSlides=e.loopAdditionalSlides),void 0!==e.autoplay&&(!0===e.autoplay||"object"==typeof e.autoplay?(s.autoplay=!0,"object"==typeof e.autoplay&&(void 0!==e.autoplay.delay&&(s.delay=e.autoplay.delay),void 0!==e.autoplay.disableOnInteraction&&(s.disableOnInteraction=e.autoplay.disableOnInteraction),void 0!==e.autoplay.pauseOnMouseEnter&&(s.pauseOnMouseEnter=e.autoplay.pauseOnMouseEnter),void 0!==e.autoplay.reverseDirection&&(s.reverseDirection=e.autoplay.reverseDirection),void 0!==e.autoplay.stopOnLastSlide&&(s.stopOnLastSlide=e.autoplay.stopOnLastSlide),void 0!==e.autoplay.waitForTransition&&(s.waitForTransition=e.autoplay.waitForTransition))):s.autoplay=!1),void 0!==e.freeMode&&("object"==typeof e.freeMode&&e.freeMode.enabled?(s.freeMode=!0,void 0!==e.freeMode.minimumVelocity&&(s.freeModeMinimumVelocity=e.freeMode.minimumVelocity),void 0!==e.freeMode.momentum&&(s.freeModeMomentum=e.freeMode.momentum),void 0!==e.freeMode.momentumBounce&&(s.freeModeMomentumBounce=e.freeMode.momentumBounce),void 0!==e.freeMode.momentumBounceRatio&&(s.freeModeMomentumBounceRatio=e.freeMode.momentumBounceRatio),void 0!==e.freeMode.momentumRatio&&(s.freeModeMomentumRatio=e.freeMode.momentumRatio),void 0!==e.freeMode.momentumVelocityRatio&&(s.freeModeMomentumVelocityRatio=e.freeMode.momentumVelocityRatio),void 0!==e.freeMode.sticky&&(s.freeModeSticky=e.freeMode.sticky)):s.freeMode=!1),void 0!==e.pagination&&(void 0!==e.pagination.type&&(s.pagination_type=e.pagination.type),void 0!==e.pagination.clickable&&(s.clickable_pagination=e.pagination.clickable)),void 0!==e.breakpoints&&(s.breakpoints=e.breakpoints),void 0!==e.mousewheel&&(s.mousewheel=!0,"object"==typeof e.mousewheel&&void 0!==e.mousewheel.releaseOnEdges&&(s.releaseOnEdges=e.mousewheel.releaseOnEdges?"true":"false")),t(s),r(!1)}catch(e){console.error("Failed to parse JSON config:",e)}},disabled:!o||!n,style:{marginRight:"8px"},children:(0,m.__)("Apply Changes","wp-swiper")}),(0,a.jsx)(b.Button,{variant:"secondary",onClick:()=>{s(p),r(!1),l(!0)},disabled:!n,children:(0,m.__)("Reset","wp-swiper")})]}),(0,a.jsx)("p",{style:c,children:(0,m.__)('This JSON object represents the Swiper initialization configuration. You can edit properties directly here and click "Apply Changes" to update the slider settings. This is useful for advanced customizations or copying configurations between sliders.',"wp-swiper")}),(0,a.jsxs)("p",{style:c,children:[(0,a.jsx)("strong",{children:(0,m.__)("Tip:","wp-swiper")})," ",(0,m.__)("Changes made here will update the corresponding settings in the sidebar panels. Some nested properties (like autoplay options) will be extracted to their respective settings.","wp-swiper")]})]})}const{__:O}=wp.i18n,{name:I}=e,N={...e,title:O("WP Swiper","@@text_domain"),description:O("Create an awesome slider.","@@text_domain"),icon:(0,a.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M20 17.4444C20 17.857 19.8314 18.2527 19.5314 18.5444C19.2313 18.8361 18.8243 19 18.4 19H5.6C5.17565 19 4.76869 18.8361 4.46863 18.5444C4.16857 18.2527 4 17.857 4 17.4444V6.55556C4 6.143 4.16857 5.74733 4.46863 5.45561C4.76869 5.16389 5.17565 5 5.6 5H9.6L11.2 7.33333H18.4C18.8243 7.33333 19.2313 7.49722 19.5314 7.78894C19.8314 8.08067 20 8.47633 20 8.88889V17.4444Z",stroke:"currentColor",fill:"transparent","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),keywords:[O("swiper","@@text_domain"),O("slider","@@text_domain"),O("wp slider","@@text_domain"),O("wp swiper","@@text_domain")],edit:function({clientId:e,attributes:t,setAttributes:i,className:l}){const n=(0,o.useBlockProps)(),{block:r,isSelectedBlockInRoot:d}=(0,h.useSelect)(t=>{const{getBlock:i,isBlockSelected:s,hasSelectedInnerBlock:a}=t(o.store);return{block:i(e),isSelectedBlockInRoot:s(e)||a(e,!0)}},[e]),{updateBlockAttributes:p,removeBlock:c,replaceInnerBlocks:u}=(0,h.useDispatch)(o.store),{getBlocks:v}=(0,h.useSelect)(e=>({getBlocks:e(o.store).getBlocks}),[]),y=(0,w.useCallback)(e=>{let t=1;e.forEach(e=>{p(e.clientId,{slug:`slide-${t}`}),t++})},[p]),{tabActive:x,buttonsAlign:k,tabsData:C,overlayColor:O,overlayImg:I,overlayImgOpacity:N,autoplay:R,disableOnInteraction:A,pauseOnMouseEnter:T,reverseDirection:V,stopOnLastSlide:E,waitForTransition:D,delay:F,speed:H,loop:G,loopAddBlankSlides:$,loopAdditionalSlides:z,effect:L,slidesPerView:W,slidesPerGroup:J,slidesPerGroupAuto:q,slidesPerGroupSkip:U,spaceBetween:Z,autoSlideWidth:X,navigation:Y,pagination:K,containerWidth:Q,mousewheel:ee,releaseOnEdges:te,pagination_type:ie,clickable_pagination:se,breakpoints:oe,freeMode:ae,freeModeMinimumVelocity:le,freeModeMomentum:ne,freeModeMomentumBounce:re,freeModeMomentumBounceRatio:de,freeModeMomentumRatio:pe,freeModeMomentumVelocityRatio:ce,freeModeSticky:ue,thumbs:we,thumbsSlidesPerView:me,thumbsSpaceBetween:ge,autoHeight:he,sliderHeight:fe,debug:be,direction:ve,previousIcon:ye,nextIcon:xe,slidesOffsetBefore:_e,slidesOffsetAfter:je,overflowVisible:ke,navigationColor:Ce,paginationColor:Pe}=t,Se=v(e),Me=(0,w.useCallback)((e,t)=>!(!e||!t||e.length!==t.length)&&e.every((e,i)=>e===t[i]),[]);(0,w.useEffect)(()=>{if(!r?.innerBlocks)return;const e=r.innerBlocks.map(e=>e.attributes.slug),t=C.map(e=>e.slug),s=r.innerBlocks.map(e=>e.attributes.thumbImg),o=C.map(e=>e.thumbImg);let a=0;if(!Me(e,t)||!Me(s,o)){const e=r.innerBlocks.map(e=>(a++,{clientId:e.clientId,slideImg:e.attributes.slideImg,thumbImg:e.attributes.thumbImg,slug:`slide-${a}`}));y(r.innerBlocks),i({tabsData:e})}},[Se,r,C,Me,y,i]);const[Be,Oe]=(0,w.useState)("bottom center"),[Ie,Ne]=(0,w.useState)(!1),[Re,Ae]=(0,w.useState)(!1),Te=(0,w.useCallback)(e=>{if(r?.innerBlocks)if(r.innerBlocks.length<=1)c(r.clientId);else if(r.innerBlocks[e]&&C[e]){const t=P(C);t.splice(e,1),c(r.innerBlocks[e].clientId);for(let i=e;i<t.length;i++){const e=`slide-${i+1}`;t[i].slug=e,p(t[i].clientId,{slug:e})}i({tabsData:t})}},[r,C,c,p,i]);l=s()(l,"wp-swiper__slides");let Ve=k;"start"===Ve?Ve="left":"end"===Ve&&(Ve="right");let Ee=1;const De=()=>(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)("div",{style:{borderTop:"1px solid #dddddd",marginTop:"16px",marginBottom:"16px",width:"100%"}})});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(o.InspectorControls,{children:[(0,a.jsxs)(b.PanelBody,{title:(0,m.__)("Overlay Settings","wp-swiper"),initialOpen:!1,children:[(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(o.MediaUploadCheck,{children:(0,a.jsx)(o.MediaUpload,{value:I,onSelect:e=>{const t=e.sizes?.full?.url||e.url;i({overlayImg:t})},allowedTypes:["image"],render:({open:e})=>(0,a.jsx)(b.Button,{onClick:e,className:"button",children:(0,m.__)("Select overlay image","wp-swiper")})})})}),I&&(0,a.jsx)(b.PanelRow,{children:j(I)}),I&&(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.Button,{variant:"secondary",size:"small",className:"block-library-cover__reset-button",onClick:()=>i({overlayImg:void 0}),children:(0,m.__)("Clear Media","wp-swiper")})}),I&&(0,a.jsx)(b.BaseControl,{label:(0,m.__)("Image Overlay Opacity","wp-swiper"),children:(0,a.jsx)(b.RangeControl,{label:(0,m.__)("Opacity","wp-swiper"),value:N,onChange:e=>i({overlayImgOpacity:e}),min:0,max:1,step:.01,required:!0})}),(0,a.jsx)(De,{}),(0,a.jsx)(b.BaseControl,{label:(0,m.__)("Overlay Color","wp-swiper"),children:(0,a.jsx)(b.ColorPalette,{value:"object"==typeof O?`rgba(${O.rgb.r}, ${O.rgb.g}, ${O.rgb.b}, ${O.rgb.a})`:O,onChange:e=>{i({overlayColor:e}),r.innerBlocks.map(t=>{p(t.clientId,{overlayColor:e})})}})}),O?.rgb?.a>0&&(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.Button,{variant:"secondary",size:"small",className:"block-library-cover__reset-button",onClick:()=>{const e={rgb:{r:0,g:0,b:0,a:0}};i({overlayColor:e}),(r?.innerBlocks||[]).forEach(t=>{p(t.clientId,{overlayColor:e})})},children:(0,m.__)("Clear Color","wp-swiper")})})]}),(0,a.jsxs)(b.PanelBody,{title:(0,m.__)("Color Settings","wp-swiper"),initialOpen:!1,children:[(0,a.jsx)(b.BaseControl,{label:(0,m.__)("Navigation Color","wp-swiper"),children:(0,a.jsx)(b.ColorPalette,{value:Ce,onChange:e=>i({navigationColor:e})})}),Ce&&(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.Button,{variant:"secondary",size:"small",onClick:()=>i({navigationColor:""}),children:(0,m.__)("Clear Navigation Color","wp-swiper")})}),(0,a.jsx)(De,{}),(0,a.jsx)(b.BaseControl,{label:(0,m.__)("Pagination Color","wp-swiper"),children:(0,a.jsx)(b.ColorPalette,{value:Pe,onChange:e=>i({paginationColor:e})})}),Pe&&(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.Button,{variant:"secondary",size:"small",onClick:()=>i({paginationColor:""}),children:(0,m.__)("Clear Pagination Color","wp-swiper")})})]}),(0,a.jsxs)(b.PanelBody,{title:(0,m.__)("Basic Slider Settings","wp-swiper"),icon:"controls-play",initialOpen:!0,children:[!he&&(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.__experimentalUnitControl,{label:(0,m.__)("Slider Height","wp-swiper"),help:(0,m.__)("Set a fixed height for the slider","wp-swiper"),value:fe,onChange:e=>{i({sliderHeight:e})},units:[{value:"px",label:"px",default:500},{value:"vh",label:"vh",default:50},{value:"%",label:"%",default:100},{value:"em",label:"em",default:20}]})}),(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.ToggleControl,{label:(0,m.__)("Auto Height","wp-swiper"),help:(0,m.__)("Slider wrapper will adapt its height to the height of the currently active slide","wp-swiper"),checked:he,onChange:()=>{i({autoHeight:!he})}})}),(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.ToggleControl,{label:(0,m.__)("Auto Play","wp-swiper"),checked:R,onChange:()=>{i({autoplay:!R})}})}),(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.ToggleControl,{label:(0,m.__)("Loop","wp-swiper"),checked:G,onChange:()=>{i({loop:!G})}})}),G&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.ToggleControl,{label:(0,m.__)("Loop Add Blank Slides","wp-swiper"),help:(0,m.__)("Automatically adds blank slides if you use Grid or slidesPerGroup and the total amount of slides is not even to slidesPerGroup or to grid.rows","wp-swiper"),checked:$,onChange:()=>{i({loopAddBlankSlides:!$})}})}),(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.TextControl,{label:(0,m.__)("Loop Additional Slides","wp-swiper"),help:(0,m.__)("Allows to increase amount of looped slides","wp-swiper"),value:z,type:"number",onChange:e=>{i({loopAdditionalSlides:parseInt(e)})}})})]}),(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.TextControl,{label:(0,m.__)("Speed","wp-swiper"),help:(0,m.__)("Duration of transition between slides (in ms)","wp-swiper"),value:H,type:"number",onChange:e=>{i({speed:parseInt(e)})}})}),(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.TextControl,{label:(0,m.__)("Delay","wp-swiper"),help:(0,m.__)("Delay between transitions (in ms)","wp-swiper"),value:F,type:"number",onChange:e=>{i({delay:parseInt(e)})}})}),(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.RangeControl,{label:(0,m.__)("Container Max Width %","wp-swiper"),help:(0,m.__)("Frontend: Set the max width for the content with text.","wp-swiper"),value:Q,onChange:e=>{i({containerWidth:e}),(r?.innerBlocks||[]).forEach(t=>{p(t.clientId,{containerWidth:e})})},min:1,max:100,step:1,required:!0})}),(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.ToggleControl,{label:(0,m.__)("Overflow Visible","wp-swiper"),help:(0,m.__)("Apply overflow visible to the swiper container","wp-swiper"),checked:ke,onChange:()=>{i({overflowVisible:!ke})}})})]}),(0,a.jsxs)(b.PanelBody,{title:(0,m.__)("Slides Configuration","wp-swiper"),icon:"grid-view",initialOpen:!1,children:[(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.TextControl,{label:(0,m.__)("Slides per view","wp-swiper"),help:(0,m.__)("Number of slides per view (slides visible at the same time on slider's container). Can be a number or auto","wp-swiper"),value:W,onChange:e=>{i({slidesPerView:e})}})}),(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.TextControl,{label:(0,m.__)("Slides Per Group","wp-swiper"),help:(0,m.__)("Set numbers of slides to define and enable group sliding. Useful to use with slidesPerView > 1","wp-swiper"),value:J,type:"number",onChange:e=>{i({slidesPerGroup:parseInt(e)})}})}),(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.ToggleControl,{label:(0,m.__)("Slides Per Group Auto","wp-swiper"),help:(0,m.__)("This param intended to be used only with slidesPerView: 'auto' and slidesPerGroup: 1. When enabled, it will skip all slides in view on .slideNext() & .slidePrev() methods calls, on Navigation buttons clicks and in autoplay.","wp-swiper"),checked:q,onChange:()=>{i({slidesPerGroupAuto:!q})}})}),(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.TextControl,{label:(0,m.__)("Slides Per Group Skip","wp-swiper"),help:(0,m.__)("If slidesPerGroupSkip equals 0 (default), no slides are excluded from grouping. If slidesPerGroupSkip is equal or greater than 1, the first X slides are treated as single groups, whereas all following slides are grouped by the slidesPerGroup value.","wp-swiper"),value:U,type:"number",onChange:e=>{i({slidesPerGroupSkip:parseInt(e)})}})}),(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.TextControl,{label:(0,m.__)("Space Between","wp-swiper"),help:(0,m.__)("Distance between slides in px.","wp-swiper"),value:Z,onChange:e=>{i({spaceBetween:parseInt(e)})}})}),(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.ToggleControl,{label:(0,m.__)("Auto Slide Width","wp-swiper"),help:(0,m.__)("Makes each slide size itself based on its content instead of being evenly distributed. Useful for logos, badges, small cards, or any element that should not be stretched.","wp-swiper"),checked:X,onChange:()=>{i({autoSlideWidth:!X})}})}),(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.TextControl,{label:(0,m.__)("Slides Offset Before","wp-swiper"),help:(0,m.__)("Add (in px) additional slide offset in the beginning of the container (before all slides)","wp-swiper"),value:_e,onChange:e=>{i({slidesOffsetBefore:parseInt(e)})}})}),(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.TextControl,{label:(0,m.__)("Slides Offset After","wp-swiper"),help:(0,m.__)("Add (in px) additional slide offset in the end of the container (after all slides)","wp-swiper"),value:je,onChange:e=>{i({slidesOffsetAfter:parseInt(e)})}})})]}),(0,a.jsxs)(b.PanelBody,{title:(0,m.__)("Navigation & Controls","wp-swiper"),icon:"leftright",initialOpen:!1,children:[(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.ToggleControl,{label:(0,m.__)("Show Navigation","wp-swiper"),checked:Y,onChange:()=>{i({navigation:!Y})}})}),Y&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)("p",{children:(0,m.__)("You can customize icons by uploading your own. Default icons used otherwise.","wp-swiper")})}),(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(o.MediaUploadCheck,{children:(0,a.jsx)(o.MediaUpload,{value:ye,onSelect:e=>{const t=e.sizes?.full?.url||e.url;i({previousIcon:t})},allowedTypes:["image"],render:({open:e})=>(0,a.jsx)(b.Button,{onClick:e,className:"button",children:(0,m.__)("Select previous slide icon","wp-swiper")})})})}),ye&&(0,a.jsx)(b.PanelRow,{children:j(ye)}),ye&&(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.Button,{variant:"secondary",size:"small",className:"block-library-cover__reset-button",onClick:()=>i({previousIcon:void 0}),children:(0,m.__)("Clear Media","wp-swiper")})}),(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(o.MediaUploadCheck,{children:(0,a.jsx)(o.MediaUpload,{value:xe,onSelect:e=>{const t=e.sizes?.full?.url||e.url;i({nextIcon:t})},allowedTypes:["image"],render:({open:e})=>(0,a.jsx)(b.Button,{onClick:e,className:"button",children:(0,m.__)("Select next slide icon","wp-swiper")})})})}),xe&&(0,a.jsx)(b.PanelRow,{children:j(xe)}),xe&&(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.Button,{variant:"secondary",size:"small",className:"block-library-cover__reset-button",onClick:()=>i({nextIcon:void 0}),children:(0,m.__)("Clear Media","wp-swiper")})})]}),(0,a.jsx)(De,{}),(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.ToggleControl,{label:(0,m.__)("Show Pagination","wp-swiper"),checked:K,onChange:()=>{i({pagination:!K})}})}),K&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.SelectControl,{label:(0,m.__)("Type of pagination","wp-swiper"),value:ie,options:[{label:(0,m.__)("Bullets","wp-swiper"),value:"bullets"},{label:(0,m.__)("Fraction","wp-swiper"),value:"fraction"},{label:(0,m.__)("Progress Bar","wp-swiper"),value:"progressbar"}],onChange:e=>{i({pagination_type:e})}})}),(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.ToggleControl,{label:(0,m.__)("Clickable Pagination","wp-swiper"),checked:se,onChange:()=>{i({clickable_pagination:!se})}})})]})]}),(0,a.jsx)(b.PanelBody,{title:(0,m.__)("Direction Settings","wp-swiper"),icon:"sort",initialOpen:!1,children:(0,a.jsx)(b.SelectControl,{label:(0,m.__)("Direction","wp-swiper"),help:(0,m.__)("For vertical slider, Slides Per View should be set to 1","wp-swiper"),value:ve,options:[{label:(0,m.__)("Horizontal","wp-swiper"),value:"horizontal"},{label:(0,m.__)("Vertical","wp-swiper"),value:"vertical"}],onChange:e=>{i({direction:e})}})}),(0,a.jsxs)(b.PanelBody,{title:(0,m.__)("Autoplay Behavior","wp-swiper"),icon:"controls-repeat",initialOpen:!1,children:[(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.ToggleControl,{label:(0,m.__)("Disable On Interaction","wp-swiper"),checked:A,help:(0,m.__)("Set to false and autoplay will not be disabled after user interactions (swipes), it will be restarted every time after interaction","wp-swiper"),onChange:()=>{i({disableOnInteraction:!A})}})}),(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.ToggleControl,{label:(0,m.__)("Pause On Mouse Enter","wp-swiper"),checked:T,help:(0,m.__)("When enabled autoplay will be paused on pointer (mouse) enter over Swiper container.","wp-swiper"),onChange:()=>{i({pauseOnMouseEnter:!T})}})}),(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.ToggleControl,{label:(0,m.__)("Reverse Direction","wp-swiper"),checked:V,help:(0,m.__)("Enables autoplay in reverse direction","wp-swiper"),onChange:()=>{i({reverseDirection:!V})}})}),(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.ToggleControl,{label:(0,m.__)("Stop On Last Slide","wp-swiper"),checked:E,help:(0,m.__)("Enable this parameter and autoplay will be stopped when it reaches last slide (has no effect in loop mode)","wp-swiper"),onChange:()=>{i({stopOnLastSlide:!E})}})}),(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.ToggleControl,{label:(0,m.__)("Wait For Transition","wp-swiper"),checked:D,help:(0,m.__)("When enabled autoplay will wait for wrapper transition to continue. Can be disabled in case of using Virtual Translate when your slider may not have transition","wp-swiper"),onChange:()=>{i({waitForTransition:!D})}})})]}),(0,a.jsxs)(b.PanelBody,{title:(0,m.__)("Advanced Features","wp-swiper"),icon:"admin-generic",initialOpen:!1,children:[(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.SelectControl,{label:(0,m.__)("Effect (Under Construction)","wp-swiper"),value:L,options:[{label:(0,m.__)("Slide","wp-swiper"),value:"slide"},{label:(0,m.__)("Fade","wp-swiper"),value:"fade"},{label:(0,m.__)("Cube","wp-swiper"),value:"cube"},{label:(0,m.__)("Coverflow","wp-swiper"),value:"coverflow"},{label:(0,m.__)("Flip","wp-swiper"),value:"flip"}],onChange:e=>{i({effect:e})}})}),(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.ToggleControl,{label:(0,m.__)("Mouse Wheel","wp-swiper"),help:(0,m.__)("Enables navigation through slides using mouse wheel.","wp-swiper"),checked:ee,onChange:()=>{i({mousewheel:!ee})}})}),(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.ToggleControl,{label:(0,m.__)("Release On Edges","wp-swiper"),help:(0,m.__)("Set to true and swiper will release mousewheel event and allow page scrolling when swiper is on edge positions (in the beginning or in the end) NOTE: Mouse Wheel must be set to true for this to work.","wp-swiper"),checked:te,onChange:()=>{i({releaseOnEdges:!te})}})})]}),(0,a.jsxs)(b.PanelBody,{title:(0,m.__)("Free Mode","wp-swiper"),icon:"controls-play",initialOpen:!1,children:[(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.ToggleControl,{label:(0,m.__)("Enable Free Mode","wp-swiper"),help:(0,m.__)("Whether the free mode is enabled. Slide will continue moving for a while after you release it.","wp-swiper"),checked:ae,onChange:()=>{ae&&i({freeModeSticky:!1}),i({freeMode:!ae})}})}),ae&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.RangeControl,{label:(0,m.__)("Minimum Velocity","wp-swiper"),help:(0,m.__)("Minimum touchmove-velocity required to trigger free mode momentum","wp-swiper"),value:le,onChange:e=>{i({freeModeMinimumVelocity:e})},min:0,max:1,step:.01})}),(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.ToggleControl,{label:(0,m.__)("Momentum","wp-swiper"),help:(0,m.__)("If enabled, then slide will keep moving for a while after you release it","wp-swiper"),checked:ne,onChange:()=>{i({freeModeMomentum:!ne})}})}),(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.ToggleControl,{label:(0,m.__)("Momentum Bounce","wp-swiper"),help:(0,m.__)("Set to false if you want to disable momentum bounce in free mode","wp-swiper"),checked:re,onChange:()=>{i({freeModeMomentumBounce:!re})}})}),(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.RangeControl,{label:(0,m.__)("Momentum Bounce Ratio","wp-swiper"),help:(0,m.__)("Higher value produces larger momentum bounce effect","wp-swiper"),value:de,onChange:e=>{i({freeModeMomentumBounceRatio:e})},min:0,max:10,step:.1})}),(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.RangeControl,{label:(0,m.__)("Momentum Ratio","wp-swiper"),help:(0,m.__)("Higher value produces larger momentum distance after you release slider","wp-swiper"),value:pe,onChange:e=>{i({freeModeMomentumRatio:e})},min:0,max:10,step:.1})}),(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.RangeControl,{label:(0,m.__)("Momentum Velocity Ratio","wp-swiper"),help:(0,m.__)("Higher value produces larger momentum velocity after you release slider","wp-swiper"),value:ce,onChange:e=>{i({freeModeMomentumVelocityRatio:e})},min:0,max:10,step:.1})}),(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.ToggleControl,{label:(0,m.__)("Sticky","wp-swiper"),help:(0,m.__)("Set to enabled to enable snap to slides positions in free mode","wp-swiper"),checked:ue,onChange:()=>{i({freeModeSticky:!ue})}})})]})]}),(0,a.jsxs)(b.PanelBody,{title:(0,m.__)("Responsive Breakpoints","wp-swiper"),icon:"smartphone",initialOpen:!1,children:[(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.TextareaControl,{label:(0,m.__)("Responsive breakpoints (JSON Object)","wp-swiper"),help:(0,m.__)("Allows to set different parameter for different responsive breakpoints (screen sizes). Not all parameters can be changed in breakpoints, only those which are not required different layout and logic, like slidesPerView, slidesPerGroup, spaceBetween, grid.rows. Such parameters like loop and effect won't work","wp-swiper"),value:oe,onChange:e=>{i({breakpoints:e})}})}),(0,a.jsx)(b.PanelRow,{children:(0,a.jsxs)("p",{children:[(0,m.__)("Example:","wp-swiper")," ",'{"720":{"slidesPerView":2}}'," - ",(0,m.__)("Notice the double quotes","wp-swiper")]})})]}),(0,a.jsxs)(b.PanelBody,{title:(0,m.__)("Thumbnails","wp-swiper"),icon:"images-alt2",initialOpen:!1,children:[(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.ToggleControl,{label:(0,m.__)("Thumbs","wp-swiper"),help:(0,m.__)("Enables thumbs to be used as pagination.","wp-swiper"),checked:we,onChange:()=>{i({thumbs:!we})}})}),we&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.TextControl,{label:(0,m.__)("Space Between","wp-swiper"),help:(0,m.__)("Distance between slides in px.","wp-swiper"),value:ge,onChange:e=>{i({thumbsSpaceBetween:parseInt(e)})}})}),(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.TextControl,{label:(0,m.__)("Thumbs per view","wp-swiper"),help:(0,m.__)("Number of slides per view (slides visible at the same time on slider's container). Can be a number or auto","wp-swiper"),value:me,onChange:e=>{i({thumbsSlidesPerView:parseInt(e)})}})}),(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.__experimentalAlignmentMatrixControl,{disableAlignment:["center"],value:Be,onChange:e=>Oe(e)})})]})]}),(0,a.jsxs)(b.PanelBody,{title:(0,m.__)("Developer Tools","wp-swiper"),icon:"admin-tools",initialOpen:!1,children:[(0,a.jsx)(b.ToggleControl,{label:(0,m.__)("Debug","wp-swiper"),help:(0,m.__)("Show (console.log) config JSON object for each slider","wp-swiper"),checked:be,onChange:()=>{i({debug:!be})}}),(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.Button,{onClick:()=>{let e=1;C.forEach(t=>{t.slug=`slide-${e}`,e++}),i({tabsData:C}),y(r?.innerBlocks||[])},className:"button",children:(0,m.__)("Fix Slide Slugs","wp-swiper")})}),(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)("p",{style:{marginTop:"calc(8px)",fontSize:"12px",fontStyle:"normal",color:"rgb(117, 117, 117)",marginBottom:"revert"},children:(0,m.__)("On rare occasions, if the slide slugs become out of sync with the slide data stored in the parent block, you might notice all slide contents appearing under a single tab. Clicking this button could help resolve the issue. This action iterates over each slide and resets the slugs in ascending order (e.g., slide-1, slide-2, etc.), ensuring that each tab properly corresponds to its respective slide.","wp-swiper")})}),(0,a.jsx)(B,{attributes:t,setAttributes:i})]})]}),(0,a.jsx)("div",{...n,className:s()(n.className,l),"data-tab-active":x,children:(0,a.jsxs)("div",{className:"wb-tabs-buttons-wrapper",children:[(0,a.jsxs)("div",{className:s()("wb-tabs-buttons",`wb-tabs-buttons-align-${k}`),children:[C.map((e,t)=>{const{slug:o}=e,l=x===o;return(0,a.jsxs)("div",{className:s()("wb-tabs-buttons-item",l?"wb-tabs-buttons-item-active":""),onClick:()=>i({tabActive:o}),children:[(0,a.jsxs)("h4",{children:[(0,m.__)("Slide","wp-swiper")," ",Ee++]}),(0,a.jsx)(_,{show:d,tooltipText:(0,m.__)("Remove slide?","wp-swiper"),onRemove:()=>{Te(t)}})]},`tab_button_${e.slug}`)}),d?(0,a.jsx)(b.Tooltip,{text:(0,m.__)("Add Slide","wp-swiper"),children:(0,a.jsx)(b.Button,{icon:"insert",onClick:()=>{const t=C.length+1,s=(0,g.createBlock)("da/wp-swiper-slide",{slug:`slide-${t}`}),o=[...C,{clientId:s.clientId,slug:`slide-${t}`,slideImg:"",thumbImg:""}],a=[...v(e),s];u(e,a,!1),i({tabsData:o})}})}):""]}),(0,a.jsx)("div",{className:"wp-swiper__slide-content",children:(0,a.jsx)(o.InnerBlocks,{template:S,templateLock:!1,allowedBlocks:["da/wp-swiper-slide"]})}),(0,a.jsxs)("div",{className:s()("wp-swiper__drop-zone-wrapper",{"is-dragging-over":Ie,"is-uploading":Re}),children:[(0,a.jsx)(b.DropZone,{onFilesDrop:async t=>{if(!t||0===t.length)return;const s=Array.from(t).filter(e=>e.type.startsWith("image/"));if(0!==s.length){Ae(!0),Ne(!1);try{const t=1===C.length&&!C[0].slideImg&&r?.innerBlocks?.[0]&&!r.innerBlocks[0].attributes.slideImg;let o=0,a=[...C],l=[...v(e)];if(t&&s.length>0){const e=s[0],t=await M(e),i=t.source_url||t.media_details?.sizes?.full?.source_url||"",n=t.media_details?.sizes?.thumbnail?.source_url||t.media_details?.sizes?.medium?.source_url||i,r=l[0],d=(0,g.createBlock)("da/wp-swiper-slide",{...r.attributes,slug:"slide-1",slideImg:i,slideImgId:t.id,thumbImg:n},r.innerBlocks);l[0]=d,a[0]={clientId:d.clientId,slug:"slide-1",slideImg:i,thumbImg:n},o=1}for(let e=o;e<s.length;e++){const t=s[e],i=await M(t),o=i.source_url||i.media_details?.sizes?.full?.source_url||"",n=i.media_details?.sizes?.thumbnail?.source_url||i.media_details?.sizes?.medium?.source_url||o,r=a.length+1,d=(0,g.createBlock)("da/wp-swiper-slide",{slug:`slide-${r}`,slideImg:o,slideImgId:i.id,thumbImg:n});a=[...a,{clientId:d.clientId,slug:`slide-${r}`,slideImg:o,thumbImg:n}],l=[...l,d]}l.length>0&&(u(e,l,!1),i({tabsData:a,tabActive:1===o?"slide-1":`slide-${a.length}`}))}catch(e){console.error("Error uploading images:",e);let t=(0,m.__)("Failed to upload images. Please try again.","wp-swiper");e?.message?t=e.message:e?.data?.message&&(t=e.data.message),(0,h.dispatch)(f.store).createErrorNotice(t,{type:"snackbar",isDismissible:!0})}finally{Ae(!1)}}},onDragEnter:()=>Ne(!0),onDragLeave:()=>Ne(!1)}),(0,a.jsx)("div",{className:"wp-swiper__drop-zone-content",children:Re?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("svg",{className:"wp-swiper__drop-zone-spinner",width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z",opacity:"0.3"}),(0,a.jsx)("path",{d:"M12 2v4c3.31 0 6 2.69 6 6h4c0-5.52-4.48-10-10-10z",children:(0,a.jsx)("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",from:"0 12 12",to:"360 12 12",dur:"1s",repeatCount:"indefinite"})})]}),(0,a.jsx)("p",{children:(0,m.__)("Uploading images...","wp-swiper")})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("svg",{width:"48",height:"48",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",children:(0,a.jsx)("path",{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"})}),(0,a.jsx)("p",{children:(0,m.__)("Drop images here to create slides","wp-swiper")})]})})]})]})}),(0,a.jsx)("style",{children:`\n\t\t\t\t\t\t[data-block="${e}"] [data-tab] {\n\t\t\t\t\t\t\tdisplay: none;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t[data-block="${e}"] [data-tab="${null!=x?x:"slide-1"}"] {\n\t\t\t\t\t\t\tdisplay: flex !important;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t`})]})},save:function(e){let{className:t}=e.attributes;const{align:i,overlayImg:l,overlayImgOpacity:n,slidesPerView:r,slidesPerGroup:d,slidesPerGroupAuto:p,slidesPerGroupSkip:c,spaceBetween:u,autoSlideWidth:w,autoplay:m,disableOnInteraction:g,pauseOnMouseEnter:h,reverseDirection:f,stopOnLastSlide:b,waitForTransition:v,delay:y,speed:x,loop:_,loopAddBlankSlides:j,loopAdditionalSlides:k,effect:C,navigation:P,pagination:S,mousewheel:M,releaseOnEdges:B,pagination_type:O,clickable_pagination:I,breakpoints:N,thumbs:R,thumbsSpaceBetween:A,thumbsSlidesPerView:T,autoHeight:V,sliderHeight:E,freeMode:D,freeModeMinimumVelocity:F,freeModeMomentum:H,freeModeMomentumBounce:G,freeModeMomentumBounceRatio:$,freeModeMomentumRatio:z,freeModeMomentumVelocityRatio:L,freeModeSticky:W,debug:J,direction:q,tabsData:U,previousIcon:Z,nextIcon:X,slidesOffsetBefore:Y,slidesOffsetAfter:K,overflowVisible:Q,navigationColor:ee,paginationColor:te}=e.attributes;t=s()(t,"wp-swiper"),i&&(t=s()(t,`align${i}`));const ie={};ee&&(ie["--wp-swiper-navigation-color"]=ee),te&&(ie["--wp-swiper-pagination-color"]=te);const se=o.useBlockProps.save({className:t,style:ie}),oe=(o.useInnerBlocksProps,l?{backgroundImage:`url(${l})`}:{});n&&(oe.opacity=n);let ae={"data-thumbs":{}},le={slidesPerView:"auto"===r?"auto":parseInt(r,10),slidesPerGroup:d,slidesPerGroupAuto:p,slidesPerGroupSkip:c,navigation:P,pagination:{},delay:y,speed:x,loop:_,direction:q,slidesOffsetBefore:Y,slidesOffsetAfter:K,autoHeight:V,spaceBetween:u,releaseOnEdges:B};w&&(le.autoSlideWidth=!0),M&&B&&(le.mousewheel={releaseOnEdges:"true"===B}),_&&(le.loopAddBlankSlides=j,le.loopAdditionalSlides=k),C&&(le.effect=C,"fade"===C&&(le.fadeEffect={crossFade:!0})),m&&(le.autoplay=!0,null!=y&&(le.autoplay={delay:Number(y)}),g&&(le.autoplay||(le.autoplay={}),le.autoplay.disableOnInteraction=!0),h&&(le.autoplay||(le.autoplay={}),le.autoplay.pauseOnMouseEnter=!0),f&&(le.autoplay||(le.autoplay={}),le.autoplay.reverseDirection=!0),b&&(le.autoplay||(le.autoplay={}),le.autoplay.stopOnLastSlide=!0),null!=v&&(le.autoplay||(le.autoplay={}),le.autoplay.waitForTransition=v)),D&&(le.freeMode={enabled:!0,minimumVelocity:F,momentum:H,momentumBounce:G,momentumBounceRatio:$,momentumRatio:z,momentumVelocityRatio:L,sticky:W}),le.pagination.type="bullets"!=O?O:"bullets",I&&(le.pagination.clickable=!!I||""),void 0!==N&&""!=N&&(le.breakpoints=N),R&&(ae["data-thumbs"]=JSON.stringify({spaceBetween:A,slidesPerView:T,freeMode:!0,watchSlidesProgress:!0,navigation:!1}));const ne=(void 0!==U?U:[]).map((e,t)=>(e.thumbImg||e.slideImg)&&(0,a.jsx)("div",{className:"swiper-slide wp-swiper__thumb","data-thumb":t+1,children:(0,a.jsx)("img",{src:e.thumbImg||e.slideImg,alt:`Thumbnail ${t+1}`})},t)),re=s()("swiper-container","swiper",{"swiper-overflow-visible":Q}),de={};return E&&!V&&(de.height=E),(0,a.jsxs)("div",{...se,children:[function(e,t){if(void 0!==e)return(0,a.jsx)("div",{className:"wp-swiper__overlay-img",style:t})}(l,oe),(0,a.jsxs)("div",{className:"wp-swiper__wrapper",children:[(0,a.jsx)("div",{className:re,style:Object.keys(de).length>0?de:void 0,...J?{"data-debug":!0}:{},"data-swiper":JSON.stringify(le),...ae,children:(0,a.jsx)("div",{className:"swiper-wrapper",children:(0,a.jsx)(o.InnerBlocks.Content,{})})}),function({attributes:e}){const{navigation:t}=e;if(t)return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:"wp_swiper__navigation",children:(0,a.jsxs)("div",{className:"wp_swiper__navigation-container",children:[(0,a.jsx)("div",{className:"swiper-button-prev "+(Z?"wp_swiper__button-prev":""),children:Z?(0,a.jsx)("img",{src:Z,alt:"Previous"}):null}),(0,a.jsx)("div",{className:"swiper-button-next "+(X?"wp_swiper__button-next":""),children:X?(0,a.jsx)("img",{src:X,alt:"Previous"}):null})]})})})}(e),function({attributes:e}){const{pagination:t}=e;if(t)return(0,a.jsx)("div",{className:"swiper-pagination"})}(e)]}),function({attributes:e}){let{className:t}=e;if(t=t?t.toString():"",-1!==t.indexOf("is-style-testimonials"))return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:"wp-swiper__quotes",children:(0,a.jsx)("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"quote-right",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",class:"svg-inline--fa fa-quote-right fa-w-16 fa-5x",children:(0,a.jsx)("path",{fill:"currentColor",d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z",class:""})})})})}(e),R&&(0,a.jsx)("div",{className:"wp-swiper__thumbs",children:(0,a.jsx)("div",{className:"wp-swiper__wrapper",children:(0,a.jsx)("div",{className:"swiper-container",children:(0,a.jsx)("div",{className:"swiper-wrapper",children:ne})})})})]})},deprecated:u};N.attributes={...N.attributes,freeMode:{type:"boolean",default:!1},freeModeMinimumVelocity:{type:"number",default:.02},freeModeMomentum:{type:"boolean",default:!0},freeModeMomentumBounce:{type:"boolean",default:!0},freeModeMomentumBounceRatio:{type:"number",default:1},freeModeMomentumRatio:{type:"number",default:1},freeModeMomentumVelocityRatio:{type:"number",default:1},freeModeSticky:{type:"boolean",default:!1},mousewheel:{type:"boolean",default:!1},releaseOnEdges:{type:"boolean",default:!1},pagination_type:{type:"string",default:"bullets"}};const R=JSON.parse('{"apiVersion":3,"name":"da/wp-swiper-slide","icon":{"src":"<svg viewBox=\'0 0 24 24\' xmlns=\'http://www.w3.org/2000/svg\'><rect x=\'3\' y=\'5\' width=\'18\' height=\'14\' rx=\'2\' fill=\'none\' stroke=\'currentColor\' stroke-width=\'2\'/><circle cx=\'8\' cy=\'10\' r=\'1.5\' fill=\'currentColor\'/><path d=\'M3 15 L8 11 L12 14 L16 10 L21 14 L21 17 C21 18.1 20.1 19 19 19 L5 19 C3.9 19 3 18.1 3 17 Z\' fill=\'currentColor\' opacity=\'0.4\'/></svg>"},"parent":["da/wp-swiper-slides"],"category":"media","supports":{"html":false,"className":false,"anchor":true,"inserter":false,"reusable":false},"attributes":{"align":{"type":"string","default":"undefined"},"slideImgId":{"type":"number"},"slideImg":{"type":"string"},"thumbImg":{"type":"string"},"slug":{"type":"string"},"contentValign":{"type":"string","default":""},"contentHalign":{"type":"string","default":""},"contentVHalign":{"type":"string"},"focalPoint":{"type":"object","default":{"x":0.5,"y":0.5}},"overlayColor":{"type":"object","default":{"rgb":{"r":0,"g":0,"b":0,"a":0}}},"containerWidth":{"type":"number"}}}'),A=window.wp.keycodes,T=function(e){const{label:t=(0,m.__)("Change matrix alignment"),onChange:i="undefined",value:s="center",isDisabled:o}=e,l=(0,a.jsx)(b.__experimentalAlignmentMatrixControl.Icon,{value:s}),n="block-editor-block-alignment-matrix-control",r=`${n}__popover`;return(0,a.jsx)(b.Dropdown,{placement:"bottom right",className:n,popoverProps:{className:r,isAlternate:!0},renderToggle:({onToggle:e,isOpen:i})=>(0,a.jsx)(b.ToolbarButton,{onClick:e,"aria-haspopup":"true","aria-expanded":i,onKeyDown:t=>{i||t.keyCode!==A.DOWN||(t.preventDefault(),t.stopPropagation(),e())},label:t,icon:l,showTooltip:!0,disabled:o}),renderContent:()=>(0,a.jsx)(b.__experimentalAlignmentMatrixControl,{hasFocusBorder:!1,onChange:i,value:s})})},V=window.React,{applyFilters:E}=wp.hooks,{Component:D}=wp.element,{InnerBlocks:F}=wp.blockEditor,{name:H}=R,G=class extends D{render(){const{overlayColor:e,slug:t,slideImg:i,contentVHalign:o,containerWidth:l}=this.props.attributes;let n="wp-swiper__slide swiper-slide";""!=o&&void 0!==o&&(n=s()(n,C(o)));const r=i?{backgroundImage:`url(${i})`,backgroundSize:"cover"}:{},d=l?{maxWidth:`${l}%`}:null,p=e?{backgroundColor:`rgba(${e.rgb.r}, ${e.rgb.g}, ${e.rgb.b}, ${e.rgb.a})`}:{};return(0,a.jsxs)("div",{className:n,"data-tab":t,style:r,children:[(0,a.jsx)("div",{className:"wp-swiper__overlay-color",style:p}),(0,a.jsx)("div",{className:"wp-swiper__slide-content",style:d,children:(0,a.jsx)(F.Content,{})})]})}},{focalPoint:$,...z}=R.attributes,L=[{supports:R.supports,attributes:{...z},save:G,migrate:e=>({...e,focalPoint:{x:.5,y:.5}})},{supports:R.supports,attributes:{...R.attributes},save:G}],{__:W}=wp.i18n,{name:J}=R,q={...R,title:W("Slide","@@text_domain"),description:W("A single slide within a wp-swiper block.","@@text_domain"),icon:(0,a.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2",stroke:"currentColor",fill:"transparent","stroke-width":"1.5"}),(0,a.jsx)("circle",{cx:"8",cy:"10",r:"1.5",fill:"currentColor"}),(0,a.jsx)("path",{d:"M3 15 L8 11 L12 14 L16 10 L21 14 L21 17 C21 18.1 20.1 19 19 19 L5 19 C3.9 19 3 18.1 3 17 Z",fill:"currentColor",opacity:"0.4"})]}),getEditWrapperProps:e=>({"data-tab":e.slug}),edit:function({attributes:e,setAttributes:t,clientId:i}){const{slideImg:l,thumbImg:n,overlayColor:r,contentVHalign:d,slug:p,focalPoint:c}=e,u=(0,h.useSelect)(e=>e(o.store).getBlockOrder(i).length>0,[i]),g=(0,w.useCallback)(e=>{const i=e?.sizes?.full?.url||e?.url;i&&t({slideImg:i})},[t]),f=(0,w.useCallback)(e=>{const i=e?.sizes?.full?.url||e?.url;i&&t({thumbImg:i})},[t]),v=(0,w.useCallback)(e=>{t({focalPoint:e})},[t]),y=(0,w.useCallback)(()=>{t({slideImg:void 0})},[t]),x=(0,w.useCallback)(()=>{t({thumbImg:void 0})},[t]),_=(0,w.useMemo)(()=>{let e=s()("wp-swiper__slide",{"has-image":Boolean(l)});return e=s()(e,C(d)),e},[l,d]),j=(0,o.useBlockProps)({className:_,"data-tab":p}),k=(0,w.useMemo)(()=>{var e,t;return l?{backgroundImage:`url(${l})`,backgroundPosition:`${100*(null!==(e=c?.x)&&void 0!==e?e:.5)}% ${100*(null!==(t=c?.y)&&void 0!==t?t:.5)}%`}:{}},[l,c]),P=(0,w.useMemo)(()=>{if(!r?.rgb)return{};const{r:e,g:t,b:i,a:s}=r.rgb;return{backgroundColor:`rgba(${e}, ${t}, ${i}, ${s})`}},[r]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.InspectorControls,{children:(0,a.jsxs)(b.PanelBody,{title:(0,m.__)("Image Settings","wp-swiper"),children:[(0,a.jsxs)(b.BaseControl,{label:(0,m.__)("Slide Image","wp-swiper"),children:[(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(o.MediaUploadCheck,{children:(0,a.jsx)(o.MediaUpload,{value:l,onSelect:g,allowedTypes:["image"],render:({open:e})=>(0,a.jsx)(b.Button,{onClick:e,variant:"secondary",children:(0,m.__)("Select slide image","wp-swiper")})})})}),l&&(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.FocalPointPicker,{url:l,value:c,onDragStart:v,onDrag:v,onChange:v})}),l&&(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.Button,{variant:"secondary",size:"small",className:"block-library-cover__reset-button",onClick:y,children:(0,m.__)("Clear Media","wp-swiper")})})]}),(0,a.jsxs)(b.BaseControl,{label:(0,m.__)("Thumbnail Image","wp-swiper"),children:[(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(o.MediaUploadCheck,{children:(0,a.jsx)(o.MediaUpload,{value:n,onSelect:f,allowedTypes:["image"],render:({open:e})=>(0,a.jsx)(b.Button,{onClick:e,variant:"secondary",children:(0,m.__)("Select thumb image","wp-swiper")})})})}),n&&(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.FocalPointPicker,{url:n,value:c,onDragStart:v,onDrag:v,onChange:v})}),n&&(0,a.jsx)(b.PanelRow,{children:(0,a.jsx)(b.Button,{variant:"secondary",size:"small",className:"block-library-cover__reset-button",onClick:x,children:(0,m.__)("Clear Media","wp-swiper")})})]})]})}),(0,a.jsx)(o.BlockControls,{group:"block",children:(0,a.jsx)(T,{label:(0,m.__)("Change content position","wp-swiper"),value:d,onChange:e=>t({contentVHalign:e})})}),(0,a.jsxs)("div",{...j,children:[l&&(0,a.jsx)("div",{className:"wp-swiper__slide-overlay wp-swiper__slide-overlay--image",style:k}),r?.rgb?.a>0&&(0,a.jsx)("div",{className:"wp-swiper__slide-overlay wp-swiper__slide-overlay--color",style:P}),(0,a.jsx)(o.InnerBlocks,{renderAppender:u?void 0:o.InnerBlocks.ButtonBlockAppender})]})]})},save:function(e){const{attributes:t}=e,{overlayColor:i,slug:l,slideImg:n,contentVHalign:r,containerWidth:d,focalPoint:p}=t;let c="wp-swiper__slide swiper-slide";""!=r&&void 0!==r&&(c=s()(c,C(r)));const u=n?{backgroundImage:`url(${n})`,backgroundSize:"cover",backgroundPosition:`${100*p.x}% ${100*p.y}%`}:{},w=d?{maxWidth:`${d}%`}:null,m=i?{backgroundColor:`rgba(${i.rgb.r}, ${i.rgb.g}, ${i.rgb.b}, ${i.rgb.a})`}:null,g=o.useBlockProps.save();return(0,V.createElement)("div",{...g,key:l,"data-tab":l,className:c,style:u},(0,a.jsx)("div",{className:"wp-swiper__overlay-color",...m&&{style:m}}),(0,a.jsx)("div",{className:"wp-swiper__slide-content",style:w,children:(0,a.jsx)(o.InnerBlocks.Content,{})}))},deprecated:L},{registerBlockType:U,registerBlockStyle:Z}=wp.blocks;U(I,N),U(J,q),Z(I,[{name:"testimonials",label:"Testimonials"},{name:"thumbnails-bottom-right",label:"Thumbnails Bottom Right"},{name:"overlayed-text-right",label:"Overlayed Text Right"}])})()})();
Note: See TracChangeset
for help on using the changeset viewer.