react-image-gallery 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2022 Xiao Lin
1
+ Copyright (c) 2023 Xiao Lin
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy of
4
4
  this software and associated documentation files (the "Software"), to deal in
package/README.md CHANGED
@@ -30,22 +30,27 @@ React Image Gallery requires **React 16.0.0 or later.**
30
30
  npm install react-image-gallery
31
31
  ```
32
32
 
33
- ### Style import (with webpack)
33
+ ### Style import options
34
34
 
35
35
  ```
36
- # SCSS
36
+ # scss file import
37
37
  @import "~react-image-gallery/styles/scss/image-gallery.scss";
38
38
 
39
- # CSS
39
+ # css file import
40
40
  @import "~react-image-gallery/styles/css/image-gallery.css";
41
+
42
+ # js file import (using webpack)
43
+ import "react-image-gallery/styles/css/image-gallery.css";
41
44
  ```
42
45
 
43
46
  ### Example
44
47
 
45
- Need more example? See [`example/app.js`](https://github.com/xiaolin/react-image-gallery/blob/master/example/app.js)
48
+ Need more example? See [`example/App.jsx`](https://github.com/xiaolin/react-image-gallery/blob/master/example/App.jsx)
46
49
 
47
50
  ```js
48
51
  import ImageGallery from "react-image-gallery";
52
+ // import stylesheet if you're not already using CSS @import
53
+ import "react-image-gallery/styles/css/image-gallery.css";
49
54
 
