PluginProbe
bBlocks – Essential Gutenberg Blocks & Patterns Collection / 2.1.7
bBlocks – Essential Gutenberg Blocks & Patterns Collection v2.1.7
2.1.7 2.1.6 2.1.5 2.1.4 2.1.3 2.1.2 2.1.1 2.1.0 2.0.43 2.0.42 2.0.41 2.0.40 2.0.39 2.0.38 trunk 1.0 1.1 1.2 1.3 1.4 1.5 1.5.1 1.5.2 1.5.3 1.5.4 All 107 releases
← All changes | build/image-scroller/view.js +1 -1 2.0.432.1.7 View file →
@@ -1 +1 @@
1 -(()=>{"use strict";var t={5338:(t,e,n)=>{var r=n(5795);e.H=r.createRoot,r.hydrateRoot},5795:t=>{t.exports=window.ReactDOM}},e={};const n=window.React;var r=function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}(5338);const i=({attributes:t,device:e})=>{const{image:r,options:i}=t,{direction:o,isScrollAuto:s}=i,a=(0,n.useRef)(null),M=(0,n.useRef)(null),{device:c}=(()=>{const[t,e]=(0,n.useState)("desktop"),r=()=>{const t=window.innerWidth;e(t>1024?"desktop":t>640?"tablet":"mobile")};return(0,n.useEffect)((()=>(r(),window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)})),[]),{device:t}})(),l=e||c;return(0,n.useEffect)((()=>{a.current&&M.current&&s&&(a.current?.addEventListener("mouseover",(()=>{"vertical"===o&&Number(M.current.clientHeight)>parseInt(r.height[l])&&(M.current.style.transform=`translateY(-${Number(M.current.clientHeight)-parseInt(r.height[l])}px)`),"horizontal"===o&&Number(M.current.clientWidth)>Number(a.current.clientWidth)&&(M.current.style.transform=`translateX(-${Number(M.current.clientWidth)-Number(a.current.clientWidth)}px)`)})),a.current?.addEventListener("mouseout",(()=>{"vertical"===o&&(M.current.style.transform="translateY(0px)"),"horizontal"===o&&(M.current.style.transform="translateX(0px)")})))}),[s,M.current]),(0,n.createElement)((()=>(0,n.createElement)("div",{ref:a,className:`b-blocks-image-scroller-wrapper ${o} ${s?"":"scrollable"}`},(0,n.createElement)("img",{ref:M,className:"b-blocks-image-scroller",src:r.img.url,alt:r.img.alt}))),null)},o=t=>!(null==t||""===t||Array.isArray(t)&&0===t.length||"object"==typeof t&&0===Object.keys(t).length||"string"==typeof t&&""===t.trim()||"number"==typeof t&&0===t),s="@media only screen and (max-width: 1024px)",a="@media only screen and (max-width: 640px)",M=(t,e,n=!1)=>o(e)?`${t}: ${e}${n?" !important":""};`:"",c=t=>{if(!t)return"";if("string"==typeof t)return t;if("object"==typeof t&&!Array.isArray(t)){const e=["top","right","bottom","left"];return e.map((e=>t[e]||"")).every((t=>!t))?"":e.map((e=>t[e]||"0")).join(" ")}return""},l=t=>{const{position:e="center center",xPosition:n=0,yPosition:r=0,attachment:i="",repeat:s="no-repeat",size:a="cover",customSize:M="0px"}=t||{},c=t=>"initial"!==t||o(t);return`\n\t\t${c(e)?`background-position: ${"custom"===e?`${n} ${r}`:e};`:""}\n\t\t${i&&c(i)?`background-attachment: ${i};`:""}\n\t\t${c(s)?`background-repeat: ${s};`:""}\n\t\t${c(a)?`background-size: ${"custom"===a?`${M} auto`:a};`:""}\n\t`},u=(t={})=>t?{desktop:o(t.url)?`background-image: url(${t.url}); ${l(t?.desktop)}`:"",tablet:o(t.url)?l(t?.tablet):"",mobile:o(t.url)?l(t?.mobile):""}:"",d=(t,e,n=!1)=>{const{type:r="color",color:i,gradient:c,img:l,video:d}=t||{},y="color"===r?M("background",i):"gradient"===r?(t=>{const{type:e="linear",radialType:n="ellipse",colors:r=[],centerPositions:i={x:0,y:0},angel:s=0}=t||{};if(o(t)){const t=r?.map((({color:t,position:e})=>`${t} ${e}%`)),o=`linear-gradient(${s}deg, ${t})`;return M("background","radial"===e?`radial-gradient(${n} at ${i?.x}% ${i?.y}%,${t})`:o)}return""})(c):"image"===r?u(l).desktop:"",N="image"===r?u(l).tablet:"",j="image"===r?u(l).mobile:"",L=n?`${e}:hover`:e;return`\n\t\t${"video"===r?((t,e)=>{const{url:n,loop:r}=t||{},i=document.querySelector(e),o=i?.querySelector(".bPlVideo"),s=document.createElement("video");return s.muted=!0,s.autoplay=!0,s.classList.add("bPlVideo"),o||i&&n&&(s.innerHTML=`<source src=${n}></source>`,i.appendChild(s)),s.loop=r,s.play(),`${e} .bPlVideo{\n\t\tleft: 0;\n\t\tmin-height: 100%;\n\t\tmin-width: 100%;\n\t\tposition: absolute;\n\t\twidth: -webkit-fill-available;\n\t\ttop: 0;\n\t\tz-index: 0;\n\t}`})(d,e):""}\n\n\t\t${y?`${L}{\n\t\t\t${y}\n\t\t}`:""}\n\n\t\t${N?`${s} {\n\t\t\t${L}{\n\t\t\t\t${N}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${j?`${a} {\n\t\t\t${L}{\n\t\t\t\t${j}\n\t\t\t}\n\t\t}`:""}\n\t`.replace(/\s+/g," ").trim()},y=(t,e,n=!1)=>{const{isEnabled:r,colors:i,opacity:s=1,blend:a,filter:c="",blur:l=0,brightness:u=100,contrast:y=100,saturation:N=100,hue:j=0,position:L={top:0,right:0,bottom:0,left:0},zIndex:$=-1}=t||{},m=`${100!==u?`brightness(${u}%)`:""} ${100!==y?`contrast(${y}%)`:""} ${100!==N?`saturate(${N}%)`:""} ${0!==l?`blur(${l}px)`:""} ${0!==j?`hue-rotate(${j}deg)`:""}`,p=`${c}: ${c?m:""}; -webkit-${c}: ${c?m:""};`,g=n?`${e}:hover::after`:`${e}::after`;return r?`\n\t\t${e}{\n\t\t\tposition:relative;\n\t\t\tz-index:1;\n\t\t}\n\t\t${e}::after{\n\t\t\tcontent: '';\n\t\t\tposition: absolute;\n\t\t\ttop:${o(L.top)?L.top:0};\n\t\t\tright:${o(L.right)?L.right:0};\n\t\t\tbottom:${o(L.bottom)?L.bottom:0};\n\t\t\tleft:${o(L.left)?L.left:0};\n\t\t\tz-index:${$};\n\t\t}\n\t\t${d(i,g,!1)}\n\t\t${g}{\n\t\t\t${M("opacity",s)}\n\t\t\t${M("mix-blend-mode",a)}\n\t\t\t${p}\n\t\t}\n\t`.replace(/\s+/g," ").trim():""},N=(t,e,n=!1)=>{const r=(t,e="desktop")=>{if(!o(t))return"";const{skew:n,scale:r,rotate:i,offset:s,flipX:a,flipY:c}=t,{threeDRotate:l}=i||{},{isProportion:u}=r||{},d=[];return o(n)&&(o(n?.[e]?.x)&&d.push(`skewX(${n[e].x}deg)`),o(n?.[e]?.y)&&d.push(`skewY(${n[e].y}deg)`)),u?o(r?.[e]?.scale)&&d.push(`scale(${r[e].scale})`):(o(r?.[e]?.x)&&d.push(`scaleX(${r[e].x})`),o(r?.[e]?.y)&&d.push(`scaleY(${r[e].y})`)),o(i)&&(o(i?.[e]?.z)&&d.push(`rotateZ(${i[e].z}deg)`),l&&(o(i?.[e]?.x)&&d.push(`rotateX(${i[e].x}deg)`),o(i?.[e]?.y)&&d.push(`rotateY(${i[e].y}deg)`))),o(s)&&(o(s?.[e]?.x)&&d.push(`translateX(${s[e].x})`),o(s?.[e]?.y)&&d.push(`translateY(${s[e].y})`)),o(a)&&d.push(a?"scaleX(-1)":""),o(c)&&d.push(c?"scaleY(-1)":""),0===d.length?"":M("transform",d.join(" "))},i=n?`${e}:hover`:e;return`\n\t\t${i} {\n\t\t\t${r(t,"desktop")}\n\t\t}\n\t\t${s}{\n\t\t\t${i} {\n\t\t\t\t${r(t,"tablet")}\n\t\t\t}\n\t\t}\n\t\t${a}{\n\t\t\t${i} {\n\t\t\t\t${r(t,"mobile")}\n\t\t\t}\n\t\t}\n\t`},j=t=>{const{padding:e,margin:n,height:r,width:i}=t||{},o=(t,e)=>M(t,e),s=(t,e,n)=>o(t,e?.[t]?.[n])+o(`min-${t}`,e?.min?.[n])+o(`max-${t}`,e?.max?.[n]),a=t=>M("padding",c(t)),l=t=>M("margin",c(t));return{desktop:a(e?.desktop)+l(n?.desktop)+s("height",r,"desktop")+s("width",i,"desktop"),tablet:a(e?.tablet)+l(n?.tablet)+s("height",r,"tablet")+s("width",i,"tablet"),mobile:a(e?.mobile)+l(n?.mobile)+s("height",r,"mobile")+s("width",i,"mobile")}},L=t=>{const{normal:e,hover:n}=t||{},r=t=>{const{border:e,radius:n,shadow:r}=t||{},i=M("border-radius",c(n)),o=M("box-shadow",((t,e="box")=>{let n="";return t?.map(((r,i)=>{const{hOffset:o="0px",vOffset:s="0px",blur:a="0px",spreed:M="0px",color:c="#e7f0fe",isInset:l=!1}=r||{},u=l?"inset":"",d=`${o} ${s} ${a}`,y=i+1>=t.length?"":", ";n+="text"===e?`${d} ${c}${y}`:`${d} ${M} ${c} ${u}${y}`})),n||""})(r,"box"));return(t=>{if(!t)return"";const e=t=>{const{color:e="#000000",style:n="solid",width:r="0px"}=t;return`${r} ${n} ${e}`};return"object"!=typeof t||Array.isArray(t)?"":t.hasOwnProperty("top")||t.hasOwnProperty("right")||t.hasOwnProperty("bottom")||t.hasOwnProperty("left")?["top","right","bottom","left"].map((n=>t[n]?`border-${n}: ${e(t[n])};`:"")).join(" ").trim():M("border",e(t))})(e)+i+o};return{normal:r(e),hover:r(n)}},$=t=>{const{zIndex:e,overflow:n}=t||{},r=n?`overflow: ${n};`:"",i=t=>`${M("z-index",e?.[t])} ${M("position",o(e?.[t])?"relative":"")}`;return{desktop:i("desktop")+r,tablet:i("tablet"),mobile:i("mobile")}},m=(t,e)=>{const{desktop:n=!1,tablet:r=!1,mobile:i=!1}=t||{},o=e?"opacity: 0.5;":"display: none;",s=t=>t?o:"";return{desktop:s(n),tablet:s(r),mobile:s(i)}},p=(t,e,n=!1,r=!0)=>{const{dimension:i,transform:c,background:l,borderShadow:u,mask:p,animation:g,visibility:D,responsive:w,css:b=""}=e||{},x=n?`#${t}>div>div${r?":first-child":""}`:`#${t}>div`;((t,e,n)=>{const r=n?`#${e} > div`:`#${e}`,i=document.querySelector(r);i&&t&&t.type&&(i.setAttribute("data-aos",t.type),i.setAttribute("data-aos-duration",1e3*t.duration||.4),i.setAttribute("data-aos-delay",1e3*t.delay||0),i.classList.contains("aos-init")||(i.classList.add("aos-init"),window?.AOS?.init()),n)&&new IntersectionObserver((t=>{t.forEach((t=>{t.intersectionRatio>.5?i.classList.add("aos-animate"):i.classList.remove("aos-animate")}))}),{threshold:[.5]}).observe(i)})(g,t,n);const z=j(i).desktop+$(D).desktop+((t,e,n)=>{const{transition:r=.4}=t||{},{transition:i=.4}=e||{},{transition:o=200}=n||{};return`transition: background ${r}s, border ${i}s, border-radius ${i}s, box-shadow ${i}s, transform ${o}ms ease-in-out;`})(l,u,c)+(t=>{const{isMask:e=!1,shape:n={type:"circle"},size:r={type:"contain",scale:"100%"},position:i={type:"center center",x:50,y:50},repeat:o="no-repeat"}=t||{};return e?`-webkit-mask-image: url(${"custom"===n.type?n.url:(s=n.type,[{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4OSIgaGVpZ2h0PSI4OSIgdmlld0JveD0iMCAwIDg5IDg5Ij48Y2lyY2xlIGN4PSI0NC41IiBjeT0iNDQuNSIgcj0iNDQuNSIvPjwvc3ZnPg==",type:"circle"},{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4OSIgaGVpZ2h0PSI4OSIgdmlld0JveD0iMCAwIDg5IDg5Ij48cGF0aCBkPSJNNzYuMTMzMiw0NC40NzUybDYuMzI4OS02LjMyODVBMjIuMzQ4NiwyMi4zNDg2LDAsMCwwLDUwLjg1LDYuNTQ3NEw0NC41MzIsMTIuODY1MSwzOC4xNiw2LjU0NzRhMjIuMzUyNCwyMi4zNTI0LDAsMSwwLTMxLjYxMiwzMS42MWw2LjMxODEsNi4zMTc3TDYuNTQ3OCw1MC44NDdhMjIuMzUyNCwyMi4zNTI0LDAsMCwwLDMxLjYxMiwzMS42MWw2LjMxODEtNi4zMTc3TDUwLjg1LDgyLjM5MjJhMjIuMzQ4NiwyMi4zNDg2LDAsMCwwLDMxLjYxMi0zMS41OTkzWiIvPjwvc3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OSw0LjI3ODEsNzMuNzk3NWMxMy4xMzY5LDIyLjUyNCw1My4xMywxMy44NTQxLDYxLjE5MzYsMTIuMTA2MSw0LjUwMDctLjk5MzEsNTMuNDk1My0xMi4yNjUsNTUuNDY5My00Mi43MDQzQzEyMS44OTgsMjguMjUyOCwxMTEuMSwxNC40MTg1LDEwMC4wMTYsNy4zOTcyWiIvPjwvc3ZnPg==",type:"blob"},{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDMiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCAxMDMgODkiPjxwYXRoIGQ9Ik03Ny4yMTE0LDBIMjUuNzUyM0wwLDQ0LjUwNDUsMjUuNzUyMyw4OUg3Ny4yMTE0TDEwMyw0NC41MDQ1Wk02MS43NjkxLDYyLjI2MUg0MS4yMjE4TDMwLjkzOTEsNDQuNTA0NSw0MS4yMjE4LDI2LjczOUg2MS43NjkxTDcyLjA1MTksNDQuNTA0NVoiLz48L3N2Zz4=",type:"hexagon"}].find((t=>t.type===s))).svg});\n\t\t-webkit-mask-size: ${"custom"===r.type?r.scale:r.type};\n\t\t${"custom"===i.type?`${M("-webkit-mask-position-x",i.x)}\n\t\t\t${M("-webkit-mask-position-y",i.y)}`:`${M("-webkit-mask-position",i.type)}`}\n\t\t${"cover"!==r.type?`-webkit-mask-repeat: ${o};`:""}`:"";var s})(p),h=j(i).tablet+$(D).tablet+m(w,n).tablet,I=j(i).mobile+$(D).mobile+m(w,n).mobile,T=L(u).normal,k=L(u).hover,v=m(w,n).desktop;return`\n\t\t${z||T?`${x} {\n\t\t\t${z}\n\t\t\t${T}\n\t\t}`:""}\n\t\t${k?`${x}:hover {\n\t\t\t${k}\n\t\t}`:""}\n\n\t\t${v?`@media only screen and (min-width: 1025px) {\n\t\t\t${x}{\n\t\t\t\t${v}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${h?`${s} {\n\t\t\t${x}{\n\t\t\t\t${h}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${I?`${a} {\n\t\t\t${x}{\n\t\t\t\t${I}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${d(l?.normal,x)}\n\t\t${d(l?.hover,x,!0)}\n\t\t${y(l?.overlay,x)}\n\t\t${y(l?.hoverOverlay,x,!0)}\n\t\t${o(c?.normal)?N(c?.normal,x):""}\n\t\t${o(c?.hover)?N(c?.hover,x,!0):""}\n\n\t\t${b}\n\t`.replace(/\s+/g," ")},g=({attributes:t,id:e,isBackend:r=!1})=>{const{image:i,options:o,advanced:c}=t,{easing:l,duration:u}=o,d=`#${e} .b-blocks-image-scroller-wrapper`,y=`${d} .b-blocks-image-scroller`;return(0,n.createElement)("style",{dangerouslySetInnerHTML:{__html:`\n\n\t\t${d}{\n\t\t\t${M("height",i.height.desktop)}\n\t\t}\n\t\t${y}{\n\t\t\ttransition: transform ${u}ms ${l};\n\t\t}\n\t\t${s}{\n\t\t\t${M("height",i.height.tablet)}\n\t\t}\n\t\t${a}{\n\t\t\t${M("height",i.height.mobile)}\n\t\t}\n\t\t${p(e,c,r)}\n\t\t`}})};document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll(".wp-block-b-blocks-image-scroller").forEach((t=>{const e=JSON.parse(t.dataset.attributes);(0,r.H)(t).render((0,n.createElement)(n.Fragment,null,(0,n.createElement)(g,{attributes:e,id:t.id}),(0,n.createElement)("div",null,(0,n.createElement)(i,{attributes:e})))),t?.removeAttribute("data-attributes")}))}))})();
1 +(()=>{"use strict";const t=window.ReactDOM,e=window.React,n=window.ReactJSXRuntime,i=({attributes:t,device:i})=>{const{image:o,options:r}=t,{direction:a,isScrollAuto:s}=r,l=(0,e.useRef)(null),c=(0,e.useRef)(null),{device:u}=(()=>{const[t,n]=(0,e.useState)("desktop"),i=()=>{const t=window.innerWidth;n(t>1024?"desktop":t>640?"tablet":"mobile")};return(0,e.useEffect)((()=>(i(),window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)})),[]),{device:t}})(),d=i||u;(0,e.useEffect)((()=>{l.current&&c.current&&s&&(l.current?.addEventListener("mouseover",(()=>{"vertical"===a&&Number(c.current.clientHeight)>parseInt(o.height[d])&&(c.current.style.transform=`translateY(-${Number(c.current.clientHeight)-parseInt(o.height[d])}px)`),"horizontal"===a&&Number(c.current.clientWidth)>Number(l.current.clientWidth)&&(c.current.style.transform=`translateX(-${Number(c.current.clientWidth)-Number(l.current.clientWidth)}px)`)})),l.current?.addEventListener("mouseout",(()=>{"vertical"===a&&(c.current.style.transform="translateY(0px)"),"horizontal"===a&&(c.current.style.transform="translateX(0px)")})))}),[s,c.current]);const M=()=>(0,n.jsx)("div",{ref:l,className:`b-blocks-image-scroller-wrapper ${a} ${s?"":"scrollable"}`,children:(0,n.jsx)("img",{ref:c,className:"b-blocks-image-scroller",src:o.img.url,alt:o.img.alt})});return(0,n.jsx)(M,{})},o=t=>!(null==t||""===t||Array.isArray(t)&&0===t.length||"object"==typeof t&&0===Object.keys(t).length||"string"==typeof t&&""===t.trim()||"number"==typeof t&&0===t),r=t=>{try{const e=new URL(t);return["http:","https:"].includes(e.protocol)?e.toString():null}catch(e){return"string"==typeof t&&t.startsWith("/")&&!t.startsWith("//")?t:null}},a="@media only screen and (min-width: 1025px)",s="@media only screen and (max-width: 1024px)",l="@media only screen and (max-width: 640px)",c=t=>{const e=r(t);return e?`url('${e.replace(/['"()]/g,"")}')`:"none"},u=(t,e)=>o(e)?`${t}: ${e};`:"",d=t=>{if(!t)return"";if("string"==typeof t)return t;if("object"==typeof t&&!Array.isArray(t)){const e=["top","right","bottom","left"];return e.map((e=>t[e]||"")).every((t=>!t))?"":e.map((e=>t[e]||"0")).join(" ")}return""},M=t=>{const{position:e="center center",xPosition:n=0,yPosition:i=0,attachment:r="",repeat:a="no-repeat",size:s="cover",customSize:l="0px"}=t||{},c=t=>"initial"!==t||o(t);return`\n\t\t${c(e)?`background-position: ${"custom"===e?`${n} ${i}`:e};`:""}\n\t\t${r&&c(r)?`background-attachment: ${r};`:""}\n\t\t${c(a)?`background-repeat: ${a};`:""}\n\t\t${c(s)?`background-size: ${"custom"===s?`${l} auto`:s};`:""}\n\t`},p=(t={})=>t?{desktop:o(t.url)?`background-image: ${c(t.url)}; ${M(t?.desktop)}`:"",tablet:o(t.url)?M(t?.tablet):"",mobile:o(t.url)?M(t?.mobile):""}:"",$=(t,e,n=!1)=>{const{type:i="color",color:a,gradient:c,img:d,video:M}=t||{},$="color"===i?u("background",a):"gradient"===i?(t=>{const{type:e="linear",radialType:n="ellipse",colors:i=[],centerPositions:r={x:0,y:0},angel:a=0}=t||{};if(o(t)){const t=i?.map((({color:t,position:e})=>`${t} ${e}%`)),o=`linear-gradient(${a}deg, ${t})`;return u("background","radial"===e?`radial-gradient(${n} at ${r?.x}% ${r?.y}%,${t})`:o)}return""})(c):"image"===i?p(d).desktop:"",m="image"===i?p(d).tablet:"",y="image"===i?p(d).mobile:"",b=n?`${e}:hover`:e;return`\n\t\t${"video"===i?((t,e)=>{const{url:n,loop:i}=t||{},o=document.querySelector(e),a=o?.querySelector(".bPlVideo"),s=document.createElement("video");if(s.muted=!0,s.autoplay=!0,s.classList.add("bPlVideo"),!a&&o&&n){const t=r(n);if(t){const e=document.createElement("source");e.src=t,s.appendChild(e),o.appendChild(s)}}return s.loop=i,s.play(),`${e} .bPlVideo{\n\t\tleft: 0;\n\t\tmin-height: 100%;\n\t\tmin-width: 100%;\n\t\tposition: absolute;\n\t\twidth: -webkit-fill-available;\n\t\ttop: 0;\n\t\tz-index: 0;\n\t}`})(M,e):""}\n\n\t\t${$?`${b}{\n\t\t\t${$}\n\t\t}`:""}\n\n\t\t${m?`${s} {\n\t\t\t${b}{\n\t\t\t\t${m}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${y?`${l} {\n\t\t\t${b}{\n\t\t\t\t${y}\n\t\t\t}\n\t\t}`:""}\n\t`.replace(/\s+/g," ").trim()},m=(t,e,n=!1)=>{const{isEnabled:i,colors:r,opacity:a=1,blend:s,filter:l="",blur:c=0,brightness:d=100,contrast:M=100,saturation:p=100,hue:m=0,position:y={top:0,right:0,bottom:0,left:0},zIndex:b=-1}=t||{},j=`${100!==d?`brightness(${d}%)`:""} ${100!==M?`contrast(${M}%)`:""} ${100!==p?`saturate(${p}%)`:""} ${0!==c?`blur(${c}px)`:""} ${0!==m?`hue-rotate(${m}deg)`:""}`,N=`${l}: ${l?j:""}; -webkit-${l}: ${l?j:""};`,g=n?`${e}:hover::after`:`${e}::after`;return i?`\n\t\t${e}{\n\t\t\tposition:relative;\n\t\t\tz-index:1;\n\t\t}\n\t\t${e}::after{\n\t\t\tcontent: '';\n\t\t\tposition: absolute;\n\t\t\ttop:${o(y.top)?y.top:0};\n\t\t\tright:${o(y.right)?y.right:0};\n\t\t\tbottom:${o(y.bottom)?y.bottom:0};\n\t\t\tleft:${o(y.left)?y.left:0};\n\t\t\tz-index:${b};\n\t\t}\n\t\t${$(r,g,!1)}\n\t\t${g}{\n\t\t\t${u("opacity",a)}\n\t\t\t${u("mix-blend-mode",s)}\n\t\t\t${N}\n\t\t}\n\t`.replace(/\s+/g," ").trim():""},y=(t,e,n=!1)=>{const i=(t,e="desktop")=>{if(!o(t))return"";const{skew:n,scale:i,rotate:r,offset:a,flipX:s,flipY:l}=t,{threeDRotate:c}=r||{},{isProportion:d}=i||{},M=[];return o(n)&&(o(n?.[e]?.x)&&M.push(`skewX(${n[e].x}deg)`),o(n?.[e]?.y)&&M.push(`skewY(${n[e].y}deg)`)),d?o(i?.[e]?.scale)&&M.push(`scale(${i[e].scale})`):(o(i?.[e]?.x)&&M.push(`scaleX(${i[e].x})`),o(i?.[e]?.y)&&M.push(`scaleY(${i[e].y})`)),o(r)&&(o(r?.[e]?.z)&&M.push(`rotateZ(${r[e].z}deg)`),c&&(o(r?.[e]?.x)&&M.push(`rotateX(${r[e].x}deg)`),o(r?.[e]?.y)&&M.push(`rotateY(${r[e].y}deg)`))),o(a)&&(o(a?.[e]?.x)&&M.push(`translateX(${a[e].x})`),o(a?.[e]?.y)&&M.push(`translateY(${a[e].y})`)),o(s)&&M.push(s?"scaleX(-1)":""),o(l)&&M.push(l?"scaleY(-1)":""),0===M.length?"":u("transform",M.join(" "))},r=n?`${e}:hover`:e;return`\n\t\t${r} {\n\t\t\t${i(t,"desktop")}\n\t\t}\n\t\t${s}{\n\t\t\t${r} {\n\t\t\t\t${i(t,"tablet")}\n\t\t\t}\n\t\t}\n\t\t${l}{\n\t\t\t${r} {\n\t\t\t\t${i(t,"mobile")}\n\t\t\t}\n\t\t}\n\t`},b=t=>{const{padding:e,margin:n,height:i,width:o}=t||{},r=(t,e)=>u(t,e),a=(t,e,n)=>r(t,e?.[t]?.[n])+r(`min-${t}`,e?.min?.[n])+r(`max-${t}`,e?.max?.[n]),s=t=>u("padding",d(t)),l=t=>u("margin",d(t));return{desktop:s(e?.desktop)+l(n?.desktop)+a("height",i,"desktop")+a("width",o,"desktop"),tablet:s(e?.tablet)+l(n?.tablet)+a("height",i,"tablet")+a("width",o,"tablet"),mobile:s(e?.mobile)+l(n?.mobile)+a("height",i,"mobile")+a("width",o,"mobile")}},j=t=>{const{normal:e,hover:n}=t||{},i=t=>{const{border:e,radius:n,shadow:i}=t||{},o=u("border-radius",d(n)),r=u("box-shadow",((t,e="box")=>{let n="";return t?.map(((i,o)=>{const{hOffset:r="0px",vOffset:a="0px",blur:s="0px",spreed:l="0px",color:c="#e7f0fe",isInset:u=!1}=i||{},d=u?"inset":"",M=`${r} ${a} ${s}`,p=o+1>=t.length?"":", ";n+="text"===e?`${M} ${c}${p}`:`${M} ${l} ${c} ${d}${p}`})),n||""})(i,"box"));return(t=>{if(!t)return"";const e=t=>{const{color:e="#000000",style:n="solid",width:i="0px"}=t;return`${i} ${n} ${e}`};return"object"!=typeof t||Array.isArray(t)?"":t.hasOwnProperty("top")||t.hasOwnProperty("right")||t.hasOwnProperty("bottom")||t.hasOwnProperty("left")?["top","right","bottom","left"].map((n=>t[n]?`border-${n}: ${e(t[n])};`:"")).join(" ").trim():u("border",e(t))})(e)+o+r};return{normal:i(e),hover:i(n)}},N=t=>{const{zIndex:e,overflow:n}=t||{},i=n?`overflow: ${n};`:"",r=t=>`${u("z-index",e?.[t])} ${u("position",o(e?.[t])?"relative":"")}`;return{desktop:r("desktop")+i,tablet:r("tablet"),mobile:r("mobile")}},g=(t,e)=>{const{desktop:n=!1,tablet:i=!1,mobile:o=!1}=t||{},r=e?"opacity: 0.5;":"display: none;",a=t=>t?r:"";return{desktop:a(n),tablet:a(i),mobile:a(o)}},x=(t,e,n=!1,i=!0)=>{const{dimension:r,transform:d,background:M,borderShadow:p,mask:x,animation:L,visibility:w,responsive:h,position:D={},floating:f={},motion:z={},css:v=""}=e||{},k=n?`#${t}>div>div${i?":first-child":""}`:`#${t}>div`;((t,e,n)=>{const i=n?`#${e} > div`:`#${e}`,o=document.querySelector(i);o&&t&&t.type&&(o.setAttribute("data-aos",t.type),o.setAttribute("data-aos-duration",1e3*t.duration||.4),o.setAttribute("data-aos-delay",1e3*t.delay||0),o.classList.contains("aos-init")||(o.classList.add("aos-init"),window?.AOS?.init()),n)&&new IntersectionObserver((t=>{t.forEach((t=>{t.intersectionRatio>.5?o.classList.add("aos-animate"):o.classList.remove("aos-animate")}))}),{threshold:[.5]}).observe(o)})(L,t,n);const I=b(r).desktop+N(w).desktop+((t,e,n)=>{const{transition:i=.4}=t||{},{transition:o=.4}=e||{},{transition:r=200}=n||{};return`transition: background ${i}s, border ${o}s, border-radius ${o}s, box-shadow ${o}s, transform ${r}ms ease-in-out;`})(M,p,d)+(t=>{const{isMask:e=!1,shape:n={type:"circle"},size:i={type:"contain",scale:"100%"},position:o={type:"center center",x:50,y:50},repeat:r="no-repeat"}=t||{};return e?`-webkit-mask-image: ${"custom"===n.type?c(n.url):`url(${(a=n.type,[{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4OSIg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Wk02MS43NjkxLDYyLjI2MUg0MS4yMjE4TDMwLjkzOTEsNDQuNTA0NSw0MS4yMjE4LDI2LjczOUg2MS43NjkxTDcyLjA1MTksNDQuNTA0NVoiLz48L3N2Zz4=",type:"hexagon"}].find((t=>t.type===a))).svg})`};\n\t\t-webkit-mask-size: ${"custom"===i.type?i.scale:i.type};\n\t\t${"custom"===o.type?`${u("-webkit-mask-position-x",o.x)}\n\t\t\t${u("-webkit-mask-position-y",o.y)}`:`${u("-webkit-mask-position",o.type)}`}\n\t\t${"cover"!==i.type?`-webkit-mask-repeat: ${r};`:""}`:"";var a})(x),T=b(r).tablet+N(w).tablet+g(h,n).tablet,S=b(r).mobile+N(w).mobile+g(h,n).mobile,O=j(p).normal,E=j(p).hover,Y=g(h,n).desktop;return`\n\t\t${I||O?`${k} {\n\t\t\t${I}\n\t\t\t${O}\n\t\t}`:""}\n\t\t${E?`${k}:hover {\n\t\t\t${E}\n\t\t}`:""}\n\n\t\t${Y?`${a} {\n\t\t\t${k}{\n\t\t\t\t${Y}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${T?`${s} {\n\t\t\t${k}{\n\t\t\t\t${T}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${S?`${l} {\n\t\t\t${k}{\n\t\t\t\t${S}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${$(M?.normal,k)}\n\t\t${$(M?.hover,k,!0)}\n\t\t${m(M?.overlay,k)}\n\t\t${m(M?.hoverOverlay,k,!0)}\n\t\t${o(d?.normal)?y(d?.normal,k):""}\n\t\t${o(d?.hover)?y(d?.hover,k,!0):""}\n\t\t${((t,e)=>{const{desktop:n={},tablet:i={},mobile:o={}}=t,r=(t={})=>`\n\t\t${e}{\n\t\t\t${u("position",t?.type)}\n\t\t\t${u("left",t?.horizontal?.left)}\n\t\t\t${u("right",t?.horizontal?.right)}\n\t\t\t${u("top",t?.vertical?.top)}\n\t\t\t${u("bottom",t?.vertical?.bottom)}\n\t\t}\n\t`;return`\n\t\t\n\t\t${n?.type?r(n):""}\n\t\t\n\t\t${s}{\n\t\t\t${i?.type?r(i):""}\n\t\t}\n\n\t\t${l}{\n\t\t\t${o?.type?r(o):""}\n\t\t}\n\t`})(D,k)}\n\t\t${((t,e,n="")=>{const{translate:i={},rotate:r={},scale:a={},isEnabled:s=!1}=t||{};if(!s)return"";const l=[],c=[];return[{name:"Translate",property:"translate",values:i,value:t=>["x","y"].some((e=>o(i?.[e]?.[t])))?`${i?.x?.[t]||0}px ${i?.y?.[t]||0}px`:""},{name:"Rotate",property:"transform",values:r,value:t=>["x","y","z"].filter((e=>o(r?.[e]?.[t]))).map((e=>`rotate${e.toUpperCase()}(${r[e][t]}deg)`)).join(" ")},{name:"Scale",property:"scale",values:a,value:t=>{const e=a?.y?.[t],n=a?.z?.[t];return o(e)||o(n)?o(n)?`1 ${o(e)?e:1} ${n}`:`1 ${e}`:""}}].forEach((({name:t,property:e,values:i,value:o})=>{const r=o("from"),a=o("to");if(!r||!a)return;const s=Number(i?.duration)>0?Number(i.duration):1e3,u=Number(i?.delay)>0?Number(i.delay):0,d=`advFloat${t}${n?`-${n}`:""}`;l.push(`@keyframes ${d}{ from{ ${e}: ${r}; } to{ ${e}: ${a}; } }`),c.push(`${d} ${s}ms ease-in-out ${u}ms infinite alternate`)})),c.length?`\n\t\t${l.join(" ")}\n\t\t${e}{\n\t\t\tanimation: ${c.join(", ")};\n\t\t}\n\t`:""})(f,k,t)}\n\t\t${((t,e,n)=>{const{isEnable:i=!1,vertical:r={},horizontal:c={},transparency:u={},blur:d={},rotate:M={},scale:p={},effectsRelativeTo:$="viewport",effectOn:m=["desktop","tablet-portrait","mobile-portrait"],isMouseEffect:y=!1,mouseTrack:b={},tilt:j={},sticky:N={}}=t||{},g=(t,e)=>o(t)&&!isNaN(t)?Number(t):e,x="viewport"===$,L=x?"view()":"scroll(nearest block)",w=[],h=[],D=[],f=[],z=String(n??"").replace(/[^a-zA-Z0-9]/g,""),v=(t,e,n)=>{w.push(`@keyframes advMe${t}${z}{ ${e} }`),h.push(`advMe${t}${z}`),D.push(L),f.push((t=>{const e=g(t?.top,0),n=g(t?.bottom,100),i=Math.min(e,n),o=Math.max(e,n);return x?`cover ${i}% ${o>=90?"contain 100%":`cover ${o}%`}`:`min(${3*i}vh, ${i}%) min(${3*o}vh, ${o}%)`})(n))};if(i){const t=r?.direction,e=c?.direction,n=t?100*g(r?.speed,4):0,i=e?100*g(c?.speed,4):0;if(n||i){const o="up"===t?-n:n,a="to-left"===e?-i:i,s=[n&&r,i&&c].filter(Boolean);v("Translate",`from{ translate: 0px 0px; } to{ translate: ${a}px ${o}px; }`,{top:Math.min(...s.map((t=>g(t?.top,0)))),bottom:Math.max(...s.map((t=>g(t?.bottom,100))))})}const o=u?.direction;if(o){const t=Math.max(0,1-g(u?.level,5)/10),e={"fade-in":`from{ opacity: ${t}; } to{ opacity: 1; }`,"fade-out":`from{ opacity: 1; } to{ opacity: ${t}; }`,"fade-out-in":`0%{ opacity: 1; } 50%{ opacity: ${t}; } 100%{ opacity: 1; }`,"fade-in-out":`0%{ opacity: ${t}; } 50%{ opacity: 1; } 100%{ opacity: ${t}; }`}[o];e&&v("Opacity",e,u)}const a=d?.direction;if(a){const t=3*g(d?.level,4),e={"fade-in":`from{ filter: blur(${t}px); } to{ filter: blur(0px); }`,"fade-out":`from{ filter: blur(0px); } to{ filter: blur(${t}px); }`,"fade-out-in":`0%{ filter: blur(0px); } 50%{ filter: blur(${t}px); } 100%{ filter: blur(0px); }`,"fade-in-out":`0%{ filter: blur(${t}px); } 50%{ filter: blur(0px); } 100%{ filter: blur(${t}px); }`}[a];e&&v("Blur",e,d)}const s=M?.direction;if(s){const t=20*g(M?.level,4);v("Rotate",`from{ rotate: 0deg; } to{ rotate: ${"to-left"===s?-t:t}deg; }`,M)}if(p?.direction){const t=.15*g(p?.level,4),e=Math.max(0,1-t),n=1+t,i={"scale-up":`from{ scale: 1; } to{ scale: ${n}; }`,"scale-down":`from{ scale: 1; } to{ scale: ${e}; }`,"scale-down-up":`0%{ scale: 1; } 50%{ scale: ${e}; } 100%{ scale: 1; }`,"scale-up-down":`0%{ scale: 1; } 50%{ scale: ${n}; } 100%{ scale: 1; }`}[p.direction];i&&v("Scale",i,p)}}const k=[];if(y){if(b?.direction){const t="direct"===b?.direction?100:-100;k.push(((e,n)=>`translate(${(e*t).toFixed(2)}px, ${(n*t).toFixed(2)}px)`))}if(j?.direction){const t=12*("direct"===j?.direction?1:-1);k.push(((e,n)=>`perspective(1000px) rotateX(${(n*-t).toFixed(2)}deg) rotateY(${(e*t).toFixed(2)}deg)`))}}const I=(t,n,i)=>{if(!t||!t.defaultView)return;const o=t.defaultView,r=t.bPlMouse||(t.bPlMouse={x:0,y:0,items:new Map,frame:0,last:0}),a=r.items.get(e)||{x:0,y:0};if(a.rate=n,a.build=i,r.items.set(e,a),r.bound)return;r.bound=!0;const s=e=>{const n=r.last?Math.min(e-r.last,100):16.7;r.last=e;let i=!1;r.items.forEach(((e,o)=>{const a=e.el&&e.el.isConnected?e.el:t.querySelector(o);if(!a)return;e.el=a;const s=e.rate*n/1e3,l=r.x-e.x,c=r.y-e.y,u=Math.sqrt(l*l+c*c);u<=s?(e.x=r.x,e.y=r.y):(e.x+=l/u*s,e.y+=c/u*s,i=!0),a.style.transform=e.build(e.x,e.y)})),r.frame=i?o.requestAnimationFrame(s):0,r.last=i?e:0};t.addEventListener("pointermove",(t=>{r.x=2*(t.clientX/o.innerWidth-.5),r.y=2*(t.clientY/o.innerHeight-.5),r.frame||(r.frame=o.requestAnimationFrame(s))}))};if(k.length&&"undefined"!=typeof document){const t=Math.max(.25,1.5*g(b?.speed,g(j?.speed,4))),e=(t,e)=>k.map((n=>n(t,e))).join(" ");I(document,t,e),I(document.querySelector('iframe[name="editor-canvas"]')?.contentDocument,t,e)}const T=t=>N?.[t]||("desktop"===t?N?.undefined:""),S=e.split(">")[0],O=t=>{const e=T(t);return e?`position: sticky; ${e}: 0; z-index: 9;`:(t=>"tablet"===t?T("desktop"):"mobile"===t?T("tablet")||T("desktop"):"")(t)?"position: static;":""},E=Array.isArray(m)?m:o(m)?[m]:[],Y=t=>!E.length||E.includes(t)?"":`${e}{ animation-name: none; }`;return`\n\t\t${h.length?`\n\t\t${w.join(" ")}\n\t\t@supports (animation-timeline: scroll()){\n\t\t\t${e}{\n\t\t\t\tanimation-name: ${h.join(", ")};\n\t\t\t\tanimation-duration: ${h.map((()=>"auto")).join(", ")};\n\t\t\t\tanimation-timing-function: ${h.map((()=>"linear")).join(", ")};\n\t\t\t\tanimation-fill-mode: ${h.map((()=>"both")).join(", ")};\n\t\t\t\tanimation-direction: ${h.map((()=>x?"normal":"reverse")).join(", ")};\n\t\t\t\tanimation-timeline: ${D.join(", ")};\n\t\t\t\tanimation-range: ${f.join(", ")};\n\t\t\t}\n\t\t\t${Y("desktop")?`${a}{ ${Y("desktop")} }`:""}\n\t\t\t${Y("tablet-portrait")?`@media only screen and (min-width: 641px) and (max-width: 1024px){ ${Y("tablet-portrait")} }`:""}\n\t\t\t${Y("mobile-portrait")?`${l}{ ${Y("mobile-portrait")} }`:""}\n\t\t}\n\t`:""}\n\t\t${k.length?`${e}{ transition-property: background, border, border-radius, box-shadow; }`:""}\n\t\t${O("desktop")?`${S}{ ${O("desktop")} }`:""}\n\t\t${O("tablet")?`${s}{ ${S}{ ${O("tablet")} } }`:""}\n\t\t${O("mobile")?`${l}{ ${S}{ ${O("mobile")} } }`:""}\n\t`})(z,k,t)}\n\t\t${v}\n\t`.replace(/\s+/g," ")},L=({attributes:t,id:e,isBackend:i=!1})=>{const{image:o,options:r,advanced:a}=t,{easing:c,duration:d}=r,M=`#${e} .b-blocks-image-scroller-wrapper`,p=`${M} .b-blocks-image-scroller`;return(0,n.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\n\t\t${M}{\n\t\t\t${u("height",o.height.desktop)}\n\t\t}\n\t\t${p}{\n\t\t\ttransition: transform ${d}ms ${c};\n\t\t}\n\t\t${s}{\n\t\t\t${u("height",o.height.tablet)}\n\t\t}\n\t\t${l}{\n\t\t\t${u("height",o.height.mobile)}\n\t\t}\n\t\t${x(e,a,i)}\n\t\t`}})};document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll(".wp-block-b-blocks-image-scroller").forEach((e=>{const o=JSON.parse(e.dataset.attributes);(0,t.createRoot)(e).render((0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(L,{attributes:o,id:e.id}),(0,n.jsx)("div",{children:(0,n.jsx)(i,{attributes:o})})]})),e?.removeAttribute("data-attributes")}))}))})();