"use strict";(("undefined"!=typeof self?self:this).webpackJsonp__wix_communities_blog_ooi=("undefined"!=typeof self?self:this).webpackJsonp__wix_communities_blog_ooi||[]).push([[4922],{9625:(e,t,n)=>{n.d(t,{CU:()=>c,Dl:()=>o,F$:()=>v,H0:()=>d,Lo:()=>i,NG:()=>m,P$:()=>y,R5:()=>s,R9:()=>A,S3:()=>a,X8:()=>f,_o:()=>r,j3:()=>u,l8:()=>h,n9:()=>l,qt:()=>p,rc:()=>g});const o="galleryViewer",i="gallery-settings",a="GalleryPlugin_LayoutDropdown",r="GalleryPlugin_Layout_CustomizeLayout",l="galleryItemsSortableFileInputTop",s="galleryItemsSortableFileInputBottom",c="gallerySettingsTabs",u="galleryExpandToggle",d="imageDownloadToggle",g="gallerySpoilerToggle",m="galleryItemsSortable",h="galleryItemsSortableDelete",p="galleryItemsSortableSelectAll",y="galleryItemsSortableDeselectAll",v="galleryItemsSortableItemSettings",A="galleryImageSettingsDeleteImage",f="galleryImagePreview"},4922:(e,t,n)=>{n.d(t,{h:()=>Z});var o=n(4452),i=n.n(o),a=n(16252),r=n(41486),l=n(17086),s=n(60751),c=n.n(s),u=n(62688),d=n.n(u);function g(e){var t={};for(var n in e)if(e.hasOwnProperty(n))if("object"==typeof e[n]&&!(e[n]instanceof Array)&&null!==e[n]&&Object.keys(e[n]).length>0){var o=g(e[n]);for(var i in o)o.hasOwnProperty(i)&&(t[n+"_"+i]=o[i])}else t[n]=e[n];return t}function m(e){var t=g(e),n="(galleryEle) => {\n const computedStyle = window.getComputedStyle(galleryEle);\n const computedStyles = {};\n // search css variables to query\n const cssVariables = [];\n const stylesheets = document.styleSheets;\n for (let i = 0; i < stylesheets.length; i++) {\n try {\n const rules = stylesheets[i].rules || stylesheets[i].cssRules;\n for (let j = 0; j < rules.length; j++) {\n const rule = rules[j];\n const style = rule.style;\n if (style) {\n for (let k = 0; k < style.length; k++) {\n const prop = style[k];\n if (prop.startsWith('--')) {\n if (prop.includes('ProGallery-')) {\n cssVariables.push(prop);\n }\n }\n }\n }\n }\n } catch (e) {\n }\n }\n const cssVariablesMap = cssVariables.map((item) => {\n return {\n name: item,\n value: computedStyle.getPropertyValue(item),\n }\n }).filter((item) => item.value);\n // get computed styles\n for (let i = 0; i < cssVariablesMap.length; i++) {\n computedStyles[cssVariablesMap[i].name] = cssVariablesMap[i].value;\n }\n const options = Object.entries(computedStyles).reduce((res, [key, value]) => {\n const keyNameStart = key.indexOf('ProGallery-') + 'ProGallery-'.length;\n const keyName = key.substring(keyNameStart);\n res[keyName] = JSON.parse(value);\n return res;\n }, {});\n const optionsStr = Object.entries({...".concat(JSON.stringify(t),",...options})\n .map(([key, value]) => ([key, JSON.stringify(value)]))\n .filter(([key, value]) => key.includes('layoutParams_'))\n .map((keyval) => keyval.join(\":\")).join('|');\n return optionsStr;\n }");return"(ele) => {\n const mainFunc = ".concat(n,";\n return mainFunc(ele);\n }")}var h=["isRTL","cubeType","cubeImages","arrowsSize","arrowsPosition","cubeRatio","cropRatio","layoutParams_cropRatio","collageAmount","collageDensity","columnsWidth","cropOnlyFill","chooseBestGroup","externalInfoHeight","externalInfoWidth","fixedColumns","groupsPerStrip","galleryMargin","layoutParams_gallerySpacing","groupTypes","groupSize","isVertical","imageMargin","minItemSize","scrollDirection","placeGroupsLtr","rotatingGroupTypes","layoutParams_repeatingGroupTypes","rotatingCropRatios","smartCrop","scatter","smartCrop","targetItemSize","hasThumbnails","thumbnailSize","thumbnailSpacings","galleryThumbnailsAlignment","isSlideshow","galleryLayout","slideshowInfoSize","layoutParams_structure_galleryRatio_value","gallerySizeType","gallerySizePx","gallerySize","enableInfiniteScroll","imageInfoType","textsHorizontalPadding","gridStyle","numberOfImagesPerRow","calculateTextBoxHeightMode","textBoxHeight","textsVerticalPadding","titlePlacement","textBoxWidthPercent","calculateTextBoxWidthMode"],p=function(e,t){return Object.keys(e).filter((function(e){return t.indexOf(e)>=0})).reduce((function(t,n){return t[n]=e[n],t}),{})},y=function(e){void 0===e&&(e="");for(var t=0,n=0;n ".concat(JSON.stringify(s))}}(e),z=V.hrefStr,F=V.getOptions,W=e.measureContainerId||"pro-gallery-"+e.id,Z=function(t){return"\n ".concat(t,"\n var isVertical = options.includes('layoutParams_structure_scrollDirection:\"VERTICAL\"');\n var layoutFixerUrl = '").concat(z,"' + pgMeasures.top + '_' + pgMeasures.width + '_' + pgMeasures.height + '_' + window.innerHeight + '&options=' + options;\n document.getElementById('").concat("layout-fixer-style-"+e.id,"').setAttribute('href', encodeURI(layoutFixerUrl));\n});\n\n ")};return Z(B?'\n var ele = document.getElementById("'.concat(e.id,'"), nativeRect = ele.getBoundingClientRect();\n var pgMeasures = {top: nativeRect.top, width: nativeRect.width, height: Number(getComputedStyle(ele).getPropertyValue("height").replace("px", ""))};\n var options = (').concat(F,")(ele);\n "):"\n var ele = document.getElementById('".concat(W,"');\n var pgMeasures = ele.getBoundingClientRect();\n var options = (").concat(F,")(ele);\n var width = pgMeasures.width;\n var height = pgMeasures.height;\n\n var isIOS = /iPad|iPhone|iPod/.test(navigator?.userAgent);\n if(isIOS) {\n width = ").concat((null===(o=null===(n=null===(t=null==e?void 0:e.containerPostProcess)||void 0===t?void 0:t.ios)||void 0===n?void 0:n.width)||void 0===o?void 0:o.percentage)?"width * ".concat(null===(a=null===(i=null==e?void 0:e.containerPostProcess)||void 0===i?void 0:i.ios)||void 0===a?void 0:a.width.percentage):"width",";\n width = ").concat((null===(s=null===(l=null===(r=null==e?void 0:e.containerPostProcess)||void 0===r?void 0:r.ios)||void 0===l?void 0:l.width)||void 0===s?void 0:s.addition)?"width + (".concat(null===(u=null===(c=null==e?void 0:e.containerPostProcess)||void 0===c?void 0:c.ios)||void 0===u?void 0:u.width.addition,")"):"width",";\n height = ").concat((null===(v=null===(g=null===(d=null==e?void 0:e.containerPostProcess)||void 0===d?void 0:d.ios)||void 0===g?void 0:g.height)||void 0===v?void 0:v.percentage)?"height * ".concat(null===(b=null===(f=null===(A=null==e?void 0:e.containerPostProcess)||void 0===A?void 0:A.ios)||void 0===f?void 0:f.height)||void 0===b?void 0:b.percentage):"height",";\n height = ").concat((null===(I=null===(w=null===(P=null==e?void 0:e.containerPostProcess)||void 0===P?void 0:P.ios)||void 0===w?void 0:w.height)||void 0===I?void 0:I.addition)?"height + (".concat(null===(M=null===(C=null===(S=null==e?void 0:e.containerPostProcess)||void 0===S?void 0:S.ios)||void 0===C?void 0:C.height)||void 0===M?void 0:M.addition,")"):"height",";\n } else {\n width = ").concat((null===(_=null===(L=null==e?void 0:e.containerPostProcess)||void 0===L?void 0:L.width)||void 0===_?void 0:_.percentage)?"width * ".concat(null===(E=e.containerPostProcess)||void 0===E?void 0:E.width.percentage):"width",";\n width = ").concat((null===(O=null===(x=null==e?void 0:e.containerPostProcess)||void 0===x?void 0:x.width)||void 0===O?void 0:O.addition)?"width + (".concat(null===(R=e.containerPostProcess)||void 0===R?void 0:R.width.addition,")"):"width",";\n height = ").concat((null===(D=null===(N=null==e?void 0:e.containerPostProcess)||void 0===N?void 0:N.height)||void 0===D?void 0:D.percentage)?"height * ".concat(null===(G=null===(k=null==e?void 0:e.containerPostProcess)||void 0===k?void 0:k.height)||void 0===G?void 0:G.percentage):"height",";\n height = ").concat((null===(H=null===(T=null==e?void 0:e.containerPostProcess)||void 0===T?void 0:T.height)||void 0===H?void 0:H.addition)?"height + (".concat(null===(j=null===(U=null==e?void 0:e.containerPostProcess)||void 0===U?void 0:U.height)||void 0===j?void 0:j.addition,")"):"height",";\n }\n\n pgMeasures = { top: pgMeasures.top, width, height };\n"))}var A=function(e){var t;try{var n="undefined"!=typeof window?((null===(t=window.document.getElementById("layout-fixer-style-"+e.id))||void 0===t?void 0:t.href)||"").replace(/^.*\/\/[^/]+/,""):"";return c().createElement("div",{id:"layout-fixer-"+e.id+e.isPrerenderMode,key:"layout-fixer-"+e.id+e.isPrerenderMode,style:{display:"none"}},e.isPrerenderMode&&c().createElement("link",{href:n,rel:"stylesheet",id:"layout-fixer-style-"+e.id}),c().createElement("script",{dangerouslySetInnerHTML:{__html:"try {\n window.requestAnimationFrame(function() {\n ".concat(v(e),"\n } catch (e) {\n console.warn('Cannot set layoutFixer css', e);\n }")}}))}catch(e){return c().createElement("div",{id:"layoutFixerErrors",style:{display:"none"}},e.toString())}};A.defaultProps={measureContainerId:""},A.propTypes={isPrerenderMode:d().bool,id:d().string,items:d().array,options:d().object,useNativeLayoutFixer:d().bool,containerPostProcess:d().shape({width:d().shape({percentage:d().number,addition:d().number}),height:d().shape({percentage:d().number,addition:d().number}),ios:d().shape({width:d().shape({percentage:d().number,addition:d().number}),height:d().shape({percentage:d().number,addition:d().number})})}),measureContainerId:d().string};var f=n(47574),b=n(87928);var P=e=>c().createElement("svg",{viewBox:"0 0 19 19",xmlns:"http://www.w3.org/2000/svg",...e},c().createElement("path",{d:"M15.071 8.371V4.585l-4.355 4.356a.2.2 0 0 1-.283 0l-.374-.374a.2.2 0 0 1 0-.283l4.356-4.355h-3.786a.2.2 0 0 1-.2-.2V3.2c0-.11.09-.2.2-.2H16v5.371a.2.2 0 0 1-.2.2h-.529a.2.2 0 0 1-.2-.2zm-6.5 6.9v.529a.2.2 0 0 1-.2.2H3v-5.371c0-.11.09-.2.2-.2h.529c.11 0 .2.09.2.2v3.786l4.355-4.356a.2.2 0 0 1 .283 0l.374.374a.2.2 0 0 1 0 .283L4.585 15.07h3.786c.11 0 .2.09.2.2z",fill:"#000",fillRule:"nonzero"})),w=n(50948),I=n(9625),S="utLUc",C="VFcIf",M="dHhpK",L="chf-a",_="JDTtE",E="ve0Nf",x="jDaWJ",O="-AC4U";var R=n(19399);const N={desktop:{width:980,height:500},mobile:{width:320,height:500}},D=e=>{const[t,n]=c().useState(!1),o=(()=>{const[e,t]=c().useState(!0);return c().useEffect((()=>{t(!1)}),[]),e})(),{options:i,layout:r}=e,{responsive:l}=i,{mobile:u,desktop:d}=N,{isMobile:g,jsdomMode:m}=(0,s.useContext)(f.iB),h={isDefaultContainer:!0,width:g?u.width:d.width,height:g?u.height:d.height},[p,y]=(0,s.useState)(h),[v,A]=(0,s.useState)(p.height),[b,P]=(0,s.useState)(null);c().useEffect((()=>{t&&(n(!1),y(h))}),[r]);const w=(0,s.useCallback)((()=>{y((e=>b?.clientHeight&&e.height&&Math.abs(e.height-b?.clientHeight)<=1&&Math.abs(e.width-b?.clientWidth)<=1?e:{width:b?.clientWidth,height:b?.clientHeight})),n(!0)}),[b,n]),I=(0,s.useMemo)((()=>(0,a.debounce)(w,100)),[w]);(({callback:e,element:t})=>{(0,s.useEffect)((()=>{if(!window?.ResizeObserver)return;const n=new ResizeObserver(e);return t&&n.observe(t),()=>{n.disconnect()}}),[t,e])})({element:b,callback:I});const S=r!==R.p4.THUMBNAIL||g?l?{}:{height:v}:{height:620};return{isMeasuredContainer:m?!o:t,setHeight:e=>{A(e)},container:p,setContainerRef:P,containerStyle:S,containerClassName:o?L:""}};var k=n(72596);function G(e,t,n){const o=(0,s.useMemo)((()=>((e,t,n)=>e.map(((e,o)=>(0,k.C)(e,o,t,n))))(e,t,n)),[e]);return o}var T=n(81404),H=n(47159);const U=({layout:e})=>e&&([R.p4.THUMBNAIL,R.p4.SLIDER,R.p4.SLIDESHOW,R.p4.COLUMN,R.p4.FULLSIZE].includes(e.type)||e.horizontalScroll),j=[1,2,3].map((e=>({metaData:{height:10,width:10},itemId:"sampleItem-"+e,mediaUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEwAACxMBAJqcGAAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KTMInWQAAAA1JREFUCB1jePv27X8ACVkDxyMHIvwAAAAASUVORK5CYII="}))),B={[R.p4.GRID]:r.A.layoutParams_structure_galleryLayout.GRID,[R.p4.MASONRY]:r.A.layoutParams_structure_galleryLayout.MASONRY,[R.p4.COLLAGE]:r.A.layoutParams_structure_galleryLayout.COLLAGE,[R.p4.THUMBNAIL]:r.A.layoutParams_structure_galleryLayout.THUMBNAIL,[R.p4.SLIDER]:r.A.layoutParams_structure_galleryLayout.SLIDER,[R.p4.SLIDESHOW]:r.A.layoutParams_structure_galleryLayout.SLIDESHOW,[R.p4.PANORAMA]:r.A.layoutParams_structure_galleryLayout.PANORAMA,[R.p4.COLUMN]:r.A.layoutParams_structure_galleryLayout.COLUMN,[R.p4.MAGIC]:r.A.layoutParams_structure_galleryLayout.MAGIC,[R.p4.FULLSIZE]:r.A.layoutParams_structure_galleryLayout.FULLSIZE},V={[r.A.layoutParams_structure_scrollDirection.VERTICAL]:0,[r.A.layoutParams_structure_scrollDirection.HORIZONTAL]:1},z=e=>{const t={},{layout:n,thumbnails:o,item:i}=e;if(n){const{type:e,horizontalScroll:o,orientation:i,numberOfColumns:a,mobileNumberOfColumns:l}=n;e&&(t.galleryLayout=parseInt(B[e])),o&&(t.scrollDirection=V[r.A.layoutParams_structure_scrollDirection.HORIZONTAL]),i&&(t.isVertical="COLUMNS"===i),"number"==typeof a&&(t.numberOfImagesPerRow=a),"number"==typeof l&&(t.m_numberOfImagesPerRow=l)}if(i){const{targetSize:e,ratio:n,crop:o,spacing:a}=i;"number"==typeof e&&(t.gallerySizePx=e),"number"==typeof n&&(t.cubeRatio=n),o&&(t.cubeType=o.toLowerCase()),"number"==typeof a&&(t.imageMargin=a)}if(o){const{placement:e,spacing:n}=o;e&&(t.galleryThumbnailsAlignment=e.toLowerCase()),"number"==typeof n&&(t.thumbnailSpacings=n/2)}return t};const F=r.A.events,W=({createMultiple:e,...t})=>e?`${(0,b.U)(t)}, ${(0,b.U)({...t,requiredHeight:2*t.requiredHeight,requiredWidth:2*t.requiredWidth})} 2x`:(0,b.U)(t),Z=c().memo((({componentData:e,nodeId:t,settings:n,relValue:o,anchorTarget:a,seoMode:u,helpers:d,itemOverlayElement:g})=>{const{scrollingElement:m,...h}=n,p=(0,s.useRef)(null),{items:y,options:v,disableExpand:b,disableDownload:L}=e||{},{tabIndex:N}=(0,s.useContext)(f.iB),k=G(y||[],o,a),{options:V,calculatedOptions:Z}=function(e,t,n){const{isMobile:o}=(0,s.useContext)(f.iB);return(0,s.useMemo)((()=>{const i=U(e),a={...(0,H.V)(e.layout?.type||R.p4.GRID),allowContextMenu:!t,showArrows:i,responsive:!0,...z(e)};o&&(a.m_numberOfImagesPerRow&&(a.numberOfImagesPerRow=a.m_numberOfImagesPerRow),i&&(a.arrowsSize=20,!a.imageMargin&&(a.imageMargin=0),a.galleryLayout===B[R.p4.THUMBNAIL]&&(a.thumbnailSize=90)));const r=(0,T.Ou)(a);if(r.layoutParams_structure_galleryLayout===B[R.p4.SLIDER]){const e=a.cubeRatio?1/a.cubeRatio:null,t=Math.min(...n.map((e=>e.metaData.height/e.metaData.width)));r.layoutParams_structure_galleryRatio_value=e||Math.max(9/16,Math.min(1,t))}return{options:r,calculatedOptions:a}}),[n,e])}(v||{},L,k),J={...V,behaviourParams_item_overlay_backgroundColor:"transparent"},Y=v?.layout?.type||"",{setHeight:q,container:K,setContainerRef:X,containerStyle:$,containerClassName:Q,isMeasuredContainer:ee}=D({options:J,layout:Y}),te=u?r.A.viewMode.SEO:r.A.viewMode.SITE,ne=!b&&!n.disableExpand&&n.onExpand&&y.length>0,oe=e=>{d?.onViewerAction?.(w.E,"Click","expand_gallery"),ne&&n.onExpand(t,e)},ie=!ee,ae=(0,s.useMemo)((()=>(e=>/^[-_\w]*$/.test(e))(t)?t:""),[t]);return c().createElement("div",{ref:X,className:i()(S,Q,{[M]:ne}),style:$,"data-hook":I.Dl,role:"none",onContextMenu:e=>L&&e.preventDefault()},c().createElement(l.A,{id:t,items:k.length>0?k:j,options:J,container:K,settings:{...h,isAccessible:!0},scrollingElement:"function"==typeof m?m():m,eventsListener:(e,t)=>{switch(e){case F.GALLERY_CHANGE:p.current&&(U(V)?p.current.style.height="auto":p.current.style.height=`${t.layoutHeight}px`);break;case F.ITEM_ACTION_TRIGGERED:"video"!==t.type&&!t.linkData.url&&!b&&oe(t.idx)}},createMediaUrl:W,viewMode:te,customComponents:{customHoverRenderer:e=>c().createElement("div",{className:x},e.title&&c().createElement("div",{className:C},c().createElement("div",{className:O},e.title)),g?.(e)),customImageRenderer:({alt:e,src:t,...n})=>{const o=t.includes(", ")?{src:t.split(", ")[0],srcSet:t}:{src:t};return c().createElement(c().Fragment,null,c().createElement("img",{...n,alt:e,tabIndex:N,...o}),ne&&c().createElement("div",{className:_,"data-hook":"expand-container"},c().createElement(P,{className:E,onClick:e=>{e.preventDefault(),e.stopPropagation(),oe(n["data-idx"])}})))}},totalItemsCount:k.length||j.length,setLayoutHeightImp:q,isPrerenderMode:ie}),ae?c().createElement(A,{id:ae,isPrerenderMode:ie,items:k,options:Z}):null)}),((e,t)=>(0,a.isEqual)(J(e),J(t))));function J(e){return{...e,componentData:{...e.componentData,items:e.componentData.items.map((({altText:e,title:t,image:n,...o})=>{if(!n)return o;const{link:i,...a}=n;return{...o,image:a}}))}}}}}]); //# sourceMappingURL=4922.chunk.min.js.map