50
55
  const images = [
51
56
  {
@@ -0,0 +1 @@
1
+ import*as e from"react";var t={694:(e,t,n)=>{var i=n(925);function r(){}function a(){}a.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,a,o){if(o!==i){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:r};return n.PropTypes=n,n}},556:(e,t,n)=>{e.exports=n(694)()},925:e=>{e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},115:e=>{var t="undefined"!=typeof Element,n="function"==typeof Map,i="function"==typeof Set,r="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function a(e,o){if(e===o)return!0;if(e&&o&&"object"==typeof e&&"object"==typeof o){if(e.constructor!==o.constructor)return!1;var s,l,u,c;if(Array.isArray(e)){if((s=e.length)!=o.length)return!1;for(l=s;0!=l--;)if(!a(e[l],o[l]))return!1;return!0}if(n&&e instanceof Map&&o instanceof Map){if(e.size!==o.size)return!1;for(c=e.entries();!(l=c.next()).done;)if(!o.has(l.value[0]))return!1;for(c=e.entries();!(l=c.next()).done;)if(!a(l.value[1],o.get(l.value[0])))return!1;return!0}if(i&&e instanceof Set&&o instanceof Set){if(e.size!==o.size)return!1;for(c=e.entries();!(l=c.next()).done;)if(!o.has(l.value[0]))return!1;return!0}if(r&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(o)){if((s=e.length)!=o.length)return!1;for(l=s;0!=l--;)if(e[l]!==o[l])return!1;return!0}if(e.constructor===RegExp)return e.source===o.source&&e.flags===o.flags;if(e.valueOf!==Object.prototype.valueOf&&"function"==typeof e.valueOf&&"function"==typeof o.valueOf)return e.valueOf()===o.valueOf();if(e.toString!==Object.prototype.toString&&"function"==typeof e.toString&&"function"==typeof o.toString)return e.toString()===o.toString();if((s=(u=Object.keys(e)).length)!==Object.keys(o).length)return!1;for(l=s;0!=l--;)if(!Object.prototype.hasOwnProperty.call(o,u[l]))return!1;if(t&&e instanceof Element)return!1;for(l=s;0!=l--;)if(("_owner"!==u[l]&&"__v"!==u[l]&&"__o"!==u[l]||!e.$$typeof)&&!a(e[u[l]],o[u[l]]))return!1;return!0}return e!=e&&o!=o}e.exports=function(e,t){try{return a(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,i),a.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r={};function a(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=a(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}i.d(r,{A:()=>ut});const o=function(){for(var e,t,n=0,i="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=a(e))&&(i&&(i+=" "),i+=t);return i},s=(l={default:()=>e.default,useMemo:()=>e.useMemo,useRef:()=>e.useRef},u={},i.d(u,l),u);var l,u;const c=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},h="object"==typeof global&&global&&global.Object===Object&&global;var d="object"==typeof self&&self&&self.Object===Object&&self;const f=h||d||Function("return this")(),p=function(){return f.Date.now()};var m=/\s/;var b=/^\s+/;const g=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&m.test(e.charAt(t)););return t}(e)+1).replace(b,""):e},v=f.Symbol;var y=Object.prototype,w=y.hasOwnProperty,S=y.toString,T=v?v.toStringTag:void 0;var O=Object.prototype.toString;var E=v?v.toStringTag:void 0;const k=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":E&&E in Object(e)?function(e){var t=w.call(e,T),n=e[T];try{e[T]=void 0;var i=!0}catch(e){}var r=S.call(e);return i&&(t?e[T]=n:delete e[T]),r}(e):function(e){return O.call(e)}(e)};var I=/^[-+]0x[0-9a-f]+$/i,x=/^0b[01]+$/i,P=/^0o[0-7]+$/i,j=parseInt;const _=function(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return null!=e&&"object"==typeof e}(e)&&"[object Symbol]"==k(e)}(e))return NaN;if(c(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=c(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=g(e);var n=x.test(e);return n||P.test(e)?j(e.slice(2),n?2:8):I.test(e)?NaN:+e};var R=Math.max,L=Math.min;const M=function(e,t,n){var i,r,a,o,s,l,u=0,h=!1,d=!1,f=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function m(t){var n=i,a=r;return i=r=void 0,u=t,o=e.apply(a,n)}function b(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-u>=a}function g(){var e=p();if(b(e))return v(e);s=setTimeout(g,function(e){var n=t-(e-l);return d?L(n,a-(e-u)):n}(e))}function v(e){return s=void 0,f&&i?m(e):(i=r=void 0,o)}function y(){var e=p(),n=b(e);if(i=arguments,r=this,l=e,n){if(void 0===s)return function(e){return u=e,s=setTimeout(g,t),h?m(e):o}(l);if(d)return clearTimeout(s),s=setTimeout(g,t),m(l)}return void 0===s&&(s=setTimeout(g,t)),o}return t=_(t)||0,c(n)&&(h=!!n.leading,a=(d="maxWait"in n)?R(_(n.maxWait)||0,t):a,f="trailing"in n?!!n.trailing:f),y.cancel=function(){void 0!==s&&clearTimeout(s),u=0,i=l=r=s=void 0},y.flush=function(){return void 0===s?o:v(p())},y},D=function(e,t,n){var i=!0,r=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return c(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),M(e,t,{leading:i,maxWait:t,trailing:r})};var C=i(115),W=i.n(C),N=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,i){return e[0]===t&&(n=i,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),i=this.__entries__[n];return i&&i[1]},t.prototype.set=function(t,n){var i=e(this.__entries__,t);~i?this.__entries__[i][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,i=e(n,t);~i&&n.splice(i,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,i=this.__entries__;n<i.length;n++){var r=i[n];e.call(t,r[1],r[0])}},t}()}(),F="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,z=void 0!==i.g&&i.g.Math===Math?i.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),B="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(z):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)},A=["top","right","bottom","left","width","height","size","weight"],U="undefined"!=typeof MutationObserver,q=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e){var t=!1,n=!1,i=0;function r(){t&&(t=!1,e()),n&&o()}function a(){B(r)}function o(){var e=Date.now();if(t){if(e-i<2)return;n=!0}else t=!0,n=!1,setTimeout(a,20);i=e}return o}(this.refresh.bind(this))}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){F&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),U?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){F&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;A.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),G=function(e,t){for(var n=0,i=Object.keys(t);n<i.length;n++){var r=i[n];Object.defineProperty(e,r,{value:t[r],enumerable:!1,writable:!1,configurable:!0})}return e},H=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||z},V=J(0,0,0,0);function K(e){return parseFloat(e)||0}function X(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+K(e["border-"+n+"-width"])}),0)}var Y="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof H(e).SVGGraphicsElement}:function(e){return e instanceof H(e).SVGElement&&"function"==typeof e.getBBox};function $(e){return F?Y(e)?function(e){var t=e.getBBox();return J(0,0,t.width,t.height)}(e):function(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return V;var i=H(e).getComputedStyle(e),r=function(e){for(var t={},n=0,i=["top","right","bottom","left"];n<i.length;n++){var r=i[n],a=e["padding-"+r];t[r]=K(a)}return t}(i),a=r.left+r.right,o=r.top+r.bottom,s=K(i.width),l=K(i.height);if("border-box"===i.boxSizing&&(Math.round(s+a)!==t&&(s-=X(i,"left","right")+a),Math.round(l+o)!==n&&(l-=X(i,"top","bottom")+o)),!function(e){return e===H(e).document.documentElement}(e)){var u=Math.round(s+a)-t,c=Math.round(l+o)-n;1!==Math.abs(u)&&(s-=u),1!==Math.abs(c)&&(l-=c)}return J(r.left,r.top,s,l)}(e):V}function J(e,t,n,i){return{x:e,y:t,width:n,height:i}}var Q=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=J(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=$(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),Z=function(e,t){var n=function(e){var t=e.x,n=e.y,i=e.width,r=e.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,o=Object.create(a.prototype);return G(o,{x:t,y:n,width:i,height:r,top:n,right:t+i,bottom:r+n,left:t}),o}(t);G(this,{target:e,contentRect:n})},ee=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new N,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof H(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new Q(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof H(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new Z(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),te="undefined"!=typeof WeakMap?new WeakMap:new N,ne=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=q.getInstance(),i=new ee(t,n,this);te.set(this,i)};["observe","unobserve","disconnect"].forEach((function(e){ne.prototype[e]=function(){var t;return(t=te.get(this))[e].apply(t,arguments)}}));const ie=void 0!==z.ResizeObserver?z.ResizeObserver:ne,re="Left",ae="Right",oe="Up",se="Down",le={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},ue={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},ce="mousemove",he="mouseup";function de(e,t){if(0===t)return e;const n=Math.PI/180*t;return[e[0]*Math.cos(n)+e[1]*Math.sin(n),e[1]*Math.cos(n)-e[0]*Math.sin(n)]}function fe(e){const{trackMouse:t}=e,n=s.useRef(Object.assign({},ue)),i=s.useRef(Object.assign({},le)),r=s.useRef(Object.assign({},i.current));let a;for(a in r.current=Object.assign({},i.current),i.current=Object.assign(Object.assign({},le),e),le)void 0===i.current[a]&&(i.current[a]=le[a]);const[o,l]=s.useMemo((()=>function(e,t){const n=t=>{const n="touches"in t;n&&t.touches.length>1||e(((e,r)=>{r.trackMouse&&!n&&(document.addEventListener(ce,i),document.addEventListener(he,a));const{clientX:o,clientY:s}=n?t.touches[0]:t,l=de([o,s],r.rotationAngle);return r.onTouchStartOrOnMouseDown&&r.onTouchStartOrOnMouseDown({event:t}),Object.assign(Object.assign(Object.assign({},e),ue),{initial:l.slice(),xy:l,start:t.timeStamp||0})}))},i=t=>{e(((e,n)=>{const i="touches"in t;if(i&&t.touches.length>1)return e;if(t.timeStamp-e.start>n.swipeDuration)return e.swiping?Object.assign(Object.assign({},e),{swiping:!1}):e;const{clientX:r,clientY:a}=i?t.touches[0]:t,[o,s]=de([r,a],n.rotationAngle),l=o-e.xy[0],u=s-e.xy[1],c=Math.abs(l),h=Math.abs(u),d=(t.timeStamp||0)-e.start,f=Math.sqrt(c*c+h*h)/(d||1),p=[l/(d||1),u/(d||1)],m=function(e,t,n,i){return e>t?n>0?ae:re:i>0?se:oe}(c,h,l,u),b="number"==typeof n.delta?n.delta:n.delta[m.toLowerCase()]||le.delta;if(c<b&&h<b&&!e.swiping)return e;const g={absX:c,absY:h,deltaX:l,deltaY:u,dir:m,event:t,first:e.first,initial:e.initial,velocity:f,vxvy:p};g.first&&n.onSwipeStart&&n.onSwipeStart(g),n.onSwiping&&n.onSwiping(g);let v=!1;return(n.onSwiping||n.onSwiped||n[`onSwiped${m}`])&&(v=!0),v&&n.preventScrollOnSwipe&&n.trackTouch&&t.cancelable&&t.preventDefault(),Object.assign(Object.assign({},e),{first:!1,eventData:g,swiping:!0})}))},r=t=>{e(((e,n)=>{let i;if(e.swiping&&e.eventData){if(t.timeStamp-e.start<n.swipeDuration){i=Object.assign(Object.assign({},e.eventData),{event:t}),n.onSwiped&&n.onSwiped(i);const r=n[`onSwiped${i.dir}`];r&&r(i)}}else n.onTap&&n.onTap({event:t});return n.onTouchEndOrOnMouseUp&&n.onTouchEndOrOnMouseUp({event:t}),Object.assign(Object.assign(Object.assign({},e),ue),{eventData:i})}))},a=e=>{document.removeEventListener(ce,i),document.removeEventListener(he,a),r(e)},o=(e,t)=>{let a=()=>{};if(e&&e.addEventListener){const o=Object.assign(Object.assign({},le.touchEventOptions),t.touchEventOptions),s=[["touchstart",n,o],["touchmove",i,Object.assign(Object.assign({},o),t.preventScrollOnSwipe?{passive:!1}:{})],["touchend",r,o]];s.forEach((([t,n,i])=>e.addEventListener(t,n,i))),a=()=>s.forEach((([t,n])=>e.removeEventListener(t,n)))}return a},s={ref:t=>{null!==t&&e(((e,n)=>{if(e.el===t)return e;const i={};return e.el&&e.el!==t&&e.cleanUpTouch&&(e.cleanUpTouch(),i.cleanUpTouch=void 0),n.trackTouch&&t&&(i.cleanUpTouch=o(t,n)),Object.assign(Object.assign(Object.assign({},e),{el:t}),i)}))}};return t.trackMouse&&(s.onMouseDown=n),[s,o]}((e=>n.current=e(n.current,i.current)),{trackMouse:t})),[t]);return n.current=function(e,t,n,i){return t.trackTouch&&e.el?e.cleanUpTouch?t.preventScrollOnSwipe!==n.preventScrollOnSwipe||t.touchEventOptions.passive!==n.touchEventOptions.passive?(e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:i(e.el,t)})):e:Object.assign(Object.assign({},e),{cleanUpTouch:i(e.el,t)}):(e.cleanUpTouch&&e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:void 0}))}(n.current,i.current,r.current,l),o}var pe=i(556);function me(e){return me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},me(e)}function be(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function ge(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?be(Object(n),!0).forEach((function(t){ve(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):be(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ve(e,t,n){return(t=function(e){var t=function(e){if("object"!=me(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=me(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==me(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ye={description:"",fullscreen:"",isFullscreen:!1,originalAlt:"",originalHeight:"",originalWidth:"",originalTitle:"",sizes:"",srcSet:"",loading:"eager"},we=s.default.memo((function(e){var t=ge(ge({},ye),e),n=t.description,i=t.fullscreen,r=t.handleImageLoaded,a=t.isFullscreen,o=t.onImageError,l=t.original,u=t.originalAlt,c=t.originalHeight,h=t.originalWidth,d=t.originalTitle,f=t.sizes,p=t.srcSet,m=t.loading,b=a&&i||l;return s.default.createElement(s.default.Fragment,null,s.default.createElement("img",{className:"image-gallery-image",src:b,alt:u,srcSet:p,height:c,width:h,sizes:f,title:d,onLoad:function(e){return r(e,l)},onError:o,loading:m}),n&&s.default.createElement("span",{className:"image-gallery-description"},n))}));we.displayName="Item",we.propTypes={description:pe.string,fullscreen:pe.string,handleImageLoaded:pe.func.isRequired,isFullscreen:pe.bool,onImageError:pe.func.isRequired,original:pe.string.isRequired,originalAlt:pe.string,originalHeight:pe.string,originalWidth:pe.string,originalTitle:pe.string,sizes:pe.string,srcSet:pe.string,loading:pe.string};const Se=we;function Te(e){return Te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Te(e)}function Oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oe(Object(n),!0).forEach((function(t){ke(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ke(e,t,n){return(t=function(e){var t=function(e){if("object"!=Te(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Te(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Te(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ie={left:s.default.createElement("polyline",{points:"15 18 9 12 15 6"}),right:s.default.createElement("polyline",{points:"9 18 15 12 9 6"}),top:s.default.createElement("polyline",{points:"6 15 12 9 18 15"}),bottom:s.default.createElement("polyline",{points:"6 9 12 15 18 9"}),maximize:s.default.createElement("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"}),minimize:s.default.createElement("path",{d:"M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"}),play:s.default.createElement("polygon",{points:"5 3 19 12 5 21 5 3"}),pause:s.default.createElement(s.default.Fragment,null,s.default.createElement("rect",{x:"6",y:"4",width:"4",height:"16"}),s.default.createElement("rect",{x:"14",y:"4",width:"4",height:"16"}))},xe={strokeWidth:1,viewBox:"0 0 24 24"},Pe=function(e){var t=Ee(Ee({},xe),e),n=t.strokeWidth,i=t.viewBox,r=t.icon;return s.default.createElement("svg",{className:"image-gallery-svg",xmlns:"http://www.w3.org/2000/svg",viewBox:i,fill:"none",stroke:"currentColor",strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round"},Ie[r])};Pe.propTypes={strokeWidth:pe.number,viewBox:pe.string,icon:(0,pe.oneOf)(["left","right","top","bottom","maximize","minimize","play","pause"]).isRequired};const je=Pe;var _e=s.default.memo((function(e){var t=e.isFullscreen,n=e.onClick;return s.default.createElement("button",{type:"button",className:"image-gallery-icon image-gallery-fullscreen-button",onClick:n,"aria-label":"Open Fullscreen"},s.default.createElement(je,{strokeWidth:2,icon:t?"minimize":"maximize"}))}));_e.displayName="Fullscreen",_e.propTypes={isFullscreen:pe.bool.isRequired,onClick:pe.func.isRequired};const Re=_e;var Le=s.default.memo((function(e){var t=e.disabled,n=e.onClick;return s.default.createElement("button",{type:"button",className:"image-gallery-icon image-gallery-left-nav",disabled:t,onClick:n,"aria-label":"Previous Slide"},s.default.createElement(je,{icon:"left",viewBox:"6 0 12 24"}))}));Le.displayName="LeftNav",Le.propTypes={disabled:pe.bool.isRequired,onClick:pe.func.isRequired};const Me=Le;var De=s.default.memo((function(e){var t=e.disabled,n=e.onClick;return s.default.createElement("button",{type:"button",className:"image-gallery-icon image-gallery-right-nav",disabled:t,onClick:n,"aria-label":"Next Slide"},s.default.createElement(je,{icon:"right",viewBox:"6 0 12 24"}))}));De.displayName="RightNav",De.propTypes={disabled:pe.bool.isRequired,onClick:pe.func.isRequired};const Ce=De;var We=s.default.memo((function(e){var t=e.isPlaying,n=e.onClick;return s.default.createElement("button",{type:"button",className:"image-gallery-icon image-gallery-play-button",onClick:n,"aria-label":"Play or Pause Slideshow"},s.default.createElement(je,{strokeWidth:2,icon:t?"pause":"play"}))}));We.displayName="PlayPause",We.propTypes={isPlaying:pe.bool.isRequired,onClick:pe.func.isRequired};const Ne=We;function Fe(e){return Fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fe(e)}function ze(){return ze=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ze.apply(null,arguments)}function Be(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Ae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Be(Object(n),!0).forEach((function(t){Ue(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Be(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ue(e,t,n){return(t=function(e){var t=function(e){if("object"!=Fe(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Fe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Fe(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var qe={className:"",delta:0,onSwiping:function(){},onSwiped:function(){}},Ge=function(e){var t=Ae(Ae({},qe),e),n=t.children,i=t.className,r=fe({delta:t.delta,onSwiping:t.onSwiping,onSwiped:t.onSwiped});return s.default.createElement("div",ze({},r,{className:i}),n)};Ge.propTypes={children:pe.node.isRequired,className:pe.string,delta:pe.number,onSwiped:pe.func,onSwiping:pe.func};const He=Ge;var Ve=s.default.memo((function(e){var t=e.disabled,n=e.onClick;return s.default.createElement("button",{type:"button",className:"image-gallery-icon image-gallery-top-nav",disabled:t,onClick:n,"aria-label":"Previous Slide"},s.default.createElement(je,{icon:"top",viewBox:"6 0 12 24"}))}));Ve.displayName="TopNav",Ve.propTypes={disabled:pe.bool.isRequired,onClick:pe.func.isRequired};const Ke=Ve;var Xe=s.default.memo((function(e){var t=e.disabled,n=e.onClick;return s.default.createElement("button",{type:"button",className:"image-gallery-icon image-gallery-bottom-nav",disabled:t,onClick:n,"aria-label":"Next Slide"},s.default.createElement(je,{icon:"bottom",viewBox:"6 0 12 24"}))}));Xe.displayName="BottomNav",Xe.propTypes={disabled:pe.bool.isRequired,onClick:pe.func.isRequired};const Ye=Xe;function $e(e){return $e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$e(e)}function Je(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Qe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Je(Object(n),!0).forEach((function(t){it(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Je(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ze(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,rt(i.key),i)}}function et(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(et=function(){return!!e})()}function tt(e){return tt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},tt(e)}function nt(e,t){return nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},nt(e,t)}function it(e,t,n){return(t=rt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rt(e){var t=function(e){if("object"!=$e(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=$e(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==$e(t)?t:t+""}var at=["fullscreenchange","MSFullscreenChange","mozfullscreenchange","webkitfullscreenchange"],ot=(0,pe.arrayOf)((0,pe.shape)({srcSet:pe.string,media:pe.string}));function st(e){var t=parseInt(e.keyCode||e.which||0,10);return 66===t||62===t}var lt=function(){function e(t){var n,i,r,a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),it((i=this,a=[t],r=tt(r=e),n=function(e,t){if(t&&("object"==$e(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(i,et()?Reflect.construct(r,a||[],tt(i).constructor):r.apply(i,a))),"onBulletClick",(function(e,t){var i=n.props,r=i.onBulletClick,a=i.items,o=n.state.currentIndex;e.target.blur(),o!==t&&(2===a.length?n.slideToIndexWithStyleReset(t,e):n.slideToIndex(t,e)),r&&r(e,t)})),n.state={currentIndex:t.startIndex,thumbsTranslate:0,thumbsSwipedTranslate:0,currentSlideOffset:0,galleryWidth:0,galleryHeight:0,thumbnailsWrapperWidth:0,thumbnailsWrapperHeight:0,thumbsStyle:{transition:"all ".concat(t.slideDuration,"ms ease-out")},isFullscreen:!1,isSwipingThumbnail:!1,isPlaying:!1},n.loadedImages={},n.imageGallery=s.default.createRef(),n.thumbnailsWrapper=s.default.createRef(),n.thumbnails=s.default.createRef(),n.imageGallerySlideWrapper=s.default.createRef(),n.handleImageLoaded=n.handleImageLoaded.bind(n),n.handleKeyDown=n.handleKeyDown.bind(n),n.handleMouseDown=n.handleMouseDown.bind(n),n.handleResize=n.handleResize.bind(n),n.handleOnSwiped=n.handleOnSwiped.bind(n),n.handleScreenChange=n.handleScreenChange.bind(n),n.handleSwiping=n.handleSwiping.bind(n),n.handleThumbnailSwiping=n.handleThumbnailSwiping.bind(n),n.handleOnThumbnailSwiped=n.handleOnThumbnailSwiped.bind(n),n.onThumbnailMouseLeave=n.onThumbnailMouseLeave.bind(n),n.handleImageError=n.handleImageError.bind(n),n.pauseOrPlay=n.pauseOrPlay.bind(n),n.renderThumbInner=n.renderThumbInner.bind(n),n.renderItem=n.renderItem.bind(n),n.slideLeft=n.slideLeft.bind(n),n.slideRight=n.slideRight.bind(n),n.toggleFullScreen=n.toggleFullScreen.bind(n),n.togglePlay=n.togglePlay.bind(n),n.unthrottledSlideToIndex=n.slideToIndex,n.slideToIndex=D(n.unthrottledSlideToIndex,t.slideDuration,{trailing:!1}),t.lazyLoad&&(n.lazyLoaded=[]),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nt(e,t)}(e,s.default.Component),function(e,t){return t&&Ze(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(e,[{key:"componentDidMount",value:function(){var e=this.props,t=e.autoPlay,n=e.useWindowKeyDown;t&&this.play(),n?window.addEventListener("keydown",this.handleKeyDown):this.imageGallery.current.addEventListener("keydown",this.handleKeyDown),window.addEventListener("mousedown",this.handleMouseDown),this.initSlideWrapperResizeObserver(this.imageGallerySlideWrapper),this.initThumbnailWrapperResizeObserver(this.thumbnailsWrapper),this.addScreenChangeEvent()}},{key:"componentDidUpdate",value:function(e,t){var n=this.props,i=n.items,r=n.lazyLoad,a=n.slideDuration,o=n.slideInterval,s=n.startIndex,l=n.thumbnailPosition,u=n.showThumbnails,c=n.useWindowKeyDown,h=this.state,d=h.currentIndex,f=h.isPlaying,p=e.items.length!==i.length,m=!W()(e.items,i),b=e.startIndex!==s,g=e.thumbnailPosition!==l,v=e.showThumbnails!==u;o===e.slideInterval&&a===e.slideDuration||f&&(this.pause(),this.play()),g&&(this.removeResizeObserver(),this.initSlideWrapperResizeObserver(this.imageGallerySlideWrapper),this.initThumbnailWrapperResizeObserver(this.thumbnailsWrapper)),v&&u&&this.initThumbnailWrapperResizeObserver(this.thumbnailsWrapper),v&&!u&&this.removeThumbnailsResizeObserver(),(p||v)&&this.handleResize(),t.currentIndex!==d&&this.slideThumbnailBar(),e.slideDuration!==a&&(this.slideToIndex=D(this.unthrottledSlideToIndex,a,{trailing:!1})),!r||e.lazyLoad&&!m||(this.lazyLoaded=[]),c!==e.useWindowKeyDown&&(c?(this.imageGallery.current.removeEventListener("keydown",this.handleKeyDown),window.addEventListener("keydown",this.handleKeyDown)):(window.removeEventListener("keydown",this.handleKeyDown),this.imageGallery.current.addEventListener("keydown",this.handleKeyDown))),(b||m)&&this.setState({currentIndex:s,slideStyle:{transition:"none"}})}},{key:"componentWillUnmount",value:function(){var e=this.props.useWindowKeyDown;window.removeEventListener("mousedown",this.handleMouseDown),this.removeScreenChangeEvent(),this.removeResizeObserver(),this.playPauseIntervalId&&(window.clearInterval(this.playPauseIntervalId),this.playPauseIntervalId=null),this.transitionTimer&&window.clearTimeout(this.transitionTimer),e?window.removeEventListener("keydown",this.handleKeyDown):this.imageGallery.current.removeEventListener("keydown",this.handleKeyDown)}},{key:"onSliding",value:function(){var e=this,t=this.state,n=t.currentIndex,i=t.isTransitioning,r=this.props,a=r.onSlide,o=r.slideDuration;this.transitionTimer=window.setTimeout((function(){i&&(e.setState({isTransitioning:!i,isSwipingThumbnail:!1}),a&&a(n))}),o+50)}},{key:"onThumbnailClick",value:function(e,t){var n=this.props,i=n.onThumbnailClick,r=n.items,a=this.state.currentIndex;e.target.parentNode.parentNode.blur(),a!==t&&(2===r.length?this.slideToIndexWithStyleReset(t,e):this.slideToIndex(t,e)),i&&i(e,t)}},{key:"onThumbnailMouseOver",value:function(e,t){var n=this;this.thumbnailMouseOverTimer&&(window.clearTimeout(this.thumbnailMouseOverTimer),this.thumbnailMouseOverTimer=null),this.thumbnailMouseOverTimer=window.setTimeout((function(){n.slideToIndex(t),n.pause()}),300)}},{key:"onThumbnailMouseLeave",value:function(){if(this.thumbnailMouseOverTimer){var e=this.props.autoPlay;window.clearTimeout(this.thumbnailMouseOverTimer),this.thumbnailMouseOverTimer=null,e&&this.play()}}},{key:"setThumbsTranslate",value:function(e){this.setState({thumbsTranslate:e})}},{key:"setModalFullscreen",value:function(e){var t=this.props.onScreenChange;this.setState({modalFullscreen:e}),t&&t(e)}},{key:"getThumbsTranslate",value:function(e){var t,n=this.props,i=n.disableThumbnailScroll,r=n.items,a=this.state,o=a.thumbnailsWrapperWidth,s=a.thumbnailsWrapperHeight,l=this.thumbnails&&this.thumbnails.current;if(i)return 0;if(l){if(this.isThumbnailVertical()){if(l.scrollHeight<=s)return 0;t=l.scrollHeight-s}else{if(l.scrollWidth<=o||o<=0)return 0;t=l.scrollWidth-o}return e*(t/(r.length-1))}return 0}},{key:"getThumbnailPositionClassName",value:function(e){switch(e){case"left":e=" ".concat("image-gallery-thumbnails-left");break;case"right":e=" ".concat("image-gallery-thumbnails-right");break;case"bottom":e=" ".concat("image-gallery-thumbnails-bottom");break;case"top":e=" ".concat("image-gallery-thumbnails-top")}return e}},{key:"getAlignmentClassName",value:function(e){var t=this.state.currentIndex,n=this.props,i=n.infinite,r=n.items,a="",o="image-gallery-left",s="image-gallery-right";switch(e){case t-1:a=" ".concat(o);break;case t:a=" ".concat("image-gallery-center");break;case t+1:a=" ".concat(s)}return r.length>=3&&i&&(0===e&&t===r.length-1?a=" ".concat(s):e===r.length-1&&0===t&&(a=" ".concat(o))),a}},{key:"getTranslateXForTwoSlide",value:function(e){var t=this.state,n=t.currentIndex,i=t.currentSlideOffset,r=t.previousIndex,a=n!==r,o=0===e&&0===r,s=1===e&&1===r,l=0===e&&1===n,u=1===e&&0===n,c=0===i,h=-100*n+100*e+i;return i>0?this.direction="left":i<0&&(this.direction="right"),u&&i>0&&(h=-100+i),l&&i<0&&(h=100+i),a?o&&c&&"left"===this.direction?h=100:s&&c&&"right"===this.direction&&(h=-100):(u&&c&&"left"===this.direction&&(h=-100),l&&c&&"right"===this.direction&&(h=100)),h}},{key:"getThumbnailBarHeight",value:function(){return this.isThumbnailVertical()?{height:this.state.gallerySlideWrapperHeight}:{}}},{key:"getSlideStyle",value:function(e){var t=this.state,n=t.currentIndex,i=t.currentSlideOffset,r=t.slideStyle,a=this.props,o=a.infinite,s=a.items,l=a.useTranslate3D,u=a.isRTL,c=a.slideVertically,h=-100*n,d=s.length-1,f=(h+100*e)*(u?-1:1)+i;o&&s.length>2&&(0===n&&e===d?f=-100*(u?-1:1)+i:n===d&&0===e&&(f=100*(u?-1:1)+i)),o&&2===s.length&&(f=this.getTranslateXForTwoSlide(e));var p=c?"translate(0, ".concat(f,"%)"):"translate(".concat(f,"%, 0)");return l&&(p=c?"translate3d(0, ".concat(f,"%, 0)"):"translate3d(".concat(f,"%, 0, 0)")),Qe({display:this.isSlideVisible(e)?"inherit":"none",WebkitTransform:p,MozTransform:p,msTransform:p,OTransform:p,transform:p},r)}},{key:"getCurrentIndex",value:function(){return this.state.currentIndex}},{key:"getThumbnailStyle",value:function(){var e,t=this.props,n=t.useTranslate3D,i=t.isRTL,r=this.state,a=r.thumbsTranslate,o=r.thumbsStyle,s=i?-1*a:a;return this.isThumbnailVertical()?(e="translate(0, ".concat(a,"px)"),n&&(e="translate3d(0, ".concat(a,"px, 0)"))):(e="translate(".concat(s,"px, 0)"),n&&(e="translate3d(".concat(s,"px, 0, 0)"))),Qe({WebkitTransform:e,MozTransform:e,msTransform:e,OTransform:e,transform:e},o)}},{key:"getSlideItems",value:function(){var e=this,t=this.state.currentIndex,n=this.props,i=n.items,r=n.slideOnThumbnailOver,a=n.onClick,l=n.lazyLoad,u=n.onTouchMove,c=n.onTouchEnd,h=n.onTouchStart,d=n.onMouseOver,f=n.onMouseLeave,p=n.renderItem,m=n.renderThumbInner,b=n.showThumbnails,g=n.showBullets,v=[],y=[],w=[];return i.forEach((function(n,i){var S=e.getAlignmentClassName(i),T=n.originalClass?" ".concat(n.originalClass):"",O=n.thumbnailClass?" ".concat(n.thumbnailClass):"",E=n.renderItem||p||e.renderItem,k=n.renderThumbInner||m||e.renderThumbInner,I=!l||S||e.lazyLoaded[i];I&&l&&!e.lazyLoaded[i]&&(e.lazyLoaded[i]=!0);var x=e.getSlideStyle(i),P=s.default.createElement("div",{"aria-label":"Go to Slide ".concat(i+1),key:"slide-".concat(i),tabIndex:"-1",className:"image-gallery-slide ".concat(S," ").concat(T),style:x,onClick:a,onKeyUp:e.handleSlideKeyUp,onTouchMove:u,onTouchEnd:c,onTouchStart:h,onMouseOver:d,onFocus:d,onMouseLeave:f,role:"button"},I?E(n):s.default.createElement("div",{style:{height:"100%"}}));if(v.push(P),b&&n.thumbnail){var j=o("image-gallery-thumbnail",O,{active:t===i});y.push(s.default.createElement("button",{key:"thumbnail-".concat(i),type:"button",tabIndex:"0","aria-pressed":t===i?"true":"false","aria-label":"Go to Slide ".concat(i+1),className:j,onMouseLeave:r?e.onThumbnailMouseLeave:null,onMouseOver:function(t){return e.handleThumbnailMouseOver(t,i)},onFocus:function(t){return e.handleThumbnailMouseOver(t,i)},onKeyUp:function(t){return e.handleThumbnailKeyUp(t,i)},onClick:function(t){return e.onThumbnailClick(t,i)}},k(n)))}if(g){var _=o("image-gallery-bullet",n.bulletClass,{active:t===i});w.push(s.default.createElement("button",{type:"button",key:"bullet-".concat(i),className:_,onClick:function(t){return e.onBulletClick(t,i)},"aria-pressed":t===i?"true":"false","aria-label":"Go to Slide ".concat(i+1)}))}})),{slides:v,thumbnails:y,bullets:w}}},{key:"ignoreIsTransitioning",value:function(){var e=this.props.items,t=this.state,n=t.previousIndex,i=t.currentIndex,r=e.length-1;return Math.abs(n-i)>1&&!(0===n&&i===r)&&!(n===r&&0===i)}},{key:"isFirstOrLastSlide",value:function(e){return e===this.props.items.length-1||0===e}},{key:"slideIsTransitioning",value:function(e){var t=this.state,n=t.isTransitioning,i=t.previousIndex,r=t.currentIndex;return n&&!(e===i||e===r)}},{key:"isSlideVisible",value:function(e){return!this.slideIsTransitioning(e)||this.ignoreIsTransitioning()&&!this.isFirstOrLastSlide(e)}},{key:"slideThumbnailBar",value:function(){var e=this.state,t=e.currentIndex,n=e.isSwipingThumbnail,i=-this.getThumbsTranslate(t);n||(0===t?this.setState({thumbsTranslate:0,thumbsSwipedTranslate:0}):this.setState({thumbsTranslate:i,thumbsSwipedTranslate:i}))}},{key:"canSlide",value:function(){return this.props.items.length>=2}},{key:"canSlideLeft",value:function(){var e=this.props,t=e.infinite,n=e.isRTL;return t||(n?this.canSlideNext():this.canSlidePrevious())}},{key:"canSlideRight",value:function(){var e=this.props,t=e.infinite,n=e.isRTL;return t||(n?this.canSlidePrevious():this.canSlideNext())}},{key:"canSlidePrevious",value:function(){return this.state.currentIndex>0}},{key:"canSlideNext",value:function(){return this.state.currentIndex<this.props.items.length-1}},{key:"handleSwiping",value:function(e){var t=e.event,n=e.absX,i=e.absY,r=e.dir,a=this.props,o=a.disableSwipe,s=a.stopPropagation,l=a.swipingTransitionDuration,u=this.state,c=u.galleryWidth,h=u.galleryHeight,d=u.isTransitioning,f=u.swipingUpDown,p=u.swipingLeftRight,m=this.props.slideVertically;if((r!==oe&&r!==se&&!f||p||(f||this.setState({swipingUpDown:!0}),m))&&(r!==re&&r!==ae||p||this.setState({swipingLeftRight:!0}),!o))if(s&&t.preventDefault(),d)this.setState({currentSlideOffset:0});else{if((r===re||r===ae)&&m)return;if((r===oe||r===se)&&!m)return;var b=it(it(it(it({},re,-1),ae,1),oe,-1),se,1)[r],g=n/c*100;m&&(g=i/h*100),Math.abs(g)>=100&&(g=100);var v={transition:"transform ".concat(l,"ms ease-out")};this.setState({currentSlideOffset:b*g,slideStyle:v})}}},{key:"handleThumbnailSwiping",value:function(e){var t=e.event,n=e.absX,i=e.absY,r=e.dir,a=this.props,o=a.stopPropagation,s=a.swipingThumbnailTransitionDuration,l=this.state,u=l.thumbsSwipedTranslate,c=l.thumbnailsWrapperHeight,h=l.thumbnailsWrapperWidth,d=l.swipingUpDown,f=l.swipingLeftRight;if(this.isThumbnailVertical()){if((r===re||r===ae||f)&&!d)return void(f||this.setState({swipingLeftRight:!0}));r!==oe&&r!==se||d||this.setState({swipingUpDown:!0})}else{if((r===oe||r===se||d)&&!f)return void(d||this.setState({swipingUpDown:!0}));r!==re&&r!==ae||f||this.setState({swipingLeftRight:!0})}var p,m,b,g,v,y=this.thumbnails&&this.thumbnails.current;if(this.isThumbnailVertical()?(p=u+(r===se?i:-i),m=y.scrollHeight-c+20,b=Math.abs(p)>m,g=p>20,v=y.scrollHeight<=c):(p=u+(r===ae?n:-n),m=y.scrollWidth-h+20,b=Math.abs(p)>m,g=p>20,v=y.scrollWidth<=h),!v&&(r!==re&&r!==oe||!b)&&(r!==ae&&r!==se||!g)){o&&t.stopPropagation();var w={transition:"transform ".concat(s,"ms ease-out")};this.setState({thumbsTranslate:p,thumbsStyle:w})}}},{key:"handleOnThumbnailSwiped",value:function(){var e=this.state.thumbsTranslate,t=this.props.slideDuration;this.resetSwipingDirection(),this.setState({isSwipingThumbnail:!0,thumbsSwipedTranslate:e,thumbsStyle:{transition:"all ".concat(t,"ms ease-out")}})}},{key:"sufficientSwipe",value:function(){var e=this.state.currentSlideOffset,t=this.props.swipeThreshold;return Math.abs(e)>t}},{key:"resetSwipingDirection",value:function(){var e=this.state,t=e.swipingUpDown,n=e.swipingLeftRight;t&&this.setState({swipingUpDown:!1}),n&&this.setState({swipingLeftRight:!1})}},{key:"handleOnSwiped",value:function(e){var t=e.event,n=e.dir,i=e.velocity,r=this.props,a=r.disableSwipe,o=r.stopPropagation,s=r.flickThreshold,l=this.props.slideVertically;if(!a){var u=this.props.isRTL;o&&t.stopPropagation(),this.resetSwipingDirection();var c=(n===re?1:-1)*(u?-1:1);l&&(c=n===oe?1:-1);var h=l?i>s&&!(n===re||n===ae):i>s&&!(n===oe||n===se);this.handleOnSwipedTo(c,h)}}},{key:"handleOnSwipedTo",value:function(e,t){var n=this.state,i=n.currentIndex,r=n.isTransitioning,a=i;!this.sufficientSwipe()&&!t||r||(a+=e),(-1===e&&!this.canSlideLeft()||1===e&&!this.canSlideRight())&&(a=i),this.unthrottledSlideToIndex(a)}},{key:"handleMouseDown",value:function(){this.imageGallery.current.classList.add("image-gallery-using-mouse")}},{key:"handleKeyDown",value:function(e){var t=this.props,n=t.disableKeyDown,i=t.useBrowserFullscreen,r=this.state.isFullscreen;if(this.imageGallery.current.classList.remove("image-gallery-using-mouse"),!n)switch(parseInt(e.keyCode||e.which||0,10)){case 37:this.canSlideLeft()&&!this.playPauseIntervalId&&this.slideLeft(e);break;case 39:this.canSlideRight()&&!this.playPauseIntervalId&&this.slideRight(e);break;case 27:r&&!i&&this.exitFullScreen()}}},{key:"handleImageError",value:function(e){var t=this.props.onErrorImageURL;t&&-1===e.target.src.indexOf(t)&&(e.target.src=t)}},{key:"removeThumbnailsResizeObserver",value:function(){this.resizeThumbnailWrapperObserver&&this.thumbnailsWrapper&&this.thumbnailsWrapper.current&&(this.resizeThumbnailWrapperObserver.unobserve(this.thumbnailsWrapper.current),this.resizeThumbnailWrapperObserver=null)}},{key:"removeResizeObserver",value:function(){this.resizeSlideWrapperObserver&&this.imageGallerySlideWrapper&&this.imageGallerySlideWrapper.current&&(this.resizeSlideWrapperObserver.unobserve(this.imageGallerySlideWrapper.current),this.resizeSlideWrapperObserver=null),this.removeThumbnailsResizeObserver()}},{key:"handleResize",value:function(){var e=this.state.currentIndex;this.imageGallery&&(this.imageGallery&&this.imageGallery.current&&this.setState({galleryWidth:this.imageGallery.current.offsetWidth,galleryHeight:this.imageGallery.current.offsetHeight}),this.imageGallerySlideWrapper&&this.imageGallerySlideWrapper.current&&this.setState({gallerySlideWrapperHeight:this.imageGallerySlideWrapper.current.offsetHeight}),this.setThumbsTranslate(-this.getThumbsTranslate(e)))}},{key:"initSlideWrapperResizeObserver",value:function(e){var t=this;e&&!e.current||(this.resizeSlideWrapperObserver=new ie(M((function(e){e&&e.forEach((function(e){t.setState({thumbnailsWrapperWidth:e.contentRect.width},t.handleResize)}))}),50)),this.resizeSlideWrapperObserver.observe(e.current))}},{key:"initThumbnailWrapperResizeObserver",value:function(e){var t=this;e&&!e.current||(this.resizeThumbnailWrapperObserver=new ie(M((function(e){e&&e.forEach((function(e){t.setState({thumbnailsWrapperHeight:e.contentRect.height},t.handleResize)}))}),50)),this.resizeThumbnailWrapperObserver.observe(e.current))}},{key:"toggleFullScreen",value:function(){this.state.isFullscreen?this.exitFullScreen():this.fullScreen()}},{key:"togglePlay",value:function(){this.playPauseIntervalId?this.pause():this.play()}},{key:"handleScreenChange",value:function(){var e=this.props,t=e.onScreenChange,n=e.useBrowserFullscreen,i=document.fullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement,r=this.imageGallery.current===i;t&&t(r),n&&this.setState({isFullscreen:r})}},{key:"slideToIndex",value:function(e,t){var n=this.state,i=n.currentIndex,r=n.isTransitioning,a=this.props,o=a.items,s=a.slideDuration,l=a.onBeforeSlide;if(!r){t&&this.playPauseIntervalId&&(this.pause(!1),this.play(!1));var u=o.length-1,c=e;e<0?c=u:e>u&&(c=0),l&&c!==i&&l(c),this.setState({previousIndex:i,currentIndex:c,isTransitioning:c!==i,currentSlideOffset:0,slideStyle:{transition:"all ".concat(s,"ms ease-out")}},this.onSliding)}}},{key:"slideLeft",value:function(e){var t=this.props.isRTL;this.slideTo(e,t?"right":"left")}},{key:"slideRight",value:function(e){var t=this.props.isRTL;this.slideTo(e,t?"left":"right")}},{key:"slideTo",value:function(e,t){var n=this.state,i=n.currentIndex,r=n.isTransitioning,a=this.props.items,o=i+("left"===t?-1:1);r||(2===a.length?this.slideToIndexWithStyleReset(o,e):this.slideToIndex(o,e))}},{key:"slideToIndexWithStyleReset",value:function(e,t){var n=this,i=this.state,r=i.currentIndex,a=i.currentSlideOffset;this.setState({currentSlideOffset:a+(r>e?.001:-.001),slideStyle:{transition:"none"}},(function(){window.setTimeout((function(){return n.slideToIndex(e,t)}),25)}))}},{key:"handleThumbnailMouseOver",value:function(e,t){this.props.slideOnThumbnailOver&&this.onThumbnailMouseOver(e,t)}},{key:"handleThumbnailKeyUp",value:function(e,t){st(e)&&this.onThumbnailClick(e,t)}},{key:"handleSlideKeyUp",value:function(e){st(e)&&(0,this.props.onClick)(e)}},{key:"isThumbnailVertical",value:function(){var e=this.props.thumbnailPosition;return"left"===e||"right"===e}},{key:"addScreenChangeEvent",value:function(){var e=this;at.forEach((function(t){document.addEventListener(t,e.handleScreenChange)}))}},{key:"removeScreenChangeEvent",value:function(){var e=this;at.forEach((function(t){document.removeEventListener(t,e.handleScreenChange)}))}},{key:"fullScreen",value:function(){var e=this.props.useBrowserFullscreen,t=this.imageGallery.current;e?t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():this.setModalFullscreen(!0):this.setModalFullscreen(!0),this.setState({isFullscreen:!0})}},{key:"exitFullScreen",value:function(){var e=this.state.isFullscreen,t=this.props.useBrowserFullscreen;e&&(t?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():this.setModalFullscreen(!1):this.setModalFullscreen(!1),this.setState({isFullscreen:!1}))}},{key:"pauseOrPlay",value:function(){var e=this.props.infinite,t=this.state.currentIndex;e||this.canSlideRight()?this.slideToIndex(t+1):this.pause()}},{key:"play",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.props,n=t.onPlay,i=t.slideInterval,r=t.slideDuration,a=this.state.currentIndex;this.playPauseIntervalId||(this.setState({isPlaying:!0}),this.playPauseIntervalId=window.setInterval(this.pauseOrPlay,Math.max(i,r)),n&&e&&n(a))}},{key:"pause",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.props.onPause,n=this.state.currentIndex;this.playPauseIntervalId&&(window.clearInterval(this.playPauseIntervalId),this.playPauseIntervalId=null,this.setState({isPlaying:!1}),t&&e&&t(n))}},{key:"isImageLoaded",value:function(e){return!!this.loadedImages[e.original]||(this.loadedImages[e.original]=!0,!1)}},{key:"handleImageLoaded",value:function(e,t){var n=this.props.onImageLoad;!this.loadedImages[t]&&n&&(this.loadedImages[t]=!0,n(e))}},{key:"renderItem",value:function(e){var t=this.state.isFullscreen,n=this.props.onImageError||this.handleImageError;return s.default.createElement(Se,{description:e.description,fullscreen:e.fullscreen,handleImageLoaded:this.handleImageLoaded,isFullscreen:t,onImageError:n,original:e.original,originalAlt:e.originalAlt,originalHeight:e.originalHeight,originalWidth:e.originalWidth,originalTitle:e.originalTitle,sizes:e.sizes,loading:e.loading,srcSet:e.srcSet})}},{key:"renderThumbInner",value:function(e){var t=this.props.onThumbnailError||this.handleImageError;return s.default.createElement("span",{className:"image-gallery-thumbnail-inner"},s.default.createElement("img",{className:"image-gallery-thumbnail-image",src:e.thumbnail,height:e.thumbnailHeight,width:e.thumbnailWidth,alt:e.thumbnailAlt,title:e.thumbnailTitle,loading:e.thumbnailLoading,onError:t}),e.thumbnailLabel&&s.default.createElement("div",{className:"image-gallery-thumbnail-label"},e.thumbnailLabel))}},{key:"render",value:function(){var e=this.state,t=e.currentIndex,n=e.isFullscreen,i=e.modalFullscreen,r=e.isPlaying,a=this.props,l=a.additionalClass,u=a.disableThumbnailSwipe,c=a.indexSeparator,h=a.isRTL,d=a.items,f=a.thumbnailPosition,p=a.renderFullscreenButton,m=a.renderCustomControls,b=a.renderLeftNav,g=a.renderRightNav,v=a.renderTopNav,y=a.renderBottomNav,w=a.showBullets,S=a.showFullscreenButton,T=a.showIndex,O=a.showThumbnails,E=a.showNav,k=a.showPlayButton,I=a.slideVertically,x=a.renderPlayPauseButton,P=this.getThumbnailStyle(),j=this.getSlideItems(),_=j.slides,R=j.thumbnails,L=j.bullets,M=o("image-gallery-slide-wrapper",this.getThumbnailPositionClassName(f),{"image-gallery-rtl":h}),D=o("image-gallery-bullets",{"image-gallery-bullets-vertical":I}),C=s.default.createElement("div",{ref:this.imageGallerySlideWrapper,className:M},m&&m(),this.canSlide()?s.default.createElement(s.default.Fragment,null,E&&s.default.createElement(s.default.Fragment,null,I?v(this.slideLeft,!this.canSlideLeft()):b(this.slideLeft,!this.canSlideLeft()),I?y(this.slideRight,!this.canSlideRight()):g(this.slideRight,!this.canSlideRight())),s.default.createElement(He,{className:"image-gallery-swipe",delta:0,onSwiping:this.handleSwiping,onSwiped:this.handleOnSwiped},s.default.createElement("div",{className:"image-gallery-slides"},_))):s.default.createElement("div",{className:"image-gallery-slides"},_),k&&x(this.togglePlay,r),w&&s.default.createElement("div",{className:D},s.default.createElement("div",{className:"image-gallery-bullets-container",role:"navigation","aria-label":"Bullet Navigation"},L)),S&&p(this.toggleFullScreen,n),T&&s.default.createElement("div",{className:"image-gallery-index"},s.default.createElement("span",{className:"image-gallery-index-current"},t+1),s.default.createElement("span",{className:"image-gallery-index-separator"},c),s.default.createElement("span",{className:"image-gallery-index-total"},d.length))),W=o("image-gallery",l,{"fullscreen-modal":i}),N=o("image-gallery-content",this.getThumbnailPositionClassName(f),{fullscreen:n}),F=o("image-gallery-thumbnails-wrapper",this.getThumbnailPositionClassName(f),{"thumbnails-wrapper-rtl":!this.isThumbnailVertical()&&h},{"thumbnails-swipe-horizontal":!this.isThumbnailVertical()&&!u},{"thumbnails-swipe-vertical":this.isThumbnailVertical()&&!u});return s.default.createElement("div",{ref:this.imageGallery,className:W,"aria-live":"polite"},s.default.createElement("div",{className:N},("bottom"===f||"right"===f)&&C,O&&R.length>0?s.default.createElement(He,{className:F,delta:0,onSwiping:!u&&this.handleThumbnailSwiping,onSwiped:!u&&this.handleOnThumbnailSwiped},s.default.createElement("div",{className:"image-gallery-thumbnails",ref:this.thumbnailsWrapper,style:this.getThumbnailBarHeight()},s.default.createElement("nav",{ref:this.thumbnails,className:"image-gallery-thumbnails-container",style:P,"aria-label":"Thumbnail Navigation"},R))):null,("top"===f||"left"===f)&&C))}}])}();lt.propTypes={flickThreshold:pe.number,items:(0,pe.arrayOf)((0,pe.shape)({bulletClass:pe.string,bulletOnClick:pe.func,description:pe.string,original:pe.string,originalHeight:pe.number,originalWidth:pe.number,loading:pe.string,thumbnailHeight:pe.number,thumbnailWidth:pe.number,thumbnailLoading:pe.string,fullscreen:pe.string,originalAlt:pe.string,originalTitle:pe.string,thumbnail:pe.string,thumbnailAlt:pe.string,thumbnailLabel:pe.string,thumbnailTitle:pe.string,originalClass:pe.string,thumbnailClass:pe.string,renderItem:pe.func,renderThumbInner:pe.func,imageSet:ot,srcSet:pe.string,sizes:pe.string})).isRequired,showNav:pe.bool,autoPlay:pe.bool,lazyLoad:pe.bool,infinite:pe.bool,showIndex:pe.bool,showBullets:pe.bool,showThumbnails:pe.bool,showPlayButton:pe.bool,showFullscreenButton:pe.bool,disableThumbnailScroll:pe.bool,disableKeyDown:pe.bool,disableSwipe:pe.bool,disableThumbnailSwipe:pe.bool,useBrowserFullscreen:pe.bool,onErrorImageURL:pe.string,indexSeparator:pe.string,thumbnailPosition:(0,pe.oneOf)(["top","bottom","left","right"]),startIndex:pe.number,slideDuration:pe.number,slideInterval:pe.number,slideOnThumbnailOver:pe.bool,swipeThreshold:pe.number,swipingTransitionDuration:pe.number,swipingThumbnailTransitionDuration:pe.number,onSlide:pe.func,onBeforeSlide:pe.func,onScreenChange:pe.func,onPause:pe.func,onPlay:pe.func,onClick:pe.func,onImageLoad:pe.func,onImageError:pe.func,onTouchMove:pe.func,onTouchEnd:pe.func,onTouchStart:pe.func,onMouseOver:pe.func,onMouseLeave:pe.func,onBulletClick:pe.func,onThumbnailError:pe.func,onThumbnailClick:pe.func,renderCustomControls:pe.func,renderLeftNav:pe.func,renderRightNav:pe.func,renderTopNav:pe.func,renderBottomNav:pe.func,renderPlayPauseButton:pe.func,renderFullscreenButton:pe.func,renderItem:pe.func,renderThumbInner:pe.func,stopPropagation:pe.bool,additionalClass:pe.string,useTranslate3D:pe.bool,isRTL:pe.bool,useWindowKeyDown:pe.bool,slideVertically:pe.bool},lt.defaultProps={onErrorImageURL:"",additionalClass:"",showNav:!0,autoPlay:!1,lazyLoad:!1,infinite:!0,showIndex:!1,showBullets:!1,showThumbnails:!0,showPlayButton:!0,showFullscreenButton:!0,disableThumbnailScroll:!1,disableKeyDown:!1,disableSwipe:!1,disableThumbnailSwipe:!1,useTranslate3D:!0,isRTL:!1,useBrowserFullscreen:!0,flickThreshold:.4,stopPropagation:!1,indexSeparator:" / ",thumbnailPosition:"bottom",startIndex:0,slideDuration:450,swipingTransitionDuration:0,swipingThumbnailTransitionDuration:0,onSlide:null,onBeforeSlide:null,onScreenChange:null,onPause:null,onPlay:null,onClick:null,onImageLoad:null,onImageError:null,onTouchMove:null,onTouchEnd:null,onTouchStart:null,onMouseOver:null,onMouseLeave:null,onBulletClick:null,onThumbnailError:null,onThumbnailClick:null,renderCustomControls:null,renderThumbInner:null,renderItem:null,slideInterval:3e3,slideOnThumbnailOver:!1,swipeThreshold:30,slideVertically:!1,renderLeftNav:function(e,t){return s.default.createElement(Me,{onClick:e,disabled:t})},renderRightNav:function(e,t){return s.default.createElement(Ce,{onClick:e,disabled:t})},renderTopNav:function(e,t){return s.default.createElement(Ke,{onClick:e,disabled:t})},renderBottomNav:function(e,t){return s.default.createElement(Ye,{onClick:e,disabled:t})},renderPlayPauseButton:function(e,t){return s.default.createElement(Ne,{onClick:e,isPlaying:t})},renderFullscreenButton:function(e,t){return s.default.createElement(Re,{onClick:e,isFullscreen:t})},useWindowKeyDown:!0};const ut=lt;var ct=r.A;export{ct as default};
@@ -0,0 +1 @@
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.ImageGallery=t(require("react")):e.ImageGallery=t(e.React)}(this,(e=>(()=>{var t={694:(e,t,n)=>{"use strict";var i=n(925);function r(){}function a(){}a.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,a,o){if(o!==i){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:r};return n.PropTypes=n,n}},556:(e,t,n)=>{e.exports=n(694)()},925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},115:e=>{var t="undefined"!=typeof Element,n="function"==typeof Map,i="function"==typeof Set,r="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function a(e,o){if(e===o)return!0;if(e&&o&&"object"==typeof e&&"object"==typeof o){if(e.constructor!==o.constructor)return!1;var s,l,u,c;if(Array.isArray(e)){if((s=e.length)!=o.length)return!1;for(l=s;0!=l--;)if(!a(e[l],o[l]))return!1;return!0}if(n&&e instanceof Map&&o instanceof Map){if(e.size!==o.size)return!1;for(c=e.entries();!(l=c.next()).done;)if(!o.has(l.value[0]))return!1;for(c=e.entries();!(l=c.next()).done;)if(!a(l.value[1],o.get(l.value[0])))return!1;return!0}if(i&&e instanceof Set&&o instanceof Set){if(e.size!==o.size)return!1;for(c=e.entries();!(l=c.next()).done;)if(!o.has(l.value[0]))return!1;return!0}if(r&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(o)){if((s=e.length)!=o.length)return!1;for(l=s;0!=l--;)if(e[l]!==o[l])return!1;return!0}if(e.constructor===RegExp)return e.source===o.source&&e.flags===o.flags;if(e.valueOf!==Object.prototype.valueOf&&"function"==typeof e.valueOf&&"function"==typeof o.valueOf)return e.valueOf()===o.valueOf();if(e.toString!==Object.prototype.toString&&"function"==typeof e.toString&&"function"==typeof o.toString)return e.toString()===o.toString();if((s=(u=Object.keys(e)).length)!==Object.keys(o).length)return!1;for(l=s;0!=l--;)if(!Object.prototype.hasOwnProperty.call(o,u[l]))return!1;if(t&&e instanceof Element)return!1;for(l=s;0!=l--;)if(("_owner"!==u[l]&&"__v"!==u[l]&&"__o"!==u[l]||!e.$$typeof)&&!a(e[u[l]],o[u[l]]))return!1;return!0}return e!=e&&o!=o}e.exports=function(e,t){try{return a(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}},12:t=>{"use strict";t.exports=e}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,i),a.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{"use strict";function e(t){var n,i,r="";if("string"==typeof t||"number"==typeof t)r+=t;else if("object"==typeof t)if(Array.isArray(t)){var a=t.length;for(n=0;n<a;n++)t[n]&&(i=e(t[n]))&&(r&&(r+=" "),r+=i)}else for(i in t)t[i]&&(r&&(r+=" "),r+=i);return r}i.r(r),i.d(r,{default:()=>at});const t=function(){for(var t,n,i=0,r="",a=arguments.length;i<a;i++)(t=arguments[i])&&(n=e(t))&&(r&&(r+=" "),r+=n);return r};var n=i(12),a=i.n(n);const o=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},s="object"==typeof global&&global&&global.Object===Object&&global;var l="object"==typeof self&&self&&self.Object===Object&&self;const u=s||l||Function("return this")(),c=function(){return u.Date.now()};var h=/\s/;var d=/^\s+/;const p=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&h.test(e.charAt(t)););return t}(e)+1).replace(d,""):e},f=u.Symbol;var m=Object.prototype,b=m.hasOwnProperty,g=m.toString,v=f?f.toStringTag:void 0;var y=Object.prototype.toString;var w=f?f.toStringTag:void 0;const S=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":w&&w in Object(e)?function(e){var t=b.call(e,v),n=e[v];try{e[v]=void 0;var i=!0}catch(e){}var r=g.call(e);return i&&(t?e[v]=n:delete e[v]),r}(e):function(e){return y.call(e)}(e)};var T=/^[-+]0x[0-9a-f]+$/i,O=/^0b[01]+$/i,E=/^0o[0-7]+$/i,k=parseInt;const I=function(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return null!=e&&"object"==typeof e}(e)&&"[object Symbol]"==S(e)}(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=p(e);var n=O.test(e);return n||E.test(e)?k(e.slice(2),n?2:8):T.test(e)?NaN:+e};var x=Math.max,P=Math.min;const j=function(e,t,n){var i,r,a,s,l,u,h=0,d=!1,p=!1,f=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function m(t){var n=i,a=r;return i=r=void 0,h=t,s=e.apply(a,n)}function b(e){var n=e-u;return void 0===u||n>=t||n<0||p&&e-h>=a}function g(){var e=c();if(b(e))return v(e);l=setTimeout(g,function(e){var n=t-(e-u);return p?P(n,a-(e-h)):n}(e))}function v(e){return l=void 0,f&&i?m(e):(i=r=void 0,s)}function y(){var e=c(),n=b(e);if(i=arguments,r=this,u=e,n){if(void 0===l)return function(e){return h=e,l=setTimeout(g,t),d?m(e):s}(u);if(p)return clearTimeout(l),l=setTimeout(g,t),m(u)}return void 0===l&&(l=setTimeout(g,t)),s}return t=I(t)||0,o(n)&&(d=!!n.leading,a=(p="maxWait"in n)?x(I(n.maxWait)||0,t):a,f="trailing"in n?!!n.trailing:f),y.cancel=function(){void 0!==l&&clearTimeout(l),h=0,i=u=r=l=void 0},y.flush=function(){return void 0===l?s:v(c())},y},_=function(e,t,n){var i=!0,r=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return o(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),j(e,t,{leading:i,maxWait:t,trailing:r})};var R=i(115),L=i.n(R),M=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,i){return e[0]===t&&(n=i,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),i=this.__entries__[n];return i&&i[1]},t.prototype.set=function(t,n){var i=e(this.__entries__,t);~i?this.__entries__[i][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,i=e(n,t);~i&&n.splice(i,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,i=this.__entries__;n<i.length;n++){var r=i[n];e.call(t,r[1],r[0])}},t}()}(),D="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,C=void 0!==i.g&&i.g.Math===Math?i.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),W="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(C):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)},N=["top","right","bottom","left","width","height","size","weight"],F="undefined"!=typeof MutationObserver,z=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e){var t=!1,n=!1,i=0;function r(){t&&(t=!1,e()),n&&o()}function a(){W(r)}function o(){var e=Date.now();if(t){if(e-i<2)return;n=!0}else t=!0,n=!1,setTimeout(a,20);i=e}return o}(this.refresh.bind(this))}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){D&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),F?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){D&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;N.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),B=function(e,t){for(var n=0,i=Object.keys(t);n<i.length;n++){var r=i[n];Object.defineProperty(e,r,{value:t[r],enumerable:!1,writable:!1,configurable:!0})}return e},A=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||C},q=K(0,0,0,0);function G(e){return parseFloat(e)||0}function U(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+G(e["border-"+n+"-width"])}),0)}var H="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof A(e).SVGGraphicsElement}:function(e){return e instanceof A(e).SVGElement&&"function"==typeof e.getBBox};function V(e){return D?H(e)?function(e){var t=e.getBBox();return K(0,0,t.width,t.height)}(e):function(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return q;var i=A(e).getComputedStyle(e),r=function(e){for(var t={},n=0,i=["top","right","bottom","left"];n<i.length;n++){var r=i[n],a=e["padding-"+r];t[r]=G(a)}return t}(i),a=r.left+r.right,o=r.top+r.bottom,s=G(i.width),l=G(i.height);if("border-box"===i.boxSizing&&(Math.round(s+a)!==t&&(s-=U(i,"left","right")+a),Math.round(l+o)!==n&&(l-=U(i,"top","bottom")+o)),!function(e){return e===A(e).document.documentElement}(e)){var u=Math.round(s+a)-t,c=Math.round(l+o)-n;1!==Math.abs(u)&&(s-=u),1!==Math.abs(c)&&(l-=c)}return K(r.left,r.top,s,l)}(e):q}function K(e,t,n,i){return{x:e,y:t,width:n,height:i}}var X=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=K(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=V(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),Y=function(e,t){var n,i,r,a,o,s,l,u=(i=(n=t).x,r=n.y,a=n.width,o=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,l=Object.create(s.prototype),B(l,{x:i,y:r,width:a,height:o,top:r,right:i+a,bottom:o+r,left:i}),l);B(this,{target:e,contentRect:u})},$=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new M,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof A(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new X(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof A(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new Y(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),J="undefined"!=typeof WeakMap?new WeakMap:new M,Q=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=z.getInstance(),i=new $(t,n,this);J.set(this,i)};["observe","unobserve","disconnect"].forEach((function(e){Q.prototype[e]=function(){var t;return(t=J.get(this))[e].apply(t,arguments)}}));const Z=void 0!==C.ResizeObserver?C.ResizeObserver:Q,ee="Left",te="Right",ne="Up",ie="Down",re={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},ae={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},oe="mousemove",se="mouseup";function le(e,t){if(0===t)return e;const n=Math.PI/180*t;return[e[0]*Math.cos(n)+e[1]*Math.sin(n),e[1]*Math.cos(n)-e[0]*Math.sin(n)]}function ue(e){const{trackMouse:t}=e,i=n.useRef(Object.assign({},ae)),r=n.useRef(Object.assign({},re)),a=n.useRef(Object.assign({},r.current));let o;for(o in a.current=Object.assign({},r.current),r.current=Object.assign(Object.assign({},re),e),re)void 0===r.current[o]&&(r.current[o]=re[o]);const[s,l]=n.useMemo((()=>function(e,t){const n=t=>{const n="touches"in t;n&&t.touches.length>1||e(((e,r)=>{r.trackMouse&&!n&&(document.addEventListener(oe,i),document.addEventListener(se,a));const{clientX:o,clientY:s}=n?t.touches[0]:t,l=le([o,s],r.rotationAngle);return r.onTouchStartOrOnMouseDown&&r.onTouchStartOrOnMouseDown({event:t}),Object.assign(Object.assign(Object.assign({},e),ae),{initial:l.slice(),xy:l,start:t.timeStamp||0})}))},i=t=>{e(((e,n)=>{const i="touches"in t;if(i&&t.touches.length>1)return e;if(t.timeStamp-e.start>n.swipeDuration)return e.swiping?Object.assign(Object.assign({},e),{swiping:!1}):e;const{clientX:r,clientY:a}=i?t.touches[0]:t,[o,s]=le([r,a],n.rotationAngle),l=o-e.xy[0],u=s-e.xy[1],c=Math.abs(l),h=Math.abs(u),d=(t.timeStamp||0)-e.start,p=Math.sqrt(c*c+h*h)/(d||1),f=[l/(d||1),u/(d||1)],m=function(e,t,n,i){return e>t?n>0?te:ee:i>0?ie:ne}(c,h,l,u),b="number"==typeof n.delta?n.delta:n.delta[m.toLowerCase()]||re.delta;if(c<b&&h<b&&!e.swiping)return e;const g={absX:c,absY:h,deltaX:l,deltaY:u,dir:m,event:t,first:e.first,initial:e.initial,velocity:p,vxvy:f};g.first&&n.onSwipeStart&&n.onSwipeStart(g),n.onSwiping&&n.onSwiping(g);let v=!1;return(n.onSwiping||n.onSwiped||n[`onSwiped${m}`])&&(v=!0),v&&n.preventScrollOnSwipe&&n.trackTouch&&t.cancelable&&t.preventDefault(),Object.assign(Object.assign({},e),{first:!1,eventData:g,swiping:!0})}))},r=t=>{e(((e,n)=>{let i;if(e.swiping&&e.eventData){if(t.timeStamp-e.start<n.swipeDuration){i=Object.assign(Object.assign({},e.eventData),{event:t}),n.onSwiped&&n.onSwiped(i);const r=n[`onSwiped${i.dir}`];r&&r(i)}}else n.onTap&&n.onTap({event:t});return n.onTouchEndOrOnMouseUp&&n.onTouchEndOrOnMouseUp({event:t}),Object.assign(Object.assign(Object.assign({},e),ae),{eventData:i})}))},a=e=>{document.removeEventListener(oe,i),document.removeEventListener(se,a),r(e)},o=(e,t)=>{let a=()=>{};if(e&&e.addEventListener){const o=Object.assign(Object.assign({},re.touchEventOptions),t.touchEventOptions),s=[["touchstart",n,o],["touchmove",i,Object.assign(Object.assign({},o),t.preventScrollOnSwipe?{passive:!1}:{})],["touchend",r,o]];s.forEach((([t,n,i])=>e.addEventListener(t,n,i))),a=()=>s.forEach((([t,n])=>e.removeEventListener(t,n)))}return a},s={ref:t=>{null!==t&&e(((e,n)=>{if(e.el===t)return e;const i={};return e.el&&e.el!==t&&e.cleanUpTouch&&(e.cleanUpTouch(),i.cleanUpTouch=void 0),n.trackTouch&&t&&(i.cleanUpTouch=o(t,n)),Object.assign(Object.assign(Object.assign({},e),{el:t}),i)}))}};return t.trackMouse&&(s.onMouseDown=n),[s,o]}((e=>i.current=e(i.current,r.current)),{trackMouse:t})),[t]);return i.current=function(e,t,n,i){return t.trackTouch&&e.el?e.cleanUpTouch?t.preventScrollOnSwipe!==n.preventScrollOnSwipe||t.touchEventOptions.passive!==n.touchEventOptions.passive?(e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:i(e.el,t)})):e:Object.assign(Object.assign({},e),{cleanUpTouch:i(e.el,t)}):(e.cleanUpTouch&&e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:void 0}))}(i.current,r.current,a.current,l),s}var ce=i(556);function he(e){return he="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},he(e)}function de(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function pe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?de(Object(n),!0).forEach((function(t){fe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):de(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function fe(e,t,n){return(t=function(e){var t=function(e){if("object"!=he(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=he(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==he(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var me={description:"",fullscreen:"",isFullscreen:!1,originalAlt:"",originalHeight:"",originalWidth:"",originalTitle:"",sizes:"",srcSet:"",loading:"eager"},be=a().memo((function(e){var t=pe(pe({},me),e),n=t.description,i=t.fullscreen,r=t.handleImageLoaded,o=t.isFullscreen,s=t.onImageError,l=t.original,u=t.originalAlt,c=t.originalHeight,h=t.originalWidth,d=t.originalTitle,p=t.sizes,f=t.srcSet,m=t.loading,b=o&&i||l;return a().createElement(a().Fragment,null,a().createElement("img",{className:"image-gallery-image",src:b,alt:u,srcSet:f,height:c,width:h,sizes:p,title:d,onLoad:function(e){return r(e,l)},onError:s,loading:m}),n&&a().createElement("span",{className:"image-gallery-description"},n))}));be.displayName="Item",be.propTypes={description:ce.string,fullscreen:ce.string,handleImageLoaded:ce.func.isRequired,isFullscreen:ce.bool,onImageError:ce.func.isRequired,original:ce.string.isRequired,originalAlt:ce.string,originalHeight:ce.string,originalWidth:ce.string,originalTitle:ce.string,sizes:ce.string,srcSet:ce.string,loading:ce.string};const ge=be;function ve(e){return ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ve(e)}function ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function we(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ye(Object(n),!0).forEach((function(t){Se(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ye(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Se(e,t,n){return(t=function(e){var t=function(e){if("object"!=ve(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ve(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ve(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Te={left:a().createElement("polyline",{points:"15 18 9 12 15 6"}),right:a().createElement("polyline",{points:"9 18 15 12 9 6"}),top:a().createElement("polyline",{points:"6 15 12 9 18 15"}),bottom:a().createElement("polyline",{points:"6 9 12 15 18 9"}),maximize:a().createElement("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"}),minimize:a().createElement("path",{d:"M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"}),play:a().createElement("polygon",{points:"5 3 19 12 5 21 5 3"}),pause:a().createElement(a().Fragment,null,a().createElement("rect",{x:"6",y:"4",width:"4",height:"16"}),a().createElement("rect",{x:"14",y:"4",width:"4",height:"16"}))},Oe={strokeWidth:1,viewBox:"0 0 24 24"},Ee=function(e){var t=we(we({},Oe),e),n=t.strokeWidth,i=t.viewBox,r=t.icon;return a().createElement("svg",{className:"image-gallery-svg",xmlns:"http://www.w3.org/2000/svg",viewBox:i,fill:"none",stroke:"currentColor",strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round"},Te[r])};Ee.propTypes={strokeWidth:ce.number,viewBox:ce.string,icon:(0,ce.oneOf)(["left","right","top","bottom","maximize","minimize","play","pause"]).isRequired};const ke=Ee;var Ie=a().memo((function(e){var t=e.isFullscreen,n=e.onClick;return a().createElement("button",{type:"button",className:"image-gallery-icon image-gallery-fullscreen-button",onClick:n,"aria-label":"Open Fullscreen"},a().createElement(ke,{strokeWidth:2,icon:t?"minimize":"maximize"}))}));Ie.displayName="Fullscreen",Ie.propTypes={isFullscreen:ce.bool.isRequired,onClick:ce.func.isRequired};const xe=Ie;var Pe=a().memo((function(e){var t=e.disabled,n=e.onClick;return a().createElement("button",{type:"button",className:"image-gallery-icon image-gallery-left-nav",disabled:t,onClick:n,"aria-label":"Previous Slide"},a().createElement(ke,{icon:"left",viewBox:"6 0 12 24"}))}));Pe.displayName="LeftNav",Pe.propTypes={disabled:ce.bool.isRequired,onClick:ce.func.isRequired};const je=Pe;var _e=a().memo((function(e){var t=e.disabled,n=e.onClick;return a().createElement("button",{type:"button",className:"image-gallery-icon image-gallery-right-nav",disabled:t,onClick:n,"aria-label":"Next Slide"},a().createElement(ke,{icon:"right",viewBox:"6 0 12 24"}))}));_e.displayName="RightNav",_e.propTypes={disabled:ce.bool.isRequired,onClick:ce.func.isRequired};const Re=_e;var Le=a().memo((function(e){var t=e.isPlaying,n=e.onClick;return a().createElement("button",{type:"button",className:"image-gallery-icon image-gallery-play-button",onClick:n,"aria-label":"Play or Pause Slideshow"},a().createElement(ke,{strokeWidth:2,icon:t?"pause":"play"}))}));Le.displayName="PlayPause",Le.propTypes={isPlaying:ce.bool.isRequired,onClick:ce.func.isRequired};const Me=Le;function De(e){return De="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},De(e)}function Ce(){return Ce=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Ce.apply(null,arguments)}function We(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?We(Object(n),!0).forEach((function(t){Fe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):We(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Fe(e,t,n){return(t=function(e){var t=function(e){if("object"!=De(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=De(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==De(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ze={className:"",delta:0,onSwiping:function(){},onSwiped:function(){}},Be=function(e){var t=Ne(Ne({},ze),e),n=t.children,i=t.className,r=ue({delta:t.delta,onSwiping:t.onSwiping,onSwiped:t.onSwiped});return a().createElement("div",Ce({},r,{className:i}),n)};Be.propTypes={children:ce.node.isRequired,className:ce.string,delta:ce.number,onSwiped:ce.func,onSwiping:ce.func};const Ae=Be;var qe=a().memo((function(e){var t=e.disabled,n=e.onClick;return a().createElement("button",{type:"button",className:"image-gallery-icon image-gallery-top-nav",disabled:t,onClick:n,"aria-label":"Previous Slide"},a().createElement(ke,{icon:"top",viewBox:"6 0 12 24"}))}));qe.displayName="TopNav",qe.propTypes={disabled:ce.bool.isRequired,onClick:ce.func.isRequired};const Ge=qe;var Ue=a().memo((function(e){var t=e.disabled,n=e.onClick;return a().createElement("button",{type:"button",className:"image-gallery-icon image-gallery-bottom-nav",disabled:t,onClick:n,"aria-label":"Next Slide"},a().createElement(ke,{icon:"bottom",viewBox:"6 0 12 24"}))}));Ue.displayName="BottomNav",Ue.propTypes={disabled:ce.bool.isRequired,onClick:ce.func.isRequired};const He=Ue;function Ve(e){return Ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ve(e)}function Ke(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Xe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ke(Object(n),!0).forEach((function(t){Ze(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ye(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,et(i.key),i)}}function $e(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return($e=function(){return!!e})()}function Je(e){return Je=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Je(e)}function Qe(e,t){return Qe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Qe(e,t)}function Ze(e,t,n){return(t=et(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function et(e){var t=function(e){if("object"!=Ve(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ve(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ve(t)?t:t+""}var tt=["fullscreenchange","MSFullscreenChange","mozfullscreenchange","webkitfullscreenchange"],nt=(0,ce.arrayOf)((0,ce.shape)({srcSet:ce.string,media:ce.string}));function it(e){var t=parseInt(e.keyCode||e.which||0,10);return 66===t||62===t}var rt=function(e){function n(e){var t,i,r,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),Ze((i=this,o=[e],r=Je(r=n),t=function(e,t){if(t&&("object"==Ve(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(i,$e()?Reflect.construct(r,o||[],Je(i).constructor):r.apply(i,o))),"onBulletClick",(function(e,n){var i=t.props,r=i.onBulletClick,a=i.items,o=t.state.currentIndex;e.target.blur(),o!==n&&(2===a.length?t.slideToIndexWithStyleReset(n,e):t.slideToIndex(n,e)),r&&r(e,n)})),t.state={currentIndex:e.startIndex,thumbsTranslate:0,thumbsSwipedTranslate:0,currentSlideOffset:0,galleryWidth:0,galleryHeight:0,thumbnailsWrapperWidth:0,thumbnailsWrapperHeight:0,thumbsStyle:{transition:"all ".concat(e.slideDuration,"ms ease-out")},isFullscreen:!1,isSwipingThumbnail:!1,isPlaying:!1},t.loadedImages={},t.imageGallery=a().createRef(),t.thumbnailsWrapper=a().createRef(),t.thumbnails=a().createRef(),t.imageGallerySlideWrapper=a().createRef(),t.handleImageLoaded=t.handleImageLoaded.bind(t),t.handleKeyDown=t.handleKeyDown.bind(t),t.handleMouseDown=t.handleMouseDown.bind(t),t.handleResize=t.handleResize.bind(t),t.handleOnSwiped=t.handleOnSwiped.bind(t),t.handleScreenChange=t.handleScreenChange.bind(t),t.handleSwiping=t.handleSwiping.bind(t),t.handleThumbnailSwiping=t.handleThumbnailSwiping.bind(t),t.handleOnThumbnailSwiped=t.handleOnThumbnailSwiped.bind(t),t.onThumbnailMouseLeave=t.onThumbnailMouseLeave.bind(t),t.handleImageError=t.handleImageError.bind(t),t.pauseOrPlay=t.pauseOrPlay.bind(t),t.renderThumbInner=t.renderThumbInner.bind(t),t.renderItem=t.renderItem.bind(t),t.slideLeft=t.slideLeft.bind(t),t.slideRight=t.slideRight.bind(t),t.toggleFullScreen=t.toggleFullScreen.bind(t),t.togglePlay=t.togglePlay.bind(t),t.unthrottledSlideToIndex=t.slideToIndex,t.slideToIndex=_(t.unthrottledSlideToIndex,e.slideDuration,{trailing:!1}),e.lazyLoad&&(t.lazyLoaded=[]),t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Qe(e,t)}(n,e),function(e,t){return t&&Ye(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.autoPlay,n=e.useWindowKeyDown;t&&this.play(),n?window.addEventListener("keydown",this.handleKeyDown):this.imageGallery.current.addEventListener("keydown",this.handleKeyDown),window.addEventListener("mousedown",this.handleMouseDown),this.initSlideWrapperResizeObserver(this.imageGallerySlideWrapper),this.initThumbnailWrapperResizeObserver(this.thumbnailsWrapper),this.addScreenChangeEvent()}},{key:"componentDidUpdate",value:function(e,t){var n=this.props,i=n.items,r=n.lazyLoad,a=n.slideDuration,o=n.slideInterval,s=n.startIndex,l=n.thumbnailPosition,u=n.showThumbnails,c=n.useWindowKeyDown,h=this.state,d=h.currentIndex,p=h.isPlaying,f=e.items.length!==i.length,m=!L()(e.items,i),b=e.startIndex!==s,g=e.thumbnailPosition!==l,v=e.showThumbnails!==u;o===e.slideInterval&&a===e.slideDuration||p&&(this.pause(),this.play()),g&&(this.removeResizeObserver(),this.initSlideWrapperResizeObserver(this.imageGallerySlideWrapper),this.initThumbnailWrapperResizeObserver(this.thumbnailsWrapper)),v&&u&&this.initThumbnailWrapperResizeObserver(this.thumbnailsWrapper),v&&!u&&this.removeThumbnailsResizeObserver(),(f||v)&&this.handleResize(),t.currentIndex!==d&&this.slideThumbnailBar(),e.slideDuration!==a&&(this.slideToIndex=_(this.unthrottledSlideToIndex,a,{trailing:!1})),!r||e.lazyLoad&&!m||(this.lazyLoaded=[]),c!==e.useWindowKeyDown&&(c?(this.imageGallery.current.removeEventListener("keydown",this.handleKeyDown),window.addEventListener("keydown",this.handleKeyDown)):(window.removeEventListener("keydown",this.handleKeyDown),this.imageGallery.current.addEventListener("keydown",this.handleKeyDown))),(b||m)&&this.setState({currentIndex:s,slideStyle:{transition:"none"}})}},{key:"componentWillUnmount",value:function(){var e=this.props.useWindowKeyDown;window.removeEventListener("mousedown",this.handleMouseDown),this.removeScreenChangeEvent(),this.removeResizeObserver(),this.playPauseIntervalId&&(window.clearInterval(this.playPauseIntervalId),this.playPauseIntervalId=null),this.transitionTimer&&window.clearTimeout(this.transitionTimer),e?window.removeEventListener("keydown",this.handleKeyDown):this.imageGallery.current.removeEventListener("keydown",this.handleKeyDown)}},{key:"onSliding",value:function(){var e=this,t=this.state,n=t.currentIndex,i=t.isTransitioning,r=this.props,a=r.onSlide,o=r.slideDuration;this.transitionTimer=window.setTimeout((function(){i&&(e.setState({isTransitioning:!i,isSwipingThumbnail:!1}),a&&a(n))}),o+50)}},{key:"onThumbnailClick",value:function(e,t){var n=this.props,i=n.onThumbnailClick,r=n.items,a=this.state.currentIndex;e.target.parentNode.parentNode.blur(),a!==t&&(2===r.length?this.slideToIndexWithStyleReset(t,e):this.slideToIndex(t,e)),i&&i(e,t)}},{key:"onThumbnailMouseOver",value:function(e,t){var n=this;this.thumbnailMouseOverTimer&&(window.clearTimeout(this.thumbnailMouseOverTimer),this.thumbnailMouseOverTimer=null),this.thumbnailMouseOverTimer=window.setTimeout((function(){n.slideToIndex(t),n.pause()}),300)}},{key:"onThumbnailMouseLeave",value:function(){if(this.thumbnailMouseOverTimer){var e=this.props.autoPlay;window.clearTimeout(this.thumbnailMouseOverTimer),this.thumbnailMouseOverTimer=null,e&&this.play()}}},{key:"setThumbsTranslate",value:function(e){this.setState({thumbsTranslate:e})}},{key:"setModalFullscreen",value:function(e){var t=this.props.onScreenChange;this.setState({modalFullscreen:e}),t&&t(e)}},{key:"getThumbsTranslate",value:function(e){var t,n=this.props,i=n.disableThumbnailScroll,r=n.items,a=this.state,o=a.thumbnailsWrapperWidth,s=a.thumbnailsWrapperHeight,l=this.thumbnails&&this.thumbnails.current;if(i)return 0;if(l){if(this.isThumbnailVertical()){if(l.scrollHeight<=s)return 0;t=l.scrollHeight-s}else{if(l.scrollWidth<=o||o<=0)return 0;t=l.scrollWidth-o}return e*(t/(r.length-1))}return 0}},{key:"getThumbnailPositionClassName",value:function(e){switch(e){case"left":e=" ".concat("image-gallery-thumbnails-left");break;case"right":e=" ".concat("image-gallery-thumbnails-right");break;case"bottom":e=" ".concat("image-gallery-thumbnails-bottom");break;case"top":e=" ".concat("image-gallery-thumbnails-top")}return e}},{key:"getAlignmentClassName",value:function(e){var t=this.state.currentIndex,n=this.props,i=n.infinite,r=n.items,a="",o="image-gallery-left",s="image-gallery-right";switch(e){case t-1:a=" ".concat(o);break;case t:a=" ".concat("image-gallery-center");break;case t+1:a=" ".concat(s)}return r.length>=3&&i&&(0===e&&t===r.length-1?a=" ".concat(s):e===r.length-1&&0===t&&(a=" ".concat(o))),a}},{key:"getTranslateXForTwoSlide",value:function(e){var t=this.state,n=t.currentIndex,i=t.currentSlideOffset,r=t.previousIndex,a=n!==r,o=0===e&&0===r,s=1===e&&1===r,l=0===e&&1===n,u=1===e&&0===n,c=0===i,h=-100*n+100*e+i;return i>0?this.direction="left":i<0&&(this.direction="right"),u&&i>0&&(h=-100+i),l&&i<0&&(h=100+i),a?o&&c&&"left"===this.direction?h=100:s&&c&&"right"===this.direction&&(h=-100):(u&&c&&"left"===this.direction&&(h=-100),l&&c&&"right"===this.direction&&(h=100)),h}},{key:"getThumbnailBarHeight",value:function(){return this.isThumbnailVertical()?{height:this.state.gallerySlideWrapperHeight}:{}}},{key:"getSlideStyle",value:function(e){var t=this.state,n=t.currentIndex,i=t.currentSlideOffset,r=t.slideStyle,a=this.props,o=a.infinite,s=a.items,l=a.useTranslate3D,u=a.isRTL,c=a.slideVertically,h=-100*n,d=s.length-1,p=(h+100*e)*(u?-1:1)+i;o&&s.length>2&&(0===n&&e===d?p=-100*(u?-1:1)+i:n===d&&0===e&&(p=100*(u?-1:1)+i)),o&&2===s.length&&(p=this.getTranslateXForTwoSlide(e));var f=c?"translate(0, ".concat(p,"%)"):"translate(".concat(p,"%, 0)");return l&&(f=c?"translate3d(0, ".concat(p,"%, 0)"):"translate3d(".concat(p,"%, 0, 0)")),Xe({display:this.isSlideVisible(e)?"inherit":"none",WebkitTransform:f,MozTransform:f,msTransform:f,OTransform:f,transform:f},r)}},{key:"getCurrentIndex",value:function(){return this.state.currentIndex}},{key:"getThumbnailStyle",value:function(){var e,t=this.props,n=t.useTranslate3D,i=t.isRTL,r=this.state,a=r.thumbsTranslate,o=r.thumbsStyle,s=i?-1*a:a;return this.isThumbnailVertical()?(e="translate(0, ".concat(a,"px)"),n&&(e="translate3d(0, ".concat(a,"px, 0)"))):(e="translate(".concat(s,"px, 0)"),n&&(e="translate3d(".concat(s,"px, 0, 0)"))),Xe({WebkitTransform:e,MozTransform:e,msTransform:e,OTransform:e,transform:e},o)}},{key:"getSlideItems",value:function(){var e=this,n=this.state.currentIndex,i=this.props,r=i.items,o=i.slideOnThumbnailOver,s=i.onClick,l=i.lazyLoad,u=i.onTouchMove,c=i.onTouchEnd,h=i.onTouchStart,d=i.onMouseOver,p=i.onMouseLeave,f=i.renderItem,m=i.renderThumbInner,b=i.showThumbnails,g=i.showBullets,v=[],y=[],w=[];return r.forEach((function(i,r){var S=e.getAlignmentClassName(r),T=i.originalClass?" ".concat(i.originalClass):"",O=i.thumbnailClass?" ".concat(i.thumbnailClass):"",E=i.renderItem||f||e.renderItem,k=i.renderThumbInner||m||e.renderThumbInner,I=!l||S||e.lazyLoaded[r];I&&l&&!e.lazyLoaded[r]&&(e.lazyLoaded[r]=!0);var x=e.getSlideStyle(r),P=a().createElement("div",{"aria-label":"Go to Slide ".concat(r+1),key:"slide-".concat(r),tabIndex:"-1",className:"image-gallery-slide ".concat(S," ").concat(T),style:x,onClick:s,onKeyUp:e.handleSlideKeyUp,onTouchMove:u,onTouchEnd:c,onTouchStart:h,onMouseOver:d,onFocus:d,onMouseLeave:p,role:"button"},I?E(i):a().createElement("div",{style:{height:"100%"}}));if(v.push(P),b&&i.thumbnail){var j=t("image-gallery-thumbnail",O,{active:n===r});y.push(a().createElement("button",{key:"thumbnail-".concat(r),type:"button",tabIndex:"0","aria-pressed":n===r?"true":"false","aria-label":"Go to Slide ".concat(r+1),className:j,onMouseLeave:o?e.onThumbnailMouseLeave:null,onMouseOver:function(t){return e.handleThumbnailMouseOver(t,r)},onFocus:function(t){return e.handleThumbnailMouseOver(t,r)},onKeyUp:function(t){return e.handleThumbnailKeyUp(t,r)},onClick:function(t){return e.onThumbnailClick(t,r)}},k(i)))}if(g){var _=t("image-gallery-bullet",i.bulletClass,{active:n===r});w.push(a().createElement("button",{type:"button",key:"bullet-".concat(r),className:_,onClick:function(t){return e.onBulletClick(t,r)},"aria-pressed":n===r?"true":"false","aria-label":"Go to Slide ".concat(r+1)}))}})),{slides:v,thumbnails:y,bullets:w}}},{key:"ignoreIsTransitioning",value:function(){var e=this.props.items,t=this.state,n=t.previousIndex,i=t.currentIndex,r=e.length-1;return Math.abs(n-i)>1&&!(0===n&&i===r)&&!(n===r&&0===i)}},{key:"isFirstOrLastSlide",value:function(e){return e===this.props.items.length-1||0===e}},{key:"slideIsTransitioning",value:function(e){var t=this.state,n=t.isTransitioning,i=t.previousIndex,r=t.currentIndex;return n&&!(e===i||e===r)}},{key:"isSlideVisible",value:function(e){return!this.slideIsTransitioning(e)||this.ignoreIsTransitioning()&&!this.isFirstOrLastSlide(e)}},{key:"slideThumbnailBar",value:function(){var e=this.state,t=e.currentIndex,n=e.isSwipingThumbnail,i=-this.getThumbsTranslate(t);n||(0===t?this.setState({thumbsTranslate:0,thumbsSwipedTranslate:0}):this.setState({thumbsTranslate:i,thumbsSwipedTranslate:i}))}},{key:"canSlide",value:function(){return this.props.items.length>=2}},{key:"canSlideLeft",value:function(){var e=this.props,t=e.infinite,n=e.isRTL;return t||(n?this.canSlideNext():this.canSlidePrevious())}},{key:"canSlideRight",value:function(){var e=this.props,t=e.infinite,n=e.isRTL;return t||(n?this.canSlidePrevious():this.canSlideNext())}},{key:"canSlidePrevious",value:function(){return this.state.currentIndex>0}},{key:"canSlideNext",value:function(){return this.state.currentIndex<this.props.items.length-1}},{key:"handleSwiping",value:function(e){var t=e.event,n=e.absX,i=e.absY,r=e.dir,a=this.props,o=a.disableSwipe,s=a.stopPropagation,l=a.swipingTransitionDuration,u=this.state,c=u.galleryWidth,h=u.galleryHeight,d=u.isTransitioning,p=u.swipingUpDown,f=u.swipingLeftRight,m=this.props.slideVertically;if((r!==ne&&r!==ie&&!p||f||(p||this.setState({swipingUpDown:!0}),m))&&(r!==ee&&r!==te||f||this.setState({swipingLeftRight:!0}),!o))if(s&&t.preventDefault(),d)this.setState({currentSlideOffset:0});else{if((r===ee||r===te)&&m)return;if((r===ne||r===ie)&&!m)return;var b=Ze(Ze(Ze(Ze({},ee,-1),te,1),ne,-1),ie,1)[r],g=n/c*100;m&&(g=i/h*100),Math.abs(g)>=100&&(g=100);var v={transition:"transform ".concat(l,"ms ease-out")};this.setState({currentSlideOffset:b*g,slideStyle:v})}}},{key:"handleThumbnailSwiping",value:function(e){var t=e.event,n=e.absX,i=e.absY,r=e.dir,a=this.props,o=a.stopPropagation,s=a.swipingThumbnailTransitionDuration,l=this.state,u=l.thumbsSwipedTranslate,c=l.thumbnailsWrapperHeight,h=l.thumbnailsWrapperWidth,d=l.swipingUpDown,p=l.swipingLeftRight;if(this.isThumbnailVertical()){if((r===ee||r===te||p)&&!d)return void(p||this.setState({swipingLeftRight:!0}));r!==ne&&r!==ie||d||this.setState({swipingUpDown:!0})}else{if((r===ne||r===ie||d)&&!p)return void(d||this.setState({swipingUpDown:!0}));r!==ee&&r!==te||p||this.setState({swipingLeftRight:!0})}var f,m,b,g,v,y=this.thumbnails&&this.thumbnails.current;if(this.isThumbnailVertical()?(f=u+(r===ie?i:-i),m=y.scrollHeight-c+20,b=Math.abs(f)>m,g=f>20,v=y.scrollHeight<=c):(f=u+(r===te?n:-n),m=y.scrollWidth-h+20,b=Math.abs(f)>m,g=f>20,v=y.scrollWidth<=h),!v&&(r!==ee&&r!==ne||!b)&&(r!==te&&r!==ie||!g)){o&&t.stopPropagation();var w={transition:"transform ".concat(s,"ms ease-out")};this.setState({thumbsTranslate:f,thumbsStyle:w})}}},{key:"handleOnThumbnailSwiped",value:function(){var e=this.state.thumbsTranslate,t=this.props.slideDuration;this.resetSwipingDirection(),this.setState({isSwipingThumbnail:!0,thumbsSwipedTranslate:e,thumbsStyle:{transition:"all ".concat(t,"ms ease-out")}})}},{key:"sufficientSwipe",value:function(){var e=this.state.currentSlideOffset,t=this.props.swipeThreshold;return Math.abs(e)>t}},{key:"resetSwipingDirection",value:function(){var e=this.state,t=e.swipingUpDown,n=e.swipingLeftRight;t&&this.setState({swipingUpDown:!1}),n&&this.setState({swipingLeftRight:!1})}},{key:"handleOnSwiped",value:function(e){var t=e.event,n=e.dir,i=e.velocity,r=this.props,a=r.disableSwipe,o=r.stopPropagation,s=r.flickThreshold,l=this.props.slideVertically;if(!a){var u=this.props.isRTL;o&&t.stopPropagation(),this.resetSwipingDirection();var c=(n===ee?1:-1)*(u?-1:1);l&&(c=n===ne?1:-1);var h=l?i>s&&!(n===ee||n===te):i>s&&!(n===ne||n===ie);this.handleOnSwipedTo(c,h)}}},{key:"handleOnSwipedTo",value:function(e,t){var n=this.state,i=n.currentIndex,r=n.isTransitioning,a=i;!this.sufficientSwipe()&&!t||r||(a+=e),(-1===e&&!this.canSlideLeft()||1===e&&!this.canSlideRight())&&(a=i),this.unthrottledSlideToIndex(a)}},{key:"handleMouseDown",value:function(){this.imageGallery.current.classList.add("image-gallery-using-mouse")}},{key:"handleKeyDown",value:function(e){var t=this.props,n=t.disableKeyDown,i=t.useBrowserFullscreen,r=this.state.isFullscreen;if(this.imageGallery.current.classList.remove("image-gallery-using-mouse"),!n)switch(parseInt(e.keyCode||e.which||0,10)){case 37:this.canSlideLeft()&&!this.playPauseIntervalId&&this.slideLeft(e);break;case 39:this.canSlideRight()&&!this.playPauseIntervalId&&this.slideRight(e);break;case 27:r&&!i&&this.exitFullScreen()}}},{key:"handleImageError",value:function(e){var t=this.props.onErrorImageURL;t&&-1===e.target.src.indexOf(t)&&(e.target.src=t)}},{key:"removeThumbnailsResizeObserver",value:function(){this.resizeThumbnailWrapperObserver&&this.thumbnailsWrapper&&this.thumbnailsWrapper.current&&(this.resizeThumbnailWrapperObserver.unobserve(this.thumbnailsWrapper.current),this.resizeThumbnailWrapperObserver=null)}},{key:"removeResizeObserver",value:function(){this.resizeSlideWrapperObserver&&this.imageGallerySlideWrapper&&this.imageGallerySlideWrapper.current&&(this.resizeSlideWrapperObserver.unobserve(this.imageGallerySlideWrapper.current),this.resizeSlideWrapperObserver=null),this.removeThumbnailsResizeObserver()}},{key:"handleResize",value:function(){var e=this.state.currentIndex;this.imageGallery&&(this.imageGallery&&this.imageGallery.current&&this.setState({galleryWidth:this.imageGallery.current.offsetWidth,galleryHeight:this.imageGallery.current.offsetHeight}),this.imageGallerySlideWrapper&&this.imageGallerySlideWrapper.current&&this.setState({gallerySlideWrapperHeight:this.imageGallerySlideWrapper.current.offsetHeight}),this.setThumbsTranslate(-this.getThumbsTranslate(e)))}},{key:"initSlideWrapperResizeObserver",value:function(e){var t=this;e&&!e.current||(this.resizeSlideWrapperObserver=new Z(j((function(e){e&&e.forEach((function(e){t.setState({thumbnailsWrapperWidth:e.contentRect.width},t.handleResize)}))}),50)),this.resizeSlideWrapperObserver.observe(e.current))}},{key:"initThumbnailWrapperResizeObserver",value:function(e){var t=this;e&&!e.current||(this.resizeThumbnailWrapperObserver=new Z(j((function(e){e&&e.forEach((function(e){t.setState({thumbnailsWrapperHeight:e.contentRect.height},t.handleResize)}))}),50)),this.resizeThumbnailWrapperObserver.observe(e.current))}},{key:"toggleFullScreen",value:function(){this.state.isFullscreen?this.exitFullScreen():this.fullScreen()}},{key:"togglePlay",value:function(){this.playPauseIntervalId?this.pause():this.play()}},{key:"handleScreenChange",value:function(){var e=this.props,t=e.onScreenChange,n=e.useBrowserFullscreen,i=document.fullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement,r=this.imageGallery.current===i;t&&t(r),n&&this.setState({isFullscreen:r})}},{key:"slideToIndex",value:function(e,t){var n=this.state,i=n.currentIndex,r=n.isTransitioning,a=this.props,o=a.items,s=a.slideDuration,l=a.onBeforeSlide;if(!r){t&&this.playPauseIntervalId&&(this.pause(!1),this.play(!1));var u=o.length-1,c=e;e<0?c=u:e>u&&(c=0),l&&c!==i&&l(c),this.setState({previousIndex:i,currentIndex:c,isTransitioning:c!==i,currentSlideOffset:0,slideStyle:{transition:"all ".concat(s,"ms ease-out")}},this.onSliding)}}},{key:"slideLeft",value:function(e){var t=this.props.isRTL;this.slideTo(e,t?"right":"left")}},{key:"slideRight",value:function(e){var t=this.props.isRTL;this.slideTo(e,t?"left":"right")}},{key:"slideTo",value:function(e,t){var n=this.state,i=n.currentIndex,r=n.isTransitioning,a=this.props.items,o=i+("left"===t?-1:1);r||(2===a.length?this.slideToIndexWithStyleReset(o,e):this.slideToIndex(o,e))}},{key:"slideToIndexWithStyleReset",value:function(e,t){var n=this,i=this.state,r=i.currentIndex,a=i.currentSlideOffset;this.setState({currentSlideOffset:a+(r>e?.001:-.001),slideStyle:{transition:"none"}},(function(){window.setTimeout((function(){return n.slideToIndex(e,t)}),25)}))}},{key:"handleThumbnailMouseOver",value:function(e,t){this.props.slideOnThumbnailOver&&this.onThumbnailMouseOver(e,t)}},{key:"handleThumbnailKeyUp",value:function(e,t){it(e)&&this.onThumbnailClick(e,t)}},{key:"handleSlideKeyUp",value:function(e){it(e)&&(0,this.props.onClick)(e)}},{key:"isThumbnailVertical",value:function(){var e=this.props.thumbnailPosition;return"left"===e||"right"===e}},{key:"addScreenChangeEvent",value:function(){var e=this;tt.forEach((function(t){document.addEventListener(t,e.handleScreenChange)}))}},{key:"removeScreenChangeEvent",value:function(){var e=this;tt.forEach((function(t){document.removeEventListener(t,e.handleScreenChange)}))}},{key:"fullScreen",value:function(){var e=this.props.useBrowserFullscreen,t=this.imageGallery.current;e?t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():this.setModalFullscreen(!0):this.setModalFullscreen(!0),this.setState({isFullscreen:!0})}},{key:"exitFullScreen",value:function(){var e=this.state.isFullscreen,t=this.props.useBrowserFullscreen;e&&(t?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():this.setModalFullscreen(!1):this.setModalFullscreen(!1),this.setState({isFullscreen:!1}))}},{key:"pauseOrPlay",value:function(){var e=this.props.infinite,t=this.state.currentIndex;e||this.canSlideRight()?this.slideToIndex(t+1):this.pause()}},{key:"play",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.props,n=t.onPlay,i=t.slideInterval,r=t.slideDuration,a=this.state.currentIndex;this.playPauseIntervalId||(this.setState({isPlaying:!0}),this.playPauseIntervalId=window.setInterval(this.pauseOrPlay,Math.max(i,r)),n&&e&&n(a))}},{key:"pause",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.props.onPause,n=this.state.currentIndex;this.playPauseIntervalId&&(window.clearInterval(this.playPauseIntervalId),this.playPauseIntervalId=null,this.setState({isPlaying:!1}),t&&e&&t(n))}},{key:"isImageLoaded",value:function(e){return!!this.loadedImages[e.original]||(this.loadedImages[e.original]=!0,!1)}},{key:"handleImageLoaded",value:function(e,t){var n=this.props.onImageLoad;!this.loadedImages[t]&&n&&(this.loadedImages[t]=!0,n(e))}},{key:"renderItem",value:function(e){var t=this.state.isFullscreen,n=this.props.onImageError||this.handleImageError;return a().createElement(ge,{description:e.description,fullscreen:e.fullscreen,handleImageLoaded:this.handleImageLoaded,isFullscreen:t,onImageError:n,original:e.original,originalAlt:e.originalAlt,originalHeight:e.originalHeight,originalWidth:e.originalWidth,originalTitle:e.originalTitle,sizes:e.sizes,loading:e.loading,srcSet:e.srcSet})}},{key:"renderThumbInner",value:function(e){var t=this.props.onThumbnailError||this.handleImageError;return a().createElement("span",{className:"image-gallery-thumbnail-inner"},a().createElement("img",{className:"image-gallery-thumbnail-image",src:e.thumbnail,height:e.thumbnailHeight,width:e.thumbnailWidth,alt:e.thumbnailAlt,title:e.thumbnailTitle,loading:e.thumbnailLoading,onError:t}),e.thumbnailLabel&&a().createElement("div",{className:"image-gallery-thumbnail-label"},e.thumbnailLabel))}},{key:"render",value:function(){var e=this.state,n=e.currentIndex,i=e.isFullscreen,r=e.modalFullscreen,o=e.isPlaying,s=this.props,l=s.additionalClass,u=s.disableThumbnailSwipe,c=s.indexSeparator,h=s.isRTL,d=s.items,p=s.thumbnailPosition,f=s.renderFullscreenButton,m=s.renderCustomControls,b=s.renderLeftNav,g=s.renderRightNav,v=s.renderTopNav,y=s.renderBottomNav,w=s.showBullets,S=s.showFullscreenButton,T=s.showIndex,O=s.showThumbnails,E=s.showNav,k=s.showPlayButton,I=s.slideVertically,x=s.renderPlayPauseButton,P=this.getThumbnailStyle(),j=this.getSlideItems(),_=j.slides,R=j.thumbnails,L=j.bullets,M=t("image-gallery-slide-wrapper",this.getThumbnailPositionClassName(p),{"image-gallery-rtl":h}),D=t("image-gallery-bullets",{"image-gallery-bullets-vertical":I}),C=a().createElement("div",{ref:this.imageGallerySlideWrapper,className:M},m&&m(),this.canSlide()?a().createElement(a().Fragment,null,E&&a().createElement(a().Fragment,null,I?v(this.slideLeft,!this.canSlideLeft()):b(this.slideLeft,!this.canSlideLeft()),I?y(this.slideRight,!this.canSlideRight()):g(this.slideRight,!this.canSlideRight())),a().createElement(Ae,{className:"image-gallery-swipe",delta:0,onSwiping:this.handleSwiping,onSwiped:this.handleOnSwiped},a().createElement("div",{className:"image-gallery-slides"},_))):a().createElement("div",{className:"image-gallery-slides"},_),k&&x(this.togglePlay,o),w&&a().createElement("div",{className:D},a().createElement("div",{className:"image-gallery-bullets-container",role:"navigation","aria-label":"Bullet Navigation"},L)),S&&f(this.toggleFullScreen,i),T&&a().createElement("div",{className:"image-gallery-index"},a().createElement("span",{className:"image-gallery-index-current"},n+1),a().createElement("span",{className:"image-gallery-index-separator"},c),a().createElement("span",{className:"image-gallery-index-total"},d.length))),W=t("image-gallery",l,{"fullscreen-modal":r}),N=t("image-gallery-content",this.getThumbnailPositionClassName(p),{fullscreen:i}),F=t("image-gallery-thumbnails-wrapper",this.getThumbnailPositionClassName(p),{"thumbnails-wrapper-rtl":!this.isThumbnailVertical()&&h},{"thumbnails-swipe-horizontal":!this.isThumbnailVertical()&&!u},{"thumbnails-swipe-vertical":this.isThumbnailVertical()&&!u});return a().createElement("div",{ref:this.imageGallery,className:W,"aria-live":"polite"},a().createElement("div",{className:N},("bottom"===p||"right"===p)&&C,O&&R.length>0?a().createElement(Ae,{className:F,delta:0,onSwiping:!u&&this.handleThumbnailSwiping,onSwiped:!u&&this.handleOnThumbnailSwiped},a().createElement("div",{className:"image-gallery-thumbnails",ref:this.thumbnailsWrapper,style:this.getThumbnailBarHeight()},a().createElement("nav",{ref:this.thumbnails,className:"image-gallery-thumbnails-container",style:P,"aria-label":"Thumbnail Navigation"},R))):null,("top"===p||"left"===p)&&C))}}])}(a().Component);rt.propTypes={flickThreshold:ce.number,items:(0,ce.arrayOf)((0,ce.shape)({bulletClass:ce.string,bulletOnClick:ce.func,description:ce.string,original:ce.string,originalHeight:ce.number,originalWidth:ce.number,loading:ce.string,thumbnailHeight:ce.number,thumbnailWidth:ce.number,thumbnailLoading:ce.string,fullscreen:ce.string,originalAlt:ce.string,originalTitle:ce.string,thumbnail:ce.string,thumbnailAlt:ce.string,thumbnailLabel:ce.string,thumbnailTitle:ce.string,originalClass:ce.string,thumbnailClass:ce.string,renderItem:ce.func,renderThumbInner:ce.func,imageSet:nt,srcSet:ce.string,sizes:ce.string})).isRequired,showNav:ce.bool,autoPlay:ce.bool,lazyLoad:ce.bool,infinite:ce.bool,showIndex:ce.bool,showBullets:ce.bool,showThumbnails:ce.bool,showPlayButton:ce.bool,showFullscreenButton:ce.bool,disableThumbnailScroll:ce.bool,disableKeyDown:ce.bool,disableSwipe:ce.bool,disableThumbnailSwipe:ce.bool,useBrowserFullscreen:ce.bool,onErrorImageURL:ce.string,indexSeparator:ce.string,thumbnailPosition:(0,ce.oneOf)(["top","bottom","left","right"]),startIndex:ce.number,slideDuration:ce.number,slideInterval:ce.number,slideOnThumbnailOver:ce.bool,swipeThreshold:ce.number,swipingTransitionDuration:ce.number,swipingThumbnailTransitionDuration:ce.number,onSlide:ce.func,onBeforeSlide:ce.func,onScreenChange:ce.func,onPause:ce.func,onPlay:ce.func,onClick:ce.func,onImageLoad:ce.func,onImageError:ce.func,onTouchMove:ce.func,onTouchEnd:ce.func,onTouchStart:ce.func,onMouseOver:ce.func,onMouseLeave:ce.func,onBulletClick:ce.func,onThumbnailError:ce.func,onThumbnailClick:ce.func,renderCustomControls:ce.func,renderLeftNav:ce.func,renderRightNav:ce.func,renderTopNav:ce.func,renderBottomNav:ce.func,renderPlayPauseButton:ce.func,renderFullscreenButton:ce.func,renderItem:ce.func,renderThumbInner:ce.func,stopPropagation:ce.bool,additionalClass:ce.string,useTranslate3D:ce.bool,isRTL:ce.bool,useWindowKeyDown:ce.bool,slideVertically:ce.bool},rt.defaultProps={onErrorImageURL:"",additionalClass:"",showNav:!0,autoPlay:!1,lazyLoad:!1,infinite:!0,showIndex:!1,showBullets:!1,showThumbnails:!0,showPlayButton:!0,showFullscreenButton:!0,disableThumbnailScroll:!1,disableKeyDown:!1,disableSwipe:!1,disableThumbnailSwipe:!1,useTranslate3D:!0,isRTL:!1,useBrowserFullscreen:!0,flickThreshold:.4,stopPropagation:!1,indexSeparator:" / ",thumbnailPosition:"bottom",startIndex:0,slideDuration:450,swipingTransitionDuration:0,swipingThumbnailTransitionDuration:0,onSlide:null,onBeforeSlide:null,onScreenChange:null,onPause:null,onPlay:null,onClick:null,onImageLoad:null,onImageError:null,onTouchMove:null,onTouchEnd:null,onTouchStart:null,onMouseOver:null,onMouseLeave:null,onBulletClick:null,onThumbnailError:null,onThumbnailClick:null,renderCustomControls:null,renderThumbInner:null,renderItem:null,slideInterval:3e3,slideOnThumbnailOver:!1,swipeThreshold:30,slideVertically:!1,renderLeftNav:function(e,t){return a().createElement(je,{onClick:e,disabled:t})},renderRightNav:function(e,t){return a().createElement(Re,{onClick:e,disabled:t})},renderTopNav:function(e,t){return a().createElement(Ge,{onClick:e,disabled:t})},renderBottomNav:function(e,t){return a().createElement(He,{onClick:e,disabled:t})},renderPlayPauseButton:function(e,t){return a().createElement(Me,{onClick:e,isPlaying:t})},renderFullscreenButton:function(e,t){return a().createElement(xe,{onClick:e,isFullscreen:t})},useWindowKeyDown:!0};const at=rt})(),r})()));
package/package.json CHANGED
@@ -1,18 +1,31 @@
1
1
  {
2
2
  "name": "react-image-gallery",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "React carousel image gallery component with thumbnail and mobile support",
5
- "main": "./build/image-gallery.js",
5
+ "main": "./build/image-gallery.umd.js",
6
+ "module": "./build/image-gallery.es.js",
7
+ "type": "module",
8
+ "files": [
9
+ "build",
10
+ "styles"
11
+ ],
6
12
  "scripts": {
7
13
  "test": "jest",
8
- "lint": "eslint --ext .js,.jsx src",
9
- "start": "webpack serve --open --hot --mode development",
10
- "build": "webpack --config webpack.build.js"
14
+ "lint": "eslint src",
15
+ "start": "webpack serve --open --hot --mode development --static ./example",
16
+ "build": "webpack --config webpack.build.cjs"
11
17
  },
12
18
  "repository": {
13
19
  "type": "git",
14
20
  "url": "https://github.com/xiaolin/react-image-gallery.git"
15
21
  },
22
+ "exports": {
23
+ ".": {
24
+ "import": "./build/image-gallery.es.js",
25
+ "require": "./build/image-gallery.umd.js"
26
+ },
27
+ "./styles/css/image-gallery.css": "./styles/css/image-gallery.css"
28
+ },
16
29
  "style": "styles/css/image-gallery.css",
17
30
  "keywords": [
18
31
  "react",
@@ -38,50 +51,55 @@
38
51
  },
39
52
  "homepage": "https://github.com/xiaolin/react-image-gallery",
40
53
  "devDependencies": {
41
- "@babel/core": "^7.13.14",
42
- "@babel/preset-env": "^7.13.12",
43
- "@babel/preset-react": "^7.13.13",
44
- "@testing-library/jest-dom": "^5.17.0",
45
- "@testing-library/react": "^14.0.0",
46
- "babel-eslint": "^10.1.0",
47
- "babel-jest": "^29.6.2",
48
- "babel-loader": "^8.2.2",
49
- "clsx": "^1.0.4",
50
- "css-loader": "^5.2.0",
51
- "eslint": "7.32.0",
52
- "eslint-config-prettier": "^8.8.0",
54
+ "@babel/core": "^7.26.7",
55
+ "@babel/eslint-parser": "^7.26.5",
56
+ "@babel/preset-env": "^7.26.7",
57
+ "@babel/preset-react": "^7.26.3",
58
+ "@eslint/compat": "^1.2.5",
59
+ "@eslint/eslintrc": "^3.2.0",
60
+ "@eslint/js": "^9.19.0",
61
+ "@testing-library/dom": "^10.4.0",
62
+ "@testing-library/jest-dom": "^6.6.3",
63
+ "@testing-library/react": "^16.2.0",
64
+ "babel-jest": "^29.7.0",
65
+ "babel-loader": "^9.2.1",
66
+ "clsx": "^2.1.1",
67
+ "css-loader": "^7.1.2",
68
+ "eslint": "9.19.0",
69
+ "eslint-config-prettier": "^10.0.1",
53
70
  "eslint-import-resolver-alias": "^1.1.2",
54
- "eslint-plugin-import": "^2.27.5",
55
- "eslint-plugin-jest": "^27.2.3",
56
- "eslint-plugin-jsx-a11y": "^6.7.1",
57
- "eslint-plugin-prettier": "^5.0.0",
58
- "eslint-plugin-react": "^7.33.0",
59
- "eslint-plugin-react-hooks": "^4.6.0",
71
+ "eslint-plugin-import": "^2.31.0",
72
+ "eslint-plugin-jest": "^28.11.0",
73
+ "eslint-plugin-jsx-a11y": "^6.10.2",
74
+ "eslint-plugin-prettier": "^5.2.3",
75
+ "eslint-plugin-react": "^7.37.4",
76
+ "eslint-plugin-react-hooks": "^5.1.0",
60
77
  "file-loader": "^6.2.0",
78
+ "globals": "^15.14.0",
61
79
  "identity-obj-proxy": "^3.0.0",
62
- "jest": "27.2.3",
80
+ "jest": "29.7.0",
81
+ "jest-environment-jsdom": "29.7.0",
63
82
  "lodash-es": "^4.17.21",
64
- "mini-css-extract-plugin": "^2.1.0",
65
- "postcss": "^8.2.10",
66
- "postcss-loader": "^5.2.0",
67
- "prettier": "^3.0.0",
68
- "prop-types": "^15.5.8",
69
- "react": "^18.0.0",
70
- "react-dom": "^18.0.0",
71
- "react-fast-compare": "^3.2.0",
72
- "react-swipeable": "7.0.1",
73
- "remove-files-webpack-plugin": "^1.4.5",
74
- "resize-observer-polyfill": "^1.5.0",
75
- "sass": "^1.35.2",
76
- "sass-loader": "^12.1.0",
77
- "style-loader": "^2.0.0",
83
+ "mini-css-extract-plugin": "^2.9.2",
84
+ "postcss": "^8.5.1",
85
+ "postcss-loader": "^8.1.1",
86
+ "prettier": "^3.4.2",
87
+ "prop-types": "^15.8.1",
88
+ "react": "^19.0.0",
89
+ "react-dom": "^19.0.0",
90
+ "react-fast-compare": "^3.2.2",
91
+ "react-swipeable": "7.0.2",
92
+ "remove-files-webpack-plugin": "^1.5.0",
93
+ "resize-observer-polyfill": "^1.5.1",
94
+ "sass": "^1.83.4",
95
+ "sass-loader": "^16.0.4",
96
+ "style-loader": "^4.0.0",
78
97
  "url-loader": "^4.1.1",
79
- "webpack": "^5.30.0",
80
- "webpack-cli": "^4.6.0",
81
- "webpack-dev-server": "^3.11.2"
98
+ "webpack": "^5.97.1",
99
+ "webpack-cli": "^6.0.1",
100
+ "webpack-dev-server": "^5.2.0"
82
101
  },
83
102
  "peerDependencies": {
84
- "react": "^16.0.0 || ^17.0.0 || ^18.0.0"
85
- },
86
- "dependencies": {}
103
+ "react": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
104
+ }
87
105
  }
@@ -1 +1 @@
1
- .image-gallery-icon{color:#fff;transition:all .3s ease-out;appearance:none;background-color:transparent;border:0;cursor:pointer;outline:none;position:absolute;z-index:4;filter:drop-shadow(0 2px 2px #1a1a1a)}@media(hover: hover)and (pointer: fine){.image-gallery-icon:hover{color:#337ab7}.image-gallery-icon:hover .image-gallery-svg{transform:scale(1.1)}}.image-gallery-icon:focus{outline:2px solid #337ab7}.image-gallery-using-mouse .image-gallery-icon:focus{outline:none}.image-gallery-fullscreen-button,.image-gallery-play-button{bottom:0;padding:20px}.image-gallery-fullscreen-button .image-gallery-svg,.image-gallery-play-button .image-gallery-svg{height:28px;width:28px}@media(max-width: 768px){.image-gallery-fullscreen-button,.image-gallery-play-button{padding:15px}.image-gallery-fullscreen-button .image-gallery-svg,.image-gallery-play-button .image-gallery-svg{height:24px;width:24px}}@media(max-width: 480px){.image-gallery-fullscreen-button,.image-gallery-play-button{padding:10px}.image-gallery-fullscreen-button .image-gallery-svg,.image-gallery-play-button .image-gallery-svg{height:16px;width:16px}}.image-gallery-fullscreen-button{right:0}.image-gallery-play-button{left:0}.image-gallery-left-nav,.image-gallery-right-nav{padding:50px 10px;top:50%;transform:translateY(-50%)}.image-gallery-left-nav .image-gallery-svg,.image-gallery-right-nav .image-gallery-svg{height:120px;width:60px}@media(max-width: 768px){.image-gallery-left-nav .image-gallery-svg,.image-gallery-right-nav .image-gallery-svg{height:72px;width:36px}}@media(max-width: 480px){.image-gallery-left-nav .image-gallery-svg,.image-gallery-right-nav .image-gallery-svg{height:48px;width:24px}}.image-gallery-left-nav[disabled],.image-gallery-right-nav[disabled]{cursor:disabled;opacity:.6;pointer-events:none}.image-gallery-left-nav{left:0}.image-gallery-right-nav{right:0}.image-gallery{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);position:relative}.image-gallery.fullscreen-modal{background:#000;bottom:0;height:100%;left:0;position:fixed;right:0;top:0;width:100%;z-index:5}.image-gallery.fullscreen-modal .image-gallery-content{top:50%;transform:translateY(-50%)}.image-gallery-content{position:relative;line-height:0;top:0}.image-gallery-content.fullscreen{background:#000}.image-gallery-content .image-gallery-slide .image-gallery-image{max-height:calc(100vh - 80px)}.image-gallery-content.image-gallery-thumbnails-left .image-gallery-slide .image-gallery-image,.image-gallery-content.image-gallery-thumbnails-right .image-gallery-slide .image-gallery-image{max-height:100vh}.image-gallery-slide-wrapper{position:relative}.image-gallery-slide-wrapper.image-gallery-thumbnails-left,.image-gallery-slide-wrapper.image-gallery-thumbnails-right{display:inline-block;width:calc(100% - 110px)}@media(max-width: 768px){.image-gallery-slide-wrapper.image-gallery-thumbnails-left,.image-gallery-slide-wrapper.image-gallery-thumbnails-right{width:calc(100% - 87px)}}.image-gallery-slide-wrapper.image-gallery-rtl{direction:rtl}.image-gallery-slides{line-height:0;overflow:hidden;position:relative;white-space:nowrap;text-align:center}.image-gallery-slide{left:0;position:absolute;top:0;width:100%}.image-gallery-slide.image-gallery-center{position:relative}.image-gallery-slide .image-gallery-image{width:100%;object-fit:contain}.image-gallery-slide .image-gallery-description{background:rgba(0,0,0,.4);bottom:70px;color:#fff;left:0;line-height:1;padding:10px 20px;position:absolute;white-space:normal}@media(max-width: 768px){.image-gallery-slide .image-gallery-description{bottom:45px;font-size:.8em;padding:8px 15px}}.image-gallery-bullets{bottom:20px;left:0;margin:0 auto;position:absolute;right:0;width:80%;z-index:4}.image-gallery-bullets .image-gallery-bullets-container{margin:0;padding:0;text-align:center}.image-gallery-bullets .image-gallery-bullet{appearance:none;background-color:transparent;border:1px solid #fff;border-radius:50%;box-shadow:0 2px 2px #1a1a1a;cursor:pointer;display:inline-block;margin:0 5px;outline:none;padding:5px;transition:all .2s ease-out}@media(max-width: 768px){.image-gallery-bullets .image-gallery-bullet{margin:0 3px;padding:3px}}@media(max-width: 480px){.image-gallery-bullets .image-gallery-bullet{padding:2.7px}}.image-gallery-bullets .image-gallery-bullet:focus{transform:scale(1.2);background:#337ab7;border:1px solid #337ab7}.image-gallery-bullets .image-gallery-bullet.active{transform:scale(1.2);border:1px solid #fff;background:#fff}@media(hover: hover)and (pointer: fine){.image-gallery-bullets .image-gallery-bullet:hover{background:#337ab7;border:1px solid #337ab7}.image-gallery-bullets .image-gallery-bullet.active:hover{background:#337ab7}}.image-gallery-thumbnails-wrapper{position:relative}.image-gallery-thumbnails-wrapper.thumbnails-swipe-horizontal{touch-action:pan-y}.image-gallery-thumbnails-wrapper.thumbnails-swipe-vertical{touch-action:pan-x}.image-gallery-thumbnails-wrapper.thumbnails-wrapper-rtl{direction:rtl}.image-gallery-thumbnails-wrapper.image-gallery-thumbnails-left,.image-gallery-thumbnails-wrapper.image-gallery-thumbnails-right{display:inline-block;vertical-align:top;width:100px}@media(max-width: 768px){.image-gallery-thumbnails-wrapper.image-gallery-thumbnails-left,.image-gallery-thumbnails-wrapper.image-gallery-thumbnails-right{width:81px}}.image-gallery-thumbnails-wrapper.image-gallery-thumbnails-left .image-gallery-thumbnails,.image-gallery-thumbnails-wrapper.image-gallery-thumbnails-right .image-gallery-thumbnails{height:100%;width:100%;left:0;padding:0;position:absolute;top:0}.image-gallery-thumbnails-wrapper.image-gallery-thumbnails-left .image-gallery-thumbnails .image-gallery-thumbnail,.image-gallery-thumbnails-wrapper.image-gallery-thumbnails-right .image-gallery-thumbnails .image-gallery-thumbnail{display:block;margin-right:0;padding:0}.image-gallery-thumbnails-wrapper.image-gallery-thumbnails-left .image-gallery-thumbnails .image-gallery-thumbnail+.image-gallery-thumbnail,.image-gallery-thumbnails-wrapper.image-gallery-thumbnails-right .image-gallery-thumbnails .image-gallery-thumbnail+.image-gallery-thumbnail{margin-left:0;margin-top:2px}.image-gallery-thumbnails-wrapper.image-gallery-thumbnails-left,.image-gallery-thumbnails-wrapper.image-gallery-thumbnails-right{margin:0 5px}@media(max-width: 768px){.image-gallery-thumbnails-wrapper.image-gallery-thumbnails-left,.image-gallery-thumbnails-wrapper.image-gallery-thumbnails-right{margin:0 3px}}.image-gallery-thumbnails{overflow:hidden;padding:5px 0}@media(max-width: 768px){.image-gallery-thumbnails{padding:3px 0}}.image-gallery-thumbnails .image-gallery-thumbnails-container{cursor:pointer;text-align:center;white-space:nowrap}.image-gallery-thumbnail{display:inline-block;border:4px solid transparent;transition:border .3s ease-out;width:100px;background:transparent;padding:0}@media(max-width: 768px){.image-gallery-thumbnail{border:3px solid transparent;width:81px}}.image-gallery-thumbnail+.image-gallery-thumbnail{margin-left:2px}.image-gallery-thumbnail .image-gallery-thumbnail-inner{display:block;position:relative}.image-gallery-thumbnail .image-gallery-thumbnail-image{vertical-align:middle;width:100%;line-height:0}.image-gallery-thumbnail.active,.image-gallery-thumbnail:focus{outline:none;border:4px solid #337ab7}@media(max-width: 768px){.image-gallery-thumbnail.active,.image-gallery-thumbnail:focus{border:3px solid #337ab7}}@media(hover: hover)and (pointer: fine){.image-gallery-thumbnail:hover{outline:none;border:4px solid #337ab7}}@media(hover: hover)and (pointer: fine)and (max-width: 768px){.image-gallery-thumbnail:hover{border:3px solid #337ab7}}.image-gallery-thumbnail-label{box-sizing:border-box;color:#fff;font-size:1em;left:0;line-height:1em;padding:5%;position:absolute;top:50%;text-shadow:0 2px 2px #1a1a1a;transform:translateY(-50%);white-space:normal;width:100%}@media(max-width: 768px){.image-gallery-thumbnail-label{font-size:.8em;line-height:.8em}}.image-gallery-index{background:rgba(0,0,0,.4);color:#fff;line-height:1;padding:10px 20px;position:absolute;right:0;top:0;z-index:4}@media(max-width: 768px){.image-gallery-index{font-size:.8em;padding:5px 10px}}
1
+ .image-gallery-icon{color:#fff;transition:all .3s ease-out;appearance:none;background-color:rgba(0,0,0,0);border:0;cursor:pointer;outline:none;position:absolute;z-index:4;filter:drop-shadow(0 2px 2px rgb(25.5, 25.5, 25.5))}@media(hover: hover)and (pointer: fine){.image-gallery-icon:hover{color:#337ab7}.image-gallery-icon:hover .image-gallery-svg{transform:scale(1.1)}}.image-gallery-icon:focus{outline:2px solid #337ab7}.image-gallery-using-mouse .image-gallery-icon:focus{outline:none}.image-gallery-fullscreen-button,.image-gallery-play-button{bottom:0;padding:20px}.image-gallery-fullscreen-button .image-gallery-svg,.image-gallery-play-button .image-gallery-svg{height:28px;width:28px}@media(max-width: 768px){.image-gallery-fullscreen-button,.image-gallery-play-button{padding:15px}.image-gallery-fullscreen-button .image-gallery-svg,.image-gallery-play-button .image-gallery-svg{height:24px;width:24px}}@media(max-width: 480px){.image-gallery-fullscreen-button,.image-gallery-play-button{padding:10px}.image-gallery-fullscreen-button .image-gallery-svg,.image-gallery-play-button .image-gallery-svg{height:16px;width:16px}}.image-gallery-fullscreen-button{right:0}.image-gallery-play-button{left:0}.image-gallery-top-nav,.image-gallery-bottom-nav{padding:10px 10px;left:50%;transform:translateX(-50%)}.image-gallery-top-nav .image-gallery-svg,.image-gallery-bottom-nav .image-gallery-svg{height:120px;width:90px}@media(max-width: 768px){.image-gallery-top-nav .image-gallery-svg,.image-gallery-bottom-nav .image-gallery-svg{height:72px;width:48px}}@media(max-width: 480px){.image-gallery-top-nav .image-gallery-svg,.image-gallery-bottom-nav .image-gallery-svg{height:48px;width:36px}}.image-gallery-top-nav[disabled],.image-gallery-bottom-nav[disabled]{cursor:disabled;opacity:.6;pointer-events:none}.image-gallery-top-nav{top:0}.image-gallery-bottom-nav{bottom:0}.image-gallery-left-nav,.image-gallery-right-nav{padding:50px 10px;top:50%;transform:translateY(-50%)}.image-gallery-left-nav .image-gallery-svg,.image-gallery-right-nav .image-gallery-svg{height:120px;width:60px}@media(max-width: 768px){.image-gallery-left-nav .image-gallery-svg,.image-gallery-right-nav .image-gallery-svg{height:72px;width:36px}}@media(max-width: 480px){.image-gallery-left-nav .image-gallery-svg,.image-gallery-right-nav .image-gallery-svg{height:48px;width:24px}}.image-gallery-left-nav[disabled],.image-gallery-right-nav[disabled]{cursor:disabled;opacity:.6;pointer-events:none}.image-gallery-left-nav{left:0}.image-gallery-right-nav{right:0}.image-gallery{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);position:relative}.image-gallery.fullscreen-modal{background:#000;bottom:0;height:100%;left:0;position:fixed;right:0;top:0;width:100%;z-index:5}.image-gallery.fullscreen-modal .image-gallery-content{top:50%;transform:translateY(-50%)}.image-gallery-content{position:relative;line-height:0;top:0}.image-gallery-content.fullscreen{background:#000}.image-gallery-content .image-gallery-slide .image-gallery-image{max-height:calc(100vh - 80px)}.image-gallery-content.image-gallery-thumbnails-left .image-gallery-slide .image-gallery-image,.image-gallery-content.image-gallery-thumbnails-right .image-gallery-slide .image-gallery-image{max-height:100vh}.image-gallery-slide-wrapper{position:relative}.image-gallery-slide-wrapper.image-gallery-thumbnails-left,.image-gallery-slide-wrapper.image-gallery-thumbnails-right{display:inline-block;width:calc(100% - 110px)}@media(max-width: 768px){.image-gallery-slide-wrapper.image-gallery-thumbnails-left,.image-gallery-slide-wrapper.image-gallery-thumbnails-right{width:calc(100% - 87px)}}.image-gallery-slide-wrapper.image-gallery-rtl{direction:rtl}.image-gallery-slides{line-height:0;overflow:hidden;position:relative;white-space:nowrap;text-align:center;touch-action:none}.image-gallery-slide{left:0;position:absolute;top:0;width:100%}.image-gallery-slide.image-gallery-center{position:relative}.image-gallery-slide .image-gallery-image{width:100%;object-fit:contain}.image-gallery-slide .image-gallery-description{background:rgba(0,0,0,.4);bottom:70px;color:#fff;left:0;line-height:1;padding:10px 20px;position:absolute;white-space:normal}@media(max-width: 768px){.image-gallery-slide .image-gallery-description{bottom:45px;font-size:.8em;padding:8px 15px}}.image-gallery-bullets{bottom:20px;left:0;margin:0 auto;position:absolute;right:0;width:80%;z-index:4}.image-gallery-bullets .image-gallery-bullets-container{margin:0;padding:0;text-align:center}.image-gallery-bullets .image-gallery-bullet{appearance:none;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:50%;box-shadow:0 2px 2px hsl(0,0%,10%);cursor:pointer;display:inline-block;margin:0 5px;outline:none;padding:5px;transition:all .2s ease-out}@media(max-width: 768px){.image-gallery-bullets .image-gallery-bullet{margin:0 3px;padding:3px}}@media(max-width: 480px){.image-gallery-bullets .image-gallery-bullet{padding:2.7px}}.image-gallery-bullets .image-gallery-bullet:focus{transform:scale(1.2);background:#337ab7;border:1px solid #337ab7}.image-gallery-bullets .image-gallery-bullet.active{transform:scale(1.2);border:1px solid #fff;background:#fff}@media(hover: hover)and (pointer: fine){.image-gallery-bullets .image-gallery-bullet:hover{background:#337ab7;border:1px solid #337ab7}.image-gallery-bullets .image-gallery-bullet.active:hover{background:#337ab7}}.image-gallery-bullets.image-gallery-bullets-vertical{left:20px;right:auto;bottom:auto;width:auto;top:50%;transform:translateY(-50%)}.image-gallery-bullets.image-gallery-bullets-vertical .image-gallery-bullet{display:block;margin:12px 0}@media(max-width: 768px){.image-gallery-bullets.image-gallery-bullets-vertical .image-gallery-bullet{margin:6px 0px;padding:3px}}@media(max-width: 480px){.image-gallery-bullets.image-gallery-bullets-vertical .image-gallery-bullet{padding:2.7px}}.image-gallery-thumbnails-wrapper{position:relative}.image-gallery-thumbnails-wrapper.thumbnails-swipe-horizontal{touch-action:pan-y}.image-gallery-thumbnails-wrapper.thumbnails-swipe-vertical{touch-action:pan-x}.image-gallery-thumbnails-wrapper.thumbnails-wrapper-rtl{direction:rtl}.image-gallery-thumbnails-wrapper.image-gallery-thumbnails-left,.image-gallery-thumbnails-wrapper.image-gallery-thumbnails-right{display:inline-block;vertical-align:top;width:100px}@media(max-width: 768px){.image-gallery-thumbnails-wrapper.image-gallery-thumbnails-left,.image-gallery-thumbnails-wrapper.image-gallery-thumbnails-right{width:81px}}.image-gallery-thumbnails-wrapper.image-gallery-thumbnails-left .image-gallery-thumbnails,.image-gallery-thumbnails-wrapper.image-gallery-thumbnails-right .image-gallery-thumbnails{height:100%;width:100%;left:0;padding:0;position:absolute;top:0}.image-gallery-thumbnails-wrapper.image-gallery-thumbnails-left .image-gallery-thumbnails .image-gallery-thumbnail,.image-gallery-thumbnails-wrapper.image-gallery-thumbnails-right .image-gallery-thumbnails .image-gallery-thumbnail{display:block;margin-right:0;padding:0}.image-gallery-thumbnails-wrapper.image-gallery-thumbnails-left .image-gallery-thumbnails .image-gallery-thumbnail+.image-gallery-thumbnail,.image-gallery-thumbnails-wrapper.image-gallery-thumbnails-right .image-gallery-thumbnails .image-gallery-thumbnail+.image-gallery-thumbnail{margin-left:0;margin-top:2px}.image-gallery-thumbnails-wrapper.image-gallery-thumbnails-left,.image-gallery-thumbnails-wrapper.image-gallery-thumbnails-right{margin:0 5px}@media(max-width: 768px){.image-gallery-thumbnails-wrapper.image-gallery-thumbnails-left,.image-gallery-thumbnails-wrapper.image-gallery-thumbnails-right{margin:0 3px}}.image-gallery-thumbnails{overflow:hidden;padding:5px 0}@media(max-width: 768px){.image-gallery-thumbnails{padding:3px 0}}.image-gallery-thumbnails .image-gallery-thumbnails-container{cursor:pointer;text-align:center;white-space:nowrap}.image-gallery-thumbnail{display:inline-block;border:4px solid rgba(0,0,0,0);transition:border .3s ease-out;width:100px;background:rgba(0,0,0,0);padding:0}@media(max-width: 768px){.image-gallery-thumbnail{border:3px solid rgba(0,0,0,0);width:81px}}.image-gallery-thumbnail+.image-gallery-thumbnail{margin-left:2px}.image-gallery-thumbnail .image-gallery-thumbnail-inner{display:block;position:relative}.image-gallery-thumbnail .image-gallery-thumbnail-image{vertical-align:middle;width:100%;line-height:0}.image-gallery-thumbnail.active,.image-gallery-thumbnail:focus{outline:none;border:4px solid #337ab7}@media(max-width: 768px){.image-gallery-thumbnail.active,.image-gallery-thumbnail:focus{border:3px solid #337ab7}}@media(hover: hover)and (pointer: fine){.image-gallery-thumbnail:hover{outline:none;border:4px solid #337ab7}}@media(hover: hover)and (pointer: fine)and (max-width: 768px){.image-gallery-thumbnail:hover{border:3px solid #337ab7}}.image-gallery-thumbnail-label{box-sizing:border-box;color:#fff;font-size:1em;left:0;line-height:1em;padding:5%;position:absolute;top:50%;text-shadow:0 2px 2px hsl(0,0%,10%);transform:translateY(-50%);white-space:normal;width:100%}@media(max-width: 768px){.image-gallery-thumbnail-label{font-size:.8em;line-height:.8em}}.image-gallery-index{background:rgba(0,0,0,.4);color:#fff;line-height:1;padding:10px 20px;position:absolute;right:0;top:0;z-index:4}@media(max-width: 768px){.image-gallery-index{font-size:.8em;padding:5px 10px}}