| @@ -1 +1,7 @@ | ||
| 1 | -(()=>{"use strict";const t=window.ReactDOM,e=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),n=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}},r="@media only screen and (min-width: 1025px)",a="@media only screen and (max-width: 1024px)",s="@media only screen and (max-width: 640px)",i="linear-gradient(135deg, #0040E3, #18D4FD)",o=window.React,l=t=>{const e=n(t);return e?`url('${e.replace(/['"()]/g,"")}')`:"none"},c=(t,n)=>e(n)?`${t}: ${n};`:"",u=(t,e=!0,n=!0,r=!0)=>{const{type:a="solid",color:s="",gradient:o=i,image:u={},position:d="center center",attachment:p="",repeat:$="no-repeat",size:m="",overlayColor:y=""}=t||{};return"gradient"===a&&n?c("background",o):"image"===a&&r?`background: ${l(u?.url)};\n\t\t\t\t${c("background-color",y)}\n\t\t\t\t${c("background-position",d)}\n\t\t\t\t${c("background-size",m)}\n\t\t\t\t${c("background-repeat",$)}\n\t\t\t\t${c("background-attachment",p)}\n\t\t\t\t${c("background-repeat",$)}\n\t\t\t\tbackground-blend-mode: overlay;`:e&&c("background",s)},d=t=>{const{width:e="",style:n="solid",color:r="",side:a="all",radius:s=""}=t||{},i=t=>{const e=a?.toLowerCase();return e?.includes("all")||e?.includes(t)},o=`${e} ${n} ${r}`,l=`\n\t\t${e&&0!==parseInt(e)?["top","right","bottom","left"].map((t=>i(t)?`border-${t}: ${o};`:"")).join(""):""}\n\t\t${c("border-radius",s)}\n\t`;return l},p=(t,e,n=!0)=>{const{fontFamily:r="Default",fontCategory:i="sans-serif",fontVariant:o=400,fontWeight:l,isUploadFont:u=!0,fontSize:d={desktop:null,tablet:null,mobile:null},fontStyle:p,textTransform:$,textDecoration:m,lineHeight:y,letterSpace:b}=e||{},h=!n||!r||"Default"===r,g=d?.desktop||d,x=d?.tablet||g,j=d?.mobile||x,M=t=>{const e=String(t);return["px","em","rem","%","vh","vw"].some((t=>e.endsWith(t)))?e:"number"==typeof t?`${e}px`:""},k=`\n\t\t${h?"":`font-family: '${r}', ${i};`}\n\t\t${c("font-weight",l)}\n\t\t${c("font-size",M(g))}\n\t\t${c("font-style",p)}\n\t\t${c("text-transform",$)}\n\t\t${c("text-decoration",m)}\n\t\t${c("line-height",y)}\n\t\t${c("letter-spacing",b)}\n\t`,v=o&&400!==o?"400i"===o?":ital@1":o?.includes("00i")?`: ital, wght@1, ${o?.replace("00i","00")} `:`: wght@${o} `:"",f=h?"":`https://fonts.googleapis.com/css2?family=${r?.split(" ").join("+")}${v.replace(/ /g,"")}&display=swap`;return{googleFontLink:!u||h?"":`@import url(${f});`,styles:`${t}{\n\t\t\t${k}\n\t\t}\n\t\t${a} {\n\t\t\t${t}{\n\t\t\t\t${c("font-size",M(x))}\n\t\t\t}\n\t\t}\n\t\t${s} {\n\t\t\t${t}{\n\t\t\t\t${c("font-size",M(j))}\n\t\t\t}\n\t\t}`.replace(/\s+/g," ").trim()}},$=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:n="center center",xPosition:r=0,yPosition:a=0,attachment:s="",repeat:i="no-repeat",size:o="cover",customSize:l="0px"}=t||{},c=t=>"initial"!==t||e(t);return`\n\t\t${c(n)?`background-position: ${"custom"===n?`${r} ${a}`:n};`:""}\n\t\t${s&&c(s)?`background-attachment: ${s};`:""}\n\t\t${c(i)?`background-repeat: ${i};`:""}\n\t\t${c(o)?`background-size: ${"custom"===o?`${l} auto`:o};`:""}\n\t`},y=(t={})=>t?{desktop:e(t.url)?`background-image: ${l(t.url)}; ${m(t?.desktop)}`:"",tablet:e(t.url)?m(t?.tablet):"",mobile:e(t.url)?m(t?.mobile):""}:"",b=(t,r,i=!1)=>{const{type:o="color",color:l,gradient:u,img:d,video:p}=t||{},$="color"===o?c("background",l):"gradient"===o?(t=>{const{type:n="linear",radialType:r="ellipse",colors:a=[],centerPositions:s={x:0,y:0},angel:i=0}=t||{};if(e(t)){const t=a?.map((({color:t,position:e})=>`${t} ${e}%`)),e=`linear-gradient(${i}deg, ${t})`;return c("background","radial"===n?`radial-gradient(${r} at ${s?.x}% ${s?.y}%,${t})`:e)}return""})(u):"image"===o?y(d).desktop:"",m="image"===o?y(d).tablet:"",b="image"===o?y(d).mobile:"",h=i?`${r}:hover`:r;return`\n\t\t${"video"===o?((t,e)=>{const{url:r,loop:a}=t||{},s=document.querySelector(e),i=s?.querySelector(".bPlVideo"),o=document.createElement("video");if(o.muted=!0,o.autoplay=!0,o.classList.add("bPlVideo"),!i&&s&&r){const t=n(r);if(t){const e=document.createElement("source");e.src=t,o.appendChild(e),s.appendChild(o)}}return o.loop=a,o.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}`})(p,r):""}\n\n\t\t${$?`${h}{\n\t\t\t${$}\n\t\t}`:""}\n\n\t\t${m?`${a} {\n\t\t\t${h}{\n\t\t\t\t${m}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${b?`${s} {\n\t\t\t${h}{\n\t\t\t\t${b}\n\t\t\t}\n\t\t}`:""}\n\t`.replace(/\s+/g," ").trim()},h=(t,n,r=!1)=>{const{isEnabled:a,colors:s,opacity:i=1,blend:o,filter:l="",blur:u=0,brightness:d=100,contrast:p=100,saturation:$=100,hue:m=0,position:y={top:0,right:0,bottom:0,left:0},zIndex:h=-1}=t||{},g=`${100!==d?`brightness(${d}%)`:""} ${100!==p?`contrast(${p}%)`:""} ${100!==$?`saturate(${$}%)`:""} ${0!==u?`blur(${u}px)`:""} ${0!==m?`hue-rotate(${m}deg)`:""}`,x=`${l}: ${l?g:""}; -webkit-${l}: ${l?g:""};`,j=r?`${n}:hover::after`:`${n}::after`;return a?`\n\t\t${n}{\n\t\t\tposition:relative;\n\t\t\tz-index:1;\n\t\t}\n\t\t${n}::after{\n\t\t\tcontent: '';\n\t\t\tposition: absolute;\n\t\t\ttop:${e(y.top)?y.top:0};\n\t\t\tright:${e(y.right)?y.right:0};\n\t\t\tbottom:${e(y.bottom)?y.bottom:0};\n\t\t\tleft:${e(y.left)?y.left:0};\n\t\t\tz-index:${h};\n\t\t}\n\t\t${b(s,j,!1)}\n\t\t${j}{\n\t\t\t${c("opacity",i)}\n\t\t\t${c("mix-blend-mode",o)}\n\t\t\t${x}\n\t\t}\n\t`.replace(/\s+/g," ").trim():""},g=(t,n,r=!1)=>{const i=(t,n="desktop")=>{if(!e(t))return"";const{skew:r,scale:a,rotate:s,offset:i,flipX:o,flipY:l}=t,{threeDRotate:u}=s||{},{isProportion:d}=a||{},p=[];return e(r)&&(e(r?.[n]?.x)&&p.push(`skewX(${r[n].x}deg)`),e(r?.[n]?.y)&&p.push(`skewY(${r[n].y}deg)`)),d?e(a?.[n]?.scale)&&p.push(`scale(${a[n].scale})`):(e(a?.[n]?.x)&&p.push(`scaleX(${a[n].x})`),e(a?.[n]?.y)&&p.push(`scaleY(${a[n].y})`)),e(s)&&(e(s?.[n]?.z)&&p.push(`rotateZ(${s[n].z}deg)`),u&&(e(s?.[n]?.x)&&p.push(`rotateX(${s[n].x}deg)`),e(s?.[n]?.y)&&p.push(`rotateY(${s[n].y}deg)`))),e(i)&&(e(i?.[n]?.x)&&p.push(`translateX(${i[n].x})`),e(i?.[n]?.y)&&p.push(`translateY(${i[n].y})`)),e(o)&&p.push(o?"scaleX(-1)":""),e(l)&&p.push(l?"scaleY(-1)":""),0===p.length?"":c("transform",p.join(" "))},o=r?`${n}:hover`:n;return`\n\t\t${o} {\n\t\t\t${i(t,"desktop")}\n\t\t}\n\t\t${a}{\n\t\t\t${o} {\n\t\t\t\t${i(t,"tablet")}\n\t\t\t}\n\t\t}\n\t\t${s}{\n\t\t\t${o} {\n\t\t\t\t${i(t,"mobile")}\n\t\t\t}\n\t\t}\n\t`},x=t=>{const{padding:e,margin:n,height:r,width:a}=t||{},s=(t,e)=>c(t,e),i=(t,e,n)=>s(t,e?.[t]?.[n])+s(`min-${t}`,e?.min?.[n])+s(`max-${t}`,e?.max?.[n]),o=t=>c("padding",$(t)),l=t=>c("margin",$(t));return{desktop:o(e?.desktop)+l(n?.desktop)+i("height",r,"desktop")+i("width",a,"desktop"),tablet:o(e?.tablet)+l(n?.tablet)+i("height",r,"tablet")+i("width",a,"tablet"),mobile:o(e?.mobile)+l(n?.mobile)+i("height",r,"mobile")+i("width",a,"mobile")}},j=t=>{const{normal:e,hover:n}=t||{},r=t=>{const{border:e,radius:n,shadow:r}=t||{},a=c("border-radius",$(n)),s=c("box-shadow",((t,e="box")=>{let n="";return t?.map(((r,a)=>{const{hOffset:s="0px",vOffset:i="0px",blur:o="0px",spreed:l="0px",color:c="#e7f0fe",isInset:u=!1}=r||{},d=u?"inset":"",p=`${s} ${i} ${o}`,$=a+1>=t.length?"":", ";n+="text"===e?`${p} ${c}${$}`:`${p} ${l} ${c} ${d}${$}`})),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():c("border",e(t))})(e)+a+s};return{normal:r(e),hover:r(n)}},M=t=>{const{zIndex:n,overflow:r}=t||{},a=r?`overflow: ${r};`:"",s=t=>`${c("z-index",n?.[t])} ${c("position",e(n?.[t])?"relative":"")}`;return{desktop:s("desktop")+a,tablet:s("tablet"),mobile:s("mobile")}},k=(t,e)=>{const{desktop:n=!1,tablet:r=!1,mobile:a=!1}=t||{},s=e?"opacity: 0.5;":"display: none;",i=t=>t?s:"";return{desktop:i(n),tablet:i(r),mobile:i(a)}},v=(t,n,i=!1,o=!0)=>{const{dimension:u,transform:d,background:p,borderShadow:$,mask:m,animation:y,visibility:v,responsive:f,position:N={},floating:w={},motion:L={},css:D=""}=n||{},z=i?`#${t}>div>div${o?":first-child":""}`:`#${t}>div`;((t,e,n)=>{const r=n?`#${e} > div`:`#${e}`,a=document.querySelector(r);a&&t&&t.type&&(a.setAttribute("data-aos",t.type),a.setAttribute("data-aos-duration",1e3*t.duration||.4),a.setAttribute("data-aos-delay",1e3*t.delay||0),a.classList.contains("aos-init")||(a.classList.add("aos-init"),window?.AOS?.init()),n)&&new IntersectionObserver((t=>{t.forEach((t=>{t.intersectionRatio>.5?a.classList.add("aos-animate"):a.classList.remove("aos-animate")}))}),{threshold:[.5]}).observe(a)})(y,t,i);const T=x(u).desktop+M(v).desktop+((t,e,n)=>{const{transition:r=.4}=t||{},{transition:a=.4}=e||{},{transition:s=200}=n||{};return`transition: background ${r}s, border ${a}s, border-radius ${a}s, box-shadow ${a}s, transform ${s}ms ease-in-out;`})(p,$,d)+(t=>{const{isMask:e=!1,shape:n={type:"circle"},size:r={type:"contain",scale:"100%"},position:a={type:"center center",x:50,y:50},repeat:s="no-repeat"}=t||{};return e?`-webkit-mask-image: ${"custom"===n.type?l(n.url):`url(${(i=n.type,[{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4OSIgaGVpZ2h0PSI4OSIgdmlld0JveD0iMCAwIDg5IDg5Ij48Y2lyY2xlIGN4PSI0NC41IiBjeT0iNDQuNSIgcj0iNDQuNSIvPjwvc3ZnPg==",type:"circle"},{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4OSIgaGVpZ2h0PSI4OSIgdmlld0JveD0iMCAwIDg5IDg5Ij48cGF0aCBkPSJNNzYuMTMzMiw0NC40NzUybDYuMzI4OS02LjMyODVBMjIuMzQ4NiwyMi4zNDg2LDAsMCwwLDUwLjg1LDYuNTQ3NEw0NC41MzIsMTIuODY1MSwzOC4xNiw2LjU0NzRhMjIuMzUyNCwyMi4zNTI0LDAsMSwwLTMxLjYxMiwzMS42MWw2LjMxODEsNi4zMTc3TDYuNTQ3OCw1MC44NDdhMjIuMzUyNCwyMi4zNTI0LDAsMCwwLDMxLjYxMiwzMS42MWw2LjMxODEtNi4zMTc3TDUwLjg1LDgyLjM5MjJhMjIuMzQ4NiwyMi4zNDg2LDAsMCwwLDMxLjYxMi0zMS41OTkzWiIvPjwvc3ZnPg==",type:"flower"},{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI5MS4xMTQzIiBoZWlnaHQ9Ijg4Ljk5OTkiIHZpZXdCb3g9IjAgMCA5MS4xMTQzIDg4Ljk5OTkiPjxwYXRoIGQ9Ik04Mi4xNzQ5LDM3LjUyNjZsMS42MTE5LTEuNjExOWMuOTQ4Ni0uOTQ4Ny02LjM3LTUuOTMwOS03LjA0OTItNi4zNzgyYTQ1LjE1MTYsNDUuMTUxNiwwLDAsMC01Ljc3NjYtMy4zMjQxYy0uMjQ2OC0uMTE1Ny0uNjAxNi0uMzAwOC0uOTg3Mi0uNDc4MnExLjc4MTYtMS44OTcyLDMuNTg2My0zLjc3MTNjLjk0ODYtLjk4LTYuMzYyOC01LjkyMzItNy4wNDkyLTYuMzcwNUE0NC4xNTc5LDQ0LjE1NzksMCwwLDAsNjAuNzUsMTIuMjYwNmwtLjI5My0uMTQ2NSwxLjM5NTktMS41NDI1Yy45NDA5LTEuMDQ4OS02LjMzMTktNS45LTcuMDQ5Mi02LjM3QTQ0LjIxMiw0NC4yMTIsMCwwLDAsNDkuMDQyMi44NjE2Yy0uNTQtLjI0NjctMi4zMTM3LTEuMjY0OC0yLjg0NTgtLjY4NjRRMzIuNzM4MSwxNS4xNjgyLDE4LjExNTQsMjkuMDY2Yy03Ljg0MzYsNy40NS0xNi41NjYzLDE1LjU3OTEtMTguMTA4OCwyNi44Ny0uMTE1Ny44MjUzLDEuMzI2NSwxLjk3NDQsMS43NDMsMi4zMTM4YTQwLjc5OSw0MC43OTksMCwwLDAsNS4zMTM5LDQuMDU2Nyw0NC4yMTc0LDQ0LjIxNzQsMCwwLDAsNS43NjExLDMuMzRjLjY0LjI5MzEsMi4xNzUsMS4yMDMxLDIuODQ1OS42ODY0bDIuMDc0Ny0xLjU1NzljMS40NSwxLjg1ODcsNS45Njk0LDQuNzIsNi42NzEyLDUuMTc1bDEuNDg4NS45NTY0QzI0LjQwMSw3Mi43NjQ3LDIyLjkyLDc0LjYzMTEsMjEuNDcsNzYuNTI4M2MtLjkxLDEuMTg3OCw2LjI2MjUsNS44NjE1LDcuMDQ5Miw2LjM3YTQ0LjE2MzMsNDQuMTYzMywwLDAsMCw1Ljc2MTEsMy4zMzE4Yy42MDE2LjI3NzYsMi4yMjg5LDEuMjM0LDIuODQ1OS42OTQxbDkuMjU1LTguMDk4Yy44MjUyLDIuNTY4MiwxNC41Njg3LDExLjYzLDE1LjY3MTYsOS45NzIxTDkxLjA2LDQ1LjM2MjRDOTEuNjkyLDQ0LjQxMzgsODYuNzI1Miw0MC4zMjYyLDgyLjE3NDksMzcuNTI2NloiLz48L3N2Zz4=",type:"sketch"},{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDMiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCAxMDMgODkiPjxwb2x5Z29uIHBvaW50cz0iNzcuMjU1IDQ0LjUwNSA1MS41IDAgMjUuNzU1IDQ0LjUwNSAwIDg5IDUxLjUgODkgMTAzIDg5IDc3LjI1NSA0NC41MDUiLz48L3N2Zz4=",type:"triangle"},{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjEuMDAwMiIgaGVpZ2h0PSI4OSIgdmlld0JveD0iMCAwIDEyMS4wMDAyIDg5Ij48cGF0aCBkPSJNMTAwLjAxNiw3LjM5NzJDOTAuMjQ1MiwxLjIyLDczLjMwODQtMy42NjYzLDY0LjQyNTUsMy43MTI2LDU2Ljk4MzYsOS44OSw2Mi4wNDY5LDE4LjkxNzQsNTUuMDEsMjUuMzAzMmMtMTAuNiw5LjYxMzQtMjguMTU4OS01LjQ0MjMtNDEuODU4NCwyLjYzMThDLjY3NTcsMzUuMjU0My00LjI3OTEsNTkuMTQ4OSw0LjI3ODEsNzMuNzk3NWMxMy4xMzY5LDIyLjUyNCw1My4xMywxMy44NTQxLDYxLjE5MzYsMTIuMTA2MSw0LjUwMDctLjk5MzEsNTMuNDk1My0xMi4yNjUsNTUuNDY5My00Mi43MDQzQzEyMS44OTgsMjguMjUyOCwxMTEuMSwxNC40MTg1LDEwMC4wMTYsNy4zOTcyWiIvPjwvc3ZnPg==",type:"blob"},{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDMiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCAxMDMgODkiPjxwYXRoIGQ9Ik03Ny4yMTE0LDBIMjUuNzUyM0wwLDQ0LjUwNDUsMjUuNzUyMyw4OUg3Ny4yMTE0TDEwMyw0NC41MDQ1Wk02MS43NjkxLDYyLjI2MUg0MS4yMjE4TDMwLjkzOTEsNDQuNTA0NSw0MS4yMjE4LDI2LjczOUg2MS43NjkxTDcyLjA1MTksNDQuNTA0NVoiLz48L3N2Zz4=",type:"hexagon"}].find((t=>t.type===i))).svg})`};\n\t\t-webkit-mask-size: ${"custom"===r.type?r.scale:r.type};\n\t\t${"custom"===a.type?`${c("-webkit-mask-position-x",a.x)}\n\t\t\t${c("-webkit-mask-position-y",a.y)}`:`${c("-webkit-mask-position",a.type)}`}\n\t\t${"cover"!==r.type?`-webkit-mask-repeat: ${s};`:""}`:"";var i})(m),S=x(u).tablet+M(v).tablet+k(f,i).tablet,I=x(u).mobile+M(v).mobile+k(f,i).mobile,C=j($).normal,E=j($).hover,A=k(f,i).desktop;return`\n\t\t${T||C?`${z} {\n\t\t\t${T}\n\t\t\t${C}\n\t\t}`:""}\n\t\t${E?`${z}:hover {\n\t\t\t${E}\n\t\t}`:""}\n\n\t\t${A?`${r} {\n\t\t\t${z}{\n\t\t\t\t${A}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${S?`${a} {\n\t\t\t${z}{\n\t\t\t\t${S}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${I?`${s} {\n\t\t\t${z}{\n\t\t\t\t${I}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${b(p?.normal,z)}\n\t\t${b(p?.hover,z,!0)}\n\t\t${h(p?.overlay,z)}\n\t\t${h(p?.hoverOverlay,z,!0)}\n\t\t${e(d?.normal)?g(d?.normal,z):""}\n\t\t${e(d?.hover)?g(d?.hover,z,!0):""}\n\t\t${((t,e)=>{const{desktop:n={},tablet:r={},mobile:i={}}=t,o=(t={})=>`\n\t\t${e}{\n\t\t\t${c("position",t?.type)}\n\t\t\t${c("left",t?.horizontal?.left)}\n\t\t\t${c("right",t?.horizontal?.right)}\n\t\t\t${c("top",t?.vertical?.top)}\n\t\t\t${c("bottom",t?.vertical?.bottom)}\n\t\t}\n\t`;return`\n\t\t\n\t\t${n?.type?o(n):""}\n\t\t\n\t\t${a}{\n\t\t\t${r?.type?o(r):""}\n\t\t}\n\n\t\t${s}{\n\t\t\t${i?.type?o(i):""}\n\t\t}\n\t`})(N,z)}\n\t\t${((t,n,r="")=>{const{translate:a={},rotate:s={},scale:i={},isEnabled:o=!1}=t||{};if(!o)return"";const l=[],c=[];return[{name:"Translate",property:"translate",values:a,value:t=>["x","y"].some((n=>e(a?.[n]?.[t])))?`${a?.x?.[t]||0}px ${a?.y?.[t]||0}px`:""},{name:"Rotate",property:"transform",values:s,value:t=>["x","y","z"].filter((n=>e(s?.[n]?.[t]))).map((e=>`rotate${e.toUpperCase()}(${s[e][t]}deg)`)).join(" ")},{name:"Scale",property:"scale",values:i,value:t=>{const n=i?.y?.[t],r=i?.z?.[t];return e(n)||e(r)?e(r)?`1 ${e(n)?n:1} ${r}`:`1 ${n}`:""}}].forEach((({name:t,property:e,values:n,value:a})=>{const s=a("from"),i=a("to");if(!s||!i)return;const o=Number(n?.duration)>0?Number(n.duration):1e3,u=Number(n?.delay)>0?Number(n.delay):0,d=`advFloat${t}${r?`-${r}`:""}`;l.push(`@keyframes ${d}{ from{ ${e}: ${s}; } to{ ${e}: ${i}; } }`),c.push(`${d} ${o}ms ease-in-out ${u}ms infinite alternate`)})),c.length?`\n\t\t${l.join(" ")}\n\t\t${n}{\n\t\t\tanimation: ${c.join(", ")};\n\t\t}\n\t`:""})(w,z,t)}\n\t\t${((t,n,i)=>{const{isEnable:o=!1,vertical:l={},horizontal:c={},transparency:u={},blur:d={},rotate:p={},scale:$={},effectsRelativeTo:m="viewport",effectOn:y=["desktop","tablet-portrait","mobile-portrait"],isMouseEffect:b=!1,mouseTrack:h={},tilt:g={},sticky:x={}}=t||{},j=(t,n)=>e(t)&&!isNaN(t)?Number(t):n,M="viewport"===m,k=M?"view()":"scroll(nearest block)",v=[],f=[],N=[],w=[],L=String(i??"").replace(/[^a-zA-Z0-9]/g,""),D=(t,e,n)=>{v.push(`@keyframes advMe${t}${L}{ ${e} }`),f.push(`advMe${t}${L}`),N.push(k),w.push((t=>{const e=j(t?.top,0),n=j(t?.bottom,100),r=Math.min(e,n),a=Math.max(e,n);return M?`cover ${r}% ${a>=90?"contain 100%":`cover ${a}%`}`:`min(${3*r}vh, ${r}%) min(${3*a}vh, ${a}%)`})(n))};if(o){const t=l?.direction,e=c?.direction,n=t?100*j(l?.speed,4):0,r=e?100*j(c?.speed,4):0;if(n||r){const a="up"===t?-n:n,s="to-left"===e?-r:r,i=[n&&l,r&&c].filter(Boolean);D("Translate",`from{ translate: 0px 0px; } to{ translate: ${s}px ${a}px; }`,{top:Math.min(...i.map((t=>j(t?.top,0)))),bottom:Math.max(...i.map((t=>j(t?.bottom,100))))})}const a=u?.direction;if(a){const t=Math.max(0,1-j(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}; }`}[a];e&&D("Opacity",e,u)}const s=d?.direction;if(s){const t=3*j(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); }`}[s];e&&D("Blur",e,d)}const i=p?.direction;if(i){const t=20*j(p?.level,4);D("Rotate",`from{ rotate: 0deg; } to{ rotate: ${"to-left"===i?-t:t}deg; }`,p)}if($?.direction){const t=.15*j($?.level,4),e=Math.max(0,1-t),n=1+t,r={"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; }`}[$.direction];r&&D("Scale",r,$)}}const z=[];if(b){if(h?.direction){const t="direct"===h?.direction?100:-100;z.push(((e,n)=>`translate(${(e*t).toFixed(2)}px, ${(n*t).toFixed(2)}px)`))}if(g?.direction){const t=12*("direct"===g?.direction?1:-1);z.push(((e,n)=>`perspective(1000px) rotateX(${(n*-t).toFixed(2)}deg) rotateY(${(e*t).toFixed(2)}deg)`))}}const T=(t,e,r)=>{if(!t||!t.defaultView)return;const a=t.defaultView,s=t.bPlMouse||(t.bPlMouse={x:0,y:0,items:new Map,frame:0,last:0}),i=s.items.get(n)||{x:0,y:0};if(i.rate=e,i.build=r,s.items.set(n,i),s.bound)return;s.bound=!0;const o=e=>{const n=s.last?Math.min(e-s.last,100):16.7;s.last=e;let r=!1;s.items.forEach(((e,a)=>{const i=e.el&&e.el.isConnected?e.el:t.querySelector(a);if(!i)return;e.el=i;const o=e.rate*n/1e3,l=s.x-e.x,c=s.y-e.y,u=Math.sqrt(l*l+c*c);u<=o?(e.x=s.x,e.y=s.y):(e.x+=l/u*o,e.y+=c/u*o,r=!0),i.style.transform=e.build(e.x,e.y)})),s.frame=r?a.requestAnimationFrame(o):0,s.last=r?e:0};t.addEventListener("pointermove",(t=>{s.x=2*(t.clientX/a.innerWidth-.5),s.y=2*(t.clientY/a.innerHeight-.5),s.frame||(s.frame=a.requestAnimationFrame(o))}))};if(z.length&&"undefined"!=typeof document){const t=Math.max(.25,1.5*j(h?.speed,j(g?.speed,4))),e=(t,e)=>z.map((n=>n(t,e))).join(" ");T(document,t,e),T(document.querySelector('iframe[name="editor-canvas"]')?.contentDocument,t,e)}const S=t=>x?.[t]||("desktop"===t?x?.undefined:""),I=n.split(">")[0],C=t=>{const e=S(t);return e?`position: sticky; ${e}: 0; z-index: 9;`:(t=>"tablet"===t?S("desktop"):"mobile"===t?S("tablet")||S("desktop"):"")(t)?"position: static;":""},E=Array.isArray(y)?y:e(y)?[y]:[],A=t=>!E.length||E.includes(t)?"":`${n}{ animation-name: none; }`;return`\n\t\t${f.length?`\n\t\t${v.join(" ")}\n\t\t@supports (animation-timeline: scroll()){\n\t\t\t${n}{\n\t\t\t\tanimation-name: ${f.join(", ")};\n\t\t\t\tanimation-duration: ${f.map((()=>"auto")).join(", ")};\n\t\t\t\tanimation-timing-function: ${f.map((()=>"linear")).join(", ")};\n\t\t\t\tanimation-fill-mode: ${f.map((()=>"both")).join(", ")};\n\t\t\t\tanimation-direction: ${f.map((()=>M?"normal":"reverse")).join(", ")};\n\t\t\t\tanimation-timeline: ${N.join(", ")};\n\t\t\t\tanimation-range: ${w.join(", ")};\n\t\t\t}\n\t\t\t${A("desktop")?`${r}{ ${A("desktop")} }`:""}\n\t\t\t${A("tablet-portrait")?`@media only screen and (min-width: 641px) and (max-width: 1024px){ ${A("tablet-portrait")} }`:""}\n\t\t\t${A("mobile-portrait")?`${s}{ ${A("mobile-portrait")} }`:""}\n\t\t}\n\t`:""}\n\t\t${z.length?`${n}{ transition-property: background, border, border-radius, box-shadow; }`:""}\n\t\t${C("desktop")?`${I}{ ${C("desktop")} }`:""}\n\t\t${C("tablet")?`${a}{ ${I}{ ${C("tablet")} } }`:""}\n\t\t${C("mobile")?`${s}{ ${I}{ ${C("mobile")} } }`:""}\n\t`})(L,z,t)}\n\t\t${D}\n\t`.replace(/\s+/g," ")},f=window.ReactJSXRuntime,N=(t,e)=>"string"==typeof t?t:t?.[e]||"mobile"===e&&t?.tablet||t?.desktop,w=({attributes:t,id:e,isBackend:n=!1})=>{const{layout:r={},player:i={},colors:o={},title:l={},artist:m={},timecode:y={},buttonStyle:b={},playBtnStyle:h={},skipBtnStyle:g={},restartBtnStyle:x={},repeatBtnStyle:j={},stopBtnStyle:M={},speedBtnStyle:k={},volumeStyle:w={},downloadStyle:L={},seekStyle:D={},playlistStyle:z={},advanced:T}=t,S=o.control,I=o.accent,C=i.bg?.color,E=o.track,A=o.trackActive,O=`#${e} .b-blocks-audio-player`,Y=`${O} .b-blocks-audio-player-player`,R=`${O} .b-blocks-audio-player-title`,U=`${O} .b-blocks-audio-player-artist`,Q=`${O} .b-blocks-audio-player-time, ${O} .b-blocks-audio-player-current, ${O} .b-blocks-audio-player-duration`,P=`${O} .b-blocks-audio-player-playpause, ${O} .b-blocks-audio-player-skip, ${O} .b-blocks-audio-player-restart, ${O} .b-blocks-audio-player-repeat, ${O} .b-blocks-audio-player-stop, ${O} .b-blocks-audio-player-speed`,_=`${O} .b-blocks-audio-player-playpause`,B=`${O} .b-blocks-audio-player-skip`,H=`${O} .b-blocks-audio-player-restart`,Z=`${O} .b-blocks-audio-player-repeat`,F=`${O} .b-blocks-audio-player-stop`,W=`${O} .b-blocks-audio-player-speed`,V=`${O} input[type='range'].b-blocks-audio-player-volume`,X=`${O} .b-blocks-audio-player-download`,q=`${O} .b-blocks-audio-player-seek-wrap`,G=`${O} input[type='range'].b-blocks-audio-player-seek`,J=`${O} .b-blocks-audio-player-list-item`,K=`${O} .b-blocks-audio-player-list-item.is-active`,tt=(t,e,n)=>c(t,$(e?.[n])),et=(t,e)=>t.split(",").map((t=>`${t.trim()}${e}`)).join(", "),nt=(t,e)=>`\n\t\t${t}{\n\t\t\t${c("color",e?.color)}\n\t\t\t${u(e?.bg)}\n\t\t\t${d(e?.border)}\n\t\t}\n\t\t${et(t,":hover")}{\n\t\t\t${c("color",e?.hoverColor)}\n\t\t\t${u(e?.hoverBg)}\n\t\t}\n\t`,rt=(t,e,n)=>{const r=N(e?.iconSize,n);return`\n\t\t\t${t}{\n\t\t\t\t${tt("margin",e?.margin,n)}\n\t\t\t\t${tt("padding",e?.padding,n)}\n\t\t\t\t${tt("border-radius",e?.borderRadius,n)}\n\t\t\t}\n\t\t\t${r?`${et(t," svg")}{ ${c("width",r)} ${c("height",r)} }`:""}\n\t\t`},at=t=>`\n\t\t${Y}{\n\t\t\t${c("max-width",N(r.maxWidth,t))}\n\t\t\t${tt("margin",i.margin,t)}\n\t\t\t${tt("padding",i.padding,t)}\n\t\t\t${tt("border-radius",i.borderRadius,t)}\n\t\t}\n\t\t${rt(P,b,t)}\n\t\t${rt(_,h,t)}\n\t\t${rt(B,g,t)}\n\t\t${rt(H,x,t)}\n\t\t${rt(Z,j,t)}\n\t\t${rt(F,M,t)}\n\t\t${rt(W,k,t)}\n\t\t${rt(V,w,t)}\n\t\t${rt(X,L,t)}\n\t\t${q}{\n\t\t\t${tt("margin",D.margin,t)}\n\t\t}\n\t\t${G}::-webkit-slider-runnable-track{\n\t\t\t${c("height",N(D.trackSize,t))}\n\t\t\t${tt("border-radius",D.borderRadius,t)}\n\t\t}\n\t\t${G}::-moz-range-track{\n\t\t\t${c("height",N(D.trackSize,t))}\n\t\t\t${tt("border-radius",D.borderRadius,t)}\n\t\t}\n\t\t${R}{\n\t\t\t${tt("margin",l.margin,t)}\n\t\t\t${tt("padding",l.padding,t)}\n\t\t\t${tt("border-radius",l.borderRadius,t)}\n\t\t}\n\t\t${U}{\n\t\t\t${tt("margin",m.margin,t)}\n\t\t\t${tt("padding",m.padding,t)}\n\t\t\t${tt("border-radius",m.borderRadius,t)}\n\t\t}\n\t\t${J}{\n\t\t\t${tt("padding",z.itemPadding,t)}\n\t\t\t${tt("border-radius",z.borderRadius,t)}\n\t\t}\n\t`,st=D.fillColor||I,it=D.trackColor,ot=D.trackColor||"rgba(127, 127, 127, 0.3)",lt=w.fillColor||I,ct=w.trackColor||"rgba(127, 127, 127, 0.3)";return(0,f.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${p("",l.typo).googleFontLink}\n\t\t\t${p("",m.typo).googleFontLink}\n\t\t\t${p("",y.typo).googleFontLink}\n\n\t\t\t${Y}{\n\t\t\t\t${c("color",S)}\n\t\t\t\t${u(i.bg)}\n\t\t\t\t${d(i.border)}\n\t\t\t}\n\n\t\t\t${P}{\n\t\t\t\t${c("color",S)}\n\t\t\t}\n\n\t\t\t${_}{\n\t\t\t\t${c("background",I)}\n\t\t\t\t${c("color",C)}\n\t\t\t}\n\n\t\t\t${Z}.is-active{\n\t\t\t\t${c("color",I)}\n\t\t\t}\n\n\t\t\t${nt(P,b)}\n\t\t\t${nt(_,h)}\n\t\t\t${nt(B,g)}\n\t\t\t${nt(H,x)}\n\t\t\t${nt(Z,j)}\n\t\t\t${nt(F,M)}\n\t\t\t${nt(W,k)}\n\t\t\t${nt(V,w)}\n\t\t\t${nt(X,L)}\n\n\t\t\t${G}::-webkit-slider-runnable-track{ background: linear-gradient(to right, ${st} 0%, ${st} var(--b-blocks-audio-player-var-progress, 0%), ${ot} var(--b-blocks-audio-player-var-progress, 0%), ${ot} 100%); }\n\t\t\t${G}::-moz-range-track{ background: ${ot}; }\n\t\t\t${G}::-moz-range-progress{ background: ${st}; }\n\t\t\t${G}::-webkit-slider-thumb {\n\t\t\t\t${c("border-color",st)}\n\t\t\t\t${c("background",S)}\n\t\t\t}\n\t\t\t${G}::-moz-range-thumb {\n\t\t\t\t${c("border-color",st)}\n\t\t\t\t${c("background",S)}\n\t\t\t}\n\n\t\t\t${V}::-webkit-slider-runnable-track{ background: linear-gradient(to right, ${lt} 0%, ${lt} var(--b-blocks-audio-player-var-progress, 0%), ${ct} var(--b-blocks-audio-player-var-progress, 0%), ${ct} 100%); }\n\t\t\t${V}::-moz-range-track{ background: ${ct}; }\n\t\t\t${V}::-moz-range-progress{ background: ${lt}; }\n\t\t\t${V}::-webkit-slider-thumb{ border-color: ${lt}; }\n\t\t\t${V}::-moz-range-thumb{ border-color: ${lt}; }\n\n\t\t\t${O} .b-blocks-audio-player-bar {\n\t\t\t\t${c("background",it||"rgba(127, 127, 127, 0.35)")}\n\t\t\t}\n\n\t\t\t${O} .b-blocks-audio-player-bar.is-played {\n\t\t\t\tbackground: ${st};\n\t\t\t}\n\n\t\t\t${O} .b-blocks-audio-player-vinyl-disc {\n\t\t\t\t${c("border-color",I)}\n\t\t\t}\n\n\t\t\t${O} .b-blocks-audio-player-vinyl-center {\n\t\t\t\t${c("background",I)}\n\t\t\t}\n\n\t\t\t${R}{\n\t\t\t\t${c("color",l.color||S)}\n\t\t\t\t${u(l.bg)}\n\t\t\t\t${d(l.border)}\n\t\t\t}\n\t\t\t${p(R,l.typo).styles}\n\t\t\t${U}{\n\t\t\t\t${c("color",m.color||S)}\n\t\t\t\t${u(m.bg)}\n\t\t\t\t${d(m.border)}\n\t\t\t}\n\t\t\t${p(U,m.typo).styles}\n\t\t\t${Q}{ ${c("color",y.color||S)} }\n\t\t\t${p(Q,y.typo).styles}\n\n\t\t\t${J}{\n\t\t\t\t${c("color",z.color||S)}\n\t\t\t\t${u(z.bg)||`background:${E};`}\n\t\t\t\t${d(z.border)}\n\t\t\t}\n\n\t\t\t${K}{\n\t\t\t\t${c("color",z.activeColor)}\n\t\t\t\t${u(z.activeBg)||`background:${A};`}\n\t\t\t}\n\n\t\t\t${at("desktop")}\n\t\t\t${a}{ ${at("tablet")} }\n\t\t\t${s}{ ${at("mobile")} }\n\t\t\t${v(e,T,n,!1)}\n\t\t\t`}})},L=window.wp.i18n,D=t=>{(!isFinite(t)||t<0)&&(t=0);const e=Math.floor(t),n=Math.floor(e/3600),r=Math.floor(e%3600/60),a=e%60,s=t=>String(t).padStart(2,"0");return n>0?`${n}:${s(r)}:${s(a)}`:`${r}:${s(a)}`},z=()=>(0,f.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",focusable:"false",children:(0,f.jsx)("path",{d:"M8 5v14l11-7z"})}),T=()=>(0,f.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",focusable:"false",children:(0,f.jsx)("path",{d:"M6 5h4v14H6zM14 5h4v14h-4z"})}),S=()=>(0,f.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",focusable:"false",children:(0,f.jsx)("path",{d:"M6 6h12v12H6z"})}),I=()=>(0,f.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",focusable:"false",children:(0,f.jsx)("path",{d:"M11 12l8.5 6V6L11 12zM4 6h2.5v12H4z"})}),C=()=>(0,f.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",focusable:"false",children:(0,f.jsx)("path",{d:"M13 12L4.5 6v12L13 12zM17.5 6H20v12h-2.5z"})}),E=()=>(0,f.jsx)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",children:(0,f.jsx)("path",{d:"M4 4v6h6M4.5 10a8 8 0 1 1-1 5",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}),A=()=>(0,f.jsx)("svg",{viewBox:"0 0 640 640",fill:"currentColor","aria-hidden":"true",focusable:"false",children:(0,f.jsx)("path",{d:"M534.6 182.6C547.1 170.1 547.1 149.8 534.6 137.3L470.6 73.3C461.4 64.1 447.7 61.4 435.7 66.4C423.7 71.4 416 83.1 416 96L416 128L256 128C150 128 64 214 64 320C64 337.7 78.3 352 96 352C113.7 352 128 337.7 128 320C128 249.3 185.3 192 256 192L416 192L416 224C416 236.9 423.8 248.6 435.8 253.6C447.8 258.6 461.5 255.8 470.7 246.7L534.7 182.7zM105.4 457.4C92.9 469.9 92.9 490.2 105.4 502.7L169.4 566.7C178.6 575.9 192.3 578.6 204.3 573.6C216.3 568.6 224 556.9 224 544L224 512L384 512C490 512 576 426 576 320C576 302.3 561.7 288 544 288C526.3 288 512 302.3 512 320C512 390.7 454.7 448 384 448L224 448L224 416C224 403.1 216.2 391.4 204.2 386.4C192.2 381.4 178.5 384.2 169.3 393.3L105.3 457.3z"})}),O=()=>(0,f.jsx)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",children:(0,f.jsx)("path",{d:"M12 3v12m0 0l-4-4m4 4l4-4M5 21h14",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})}),Y=()=>(0,f.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",children:[(0,f.jsx)("path",{d:"M9 18V6l10-2v12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"}),(0,f.jsx)("circle",{cx:"6",cy:"18",r:"3",stroke:"currentColor",strokeWidth:"1.6"}),(0,f.jsx)("circle",{cx:"16",cy:"16",r:"3",stroke:"currentColor",strokeWidth:"1.6"})]}),R="b-blocks-audio-player",U=({player:t,className:e=""})=>{const{playing:n,buffering:r,togglePlay:a}=t;return(0,f.jsx)("button",{type:"button",className:`${R}-playpause ${e}`.trim(),"aria-label":n?(0,L.__)("Pause","b-blocks"):(0,L.__)("Play","b-blocks"),"aria-pressed":n?"true":"false",onClick:a,children:r?(0,f.jsx)("span",{className:`${R}-spinner`,"aria-hidden":"true"}):(0,f.jsx)("span",{className:`${R}-icon`,"aria-hidden":"true",children:n?(0,f.jsx)(T,{}):(0,f.jsx)(z,{})})})},Q=({player:t,dir:e,className:n=""})=>(0,f.jsx)("button",{type:"button",className:`${R}-skip ${R}-skip--${e<0?"prev":"next"} ${n}`.trim(),"aria-label":e<0?(0,L.__)("Previous","b-blocks"):(0,L.__)("Next","b-blocks"),onClick:()=>t.skip(e),children:e<0?(0,f.jsx)(I,{}):(0,f.jsx)(C,{})}),P=({player:t,className:e=""})=>(0,f.jsx)("button",{type:"button",className:`${R}-stop ${e}`.trim(),"aria-label":(0,L.__)("Stop","b-blocks"),onClick:t.stop,children:(0,f.jsx)(S,{})}),_=({player:t,className:e=""})=>(0,f.jsx)("button",{type:"button",className:`${R}-restart ${e}`.trim(),"aria-label":(0,L.__)("Restart","b-blocks"),onClick:t.restart,children:(0,f.jsx)(E,{})}),B=({player:t,className:e=""})=>(0,f.jsx)("button",{type:"button",className:`${R}-repeat ${t.repeat?"is-active":""} ${e}`.trim(),"aria-label":(0,L.__)("Repeat","b-blocks"),"aria-pressed":t.repeat?"true":"false",onClick:t.toggleRepeat,children:(0,f.jsx)(A,{})}),H=({player:t,className:e=""})=>(0,f.jsxs)("button",{type:"button",className:`${R}-speed ${e}`.trim(),"aria-label":(0,L.__)("Playback speed","b-blocks"),onClick:t.cycleSpeed,children:[t.speed,"x"]}),Z=({player:t,className:e=""})=>{const{seekingRef:n,currentTime:r,duration:a,seekTo:s}=t,[i,l]=(0,o.useState)(null),c=(0,o.useRef)(null),u=(0,o.useRef)(s);c.current=i,u.current=s;const d=null!==i?i:r,p=a>0?Math.min(100,d/a*100):0;return(0,o.useEffect)((()=>{const t=()=>{if(null===c.current)return;const t=c.current;n.current=!1,l(null),u.current(t)};return window.addEventListener("pointerup",t),window.addEventListener("mouseup",t),window.addEventListener("touchend",t),window.addEventListener("pointercancel",t),()=>{window.removeEventListener("pointerup",t),window.removeEventListener("mouseup",t),window.removeEventListener("touchend",t),window.removeEventListener("pointercancel",t)}}),[n]),(0,f.jsx)("input",{type:"range",className:`${R}-seek ${e}`.trim(),min:"0",max:a||0,step:"0.1",value:d,"aria-label":(0,L.__)("Seek","b-blocks"),"aria-valuemin":"0","aria-valuemax":Math.floor(a),"aria-valuenow":Math.floor(d),"aria-valuetext":D(d),style:{"--b-blocks-audio-player-var-progress":`${p}%`},onPointerDown:()=>{n.current=!0},onChange:t=>{n.current=!0,l(parseFloat(t.target.value)||0)},onKeyUp:t=>{const e=parseFloat(t.currentTarget.value)||0;n.current=!1,l(null),s(e)}})},F=({player:t,className:e=""})=>(0,f.jsx)("input",{type:"range",className:`${R}-volume ${e}`.trim(),min:"0",max:"1",step:"0.01",value:t.muted?0:t.volume,"aria-label":(0,L.__)("Volume","b-blocks"),style:{"--b-blocks-audio-player-var-progress":100*(t.muted?0:t.volume)+"%"},onChange:e=>t.setVol(e.target.value)}),W=({player:t,remaining:e=!1,className:n=""})=>{const{currentTime:r,duration:a}=t;return e?(0,f.jsxs)("span",{className:`${R}-time ${n}`.trim(),"aria-hidden":"true",children:["-",D(Math.max(0,a-r))]}):(0,f.jsxs)("span",{className:`${R}-time ${n}`.trim(),"aria-hidden":"true",children:[(0,f.jsx)("span",{className:`${R}-current`,children:D(r)}),(0,f.jsx)("span",{className:`${R}-sep`,children:" / "}),(0,f.jsx)("span",{className:`${R}-duration`,children:D(a)})]})},V=({url:t,className:e=""})=>(0,f.jsxs)("a",{className:`${R}-download ${e}`.trim(),href:t,download:!0,"aria-label":(0,L.__)("Download audio","b-blocks"),children:[(0,f.jsx)(O,{}),(0,f.jsx)("span",{className:"screen-reader-text",children:(0,L.__)("Download audio","b-blocks")})]}),X="b-blocks-audio-player",q=({track:t})=>t.title||t.artist?(0,f.jsxs)("div",{className:`${X}-meta`,children:[t.title?(0,f.jsx)("p",{className:`${X}-title`,children:t.title}):null,t.artist?(0,f.jsx)("p",{className:`${X}-artist`,children:t.artist}):null]}):null,G=({track:t,className:e=""})=>(0,f.jsx)("div",{className:`${X}-art ${e}`.trim(),children:t.art?(0,f.jsx)("img",{className:`${X}-art-img`,src:t.art,alt:"",loading:"lazy",decoding:"async"}):(0,f.jsx)("span",{className:`${X}-art-placeholder`,"aria-hidden":"true",children:(0,f.jsx)(Y,{})})}),J=t=>{const e=43758.5453*Math.sin(12.9898*t);return 18+42*(e-Math.floor(e))},K=new WeakMap,tt=({player:t})=>{const e=(0,o.useRef)([]),n=(0,o.useRef)(0),{playing:r,audioRef:a,url:s}=t,i=()=>{for(let t=0;t<e.current.length;t++){const n=e.current[t];n&&(n.style.height=`${J(t)}%`)}};return(0,o.useEffect)((()=>{i()}),[]),(0,o.useEffect)((()=>{const t=a.current;if(!r||!t)return void i();const s=(t=>{if(K.has(t))return K.get(t);let e=null;try{const n=window.AudioContext||window.webkitAudioContext;if(n){const r=new n,a=r.createMediaElementSource(t),s=r.createAnalyser();s.fftSize=128,s.smoothingTimeConstant=.75,a.connect(s),s.connect(r.destination),e={ctx:r,analyser:s,data:new Uint8Array(s.frequencyBinCount)}}}catch(t){e=null}return K.set(t,e),e})(t);if(!s)return void i();"suspended"===s.ctx.state&&s.ctx.resume();const{analyser:o,data:l}=s,c=l.length,u=()=>{o.getByteFrequencyData(l);for(let t=0;t<56;t++){const n=e.current[t];if(!n)continue;const r=Math.min(c-1,Math.floor((t/56)**.85*c)),a=l[r]/255;n.style.height=8+92*a+"%"}n.current=requestAnimationFrame(u)};return n.current=requestAnimationFrame(u),()=>cancelAnimationFrame(n.current)}),[r,s]),(0,f.jsx)("div",{className:`${X}-bars`,"aria-hidden":"true",children:Array.from({length:56}).map(((n,r)=>(0,f.jsx)("span",{ref:t=>{e.current[r]=t},className:`${X}-bar${r/56*100<=t.seekPct?" is-played":""}`},r)))})},et=({attributes:t,isBackend:e=!1})=>{const{layout:n={},behavior:r={},timecode:a={}}=t,s=((t,e=!1)=>{const{behavior:n={}}=t,{autoPlay:r=!1,loop:a=!1,skipSeconds:s=10,speeds:i=[1,1.25,1.5,2]}=n,l=(0,o.useMemo)((()=>(t=>{const{audio:e={},tracks:n=[]}=t,r=(Array.isArray(n)?n:[]).map((t=>({url:t?.url||"",title:t?.title||"",artist:t?.artist||"",art:t?.art?.url||""}))).filter((t=>t.url));return r.length?r:[{url:e.url||"",title:e.trackTitle||"",artist:e.artistName||"",art:e.albumArt?.url||""}]})(t)),[t]),c=l.length>1,u=(0,o.useRef)(null),d=(0,o.useRef)(!1),p=(0,o.useRef)(!1),$=(0,o.useRef)(0),m=(0,o.useRef)(""),y=(0,o.useRef)(!1),[b,h]=(0,o.useState)({}),[g,x]=(0,o.useState)(0),[j,M]=(0,o.useState)(!1),[k,v]=(0,o.useState)(!1),[f,N]=(0,o.useState)(0),[w,L]=(0,o.useState)(0),[D,z]=(0,o.useState)(1),[T,S]=(0,o.useState)(!1),[I,C]=(0,o.useState)(1),[E,A]=(0,o.useState)(!!a),O=l[Math.min(g,l.length-1)]||{},Y=O.url||"",[R,U]=(0,o.useState)(Y);(0,o.useEffect)((()=>{if(U(Y),!Y||"undefined"==typeof fetch)return;let t=!1;return fetch(Y).then((t=>t.ok?t.blob():Promise.reject(t.status))).then((e=>{if(t)return;const n=URL.createObjectURL(e),r=u.current;r&&($.current=r.currentTime||0,p.current=!r.paused),m.current&&URL.revokeObjectURL(m.current),m.current=n,U(n)})).catch((()=>{})),()=>{t=!0}}),[Y]),(0,o.useEffect)((()=>()=>{m.current&&URL.revokeObjectURL(m.current)}),[]),(0,o.useEffect)((()=>{if("undefined"==typeof window||"undefined"==typeof Audio||!l||!l.length)return;const t=[];return l.forEach((e=>{if(!e.url)return;const n=new Audio;n.preload="metadata";const r=()=>{isFinite(n.duration)&&n.duration>0&&h((t=>({...t,[e.url]:n.duration})))};n.addEventListener("loadedmetadata",r),n.src=e.url,t.push({audio:n,onMeta:r})})),()=>{t.forEach((({audio:t,onMeta:e})=>{t.removeEventListener("loadedmetadata",e)}))}}),[l]),(0,o.useEffect)((()=>{const t=u.current;if(!t)return;const e=()=>M(!0),n=()=>M(!1),r=()=>{if(t.duration===1/0){y.current=!0;try{t.currentTime=1e101}catch(t){}return}const e=isFinite(t.duration)?t.duration:0;if(e>0&&(N(e),Y&&h((t=>({...t,[Y]:e})))),y.current||$.current>0){y.current=!1;const e=$.current||0;$.current=0;try{t.currentTime=e}catch(t){}L(e)}if(p.current){p.current=!1;const e=t.play();e&&"function"==typeof e.catch&&e.catch((()=>M(!1)))}},a=()=>{d.current||y.current||L(t.currentTime||0)},s=()=>v(!0),i=()=>{v(!1),M(!0)},o=()=>v(!1),m=()=>{z(t.volume),S(t.muted)},b=()=>{if(E&&!c)return t.currentTime=0,void t.play().catch((()=>{}));c&&g<l.length-1?x((t=>t+1)):c&&E?x(0):M(!1)};return t.addEventListener("play",e),t.addEventListener("pause",n),t.addEventListener("loadedmetadata",r),t.addEventListener("durationchange",r),t.addEventListener("timeupdate",a),t.addEventListener("waiting",s),t.addEventListener("playing",i),t.addEventListener("canplay",o),t.addEventListener("volumechange",m),t.addEventListener("ended",b),t.playbackRate=I,t.readyState>=1&&r(),()=>{t.removeEventListener("play",e),t.removeEventListener("pause",n),t.removeEventListener("loadedmetadata",r),t.removeEventListener("durationchange",r),t.removeEventListener("timeupdate",a),t.removeEventListener("waiting",s),t.removeEventListener("playing",i),t.removeEventListener("canplay",o),t.removeEventListener("volumechange",m),t.removeEventListener("ended",b)}}),[Y,E,c,g,l.length]),(0,o.useEffect)((()=>{u.current&&(u.current.playbackRate=I)}),[I,Y]);const Q=(0,o.useRef)(!1);(0,o.useEffect)((()=>{const t=u.current;t&&(Q.current||!r||e||(Q.current=!0,t.muted=!0,t.play().catch((()=>{}))))}),[r,e,Y]);const P=()=>{const t=u.current;if(!t)return;const e=t.play();e&&"function"==typeof e.catch&&e.catch((()=>M(!1)))},_=()=>{const t=u.current;t&&(t.paused||t.ended?P():u.current&&u.current.pause())},B=t=>{let e=parseFloat(t);if(Number.isNaN(e))return null;const n=u.current,r=(n&&isFinite(n.duration)?n.duration:0)||f||b[Y]||0;return r>0&&(e=Math.min(e,r)),Math.max(0,e)},H=t=>{const e=B(t);if(null===e)return;L(e);const n=u.current;if(n)try{n.currentTime=e}catch(t){}},Z=t=>{const e=(t%l.length+l.length)%l.length;e!==g?(p.current=!0,x(e),L(0)):_()},F=f||b[Y]||0;return{audioRef:u,seekingRef:d,mediaSrc:R,list:l,index:g,multi:c,track:O,url:Y,playing:j,buffering:k,duration:F,durations:b,currentTime:w,volume:D,muted:T,speed:I,repeat:E,seekPct:F>0?w/F*100:0,togglePlay:_,stop:()=>{const t=u.current;t&&(t.pause(),t.currentTime=0,L(0))},restart:()=>{const t=u.current;t&&(t.currentTime=0,L(0),P())},skip:t=>{if(c)return void Z(g+t);const e=u.current;if(!e)return;const n=Math.min(Math.max(0,(e.currentTime||0)+t*s),e.duration||0);H(n)},seekTo:H,previewTime:t=>{const e=B(t);null!==e&&L(e)},playIndex:Z,setVol:t=>{const e=u.current,n=Math.min(1,Math.max(0,parseFloat(t)||0));z(n),e&&(e.volume=n,n>0&&(e.muted=!1))},toggleMute:()=>{const t=u.current;t&&(t.muted=!t.muted)},cycleSpeed:()=>{const t=i&&i.length?i:[1],e=t.indexOf(I);C(t[(e+1)%t.length])},toggleRepeat:()=>A((t=>!t))}})(t,e),{url:i,track:l,list:c,index:u,playing:d}=s,p=n.style||"bar",$="left"===a.position,m=!1!==r.showSeek,y=!1!==r.showSkip,b=!1!==r.showTimecode,h=!1!==r.showVolume,g=!1!==r.showDownload,x=!!r.showRestart,j=!!r.showStop,M=!!r.showRepeat,k=!!r.showSpeed,v=!!r.showRemaining,N=[X,`${X}--style-${p}`,`${X}--align-${n.alignment||"left"}`,d?"is-playing":""].filter(Boolean).join(" ");if(!i)return(0,f.jsx)("div",{className:N,children:(0,f.jsxs)("div",{className:`${X}-empty`,children:[(0,f.jsx)("span",{className:`${X}-empty-icon`,"aria-hidden":"true",children:(0,f.jsx)(Y,{})}),(0,f.jsx)("span",{className:`${X}-empty-title`,children:(0,L.__)("No audio selected","b-blocks")}),(0,f.jsx)("span",{className:`${X}-empty-text`,children:(0,L.__)("Add an audio file to start playing.","b-blocks")})]})});const w=(0,f.jsx)("audio",{ref:s.audioRef,className:`${X}-audio`,preload:"metadata",src:s.mediaSrc||i,children:(0,L.__)("Your browser does not support the audio element.","b-blocks")}),S=(t=null)=>(0,f.jsxs)("div",{className:`${X}-transport`,children:[x?(0,f.jsx)(_,{player:s}):null,y?(0,f.jsx)(Q,{player:s,dir:-1}):null,(0,f.jsx)(U,{player:s}),y?(0,f.jsx)(Q,{player:s,dir:1}):null,j?(0,f.jsx)(P,{player:s}):null,M?(0,f.jsx)(B,{player:s}):null,t]}),I=b?(0,f.jsx)(W,{player:s}):null,C=(0,f.jsxs)("div",{className:`${X}-controls`,children:[S(),$?I:null,m?(0,f.jsx)("div",{className:`${X}-seek-wrap`,children:(0,f.jsx)(Z,{player:s})}):null,$?null:I,v?(0,f.jsx)(W,{player:s,remaining:!0}):null,k?(0,f.jsx)(H,{player:s}):null,h?(0,f.jsx)(F,{player:s}):null,g?(0,f.jsx)(V,{url:i}):null]});let E;return"bar"===p||"card"===p?E=(0,f.jsxs)("div",{className:`${X}-player`,role:"region","aria-label":(0,L.__)("Audio player","b-blocks"),children:["card"===p?(0,f.jsx)(G,{track:l}):null,(0,f.jsxs)("div",{className:`${X}-body`,children:[(0,f.jsx)(q,{track:l}),C]})]}):"bars"===p?E=(0,f.jsxs)("div",{className:`${X}-player`,role:"region","aria-label":(0,L.__)("Audio player","b-blocks"),children:[(0,f.jsx)(q,{track:l}),(0,f.jsxs)("div",{className:`${X}-wave-seek`,children:[(0,f.jsx)(tt,{player:s}),(0,f.jsx)(Z,{player:s,className:`${X}-seek--overlay`})]}),(0,f.jsxs)("div",{className:`${X}-controls`,children:[S(),$&&b?(0,f.jsx)(W,{player:s,className:`${X}-time--current`,remaining:!1}):null,m?(0,f.jsx)("div",{className:`${X}-seek-wrap`,children:(0,f.jsx)(Z,{player:s})}):null,!$&&b?(0,f.jsx)(W,{player:s,className:`${X}-time--current`,remaining:!1}):null,h?(0,f.jsx)(F,{player:s}):null,v?(0,f.jsx)(W,{player:s,remaining:!0}):null,k?(0,f.jsx)(H,{player:s}):null,g?(0,f.jsx)(V,{url:i}):null]})]}):"vinyl"===p?E=(0,f.jsxs)("div",{className:`${X}-player`,role:"region","aria-label":(0,L.__)("Audio player","b-blocks"),children:[(0,f.jsxs)("div",{className:`${X}-vinyl`,children:[(0,f.jsxs)("div",{className:`${X}-vinyl-disc`,children:[l.art?(0,f.jsx)("img",{className:`${X}-vinyl-art`,src:l.art,alt:""}):null,(0,f.jsx)("span",{className:`${X}-vinyl-center`})]}),(0,f.jsxs)("div",{className:`${X}-vinyl-arm`,"aria-hidden":"true",children:[(0,f.jsx)("span",{className:`${X}-vinyl-arm-base`}),(0,f.jsx)("span",{className:`${X}-vinyl-arm-stick`}),(0,f.jsx)("span",{className:`${X}-vinyl-arm-head`})]})]}),(0,f.jsxs)("div",{className:`${X}-body`,children:[l.title?(0,f.jsx)("p",{className:`${X}-title ${X}-title--pill`,children:l.title}):null,m?(0,f.jsx)("div",{className:`${X}-seek-wrap`,children:(0,f.jsx)(Z,{player:s})}):null,S(),(0,f.jsxs)("div",{className:`${X}-vinyl-row`,children:[b?(0,f.jsxs)("span",{className:`${X}-time ${X}-time--pill`,"aria-hidden":"true",children:[D(s.currentTime)," / ",D(s.duration)]}):null,v?(0,f.jsx)(W,{player:s,remaining:!0,className:`${X}-time--pill`}):null,h?(0,f.jsx)(F,{player:s}):null]})]}),g?(0,f.jsx)(V,{url:i}):null]}):"coverflow"===p?E=(0,f.jsxs)("div",{className:`${X}-player`,role:"region","aria-label":(0,L.__)("Audio player","b-blocks"),children:[g?(0,f.jsx)(V,{url:i}):null,(0,f.jsx)("div",{className:`${X}-coverflow`,children:c.map(((t,e)=>{const n=e-u;return Math.abs(n)>2?null:(0,f.jsx)("button",{type:"button",className:`${X}-cover ${X}-cover--pos${n}`,"aria-label":t.title||(0,L.__)("Track","b-blocks"),"aria-current":0===n?"true":void 0,onClick:()=>s.playIndex(e),children:t.art?(0,f.jsx)("img",{src:t.art,alt:""}):(0,f.jsx)("span",{className:`${X}-art-placeholder`,"aria-hidden":"true",children:(0,f.jsx)(Y,{})})},e)}))}),(0,f.jsx)(q,{track:l}),(0,f.jsxs)("div",{className:`${X}-controls`,children:[b?(0,f.jsx)("span",{className:`${X}-current`,children:D(s.currentTime)}):null,m?(0,f.jsx)("div",{className:`${X}-seek-wrap`,children:(0,f.jsx)(Z,{player:s})}):null,b?(0,f.jsx)("span",{className:`${X}-duration`,children:D(s.duration)}):null,v?(0,f.jsx)(W,{player:s,remaining:!0}):null]}),S()]}):"playlist"===p&&(E=(0,f.jsxs)("div",{className:`${X}-player`,role:"region","aria-label":(0,L.__)("Audio player","b-blocks"),children:[g?(0,f.jsx)(V,{url:i}):null,(0,f.jsxs)("div",{className:`${X}-nowplaying`,children:[b?(0,f.jsx)("span",{className:`${X}-current`,children:D(s.currentTime)}):null,l.title?(0,f.jsx)("span",{className:`${X}-np-title`,children:l.title}):null,b?(0,f.jsx)("span",{className:`${X}-duration`,children:D(s.duration)}):null,v?(0,f.jsx)(W,{player:s,remaining:!0}):null]}),m?(0,f.jsx)("div",{className:`${X}-seek-wrap`,children:(0,f.jsx)(Z,{player:s})}):null,S(),h?(0,f.jsx)("div",{className:`${X}-volume-row`,children:(0,f.jsx)(F,{player:s})}):null,(0,f.jsx)("ul",{className:`${X}-list`,children:c.map(((t,e)=>{const n=e===u&&s.duration>0?s.duration:s.durations?.[t.url]||t.duration||0,r=()=>e===u?s.togglePlay():s.playIndex(e);return(0,f.jsxs)("li",{className:`${X}-list-item ${e===u?"is-active":""}`.trim(),onClick:r,onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),r())},role:"button",tabIndex:0,"aria-label":t.title||`${(0,L.__)("Track","b-blocks")} ${e+1}`,children:[(0,f.jsx)("button",{type:"button",className:`${X}-list-play`,"aria-hidden":"true",tabIndex:-1,onClick:t=>{t.stopPropagation(),r()},children:e===u&&d?(0,f.jsx)(T,{}):(0,f.jsx)(z,{})}),(0,f.jsx)("span",{className:`${X}-list-title`,children:t.title||`${(0,L.__)("Track","b-blocks")} ${e+1}`}),(0,f.jsx)("span",{className:`${X}-list-time`,children:D(n)})]},e)}))})]})),(0,f.jsxs)("div",{className:N,children:[w,E]})},nt=()=>{document.querySelectorAll(".wp-block-b-blocks-audio-player").forEach((e=>{if(!e.dataset.attributes)return;const n=JSON.parse(e.dataset.attributes);(0,t.createRoot)(e).render((0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(w,{attributes:n,id:e.id}),(0,f.jsx)(et,{attributes:n})]})),e?.removeAttribute("data-attributes")}))};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",nt):nt()})(); | |
| 1 | +(()=>{"use strict";const t=window.ReactDOM,e=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),n=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}};new class{constructor(t={}){this.defaultOptions={allowedTags:["svg","g","path","rect","circle","ellipse","line","polyline","polygon","text","tspan","defs","clipPath","mask","linearGradient","radialGradient","stop","style","title","desc"],allowedAttributes:["id","class","style","transform","xmlns","xmlns:xlink","version","baseProfile","xml:space","d","x","y","width","height","cx","cy","r","rx","ry","points","x1","y1","x2","y2","viewBox","preserveAspectRatio","overflow","fill","fill-opacity","fill-rule","stroke","stroke-width","stroke-linecap","stroke-linejoin","stroke-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","opacity","color","paint-order","vector-effect","shape-rendering","display","visibility","clip-path","clip-rule","clipPathUnits","mask","maskUnits","maskContentUnits","offset","stop-color","stop-opacity","gradientUnits","gradientTransform","spreadMethod","fx","fy","fr","dx","dy","text-anchor","dominant-baseline","alignment-baseline","font-family","font-size","font-style","font-weight","letter-spacing","word-spacing","textLength","lengthAdjust","role","focusable","aria-hidden","aria-label","aria-labelledby","aria-describedby"],allowedProtocols:["http","https","data"],removeScripts:!0,removeEvents:!0,removeExternalResources:!0,sanitizeStyle:!0},this.options={...this.defaultOptions,...t},this.allowedTagSet=new Set(this.options.allowedTags.map((t=>t.toLowerCase()))),this.allowedAttributeSet=new Set(this.options.allowedAttributes.map((t=>t.toLowerCase())))}sanitize(t){if("string"!=typeof t||""===t.trim())return"";const e=(new DOMParser).parseFromString(t,"image/svg+xml"),n=e.documentElement;return!n||"svg"!==n.localName.toLowerCase()||e.getElementsByTagName("parsererror").length?"":(this.removeScripts(e),this.sanitizeElements(e),(new XMLSerializer).serializeToString(e.documentElement))}async sanitizeFile(t){const e=await fetch(t),n=await e.text();return this.sanitize(`${n}`)}removeScripts(t){this.options.removeScripts&&Array.from(t.querySelectorAll("*")).forEach((t=>{t.localName.toLowerCase().includes("script")&&t.remove()}))}sanitizeElements(t){Array.from(t.querySelectorAll("*")).forEach((t=>{const e=t.localName.toLowerCase();this.allowedTagSet.has(e)?("style"===e&&this.options.sanitizeStyle&&(t.textContent=this.sanitizeCss(t.textContent)),this.sanitizeAttributes(t)):t.remove()}))}sanitizeAttributes(t){Array.from(t.attributes).forEach((e=>{const n=e.name,r=n.toLowerCase(),a=e.value;if(this.options.removeEvents&&r.startsWith("on"))return void t.removeAttribute(n);if(this.options.removeExternalResources&&("href"===r||r.endsWith(":href"))&&!this.isAllowedUrl(a))return void t.removeAttribute(n);const s=r.replace("xlink:","");this.allowedAttributeSet.has(r)||this.allowedAttributeSet.has(s)?this.options.removeExternalResources&&this.hasExternalUrl(a)?t.removeAttribute(n):"style"===r&&this.options.sanitizeStyle&&t.setAttribute(n,this.sanitizeCss(a)):t.removeAttribute(n)}))}hasExternalUrl(t){return!("string"!=typeof t||!/url\s*\(/i.test(t))&&Array.from(t.matchAll(/url\s*\(\s*['"]?([^'")]*)/gi)).some((([,t])=>!t.trim().startsWith("#")))}isAllowedUrl(t){const e=String(t||"").trim();if(e.startsWith("#"))return!0;if(/^data:/i.test(e))return this.options.allowedProtocols.includes("data")&&/^data:image\/(png|jpe?g|gif|webp);base64,/i.test(e);try{return this.options.allowedProtocols.includes(new URL(e).protocol.replace(":",""))}catch{return!1}}sanitizeCss(t){return String(t||"").replace(/expression\s*\(/gi,"").replace(/javascript:/gi,"").replace(/behavior\s*:/gi,"").replace(/binding\s*:/gi,"").replace(/@import[^;]*;?/gi,"").replace(/url\s*\(\s*(['"]?)(?!#)[^)]*\)/gi,"none")}};const r="@media only screen and (min-width: 1025px)",a="@media only screen and (max-width: 1024px)",s="@media only screen and (max-width: 640px)",i="linear-gradient(135deg, #0040E3, #18D4FD)",o=window.React,l=t=>{const e=n(t);return e?`url('${e.replace(/['"()]/g,"")}')`:"none"},c=(t,n)=>e(n)?`${t}: ${n};`:"",d=(t,e=!0,n=!0,r=!0)=>{const{type:a="solid",color:s="",gradient:o=i,image:d={},position:u="center center",attachment:p="",repeat:m="no-repeat",size:$="",overlayColor:y=""}=t||{};return"gradient"===a&&n?c("background",o):"image"===a&&r?`background: ${l(d?.url)};\n\t\t\t\t${c("background-color",y)}\n\t\t\t\t${c("background-position",u)}\n\t\t\t\t${c("background-size",$)}\n\t\t\t\t${c("background-repeat",m)}\n\t\t\t\t${c("background-attachment",p)}\n\t\t\t\t${c("background-repeat",m)}\n\t\t\t\tbackground-blend-mode: overlay;`:e&&c("background",s)},u=t=>{const{width:e="",style:n="solid",color:r="",side:a="all",radius:s=""}=t||{},i=t=>{const e=a?.toLowerCase();return e?.includes("all")||e?.includes(t)},o=`${e} ${n} ${r}`,l=`\n\t\t${e&&0!==parseInt(e)?["top","right","bottom","left"].map((t=>i(t)?`border-${t}: ${o};`:"")).join(""):""}\n\t\t${c("border-radius",s)}\n\t`;return l},p=(t,e,n=!0)=>{const{fontFamily:r="Default",fontCategory:i="sans-serif",fontVariant:o=400,fontWeight:l,isUploadFont:d=!0,fontSize:u={desktop:null,tablet:null,mobile:null},fontStyle:p,textTransform:m,textDecoration:$,lineHeight:y,letterSpace:b}=e||{},h=!n||!r||"Default"===r,g=u?.desktop||u,x=u?.tablet||g,j=u?.mobile||x,M=t=>{const e=String(t);return["px","em","rem","%","vh","vw"].some((t=>e.endsWith(t)))?e:"number"==typeof t?`${e}px`:""},f=`\n\t\t${h?"":`font-family: '${r}', ${i};`}\n\t\t${c("font-weight",l)}\n\t\t${c("font-size",M(g))}\n\t\t${c("font-style",p)}\n\t\t${c("text-transform",m)}\n\t\t${c("text-decoration",$)}\n\t\t${c("line-height",y)}\n\t\t${c("letter-spacing",b)}\n\t`,v=o&&400!==o?"400i"===o?":ital@1":o?.includes("00i")?`: ital, wght@1, ${o?.replace("00i","00")} `:`: wght@${o} `:"",k=h?"":`https://fonts.googleapis.com/css2?family=${r?.split(" ").join("+")}${v.replace(/ /g,"")}&display=swap`;return{googleFontLink:!d||h?"":`@import url(${k});`,styles:`${t}{\n\t\t\t${f}\n\t\t}\n\t\t${a} {\n\t\t\t${t}{\n\t\t\t\t${c("font-size",M(x))}\n\t\t\t}\n\t\t}\n\t\t${s} {\n\t\t\t${t}{\n\t\t\t\t${c("font-size",M(j))}\n\t\t\t}\n\t\t}`.replace(/\s+/g," ").trim()}},m=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""},$=t=>{const{position:n="center center",xPosition:r=0,yPosition:a=0,attachment:s="",repeat:i="no-repeat",size:o="cover",customSize:l="0px"}=t||{},c=t=>"initial"!==t||e(t);return`\n\t\t${c(n)?`background-position: ${"custom"===n?`${r} ${a}`:n};`:""}\n\t\t${s&&c(s)?`background-attachment: ${s};`:""}\n\t\t${c(i)?`background-repeat: ${i};`:""}\n\t\t${c(o)?`background-size: ${"custom"===o?`${l} auto`:o};`:""}\n\t`},y=(t={})=>t?{desktop:e(t.url)?`background-image: ${l(t.url)}; ${$(t?.desktop)}`:"",tablet:e(t.url)?$(t?.tablet):"",mobile:e(t.url)?$(t?.mobile):""}:"",b=(t,r,i=!1)=>{const{type:o="color",color:l,gradient:d,img:u,video:p}=t||{},m="color"===o?c("background",l):"gradient"===o?(t=>{const{type:n="linear",radialType:r="ellipse",colors:a=[],centerPositions:s={x:0,y:0},angel:i=0}=t||{};if(e(t)){const t=a?.map((({color:t,position:e})=>`${t} ${e}%`)),e=`linear-gradient(${i}deg, ${t})`;return c("background","radial"===n?`radial-gradient(${r} at ${s?.x}% ${s?.y}%,${t})`:e)}return""})(d):"image"===o?y(u).desktop:"",$="image"===o?y(u).tablet:"",b="image"===o?y(u).mobile:"",h=i?`${r}:hover`:r;return`\n\t\t${"video"===o?((t,e)=>{const{url:r,loop:a}=t||{},s=document.querySelector(e),i=s?.querySelector(".bPlVideo"),o=document.createElement("video");if(o.muted=!0,o.autoplay=!0,o.classList.add("bPlVideo"),!i&&s&&r){const t=n(r);if(t){ | |
| 2 | +const e=document.createElement("source");e.src=t,o.appendChild(e),s.appendChild(o)}}return o.loop=a,o.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}`})(p,r):""}\n\n\t\t${m?`${h}{\n\t\t\t${m}\n\t\t}`:""}\n\n\t\t${$?`${a} {\n\t\t\t${h}{\n\t\t\t\t${$}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${b?`${s} {\n\t\t\t${h}{\n\t\t\t\t${b}\n\t\t\t}\n\t\t}`:""}\n\t`.replace(/\s+/g," ").trim()},h=(t,n,r=!1)=>{const{isEnabled:a,colors:s,opacity:i=1,blend:o,filter:l="",blur:d=0,brightness:u=100,contrast:p=100,saturation:m=100,hue:$=0,position:y={top:0,right:0,bottom:0,left:0},zIndex:h=-1}=t||{},g=`${100!==u?`brightness(${u}%)`:""} ${100!==p?`contrast(${p}%)`:""} ${100!==m?`saturate(${m}%)`:""} ${0!==d?`blur(${d}px)`:""} ${0!==$?`hue-rotate(${$}deg)`:""}`,x=`${l}: ${l?g:""}; -webkit-${l}: ${l?g:""};`,j=r?`${n}:hover::after`:`${n}::after`;return a?`\n\t\t${n}{\n\t\t\tposition:relative;\n\t\t\tz-index:1;\n\t\t}\n\t\t${n}::after{\n\t\t\tcontent: '';\n\t\t\tposition: absolute;\n\t\t\ttop:${e(y.top)?y.top:0};\n\t\t\tright:${e(y.right)?y.right:0};\n\t\t\tbottom:${e(y.bottom)?y.bottom:0};\n\t\t\tleft:${e(y.left)?y.left:0};\n\t\t\tz-index:${h};\n\t\t}\n\t\t${b(s,j,!1)}\n\t\t${j}{\n\t\t\t${c("opacity",i)}\n\t\t\t${c("mix-blend-mode",o)}\n\t\t\t${x}\n\t\t}\n\t`.replace(/\s+/g," ").trim():""},g=(t,n,r=!1)=>{const i=(t,n="desktop")=>{if(!e(t))return"";const{skew:r,scale:a,rotate:s,offset:i,flipX:o,flipY:l}=t,{threeDRotate:d}=s||{},{isProportion:u}=a||{},p=[];return e(r)&&(e(r?.[n]?.x)&&p.push(`skewX(${r[n].x}deg)`),e(r?.[n]?.y)&&p.push(`skewY(${r[n].y}deg)`)),u?e(a?.[n]?.scale)&&p.push(`scale(${a[n].scale})`):(e(a?.[n]?.x)&&p.push(`scaleX(${a[n].x})`),e(a?.[n]?.y)&&p.push(`scaleY(${a[n].y})`)),e(s)&&(e(s?.[n]?.z)&&p.push(`rotateZ(${s[n].z}deg)`),d&&(e(s?.[n]?.x)&&p.push(`rotateX(${s[n].x}deg)`),e(s?.[n]?.y)&&p.push(`rotateY(${s[n].y}deg)`))),e(i)&&(e(i?.[n]?.x)&&p.push(`translateX(${i[n].x})`),e(i?.[n]?.y)&&p.push(`translateY(${i[n].y})`)),e(o)&&p.push(o?"scaleX(-1)":""),e(l)&&p.push(l?"scaleY(-1)":""),0===p.length?"":c("transform",p.join(" "))},o=r?`${n}:hover`:n;return`\n\t\t${o} {\n\t\t\t${i(t,"desktop")}\n\t\t}\n\t\t${a}{\n\t\t\t${o} {\n\t\t\t\t${i(t,"tablet")}\n\t\t\t}\n\t\t}\n\t\t${s}{\n\t\t\t${o} {\n\t\t\t\t${i(t,"mobile")}\n\t\t\t}\n\t\t}\n\t`},x=t=>{const{padding:e,margin:n,height:r,width:a}=t||{},s=(t,e)=>c(t,e),i=(t,e,n)=>s(t,e?.[t]?.[n])+s(`min-${t}`,e?.min?.[n])+s(`max-${t}`,e?.max?.[n]),o=t=>c("padding",m(t)),l=t=>c("margin",m(t));return{desktop:o(e?.desktop)+l(n?.desktop)+i("height",r,"desktop")+i("width",a,"desktop"),tablet:o(e?.tablet)+l(n?.tablet)+i("height",r,"tablet")+i("width",a,"tablet"),mobile:o(e?.mobile)+l(n?.mobile)+i("height",r,"mobile")+i("width",a,"mobile")}},j=t=>{const{normal:e,hover:n}=t||{},r=t=>{const{border:e,radius:n,shadow:r}=t||{},a=c("border-radius",m(n)),s=c("box-shadow",((t,e="box")=>{let n="";return t?.map(((r,a)=>{const{hOffset:s="0px",vOffset:i="0px",blur:o="0px",spreed:l="0px",color:c="#e7f0fe",isInset:d=!1}=r||{},u=d?"inset":"",p=`${s} ${i} ${o}`,m=a+1>=t.length?"":", ";n+="text"===e?`${p} ${c}${m}`:`${p} ${l} ${c} ${u}${m}`})),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():c("border",e(t))})(e)+a+s};return{normal:r(e),hover:r(n)}},M=t=>{const{zIndex:n,overflow:r}=t||{},a=r?`overflow: ${r};`:"",s=t=>`${c("z-index",n?.[t])} ${c("position",e(n?.[t])?"relative":"")}`;return{desktop:s("desktop")+a,tablet:s("tablet"),mobile:s("mobile")}},f=(t,e)=>{const{desktop:n=!1,tablet:r=!1,mobile:a=!1}=t||{},s=e?"opacity: 0.5;":"display: none;",i=t=>t?s:"";return{desktop:i(n),tablet:i(r),mobile:i(a)}},v=(t,n,i=!1,o=!0)=>{const{dimension:d,transform:u,background:p,borderShadow:m,mask:$,animation:y,visibility:v,responsive:k,position:w={},floating:N={},motion:L={},css:z=""}=n||{},D=i?`#${t}>div>div${o?":first-child":""}`:`#${t}>div`;((t,e,n)=>{const r=n?`#${e} > div`:`#${e}`,a=document.querySelector(r);a&&t&&t.type&&(a.setAttribute("data-aos",t.type),a.setAttribute("data-aos-duration",1e3*t.duration||.4),a.setAttribute("data-aos-delay",1e3*t.delay||0),a.classList.contains("aos-init")||(a.classList.add("aos-init"),window?.AOS?.init()),n)&&new IntersectionObserver((t=>{t.forEach((t=>{t.intersectionRatio>.5?a.classList.add("aos-animate"):a.classList.remove("aos-animate")}))}),{threshold:[.5]}).observe(a)})(y,t,i);const S=x(d).desktop+M(v).desktop+((t,e,n)=>{const{transition:r=.4}=t||{},{transition:a=.4}=e||{},{transition:s=200}=n||{};return`transition: background ${r}s, border ${a}s, border-radius ${a}s, box-shadow ${a}s, transform ${s}ms ease-in-out;`})(p,m,u)+(t=>{const{isMask:e=!1,shape:n={type:"circle"},size:r={type:"contain",scale:"100%"},position:a={type:"center center",x:50,y:50},repeat:s="no-repeat"}=t||{};return e?`-webkit-mask-image: ${"custom"===n.type?l(n.url):`url(${(i=n.type,[{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4OSIgaGVpZ2h0PSI4OSIgdmlld0JveD0iMCAwIDg5IDg5Ij48Y2lyY2xlIGN4PSI0NC41IiBjeT0iNDQuNSIgcj0iNDQuNSIvPjwvc3ZnPg==",type:"circle"},{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4OSIgaGVpZ2h0PSI4OSIgdmlld0JveD0iMCAwIDg5IDg5Ij48cGF0aCBkPSJNNzYuMTMzMiw0NC40NzUybDYuMzI4OS02LjMyODVBMjIuMzQ4NiwyMi4zNDg2LDAsMCwwLDUwLjg1LDYuNTQ3NEw0NC41MzIsMTIuODY1MSwzOC4xNiw2LjU0NzRhMjIuMzUyNCwyMi4zNTI0LDAsMSwwLTMxLjYxMiwzMS42MWw2LjMxODEsNi4zMTc3TDYuNTQ3OCw1MC44NDdhMjIuMzUyNCwyMi4zNTI0LDAsMCwwLDMxLjYxMiwzMS42MWw2LjMxODEtNi4zMTc3TDUwLjg1LDgyLjM5MjJhMjIuMzQ4NiwyMi4zNDg2LDAsMCwwLDMxLjYxMi0zMS41OTkzWiIvPjwvc3ZnPg==",type:"flower"},{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI5MS4xMTQzIiBoZWlnaHQ9Ijg4Ljk5OTkiIHZpZXdCb3g9IjAgMCA5MS4xMTQzIDg4Ljk5OTkiPjxwYXRoIGQ9Ik04Mi4xNzQ5LDM3LjUyNjZsMS42MTE5LTEuNjExOWMuOTQ4Ni0uOTQ4Ny02LjM3LTUuOTMwOS03LjA0OTItNi4zNzgyYTQ1LjE1MTYsNDUuMTUxNiwwLDAsMC01Ljc3NjYtMy4zMjQxYy0uMjQ2OC0uMTE1Ny0uNjAxNi0uMzAwOC0uOTg3Mi0uNDc4MnExLjc4MTYtMS44OTcyLDMuNTg2My0zLjc3MTNjLjk0ODYtLjk4LTYuMzYyOC01LjkyMzItNy4wNDkyLTYuMzcwNUE0NC4xNTc5LDQ0LjE1NzksMCwwLDAsNjAuNzUsMTIuMjYwNmwtLjI5My0uMTQ2NSwxLjM5NTktMS41NDI1Yy45NDA5LTEuMDQ4OS02LjMzMTktNS45LTcuMDQ5Mi02LjM3QTQ0LjIxMiw0NC4yMTIsMCwwLDAsNDkuMDQyMi44NjE2Yy0uNTQtLjI0NjctMi4zMTM3LTEuMjY0OC0yLjg0NTgtLjY4NjRRMzIuNzM4MSwxNS4xNjgyLDE4LjExNTQsMjkuMDY2Yy03Ljg0MzYsNy40NS0xNi41NjYzLDE1LjU3OTEtMTguMTA4OCwyNi44Ny0uMTE1Ny44MjUzLDEuMzI2NSwxLjk3NDQsMS43NDMsMi4zMTM4YTQwLjc5OSw0MC43OTksMCwwLDAsNS4zMTM5LDQuMDU2Nyw0NC4yMTc0LDQ0LjIxNzQsMCwwLDAsNS43NjExLDMuMzRjLjY0LjI5MzEsMi4xNzUsMS4yMDMxLDIuODQ1OS42ODY0bDIuMDc0Ny0xLjU1NzljMS40NSwxLjg1ODcsNS45Njk0LDQuNzIsNi42NzEyLDUuMTc1bDEuNDg4NS45NTY0QzI0LjQwMSw3Mi43NjQ3LDIyLjkyLDc0LjYzMTEsMjEuNDcsNzYuNTI4M2MtLjkxLDEuMTg3OCw2LjI2MjUsNS44NjE1LDcuMDQ5Miw2LjM3YTQ0LjE2MzMsNDQuMTYzMywwLDAsMCw1Ljc2MTEsMy4zMzE4Yy42MDE2LjI3NzYsMi4yMjg5LDEuMjM0LDIuODQ1OS42OTQxbDkuMjU1LTguMDk4Yy44MjUyLDIuNTY4MiwxNC41Njg3LDExLjYzLDE1LjY3MTYsOS45NzIxTDkxLjA2LDQ1LjM2MjRDOTEuNjkyLDQ0LjQxMzgsODYuNzI1Miw0MC4zMjYyLDgyLjE3NDksMzcuNTI2NloiLz48L3N2Zz4=",type:"sketch"},{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDMiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCAxMDMgODkiPjxwb2x5Z29uIHBvaW50cz0iNzcuMjU1IDQ0LjUwNSA1MS41IDAgMjUuNzU1IDQ0LjUwNSAwIDg5IDUxLjUgODkgMTAzIDg5IDc3LjI1NSA0NC41MDUiLz48L3N2Zz4=",type:"triangle"},{ | |
| 3 | +svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjEuMDAwMiIgaGVpZ2h0PSI4OSIgdmlld0JveD0iMCAwIDEyMS4wMDAyIDg5Ij48cGF0aCBkPSJNMTAwLjAxNiw3LjM5NzJDOTAuMjQ1MiwxLjIyLDczLjMwODQtMy42NjYzLDY0LjQyNTUsMy43MTI2LDU2Ljk4MzYsOS44OSw2Mi4wNDY5LDE4LjkxNzQsNTUuMDEsMjUuMzAzMmMtMTAuNiw5LjYxMzQtMjguMTU4OS01LjQ0MjMtNDEuODU4NCwyLjYzMThDLjY3NTcsMzUuMjU0My00LjI3OTEsNTkuMTQ4OSw0LjI3ODEsNzMuNzk3NWMxMy4xMzY5LDIyLjUyNCw1My4xMywxMy44NTQxLDYxLjE5MzYsMTIuMTA2MSw0LjUwMDctLjk5MzEsNTMuNDk1My0xMi4yNjUsNTUuNDY5My00Mi43MDQzQzEyMS44OTgsMjguMjUyOCwxMTEuMSwxNC40MTg1LDEwMC4wMTYsNy4zOTcyWiIvPjwvc3ZnPg==",type:"blob"},{svg:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDMiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCAxMDMgODkiPjxwYXRoIGQ9Ik03Ny4yMTE0LDBIMjUuNzUyM0wwLDQ0LjUwNDUsMjUuNzUyMyw4OUg3Ny4yMTE0TDEwMyw0NC41MDQ1Wk02MS43NjkxLDYyLjI2MUg0MS4yMjE4TDMwLjkzOTEsNDQuNTA0NSw0MS4yMjE4LDI2LjczOUg2MS43NjkxTDcyLjA1MTksNDQuNTA0NVoiLz48L3N2Zz4=",type:"hexagon"}].find((t=>t.type===i))).svg})`};\n\t\t-webkit-mask-size: ${"custom"===r.type?r.scale:r.type};\n\t\t${"custom"===a.type?`${c("-webkit-mask-position-x",a.x)}\n\t\t\t${c("-webkit-mask-position-y",a.y)}`:`${c("-webkit-mask-position",a.type)}`}\n\t\t${"cover"!==r.type?`-webkit-mask-repeat: ${s};`:""}`:"";var i})($),T=x(d).tablet+M(v).tablet+f(k,i).tablet,E=x(d).mobile+M(v).mobile+f(k,i).mobile,C=j(m).normal,I=j(m).hover,A=f(k,i).desktop;return`\n\t\t${S||C?`${D} {\n\t\t\t${S}\n\t\t\t${C}\n\t\t}`:""}\n\t\t${I?`${D}:hover {\n\t\t\t${I}\n\t\t}`:""}\n\n\t\t${A?`${r} {\n\t\t\t${D}{\n\t\t\t\t${A}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${T?`${a} {\n\t\t\t${D}{\n\t\t\t\t${T}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${E?`${s} {\n\t\t\t${D}{\n\t\t\t\t${E}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${b(p?.normal,D)}\n\t\t${b(p?.hover,D,!0)}\n\t\t${h(p?.overlay,D)}\n\t\t${h(p?.hoverOverlay,D,!0)}\n\t\t${e(u?.normal)?g(u?.normal,D):""}\n\t\t${e(u?.hover)?g(u?.hover,D,!0):""}\n\t\t${((t,e)=>{const{desktop:n={},tablet:r={},mobile:i={}}=t,o=(t={})=>`\n\t\t${e}{\n\t\t\t${c("position",t?.type)}\n\t\t\t${c("left",t?.horizontal?.left)}\n\t\t\t${c("right",t?.horizontal?.right)}\n\t\t\t${c("top",t?.vertical?.top)}\n\t\t\t${c("bottom",t?.vertical?.bottom)}\n\t\t}\n\t`;return`\n\t\t\n\t\t${n?.type?o(n):""}\n\t\t\n\t\t${a}{\n\t\t\t${r?.type?o(r):""}\n\t\t}\n\n\t\t${s}{\n\t\t\t${i?.type?o(i):""}\n\t\t}\n\t`})(w,D)}\n\t\t${((t,n,r="")=>{const{translate:a={},rotate:s={},scale:i={},isEnabled:o=!1}=t||{};if(!o)return"";const l=[],c=[];return[{name:"Translate",property:"translate",values:a,value:t=>["x","y"].some((n=>e(a?.[n]?.[t])))?`${a?.x?.[t]||0}px ${a?.y?.[t]||0}px`:""},{name:"Rotate",property:"transform",values:s,value:t=>["x","y","z"].filter((n=>e(s?.[n]?.[t]))).map((e=>`rotate${e.toUpperCase()}(${s[e][t]}deg)`)).join(" ")},{name:"Scale",property:"scale",values:i,value:t=>{const n=i?.y?.[t],r=i?.z?.[t];return e(n)||e(r)?e(r)?`1 ${e(n)?n:1} ${r}`:`1 ${n}`:""}}].forEach((({name:t,property:e,values:n,value:a})=>{const s=a("from"),i=a("to");if(!s||!i)return;const o=Number(n?.duration)>0?Number(n.duration):1e3,d=Number(n?.delay)>0?Number(n.delay):0,u=`advFloat${t}${r?`-${r}`:""}`;l.push(`@keyframes ${u}{ from{ ${e}: ${s}; } to{ ${e}: ${i}; } }`),c.push(`${u} ${o}ms ease-in-out ${d}ms infinite alternate`)})),c.length?`\n\t\t${l.join(" ")}\n\t\t${n}{\n\t\t\tanimation: ${c.join(", ")};\n\t\t}\n\t`:""})(N,D,t)}\n\t\t${((t,n,i)=>{const{isEnable:o=!1,vertical:l={},horizontal:c={},transparency:d={},blur:u={},rotate:p={},scale:m={},effectsRelativeTo:$="viewport",effectOn:y=["desktop","tablet-portrait","mobile-portrait"],isMouseEffect:b=!1,mouseTrack:h={},tilt:g={},sticky:x={}}=t||{},j=(t,n)=>e(t)&&!isNaN(t)?Number(t):n,M="viewport"===$,f=M?"view()":"scroll(nearest block)",v=[],k=[],w=[],N=[],L=String(i??"").replace(/[^a-zA-Z0-9]/g,""),z=(t,e,n)=>{v.push(`@keyframes advMe${t}${L}{ ${e} }`),k.push(`advMe${t}${L}`),w.push(f),N.push((t=>{const e=j(t?.top,0),n=j(t?.bottom,100),r=Math.min(e,n),a=Math.max(e,n);return M?`cover ${r}% ${a>=90?"contain 100%":`cover ${a}%`}`:`min(${3*r}vh, ${r}%) min(${3*a}vh, ${a}%)`})(n))};if(o){const t=l?.direction,e=c?.direction,n=t?100*j(l?.speed,4):0,r=e?100*j(c?.speed,4):0;if(n||r){const a="up"===t?-n:n,s="to-left"===e?-r:r,i=[n&&l,r&&c].filter(Boolean);z("Translate",`from{ translate: 0px 0px; } to{ translate: ${s}px ${a}px; }`,{top:Math.min(...i.map((t=>j(t?.top,0)))),bottom:Math.max(...i.map((t=>j(t?.bottom,100))))})}const a=d?.direction;if(a){const t=Math.max(0,1-j(d?.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}; }`}[a];e&&z("Opacity",e,d)}const s=u?.direction;if(s){const t=3*j(u?.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); }`}[s];e&&z("Blur",e,u)}const i=p?.direction;if(i){const t=20*j(p?.level,4);z("Rotate",`from{ rotate: 0deg; } to{ rotate: ${"to-left"===i?-t:t}deg; }`,p)}if(m?.direction){const t=.15*j(m?.level,4),e=Math.max(0,1-t),n=1+t,r={"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; }`}[m.direction];r&&z("Scale",r,m)}}const D=[];if(b){if(h?.direction){const t="direct"===h?.direction?100:-100;D.push(((e,n)=>`translate(${(e*t).toFixed(2)}px, ${(n*t).toFixed(2)}px)`))}if(g?.direction){const t=12*("direct"===g?.direction?1:-1);D.push(((e,n)=>`perspective(1000px) rotateX(${(n*-t).toFixed(2)}deg) rotateY(${(e*t).toFixed(2)}deg)`))}}const S=(t,e,r)=>{if(!t||!t.defaultView)return;const a=t.defaultView,s=t.bPlMouse||(t.bPlMouse={x:0,y:0,items:new Map,frame:0,last:0}),i=s.items.get(n)||{x:0,y:0};if(i.rate=e,i.build=r,s.items.set(n,i),s.bound)return;s.bound=!0;const o=e=>{const n=s.last?Math.min(e-s.last,100):16.7;s.last=e;let r=!1;s.items.forEach(((e,a)=>{const i=e.el&&e.el.isConnected?e.el:t.querySelector(a);if(!i)return;e.el=i;const o=e.rate*n/1e3,l=s.x-e.x,c=s.y-e.y,d=Math.sqrt(l*l+c*c);d<=o?(e.x=s.x,e.y=s.y):(e.x+=l/d*o,e.y+=c/d*o,r=!0),i.style.transform=e.build(e.x,e.y)})),s.frame=r?a.requestAnimationFrame(o):0,s.last=r?e:0};t.addEventListener("pointermove",(t=>{s.x=2*(t.clientX/a.innerWidth-.5),s.y=2*(t.clientY/a.innerHeight-.5),s.frame||(s.frame=a.requestAnimationFrame(o))}))};if(D.length&&"undefined"!=typeof document){const t=Math.max(.25,1.5*j(h?.speed,j(g?.speed,4))),e=(t,e)=>D.map((n=>n(t,e))).join(" ");S(document,t,e),S(document.querySelector('iframe[name="editor-canvas"]')?.contentDocument,t,e)}const T=t=>x?.[t]||("desktop"===t?x?.undefined:""),E=n.split(">")[0],C=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;":""},I=Array.isArray(y)?y:e(y)?[y]:[],A=t=>!I.length||I.includes(t)?"":`${n}{ animation-name: none; }` | |
| 4 | +;return`\n\t\t${k.length?`\n\t\t${v.join(" ")}\n\t\t@supports (animation-timeline: scroll()){\n\t\t\t${n}{\n\t\t\t\tanimation-name: ${k.join(", ")};\n\t\t\t\tanimation-duration: ${k.map((()=>"auto")).join(", ")};\n\t\t\t\tanimation-timing-function: ${k.map((()=>"linear")).join(", ")};\n\t\t\t\tanimation-fill-mode: ${k.map((()=>"both")).join(", ")};\n\t\t\t\tanimation-direction: ${k.map((()=>M?"normal":"reverse")).join(", ")};\n\t\t\t\tanimation-timeline: ${w.join(", ")};\n\t\t\t\tanimation-range: ${N.join(", ")};\n\t\t\t}\n\t\t\t${A("desktop")?`${r}{ ${A("desktop")} }`:""}\n\t\t\t${A("tablet-portrait")?`@media only screen and (min-width: 641px) and (max-width: 1024px){ ${A("tablet-portrait")} }`:""}\n\t\t\t${A("mobile-portrait")?`${s}{ ${A("mobile-portrait")} }`:""}\n\t\t}\n\t`:""}\n\t\t${D.length?`${n}{ transition-property: background, border, border-radius, box-shadow; }`:""}\n\t\t${C("desktop")?`${E}{ ${C("desktop")} }`:""}\n\t\t${C("tablet")?`${a}{ ${E}{ ${C("tablet")} } }`:""}\n\t\t${C("mobile")?`${s}{ ${E}{ ${C("mobile")} } }`:""}\n\t`})(L,D,t)}\n\t\t${z}\n\t`.replace(/\s+/g," ")},k=window.ReactJSXRuntime,w=(t,e)=>"string"==typeof t?t:t?.[e]||"mobile"===e&&t?.tablet||t?.desktop,N=({attributes:t,id:e,isBackend:n=!1})=>{const{layout:r={},player:i={},colors:o={},title:l={},artist:$={},timecode:y={},buttonStyle:b={},playBtnStyle:h={},skipBtnStyle:g={},restartBtnStyle:x={},repeatBtnStyle:j={},stopBtnStyle:M={},speedBtnStyle:f={},volumeStyle:N={},downloadStyle:L={},seekStyle:z={},playlistStyle:D={},advanced:S}=t,T=o.control,E=o.accent,C=i.bg?.color,I=o.track,A=o.trackActive,O=`#${e} .b-blocks-audio-player`,R=`${O} .b-blocks-audio-player-player`,U=`${O} .b-blocks-audio-player-title`,Y=`${O} .b-blocks-audio-player-artist`,P=`${O} .b-blocks-audio-player-time, ${O} .b-blocks-audio-player-current, ${O} .b-blocks-audio-player-duration`,Q=`${O} .b-blocks-audio-player-playpause, ${O} .b-blocks-audio-player-skip, ${O} .b-blocks-audio-player-restart, ${O} .b-blocks-audio-player-repeat, ${O} .b-blocks-audio-player-stop, ${O} .b-blocks-audio-player-speed`,_=`${O} .b-blocks-audio-player-playpause`,B=`${O} .b-blocks-audio-player-skip`,H=`${O} .b-blocks-audio-player-restart`,W=`${O} .b-blocks-audio-player-repeat`,Z=`${O} .b-blocks-audio-player-stop`,F=`${O} .b-blocks-audio-player-speed`,V=`${O} input[type='range'].b-blocks-audio-player-volume`,q=`${O} .b-blocks-audio-player-download`,X=`${O} .b-blocks-audio-player-seek-wrap`,G=`${O} input[type='range'].b-blocks-audio-player-seek`,J=`${O} .b-blocks-audio-player-list-item`,K=`${O} .b-blocks-audio-player-list-item.is-active`,tt=(t,e,n)=>c(t,m(e?.[n])),et=(t,e)=>t.split(",").map((t=>`${t.trim()}${e}`)).join(", "),nt=(t,e)=>`\n\t\t${t}{\n\t\t\t${c("color",e?.color)}\n\t\t\t${d(e?.bg)}\n\t\t\t${u(e?.border)}\n\t\t}\n\t\t${et(t,":hover")}{\n\t\t\t${c("color",e?.hoverColor)}\n\t\t\t${d(e?.hoverBg)}\n\t\t}\n\t`,rt=(t,e,n)=>{const r=w(e?.iconSize,n);return`\n\t\t\t${t}{\n\t\t\t\t${tt("margin",e?.margin,n)}\n\t\t\t\t${tt("padding",e?.padding,n)}\n\t\t\t\t${tt("border-radius",e?.borderRadius,n)}\n\t\t\t}\n\t\t\t${r?`${et(t," svg")}{ ${c("width",r)} ${c("height",r)} }`:""}\n\t\t`},at=t=>`\n\t\t${R}{\n\t\t\t${c("max-width",w(r.maxWidth,t))}\n\t\t\t${tt("margin",i.margin,t)}\n\t\t\t${tt("padding",i.padding,t)}\n\t\t\t${tt("border-radius",i.borderRadius,t)}\n\t\t}\n\t\t${rt(Q,b,t)}\n\t\t${rt(_,h,t)}\n\t\t${rt(B,g,t)}\n\t\t${rt(H,x,t)}\n\t\t${rt(W,j,t)}\n\t\t${rt(Z,M,t)}\n\t\t${rt(F,f,t)}\n\t\t${rt(V,N,t)}\n\t\t${rt(q,L,t)}\n\t\t${X}{\n\t\t\t${tt("margin",z.margin,t)}\n\t\t}\n\t\t${G}::-webkit-slider-runnable-track{\n\t\t\t${c("height",w(z.trackSize,t))}\n\t\t\t${tt("border-radius",z.borderRadius,t)}\n\t\t}\n\t\t${G}::-moz-range-track{\n\t\t\t${c("height",w(z.trackSize,t))}\n\t\t\t${tt("border-radius",z.borderRadius,t)}\n\t\t}\n\t\t${U}{\n\t\t\t${tt("margin",l.margin,t)}\n\t\t\t${tt("padding",l.padding,t)}\n\t\t\t${tt("border-radius",l.borderRadius,t)}\n\t\t}\n\t\t${Y}{\n\t\t\t${tt("margin",$.margin,t)}\n\t\t\t${tt("padding",$.padding,t)}\n\t\t\t${tt("border-radius",$.borderRadius,t)}\n\t\t}\n\t\t${J}{\n\t\t\t${tt("padding",D.itemPadding,t)}\n\t\t\t${tt("border-radius",D.borderRadius,t)}\n\t\t}\n\t`,st=z.fillColor||E,it=z.trackColor,ot=z.trackColor||"rgba(127, 127, 127, 0.3)",lt=N.fillColor||E,ct=N.trackColor||"rgba(127, 127, 127, 0.3)";return(0,k.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t\t${p("",l.typo).googleFontLink}\n\t\t\t${p("",$.typo).googleFontLink}\n\t\t\t${p("",y.typo).googleFontLink}\n\n\t\t\t${R}{\n\t\t\t\t${c("color",T)}\n\t\t\t\t${d(i.bg)}\n\t\t\t\t${u(i.border)}\n\t\t\t}\n\n\t\t\t${Q}{\n\t\t\t\t${c("color",T)}\n\t\t\t}\n\n\t\t\t${_}{\n\t\t\t\t${c("background",E)}\n\t\t\t\t${c("color",C)}\n\t\t\t}\n\n\t\t\t${W}.is-active{\n\t\t\t\t${c("color",E)}\n\t\t\t}\n\n\t\t\t${nt(Q,b)}\n\t\t\t${nt(_,h)}\n\t\t\t${nt(B,g)}\n\t\t\t${nt(H,x)}\n\t\t\t${nt(W,j)}\n\t\t\t${nt(Z,M)}\n\t\t\t${nt(F,f)}\n\t\t\t${nt(V,N)}\n\t\t\t${nt(q,L)}\n\n\t\t\t${G}::-webkit-slider-runnable-track{ background: linear-gradient(to right, ${st} 0%, ${st} var(--b-blocks-audio-player-var-progress, 0%), ${ot} var(--b-blocks-audio-player-var-progress, 0%), ${ot} 100%); }\n\t\t\t${G}::-moz-range-track{ background: ${ot}; }\n\t\t\t${G}::-moz-range-progress{ background: ${st}; }\n\t\t\t${G}::-webkit-slider-thumb {\n\t\t\t\t${c("border-color",st)}\n\t\t\t\t${c("background",T)}\n\t\t\t}\n\t\t\t${G}::-moz-range-thumb {\n\t\t\t\t${c("border-color",st)}\n\t\t\t\t${c("background",T)}\n\t\t\t}\n\n\t\t\t${V}::-webkit-slider-runnable-track{ background: linear-gradient(to right, ${lt} 0%, ${lt} var(--b-blocks-audio-player-var-progress, 0%), ${ct} var(--b-blocks-audio-player-var-progress, 0%), ${ct} 100%); }\n\t\t\t${V}::-moz-range-track{ background: ${ct}; }\n\t\t\t${V}::-moz-range-progress{ background: ${lt}; }\n\t\t\t${V}::-webkit-slider-thumb{ border-color: ${lt}; }\n\t\t\t${V}::-moz-range-thumb{ border-color: ${lt}; }\n\n\t\t\t${O} .b-blocks-audio-player-bar {\n\t\t\t\t${c("background",it||"rgba(127, 127, 127, 0.35)")}\n\t\t\t}\n\n\t\t\t${O} .b-blocks-audio-player-bar.is-played {\n\t\t\t\tbackground: ${st};\n\t\t\t}\n\n\t\t\t${O} .b-blocks-audio-player-vinyl-disc {\n\t\t\t\t${c("border-color",E)}\n\t\t\t}\n\n\t\t\t${O} .b-blocks-audio-player-vinyl-center {\n\t\t\t\t${c("background",E)}\n\t\t\t}\n\n\t\t\t${U}{\n\t\t\t\t${c("color",l.color||T)}\n\t\t\t\t${d(l.bg)}\n\t\t\t\t${u(l.border)}\n\t\t\t}\n\t\t\t${p(U,l.typo).styles}\n\t\t\t${Y}{\n\t\t\t\t${c("color",$.color||T)}\n\t\t\t\t${d($.bg)}\n\t\t\t\t${u($.border)}\n\t\t\t}\n\t\t\t${p(Y,$.typo).styles}\n\t\t\t${P}{ ${c("color",y.color||T)} }\n\t\t\t${p(P,y.typo).styles}\n\n\t\t\t${J}{\n\t\t\t\t${c("color",D.color||T)}\n\t\t\t\t${d(D.bg)||`background:${I};`}\n\t\t\t\t${u(D.border)}\n\t\t\t}\n\n\t\t\t${K}{\n\t\t\t\t${c("color",D.activeColor)}\n\t\t\t\t${d(D.activeBg)||`background:${A};`}\n\t\t\t}\n\n\t\t\t${at("desktop")}\n\t\t\t${a}{ ${at("tablet")} }\n\t\t\t${s}{ ${at("mobile")} }\n\t\t\t${v(e,S,n,!1)}\n\t\t\t`}})},L=window.wp.i18n,z=t=>{(!isFinite(t)||t<0)&&(t=0);const e=Math.floor(t),n=Math.floor(e/3600),r=Math.floor(e%3600/60),a=e%60,s=t=>String(t).padStart(2,"0");return n>0?`${n}:${s(r)}:${s(a)}`:`${r}:${s(a)}`},D=()=>(0,k.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",focusable:"false",children:(0,k.jsx)("path",{d:"M8 5v14l11-7z"})}),S=()=>(0,k.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",focusable:"false",children:(0,k.jsx)("path",{d:"M6 5h4v14H6zM14 5h4v14h-4z"})}),T=()=>(0,k.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",focusable:"false",children:(0,k.jsx)("path",{d:"M6 6h12v12H6z"})}),E=()=>(0,k.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",focusable:"false",children:(0,k.jsx)("path",{d:"M11 12l8.5 6V6L11 12zM4 6h2.5v12H4z"})}),C=()=>(0,k.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",focusable:"false",children:(0,k.jsx)("path",{ | |
| 5 | +d:"M13 12L4.5 6v12L13 12zM17.5 6H20v12h-2.5z"})}),I=()=>(0,k.jsx)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",children:(0,k.jsx)("path",{d:"M4 4v6h6M4.5 10a8 8 0 1 1-1 5",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}),A=()=>(0,k.jsx)("svg",{viewBox:"0 0 640 640",fill:"currentColor","aria-hidden":"true",focusable:"false",children:(0,k.jsx)("path",{d:"M534.6 182.6C547.1 170.1 547.1 149.8 534.6 137.3L470.6 73.3C461.4 64.1 447.7 61.4 435.7 66.4C423.7 71.4 416 83.1 416 96L416 128L256 128C150 128 64 214 64 320C64 337.7 78.3 352 96 352C113.7 352 128 337.7 128 320C128 249.3 185.3 192 256 192L416 192L416 224C416 236.9 423.8 248.6 435.8 253.6C447.8 258.6 461.5 255.8 470.7 246.7L534.7 182.7zM105.4 457.4C92.9 469.9 92.9 490.2 105.4 502.7L169.4 566.7C178.6 575.9 192.3 578.6 204.3 573.6C216.3 568.6 224 556.9 224 544L224 512L384 512C490 512 576 426 576 320C576 302.3 561.7 288 544 288C526.3 288 512 302.3 512 320C512 390.7 454.7 448 384 448L224 448L224 416C224 403.1 216.2 391.4 204.2 386.4C192.2 381.4 178.5 384.2 169.3 393.3L105.3 457.3z"})}),O=()=>(0,k.jsx)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",children:(0,k.jsx)("path",{d:"M12 3v12m0 0l-4-4m4 4l4-4M5 21h14",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})}),R=()=>(0,k.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",children:[(0,k.jsx)("path",{d:"M9 18V6l10-2v12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"}),(0,k.jsx)("circle",{cx:"6",cy:"18",r:"3",stroke:"currentColor",strokeWidth:"1.6"}),(0,k.jsx)("circle",{cx:"16",cy:"16",r:"3",stroke:"currentColor",strokeWidth:"1.6"})]}),U="b-blocks-audio-player",Y=({player:t,className:e=""})=>{const{playing:n,buffering:r,togglePlay:a}=t;return(0,k.jsx)("button",{type:"button",className:`${U}-playpause ${e}`.trim(),"aria-label":n?(0,L.__)("Pause","b-blocks"):(0,L.__)("Play","b-blocks"),"aria-pressed":n?"true":"false",onClick:a,children:r?(0,k.jsx)("span",{className:`${U}-spinner`,"aria-hidden":"true"}):(0,k.jsx)("span",{className:`${U}-icon`,"aria-hidden":"true",children:n?(0,k.jsx)(S,{}):(0,k.jsx)(D,{})})})},P=({player:t,dir:e,className:n=""})=>(0,k.jsx)("button",{type:"button",className:`${U}-skip ${U}-skip--${e<0?"prev":"next"} ${n}`.trim(),"aria-label":e<0?(0,L.__)("Previous","b-blocks"):(0,L.__)("Next","b-blocks"),onClick:()=>t.skip(e),children:e<0?(0,k.jsx)(E,{}):(0,k.jsx)(C,{})}),Q=({player:t,className:e=""})=>(0,k.jsx)("button",{type:"button",className:`${U}-stop ${e}`.trim(),"aria-label":(0,L.__)("Stop","b-blocks"),onClick:t.stop,children:(0,k.jsx)(T,{})}),_=({player:t,className:e=""})=>(0,k.jsx)("button",{type:"button",className:`${U}-restart ${e}`.trim(),"aria-label":(0,L.__)("Restart","b-blocks"),onClick:t.restart,children:(0,k.jsx)(I,{})}),B=({player:t,className:e=""})=>(0,k.jsx)("button",{type:"button",className:`${U}-repeat ${t.repeat?"is-active":""} ${e}`.trim(),"aria-label":(0,L.__)("Repeat","b-blocks"),"aria-pressed":t.repeat?"true":"false",onClick:t.toggleRepeat,children:(0,k.jsx)(A,{})}),H=({player:t,className:e=""})=>(0,k.jsxs)("button",{type:"button",className:`${U}-speed ${e}`.trim(),"aria-label":(0,L.__)("Playback speed","b-blocks"),onClick:t.cycleSpeed,children:[t.speed,"x"]}),W=({player:t,className:e=""})=>{const{seekingRef:n,currentTime:r,duration:a,seekTo:s}=t,[i,l]=(0,o.useState)(null),c=(0,o.useRef)(null),d=(0,o.useRef)(s);c.current=i,d.current=s;const u=null!==i?i:r,p=a>0?Math.min(100,u/a*100):0;return(0,o.useEffect)((()=>{const t=()=>{if(null===c.current)return;const t=c.current;n.current=!1,l(null),d.current(t)};return window.addEventListener("pointerup",t),window.addEventListener("mouseup",t),window.addEventListener("touchend",t),window.addEventListener("pointercancel",t),()=>{window.removeEventListener("pointerup",t),window.removeEventListener("mouseup",t),window.removeEventListener("touchend",t),window.removeEventListener("pointercancel",t)}}),[n]),(0,k.jsx)("input",{type:"range",className:`${U}-seek ${e}`.trim(),min:"0",max:a||0,step:"0.1",value:u,"aria-label":(0,L.__)("Seek","b-blocks"),"aria-valuemin":"0","aria-valuemax":Math.floor(a),"aria-valuenow":Math.floor(u),"aria-valuetext":z(u),style:{"--b-blocks-audio-player-var-progress":`${p}%`},onPointerDown:()=>{n.current=!0},onChange:t=>{n.current=!0,l(parseFloat(t.target.value)||0)},onKeyUp:t=>{const e=parseFloat(t.currentTarget.value)||0;n.current=!1,l(null),s(e)}})},Z=({player:t,className:e=""})=>(0,k.jsx)("input",{type:"range",className:`${U}-volume ${e}`.trim(),min:"0",max:"1",step:"0.01",value:t.muted?0:t.volume,"aria-label":(0,L.__)("Volume","b-blocks"),style:{"--b-blocks-audio-player-var-progress":100*(t.muted?0:t.volume)+"%"},onChange:e=>t.setVol(e.target.value)}),F=({player:t,remaining:e=!1,className:n=""})=>{const{currentTime:r,duration:a}=t;return e?(0,k.jsxs)("span",{className:`${U}-time ${n}`.trim(),"aria-hidden":"true",children:["-",z(Math.max(0,a-r))]}):(0,k.jsxs)("span",{className:`${U}-time ${n}`.trim(),"aria-hidden":"true",children:[(0,k.jsx)("span",{className:`${U}-current`,children:z(r)}),(0,k.jsx)("span",{className:`${U}-sep`,children:" / "}),(0,k.jsx)("span",{className:`${U}-duration`,children:z(a)})]})},V=({url:t,className:e=""})=>(0,k.jsxs)("a",{className:`${U}-download ${e}`.trim(),href:t,download:!0,"aria-label":(0,L.__)("Download audio","b-blocks"),children:[(0,k.jsx)(O,{}),(0,k.jsx)("span",{className:"screen-reader-text",children:(0,L.__)("Download audio","b-blocks")})]}),q="b-blocks-audio-player",X=({track:t})=>t.title||t.artist?(0,k.jsxs)("div",{className:`${q}-meta`,children:[t.title?(0,k.jsx)("p",{className:`${q}-title`,children:t.title}):null,t.artist?(0,k.jsx)("p",{className:`${q}-artist`,children:t.artist}):null]}):null,G=({track:t,className:e=""})=>(0,k.jsx)("div",{className:`${q}-art ${e}`.trim(),children:t.art?(0,k.jsx)("img",{className:`${q}-art-img`,src:t.art,alt:"",loading:"lazy",decoding:"async"}):(0,k.jsx)("span",{className:`${q}-art-placeholder`,"aria-hidden":"true",children:(0,k.jsx)(R,{})})}),J=t=>{const e=43758.5453*Math.sin(12.9898*t);return 18+42*(e-Math.floor(e))},K=new WeakMap,tt=({player:t})=>{const e=(0,o.useRef)([]),n=(0,o.useRef)(0),{playing:r,audioRef:a,url:s}=t,i=()=>{for(let t=0;t<e.current.length;t++){const n=e.current[t];n&&(n.style.height=`${J(t)}%`)}};return(0,o.useEffect)((()=>{i()}),[]),(0,o.useEffect)((()=>{const t=a.current;if(!r||!t)return void i();const s=(t=>{if(K.has(t))return K.get(t);let e=null;try{const n=window.AudioContext||window.webkitAudioContext;if(n){const r=new n,a=r.createMediaElementSource(t),s=r.createAnalyser();s.fftSize=128,s.smoothingTimeConstant=.75,a.connect(s),s.connect(r.destination),e={ctx:r,analyser:s,data:new Uint8Array(s.frequencyBinCount)}}}catch(t){e=null}return K.set(t,e),e})(t);if(!s)return void i();"suspended"===s.ctx.state&&s.ctx.resume();const{analyser:o,data:l}=s,c=l.length,d=()=>{o.getByteFrequencyData(l);for(let t=0;t<56;t++){const n=e.current[t];if(!n)continue;const r=Math.min(c-1,Math.floor((t/56)**.85*c)),a=l[r]/255;n.style.height=8+92*a+"%"}n.current=requestAnimationFrame(d)};return n.current=requestAnimationFrame(d),()=>cancelAnimationFrame(n.current)}),[r,s]),(0,k.jsx)("div",{className:`${q}-bars`,"aria-hidden":"true",children:Array.from({length:56}).map(((n,r)=>(0,k.jsx)("span",{ref:t=>{e.current[r]=t},className:`${q}-bar${r/56*100<=t.seekPct?" is-played":""}`},r)))})},et=({attributes:t,isBackend:e=!1})=>{const{layout:n={},behavior:r={},timecode:a={}}=t,s=((t,e=!1)=>{const{behavior:n={}}=t,{autoPlay:r=!1,loop:a=!1,skipSeconds:s=10,speeds:i=[1,1.25,1.5,2]}=n,l=(0,o.useMemo)((()=>(t=>{const{audio:e={},tracks:n=[]}=t,r=(Array.isArray(n)?n:[]).map((t=>({url:t?.url||"",title:t?.title||"",artist:t?.artist||"",art:t?.art?.url||""}))).filter((t=>t.url));return r.length?r:[{url:e.url||"",title:e.trackTitle||"",artist:e.artistName||"",art:e.albumArt?.url||""}] | |
| 6 | +})(t)),[t]),c=l.length>1,d=(0,o.useRef)(null),u=(0,o.useRef)(!1),p=(0,o.useRef)(!1),m=(0,o.useRef)(0),$=(0,o.useRef)(""),y=(0,o.useRef)(!1),[b,h]=(0,o.useState)({}),[g,x]=(0,o.useState)(0),[j,M]=(0,o.useState)(!1),[f,v]=(0,o.useState)(!1),[k,w]=(0,o.useState)(0),[N,L]=(0,o.useState)(0),[z,D]=(0,o.useState)(1),[S,T]=(0,o.useState)(!1),[E,C]=(0,o.useState)(1),[I,A]=(0,o.useState)(!!a),O=l[Math.min(g,l.length-1)]||{},R=O.url||"",[U,Y]=(0,o.useState)(R);(0,o.useEffect)((()=>{if(Y(R),!R||"undefined"==typeof fetch)return;let t=!1;return fetch(R).then((t=>t.ok?t.blob():Promise.reject(t.status))).then((e=>{if(t)return;const n=URL.createObjectURL(e),r=d.current;r&&(m.current=r.currentTime||0,p.current=!r.paused),$.current&&URL.revokeObjectURL($.current),$.current=n,Y(n)})).catch((()=>{})),()=>{t=!0}}),[R]),(0,o.useEffect)((()=>()=>{$.current&&URL.revokeObjectURL($.current)}),[]),(0,o.useEffect)((()=>{if("undefined"==typeof window||"undefined"==typeof Audio||!l||!l.length)return;const t=[];return l.forEach((e=>{if(!e.url)return;const n=new Audio;n.preload="metadata";const r=()=>{isFinite(n.duration)&&n.duration>0&&h((t=>({...t,[e.url]:n.duration})))};n.addEventListener("loadedmetadata",r),n.src=e.url,t.push({audio:n,onMeta:r})})),()=>{t.forEach((({audio:t,onMeta:e})=>{t.removeEventListener("loadedmetadata",e)}))}}),[l]),(0,o.useEffect)((()=>{const t=d.current;if(!t)return;const e=()=>M(!0),n=()=>M(!1),r=()=>{if(t.duration===1/0){y.current=!0;try{t.currentTime=1e101}catch(t){}return}const e=isFinite(t.duration)?t.duration:0;if(e>0&&(w(e),R&&h((t=>({...t,[R]:e})))),y.current||m.current>0){y.current=!1;const e=m.current||0;m.current=0;try{t.currentTime=e}catch(t){}L(e)}if(p.current){p.current=!1;const e=t.play();e&&"function"==typeof e.catch&&e.catch((()=>M(!1)))}},a=()=>{u.current||y.current||L(t.currentTime||0)},s=()=>v(!0),i=()=>{v(!1),M(!0)},o=()=>v(!1),$=()=>{D(t.volume),T(t.muted)},b=()=>{if(I&&!c)return t.currentTime=0,void t.play().catch((()=>{}));c&&g<l.length-1?x((t=>t+1)):c&&I?x(0):M(!1)};return t.addEventListener("play",e),t.addEventListener("pause",n),t.addEventListener("loadedmetadata",r),t.addEventListener("durationchange",r),t.addEventListener("timeupdate",a),t.addEventListener("waiting",s),t.addEventListener("playing",i),t.addEventListener("canplay",o),t.addEventListener("volumechange",$),t.addEventListener("ended",b),t.playbackRate=E,t.readyState>=1&&r(),()=>{t.removeEventListener("play",e),t.removeEventListener("pause",n),t.removeEventListener("loadedmetadata",r),t.removeEventListener("durationchange",r),t.removeEventListener("timeupdate",a),t.removeEventListener("waiting",s),t.removeEventListener("playing",i),t.removeEventListener("canplay",o),t.removeEventListener("volumechange",$),t.removeEventListener("ended",b)}}),[R,I,c,g,l.length]),(0,o.useEffect)((()=>{d.current&&(d.current.playbackRate=E)}),[E,R]);const P=(0,o.useRef)(!1);(0,o.useEffect)((()=>{const t=d.current;t&&(P.current||!r||e||(P.current=!0,t.muted=!0,t.play().catch((()=>{}))))}),[r,e,R]);const Q=()=>{const t=d.current;if(!t)return;const e=t.play();e&&"function"==typeof e.catch&&e.catch((()=>M(!1)))},_=()=>{const t=d.current;t&&(t.paused||t.ended?Q():d.current&&d.current.pause())},B=t=>{let e=parseFloat(t);if(Number.isNaN(e))return null;const n=d.current,r=(n&&isFinite(n.duration)?n.duration:0)||k||b[R]||0;return r>0&&(e=Math.min(e,r)),Math.max(0,e)},H=t=>{const e=B(t);if(null===e)return;L(e);const n=d.current;if(n)try{n.currentTime=e}catch(t){}},W=t=>{const e=(t%l.length+l.length)%l.length;e!==g?(p.current=!0,x(e),L(0)):_()},Z=k||b[R]||0;return{audioRef:d,seekingRef:u,mediaSrc:U,list:l,index:g,multi:c,track:O,url:R,playing:j,buffering:f,duration:Z,durations:b,currentTime:N,volume:z,muted:S,speed:E,repeat:I,seekPct:Z>0?N/Z*100:0,togglePlay:_,stop:()=>{const t=d.current;t&&(t.pause(),t.currentTime=0,L(0))},restart:()=>{const t=d.current;t&&(t.currentTime=0,L(0),Q())},skip:t=>{if(c)return void W(g+t);const e=d.current;if(!e)return;const n=Math.min(Math.max(0,(e.currentTime||0)+t*s),e.duration||0);H(n)},seekTo:H,previewTime:t=>{const e=B(t);null!==e&&L(e)},playIndex:W,setVol:t=>{const e=d.current,n=Math.min(1,Math.max(0,parseFloat(t)||0));D(n),e&&(e.volume=n,n>0&&(e.muted=!1))},toggleMute:()=>{const t=d.current;t&&(t.muted=!t.muted)},cycleSpeed:()=>{const t=i&&i.length?i:[1],e=t.indexOf(E);C(t[(e+1)%t.length])},toggleRepeat:()=>A((t=>!t))}})(t,e),{url:i,track:l,list:c,index:d,playing:u}=s,p=n.style||"bar",m="left"===a.position,$=!1!==r.showSeek,y=!1!==r.showSkip,b=!1!==r.showTimecode,h=!1!==r.showVolume,g=!1!==r.showDownload,x=!!r.showRestart,j=!!r.showStop,M=!!r.showRepeat,f=!!r.showSpeed,v=!!r.showRemaining,w=[q,`${q}--style-${p}`,`${q}--align-${n.alignment||"left"}`,u?"is-playing":""].filter(Boolean).join(" ");if(!i)return(0,k.jsx)("div",{className:w,children:(0,k.jsxs)("div",{className:`${q}-empty`,children:[(0,k.jsx)("span",{className:`${q}-empty-icon`,"aria-hidden":"true",children:(0,k.jsx)(R,{})}),(0,k.jsx)("span",{className:`${q}-empty-title`,children:(0,L.__)("No audio selected","b-blocks")}),(0,k.jsx)("span",{className:`${q}-empty-text`,children:(0,L.__)("Add an audio file to start playing.","b-blocks")})]})});const N=(0,k.jsx)("audio",{ref:s.audioRef,className:`${q}-audio`,preload:"metadata",src:s.mediaSrc||i,children:(0,L.__)("Your browser does not support the audio element.","b-blocks")}),T=(t=null)=>(0,k.jsxs)("div",{className:`${q}-transport`,children:[x?(0,k.jsx)(_,{player:s}):null,y?(0,k.jsx)(P,{player:s,dir:-1}):null,(0,k.jsx)(Y,{player:s}),y?(0,k.jsx)(P,{player:s,dir:1}):null,j?(0,k.jsx)(Q,{player:s}):null,M?(0,k.jsx)(B,{player:s}):null,t]}),E=b?(0,k.jsx)(F,{player:s}):null,C=(0,k.jsxs)("div",{className:`${q}-controls`,children:[T(),m?E:null,$?(0,k.jsx)("div",{className:`${q}-seek-wrap`,children:(0,k.jsx)(W,{player:s})}):null,m?null:E,v?(0,k.jsx)(F,{player:s,remaining:!0}):null,f?(0,k.jsx)(H,{player:s}):null,h?(0,k.jsx)(Z,{player:s}):null,g?(0,k.jsx)(V,{url:i}):null]});let I;return"bar"===p||"card"===p?I=(0,k.jsxs)("div",{className:`${q}-player`,role:"region","aria-label":(0,L.__)("Audio player","b-blocks"),children:["card"===p?(0,k.jsx)(G,{track:l}):null,(0,k.jsxs)("div",{className:`${q}-body`,children:[(0,k.jsx)(X,{track:l}),C]})]}):"bars"===p?I=(0,k.jsxs)("div",{className:`${q}-player`,role:"region","aria-label":(0,L.__)("Audio player","b-blocks"),children:[(0,k.jsx)(X,{track:l}),(0,k.jsxs)("div",{className:`${q}-wave-seek`,children:[(0,k.jsx)(tt,{player:s}),(0,k.jsx)(W,{player:s,className:`${q}-seek--overlay`})]}),(0,k.jsxs)("div",{className:`${q}-controls`,children:[T(),m&&b?(0,k.jsx)(F,{player:s,className:`${q}-time--current`,remaining:!1}):null,$?(0,k.jsx)("div",{className:`${q}-seek-wrap`,children:(0,k.jsx)(W,{player:s})}):null,!m&&b?(0,k.jsx)(F,{player:s,className:`${q}-time--current`,remaining:!1}):null,h?(0,k.jsx)(Z,{player:s}):null,v?(0,k.jsx)(F,{player:s,remaining:!0}):null,f?(0,k.jsx)(H,{player:s}):null,g?(0,k.jsx)(V,{url:i}):null]})]}):"vinyl"===p?I=(0,k.jsxs)("div",{className:`${q}-player`,role:"region","aria-label":(0,L.__)("Audio player","b-blocks"),children:[(0,k.jsxs)("div",{className:`${q}-vinyl`,children:[(0,k.jsxs)("div",{className:`${q}-vinyl-disc`,children:[l.art?(0,k.jsx)("img",{className:`${q}-vinyl-art`,src:l.art,alt:""}):null,(0,k.jsx)("span",{className:`${q}-vinyl-center`})]}),(0,k.jsxs)("div",{className:`${q}-vinyl-arm`,"aria-hidden":"true",children:[(0,k.jsx)("span",{className:`${q}-vinyl-arm-base`}),(0,k.jsx)("span",{className:`${q}-vinyl-arm-stick`}),(0,k.jsx)("span",{className:`${q}-vinyl-arm-head`})]})]}),(0,k.jsxs)("div",{className:`${q}-body`,children:[l.title?(0,k.jsx)("p",{className:`${q}-title ${q}-title--pill`,children:l.title}):null,$?(0,k.jsx)("div",{className:`${q}-seek-wrap`,children:(0,k.jsx)(W,{player:s})}):null,T(),(0,k.jsxs)("div",{className:`${q}-vinyl-row`,children:[b?(0,k.jsxs)("span",{className:`${q}-time ${q}-time--pill`,"aria-hidden":"true",children:[z(s.currentTime)," / ",z(s.duration)]}):null,v?(0, | |
| 7 | +k.jsx)(F,{player:s,remaining:!0,className:`${q}-time--pill`}):null,h?(0,k.jsx)(Z,{player:s}):null]})]}),g?(0,k.jsx)(V,{url:i}):null]}):"coverflow"===p?I=(0,k.jsxs)("div",{className:`${q}-player`,role:"region","aria-label":(0,L.__)("Audio player","b-blocks"),children:[g?(0,k.jsx)(V,{url:i}):null,(0,k.jsx)("div",{className:`${q}-coverflow`,children:c.map(((t,e)=>{const n=e-d;return Math.abs(n)>2?null:(0,k.jsx)("button",{type:"button",className:`${q}-cover ${q}-cover--pos${n}`,"aria-label":t.title||(0,L.__)("Track","b-blocks"),"aria-current":0===n?"true":void 0,onClick:()=>s.playIndex(e),children:t.art?(0,k.jsx)("img",{src:t.art,alt:""}):(0,k.jsx)("span",{className:`${q}-art-placeholder`,"aria-hidden":"true",children:(0,k.jsx)(R,{})})},e)}))}),(0,k.jsx)(X,{track:l}),(0,k.jsxs)("div",{className:`${q}-controls`,children:[b?(0,k.jsx)("span",{className:`${q}-current`,children:z(s.currentTime)}):null,$?(0,k.jsx)("div",{className:`${q}-seek-wrap`,children:(0,k.jsx)(W,{player:s})}):null,b?(0,k.jsx)("span",{className:`${q}-duration`,children:z(s.duration)}):null,v?(0,k.jsx)(F,{player:s,remaining:!0}):null]}),T()]}):"playlist"===p&&(I=(0,k.jsxs)("div",{className:`${q}-player`,role:"region","aria-label":(0,L.__)("Audio player","b-blocks"),children:[g?(0,k.jsx)(V,{url:i}):null,(0,k.jsxs)("div",{className:`${q}-nowplaying`,children:[b?(0,k.jsx)("span",{className:`${q}-current`,children:z(s.currentTime)}):null,l.title?(0,k.jsx)("span",{className:`${q}-np-title`,children:l.title}):null,b?(0,k.jsx)("span",{className:`${q}-duration`,children:z(s.duration)}):null,v?(0,k.jsx)(F,{player:s,remaining:!0}):null]}),$?(0,k.jsx)("div",{className:`${q}-seek-wrap`,children:(0,k.jsx)(W,{player:s})}):null,T(),h?(0,k.jsx)("div",{className:`${q}-volume-row`,children:(0,k.jsx)(Z,{player:s})}):null,(0,k.jsx)("ul",{className:`${q}-list`,children:c.map(((t,e)=>{const n=e===d&&s.duration>0?s.duration:s.durations?.[t.url]||t.duration||0,r=()=>e===d?s.togglePlay():s.playIndex(e);return(0,k.jsxs)("li",{className:`${q}-list-item ${e===d?"is-active":""}`.trim(),onClick:r,onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),r())},role:"button",tabIndex:0,"aria-label":t.title||`${(0,L.__)("Track","b-blocks")} ${e+1}`,children:[(0,k.jsx)("button",{type:"button",className:`${q}-list-play`,"aria-hidden":"true",tabIndex:-1,onClick:t=>{t.stopPropagation(),r()},children:e===d&&u?(0,k.jsx)(S,{}):(0,k.jsx)(D,{})}),(0,k.jsx)("span",{className:`${q}-list-title`,children:t.title||`${(0,L.__)("Track","b-blocks")} ${e+1}`}),(0,k.jsx)("span",{className:`${q}-list-time`,children:z(n)})]},e)}))})]})),(0,k.jsxs)("div",{className:w,children:[N,I]})},nt=()=>{document.querySelectorAll(".wp-block-b-blocks-audio-player").forEach((e=>{if(!e.dataset.attributes)return;const n=JSON.parse(e.dataset.attributes);(0,t.createRoot)(e).render((0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(N,{attributes:n,id:e.id}),(0,k.jsx)(et,{attributes:n})]})),e?.removeAttribute("data-attributes")}))};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",nt):nt()})(); | |