| @@ -1 +1,6 @@ | ||
| 1 | -(()=>{"use strict";const t=window.ReactDOM,e=window.React,o=window.wp.i18n,n="b-blocks-instagram",r=t=>t?`https://www.instagram.com/${encodeURIComponent(t)}/`:"https://www.instagram.com/",a=t=>`https://www.instagram.com/explore/tags/${encodeURIComponent(t)}/`,i=window.ReactJSXRuntime,s=((0,o.__)("General","b-blocks"),(0,o.__)("Style","b-blocks"),(0,o.__)("Advanced","b-blocks"),(0,o.__)("Normal","b-blocks"),(0,o.__)("Hover","b-blocks"),(0,o.__)("None","b-blocks"),(0,o.__)("Zoom In","b-blocks"),(0,o.__)("Zoom Out","b-blocks"),(0,o.__)("Rotate","b-blocks"),(0,o.__)("Grayscale","b-blocks"),(0,o.__)("Blur","b-blocks"),(0,o.__)("Lift","b-blocks"),(0,o.__)("Shine","b-blocks"),(0,o.__)("Overlay Top","b-blocks"),(0,o.__)("Overlay Center","b-blocks"),(0,o.__)("Overlay Bottom","b-blocks"),(0,o.__)("Below Image","b-blocks"),(0,o.__)("Left","b-blocks"),(0,o.__)("Center","b-blocks"),(0,o.__)("Right","b-blocks"),(0,o.__)("Square","b-blocks"),(0,o.__)("Portrait","b-blocks"),(0,o.__)("Landscape","b-blocks"),(0,o.__)("Original","b-blocks"),(t={},e,o,n="")=>{const r=e=>{const n=t?.[e]?.[o];return null==n||""===n?void 0:n},a=r("desktop")??n;if("desktop"===e)return a;const i=r("tablet")??a;return"tablet"===e?i:r("mobile")??i}),l=(t,e="")=>{if(null==t||""===t)return e;const o=parseFloat(t);return isNaN(o)?e:/[a-z%]$/i.test(String(t).trim())?String(t).trim():`${o}px`},c=(t="",{stripHashtags:e=!1,captionLength:o=0}={})=>{let n=String(t||"");e&&(n=n.replace(/#[\p{L}\p{N}_]+/gu,"").replace(/\s{2,}/g," ").trim());const r=parseInt(o,10)||0;return 0<r&&n.length>r?`${n.slice(0,r).trimEnd()}…`:n},d=(t="",e=!0)=>String(t||"").split(/(#[\p{L}\p{N}_]+)/gu).filter((t=>""!==t)).map(((t,o)=>{const r=e&&/^#[\p{L}\p{N}_]+$/u.test(t)?t.slice(1):"";return r?(0,i.jsx)("a",{className:`${n}-tag`,href:a(r),target:"_blank",rel:"noreferrer nofollow noopener",children:t},o):(0,i.jsx)("span",{children:t},o)})),u=(t={})=>t.thumbnail_url||t.media_url||"",p=({attributes:t,username:e="",isBackend:a=!1})=>{const{elements:s={}}=t;return s.followButton?(0,i.jsx)("a",{className:`${n}-follow`,href:a?"#":r(e),target:a?"_self":"_blank",rel:"noreferrer noopener",onClick:t=>{a&&t.preventDefault()},children:s.followLabel||(0,o.__)("Follow On Instagram","b-blocks")}):null},$=(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"18",height:"18",fill:"currentColor","aria-hidden":"true",children:(0,i.jsx)("path",{d:"M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"})}),m=(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,i.jsx)("path",{d:"M34.8 29.7V11c0-2.9-2.3-5.2-5.2-5.2H11c-2.9 0-5.2 2.3-5.2 5.2v18.7c0 2.9 2.3 5.2 5.2 5.2h18.7c2.8-.1 5.1-2.4 5.1-5.2zM39.2 15v16.1c0 4.5-3.7 8.2-8.2 8.2H14.9c-.6 0-.9.7-.5 1.1 1 1.1 2.4 1.8 4.1 1.8h13.4c5.7 0 10.3-4.6 10.3-10.3V18.5c0-1.6-.7-3.1-1.8-4.1-.5-.4-1.2 0-1.2.6z"})}),b=(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,i.jsx)("path",{d:"M5.888 22.5a3.46 3.46 0 0 1-1.721-.46l-.003-.002a3.451 3.451 0 0 1-1.72-2.982V4.943a3.445 3.445 0 0 1 5.163-2.987l12.226 7.059a3.444 3.444 0 0 1-.001 5.967l-12.22 7.056a3.462 3.462 0 0 1-1.724.462Z"})}),g=(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"22",height:"22",fill:"currentColor","aria-hidden":"true",children:(0,i.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})}),h=(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor","aria-hidden":"true",children:(0,i.jsx)("path",{d:"M14.71 15.88 10.83 12l3.88-3.88a.996.996 0 1 0-1.41-1.41L8.71 11.3a.996.996 0 0 0 0 1.41l4.59 4.59c.39.39 1.02.39 1.41 0 .38-.39.39-1.03 0-1.42z"})}),M=(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor","aria-hidden":"true",children:(0,i.jsx)("path",{d:"M9.29 15.88 13.17 12 9.29 8.12a.996.996 0 1 1 1.41-1.41l4.59 4.59c.39.39.39 1.02 0 1.41L10.7 17.3a.996.996 0 0 1-1.41 0c-.38-.39-.39-1.03 0-1.42z"})}),y=({attributes:t,feed:e={},index:r,isBackend:a=!1,onOpen:s})=>{const{elements:l={},caption:p={}}=t,{media_type:$="IMAGE",caption:g=""}=e,h=p.style||"overlay-center",M=a?(0,o.__)("Instagram caption preview text with #hashtags","b-blocks"):"",y=g||M,x=l.caption&&y?c(y,l):"",w=()=>x?(0,i.jsx)("div",{className:`${n}-caption`,children:(0,i.jsx)("p",{children:d(x,l.linkHashtags)})}):null,j=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("figure",{className:`${n}-figure`,children:[(0,i.jsx)("img",{className:`${n}-image`,src:u(e),alt:c(y,{stripHashtags:!0,captionLength:120}),loading:"lazy"}),(0,i.jsx)("span",{className:`${n}-overlay`}),l.mediaIcon&&"IMAGE"!==$&&(0,i.jsx)("span",{className:`${n}-type`,children:"VIDEO"===$?b:m}),h.startsWith("overlay")&&(0,i.jsx)(w,{})]}),"below"===h&&(0,i.jsx)(w,{})]});return l.lightbox?(0,i.jsx)("div",{className:`${n}-item`,children:(0,i.jsx)("button",{type:"button",className:`${n}-open`,onClick:()=>s(r),children:j})}):l.linkPosts&&e.permalink?(0,i.jsx)("div",{className:`${n}-item`,children:(0,i.jsx)("a",{className:`${n}-open`,href:e.permalink,target:l.openInNewTab?"_blank":"_self",rel:"noreferrer noopener",children:j})}):(0,i.jsx)("div",{className:`${n}-item`,children:j})},x=({attributes:t,user:e={},compact:o=!1})=>{const{elements:a={},profile:s={}}=t,{username:l="",profile_picture_url:c="",name:d="",biography:u=""}=e,p=r(l),$=d||s.nameText||"",m=u||s.bioText||"",b=c||s.photo||"";return(0,i.jsxs)("div",{className:`${n}-profile${o?` ${n}-profile-compact`:""}`,children:[a.profilePhoto&&b&&(0,i.jsx)("a",{className:`${n}-photo`,href:p,target:"_blank",rel:"noreferrer noopener",children:(0,i.jsx)("img",{src:b,alt:l,loading:"lazy"})}),(0,i.jsxs)("div",{className:`${n}-identity`,children:[(0,i.jsxs)("a",{className:`${n}-username`,href:p,target:"_blank",rel:"noreferrer noopener",children:["@",l]}),!o&&a.profileName&&$&&(0,i.jsx)("p",{className:`${n}-name`,children:$}),!o&&a.profileBio&&m&&(0,i.jsx)("p",{className:`${n}-bio`,children:m})]})]})},w=({feed:t})=>{const r=(0,e.useRef)(null),a=t?.children?.data||[],s=t=>{const e=r.current;e&&e.scrollBy({left:t*e.clientWidth,behavior:"smooth"})};return(0,i.jsxs)("div",{className:`${n}-carousel`,children:[(0,i.jsx)("div",{className:`${n}-slides`,ref:r,children:a.map((t=>(0,i.jsx)("div",{className:`${n}-slide`,children:t.thumbnail_url?(0,i.jsx)("video",{controls:!0,poster:t.thumbnail_url,src:t.media_url}):(0,i.jsx)("img",{src:t.media_url,alt:""})},t.id)))}),1<a.length&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("button",{type:"button",className:`${n}-nav ${n}-nav-prev`,onClick:t=>{t.stopPropagation(),s(-1)},"aria-label":(0,o.__)("Previous slide","b-blocks"),children:h}),(0,i.jsx)("button",{type:"button",className:`${n}-nav ${n}-nav-next`,onClick:t=>{t.stopPropagation(),s(1)},"aria-label":(0,o.__)("Next slide","b-blocks"),children:M})]})]})},j=({attributes:r,user:a,feeds:s=[],index:l,blockId:c="",container:u,isBackend:p=!1,onClose:m,onMove:b})=>{const{lightbox:y={},elements:j={}}=r,v=(0,e.useRef)(null),[f,k]=(0,e.useState)(!1),N=s[l],L=(0,e.useCallback)((t=>{"Escape"===t.key&&m(),"ArrowRight"===t.key&&b(1),"ArrowLeft"===t.key&&b(-1)}),[m,b]);if((0,e.useEffect)((()=>{const t=u?.ownerDocument||document;t.addEventListener("keydown",L);const e=t.body?.style?.overflow;return t.body&&(t.body.style.overflow="hidden"),v.current?.focus(),k(!0),()=>{t.removeEventListener("keydown",L),t.body&&void 0!==e&&(t.body.style.overflow=e)}}),[L,u]),!N)return null;const{media_type:D="IMAGE",media_url:z="",thumbnail_url:I="",caption:T="",permalink:C=""}=N,S=c||"default",_=`\n\t\t.${n}-lightbox[data-bb-id="${S}"] {\n\t\t\t${y.backdrop?`background: ${y.backdrop} !important;`:""}\n\t\t}\n\t\t.${n}-lightbox[data-bb-id="${S}"] .${n}-close {\n\t\t\t${y.closeColor?`color: ${y.closeColor} !important;`:""}\n\t\t\t${y.closeBg?`background: ${y.closeBg} !important;`:""}\n\t\t}\n\t\t.${n}-lightbox[data-bb-id="${S}"] .${n}-close svg {\n\t\t\t${y.closeColor?"fill: currentColor !important;":""}\n\t\t}\n\t\t.${n}-lightbox[data-bb-id="${S}"] .${n}-close:hover {\n\t\t\t${y.closeHoverColor?`color: ${y.closeHoverColor} !important;`:""}\n\t\t\t${y.closeHoverBg?`background: ${y.closeHoverBg} !important;`:""}\n\t\t}\n\t\t.${n}-lightbox[data-bb-id="${S}"] .${n}-nav {\n\t\t\t${y.navColor?`color: ${y.navColor} !important;`:""}\n\t\t\t${y.navBg?`background: ${y.navBg} !important;`:""}\n\t\t}\n\t\t.${n}-lightbox[data-bb-id="${S}"] .${n}-nav svg {\n\t\t\t${y.navColor?"fill: currentColor !important;":""}\n\t\t}\n\t\t.${n}-lightbox[data-bb-id="${S}"] .${n}-nav:hover {\n\t\t\t${y.navHoverColor?`color: ${y.navHoverColor} !important;`:""}\n\t\t\t${y.navHoverBg?`background: ${y.navHoverBg} !important;`:""}\n\t\t}\n\t`,O=(0,i.jsxs)("div",{className:`${n}-lightbox${f?" is-open":""}`,"data-bb-id":S,role:"dialog","aria-modal":"true","aria-label":(0,o.__)("Instagram post","b-blocks"),ref:v,tabIndex:-1,onMouseDown:t=>t.stopPropagation(),onClick:t=>{t.stopPropagation(),t.target===t.currentTarget&&m()},children:[(0,i.jsx)("style",{dangerouslySetInnerHTML:{__html:_}}),(0,i.jsx)("button",{type:"button",className:`${n}-close`,onClick:t=>{t.stopPropagation(),m()},"aria-label":(0,o.__)("Close","b-blocks"),children:g}),1<s.length&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("button",{type:"button",className:`${n}-nav ${n}-nav-prev`,onClick:t=>{t.stopPropagation(),b(-1)},"aria-label":(0,o.__)("Previous post","b-blocks"),children:h}),(0,i.jsx)("button",{type:"button",className:`${n}-nav ${n}-nav-next`,onClick:t=>{t.stopPropagation(),b(1)},"aria-label":(0,o.__)("Next post","b-blocks"),children:M})]}),(0,i.jsxs)("div",{className:`${n}-dialog`,onClick:t=>t.stopPropagation(),children:[(0,i.jsxs)("div",{className:`${n}-media`,children:["VIDEO"===D&&(0,i.jsx)("video",{controls:!0,autoPlay:!0,poster:I,src:z}),"CAROUSEL_ALBUM"===D&&(0,i.jsx)(w,{feed:N}),"IMAGE"===D&&(0,i.jsx)("img",{src:z,alt:""})]}),(0,i.jsxs)("div",{className:`${n}-details`,children:[y.showProfile&&(0,i.jsx)(x,{attributes:r,user:a,compact:!0}),y.showCaption&&(T||p)&&(0,i.jsx)("div",{className:`${n}-full-caption`,children:d(T||(p?(0,o.__)("Instagram caption preview text with #hashtags","b-blocks"):""),j.linkHashtags)}),y.showLink&&C&&(0,i.jsxs)("a",{className:`${n}-permalink`,href:C,target:"_blank",rel:"noreferrer nofollow noopener",children:[$," ",(0,o.__)("View on Instagram","b-blocks")]})]})]})]}),E=u?.ownerDocument?.body||("undefined"!=typeof document?document.body:null);return E?(0,t.createPortal)(O,E):O},v=({count:t=12})=>(0,i.jsx)("div",{className:`${n}-grid`,children:Array.from({length:t},((t,e)=>(0,i.jsx)("div",{className:`${n}-item ${n}-skeleton`},e)))}),f=({attributes:t,id:r="",isBackend:a=!1})=>{const s=(0,e.useRef)(null),{source:l={},elements:c={}}=t,[d,u]=(0,e.useState)({status:"loading",user:{},media:[],error:""}),[$,m]=(0,e.useState)(1),[b,g]=(0,e.useState)(-1),{account:h="",limit:M=24,perPage:w=12,cacheMinutes:f=30}=l;(0,e.useEffect)((()=>{let t=!0;return u((t=>({...t,status:"loading",error:""}))),(({account:t="",limit:e=12,cacheMinutes:o=30})=>(async(t,e={})=>{const o=window?.bBlocksInstagram||null;if(!o?.ajaxUrl)throw new Error("Instagram endpoint is unavailable.");const n=new FormData;n.append("action",t),n.append("nonce",o.nonce),Object.entries(e).forEach((([t,e])=>n.append(t,e)));const r=await fetch(o.ajaxUrl,{method:"POST",body:n,credentials:"same-origin"}),a=await r.json();if(!a?.success)throw new Error(a?.data||"Could not load the feed.");return a.data})("bBlocksInstagramFeed",{account:t,limit:e,cache:o}))({account:h,limit:M,cacheMinutes:f}).then((e=>t&&u({status:"ready",user:e?.user||{},media:e?.media||[],error:""}))).catch((e=>t&&u({status:"error",user:{},media:[],error:e.message}))),()=>{t=!1}}),[h,M,f]),(0,e.useEffect)((()=>m(1)),[h,w]);const k={user:d.user,media:d.media},N=parseInt(w,10)||12,L=(0,e.useMemo)((()=>k.media.slice(0,N*$)),[k.media,N,$]),D=k.media.length>L.length,z=(t=>{const{elements:e={},item:o={},caption:r={}}=t;return[n,`${n}-hover-${o.hoverEffect||"none"}`,`${n}-caption-${r.style||"overlay-center"}`,r.onHover&&"below"!==r.style?`${n}-caption-on-hover`:"",e.caption?`${n}-has-caption`:"",e.profile?`${n}-has-profile`:""].filter(Boolean).join(" ")})(t);if("loading"===d.status&&!a)return(0,i.jsx)("div",{className:z,children:(0,i.jsx)(v,{count:N})});if("error"===d.status&&!a&&!k.media.length)return null;if(!k.media.length)return(0,i.jsx)("div",{className:z,children:(0,i.jsx)("p",{className:`${n}-notice`,children:d.error||(0,o.__)("No posts to show yet.","b-blocks")})});const I=c.profile||c.followButton&&!c.followInFooter,T=c.loadMore&&D||c.followButton&&c.followInFooter;return(0,i.jsxs)("div",{className:z,ref:s,children:[I&&(0,i.jsxs)("div",{className:`${n}-header`,children:[c.profile&&(0,i.jsx)(x,{attributes:t,user:k.user}),!c.followInFooter&&(0,i.jsx)(p,{attributes:t,username:k.user?.username,isBackend:a})]}),(0,i.jsx)("div",{className:`${n}-grid`,children:L.map(((e,o)=>(0,i.jsx)(y,{attributes:t,feed:e,index:o,isBackend:a,onOpen:g},e.id)))}),T&&(0,i.jsxs)("div",{className:`${n}-footer`,children:[c.loadMore&&D&&(0,i.jsx)("button",{type:"button",className:`${n}-load-more`,onClick:()=>a?{}:m($+1),children:c.loadMoreLabel||(0,o.__)("Load More","b-blocks")}),c.followInFooter&&(0,i.jsx)(p,{attributes:t,username:k.user?.username,isBackend:a})]}),c.lightbox&&-1<b&&(0,i.jsx)(j,{attributes:t,user:k.user,feeds:L,index:b,blockId:r,container:s.current,isBackend:a,onClose:()=>g(-1),onMove:t=>g((e=>(e+t+L.length)%L.length))})]})},k=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}},L="@media only screen and (min-width: 1025px)",D="@media only screen and (max-width: 1024px)",z="@media only screen and (max-width: 640px)",I="linear-gradient(135deg, #0040E3, #18D4FD)",T=t=>{const e=N(t);return e?`url('${e.replace(/['"()]/g,"")}')`:"none"},C=(t,e)=>k(e)?`${t}: ${e};`:"",S=(t,e=!0,o=!0,n=!0)=>{const{type:r="solid",color:a="",gradient:i=I,image:s={},position:l="center center",attachment:c="",repeat:d="no-repeat",size:u="",overlayColor:p=""}=t||{};return"gradient"===r&&o?C("background",i):"image"===r&&n?`background: ${T(s?.url)};\n\t\t\t\t${C("background-color",p)}\n\t\t\t\t${C("background-position",l)}\n\t\t\t\t${C("background-size",u)}\n\t\t\t\t${C("background-repeat",d)}\n\t\t\t\t${C("background-attachment",c)}\n\t\t\t\t${C("background-repeat",d)}\n\t\t\t\tbackground-blend-mode: overlay;`:e&&C("background",a)},_=t=>{if(!t)return"";const e=t=>{const{color:e="#000000",style:o="solid",width:n="0px"}=t;return`${n} ${o} ${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((o=>t[o]?`border-${o}: ${e(t[o])};`:"")).join(" ").trim():C("border",e(t))},O=(t,e="box")=>{let o="";return t?.map(((n,r)=>{const{hOffset:a="0px",vOffset:i="0px",blur:s="0px",spreed:l="0px",color:c="#e7f0fe",isInset:d=!1}=n||{},u=d?"inset":"",p=`${a} ${i} ${s}`,$=r+1>=t.length?"":", ";o+="text"===e?`${p} ${c}${$}`:`${p} ${l} ${c} ${u}${$}`})),o||""},E=(t,e,o=!0)=>{const{fontFamily:n="Default",fontCategory:r="sans-serif",fontVariant:a=400,fontWeight:i,isUploadFont:s=!0,fontSize:l={desktop:null,tablet:null,mobile:null},fontStyle:c,textTransform:d,textDecoration:u,lineHeight:p,letterSpace:$}=e||{},m=!o||!n||"Default"===n,b=l?.desktop||l,g=l?.tablet||b,h=l?.mobile||g,M=t=>{const e=String(t);return["px","em","rem","%","vh","vw"].some((t=>e.endsWith(t)))?e:"number"==typeof t?`${e}px`:""},y=`\n\t\t${m?"":`font-family: '${n}', ${r};`}\n\t\t${C("font-weight",i)}\n\t\t${C("font-size",M(b))}\n\t\t${C("font-style",c)}\n\t\t${C("text-transform",d)}\n\t\t${C("text-decoration",u)}\n\t\t${C("line-height",p)}\n\t\t${C("letter-spacing",$)}\n\t`,x=a&&400!==a?"400i"===a?":ital@1":a?.includes("00i")?`: ital, wght@1, ${a?.replace("00i","00")} `:`: wght@${a} `:"",w=m?"":`https://fonts.googleapis.com/css2?family=${n?.split(" ").join("+")}${x.replace(/ /g,"")}&display=swap`;return{googleFontLink:!s||m?"":`@import url(${w});`,styles:`${t}{\n\t\t\t${y}\n\t\t}\n\t\t${D} {\n\t\t\t${t}{\n\t\t\t\t${C("font-size",M(g))}\n\t\t\t}\n\t\t}\n\t\t${z} {\n\t\t\t${t}{\n\t\t\t\t${C("font-size",M(h))}\n\t\t\t}\n\t\t}`.replace(/\s+/g," ").trim()}},A=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""},Y=t=>{const{position:e="center center",xPosition:o=0,yPosition:n=0,attachment:r="",repeat:a="no-repeat",size:i="cover",customSize:s="0px"}=t||{},l=t=>"initial"!==t||k(t);return`\n\t\t${l(e)?`background-position: ${"custom"===e?`${o} ${n}`:e};`:""}\n\t\t${r&&l(r)?`background-attachment: ${r};`:""}\n\t\t${l(a)?`background-repeat: ${a};`:""}\n\t\t${l(i)?`background-size: ${"custom"===i?`${s} auto`:i};`:""}\n\t`},Q=(t={})=>t?{desktop:k(t.url)?`background-image: ${T(t.url)}; ${Y(t?.desktop)}`:"",tablet:k(t.url)?Y(t?.tablet):"",mobile:k(t.url)?Y(t?.mobile):""}:"",U=(t,e,o=!1)=>{const{type:n="color",color:r,gradient:a,img:i,video:s}=t||{},l="color"===n?C("background",r):"gradient"===n?(t=>{const{type:e="linear",radialType:o="ellipse",colors:n=[],centerPositions:r={x:0,y:0},angel:a=0}=t||{};if(k(t)){const t=n?.map((({color:t,position:e})=>`${t} ${e}%`)),i=`linear-gradient(${a}deg, ${t})`;return C("background","radial"===e?`radial-gradient(${o} at ${r?.x}% ${r?.y}%,${t})`:i)}return""})(a):"image"===n?Q(i).desktop:"",c="image"===n?Q(i).tablet:"",d="image"===n?Q(i).mobile:"",u=o?`${e}:hover`:e;return`\n\t\t${"video"===n?((t,e)=>{const{url:o,loop:n}=t||{},r=document.querySelector(e),a=r?.querySelector(".bPlVideo"),i=document.createElement("video");if(i.muted=!0,i.autoplay=!0,i.classList.add("bPlVideo"),!a&&r&&o){const t=N(o);if(t){const e=document.createElement("source");e.src=t,i.appendChild(e),r.appendChild(i)}}return i.loop=n,i.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}`})(s,e):""}\n\n\t\t${l?`${u}{\n\t\t\t${l}\n\t\t}`:""}\n\n\t\t${c?`${D} {\n\t\t\t${u}{\n\t\t\t\t${c}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${d?`${z} {\n\t\t\t${u}{\n\t\t\t\t${d}\n\t\t\t}\n\t\t}`:""}\n\t`.replace(/\s+/g," ").trim()},P=(t,e,o=!1)=>{const{isEnabled:n,colors:r,opacity:a=1,blend:i,filter:s="",blur:l=0,brightness:c=100,contrast:d=100,saturation:u=100,hue:p=0,position:$={top:0,right:0,bottom:0,left:0},zIndex:m=-1}=t||{},b=`${100!==c?`brightness(${c}%)`:""} ${100!==d?`contrast(${d}%)`:""} ${100!==u?`saturate(${u}%)`:""} ${0!==l?`blur(${l}px)`:""} ${0!==p?`hue-rotate(${p}deg)`:""}`,g=`${s}: ${s?b:""}; -webkit-${s}: ${s?b:""};`,h=o?`${e}:hover::after`:`${e}::after`;return n?`\n\t\t${e}{\n\t\t\tposition:relative;\n\t\t\tz-index:1;\n\t\t}\n\t\t${e}::after{\n\t\t\tcontent: '';\n\t\t\tposition: absolute;\n\t\t\ttop:${k($.top)?$.top:0};\n\t\t\tright:${k($.right)?$.right:0};\n\t\t\tbottom:${k($.bottom)?$.bottom:0};\n\t\t\tleft:${k($.left)?$.left:0};\n\t\t\tz-index:${m};\n\t\t}\n\t\t${U(r,h,!1)}\n\t\t${h}{\n\t\t\t${C("opacity",a)}\n\t\t\t${C("mix-blend-mode",i)}\n\t\t\t${g}\n\t\t}\n\t`.replace(/\s+/g," ").trim():""},B=(t,e,o=!1)=>{const n=(t,e="desktop")=>{if(!k(t))return"";const{skew:o,scale:n,rotate:r,offset:a,flipX:i,flipY:s}=t,{threeDRotate:l}=r||{},{isProportion:c}=n||{},d=[];return k(o)&&(k(o?.[e]?.x)&&d.push(`skewX(${o[e].x}deg)`),k(o?.[e]?.y)&&d.push(`skewY(${o[e].y}deg)`)),c?k(n?.[e]?.scale)&&d.push(`scale(${n[e].scale})`):(k(n?.[e]?.x)&&d.push(`scaleX(${n[e].x})`),k(n?.[e]?.y)&&d.push(`scaleY(${n[e].y})`)),k(r)&&(k(r?.[e]?.z)&&d.push(`rotateZ(${r[e].z}deg)`),l&&(k(r?.[e]?.x)&&d.push(`rotateX(${r[e].x}deg)`),k(r?.[e]?.y)&&d.push(`rotateY(${r[e].y}deg)`))),k(a)&&(k(a?.[e]?.x)&&d.push(`translateX(${a[e].x})`),k(a?.[e]?.y)&&d.push(`translateY(${a[e].y})`)),k(i)&&d.push(i?"scaleX(-1)":""),k(s)&&d.push(s?"scaleY(-1)":""),0===d.length?"":C("transform",d.join(" "))},r=o?`${e}:hover`:e;return`\n\t\t${r} {\n\t\t\t${n(t,"desktop")}\n\t\t}\n\t\t${D}{\n\t\t\t${r} {\n\t\t\t\t${n(t,"tablet")}\n\t\t\t}\n\t\t}\n\t\t${z}{\n\t\t\t${r} {\n\t\t\t\t${n(t,"mobile")}\n\t\t\t}\n\t\t}\n\t`},H=t=>{const{padding:e,margin:o,height:n,width:r}=t||{},a=(t,e)=>C(t,e),i=(t,e,o)=>a(t,e?.[t]?.[o])+a(`min-${t}`,e?.min?.[o])+a(`max-${t}`,e?.max?.[o]),s=t=>C("padding",A(t)),l=t=>C("margin",A(t));return{desktop:s(e?.desktop)+l(o?.desktop)+i("height",n,"desktop")+i("width",r,"desktop"),tablet:s(e?.tablet)+l(o?.tablet)+i("height",n,"tablet")+i("width",r,"tablet"),mobile:s(e?.mobile)+l(o?.mobile)+i("height",n,"mobile")+i("width",r,"mobile")}},R=t=>{const{normal:e,hover:o}=t||{},n=t=>{const{border:e,radius:o,shadow:n}=t||{},r=C("border-radius",A(o)),a=C("box-shadow",O(n,"box"));return _(e)+r+a};return{normal:n(e),hover:n(o)}},Z=t=>{const{zIndex:e,overflow:o}=t||{},n=o?`overflow: ${o};`:"",r=t=>`${C("z-index",e?.[t])} ${C("position",k(e?.[t])?"relative":"")}`;return{desktop:r("desktop")+n,tablet:r("tablet"),mobile:r("mobile")}},F=(t,e)=>{const{desktop:o=!1,tablet:n=!1,mobile:r=!1}=t||{},a=e?"opacity: 0.5;":"display: none;",i=t=>t?a:"";return{desktop:i(o),tablet:i(n),mobile:i(r)}},W=(t,e,o=!1,n=!0)=>{const{dimension:r,transform:a,background:i,borderShadow:s,mask:l,animation:c,visibility:d,responsive:u,position:p={},floating:$={},motion:m={},css:b=""}=e||{},g=o?`#${t}>div>div${n?":first-child":""}`:`#${t}>div`;((t,e,o)=>{const n=o?`#${e} > div`:`#${e}`,r=document.querySelector(n);r&&t&&t.type&&(r.setAttribute("data-aos",t.type),r.setAttribute("data-aos-duration",1e3*t.duration||.4),r.setAttribute("data-aos-delay",1e3*t.delay||0),r.classList.contains("aos-init")||(r.classList.add("aos-init"),window?.AOS?.init()),o)&&new IntersectionObserver((t=>{t.forEach((t=>{t.intersectionRatio>.5?r.classList.add("aos-animate"):r.classList.remove("aos-animate")}))}),{threshold:[.5]}).observe(r)})(c,t,o);const h=H(r).desktop+Z(d).desktop+((t,e,o)=>{const{transition:n=.4}=t||{},{transition:r=.4}=e||{},{transition:a=200}=o||{};return`transition: background ${n}s, border ${r}s, border-radius ${r}s, box-shadow ${r}s, transform ${a}ms ease-in-out;`})(i,s,a)+(t=>{const{isMask:e=!1,shape:o={type:"circle"},size:n={type:"contain",scale:"100%"},position:r={type:"center center",x:50,y:50},repeat:a="no-repeat"}=t||{};return e?`-webkit-mask-image: ${"custom"===o.type?T(o.url):`url(${(i=o.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"===n.type?n.scale:n.type};\n\t\t${"custom"===r.type?`${C("-webkit-mask-position-x",r.x)}\n\t\t\t${C("-webkit-mask-position-y",r.y)}`:`${C("-webkit-mask-position",r.type)}`}\n\t\t${"cover"!==n.type?`-webkit-mask-repeat: ${a};`:""}`:"";var i})(l),M=H(r).tablet+Z(d).tablet+F(u,o).tablet,y=H(r).mobile+Z(d).mobile+F(u,o).mobile,x=R(s).normal,w=R(s).hover,j=F(u,o).desktop;return`\n\t\t${h||x?`${g} {\n\t\t\t${h}\n\t\t\t${x}\n\t\t}`:""}\n\t\t${w?`${g}:hover {\n\t\t\t${w}\n\t\t}`:""}\n\n\t\t${j?`${L} {\n\t\t\t${g}{\n\t\t\t\t${j}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${M?`${D} {\n\t\t\t${g}{\n\t\t\t\t${M}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${y?`${z} {\n\t\t\t${g}{\n\t\t\t\t${y}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${U(i?.normal,g)}\n\t\t${U(i?.hover,g,!0)}\n\t\t${P(i?.overlay,g)}\n\t\t${P(i?.hoverOverlay,g,!0)}\n\t\t${k(a?.normal)?B(a?.normal,g):""}\n\t\t${k(a?.hover)?B(a?.hover,g,!0):""}\n\t\t${((t,e)=>{const{desktop:o={},tablet:n={},mobile:r={}}=t,a=(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${o?.type?a(o):""}\n\t\t\n\t\t${D}{\n\t\t\t${n?.type?a(n):""}\n\t\t}\n\n\t\t${z}{\n\t\t\t${r?.type?a(r):""}\n\t\t}\n\t`})(p,g)}\n\t\t${((t,e,o="")=>{const{translate:n={},rotate:r={},scale:a={},isEnabled:i=!1}=t||{};if(!i)return"";const s=[],l=[];return[{name:"Translate",property:"translate",values:n,value:t=>["x","y"].some((e=>k(n?.[e]?.[t])))?`${n?.x?.[t]||0}px ${n?.y?.[t]||0}px`:""},{name:"Rotate",property:"transform",values:r,value:t=>["x","y","z"].filter((e=>k(r?.[e]?.[t]))).map((e=>`rotate${e.toUpperCase()}(${r[e][t]}deg)`)).join(" ")},{name:"Scale",property:"scale",values:a,value:t=>{const e=a?.y?.[t],o=a?.z?.[t];return k(e)||k(o)?k(o)?`1 ${k(e)?e:1} ${o}`:`1 ${e}`:""}}].forEach((({name:t,property:e,values:n,value:r})=>{const a=r("from"),i=r("to");if(!a||!i)return;const c=Number(n?.duration)>0?Number(n.duration):1e3,d=Number(n?.delay)>0?Number(n.delay):0,u=`advFloat${t}${o?`-${o}`:""}`;s.push(`@keyframes ${u}{ from{ ${e}: ${a}; } to{ ${e}: ${i}; } }`),l.push(`${u} ${c}ms ease-in-out ${d}ms infinite alternate`)})),l.length?`\n\t\t${s.join(" ")}\n\t\t${e}{\n\t\t\tanimation: ${l.join(", ")};\n\t\t}\n\t`:""})($,g,t)}\n\t\t${((t,e,o)=>{const{isEnable:n=!1,vertical:r={},horizontal:a={},transparency:i={},blur:s={},rotate:l={},scale:c={},effectsRelativeTo:d="viewport",effectOn:u=["desktop","tablet-portrait","mobile-portrait"],isMouseEffect:p=!1,mouseTrack:$={},tilt:m={},sticky:b={}}=t||{},g=(t,e)=>k(t)&&!isNaN(t)?Number(t):e,h="viewport"===d,M=h?"view()":"scroll(nearest block)",y=[],x=[],w=[],j=[],v=String(o??"").replace(/[^a-zA-Z0-9]/g,""),f=(t,e,o)=>{y.push(`@keyframes advMe${t}${v}{ ${e} }`),x.push(`advMe${t}${v}`),w.push(M),j.push((t=>{const e=g(t?.top,0),o=g(t?.bottom,100),n=Math.min(e,o),r=Math.max(e,o);return h?`cover ${n}% ${r>=90?"contain 100%":`cover ${r}%`}`:`min(${3*n}vh, ${n}%) min(${3*r}vh, ${r}%)`})(o))};if(n){const t=r?.direction,e=a?.direction,o=t?100*g(r?.speed,4):0,n=e?100*g(a?.speed,4):0;if(o||n){const i="up"===t?-o:o,s="to-left"===e?-n:n,l=[o&&r,n&&a].filter(Boolean);f("Translate",`from{ translate: 0px 0px; } to{ translate: ${s}px ${i}px; }`,{top:Math.min(...l.map((t=>g(t?.top,0)))),bottom:Math.max(...l.map((t=>g(t?.bottom,100))))})}const d=i?.direction;if(d){const t=Math.max(0,1-g(i?.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}; }`}[d];e&&f("Opacity",e,i)}const u=s?.direction;if(u){const t=3*g(s?.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); }`}[u];e&&f("Blur",e,s)}const p=l?.direction;if(p){const t=20*g(l?.level,4);f("Rotate",`from{ rotate: 0deg; } to{ rotate: ${"to-left"===p?-t:t}deg; }`,l)}if(c?.direction){const t=.15*g(c?.level,4),e=Math.max(0,1-t),o=1+t,n={"scale-up":`from{ scale: 1; } to{ scale: ${o}; }`,"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: ${o}; } 100%{ scale: 1; }`}[c.direction];n&&f("Scale",n,c)}}const N=[];if(p){if($?.direction){const t="direct"===$?.direction?100:-100;N.push(((e,o)=>`translate(${(e*t).toFixed(2)}px, ${(o*t).toFixed(2)}px)`))}if(m?.direction){const t=12*("direct"===m?.direction?1:-1);N.push(((e,o)=>`perspective(1000px) rotateX(${(o*-t).toFixed(2)}deg) rotateY(${(e*t).toFixed(2)}deg)`))}}const I=(t,o,n)=>{if(!t||!t.defaultView)return;const r=t.defaultView,a=t.bPlMouse||(t.bPlMouse={x:0,y:0,items:new Map,frame:0,last:0}),i=a.items.get(e)||{x:0,y:0};if(i.rate=o,i.build=n,a.items.set(e,i),a.bound)return;a.bound=!0;const s=e=>{const o=a.last?Math.min(e-a.last,100):16.7;a.last=e;let n=!1;a.items.forEach(((e,r)=>{const i=e.el&&e.el.isConnected?e.el:t.querySelector(r);if(!i)return;e.el=i;const s=e.rate*o/1e3,l=a.x-e.x,c=a.y-e.y,d=Math.sqrt(l*l+c*c);d<=s?(e.x=a.x,e.y=a.y):(e.x+=l/d*s,e.y+=c/d*s,n=!0),i.style.transform=e.build(e.x,e.y)})),a.frame=n?r.requestAnimationFrame(s):0,a.last=n?e:0};t.addEventListener("pointermove",(t=>{a.x=2*(t.clientX/r.innerWidth-.5),a.y=2*(t.clientY/r.innerHeight-.5),a.frame||(a.frame=r.requestAnimationFrame(s))}))};if(N.length&&"undefined"!=typeof document){const t=Math.max(.25,1.5*g($?.speed,g(m?.speed,4))),e=(t,e)=>N.map((o=>o(t,e))).join(" ");I(document,t,e),I(document.querySelector('iframe[name="editor-canvas"]')?.contentDocument,t,e)}const T=t=>b?.[t]||("desktop"===t?b?.undefined:""),C=e.split(">")[0],S=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;":""},_=Array.isArray(u)?u:k(u)?[u]:[],O=t=>!_.length||_.includes(t)?"":`${e}{ animation-name: none; }`;return`\n\t\t${x.length?`\n\t\t${y.join(" ")}\n\t\t@supports (animation-timeline: scroll()){\n\t\t\t${e}{\n\t\t\t\tanimation-name: ${x.join(", ")};\n\t\t\t\tanimation-duration: ${x.map((()=>"auto")).join(", ")};\n\t\t\t\tanimation-timing-function: ${x.map((()=>"linear")).join(", ")};\n\t\t\t\tanimation-fill-mode: ${x.map((()=>"both")).join(", ")};\n\t\t\t\tanimation-direction: ${x.map((()=>h?"normal":"reverse")).join(", ")};\n\t\t\t\tanimation-timeline: ${w.join(", ")};\n\t\t\t\tanimation-range: ${j.join(", ")};\n\t\t\t}\n\t\t\t${O("desktop")?`${L}{ ${O("desktop")} }`:""}\n\t\t\t${O("tablet-portrait")?`@media only screen and (min-width: 641px) and (max-width: 1024px){ ${O("tablet-portrait")} }`:""}\n\t\t\t${O("mobile-portrait")?`${z}{ ${O("mobile-portrait")} }`:""}\n\t\t}\n\t`:""}\n\t\t${N.length?`${e}{ transition-property: background, border, border-radius, box-shadow; }`:""}\n\t\t${S("desktop")?`${C}{ ${S("desktop")} }`:""}\n\t\t${S("tablet")?`${D}{ ${C}{ ${S("tablet")} } }`:""}\n\t\t${S("mobile")?`${z}{ ${C}{ ${S("mobile")} } }`:""}\n\t`})(m,g,t)}\n\t\t${b}\n\t`.replace(/\s+/g," ")},G=({attributes:t,id:o,isBackend:r=!1})=>{const{advanced:a={}}=t,{grid:c={},item:d={},caption:u={},profile:p={},followBtn:$={},loadMoreBtn:m={},lightbox:b={}}=t,g=`#${o} .${n}`,h=`${g} .${n}-header`,M=`${g} .${n}-grid`,y=`${g} .${n}-item`,x=`${g} .${n}-figure`,w=`${g} .${n}-overlay`,j=`${g} .${n}-type`,v=`${g} .${n}-caption`,f=`${g} .${n}-photo`,k=`${g} .${n}-username`,N=`${g} .${n}-name, ${g} .${n}-bio`,L=`${g} .${n}-follow`,I=`${g} .${n}-load-more`,T=`.${n}-lightbox[data-bb-id="${(t=>{if("string"!=typeof t)return t;const e=t.replace(/\/\*|\*\//g,"").replace(/[{};<>\\]/g,"").replace(/[\r\n\t]+/g," "),o=t=>(e.split(t).length-1)%2;return o('"')||o("'")?e.replace(/["']/g,""):e})(o)}"]`,Y=(t,...e)=>{const o=e.filter(Boolean).join(" ").replace(/\s+/g," ").trim();return o?`${t}{ ${o} }`:""},Q=t=>Object.keys(t||{}).length?_(t):"",U=(t,e)=>t?t.desktop||t.tablet||t.mobile?t[e]||null:"desktop"!==e||void 0===t.top&&void 0===t.right?null:t:null,P=(t,e={},o)=>{const n=U(e.normal?.padding,o)||("desktop"===o?U(e.padding,o):null),r=U(e.normal?.radius,o)||("desktop"===o?U(e.radius,o):null),a=U(e.hover?.padding,o),i=U(e.hover?.radius,o);return`\n\t\t\t${Y(t,C("padding",A(n)),C("border-radius",A(r)))}\n\t\t\t${Y(`${t}:hover, ${t}:focus-visible`,C("padding",A(a)),C("border-radius",A(i)))}\n\t\t`},B=(t,e={})=>`\n\t\t${Y(t,C("color",e.normal?.color),S(e.normal?.background),Q(e.normal?.border),C("box-shadow",O(Array.isArray(e.normal?.shadow)?e.normal.shadow:e.shadow||[])))}\n\t\t${Y(`${t}:hover, ${t}:focus-visible`,C("color",e.hover?.color),S(e.hover?.background),Q(e.hover?.border),C("box-shadow",O(Array.isArray(e.hover?.shadow)?e.hover.shadow:[])))}\n\t\t${P(t,e,"desktop")}\n\t`,H=t=>Y(M,C("grid-template-columns",`repeat(${parseInt(s(c,t,"columns",4),10)||1}, minmax(0, 1fr))`),C("column-gap",l(s(c,t,"columnGap","15px"),"15px")),C("row-gap",l(s(c,t,"rowGap","15px"),"15px"))),R=t=>`\n\t\t\t${Y(y,C("border-radius",A(d?.[t]?.radius)))}\n\n\t\t${Y(x,C("aspect-ratio",s(c,t,"ratio","1/1")))}\n\n\t\t${Y(j,C("font-size",l(s(d,t,"iconSize","desktop"===t?d.iconSize||"22px":""),"")))}`,Z=t=>`\n\t\t\t${Y(h,C("gap",l(s(p,t,"gap","desktop"===t?p.gap||"12px":""),"")))}\n\n\t\t${Y(`${f}, ${f} img`,C("width",l(s(p,t,"photoSize","desktop"===t?p.photoSize||"55px":""),"")),C("height",l(s(p,t,"photoSize","desktop"===t?p.photoSize||"55px":""),"")))}`,F=t=>Y(v,C("padding",A(U(u.padding,t)))),G=(0,e.useMemo)((()=>`\n\t\t${E("",u.typo)?.googleFontLink}\n\t\t${E("",p.usernameTypo)?.googleFontLink}\n\t\t${E("",p.metaTypo)?.googleFontLink}\n\t\t${E("",$.typo)?.googleFontLink}\n\t\t${E("",m.typo)?.googleFontLink}\n\t\t${E(v,u.typo)?.styles}\n\t\t${E(k,p.usernameTypo)?.styles}\n\t\t${E(N,p.metaTypo)?.styles}\n\t\t${E(L,$.typo)?.styles}\n\t\t${E(I,m.typo)?.styles}\n\n\t\t${Y(y,Q(d.border),C("box-shadow",O(Array.isArray(d.shadow)?d.shadow:d.shadow?.normal)))}\n\t\t${d.shadow?.hover?Y(`${y}:hover`,C("box-shadow",O(d.shadow.hover))):""}\n\n\t\t${Y(w,C("background",d.overlayColor))}\n\t\t${Y(j,C("color",d.iconColor))}\n\n\t\t${Y(v,C("color",u.color),C("text-align",u.align),C("padding",A(U(u.padding,"desktop"))),S(u.background))}\n\t\t${Y(`${v} a`,C("color",u.linkColor))}\n\n\t\t${Y(k,C("color",p.usernameColor))}\n\t\t${Y(`${g} .${n}-name`,C("color",p.nameColor))}\n\t\t${Y(`${g} .${n}-bio`,C("color",p.bioColor))}\n\n\t\t${B(L,$)}\n\t\t${B(I,m)}\n\n\t\t${Y(T,C("background",b.backdrop))}\n\t\t${Y(`${T} .${n}-close`,C("color",b.closeColor),C("background",b.closeBg))}\n\t\t${Y(`${T} .${n}-close svg`,C("fill",b.closeColor))}\n\t\t${Y(`${T} .${n}-close:hover`,C("color",b.closeHoverColor),C("background",b.closeHoverBg))}\n\t\t${Y(`${T} .${n}-close:hover svg`,C("fill",b.closeHoverColor))}\n\t\t${Y(`${T} .${n}-nav`,C("color",b.navColor),C("background",b.navBg))}\n\t\t${Y(`${T} .${n}-nav svg`,C("fill",b.navColor))}\n\t\t${Y(`${T} .${n}-nav:hover`,C("color",b.navHoverColor),C("background",b.navHoverBg))}\n\t\t${Y(`${T} .${n}-nav:hover svg`,C("fill",b.navHoverColor))}\n\n\t\t${H("desktop")}\n\t\t${R("desktop")}\n\t\t${Z("desktop")}\n\n\t\t${D}{\n\t\t\t${H("tablet")}\n\t\t\t${R("tablet")}\n\t\t\t${Z("tablet")}\n\t\t\t${F("tablet")}\n\t\t\t${P(L,$,"tablet")}\n\t\t\t${P(I,m,"tablet")}\n\t\t}\n\n\t\t${z}{\n\t\t\t${H("mobile")}\n\t\t\t${R("mobile")}\n\t\t\t${Z("mobile")}\n\t\t\t${F("mobile")}\n\t\t\t${P(L,$,"mobile")}\n\t\t\t${P(I,m,"mobile")}\n\t\t}\n\n\t\t${W(o,a,r,!1)}\n\t\t`),[t,o,r]);return(0,i.jsx)("style",{dangerouslySetInnerHTML:{__html:G}})};document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll(".wp-block-b-blocks-instagram").forEach((e=>{let o;try{o=JSON.parse(e.dataset.attributes||"")}catch(t){return}(0,t.createRoot)(e).render((0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(G,{attributes:o,id:e.id}),(0,i.jsx)(f,{attributes:o,id:e.id})]})),e.removeAttribute("data-attributes")}))}))})(); | |
| 1 | +(()=>{"use strict";const t=window.ReactDOM,e=window.React,o=window.wp.i18n,n="b-blocks-instagram",r=t=>t?`https://www.instagram.com/${encodeURIComponent(t)}/`:"https://www.instagram.com/",a=t=>`https://www.instagram.com/explore/tags/${encodeURIComponent(t)}/`,i=window.ReactJSXRuntime,s=((0,o.__)("General","b-blocks"),(0,o.__)("Style","b-blocks"),(0,o.__)("Advanced","b-blocks"),(0,o.__)("Normal","b-blocks"),(0,o.__)("Hover","b-blocks"),(0,o.__)("None","b-blocks"),(0,o.__)("Zoom In","b-blocks"),(0,o.__)("Zoom Out","b-blocks"),(0,o.__)("Rotate","b-blocks"),(0,o.__)("Grayscale","b-blocks"),(0,o.__)("Blur","b-blocks"),(0,o.__)("Lift","b-blocks"),(0,o.__)("Shine","b-blocks"),(0,o.__)("Overlay Top","b-blocks"),(0,o.__)("Overlay Center","b-blocks"),(0,o.__)("Overlay Bottom","b-blocks"),(0,o.__)("Below Image","b-blocks"),(0,o.__)("Left","b-blocks"),(0,o.__)("Center","b-blocks"),(0,o.__)("Right","b-blocks"),(0,o.__)("Square","b-blocks"),(0,o.__)("Portrait","b-blocks"),(0,o.__)("Landscape","b-blocks"),(0,o.__)("Original","b-blocks"),(t={},e,o,n="")=>{const r=e=>{const n=t?.[e]?.[o];return null==n||""===n?void 0:n},a=r("desktop")??n;if("desktop"===e)return a;const i=r("tablet")??a;return"tablet"===e?i:r("mobile")??i}),l=(t,e="")=>{if(null==t||""===t)return e;const o=parseFloat(t);return isNaN(o)?e:/[a-z%]$/i.test(String(t).trim())?String(t).trim():`${o}px`},c=(t="",{stripHashtags:e=!1,captionLength:o=0}={})=>{let n=String(t||"");e&&(n=n.replace(/#[\p{L}\p{N}_]+/gu,"").replace(/\s{2,}/g," ").trim());const r=parseInt(o,10)||0;return 0<r&&n.length>r?`${n.slice(0,r).trimEnd()}…`:n},d=(t="",e=!0)=>String(t||"").split(/(#[\p{L}\p{N}_]+)/gu).filter((t=>""!==t)).map(((t,o)=>{const r=e&&/^#[\p{L}\p{N}_]+$/u.test(t)?t.slice(1):"";return r?(0,i.jsx)("a",{className:`${n}-tag`,href:a(r),target:"_blank",rel:"noreferrer nofollow noopener",children:t},o):(0,i.jsx)("span",{children:t},o)})),p=(t={})=>t.thumbnail_url||t.media_url||"",u=({attributes:t,username:e="",isBackend:a=!1})=>{const{elements:s={}}=t;return s.followButton?(0,i.jsx)("a",{className:`${n}-follow`,href:a?"#":r(e),target:a?"_self":"_blank",rel:"noreferrer noopener",onClick:t=>{a&&t.preventDefault()},children:s.followLabel||(0,o.__)("Follow On Instagram","b-blocks")}):null},m=(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"18",height:"18",fill:"currentColor","aria-hidden":"true",children:(0,i.jsx)("path",{d:"M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"})}),$=(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,i.jsx)("path",{d:"M34.8 29.7V11c0-2.9-2.3-5.2-5.2-5.2H11c-2.9 0-5.2 2.3-5.2 5.2v18.7c0 2.9 2.3 5.2 5.2 5.2h18.7c2.8-.1 5.1-2.4 5.1-5.2zM39.2 15v16.1c0 4.5-3.7 8.2-8.2 8.2H14.9c-.6 0-.9.7-.5 1.1 1 1.1 2.4 1.8 4.1 1.8h13.4c5.7 0 10.3-4.6 10.3-10.3V18.5c0-1.6-.7-3.1-1.8-4.1-.5-.4-1.2 0-1.2.6z"})}),b=(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,i.jsx)("path",{d:"M5.888 22.5a3.46 3.46 0 0 1-1.721-.46l-.003-.002a3.451 3.451 0 0 1-1.72-2.982V4.943a3.445 3.445 0 0 1 5.163-2.987l12.226 7.059a3.444 3.444 0 0 1-.001 5.967l-12.22 7.056a3.462 3.462 0 0 1-1.724.462Z"})}),h=(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"22",height:"22",fill:"currentColor","aria-hidden":"true",children:(0,i.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})}),g=(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor","aria-hidden":"true",children:(0,i.jsx)("path",{d:"M14.71 15.88 10.83 12l3.88-3.88a.996.996 0 1 0-1.41-1.41L8.71 11.3a.996.996 0 0 0 0 1.41l4.59 4.59c.39.39 1.02.39 1.41 0 .38-.39.39-1.03 0-1.42z"})}),y=(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor","aria-hidden":"true",children:(0,i.jsx)("path",{d:"M9.29 15.88 13.17 12 9.29 8.12a.996.996 0 1 1 1.41-1.41l4.59 4.59c.39.39.39 1.02 0 1.41L10.7 17.3a.996.996 0 0 1-1.41 0c-.38-.39-.39-1.03 0-1.42z"})}),x=({attributes:t,feed:e={},index:r,isBackend:a=!1,onOpen:s})=>{const{elements:l={},caption:u={}}=t,{media_type:m="IMAGE",caption:h=""}=e,g=u.style||"overlay-center",y=a?(0,o.__)("Instagram caption preview text with #hashtags","b-blocks"):"",x=h||y,M=l.caption&&x?c(x,l):"",w=()=>M?(0,i.jsx)("div",{className:`${n}-caption`,children:(0,i.jsx)("p",{children:d(M,l.linkHashtags)})}):null,f=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("figure",{className:`${n}-figure`,children:[(0,i.jsx)("img",{className:`${n}-image`,src:p(e),alt:c(x,{stripHashtags:!0,captionLength:120}),loading:"lazy"}),(0,i.jsx)("span",{className:`${n}-overlay`}),l.mediaIcon&&"IMAGE"!==m&&(0,i.jsx)("span",{className:`${n}-type`,children:"VIDEO"===m?b:$}),g.startsWith("overlay")&&(0,i.jsx)(w,{})]}),"below"===g&&(0,i.jsx)(w,{})]});return l.lightbox?(0,i.jsx)("div",{className:`${n}-item`,children:(0,i.jsx)("button",{type:"button",className:`${n}-open`,onClick:()=>s(r),children:f})}):l.linkPosts&&e.permalink?(0,i.jsx)("div",{className:`${n}-item`,children:(0,i.jsx)("a",{className:`${n}-open`,href:e.permalink,target:l.openInNewTab?"_blank":"_self",rel:"noreferrer noopener",children:f})}):(0,i.jsx)("div",{className:`${n}-item`,children:f})},M=({attributes:t,user:e={},compact:o=!1})=>{const{elements:a={},profile:s={}}=t,{username:l="",profile_picture_url:c="",name:d="",biography:p=""}=e,u=r(l),m=d||s.nameText||"",$=p||s.bioText||"",b=c||s.photo||"";return(0,i.jsxs)("div",{className:`${n}-profile${o?` ${n}-profile-compact`:""}`,children:[a.profilePhoto&&b&&(0,i.jsx)("a",{className:`${n}-photo`,href:u,target:"_blank",rel:"noreferrer noopener",children:(0,i.jsx)("img",{src:b,alt:l,loading:"lazy"})}),(0,i.jsxs)("div",{className:`${n}-identity`,children:[(0,i.jsxs)("a",{className:`${n}-username`,href:u,target:"_blank",rel:"noreferrer noopener",children:["@",l]}),!o&&a.profileName&&m&&(0,i.jsx)("p",{className:`${n}-name`,children:m}),!o&&a.profileBio&&$&&(0,i.jsx)("p",{className:`${n}-bio`,children:$})]})]})},w=({feed:t})=>{const r=(0,e.useRef)(null),a=t?.children?.data||[],s=t=>{const e=r.current;e&&e.scrollBy({left:t*e.clientWidth,behavior:"smooth"})};return(0,i.jsxs)("div",{className:`${n}-carousel`,children:[(0,i.jsx)("div",{className:`${n}-slides`,ref:r,children:a.map((t=>(0,i.jsx)("div",{className:`${n}-slide`,children:t.thumbnail_url?(0,i.jsx)("video",{controls:!0,poster:t.thumbnail_url,src:t.media_url}):(0,i.jsx)("img",{src:t.media_url,alt:""})},t.id)))}),1<a.length&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("button",{type:"button",className:`${n}-nav ${n}-nav-prev`,onClick:t=>{t.stopPropagation(),s(-1)},"aria-label":(0,o.__)("Previous slide","b-blocks"),children:g}),(0,i.jsx)("button",{type:"button",className:`${n}-nav ${n}-nav-next`,onClick:t=>{t.stopPropagation(),s(1)},"aria-label":(0,o.__)("Next slide","b-blocks"),children:y})]})]}) | |
| 2 | +},f=({attributes:r,user:a,feeds:s=[],index:l,blockId:c="",container:p,isBackend:u=!1,onClose:$,onMove:b})=>{const{lightbox:x={},elements:f={}}=r,v=(0,e.useRef)(null),[j,k]=(0,e.useState)(!1),N=s[l],L=(0,e.useCallback)((t=>{"Escape"===t.key&&$(),"ArrowRight"===t.key&&b(1),"ArrowLeft"===t.key&&b(-1)}),[$,b]);if((0,e.useEffect)((()=>{const t=p?.ownerDocument||document;t.addEventListener("keydown",L);const e=t.body?.style?.overflow;return t.body&&(t.body.style.overflow="hidden"),v.current?.focus(),k(!0),()=>{t.removeEventListener("keydown",L),t.body&&void 0!==e&&(t.body.style.overflow=e)}}),[L,p]),!N)return null;const{media_type:z="IMAGE",media_url:D="",thumbnail_url:I="",caption:S="",permalink:T=""}=N,C=c||"default",A=`\n\t\t.${n}-lightbox[data-bb-id="${C}"] {\n\t\t\t${x.backdrop?`background: ${x.backdrop} !important;`:""}\n\t\t}\n\t\t.${n}-lightbox[data-bb-id="${C}"] .${n}-close {\n\t\t\t${x.closeColor?`color: ${x.closeColor} !important;`:""}\n\t\t\t${x.closeBg?`background: ${x.closeBg} !important;`:""}\n\t\t}\n\t\t.${n}-lightbox[data-bb-id="${C}"] .${n}-close svg {\n\t\t\t${x.closeColor?"fill: currentColor !important;":""}\n\t\t}\n\t\t.${n}-lightbox[data-bb-id="${C}"] .${n}-close:hover {\n\t\t\t${x.closeHoverColor?`color: ${x.closeHoverColor} !important;`:""}\n\t\t\t${x.closeHoverBg?`background: ${x.closeHoverBg} !important;`:""}\n\t\t}\n\t\t.${n}-lightbox[data-bb-id="${C}"] .${n}-nav {\n\t\t\t${x.navColor?`color: ${x.navColor} !important;`:""}\n\t\t\t${x.navBg?`background: ${x.navBg} !important;`:""}\n\t\t}\n\t\t.${n}-lightbox[data-bb-id="${C}"] .${n}-nav svg {\n\t\t\t${x.navColor?"fill: currentColor !important;":""}\n\t\t}\n\t\t.${n}-lightbox[data-bb-id="${C}"] .${n}-nav:hover {\n\t\t\t${x.navHoverColor?`color: ${x.navHoverColor} !important;`:""}\n\t\t\t${x.navHoverBg?`background: ${x.navHoverBg} !important;`:""}\n\t\t}\n\t`,E=(0,i.jsxs)("div",{className:`${n}-lightbox${j?" is-open":""}`,"data-bb-id":C,role:"dialog","aria-modal":"true","aria-label":(0,o.__)("Instagram post","b-blocks"),ref:v,tabIndex:-1,onMouseDown:t=>t.stopPropagation(),onClick:t=>{t.stopPropagation(),t.target===t.currentTarget&&$()},children:[(0,i.jsx)("style",{dangerouslySetInnerHTML:{__html:A}}),(0,i.jsx)("button",{type:"button",className:`${n}-close`,onClick:t=>{t.stopPropagation(),$()},"aria-label":(0,o.__)("Close","b-blocks"),children:h}),1<s.length&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("button",{type:"button",className:`${n}-nav ${n}-nav-prev`,onClick:t=>{t.stopPropagation(),b(-1)},"aria-label":(0,o.__)("Previous post","b-blocks"),children:g}),(0,i.jsx)("button",{type:"button",className:`${n}-nav ${n}-nav-next`,onClick:t=>{t.stopPropagation(),b(1)},"aria-label":(0,o.__)("Next post","b-blocks"),children:y})]}),(0,i.jsxs)("div",{className:`${n}-dialog`,onClick:t=>t.stopPropagation(),children:[(0,i.jsxs)("div",{className:`${n}-media`,children:["VIDEO"===z&&(0,i.jsx)("video",{controls:!0,autoPlay:!0,poster:I,src:D}),"CAROUSEL_ALBUM"===z&&(0,i.jsx)(w,{feed:N}),"IMAGE"===z&&(0,i.jsx)("img",{src:D,alt:""})]}),(0,i.jsxs)("div",{className:`${n}-details`,children:[x.showProfile&&(0,i.jsx)(M,{attributes:r,user:a,compact:!0}),x.showCaption&&(S||u)&&(0,i.jsx)("div",{className:`${n}-full-caption`,children:d(S||(u?(0,o.__)("Instagram caption preview text with #hashtags","b-blocks"):""),f.linkHashtags)}),x.showLink&&T&&(0,i.jsxs)("a",{className:`${n}-permalink`,href:T,target:"_blank",rel:"noreferrer nofollow noopener",children:[m," ",(0,o.__)("View on Instagram","b-blocks")]})]})]})]}),_=p?.ownerDocument?.body||("undefined"!=typeof document?document.body:null);return _?(0,t.createPortal)(E,_):E},v=({count:t=12})=>(0,i.jsx)("div",{className:`${n}-grid`,children:Array.from({length:t},((t,e)=>(0,i.jsx)("div",{className:`${n}-item ${n}-skeleton`},e)))}),j=({attributes:t,id:r="",isBackend:a=!1})=>{const s=(0,e.useRef)(null),{source:l={},elements:c={}}=t,[d,p]=(0,e.useState)({status:"loading",user:{},media:[],error:""}),[m,$]=(0,e.useState)(1),[b,h]=(0,e.useState)(-1),{account:g="",limit:y=24,perPage:w=12,cacheMinutes:j=30}=l;(0,e.useEffect)((()=>{let t=!0;return p((t=>({...t,status:"loading",error:""}))),(({account:t="",limit:e=12,cacheMinutes:o=30})=>(async(t,e={})=>{const o=window?.bBlocksInstagram||null;if(!o?.ajaxUrl)throw new Error("Instagram endpoint is unavailable.");const n=new FormData;n.append("action",t),n.append("nonce",o.nonce),Object.entries(e).forEach((([t,e])=>n.append(t,e)));const r=await fetch(o.ajaxUrl,{method:"POST",body:n,credentials:"same-origin"}),a=await r.json();if(!a?.success)throw new Error(a?.data||"Could not load the feed.");return a.data})("bBlocksInstagramFeed",{account:t,limit:e,cache:o}))({account:g,limit:y,cacheMinutes:j}).then((e=>t&&p({status:"ready",user:e?.user||{},media:e?.media||[],error:""}))).catch((e=>t&&p({status:"error",user:{},media:[],error:e.message}))),()=>{t=!1}}),[g,y,j]),(0,e.useEffect)((()=>$(1)),[g,w]);const k={user:d.user,media:d.media},N=parseInt(w,10)||12,L=(0,e.useMemo)((()=>k.media.slice(0,N*m)),[k.media,N,m]),z=k.media.length>L.length,D=(t=>{const{elements:e={},item:o={},caption:r={}}=t;return[n,`${n}-hover-${o.hoverEffect||"none"}`,`${n}-caption-${r.style||"overlay-center"}`,r.onHover&&"below"!==r.style?`${n}-caption-on-hover`:"",e.caption?`${n}-has-caption`:"",e.profile?`${n}-has-profile`:""].filter(Boolean).join(" ")})(t);if("loading"===d.status&&!a)return(0,i.jsx)("div",{className:D,children:(0,i.jsx)(v,{count:N})});if("error"===d.status&&!a&&!k.media.length)return null;if(!k.media.length)return(0,i.jsx)("div",{className:D,children:(0,i.jsx)("p",{className:`${n}-notice`,children:d.error||(0,o.__)("No posts to show yet.","b-blocks")})});const I=c.profile||c.followButton&&!c.followInFooter,S=c.loadMore&&z||c.followButton&&c.followInFooter;return(0,i.jsxs)("div",{className:D,ref:s,children:[I&&(0,i.jsxs)("div",{className:`${n}-header`,children:[c.profile&&(0,i.jsx)(M,{attributes:t,user:k.user}),!c.followInFooter&&(0,i.jsx)(u,{attributes:t,username:k.user?.username,isBackend:a})]}),(0,i.jsx)("div",{className:`${n}-grid`,children:L.map(((e,o)=>(0,i.jsx)(x,{attributes:t,feed:e,index:o,isBackend:a,onOpen:h},e.id)))}),S&&(0,i.jsxs)("div",{className:`${n}-footer`,children:[c.loadMore&&z&&(0,i.jsx)("button",{type:"button",className:`${n}-load-more`,onClick:()=>a?{}:$(m+1),children:c.loadMoreLabel||(0,o.__)("Load More","b-blocks")}),c.followInFooter&&(0,i.jsx)(u,{attributes:t,username:k.user?.username,isBackend:a})]}),c.lightbox&&-1<b&&(0,i.jsx)(f,{attributes:t,user:k.user,feeds:L,index:b,blockId:r,container:s.current,isBackend:a,onClose:()=>h(-1),onMove:t=>h((e=>(e+t+L.length)%L.length))})]})},k=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"], | |
| 3 | +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"),o=e.documentElement;return!o||"svg"!==o.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),o=await e.text();return this.sanitize(`${o}`)}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 o=e.name,n=o.toLowerCase(),r=e.value;if(this.options.removeEvents&&n.startsWith("on"))return void t.removeAttribute(o);if(this.options.removeExternalResources&&("href"===n||n.endsWith(":href"))&&!this.isAllowedUrl(r))return void t.removeAttribute(o);const a=n.replace("xlink:","");this.allowedAttributeSet.has(n)||this.allowedAttributeSet.has(a)?this.options.removeExternalResources&&this.hasExternalUrl(r)?t.removeAttribute(o):"style"===n&&this.options.sanitizeStyle&&t.setAttribute(o,this.sanitizeCss(r)):t.removeAttribute(o)}))}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 L="@media only screen and (min-width: 1025px)",z="@media only screen and (max-width: 1024px)",D="@media only screen and (max-width: 640px)",I="linear-gradient(135deg, #0040E3, #18D4FD)",S=t=>{const e=N(t);return e?`url('${e.replace(/['"()]/g,"")}')`:"none"},T=(t,e)=>k(e)?`${t}: ${e};`:"",C=(t,e=!0,o=!0,n=!0)=>{const{type:r="solid",color:a="",gradient:i=I,image:s={},position:l="center center",attachment:c="",repeat:d="no-repeat",size:p="",overlayColor:u=""}=t||{};return"gradient"===r&&o?T("background",i):"image"===r&&n?`background: ${S(s?.url)};\n\t\t\t\t${T("background-color",u)}\n\t\t\t\t${T("background-position",l)}\n\t\t\t\t${T("background-size",p)}\n\t\t\t\t${T("background-repeat",d)}\n\t\t\t\t${T("background-attachment",c)}\n\t\t\t\t${T("background-repeat",d)}\n\t\t\t\tbackground-blend-mode: overlay;`:e&&T("background",a)},A=t=>{if(!t)return"";const e=t=>{const{color:e="#000000",style:o="solid",width:n="0px"}=t;return`${n} ${o} ${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((o=>t[o]?`border-${o}: ${e(t[o])};`:"")).join(" ").trim():T("border",e(t))},E=(t,e="box")=>{let o="";return t?.map(((n,r)=>{const{hOffset:a="0px",vOffset:i="0px",blur:s="0px",spreed:l="0px",color:c="#e7f0fe",isInset:d=!1}=n||{},p=d?"inset":"",u=`${a} ${i} ${s}`,m=r+1>=t.length?"":", ";o+="text"===e?`${u} ${c}${m}`:`${u} ${l} ${c} ${p}${m}`})),o||""},_=(t,e,o=!0)=>{const{fontFamily:n="Default",fontCategory:r="sans-serif",fontVariant:a=400,fontWeight:i,isUploadFont:s=!0,fontSize:l={desktop:null,tablet:null,mobile:null},fontStyle:c,textTransform:d,textDecoration:p,lineHeight:u,letterSpace:m}=e||{},$=!o||!n||"Default"===n,b=l?.desktop||l,h=l?.tablet||b,g=l?.mobile||h,y=t=>{const e=String(t);return["px","em","rem","%","vh","vw"].some((t=>e.endsWith(t)))?e:"number"==typeof t?`${e}px`:""},x=`\n\t\t${$?"":`font-family: '${n}', ${r};`}\n\t\t${T("font-weight",i)}\n\t\t${T("font-size",y(b))}\n\t\t${T("font-style",c)}\n\t\t${T("text-transform",d)}\n\t\t${T("text-decoration",p)}\n\t\t${T("line-height",u)}\n\t\t${T("letter-spacing",m)}\n\t`,M=a&&400!==a?"400i"===a?":ital@1":a?.includes("00i")?`: ital, wght@1, ${a?.replace("00i","00")} `:`: wght@${a} `:"",w=$?"":`https://fonts.googleapis.com/css2?family=${n?.split(" ").join("+")}${M.replace(/ /g,"")}&display=swap`;return{googleFontLink:!s||$?"":`@import url(${w});`,styles:`${t}{\n\t\t\t${x}\n\t\t}\n\t\t${z} {\n\t\t\t${t}{\n\t\t\t\t${T("font-size",y(h))}\n\t\t\t}\n\t\t}\n\t\t${D} {\n\t\t\t${t}{\n\t\t\t\t${T("font-size",y(g))}\n\t\t\t}\n\t\t}`.replace(/\s+/g," ").trim()}},O=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""},U=t=>{const{position:e="center center",xPosition:o=0,yPosition:n=0,attachment:r="",repeat:a="no-repeat",size:i="cover",customSize:s="0px"}=t||{},l=t=>"initial"!==t||k(t);return`\n\t\t${l(e)?`background-position: ${"custom"===e?`${o} ${n}`:e};`:""}\n\t\t${r&&l(r)?`background-attachment: ${r};`:""}\n\t\t${l(a)?`background-repeat: ${a};`:""}\n\t\t${l(i)?`background-size: ${"custom"===i?`${s} auto`:i};`:""}\n\t`},Y=(t={})=>t?{desktop:k(t.url)?`background-image: ${S(t.url)}; ${U(t?.desktop)}`:"",tablet:k(t.url)?U(t?.tablet):"",mobile:k(t.url)?U(t?.mobile):""}:"",P=(t,e,o=!1)=>{const{type:n="color",color:r,gradient:a,img:i,video:s}=t||{},l="color"===n?T("background",r):"gradient"===n?(t=>{const{type:e="linear",radialType:o="ellipse",colors:n=[],centerPositions:r={x:0,y:0},angel:a=0}=t||{};if(k(t)){const t=n?.map((({color:t,position:e})=>`${t} ${e}%`)),i=`linear-gradient(${a}deg, ${t})`;return T("background","radial"===e?`radial-gradient(${o} at ${r?.x}% ${r?.y}%,${t})`:i)}return""})(a):"image"===n?Y(i).desktop:"",c="image"===n?Y(i).tablet:"",d="image"===n?Y(i).mobile:"",p=o?`${e}:hover`:e;return`\n\t\t${"video"===n?((t,e)=>{const{url:o,loop:n}=t||{},r=document.querySelector(e),a=r?.querySelector(".bPlVideo"),i=document.createElement("video");if(i.muted=!0,i.autoplay=!0,i.classList.add("bPlVideo"),!a&&r&&o){const t=N(o);if(t){const e=document.createElement("source");e.src=t,i.appendChild(e),r.appendChild(i)}}return i.loop=n,i.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}` | |
| 4 | +})(s,e):""}\n\n\t\t${l?`${p}{\n\t\t\t${l}\n\t\t}`:""}\n\n\t\t${c?`${z} {\n\t\t\t${p}{\n\t\t\t\t${c}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${d?`${D} {\n\t\t\t${p}{\n\t\t\t\t${d}\n\t\t\t}\n\t\t}`:""}\n\t`.replace(/\s+/g," ").trim()},Q=(t,e,o=!1)=>{const{isEnabled:n,colors:r,opacity:a=1,blend:i,filter:s="",blur:l=0,brightness:c=100,contrast:d=100,saturation:p=100,hue:u=0,position:m={top:0,right:0,bottom:0,left:0},zIndex:$=-1}=t||{},b=`${100!==c?`brightness(${c}%)`:""} ${100!==d?`contrast(${d}%)`:""} ${100!==p?`saturate(${p}%)`:""} ${0!==l?`blur(${l}px)`:""} ${0!==u?`hue-rotate(${u}deg)`:""}`,h=`${s}: ${s?b:""}; -webkit-${s}: ${s?b:""};`,g=o?`${e}:hover::after`:`${e}::after`;return n?`\n\t\t${e}{\n\t\t\tposition:relative;\n\t\t\tz-index:1;\n\t\t}\n\t\t${e}::after{\n\t\t\tcontent: '';\n\t\t\tposition: absolute;\n\t\t\ttop:${k(m.top)?m.top:0};\n\t\t\tright:${k(m.right)?m.right:0};\n\t\t\tbottom:${k(m.bottom)?m.bottom:0};\n\t\t\tleft:${k(m.left)?m.left:0};\n\t\t\tz-index:${$};\n\t\t}\n\t\t${P(r,g,!1)}\n\t\t${g}{\n\t\t\t${T("opacity",a)}\n\t\t\t${T("mix-blend-mode",i)}\n\t\t\t${h}\n\t\t}\n\t`.replace(/\s+/g," ").trim():""},B=(t,e,o=!1)=>{const n=(t,e="desktop")=>{if(!k(t))return"";const{skew:o,scale:n,rotate:r,offset:a,flipX:i,flipY:s}=t,{threeDRotate:l}=r||{},{isProportion:c}=n||{},d=[];return k(o)&&(k(o?.[e]?.x)&&d.push(`skewX(${o[e].x}deg)`),k(o?.[e]?.y)&&d.push(`skewY(${o[e].y}deg)`)),c?k(n?.[e]?.scale)&&d.push(`scale(${n[e].scale})`):(k(n?.[e]?.x)&&d.push(`scaleX(${n[e].x})`),k(n?.[e]?.y)&&d.push(`scaleY(${n[e].y})`)),k(r)&&(k(r?.[e]?.z)&&d.push(`rotateZ(${r[e].z}deg)`),l&&(k(r?.[e]?.x)&&d.push(`rotateX(${r[e].x}deg)`),k(r?.[e]?.y)&&d.push(`rotateY(${r[e].y}deg)`))),k(a)&&(k(a?.[e]?.x)&&d.push(`translateX(${a[e].x})`),k(a?.[e]?.y)&&d.push(`translateY(${a[e].y})`)),k(i)&&d.push(i?"scaleX(-1)":""),k(s)&&d.push(s?"scaleY(-1)":""),0===d.length?"":T("transform",d.join(" "))},r=o?`${e}:hover`:e;return`\n\t\t${r} {\n\t\t\t${n(t,"desktop")}\n\t\t}\n\t\t${z}{\n\t\t\t${r} {\n\t\t\t\t${n(t,"tablet")}\n\t\t\t}\n\t\t}\n\t\t${D}{\n\t\t\t${r} {\n\t\t\t\t${n(t,"mobile")}\n\t\t\t}\n\t\t}\n\t`},H=t=>{const{padding:e,margin:o,height:n,width:r}=t||{},a=(t,e)=>T(t,e),i=(t,e,o)=>a(t,e?.[t]?.[o])+a(`min-${t}`,e?.min?.[o])+a(`max-${t}`,e?.max?.[o]),s=t=>T("padding",O(t)),l=t=>T("margin",O(t));return{desktop:s(e?.desktop)+l(o?.desktop)+i("height",n,"desktop")+i("width",r,"desktop"),tablet:s(e?.tablet)+l(o?.tablet)+i("height",n,"tablet")+i("width",r,"tablet"),mobile:s(e?.mobile)+l(o?.mobile)+i("height",n,"mobile")+i("width",r,"mobile")}},R=t=>{const{normal:e,hover:o}=t||{},n=t=>{const{border:e,radius:o,shadow:n}=t||{},r=T("border-radius",O(o)),a=T("box-shadow",E(n,"box"));return A(e)+r+a};return{normal:n(e),hover:n(o)}},Z=t=>{const{zIndex:e,overflow:o}=t||{},n=o?`overflow: ${o};`:"",r=t=>`${T("z-index",e?.[t])} ${T("position",k(e?.[t])?"relative":"")}`;return{desktop:r("desktop")+n,tablet:r("tablet"),mobile:r("mobile")}},F=(t,e)=>{const{desktop:o=!1,tablet:n=!1,mobile:r=!1}=t||{},a=e?"opacity: 0.5;":"display: none;",i=t=>t?a:"";return{desktop:i(o),tablet:i(n),mobile:i(r)}},W=(t,e,o=!1,n=!0)=>{const{dimension:r,transform:a,background:i,borderShadow:s,mask:l,animation:c,visibility:d,responsive:p,position:u={},floating:m={},motion:$={},css:b=""}=e||{},h=o?`#${t}>div>div${n?":first-child":""}`:`#${t}>div`;((t,e,o)=>{const n=o?`#${e} > div`:`#${e}`,r=document.querySelector(n);r&&t&&t.type&&(r.setAttribute("data-aos",t.type),r.setAttribute("data-aos-duration",1e3*t.duration||.4),r.setAttribute("data-aos-delay",1e3*t.delay||0),r.classList.contains("aos-init")||(r.classList.add("aos-init"),window?.AOS?.init()),o)&&new IntersectionObserver((t=>{t.forEach((t=>{t.intersectionRatio>.5?r.classList.add("aos-animate"):r.classList.remove("aos-animate")}))}),{threshold:[.5]}).observe(r)})(c,t,o);const g=H(r).desktop+Z(d).desktop+((t,e,o)=>{const{transition:n=.4}=t||{},{transition:r=.4}=e||{},{transition:a=200}=o||{};return`transition: background ${n}s, border ${r}s, border-radius ${r}s, box-shadow ${r}s, transform ${a}ms ease-in-out;`})(i,s,a)+(t=>{const{isMask:e=!1,shape:o={type:"circle"},size:n={type:"contain",scale:"100%"},position:r={type:"center center",x:50,y:50},repeat:a="no-repeat"}=t||{};return e?`-webkit-mask-image: ${"custom"===o.type?S(o.url):`url(${(i=o.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" | |
| 5 | +}].find((t=>t.type===i))).svg})`};\n\t\t-webkit-mask-size: ${"custom"===n.type?n.scale:n.type};\n\t\t${"custom"===r.type?`${T("-webkit-mask-position-x",r.x)}\n\t\t\t${T("-webkit-mask-position-y",r.y)}`:`${T("-webkit-mask-position",r.type)}`}\n\t\t${"cover"!==n.type?`-webkit-mask-repeat: ${a};`:""}`:"";var i})(l),y=H(r).tablet+Z(d).tablet+F(p,o).tablet,x=H(r).mobile+Z(d).mobile+F(p,o).mobile,M=R(s).normal,w=R(s).hover,f=F(p,o).desktop;return`\n\t\t${g||M?`${h} {\n\t\t\t${g}\n\t\t\t${M}\n\t\t}`:""}\n\t\t${w?`${h}:hover {\n\t\t\t${w}\n\t\t}`:""}\n\n\t\t${f?`${L} {\n\t\t\t${h}{\n\t\t\t\t${f}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${y?`${z} {\n\t\t\t${h}{\n\t\t\t\t${y}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${x?`${D} {\n\t\t\t${h}{\n\t\t\t\t${x}\n\t\t\t}\n\t\t}`:""}\n\n\t\t${P(i?.normal,h)}\n\t\t${P(i?.hover,h,!0)}\n\t\t${Q(i?.overlay,h)}\n\t\t${Q(i?.hoverOverlay,h,!0)}\n\t\t${k(a?.normal)?B(a?.normal,h):""}\n\t\t${k(a?.hover)?B(a?.hover,h,!0):""}\n\t\t${((t,e)=>{const{desktop:o={},tablet:n={},mobile:r={}}=t,a=(t={})=>`\n\t\t${e}{\n\t\t\t${T("position",t?.type)}\n\t\t\t${T("left",t?.horizontal?.left)}\n\t\t\t${T("right",t?.horizontal?.right)}\n\t\t\t${T("top",t?.vertical?.top)}\n\t\t\t${T("bottom",t?.vertical?.bottom)}\n\t\t}\n\t`;return`\n\t\t\n\t\t${o?.type?a(o):""}\n\t\t\n\t\t${z}{\n\t\t\t${n?.type?a(n):""}\n\t\t}\n\n\t\t${D}{\n\t\t\t${r?.type?a(r):""}\n\t\t}\n\t`})(u,h)}\n\t\t${((t,e,o="")=>{const{translate:n={},rotate:r={},scale:a={},isEnabled:i=!1}=t||{};if(!i)return"";const s=[],l=[];return[{name:"Translate",property:"translate",values:n,value:t=>["x","y"].some((e=>k(n?.[e]?.[t])))?`${n?.x?.[t]||0}px ${n?.y?.[t]||0}px`:""},{name:"Rotate",property:"transform",values:r,value:t=>["x","y","z"].filter((e=>k(r?.[e]?.[t]))).map((e=>`rotate${e.toUpperCase()}(${r[e][t]}deg)`)).join(" ")},{name:"Scale",property:"scale",values:a,value:t=>{const e=a?.y?.[t],o=a?.z?.[t];return k(e)||k(o)?k(o)?`1 ${k(e)?e:1} ${o}`:`1 ${e}`:""}}].forEach((({name:t,property:e,values:n,value:r})=>{const a=r("from"),i=r("to");if(!a||!i)return;const c=Number(n?.duration)>0?Number(n.duration):1e3,d=Number(n?.delay)>0?Number(n.delay):0,p=`advFloat${t}${o?`-${o}`:""}`;s.push(`@keyframes ${p}{ from{ ${e}: ${a}; } to{ ${e}: ${i}; } }`),l.push(`${p} ${c}ms ease-in-out ${d}ms infinite alternate`)})),l.length?`\n\t\t${s.join(" ")}\n\t\t${e}{\n\t\t\tanimation: ${l.join(", ")};\n\t\t}\n\t`:""})(m,h,t)}\n\t\t${((t,e,o)=>{const{isEnable:n=!1,vertical:r={},horizontal:a={},transparency:i={},blur:s={},rotate:l={},scale:c={},effectsRelativeTo:d="viewport",effectOn:p=["desktop","tablet-portrait","mobile-portrait"],isMouseEffect:u=!1,mouseTrack:m={},tilt:$={},sticky:b={}}=t||{},h=(t,e)=>k(t)&&!isNaN(t)?Number(t):e,g="viewport"===d,y=g?"view()":"scroll(nearest block)",x=[],M=[],w=[],f=[],v=String(o??"").replace(/[^a-zA-Z0-9]/g,""),j=(t,e,o)=>{x.push(`@keyframes advMe${t}${v}{ ${e} }`),M.push(`advMe${t}${v}`),w.push(y),f.push((t=>{const e=h(t?.top,0),o=h(t?.bottom,100),n=Math.min(e,o),r=Math.max(e,o);return g?`cover ${n}% ${r>=90?"contain 100%":`cover ${r}%`}`:`min(${3*n}vh, ${n}%) min(${3*r}vh, ${r}%)`})(o))};if(n){const t=r?.direction,e=a?.direction,o=t?100*h(r?.speed,4):0,n=e?100*h(a?.speed,4):0;if(o||n){const i="up"===t?-o:o,s="to-left"===e?-n:n,l=[o&&r,n&&a].filter(Boolean);j("Translate",`from{ translate: 0px 0px; } to{ translate: ${s}px ${i}px; }`,{top:Math.min(...l.map((t=>h(t?.top,0)))),bottom:Math.max(...l.map((t=>h(t?.bottom,100))))})}const d=i?.direction;if(d){const t=Math.max(0,1-h(i?.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}; }`}[d];e&&j("Opacity",e,i)}const p=s?.direction;if(p){const t=3*h(s?.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); }`}[p];e&&j("Blur",e,s)}const u=l?.direction;if(u){const t=20*h(l?.level,4);j("Rotate",`from{ rotate: 0deg; } to{ rotate: ${"to-left"===u?-t:t}deg; }`,l)}if(c?.direction){const t=.15*h(c?.level,4),e=Math.max(0,1-t),o=1+t,n={"scale-up":`from{ scale: 1; } to{ scale: ${o}; }`,"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: ${o}; } 100%{ scale: 1; }`}[c.direction];n&&j("Scale",n,c)}}const N=[];if(u){if(m?.direction){const t="direct"===m?.direction?100:-100;N.push(((e,o)=>`translate(${(e*t).toFixed(2)}px, ${(o*t).toFixed(2)}px)`))}if($?.direction){const t=12*("direct"===$?.direction?1:-1);N.push(((e,o)=>`perspective(1000px) rotateX(${(o*-t).toFixed(2)}deg) rotateY(${(e*t).toFixed(2)}deg)`))}}const I=(t,o,n)=>{if(!t||!t.defaultView)return;const r=t.defaultView,a=t.bPlMouse||(t.bPlMouse={x:0,y:0,items:new Map,frame:0,last:0}),i=a.items.get(e)||{x:0,y:0};if(i.rate=o,i.build=n,a.items.set(e,i),a.bound)return;a.bound=!0;const s=e=>{const o=a.last?Math.min(e-a.last,100):16.7;a.last=e;let n=!1;a.items.forEach(((e,r)=>{const i=e.el&&e.el.isConnected?e.el:t.querySelector(r);if(!i)return;e.el=i;const s=e.rate*o/1e3,l=a.x-e.x,c=a.y-e.y,d=Math.sqrt(l*l+c*c);d<=s?(e.x=a.x,e.y=a.y):(e.x+=l/d*s,e.y+=c/d*s,n=!0),i.style.transform=e.build(e.x,e.y)})),a.frame=n?r.requestAnimationFrame(s):0,a.last=n?e:0};t.addEventListener("pointermove",(t=>{a.x=2*(t.clientX/r.innerWidth-.5),a.y=2*(t.clientY/r.innerHeight-.5),a.frame||(a.frame=r.requestAnimationFrame(s))}))};if(N.length&&"undefined"!=typeof document){const t=Math.max(.25,1.5*h(m?.speed,h($?.speed,4))),e=(t,e)=>N.map((o=>o(t,e))).join(" ");I(document,t,e),I(document.querySelector('iframe[name="editor-canvas"]')?.contentDocument,t,e)}const S=t=>b?.[t]||("desktop"===t?b?.undefined:""),T=e.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;":""},A=Array.isArray(p)?p:k(p)?[p]:[],E=t=>!A.length||A.includes(t)?"":`${e}{ animation-name: none; }`;return`\n\t\t${M.length?`\n\t\t${x.join(" ")}\n\t\t@supports (animation-timeline: scroll()){\n\t\t\t${e}{\n\t\t\t\tanimation-name: ${M.join(", ")};\n\t\t\t\tanimation-duration: ${M.map((()=>"auto")).join(", ")};\n\t\t\t\tanimation-timing-function: ${M.map((()=>"linear")).join(", ")};\n\t\t\t\tanimation-fill-mode: ${M.map((()=>"both")).join(", ")};\n\t\t\t\tanimation-direction: ${M.map((()=>g?"normal":"reverse")).join(", ")};\n\t\t\t\tanimation-timeline: ${w.join(", ")};\n\t\t\t\tanimation-range: ${f.join(", ")};\n\t\t\t}\n\t\t\t${E("desktop")?`${L}{ ${E("desktop")} }`:""}\n\t\t\t${E("tablet-portrait")?`@media only screen and (min-width: 641px) and (max-width: 1024px){ ${E("tablet-portrait")} }`:""}\n\t\t\t${E("mobile-portrait")?`${D}{ ${E("mobile-portrait")} }`:""}\n\t\t}\n\t`:""}\n\t\t${N.length?`${e}{ transition-property: background, border, border-radius, box-shadow; }`:""}\n\t\t${C("desktop")?`${T}{ ${C("desktop")} }`:""}\n\t\t${C("tablet")?`${z}{ ${T}{ ${C("tablet")} } }`:""}\n\t\t${C("mobile")?`${D}{ ${T}{ ${C("mobile")} } }`:""}\n\t`})($,h,t)}\n\t\t${b}\n\t`.replace(/\s+/g," ")},G=({attributes:t,id:o,isBackend:r=!1})=>{const{advanced:a={}}=t,{grid:c={},item:d={},caption:p={},profile:u={},followBtn:m={},loadMoreBtn:$={},lightbox:b={}}=t,h=`#${o} .${n}`,g=`${h} .${n}-header`,y=`${h} .${n}-grid`,x=`${h} .${n}-item`,M=`${h} .${n}-figure`,w=`${h} .${n}-overlay`,f=`${h} .${n}-type`,v=`${h} .${n}-caption`,j=`${h} .${n}-photo`,k=`${h} .${n}-username`,N=`${h} .${n}-name, ${h} .${n}-bio`,L=`${h} .${n}-follow`,I=`${h} .${n}-load-more`,S=`.${n}-lightbox[data-bb-id="${(t=>{if("string"!=typeof t)return t | |
| 6 | +;const e=t.replace(/\/\*|\*\//g,"").replace(/[{};<>\\]/g,"").replace(/[\r\n\t]+/g," "),o=t=>(e.split(t).length-1)%2;return o('"')||o("'")?e.replace(/["']/g,""):e})(o)}"]`,U=(t,...e)=>{const o=e.filter(Boolean).join(" ").replace(/\s+/g," ").trim();return o?`${t}{ ${o} }`:""},Y=t=>Object.keys(t||{}).length?A(t):"",P=(t,e)=>t?t.desktop||t.tablet||t.mobile?t[e]||null:"desktop"!==e||void 0===t.top&&void 0===t.right?null:t:null,Q=(t,e={},o)=>{const n=P(e.normal?.padding,o)||("desktop"===o?P(e.padding,o):null),r=P(e.normal?.radius,o)||("desktop"===o?P(e.radius,o):null),a=P(e.hover?.padding,o),i=P(e.hover?.radius,o);return`\n\t\t\t${U(t,T("padding",O(n)),T("border-radius",O(r)))}\n\t\t\t${U(`${t}:hover, ${t}:focus-visible`,T("padding",O(a)),T("border-radius",O(i)))}\n\t\t`},B=(t,e={})=>`\n\t\t${U(t,T("color",e.normal?.color),C(e.normal?.background),Y(e.normal?.border),T("box-shadow",E(Array.isArray(e.normal?.shadow)?e.normal.shadow:e.shadow||[])))}\n\t\t${U(`${t}:hover, ${t}:focus-visible`,T("color",e.hover?.color),C(e.hover?.background),Y(e.hover?.border),T("box-shadow",E(Array.isArray(e.hover?.shadow)?e.hover.shadow:[])))}\n\t\t${Q(t,e,"desktop")}\n\t`,H=t=>U(y,T("grid-template-columns",`repeat(${parseInt(s(c,t,"columns",4),10)||1}, minmax(0, 1fr))`),T("column-gap",l(s(c,t,"columnGap","15px"),"15px")),T("row-gap",l(s(c,t,"rowGap","15px"),"15px"))),R=t=>`\n\t\t\t${U(x,T("border-radius",O(d?.[t]?.radius)))}\n\n\t\t${U(M,T("aspect-ratio",s(c,t,"ratio","1/1")))}\n\n\t\t${U(f,T("font-size",l(s(d,t,"iconSize","desktop"===t?d.iconSize||"22px":""),"")))}`,Z=t=>`\n\t\t\t${U(g,T("gap",l(s(u,t,"gap","desktop"===t?u.gap||"12px":""),"")))}\n\n\t\t${U(`${j}, ${j} img`,T("width",l(s(u,t,"photoSize","desktop"===t?u.photoSize||"55px":""),"")),T("height",l(s(u,t,"photoSize","desktop"===t?u.photoSize||"55px":""),"")))}`,F=t=>U(v,T("padding",O(P(p.padding,t)))),G=(0,e.useMemo)((()=>`\n\t\t${_("",p.typo)?.googleFontLink}\n\t\t${_("",u.usernameTypo)?.googleFontLink}\n\t\t${_("",u.metaTypo)?.googleFontLink}\n\t\t${_("",m.typo)?.googleFontLink}\n\t\t${_("",$.typo)?.googleFontLink}\n\t\t${_(v,p.typo)?.styles}\n\t\t${_(k,u.usernameTypo)?.styles}\n\t\t${_(N,u.metaTypo)?.styles}\n\t\t${_(L,m.typo)?.styles}\n\t\t${_(I,$.typo)?.styles}\n\n\t\t${U(x,Y(d.border),T("box-shadow",E(Array.isArray(d.shadow)?d.shadow:d.shadow?.normal)))}\n\t\t${d.shadow?.hover?U(`${x}:hover`,T("box-shadow",E(d.shadow.hover))):""}\n\n\t\t${U(w,T("background",d.overlayColor))}\n\t\t${U(f,T("color",d.iconColor))}\n\n\t\t${U(v,T("color",p.color),T("text-align",p.align),T("padding",O(P(p.padding,"desktop"))),C(p.background))}\n\t\t${U(`${v} a`,T("color",p.linkColor))}\n\n\t\t${U(k,T("color",u.usernameColor))}\n\t\t${U(`${h} .${n}-name`,T("color",u.nameColor))}\n\t\t${U(`${h} .${n}-bio`,T("color",u.bioColor))}\n\n\t\t${B(L,m)}\n\t\t${B(I,$)}\n\n\t\t${U(S,T("background",b.backdrop))}\n\t\t${U(`${S} .${n}-close`,T("color",b.closeColor),T("background",b.closeBg))}\n\t\t${U(`${S} .${n}-close svg`,T("fill",b.closeColor))}\n\t\t${U(`${S} .${n}-close:hover`,T("color",b.closeHoverColor),T("background",b.closeHoverBg))}\n\t\t${U(`${S} .${n}-close:hover svg`,T("fill",b.closeHoverColor))}\n\t\t${U(`${S} .${n}-nav`,T("color",b.navColor),T("background",b.navBg))}\n\t\t${U(`${S} .${n}-nav svg`,T("fill",b.navColor))}\n\t\t${U(`${S} .${n}-nav:hover`,T("color",b.navHoverColor),T("background",b.navHoverBg))}\n\t\t${U(`${S} .${n}-nav:hover svg`,T("fill",b.navHoverColor))}\n\n\t\t${H("desktop")}\n\t\t${R("desktop")}\n\t\t${Z("desktop")}\n\n\t\t${z}{\n\t\t\t${H("tablet")}\n\t\t\t${R("tablet")}\n\t\t\t${Z("tablet")}\n\t\t\t${F("tablet")}\n\t\t\t${Q(L,m,"tablet")}\n\t\t\t${Q(I,$,"tablet")}\n\t\t}\n\n\t\t${D}{\n\t\t\t${H("mobile")}\n\t\t\t${R("mobile")}\n\t\t\t${Z("mobile")}\n\t\t\t${F("mobile")}\n\t\t\t${Q(L,m,"mobile")}\n\t\t\t${Q(I,$,"mobile")}\n\t\t}\n\n\t\t${W(o,a,r,!1)}\n\t\t`),[t,o,r]);return(0,i.jsx)("style",{dangerouslySetInnerHTML:{__html:G}})};document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll(".wp-block-b-blocks-instagram").forEach((e=>{let o;try{o=JSON.parse(e.dataset.attributes||"")}catch(t){return}(0,t.createRoot)(e).render((0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(G,{attributes:o,id:e.id}),(0,i.jsx)(j,{attributes:o,id:e.id})]})),e.removeAttribute("data-attributes")}))}))})(); | |