├── .babelrc ├── .editorconfig ├── .eslintignore ├── .eslintrc ├── .gitignore ├── .npmignore ├── README.md ├── dist ├── default-skin.png ├── default-skin.svg ├── photoswipe.css ├── preloader.gif └── react-photoswipe.js ├── example ├── src │ ├── app.js │ ├── assets │ │ ├── fonts │ │ │ └── .gitkeep │ │ ├── images │ │ │ └── logo.svg │ │ └── styles │ │ │ ├── _animations.scss │ │ │ ├── _mixins.scss │ │ │ ├── _variables.scss │ │ │ ├── app.scss │ │ │ ├── components │ │ │ ├── _footer.scss │ │ │ ├── _header.scss │ │ │ ├── _page.scss │ │ │ ├── _pre-render.scss │ │ │ ├── _region.scss │ │ │ └── _thumbnail.scss │ │ │ └── pages │ │ │ └── _home.scss │ ├── components │ │ ├── App.js │ │ ├── Document.js │ │ ├── Footer.js │ │ └── Header.js │ ├── index.html │ └── pages │ │ ├── Gallery │ │ └── index.js │ │ ├── Home │ │ └── index.js │ │ └── NotFound │ │ └── index.js ├── webpack.config.babel.js └── webpack.server.js ├── gulpfile.babel.js ├── lib ├── PhotoSwipe.js ├── PhotoSwipeGallery.js ├── default-skin.png ├── default-skin.svg ├── events.js ├── index.js ├── photoswipe.css └── preloader.gif ├── package-lock.json ├── package.json ├── postcss.config.js ├── src ├── PhotoSwipe.js ├── PhotoSwipeGallery.js ├── events.js └── index.js └── webpack.config.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "env", 5 | { 6 | "targets": { 7 | "browsers": [ 8 | "last 2 versions" 9 | ] 10 | } 11 | } 12 | ], 13 | "react" 14 | ], 15 | "plugins": [ 16 | "add-module-exports", 17 | "transform-class-properties", 18 | "transform-object-rest-spread" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules/* 2 | dist/* 3 | example/dist/* 4 | lib/* 5 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "babel-eslint", 3 | "extends": "airbnb", 4 | "env": { 5 | "browser": true, 6 | "node": true 7 | }, 8 | "rules": { 9 | "func-names": "off", 10 | "comma-dangle": "off", 11 | "global-require": "off", 12 | "import/no-extraneous-dependencies": "off", 13 | "import/no-unresolved": "off", 14 | "import/extensions": "off", 15 | "react/jsx-filename-extension": "off", 16 | "react/prefer-stateless-function": ["error", {"ignorePureComponents": true}], 17 | "react/jsx-tag-spacing": "off", 18 | "react/forbid-prop-types": "off", 19 | "react/no-array-index-key": "off", 20 | "jsx-a11y/no-static-element-interactions": "off", 21 | "no-console": "off" 22 | }, 23 | "globals": { 24 | "jQuery": false, 25 | "$": false 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | example/dist 3 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .idea 2 | example -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # React PhotoSwipe 2 | 3 | PhotoSwipe, PhotoSwipeGallery component for ReactJS base on [PhotoSwipe](http://photoswipe.com/). 4 | 5 | ## Installation 6 | 7 | ### NPM 8 | 9 | ```bash 10 | npm install --save react-photoswipe 11 | ``` 12 | 13 | ### Bower 14 | ```bash 15 | bower install --save react-photoswipe 16 | ``` 17 | 18 | ## Usage 19 | 20 | ### Styles 21 | 22 | #### With webpack: 23 | 24 | ```js 25 | import 'react-photoswipe/lib/photoswipe.css'; 26 | ``` 27 | 28 | #### Without webpack: 29 | 30 | ```html 31 | 32 | ``` 33 | 34 | ### JS 35 | 36 | #### PhotoSwipe 37 | 38 | ```js 39 | import {PhotoSwipe} from 'react-photoswipe'; 40 | 41 | let isOpen = true; 42 | 43 | let items = [ 44 | { 45 | src: 'http://lorempixel.com/1200/900/sports/1', 46 | w: 1200, 47 | h: 900, 48 | title: 'Image 1' 49 | }, 50 | { 51 | src: 'http://lorempixel.com/1200/900/sports/2', 52 | w: 1200, 53 | h: 900, 54 | title: 'Image 2' 55 | } 56 | ]; 57 | 58 | let options = { 59 | //http://photoswipe.com/documentation/options.html 60 | }; 61 | 62 | handleClose = () => { 63 | isOpen: false 64 | }; 65 | 66 | 67 | 68 | ``` 69 | 70 | #### PhotoSwipeGallery 71 | 72 | ```js 73 | import {PhotoSwipeGallery} from 'react-photoswipe'; 74 | 75 | let items = [ 76 | { 77 | src: 'http://lorempixel.com/1200/900/sports/1', 78 | thumbnail: 'http://lorempixel.com/120/90/sports/1', 79 | w: 1200, 80 | h: 900, 81 | title: 'Image 1' 82 | }, 83 | { 84 | src: 'http://lorempixel.com/1200/900/sports/2', 85 | thumbnail: 'http://lorempixel.com/120/90/sports/2', 86 | w: 1200, 87 | h: 900, 88 | title: 'Image 2' 89 | } 90 | ]; 91 | 92 | let options = { 93 | //http://photoswipe.com/documentation/options.html 94 | }; 95 | 96 | getThumbnailContent = (item) => { 97 | return ( 98 | 99 | ); 100 | } 101 | 102 | 103 | ``` 104 | 105 | ### UMD 106 | 107 | ```html 108 | 109 | 110 | ``` 111 | 112 | ```js 113 | var PhotoSwipe = window.ReactPhotoswipe.PhotoSwipe; 114 | var PhotoSwipeGallery = window.ReactPhotoswipe.PhotoSwipeGallery; 115 | ``` 116 | 117 | Example [here](http://codepen.io/vn38minhtran/pen/XmVdvW/) 118 | 119 | ## Props 120 | 121 | **Note:** The first argument of every listener is a Photoswipe instance. 122 | 123 | EX: 124 | ```js 125 | beforeChange(instance, change); 126 | imageLoadComplete(instance, index, item); 127 | ``` 128 | 129 | ### PhotoSwipe 130 | 131 | | Name | Type | Default | Required | Description | 132 | |------|------|---------|----------|-------------| 133 | | isOpen | bool | false | true | | 134 | | items | array | [] | true | http://photoswipe.com/documentation/getting-started.html | 135 | | options | object | {} | false | http://photoswipe.com/documentation/options.html | 136 | | onClose | function | | false | Callback after PhotoSwipe close | 137 | | id | string | | false | | 138 | | className | string | `pswp` | | 139 | | beforeChange | function | | false | Photoswipe event listener | 140 | | afterChange | function | | false | Photoswipe event listener | 141 | | imageLoadComplete | function | | false | Photoswipe event listener | 142 | | resize | function | | false | Photoswipe event listener | 143 | | gettingData | function | | false | Photoswipe event listener | 144 | | mouseUsed | function | | false | Photoswipe event listener | 145 | | initialZoomIn | function | | false | Photoswipe event listener | 146 | | initialZoomInEnd | function | | false | Photoswipe event listener | 147 | | initialZoomOut | function | | false | Photoswipe event listener | 148 | | initialZoomOutEnd | function | | false | Photoswipe event listener | 149 | | parseVerticalMargin | function | | false | Photoswipe event listener | 150 | | close | function | | false | Photoswipe event listener | 151 | | unbindEvents | function | | false | Photoswipe event listener | 152 | | destroy | function | | false | Photoswipe event listener | 153 | | updateScrollOffset | function | | false | Photoswipe event listener | 154 | | preventDragEvent | function | | false | Photoswipe event listener | 155 | | shareLinkClick | function | | false | Photoswipe event listener | 156 | 157 | ### PhotoSwipeGallery 158 | 159 | | Name | Type | Default | Required | Description | 160 | |------|------|---------|----------|-------------| 161 | | items | array | [] | true | http://photoswipe.com/documentation/getting-started.html | 162 | | options | object | {} | false | http://photoswipe.com/documentation/options.html | 163 | | thumbnailContent | function | `` | false | Thumbnail content | 164 | | isOpen | bool | false | false | Use it with `onClose` prop | 165 | | onClose | function | | false | Callback after close | 166 | | id | string | | false | | 167 | | className | string | `pswp-gallery` | | 168 | | beforeChange | function | | false | Photoswipe event listener | 169 | | afterChange | function | | false | Photoswipe event listener | 170 | | imageLoadComplete | function | | false | Photoswipe event listener | 171 | | resize | function | | false | Photoswipe event listener | 172 | | gettingData | function | | false | Photoswipe event listener | 173 | | mouseUsed | function | | false | Photoswipe event listener | 174 | | initialZoomIn | function | | false | Photoswipe event listener | 175 | | initialZoomInEnd | function | | false | Photoswipe event listener | 176 | | initialZoomOut | function | | false | Photoswipe event listener | 177 | | initialZoomOutEnd | function | | false | Photoswipe event listener | 178 | | parseVerticalMargin | function | | false | Photoswipe event listener | 179 | | close | function | | false | Photoswipe event listener | 180 | | unbindEvents | function | | false | Photoswipe event listener | 181 | | destroy | function | | false | Photoswipe event listener | 182 | | updateScrollOffset | function | | false | Photoswipe event listener | 183 | | preventDragEvent | function | | false | Photoswipe event listener | 184 | | shareLinkClick | function | | false | Photoswipe event listener | 185 | 186 | ## Demo 187 | 188 | View [demo](http://minhtranite.github.io/react-photoswipe) or example folder. 189 | -------------------------------------------------------------------------------- /dist/default-skin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minhtranite/react-photoswipe/cbb3ecc10eb6e1dbee8a7b857ed3b8559c77f3e1/dist/default-skin.png -------------------------------------------------------------------------------- /dist/default-skin.svg: -------------------------------------------------------------------------------- 1 | default-skin 2 -------------------------------------------------------------------------------- /dist/photoswipe.css: -------------------------------------------------------------------------------- 1 | .pswp{display:none;position:absolute;width:100%;height:100%;left:0;top:0;overflow:hidden;-ms-touch-action:none;touch-action:none;z-index:1500;-webkit-text-size-adjust:100%;-webkit-backface-visibility:hidden;outline:none}.pswp *{-webkit-box-sizing:border-box;box-sizing:border-box}.pswp img{max-width:none}.pswp--animate_opacity{opacity:.001;will-change:opacity;-webkit-transition:opacity 333ms cubic-bezier(.4,0,.22,1);transition:opacity 333ms cubic-bezier(.4,0,.22,1)}.pswp--open{display:block}.pswp--zoom-allowed .pswp__img{cursor:-webkit-zoom-in;cursor:-moz-zoom-in;cursor:zoom-in}.pswp--zoomed-in .pswp__img{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.pswp--dragging .pswp__img{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.pswp__bg{background:#000;opacity:0;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-backface-visibility:hidden}.pswp__bg,.pswp__scroll-wrap{position:absolute;left:0;top:0;width:100%;height:100%}.pswp__scroll-wrap{overflow:hidden}.pswp__container,.pswp__zoom-wrap{-ms-touch-action:none;touch-action:none;position:absolute;left:0;right:0;top:0;bottom:0}.pswp__container,.pswp__img{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none}.pswp__zoom-wrap{position:absolute;width:100%;-webkit-transform-origin:left top;transform-origin:left top;-webkit-transition:-webkit-transform 333ms cubic-bezier(.4,0,.22,1);transition:-webkit-transform 333ms cubic-bezier(.4,0,.22,1);transition:transform 333ms cubic-bezier(.4,0,.22,1);transition:transform 333ms cubic-bezier(.4,0,.22,1),-webkit-transform 333ms cubic-bezier(.4,0,.22,1)}.pswp__bg{will-change:opacity;-webkit-transition:opacity 333ms cubic-bezier(.4,0,.22,1);transition:opacity 333ms cubic-bezier(.4,0,.22,1)}.pswp--animated-in .pswp__bg,.pswp--animated-in .pswp__zoom-wrap{-webkit-transition:none;transition:none}.pswp__container,.pswp__zoom-wrap{-webkit-backface-visibility:hidden}.pswp__item{right:0;bottom:0;overflow:hidden}.pswp__img,.pswp__item{position:absolute;left:0;top:0}.pswp__img{width:auto;height:auto}.pswp__img--placeholder{-webkit-backface-visibility:hidden}.pswp__img--placeholder--blank{background:#222}.pswp--ie .pswp__img{width:100%!important;height:auto!important;left:0;top:0}.pswp__error-msg{position:absolute;left:0;top:50%;width:100%;text-align:center;font-size:14px;line-height:16px;margin-top:-8px;color:#ccc}.pswp__error-msg a{color:#ccc;text-decoration:underline}.pswp__button{width:44px;height:44px;position:relative;background:none;cursor:pointer;overflow:visible;-webkit-appearance:none;display:block;border:0;padding:0;margin:0;float:right;opacity:.75;-webkit-transition:opacity .2s;transition:opacity .2s;-webkit-box-shadow:none;box-shadow:none}.pswp__button:focus,.pswp__button:hover{opacity:1}.pswp__button:active{outline:none;opacity:.9}.pswp__button::-moz-focus-inner{padding:0;border:0}.pswp__ui--over-close .pswp__button--close{opacity:1}.pswp__button,.pswp__button--arrow--left:before,.pswp__button--arrow--right:before{background:url(default-skin.png) 0 0 no-repeat;background-size:264px 88px;width:44px;height:44px}@media (-webkit-min-device-pixel-ratio:1.1),(-webkit-min-device-pixel-ratio:1.09375),(min-resolution:1.1dppx),(min-resolution:105dpi){.pswp--svg .pswp__button,.pswp--svg .pswp__button--arrow--left:before,.pswp--svg .pswp__button--arrow--right:before{background-image:url(default-skin.svg)}.pswp--svg .pswp__button--arrow--left,.pswp--svg .pswp__button--arrow--right{background:none}}.pswp__button--close{background-position:0 -44px}.pswp__button--share{background-position:-44px -44px}.pswp__button--fs{display:none}.pswp--supports-fs .pswp__button--fs{display:block}.pswp--fs .pswp__button--fs{background-position:-44px 0}.pswp__button--zoom{display:none;background-position:-88px 0}.pswp--zoom-allowed .pswp__button--zoom{display:block}.pswp--zoomed-in .pswp__button--zoom{background-position:-132px 0}.pswp--touch .pswp__button--arrow--left,.pswp--touch .pswp__button--arrow--right{visibility:hidden}.pswp__button--arrow--left,.pswp__button--arrow--right{background:none;top:50%;margin-top:-50px;width:70px;height:100px;position:absolute}.pswp__button--arrow--left{left:0}.pswp__button--arrow--right{right:0}.pswp__button--arrow--left:before,.pswp__button--arrow--right:before{content:"";top:35px;background-color:rgba(0,0,0,.3);height:30px;width:32px;position:absolute}.pswp__button--arrow--left:before{left:6px;background-position:-138px -44px}.pswp__button--arrow--right:before{right:6px;background-position:-94px -44px}.pswp__counter,.pswp__share-modal{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.pswp__share-modal{display:block;background:rgba(0,0,0,.5);width:100%;height:100%;top:0;left:0;padding:10px;position:absolute;z-index:1600;opacity:0;-webkit-transition:opacity .25s ease-out;transition:opacity .25s ease-out;-webkit-backface-visibility:hidden;will-change:opacity}.pswp__share-modal--hidden{display:none}.pswp__share-tooltip{z-index:1620;position:absolute;background:#fff;top:56px;border-radius:2px;display:block;width:auto;right:44px;-webkit-box-shadow:0 2px 5px rgba(0,0,0,.25);box-shadow:0 2px 5px rgba(0,0,0,.25);-webkit-transform:translateY(6px);transform:translateY(6px);-webkit-transition:-webkit-transform .25s;transition:-webkit-transform .25s;transition:transform .25s;transition:transform .25s,-webkit-transform .25s;-webkit-backface-visibility:hidden;will-change:transform}.pswp__share-tooltip a{display:block;padding:8px 12px;font-size:14px;line-height:18px}.pswp__share-tooltip a,.pswp__share-tooltip a:hover{color:#000;text-decoration:none}.pswp__share-tooltip a:first-child{border-radius:2px 2px 0 0}.pswp__share-tooltip a:last-child{border-radius:0 0 2px 2px}.pswp__share-modal--fade-in{opacity:1}.pswp__share-modal--fade-in .pswp__share-tooltip{-webkit-transform:translateY(0);transform:translateY(0)}.pswp--touch .pswp__share-tooltip a{padding:16px 12px}a.pswp__share--facebook:before{content:"";display:block;width:0;height:0;position:absolute;top:-12px;right:15px;border:6px solid transparent;border-bottom-color:#fff;-webkit-pointer-events:none;-moz-pointer-events:none;pointer-events:none}a.pswp__share--facebook:hover{background:#3e5c9a;color:#fff}a.pswp__share--facebook:hover:before{border-bottom-color:#3e5c9a}a.pswp__share--twitter:hover{background:#55acee;color:#fff}a.pswp__share--pinterest:hover{background:#ccc;color:#ce272d}a.pswp__share--download:hover{background:#ddd}.pswp__counter{position:absolute;left:0;top:0;height:44px;font-size:13px;line-height:44px;color:#fff;opacity:.75;padding:0 10px}.pswp__caption{position:absolute;left:0;bottom:0;width:100%;min-height:44px}.pswp__caption small{font-size:11px;color:#bbb}.pswp__caption__center{text-align:left;max-width:420px;margin:0 auto;font-size:13px;padding:10px;line-height:20px;color:#ccc}.pswp__caption--empty{display:none}.pswp__caption--fake{visibility:hidden}.pswp__preloader{width:44px;height:44px;position:absolute;top:0;left:50%;margin-left:-22px;opacity:0;-webkit-transition:opacity .25s ease-out;transition:opacity .25s ease-out;will-change:opacity;direction:ltr}.pswp__preloader__icn{width:20px;height:20px;margin:12px}.pswp__preloader--active{opacity:1}.pswp__preloader--active .pswp__preloader__icn{background:url(preloader.gif) 0 0 no-repeat}.pswp--css_animation .pswp__preloader--active{opacity:1}.pswp--css_animation .pswp__preloader--active .pswp__preloader__icn{-webkit-animation:clockwise .5s linear infinite;animation:clockwise .5s linear infinite}.pswp--css_animation .pswp__preloader--active .pswp__preloader__donut{-webkit-animation:donut-rotate 1s cubic-bezier(.4,0,.22,1) infinite;animation:donut-rotate 1s cubic-bezier(.4,0,.22,1) infinite}.pswp--css_animation .pswp__preloader__icn{background:none;opacity:.75;width:14px;height:14px;position:absolute;left:15px;top:15px;margin:0}.pswp--css_animation .pswp__preloader__cut{position:relative;width:7px;height:14px;overflow:hidden}.pswp--css_animation .pswp__preloader__donut{-webkit-box-sizing:border-box;box-sizing:border-box;width:14px;height:14px;border:2px solid #fff;border-radius:50%;border-left-color:transparent;border-bottom-color:transparent;position:absolute;top:0;left:0;background:none;margin:0}@media screen and (max-width:1024px){.pswp__preloader{position:relative;left:auto;top:auto;margin:0;float:right}}@-webkit-keyframes clockwise{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes clockwise{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes donut-rotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}50%{-webkit-transform:rotate(-140deg);transform:rotate(-140deg)}to{-webkit-transform:rotate(0);transform:rotate(0)}}@keyframes donut-rotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}50%{-webkit-transform:rotate(-140deg);transform:rotate(-140deg)}to{-webkit-transform:rotate(0);transform:rotate(0)}}.pswp__ui{-webkit-font-smoothing:auto;visibility:visible;opacity:1;z-index:1550}.pswp__top-bar{position:absolute;left:0;top:0;height:44px;width:100%}.pswp--has_mouse .pswp__button--arrow--left,.pswp--has_mouse .pswp__button--arrow--right,.pswp__caption,.pswp__top-bar{-webkit-backface-visibility:hidden;will-change:opacity;-webkit-transition:opacity 333ms cubic-bezier(.4,0,.22,1);transition:opacity 333ms cubic-bezier(.4,0,.22,1)}.pswp--has_mouse .pswp__button--arrow--left,.pswp--has_mouse .pswp__button--arrow--right{visibility:visible}.pswp__caption,.pswp__top-bar{background-color:rgba(0,0,0,.5)}.pswp__ui--fit .pswp__caption,.pswp__ui--fit .pswp__top-bar{background-color:rgba(0,0,0,.3)}.pswp__ui--idle .pswp__button--arrow--left,.pswp__ui--idle .pswp__button--arrow--right,.pswp__ui--idle .pswp__top-bar{opacity:0}.pswp__ui--hidden .pswp__button--arrow--left,.pswp__ui--hidden .pswp__button--arrow--right,.pswp__ui--hidden .pswp__caption,.pswp__ui--hidden .pswp__top-bar{opacity:.001}.pswp__ui--one-slide .pswp__button--arrow--left,.pswp__ui--one-slide .pswp__button--arrow--right,.pswp__ui--one-slide .pswp__counter{display:none}.pswp__element--disabled{display:none!important}.pswp--minimal--dark .pswp__top-bar{background:none} -------------------------------------------------------------------------------- /dist/preloader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minhtranite/react-photoswipe/cbb3ecc10eb6e1dbee8a7b857ed3b8559c77f3e1/dist/preloader.gif -------------------------------------------------------------------------------- /dist/react-photoswipe.js: -------------------------------------------------------------------------------- 1 | !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("prop-types"),require("react")):"function"==typeof define&&define.amd?define(["prop-types","react"],t):"object"==typeof exports?exports.ReactPhotoswipe=t(require("prop-types"),require("react")):e.ReactPhotoswipe=t(e.PropTypes,e.React)}(this,function(e,t){return function(e){function t(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=6)}([function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:[];e.photoSwipe.items.length=0,t.forEach(function(t){e.photoSwipe.items.push(t)}),e.photoSwipe.invalidateCurrItems(),e.photoSwipe.updateSize(!0)},this.closePhotoSwipe=function(){e.photoSwipe&&e.photoSwipe.close()},this.handleClose=function(){var t=e.props.onClose;e.setState({isOpen:!1},function(){t&&t()})}};t.default=b,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["beforeChange","afterChange","imageLoadComplete","resize","gettingData","mouseUsed","initialZoomIn","initialZoomInEnd","initialZoomOut","initialZoomOutEnd","parseVerticalMargin","close","unbindEvents","destroy","updateScrollOffset","preventDragEvent","shareLinkClick"],e.exports=t.default},function(e,t,n){var o,i;!function(){"use strict";function n(){for(var e=[],t=0;t=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t0&&n(c)?t>1?r(c,t-1,n,o,a):i(a,c):o||(a[a.length]=c)}return a}function a(e,t){return e=Object(e),l(e,t,function(t,n){return n in e})}function l(e,t,n){for(var o=-1,i=t.length,r={};++o-1&&e%1==0&&e<=g}function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){return!!e&&"object"==typeof e}function y(e){return"symbol"==typeof e||v(e)&&D.call(e)==C}var w=1/0,g=9007199254740991,b="[object Arguments]",x="[object Function]",_="[object GeneratorFunction]",C="[object Symbol]",E="object"==typeof t&&t&&t.Object===Object&&t,I="object"==typeof self&&self&&self.Object===Object&&self,T=E||I||Function("return this")(),O=Object.prototype,S=O.hasOwnProperty,D=O.toString,M=T.Symbol,P=O.propertyIsEnumerable,F=M?M.isConcatSpreadable:void 0,k=Math.max,A=Array.isArray,R=function(e,t){return t=k(void 0===t?e.length-1:t,0),function(){for(var o=arguments,i=-1,r=k(o.length-t,0),a=Array(r);++i-1&&(n.onTap(),o=!0);if(o){e.stopPropagation&&e.stopPropagation(),y=!0;var l=t.features.isOldAndroid?600:30;w=setTimeout(function(){y=!1},l)}},O=function(){return!e.likelyTouchDevice||v.mouseUsed||screen.width>v.fitControlsWidth},S=function(e,n,o){t[(o?"add":"remove")+"Class"](e,"pswp__"+n)},D=function(){var e=1===v.getNumItemsFn();e!==h&&(S(o,"ui--one-slide",e),h=e)},M=function(){S(s,"share-modal--hidden",E)},P=function(){return E=!E,E?(t.removeClass(s,"pswp__share-modal--fade-in"),setTimeout(function(){E&&M()},300)):(M(),setTimeout(function(){E||t.addClass(s,"pswp__share-modal--fade-in")},30)),E||k(),!1},F=function(t){t=t||window.event;var n=t.target||t.srcElement;return e.shout("shareLinkClick",t,n),!!n.href&&(!!n.hasAttribute("download")||(window.open(n.href,"pswp_share","scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,top=100,left="+(window.screen?Math.round(screen.width/2-275):100)),E||P(),!1))},k=function(){for(var e,t,n,o,i,r="",a=0;a