(window.expressionRepeatImage_bundle_jsonpfunction=window.expressionRepeatImage_bundle_jsonpfunction||[]).push([[1],{14:function(e,t,n){"use strict";n.r(t),n.d(t,"RepeatImageComponent",(function(){return l}));var i=n(4),a=n.n(i),s=n(8),o=n(13),c=n(2);async function u(e){return new Promise(((t,n)=>{const i=new Image;i.onload=()=>t(i),i.onerror=e=>n(e),i.src=e}))}function r(e,t){e.naturalHeight>e.naturalWidth?e.height=t:e.width=t}function m(e){if(!e)return null;const t=e.width>e.height?{height:e.height}:{width:e.width};return Object(c.jsx)("img",a()({src:e.src},t,{alt:""}))}function l({max:e,count:t,emptyImage:n,image:i,size:a,onLoaded:l}){const[g,p]=Object(s.useState)({image:null,emptyImage:null});Object(s.useEffect)((()=>{(async function(e){return(await Promise.allSettled([...e.map(u)])).map((e=>"rejected"===e.status?null:e.value))})([i,n]).then((e=>{const[t,n]=e;p({image:t,emptyImage:n}),l()}))}),[i,n,l]);const h=[],{image:d,emptyImage:f}=g;if(e&&t>e&&(t=e),d){r(d,a);const e=m(d);Object(o.times)(t,(()=>h.push(e)))}if(f){r(f,a);const n=m(f);Object(o.times)(e-t,(()=>h.push(n)))}return Object(c.jsx)("div",{className:"repeatImage",style:{pointerEvents:"none"}},h)}}}]);