PageSourceSearch

https://wp-modula.com/wp-content/plugins/modula-best-grid-gallery/…/js/front/990.47e735e7.modula-gallery.js

js wp-modula.com collected 2026-10-02 02:56:25 UTC 5,951 bytes, 1 lines download raw bytes

1"use strict";(this.webpackChunkModulaGallery=this.webpackChunkModulaGallery||[]).push([[990],{3320:(e,t,r)=>{r.d(t,{z:()=>i});var l=r(296),n=r(6764);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=(0,n.useRef)(null),r=(0,n.useRef)(null),i=(0,n.useState)(e),o=(0,l.A)(i,2),a=o[0],s=o[1],u=(0,n.useCallback)((function(e){var t=Math.floor(Number(e)||0);t<=0||s((function(e){return e===t?e:t}))}),[]),c=(0,n.useCallback)((function(e){if(!e)return 0;var t=e.clientWidth;try{t=e.getBoundingClientRect().width}catch(e){}return Math.floor(Number(t)||0)}),[]),d=(0,n.useCallback)((function(){if(!t.current)return 0;var e=c(t.current);if(e>0)return e;var r=t.current.parentElement;return r&&(e=c(r)),e>0?e:0}),[c]);return{containerRef:(0,n.useCallback)((function(e){var l,n;(null===(l=r.current)||void 0===l||l.disconnect(),r.current=null,t.current=e,e)&&((n=d())>0?u(n):"undefined"!=typeof requestAnimationFrame&&requestAnimationFrame((function(){var e=d();e>0&&u(e)})),"undefined"!=typeof ResizeObserver&&(r.current=new ResizeObserver((function(){var e=d();e>0&&u(e)})),r.current.observe(e)))}),[u,d]),containerWidth:a}}},9990:(e,t,r)=>{r.r(t),r.d(t,{default:()=>j});var l=r(6764),n=r(8719),i=r(1468),o=r(6078),a=r(4467),s=r(253),u=r(1690),c=r(4848);function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,l)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){(0,a.A)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function b(){return(0,c.jsxs)("svg",{className:"modula-bnb-show-all-photos__icon",width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",focusable:"false",children:[(0,c.jsx)("rect",{x:"1",y:"1",width:"4",height:"4",rx:"0.5",fill:"currentColor"}),(0,c.jsx)("rect",{x:"6",y:"1",width:"4",height:"4",rx:"0.5",fill:"currentColor"}),(0,c.jsx)("rect",{x:"11",y:"1",width:"4",height:"4",rx:"0.5",fill:"currentColor"}),(0,c.jsx)("rect",{x:"1",y:"6",width:"4",height:"4",rx:"0.5",fill:"currentColor"}),(0,c.jsx)("rect",{x:"6",y:"6",width:"4",height:"4",rx:"0.5",fill:"currentColor"}),(0,c.jsx)("rect",{x:"11",y:"6",width:"4",height:"4",rx:"0.5",fill:"currentColor"}),(0,c.jsx)("rect",{x:"1",y:"11",width:"4",height:"4",rx:"0.5",fill:"currentColor"}),(0,c.jsx)("rect",{x:"6",y:"11",width:"4",height:"4",rx:"0.5",fill:"currentColor"}),(0,c.jsx)("rect",{x:"11",y:"11",width:"4",height:"4",rx:"0.5",fill:"currentColor"})]})}function f(e){var t=e.moreCount,r=e.config,o=(0,i.d4)((function(e){var t;return null!==(t=e.items.filteredItems)&&void 0!==t?t:e.items.items})),a=(0,i.d4)((function(e){return e.gallery.settings||{}})),d=(0,l.useCallback)((function(e){e.preventDefault(),e.stopPropagation();var t=e.currentTarget.closest(".modula-gallery-react-host");if(t){var l=(0,u.qT)(null==r?void 0:r.lightbox)?r:h(h({},r),{},{lightbox:"fancybox"});(0,s.Bo)(t,l,0,{items:o,settings:a,openedViaKeyboard:!1,galleryHostEl:t})}}),[r,o,a]);if(t<1)return null;var f=(0,n.nv)((0,n._n)("(%d more image)","(%d more images)",t,"modula-best-grid-gallery"),t);return(0,c.jsxs)("button",{type:"button",className:"modula-bnb-show-all-photos",onClick:d,"aria-label":(0,n.nv)((0,n.__)("Show all photos %s","modula-best-grid-gallery"),f),children:[(0,c.jsx)(b,{}),(0,c.jsx)("span",{className:"modula-bnb-show-all-photos__label",children:(0,n.__)("Show all photos","modula-best-grid-gallery")}),(0,c.jsx)("span",{className:"modula-bnb-show-all-photos__count",children:f})]})}var m=r(9748),g=r(3320),x=r(7225),v=5,y=6,p=768;function j(){var e,t=(0,i.d4)((function(e){return e.items.items})),r=(0,i.d4)((function(e){return e.gallery.config})),l=(0,i.d4)((function(e){var t;return"settings-editor-preview"===(null===(t=e.gallery.metadata)||void 0===t?void 0:t.displayContext)})),a=Array.isArray(t)?t:[],s=(0,x.Qf)(r),u=(0,g.z)(0),d=u.containerRef,h=u.containerWidth,b=!s,j="mobile"===s||b&&h>0&&h<=p,w=null!==(e=a[0])&&void 0!==e?e:null,C=a.slice(1,v),O=a.slice(v),_=["modula-items","modula-bnb",j?"modula-bnb--compact":"",l&&O.length>
10?"modula-bnb--editor-preview-extras":""].filter(Boolean).join(" ");return(0,c.jsxs)("div",{ref:b?d:void 0,className:_,children:[(w||C.length>0)&&(0,c.jsxs)("div",{className:"modula-bnb-featured",children:[w&&(0,c.jsx)("div",{className:"modula-bnb-hero",children:(0,c.jsx)(o.A,{itemData:w,config:r,fillSlot:!0,style:{position:"absolute",inset:0,width:"100%",height:"100%"}},(0,m.Jm)(w,0))}),(0,c.jsx)("div",{className:"modula-bnb-featured-grid",children:C.map((function(e,t){var l=t===C.length-1&&O.length>0;return(0,c.jsxs)("div",{className:["modula-bnb-featured-cell",l?"modula-bnb-featured-cell--has-more":""].filter(Boolean).join(" "),children:[(0,c.jsx)(o.A,{itemData:e,config:r,fillSlot:!0,style:{position:"absolute",inset:0,width:"100%",height:"100%"}}),l?(0,c.jsx)(f,{moreCount:O.length,config:r}):null]},(0,m.Jm)(e,t+1))}))})]}),O.length>0&&(0,c.jsx)("div",{className:"modula-bnb-grid",style:{gridTemplateColumns:"repeat(".concat(y,", 1fr)")},children:O.map((function(e,t){return(0,c.jsxs)("div",{className:"modula-bnb-grid-cell",children:[l?(0,c.jsxs)("div",{className:"modula-bnb-lightbox-only-overlay","aria-hidden":"true",children:[(0,c.jsx)("span",{className:"modula-bnb-lightbox-only-overlay__label",children:(0,n.__)("Hidden","modula-best-grid-gallery")}),(0,c.jsx)("span",{className:"modula-bnb-lightbox-only-overlay__hint",children:(0,n.__)("Not shown in the BnB grid; opens in the lightbox.","modula-best-grid-gallery")})]}):null,(0,c.jsx)(o.A,{itemData:e,config:r,fillSlot:!0,style:{position:"absolute",inset:0,width:"100%",height:"100%"}})]},(0,m.Jm)(e,t+v))}))})]})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.